diff --git a/composer.lock b/composer.lock index 919d4701..06981875 100644 --- a/composer.lock +++ b/composer.lock @@ -207,16 +207,16 @@ }, { "name": "doctrine/inflector", - "version": "2.0.8", + "version": "2.0.9", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" + "reference": "2930cd5ef353871c821d5c43ed030d39ac8cfe65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/2930cd5ef353871c821d5c43ed030d39ac8cfe65", + "reference": "2930cd5ef353871c821d5c43ed030d39ac8cfe65", "shasum": "" }, "require": { @@ -278,7 +278,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.8" + "source": "https://github.com/doctrine/inflector/tree/2.0.9" }, "funding": [ { @@ -294,7 +294,7 @@ "type": "tidelift" } ], - "time": "2023-06-16T13:40:37+00:00" + "time": "2024-01-15T18:05:13+00:00" }, { "name": "doctrine/lexer", @@ -1119,16 +1119,16 @@ }, { "name": "laravel/framework", - "version": "v10.39.0", + "version": "v10.41.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "114926b07bfb5fbf2545c03aa2ce5c8c37be650c" + "reference": "da31969bd35e6ee0bbcd9e876f88952dc754b012" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/114926b07bfb5fbf2545c03aa2ce5c8c37be650c", - "reference": "114926b07bfb5fbf2545c03aa2ce5c8c37be650c", + "url": "https://api.github.com/repos/laravel/framework/zipball/da31969bd35e6ee0bbcd9e876f88952dc754b012", + "reference": "da31969bd35e6ee0bbcd9e876f88952dc754b012", "shasum": "" }, "require": { @@ -1320,20 +1320,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-12-27T14:26:28+00:00" + "time": "2024-01-16T15:23:58+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.14", + "version": "v0.1.15", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "2219fa9c4b944add1e825c3bdb8ecae8bc503bc6" + "reference": "d814a27514d99b03c85aa42b22cfd946568636c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/2219fa9c4b944add1e825c3bdb8ecae8bc503bc6", - "reference": "2219fa9c4b944add1e825c3bdb8ecae8bc503bc6", + "url": "https://api.github.com/repos/laravel/prompts/zipball/d814a27514d99b03c85aa42b22cfd946568636c1", + "reference": "d814a27514d99b03c85aa42b22cfd946568636c1", "shasum": "" }, "require": { @@ -1375,9 +1375,9 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.14" + "source": "https://github.com/laravel/prompts/tree/v0.1.15" }, - "time": "2023-12-27T04:18:09+00:00" + "time": "2023-12-29T22:37:42+00:00" }, { "name": "laravel/sanctum", @@ -1507,25 +1507,25 @@ }, { "name": "laravel/tinker", - "version": "v2.8.2", + "version": "v2.9.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3" + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/b936d415b252b499e8c3b1f795cd4fc20f57e1f3", - "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3", + "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", "php": "^7.2.5|^8.0", - "psy/psysh": "^0.10.4|^0.11.1", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, "require-dev": { "mockery/mockery": "~1.3.3|^1.4.2", @@ -1533,13 +1533,10 @@ "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" @@ -1570,9 +1567,9 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.8.2" + "source": "https://github.com/laravel/tinker/tree/v2.9.0" }, - "time": "2023-08-15T14:27:00+00:00" + "time": "2024-01-04T16:10:04+00:00" }, { "name": "league/commonmark", @@ -2240,16 +2237,16 @@ }, { "name": "nette/utils", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015" + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/a9d127dd6a203ce6d255b2e2db49759f7506e015", - "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015", + "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", "shasum": "" }, "require": { @@ -2320,31 +2317,33 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.3" + "source": "https://github.com/nette/utils/tree/v4.0.4" }, - "time": "2023-10-29T21:02:13+00:00" + "time": "2024-01-17T16:50:36+00:00" }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -2352,7 +2351,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2376,9 +2375,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-01-07T17:17:35+00:00" }, { "name": "nunomaduro/termwind", @@ -2955,25 +2954,25 @@ }, { "name": "psy/psysh", - "version": "v0.11.22", + "version": "v0.12.0", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "128fa1b608be651999ed9789c95e6e2a31b5802b" + "reference": "750bf031a48fd07c673dbe3f11f72362ea306d0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/128fa1b608be651999ed9789c95e6e2a31b5802b", - "reference": "128fa1b608be651999ed9789c95e6e2a31b5802b", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/750bf031a48fd07c673dbe3f11f72362ea306d0d", + "reference": "750bf031a48fd07c673dbe3f11f72362ea306d0d", "shasum": "" }, "require": { "ext-json": "*", "ext-tokenizer": "*", - "nikic/php-parser": "^4.0 || ^3.1", - "php": "^8.0 || ^7.0.8", - "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" }, "conflict": { "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" @@ -2984,8 +2983,7 @@ "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, "bin": [ "bin/psysh" @@ -2993,7 +2991,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-0.11": "0.11.x-dev" + "dev-main": "0.12.x-dev" }, "bamarni-bin": { "bin-links": false, @@ -3029,9 +3027,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.22" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.0" }, - "time": "2023-10-14T21:56:36+00:00" + "time": "2023-12-20T15:28:09+00:00" }, { "name": "ralouphie/getallheaders", @@ -3260,16 +3258,16 @@ }, { "name": "symfony/console", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -3334,7 +3332,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -3350,7 +3348,7 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:54:28+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/css-selector", @@ -3561,16 +3559,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.0.0", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "c459b40ffe67c49af6fd392aac374c9edf8a027e" + "reference": "098b62ae81fdd6cbf941f355059f617db28f4f9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c459b40ffe67c49af6fd392aac374c9edf8a027e", - "reference": "c459b40ffe67c49af6fd392aac374c9edf8a027e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/098b62ae81fdd6cbf941f355059f617db28f4f9a", + "reference": "098b62ae81fdd6cbf941f355059f617db28f4f9a", "shasum": "" }, "require": { @@ -3621,7 +3619,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.2" }, "funding": [ { @@ -3637,7 +3635,7 @@ "type": "tidelift" } ], - "time": "2023-07-27T16:29:09+00:00" + "time": "2023-12-27T22:24:19+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3781,16 +3779,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "44a6d39a9cc11e154547d882d5aac1e014440771" + "reference": "172d807f9ef3fc3fbed8377cc57c20d389269271" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/44a6d39a9cc11e154547d882d5aac1e014440771", - "reference": "44a6d39a9cc11e154547d882d5aac1e014440771", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/172d807f9ef3fc3fbed8377cc57c20d389269271", + "reference": "172d807f9ef3fc3fbed8377cc57c20d389269271", "shasum": "" }, "require": { @@ -3838,7 +3836,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.0" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.2" }, "funding": [ { @@ -3854,20 +3852,20 @@ "type": "tidelift" } ], - "time": "2023-11-20T16:41:16+00:00" + "time": "2023-12-27T22:16:42+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "2953274c16a229b3933ef73a6898e18388e12e1b" + "reference": "13e8387320b5942d0dc408440c888e2d526efef4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2953274c16a229b3933ef73a6898e18388e12e1b", - "reference": "2953274c16a229b3933ef73a6898e18388e12e1b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/13e8387320b5942d0dc408440c888e2d526efef4", + "reference": "13e8387320b5942d0dc408440c888e2d526efef4", "shasum": "" }, "require": { @@ -3951,7 +3949,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.1" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.2" }, "funding": [ { @@ -3967,20 +3965,20 @@ "type": "tidelift" } ], - "time": "2023-12-01T17:02:02+00:00" + "time": "2023-12-30T15:31:44+00:00" }, { "name": "symfony/mailer", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba" + "reference": "6da89e5c9202f129717a770a03183fb140720168" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba", - "reference": "ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba", + "url": "https://api.github.com/repos/symfony/mailer/zipball/6da89e5c9202f129717a770a03183fb140720168", + "reference": "6da89e5c9202f129717a770a03183fb140720168", "shasum": "" }, "require": { @@ -4031,7 +4029,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.4.0" + "source": "https://github.com/symfony/mailer/tree/v6.4.2" }, "funding": [ { @@ -4047,7 +4045,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T18:02:22+00:00" + "time": "2023-12-19T09:12:31+00:00" }, { "name": "symfony/mime", @@ -4873,16 +4871,16 @@ }, { "name": "symfony/process", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa" + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/191703b1566d97a5425dc969e4350d32b8ef17aa", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa", + "url": "https://api.github.com/repos/symfony/process/zipball/c4b1ef0bc80533d87a2e969806172f1c2a980241", + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241", "shasum": "" }, "require": { @@ -4914,7 +4912,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.0" + "source": "https://github.com/symfony/process/tree/v6.4.2" }, "funding": [ { @@ -4930,20 +4928,20 @@ "type": "tidelift" } ], - "time": "2023-11-17T21:06:49+00:00" + "time": "2023-12-22T16:42:54+00:00" }, { "name": "symfony/routing", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0c95c164fdba18b12523b75e64199ca3503e6d40" + "reference": "98eab13a07fddc85766f1756129c69f207ffbc21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0c95c164fdba18b12523b75e64199ca3503e6d40", - "reference": "0c95c164fdba18b12523b75e64199ca3503e6d40", + "url": "https://api.github.com/repos/symfony/routing/zipball/98eab13a07fddc85766f1756129c69f207ffbc21", + "reference": "98eab13a07fddc85766f1756129c69f207ffbc21", "shasum": "" }, "require": { @@ -4997,7 +4995,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.1" + "source": "https://github.com/symfony/routing/tree/v6.4.2" }, "funding": [ { @@ -5013,7 +5011,7 @@ "type": "tidelift" } ], - "time": "2023-12-01T14:54:37+00:00" + "time": "2023-12-29T15:34:34+00:00" }, { "name": "symfony/service-contracts", @@ -5099,16 +5097,16 @@ }, { "name": "symfony/string", - "version": "v7.0.0", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620" + "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92bd2bfbba476d4a1838e5e12168bef2fd1e6620", - "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620", + "url": "https://api.github.com/repos/symfony/string/zipball/cc78f14f91f5e53b42044d0620961c48028ff9f5", + "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5", "shasum": "" }, "require": { @@ -5165,7 +5163,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.0" + "source": "https://github.com/symfony/string/tree/v7.0.2" }, "funding": [ { @@ -5181,20 +5179,20 @@ "type": "tidelift" } ], - "time": "2023-11-29T08:40:23+00:00" + "time": "2023-12-10T16:54:46+00:00" }, { "name": "symfony/translation", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37" + "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37", - "reference": "b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37", + "url": "https://api.github.com/repos/symfony/translation/zipball/a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", + "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", "shasum": "" }, "require": { @@ -5260,7 +5258,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.0" + "source": "https://github.com/symfony/translation/tree/v6.4.2" }, "funding": [ { @@ -5276,7 +5274,7 @@ "type": "tidelift" } ], - "time": "2023-11-29T08:14:36+00:00" + "time": "2023-12-18T09:25:29+00:00" }, { "name": "symfony/translation-contracts", @@ -5432,16 +5430,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "c40f7d17e91d8b407582ed51a2bbf83c52c367f6" + "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c40f7d17e91d8b407582ed51a2bbf83c52c367f6", - "reference": "c40f7d17e91d8b407582ed51a2bbf83c52c367f6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", + "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", "shasum": "" }, "require": { @@ -5497,7 +5495,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.0" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.2" }, "funding": [ { @@ -5513,7 +5511,7 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:28:32+00:00" + "time": "2023-12-28T19:16:56+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5788,16 +5786,16 @@ "packages-dev": [ { "name": "fakerphp/faker", - "version": "v1.23.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { @@ -5823,11 +5821,6 @@ "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -5850,9 +5843,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "time": "2023-06-12T08:44:38+00:00" + "time": "2024-01-02T13:46:09+00:00" }, { "name": "filp/whoops", @@ -5978,16 +5971,16 @@ }, { "name": "laravel/pint", - "version": "v1.13.7", + "version": "v1.13.9", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "4157768980dbd977f1c4b4cc94997416d8b30ece" + "reference": "e3e269cc5d874c8efd2dc7962b1c7ff2585fe525" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/4157768980dbd977f1c4b4cc94997416d8b30ece", - "reference": "4157768980dbd977f1c4b4cc94997416d8b30ece", + "url": "https://api.github.com/repos/laravel/pint/zipball/e3e269cc5d874c8efd2dc7962b1c7ff2585fe525", + "reference": "e3e269cc5d874c8efd2dc7962b1c7ff2585fe525", "shasum": "" }, "require": { @@ -5998,13 +5991,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.38.0", - "illuminate/view": "^10.30.1", + "friendsofphp/php-cs-fixer": "^3.47.0", + "illuminate/view": "^10.40.0", + "larastan/larastan": "^2.8.1", "laravel-zero/framework": "^10.3.0", - "mockery/mockery": "^1.6.6", - "nunomaduro/larastan": "^2.6.4", + "mockery/mockery": "^1.6.7", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.24.2" + "pestphp/pest": "^2.31.0" }, "bin": [ "builds/pint" @@ -6040,20 +6033,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2023-12-05T19:43:12+00:00" + "time": "2024-01-16T17:39:29+00:00" }, { "name": "laravel/sail", - "version": "v1.26.3", + "version": "v1.27.1", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "fa1ad5fbb03686dfc752bfd1861d86091cc1c32d" + "reference": "9dc648978e4276f2bfd37a076a52e3bd9394777f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/fa1ad5fbb03686dfc752bfd1861d86091cc1c32d", - "reference": "fa1ad5fbb03686dfc752bfd1861d86091cc1c32d", + "url": "https://api.github.com/repos/laravel/sail/zipball/9dc648978e4276f2bfd37a076a52e3bd9394777f", + "reference": "9dc648978e4276f2bfd37a076a52e3bd9394777f", "shasum": "" }, "require": { @@ -6105,7 +6098,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2023-12-02T18:26:39+00:00" + "time": "2024-01-13T18:46:48+00:00" }, { "name": "mockery/mockery", @@ -6779,16 +6772,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.5", + "version": "10.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856" + "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ed21115d505b4b4f7dc7b5651464e19a2c7f7856", - "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/08f4fa74d5fbfff1ef22abffee47aaedcaea227e", + "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e", "shasum": "" }, "require": { @@ -6860,7 +6853,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.5" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.8" }, "funding": [ { @@ -6876,7 +6869,7 @@ "type": "tidelift" } ], - "time": "2023-12-27T15:13:52+00:00" + "time": "2024-01-19T07:07:27+00:00" }, { "name": "sebastian/cli-parser", @@ -7927,16 +7920,16 @@ }, { "name": "spatie/ignition", - "version": "1.11.3", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "3d886de644ff7a5b42e4d27c1e1f67c8b5f00044" + "reference": "5b6f801c605a593106b623e45ca41496a6e7d56d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/3d886de644ff7a5b42e4d27c1e1f67c8b5f00044", - "reference": "3d886de644ff7a5b42e4d27c1e1f67c8b5f00044", + "url": "https://api.github.com/repos/spatie/ignition/zipball/5b6f801c605a593106b623e45ca41496a6e7d56d", + "reference": "5b6f801c605a593106b623e45ca41496a6e7d56d", "shasum": "" }, "require": { @@ -8006,39 +7999,39 @@ "type": "github" } ], - "time": "2023-10-18T14:09:40+00:00" + "time": "2024-01-03T15:49:39+00:00" }, { "name": "spatie/laravel-ignition", - "version": "2.3.3", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "66499cd3c858642ded56dafb8fa0352057ca20dd" + "reference": "005e1e7b1232f3b22d7e7be3f602693efc7dba67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/66499cd3c858642ded56dafb8fa0352057ca20dd", - "reference": "66499cd3c858642ded56dafb8fa0352057ca20dd", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/005e1e7b1232f3b22d7e7be3f602693efc7dba67", + "reference": "005e1e7b1232f3b22d7e7be3f602693efc7dba67", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "illuminate/support": "^10.0", + "illuminate/support": "^10.0|^11.0", "php": "^8.1", "spatie/flare-client-php": "^1.3.5", "spatie/ignition": "^1.9", - "symfony/console": "^6.2.3", - "symfony/var-dumper": "^6.2.3" + "symfony/console": "^6.2.3|^7.0", + "symfony/var-dumper": "^6.2.3|^7.0" }, "require-dev": { - "livewire/livewire": "^2.11", + "livewire/livewire": "^2.11|^3.3.5", "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.3.4", - "orchestra/testbench": "^8.0", - "pestphp/pest": "^1.22.3", + "openai-php/client": "^0.8.1", + "orchestra/testbench": "^8.0|^9.0", + "pestphp/pest": "^2.30", "phpstan/extension-installer": "^1.2", "phpstan/phpstan-deprecation-rules": "^1.1.1", "phpstan/phpstan-phpunit": "^1.3.3", @@ -8098,7 +8091,7 @@ "type": "github" } ], - "time": "2023-12-21T09:43:05+00:00" + "time": "2024-01-12T13:14:58+00:00" }, { "name": "symfony/yaml", diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index b67c576a..cea32ccc 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -15,9 +15,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.10.tgz", - "integrity": "sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", "cpu": [ "x64" ], @@ -84,10 +84,15 @@ "vue": "^3.0.0" } }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.1.tgz", - "integrity": "sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz", + "integrity": "sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==", "cpu": [ "x64" ], @@ -96,10 +101,15 @@ "win32" ] }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, "node_modules/@vitejs/plugin-vue": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.0.tgz", - "integrity": "sha512-7x5e8X4J1Wi4NxudGjJBd2OFerAi/0nzF80ojCzvfj347WVr0YSn82C8BSsgwSHzlk9Kw5xnZfj0/7RLnNwP5w==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.3.tgz", + "integrity": "sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==", "engines": { "node": "^18.0.0 || >=20.0.0" }, @@ -109,106 +119,94 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.36.tgz", - "integrity": "sha512-bbyZM5hvBicv0PW3KUfVi+x3ylHnfKG7DOn5wM+f2OztTzTjLEyBb/5yrarIYpmnGitVGbjZqDbODyW4iK8hqw==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.15.tgz", + "integrity": "sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.36", + "@babel/parser": "^7.23.6", + "@vue/shared": "3.4.15", + "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map": "^0.6.1" + "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-dom": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.36.tgz", - "integrity": "sha512-tcOTAOiW4s24QLnq+ON6J+GRONXJ+A/mqKCORi0LSlIh8XQlNnlm24y8xIL8la+ZDgkdbjarQ9ZqYSvEja6gVA==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.15.tgz", + "integrity": "sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==", "dependencies": { - "@vue/compiler-core": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/compiler-core": "3.4.15", + "@vue/shared": "3.4.15" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.36.tgz", - "integrity": "sha512-AvGb4bTj4W8uQ4BqaSxo7UwTEqX5utdRSMyHy58OragWlt8nEACQ9mIeQh3K4di4/SX+41+pJrLIY01lHAOFOA==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.15.tgz", + "integrity": "sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.36", - "@vue/compiler-dom": "3.2.36", - "@vue/compiler-ssr": "3.2.36", - "@vue/reactivity-transform": "3.2.36", - "@vue/shared": "3.2.36", + "@babel/parser": "^7.23.6", + "@vue/compiler-core": "3.4.15", + "@vue/compiler-dom": "3.4.15", + "@vue/compiler-ssr": "3.4.15", + "@vue/shared": "3.4.15", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" + "magic-string": "^0.30.5", + "postcss": "^8.4.33", + "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.36.tgz", - "integrity": "sha512-+KugInUFRvOxEdLkZwE+W43BqHyhBh0jpYXhmqw1xGq2dmE6J9eZ8UUSOKNhdHtQ/iNLWWeK/wPZkVLUf3YGaw==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.15.tgz", + "integrity": "sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==", "dependencies": { - "@vue/compiler-dom": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/compiler-dom": "3.4.15", + "@vue/shared": "3.4.15" } }, "node_modules/@vue/reactivity": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.36.tgz", - "integrity": "sha512-c2qvopo0crh9A4GXi2/2kfGYMxsJW4tVILrqRPydVGZHhq0fnzy6qmclWOhBFckEhmyxmpHpdJtIRYGeKcuhnA==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.15.tgz", + "integrity": "sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==", "dependencies": { - "@vue/shared": "3.2.36" - } - }, - "node_modules/@vue/reactivity-transform": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.36.tgz", - "integrity": "sha512-Jk5o2BhpODC9XTA7o4EL8hSJ4JyrFWErLtClG3NH8wDS7ri9jBDWxI7/549T7JY9uilKsaNM+4pJASLj5dtRwA==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.36", - "@vue/shared": "3.2.36", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" + "@vue/shared": "3.4.15" } }, "node_modules/@vue/runtime-core": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.36.tgz", - "integrity": "sha512-PTWBD+Lub+1U3/KhbCExrfxyS14hstLX+cBboxVHaz+kXoiDLNDEYAovPtxeTutbqtClIXtft+wcGdC+FUQ9qQ==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.15.tgz", + "integrity": "sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==", "dependencies": { - "@vue/reactivity": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/reactivity": "3.4.15", + "@vue/shared": "3.4.15" } }, "node_modules/@vue/runtime-dom": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.36.tgz", - "integrity": "sha512-gYPYblm7QXHVuBohqNRRT7Wez0f2Mx2D40rb4fleehrJU9CnkjG0phhcGEZFfGwCmHZRqBCRgbFWE98bPULqkg==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.15.tgz", + "integrity": "sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==", "dependencies": { - "@vue/runtime-core": "3.2.36", - "@vue/shared": "3.2.36", - "csstype": "^2.6.8" + "@vue/runtime-core": "3.4.15", + "@vue/shared": "3.4.15", + "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.36.tgz", - "integrity": "sha512-uZE0+jfye6yYXWvAQYeHZv+f50sRryvy16uiqzk3jn8hEY8zTjI+rzlmZSGoE915k+W/Ol9XSw6vxOUD8dGkUg==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.15.tgz", + "integrity": "sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==", "dependencies": { - "@vue/compiler-ssr": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/compiler-ssr": "3.4.15", + "@vue/shared": "3.4.15" }, "peerDependencies": { - "vue": "3.2.36" + "vue": "3.4.15" } }, "node_modules/@vue/shared": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.36.tgz", - "integrity": "sha512-JtB41wXl7Au3+Nl3gD16Cfpj7k/6aCroZ6BbOiCMFCMvrOpkg/qQUXTso2XowaNqBbnkuGHurLAqkLBxNGc1hQ==" + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.15.tgz", + "integrity": "sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==" }, "node_modules/asynckit": { "version": "0.4.0", @@ -216,11 +214,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", - "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -250,9 +248,9 @@ } }, "node_modules/csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/deepmerge": { "version": "4.3.1", @@ -283,10 +281,21 @@ "node": ">=0.4.0" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/esbuild": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.10.tgz", - "integrity": "sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -295,29 +304,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.10", - "@esbuild/android-arm": "0.19.10", - "@esbuild/android-arm64": "0.19.10", - "@esbuild/android-x64": "0.19.10", - "@esbuild/darwin-arm64": "0.19.10", - "@esbuild/darwin-x64": "0.19.10", - "@esbuild/freebsd-arm64": "0.19.10", - "@esbuild/freebsd-x64": "0.19.10", - "@esbuild/linux-arm": "0.19.10", - "@esbuild/linux-arm64": "0.19.10", - "@esbuild/linux-ia32": "0.19.10", - "@esbuild/linux-loong64": "0.19.10", - "@esbuild/linux-mips64el": "0.19.10", - "@esbuild/linux-ppc64": "0.19.10", - "@esbuild/linux-riscv64": "0.19.10", - "@esbuild/linux-s390x": "0.19.10", - "@esbuild/linux-x64": "0.19.10", - "@esbuild/netbsd-x64": "0.19.10", - "@esbuild/openbsd-x64": "0.19.10", - "@esbuild/sunos-x64": "0.19.10", - "@esbuild/win32-arm64": "0.19.10", - "@esbuild/win32-ia32": "0.19.10", - "@esbuild/win32-x64": "0.19.10" + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" } }, "node_modules/estree-walker": { @@ -326,9 +335,9 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", @@ -464,11 +473,14 @@ "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" } }, "node_modules/mime-db": { @@ -538,9 +550,9 @@ } }, "node_modules/postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "version": "8.4.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", "funding": [ { "type": "opencollective", @@ -584,9 +596,12 @@ } }, "node_modules/rollup": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", - "integrity": "sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.5.tgz", + "integrity": "sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==", + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, @@ -595,31 +610,32 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.1", - "@rollup/rollup-android-arm64": "4.9.1", - "@rollup/rollup-darwin-arm64": "4.9.1", - "@rollup/rollup-darwin-x64": "4.9.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.1", - "@rollup/rollup-linux-arm64-gnu": "4.9.1", - "@rollup/rollup-linux-arm64-musl": "4.9.1", - "@rollup/rollup-linux-riscv64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-musl": "4.9.1", - "@rollup/rollup-win32-arm64-msvc": "4.9.1", - "@rollup/rollup-win32-ia32-msvc": "4.9.1", - "@rollup/rollup-win32-x64-msvc": "4.9.1", + "@rollup/rollup-android-arm-eabi": "4.9.5", + "@rollup/rollup-android-arm64": "4.9.5", + "@rollup/rollup-darwin-arm64": "4.9.5", + "@rollup/rollup-darwin-x64": "4.9.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.5", + "@rollup/rollup-linux-arm64-gnu": "4.9.5", + "@rollup/rollup-linux-arm64-musl": "4.9.5", + "@rollup/rollup-linux-riscv64-gnu": "4.9.5", + "@rollup/rollup-linux-x64-gnu": "4.9.5", + "@rollup/rollup-linux-x64-musl": "4.9.5", + "@rollup/rollup-win32-arm64-msvc": "4.9.5", + "@rollup/rollup-win32-ia32-msvc": "4.9.5", + "@rollup/rollup-win32-x64-msvc": "4.9.5", "fsevents": "~2.3.2" } }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", "dependencies": { "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -638,14 +654,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", @@ -654,16 +662,10 @@ "node": ">=0.10.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead" - }, "node_modules/vite": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.10.tgz", - "integrity": "sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", + "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", "dependencies": { "esbuild": "^0.19.3", "postcss": "^8.4.32", @@ -725,15 +727,23 @@ } }, "node_modules/vue": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.36.tgz", - "integrity": "sha512-5yTXmrE6gW8IQgttzHW5bfBiFA6mx35ZXHjGLDmKYzW6MMmYvCwuKybANRepwkMYeXw2v1buGg3/lPICY5YlZw==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.15.tgz", + "integrity": "sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==", "dependencies": { - "@vue/compiler-dom": "3.2.36", - "@vue/compiler-sfc": "3.2.36", - "@vue/runtime-dom": "3.2.36", - "@vue/server-renderer": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/compiler-dom": "3.4.15", + "@vue/compiler-sfc": "3.4.15", + "@vue/runtime-dom": "3.4.15", + "@vue/server-renderer": "3.4.15", + "@vue/shared": "3.4.15" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } } } diff --git a/node_modules/@esbuild/win32-x64/esbuild.exe b/node_modules/@esbuild/win32-x64/esbuild.exe index ee9e0641..05c9e3cb 100644 Binary files a/node_modules/@esbuild/win32-x64/esbuild.exe and b/node_modules/@esbuild/win32-x64/esbuild.exe differ diff --git a/node_modules/@esbuild/win32-x64/package.json b/node_modules/@esbuild/win32-x64/package.json index 2d73698d..0bae0757 100644 --- a/node_modules/@esbuild/win32-x64/package.json +++ b/node_modules/@esbuild/win32-x64/package.json @@ -1,6 +1,6 @@ { "name": "@esbuild/win32-x64", - "version": "0.19.10", + "version": "0.19.11", "description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.", "repository": "https://github.com/evanw/esbuild", "license": "MIT", diff --git a/node_modules/sourcemap-codec/LICENSE b/node_modules/@jridgewell/sourcemap-codec/LICENSE similarity index 100% rename from node_modules/sourcemap-codec/LICENSE rename to node_modules/@jridgewell/sourcemap-codec/LICENSE diff --git a/node_modules/@jridgewell/sourcemap-codec/README.md b/node_modules/@jridgewell/sourcemap-codec/README.md new file mode 100644 index 00000000..5cbb3152 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/README.md @@ -0,0 +1,200 @@ +# @jridgewell/sourcemap-codec + +Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). + + +## Why? + +Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. + +This package makes the process slightly easier. + + +## Installation + +```bash +npm install @jridgewell/sourcemap-codec +``` + + +## Usage + +```js +import { encode, decode } from '@jridgewell/sourcemap-codec'; + +var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); + +assert.deepEqual( decoded, [ + // the first line (of the generated code) has no mappings, + // as shown by the starting semi-colon (which separates lines) + [], + + // the second line contains four (comma-separated) segments + [ + // segments are encoded as you'd expect: + // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] + + // i.e. the first segment begins at column 2, and maps back to the second column + // of the second line (both zero-based) of the 0th source, and uses the 0th + // name in the `map.names` array + [ 2, 0, 2, 2, 0 ], + + // the remaining segments are 4-length rather than 5-length, + // because they don't map a name + [ 4, 0, 2, 4 ], + [ 6, 0, 2, 5 ], + [ 7, 0, 2, 7 ] + ], + + // the final line contains two segments + [ + [ 2, 1, 10, 19 ], + [ 12, 1, 11, 20 ] + ] +]); + +var encoded = encode( decoded ); +assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); +``` + +## Benchmarks + +``` +node v18.0.0 + +amp.js.map - 45120 segments + +Decode Memory Usage: +@jridgewell/sourcemap-codec 5479160 bytes +sourcemap-codec 5659336 bytes +source-map-0.6.1 17144440 bytes +source-map-0.8.0 6867424 bytes +Smallest memory usage is @jridgewell/sourcemap-codec + +Decode speed: +decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled) +decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled) +decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled) +decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec + +Encode Memory Usage: +@jridgewell/sourcemap-codec 1261620 bytes +sourcemap-codec 9119248 bytes +source-map-0.6.1 8968560 bytes +source-map-0.8.0 8952952 bytes +Smallest memory usage is @jridgewell/sourcemap-codec + +Encode speed: +encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled) +encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled) +encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled) +encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec + + +*** + + +babel.min.js.map - 347793 segments + +Decode Memory Usage: +@jridgewell/sourcemap-codec 35338184 bytes +sourcemap-codec 35922736 bytes +source-map-0.6.1 62366360 bytes +source-map-0.8.0 44337416 bytes +Smallest memory usage is @jridgewell/sourcemap-codec + +Decode speed: +decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled) +decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled) +decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled) +decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled) +Fastest is decode: source-map-0.8.0 + +Encode Memory Usage: +@jridgewell/sourcemap-codec 7212604 bytes +sourcemap-codec 21421456 bytes +source-map-0.6.1 25286888 bytes +source-map-0.8.0 25498744 bytes +Smallest memory usage is @jridgewell/sourcemap-codec + +Encode speed: +encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled) +encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled) +encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled) +encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec + + +*** + + +preact.js.map - 1992 segments + +Decode Memory Usage: +@jridgewell/sourcemap-codec 500272 bytes +sourcemap-codec 516864 bytes +source-map-0.6.1 1596672 bytes +source-map-0.8.0 517272 bytes +Smallest memory usage is @jridgewell/sourcemap-codec + +Decode speed: +decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled) +decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled) +decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled) +decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec + +Encode Memory Usage: +@jridgewell/sourcemap-codec 321026 bytes +sourcemap-codec 830832 bytes +source-map-0.6.1 586608 bytes +source-map-0.8.0 586680 bytes +Smallest memory usage is @jridgewell/sourcemap-codec + +Encode speed: +encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled) +encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled) +encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled) +encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec + + +*** + + +react.js.map - 5726 segments + +Decode Memory Usage: +@jridgewell/sourcemap-codec 734848 bytes +sourcemap-codec 954200 bytes +source-map-0.6.1 2276432 bytes +source-map-0.8.0 955488 bytes +Smallest memory usage is @jridgewell/sourcemap-codec + +Decode speed: +decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled) +decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled) +decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled) +decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled) +Fastest is decode: @jridgewell/sourcemap-codec + +Encode Memory Usage: +@jridgewell/sourcemap-codec 638672 bytes +sourcemap-codec 1109840 bytes +source-map-0.6.1 1321224 bytes +source-map-0.8.0 1324448 bytes +Smallest memory usage is @jridgewell/sourcemap-codec + +Encode speed: +encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled) +encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled) +encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled) +encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled) +Fastest is encode: @jridgewell/sourcemap-codec +``` + +# License + +MIT diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs new file mode 100644 index 00000000..3dff3721 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs @@ -0,0 +1,164 @@ +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; +function decode(mappings) { + const state = new Int32Array(5); + const decoded = []; + let index = 0; + do { + const semi = indexOf(mappings, index); + const line = []; + let sorted = true; + let lastCol = 0; + state[0] = 0; + for (let i = index; i < semi; i++) { + let seg; + i = decodeInteger(mappings, i, state, 0); // genColumn + const col = state[0]; + if (col < lastCol) + sorted = false; + lastCol = col; + if (hasMoreVlq(mappings, i, semi)) { + i = decodeInteger(mappings, i, state, 1); // sourcesIndex + i = decodeInteger(mappings, i, state, 2); // sourceLine + i = decodeInteger(mappings, i, state, 3); // sourceColumn + if (hasMoreVlq(mappings, i, semi)) { + i = decodeInteger(mappings, i, state, 4); // namesIndex + seg = [col, state[1], state[2], state[3], state[4]]; + } + else { + seg = [col, state[1], state[2], state[3]]; + } + } + else { + seg = [col]; + } + line.push(seg); + } + if (!sorted) + sort(line); + decoded.push(line); + index = semi + 1; + } while (index <= mappings.length); + return decoded; +} +function indexOf(mappings, index) { + const idx = mappings.indexOf(';', index); + return idx === -1 ? mappings.length : idx; +} +function decodeInteger(mappings, pos, state, j) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = mappings.charCodeAt(pos++); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -0x80000000 | -value; + } + state[j] += value; + return pos; +} +function hasMoreVlq(mappings, i, length) { + if (i >= length) + return false; + return mappings.charCodeAt(i) !== comma; +} +function sort(line) { + line.sort(sortComparator); +} +function sortComparator(a, b) { + return a[0] - b[0]; +} +function encode(decoded) { + const state = new Int32Array(5); + const bufLength = 1024 * 16; + const subLength = bufLength - 36; + const buf = new Uint8Array(bufLength); + const sub = buf.subarray(0, subLength); + let pos = 0; + let out = ''; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) { + if (pos === bufLength) { + out += td.decode(buf); + pos = 0; + } + buf[pos++] = semicolon; + } + if (line.length === 0) + continue; + state[0] = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + // We can push up to 5 ints, each int can take at most 7 chars, and we + // may push a comma. + if (pos > subLength) { + out += td.decode(sub); + buf.copyWithin(0, subLength, pos); + pos -= subLength; + } + if (j > 0) + buf[pos++] = comma; + pos = encodeInteger(buf, pos, state, segment, 0); // genColumn + if (segment.length === 1) + continue; + pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex + pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine + pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn + if (segment.length === 4) + continue; + pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex + } + } + return out + td.decode(buf.subarray(0, pos)); +} +function encodeInteger(buf, pos, state, segment, j) { + const next = segment[j]; + let num = next - state[j]; + state[j] = next; + num = num < 0 ? (-num << 1) | 1 : num << 1; + do { + let clamped = num & 0b011111; + num >>>= 5; + if (num > 0) + clamped |= 0b100000; + buf[pos++] = intToChar[clamped]; + } while (num > 0); + return pos; +} + +export { decode, encode }; +//# sourceMappingURL=sourcemap-codec.mjs.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map new file mode 100644 index 00000000..236fd120 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.mjs","sources":["../src/sourcemap-codec.ts"],"sourcesContent":["export type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nconst comma = ','.charCodeAt(0);\nconst semicolon = ';'.charCodeAt(0);\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array) {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport function decode(mappings: string): SourceMapMappings {\n const state: [number, number, number, number, number] = new Int32Array(5) as any;\n const decoded: SourceMapMappings = [];\n\n let index = 0;\n do {\n const semi = indexOf(mappings, index);\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n state[0] = 0;\n\n for (let i = index; i < semi; i++) {\n let seg: SourceMapSegment;\n\n i = decodeInteger(mappings, i, state, 0); // genColumn\n const col = state[0];\n if (col < lastCol) sorted = false;\n lastCol = col;\n\n if (hasMoreVlq(mappings, i, semi)) {\n i = decodeInteger(mappings, i, state, 1); // sourcesIndex\n i = decodeInteger(mappings, i, state, 2); // sourceLine\n i = decodeInteger(mappings, i, state, 3); // sourceColumn\n\n if (hasMoreVlq(mappings, i, semi)) {\n i = decodeInteger(mappings, i, state, 4); // namesIndex\n seg = [col, state[1], state[2], state[3], state[4]];\n } else {\n seg = [col, state[1], state[2], state[3]];\n }\n } else {\n seg = [col];\n }\n\n line.push(seg);\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n index = semi + 1;\n } while (index <= mappings.length);\n\n return decoded;\n}\n\nfunction indexOf(mappings: string, index: number): number {\n const idx = mappings.indexOf(';', index);\n return idx === -1 ? mappings.length : idx;\n}\n\nfunction decodeInteger(mappings: string, pos: number, state: SourceMapSegment, j: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = mappings.charCodeAt(pos++);\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n state[j] += value;\n return pos;\n}\n\nfunction hasMoreVlq(mappings: string, i: number, length: number): boolean {\n if (i >= length) return false;\n return mappings.charCodeAt(i) !== comma;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const state: [number, number, number, number, number] = new Int32Array(5) as any;\n const bufLength = 1024 * 16;\n const subLength = bufLength - 36;\n const buf = new Uint8Array(bufLength);\n const sub = buf.subarray(0, subLength);\n let pos = 0;\n let out = '';\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) {\n if (pos === bufLength) {\n out += td.decode(buf);\n pos = 0;\n }\n buf[pos++] = semicolon;\n }\n if (line.length === 0) continue;\n\n state[0] = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n // We can push up to 5 ints, each int can take at most 7 chars, and we\n // may push a comma.\n if (pos > subLength) {\n out += td.decode(sub);\n buf.copyWithin(0, subLength, pos);\n pos -= subLength;\n }\n if (j > 0) buf[pos++] = comma;\n\n pos = encodeInteger(buf, pos, state, segment, 0); // genColumn\n\n if (segment.length === 1) continue;\n pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex\n pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine\n pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn\n\n if (segment.length === 4) continue;\n pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex\n }\n }\n\n return out + td.decode(buf.subarray(0, pos));\n}\n\nfunction encodeInteger(\n buf: Uint8Array,\n pos: number,\n state: SourceMapSegment,\n segment: SourceMapSegment,\n j: number,\n): number {\n const next = segment[j];\n let num = next - state[j];\n state[j] = next;\n\n num = num < 0 ? (-num << 1) | 1 : num << 1;\n do {\n let clamped = num & 0b011111;\n num >>>= 5;\n if (num > 0) clamped |= 0b100000;\n buf[pos++] = intToChar[clamped];\n } while (num > 0);\n\n return pos;\n}\n"],"names":[],"mapp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,MAAM,KAAK,CAAC;gBAAE,SAAS;YACnC,GAAG,GAAG,aAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;SAClD;KACF;IAED,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,aAAa,CACpB,GAAe,EACf,GAAW,EACX,KAAuB,EACvB,OAAyB,EACzB,CAAS;IAET,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAEhB,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAC3C,GAAG;QACD,IAAI,OAAO,GAAG,GAAG,GAAG,QAAQ,CAAC;QAC7B,GAAG,MAAM,CAAC,CAAC;QACX,IAAI,GAAG,GAAG,CAAC;YAAE,OAAO,IAAI,QAAQ,CAAC;QACjC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;KACjC,QAAQ,GAAG,GAAG,CAAC,EAAE;IAElB,OAAO,GAAG,CAAC;AACb;;;;"} \ No newline at end of file diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js new file mode 100644 index 00000000..bec92a9c --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js @@ -0,0 +1,175 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {})); +})(this, (function (exports) { 'use strict'; + + const comma = ','.charCodeAt(0); + const semicolon = ';'.charCodeAt(0); + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + const intToChar = new Uint8Array(64); // 64 possible chars. + const charToInt = new Uint8Array(128); // z is 122 in ASCII + for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; + } + // Provide a fallback for older environments. + const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; + function decode(mappings) { + const state = new Int32Array(5); + const decoded = []; + let index = 0; + do { + const semi = indexOf(mappings, index); + const line = []; + let sorted = true; + let lastCol = 0; + state[0] = 0; + for (let i = index; i < semi; i++) { + let seg; + i = decodeInteger(mappings, i, state, 0); // genColumn + const col = state[0]; + if (col < lastCol) + sorted = false; + lastCol = col; + if (hasMoreVlq(mappings, i, semi)) { + i = decodeInteger(mappings, i, state, 1); // sourcesIndex + i = decodeInteger(mappings, i, state, 2); // sourceLine + i = decodeInteger(mappings, i, state, 3); // sourceColumn + if (hasMoreVlq(mappings, i, semi)) { + i = decodeInteger(mappings, i, state, 4); // namesIndex + seg = [col, state[1], state[2], state[3], state[4]]; + } + else { + seg = [col, state[1], state[2], state[3]]; + } + } + else { + seg = [col]; + } + line.push(seg); + } + if (!sorted) + sort(line); + decoded.push(line); + index = semi + 1; + } while (index <= mappings.length); + return decoded; + } + function indexOf(mappings, index) { + const idx = mappings.indexOf(';', index); + return idx === -1 ? mappings.length : idx; + } + function decodeInteger(mappings, pos, state, j) { + let value = 0; + let shift = 0; + let integer = 0; + do { + const c = mappings.charCodeAt(pos++); + integer = charToInt[c]; + value |= (integer & 31) << shift; + shift += 5; + } while (integer & 32); + const shouldNegate = value & 1; + value >>>= 1; + if (shouldNegate) { + value = -0x80000000 | -value; + } + state[j] += value; + return pos; + } + function hasMoreVlq(mappings, i, length) { + if (i >= length) + return false; + return mappings.charCodeAt(i) !== comma; + } + function sort(line) { + line.sort(sortComparator); + } + function sortComparator(a, b) { + return a[0] - b[0]; + } + function encode(decoded) { + const state = new Int32Array(5); + const bufLength = 1024 * 16; + const subLength = bufLength - 36; + const buf = new Uint8Array(bufLength); + const sub = buf.subarray(0, subLength); + let pos = 0; + let out = ''; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) { + if (pos === bufLength) { + out += td.decode(buf); + pos = 0; + } + buf[pos++] = semicolon; + } + if (line.length === 0) + continue; + state[0] = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + // We can push up to 5 ints, each int can take at most 7 chars, and we + // may push a comma. + if (pos > subLength) { + out += td.decode(sub); + buf.copyWithin(0, subLength, pos); + pos -= subLength; + } + if (j > 0) + buf[pos++] = comma; + pos = encodeInteger(buf, pos, state, segment, 0); // genColumn + if (segment.length === 1) + continue; + pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex + pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine + pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn + if (segment.length === 4) + continue; + pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex + } + } + return out + td.decode(buf.subarray(0, pos)); + } + function encodeInteger(buf, pos, state, segment, j) { + const next = segment[j]; + let num = next - state[j]; + state[j] = next; + num = num < 0 ? (-num << 1) | 1 : num << 1; + do { + let clamped = num & 0b011111; + num >>>= 5; + if (num > 0) + clamped |= 0b100000; + buf[pos++] = intToChar[clamped]; + } while (num > 0); + return pos; + } + + exports.decode = decode; + exports.encode = encode; + + Object.defineProperty(exports, '__esModule', { value: true }); + +})); +//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map new file mode 100644 index 00000000..b6b2003c --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sourcemap-codec.umd.js","sources":["../src/sourcemap-codec.ts"],"sourcesContent":["export type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nconst comma = ','.charCodeAt(0);\nconst semicolon = ';'.charCodeAt(0);\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array) {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport function decode(mappings: string): SourceMapMappings {\n const state: [number, number, number, number, number] = new Int32Array(5) as any;\n const decoded: SourceMapMappings = [];\n\n let index = 0;\n do {\n const semi = indexOf(mappings, index);\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n state[0] = 0;\n\n for (let i = index; i < semi; i++) {\n let seg: SourceMapSegment;\n\n i = decodeInteger(mappings, i, state, 0); // genColumn\n const col = state[0];\n if (col < lastCol) sorted = false;\n lastCol = col;\n\n if (hasMoreVlq(mappings, i, semi)) {\n i = decodeInteger(mappings, i, state, 1); // sourcesIndex\n i = decodeInteger(mappings, i, state, 2); // sourceLine\n i = decodeInteger(mappings, i, state, 3); // sourceColumn\n\n if (hasMoreVlq(mappings, i, semi)) {\n i = decodeInteger(mappings, i, state, 4); // namesIndex\n seg = [col, state[1], state[2], state[3], state[4]];\n } else {\n seg = [col, state[1], state[2], state[3]];\n }\n } else {\n seg = [col];\n }\n\n line.push(seg);\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n index = semi + 1;\n } while (index <= mappings.length);\n\n return decoded;\n}\n\nfunction indexOf(mappings: string, index: number): number {\n const idx = mappings.indexOf(';', index);\n return idx === -1 ? mappings.length : idx;\n}\n\nfunction decodeInteger(mappings: string, pos: number, state: SourceMapSegment, j: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = mappings.charCodeAt(pos++);\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n state[j] += value;\n return pos;\n}\n\nfunction hasMoreVlq(mappings: string, i: number, length: number): boolean {\n if (i >= length) return false;\n return mappings.charCodeAt(i) !== comma;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly): string;\nexport function encode(decoded: Readonly): string {\n const state: [number, number, number, number, number] = new Int32Array(5) as any;\n const bufLength = 1024 * 16;\n const subLength = bufLength - 36;\n const buf = new Uint8Array(bufLength);\n const sub = buf.subarray(0, subLength);\n let pos = 0;\n let out = '';\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) {\n if (pos === bufLength) {\n out += td.decode(buf);\n pos = 0;\n }\n buf[pos++] = semicolon;\n }\n if (line.length === 0) continue;\n\n state[0] = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n // We can push up to 5 ints, each int can take at most 7 chars, and we\n // may push a comma.\n if (pos > subLength) {\n out += td.decode(sub);\n buf.copyWithin(0, subLength, pos);\n pos -= subLength;\n }\n if (j > 0) buf[pos++] = comma;\n\n pos = encodeInteger(buf, pos, state, segment, 0); // genColumn\n\n if (segment.length === 1) continue;\n pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex\n pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine\n pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn\n\n if (segment.length === 4) continue;\n pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex\n }\n }\n\n return out + td.decode(buf.subarray(0, pos));\n}\n\nfunction encodeInteger(\n buf: Uint8Array,\n pos: number,\n state: SourceMapSegment,\n segment: SourceMapSegment,\n j: number,\n): number {\n const next = segment[j];\n let num = next - state[j];\n state[j] = next;\n\n num = num < 0 ? (-num << 1) | 1 : num << 1;\n do {\n let clamped = num & 0b011111;\n num >>>= 5;\n if (num > 0) clamped |= 0b100000;\n buf[pos++] = intToChar[clamped];\n } while (num > 0);\n\n return pos;\n}\n"],"names":[],"mappings":";;;;;;IAOA,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,kEAAkE,CAAC;IACjF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAEtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,CAAC,GAAG,KAAK,CAAC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ACxB,IAAI,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;QAEhB,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;QAC3C,GAAG;YACD,IAAI,OAAO,GAAG,GAAG,GAAG,QAAQ,CAAC;YAC7B,GAAG,MAAM,CAAC,CAAC;YACX,IAAI,GAAG,GAAG,CAAC;gBAAE,OAAO,IAAI,QAAQ,CAAC;YACjC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;SACjC,QAAQ,GAAG,GAAG,CAAC,EAAE;QAElB,OAAO,GAAG,CAAC;IACb;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts similarity index 82% rename from node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts rename to node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts index 6ac3c1d5..410d3202 100644 --- a/node_modules/sourcemap-codec/dist/types/sourcemap-codec.d.ts +++ b/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts @@ -3,3 +3,4 @@ export declare type SourceMapLine = SourceMapSegment[]; export declare type SourceMapMappings = SourceMapLine[]; export declare function decode(mappings: string): SourceMapMappings; export declare function encode(decoded: SourceMapMappings): string; +export declare function encode(decoded: Readonly): string; diff --git a/node_modules/@jridgewell/sourcemap-codec/package.json b/node_modules/@jridgewell/sourcemap-codec/package.json new file mode 100644 index 00000000..578448f1 --- /dev/null +++ b/node_modules/@jridgewell/sourcemap-codec/package.json @@ -0,0 +1,74 @@ +{ + "name": "@jridgewell/sourcemap-codec", + "version": "1.4.15", + "description": "Encode/decode sourcemap mappings", + "keywords": [ + "sourcemap", + "vlq" + ], + "main": "dist/sourcemap-codec.umd.js", + "module": "dist/sourcemap-codec.mjs", + "types": "dist/types/sourcemap-codec.d.ts", + "files": [ + "dist" + ], + "exports": { + ".": [ + { + "types": "./dist/types/sourcemap-codec.d.ts", + "browser": "./dist/sourcemap-codec.umd.js", + "require": "./dist/sourcemap-codec.umd.js", + "import": "./dist/sourcemap-codec.mjs" + }, + "./dist/sourcemap-codec.umd.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "benchmark": "run-s build:rollup benchmark:*", + "benchmark:install": "cd benchmark && npm install", + "benchmark:only": "node --expose-gc benchmark/index.js", + "build": "run-s -n build:*", + "build:rollup": "rollup -c rollup.config.js", + "build:ts": "tsc --project tsconfig.build.json", + "lint": "run-s -n lint:*", + "lint:prettier": "npm run test:lint:prettier -- --write", + "lint:ts": "npm run test:lint:ts -- --fix", + "prebuild": "rm -rf dist", + "prepublishOnly": "npm run preversion", + "preversion": "run-s test build", + "pretest": "run-s build:rollup", + "test": "run-s -n test:lint test:only", + "test:debug": "mocha --inspect-brk", + "test:lint": "run-s -n test:lint:*", + "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'", + "test:lint:ts": "eslint '{src,test}/**/*.ts'", + "test:only": "mocha", + "test:coverage": "c8 mocha", + "test:watch": "mocha --watch" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jridgewell/sourcemap-codec.git" + }, + "author": "Rich Harris", + "license": "MIT", + "devDependencies": { + "@rollup/plugin-typescript": "8.3.0", + "@types/node": "17.0.15", + "@typescript-eslint/eslint-plugin": "5.10.0", + "@typescript-eslint/parser": "5.10.0", + "benchmark": "2.1.4", + "c8": "7.11.2", + "eslint": "8.7.0", + "eslint-config-prettier": "8.3.0", + "mocha": "9.2.0", + "npm-run-all": "4.1.5", + "prettier": "2.5.1", + "rollup": "2.64.0", + "source-map": "0.6.1", + "source-map-js": "1.0.2", + "sourcemap-codec": "1.4.8", + "typescript": "4.5.4" + } +} diff --git a/node_modules/@rollup/rollup-win32-x64-msvc/package.json b/node_modules/@rollup/rollup-win32-x64-msvc/package.json index ce1b92bf..8fad049e 100644 --- a/node_modules/@rollup/rollup-win32-x64-msvc/package.json +++ b/node_modules/@rollup/rollup-win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@rollup/rollup-win32-x64-msvc", - "version": "4.9.1", + "version": "4.9.5", "os": [ "win32" ], diff --git a/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node b/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node index 56530578..8aacf186 100644 Binary files a/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node and b/node_modules/@rollup/rollup-win32-x64-msvc/rollup.win32-x64-msvc.node differ diff --git a/node_modules/@types/estree/LICENSE b/node_modules/@types/estree/LICENSE new file mode 100644 index 00000000..9e841e7a --- /dev/null +++ b/node_modules/@types/estree/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/node_modules/@types/estree/README.md b/node_modules/@types/estree/README.md new file mode 100644 index 00000000..c9bc4d5f --- /dev/null +++ b/node_modules/@types/estree/README.md @@ -0,0 +1,15 @@ +# Installation +> `npm install --save @types/estree` + +# Summary +This package contains type definitions for estree (https://github.com/estree/estree). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree. + +### Additional Details + * Last updated: Mon, 06 Nov 2023 22:41:05 GMT + * Dependencies: none + +# Credits +These definitions were written by [RReverser](https://github.com/RReverser). diff --git a/node_modules/@types/estree/flow.d.ts b/node_modules/@types/estree/flow.d.ts new file mode 100644 index 00000000..9d001a92 --- /dev/null +++ b/node_modules/@types/estree/flow.d.ts @@ -0,0 +1,167 @@ +declare namespace ESTree { + interface FlowTypeAnnotation extends Node {} + + interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {} + + interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {} + + interface FlowDeclaration extends Declaration {} + + interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface ArrayTypeAnnotation extends FlowTypeAnnotation { + elementType: FlowTypeAnnotation; + } + + interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} + + interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface ClassImplements extends Node { + id: Identifier; + typeParameters?: TypeParameterInstantiation | null; + } + + interface ClassProperty { + key: Expression; + value?: Expression | null; + typeAnnotation?: TypeAnnotation | null; + computed: boolean; + static: boolean; + } + + interface DeclareClass extends FlowDeclaration { + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + body: ObjectTypeAnnotation; + extends: InterfaceExtends[]; + } + + interface DeclareFunction extends FlowDeclaration { + id: Identifier; + } + + interface DeclareModule extends FlowDeclaration { + id: Literal | Identifier; + body: BlockStatement; + } + + interface DeclareVariable extends FlowDeclaration { + id: Identifier; + } + + interface FunctionTypeAnnotation extends FlowTypeAnnotation { + params: FunctionTypeParam[]; + returnType: FlowTypeAnnotation; + rest?: FunctionTypeParam | null; + typeParameters?: TypeParameterDeclaration | null; + } + + interface FunctionTypeParam { + name: Identifier; + typeAnnotation: FlowTypeAnnotation; + optional: boolean; + } + + interface GenericTypeAnnotation extends FlowTypeAnnotation { + id: Identifier | QualifiedTypeIdentifier; + typeParameters?: TypeParameterInstantiation | null; + } + + interface InterfaceExtends extends Node { + id: Identifier | QualifiedTypeIdentifier; + typeParameters?: TypeParameterInstantiation | null; + } + + interface InterfaceDeclaration extends FlowDeclaration { + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + extends: InterfaceExtends[]; + body: ObjectTypeAnnotation; + } + + interface IntersectionTypeAnnotation extends FlowTypeAnnotation { + types: FlowTypeAnnotation[]; + } + + interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface NullableTypeAnnotation extends FlowTypeAnnotation { + typeAnnotation: TypeAnnotation; + } + + interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} + + interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {} + + interface StringTypeAnnotation extends FlowBaseTypeAnnotation {} + + interface TupleTypeAnnotation extends FlowTypeAnnotation { + types: FlowTypeAnnotation[]; + } + + interface TypeofTypeAnnotation extends FlowTypeAnnotation { + argument: FlowTypeAnnotation; + } + + interface TypeAlias extends FlowDeclaration { + id: Identifier; + typeParameters?: TypeParameterDeclaration | null; + right: FlowTypeAnnotation; + } + + interface TypeAnnotation extends Node { + typeAnnotation: FlowTypeAnnotation; + } + + interface TypeCastExpression extends Expression { + expression: Expression; + typeAnnotation: TypeAnnotation; + } + + interface TypeParameterDeclaration extends Node { + params: Identifier[]; + } + + interface TypeParameterInstantiation extends Node { + params: FlowTypeAnnotation[]; + } + + interface ObjectTypeAnnotation extends FlowTypeAnnotation { + properties: ObjectTypeProperty[]; + indexers: ObjectTypeIndexer[]; + callProperties: ObjectTypeCallProperty[]; + } + + interface ObjectTypeCallProperty extends Node { + value: FunctionTypeAnnotation; + static: boolean; + } + + interface ObjectTypeIndexer extends Node { + id: Identifier; + key: FlowTypeAnnotation; + value: FlowTypeAnnotation; + static: boolean; + } + + interface ObjectTypeProperty extends Node { + key: Expression; + value: FlowTypeAnnotation; + optional: boolean; + static: boolean; + } + + interface QualifiedTypeIdentifier extends Node { + qualification: Identifier | QualifiedTypeIdentifier; + id: Identifier; + } + + interface UnionTypeAnnotation extends FlowTypeAnnotation { + types: FlowTypeAnnotation[]; + } + + interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {} +} diff --git a/node_modules/@types/estree/index.d.ts b/node_modules/@types/estree/index.d.ts new file mode 100644 index 00000000..e933e20e --- /dev/null +++ b/node_modules/@types/estree/index.d.ts @@ -0,0 +1,683 @@ +// This definition file follows a somewhat unusual format. ESTree allows +// runtime type checks based on the `type` parameter. In order to explain this +// to typescript we want to use discriminated union types: +// https://github.com/Microsoft/TypeScript/pull/9163 +// +// For ESTree this is a bit tricky because the high level interfaces like +// Node or Function are pulling double duty. We want to pass common fields down +// to the interfaces that extend them (like Identifier or +// ArrowFunctionExpression), but you can't extend a type union or enforce +// common fields on them. So we've split the high level interfaces into two +// types, a base type which passes down inherited fields, and a type union of +// all types which extend the base type. Only the type union is exported, and +// the union is how other types refer to the collection of inheriting types. +// +// This makes the definitions file here somewhat more difficult to maintain, +// but it has the notable advantage of making ESTree much easier to use as +// an end user. + +export interface BaseNodeWithoutComments { + // Every leaf interface that extends BaseNode must specify a type property. + // The type property should be a string literal. For example, Identifier + // has: `type: "Identifier"` + type: string; + loc?: SourceLocation | null | undefined; + range?: [number, number] | undefined; +} + +export interface BaseNode extends BaseNodeWithoutComments { + leadingComments?: Comment[] | undefined; + trailingComments?: Comment[] | undefined; +} + +export interface NodeMap { + AssignmentProperty: AssignmentProperty; + CatchClause: CatchClause; + Class: Class; + ClassBody: ClassBody; + Expression: Expression; + Function: Function; + Identifier: Identifier; + Literal: Literal; + MethodDefinition: MethodDefinition; + ModuleDeclaration: ModuleDeclaration; + ModuleSpecifier: ModuleSpecifier; + Pattern: Pattern; + PrivateIdentifier: PrivateIdentifier; + Program: Program; + Property: Property; + PropertyDefinition: PropertyDefinition; + SpreadElement: SpreadElement; + Statement: Statement; + Super: Super; + SwitchCase: SwitchCase; + TemplateElement: TemplateElement; + VariableDeclarator: VariableDeclarator; +} + +export type Node = NodeMap[keyof NodeMap]; + +export interface Comment extends BaseNodeWithoutComments { + type: "Line" | "Block"; + value: string; +} + +export interface SourceLocation { + source?: string | null | undefined; + start: Position; + end: Position; +} + +export interface Position { + /** >= 1 */ + line: number; + /** >= 0 */ + column: number; +} + +export interface Program extends BaseNode { + type: "Program"; + sourceType: "script" | "module"; + body: Array; + comments?: Comment[] | undefined; +} + +export interface Directive extends BaseNode { + type: "ExpressionStatement"; + expression: Literal; + directive: string; +} + +export interface BaseFunction extends BaseNode { + params: Pattern[]; + generator?: boolean | undefined; + async?: boolean | undefined; + // The body is either BlockStatement or Expression because arrow functions + // can have a body that's either. FunctionDeclarations and + // FunctionExpressions have only BlockStatement bodies. + body: BlockStatement | Expression; +} + +export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression; + +export type Statement = + | ExpressionStatement + | BlockStatement + | StaticBlock + | EmptyStatement + | DebuggerStatement + | WithStatement + | ReturnStatement + | LabeledStatement + | BreakStatement + | ContinueStatement + | IfStatement + | SwitchStatement + | ThrowStatement + | TryStatement + | WhileStatement + | DoWhileStatement + | ForStatement + | ForInStatement + | ForOfStatement + | Declaration; + +export interface BaseStatement extends BaseNode {} + +export interface EmptyStatement extends BaseStatement { + type: "EmptyStatement"; +} + +export interface BlockStatement extends BaseStatement { + type: "BlockStatement"; + body: Statement[]; + innerComments?: Comment[] | undefined; +} + +export interface StaticBlock extends Omit { + type: "StaticBlock"; +} + +export interface ExpressionStatement extends BaseStatement { + type: "ExpressionStatement"; + expression: Expression; +} + +export interface IfStatement extends BaseStatement { + type: "IfStatement"; + test: Expression; + consequent: Statement; + alternate?: Statement | null | undefined; +} + +export interface LabeledStatement extends BaseStatement { + type: "LabeledStatement"; + label: Identifier; + body: Statement; +} + +export interface BreakStatement extends BaseStatement { + type: "BreakStatement"; + label?: Identifier | null | undefined; +} + +export interface ContinueStatement extends BaseStatement { + type: "ContinueStatement"; + label?: Identifier | null | undefined; +} + +export interface WithStatement extends BaseStatement { + type: "WithStatement"; + object: Expression; + body: Statement; +} + +export interface SwitchStatement extends BaseStatement { + type: "SwitchStatement"; + discriminant: Expression; + cases: SwitchCase[]; +} + +export interface ReturnStatement extends BaseStatement { + type: "ReturnStatement"; + argument?: Expression | null | undefined; +} + +export interface ThrowStatement extends BaseStatement { + type: "ThrowStatement"; + argument: Expression; +} + +export interface TryStatement extends BaseStatement { + type: "TryStatement"; + block: BlockStatement; + handler?: CatchClause | null | undefined; + finalizer?: BlockStatement | null | undefined; +} + +export interface WhileStatement extends BaseStatement { + type: "WhileStatement"; + test: Expression; + body: Statement; +} + +export interface DoWhileStatement extends BaseStatement { + type: "DoWhileStatement"; + body: Statement; + test: Expression; +} + +export interface ForStatement extends BaseStatement { + type: "ForStatement"; + init?: VariableDeclaration | Expression | null | undefined; + test?: Expression | null | undefined; + update?: Expression | null | undefined; + body: Statement; +} + +export interface BaseForXStatement extends BaseStatement { + left: VariableDeclaration | Pattern; + right: Expression; + body: Statement; +} + +export interface ForInStatement extends BaseForXStatement { + type: "ForInStatement"; +} + +export interface DebuggerStatement extends BaseStatement { + type: "DebuggerStatement"; +} + +export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration; + +export interface BaseDeclaration extends BaseStatement {} + +export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration { + type: "FunctionDeclaration"; + /** It is null when a function declaration is a part of the `export default function` statement */ + id: Identifier | null; + body: BlockStatement; +} + +export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration { + id: Identifier; +} + +export interface VariableDeclaration extends BaseDeclaration { + type: "VariableDeclaration"; + declarations: VariableDeclarator[]; + kind: "var" | "let" | "const"; +} + +export interface VariableDeclarator extends BaseNode { + type: "VariableDeclarator"; + id: Pattern; + init?: Expression | null | undefined; +} + +export interface ExpressionMap { + ArrayExpression: ArrayExpression; + ArrowFunctionExpression: ArrowFunctionExpression; + AssignmentExpression: AssignmentExpression; + AwaitExpression: AwaitExpression; + BinaryExpression: BinaryExpression; + CallExpression: CallExpression; + ChainExpression: ChainExpression; + ClassExpression: ClassExpression; + ConditionalExpression: ConditionalExpression; + FunctionExpression: FunctionExpression; + Identifier: Identifier; + ImportExpression: ImportExpression; + Literal: Literal; + LogicalExpression: LogicalExpression; + MemberExpression: MemberExpression; + MetaProperty: MetaProperty; + NewExpression: NewExpression; + ObjectExpression: ObjectExpression; + SequenceExpression: SequenceExpression; + TaggedTemplateExpression: TaggedTemplateExpression; + TemplateLiteral: TemplateLiteral; + ThisExpression: ThisExpression; + UnaryExpression: UnaryExpression; + UpdateExpression: UpdateExpression; + YieldExpression: YieldExpression; +} + +export type Expression = ExpressionMap[keyof ExpressionMap]; + +export interface BaseExpression extends BaseNode {} + +export type ChainElement = SimpleCallExpression | MemberExpression; + +export interface ChainExpression extends BaseExpression { + type: "ChainExpression"; + expression: ChainElement; +} + +export interface ThisExpression extends BaseExpression { + type: "ThisExpression"; +} + +export interface ArrayExpression extends BaseExpression { + type: "ArrayExpression"; + elements: Array; +} + +export interface ObjectExpression extends BaseExpression { + type: "ObjectExpression"; + properties: Array; +} + +export interface PrivateIdentifier extends BaseNode { + type: "PrivateIdentifier"; + name: string; +} + +export interface Property extends BaseNode { + type: "Property"; + key: Expression | PrivateIdentifier; + value: Expression | Pattern; // Could be an AssignmentProperty + kind: "init" | "get" | "set"; + method: boolean; + shorthand: boolean; + computed: boolean; +} + +export interface PropertyDefinition extends BaseNode { + type: "PropertyDefinition"; + key: Expression | PrivateIdentifier; + value?: Expression | null | undefined; + computed: boolean; + static: boolean; +} + +export interface FunctionExpression extends BaseFunction, BaseExpression { + id?: Identifier | null | undefined; + type: "FunctionExpression"; + body: BlockStatement; +} + +export interface SequenceExpression extends BaseExpression { + type: "SequenceExpression"; + expressions: Expression[]; +} + +export interface UnaryExpression extends BaseExpression { + type: "UnaryExpression"; + operator: UnaryOperator; + prefix: true; + argument: Expression; +} + +export interface BinaryExpression extends BaseExpression { + type: "BinaryExpression"; + operator: BinaryOperator; + left: Expression; + right: Expression; +} + +export interface AssignmentExpression extends BaseExpression { + type: "AssignmentExpression"; + operator: AssignmentOperator; + left: Pattern | MemberExpression; + right: Expression; +} + +export interface UpdateExpression extends BaseExpression { + type: "UpdateExpression"; + operator: UpdateOperator; + argument: Expression; + prefix: boolean; +} + +export interface LogicalExpression extends BaseExpression { + type: "LogicalExpression"; + operator: LogicalOperator; + left: Expression; + right: Expression; +} + +export interface ConditionalExpression extends BaseExpression { + type: "ConditionalExpression"; + test: Expression; + alternate: Expression; + consequent: Expression; +} + +export interface BaseCallExpression extends BaseExpression { + callee: Expression | Super; + arguments: Array; +} +export type CallExpression = SimpleCallExpression | NewExpression; + +export interface SimpleCallExpression extends BaseCallExpression { + type: "CallExpression"; + optional: boolean; +} + +export interface NewExpression extends BaseCallExpression { + type: "NewExpression"; +} + +export interface MemberExpression extends BaseExpression, BasePattern { + type: "MemberExpression"; + object: Expression | Super; + property: Expression | PrivateIdentifier; + computed: boolean; + optional: boolean; +} + +export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression; + +export interface BasePattern extends BaseNode {} + +export interface SwitchCase extends BaseNode { + type: "SwitchCase"; + test?: Expression | null | undefined; + consequent: Statement[]; +} + +export interface CatchClause extends BaseNode { + type: "CatchClause"; + param: Pattern | null; + body: BlockStatement; +} + +export interface Identifier extends BaseNode, BaseExpression, BasePattern { + type: "Identifier"; + name: string; +} + +export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral; + +export interface SimpleLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value: string | boolean | number | null; + raw?: string | undefined; +} + +export interface RegExpLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value?: RegExp | null | undefined; + regex: { + pattern: string; + flags: string; + }; + raw?: string | undefined; +} + +export interface BigIntLiteral extends BaseNode, BaseExpression { + type: "Literal"; + value?: bigint | null | undefined; + bigint: string; + raw?: string | undefined; +} + +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; + +export type BinaryOperator = + | "==" + | "!=" + | "===" + | "!==" + | "<" + | "<=" + | ">" + | ">=" + | "<<" + | ">>" + | ">>>" + | "+" + | "-" + | "*" + | "/" + | "%" + | "**" + | "|" + | "^" + | "&" + | "in" + | "instanceof"; + +export type LogicalOperator = "||" | "&&" | "??"; + +export type AssignmentOperator = + | "=" + | "+=" + | "-=" + | "*=" + | "/=" + | "%=" + | "**=" + | "<<=" + | ">>=" + | ">>>=" + | "|=" + | "^=" + | "&=" + | "||=" + | "&&=" + | "??="; + +export type UpdateOperator = "++" | "--"; + +export interface ForOfStatement extends BaseForXStatement { + type: "ForOfStatement"; + await: boolean; +} + +export interface Super extends BaseNode { + type: "Super"; +} + +export interface SpreadElement extends BaseNode { + type: "SpreadElement"; + argument: Expression; +} + +export interface ArrowFunctionExpression extends BaseExpression, BaseFunction { + type: "ArrowFunctionExpression"; + expression: boolean; + body: BlockStatement | Expression; +} + +export interface YieldExpression extends BaseExpression { + type: "YieldExpression"; + argument?: Expression | null | undefined; + delegate: boolean; +} + +export interface TemplateLiteral extends BaseExpression { + type: "TemplateLiteral"; + quasis: TemplateElement[]; + expressions: Expression[]; +} + +export interface TaggedTemplateExpression extends BaseExpression { + type: "TaggedTemplateExpression"; + tag: Expression; + quasi: TemplateLiteral; +} + +export interface TemplateElement extends BaseNode { + type: "TemplateElement"; + tail: boolean; + value: { + /** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */ + cooked?: string | null | undefined; + raw: string; + }; +} + +export interface AssignmentProperty extends Property { + value: Pattern; + kind: "init"; + method: boolean; // false +} + +export interface ObjectPattern extends BasePattern { + type: "ObjectPattern"; + properties: Array; +} + +export interface ArrayPattern extends BasePattern { + type: "ArrayPattern"; + elements: Array; +} + +export interface RestElement extends BasePattern { + type: "RestElement"; + argument: Pattern; +} + +export interface AssignmentPattern extends BasePattern { + type: "AssignmentPattern"; + left: Pattern; + right: Expression; +} + +export type Class = ClassDeclaration | ClassExpression; +export interface BaseClass extends BaseNode { + superClass?: Expression | null | undefined; + body: ClassBody; +} + +export interface ClassBody extends BaseNode { + type: "ClassBody"; + body: Array; +} + +export interface MethodDefinition extends BaseNode { + type: "MethodDefinition"; + key: Expression | PrivateIdentifier; + value: FunctionExpression; + kind: "constructor" | "method" | "get" | "set"; + computed: boolean; + static: boolean; +} + +export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration { + type: "ClassDeclaration"; + /** It is null when a class declaration is a part of the `export default class` statement */ + id: Identifier | null; +} + +export interface ClassDeclaration extends MaybeNamedClassDeclaration { + id: Identifier; +} + +export interface ClassExpression extends BaseClass, BaseExpression { + type: "ClassExpression"; + id?: Identifier | null | undefined; +} + +export interface MetaProperty extends BaseExpression { + type: "MetaProperty"; + meta: Identifier; + property: Identifier; +} + +export type ModuleDeclaration = + | ImportDeclaration + | ExportNamedDeclaration + | ExportDefaultDeclaration + | ExportAllDeclaration; +export interface BaseModuleDeclaration extends BaseNode {} + +export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier; +export interface BaseModuleSpecifier extends BaseNode { + local: Identifier; +} + +export interface ImportDeclaration extends BaseModuleDeclaration { + type: "ImportDeclaration"; + specifiers: Array; + source: Literal; +} + +export interface ImportSpecifier extends BaseModuleSpecifier { + type: "ImportSpecifier"; + imported: Identifier; +} + +export interface ImportExpression extends BaseExpression { + type: "ImportExpression"; + source: Expression; +} + +export interface ImportDefaultSpecifier extends BaseModuleSpecifier { + type: "ImportDefaultSpecifier"; +} + +export interface ImportNamespaceSpecifier extends BaseModuleSpecifier { + type: "ImportNamespaceSpecifier"; +} + +export interface ExportNamedDeclaration extends BaseModuleDeclaration { + type: "ExportNamedDeclaration"; + declaration?: Declaration | null | undefined; + specifiers: ExportSpecifier[]; + source?: Literal | null | undefined; +} + +export interface ExportSpecifier extends BaseModuleSpecifier { + type: "ExportSpecifier"; + exported: Identifier; +} + +export interface ExportDefaultDeclaration extends BaseModuleDeclaration { + type: "ExportDefaultDeclaration"; + declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression; +} + +export interface ExportAllDeclaration extends BaseModuleDeclaration { + type: "ExportAllDeclaration"; + exported: Identifier | null; + source: Literal; +} + +export interface AwaitExpression extends BaseExpression { + type: "AwaitExpression"; + argument: Expression; +} diff --git a/node_modules/@types/estree/package.json b/node_modules/@types/estree/package.json new file mode 100644 index 00000000..2d5a9983 --- /dev/null +++ b/node_modules/@types/estree/package.json @@ -0,0 +1,26 @@ +{ + "name": "@types/estree", + "version": "1.0.5", + "description": "TypeScript definitions for estree", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/estree", + "license": "MIT", + "contributors": [ + { + "name": "RReverser", + "githubUsername": "RReverser", + "url": "https://github.com/RReverser" + } + ], + "main": "", + "types": "index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/estree" + }, + "scripts": {}, + "dependencies": {}, + "typesPublisherContentHash": "6f0eeaffe488ce594e73f8df619c677d752a279b51edbc744e4aebb20db4b3a7", + "typeScriptVersion": "4.5", + "nonNpm": true +} \ No newline at end of file diff --git a/node_modules/@vitejs/plugin-vue/dist/index.cjs b/node_modules/@vitejs/plugin-vue/dist/index.cjs index 8aabf26e..f566d732 100644 --- a/node_modules/@vitejs/plugin-vue/dist/index.cjs +++ b/node_modules/@vitejs/plugin-vue/dist/index.cjs @@ -19,7 +19,7 @@ const path__default = /*#__PURE__*/_interopDefaultCompat(path); const require$$0__default = /*#__PURE__*/_interopDefaultCompat(require$$0); const require$$1__default = /*#__PURE__*/_interopDefaultCompat(require$$1); -const version = "5.0.0"; +const version = "5.0.3"; function resolveCompiler(root) { const compiler = tryResolveCompiler(root) || tryResolveCompiler(); @@ -82,10 +82,11 @@ function slash(path) { const cache = /* @__PURE__ */ new Map(); const hmrCache = /* @__PURE__ */ new Map(); const prevCache = /* @__PURE__ */ new Map(); -function createDescriptor(filename, source, { root, isProduction, sourceMap, compiler }, hmr = false) { +function createDescriptor(filename, source, { root, isProduction, sourceMap, compiler, template }, hmr = false) { const { descriptor, errors } = compiler.parse(source, { filename, - sourceMap + sourceMap, + templateParseOptions: template?.compilerOptions }); const normalizedPath = slash(path__default.normalize(path__default.relative(root, filename))); descriptor.id = getHash(normalizedPath + (isProduction ? source : "")); @@ -283,8 +284,7 @@ function resolveTemplateCompilerOptions(descriptor, options, ssr) { return { ...options.template, id, - // @ts-ignore TODO remove ignore when dep is updated to 3.4 - ast: descriptor.template?.ast, + ast: canReuseAST(options.compiler.version) ? descriptor.template?.ast : void 0, filename, scoped: hasScoped, slotted: descriptor.slotted, @@ -304,6 +304,15 @@ function resolveTemplateCompilerOptions(descriptor, options, ssr) { } }; } +function canReuseAST(version) { + if (version) { + const [_, minor, patch] = version.split(".").map(Number); + if (minor >= 4 && patch >= 3) { + return true; + } + } + return false; +} const clientCache = /* @__PURE__ */ new WeakMap(); const ssrCache = /* @__PURE__ */ new WeakMap(); @@ -2145,7 +2154,7 @@ const _debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports); const debug = _debug("vite:hmr"); const directRequestRE = /(?:\?|&)direct\b/; -async function handleHotUpdate({ file, modules, read }, options) { +async function handleHotUpdate({ file, modules, read }, options, customElement) { const prevDescriptor = getDescriptor(file, options, false, true); if (!prevDescriptor) { return; @@ -2156,7 +2165,7 @@ async function handleHotUpdate({ file, modules, read }, options) { const affectedModules = /* @__PURE__ */ new Set(); const mainModule = getMainModule(modules); const templateModule = modules.find((m) => /type=template/.test(m.url)); - resolveScript(descriptor, options, false); + resolveScript(descriptor, options, false, customElement); const scriptChanged = hasScriptChanged(prevDescriptor, descriptor); if (scriptChanged) { affectedModules.add(getScriptModule(modules) || mainModule); @@ -2267,11 +2276,11 @@ function isEqualBlock(a, b) { function isOnlyTemplateChanged(prev, next) { return !hasScriptChanged(prev, next) && prev.styles.length === next.styles.length && prev.styles.every((s, i) => isEqualBlock(s, next.styles[i])) && prev.customBlocks.length === next.customBlocks.length && prev.customBlocks.every((s, i) => isEqualBlock(s, next.customBlocks[i])); } -function deepEqual(obj1, obj2, excludeProps = []) { +function deepEqual(obj1, obj2, excludeProps = [], deepParentsOfObj1 = []) { if (typeof obj1 !== typeof obj2) { return false; } - if (obj1 == null || obj2 == null || typeof obj1 !== "object") { + if (obj1 == null || obj2 == null || typeof obj1 !== "object" || deepParentsOfObj1.includes(obj1)) { return obj1 === obj2; } const keys1 = Object.keys(obj1); @@ -2283,7 +2292,10 @@ function deepEqual(obj1, obj2, excludeProps = []) { if (excludeProps.includes(key)) { continue; } - if (!deepEqual(obj1[key], obj2[key], excludeProps)) { + if (!deepEqual(obj1[key], obj2[key], excludeProps, [ + ...deepParentsOfObj1, + obj1 + ])) { return false; } } @@ -2816,7 +2828,11 @@ function vuePlugin(rawOptions = {}) { return handleTypeDepChange(typeDepToSFCMap.get(ctx.file), ctx); } if (filter.value(ctx.file)) { - return handleHotUpdate(ctx, options.value); + return handleHotUpdate( + ctx, + options.value, + customElementFilter.value(ctx.file) + ); } }, config(config) { diff --git a/node_modules/@vitejs/plugin-vue/dist/index.mjs b/node_modules/@vitejs/plugin-vue/dist/index.mjs index 17b35e8a..e420ed92 100644 --- a/node_modules/@vitejs/plugin-vue/dist/index.mjs +++ b/node_modules/@vitejs/plugin-vue/dist/index.mjs @@ -7,7 +7,7 @@ import { createHash } from 'node:crypto'; import require$$0 from 'tty'; import require$$1 from 'util'; -const version = "5.0.0"; +const version = "5.0.3"; function resolveCompiler(root) { const compiler = tryResolveCompiler(root) || tryResolveCompiler(); @@ -70,10 +70,11 @@ function slash(path) { const cache = /* @__PURE__ */ new Map(); const hmrCache = /* @__PURE__ */ new Map(); const prevCache = /* @__PURE__ */ new Map(); -function createDescriptor(filename, source, { root, isProduction, sourceMap, compiler }, hmr = false) { +function createDescriptor(filename, source, { root, isProduction, sourceMap, compiler, template }, hmr = false) { const { descriptor, errors } = compiler.parse(source, { filename, - sourceMap + sourceMap, + templateParseOptions: template?.compilerOptions }); const normalizedPath = slash(path.normalize(path.relative(root, filename))); descriptor.id = getHash(normalizedPath + (isProduction ? source : "")); @@ -271,8 +272,7 @@ function resolveTemplateCompilerOptions(descriptor, options, ssr) { return { ...options.template, id, - // @ts-ignore TODO remove ignore when dep is updated to 3.4 - ast: descriptor.template?.ast, + ast: canReuseAST(options.compiler.version) ? descriptor.template?.ast : void 0, filename, scoped: hasScoped, slotted: descriptor.slotted, @@ -292,6 +292,15 @@ function resolveTemplateCompilerOptions(descriptor, options, ssr) { } }; } +function canReuseAST(version) { + if (version) { + const [_, minor, patch] = version.split(".").map(Number); + if (minor >= 4 && patch >= 3) { + return true; + } + } + return false; +} const clientCache = /* @__PURE__ */ new WeakMap(); const ssrCache = /* @__PURE__ */ new WeakMap(); @@ -2133,7 +2142,7 @@ const _debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports); const debug = _debug("vite:hmr"); const directRequestRE = /(?:\?|&)direct\b/; -async function handleHotUpdate({ file, modules, read }, options) { +async function handleHotUpdate({ file, modules, read }, options, customElement) { const prevDescriptor = getDescriptor(file, options, false, true); if (!prevDescriptor) { return; @@ -2144,7 +2153,7 @@ async function handleHotUpdate({ file, modules, read }, options) { const affectedModules = /* @__PURE__ */ new Set(); const mainModule = getMainModule(modules); const templateModule = modules.find((m) => /type=template/.test(m.url)); - resolveScript(descriptor, options, false); + resolveScript(descriptor, options, false, customElement); const scriptChanged = hasScriptChanged(prevDescriptor, descriptor); if (scriptChanged) { affectedModules.add(getScriptModule(modules) || mainModule); @@ -2255,11 +2264,11 @@ function isEqualBlock(a, b) { function isOnlyTemplateChanged(prev, next) { return !hasScriptChanged(prev, next) && prev.styles.length === next.styles.length && prev.styles.every((s, i) => isEqualBlock(s, next.styles[i])) && prev.customBlocks.length === next.customBlocks.length && prev.customBlocks.every((s, i) => isEqualBlock(s, next.customBlocks[i])); } -function deepEqual(obj1, obj2, excludeProps = []) { +function deepEqual(obj1, obj2, excludeProps = [], deepParentsOfObj1 = []) { if (typeof obj1 !== typeof obj2) { return false; } - if (obj1 == null || obj2 == null || typeof obj1 !== "object") { + if (obj1 == null || obj2 == null || typeof obj1 !== "object" || deepParentsOfObj1.includes(obj1)) { return obj1 === obj2; } const keys1 = Object.keys(obj1); @@ -2271,7 +2280,10 @@ function deepEqual(obj1, obj2, excludeProps = []) { if (excludeProps.includes(key)) { continue; } - if (!deepEqual(obj1[key], obj2[key], excludeProps)) { + if (!deepEqual(obj1[key], obj2[key], excludeProps, [ + ...deepParentsOfObj1, + obj1 + ])) { return false; } } @@ -2804,7 +2816,11 @@ function vuePlugin(rawOptions = {}) { return handleTypeDepChange(typeDepToSFCMap.get(ctx.file), ctx); } if (filter.value(ctx.file)) { - return handleHotUpdate(ctx, options.value); + return handleHotUpdate( + ctx, + options.value, + customElementFilter.value(ctx.file) + ); } }, config(config) { diff --git a/node_modules/@vitejs/plugin-vue/package.json b/node_modules/@vitejs/plugin-vue/package.json index d2992253..88b0d445 100644 --- a/node_modules/@vitejs/plugin-vue/package.json +++ b/node_modules/@vitejs/plugin-vue/package.json @@ -1,6 +1,6 @@ { "name": "@vitejs/plugin-vue", - "version": "5.0.0", + "version": "5.0.3", "license": "MIT", "author": "Evan You", "files": [ @@ -35,11 +35,11 @@ "@jridgewell/gen-mapping": "^0.3.3", "@jridgewell/trace-mapping": "^0.3.20", "debug": "^4.3.4", - "rollup": "^4.6.1", + "rollup": "^4.9.2", "slash": "^5.1.0", "source-map-js": "^1.0.2", - "vite": "^5.0.6", - "vue": "^3.3.10" + "vite": "^5.0.10", + "vue": "^3.4.5" }, "scripts": { "dev": "unbuild --stub", diff --git a/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js b/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js index 360f8ec3..dfa6fcb2 100644 --- a/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js +++ b/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js @@ -1,88 +1,17 @@ +/** +* @vue/compiler-core v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var shared = require('@vue/shared'); +var decode_js = require('entities/lib/decode.js'); var parser = require('@babel/parser'); -var sourceMap = require('source-map'); var estreeWalker = require('estree-walker'); - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) - ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // ` this.emitCodePoint(cp, consumed) + ); + } + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === 38) { + this.startEntity(); + } else if (c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + const lower = c | 32; + if (lower === 116) { + this.state = 30; + } else { + this.state = lower === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || false) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } else if (c === 38) { + this.startEntity(); + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else if (c === 38) { + this.startEntity(); + } + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + const lower = c | 32; + if (lower === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (lower === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + const lower = c | 32; + if (lower === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (lower === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + { + this.baseState = this.state; + this.state = 33; + this.entityStart = this.index; + this.entityDecoder.startEntity( + this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute + ); + } + } + stateInEntity() { + { + const length = this.entityDecoder.write(this.buffer, this.index); + if (length >= 0) { + this.state = this.baseState; + if (length === 0) { + this.index = this.entityStart; + } + } else { + this.index = this.buffer.length - 1; + } + } + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + if (this.state === 33) { + this.entityDecoder.end(); + this.state = this.baseState; + } + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + { + if (this.baseState !== 1 && this.baseState !== 32) { + if (this.sectionStart < this.entityStart) { + this.cbs.onattribdata(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.onattribentity( + decode_js.fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } else { + if (this.sectionStart < this.entityStart) { + this.cbs.ontext(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.ontextentity( + decode_js.fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } + } + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) + err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "__EXTEND_POINT__": 52, + "52": "__EXTEND_POINT__" +}; +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [52]: `` +}; + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; + estreeWalker.walk(root, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { + return this.skip(); + } + if (node.type === "Identifier") { + const isLocal = !!knownIds[node.name]; + const isRefed = isReferencedIdentifier(node, parent, parentStack); + if (includeAll || isRefed && !isLocal) { + onIdentifier(node, parent, parentStack, isRefed, isLocal); + } + } else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") { + node.inPattern = true; + } else if (isFunctionType(node)) { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkFunctionParams( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "BlockStatement") { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkBlockDeclarations( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node !== rootExp && node.scopeIds) { + for (const id of node.scopeIds) { + knownIds[id]--; + if (knownIds[id] === 0) { + delete knownIds[id]; + } + } + } + } + }); +} +function isReferencedIdentifier(id, parent, parentStack) { + if (!parent) { + return true; + } + if (id.name === "arguments") { + return false; + } + if (isReferenced(id, parent)) { + return true; + } + switch (parent.type) { + case "AssignmentExpression": + case "AssignmentPattern": + return true; + case "ObjectPattern": + case "ArrayPattern": + return isInDestructureAssignment(parent, parentStack); + } + return false; +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) + continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) + continue; + onIdent(stmt.id); + } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration") { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } + } + } +} +function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) + extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; +} +function markKnownIds(name, knownIds) { + if (name in knownIds) { + knownIds[name]++; + } else { + knownIds[name] = 1; + } +} +function markScopeIdentifier(node, child, knownIds) { + const { name } = child; + if (node.scopeIds && node.scopeIds.has(name)) { + return; + } + markKnownIds(name, knownIds); + (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + case "MemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + return parent.object === node; + case "JSXMemberExpression": + return parent.object === node; + case "VariableDeclarator": + return parent.init === node; + case "ArrowFunctionExpression": + return parent.body === node; + case "PrivateName": + return false; + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.key === node) { + return !!parent.computed; + } + return false; + case "ObjectProperty": + if (parent.key === node) { + return !!parent.computed; + } + return !grandparent || grandparent.type !== "ObjectPattern"; + case "ClassProperty": + if (parent.key === node) { + return !!parent.computed; + } + return true; + case "ClassPrivateProperty": + return parent.key !== node; + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + case "AssignmentExpression": + return parent.right === node; + case "AssignmentPattern": + return parent.right === node; + case "LabeledStatement": + return false; + case "CatchClause": + return false; + case "RestElement": + return false; + case "BreakStatement": + case "ContinueStatement": + return false; + case "FunctionDeclaration": + case "FunctionExpression": + return false; + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + case "ExportSpecifier": + if (grandparent == null ? void 0 : grandparent.source) { + return false; + } + return parent.local === node; + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + case "ImportAttribute": + return false; + case "JSXAttribute": + return false; + case "ObjectPattern": + case "ArrayPattern": + return false; + case "MetaProperty": + return false; + case "ObjectTypeProperty": + return parent.key !== node; + case "TSEnumMember": + return parent.id !== node; + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + return true; + } + return true; +} +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; function isCoreComponent(tag) { - if (isBuiltInType(tag, 'Teleport')) { - return TELEPORT; - } - else if (isBuiltInType(tag, 'Suspense')) { - return SUSPENSE; - } - else if (isBuiltInType(tag, 'KeepAlive')) { - return KEEP_ALIVE; - } - else if (isBuiltInType(tag, 'BaseTransition')) { - return BASE_TRANSITION; - } + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } } const nonIdentifierRE = /^\d|[^\$\w]/; const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -/** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ const isMemberExpressionBrowser = (path) => { - // remove whitespaces around . or [ first - path = path.trim().replace(whitespaceRE, s => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === '[') { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } - else if (char === '(') { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } - else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `[`) { - currentOpenBracketCount++; - } - else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `(`) { - currentOpenParensCount++; - } - else if (char === `)`) { - // if the exp ends as a call then it should not be considered valid - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; + path = path.trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; } - return !currentOpenBracketCount && !currentOpenParensCount; + } + return !currentOpenBracketCount && !currentOpenParensCount; }; const isMemberExpressionNode = (path, context) => { - try { - let ret = parser.parseExpression(path, { - plugins: context.expressionPlugins - }); - if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') { - ret = ret.expression; - } - return (ret.type === 'MemberExpression' || - ret.type === 'OptionalMemberExpression' || - ret.type === 'Identifier'); - } - catch (e) { - return false; - } - }; + try { + let ret = parser.parseExpression(path, { + plugins: context.expressionPlugins + }); + ret = unwrapTSNode(ret); + return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; + } catch (e) { + return false; + } +}; const isMemberExpression = isMemberExpressionNode; -function getInnerRange(loc, offset, length) { - const source = loc.source.slice(offset, offset + length); - const newLoc = { - source, - start: advancePositionWithClone(loc.start, loc.source, offset), - end: loc.end - }; - if (length != null) { - newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length); - } - return newLoc; -} function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation(shared.extend({}, pos), source, numberOfCharacters); + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); } -// advance by mutation without cloning (for performance reasons), since this -// gets called a lot in the parser function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10 /* newline char code */) { - linesCount++; - lastNewLinePos = i; - } + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = - lastNewLinePos === -1 - ? pos.column + numberOfCharacters - : numberOfCharacters - lastNewLinePos; - return pos; + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; } function assert(condition, msg) { - /* istanbul ignore if */ - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } } function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (allowEmpty || p.exp) && - (shared.isString(name) ? p.name === name : name.test(p.name))) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) { + return p; } + } } function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (dynamicOnly) - continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } - else if (p.name === 'bind' && - (p.exp || allowEmpty) && - isStaticArgOf(p.arg, name)) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) + continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; } + } } function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); + return !!(arg && isStaticExp(arg) && arg.content === name); } function hasDynamicKeyVBind(node) { - return node.props.some(p => p.type === 7 /* DIRECTIVE */ && - p.name === 'bind' && - (!p.arg || // v-bind="obj" - p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo] - !p.arg.isStatic) // v-bind:[foo] - ); + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); } -function isText(node) { - return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */; +function isText$1(node) { + return node.type === 5 || node.type === 2; } function isVSlot(p) { - return p.type === 7 /* DIRECTIVE */ && p.name === 'slot'; + return p.type === 7 && p.name === "slot"; } function isTemplateNode(node) { - return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */); + return node.type === 1 && node.tagType === 3; } function isSlotOutlet(node) { - return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */; + return node.type === 1 && node.tagType === 2; } -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); function getUnnormalizedProps(props, callPath = []) { - if (props && - !shared.isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const callee = props.callee; - if (!shared.isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps(props.arguments[0], callPath.concat(props)); - } + if (props && !shared.isString(props) && props.type === 14) { + const callee = props.callee; + if (!shared.isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); } - return [props, callPath]; + } + return [props, callPath]; } function injectProp(node, prop, context) { - let propsWithInjection; - /** - * 1. mergeProps(...) - * 2. toHandlers(...) - * 3. normalizeProps(...) - * 4. normalizeProps(guardReactiveProps(...)) - * - * we need to get the real props before normalization - */ - let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && - !shared.isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || shared.isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } - else if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // merged props... add ours - // only inject key to object literal if it's the first argument so that - // if doesn't override user provided keys - const first = props.arguments[0]; - if (!shared.isString(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) { - first.properties.unshift(prop); - } - else { - if (props.callee === TO_HANDLERS) { - // #2366 - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } - else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } - else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) { - let alreadyExists = false; - // check existing key to avoid overriding user provided keys - if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) { - const propKeyName = prop.key.content; - alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === propKeyName); - } - if (!alreadyExists) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } - else { - // single v-bind with expression, return a merged replacement + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !shared.isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || shared.isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!shared.isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props + createObjectExpression([prop]), + props ]); - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`, - // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`, - // the `guardReactiveProps` will no longer be needed - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } + } else { + props.arguments.unshift(createObjectExpression([prop])); + } } - if (node.type === 13 /* VNODE_CALL */) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.props = propsWithInjection; - } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); } - else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.arguments[2] = propsWithInjection; - } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; } function toValidAssetId(name, type) { - // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString(); - })}`; + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; } -// Check if a node contains expressions that reference current context scope ids function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1 /* ELEMENT */: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some(c => hasScopeRef(c, ids)); - case 11 /* FOR */: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 9 /* IF */: - return node.branches.some(b => hasScopeRef(b, ids)); - case 10 /* IF_BRANCH */: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 4 /* SIMPLE_EXPRESSION */: - return (!node.isStatic && - isSimpleIdentifier(node.content) && - !!ids[node.content]); - case 8 /* COMPOUND_EXPRESSION */: - return node.children.some(c => shared.isObject(c) && hasScopeRef(c, ids)); - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return hasScopeRef(node.content, ids); - case 2 /* TEXT */: - case 3 /* COMMENT */: - return false; - default: - return false; - } + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + return false; + default: + return false; + } } function getMemoedVNodeCall(node) { - if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } - else { - return node; - } -} -function makeBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } } +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: { - message: `Platform-native elements with "is" prop will no longer be ` + - `treated as components in Vue 3 unless the "is" value is explicitly ` + - `prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: { - message: key => `.sync modifier for v-bind has been removed. Use v-model with ` + - `argument instead. \`v-bind:${key}.sync\` should be changed to ` + - `\`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: { - message: `.prop modifier for v-bind has been removed and no longer necessary. ` + - `Vue 3 will automatically set a binding as DOM property when appropriate.` - }, - ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` + - `object spread: it will now overwrite an existing non-mergeable attribute ` + - `that appears before v-bind in the case of conflict. ` + - `To retain 2.x behavior, move v-bind to make it the first attribute. ` + - `You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: { - message: `v-if / v-for precedence when used on the same element has changed ` + - `in Vue 3: v-if now takes higher precedence and will no longer have ` + - `access to v-for scope variables. It is best to avoid the ambiguity ` + - `with <template> tags or use a computed property that filters v-for ` + - `data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: { - message: `<template> with no special directives will render as a native template ` + - `element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTER" /* COMPILER_FILTERS */]: { - message: `filters have been removed in Vue 3. ` + - `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` + - `Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, context) { - const config = context.options - ? context.options.compatConfig - : context.compatConfig; - const value = config && config[key]; - if (key === 'MODE') { - return value || 3; // compiler defaults to v3 behavior - } - else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue('MODE', context); - const value = getCompatValue(key, context); - // in v3 mode, only enable if explicitly set to true - // otherwise enable for any non-false value - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === 'suppress-warning') { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) - err.loc = loc; - context.onWarn(err); -} - -// The default decoder only provides escapes for characters reserved as part of -// the template syntax, and is only used if the custom renderer did not provide -// a platform-specific decoder. -const decodeRE = /&(gt|lt|amp|apos|quot);/g; -const decodeMap = { - gt: '>', - lt: '<', - amp: '&', - apos: "'", - quot: '"' -}; const defaultParserOptions = { - delimiters: [`{{`, `}}`], - getNamespace: () => 0 /* HTML */, - getTextMode: () => 0 /* DATA */, - isVoidTag: shared.NO, - isPreTag: shared.NO, - isCustomElement: shared.NO, - decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]), - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: shared.NO, + isPreTag: shared.NO, + isCustomElement: shared.NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false }; -function baseParse(content, options = {}) { - const context = createParserContext(content, options); - const start = getCursor(context); - return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start)); -} -function createParserContext(content, rawOptions) { - const options = shared.extend({}, defaultParserOptions); - let key; - for (key in rawOptions) { - // @ts-ignore - options[key] = - rawOptions[key] === undefined - ? defaultParserOptions[key] - : rawOptions[key]; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); } - return { - options, - column: 1, - line: 1, - offset: 0, - originalSource: content, - source: content, - inPre: false, - inVPre: false, - onWarn: options.onWarn + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = decode_js.decodeHTML(exp); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 }; -} -function parseChildren(context, mode, ancestors) { - const parent = last(ancestors); - const ns = parent ? parent.ns : 0 /* HTML */; - const nodes = []; - while (!isEnd(context, mode, ancestors)) { - const s = context.source; - let node = undefined; - if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) { - if (!context.inVPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode); - } - else if (mode === 0 /* DATA */ && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1); - } - else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '<!--')) { - node = parseComment(context); - } - else if (startsWith(s, '<!DOCTYPE')) { - // Ignore DOCTYPE by a limitation. - node = parseBogusComment(context); - } - else if (startsWith(s, '<![CDATA[')) { - if (ns !== 0 /* HTML */) { - node = parseCDATA(context, ancestors); - } - else { - emitError(context, 1 /* CDATA_IN_HTML_CONTENT */); - node = parseBogusComment(context); - } - } - else { - emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */); - node = parseBogusComment(context); - } - } - else if (s[1] === '/') { - // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state - if (s.length === 2) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2); - } - else if (s[2] === '>') { - emitError(context, 14 /* MISSING_END_TAG_NAME */, 2); - advanceBy(context, 3); - continue; - } - else if (/[a-z]/i.test(s[2])) { - emitError(context, 23 /* X_INVALID_END_TAG */); - parseTag(context, 1 /* End */, parent); - continue; - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2); - node = parseBogusComment(context); - } - } - else if (/[a-z]/i.test(s[1])) { - node = parseElement(context, ancestors); - // 2.x <template> with no directive compat - if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context) && - node && - node.tag === 'template' && - !node.props.some(p => p.type === 7 /* DIRECTIVE */ && - isSpecialTemplateDirective(p.name))) { - warnDeprecation("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context, node.loc); - node = node.children; - } - } - else if (s[1] === '?') { - emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1); - node = parseBogusComment(context); - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1); - } - } - } - if (!node) { - node = parseText(context, mode); - } - if (shared.isArray(node)) { - for (let i = 0; i < node.length; i++) { - pushNode(nodes, node[i]); - } - } - else { - pushNode(nodes, node); + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } } - // Whitespace handling strategy like v2 - let removedWhitespace = false; - if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) { - const shouldCondense = context.options.whitespace !== 'preserve'; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!context.inPre && node.type === 2 /* TEXT */) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1]; - const next = nodes[i + 1]; - // Remove if: - // - the whitespace is the first or last node, or: - // - (condense mode) the whitespace is adjacent to a comment, or: - // - (condense mode) the whitespace is between two elements AND contains newline - if (!prev || - !next || - (shouldCondense && - (prev.type === 3 /* COMMENT */ || - next.type === 3 /* COMMENT */ || - (prev.type === 1 /* ELEMENT */ && - next.type === 1 /* ELEMENT */ && - /[\r\n]/.test(node.content))))) { - removedWhitespace = true; - nodes[i] = null; - } - else { - // Otherwise, the whitespace is condensed into a single space - node.content = ' '; - } - } - else if (shouldCondense) { - // in condense mode, consecutive whitespaces in text are condensed - // down to a single space. - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' '); - } - } - // Remove comment nodes if desired by configuration. - else if (node.type === 3 /* COMMENT */ && !context.options.comments) { - removedWhitespace = true; - nodes[i] = null; - } - } - if (context.inPre && parent && context.options.isPreTag(parent.tag)) { - // remove leading newline per html spec - // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element - const first = nodes[0]; - if (first && first.type === 2 /* TEXT */) { - first.content = first.content.replace(/^\r?\n/, ''); - } - } + }, + onselfclosingtag(end) { + var _a; + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (((_a = stack[0]) == null ? void 0 : _a.tag) === name) { + onCloseTag(stack.shift(), end); } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function pushNode(nodes, node) { - if (node.type === 2 /* TEXT */) { - const prev = last(nodes); - // Merge if both this and the previous node are text and those are - // consecutive. This happens for cases like "a < b". - if (prev && - prev.type === 2 /* TEXT */ && - prev.loc.end.offset === node.loc.start.offset) { - prev.content += node.content; - prev.loc.end = node.loc.end; - prev.loc.source += node.loc.source; - return; - } - } - nodes.push(node); -} -function parseCDATA(context, ancestors) { - advanceBy(context, 9); - const nodes = parseChildren(context, 3 /* CDATA */, ancestors); - if (context.source.length === 0) { - emitError(context, 6 /* EOF_IN_CDATA */); - } - else { - advanceBy(context, 3); - } - return nodes; -} -function parseComment(context) { - const start = getCursor(context); - let content; - // Regular comment. - const match = /--(\!)?>/.exec(context.source); - if (!match) { - content = context.source.slice(4); - advanceBy(context, context.source.length); - emitError(context, 7 /* EOF_IN_COMMENT */); - } - else { - if (match.index <= 3) { - emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */); - } - if (match[1]) { - emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */); - } - content = context.source.slice(4, match.index); - // Advancing with reporting nested comments. - const s = context.source.slice(0, match.index); - let prevIndex = 1, nestedIndex = 0; - while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) { - advanceBy(context, nestedIndex - prevIndex + 1); - if (nestedIndex + 4 < s.length) { - emitError(context, 16 /* NESTED_COMMENT */); - } - prevIndex = nestedIndex + 1; - } - advanceBy(context, match.index + match[0].length - prevIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) }; -} -function parseBogusComment(context) { - const start = getCursor(context); - const contentStart = context.source[1] === '?' ? 1 : 2; - let content; - const closeIndex = context.source.indexOf('>'); - if (closeIndex === -1) { - content = context.source.slice(contentStart); - advanceBy(context, context.source.length); + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); } - else { - content = context.source.slice(contentStart, closeIndex); - advanceBy(context, closeIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) - }; -} -function parseElement(context, ancestors) { - // Start tag. - const wasInPre = context.inPre; - const wasInVPre = context.inVPre; - const parent = last(ancestors); - const element = parseTag(context, 0 /* Start */, parent); - const isPreBoundary = context.inPre && !wasInPre; - const isVPreBoundary = context.inVPre && !wasInVPre; - if (element.isSelfClosing || context.options.isVoidTag(element.tag)) { - // #4030 self-closing <pre> tag - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - // Children. - ancestors.push(element); - const mode = context.options.getTextMode(element, parent); - const children = parseChildren(context, mode, ancestors); - ancestors.pop(); - // 2.x inline-template compat - { - const inlineTemplateProp = element.props.find(p => p.type === 6 /* ATTRIBUTE */ && p.name === 'inline-template'); - if (inlineTemplateProp && - checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) { - const loc = getSelection(context, element.loc.end); - inlineTemplateProp.value = { - type: 2 /* TEXT */, - content: loc.source, - loc - }; - } - } - element.children = children; - // End tag. - if (startsWithEndTagOpen(context.source, element.tag)) { - parseTag(context, 1 /* End */, parent); - } - else { - emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start); - if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { - const first = children[0]; - if (first && startsWith(first.loc.source, '<!--')) { - emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */); - } - } - } - element.loc = getSelection(context, element.loc.start); - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; -} -const isSpecialTemplateDirective = /*#__PURE__*/ shared.makeMap(`if,else,else-if,for,slot`); -function parseTag(context, type, parent) { - // Tag open. - const start = getCursor(context); - const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source); - const tag = match[1]; - const ns = context.options.getNamespace(tag, parent); - advanceBy(context, match[0].length); - advanceSpaces(context); - // save current state in case we need to re-parse attributes with v-pre - const cursor = getCursor(context); - const currentSource = context.source; - // check <pre> tag - if (context.options.isPreTag(tag)) { - context.inPre = true; - } - // Attributes. - let props = parseAttributes(context, type); - // check v-pre - if (type === 0 /* Start */ && - !context.inVPre && - props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) { - context.inVPre = true; - // reset context - shared.extend(context, cursor); - context.source = currentSource; - // re-parse attrs and filter out v-pre itself - props = parseAttributes(context, type).filter(p => p.name !== 'v-pre'); - } - // Tag close. - let isSelfClosing = false; - if (context.source.length === 0) { - emitError(context, 9 /* EOF_IN_TAG */); - } - else { - isSelfClosing = startsWith(context.source, '/>'); - if (type === 1 /* End */ && isSelfClosing) { - emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */); - } - advanceBy(context, isSelfClosing ? 2 : 1); - } - if (type === 1 /* End */) { - return; - } - // 2.x deprecation checks - if (isCompatEnabled("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context)) { - let hasIf = false; - let hasFor = false; - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 7 /* DIRECTIVE */) { - if (p.name === 'if') { - hasIf = true; - } - else if (p.name === 'for') { - hasFor = true; - } - } - if (hasIf && hasFor) { - warnDeprecation("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start)); - break; - } - } - } - let tagType = 0 /* ELEMENT */; - if (!context.inVPre) { - if (tag === 'slot') { - tagType = 2 /* SLOT */; - } - else if (tag === 'template') { - if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) { - tagType = 3 /* TEMPLATE */; - } - } - else if (isComponent(tag, props, context)) { - tagType = 1 /* COMPONENT */; - } - } - return { - type: 1 /* ELEMENT */, - ns, - tag, - tagType, - props, - isSelfClosing, - children: [], - loc: getSelection(context, start), - codegenNode: undefined // to be created during transform phase - }; -} -function isComponent(tag, props, context) { - const options = context.options; - if (options.isCustomElement(tag)) { - return false; - } - if (tag === 'component' || - /^[A-Z]/.test(tag) || - isCoreComponent(tag) || - (options.isBuiltInComponent && options.isBuiltInComponent(tag)) || - (options.isNativeTag && !options.isNativeTag(tag))) { - return true; - } - // at this point the tag should be a native tag, but check for potential "is" - // casting - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.name === 'is' && p.value) { - if (p.value.content.startsWith('vue:')) { - return true; - } - else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } - else { - // directive - // v-is (TODO Deprecate) - if (p.name === 'is') { - return true; - } - else if ( - // :is on plain element - only treat as component in compat mode - p.name === 'bind' && - isStaticArgOf(p.arg, 'is') && - true && - checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } -} -function parseAttributes(context, type) { - const props = []; - const attributeNames = new Set(); - while (context.source.length > 0 && - !startsWith(context.source, '>') && - !startsWith(context.source, '/>')) { - if (startsWith(context.source, '/')) { - emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */); - advanceBy(context, 1); - advanceSpaces(context); - continue; - } - if (type === 1 /* End */) { - emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */); - } - const attr = parseAttribute(context, attributeNames); - // Trim whitespace between class - // https://github.com/vuejs/core/issues/4251 - if (attr.type === 6 /* ATTRIBUTE */ && - attr.value && - attr.name === 'class') { - attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim(); - } - if (type === 0 /* Start */) { - props.push(attr); - } - if (/^[^\t\r\n\f />]/.test(context.source)) { - emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */); - } - advanceSpaces(context); - } - return props; -} -function parseAttribute(context, nameSet) { - // Name. - const start = getCursor(context); - const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source); - const name = match[0]; - if (nameSet.has(name)) { - emitError(context, 2 /* DUPLICATE_ATTRIBUTE */); - } - nameSet.add(name); - if (name[0] === '=') { - emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */); - } - { - const pattern = /["'<]/g; - let m; - while ((m = pattern.exec(name))) { - emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index); - } - } - advanceBy(context, name.length); - // Value - let value = undefined; - if (/^[\t\r\n\f ]*=/.test(context.source)) { - advanceSpaces(context); - advanceBy(context, 1); - advanceSpaces(context); - value = parseAttributeValue(context); - if (!value) { - emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */); - } - } - const loc = getSelection(context, start); - if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) { - const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name); - let isPropShorthand = startsWith(name, '.'); - let dirName = match[1] || - (isPropShorthand || startsWith(name, ':') - ? 'bind' - : startsWith(name, '@') - ? 'on' - : 'slot'); - let arg; - if (match[2]) { - const isSlot = dirName === 'slot'; - const startOffset = name.lastIndexOf(match[2]); - const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length)); - let content = match[2]; - let isStatic = true; - if (content.startsWith('[')) { - isStatic = false; - if (!content.endsWith(']')) { - emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */); - content = content.slice(1); - } - else { - content = content.slice(1, content.length - 1); - } - } - else if (isSlot) { - // #1241 special case for v-slot: vuetify relies extensively on slot - // names containing dots. v-slot doesn't have any modifiers and Vue 2.x - // supports such usage so we are keeping it consistent with 2.x. - content += match[3] || ''; - } - arg = { - type: 4 /* SIMPLE_EXPRESSION */, - content, - isStatic, - constType: isStatic - ? 3 /* CAN_STRINGIFY */ - : 0 /* NOT_CONSTANT */, - loc - }; - } - if (value && value.isQuoted) { - const valueLoc = value.loc; - valueLoc.start.offset++; - valueLoc.start.column++; - valueLoc.end = advancePositionWithClone(valueLoc.start, value.content); - valueLoc.source = valueLoc.source.slice(1, -1); - } - const modifiers = match[3] ? match[3].slice(1).split('.') : []; - if (isPropShorthand) - modifiers.push('prop'); - // 2.x compat v-bind:foo.sync -> v-model:foo - if (dirName === 'bind' && arg) { - if (modifiers.includes('sync') && - checkCompatEnabled("COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) { - dirName = 'model'; - modifiers.splice(modifiers.indexOf('sync'), 1); - } - if (modifiers.includes('prop')) { - checkCompatEnabled("COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */, context, loc); - } - } - return { - type: 7 /* DIRECTIVE */, - name: dirName, - exp: value && { - type: 4 /* SIMPLE_EXPRESSION */, - content: value.content, - isStatic: false, - // Treat as non-constant by default. This can be potentially set to - // other values by `transformExpression` to make it eligible for hoisting. - constType: 0 /* NOT_CONSTANT */, - loc: value.loc - }, - arg, - modifiers, - loc - }; - } - // missing directive name or illegal directive name - if (!context.inVPre && startsWith(name, 'v-')) { - emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */); - } - return { - type: 6 /* ATTRIBUTE */, + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, name, - value: value && { - type: 2 /* TEXT */, - content: value.content, - loc: value.loc - }, - loc - }; -} -function parseAttributeValue(context) { - const start = getCursor(context); - let content; - const quote = context.source[0]; - const isQuoted = quote === `"` || quote === `'`; - if (isQuoted) { - // Quoted value. - advanceBy(context, 1); - const endIndex = context.source.indexOf(quote); - if (endIndex === -1) { - content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */); - } - else { - content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */); - advanceBy(context, 1); + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? ["prop"] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } } + } } - else { - // Unquoted - const match = /^[^\t\r\n\f >]+/.exec(context.source); - if (!match) { - return undefined; - } - const unexpectedChars = /["'<=`]/g; - let m; - while ((m = unexpectedChars.exec(match[0]))) { - emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index); - } - content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */); + }, + ondirarg(start, end) { + if (start === end) + return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); } - return { content, isQuoted, loc: getSelection(context, start) }; -} -function parseInterpolation(context, mode) { - const [open, close] = context.options.delimiters; - const closeIndex = context.source.indexOf(close, open.length); - if (closeIndex === -1) { - emitError(context, 25 /* X_MISSING_INTERPOLATION_END */); - return undefined; + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + currentProp.modifiers.push(mod); } - const start = getCursor(context); - advanceBy(context, open.length); - const innerStart = getCursor(context); - const innerEnd = getCursor(context); - const rawContentLength = closeIndex - open.length; - const rawContent = context.source.slice(0, rawContentLength); - const preTrimContent = parseTextData(context, rawContentLength, mode); - const content = preTrimContent.trim(); - const startOffset = preTrimContent.indexOf(content); - if (startOffset > 0) { - advancePositionWithMutation(innerStart, rawContent, startOffset); + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; } - const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset); - advancePositionWithMutation(innerEnd, rawContent, endOffset); - advanceBy(context, close.length); - return { - type: 5 /* INTERPOLATION */, - content: { - type: 4 /* SIMPLE_EXPRESSION */, - isStatic: false, - // Set `isConstant` to false by default and will decide in transformExpression - constType: 0 /* NOT_CONSTANT */, - content, - loc: getSelection(context, innerStart, innerEnd) - }, - loc: getSelection(context, start) - }; -} -function parseText(context, mode) { - const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]]; - let endIndex = context.source.length; - for (let i = 0; i < endTokens.length; i++) { - const index = context.source.indexOf(endTokens[i], 1); - if (index !== -1 && endIndex > index) { - endIndex = index; - } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); } - const start = getCursor(context); - const content = parseTextData(context, endIndex, mode); - return { - type: 2 /* TEXT */, - content, - loc: getSelection(context, start) - }; -} -/** - * Get text data with a given length from the current location. - * This translates HTML entities in the text data. - */ -function parseTextData(context, length, mode) { - const rawText = context.source.slice(0, length); - advanceBy(context, length); - if (mode === 2 /* RAWTEXT */ || - mode === 3 /* CDATA */ || - !rawText.includes('&')) { - return rawText; - } - else { - // DATA or RCDATA containing "&"". Entity decoding required. - return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */); - } -} -function getCursor(context) { - const { column, line, offset } = context; - return { column, line, offset }; -} -function getSelection(context, start, end) { - end = end || getCursor(context); - return { - start, - end, - source: context.originalSource.slice(start.offset, end.offset) - }; -} -function last(xs) { - return xs[xs.length - 1]; -} -function startsWith(source, searchString) { - return source.startsWith(searchString); -} -function advanceBy(context, numberOfCharacters) { - const { source } = context; - advancePositionWithMutation(context, source, numberOfCharacters); - context.source = source.slice(numberOfCharacters); -} -function advanceSpaces(context) { - const match = /^[\t\r\n\f ]+/.exec(context.source); - if (match) { - advanceBy(context, match[0].length); - } -} -function getNewPosition(context, start, numberOfCharacters) { - return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters); -} -function emitError(context, code, offset, loc = getCursor(context)) { - if (offset) { - loc.offset += offset; - loc.column += offset; - } - context.options.onError(createCompilerError(code, { - start: loc, - end: loc, - source: '' - })); -} -function isEnd(context, mode, ancestors) { - const s = context.source; - switch (mode) { - case 0 /* DATA */: - if (startsWith(s, '</')) { - // TODO: probably bad performance - for (let i = ancestors.length - 1; i >= 0; --i) { - if (startsWithEndTagOpen(s, ancestors[i].tag)) { - return true; - } - } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + { + if (currentProp.name === "for") { + expParseMode = 3 /* Skip */; + } else if (currentProp.name === "slot") { + expParseMode = 1 /* Params */; + } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { + expParseMode = 2 /* Statements */; } - break; - case 1 /* RCDATA */: - case 2 /* RAWTEXT */: { - const parent = last(ancestors); - if (parent && startsWithEndTagOpen(s, parent.tag)) { - return true; - } - break; + } + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.indexOf("sync")) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } } - case 3 /* CDATA */: - if (startsWith(s, ']]>')) { - return true; - } - break; + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } } - return !s; + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) + return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; } -function startsWithEndTagOpen(source, tag) { - return (startsWith(source, '</') && - source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && - /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')); +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if ((lastNode == null ? void 0 : lastNode.type) === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, end + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = shared.extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(el.children, el.tag); + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (isCompatEnabled( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions + )) { + let hasIf = false; + let hasFor = false; + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 7) { + if (p.name === "if") { + hasIf = true; + } else if (p.name === "for") { + hasFor = true; + } + } + if (hasIf && hasFor) { + warnDeprecation( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions, + el.loc + ); + break; + } + } + } + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + warnDeprecation( + "COMPILER_NATIVE_TEMPLATE", + currentOptions, + el.loc + ); + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) + i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + var _a; + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || ((_a = currentOptions.isBuiltInComponent) == null ? void 0 : _a.call(currentOptions, tag)) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + var _a, _b; + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = (_a = nodes[i - 1]) == null ? void 0 : _a.type; + const next = (_b = nodes[i + 1]) == null ? void 0 : _b.type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + if (inPre && tag && currentOptions.isPreTag(tag)) { + const first = nodes[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { + if (isSimpleIdentifier(content)) { + exp.ast = null; + return exp; + } + try { + const plugins = currentOptions.expressionPlugins; + const options = { + plugins: plugins ? [...plugins, "typescript"] : ["typescript"] + }; + if (parseMode === 2 /* Statements */) { + exp.ast = parser.parse(` ${content} `, options).program; + } else if (parseMode === 1 /* Params */) { + exp.ast = parser.parseExpression(`(${content})=>{}`, options); + } else { + exp.ast = parser.parseExpression(`(${content})`, options); + } + } catch (e) { + exp.ast = false; + emitError(45, loc.start.offset, e.message); + } + } + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = shared.extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + { + if (currentOptions.decodeEntities) { + console.warn( + `[@vue/compiler-core] decodeEntities option is passed but will be ignored in non-browser builds.` + ); + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options == null ? void 0 : options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; } function hoistStatic(root, context) { - walk(root, context, + walk( + root, + context, // Root node is unfortunately non-hoistable due to potential parent // fallthrough attributes. - isSingleElementRoot(root, root.children[0])); + isSingleElementRoot(root, root.children[0]) + ); } function isSingleElementRoot(root, child) { - const { children } = root; - return (children.length === 1 && - child.type === 1 /* ELEMENT */ && - !isSlotOutlet(child)); + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); } function walk(node, context, doNotHoistNode = false) { - const { children } = node; - const originalCount = children.length; - let hoistedCount = 0; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - // only plain elements & text calls are eligible for hoisting. - if (child.type === 1 /* ELEMENT */ && - child.tagType === 0 /* ELEMENT */) { - const constantType = doNotHoistNode - ? 0 /* NOT_CONSTANT */ - : getConstantType(child, context); - if (constantType > 0 /* NOT_CONSTANT */) { - if (constantType >= 2 /* CAN_HOIST */) { - child.codegenNode.patchFlag = - -1 /* HOISTED */ + (` /* HOISTED */` ); - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - continue; - } - } - else { - // node may contain dynamic children, but its props may be eligible for - // hoisting. - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - const flag = getPatchFlag(codegenNode); - if ((!flag || - flag === 512 /* NEED_PATCH */ || - flag === 1 /* TEXT */) && - getGeneratedPropsConstantType(child, context) >= - 2 /* CAN_HOIST */) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } + const { children } = node; + const originalCount = children.length; + let hoistedCount = 0; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1 + (` /* HOISTED */` ); + child.codegenNode = context.hoist(child.codegenNode); + hoistedCount++; + continue; } - else if (child.type === 12 /* TEXT_CALL */ && - getConstantType(child.content, context) >= 2 /* CAN_HOIST */) { - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - } - // walk further - if (child.type === 1 /* ELEMENT */) { - const isComponent = child.tagType === 1 /* COMPONENT */; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, context); - if (isComponent) { - context.scopes.vSlot--; - } - } - else if (child.type === 11 /* FOR */) { - // Do not hoist v-for single child because it has to be a block - walk(child, context, child.children.length === 1); - } - else if (child.type === 9 /* IF */) { - for (let i = 0; i < child.branches.length; i++) { - // Do not hoist v-if single child because it has to be a block - walk(child.branches[i], context, child.branches[i].children.length === 1); + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = getPatchFlag(codegenNode); + if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } } + } } - if (hoistedCount && context.transformHoist) { - context.transformHoist(children, context, node); + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, context); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, context, child.children.length === 1); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + context, + child.branches[i2].children.length === 1 + ); + } } - // all children were hoisted - the entire children array is hoistable. - if (hoistedCount && - hoistedCount === originalCount && - node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - node.codegenNode && - node.codegenNode.type === 13 /* VNODE_CALL */ && - shared.isArray(node.codegenNode.children)) { - node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children)); + } + if (hoistedCount && context.transformHoist) { + context.transformHoist(children, context, node); + } + if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) { + const hoisted = context.hoist( + createArrayExpression(node.codegenNode.children) + ); + if (context.hmr) { + hoisted.content = `[...${hoisted.content}]`; } + node.codegenNode.children = hoisted; + } } function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1 /* ELEMENT */: - if (node.tagType !== 0 /* ELEMENT */) { - return 0 /* NOT_CONSTANT */; + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") { + return 0; + } + const flag = getPatchFlag(codegenNode); + if (!flag) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } } - const cached = constantCache.get(node); - if (cached !== undefined) { - return cached; + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13 /* VNODE_CALL */) { - return 0 /* NOT_CONSTANT */; - } - if (codegenNode.isBlock && - node.tag !== 'svg' && - node.tag !== 'foreignObject') { - return 0 /* NOT_CONSTANT */; - } - const flag = getPatchFlag(codegenNode); - if (!flag) { - let returnType = 3 /* CAN_STRINGIFY */; - // Element itself has no patch flag. However we still need to check: - // 1. Even for a node with no patch flag, it is possible for it to contain - // non-hoistable expressions that refers to scope variables, e.g. compiler - // injected keys or cached event handlers. Therefore we need to always - // check the codegenNode's props to be sure. - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (generatedPropsType < returnType) { - returnType = generatedPropsType; - } - // 2. its children. - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (childType < returnType) { - returnType = childType; - } - } - // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0 - // type, check if any of the props can cause the type to be lowered - // we can skip can_patch because it's guaranteed by the absence of a - // patchFlag. - if (returnType > 1 /* CAN_SKIP_PATCH */) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (expType < returnType) { - returnType = expType; - } - } - } - } - // only svg/foreignObject could be block here, however if they are - // static then they don't need to be blocks since there will be no - // nested updates. - if (codegenNode.isBlock) { - // except set custom directives. - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType); - return returnType; - } - else { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - case 2 /* TEXT */: - case 3 /* COMMENT */: - return 3 /* CAN_STRINGIFY */; - case 9 /* IF */: - case 11 /* FOR */: - case 10 /* IF_BRANCH */: - return 0 /* NOT_CONSTANT */; - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return getConstantType(node.content, context); - case 4 /* SIMPLE_EXPRESSION */: - return node.constType; - case 8 /* COMPOUND_EXPRESSION */: - let returnType = 3 /* CAN_STRINGIFY */; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (shared.isString(child) || shared.isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0 /* NOT_CONSTANT */) { - return 0 /* NOT_CONSTANT */; - } - else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - default: - return 0 /* NOT_CONSTANT */; - } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (shared.isString(child) || shared.isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + default: + return 0; + } } -const allowHoistedHelperSet = new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS ]); function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 /* JS_CALL_EXPRESSION */ && - !shared.isString(value.callee) && - allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - return getConstantType(arg, context); - } - else if (arg.type === 14 /* JS_CALL_EXPRESSION */) { - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))` - return getConstantTypeOfHelperCall(arg, context); - } + if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); } - return 0 /* NOT_CONSTANT */; + } + return 0; } function getGeneratedPropsConstantType(node, context) { - let returnType = 3 /* CAN_STRINGIFY */; - const props = getNodeProps(node); - if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0 /* NOT_CONSTANT */) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4 /* SIMPLE_EXPRESSION */) { - valueType = getConstantType(value, context); - } - else if (value.type === 14 /* JS_CALL_EXPRESSION */) { - // some helper calls can be hoisted, - // such as the `normalizeProps` generated by the compiler for pre-normalize class, - // in this case we need to respect the ConstantType of the helper's arguments - valueType = getConstantTypeOfHelperCall(value, context); - } - else { - valueType = 0 /* NOT_CONSTANT */; - } - if (valueType === 0 /* NOT_CONSTANT */) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } } - return returnType; + } + return returnType; } function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - return codegenNode.props; - } + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } } function getPatchFlag(node) { - const flag = node.patchFlag; - return flag ? parseInt(flag, 10) : undefined; + const flag = node.patchFlag; + return flag ? parseInt(flag, 10) : void 0; } -function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = shared.NOOP, isCustomElement = shared.NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = shared.EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) { - const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/); - const context = { - // options - selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: new Map(), - components: new Set(), - directives: new Set(), - hoists: [], - imports: [], - constantCache: new Map(), - temps: 0, - cached: 0, - identifiers: Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } - else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - /* istanbul ignore if */ - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node - ? list.indexOf(node) - : context.currentNode - ? context.childIndex - : -1; - /* istanbul ignore if */ - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - // current node removed - context.currentNode = null; - context.onNodeRemoved(); - } - else { - // sibling node removed - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: () => { }, - addIdentifiers(exp) { - // identifier tracking only happens in non-browser builds. - { - if (shared.isString(exp)) { - addId(exp); - } - else if (exp.identifiers) { - exp.identifiers.forEach(addId); - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - addId(exp.content); - } - } - }, - removeIdentifiers(exp) { - { - if (shared.isString(exp)) { - removeId(exp); - } - else if (exp.identifiers) { - exp.identifiers.forEach(removeId); - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - removeId(exp.content); - } - } - }, - hoist(exp) { - if (shared.isString(exp)) - exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false) { - return createCacheExpression(context.cached++, exp, isVNode); +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic: hoistStatic2 = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = shared.NOOP, + isCustomElement = shared.NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = shared.EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic: hoistStatic2, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + cached: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); } - }; - { - context.filters = new Set(); - } - function addId(id) { - const { identifiers } = context; - if (identifiers[id] === undefined) { - identifiers[id] = 0; + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); } - identifiers[id]++; + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: shared.NOOP, + addIdentifiers(exp) { + { + if (shared.isString(exp)) { + addId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(addId); + } else if (exp.type === 4) { + addId(exp.content); + } + } + }, + removeIdentifiers(exp) { + { + if (shared.isString(exp)) { + removeId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(removeId); + } else if (exp.type === 4) { + removeId(exp.content); + } + } + }, + hoist(exp) { + if (shared.isString(exp)) + exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false) { + return createCacheExpression(context.cached++, exp, isVNode); } - function removeId(id) { - context.identifiers[id]--; + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + function addId(id) { + const { identifiers } = context; + if (identifiers[id] === void 0) { + identifiers[id] = 0; } - return context; + identifiers[id]++; + } + function removeId(id) { + context.identifiers[id]--; + } + return context; } function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - hoistStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - // finalize meta information - root.helpers = [...context.helpers.keys()]; - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - { - root.filters = [...context.filters]; - } + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + hoistStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } } function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - // if the single child is an element, turn it into a block. - if (isSingleElementRoot(root, child) && child.codegenNode) { - // single element root is never hoisted so codegenNode will never be - // SimpleExpressionNode - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - makeBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } - else { - // - single <slot/>, IfNode, ForNode: already blocks. - // - single text node: always patched. - // root codegen falls through via genNode() - root.codegenNode = child; - } + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; } - else if (children.length > 1) { - // root has multiple nodes - return a fragment block. - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = shared.PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${shared.PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, undefined, false /* isComponent */); + } else if (children.length > 1) { + let patchFlag = 64; + let patchFlagText = shared.PatchFlagNames[64]; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${shared.PatchFlagNames[2048]}`; } - else ; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else ; } function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (shared.isString(child)) - continue; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (shared.isString(child)) + continue; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } } function traverseNode(node, context) { - context.currentNode = node; - // apply transform plugins - const { nodeTransforms } = context; - const exitFns = []; - for (let i = 0; i < nodeTransforms.length; i++) { - const onExit = nodeTransforms[i](node, context); - if (onExit) { - if (shared.isArray(onExit)) { - exitFns.push(...onExit); - } - else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - // node was removed - return; - } - else { - // node may have been replaced - node = context.currentNode; - } + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (shared.isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } } - switch (node.type) { - case 3 /* COMMENT */: - if (!context.ssr) { - // inject import for the Comment symbol, which is needed for creating - // comment nodes with `createVNode` - context.helper(CREATE_COMMENT); - } - break; - case 5 /* INTERPOLATION */: - // no need to traverse, but we need to inject toString helper - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9 /* IF */: - for (let i = 0; i < node.branches.length; i++) { - traverseNode(node.branches[i], context); - } - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - case 1 /* ELEMENT */: - case 0 /* ROOT */: - traverseChildren(node, context); - break; - } - // exit transforms - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); + if (!context.currentNode) { + return; + } else { + node = context.currentNode; } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } } function createStructuralDirectiveTransform(name, fn) { - const matches = shared.isString(name) - ? (n) => n === name - : (n) => name.test(n); - return (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const { props } = node; - // structural directive transforms are not concerned with slots - // as they are handled separately in vSlot.ts - if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) { - // structural directives are removed to avoid infinite recursion - // also we remove them *before* applying so that it can further - // traverse itself in case it moves the node around - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) - exitFns.push(onExit); - } - } - return exitFns; + const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) + exitFns.push(onExit); } - }; + } + return exitFns; + } + }; } const PURE_ANNOTATION = `/*#__PURE__*/`; const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap: sourceMap$1 = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) { - const context = { - mode, - prefixIdentifiers, - sourceMap: sourceMap$1, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.loc.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: undefined, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, node) { - context.code += code; - if (context.map) { - if (node) { - let name; - if (node.type === 4 /* SIMPLE_EXPRESSION */ && !node.isStatic) { - const content = node.content.replace(/^_ctx\./, ''); - if (content !== node.content && isSimpleIdentifier(content)) { - name = content; - } - } - addMapping(node.loc.start, name); - } - advancePositionWithMutation(context, code); - if (node && node.loc !== locStub) { - addMapping(node.loc.end); - } +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + if (context.map) { + if (node) { + let name; + if (node.type === 4 && !node.isStatic) { + const content = node.content.replace(/^_ctx\./, ""); + if (content !== node.content && isSimpleIdentifier(content)) { + name = content; } - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } - else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); + } + addMapping(node.loc.start, name); } - }; - function newline(n) { - context.push('\n' + ` `.repeat(n)); - } - function addMapping(loc, name) { - context.map.addMapping({ - name, - source: context.filename, - original: { - line: loc.line, - column: loc.column - 1 // source-map column is 0 based - }, - generated: { - line: context.line, - column: context.column - 1 + if (newlineIndex === -3 /* Unknown */) { + advancePositionWithMutation(context, code); + } else { + context.offset += code.length; + if (newlineIndex === -2 /* None */) { + context.column += code.length; + } else { + if (newlineIndex === -1 /* End */) { + newlineIndex = code.length - 1; } - }); + context.line++; + context.column = code.length - newlineIndex; + } + } + if (node && node.loc !== locStub) { + addMapping(node.loc.end); + } + } + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); } - if (sourceMap$1) { - // lazy require source-map implementation, only in non-browser builds - context.map = new sourceMap.SourceMapGenerator(); - context.map.setSourceContent(filename, context.source); - } - return context; + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + function addMapping(loc, name = null) { + const { _names, _mappings } = context.map; + if (name !== null && !_names.has(name)) + _names.add(name); + _mappings.add({ + originalLine: loc.line, + originalColumn: loc.column - 1, + // source-map column is 0 based + generatedLine: context.line, + generatedColumn: context.column - 1, + source: filename, + // @ts-expect-error it is possible to be null + name + }); + } + if (sourceMap) { + context.map = new sourceMapJs.SourceMapGenerator(); + context.map.setSourceContent(filename, context.source); + context.map._sources.add(filename); + } + return context; } function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) - options.onContextCreated(context); - const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context; - const hasHelpers = ast.helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== 'module'; - const genScopeId = scopeId != null && mode === 'module'; - const isSetupInlined = !!options.inline; - // preambles - // in setup() inline mode, the preamble is generated in a sub context - // and returned separately. - const preambleContext = isSetupInlined - ? createCodegenContext(ast, options) - : context; - if (mode === 'module') { - genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); - } - else { - genFunctionPreamble(ast, preambleContext); - } - // enter render function - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache']; - if (options.bindingMetadata && !options.inline) { - // binding optimization args - args.push('$props', '$setup', '$data', '$options'); - } - const signature = options.isTS - ? args.map(arg => `${arg}: any`).join(',') - : args.join(', '); - if (isSetupInlined) { - push(`(${signature}) => {`); - } - else { - push(`function ${functionName}(${signature}) {`); - } + const context = createCodegenContext(ast, options); + if (options.onContextCreated) + options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const genScopeId = scopeId != null && mode === "module"; + const isSetupInlined = !!options.inline; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + if (mode === "module") { + genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); + } else { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + if (options.bindingMetadata && !options.inline) { + args.push("$props", "$setup", "$data", "$options"); + } + const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); + if (isSetupInlined) { + push(`(${signature}) => {`); + } else { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - // function mode const declarations should be inside with block - // also they should be renamed to avoid collision with user properties - if (hasHelpers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`); - push(`\n`); - newline(); - } + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); } - // generate asset resolution statements - if (ast.components.length) { - genAssets(ast.components, 'component', context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, 'directive', context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, 'filter', context); - newline(); + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } + newline(); } - if (ast.components.length || ast.directives.length || ast.temps) { - push(`\n`); - newline(); - } - // generate the VNode tree expression - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } - else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { deindent(); push(`}`); - return { - ast, - code: context.code, - preamble: isSetupInlined ? preambleContext.code : ``, - // SourceMapGenerator does have toJSON() method but it's not in the types - map: context.map ? context.map.toJSON() : undefined - }; + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; } function genFunctionPreamble(ast, context) { - const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context; - const VueBinding = ssr - ? `require(${JSON.stringify(runtimeModuleName)})` - : runtimeGlobalName; - // Generate const declaration for helpers - // In prefix mode, we place the const declaration at top so it's done - // only once; But if we not prefixing, we place the declaration inside the - // with block so it doesn't incur the `in` check cost for every helper access. - if (ast.helpers.length > 0) { - if (prefixIdentifiers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = ${VueBinding}\n`); - } - else { - // "with" mode. - // save Vue in a separate variable to avoid collision - push(`const _Vue = ${VueBinding}\n`); - // in "with" mode, helpers are declared inside the with block to avoid - // has check cost, but hoists are lifted out of the function - we need - // to provide the helper here. - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ] - .filter(helper => ast.helpers.includes(helper)) - .map(aliasHelper) - .join(', '); - push(`const { ${staticHelpers} } = _Vue\n`); - } - } + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + if (prefixIdentifiers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} +`, + -1 /* End */ + ); + } else { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } } - // generate variables for ssr helpers - if (ast.ssrHelpers && ast.ssrHelpers.length) { - // ssr guarantees prefixIdentifier: true - push(`const { ${ast.ssrHelpers - .map(aliasHelper) - .join(', ')} } = require("${ssrRuntimeModuleName}")\n`); - } - genHoists(ast.hoists, context); - newline(); - push(`return `); + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") +`, + -1 /* End */ + ); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); } function genModulePreamble(ast, context, genScopeId, inline) { - const { push, newline, optimizeImports, runtimeModuleName, ssrRuntimeModuleName } = context; - if (genScopeId && ast.hoists.length) { - ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID); + const { + push, + newline, + optimizeImports, + runtimeModuleName, + ssrRuntimeModuleName + } = context; + if (genScopeId && ast.hoists.length) { + ast.helpers.add(PUSH_SCOPE_ID); + ast.helpers.add(POP_SCOPE_ID); + } + if (ast.helpers.size) { + const helpers = Array.from(ast.helpers); + if (optimizeImports) { + push( + `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + push( + ` +// Binding optimization for webpack code-split +const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} +`, + -1 /* End */ + ); + } else { + push( + `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); } - // generate import statements for helpers - if (ast.helpers.length) { - if (optimizeImports) { - // when bundled with webpack with code-split, calling an import binding - // as a function leads to it being wrapped with `Object(a.b)` or `(0,a.b)`, - // incurring both payload size increase and potential perf overhead. - // therefore we assign the imports to variables (which is a constant ~50b - // cost per-component instead of scaling with template size) - push(`import { ${ast.helpers - .map(s => helperNameMap[s]) - .join(', ')} } from ${JSON.stringify(runtimeModuleName)}\n`); - push(`\n// Binding optimization for webpack code-split\nconst ${ast.helpers - .map(s => `_${helperNameMap[s]} = ${helperNameMap[s]}`) - .join(', ')}\n`); - } - else { - push(`import { ${ast.helpers - .map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`) - .join(', ')} } from ${JSON.stringify(runtimeModuleName)}\n`); - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push(`import { ${ast.ssrHelpers - .map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`) - .join(', ')} } from "${ssrRuntimeModuleName}"\n`); - } - if (ast.imports.length) { - genImports(ast.imports, context); - newline(); - } - genHoists(ast.hoists, context); + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" +`, + -1 /* End */ + ); + } + if (ast.imports.length) { + genImports(ast.imports, context); newline(); - if (!inline) { - push(`export `); - } + } + genHoists(ast.hoists, context); + newline(); + if (!inline) { + push(`export `); + } } function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper(type === 'filter' - ? RESOLVE_FILTER - : type === 'component' - ? RESOLVE_COMPONENT - : RESOLVE_DIRECTIVE); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - // potential component implicit self-reference inferred from SFC filename - const maybeSelfReference = id.endsWith('__self'); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`); - if (i < assets.length - 1) { - newline(); - } + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } } function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline, helper, scopeId, mode } = context; - const genScopeId = scopeId != null && mode !== 'function'; + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline, helper, scopeId, mode } = context; + const genScopeId = scopeId != null && mode !== "function"; + newline(); + if (genScopeId) { + push( + `const _withScopeId = n => (${helper( + PUSH_SCOPE_ID + )}("${scopeId}"),n=n(),${helper(POP_SCOPE_ID)}(),n)` + ); newline(); - // generate inlined withScopeId helper - if (genScopeId) { - push(`const _withScopeId = n => (${helper(PUSH_SCOPE_ID)}("${scopeId}"),n=n(),${helper(POP_SCOPE_ID)}(),n)`); - newline(); + } + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + const needScopeIdWrapper = genScopeId && exp.type === 13; + push( + `const _hoisted_${i + 1} = ${needScopeIdWrapper ? `${PURE_ANNOTATION} _withScopeId(() => ` : ``}` + ); + genNode(exp, context); + if (needScopeIdWrapper) { + push(`)`); + } + newline(); } - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - const needScopeIdWrapper = genScopeId && exp.type === 13 /* VNODE_CALL */; - push(`const _hoisted_${i + 1} = ${needScopeIdWrapper ? `${PURE_ANNOTATION} _withScopeId(() => ` : ``}`); - genNode(exp, context); - if (needScopeIdWrapper) { - push(`)`); - } - newline(); - } - } - context.pure = false; + } + context.pure = false; } function genImports(importsOptions, context) { - if (!importsOptions.length) { - return; - } - importsOptions.forEach(imports => { - context.push(`import `); - genNode(imports.exp, context); - context.push(` from '${imports.path}'`); - context.newline(); - }); + if (!importsOptions.length) { + return; + } + importsOptions.forEach((imports) => { + context.push(`import `); + genNode(imports.exp, context); + context.push(` from '${imports.path}'`); + context.newline(); + }); } -function isText$1(n) { - return (shared.isString(n) || - n.type === 4 /* SIMPLE_EXPRESSION */ || - n.type === 2 /* TEXT */ || - n.type === 5 /* INTERPOLATION */ || - n.type === 8 /* COMPOUND_EXPRESSION */); +function isText(n) { + return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; } function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || - (nodes.some(n => shared.isArray(n) || !isText$1(n))); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); + const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); } function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (shared.isString(node)) { - push(node); - } - else if (shared.isArray(node)) { - genNodeListAsArray(node, context); - } - else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(','); - newline(); - } - else { - comma && push(', '); - } - } + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (shared.isString(node)) { + push(node, -3 /* Unknown */); + } else if (shared.isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } } function genNode(node, context) { - if (shared.isString(node)) { - context.push(node); - return; - } - if (shared.isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1 /* ELEMENT */: - case 9 /* IF */: - case 11 /* FOR */: - assert(node.codegenNode != null, `Codegen node is missing for element/if/for node. ` + - `Apply appropriate transforms first.`); - genNode(node.codegenNode, context); - break; - case 2 /* TEXT */: - genText(node, context); - break; - case 4 /* SIMPLE_EXPRESSION */: - genExpression(node, context); - break; - case 5 /* INTERPOLATION */: - genInterpolation(node, context); - break; - case 12 /* TEXT_CALL */: - genNode(node.codegenNode, context); - break; - case 8 /* COMPOUND_EXPRESSION */: - genCompoundExpression(node, context); - break; - case 3 /* COMMENT */: - genComment(node, context); - break; - case 13 /* VNODE_CALL */: - genVNodeCall(node, context); - break; - case 14 /* JS_CALL_EXPRESSION */: - genCallExpression(node, context); - break; - case 15 /* JS_OBJECT_EXPRESSION */: - genObjectExpression(node, context); - break; - case 17 /* JS_ARRAY_EXPRESSION */: - genArrayExpression(node, context); - break; - case 18 /* JS_FUNCTION_EXPRESSION */: - genFunctionExpression(node, context); - break; - case 19 /* JS_CONDITIONAL_EXPRESSION */: - genConditionalExpression(node, context); - break; - case 20 /* JS_CACHE_EXPRESSION */: - genCacheExpression(node, context); - break; - case 21 /* JS_BLOCK_STATEMENT */: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22 /* JS_TEMPLATE_LITERAL */: - genTemplateLiteral(node, context); - break; - case 23 /* JS_IF_STATEMENT */: - genIfStatement(node, context); - break; - case 24 /* JS_ASSIGNMENT_EXPRESSION */: - genAssignmentExpression(node, context); - break; - case 25 /* JS_SEQUENCE_EXPRESSION */: - genSequenceExpression(node, context); - break; - case 26 /* JS_RETURN_STATEMENT */: - genReturnStatement(node, context); - break; - /* istanbul ignore next */ - case 10 /* IF_BRANCH */: - // noop - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - // make sure we exhaust all possible types - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } + if (shared.isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (shared.isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + case 22: + genTemplateLiteral(node, context); + break; + case 23: + genIfStatement(node, context); + break; + case 24: + genAssignmentExpression(node, context); + break; + case 25: + genSequenceExpression(node, context); + break; + case 26: + genReturnStatement(node, context); + break; + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } } function genText(node, context) { - context.push(JSON.stringify(node.content), node); + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); } function genExpression(node, context) { - const { content, isStatic } = node; - context.push(isStatic ? JSON.stringify(content) : content, node); + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); } function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) - push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); + const { push, helper, pure } = context; + if (pure) + push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); } function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (shared.isString(child)) { - context.push(child); - } - else { - genNode(child, context); - } + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (shared.isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); } + } } function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8 /* COMPOUND_EXPRESSION */) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } - else if (node.isStatic) { - // only quote keys if necessary - const text = isSimpleIdentifier(node.content) - ? node.content - : JSON.stringify(node.content); - push(text, node); - } - else { - push(`[${node.content}]`, node); - } + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } } function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node); + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); } function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node; - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock - ? getVNodeBlockHelper(context.inSSR, isComponent) - : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, node); - genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context); + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlag, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } } function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) - break; - } - return args.slice(0, i + 1).map(arg => arg || `null`); + let i = args.length; + while (i--) { + if (args[i] != null) + break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); } -// JavaScript function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = shared.isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, node); - genNodeList(node.arguments, context); - push(`)`); + const { push, helper, pure } = context; + const callee = shared.isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); } function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, node); - return; + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); } - const multilines = properties.length > 1 || - (properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */)); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - // key - genExpressionAsPropertyKey(key, context); - push(`: `); - // value - genNode(value, context); - if (i < properties.length - 1) { - // will only reach this if it's multilines - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); + } + multilines && deindent(); + push(multilines ? `}` : ` }`); } function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); + genNodeListAsArray(node.elements, context); } function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - // wrap slot functions with owner context - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, node); - if (shared.isArray(params)) { - genNodeList(params, context); - } - else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (shared.isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } - } - else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4 /* SIMPLE_EXPRESSION */) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } - else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent(true /* without newline */); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - push(`_cache[${node.index}] || (`); - if (node.isVNode) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1),`); - newline(); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (node.isVNode) { - push(`,`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); -} -function genTemplateLiteral(node, context) { - const { push, indent, deindent } = context; - push('`'); - const l = node.elements.length; - const multilines = l > 3; - for (let i = 0; i < l; i++) { - const e = node.elements[i]; - if (shared.isString(e)) { - push(e.replace(/(`|\$|\\)/g, '\\$1')); - } - else { - push('${'); - if (multilines) - indent(); - genNode(e, context); - if (multilines) - deindent(); - push('}'); - } - } - push('`'); -} -function genIfStatement(node, context) { - const { push, indent, deindent } = context; - const { test, consequent, alternate } = node; - push(`if (`); - genNode(test, context); - push(`) {`); + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (shared.isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); indent(); - genNode(consequent, context); + } + if (returns) { + if (newline) { + push(`return `); + } + if (shared.isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { deindent(); push(`}`); - if (alternate) { - push(` else `); - if (alternate.type === 23 /* JS_IF_STATEMENT */) { - genIfStatement(alternate, context); - } - else { - push(`{`); - indent(); - genNode(alternate, context); - deindent(); - push(`}`); - } + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); } + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + push(`_cache[${node.index}] || (`); + if (node.isVNode) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1),`); + newline(); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (node.isVNode) { + push(`,`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); +} +function genTemplateLiteral(node, context) { + const { push, indent, deindent } = context; + push("`"); + const l = node.elements.length; + const multilines = l > 3; + for (let i = 0; i < l; i++) { + const e = node.elements[i]; + if (shared.isString(e)) { + push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); + } else { + push("${"); + if (multilines) + indent(); + genNode(e, context); + if (multilines) + deindent(); + push("}"); + } + } + push("`"); +} +function genIfStatement(node, context) { + const { push, indent, deindent } = context; + const { test, consequent, alternate } = node; + push(`if (`); + genNode(test, context); + push(`) {`); + indent(); + genNode(consequent, context); + deindent(); + push(`}`); + if (alternate) { + push(` else `); + if (alternate.type === 23) { + genIfStatement(alternate, context); + } else { + push(`{`); + indent(); + genNode(alternate, context); + deindent(); + push(`}`); + } + } } function genAssignmentExpression(node, context) { - genNode(node.left, context); - context.push(` = `); - genNode(node.right, context); + genNode(node.left, context); + context.push(` = `); + genNode(node.right, context); } function genSequenceExpression(node, context) { - context.push(`(`); - genNodeList(node.expressions, context); - context.push(`)`); + context.push(`(`); + genNodeList(node.expressions, context); + context.push(`)`); } function genReturnStatement({ returns }, context) { - context.push(`return `); - if (shared.isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } + context.push(`return `); + if (shared.isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } } -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = Object.create(null)) { - const rootExp = root.type === 'Program' && - root.body[0].type === 'ExpressionStatement' && - root.body[0].expression; - estreeWalker.walk(root, { - enter(node, parent) { - parent && parentStack.push(parent); - if (parent && - parent.type.startsWith('TS') && - parent.type !== 'TSAsExpression' && - parent.type !== 'TSNonNullExpression' && - parent.type !== 'TSTypeAssertion') { - return this.skip(); - } - if (node.type === 'Identifier') { - const isLocal = !!knownIds[node.name]; - const isRefed = isReferencedIdentifier(node, parent, parentStack); - if (includeAll || (isRefed && !isLocal)) { - onIdentifier(node, parent, parentStack, isRefed, isLocal); - } - } - else if (node.type === 'ObjectProperty' && - parent.type === 'ObjectPattern') { - node.inPattern = true; - } - else if (isFunctionType(node)) { - // walk function expressions and add its arguments to known identifiers - // so that we don't prefix them - walkFunctionParams(node, id => markScopeIdentifier(node, id, knownIds)); - } - else if (node.type === 'BlockStatement') { - // #3445 record block-level local variables - walkBlockDeclarations(node, id => markScopeIdentifier(node, id, knownIds)); - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if (node !== rootExp && node.scopeIds) { - for (const id of node.scopeIds) { - knownIds[id]--; - if (knownIds[id] === 0) { - delete knownIds[id]; - } - } - } - } - }); -} -function isReferencedIdentifier(id, parent, parentStack) { - if (!parent) { - return true; - } - // is a special keyword but parsed as identifier - if (id.name === 'arguments') { - return false; - } - if (isReferenced(id, parent)) { - return true; - } - // babel's isReferenced check returns false for ids being assigned to, so we - // need to cover those cases here - switch (parent.type) { - case 'AssignmentExpression': - case 'AssignmentPattern': - return true; - case 'ObjectPattern': - case 'ArrayPattern': - return isInDestructureAssignment(parent, parentStack); - } - return false; -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && - (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern')) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === 'AssignmentExpression') { - return true; - } - else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) { - break; - } - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === 'VariableDeclaration') { - if (stmt.declare) - continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } - else if (stmt.type === 'FunctionDeclaration' || - stmt.type === 'ClassDeclaration') { - if (stmt.declare || !stmt.id) - continue; - onIdent(stmt.id); - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case 'Identifier': - nodes.push(param); - break; - case 'MemberExpression': - let object = param; - while (object.type === 'MemberExpression') { - object = object.object; - } - nodes.push(object); - break; - case 'ObjectPattern': - for (const prop of param.properties) { - if (prop.type === 'RestElement') { - extractIdentifiers(prop.argument, nodes); - } - else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case 'ArrayPattern': - param.elements.forEach(element => { - if (element) - extractIdentifiers(element, nodes); - }); - break; - case 'RestElement': - extractIdentifiers(param.argument, nodes); - break; - case 'AssignmentPattern': - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -function markScopeIdentifier(node, child, knownIds) { - const { name } = child; - if (node.scopeIds && node.scopeIds.has(name)) { - return; - } - if (name in knownIds) { - knownIds[name]++; - } - else { - knownIds[name] = 1; - } - (node.scopeIds || (node.scopeIds = new Set())).add(name); -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && - (node.type === 'ObjectProperty' || node.type === 'ObjectMethod') && - !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; -/** - * Copied from https://github.com/babel/babel/blob/main/packages/babel-types/src/validators/isReferenced.ts - * To avoid runtime dependency on @babel/types (which includes process references) - * This file should not change very often in babel but we may need to keep it - * up-to-date from time to time. - * - * https://github.com/babel/babel/blob/main/LICENSE - * - */ -function isReferenced(node, parent, grandparent) { - switch (parent.type) { - // yes: PARENT[NODE] - // yes: NODE.child - // no: parent.NODE - case 'MemberExpression': - case 'OptionalMemberExpression': - if (parent.property === node) { - return !!parent.computed; - } - return parent.object === node; - case 'JSXMemberExpression': - return parent.object === node; - // no: let NODE = init; - // yes: let id = NODE; - case 'VariableDeclarator': - return parent.init === node; - // yes: () => NODE - // no: (NODE) => {} - case 'ArrowFunctionExpression': - return parent.body === node; - // no: class { #NODE; } - // no: class { get #NODE() {} } - // no: class { #NODE() {} } - // no: class { fn() { return this.#NODE; } } - case 'PrivateName': - return false; - // no: class { NODE() {} } - // yes: class { [NODE]() {} } - // no: class { foo(NODE) {} } - case 'ClassMethod': - case 'ClassPrivateMethod': - case 'ObjectMethod': - if (parent.key === node) { - return !!parent.computed; - } - return false; - // yes: { [NODE]: "" } - // no: { NODE: "" } - // depends: { NODE } - // depends: { key: NODE } - case 'ObjectProperty': - if (parent.key === node) { - return !!parent.computed; - } - // parent.value === node - return !grandparent || grandparent.type !== 'ObjectPattern'; - // no: class { NODE = value; } - // yes: class { [NODE] = value; } - // yes: class { key = NODE; } - case 'ClassProperty': - if (parent.key === node) { - return !!parent.computed; - } - return true; - case 'ClassPrivateProperty': - return parent.key !== node; - // no: class NODE {} - // yes: class Foo extends NODE {} - case 'ClassDeclaration': - case 'ClassExpression': - return parent.superClass === node; - // yes: left = NODE; - // no: NODE = right; - case 'AssignmentExpression': - return parent.right === node; - // no: [NODE = foo] = []; - // yes: [foo = NODE] = []; - case 'AssignmentPattern': - return parent.right === node; - // no: NODE: for (;;) {} - case 'LabeledStatement': - return false; - // no: try {} catch (NODE) {} - case 'CatchClause': - return false; - // no: function foo(...NODE) {} - case 'RestElement': - return false; - case 'BreakStatement': - case 'ContinueStatement': - return false; - // no: function NODE() {} - // no: function foo(NODE) {} - case 'FunctionDeclaration': - case 'FunctionExpression': - return false; - // no: export NODE from "foo"; - // no: export * as NODE from "foo"; - case 'ExportNamespaceSpecifier': - case 'ExportDefaultSpecifier': - return false; - // no: export { foo as NODE }; - // yes: export { NODE as foo }; - // no: export { NODE as foo } from "foo"; - case 'ExportSpecifier': - // @ts-expect-error - if (grandparent === null || grandparent === void 0 ? void 0 : grandparent.source) { - return false; - } - return parent.local === node; - // no: import NODE from "foo"; - // no: import * as NODE from "foo"; - // no: import { NODE as foo } from "foo"; - // no: import { foo as NODE } from "foo"; - // no: import NODE from "bar"; - case 'ImportDefaultSpecifier': - case 'ImportNamespaceSpecifier': - case 'ImportSpecifier': - return false; - // no: import "foo" assert { NODE: "json" } - case 'ImportAttribute': - return false; - // no: <div NODE="foo" /> - case 'JSXAttribute': - return false; - // no: [NODE] = []; - // no: ({ NODE }) = []; - case 'ObjectPattern': - case 'ArrayPattern': - return false; - // no: new.NODE - // no: NODE.target - case 'MetaProperty': - return false; - // yes: type X = { someProperty: NODE } - // no: type X = { NODE: OtherType } - case 'ObjectTypeProperty': - return parent.key !== node; - // yes: enum X { Foo = NODE } - // no: enum X { NODE } - case 'TSEnumMember': - return parent.id !== node; - // yes: { [NODE]: value } - // no: { NODE: value } - case 'TSPropertySignature': - if (parent.key === node) { - return !!parent.computed; - } - return true; - } - return true; -} - -const isLiteralWhitelisted = /*#__PURE__*/ shared.makeMap('true,false,null,this'); +const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this"); +const constantBailRE = /\w\s*\(|\.[^\d]/; const transformExpression = (node, context) => { - if (node.type === 5 /* INTERPOLATION */) { - node.content = processExpression(node.content, context); - } - else if (node.type === 1 /* ELEMENT */) { - // handle directives on element - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - // do not process for v-on & v-for since they are special handled - if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') { - const exp = dir.exp; - const arg = dir.arg; - // do not process exp if this is v-on:arg - we need special handling - // for wrapping inline statements. - if (exp && - exp.type === 4 /* SIMPLE_EXPRESSION */ && - !(dir.name === 'on' && arg)) { - dir.exp = processExpression(exp, context, - // slot args must be processed as function params - dir.name === 'slot'); - } - if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg)) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } } + } }; -// Important: since this function uses Node.js only dependencies, it should -// always be used with a leading !false check so that it can be -// tree-shaken from the browser build. -function processExpression(node, context, -// some expressions like v-slot props & v-for aliases should be parsed as -// function params -asParams = false, -// v-on handler values may contain multiple statements -asRawStatements = false, localVars = Object.create(context.identifiers)) { - if (!context.prefixIdentifiers || !node.content.trim()) { - return node; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + if (!context.prefixIdentifiers || !node.content.trim()) { + return node; + } + const { inline, bindingMetadata } = context; + const rewriteIdentifier = (raw, parent, id) => { + const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; + if (inline) { + const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; + const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; + const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); + const isNewExpression = parent && isInNewExpression(parentStack); + const wrapWithUnref = (raw2) => { + const wrapped = `${context.helperString(UNREF)}(${raw2})`; + return isNewExpression ? `(${wrapped})` : wrapped; + }; + if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { + return raw; + } else if (type === "setup-ref") { + return `${raw}.value`; + } else if (type === "setup-maybe-ref") { + return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); + } else if (type === "setup-let") { + if (isAssignmentLVal) { + const { right: rVal, operator } = parent; + const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); + const rExpString = stringifyExpression( + processExpression( + createSimpleExpression(rExp, false), + context, + false, + false, + knownIds + ) + ); + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; + } else if (isUpdateArg) { + id.start = parent.start; + id.end = parent.end; + const { prefix: isPrefix, operator } = parent; + const prefix = isPrefix ? operator : ``; + const postfix = isPrefix ? `` : operator; + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; + } else if (isDestructureAssignment) { + return raw; + } else { + return wrapWithUnref(raw); + } + } else if (type === "props") { + return shared.genPropsAccessExp(raw); + } else if (type === "props-aliased") { + return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]); + } + } else { + if (type && type.startsWith("setup") || type === "literal-const") { + return `$setup.${raw}`; + } else if (type === "props-aliased") { + return `$props['${bindingMetadata.__propsAliases[raw]}']`; + } else if (type) { + return `$${type}.${raw}`; + } } - const { inline, bindingMetadata } = context; - const rewriteIdentifier = (raw, parent, id) => { - const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; - if (inline) { - // x = y - const isAssignmentLVal = parent && parent.type === 'AssignmentExpression' && parent.left === id; - // x++ - const isUpdateArg = parent && parent.type === 'UpdateExpression' && parent.argument === id; - // ({ x } = y) - const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); - if (type === "setup-const" /* SETUP_CONST */ || - type === "setup-reactive-const" /* SETUP_REACTIVE_CONST */ || - localVars[raw]) { - return raw; - } - else if (type === "setup-ref" /* SETUP_REF */) { - return `${raw}.value`; - } - else if (type === "setup-maybe-ref" /* SETUP_MAYBE_REF */) { - // const binding that may or may not be ref - // if it's not a ref, then assignments don't make sense - - // so we ignore the non-ref assignment case and generate code - // that assumes the value to be a ref for more efficiency - return isAssignmentLVal || isUpdateArg || isDestructureAssignment - ? `${raw}.value` - : `${context.helperString(UNREF)}(${raw})`; - } - else if (type === "setup-let" /* SETUP_LET */) { - if (isAssignmentLVal) { - // let binding. - // this is a bit more tricky as we need to cover the case where - // let is a local non-ref value, and we need to replicate the - // right hand side value. - // x = y --> isRef(x) ? x.value = y : x = y - const { right: rVal, operator } = parent; - const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); - const rExpString = stringifyExpression(processExpression(createSimpleExpression(rExp, false), context, false, false, knownIds)); - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore\n` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; - } - else if (isUpdateArg) { - // make id replace parent in the code range so the raw update operator - // is removed - id.start = parent.start; - id.end = parent.end; - const { prefix: isPrefix, operator } = parent; - const prefix = isPrefix ? operator : ``; - const postfix = isPrefix ? `` : operator; - // let binding. - // x++ --> isRef(a) ? a.value++ : a++ - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore\n` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; - } - else if (isDestructureAssignment) { - // TODO - // let binding in a destructure assignment - it's very tricky to - // handle both possible cases here without altering the original - // structure of the code, so we just assume it's not a ref here - // for now - return raw; - } - else { - return `${context.helperString(UNREF)}(${raw})`; - } - } - else if (type === "props" /* PROPS */) { - // use __props which is generated by compileScript so in ts mode - // it gets correct type - return shared.genPropsAccessExp(raw); - } - else if (type === "props-aliased" /* PROPS_ALIASED */) { - // prop with a different local alias (from defineProps() destructure) - return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]); - } - } - else { - if (type && type.startsWith('setup')) { - // setup bindings in non-inline mode - return `$setup.${raw}`; - } - else if (type === "props-aliased" /* PROPS_ALIASED */) { - return `$props['${bindingMetadata.__propsAliases[raw]}']`; - } - else if (type) { - return `$${type}.${raw}`; - } - } - // fallback to ctx - return `_ctx.${raw}`; - }; - // fast path if expression is a simple identifier. - const rawExp = node.content; - // bail constant on parens (function invocation) and dot (member access) - const bailConstant = rawExp.indexOf(`(`) > -1 || rawExp.indexOf('.') > 0; - if (isSimpleIdentifier(rawExp)) { - const isScopeVarReference = context.identifiers[rawExp]; - const isAllowedGlobal = shared.isGloballyWhitelisted(rawExp); - const isLiteral = isLiteralWhitelisted(rawExp); - if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) { - // const bindings exposed from setup can be skipped for patching but - // cannot be hoisted to module scope - if (bindingMetadata[node.content] === "setup-const" /* SETUP_CONST */) { - node.constType = 1 /* CAN_SKIP_PATCH */; - } - node.content = rewriteIdentifier(rawExp); - } - else if (!isScopeVarReference) { - if (isLiteral) { - node.constType = 3 /* CAN_STRINGIFY */; - } - else { - node.constType = 2 /* CAN_HOIST */; - } - } - return node; + return `_ctx.${raw}`; + }; + const rawExp = node.content; + const bailConstant = constantBailRE.test(rawExp); + let ast = node.ast; + if (ast === false) { + return node; + } + if (ast === null || !ast && isSimpleIdentifier(rawExp)) { + const isScopeVarReference = context.identifiers[rawExp]; + const isAllowedGlobal = shared.isGloballyAllowed(rawExp); + const isLiteral = isLiteralWhitelisted(rawExp); + if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { + if (isConst(bindingMetadata[rawExp])) { + node.constType = 1; + } + node.content = rewriteIdentifier(rawExp); + } else if (!isScopeVarReference) { + if (isLiteral) { + node.constType = 3; + } else { + node.constType = 2; + } } - let ast; - // exp needs to be parsed differently: - // 1. Multiple inline statements (v-on, with presence of `;`): parse as raw - // exp, but make sure to pad with spaces for consistent ranges - // 2. Expressions: wrap with parens (for e.g. object expressions) - // 3. Function arguments (v-for, v-slot): place in a function argument position - const source = asRawStatements - ? ` ${rawExp} ` - : `(${rawExp})${asParams ? `=>{}` : ``}`; + return node; + } + if (!ast) { + const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; try { - ast = parser.parse(source, { - plugins: context.expressionPlugins - }).program; + ast = parser.parse(source, { + plugins: context.expressionPlugins + }).program; + } catch (e) { + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + e.message + ) + ); + return node; } - catch (e) { - context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, e.message)); - return node; + } + const ids = []; + const parentStack = []; + const knownIds = Object.create(context.identifiers); + walkIdentifiers( + ast, + (node2, parent, _, isReferenced, isLocal) => { + if (isStaticPropertyKey(node2, parent)) { + return; + } + if (node2.name.startsWith("_filter_")) { + return; + } + const needPrefix = isReferenced && canPrefix(node2); + if (needPrefix && !isLocal) { + if (isStaticProperty(parent) && parent.shorthand) { + node2.prefix = `${node2.name}: `; + } + node2.name = rewriteIdentifier(node2.name, parent, node2); + ids.push(node2); + } else { + if (!(needPrefix && isLocal) && !bailConstant) { + node2.isConstant = true; + } + ids.push(node2); + } + }, + true, + // invoke on ALL identifiers + parentStack, + knownIds + ); + const children = []; + ids.sort((a, b) => a.start - b.start); + ids.forEach((id, i) => { + const start = id.start - 1; + const end = id.end - 1; + const last = ids[i - 1]; + const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); + if (leadingText.length || id.prefix) { + children.push(leadingText + (id.prefix || ``)); } - const ids = []; - const parentStack = []; - const knownIds = Object.create(context.identifiers); - walkIdentifiers(ast, (node, parent, _, isReferenced, isLocal) => { - if (isStaticPropertyKey(node, parent)) { - return; - } - // v2 wrapped filter call - if (node.name.startsWith('_filter_')) { - return; - } - const needPrefix = isReferenced && canPrefix(node); - if (needPrefix && !isLocal) { - if (isStaticProperty(parent) && parent.shorthand) { - node.prefix = `${node.name}: `; - } - node.name = rewriteIdentifier(node.name, parent, node); - ids.push(node); - } - else { - // The identifier is considered constant unless it's pointing to a - // local scope variable (a v-for alias, or a v-slot prop) - if (!(needPrefix && isLocal) && !bailConstant) { - node.isConstant = true; - } - // also generate sub-expressions for other identifiers for better - // source map support. (except for property keys which are static) - ids.push(node); - } - }, true, // invoke on ALL identifiers - parentStack, knownIds); - // We break up the compound expression into an array of strings and sub - // expressions (for identifiers that have been prefixed). In codegen, if - // an ExpressionNode has the `.children` property, it will be used instead of - // `.content`. - const children = []; - ids.sort((a, b) => a.start - b.start); - ids.forEach((id, i) => { - // range is offset by -1 due to the wrapping parens when parsed - const start = id.start - 1; - const end = id.end - 1; - const last = ids[i - 1]; - const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); - if (leadingText.length || id.prefix) { - children.push(leadingText + (id.prefix || ``)); - } - const source = rawExp.slice(start, end); - children.push(createSimpleExpression(id.name, false, { - source, - start: advancePositionWithClone(node.loc.start, source, start), - end: advancePositionWithClone(node.loc.start, source, end) - }, id.isConstant ? 3 /* CAN_STRINGIFY */ : 0 /* NOT_CONSTANT */)); - if (i === ids.length - 1 && end < rawExp.length) { - children.push(rawExp.slice(end)); - } - }); - let ret; - if (children.length) { - ret = createCompoundExpression(children, node.loc); + const source = rawExp.slice(start, end); + children.push( + createSimpleExpression( + id.name, + false, + { + start: advancePositionWithClone(node.loc.start, source, start), + end: advancePositionWithClone(node.loc.start, source, end), + source + }, + id.isConstant ? 3 : 0 + ) + ); + if (i === ids.length - 1 && end < rawExp.length) { + children.push(rawExp.slice(end)); } - else { - ret = node; - ret.constType = bailConstant - ? 0 /* NOT_CONSTANT */ - : 3 /* CAN_STRINGIFY */; - } - ret.identifiers = Object.keys(knownIds); - return ret; + }); + let ret; + if (children.length) { + ret = createCompoundExpression(children, node.loc); + ret.ast = ast; + } else { + ret = node; + ret.constType = bailConstant ? 0 : 3; + } + ret.identifiers = Object.keys(knownIds); + return ret; } function canPrefix(id) { - // skip whitelisted globals - if (shared.isGloballyWhitelisted(id.name)) { - return false; - } - // special case for webpack compilation - if (id.name === 'require') { - return false; - } - return true; + if (shared.isGloballyAllowed(id.name)) { + return false; + } + if (id.name === "require") { + return false; + } + return true; } function stringifyExpression(exp) { - if (shared.isString(exp)) { - return exp; - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - return exp.content; - } - else { - return exp.children - .map(stringifyExpression) - .join(''); - } + if (shared.isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } +} +function isConst(type) { + return type === "setup-const" || type === "literal-const"; } -const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => { +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { return processIf(node, dir, context, (ifNode, branch, isRoot) => { - // #1587: We need to dynamically increment the key based on the current - // node's sibling nodes, since chained v-if/else branches are - // rendered at the same depth - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9 /* IF */) { - key += sibling.branches.length; - } + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; } - // Exit callback. Complete the codegenNode when all children have been - // transformed. - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context); - } - else { - // attach this branch's codegen node to the v-if root. - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context); - } - }; + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processIf(node, dir, context, processCodegen) { - if (dir.name !== 'else' && - (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc)); - dir.exp = createSimpleExpression(`true`, false, loc); + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (context.prefixIdentifiers && dir.exp) { + dir.exp = processExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: node.loc, + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); } - if (context.prefixIdentifiers && dir.exp) { - // dir.exp can only be simple expression because vIf transform is applied - // before expression transform. - dir.exp = processExpression(dir.exp, context); - } - if (dir.name === 'if') { + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); const branch = createIfBranch(node, dir); - const ifNode = { - type: 9 /* IF */, - loc: node.loc, - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; } - } - else { - // locate the adjacent v-if - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3 /* COMMENT */) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && - sibling.type === 2 /* TEXT */ && - !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9 /* IF */) { - // Check if v-else was followed by v-else-if - if (dir.name === 'else-if' && - sibling.branches[sibling.branches.length - 1].condition === undefined) { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - // move the node to the if node's branches - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && - // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && - context.parent.type === 1 /* ELEMENT */ && - isBuiltInType(context.parent.tag, 'transition'))) { - branch.children = [...comments, ...branch.children]; - } - // check if user is forcing same key on different branches - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc)); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - // since the branch was removed, it will not be traversed. - // make sure to traverse here. - traverseNode(branch, context); - // call on exit - if (onExit) - onExit(); - // make sure to reset currentNode after traversal to indicate this - // node has been removed. - context.currentNode = null; - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - break; + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) + onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; } + } } function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3 /* TEMPLATE */; - return { - type: 10 /* IF_BRANCH */, - loc: node.loc, - condition: dir.name === 'else' ? undefined : dir.exp, - children: isTemplateIf && !findDir(node, 'for') ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; } function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - 'true' - ])); - } - else { - return createChildrenCodegenNode(branch, keyIndex, context); - } + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } } function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */)); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11 /* FOR */) { - // optimize away nested fragments when child is a ForNode - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } - else { - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = shared.PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (!branch.isTemplateIf && - children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${shared.PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, false, false /* isComponent */, branch.loc); - } + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + let patchFlagText = shared.PatchFlagNames[64]; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${shared.PatchFlagNames[2048]}`; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + false, + false, + branch.loc + ); } - else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - // Change createVNode to createBlock. - if (vnodeCall.type === 13 /* VNODE_CALL */) { - makeBlock(vnodeCall, context); - } - // inject branch key - injectProp(vnodeCall, keyProperty, context); - return ret; + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); } + injectProp(vnodeCall, keyProperty, context); + return ret; + } } function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; } - if (a.type === 6 /* ATTRIBUTE */) { - if (a.value.content !== b.value.content) { - return false; - } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; } - else { - // directive - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 /* SIMPLE_EXPRESSION */ || - exp.isStatic !== branchExp.isStatic || - exp.content !== branchExp.content) { - return false; - } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; } - return true; + } + return true; } function getParentCondition(node) { - while (true) { - if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - node = node.alternate; - } - else { - return node; - } - } - else if (node.type === 20 /* JS_CACHE_EXPRESSION */) { - node = node.value; - } + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; } + } } -const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => { +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { const { helper, removeHelper } = context; - return processFor(node, dir, context, forNode => { - // create the loop render function expression now, and add the - // iterator on exit after all children have been traversed - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, 'memo'); - const keyProp = findProp(node, `key`); - const keyExp = keyProp && - (keyProp.type === 6 /* ATTRIBUTE */ - ? createSimpleExpression(keyProp.value.content, true) - : keyProp.exp); - const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`); + const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp); + const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + if (isTemplate) { + if (memo) { + memo.exp = processExpression( + memo.exp, + context + ); + } + if (keyProperty && keyProp.type !== 6) { + keyProperty.value = processExpression( + keyProperty.value, + context + ); + } + } + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag + (` /* ${shared.PatchFlagNames[fragmentFlag]} */` ), + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; if (isTemplate) { - // #2085 / #5288 process :key and v-memo expressions need to be - // processed on `<template v-for>`. In this case the node is discarded - // and never traversed so its binding expressions won't be processed - // by the normal transforms. - if (memo) { - memo.exp = processExpression(memo.exp, context); - } - if (keyProperty && keyProp.type !== 6 /* ATTRIBUTE */) { - keyProperty.value = processExpression(keyProperty.value, context); + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } } + }); } - const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ && - forNode.source.constType > 0 /* NOT_CONSTANT */; - const fragmentFlag = isStableFragment - ? 64 /* STABLE_FRAGMENT */ - : keyProp - ? 128 /* KEYED_FRAGMENT */ - : 256 /* UNKEYED_FRAGMENT */; - forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag + - (` /* ${shared.PatchFlagNames[fragmentFlag]} */` ), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc); - return () => { - // finish the codegen now that all children have been traversed - let childBlock; - const { children } = forNode; - // check <template v-for> key placement - if (isTemplate) { - node.children.some(c => { - if (c.type === 1 /* ELEMENT */) { - const key = findProp(c, 'key'); - if (key) { - context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc)); - return true; - } - } - }); + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64 + (` /* ${shared.PatchFlagNames[64]} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */; - const slotOutlet = isSlotOutlet(node) - ? node - : isTemplate && - node.children.length === 1 && - isSlotOutlet(node.children[0]) - ? node.children[0] // api-extractor somehow fails to infer this - : null; - if (slotOutlet) { - // <slot v-for="..."> or <template v-for="..."><slot/></template> - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - // <template v-for="..." :key="..."><slot/></template> - // we need to inject the key to the renderSlot() call. - // the props for renderSlot is passed as the 3rd argument. - injectProp(childBlock, keyProperty, context); - } - } - else if (needFragmentWrapper) { - // <template v-for="..."> with text or multi-elements - // should generate a fragment block for each loop - childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ + - (` /* ${shared.PatchFlagNames[64 /* STABLE_FRAGMENT */]} */` - ), undefined, undefined, true, undefined, false /* isComponent */); - } - else { - // Normal element v-for. Directly use the child's codegenNode - // but mark it as a block. - childBlock = children[0] - .codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - // switch from block to vnode - removeHelper(OPEN_BLOCK); - removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - // switch from vnode to block - removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ])); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...(keyExp ? [` && _cached.key === `, keyExp] : []), - ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++))); - } - else { - renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */)); - } - }; + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached++)) + ); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc)); - return; - } - const parseResult = parseForExpression( - // can only be simple expression because vFor transform is applied - // before expression transform. - dir.exp, context); - if (!parseResult) { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc)); - return; - } - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11 /* FOR */, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - // bookkeeping - scopes.vFor++; + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + if (context.prefixIdentifiers) { + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + } + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; if (context.prefixIdentifiers) { - // scope management - // inject identifiers to context - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); } - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (context.prefixIdentifiers) { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - } - if (onExit) - onExit(); - }; + if (onExit) + onExit(); + }; } -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -// This regex doesn't cover the case if key or index aliases have destructuring, -// but those do not make sense in the first place, so this works in practice. -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input, context) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) - return; - const [, LHS, RHS] = inMatch; - const result = { - source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: undefined, - key: undefined, - index: undefined - }; - if (context.prefixIdentifiers) { - result.source = processExpression(result.source, context); +function finalizeForParseResult(result, context) { + if (result.finalized) + return; + if (context.prefixIdentifiers) { + result.source = processExpression( + result.source, + context + ); + if (result.key) { + result.key = processExpression( + result.key, + context, + true + ); } - let valueContent = LHS.trim().replace(stripParensRE, '').trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, '').trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(loc, keyContent, keyOffset); - if (context.prefixIdentifiers) { - result.key = processExpression(result.key, context, true); - } - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key - ? keyOffset + keyContent.length - : trimmedOffset + valueContent.length)); - if (context.prefixIdentifiers) { - result.index = processExpression(result.index, context, true); - } - } - } + if (result.index) { + result.index = processExpression( + result.index, + context, + true + ); } - if (valueContent) { - result.value = createAliasExpression(loc, valueContent, trimmedOffset); - if (context.prefixIdentifiers) { - result.value = processExpression(result.value, context, true); - } + if (result.value) { + result.value = processExpression( + result.value, + context, + true + ); } - return result; -} -function createAliasExpression(range, content, offset) { - return createSimpleExpression(content, false, getInnerRange(range, offset, content.length)); + } + result.finalized = true; } function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); + return createParamsList([value, key, index, ...memoArgs]); } function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) - break; - } - return args - .slice(0, i + 1) - .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false)); + let i = args.length; + while (i--) { + if (args[i]) + break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); } const defaultFallback = createSimpleExpression(`undefined`, false); -// A NodeTransform that: -// 1. Tracks scope identifiers for scoped slots so that they don't get prefixed -// by transformExpression. This is only applied in non-browser builds with -// { prefixIdentifiers: true }. -// 2. Track v-slot depths so that we know a slot is inside another slot. -// Note the exit callback is executed before buildSlots() on the same node, -// so only nested slots see positive numbers. const trackSlotScopes = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 1 /* COMPONENT */ || - node.tagType === 3 /* TEMPLATE */)) { - // We are only checking non-empty v-slot here - // since we only care about slots that introduce scope variables. - const vSlot = findDir(node, 'slot'); - if (vSlot) { - const slotProps = vSlot.exp; - if (context.prefixIdentifiers) { - slotProps && context.addIdentifiers(slotProps); - } - context.scopes.vSlot++; - return () => { - if (context.prefixIdentifiers) { - slotProps && context.removeIdentifiers(slotProps); - } - context.scopes.vSlot--; - }; + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + const slotProps = vSlot.exp; + if (context.prefixIdentifiers) { + slotProps && context.addIdentifiers(slotProps); + } + context.scopes.vSlot++; + return () => { + if (context.prefixIdentifiers) { + slotProps && context.removeIdentifiers(slotProps); } + context.scopes.vSlot--; + }; } + } }; -// A NodeTransform that tracks scope identifiers for scoped slots with v-for. -// This transform is only applied in non-browser builds with { prefixIdentifiers: true } const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && - node.props.some(isVSlot) && - (vFor = findDir(node, 'for'))) { - const result = (vFor.parseResult = parseForExpression(vFor.exp, context)); - if (result) { - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; } + } }; -const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc); -// Instead of being a DirectiveTransform, v-slot processing is called during -// transformElement to build the slots object for a component. +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - // If the slot is inside a v-for or another v-slot, force it to be dynamic - // since it likely uses a scope variable. - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - // with `prefixIdentifiers: true`, this can be further optimized to make - // it dynamic only when the slot actually uses the scope variables. - if (!context.ssr && context.prefixIdentifiers) { - hasDynamicSlots = hasScopeRef(node, context.identifiers); + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + if (!context.ssr && context.prefixIdentifiers) { + hasDynamicSlots = hasScopeRef(node, context.identifiers); + } + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; } - // 1. Check for slot with slotProps on component itself. - // <Comp v-slot="{ prop }"/> - const onComponentSlot = findDir(node, 'slot', true); if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc))); + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; } - // 2. Iterate through children and check for template slots - // <template v-slot:foo="{ prop }"> - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = new Set(); - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || - !(slotDir = findDir(slotElement, 'slot', true))) { - // not a <template v-slot>, skip. - if (slotElement.type !== 3 /* COMMENT */) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - // already has on-component slot - this is incorrect usage. - context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc)); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir; - // check if name is dynamic. - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } - else { - hasDynamicSlots = true; - } - const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc); - // check if this slot is conditional (v-if/v-for) - let vIf; - let vElse; - let vFor; - if ((vIf = findDir(slotElement, 'if'))) { - hasDynamicSlots = true; - dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)); - } - else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) { - // find adjacent v-if - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3 /* COMMENT */) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, 'if')) { - // remove node - children.splice(i, 1); - i--; - // attach this slot to previous conditional - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp - ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback) - : buildDynamicSlot(slotName, slotFunction); - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc)); - } - } - else if ((vFor = findDir(slotElement, 'for'))) { - hasDynamicSlots = true; - const parseResult = vFor.parseResult || - parseForExpression(vFor.exp, context); - if (parseResult) { - // Render the dynamic slots as an array and add it to the createSlot() - // args. The runtime knows how to handle it appropriately. - dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */) - ])); - } - else { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc)); - } - } - else { - // check duplicate static names - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc)); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === 'default') { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children) => { - const fn = buildSlotFn(props, children, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - // implicit default slot (on component) - slotsProperties.push(buildDefaultSlotProperty(undefined, children)); + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; } - else if (implicitDefaultChildren.length && - // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) { - // implicit default slot (mixed with named slots) - if (hasNamedDefaultSlot) { - context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc)); - } - else { - slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren)); - } + } + if (prev && isTemplateNode(prev) && findDir(prev, "if")) { + children.splice(i, 1); + i--; + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); } - const slotFlag = hasDynamicSlots - ? 2 /* DYNAMIC */ - : hasForwardedSlots(node.children) - ? 3 /* FORWARDED */ - : 1 /* STABLE */; - let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression(slotFlag + (` /* ${shared.slotFlagsText[slotFlag]} */` ), false))), loc); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); }; -} -function buildDynamicSlot(name, fn) { - return createObjectExpression([ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${shared.slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); } function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - if (child.tagType === 2 /* SLOT */ || - hasForwardedSlots(child.children)) { - return true; - } - break; - case 9 /* IF */: - if (hasForwardedSlots(child.branches)) - return true; - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - if (hasForwardedSlots(child.children)) - return true; - break; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; } + break; + case 9: + if (hasForwardedSlots(child.branches)) + return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) + return true; + break; } - return false; + } + return false; } function isNonWhitespaceContent(node) { - if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */) - return true; - return node.type === 2 /* TEXT */ - ? !!node.content.trim() - : isNonWhitespaceContent(node.content); + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); } -// some directive transforms (e.g. v-model) may return a symbol for runtime -// import, which should be used instead of a resolveDirective call. -const directiveImportMap = new WeakMap(); -// generate a JavaScript AST for this element's codegen +const directiveImportMap = /* @__PURE__ */ new WeakMap(); const transformElement = (node, context) => { - // perform the work on exit, after all child expressions have been - // processed and merged. - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */))) { - return; + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let vnodePatchFlag; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); } - const { tag, props } = node; - const isComponent = node.tagType === 1 /* COMPONENT */; - // The goal of the transform is to create a codegenNode implementing the - // VNodeCall interface. - let vnodeTag = isComponent - ? resolveComponentType(node, context) - : `"${tag}"`; - const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let vnodePatchFlag; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = - // dynamic component may resolve to plain elements - isDynamicComponent || - vnodeTag === TELEPORT || - vnodeTag === SUSPENSE || - (!isComponent && - // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')); - // props - if (props.length > 0) { - const propsBuildResult = buildProps(node, context, undefined, isComponent, isDynamicComponent); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = - directives && directives.length - ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context))) - : undefined; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; } - // children - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - // Although a built-in component, we compile KeepAlive with raw children - // instead of slot functions so that it can be used inside Transition - // or other Transition-wrapping HOCs. - // To ensure correct updates with block optimizations, we need to: - // 1. Force keep-alive into a block. This avoids its children being - // collected by a parent block. - shouldUseBlock = true; - // 2. Force keep-alive to always be updated, since it uses raw children. - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - if (node.children.length > 1) { - context.onError(createCompilerError(45 /* X_KEEP_ALIVE_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - } - const shouldBuildAsSlots = isComponent && - // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && - // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } - else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - // check for dynamic text children - const hasDynamicTextChild = type === 5 /* INTERPOLATION */ || - type === 8 /* COMPOUND_EXPRESSION */; - if (hasDynamicTextChild && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - patchFlag |= 1 /* TEXT */; - } - // pass directly if the only child is a text node - // (plain / interpolation / expression) - if (hasDynamicTextChild || type === 2 /* TEXT */) { - vnodeChildren = child; - } - else { - vnodeChildren = node.children; - } - } - else { - vnodeChildren = node.children; - } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; } - // patchFlag & dynamicPropNames - if (patchFlag !== 0) { - { - if (patchFlag < 0) { - // special flags (negative and mutually exclusive) - vnodePatchFlag = patchFlag + ` /* ${shared.PatchFlagNames[patchFlag]} */`; - } - else { - // bitwise flags - const flagNames = Object.keys(shared.PatchFlagNames) - .map(Number) - .filter(n => n > 0 && patchFlag & n) - .map(n => shared.PatchFlagNames[n]) - .join(`, `); - vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; } - node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc); - }; + } else { + vnodeChildren = node.children; + } + } + if (patchFlag !== 0) { + { + if (patchFlag < 0) { + vnodePatchFlag = patchFlag + ` /* ${shared.PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(shared.PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => shared.PatchFlagNames[n]).join(`, `); + vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + vnodePatchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; }; function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - // 1. dynamic component - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp(node, 'is'); - if (isProp) { - if (isExplicitDynamic || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))) { - const exp = isProp.type === 6 /* ATTRIBUTE */ - ? isProp.value && createSimpleExpression(isProp.value.content, true) - : isProp.exp; - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } - else if (isProp.type === 6 /* ATTRIBUTE */ && - isProp.value.content.startsWith('vue:')) { - // <button is="vue:xxx"> - // if not <component>, only is value that starts with "vue:" will be - // treated as component by the parse phase and reach here, unless it's - // compat mode where all is values are considered components - tag = isProp.value.content.slice(4); - } - } - // 1.5 v-is (TODO: Deprecate) - const isDir = !isExplicitDynamic && findDir(node, 'is'); - if (isDir && isDir.exp) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp(node, "is"); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp; + if (exp) { return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - isDir.exp + exp ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); } - // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...) - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - // built-ins are simply fallthroughs / have special handling during ssr - // so we don't need to import their runtime equivalents - if (!ssr) - context.helper(builtIn); - return builtIn; + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) + context.helper(builtIn); + return builtIn; + } + { + const fromSetup = resolveSetupReference(tag, context); + if (fromSetup) { + return fromSetup; } - // 3. user component (from setup bindings) - // this is skipped in browser build since browser builds do not perform - // binding analysis. - { - const fromSetup = resolveSetupReference(tag, context); - if (fromSetup) { - return fromSetup; - } - const dotIndex = tag.indexOf('.'); - if (dotIndex > 0) { - const ns = resolveSetupReference(tag.slice(0, dotIndex), context); - if (ns) { - return ns + tag.slice(dotIndex); - } - } + const dotIndex = tag.indexOf("."); + if (dotIndex > 0) { + const ns = resolveSetupReference(tag.slice(0, dotIndex), context); + if (ns) { + return ns + tag.slice(dotIndex); + } } - // 4. Self referencing component (inferred from filename) - if (context.selfName && - shared.capitalize(shared.camelize(tag)) === context.selfName) { - context.helper(RESOLVE_COMPONENT); - // codegen.ts has special check for __self postfix when generating - // component imports, which will pass additional `maybeSelfReference` flag - // to `resolveComponent`. - context.components.add(tag + `__self`); - return toValidAssetId(tag, `component`); - } - // 5. user component (resolve) + } + if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) { context.helper(RESOLVE_COMPONENT); - context.components.add(tag); + context.components.add(tag + `__self`); return toValidAssetId(tag, `component`); + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); } function resolveSetupReference(name, context) { - const bindings = context.bindingMetadata; - if (!bindings || bindings.__isScriptSetup === false) { - return; + const bindings = context.bindingMetadata; + if (!bindings || bindings.__isScriptSetup === false) { + return; + } + const camelName = shared.camelize(name); + const PascalName = shared.capitalize(camelName); + const checkType = (type) => { + if (bindings[name] === type) { + return name; } - const camelName = shared.camelize(name); - const PascalName = shared.capitalize(camelName); - const checkType = (type) => { - if (bindings[name] === type) { - return name; - } - if (bindings[camelName] === type) { - return camelName; - } - if (bindings[PascalName] === type) { - return PascalName; - } - }; - const fromConst = checkType("setup-const" /* SETUP_CONST */) || - checkType("setup-reactive-const" /* SETUP_REACTIVE_CONST */); - if (fromConst) { - return context.inline - ? // in inline mode, const setup bindings (e.g. imports) can be used as-is - fromConst - : `$setup[${JSON.stringify(fromConst)}]`; + if (bindings[camelName] === type) { + return camelName; } - const fromMaybeRef = checkType("setup-let" /* SETUP_LET */) || - checkType("setup-ref" /* SETUP_REF */) || - checkType("setup-maybe-ref" /* SETUP_MAYBE_REF */); - if (fromMaybeRef) { - return context.inline - ? // setup scope bindings that may be refs need to be unrefed - `${context.helperString(UNREF)}(${fromMaybeRef})` - : `$setup[${JSON.stringify(fromMaybeRef)}]`; + if (bindings[PascalName] === type) { + return PascalName; } + }; + const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); + if (fromConst) { + return context.inline ? ( + // in inline mode, const setup bindings (e.g. imports) can be used as-is + fromConst + ) : `$setup[${JSON.stringify(fromConst)}]`; + } + const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); + if (fromMaybeRef) { + return context.inline ? ( + // setup scope bindings that may be refs need to be unrefed + `${context.helperString(UNREF)}(${fromMaybeRef})` + ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; + } + const fromProps = checkType("props"); + if (fromProps) { + return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; + } } function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - // patchFlag analysis - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = shared.isOn(name); - if (isEventHandler && - (!isComponent || isDynamicComponent) && - // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== 'onclick' && - // omit v-model handlers - name !== 'onUpdate:modelValue' && - // omit onVnodeXXX hooks - !shared.isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && shared.isReservedProp(name)) { - hasVnodeHook = true; - } - if (value.type === 20 /* JS_CACHE_EXPRESSION */ || - ((value.type === 4 /* SIMPLE_EXPRESSION */ || - value.type === 8 /* COMPOUND_EXPRESSION */) && - getConstantType(value, context) > 0)) { - // skip if the prop is a cached handler or has constant value - return; - } - if (name === 'ref') { - hasRef = true; - } - else if (name === 'class') { - hasClassBinding = true; - } - else if (name === 'style') { - hasStyleBinding = true; - } - else if (name !== 'key' && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - // treat the dynamic class and style binding of the component as dynamic props - if (isComponent && - (name === 'class' || name === 'style') && - !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) + mergeArgs.push(arg); + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = shared.isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !shared.isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && shared.isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); } - else { - hasDynamicKeys = true; + if (value && context.inline) { + const binding = context.bindingMetadata[value.content]; + if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { + isStatic = false; + properties.push( + createObjectProperty( + createSimpleExpression("ref_key", true), + createSimpleExpression(value.content, true, value.loc) + ) + ); + } } - }; - for (let i = 0; i < props.length; i++) { - // static attribute - const prop = props[i]; - if (prop.type === 6 /* ATTRIBUTE */) { - const { loc, name, value } = prop; - let isStatic = true; - if (name === 'ref') { - hasRef = true; - if (context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushMergeArg(); + { + { + const hasOverridableKeys = mergeArgs.some((arg2) => { + if (arg2.type === 15) { + return arg2.properties.some(({ key }) => { + if (key.type !== 4 || !key.isStatic) { + return true; + } + return key.content !== "class" && key.content !== "style" && !shared.isOn(key.content); + }); + } else { + return true; + } + }); + if (hasOverridableKeys) { + checkCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context, + loc + ); } - // in inline mode there is no setupState object, so we can't use string - // keys to set the ref. Instead, we need to transform it to pass the - // actual ref instead. - if (value && - context.inline && - context.bindingMetadata[value.content]) { - isStatic = false; - properties.push(createObjectProperty(createSimpleExpression('ref_key', true), createSimpleExpression(value.content, true, value.loc))); - } - } - // skip is on <component>, or is="vue:xxx" - if (name === 'is' && - (isComponentTag(tag) || - (value && value.content.startsWith('vue:')) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context)))) { + } + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); continue; + } } - properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc))); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); } - else { - // directives - const { name, arg, exp, loc } = prop; - const isVBind = name === 'bind'; - const isVOn = name === 'on'; - // skip v-slot - it is handled by its dedicated transform. - if (name === 'slot') { - if (!isComponent) { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc)); - } - continue; - } - // skip v-once/v-memo - they are handled by dedicated transforms. - if (name === 'once' || name === 'memo') { - continue; - } - // skip v-is and :is on <component> - if (name === 'is' || - (isVBind && - isStaticArgOf(arg, 'is') && - (isComponentTag(tag) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))))) { - continue; - } - // skip v-on in SSR compilation - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - (isVBind && isStaticArgOf(arg, 'key')) || - // inline before-update hooks need to force block so that it is invoked - // before children - (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // special case for v-bind and v-on with no argument - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - properties = []; - } - if (isVBind) { - { - // 2.x v-bind object order compat - { - const hasOverridableKeys = mergeArgs.some(arg => { - if (arg.type === 15 /* JS_OBJECT_EXPRESSION */) { - return arg.properties.some(({ key }) => { - if (key.type !== 4 /* SIMPLE_EXPRESSION */ || - !key.isStatic) { - return true; - } - return (key.content !== 'class' && - key.content !== 'style' && - !shared.isOn(key.content)); - }); - } - else { - // dynamic expression - return true; - } - }); - if (hasOverridableKeys) { - checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context, loc); - } - } - if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context)) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } - else { - // v-on="obj" -> toHandlers(obj) - mergeArgs.push({ - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee: context.helper(TO_HANDLERS), - arguments: [exp] - }); - } - } - else { - context.onError(createCompilerError(isVBind - ? 34 /* X_V_BIND_NO_EXPRESSION */ - : 35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - continue; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - // has built-in directive transform. - const { props, needRuntime } = directiveTransform(prop, node, context); - !ssr && props.forEach(analyzePatchFlag); - properties.push(...props); - if (needRuntime) { - runtimeDirectives.push(prop); - if (shared.isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } - else if (!shared.isBuiltInDirective(name)) { - // no built-in transform, this is a user custom directive. - runtimeDirectives.push(prop); - // custom dirs may use beforeUpdate so they need to force blocks - // to ensure before-update gets called before children update - if (hasChildren) { - shouldUseBlock = true; - } - } + continue; + } + if (isVBind && modifiers.includes("prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); } + if (needRuntime) { + runtimeDirectives.push(prop); + if (shared.isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!shared.isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } } - let propsExpression = undefined; - // has v-bind="object" or v-on="object", wrap with mergeProps - if (mergeArgs.length) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - } - if (mergeArgs.length > 1) { - propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc); - } - else { - // single v-bind with nothing else - no need for a mergeProps call - propsExpression = mergeArgs[0]; - } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; } - else if (properties.length) { - propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc); + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; } - // patchFlag analysis - if (hasDynamicKeys) { - patchFlag |= 16 /* FULL_PROPS */; + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; } - else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2 /* CLASS */; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4 /* STYLE */; - } - if (dynamicPropNames.length) { - patchFlag |= 8 /* PROPS */; - } - if (hasHydrationEventBinding) { - patchFlag |= 32 /* HYDRATE_EVENTS */; - } + if (dynamicPropNames.length) { + patchFlag |= 8; } - if (!shouldUseBlock && - (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) && - (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512 /* NEED_PATCH */; + if (hasHydrationEventBinding) { + patchFlag |= 32; } - // pre-normalize props, SSR is skipped for now - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15 /* JS_OBJECT_EXPRESSION */: - // means that there is no v-bind, - // but still need to deal with dynamic key binding - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === 'class') { - classKeyIndex = i; - } - else if (key.content === 'style') { - styleKeyIndex = i; - } - } - else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - // no dynamic key - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]); - } - if (styleProp && - // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || - (styleProp.value.type === 4 /* SIMPLE_EXPRESSION */ && - styleProp.value.content.trim()[0] === `[`) || - // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) { - styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]); - } - } - else { - // dynamic key binding, wrap with `normalizeProps` - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]); - } - break; - case 14 /* JS_CALL_EXPRESSION */: - // mergeProps call, do nothing - break; - default: - // single v-bind - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ]); - break; + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; } -// Dedupe props in an object literal. -// Literal duplicated attributes would have been warned during the parse phase, -// however, it's possible to encounter duplicated `onXXX` handlers with different -// modifiers. We also need to merge static and dynamic class / style attributes. -// - onXXX handlers / style: merge into array -// - class: merge into single expression with concatenation function dedupeProperties(properties) { - const knownProps = new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - // dynamic keys are always allowed - if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === 'style' || name === 'class' || shared.isOn(name)) { - mergeAsArray(existing, prop); - } - // unexpected duplicate, should have emitted error during parse - } - else { - knownProps.set(name, prop); - deduped.push(prop); - } + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; } - return deduped; + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || shared.isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; } function mergeAsArray(existing, incoming) { - if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.value.elements.push(incoming.value); - } - else { - existing.value = createArrayExpression([existing.value, incoming.value], existing.loc); - } + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } } function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - // built-in directive with runtime - dirArgs.push(context.helperString(runtime)); + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + const fromSetup = resolveSetupReference("v-" + dir.name, context); + if (fromSetup) { + dirArgs.push(fromSetup); + } else { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); } - else { - // user directive. - // see if we have directives exposed via <script setup> - const fromSetup = resolveSetupReference('v-' + dir.name, context); - if (fromSetup) { - dirArgs.push(fromSetup); - } - else { - // inject statement for resolving directive - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } + } + const { loc } = dir; + if (dir.exp) + dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); } - const { loc } = dir; - if (dir.exp) - dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc)); - } - return createArrayExpression(dirArgs, dir.loc); + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); } function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) - propsNamesString += ', '; - } - return propsNamesString + `]`; + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) + propsNamesString += ", "; + } + return propsNamesString + `]`; } function isComponentTag(tag) { - return tag === 'component' || tag === 'Component'; + return tag === "component" || tag === "Component"; } -Object.freeze({}) - ; -Object.freeze([]) ; -const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); -}; -const camelizeRE = /-(\w)/g; -/** - * @private - */ -const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); -}); - const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - '{}', - 'undefined', - 'true' - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); // remove unused arguments - node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc); + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } }; function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = undefined; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.value) { - if (p.name === 'name') { - slotName = JSON.stringify(p.value.content); - } - else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = shared.camelize(p.name); + nonNameProps.push(p); } - else { - if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) { - if (p.exp) - slotName = p.exp; - } - else { - if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) + slotName = p.exp; + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = shared.camelize(p.arg.content); } + nonNameProps.push(p); + } } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps(node, context, nonNameProps, false, false); - slotProps = props; - if (directives.length) { - context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc)); - } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); } - return { - slotName, - slotProps - }; + } + return { + slotName, + slotProps + }; } -const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc)); + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + shared.toHandlerKey(shared.camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); } - let eventName; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - let rawName = arg.content; - // TODO deprecate @vnodeXXX usage - if (rawName.startsWith('vue:')) { - rawName = `vnode-${rawName.slice(4)}`; - } - // for all event listeners, auto convert it to camelCase. See issue #2249 - eventName = createSimpleExpression(shared.toHandlerKey(shared.camelize(rawName)), true, arg.loc); - } - else { - // #2388 - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp.content, context); + const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); + const hasMultipleStatements = exp.content.includes(`;`); + if (context.prefixIdentifiers) { + isInlineStatement && context.addIdentifiers(`$event`); + exp = dir.exp = processExpression( + exp, + context, + false, + hasMultipleStatements + ); + isInlineStatement && context.removeIdentifiers(`$event`); + shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once + !context.inVOnce && // runtime constants don't need to be cached + // (this is analyzed by compileScript in SFC <script setup>) + !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - + // we need to use the original function to preserve arity, + // e.g. <transition> relies on checking cb.length to determine + // transition end handling. Inline function is ok since its arity + // is preserved even when cached. + !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) + // it must be passed fresh to avoid stale values. + !hasScopeRef(exp, context.identifiers); + if (shouldCache && isMemberExp) { + if (exp.type === 4) { + exp.content = `${exp.content} && ${exp.content}(...args)`; + } else { + exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; } + } } - else { - // already a compound expression. - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` +//@ts-ignore +` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); } - // handler processing - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = undefined; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp.content, context); - const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); - const hasMultipleStatements = exp.content.includes(`;`); - // process the expression since it's been skipped - if (context.prefixIdentifiers) { - isInlineStatement && context.addIdentifiers(`$event`); - exp = dir.exp = processExpression(exp, context, false, hasMultipleStatements); - isInlineStatement && context.removeIdentifiers(`$event`); - // with scope analysis, the function is hoistable if it has no reference - // to scope variables. - shouldCache = - context.cacheHandlers && - // unnecessary to cache inside v-once - !context.inVOnce && - // runtime constants don't need to be cached - // (this is analyzed by compileScript in SFC <script setup>) - !(exp.type === 4 /* SIMPLE_EXPRESSION */ && exp.constType > 0) && - // #1541 bail if this is a member exp handler passed to a component - - // we need to use the original function to preserve arity, - // e.g. <transition> relies on checking cb.length to determine - // transition end handling. Inline function is ok since its arity - // is preserved even when cached. - !(isMemberExp && node.tagType === 1 /* COMPONENT */) && - // bail if the function references closure variables (v-for, v-slot) - // it must be passed fresh to avoid stale values. - !hasScopeRef(exp, context.identifiers); - // If the expression is optimizable and is a member expression pointing - // to a function, turn it into invocation (and wrap in an arrow function - // below) so that it always accesses the latest value when called - thus - // avoiding the need to be patched. - if (shouldCache && isMemberExp) { - if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - exp.content = `${exp.content} && ${exp.content}(...args)`; - } - else { - exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; - } - } - } - if (isInlineStatement || (shouldCache && isMemberExp)) { - // wrap inline statement in a function expression - exp = createCompoundExpression([ - `${isInlineStatement - ? context.isTS - ? `($event: any)` - : `$event` - : `${context.isTS ? `\n//@ts-ignore\n` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc)) - ] - }; - // apply extended compiler augmentor - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - // cache handlers so that it's always the same handler being passed down. - // this avoids unnecessary re-renders when users use inline handlers on - // components. - ret.props[0].value = context.cache(ret.props[0].value); - } - // mark the key as handler for props normalization check - ret.props.forEach(p => (p.key.isHandlerKey = true)); - return ret; + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; }; -// v-bind without arg is handled directly in ./transformElements.ts due to it affecting -// codegen for the entire props object. This transform here is only for v-bind -// *with* args. const transformBind = (dir, _node, context) => { - const { exp, modifiers, loc } = dir; - const arg = dir.arg; - if (arg.type !== 4 /* SIMPLE_EXPRESSION */) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (!exp && arg.type === 4) { + const propName = shared.camelize(arg.content); + exp = dir.exp = createSimpleExpression(propName, false, arg.loc); + { + exp = dir.exp = processExpression(exp, context); } - else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.includes("camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = shared.camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); } - // .sync is replaced by v-model:arg - if (modifiers.includes('camel')) { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = shared.camelize(arg.content); - } - else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } - else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } + } + if (!context.inSSR) { + if (modifiers.includes("prop")) { + injectPrefix(arg, "."); } - if (!context.inSSR) { - if (modifiers.includes('prop')) { - injectPrefix(arg, '.'); - } - if (modifiers.includes('attr')) { - injectPrefix(arg, '^'); - } - } - if (!exp || - (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) { - context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc)); - return { - props: [createObjectProperty(arg, createSimpleExpression('', true, loc))] - }; + if (modifiers.includes("attr")) { + injectPrefix(arg, "^"); } + } + if (!exp || exp.type === 4 && !exp.content.trim()) { + context.onError(createCompilerError(34, loc)); return { - props: [createObjectProperty(arg, exp)] + props: [createObjectProperty(arg, createSimpleExpression("", true, loc))] }; + } + return { + props: [createObjectProperty(arg, exp)] + }; }; const injectPrefix = (arg, prefix) => { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } - else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } - else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } }; -// Merge adjacent text nodes and expressions into a single expression -// e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child. const transformText = (node, context) => { - if (node.type === 0 /* ROOT */ || - node.type === 1 /* ELEMENT */ || - node.type === 11 /* FOR */ || - node.type === 10 /* IF_BRANCH */) { - // perform the transform on node exit so that all expressions have already - // been processed. - return () => { - const children = node.children; - let currentContainer = undefined; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression([child], child.loc); - } - // merge adjacent text node into current - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } - else { - currentContainer = undefined; - break; - } - } - } + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; } - if (!hasText || - // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - (children.length === 1 && - (node.type === 0 /* ROOT */ || - (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find(p => p.type === 7 /* DIRECTIVE */ && - !context.directiveTransforms[p.name]) && - // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === 'template'))))) { - return; - } - // pre-convert text nodes into createTextVNode(text) calls to avoid - // runtime normalization. - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) { - const callArgs = []; - // createTextVNode defaults to single whitespace, so if it is a - // single space the code could be an empty call to save bytes. - if (child.type !== 2 /* TEXT */ || child.content !== ' ') { - callArgs.push(child); - } - // mark dynamic text with flag so it gets patched inside a block - if (!context.ssr && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - callArgs.push(1 /* TEXT */ + - (` /* ${shared.PatchFlagNames[1 /* TEXT */]} */` )); - } - children[i] = { - type: 12 /* TEXT_CALL */, - content: child, - loc: child.loc, - codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs) - }; - } - } - }; - } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${shared.PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } }; -const seen = new WeakSet(); +const seen$1 = /* @__PURE__ */ new WeakSet(); const transformOnce = (node, context) => { - if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) { - if (seen.has(node) || context.inVOnce) { - return; - } - seen.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */); - } - }; + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true + /* isVNode */ + ); + } + }; + } }; const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc)); - return createTransformProps(); + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source; + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); + if (!expString.trim() || !isMemberExpression(expString, context) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { + context.onError( + createCompilerError(43, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + if (maybeRef) { + if (bindingType === "setup-ref") { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event)` + ]); + } else { + const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; + assignmentExp = createCompoundExpression([ + `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event : ${altAssignment})` + ]); } - const rawExp = exp.loc.source; - const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp; - // im SFC <script setup> inline mode, the exp may have been transformed into - // _unref(exp) - const bindingType = context.bindingMetadata[rawExp]; - const maybeRef = context.inline && - bindingType && - bindingType !== "setup-const" /* SETUP_CONST */; - if (!expString.trim() || - (!isMemberExpression(expString, context) && !maybeRef)) { - context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc)); - return createTransformProps(); - } - if (context.prefixIdentifiers && - isSimpleIdentifier(expString) && - context.identifiers[expString]) { - context.onError(createCompilerError(43 /* X_V_MODEL_ON_SCOPE_VARIABLE */, exp.loc)); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression('modelValue', true); - const eventName = arg - ? isStaticExp(arg) - ? `onUpdate:${arg.content}` - : createCompoundExpression(['"onUpdate:" + ', arg]) - : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - if (maybeRef) { - if (bindingType === "setup-ref" /* SETUP_REF */) { - // v-model used on known ref. - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event)` - ]); - } - else { - // v-model used on a potentially ref binding in <script setup> inline mode. - // the assignment needs to check whether the binding is actually a ref. - const altAssignment = bindingType === "setup-let" /* SETUP_LET */ ? `${rawExp} = $event` : `null`; - assignmentExp = createCompoundExpression([ - `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event : ${altAssignment})` - ]); - } - } - else { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - // cache v-model handler if applicable (when it doesn't refer any scope vars) - if (context.prefixIdentifiers && - !context.inVOnce && - context.cacheHandlers && - !hasScopeRef(exp, context.identifiers)) { - props[1].value = context.cache(props[1].value); - } - // modelModifiers: { foo: true, "bar-baz": true } - if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) { - const modifiers = dir.modifiers - .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`) - .join(`, `); - const modifiersKey = arg - ? isStaticExp(arg) - ? `${arg.content}Modifiers` - : createCompoundExpression([arg, ' + "Modifiers"']) - : `modelModifiers`; - props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */))); - } - return createTransformProps(props); + } else { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { + props[1].value = context.cache(props[1].value); + } + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); }; function createTransformProps(props = []) { - return { props }; + return { props }; } const validDivisionCharRE = /[\w).+\-_$\]]/; const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTER" /* COMPILER_FILTERS */, context)) { - return; - } - if (node.type === 5 /* INTERPOLATION */) { - // filter rewrite is applied before expression transform so only - // simple expressions are possible at this stage - rewriteFilter(node.content, context); - } - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((prop) => { - if (prop.type === 7 /* DIRECTIVE */ && - prop.name !== 'for' && - prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } + if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } }; function rewriteFilter(node, context) { - if (node.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(node, context); - } - else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== 'object') - continue; - if (child.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(child, context); - } - else if (child.type === 8 /* COMPOUND_EXPRESSION */) { - rewriteFilter(node, context); - } - else if (child.type === 5 /* INTERPOLATION */) { - rewriteFilter(child.content, context); - } - } + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") + continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } } + } } function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 0x27 && prev !== 0x5c) - inSingle = false; - } - else if (inDouble) { - if (c === 0x22 && prev !== 0x5c) - inDouble = false; - } - else if (inTemplateString) { - if (c === 0x60 && prev !== 0x5c) - inTemplateString = false; - } - else if (inRegex) { - if (c === 0x2f && prev !== 0x5c) - inRegex = false; - } - else if (c === 0x7c && // pipe - exp.charCodeAt(i + 1) !== 0x7c && - exp.charCodeAt(i - 1) !== 0x7c && - !curly && - !square && - !paren) { - if (expression === undefined) { - // first filter, end of expression - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } - else { - pushFilter(); - } - } - else { - switch (c) { - case 0x22: - inDouble = true; - break; // " - case 0x27: - inSingle = true; - break; // ' - case 0x60: - inTemplateString = true; - break; // ` - case 0x28: - paren++; - break; // ( - case 0x29: - paren--; - break; // ) - case 0x5b: - square++; - break; // [ - case 0x5d: - square--; - break; // ] - case 0x7b: - curly++; - break; // { - case 0x7d: - curly--; - break; // } - } - if (c === 0x2f) { - // / - let j = i - 1; - let p; - // find first non-whitespace prev char - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== ' ') - break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === undefined) { - expression = exp.slice(0, i).trim(); - } - else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) + inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) + inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) + inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) + inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { lastFilterIndex = i + 1; - } - if (filters.length) { - warnDeprecation("COMPILER_FILTER" /* COMPILER_FILTERS */, context, node.loc); - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + case 39: + inSingle = true; + break; + case 96: + inTemplateString = true; + break; + case 40: + paren++; + break; + case 41: + paren--; + break; + case 91: + square++; + break; + case 93: + square--; + break; + case 123: + curly++; + break; + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") + break; } - node.content = expression; + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + warnDeprecation( + "COMPILER_FILTERS", + context, + node.loc + ); + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + } } function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf('('); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, 'filter')}(${exp})`; - } - else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, 'filter')}(${exp}${args !== ')' ? ',' + args : args}`; - } + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } } -const seen$1 = new WeakSet(); +const seen = /* @__PURE__ */ new WeakSet(); const transformMemo = (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const dir = findDir(node, 'memo'); - if (!dir || seen$1.has(node)) { - return; - } - seen$1.add(node); - return () => { - const codegenNode = node.codegenNode || - context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) { - // non-component sub tree should be turned into a block - if (node.tagType !== 1 /* COMPONENT */) { - makeBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(undefined, codegenNode), - `_cache`, - String(context.cached++) - ]); - } - }; + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached++) + ]); + } + }; + } }; function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...([transformFilter] ), - ...(prefixIdentifiers - ? [ - // order is important - trackVForSlotScopes, - transformExpression - ] - : []), - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...prefixIdentifiers ? [ + // order is important + trackVForSlotScopes, + transformExpression + ] : [], + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn, + bind: transformBind, + model: transformModel + } + ]; } -// we name it `baseCompile` so that higher order compilers like -// @vue/compiler-dom can export `compile` while re-exporting everything else. -function baseCompile(template, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === 'module'; - const prefixIdentifiers = (options.prefixIdentifiers === true || isModuleMode); - if (!prefixIdentifiers && options.cacheHandlers) { - onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */)); +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; + if (!prefixIdentifiers && options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = shared.extend({}, options, { + prefixIdentifiers + }); + const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); + if (options.isTS) { + const { expressionPlugins } = options; + if (!expressionPlugins || !expressionPlugins.includes("typescript")) { + options.expressionPlugins = [...expressionPlugins || [], "typescript"]; } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */)); - } - const ast = shared.isString(template) ? baseParse(template, options) : template; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); - if (options.isTS) { - const { expressionPlugins } = options; - if (!expressionPlugins || !expressionPlugins.includes('typescript')) { - options.expressionPlugins = [...(expressionPlugins || []), 'typescript']; - } - } - transform(ast, shared.extend({}, options, { - prefixIdentifiers, - nodeTransforms: [ - ...nodeTransforms, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: shared.extend({}, directiveTransforms, options.directiveTransforms || {} // user transforms - ) - })); - return generate(ast, shared.extend({}, options, { - prefixIdentifiers - })); + } + transform( + ast, + shared.extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: shared.extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); } +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; + const noopDirectiveTransform = () => ({ props: [] }); exports.generateCodeFrame = shared.generateCodeFrame; exports.BASE_TRANSITION = BASE_TRANSITION; +exports.BindingTypes = BindingTypes; exports.CAMELIZE = CAMELIZE; exports.CAPITALIZE = CAPITALIZE; exports.CREATE_BLOCK = CREATE_BLOCK; @@ -5693,6 +6477,10 @@ exports.CREATE_SLOTS = CREATE_SLOTS; exports.CREATE_STATIC = CREATE_STATIC; exports.CREATE_TEXT = CREATE_TEXT; exports.CREATE_VNODE = CREATE_VNODE; +exports.CompilerDeprecationTypes = CompilerDeprecationTypes; +exports.ConstantTypes = ConstantTypes; +exports.ElementTypes = ElementTypes; +exports.ErrorCodes = ErrorCodes; exports.FRAGMENT = FRAGMENT; exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; exports.IS_MEMO_SAME = IS_MEMO_SAME; @@ -5702,6 +6490,8 @@ exports.MERGE_PROPS = MERGE_PROPS; exports.NORMALIZE_CLASS = NORMALIZE_CLASS; exports.NORMALIZE_PROPS = NORMALIZE_PROPS; exports.NORMALIZE_STYLE = NORMALIZE_STYLE; +exports.Namespaces = Namespaces; +exports.NodeTypes = NodeTypes; exports.OPEN_BLOCK = OPEN_BLOCK; exports.POP_SCOPE_ID = POP_SCOPE_ID; exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; @@ -5717,6 +6507,7 @@ exports.TELEPORT = TELEPORT; exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING; exports.TO_HANDLERS = TO_HANDLERS; exports.TO_HANDLER_KEY = TO_HANDLER_KEY; +exports.TS_NODE_TYPES = TS_NODE_TYPES; exports.UNREF = UNREF; exports.WITH_CTX = WITH_CTX; exports.WITH_DIRECTIVES = WITH_DIRECTIVES; @@ -5730,6 +6521,7 @@ exports.buildDirectiveArgs = buildDirectiveArgs; exports.buildProps = buildProps; exports.buildSlots = buildSlots; exports.checkCompatEnabled = checkCompatEnabled; +exports.convertToBlock = convertToBlock; exports.createArrayExpression = createArrayExpression; exports.createAssignmentExpression = createAssignmentExpression; exports.createBlockStatement = createBlockStatement; @@ -5752,13 +6544,14 @@ exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform; exports.createTemplateLiteral = createTemplateLiteral; exports.createTransformContext = createTransformContext; exports.createVNodeCall = createVNodeCall; +exports.errorMessages = errorMessages; exports.extractIdentifiers = extractIdentifiers; exports.findDir = findDir; exports.findProp = findProp; +exports.forAliasRE = forAliasRE; exports.generate = generate; exports.getBaseTransformPreset = getBaseTransformPreset; exports.getConstantType = getConstantType; -exports.getInnerRange = getInnerRange; exports.getMemoedVNodeCall = getMemoedVNodeCall; exports.getVNodeBlockHelper = getVNodeBlockHelper; exports.getVNodeHelper = getVNodeHelper; @@ -5766,10 +6559,10 @@ exports.hasDynamicKeyVBind = hasDynamicKeyVBind; exports.hasScopeRef = hasScopeRef; exports.helperNameMap = helperNameMap; exports.injectProp = injectProp; -exports.isBuiltInType = isBuiltInType; exports.isCoreComponent = isCoreComponent; exports.isFunctionType = isFunctionType; exports.isInDestructureAssignment = isInDestructureAssignment; +exports.isInNewExpression = isInNewExpression; exports.isMemberExpression = isMemberExpression; exports.isMemberExpressionBrowser = isMemberExpressionBrowser; exports.isMemberExpressionNode = isMemberExpressionNode; @@ -5781,10 +6574,9 @@ exports.isStaticExp = isStaticExp; exports.isStaticProperty = isStaticProperty; exports.isStaticPropertyKey = isStaticPropertyKey; exports.isTemplateNode = isTemplateNode; -exports.isText = isText; +exports.isText = isText$1; exports.isVSlot = isVSlot; exports.locStub = locStub; -exports.makeBlock = makeBlock; exports.noopDirectiveTransform = noopDirectiveTransform; exports.processExpression = processExpression; exports.processFor = processFor; @@ -5792,6 +6584,7 @@ exports.processIf = processIf; exports.processSlotOutlet = processSlotOutlet; exports.registerRuntimeHelpers = registerRuntimeHelpers; exports.resolveComponentType = resolveComponentType; +exports.stringifyExpression = stringifyExpression; exports.toValidAssetId = toValidAssetId; exports.trackSlotScopes = trackSlotScopes; exports.trackVForSlotScopes = trackVForSlotScopes; @@ -5802,6 +6595,7 @@ exports.transformExpression = transformExpression; exports.transformModel = transformModel; exports.transformOn = transformOn; exports.traverseNode = traverseNode; +exports.unwrapTSNode = unwrapTSNode; exports.walkBlockDeclarations = walkBlockDeclarations; exports.walkFunctionParams = walkFunctionParams; exports.walkIdentifiers = walkIdentifiers; diff --git a/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js b/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js index 6069b602..f2329910 100644 --- a/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +++ b/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js @@ -1,87 +1,17 @@ +/** +* @vue/compiler-core v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var shared = require('@vue/shared'); +var decode_js = require('entities/lib/decode.js'); var parser = require('@babel/parser'); -var sourceMap = require('source-map'); var estreeWalker = require('estree-walker'); - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) - ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '<!--' in comment.", - [17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */]: 'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).', - [18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */]: 'Unquoted attribute value cannot contain U+0022 ("), U+0027 (\'), U+003C (<), U+003D (=), and U+0060 (`).', - [19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */]: "Attribute name cannot start with '='.", - [21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */]: "'<?' is allowed only in XML context.", - [20 /* UNEXPECTED_NULL_CHARACTER */]: `Unexpected null character.`, - [22 /* UNEXPECTED_SOLIDUS_IN_TAG */]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23 /* X_INVALID_END_TAG */]: 'Invalid end tag.', - [24 /* X_MISSING_END_TAG */]: 'Element is missing end tag.', - [25 /* X_MISSING_INTERPOLATION_END */]: 'Interpolation end sign was not found.', - [27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */]: 'End bracket for dynamic directive argument was not found. ' + - 'Note that dynamic directive argument cannot contain spaces.', - [26 /* X_MISSING_DIRECTIVE_NAME */]: 'Legal directive name was expected.', - // transform errors - [28 /* X_V_IF_NO_EXPRESSION */]: `v-if/v-else-if is missing expression.`, - [29 /* X_V_IF_SAME_KEY */]: `v-if/else branches must use unique keys.`, - [30 /* X_V_ELSE_NO_ADJACENT_IF */]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31 /* X_V_FOR_NO_EXPRESSION */]: `v-for is missing expression.`, - [32 /* X_V_FOR_MALFORMED_EXPRESSION */]: `v-for has invalid expression.`, - [33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */]: `<template v-for> key should be placed on the <template> tag.`, - [34 /* X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`, - [35 /* X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`, - [36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`, - [37 /* X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` + - `When there are multiple named slots, all slots should use <template> ` + - `syntax to avoid scope ambiguity.`, - [38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `, - [39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */]: `Extraneous children found when component already has explicitly named ` + - `default slot. These children will be ignored.`, - [40 /* X_V_SLOT_MISPLACED */]: `v-slot can only be used on components or <template> tags.`, - [41 /* X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`, - [42 /* X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`, - [43 /* X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44 /* X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `, - [45 /* X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`, - // generic errors - [46 /* X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`, - [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [50 /* __EXTEND_POINT__ */]: `` -}; +var sourceMapJs = require('source-map-js'); const FRAGMENT = Symbol(``); const TELEPORT = Symbol(``); @@ -97,7 +27,9 @@ const CREATE_COMMENT = Symbol(``); const CREATE_TEXT = Symbol(``); const CREATE_STATIC = Symbol(``); const RESOLVE_COMPONENT = Symbol(``); -const RESOLVE_DYNAMIC_COMPONENT = Symbol(``); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `` +); const RESOLVE_DIRECTIVE = Symbol(``); const RESOLVE_FILTER = Symbol(``); const WITH_DIRECTIVES = Symbol(``); @@ -122,5437 +54,6295 @@ const UNREF = Symbol(``); const IS_REF = Symbol(``); const WITH_MEMO = Symbol(``); const IS_MEMO_SAME = Symbol(``); -// Name mapping for runtime helpers that need to be imported from 'vue' in -// generated code. Make sure these are correctly exported in the runtime! -// Using `any` here because TS doesn't allow symbols as index type. const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` }; function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach(s => { - helperNameMap[s] = helpers[s]; - }); + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); } -// AST Utilities --------------------------------------------------------------- -// Some expressions, e.g. sequence and conditional expressions, are never -// associated with template nodes, so their source locations are just a stub. -// Container types like CompoundExpression also don't need a real location. -const locStub = { - source: '', - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 } +const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" }; -function createRoot(children, loc = locStub) { - return { - type: 0 /* ROOT */, - children, - helpers: [], - components: [], - directives: [], - hoists: [], - imports: [], - cached: 0, - temps: 0, - codegenNode: undefined, - loc - }; +const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" +}; +const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" +}; +const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_HOIST": 2, + "2": "CAN_HOIST", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" +}; +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: 0, + temps: 0, + codegenNode: void 0, + loc: locStub + }; } function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } - else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); } - return { - type: 13 /* VNODE_CALL */, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; } function createArrayExpression(elements, loc = locStub) { - return { - type: 17 /* JS_ARRAY_EXPRESSION */, - loc, - elements - }; + return { + type: 17, + loc, + elements + }; } function createObjectExpression(properties, loc = locStub) { - return { - type: 15 /* JS_OBJECT_EXPRESSION */, - loc, - properties - }; + return { + type: 15, + loc, + properties + }; } function createObjectProperty(key, value) { - return { - type: 16 /* JS_PROPERTY */, - loc: locStub, - key: shared.isString(key) ? createSimpleExpression(key, true) : key, - value - }; + return { + type: 16, + loc: locStub, + key: shared.isString(key) ? createSimpleExpression(key, true) : key, + value + }; } -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0 /* NOT_CONSTANT */) { - return { - type: 4 /* SIMPLE_EXPRESSION */, - loc, - content, - isStatic, - constType: isStatic ? 3 /* CAN_STRINGIFY */ : constType - }; +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; } function createInterpolation(content, loc) { - return { - type: 5 /* INTERPOLATION */, - loc, - content: shared.isString(content) - ? createSimpleExpression(content, false, loc) - : content - }; + return { + type: 5, + loc, + content: shared.isString(content) ? createSimpleExpression(content, false, loc) : content + }; } function createCompoundExpression(children, loc = locStub) { - return { - type: 8 /* COMPOUND_EXPRESSION */, - loc, - children - }; + return { + type: 8, + loc, + children + }; } function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee, - arguments: args - }; + return { + type: 14, + loc, + callee, + arguments: args + }; } -function createFunctionExpression(params, returns = undefined, newline = false, isSlot = false, loc = locStub) { - return { - type: 18 /* JS_FUNCTION_EXPRESSION */, - params, - returns, - newline, - isSlot, - loc - }; +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; } function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19 /* JS_CONDITIONAL_EXPRESSION */, - test, - consequent, - alternate, - newline, - loc: locStub - }; + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; } function createCacheExpression(index, value, isVNode = false) { - return { - type: 20 /* JS_CACHE_EXPRESSION */, - index, - value, - isVNode, - loc: locStub - }; + return { + type: 20, + index, + value, + isVNode, + loc: locStub + }; } function createBlockStatement(body) { - return { - type: 21 /* JS_BLOCK_STATEMENT */, - body, - loc: locStub - }; + return { + type: 21, + body, + loc: locStub + }; } function createTemplateLiteral(elements) { - return { - type: 22 /* JS_TEMPLATE_LITERAL */, - elements, - loc: locStub - }; + return { + type: 22, + elements, + loc: locStub + }; } function createIfStatement(test, consequent, alternate) { - return { - type: 23 /* JS_IF_STATEMENT */, - test, - consequent, - alternate, - loc: locStub - }; + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; } function createAssignmentExpression(left, right) { - return { - type: 24 /* JS_ASSIGNMENT_EXPRESSION */, - left, - right, - loc: locStub - }; + return { + type: 24, + left, + right, + loc: locStub + }; } function createSequenceExpression(expressions) { - return { - type: 25 /* JS_SEQUENCE_EXPRESSION */, - expressions, - loc: locStub - }; + return { + type: 25, + expressions, + loc: locStub + }; } function createReturnStatement(returns) { - return { - type: 26 /* JS_RETURN_STATEMENT */, - returns, - loc: locStub - }; + return { + type: 26, + returns, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } } -const isStaticExp = (p) => p.type === 4 /* SIMPLE_EXPRESSION */ && p.isStatic; -const isBuiltInType = (tag, expected) => tag === expected || tag === shared.hyphenate(expected); +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + { + this.entityDecoder = new decode_js.EntityDecoder( + decode_js.htmlDecodeTree, + (cp, consumed) => this.emitCodePoint(cp, consumed) + ); + } + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === 38) { + this.startEntity(); + } else if (c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + const lower = c | 32; + if (lower === 116) { + this.state = 30; + } else { + this.state = lower === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || false) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } else if (c === 38) { + this.startEntity(); + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else if (c === 38) { + this.startEntity(); + } + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + const lower = c | 32; + if (lower === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (lower === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + const lower = c | 32; + if (lower === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (lower === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + { + this.baseState = this.state; + this.state = 33; + this.entityStart = this.index; + this.entityDecoder.startEntity( + this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute + ); + } + } + stateInEntity() { + { + const length = this.entityDecoder.write(this.buffer, this.index); + if (length >= 0) { + this.state = this.baseState; + if (length === 0) { + this.index = this.entityStart; + } + } else { + this.index = this.buffer.length - 1; + } + } + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + if (this.state === 33) { + this.entityDecoder.end(); + this.state = this.baseState; + } + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + { + if (this.baseState !== 1 && this.baseState !== 32) { + if (this.sectionStart < this.entityStart) { + this.cbs.onattribdata(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.onattribentity( + decode_js.fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } else { + if (this.sectionStart < this.entityStart) { + this.cbs.ontext(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.ontextentity( + decode_js.fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } + } + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) + err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "__EXTEND_POINT__": 52, + "52": "__EXTEND_POINT__" +}; +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [52]: `` +}; + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; + estreeWalker.walk(root, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { + return this.skip(); + } + if (node.type === "Identifier") { + const isLocal = !!knownIds[node.name]; + const isRefed = isReferencedIdentifier(node, parent, parentStack); + if (includeAll || isRefed && !isLocal) { + onIdentifier(node, parent, parentStack, isRefed, isLocal); + } + } else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") { + node.inPattern = true; + } else if (isFunctionType(node)) { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkFunctionParams( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "BlockStatement") { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkBlockDeclarations( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node !== rootExp && node.scopeIds) { + for (const id of node.scopeIds) { + knownIds[id]--; + if (knownIds[id] === 0) { + delete knownIds[id]; + } + } + } + } + }); +} +function isReferencedIdentifier(id, parent, parentStack) { + if (!parent) { + return true; + } + if (id.name === "arguments") { + return false; + } + if (isReferenced(id, parent)) { + return true; + } + switch (parent.type) { + case "AssignmentExpression": + case "AssignmentPattern": + return true; + case "ObjectPattern": + case "ArrayPattern": + return isInDestructureAssignment(parent, parentStack); + } + return false; +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) + continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) + continue; + onIdent(stmt.id); + } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration") { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } + } + } +} +function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) + extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; +} +function markKnownIds(name, knownIds) { + if (name in knownIds) { + knownIds[name]++; + } else { + knownIds[name] = 1; + } +} +function markScopeIdentifier(node, child, knownIds) { + const { name } = child; + if (node.scopeIds && node.scopeIds.has(name)) { + return; + } + markKnownIds(name, knownIds); + (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + case "MemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + return parent.object === node; + case "JSXMemberExpression": + return parent.object === node; + case "VariableDeclarator": + return parent.init === node; + case "ArrowFunctionExpression": + return parent.body === node; + case "PrivateName": + return false; + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.key === node) { + return !!parent.computed; + } + return false; + case "ObjectProperty": + if (parent.key === node) { + return !!parent.computed; + } + return !grandparent || grandparent.type !== "ObjectPattern"; + case "ClassProperty": + if (parent.key === node) { + return !!parent.computed; + } + return true; + case "ClassPrivateProperty": + return parent.key !== node; + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + case "AssignmentExpression": + return parent.right === node; + case "AssignmentPattern": + return parent.right === node; + case "LabeledStatement": + return false; + case "CatchClause": + return false; + case "RestElement": + return false; + case "BreakStatement": + case "ContinueStatement": + return false; + case "FunctionDeclaration": + case "FunctionExpression": + return false; + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + case "ExportSpecifier": + if (grandparent == null ? void 0 : grandparent.source) { + return false; + } + return parent.local === node; + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + case "ImportAttribute": + return false; + case "JSXAttribute": + return false; + case "ObjectPattern": + case "ArrayPattern": + return false; + case "MetaProperty": + return false; + case "ObjectTypeProperty": + return parent.key !== node; + case "TSEnumMember": + return parent.id !== node; + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + return true; + } + return true; +} +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; function isCoreComponent(tag) { - if (isBuiltInType(tag, 'Teleport')) { - return TELEPORT; - } - else if (isBuiltInType(tag, 'Suspense')) { - return SUSPENSE; - } - else if (isBuiltInType(tag, 'KeepAlive')) { - return KEEP_ALIVE; - } - else if (isBuiltInType(tag, 'BaseTransition')) { - return BASE_TRANSITION; - } + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } } const nonIdentifierRE = /^\d|[^\$\w]/; const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -/** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ const isMemberExpressionBrowser = (path) => { - // remove whitespaces around . or [ first - path = path.trim().replace(whitespaceRE, s => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === '[') { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } - else if (char === '(') { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } - else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `[`) { - currentOpenBracketCount++; - } - else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `(`) { - currentOpenParensCount++; - } - else if (char === `)`) { - // if the exp ends as a call then it should not be considered valid - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; + path = path.trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; } - return !currentOpenBracketCount && !currentOpenParensCount; + } + return !currentOpenBracketCount && !currentOpenParensCount; }; const isMemberExpressionNode = (path, context) => { - try { - let ret = parser.parseExpression(path, { - plugins: context.expressionPlugins - }); - if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') { - ret = ret.expression; - } - return (ret.type === 'MemberExpression' || - ret.type === 'OptionalMemberExpression' || - ret.type === 'Identifier'); - } - catch (e) { - return false; - } - }; + try { + let ret = parser.parseExpression(path, { + plugins: context.expressionPlugins + }); + ret = unwrapTSNode(ret); + return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; + } catch (e) { + return false; + } +}; const isMemberExpression = isMemberExpressionNode; -function getInnerRange(loc, offset, length) { - const source = loc.source.slice(offset, offset + length); - const newLoc = { - source, - start: advancePositionWithClone(loc.start, loc.source, offset), - end: loc.end - }; - if (length != null) { - newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length); - } - return newLoc; -} function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation(shared.extend({}, pos), source, numberOfCharacters); + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); } -// advance by mutation without cloning (for performance reasons), since this -// gets called a lot in the parser function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10 /* newline char code */) { - linesCount++; - lastNewLinePos = i; - } + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = - lastNewLinePos === -1 - ? pos.column + numberOfCharacters - : numberOfCharacters - lastNewLinePos; - return pos; + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; } function assert(condition, msg) { - /* istanbul ignore if */ - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } } function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (allowEmpty || p.exp) && - (shared.isString(name) ? p.name === name : name.test(p.name))) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) { + return p; } + } } function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (dynamicOnly) - continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } - else if (p.name === 'bind' && - (p.exp || allowEmpty) && - isStaticArgOf(p.arg, name)) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) + continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; } + } } function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); + return !!(arg && isStaticExp(arg) && arg.content === name); } function hasDynamicKeyVBind(node) { - return node.props.some(p => p.type === 7 /* DIRECTIVE */ && - p.name === 'bind' && - (!p.arg || // v-bind="obj" - p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo] - !p.arg.isStatic) // v-bind:[foo] - ); + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); } -function isText(node) { - return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */; +function isText$1(node) { + return node.type === 5 || node.type === 2; } function isVSlot(p) { - return p.type === 7 /* DIRECTIVE */ && p.name === 'slot'; + return p.type === 7 && p.name === "slot"; } function isTemplateNode(node) { - return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */); + return node.type === 1 && node.tagType === 3; } function isSlotOutlet(node) { - return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */; + return node.type === 1 && node.tagType === 2; } -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); function getUnnormalizedProps(props, callPath = []) { - if (props && - !shared.isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const callee = props.callee; - if (!shared.isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps(props.arguments[0], callPath.concat(props)); - } + if (props && !shared.isString(props) && props.type === 14) { + const callee = props.callee; + if (!shared.isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); } - return [props, callPath]; + } + return [props, callPath]; } function injectProp(node, prop, context) { - let propsWithInjection; - /** - * 1. mergeProps(...) - * 2. toHandlers(...) - * 3. normalizeProps(...) - * 4. normalizeProps(guardReactiveProps(...)) - * - * we need to get the real props before normalization - */ - let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && - !shared.isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || shared.isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } - else if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // merged props... add ours - // only inject key to object literal if it's the first argument so that - // if doesn't override user provided keys - const first = props.arguments[0]; - if (!shared.isString(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) { - first.properties.unshift(prop); - } - else { - if (props.callee === TO_HANDLERS) { - // #2366 - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } - else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } - else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) { - let alreadyExists = false; - // check existing key to avoid overriding user provided keys - if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) { - const propKeyName = prop.key.content; - alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === propKeyName); - } - if (!alreadyExists) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } - else { - // single v-bind with expression, return a merged replacement + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !shared.isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || shared.isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!shared.isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props + createObjectExpression([prop]), + props ]); - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`, - // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`, - // the `guardReactiveProps` will no longer be needed - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } + } else { + props.arguments.unshift(createObjectExpression([prop])); + } } - if (node.type === 13 /* VNODE_CALL */) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.props = propsWithInjection; - } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); } - else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.arguments[2] = propsWithInjection; - } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; } function toValidAssetId(name, type) { - // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString(); - })}`; + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; } -// Check if a node contains expressions that reference current context scope ids function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1 /* ELEMENT */: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some(c => hasScopeRef(c, ids)); - case 11 /* FOR */: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 9 /* IF */: - return node.branches.some(b => hasScopeRef(b, ids)); - case 10 /* IF_BRANCH */: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 4 /* SIMPLE_EXPRESSION */: - return (!node.isStatic && - isSimpleIdentifier(node.content) && - !!ids[node.content]); - case 8 /* COMPOUND_EXPRESSION */: - return node.children.some(c => shared.isObject(c) && hasScopeRef(c, ids)); - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return hasScopeRef(node.content, ids); - case 2 /* TEXT */: - case 3 /* COMMENT */: - return false; - default: - return false; - } + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + return false; + default: + return false; + } } function getMemoedVNodeCall(node) { - if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } - else { - return node; - } -} -function makeBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } } +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: { - message: `Platform-native elements with "is" prop will no longer be ` + - `treated as components in Vue 3 unless the "is" value is explicitly ` + - `prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: { - message: key => `.sync modifier for v-bind has been removed. Use v-model with ` + - `argument instead. \`v-bind:${key}.sync\` should be changed to ` + - `\`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: { - message: `.prop modifier for v-bind has been removed and no longer necessary. ` + - `Vue 3 will automatically set a binding as DOM property when appropriate.` - }, - ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` + - `object spread: it will now overwrite an existing non-mergeable attribute ` + - `that appears before v-bind in the case of conflict. ` + - `To retain 2.x behavior, move v-bind to make it the first attribute. ` + - `You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: { - message: `v-if / v-for precedence when used on the same element has changed ` + - `in Vue 3: v-if now takes higher precedence and will no longer have ` + - `access to v-for scope variables. It is best to avoid the ambiguity ` + - `with <template> tags or use a computed property that filters v-for ` + - `data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: { - message: `<template> with no special directives will render as a native template ` + - `element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTER" /* COMPILER_FILTERS */]: { - message: `filters have been removed in Vue 3. ` + - `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` + - `Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, context) { - const config = context.options - ? context.options.compatConfig - : context.compatConfig; - const value = config && config[key]; - if (key === 'MODE') { - return value || 3; // compiler defaults to v3 behavior - } - else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue('MODE', context); - const value = getCompatValue(key, context); - // in v3 mode, only enable if explicitly set to true - // otherwise enable for any non-false value - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === 'suppress-warning') { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) - err.loc = loc; - context.onWarn(err); -} - -// The default decoder only provides escapes for characters reserved as part of -// the template syntax, and is only used if the custom renderer did not provide -// a platform-specific decoder. -const decodeRE = /&(gt|lt|amp|apos|quot);/g; -const decodeMap = { - gt: '>', - lt: '<', - amp: '&', - apos: "'", - quot: '"' -}; const defaultParserOptions = { - delimiters: [`{{`, `}}`], - getNamespace: () => 0 /* HTML */, - getTextMode: () => 0 /* DATA */, - isVoidTag: shared.NO, - isPreTag: shared.NO, - isCustomElement: shared.NO, - decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]), - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: false + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: shared.NO, + isPreTag: shared.NO, + isCustomElement: shared.NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: false, + prefixIdentifiers: false }; -function baseParse(content, options = {}) { - const context = createParserContext(content, options); - const start = getCursor(context); - return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start)); -} -function createParserContext(content, rawOptions) { - const options = shared.extend({}, defaultParserOptions); - let key; - for (key in rawOptions) { - // @ts-ignore - options[key] = - rawOptions[key] === undefined - ? defaultParserOptions[key] - : rawOptions[key]; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); } - return { - options, - column: 1, - line: 1, - offset: 0, - originalSource: content, - source: content, - inPre: false, - inVPre: false, - onWarn: options.onWarn + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = decode_js.decodeHTML(exp); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 }; -} -function parseChildren(context, mode, ancestors) { - const parent = last(ancestors); - const ns = parent ? parent.ns : 0 /* HTML */; - const nodes = []; - while (!isEnd(context, mode, ancestors)) { - const s = context.source; - let node = undefined; - if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) { - if (!context.inVPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode); - } - else if (mode === 0 /* DATA */ && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1); - } - else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '<!--')) { - node = parseComment(context); - } - else if (startsWith(s, '<!DOCTYPE')) { - // Ignore DOCTYPE by a limitation. - node = parseBogusComment(context); - } - else if (startsWith(s, '<![CDATA[')) { - if (ns !== 0 /* HTML */) { - node = parseCDATA(context, ancestors); - } - else { - emitError(context, 1 /* CDATA_IN_HTML_CONTENT */); - node = parseBogusComment(context); - } - } - else { - emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */); - node = parseBogusComment(context); - } - } - else if (s[1] === '/') { - // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state - if (s.length === 2) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2); - } - else if (s[2] === '>') { - emitError(context, 14 /* MISSING_END_TAG_NAME */, 2); - advanceBy(context, 3); - continue; - } - else if (/[a-z]/i.test(s[2])) { - emitError(context, 23 /* X_INVALID_END_TAG */); - parseTag(context, 1 /* End */, parent); - continue; - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2); - node = parseBogusComment(context); - } - } - else if (/[a-z]/i.test(s[1])) { - node = parseElement(context, ancestors); - // 2.x <template> with no directive compat - if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context) && - node && - node.tag === 'template' && - !node.props.some(p => p.type === 7 /* DIRECTIVE */ && - isSpecialTemplateDirective(p.name))) { - node = node.children; - } - } - else if (s[1] === '?') { - emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1); - node = parseBogusComment(context); - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1); - } - } - } - if (!node) { - node = parseText(context, mode); - } - if (shared.isArray(node)) { - for (let i = 0; i < node.length; i++) { - pushNode(nodes, node[i]); - } - } - else { - pushNode(nodes, node); + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } } - // Whitespace handling strategy like v2 - let removedWhitespace = false; - if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) { - const shouldCondense = context.options.whitespace !== 'preserve'; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!context.inPre && node.type === 2 /* TEXT */) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1]; - const next = nodes[i + 1]; - // Remove if: - // - the whitespace is the first or last node, or: - // - (condense mode) the whitespace is adjacent to a comment, or: - // - (condense mode) the whitespace is between two elements AND contains newline - if (!prev || - !next || - (shouldCondense && - (prev.type === 3 /* COMMENT */ || - next.type === 3 /* COMMENT */ || - (prev.type === 1 /* ELEMENT */ && - next.type === 1 /* ELEMENT */ && - /[\r\n]/.test(node.content))))) { - removedWhitespace = true; - nodes[i] = null; - } - else { - // Otherwise, the whitespace is condensed into a single space - node.content = ' '; - } - } - else if (shouldCondense) { - // in condense mode, consecutive whitespaces in text are condensed - // down to a single space. - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' '); - } - } - // Remove comment nodes if desired by configuration. - else if (node.type === 3 /* COMMENT */ && !context.options.comments) { - removedWhitespace = true; - nodes[i] = null; - } - } - if (context.inPre && parent && context.options.isPreTag(parent.tag)) { - // remove leading newline per html spec - // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element - const first = nodes[0]; - if (first && first.type === 2 /* TEXT */) { - first.content = first.content.replace(/^\r?\n/, ''); - } - } + }, + onselfclosingtag(end) { + var _a; + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (((_a = stack[0]) == null ? void 0 : _a.tag) === name) { + onCloseTag(stack.shift(), end); } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function pushNode(nodes, node) { - if (node.type === 2 /* TEXT */) { - const prev = last(nodes); - // Merge if both this and the previous node are text and those are - // consecutive. This happens for cases like "a < b". - if (prev && - prev.type === 2 /* TEXT */ && - prev.loc.end.offset === node.loc.start.offset) { - prev.content += node.content; - prev.loc.end = node.loc.end; - prev.loc.source += node.loc.source; - return; - } - } - nodes.push(node); -} -function parseCDATA(context, ancestors) { - advanceBy(context, 9); - const nodes = parseChildren(context, 3 /* CDATA */, ancestors); - if (context.source.length === 0) { - emitError(context, 6 /* EOF_IN_CDATA */); - } - else { - advanceBy(context, 3); - } - return nodes; -} -function parseComment(context) { - const start = getCursor(context); - let content; - // Regular comment. - const match = /--(\!)?>/.exec(context.source); - if (!match) { - content = context.source.slice(4); - advanceBy(context, context.source.length); - emitError(context, 7 /* EOF_IN_COMMENT */); - } - else { - if (match.index <= 3) { - emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */); - } - if (match[1]) { - emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */); - } - content = context.source.slice(4, match.index); - // Advancing with reporting nested comments. - const s = context.source.slice(0, match.index); - let prevIndex = 1, nestedIndex = 0; - while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) { - advanceBy(context, nestedIndex - prevIndex + 1); - if (nestedIndex + 4 < s.length) { - emitError(context, 16 /* NESTED_COMMENT */); - } - prevIndex = nestedIndex + 1; - } - advanceBy(context, match.index + match[0].length - prevIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) }; -} -function parseBogusComment(context) { - const start = getCursor(context); - const contentStart = context.source[1] === '?' ? 1 : 2; - let content; - const closeIndex = context.source.indexOf('>'); - if (closeIndex === -1) { - content = context.source.slice(contentStart); - advanceBy(context, context.source.length); + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); } - else { - content = context.source.slice(contentStart, closeIndex); - advanceBy(context, closeIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) - }; -} -function parseElement(context, ancestors) { - // Start tag. - const wasInPre = context.inPre; - const wasInVPre = context.inVPre; - const parent = last(ancestors); - const element = parseTag(context, 0 /* Start */, parent); - const isPreBoundary = context.inPre && !wasInPre; - const isVPreBoundary = context.inVPre && !wasInVPre; - if (element.isSelfClosing || context.options.isVoidTag(element.tag)) { - // #4030 self-closing <pre> tag - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - // Children. - ancestors.push(element); - const mode = context.options.getTextMode(element, parent); - const children = parseChildren(context, mode, ancestors); - ancestors.pop(); - // 2.x inline-template compat - { - const inlineTemplateProp = element.props.find(p => p.type === 6 /* ATTRIBUTE */ && p.name === 'inline-template'); - if (inlineTemplateProp && - checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) { - const loc = getSelection(context, element.loc.end); - inlineTemplateProp.value = { - type: 2 /* TEXT */, - content: loc.source, - loc - }; - } - } - element.children = children; - // End tag. - if (startsWithEndTagOpen(context.source, element.tag)) { - parseTag(context, 1 /* End */, parent); - } - else { - emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start); - if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { - const first = children[0]; - if (first && startsWith(first.loc.source, '<!--')) { - emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */); - } - } - } - element.loc = getSelection(context, element.loc.start); - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; -} -const isSpecialTemplateDirective = /*#__PURE__*/ shared.makeMap(`if,else,else-if,for,slot`); -function parseTag(context, type, parent) { - // Tag open. - const start = getCursor(context); - const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source); - const tag = match[1]; - const ns = context.options.getNamespace(tag, parent); - advanceBy(context, match[0].length); - advanceSpaces(context); - // save current state in case we need to re-parse attributes with v-pre - const cursor = getCursor(context); - const currentSource = context.source; - // check <pre> tag - if (context.options.isPreTag(tag)) { - context.inPre = true; - } - // Attributes. - let props = parseAttributes(context, type); - // check v-pre - if (type === 0 /* Start */ && - !context.inVPre && - props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) { - context.inVPre = true; - // reset context - shared.extend(context, cursor); - context.source = currentSource; - // re-parse attrs and filter out v-pre itself - props = parseAttributes(context, type).filter(p => p.name !== 'v-pre'); - } - // Tag close. - let isSelfClosing = false; - if (context.source.length === 0) { - emitError(context, 9 /* EOF_IN_TAG */); - } - else { - isSelfClosing = startsWith(context.source, '/>'); - if (type === 1 /* End */ && isSelfClosing) { - emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */); - } - advanceBy(context, isSelfClosing ? 2 : 1); - } - if (type === 1 /* End */) { - return; - } - let tagType = 0 /* ELEMENT */; - if (!context.inVPre) { - if (tag === 'slot') { - tagType = 2 /* SLOT */; - } - else if (tag === 'template') { - if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) { - tagType = 3 /* TEMPLATE */; - } - } - else if (isComponent(tag, props, context)) { - tagType = 1 /* COMPONENT */; - } - } - return { - type: 1 /* ELEMENT */, - ns, - tag, - tagType, - props, - isSelfClosing, - children: [], - loc: getSelection(context, start), - codegenNode: undefined // to be created during transform phase - }; -} -function isComponent(tag, props, context) { - const options = context.options; - if (options.isCustomElement(tag)) { - return false; - } - if (tag === 'component' || - /^[A-Z]/.test(tag) || - isCoreComponent(tag) || - (options.isBuiltInComponent && options.isBuiltInComponent(tag)) || - (options.isNativeTag && !options.isNativeTag(tag))) { - return true; - } - // at this point the tag should be a native tag, but check for potential "is" - // casting - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.name === 'is' && p.value) { - if (p.value.content.startsWith('vue:')) { - return true; - } - else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } - else { - // directive - // v-is (TODO Deprecate) - if (p.name === 'is') { - return true; - } - else if ( - // :is on plain element - only treat as component in compat mode - p.name === 'bind' && - isStaticArgOf(p.arg, 'is') && - true && - checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } -} -function parseAttributes(context, type) { - const props = []; - const attributeNames = new Set(); - while (context.source.length > 0 && - !startsWith(context.source, '>') && - !startsWith(context.source, '/>')) { - if (startsWith(context.source, '/')) { - emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */); - advanceBy(context, 1); - advanceSpaces(context); - continue; - } - if (type === 1 /* End */) { - emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */); - } - const attr = parseAttribute(context, attributeNames); - // Trim whitespace between class - // https://github.com/vuejs/core/issues/4251 - if (attr.type === 6 /* ATTRIBUTE */ && - attr.value && - attr.name === 'class') { - attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim(); - } - if (type === 0 /* Start */) { - props.push(attr); - } - if (/^[^\t\r\n\f />]/.test(context.source)) { - emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */); - } - advanceSpaces(context); - } - return props; -} -function parseAttribute(context, nameSet) { - // Name. - const start = getCursor(context); - const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source); - const name = match[0]; - if (nameSet.has(name)) { - emitError(context, 2 /* DUPLICATE_ATTRIBUTE */); - } - nameSet.add(name); - if (name[0] === '=') { - emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */); - } - { - const pattern = /["'<]/g; - let m; - while ((m = pattern.exec(name))) { - emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index); - } - } - advanceBy(context, name.length); - // Value - let value = undefined; - if (/^[\t\r\n\f ]*=/.test(context.source)) { - advanceSpaces(context); - advanceBy(context, 1); - advanceSpaces(context); - value = parseAttributeValue(context); - if (!value) { - emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */); - } - } - const loc = getSelection(context, start); - if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) { - const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name); - let isPropShorthand = startsWith(name, '.'); - let dirName = match[1] || - (isPropShorthand || startsWith(name, ':') - ? 'bind' - : startsWith(name, '@') - ? 'on' - : 'slot'); - let arg; - if (match[2]) { - const isSlot = dirName === 'slot'; - const startOffset = name.lastIndexOf(match[2]); - const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length)); - let content = match[2]; - let isStatic = true; - if (content.startsWith('[')) { - isStatic = false; - if (!content.endsWith(']')) { - emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */); - content = content.slice(1); - } - else { - content = content.slice(1, content.length - 1); - } - } - else if (isSlot) { - // #1241 special case for v-slot: vuetify relies extensively on slot - // names containing dots. v-slot doesn't have any modifiers and Vue 2.x - // supports such usage so we are keeping it consistent with 2.x. - content += match[3] || ''; - } - arg = { - type: 4 /* SIMPLE_EXPRESSION */, - content, - isStatic, - constType: isStatic - ? 3 /* CAN_STRINGIFY */ - : 0 /* NOT_CONSTANT */, - loc - }; - } - if (value && value.isQuoted) { - const valueLoc = value.loc; - valueLoc.start.offset++; - valueLoc.start.column++; - valueLoc.end = advancePositionWithClone(valueLoc.start, value.content); - valueLoc.source = valueLoc.source.slice(1, -1); - } - const modifiers = match[3] ? match[3].slice(1).split('.') : []; - if (isPropShorthand) - modifiers.push('prop'); - // 2.x compat v-bind:foo.sync -> v-model:foo - if (dirName === 'bind' && arg) { - if (modifiers.includes('sync') && - checkCompatEnabled("COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) { - dirName = 'model'; - modifiers.splice(modifiers.indexOf('sync'), 1); - } - } - return { - type: 7 /* DIRECTIVE */, - name: dirName, - exp: value && { - type: 4 /* SIMPLE_EXPRESSION */, - content: value.content, - isStatic: false, - // Treat as non-constant by default. This can be potentially set to - // other values by `transformExpression` to make it eligible for hoisting. - constType: 0 /* NOT_CONSTANT */, - loc: value.loc - }, - arg, - modifiers, - loc - }; - } - // missing directive name or illegal directive name - if (!context.inVPre && startsWith(name, 'v-')) { - emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */); - } - return { - type: 6 /* ATTRIBUTE */, + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, name, - value: value && { - type: 2 /* TEXT */, - content: value.content, - loc: value.loc - }, - loc - }; -} -function parseAttributeValue(context) { - const start = getCursor(context); - let content; - const quote = context.source[0]; - const isQuoted = quote === `"` || quote === `'`; - if (isQuoted) { - // Quoted value. - advanceBy(context, 1); - const endIndex = context.source.indexOf(quote); - if (endIndex === -1) { - content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */); - } - else { - content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */); - advanceBy(context, 1); + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? ["prop"] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } } + } } - else { - // Unquoted - const match = /^[^\t\r\n\f >]+/.exec(context.source); - if (!match) { - return undefined; - } - const unexpectedChars = /["'<=`]/g; - let m; - while ((m = unexpectedChars.exec(match[0]))) { - emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index); - } - content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */); + }, + ondirarg(start, end) { + if (start === end) + return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); } - return { content, isQuoted, loc: getSelection(context, start) }; -} -function parseInterpolation(context, mode) { - const [open, close] = context.options.delimiters; - const closeIndex = context.source.indexOf(close, open.length); - if (closeIndex === -1) { - emitError(context, 25 /* X_MISSING_INTERPOLATION_END */); - return undefined; + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + currentProp.modifiers.push(mod); } - const start = getCursor(context); - advanceBy(context, open.length); - const innerStart = getCursor(context); - const innerEnd = getCursor(context); - const rawContentLength = closeIndex - open.length; - const rawContent = context.source.slice(0, rawContentLength); - const preTrimContent = parseTextData(context, rawContentLength, mode); - const content = preTrimContent.trim(); - const startOffset = preTrimContent.indexOf(content); - if (startOffset > 0) { - advancePositionWithMutation(innerStart, rawContent, startOffset); + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; } - const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset); - advancePositionWithMutation(innerEnd, rawContent, endOffset); - advanceBy(context, close.length); - return { - type: 5 /* INTERPOLATION */, - content: { - type: 4 /* SIMPLE_EXPRESSION */, - isStatic: false, - // Set `isConstant` to false by default and will decide in transformExpression - constType: 0 /* NOT_CONSTANT */, - content, - loc: getSelection(context, innerStart, innerEnd) - }, - loc: getSelection(context, start) - }; -} -function parseText(context, mode) { - const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]]; - let endIndex = context.source.length; - for (let i = 0; i < endTokens.length; i++) { - const index = context.source.indexOf(endTokens[i], 1); - if (index !== -1 && endIndex > index) { - endIndex = index; - } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); } - const start = getCursor(context); - const content = parseTextData(context, endIndex, mode); - return { - type: 2 /* TEXT */, - content, - loc: getSelection(context, start) - }; -} -/** - * Get text data with a given length from the current location. - * This translates HTML entities in the text data. - */ -function parseTextData(context, length, mode) { - const rawText = context.source.slice(0, length); - advanceBy(context, length); - if (mode === 2 /* RAWTEXT */ || - mode === 3 /* CDATA */ || - !rawText.includes('&')) { - return rawText; - } - else { - // DATA or RCDATA containing "&"". Entity decoding required. - return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */); - } -} -function getCursor(context) { - const { column, line, offset } = context; - return { column, line, offset }; -} -function getSelection(context, start, end) { - end = end || getCursor(context); - return { - start, - end, - source: context.originalSource.slice(start.offset, end.offset) - }; -} -function last(xs) { - return xs[xs.length - 1]; -} -function startsWith(source, searchString) { - return source.startsWith(searchString); -} -function advanceBy(context, numberOfCharacters) { - const { source } = context; - advancePositionWithMutation(context, source, numberOfCharacters); - context.source = source.slice(numberOfCharacters); -} -function advanceSpaces(context) { - const match = /^[\t\r\n\f ]+/.exec(context.source); - if (match) { - advanceBy(context, match[0].length); - } -} -function getNewPosition(context, start, numberOfCharacters) { - return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters); -} -function emitError(context, code, offset, loc = getCursor(context)) { - if (offset) { - loc.offset += offset; - loc.column += offset; - } - context.options.onError(createCompilerError(code, { - start: loc, - end: loc, - source: '' - })); -} -function isEnd(context, mode, ancestors) { - const s = context.source; - switch (mode) { - case 0 /* DATA */: - if (startsWith(s, '</')) { - // TODO: probably bad performance - for (let i = ancestors.length - 1; i >= 0; --i) { - if (startsWithEndTagOpen(s, ancestors[i].tag)) { - return true; - } - } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + { + if (currentProp.name === "for") { + expParseMode = 3 /* Skip */; + } else if (currentProp.name === "slot") { + expParseMode = 1 /* Params */; + } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { + expParseMode = 2 /* Statements */; } - break; - case 1 /* RCDATA */: - case 2 /* RAWTEXT */: { - const parent = last(ancestors); - if (parent && startsWithEndTagOpen(s, parent.tag)) { - return true; - } - break; + } + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.indexOf("sync")) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } } - case 3 /* CDATA */: - if (startsWith(s, ']]>')) { - return true; - } - break; + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } } - return !s; + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) + return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; } -function startsWithEndTagOpen(source, tag) { - return (startsWith(source, '</') && - source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && - /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')); +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if ((lastNode == null ? void 0 : lastNode.type) === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, end + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = shared.extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(el.children, el.tag); + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) + i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + var _a; + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || ((_a = currentOptions.isBuiltInComponent) == null ? void 0 : _a.call(currentOptions, tag)) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + var _a, _b; + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = (_a = nodes[i - 1]) == null ? void 0 : _a.type; + const next = (_b = nodes[i + 1]) == null ? void 0 : _b.type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + if (inPre && tag && currentOptions.isPreTag(tag)) { + const first = nodes[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { + if (isSimpleIdentifier(content)) { + exp.ast = null; + return exp; + } + try { + const plugins = currentOptions.expressionPlugins; + const options = { + plugins: plugins ? [...plugins, "typescript"] : ["typescript"] + }; + if (parseMode === 2 /* Statements */) { + exp.ast = parser.parse(` ${content} `, options).program; + } else if (parseMode === 1 /* Params */) { + exp.ast = parser.parseExpression(`(${content})=>{}`, options); + } else { + exp.ast = parser.parseExpression(`(${content})`, options); + } + } catch (e) { + exp.ast = false; + emitError(45, loc.start.offset, e.message); + } + } + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = shared.extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options == null ? void 0 : options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; } function hoistStatic(root, context) { - walk(root, context, + walk( + root, + context, // Root node is unfortunately non-hoistable due to potential parent // fallthrough attributes. - isSingleElementRoot(root, root.children[0])); + isSingleElementRoot(root, root.children[0]) + ); } function isSingleElementRoot(root, child) { - const { children } = root; - return (children.length === 1 && - child.type === 1 /* ELEMENT */ && - !isSlotOutlet(child)); + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); } function walk(node, context, doNotHoistNode = false) { - const { children } = node; - const originalCount = children.length; - let hoistedCount = 0; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - // only plain elements & text calls are eligible for hoisting. - if (child.type === 1 /* ELEMENT */ && - child.tagType === 0 /* ELEMENT */) { - const constantType = doNotHoistNode - ? 0 /* NOT_CONSTANT */ - : getConstantType(child, context); - if (constantType > 0 /* NOT_CONSTANT */) { - if (constantType >= 2 /* CAN_HOIST */) { - child.codegenNode.patchFlag = - -1 /* HOISTED */ + (``); - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - continue; - } - } - else { - // node may contain dynamic children, but its props may be eligible for - // hoisting. - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - const flag = getPatchFlag(codegenNode); - if ((!flag || - flag === 512 /* NEED_PATCH */ || - flag === 1 /* TEXT */) && - getGeneratedPropsConstantType(child, context) >= - 2 /* CAN_HOIST */) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } + const { children } = node; + const originalCount = children.length; + let hoistedCount = 0; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1 + (``); + child.codegenNode = context.hoist(child.codegenNode); + hoistedCount++; + continue; } - else if (child.type === 12 /* TEXT_CALL */ && - getConstantType(child.content, context) >= 2 /* CAN_HOIST */) { - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - } - // walk further - if (child.type === 1 /* ELEMENT */) { - const isComponent = child.tagType === 1 /* COMPONENT */; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, context); - if (isComponent) { - context.scopes.vSlot--; - } - } - else if (child.type === 11 /* FOR */) { - // Do not hoist v-for single child because it has to be a block - walk(child, context, child.children.length === 1); - } - else if (child.type === 9 /* IF */) { - for (let i = 0; i < child.branches.length; i++) { - // Do not hoist v-if single child because it has to be a block - walk(child.branches[i], context, child.branches[i].children.length === 1); + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = getPatchFlag(codegenNode); + if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } } + } } - if (hoistedCount && context.transformHoist) { - context.transformHoist(children, context, node); + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, context); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, context, child.children.length === 1); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + context, + child.branches[i2].children.length === 1 + ); + } } - // all children were hoisted - the entire children array is hoistable. - if (hoistedCount && - hoistedCount === originalCount && - node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - node.codegenNode && - node.codegenNode.type === 13 /* VNODE_CALL */ && - shared.isArray(node.codegenNode.children)) { - node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children)); + } + if (hoistedCount && context.transformHoist) { + context.transformHoist(children, context, node); + } + if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) { + const hoisted = context.hoist( + createArrayExpression(node.codegenNode.children) + ); + if (context.hmr) { + hoisted.content = `[...${hoisted.content}]`; } + node.codegenNode.children = hoisted; + } } function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1 /* ELEMENT */: - if (node.tagType !== 0 /* ELEMENT */) { - return 0 /* NOT_CONSTANT */; + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") { + return 0; + } + const flag = getPatchFlag(codegenNode); + if (!flag) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } } - const cached = constantCache.get(node); - if (cached !== undefined) { - return cached; + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13 /* VNODE_CALL */) { - return 0 /* NOT_CONSTANT */; - } - if (codegenNode.isBlock && - node.tag !== 'svg' && - node.tag !== 'foreignObject') { - return 0 /* NOT_CONSTANT */; - } - const flag = getPatchFlag(codegenNode); - if (!flag) { - let returnType = 3 /* CAN_STRINGIFY */; - // Element itself has no patch flag. However we still need to check: - // 1. Even for a node with no patch flag, it is possible for it to contain - // non-hoistable expressions that refers to scope variables, e.g. compiler - // injected keys or cached event handlers. Therefore we need to always - // check the codegenNode's props to be sure. - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (generatedPropsType < returnType) { - returnType = generatedPropsType; - } - // 2. its children. - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (childType < returnType) { - returnType = childType; - } - } - // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0 - // type, check if any of the props can cause the type to be lowered - // we can skip can_patch because it's guaranteed by the absence of a - // patchFlag. - if (returnType > 1 /* CAN_SKIP_PATCH */) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (expType < returnType) { - returnType = expType; - } - } - } - } - // only svg/foreignObject could be block here, however if they are - // static then they don't need to be blocks since there will be no - // nested updates. - if (codegenNode.isBlock) { - // except set custom directives. - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType); - return returnType; - } - else { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - case 2 /* TEXT */: - case 3 /* COMMENT */: - return 3 /* CAN_STRINGIFY */; - case 9 /* IF */: - case 11 /* FOR */: - case 10 /* IF_BRANCH */: - return 0 /* NOT_CONSTANT */; - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return getConstantType(node.content, context); - case 4 /* SIMPLE_EXPRESSION */: - return node.constType; - case 8 /* COMPOUND_EXPRESSION */: - let returnType = 3 /* CAN_STRINGIFY */; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (shared.isString(child) || shared.isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0 /* NOT_CONSTANT */) { - return 0 /* NOT_CONSTANT */; - } - else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - default: - return 0 /* NOT_CONSTANT */; - } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (shared.isString(child) || shared.isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + default: + return 0; + } } -const allowHoistedHelperSet = new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS ]); function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 /* JS_CALL_EXPRESSION */ && - !shared.isString(value.callee) && - allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - return getConstantType(arg, context); - } - else if (arg.type === 14 /* JS_CALL_EXPRESSION */) { - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))` - return getConstantTypeOfHelperCall(arg, context); - } + if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); } - return 0 /* NOT_CONSTANT */; + } + return 0; } function getGeneratedPropsConstantType(node, context) { - let returnType = 3 /* CAN_STRINGIFY */; - const props = getNodeProps(node); - if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0 /* NOT_CONSTANT */) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4 /* SIMPLE_EXPRESSION */) { - valueType = getConstantType(value, context); - } - else if (value.type === 14 /* JS_CALL_EXPRESSION */) { - // some helper calls can be hoisted, - // such as the `normalizeProps` generated by the compiler for pre-normalize class, - // in this case we need to respect the ConstantType of the helper's arguments - valueType = getConstantTypeOfHelperCall(value, context); - } - else { - valueType = 0 /* NOT_CONSTANT */; - } - if (valueType === 0 /* NOT_CONSTANT */) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } } - return returnType; + } + return returnType; } function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - return codegenNode.props; - } + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } } function getPatchFlag(node) { - const flag = node.patchFlag; - return flag ? parseInt(flag, 10) : undefined; + const flag = node.patchFlag; + return flag ? parseInt(flag, 10) : void 0; } -function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = shared.NOOP, isCustomElement = shared.NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = shared.EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) { - const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/); - const context = { - // options - selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: new Map(), - components: new Set(), - directives: new Set(), - hoists: [], - imports: [], - constantCache: new Map(), - temps: 0, - cached: 0, - identifiers: Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } - else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - const list = context.parent.children; - const removalIndex = node - ? list.indexOf(node) - : context.currentNode - ? context.childIndex - : -1; - if (!node || node === context.currentNode) { - // current node removed - context.currentNode = null; - context.onNodeRemoved(); - } - else { - // sibling node removed - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: () => { }, - addIdentifiers(exp) { - // identifier tracking only happens in non-browser builds. - { - if (shared.isString(exp)) { - addId(exp); - } - else if (exp.identifiers) { - exp.identifiers.forEach(addId); - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - addId(exp.content); - } - } - }, - removeIdentifiers(exp) { - { - if (shared.isString(exp)) { - removeId(exp); - } - else if (exp.identifiers) { - exp.identifiers.forEach(removeId); - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - removeId(exp.content); - } - } - }, - hoist(exp) { - if (shared.isString(exp)) - exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false) { - return createCacheExpression(context.cached++, exp, isVNode); +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic: hoistStatic2 = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = shared.NOOP, + isCustomElement = shared.NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = shared.EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic: hoistStatic2, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + cached: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); } - }; - { - context.filters = new Set(); - } - function addId(id) { - const { identifiers } = context; - if (identifiers[id] === undefined) { - identifiers[id] = 0; + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); } - identifiers[id]++; + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: shared.NOOP, + addIdentifiers(exp) { + { + if (shared.isString(exp)) { + addId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(addId); + } else if (exp.type === 4) { + addId(exp.content); + } + } + }, + removeIdentifiers(exp) { + { + if (shared.isString(exp)) { + removeId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(removeId); + } else if (exp.type === 4) { + removeId(exp.content); + } + } + }, + hoist(exp) { + if (shared.isString(exp)) + exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false) { + return createCacheExpression(context.cached++, exp, isVNode); } - function removeId(id) { - context.identifiers[id]--; + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + function addId(id) { + const { identifiers } = context; + if (identifiers[id] === void 0) { + identifiers[id] = 0; } - return context; + identifiers[id]++; + } + function removeId(id) { + context.identifiers[id]--; + } + return context; } function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - hoistStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - // finalize meta information - root.helpers = [...context.helpers.keys()]; - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - { - root.filters = [...context.filters]; - } + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + hoistStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } } function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - // if the single child is an element, turn it into a block. - if (isSingleElementRoot(root, child) && child.codegenNode) { - // single element root is never hoisted so codegenNode will never be - // SimpleExpressionNode - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - makeBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } - else { - // - single <slot/>, IfNode, ForNode: already blocks. - // - single text node: always patched. - // root codegen falls through via genNode() - root.codegenNode = child; - } + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; } - else if (children.length > 1) { - // root has multiple nodes - return a fragment block. - let patchFlag = 64 /* STABLE_FRAGMENT */; - shared.PatchFlagNames[64 /* STABLE_FRAGMENT */]; - root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (``), undefined, undefined, true, undefined, false /* isComponent */); - } - else ; + } else if (children.length > 1) { + let patchFlag = 64; + shared.PatchFlagNames[64]; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag + (``), + void 0, + void 0, + true, + void 0, + false + ); + } else ; } function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (shared.isString(child)) - continue; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (shared.isString(child)) + continue; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } } function traverseNode(node, context) { - context.currentNode = node; - // apply transform plugins - const { nodeTransforms } = context; - const exitFns = []; - for (let i = 0; i < nodeTransforms.length; i++) { - const onExit = nodeTransforms[i](node, context); - if (onExit) { - if (shared.isArray(onExit)) { - exitFns.push(...onExit); - } - else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - // node was removed - return; - } - else { - // node may have been replaced - node = context.currentNode; - } + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (shared.isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } } - switch (node.type) { - case 3 /* COMMENT */: - if (!context.ssr) { - // inject import for the Comment symbol, which is needed for creating - // comment nodes with `createVNode` - context.helper(CREATE_COMMENT); - } - break; - case 5 /* INTERPOLATION */: - // no need to traverse, but we need to inject toString helper - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9 /* IF */: - for (let i = 0; i < node.branches.length; i++) { - traverseNode(node.branches[i], context); - } - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - case 1 /* ELEMENT */: - case 0 /* ROOT */: - traverseChildren(node, context); - break; - } - // exit transforms - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); + if (!context.currentNode) { + return; + } else { + node = context.currentNode; } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } } function createStructuralDirectiveTransform(name, fn) { - const matches = shared.isString(name) - ? (n) => n === name - : (n) => name.test(n); - return (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const { props } = node; - // structural directive transforms are not concerned with slots - // as they are handled separately in vSlot.ts - if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) { - // structural directives are removed to avoid infinite recursion - // also we remove them *before* applying so that it can further - // traverse itself in case it moves the node around - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) - exitFns.push(onExit); - } - } - return exitFns; + const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) + exitFns.push(onExit); } - }; + } + return exitFns; + } + }; } const PURE_ANNOTATION = `/*#__PURE__*/`; const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap: sourceMap$1 = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) { - const context = { - mode, - prefixIdentifiers, - sourceMap: sourceMap$1, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.loc.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: undefined, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, node) { - context.code += code; - if (context.map) { - if (node) { - let name; - if (node.type === 4 /* SIMPLE_EXPRESSION */ && !node.isStatic) { - const content = node.content.replace(/^_ctx\./, ''); - if (content !== node.content && isSimpleIdentifier(content)) { - name = content; - } - } - addMapping(node.loc.start, name); - } - advancePositionWithMutation(context, code); - if (node && node.loc !== locStub) { - addMapping(node.loc.end); - } +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + if (context.map) { + if (node) { + let name; + if (node.type === 4 && !node.isStatic) { + const content = node.content.replace(/^_ctx\./, ""); + if (content !== node.content && isSimpleIdentifier(content)) { + name = content; } - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } - else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); + } + addMapping(node.loc.start, name); } - }; - function newline(n) { - context.push('\n' + ` `.repeat(n)); - } - function addMapping(loc, name) { - context.map.addMapping({ - name, - source: context.filename, - original: { - line: loc.line, - column: loc.column - 1 // source-map column is 0 based - }, - generated: { - line: context.line, - column: context.column - 1 + if (newlineIndex === -3 /* Unknown */) { + advancePositionWithMutation(context, code); + } else { + context.offset += code.length; + if (newlineIndex === -2 /* None */) { + context.column += code.length; + } else { + if (newlineIndex === -1 /* End */) { + newlineIndex = code.length - 1; } - }); + context.line++; + context.column = code.length - newlineIndex; + } + } + if (node && node.loc !== locStub) { + addMapping(node.loc.end); + } + } + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); } - if (sourceMap$1) { - // lazy require source-map implementation, only in non-browser builds - context.map = new sourceMap.SourceMapGenerator(); - context.map.setSourceContent(filename, context.source); - } - return context; + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + function addMapping(loc, name = null) { + const { _names, _mappings } = context.map; + if (name !== null && !_names.has(name)) + _names.add(name); + _mappings.add({ + originalLine: loc.line, + originalColumn: loc.column - 1, + // source-map column is 0 based + generatedLine: context.line, + generatedColumn: context.column - 1, + source: filename, + // @ts-expect-error it is possible to be null + name + }); + } + if (sourceMap) { + context.map = new sourceMapJs.SourceMapGenerator(); + context.map.setSourceContent(filename, context.source); + context.map._sources.add(filename); + } + return context; } function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) - options.onContextCreated(context); - const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context; - const hasHelpers = ast.helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== 'module'; - const genScopeId = scopeId != null && mode === 'module'; - const isSetupInlined = !!options.inline; - // preambles - // in setup() inline mode, the preamble is generated in a sub context - // and returned separately. - const preambleContext = isSetupInlined - ? createCodegenContext(ast, options) - : context; - if (mode === 'module') { - genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); - } - else { - genFunctionPreamble(ast, preambleContext); - } - // enter render function - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache']; - if (options.bindingMetadata && !options.inline) { - // binding optimization args - args.push('$props', '$setup', '$data', '$options'); - } - const signature = options.isTS - ? args.map(arg => `${arg}: any`).join(',') - : args.join(', '); - if (isSetupInlined) { - push(`(${signature}) => {`); - } - else { - push(`function ${functionName}(${signature}) {`); - } + const context = createCodegenContext(ast, options); + if (options.onContextCreated) + options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const genScopeId = scopeId != null && mode === "module"; + const isSetupInlined = !!options.inline; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + if (mode === "module") { + genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); + } else { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + if (options.bindingMetadata && !options.inline) { + args.push("$props", "$setup", "$data", "$options"); + } + const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); + if (isSetupInlined) { + push(`(${signature}) => {`); + } else { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - // function mode const declarations should be inside with block - // also they should be renamed to avoid collision with user properties - if (hasHelpers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`); - push(`\n`); - newline(); - } + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); } - // generate asset resolution statements - if (ast.components.length) { - genAssets(ast.components, 'component', context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, 'directive', context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, 'filter', context); - newline(); + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } + newline(); } - if (ast.components.length || ast.directives.length || ast.temps) { - push(`\n`); - newline(); - } - // generate the VNode tree expression - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } - else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { deindent(); push(`}`); - return { - ast, - code: context.code, - preamble: isSetupInlined ? preambleContext.code : ``, - // SourceMapGenerator does have toJSON() method but it's not in the types - map: context.map ? context.map.toJSON() : undefined - }; + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; } function genFunctionPreamble(ast, context) { - const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context; - const VueBinding = ssr - ? `require(${JSON.stringify(runtimeModuleName)})` - : runtimeGlobalName; - // Generate const declaration for helpers - // In prefix mode, we place the const declaration at top so it's done - // only once; But if we not prefixing, we place the declaration inside the - // with block so it doesn't incur the `in` check cost for every helper access. - if (ast.helpers.length > 0) { - if (prefixIdentifiers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = ${VueBinding}\n`); - } - else { - // "with" mode. - // save Vue in a separate variable to avoid collision - push(`const _Vue = ${VueBinding}\n`); - // in "with" mode, helpers are declared inside the with block to avoid - // has check cost, but hoists are lifted out of the function - we need - // to provide the helper here. - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ] - .filter(helper => ast.helpers.includes(helper)) - .map(aliasHelper) - .join(', '); - push(`const { ${staticHelpers} } = _Vue\n`); - } - } + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + if (prefixIdentifiers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} +`, + -1 /* End */ + ); + } else { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } } - // generate variables for ssr helpers - if (ast.ssrHelpers && ast.ssrHelpers.length) { - // ssr guarantees prefixIdentifier: true - push(`const { ${ast.ssrHelpers - .map(aliasHelper) - .join(', ')} } = require("${ssrRuntimeModuleName}")\n`); - } - genHoists(ast.hoists, context); - newline(); - push(`return `); + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") +`, + -1 /* End */ + ); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); } function genModulePreamble(ast, context, genScopeId, inline) { - const { push, newline, optimizeImports, runtimeModuleName, ssrRuntimeModuleName } = context; - if (genScopeId && ast.hoists.length) { - ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID); + const { + push, + newline, + optimizeImports, + runtimeModuleName, + ssrRuntimeModuleName + } = context; + if (genScopeId && ast.hoists.length) { + ast.helpers.add(PUSH_SCOPE_ID); + ast.helpers.add(POP_SCOPE_ID); + } + if (ast.helpers.size) { + const helpers = Array.from(ast.helpers); + if (optimizeImports) { + push( + `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + push( + ` +// Binding optimization for webpack code-split +const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} +`, + -1 /* End */ + ); + } else { + push( + `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); } - // generate import statements for helpers - if (ast.helpers.length) { - if (optimizeImports) { - // when bundled with webpack with code-split, calling an import binding - // as a function leads to it being wrapped with `Object(a.b)` or `(0,a.b)`, - // incurring both payload size increase and potential perf overhead. - // therefore we assign the imports to variables (which is a constant ~50b - // cost per-component instead of scaling with template size) - push(`import { ${ast.helpers - .map(s => helperNameMap[s]) - .join(', ')} } from ${JSON.stringify(runtimeModuleName)}\n`); - push(`\n// Binding optimization for webpack code-split\nconst ${ast.helpers - .map(s => `_${helperNameMap[s]} = ${helperNameMap[s]}`) - .join(', ')}\n`); - } - else { - push(`import { ${ast.helpers - .map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`) - .join(', ')} } from ${JSON.stringify(runtimeModuleName)}\n`); - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push(`import { ${ast.ssrHelpers - .map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`) - .join(', ')} } from "${ssrRuntimeModuleName}"\n`); - } - if (ast.imports.length) { - genImports(ast.imports, context); - newline(); - } - genHoists(ast.hoists, context); + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" +`, + -1 /* End */ + ); + } + if (ast.imports.length) { + genImports(ast.imports, context); newline(); - if (!inline) { - push(`export `); - } + } + genHoists(ast.hoists, context); + newline(); + if (!inline) { + push(`export `); + } } function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper(type === 'filter' - ? RESOLVE_FILTER - : type === 'component' - ? RESOLVE_COMPONENT - : RESOLVE_DIRECTIVE); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - // potential component implicit self-reference inferred from SFC filename - const maybeSelfReference = id.endsWith('__self'); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`); - if (i < assets.length - 1) { - newline(); - } + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } } function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline, helper, scopeId, mode } = context; - const genScopeId = scopeId != null && mode !== 'function'; + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline, helper, scopeId, mode } = context; + const genScopeId = scopeId != null && mode !== "function"; + newline(); + if (genScopeId) { + push( + `const _withScopeId = n => (${helper( + PUSH_SCOPE_ID + )}("${scopeId}"),n=n(),${helper(POP_SCOPE_ID)}(),n)` + ); newline(); - // generate inlined withScopeId helper - if (genScopeId) { - push(`const _withScopeId = n => (${helper(PUSH_SCOPE_ID)}("${scopeId}"),n=n(),${helper(POP_SCOPE_ID)}(),n)`); - newline(); + } + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + const needScopeIdWrapper = genScopeId && exp.type === 13; + push( + `const _hoisted_${i + 1} = ${needScopeIdWrapper ? `${PURE_ANNOTATION} _withScopeId(() => ` : ``}` + ); + genNode(exp, context); + if (needScopeIdWrapper) { + push(`)`); + } + newline(); } - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - const needScopeIdWrapper = genScopeId && exp.type === 13 /* VNODE_CALL */; - push(`const _hoisted_${i + 1} = ${needScopeIdWrapper ? `${PURE_ANNOTATION} _withScopeId(() => ` : ``}`); - genNode(exp, context); - if (needScopeIdWrapper) { - push(`)`); - } - newline(); - } - } - context.pure = false; + } + context.pure = false; } function genImports(importsOptions, context) { - if (!importsOptions.length) { - return; - } - importsOptions.forEach(imports => { - context.push(`import `); - genNode(imports.exp, context); - context.push(` from '${imports.path}'`); - context.newline(); - }); + if (!importsOptions.length) { + return; + } + importsOptions.forEach((imports) => { + context.push(`import `); + genNode(imports.exp, context); + context.push(` from '${imports.path}'`); + context.newline(); + }); } -function isText$1(n) { - return (shared.isString(n) || - n.type === 4 /* SIMPLE_EXPRESSION */ || - n.type === 2 /* TEXT */ || - n.type === 5 /* INTERPOLATION */ || - n.type === 8 /* COMPOUND_EXPRESSION */); +function isText(n) { + return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; } function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || - (nodes.some(n => shared.isArray(n) || !isText$1(n))); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); + const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); } function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (shared.isString(node)) { - push(node); - } - else if (shared.isArray(node)) { - genNodeListAsArray(node, context); - } - else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(','); - newline(); - } - else { - comma && push(', '); - } - } + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (shared.isString(node)) { + push(node, -3 /* Unknown */); + } else if (shared.isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } } function genNode(node, context) { - if (shared.isString(node)) { - context.push(node); - return; - } - if (shared.isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1 /* ELEMENT */: - case 9 /* IF */: - case 11 /* FOR */: - genNode(node.codegenNode, context); - break; - case 2 /* TEXT */: - genText(node, context); - break; - case 4 /* SIMPLE_EXPRESSION */: - genExpression(node, context); - break; - case 5 /* INTERPOLATION */: - genInterpolation(node, context); - break; - case 12 /* TEXT_CALL */: - genNode(node.codegenNode, context); - break; - case 8 /* COMPOUND_EXPRESSION */: - genCompoundExpression(node, context); - break; - case 3 /* COMMENT */: - genComment(node, context); - break; - case 13 /* VNODE_CALL */: - genVNodeCall(node, context); - break; - case 14 /* JS_CALL_EXPRESSION */: - genCallExpression(node, context); - break; - case 15 /* JS_OBJECT_EXPRESSION */: - genObjectExpression(node, context); - break; - case 17 /* JS_ARRAY_EXPRESSION */: - genArrayExpression(node, context); - break; - case 18 /* JS_FUNCTION_EXPRESSION */: - genFunctionExpression(node, context); - break; - case 19 /* JS_CONDITIONAL_EXPRESSION */: - genConditionalExpression(node, context); - break; - case 20 /* JS_CACHE_EXPRESSION */: - genCacheExpression(node, context); - break; - case 21 /* JS_BLOCK_STATEMENT */: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22 /* JS_TEMPLATE_LITERAL */: - genTemplateLiteral(node, context); - break; - case 23 /* JS_IF_STATEMENT */: - genIfStatement(node, context); - break; - case 24 /* JS_ASSIGNMENT_EXPRESSION */: - genAssignmentExpression(node, context); - break; - case 25 /* JS_SEQUENCE_EXPRESSION */: - genSequenceExpression(node, context); - break; - case 26 /* JS_RETURN_STATEMENT */: - genReturnStatement(node, context); - break; - } + if (shared.isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (shared.isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + case 22: + genTemplateLiteral(node, context); + break; + case 23: + genIfStatement(node, context); + break; + case 24: + genAssignmentExpression(node, context); + break; + case 25: + genSequenceExpression(node, context); + break; + case 26: + genReturnStatement(node, context); + break; + } } function genText(node, context) { - context.push(JSON.stringify(node.content), node); + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); } function genExpression(node, context) { - const { content, isStatic } = node; - context.push(isStatic ? JSON.stringify(content) : content, node); + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); } function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) - push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); + const { push, helper, pure } = context; + if (pure) + push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); } function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (shared.isString(child)) { - context.push(child); - } - else { - genNode(child, context); - } + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (shared.isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); } + } } function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8 /* COMPOUND_EXPRESSION */) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } - else if (node.isStatic) { - // only quote keys if necessary - const text = isSimpleIdentifier(node.content) - ? node.content - : JSON.stringify(node.content); - push(text, node); - } - else { - push(`[${node.content}]`, node); - } + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } } function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node); + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); } function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node; - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock - ? getVNodeBlockHelper(context.inSSR, isComponent) - : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, node); - genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context); + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlag, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } } function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) - break; - } - return args.slice(0, i + 1).map(arg => arg || `null`); + let i = args.length; + while (i--) { + if (args[i] != null) + break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); } -// JavaScript function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = shared.isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, node); - genNodeList(node.arguments, context); - push(`)`); + const { push, helper, pure } = context; + const callee = shared.isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); } function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, node); - return; + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); } - const multilines = properties.length > 1 || - (properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */)); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - // key - genExpressionAsPropertyKey(key, context); - push(`: `); - // value - genNode(value, context); - if (i < properties.length - 1) { - // will only reach this if it's multilines - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); + } + multilines && deindent(); + push(multilines ? `}` : ` }`); } function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); + genNodeListAsArray(node.elements, context); } function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - // wrap slot functions with owner context - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, node); - if (shared.isArray(params)) { - genNodeList(params, context); - } - else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (shared.isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } - } - else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4 /* SIMPLE_EXPRESSION */) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } - else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent(true /* without newline */); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - push(`_cache[${node.index}] || (`); - if (node.isVNode) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1),`); - newline(); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (node.isVNode) { - push(`,`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); -} -function genTemplateLiteral(node, context) { - const { push, indent, deindent } = context; - push('`'); - const l = node.elements.length; - const multilines = l > 3; - for (let i = 0; i < l; i++) { - const e = node.elements[i]; - if (shared.isString(e)) { - push(e.replace(/(`|\$|\\)/g, '\\$1')); - } - else { - push('${'); - if (multilines) - indent(); - genNode(e, context); - if (multilines) - deindent(); - push('}'); - } - } - push('`'); -} -function genIfStatement(node, context) { - const { push, indent, deindent } = context; - const { test, consequent, alternate } = node; - push(`if (`); - genNode(test, context); - push(`) {`); + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (shared.isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); indent(); - genNode(consequent, context); + } + if (returns) { + if (newline) { + push(`return `); + } + if (shared.isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { deindent(); push(`}`); - if (alternate) { - push(` else `); - if (alternate.type === 23 /* JS_IF_STATEMENT */) { - genIfStatement(alternate, context); - } - else { - push(`{`); - indent(); - genNode(alternate, context); - deindent(); - push(`}`); - } + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); } + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + push(`_cache[${node.index}] || (`); + if (node.isVNode) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1),`); + newline(); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (node.isVNode) { + push(`,`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); +} +function genTemplateLiteral(node, context) { + const { push, indent, deindent } = context; + push("`"); + const l = node.elements.length; + const multilines = l > 3; + for (let i = 0; i < l; i++) { + const e = node.elements[i]; + if (shared.isString(e)) { + push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); + } else { + push("${"); + if (multilines) + indent(); + genNode(e, context); + if (multilines) + deindent(); + push("}"); + } + } + push("`"); +} +function genIfStatement(node, context) { + const { push, indent, deindent } = context; + const { test, consequent, alternate } = node; + push(`if (`); + genNode(test, context); + push(`) {`); + indent(); + genNode(consequent, context); + deindent(); + push(`}`); + if (alternate) { + push(` else `); + if (alternate.type === 23) { + genIfStatement(alternate, context); + } else { + push(`{`); + indent(); + genNode(alternate, context); + deindent(); + push(`}`); + } + } } function genAssignmentExpression(node, context) { - genNode(node.left, context); - context.push(` = `); - genNode(node.right, context); + genNode(node.left, context); + context.push(` = `); + genNode(node.right, context); } function genSequenceExpression(node, context) { - context.push(`(`); - genNodeList(node.expressions, context); - context.push(`)`); + context.push(`(`); + genNodeList(node.expressions, context); + context.push(`)`); } function genReturnStatement({ returns }, context) { - context.push(`return `); - if (shared.isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } + context.push(`return `); + if (shared.isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } } -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = Object.create(null)) { - const rootExp = root.type === 'Program' && - root.body[0].type === 'ExpressionStatement' && - root.body[0].expression; - estreeWalker.walk(root, { - enter(node, parent) { - parent && parentStack.push(parent); - if (parent && - parent.type.startsWith('TS') && - parent.type !== 'TSAsExpression' && - parent.type !== 'TSNonNullExpression' && - parent.type !== 'TSTypeAssertion') { - return this.skip(); - } - if (node.type === 'Identifier') { - const isLocal = !!knownIds[node.name]; - const isRefed = isReferencedIdentifier(node, parent, parentStack); - if (includeAll || (isRefed && !isLocal)) { - onIdentifier(node, parent, parentStack, isRefed, isLocal); - } - } - else if (node.type === 'ObjectProperty' && - parent.type === 'ObjectPattern') { - node.inPattern = true; - } - else if (isFunctionType(node)) { - // walk function expressions and add its arguments to known identifiers - // so that we don't prefix them - walkFunctionParams(node, id => markScopeIdentifier(node, id, knownIds)); - } - else if (node.type === 'BlockStatement') { - // #3445 record block-level local variables - walkBlockDeclarations(node, id => markScopeIdentifier(node, id, knownIds)); - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if (node !== rootExp && node.scopeIds) { - for (const id of node.scopeIds) { - knownIds[id]--; - if (knownIds[id] === 0) { - delete knownIds[id]; - } - } - } - } - }); -} -function isReferencedIdentifier(id, parent, parentStack) { - if (!parent) { - return true; - } - // is a special keyword but parsed as identifier - if (id.name === 'arguments') { - return false; - } - if (isReferenced(id, parent)) { - return true; - } - // babel's isReferenced check returns false for ids being assigned to, so we - // need to cover those cases here - switch (parent.type) { - case 'AssignmentExpression': - case 'AssignmentPattern': - return true; - case 'ObjectPattern': - case 'ArrayPattern': - return isInDestructureAssignment(parent, parentStack); - } - return false; -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && - (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern')) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === 'AssignmentExpression') { - return true; - } - else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) { - break; - } - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === 'VariableDeclaration') { - if (stmt.declare) - continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } - else if (stmt.type === 'FunctionDeclaration' || - stmt.type === 'ClassDeclaration') { - if (stmt.declare || !stmt.id) - continue; - onIdent(stmt.id); - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case 'Identifier': - nodes.push(param); - break; - case 'MemberExpression': - let object = param; - while (object.type === 'MemberExpression') { - object = object.object; - } - nodes.push(object); - break; - case 'ObjectPattern': - for (const prop of param.properties) { - if (prop.type === 'RestElement') { - extractIdentifiers(prop.argument, nodes); - } - else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case 'ArrayPattern': - param.elements.forEach(element => { - if (element) - extractIdentifiers(element, nodes); - }); - break; - case 'RestElement': - extractIdentifiers(param.argument, nodes); - break; - case 'AssignmentPattern': - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -function markScopeIdentifier(node, child, knownIds) { - const { name } = child; - if (node.scopeIds && node.scopeIds.has(name)) { - return; - } - if (name in knownIds) { - knownIds[name]++; - } - else { - knownIds[name] = 1; - } - (node.scopeIds || (node.scopeIds = new Set())).add(name); -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && - (node.type === 'ObjectProperty' || node.type === 'ObjectMethod') && - !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; -/** - * Copied from https://github.com/babel/babel/blob/main/packages/babel-types/src/validators/isReferenced.ts - * To avoid runtime dependency on @babel/types (which includes process references) - * This file should not change very often in babel but we may need to keep it - * up-to-date from time to time. - * - * https://github.com/babel/babel/blob/main/LICENSE - * - */ -function isReferenced(node, parent, grandparent) { - switch (parent.type) { - // yes: PARENT[NODE] - // yes: NODE.child - // no: parent.NODE - case 'MemberExpression': - case 'OptionalMemberExpression': - if (parent.property === node) { - return !!parent.computed; - } - return parent.object === node; - case 'JSXMemberExpression': - return parent.object === node; - // no: let NODE = init; - // yes: let id = NODE; - case 'VariableDeclarator': - return parent.init === node; - // yes: () => NODE - // no: (NODE) => {} - case 'ArrowFunctionExpression': - return parent.body === node; - // no: class { #NODE; } - // no: class { get #NODE() {} } - // no: class { #NODE() {} } - // no: class { fn() { return this.#NODE; } } - case 'PrivateName': - return false; - // no: class { NODE() {} } - // yes: class { [NODE]() {} } - // no: class { foo(NODE) {} } - case 'ClassMethod': - case 'ClassPrivateMethod': - case 'ObjectMethod': - if (parent.key === node) { - return !!parent.computed; - } - return false; - // yes: { [NODE]: "" } - // no: { NODE: "" } - // depends: { NODE } - // depends: { key: NODE } - case 'ObjectProperty': - if (parent.key === node) { - return !!parent.computed; - } - // parent.value === node - return !grandparent || grandparent.type !== 'ObjectPattern'; - // no: class { NODE = value; } - // yes: class { [NODE] = value; } - // yes: class { key = NODE; } - case 'ClassProperty': - if (parent.key === node) { - return !!parent.computed; - } - return true; - case 'ClassPrivateProperty': - return parent.key !== node; - // no: class NODE {} - // yes: class Foo extends NODE {} - case 'ClassDeclaration': - case 'ClassExpression': - return parent.superClass === node; - // yes: left = NODE; - // no: NODE = right; - case 'AssignmentExpression': - return parent.right === node; - // no: [NODE = foo] = []; - // yes: [foo = NODE] = []; - case 'AssignmentPattern': - return parent.right === node; - // no: NODE: for (;;) {} - case 'LabeledStatement': - return false; - // no: try {} catch (NODE) {} - case 'CatchClause': - return false; - // no: function foo(...NODE) {} - case 'RestElement': - return false; - case 'BreakStatement': - case 'ContinueStatement': - return false; - // no: function NODE() {} - // no: function foo(NODE) {} - case 'FunctionDeclaration': - case 'FunctionExpression': - return false; - // no: export NODE from "foo"; - // no: export * as NODE from "foo"; - case 'ExportNamespaceSpecifier': - case 'ExportDefaultSpecifier': - return false; - // no: export { foo as NODE }; - // yes: export { NODE as foo }; - // no: export { NODE as foo } from "foo"; - case 'ExportSpecifier': - // @ts-expect-error - if (grandparent === null || grandparent === void 0 ? void 0 : grandparent.source) { - return false; - } - return parent.local === node; - // no: import NODE from "foo"; - // no: import * as NODE from "foo"; - // no: import { NODE as foo } from "foo"; - // no: import { foo as NODE } from "foo"; - // no: import NODE from "bar"; - case 'ImportDefaultSpecifier': - case 'ImportNamespaceSpecifier': - case 'ImportSpecifier': - return false; - // no: import "foo" assert { NODE: "json" } - case 'ImportAttribute': - return false; - // no: <div NODE="foo" /> - case 'JSXAttribute': - return false; - // no: [NODE] = []; - // no: ({ NODE }) = []; - case 'ObjectPattern': - case 'ArrayPattern': - return false; - // no: new.NODE - // no: NODE.target - case 'MetaProperty': - return false; - // yes: type X = { someProperty: NODE } - // no: type X = { NODE: OtherType } - case 'ObjectTypeProperty': - return parent.key !== node; - // yes: enum X { Foo = NODE } - // no: enum X { NODE } - case 'TSEnumMember': - return parent.id !== node; - // yes: { [NODE]: value } - // no: { NODE: value } - case 'TSPropertySignature': - if (parent.key === node) { - return !!parent.computed; - } - return true; - } - return true; -} - -const isLiteralWhitelisted = /*#__PURE__*/ shared.makeMap('true,false,null,this'); +const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this"); +const constantBailRE = /\w\s*\(|\.[^\d]/; const transformExpression = (node, context) => { - if (node.type === 5 /* INTERPOLATION */) { - node.content = processExpression(node.content, context); - } - else if (node.type === 1 /* ELEMENT */) { - // handle directives on element - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - // do not process for v-on & v-for since they are special handled - if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') { - const exp = dir.exp; - const arg = dir.arg; - // do not process exp if this is v-on:arg - we need special handling - // for wrapping inline statements. - if (exp && - exp.type === 4 /* SIMPLE_EXPRESSION */ && - !(dir.name === 'on' && arg)) { - dir.exp = processExpression(exp, context, - // slot args must be processed as function params - dir.name === 'slot'); - } - if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg)) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } } + } }; -// Important: since this function uses Node.js only dependencies, it should -// always be used with a leading !false check so that it can be -// tree-shaken from the browser build. -function processExpression(node, context, -// some expressions like v-slot props & v-for aliases should be parsed as -// function params -asParams = false, -// v-on handler values may contain multiple statements -asRawStatements = false, localVars = Object.create(context.identifiers)) { - if (!context.prefixIdentifiers || !node.content.trim()) { - return node; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + if (!context.prefixIdentifiers || !node.content.trim()) { + return node; + } + const { inline, bindingMetadata } = context; + const rewriteIdentifier = (raw, parent, id) => { + const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; + if (inline) { + const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; + const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; + const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); + const isNewExpression = parent && isInNewExpression(parentStack); + const wrapWithUnref = (raw2) => { + const wrapped = `${context.helperString(UNREF)}(${raw2})`; + return isNewExpression ? `(${wrapped})` : wrapped; + }; + if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { + return raw; + } else if (type === "setup-ref") { + return `${raw}.value`; + } else if (type === "setup-maybe-ref") { + return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); + } else if (type === "setup-let") { + if (isAssignmentLVal) { + const { right: rVal, operator } = parent; + const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); + const rExpString = stringifyExpression( + processExpression( + createSimpleExpression(rExp, false), + context, + false, + false, + knownIds + ) + ); + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; + } else if (isUpdateArg) { + id.start = parent.start; + id.end = parent.end; + const { prefix: isPrefix, operator } = parent; + const prefix = isPrefix ? operator : ``; + const postfix = isPrefix ? `` : operator; + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; + } else if (isDestructureAssignment) { + return raw; + } else { + return wrapWithUnref(raw); + } + } else if (type === "props") { + return shared.genPropsAccessExp(raw); + } else if (type === "props-aliased") { + return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]); + } + } else { + if (type && type.startsWith("setup") || type === "literal-const") { + return `$setup.${raw}`; + } else if (type === "props-aliased") { + return `$props['${bindingMetadata.__propsAliases[raw]}']`; + } else if (type) { + return `$${type}.${raw}`; + } } - const { inline, bindingMetadata } = context; - const rewriteIdentifier = (raw, parent, id) => { - const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; - if (inline) { - // x = y - const isAssignmentLVal = parent && parent.type === 'AssignmentExpression' && parent.left === id; - // x++ - const isUpdateArg = parent && parent.type === 'UpdateExpression' && parent.argument === id; - // ({ x } = y) - const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); - if (type === "setup-const" /* SETUP_CONST */ || - type === "setup-reactive-const" /* SETUP_REACTIVE_CONST */ || - localVars[raw]) { - return raw; - } - else if (type === "setup-ref" /* SETUP_REF */) { - return `${raw}.value`; - } - else if (type === "setup-maybe-ref" /* SETUP_MAYBE_REF */) { - // const binding that may or may not be ref - // if it's not a ref, then assignments don't make sense - - // so we ignore the non-ref assignment case and generate code - // that assumes the value to be a ref for more efficiency - return isAssignmentLVal || isUpdateArg || isDestructureAssignment - ? `${raw}.value` - : `${context.helperString(UNREF)}(${raw})`; - } - else if (type === "setup-let" /* SETUP_LET */) { - if (isAssignmentLVal) { - // let binding. - // this is a bit more tricky as we need to cover the case where - // let is a local non-ref value, and we need to replicate the - // right hand side value. - // x = y --> isRef(x) ? x.value = y : x = y - const { right: rVal, operator } = parent; - const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); - const rExpString = stringifyExpression(processExpression(createSimpleExpression(rExp, false), context, false, false, knownIds)); - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore\n` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; - } - else if (isUpdateArg) { - // make id replace parent in the code range so the raw update operator - // is removed - id.start = parent.start; - id.end = parent.end; - const { prefix: isPrefix, operator } = parent; - const prefix = isPrefix ? operator : ``; - const postfix = isPrefix ? `` : operator; - // let binding. - // x++ --> isRef(a) ? a.value++ : a++ - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore\n` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; - } - else if (isDestructureAssignment) { - // TODO - // let binding in a destructure assignment - it's very tricky to - // handle both possible cases here without altering the original - // structure of the code, so we just assume it's not a ref here - // for now - return raw; - } - else { - return `${context.helperString(UNREF)}(${raw})`; - } - } - else if (type === "props" /* PROPS */) { - // use __props which is generated by compileScript so in ts mode - // it gets correct type - return shared.genPropsAccessExp(raw); - } - else if (type === "props-aliased" /* PROPS_ALIASED */) { - // prop with a different local alias (from defineProps() destructure) - return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]); - } - } - else { - if (type && type.startsWith('setup')) { - // setup bindings in non-inline mode - return `$setup.${raw}`; - } - else if (type === "props-aliased" /* PROPS_ALIASED */) { - return `$props['${bindingMetadata.__propsAliases[raw]}']`; - } - else if (type) { - return `$${type}.${raw}`; - } - } - // fallback to ctx - return `_ctx.${raw}`; - }; - // fast path if expression is a simple identifier. - const rawExp = node.content; - // bail constant on parens (function invocation) and dot (member access) - const bailConstant = rawExp.indexOf(`(`) > -1 || rawExp.indexOf('.') > 0; - if (isSimpleIdentifier(rawExp)) { - const isScopeVarReference = context.identifiers[rawExp]; - const isAllowedGlobal = shared.isGloballyWhitelisted(rawExp); - const isLiteral = isLiteralWhitelisted(rawExp); - if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) { - // const bindings exposed from setup can be skipped for patching but - // cannot be hoisted to module scope - if (bindingMetadata[node.content] === "setup-const" /* SETUP_CONST */) { - node.constType = 1 /* CAN_SKIP_PATCH */; - } - node.content = rewriteIdentifier(rawExp); - } - else if (!isScopeVarReference) { - if (isLiteral) { - node.constType = 3 /* CAN_STRINGIFY */; - } - else { - node.constType = 2 /* CAN_HOIST */; - } - } - return node; + return `_ctx.${raw}`; + }; + const rawExp = node.content; + const bailConstant = constantBailRE.test(rawExp); + let ast = node.ast; + if (ast === false) { + return node; + } + if (ast === null || !ast && isSimpleIdentifier(rawExp)) { + const isScopeVarReference = context.identifiers[rawExp]; + const isAllowedGlobal = shared.isGloballyAllowed(rawExp); + const isLiteral = isLiteralWhitelisted(rawExp); + if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { + if (isConst(bindingMetadata[rawExp])) { + node.constType = 1; + } + node.content = rewriteIdentifier(rawExp); + } else if (!isScopeVarReference) { + if (isLiteral) { + node.constType = 3; + } else { + node.constType = 2; + } } - let ast; - // exp needs to be parsed differently: - // 1. Multiple inline statements (v-on, with presence of `;`): parse as raw - // exp, but make sure to pad with spaces for consistent ranges - // 2. Expressions: wrap with parens (for e.g. object expressions) - // 3. Function arguments (v-for, v-slot): place in a function argument position - const source = asRawStatements - ? ` ${rawExp} ` - : `(${rawExp})${asParams ? `=>{}` : ``}`; + return node; + } + if (!ast) { + const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; try { - ast = parser.parse(source, { - plugins: context.expressionPlugins - }).program; + ast = parser.parse(source, { + plugins: context.expressionPlugins + }).program; + } catch (e) { + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + e.message + ) + ); + return node; } - catch (e) { - context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, e.message)); - return node; + } + const ids = []; + const parentStack = []; + const knownIds = Object.create(context.identifiers); + walkIdentifiers( + ast, + (node2, parent, _, isReferenced, isLocal) => { + if (isStaticPropertyKey(node2, parent)) { + return; + } + if (node2.name.startsWith("_filter_")) { + return; + } + const needPrefix = isReferenced && canPrefix(node2); + if (needPrefix && !isLocal) { + if (isStaticProperty(parent) && parent.shorthand) { + node2.prefix = `${node2.name}: `; + } + node2.name = rewriteIdentifier(node2.name, parent, node2); + ids.push(node2); + } else { + if (!(needPrefix && isLocal) && !bailConstant) { + node2.isConstant = true; + } + ids.push(node2); + } + }, + true, + // invoke on ALL identifiers + parentStack, + knownIds + ); + const children = []; + ids.sort((a, b) => a.start - b.start); + ids.forEach((id, i) => { + const start = id.start - 1; + const end = id.end - 1; + const last = ids[i - 1]; + const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); + if (leadingText.length || id.prefix) { + children.push(leadingText + (id.prefix || ``)); } - const ids = []; - const parentStack = []; - const knownIds = Object.create(context.identifiers); - walkIdentifiers(ast, (node, parent, _, isReferenced, isLocal) => { - if (isStaticPropertyKey(node, parent)) { - return; - } - // v2 wrapped filter call - if (node.name.startsWith('_filter_')) { - return; - } - const needPrefix = isReferenced && canPrefix(node); - if (needPrefix && !isLocal) { - if (isStaticProperty(parent) && parent.shorthand) { - node.prefix = `${node.name}: `; - } - node.name = rewriteIdentifier(node.name, parent, node); - ids.push(node); - } - else { - // The identifier is considered constant unless it's pointing to a - // local scope variable (a v-for alias, or a v-slot prop) - if (!(needPrefix && isLocal) && !bailConstant) { - node.isConstant = true; - } - // also generate sub-expressions for other identifiers for better - // source map support. (except for property keys which are static) - ids.push(node); - } - }, true, // invoke on ALL identifiers - parentStack, knownIds); - // We break up the compound expression into an array of strings and sub - // expressions (for identifiers that have been prefixed). In codegen, if - // an ExpressionNode has the `.children` property, it will be used instead of - // `.content`. - const children = []; - ids.sort((a, b) => a.start - b.start); - ids.forEach((id, i) => { - // range is offset by -1 due to the wrapping parens when parsed - const start = id.start - 1; - const end = id.end - 1; - const last = ids[i - 1]; - const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); - if (leadingText.length || id.prefix) { - children.push(leadingText + (id.prefix || ``)); - } - const source = rawExp.slice(start, end); - children.push(createSimpleExpression(id.name, false, { - source, - start: advancePositionWithClone(node.loc.start, source, start), - end: advancePositionWithClone(node.loc.start, source, end) - }, id.isConstant ? 3 /* CAN_STRINGIFY */ : 0 /* NOT_CONSTANT */)); - if (i === ids.length - 1 && end < rawExp.length) { - children.push(rawExp.slice(end)); - } - }); - let ret; - if (children.length) { - ret = createCompoundExpression(children, node.loc); + const source = rawExp.slice(start, end); + children.push( + createSimpleExpression( + id.name, + false, + { + start: advancePositionWithClone(node.loc.start, source, start), + end: advancePositionWithClone(node.loc.start, source, end), + source + }, + id.isConstant ? 3 : 0 + ) + ); + if (i === ids.length - 1 && end < rawExp.length) { + children.push(rawExp.slice(end)); } - else { - ret = node; - ret.constType = bailConstant - ? 0 /* NOT_CONSTANT */ - : 3 /* CAN_STRINGIFY */; - } - ret.identifiers = Object.keys(knownIds); - return ret; + }); + let ret; + if (children.length) { + ret = createCompoundExpression(children, node.loc); + ret.ast = ast; + } else { + ret = node; + ret.constType = bailConstant ? 0 : 3; + } + ret.identifiers = Object.keys(knownIds); + return ret; } function canPrefix(id) { - // skip whitelisted globals - if (shared.isGloballyWhitelisted(id.name)) { - return false; - } - // special case for webpack compilation - if (id.name === 'require') { - return false; - } - return true; + if (shared.isGloballyAllowed(id.name)) { + return false; + } + if (id.name === "require") { + return false; + } + return true; } function stringifyExpression(exp) { - if (shared.isString(exp)) { - return exp; - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - return exp.content; - } - else { - return exp.children - .map(stringifyExpression) - .join(''); - } + if (shared.isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } +} +function isConst(type) { + return type === "setup-const" || type === "literal-const"; } -const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => { +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { return processIf(node, dir, context, (ifNode, branch, isRoot) => { - // #1587: We need to dynamically increment the key based on the current - // node's sibling nodes, since chained v-if/else branches are - // rendered at the same depth - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9 /* IF */) { - key += sibling.branches.length; - } + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; } - // Exit callback. Complete the codegenNode when all children have been - // transformed. - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context); - } - else { - // attach this branch's codegen node to the v-if root. - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context); - } - }; + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processIf(node, dir, context, processCodegen) { - if (dir.name !== 'else' && - (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc)); - dir.exp = createSimpleExpression(`true`, false, loc); + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (context.prefixIdentifiers && dir.exp) { + dir.exp = processExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: node.loc, + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); } - if (context.prefixIdentifiers && dir.exp) { - // dir.exp can only be simple expression because vIf transform is applied - // before expression transform. - dir.exp = processExpression(dir.exp, context); - } - if (dir.name === 'if') { + } else { + const siblings = context.parent.children; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); const branch = createIfBranch(node, dir); - const ifNode = { - type: 9 /* IF */, - loc: node.loc, - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); - } - } - else { - // locate the adjacent v-if - const siblings = context.parent.children; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && - sibling.type === 2 /* TEXT */ && - !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9 /* IF */) { - // Check if v-else was followed by v-else-if - if (dir.name === 'else-if' && - sibling.branches[sibling.branches.length - 1].condition === undefined) { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - // move the node to the if node's branches - context.removeNode(); - const branch = createIfBranch(node, dir); - // check if user is forcing same key on different branches - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc)); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - // since the branch was removed, it will not be traversed. - // make sure to traverse here. - traverseNode(branch, context); - // call on exit - if (onExit) - onExit(); - // make sure to reset currentNode after traversal to indicate this - // node has been removed. - context.currentNode = null; - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - break; + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) + onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; } + } } function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3 /* TEMPLATE */; - return { - type: 10 /* IF_BRANCH */, - loc: node.loc, - condition: dir.name === 'else' ? undefined : dir.exp, - children: isTemplateIf && !findDir(node, 'for') ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; } function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '""', - 'true' - ])); - } - else { - return createChildrenCodegenNode(branch, keyIndex, context); - } + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '""', + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } } function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */)); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11 /* FOR */) { - // optimize away nested fragments when child is a ForNode - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } - else { - let patchFlag = 64 /* STABLE_FRAGMENT */; - shared.PatchFlagNames[64 /* STABLE_FRAGMENT */]; - return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + (``), undefined, undefined, true, false, false /* isComponent */, branch.loc); - } + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + shared.PatchFlagNames[64]; + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag + (``), + void 0, + void 0, + true, + false, + false, + branch.loc + ); } - else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - // Change createVNode to createBlock. - if (vnodeCall.type === 13 /* VNODE_CALL */) { - makeBlock(vnodeCall, context); - } - // inject branch key - injectProp(vnodeCall, keyProperty, context); - return ret; + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); } + injectProp(vnodeCall, keyProperty, context); + return ret; + } } function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; } - if (a.type === 6 /* ATTRIBUTE */) { - if (a.value.content !== b.value.content) { - return false; - } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; } - else { - // directive - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 /* SIMPLE_EXPRESSION */ || - exp.isStatic !== branchExp.isStatic || - exp.content !== branchExp.content) { - return false; - } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; } - return true; + } + return true; } function getParentCondition(node) { - while (true) { - if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - node = node.alternate; - } - else { - return node; - } - } - else if (node.type === 20 /* JS_CACHE_EXPRESSION */) { - node = node.value; - } + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; } + } } -const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => { +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { const { helper, removeHelper } = context; - return processFor(node, dir, context, forNode => { - // create the loop render function expression now, and add the - // iterator on exit after all children have been traversed - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, 'memo'); - const keyProp = findProp(node, `key`); - const keyExp = keyProp && - (keyProp.type === 6 /* ATTRIBUTE */ - ? createSimpleExpression(keyProp.value.content, true) - : keyProp.exp); - const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`); + const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp); + const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + if (isTemplate) { + if (memo) { + memo.exp = processExpression( + memo.exp, + context + ); + } + if (keyProperty && keyProp.type !== 6) { + keyProperty.value = processExpression( + keyProperty.value, + context + ); + } + } + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag + (``), + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; if (isTemplate) { - // #2085 / #5288 process :key and v-memo expressions need to be - // processed on `<template v-for>`. In this case the node is discarded - // and never traversed so its binding expressions won't be processed - // by the normal transforms. - if (memo) { - memo.exp = processExpression(memo.exp, context); - } - if (keyProperty && keyProp.type !== 6 /* ATTRIBUTE */) { - keyProperty.value = processExpression(keyProperty.value, context); + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } } + }); } - const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ && - forNode.source.constType > 0 /* NOT_CONSTANT */; - const fragmentFlag = isStableFragment - ? 64 /* STABLE_FRAGMENT */ - : keyProp - ? 128 /* KEYED_FRAGMENT */ - : 256 /* UNKEYED_FRAGMENT */; - forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag + - (``), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc); - return () => { - // finish the codegen now that all children have been traversed - let childBlock; - const { children } = forNode; - // check <template v-for> key placement - if (isTemplate) { - node.children.some(c => { - if (c.type === 1 /* ELEMENT */) { - const key = findProp(c, 'key'); - if (key) { - context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc)); - return true; - } - } - }); + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64 + (``), + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */; - const slotOutlet = isSlotOutlet(node) - ? node - : isTemplate && - node.children.length === 1 && - isSlotOutlet(node.children[0]) - ? node.children[0] // api-extractor somehow fails to infer this - : null; - if (slotOutlet) { - // <slot v-for="..."> or <template v-for="..."><slot/></template> - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - // <template v-for="..." :key="..."><slot/></template> - // we need to inject the key to the renderSlot() call. - // the props for renderSlot is passed as the 3rd argument. - injectProp(childBlock, keyProperty, context); - } - } - else if (needFragmentWrapper) { - // <template v-for="..."> with text or multi-elements - // should generate a fragment block for each loop - childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ + - (``), undefined, undefined, true, undefined, false /* isComponent */); - } - else { - // Normal element v-for. Directly use the child's codegenNode - // but mark it as a block. - childBlock = children[0] - .codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - // switch from block to vnode - removeHelper(OPEN_BLOCK); - removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - // switch from vnode to block - removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ])); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...(keyExp ? [` && _cached.key === `, keyExp] : []), - ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++))); - } - else { - renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */)); - } - }; + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached++)) + ); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc)); - return; - } - const parseResult = parseForExpression( - // can only be simple expression because vFor transform is applied - // before expression transform. - dir.exp, context); - if (!parseResult) { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc)); - return; - } - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11 /* FOR */, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - // bookkeeping - scopes.vFor++; + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + if (context.prefixIdentifiers) { + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + } + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; if (context.prefixIdentifiers) { - // scope management - // inject identifiers to context - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); } - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (context.prefixIdentifiers) { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - } - if (onExit) - onExit(); - }; + if (onExit) + onExit(); + }; } -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -// This regex doesn't cover the case if key or index aliases have destructuring, -// but those do not make sense in the first place, so this works in practice. -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input, context) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) - return; - const [, LHS, RHS] = inMatch; - const result = { - source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: undefined, - key: undefined, - index: undefined - }; - if (context.prefixIdentifiers) { - result.source = processExpression(result.source, context); +function finalizeForParseResult(result, context) { + if (result.finalized) + return; + if (context.prefixIdentifiers) { + result.source = processExpression( + result.source, + context + ); + if (result.key) { + result.key = processExpression( + result.key, + context, + true + ); } - let valueContent = LHS.trim().replace(stripParensRE, '').trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, '').trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(loc, keyContent, keyOffset); - if (context.prefixIdentifiers) { - result.key = processExpression(result.key, context, true); - } - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key - ? keyOffset + keyContent.length - : trimmedOffset + valueContent.length)); - if (context.prefixIdentifiers) { - result.index = processExpression(result.index, context, true); - } - } - } + if (result.index) { + result.index = processExpression( + result.index, + context, + true + ); } - if (valueContent) { - result.value = createAliasExpression(loc, valueContent, trimmedOffset); - if (context.prefixIdentifiers) { - result.value = processExpression(result.value, context, true); - } + if (result.value) { + result.value = processExpression( + result.value, + context, + true + ); } - return result; -} -function createAliasExpression(range, content, offset) { - return createSimpleExpression(content, false, getInnerRange(range, offset, content.length)); + } + result.finalized = true; } function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); + return createParamsList([value, key, index, ...memoArgs]); } function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) - break; - } - return args - .slice(0, i + 1) - .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false)); + let i = args.length; + while (i--) { + if (args[i]) + break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); } const defaultFallback = createSimpleExpression(`undefined`, false); -// A NodeTransform that: -// 1. Tracks scope identifiers for scoped slots so that they don't get prefixed -// by transformExpression. This is only applied in non-browser builds with -// { prefixIdentifiers: true }. -// 2. Track v-slot depths so that we know a slot is inside another slot. -// Note the exit callback is executed before buildSlots() on the same node, -// so only nested slots see positive numbers. const trackSlotScopes = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 1 /* COMPONENT */ || - node.tagType === 3 /* TEMPLATE */)) { - // We are only checking non-empty v-slot here - // since we only care about slots that introduce scope variables. - const vSlot = findDir(node, 'slot'); - if (vSlot) { - const slotProps = vSlot.exp; - if (context.prefixIdentifiers) { - slotProps && context.addIdentifiers(slotProps); - } - context.scopes.vSlot++; - return () => { - if (context.prefixIdentifiers) { - slotProps && context.removeIdentifiers(slotProps); - } - context.scopes.vSlot--; - }; + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + const slotProps = vSlot.exp; + if (context.prefixIdentifiers) { + slotProps && context.addIdentifiers(slotProps); + } + context.scopes.vSlot++; + return () => { + if (context.prefixIdentifiers) { + slotProps && context.removeIdentifiers(slotProps); } + context.scopes.vSlot--; + }; } + } }; -// A NodeTransform that tracks scope identifiers for scoped slots with v-for. -// This transform is only applied in non-browser builds with { prefixIdentifiers: true } const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && - node.props.some(isVSlot) && - (vFor = findDir(node, 'for'))) { - const result = (vFor.parseResult = parseForExpression(vFor.exp, context)); - if (result) { - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; } + } }; -const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc); -// Instead of being a DirectiveTransform, v-slot processing is called during -// transformElement to build the slots object for a component. +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - // If the slot is inside a v-for or another v-slot, force it to be dynamic - // since it likely uses a scope variable. - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - // with `prefixIdentifiers: true`, this can be further optimized to make - // it dynamic only when the slot actually uses the scope variables. - if (!context.ssr && context.prefixIdentifiers) { - hasDynamicSlots = hasScopeRef(node, context.identifiers); + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + if (!context.ssr && context.prefixIdentifiers) { + hasDynamicSlots = hasScopeRef(node, context.identifiers); + } + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; } - // 1. Check for slot with slotProps on component itself. - // <Comp v-slot="{ prop }"/> - const onComponentSlot = findDir(node, 'slot', true); if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc))); + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; } - // 2. Iterate through children and check for template slots - // <template v-slot:foo="{ prop }"> - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = new Set(); - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || - !(slotDir = findDir(slotElement, 'slot', true))) { - // not a <template v-slot>, skip. - if (slotElement.type !== 3 /* COMMENT */) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - // already has on-component slot - this is incorrect usage. - context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc)); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir; - // check if name is dynamic. - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } - else { - hasDynamicSlots = true; - } - const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc); - // check if this slot is conditional (v-if/v-for) - let vIf; - let vElse; - let vFor; - if ((vIf = findDir(slotElement, 'if'))) { - hasDynamicSlots = true; - dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)); - } - else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) { - // find adjacent v-if - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3 /* COMMENT */) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, 'if')) { - // remove node - children.splice(i, 1); - i--; - // attach this slot to previous conditional - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp - ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback) - : buildDynamicSlot(slotName, slotFunction); - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc)); - } - } - else if ((vFor = findDir(slotElement, 'for'))) { - hasDynamicSlots = true; - const parseResult = vFor.parseResult || - parseForExpression(vFor.exp, context); - if (parseResult) { - // Render the dynamic slots as an array and add it to the createSlot() - // args. The runtime knows how to handle it appropriately. - dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */) - ])); - } - else { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc)); - } - } - else { - // check duplicate static names - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc)); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === 'default') { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children) => { - const fn = buildSlotFn(props, children, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - // implicit default slot (on component) - slotsProperties.push(buildDefaultSlotProperty(undefined, children)); + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; } - else if (implicitDefaultChildren.length && - // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) { - // implicit default slot (mixed with named slots) - if (hasNamedDefaultSlot) { - context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc)); - } - else { - slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren)); - } + } + if (prev && isTemplateNode(prev) && findDir(prev, "if")) { + children.splice(i, 1); + i--; + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); } - const slotFlag = hasDynamicSlots - ? 2 /* DYNAMIC */ - : hasForwardedSlots(node.children) - ? 3 /* FORWARDED */ - : 1 /* STABLE */; - let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression(slotFlag + (``), false))), loc); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); }; -} -function buildDynamicSlot(name, fn) { - return createObjectExpression([ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (``), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); } function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - if (child.tagType === 2 /* SLOT */ || - hasForwardedSlots(child.children)) { - return true; - } - break; - case 9 /* IF */: - if (hasForwardedSlots(child.branches)) - return true; - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - if (hasForwardedSlots(child.children)) - return true; - break; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; } + break; + case 9: + if (hasForwardedSlots(child.branches)) + return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) + return true; + break; } - return false; + } + return false; } function isNonWhitespaceContent(node) { - if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */) - return true; - return node.type === 2 /* TEXT */ - ? !!node.content.trim() - : isNonWhitespaceContent(node.content); + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); } -// some directive transforms (e.g. v-model) may return a symbol for runtime -// import, which should be used instead of a resolveDirective call. -const directiveImportMap = new WeakMap(); -// generate a JavaScript AST for this element's codegen +const directiveImportMap = /* @__PURE__ */ new WeakMap(); const transformElement = (node, context) => { - // perform the work on exit, after all child expressions have been - // processed and merged. - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */))) { - return; + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let vnodePatchFlag; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; } - const { tag, props } = node; - const isComponent = node.tagType === 1 /* COMPONENT */; - // The goal of the transform is to create a codegenNode implementing the - // VNodeCall interface. - let vnodeTag = isComponent - ? resolveComponentType(node, context) - : `"${tag}"`; - const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let vnodePatchFlag; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = - // dynamic component may resolve to plain elements - isDynamicComponent || - vnodeTag === TELEPORT || - vnodeTag === SUSPENSE || - (!isComponent && - // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')); - // props - if (props.length > 0) { - const propsBuildResult = buildProps(node, context, undefined, isComponent, isDynamicComponent); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = - directives && directives.length - ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context))) - : undefined; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; } - // children - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - // Although a built-in component, we compile KeepAlive with raw children - // instead of slot functions so that it can be used inside Transition - // or other Transition-wrapping HOCs. - // To ensure correct updates with block optimizations, we need to: - // 1. Force keep-alive into a block. This avoids its children being - // collected by a parent block. - shouldUseBlock = true; - // 2. Force keep-alive to always be updated, since it uses raw children. - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - const shouldBuildAsSlots = isComponent && - // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && - // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } - else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - // check for dynamic text children - const hasDynamicTextChild = type === 5 /* INTERPOLATION */ || - type === 8 /* COMPOUND_EXPRESSION */; - if (hasDynamicTextChild && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - patchFlag |= 1 /* TEXT */; - } - // pass directly if the only child is a text node - // (plain / interpolation / expression) - if (hasDynamicTextChild || type === 2 /* TEXT */) { - vnodeChildren = child; - } - else { - vnodeChildren = node.children; - } - } - else { - vnodeChildren = node.children; - } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; } - // patchFlag & dynamicPropNames - if (patchFlag !== 0) { - { - vnodePatchFlag = String(patchFlag); - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } - } - node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc); - }; + } else { + vnodeChildren = node.children; + } + } + if (patchFlag !== 0) { + { + vnodePatchFlag = String(patchFlag); + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + vnodePatchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; }; function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - // 1. dynamic component - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp(node, 'is'); - if (isProp) { - if (isExplicitDynamic || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))) { - const exp = isProp.type === 6 /* ATTRIBUTE */ - ? isProp.value && createSimpleExpression(isProp.value.content, true) - : isProp.exp; - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } - else if (isProp.type === 6 /* ATTRIBUTE */ && - isProp.value.content.startsWith('vue:')) { - // <button is="vue:xxx"> - // if not <component>, only is value that starts with "vue:" will be - // treated as component by the parse phase and reach here, unless it's - // compat mode where all is values are considered components - tag = isProp.value.content.slice(4); - } - } - // 1.5 v-is (TODO: Deprecate) - const isDir = !isExplicitDynamic && findDir(node, 'is'); - if (isDir && isDir.exp) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp(node, "is"); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp; + if (exp) { return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - isDir.exp + exp ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); } - // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...) - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - // built-ins are simply fallthroughs / have special handling during ssr - // so we don't need to import their runtime equivalents - if (!ssr) - context.helper(builtIn); - return builtIn; + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) + context.helper(builtIn); + return builtIn; + } + { + const fromSetup = resolveSetupReference(tag, context); + if (fromSetup) { + return fromSetup; } - // 3. user component (from setup bindings) - // this is skipped in browser build since browser builds do not perform - // binding analysis. - { - const fromSetup = resolveSetupReference(tag, context); - if (fromSetup) { - return fromSetup; - } - const dotIndex = tag.indexOf('.'); - if (dotIndex > 0) { - const ns = resolveSetupReference(tag.slice(0, dotIndex), context); - if (ns) { - return ns + tag.slice(dotIndex); - } - } + const dotIndex = tag.indexOf("."); + if (dotIndex > 0) { + const ns = resolveSetupReference(tag.slice(0, dotIndex), context); + if (ns) { + return ns + tag.slice(dotIndex); + } } - // 4. Self referencing component (inferred from filename) - if (context.selfName && - shared.capitalize(shared.camelize(tag)) === context.selfName) { - context.helper(RESOLVE_COMPONENT); - // codegen.ts has special check for __self postfix when generating - // component imports, which will pass additional `maybeSelfReference` flag - // to `resolveComponent`. - context.components.add(tag + `__self`); - return toValidAssetId(tag, `component`); - } - // 5. user component (resolve) + } + if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) { context.helper(RESOLVE_COMPONENT); - context.components.add(tag); + context.components.add(tag + `__self`); return toValidAssetId(tag, `component`); + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); } function resolveSetupReference(name, context) { - const bindings = context.bindingMetadata; - if (!bindings || bindings.__isScriptSetup === false) { - return; + const bindings = context.bindingMetadata; + if (!bindings || bindings.__isScriptSetup === false) { + return; + } + const camelName = shared.camelize(name); + const PascalName = shared.capitalize(camelName); + const checkType = (type) => { + if (bindings[name] === type) { + return name; } - const camelName = shared.camelize(name); - const PascalName = shared.capitalize(camelName); - const checkType = (type) => { - if (bindings[name] === type) { - return name; - } - if (bindings[camelName] === type) { - return camelName; - } - if (bindings[PascalName] === type) { - return PascalName; - } - }; - const fromConst = checkType("setup-const" /* SETUP_CONST */) || - checkType("setup-reactive-const" /* SETUP_REACTIVE_CONST */); - if (fromConst) { - return context.inline - ? // in inline mode, const setup bindings (e.g. imports) can be used as-is - fromConst - : `$setup[${JSON.stringify(fromConst)}]`; + if (bindings[camelName] === type) { + return camelName; } - const fromMaybeRef = checkType("setup-let" /* SETUP_LET */) || - checkType("setup-ref" /* SETUP_REF */) || - checkType("setup-maybe-ref" /* SETUP_MAYBE_REF */); - if (fromMaybeRef) { - return context.inline - ? // setup scope bindings that may be refs need to be unrefed - `${context.helperString(UNREF)}(${fromMaybeRef})` - : `$setup[${JSON.stringify(fromMaybeRef)}]`; + if (bindings[PascalName] === type) { + return PascalName; } + }; + const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); + if (fromConst) { + return context.inline ? ( + // in inline mode, const setup bindings (e.g. imports) can be used as-is + fromConst + ) : `$setup[${JSON.stringify(fromConst)}]`; + } + const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); + if (fromMaybeRef) { + return context.inline ? ( + // setup scope bindings that may be refs need to be unrefed + `${context.helperString(UNREF)}(${fromMaybeRef})` + ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; + } + const fromProps = checkType("props"); + if (fromProps) { + return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; + } } function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - // patchFlag analysis - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = shared.isOn(name); - if (isEventHandler && - (!isComponent || isDynamicComponent) && - // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== 'onclick' && - // omit v-model handlers - name !== 'onUpdate:modelValue' && - // omit onVnodeXXX hooks - !shared.isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && shared.isReservedProp(name)) { - hasVnodeHook = true; - } - if (value.type === 20 /* JS_CACHE_EXPRESSION */ || - ((value.type === 4 /* SIMPLE_EXPRESSION */ || - value.type === 8 /* COMPOUND_EXPRESSION */) && - getConstantType(value, context) > 0)) { - // skip if the prop is a cached handler or has constant value - return; - } - if (name === 'ref') { - hasRef = true; - } - else if (name === 'class') { - hasClassBinding = true; - } - else if (name === 'style') { - hasStyleBinding = true; - } - else if (name !== 'key' && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - // treat the dynamic class and style binding of the component as dynamic props - if (isComponent && - (name === 'class' || name === 'style') && - !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) + mergeArgs.push(arg); + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = shared.isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !shared.isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && shared.isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); } - else { - hasDynamicKeys = true; + if (value && context.inline) { + const binding = context.bindingMetadata[value.content]; + if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { + isStatic = false; + properties.push( + createObjectProperty( + createSimpleExpression("ref_key", true), + createSimpleExpression(value.content, true, value.loc) + ) + ); + } } - }; - for (let i = 0; i < props.length; i++) { - // static attribute - const prop = props[i]; - if (prop.type === 6 /* ATTRIBUTE */) { - const { loc, name, value } = prop; - let isStatic = true; - if (name === 'ref') { - hasRef = true; - if (context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // in inline mode there is no setupState object, so we can't use string - // keys to set the ref. Instead, we need to transform it to pass the - // actual ref instead. - if (value && - context.inline && - context.bindingMetadata[value.content]) { - isStatic = false; - properties.push(createObjectProperty(createSimpleExpression('ref_key', true), createSimpleExpression(value.content, true, value.loc))); - } - } - // skip is on <component>, or is="vue:xxx" - if (name === 'is' && - (isComponentTag(tag) || - (value && value.content.startsWith('vue:')) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context)))) { + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushMergeArg(); + { + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); continue; + } } - properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc))); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); } - else { - // directives - const { name, arg, exp, loc } = prop; - const isVBind = name === 'bind'; - const isVOn = name === 'on'; - // skip v-slot - it is handled by its dedicated transform. - if (name === 'slot') { - if (!isComponent) { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc)); - } - continue; - } - // skip v-once/v-memo - they are handled by dedicated transforms. - if (name === 'once' || name === 'memo') { - continue; - } - // skip v-is and :is on <component> - if (name === 'is' || - (isVBind && - isStaticArgOf(arg, 'is') && - (isComponentTag(tag) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))))) { - continue; - } - // skip v-on in SSR compilation - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - (isVBind && isStaticArgOf(arg, 'key')) || - // inline before-update hooks need to force block so that it is invoked - // before children - (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // special case for v-bind and v-on with no argument - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - properties = []; - } - if (isVBind) { - { - if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context)) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } - else { - // v-on="obj" -> toHandlers(obj) - mergeArgs.push({ - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee: context.helper(TO_HANDLERS), - arguments: [exp] - }); - } - } - else { - context.onError(createCompilerError(isVBind - ? 34 /* X_V_BIND_NO_EXPRESSION */ - : 35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - continue; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - // has built-in directive transform. - const { props, needRuntime } = directiveTransform(prop, node, context); - !ssr && props.forEach(analyzePatchFlag); - properties.push(...props); - if (needRuntime) { - runtimeDirectives.push(prop); - if (shared.isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } - else if (!shared.isBuiltInDirective(name)) { - // no built-in transform, this is a user custom directive. - runtimeDirectives.push(prop); - // custom dirs may use beforeUpdate so they need to force blocks - // to ensure before-update gets called before children update - if (hasChildren) { - shouldUseBlock = true; - } - } + continue; + } + if (isVBind && modifiers.includes("prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); } + if (needRuntime) { + runtimeDirectives.push(prop); + if (shared.isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!shared.isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } } - let propsExpression = undefined; - // has v-bind="object" or v-on="object", wrap with mergeProps - if (mergeArgs.length) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - } - if (mergeArgs.length > 1) { - propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc); - } - else { - // single v-bind with nothing else - no need for a mergeProps call - propsExpression = mergeArgs[0]; - } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; } - else if (properties.length) { - propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc); + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; } - // patchFlag analysis - if (hasDynamicKeys) { - patchFlag |= 16 /* FULL_PROPS */; + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; } - else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2 /* CLASS */; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4 /* STYLE */; - } - if (dynamicPropNames.length) { - patchFlag |= 8 /* PROPS */; - } - if (hasHydrationEventBinding) { - patchFlag |= 32 /* HYDRATE_EVENTS */; - } + if (dynamicPropNames.length) { + patchFlag |= 8; } - if (!shouldUseBlock && - (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) && - (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512 /* NEED_PATCH */; + if (hasHydrationEventBinding) { + patchFlag |= 32; } - // pre-normalize props, SSR is skipped for now - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15 /* JS_OBJECT_EXPRESSION */: - // means that there is no v-bind, - // but still need to deal with dynamic key binding - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === 'class') { - classKeyIndex = i; - } - else if (key.content === 'style') { - styleKeyIndex = i; - } - } - else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - // no dynamic key - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]); - } - if (styleProp && - // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || - (styleProp.value.type === 4 /* SIMPLE_EXPRESSION */ && - styleProp.value.content.trim()[0] === `[`) || - // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) { - styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]); - } - } - else { - // dynamic key binding, wrap with `normalizeProps` - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]); - } - break; - case 14 /* JS_CALL_EXPRESSION */: - // mergeProps call, do nothing - break; - default: - // single v-bind - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ]); - break; + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; } -// Dedupe props in an object literal. -// Literal duplicated attributes would have been warned during the parse phase, -// however, it's possible to encounter duplicated `onXXX` handlers with different -// modifiers. We also need to merge static and dynamic class / style attributes. -// - onXXX handlers / style: merge into array -// - class: merge into single expression with concatenation function dedupeProperties(properties) { - const knownProps = new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - // dynamic keys are always allowed - if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === 'style' || name === 'class' || shared.isOn(name)) { - mergeAsArray(existing, prop); - } - // unexpected duplicate, should have emitted error during parse - } - else { - knownProps.set(name, prop); - deduped.push(prop); - } + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; } - return deduped; + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || shared.isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; } function mergeAsArray(existing, incoming) { - if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.value.elements.push(incoming.value); - } - else { - existing.value = createArrayExpression([existing.value, incoming.value], existing.loc); - } + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } } function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - // built-in directive with runtime - dirArgs.push(context.helperString(runtime)); + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + const fromSetup = resolveSetupReference("v-" + dir.name, context); + if (fromSetup) { + dirArgs.push(fromSetup); + } else { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); } - else { - // user directive. - // see if we have directives exposed via <script setup> - const fromSetup = resolveSetupReference('v-' + dir.name, context); - if (fromSetup) { - dirArgs.push(fromSetup); - } - else { - // inject statement for resolving directive - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } + } + const { loc } = dir; + if (dir.exp) + dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); } - const { loc } = dir; - if (dir.exp) - dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc)); - } - return createArrayExpression(dirArgs, dir.loc); + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); } function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) - propsNamesString += ', '; - } - return propsNamesString + `]`; + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) + propsNamesString += ", "; + } + return propsNamesString + `]`; } function isComponentTag(tag) { - return tag === 'component' || tag === 'Component'; + return tag === "component" || tag === "Component"; } -const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); -}; -const camelizeRE = /-(\w)/g; -/** - * @private - */ -const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); -}); - const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - '{}', - 'undefined', - 'true' - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); // remove unused arguments - node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc); + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } }; function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = undefined; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.value) { - if (p.name === 'name') { - slotName = JSON.stringify(p.value.content); - } - else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = shared.camelize(p.name); + nonNameProps.push(p); } - else { - if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) { - if (p.exp) - slotName = p.exp; - } - else { - if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) + slotName = p.exp; + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = shared.camelize(p.arg.content); } + nonNameProps.push(p); + } } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps(node, context, nonNameProps, false, false); - slotProps = props; - if (directives.length) { - context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc)); - } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); } - return { - slotName, - slotProps - }; + } + return { + slotName, + slotProps + }; } -const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc)); + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + shared.toHandlerKey(shared.camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); } - let eventName; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - let rawName = arg.content; - // TODO deprecate @vnodeXXX usage - if (rawName.startsWith('vue:')) { - rawName = `vnode-${rawName.slice(4)}`; - } - // for all event listeners, auto convert it to camelCase. See issue #2249 - eventName = createSimpleExpression(shared.toHandlerKey(shared.camelize(rawName)), true, arg.loc); - } - else { - // #2388 - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp.content, context); + const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); + const hasMultipleStatements = exp.content.includes(`;`); + if (context.prefixIdentifiers) { + isInlineStatement && context.addIdentifiers(`$event`); + exp = dir.exp = processExpression( + exp, + context, + false, + hasMultipleStatements + ); + isInlineStatement && context.removeIdentifiers(`$event`); + shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once + !context.inVOnce && // runtime constants don't need to be cached + // (this is analyzed by compileScript in SFC <script setup>) + !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - + // we need to use the original function to preserve arity, + // e.g. <transition> relies on checking cb.length to determine + // transition end handling. Inline function is ok since its arity + // is preserved even when cached. + !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) + // it must be passed fresh to avoid stale values. + !hasScopeRef(exp, context.identifiers); + if (shouldCache && isMemberExp) { + if (exp.type === 4) { + exp.content = `${exp.content} && ${exp.content}(...args)`; + } else { + exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; } + } } - else { - // already a compound expression. - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` +//@ts-ignore +` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); } - // handler processing - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = undefined; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp.content, context); - const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); - const hasMultipleStatements = exp.content.includes(`;`); - // process the expression since it's been skipped - if (context.prefixIdentifiers) { - isInlineStatement && context.addIdentifiers(`$event`); - exp = dir.exp = processExpression(exp, context, false, hasMultipleStatements); - isInlineStatement && context.removeIdentifiers(`$event`); - // with scope analysis, the function is hoistable if it has no reference - // to scope variables. - shouldCache = - context.cacheHandlers && - // unnecessary to cache inside v-once - !context.inVOnce && - // runtime constants don't need to be cached - // (this is analyzed by compileScript in SFC <script setup>) - !(exp.type === 4 /* SIMPLE_EXPRESSION */ && exp.constType > 0) && - // #1541 bail if this is a member exp handler passed to a component - - // we need to use the original function to preserve arity, - // e.g. <transition> relies on checking cb.length to determine - // transition end handling. Inline function is ok since its arity - // is preserved even when cached. - !(isMemberExp && node.tagType === 1 /* COMPONENT */) && - // bail if the function references closure variables (v-for, v-slot) - // it must be passed fresh to avoid stale values. - !hasScopeRef(exp, context.identifiers); - // If the expression is optimizable and is a member expression pointing - // to a function, turn it into invocation (and wrap in an arrow function - // below) so that it always accesses the latest value when called - thus - // avoiding the need to be patched. - if (shouldCache && isMemberExp) { - if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - exp.content = `${exp.content} && ${exp.content}(...args)`; - } - else { - exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; - } - } - } - if (isInlineStatement || (shouldCache && isMemberExp)) { - // wrap inline statement in a function expression - exp = createCompoundExpression([ - `${isInlineStatement - ? context.isTS - ? `($event: any)` - : `$event` - : `${context.isTS ? `\n//@ts-ignore\n` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc)) - ] - }; - // apply extended compiler augmentor - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - // cache handlers so that it's always the same handler being passed down. - // this avoids unnecessary re-renders when users use inline handlers on - // components. - ret.props[0].value = context.cache(ret.props[0].value); - } - // mark the key as handler for props normalization check - ret.props.forEach(p => (p.key.isHandlerKey = true)); - return ret; + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; }; -// v-bind without arg is handled directly in ./transformElements.ts due to it affecting -// codegen for the entire props object. This transform here is only for v-bind -// *with* args. const transformBind = (dir, _node, context) => { - const { exp, modifiers, loc } = dir; - const arg = dir.arg; - if (arg.type !== 4 /* SIMPLE_EXPRESSION */) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (!exp && arg.type === 4) { + const propName = shared.camelize(arg.content); + exp = dir.exp = createSimpleExpression(propName, false, arg.loc); + { + exp = dir.exp = processExpression(exp, context); } - else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.includes("camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = shared.camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); } - // .sync is replaced by v-model:arg - if (modifiers.includes('camel')) { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = shared.camelize(arg.content); - } - else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } - else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } + } + if (!context.inSSR) { + if (modifiers.includes("prop")) { + injectPrefix(arg, "."); } - if (!context.inSSR) { - if (modifiers.includes('prop')) { - injectPrefix(arg, '.'); - } - if (modifiers.includes('attr')) { - injectPrefix(arg, '^'); - } - } - if (!exp || - (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) { - context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc)); - return { - props: [createObjectProperty(arg, createSimpleExpression('', true, loc))] - }; + if (modifiers.includes("attr")) { + injectPrefix(arg, "^"); } + } + if (!exp || exp.type === 4 && !exp.content.trim()) { + context.onError(createCompilerError(34, loc)); return { - props: [createObjectProperty(arg, exp)] + props: [createObjectProperty(arg, createSimpleExpression("", true, loc))] }; + } + return { + props: [createObjectProperty(arg, exp)] + }; }; const injectPrefix = (arg, prefix) => { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } - else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } - else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } }; -// Merge adjacent text nodes and expressions into a single expression -// e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child. const transformText = (node, context) => { - if (node.type === 0 /* ROOT */ || - node.type === 1 /* ELEMENT */ || - node.type === 11 /* FOR */ || - node.type === 10 /* IF_BRANCH */) { - // perform the transform on node exit so that all expressions have already - // been processed. - return () => { - const children = node.children; - let currentContainer = undefined; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression([child], child.loc); - } - // merge adjacent text node into current - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } - else { - currentContainer = undefined; - break; - } - } - } + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; } - if (!hasText || - // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - (children.length === 1 && - (node.type === 0 /* ROOT */ || - (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find(p => p.type === 7 /* DIRECTIVE */ && - !context.directiveTransforms[p.name]) && - // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === 'template'))))) { - return; - } - // pre-convert text nodes into createTextVNode(text) calls to avoid - // runtime normalization. - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) { - const callArgs = []; - // createTextVNode defaults to single whitespace, so if it is a - // single space the code could be an empty call to save bytes. - if (child.type !== 2 /* TEXT */ || child.content !== ' ') { - callArgs.push(child); - } - // mark dynamic text with flag so it gets patched inside a block - if (!context.ssr && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - callArgs.push(1 /* TEXT */ + - (``)); - } - children[i] = { - type: 12 /* TEXT_CALL */, - content: child, - loc: child.loc, - codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs) - }; - } - } - }; - } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (``) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } }; -const seen = new WeakSet(); +const seen$1 = /* @__PURE__ */ new WeakSet(); const transformOnce = (node, context) => { - if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) { - if (seen.has(node) || context.inVOnce) { - return; - } - seen.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */); - } - }; + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true + /* isVNode */ + ); + } + }; + } }; const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc)); - return createTransformProps(); + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source; + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); + if (!expString.trim() || !isMemberExpression(expString, context) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { + context.onError( + createCompilerError(43, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + if (maybeRef) { + if (bindingType === "setup-ref") { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event)` + ]); + } else { + const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; + assignmentExp = createCompoundExpression([ + `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event : ${altAssignment})` + ]); } - const rawExp = exp.loc.source; - const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp; - // im SFC <script setup> inline mode, the exp may have been transformed into - // _unref(exp) - const bindingType = context.bindingMetadata[rawExp]; - const maybeRef = context.inline && - bindingType && - bindingType !== "setup-const" /* SETUP_CONST */; - if (!expString.trim() || - (!isMemberExpression(expString, context) && !maybeRef)) { - context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc)); - return createTransformProps(); - } - if (context.prefixIdentifiers && - isSimpleIdentifier(expString) && - context.identifiers[expString]) { - context.onError(createCompilerError(43 /* X_V_MODEL_ON_SCOPE_VARIABLE */, exp.loc)); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression('modelValue', true); - const eventName = arg - ? isStaticExp(arg) - ? `onUpdate:${arg.content}` - : createCompoundExpression(['"onUpdate:" + ', arg]) - : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - if (maybeRef) { - if (bindingType === "setup-ref" /* SETUP_REF */) { - // v-model used on known ref. - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event)` - ]); - } - else { - // v-model used on a potentially ref binding in <script setup> inline mode. - // the assignment needs to check whether the binding is actually a ref. - const altAssignment = bindingType === "setup-let" /* SETUP_LET */ ? `${rawExp} = $event` : `null`; - assignmentExp = createCompoundExpression([ - `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event : ${altAssignment})` - ]); - } - } - else { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - // cache v-model handler if applicable (when it doesn't refer any scope vars) - if (context.prefixIdentifiers && - !context.inVOnce && - context.cacheHandlers && - !hasScopeRef(exp, context.identifiers)) { - props[1].value = context.cache(props[1].value); - } - // modelModifiers: { foo: true, "bar-baz": true } - if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) { - const modifiers = dir.modifiers - .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`) - .join(`, `); - const modifiersKey = arg - ? isStaticExp(arg) - ? `${arg.content}Modifiers` - : createCompoundExpression([arg, ' + "Modifiers"']) - : `modelModifiers`; - props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */))); - } - return createTransformProps(props); + } else { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { + props[1].value = context.cache(props[1].value); + } + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); }; function createTransformProps(props = []) { - return { props }; + return { props }; } const validDivisionCharRE = /[\w).+\-_$\]]/; const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTER" /* COMPILER_FILTERS */, context)) { - return; - } - if (node.type === 5 /* INTERPOLATION */) { - // filter rewrite is applied before expression transform so only - // simple expressions are possible at this stage - rewriteFilter(node.content, context); - } - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((prop) => { - if (prop.type === 7 /* DIRECTIVE */ && - prop.name !== 'for' && - prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } + if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } }; function rewriteFilter(node, context) { - if (node.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(node, context); - } - else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== 'object') - continue; - if (child.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(child, context); - } - else if (child.type === 8 /* COMPOUND_EXPRESSION */) { - rewriteFilter(node, context); - } - else if (child.type === 5 /* INTERPOLATION */) { - rewriteFilter(child.content, context); - } - } + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") + continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } } + } } function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 0x27 && prev !== 0x5c) - inSingle = false; - } - else if (inDouble) { - if (c === 0x22 && prev !== 0x5c) - inDouble = false; - } - else if (inTemplateString) { - if (c === 0x60 && prev !== 0x5c) - inTemplateString = false; - } - else if (inRegex) { - if (c === 0x2f && prev !== 0x5c) - inRegex = false; - } - else if (c === 0x7c && // pipe - exp.charCodeAt(i + 1) !== 0x7c && - exp.charCodeAt(i - 1) !== 0x7c && - !curly && - !square && - !paren) { - if (expression === undefined) { - // first filter, end of expression - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } - else { - pushFilter(); - } - } - else { - switch (c) { - case 0x22: - inDouble = true; - break; // " - case 0x27: - inSingle = true; - break; // ' - case 0x60: - inTemplateString = true; - break; // ` - case 0x28: - paren++; - break; // ( - case 0x29: - paren--; - break; // ) - case 0x5b: - square++; - break; // [ - case 0x5d: - square--; - break; // ] - case 0x7b: - curly++; - break; // { - case 0x7d: - curly--; - break; // } - } - if (c === 0x2f) { - // / - let j = i - 1; - let p; - // find first non-whitespace prev char - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== ' ') - break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === undefined) { - expression = exp.slice(0, i).trim(); - } - else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) + inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) + inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) + inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) + inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { lastFilterIndex = i + 1; - } - if (filters.length) { - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + case 39: + inSingle = true; + break; + case 96: + inTemplateString = true; + break; + case 40: + paren++; + break; + case 41: + paren--; + break; + case 91: + square++; + break; + case 93: + square--; + break; + case 123: + curly++; + break; + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") + break; } - node.content = expression; + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + } } function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf('('); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, 'filter')}(${exp})`; - } - else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, 'filter')}(${exp}${args !== ')' ? ',' + args : args}`; - } + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } } -const seen$1 = new WeakSet(); +const seen = /* @__PURE__ */ new WeakSet(); const transformMemo = (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const dir = findDir(node, 'memo'); - if (!dir || seen$1.has(node)) { - return; - } - seen$1.add(node); - return () => { - const codegenNode = node.codegenNode || - context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) { - // non-component sub tree should be turned into a block - if (node.tagType !== 1 /* COMPONENT */) { - makeBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(undefined, codegenNode), - `_cache`, - String(context.cached++) - ]); - } - }; + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached++) + ]); + } + }; + } }; function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...([transformFilter] ), - ...(prefixIdentifiers - ? [ - // order is important - trackVForSlotScopes, - transformExpression - ] - : []), - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...prefixIdentifiers ? [ + // order is important + trackVForSlotScopes, + transformExpression + ] : [], + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn, + bind: transformBind, + model: transformModel + } + ]; } -// we name it `baseCompile` so that higher order compilers like -// @vue/compiler-dom can export `compile` while re-exporting everything else. -function baseCompile(template, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === 'module'; - const prefixIdentifiers = (options.prefixIdentifiers === true || isModuleMode); - if (!prefixIdentifiers && options.cacheHandlers) { - onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */)); +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; + if (!prefixIdentifiers && options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = shared.extend({}, options, { + prefixIdentifiers + }); + const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); + if (options.isTS) { + const { expressionPlugins } = options; + if (!expressionPlugins || !expressionPlugins.includes("typescript")) { + options.expressionPlugins = [...expressionPlugins || [], "typescript"]; } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */)); - } - const ast = shared.isString(template) ? baseParse(template, options) : template; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); - if (options.isTS) { - const { expressionPlugins } = options; - if (!expressionPlugins || !expressionPlugins.includes('typescript')) { - options.expressionPlugins = [...(expressionPlugins || []), 'typescript']; - } - } - transform(ast, shared.extend({}, options, { - prefixIdentifiers, - nodeTransforms: [ - ...nodeTransforms, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: shared.extend({}, directiveTransforms, options.directiveTransforms || {} // user transforms - ) - })); - return generate(ast, shared.extend({}, options, { - prefixIdentifiers - })); + } + transform( + ast, + shared.extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: shared.extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); } +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; + const noopDirectiveTransform = () => ({ props: [] }); exports.generateCodeFrame = shared.generateCodeFrame; exports.BASE_TRANSITION = BASE_TRANSITION; +exports.BindingTypes = BindingTypes; exports.CAMELIZE = CAMELIZE; exports.CAPITALIZE = CAPITALIZE; exports.CREATE_BLOCK = CREATE_BLOCK; @@ -5563,6 +6353,10 @@ exports.CREATE_SLOTS = CREATE_SLOTS; exports.CREATE_STATIC = CREATE_STATIC; exports.CREATE_TEXT = CREATE_TEXT; exports.CREATE_VNODE = CREATE_VNODE; +exports.CompilerDeprecationTypes = CompilerDeprecationTypes; +exports.ConstantTypes = ConstantTypes; +exports.ElementTypes = ElementTypes; +exports.ErrorCodes = ErrorCodes; exports.FRAGMENT = FRAGMENT; exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; exports.IS_MEMO_SAME = IS_MEMO_SAME; @@ -5572,6 +6366,8 @@ exports.MERGE_PROPS = MERGE_PROPS; exports.NORMALIZE_CLASS = NORMALIZE_CLASS; exports.NORMALIZE_PROPS = NORMALIZE_PROPS; exports.NORMALIZE_STYLE = NORMALIZE_STYLE; +exports.Namespaces = Namespaces; +exports.NodeTypes = NodeTypes; exports.OPEN_BLOCK = OPEN_BLOCK; exports.POP_SCOPE_ID = POP_SCOPE_ID; exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; @@ -5587,6 +6383,7 @@ exports.TELEPORT = TELEPORT; exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING; exports.TO_HANDLERS = TO_HANDLERS; exports.TO_HANDLER_KEY = TO_HANDLER_KEY; +exports.TS_NODE_TYPES = TS_NODE_TYPES; exports.UNREF = UNREF; exports.WITH_CTX = WITH_CTX; exports.WITH_DIRECTIVES = WITH_DIRECTIVES; @@ -5600,6 +6397,7 @@ exports.buildDirectiveArgs = buildDirectiveArgs; exports.buildProps = buildProps; exports.buildSlots = buildSlots; exports.checkCompatEnabled = checkCompatEnabled; +exports.convertToBlock = convertToBlock; exports.createArrayExpression = createArrayExpression; exports.createAssignmentExpression = createAssignmentExpression; exports.createBlockStatement = createBlockStatement; @@ -5622,13 +6420,14 @@ exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform; exports.createTemplateLiteral = createTemplateLiteral; exports.createTransformContext = createTransformContext; exports.createVNodeCall = createVNodeCall; +exports.errorMessages = errorMessages; exports.extractIdentifiers = extractIdentifiers; exports.findDir = findDir; exports.findProp = findProp; +exports.forAliasRE = forAliasRE; exports.generate = generate; exports.getBaseTransformPreset = getBaseTransformPreset; exports.getConstantType = getConstantType; -exports.getInnerRange = getInnerRange; exports.getMemoedVNodeCall = getMemoedVNodeCall; exports.getVNodeBlockHelper = getVNodeBlockHelper; exports.getVNodeHelper = getVNodeHelper; @@ -5636,10 +6435,10 @@ exports.hasDynamicKeyVBind = hasDynamicKeyVBind; exports.hasScopeRef = hasScopeRef; exports.helperNameMap = helperNameMap; exports.injectProp = injectProp; -exports.isBuiltInType = isBuiltInType; exports.isCoreComponent = isCoreComponent; exports.isFunctionType = isFunctionType; exports.isInDestructureAssignment = isInDestructureAssignment; +exports.isInNewExpression = isInNewExpression; exports.isMemberExpression = isMemberExpression; exports.isMemberExpressionBrowser = isMemberExpressionBrowser; exports.isMemberExpressionNode = isMemberExpressionNode; @@ -5651,10 +6450,9 @@ exports.isStaticExp = isStaticExp; exports.isStaticProperty = isStaticProperty; exports.isStaticPropertyKey = isStaticPropertyKey; exports.isTemplateNode = isTemplateNode; -exports.isText = isText; +exports.isText = isText$1; exports.isVSlot = isVSlot; exports.locStub = locStub; -exports.makeBlock = makeBlock; exports.noopDirectiveTransform = noopDirectiveTransform; exports.processExpression = processExpression; exports.processFor = processFor; @@ -5662,6 +6460,7 @@ exports.processIf = processIf; exports.processSlotOutlet = processSlotOutlet; exports.registerRuntimeHelpers = registerRuntimeHelpers; exports.resolveComponentType = resolveComponentType; +exports.stringifyExpression = stringifyExpression; exports.toValidAssetId = toValidAssetId; exports.trackSlotScopes = trackSlotScopes; exports.trackVForSlotScopes = trackVForSlotScopes; @@ -5672,6 +6471,7 @@ exports.transformExpression = transformExpression; exports.transformModel = transformModel; exports.transformOn = transformOn; exports.traverseNode = traverseNode; +exports.unwrapTSNode = unwrapTSNode; exports.walkBlockDeclarations = walkBlockDeclarations; exports.walkFunctionParams = walkFunctionParams; exports.walkIdentifiers = walkIdentifiers; diff --git a/node_modules/@vue/compiler-core/dist/compiler-core.d.ts b/node_modules/@vue/compiler-core/dist/compiler-core.d.ts index f9f3abb8..1da5b972 100644 --- a/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +++ b/node_modules/@vue/compiler-core/dist/compiler-core.d.ts @@ -1,111 +1,129 @@ -import type { BlockStatement as BlockStatement_2 } from '@babel/types'; -import type { Function as Function_2 } from '@babel/types'; -import { generateCodeFrame } from '@vue/shared'; -import type { Identifier } from '@babel/types'; -import type { Node as Node_3 } from '@babel/types'; -import type { ObjectProperty } from '@babel/types'; +import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty } from '@babel/types'; import { ParserPlugin } from '@babel/parser'; -import type { Program } from '@babel/types'; -import { RawSourceMap } from 'source-map'; -import { SourceMapGenerator } from 'source-map'; - -export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position; - -export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position; - -export declare interface ArrayExpression extends Node_2 { - type: NodeTypes.JS_ARRAY_EXPRESSION; - elements: Array<string | Node_2>; -} - -export declare function assert(condition: boolean, msg?: string): void; - -export declare interface AssignmentExpression extends Node_2 { - type: NodeTypes.JS_ASSIGNMENT_EXPRESSION; - left: SimpleExpressionNode; - right: JSChildNode; -} - -export declare interface AttributeNode extends Node_2 { - type: NodeTypes.ATTRIBUTE; - name: string; - value: TextNode | undefined; -} +import { RawSourceMap, SourceMapGenerator } from 'source-map-js'; +export { generateCodeFrame } from '@vue/shared'; +export declare const FRAGMENT: unique symbol; +export declare const TELEPORT: unique symbol; +export declare const SUSPENSE: unique symbol; +export declare const KEEP_ALIVE: unique symbol; export declare const BASE_TRANSITION: unique symbol; +export declare const OPEN_BLOCK: unique symbol; +export declare const CREATE_BLOCK: unique symbol; +export declare const CREATE_ELEMENT_BLOCK: unique symbol; +export declare const CREATE_VNODE: unique symbol; +export declare const CREATE_ELEMENT_VNODE: unique symbol; +export declare const CREATE_COMMENT: unique symbol; +export declare const CREATE_TEXT: unique symbol; +export declare const CREATE_STATIC: unique symbol; +export declare const RESOLVE_COMPONENT: unique symbol; +export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol; +export declare const RESOLVE_DIRECTIVE: unique symbol; +export declare const RESOLVE_FILTER: unique symbol; +export declare const WITH_DIRECTIVES: unique symbol; +export declare const RENDER_LIST: unique symbol; +export declare const RENDER_SLOT: unique symbol; +export declare const CREATE_SLOTS: unique symbol; +export declare const TO_DISPLAY_STRING: unique symbol; +export declare const MERGE_PROPS: unique symbol; +export declare const NORMALIZE_CLASS: unique symbol; +export declare const NORMALIZE_STYLE: unique symbol; +export declare const NORMALIZE_PROPS: unique symbol; +export declare const GUARD_REACTIVE_PROPS: unique symbol; +export declare const TO_HANDLERS: unique symbol; +export declare const CAMELIZE: unique symbol; +export declare const CAPITALIZE: unique symbol; +export declare const TO_HANDLER_KEY: unique symbol; +export declare const SET_BLOCK_TRACKING: unique symbol; +export declare const PUSH_SCOPE_ID: unique symbol; +export declare const POP_SCOPE_ID: unique symbol; +export declare const WITH_CTX: unique symbol; +export declare const UNREF: unique symbol; +export declare const IS_REF: unique symbol; +export declare const WITH_MEMO: unique symbol; +export declare const IS_MEMO_SAME: unique symbol; +export declare const helperNameMap: Record<symbol, string>; +export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void; -export declare function baseCompile(template: string | RootNode, options?: CompilerOptions): CodegenResult; +type OptionalOptions = 'decodeEntities' | 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | 'expressionPlugins' | keyof CompilerCompatOptions; +type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>; +export declare function baseParse(input: string, options?: ParserOptions): RootNode; -export declare interface BaseElementNode extends Node_2 { - type: NodeTypes.ELEMENT; - ns: Namespace; - tag: string; - tagType: ElementTypes; - isSelfClosing: boolean; - props: Array<AttributeNode | DirectiveNode>; - children: TemplateChildNode[]; -} - -export declare function baseParse(content: string, options?: ParserOptions): RootNode; - -export declare type BindingMetadata = { - [key: string]: BindingTypes | undefined; -} & { - __isScriptSetup?: boolean; - __propsAliases?: Record<string, string>; +type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & { + MODE?: 2 | 3; }; - -export declare const enum BindingTypes { - /** - * returned from data() - */ - DATA = "data", - /** - * declared as a prop - */ - PROPS = "props", - /** - * a local alias of a `<script setup>` destructured prop. - * the original is stored in __propsAliases of the bindingMetadata object. - */ - PROPS_ALIASED = "props-aliased", - /** - * a let binding (may or may not be a ref) - */ - SETUP_LET = "setup-let", - /** - * a const binding that can never be a ref. - * these bindings don't need `unref()` calls when processed in inlined - * template expressions. - */ - SETUP_CONST = "setup-const", - /** - * a const binding that does not need `unref()`, but may be mutated. - */ - SETUP_REACTIVE_CONST = "setup-reactive-const", - /** - * a const binding that may be a ref. - */ - SETUP_MAYBE_REF = "setup-maybe-ref", - /** - * bindings that are guaranteed to be refs - */ - SETUP_REF = "setup-ref", - /** - * declared by other options, e.g. computed, inject - */ - OPTIONS = "options" +interface CompilerCompatOptions { + compatConfig?: CompilerCompatConfig; } - -export declare type BlockCodegenNode = VNodeCall | RenderSlotCall; - -export declare interface BlockStatement extends Node_2 { - type: NodeTypes.JS_BLOCK_STATEMENT; - body: (JSChildNode | IfStatement)[]; +export declare enum CompilerDeprecationTypes { + COMPILER_IS_ON_ELEMENT = "COMPILER_IS_ON_ELEMENT", + COMPILER_V_BIND_SYNC = "COMPILER_V_BIND_SYNC", + COMPILER_V_BIND_OBJECT_ORDER = "COMPILER_V_BIND_OBJECT_ORDER", + COMPILER_V_ON_NATIVE = "COMPILER_V_ON_NATIVE", + COMPILER_V_IF_V_FOR_PRECEDENCE = "COMPILER_V_IF_V_FOR_PRECEDENCE", + COMPILER_NATIVE_TEMPLATE = "COMPILER_NATIVE_TEMPLATE", + COMPILER_INLINE_TEMPLATE = "COMPILER_INLINE_TEMPLATE", + COMPILER_FILTERS = "COMPILER_FILTERS" } +export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean; +export declare function warnDeprecation(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): void; -export declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression; +export type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[]; +export type DirectiveTransform = (dir: DirectiveNode, node: ElementNode, context: TransformContext, augmentor?: (ret: DirectiveTransformResult) => DirectiveTransformResult) => DirectiveTransformResult; +interface DirectiveTransformResult { + props: Property[]; + needRuntime?: boolean | symbol; + ssrTagParts?: TemplateLiteral['elements']; +} +export type StructuralDirectiveTransform = (node: ElementNode, dir: DirectiveNode, context: TransformContext) => void | (() => void); +interface ImportItem { + exp: string | ExpressionNode; + path: string; +} +export interface TransformContext extends Required<Omit<TransformOptions, keyof CompilerCompatOptions>>, CompilerCompatOptions { + selfName: string | null; + root: RootNode; + helpers: Map<symbol, number>; + components: Set<string>; + directives: Set<string>; + hoists: (JSChildNode | null)[]; + imports: ImportItem[]; + temps: number; + cached: number; + identifiers: { + [name: string]: number | undefined; + }; + scopes: { + vFor: number; + vSlot: number; + vPre: number; + vOnce: number; + }; + parent: ParentNode | null; + childIndex: number; + currentNode: RootNode | TemplateChildNode | null; + inVOnce: boolean; + helper<T extends symbol>(name: T): T; + removeHelper<T extends symbol>(name: T): void; + helperString(name: symbol): string; + replaceNode(node: TemplateChildNode): void; + removeNode(node?: TemplateChildNode): void; + onNodeRemoved(): void; + addIdentifiers(exp: ExpressionNode | string): void; + removeIdentifiers(exp: ExpressionNode | string): void; + hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode; + cache<T extends JSChildNode>(exp: T, isVNode?: boolean): CacheExpression | T; + constantCache: WeakMap<TemplateChildNode, ConstantTypes>; + filters?: Set<string>; +} +export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, hmr, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig, }: TransformOptions): TransformContext; +export declare function transform(root: RootNode, options: TransformOptions): void; +export declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void; +export declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform; +export declare const transformElement: NodeTransform; +export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression; +export type PropsExpression = ObjectExpression | CallExpression | ExpressionNode; export declare function buildProps(node: ElementNode, context: TransformContext, props: (DirectiveNode | AttributeNode)[] | undefined, isComponent: boolean, isDynamicComponent: boolean, ssr?: boolean): { props: PropsExpression | undefined; directives: DirectiveNode[]; @@ -113,140 +131,191 @@ export declare function buildProps(node: ElementNode, context: TransformContext, dynamicPropNames: string[]; shouldUseBlock: boolean; }; +export declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression; -export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): { - slots: SlotsExpression; - hasDynamicSlots: boolean; -}; - -export declare interface CacheExpression extends Node_2 { - type: NodeTypes.JS_CACHE_EXPRESSION; - index: number; - value: JSChildNode; - isVNode: boolean; +export type Namespace = number; +export declare enum Namespaces { + HTML = 0, + SVG = 1, + MATH_ML = 2 } - -export declare interface CallExpression extends Node_2 { - type: NodeTypes.JS_CALL_EXPRESSION; - callee: string | symbol; - arguments: (string | symbol | JSChildNode | SSRCodegenNode | TemplateChildNode | TemplateChildNode[])[]; +export declare enum NodeTypes { + ROOT = 0, + ELEMENT = 1, + TEXT = 2, + COMMENT = 3, + SIMPLE_EXPRESSION = 4, + INTERPOLATION = 5, + ATTRIBUTE = 6, + DIRECTIVE = 7, + COMPOUND_EXPRESSION = 8, + IF = 9, + IF_BRANCH = 10, + FOR = 11, + TEXT_CALL = 12, + VNODE_CALL = 13, + JS_CALL_EXPRESSION = 14, + JS_OBJECT_EXPRESSION = 15, + JS_PROPERTY = 16, + JS_ARRAY_EXPRESSION = 17, + JS_FUNCTION_EXPRESSION = 18, + JS_CONDITIONAL_EXPRESSION = 19, + JS_CACHE_EXPRESSION = 20, + JS_BLOCK_STATEMENT = 21, + JS_TEMPLATE_LITERAL = 22, + JS_IF_STATEMENT = 23, + JS_ASSIGNMENT_EXPRESSION = 24, + JS_SEQUENCE_EXPRESSION = 25, + JS_RETURN_STATEMENT = 26 } - -export declare const CAMELIZE: unique symbol; - -export declare const CAPITALIZE: unique symbol; - -export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean; - -export declare interface CodegenContext extends Omit<Required<CodegenOptions>, 'bindingMetadata' | 'inline'> { +export declare enum ElementTypes { + ELEMENT = 0, + COMPONENT = 1, + SLOT = 2, + TEMPLATE = 3 +} +export interface Node { + type: NodeTypes; + loc: SourceLocation; +} +export interface SourceLocation { + start: Position; + end: Position; source: string; - code: string; +} +export interface Position { + offset: number; line: number; column: number; - offset: number; - indentLevel: number; - pure: boolean; - map?: SourceMapGenerator; - helper(key: symbol): string; - push(code: string, node?: CodegenNode): void; - indent(): void; - deindent(withoutNewLine?: boolean): void; - newline(): void; } - -declare type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode; - -export declare interface CodegenOptions extends SharedTransformCodegenOptions { - /** - * - `module` mode will generate ES module import statements for helpers - * and export the render function as the default export. - * - `function` mode will generate a single `const { helpers... } = Vue` - * statement and return the render function. It expects `Vue` to be globally - * available (or passed by wrapping the code with an IIFE). It is meant to be - * used with `new Function(code)()` to generate a render function at runtime. - * @default 'function' - */ - mode?: 'module' | 'function'; - /** - * Generate source map? - * @default false - */ - sourceMap?: boolean; - /** - * SFC scoped styles ID - */ - scopeId?: string | null; - /** - * Option to optimize helper import bindings via variable assignment - * (only used for webpack code-split) - * @default false - */ - optimizeImports?: boolean; - /** - * Customize where to import runtime helpers from. - * @default 'vue' - */ - runtimeModuleName?: string; - /** - * Customize where to import ssr runtime helpers from/** - * @default 'vue/server-renderer' - */ - ssrRuntimeModuleName?: string; - /** - * Customize the global variable name of `Vue` to get helpers from - * in function mode - * @default 'Vue' - */ - runtimeGlobalName?: string; +export type ParentNode = RootNode | ElementNode | IfBranchNode | ForNode; +export type ExpressionNode = SimpleExpressionNode | CompoundExpressionNode; +export type TemplateChildNode = ElementNode | InterpolationNode | CompoundExpressionNode | TextNode | CommentNode | IfNode | IfBranchNode | ForNode | TextCallNode; +export interface RootNode extends Node { + type: NodeTypes.ROOT; + source: string; + children: TemplateChildNode[]; + helpers: Set<symbol>; + components: string[]; + directives: string[]; + hoists: (JSChildNode | null)[]; + imports: ImportItem[]; + cached: number; + temps: number; + ssrHelpers?: symbol[]; + codegenNode?: TemplateChildNode | JSChildNode | BlockStatement; + transformed?: boolean; + filters?: string[]; } - -export declare interface CodegenResult { - code: string; - preamble: string; - ast: RootNode; - map?: RawSourceMap; +export type ElementNode = PlainElementNode | ComponentNode | SlotOutletNode | TemplateNode; +export interface BaseElementNode extends Node { + type: NodeTypes.ELEMENT; + ns: Namespace; + tag: string; + tagType: ElementTypes; + props: Array<AttributeNode | DirectiveNode>; + children: TemplateChildNode[]; + isSelfClosing?: boolean; + innerLoc?: SourceLocation; } - -export declare interface CommentNode extends Node_2 { - type: NodeTypes.COMMENT; - content: string; +export interface PlainElementNode extends BaseElementNode { + tagType: ElementTypes.ELEMENT; + codegenNode: VNodeCall | SimpleExpressionNode | CacheExpression | MemoExpression | undefined; + ssrCodegenNode?: TemplateLiteral; } - -declare type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & { - MODE?: 2 | 3; -}; - -declare interface CompilerCompatOptions { - compatConfig?: CompilerCompatConfig; -} - -export declare const enum CompilerDeprecationTypes { - COMPILER_IS_ON_ELEMENT = "COMPILER_IS_ON_ELEMENT", - COMPILER_V_BIND_SYNC = "COMPILER_V_BIND_SYNC", - COMPILER_V_BIND_PROP = "COMPILER_V_BIND_PROP", - COMPILER_V_BIND_OBJECT_ORDER = "COMPILER_V_BIND_OBJECT_ORDER", - COMPILER_V_ON_NATIVE = "COMPILER_V_ON_NATIVE", - COMPILER_V_IF_V_FOR_PRECEDENCE = "COMPILER_V_IF_V_FOR_PRECEDENCE", - COMPILER_NATIVE_TEMPLATE = "COMPILER_NATIVE_TEMPLATE", - COMPILER_INLINE_TEMPLATE = "COMPILER_INLINE_TEMPLATE", - COMPILER_FILTERS = "COMPILER_FILTER" -} - -export declare interface CompilerError extends SyntaxError { - code: number | string; - loc?: SourceLocation; -} - -export declare type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions; - -export declare interface ComponentNode extends BaseElementNode { +export interface ComponentNode extends BaseElementNode { tagType: ElementTypes.COMPONENT; codegenNode: VNodeCall | CacheExpression | MemoExpression | undefined; ssrCodegenNode?: CallExpression; } - -export declare interface CompoundExpressionNode extends Node_2 { +export interface SlotOutletNode extends BaseElementNode { + tagType: ElementTypes.SLOT; + codegenNode: RenderSlotCall | CacheExpression | undefined; + ssrCodegenNode?: CallExpression; +} +export interface TemplateNode extends BaseElementNode { + tagType: ElementTypes.TEMPLATE; + codegenNode: undefined; +} +export interface TextNode extends Node { + type: NodeTypes.TEXT; + content: string; +} +export interface CommentNode extends Node { + type: NodeTypes.COMMENT; + content: string; +} +export interface AttributeNode extends Node { + type: NodeTypes.ATTRIBUTE; + name: string; + nameLoc: SourceLocation; + value: TextNode | undefined; +} +export interface DirectiveNode extends Node { + type: NodeTypes.DIRECTIVE; + /** + * the normalized name without prefix or shorthands, e.g. "bind", "on" + */ + name: string; + /** + * the raw attribute name, preserving shorthand, and including arg & modifiers + * this is only used during parse. + */ + rawName?: string; + exp: ExpressionNode | undefined; + arg: ExpressionNode | undefined; + modifiers: string[]; + /** + * optional property to cache the expression parse result for v-for + */ + forParseResult?: ForParseResult; +} +/** + * Static types have several levels. + * Higher levels implies lower levels. e.g. a node that can be stringified + * can always be hoisted and skipped for patch. + */ +export declare enum ConstantTypes { + NOT_CONSTANT = 0, + CAN_SKIP_PATCH = 1, + CAN_HOIST = 2, + CAN_STRINGIFY = 3 +} +export interface SimpleExpressionNode extends Node { + type: NodeTypes.SIMPLE_EXPRESSION; + content: string; + isStatic: boolean; + constType: ConstantTypes; + /** + * - `null` means the expression is a simple identifier that doesn't need + * parsing + * - `false` means there was a parsing error + */ + ast?: Node$1 | null | false; + /** + * Indicates this is an identifier for a hoist vnode call and points to the + * hoisted node. + */ + hoisted?: JSChildNode; + /** + * an expression parsed as the params of a function will track + * the identifiers declared inside the function body. + */ + identifiers?: string[]; + isHandlerKey?: boolean; +} +export interface InterpolationNode extends Node { + type: NodeTypes.INTERPOLATION; + content: ExpressionNode; +} +export interface CompoundExpressionNode extends Node { type: NodeTypes.COMPOUND_EXPRESSION; + /** + * - `null` means the expression is a simple identifier that doesn't need + * parsing + * - `false` means there was a parsing error + */ + ast?: Node$1 | null | false; children: (SimpleExpressionNode | CompoundExpressionNode | InterpolationNode | TextNode | string | symbol)[]; /** * an expression parsed as the params of a function will track @@ -255,153 +324,242 @@ export declare interface CompoundExpressionNode extends Node_2 { identifiers?: string[]; isHandlerKey?: boolean; } - -export declare interface ConditionalDynamicSlotNode extends ConditionalExpression { - consequent: DynamicSlotNode; - alternate: DynamicSlotNode | SimpleExpressionNode; +export interface IfNode extends Node { + type: NodeTypes.IF; + branches: IfBranchNode[]; + codegenNode?: IfConditionalExpression | CacheExpression; } - -export declare interface ConditionalExpression extends Node_2 { +export interface IfBranchNode extends Node { + type: NodeTypes.IF_BRANCH; + condition: ExpressionNode | undefined; + children: TemplateChildNode[]; + userKey?: AttributeNode | DirectiveNode; + isTemplateIf?: boolean; +} +export interface ForNode extends Node { + type: NodeTypes.FOR; + source: ExpressionNode; + valueAlias: ExpressionNode | undefined; + keyAlias: ExpressionNode | undefined; + objectIndexAlias: ExpressionNode | undefined; + parseResult: ForParseResult; + children: TemplateChildNode[]; + codegenNode?: ForCodegenNode; +} +export interface ForParseResult { + source: ExpressionNode; + value: ExpressionNode | undefined; + key: ExpressionNode | undefined; + index: ExpressionNode | undefined; + finalized: boolean; +} +export interface TextCallNode extends Node { + type: NodeTypes.TEXT_CALL; + content: TextNode | InterpolationNode | CompoundExpressionNode; + codegenNode: CallExpression | SimpleExpressionNode; +} +export type TemplateTextChildNode = TextNode | InterpolationNode | CompoundExpressionNode; +export interface VNodeCall extends Node { + type: NodeTypes.VNODE_CALL; + tag: string | symbol | CallExpression; + props: PropsExpression | undefined; + children: TemplateChildNode[] | TemplateTextChildNode | SlotsExpression | ForRenderListExpression | SimpleExpressionNode | undefined; + patchFlag: string | undefined; + dynamicProps: string | SimpleExpressionNode | undefined; + directives: DirectiveArguments | undefined; + isBlock: boolean; + disableTracking: boolean; + isComponent: boolean; +} +export type JSChildNode = VNodeCall | CallExpression | ObjectExpression | ArrayExpression | ExpressionNode | FunctionExpression | ConditionalExpression | CacheExpression | AssignmentExpression | SequenceExpression; +export interface CallExpression extends Node { + type: NodeTypes.JS_CALL_EXPRESSION; + callee: string | symbol; + arguments: (string | symbol | JSChildNode | SSRCodegenNode | TemplateChildNode | TemplateChildNode[])[]; +} +export interface ObjectExpression extends Node { + type: NodeTypes.JS_OBJECT_EXPRESSION; + properties: Array<Property>; +} +export interface Property extends Node { + type: NodeTypes.JS_PROPERTY; + key: ExpressionNode; + value: JSChildNode; +} +export interface ArrayExpression extends Node { + type: NodeTypes.JS_ARRAY_EXPRESSION; + elements: Array<string | Node>; +} +export interface FunctionExpression extends Node { + type: NodeTypes.JS_FUNCTION_EXPRESSION; + params: ExpressionNode | string | (ExpressionNode | string)[] | undefined; + returns?: TemplateChildNode | TemplateChildNode[] | JSChildNode; + body?: BlockStatement | IfStatement; + newline: boolean; + /** + * This flag is for codegen to determine whether it needs to generate the + * withScopeId() wrapper + */ + isSlot: boolean; + /** + * __COMPAT__ only, indicates a slot function that should be excluded from + * the legacy $scopedSlots instance property. + */ + isNonScopedSlot?: boolean; +} +export interface ConditionalExpression extends Node { type: NodeTypes.JS_CONDITIONAL_EXPRESSION; test: JSChildNode; consequent: JSChildNode; alternate: JSChildNode; newline: boolean; } - -/** - * Static types have several levels. - * Higher levels implies lower levels. e.g. a node that can be stringified - * can always be hoisted and skipped for patch. - */ -export declare const enum ConstantTypes { - NOT_CONSTANT = 0, - CAN_SKIP_PATCH = 1, - CAN_HOIST = 2, - CAN_STRINGIFY = 3 +export interface CacheExpression extends Node { + type: NodeTypes.JS_CACHE_EXPRESSION; + index: number; + value: JSChildNode; + isVNode: boolean; } - -export declare interface CoreCompilerError extends CompilerError { - code: ErrorCodes; +export interface MemoExpression extends CallExpression { + callee: typeof WITH_MEMO; + arguments: [ExpressionNode, MemoFactory, string, string]; } - -export declare const CREATE_BLOCK: unique symbol; - -export declare const CREATE_COMMENT: unique symbol; - -export declare const CREATE_ELEMENT_BLOCK: unique symbol; - -export declare const CREATE_ELEMENT_VNODE: unique symbol; - -export declare const CREATE_SLOTS: unique symbol; - -export declare const CREATE_STATIC: unique symbol; - -export declare const CREATE_TEXT: unique symbol; - -export declare const CREATE_VNODE: unique symbol; - -export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression; - -export declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression; - -export declare function createBlockStatement(body: BlockStatement['body']): BlockStatement; - -export declare function createCacheExpression(index: number, value: JSChildNode, isVNode?: boolean): CacheExpression; - -export declare function createCallExpression<T extends CallExpression['callee']>(callee: T, args?: CallExpression['arguments'], loc?: SourceLocation): InferCodegenNodeType<T>; - -export declare function createCompilerError<T extends number>(code: T, loc?: SourceLocation, messages?: { - [code: number]: string; -}, additionalMessage?: string): InferCompilerError<T>; - -export declare function createCompoundExpression(children: CompoundExpressionNode['children'], loc?: SourceLocation): CompoundExpressionNode; - -export declare function createConditionalExpression(test: ConditionalExpression['test'], consequent: ConditionalExpression['consequent'], alternate: ConditionalExpression['alternate'], newline?: boolean): ConditionalExpression; - -export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; - -export declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression; - -export declare function createIfStatement(test: IfStatement['test'], consequent: IfStatement['consequent'], alternate?: IfStatement['alternate']): IfStatement; - -export declare function createInterpolation(content: InterpolationNode['content'] | string, loc: SourceLocation): InterpolationNode; - -export declare function createObjectExpression(properties: ObjectExpression['properties'], loc?: SourceLocation): ObjectExpression; - -export declare function createObjectProperty(key: Property['key'] | string, value: Property['value']): Property; - -export declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement; - -export declare function createRoot(children: TemplateChildNode[], loc?: SourceLocation): RootNode; - -export declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression; - -export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode; - -export declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform; - -export declare function createTemplateLiteral(elements: TemplateLiteral['elements']): TemplateLiteral; - -export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig }: TransformOptions): TransformContext; - -export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall; - -export declare interface DirectiveArgumentNode extends ArrayExpression { - elements: [string] | [string, ExpressionNode] | [string, ExpressionNode, ExpressionNode] | [string, ExpressionNode, ExpressionNode, ObjectExpression]; +interface MemoFactory extends FunctionExpression { + returns: BlockCodegenNode; } - -export declare interface DirectiveArguments extends ArrayExpression { +export type SSRCodegenNode = BlockStatement | TemplateLiteral | IfStatement | AssignmentExpression | ReturnStatement | SequenceExpression; +export interface BlockStatement extends Node { + type: NodeTypes.JS_BLOCK_STATEMENT; + body: (JSChildNode | IfStatement)[]; +} +export interface TemplateLiteral extends Node { + type: NodeTypes.JS_TEMPLATE_LITERAL; + elements: (string | JSChildNode)[]; +} +export interface IfStatement extends Node { + type: NodeTypes.JS_IF_STATEMENT; + test: ExpressionNode; + consequent: BlockStatement; + alternate: IfStatement | BlockStatement | ReturnStatement | undefined; +} +export interface AssignmentExpression extends Node { + type: NodeTypes.JS_ASSIGNMENT_EXPRESSION; + left: SimpleExpressionNode; + right: JSChildNode; +} +export interface SequenceExpression extends Node { + type: NodeTypes.JS_SEQUENCE_EXPRESSION; + expressions: JSChildNode[]; +} +export interface ReturnStatement extends Node { + type: NodeTypes.JS_RETURN_STATEMENT; + returns: TemplateChildNode | TemplateChildNode[] | JSChildNode; +} +export interface DirectiveArguments extends ArrayExpression { elements: DirectiveArgumentNode[]; } - -export declare interface DirectiveNode extends Node_2 { - type: NodeTypes.DIRECTIVE; - name: string; - exp: ExpressionNode | undefined; - arg: ExpressionNode | undefined; - modifiers: string[]; - /** - * optional property to cache the expression parse result for v-for - */ - parseResult?: ForParseResult; +export interface DirectiveArgumentNode extends ArrayExpression { + elements: [string] | [string, ExpressionNode] | [string, ExpressionNode, ExpressionNode] | [string, ExpressionNode, ExpressionNode, ObjectExpression]; } - -export declare type DirectiveTransform = (dir: DirectiveNode, node: ElementNode, context: TransformContext, augmentor?: (ret: DirectiveTransformResult) => DirectiveTransformResult) => DirectiveTransformResult; - -declare interface DirectiveTransformResult { - props: Property[]; - needRuntime?: boolean | symbol; - ssrTagParts?: TemplateLiteral['elements']; +export interface RenderSlotCall extends CallExpression { + callee: typeof RENDER_SLOT; + arguments: [string, string | ExpressionNode] | [string, string | ExpressionNode, PropsExpression] | [ + string, + string | ExpressionNode, + PropsExpression | '{}', + TemplateChildNode[] + ]; } - -export declare interface DynamicSlotEntries extends ArrayExpression { - elements: (ConditionalDynamicSlotNode | ListDynamicSlotNode)[]; +export type SlotsExpression = SlotsObjectExpression | DynamicSlotsExpression; +export interface SlotsObjectExpression extends ObjectExpression { + properties: SlotsObjectProperty[]; } - -export declare interface DynamicSlotFnProperty extends Property { +export interface SlotsObjectProperty extends Property { value: SlotFunctionExpression; } - -export declare interface DynamicSlotNode extends ObjectExpression { - properties: [Property, DynamicSlotFnProperty]; +export interface SlotFunctionExpression extends FunctionExpression { + returns: TemplateChildNode[]; } - -export declare interface DynamicSlotsExpression extends CallExpression { +export interface DynamicSlotsExpression extends CallExpression { callee: typeof CREATE_SLOTS; arguments: [SlotsObjectExpression, DynamicSlotEntries]; } - -export declare type ElementNode = PlainElementNode | ComponentNode | SlotOutletNode | TemplateNode; - -export declare const enum ElementTypes { - ELEMENT = 0, - COMPONENT = 1, - SLOT = 2, - TEMPLATE = 3 +export interface DynamicSlotEntries extends ArrayExpression { + elements: (ConditionalDynamicSlotNode | ListDynamicSlotNode)[]; } +export interface ConditionalDynamicSlotNode extends ConditionalExpression { + consequent: DynamicSlotNode; + alternate: DynamicSlotNode | SimpleExpressionNode; +} +export interface ListDynamicSlotNode extends CallExpression { + callee: typeof RENDER_LIST; + arguments: [ExpressionNode, ListDynamicSlotIterator]; +} +export interface ListDynamicSlotIterator extends FunctionExpression { + returns: DynamicSlotNode; +} +export interface DynamicSlotNode extends ObjectExpression { + properties: [Property, DynamicSlotFnProperty]; +} +export interface DynamicSlotFnProperty extends Property { + value: SlotFunctionExpression; +} +export type BlockCodegenNode = VNodeCall | RenderSlotCall; +export interface IfConditionalExpression extends ConditionalExpression { + consequent: BlockCodegenNode | MemoExpression; + alternate: BlockCodegenNode | IfConditionalExpression | MemoExpression; +} +export interface ForCodegenNode extends VNodeCall { + isBlock: true; + tag: typeof FRAGMENT; + props: undefined; + children: ForRenderListExpression; + patchFlag: string; + disableTracking: boolean; +} +export interface ForRenderListExpression extends CallExpression { + callee: typeof RENDER_LIST; + arguments: [ExpressionNode, ForIteratorExpression]; +} +export interface ForIteratorExpression extends FunctionExpression { + returns: BlockCodegenNode; +} +export declare const locStub: SourceLocation; +export declare function createRoot(children: TemplateChildNode[], source?: string): RootNode; +export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall; +export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression; +export declare function createObjectExpression(properties: ObjectExpression['properties'], loc?: SourceLocation): ObjectExpression; +export declare function createObjectProperty(key: Property['key'] | string, value: Property['value']): Property; +export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode; +export declare function createInterpolation(content: InterpolationNode['content'] | string, loc: SourceLocation): InterpolationNode; +export declare function createCompoundExpression(children: CompoundExpressionNode['children'], loc?: SourceLocation): CompoundExpressionNode; +type InferCodegenNodeType<T> = T extends typeof RENDER_SLOT ? RenderSlotCall : CallExpression; +export declare function createCallExpression<T extends CallExpression['callee']>(callee: T, args?: CallExpression['arguments'], loc?: SourceLocation): InferCodegenNodeType<T>; +export declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression; +export declare function createConditionalExpression(test: ConditionalExpression['test'], consequent: ConditionalExpression['consequent'], alternate: ConditionalExpression['alternate'], newline?: boolean): ConditionalExpression; +export declare function createCacheExpression(index: number, value: JSChildNode, isVNode?: boolean): CacheExpression; +export declare function createBlockStatement(body: BlockStatement['body']): BlockStatement; +export declare function createTemplateLiteral(elements: TemplateLiteral['elements']): TemplateLiteral; +export declare function createIfStatement(test: IfStatement['test'], consequent: IfStatement['consequent'], alternate?: IfStatement['alternate']): IfStatement; +export declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression; +export declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression; +export declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement; +export declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE; +export declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK; +export declare function convertToBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void; -export declare const enum ErrorCodes { +export interface CompilerError extends SyntaxError { + code: number | string; + loc?: SourceLocation; +} +export interface CoreCompilerError extends CompilerError { + code: ErrorCodes; +} +type InferCompilerError<T> = T extends ErrorCodes ? CoreCompilerError : CompilerError; +export declare function createCompilerError<T extends number>(code: T, loc?: SourceLocation, messages?: { + [code: number]: string; +}, additionalMessage?: string): InferCompilerError<T>; +export declare enum ErrorCodes { ABRUPT_CLOSING_OF_EMPTY_COMMENT = 0, CDATA_IN_HTML_CONTENT = 1, DUPLICATE_ATTRIBUTE = 2, @@ -446,305 +604,41 @@ export declare const enum ErrorCodes { X_V_MODEL_NO_EXPRESSION = 41, X_V_MODEL_MALFORMED_EXPRESSION = 42, X_V_MODEL_ON_SCOPE_VARIABLE = 43, - X_INVALID_EXPRESSION = 44, - X_KEEP_ALIVE_INVALID_CHILDREN = 45, - X_PREFIX_ID_NOT_SUPPORTED = 46, - X_MODULE_MODE_NOT_SUPPORTED = 47, - X_CACHE_HANDLER_NOT_SUPPORTED = 48, - X_SCOPE_ID_NOT_SUPPORTED = 49, - __EXTEND_POINT__ = 50 + X_V_MODEL_ON_PROPS = 44, + X_INVALID_EXPRESSION = 45, + X_KEEP_ALIVE_INVALID_CHILDREN = 46, + X_PREFIX_ID_NOT_SUPPORTED = 47, + X_MODULE_MODE_NOT_SUPPORTED = 48, + X_CACHE_HANDLER_NOT_SUPPORTED = 49, + X_SCOPE_ID_NOT_SUPPORTED = 50, + X_VNODE_HOOKS = 51, + __EXTEND_POINT__ = 52 } +export declare const errorMessages: Record<ErrorCodes, string>; -declare interface ErrorHandlingOptions { +interface ErrorHandlingOptions { onWarn?: (warning: CompilerError) => void; onError?: (error: CompilerError) => void; } - -export declare type ExpressionNode = SimpleExpressionNode | CompoundExpressionNode; - -export declare function extractIdentifiers(param: Node_3, nodes?: Identifier[]): Identifier[]; - -export declare function findDir(node: ElementNode, name: string | RegExp, allowEmpty?: boolean): DirectiveNode | undefined; - -export declare function findProp(node: ElementNode, name: string, dynamicOnly?: boolean, allowEmpty?: boolean): ElementNode['props'][0] | undefined; - -export declare interface ForCodegenNode extends VNodeCall { - isBlock: true; - tag: typeof FRAGMENT; - props: undefined; - children: ForRenderListExpression; - patchFlag: string; - disableTracking: boolean; -} - -export declare interface ForIteratorExpression extends FunctionExpression { - returns: BlockCodegenNode; -} - -export declare interface ForNode extends Node_2 { - type: NodeTypes.FOR; - source: ExpressionNode; - valueAlias: ExpressionNode | undefined; - keyAlias: ExpressionNode | undefined; - objectIndexAlias: ExpressionNode | undefined; - parseResult: ForParseResult; - children: TemplateChildNode[]; - codegenNode?: ForCodegenNode; -} - -declare interface ForParseResult { - source: ExpressionNode; - value: ExpressionNode | undefined; - key: ExpressionNode | undefined; - index: ExpressionNode | undefined; -} - -export declare interface ForRenderListExpression extends CallExpression { - callee: typeof RENDER_LIST; - arguments: [ExpressionNode, ForIteratorExpression]; -} - -export declare const FRAGMENT: unique symbol; - -export declare interface FunctionExpression extends Node_2 { - type: NodeTypes.JS_FUNCTION_EXPRESSION; - params: ExpressionNode | string | (ExpressionNode | string)[] | undefined; - returns?: TemplateChildNode | TemplateChildNode[] | JSChildNode; - body?: BlockStatement | IfStatement; - newline: boolean; +export interface ParserOptions extends ErrorHandlingOptions, CompilerCompatOptions { /** - * This flag is for codegen to determine whether it needs to generate the - * withScopeId() wrapper + * Base mode is platform agnostic and only parses HTML-like template syntax, + * treating all tags the same way. Specific tag parsing behavior can be + * configured by higher-level compilers. + * + * HTML mode adds additional logic for handling special parsing behavior in + * `<script>`, `<style>`,`<title>` and `<textarea>`. + * The logic is handled inside compiler-core for efficiency. + * + * SFC mode treats content of all root-level tags except `<template>` as plain + * text. */ - isSlot: boolean; + parseMode?: 'base' | 'html' | 'sfc'; /** - * __COMPAT__ only, indicates a slot function that should be excluded from - * the legacy $scopedSlots instance property. + * Specify the root namespace to use when parsing a template. + * Defaults to `Namespaces.HTML` (0). */ - isNonScopedSlot?: boolean; -} - -export declare function generate(ast: RootNode, options?: CodegenOptions & { - onContextCreated?: (context: CodegenContext) => void; -}): CodegenResult; - -export { generateCodeFrame } - -export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset; - -export declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode, context: TransformContext): ConstantTypes; - -export declare function getInnerRange(loc: SourceLocation, offset: number, length: number): SourceLocation; - -export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall; - -export declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK; - -export declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE; - -export declare const GUARD_REACTIVE_PROPS: unique symbol; - -export declare function hasDynamicKeyVBind(node: ElementNode): boolean; - -export declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | undefined, ids: TransformContext['identifiers']): boolean; - -export declare const helperNameMap: any; - -export declare type HoistTransform = (children: TemplateChildNode[], context: TransformContext, parent: ParentNode_2) => void; - -export declare interface IfBranchNode extends Node_2 { - type: NodeTypes.IF_BRANCH; - condition: ExpressionNode | undefined; - children: TemplateChildNode[]; - userKey?: AttributeNode | DirectiveNode; - isTemplateIf?: boolean; -} - -export declare interface IfConditionalExpression extends ConditionalExpression { - consequent: BlockCodegenNode | MemoExpression; - alternate: BlockCodegenNode | IfConditionalExpression | MemoExpression; -} - -export declare interface IfNode extends Node_2 { - type: NodeTypes.IF; - branches: IfBranchNode[]; - codegenNode?: IfConditionalExpression | CacheExpression; -} - -export declare interface IfStatement extends Node_2 { - type: NodeTypes.JS_IF_STATEMENT; - test: ExpressionNode; - consequent: BlockStatement; - alternate: IfStatement | BlockStatement | ReturnStatement | undefined; -} - -declare interface ImportItem { - exp: string | ExpressionNode; - path: string; -} - -declare type InferCodegenNodeType<T> = T extends typeof RENDER_SLOT ? RenderSlotCall : CallExpression; - -declare type InferCompilerError<T> = T extends ErrorCodes ? CoreCompilerError : CompilerError; - -export declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void; - -export declare interface InterpolationNode extends Node_2 { - type: NodeTypes.INTERPOLATION; - content: ExpressionNode; -} - -export declare const IS_MEMO_SAME: unique symbol; - -export declare const IS_REF: unique symbol; - -export declare const isBuiltInType: (tag: string, expected: string) => boolean; - -export declare function isCoreComponent(tag: string): symbol | void; - -export declare const isFunctionType: (node: Node_3) => node is Function_2; - -export declare function isInDestructureAssignment(parent: Node_3, parentStack: Node_3[]): boolean; - -export declare const isMemberExpression: (path: string, context: TransformContext) => boolean; - -/** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ -export declare const isMemberExpressionBrowser: (path: string) => boolean; - -export declare const isMemberExpressionNode: (path: string, context: TransformContext) => boolean; - -export declare function isReferencedIdentifier(id: Identifier, parent: Node_3 | null, parentStack: Node_3[]): boolean; - -export declare const isSimpleIdentifier: (name: string) => boolean; - -export declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode; - -export declare function isStaticArgOf(arg: DirectiveNode['arg'], name: string): boolean; - -export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode; - -export declare const isStaticProperty: (node: Node_3) => node is ObjectProperty; - -export declare const isStaticPropertyKey: (node: Node_3, parent: Node_3) => boolean; - -export declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode; - -export declare function isText(node: TemplateChildNode): node is TextNode | InterpolationNode; - -export declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode; - -export declare type JSChildNode = VNodeCall | CallExpression | ObjectExpression | ArrayExpression | ExpressionNode | FunctionExpression | ConditionalExpression | CacheExpression | AssignmentExpression | SequenceExpression; - -export declare const KEEP_ALIVE: unique symbol; - -export declare interface ListDynamicSlotIterator extends FunctionExpression { - returns: DynamicSlotNode; -} - -export declare interface ListDynamicSlotNode extends CallExpression { - callee: typeof RENDER_LIST; - arguments: [ExpressionNode, ListDynamicSlotIterator]; -} - -export declare const locStub: SourceLocation; - -export declare function makeBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void; - -export declare interface MemoExpression extends CallExpression { - callee: typeof WITH_MEMO; - arguments: [ExpressionNode, MemoFactory, string, string]; -} - -declare interface MemoFactory extends FunctionExpression { - returns: BlockCodegenNode; -} - -export declare const MERGE_PROPS: unique symbol; - -declare type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>; - -export declare type Namespace = number; - -export declare const enum Namespaces { - HTML = 0 -} - -declare interface Node_2 { - type: NodeTypes; - loc: SourceLocation; -} -export { Node_2 as Node } - -export declare type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[]; - -export declare const enum NodeTypes { - ROOT = 0, - ELEMENT = 1, - TEXT = 2, - COMMENT = 3, - SIMPLE_EXPRESSION = 4, - INTERPOLATION = 5, - ATTRIBUTE = 6, - DIRECTIVE = 7, - COMPOUND_EXPRESSION = 8, - IF = 9, - IF_BRANCH = 10, - FOR = 11, - TEXT_CALL = 12, - VNODE_CALL = 13, - JS_CALL_EXPRESSION = 14, - JS_OBJECT_EXPRESSION = 15, - JS_PROPERTY = 16, - JS_ARRAY_EXPRESSION = 17, - JS_FUNCTION_EXPRESSION = 18, - JS_CONDITIONAL_EXPRESSION = 19, - JS_CACHE_EXPRESSION = 20, - JS_BLOCK_STATEMENT = 21, - JS_TEMPLATE_LITERAL = 22, - JS_IF_STATEMENT = 23, - JS_ASSIGNMENT_EXPRESSION = 24, - JS_SEQUENCE_EXPRESSION = 25, - JS_RETURN_STATEMENT = 26 -} - -export declare const noopDirectiveTransform: DirectiveTransform; - -export declare const NORMALIZE_CLASS: unique symbol; - -export declare const NORMALIZE_PROPS: unique symbol; - -export declare const NORMALIZE_STYLE: unique symbol; - -export declare interface ObjectExpression extends Node_2 { - type: NodeTypes.JS_OBJECT_EXPRESSION; - properties: Array<Property>; -} - -export declare const OPEN_BLOCK: unique symbol; - -declare type OptionalOptions = 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | keyof CompilerCompatOptions; - -declare type ParentNode_2 = RootNode | ElementNode | IfBranchNode | ForNode; -export { ParentNode_2 as ParentNode } - -declare interface ParserContext { - options: MergedParserOptions; - readonly originalSource: string; - source: string; - offset: number; - line: number; - column: number; - inPre: boolean; - inVPre: boolean; - onWarn: NonNullable<ErrorHandlingOptions['onWarn']>; -} - -export declare interface ParserOptions extends ErrorHandlingOptions, CompilerCompatOptions { + ns?: Namespaces; /** * e.g. platform native elements, e.g. `<div>` for browsers */ @@ -768,11 +662,7 @@ export declare interface ParserOptions extends ErrorHandlingOptions, CompilerCom /** * Get tag namespace */ - getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace; - /** - * Get text parsing mode for this element - */ - getTextMode?: (node: ElementNode, parent: ElementNode | undefined) => TextModes; + getNamespace?: (tag: string, parent: ElementNode | undefined, rootNamespace: Namespace) => Namespace; /** * @default ['{{', '}}'] */ @@ -782,7 +672,8 @@ export declare interface ParserOptions extends ErrorHandlingOptions, CompilerCom */ whitespace?: 'preserve' | 'condense'; /** - * Only needed for DOM compilers + * Only used for DOM compilers that runs in the browser. + * In non-browser builds, this option is ignored. */ decodeEntities?: (rawText: string, asAttr: boolean) => string; /** @@ -790,94 +681,71 @@ export declare interface ParserOptions extends ErrorHandlingOptions, CompilerCom * This defaults to `true` in development and `false` in production builds. */ comments?: boolean; + /** + * Parse JavaScript expressions with Babel. + * @default false + */ + prefixIdentifiers?: boolean; + /** + * A list of parser plugins to enable for `@babel/parser`, which is used to + * parse expressions in bindings and interpolations. + * https://babeljs.io/docs/en/next/babel-parser#plugins + */ + expressionPlugins?: ParserPlugin[]; } - -export declare interface PlainElementNode extends BaseElementNode { - tagType: ElementTypes.ELEMENT; - codegenNode: VNodeCall | SimpleExpressionNode | CacheExpression | MemoExpression | undefined; - ssrCodegenNode?: TemplateLiteral; +export type HoistTransform = (children: TemplateChildNode[], context: TransformContext, parent: ParentNode) => void; +export declare enum BindingTypes { + /** + * returned from data() + */ + DATA = "data", + /** + * declared as a prop + */ + PROPS = "props", + /** + * a local alias of a `<script setup>` destructured prop. + * the original is stored in __propsAliases of the bindingMetadata object. + */ + PROPS_ALIASED = "props-aliased", + /** + * a let binding (may or may not be a ref) + */ + SETUP_LET = "setup-let", + /** + * a const binding that can never be a ref. + * these bindings don't need `unref()` calls when processed in inlined + * template expressions. + */ + SETUP_CONST = "setup-const", + /** + * a const binding that does not need `unref()`, but may be mutated. + */ + SETUP_REACTIVE_CONST = "setup-reactive-const", + /** + * a const binding that may be a ref. + */ + SETUP_MAYBE_REF = "setup-maybe-ref", + /** + * bindings that are guaranteed to be refs + */ + SETUP_REF = "setup-ref", + /** + * declared by other options, e.g. computed, inject + */ + OPTIONS = "options", + /** + * a literal constant, e.g. 'foo', 1, true + */ + LITERAL_CONST = "literal-const" } - -export declare const POP_SCOPE_ID: unique symbol; - -export declare interface Position { - offset: number; - line: number; - column: number; -} - -export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode; - -export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined; - -export declare function processIf(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (node: IfNode, branch: IfBranchNode, isRoot: boolean) => (() => void) | undefined): (() => void) | undefined; - -export declare function processSlotOutlet(node: SlotOutletNode, context: TransformContext): SlotOutletProcessResult; - -export declare interface Property extends Node_2 { - type: NodeTypes.JS_PROPERTY; - key: ExpressionNode; - value: JSChildNode; -} - -export declare type PropsExpression = ObjectExpression | CallExpression | ExpressionNode; - -export declare const PUSH_SCOPE_ID: unique symbol; - -export declare function registerRuntimeHelpers(helpers: any): void; - -export declare const RENDER_LIST: unique symbol; - -export declare const RENDER_SLOT: unique symbol; - -export declare interface RenderSlotCall extends CallExpression { - callee: typeof RENDER_SLOT; - arguments: [string, string | ExpressionNode] | [string, string | ExpressionNode, PropsExpression] | [ - string, - string | ExpressionNode, - PropsExpression | '{}', - TemplateChildNode[] - ]; -} - -export declare const RESOLVE_COMPONENT: unique symbol; - -export declare const RESOLVE_DIRECTIVE: unique symbol; - -export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol; - -export declare const RESOLVE_FILTER: unique symbol; - -export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression; - -export declare interface ReturnStatement extends Node_2 { - type: NodeTypes.JS_RETURN_STATEMENT; - returns: TemplateChildNode | TemplateChildNode[] | JSChildNode; -} - -export declare interface RootNode extends Node_2 { - type: NodeTypes.ROOT; - children: TemplateChildNode[]; - helpers: symbol[]; - components: string[]; - directives: string[]; - hoists: (JSChildNode | null)[]; - imports: ImportItem[]; - cached: number; - temps: number; - ssrHelpers?: symbol[]; - codegenNode?: TemplateChildNode | JSChildNode | BlockStatement; - filters?: string[]; -} - -export declare interface SequenceExpression extends Node_2 { - type: NodeTypes.JS_SEQUENCE_EXPRESSION; - expressions: JSChildNode[]; -} - -export declare const SET_BLOCK_TRACKING: unique symbol; - -declare interface SharedTransformCodegenOptions { +export type BindingMetadata = { + [key: string]: BindingTypes | undefined; +} & { + __isScriptSetup?: boolean; + __propsAliases?: Record<string, string>; +}; +interface SharedTransformCodegenOptions { /** * Transform expressions like {{ foo }} to `_ctx.foo`. * If this option is false, the generated code will be wrapped in a @@ -928,161 +796,7 @@ declare interface SharedTransformCodegenOptions { */ filename?: string; } - -export declare interface SimpleExpressionNode extends Node_2 { - type: NodeTypes.SIMPLE_EXPRESSION; - content: string; - isStatic: boolean; - constType: ConstantTypes; - /** - * Indicates this is an identifier for a hoist vnode call and points to the - * hoisted node. - */ - hoisted?: JSChildNode; - /** - * an expression parsed as the params of a function will track - * the identifiers declared inside the function body. - */ - identifiers?: string[]; - isHandlerKey?: boolean; -} - -export declare type SlotFnBuilder = (slotProps: ExpressionNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression; - -export declare interface SlotFunctionExpression extends FunctionExpression { - returns: TemplateChildNode[]; -} - -export declare interface SlotOutletNode extends BaseElementNode { - tagType: ElementTypes.SLOT; - codegenNode: RenderSlotCall | CacheExpression | undefined; - ssrCodegenNode?: CallExpression; -} - -declare interface SlotOutletProcessResult { - slotName: string | ExpressionNode; - slotProps: PropsExpression | undefined; -} - -export declare type SlotsExpression = SlotsObjectExpression | DynamicSlotsExpression; - -export declare interface SlotsObjectExpression extends ObjectExpression { - properties: SlotsObjectProperty[]; -} - -export declare interface SlotsObjectProperty extends Property { - value: SlotFunctionExpression; -} - -export declare interface SourceLocation { - start: Position; - end: Position; - source: string; -} - -export declare type SSRCodegenNode = BlockStatement | TemplateLiteral | IfStatement | AssignmentExpression | ReturnStatement | SequenceExpression; - -export declare type StructuralDirectiveTransform = (node: ElementNode, dir: DirectiveNode, context: TransformContext) => void | (() => void); - -export declare const SUSPENSE: unique symbol; - -export declare const TELEPORT: unique symbol; - -export declare type TemplateChildNode = ElementNode | InterpolationNode | CompoundExpressionNode | TextNode | CommentNode | IfNode | IfBranchNode | ForNode | TextCallNode; - -export declare interface TemplateLiteral extends Node_2 { - type: NodeTypes.JS_TEMPLATE_LITERAL; - elements: (string | JSChildNode)[]; -} - -export declare interface TemplateNode extends BaseElementNode { - tagType: ElementTypes.TEMPLATE; - codegenNode: undefined; -} - -export declare type TemplateTextChildNode = TextNode | InterpolationNode | CompoundExpressionNode; - -export declare interface TextCallNode extends Node_2 { - type: NodeTypes.TEXT_CALL; - content: TextNode | InterpolationNode | CompoundExpressionNode; - codegenNode: CallExpression | SimpleExpressionNode; -} - -export declare const enum TextModes { - DATA = 0, - RCDATA = 1, - RAWTEXT = 2, - CDATA = 3, - ATTRIBUTE_VALUE = 4 -} - -export declare interface TextNode extends Node_2 { - type: NodeTypes.TEXT; - content: string; -} - -export declare const TO_DISPLAY_STRING: unique symbol; - -export declare const TO_HANDLER_KEY: unique symbol; - -export declare const TO_HANDLERS: unique symbol; - -export declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string; - -export declare const trackSlotScopes: NodeTransform; - -export declare const trackVForSlotScopes: NodeTransform; - -export declare function transform(root: RootNode, options: TransformOptions): void; - -export declare const transformBind: DirectiveTransform; - -export declare interface TransformContext extends Required<Omit<TransformOptions, 'filename' | keyof CompilerCompatOptions>>, CompilerCompatOptions { - selfName: string | null; - root: RootNode; - helpers: Map<symbol, number>; - components: Set<string>; - directives: Set<string>; - hoists: (JSChildNode | null)[]; - imports: ImportItem[]; - temps: number; - cached: number; - identifiers: { - [name: string]: number | undefined; - }; - scopes: { - vFor: number; - vSlot: number; - vPre: number; - vOnce: number; - }; - parent: ParentNode_2 | null; - childIndex: number; - currentNode: RootNode | TemplateChildNode | null; - inVOnce: boolean; - helper<T extends symbol>(name: T): T; - removeHelper<T extends symbol>(name: T): void; - helperString(name: symbol): string; - replaceNode(node: TemplateChildNode): void; - removeNode(node?: TemplateChildNode): void; - onNodeRemoved(): void; - addIdentifiers(exp: ExpressionNode | string): void; - removeIdentifiers(exp: ExpressionNode | string): void; - hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode; - cache<T extends JSChildNode>(exp: T, isVNode?: boolean): CacheExpression | T; - constantCache: Map<TemplateChildNode, ConstantTypes>; - filters?: Set<string>; -} - -export declare const transformElement: NodeTransform; - -export declare const transformExpression: NodeTransform; - -export declare const transformModel: DirectiveTransform; - -export declare const transformOn: DirectiveTransform; - -export declare interface TransformOptions extends SharedTransformCodegenOptions, ErrorHandlingOptions, CompilerCompatOptions { +export interface TransformOptions extends SharedTransformCodegenOptions, ErrorHandlingOptions, CompilerCompatOptions { /** * An array of node transforms to be applied to every AST node. */ @@ -1157,42 +871,163 @@ export declare interface TransformOptions extends SharedTransformCodegenOptions, * needed to render inline CSS variables on component root */ ssrCssVars?: string; + /** + * Whether to compile the template assuming it needs to handle HMR. + * Some edge cases may need to generate different code for HMR to work + * correctly, e.g. #6938, #7138 + */ + hmr?: boolean; } +export interface CodegenOptions extends SharedTransformCodegenOptions { + /** + * - `module` mode will generate ES module import statements for helpers + * and export the render function as the default export. + * - `function` mode will generate a single `const { helpers... } = Vue` + * statement and return the render function. It expects `Vue` to be globally + * available (or passed by wrapping the code with an IIFE). It is meant to be + * used with `new Function(code)()` to generate a render function at runtime. + * @default 'function' + */ + mode?: 'module' | 'function'; + /** + * Generate source map? + * @default false + */ + sourceMap?: boolean; + /** + * SFC scoped styles ID + */ + scopeId?: string | null; + /** + * Option to optimize helper import bindings via variable assignment + * (only used for webpack code-split) + * @default false + */ + optimizeImports?: boolean; + /** + * Customize where to import runtime helpers from. + * @default 'vue' + */ + runtimeModuleName?: string; + /** + * Customize where to import ssr runtime helpers from/** + * @default 'vue/server-renderer' + */ + ssrRuntimeModuleName?: string; + /** + * Customize the global variable name of `Vue` to get helpers from + * in function mode + * @default 'Vue' + */ + runtimeGlobalName?: string; +} +export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions; -export declare type TransformPreset = [ -NodeTransform[], -Record<string, DirectiveTransform> +type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode; +export interface CodegenResult { + code: string; + preamble: string; + ast: RootNode; + map?: RawSourceMap; +} +export interface CodegenContext extends Omit<Required<CodegenOptions>, 'bindingMetadata' | 'inline'> { + source: string; + code: string; + line: number; + column: number; + offset: number; + indentLevel: number; + pure: boolean; + map?: SourceMapGenerator; + helper(key: symbol): string; + push(code: string, newlineIndex?: number, node?: CodegenNode): void; + indent(): void; + deindent(withoutNewLine?: boolean): void; + newline(): void; +} +export declare function generate(ast: RootNode, options?: CodegenOptions & { + onContextCreated?: (context: CodegenContext) => void; +}): CodegenResult; + +export type TransformPreset = [ + NodeTransform[], + Record<string, DirectiveTransform> ]; +export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset; +export declare function baseCompile(source: string | RootNode, options?: CompilerOptions): CodegenResult; -export declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void; +export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode; +export declare function isCoreComponent(tag: string): symbol | void; +export declare const isSimpleIdentifier: (name: string) => boolean; +/** + * Simple lexer to check if an expression is a member expression. This is + * lax and only checks validity at the root level (i.e. does not validate exps + * inside square brackets), but it's ok since these are only used on template + * expressions and false positives are invalid expressions in the first place. + */ +export declare const isMemberExpressionBrowser: (path: string) => boolean; +export declare const isMemberExpressionNode: (path: string, context: TransformContext) => boolean; +export declare const isMemberExpression: (path: string, context: TransformContext) => boolean; +export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position; +export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position; +export declare function assert(condition: boolean, msg?: string): void; +export declare function findDir(node: ElementNode, name: string | RegExp, allowEmpty?: boolean): DirectiveNode | undefined; +export declare function findProp(node: ElementNode, name: string, dynamicOnly?: boolean, allowEmpty?: boolean): ElementNode['props'][0] | undefined; +export declare function isStaticArgOf(arg: DirectiveNode['arg'], name: string): boolean; +export declare function hasDynamicKeyVBind(node: ElementNode): boolean; +export declare function isText(node: TemplateChildNode): node is TextNode | InterpolationNode; +export declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode; +export declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode; +export declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode; +export declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void; +export declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string; +export declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | undefined, ids: TransformContext['identifiers']): boolean; +export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall; +export declare const forAliasRE: RegExp; -export declare const UNREF: unique symbol; +export declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void; +export declare function isReferencedIdentifier(id: Identifier, parent: Node$1 | null, parentStack: Node$1[]): boolean; +export declare function isInDestructureAssignment(parent: Node$1, parentStack: Node$1[]): boolean; +export declare function isInNewExpression(parentStack: Node$1[]): boolean; +export declare function walkFunctionParams(node: Function, onIdent: (id: Identifier) => void): void; +export declare function walkBlockDeclarations(block: BlockStatement$1 | Program, onIdent: (node: Identifier) => void): void; +export declare function extractIdentifiers(param: Node$1, nodes?: Identifier[]): Identifier[]; +export declare const isFunctionType: (node: Node$1) => node is Function; +export declare const isStaticProperty: (node: Node$1) => node is ObjectProperty; +export declare const isStaticPropertyKey: (node: Node$1, parent: Node$1) => boolean; +export declare const TS_NODE_TYPES: string[]; +export declare function unwrapTSNode(node: Node$1): Node$1; -export declare interface VNodeCall extends Node_2 { - type: NodeTypes.VNODE_CALL; - tag: string | symbol | CallExpression; - props: PropsExpression | undefined; - children: TemplateChildNode[] | TemplateTextChildNode | SlotsExpression | ForRenderListExpression | SimpleExpressionNode | undefined; - patchFlag: string | undefined; - dynamicProps: string | SimpleExpressionNode | undefined; - directives: DirectiveArguments | undefined; - isBlock: boolean; - disableTracking: boolean; - isComponent: boolean; +export declare const transformModel: DirectiveTransform; + +export declare const transformOn: DirectiveTransform; + +export declare const transformBind: DirectiveTransform; + +export declare const noopDirectiveTransform: DirectiveTransform; + +export declare function processIf(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (node: IfNode, branch: IfBranchNode, isRoot: boolean) => (() => void) | undefined): (() => void) | undefined; + +export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined; +export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[]; + +export declare const transformExpression: NodeTransform; +export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode; +export declare function stringifyExpression(exp: ExpressionNode | string): string; + +export declare const trackSlotScopes: NodeTransform; +export declare const trackVForSlotScopes: NodeTransform; +export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, vFor: DirectiveNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression; +export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): { + slots: SlotsExpression; + hasDynamicSlots: boolean; +}; + +interface SlotOutletProcessResult { + slotName: string | ExpressionNode; + slotProps: PropsExpression | undefined; } +export declare function processSlotOutlet(node: SlotOutletNode, context: TransformContext): SlotOutletProcessResult; -export declare function walkBlockDeclarations(block: BlockStatement_2 | Program, onIdent: (node: Identifier) => void): void; +export declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode, context: TransformContext): ConstantTypes; -export declare function walkFunctionParams(node: Function_2, onIdent: (id: Identifier) => void): void; - -export declare function walkIdentifiers(root: Node_3, onIdentifier: (node: Identifier, parent: Node_3, parentStack: Node_3[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node_3[], knownIds?: Record<string, number>): void; - -export declare function warnDeprecation(key: CompilerDeprecationTypes, context: ParserContext | TransformContext, loc: SourceLocation | null, ...args: any[]): void; - -export declare const WITH_CTX: unique symbol; - -export declare const WITH_DIRECTIVES: unique symbol; - -export declare const WITH_MEMO: unique symbol; - -export { } diff --git a/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js b/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js index 7879e0f2..31384fdc 100644 --- a/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js +++ b/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js @@ -1,4861 +1,5661 @@ -import { isString, hyphenate, NOOP, extend, isObject, NO, isArray, makeMap, isSymbol, EMPTY_OBJ, capitalize, camelize as camelize$1, PatchFlagNames, slotFlagsText, isOn, isBuiltInDirective, isReservedProp, toHandlerKey } from '@vue/shared'; +/** +* @vue/compiler-core v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { isString, NOOP, isObject, NO, extend, isSymbol, isArray, capitalize, camelize, EMPTY_OBJ, PatchFlagNames, slotFlagsText, isOn, isBuiltInDirective, isReservedProp, toHandlerKey } from '@vue/shared'; export { generateCodeFrame } from '@vue/shared'; -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - (process.env.NODE_ENV !== 'production') && console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (process.env.NODE_ENV !== 'production') || !true - ? (messages || errorMessages)[code] + (additionalMessage || ``) - : code; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '<!--' in comment.", - [17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */]: 'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).', - [18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */]: 'Unquoted attribute value cannot contain U+0022 ("), U+0027 (\'), U+003C (<), U+003D (=), and U+0060 (`).', - [19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */]: "Attribute name cannot start with '='.", - [21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */]: "'<?' is allowed only in XML context.", - [20 /* UNEXPECTED_NULL_CHARACTER */]: `Unexpected null character.`, - [22 /* UNEXPECTED_SOLIDUS_IN_TAG */]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23 /* X_INVALID_END_TAG */]: 'Invalid end tag.', - [24 /* X_MISSING_END_TAG */]: 'Element is missing end tag.', - [25 /* X_MISSING_INTERPOLATION_END */]: 'Interpolation end sign was not found.', - [27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */]: 'End bracket for dynamic directive argument was not found. ' + - 'Note that dynamic directive argument cannot contain spaces.', - [26 /* X_MISSING_DIRECTIVE_NAME */]: 'Legal directive name was expected.', - // transform errors - [28 /* X_V_IF_NO_EXPRESSION */]: `v-if/v-else-if is missing expression.`, - [29 /* X_V_IF_SAME_KEY */]: `v-if/else branches must use unique keys.`, - [30 /* X_V_ELSE_NO_ADJACENT_IF */]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31 /* X_V_FOR_NO_EXPRESSION */]: `v-for is missing expression.`, - [32 /* X_V_FOR_MALFORMED_EXPRESSION */]: `v-for has invalid expression.`, - [33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */]: `<template v-for> key should be placed on the <template> tag.`, - [34 /* X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`, - [35 /* X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`, - [36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`, - [37 /* X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` + - `When there are multiple named slots, all slots should use <template> ` + - `syntax to avoid scope ambiguity.`, - [38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `, - [39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */]: `Extraneous children found when component already has explicitly named ` + - `default slot. These children will be ignored.`, - [40 /* X_V_SLOT_MISPLACED */]: `v-slot can only be used on components or <template> tags.`, - [41 /* X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`, - [42 /* X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`, - [43 /* X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44 /* X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `, - [45 /* X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`, - // generic errors - [46 /* X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`, - [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [50 /* __EXTEND_POINT__ */]: `` -}; - -const FRAGMENT = Symbol((process.env.NODE_ENV !== 'production') ? `Fragment` : ``); -const TELEPORT = Symbol((process.env.NODE_ENV !== 'production') ? `Teleport` : ``); -const SUSPENSE = Symbol((process.env.NODE_ENV !== 'production') ? `Suspense` : ``); -const KEEP_ALIVE = Symbol((process.env.NODE_ENV !== 'production') ? `KeepAlive` : ``); -const BASE_TRANSITION = Symbol((process.env.NODE_ENV !== 'production') ? `BaseTransition` : ``); -const OPEN_BLOCK = Symbol((process.env.NODE_ENV !== 'production') ? `openBlock` : ``); -const CREATE_BLOCK = Symbol((process.env.NODE_ENV !== 'production') ? `createBlock` : ``); -const CREATE_ELEMENT_BLOCK = Symbol((process.env.NODE_ENV !== 'production') ? `createElementBlock` : ``); -const CREATE_VNODE = Symbol((process.env.NODE_ENV !== 'production') ? `createVNode` : ``); -const CREATE_ELEMENT_VNODE = Symbol((process.env.NODE_ENV !== 'production') ? `createElementVNode` : ``); -const CREATE_COMMENT = Symbol((process.env.NODE_ENV !== 'production') ? `createCommentVNode` : ``); -const CREATE_TEXT = Symbol((process.env.NODE_ENV !== 'production') ? `createTextVNode` : ``); -const CREATE_STATIC = Symbol((process.env.NODE_ENV !== 'production') ? `createStaticVNode` : ``); -const RESOLVE_COMPONENT = Symbol((process.env.NODE_ENV !== 'production') ? `resolveComponent` : ``); -const RESOLVE_DYNAMIC_COMPONENT = Symbol((process.env.NODE_ENV !== 'production') ? `resolveDynamicComponent` : ``); -const RESOLVE_DIRECTIVE = Symbol((process.env.NODE_ENV !== 'production') ? `resolveDirective` : ``); -const RESOLVE_FILTER = Symbol((process.env.NODE_ENV !== 'production') ? `resolveFilter` : ``); -const WITH_DIRECTIVES = Symbol((process.env.NODE_ENV !== 'production') ? `withDirectives` : ``); -const RENDER_LIST = Symbol((process.env.NODE_ENV !== 'production') ? `renderList` : ``); -const RENDER_SLOT = Symbol((process.env.NODE_ENV !== 'production') ? `renderSlot` : ``); -const CREATE_SLOTS = Symbol((process.env.NODE_ENV !== 'production') ? `createSlots` : ``); -const TO_DISPLAY_STRING = Symbol((process.env.NODE_ENV !== 'production') ? `toDisplayString` : ``); -const MERGE_PROPS = Symbol((process.env.NODE_ENV !== 'production') ? `mergeProps` : ``); -const NORMALIZE_CLASS = Symbol((process.env.NODE_ENV !== 'production') ? `normalizeClass` : ``); -const NORMALIZE_STYLE = Symbol((process.env.NODE_ENV !== 'production') ? `normalizeStyle` : ``); -const NORMALIZE_PROPS = Symbol((process.env.NODE_ENV !== 'production') ? `normalizeProps` : ``); -const GUARD_REACTIVE_PROPS = Symbol((process.env.NODE_ENV !== 'production') ? `guardReactiveProps` : ``); -const TO_HANDLERS = Symbol((process.env.NODE_ENV !== 'production') ? `toHandlers` : ``); -const CAMELIZE = Symbol((process.env.NODE_ENV !== 'production') ? `camelize` : ``); -const CAPITALIZE = Symbol((process.env.NODE_ENV !== 'production') ? `capitalize` : ``); -const TO_HANDLER_KEY = Symbol((process.env.NODE_ENV !== 'production') ? `toHandlerKey` : ``); -const SET_BLOCK_TRACKING = Symbol((process.env.NODE_ENV !== 'production') ? `setBlockTracking` : ``); -const PUSH_SCOPE_ID = Symbol((process.env.NODE_ENV !== 'production') ? `pushScopeId` : ``); -const POP_SCOPE_ID = Symbol((process.env.NODE_ENV !== 'production') ? `popScopeId` : ``); -const WITH_CTX = Symbol((process.env.NODE_ENV !== 'production') ? `withCtx` : ``); -const UNREF = Symbol((process.env.NODE_ENV !== 'production') ? `unref` : ``); -const IS_REF = Symbol((process.env.NODE_ENV !== 'production') ? `isRef` : ``); -const WITH_MEMO = Symbol((process.env.NODE_ENV !== 'production') ? `withMemo` : ``); -const IS_MEMO_SAME = Symbol((process.env.NODE_ENV !== 'production') ? `isMemoSame` : ``); -// Name mapping for runtime helpers that need to be imported from 'vue' in -// generated code. Make sure these are correctly exported in the runtime! -// Using `any` here because TS doesn't allow symbols as index type. +const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``); +const TELEPORT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``); +const SUSPENSE = Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``); +const KEEP_ALIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``); +const BASE_TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `BaseTransition` : ``); +const OPEN_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``); +const CREATE_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``); +const CREATE_ELEMENT_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createElementBlock` : ``); +const CREATE_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``); +const CREATE_ELEMENT_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createElementVNode` : ``); +const CREATE_COMMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `createCommentVNode` : ``); +const CREATE_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `createTextVNode` : ``); +const CREATE_STATIC = Symbol(!!(process.env.NODE_ENV !== "production") ? `createStaticVNode` : ``); +const RESOLVE_COMPONENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `resolveComponent` : ``); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + !!(process.env.NODE_ENV !== "production") ? `resolveDynamicComponent` : `` +); +const RESOLVE_DIRECTIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `resolveDirective` : ``); +const RESOLVE_FILTER = Symbol(!!(process.env.NODE_ENV !== "production") ? `resolveFilter` : ``); +const WITH_DIRECTIVES = Symbol(!!(process.env.NODE_ENV !== "production") ? `withDirectives` : ``); +const RENDER_LIST = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``); +const RENDER_SLOT = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``); +const CREATE_SLOTS = Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``); +const TO_DISPLAY_STRING = Symbol(!!(process.env.NODE_ENV !== "production") ? `toDisplayString` : ``); +const MERGE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``); +const NORMALIZE_CLASS = Symbol(!!(process.env.NODE_ENV !== "production") ? `normalizeClass` : ``); +const NORMALIZE_STYLE = Symbol(!!(process.env.NODE_ENV !== "production") ? `normalizeStyle` : ``); +const NORMALIZE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `normalizeProps` : ``); +const GUARD_REACTIVE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `guardReactiveProps` : ``); +const TO_HANDLERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``); +const CAMELIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``); +const CAPITALIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``); +const TO_HANDLER_KEY = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlerKey` : ``); +const SET_BLOCK_TRACKING = Symbol(!!(process.env.NODE_ENV !== "production") ? `setBlockTracking` : ``); +const PUSH_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``); +const POP_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``); +const WITH_CTX = Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``); +const UNREF = Symbol(!!(process.env.NODE_ENV !== "production") ? `unref` : ``); +const IS_REF = Symbol(!!(process.env.NODE_ENV !== "production") ? `isRef` : ``); +const WITH_MEMO = Symbol(!!(process.env.NODE_ENV !== "production") ? `withMemo` : ``); +const IS_MEMO_SAME = Symbol(!!(process.env.NODE_ENV !== "production") ? `isMemoSame` : ``); const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` }; function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach(s => { - helperNameMap[s] = helpers[s]; - }); + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); } -// AST Utilities --------------------------------------------------------------- -// Some expressions, e.g. sequence and conditional expressions, are never -// associated with template nodes, so their source locations are just a stub. -// Container types like CompoundExpression also don't need a real location. -const locStub = { - source: '', - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 } +const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" }; -function createRoot(children, loc = locStub) { - return { - type: 0 /* ROOT */, - children, - helpers: [], - components: [], - directives: [], - hoists: [], - imports: [], - cached: 0, - temps: 0, - codegenNode: undefined, - loc - }; +const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" +}; +const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" +}; +const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_HOIST": 2, + "2": "CAN_HOIST", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" +}; +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: 0, + temps: 0, + codegenNode: void 0, + loc: locStub + }; } function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } - else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); } - return { - type: 13 /* VNODE_CALL */, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; } function createArrayExpression(elements, loc = locStub) { - return { - type: 17 /* JS_ARRAY_EXPRESSION */, - loc, - elements - }; + return { + type: 17, + loc, + elements + }; } function createObjectExpression(properties, loc = locStub) { - return { - type: 15 /* JS_OBJECT_EXPRESSION */, - loc, - properties - }; + return { + type: 15, + loc, + properties + }; } function createObjectProperty(key, value) { - return { - type: 16 /* JS_PROPERTY */, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; } -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0 /* NOT_CONSTANT */) { - return { - type: 4 /* SIMPLE_EXPRESSION */, - loc, - content, - isStatic, - constType: isStatic ? 3 /* CAN_STRINGIFY */ : constType - }; +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; } function createInterpolation(content, loc) { - return { - type: 5 /* INTERPOLATION */, - loc, - content: isString(content) - ? createSimpleExpression(content, false, loc) - : content - }; + return { + type: 5, + loc, + content: isString(content) ? createSimpleExpression(content, false, loc) : content + }; } function createCompoundExpression(children, loc = locStub) { - return { - type: 8 /* COMPOUND_EXPRESSION */, - loc, - children - }; + return { + type: 8, + loc, + children + }; } function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee, - arguments: args - }; + return { + type: 14, + loc, + callee, + arguments: args + }; } -function createFunctionExpression(params, returns = undefined, newline = false, isSlot = false, loc = locStub) { - return { - type: 18 /* JS_FUNCTION_EXPRESSION */, - params, - returns, - newline, - isSlot, - loc - }; +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; } function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19 /* JS_CONDITIONAL_EXPRESSION */, - test, - consequent, - alternate, - newline, - loc: locStub - }; + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; } function createCacheExpression(index, value, isVNode = false) { - return { - type: 20 /* JS_CACHE_EXPRESSION */, - index, - value, - isVNode, - loc: locStub - }; + return { + type: 20, + index, + value, + isVNode, + loc: locStub + }; } function createBlockStatement(body) { - return { - type: 21 /* JS_BLOCK_STATEMENT */, - body, - loc: locStub - }; + return { + type: 21, + body, + loc: locStub + }; } function createTemplateLiteral(elements) { - return { - type: 22 /* JS_TEMPLATE_LITERAL */, - elements, - loc: locStub - }; + return { + type: 22, + elements, + loc: locStub + }; } function createIfStatement(test, consequent, alternate) { - return { - type: 23 /* JS_IF_STATEMENT */, - test, - consequent, - alternate, - loc: locStub - }; + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; } function createAssignmentExpression(left, right) { - return { - type: 24 /* JS_ASSIGNMENT_EXPRESSION */, - left, - right, - loc: locStub - }; + return { + type: 24, + left, + right, + loc: locStub + }; } function createSequenceExpression(expressions) { - return { - type: 25 /* JS_SEQUENCE_EXPRESSION */, - expressions, - loc: locStub - }; + return { + type: 25, + expressions, + loc: locStub + }; } function createReturnStatement(returns) { - return { - type: 26 /* JS_RETURN_STATEMENT */, - returns, - loc: locStub - }; + return { + type: 26, + returns, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } } -const isStaticExp = (p) => p.type === 4 /* SIMPLE_EXPRESSION */ && p.isStatic; -const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected); +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + const lower = c | 32; + if (lower === 116) { + this.state = 30; + } else { + this.state = lower === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + if (!!(process.env.NODE_ENV !== "production") || false) { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if ((!!(process.env.NODE_ENV !== "production") || false) && this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if ((!!(process.env.NODE_ENV !== "production") || false) && c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if ((!!(process.env.NODE_ENV !== "production") || false) && (c === 34 || c === 39 || c === 60)) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + if (!!(process.env.NODE_ENV !== "production") || false) { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if ((!!(process.env.NODE_ENV !== "production") || false) && c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + const lower = c | 32; + if (lower === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (lower === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + const lower = c | 32; + if (lower === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (lower === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (!!(process.env.NODE_ENV !== "production") && enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) + err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + !!(process.env.NODE_ENV !== "production") && console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = !!(process.env.NODE_ENV !== "production") || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : `https://vuejs.org/error-reference/#compiler-${code}`; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "__EXTEND_POINT__": 52, + "52": "__EXTEND_POINT__" +}; +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [52]: `` +}; + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + { + return; + } +} +function isReferencedIdentifier(id, parent, parentStack) { + { + return false; + } +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) + continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) + continue; + onIdent(stmt.id); + } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration") { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } + } + } +} +function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) + extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; function isCoreComponent(tag) { - if (isBuiltInType(tag, 'Teleport')) { - return TELEPORT; - } - else if (isBuiltInType(tag, 'Suspense')) { - return SUSPENSE; - } - else if (isBuiltInType(tag, 'KeepAlive')) { - return KEEP_ALIVE; - } - else if (isBuiltInType(tag, 'BaseTransition')) { - return BASE_TRANSITION; - } + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } } const nonIdentifierRE = /^\d|[^\$\w]/; const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -/** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ const isMemberExpressionBrowser = (path) => { - // remove whitespaces around . or [ first - path = path.trim().replace(whitespaceRE, s => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === '[') { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } - else if (char === '(') { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } - else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `[`) { - currentOpenBracketCount++; - } - else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `(`) { - currentOpenParensCount++; - } - else if (char === `)`) { - // if the exp ends as a call then it should not be considered valid - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; + path = path.trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; } - return !currentOpenBracketCount && !currentOpenParensCount; + } + return !currentOpenBracketCount && !currentOpenParensCount; }; -const isMemberExpressionNode = NOOP - ; -const isMemberExpression = isMemberExpressionBrowser - ; -function getInnerRange(loc, offset, length) { - const source = loc.source.slice(offset, offset + length); - const newLoc = { - source, - start: advancePositionWithClone(loc.start, loc.source, offset), - end: loc.end - }; - if (length != null) { - newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length); - } - return newLoc; -} +const isMemberExpressionNode = NOOP ; +const isMemberExpression = isMemberExpressionBrowser ; function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation(extend({}, pos), source, numberOfCharacters); + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); } -// advance by mutation without cloning (for performance reasons), since this -// gets called a lot in the parser function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10 /* newline char code */) { - linesCount++; - lastNewLinePos = i; - } + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = - lastNewLinePos === -1 - ? pos.column + numberOfCharacters - : numberOfCharacters - lastNewLinePos; - return pos; + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; } function assert(condition, msg) { - /* istanbul ignore if */ - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } } function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (allowEmpty || p.exp) && - (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; } + } } function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (dynamicOnly) - continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } - else if (p.name === 'bind' && - (p.exp || allowEmpty) && - isStaticArgOf(p.arg, name)) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) + continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; } + } } function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); + return !!(arg && isStaticExp(arg) && arg.content === name); } function hasDynamicKeyVBind(node) { - return node.props.some(p => p.type === 7 /* DIRECTIVE */ && - p.name === 'bind' && - (!p.arg || // v-bind="obj" - p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo] - !p.arg.isStatic) // v-bind:[foo] - ); + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); } -function isText(node) { - return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */; +function isText$1(node) { + return node.type === 5 || node.type === 2; } function isVSlot(p) { - return p.type === 7 /* DIRECTIVE */ && p.name === 'slot'; + return p.type === 7 && p.name === "slot"; } function isTemplateNode(node) { - return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */); + return node.type === 1 && node.tagType === 3; } function isSlotOutlet(node) { - return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */; + return node.type === 1 && node.tagType === 2; } -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); function getUnnormalizedProps(props, callPath = []) { - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps(props.arguments[0], callPath.concat(props)); - } + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); } - return [props, callPath]; + } + return [props, callPath]; } function injectProp(node, prop, context) { - let propsWithInjection; - /** - * 1. mergeProps(...) - * 2. toHandlers(...) - * 3. normalizeProps(...) - * 4. normalizeProps(guardReactiveProps(...)) - * - * we need to get the real props before normalization - */ - let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } - else if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // merged props... add ours - // only inject key to object literal if it's the first argument so that - // if doesn't override user provided keys - const first = props.arguments[0]; - if (!isString(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) { - first.properties.unshift(prop); - } - else { - if (props.callee === TO_HANDLERS) { - // #2366 - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } - else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } - else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) { - let alreadyExists = false; - // check existing key to avoid overriding user provided keys - if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) { - const propKeyName = prop.key.content; - alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === propKeyName); - } - if (!alreadyExists) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } - else { - // single v-bind with expression, return a merged replacement + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props + createObjectExpression([prop]), + props ]); - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`, - // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`, - // the `guardReactiveProps` will no longer be needed - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } + } else { + props.arguments.unshift(createObjectExpression([prop])); + } } - if (node.type === 13 /* VNODE_CALL */) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.props = propsWithInjection; - } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); } - else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.arguments[2] = propsWithInjection; - } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; } function toValidAssetId(name, type) { - // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString(); - })}`; + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; } -// Check if a node contains expressions that reference current context scope ids function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1 /* ELEMENT */: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some(c => hasScopeRef(c, ids)); - case 11 /* FOR */: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 9 /* IF */: - return node.branches.some(b => hasScopeRef(b, ids)); - case 10 /* IF_BRANCH */: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 4 /* SIMPLE_EXPRESSION */: - return (!node.isStatic && - isSimpleIdentifier(node.content) && - !!ids[node.content]); - case 8 /* COMPOUND_EXPRESSION */: - return node.children.some(c => isObject(c) && hasScopeRef(c, ids)); - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return hasScopeRef(node.content, ids); - case 2 /* TEXT */: - case 3 /* COMMENT */: - return false; - default: - if ((process.env.NODE_ENV !== 'production')) ; - return false; - } + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + return false; + default: + if (!!(process.env.NODE_ENV !== "production")) ; + return false; + } } function getMemoedVNodeCall(node) { - if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } - else { - return node; - } -} -function makeBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } } +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: { - message: `Platform-native elements with "is" prop will no longer be ` + - `treated as components in Vue 3 unless the "is" value is explicitly ` + - `prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: { - message: key => `.sync modifier for v-bind has been removed. Use v-model with ` + - `argument instead. \`v-bind:${key}.sync\` should be changed to ` + - `\`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: { - message: `.prop modifier for v-bind has been removed and no longer necessary. ` + - `Vue 3 will automatically set a binding as DOM property when appropriate.` - }, - ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` + - `object spread: it will now overwrite an existing non-mergeable attribute ` + - `that appears before v-bind in the case of conflict. ` + - `To retain 2.x behavior, move v-bind to make it the first attribute. ` + - `You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: { - message: `v-if / v-for precedence when used on the same element has changed ` + - `in Vue 3: v-if now takes higher precedence and will no longer have ` + - `access to v-for scope variables. It is best to avoid the ambiguity ` + - `with <template> tags or use a computed property that filters v-for ` + - `data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: { - message: `<template> with no special directives will render as a native template ` + - `element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTER" /* COMPILER_FILTERS */]: { - message: `filters have been removed in Vue 3. ` + - `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` + - `Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, context) { - const config = context.options - ? context.options.compatConfig - : context.compatConfig; - const value = config && config[key]; - if (key === 'MODE') { - return value || 3; // compiler defaults to v3 behavior - } - else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue('MODE', context); - const value = getCompatValue(key, context); - // in v3 mode, only enable if explicitly set to true - // otherwise enable for any non-false value - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if ((process.env.NODE_ENV !== 'production') && enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === 'suppress-warning') { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) - err.loc = loc; - context.onWarn(err); -} - -// The default decoder only provides escapes for characters reserved as part of -// the template syntax, and is only used if the custom renderer did not provide -// a platform-specific decoder. -const decodeRE = /&(gt|lt|amp|apos|quot);/g; -const decodeMap = { - gt: '>', - lt: '<', - amp: '&', - apos: "'", - quot: '"' -}; const defaultParserOptions = { - delimiters: [`{{`, `}}`], - getNamespace: () => 0 /* HTML */, - getTextMode: () => 0 /* DATA */, - isVoidTag: NO, - isPreTag: NO, - isCustomElement: NO, - decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]), - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: (process.env.NODE_ENV !== 'production') + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: !!(process.env.NODE_ENV !== "production"), + prefixIdentifiers: false }; -function baseParse(content, options = {}) { - const context = createParserContext(content, options); - const start = getCursor(context); - return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start)); -} -function createParserContext(content, rawOptions) { - const options = extend({}, defaultParserOptions); - let key; - for (key in rawOptions) { - // @ts-ignore - options[key] = - rawOptions[key] === undefined - ? defaultParserOptions[key] - : rawOptions[key]; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); } - return { - options, - column: 1, - line: 1, - offset: 0, - originalSource: content, - source: content, - inPre: false, - inVPre: false, - onWarn: options.onWarn + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 }; -} -function parseChildren(context, mode, ancestors) { - const parent = last(ancestors); - const ns = parent ? parent.ns : 0 /* HTML */; - const nodes = []; - while (!isEnd(context, mode, ancestors)) { - const s = context.source; - let node = undefined; - if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) { - if (!context.inVPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode); - } - else if (mode === 0 /* DATA */ && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1); - } - else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '<!--')) { - node = parseComment(context); - } - else if (startsWith(s, '<!DOCTYPE')) { - // Ignore DOCTYPE by a limitation. - node = parseBogusComment(context); - } - else if (startsWith(s, '<![CDATA[')) { - if (ns !== 0 /* HTML */) { - node = parseCDATA(context, ancestors); - } - else { - emitError(context, 1 /* CDATA_IN_HTML_CONTENT */); - node = parseBogusComment(context); - } - } - else { - emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */); - node = parseBogusComment(context); - } - } - else if (s[1] === '/') { - // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state - if (s.length === 2) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2); - } - else if (s[2] === '>') { - emitError(context, 14 /* MISSING_END_TAG_NAME */, 2); - advanceBy(context, 3); - continue; - } - else if (/[a-z]/i.test(s[2])) { - emitError(context, 23 /* X_INVALID_END_TAG */); - parseTag(context, 1 /* End */, parent); - continue; - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2); - node = parseBogusComment(context); - } - } - else if (/[a-z]/i.test(s[1])) { - node = parseElement(context, ancestors); - // 2.x <template> with no directive compat - if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context) && - node && - node.tag === 'template' && - !node.props.some(p => p.type === 7 /* DIRECTIVE */ && - isSpecialTemplateDirective(p.name))) { - (process.env.NODE_ENV !== 'production') && - warnDeprecation("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context, node.loc); - node = node.children; - } - } - else if (s[1] === '?') { - emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1); - node = parseBogusComment(context); - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1); - } - } - } - if (!node) { - node = parseText(context, mode); - } - if (isArray(node)) { - for (let i = 0; i < node.length; i++) { - pushNode(nodes, node[i]); - } - } - else { - pushNode(nodes, node); + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } } - // Whitespace handling strategy like v2 - let removedWhitespace = false; - if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) { - const shouldCondense = context.options.whitespace !== 'preserve'; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!context.inPre && node.type === 2 /* TEXT */) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1]; - const next = nodes[i + 1]; - // Remove if: - // - the whitespace is the first or last node, or: - // - (condense mode) the whitespace is adjacent to a comment, or: - // - (condense mode) the whitespace is between two elements AND contains newline - if (!prev || - !next || - (shouldCondense && - (prev.type === 3 /* COMMENT */ || - next.type === 3 /* COMMENT */ || - (prev.type === 1 /* ELEMENT */ && - next.type === 1 /* ELEMENT */ && - /[\r\n]/.test(node.content))))) { - removedWhitespace = true; - nodes[i] = null; - } - else { - // Otherwise, the whitespace is condensed into a single space - node.content = ' '; - } - } - else if (shouldCondense) { - // in condense mode, consecutive whitespaces in text are condensed - // down to a single space. - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' '); - } - } - // Remove comment nodes if desired by configuration. - else if (node.type === 3 /* COMMENT */ && !context.options.comments) { - removedWhitespace = true; - nodes[i] = null; - } - } - if (context.inPre && parent && context.options.isPreTag(parent.tag)) { - // remove leading newline per html spec - // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element - const first = nodes[0]; - if (first && first.type === 2 /* TEXT */) { - first.content = first.content.replace(/^\r?\n/, ''); - } - } + }, + onselfclosingtag(end) { + var _a; + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (((_a = stack[0]) == null ? void 0 : _a.tag) === name) { + onCloseTag(stack.shift(), end); } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function pushNode(nodes, node) { - if (node.type === 2 /* TEXT */) { - const prev = last(nodes); - // Merge if both this and the previous node are text and those are - // consecutive. This happens for cases like "a < b". - if (prev && - prev.type === 2 /* TEXT */ && - prev.loc.end.offset === node.loc.start.offset) { - prev.content += node.content; - prev.loc.end = node.loc.end; - prev.loc.source += node.loc.source; - return; - } - } - nodes.push(node); -} -function parseCDATA(context, ancestors) { - advanceBy(context, 9); - const nodes = parseChildren(context, 3 /* CDATA */, ancestors); - if (context.source.length === 0) { - emitError(context, 6 /* EOF_IN_CDATA */); - } - else { - advanceBy(context, 3); - } - return nodes; -} -function parseComment(context) { - const start = getCursor(context); - let content; - // Regular comment. - const match = /--(\!)?>/.exec(context.source); - if (!match) { - content = context.source.slice(4); - advanceBy(context, context.source.length); - emitError(context, 7 /* EOF_IN_COMMENT */); - } - else { - if (match.index <= 3) { - emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */); - } - if (match[1]) { - emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */); - } - content = context.source.slice(4, match.index); - // Advancing with reporting nested comments. - const s = context.source.slice(0, match.index); - let prevIndex = 1, nestedIndex = 0; - while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) { - advanceBy(context, nestedIndex - prevIndex + 1); - if (nestedIndex + 4 < s.length) { - emitError(context, 16 /* NESTED_COMMENT */); - } - prevIndex = nestedIndex + 1; - } - advanceBy(context, match.index + match[0].length - prevIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) }; -} -function parseBogusComment(context) { - const start = getCursor(context); - const contentStart = context.source[1] === '?' ? 1 : 2; - let content; - const closeIndex = context.source.indexOf('>'); - if (closeIndex === -1) { - content = context.source.slice(contentStart); - advanceBy(context, context.source.length); + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); } - else { - content = context.source.slice(contentStart, closeIndex); - advanceBy(context, closeIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) - }; -} -function parseElement(context, ancestors) { - // Start tag. - const wasInPre = context.inPre; - const wasInVPre = context.inVPre; - const parent = last(ancestors); - const element = parseTag(context, 0 /* Start */, parent); - const isPreBoundary = context.inPre && !wasInPre; - const isVPreBoundary = context.inVPre && !wasInVPre; - if (element.isSelfClosing || context.options.isVoidTag(element.tag)) { - // #4030 self-closing <pre> tag - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - // Children. - ancestors.push(element); - const mode = context.options.getTextMode(element, parent); - const children = parseChildren(context, mode, ancestors); - ancestors.pop(); - // 2.x inline-template compat - { - const inlineTemplateProp = element.props.find(p => p.type === 6 /* ATTRIBUTE */ && p.name === 'inline-template'); - if (inlineTemplateProp && - checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) { - const loc = getSelection(context, element.loc.end); - inlineTemplateProp.value = { - type: 2 /* TEXT */, - content: loc.source, - loc - }; - } - } - element.children = children; - // End tag. - if (startsWithEndTagOpen(context.source, element.tag)) { - parseTag(context, 1 /* End */, parent); - } - else { - emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start); - if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { - const first = children[0]; - if (first && startsWith(first.loc.source, '<!--')) { - emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */); - } - } - } - element.loc = getSelection(context, element.loc.start); - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; -} -const isSpecialTemplateDirective = /*#__PURE__*/ makeMap(`if,else,else-if,for,slot`); -function parseTag(context, type, parent) { - // Tag open. - const start = getCursor(context); - const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source); - const tag = match[1]; - const ns = context.options.getNamespace(tag, parent); - advanceBy(context, match[0].length); - advanceSpaces(context); - // save current state in case we need to re-parse attributes with v-pre - const cursor = getCursor(context); - const currentSource = context.source; - // check <pre> tag - if (context.options.isPreTag(tag)) { - context.inPre = true; - } - // Attributes. - let props = parseAttributes(context, type); - // check v-pre - if (type === 0 /* Start */ && - !context.inVPre && - props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) { - context.inVPre = true; - // reset context - extend(context, cursor); - context.source = currentSource; - // re-parse attrs and filter out v-pre itself - props = parseAttributes(context, type).filter(p => p.name !== 'v-pre'); - } - // Tag close. - let isSelfClosing = false; - if (context.source.length === 0) { - emitError(context, 9 /* EOF_IN_TAG */); - } - else { - isSelfClosing = startsWith(context.source, '/>'); - if (type === 1 /* End */ && isSelfClosing) { - emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */); - } - advanceBy(context, isSelfClosing ? 2 : 1); - } - if (type === 1 /* End */) { - return; - } - // 2.x deprecation checks - if ((process.env.NODE_ENV !== 'production') && - isCompatEnabled("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context)) { - let hasIf = false; - let hasFor = false; - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 7 /* DIRECTIVE */) { - if (p.name === 'if') { - hasIf = true; - } - else if (p.name === 'for') { - hasFor = true; - } - } - if (hasIf && hasFor) { - warnDeprecation("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start)); - break; - } - } - } - let tagType = 0 /* ELEMENT */; - if (!context.inVPre) { - if (tag === 'slot') { - tagType = 2 /* SLOT */; - } - else if (tag === 'template') { - if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) { - tagType = 3 /* TEMPLATE */; - } - } - else if (isComponent(tag, props, context)) { - tagType = 1 /* COMPONENT */; - } - } - return { - type: 1 /* ELEMENT */, - ns, - tag, - tagType, - props, - isSelfClosing, - children: [], - loc: getSelection(context, start), - codegenNode: undefined // to be created during transform phase - }; -} -function isComponent(tag, props, context) { - const options = context.options; - if (options.isCustomElement(tag)) { - return false; - } - if (tag === 'component' || - /^[A-Z]/.test(tag) || - isCoreComponent(tag) || - (options.isBuiltInComponent && options.isBuiltInComponent(tag)) || - (options.isNativeTag && !options.isNativeTag(tag))) { - return true; - } - // at this point the tag should be a native tag, but check for potential "is" - // casting - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.name === 'is' && p.value) { - if (p.value.content.startsWith('vue:')) { - return true; - } - else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } - else { - // directive - // v-is (TODO Deprecate) - if (p.name === 'is') { - return true; - } - else if ( - // :is on plain element - only treat as component in compat mode - p.name === 'bind' && - isStaticArgOf(p.arg, 'is') && - true && - checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } -} -function parseAttributes(context, type) { - const props = []; - const attributeNames = new Set(); - while (context.source.length > 0 && - !startsWith(context.source, '>') && - !startsWith(context.source, '/>')) { - if (startsWith(context.source, '/')) { - emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */); - advanceBy(context, 1); - advanceSpaces(context); - continue; - } - if (type === 1 /* End */) { - emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */); - } - const attr = parseAttribute(context, attributeNames); - // Trim whitespace between class - // https://github.com/vuejs/core/issues/4251 - if (attr.type === 6 /* ATTRIBUTE */ && - attr.value && - attr.name === 'class') { - attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim(); - } - if (type === 0 /* Start */) { - props.push(attr); - } - if (/^[^\t\r\n\f />]/.test(context.source)) { - emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */); - } - advanceSpaces(context); - } - return props; -} -function parseAttribute(context, nameSet) { - // Name. - const start = getCursor(context); - const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source); - const name = match[0]; - if (nameSet.has(name)) { - emitError(context, 2 /* DUPLICATE_ATTRIBUTE */); - } - nameSet.add(name); - if (name[0] === '=') { - emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */); - } - { - const pattern = /["'<]/g; - let m; - while ((m = pattern.exec(name))) { - emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index); - } - } - advanceBy(context, name.length); - // Value - let value = undefined; - if (/^[\t\r\n\f ]*=/.test(context.source)) { - advanceSpaces(context); - advanceBy(context, 1); - advanceSpaces(context); - value = parseAttributeValue(context); - if (!value) { - emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */); - } - } - const loc = getSelection(context, start); - if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) { - const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name); - let isPropShorthand = startsWith(name, '.'); - let dirName = match[1] || - (isPropShorthand || startsWith(name, ':') - ? 'bind' - : startsWith(name, '@') - ? 'on' - : 'slot'); - let arg; - if (match[2]) { - const isSlot = dirName === 'slot'; - const startOffset = name.lastIndexOf(match[2]); - const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length)); - let content = match[2]; - let isStatic = true; - if (content.startsWith('[')) { - isStatic = false; - if (!content.endsWith(']')) { - emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */); - content = content.slice(1); - } - else { - content = content.slice(1, content.length - 1); - } - } - else if (isSlot) { - // #1241 special case for v-slot: vuetify relies extensively on slot - // names containing dots. v-slot doesn't have any modifiers and Vue 2.x - // supports such usage so we are keeping it consistent with 2.x. - content += match[3] || ''; - } - arg = { - type: 4 /* SIMPLE_EXPRESSION */, - content, - isStatic, - constType: isStatic - ? 3 /* CAN_STRINGIFY */ - : 0 /* NOT_CONSTANT */, - loc - }; - } - if (value && value.isQuoted) { - const valueLoc = value.loc; - valueLoc.start.offset++; - valueLoc.start.column++; - valueLoc.end = advancePositionWithClone(valueLoc.start, value.content); - valueLoc.source = valueLoc.source.slice(1, -1); - } - const modifiers = match[3] ? match[3].slice(1).split('.') : []; - if (isPropShorthand) - modifiers.push('prop'); - // 2.x compat v-bind:foo.sync -> v-model:foo - if (dirName === 'bind' && arg) { - if (modifiers.includes('sync') && - checkCompatEnabled("COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) { - dirName = 'model'; - modifiers.splice(modifiers.indexOf('sync'), 1); - } - if ((process.env.NODE_ENV !== 'production') && modifiers.includes('prop')) { - checkCompatEnabled("COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */, context, loc); - } - } - return { - type: 7 /* DIRECTIVE */, - name: dirName, - exp: value && { - type: 4 /* SIMPLE_EXPRESSION */, - content: value.content, - isStatic: false, - // Treat as non-constant by default. This can be potentially set to - // other values by `transformExpression` to make it eligible for hoisting. - constType: 0 /* NOT_CONSTANT */, - loc: value.loc - }, - arg, - modifiers, - loc - }; - } - // missing directive name or illegal directive name - if (!context.inVPre && startsWith(name, 'v-')) { - emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */); - } - return { - type: 6 /* ATTRIBUTE */, + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, name, - value: value && { - type: 2 /* TEXT */, - content: value.content, - loc: value.loc - }, - loc + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? ["prop"] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) + return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + currentProp.modifiers.push(mod); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.indexOf("sync")) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if ((!!(process.env.NODE_ENV !== "production") || false) && tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) + return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + var _a; + { + const tag = (_a = stack[0]) == null ? void 0 : _a.tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if ((lastNode == null ? void 0 : lastNode.type) === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, end + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(el.children, el.tag); + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (!!(process.env.NODE_ENV !== "production") && isCompatEnabled( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions + )) { + let hasIf = false; + let hasFor = false; + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 7) { + if (p.name === "if") { + hasIf = true; + } else if (p.name === "for") { + hasFor = true; + } + } + if (hasIf && hasFor) { + warnDeprecation( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions, + el.loc + ); + break; + } + } + } + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + !!(process.env.NODE_ENV !== "production") && warnDeprecation( + "COMPILER_NATIVE_TEMPLATE", + currentOptions, + el.loc + ); + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) + i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + var _a; + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || ((_a = currentOptions.isBuiltInComponent) == null ? void 0 : _a.call(currentOptions, tag)) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + var _a, _b; + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = (_a = nodes[i - 1]) == null ? void 0 : _a.type; + const next = (_b = nodes[i + 1]) == null ? void 0 : _b.type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + if (inPre && tag && currentOptions.isPreTag(tag)) { + const first = nodes[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc }; + } + return attr; } -function parseAttributeValue(context) { - const start = getCursor(context); - let content; - const quote = context.source[0]; - const isQuoted = quote === `"` || quote === `'`; - if (isQuoted) { - // Quoted value. - advanceBy(context, 1); - const endIndex = context.source.indexOf(quote); - if (endIndex === -1) { - content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */); - } - else { - content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */); - advanceBy(context, 1); - } +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } } - else { - // Unquoted - const match = /^[^\t\r\n\f >]+/.exec(context.source); - if (!match) { - return undefined; - } - const unexpectedChars = /["'<=`]/g; - let m; - while ((m = unexpectedChars.exec(match[0]))) { - emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index); - } - content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */); + } + if (!!(process.env.NODE_ENV !== "production")) { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); } - return { content, isQuoted, loc: getSelection(context, start) }; -} -function parseInterpolation(context, mode) { - const [open, close] = context.options.delimiters; - const closeIndex = context.source.indexOf(close, open.length); - if (closeIndex === -1) { - emitError(context, 25 /* X_MISSING_INTERPOLATION_END */); - return undefined; - } - const start = getCursor(context); - advanceBy(context, open.length); - const innerStart = getCursor(context); - const innerEnd = getCursor(context); - const rawContentLength = closeIndex - open.length; - const rawContent = context.source.slice(0, rawContentLength); - const preTrimContent = parseTextData(context, rawContentLength, mode); - const content = preTrimContent.trim(); - const startOffset = preTrimContent.indexOf(content); - if (startOffset > 0) { - advancePositionWithMutation(innerStart, rawContent, startOffset); - } - const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset); - advancePositionWithMutation(innerEnd, rawContent, endOffset); - advanceBy(context, close.length); - return { - type: 5 /* INTERPOLATION */, - content: { - type: 4 /* SIMPLE_EXPRESSION */, - isStatic: false, - // Set `isConstant` to false by default and will decide in transformExpression - constType: 0 /* NOT_CONSTANT */, - content, - loc: getSelection(context, innerStart, innerEnd) - }, - loc: getSelection(context, start) - }; -} -function parseText(context, mode) { - const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]]; - let endIndex = context.source.length; - for (let i = 0; i < endTokens.length; i++) { - const index = context.source.indexOf(endTokens[i], 1); - if (index !== -1 && endIndex > index) { - endIndex = index; - } - } - const start = getCursor(context); - const content = parseTextData(context, endIndex, mode); - return { - type: 2 /* TEXT */, - content, - loc: getSelection(context, start) - }; -} -/** - * Get text data with a given length from the current location. - * This translates HTML entities in the text data. - */ -function parseTextData(context, length, mode) { - const rawText = context.source.slice(0, length); - advanceBy(context, length); - if (mode === 2 /* RAWTEXT */ || - mode === 3 /* CDATA */ || - !rawText.includes('&')) { - return rawText; - } - else { - // DATA or RCDATA containing "&"". Entity decoding required. - return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */); - } -} -function getCursor(context) { - const { column, line, offset } = context; - return { column, line, offset }; -} -function getSelection(context, start, end) { - end = end || getCursor(context); - return { - start, - end, - source: context.originalSource.slice(start.offset, end.offset) - }; -} -function last(xs) { - return xs[xs.length - 1]; -} -function startsWith(source, searchString) { - return source.startsWith(searchString); -} -function advanceBy(context, numberOfCharacters) { - const { source } = context; - advancePositionWithMutation(context, source, numberOfCharacters); - context.source = source.slice(numberOfCharacters); -} -function advanceSpaces(context) { - const match = /^[\t\r\n\f ]+/.exec(context.source); - if (match) { - advanceBy(context, match[0].length); - } -} -function getNewPosition(context, start, numberOfCharacters) { - return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters); -} -function emitError(context, code, offset, loc = getCursor(context)) { - if (offset) { - loc.offset += offset; - loc.column += offset; - } - context.options.onError(createCompilerError(code, { - start: loc, - end: loc, - source: '' - })); -} -function isEnd(context, mode, ancestors) { - const s = context.source; - switch (mode) { - case 0 /* DATA */: - if (startsWith(s, '</')) { - // TODO: probably bad performance - for (let i = ancestors.length - 1; i >= 0; --i) { - if (startsWithEndTagOpen(s, ancestors[i].tag)) { - return true; - } - } - } - break; - case 1 /* RCDATA */: - case 2 /* RAWTEXT */: { - const parent = last(ancestors); - if (parent && startsWithEndTagOpen(s, parent.tag)) { - return true; - } - break; - } - case 3 /* CDATA */: - if (startsWith(s, ']]>')) { - return true; - } - break; - } - return !s; -} -function startsWithEndTagOpen(source, tag) { - return (startsWith(source, '</') && - source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && - /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')); + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options == null ? void 0 : options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; } function hoistStatic(root, context) { - walk(root, context, + walk( + root, + context, // Root node is unfortunately non-hoistable due to potential parent // fallthrough attributes. - isSingleElementRoot(root, root.children[0])); + isSingleElementRoot(root, root.children[0]) + ); } function isSingleElementRoot(root, child) { - const { children } = root; - return (children.length === 1 && - child.type === 1 /* ELEMENT */ && - !isSlotOutlet(child)); + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); } function walk(node, context, doNotHoistNode = false) { - const { children } = node; - const originalCount = children.length; - let hoistedCount = 0; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - // only plain elements & text calls are eligible for hoisting. - if (child.type === 1 /* ELEMENT */ && - child.tagType === 0 /* ELEMENT */) { - const constantType = doNotHoistNode - ? 0 /* NOT_CONSTANT */ - : getConstantType(child, context); - if (constantType > 0 /* NOT_CONSTANT */) { - if (constantType >= 2 /* CAN_HOIST */) { - child.codegenNode.patchFlag = - -1 /* HOISTED */ + ((process.env.NODE_ENV !== 'production') ? ` /* HOISTED */` : ``); - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - continue; - } - } - else { - // node may contain dynamic children, but its props may be eligible for - // hoisting. - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - const flag = getPatchFlag(codegenNode); - if ((!flag || - flag === 512 /* NEED_PATCH */ || - flag === 1 /* TEXT */) && - getGeneratedPropsConstantType(child, context) >= - 2 /* CAN_HOIST */) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } + const { children } = node; + const originalCount = children.length; + let hoistedCount = 0; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1 + (!!(process.env.NODE_ENV !== "production") ? ` /* HOISTED */` : ``); + child.codegenNode = context.hoist(child.codegenNode); + hoistedCount++; + continue; } - else if (child.type === 12 /* TEXT_CALL */ && - getConstantType(child.content, context) >= 2 /* CAN_HOIST */) { - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - } - // walk further - if (child.type === 1 /* ELEMENT */) { - const isComponent = child.tagType === 1 /* COMPONENT */; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, context); - if (isComponent) { - context.scopes.vSlot--; - } - } - else if (child.type === 11 /* FOR */) { - // Do not hoist v-for single child because it has to be a block - walk(child, context, child.children.length === 1); - } - else if (child.type === 9 /* IF */) { - for (let i = 0; i < child.branches.length; i++) { - // Do not hoist v-if single child because it has to be a block - walk(child.branches[i], context, child.branches[i].children.length === 1); + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = getPatchFlag(codegenNode); + if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } } + } } - if (hoistedCount && context.transformHoist) { - context.transformHoist(children, context, node); + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, context); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, context, child.children.length === 1); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + context, + child.branches[i2].children.length === 1 + ); + } } - // all children were hoisted - the entire children array is hoistable. - if (hoistedCount && - hoistedCount === originalCount && - node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - node.codegenNode && - node.codegenNode.type === 13 /* VNODE_CALL */ && - isArray(node.codegenNode.children)) { - node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children)); + } + if (hoistedCount && context.transformHoist) { + context.transformHoist(children, context, node); + } + if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + const hoisted = context.hoist( + createArrayExpression(node.codegenNode.children) + ); + if (context.hmr) { + hoisted.content = `[...${hoisted.content}]`; } + node.codegenNode.children = hoisted; + } } function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1 /* ELEMENT */: - if (node.tagType !== 0 /* ELEMENT */) { - return 0 /* NOT_CONSTANT */; + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") { + return 0; + } + const flag = getPatchFlag(codegenNode); + if (!flag) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } } - const cached = constantCache.get(node); - if (cached !== undefined) { - return cached; + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13 /* VNODE_CALL */) { - return 0 /* NOT_CONSTANT */; - } - if (codegenNode.isBlock && - node.tag !== 'svg' && - node.tag !== 'foreignObject') { - return 0 /* NOT_CONSTANT */; - } - const flag = getPatchFlag(codegenNode); - if (!flag) { - let returnType = 3 /* CAN_STRINGIFY */; - // Element itself has no patch flag. However we still need to check: - // 1. Even for a node with no patch flag, it is possible for it to contain - // non-hoistable expressions that refers to scope variables, e.g. compiler - // injected keys or cached event handlers. Therefore we need to always - // check the codegenNode's props to be sure. - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (generatedPropsType < returnType) { - returnType = generatedPropsType; - } - // 2. its children. - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (childType < returnType) { - returnType = childType; - } - } - // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0 - // type, check if any of the props can cause the type to be lowered - // we can skip can_patch because it's guaranteed by the absence of a - // patchFlag. - if (returnType > 1 /* CAN_SKIP_PATCH */) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (expType < returnType) { - returnType = expType; - } - } - } - } - // only svg/foreignObject could be block here, however if they are - // static then they don't need to be blocks since there will be no - // nested updates. - if (codegenNode.isBlock) { - // except set custom directives. - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType); - return returnType; - } - else { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - case 2 /* TEXT */: - case 3 /* COMMENT */: - return 3 /* CAN_STRINGIFY */; - case 9 /* IF */: - case 11 /* FOR */: - case 10 /* IF_BRANCH */: - return 0 /* NOT_CONSTANT */; - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return getConstantType(node.content, context); - case 4 /* SIMPLE_EXPRESSION */: - return node.constType; - case 8 /* COMPOUND_EXPRESSION */: - let returnType = 3 /* CAN_STRINGIFY */; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0 /* NOT_CONSTANT */) { - return 0 /* NOT_CONSTANT */; - } - else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - default: - if ((process.env.NODE_ENV !== 'production')) ; - return 0 /* NOT_CONSTANT */; - } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + default: + if (!!(process.env.NODE_ENV !== "production")) ; + return 0; + } } -const allowHoistedHelperSet = new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS ]); function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 /* JS_CALL_EXPRESSION */ && - !isString(value.callee) && - allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - return getConstantType(arg, context); - } - else if (arg.type === 14 /* JS_CALL_EXPRESSION */) { - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))` - return getConstantTypeOfHelperCall(arg, context); - } + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); } - return 0 /* NOT_CONSTANT */; + } + return 0; } function getGeneratedPropsConstantType(node, context) { - let returnType = 3 /* CAN_STRINGIFY */; - const props = getNodeProps(node); - if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0 /* NOT_CONSTANT */) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4 /* SIMPLE_EXPRESSION */) { - valueType = getConstantType(value, context); - } - else if (value.type === 14 /* JS_CALL_EXPRESSION */) { - // some helper calls can be hoisted, - // such as the `normalizeProps` generated by the compiler for pre-normalize class, - // in this case we need to respect the ConstantType of the helper's arguments - valueType = getConstantTypeOfHelperCall(value, context); - } - else { - valueType = 0 /* NOT_CONSTANT */; - } - if (valueType === 0 /* NOT_CONSTANT */) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } } - return returnType; + } + return returnType; } function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - return codegenNode.props; - } + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } } function getPatchFlag(node) { - const flag = node.patchFlag; - return flag ? parseInt(flag, 10) : undefined; + const flag = node.patchFlag; + return flag ? parseInt(flag, 10) : void 0; } -function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) { - const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/); - const context = { - // options - selfName: nameMatch && capitalize(camelize$1(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: new Map(), - components: new Set(), - directives: new Set(), - hoists: [], - imports: [], - constantCache: new Map(), - temps: 0, - cached: 0, - identifiers: Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } - else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - /* istanbul ignore if */ - if ((process.env.NODE_ENV !== 'production')) { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if ((process.env.NODE_ENV !== 'production') && !context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node - ? list.indexOf(node) - : context.currentNode - ? context.childIndex - : -1; - /* istanbul ignore if */ - if ((process.env.NODE_ENV !== 'production') && removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - // current node removed - context.currentNode = null; - context.onNodeRemoved(); - } - else { - // sibling node removed - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: () => { }, - addIdentifiers(exp) { - }, - removeIdentifiers(exp) { - }, - hoist(exp) { - if (isString(exp)) - exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false) { - return createCacheExpression(context.cached++, exp, isVNode); +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic: hoistStatic2 = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic: hoistStatic2, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + cached: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); } - }; - { - context.filters = new Set(); + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + if (!!(process.env.NODE_ENV !== "production")) { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!!(process.env.NODE_ENV !== "production") && !context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (!!(process.env.NODE_ENV !== "production") && removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) + exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false) { + return createCacheExpression(context.cached++, exp, isVNode); } - return context; + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + return context; } function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - hoistStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - // finalize meta information - root.helpers = [...context.helpers.keys()]; - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - { - root.filters = [...context.filters]; - } + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + hoistStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } } function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - // if the single child is an element, turn it into a block. - if (isSingleElementRoot(root, child) && child.codegenNode) { - // single element root is never hoisted so codegenNode will never be - // SimpleExpressionNode - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - makeBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } - else { - // - single <slot/>, IfNode, ForNode: already blocks. - // - single text node: always patched. - // root codegen falls through via genNode() - root.codegenNode = child; - } + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; } - else if (children.length > 1) { - // root has multiple nodes - return a fragment block. - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if ((process.env.NODE_ENV !== 'production') && - children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + ((process.env.NODE_ENV !== 'production') ? ` /* ${patchFlagText} */` : ``), undefined, undefined, true, undefined, false /* isComponent */); + } else if (children.length > 1) { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (!!(process.env.NODE_ENV !== "production") && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; } - else ; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${patchFlagText} */` : ``), + void 0, + void 0, + true, + void 0, + false + ); + } else ; } function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) - continue; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) + continue; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } } function traverseNode(node, context) { - context.currentNode = node; - // apply transform plugins - const { nodeTransforms } = context; - const exitFns = []; - for (let i = 0; i < nodeTransforms.length; i++) { - const onExit = nodeTransforms[i](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } - else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - // node was removed - return; - } - else { - // node may have been replaced - node = context.currentNode; - } + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } } - switch (node.type) { - case 3 /* COMMENT */: - if (!context.ssr) { - // inject import for the Comment symbol, which is needed for creating - // comment nodes with `createVNode` - context.helper(CREATE_COMMENT); - } - break; - case 5 /* INTERPOLATION */: - // no need to traverse, but we need to inject toString helper - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9 /* IF */: - for (let i = 0; i < node.branches.length; i++) { - traverseNode(node.branches[i], context); - } - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - case 1 /* ELEMENT */: - case 0 /* ROOT */: - traverseChildren(node, context); - break; - } - // exit transforms - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); + if (!context.currentNode) { + return; + } else { + node = context.currentNode; } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } } function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) - ? (n) => n === name - : (n) => name.test(n); - return (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const { props } = node; - // structural directive transforms are not concerned with slots - // as they are handled separately in vSlot.ts - if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) { - // structural directives are removed to avoid infinite recursion - // also we remove them *before* applying so that it can further - // traverse itself in case it moves the node around - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) - exitFns.push(onExit); - } - } - return exitFns; + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) + exitFns.push(onExit); } - }; + } + return exitFns; + } + }; } const PURE_ANNOTATION = `/*#__PURE__*/`; const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.loc.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: undefined, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, node) { - context.code += code; - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } - else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push('\n' + ` `.repeat(n)); +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); } - return context; + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; } function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) - options.onContextCreated(context); - const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context; - const hasHelpers = ast.helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== 'module'; - // preambles - // in setup() inline mode, the preamble is generated in a sub context - // and returned separately. - const preambleContext = context; - { - genFunctionPreamble(ast, preambleContext); - } - // enter render function - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache']; - const signature = args.join(', '); - { - push(`function ${functionName}(${signature}) {`); - } + const context = createCodegenContext(ast, options); + if (options.onContextCreated) + options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const isSetupInlined = false; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - // function mode const declarations should be inside with block - // also they should be renamed to avoid collision with user properties - if (hasHelpers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`); - push(`\n`); - newline(); - } + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); } - // generate asset resolution statements - if (ast.components.length) { - genAssets(ast.components, 'component', context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, 'directive', context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, 'filter', context); - newline(); + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } + newline(); } - if (ast.components.length || ast.directives.length || ast.temps) { - push(`\n`); - newline(); - } - // generate the VNode tree expression - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } - else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { deindent(); push(`}`); - return { - ast, - code: context.code, - preamble: ``, - // SourceMapGenerator does have toJSON() method but it's not in the types - map: context.map ? context.map.toJSON() : undefined - }; + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; } function genFunctionPreamble(ast, context) { - const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context; - const VueBinding = runtimeGlobalName; - // Generate const declaration for helpers - // In prefix mode, we place the const declaration at top so it's done - // only once; But if we not prefixing, we place the declaration inside the - // with block so it doesn't incur the `in` check cost for every helper access. - if (ast.helpers.length > 0) { - { - // "with" mode. - // save Vue in a separate variable to avoid collision - push(`const _Vue = ${VueBinding}\n`); - // in "with" mode, helpers are declared inside the with block to avoid - // has check cost, but hoists are lifted out of the function - we need - // to provide the helper here. - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ] - .filter(helper => ast.helpers.includes(helper)) - .map(aliasHelper) - .join(', '); - push(`const { ${staticHelpers} } = _Vue\n`); - } - } + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } } - genHoists(ast.hoists, context); - newline(); - push(`return `); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); } function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper(type === 'filter' - ? RESOLVE_FILTER - : type === 'component' - ? RESOLVE_COMPONENT - : RESOLVE_DIRECTIVE); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - // potential component implicit self-reference inferred from SFC filename - const maybeSelfReference = id.endsWith('__self'); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`); - if (i < assets.length - 1) { - newline(); - } + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } } function genHoists(hoists, context) { - if (!hoists.length) { - return; + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline, helper, scopeId, mode } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push( + `const _hoisted_${i + 1} = ${``}` + ); + genNode(exp, context); + newline(); } - context.pure = true; - const { push, newline, helper, scopeId, mode } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = ${``}`); - genNode(exp, context); - newline(); - } - } - context.pure = false; + } + context.pure = false; } -function isText$1(n) { - return (isString(n) || - n.type === 4 /* SIMPLE_EXPRESSION */ || - n.type === 2 /* TEXT */ || - n.type === 5 /* INTERPOLATION */ || - n.type === 8 /* COMPOUND_EXPRESSION */); +function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; } function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || - (((process.env.NODE_ENV !== 'production')) && nodes.some(n => isArray(n) || !isText$1(n))); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); + const multilines = nodes.length > 3 || !!(process.env.NODE_ENV !== "production") && nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); } function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node); - } - else if (isArray(node)) { - genNodeListAsArray(node, context); - } - else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(','); - newline(); - } - else { - comma && push(', '); - } - } + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } } function genNode(node, context) { - if (isString(node)) { - context.push(node); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1 /* ELEMENT */: - case 9 /* IF */: - case 11 /* FOR */: - (process.env.NODE_ENV !== 'production') && - assert(node.codegenNode != null, `Codegen node is missing for element/if/for node. ` + - `Apply appropriate transforms first.`); - genNode(node.codegenNode, context); - break; - case 2 /* TEXT */: - genText(node, context); - break; - case 4 /* SIMPLE_EXPRESSION */: - genExpression(node, context); - break; - case 5 /* INTERPOLATION */: - genInterpolation(node, context); - break; - case 12 /* TEXT_CALL */: - genNode(node.codegenNode, context); - break; - case 8 /* COMPOUND_EXPRESSION */: - genCompoundExpression(node, context); - break; - case 3 /* COMMENT */: - genComment(node, context); - break; - case 13 /* VNODE_CALL */: - genVNodeCall(node, context); - break; - case 14 /* JS_CALL_EXPRESSION */: - genCallExpression(node, context); - break; - case 15 /* JS_OBJECT_EXPRESSION */: - genObjectExpression(node, context); - break; - case 17 /* JS_ARRAY_EXPRESSION */: - genArrayExpression(node, context); - break; - case 18 /* JS_FUNCTION_EXPRESSION */: - genFunctionExpression(node, context); - break; - case 19 /* JS_CONDITIONAL_EXPRESSION */: - genConditionalExpression(node, context); - break; - case 20 /* JS_CACHE_EXPRESSION */: - genCacheExpression(node, context); - break; - case 21 /* JS_BLOCK_STATEMENT */: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22 /* JS_TEMPLATE_LITERAL */: - break; - case 23 /* JS_IF_STATEMENT */: - break; - case 24 /* JS_ASSIGNMENT_EXPRESSION */: - break; - case 25 /* JS_SEQUENCE_EXPRESSION */: - break; - case 26 /* JS_RETURN_STATEMENT */: - break; - /* istanbul ignore next */ - case 10 /* IF_BRANCH */: - // noop - break; - default: - if ((process.env.NODE_ENV !== 'production')) { - assert(false, `unhandled codegen node type: ${node.type}`); - // make sure we exhaust all possible types - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + !!(process.env.NODE_ENV !== "production") && assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + case 10: + break; + default: + if (!!(process.env.NODE_ENV !== "production")) { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } } function genText(node, context) { - context.push(JSON.stringify(node.content), node); + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); } function genExpression(node, context) { - const { content, isStatic } = node; - context.push(isStatic ? JSON.stringify(content) : content, node); + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); } function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) - push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); + const { push, helper, pure } = context; + if (pure) + push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); } function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child); - } - else { - genNode(child, context); - } + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); } + } } function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8 /* COMPOUND_EXPRESSION */) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } - else if (node.isStatic) { - // only quote keys if necessary - const text = isSimpleIdentifier(node.content) - ? node.content - : JSON.stringify(node.content); - push(text, node); - } - else { - push(`[${node.content}]`, node); - } + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } } function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node); + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); } function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node; - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock - ? getVNodeBlockHelper(context.inSSR, isComponent) - : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, node); - genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context); + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlag, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } } function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) - break; - } - return args.slice(0, i + 1).map(arg => arg || `null`); + let i = args.length; + while (i--) { + if (args[i] != null) + break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); } -// JavaScript function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, node); - genNodeList(node.arguments, context); - push(`)`); + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); } function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, node); - return; + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || !!(process.env.NODE_ENV !== "production") && properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); } - const multilines = properties.length > 1 || - (((process.env.NODE_ENV !== 'production')) && - properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */)); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - // key - genExpressionAsPropertyKey(key, context); - push(`: `); - // value - genNode(value, context); - if (i < properties.length - 1) { - // will only reach this if it's multilines - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); + } + multilines && deindent(); + push(multilines ? `}` : ` }`); } function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); + genNodeListAsArray(node.elements, context); } function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - // wrap slot functions with owner context - push(`_${helperNameMap[WITH_CTX]}(`); + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); } - push(`(`, node); - if (isArray(params)) { - genNodeList(params, context); + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); } - else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } - } - else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4 /* SIMPLE_EXPRESSION */) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } - else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent(true /* without newline */); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - push(`_cache[${node.index}] || (`); - if (node.isVNode) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1),`); - newline(); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (node.isVNode) { - push(`,`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); } push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + push(`_cache[${node.index}] || (`); + if (node.isVNode) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1),`); + newline(); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (node.isVNode) { + push(`,`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); } -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = Object.create(null)) { - { - return; - } -} -function isReferencedIdentifier(id, parent, parentStack) { - { - return false; - } -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && - (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern')) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === 'AssignmentExpression') { - return true; - } - else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) { - break; - } - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === 'VariableDeclaration') { - if (stmt.declare) - continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } - else if (stmt.type === 'FunctionDeclaration' || - stmt.type === 'ClassDeclaration') { - if (stmt.declare || !stmt.id) - continue; - onIdent(stmt.id); - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case 'Identifier': - nodes.push(param); - break; - case 'MemberExpression': - let object = param; - while (object.type === 'MemberExpression') { - object = object.object; - } - nodes.push(object); - break; - case 'ObjectPattern': - for (const prop of param.properties) { - if (prop.type === 'RestElement') { - extractIdentifiers(prop.argument, nodes); - } - else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case 'ArrayPattern': - param.elements.forEach(element => { - if (element) - extractIdentifiers(element, nodes); - }); - break; - case 'RestElement': - extractIdentifiers(param.argument, nodes); - break; - case 'AssignmentPattern': - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && - (node.type === 'ObjectProperty' || node.type === 'ObjectMethod') && - !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; - -// these keywords should not appear inside expressions, but operators like -// typeof, instanceof and in are allowed -const prohibitedKeywordRE = new RegExp('\\b' + - ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + - 'super,throw,while,yield,delete,export,import,return,switch,default,' + - 'extends,finally,continue,debugger,function,arguments,typeof,void') - .split(',') - .join('\\b|\\b') + - '\\b'); -// strip strings in expressions +const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" +); const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; -/** - * Validate a non-prefixed expression. - * This is only called when using the in-browser runtime compiler since it - * doesn't prefix expressions. - */ function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { - const exp = node.content; - // empty expressions are validated per-directive since some directives - // do allow empty expressions. - if (!exp.trim()) { - return; - } - try { - new Function(asRawStatements - ? ` ${exp} ` - : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`); - } - catch (e) { - let message = e.message; - const keywordMatch = exp - .replace(stripStringRE, '') - .match(prohibitedKeywordRE); - if (keywordMatch) { - message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; - } - context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, message)); + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } } const transformExpression = (node, context) => { - if (node.type === 5 /* INTERPOLATION */) { - node.content = processExpression(node.content, context); - } - else if (node.type === 1 /* ELEMENT */) { - // handle directives on element - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - // do not process for v-on & v-for since they are special handled - if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') { - const exp = dir.exp; - const arg = dir.arg; - // do not process exp if this is v-on:arg - we need special handling - // for wrapping inline statements. - if (exp && - exp.type === 4 /* SIMPLE_EXPRESSION */ && - !(dir.name === 'on' && arg)) { - dir.exp = processExpression(exp, context, - // slot args must be processed as function params - dir.name === 'slot'); - } - if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg)) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } } + } }; -// Important: since this function uses Node.js only dependencies, it should -// always be used with a leading !true check so that it can be -// tree-shaken from the browser build. -function processExpression(node, context, -// some expressions like v-slot props & v-for aliases should be parsed as -// function params -asParams = false, -// v-on handler values may contain multiple statements -asRawStatements = false, localVars = Object.create(context.identifiers)) { - { - if ((process.env.NODE_ENV !== 'production')) { - // simple in-browser validation (same logic in 2.x) - validateBrowserExpression(node, context, asParams, asRawStatements); - } - return node; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { + if (!!(process.env.NODE_ENV !== "production")) { + validateBrowserExpression(node, context, asParams, asRawStatements); } + return node; + } +} +function stringifyExpression(exp) { + if (isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } } -const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => { +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { return processIf(node, dir, context, (ifNode, branch, isRoot) => { - // #1587: We need to dynamically increment the key based on the current - // node's sibling nodes, since chained v-if/else branches are - // rendered at the same depth - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9 /* IF */) { - key += sibling.branches.length; - } + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; } - // Exit callback. Complete the codegenNode when all children have been - // transformed. - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context); - } - else { - // attach this branch's codegen node to the v-if root. - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context); - } - }; + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processIf(node, dir, context, processCodegen) { - if (dir.name !== 'else' && - (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc)); - dir.exp = createSimpleExpression(`true`, false, loc); + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (!!(process.env.NODE_ENV !== "production") && true && dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: node.loc, + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); } - if ((process.env.NODE_ENV !== 'production') && true && dir.exp) { - validateBrowserExpression(dir.exp, context); - } - if (dir.name === 'if') { + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + !!(process.env.NODE_ENV !== "production") && comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); const branch = createIfBranch(node, dir); - const ifNode = { - type: 9 /* IF */, - loc: node.loc, - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); + if (!!(process.env.NODE_ENV !== "production") && comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; } - } - else { - // locate the adjacent v-if - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if ((process.env.NODE_ENV !== 'production') && sibling && sibling.type === 3 /* COMMENT */) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && - sibling.type === 2 /* TEXT */ && - !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9 /* IF */) { - // Check if v-else was followed by v-else-if - if (dir.name === 'else-if' && - sibling.branches[sibling.branches.length - 1].condition === undefined) { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - // move the node to the if node's branches - context.removeNode(); - const branch = createIfBranch(node, dir); - if ((process.env.NODE_ENV !== 'production') && - comments.length && - // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && - context.parent.type === 1 /* ELEMENT */ && - isBuiltInType(context.parent.tag, 'transition'))) { - branch.children = [...comments, ...branch.children]; - } - // check if user is forcing same key on different branches - if ((process.env.NODE_ENV !== 'production') || !true) { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc)); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - // since the branch was removed, it will not be traversed. - // make sure to traverse here. - traverseNode(branch, context); - // call on exit - if (onExit) - onExit(); - // make sure to reset currentNode after traversal to indicate this - // node has been removed. - context.currentNode = null; - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - break; + if (!!(process.env.NODE_ENV !== "production") || false) { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) + onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; } + } } function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3 /* TEMPLATE */; - return { - type: 10 /* IF_BRANCH */, - loc: node.loc, - condition: dir.name === 'else' ? undefined : dir.exp, - children: isTemplateIf && !findDir(node, 'for') ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; } function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - (process.env.NODE_ENV !== 'production') ? '"v-if"' : '""', - 'true' - ])); - } - else { - return createChildrenCodegenNode(branch, keyIndex, context); - } + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + !!(process.env.NODE_ENV !== "production") ? '"v-if"' : '""', + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } } function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */)); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11 /* FOR */) { - // optimize away nested fragments when child is a ForNode - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } - else { - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if ((process.env.NODE_ENV !== 'production') && - !branch.isTemplateIf && - children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + ((process.env.NODE_ENV !== 'production') ? ` /* ${patchFlagText} */` : ``), undefined, undefined, true, false, false /* isComponent */, branch.loc); - } + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (!!(process.env.NODE_ENV !== "production") && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${patchFlagText} */` : ``), + void 0, + void 0, + true, + false, + false, + branch.loc + ); } - else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - // Change createVNode to createBlock. - if (vnodeCall.type === 13 /* VNODE_CALL */) { - makeBlock(vnodeCall, context); - } - // inject branch key - injectProp(vnodeCall, keyProperty, context); - return ret; + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); } + injectProp(vnodeCall, keyProperty, context); + return ret; + } } function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; } - if (a.type === 6 /* ATTRIBUTE */) { - if (a.value.content !== b.value.content) { - return false; - } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; } - else { - // directive - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 /* SIMPLE_EXPRESSION */ || - exp.isStatic !== branchExp.isStatic || - exp.content !== branchExp.content) { - return false; - } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; } - return true; + } + return true; } function getParentCondition(node) { - while (true) { - if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - node = node.alternate; - } - else { - return node; - } - } - else if (node.type === 20 /* JS_CACHE_EXPRESSION */) { - node = node.value; - } + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; } + } } -const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => { +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { const { helper, removeHelper } = context; - return processFor(node, dir, context, forNode => { - // create the loop render function expression now, and add the - // iterator on exit after all children have been traversed - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, 'memo'); - const keyProp = findProp(node, `key`); - const keyExp = keyProp && - (keyProp.type === 6 /* ATTRIBUTE */ - ? createSimpleExpression(keyProp.value.content, true) - : keyProp.exp); - const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; - const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ && - forNode.source.constType > 0 /* NOT_CONSTANT */; - const fragmentFlag = isStableFragment - ? 64 /* STABLE_FRAGMENT */ - : keyProp - ? 128 /* KEYED_FRAGMENT */ - : 256 /* UNKEYED_FRAGMENT */; - forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag + - ((process.env.NODE_ENV !== 'production') ? ` /* ${PatchFlagNames[fragmentFlag]} */` : ``), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc); - return () => { - // finish the codegen now that all children have been traversed - let childBlock; - const { children } = forNode; - // check <template v-for> key placement - if (((process.env.NODE_ENV !== 'production') || !true) && isTemplate) { - node.children.some(c => { - if (c.type === 1 /* ELEMENT */) { - const key = findProp(c, 'key'); - if (key) { - context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc)); - return true; - } - } - }); + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`); + const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp); + const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[fragmentFlag]} */` : ``), + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if ((!!(process.env.NODE_ENV !== "production") || false) && isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */; - const slotOutlet = isSlotOutlet(node) - ? node - : isTemplate && - node.children.length === 1 && - isSlotOutlet(node.children[0]) - ? node.children[0] // api-extractor somehow fails to infer this - : null; - if (slotOutlet) { - // <slot v-for="..."> or <template v-for="..."><slot/></template> - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - // <template v-for="..." :key="..."><slot/></template> - // we need to inject the key to the renderSlot() call. - // the props for renderSlot is passed as the 3rd argument. - injectProp(childBlock, keyProperty, context); - } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64 + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[64]} */` : ``), + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); } - else if (needFragmentWrapper) { - // <template v-for="..."> with text or multi-elements - // should generate a fragment block for each loop - childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ + - ((process.env.NODE_ENV !== 'production') - ? ` /* ${PatchFlagNames[64 /* STABLE_FRAGMENT */]} */` - : ``), undefined, undefined, true, undefined, false /* isComponent */); - } - else { - // Normal element v-for. Directly use the child's codegenNode - // but mark it as a block. - childBlock = children[0] - .codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - // switch from block to vnode - removeHelper(OPEN_BLOCK); - removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - // switch from vnode to block - removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ])); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...(keyExp ? [` && _cached.key === `, keyExp] : []), - ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++))); - } - else { - renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */)); - } - }; + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached++)) + ); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc)); - return; - } - const parseResult = parseForExpression( - // can only be simple expression because vFor transform is applied - // before expression transform. - dir.exp, context); - if (!parseResult) { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc)); - return; - } - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11 /* FOR */, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - // bookkeeping - scopes.vFor++; - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (onExit) - onExit(); - }; + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) + onExit(); + }; } -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -// This regex doesn't cover the case if key or index aliases have destructuring, -// but those do not make sense in the first place, so this works in practice. -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input, context) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) - return; - const [, LHS, RHS] = inMatch; - const result = { - source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: undefined, - key: undefined, - index: undefined - }; - if ((process.env.NODE_ENV !== 'production') && true) { - validateBrowserExpression(result.source, context); +function finalizeForParseResult(result, context) { + if (result.finalized) + return; + if (!!(process.env.NODE_ENV !== "production") && true) { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); } - let valueContent = LHS.trim().replace(stripParensRE, '').trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, '').trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(loc, keyContent, keyOffset); - if ((process.env.NODE_ENV !== 'production') && true) { - validateBrowserExpression(result.key, context, true); - } - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key - ? keyOffset + keyContent.length - : trimmedOffset + valueContent.length)); - if ((process.env.NODE_ENV !== 'production') && true) { - validateBrowserExpression(result.index, context, true); - } - } - } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); } - if (valueContent) { - result.value = createAliasExpression(loc, valueContent, trimmedOffset); - if ((process.env.NODE_ENV !== 'production') && true) { - validateBrowserExpression(result.value, context, true); - } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); } - return result; -} -function createAliasExpression(range, content, offset) { - return createSimpleExpression(content, false, getInnerRange(range, offset, content.length)); + } + result.finalized = true; } function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); + return createParamsList([value, key, index, ...memoArgs]); } function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) - break; - } - return args - .slice(0, i + 1) - .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false)); + let i = args.length; + while (i--) { + if (args[i]) + break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); } const defaultFallback = createSimpleExpression(`undefined`, false); -// A NodeTransform that: -// 1. Tracks scope identifiers for scoped slots so that they don't get prefixed -// by transformExpression. This is only applied in non-browser builds with -// { prefixIdentifiers: true }. -// 2. Track v-slot depths so that we know a slot is inside another slot. -// Note the exit callback is executed before buildSlots() on the same node, -// so only nested slots see positive numbers. const trackSlotScopes = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 1 /* COMPONENT */ || - node.tagType === 3 /* TEMPLATE */)) { - // We are only checking non-empty v-slot here - // since we only care about slots that introduce scope variables. - const vSlot = findDir(node, 'slot'); - if (vSlot) { - vSlot.exp; - context.scopes.vSlot++; - return () => { - context.scopes.vSlot--; - }; - } + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; } + } }; -// A NodeTransform that tracks scope identifiers for scoped slots with v-for. -// This transform is only applied in non-browser builds with { prefixIdentifiers: true } const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && - node.props.some(isVSlot) && - (vFor = findDir(node, 'for'))) { - const result = (vFor.parseResult = parseForExpression(vFor.exp, context)); - if (result) { - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; } + } }; -const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc); -// Instead of being a DirectiveTransform, v-slot processing is called during -// transformElement to build the slots object for a component. +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - // If the slot is inside a v-for or another v-slot, force it to be dynamic - // since it likely uses a scope variable. - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - // 1. Check for slot with slotProps on component itself. - // <Comp v-slot="{ prop }"/> - const onComponentSlot = findDir(node, 'slot', true); + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc))); + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; } - // 2. Iterate through children and check for template slots - // <template v-slot:foo="{ prop }"> - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = new Set(); - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || - !(slotDir = findDir(slotElement, 'slot', true))) { - // not a <template v-slot>, skip. - if (slotElement.type !== 3 /* COMMENT */) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - // already has on-component slot - this is incorrect usage. - context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc)); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir; - // check if name is dynamic. - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } - else { - hasDynamicSlots = true; - } - const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc); - // check if this slot is conditional (v-if/v-for) - let vIf; - let vElse; - let vFor; - if ((vIf = findDir(slotElement, 'if'))) { - hasDynamicSlots = true; - dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)); - } - else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) { - // find adjacent v-if - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3 /* COMMENT */) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, 'if')) { - // remove node - children.splice(i, 1); - i--; - // attach this slot to previous conditional - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp - ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback) - : buildDynamicSlot(slotName, slotFunction); - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc)); - } - } - else if ((vFor = findDir(slotElement, 'for'))) { - hasDynamicSlots = true; - const parseResult = vFor.parseResult || - parseForExpression(vFor.exp, context); - if (parseResult) { - // Render the dynamic slots as an array and add it to the createSlot() - // args. The runtime knows how to handle it appropriately. - dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */) - ])); - } - else { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc)); - } - } - else { - // check duplicate static names - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc)); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === 'default') { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children) => { - const fn = buildSlotFn(props, children, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - // implicit default slot (on component) - slotsProperties.push(buildDefaultSlotProperty(undefined, children)); + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; } - else if (implicitDefaultChildren.length && - // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) { - // implicit default slot (mixed with named slots) - if (hasNamedDefaultSlot) { - context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc)); - } - else { - slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren)); - } + } + if (prev && isTemplateNode(prev) && findDir(prev, "if")) { + children.splice(i, 1); + i--; + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); } - const slotFlag = hasDynamicSlots - ? 2 /* DYNAMIC */ - : hasForwardedSlots(node.children) - ? 3 /* FORWARDED */ - : 1 /* STABLE */; - let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression(slotFlag + ((process.env.NODE_ENV !== 'production') ? ` /* ${slotFlagsText[slotFlag]} */` : ``), false))), loc); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); }; -} -function buildDynamicSlot(name, fn) { - return createObjectExpression([ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${slotFlagsText[slotFlag]} */` : ``), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); } function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - if (child.tagType === 2 /* SLOT */ || - hasForwardedSlots(child.children)) { - return true; - } - break; - case 9 /* IF */: - if (hasForwardedSlots(child.branches)) - return true; - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - if (hasForwardedSlots(child.children)) - return true; - break; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; } + break; + case 9: + if (hasForwardedSlots(child.branches)) + return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) + return true; + break; } - return false; + } + return false; } function isNonWhitespaceContent(node) { - if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */) - return true; - return node.type === 2 /* TEXT */ - ? !!node.content.trim() - : isNonWhitespaceContent(node.content); + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); } -// some directive transforms (e.g. v-model) may return a symbol for runtime -// import, which should be used instead of a resolveDirective call. -const directiveImportMap = new WeakMap(); -// generate a JavaScript AST for this element's codegen +const directiveImportMap = /* @__PURE__ */ new WeakMap(); const transformElement = (node, context) => { - // perform the work on exit, after all child expressions have been - // processed and merged. - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */))) { - return; + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let vnodePatchFlag; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (!!(process.env.NODE_ENV !== "production") && node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); } - const { tag, props } = node; - const isComponent = node.tagType === 1 /* COMPONENT */; - // The goal of the transform is to create a codegenNode implementing the - // VNodeCall interface. - let vnodeTag = isComponent - ? resolveComponentType(node, context) - : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let vnodePatchFlag; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = - // dynamic component may resolve to plain elements - isDynamicComponent || - vnodeTag === TELEPORT || - vnodeTag === SUSPENSE || - (!isComponent && - // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')); - // props - if (props.length > 0) { - const propsBuildResult = buildProps(node, context, undefined, isComponent, isDynamicComponent); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = - directives && directives.length - ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context))) - : undefined; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; } - // children - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - // Although a built-in component, we compile KeepAlive with raw children - // instead of slot functions so that it can be used inside Transition - // or other Transition-wrapping HOCs. - // To ensure correct updates with block optimizations, we need to: - // 1. Force keep-alive into a block. This avoids its children being - // collected by a parent block. - shouldUseBlock = true; - // 2. Force keep-alive to always be updated, since it uses raw children. - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - if ((process.env.NODE_ENV !== 'production') && node.children.length > 1) { - context.onError(createCompilerError(45 /* X_KEEP_ALIVE_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - } - const shouldBuildAsSlots = isComponent && - // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && - // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } - else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - // check for dynamic text children - const hasDynamicTextChild = type === 5 /* INTERPOLATION */ || - type === 8 /* COMPOUND_EXPRESSION */; - if (hasDynamicTextChild && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - patchFlag |= 1 /* TEXT */; - } - // pass directly if the only child is a text node - // (plain / interpolation / expression) - if (hasDynamicTextChild || type === 2 /* TEXT */) { - vnodeChildren = child; - } - else { - vnodeChildren = node.children; - } - } - else { - vnodeChildren = node.children; - } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; } - // patchFlag & dynamicPropNames - if (patchFlag !== 0) { - if ((process.env.NODE_ENV !== 'production')) { - if (patchFlag < 0) { - // special flags (negative and mutually exclusive) - vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } - else { - // bitwise flags - const flagNames = Object.keys(PatchFlagNames) - .map(Number) - .filter(n => n > 0 && patchFlag & n) - .map(n => PatchFlagNames[n]) - .join(`, `); - vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; - } - } - else { - vnodePatchFlag = String(patchFlag); - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; } - node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc); - }; + } else { + vnodeChildren = node.children; + } + } + if (patchFlag !== 0) { + if (!!(process.env.NODE_ENV !== "production")) { + if (patchFlag < 0) { + vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; + } + } else { + vnodePatchFlag = String(patchFlag); + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + vnodePatchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; }; function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - // 1. dynamic component - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp(node, 'is'); - if (isProp) { - if (isExplicitDynamic || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))) { - const exp = isProp.type === 6 /* ATTRIBUTE */ - ? isProp.value && createSimpleExpression(isProp.value.content, true) - : isProp.exp; - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } - else if (isProp.type === 6 /* ATTRIBUTE */ && - isProp.value.content.startsWith('vue:')) { - // <button is="vue:xxx"> - // if not <component>, only is value that starts with "vue:" will be - // treated as component by the parse phase and reach here, unless it's - // compat mode where all is values are considered components - tag = isProp.value.content.slice(4); - } - } - // 1.5 v-is (TODO: Deprecate) - const isDir = !isExplicitDynamic && findDir(node, 'is'); - if (isDir && isDir.exp) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp(node, "is"); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp; + if (exp) { return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - isDir.exp + exp ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); } - // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...) - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - // built-ins are simply fallthroughs / have special handling during ssr - // so we don't need to import their runtime equivalents - if (!ssr) - context.helper(builtIn); - return builtIn; - } - // 5. user component (resolve) - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) + context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); } function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - // patchFlag analysis - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && - (!isComponent || isDynamicComponent) && - // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== 'onclick' && - // omit v-model handlers - name !== 'onUpdate:modelValue' && - // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (value.type === 20 /* JS_CACHE_EXPRESSION */ || - ((value.type === 4 /* SIMPLE_EXPRESSION */ || - value.type === 8 /* COMPOUND_EXPRESSION */) && - getConstantType(value, context) > 0)) { - // skip if the prop is a cached handler or has constant value - return; - } - if (name === 'ref') { - hasRef = true; - } - else if (name === 'class') { - hasClassBinding = true; - } - else if (name === 'style') { - hasStyleBinding = true; - } - else if (name !== 'key' && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - // treat the dynamic class and style binding of the component as dynamic props - if (isComponent && - (name === 'class' || name === 'style') && - !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) + mergeArgs.push(arg); + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); } - else { - hasDynamicKeys = true; + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); } - }; - for (let i = 0; i < props.length; i++) { - // static attribute - const prop = props[i]; - if (prop.type === 6 /* ATTRIBUTE */) { - const { loc, name, value } = prop; - let isStatic = true; - if (name === 'ref') { - hasRef = true; - if (context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushMergeArg(); + { + if (!!(process.env.NODE_ENV !== "production")) { + const hasOverridableKeys = mergeArgs.some((arg2) => { + if (arg2.type === 15) { + return arg2.properties.some(({ key }) => { + if (key.type !== 4 || !key.isStatic) { + return true; + } + return key.content !== "class" && key.content !== "style" && !isOn(key.content); + }); + } else { + return true; + } + }); + if (hasOverridableKeys) { + checkCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context, + loc + ); } - } - // skip is on <component>, or is="vue:xxx" - if (name === 'is' && - (isComponentTag(tag) || - (value && value.content.startsWith('vue:')) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context)))) { + } + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); continue; + } } - properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc))); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); } - else { - // directives - const { name, arg, exp, loc } = prop; - const isVBind = name === 'bind'; - const isVOn = name === 'on'; - // skip v-slot - it is handled by its dedicated transform. - if (name === 'slot') { - if (!isComponent) { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc)); - } - continue; - } - // skip v-once/v-memo - they are handled by dedicated transforms. - if (name === 'once' || name === 'memo') { - continue; - } - // skip v-is and :is on <component> - if (name === 'is' || - (isVBind && - isStaticArgOf(arg, 'is') && - (isComponentTag(tag) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))))) { - continue; - } - // skip v-on in SSR compilation - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - (isVBind && isStaticArgOf(arg, 'key')) || - // inline before-update hooks need to force block so that it is invoked - // before children - (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // special case for v-bind and v-on with no argument - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - properties = []; - } - if (isVBind) { - { - // 2.x v-bind object order compat - if ((process.env.NODE_ENV !== 'production')) { - const hasOverridableKeys = mergeArgs.some(arg => { - if (arg.type === 15 /* JS_OBJECT_EXPRESSION */) { - return arg.properties.some(({ key }) => { - if (key.type !== 4 /* SIMPLE_EXPRESSION */ || - !key.isStatic) { - return true; - } - return (key.content !== 'class' && - key.content !== 'style' && - !isOn(key.content)); - }); - } - else { - // dynamic expression - return true; - } - }); - if (hasOverridableKeys) { - checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context, loc); - } - } - if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context)) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } - else { - // v-on="obj" -> toHandlers(obj) - mergeArgs.push({ - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee: context.helper(TO_HANDLERS), - arguments: [exp] - }); - } - } - else { - context.onError(createCompilerError(isVBind - ? 34 /* X_V_BIND_NO_EXPRESSION */ - : 35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - continue; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - // has built-in directive transform. - const { props, needRuntime } = directiveTransform(prop, node, context); - !ssr && props.forEach(analyzePatchFlag); - properties.push(...props); - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } - else if (!isBuiltInDirective(name)) { - // no built-in transform, this is a user custom directive. - runtimeDirectives.push(prop); - // custom dirs may use beforeUpdate so they need to force blocks - // to ensure before-update gets called before children update - if (hasChildren) { - shouldUseBlock = true; - } - } + continue; + } + if (isVBind && modifiers.includes("prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } } - let propsExpression = undefined; - // has v-bind="object" or v-on="object", wrap with mergeProps - if (mergeArgs.length) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - } - if (mergeArgs.length > 1) { - propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc); - } - else { - // single v-bind with nothing else - no need for a mergeProps call - propsExpression = mergeArgs[0]; - } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; } - else if (properties.length) { - propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc); + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; } - // patchFlag analysis - if (hasDynamicKeys) { - patchFlag |= 16 /* FULL_PROPS */; + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; } - else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2 /* CLASS */; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4 /* STYLE */; - } - if (dynamicPropNames.length) { - patchFlag |= 8 /* PROPS */; - } - if (hasHydrationEventBinding) { - patchFlag |= 32 /* HYDRATE_EVENTS */; - } + if (dynamicPropNames.length) { + patchFlag |= 8; } - if (!shouldUseBlock && - (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) && - (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512 /* NEED_PATCH */; + if (hasHydrationEventBinding) { + patchFlag |= 32; } - // pre-normalize props, SSR is skipped for now - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15 /* JS_OBJECT_EXPRESSION */: - // means that there is no v-bind, - // but still need to deal with dynamic key binding - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === 'class') { - classKeyIndex = i; - } - else if (key.content === 'style') { - styleKeyIndex = i; - } - } - else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - // no dynamic key - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]); - } - if (styleProp && - // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || - (styleProp.value.type === 4 /* SIMPLE_EXPRESSION */ && - styleProp.value.content.trim()[0] === `[`) || - // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) { - styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]); - } - } - else { - // dynamic key binding, wrap with `normalizeProps` - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]); - } - break; - case 14 /* JS_CALL_EXPRESSION */: - // mergeProps call, do nothing - break; - default: - // single v-bind - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ]); - break; + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; } -// Dedupe props in an object literal. -// Literal duplicated attributes would have been warned during the parse phase, -// however, it's possible to encounter duplicated `onXXX` handlers with different -// modifiers. We also need to merge static and dynamic class / style attributes. -// - onXXX handlers / style: merge into array -// - class: merge into single expression with concatenation function dedupeProperties(properties) { - const knownProps = new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - // dynamic keys are always allowed - if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === 'style' || name === 'class' || isOn(name)) { - mergeAsArray(existing, prop); - } - // unexpected duplicate, should have emitted error during parse - } - else { - knownProps.set(name, prop); - deduped.push(prop); - } + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; } - return deduped; + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; } function mergeAsArray(existing, incoming) { - if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.value.elements.push(incoming.value); - } - else { - existing.value = createArrayExpression([existing.value, incoming.value], existing.loc); - } + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } } function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - // built-in directive with runtime - dirArgs.push(context.helperString(runtime)); + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); } - else { - { - // inject statement for resolving directive - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } + } + const { loc } = dir; + if (dir.exp) + dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); } - const { loc } = dir; - if (dir.exp) - dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc)); - } - return createArrayExpression(dirArgs, dir.loc); + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); } function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) - propsNamesString += ', '; - } - return propsNamesString + `]`; + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) + propsNamesString += ", "; + } + return propsNamesString + `]`; } function isComponentTag(tag) { - return tag === 'component' || tag === 'Component'; + return tag === "component" || tag === "Component"; } -(process.env.NODE_ENV !== 'production') - ? Object.freeze({}) - : {}; -(process.env.NODE_ENV !== 'production') ? Object.freeze([]) : []; -const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); -}; -const camelizeRE = /-(\w)/g; -/** - * @private - */ -const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); -}); - const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - '{}', - 'undefined', - 'true' - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); // remove unused arguments - node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc); + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } }; function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = undefined; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.value) { - if (p.name === 'name') { - slotName = JSON.stringify(p.value.content); - } - else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); } - else { - if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) { - if (p.exp) - slotName = p.exp; - } - else { - if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) + slotName = p.exp; + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); } + nonNameProps.push(p); + } } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps(node, context, nonNameProps, false, false); - slotProps = props; - if (directives.length) { - context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc)); - } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); } - return { - slotName, - slotProps - }; + } + return { + slotName, + slotProps + }; } -const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc)); + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (!!(process.env.NODE_ENV !== "production") && rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); } - let eventName; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - let rawName = arg.content; - // TODO deprecate @vnodeXXX usage - if (rawName.startsWith('vue:')) { - rawName = `vnode-${rawName.slice(4)}`; - } - // for all event listeners, auto convert it to camelCase. See issue #2249 - eventName = createSimpleExpression(toHandlerKey(camelize$1(rawName)), true, arg.loc); - } - else { - // #2388 - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp.content); + const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); + const hasMultipleStatements = exp.content.includes(`;`); + if (!!(process.env.NODE_ENV !== "production") && true) { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); } - else { - // already a compound expression. - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); } - // handler processing - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = undefined; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp.content); - const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); - const hasMultipleStatements = exp.content.includes(`;`); - if ((process.env.NODE_ENV !== 'production') && true) { - validateBrowserExpression(exp, context, false, hasMultipleStatements); - } - if (isInlineStatement || (shouldCache && isMemberExp)) { - // wrap inline statement in a function expression - exp = createCompoundExpression([ - `${isInlineStatement - ? `$event` - : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc)) - ] - }; - // apply extended compiler augmentor - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - // cache handlers so that it's always the same handler being passed down. - // this avoids unnecessary re-renders when users use inline handlers on - // components. - ret.props[0].value = context.cache(ret.props[0].value); - } - // mark the key as handler for props normalization check - ret.props.forEach(p => (p.key.isHandlerKey = true)); - return ret; + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; }; -// v-bind without arg is handled directly in ./transformElements.ts due to it affecting -// codegen for the entire props object. This transform here is only for v-bind -// *with* args. const transformBind = (dir, _node, context) => { - const { exp, modifiers, loc } = dir; - const arg = dir.arg; - if (arg.type !== 4 /* SIMPLE_EXPRESSION */) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (!exp && arg.type === 4) { + const propName = camelize(arg.content); + exp = dir.exp = createSimpleExpression(propName, false, arg.loc); + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.includes("camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); } - else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; + } + if (!context.inSSR) { + if (modifiers.includes("prop")) { + injectPrefix(arg, "."); } - // .sync is replaced by v-model:arg - if (modifiers.includes('camel')) { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = camelize$1(arg.content); - } - else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } - else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.includes('prop')) { - injectPrefix(arg, '.'); - } - if (modifiers.includes('attr')) { - injectPrefix(arg, '^'); - } - } - if (!exp || - (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) { - context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc)); - return { - props: [createObjectProperty(arg, createSimpleExpression('', true, loc))] - }; + if (modifiers.includes("attr")) { + injectPrefix(arg, "^"); } + } + if (!exp || exp.type === 4 && !exp.content.trim()) { + context.onError(createCompilerError(34, loc)); return { - props: [createObjectProperty(arg, exp)] + props: [createObjectProperty(arg, createSimpleExpression("", true, loc))] }; + } + return { + props: [createObjectProperty(arg, exp)] + }; }; const injectPrefix = (arg, prefix) => { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } - else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } - else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } }; -// Merge adjacent text nodes and expressions into a single expression -// e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child. const transformText = (node, context) => { - if (node.type === 0 /* ROOT */ || - node.type === 1 /* ELEMENT */ || - node.type === 11 /* FOR */ || - node.type === 10 /* IF_BRANCH */) { - // perform the transform on node exit so that all expressions have already - // been processed. - return () => { - const children = node.children; - let currentContainer = undefined; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression([child], child.loc); - } - // merge adjacent text node into current - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } - else { - currentContainer = undefined; - break; - } - } - } + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; } - if (!hasText || - // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - (children.length === 1 && - (node.type === 0 /* ROOT */ || - (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find(p => p.type === 7 /* DIRECTIVE */ && - !context.directiveTransforms[p.name]) && - // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === 'template'))))) { - return; - } - // pre-convert text nodes into createTextVNode(text) calls to avoid - // runtime normalization. - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) { - const callArgs = []; - // createTextVNode defaults to single whitespace, so if it is a - // single space the code could be an empty call to save bytes. - if (child.type !== 2 /* TEXT */ || child.content !== ' ') { - callArgs.push(child); - } - // mark dynamic text with flag so it gets patched inside a block - if (!context.ssr && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - callArgs.push(1 /* TEXT */ + - ((process.env.NODE_ENV !== 'production') ? ` /* ${PatchFlagNames[1 /* TEXT */]} */` : ``)); - } - children[i] = { - type: 12 /* TEXT_CALL */, - content: child, - loc: child.loc, - codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs) - }; - } - } - }; - } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (!!(process.env.NODE_ENV !== "production") ? ` /* ${PatchFlagNames[1]} */` : ``) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } }; -const seen = new WeakSet(); +const seen$1 = /* @__PURE__ */ new WeakSet(); const transformOnce = (node, context) => { - if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) { - if (seen.has(node) || context.inVOnce) { - return; - } - seen.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */); - } - }; + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true + /* isVNode */ + ); + } + }; + } }; const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc)); - return createTransformProps(); - } - const rawExp = exp.loc.source; - const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp; - // im SFC <script setup> inline mode, the exp may have been transformed into - // _unref(exp) - context.bindingMetadata[rawExp]; - const maybeRef = !true /* SETUP_CONST */; - if (!expString.trim() || - (!isMemberExpression(expString) && !maybeRef)) { - context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc)); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression('modelValue', true); - const eventName = arg - ? isStaticExp(arg) - ? `onUpdate:${arg.content}` - : createCompoundExpression(['"onUpdate:" + ', arg]) - : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - // modelModifiers: { foo: true, "bar-baz": true } - if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) { - const modifiers = dir.modifiers - .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`) - .join(`, `); - const modifiersKey = arg - ? isStaticExp(arg) - ? `${arg.content}Modifiers` - : createCompoundExpression([arg, ' + "Modifiers"']) - : `modelModifiers`; - props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */))); - } - return createTransformProps(props); + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source; + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); }; function createTransformProps(props = []) { - return { props }; + return { props }; } const validDivisionCharRE = /[\w).+\-_$\]]/; const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTER" /* COMPILER_FILTERS */, context)) { - return; - } - if (node.type === 5 /* INTERPOLATION */) { - // filter rewrite is applied before expression transform so only - // simple expressions are possible at this stage - rewriteFilter(node.content, context); - } - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((prop) => { - if (prop.type === 7 /* DIRECTIVE */ && - prop.name !== 'for' && - prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } + if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } }; function rewriteFilter(node, context) { - if (node.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(node, context); - } - else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== 'object') - continue; - if (child.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(child, context); - } - else if (child.type === 8 /* COMPOUND_EXPRESSION */) { - rewriteFilter(node, context); - } - else if (child.type === 5 /* INTERPOLATION */) { - rewriteFilter(child.content, context); - } - } + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") + continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } } + } } function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 0x27 && prev !== 0x5c) - inSingle = false; - } - else if (inDouble) { - if (c === 0x22 && prev !== 0x5c) - inDouble = false; - } - else if (inTemplateString) { - if (c === 0x60 && prev !== 0x5c) - inTemplateString = false; - } - else if (inRegex) { - if (c === 0x2f && prev !== 0x5c) - inRegex = false; - } - else if (c === 0x7c && // pipe - exp.charCodeAt(i + 1) !== 0x7c && - exp.charCodeAt(i - 1) !== 0x7c && - !curly && - !square && - !paren) { - if (expression === undefined) { - // first filter, end of expression - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } - else { - pushFilter(); - } - } - else { - switch (c) { - case 0x22: - inDouble = true; - break; // " - case 0x27: - inSingle = true; - break; // ' - case 0x60: - inTemplateString = true; - break; // ` - case 0x28: - paren++; - break; // ( - case 0x29: - paren--; - break; // ) - case 0x5b: - square++; - break; // [ - case 0x5d: - square--; - break; // ] - case 0x7b: - curly++; - break; // { - case 0x7d: - curly--; - break; // } - } - if (c === 0x2f) { - // / - let j = i - 1; - let p; - // find first non-whitespace prev char - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== ' ') - break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === undefined) { - expression = exp.slice(0, i).trim(); - } - else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) + inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) + inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) + inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) + inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { lastFilterIndex = i + 1; - } - if (filters.length) { - (process.env.NODE_ENV !== 'production') && - warnDeprecation("COMPILER_FILTER" /* COMPILER_FILTERS */, context, node.loc); - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + case 39: + inSingle = true; + break; + case 96: + inTemplateString = true; + break; + case 40: + paren++; + break; + case 41: + paren--; + break; + case 91: + square++; + break; + case 93: + square--; + break; + case 123: + curly++; + break; + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") + break; } - node.content = expression; + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + !!(process.env.NODE_ENV !== "production") && warnDeprecation( + "COMPILER_FILTERS", + context, + node.loc + ); + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + } } function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf('('); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, 'filter')}(${exp})`; - } - else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, 'filter')}(${exp}${args !== ')' ? ',' + args : args}`; - } + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } } -const seen$1 = new WeakSet(); +const seen = /* @__PURE__ */ new WeakSet(); const transformMemo = (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const dir = findDir(node, 'memo'); - if (!dir || seen$1.has(node)) { - return; - } - seen$1.add(node); - return () => { - const codegenNode = node.codegenNode || - context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) { - // non-component sub tree should be turned into a block - if (node.tagType !== 1 /* COMPONENT */) { - makeBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(undefined, codegenNode), - `_cache`, - String(context.cached++) - ]); - } - }; + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached++) + ]); + } + }; + } }; function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...([transformFilter] ), - ...((process.env.NODE_ENV !== 'production') - ? [transformExpression] - : []), - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; -} -// we name it `baseCompile` so that higher order compilers like -// @vue/compiler-dom can export `compile` while re-exporting everything else. -function baseCompile(template, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === 'module'; - /* istanbul ignore if */ + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...!!(process.env.NODE_ENV !== "production") ? [transformExpression] : [], + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], { - if (options.prefixIdentifiers === true) { - onError(createCompilerError(46 /* X_PREFIX_ID_NOT_SUPPORTED */)); - } - else if (isModuleMode) { - onError(createCompilerError(47 /* X_MODULE_MODE_NOT_SUPPORTED */)); - } + on: transformOn, + bind: transformBind, + model: transformModel } - const prefixIdentifiers = !true ; - if (options.cacheHandlers) { - onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */)); - } - const ast = isString(template) ? baseParse(template, options) : template; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); - transform(ast, extend({}, options, { - prefixIdentifiers, - nodeTransforms: [ - ...nodeTransforms, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: extend({}, directiveTransforms, options.directiveTransforms || {} // user transforms - ) - })); - return generate(ast, extend({}, options, { - prefixIdentifiers - })); + ]; } +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); + } + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; const noopDirectiveTransform = () => ({ props: [] }); -export { BASE_TRANSITION, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getConstantType, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVSlot, locStub, makeBlock, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; +export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TS_NODE_TYPES, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFunctionType, isInDestructureAssignment, isInNewExpression, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; diff --git a/node_modules/@vue/compiler-core/package.json b/node_modules/@vue/compiler-core/package.json index 6315a327..8fac721d 100644 --- a/node_modules/@vue/compiler-core/package.json +++ b/node_modules/@vue/compiler-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-core", - "version": "3.2.36", + "version": "3.4.15", "description": "@vue/compiler-core", "main": "index.js", "module": "dist/compiler-core.esm-bundler.js", @@ -9,6 +9,20 @@ "index.js", "dist" ], + "exports": { + ".": { + "types": "./dist/compiler-core.d.ts", + "node": { + "production": "./dist/compiler-core.cjs.prod.js", + "development": "./dist/compiler-core.cjs.js", + "default": "./index.js" + }, + "module": "./dist/compiler-core.esm-bundler.js", + "import": "./dist/compiler-core.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, "buildOptions": { "name": "VueCompilerCore", "compat": true, @@ -32,12 +46,13 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme", "dependencies": { - "@vue/shared": "3.2.36", - "@babel/parser": "^7.16.4", + "@babel/parser": "^7.23.6", + "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map": "^0.6.1" + "source-map-js": "^1.0.2", + "@vue/shared": "3.4.15" }, "devDependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.23.6" } -} +} \ No newline at end of file diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js index fb6c9c81..5bd13803 100644 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js +++ b/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js @@ -1,3 +1,8 @@ +/** +* @vue/compiler-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -16,3108 +21,691 @@ const V_SHOW = Symbol(`vShow` ); const TRANSITION = Symbol(`Transition` ); const TRANSITION_GROUP = Symbol(`TransitionGroup` ); compilerCore.registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` }); -var namedCharacterReferences = { - GT: ">", - gt: ">", - LT: "<", - lt: "<", - "ac;": "∾", - "af;": "⁡", - AMP: "&", - amp: "&", - "ap;": "≈", - "DD;": "ⅅ", - "dd;": "ⅆ", - deg: "°", - "ee;": "ⅇ", - "eg;": "⪚", - "el;": "⪙", - ETH: "Ð", - eth: "ð", - "gE;": "≧", - "ge;": "≥", - "Gg;": "⋙", - "gg;": "≫", - "gl;": "≷", - "GT;": ">", - "Gt;": "≫", - "gt;": ">", - "ic;": "⁣", - "ii;": "ⅈ", - "Im;": "ℑ", - "in;": "∈", - "it;": "⁢", - "lE;": "≦", - "le;": "≤", - "lg;": "≶", - "Ll;": "⋘", - "ll;": "≪", - "LT;": "<", - "Lt;": "≪", - "lt;": "<", - "mp;": "∓", - "Mu;": "Μ", - "mu;": "μ", - "ne;": "≠", - "ni;": "∋", - not: "¬", - "Nu;": "Ν", - "nu;": "ν", - "Or;": "⩔", - "or;": "∨", - "oS;": "Ⓢ", - "Pi;": "Π", - "pi;": "π", - "pm;": "±", - "Pr;": "⪻", - "pr;": "≺", - "Re;": "ℜ", - REG: "®", - reg: "®", - "rx;": "℞", - "Sc;": "⪼", - "sc;": "≻", - shy: "­", - uml: "¨", - "wp;": "℘", - "wr;": "≀", - "Xi;": "Ξ", - "xi;": "ξ", - yen: "¥", - "acd;": "∿", - "acE;": "∾̳", - "Acy;": "А", - "acy;": "а", - "Afr;": "𝔄", - "afr;": "𝔞", - "AMP;": "&", - "amp;": "&", - "And;": "⩓", - "and;": "∧", - "ang;": "∠", - "apE;": "⩰", - "ape;": "≊", - "ast;": "*", - Auml: "Ä", - auml: "ä", - "Bcy;": "Б", - "bcy;": "б", - "Bfr;": "𝔅", - "bfr;": "𝔟", - "bne;": "=⃥", - "bot;": "⊥", - "Cap;": "⋒", - "cap;": "∩", - cent: "¢", - "Cfr;": "ℭ", - "cfr;": "𝔠", - "Chi;": "Χ", - "chi;": "χ", - "cir;": "○", - COPY: "©", - copy: "©", - "Cup;": "⋓", - "cup;": "∪", - "Dcy;": "Д", - "dcy;": "д", - "deg;": "°", - "Del;": "∇", - "Dfr;": "𝔇", - "dfr;": "𝔡", - "die;": "¨", - "div;": "÷", - "Dot;": "¨", - "dot;": "˙", - "Ecy;": "Э", - "ecy;": "э", - "Efr;": "𝔈", - "efr;": "𝔢", - "egs;": "⪖", - "ell;": "ℓ", - "els;": "⪕", - "ENG;": "Ŋ", - "eng;": "ŋ", - "Eta;": "Η", - "eta;": "η", - "ETH;": "Ð", - "eth;": "ð", - Euml: "Ë", - euml: "ë", - "Fcy;": "Ф", - "fcy;": "ф", - "Ffr;": "𝔉", - "ffr;": "𝔣", - "gap;": "⪆", - "Gcy;": "Г", - "gcy;": "г", - "gEl;": "⪌", - "gel;": "⋛", - "geq;": "≥", - "ges;": "⩾", - "Gfr;": "𝔊", - "gfr;": "𝔤", - "ggg;": "⋙", - "gla;": "⪥", - "glE;": "⪒", - "glj;": "⪤", - "gnE;": "≩", - "gne;": "⪈", - "Hat;": "^", - "Hfr;": "ℌ", - "hfr;": "𝔥", - "Icy;": "И", - "icy;": "и", - "iff;": "⇔", - "Ifr;": "ℑ", - "ifr;": "𝔦", - "Int;": "∬", - "int;": "∫", - Iuml: "Ï", - iuml: "ï", - "Jcy;": "Й", - "jcy;": "й", - "Jfr;": "𝔍", - "jfr;": "𝔧", - "Kcy;": "К", - "kcy;": "к", - "Kfr;": "𝔎", - "kfr;": "𝔨", - "lap;": "⪅", - "lat;": "⪫", - "Lcy;": "Л", - "lcy;": "л", - "lEg;": "⪋", - "leg;": "⋚", - "leq;": "≤", - "les;": "⩽", - "Lfr;": "𝔏", - "lfr;": "𝔩", - "lgE;": "⪑", - "lnE;": "≨", - "lne;": "⪇", - "loz;": "◊", - "lrm;": "‎", - "Lsh;": "↰", - "lsh;": "↰", - macr: "¯", - "Map;": "⤅", - "map;": "↦", - "Mcy;": "М", - "mcy;": "м", - "Mfr;": "𝔐", - "mfr;": "𝔪", - "mho;": "℧", - "mid;": "∣", - "nap;": "≉", - nbsp: " ", - "Ncy;": "Н", - "ncy;": "н", - "Nfr;": "𝔑", - "nfr;": "𝔫", - "ngE;": "≧̸", - "nge;": "≱", - "nGg;": "⋙̸", - "nGt;": "≫⃒", - "ngt;": "≯", - "nis;": "⋼", - "niv;": "∋", - "nlE;": "≦̸", - "nle;": "≰", - "nLl;": "⋘̸", - "nLt;": "≪⃒", - "nlt;": "≮", - "Not;": "⫬", - "not;": "¬", - "npr;": "⊀", - "nsc;": "⊁", - "num;": "#", - "Ocy;": "О", - "ocy;": "о", - "Ofr;": "𝔒", - "ofr;": "𝔬", - "ogt;": "⧁", - "ohm;": "Ω", - "olt;": "⧀", - "ord;": "⩝", - ordf: "ª", - ordm: "º", - "orv;": "⩛", - Ouml: "Ö", - ouml: "ö", - "par;": "∥", - para: "¶", - "Pcy;": "П", - "pcy;": "п", - "Pfr;": "𝔓", - "pfr;": "𝔭", - "Phi;": "Φ", - "phi;": "φ", - "piv;": "ϖ", - "prE;": "⪳", - "pre;": "⪯", - "Psi;": "Ψ", - "psi;": "ψ", - "Qfr;": "𝔔", - "qfr;": "𝔮", - QUOT: "\"", - quot: "\"", - "Rcy;": "Р", - "rcy;": "р", - "REG;": "®", - "reg;": "®", - "Rfr;": "ℜ", - "rfr;": "𝔯", - "Rho;": "Ρ", - "rho;": "ρ", - "rlm;": "‏", - "Rsh;": "↱", - "rsh;": "↱", - "scE;": "⪴", - "sce;": "⪰", - "Scy;": "С", - "scy;": "с", - sect: "§", - "Sfr;": "𝔖", - "sfr;": "𝔰", - "shy;": "­", - "sim;": "∼", - "smt;": "⪪", - "sol;": "/", - "squ;": "□", - "Sub;": "⋐", - "sub;": "⊂", - "Sum;": "∑", - "sum;": "∑", - "Sup;": "⋑", - "sup;": "⊃", - sup1: "¹", - sup2: "²", - sup3: "³", - "Tab;": "\t", - "Tau;": "Τ", - "tau;": "τ", - "Tcy;": "Т", - "tcy;": "т", - "Tfr;": "𝔗", - "tfr;": "𝔱", - "top;": "⊤", - "Ucy;": "У", - "ucy;": "у", - "Ufr;": "𝔘", - "ufr;": "𝔲", - "uml;": "¨", - Uuml: "Ü", - uuml: "ü", - "Vcy;": "В", - "vcy;": "в", - "Vee;": "⋁", - "vee;": "∨", - "Vfr;": "𝔙", - "vfr;": "𝔳", - "Wfr;": "𝔚", - "wfr;": "𝔴", - "Xfr;": "𝔛", - "xfr;": "𝔵", - "Ycy;": "Ы", - "ycy;": "ы", - "yen;": "¥", - "Yfr;": "𝔜", - "yfr;": "𝔶", - yuml: "ÿ", - "Zcy;": "З", - "zcy;": "з", - "Zfr;": "ℨ", - "zfr;": "𝔷", - "zwj;": "‍", - Acirc: "Â", - acirc: "â", - acute: "´", - AElig: "Æ", - aelig: "æ", - "andd;": "⩜", - "andv;": "⩚", - "ange;": "⦤", - "Aopf;": "𝔸", - "aopf;": "𝕒", - "apid;": "≋", - "apos;": "'", - Aring: "Å", - aring: "å", - "Ascr;": "𝒜", - "ascr;": "𝒶", - "Auml;": "Ä", - "auml;": "ä", - "Barv;": "⫧", - "bbrk;": "⎵", - "Beta;": "Β", - "beta;": "β", - "beth;": "ℶ", - "bNot;": "⫭", - "bnot;": "⌐", - "Bopf;": "𝔹", - "bopf;": "𝕓", - "boxH;": "═", - "boxh;": "─", - "boxV;": "║", - "boxv;": "│", - "Bscr;": "ℬ", - "bscr;": "𝒷", - "bsim;": "∽", - "bsol;": "\\", - "bull;": "•", - "bump;": "≎", - "caps;": "∩︀", - "Cdot;": "Ċ", - "cdot;": "ċ", - cedil: "¸", - "cent;": "¢", - "CHcy;": "Ч", - "chcy;": "ч", - "circ;": "ˆ", - "cirE;": "⧃", - "cire;": "≗", - "comp;": "∁", - "cong;": "≅", - "Copf;": "ℂ", - "copf;": "𝕔", - "COPY;": "©", - "copy;": "©", - "Cscr;": "𝒞", - "cscr;": "𝒸", - "csub;": "⫏", - "csup;": "⫐", - "cups;": "∪︀", - "Darr;": "↡", - "dArr;": "⇓", - "darr;": "↓", - "dash;": "‐", - "dHar;": "⥥", - "diam;": "⋄", - "DJcy;": "Ђ", - "djcy;": "ђ", - "Dopf;": "𝔻", - "dopf;": "𝕕", - "Dscr;": "𝒟", - "dscr;": "𝒹", - "DScy;": "Ѕ", - "dscy;": "ѕ", - "dsol;": "⧶", - "dtri;": "▿", - "DZcy;": "Џ", - "dzcy;": "џ", - "ecir;": "≖", - Ecirc: "Ê", - ecirc: "ê", - "Edot;": "Ė", - "eDot;": "≑", - "edot;": "ė", - "emsp;": " ", - "ensp;": " ", - "Eopf;": "𝔼", - "eopf;": "𝕖", - "epar;": "⋕", - "epsi;": "ε", - "Escr;": "ℰ", - "escr;": "ℯ", - "Esim;": "⩳", - "esim;": "≂", - "Euml;": "Ë", - "euml;": "ë", - "euro;": "€", - "excl;": "!", - "flat;": "♭", - "fnof;": "ƒ", - "Fopf;": "𝔽", - "fopf;": "𝕗", - "fork;": "⋔", - "Fscr;": "ℱ", - "fscr;": "𝒻", - "Gdot;": "Ġ", - "gdot;": "ġ", - "geqq;": "≧", - "gesl;": "⋛︀", - "GJcy;": "Ѓ", - "gjcy;": "ѓ", - "gnap;": "⪊", - "gneq;": "⪈", - "Gopf;": "𝔾", - "gopf;": "𝕘", - "Gscr;": "𝒢", - "gscr;": "ℊ", - "gsim;": "≳", - "gtcc;": "⪧", - "gvnE;": "≩︀", - "half;": "½", - "hArr;": "⇔", - "harr;": "↔", - "hbar;": "ℏ", - "Hopf;": "ℍ", - "hopf;": "𝕙", - "Hscr;": "ℋ", - "hscr;": "𝒽", - Icirc: "Î", - icirc: "î", - "Idot;": "İ", - "IEcy;": "Е", - "iecy;": "е", - iexcl: "¡", - "imof;": "⊷", - "IOcy;": "Ё", - "iocy;": "ё", - "Iopf;": "𝕀", - "iopf;": "𝕚", - "Iota;": "Ι", - "iota;": "ι", - "Iscr;": "ℐ", - "iscr;": "𝒾", - "isin;": "∈", - "Iuml;": "Ï", - "iuml;": "ï", - "Jopf;": "𝕁", - "jopf;": "𝕛", - "Jscr;": "𝒥", - "jscr;": "𝒿", - "KHcy;": "Х", - "khcy;": "х", - "KJcy;": "Ќ", - "kjcy;": "ќ", - "Kopf;": "𝕂", - "kopf;": "𝕜", - "Kscr;": "𝒦", - "kscr;": "𝓀", - "Lang;": "⟪", - "lang;": "⟨", - laquo: "«", - "Larr;": "↞", - "lArr;": "⇐", - "larr;": "←", - "late;": "⪭", - "lcub;": "{", - "ldca;": "⤶", - "ldsh;": "↲", - "leqq;": "≦", - "lesg;": "⋚︀", - "lHar;": "⥢", - "LJcy;": "Љ", - "ljcy;": "љ", - "lnap;": "⪉", - "lneq;": "⪇", - "Lopf;": "𝕃", - "lopf;": "𝕝", - "lozf;": "⧫", - "lpar;": "(", - "Lscr;": "ℒ", - "lscr;": "𝓁", - "lsim;": "≲", - "lsqb;": "[", - "ltcc;": "⪦", - "ltri;": "◃", - "lvnE;": "≨︀", - "macr;": "¯", - "male;": "♂", - "malt;": "✠", - micro: "µ", - "mlcp;": "⫛", - "mldr;": "…", - "Mopf;": "𝕄", - "mopf;": "𝕞", - "Mscr;": "ℳ", - "mscr;": "𝓂", - "nang;": "∠⃒", - "napE;": "⩰̸", - "nbsp;": " ", - "ncap;": "⩃", - "ncup;": "⩂", - "ngeq;": "≱", - "nges;": "⩾̸", - "ngtr;": "≯", - "nGtv;": "≫̸", - "nisd;": "⋺", - "NJcy;": "Њ", - "njcy;": "њ", - "nldr;": "‥", - "nleq;": "≰", - "nles;": "⩽̸", - "nLtv;": "≪̸", - "nmid;": "∤", - "Nopf;": "ℕ", - "nopf;": "𝕟", - "npar;": "∦", - "npre;": "⪯̸", - "nsce;": "⪰̸", - "Nscr;": "𝒩", - "nscr;": "𝓃", - "nsim;": "≁", - "nsub;": "⊄", - "nsup;": "⊅", - "ntgl;": "≹", - "ntlg;": "≸", - "nvap;": "≍⃒", - "nvge;": "≥⃒", - "nvgt;": ">⃒", - "nvle;": "≤⃒", - "nvlt;": "<⃒", - "oast;": "⊛", - "ocir;": "⊚", - Ocirc: "Ô", - ocirc: "ô", - "odiv;": "⨸", - "odot;": "⊙", - "ogon;": "˛", - "oint;": "∮", - "omid;": "⦶", - "Oopf;": "𝕆", - "oopf;": "𝕠", - "opar;": "⦷", - "ordf;": "ª", - "ordm;": "º", - "oror;": "⩖", - "Oscr;": "𝒪", - "oscr;": "ℴ", - "osol;": "⊘", - "Ouml;": "Ö", - "ouml;": "ö", - "para;": "¶", - "part;": "∂", - "perp;": "⊥", - "phiv;": "ϕ", - "plus;": "+", - "Popf;": "ℙ", - "popf;": "𝕡", - pound: "£", - "prap;": "⪷", - "prec;": "≺", - "prnE;": "⪵", - "prod;": "∏", - "prop;": "∝", - "Pscr;": "𝒫", - "pscr;": "𝓅", - "qint;": "⨌", - "Qopf;": "ℚ", - "qopf;": "𝕢", - "Qscr;": "𝒬", - "qscr;": "𝓆", - "QUOT;": "\"", - "quot;": "\"", - "race;": "∽̱", - "Rang;": "⟫", - "rang;": "⟩", - raquo: "»", - "Rarr;": "↠", - "rArr;": "⇒", - "rarr;": "→", - "rcub;": "}", - "rdca;": "⤷", - "rdsh;": "↳", - "real;": "ℜ", - "rect;": "▭", - "rHar;": "⥤", - "rhov;": "ϱ", - "ring;": "˚", - "Ropf;": "ℝ", - "ropf;": "𝕣", - "rpar;": ")", - "Rscr;": "ℛ", - "rscr;": "𝓇", - "rsqb;": "]", - "rtri;": "▹", - "scap;": "⪸", - "scnE;": "⪶", - "sdot;": "⋅", - "sect;": "§", - "semi;": ";", - "sext;": "✶", - "SHcy;": "Ш", - "shcy;": "ш", - "sime;": "≃", - "simg;": "⪞", - "siml;": "⪝", - "smid;": "∣", - "smte;": "⪬", - "solb;": "⧄", - "Sopf;": "𝕊", - "sopf;": "𝕤", - "spar;": "∥", - "Sqrt;": "√", - "squf;": "▪", - "Sscr;": "𝒮", - "sscr;": "𝓈", - "Star;": "⋆", - "star;": "☆", - "subE;": "⫅", - "sube;": "⊆", - "succ;": "≻", - "sung;": "♪", - "sup1;": "¹", - "sup2;": "²", - "sup3;": "³", - "supE;": "⫆", - "supe;": "⊇", - szlig: "ß", - "tbrk;": "⎴", - "tdot;": "⃛", - THORN: "Þ", - thorn: "þ", - times: "×", - "tint;": "∭", - "toea;": "⤨", - "Topf;": "𝕋", - "topf;": "𝕥", - "tosa;": "⤩", - "trie;": "≜", - "Tscr;": "𝒯", - "tscr;": "𝓉", - "TScy;": "Ц", - "tscy;": "ц", - "Uarr;": "↟", - "uArr;": "⇑", - "uarr;": "↑", - Ucirc: "Û", - ucirc: "û", - "uHar;": "⥣", - "Uopf;": "𝕌", - "uopf;": "𝕦", - "Upsi;": "ϒ", - "upsi;": "υ", - "Uscr;": "𝒰", - "uscr;": "𝓊", - "utri;": "▵", - "Uuml;": "Ü", - "uuml;": "ü", - "vArr;": "⇕", - "varr;": "↕", - "Vbar;": "⫫", - "vBar;": "⫨", - "Vert;": "‖", - "vert;": "|", - "Vopf;": "𝕍", - "vopf;": "𝕧", - "Vscr;": "𝒱", - "vscr;": "𝓋", - "Wopf;": "𝕎", - "wopf;": "𝕨", - "Wscr;": "𝒲", - "wscr;": "𝓌", - "xcap;": "⋂", - "xcup;": "⋃", - "xmap;": "⟼", - "xnis;": "⋻", - "Xopf;": "𝕏", - "xopf;": "𝕩", - "Xscr;": "𝒳", - "xscr;": "𝓍", - "xvee;": "⋁", - "YAcy;": "Я", - "yacy;": "я", - "YIcy;": "Ї", - "yicy;": "ї", - "Yopf;": "𝕐", - "yopf;": "𝕪", - "Yscr;": "𝒴", - "yscr;": "𝓎", - "YUcy;": "Ю", - "yucy;": "ю", - "Yuml;": "Ÿ", - "yuml;": "ÿ", - "Zdot;": "Ż", - "zdot;": "ż", - "Zeta;": "Ζ", - "zeta;": "ζ", - "ZHcy;": "Ж", - "zhcy;": "ж", - "Zopf;": "ℤ", - "zopf;": "𝕫", - "Zscr;": "𝒵", - "zscr;": "𝓏", - "zwnj;": "‌", - Aacute: "Á", - aacute: "á", - "Acirc;": "Â", - "acirc;": "â", - "acute;": "´", - "AElig;": "Æ", - "aelig;": "æ", - Agrave: "À", - agrave: "à", - "aleph;": "ℵ", - "Alpha;": "Α", - "alpha;": "α", - "Amacr;": "Ā", - "amacr;": "ā", - "amalg;": "⨿", - "angle;": "∠", - "angrt;": "∟", - "angst;": "Å", - "Aogon;": "Ą", - "aogon;": "ą", - "Aring;": "Å", - "aring;": "å", - "asymp;": "≈", - Atilde: "Ã", - atilde: "ã", - "awint;": "⨑", - "bcong;": "≌", - "bdquo;": "„", - "bepsi;": "϶", - "blank;": "␣", - "blk12;": "▒", - "blk14;": "░", - "blk34;": "▓", - "block;": "█", - "boxDL;": "╗", - "boxDl;": "╖", - "boxdL;": "╕", - "boxdl;": "┐", - "boxDR;": "╔", - "boxDr;": "╓", - "boxdR;": "╒", - "boxdr;": "┌", - "boxHD;": "╦", - "boxHd;": "╤", - "boxhD;": "╥", - "boxhd;": "┬", - "boxHU;": "╩", - "boxHu;": "╧", - "boxhU;": "╨", - "boxhu;": "┴", - "boxUL;": "╝", - "boxUl;": "╜", - "boxuL;": "╛", - "boxul;": "┘", - "boxUR;": "╚", - "boxUr;": "╙", - "boxuR;": "╘", - "boxur;": "└", - "boxVH;": "╬", - "boxVh;": "╫", - "boxvH;": "╪", - "boxvh;": "┼", - "boxVL;": "╣", - "boxVl;": "╢", - "boxvL;": "╡", - "boxvl;": "┤", - "boxVR;": "╠", - "boxVr;": "╟", - "boxvR;": "╞", - "boxvr;": "├", - "Breve;": "˘", - "breve;": "˘", - brvbar: "¦", - "bsemi;": "⁏", - "bsime;": "⋍", - "bsolb;": "⧅", - "bumpE;": "⪮", - "bumpe;": "≏", - "caret;": "⁁", - "caron;": "ˇ", - "ccaps;": "⩍", - Ccedil: "Ç", - ccedil: "ç", - "Ccirc;": "Ĉ", - "ccirc;": "ĉ", - "ccups;": "⩌", - "cedil;": "¸", - "check;": "✓", - "clubs;": "♣", - "Colon;": "∷", - "colon;": ":", - "comma;": ",", - "crarr;": "↵", - "Cross;": "⨯", - "cross;": "✗", - "csube;": "⫑", - "csupe;": "⫒", - "ctdot;": "⋯", - "cuepr;": "⋞", - "cuesc;": "⋟", - "cupor;": "⩅", - curren: "¤", - "cuvee;": "⋎", - "cuwed;": "⋏", - "cwint;": "∱", - "Dashv;": "⫤", - "dashv;": "⊣", - "dblac;": "˝", - "ddarr;": "⇊", - "Delta;": "Δ", - "delta;": "δ", - "dharl;": "⇃", - "dharr;": "⇂", - "diams;": "♦", - "disin;": "⋲", - divide: "÷", - "doteq;": "≐", - "dtdot;": "⋱", - "dtrif;": "▾", - "duarr;": "⇵", - "duhar;": "⥯", - Eacute: "É", - eacute: "é", - "Ecirc;": "Ê", - "ecirc;": "ê", - "eDDot;": "⩷", - "efDot;": "≒", - Egrave: "È", - egrave: "è", - "Emacr;": "Ē", - "emacr;": "ē", - "empty;": "∅", - "Eogon;": "Ę", - "eogon;": "ę", - "eplus;": "⩱", - "epsiv;": "ϵ", - "eqsim;": "≂", - "Equal;": "⩵", - "equiv;": "≡", - "erarr;": "⥱", - "erDot;": "≓", - "esdot;": "≐", - "exist;": "∃", - "fflig;": "ff", - "filig;": "fi", - "fjlig;": "fj", - "fllig;": "fl", - "fltns;": "▱", - "forkv;": "⫙", - frac12: "½", - frac14: "¼", - frac34: "¾", - "frasl;": "⁄", - "frown;": "⌢", - "Gamma;": "Γ", - "gamma;": "γ", - "Gcirc;": "Ĝ", - "gcirc;": "ĝ", - "gescc;": "⪩", - "gimel;": "ℷ", - "gneqq;": "≩", - "gnsim;": "⋧", - "grave;": "`", - "gsime;": "⪎", - "gsiml;": "⪐", - "gtcir;": "⩺", - "gtdot;": "⋗", - "Hacek;": "ˇ", - "harrw;": "↭", - "Hcirc;": "Ĥ", - "hcirc;": "ĥ", - "hoarr;": "⇿", - Iacute: "Í", - iacute: "í", - "Icirc;": "Î", - "icirc;": "î", - "iexcl;": "¡", - Igrave: "Ì", - igrave: "ì", - "iiint;": "∭", - "iiota;": "℩", - "IJlig;": "IJ", - "ijlig;": "ij", - "Imacr;": "Ī", - "imacr;": "ī", - "image;": "ℑ", - "imath;": "ı", - "imped;": "Ƶ", - "infin;": "∞", - "Iogon;": "Į", - "iogon;": "į", - "iprod;": "⨼", - iquest: "¿", - "isinE;": "⋹", - "isins;": "⋴", - "isinv;": "∈", - "Iukcy;": "І", - "iukcy;": "і", - "Jcirc;": "Ĵ", - "jcirc;": "ĵ", - "jmath;": "ȷ", - "Jukcy;": "Є", - "jukcy;": "є", - "Kappa;": "Κ", - "kappa;": "κ", - "lAarr;": "⇚", - "langd;": "⦑", - "laquo;": "«", - "larrb;": "⇤", - "lates;": "⪭︀", - "lBarr;": "⤎", - "lbarr;": "⤌", - "lbbrk;": "❲", - "lbrke;": "⦋", - "lceil;": "⌈", - "ldquo;": "“", - "lescc;": "⪨", - "lhard;": "↽", - "lharu;": "↼", - "lhblk;": "▄", - "llarr;": "⇇", - "lltri;": "◺", - "lneqq;": "≨", - "lnsim;": "⋦", - "loang;": "⟬", - "loarr;": "⇽", - "lobrk;": "⟦", - "lopar;": "⦅", - "lrarr;": "⇆", - "lrhar;": "⇋", - "lrtri;": "⊿", - "lsime;": "⪍", - "lsimg;": "⪏", - "lsquo;": "‘", - "ltcir;": "⩹", - "ltdot;": "⋖", - "ltrie;": "⊴", - "ltrif;": "◂", - "mdash;": "—", - "mDDot;": "∺", - "micro;": "µ", - middot: "·", - "minus;": "−", - "mumap;": "⊸", - "nabla;": "∇", - "napid;": "≋̸", - "napos;": "ʼn", - "natur;": "♮", - "nbump;": "≎̸", - "ncong;": "≇", - "ndash;": "–", - "neArr;": "⇗", - "nearr;": "↗", - "nedot;": "≐̸", - "nesim;": "≂̸", - "ngeqq;": "≧̸", - "ngsim;": "≵", - "nhArr;": "⇎", - "nharr;": "↮", - "nhpar;": "⫲", - "nlArr;": "⇍", - "nlarr;": "↚", - "nleqq;": "≦̸", - "nless;": "≮", - "nlsim;": "≴", - "nltri;": "⋪", - "notin;": "∉", - "notni;": "∌", - "npart;": "∂̸", - "nprec;": "⊀", - "nrArr;": "⇏", - "nrarr;": "↛", - "nrtri;": "⋫", - "nsime;": "≄", - "nsmid;": "∤", - "nspar;": "∦", - "nsubE;": "⫅̸", - "nsube;": "⊈", - "nsucc;": "⊁", - "nsupE;": "⫆̸", - "nsupe;": "⊉", - Ntilde: "Ñ", - ntilde: "ñ", - "numsp;": " ", - "nvsim;": "∼⃒", - "nwArr;": "⇖", - "nwarr;": "↖", - Oacute: "Ó", - oacute: "ó", - "Ocirc;": "Ô", - "ocirc;": "ô", - "odash;": "⊝", - "OElig;": "Œ", - "oelig;": "œ", - "ofcir;": "⦿", - Ograve: "Ò", - ograve: "ò", - "ohbar;": "⦵", - "olarr;": "↺", - "olcir;": "⦾", - "oline;": "‾", - "Omacr;": "Ō", - "omacr;": "ō", - "Omega;": "Ω", - "omega;": "ω", - "operp;": "⦹", - "oplus;": "⊕", - "orarr;": "↻", - "order;": "ℴ", - Oslash: "Ø", - oslash: "ø", - Otilde: "Õ", - otilde: "õ", - "ovbar;": "⌽", - "parsl;": "⫽", - "phone;": "☎", - "plusb;": "⊞", - "pluse;": "⩲", - plusmn: "±", - "pound;": "£", - "prcue;": "≼", - "Prime;": "″", - "prime;": "′", - "prnap;": "⪹", - "prsim;": "≾", - "quest;": "?", - "rAarr;": "⇛", - "radic;": "√", - "rangd;": "⦒", - "range;": "⦥", - "raquo;": "»", - "rarrb;": "⇥", - "rarrc;": "⤳", - "rarrw;": "↝", - "ratio;": "∶", - "RBarr;": "⤐", - "rBarr;": "⤏", - "rbarr;": "⤍", - "rbbrk;": "❳", - "rbrke;": "⦌", - "rceil;": "⌉", - "rdquo;": "”", - "reals;": "ℝ", - "rhard;": "⇁", - "rharu;": "⇀", - "rlarr;": "⇄", - "rlhar;": "⇌", - "rnmid;": "⫮", - "roang;": "⟭", - "roarr;": "⇾", - "robrk;": "⟧", - "ropar;": "⦆", - "rrarr;": "⇉", - "rsquo;": "’", - "rtrie;": "⊵", - "rtrif;": "▸", - "sbquo;": "‚", - "sccue;": "≽", - "Scirc;": "Ŝ", - "scirc;": "ŝ", - "scnap;": "⪺", - "scsim;": "≿", - "sdotb;": "⊡", - "sdote;": "⩦", - "seArr;": "⇘", - "searr;": "↘", - "setmn;": "∖", - "sharp;": "♯", - "Sigma;": "Σ", - "sigma;": "σ", - "simeq;": "≃", - "simgE;": "⪠", - "simlE;": "⪟", - "simne;": "≆", - "slarr;": "←", - "smile;": "⌣", - "smtes;": "⪬︀", - "sqcap;": "⊓", - "sqcup;": "⊔", - "sqsub;": "⊏", - "sqsup;": "⊐", - "srarr;": "→", - "starf;": "★", - "strns;": "¯", - "subnE;": "⫋", - "subne;": "⊊", - "supnE;": "⫌", - "supne;": "⊋", - "swArr;": "⇙", - "swarr;": "↙", - "szlig;": "ß", - "Theta;": "Θ", - "theta;": "θ", - "thkap;": "≈", - "THORN;": "Þ", - "thorn;": "þ", - "Tilde;": "∼", - "tilde;": "˜", - "times;": "×", - "TRADE;": "™", - "trade;": "™", - "trisb;": "⧍", - "TSHcy;": "Ћ", - "tshcy;": "ћ", - "twixt;": "≬", - Uacute: "Ú", - uacute: "ú", - "Ubrcy;": "Ў", - "ubrcy;": "ў", - "Ucirc;": "Û", - "ucirc;": "û", - "udarr;": "⇅", - "udhar;": "⥮", - Ugrave: "Ù", - ugrave: "ù", - "uharl;": "↿", - "uharr;": "↾", - "uhblk;": "▀", - "ultri;": "◸", - "Umacr;": "Ū", - "umacr;": "ū", - "Union;": "⋃", - "Uogon;": "Ų", - "uogon;": "ų", - "uplus;": "⊎", - "upsih;": "ϒ", - "UpTee;": "⊥", - "Uring;": "Ů", - "uring;": "ů", - "urtri;": "◹", - "utdot;": "⋰", - "utrif;": "▴", - "uuarr;": "⇈", - "varpi;": "ϖ", - "vBarv;": "⫩", - "VDash;": "⊫", - "Vdash;": "⊩", - "vDash;": "⊨", - "vdash;": "⊢", - "veeeq;": "≚", - "vltri;": "⊲", - "vnsub;": "⊂⃒", - "vnsup;": "⊃⃒", - "vprop;": "∝", - "vrtri;": "⊳", - "Wcirc;": "Ŵ", - "wcirc;": "ŵ", - "Wedge;": "⋀", - "wedge;": "∧", - "xcirc;": "◯", - "xdtri;": "▽", - "xhArr;": "⟺", - "xharr;": "⟷", - "xlArr;": "⟸", - "xlarr;": "⟵", - "xodot;": "⨀", - "xrArr;": "⟹", - "xrarr;": "⟶", - "xutri;": "△", - Yacute: "Ý", - yacute: "ý", - "Ycirc;": "Ŷ", - "ycirc;": "ŷ", - "Aacute;": "Á", - "aacute;": "á", - "Abreve;": "Ă", - "abreve;": "ă", - "Agrave;": "À", - "agrave;": "à", - "andand;": "⩕", - "angmsd;": "∡", - "angsph;": "∢", - "apacir;": "⩯", - "approx;": "≈", - "Assign;": "≔", - "Atilde;": "Ã", - "atilde;": "ã", - "barvee;": "⊽", - "Barwed;": "⌆", - "barwed;": "⌅", - "becaus;": "∵", - "bernou;": "ℬ", - "bigcap;": "⋂", - "bigcup;": "⋃", - "bigvee;": "⋁", - "bkarow;": "⤍", - "bottom;": "⊥", - "bowtie;": "⋈", - "boxbox;": "⧉", - "bprime;": "‵", - "brvbar;": "¦", - "bullet;": "•", - "Bumpeq;": "≎", - "bumpeq;": "≏", - "Cacute;": "Ć", - "cacute;": "ć", - "capand;": "⩄", - "capcap;": "⩋", - "capcup;": "⩇", - "capdot;": "⩀", - "Ccaron;": "Č", - "ccaron;": "č", - "Ccedil;": "Ç", - "ccedil;": "ç", - "circeq;": "≗", - "cirmid;": "⫯", - "Colone;": "⩴", - "colone;": "≔", - "commat;": "@", - "compfn;": "∘", - "Conint;": "∯", - "conint;": "∮", - "coprod;": "∐", - "copysr;": "℗", - "cularr;": "↶", - "CupCap;": "≍", - "cupcap;": "⩆", - "cupcup;": "⩊", - "cupdot;": "⊍", - "curarr;": "↷", - "curren;": "¤", - "cylcty;": "⌭", - "Dagger;": "‡", - "dagger;": "†", - "daleth;": "ℸ", - "Dcaron;": "Ď", - "dcaron;": "ď", - "dfisht;": "⥿", - "divide;": "÷", - "divonx;": "⋇", - "dlcorn;": "⌞", - "dlcrop;": "⌍", - "dollar;": "$", - "DotDot;": "⃜", - "drcorn;": "⌟", - "drcrop;": "⌌", - "Dstrok;": "Đ", - "dstrok;": "đ", - "Eacute;": "É", - "eacute;": "é", - "easter;": "⩮", - "Ecaron;": "Ě", - "ecaron;": "ě", - "ecolon;": "≕", - "Egrave;": "È", - "egrave;": "è", - "egsdot;": "⪘", - "elsdot;": "⪗", - "emptyv;": "∅", - "emsp13;": " ", - "emsp14;": " ", - "eparsl;": "⧣", - "eqcirc;": "≖", - "equals;": "=", - "equest;": "≟", - "Exists;": "∃", - "female;": "♀", - "ffilig;": "ffi", - "ffllig;": "ffl", - "ForAll;": "∀", - "forall;": "∀", - "frac12;": "½", - "frac13;": "⅓", - "frac14;": "¼", - "frac15;": "⅕", - "frac16;": "⅙", - "frac18;": "⅛", - "frac23;": "⅔", - "frac25;": "⅖", - "frac34;": "¾", - "frac35;": "⅗", - "frac38;": "⅜", - "frac45;": "⅘", - "frac56;": "⅚", - "frac58;": "⅝", - "frac78;": "⅞", - "gacute;": "ǵ", - "Gammad;": "Ϝ", - "gammad;": "ϝ", - "Gbreve;": "Ğ", - "gbreve;": "ğ", - "Gcedil;": "Ģ", - "gesdot;": "⪀", - "gesles;": "⪔", - "gtlPar;": "⦕", - "gtrarr;": "⥸", - "gtrdot;": "⋗", - "gtrsim;": "≳", - "hairsp;": " ", - "hamilt;": "ℋ", - "HARDcy;": "Ъ", - "hardcy;": "ъ", - "hearts;": "♥", - "hellip;": "…", - "hercon;": "⊹", - "homtht;": "∻", - "horbar;": "―", - "hslash;": "ℏ", - "Hstrok;": "Ħ", - "hstrok;": "ħ", - "hybull;": "⁃", - "hyphen;": "‐", - "Iacute;": "Í", - "iacute;": "í", - "Igrave;": "Ì", - "igrave;": "ì", - "iiiint;": "⨌", - "iinfin;": "⧜", - "incare;": "℅", - "inodot;": "ı", - "intcal;": "⊺", - "iquest;": "¿", - "isinsv;": "⋳", - "Itilde;": "Ĩ", - "itilde;": "ĩ", - "Jsercy;": "Ј", - "jsercy;": "ј", - "kappav;": "ϰ", - "Kcedil;": "Ķ", - "kcedil;": "ķ", - "kgreen;": "ĸ", - "Lacute;": "Ĺ", - "lacute;": "ĺ", - "lagran;": "ℒ", - "Lambda;": "Λ", - "lambda;": "λ", - "langle;": "⟨", - "larrfs;": "⤝", - "larrhk;": "↩", - "larrlp;": "↫", - "larrpl;": "⤹", - "larrtl;": "↢", - "lAtail;": "⤛", - "latail;": "⤙", - "lbrace;": "{", - "lbrack;": "[", - "Lcaron;": "Ľ", - "lcaron;": "ľ", - "Lcedil;": "Ļ", - "lcedil;": "ļ", - "ldquor;": "„", - "lesdot;": "⩿", - "lesges;": "⪓", - "lfisht;": "⥼", - "lfloor;": "⌊", - "lharul;": "⥪", - "llhard;": "⥫", - "Lmidot;": "Ŀ", - "lmidot;": "ŀ", - "lmoust;": "⎰", - "loplus;": "⨭", - "lowast;": "∗", - "lowbar;": "_", - "lparlt;": "⦓", - "lrhard;": "⥭", - "lsaquo;": "‹", - "lsquor;": "‚", - "Lstrok;": "Ł", - "lstrok;": "ł", - "lthree;": "⋋", - "ltimes;": "⋉", - "ltlarr;": "⥶", - "ltrPar;": "⦖", - "mapsto;": "↦", - "marker;": "▮", - "mcomma;": "⨩", - "midast;": "*", - "midcir;": "⫰", - "middot;": "·", - "minusb;": "⊟", - "minusd;": "∸", - "mnplus;": "∓", - "models;": "⊧", - "mstpos;": "∾", - "Nacute;": "Ń", - "nacute;": "ń", - "nbumpe;": "≏̸", - "Ncaron;": "Ň", - "ncaron;": "ň", - "Ncedil;": "Ņ", - "ncedil;": "ņ", - "nearhk;": "⤤", - "nequiv;": "≢", - "nesear;": "⤨", - "nexist;": "∄", - "nltrie;": "⋬", - "notinE;": "⋹̸", - "nparsl;": "⫽⃥", - "nprcue;": "⋠", - "nrarrc;": "⤳̸", - "nrarrw;": "↝̸", - "nrtrie;": "⋭", - "nsccue;": "⋡", - "nsimeq;": "≄", - "Ntilde;": "Ñ", - "ntilde;": "ñ", - "numero;": "№", - "nVDash;": "⊯", - "nVdash;": "⊮", - "nvDash;": "⊭", - "nvdash;": "⊬", - "nvHarr;": "⤄", - "nvlArr;": "⤂", - "nvrArr;": "⤃", - "nwarhk;": "⤣", - "nwnear;": "⤧", - "Oacute;": "Ó", - "oacute;": "ó", - "Odblac;": "Ő", - "odblac;": "ő", - "odsold;": "⦼", - "Ograve;": "Ò", - "ograve;": "ò", - "ominus;": "⊖", - "origof;": "⊶", - "Oslash;": "Ø", - "oslash;": "ø", - "Otilde;": "Õ", - "otilde;": "õ", - "Otimes;": "⨷", - "otimes;": "⊗", - "parsim;": "⫳", - "percnt;": "%", - "period;": ".", - "permil;": "‰", - "phmmat;": "ℳ", - "planck;": "ℏ", - "plankv;": "ℏ", - "plusdo;": "∔", - "plusdu;": "⨥", - "plusmn;": "±", - "preceq;": "⪯", - "primes;": "ℙ", - "prnsim;": "⋨", - "propto;": "∝", - "prurel;": "⊰", - "puncsp;": " ", - "qprime;": "⁗", - "Racute;": "Ŕ", - "racute;": "ŕ", - "rangle;": "⟩", - "rarrap;": "⥵", - "rarrfs;": "⤞", - "rarrhk;": "↪", - "rarrlp;": "↬", - "rarrpl;": "⥅", - "Rarrtl;": "⤖", - "rarrtl;": "↣", - "rAtail;": "⤜", - "ratail;": "⤚", - "rbrace;": "}", - "rbrack;": "]", - "Rcaron;": "Ř", - "rcaron;": "ř", - "Rcedil;": "Ŗ", - "rcedil;": "ŗ", - "rdquor;": "”", - "rfisht;": "⥽", - "rfloor;": "⌋", - "rharul;": "⥬", - "rmoust;": "⎱", - "roplus;": "⨮", - "rpargt;": "⦔", - "rsaquo;": "›", - "rsquor;": "’", - "rthree;": "⋌", - "rtimes;": "⋊", - "Sacute;": "Ś", - "sacute;": "ś", - "Scaron;": "Š", - "scaron;": "š", - "Scedil;": "Ş", - "scedil;": "ş", - "scnsim;": "⋩", - "searhk;": "⤥", - "seswar;": "⤩", - "sfrown;": "⌢", - "SHCHcy;": "Щ", - "shchcy;": "щ", - "sigmaf;": "ς", - "sigmav;": "ς", - "simdot;": "⩪", - "smashp;": "⨳", - "SOFTcy;": "Ь", - "softcy;": "ь", - "solbar;": "⌿", - "spades;": "♠", - "sqcaps;": "⊓︀", - "sqcups;": "⊔︀", - "sqsube;": "⊑", - "sqsupe;": "⊒", - "Square;": "□", - "square;": "□", - "squarf;": "▪", - "ssetmn;": "∖", - "ssmile;": "⌣", - "sstarf;": "⋆", - "subdot;": "⪽", - "Subset;": "⋐", - "subset;": "⊂", - "subsim;": "⫇", - "subsub;": "⫕", - "subsup;": "⫓", - "succeq;": "⪰", - "supdot;": "⪾", - "Supset;": "⋑", - "supset;": "⊃", - "supsim;": "⫈", - "supsub;": "⫔", - "supsup;": "⫖", - "swarhk;": "⤦", - "swnwar;": "⤪", - "target;": "⌖", - "Tcaron;": "Ť", - "tcaron;": "ť", - "Tcedil;": "Ţ", - "tcedil;": "ţ", - "telrec;": "⌕", - "there4;": "∴", - "thetav;": "ϑ", - "thinsp;": " ", - "thksim;": "∼", - "timesb;": "⊠", - "timesd;": "⨰", - "topbot;": "⌶", - "topcir;": "⫱", - "tprime;": "‴", - "tridot;": "◬", - "Tstrok;": "Ŧ", - "tstrok;": "ŧ", - "Uacute;": "Ú", - "uacute;": "ú", - "Ubreve;": "Ŭ", - "ubreve;": "ŭ", - "Udblac;": "Ű", - "udblac;": "ű", - "ufisht;": "⥾", - "Ugrave;": "Ù", - "ugrave;": "ù", - "ulcorn;": "⌜", - "ulcrop;": "⌏", - "urcorn;": "⌝", - "urcrop;": "⌎", - "Utilde;": "Ũ", - "utilde;": "ũ", - "vangrt;": "⦜", - "varphi;": "ϕ", - "varrho;": "ϱ", - "Vdashl;": "⫦", - "veebar;": "⊻", - "vellip;": "⋮", - "Verbar;": "‖", - "verbar;": "|", - "vsubnE;": "⫋︀", - "vsubne;": "⊊︀", - "vsupnE;": "⫌︀", - "vsupne;": "⊋︀", - "Vvdash;": "⊪", - "wedbar;": "⩟", - "wedgeq;": "≙", - "weierp;": "℘", - "wreath;": "≀", - "xoplus;": "⨁", - "xotime;": "⨂", - "xsqcup;": "⨆", - "xuplus;": "⨄", - "xwedge;": "⋀", - "Yacute;": "Ý", - "yacute;": "ý", - "Zacute;": "Ź", - "zacute;": "ź", - "Zcaron;": "Ž", - "zcaron;": "ž", - "zeetrf;": "ℨ", - "alefsym;": "ℵ", - "angrtvb;": "⊾", - "angzarr;": "⍼", - "asympeq;": "≍", - "backsim;": "∽", - "Because;": "∵", - "because;": "∵", - "bemptyv;": "⦰", - "between;": "≬", - "bigcirc;": "◯", - "bigodot;": "⨀", - "bigstar;": "★", - "bnequiv;": "≡⃥", - "boxplus;": "⊞", - "Cayleys;": "ℭ", - "Cconint;": "∰", - "ccupssm;": "⩐", - "Cedilla;": "¸", - "cemptyv;": "⦲", - "cirscir;": "⧂", - "coloneq;": "≔", - "congdot;": "⩭", - "cudarrl;": "⤸", - "cudarrr;": "⤵", - "cularrp;": "⤽", - "curarrm;": "⤼", - "dbkarow;": "⤏", - "ddagger;": "‡", - "ddotseq;": "⩷", - "demptyv;": "⦱", - "Diamond;": "⋄", - "diamond;": "⋄", - "digamma;": "ϝ", - "dotplus;": "∔", - "DownTee;": "⊤", - "dwangle;": "⦦", - "Element;": "∈", - "Epsilon;": "Ε", - "epsilon;": "ε", - "eqcolon;": "≕", - "equivDD;": "⩸", - "gesdoto;": "⪂", - "gtquest;": "⩼", - "gtrless;": "≷", - "harrcir;": "⥈", - "Implies;": "⇒", - "intprod;": "⨼", - "isindot;": "⋵", - "larrbfs;": "⤟", - "larrsim;": "⥳", - "lbrksld;": "⦏", - "lbrkslu;": "⦍", - "ldrdhar;": "⥧", - "LeftTee;": "⊣", - "lesdoto;": "⪁", - "lessdot;": "⋖", - "lessgtr;": "≶", - "lesssim;": "≲", - "lotimes;": "⨴", - "lozenge;": "◊", - "ltquest;": "⩻", - "luruhar;": "⥦", - "maltese;": "✠", - "minusdu;": "⨪", - "napprox;": "≉", - "natural;": "♮", - "nearrow;": "↗", - "NewLine;": "\n", - "nexists;": "∄", - "NoBreak;": "⁠", - "notinva;": "∉", - "notinvb;": "⋷", - "notinvc;": "⋶", - "NotLess;": "≮", - "notniva;": "∌", - "notnivb;": "⋾", - "notnivc;": "⋽", - "npolint;": "⨔", - "npreceq;": "⪯̸", - "nsqsube;": "⋢", - "nsqsupe;": "⋣", - "nsubset;": "⊂⃒", - "nsucceq;": "⪰̸", - "nsupset;": "⊃⃒", - "nvinfin;": "⧞", - "nvltrie;": "⊴⃒", - "nvrtrie;": "⊵⃒", - "nwarrow;": "↖", - "olcross;": "⦻", - "Omicron;": "Ο", - "omicron;": "ο", - "orderof;": "ℴ", - "orslope;": "⩗", - "OverBar;": "‾", - "pertenk;": "‱", - "planckh;": "ℎ", - "pluscir;": "⨢", - "plussim;": "⨦", - "plustwo;": "⨧", - "precsim;": "≾", - "Product;": "∏", - "quatint;": "⨖", - "questeq;": "≟", - "rarrbfs;": "⤠", - "rarrsim;": "⥴", - "rbrksld;": "⦎", - "rbrkslu;": "⦐", - "rdldhar;": "⥩", - "realine;": "ℛ", - "rotimes;": "⨵", - "ruluhar;": "⥨", - "searrow;": "↘", - "simplus;": "⨤", - "simrarr;": "⥲", - "subedot;": "⫃", - "submult;": "⫁", - "subplus;": "⪿", - "subrarr;": "⥹", - "succsim;": "≿", - "supdsub;": "⫘", - "supedot;": "⫄", - "suphsol;": "⟉", - "suphsub;": "⫗", - "suplarr;": "⥻", - "supmult;": "⫂", - "supplus;": "⫀", - "swarrow;": "↙", - "topfork;": "⫚", - "triplus;": "⨹", - "tritime;": "⨻", - "UpArrow;": "↑", - "Uparrow;": "⇑", - "uparrow;": "↑", - "Upsilon;": "Υ", - "upsilon;": "υ", - "uwangle;": "⦧", - "vzigzag;": "⦚", - "zigrarr;": "⇝", - "andslope;": "⩘", - "angmsdaa;": "⦨", - "angmsdab;": "⦩", - "angmsdac;": "⦪", - "angmsdad;": "⦫", - "angmsdae;": "⦬", - "angmsdaf;": "⦭", - "angmsdag;": "⦮", - "angmsdah;": "⦯", - "angrtvbd;": "⦝", - "approxeq;": "≊", - "awconint;": "∳", - "backcong;": "≌", - "barwedge;": "⌅", - "bbrktbrk;": "⎶", - "bigoplus;": "⨁", - "bigsqcup;": "⨆", - "biguplus;": "⨄", - "bigwedge;": "⋀", - "boxminus;": "⊟", - "boxtimes;": "⊠", - "bsolhsub;": "⟈", - "capbrcup;": "⩉", - "circledR;": "®", - "circledS;": "Ⓢ", - "cirfnint;": "⨐", - "clubsuit;": "♣", - "cupbrcap;": "⩈", - "curlyvee;": "⋎", - "cwconint;": "∲", - "DDotrahd;": "⤑", - "doteqdot;": "≑", - "DotEqual;": "≐", - "dotminus;": "∸", - "drbkarow;": "⤐", - "dzigrarr;": "⟿", - "elinters;": "⏧", - "emptyset;": "∅", - "eqvparsl;": "⧥", - "fpartint;": "⨍", - "geqslant;": "⩾", - "gesdotol;": "⪄", - "gnapprox;": "⪊", - "hksearow;": "⤥", - "hkswarow;": "⤦", - "imagline;": "ℐ", - "imagpart;": "ℑ", - "infintie;": "⧝", - "integers;": "ℤ", - "Integral;": "∫", - "intercal;": "⊺", - "intlarhk;": "⨗", - "laemptyv;": "⦴", - "ldrushar;": "⥋", - "leqslant;": "⩽", - "lesdotor;": "⪃", - "LessLess;": "⪡", - "llcorner;": "⌞", - "lnapprox;": "⪉", - "lrcorner;": "⌟", - "lurdshar;": "⥊", - "mapstoup;": "↥", - "multimap;": "⊸", - "naturals;": "ℕ", - "ncongdot;": "⩭̸", - "NotEqual;": "≠", - "notindot;": "⋵̸", - "NotTilde;": "≁", - "otimesas;": "⨶", - "parallel;": "∥", - "PartialD;": "∂", - "plusacir;": "⨣", - "pointint;": "⨕", - "Precedes;": "≺", - "precneqq;": "⪵", - "precnsim;": "⋨", - "profalar;": "⌮", - "profline;": "⌒", - "profsurf;": "⌓", - "raemptyv;": "⦳", - "realpart;": "ℜ", - "RightTee;": "⊢", - "rppolint;": "⨒", - "rtriltri;": "⧎", - "scpolint;": "⨓", - "setminus;": "∖", - "shortmid;": "∣", - "smeparsl;": "⧤", - "sqsubset;": "⊏", - "sqsupset;": "⊐", - "subseteq;": "⊆", - "Succeeds;": "≻", - "succneqq;": "⪶", - "succnsim;": "⋩", - "SuchThat;": "∋", - "Superset;": "⊃", - "supseteq;": "⊇", - "thetasym;": "ϑ", - "thicksim;": "∼", - "timesbar;": "⨱", - "triangle;": "▵", - "triminus;": "⨺", - "trpezium;": "⏢", - "Uarrocir;": "⥉", - "ulcorner;": "⌜", - "UnderBar;": "_", - "urcorner;": "⌝", - "varkappa;": "ϰ", - "varsigma;": "ς", - "vartheta;": "ϑ", - "backprime;": "‵", - "backsimeq;": "⋍", - "Backslash;": "∖", - "bigotimes;": "⨂", - "CenterDot;": "·", - "centerdot;": "·", - "checkmark;": "✓", - "CircleDot;": "⊙", - "complexes;": "ℂ", - "Congruent;": "≡", - "Coproduct;": "∐", - "dotsquare;": "⊡", - "DoubleDot;": "¨", - "DownArrow;": "↓", - "Downarrow;": "⇓", - "downarrow;": "↓", - "DownBreve;": "̑", - "gtrapprox;": "⪆", - "gtreqless;": "⋛", - "gvertneqq;": "≩︀", - "heartsuit;": "♥", - "HumpEqual;": "≏", - "LeftArrow;": "←", - "Leftarrow;": "⇐", - "leftarrow;": "←", - "LeftFloor;": "⌊", - "lesseqgtr;": "⋚", - "LessTilde;": "≲", - "lvertneqq;": "≨︀", - "Mellintrf;": "ℳ", - "MinusPlus;": "∓", - "ngeqslant;": "⩾̸", - "nleqslant;": "⩽̸", - "NotCupCap;": "≭", - "NotExists;": "∄", - "NotSubset;": "⊂⃒", - "nparallel;": "∦", - "nshortmid;": "∤", - "nsubseteq;": "⊈", - "nsupseteq;": "⊉", - "OverBrace;": "⏞", - "pitchfork;": "⋔", - "PlusMinus;": "±", - "rationals;": "ℚ", - "spadesuit;": "♠", - "subseteqq;": "⫅", - "subsetneq;": "⊊", - "supseteqq;": "⫆", - "supsetneq;": "⊋", - "Therefore;": "∴", - "therefore;": "∴", - "ThinSpace;": " ", - "triangleq;": "≜", - "TripleDot;": "⃛", - "UnionPlus;": "⊎", - "varpropto;": "∝", - "Bernoullis;": "ℬ", - "circledast;": "⊛", - "CirclePlus;": "⊕", - "complement;": "∁", - "curlywedge;": "⋏", - "eqslantgtr;": "⪖", - "EqualTilde;": "≂", - "Fouriertrf;": "ℱ", - "gtreqqless;": "⪌", - "ImaginaryI;": "ⅈ", - "Laplacetrf;": "ℒ", - "LeftVector;": "↼", - "lessapprox;": "⪅", - "lesseqqgtr;": "⪋", - "Lleftarrow;": "⇚", - "lmoustache;": "⎰", - "longmapsto;": "⟼", - "mapstodown;": "↧", - "mapstoleft;": "↤", - "nLeftarrow;": "⇍", - "nleftarrow;": "↚", - "NotElement;": "∉", - "NotGreater;": "≯", - "nsubseteqq;": "⫅̸", - "nsupseteqq;": "⫆̸", - "precapprox;": "⪷", - "Proportion;": "∷", - "RightArrow;": "→", - "Rightarrow;": "⇒", - "rightarrow;": "→", - "RightFloor;": "⌋", - "rmoustache;": "⎱", - "sqsubseteq;": "⊑", - "sqsupseteq;": "⊒", - "subsetneqq;": "⫋", - "succapprox;": "⪸", - "supsetneqq;": "⫌", - "ThickSpace;": "  ", - "TildeEqual;": "≃", - "TildeTilde;": "≈", - "UnderBrace;": "⏟", - "UpArrowBar;": "⤒", - "UpTeeArrow;": "↥", - "upuparrows;": "⇈", - "varepsilon;": "ϵ", - "varnothing;": "∅", - "backepsilon;": "϶", - "blacksquare;": "▪", - "circledcirc;": "⊚", - "circleddash;": "⊝", - "CircleMinus;": "⊖", - "CircleTimes;": "⊗", - "curlyeqprec;": "⋞", - "curlyeqsucc;": "⋟", - "diamondsuit;": "♦", - "eqslantless;": "⪕", - "Equilibrium;": "⇌", - "expectation;": "ℰ", - "GreaterLess;": "≷", - "LeftCeiling;": "⌈", - "LessGreater;": "≶", - "MediumSpace;": " ", - "NotLessLess;": "≪̸", - "NotPrecedes;": "⊀", - "NotSucceeds;": "⊁", - "NotSuperset;": "⊃⃒", - "nRightarrow;": "⇏", - "nrightarrow;": "↛", - "OverBracket;": "⎴", - "preccurlyeq;": "≼", - "precnapprox;": "⪹", - "quaternions;": "ℍ", - "RightVector;": "⇀", - "Rrightarrow;": "⇛", - "RuleDelayed;": "⧴", - "SmallCircle;": "∘", - "SquareUnion;": "⊔", - "straightphi;": "ϕ", - "SubsetEqual;": "⊆", - "succcurlyeq;": "≽", - "succnapprox;": "⪺", - "thickapprox;": "≈", - "UpDownArrow;": "↕", - "Updownarrow;": "⇕", - "updownarrow;": "↕", - "VerticalBar;": "∣", - "blacklozenge;": "⧫", - "DownArrowBar;": "⤓", - "DownTeeArrow;": "↧", - "ExponentialE;": "ⅇ", - "exponentiale;": "ⅇ", - "GreaterEqual;": "≥", - "GreaterTilde;": "≳", - "HilbertSpace;": "ℋ", - "HumpDownHump;": "≎", - "Intersection;": "⋂", - "LeftArrowBar;": "⇤", - "LeftTeeArrow;": "↤", - "LeftTriangle;": "⊲", - "LeftUpVector;": "↿", - "NotCongruent;": "≢", - "NotHumpEqual;": "≏̸", - "NotLessEqual;": "≰", - "NotLessTilde;": "≴", - "Proportional;": "∝", - "RightCeiling;": "⌉", - "risingdotseq;": "≓", - "RoundImplies;": "⥰", - "ShortUpArrow;": "↑", - "SquareSubset;": "⊏", - "triangledown;": "▿", - "triangleleft;": "◃", - "UnderBracket;": "⎵", - "varsubsetneq;": "⊊︀", - "varsupsetneq;": "⊋︀", - "VerticalLine;": "|", - "ApplyFunction;": "⁡", - "bigtriangleup;": "△", - "blacktriangle;": "▴", - "DifferentialD;": "ⅆ", - "divideontimes;": "⋇", - "DoubleLeftTee;": "⫤", - "DoubleUpArrow;": "⇑", - "fallingdotseq;": "≒", - "hookleftarrow;": "↩", - "leftarrowtail;": "↢", - "leftharpoonup;": "↼", - "LeftTeeVector;": "⥚", - "LeftVectorBar;": "⥒", - "LessFullEqual;": "≦", - "LongLeftArrow;": "⟵", - "Longleftarrow;": "⟸", - "longleftarrow;": "⟵", - "looparrowleft;": "↫", - "measuredangle;": "∡", - "NotEqualTilde;": "≂̸", - "NotTildeEqual;": "≄", - "NotTildeTilde;": "≉", - "ntriangleleft;": "⋪", - "Poincareplane;": "ℌ", - "PrecedesEqual;": "⪯", - "PrecedesTilde;": "≾", - "RightArrowBar;": "⇥", - "RightTeeArrow;": "↦", - "RightTriangle;": "⊳", - "RightUpVector;": "↾", - "shortparallel;": "∥", - "smallsetminus;": "∖", - "SucceedsEqual;": "⪰", - "SucceedsTilde;": "≿", - "SupersetEqual;": "⊇", - "triangleright;": "▹", - "UpEquilibrium;": "⥮", - "upharpoonleft;": "↿", - "varsubsetneqq;": "⫋︀", - "varsupsetneqq;": "⫌︀", - "VerticalTilde;": "≀", - "VeryThinSpace;": " ", - "curvearrowleft;": "↶", - "DiacriticalDot;": "˙", - "doublebarwedge;": "⌆", - "DoubleRightTee;": "⊨", - "downdownarrows;": "⇊", - "DownLeftVector;": "↽", - "GreaterGreater;": "⪢", - "hookrightarrow;": "↪", - "HorizontalLine;": "─", - "InvisibleComma;": "⁣", - "InvisibleTimes;": "⁢", - "LeftDownVector;": "⇃", - "leftleftarrows;": "⇇", - "LeftRightArrow;": "↔", - "Leftrightarrow;": "⇔", - "leftrightarrow;": "↔", - "leftthreetimes;": "⋋", - "LessSlantEqual;": "⩽", - "LongRightArrow;": "⟶", - "Longrightarrow;": "⟹", - "longrightarrow;": "⟶", - "looparrowright;": "↬", - "LowerLeftArrow;": "↙", - "NestedLessLess;": "≪", - "NotGreaterLess;": "≹", - "NotLessGreater;": "≸", - "NotSubsetEqual;": "⊈", - "NotVerticalBar;": "∤", - "nshortparallel;": "∦", - "ntriangleright;": "⋫", - "OpenCurlyQuote;": "‘", - "ReverseElement;": "∋", - "rightarrowtail;": "↣", - "rightharpoonup;": "⇀", - "RightTeeVector;": "⥛", - "RightVectorBar;": "⥓", - "ShortDownArrow;": "↓", - "ShortLeftArrow;": "←", - "SquareSuperset;": "⊐", - "TildeFullEqual;": "≅", - "trianglelefteq;": "⊴", - "upharpoonright;": "↾", - "UpperLeftArrow;": "↖", - "ZeroWidthSpace;": "​", - "bigtriangledown;": "▽", - "circlearrowleft;": "↺", - "CloseCurlyQuote;": "’", - "ContourIntegral;": "∮", - "curvearrowright;": "↷", - "DoubleDownArrow;": "⇓", - "DoubleLeftArrow;": "⇐", - "downharpoonleft;": "⇃", - "DownRightVector;": "⇁", - "leftharpoondown;": "↽", - "leftrightarrows;": "⇆", - "LeftRightVector;": "⥎", - "LeftTriangleBar;": "⧏", - "LeftUpTeeVector;": "⥠", - "LeftUpVectorBar;": "⥘", - "LowerRightArrow;": "↘", - "nLeftrightarrow;": "⇎", - "nleftrightarrow;": "↮", - "NotGreaterEqual;": "≱", - "NotGreaterTilde;": "≵", - "NotHumpDownHump;": "≎̸", - "NotLeftTriangle;": "⋪", - "NotSquareSubset;": "⊏̸", - "ntrianglelefteq;": "⋬", - "OverParenthesis;": "⏜", - "RightDownVector;": "⇂", - "rightleftarrows;": "⇄", - "rightsquigarrow;": "↝", - "rightthreetimes;": "⋌", - "ShortRightArrow;": "→", - "straightepsilon;": "ϵ", - "trianglerighteq;": "⊵", - "UpperRightArrow;": "↗", - "vartriangleleft;": "⊲", - "circlearrowright;": "↻", - "DiacriticalAcute;": "´", - "DiacriticalGrave;": "`", - "DiacriticalTilde;": "˜", - "DoubleRightArrow;": "⇒", - "DownArrowUpArrow;": "⇵", - "downharpoonright;": "⇂", - "EmptySmallSquare;": "◻", - "GreaterEqualLess;": "⋛", - "GreaterFullEqual;": "≧", - "LeftAngleBracket;": "⟨", - "LeftUpDownVector;": "⥑", - "LessEqualGreater;": "⋚", - "NonBreakingSpace;": " ", - "NotPrecedesEqual;": "⪯̸", - "NotRightTriangle;": "⋫", - "NotSucceedsEqual;": "⪰̸", - "NotSucceedsTilde;": "≿̸", - "NotSupersetEqual;": "⊉", - "ntrianglerighteq;": "⋭", - "rightharpoondown;": "⇁", - "rightrightarrows;": "⇉", - "RightTriangleBar;": "⧐", - "RightUpTeeVector;": "⥜", - "RightUpVectorBar;": "⥔", - "twoheadleftarrow;": "↞", - "UnderParenthesis;": "⏝", - "UpArrowDownArrow;": "⇅", - "vartriangleright;": "⊳", - "blacktriangledown;": "▾", - "blacktriangleleft;": "◂", - "DoubleUpDownArrow;": "⇕", - "DoubleVerticalBar;": "∥", - "DownLeftTeeVector;": "⥞", - "DownLeftVectorBar;": "⥖", - "FilledSmallSquare;": "◼", - "GreaterSlantEqual;": "⩾", - "LeftDoubleBracket;": "⟦", - "LeftDownTeeVector;": "⥡", - "LeftDownVectorBar;": "⥙", - "leftrightharpoons;": "⇋", - "LeftTriangleEqual;": "⊴", - "NegativeThinSpace;": "​", - "NotGreaterGreater;": "≫̸", - "NotLessSlantEqual;": "⩽̸", - "NotNestedLessLess;": "⪡̸", - "NotReverseElement;": "∌", - "NotSquareSuperset;": "⊐̸", - "NotTildeFullEqual;": "≇", - "RightAngleBracket;": "⟩", - "rightleftharpoons;": "⇌", - "RightUpDownVector;": "⥏", - "SquareSubsetEqual;": "⊑", - "twoheadrightarrow;": "↠", - "VerticalSeparator;": "❘", - "blacktriangleright;": "▸", - "DownRightTeeVector;": "⥟", - "DownRightVectorBar;": "⥗", - "LongLeftRightArrow;": "⟷", - "Longleftrightarrow;": "⟺", - "longleftrightarrow;": "⟷", - "NegativeThickSpace;": "​", - "NotLeftTriangleBar;": "⧏̸", - "PrecedesSlantEqual;": "≼", - "ReverseEquilibrium;": "⇋", - "RightDoubleBracket;": "⟧", - "RightDownTeeVector;": "⥝", - "RightDownVectorBar;": "⥕", - "RightTriangleEqual;": "⊵", - "SquareIntersection;": "⊓", - "SucceedsSlantEqual;": "≽", - "DoubleLongLeftArrow;": "⟸", - "DownLeftRightVector;": "⥐", - "LeftArrowRightArrow;": "⇆", - "leftrightsquigarrow;": "↭", - "NegativeMediumSpace;": "​", - "NotGreaterFullEqual;": "≧̸", - "NotRightTriangleBar;": "⧐̸", - "RightArrowLeftArrow;": "⇄", - "SquareSupersetEqual;": "⊒", - "CapitalDifferentialD;": "ⅅ", - "DoubleLeftRightArrow;": "⇔", - "DoubleLongRightArrow;": "⟹", - "EmptyVerySmallSquare;": "▫", - "NestedGreaterGreater;": "≫", - "NotDoubleVerticalBar;": "∦", - "NotGreaterSlantEqual;": "⩾̸", - "NotLeftTriangleEqual;": "⋬", - "NotSquareSubsetEqual;": "⋢", - "OpenCurlyDoubleQuote;": "“", - "ReverseUpEquilibrium;": "⥯", - "CloseCurlyDoubleQuote;": "”", - "DoubleContourIntegral;": "∯", - "FilledVerySmallSquare;": "▪", - "NegativeVeryThinSpace;": "​", - "NotPrecedesSlantEqual;": "⋠", - "NotRightTriangleEqual;": "⋭", - "NotSucceedsSlantEqual;": "⋡", - "DiacriticalDoubleAcute;": "˝", - "NotSquareSupersetEqual;": "⋣", - "NotNestedGreaterGreater;": "⪢̸", - "ClockwiseContourIntegral;": "∲", - "DoubleLongLeftRightArrow;": "⟺", - "CounterClockwiseContourIntegral;": "∳" -}; - -// lazy compute this to make this file tree-shakable for browser -let maxCRNameLength; -const decodeHtml = (rawText, asAttr) => { - let offset = 0; - const end = rawText.length; - let decodedText = ''; - function advance(length) { - offset += length; - rawText = rawText.slice(length); - } - while (offset < end) { - const head = /&(?:#x?)?/i.exec(rawText); - if (!head || offset + head.index >= end) { - const remaining = end - offset; - decodedText += rawText.slice(0, remaining); - advance(remaining); - break; - } - // Advance to the "&". - decodedText += rawText.slice(0, head.index); - advance(head.index); - if (head[0] === '&') { - // Named character reference. - let name = ''; - let value = undefined; - if (/[0-9a-z]/i.test(rawText[1])) { - if (!maxCRNameLength) { - maxCRNameLength = Object.keys(namedCharacterReferences).reduce((max, name) => Math.max(max, name.length), 0); - } - for (let length = maxCRNameLength; !value && length > 0; --length) { - name = rawText.slice(1, 1 + length); - value = namedCharacterReferences[name]; - } - if (value) { - const semi = name.endsWith(';'); - if (asAttr && - !semi && - /[=a-z0-9]/i.test(rawText[name.length + 1] || '')) { - decodedText += '&' + name; - advance(1 + name.length); - } - else { - decodedText += value; - advance(1 + name.length); - } - } - else { - decodedText += '&' + name; - advance(1 + name.length); - } - } - else { - decodedText += '&'; - advance(1); - } - } - else { - // Numeric character reference. - const hex = head[0] === '&#x'; - const pattern = hex ? /^&#x([0-9a-f]+);?/i : /^&#([0-9]+);?/; - const body = pattern.exec(rawText); - if (!body) { - decodedText += head[0]; - advance(head[0].length); - } - else { - // https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state - let cp = Number.parseInt(body[1], hex ? 16 : 10); - if (cp === 0) { - cp = 0xfffd; - } - else if (cp > 0x10ffff) { - cp = 0xfffd; - } - else if (cp >= 0xd800 && cp <= 0xdfff) { - cp = 0xfffd; - } - else if ((cp >= 0xfdd0 && cp <= 0xfdef) || (cp & 0xfffe) === 0xfffe) ; - else if ((cp >= 0x01 && cp <= 0x08) || - cp === 0x0b || - (cp >= 0x0d && cp <= 0x1f) || - (cp >= 0x7f && cp <= 0x9f)) { - cp = CCR_REPLACEMENTS[cp] || cp; - } - decodedText += String.fromCodePoint(cp); - advance(body[0].length); - } - } - } - return decodedText; -}; -// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state -const CCR_REPLACEMENTS = { - 0x80: 0x20ac, - 0x82: 0x201a, - 0x83: 0x0192, - 0x84: 0x201e, - 0x85: 0x2026, - 0x86: 0x2020, - 0x87: 0x2021, - 0x88: 0x02c6, - 0x89: 0x2030, - 0x8a: 0x0160, - 0x8b: 0x2039, - 0x8c: 0x0152, - 0x8e: 0x017d, - 0x91: 0x2018, - 0x92: 0x2019, - 0x93: 0x201c, - 0x94: 0x201d, - 0x95: 0x2022, - 0x96: 0x2013, - 0x97: 0x2014, - 0x98: 0x02dc, - 0x99: 0x2122, - 0x9a: 0x0161, - 0x9b: 0x203a, - 0x9c: 0x0153, - 0x9e: 0x017e, - 0x9f: 0x0178 -}; - -const isRawTextContainer = /*#__PURE__*/ shared.makeMap('style,iframe,script,noscript', true); const parserOptions = { - isVoidTag: shared.isVoidTag, - isNativeTag: tag => shared.isHTMLTag(tag) || shared.isSVGTag(tag), - isPreTag: tag => tag === 'pre', - decodeEntities: decodeHtml, - isBuiltInComponent: (tag) => { - if (compilerCore.isBuiltInType(tag, `Transition`)) { - return TRANSITION; - } - else if (compilerCore.isBuiltInType(tag, `TransitionGroup`)) { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent) { - let ns = parent ? parent.ns : 0 /* HTML */; - if (parent && ns === 2 /* MATH_ML */) { - if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ && - a.name === 'encoding' && - a.value != null && - (a.value.content === 'text/html' || - a.value.content === 'application/xhtml+xml'))) { - ns = 0 /* HTML */; - } - } - else if (/^m(?:[ions]|text)$/.test(parent.tag) && - tag !== 'mglyph' && - tag !== 'malignmark') { - ns = 0 /* HTML */; - } - } - else if (parent && ns === 1 /* SVG */) { - if (parent.tag === 'foreignObject' || - parent.tag === 'desc' || - parent.tag === 'title') { - ns = 0 /* HTML */; - } - } - if (ns === 0 /* HTML */) { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (tag === 'math') { - return 2 /* MATH_ML */; - } - } - return ns; - }, - // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments - getTextMode({ tag, ns }) { - if (ns === 0 /* HTML */) { - if (tag === 'textarea' || tag === 'title') { - return 1 /* RCDATA */; - } - if (isRawTextContainer(tag)) { - return 2 /* RAWTEXT */; - } - } - return 0 /* DATA */; + parseMode: "html", + isVoidTag: shared.isVoidTag, + isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + decodeEntities: void 0, + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } }; -// Parse inline CSS strings for static style attributes into an object. -// This is a NodeTransform since it works on the static `style` attribute and -// converts it into a dynamic equivalent: -// style="color: red" -> :style='{ "color": "red" }' -// It is then processed by `transformElement` and included in the generated -// props. -const transformStyle = node => { - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((p, i) => { - if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) { - // replace p with an expression node - node.props[i] = { - type: 7 /* DIRECTIVE */, - name: `bind`, - arg: compilerCore.createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: compilerCore.createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } }; const parseInlineCSS = (cssText, loc) => { - const normalized = shared.parseStringStyle(cssText); - return compilerCore.createSimpleExpression(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */); + const normalized = shared.parseStringStyle(cssText); + return compilerCore.createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); }; function createDOMCompilerError(code, loc) { - return compilerCore.createCompilerError(code, loc, DOMErrorMessages ); + return compilerCore.createCompilerError( + code, + loc, + DOMErrorMessages + ); } +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; const DOMErrorMessages = { - [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`, - [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`, - [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`, - [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`, - [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`, - [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`, - [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`, - [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` }; const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - compilerCore.createObjectProperty(compilerCore.createSimpleExpression(`innerHTML`, true, loc), exp || compilerCore.createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + compilerCore.createObjectProperty( + compilerCore.createSimpleExpression(`innerHTML`, true, loc), + exp || compilerCore.createSimpleExpression("", true) + ) + ] + }; }; const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - compilerCore.createObjectProperty(compilerCore.createSimpleExpression(`textContent`, true), exp - ? compilerCore.getConstantType(exp, context) > 0 - ? exp - : compilerCore.createCallExpression(context.helperString(compilerCore.TO_DISPLAY_STRING), [exp], loc) - : compilerCore.createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + compilerCore.createObjectProperty( + compilerCore.createSimpleExpression(`textContent`, true), + exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression( + context.helperString(compilerCore.TO_DISPLAY_STRING), + [exp], + loc + ) : compilerCore.createSimpleExpression("", true) + ) + ] + }; }; const transformModel = (dir, node, context) => { - const baseResult = compilerCore.transformModel(dir, node, context); - // base transform has errors OR component v-model (only need props) - if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) { - return baseResult; - } - if (dir.arg) { - context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc)); - } - function checkDuplicatedValue() { - const value = compilerCore.findProp(node, 'value'); - if (value) { - context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === 'input' || - tag === 'textarea' || - tag === 'select' || - isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === 'input' || isCustomElement) { - const type = compilerCore.findProp(node, `type`); - if (type) { - if (type.type === 7 /* DIRECTIVE */) { - // :type="foo" - directiveToUse = V_MODEL_DYNAMIC; - } - else if (type.value) { - switch (type.value.content) { - case 'radio': - directiveToUse = V_MODEL_RADIO; - break; - case 'checkbox': - directiveToUse = V_MODEL_CHECKBOX; - break; - case 'file': - isInvalidType = true; - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - // text type - checkDuplicatedValue(); - break; - } - } - } - else if (compilerCore.hasDynamicKeyVBind(node)) { - // element has bindings with dynamic keys, which can possibly contain - // "type". - directiveToUse = V_MODEL_DYNAMIC; - } - else { - // text type - checkDuplicatedValue(); - } - } - else if (tag === 'select') { - directiveToUse = V_MODEL_SELECT; - } - else { - // textarea - checkDuplicatedValue(); - } - // inject runtime directive - // by returning the helper symbol via needRuntime - // the import will replaced a resolveDirective call. - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - // native vmodel doesn't need the `modelValue` props since they are also - // passed to the runtime as `binding.value`. removing it reduces code size. - baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === 'modelValue')); + const baseResult = compilerCore.transformModel(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = compilerCore.findDir(node, "bind"); + if (value && compilerCore.isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = compilerCore.findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (compilerCore.hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; }; -const isEventOptionModifier = /*#__PURE__*/ shared.makeMap(`passive,once,capture`); -const isNonKeyModifier = /*#__PURE__*/ shared.makeMap( -// event propagation management -`stop,prevent,self,` + - // system modifiers + exact - `ctrl,shift,alt,meta,exact,` + - // mouse - `middle`); -// left & right could be mouse or key modifiers based on event type -const maybeKeyModifier = /*#__PURE__*/ shared.makeMap('left,right'); -const isKeyboardEvent = /*#__PURE__*/ shared.makeMap(`onkeyup,onkeydown,onkeypress`, true); +const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ shared.makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ shared.makeMap( + `onkeyup,onkeydown,onkeypress`, + true +); const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i]; - if (modifier === 'native' && - compilerCore.checkCompatEnabled("COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */, context, loc)) { - eventOptionModifiers.push(modifier); + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + if (modifier === "native" && compilerCore.checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (compilerCore.isStaticExp(key)) { + if (isKeyboardEvent(key.content)) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); } - else if (isEventOptionModifier(modifier)) { - // eventOptionModifiers: modifiers for addEventListener() options, - // e.g. .passive & .capture - eventOptionModifiers.push(modifier); - } - else { - // runtimeModifiers: modifiers that needs runtime guards - if (maybeKeyModifier(modifier)) { - if (compilerCore.isStaticExp(key)) { - if (isKeyboardEvent(key.content)) { - keyModifiers.push(modifier); - } - else { - nonKeyModifiers.push(modifier); - } - } - else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } - else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } - else { - keyModifiers.push(modifier); - } - } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); } + } } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; }; const transformClick = (key, event) => { - const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === 'onclick'; - return isStaticClick - ? compilerCore.createSimpleExpression(event, true) - : key.type !== 4 /* SIMPLE_EXPRESSION */ - ? compilerCore.createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) - : key; + const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; }; const transformOn = (dir, node, context) => { - return compilerCore.transformOn(dir, node, context, baseResult => { - const { modifiers } = dir; - if (!modifiers.length) - return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - // normalize click.right and click.middle since they don't actually fire - if (nonKeyModifiers.includes('right')) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes('middle')) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && - // if event name is dynamic, always wrap with keys guard - (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content))) { - handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(''); - key = compilerCore.isStaticExp(key) - ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) - : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [compilerCore.createObjectProperty(key, handlerExp)] - }; - }); + return compilerCore.transformOn(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) + return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content))) { + handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(""); + key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [compilerCore.createObjectProperty(key, handlerExp)] + }; + }); }; const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc)); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; }; const transformTransition = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - // warn multiple transition children - if (hasMultipleChildren(node)) { - context.onError(createDOMCompilerError(59 /* X_TRANSITION_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - // check if it's s single child w/ v-show - // if yes, inject "persisted: true" to the transition props - const child = node.children[0]; - if (child.type === 1 /* ELEMENT */) { - for (const p of child.props) { - if (p.type === 7 /* DIRECTIVE */ && p.name === 'show') { - node.props.push({ - type: 6 /* ATTRIBUTE */, - name: 'persisted', - value: undefined, - loc: node.loc - }); - } - } - } - }; + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; } + } }; function hasMultipleChildren(node) { - // #1352 filter out potential comment nodes. - const children = (node.children = node.children.filter(c => c.type !== 3 /* COMMENT */ && - !(c.type === 2 /* TEXT */ && !c.content.trim()))); - const child = children[0]; - return (children.length !== 1 || - child.type === 11 /* FOR */ || - (child.type === 9 /* IF */ && child.branches.some(hasMultipleChildren))); + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); } -/** - * This module is Node-only. - */ -/** - * Regex for replacing placeholders for embedded constant variables - * (e.g. import URL string constants generated by compiler-sfc) - */ const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; -/** - * Turn eligible hoisted static trees into stringified static nodes, e.g. - * - * ```js - * const _hoisted_1 = createStaticVNode(`<div class="foo">bar</div>`) - * ``` - * - * A single static vnode can contain stringified content for **multiple** - * consecutive nodes (element and plain text), called a "chunk". - * `@vue/runtime-dom` will create the content via innerHTML in a hidden - * container element and insert all the nodes in place. The call must also - * provide the number of nodes contained in the chunk so that during hydration - * we can know how many nodes the static vnode should adopt. - * - * The optimization scans a children list that contains hoisted nodes, and - * tries to find the largest chunk of consecutive hoisted nodes before running - * into a non-hoisted node or the end of the list. A chunk is then converted - * into a single static vnode and replaces the hoisted expression of the first - * node in the chunk. Other nodes in the chunk are considered "merged" and - * therefore removed from both the hoist list and the children array. - * - * This optimization is only performed in Node.js. - */ const stringifyStatic = (children, context, parent) => { - // bail stringification for slot content - if (context.scopes.vSlot > 0) { - return; - } - let nc = 0; // current node count - let ec = 0; // current element with binding count - const currentChunk = []; - const stringifyCurrentChunk = (currentIndex) => { - if (nc >= 20 /* NODE_COUNT */ || - ec >= 5 /* ELEMENT_WITH_BINDING_COUNT */) { - // combine all currently eligible nodes into a single static vnode call - const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [ - JSON.stringify(currentChunk.map(node => stringifyNode(node, context)).join('')).replace(expReplaceRE, `" + $1 + "`), - // the 2nd argument indicates the number of DOM nodes this static vnode - // will insert / hydrate - String(currentChunk.length) - ]); - // replace the first node's hoisted expression with the static vnode call - replaceHoist(currentChunk[0], staticCall, context); - if (currentChunk.length > 1) { - for (let i = 1; i < currentChunk.length; i++) { - // for the merged nodes, set their hoisted expression to null - replaceHoist(currentChunk[i], null, context); - } - // also remove merged nodes from children - const deleteCount = currentChunk.length - 1; - children.splice(currentIndex - currentChunk.length + 1, deleteCount); - return deleteCount; - } + if (context.scopes.vSlot > 0) { + return; + } + let nc = 0; + let ec = 0; + const currentChunk = []; + const stringifyCurrentChunk = (currentIndex) => { + if (nc >= 20 || ec >= 5) { + const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [ + JSON.stringify( + currentChunk.map((node) => stringifyNode(node, context)).join("") + ).replace(expReplaceRE, `" + $1 + "`), + // the 2nd argument indicates the number of DOM nodes this static vnode + // will insert / hydrate + String(currentChunk.length) + ]); + replaceHoist(currentChunk[0], staticCall, context); + if (currentChunk.length > 1) { + for (let i2 = 1; i2 < currentChunk.length; i2++) { + replaceHoist(currentChunk[i2], null, context); } - return 0; - }; - let i = 0; - for (; i < children.length; i++) { - const child = children[i]; - const hoisted = getHoistedNode(child); - if (hoisted) { - // presence of hoisted means child must be a stringifiable node - const node = child; - const result = analyzeNode(node); - if (result) { - // node is stringifiable, record state - nc += result[0]; - ec += result[1]; - currentChunk.push(node); - continue; - } - } - // we only reach here if we ran into a node that is not stringifiable - // check if currently analyzed nodes meet criteria for stringification. - // adjust iteration index - i -= stringifyCurrentChunk(i); - // reset state - nc = 0; - ec = 0; - currentChunk.length = 0; + const deleteCount = currentChunk.length - 1; + children.splice(currentIndex - currentChunk.length + 1, deleteCount); + return deleteCount; + } } - // in case the last node was also stringifiable - stringifyCurrentChunk(i); + return 0; + }; + let i = 0; + for (; i < children.length; i++) { + const child = children[i]; + const hoisted = getHoistedNode(child); + if (hoisted) { + const node = child; + const result = analyzeNode(node); + if (result) { + nc += result[0]; + ec += result[1]; + currentChunk.push(node); + continue; + } + } + i -= stringifyCurrentChunk(i); + nc = 0; + ec = 0; + currentChunk.length = 0; + } + stringifyCurrentChunk(i); }; -const getHoistedNode = (node) => ((node.type === 1 /* ELEMENT */ && node.tagType === 0 /* ELEMENT */) || - node.type == 12 /* TEXT_CALL */) && - node.codegenNode && - node.codegenNode.type === 4 /* SIMPLE_EXPRESSION */ && - node.codegenNode.hoisted; +const getHoistedNode = (node) => (node.type === 1 && node.tagType === 0 || node.type == 12) && node.codegenNode && node.codegenNode.type === 4 && node.codegenNode.hoisted; const dataAriaRE = /^(data|aria)-/; const isStringifiableAttr = (name, ns) => { - return ((ns === 0 /* HTML */ - ? shared.isKnownHtmlAttr(name) - : ns === 1 /* SVG */ - ? shared.isKnownSvgAttr(name) - : false) || dataAriaRE.test(name)); + return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : false) || dataAriaRE.test(name); }; const replaceHoist = (node, replacement, context) => { - const hoistToReplace = node.codegenNode.hoisted; - context.hoists[context.hoists.indexOf(hoistToReplace)] = replacement; + const hoistToReplace = node.codegenNode.hoisted; + context.hoists[context.hoists.indexOf(hoistToReplace)] = replacement; }; -const isNonStringifiable = /*#__PURE__*/ shared.makeMap(`caption,thead,tr,th,tbody,td,tfoot,colgroup,col`); -/** - * for a hoisted node, analyze it and return: - * - false: bailed (contains non-stringifiable props or runtime constant) - * - [nc, ec] where - * - nc is the number of nodes inside - * - ec is the number of element with bindings inside - */ +const isNonStringifiable = /* @__PURE__ */ shared.makeMap( + `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` +); function analyzeNode(node) { - if (node.type === 1 /* ELEMENT */ && isNonStringifiable(node.tag)) { - return false; - } - if (node.type === 12 /* TEXT_CALL */) { - return [1, 0]; - } - let nc = 1; // node count - let ec = node.props.length > 0 ? 1 : 0; // element w/ binding count - let bailed = false; - const bail = () => { - bailed = true; - return false; - }; - // TODO: check for cases where using innerHTML will result in different - // output compared to imperative node insertions. - // probably only need to check for most common case - // i.e. non-phrasing-content tags inside `<p>` - function walk(node) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - // bail on non-attr bindings - if (p.type === 6 /* ATTRIBUTE */ && - !isStringifiableAttr(p.name, node.ns)) { - return bail(); - } - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind') { - // bail on non-attr bindings - if (p.arg && - (p.arg.type === 8 /* COMPOUND_EXPRESSION */ || - (p.arg.isStatic && !isStringifiableAttr(p.arg.content, node.ns)))) { - return bail(); - } - if (p.exp && - (p.exp.type === 8 /* COMPOUND_EXPRESSION */ || - p.exp.constType < 3 /* CAN_STRINGIFY */)) { - return bail(); - } - } + if (node.type === 1 && isNonStringifiable(node.tag)) { + return false; + } + if (node.type === 12) { + return [1, 0]; + } + let nc = 1; + let ec = node.props.length > 0 ? 1 : 0; + let bailed = false; + const bail = () => { + bailed = true; + return false; + }; + function walk(node2) { + for (let i = 0; i < node2.props.length; i++) { + const p = node2.props[i]; + if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { + return bail(); + } + if (p.type === 7 && p.name === "bind") { + if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { + return bail(); } - for (let i = 0; i < node.children.length; i++) { - nc++; - const child = node.children[i]; - if (child.type === 1 /* ELEMENT */) { - if (child.props.length > 0) { - ec++; - } - walk(child); - if (bailed) { - return false; - } - } + if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { + return bail(); } - return true; + } } - return walk(node) ? [nc, ec] : false; + for (let i = 0; i < node2.children.length; i++) { + nc++; + const child = node2.children[i]; + if (child.type === 1) { + if (child.props.length > 0) { + ec++; + } + walk(child); + if (bailed) { + return false; + } + } + } + return true; + } + return walk(node) ? [nc, ec] : false; } function stringifyNode(node, context) { - if (shared.isString(node)) { - return node; - } - if (shared.isSymbol(node)) { - return ``; - } - switch (node.type) { - case 1 /* ELEMENT */: - return stringifyElement(node, context); - case 2 /* TEXT */: - return shared.escapeHtml(node.content); - case 3 /* COMMENT */: - return `<!--${shared.escapeHtml(node.content)}-->`; - case 5 /* INTERPOLATION */: - return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content))); - case 8 /* COMPOUND_EXPRESSION */: - return shared.escapeHtml(evaluateConstant(node)); - case 12 /* TEXT_CALL */: - return stringifyNode(node.content, context); - default: - // static trees will not contain if/for nodes - return ''; - } + if (shared.isString(node)) { + return node; + } + if (shared.isSymbol(node)) { + return ``; + } + switch (node.type) { + case 1: + return stringifyElement(node, context); + case 2: + return shared.escapeHtml(node.content); + case 3: + return `<!--${shared.escapeHtml(node.content)}-->`; + case 5: + return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content))); + case 8: + return shared.escapeHtml(evaluateConstant(node)); + case 12: + return stringifyNode(node.content, context); + default: + return ""; + } } function stringifyElement(node, context) { - let res = `<${node.tag}`; - let innerHTML = ''; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - res += ` ${p.name}`; - if (p.value) { - res += `="${shared.escapeHtml(p.value.content)}"`; - } + let res = `<${node.tag}`; + let innerHTML = ""; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + res += ` ${p.name}`; + if (p.value) { + res += `="${shared.escapeHtml(p.value.content)}"`; + } + } else if (p.type === 7) { + if (p.name === "bind") { + const exp = p.exp; + if (exp.content[0] === "_") { + res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; + continue; } - else if (p.type === 7 /* DIRECTIVE */) { - if (p.name === 'bind') { - const exp = p.exp; - if (exp.content[0] === '_') { - // internally generated string constant references - // e.g. imported URL strings via compiler-sfc transformAssetUrl plugin - res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; - continue; - } - // constant v-bind, e.g. :foo="1" - let evaluated = evaluateConstant(exp); - if (evaluated != null) { - const arg = p.arg && p.arg.content; - if (arg === 'class') { - evaluated = shared.normalizeClass(evaluated); - } - else if (arg === 'style') { - evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated)); - } - res += ` ${p.arg.content}="${shared.escapeHtml(evaluated)}"`; - } - } - else if (p.name === 'html') { - // #5439 v-html with constant value - // not sure why would anyone do this but it can happen - innerHTML = evaluateConstant(p.exp); - } - else if (p.name === 'text') { - innerHTML = shared.escapeHtml(shared.toDisplayString(evaluateConstant(p.exp))); - } + if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") { + continue; } - } - if (context.scopeId) { - res += ` ${context.scopeId}`; - } - res += `>`; - if (innerHTML) { - res += innerHTML; - } - else { - for (let i = 0; i < node.children.length; i++) { - res += stringifyNode(node.children[i], context); + let evaluated = evaluateConstant(exp); + if (evaluated != null) { + const arg = p.arg && p.arg.content; + if (arg === "class") { + evaluated = shared.normalizeClass(evaluated); + } else if (arg === "style") { + evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated)); + } + res += ` ${p.arg.content}="${shared.escapeHtml( + evaluated + )}"`; } + } else if (p.name === "html") { + innerHTML = evaluateConstant(p.exp); + } else if (p.name === "text") { + innerHTML = shared.escapeHtml( + shared.toDisplayString(evaluateConstant(p.exp)) + ); + } } - if (!shared.isVoidTag(node.tag)) { - res += `</${node.tag}>`; + } + if (context.scopeId) { + res += ` ${context.scopeId}`; + } + res += `>`; + if (innerHTML) { + res += innerHTML; + } else { + for (let i = 0; i < node.children.length; i++) { + res += stringifyNode(node.children[i], context); } - return res; + } + if (!shared.isVoidTag(node.tag)) { + res += `</${node.tag}>`; + } + return res; } -// __UNSAFE__ -// Reason: eval. -// It's technically safe to eval because only constant expressions are possible -// here, e.g. `{{ 1 }}` or `{{ 'foo' }}` -// in addition, constant exps bail on presence of parens so you can't even -// run JSFuck in here. But we mark it unsafe for security review purposes. -// (see compiler-core/src/transforms/transformExpression) function evaluateConstant(exp) { - if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - return new Function(`return ${exp.content}`)(); - } - else { - // compound - let res = ``; - exp.children.forEach(c => { - if (shared.isString(c) || shared.isSymbol(c)) { - return; - } - if (c.type === 2 /* TEXT */) { - res += c.content; - } - else if (c.type === 5 /* INTERPOLATION */) { - res += shared.toDisplayString(evaluateConstant(c.content)); - } - else { - res += evaluateConstant(c); - } - }); - return res; - } + if (exp.type === 4) { + return new Function(`return (${exp.content})`)(); + } else { + let res = ``; + exp.children.forEach((c) => { + if (shared.isString(c) || shared.isSymbol(c)) { + return; + } + if (c.type === 2) { + res += c.content; + } else if (c.type === 5) { + res += shared.toDisplayString(evaluateConstant(c.content)); + } else { + res += evaluateConstant(c); + } + }); + return res; + } } const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - (node.tag === 'script' || node.tag === 'style')) { - context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc)); - context.removeNode(); - } + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } }; const DOMNodeTransforms = [ - transformStyle, - ...([transformTransition] ) + transformStyle, + ...[transformTransition] ]; const DOMDirectiveTransforms = { - cloak: compilerCore.noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - on: transformOn, - show: transformShow + cloak: compilerCore.noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow }; -function compile(template, options = {}) { - return compilerCore.baseCompile(template, shared.extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...(options.nodeTransforms || []) - ], - directiveTransforms: shared.extend({}, DOMDirectiveTransforms, options.directiveTransforms || {}), - transformHoist: stringifyStatic - })); +function compile(src, options = {}) { + return compilerCore.baseCompile( + src, + shared.extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: shared.extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: stringifyStatic + }) + ); } function parse(template, options = {}) { - return compilerCore.baseParse(template, shared.extend({}, parserOptions, options)); + return compilerCore.baseParse(template, shared.extend({}, parserOptions, options)); } -Object.keys(compilerCore).forEach(function (k) { - if (k !== 'default') exports[k] = compilerCore[k]; -}); exports.DOMDirectiveTransforms = DOMDirectiveTransforms; +exports.DOMErrorCodes = DOMErrorCodes; +exports.DOMErrorMessages = DOMErrorMessages; exports.DOMNodeTransforms = DOMNodeTransforms; exports.TRANSITION = TRANSITION; exports.TRANSITION_GROUP = TRANSITION_GROUP; @@ -3134,3 +722,6 @@ exports.createDOMCompilerError = createDOMCompilerError; exports.parse = parse; exports.parserOptions = parserOptions; exports.transformStyle = transformStyle; +Object.keys(compilerCore).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k]; +}); diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js index 4361101a..7ef720c2 100644 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +++ b/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js @@ -1,3 +1,8 @@ +/** +* @vue/compiler-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -16,3046 +21,621 @@ const V_SHOW = Symbol(``); const TRANSITION = Symbol(``); const TRANSITION_GROUP = Symbol(``); compilerCore.registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` }); -var namedCharacterReferences = { - GT: ">", - gt: ">", - LT: "<", - lt: "<", - "ac;": "∾", - "af;": "⁡", - AMP: "&", - amp: "&", - "ap;": "≈", - "DD;": "ⅅ", - "dd;": "ⅆ", - deg: "°", - "ee;": "ⅇ", - "eg;": "⪚", - "el;": "⪙", - ETH: "Ð", - eth: "ð", - "gE;": "≧", - "ge;": "≥", - "Gg;": "⋙", - "gg;": "≫", - "gl;": "≷", - "GT;": ">", - "Gt;": "≫", - "gt;": ">", - "ic;": "⁣", - "ii;": "ⅈ", - "Im;": "ℑ", - "in;": "∈", - "it;": "⁢", - "lE;": "≦", - "le;": "≤", - "lg;": "≶", - "Ll;": "⋘", - "ll;": "≪", - "LT;": "<", - "Lt;": "≪", - "lt;": "<", - "mp;": "∓", - "Mu;": "Μ", - "mu;": "μ", - "ne;": "≠", - "ni;": "∋", - not: "¬", - "Nu;": "Ν", - "nu;": "ν", - "Or;": "⩔", - "or;": "∨", - "oS;": "Ⓢ", - "Pi;": "Π", - "pi;": "π", - "pm;": "±", - "Pr;": "⪻", - "pr;": "≺", - "Re;": "ℜ", - REG: "®", - reg: "®", - "rx;": "℞", - "Sc;": "⪼", - "sc;": "≻", - shy: "­", - uml: "¨", - "wp;": "℘", - "wr;": "≀", - "Xi;": "Ξ", - "xi;": "ξ", - yen: "¥", - "acd;": "∿", - "acE;": "∾̳", - "Acy;": "А", - "acy;": "а", - "Afr;": "𝔄", - "afr;": "𝔞", - "AMP;": "&", - "amp;": "&", - "And;": "⩓", - "and;": "∧", - "ang;": "∠", - "apE;": "⩰", - "ape;": "≊", - "ast;": "*", - Auml: "Ä", - auml: "ä", - "Bcy;": "Б", - "bcy;": "б", - "Bfr;": "𝔅", - "bfr;": "𝔟", - "bne;": "=⃥", - "bot;": "⊥", - "Cap;": "⋒", - "cap;": "∩", - cent: "¢", - "Cfr;": "ℭ", - "cfr;": "𝔠", - "Chi;": "Χ", - "chi;": "χ", - "cir;": "○", - COPY: "©", - copy: "©", - "Cup;": "⋓", - "cup;": "∪", - "Dcy;": "Д", - "dcy;": "д", - "deg;": "°", - "Del;": "∇", - "Dfr;": "𝔇", - "dfr;": "𝔡", - "die;": "¨", - "div;": "÷", - "Dot;": "¨", - "dot;": "˙", - "Ecy;": "Э", - "ecy;": "э", - "Efr;": "𝔈", - "efr;": "𝔢", - "egs;": "⪖", - "ell;": "ℓ", - "els;": "⪕", - "ENG;": "Ŋ", - "eng;": "ŋ", - "Eta;": "Η", - "eta;": "η", - "ETH;": "Ð", - "eth;": "ð", - Euml: "Ë", - euml: "ë", - "Fcy;": "Ф", - "fcy;": "ф", - "Ffr;": "𝔉", - "ffr;": "𝔣", - "gap;": "⪆", - "Gcy;": "Г", - "gcy;": "г", - "gEl;": "⪌", - "gel;": "⋛", - "geq;": "≥", - "ges;": "⩾", - "Gfr;": "𝔊", - "gfr;": "𝔤", - "ggg;": "⋙", - "gla;": "⪥", - "glE;": "⪒", - "glj;": "⪤", - "gnE;": "≩", - "gne;": "⪈", - "Hat;": "^", - "Hfr;": "ℌ", - "hfr;": "𝔥", - "Icy;": "И", - "icy;": "и", - "iff;": "⇔", - "Ifr;": "ℑ", - "ifr;": "𝔦", - "Int;": "∬", - "int;": "∫", - Iuml: "Ï", - iuml: "ï", - "Jcy;": "Й", - "jcy;": "й", - "Jfr;": "𝔍", - "jfr;": "𝔧", - "Kcy;": "К", - "kcy;": "к", - "Kfr;": "𝔎", - "kfr;": "𝔨", - "lap;": "⪅", - "lat;": "⪫", - "Lcy;": "Л", - "lcy;": "л", - "lEg;": "⪋", - "leg;": "⋚", - "leq;": "≤", - "les;": "⩽", - "Lfr;": "𝔏", - "lfr;": "𝔩", - "lgE;": "⪑", - "lnE;": "≨", - "lne;": "⪇", - "loz;": "◊", - "lrm;": "‎", - "Lsh;": "↰", - "lsh;": "↰", - macr: "¯", - "Map;": "⤅", - "map;": "↦", - "Mcy;": "М", - "mcy;": "м", - "Mfr;": "𝔐", - "mfr;": "𝔪", - "mho;": "℧", - "mid;": "∣", - "nap;": "≉", - nbsp: " ", - "Ncy;": "Н", - "ncy;": "н", - "Nfr;": "𝔑", - "nfr;": "𝔫", - "ngE;": "≧̸", - "nge;": "≱", - "nGg;": "⋙̸", - "nGt;": "≫⃒", - "ngt;": "≯", - "nis;": "⋼", - "niv;": "∋", - "nlE;": "≦̸", - "nle;": "≰", - "nLl;": "⋘̸", - "nLt;": "≪⃒", - "nlt;": "≮", - "Not;": "⫬", - "not;": "¬", - "npr;": "⊀", - "nsc;": "⊁", - "num;": "#", - "Ocy;": "О", - "ocy;": "о", - "Ofr;": "𝔒", - "ofr;": "𝔬", - "ogt;": "⧁", - "ohm;": "Ω", - "olt;": "⧀", - "ord;": "⩝", - ordf: "ª", - ordm: "º", - "orv;": "⩛", - Ouml: "Ö", - ouml: "ö", - "par;": "∥", - para: "¶", - "Pcy;": "П", - "pcy;": "п", - "Pfr;": "𝔓", - "pfr;": "𝔭", - "Phi;": "Φ", - "phi;": "φ", - "piv;": "ϖ", - "prE;": "⪳", - "pre;": "⪯", - "Psi;": "Ψ", - "psi;": "ψ", - "Qfr;": "𝔔", - "qfr;": "𝔮", - QUOT: "\"", - quot: "\"", - "Rcy;": "Р", - "rcy;": "р", - "REG;": "®", - "reg;": "®", - "Rfr;": "ℜ", - "rfr;": "𝔯", - "Rho;": "Ρ", - "rho;": "ρ", - "rlm;": "‏", - "Rsh;": "↱", - "rsh;": "↱", - "scE;": "⪴", - "sce;": "⪰", - "Scy;": "С", - "scy;": "с", - sect: "§", - "Sfr;": "𝔖", - "sfr;": "𝔰", - "shy;": "­", - "sim;": "∼", - "smt;": "⪪", - "sol;": "/", - "squ;": "□", - "Sub;": "⋐", - "sub;": "⊂", - "Sum;": "∑", - "sum;": "∑", - "Sup;": "⋑", - "sup;": "⊃", - sup1: "¹", - sup2: "²", - sup3: "³", - "Tab;": "\t", - "Tau;": "Τ", - "tau;": "τ", - "Tcy;": "Т", - "tcy;": "т", - "Tfr;": "𝔗", - "tfr;": "𝔱", - "top;": "⊤", - "Ucy;": "У", - "ucy;": "у", - "Ufr;": "𝔘", - "ufr;": "𝔲", - "uml;": "¨", - Uuml: "Ü", - uuml: "ü", - "Vcy;": "В", - "vcy;": "в", - "Vee;": "⋁", - "vee;": "∨", - "Vfr;": "𝔙", - "vfr;": "𝔳", - "Wfr;": "𝔚", - "wfr;": "𝔴", - "Xfr;": "𝔛", - "xfr;": "𝔵", - "Ycy;": "Ы", - "ycy;": "ы", - "yen;": "¥", - "Yfr;": "𝔜", - "yfr;": "𝔶", - yuml: "ÿ", - "Zcy;": "З", - "zcy;": "з", - "Zfr;": "ℨ", - "zfr;": "𝔷", - "zwj;": "‍", - Acirc: "Â", - acirc: "â", - acute: "´", - AElig: "Æ", - aelig: "æ", - "andd;": "⩜", - "andv;": "⩚", - "ange;": "⦤", - "Aopf;": "𝔸", - "aopf;": "𝕒", - "apid;": "≋", - "apos;": "'", - Aring: "Å", - aring: "å", - "Ascr;": "𝒜", - "ascr;": "𝒶", - "Auml;": "Ä", - "auml;": "ä", - "Barv;": "⫧", - "bbrk;": "⎵", - "Beta;": "Β", - "beta;": "β", - "beth;": "ℶ", - "bNot;": "⫭", - "bnot;": "⌐", - "Bopf;": "𝔹", - "bopf;": "𝕓", - "boxH;": "═", - "boxh;": "─", - "boxV;": "║", - "boxv;": "│", - "Bscr;": "ℬ", - "bscr;": "𝒷", - "bsim;": "∽", - "bsol;": "\\", - "bull;": "•", - "bump;": "≎", - "caps;": "∩︀", - "Cdot;": "Ċ", - "cdot;": "ċ", - cedil: "¸", - "cent;": "¢", - "CHcy;": "Ч", - "chcy;": "ч", - "circ;": "ˆ", - "cirE;": "⧃", - "cire;": "≗", - "comp;": "∁", - "cong;": "≅", - "Copf;": "ℂ", - "copf;": "𝕔", - "COPY;": "©", - "copy;": "©", - "Cscr;": "𝒞", - "cscr;": "𝒸", - "csub;": "⫏", - "csup;": "⫐", - "cups;": "∪︀", - "Darr;": "↡", - "dArr;": "⇓", - "darr;": "↓", - "dash;": "‐", - "dHar;": "⥥", - "diam;": "⋄", - "DJcy;": "Ђ", - "djcy;": "ђ", - "Dopf;": "𝔻", - "dopf;": "𝕕", - "Dscr;": "𝒟", - "dscr;": "𝒹", - "DScy;": "Ѕ", - "dscy;": "ѕ", - "dsol;": "⧶", - "dtri;": "▿", - "DZcy;": "Џ", - "dzcy;": "џ", - "ecir;": "≖", - Ecirc: "Ê", - ecirc: "ê", - "Edot;": "Ė", - "eDot;": "≑", - "edot;": "ė", - "emsp;": " ", - "ensp;": " ", - "Eopf;": "𝔼", - "eopf;": "𝕖", - "epar;": "⋕", - "epsi;": "ε", - "Escr;": "ℰ", - "escr;": "ℯ", - "Esim;": "⩳", - "esim;": "≂", - "Euml;": "Ë", - "euml;": "ë", - "euro;": "€", - "excl;": "!", - "flat;": "♭", - "fnof;": "ƒ", - "Fopf;": "𝔽", - "fopf;": "𝕗", - "fork;": "⋔", - "Fscr;": "ℱ", - "fscr;": "𝒻", - "Gdot;": "Ġ", - "gdot;": "ġ", - "geqq;": "≧", - "gesl;": "⋛︀", - "GJcy;": "Ѓ", - "gjcy;": "ѓ", - "gnap;": "⪊", - "gneq;": "⪈", - "Gopf;": "𝔾", - "gopf;": "𝕘", - "Gscr;": "𝒢", - "gscr;": "ℊ", - "gsim;": "≳", - "gtcc;": "⪧", - "gvnE;": "≩︀", - "half;": "½", - "hArr;": "⇔", - "harr;": "↔", - "hbar;": "ℏ", - "Hopf;": "ℍ", - "hopf;": "𝕙", - "Hscr;": "ℋ", - "hscr;": "𝒽", - Icirc: "Î", - icirc: "î", - "Idot;": "İ", - "IEcy;": "Е", - "iecy;": "е", - iexcl: "¡", - "imof;": "⊷", - "IOcy;": "Ё", - "iocy;": "ё", - "Iopf;": "𝕀", - "iopf;": "𝕚", - "Iota;": "Ι", - "iota;": "ι", - "Iscr;": "ℐ", - "iscr;": "𝒾", - "isin;": "∈", - "Iuml;": "Ï", - "iuml;": "ï", - "Jopf;": "𝕁", - "jopf;": "𝕛", - "Jscr;": "𝒥", - "jscr;": "𝒿", - "KHcy;": "Х", - "khcy;": "х", - "KJcy;": "Ќ", - "kjcy;": "ќ", - "Kopf;": "𝕂", - "kopf;": "𝕜", - "Kscr;": "𝒦", - "kscr;": "𝓀", - "Lang;": "⟪", - "lang;": "⟨", - laquo: "«", - "Larr;": "↞", - "lArr;": "⇐", - "larr;": "←", - "late;": "⪭", - "lcub;": "{", - "ldca;": "⤶", - "ldsh;": "↲", - "leqq;": "≦", - "lesg;": "⋚︀", - "lHar;": "⥢", - "LJcy;": "Љ", - "ljcy;": "љ", - "lnap;": "⪉", - "lneq;": "⪇", - "Lopf;": "𝕃", - "lopf;": "𝕝", - "lozf;": "⧫", - "lpar;": "(", - "Lscr;": "ℒ", - "lscr;": "𝓁", - "lsim;": "≲", - "lsqb;": "[", - "ltcc;": "⪦", - "ltri;": "◃", - "lvnE;": "≨︀", - "macr;": "¯", - "male;": "♂", - "malt;": "✠", - micro: "µ", - "mlcp;": "⫛", - "mldr;": "…", - "Mopf;": "𝕄", - "mopf;": "𝕞", - "Mscr;": "ℳ", - "mscr;": "𝓂", - "nang;": "∠⃒", - "napE;": "⩰̸", - "nbsp;": " ", - "ncap;": "⩃", - "ncup;": "⩂", - "ngeq;": "≱", - "nges;": "⩾̸", - "ngtr;": "≯", - "nGtv;": "≫̸", - "nisd;": "⋺", - "NJcy;": "Њ", - "njcy;": "њ", - "nldr;": "‥", - "nleq;": "≰", - "nles;": "⩽̸", - "nLtv;": "≪̸", - "nmid;": "∤", - "Nopf;": "ℕ", - "nopf;": "𝕟", - "npar;": "∦", - "npre;": "⪯̸", - "nsce;": "⪰̸", - "Nscr;": "𝒩", - "nscr;": "𝓃", - "nsim;": "≁", - "nsub;": "⊄", - "nsup;": "⊅", - "ntgl;": "≹", - "ntlg;": "≸", - "nvap;": "≍⃒", - "nvge;": "≥⃒", - "nvgt;": ">⃒", - "nvle;": "≤⃒", - "nvlt;": "<⃒", - "oast;": "⊛", - "ocir;": "⊚", - Ocirc: "Ô", - ocirc: "ô", - "odiv;": "⨸", - "odot;": "⊙", - "ogon;": "˛", - "oint;": "∮", - "omid;": "⦶", - "Oopf;": "𝕆", - "oopf;": "𝕠", - "opar;": "⦷", - "ordf;": "ª", - "ordm;": "º", - "oror;": "⩖", - "Oscr;": "𝒪", - "oscr;": "ℴ", - "osol;": "⊘", - "Ouml;": "Ö", - "ouml;": "ö", - "para;": "¶", - "part;": "∂", - "perp;": "⊥", - "phiv;": "ϕ", - "plus;": "+", - "Popf;": "ℙ", - "popf;": "𝕡", - pound: "£", - "prap;": "⪷", - "prec;": "≺", - "prnE;": "⪵", - "prod;": "∏", - "prop;": "∝", - "Pscr;": "𝒫", - "pscr;": "𝓅", - "qint;": "⨌", - "Qopf;": "ℚ", - "qopf;": "𝕢", - "Qscr;": "𝒬", - "qscr;": "𝓆", - "QUOT;": "\"", - "quot;": "\"", - "race;": "∽̱", - "Rang;": "⟫", - "rang;": "⟩", - raquo: "»", - "Rarr;": "↠", - "rArr;": "⇒", - "rarr;": "→", - "rcub;": "}", - "rdca;": "⤷", - "rdsh;": "↳", - "real;": "ℜ", - "rect;": "▭", - "rHar;": "⥤", - "rhov;": "ϱ", - "ring;": "˚", - "Ropf;": "ℝ", - "ropf;": "𝕣", - "rpar;": ")", - "Rscr;": "ℛ", - "rscr;": "𝓇", - "rsqb;": "]", - "rtri;": "▹", - "scap;": "⪸", - "scnE;": "⪶", - "sdot;": "⋅", - "sect;": "§", - "semi;": ";", - "sext;": "✶", - "SHcy;": "Ш", - "shcy;": "ш", - "sime;": "≃", - "simg;": "⪞", - "siml;": "⪝", - "smid;": "∣", - "smte;": "⪬", - "solb;": "⧄", - "Sopf;": "𝕊", - "sopf;": "𝕤", - "spar;": "∥", - "Sqrt;": "√", - "squf;": "▪", - "Sscr;": "𝒮", - "sscr;": "𝓈", - "Star;": "⋆", - "star;": "☆", - "subE;": "⫅", - "sube;": "⊆", - "succ;": "≻", - "sung;": "♪", - "sup1;": "¹", - "sup2;": "²", - "sup3;": "³", - "supE;": "⫆", - "supe;": "⊇", - szlig: "ß", - "tbrk;": "⎴", - "tdot;": "⃛", - THORN: "Þ", - thorn: "þ", - times: "×", - "tint;": "∭", - "toea;": "⤨", - "Topf;": "𝕋", - "topf;": "𝕥", - "tosa;": "⤩", - "trie;": "≜", - "Tscr;": "𝒯", - "tscr;": "𝓉", - "TScy;": "Ц", - "tscy;": "ц", - "Uarr;": "↟", - "uArr;": "⇑", - "uarr;": "↑", - Ucirc: "Û", - ucirc: "û", - "uHar;": "⥣", - "Uopf;": "𝕌", - "uopf;": "𝕦", - "Upsi;": "ϒ", - "upsi;": "υ", - "Uscr;": "𝒰", - "uscr;": "𝓊", - "utri;": "▵", - "Uuml;": "Ü", - "uuml;": "ü", - "vArr;": "⇕", - "varr;": "↕", - "Vbar;": "⫫", - "vBar;": "⫨", - "Vert;": "‖", - "vert;": "|", - "Vopf;": "𝕍", - "vopf;": "𝕧", - "Vscr;": "𝒱", - "vscr;": "𝓋", - "Wopf;": "𝕎", - "wopf;": "𝕨", - "Wscr;": "𝒲", - "wscr;": "𝓌", - "xcap;": "⋂", - "xcup;": "⋃", - "xmap;": "⟼", - "xnis;": "⋻", - "Xopf;": "𝕏", - "xopf;": "𝕩", - "Xscr;": "𝒳", - "xscr;": "𝓍", - "xvee;": "⋁", - "YAcy;": "Я", - "yacy;": "я", - "YIcy;": "Ї", - "yicy;": "ї", - "Yopf;": "𝕐", - "yopf;": "𝕪", - "Yscr;": "𝒴", - "yscr;": "𝓎", - "YUcy;": "Ю", - "yucy;": "ю", - "Yuml;": "Ÿ", - "yuml;": "ÿ", - "Zdot;": "Ż", - "zdot;": "ż", - "Zeta;": "Ζ", - "zeta;": "ζ", - "ZHcy;": "Ж", - "zhcy;": "ж", - "Zopf;": "ℤ", - "zopf;": "𝕫", - "Zscr;": "𝒵", - "zscr;": "𝓏", - "zwnj;": "‌", - Aacute: "Á", - aacute: "á", - "Acirc;": "Â", - "acirc;": "â", - "acute;": "´", - "AElig;": "Æ", - "aelig;": "æ", - Agrave: "À", - agrave: "à", - "aleph;": "ℵ", - "Alpha;": "Α", - "alpha;": "α", - "Amacr;": "Ā", - "amacr;": "ā", - "amalg;": "⨿", - "angle;": "∠", - "angrt;": "∟", - "angst;": "Å", - "Aogon;": "Ą", - "aogon;": "ą", - "Aring;": "Å", - "aring;": "å", - "asymp;": "≈", - Atilde: "Ã", - atilde: "ã", - "awint;": "⨑", - "bcong;": "≌", - "bdquo;": "„", - "bepsi;": "϶", - "blank;": "␣", - "blk12;": "▒", - "blk14;": "░", - "blk34;": "▓", - "block;": "█", - "boxDL;": "╗", - "boxDl;": "╖", - "boxdL;": "╕", - "boxdl;": "┐", - "boxDR;": "╔", - "boxDr;": "╓", - "boxdR;": "╒", - "boxdr;": "┌", - "boxHD;": "╦", - "boxHd;": "╤", - "boxhD;": "╥", - "boxhd;": "┬", - "boxHU;": "╩", - "boxHu;": "╧", - "boxhU;": "╨", - "boxhu;": "┴", - "boxUL;": "╝", - "boxUl;": "╜", - "boxuL;": "╛", - "boxul;": "┘", - "boxUR;": "╚", - "boxUr;": "╙", - "boxuR;": "╘", - "boxur;": "└", - "boxVH;": "╬", - "boxVh;": "╫", - "boxvH;": "╪", - "boxvh;": "┼", - "boxVL;": "╣", - "boxVl;": "╢", - "boxvL;": "╡", - "boxvl;": "┤", - "boxVR;": "╠", - "boxVr;": "╟", - "boxvR;": "╞", - "boxvr;": "├", - "Breve;": "˘", - "breve;": "˘", - brvbar: "¦", - "bsemi;": "⁏", - "bsime;": "⋍", - "bsolb;": "⧅", - "bumpE;": "⪮", - "bumpe;": "≏", - "caret;": "⁁", - "caron;": "ˇ", - "ccaps;": "⩍", - Ccedil: "Ç", - ccedil: "ç", - "Ccirc;": "Ĉ", - "ccirc;": "ĉ", - "ccups;": "⩌", - "cedil;": "¸", - "check;": "✓", - "clubs;": "♣", - "Colon;": "∷", - "colon;": ":", - "comma;": ",", - "crarr;": "↵", - "Cross;": "⨯", - "cross;": "✗", - "csube;": "⫑", - "csupe;": "⫒", - "ctdot;": "⋯", - "cuepr;": "⋞", - "cuesc;": "⋟", - "cupor;": "⩅", - curren: "¤", - "cuvee;": "⋎", - "cuwed;": "⋏", - "cwint;": "∱", - "Dashv;": "⫤", - "dashv;": "⊣", - "dblac;": "˝", - "ddarr;": "⇊", - "Delta;": "Δ", - "delta;": "δ", - "dharl;": "⇃", - "dharr;": "⇂", - "diams;": "♦", - "disin;": "⋲", - divide: "÷", - "doteq;": "≐", - "dtdot;": "⋱", - "dtrif;": "▾", - "duarr;": "⇵", - "duhar;": "⥯", - Eacute: "É", - eacute: "é", - "Ecirc;": "Ê", - "ecirc;": "ê", - "eDDot;": "⩷", - "efDot;": "≒", - Egrave: "È", - egrave: "è", - "Emacr;": "Ē", - "emacr;": "ē", - "empty;": "∅", - "Eogon;": "Ę", - "eogon;": "ę", - "eplus;": "⩱", - "epsiv;": "ϵ", - "eqsim;": "≂", - "Equal;": "⩵", - "equiv;": "≡", - "erarr;": "⥱", - "erDot;": "≓", - "esdot;": "≐", - "exist;": "∃", - "fflig;": "ff", - "filig;": "fi", - "fjlig;": "fj", - "fllig;": "fl", - "fltns;": "▱", - "forkv;": "⫙", - frac12: "½", - frac14: "¼", - frac34: "¾", - "frasl;": "⁄", - "frown;": "⌢", - "Gamma;": "Γ", - "gamma;": "γ", - "Gcirc;": "Ĝ", - "gcirc;": "ĝ", - "gescc;": "⪩", - "gimel;": "ℷ", - "gneqq;": "≩", - "gnsim;": "⋧", - "grave;": "`", - "gsime;": "⪎", - "gsiml;": "⪐", - "gtcir;": "⩺", - "gtdot;": "⋗", - "Hacek;": "ˇ", - "harrw;": "↭", - "Hcirc;": "Ĥ", - "hcirc;": "ĥ", - "hoarr;": "⇿", - Iacute: "Í", - iacute: "í", - "Icirc;": "Î", - "icirc;": "î", - "iexcl;": "¡", - Igrave: "Ì", - igrave: "ì", - "iiint;": "∭", - "iiota;": "℩", - "IJlig;": "IJ", - "ijlig;": "ij", - "Imacr;": "Ī", - "imacr;": "ī", - "image;": "ℑ", - "imath;": "ı", - "imped;": "Ƶ", - "infin;": "∞", - "Iogon;": "Į", - "iogon;": "į", - "iprod;": "⨼", - iquest: "¿", - "isinE;": "⋹", - "isins;": "⋴", - "isinv;": "∈", - "Iukcy;": "І", - "iukcy;": "і", - "Jcirc;": "Ĵ", - "jcirc;": "ĵ", - "jmath;": "ȷ", - "Jukcy;": "Є", - "jukcy;": "є", - "Kappa;": "Κ", - "kappa;": "κ", - "lAarr;": "⇚", - "langd;": "⦑", - "laquo;": "«", - "larrb;": "⇤", - "lates;": "⪭︀", - "lBarr;": "⤎", - "lbarr;": "⤌", - "lbbrk;": "❲", - "lbrke;": "⦋", - "lceil;": "⌈", - "ldquo;": "“", - "lescc;": "⪨", - "lhard;": "↽", - "lharu;": "↼", - "lhblk;": "▄", - "llarr;": "⇇", - "lltri;": "◺", - "lneqq;": "≨", - "lnsim;": "⋦", - "loang;": "⟬", - "loarr;": "⇽", - "lobrk;": "⟦", - "lopar;": "⦅", - "lrarr;": "⇆", - "lrhar;": "⇋", - "lrtri;": "⊿", - "lsime;": "⪍", - "lsimg;": "⪏", - "lsquo;": "‘", - "ltcir;": "⩹", - "ltdot;": "⋖", - "ltrie;": "⊴", - "ltrif;": "◂", - "mdash;": "—", - "mDDot;": "∺", - "micro;": "µ", - middot: "·", - "minus;": "−", - "mumap;": "⊸", - "nabla;": "∇", - "napid;": "≋̸", - "napos;": "ʼn", - "natur;": "♮", - "nbump;": "≎̸", - "ncong;": "≇", - "ndash;": "–", - "neArr;": "⇗", - "nearr;": "↗", - "nedot;": "≐̸", - "nesim;": "≂̸", - "ngeqq;": "≧̸", - "ngsim;": "≵", - "nhArr;": "⇎", - "nharr;": "↮", - "nhpar;": "⫲", - "nlArr;": "⇍", - "nlarr;": "↚", - "nleqq;": "≦̸", - "nless;": "≮", - "nlsim;": "≴", - "nltri;": "⋪", - "notin;": "∉", - "notni;": "∌", - "npart;": "∂̸", - "nprec;": "⊀", - "nrArr;": "⇏", - "nrarr;": "↛", - "nrtri;": "⋫", - "nsime;": "≄", - "nsmid;": "∤", - "nspar;": "∦", - "nsubE;": "⫅̸", - "nsube;": "⊈", - "nsucc;": "⊁", - "nsupE;": "⫆̸", - "nsupe;": "⊉", - Ntilde: "Ñ", - ntilde: "ñ", - "numsp;": " ", - "nvsim;": "∼⃒", - "nwArr;": "⇖", - "nwarr;": "↖", - Oacute: "Ó", - oacute: "ó", - "Ocirc;": "Ô", - "ocirc;": "ô", - "odash;": "⊝", - "OElig;": "Œ", - "oelig;": "œ", - "ofcir;": "⦿", - Ograve: "Ò", - ograve: "ò", - "ohbar;": "⦵", - "olarr;": "↺", - "olcir;": "⦾", - "oline;": "‾", - "Omacr;": "Ō", - "omacr;": "ō", - "Omega;": "Ω", - "omega;": "ω", - "operp;": "⦹", - "oplus;": "⊕", - "orarr;": "↻", - "order;": "ℴ", - Oslash: "Ø", - oslash: "ø", - Otilde: "Õ", - otilde: "õ", - "ovbar;": "⌽", - "parsl;": "⫽", - "phone;": "☎", - "plusb;": "⊞", - "pluse;": "⩲", - plusmn: "±", - "pound;": "£", - "prcue;": "≼", - "Prime;": "″", - "prime;": "′", - "prnap;": "⪹", - "prsim;": "≾", - "quest;": "?", - "rAarr;": "⇛", - "radic;": "√", - "rangd;": "⦒", - "range;": "⦥", - "raquo;": "»", - "rarrb;": "⇥", - "rarrc;": "⤳", - "rarrw;": "↝", - "ratio;": "∶", - "RBarr;": "⤐", - "rBarr;": "⤏", - "rbarr;": "⤍", - "rbbrk;": "❳", - "rbrke;": "⦌", - "rceil;": "⌉", - "rdquo;": "”", - "reals;": "ℝ", - "rhard;": "⇁", - "rharu;": "⇀", - "rlarr;": "⇄", - "rlhar;": "⇌", - "rnmid;": "⫮", - "roang;": "⟭", - "roarr;": "⇾", - "robrk;": "⟧", - "ropar;": "⦆", - "rrarr;": "⇉", - "rsquo;": "’", - "rtrie;": "⊵", - "rtrif;": "▸", - "sbquo;": "‚", - "sccue;": "≽", - "Scirc;": "Ŝ", - "scirc;": "ŝ", - "scnap;": "⪺", - "scsim;": "≿", - "sdotb;": "⊡", - "sdote;": "⩦", - "seArr;": "⇘", - "searr;": "↘", - "setmn;": "∖", - "sharp;": "♯", - "Sigma;": "Σ", - "sigma;": "σ", - "simeq;": "≃", - "simgE;": "⪠", - "simlE;": "⪟", - "simne;": "≆", - "slarr;": "←", - "smile;": "⌣", - "smtes;": "⪬︀", - "sqcap;": "⊓", - "sqcup;": "⊔", - "sqsub;": "⊏", - "sqsup;": "⊐", - "srarr;": "→", - "starf;": "★", - "strns;": "¯", - "subnE;": "⫋", - "subne;": "⊊", - "supnE;": "⫌", - "supne;": "⊋", - "swArr;": "⇙", - "swarr;": "↙", - "szlig;": "ß", - "Theta;": "Θ", - "theta;": "θ", - "thkap;": "≈", - "THORN;": "Þ", - "thorn;": "þ", - "Tilde;": "∼", - "tilde;": "˜", - "times;": "×", - "TRADE;": "™", - "trade;": "™", - "trisb;": "⧍", - "TSHcy;": "Ћ", - "tshcy;": "ћ", - "twixt;": "≬", - Uacute: "Ú", - uacute: "ú", - "Ubrcy;": "Ў", - "ubrcy;": "ў", - "Ucirc;": "Û", - "ucirc;": "û", - "udarr;": "⇅", - "udhar;": "⥮", - Ugrave: "Ù", - ugrave: "ù", - "uharl;": "↿", - "uharr;": "↾", - "uhblk;": "▀", - "ultri;": "◸", - "Umacr;": "Ū", - "umacr;": "ū", - "Union;": "⋃", - "Uogon;": "Ų", - "uogon;": "ų", - "uplus;": "⊎", - "upsih;": "ϒ", - "UpTee;": "⊥", - "Uring;": "Ů", - "uring;": "ů", - "urtri;": "◹", - "utdot;": "⋰", - "utrif;": "▴", - "uuarr;": "⇈", - "varpi;": "ϖ", - "vBarv;": "⫩", - "VDash;": "⊫", - "Vdash;": "⊩", - "vDash;": "⊨", - "vdash;": "⊢", - "veeeq;": "≚", - "vltri;": "⊲", - "vnsub;": "⊂⃒", - "vnsup;": "⊃⃒", - "vprop;": "∝", - "vrtri;": "⊳", - "Wcirc;": "Ŵ", - "wcirc;": "ŵ", - "Wedge;": "⋀", - "wedge;": "∧", - "xcirc;": "◯", - "xdtri;": "▽", - "xhArr;": "⟺", - "xharr;": "⟷", - "xlArr;": "⟸", - "xlarr;": "⟵", - "xodot;": "⨀", - "xrArr;": "⟹", - "xrarr;": "⟶", - "xutri;": "△", - Yacute: "Ý", - yacute: "ý", - "Ycirc;": "Ŷ", - "ycirc;": "ŷ", - "Aacute;": "Á", - "aacute;": "á", - "Abreve;": "Ă", - "abreve;": "ă", - "Agrave;": "À", - "agrave;": "à", - "andand;": "⩕", - "angmsd;": "∡", - "angsph;": "∢", - "apacir;": "⩯", - "approx;": "≈", - "Assign;": "≔", - "Atilde;": "Ã", - "atilde;": "ã", - "barvee;": "⊽", - "Barwed;": "⌆", - "barwed;": "⌅", - "becaus;": "∵", - "bernou;": "ℬ", - "bigcap;": "⋂", - "bigcup;": "⋃", - "bigvee;": "⋁", - "bkarow;": "⤍", - "bottom;": "⊥", - "bowtie;": "⋈", - "boxbox;": "⧉", - "bprime;": "‵", - "brvbar;": "¦", - "bullet;": "•", - "Bumpeq;": "≎", - "bumpeq;": "≏", - "Cacute;": "Ć", - "cacute;": "ć", - "capand;": "⩄", - "capcap;": "⩋", - "capcup;": "⩇", - "capdot;": "⩀", - "Ccaron;": "Č", - "ccaron;": "č", - "Ccedil;": "Ç", - "ccedil;": "ç", - "circeq;": "≗", - "cirmid;": "⫯", - "Colone;": "⩴", - "colone;": "≔", - "commat;": "@", - "compfn;": "∘", - "Conint;": "∯", - "conint;": "∮", - "coprod;": "∐", - "copysr;": "℗", - "cularr;": "↶", - "CupCap;": "≍", - "cupcap;": "⩆", - "cupcup;": "⩊", - "cupdot;": "⊍", - "curarr;": "↷", - "curren;": "¤", - "cylcty;": "⌭", - "Dagger;": "‡", - "dagger;": "†", - "daleth;": "ℸ", - "Dcaron;": "Ď", - "dcaron;": "ď", - "dfisht;": "⥿", - "divide;": "÷", - "divonx;": "⋇", - "dlcorn;": "⌞", - "dlcrop;": "⌍", - "dollar;": "$", - "DotDot;": "⃜", - "drcorn;": "⌟", - "drcrop;": "⌌", - "Dstrok;": "Đ", - "dstrok;": "đ", - "Eacute;": "É", - "eacute;": "é", - "easter;": "⩮", - "Ecaron;": "Ě", - "ecaron;": "ě", - "ecolon;": "≕", - "Egrave;": "È", - "egrave;": "è", - "egsdot;": "⪘", - "elsdot;": "⪗", - "emptyv;": "∅", - "emsp13;": " ", - "emsp14;": " ", - "eparsl;": "⧣", - "eqcirc;": "≖", - "equals;": "=", - "equest;": "≟", - "Exists;": "∃", - "female;": "♀", - "ffilig;": "ffi", - "ffllig;": "ffl", - "ForAll;": "∀", - "forall;": "∀", - "frac12;": "½", - "frac13;": "⅓", - "frac14;": "¼", - "frac15;": "⅕", - "frac16;": "⅙", - "frac18;": "⅛", - "frac23;": "⅔", - "frac25;": "⅖", - "frac34;": "¾", - "frac35;": "⅗", - "frac38;": "⅜", - "frac45;": "⅘", - "frac56;": "⅚", - "frac58;": "⅝", - "frac78;": "⅞", - "gacute;": "ǵ", - "Gammad;": "Ϝ", - "gammad;": "ϝ", - "Gbreve;": "Ğ", - "gbreve;": "ğ", - "Gcedil;": "Ģ", - "gesdot;": "⪀", - "gesles;": "⪔", - "gtlPar;": "⦕", - "gtrarr;": "⥸", - "gtrdot;": "⋗", - "gtrsim;": "≳", - "hairsp;": " ", - "hamilt;": "ℋ", - "HARDcy;": "Ъ", - "hardcy;": "ъ", - "hearts;": "♥", - "hellip;": "…", - "hercon;": "⊹", - "homtht;": "∻", - "horbar;": "―", - "hslash;": "ℏ", - "Hstrok;": "Ħ", - "hstrok;": "ħ", - "hybull;": "⁃", - "hyphen;": "‐", - "Iacute;": "Í", - "iacute;": "í", - "Igrave;": "Ì", - "igrave;": "ì", - "iiiint;": "⨌", - "iinfin;": "⧜", - "incare;": "℅", - "inodot;": "ı", - "intcal;": "⊺", - "iquest;": "¿", - "isinsv;": "⋳", - "Itilde;": "Ĩ", - "itilde;": "ĩ", - "Jsercy;": "Ј", - "jsercy;": "ј", - "kappav;": "ϰ", - "Kcedil;": "Ķ", - "kcedil;": "ķ", - "kgreen;": "ĸ", - "Lacute;": "Ĺ", - "lacute;": "ĺ", - "lagran;": "ℒ", - "Lambda;": "Λ", - "lambda;": "λ", - "langle;": "⟨", - "larrfs;": "⤝", - "larrhk;": "↩", - "larrlp;": "↫", - "larrpl;": "⤹", - "larrtl;": "↢", - "lAtail;": "⤛", - "latail;": "⤙", - "lbrace;": "{", - "lbrack;": "[", - "Lcaron;": "Ľ", - "lcaron;": "ľ", - "Lcedil;": "Ļ", - "lcedil;": "ļ", - "ldquor;": "„", - "lesdot;": "⩿", - "lesges;": "⪓", - "lfisht;": "⥼", - "lfloor;": "⌊", - "lharul;": "⥪", - "llhard;": "⥫", - "Lmidot;": "Ŀ", - "lmidot;": "ŀ", - "lmoust;": "⎰", - "loplus;": "⨭", - "lowast;": "∗", - "lowbar;": "_", - "lparlt;": "⦓", - "lrhard;": "⥭", - "lsaquo;": "‹", - "lsquor;": "‚", - "Lstrok;": "Ł", - "lstrok;": "ł", - "lthree;": "⋋", - "ltimes;": "⋉", - "ltlarr;": "⥶", - "ltrPar;": "⦖", - "mapsto;": "↦", - "marker;": "▮", - "mcomma;": "⨩", - "midast;": "*", - "midcir;": "⫰", - "middot;": "·", - "minusb;": "⊟", - "minusd;": "∸", - "mnplus;": "∓", - "models;": "⊧", - "mstpos;": "∾", - "Nacute;": "Ń", - "nacute;": "ń", - "nbumpe;": "≏̸", - "Ncaron;": "Ň", - "ncaron;": "ň", - "Ncedil;": "Ņ", - "ncedil;": "ņ", - "nearhk;": "⤤", - "nequiv;": "≢", - "nesear;": "⤨", - "nexist;": "∄", - "nltrie;": "⋬", - "notinE;": "⋹̸", - "nparsl;": "⫽⃥", - "nprcue;": "⋠", - "nrarrc;": "⤳̸", - "nrarrw;": "↝̸", - "nrtrie;": "⋭", - "nsccue;": "⋡", - "nsimeq;": "≄", - "Ntilde;": "Ñ", - "ntilde;": "ñ", - "numero;": "№", - "nVDash;": "⊯", - "nVdash;": "⊮", - "nvDash;": "⊭", - "nvdash;": "⊬", - "nvHarr;": "⤄", - "nvlArr;": "⤂", - "nvrArr;": "⤃", - "nwarhk;": "⤣", - "nwnear;": "⤧", - "Oacute;": "Ó", - "oacute;": "ó", - "Odblac;": "Ő", - "odblac;": "ő", - "odsold;": "⦼", - "Ograve;": "Ò", - "ograve;": "ò", - "ominus;": "⊖", - "origof;": "⊶", - "Oslash;": "Ø", - "oslash;": "ø", - "Otilde;": "Õ", - "otilde;": "õ", - "Otimes;": "⨷", - "otimes;": "⊗", - "parsim;": "⫳", - "percnt;": "%", - "period;": ".", - "permil;": "‰", - "phmmat;": "ℳ", - "planck;": "ℏ", - "plankv;": "ℏ", - "plusdo;": "∔", - "plusdu;": "⨥", - "plusmn;": "±", - "preceq;": "⪯", - "primes;": "ℙ", - "prnsim;": "⋨", - "propto;": "∝", - "prurel;": "⊰", - "puncsp;": " ", - "qprime;": "⁗", - "Racute;": "Ŕ", - "racute;": "ŕ", - "rangle;": "⟩", - "rarrap;": "⥵", - "rarrfs;": "⤞", - "rarrhk;": "↪", - "rarrlp;": "↬", - "rarrpl;": "⥅", - "Rarrtl;": "⤖", - "rarrtl;": "↣", - "rAtail;": "⤜", - "ratail;": "⤚", - "rbrace;": "}", - "rbrack;": "]", - "Rcaron;": "Ř", - "rcaron;": "ř", - "Rcedil;": "Ŗ", - "rcedil;": "ŗ", - "rdquor;": "”", - "rfisht;": "⥽", - "rfloor;": "⌋", - "rharul;": "⥬", - "rmoust;": "⎱", - "roplus;": "⨮", - "rpargt;": "⦔", - "rsaquo;": "›", - "rsquor;": "’", - "rthree;": "⋌", - "rtimes;": "⋊", - "Sacute;": "Ś", - "sacute;": "ś", - "Scaron;": "Š", - "scaron;": "š", - "Scedil;": "Ş", - "scedil;": "ş", - "scnsim;": "⋩", - "searhk;": "⤥", - "seswar;": "⤩", - "sfrown;": "⌢", - "SHCHcy;": "Щ", - "shchcy;": "щ", - "sigmaf;": "ς", - "sigmav;": "ς", - "simdot;": "⩪", - "smashp;": "⨳", - "SOFTcy;": "Ь", - "softcy;": "ь", - "solbar;": "⌿", - "spades;": "♠", - "sqcaps;": "⊓︀", - "sqcups;": "⊔︀", - "sqsube;": "⊑", - "sqsupe;": "⊒", - "Square;": "□", - "square;": "□", - "squarf;": "▪", - "ssetmn;": "∖", - "ssmile;": "⌣", - "sstarf;": "⋆", - "subdot;": "⪽", - "Subset;": "⋐", - "subset;": "⊂", - "subsim;": "⫇", - "subsub;": "⫕", - "subsup;": "⫓", - "succeq;": "⪰", - "supdot;": "⪾", - "Supset;": "⋑", - "supset;": "⊃", - "supsim;": "⫈", - "supsub;": "⫔", - "supsup;": "⫖", - "swarhk;": "⤦", - "swnwar;": "⤪", - "target;": "⌖", - "Tcaron;": "Ť", - "tcaron;": "ť", - "Tcedil;": "Ţ", - "tcedil;": "ţ", - "telrec;": "⌕", - "there4;": "∴", - "thetav;": "ϑ", - "thinsp;": " ", - "thksim;": "∼", - "timesb;": "⊠", - "timesd;": "⨰", - "topbot;": "⌶", - "topcir;": "⫱", - "tprime;": "‴", - "tridot;": "◬", - "Tstrok;": "Ŧ", - "tstrok;": "ŧ", - "Uacute;": "Ú", - "uacute;": "ú", - "Ubreve;": "Ŭ", - "ubreve;": "ŭ", - "Udblac;": "Ű", - "udblac;": "ű", - "ufisht;": "⥾", - "Ugrave;": "Ù", - "ugrave;": "ù", - "ulcorn;": "⌜", - "ulcrop;": "⌏", - "urcorn;": "⌝", - "urcrop;": "⌎", - "Utilde;": "Ũ", - "utilde;": "ũ", - "vangrt;": "⦜", - "varphi;": "ϕ", - "varrho;": "ϱ", - "Vdashl;": "⫦", - "veebar;": "⊻", - "vellip;": "⋮", - "Verbar;": "‖", - "verbar;": "|", - "vsubnE;": "⫋︀", - "vsubne;": "⊊︀", - "vsupnE;": "⫌︀", - "vsupne;": "⊋︀", - "Vvdash;": "⊪", - "wedbar;": "⩟", - "wedgeq;": "≙", - "weierp;": "℘", - "wreath;": "≀", - "xoplus;": "⨁", - "xotime;": "⨂", - "xsqcup;": "⨆", - "xuplus;": "⨄", - "xwedge;": "⋀", - "Yacute;": "Ý", - "yacute;": "ý", - "Zacute;": "Ź", - "zacute;": "ź", - "Zcaron;": "Ž", - "zcaron;": "ž", - "zeetrf;": "ℨ", - "alefsym;": "ℵ", - "angrtvb;": "⊾", - "angzarr;": "⍼", - "asympeq;": "≍", - "backsim;": "∽", - "Because;": "∵", - "because;": "∵", - "bemptyv;": "⦰", - "between;": "≬", - "bigcirc;": "◯", - "bigodot;": "⨀", - "bigstar;": "★", - "bnequiv;": "≡⃥", - "boxplus;": "⊞", - "Cayleys;": "ℭ", - "Cconint;": "∰", - "ccupssm;": "⩐", - "Cedilla;": "¸", - "cemptyv;": "⦲", - "cirscir;": "⧂", - "coloneq;": "≔", - "congdot;": "⩭", - "cudarrl;": "⤸", - "cudarrr;": "⤵", - "cularrp;": "⤽", - "curarrm;": "⤼", - "dbkarow;": "⤏", - "ddagger;": "‡", - "ddotseq;": "⩷", - "demptyv;": "⦱", - "Diamond;": "⋄", - "diamond;": "⋄", - "digamma;": "ϝ", - "dotplus;": "∔", - "DownTee;": "⊤", - "dwangle;": "⦦", - "Element;": "∈", - "Epsilon;": "Ε", - "epsilon;": "ε", - "eqcolon;": "≕", - "equivDD;": "⩸", - "gesdoto;": "⪂", - "gtquest;": "⩼", - "gtrless;": "≷", - "harrcir;": "⥈", - "Implies;": "⇒", - "intprod;": "⨼", - "isindot;": "⋵", - "larrbfs;": "⤟", - "larrsim;": "⥳", - "lbrksld;": "⦏", - "lbrkslu;": "⦍", - "ldrdhar;": "⥧", - "LeftTee;": "⊣", - "lesdoto;": "⪁", - "lessdot;": "⋖", - "lessgtr;": "≶", - "lesssim;": "≲", - "lotimes;": "⨴", - "lozenge;": "◊", - "ltquest;": "⩻", - "luruhar;": "⥦", - "maltese;": "✠", - "minusdu;": "⨪", - "napprox;": "≉", - "natural;": "♮", - "nearrow;": "↗", - "NewLine;": "\n", - "nexists;": "∄", - "NoBreak;": "⁠", - "notinva;": "∉", - "notinvb;": "⋷", - "notinvc;": "⋶", - "NotLess;": "≮", - "notniva;": "∌", - "notnivb;": "⋾", - "notnivc;": "⋽", - "npolint;": "⨔", - "npreceq;": "⪯̸", - "nsqsube;": "⋢", - "nsqsupe;": "⋣", - "nsubset;": "⊂⃒", - "nsucceq;": "⪰̸", - "nsupset;": "⊃⃒", - "nvinfin;": "⧞", - "nvltrie;": "⊴⃒", - "nvrtrie;": "⊵⃒", - "nwarrow;": "↖", - "olcross;": "⦻", - "Omicron;": "Ο", - "omicron;": "ο", - "orderof;": "ℴ", - "orslope;": "⩗", - "OverBar;": "‾", - "pertenk;": "‱", - "planckh;": "ℎ", - "pluscir;": "⨢", - "plussim;": "⨦", - "plustwo;": "⨧", - "precsim;": "≾", - "Product;": "∏", - "quatint;": "⨖", - "questeq;": "≟", - "rarrbfs;": "⤠", - "rarrsim;": "⥴", - "rbrksld;": "⦎", - "rbrkslu;": "⦐", - "rdldhar;": "⥩", - "realine;": "ℛ", - "rotimes;": "⨵", - "ruluhar;": "⥨", - "searrow;": "↘", - "simplus;": "⨤", - "simrarr;": "⥲", - "subedot;": "⫃", - "submult;": "⫁", - "subplus;": "⪿", - "subrarr;": "⥹", - "succsim;": "≿", - "supdsub;": "⫘", - "supedot;": "⫄", - "suphsol;": "⟉", - "suphsub;": "⫗", - "suplarr;": "⥻", - "supmult;": "⫂", - "supplus;": "⫀", - "swarrow;": "↙", - "topfork;": "⫚", - "triplus;": "⨹", - "tritime;": "⨻", - "UpArrow;": "↑", - "Uparrow;": "⇑", - "uparrow;": "↑", - "Upsilon;": "Υ", - "upsilon;": "υ", - "uwangle;": "⦧", - "vzigzag;": "⦚", - "zigrarr;": "⇝", - "andslope;": "⩘", - "angmsdaa;": "⦨", - "angmsdab;": "⦩", - "angmsdac;": "⦪", - "angmsdad;": "⦫", - "angmsdae;": "⦬", - "angmsdaf;": "⦭", - "angmsdag;": "⦮", - "angmsdah;": "⦯", - "angrtvbd;": "⦝", - "approxeq;": "≊", - "awconint;": "∳", - "backcong;": "≌", - "barwedge;": "⌅", - "bbrktbrk;": "⎶", - "bigoplus;": "⨁", - "bigsqcup;": "⨆", - "biguplus;": "⨄", - "bigwedge;": "⋀", - "boxminus;": "⊟", - "boxtimes;": "⊠", - "bsolhsub;": "⟈", - "capbrcup;": "⩉", - "circledR;": "®", - "circledS;": "Ⓢ", - "cirfnint;": "⨐", - "clubsuit;": "♣", - "cupbrcap;": "⩈", - "curlyvee;": "⋎", - "cwconint;": "∲", - "DDotrahd;": "⤑", - "doteqdot;": "≑", - "DotEqual;": "≐", - "dotminus;": "∸", - "drbkarow;": "⤐", - "dzigrarr;": "⟿", - "elinters;": "⏧", - "emptyset;": "∅", - "eqvparsl;": "⧥", - "fpartint;": "⨍", - "geqslant;": "⩾", - "gesdotol;": "⪄", - "gnapprox;": "⪊", - "hksearow;": "⤥", - "hkswarow;": "⤦", - "imagline;": "ℐ", - "imagpart;": "ℑ", - "infintie;": "⧝", - "integers;": "ℤ", - "Integral;": "∫", - "intercal;": "⊺", - "intlarhk;": "⨗", - "laemptyv;": "⦴", - "ldrushar;": "⥋", - "leqslant;": "⩽", - "lesdotor;": "⪃", - "LessLess;": "⪡", - "llcorner;": "⌞", - "lnapprox;": "⪉", - "lrcorner;": "⌟", - "lurdshar;": "⥊", - "mapstoup;": "↥", - "multimap;": "⊸", - "naturals;": "ℕ", - "ncongdot;": "⩭̸", - "NotEqual;": "≠", - "notindot;": "⋵̸", - "NotTilde;": "≁", - "otimesas;": "⨶", - "parallel;": "∥", - "PartialD;": "∂", - "plusacir;": "⨣", - "pointint;": "⨕", - "Precedes;": "≺", - "precneqq;": "⪵", - "precnsim;": "⋨", - "profalar;": "⌮", - "profline;": "⌒", - "profsurf;": "⌓", - "raemptyv;": "⦳", - "realpart;": "ℜ", - "RightTee;": "⊢", - "rppolint;": "⨒", - "rtriltri;": "⧎", - "scpolint;": "⨓", - "setminus;": "∖", - "shortmid;": "∣", - "smeparsl;": "⧤", - "sqsubset;": "⊏", - "sqsupset;": "⊐", - "subseteq;": "⊆", - "Succeeds;": "≻", - "succneqq;": "⪶", - "succnsim;": "⋩", - "SuchThat;": "∋", - "Superset;": "⊃", - "supseteq;": "⊇", - "thetasym;": "ϑ", - "thicksim;": "∼", - "timesbar;": "⨱", - "triangle;": "▵", - "triminus;": "⨺", - "trpezium;": "⏢", - "Uarrocir;": "⥉", - "ulcorner;": "⌜", - "UnderBar;": "_", - "urcorner;": "⌝", - "varkappa;": "ϰ", - "varsigma;": "ς", - "vartheta;": "ϑ", - "backprime;": "‵", - "backsimeq;": "⋍", - "Backslash;": "∖", - "bigotimes;": "⨂", - "CenterDot;": "·", - "centerdot;": "·", - "checkmark;": "✓", - "CircleDot;": "⊙", - "complexes;": "ℂ", - "Congruent;": "≡", - "Coproduct;": "∐", - "dotsquare;": "⊡", - "DoubleDot;": "¨", - "DownArrow;": "↓", - "Downarrow;": "⇓", - "downarrow;": "↓", - "DownBreve;": "̑", - "gtrapprox;": "⪆", - "gtreqless;": "⋛", - "gvertneqq;": "≩︀", - "heartsuit;": "♥", - "HumpEqual;": "≏", - "LeftArrow;": "←", - "Leftarrow;": "⇐", - "leftarrow;": "←", - "LeftFloor;": "⌊", - "lesseqgtr;": "⋚", - "LessTilde;": "≲", - "lvertneqq;": "≨︀", - "Mellintrf;": "ℳ", - "MinusPlus;": "∓", - "ngeqslant;": "⩾̸", - "nleqslant;": "⩽̸", - "NotCupCap;": "≭", - "NotExists;": "∄", - "NotSubset;": "⊂⃒", - "nparallel;": "∦", - "nshortmid;": "∤", - "nsubseteq;": "⊈", - "nsupseteq;": "⊉", - "OverBrace;": "⏞", - "pitchfork;": "⋔", - "PlusMinus;": "±", - "rationals;": "ℚ", - "spadesuit;": "♠", - "subseteqq;": "⫅", - "subsetneq;": "⊊", - "supseteqq;": "⫆", - "supsetneq;": "⊋", - "Therefore;": "∴", - "therefore;": "∴", - "ThinSpace;": " ", - "triangleq;": "≜", - "TripleDot;": "⃛", - "UnionPlus;": "⊎", - "varpropto;": "∝", - "Bernoullis;": "ℬ", - "circledast;": "⊛", - "CirclePlus;": "⊕", - "complement;": "∁", - "curlywedge;": "⋏", - "eqslantgtr;": "⪖", - "EqualTilde;": "≂", - "Fouriertrf;": "ℱ", - "gtreqqless;": "⪌", - "ImaginaryI;": "ⅈ", - "Laplacetrf;": "ℒ", - "LeftVector;": "↼", - "lessapprox;": "⪅", - "lesseqqgtr;": "⪋", - "Lleftarrow;": "⇚", - "lmoustache;": "⎰", - "longmapsto;": "⟼", - "mapstodown;": "↧", - "mapstoleft;": "↤", - "nLeftarrow;": "⇍", - "nleftarrow;": "↚", - "NotElement;": "∉", - "NotGreater;": "≯", - "nsubseteqq;": "⫅̸", - "nsupseteqq;": "⫆̸", - "precapprox;": "⪷", - "Proportion;": "∷", - "RightArrow;": "→", - "Rightarrow;": "⇒", - "rightarrow;": "→", - "RightFloor;": "⌋", - "rmoustache;": "⎱", - "sqsubseteq;": "⊑", - "sqsupseteq;": "⊒", - "subsetneqq;": "⫋", - "succapprox;": "⪸", - "supsetneqq;": "⫌", - "ThickSpace;": "  ", - "TildeEqual;": "≃", - "TildeTilde;": "≈", - "UnderBrace;": "⏟", - "UpArrowBar;": "⤒", - "UpTeeArrow;": "↥", - "upuparrows;": "⇈", - "varepsilon;": "ϵ", - "varnothing;": "∅", - "backepsilon;": "϶", - "blacksquare;": "▪", - "circledcirc;": "⊚", - "circleddash;": "⊝", - "CircleMinus;": "⊖", - "CircleTimes;": "⊗", - "curlyeqprec;": "⋞", - "curlyeqsucc;": "⋟", - "diamondsuit;": "♦", - "eqslantless;": "⪕", - "Equilibrium;": "⇌", - "expectation;": "ℰ", - "GreaterLess;": "≷", - "LeftCeiling;": "⌈", - "LessGreater;": "≶", - "MediumSpace;": " ", - "NotLessLess;": "≪̸", - "NotPrecedes;": "⊀", - "NotSucceeds;": "⊁", - "NotSuperset;": "⊃⃒", - "nRightarrow;": "⇏", - "nrightarrow;": "↛", - "OverBracket;": "⎴", - "preccurlyeq;": "≼", - "precnapprox;": "⪹", - "quaternions;": "ℍ", - "RightVector;": "⇀", - "Rrightarrow;": "⇛", - "RuleDelayed;": "⧴", - "SmallCircle;": "∘", - "SquareUnion;": "⊔", - "straightphi;": "ϕ", - "SubsetEqual;": "⊆", - "succcurlyeq;": "≽", - "succnapprox;": "⪺", - "thickapprox;": "≈", - "UpDownArrow;": "↕", - "Updownarrow;": "⇕", - "updownarrow;": "↕", - "VerticalBar;": "∣", - "blacklozenge;": "⧫", - "DownArrowBar;": "⤓", - "DownTeeArrow;": "↧", - "ExponentialE;": "ⅇ", - "exponentiale;": "ⅇ", - "GreaterEqual;": "≥", - "GreaterTilde;": "≳", - "HilbertSpace;": "ℋ", - "HumpDownHump;": "≎", - "Intersection;": "⋂", - "LeftArrowBar;": "⇤", - "LeftTeeArrow;": "↤", - "LeftTriangle;": "⊲", - "LeftUpVector;": "↿", - "NotCongruent;": "≢", - "NotHumpEqual;": "≏̸", - "NotLessEqual;": "≰", - "NotLessTilde;": "≴", - "Proportional;": "∝", - "RightCeiling;": "⌉", - "risingdotseq;": "≓", - "RoundImplies;": "⥰", - "ShortUpArrow;": "↑", - "SquareSubset;": "⊏", - "triangledown;": "▿", - "triangleleft;": "◃", - "UnderBracket;": "⎵", - "varsubsetneq;": "⊊︀", - "varsupsetneq;": "⊋︀", - "VerticalLine;": "|", - "ApplyFunction;": "⁡", - "bigtriangleup;": "△", - "blacktriangle;": "▴", - "DifferentialD;": "ⅆ", - "divideontimes;": "⋇", - "DoubleLeftTee;": "⫤", - "DoubleUpArrow;": "⇑", - "fallingdotseq;": "≒", - "hookleftarrow;": "↩", - "leftarrowtail;": "↢", - "leftharpoonup;": "↼", - "LeftTeeVector;": "⥚", - "LeftVectorBar;": "⥒", - "LessFullEqual;": "≦", - "LongLeftArrow;": "⟵", - "Longleftarrow;": "⟸", - "longleftarrow;": "⟵", - "looparrowleft;": "↫", - "measuredangle;": "∡", - "NotEqualTilde;": "≂̸", - "NotTildeEqual;": "≄", - "NotTildeTilde;": "≉", - "ntriangleleft;": "⋪", - "Poincareplane;": "ℌ", - "PrecedesEqual;": "⪯", - "PrecedesTilde;": "≾", - "RightArrowBar;": "⇥", - "RightTeeArrow;": "↦", - "RightTriangle;": "⊳", - "RightUpVector;": "↾", - "shortparallel;": "∥", - "smallsetminus;": "∖", - "SucceedsEqual;": "⪰", - "SucceedsTilde;": "≿", - "SupersetEqual;": "⊇", - "triangleright;": "▹", - "UpEquilibrium;": "⥮", - "upharpoonleft;": "↿", - "varsubsetneqq;": "⫋︀", - "varsupsetneqq;": "⫌︀", - "VerticalTilde;": "≀", - "VeryThinSpace;": " ", - "curvearrowleft;": "↶", - "DiacriticalDot;": "˙", - "doublebarwedge;": "⌆", - "DoubleRightTee;": "⊨", - "downdownarrows;": "⇊", - "DownLeftVector;": "↽", - "GreaterGreater;": "⪢", - "hookrightarrow;": "↪", - "HorizontalLine;": "─", - "InvisibleComma;": "⁣", - "InvisibleTimes;": "⁢", - "LeftDownVector;": "⇃", - "leftleftarrows;": "⇇", - "LeftRightArrow;": "↔", - "Leftrightarrow;": "⇔", - "leftrightarrow;": "↔", - "leftthreetimes;": "⋋", - "LessSlantEqual;": "⩽", - "LongRightArrow;": "⟶", - "Longrightarrow;": "⟹", - "longrightarrow;": "⟶", - "looparrowright;": "↬", - "LowerLeftArrow;": "↙", - "NestedLessLess;": "≪", - "NotGreaterLess;": "≹", - "NotLessGreater;": "≸", - "NotSubsetEqual;": "⊈", - "NotVerticalBar;": "∤", - "nshortparallel;": "∦", - "ntriangleright;": "⋫", - "OpenCurlyQuote;": "‘", - "ReverseElement;": "∋", - "rightarrowtail;": "↣", - "rightharpoonup;": "⇀", - "RightTeeVector;": "⥛", - "RightVectorBar;": "⥓", - "ShortDownArrow;": "↓", - "ShortLeftArrow;": "←", - "SquareSuperset;": "⊐", - "TildeFullEqual;": "≅", - "trianglelefteq;": "⊴", - "upharpoonright;": "↾", - "UpperLeftArrow;": "↖", - "ZeroWidthSpace;": "​", - "bigtriangledown;": "▽", - "circlearrowleft;": "↺", - "CloseCurlyQuote;": "’", - "ContourIntegral;": "∮", - "curvearrowright;": "↷", - "DoubleDownArrow;": "⇓", - "DoubleLeftArrow;": "⇐", - "downharpoonleft;": "⇃", - "DownRightVector;": "⇁", - "leftharpoondown;": "↽", - "leftrightarrows;": "⇆", - "LeftRightVector;": "⥎", - "LeftTriangleBar;": "⧏", - "LeftUpTeeVector;": "⥠", - "LeftUpVectorBar;": "⥘", - "LowerRightArrow;": "↘", - "nLeftrightarrow;": "⇎", - "nleftrightarrow;": "↮", - "NotGreaterEqual;": "≱", - "NotGreaterTilde;": "≵", - "NotHumpDownHump;": "≎̸", - "NotLeftTriangle;": "⋪", - "NotSquareSubset;": "⊏̸", - "ntrianglelefteq;": "⋬", - "OverParenthesis;": "⏜", - "RightDownVector;": "⇂", - "rightleftarrows;": "⇄", - "rightsquigarrow;": "↝", - "rightthreetimes;": "⋌", - "ShortRightArrow;": "→", - "straightepsilon;": "ϵ", - "trianglerighteq;": "⊵", - "UpperRightArrow;": "↗", - "vartriangleleft;": "⊲", - "circlearrowright;": "↻", - "DiacriticalAcute;": "´", - "DiacriticalGrave;": "`", - "DiacriticalTilde;": "˜", - "DoubleRightArrow;": "⇒", - "DownArrowUpArrow;": "⇵", - "downharpoonright;": "⇂", - "EmptySmallSquare;": "◻", - "GreaterEqualLess;": "⋛", - "GreaterFullEqual;": "≧", - "LeftAngleBracket;": "⟨", - "LeftUpDownVector;": "⥑", - "LessEqualGreater;": "⋚", - "NonBreakingSpace;": " ", - "NotPrecedesEqual;": "⪯̸", - "NotRightTriangle;": "⋫", - "NotSucceedsEqual;": "⪰̸", - "NotSucceedsTilde;": "≿̸", - "NotSupersetEqual;": "⊉", - "ntrianglerighteq;": "⋭", - "rightharpoondown;": "⇁", - "rightrightarrows;": "⇉", - "RightTriangleBar;": "⧐", - "RightUpTeeVector;": "⥜", - "RightUpVectorBar;": "⥔", - "twoheadleftarrow;": "↞", - "UnderParenthesis;": "⏝", - "UpArrowDownArrow;": "⇅", - "vartriangleright;": "⊳", - "blacktriangledown;": "▾", - "blacktriangleleft;": "◂", - "DoubleUpDownArrow;": "⇕", - "DoubleVerticalBar;": "∥", - "DownLeftTeeVector;": "⥞", - "DownLeftVectorBar;": "⥖", - "FilledSmallSquare;": "◼", - "GreaterSlantEqual;": "⩾", - "LeftDoubleBracket;": "⟦", - "LeftDownTeeVector;": "⥡", - "LeftDownVectorBar;": "⥙", - "leftrightharpoons;": "⇋", - "LeftTriangleEqual;": "⊴", - "NegativeThinSpace;": "​", - "NotGreaterGreater;": "≫̸", - "NotLessSlantEqual;": "⩽̸", - "NotNestedLessLess;": "⪡̸", - "NotReverseElement;": "∌", - "NotSquareSuperset;": "⊐̸", - "NotTildeFullEqual;": "≇", - "RightAngleBracket;": "⟩", - "rightleftharpoons;": "⇌", - "RightUpDownVector;": "⥏", - "SquareSubsetEqual;": "⊑", - "twoheadrightarrow;": "↠", - "VerticalSeparator;": "❘", - "blacktriangleright;": "▸", - "DownRightTeeVector;": "⥟", - "DownRightVectorBar;": "⥗", - "LongLeftRightArrow;": "⟷", - "Longleftrightarrow;": "⟺", - "longleftrightarrow;": "⟷", - "NegativeThickSpace;": "​", - "NotLeftTriangleBar;": "⧏̸", - "PrecedesSlantEqual;": "≼", - "ReverseEquilibrium;": "⇋", - "RightDoubleBracket;": "⟧", - "RightDownTeeVector;": "⥝", - "RightDownVectorBar;": "⥕", - "RightTriangleEqual;": "⊵", - "SquareIntersection;": "⊓", - "SucceedsSlantEqual;": "≽", - "DoubleLongLeftArrow;": "⟸", - "DownLeftRightVector;": "⥐", - "LeftArrowRightArrow;": "⇆", - "leftrightsquigarrow;": "↭", - "NegativeMediumSpace;": "​", - "NotGreaterFullEqual;": "≧̸", - "NotRightTriangleBar;": "⧐̸", - "RightArrowLeftArrow;": "⇄", - "SquareSupersetEqual;": "⊒", - "CapitalDifferentialD;": "ⅅ", - "DoubleLeftRightArrow;": "⇔", - "DoubleLongRightArrow;": "⟹", - "EmptyVerySmallSquare;": "▫", - "NestedGreaterGreater;": "≫", - "NotDoubleVerticalBar;": "∦", - "NotGreaterSlantEqual;": "⩾̸", - "NotLeftTriangleEqual;": "⋬", - "NotSquareSubsetEqual;": "⋢", - "OpenCurlyDoubleQuote;": "“", - "ReverseUpEquilibrium;": "⥯", - "CloseCurlyDoubleQuote;": "”", - "DoubleContourIntegral;": "∯", - "FilledVerySmallSquare;": "▪", - "NegativeVeryThinSpace;": "​", - "NotPrecedesSlantEqual;": "⋠", - "NotRightTriangleEqual;": "⋭", - "NotSucceedsSlantEqual;": "⋡", - "DiacriticalDoubleAcute;": "˝", - "NotSquareSupersetEqual;": "⋣", - "NotNestedGreaterGreater;": "⪢̸", - "ClockwiseContourIntegral;": "∲", - "DoubleLongLeftRightArrow;": "⟺", - "CounterClockwiseContourIntegral;": "∳" -}; - -// lazy compute this to make this file tree-shakable for browser -let maxCRNameLength; -const decodeHtml = (rawText, asAttr) => { - let offset = 0; - const end = rawText.length; - let decodedText = ''; - function advance(length) { - offset += length; - rawText = rawText.slice(length); - } - while (offset < end) { - const head = /&(?:#x?)?/i.exec(rawText); - if (!head || offset + head.index >= end) { - const remaining = end - offset; - decodedText += rawText.slice(0, remaining); - advance(remaining); - break; - } - // Advance to the "&". - decodedText += rawText.slice(0, head.index); - advance(head.index); - if (head[0] === '&') { - // Named character reference. - let name = ''; - let value = undefined; - if (/[0-9a-z]/i.test(rawText[1])) { - if (!maxCRNameLength) { - maxCRNameLength = Object.keys(namedCharacterReferences).reduce((max, name) => Math.max(max, name.length), 0); - } - for (let length = maxCRNameLength; !value && length > 0; --length) { - name = rawText.slice(1, 1 + length); - value = namedCharacterReferences[name]; - } - if (value) { - const semi = name.endsWith(';'); - if (asAttr && - !semi && - /[=a-z0-9]/i.test(rawText[name.length + 1] || '')) { - decodedText += '&' + name; - advance(1 + name.length); - } - else { - decodedText += value; - advance(1 + name.length); - } - } - else { - decodedText += '&' + name; - advance(1 + name.length); - } - } - else { - decodedText += '&'; - advance(1); - } - } - else { - // Numeric character reference. - const hex = head[0] === '&#x'; - const pattern = hex ? /^&#x([0-9a-f]+);?/i : /^&#([0-9]+);?/; - const body = pattern.exec(rawText); - if (!body) { - decodedText += head[0]; - advance(head[0].length); - } - else { - // https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state - let cp = Number.parseInt(body[1], hex ? 16 : 10); - if (cp === 0) { - cp = 0xfffd; - } - else if (cp > 0x10ffff) { - cp = 0xfffd; - } - else if (cp >= 0xd800 && cp <= 0xdfff) { - cp = 0xfffd; - } - else if ((cp >= 0xfdd0 && cp <= 0xfdef) || (cp & 0xfffe) === 0xfffe) ; - else if ((cp >= 0x01 && cp <= 0x08) || - cp === 0x0b || - (cp >= 0x0d && cp <= 0x1f) || - (cp >= 0x7f && cp <= 0x9f)) { - cp = CCR_REPLACEMENTS[cp] || cp; - } - decodedText += String.fromCodePoint(cp); - advance(body[0].length); - } - } - } - return decodedText; -}; -// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state -const CCR_REPLACEMENTS = { - 0x80: 0x20ac, - 0x82: 0x201a, - 0x83: 0x0192, - 0x84: 0x201e, - 0x85: 0x2026, - 0x86: 0x2020, - 0x87: 0x2021, - 0x88: 0x02c6, - 0x89: 0x2030, - 0x8a: 0x0160, - 0x8b: 0x2039, - 0x8c: 0x0152, - 0x8e: 0x017d, - 0x91: 0x2018, - 0x92: 0x2019, - 0x93: 0x201c, - 0x94: 0x201d, - 0x95: 0x2022, - 0x96: 0x2013, - 0x97: 0x2014, - 0x98: 0x02dc, - 0x99: 0x2122, - 0x9a: 0x0161, - 0x9b: 0x203a, - 0x9c: 0x0153, - 0x9e: 0x017e, - 0x9f: 0x0178 -}; - -const isRawTextContainer = /*#__PURE__*/ shared.makeMap('style,iframe,script,noscript', true); const parserOptions = { - isVoidTag: shared.isVoidTag, - isNativeTag: tag => shared.isHTMLTag(tag) || shared.isSVGTag(tag), - isPreTag: tag => tag === 'pre', - decodeEntities: decodeHtml, - isBuiltInComponent: (tag) => { - if (compilerCore.isBuiltInType(tag, `Transition`)) { - return TRANSITION; - } - else if (compilerCore.isBuiltInType(tag, `TransitionGroup`)) { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent) { - let ns = parent ? parent.ns : 0 /* HTML */; - if (parent && ns === 2 /* MATH_ML */) { - if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ && - a.name === 'encoding' && - a.value != null && - (a.value.content === 'text/html' || - a.value.content === 'application/xhtml+xml'))) { - ns = 0 /* HTML */; - } - } - else if (/^m(?:[ions]|text)$/.test(parent.tag) && - tag !== 'mglyph' && - tag !== 'malignmark') { - ns = 0 /* HTML */; - } - } - else if (parent && ns === 1 /* SVG */) { - if (parent.tag === 'foreignObject' || - parent.tag === 'desc' || - parent.tag === 'title') { - ns = 0 /* HTML */; - } - } - if (ns === 0 /* HTML */) { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (tag === 'math') { - return 2 /* MATH_ML */; - } - } - return ns; - }, - // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments - getTextMode({ tag, ns }) { - if (ns === 0 /* HTML */) { - if (tag === 'textarea' || tag === 'title') { - return 1 /* RCDATA */; - } - if (isRawTextContainer(tag)) { - return 2 /* RAWTEXT */; - } - } - return 0 /* DATA */; + parseMode: "html", + isVoidTag: shared.isVoidTag, + isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + decodeEntities: void 0, + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } }; -// Parse inline CSS strings for static style attributes into an object. -// This is a NodeTransform since it works on the static `style` attribute and -// converts it into a dynamic equivalent: -// style="color: red" -> :style='{ "color": "red" }' -// It is then processed by `transformElement` and included in the generated -// props. -const transformStyle = node => { - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((p, i) => { - if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) { - // replace p with an expression node - node.props[i] = { - type: 7 /* DIRECTIVE */, - name: `bind`, - arg: compilerCore.createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: compilerCore.createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } }; const parseInlineCSS = (cssText, loc) => { - const normalized = shared.parseStringStyle(cssText); - return compilerCore.createSimpleExpression(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */); + const normalized = shared.parseStringStyle(cssText); + return compilerCore.createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); }; function createDOMCompilerError(code, loc) { - return compilerCore.createCompilerError(code, loc, DOMErrorMessages ); + return compilerCore.createCompilerError( + code, + loc, + DOMErrorMessages + ); } +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; const DOMErrorMessages = { - [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`, - [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`, - [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`, - [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`, - [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`, - [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`, - [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`, - [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` }; const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - compilerCore.createObjectProperty(compilerCore.createSimpleExpression(`innerHTML`, true, loc), exp || compilerCore.createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + compilerCore.createObjectProperty( + compilerCore.createSimpleExpression(`innerHTML`, true, loc), + exp || compilerCore.createSimpleExpression("", true) + ) + ] + }; }; const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - compilerCore.createObjectProperty(compilerCore.createSimpleExpression(`textContent`, true), exp - ? compilerCore.getConstantType(exp, context) > 0 - ? exp - : compilerCore.createCallExpression(context.helperString(compilerCore.TO_DISPLAY_STRING), [exp], loc) - : compilerCore.createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + compilerCore.createObjectProperty( + compilerCore.createSimpleExpression(`textContent`, true), + exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression( + context.helperString(compilerCore.TO_DISPLAY_STRING), + [exp], + loc + ) : compilerCore.createSimpleExpression("", true) + ) + ] + }; }; const transformModel = (dir, node, context) => { - const baseResult = compilerCore.transformModel(dir, node, context); - // base transform has errors OR component v-model (only need props) - if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) { - return baseResult; - } - if (dir.arg) { - context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc)); - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === 'input' || - tag === 'textarea' || - tag === 'select' || - isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === 'input' || isCustomElement) { - const type = compilerCore.findProp(node, `type`); - if (type) { - if (type.type === 7 /* DIRECTIVE */) { - // :type="foo" - directiveToUse = V_MODEL_DYNAMIC; - } - else if (type.value) { - switch (type.value.content) { - case 'radio': - directiveToUse = V_MODEL_RADIO; - break; - case 'checkbox': - directiveToUse = V_MODEL_CHECKBOX; - break; - case 'file': - isInvalidType = true; - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - } - } - } - else if (compilerCore.hasDynamicKeyVBind(node)) { - // element has bindings with dynamic keys, which can possibly contain - // "type". - directiveToUse = V_MODEL_DYNAMIC; - } - else ; - } - else if (tag === 'select') { - directiveToUse = V_MODEL_SELECT; - } - else ; - // inject runtime directive - // by returning the helper symbol via needRuntime - // the import will replaced a resolveDirective call. - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - // native vmodel doesn't need the `modelValue` props since they are also - // passed to the runtime as `binding.value`. removing it reduces code size. - baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === 'modelValue')); + const baseResult = compilerCore.transformModel(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = compilerCore.findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + } + } + } else if (compilerCore.hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else ; + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else ; + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; }; -const isEventOptionModifier = /*#__PURE__*/ shared.makeMap(`passive,once,capture`); -const isNonKeyModifier = /*#__PURE__*/ shared.makeMap( -// event propagation management -`stop,prevent,self,` + - // system modifiers + exact - `ctrl,shift,alt,meta,exact,` + - // mouse - `middle`); -// left & right could be mouse or key modifiers based on event type -const maybeKeyModifier = /*#__PURE__*/ shared.makeMap('left,right'); -const isKeyboardEvent = /*#__PURE__*/ shared.makeMap(`onkeyup,onkeydown,onkeypress`, true); +const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ shared.makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ shared.makeMap( + `onkeyup,onkeydown,onkeypress`, + true +); const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i]; - if (modifier === 'native' && - compilerCore.checkCompatEnabled("COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */, context, loc)) { - eventOptionModifiers.push(modifier); + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + if (modifier === "native" && compilerCore.checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (compilerCore.isStaticExp(key)) { + if (isKeyboardEvent(key.content)) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); } - else if (isEventOptionModifier(modifier)) { - // eventOptionModifiers: modifiers for addEventListener() options, - // e.g. .passive & .capture - eventOptionModifiers.push(modifier); - } - else { - // runtimeModifiers: modifiers that needs runtime guards - if (maybeKeyModifier(modifier)) { - if (compilerCore.isStaticExp(key)) { - if (isKeyboardEvent(key.content)) { - keyModifiers.push(modifier); - } - else { - nonKeyModifiers.push(modifier); - } - } - else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } - else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } - else { - keyModifiers.push(modifier); - } - } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); } + } } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; }; const transformClick = (key, event) => { - const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === 'onclick'; - return isStaticClick - ? compilerCore.createSimpleExpression(event, true) - : key.type !== 4 /* SIMPLE_EXPRESSION */ - ? compilerCore.createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) - : key; + const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; }; const transformOn = (dir, node, context) => { - return compilerCore.transformOn(dir, node, context, baseResult => { - const { modifiers } = dir; - if (!modifiers.length) - return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - // normalize click.right and click.middle since they don't actually fire - if (nonKeyModifiers.includes('right')) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes('middle')) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && - // if event name is dynamic, always wrap with keys guard - (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content))) { - handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(''); - key = compilerCore.isStaticExp(key) - ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) - : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [compilerCore.createObjectProperty(key, handlerExp)] - }; - }); + return compilerCore.transformOn(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) + return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content))) { + handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join(""); + key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [compilerCore.createObjectProperty(key, handlerExp)] + }; + }); }; const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc)); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; }; -/** - * This module is Node-only. - */ -/** - * Regex for replacing placeholders for embedded constant variables - * (e.g. import URL string constants generated by compiler-sfc) - */ const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; -/** - * Turn eligible hoisted static trees into stringified static nodes, e.g. - * - * ```js - * const _hoisted_1 = createStaticVNode(`<div class="foo">bar</div>`) - * ``` - * - * A single static vnode can contain stringified content for **multiple** - * consecutive nodes (element and plain text), called a "chunk". - * `@vue/runtime-dom` will create the content via innerHTML in a hidden - * container element and insert all the nodes in place. The call must also - * provide the number of nodes contained in the chunk so that during hydration - * we can know how many nodes the static vnode should adopt. - * - * The optimization scans a children list that contains hoisted nodes, and - * tries to find the largest chunk of consecutive hoisted nodes before running - * into a non-hoisted node or the end of the list. A chunk is then converted - * into a single static vnode and replaces the hoisted expression of the first - * node in the chunk. Other nodes in the chunk are considered "merged" and - * therefore removed from both the hoist list and the children array. - * - * This optimization is only performed in Node.js. - */ const stringifyStatic = (children, context, parent) => { - // bail stringification for slot content - if (context.scopes.vSlot > 0) { - return; - } - let nc = 0; // current node count - let ec = 0; // current element with binding count - const currentChunk = []; - const stringifyCurrentChunk = (currentIndex) => { - if (nc >= 20 /* NODE_COUNT */ || - ec >= 5 /* ELEMENT_WITH_BINDING_COUNT */) { - // combine all currently eligible nodes into a single static vnode call - const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [ - JSON.stringify(currentChunk.map(node => stringifyNode(node, context)).join('')).replace(expReplaceRE, `" + $1 + "`), - // the 2nd argument indicates the number of DOM nodes this static vnode - // will insert / hydrate - String(currentChunk.length) - ]); - // replace the first node's hoisted expression with the static vnode call - replaceHoist(currentChunk[0], staticCall, context); - if (currentChunk.length > 1) { - for (let i = 1; i < currentChunk.length; i++) { - // for the merged nodes, set their hoisted expression to null - replaceHoist(currentChunk[i], null, context); - } - // also remove merged nodes from children - const deleteCount = currentChunk.length - 1; - children.splice(currentIndex - currentChunk.length + 1, deleteCount); - return deleteCount; - } + if (context.scopes.vSlot > 0) { + return; + } + let nc = 0; + let ec = 0; + const currentChunk = []; + const stringifyCurrentChunk = (currentIndex) => { + if (nc >= 20 || ec >= 5) { + const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [ + JSON.stringify( + currentChunk.map((node) => stringifyNode(node, context)).join("") + ).replace(expReplaceRE, `" + $1 + "`), + // the 2nd argument indicates the number of DOM nodes this static vnode + // will insert / hydrate + String(currentChunk.length) + ]); + replaceHoist(currentChunk[0], staticCall, context); + if (currentChunk.length > 1) { + for (let i2 = 1; i2 < currentChunk.length; i2++) { + replaceHoist(currentChunk[i2], null, context); } - return 0; - }; - let i = 0; - for (; i < children.length; i++) { - const child = children[i]; - const hoisted = getHoistedNode(child); - if (hoisted) { - // presence of hoisted means child must be a stringifiable node - const node = child; - const result = analyzeNode(node); - if (result) { - // node is stringifiable, record state - nc += result[0]; - ec += result[1]; - currentChunk.push(node); - continue; - } - } - // we only reach here if we ran into a node that is not stringifiable - // check if currently analyzed nodes meet criteria for stringification. - // adjust iteration index - i -= stringifyCurrentChunk(i); - // reset state - nc = 0; - ec = 0; - currentChunk.length = 0; + const deleteCount = currentChunk.length - 1; + children.splice(currentIndex - currentChunk.length + 1, deleteCount); + return deleteCount; + } } - // in case the last node was also stringifiable - stringifyCurrentChunk(i); + return 0; + }; + let i = 0; + for (; i < children.length; i++) { + const child = children[i]; + const hoisted = getHoistedNode(child); + if (hoisted) { + const node = child; + const result = analyzeNode(node); + if (result) { + nc += result[0]; + ec += result[1]; + currentChunk.push(node); + continue; + } + } + i -= stringifyCurrentChunk(i); + nc = 0; + ec = 0; + currentChunk.length = 0; + } + stringifyCurrentChunk(i); }; -const getHoistedNode = (node) => ((node.type === 1 /* ELEMENT */ && node.tagType === 0 /* ELEMENT */) || - node.type == 12 /* TEXT_CALL */) && - node.codegenNode && - node.codegenNode.type === 4 /* SIMPLE_EXPRESSION */ && - node.codegenNode.hoisted; +const getHoistedNode = (node) => (node.type === 1 && node.tagType === 0 || node.type == 12) && node.codegenNode && node.codegenNode.type === 4 && node.codegenNode.hoisted; const dataAriaRE = /^(data|aria)-/; const isStringifiableAttr = (name, ns) => { - return ((ns === 0 /* HTML */ - ? shared.isKnownHtmlAttr(name) - : ns === 1 /* SVG */ - ? shared.isKnownSvgAttr(name) - : false) || dataAriaRE.test(name)); + return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : false) || dataAriaRE.test(name); }; const replaceHoist = (node, replacement, context) => { - const hoistToReplace = node.codegenNode.hoisted; - context.hoists[context.hoists.indexOf(hoistToReplace)] = replacement; + const hoistToReplace = node.codegenNode.hoisted; + context.hoists[context.hoists.indexOf(hoistToReplace)] = replacement; }; -const isNonStringifiable = /*#__PURE__*/ shared.makeMap(`caption,thead,tr,th,tbody,td,tfoot,colgroup,col`); -/** - * for a hoisted node, analyze it and return: - * - false: bailed (contains non-stringifiable props or runtime constant) - * - [nc, ec] where - * - nc is the number of nodes inside - * - ec is the number of element with bindings inside - */ +const isNonStringifiable = /* @__PURE__ */ shared.makeMap( + `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` +); function analyzeNode(node) { - if (node.type === 1 /* ELEMENT */ && isNonStringifiable(node.tag)) { - return false; - } - if (node.type === 12 /* TEXT_CALL */) { - return [1, 0]; - } - let nc = 1; // node count - let ec = node.props.length > 0 ? 1 : 0; // element w/ binding count - let bailed = false; - const bail = () => { - bailed = true; - return false; - }; - // TODO: check for cases where using innerHTML will result in different - // output compared to imperative node insertions. - // probably only need to check for most common case - // i.e. non-phrasing-content tags inside `<p>` - function walk(node) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - // bail on non-attr bindings - if (p.type === 6 /* ATTRIBUTE */ && - !isStringifiableAttr(p.name, node.ns)) { - return bail(); - } - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind') { - // bail on non-attr bindings - if (p.arg && - (p.arg.type === 8 /* COMPOUND_EXPRESSION */ || - (p.arg.isStatic && !isStringifiableAttr(p.arg.content, node.ns)))) { - return bail(); - } - if (p.exp && - (p.exp.type === 8 /* COMPOUND_EXPRESSION */ || - p.exp.constType < 3 /* CAN_STRINGIFY */)) { - return bail(); - } - } + if (node.type === 1 && isNonStringifiable(node.tag)) { + return false; + } + if (node.type === 12) { + return [1, 0]; + } + let nc = 1; + let ec = node.props.length > 0 ? 1 : 0; + let bailed = false; + const bail = () => { + bailed = true; + return false; + }; + function walk(node2) { + for (let i = 0; i < node2.props.length; i++) { + const p = node2.props[i]; + if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { + return bail(); + } + if (p.type === 7 && p.name === "bind") { + if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { + return bail(); } - for (let i = 0; i < node.children.length; i++) { - nc++; - const child = node.children[i]; - if (child.type === 1 /* ELEMENT */) { - if (child.props.length > 0) { - ec++; - } - walk(child); - if (bailed) { - return false; - } - } + if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { + return bail(); } - return true; + } } - return walk(node) ? [nc, ec] : false; + for (let i = 0; i < node2.children.length; i++) { + nc++; + const child = node2.children[i]; + if (child.type === 1) { + if (child.props.length > 0) { + ec++; + } + walk(child); + if (bailed) { + return false; + } + } + } + return true; + } + return walk(node) ? [nc, ec] : false; } function stringifyNode(node, context) { - if (shared.isString(node)) { - return node; - } - if (shared.isSymbol(node)) { - return ``; - } - switch (node.type) { - case 1 /* ELEMENT */: - return stringifyElement(node, context); - case 2 /* TEXT */: - return shared.escapeHtml(node.content); - case 3 /* COMMENT */: - return `<!--${shared.escapeHtml(node.content)}-->`; - case 5 /* INTERPOLATION */: - return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content))); - case 8 /* COMPOUND_EXPRESSION */: - return shared.escapeHtml(evaluateConstant(node)); - case 12 /* TEXT_CALL */: - return stringifyNode(node.content, context); - default: - // static trees will not contain if/for nodes - return ''; - } + if (shared.isString(node)) { + return node; + } + if (shared.isSymbol(node)) { + return ``; + } + switch (node.type) { + case 1: + return stringifyElement(node, context); + case 2: + return shared.escapeHtml(node.content); + case 3: + return `<!--${shared.escapeHtml(node.content)}-->`; + case 5: + return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content))); + case 8: + return shared.escapeHtml(evaluateConstant(node)); + case 12: + return stringifyNode(node.content, context); + default: + return ""; + } } function stringifyElement(node, context) { - let res = `<${node.tag}`; - let innerHTML = ''; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - res += ` ${p.name}`; - if (p.value) { - res += `="${shared.escapeHtml(p.value.content)}"`; - } + let res = `<${node.tag}`; + let innerHTML = ""; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + res += ` ${p.name}`; + if (p.value) { + res += `="${shared.escapeHtml(p.value.content)}"`; + } + } else if (p.type === 7) { + if (p.name === "bind") { + const exp = p.exp; + if (exp.content[0] === "_") { + res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; + continue; } - else if (p.type === 7 /* DIRECTIVE */) { - if (p.name === 'bind') { - const exp = p.exp; - if (exp.content[0] === '_') { - // internally generated string constant references - // e.g. imported URL strings via compiler-sfc transformAssetUrl plugin - res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; - continue; - } - // constant v-bind, e.g. :foo="1" - let evaluated = evaluateConstant(exp); - if (evaluated != null) { - const arg = p.arg && p.arg.content; - if (arg === 'class') { - evaluated = shared.normalizeClass(evaluated); - } - else if (arg === 'style') { - evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated)); - } - res += ` ${p.arg.content}="${shared.escapeHtml(evaluated)}"`; - } - } - else if (p.name === 'html') { - // #5439 v-html with constant value - // not sure why would anyone do this but it can happen - innerHTML = evaluateConstant(p.exp); - } - else if (p.name === 'text') { - innerHTML = shared.escapeHtml(shared.toDisplayString(evaluateConstant(p.exp))); - } + if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") { + continue; } - } - if (context.scopeId) { - res += ` ${context.scopeId}`; - } - res += `>`; - if (innerHTML) { - res += innerHTML; - } - else { - for (let i = 0; i < node.children.length; i++) { - res += stringifyNode(node.children[i], context); + let evaluated = evaluateConstant(exp); + if (evaluated != null) { + const arg = p.arg && p.arg.content; + if (arg === "class") { + evaluated = shared.normalizeClass(evaluated); + } else if (arg === "style") { + evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated)); + } + res += ` ${p.arg.content}="${shared.escapeHtml( + evaluated + )}"`; } + } else if (p.name === "html") { + innerHTML = evaluateConstant(p.exp); + } else if (p.name === "text") { + innerHTML = shared.escapeHtml( + shared.toDisplayString(evaluateConstant(p.exp)) + ); + } } - if (!shared.isVoidTag(node.tag)) { - res += `</${node.tag}>`; + } + if (context.scopeId) { + res += ` ${context.scopeId}`; + } + res += `>`; + if (innerHTML) { + res += innerHTML; + } else { + for (let i = 0; i < node.children.length; i++) { + res += stringifyNode(node.children[i], context); } - return res; + } + if (!shared.isVoidTag(node.tag)) { + res += `</${node.tag}>`; + } + return res; } -// __UNSAFE__ -// Reason: eval. -// It's technically safe to eval because only constant expressions are possible -// here, e.g. `{{ 1 }}` or `{{ 'foo' }}` -// in addition, constant exps bail on presence of parens so you can't even -// run JSFuck in here. But we mark it unsafe for security review purposes. -// (see compiler-core/src/transforms/transformExpression) function evaluateConstant(exp) { - if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - return new Function(`return ${exp.content}`)(); - } - else { - // compound - let res = ``; - exp.children.forEach(c => { - if (shared.isString(c) || shared.isSymbol(c)) { - return; - } - if (c.type === 2 /* TEXT */) { - res += c.content; - } - else if (c.type === 5 /* INTERPOLATION */) { - res += shared.toDisplayString(evaluateConstant(c.content)); - } - else { - res += evaluateConstant(c); - } - }); - return res; - } + if (exp.type === 4) { + return new Function(`return (${exp.content})`)(); + } else { + let res = ``; + exp.children.forEach((c) => { + if (shared.isString(c) || shared.isSymbol(c)) { + return; + } + if (c.type === 2) { + res += c.content; + } else if (c.type === 5) { + res += shared.toDisplayString(evaluateConstant(c.content)); + } else { + res += evaluateConstant(c); + } + }); + return res; + } } const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - (node.tag === 'script' || node.tag === 'style')) { - context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc)); - context.removeNode(); - } + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.removeNode(); + } }; const DOMNodeTransforms = [ - transformStyle, - ...([]) + transformStyle, + ...[] ]; const DOMDirectiveTransforms = { - cloak: compilerCore.noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - on: transformOn, - show: transformShow + cloak: compilerCore.noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow }; -function compile(template, options = {}) { - return compilerCore.baseCompile(template, shared.extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...(options.nodeTransforms || []) - ], - directiveTransforms: shared.extend({}, DOMDirectiveTransforms, options.directiveTransforms || {}), - transformHoist: stringifyStatic - })); +function compile(src, options = {}) { + return compilerCore.baseCompile( + src, + shared.extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: shared.extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: stringifyStatic + }) + ); } function parse(template, options = {}) { - return compilerCore.baseParse(template, shared.extend({}, parserOptions, options)); + return compilerCore.baseParse(template, shared.extend({}, parserOptions, options)); } -Object.keys(compilerCore).forEach(function (k) { - if (k !== 'default') exports[k] = compilerCore[k]; -}); exports.DOMDirectiveTransforms = DOMDirectiveTransforms; +exports.DOMErrorCodes = DOMErrorCodes; +exports.DOMErrorMessages = DOMErrorMessages; exports.DOMNodeTransforms = DOMNodeTransforms; exports.TRANSITION = TRANSITION; exports.TRANSITION_GROUP = TRANSITION_GROUP; @@ -3072,3 +652,6 @@ exports.createDOMCompilerError = createDOMCompilerError; exports.parse = parse; exports.parserOptions = parserOptions; exports.transformStyle = transformStyle; +Object.keys(compilerCore).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k]; +}); diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts b/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts index 11cf482c..b631ed83 100644 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +++ b/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts @@ -1,66 +1,45 @@ -import { CodegenResult } from '@vue/compiler-core'; -import { CompilerError } from '@vue/compiler-core'; -import { CompilerOptions } from '@vue/compiler-core'; -import { DirectiveTransform } from '@vue/compiler-core'; -import { NodeTransform } from '@vue/compiler-core'; -import { ParserOptions } from '@vue/compiler-core'; -import { RootNode } from '@vue/compiler-core'; -import { SourceLocation } from '@vue/compiler-core'; - -export declare function compile(template: string, options?: CompilerOptions): CodegenResult; - -export declare function createDOMCompilerError(code: DOMErrorCodes, loc?: SourceLocation): DOMCompilerError; - -declare interface DOMCompilerError extends CompilerError { - code: DOMErrorCodes; -} - -export declare const DOMDirectiveTransforms: Record<string, DirectiveTransform>; - -export declare const enum DOMErrorCodes { - X_V_HTML_NO_EXPRESSION = 50, - X_V_HTML_WITH_CHILDREN = 51, - X_V_TEXT_NO_EXPRESSION = 52, - X_V_TEXT_WITH_CHILDREN = 53, - X_V_MODEL_ON_INVALID_ELEMENT = 54, - X_V_MODEL_ARG_ON_ELEMENT = 55, - X_V_MODEL_ON_FILE_INPUT_ELEMENT = 56, - X_V_MODEL_UNNECESSARY_VALUE = 57, - X_V_SHOW_NO_EXPRESSION = 58, - X_TRANSITION_INVALID_CHILDREN = 59, - X_IGNORED_SIDE_EFFECT_TAG = 60, - __EXTEND_POINT__ = 61 -} - -export declare const DOMNodeTransforms: NodeTransform[]; - -export declare function parse(template: string, options?: ParserOptions): RootNode; +import { ParserOptions, NodeTransform, SourceLocation, CompilerError, DirectiveTransform, RootNode, CompilerOptions, CodegenResult } from '@vue/compiler-core'; +export * from '@vue/compiler-core'; export declare const parserOptions: ParserOptions; -export declare const transformStyle: NodeTransform; - +export declare const V_MODEL_RADIO: unique symbol; +export declare const V_MODEL_CHECKBOX: unique symbol; +export declare const V_MODEL_TEXT: unique symbol; +export declare const V_MODEL_SELECT: unique symbol; +export declare const V_MODEL_DYNAMIC: unique symbol; +export declare const V_ON_WITH_MODIFIERS: unique symbol; +export declare const V_ON_WITH_KEYS: unique symbol; +export declare const V_SHOW: unique symbol; export declare const TRANSITION: unique symbol; - export declare const TRANSITION_GROUP: unique symbol; -export declare const V_MODEL_CHECKBOX: unique symbol; +export declare const transformStyle: NodeTransform; -export declare const V_MODEL_DYNAMIC: unique symbol; +interface DOMCompilerError extends CompilerError { + code: DOMErrorCodes; +} +export declare function createDOMCompilerError(code: DOMErrorCodes, loc?: SourceLocation): DOMCompilerError; +export declare enum DOMErrorCodes { + X_V_HTML_NO_EXPRESSION = 53, + X_V_HTML_WITH_CHILDREN = 54, + X_V_TEXT_NO_EXPRESSION = 55, + X_V_TEXT_WITH_CHILDREN = 56, + X_V_MODEL_ON_INVALID_ELEMENT = 57, + X_V_MODEL_ARG_ON_ELEMENT = 58, + X_V_MODEL_ON_FILE_INPUT_ELEMENT = 59, + X_V_MODEL_UNNECESSARY_VALUE = 60, + X_V_SHOW_NO_EXPRESSION = 61, + X_TRANSITION_INVALID_CHILDREN = 62, + X_IGNORED_SIDE_EFFECT_TAG = 63, + __EXTEND_POINT__ = 64 +} +export declare const DOMErrorMessages: { + [code: number]: string; +}; -export declare const V_MODEL_RADIO: unique symbol; +export declare const DOMNodeTransforms: NodeTransform[]; +export declare const DOMDirectiveTransforms: Record<string, DirectiveTransform>; +export declare function compile(src: string | RootNode, options?: CompilerOptions): CodegenResult; +export declare function parse(template: string, options?: ParserOptions): RootNode; -export declare const V_MODEL_SELECT: unique symbol; - -export declare const V_MODEL_TEXT: unique symbol; - -export declare const V_ON_WITH_KEYS: unique symbol; - -export declare const V_ON_WITH_MODIFIERS: unique symbol; - -export declare const V_SHOW: unique symbol; - - -export * from "@vue/compiler-core"; - -export { } diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js index 8251b159..0d099a9c 100644 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +++ b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js @@ -1,270 +1,135 @@ /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ +* @vue/compiler-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } -/** - * dev only flag -> name mapping - */ +const EMPTY_OBJ = Object.freeze({}) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const extend = Object.assign; +const isArray = Array.isArray; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); +}); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); + const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` }; -/** - * Dev only - */ const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" }; const range = 2; function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; } + } + break; } - return res.join('\n'); + } + return res.join("\n"); } const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; } -// These tag configs are shared between compiler-dom and runtime-dom, so they -// https://developer.mozilla.org/en-US/docs/Web/HTML/Element -const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; -// https://developer.mozilla.org/en-US/docs/Web/SVG/Element -const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; -const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS); - -const EMPTY_OBJ = Object.freeze({}) - ; -Object.freeze([]) ; -const NOOP = () => { }; -/** - * Always return false. - */ -const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const extend = Object.assign; -const isArray = Array.isArray; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; -const isReservedProp = /*#__PURE__*/ makeMap( -// the leading comma is intentional so empty string "" is also included -',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); -const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); -const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); -}; -const camelizeRE = /-(\w)/g; -/** - * @private - */ -const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); -}); -const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -/** - * @private - */ -const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) - ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '<!--' in comment.", - [17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */]: 'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).', - [18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */]: 'Unquoted attribute value cannot contain U+0022 ("), U+0027 (\'), U+003C (<), U+003D (=), and U+0060 (`).', - [19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */]: "Attribute name cannot start with '='.", - [21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */]: "'<?' is allowed only in XML context.", - [20 /* UNEXPECTED_NULL_CHARACTER */]: `Unexpected null character.`, - [22 /* UNEXPECTED_SOLIDUS_IN_TAG */]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23 /* X_INVALID_END_TAG */]: 'Invalid end tag.', - [24 /* X_MISSING_END_TAG */]: 'Element is missing end tag.', - [25 /* X_MISSING_INTERPOLATION_END */]: 'Interpolation end sign was not found.', - [27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */]: 'End bracket for dynamic directive argument was not found. ' + - 'Note that dynamic directive argument cannot contain spaces.', - [26 /* X_MISSING_DIRECTIVE_NAME */]: 'Legal directive name was expected.', - // transform errors - [28 /* X_V_IF_NO_EXPRESSION */]: `v-if/v-else-if is missing expression.`, - [29 /* X_V_IF_SAME_KEY */]: `v-if/else branches must use unique keys.`, - [30 /* X_V_ELSE_NO_ADJACENT_IF */]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31 /* X_V_FOR_NO_EXPRESSION */]: `v-for is missing expression.`, - [32 /* X_V_FOR_MALFORMED_EXPRESSION */]: `v-for has invalid expression.`, - [33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */]: `<template v-for> key should be placed on the <template> tag.`, - [34 /* X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`, - [35 /* X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`, - [36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`, - [37 /* X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` + - `When there are multiple named slots, all slots should use <template> ` + - `syntax to avoid scope ambiguity.`, - [38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `, - [39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */]: `Extraneous children found when component already has explicitly named ` + - `default slot. These children will be ignored.`, - [40 /* X_V_SLOT_MISPLACED */]: `v-slot can only be used on components or <template> tags.`, - [41 /* X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`, - [42 /* X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`, - [43 /* X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44 /* X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `, - [45 /* X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`, - // generic errors - [46 /* X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`, - [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [50 /* __EXTEND_POINT__ */]: `` -}; +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); const FRAGMENT = Symbol(`Fragment` ); const TELEPORT = Symbol(`Teleport` ); @@ -280,7 +145,9 @@ const CREATE_COMMENT = Symbol(`createCommentVNode` ); const CREATE_TEXT = Symbol(`createTextVNode` ); const CREATE_STATIC = Symbol(`createStaticVNode` ); const RESOLVE_COMPONENT = Symbol(`resolveComponent` ); -const RESOLVE_DYNAMIC_COMPONENT = Symbol(`resolveDynamicComponent` ); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` +); const RESOLVE_DIRECTIVE = Symbol(`resolveDirective` ); const RESOLVE_FILTER = Symbol(`resolveFilter` ); const WITH_DIRECTIVES = Symbol(`withDirectives` ); @@ -305,4709 +172,5610 @@ const UNREF = Symbol(`unref` ); const IS_REF = Symbol(`isRef` ); const WITH_MEMO = Symbol(`withMemo` ); const IS_MEMO_SAME = Symbol(`isMemoSame` ); -// Name mapping for runtime helpers that need to be imported from 'vue' in -// generated code. Make sure these are correctly exported in the runtime! -// Using `any` here because TS doesn't allow symbols as index type. const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` }; function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach(s => { - helperNameMap[s] = helpers[s]; - }); + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); } -// AST Utilities --------------------------------------------------------------- -// Some expressions, e.g. sequence and conditional expressions, are never -// associated with template nodes, so their source locations are just a stub. -// Container types like CompoundExpression also don't need a real location. -const locStub = { - source: '', - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 } +const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" }; -function createRoot(children, loc = locStub) { - return { - type: 0 /* ROOT */, - children, - helpers: [], - components: [], - directives: [], - hoists: [], - imports: [], - cached: 0, - temps: 0, - codegenNode: undefined, - loc - }; +const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" +}; +const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" +}; +const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_HOIST": 2, + "2": "CAN_HOIST", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" +}; +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: 0, + temps: 0, + codegenNode: void 0, + loc: locStub + }; } function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } - else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); } - return { - type: 13 /* VNODE_CALL */, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; } function createArrayExpression(elements, loc = locStub) { - return { - type: 17 /* JS_ARRAY_EXPRESSION */, - loc, - elements - }; + return { + type: 17, + loc, + elements + }; } function createObjectExpression(properties, loc = locStub) { - return { - type: 15 /* JS_OBJECT_EXPRESSION */, - loc, - properties - }; + return { + type: 15, + loc, + properties + }; } function createObjectProperty(key, value) { - return { - type: 16 /* JS_PROPERTY */, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; } -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0 /* NOT_CONSTANT */) { - return { - type: 4 /* SIMPLE_EXPRESSION */, - loc, - content, - isStatic, - constType: isStatic ? 3 /* CAN_STRINGIFY */ : constType - }; +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; } function createInterpolation(content, loc) { - return { - type: 5 /* INTERPOLATION */, - loc, - content: isString(content) - ? createSimpleExpression(content, false, loc) - : content - }; + return { + type: 5, + loc, + content: isString(content) ? createSimpleExpression(content, false, loc) : content + }; } function createCompoundExpression(children, loc = locStub) { - return { - type: 8 /* COMPOUND_EXPRESSION */, - loc, - children - }; + return { + type: 8, + loc, + children + }; } function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee, - arguments: args - }; + return { + type: 14, + loc, + callee, + arguments: args + }; } -function createFunctionExpression(params, returns = undefined, newline = false, isSlot = false, loc = locStub) { - return { - type: 18 /* JS_FUNCTION_EXPRESSION */, - params, - returns, - newline, - isSlot, - loc - }; +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; } function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19 /* JS_CONDITIONAL_EXPRESSION */, - test, - consequent, - alternate, - newline, - loc: locStub - }; + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; } function createCacheExpression(index, value, isVNode = false) { - return { - type: 20 /* JS_CACHE_EXPRESSION */, - index, - value, - isVNode, - loc: locStub - }; + return { + type: 20, + index, + value, + isVNode, + loc: locStub + }; } function createBlockStatement(body) { - return { - type: 21 /* JS_BLOCK_STATEMENT */, - body, - loc: locStub - }; + return { + type: 21, + body, + loc: locStub + }; } function createTemplateLiteral(elements) { - return { - type: 22 /* JS_TEMPLATE_LITERAL */, - elements, - loc: locStub - }; + return { + type: 22, + elements, + loc: locStub + }; } function createIfStatement(test, consequent, alternate) { - return { - type: 23 /* JS_IF_STATEMENT */, - test, - consequent, - alternate, - loc: locStub - }; + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; } function createAssignmentExpression(left, right) { - return { - type: 24 /* JS_ASSIGNMENT_EXPRESSION */, - left, - right, - loc: locStub - }; + return { + type: 24, + left, + right, + loc: locStub + }; } function createSequenceExpression(expressions) { - return { - type: 25 /* JS_SEQUENCE_EXPRESSION */, - expressions, - loc: locStub - }; + return { + type: 25, + expressions, + loc: locStub + }; } function createReturnStatement(returns) { - return { - type: 26 /* JS_RETURN_STATEMENT */, - returns, - loc: locStub - }; + return { + type: 26, + returns, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } } -const isStaticExp = (p) => p.type === 4 /* SIMPLE_EXPRESSION */ && p.isStatic; -const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected); +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + const lower = c | 32; + if (lower === 116) { + this.state = 30; + } else { + this.state = lower === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + const lower = c | 32; + if (lower === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (lower === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + const lower = c | 32; + if (lower === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (lower === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } +} + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) + err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "__EXTEND_POINT__": 52, + "52": "__EXTEND_POINT__" +}; +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [52]: `` +}; + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + { + return; + } +} +function isReferencedIdentifier(id, parent, parentStack) { + { + return false; + } +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) + continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) + continue; + onIdent(stmt.id); + } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration") { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } + } + } +} +function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) + extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; function isCoreComponent(tag) { - if (isBuiltInType(tag, 'Teleport')) { - return TELEPORT; - } - else if (isBuiltInType(tag, 'Suspense')) { - return SUSPENSE; - } - else if (isBuiltInType(tag, 'KeepAlive')) { - return KEEP_ALIVE; - } - else if (isBuiltInType(tag, 'BaseTransition')) { - return BASE_TRANSITION; - } + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } } const nonIdentifierRE = /^\d|[^\$\w]/; const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -/** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ const isMemberExpressionBrowser = (path) => { - // remove whitespaces around . or [ first - path = path.trim().replace(whitespaceRE, s => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === '[') { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } - else if (char === '(') { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } - else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `[`) { - currentOpenBracketCount++; - } - else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `(`) { - currentOpenParensCount++; - } - else if (char === `)`) { - // if the exp ends as a call then it should not be considered valid - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; + path = path.trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; } - return !currentOpenBracketCount && !currentOpenParensCount; + } + return !currentOpenBracketCount && !currentOpenParensCount; }; -const isMemberExpressionNode = NOOP - ; -const isMemberExpression = isMemberExpressionBrowser - ; -function getInnerRange(loc, offset, length) { - const source = loc.source.slice(offset, offset + length); - const newLoc = { - source, - start: advancePositionWithClone(loc.start, loc.source, offset), - end: loc.end - }; - if (length != null) { - newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length); - } - return newLoc; -} +const isMemberExpressionNode = NOOP ; +const isMemberExpression = isMemberExpressionBrowser ; function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation(extend({}, pos), source, numberOfCharacters); + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); } -// advance by mutation without cloning (for performance reasons), since this -// gets called a lot in the parser function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10 /* newline char code */) { - linesCount++; - lastNewLinePos = i; - } + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = - lastNewLinePos === -1 - ? pos.column + numberOfCharacters - : numberOfCharacters - lastNewLinePos; - return pos; + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; } function assert(condition, msg) { - /* istanbul ignore if */ - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } } function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (allowEmpty || p.exp) && - (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; } + } } function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (dynamicOnly) - continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } - else if (p.name === 'bind' && - (p.exp || allowEmpty) && - isStaticArgOf(p.arg, name)) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) + continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; } + } } function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); + return !!(arg && isStaticExp(arg) && arg.content === name); } function hasDynamicKeyVBind(node) { - return node.props.some(p => p.type === 7 /* DIRECTIVE */ && - p.name === 'bind' && - (!p.arg || // v-bind="obj" - p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo] - !p.arg.isStatic) // v-bind:[foo] - ); + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); } -function isText(node) { - return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */; +function isText$1(node) { + return node.type === 5 || node.type === 2; } function isVSlot(p) { - return p.type === 7 /* DIRECTIVE */ && p.name === 'slot'; + return p.type === 7 && p.name === "slot"; } function isTemplateNode(node) { - return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */); + return node.type === 1 && node.tagType === 3; } function isSlotOutlet(node) { - return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */; + return node.type === 1 && node.tagType === 2; } -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); function getUnnormalizedProps(props, callPath = []) { - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps(props.arguments[0], callPath.concat(props)); - } + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); } - return [props, callPath]; + } + return [props, callPath]; } function injectProp(node, prop, context) { - let propsWithInjection; - /** - * 1. mergeProps(...) - * 2. toHandlers(...) - * 3. normalizeProps(...) - * 4. normalizeProps(guardReactiveProps(...)) - * - * we need to get the real props before normalization - */ - let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } - else if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // merged props... add ours - // only inject key to object literal if it's the first argument so that - // if doesn't override user provided keys - const first = props.arguments[0]; - if (!isString(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) { - first.properties.unshift(prop); - } - else { - if (props.callee === TO_HANDLERS) { - // #2366 - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } - else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } - else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) { - let alreadyExists = false; - // check existing key to avoid overriding user provided keys - if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) { - const propKeyName = prop.key.content; - alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === propKeyName); - } - if (!alreadyExists) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } - else { - // single v-bind with expression, return a merged replacement + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props + createObjectExpression([prop]), + props ]); - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`, - // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`, - // the `guardReactiveProps` will no longer be needed - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } + } else { + props.arguments.unshift(createObjectExpression([prop])); + } } - if (node.type === 13 /* VNODE_CALL */) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.props = propsWithInjection; - } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); } - else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.arguments[2] = propsWithInjection; - } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; } function toValidAssetId(name, type) { - // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString(); - })}`; + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; } -// Check if a node contains expressions that reference current context scope ids function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1 /* ELEMENT */: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some(c => hasScopeRef(c, ids)); - case 11 /* FOR */: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 9 /* IF */: - return node.branches.some(b => hasScopeRef(b, ids)); - case 10 /* IF_BRANCH */: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 4 /* SIMPLE_EXPRESSION */: - return (!node.isStatic && - isSimpleIdentifier(node.content) && - !!ids[node.content]); - case 8 /* COMPOUND_EXPRESSION */: - return node.children.some(c => isObject(c) && hasScopeRef(c, ids)); - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return hasScopeRef(node.content, ids); - case 2 /* TEXT */: - case 3 /* COMMENT */: - return false; - default: - return false; - } + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + return false; + default: + return false; + } } function getMemoedVNodeCall(node) { - if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } - else { - return node; - } -} -function makeBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } } +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: { - message: `Platform-native elements with "is" prop will no longer be ` + - `treated as components in Vue 3 unless the "is" value is explicitly ` + - `prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: { - message: key => `.sync modifier for v-bind has been removed. Use v-model with ` + - `argument instead. \`v-bind:${key}.sync\` should be changed to ` + - `\`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: { - message: `.prop modifier for v-bind has been removed and no longer necessary. ` + - `Vue 3 will automatically set a binding as DOM property when appropriate.` - }, - ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` + - `object spread: it will now overwrite an existing non-mergeable attribute ` + - `that appears before v-bind in the case of conflict. ` + - `To retain 2.x behavior, move v-bind to make it the first attribute. ` + - `You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: { - message: `v-if / v-for precedence when used on the same element has changed ` + - `in Vue 3: v-if now takes higher precedence and will no longer have ` + - `access to v-for scope variables. It is best to avoid the ambiguity ` + - `with <template> tags or use a computed property that filters v-for ` + - `data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: { - message: `<template> with no special directives will render as a native template ` + - `element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTER" /* COMPILER_FILTERS */]: { - message: `filters have been removed in Vue 3. ` + - `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` + - `Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, context) { - const config = context.options - ? context.options.compatConfig - : context.compatConfig; - const value = config && config[key]; - if (key === 'MODE') { - return value || 3; // compiler defaults to v3 behavior - } - else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue('MODE', context); - const value = getCompatValue(key, context); - // in v3 mode, only enable if explicitly set to true - // otherwise enable for any non-false value - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === 'suppress-warning') { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) - err.loc = loc; - context.onWarn(err); -} - -// The default decoder only provides escapes for characters reserved as part of -// the template syntax, and is only used if the custom renderer did not provide -// a platform-specific decoder. -const decodeRE = /&(gt|lt|amp|apos|quot);/g; -const decodeMap = { - gt: '>', - lt: '<', - amp: '&', - apos: "'", - quot: '"' -}; const defaultParserOptions = { - delimiters: [`{{`, `}}`], - getNamespace: () => 0 /* HTML */, - getTextMode: () => 0 /* DATA */, - isVoidTag: NO, - isPreTag: NO, - isCustomElement: NO, - decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]), - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false }; -function baseParse(content, options = {}) { - const context = createParserContext(content, options); - const start = getCursor(context); - return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start)); -} -function createParserContext(content, rawOptions) { - const options = extend({}, defaultParserOptions); - let key; - for (key in rawOptions) { - // @ts-ignore - options[key] = - rawOptions[key] === undefined - ? defaultParserOptions[key] - : rawOptions[key]; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); } - return { - options, - column: 1, - line: 1, - offset: 0, - originalSource: content, - source: content, - inPre: false, - inVPre: false, - onWarn: options.onWarn + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 }; -} -function parseChildren(context, mode, ancestors) { - const parent = last(ancestors); - const ns = parent ? parent.ns : 0 /* HTML */; - const nodes = []; - while (!isEnd(context, mode, ancestors)) { - const s = context.source; - let node = undefined; - if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) { - if (!context.inVPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode); - } - else if (mode === 0 /* DATA */ && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1); - } - else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '<!--')) { - node = parseComment(context); - } - else if (startsWith(s, '<!DOCTYPE')) { - // Ignore DOCTYPE by a limitation. - node = parseBogusComment(context); - } - else if (startsWith(s, '<![CDATA[')) { - if (ns !== 0 /* HTML */) { - node = parseCDATA(context, ancestors); - } - else { - emitError(context, 1 /* CDATA_IN_HTML_CONTENT */); - node = parseBogusComment(context); - } - } - else { - emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */); - node = parseBogusComment(context); - } - } - else if (s[1] === '/') { - // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state - if (s.length === 2) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2); - } - else if (s[2] === '>') { - emitError(context, 14 /* MISSING_END_TAG_NAME */, 2); - advanceBy(context, 3); - continue; - } - else if (/[a-z]/i.test(s[2])) { - emitError(context, 23 /* X_INVALID_END_TAG */); - parseTag(context, 1 /* End */, parent); - continue; - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2); - node = parseBogusComment(context); - } - } - else if (/[a-z]/i.test(s[1])) { - node = parseElement(context, ancestors); - // 2.x <template> with no directive compat - if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context) && - node && - node.tag === 'template' && - !node.props.some(p => p.type === 7 /* DIRECTIVE */ && - isSpecialTemplateDirective(p.name))) { - warnDeprecation("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context, node.loc); - node = node.children; - } - } - else if (s[1] === '?') { - emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1); - node = parseBogusComment(context); - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1); - } - } - } - if (!node) { - node = parseText(context, mode); - } - if (isArray(node)) { - for (let i = 0; i < node.length; i++) { - pushNode(nodes, node[i]); - } - } - else { - pushNode(nodes, node); + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } } - // Whitespace handling strategy like v2 - let removedWhitespace = false; - if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) { - const shouldCondense = context.options.whitespace !== 'preserve'; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!context.inPre && node.type === 2 /* TEXT */) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1]; - const next = nodes[i + 1]; - // Remove if: - // - the whitespace is the first or last node, or: - // - (condense mode) the whitespace is adjacent to a comment, or: - // - (condense mode) the whitespace is between two elements AND contains newline - if (!prev || - !next || - (shouldCondense && - (prev.type === 3 /* COMMENT */ || - next.type === 3 /* COMMENT */ || - (prev.type === 1 /* ELEMENT */ && - next.type === 1 /* ELEMENT */ && - /[\r\n]/.test(node.content))))) { - removedWhitespace = true; - nodes[i] = null; - } - else { - // Otherwise, the whitespace is condensed into a single space - node.content = ' '; - } - } - else if (shouldCondense) { - // in condense mode, consecutive whitespaces in text are condensed - // down to a single space. - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' '); - } - } - // Remove comment nodes if desired by configuration. - else if (node.type === 3 /* COMMENT */ && !context.options.comments) { - removedWhitespace = true; - nodes[i] = null; - } - } - if (context.inPre && parent && context.options.isPreTag(parent.tag)) { - // remove leading newline per html spec - // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element - const first = nodes[0]; - if (first && first.type === 2 /* TEXT */) { - first.content = first.content.replace(/^\r?\n/, ''); - } - } + }, + onselfclosingtag(end) { + var _a; + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (((_a = stack[0]) == null ? void 0 : _a.tag) === name) { + onCloseTag(stack.shift(), end); } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function pushNode(nodes, node) { - if (node.type === 2 /* TEXT */) { - const prev = last(nodes); - // Merge if both this and the previous node are text and those are - // consecutive. This happens for cases like "a < b". - if (prev && - prev.type === 2 /* TEXT */ && - prev.loc.end.offset === node.loc.start.offset) { - prev.content += node.content; - prev.loc.end = node.loc.end; - prev.loc.source += node.loc.source; - return; - } - } - nodes.push(node); -} -function parseCDATA(context, ancestors) { - advanceBy(context, 9); - const nodes = parseChildren(context, 3 /* CDATA */, ancestors); - if (context.source.length === 0) { - emitError(context, 6 /* EOF_IN_CDATA */); - } - else { - advanceBy(context, 3); - } - return nodes; -} -function parseComment(context) { - const start = getCursor(context); - let content; - // Regular comment. - const match = /--(\!)?>/.exec(context.source); - if (!match) { - content = context.source.slice(4); - advanceBy(context, context.source.length); - emitError(context, 7 /* EOF_IN_COMMENT */); - } - else { - if (match.index <= 3) { - emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */); - } - if (match[1]) { - emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */); - } - content = context.source.slice(4, match.index); - // Advancing with reporting nested comments. - const s = context.source.slice(0, match.index); - let prevIndex = 1, nestedIndex = 0; - while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) { - advanceBy(context, nestedIndex - prevIndex + 1); - if (nestedIndex + 4 < s.length) { - emitError(context, 16 /* NESTED_COMMENT */); - } - prevIndex = nestedIndex + 1; - } - advanceBy(context, match.index + match[0].length - prevIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) }; -} -function parseBogusComment(context) { - const start = getCursor(context); - const contentStart = context.source[1] === '?' ? 1 : 2; - let content; - const closeIndex = context.source.indexOf('>'); - if (closeIndex === -1) { - content = context.source.slice(contentStart); - advanceBy(context, context.source.length); + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); } - else { - content = context.source.slice(contentStart, closeIndex); - advanceBy(context, closeIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) - }; -} -function parseElement(context, ancestors) { - // Start tag. - const wasInPre = context.inPre; - const wasInVPre = context.inVPre; - const parent = last(ancestors); - const element = parseTag(context, 0 /* Start */, parent); - const isPreBoundary = context.inPre && !wasInPre; - const isVPreBoundary = context.inVPre && !wasInVPre; - if (element.isSelfClosing || context.options.isVoidTag(element.tag)) { - // #4030 self-closing <pre> tag - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - // Children. - ancestors.push(element); - const mode = context.options.getTextMode(element, parent); - const children = parseChildren(context, mode, ancestors); - ancestors.pop(); - // 2.x inline-template compat - { - const inlineTemplateProp = element.props.find(p => p.type === 6 /* ATTRIBUTE */ && p.name === 'inline-template'); - if (inlineTemplateProp && - checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) { - const loc = getSelection(context, element.loc.end); - inlineTemplateProp.value = { - type: 2 /* TEXT */, - content: loc.source, - loc - }; - } - } - element.children = children; - // End tag. - if (startsWithEndTagOpen(context.source, element.tag)) { - parseTag(context, 1 /* End */, parent); - } - else { - emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start); - if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { - const first = children[0]; - if (first && startsWith(first.loc.source, '<!--')) { - emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */); - } - } - } - element.loc = getSelection(context, element.loc.start); - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; -} -const isSpecialTemplateDirective = /*#__PURE__*/ makeMap(`if,else,else-if,for,slot`); -function parseTag(context, type, parent) { - // Tag open. - const start = getCursor(context); - const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source); - const tag = match[1]; - const ns = context.options.getNamespace(tag, parent); - advanceBy(context, match[0].length); - advanceSpaces(context); - // save current state in case we need to re-parse attributes with v-pre - const cursor = getCursor(context); - const currentSource = context.source; - // check <pre> tag - if (context.options.isPreTag(tag)) { - context.inPre = true; - } - // Attributes. - let props = parseAttributes(context, type); - // check v-pre - if (type === 0 /* Start */ && - !context.inVPre && - props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) { - context.inVPre = true; - // reset context - extend(context, cursor); - context.source = currentSource; - // re-parse attrs and filter out v-pre itself - props = parseAttributes(context, type).filter(p => p.name !== 'v-pre'); - } - // Tag close. - let isSelfClosing = false; - if (context.source.length === 0) { - emitError(context, 9 /* EOF_IN_TAG */); - } - else { - isSelfClosing = startsWith(context.source, '/>'); - if (type === 1 /* End */ && isSelfClosing) { - emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */); - } - advanceBy(context, isSelfClosing ? 2 : 1); - } - if (type === 1 /* End */) { - return; - } - // 2.x deprecation checks - if (isCompatEnabled("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context)) { - let hasIf = false; - let hasFor = false; - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 7 /* DIRECTIVE */) { - if (p.name === 'if') { - hasIf = true; - } - else if (p.name === 'for') { - hasFor = true; - } - } - if (hasIf && hasFor) { - warnDeprecation("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start)); - break; - } - } - } - let tagType = 0 /* ELEMENT */; - if (!context.inVPre) { - if (tag === 'slot') { - tagType = 2 /* SLOT */; - } - else if (tag === 'template') { - if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) { - tagType = 3 /* TEMPLATE */; - } - } - else if (isComponent(tag, props, context)) { - tagType = 1 /* COMPONENT */; - } - } - return { - type: 1 /* ELEMENT */, - ns, - tag, - tagType, - props, - isSelfClosing, - children: [], - loc: getSelection(context, start), - codegenNode: undefined // to be created during transform phase - }; -} -function isComponent(tag, props, context) { - const options = context.options; - if (options.isCustomElement(tag)) { - return false; - } - if (tag === 'component' || - /^[A-Z]/.test(tag) || - isCoreComponent(tag) || - (options.isBuiltInComponent && options.isBuiltInComponent(tag)) || - (options.isNativeTag && !options.isNativeTag(tag))) { - return true; - } - // at this point the tag should be a native tag, but check for potential "is" - // casting - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.name === 'is' && p.value) { - if (p.value.content.startsWith('vue:')) { - return true; - } - else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } - else { - // directive - // v-is (TODO Deprecate) - if (p.name === 'is') { - return true; - } - else if ( - // :is on plain element - only treat as component in compat mode - p.name === 'bind' && - isStaticArgOf(p.arg, 'is') && - true && - checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } -} -function parseAttributes(context, type) { - const props = []; - const attributeNames = new Set(); - while (context.source.length > 0 && - !startsWith(context.source, '>') && - !startsWith(context.source, '/>')) { - if (startsWith(context.source, '/')) { - emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */); - advanceBy(context, 1); - advanceSpaces(context); - continue; - } - if (type === 1 /* End */) { - emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */); - } - const attr = parseAttribute(context, attributeNames); - // Trim whitespace between class - // https://github.com/vuejs/core/issues/4251 - if (attr.type === 6 /* ATTRIBUTE */ && - attr.value && - attr.name === 'class') { - attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim(); - } - if (type === 0 /* Start */) { - props.push(attr); - } - if (/^[^\t\r\n\f />]/.test(context.source)) { - emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */); - } - advanceSpaces(context); - } - return props; -} -function parseAttribute(context, nameSet) { - // Name. - const start = getCursor(context); - const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source); - const name = match[0]; - if (nameSet.has(name)) { - emitError(context, 2 /* DUPLICATE_ATTRIBUTE */); - } - nameSet.add(name); - if (name[0] === '=') { - emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */); - } - { - const pattern = /["'<]/g; - let m; - while ((m = pattern.exec(name))) { - emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index); - } - } - advanceBy(context, name.length); - // Value - let value = undefined; - if (/^[\t\r\n\f ]*=/.test(context.source)) { - advanceSpaces(context); - advanceBy(context, 1); - advanceSpaces(context); - value = parseAttributeValue(context); - if (!value) { - emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */); - } - } - const loc = getSelection(context, start); - if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) { - const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name); - let isPropShorthand = startsWith(name, '.'); - let dirName = match[1] || - (isPropShorthand || startsWith(name, ':') - ? 'bind' - : startsWith(name, '@') - ? 'on' - : 'slot'); - let arg; - if (match[2]) { - const isSlot = dirName === 'slot'; - const startOffset = name.lastIndexOf(match[2]); - const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length)); - let content = match[2]; - let isStatic = true; - if (content.startsWith('[')) { - isStatic = false; - if (!content.endsWith(']')) { - emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */); - content = content.slice(1); - } - else { - content = content.slice(1, content.length - 1); - } - } - else if (isSlot) { - // #1241 special case for v-slot: vuetify relies extensively on slot - // names containing dots. v-slot doesn't have any modifiers and Vue 2.x - // supports such usage so we are keeping it consistent with 2.x. - content += match[3] || ''; - } - arg = { - type: 4 /* SIMPLE_EXPRESSION */, - content, - isStatic, - constType: isStatic - ? 3 /* CAN_STRINGIFY */ - : 0 /* NOT_CONSTANT */, - loc - }; - } - if (value && value.isQuoted) { - const valueLoc = value.loc; - valueLoc.start.offset++; - valueLoc.start.column++; - valueLoc.end = advancePositionWithClone(valueLoc.start, value.content); - valueLoc.source = valueLoc.source.slice(1, -1); - } - const modifiers = match[3] ? match[3].slice(1).split('.') : []; - if (isPropShorthand) - modifiers.push('prop'); - // 2.x compat v-bind:foo.sync -> v-model:foo - if (dirName === 'bind' && arg) { - if (modifiers.includes('sync') && - checkCompatEnabled("COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) { - dirName = 'model'; - modifiers.splice(modifiers.indexOf('sync'), 1); - } - if (modifiers.includes('prop')) { - checkCompatEnabled("COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */, context, loc); - } - } - return { - type: 7 /* DIRECTIVE */, - name: dirName, - exp: value && { - type: 4 /* SIMPLE_EXPRESSION */, - content: value.content, - isStatic: false, - // Treat as non-constant by default. This can be potentially set to - // other values by `transformExpression` to make it eligible for hoisting. - constType: 0 /* NOT_CONSTANT */, - loc: value.loc - }, - arg, - modifiers, - loc - }; - } - // missing directive name or illegal directive name - if (!context.inVPre && startsWith(name, 'v-')) { - emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */); - } - return { - type: 6 /* ATTRIBUTE */, + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, name, - value: value && { - type: 2 /* TEXT */, - content: value.content, - loc: value.loc - }, - loc + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? ["prop"] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) + return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + currentProp.modifiers.push(mod); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.indexOf("sync")) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) + return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + var _a; + { + const tag = (_a = stack[0]) == null ? void 0 : _a.tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if ((lastNode == null ? void 0 : lastNode.type) === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, end + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(el.children, el.tag); + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (isCompatEnabled( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions + )) { + let hasIf = false; + let hasFor = false; + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 7) { + if (p.name === "if") { + hasIf = true; + } else if (p.name === "for") { + hasFor = true; + } + } + if (hasIf && hasFor) { + warnDeprecation( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions, + el.loc + ); + break; + } + } + } + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + warnDeprecation( + "COMPILER_NATIVE_TEMPLATE", + currentOptions, + el.loc + ); + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) + i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + var _a; + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || ((_a = currentOptions.isBuiltInComponent) == null ? void 0 : _a.call(currentOptions, tag)) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + var _a, _b; + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = (_a = nodes[i - 1]) == null ? void 0 : _a.type; + const next = (_b = nodes[i + 1]) == null ? void 0 : _b.type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + if (inPre && tag && currentOptions.isPreTag(tag)) { + const first = nodes[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc }; + } + return attr; } -function parseAttributeValue(context) { - const start = getCursor(context); - let content; - const quote = context.source[0]; - const isQuoted = quote === `"` || quote === `'`; - if (isQuoted) { - // Quoted value. - advanceBy(context, 1); - const endIndex = context.source.indexOf(quote); - if (endIndex === -1) { - content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */); - } - else { - content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */); - advanceBy(context, 1); - } +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } } - else { - // Unquoted - const match = /^[^\t\r\n\f >]+/.exec(context.source); - if (!match) { - return undefined; - } - const unexpectedChars = /["'<=`]/g; - let m; - while ((m = unexpectedChars.exec(match[0]))) { - emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index); - } - content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */); + } + { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); } - return { content, isQuoted, loc: getSelection(context, start) }; -} -function parseInterpolation(context, mode) { - const [open, close] = context.options.delimiters; - const closeIndex = context.source.indexOf(close, open.length); - if (closeIndex === -1) { - emitError(context, 25 /* X_MISSING_INTERPOLATION_END */); - return undefined; - } - const start = getCursor(context); - advanceBy(context, open.length); - const innerStart = getCursor(context); - const innerEnd = getCursor(context); - const rawContentLength = closeIndex - open.length; - const rawContent = context.source.slice(0, rawContentLength); - const preTrimContent = parseTextData(context, rawContentLength, mode); - const content = preTrimContent.trim(); - const startOffset = preTrimContent.indexOf(content); - if (startOffset > 0) { - advancePositionWithMutation(innerStart, rawContent, startOffset); - } - const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset); - advancePositionWithMutation(innerEnd, rawContent, endOffset); - advanceBy(context, close.length); - return { - type: 5 /* INTERPOLATION */, - content: { - type: 4 /* SIMPLE_EXPRESSION */, - isStatic: false, - // Set `isConstant` to false by default and will decide in transformExpression - constType: 0 /* NOT_CONSTANT */, - content, - loc: getSelection(context, innerStart, innerEnd) - }, - loc: getSelection(context, start) - }; -} -function parseText(context, mode) { - const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]]; - let endIndex = context.source.length; - for (let i = 0; i < endTokens.length; i++) { - const index = context.source.indexOf(endTokens[i], 1); - if (index !== -1 && endIndex > index) { - endIndex = index; - } - } - const start = getCursor(context); - const content = parseTextData(context, endIndex, mode); - return { - type: 2 /* TEXT */, - content, - loc: getSelection(context, start) - }; -} -/** - * Get text data with a given length from the current location. - * This translates HTML entities in the text data. - */ -function parseTextData(context, length, mode) { - const rawText = context.source.slice(0, length); - advanceBy(context, length); - if (mode === 2 /* RAWTEXT */ || - mode === 3 /* CDATA */ || - !rawText.includes('&')) { - return rawText; - } - else { - // DATA or RCDATA containing "&"". Entity decoding required. - return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */); - } -} -function getCursor(context) { - const { column, line, offset } = context; - return { column, line, offset }; -} -function getSelection(context, start, end) { - end = end || getCursor(context); - return { - start, - end, - source: context.originalSource.slice(start.offset, end.offset) - }; -} -function last(xs) { - return xs[xs.length - 1]; -} -function startsWith(source, searchString) { - return source.startsWith(searchString); -} -function advanceBy(context, numberOfCharacters) { - const { source } = context; - advancePositionWithMutation(context, source, numberOfCharacters); - context.source = source.slice(numberOfCharacters); -} -function advanceSpaces(context) { - const match = /^[\t\r\n\f ]+/.exec(context.source); - if (match) { - advanceBy(context, match[0].length); - } -} -function getNewPosition(context, start, numberOfCharacters) { - return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters); -} -function emitError(context, code, offset, loc = getCursor(context)) { - if (offset) { - loc.offset += offset; - loc.column += offset; - } - context.options.onError(createCompilerError(code, { - start: loc, - end: loc, - source: '' - })); -} -function isEnd(context, mode, ancestors) { - const s = context.source; - switch (mode) { - case 0 /* DATA */: - if (startsWith(s, '</')) { - // TODO: probably bad performance - for (let i = ancestors.length - 1; i >= 0; --i) { - if (startsWithEndTagOpen(s, ancestors[i].tag)) { - return true; - } - } - } - break; - case 1 /* RCDATA */: - case 2 /* RAWTEXT */: { - const parent = last(ancestors); - if (parent && startsWithEndTagOpen(s, parent.tag)) { - return true; - } - break; - } - case 3 /* CDATA */: - if (startsWith(s, ']]>')) { - return true; - } - break; - } - return !s; -} -function startsWithEndTagOpen(source, tag) { - return (startsWith(source, '</') && - source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && - /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')); + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options == null ? void 0 : options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; } function hoistStatic(root, context) { - walk(root, context, + walk( + root, + context, // Root node is unfortunately non-hoistable due to potential parent // fallthrough attributes. - isSingleElementRoot(root, root.children[0])); + isSingleElementRoot(root, root.children[0]) + ); } function isSingleElementRoot(root, child) { - const { children } = root; - return (children.length === 1 && - child.type === 1 /* ELEMENT */ && - !isSlotOutlet(child)); + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); } function walk(node, context, doNotHoistNode = false) { - const { children } = node; - const originalCount = children.length; - let hoistedCount = 0; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - // only plain elements & text calls are eligible for hoisting. - if (child.type === 1 /* ELEMENT */ && - child.tagType === 0 /* ELEMENT */) { - const constantType = doNotHoistNode - ? 0 /* NOT_CONSTANT */ - : getConstantType(child, context); - if (constantType > 0 /* NOT_CONSTANT */) { - if (constantType >= 2 /* CAN_HOIST */) { - child.codegenNode.patchFlag = - -1 /* HOISTED */ + (` /* HOISTED */` ); - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - continue; - } - } - else { - // node may contain dynamic children, but its props may be eligible for - // hoisting. - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - const flag = getPatchFlag(codegenNode); - if ((!flag || - flag === 512 /* NEED_PATCH */ || - flag === 1 /* TEXT */) && - getGeneratedPropsConstantType(child, context) >= - 2 /* CAN_HOIST */) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } + const { children } = node; + const originalCount = children.length; + let hoistedCount = 0; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1 + (` /* HOISTED */` ); + child.codegenNode = context.hoist(child.codegenNode); + hoistedCount++; + continue; } - else if (child.type === 12 /* TEXT_CALL */ && - getConstantType(child.content, context) >= 2 /* CAN_HOIST */) { - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - } - // walk further - if (child.type === 1 /* ELEMENT */) { - const isComponent = child.tagType === 1 /* COMPONENT */; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, context); - if (isComponent) { - context.scopes.vSlot--; - } - } - else if (child.type === 11 /* FOR */) { - // Do not hoist v-for single child because it has to be a block - walk(child, context, child.children.length === 1); - } - else if (child.type === 9 /* IF */) { - for (let i = 0; i < child.branches.length; i++) { - // Do not hoist v-if single child because it has to be a block - walk(child.branches[i], context, child.branches[i].children.length === 1); + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = getPatchFlag(codegenNode); + if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } } + } } - if (hoistedCount && context.transformHoist) { - context.transformHoist(children, context, node); + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, context); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, context, child.children.length === 1); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + context, + child.branches[i2].children.length === 1 + ); + } } - // all children were hoisted - the entire children array is hoistable. - if (hoistedCount && - hoistedCount === originalCount && - node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - node.codegenNode && - node.codegenNode.type === 13 /* VNODE_CALL */ && - isArray(node.codegenNode.children)) { - node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children)); + } + if (hoistedCount && context.transformHoist) { + context.transformHoist(children, context, node); + } + if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + const hoisted = context.hoist( + createArrayExpression(node.codegenNode.children) + ); + if (context.hmr) { + hoisted.content = `[...${hoisted.content}]`; } + node.codegenNode.children = hoisted; + } } function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1 /* ELEMENT */: - if (node.tagType !== 0 /* ELEMENT */) { - return 0 /* NOT_CONSTANT */; + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") { + return 0; + } + const flag = getPatchFlag(codegenNode); + if (!flag) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } } - const cached = constantCache.get(node); - if (cached !== undefined) { - return cached; + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13 /* VNODE_CALL */) { - return 0 /* NOT_CONSTANT */; - } - if (codegenNode.isBlock && - node.tag !== 'svg' && - node.tag !== 'foreignObject') { - return 0 /* NOT_CONSTANT */; - } - const flag = getPatchFlag(codegenNode); - if (!flag) { - let returnType = 3 /* CAN_STRINGIFY */; - // Element itself has no patch flag. However we still need to check: - // 1. Even for a node with no patch flag, it is possible for it to contain - // non-hoistable expressions that refers to scope variables, e.g. compiler - // injected keys or cached event handlers. Therefore we need to always - // check the codegenNode's props to be sure. - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (generatedPropsType < returnType) { - returnType = generatedPropsType; - } - // 2. its children. - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (childType < returnType) { - returnType = childType; - } - } - // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0 - // type, check if any of the props can cause the type to be lowered - // we can skip can_patch because it's guaranteed by the absence of a - // patchFlag. - if (returnType > 1 /* CAN_SKIP_PATCH */) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (expType < returnType) { - returnType = expType; - } - } - } - } - // only svg/foreignObject could be block here, however if they are - // static then they don't need to be blocks since there will be no - // nested updates. - if (codegenNode.isBlock) { - // except set custom directives. - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType); - return returnType; - } - else { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - case 2 /* TEXT */: - case 3 /* COMMENT */: - return 3 /* CAN_STRINGIFY */; - case 9 /* IF */: - case 11 /* FOR */: - case 10 /* IF_BRANCH */: - return 0 /* NOT_CONSTANT */; - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return getConstantType(node.content, context); - case 4 /* SIMPLE_EXPRESSION */: - return node.constType; - case 8 /* COMPOUND_EXPRESSION */: - let returnType = 3 /* CAN_STRINGIFY */; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0 /* NOT_CONSTANT */) { - return 0 /* NOT_CONSTANT */; - } - else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - default: - return 0 /* NOT_CONSTANT */; - } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + default: + return 0; + } } -const allowHoistedHelperSet = new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS ]); function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 /* JS_CALL_EXPRESSION */ && - !isString(value.callee) && - allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - return getConstantType(arg, context); - } - else if (arg.type === 14 /* JS_CALL_EXPRESSION */) { - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))` - return getConstantTypeOfHelperCall(arg, context); - } + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); } - return 0 /* NOT_CONSTANT */; + } + return 0; } function getGeneratedPropsConstantType(node, context) { - let returnType = 3 /* CAN_STRINGIFY */; - const props = getNodeProps(node); - if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0 /* NOT_CONSTANT */) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4 /* SIMPLE_EXPRESSION */) { - valueType = getConstantType(value, context); - } - else if (value.type === 14 /* JS_CALL_EXPRESSION */) { - // some helper calls can be hoisted, - // such as the `normalizeProps` generated by the compiler for pre-normalize class, - // in this case we need to respect the ConstantType of the helper's arguments - valueType = getConstantTypeOfHelperCall(value, context); - } - else { - valueType = 0 /* NOT_CONSTANT */; - } - if (valueType === 0 /* NOT_CONSTANT */) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } } - return returnType; + } + return returnType; } function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - return codegenNode.props; - } + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } } function getPatchFlag(node) { - const flag = node.patchFlag; - return flag ? parseInt(flag, 10) : undefined; + const flag = node.patchFlag; + return flag ? parseInt(flag, 10) : void 0; } -function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) { - const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/); - const context = { - // options - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: new Map(), - components: new Set(), - directives: new Set(), - hoists: [], - imports: [], - constantCache: new Map(), - temps: 0, - cached: 0, - identifiers: Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } - else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - /* istanbul ignore if */ - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node - ? list.indexOf(node) - : context.currentNode - ? context.childIndex - : -1; - /* istanbul ignore if */ - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - // current node removed - context.currentNode = null; - context.onNodeRemoved(); - } - else { - // sibling node removed - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: () => { }, - addIdentifiers(exp) { - }, - removeIdentifiers(exp) { - }, - hoist(exp) { - if (isString(exp)) - exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false) { - return createCacheExpression(context.cached++, exp, isVNode); +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic: hoistStatic2 = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic: hoistStatic2, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + cached: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); } - }; - { - context.filters = new Set(); + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) + exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false) { + return createCacheExpression(context.cached++, exp, isVNode); } - return context; + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + return context; } function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - hoistStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - // finalize meta information - root.helpers = [...context.helpers.keys()]; - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - { - root.filters = [...context.filters]; - } + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + hoistStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } } function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - // if the single child is an element, turn it into a block. - if (isSingleElementRoot(root, child) && child.codegenNode) { - // single element root is never hoisted so codegenNode will never be - // SimpleExpressionNode - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - makeBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } - else { - // - single <slot/>, IfNode, ForNode: already blocks. - // - single text node: always patched. - // root codegen falls through via genNode() - root.codegenNode = child; - } + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; } - else if (children.length > 1) { - // root has multiple nodes - return a fragment block. - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, undefined, false /* isComponent */); + } else if (children.length > 1) { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; } - else ; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else ; } function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) - continue; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) + continue; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } } function traverseNode(node, context) { - context.currentNode = node; - // apply transform plugins - const { nodeTransforms } = context; - const exitFns = []; - for (let i = 0; i < nodeTransforms.length; i++) { - const onExit = nodeTransforms[i](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } - else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - // node was removed - return; - } - else { - // node may have been replaced - node = context.currentNode; - } + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } } - switch (node.type) { - case 3 /* COMMENT */: - if (!context.ssr) { - // inject import for the Comment symbol, which is needed for creating - // comment nodes with `createVNode` - context.helper(CREATE_COMMENT); - } - break; - case 5 /* INTERPOLATION */: - // no need to traverse, but we need to inject toString helper - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9 /* IF */: - for (let i = 0; i < node.branches.length; i++) { - traverseNode(node.branches[i], context); - } - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - case 1 /* ELEMENT */: - case 0 /* ROOT */: - traverseChildren(node, context); - break; - } - // exit transforms - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); + if (!context.currentNode) { + return; + } else { + node = context.currentNode; } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } } function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) - ? (n) => n === name - : (n) => name.test(n); - return (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const { props } = node; - // structural directive transforms are not concerned with slots - // as they are handled separately in vSlot.ts - if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) { - // structural directives are removed to avoid infinite recursion - // also we remove them *before* applying so that it can further - // traverse itself in case it moves the node around - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) - exitFns.push(onExit); - } - } - return exitFns; + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) + exitFns.push(onExit); } - }; + } + return exitFns; + } + }; } const PURE_ANNOTATION = `/*#__PURE__*/`; const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.loc.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: undefined, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, node) { - context.code += code; - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } - else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push('\n' + ` `.repeat(n)); +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); } - return context; + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; } function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) - options.onContextCreated(context); - const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context; - const hasHelpers = ast.helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== 'module'; - // preambles - // in setup() inline mode, the preamble is generated in a sub context - // and returned separately. - const preambleContext = context; - { - genFunctionPreamble(ast, preambleContext); - } - // enter render function - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache']; - const signature = args.join(', '); - { - push(`function ${functionName}(${signature}) {`); - } + const context = createCodegenContext(ast, options); + if (options.onContextCreated) + options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const isSetupInlined = false; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - // function mode const declarations should be inside with block - // also they should be renamed to avoid collision with user properties - if (hasHelpers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`); - push(`\n`); - newline(); - } + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); } - // generate asset resolution statements - if (ast.components.length) { - genAssets(ast.components, 'component', context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, 'directive', context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, 'filter', context); - newline(); + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } + newline(); } - if (ast.components.length || ast.directives.length || ast.temps) { - push(`\n`); - newline(); - } - // generate the VNode tree expression - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } - else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { deindent(); push(`}`); - return { - ast, - code: context.code, - preamble: ``, - // SourceMapGenerator does have toJSON() method but it's not in the types - map: context.map ? context.map.toJSON() : undefined - }; + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; } function genFunctionPreamble(ast, context) { - const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context; - const VueBinding = runtimeGlobalName; - // Generate const declaration for helpers - // In prefix mode, we place the const declaration at top so it's done - // only once; But if we not prefixing, we place the declaration inside the - // with block so it doesn't incur the `in` check cost for every helper access. - if (ast.helpers.length > 0) { - { - // "with" mode. - // save Vue in a separate variable to avoid collision - push(`const _Vue = ${VueBinding}\n`); - // in "with" mode, helpers are declared inside the with block to avoid - // has check cost, but hoists are lifted out of the function - we need - // to provide the helper here. - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ] - .filter(helper => ast.helpers.includes(helper)) - .map(aliasHelper) - .join(', '); - push(`const { ${staticHelpers} } = _Vue\n`); - } - } + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } } - genHoists(ast.hoists, context); - newline(); - push(`return `); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); } function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper(type === 'filter' - ? RESOLVE_FILTER - : type === 'component' - ? RESOLVE_COMPONENT - : RESOLVE_DIRECTIVE); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - // potential component implicit self-reference inferred from SFC filename - const maybeSelfReference = id.endsWith('__self'); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`); - if (i < assets.length - 1) { - newline(); - } + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } } function genHoists(hoists, context) { - if (!hoists.length) { - return; + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline, helper, scopeId, mode } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push( + `const _hoisted_${i + 1} = ${``}` + ); + genNode(exp, context); + newline(); } - context.pure = true; - const { push, newline, helper, scopeId, mode } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = ${``}`); - genNode(exp, context); - newline(); - } - } - context.pure = false; + } + context.pure = false; } -function isText$1(n) { - return (isString(n) || - n.type === 4 /* SIMPLE_EXPRESSION */ || - n.type === 2 /* TEXT */ || - n.type === 5 /* INTERPOLATION */ || - n.type === 8 /* COMPOUND_EXPRESSION */); +function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; } function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || - (nodes.some(n => isArray(n) || !isText$1(n))); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); + const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); } function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node); - } - else if (isArray(node)) { - genNodeListAsArray(node, context); - } - else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(','); - newline(); - } - else { - comma && push(', '); - } - } + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } } function genNode(node, context) { - if (isString(node)) { - context.push(node); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1 /* ELEMENT */: - case 9 /* IF */: - case 11 /* FOR */: - assert(node.codegenNode != null, `Codegen node is missing for element/if/for node. ` + - `Apply appropriate transforms first.`); - genNode(node.codegenNode, context); - break; - case 2 /* TEXT */: - genText(node, context); - break; - case 4 /* SIMPLE_EXPRESSION */: - genExpression(node, context); - break; - case 5 /* INTERPOLATION */: - genInterpolation(node, context); - break; - case 12 /* TEXT_CALL */: - genNode(node.codegenNode, context); - break; - case 8 /* COMPOUND_EXPRESSION */: - genCompoundExpression(node, context); - break; - case 3 /* COMMENT */: - genComment(node, context); - break; - case 13 /* VNODE_CALL */: - genVNodeCall(node, context); - break; - case 14 /* JS_CALL_EXPRESSION */: - genCallExpression(node, context); - break; - case 15 /* JS_OBJECT_EXPRESSION */: - genObjectExpression(node, context); - break; - case 17 /* JS_ARRAY_EXPRESSION */: - genArrayExpression(node, context); - break; - case 18 /* JS_FUNCTION_EXPRESSION */: - genFunctionExpression(node, context); - break; - case 19 /* JS_CONDITIONAL_EXPRESSION */: - genConditionalExpression(node, context); - break; - case 20 /* JS_CACHE_EXPRESSION */: - genCacheExpression(node, context); - break; - case 21 /* JS_BLOCK_STATEMENT */: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22 /* JS_TEMPLATE_LITERAL */: - break; - case 23 /* JS_IF_STATEMENT */: - break; - case 24 /* JS_ASSIGNMENT_EXPRESSION */: - break; - case 25 /* JS_SEQUENCE_EXPRESSION */: - break; - case 26 /* JS_RETURN_STATEMENT */: - break; - /* istanbul ignore next */ - case 10 /* IF_BRANCH */: - // noop - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - // make sure we exhaust all possible types - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } } function genText(node, context) { - context.push(JSON.stringify(node.content), node); + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); } function genExpression(node, context) { - const { content, isStatic } = node; - context.push(isStatic ? JSON.stringify(content) : content, node); + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); } function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) - push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); + const { push, helper, pure } = context; + if (pure) + push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); } function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child); - } - else { - genNode(child, context); - } + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); } + } } function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8 /* COMPOUND_EXPRESSION */) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } - else if (node.isStatic) { - // only quote keys if necessary - const text = isSimpleIdentifier(node.content) - ? node.content - : JSON.stringify(node.content); - push(text, node); - } - else { - push(`[${node.content}]`, node); - } + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } } function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node); + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); } function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node; - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock - ? getVNodeBlockHelper(context.inSSR, isComponent) - : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, node); - genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context); + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlag, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } } function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) - break; - } - return args.slice(0, i + 1).map(arg => arg || `null`); + let i = args.length; + while (i--) { + if (args[i] != null) + break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); } -// JavaScript function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, node); - genNodeList(node.arguments, context); - push(`)`); + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); } function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, node); - return; + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); } - const multilines = properties.length > 1 || - (properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */)); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - // key - genExpressionAsPropertyKey(key, context); - push(`: `); - // value - genNode(value, context); - if (i < properties.length - 1) { - // will only reach this if it's multilines - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); + } + multilines && deindent(); + push(multilines ? `}` : ` }`); } function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); + genNodeListAsArray(node.elements, context); } function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - // wrap slot functions with owner context - push(`_${helperNameMap[WITH_CTX]}(`); + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); } - push(`(`, node); - if (isArray(params)) { - genNodeList(params, context); + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); } - else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } - } - else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4 /* SIMPLE_EXPRESSION */) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } - else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent(true /* without newline */); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - push(`_cache[${node.index}] || (`); - if (node.isVNode) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1),`); - newline(); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (node.isVNode) { - push(`,`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); } push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + push(`_cache[${node.index}] || (`); + if (node.isVNode) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1),`); + newline(); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (node.isVNode) { + push(`,`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); } -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = Object.create(null)) { - { - return; - } -} -function isReferencedIdentifier(id, parent, parentStack) { - { - return false; - } -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && - (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern')) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === 'AssignmentExpression') { - return true; - } - else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) { - break; - } - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === 'VariableDeclaration') { - if (stmt.declare) - continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } - else if (stmt.type === 'FunctionDeclaration' || - stmt.type === 'ClassDeclaration') { - if (stmt.declare || !stmt.id) - continue; - onIdent(stmt.id); - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case 'Identifier': - nodes.push(param); - break; - case 'MemberExpression': - let object = param; - while (object.type === 'MemberExpression') { - object = object.object; - } - nodes.push(object); - break; - case 'ObjectPattern': - for (const prop of param.properties) { - if (prop.type === 'RestElement') { - extractIdentifiers(prop.argument, nodes); - } - else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case 'ArrayPattern': - param.elements.forEach(element => { - if (element) - extractIdentifiers(element, nodes); - }); - break; - case 'RestElement': - extractIdentifiers(param.argument, nodes); - break; - case 'AssignmentPattern': - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && - (node.type === 'ObjectProperty' || node.type === 'ObjectMethod') && - !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; - -// these keywords should not appear inside expressions, but operators like -// typeof, instanceof and in are allowed -const prohibitedKeywordRE = new RegExp('\\b' + - ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + - 'super,throw,while,yield,delete,export,import,return,switch,default,' + - 'extends,finally,continue,debugger,function,arguments,typeof,void') - .split(',') - .join('\\b|\\b') + - '\\b'); -// strip strings in expressions +const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" +); const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; -/** - * Validate a non-prefixed expression. - * This is only called when using the in-browser runtime compiler since it - * doesn't prefix expressions. - */ function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { - const exp = node.content; - // empty expressions are validated per-directive since some directives - // do allow empty expressions. - if (!exp.trim()) { - return; - } - try { - new Function(asRawStatements - ? ` ${exp} ` - : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`); - } - catch (e) { - let message = e.message; - const keywordMatch = exp - .replace(stripStringRE, '') - .match(prohibitedKeywordRE); - if (keywordMatch) { - message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; - } - context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, message)); + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } } const transformExpression = (node, context) => { - if (node.type === 5 /* INTERPOLATION */) { - node.content = processExpression(node.content, context); - } - else if (node.type === 1 /* ELEMENT */) { - // handle directives on element - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - // do not process for v-on & v-for since they are special handled - if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') { - const exp = dir.exp; - const arg = dir.arg; - // do not process exp if this is v-on:arg - we need special handling - // for wrapping inline statements. - if (exp && - exp.type === 4 /* SIMPLE_EXPRESSION */ && - !(dir.name === 'on' && arg)) { - dir.exp = processExpression(exp, context, - // slot args must be processed as function params - dir.name === 'slot'); - } - if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg)) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } } + } }; -// Important: since this function uses Node.js only dependencies, it should -// always be used with a leading !true check so that it can be -// tree-shaken from the browser build. -function processExpression(node, context, -// some expressions like v-slot props & v-for aliases should be parsed as -// function params -asParams = false, -// v-on handler values may contain multiple statements -asRawStatements = false, localVars = Object.create(context.identifiers)) { +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { { - { - // simple in-browser validation (same logic in 2.x) - validateBrowserExpression(node, context, asParams, asRawStatements); - } - return node; + validateBrowserExpression(node, context, asParams, asRawStatements); } + return node; + } +} +function stringifyExpression(exp) { + if (isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } } -const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => { +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { return processIf(node, dir, context, (ifNode, branch, isRoot) => { - // #1587: We need to dynamically increment the key based on the current - // node's sibling nodes, since chained v-if/else branches are - // rendered at the same depth - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9 /* IF */) { - key += sibling.branches.length; - } + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; } - // Exit callback. Complete the codegenNode when all children have been - // transformed. - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context); - } - else { - // attach this branch's codegen node to the v-if root. - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context); - } - }; + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processIf(node, dir, context, processCodegen) { - if (dir.name !== 'else' && - (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc)); - dir.exp = createSimpleExpression(`true`, false, loc); + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: node.loc, + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); } - if (dir.exp) { - validateBrowserExpression(dir.exp, context); - } - if (dir.name === 'if') { + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); const branch = createIfBranch(node, dir); - const ifNode = { - type: 9 /* IF */, - loc: node.loc, - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; } - } - else { - // locate the adjacent v-if - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3 /* COMMENT */) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && - sibling.type === 2 /* TEXT */ && - !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9 /* IF */) { - // Check if v-else was followed by v-else-if - if (dir.name === 'else-if' && - sibling.branches[sibling.branches.length - 1].condition === undefined) { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - // move the node to the if node's branches - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && - // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && - context.parent.type === 1 /* ELEMENT */ && - isBuiltInType(context.parent.tag, 'transition'))) { - branch.children = [...comments, ...branch.children]; - } - // check if user is forcing same key on different branches - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc)); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - // since the branch was removed, it will not be traversed. - // make sure to traverse here. - traverseNode(branch, context); - // call on exit - if (onExit) - onExit(); - // make sure to reset currentNode after traversal to indicate this - // node has been removed. - context.currentNode = null; - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - break; + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) + onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; } + } } function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3 /* TEMPLATE */; - return { - type: 10 /* IF_BRANCH */, - loc: node.loc, - condition: dir.name === 'else' ? undefined : dir.exp, - children: isTemplateIf && !findDir(node, 'for') ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; } function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - 'true' - ])); - } - else { - return createChildrenCodegenNode(branch, keyIndex, context); - } + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } } function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */)); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11 /* FOR */) { - // optimize away nested fragments when child is a ForNode - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } - else { - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (!branch.isTemplateIf && - children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, false, false /* isComponent */, branch.loc); - } + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + false, + false, + branch.loc + ); } - else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - // Change createVNode to createBlock. - if (vnodeCall.type === 13 /* VNODE_CALL */) { - makeBlock(vnodeCall, context); - } - // inject branch key - injectProp(vnodeCall, keyProperty, context); - return ret; + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); } + injectProp(vnodeCall, keyProperty, context); + return ret; + } } function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; } - if (a.type === 6 /* ATTRIBUTE */) { - if (a.value.content !== b.value.content) { - return false; - } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; } - else { - // directive - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 /* SIMPLE_EXPRESSION */ || - exp.isStatic !== branchExp.isStatic || - exp.content !== branchExp.content) { - return false; - } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; } - return true; + } + return true; } function getParentCondition(node) { - while (true) { - if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - node = node.alternate; - } - else { - return node; - } - } - else if (node.type === 20 /* JS_CACHE_EXPRESSION */) { - node = node.value; - } + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; } + } } -const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => { +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { const { helper, removeHelper } = context; - return processFor(node, dir, context, forNode => { - // create the loop render function expression now, and add the - // iterator on exit after all children have been traversed - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, 'memo'); - const keyProp = findProp(node, `key`); - const keyExp = keyProp && - (keyProp.type === 6 /* ATTRIBUTE */ - ? createSimpleExpression(keyProp.value.content, true) - : keyProp.exp); - const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; - const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ && - forNode.source.constType > 0 /* NOT_CONSTANT */; - const fragmentFlag = isStableFragment - ? 64 /* STABLE_FRAGMENT */ - : keyProp - ? 128 /* KEYED_FRAGMENT */ - : 256 /* UNKEYED_FRAGMENT */; - forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag + - (` /* ${PatchFlagNames[fragmentFlag]} */` ), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc); - return () => { - // finish the codegen now that all children have been traversed - let childBlock; - const { children } = forNode; - // check <template v-for> key placement - if (isTemplate) { - node.children.some(c => { - if (c.type === 1 /* ELEMENT */) { - const key = findProp(c, 'key'); - if (key) { - context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc)); - return true; - } - } - }); + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`); + const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp); + const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag + (` /* ${PatchFlagNames[fragmentFlag]} */` ), + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */; - const slotOutlet = isSlotOutlet(node) - ? node - : isTemplate && - node.children.length === 1 && - isSlotOutlet(node.children[0]) - ? node.children[0] // api-extractor somehow fails to infer this - : null; - if (slotOutlet) { - // <slot v-for="..."> or <template v-for="..."><slot/></template> - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - // <template v-for="..." :key="..."><slot/></template> - // we need to inject the key to the renderSlot() call. - // the props for renderSlot is passed as the 3rd argument. - injectProp(childBlock, keyProperty, context); - } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64 + (` /* ${PatchFlagNames[64]} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); } - else if (needFragmentWrapper) { - // <template v-for="..."> with text or multi-elements - // should generate a fragment block for each loop - childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ + - (` /* ${PatchFlagNames[64 /* STABLE_FRAGMENT */]} */` - ), undefined, undefined, true, undefined, false /* isComponent */); - } - else { - // Normal element v-for. Directly use the child's codegenNode - // but mark it as a block. - childBlock = children[0] - .codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - // switch from block to vnode - removeHelper(OPEN_BLOCK); - removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - // switch from vnode to block - removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ])); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...(keyExp ? [` && _cached.key === `, keyExp] : []), - ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++))); - } - else { - renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */)); - } - }; + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached++)) + ); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc)); - return; - } - const parseResult = parseForExpression( - // can only be simple expression because vFor transform is applied - // before expression transform. - dir.exp, context); - if (!parseResult) { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc)); - return; - } - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11 /* FOR */, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - // bookkeeping - scopes.vFor++; - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (onExit) - onExit(); - }; + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) + onExit(); + }; } -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -// This regex doesn't cover the case if key or index aliases have destructuring, -// but those do not make sense in the first place, so this works in practice. -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input, context) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) - return; - const [, LHS, RHS] = inMatch; - const result = { - source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: undefined, - key: undefined, - index: undefined - }; - { - validateBrowserExpression(result.source, context); +function finalizeForParseResult(result, context) { + if (result.finalized) + return; + { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); } - let valueContent = LHS.trim().replace(stripParensRE, '').trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, '').trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(loc, keyContent, keyOffset); - { - validateBrowserExpression(result.key, context, true); - } - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key - ? keyOffset + keyContent.length - : trimmedOffset + valueContent.length)); - { - validateBrowserExpression(result.index, context, true); - } - } - } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); } - if (valueContent) { - result.value = createAliasExpression(loc, valueContent, trimmedOffset); - { - validateBrowserExpression(result.value, context, true); - } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); } - return result; -} -function createAliasExpression(range, content, offset) { - return createSimpleExpression(content, false, getInnerRange(range, offset, content.length)); + } + result.finalized = true; } function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); + return createParamsList([value, key, index, ...memoArgs]); } function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) - break; - } - return args - .slice(0, i + 1) - .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false)); + let i = args.length; + while (i--) { + if (args[i]) + break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); } const defaultFallback = createSimpleExpression(`undefined`, false); -// A NodeTransform that: -// 1. Tracks scope identifiers for scoped slots so that they don't get prefixed -// by transformExpression. This is only applied in non-browser builds with -// { prefixIdentifiers: true }. -// 2. Track v-slot depths so that we know a slot is inside another slot. -// Note the exit callback is executed before buildSlots() on the same node, -// so only nested slots see positive numbers. const trackSlotScopes = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 1 /* COMPONENT */ || - node.tagType === 3 /* TEMPLATE */)) { - // We are only checking non-empty v-slot here - // since we only care about slots that introduce scope variables. - const vSlot = findDir(node, 'slot'); - if (vSlot) { - vSlot.exp; - context.scopes.vSlot++; - return () => { - context.scopes.vSlot--; - }; - } + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; } + } }; -// A NodeTransform that tracks scope identifiers for scoped slots with v-for. -// This transform is only applied in non-browser builds with { prefixIdentifiers: true } const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && - node.props.some(isVSlot) && - (vFor = findDir(node, 'for'))) { - const result = (vFor.parseResult = parseForExpression(vFor.exp, context)); - if (result) { - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; } + } }; -const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc); -// Instead of being a DirectiveTransform, v-slot processing is called during -// transformElement to build the slots object for a component. +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - // If the slot is inside a v-for or another v-slot, force it to be dynamic - // since it likely uses a scope variable. - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - // 1. Check for slot with slotProps on component itself. - // <Comp v-slot="{ prop }"/> - const onComponentSlot = findDir(node, 'slot', true); + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc))); + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; } - // 2. Iterate through children and check for template slots - // <template v-slot:foo="{ prop }"> - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = new Set(); - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || - !(slotDir = findDir(slotElement, 'slot', true))) { - // not a <template v-slot>, skip. - if (slotElement.type !== 3 /* COMMENT */) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - // already has on-component slot - this is incorrect usage. - context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc)); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir; - // check if name is dynamic. - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } - else { - hasDynamicSlots = true; - } - const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc); - // check if this slot is conditional (v-if/v-for) - let vIf; - let vElse; - let vFor; - if ((vIf = findDir(slotElement, 'if'))) { - hasDynamicSlots = true; - dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)); - } - else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) { - // find adjacent v-if - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3 /* COMMENT */) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, 'if')) { - // remove node - children.splice(i, 1); - i--; - // attach this slot to previous conditional - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp - ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback) - : buildDynamicSlot(slotName, slotFunction); - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc)); - } - } - else if ((vFor = findDir(slotElement, 'for'))) { - hasDynamicSlots = true; - const parseResult = vFor.parseResult || - parseForExpression(vFor.exp, context); - if (parseResult) { - // Render the dynamic slots as an array and add it to the createSlot() - // args. The runtime knows how to handle it appropriately. - dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */) - ])); - } - else { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc)); - } - } - else { - // check duplicate static names - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc)); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === 'default') { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children) => { - const fn = buildSlotFn(props, children, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - // implicit default slot (on component) - slotsProperties.push(buildDefaultSlotProperty(undefined, children)); + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; } - else if (implicitDefaultChildren.length && - // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) { - // implicit default slot (mixed with named slots) - if (hasNamedDefaultSlot) { - context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc)); - } - else { - slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren)); - } + } + if (prev && isTemplateNode(prev) && findDir(prev, "if")) { + children.splice(i, 1); + i--; + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); } - const slotFlag = hasDynamicSlots - ? 2 /* DYNAMIC */ - : hasForwardedSlots(node.children) - ? 3 /* FORWARDED */ - : 1 /* STABLE */; - let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression(slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), false))), loc); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); }; -} -function buildDynamicSlot(name, fn) { - return createObjectExpression([ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); } function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - if (child.tagType === 2 /* SLOT */ || - hasForwardedSlots(child.children)) { - return true; - } - break; - case 9 /* IF */: - if (hasForwardedSlots(child.branches)) - return true; - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - if (hasForwardedSlots(child.children)) - return true; - break; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; } + break; + case 9: + if (hasForwardedSlots(child.branches)) + return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) + return true; + break; } - return false; + } + return false; } function isNonWhitespaceContent(node) { - if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */) - return true; - return node.type === 2 /* TEXT */ - ? !!node.content.trim() - : isNonWhitespaceContent(node.content); + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); } -// some directive transforms (e.g. v-model) may return a symbol for runtime -// import, which should be used instead of a resolveDirective call. -const directiveImportMap = new WeakMap(); -// generate a JavaScript AST for this element's codegen +const directiveImportMap = /* @__PURE__ */ new WeakMap(); const transformElement = (node, context) => { - // perform the work on exit, after all child expressions have been - // processed and merged. - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */))) { - return; + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let vnodePatchFlag; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); } - const { tag, props } = node; - const isComponent = node.tagType === 1 /* COMPONENT */; - // The goal of the transform is to create a codegenNode implementing the - // VNodeCall interface. - let vnodeTag = isComponent - ? resolveComponentType(node, context) - : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let vnodePatchFlag; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = - // dynamic component may resolve to plain elements - isDynamicComponent || - vnodeTag === TELEPORT || - vnodeTag === SUSPENSE || - (!isComponent && - // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')); - // props - if (props.length > 0) { - const propsBuildResult = buildProps(node, context, undefined, isComponent, isDynamicComponent); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = - directives && directives.length - ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context))) - : undefined; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; } - // children - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - // Although a built-in component, we compile KeepAlive with raw children - // instead of slot functions so that it can be used inside Transition - // or other Transition-wrapping HOCs. - // To ensure correct updates with block optimizations, we need to: - // 1. Force keep-alive into a block. This avoids its children being - // collected by a parent block. - shouldUseBlock = true; - // 2. Force keep-alive to always be updated, since it uses raw children. - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - if (node.children.length > 1) { - context.onError(createCompilerError(45 /* X_KEEP_ALIVE_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - } - const shouldBuildAsSlots = isComponent && - // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && - // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } - else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - // check for dynamic text children - const hasDynamicTextChild = type === 5 /* INTERPOLATION */ || - type === 8 /* COMPOUND_EXPRESSION */; - if (hasDynamicTextChild && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - patchFlag |= 1 /* TEXT */; - } - // pass directly if the only child is a text node - // (plain / interpolation / expression) - if (hasDynamicTextChild || type === 2 /* TEXT */) { - vnodeChildren = child; - } - else { - vnodeChildren = node.children; - } - } - else { - vnodeChildren = node.children; - } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; } - // patchFlag & dynamicPropNames - if (patchFlag !== 0) { - { - if (patchFlag < 0) { - // special flags (negative and mutually exclusive) - vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } - else { - // bitwise flags - const flagNames = Object.keys(PatchFlagNames) - .map(Number) - .filter(n => n > 0 && patchFlag & n) - .map(n => PatchFlagNames[n]) - .join(`, `); - vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; } - node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc); - }; + } else { + vnodeChildren = node.children; + } + } + if (patchFlag !== 0) { + { + if (patchFlag < 0) { + vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + vnodePatchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; }; function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - // 1. dynamic component - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp(node, 'is'); - if (isProp) { - if (isExplicitDynamic || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))) { - const exp = isProp.type === 6 /* ATTRIBUTE */ - ? isProp.value && createSimpleExpression(isProp.value.content, true) - : isProp.exp; - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } - else if (isProp.type === 6 /* ATTRIBUTE */ && - isProp.value.content.startsWith('vue:')) { - // <button is="vue:xxx"> - // if not <component>, only is value that starts with "vue:" will be - // treated as component by the parse phase and reach here, unless it's - // compat mode where all is values are considered components - tag = isProp.value.content.slice(4); - } - } - // 1.5 v-is (TODO: Deprecate) - const isDir = !isExplicitDynamic && findDir(node, 'is'); - if (isDir && isDir.exp) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp(node, "is"); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp; + if (exp) { return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - isDir.exp + exp ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); } - // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...) - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - // built-ins are simply fallthroughs / have special handling during ssr - // so we don't need to import their runtime equivalents - if (!ssr) - context.helper(builtIn); - return builtIn; - } - // 5. user component (resolve) - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) + context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); } function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - // patchFlag analysis - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && - (!isComponent || isDynamicComponent) && - // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== 'onclick' && - // omit v-model handlers - name !== 'onUpdate:modelValue' && - // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (value.type === 20 /* JS_CACHE_EXPRESSION */ || - ((value.type === 4 /* SIMPLE_EXPRESSION */ || - value.type === 8 /* COMPOUND_EXPRESSION */) && - getConstantType(value, context) > 0)) { - // skip if the prop is a cached handler or has constant value - return; - } - if (name === 'ref') { - hasRef = true; - } - else if (name === 'class') { - hasClassBinding = true; - } - else if (name === 'style') { - hasStyleBinding = true; - } - else if (name !== 'key' && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - // treat the dynamic class and style binding of the component as dynamic props - if (isComponent && - (name === 'class' || name === 'style') && - !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) + mergeArgs.push(arg); + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); } - else { - hasDynamicKeys = true; + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); } - }; - for (let i = 0; i < props.length; i++) { - // static attribute - const prop = props[i]; - if (prop.type === 6 /* ATTRIBUTE */) { - const { loc, name, value } = prop; - let isStatic = true; - if (name === 'ref') { - hasRef = true; - if (context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushMergeArg(); + { + { + const hasOverridableKeys = mergeArgs.some((arg2) => { + if (arg2.type === 15) { + return arg2.properties.some(({ key }) => { + if (key.type !== 4 || !key.isStatic) { + return true; + } + return key.content !== "class" && key.content !== "style" && !isOn(key.content); + }); + } else { + return true; + } + }); + if (hasOverridableKeys) { + checkCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context, + loc + ); } - } - // skip is on <component>, or is="vue:xxx" - if (name === 'is' && - (isComponentTag(tag) || - (value && value.content.startsWith('vue:')) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context)))) { + } + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); continue; + } } - properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc))); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); } - else { - // directives - const { name, arg, exp, loc } = prop; - const isVBind = name === 'bind'; - const isVOn = name === 'on'; - // skip v-slot - it is handled by its dedicated transform. - if (name === 'slot') { - if (!isComponent) { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc)); - } - continue; - } - // skip v-once/v-memo - they are handled by dedicated transforms. - if (name === 'once' || name === 'memo') { - continue; - } - // skip v-is and :is on <component> - if (name === 'is' || - (isVBind && - isStaticArgOf(arg, 'is') && - (isComponentTag(tag) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))))) { - continue; - } - // skip v-on in SSR compilation - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - (isVBind && isStaticArgOf(arg, 'key')) || - // inline before-update hooks need to force block so that it is invoked - // before children - (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // special case for v-bind and v-on with no argument - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - properties = []; - } - if (isVBind) { - { - // 2.x v-bind object order compat - { - const hasOverridableKeys = mergeArgs.some(arg => { - if (arg.type === 15 /* JS_OBJECT_EXPRESSION */) { - return arg.properties.some(({ key }) => { - if (key.type !== 4 /* SIMPLE_EXPRESSION */ || - !key.isStatic) { - return true; - } - return (key.content !== 'class' && - key.content !== 'style' && - !isOn(key.content)); - }); - } - else { - // dynamic expression - return true; - } - }); - if (hasOverridableKeys) { - checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context, loc); - } - } - if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context)) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } - else { - // v-on="obj" -> toHandlers(obj) - mergeArgs.push({ - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee: context.helper(TO_HANDLERS), - arguments: [exp] - }); - } - } - else { - context.onError(createCompilerError(isVBind - ? 34 /* X_V_BIND_NO_EXPRESSION */ - : 35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - continue; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - // has built-in directive transform. - const { props, needRuntime } = directiveTransform(prop, node, context); - !ssr && props.forEach(analyzePatchFlag); - properties.push(...props); - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } - else if (!isBuiltInDirective(name)) { - // no built-in transform, this is a user custom directive. - runtimeDirectives.push(prop); - // custom dirs may use beforeUpdate so they need to force blocks - // to ensure before-update gets called before children update - if (hasChildren) { - shouldUseBlock = true; - } - } + continue; + } + if (isVBind && modifiers.includes("prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } } - let propsExpression = undefined; - // has v-bind="object" or v-on="object", wrap with mergeProps - if (mergeArgs.length) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - } - if (mergeArgs.length > 1) { - propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc); - } - else { - // single v-bind with nothing else - no need for a mergeProps call - propsExpression = mergeArgs[0]; - } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; } - else if (properties.length) { - propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc); + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; } - // patchFlag analysis - if (hasDynamicKeys) { - patchFlag |= 16 /* FULL_PROPS */; + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; } - else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2 /* CLASS */; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4 /* STYLE */; - } - if (dynamicPropNames.length) { - patchFlag |= 8 /* PROPS */; - } - if (hasHydrationEventBinding) { - patchFlag |= 32 /* HYDRATE_EVENTS */; - } + if (dynamicPropNames.length) { + patchFlag |= 8; } - if (!shouldUseBlock && - (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) && - (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512 /* NEED_PATCH */; + if (hasHydrationEventBinding) { + patchFlag |= 32; } - // pre-normalize props, SSR is skipped for now - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15 /* JS_OBJECT_EXPRESSION */: - // means that there is no v-bind, - // but still need to deal with dynamic key binding - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === 'class') { - classKeyIndex = i; - } - else if (key.content === 'style') { - styleKeyIndex = i; - } - } - else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - // no dynamic key - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]); - } - if (styleProp && - // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || - (styleProp.value.type === 4 /* SIMPLE_EXPRESSION */ && - styleProp.value.content.trim()[0] === `[`) || - // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) { - styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]); - } - } - else { - // dynamic key binding, wrap with `normalizeProps` - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]); - } - break; - case 14 /* JS_CALL_EXPRESSION */: - // mergeProps call, do nothing - break; - default: - // single v-bind - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ]); - break; + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; } -// Dedupe props in an object literal. -// Literal duplicated attributes would have been warned during the parse phase, -// however, it's possible to encounter duplicated `onXXX` handlers with different -// modifiers. We also need to merge static and dynamic class / style attributes. -// - onXXX handlers / style: merge into array -// - class: merge into single expression with concatenation function dedupeProperties(properties) { - const knownProps = new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - // dynamic keys are always allowed - if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === 'style' || name === 'class' || isOn(name)) { - mergeAsArray(existing, prop); - } - // unexpected duplicate, should have emitted error during parse - } - else { - knownProps.set(name, prop); - deduped.push(prop); - } + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; } - return deduped; + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; } function mergeAsArray(existing, incoming) { - if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.value.elements.push(incoming.value); - } - else { - existing.value = createArrayExpression([existing.value, incoming.value], existing.loc); - } + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } } function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - // built-in directive with runtime - dirArgs.push(context.helperString(runtime)); + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); } - else { - { - // inject statement for resolving directive - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } + } + const { loc } = dir; + if (dir.exp) + dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); } - const { loc } = dir; - if (dir.exp) - dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc)); - } - return createArrayExpression(dirArgs, dir.loc); + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); } function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) - propsNamesString += ', '; - } - return propsNamesString + `]`; + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) + propsNamesString += ", "; + } + return propsNamesString + `]`; } function isComponentTag(tag) { - return tag === 'component' || tag === 'Component'; + return tag === "component" || tag === "Component"; } const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - '{}', - 'undefined', - 'true' - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); // remove unused arguments - node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc); + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } }; function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = undefined; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.value) { - if (p.name === 'name') { - slotName = JSON.stringify(p.value.content); - } - else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); } - else { - if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) { - if (p.exp) - slotName = p.exp; - } - else { - if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) + slotName = p.exp; + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); } + nonNameProps.push(p); + } } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps(node, context, nonNameProps, false, false); - slotProps = props; - if (directives.length) { - context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc)); - } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); } - return { - slotName, - slotProps - }; + } + return { + slotName, + slotProps + }; } -const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; -const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc)); +const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); } - let eventName; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - let rawName = arg.content; - // TODO deprecate @vnodeXXX usage - if (rawName.startsWith('vue:')) { - rawName = `vnode-${rawName.slice(4)}`; - } - // for all event listeners, auto convert it to camelCase. See issue #2249 - eventName = createSimpleExpression(toHandlerKey(camelize(rawName)), true, arg.loc); - } - else { - // #2388 - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp.content); + const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); + const hasMultipleStatements = exp.content.includes(`;`); + { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); } - else { - // already a compound expression. - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); } - // handler processing - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = undefined; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp.content); - const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); - const hasMultipleStatements = exp.content.includes(`;`); - { - validateBrowserExpression(exp, context, false, hasMultipleStatements); - } - if (isInlineStatement || (shouldCache && isMemberExp)) { - // wrap inline statement in a function expression - exp = createCompoundExpression([ - `${isInlineStatement - ? `$event` - : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc)) - ] - }; - // apply extended compiler augmentor - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - // cache handlers so that it's always the same handler being passed down. - // this avoids unnecessary re-renders when users use inline handlers on - // components. - ret.props[0].value = context.cache(ret.props[0].value); - } - // mark the key as handler for props normalization check - ret.props.forEach(p => (p.key.isHandlerKey = true)); - return ret; + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; }; -// v-bind without arg is handled directly in ./transformElements.ts due to it affecting -// codegen for the entire props object. This transform here is only for v-bind -// *with* args. const transformBind = (dir, _node, context) => { - const { exp, modifiers, loc } = dir; - const arg = dir.arg; - if (arg.type !== 4 /* SIMPLE_EXPRESSION */) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (!exp && arg.type === 4) { + const propName = camelize(arg.content); + exp = dir.exp = createSimpleExpression(propName, false, arg.loc); + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.includes("camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); } - else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; + } + if (!context.inSSR) { + if (modifiers.includes("prop")) { + injectPrefix(arg, "."); } - // .sync is replaced by v-model:arg - if (modifiers.includes('camel')) { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } - else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } - else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.includes('prop')) { - injectPrefix(arg, '.'); - } - if (modifiers.includes('attr')) { - injectPrefix(arg, '^'); - } - } - if (!exp || - (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) { - context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc)); - return { - props: [createObjectProperty(arg, createSimpleExpression('', true, loc))] - }; + if (modifiers.includes("attr")) { + injectPrefix(arg, "^"); } + } + if (!exp || exp.type === 4 && !exp.content.trim()) { + context.onError(createCompilerError(34, loc)); return { - props: [createObjectProperty(arg, exp)] + props: [createObjectProperty(arg, createSimpleExpression("", true, loc))] }; + } + return { + props: [createObjectProperty(arg, exp)] + }; }; const injectPrefix = (arg, prefix) => { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } - else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } - else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } }; -// Merge adjacent text nodes and expressions into a single expression -// e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child. const transformText = (node, context) => { - if (node.type === 0 /* ROOT */ || - node.type === 1 /* ELEMENT */ || - node.type === 11 /* FOR */ || - node.type === 10 /* IF_BRANCH */) { - // perform the transform on node exit so that all expressions have already - // been processed. - return () => { - const children = node.children; - let currentContainer = undefined; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression([child], child.loc); - } - // merge adjacent text node into current - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } - else { - currentContainer = undefined; - break; - } - } - } + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; } - if (!hasText || - // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - (children.length === 1 && - (node.type === 0 /* ROOT */ || - (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find(p => p.type === 7 /* DIRECTIVE */ && - !context.directiveTransforms[p.name]) && - // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === 'template'))))) { - return; - } - // pre-convert text nodes into createTextVNode(text) calls to avoid - // runtime normalization. - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) { - const callArgs = []; - // createTextVNode defaults to single whitespace, so if it is a - // single space the code could be an empty call to save bytes. - if (child.type !== 2 /* TEXT */ || child.content !== ' ') { - callArgs.push(child); - } - // mark dynamic text with flag so it gets patched inside a block - if (!context.ssr && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - callArgs.push(1 /* TEXT */ + - (` /* ${PatchFlagNames[1 /* TEXT */]} */` )); - } - children[i] = { - type: 12 /* TEXT_CALL */, - content: child, - loc: child.loc, - codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs) - }; - } - } - }; - } -}; - -const seen = new WeakSet(); -const transformOnce = (node, context) => { - if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) { - if (seen.has(node) || context.inVOnce) { - return; + } } - seen.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */); - } - }; - } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } }; -const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc)); - return createTransformProps(); +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; } - const rawExp = exp.loc.source; - const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp; - // im SFC <script setup> inline mode, the exp may have been transformed into - // _unref(exp) - context.bindingMetadata[rawExp]; - const maybeRef = !true /* SETUP_CONST */; - if (!expString.trim() || - (!isMemberExpression(expString) && !maybeRef)) { - context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc)); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression('modelValue', true); - const eventName = arg - ? isStaticExp(arg) - ? `onUpdate:${arg.content}` - : createCompoundExpression(['"onUpdate:" + ', arg]) - : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - // modelModifiers: { foo: true, "bar-baz": true } - if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) { - const modifiers = dir.modifiers - .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`) - .join(`, `); - const modifiersKey = arg - ? isStaticExp(arg) - ? `${arg.content}Modifiers` - : createCompoundExpression([arg, ' + "Modifiers"']) - : `modelModifiers`; - props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */))); - } - return createTransformProps(props); + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true + /* isVNode */ + ); + } + }; + } +}; + +const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source; + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); }; function createTransformProps(props = []) { - return { props }; + return { props }; } const validDivisionCharRE = /[\w).+\-_$\]]/; const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTER" /* COMPILER_FILTERS */, context)) { - return; - } - if (node.type === 5 /* INTERPOLATION */) { - // filter rewrite is applied before expression transform so only - // simple expressions are possible at this stage - rewriteFilter(node.content, context); - } - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((prop) => { - if (prop.type === 7 /* DIRECTIVE */ && - prop.name !== 'for' && - prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } + if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } }; function rewriteFilter(node, context) { - if (node.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(node, context); - } - else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== 'object') - continue; - if (child.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(child, context); - } - else if (child.type === 8 /* COMPOUND_EXPRESSION */) { - rewriteFilter(node, context); - } - else if (child.type === 5 /* INTERPOLATION */) { - rewriteFilter(child.content, context); - } - } + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") + continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } } + } } function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 0x27 && prev !== 0x5c) - inSingle = false; - } - else if (inDouble) { - if (c === 0x22 && prev !== 0x5c) - inDouble = false; - } - else if (inTemplateString) { - if (c === 0x60 && prev !== 0x5c) - inTemplateString = false; - } - else if (inRegex) { - if (c === 0x2f && prev !== 0x5c) - inRegex = false; - } - else if (c === 0x7c && // pipe - exp.charCodeAt(i + 1) !== 0x7c && - exp.charCodeAt(i - 1) !== 0x7c && - !curly && - !square && - !paren) { - if (expression === undefined) { - // first filter, end of expression - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } - else { - pushFilter(); - } - } - else { - switch (c) { - case 0x22: - inDouble = true; - break; // " - case 0x27: - inSingle = true; - break; // ' - case 0x60: - inTemplateString = true; - break; // ` - case 0x28: - paren++; - break; // ( - case 0x29: - paren--; - break; // ) - case 0x5b: - square++; - break; // [ - case 0x5d: - square--; - break; // ] - case 0x7b: - curly++; - break; // { - case 0x7d: - curly--; - break; // } - } - if (c === 0x2f) { - // / - let j = i - 1; - let p; - // find first non-whitespace prev char - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== ' ') - break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === undefined) { - expression = exp.slice(0, i).trim(); - } - else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) + inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) + inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) + inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) + inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { lastFilterIndex = i + 1; - } - if (filters.length) { - warnDeprecation("COMPILER_FILTER" /* COMPILER_FILTERS */, context, node.loc); - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + case 39: + inSingle = true; + break; + case 96: + inTemplateString = true; + break; + case 40: + paren++; + break; + case 41: + paren--; + break; + case 91: + square++; + break; + case 93: + square--; + break; + case 123: + curly++; + break; + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") + break; } - node.content = expression; + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + warnDeprecation( + "COMPILER_FILTERS", + context, + node.loc + ); + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + } } function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf('('); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, 'filter')}(${exp})`; - } - else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, 'filter')}(${exp}${args !== ')' ? ',' + args : args}`; - } + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } } -const seen$1 = new WeakSet(); +const seen = /* @__PURE__ */ new WeakSet(); const transformMemo = (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const dir = findDir(node, 'memo'); - if (!dir || seen$1.has(node)) { - return; - } - seen$1.add(node); - return () => { - const codegenNode = node.codegenNode || - context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) { - // non-component sub tree should be turned into a block - if (node.tagType !== 1 /* COMPONENT */) { - makeBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(undefined, codegenNode), - `_cache`, - String(context.cached++) - ]); - } - }; + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached++) + ]); + } + }; + } }; function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...([transformFilter] ), - ...([transformExpression] - ), - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; -} -// we name it `baseCompile` so that higher order compilers like -// @vue/compiler-dom can export `compile` while re-exporting everything else. -function baseCompile(template, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === 'module'; - /* istanbul ignore if */ + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...[transformExpression] , + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], { - if (options.prefixIdentifiers === true) { - onError(createCompilerError(46 /* X_PREFIX_ID_NOT_SUPPORTED */)); - } - else if (isModuleMode) { - onError(createCompilerError(47 /* X_MODULE_MODE_NOT_SUPPORTED */)); - } + on: transformOn$1, + bind: transformBind, + model: transformModel$1 } - const prefixIdentifiers = !true ; - if (options.cacheHandlers) { - onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */)); - } - const ast = isString(template) ? baseParse(template, options) : template; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); - transform(ast, extend({}, options, { - prefixIdentifiers, - nodeTransforms: [ - ...nodeTransforms, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: extend({}, directiveTransforms, options.directiveTransforms || {} // user transforms - ) - })); - return generate(ast, extend({}, options, { - prefixIdentifiers - })); + ]; } +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); + } + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; const noopDirectiveTransform = () => ({ props: [] }); @@ -5022,471 +5790,489 @@ const V_SHOW = Symbol(`vShow` ); const TRANSITION = Symbol(`Transition` ); const TRANSITION_GROUP = Symbol(`TransitionGroup` ); registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` }); -/* eslint-disable no-restricted-globals */ let decoder; function decodeHtmlBrowser(raw, asAttr = false) { - if (!decoder) { - decoder = document.createElement('div'); - } - if (asAttr) { - decoder.innerHTML = `<div foo="${raw.replace(/"/g, '"')}">`; - return decoder.children[0].getAttribute('foo'); - } - else { - decoder.innerHTML = raw; - return decoder.textContent; - } + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } } -const isRawTextContainer = /*#__PURE__*/ makeMap('style,iframe,script,noscript', true); const parserOptions = { - isVoidTag, - isNativeTag: tag => isHTMLTag(tag) || isSVGTag(tag), - isPreTag: tag => tag === 'pre', - decodeEntities: decodeHtmlBrowser , - isBuiltInComponent: (tag) => { - if (isBuiltInType(tag, `Transition`)) { - return TRANSITION; - } - else if (isBuiltInType(tag, `TransitionGroup`)) { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent) { - let ns = parent ? parent.ns : 0 /* HTML */; - if (parent && ns === 2 /* MATH_ML */) { - if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ && - a.name === 'encoding' && - a.value != null && - (a.value.content === 'text/html' || - a.value.content === 'application/xhtml+xml'))) { - ns = 0 /* HTML */; - } - } - else if (/^m(?:[ions]|text)$/.test(parent.tag) && - tag !== 'mglyph' && - tag !== 'malignmark') { - ns = 0 /* HTML */; - } - } - else if (parent && ns === 1 /* SVG */) { - if (parent.tag === 'foreignObject' || - parent.tag === 'desc' || - parent.tag === 'title') { - ns = 0 /* HTML */; - } - } - if (ns === 0 /* HTML */) { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (tag === 'math') { - return 2 /* MATH_ML */; - } - } - return ns; - }, - // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments - getTextMode({ tag, ns }) { - if (ns === 0 /* HTML */) { - if (tag === 'textarea' || tag === 'title') { - return 1 /* RCDATA */; - } - if (isRawTextContainer(tag)) { - return 2 /* RAWTEXT */; - } - } - return 0 /* DATA */; + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } }; -// Parse inline CSS strings for static style attributes into an object. -// This is a NodeTransform since it works on the static `style` attribute and -// converts it into a dynamic equivalent: -// style="color: red" -> :style='{ "color": "red" }' -// It is then processed by `transformElement` and included in the generated -// props. -const transformStyle = node => { - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((p, i) => { - if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) { - // replace p with an expression node - node.props[i] = { - type: 7 /* DIRECTIVE */, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } }; const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */); + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); }; function createDOMCompilerError(code, loc) { - return createCompilerError(code, loc, DOMErrorMessages ); + return createCompilerError( + code, + loc, + DOMErrorMessages + ); } +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; const DOMErrorMessages = { - [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`, - [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`, - [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`, - [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`, - [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`, - [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`, - [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`, - [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` }; const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`innerHTML`, true, loc), exp || createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; }; const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`textContent`, true), exp - ? getConstantType(exp, context) > 0 - ? exp - : createCallExpression(context.helperString(TO_DISPLAY_STRING), [exp], loc) - : createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; }; -const transformModel$1 = (dir, node, context) => { - const baseResult = transformModel(dir, node, context); - // base transform has errors OR component v-model (only need props) - if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) { - return baseResult; - } - if (dir.arg) { - context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc)); - } - function checkDuplicatedValue() { - const value = findProp(node, 'value'); - if (value) { - context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === 'input' || - tag === 'textarea' || - tag === 'select' || - isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === 'input' || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7 /* DIRECTIVE */) { - // :type="foo" - directiveToUse = V_MODEL_DYNAMIC; - } - else if (type.value) { - switch (type.value.content) { - case 'radio': - directiveToUse = V_MODEL_RADIO; - break; - case 'checkbox': - directiveToUse = V_MODEL_CHECKBOX; - break; - case 'file': - isInvalidType = true; - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - // text type - checkDuplicatedValue(); - break; - } - } - } - else if (hasDynamicKeyVBind(node)) { - // element has bindings with dynamic keys, which can possibly contain - // "type". - directiveToUse = V_MODEL_DYNAMIC; - } - else { - // text type - checkDuplicatedValue(); - } - } - else if (tag === 'select') { - directiveToUse = V_MODEL_SELECT; - } - else { - // textarea - checkDuplicatedValue(); - } - // inject runtime directive - // by returning the helper symbol via needRuntime - // the import will replaced a resolveDirective call. - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - // native vmodel doesn't need the `modelValue` props since they are also - // passed to the runtime as `binding.value`. removing it reduces code size. - baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === 'modelValue')); +const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; }; -const isEventOptionModifier = /*#__PURE__*/ makeMap(`passive,once,capture`); -const isNonKeyModifier = /*#__PURE__*/ makeMap( -// event propagation management -`stop,prevent,self,` + - // system modifiers + exact - `ctrl,shift,alt,meta,exact,` + - // mouse - `middle`); -// left & right could be mouse or key modifiers based on event type -const maybeKeyModifier = /*#__PURE__*/ makeMap('left,right'); -const isKeyboardEvent = /*#__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`, true); +const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ makeMap( + `onkeyup,onkeydown,onkeypress`, + true +); const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i]; - if (modifier === 'native' && - checkCompatEnabled("COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */, context, loc)) { - eventOptionModifiers.push(modifier); + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + if (modifier === "native" && checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content)) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); } - else if (isEventOptionModifier(modifier)) { - // eventOptionModifiers: modifiers for addEventListener() options, - // e.g. .passive & .capture - eventOptionModifiers.push(modifier); - } - else { - // runtimeModifiers: modifiers that needs runtime guards - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content)) { - keyModifiers.push(modifier); - } - else { - nonKeyModifiers.push(modifier); - } - } - else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } - else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } - else { - keyModifiers.push(modifier); - } - } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); } + } } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; }; const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === 'onclick'; - return isStaticClick - ? createSimpleExpression(event, true) - : key.type !== 4 /* SIMPLE_EXPRESSION */ - ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) - : key; + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; }; -const transformOn$1 = (dir, node, context) => { - return transformOn(dir, node, context, baseResult => { - const { modifiers } = dir; - if (!modifiers.length) - return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - // normalize click.right and click.middle since they don't actually fire - if (nonKeyModifiers.includes('right')) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes('middle')) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && - // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(''); - key = isStaticExp(key) - ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) - : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); +const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) + return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); }; const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc)); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; }; const transformTransition = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - // warn multiple transition children - if (hasMultipleChildren(node)) { - context.onError(createDOMCompilerError(59 /* X_TRANSITION_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - // check if it's s single child w/ v-show - // if yes, inject "persisted: true" to the transition props - const child = node.children[0]; - if (child.type === 1 /* ELEMENT */) { - for (const p of child.props) { - if (p.type === 7 /* DIRECTIVE */ && p.name === 'show') { - node.props.push({ - type: 6 /* ATTRIBUTE */, - name: 'persisted', - value: undefined, - loc: node.loc - }); - } - } - } - }; + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; } + } }; function hasMultipleChildren(node) { - // #1352 filter out potential comment nodes. - const children = (node.children = node.children.filter(c => c.type !== 3 /* COMMENT */ && - !(c.type === 2 /* TEXT */ && !c.content.trim()))); - const child = children[0]; - return (children.length !== 1 || - child.type === 11 /* FOR */ || - (child.type === 9 /* IF */ && child.branches.some(hasMultipleChildren))); + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); } const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - (node.tag === 'script' || node.tag === 'style')) { - context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc)); - context.removeNode(); - } + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } }; const DOMNodeTransforms = [ - transformStyle, - ...([transformTransition] ) + transformStyle, + ...[transformTransition] ]; const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel$1, - on: transformOn$1, - show: transformShow + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow }; -function compile(template, options = {}) { - return baseCompile(template, extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...(options.nodeTransforms || []) - ], - directiveTransforms: extend({}, DOMDirectiveTransforms, options.directiveTransforms || {}), - transformHoist: null - })); +function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); } function parse(template, options = {}) { - return baseParse(template, extend({}, parserOptions, options)); + return baseParse(template, extend({}, parserOptions, options)); } -export { BASE_TRANSITION, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, DOMDirectiveTransforms, DOMNodeTransforms, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TRANSITION, TRANSITION_GROUP, UNREF, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, compile, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createDOMCompilerError, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, generateCodeFrame, getBaseTransformPreset, getConstantType, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVSlot, locStub, makeBlock, noopDirectiveTransform, parse, parserOptions, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, transformStyle, traverseNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; +export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TRANSITION, TRANSITION_GROUP, TS_NODE_TYPES, UNREF, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, compile, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createDOMCompilerError, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, generateCodeFrame, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFunctionType, isInDestructureAssignment, isInNewExpression, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub, noopDirectiveTransform, parse, parserOptions, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel$1 as transformModel, transformOn$1 as transformOn, transformStyle, traverseNode, unwrapTSNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation }; diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js index d9361072..3168624e 100644 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +++ b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js @@ -1 +1,6 @@ -function e(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}function t(e,t=0,n=e.length){let o=e.split(/(\r?\n)/);const r=o.filter(((e,t)=>t%2==1));o=o.filter(((e,t)=>t%2==0));let s=0;const i=[];for(let c=0;c<o.length;c++)if(s+=o[c].length+(r[c]&&r[c].length||0),s>=t){for(let e=c-2;e<=c+2||n>s;e++){if(e<0||e>=o.length)continue;const l=e+1;i.push(`${l}${" ".repeat(Math.max(3-String(l).length,0))}| ${o[e]}`);const a=o[e].length,p=r[e]&&r[e].length||0;if(e===c){const e=t-(s-(a+p)),o=Math.max(1,n>s?a-e:n-t);i.push(" | "+" ".repeat(e)+"^".repeat(o))}else if(e>c){if(n>s){const e=Math.max(Math.min(n-s,a),1);i.push(" | "+"^".repeat(e))}s+=a+p}}break}return i.join("\n")}const n=/;(?![^(]*\))/g,o=/:(.+)/;const r=e("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),s=e("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),i=e("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),c={},l=()=>{},a=()=>!1,p=/^on[^a-z]/,u=e=>p.test(e),f=Object.assign,d=Array.isArray,h=e=>"string"==typeof e,m=e=>"symbol"==typeof e,g=e=>null!==e&&"object"==typeof e,y=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),v=e("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),b=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},S=/-(\w)/g,x=b((e=>e.replace(S,((e,t)=>t?t.toUpperCase():"")))),k=/\B([A-Z])/g,N=b((e=>e.replace(k,"-$1").toLowerCase())),_=b((e=>e.charAt(0).toUpperCase()+e.slice(1))),T=b((e=>e?`on${_(e)}`:""));function E(e){throw e}function w(e){}function O(e,t,n,o){const r=new SyntaxError(String(e));return r.code=e,r.loc=t,r}const $=Symbol(""),C=Symbol(""),M=Symbol(""),I=Symbol(""),P=Symbol(""),R=Symbol(""),V=Symbol(""),L=Symbol(""),B=Symbol(""),j=Symbol(""),A=Symbol(""),F=Symbol(""),D=Symbol(""),H=Symbol(""),U=Symbol(""),W=Symbol(""),J=Symbol(""),z=Symbol(""),G=Symbol(""),K=Symbol(""),q=Symbol(""),Y=Symbol(""),Z=Symbol(""),Q=Symbol(""),X=Symbol(""),ee=Symbol(""),te=Symbol(""),ne=Symbol(""),oe=Symbol(""),re=Symbol(""),se=Symbol(""),ie=Symbol(""),ce=Symbol(""),le=Symbol(""),ae=Symbol(""),pe=Symbol(""),ue=Symbol(""),fe=Symbol(""),de=Symbol(""),he={[$]:"Fragment",[C]:"Teleport",[M]:"Suspense",[I]:"KeepAlive",[P]:"BaseTransition",[R]:"openBlock",[V]:"createBlock",[L]:"createElementBlock",[B]:"createVNode",[j]:"createElementVNode",[A]:"createCommentVNode",[F]:"createTextVNode",[D]:"createStaticVNode",[H]:"resolveComponent",[U]:"resolveDynamicComponent",[W]:"resolveDirective",[J]:"resolveFilter",[z]:"withDirectives",[G]:"renderList",[K]:"renderSlot",[q]:"createSlots",[Y]:"toDisplayString",[Z]:"mergeProps",[Q]:"normalizeClass",[X]:"normalizeStyle",[ee]:"normalizeProps",[te]:"guardReactiveProps",[ne]:"toHandlers",[oe]:"camelize",[re]:"capitalize",[se]:"toHandlerKey",[ie]:"setBlockTracking",[ce]:"pushScopeId",[le]:"popScopeId",[ae]:"withCtx",[pe]:"unref",[ue]:"isRef",[fe]:"withMemo",[de]:"isMemoSame"};function me(e){Object.getOwnPropertySymbols(e).forEach((t=>{he[t]=e[t]}))}const ge={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function ye(e,t=ge){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}function ve(e,t,n,o,r,s,i,c=!1,l=!1,a=!1,p=ge){return e&&(c?(e.helper(R),e.helper(st(e.inSSR,a))):e.helper(rt(e.inSSR,a)),i&&e.helper(z)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:c,disableTracking:l,isComponent:a,loc:p}}function be(e,t=ge){return{type:17,loc:t,elements:e}}function Se(e,t=ge){return{type:15,loc:t,properties:e}}function xe(e,t){return{type:16,loc:ge,key:h(e)?ke(e,!0):e,value:t}}function ke(e,t=!1,n=ge,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function Ne(e,t){return{type:5,loc:t,content:h(e)?ke(e,!1,t):e}}function _e(e,t=ge){return{type:8,loc:t,children:e}}function Te(e,t=[],n=ge){return{type:14,loc:n,callee:e,arguments:t}}function Ee(e,t,n=!1,o=!1,r=ge){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function we(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:ge}}function Oe(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:ge}}function $e(e){return{type:21,body:e,loc:ge}}function Ce(e){return{type:22,elements:e,loc:ge}}function Me(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:ge}}function Ie(e,t){return{type:24,left:e,right:t,loc:ge}}function Pe(e){return{type:25,expressions:e,loc:ge}}function Re(e){return{type:26,returns:e,loc:ge}}const Ve=e=>4===e.type&&e.isStatic,Le=(e,t)=>e===t||e===N(t);function Be(e){return Le(e,"Teleport")?C:Le(e,"Suspense")?M:Le(e,"KeepAlive")?I:Le(e,"BaseTransition")?P:void 0}const je=/^\d|[^\$\w]/,Ae=e=>!je.test(e),Fe=/[A-Za-z_$\xA0-\uFFFF]/,De=/[\.\?\w$\xA0-\uFFFF]/,He=/\s+[.[]\s*|\s*[.[]\s+/g,Ue=e=>{e=e.trim().replace(He,(e=>e.trim()));let t=0,n=[],o=0,r=0,s=null;for(let i=0;i<e.length;i++){const c=e.charAt(i);switch(t){case 0:if("["===c)n.push(t),t=1,o++;else if("("===c)n.push(t),t=2,r++;else if(!(0===i?Fe:De).test(c))return!1;break;case 1:"'"===c||'"'===c||"`"===c?(n.push(t),t=3,s=c):"["===c?o++:"]"===c&&(--o||(t=n.pop()));break;case 2:if("'"===c||'"'===c||"`"===c)n.push(t),t=3,s=c;else if("("===c)r++;else if(")"===c){if(i===e.length-1)return!1;--r||(t=n.pop())}break;case 3:c===s&&(t=n.pop(),s=null)}}return!o&&!r},We=l,Je=Ue;function ze(e,t,n){const o={source:e.source.slice(t,t+n),start:Ge(e.start,e.source,t),end:e.end};return null!=n&&(o.end=Ge(e.start,e.source,t+n)),o}function Ge(e,t,n=t.length){return Ke(f({},e),t,n)}function Ke(e,t,n=t.length){let o=0,r=-1;for(let s=0;s<n;s++)10===t.charCodeAt(s)&&(o++,r=s);return e.offset+=n,e.line+=o,e.column=-1===r?e.column+n:n-r,e}function qe(e,t){if(!e)throw new Error(t||"unexpected compiler condition")}function Ye(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(7===r.type&&(n||r.exp)&&(h(t)?r.name===t:t.test(r.name)))return r}}function Ze(e,t,n=!1,o=!1){for(let r=0;r<e.props.length;r++){const s=e.props[r];if(6===s.type){if(n)continue;if(s.name===t&&(s.value||o))return s}else if("bind"===s.name&&(s.exp||o)&&Qe(s.arg,t))return s}}function Qe(e,t){return!(!e||!Ve(e)||e.content!==t)}function Xe(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))}function et(e){return 5===e.type||2===e.type}function tt(e){return 7===e.type&&"slot"===e.name}function nt(e){return 1===e.type&&3===e.tagType}function ot(e){return 1===e.type&&2===e.tagType}function rt(e,t){return e||t?B:j}function st(e,t){return e||t?V:L}const it=new Set([ee,te]);function ct(e,t=[]){if(e&&!h(e)&&14===e.type){const n=e.callee;if(!h(n)&&it.has(n))return ct(e.arguments[0],t.concat(e))}return[e,t]}function lt(e,t,n){let o,r,s=13===e.type?e.props:e.arguments[2],i=[];if(s&&!h(s)&&14===s.type){const e=ct(s);s=e[0],i=e[1],r=i[i.length-1]}if(null==s||h(s))o=Se([t]);else if(14===s.type){const e=s.arguments[0];h(e)||15!==e.type?s.callee===ne?o=Te(n.helper(Z),[Se([t]),s]):s.arguments.unshift(Se([t])):e.properties.unshift(t),!o&&(o=s)}else if(15===s.type){let e=!1;if(4===t.key.type){const n=t.key.content;e=s.properties.some((e=>4===e.key.type&&e.key.content===n))}e||s.properties.unshift(t),o=s}else o=Te(n.helper(Z),[Se([t]),s]),r&&r.callee===te&&(r=i[i.length-2]);13===e.type?r?r.arguments[0]=o:e.props=o:r?r.arguments[0]=o:e.arguments[2]=o}function at(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function pt(e,t){if(!e||0===Object.keys(t).length)return!1;switch(e.type){case 1:for(let n=0;n<e.props.length;n++){const o=e.props[n];if(7===o.type&&(pt(o.arg,t)||pt(o.exp,t)))return!0}return e.children.some((e=>pt(e,t)));case 11:return!!pt(e.source,t)||e.children.some((e=>pt(e,t)));case 9:return e.branches.some((e=>pt(e,t)));case 10:return!!pt(e.condition,t)||e.children.some((e=>pt(e,t)));case 4:return!e.isStatic&&Ae(e.content)&&!!t[e.content];case 8:return e.children.some((e=>g(e)&&pt(e,t)));case 5:case 12:return pt(e.content,t);default:return!1}}function ut(e){return 14===e.type&&e.callee===fe?e.arguments[1].returns:e}function ft(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(rt(o,e.isComponent)),t(R),t(st(o,e.isComponent)))}const dt={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_PROP:{message:".prop modifier for v-bind has been removed and no longer necessary. Vue 3 will automatically set a binding as DOM property when appropriate."},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTER:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function ht(e,t){const n=t.options?t.options.compatConfig:t.compatConfig,o=n&&n[e];return"MODE"===e?o||3:o}function mt(e,t){const n=ht("MODE",t),o=ht(e,t);return 3===n?!0===o:!1!==o}function gt(e,t,n,...o){return mt(e,t)}function yt(e,t,n,...o){if("suppress-warning"===ht(e,t))return;const{message:r,link:s}=dt[e],i=`(deprecation ${e}) ${"function"==typeof r?r(...o):r}${s?`\n Details: ${s}`:""}`,c=new SyntaxError(i);c.code=e,n&&(c.loc=n),t.onWarn(c)}const vt=/&(gt|lt|amp|apos|quot);/g,bt={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},St={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:a,isPreTag:a,isCustomElement:a,decodeEntities:e=>e.replace(vt,((e,t)=>bt[t])),onError:E,onWarn:w,comments:!1};function xt(e,t={}){const n=function(e,t){const n=f({},St);let o;for(o in t)n[o]=void 0===t[o]?St[o]:t[o];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),o=Vt(n);return ye(kt(n,0,[]),Lt(n,o))}function kt(e,t,n){const o=Bt(n),r=o?o.ns:0,s=[];for(;!Ht(e,t,n);){const i=e.source;let c;if(0===t||1===t)if(!e.inVPre&&jt(i,e.options.delimiters[0]))c=It(e,t);else if(0===t&&"<"===i[0])if(1===i.length);else if("!"===i[1])c=jt(i,"\x3c!--")?Tt(e):jt(i,"<!DOCTYPE")?Et(e):jt(i,"<![CDATA[")&&0!==r?_t(e,n):Et(e);else if("/"===i[1])if(2===i.length);else{if(">"===i[2]){At(e,3);continue}if(/[a-z]/i.test(i[2])){$t(e,1,o);continue}c=Et(e)}else/[a-z]/i.test(i[1])?(c=wt(e,n),mt("COMPILER_NATIVE_TEMPLATE",e)&&c&&"template"===c.tag&&!c.props.some((e=>7===e.type&&Ot(e.name)))&&(c=c.children)):"?"===i[1]&&(c=Et(e));if(c||(c=Pt(e,t)),d(c))for(let e=0;e<c.length;e++)Nt(s,c[e]);else Nt(s,c)}let i=!1;if(2!==t&&1!==t){const t="preserve"!==e.options.whitespace;for(let n=0;n<s.length;n++){const o=s[n];if(e.inPre||2!==o.type)3!==o.type||e.options.comments||(i=!0,s[n]=null);else if(/[^\t\r\n\f ]/.test(o.content))t&&(o.content=o.content.replace(/[\t\r\n\f ]+/g," "));else{const e=s[n-1],r=s[n+1];!e||!r||t&&(3===e.type||3===r.type||1===e.type&&1===r.type&&/[\r\n]/.test(o.content))?(i=!0,s[n]=null):o.content=" "}}if(e.inPre&&o&&e.options.isPreTag(o.tag)){const e=s[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}}return i?s.filter(Boolean):s}function Nt(e,t){if(2===t.type){const n=Bt(e);if(n&&2===n.type&&n.loc.end.offset===t.loc.start.offset)return n.content+=t.content,n.loc.end=t.loc.end,void(n.loc.source+=t.loc.source)}e.push(t)}function _t(e,t){At(e,9);const n=kt(e,3,t);return 0===e.source.length||At(e,3),n}function Tt(e){const t=Vt(e);let n;const o=/--(\!)?>/.exec(e.source);if(o){n=e.source.slice(4,o.index);const t=e.source.slice(0,o.index);let r=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",r));)At(e,s-r+1),r=s+1;At(e,o.index+o[0].length-r+1)}else n=e.source.slice(4),At(e,e.source.length);return{type:3,content:n,loc:Lt(e,t)}}function Et(e){const t=Vt(e),n="?"===e.source[1]?1:2;let o;const r=e.source.indexOf(">");return-1===r?(o=e.source.slice(n),At(e,e.source.length)):(o=e.source.slice(n,r),At(e,r+1)),{type:3,content:o,loc:Lt(e,t)}}function wt(e,t){const n=e.inPre,o=e.inVPre,r=Bt(t),s=$t(e,0,r),i=e.inPre&&!n,c=e.inVPre&&!o;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),c&&(e.inVPre=!1),s;t.push(s);const l=e.options.getTextMode(s,r),a=kt(e,l,t);t.pop();{const t=s.props.find((e=>6===e.type&&"inline-template"===e.name));if(t&>("COMPILER_INLINE_TEMPLATE",e)){const n=Lt(e,s.loc.end);t.value={type:2,content:n.source,loc:n}}}if(s.children=a,Ut(e.source,s.tag))$t(e,1,r);else if(0===e.source.length&&"script"===s.tag.toLowerCase()){const e=a[0];e&&jt(e.loc.source,"\x3c!--")}return s.loc=Lt(e,s.loc.start),i&&(e.inPre=!1),c&&(e.inVPre=!1),s}const Ot=e("if,else,else-if,for,slot");function $t(e,t,n){const o=Vt(e),r=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=r[1],i=e.options.getNamespace(s,n);At(e,r[0].length),Ft(e);const c=Vt(e),l=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let a=Ct(e,t);0===t&&!e.inVPre&&a.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,f(e,c),e.source=l,a=Ct(e,t).filter((e=>"v-pre"!==e.name)));let p=!1;if(0===e.source.length||(p=jt(e.source,"/>"),At(e,p?2:1)),1===t)return;let u=0;return e.inVPre||("slot"===s?u=2:"template"===s?a.some((e=>7===e.type&&Ot(e.name)))&&(u=3):function(e,t,n){const o=n.options;if(o.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||Be(e)||o.isBuiltInComponent&&o.isBuiltInComponent(e)||o.isNativeTag&&!o.isNativeTag(e))return!0;for(let r=0;r<t.length;r++){const e=t[r];if(6===e.type){if("is"===e.name&&e.value){if(e.value.content.startsWith("vue:"))return!0;if(gt("COMPILER_IS_ON_ELEMENT",n))return!0}}else{if("is"===e.name)return!0;if("bind"===e.name&&Qe(e.arg,"is")&>("COMPILER_IS_ON_ELEMENT",n))return!0}}}(s,a,e)&&(u=1)),{type:1,ns:i,tag:s,tagType:u,props:a,isSelfClosing:p,children:[],loc:Lt(e,o),codegenNode:void 0}}function Ct(e,t){const n=[],o=new Set;for(;e.source.length>0&&!jt(e.source,">")&&!jt(e.source,"/>");){if(jt(e.source,"/")){At(e,1),Ft(e);continue}const r=Mt(e,o);6===r.type&&r.value&&"class"===r.name&&(r.value.content=r.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(r),/^[^\t\r\n\f />]/.test(e.source),Ft(e)}return n}function Mt(e,t){const n=Vt(e),o=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(o),t.add(o);{const e=/["'<]/g;let t;for(;t=e.exec(o););}let r;At(e,o.length),/^[\t\r\n\f ]*=/.test(e.source)&&(Ft(e),At(e,1),Ft(e),r=function(e){const t=Vt(e);let n;const o=e.source[0],r='"'===o||"'"===o;if(r){At(e,1);const t=e.source.indexOf(o);-1===t?n=Rt(e,e.source.length,4):(n=Rt(e,t,4),At(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const o=/["'<=`]/g;let r;for(;r=o.exec(t[0]););n=Rt(e,t[0].length,4)}return{content:n,isQuoted:r,loc:Lt(e,t)}}(e));const s=Lt(e,n);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(o)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(o);let i,c=jt(o,"."),l=t[1]||(c||jt(o,":")?"bind":jt(o,"@")?"on":"slot");if(t[2]){const r="slot"===l,s=o.lastIndexOf(t[2]),c=Lt(e,Dt(e,n,s),Dt(e,n,s+t[2].length+(r&&t[3]||"").length));let a=t[2],p=!0;a.startsWith("[")?(p=!1,a=a.endsWith("]")?a.slice(1,a.length-1):a.slice(1)):r&&(a+=t[3]||""),i={type:4,content:a,isStatic:p,constType:p?3:0,loc:c}}if(r&&r.isQuoted){const e=r.loc;e.start.offset++,e.start.column++,e.end=Ge(e.start,r.content),e.source=e.source.slice(1,-1)}const a=t[3]?t[3].slice(1).split("."):[];return c&&a.push("prop"),"bind"===l&&i&&a.includes("sync")&>("COMPILER_V_BIND_SYNC",e,0)&&(l="model",a.splice(a.indexOf("sync"),1)),{type:7,name:l,exp:r&&{type:4,content:r.content,isStatic:!1,constType:0,loc:r.loc},arg:i,modifiers:a,loc:s}}return!e.inVPre&&jt(o,"v-"),{type:6,name:o,value:r&&{type:2,content:r.content,loc:r.loc},loc:s}}function It(e,t){const[n,o]=e.options.delimiters,r=e.source.indexOf(o,n.length);if(-1===r)return;const s=Vt(e);At(e,n.length);const i=Vt(e),c=Vt(e),l=r-n.length,a=e.source.slice(0,l),p=Rt(e,l,t),u=p.trim(),f=p.indexOf(u);f>0&&Ke(i,a,f);return Ke(c,a,l-(p.length-u.length-f)),At(e,o.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:u,loc:Lt(e,i,c)},loc:Lt(e,s)}}function Pt(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let o=e.source.length;for(let s=0;s<n.length;s++){const t=e.source.indexOf(n[s],1);-1!==t&&o>t&&(o=t)}const r=Vt(e);return{type:2,content:Rt(e,o,t),loc:Lt(e,r)}}function Rt(e,t,n){const o=e.source.slice(0,t);return At(e,t),2!==n&&3!==n&&o.includes("&")?e.options.decodeEntities(o,4===n):o}function Vt(e){const{column:t,line:n,offset:o}=e;return{column:t,line:n,offset:o}}function Lt(e,t,n){return{start:t,end:n=n||Vt(e),source:e.originalSource.slice(t.offset,n.offset)}}function Bt(e){return e[e.length-1]}function jt(e,t){return e.startsWith(t)}function At(e,t){const{source:n}=e;Ke(e,n,t),e.source=n.slice(t)}function Ft(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&At(e,t[0].length)}function Dt(e,t,n){return Ge(t,e.originalSource.slice(t.offset,n),n)}function Ht(e,t,n){const o=e.source;switch(t){case 0:if(jt(o,"</"))for(let e=n.length-1;e>=0;--e)if(Ut(o,n[e].tag))return!0;break;case 1:case 2:{const e=Bt(n);if(e&&Ut(o,e.tag))return!0;break}case 3:if(jt(o,"]]>"))return!0}return!o}function Ut(e,t){return jt(e,"</")&&e.slice(2,2+t.length).toLowerCase()===t.toLowerCase()&&/[\t\r\n\f />]/.test(e[2+t.length]||">")}function Wt(e,t){zt(e,t,Jt(e,e.children[0]))}function Jt(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!ot(t)}function zt(e,t,n=!1){const{children:o}=e,r=o.length;let s=0;for(let i=0;i<o.length;i++){const e=o[i];if(1===e.type&&0===e.tagType){const o=n?0:Gt(e,t);if(o>0){if(o>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),s++;continue}}else{const n=e.codegenNode;if(13===n.type){const o=Qt(n);if((!o||512===o||1===o)&&Yt(e,t)>=2){const o=Zt(e);o&&(n.props=t.hoist(o))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}else 12===e.type&&Gt(e.content,t)>=2&&(e.codegenNode=t.hoist(e.codegenNode),s++);if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,zt(e,t),n&&t.scopes.vSlot--}else if(11===e.type)zt(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)zt(e.branches[n],t,1===e.branches[n].children.length)}s&&t.transformHoist&&t.transformHoist(o,t,e),s&&s===r&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&d(e.codegenNode.children)&&(e.codegenNode.children=t.hoist(be(e.codegenNode.children)))}function Gt(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(Qt(r))return n.set(e,0),0;{let o=3;const s=Yt(e,t);if(0===s)return n.set(e,0),0;s<o&&(o=s);for(let r=0;r<e.children.length;r++){const s=Gt(e.children[r],t);if(0===s)return n.set(e,0),0;s<o&&(o=s)}if(o>1)for(let r=0;r<e.props.length;r++){const s=e.props[r];if(7===s.type&&"bind"===s.name&&s.exp){const r=Gt(s.exp,t);if(0===r)return n.set(e,0),0;r<o&&(o=r)}}if(r.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(R),t.removeHelper(st(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(rt(t.inSSR,r.isComponent))}return n.set(e,o),o}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return Gt(e.content,t);case 4:return e.constType;case 8:let s=3;for(let n=0;n<e.children.length;n++){const o=e.children[n];if(h(o)||m(o))continue;const r=Gt(o,t);if(0===r)return 0;r<s&&(s=r)}return s}}const Kt=new Set([Q,X,ee,te]);function qt(e,t){if(14===e.type&&!h(e.callee)&&Kt.has(e.callee)){const n=e.arguments[0];if(4===n.type)return Gt(n,t);if(14===n.type)return qt(n,t)}return 0}function Yt(e,t){let n=3;const o=Zt(e);if(o&&15===o.type){const{properties:e}=o;for(let o=0;o<e.length;o++){const{key:r,value:s}=e[o],i=Gt(r,t);if(0===i)return i;let c;if(i<n&&(n=i),c=4===s.type?Gt(s,t):14===s.type?qt(s,t):0,0===c)return c;c<n&&(n=c)}}return n}function Zt(e){const t=e.codegenNode;if(13===t.type)return t.props}function Qt(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function Xt(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:o=!1,cacheHandlers:r=!1,nodeTransforms:s=[],directiveTransforms:i={},transformHoist:a=null,isBuiltInComponent:p=l,isCustomElement:u=l,expressionPlugins:f=[],scopeId:d=null,slotted:m=!0,ssr:g=!1,inSSR:y=!1,ssrCssVars:v="",bindingMetadata:b=c,inline:S=!1,isTS:k=!1,onError:N=E,onWarn:T=w,compatConfig:O}){const $=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),C={selfName:$&&_(x($[1])),prefixIdentifiers:n,hoistStatic:o,cacheHandlers:r,nodeTransforms:s,directiveTransforms:i,transformHoist:a,isBuiltInComponent:p,isCustomElement:u,expressionPlugins:f,scopeId:d,slotted:m,ssr:g,inSSR:y,ssrCssVars:v,bindingMetadata:b,inline:S,isTS:k,onError:N,onWarn:T,compatConfig:O,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new Map,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=C.helpers.get(e)||0;return C.helpers.set(e,t+1),e},removeHelper(e){const t=C.helpers.get(e);if(t){const n=t-1;n?C.helpers.set(e,n):C.helpers.delete(e)}},helperString:e=>`_${he[C.helper(e)]}`,replaceNode(e){C.parent.children[C.childIndex]=C.currentNode=e},removeNode(e){const t=e?C.parent.children.indexOf(e):C.currentNode?C.childIndex:-1;e&&e!==C.currentNode?C.childIndex>t&&(C.childIndex--,C.onNodeRemoved()):(C.currentNode=null,C.onNodeRemoved()),C.parent.children.splice(t,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){h(e)&&(e=ke(e)),C.hoists.push(e);const t=ke(`_hoisted_${C.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>Oe(C.cached++,e,t)};return C.filters=new Set,C}function en(e,t){const n=Xt(e,t);tn(e,n),t.hoistStatic&&Wt(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(Jt(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&ft(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=ve(t,n($),void 0,e.children,o+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=[...n.helpers.keys()],e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.filters=[...n.filters]}function tn(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let s=0;s<n.length;s++){const r=n[s](e,t);if(r&&(d(r)?o.push(...r):o.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(A);break;case 5:t.ssr||t.helper(Y);break;case 9:for(let n=0;n<e.branches.length;n++)tn(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];h(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=o,tn(r,t))}}(e,t)}t.currentNode=e;let r=o.length;for(;r--;)o[r]()}function nn(e,t){const n=h(e)?t=>t===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(tt))return;const s=[];for(let i=0;i<r.length;i++){const c=r[i];if(7===c.type&&n(c.name)){r.splice(i,1),i--;const n=t(e,c,o);n&&s.push(n)}}return s}}}const on=e=>`${he[e]}: _${he[e]}`;function rn(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:c="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:p=!1,isTS:u=!1,inSSR:f=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:c,runtimeModuleName:l,ssrRuntimeModuleName:a,ssr:p,isTS:u,inSSR:f,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${he[e]}`,push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:c,newline:l,ssr:a}=n,p=e.helpers.length>0,u=!s&&"module"!==o;!function(e,t){const{push:n,newline:o,runtimeGlobalName:r}=t,s=r;if(e.helpers.length>0&&(n(`const _Vue = ${s}\n`),e.hoists.length)){n(`const { ${[B,j,A,F,D].filter((t=>e.helpers.includes(t))).map(on).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r<e.length;r++){const s=e[r];s&&(n(`const _hoisted_${r+1} = `),an(s,t),o())}t.pure=!1})(e.hoists,t),o(),n("return ")}(e,n);if(r(`function ${a?"ssrRender":"render"}(${(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),i(),u&&(r("with (_ctx) {"),i(),p&&(r(`const { ${e.helpers.map(on).join(", ")} } = _Vue`),r("\n"),l())),e.components.length&&(sn(e.components,"component",n),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(sn(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),sn(e.filters,"filter",n),l()),e.temps>0){r("let ");for(let t=0;t<e.temps;t++)r(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n"),l()),a||r("return "),e.codegenNode?an(e.codegenNode,n):r("null"),u&&(c(),r("}")),c(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function sn(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("filter"===t?J:"component"===t?H:W);for(let c=0;c<e.length;c++){let n=e[c];const l=n.endsWith("__self");l&&(n=n.slice(0,-6)),o(`const ${at(n,t)} = ${i}(${JSON.stringify(n)}${l?", true":""})${s?"!":""}`),c<e.length-1&&r()}}function cn(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),ln(e,t,n),n&&t.deindent(),t.push("]")}function ln(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;i<e.length;i++){const c=e[i];h(c)?r(c):d(c)?cn(c,t):an(c,t),i<e.length-1&&(n?(o&&r(","),s()):o&&r(", "))}}function an(e,t){if(h(e))t.push(e);else if(m(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:an(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),e)}(e,t);break;case 4:pn(e,t);break;case 5:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n("/*#__PURE__*/");n(`${o(Y)}(`),an(e.content,t),n(")")}(e,t);break;case 8:un(e,t);break;case 3:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n("/*#__PURE__*/");n(`${o(A)}(${JSON.stringify(e.content)})`,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:o,pure:r}=t,{tag:s,props:i,children:c,patchFlag:l,dynamicProps:a,directives:p,isBlock:u,disableTracking:f,isComponent:d}=e;p&&n(o(z)+"(");u&&n(`(${o(R)}(${f?"true":""}), `);r&&n("/*#__PURE__*/");const h=u?st(t.inSSR,d):rt(t.inSSR,d);n(o(h)+"(",e),ln(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([s,i,c,l,a]),t),n(")"),u&&n(")");p&&(n(", "),an(p,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=h(e.callee)?e.callee:o(e.callee);r&&n("/*#__PURE__*/");n(s+"(",e),ln(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const c=i.length>1||!1;n(c?"{":"{ "),c&&o();for(let l=0;l<i.length;l++){const{key:e,value:o}=i[l];fn(e,t),n(": "),an(o,t),l<i.length-1&&(n(","),s())}c&&r(),n(c?"}":" }")}(e,t);break;case 17:!function(e,t){cn(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:o,deindent:r}=t,{params:s,returns:i,body:c,newline:l,isSlot:a}=e;a&&n(`_${he[ae]}(`);n("(",e),d(s)?ln(s,t):s&&an(s,t);n(") => "),(l||c)&&(n("{"),o());i?(l&&n("return "),d(i)?cn(i,t):an(i,t)):c&&an(c,t);(l||c)&&(r(),n("}"));a&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:c,deindent:l,newline:a}=t;if(4===n.type){const e=!Ae(n.content);e&&i("("),pn(n,t),e&&i(")")}else i("("),an(n,t),i(")");s&&c(),t.indentLevel++,s||i(" "),i("? "),an(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const p=19===r.type;p||t.indentLevel++;an(r,t),p||t.indentLevel--;s&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(ie)}(-1),`),i());n(`_cache[${e.index}] = `),an(e.value,t),e.isVNode&&(n(","),i(),n(`${o(ie)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:ln(e.body,t,!0,!1)}}function pn(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,e)}function un(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];h(o)?t.push(o):an(o,t)}}function fn(e,t){const{push:n}=t;if(8===e.type)n("["),un(e,t),n("]");else if(e.isStatic){n(Ae(e.content)?e.content:JSON.stringify(e.content),e)}else n(`[${e.content}]`,e)}function dn(e,t,n=!1,o=[],r=Object.create(null)){}function hn(e,t,n){return!1}function mn(e,t){if(e&&("ObjectProperty"===e.type||"ArrayPattern"===e.type)){let e=t.length;for(;e--;){const n=t[e];if("AssignmentExpression"===n.type)return!0;if("ObjectProperty"!==n.type&&!n.type.endsWith("Pattern"))break}}return!1}function gn(e,t){for(const n of e.params)for(const e of vn(n))t(e)}function yn(e,t){for(const n of e.body)if("VariableDeclaration"===n.type){if(n.declare)continue;for(const e of n.declarations)for(const n of vn(e.id))t(n)}else if("FunctionDeclaration"===n.type||"ClassDeclaration"===n.type){if(n.declare||!n.id)continue;t(n.id)}}function vn(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(const o of e.properties)vn("RestElement"===o.type?o.argument:o.value,t);break;case"ArrayPattern":e.elements.forEach((e=>{e&&vn(e,t)}));break;case"RestElement":vn(e.argument,t);break;case"AssignmentPattern":vn(e.left,t)}return t}const bn=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),Sn=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,xn=(e,t)=>Sn(t)&&t.key===e,kn=(e,t)=>{if(5===e.type)e.content=Nn(e.content,t);else if(1===e.type)for(let n=0;n<e.props.length;n++){const o=e.props[n];if(7===o.type&&"for"!==o.name){const e=o.exp,n=o.arg;!e||4!==e.type||"on"===o.name&&n||(o.exp=Nn(e,t,"slot"===o.name)),n&&4===n.type&&!n.isStatic&&(o.arg=Nn(n,t))}}};function Nn(e,t,n=!1,o=!1,r=Object.create(t.identifiers)){return e}const _n=nn(/^(if|else|else-if)$/,((e,t,n)=>Tn(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=wn(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=wn(t,i+e.branches.length-1,n)}}}))));function Tn(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){t.exp=ke("true",!1,t.exp?t.exp.loc:e.loc)}if("if"===t.name){const r=En(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){n.removeNode();const r=En(e,t);i.branches.push(r);const s=o&&o(i,r,!1);tn(r,n),s&&s(),n.currentNode=null}break}n.removeNode(i)}}}function En(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Ye(e,"for")?e.children:[e],userKey:Ze(e,"key"),isTemplateIf:n}}function wn(e,t,n){return e.condition?we(e.condition,On(e,t,n),Te(n.helper(A),['""',"true"])):On(e,t,n)}function On(e,t,n){const{helper:o}=n,r=xe("key",ke(`${t}`,!1,ge,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return lt(e,r,n),e}{let t=64;return ve(n,o($),Se([r]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=ut(e);return 13===t.type&&ft(t,n),lt(t,r,n),e}}const $n=nn("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return Cn(e,t,n,(t=>{const s=Te(o(G),[t.source]),i=nt(e),c=Ye(e,"memo"),l=Ze(e,"key"),a=l&&(6===l.type?ke(l.value.content,!0):l.exp),p=l?xe("key",a):null,u=4===t.source.type&&t.source.constType>0,f=u?64:l?128:256;return t.codegenNode=ve(n,o($),void 0,s,f+"",void 0,void 0,!0,!u,!1,e.loc),()=>{let l;const{children:f}=t,d=1!==f.length||1!==f[0].type,h=ot(e)?e:i&&1===e.children.length&&ot(e.children[0])?e.children[0]:null;if(h?(l=h.codegenNode,i&&p&<(l,p,n)):d?l=ve(n,o($),p?Se([p]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(l=f[0].codegenNode,i&&p&<(l,p,n),l.isBlock!==!u&&(l.isBlock?(r(R),r(st(n.inSSR,l.isComponent))):r(rt(n.inSSR,l.isComponent))),l.isBlock=!u,l.isBlock?(o(R),o(st(n.inSSR,l.isComponent))):o(rt(n.inSSR,l.isComponent))),c){const e=Ee(Ln(t.parseResult,[ke("_cached")]));e.body=$e([_e(["const _memo = (",c.exp,")"]),_e(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(de)}(_cached, _memo)) return _cached`]),_e(["const _item = ",l]),ke("_item.memo = _memo"),ke("return _item")]),s.arguments.push(e,ke("_cache"),ke(String(n.cached++)))}else s.arguments.push(Ee(Ln(t.parseResult),l,!0))}}))}));function Cn(e,t,n,o){if(!t.exp)return;const r=Rn(t.exp);if(!r)return;const{scopes:s}=n,{source:i,value:c,key:l,index:a}=r,p={type:11,loc:t.loc,source:i,valueAlias:c,keyAlias:l,objectIndexAlias:a,parseResult:r,children:nt(e)?e.children:[e]};n.replaceNode(p),s.vFor++;const u=o&&o(p);return()=>{s.vFor--,u&&u()}}const Mn=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,In=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Pn=/^\(|\)$/g;function Rn(e,t){const n=e.loc,o=e.content,r=o.match(Mn);if(!r)return;const[,s,i]=r,c={source:Vn(n,i.trim(),o.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let l=s.trim().replace(Pn,"").trim();const a=s.indexOf(l),p=l.match(In);if(p){l=l.replace(In,"").trim();const e=p[1].trim();let t;if(e&&(t=o.indexOf(e,a+l.length),c.key=Vn(n,e,t)),p[2]){const r=p[2].trim();r&&(c.index=Vn(n,r,o.indexOf(r,c.key?t+e.length:a+l.length)))}}return l&&(c.value=Vn(n,l,a)),c}function Vn(e,t,n){return ke(t,!1,ze(e,n,t.length))}function Ln({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||ke("_".repeat(t+1),!1)))}([e,t,n,...o])}const Bn=ke("undefined",!1),jn=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Ye(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},An=(e,t)=>{let n;if(nt(e)&&e.props.some(tt)&&(n=Ye(e,"for"))){const e=n.parseResult=Rn(n.exp);if(e){const{value:n,key:o,index:r}=e,{addIdentifiers:s,removeIdentifiers:i}=t;return n&&s(n),o&&s(o),r&&s(r),()=>{n&&i(n),o&&i(o),r&&i(r)}}}},Fn=(e,t,n)=>Ee(e,t,!1,!0,t.length?t[0].loc:n);function Dn(e,t,n=Fn){t.helper(ae);const{children:o,loc:r}=e,s=[],i=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const l=Ye(e,"slot",!0);if(l){const{arg:e,exp:t}=l;e&&!Ve(e)&&(c=!0),s.push(xe(e||ke("default",!0),n(t,o,r)))}let a=!1,p=!1;const u=[],f=new Set;for(let m=0;m<o.length;m++){const e=o[m];let r;if(!nt(e)||!(r=Ye(e,"slot",!0))){3!==e.type&&u.push(e);continue}if(l)break;a=!0;const{children:d,loc:h}=e,{arg:g=ke("default",!0),exp:y}=r;let v;Ve(g)?v=g?g.content:"default":c=!0;const b=n(y,d,h);let S,x,k;if(S=Ye(e,"if"))c=!0,i.push(we(S.exp,Hn(g,b),Bn));else if(x=Ye(e,/^else(-if)?$/,!0)){let e,t=m;for(;t--&&(e=o[t],3===e.type););if(e&&nt(e)&&Ye(e,"if")){o.splice(m,1),m--;let e=i[i.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=x.exp?we(x.exp,Hn(g,b),Bn):Hn(g,b)}}else if(k=Ye(e,"for")){c=!0;const e=k.parseResult||Rn(k.exp);e&&i.push(Te(t.helper(G),[e.source,Ee(Ln(e),Hn(g,b),!0)]))}else{if(v){if(f.has(v))continue;f.add(v),"default"===v&&(p=!0)}s.push(xe(g,b))}}if(!l){const e=(e,o)=>{const s=n(e,o,r);return t.compatConfig&&(s.isNonScopedSlot=!0),xe("default",s)};a?u.length&&u.some((e=>Wn(e)))&&(p||s.push(e(void 0,u))):s.push(e(void 0,o))}const d=c?2:Un(e.children)?3:1;let h=Se(s.concat(xe("_",ke(d+"",!1))),r);return i.length&&(h=Te(t.helper(q),[h,be(i)])),{slots:h,hasDynamicSlots:c}}function Hn(e,t){return Se([xe("name",e),xe("fn",t)])}function Un(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||Un(n.children))return!0;break;case 9:if(Un(n.branches))return!0;break;case 10:case 11:if(Un(n.children))return!0}}return!1}function Wn(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():Wn(e.content))}const Jn=new WeakMap,zn=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?Gn(e,t):`"${n}"`;const i=g(s)&&s.callee===U;let c,l,a,p,u,f,d=0,h=i||s===C||s===M||!r&&("svg"===n||"foreignObject"===n);if(o.length>0){const n=Kn(e,t,void 0,r,i);c=n.props,d=n.patchFlag,u=n.dynamicPropNames;const o=n.directives;f=o&&o.length?be(o.map((e=>Zn(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===I&&(h=!0,d|=1024);if(r&&s!==C&&s!==I){const{slots:n,hasDynamicSlots:o}=Dn(e,t);l=n,o&&(d|=1024)}else if(1===e.children.length&&s!==C){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Gt(n,t)&&(d|=1),l=r||2===o?n:e.children}else l=e.children}0!==d&&(a=String(d),u&&u.length&&(p=function(e){let t="[";for(let n=0,o=e.length;n<o;n++)t+=JSON.stringify(e[n]),n<o-1&&(t+=", ");return t+"]"}(u))),e.codegenNode=ve(t,s,c,l,a,p,f,!!h,!1,r,e.loc)};function Gn(e,t,n=!1){let{tag:o}=e;const r=Qn(o),s=Ze(e,"is");if(s)if(r||mt("COMPILER_IS_ON_ELEMENT",t)){const e=6===s.type?s.value&&ke(s.value.content,!0):s.exp;if(e)return Te(t.helper(U),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=!r&&Ye(e,"is");if(i&&i.exp)return Te(t.helper(U),[i.exp]);const c=Be(o)||t.isBuiltInComponent(o);return c?(n||t.helper(c),c):(t.helper(H),t.components.add(o),at(o,"component"))}function Kn(e,t,n=e.props,o,r,s=!1){const{tag:i,loc:c,children:l}=e;let a=[];const p=[],f=[],d=l.length>0;let h=!1,g=0,b=!1,S=!1,x=!1,k=!1,N=!1,_=!1;const T=[],E=({key:e,value:n})=>{if(Ve(e)){const s=e.content,i=u(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||y(s)||(k=!0),i&&y(s)&&(_=!0),20===n.type||(4===n.type||8===n.type)&&Gt(n,t)>0)return;"ref"===s?b=!0:"class"===s?S=!0:"style"===s?x=!0:"key"===s||T.includes(s)||T.push(s),!o||"class"!==s&&"style"!==s||T.includes(s)||T.push(s)}else N=!0};for(let u=0;u<n.length;u++){const o=n[u];if(6===o.type){const{loc:e,name:n,value:r}=o;let s=!0;if("ref"===n&&(b=!0,t.scopes.vFor>0&&a.push(xe(ke("ref_for",!0),ke("true")))),"is"===n&&(Qn(i)||r&&r.content.startsWith("vue:")||mt("COMPILER_IS_ON_ELEMENT",t)))continue;a.push(xe(ke(n,!0,ze(e,0,n.length)),ke(r?r.content:"",s,r?r.loc:e)))}else{const{name:n,arg:r,exp:l,loc:u}=o,g="bind"===n,y="on"===n;if("slot"===n)continue;if("once"===n||"memo"===n)continue;if("is"===n||g&&Qe(r,"is")&&(Qn(i)||mt("COMPILER_IS_ON_ELEMENT",t)))continue;if(y&&s)continue;if((g&&Qe(r,"key")||y&&d&&Qe(r,"vue:before-update"))&&(h=!0),g&&Qe(r,"ref")&&t.scopes.vFor>0&&a.push(xe(ke("ref_for",!0),ke("true"))),!r&&(g||y)){if(N=!0,l)if(a.length&&(p.push(Se(qn(a),c)),a=[]),g){if(mt("COMPILER_V_BIND_OBJECT_ORDER",t)){p.unshift(l);continue}p.push(l)}else p.push({type:14,loc:u,callee:t.helper(ne),arguments:[l]});continue}const b=t.directiveTransforms[n];if(b){const{props:n,needRuntime:r}=b(o,e,t);!s&&n.forEach(E),a.push(...n),r&&(f.push(o),m(r)&&Jn.set(o,r))}else v(n)||(f.push(o),d&&(h=!0))}}let w;if(p.length?(a.length&&p.push(Se(qn(a),c)),w=p.length>1?Te(t.helper(Z),p,c):p[0]):a.length&&(w=Se(qn(a),c)),N?g|=16:(S&&!o&&(g|=2),x&&!o&&(g|=4),T.length&&(g|=8),k&&(g|=32)),h||0!==g&&32!==g||!(b||_||f.length>0)||(g|=512),!t.inSSR&&w)switch(w.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t<w.properties.length;t++){const r=w.properties[t].key;Ve(r)?"class"===r.content?e=t:"style"===r.content&&(n=t):r.isHandlerKey||(o=!0)}const r=w.properties[e],s=w.properties[n];o?w=Te(t.helper(ee),[w]):(r&&!Ve(r.value)&&(r.value=Te(t.helper(Q),[r.value])),s&&(x||4===s.value.type&&"["===s.value.content.trim()[0]||17===s.value.type)&&(s.value=Te(t.helper(X),[s.value])));break;case 14:break;default:w=Te(t.helper(ee),[Te(t.helper(te),[w])])}return{props:w,directives:f,patchFlag:g,dynamicPropNames:T,shouldUseBlock:h}}function qn(e){const t=new Map,n=[];for(let o=0;o<e.length;o++){const r=e[o];if(8===r.key.type||!r.key.isStatic){n.push(r);continue}const s=r.key.content,i=t.get(s);i?("style"===s||"class"===s||u(s))&&Yn(i,r):(t.set(s,r),n.push(r))}return n}function Yn(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=be([e.value,t.value],e.loc)}function Zn(e,t){const n=[],o=Jn.get(e);o?n.push(t.helperString(o)):(t.helper(W),t.directives.add(e.name),n.push(at(e.name,"directive")));const{loc:r}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=ke("true",!1,r);n.push(Se(e.modifiers.map((e=>xe(e,t))),r))}return be(n,e.loc)}function Qn(e){return"component"===e||"Component"===e}const Xn=(e,t)=>{if(ot(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=eo(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let c=2;s&&(i[2]=s,c=3),n.length&&(i[3]=Ee([],n,!1,!1,o),c=4),t.scopeId&&!t.slotted&&(c=5),i.splice(c),e.codegenNode=Te(t.helper(K),i,o)}};function eo(e,t){let n,o='"default"';const r=[];for(let s=0;s<e.props.length;s++){const t=e.props[s];6===t.type?t.value&&("name"===t.name?o=JSON.stringify(t.value.content):(t.name=x(t.name),r.push(t))):"bind"===t.name&&Qe(t.arg,"name")?t.exp&&(o=t.exp):("bind"===t.name&&t.arg&&Ve(t.arg)&&(t.arg.content=x(t.arg.content)),r.push(t))}if(r.length>0){const{props:o,directives:s}=Kn(e,t,r,!1,!1);n=o}return{slotName:o,slotProps:n}}const to=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,no=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let c;if(4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),c=ke(T(x(e)),!0,i.loc)}else c=_e([`${n.helperString(se)}(`,i,")"]);else c=i,c.children.unshift(`${n.helperString(se)}(`),c.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let a=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const e=Je(l.content),t=!(e||to.test(l.content)),n=l.content.includes(";");(t||a&&e)&&(l=_e([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let p={props:[xe(c,l||ke("() => {}",!1,r))]};return o&&(p=o(p)),a&&(p.props[0].value=n.cache(p.props[0].value)),p.props.forEach((e=>e.key.isHandlerKey=!0)),p},oo=(e,t,n)=>{const{exp:o,modifiers:r,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),r.includes("camel")&&(4===i.type?i.content=i.isStatic?x(i.content):`${n.helperString(oe)}(${i.content})`:(i.children.unshift(`${n.helperString(oe)}(`),i.children.push(")"))),n.inSSR||(r.includes("prop")&&ro(i,"."),r.includes("attr")&&ro(i,"^")),!o||4===o.type&&!o.content.trim()?{props:[xe(i,ke("",!0,s))]}:{props:[xe(i,o)]}},ro=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},so=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e<n.length;e++){const t=n[e];if(et(t)){r=!0;for(let r=e+1;r<n.length;r++){const s=n[r];if(!et(s)){o=void 0;break}o||(o=n[e]=_e([t],t.loc)),o.children.push(" + ",s),n.splice(r,1),r--}}}if(r&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e<n.length;e++){const o=n[e];if(et(o)||8===o.type){const r=[];2===o.type&&" "===o.content||r.push(o),t.ssr||0!==Gt(o,t)||r.push("1"),n[e]={type:12,content:o,loc:o.loc,codegenNode:Te(t.helper(F),r)}}}}},io=new WeakSet,co=(e,t)=>{if(1===e.type&&Ye(e,"once",!0)){if(io.has(e)||t.inVOnce)return;return io.add(e),t.inVOnce=!0,t.helper(ie),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},lo=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return ao();const s=o.loc.source,i=4===o.type?o.content:s;if(!i.trim()||!Je(i))return ao();const c=r||ke("modelValue",!0),l=r?Ve(r)?`onUpdate:${r.content}`:_e(['"onUpdate:" + ',r]):"onUpdate:modelValue";let a;a=_e([`${n.isTS?"($event: any)":"$event"} => ((`,o,") = $event)"]);const p=[xe(c,e.exp),xe(l,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Ae(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?Ve(r)?`${r.content}Modifiers`:_e([r,' + "Modifiers"']):"modelModifiers";p.push(xe(n,ke(`{ ${t} }`,!1,e.loc,2)))}return ao(p)};function ao(e=[]){return{props:e}}const po=/[\w).+\-_$\]]/,uo=(e,t)=>{mt("COMPILER_FILTER",t)&&(5===e.type&&fo(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&fo(e.exp,t)})))};function fo(e,t){if(4===e.type)ho(e,t);else for(let n=0;n<e.children.length;n++){const o=e.children[n];"object"==typeof o&&(4===o.type?ho(o,t):8===o.type?fo(e,t):5===o.type&&fo(o.content,t))}}function ho(e,t){const n=e.content;let o,r,s,i,c=!1,l=!1,a=!1,p=!1,u=0,f=0,d=0,h=0,m=[];for(s=0;s<n.length;s++)if(r=o,o=n.charCodeAt(s),c)39===o&&92!==r&&(c=!1);else if(l)34===o&&92!==r&&(l=!1);else if(a)96===o&&92!==r&&(a=!1);else if(p)47===o&&92!==r&&(p=!1);else if(124!==o||124===n.charCodeAt(s+1)||124===n.charCodeAt(s-1)||u||f||d){switch(o){case 34:l=!0;break;case 39:c=!0;break;case 96:a=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:u++;break;case 125:u--}if(47===o){let e,t=s-1;for(;t>=0&&(e=n.charAt(t)," "===e);t--);e&&po.test(e)||(p=!0)}}else void 0===i?(h=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(h,s).trim()),h=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==h&&g(),m.length){for(s=0;s<m.length;s++)i=mo(i,m[s],t);e.content=i}}function mo(e,t,n){n.helper(J);const o=t.indexOf("(");if(o<0)return n.filters.add(t),`${at(t,"filter")}(${e})`;{const r=t.slice(0,o),s=t.slice(o+1);return n.filters.add(r),`${at(r,"filter")}(${e}${")"!==s?","+s:s}`}}const go=new WeakSet,yo=(e,t)=>{if(1===e.type){const n=Ye(e,"memo");if(!n||go.has(e))return;return go.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&ft(o,t),e.codegenNode=Te(t.helper(fe),[n.exp,Ee(void 0,o),"_cache",String(t.cached++)]))}}};function vo(e){return[[co,_n,yo,$n,uo,Xn,zn,jn,so],{on:no,bind:oo,model:lo}]}function bo(e,t={}){const n=t.onError||E,o="module"===t.mode;!0===t.prefixIdentifiers?n(O(46)):o&&n(O(47));t.cacheHandlers&&n(O(48)),t.scopeId&&!o&&n(O(49));const r=h(e)?xt(e,t):e,[s,i]=vo();return en(r,f({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:f({},i,t.directiveTransforms||{})})),rn(r,f({},t,{prefixIdentifiers:false}))}const So=()=>({props:[]}),xo=Symbol(""),ko=Symbol(""),No=Symbol(""),_o=Symbol(""),To=Symbol(""),Eo=Symbol(""),wo=Symbol(""),Oo=Symbol(""),$o=Symbol(""),Co=Symbol("");let Mo;me({[xo]:"vModelRadio",[ko]:"vModelCheckbox",[No]:"vModelText",[_o]:"vModelSelect",[To]:"vModelDynamic",[Eo]:"withModifiers",[wo]:"withKeys",[Oo]:"vShow",[$o]:"Transition",[Co]:"TransitionGroup"});const Io=e("style,iframe,script,noscript",!0),Po={isVoidTag:i,isNativeTag:e=>r(e)||s(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return Mo||(Mo=document.createElement("div")),t?(Mo.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Mo.children[0].getAttribute("foo")):(Mo.innerHTML=e,Mo.textContent)},isBuiltInComponent:e=>Le(e,"Transition")?$o:Le(e,"TransitionGroup")?Co:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(Io(e))return 2}return 0}},Ro=e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:ke("style",!0,t.loc),exp:Vo(t.value.content,t.loc),modifiers:[],loc:t.loc})}))},Vo=(e,t)=>{const r=function(e){const t={};return e.split(n).forEach((e=>{if(e){const n=e.split(o);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}(e);return ke(JSON.stringify(r),!1,t,3)};function Lo(e,t){return O(e,t)}const Bo=e("passive,once,capture"),jo=e("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Ao=e("left,right"),Fo=e("onkeyup,onkeydown,onkeypress",!0),Do=(e,t)=>Ve(e)&&"onclick"===e.content.toLowerCase()?ke(t,!0):4!==e.type?_e(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Ho=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},Uo=[Ro],Wo={cloak:So,html:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[xe(ke("innerHTML",!0,r),o||ke("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[xe(ke("textContent",!0),o?Gt(o,n)>0?o:Te(n.helperString(Y),[o],r):ke("",!0))]}},model:(e,t,n)=>{const o=lo(e,t,n);if(!o.props.length||1===t.tagType)return o;const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let e=No,i=!1;if("input"===r||s){const n=Ze(t,"type");if(n){if(7===n.type)e=To;else if(n.value)switch(n.value.content){case"radio":e=xo;break;case"checkbox":e=ko;break;case"file":i=!0}}else Xe(t)&&(e=To)}else"select"===r&&(e=_o);i||(o.needRuntime=n.helper(e))}return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>no(e,0,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:c,eventOptionModifiers:l}=((e,t,n,o)=>{const r=[],s=[],i=[];for(let c=0;c<t.length;c++){const o=t[c];"native"===o&>("COMPILER_V_ON_NATIVE",n)||Bo(o)?i.push(o):Ao(o)?Ve(e)?Fo(e.content)?r.push(o):s.push(o):(r.push(o),s.push(o)):jo(o)?s.push(o):r.push(o)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:i}})(r,o,n);if(c.includes("right")&&(r=Do(r,"onContextmenu")),c.includes("middle")&&(r=Do(r,"onMouseup")),c.length&&(s=Te(n.helper(Eo),[s,JSON.stringify(c)])),!i.length||Ve(r)&&!Fo(r.content)||(s=Te(n.helper(wo),[s,JSON.stringify(i)])),l.length){const e=l.map(_).join("");r=Ve(r)?ke(`${r.content}${e}`,!0):_e(["(",r,`) + "${e}"`])}return{props:[xe(r,s)]}})),show:(e,t,n)=>({props:[],needRuntime:n.helper(Oo)})};function Jo(e,t={}){return bo(e,f({},Po,t,{nodeTransforms:[Ho,...Uo,...t.nodeTransforms||[]],directiveTransforms:f({},Wo,t.directiveTransforms||{}),transformHoist:null}))}function zo(e,t={}){return xt(e,f({},Po,t))}export{P as BASE_TRANSITION,oe as CAMELIZE,re as CAPITALIZE,V as CREATE_BLOCK,A as CREATE_COMMENT,L as CREATE_ELEMENT_BLOCK,j as CREATE_ELEMENT_VNODE,q as CREATE_SLOTS,D as CREATE_STATIC,F as CREATE_TEXT,B as CREATE_VNODE,Wo as DOMDirectiveTransforms,Uo as DOMNodeTransforms,$ as FRAGMENT,te as GUARD_REACTIVE_PROPS,de as IS_MEMO_SAME,ue as IS_REF,I as KEEP_ALIVE,Z as MERGE_PROPS,Q as NORMALIZE_CLASS,ee as NORMALIZE_PROPS,X as NORMALIZE_STYLE,R as OPEN_BLOCK,le as POP_SCOPE_ID,ce as PUSH_SCOPE_ID,G as RENDER_LIST,K as RENDER_SLOT,H as RESOLVE_COMPONENT,W as RESOLVE_DIRECTIVE,U as RESOLVE_DYNAMIC_COMPONENT,J as RESOLVE_FILTER,ie as SET_BLOCK_TRACKING,M as SUSPENSE,C as TELEPORT,Y as TO_DISPLAY_STRING,ne as TO_HANDLERS,se as TO_HANDLER_KEY,$o as TRANSITION,Co as TRANSITION_GROUP,pe as UNREF,ko as V_MODEL_CHECKBOX,To as V_MODEL_DYNAMIC,xo as V_MODEL_RADIO,_o as V_MODEL_SELECT,No as V_MODEL_TEXT,wo as V_ON_WITH_KEYS,Eo as V_ON_WITH_MODIFIERS,Oo as V_SHOW,ae as WITH_CTX,z as WITH_DIRECTIVES,fe as WITH_MEMO,Ge as advancePositionWithClone,Ke as advancePositionWithMutation,qe as assert,bo as baseCompile,xt as baseParse,Zn as buildDirectiveArgs,Kn as buildProps,Dn as buildSlots,gt as checkCompatEnabled,Jo as compile,be as createArrayExpression,Ie as createAssignmentExpression,$e as createBlockStatement,Oe as createCacheExpression,Te as createCallExpression,O as createCompilerError,_e as createCompoundExpression,we as createConditionalExpression,Lo as createDOMCompilerError,Ln as createForLoopParams,Ee as createFunctionExpression,Me as createIfStatement,Ne as createInterpolation,Se as createObjectExpression,xe as createObjectProperty,Re as createReturnStatement,ye as createRoot,Pe as createSequenceExpression,ke as createSimpleExpression,nn as createStructuralDirectiveTransform,Ce as createTemplateLiteral,Xt as createTransformContext,ve as createVNodeCall,vn as extractIdentifiers,Ye as findDir,Ze as findProp,rn as generate,t as generateCodeFrame,vo as getBaseTransformPreset,Gt as getConstantType,ze as getInnerRange,ut as getMemoedVNodeCall,st as getVNodeBlockHelper,rt as getVNodeHelper,Xe as hasDynamicKeyVBind,pt as hasScopeRef,he as helperNameMap,lt as injectProp,Le as isBuiltInType,Be as isCoreComponent,bn as isFunctionType,mn as isInDestructureAssignment,Je as isMemberExpression,Ue as isMemberExpressionBrowser,We as isMemberExpressionNode,hn as isReferencedIdentifier,Ae as isSimpleIdentifier,ot as isSlotOutlet,Qe as isStaticArgOf,Ve as isStaticExp,Sn as isStaticProperty,xn as isStaticPropertyKey,nt as isTemplateNode,et as isText,tt as isVSlot,ge as locStub,ft as makeBlock,So as noopDirectiveTransform,zo as parse,Po as parserOptions,Nn as processExpression,Cn as processFor,Tn as processIf,eo as processSlotOutlet,me as registerRuntimeHelpers,Gn as resolveComponentType,at as toValidAssetId,jn as trackSlotScopes,An as trackVForSlotScopes,en as transform,oo as transformBind,zn as transformElement,kn as transformExpression,lo as transformModel,no as transformOn,Ro as transformStyle,tn as traverseNode,yn as walkBlockDeclarations,gn as walkFunctionParams,dn as walkIdentifiers,yt as warnDeprecation}; +/** +* @vue/compiler-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=()=>{},s=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=Object.assign,r=Array.isArray,c=e=>"string"==typeof e,a=e=>"symbol"==typeof e,l=e=>null!==e&&"object"==typeof e,h=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),d=e("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),p=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},u=/-(\w)/g,f=p((e=>e.replace(u,((e,t)=>t?t.toUpperCase():"")))),m=p((e=>e.charAt(0).toUpperCase()+e.slice(1))),_=p((e=>e?`on${m(e)}`:""));function E(e,t=0,n=e.length){let s=e.split(/(\r?\n)/);const i=s.filter(((e,t)=>t%2==1));s=s.filter(((e,t)=>t%2==0));let o=0;const r=[];for(let c=0;c<s.length;c++)if(o+=s[c].length+(i[c]&&i[c].length||0),o>=t){for(let e=c-2;e<=c+2||n>o;e++){if(e<0||e>=s.length)continue;const a=e+1;r.push(`${a}${" ".repeat(Math.max(3-String(a).length,0))}| ${s[e]}`);const l=s[e].length,h=i[e]&&i[e].length||0;if(e===c){const e=t-(o-(l+h)),s=Math.max(1,n>o?l-e:n-t);r.push(" | "+" ".repeat(e)+"^".repeat(s))}else if(e>c){if(n>o){const e=Math.max(Math.min(n-o,l),1);r.push(" | "+"^".repeat(e))}o+=l+h}}break}return r.join("\n")}const S=/;(?![^(]*\))/g,g=/:([^]+)/,T=/\/\*[^]*?\*\//g;const N=e("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),I=e("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),y=e("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),O=e("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),b=Symbol(""),A=Symbol(""),v=Symbol(""),C=Symbol(""),x=Symbol(""),R=Symbol(""),L=Symbol(""),M=Symbol(""),P=Symbol(""),D=Symbol(""),k=Symbol(""),V=Symbol(""),X=Symbol(""),w=Symbol(""),U=Symbol(""),F=Symbol(""),B=Symbol(""),$=Symbol(""),H=Symbol(""),G=Symbol(""),q=Symbol(""),J=Symbol(""),j=Symbol(""),W=Symbol(""),K=Symbol(""),Y=Symbol(""),Q=Symbol(""),z=Symbol(""),Z=Symbol(""),ee=Symbol(""),te=Symbol(""),ne=Symbol(""),se=Symbol(""),ie=Symbol(""),oe=Symbol(""),re=Symbol(""),ce=Symbol(""),ae=Symbol(""),le=Symbol(""),he={[b]:"Fragment",[A]:"Teleport",[v]:"Suspense",[C]:"KeepAlive",[x]:"BaseTransition",[R]:"openBlock",[L]:"createBlock",[M]:"createElementBlock",[P]:"createVNode",[D]:"createElementVNode",[k]:"createCommentVNode",[V]:"createTextVNode",[X]:"createStaticVNode",[w]:"resolveComponent",[U]:"resolveDynamicComponent",[F]:"resolveDirective",[B]:"resolveFilter",[$]:"withDirectives",[H]:"renderList",[G]:"renderSlot",[q]:"createSlots",[J]:"toDisplayString",[j]:"mergeProps",[W]:"normalizeClass",[K]:"normalizeStyle",[Y]:"normalizeProps",[Q]:"guardReactiveProps",[z]:"toHandlers",[Z]:"camelize",[ee]:"capitalize",[te]:"toHandlerKey",[ne]:"setBlockTracking",[se]:"pushScopeId",[ie]:"popScopeId",[oe]:"withCtx",[re]:"unref",[ce]:"isRef",[ae]:"withMemo",[le]:"isMemoSame"};function de(e){Object.getOwnPropertySymbols(e).forEach((t=>{he[t]=e[t]}))}const pe={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},ue={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},fe={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},me={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_HOIST:2,2:"CAN_HOIST",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},_e={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Ee(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:_e}}function Se(e,t,n,s,i,o,r,c=!1,a=!1,l=!1,h=_e){return e&&(c?(e.helper(R),e.helper(Ve(e.inSSR,l))):e.helper(ke(e.inSSR,l)),r&&e.helper($)),{type:13,tag:t,props:n,children:s,patchFlag:i,dynamicProps:o,directives:r,isBlock:c,disableTracking:a,isComponent:l,loc:h}}function ge(e,t=_e){return{type:17,loc:t,elements:e}}function Te(e,t=_e){return{type:15,loc:t,properties:e}}function Ne(e,t){return{type:16,loc:_e,key:c(e)?Ie(e,!0):e,value:t}}function Ie(e,t=!1,n=_e,s=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:s}}function ye(e,t){return{type:5,loc:t,content:c(e)?Ie(e,!1,t):e}}function Oe(e,t=_e){return{type:8,loc:t,children:e}}function be(e,t=[],n=_e){return{type:14,loc:n,callee:e,arguments:t}}function Ae(e,t=void 0,n=!1,s=!1,i=_e){return{type:18,params:e,returns:t,newline:n,isSlot:s,loc:i}}function ve(e,t,n,s=!0){return{type:19,test:e,consequent:t,alternate:n,newline:s,loc:_e}}function Ce(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:_e}}function xe(e){return{type:21,body:e,loc:_e}}function Re(e){return{type:22,elements:e,loc:_e}}function Le(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:_e}}function Me(e,t){return{type:24,left:e,right:t,loc:_e}}function Pe(e){return{type:25,expressions:e,loc:_e}}function De(e){return{type:26,returns:e,loc:_e}}function ke(e,t){return e||t?P:D}function Ve(e,t){return e||t?L:M}function Xe(e,{helper:t,removeHelper:n,inSSR:s}){e.isBlock||(e.isBlock=!0,n(ke(s,e.isComponent)),t(R),t(Ve(s,e.isComponent)))}const we=new Uint8Array([123,123]),Ue=new Uint8Array([125,125]);function Fe(e){return e>=97&&e<=122||e>=65&&e<=90}function Be(e){return 32===e||10===e||9===e||12===e||13===e}function $e(e){return 47===e||62===e||Be(e)}function He(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const Ge={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};const qe={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},Je={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function je(e,{compatConfig:t}){const n=t&&t[e];return"MODE"===e?n||3:n}function We(e,t){const n=je("MODE",t),s=je(e,t);return 3===n?!0===s:!1!==s}function Ke(e,t,n,...s){return We(e,t)}function Ye(e,t,n,...s){if("suppress-warning"===je(e,t))return;const{message:i,link:o}=Je[e],r=`(deprecation ${e}) ${"function"==typeof i?i(...s):i}${o?`\n Details: ${o}`:""}`,c=new SyntaxError(r);c.code=e,n&&(c.loc=n),t.onWarn(c)}function Qe(e){throw e}function ze(e){}function Ze(e,t,n,s){const i=new SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return i.code=e,i.loc=t,i}const et={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",__EXTEND_POINT__:52,52:"__EXTEND_POINT__"},tt={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '\x3c!--' in comment.",17:"Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).",18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:"v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.",45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',52:""};function nt(e,t,n=!1,s=[],i=Object.create(null)){}function st(e,t,n){return!1}function it(e,t){if(e&&("ObjectProperty"===e.type||"ArrayPattern"===e.type)){let e=t.length;for(;e--;){const n=t[e];if("AssignmentExpression"===n.type)return!0;if("ObjectProperty"!==n.type&&!n.type.endsWith("Pattern"))break}}return!1}function ot(e){let t=e.length;for(;t--;){const n=e[t];if("NewExpression"===n.type)return!0;if("MemberExpression"!==n.type)break}return!1}function rt(e,t){for(const n of e.params)for(const e of at(n))t(e)}function ct(e,t){for(const n of e.body)if("VariableDeclaration"===n.type){if(n.declare)continue;for(const e of n.declarations)for(const n of at(e.id))t(n)}else if("FunctionDeclaration"===n.type||"ClassDeclaration"===n.type){if(n.declare||!n.id)continue;t(n.id)}else if("ForOfStatement"===n.type||"ForInStatement"===n.type||"ForStatement"===n.type){const e="ForStatement"===n.type?n.init:n.left;if(e&&"VariableDeclaration"===e.type)for(const n of e.declarations)for(const e of at(n.id))t(e)}}function at(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(const s of e.properties)at("RestElement"===s.type?s.argument:s.value,t);break;case"ArrayPattern":e.elements.forEach((e=>{e&&at(e,t)}));break;case"RestElement":at(e.argument,t);break;case"AssignmentPattern":at(e.left,t)}return t}const lt=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),ht=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,dt=(e,t)=>ht(t)&&t.key===e,pt=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function ut(e){return pt.includes(e.type)?ut(e.expression):e}const ft=e=>4===e.type&&e.isStatic;function mt(e){switch(e){case"Teleport":case"teleport":return A;case"Suspense":case"suspense":return v;case"KeepAlive":case"keep-alive":return C;case"BaseTransition":case"base-transition":return x}}const _t=/^\d|[^\$\w]/,Et=e=>!_t.test(e),St=/[A-Za-z_$\xA0-\uFFFF]/,gt=/[\.\?\w$\xA0-\uFFFF]/,Tt=/\s+[.[]\s*|\s*[.[]\s+/g,Nt=e=>{e=e.trim().replace(Tt,(e=>e.trim()));let t=0,n=[],s=0,i=0,o=null;for(let r=0;r<e.length;r++){const c=e.charAt(r);switch(t){case 0:if("["===c)n.push(t),t=1,s++;else if("("===c)n.push(t),t=2,i++;else if(!(0===r?St:gt).test(c))return!1;break;case 1:"'"===c||'"'===c||"`"===c?(n.push(t),t=3,o=c):"["===c?s++:"]"===c&&(--s||(t=n.pop()));break;case 2:if("'"===c||'"'===c||"`"===c)n.push(t),t=3,o=c;else if("("===c)i++;else if(")"===c){if(r===e.length-1)return!1;--i||(t=n.pop())}break;case 3:c===o&&(t=n.pop(),o=null)}}return!s&&!i},It=n,yt=Nt;function Ot(e,t,n=t.length){return bt({offset:e.offset,line:e.line,column:e.column},t,n)}function bt(e,t,n=t.length){let s=0,i=-1;for(let o=0;o<n;o++)10===t.charCodeAt(o)&&(s++,i=o);return e.offset+=n,e.line+=s,e.column=-1===i?e.column+n:n-i,e}function At(e,t){if(!e)throw new Error(t||"unexpected compiler condition")}function vt(e,t,n=!1){for(let s=0;s<e.props.length;s++){const i=e.props[s];if(7===i.type&&(n||i.exp)&&(c(t)?i.name===t:t.test(i.name)))return i}}function Ct(e,t,n=!1,s=!1){for(let i=0;i<e.props.length;i++){const o=e.props[i];if(6===o.type){if(n)continue;if(o.name===t&&(o.value||s))return o}else if("bind"===o.name&&(o.exp||s)&&xt(o.arg,t))return o}}function xt(e,t){return!(!e||!ft(e)||e.content!==t)}function Rt(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))}function Lt(e){return 5===e.type||2===e.type}function Mt(e){return 7===e.type&&"slot"===e.name}function Pt(e){return 1===e.type&&3===e.tagType}function Dt(e){return 1===e.type&&2===e.tagType}const kt=new Set([Y,Q]);function Vt(e,t=[]){if(e&&!c(e)&&14===e.type){const n=e.callee;if(!c(n)&&kt.has(n))return Vt(e.arguments[0],t.concat(e))}return[e,t]}function Xt(e,t,n){let s,i,o=13===e.type?e.props:e.arguments[2],r=[];if(o&&!c(o)&&14===o.type){const e=Vt(o);o=e[0],r=e[1],i=r[r.length-1]}if(null==o||c(o))s=Te([t]);else if(14===o.type){const e=o.arguments[0];c(e)||15!==e.type?o.callee===z?s=be(n.helper(j),[Te([t]),o]):o.arguments.unshift(Te([t])):wt(t,e)||e.properties.unshift(t),!s&&(s=o)}else 15===o.type?(wt(t,o)||o.properties.unshift(t),s=o):(s=be(n.helper(j),[Te([t]),o]),i&&i.callee===Q&&(i=r[r.length-2]));13===e.type?i?i.arguments[0]=s:e.props=s:i?i.arguments[0]=s:e.arguments[2]=s}function wt(e,t){let n=!1;if(4===e.key.type){const s=e.key.content;n=t.properties.some((e=>4===e.key.type&&e.key.content===s))}return n}function Ut(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function Ft(e,t){if(!e||0===Object.keys(t).length)return!1;switch(e.type){case 1:for(let n=0;n<e.props.length;n++){const s=e.props[n];if(7===s.type&&(Ft(s.arg,t)||Ft(s.exp,t)))return!0}return e.children.some((e=>Ft(e,t)));case 11:return!!Ft(e.source,t)||e.children.some((e=>Ft(e,t)));case 9:return e.branches.some((e=>Ft(e,t)));case 10:return!!Ft(e.condition,t)||e.children.some((e=>Ft(e,t)));case 4:return!e.isStatic&&Et(e.content)&&!!t[e.content];case 8:return e.children.some((e=>l(e)&&Ft(e,t)));case 5:case 12:return Ft(e.content,t);default:return!1}}function Bt(e){return 14===e.type&&e.callee===ae?e.arguments[1].returns:e}const $t=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Ht={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:s,isPreTag:s,isCustomElement:s,onError:Qe,onWarn:ze,comments:!1,prefixIdentifiers:!1};let Gt=Ht,qt=null,Jt="",jt=null,Wt=null,Kt="",Yt=-1,Qt=-1,zt=0,Zt=!1,en=null;const tn=[],nn=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=we,this.delimiterClose=Ue,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=we,this.delimiterClose=Ue}getPos(e){let t=1,n=e+1;for(let s=this.newlines.length-1;s>=0;s--){const i=this.newlines[s];if(e>i){t=s+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?$e(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||Be(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.sectionStart=t+2,this.stateInClosingTagName(e),void(this.inRCDATA=!1)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===Ge.TitleEnd||this.currentSequence===Ge.TextareaEnd&&!this.inSFCRoot?e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===Ge.Cdata[this.sequenceIndex]?++this.sequenceIndex===Ge.Cdata.length&&(this.state=28,this.currentSequence=Ge.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Ge.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){if(33===e)this.state=22,this.sectionStart=this.index+1;else if(63===e)this.state=24,this.sectionStart=this.index+1;else if(Fe(e))if(this.sectionStart=this.index,0===this.mode)this.state=6;else if(this.inSFCRoot)this.state=34;else if(this.inXML)this.state=6;else{const t=32|e;this.state=116===t?30:115===t?29:6}else 47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){$e(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if($e(e)){const t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(He("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){Be(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=Fe(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||Be(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Be(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Be(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||$e(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||$e(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||$e(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||$e(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||$e(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):Be(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):Be(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){Be(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):39!==e&&60!==e&&61!==e&&96!==e||this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=Ge.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const t=32|e;t===Ge.ScriptEnd[3]?this.startSpecial(Ge.ScriptEnd,4):t===Ge.StyleEnd[3]?this.startSpecial(Ge.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){const t=32|e;t===Ge.TitleEnd[3]?this.startSpecial(Ge.TitleEnd,4):t===Ge.TextareaEnd[3]?this.startSpecial(Ge.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):19!==this.state&&20!==this.state&&21!==this.state||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===Ge.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(tn,{onerr:yn,ontext(e,t){an(rn(e,t),e,t)},ontextentity(e,t,n){an(e,t,n)},oninterpolation(e,t){if(Zt)return an(rn(e,t),e,t);let n=e+nn.delimiterOpen.length,s=t-nn.delimiterClose.length;for(;Be(Jt.charCodeAt(n));)n++;for(;Be(Jt.charCodeAt(s-1));)s--;let i=rn(n,s);i.includes("&")&&(i=Gt.decodeEntities(i,!1)),Sn({type:5,content:In(i,!1,gn(n,s)),loc:gn(e,t)})},onopentagname(e,t){const n=rn(e,t);jt={type:1,tag:n,ns:Gt.getNamespace(n,tn[0],Gt.ns),tagType:0,props:[],children:[],loc:gn(e-1,t),codegenNode:void 0}},onopentagend(e){cn(e)},onclosetag(e,t){const n=rn(e,t);if(!Gt.isVoidTag(n)){let s=!1;for(let e=0;e<tn.length;e++){if(tn[e].tag.toLowerCase()===n.toLowerCase()){s=!0;for(let n=0;n<=e;n++){ln(tn.shift(),t,n<e)}break}}s||hn(e,60)}},onselfclosingtag(e){var t;const n=jt.tag;jt.isSelfClosing=!0,cn(e),(null==(t=tn[0])?void 0:t.tag)===n&&ln(tn.shift(),e)},onattribname(e,t){Wt={type:6,name:rn(e,t),nameLoc:gn(e,t),value:void 0,loc:gn(e)}},ondirname(e,t){const n=rn(e,t),s="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(Zt||""===s)Wt={type:6,name:n,nameLoc:gn(e,t),value:void 0,loc:gn(e)};else if(Wt={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?["prop"]:[],loc:gn(e)},"pre"===s){Zt=nn.inVPre=!0,en=jt;const e=jt.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=Nn(e[t]))}},ondirarg(e,t){if(e===t)return;const n=rn(e,t);if(Zt)Wt.name+=n,Tn(Wt.nameLoc,t);else{const s="["!==n[0];Wt.arg=In(s?n:n.slice(1,-1),s,gn(e,t),s?3:0)}},ondirmodifier(e,t){const n=rn(e,t);if(Zt)Wt.name+="."+n,Tn(Wt.nameLoc,t);else if("slot"===Wt.name){const e=Wt.arg;e&&(e.content+="."+n,Tn(e.loc,t))}else Wt.modifiers.push(n)},onattribdata(e,t){Kt+=rn(e,t),Yt<0&&(Yt=e),Qt=t},onattribentity(e,t,n){Kt+=e,Yt<0&&(Yt=t),Qt=n},onattribnameend(e){const t=rn(Wt.loc.start.offset,e);7===Wt.type&&(Wt.rawName=t),jt.props.some((e=>(7===e.type?e.rawName:e.name)===t))},onattribend(e,t){if(jt&&Wt){if(Tn(Wt.loc,t),0!==e)if(Kt.includes("&")&&(Kt=Gt.decodeEntities(Kt,!0)),6===Wt.type)"class"===Wt.name&&(Kt=En(Kt).trim()),Wt.value={type:2,content:Kt,loc:1===e?gn(Yt,Qt):gn(Yt-1,Qt+1)},nn.inSFCRoot&&"template"===jt.tag&&"lang"===Wt.name&&Kt&&"html"!==Kt&&nn.enterRCDATA(He("</template"),0);else{let e=0;Wt.exp=In(Kt,!1,gn(Yt,Qt),0,e),"for"===Wt.name&&(Wt.forParseResult=function(e){const t=e.loc,n=e.content,s=n.match($t);if(!s)return;const[,i,o]=s,r=(e,n,s=!1)=>{const i=t.start.offset+n;return In(e,!1,gn(i,i+e.length),0,s?1:0)},c={source:r(o.trim(),n.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let a=i.trim().replace(on,"").trim();const l=i.indexOf(a),h=a.match(sn);if(h){a=a.replace(sn,"").trim();const e=h[1].trim();let t;if(e&&(t=n.indexOf(e,l+a.length),c.key=r(e,t,!0)),h[2]){const s=h[2].trim();s&&(c.index=r(s,n.indexOf(s,c.key?t+e.length:l+a.length),!0))}}a&&(c.value=r(a,l,!0));return c}(Wt.exp));let t=-1;"bind"===Wt.name&&(t=Wt.modifiers.indexOf("sync"))>-1&&Ke("COMPILER_V_BIND_SYNC",Gt,0)&&(Wt.name="model",Wt.modifiers.splice(t,1))}7===Wt.type&&"pre"===Wt.name||jt.props.push(Wt)}Kt="",Yt=Qt=-1},oncomment(e,t){Gt.comments&&Sn({type:3,content:rn(e,t),loc:gn(e-4,t+3)})},onend(){const e=Jt.length;for(let t=0;t<tn.length;t++)ln(tn[t],e-1)},oncdata(e,t){0!==tn[0].ns&&an(rn(e,t),e,t)},onprocessinginstruction(e){0===(tn[0]?tn[0].ns:Gt.ns)&&yn(21,e-1)}}),sn=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,on=/^\(|\)$/g;function rn(e,t){return Jt.slice(e,t)}function cn(e){nn.inSFCRoot&&(jt.innerLoc=gn(e+1,e+1)),Sn(jt);const{tag:t,ns:n}=jt;0===n&&Gt.isPreTag(t)&&zt++,Gt.isVoidTag(t)?ln(jt,e):(tn.unshift(jt),1!==n&&2!==n||(nn.inXML=!0)),jt=null}function an(e,t,n){var s;{const t=null==(s=tn[0])?void 0:s.tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=Gt.decodeEntities(e,!1))}const i=tn[0]||qt,o=i.children[i.children.length-1];2===(null==o?void 0:o.type)?(o.content+=e,Tn(o.loc,n)):i.children.push({type:2,content:e,loc:gn(t,n)})}function ln(e,t,n=!1){Tn(e.loc,n?hn(t,60):t+1),nn.inSFCRoot&&(e.innerLoc.end=o({},e.children.length?e.children[e.children.length-1].loc.end:e.innerLoc.start),e.innerLoc.source=rn(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:s,ns:i}=e;Zt||("slot"===s?e.tagType=2:pn(e)?e.tagType=3:function({tag:e,props:t}){var n;if(Gt.isCustomElement(e))return!1;if("component"===e||(s=e.charCodeAt(0),s>64&&s<91)||mt(e)||(null==(n=Gt.isBuiltInComponent)?void 0:n.call(Gt,e))||Gt.isNativeTag&&!Gt.isNativeTag(e))return!0;var s;for(let i=0;i<t.length;i++){const e=t[i];if(6===e.type){if("is"===e.name&&e.value){if(e.value.content.startsWith("vue:"))return!0;if(Ke("COMPILER_IS_ON_ELEMENT",Gt))return!0}}else if("bind"===e.name&&xt(e.arg,"is")&&Ke("COMPILER_IS_ON_ELEMENT",Gt))return!0}return!1}(e)&&(e.tagType=1)),nn.inRCDATA||(e.children=fn(e.children,e.tag)),0===i&&Gt.isPreTag(s)&&zt--,en===e&&(Zt=nn.inVPre=!1,en=null),nn.inXML&&0===(tn[0]?tn[0].ns:Gt.ns)&&(nn.inXML=!1);{const t=e.props;if(!nn.inSFCRoot&&We("COMPILER_NATIVE_TEMPLATE",Gt)&&"template"===e.tag&&!pn(e)){const t=tn[0]||qt,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}const n=t.find((e=>6===e.type&&"inline-template"===e.name));n&&Ke("COMPILER_INLINE_TEMPLATE",Gt)&&e.children.length&&(n.value={type:2,content:rn(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function hn(e,t){let n=e;for(;Jt.charCodeAt(n)!==t&&n>=0;)n--;return n}const dn=new Set(["if","else","else-if","for","slot"]);function pn({tag:e,props:t}){if("template"===e)for(let n=0;n<t.length;n++)if(7===t[n].type&&dn.has(t[n].name))return!0;return!1}const un=/\r\n/g;function fn(e,t){var n,s;const i="preserve"!==Gt.whitespace;let o=!1;for(let r=0;r<e.length;r++){const t=e[r];if(2===t.type)if(zt)t.content=t.content.replace(un,"\n");else if(mn(t.content)){const c=null==(n=e[r-1])?void 0:n.type,a=null==(s=e[r+1])?void 0:s.type;!c||!a||i&&(3===c&&(3===a||1===a)||1===c&&(3===a||1===a&&_n(t.content)))?(o=!0,e[r]=null):t.content=" "}else i&&(t.content=En(t.content))}if(zt&&t&&Gt.isPreTag(t)){const t=e[0];t&&2===t.type&&(t.content=t.content.replace(/^\r?\n/,""))}return o?e.filter(Boolean):e}function mn(e){for(let t=0;t<e.length;t++)if(!Be(e.charCodeAt(t)))return!1;return!0}function _n(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}function En(e){let t="",n=!1;for(let s=0;s<e.length;s++)Be(e.charCodeAt(s))?n||(t+=" ",n=!0):(t+=e[s],n=!1);return t}function Sn(e){(tn[0]||qt).children.push(e)}function gn(e,t){return{start:nn.getPos(e),end:null==t?t:nn.getPos(t),source:null==t?t:rn(e,t)}}function Tn(e,t){e.end=nn.getPos(t),e.source=rn(e.start.offset,t)}function Nn(e){const t={type:6,name:e.rawName,nameLoc:gn(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function In(e,t=!1,n,s=0,i=0){return Ie(e,t,n,s)}function yn(e,t,n){Gt.onError(Ze(e,gn(t,t)))}function On(e,t){if(nn.reset(),jt=null,Wt=null,Kt="",Yt=-1,Qt=-1,tn.length=0,Jt=e,Gt=o({},Ht),t){let e;for(e in t)null!=t[e]&&(Gt[e]=t[e])}nn.mode="html"===Gt.parseMode?1:"sfc"===Gt.parseMode?2:0,nn.inXML=1===Gt.ns||2===Gt.ns;const n=null==t?void 0:t.delimiters;n&&(nn.delimiterOpen=He(n[0]),nn.delimiterClose=He(n[1]));const s=qt=Ee([],e);return nn.parse(Jt),s.loc=gn(0,e.length),s.children=fn(s.children),qt=null,s}function bn(e,t){vn(e,t,An(e,e.children[0]))}function An(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!Dt(t)}function vn(e,t,n=!1){const{children:s}=e,i=s.length;let o=0;for(let r=0;r<s.length;r++){const e=s[r];if(1===e.type&&0===e.tagType){const s=n?0:Cn(e,t);if(s>0){if(s>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),o++;continue}}else{const n=e.codegenNode;if(13===n.type){const s=Pn(n);if((!s||512===s||1===s)&&Ln(e,t)>=2){const s=Mn(e);s&&(n.props=t.hoist(s))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,vn(e,t),n&&t.scopes.vSlot--}else if(11===e.type)vn(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)vn(e.branches[n],t,1===e.branches[n].children.length)}if(o&&t.transformHoist&&t.transformHoist(s,t,e),o&&o===i&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&r(e.codegenNode.children)){const n=t.hoist(ge(e.codegenNode.children));t.hmr&&(n.content=`[...${n.content}]`),e.codegenNode.children=n}}function Cn(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const s=n.get(e);if(void 0!==s)return s;const i=e.codegenNode;if(13!==i.type)return 0;if(i.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(Pn(i))return n.set(e,0),0;{let s=3;const o=Ln(e,t);if(0===o)return n.set(e,0),0;o<s&&(s=o);for(let i=0;i<e.children.length;i++){const o=Cn(e.children[i],t);if(0===o)return n.set(e,0),0;o<s&&(s=o)}if(s>1)for(let i=0;i<e.props.length;i++){const o=e.props[i];if(7===o.type&&"bind"===o.name&&o.exp){const i=Cn(o.exp,t);if(0===i)return n.set(e,0),0;i<s&&(s=i)}}if(i.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(R),t.removeHelper(Ve(t.inSSR,i.isComponent)),i.isBlock=!1,t.helper(ke(t.inSSR,i.isComponent))}return n.set(e,s),s}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return Cn(e.content,t);case 4:return e.constType;case 8:let o=3;for(let n=0;n<e.children.length;n++){const s=e.children[n];if(c(s)||a(s))continue;const i=Cn(s,t);if(0===i)return 0;i<o&&(o=i)}return o}}const xn=new Set([W,K,Y,Q]);function Rn(e,t){if(14===e.type&&!c(e.callee)&&xn.has(e.callee)){const n=e.arguments[0];if(4===n.type)return Cn(n,t);if(14===n.type)return Rn(n,t)}return 0}function Ln(e,t){let n=3;const s=Mn(e);if(s&&15===s.type){const{properties:e}=s;for(let s=0;s<e.length;s++){const{key:i,value:o}=e[s],r=Cn(i,t);if(0===r)return r;let c;if(r<n&&(n=r),c=4===o.type?Cn(o,t):14===o.type?Rn(o,t):0,0===c)return c;c<n&&(n=c)}}return n}function Mn(e){const t=e.codegenNode;if(13===t.type)return t.props}function Pn(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function Dn(e,{filename:s="",prefixIdentifiers:i=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:a=!1,nodeTransforms:l=[],directiveTransforms:h={},transformHoist:d=null,isBuiltInComponent:p=n,isCustomElement:u=n,expressionPlugins:_=[],scopeId:E=null,slotted:S=!0,ssr:g=!1,inSSR:T=!1,ssrCssVars:N="",bindingMetadata:I=t,inline:y=!1,isTS:O=!1,onError:b=Qe,onWarn:A=ze,compatConfig:v}){const C=s.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),x={filename:s,selfName:C&&m(f(C[1])),prefixIdentifiers:i,hoistStatic:o,hmr:r,cacheHandlers:a,nodeTransforms:l,directiveTransforms:h,transformHoist:d,isBuiltInComponent:p,isCustomElement:u,expressionPlugins:_,scopeId:E,slotted:S,ssr:g,inSSR:T,ssrCssVars:N,bindingMetadata:I,inline:y,isTS:O,onError:b,onWarn:A,compatConfig:v,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=x.helpers.get(e)||0;return x.helpers.set(e,t+1),e},removeHelper(e){const t=x.helpers.get(e);if(t){const n=t-1;n?x.helpers.set(e,n):x.helpers.delete(e)}},helperString:e=>`_${he[x.helper(e)]}`,replaceNode(e){x.parent.children[x.childIndex]=x.currentNode=e},removeNode(e){const t=e?x.parent.children.indexOf(e):x.currentNode?x.childIndex:-1;e&&e!==x.currentNode?x.childIndex>t&&(x.childIndex--,x.onNodeRemoved()):(x.currentNode=null,x.onNodeRemoved()),x.parent.children.splice(t,1)},onNodeRemoved:n,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){c(e)&&(e=Ie(e)),x.hoists.push(e);const t=Ie(`_hoisted_${x.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>Ce(x.cached++,e,t)};return x.filters=new Set,x}function kn(e,t){const n=Dn(e,t);Vn(e,n),t.hoistStatic&&bn(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:s}=e;if(1===s.length){const n=s[0];if(An(e,n)&&n.codegenNode){const s=n.codegenNode;13===s.type&&Xe(s,t),e.codegenNode=s}else e.codegenNode=n}else if(s.length>1){let s=64;e.codegenNode=Se(t,n(b),void 0,e.children,s+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function Vn(e,t){t.currentNode=e;const{nodeTransforms:n}=t,s=[];for(let o=0;o<n.length;o++){const i=n[o](e,t);if(i&&(r(i)?s.push(...i):s.push(i)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(k);break;case 5:t.ssr||t.helper(J);break;case 9:for(let n=0;n<e.branches.length;n++)Vn(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const s=()=>{n--};for(;n<e.children.length;n++){const i=e.children[n];c(i)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=s,Vn(i,t))}}(e,t)}t.currentNode=e;let i=s.length;for(;i--;)s[i]()}function Xn(e,t){const n=c(e)?t=>t===e:t=>e.test(t);return(e,s)=>{if(1===e.type){const{props:i}=e;if(3===e.tagType&&i.some(Mt))return;const o=[];for(let r=0;r<i.length;r++){const c=i[r];if(7===c.type&&n(c.name)){i.splice(r,1),r--;const n=t(e,c,s);n&&o.push(n)}}return o}}}const wn="/*#__PURE__*/",Un=e=>`${he[e]}: _${he[e]}`;function Fn(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:s=!1,filename:i="template.vue.html",scopeId:o=null,optimizeImports:r=!1,runtimeGlobalName:c="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:l="vue/server-renderer",ssr:h=!1,isTS:d=!1,inSSR:p=!1}){const u={mode:t,prefixIdentifiers:n,sourceMap:s,filename:i,scopeId:o,optimizeImports:r,runtimeGlobalName:c,runtimeModuleName:a,ssrRuntimeModuleName:l,ssr:h,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${he[e]}`,push(e,t=-2,n){u.code+=e},indent(){f(++u.indentLevel)},deindent(e=!1){e?--u.indentLevel:f(--u.indentLevel)},newline(){f(u.indentLevel)}};function f(e){u.push("\n"+" ".repeat(e),0)}return u}function Bn(e,t={}){const n=Fn(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:i,prefixIdentifiers:o,indent:r,deindent:c,newline:a,ssr:l}=n,h=Array.from(e.helpers),d=h.length>0,p=!o&&"module"!==s,u=n;!function(e,t){const{push:n,newline:s,runtimeGlobalName:i}=t,o=i,r=Array.from(e.helpers);if(r.length>0&&(n(`const _Vue = ${o}\n`,-1),e.hoists.length)){n(`const { ${[P,D,k,V,X].filter((e=>r.includes(e))).map(Un).join(", ")} } = _Vue\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s}=t;s();for(let i=0;i<e.length;i++){const o=e[i];o&&(n(`const _hoisted_${i+1} = `),qn(o,t),s())}t.pure=!1})(e.hoists,t),s(),n("return ")}(e,u);if(i(`function ${l?"ssrRender":"render"}(${(l?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),r(),p&&(i("with (_ctx) {"),r(),d&&(i(`const { ${h.map(Un).join(", ")} } = _Vue\n`,-1),a())),e.components.length&&($n(e.components,"component",n),(e.directives.length||e.temps>0)&&a()),e.directives.length&&($n(e.directives,"directive",n),e.temps>0&&a()),e.filters&&e.filters.length&&(a(),$n(e.filters,"filter",n),a()),e.temps>0){i("let ");for(let t=0;t<e.temps;t++)i(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i("\n",0),a()),l||i("return "),e.codegenNode?qn(e.codegenNode,n):i("null"),p&&(c(),i("}")),c(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function $n(e,t,{helper:n,push:s,newline:i,isTS:o}){const r=n("filter"===t?B:"component"===t?w:F);for(let c=0;c<e.length;c++){let n=e[c];const a=n.endsWith("__self");a&&(n=n.slice(0,-6)),s(`const ${Ut(n,t)} = ${r}(${JSON.stringify(n)}${a?", true":""})${o?"!":""}`),c<e.length-1&&i()}}function Hn(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Gn(e,t,n),n&&t.deindent(),t.push("]")}function Gn(e,t,n=!1,s=!0){const{push:i,newline:o}=t;for(let a=0;a<e.length;a++){const l=e[a];c(l)?i(l,-3):r(l)?Hn(l,t):qn(l,t),a<e.length-1&&(n?(s&&i(","),o()):s&&i(", "))}}function qn(e,t){if(c(e))t.push(e,-3);else if(a(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:qn(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:Jn(e,t);break;case 5:!function(e,t){const{push:n,helper:s,pure:i}=t;i&&n(wn);n(`${s(J)}(`),qn(e.content,t),n(")")}(e,t);break;case 8:jn(e,t);break;case 3:!function(e,t){const{push:n,helper:s,pure:i}=t;i&&n(wn);n(`${s(k)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:s,pure:i}=t,{tag:o,props:r,children:c,patchFlag:a,dynamicProps:l,directives:h,isBlock:d,disableTracking:p,isComponent:u}=e;h&&n(s($)+"(");d&&n(`(${s(R)}(${p?"true":""}), `);i&&n(wn);const f=d?Ve(t.inSSR,u):ke(t.inSSR,u);n(s(f)+"(",-2,e),Gn(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([o,r,c,a,l]),t),n(")"),d&&n(")");h&&(n(", "),qn(h,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:s,pure:i}=t,o=c(e.callee)?e.callee:s(e.callee);i&&n(wn);n(o+"(",-2,e),Gn(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:s,deindent:i,newline:o}=t,{properties:r}=e;if(!r.length)return void n("{}",-2,e);const c=r.length>1||!1;n(c?"{":"{ "),c&&s();for(let a=0;a<r.length;a++){const{key:e,value:s}=r[a];Wn(e,t),n(": "),qn(s,t),a<r.length-1&&(n(","),o())}c&&i(),n(c?"}":" }")}(e,t);break;case 17:!function(e,t){Hn(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:s,deindent:i}=t,{params:o,returns:c,body:a,newline:l,isSlot:h}=e;h&&n(`_${he[oe]}(`);n("(",-2,e),r(o)?Gn(o,t):o&&qn(o,t);n(") => "),(l||a)&&(n("{"),s());c?(l&&n("return "),r(c)?Hn(c,t):qn(c,t)):a&&qn(a,t);(l||a)&&(i(),n("}"));h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:s,alternate:i,newline:o}=e,{push:r,indent:c,deindent:a,newline:l}=t;if(4===n.type){const e=!Et(n.content);e&&r("("),Jn(n,t),e&&r(")")}else r("("),qn(n,t),r(")");o&&c(),t.indentLevel++,o||r(" "),r("? "),qn(s,t),t.indentLevel--,o&&l(),o||r(" "),r(": ");const h=19===i.type;h||t.indentLevel++;qn(i,t),h||t.indentLevel--;o&&a(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:s,indent:i,deindent:o,newline:r}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(i(),n(`${s(ne)}(-1),`),r());n(`_cache[${e.index}] = `),qn(e.value,t),e.isVNode&&(n(","),r(),n(`${s(ne)}(1),`),r(),n(`_cache[${e.index}]`),o());n(")")}(e,t);break;case 21:Gn(e.body,t,!0,!1)}}function Jn(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,-3,e)}function jn(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];c(s)?t.push(s,-3):qn(s,t)}}function Wn(e,t){const{push:n}=t;if(8===e.type)n("["),jn(e,t),n("]");else if(e.isStatic){n(Et(e.content)?e.content:JSON.stringify(e.content),-2,e)}else n(`[${e.content}]`,-3,e)}const Kn=(e,t)=>{if(5===e.type)e.content=Yn(e.content,t);else if(1===e.type)for(let n=0;n<e.props.length;n++){const s=e.props[n];if(7===s.type&&"for"!==s.name){const e=s.exp,n=s.arg;!e||4!==e.type||"on"===s.name&&n||(s.exp=Yn(e,t,"slot"===s.name)),n&&4===n.type&&!n.isStatic&&(s.arg=Yn(n,t))}}};function Yn(e,t,n=!1,s=!1,i=Object.create(t.identifiers)){return e}function Qn(e){return c(e)?e:4===e.type?e.content:e.children.map(Qn).join("")}const zn=Xn(/^(if|else|else-if)$/,((e,t,n)=>Zn(e,t,n,((e,t,s)=>{const i=n.parent.children;let o=i.indexOf(e),r=0;for(;o-- >=0;){const e=i[o];e&&9===e.type&&(r+=e.branches.length)}return()=>{if(s)e.codegenNode=ts(t,r,n);else{const s=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);s.alternate=ts(t,r+e.branches.length-1,n)}}}))));function Zn(e,t,n,s){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const s=t.exp?t.exp.loc:e.loc;n.onError(Ze(28,t.loc)),t.exp=Ie("true",!1,s)}if("if"===t.name){const i=es(e,t),o={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(o),s)return s(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(e);for(;o-- >=-1;){const r=i[o];if(r&&3===r.type)n.removeNode(r);else{if(!r||2!==r.type||r.content.trim().length){if(r&&9===r.type){"else-if"===t.name&&void 0===r.branches[r.branches.length-1].condition&&n.onError(Ze(30,e.loc)),n.removeNode();const i=es(e,t);r.branches.push(i);const o=s&&s(r,i,!1);Vn(i,n),o&&o(),n.currentNode=null}else n.onError(Ze(30,e.loc));break}n.removeNode(r)}}}}function es(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!vt(e,"for")?e.children:[e],userKey:Ct(e,"key"),isTemplateIf:n}}function ts(e,t,n){return e.condition?ve(e.condition,ns(e,t,n),be(n.helper(k),['""',"true"])):ns(e,t,n)}function ns(e,t,n){const{helper:s}=n,i=Ne("key",Ie(`${t}`,!1,_e,2)),{children:o}=e,r=o[0];if(1!==o.length||1!==r.type){if(1===o.length&&11===r.type){const e=r.codegenNode;return Xt(e,i,n),e}{let t=64;return Se(n,s(b),Te([i]),o,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=r.codegenNode,t=Bt(e);return 13===t.type&&Xe(t,n),Xt(t,i,n),e}}const ss=Xn("for",((e,t,n)=>{const{helper:s,removeHelper:i}=n;return is(e,t,n,(t=>{const o=be(s(H),[t.source]),r=Pt(e),c=vt(e,"memo"),a=Ct(e,"key"),l=a&&(6===a.type?Ie(a.value.content,!0):a.exp),h=a?Ne("key",l):null,d=4===t.source.type&&t.source.constType>0,p=d?64:a?128:256;return t.codegenNode=Se(n,s(b),void 0,o,p+"",void 0,void 0,!0,!d,!1,e.loc),()=>{let a;const{children:p}=t,u=1!==p.length||1!==p[0].type,f=Dt(e)?e:r&&1===e.children.length&&Dt(e.children[0])?e.children[0]:null;if(f?(a=f.codegenNode,r&&h&&Xt(a,h,n)):u?a=Se(n,s(b),h?Te([h]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(a=p[0].codegenNode,r&&h&&Xt(a,h,n),a.isBlock!==!d&&(a.isBlock?(i(R),i(Ve(n.inSSR,a.isComponent))):i(ke(n.inSSR,a.isComponent))),a.isBlock=!d,a.isBlock?(s(R),s(Ve(n.inSSR,a.isComponent))):s(ke(n.inSSR,a.isComponent))),c){const e=Ae(rs(t.parseResult,[Ie("_cached")]));e.body=xe([Oe(["const _memo = (",c.exp,")"]),Oe(["if (_cached",...l?[" && _cached.key === ",l]:[],` && ${n.helperString(le)}(_cached, _memo)) return _cached`]),Oe(["const _item = ",a]),Ie("_item.memo = _memo"),Ie("return _item")]),o.arguments.push(e,Ie("_cache"),Ie(String(n.cached++)))}else o.arguments.push(Ae(rs(t.parseResult),a,!0))}}))}));function is(e,t,n,s){if(!t.exp)return void n.onError(Ze(31,t.loc));const i=t.forParseResult;if(!i)return void n.onError(Ze(32,t.loc));os(i);const{scopes:o}=n,{source:r,value:c,key:a,index:l}=i,h={type:11,loc:t.loc,source:r,valueAlias:c,keyAlias:a,objectIndexAlias:l,parseResult:i,children:Pt(e)?e.children:[e]};n.replaceNode(h),o.vFor++;const d=s&&s(h);return()=>{o.vFor--,d&&d()}}function os(e,t){e.finalized||(e.finalized=!0)}function rs({value:e,key:t,index:n},s=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Ie("_".repeat(t+1),!1)))}([e,t,n,...s])}const cs=Ie("undefined",!1),as=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=vt(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},ls=(e,t)=>{let n;if(Pt(e)&&e.props.some(Mt)&&(n=vt(e,"for"))){const e=n.forParseResult;if(e){os(e);const{value:n,key:s,index:i}=e,{addIdentifiers:o,removeIdentifiers:r}=t;return n&&o(n),s&&o(s),i&&o(i),()=>{n&&r(n),s&&r(s),i&&r(i)}}}},hs=(e,t,n,s)=>Ae(e,n,!1,!0,n.length?n[0].loc:s);function ds(e,t,n=hs){t.helper(oe);const{children:s,loc:i}=e,o=[],r=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const a=vt(e,"slot",!0);if(a){const{arg:e,exp:t}=a;e&&!ft(e)&&(c=!0),o.push(Ne(e||Ie("default",!0),n(t,void 0,s,i)))}let l=!1,h=!1;const d=[],p=new Set;let u=0;for(let _=0;_<s.length;_++){const e=s[_];let i;if(!Pt(e)||!(i=vt(e,"slot",!0))){3!==e.type&&d.push(e);continue}if(a){t.onError(Ze(37,i.loc));break}l=!0;const{children:f,loc:m}=e,{arg:E=Ie("default",!0),exp:S,loc:g}=i;let T;ft(E)?T=E?E.content:"default":c=!0;const N=vt(e,"for"),I=n(S,N,f,m);let y,O;if(y=vt(e,"if"))c=!0,r.push(ve(y.exp,ps(E,I,u++),cs));else if(O=vt(e,/^else(-if)?$/,!0)){let e,n=_;for(;n--&&(e=s[n],3===e.type););if(e&&Pt(e)&&vt(e,"if")){s.splice(_,1),_--;let e=r[r.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=O.exp?ve(O.exp,ps(E,I,u++),cs):ps(E,I,u++)}else t.onError(Ze(30,O.loc))}else if(N){c=!0;const e=N.forParseResult;e?(os(e),r.push(be(t.helper(H),[e.source,Ae(rs(e),ps(E,I),!0)]))):t.onError(Ze(32,N.loc))}else{if(T){if(p.has(T)){t.onError(Ze(38,g));continue}p.add(T),"default"===T&&(h=!0)}o.push(Ne(E,I))}}if(!a){const e=(e,s)=>{const o=n(e,void 0,s,i);return t.compatConfig&&(o.isNonScopedSlot=!0),Ne("default",o)};l?d.length&&d.some((e=>fs(e)))&&(h?t.onError(Ze(39,d[0].loc)):o.push(e(void 0,d))):o.push(e(void 0,s))}const f=c?2:us(e.children)?3:1;let m=Te(o.concat(Ne("_",Ie(f+"",!1))),i);return r.length&&(m=be(t.helper(q),[m,ge(r)])),{slots:m,hasDynamicSlots:c}}function ps(e,t,n){const s=[Ne("name",e),Ne("fn",t)];return null!=n&&s.push(Ne("key",Ie(String(n),!0))),Te(s)}function us(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||us(n.children))return!0;break;case 9:if(us(n.branches))return!0;break;case 10:case 11:if(us(n.children))return!0}}return!1}function fs(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():fs(e.content))}const ms=new WeakMap,_s=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:s}=e,i=1===e.tagType;let o=i?Es(e,t):`"${n}"`;const r=l(o)&&o.callee===U;let c,a,h,d,p,u,f=0,m=r||o===A||o===v||!i&&("svg"===n||"foreignObject"===n);if(s.length>0){const n=Ss(e,t,void 0,i,r);c=n.props,f=n.patchFlag,p=n.dynamicPropNames;const s=n.directives;u=s&&s.length?ge(s.map((e=>Ns(e,t)))):void 0,n.shouldUseBlock&&(m=!0)}if(e.children.length>0){o===C&&(m=!0,f|=1024);if(i&&o!==A&&o!==C){const{slots:n,hasDynamicSlots:s}=ds(e,t);a=n,s&&(f|=1024)}else if(1===e.children.length&&o!==A){const n=e.children[0],s=n.type,i=5===s||8===s;i&&0===Cn(n,t)&&(f|=1),a=i||2===s?n:e.children}else a=e.children}0!==f&&(h=String(f),p&&p.length&&(d=function(e){let t="[";for(let n=0,s=e.length;n<s;n++)t+=JSON.stringify(e[n]),n<s-1&&(t+=", ");return t+"]"}(p))),e.codegenNode=Se(t,o,c,a,h,d,u,!!m,!1,i,e.loc)};function Es(e,t,n=!1){let{tag:s}=e;const i=Is(s),o=Ct(e,"is");if(o)if(i||We("COMPILER_IS_ON_ELEMENT",t)){const e=6===o.type?o.value&&Ie(o.value.content,!0):o.exp;if(e)return be(t.helper(U),[e])}else 6===o.type&&o.value.content.startsWith("vue:")&&(s=o.value.content.slice(4));const r=mt(s)||t.isBuiltInComponent(s);return r?(n||t.helper(r),r):(t.helper(w),t.components.add(s),Ut(s,"component"))}function Ss(e,t,n=e.props,s,o,r=!1){const{tag:c,loc:l,children:p}=e;let u=[];const f=[],m=[],_=p.length>0;let E=!1,S=0,g=!1,T=!1,N=!1,I=!1,y=!1,O=!1;const b=[],A=e=>{u.length&&(f.push(Te(gs(u),l)),u=[]),e&&f.push(e)},v=({key:e,value:n})=>{if(ft(e)){const r=e.content,c=i(r);if(!c||s&&!o||"onclick"===r.toLowerCase()||"onUpdate:modelValue"===r||h(r)||(I=!0),c&&h(r)&&(O=!0),c&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&Cn(n,t)>0)return;"ref"===r?g=!0:"class"===r?T=!0:"style"===r?N=!0:"key"===r||b.includes(r)||b.push(r),!s||"class"!==r&&"style"!==r||b.includes(r)||b.push(r)}else y=!0};for(let i=0;i<n.length;i++){const o=n[i];if(6===o.type){const{loc:e,name:n,nameLoc:s,value:i}=o;let r=!0;if("ref"===n&&(g=!0,t.scopes.vFor>0&&u.push(Ne(Ie("ref_for",!0),Ie("true")))),"is"===n&&(Is(c)||i&&i.content.startsWith("vue:")||We("COMPILER_IS_ON_ELEMENT",t)))continue;u.push(Ne(Ie(n,!0,s),Ie(i?i.content:"",r,i?i.loc:e)))}else{const{name:n,arg:i,exp:h,loc:p,modifiers:g}=o,T="bind"===n,N="on"===n;if("slot"===n){s||t.onError(Ze(40,p));continue}if("once"===n||"memo"===n)continue;if("is"===n||T&&xt(i,"is")&&(Is(c)||We("COMPILER_IS_ON_ELEMENT",t)))continue;if(N&&r)continue;if((T&&xt(i,"key")||N&&_&&xt(i,"vue:before-update"))&&(E=!0),T&&xt(i,"ref")&&t.scopes.vFor>0&&u.push(Ne(Ie("ref_for",!0),Ie("true"))),!i&&(T||N)){if(y=!0,h)if(T){if(A(),We("COMPILER_V_BIND_OBJECT_ORDER",t)){f.unshift(h);continue}f.push(h)}else A({type:14,loc:p,callee:t.helper(z),arguments:s?[h]:[h,"true"]});else t.onError(Ze(T?34:35,p));continue}T&&g.includes("prop")&&(S|=32);const I=t.directiveTransforms[n];if(I){const{props:n,needRuntime:s}=I(o,e,t);!r&&n.forEach(v),N&&i&&!ft(i)?A(Te(n,l)):u.push(...n),s&&(m.push(o),a(s)&&ms.set(o,s))}else d(n)||(m.push(o),_&&(E=!0))}}let C;if(f.length?(A(),C=f.length>1?be(t.helper(j),f,l):f[0]):u.length&&(C=Te(gs(u),l)),y?S|=16:(T&&!s&&(S|=2),N&&!s&&(S|=4),b.length&&(S|=8),I&&(S|=32)),E||0!==S&&32!==S||!(g||O||m.length>0)||(S|=512),!t.inSSR&&C)switch(C.type){case 15:let e=-1,n=-1,s=!1;for(let t=0;t<C.properties.length;t++){const i=C.properties[t].key;ft(i)?"class"===i.content?e=t:"style"===i.content&&(n=t):i.isHandlerKey||(s=!0)}const i=C.properties[e],o=C.properties[n];s?C=be(t.helper(Y),[C]):(i&&!ft(i.value)&&(i.value=be(t.helper(W),[i.value])),o&&(N||4===o.value.type&&"["===o.value.content.trim()[0]||17===o.value.type)&&(o.value=be(t.helper(K),[o.value])));break;case 14:break;default:C=be(t.helper(Y),[be(t.helper(Q),[C])])}return{props:C,directives:m,patchFlag:S,dynamicPropNames:b,shouldUseBlock:E}}function gs(e){const t=new Map,n=[];for(let s=0;s<e.length;s++){const o=e[s];if(8===o.key.type||!o.key.isStatic){n.push(o);continue}const r=o.key.content,c=t.get(r);c?("style"===r||"class"===r||i(r))&&Ts(c,o):(t.set(r,o),n.push(o))}return n}function Ts(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=ge([e.value,t.value],e.loc)}function Ns(e,t){const n=[],s=ms.get(e);s?n.push(t.helperString(s)):(t.helper(F),t.directives.add(e.name),n.push(Ut(e.name,"directive")));const{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Ie("true",!1,i);n.push(Te(e.modifiers.map((e=>Ne(e,t))),i))}return ge(n,e.loc)}function Is(e){return"component"===e||"Component"===e}const ys=(e,t)=>{if(Dt(e)){const{children:n,loc:s}=e,{slotName:i,slotProps:o}=Os(e,t),r=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let c=2;o&&(r[2]=o,c=3),n.length&&(r[3]=Ae([],n,!1,!1,s),c=4),t.scopeId&&!t.slotted&&(c=5),r.splice(c),e.codegenNode=be(t.helper(G),r,s)}};function Os(e,t){let n,s='"default"';const i=[];for(let o=0;o<e.props.length;o++){const t=e.props[o];6===t.type?t.value&&("name"===t.name?s=JSON.stringify(t.value.content):(t.name=f(t.name),i.push(t))):"bind"===t.name&&xt(t.arg,"name")?t.exp&&(s=t.exp):("bind"===t.name&&t.arg&&ft(t.arg)&&(t.arg.content=f(t.arg.content)),i.push(t))}if(i.length>0){const{props:s,directives:o}=Ss(e,t,i,!1,!1);n=s,o.length&&t.onError(Ze(36,o[0].loc))}return{slotName:s,slotProps:n}}const bs=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,As=(e,t,n,s)=>{const{loc:i,modifiers:o,arg:r}=e;let c;if(4===r.type)if(r.isStatic){let e=r.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);c=Ie(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?_(f(e)):`on:${e}`,!0,r.loc)}else c=Oe([`${n.helperString(te)}(`,r,")"]);else c=r,c.children.unshift(`${n.helperString(te)}(`),c.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let l=n.cacheHandlers&&!a&&!n.inVOnce;if(a){const e=yt(a.content),t=!(e||bs.test(a.content)),n=a.content.includes(";");(t||l&&e)&&(a=Oe([`${t?"$event":"(...args)"} => ${n?"{":"("}`,a,n?"}":")"]))}let h={props:[Ne(c,a||Ie("() => {}",!1,i))]};return s&&(h=s(h)),l&&(h.props[0].value=n.cache(h.props[0].value)),h.props.forEach((e=>e.key.isHandlerKey=!0)),h},vs=(e,t,n)=>{const{modifiers:s,loc:i}=e,o=e.arg;let{exp:r}=e;if(!r&&4===o.type){const t=f(o.content);r=e.exp=Ie(t,!1,o.loc)}return 4!==o.type?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=`${o.content} || ""`),s.includes("camel")&&(4===o.type?o.content=o.isStatic?f(o.content):`${n.helperString(Z)}(${o.content})`:(o.children.unshift(`${n.helperString(Z)}(`),o.children.push(")"))),n.inSSR||(s.includes("prop")&&Cs(o,"."),s.includes("attr")&&Cs(o,"^")),!r||4===r.type&&!r.content.trim()?{props:[Ne(o,Ie("",!0,i))]}:{props:[Ne(o,r)]}},Cs=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},xs=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let s,i=!1;for(let e=0;e<n.length;e++){const t=n[e];if(Lt(t)){i=!0;for(let i=e+1;i<n.length;i++){const o=n[i];if(!Lt(o)){s=void 0;break}s||(s=n[e]=Oe([t],t.loc)),s.children.push(" + ",o),n.splice(i,1),i--}}}if(i&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e<n.length;e++){const s=n[e];if(Lt(s)||8===s.type){const i=[];2===s.type&&" "===s.content||i.push(s),t.ssr||0!==Cn(s,t)||i.push("1"),n[e]={type:12,content:s,loc:s.loc,codegenNode:be(t.helper(V),i)}}}}},Rs=new WeakSet,Ls=(e,t)=>{if(1===e.type&&vt(e,"once",!0)){if(Rs.has(e)||t.inVOnce||t.inSSR)return;return Rs.add(e),t.inVOnce=!0,t.helper(ne),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},Ms=(e,t,n)=>{const{exp:s,arg:i}=e;if(!s)return n.onError(Ze(41,e.loc)),Ps();const o=s.loc.source,r=4===s.type?s.content:o,c=n.bindingMetadata[o];if("props"===c||"props-aliased"===c)return Ps();if(!r.trim()||!yt(r))return n.onError(Ze(42,s.loc)),Ps();const a=i||Ie("modelValue",!0),l=i?ft(i)?`onUpdate:${f(i.content)}`:Oe(['"onUpdate:" + ',i]):"onUpdate:modelValue";let h;h=Oe([`${n.isTS?"($event: any)":"$event"} => ((`,s,") = $event)"]);const d=[Ne(a,e.exp),Ne(l,h)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Et(e)?e:JSON.stringify(e))+": true")).join(", "),n=i?ft(i)?`${i.content}Modifiers`:Oe([i,' + "Modifiers"']):"modelModifiers";d.push(Ne(n,Ie(`{ ${t} }`,!1,e.loc,2)))}return Ps(d)};function Ps(e=[]){return{props:e}}const Ds=/[\w).+\-_$\]]/,ks=(e,t)=>{We("COMPILER_FILTERS",t)&&(5===e.type&&Vs(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&Vs(e.exp,t)})))};function Vs(e,t){if(4===e.type)Xs(e,t);else for(let n=0;n<e.children.length;n++){const s=e.children[n];"object"==typeof s&&(4===s.type?Xs(s,t):8===s.type?Vs(e,t):5===s.type&&Vs(s.content,t))}}function Xs(e,t){const n=e.content;let s,i,o,r,c=!1,a=!1,l=!1,h=!1,d=0,p=0,u=0,f=0,m=[];for(o=0;o<n.length;o++)if(i=s,s=n.charCodeAt(o),c)39===s&&92!==i&&(c=!1);else if(a)34===s&&92!==i&&(a=!1);else if(l)96===s&&92!==i&&(l=!1);else if(h)47===s&&92!==i&&(h=!1);else if(124!==s||124===n.charCodeAt(o+1)||124===n.charCodeAt(o-1)||d||p||u){switch(s){case 34:a=!0;break;case 39:c=!0;break;case 96:l=!0;break;case 40:u++;break;case 41:u--;break;case 91:p++;break;case 93:p--;break;case 123:d++;break;case 125:d--}if(47===s){let e,t=o-1;for(;t>=0&&(e=n.charAt(t)," "===e);t--);e&&Ds.test(e)||(h=!0)}}else void 0===r?(f=o+1,r=n.slice(0,o).trim()):_();function _(){m.push(n.slice(f,o).trim()),f=o+1}if(void 0===r?r=n.slice(0,o).trim():0!==f&&_(),m.length){for(o=0;o<m.length;o++)r=ws(r,m[o],t);e.content=r}}function ws(e,t,n){n.helper(B);const s=t.indexOf("(");if(s<0)return n.filters.add(t),`${Ut(t,"filter")}(${e})`;{const i=t.slice(0,s),o=t.slice(s+1);return n.filters.add(i),`${Ut(i,"filter")}(${e}${")"!==o?","+o:o}`}}const Us=new WeakSet,Fs=(e,t)=>{if(1===e.type){const n=vt(e,"memo");if(!n||Us.has(e))return;return Us.add(e),()=>{const s=e.codegenNode||t.currentNode.codegenNode;s&&13===s.type&&(1!==e.tagType&&Xe(s,t),e.codegenNode=be(t.helper(ae),[n.exp,Ae(void 0,s),"_cache",String(t.cached++)]))}}};function Bs(e){return[[Ls,zn,Fs,ss,ks,ys,_s,as,xs],{on:As,bind:vs,model:Ms}]}function $s(e,t={}){const n=t.onError||Qe,s="module"===t.mode;!0===t.prefixIdentifiers?n(Ze(47)):s&&n(Ze(48));t.cacheHandlers&&n(Ze(49)),t.scopeId&&!s&&n(Ze(50));const i=o({},t,{prefixIdentifiers:!1}),r=c(e)?On(e,i):e,[a,l]=Bs();return kn(r,o({},i,{nodeTransforms:[...a,...t.nodeTransforms||[]],directiveTransforms:o({},l,t.directiveTransforms||{})})),Bn(r,i)}const Hs={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},Gs=()=>({props:[]}),qs=Symbol(""),Js=Symbol(""),js=Symbol(""),Ws=Symbol(""),Ks=Symbol(""),Ys=Symbol(""),Qs=Symbol(""),zs=Symbol(""),Zs=Symbol(""),ei=Symbol("");let ti;de({[qs]:"vModelRadio",[Js]:"vModelCheckbox",[js]:"vModelText",[Ws]:"vModelSelect",[Ks]:"vModelDynamic",[Ys]:"withModifiers",[Qs]:"withKeys",[zs]:"vShow",[Zs]:"Transition",[ei]:"TransitionGroup"});const ni={parseMode:"html",isVoidTag:O,isNativeTag:e=>N(e)||I(e)||y(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return ti||(ti=document.createElement("div")),t?(ti.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,ti.children[0].getAttribute("foo")):(ti.innerHTML=e,ti.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?Zs:"TransitionGroup"===e||"transition-group"===e?ei:void 0,getNamespace(e,t,n){let s=t?t.ns:n;if(t&&2===s)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(s=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(s=0);else t&&1===s&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(s=0));if(0===s){if("svg"===e)return 1;if("math"===e)return 2}return s}},si=e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Ie("style",!0,t.loc),exp:ii(t.value.content,t.loc),modifiers:[],loc:t.loc})}))},ii=(e,t)=>{const n=function(e){const t={};return e.replace(T,"").split(S).forEach((e=>{if(e){const n=e.split(g);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}(e);return Ie(JSON.stringify(n),!1,t,3)};function oi(e,t){return Ze(e,t)}const ri={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},ci={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},ai=e("passive,once,capture"),li=e("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),hi=e("left,right"),di=e("onkeyup,onkeydown,onkeypress",!0),pi=(e,t)=>ft(e)&&"onclick"===e.content.toLowerCase()?Ie(t,!0):4!==e.type?Oe(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,ui=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},fi=[si],mi={cloak:Gs,html:(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(oi(53,i)),t.children.length&&(n.onError(oi(54,i)),t.children.length=0),{props:[Ne(Ie("innerHTML",!0,i),s||Ie("",!0))]}},text:(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(oi(55,i)),t.children.length&&(n.onError(oi(56,i)),t.children.length=0),{props:[Ne(Ie("textContent",!0),s?Cn(s,n)>0?s:be(n.helperString(J),[s],i):Ie("",!0))]}},model:(e,t,n)=>{const s=Ms(e,t,n);if(!s.props.length||1===t.tagType)return s;e.arg&&n.onError(oi(58,e.arg.loc));const{tag:i}=t,o=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||o){let r=js,c=!1;if("input"===i||o){const s=Ct(t,"type");if(s){if(7===s.type)r=Ks;else if(s.value)switch(s.value.content){case"radio":r=qs;break;case"checkbox":r=Js;break;case"file":c=!0,n.onError(oi(59,e.loc))}}else Rt(t)&&(r=Ks)}else"select"===i&&(r=Ws);c||(s.needRuntime=n.helper(r))}else n.onError(oi(57,e.loc));return s.props=s.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),s},on:(e,t,n)=>As(e,t,n,(t=>{const{modifiers:s}=e;if(!s.length)return t;let{key:i,value:o}=t.props[0];const{keyModifiers:r,nonKeyModifiers:c,eventOptionModifiers:a}=((e,t,n,s)=>{const i=[],o=[],r=[];for(let c=0;c<t.length;c++){const s=t[c];"native"===s&&Ke("COMPILER_V_ON_NATIVE",n)||ai(s)?r.push(s):hi(s)?ft(e)?di(e.content)?i.push(s):o.push(s):(i.push(s),o.push(s)):li(s)?o.push(s):i.push(s)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:r}})(i,s,n);if(c.includes("right")&&(i=pi(i,"onContextmenu")),c.includes("middle")&&(i=pi(i,"onMouseup")),c.length&&(o=be(n.helper(Ys),[o,JSON.stringify(c)])),!r.length||ft(i)&&!di(i.content)||(o=be(n.helper(Qs),[o,JSON.stringify(r)])),a.length){const e=a.map(m).join("");i=ft(i)?Ie(`${i.content}${e}`,!0):Oe(["(",i,`) + "${e}"`])}return{props:[Ne(i,o)]}})),show:(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(oi(61,i)),{props:[],needRuntime:n.helper(zs)}}};function _i(e,t={}){return $s(e,o({},ni,t,{nodeTransforms:[ui,...fi,...t.nodeTransforms||[]],directiveTransforms:o({},mi,t.directiveTransforms||{}),transformHoist:null}))}function Ei(e,t={}){return On(e,o({},ni,t))}export{x as BASE_TRANSITION,Hs as BindingTypes,Z as CAMELIZE,ee as CAPITALIZE,L as CREATE_BLOCK,k as CREATE_COMMENT,M as CREATE_ELEMENT_BLOCK,D as CREATE_ELEMENT_VNODE,q as CREATE_SLOTS,X as CREATE_STATIC,V as CREATE_TEXT,P as CREATE_VNODE,qe as CompilerDeprecationTypes,me as ConstantTypes,mi as DOMDirectiveTransforms,ri as DOMErrorCodes,ci as DOMErrorMessages,fi as DOMNodeTransforms,fe as ElementTypes,et as ErrorCodes,b as FRAGMENT,Q as GUARD_REACTIVE_PROPS,le as IS_MEMO_SAME,ce as IS_REF,C as KEEP_ALIVE,j as MERGE_PROPS,W as NORMALIZE_CLASS,Y as NORMALIZE_PROPS,K as NORMALIZE_STYLE,pe as Namespaces,ue as NodeTypes,R as OPEN_BLOCK,ie as POP_SCOPE_ID,se as PUSH_SCOPE_ID,H as RENDER_LIST,G as RENDER_SLOT,w as RESOLVE_COMPONENT,F as RESOLVE_DIRECTIVE,U as RESOLVE_DYNAMIC_COMPONENT,B as RESOLVE_FILTER,ne as SET_BLOCK_TRACKING,v as SUSPENSE,A as TELEPORT,J as TO_DISPLAY_STRING,z as TO_HANDLERS,te as TO_HANDLER_KEY,Zs as TRANSITION,ei as TRANSITION_GROUP,pt as TS_NODE_TYPES,re as UNREF,Js as V_MODEL_CHECKBOX,Ks as V_MODEL_DYNAMIC,qs as V_MODEL_RADIO,Ws as V_MODEL_SELECT,js as V_MODEL_TEXT,Qs as V_ON_WITH_KEYS,Ys as V_ON_WITH_MODIFIERS,zs as V_SHOW,oe as WITH_CTX,$ as WITH_DIRECTIVES,ae as WITH_MEMO,Ot as advancePositionWithClone,bt as advancePositionWithMutation,At as assert,$s as baseCompile,On as baseParse,Ns as buildDirectiveArgs,Ss as buildProps,ds as buildSlots,Ke as checkCompatEnabled,_i as compile,Xe as convertToBlock,ge as createArrayExpression,Me as createAssignmentExpression,xe as createBlockStatement,Ce as createCacheExpression,be as createCallExpression,Ze as createCompilerError,Oe as createCompoundExpression,ve as createConditionalExpression,oi as createDOMCompilerError,rs as createForLoopParams,Ae as createFunctionExpression,Le as createIfStatement,ye as createInterpolation,Te as createObjectExpression,Ne as createObjectProperty,De as createReturnStatement,Ee as createRoot,Pe as createSequenceExpression,Ie as createSimpleExpression,Xn as createStructuralDirectiveTransform,Re as createTemplateLiteral,Dn as createTransformContext,Se as createVNodeCall,tt as errorMessages,at as extractIdentifiers,vt as findDir,Ct as findProp,$t as forAliasRE,Bn as generate,E as generateCodeFrame,Bs as getBaseTransformPreset,Cn as getConstantType,Bt as getMemoedVNodeCall,Ve as getVNodeBlockHelper,ke as getVNodeHelper,Rt as hasDynamicKeyVBind,Ft as hasScopeRef,he as helperNameMap,Xt as injectProp,mt as isCoreComponent,lt as isFunctionType,it as isInDestructureAssignment,ot as isInNewExpression,yt as isMemberExpression,Nt as isMemberExpressionBrowser,It as isMemberExpressionNode,st as isReferencedIdentifier,Et as isSimpleIdentifier,Dt as isSlotOutlet,xt as isStaticArgOf,ft as isStaticExp,ht as isStaticProperty,dt as isStaticPropertyKey,Pt as isTemplateNode,Lt as isText,Mt as isVSlot,_e as locStub,Gs as noopDirectiveTransform,Ei as parse,ni as parserOptions,Yn as processExpression,is as processFor,Zn as processIf,Os as processSlotOutlet,de as registerRuntimeHelpers,Es as resolveComponentType,Qn as stringifyExpression,Ut as toValidAssetId,as as trackSlotScopes,ls as trackVForSlotScopes,kn as transform,vs as transformBind,_s as transformElement,Kn as transformExpression,Ms as transformModel,As as transformOn,si as transformStyle,Vn as traverseNode,ut as unwrapTSNode,ct as walkBlockDeclarations,rt as walkFunctionParams,nt as walkIdentifiers,Ye as warnDeprecation}; diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js index 1bd7df23..f4431c8d 100644 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +++ b/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js @@ -1,483 +1,506 @@ -import { registerRuntimeHelpers, isBuiltInType, createSimpleExpression, createCompilerError, createObjectProperty, getConstantType, createCallExpression, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, transformOn as transformOn$1, createCompoundExpression, isStaticExp, checkCompatEnabled, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core'; +/** +* @vue/compiler-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, getConstantType, createCallExpression, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core'; export * from '@vue/compiler-core'; -import { isVoidTag, isHTMLTag, isSVGTag, makeMap, parseStringStyle, capitalize, extend } from '@vue/shared'; +import { isVoidTag, isHTMLTag, isSVGTag, isMathMLTag, parseStringStyle, capitalize, makeMap, extend } from '@vue/shared'; -const V_MODEL_RADIO = Symbol((process.env.NODE_ENV !== 'production') ? `vModelRadio` : ``); -const V_MODEL_CHECKBOX = Symbol((process.env.NODE_ENV !== 'production') ? `vModelCheckbox` : ``); -const V_MODEL_TEXT = Symbol((process.env.NODE_ENV !== 'production') ? `vModelText` : ``); -const V_MODEL_SELECT = Symbol((process.env.NODE_ENV !== 'production') ? `vModelSelect` : ``); -const V_MODEL_DYNAMIC = Symbol((process.env.NODE_ENV !== 'production') ? `vModelDynamic` : ``); -const V_ON_WITH_MODIFIERS = Symbol((process.env.NODE_ENV !== 'production') ? `vOnModifiersGuard` : ``); -const V_ON_WITH_KEYS = Symbol((process.env.NODE_ENV !== 'production') ? `vOnKeysGuard` : ``); -const V_SHOW = Symbol((process.env.NODE_ENV !== 'production') ? `vShow` : ``); -const TRANSITION = Symbol((process.env.NODE_ENV !== 'production') ? `Transition` : ``); -const TRANSITION_GROUP = Symbol((process.env.NODE_ENV !== 'production') ? `TransitionGroup` : ``); +const V_MODEL_RADIO = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``); +const V_MODEL_CHECKBOX = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelCheckbox` : ``); +const V_MODEL_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``); +const V_MODEL_SELECT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelSelect` : ``); +const V_MODEL_DYNAMIC = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelDynamic` : ``); +const V_ON_WITH_MODIFIERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `vOnModifiersGuard` : ``); +const V_ON_WITH_KEYS = Symbol(!!(process.env.NODE_ENV !== "production") ? `vOnKeysGuard` : ``); +const V_SHOW = Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``); +const TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``); +const TRANSITION_GROUP = Symbol(!!(process.env.NODE_ENV !== "production") ? `TransitionGroup` : ``); registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` }); -/* eslint-disable no-restricted-globals */ let decoder; function decodeHtmlBrowser(raw, asAttr = false) { - if (!decoder) { - decoder = document.createElement('div'); - } - if (asAttr) { - decoder.innerHTML = `<div foo="${raw.replace(/"/g, '"')}">`; - return decoder.children[0].getAttribute('foo'); - } - else { - decoder.innerHTML = raw; - return decoder.textContent; - } + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } } -const isRawTextContainer = /*#__PURE__*/ makeMap('style,iframe,script,noscript', true); const parserOptions = { - isVoidTag, - isNativeTag: tag => isHTMLTag(tag) || isSVGTag(tag), - isPreTag: tag => tag === 'pre', - decodeEntities: decodeHtmlBrowser , - isBuiltInComponent: (tag) => { - if (isBuiltInType(tag, `Transition`)) { - return TRANSITION; - } - else if (isBuiltInType(tag, `TransitionGroup`)) { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent) { - let ns = parent ? parent.ns : 0 /* HTML */; - if (parent && ns === 2 /* MATH_ML */) { - if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ && - a.name === 'encoding' && - a.value != null && - (a.value.content === 'text/html' || - a.value.content === 'application/xhtml+xml'))) { - ns = 0 /* HTML */; - } - } - else if (/^m(?:[ions]|text)$/.test(parent.tag) && - tag !== 'mglyph' && - tag !== 'malignmark') { - ns = 0 /* HTML */; - } - } - else if (parent && ns === 1 /* SVG */) { - if (parent.tag === 'foreignObject' || - parent.tag === 'desc' || - parent.tag === 'title') { - ns = 0 /* HTML */; - } - } - if (ns === 0 /* HTML */) { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (tag === 'math') { - return 2 /* MATH_ML */; - } - } - return ns; - }, - // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments - getTextMode({ tag, ns }) { - if (ns === 0 /* HTML */) { - if (tag === 'textarea' || tag === 'title') { - return 1 /* RCDATA */; - } - if (isRawTextContainer(tag)) { - return 2 /* RAWTEXT */; - } - } - return 0 /* DATA */; + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } }; -// Parse inline CSS strings for static style attributes into an object. -// This is a NodeTransform since it works on the static `style` attribute and -// converts it into a dynamic equivalent: -// style="color: red" -> :style='{ "color": "red" }' -// It is then processed by `transformElement` and included in the generated -// props. -const transformStyle = node => { - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((p, i) => { - if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) { - // replace p with an expression node - node.props[i] = { - type: 7 /* DIRECTIVE */, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } }; const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */); + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); }; function createDOMCompilerError(code, loc) { - return createCompilerError(code, loc, (process.env.NODE_ENV !== 'production') || !true ? DOMErrorMessages : undefined); + return createCompilerError( + code, + loc, + !!(process.env.NODE_ENV !== "production") || false ? DOMErrorMessages : void 0 + ); } +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; const DOMErrorMessages = { - [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`, - [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`, - [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`, - [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`, - [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`, - [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`, - [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`, - [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` }; const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`innerHTML`, true, loc), exp || createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; }; const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`textContent`, true), exp - ? getConstantType(exp, context) > 0 - ? exp - : createCallExpression(context.helperString(TO_DISPLAY_STRING), [exp], loc) - : createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; }; const transformModel = (dir, node, context) => { - const baseResult = transformModel$1(dir, node, context); - // base transform has errors OR component v-model (only need props) - if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) { - return baseResult; - } - if (dir.arg) { - context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc)); - } - function checkDuplicatedValue() { - const value = findProp(node, 'value'); - if (value) { - context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === 'input' || - tag === 'textarea' || - tag === 'select' || - isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === 'input' || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7 /* DIRECTIVE */) { - // :type="foo" - directiveToUse = V_MODEL_DYNAMIC; - } - else if (type.value) { - switch (type.value.content) { - case 'radio': - directiveToUse = V_MODEL_RADIO; - break; - case 'checkbox': - directiveToUse = V_MODEL_CHECKBOX; - break; - case 'file': - isInvalidType = true; - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - // text type - (process.env.NODE_ENV !== 'production') && checkDuplicatedValue(); - break; - } - } - } - else if (hasDynamicKeyVBind(node)) { - // element has bindings with dynamic keys, which can possibly contain - // "type". - directiveToUse = V_MODEL_DYNAMIC; - } - else { - // text type - (process.env.NODE_ENV !== 'production') && checkDuplicatedValue(); - } - } - else if (tag === 'select') { - directiveToUse = V_MODEL_SELECT; - } - else { - // textarea - (process.env.NODE_ENV !== 'production') && checkDuplicatedValue(); - } - // inject runtime directive - // by returning the helper symbol via needRuntime - // the import will replaced a resolveDirective call. - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - // native vmodel doesn't need the `modelValue` props since they are also - // passed to the runtime as `binding.value`. removing it reduces code size. - baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === 'modelValue')); + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; }; -const isEventOptionModifier = /*#__PURE__*/ makeMap(`passive,once,capture`); -const isNonKeyModifier = /*#__PURE__*/ makeMap( -// event propagation management -`stop,prevent,self,` + - // system modifiers + exact - `ctrl,shift,alt,meta,exact,` + - // mouse - `middle`); -// left & right could be mouse or key modifiers based on event type -const maybeKeyModifier = /*#__PURE__*/ makeMap('left,right'); -const isKeyboardEvent = /*#__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`, true); +const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ makeMap( + `onkeyup,onkeydown,onkeypress`, + true +); const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i]; - if (modifier === 'native' && - checkCompatEnabled("COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */, context, loc)) { - eventOptionModifiers.push(modifier); + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + if (modifier === "native" && checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content)) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); } - else if (isEventOptionModifier(modifier)) { - // eventOptionModifiers: modifiers for addEventListener() options, - // e.g. .passive & .capture - eventOptionModifiers.push(modifier); - } - else { - // runtimeModifiers: modifiers that needs runtime guards - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content)) { - keyModifiers.push(modifier); - } - else { - nonKeyModifiers.push(modifier); - } - } - else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } - else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } - else { - keyModifiers.push(modifier); - } - } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); } + } } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; }; const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === 'onclick'; - return isStaticClick - ? createSimpleExpression(event, true) - : key.type !== 4 /* SIMPLE_EXPRESSION */ - ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) - : key; + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; }; const transformOn = (dir, node, context) => { - return transformOn$1(dir, node, context, baseResult => { - const { modifiers } = dir; - if (!modifiers.length) - return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - // normalize click.right and click.middle since they don't actually fire - if (nonKeyModifiers.includes('right')) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes('middle')) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && - // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(''); - key = isStaticExp(key) - ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) - : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) + return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); }; const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc)); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; }; const transformTransition = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - // warn multiple transition children - if (hasMultipleChildren(node)) { - context.onError(createDOMCompilerError(59 /* X_TRANSITION_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - // check if it's s single child w/ v-show - // if yes, inject "persisted: true" to the transition props - const child = node.children[0]; - if (child.type === 1 /* ELEMENT */) { - for (const p of child.props) { - if (p.type === 7 /* DIRECTIVE */ && p.name === 'show') { - node.props.push({ - type: 6 /* ATTRIBUTE */, - name: 'persisted', - value: undefined, - loc: node.loc - }); - } - } - } - }; + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; } + } }; function hasMultipleChildren(node) { - // #1352 filter out potential comment nodes. - const children = (node.children = node.children.filter(c => c.type !== 3 /* COMMENT */ && - !(c.type === 2 /* TEXT */ && !c.content.trim()))); - const child = children[0]; - return (children.length !== 1 || - child.type === 11 /* FOR */ || - (child.type === 9 /* IF */ && child.branches.some(hasMultipleChildren))); + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); } const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - (node.tag === 'script' || node.tag === 'style')) { - context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc)); - context.removeNode(); - } + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + !!(process.env.NODE_ENV !== "production") && context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } }; const DOMNodeTransforms = [ - transformStyle, - ...((process.env.NODE_ENV !== 'production') ? [transformTransition] : []) + transformStyle, + ...!!(process.env.NODE_ENV !== "production") ? [transformTransition] : [] ]; const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel, - on: transformOn, - show: transformShow + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow }; -function compile(template, options = {}) { - return baseCompile(template, extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...(options.nodeTransforms || []) - ], - directiveTransforms: extend({}, DOMDirectiveTransforms, options.directiveTransforms || {}), - transformHoist: null - })); +function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); } function parse(template, options = {}) { - return baseParse(template, extend({}, parserOptions, options)); + return baseParse(template, extend({}, parserOptions, options)); } -export { DOMDirectiveTransforms, DOMNodeTransforms, TRANSITION, TRANSITION_GROUP, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, compile, createDOMCompilerError, parse, parserOptions, transformStyle }; +export { DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, TRANSITION, TRANSITION_GROUP, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, compile, createDOMCompilerError, parse, parserOptions, transformStyle }; diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js index 765c751d..293606f4 100644 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js +++ b/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js @@ -1,273 +1,138 @@ +/** +* @vue/compiler-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ var VueCompilerDOM = (function (exports) { 'use strict'; - /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } - /** - * dev only flag -> name mapping - */ + const EMPTY_OBJ = Object.freeze({}) ; + const NOOP = () => { + }; + const NO = () => false; + const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter + (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); + const extend = Object.assign; + const isArray = Array.isArray; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; + const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" + ); + const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" + ); + const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; + }; + const camelizeRE = /-(\w)/g; + const camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + }); + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + }); + const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` }; - /** - * Dev only - */ const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" }; const range = 2; function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; } + } + break; } - return res.join('\n'); + } + return res.join("\n"); } const listDelimiterRE = /;(?![^(]*\))/g; - const propertyDelimiterRE = /:(.+)/; + const propertyDelimiterRE = /:([^]+)/; + const styleCommentRE = /\/\*[^]*?\*\//g; function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; } - // These tag configs are shared between compiler-dom and runtime-dom, so they - // https://developer.mozilla.org/en-US/docs/Web/HTML/Element - const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; - // https://developer.mozilla.org/en-US/docs/Web/SVG/Element - const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; - const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS); - - const EMPTY_OBJ = Object.freeze({}) - ; - Object.freeze([]) ; - const NOOP = () => { }; - /** - * Always return false. - */ - const NO = () => false; - const onRE = /^on[^a-z]/; - const isOn = (key) => onRE.test(key); - const extend = Object.assign; - const isArray = Array.isArray; - const isString = (val) => typeof val === 'string'; - const isSymbol = (val) => typeof val === 'symbol'; - const isObject = (val) => val !== null && typeof val === 'object'; - const isReservedProp = /*#__PURE__*/ makeMap( - // the leading comma is intentional so empty string "" is also included - ',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); - const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); - const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); - }; - const camelizeRE = /-(\w)/g; - /** - * @private - */ - const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); - }); - const hyphenateRE = /\B([A-Z])/g; - /** - * @private - */ - const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); - /** - * @private - */ - const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); - /** - * @private - */ - const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); - - function defaultOnError(error) { - throw error; - } - function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); - } - function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) - ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; - } - const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '<!--' in comment.", - [17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */]: 'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).', - [18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */]: 'Unquoted attribute value cannot contain U+0022 ("), U+0027 (\'), U+003C (<), U+003D (=), and U+0060 (`).', - [19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */]: "Attribute name cannot start with '='.", - [21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */]: "'<?' is allowed only in XML context.", - [20 /* UNEXPECTED_NULL_CHARACTER */]: `Unexpected null character.`, - [22 /* UNEXPECTED_SOLIDUS_IN_TAG */]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23 /* X_INVALID_END_TAG */]: 'Invalid end tag.', - [24 /* X_MISSING_END_TAG */]: 'Element is missing end tag.', - [25 /* X_MISSING_INTERPOLATION_END */]: 'Interpolation end sign was not found.', - [27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */]: 'End bracket for dynamic directive argument was not found. ' + - 'Note that dynamic directive argument cannot contain spaces.', - [26 /* X_MISSING_DIRECTIVE_NAME */]: 'Legal directive name was expected.', - // transform errors - [28 /* X_V_IF_NO_EXPRESSION */]: `v-if/v-else-if is missing expression.`, - [29 /* X_V_IF_SAME_KEY */]: `v-if/else branches must use unique keys.`, - [30 /* X_V_ELSE_NO_ADJACENT_IF */]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31 /* X_V_FOR_NO_EXPRESSION */]: `v-for is missing expression.`, - [32 /* X_V_FOR_MALFORMED_EXPRESSION */]: `v-for has invalid expression.`, - [33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */]: `<template v-for> key should be placed on the <template> tag.`, - [34 /* X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`, - [35 /* X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`, - [36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`, - [37 /* X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` + - `When there are multiple named slots, all slots should use <template> ` + - `syntax to avoid scope ambiguity.`, - [38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `, - [39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */]: `Extraneous children found when component already has explicitly named ` + - `default slot. These children will be ignored.`, - [40 /* X_V_SLOT_MISPLACED */]: `v-slot can only be used on components or <template> tags.`, - [41 /* X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`, - [42 /* X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`, - [43 /* X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44 /* X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `, - [45 /* X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`, - // generic errors - [46 /* X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`, - [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [50 /* __EXTEND_POINT__ */]: `` - }; + const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; + const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; + const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); const FRAGMENT = Symbol(`Fragment` ); const TELEPORT = Symbol(`Teleport` ); @@ -283,7 +148,9 @@ var VueCompilerDOM = (function (exports) { const CREATE_TEXT = Symbol(`createTextVNode` ); const CREATE_STATIC = Symbol(`createStaticVNode` ); const RESOLVE_COMPONENT = Symbol(`resolveComponent` ); - const RESOLVE_DYNAMIC_COMPONENT = Symbol(`resolveDynamicComponent` ); + const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` + ); const RESOLVE_DIRECTIVE = Symbol(`resolveDirective` ); const RESOLVE_FILTER = Symbol(`resolveFilter` ); const WITH_DIRECTIVES = Symbol(`withDirectives` ); @@ -308,4709 +175,5610 @@ var VueCompilerDOM = (function (exports) { const IS_REF = Symbol(`isRef` ); const WITH_MEMO = Symbol(`withMemo` ); const IS_MEMO_SAME = Symbol(`isMemoSame` ); - // Name mapping for runtime helpers that need to be imported from 'vue' in - // generated code. Make sure these are correctly exported in the runtime! - // Using `any` here because TS doesn't allow symbols as index type. const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` }; function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach(s => { - helperNameMap[s] = helpers[s]; - }); + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); } - // AST Utilities --------------------------------------------------------------- - // Some expressions, e.g. sequence and conditional expressions, are never - // associated with template nodes, so their source locations are just a stub. - // Container types like CompoundExpression also don't need a real location. - const locStub = { - source: '', - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 } + const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" }; - function createRoot(children, loc = locStub) { - return { - type: 0 /* ROOT */, - children, - helpers: [], - components: [], - directives: [], - hoists: [], - imports: [], - cached: 0, - temps: 0, - codegenNode: undefined, - loc - }; + const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" + }; + const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" + }; + const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_HOIST": 2, + "2": "CAN_HOIST", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" + }; + const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" + }; + function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: 0, + temps: 0, + codegenNode: void 0, + loc: locStub + }; } function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } - else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); } - return { - type: 13 /* VNODE_CALL */, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; } function createArrayExpression(elements, loc = locStub) { - return { - type: 17 /* JS_ARRAY_EXPRESSION */, - loc, - elements - }; + return { + type: 17, + loc, + elements + }; } function createObjectExpression(properties, loc = locStub) { - return { - type: 15 /* JS_OBJECT_EXPRESSION */, - loc, - properties - }; + return { + type: 15, + loc, + properties + }; } function createObjectProperty(key, value) { - return { - type: 16 /* JS_PROPERTY */, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; } - function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0 /* NOT_CONSTANT */) { - return { - type: 4 /* SIMPLE_EXPRESSION */, - loc, - content, - isStatic, - constType: isStatic ? 3 /* CAN_STRINGIFY */ : constType - }; + function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; } function createInterpolation(content, loc) { - return { - type: 5 /* INTERPOLATION */, - loc, - content: isString(content) - ? createSimpleExpression(content, false, loc) - : content - }; + return { + type: 5, + loc, + content: isString(content) ? createSimpleExpression(content, false, loc) : content + }; } function createCompoundExpression(children, loc = locStub) { - return { - type: 8 /* COMPOUND_EXPRESSION */, - loc, - children - }; + return { + type: 8, + loc, + children + }; } function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee, - arguments: args - }; + return { + type: 14, + loc, + callee, + arguments: args + }; } - function createFunctionExpression(params, returns = undefined, newline = false, isSlot = false, loc = locStub) { - return { - type: 18 /* JS_FUNCTION_EXPRESSION */, - params, - returns, - newline, - isSlot, - loc - }; + function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; } function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19 /* JS_CONDITIONAL_EXPRESSION */, - test, - consequent, - alternate, - newline, - loc: locStub - }; + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; } function createCacheExpression(index, value, isVNode = false) { - return { - type: 20 /* JS_CACHE_EXPRESSION */, - index, - value, - isVNode, - loc: locStub - }; + return { + type: 20, + index, + value, + isVNode, + loc: locStub + }; } function createBlockStatement(body) { - return { - type: 21 /* JS_BLOCK_STATEMENT */, - body, - loc: locStub - }; + return { + type: 21, + body, + loc: locStub + }; } function createTemplateLiteral(elements) { - return { - type: 22 /* JS_TEMPLATE_LITERAL */, - elements, - loc: locStub - }; + return { + type: 22, + elements, + loc: locStub + }; } function createIfStatement(test, consequent, alternate) { - return { - type: 23 /* JS_IF_STATEMENT */, - test, - consequent, - alternate, - loc: locStub - }; + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; } function createAssignmentExpression(left, right) { - return { - type: 24 /* JS_ASSIGNMENT_EXPRESSION */, - left, - right, - loc: locStub - }; + return { + type: 24, + left, + right, + loc: locStub + }; } function createSequenceExpression(expressions) { - return { - type: 25 /* JS_SEQUENCE_EXPRESSION */, - expressions, - loc: locStub - }; + return { + type: 25, + expressions, + loc: locStub + }; } function createReturnStatement(returns) { - return { - type: 26 /* JS_RETURN_STATEMENT */, - returns, - loc: locStub - }; + return { + type: 26, + returns, + loc: locStub + }; + } + function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; + } + function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; + } + function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } } - const isStaticExp = (p) => p.type === 4 /* SIMPLE_EXPRESSION */ && p.isStatic; - const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected); + const defaultDelimitersOpen = new Uint8Array([123, 123]); + const defaultDelimitersClose = new Uint8Array([125, 125]); + function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; + } + function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; + } + function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); + } + function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; + } + const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea + }; + class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + const lower = c | 32; + if (lower === 116) { + this.state = 30; + } else { + this.state = lower === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + const lower = c | 32; + if (lower === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (lower === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + const lower = c | 32; + if (lower === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (lower === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } + } + + const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" + }; + const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } + }; + function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } + } + function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; + } + function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; + } + function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) + err.loc = loc; + context.onWarn(err); + } + + function defaultOnError(error) { + throw error; + } + function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); + } + function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; + } + const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "__EXTEND_POINT__": 52, + "52": "__EXTEND_POINT__" + }; + const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [52]: `` + }; + + function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + { + return; + } + } + function isReferencedIdentifier(id, parent, parentStack) { + { + return false; + } + } + function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; + } + function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; + } + function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers(p)) { + onIdent(id); + } + } + } + function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) + continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) + continue; + onIdent(stmt.id); + } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration") { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers(decl.id)) { + onIdent(id); + } + } + } + } + } + } + function extractIdentifiers(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers(prop.argument, nodes); + } else { + extractIdentifiers(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) + extractIdentifiers(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers(param.left, nodes); + break; + } + return nodes; + } + const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); + }; + const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; + const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; + const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T + ]; + function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } + } + + const isStaticExp = (p) => p.type === 4 && p.isStatic; function isCoreComponent(tag) { - if (isBuiltInType(tag, 'Teleport')) { - return TELEPORT; - } - else if (isBuiltInType(tag, 'Suspense')) { - return SUSPENSE; - } - else if (isBuiltInType(tag, 'KeepAlive')) { - return KEEP_ALIVE; - } - else if (isBuiltInType(tag, 'BaseTransition')) { - return BASE_TRANSITION; - } + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } } const nonIdentifierRE = /^\d|[^\$\w]/; const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; - /** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ const isMemberExpressionBrowser = (path) => { - // remove whitespaces around . or [ first - path = path.trim().replace(whitespaceRE, s => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === '[') { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } - else if (char === '(') { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } - else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `[`) { - currentOpenBracketCount++; - } - else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `(`) { - currentOpenParensCount++; - } - else if (char === `)`) { - // if the exp ends as a call then it should not be considered valid - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; + path = path.trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; } - return !currentOpenBracketCount && !currentOpenParensCount; + } + return !currentOpenBracketCount && !currentOpenParensCount; }; - const isMemberExpressionNode = NOOP - ; - const isMemberExpression = isMemberExpressionBrowser - ; - function getInnerRange(loc, offset, length) { - const source = loc.source.slice(offset, offset + length); - const newLoc = { - source, - start: advancePositionWithClone(loc.start, loc.source, offset), - end: loc.end - }; - if (length != null) { - newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length); - } - return newLoc; - } + const isMemberExpressionNode = NOOP ; + const isMemberExpression = isMemberExpressionBrowser ; function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation(extend({}, pos), source, numberOfCharacters); + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); } - // advance by mutation without cloning (for performance reasons), since this - // gets called a lot in the parser function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10 /* newline char code */) { - linesCount++; - lastNewLinePos = i; - } + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = - lastNewLinePos === -1 - ? pos.column + numberOfCharacters - : numberOfCharacters - lastNewLinePos; - return pos; + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; } function assert(condition, msg) { - /* istanbul ignore if */ - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } } function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (allowEmpty || p.exp) && - (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; } + } } function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (dynamicOnly) - continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } - else if (p.name === 'bind' && - (p.exp || allowEmpty) && - isStaticArgOf(p.arg, name)) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) + continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; } + } } function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); + return !!(arg && isStaticExp(arg) && arg.content === name); } function hasDynamicKeyVBind(node) { - return node.props.some(p => p.type === 7 /* DIRECTIVE */ && - p.name === 'bind' && - (!p.arg || // v-bind="obj" - p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo] - !p.arg.isStatic) // v-bind:[foo] - ); + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); } - function isText(node) { - return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */; + function isText$1(node) { + return node.type === 5 || node.type === 2; } function isVSlot(p) { - return p.type === 7 /* DIRECTIVE */ && p.name === 'slot'; + return p.type === 7 && p.name === "slot"; } function isTemplateNode(node) { - return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */); + return node.type === 1 && node.tagType === 3; } function isSlotOutlet(node) { - return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */; + return node.type === 1 && node.tagType === 2; } - function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; - } - function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; - } - const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); + const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); function getUnnormalizedProps(props, callPath = []) { - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps(props.arguments[0], callPath.concat(props)); - } + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); } - return [props, callPath]; + } + return [props, callPath]; } function injectProp(node, prop, context) { - let propsWithInjection; - /** - * 1. mergeProps(...) - * 2. toHandlers(...) - * 3. normalizeProps(...) - * 4. normalizeProps(guardReactiveProps(...)) - * - * we need to get the real props before normalization - */ - let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } - else if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // merged props... add ours - // only inject key to object literal if it's the first argument so that - // if doesn't override user provided keys - const first = props.arguments[0]; - if (!isString(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) { - first.properties.unshift(prop); - } - else { - if (props.callee === TO_HANDLERS) { - // #2366 - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } - else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } - else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) { - let alreadyExists = false; - // check existing key to avoid overriding user provided keys - if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) { - const propKeyName = prop.key.content; - alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === propKeyName); - } - if (!alreadyExists) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } - else { - // single v-bind with expression, return a merged replacement + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props + createObjectExpression([prop]), + props ]); - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`, - // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`, - // the `guardReactiveProps` will no longer be needed - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } + } else { + props.arguments.unshift(createObjectExpression([prop])); + } } - if (node.type === 13 /* VNODE_CALL */) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.props = propsWithInjection; - } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); } - else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.arguments[2] = propsWithInjection; - } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } + } + function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; } function toValidAssetId(name, type) { - // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString(); - })}`; + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; } - // Check if a node contains expressions that reference current context scope ids function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1 /* ELEMENT */: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some(c => hasScopeRef(c, ids)); - case 11 /* FOR */: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 9 /* IF */: - return node.branches.some(b => hasScopeRef(b, ids)); - case 10 /* IF_BRANCH */: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 4 /* SIMPLE_EXPRESSION */: - return (!node.isStatic && - isSimpleIdentifier(node.content) && - !!ids[node.content]); - case 8 /* COMPOUND_EXPRESSION */: - return node.children.some(c => isObject(c) && hasScopeRef(c, ids)); - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return hasScopeRef(node.content, ids); - case 2 /* TEXT */: - case 3 /* COMMENT */: - return false; - default: - return false; - } + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => isObject(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + return false; + default: + return false; + } } function getMemoedVNodeCall(node) { - if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } - else { - return node; - } - } - function makeBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } } + const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; - const deprecationData = { - ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: { - message: `Platform-native elements with "is" prop will no longer be ` + - `treated as components in Vue 3 unless the "is" value is explicitly ` + - `prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: { - message: key => `.sync modifier for v-bind has been removed. Use v-model with ` + - `argument instead. \`v-bind:${key}.sync\` should be changed to ` + - `\`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: { - message: `.prop modifier for v-bind has been removed and no longer necessary. ` + - `Vue 3 will automatically set a binding as DOM property when appropriate.` - }, - ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` + - `object spread: it will now overwrite an existing non-mergeable attribute ` + - `that appears before v-bind in the case of conflict. ` + - `To retain 2.x behavior, move v-bind to make it the first attribute. ` + - `You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: { - message: `v-if / v-for precedence when used on the same element has changed ` + - `in Vue 3: v-if now takes higher precedence and will no longer have ` + - `access to v-for scope variables. It is best to avoid the ambiguity ` + - `with <template> tags or use a computed property that filters v-for ` + - `data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: { - message: `<template> with no special directives will render as a native template ` + - `element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTER" /* COMPILER_FILTERS */]: { - message: `filters have been removed in Vue 3. ` + - `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` + - `Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } - }; - function getCompatValue(key, context) { - const config = context.options - ? context.options.compatConfig - : context.compatConfig; - const value = config && config[key]; - if (key === 'MODE') { - return value || 3; // compiler defaults to v3 behavior - } - else { - return value; - } - } - function isCompatEnabled(key, context) { - const mode = getCompatValue('MODE', context); - const value = getCompatValue(key, context); - // in v3 mode, only enable if explicitly set to true - // otherwise enable for any non-false value - return mode === 3 ? value === true : value !== false; - } - function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; - } - function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === 'suppress-warning') { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) - err.loc = loc; - context.onWarn(err); - } - - // The default decoder only provides escapes for characters reserved as part of - // the template syntax, and is only used if the custom renderer did not provide - // a platform-specific decoder. - const decodeRE = /&(gt|lt|amp|apos|quot);/g; - const decodeMap = { - gt: '>', - lt: '<', - amp: '&', - apos: "'", - quot: '"' - }; const defaultParserOptions = { - delimiters: [`{{`, `}}`], - getNamespace: () => 0 /* HTML */, - getTextMode: () => 0 /* DATA */, - isVoidTag: NO, - isPreTag: NO, - isCustomElement: NO, - decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]), - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false }; - function baseParse(content, options = {}) { - const context = createParserContext(content, options); - const start = getCursor(context); - return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start)); - } - function createParserContext(content, rawOptions) { - const options = extend({}, defaultParserOptions); - let key; - for (key in rawOptions) { - // @ts-ignore - options[key] = - rawOptions[key] === undefined - ? defaultParserOptions[key] - : rawOptions[key]; + let currentOptions = defaultParserOptions; + let currentRoot = null; + let currentInput = ""; + let currentOpenTag = null; + let currentProp = null; + let currentAttrValue = ""; + let currentAttrStartIndex = -1; + let currentAttrEndIndex = -1; + let inPre = 0; + let inVPre = false; + let currentVPreBoundary = null; + const stack = []; + const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); } - return { - options, - column: 1, - line: 1, - offset: 0, - originalSource: content, - source: content, - inPre: false, - inVPre: false, - onWarn: options.onWarn + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 }; - } - function parseChildren(context, mode, ancestors) { - const parent = last(ancestors); - const ns = parent ? parent.ns : 0 /* HTML */; - const nodes = []; - while (!isEnd(context, mode, ancestors)) { - const s = context.source; - let node = undefined; - if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) { - if (!context.inVPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode); - } - else if (mode === 0 /* DATA */ && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1); - } - else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '<!--')) { - node = parseComment(context); - } - else if (startsWith(s, '<!DOCTYPE')) { - // Ignore DOCTYPE by a limitation. - node = parseBogusComment(context); - } - else if (startsWith(s, '<![CDATA[')) { - if (ns !== 0 /* HTML */) { - node = parseCDATA(context, ancestors); - } - else { - emitError(context, 1 /* CDATA_IN_HTML_CONTENT */); - node = parseBogusComment(context); - } - } - else { - emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */); - node = parseBogusComment(context); - } - } - else if (s[1] === '/') { - // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state - if (s.length === 2) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2); - } - else if (s[2] === '>') { - emitError(context, 14 /* MISSING_END_TAG_NAME */, 2); - advanceBy(context, 3); - continue; - } - else if (/[a-z]/i.test(s[2])) { - emitError(context, 23 /* X_INVALID_END_TAG */); - parseTag(context, 1 /* End */, parent); - continue; - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2); - node = parseBogusComment(context); - } - } - else if (/[a-z]/i.test(s[1])) { - node = parseElement(context, ancestors); - // 2.x <template> with no directive compat - if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context) && - node && - node.tag === 'template' && - !node.props.some(p => p.type === 7 /* DIRECTIVE */ && - isSpecialTemplateDirective(p.name))) { - warnDeprecation("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context, node.loc); - node = node.children; - } - } - else if (s[1] === '?') { - emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1); - node = parseBogusComment(context); - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1); - } - } - } - if (!node) { - node = parseText(context, mode); - } - if (isArray(node)) { - for (let i = 0; i < node.length; i++) { - pushNode(nodes, node[i]); - } - } - else { - pushNode(nodes, node); + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } } - // Whitespace handling strategy like v2 - let removedWhitespace = false; - if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) { - const shouldCondense = context.options.whitespace !== 'preserve'; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!context.inPre && node.type === 2 /* TEXT */) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1]; - const next = nodes[i + 1]; - // Remove if: - // - the whitespace is the first or last node, or: - // - (condense mode) the whitespace is adjacent to a comment, or: - // - (condense mode) the whitespace is between two elements AND contains newline - if (!prev || - !next || - (shouldCondense && - (prev.type === 3 /* COMMENT */ || - next.type === 3 /* COMMENT */ || - (prev.type === 1 /* ELEMENT */ && - next.type === 1 /* ELEMENT */ && - /[\r\n]/.test(node.content))))) { - removedWhitespace = true; - nodes[i] = null; - } - else { - // Otherwise, the whitespace is condensed into a single space - node.content = ' '; - } - } - else if (shouldCondense) { - // in condense mode, consecutive whitespaces in text are condensed - // down to a single space. - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' '); - } - } - // Remove comment nodes if desired by configuration. - else if (node.type === 3 /* COMMENT */ && !context.options.comments) { - removedWhitespace = true; - nodes[i] = null; - } - } - if (context.inPre && parent && context.options.isPreTag(parent.tag)) { - // remove leading newline per html spec - // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element - const first = nodes[0]; - if (first && first.type === 2 /* TEXT */) { - first.content = first.content.replace(/^\r?\n/, ''); - } - } + }, + onselfclosingtag(end) { + var _a; + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (((_a = stack[0]) == null ? void 0 : _a.tag) === name) { + onCloseTag(stack.shift(), end); } - return removedWhitespace ? nodes.filter(Boolean) : nodes; - } - function pushNode(nodes, node) { - if (node.type === 2 /* TEXT */) { - const prev = last(nodes); - // Merge if both this and the previous node are text and those are - // consecutive. This happens for cases like "a < b". - if (prev && - prev.type === 2 /* TEXT */ && - prev.loc.end.offset === node.loc.start.offset) { - prev.content += node.content; - prev.loc.end = node.loc.end; - prev.loc.source += node.loc.source; - return; - } - } - nodes.push(node); - } - function parseCDATA(context, ancestors) { - advanceBy(context, 9); - const nodes = parseChildren(context, 3 /* CDATA */, ancestors); - if (context.source.length === 0) { - emitError(context, 6 /* EOF_IN_CDATA */); - } - else { - advanceBy(context, 3); - } - return nodes; - } - function parseComment(context) { - const start = getCursor(context); - let content; - // Regular comment. - const match = /--(\!)?>/.exec(context.source); - if (!match) { - content = context.source.slice(4); - advanceBy(context, context.source.length); - emitError(context, 7 /* EOF_IN_COMMENT */); - } - else { - if (match.index <= 3) { - emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */); - } - if (match[1]) { - emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */); - } - content = context.source.slice(4, match.index); - // Advancing with reporting nested comments. - const s = context.source.slice(0, match.index); - let prevIndex = 1, nestedIndex = 0; - while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) { - advanceBy(context, nestedIndex - prevIndex + 1); - if (nestedIndex + 4 < s.length) { - emitError(context, 16 /* NESTED_COMMENT */); - } - prevIndex = nestedIndex + 1; - } - advanceBy(context, match.index + match[0].length - prevIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) }; - } - function parseBogusComment(context) { - const start = getCursor(context); - const contentStart = context.source[1] === '?' ? 1 : 2; - let content; - const closeIndex = context.source.indexOf('>'); - if (closeIndex === -1) { - content = context.source.slice(contentStart); - advanceBy(context, context.source.length); + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); } - else { - content = context.source.slice(contentStart, closeIndex); - advanceBy(context, closeIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) - }; - } - function parseElement(context, ancestors) { - // Start tag. - const wasInPre = context.inPre; - const wasInVPre = context.inVPre; - const parent = last(ancestors); - const element = parseTag(context, 0 /* Start */, parent); - const isPreBoundary = context.inPre && !wasInPre; - const isVPreBoundary = context.inVPre && !wasInVPre; - if (element.isSelfClosing || context.options.isVoidTag(element.tag)) { - // #4030 self-closing <pre> tag - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - // Children. - ancestors.push(element); - const mode = context.options.getTextMode(element, parent); - const children = parseChildren(context, mode, ancestors); - ancestors.pop(); - // 2.x inline-template compat - { - const inlineTemplateProp = element.props.find(p => p.type === 6 /* ATTRIBUTE */ && p.name === 'inline-template'); - if (inlineTemplateProp && - checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) { - const loc = getSelection(context, element.loc.end); - inlineTemplateProp.value = { - type: 2 /* TEXT */, - content: loc.source, - loc - }; - } - } - element.children = children; - // End tag. - if (startsWithEndTagOpen(context.source, element.tag)) { - parseTag(context, 1 /* End */, parent); - } - else { - emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start); - if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { - const first = children[0]; - if (first && startsWith(first.loc.source, '<!--')) { - emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */); - } - } - } - element.loc = getSelection(context, element.loc.start); - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - const isSpecialTemplateDirective = /*#__PURE__*/ makeMap(`if,else,else-if,for,slot`); - function parseTag(context, type, parent) { - // Tag open. - const start = getCursor(context); - const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source); - const tag = match[1]; - const ns = context.options.getNamespace(tag, parent); - advanceBy(context, match[0].length); - advanceSpaces(context); - // save current state in case we need to re-parse attributes with v-pre - const cursor = getCursor(context); - const currentSource = context.source; - // check <pre> tag - if (context.options.isPreTag(tag)) { - context.inPre = true; - } - // Attributes. - let props = parseAttributes(context, type); - // check v-pre - if (type === 0 /* Start */ && - !context.inVPre && - props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) { - context.inVPre = true; - // reset context - extend(context, cursor); - context.source = currentSource; - // re-parse attrs and filter out v-pre itself - props = parseAttributes(context, type).filter(p => p.name !== 'v-pre'); - } - // Tag close. - let isSelfClosing = false; - if (context.source.length === 0) { - emitError(context, 9 /* EOF_IN_TAG */); - } - else { - isSelfClosing = startsWith(context.source, '/>'); - if (type === 1 /* End */ && isSelfClosing) { - emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */); - } - advanceBy(context, isSelfClosing ? 2 : 1); - } - if (type === 1 /* End */) { - return; - } - // 2.x deprecation checks - if (isCompatEnabled("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context)) { - let hasIf = false; - let hasFor = false; - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 7 /* DIRECTIVE */) { - if (p.name === 'if') { - hasIf = true; - } - else if (p.name === 'for') { - hasFor = true; - } - } - if (hasIf && hasFor) { - warnDeprecation("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start)); - break; - } - } - } - let tagType = 0 /* ELEMENT */; - if (!context.inVPre) { - if (tag === 'slot') { - tagType = 2 /* SLOT */; - } - else if (tag === 'template') { - if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) { - tagType = 3 /* TEMPLATE */; - } - } - else if (isComponent(tag, props, context)) { - tagType = 1 /* COMPONENT */; - } - } - return { - type: 1 /* ELEMENT */, - ns, - tag, - tagType, - props, - isSelfClosing, - children: [], - loc: getSelection(context, start), - codegenNode: undefined // to be created during transform phase - }; - } - function isComponent(tag, props, context) { - const options = context.options; - if (options.isCustomElement(tag)) { - return false; - } - if (tag === 'component' || - /^[A-Z]/.test(tag) || - isCoreComponent(tag) || - (options.isBuiltInComponent && options.isBuiltInComponent(tag)) || - (options.isNativeTag && !options.isNativeTag(tag))) { - return true; - } - // at this point the tag should be a native tag, but check for potential "is" - // casting - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.name === 'is' && p.value) { - if (p.value.content.startsWith('vue:')) { - return true; - } - else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } - else { - // directive - // v-is (TODO Deprecate) - if (p.name === 'is') { - return true; - } - else if ( - // :is on plain element - only treat as component in compat mode - p.name === 'bind' && - isStaticArgOf(p.arg, 'is') && - true && - checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } - } - function parseAttributes(context, type) { - const props = []; - const attributeNames = new Set(); - while (context.source.length > 0 && - !startsWith(context.source, '>') && - !startsWith(context.source, '/>')) { - if (startsWith(context.source, '/')) { - emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */); - advanceBy(context, 1); - advanceSpaces(context); - continue; - } - if (type === 1 /* End */) { - emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */); - } - const attr = parseAttribute(context, attributeNames); - // Trim whitespace between class - // https://github.com/vuejs/core/issues/4251 - if (attr.type === 6 /* ATTRIBUTE */ && - attr.value && - attr.name === 'class') { - attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim(); - } - if (type === 0 /* Start */) { - props.push(attr); - } - if (/^[^\t\r\n\f />]/.test(context.source)) { - emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */); - } - advanceSpaces(context); - } - return props; - } - function parseAttribute(context, nameSet) { - // Name. - const start = getCursor(context); - const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source); - const name = match[0]; - if (nameSet.has(name)) { - emitError(context, 2 /* DUPLICATE_ATTRIBUTE */); - } - nameSet.add(name); - if (name[0] === '=') { - emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */); - } - { - const pattern = /["'<]/g; - let m; - while ((m = pattern.exec(name))) { - emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index); - } - } - advanceBy(context, name.length); - // Value - let value = undefined; - if (/^[\t\r\n\f ]*=/.test(context.source)) { - advanceSpaces(context); - advanceBy(context, 1); - advanceSpaces(context); - value = parseAttributeValue(context); - if (!value) { - emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */); - } - } - const loc = getSelection(context, start); - if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) { - const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name); - let isPropShorthand = startsWith(name, '.'); - let dirName = match[1] || - (isPropShorthand || startsWith(name, ':') - ? 'bind' - : startsWith(name, '@') - ? 'on' - : 'slot'); - let arg; - if (match[2]) { - const isSlot = dirName === 'slot'; - const startOffset = name.lastIndexOf(match[2]); - const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length)); - let content = match[2]; - let isStatic = true; - if (content.startsWith('[')) { - isStatic = false; - if (!content.endsWith(']')) { - emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */); - content = content.slice(1); - } - else { - content = content.slice(1, content.length - 1); - } - } - else if (isSlot) { - // #1241 special case for v-slot: vuetify relies extensively on slot - // names containing dots. v-slot doesn't have any modifiers and Vue 2.x - // supports such usage so we are keeping it consistent with 2.x. - content += match[3] || ''; - } - arg = { - type: 4 /* SIMPLE_EXPRESSION */, - content, - isStatic, - constType: isStatic - ? 3 /* CAN_STRINGIFY */ - : 0 /* NOT_CONSTANT */, - loc - }; - } - if (value && value.isQuoted) { - const valueLoc = value.loc; - valueLoc.start.offset++; - valueLoc.start.column++; - valueLoc.end = advancePositionWithClone(valueLoc.start, value.content); - valueLoc.source = valueLoc.source.slice(1, -1); - } - const modifiers = match[3] ? match[3].slice(1).split('.') : []; - if (isPropShorthand) - modifiers.push('prop'); - // 2.x compat v-bind:foo.sync -> v-model:foo - if (dirName === 'bind' && arg) { - if (modifiers.includes('sync') && - checkCompatEnabled("COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) { - dirName = 'model'; - modifiers.splice(modifiers.indexOf('sync'), 1); - } - if (modifiers.includes('prop')) { - checkCompatEnabled("COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */, context, loc); - } - } - return { - type: 7 /* DIRECTIVE */, - name: dirName, - exp: value && { - type: 4 /* SIMPLE_EXPRESSION */, - content: value.content, - isStatic: false, - // Treat as non-constant by default. This can be potentially set to - // other values by `transformExpression` to make it eligible for hoisting. - constType: 0 /* NOT_CONSTANT */, - loc: value.loc - }, - arg, - modifiers, - loc - }; - } - // missing directive name or illegal directive name - if (!context.inVPre && startsWith(name, 'v-')) { - emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */); - } - return { - type: 6 /* ATTRIBUTE */, + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, name, - value: value && { - type: 2 /* TEXT */, - content: value.content, - loc: value.loc - }, - loc + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? ["prop"] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) + return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + currentProp.modifiers.push(mod); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + let syncIndex = -1; + if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.indexOf("sync")) > -1 && checkCompatEnabled( + "COMPILER_V_BIND_SYNC", + currentOptions, + currentProp.loc, + currentProp.rawName + )) { + currentProp.name = "model"; + currentProp.modifiers.splice(syncIndex, 1); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } + }); + const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; + const stripParensRE = /^\(|\)$/g; + function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) + return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; + } + function getSlice(start, end) { + return currentInput.slice(start, end); + } + function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; + } + function onText(content, start, end) { + var _a; + { + const tag = (_a = stack[0]) == null ? void 0 : _a.tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if ((lastNode == null ? void 0 : lastNode.type) === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } + } + function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, end + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(el.children, el.tag); + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + { + const props = el.props; + if (isCompatEnabled( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions + )) { + let hasIf = false; + let hasFor = false; + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 7) { + if (p.name === "if") { + hasIf = true; + } else if (p.name === "for") { + hasFor = true; + } + } + if (hasIf && hasFor) { + warnDeprecation( + "COMPILER_V_IF_V_FOR_PRECEDENCE", + currentOptions, + el.loc + ); + break; + } + } + } + if (!tokenizer.inSFCRoot && isCompatEnabled( + "COMPILER_NATIVE_TEMPLATE", + currentOptions + ) && el.tag === "template" && !isFragmentTemplate(el)) { + warnDeprecation( + "COMPILER_NATIVE_TEMPLATE", + currentOptions, + el.loc + ); + const parent = stack[0] || currentRoot; + const index = parent.children.indexOf(el); + parent.children.splice(index, 1, ...el.children); + } + const inlineTemplateProp = props.find( + (p) => p.type === 6 && p.name === "inline-template" + ); + if (inlineTemplateProp && checkCompatEnabled( + "COMPILER_INLINE_TEMPLATE", + currentOptions, + inlineTemplateProp.loc + ) && el.children.length) { + inlineTemplateProp.value = { + type: 2, + content: getSlice( + el.children[0].loc.start.offset, + el.children[el.children.length - 1].loc.end.offset + ), + loc: inlineTemplateProp.loc + }; + } + } + } + function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) + i--; + return i; + } + const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); + function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; + } + function isComponent({ tag, props }) { + var _a; + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || ((_a = currentOptions.isBuiltInComponent) == null ? void 0 : _a.call(currentOptions, tag)) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } else if (checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + } else if (// :is on plain element - only treat as component in compat mode + p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + currentOptions, + p.loc + )) { + return true; + } + } + return false; + } + function isUpperCase(c) { + return c > 64 && c < 91; + } + const windowsNewlineRE = /\r\n/g; + function condenseWhitespace(nodes, tag) { + var _a, _b; + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = (_a = nodes[i - 1]) == null ? void 0 : _a.type; + const next = (_b = nodes[i + 1]) == null ? void 0 : _b.type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + if (inPre && tag && currentOptions.isPreTag(tag)) { + const first = nodes[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; + } + function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; + } + function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; + } + function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; + } + function addNode(node) { + (stack[0] || currentRoot).children.push(node); + } + function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; + } + function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); + } + function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc }; + } + return attr; } - function parseAttributeValue(context) { - const start = getCursor(context); - let content; - const quote = context.source[0]; - const isQuoted = quote === `"` || quote === `'`; - if (isQuoted) { - // Quoted value. - advanceBy(context, 1); - const endIndex = context.source.indexOf(quote); - if (endIndex === -1) { - content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */); - } - else { - content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */); - advanceBy(context, 1); - } + function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; + } + function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); + } + function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; + } + function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } } - else { - // Unquoted - const match = /^[^\t\r\n\f >]+/.exec(context.source); - if (!match) { - return undefined; - } - const unexpectedChars = /["'<=`]/g; - let m; - while ((m = unexpectedChars.exec(match[0]))) { - emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index); - } - content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */); + } + { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); } - return { content, isQuoted, loc: getSelection(context, start) }; - } - function parseInterpolation(context, mode) { - const [open, close] = context.options.delimiters; - const closeIndex = context.source.indexOf(close, open.length); - if (closeIndex === -1) { - emitError(context, 25 /* X_MISSING_INTERPOLATION_END */); - return undefined; - } - const start = getCursor(context); - advanceBy(context, open.length); - const innerStart = getCursor(context); - const innerEnd = getCursor(context); - const rawContentLength = closeIndex - open.length; - const rawContent = context.source.slice(0, rawContentLength); - const preTrimContent = parseTextData(context, rawContentLength, mode); - const content = preTrimContent.trim(); - const startOffset = preTrimContent.indexOf(content); - if (startOffset > 0) { - advancePositionWithMutation(innerStart, rawContent, startOffset); - } - const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset); - advancePositionWithMutation(innerEnd, rawContent, endOffset); - advanceBy(context, close.length); - return { - type: 5 /* INTERPOLATION */, - content: { - type: 4 /* SIMPLE_EXPRESSION */, - isStatic: false, - // Set `isConstant` to false by default and will decide in transformExpression - constType: 0 /* NOT_CONSTANT */, - content, - loc: getSelection(context, innerStart, innerEnd) - }, - loc: getSelection(context, start) - }; - } - function parseText(context, mode) { - const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]]; - let endIndex = context.source.length; - for (let i = 0; i < endTokens.length; i++) { - const index = context.source.indexOf(endTokens[i], 1); - if (index !== -1 && endIndex > index) { - endIndex = index; - } - } - const start = getCursor(context); - const content = parseTextData(context, endIndex, mode); - return { - type: 2 /* TEXT */, - content, - loc: getSelection(context, start) - }; - } - /** - * Get text data with a given length from the current location. - * This translates HTML entities in the text data. - */ - function parseTextData(context, length, mode) { - const rawText = context.source.slice(0, length); - advanceBy(context, length); - if (mode === 2 /* RAWTEXT */ || - mode === 3 /* CDATA */ || - !rawText.includes('&')) { - return rawText; - } - else { - // DATA or RCDATA containing "&"". Entity decoding required. - return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */); - } - } - function getCursor(context) { - const { column, line, offset } = context; - return { column, line, offset }; - } - function getSelection(context, start, end) { - end = end || getCursor(context); - return { - start, - end, - source: context.originalSource.slice(start.offset, end.offset) - }; - } - function last(xs) { - return xs[xs.length - 1]; - } - function startsWith(source, searchString) { - return source.startsWith(searchString); - } - function advanceBy(context, numberOfCharacters) { - const { source } = context; - advancePositionWithMutation(context, source, numberOfCharacters); - context.source = source.slice(numberOfCharacters); - } - function advanceSpaces(context) { - const match = /^[\t\r\n\f ]+/.exec(context.source); - if (match) { - advanceBy(context, match[0].length); - } - } - function getNewPosition(context, start, numberOfCharacters) { - return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters); - } - function emitError(context, code, offset, loc = getCursor(context)) { - if (offset) { - loc.offset += offset; - loc.column += offset; - } - context.options.onError(createCompilerError(code, { - start: loc, - end: loc, - source: '' - })); - } - function isEnd(context, mode, ancestors) { - const s = context.source; - switch (mode) { - case 0 /* DATA */: - if (startsWith(s, '</')) { - // TODO: probably bad performance - for (let i = ancestors.length - 1; i >= 0; --i) { - if (startsWithEndTagOpen(s, ancestors[i].tag)) { - return true; - } - } - } - break; - case 1 /* RCDATA */: - case 2 /* RAWTEXT */: { - const parent = last(ancestors); - if (parent && startsWithEndTagOpen(s, parent.tag)) { - return true; - } - break; - } - case 3 /* CDATA */: - if (startsWith(s, ']]>')) { - return true; - } - break; - } - return !s; - } - function startsWithEndTagOpen(source, tag) { - return (startsWith(source, '</') && - source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && - /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')); + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options == null ? void 0 : options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; } function hoistStatic(root, context) { - walk(root, context, + walk( + root, + context, // Root node is unfortunately non-hoistable due to potential parent // fallthrough attributes. - isSingleElementRoot(root, root.children[0])); + isSingleElementRoot(root, root.children[0]) + ); } function isSingleElementRoot(root, child) { - const { children } = root; - return (children.length === 1 && - child.type === 1 /* ELEMENT */ && - !isSlotOutlet(child)); + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); } function walk(node, context, doNotHoistNode = false) { - const { children } = node; - const originalCount = children.length; - let hoistedCount = 0; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - // only plain elements & text calls are eligible for hoisting. - if (child.type === 1 /* ELEMENT */ && - child.tagType === 0 /* ELEMENT */) { - const constantType = doNotHoistNode - ? 0 /* NOT_CONSTANT */ - : getConstantType(child, context); - if (constantType > 0 /* NOT_CONSTANT */) { - if (constantType >= 2 /* CAN_HOIST */) { - child.codegenNode.patchFlag = - -1 /* HOISTED */ + (` /* HOISTED */` ); - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - continue; - } - } - else { - // node may contain dynamic children, but its props may be eligible for - // hoisting. - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - const flag = getPatchFlag(codegenNode); - if ((!flag || - flag === 512 /* NEED_PATCH */ || - flag === 1 /* TEXT */) && - getGeneratedPropsConstantType(child, context) >= - 2 /* CAN_HOIST */) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } + const { children } = node; + const originalCount = children.length; + let hoistedCount = 0; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1 + (` /* HOISTED */` ); + child.codegenNode = context.hoist(child.codegenNode); + hoistedCount++; + continue; } - else if (child.type === 12 /* TEXT_CALL */ && - getConstantType(child.content, context) >= 2 /* CAN_HOIST */) { - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - } - // walk further - if (child.type === 1 /* ELEMENT */) { - const isComponent = child.tagType === 1 /* COMPONENT */; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, context); - if (isComponent) { - context.scopes.vSlot--; - } - } - else if (child.type === 11 /* FOR */) { - // Do not hoist v-for single child because it has to be a block - walk(child, context, child.children.length === 1); - } - else if (child.type === 9 /* IF */) { - for (let i = 0; i < child.branches.length; i++) { - // Do not hoist v-if single child because it has to be a block - walk(child.branches[i], context, child.branches[i].children.length === 1); + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = getPatchFlag(codegenNode); + if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } } + } } - if (hoistedCount && context.transformHoist) { - context.transformHoist(children, context, node); + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, context); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, context, child.children.length === 1); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + context, + child.branches[i2].children.length === 1 + ); + } } - // all children were hoisted - the entire children array is hoistable. - if (hoistedCount && - hoistedCount === originalCount && - node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - node.codegenNode && - node.codegenNode.type === 13 /* VNODE_CALL */ && - isArray(node.codegenNode.children)) { - node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children)); + } + if (hoistedCount && context.transformHoist) { + context.transformHoist(children, context, node); + } + if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + const hoisted = context.hoist( + createArrayExpression(node.codegenNode.children) + ); + if (context.hmr) { + hoisted.content = `[...${hoisted.content}]`; } + node.codegenNode.children = hoisted; + } } function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1 /* ELEMENT */: - if (node.tagType !== 0 /* ELEMENT */) { - return 0 /* NOT_CONSTANT */; + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") { + return 0; + } + const flag = getPatchFlag(codegenNode); + if (!flag) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } } - const cached = constantCache.get(node); - if (cached !== undefined) { - return cached; + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13 /* VNODE_CALL */) { - return 0 /* NOT_CONSTANT */; - } - if (codegenNode.isBlock && - node.tag !== 'svg' && - node.tag !== 'foreignObject') { - return 0 /* NOT_CONSTANT */; - } - const flag = getPatchFlag(codegenNode); - if (!flag) { - let returnType = 3 /* CAN_STRINGIFY */; - // Element itself has no patch flag. However we still need to check: - // 1. Even for a node with no patch flag, it is possible for it to contain - // non-hoistable expressions that refers to scope variables, e.g. compiler - // injected keys or cached event handlers. Therefore we need to always - // check the codegenNode's props to be sure. - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (generatedPropsType < returnType) { - returnType = generatedPropsType; - } - // 2. its children. - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (childType < returnType) { - returnType = childType; - } - } - // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0 - // type, check if any of the props can cause the type to be lowered - // we can skip can_patch because it's guaranteed by the absence of a - // patchFlag. - if (returnType > 1 /* CAN_SKIP_PATCH */) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (expType < returnType) { - returnType = expType; - } - } - } - } - // only svg/foreignObject could be block here, however if they are - // static then they don't need to be blocks since there will be no - // nested updates. - if (codegenNode.isBlock) { - // except set custom directives. - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType); - return returnType; - } - else { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - case 2 /* TEXT */: - case 3 /* COMMENT */: - return 3 /* CAN_STRINGIFY */; - case 9 /* IF */: - case 11 /* FOR */: - case 10 /* IF_BRANCH */: - return 0 /* NOT_CONSTANT */; - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return getConstantType(node.content, context); - case 4 /* SIMPLE_EXPRESSION */: - return node.constType; - case 8 /* COMPOUND_EXPRESSION */: - let returnType = 3 /* CAN_STRINGIFY */; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0 /* NOT_CONSTANT */) { - return 0 /* NOT_CONSTANT */; - } - else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - default: - return 0 /* NOT_CONSTANT */; - } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + default: + return 0; + } } - const allowHoistedHelperSet = new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS + const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS ]); function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 /* JS_CALL_EXPRESSION */ && - !isString(value.callee) && - allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - return getConstantType(arg, context); - } - else if (arg.type === 14 /* JS_CALL_EXPRESSION */) { - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))` - return getConstantTypeOfHelperCall(arg, context); - } + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); } - return 0 /* NOT_CONSTANT */; + } + return 0; } function getGeneratedPropsConstantType(node, context) { - let returnType = 3 /* CAN_STRINGIFY */; - const props = getNodeProps(node); - if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0 /* NOT_CONSTANT */) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4 /* SIMPLE_EXPRESSION */) { - valueType = getConstantType(value, context); - } - else if (value.type === 14 /* JS_CALL_EXPRESSION */) { - // some helper calls can be hoisted, - // such as the `normalizeProps` generated by the compiler for pre-normalize class, - // in this case we need to respect the ConstantType of the helper's arguments - valueType = getConstantTypeOfHelperCall(value, context); - } - else { - valueType = 0 /* NOT_CONSTANT */; - } - if (valueType === 0 /* NOT_CONSTANT */) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } } - return returnType; + } + return returnType; } function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - return codegenNode.props; - } + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } } function getPatchFlag(node) { - const flag = node.patchFlag; - return flag ? parseInt(flag, 10) : undefined; + const flag = node.patchFlag; + return flag ? parseInt(flag, 10) : void 0; } - function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) { - const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/); - const context = { - // options - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: new Map(), - components: new Set(), - directives: new Set(), - hoists: [], - imports: [], - constantCache: new Map(), - temps: 0, - cached: 0, - identifiers: Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } - else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - /* istanbul ignore if */ - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node - ? list.indexOf(node) - : context.currentNode - ? context.childIndex - : -1; - /* istanbul ignore if */ - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - // current node removed - context.currentNode = null; - context.onNodeRemoved(); - } - else { - // sibling node removed - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: () => { }, - addIdentifiers(exp) { - }, - removeIdentifiers(exp) { - }, - hoist(exp) { - if (isString(exp)) - exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false) { - return createCacheExpression(context.cached++, exp, isVNode); + function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic: hoistStatic2 = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig + }) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic: hoistStatic2, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + cached: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); } - }; - { - context.filters = new Set(); + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) + exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false) { + return createCacheExpression(context.cached++, exp, isVNode); } - return context; + }; + { + context.filters = /* @__PURE__ */ new Set(); + } + return context; } function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - hoistStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - // finalize meta information - root.helpers = [...context.helpers.keys()]; - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; - { - root.filters = [...context.filters]; - } + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + hoistStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; + { + root.filters = [...context.filters]; + } } function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - // if the single child is an element, turn it into a block. - if (isSingleElementRoot(root, child) && child.codegenNode) { - // single element root is never hoisted so codegenNode will never be - // SimpleExpressionNode - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - makeBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } - else { - // - single <slot/>, IfNode, ForNode: already blocks. - // - single text node: always patched. - // root codegen falls through via genNode() - root.codegenNode = child; - } + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; } - else if (children.length > 1) { - // root has multiple nodes - return a fragment block. - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, undefined, false /* isComponent */); + } else if (children.length > 1) { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; } - else ; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else ; } function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) - continue; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) + continue; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } } function traverseNode(node, context) { - context.currentNode = node; - // apply transform plugins - const { nodeTransforms } = context; - const exitFns = []; - for (let i = 0; i < nodeTransforms.length; i++) { - const onExit = nodeTransforms[i](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } - else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - // node was removed - return; - } - else { - // node may have been replaced - node = context.currentNode; - } + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } } - switch (node.type) { - case 3 /* COMMENT */: - if (!context.ssr) { - // inject import for the Comment symbol, which is needed for creating - // comment nodes with `createVNode` - context.helper(CREATE_COMMENT); - } - break; - case 5 /* INTERPOLATION */: - // no need to traverse, but we need to inject toString helper - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9 /* IF */: - for (let i = 0; i < node.branches.length; i++) { - traverseNode(node.branches[i], context); - } - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - case 1 /* ELEMENT */: - case 0 /* ROOT */: - traverseChildren(node, context); - break; - } - // exit transforms - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); + if (!context.currentNode) { + return; + } else { + node = context.currentNode; } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } } function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) - ? (n) => n === name - : (n) => name.test(n); - return (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const { props } = node; - // structural directive transforms are not concerned with slots - // as they are handled separately in vSlot.ts - if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) { - // structural directives are removed to avoid infinite recursion - // also we remove them *before* applying so that it can further - // traverse itself in case it moves the node around - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) - exitFns.push(onExit); - } - } - return exitFns; + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) + exitFns.push(onExit); } - }; + } + return exitFns; + } + }; } const PURE_ANNOTATION = `/*#__PURE__*/`; const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; - function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.loc.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: undefined, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, node) { - context.code += code; - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } - else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push('\n' + ` `.repeat(n)); + function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false + }) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); } - return context; + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; } function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) - options.onContextCreated(context); - const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context; - const hasHelpers = ast.helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== 'module'; - // preambles - // in setup() inline mode, the preamble is generated in a sub context - // and returned separately. - const preambleContext = context; - { - genFunctionPreamble(ast, preambleContext); - } - // enter render function - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache']; - const signature = args.join(', '); - { - push(`function ${functionName}(${signature}) {`); - } + const context = createCodegenContext(ast, options); + if (options.onContextCreated) + options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const isSetupInlined = false; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - // function mode const declarations should be inside with block - // also they should be renamed to avoid collision with user properties - if (hasHelpers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`); - push(`\n`); - newline(); - } + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); } - // generate asset resolution statements - if (ast.components.length) { - genAssets(ast.components, 'component', context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, 'directive', context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.filters && ast.filters.length) { - newline(); - genAssets(ast.filters, 'filter', context); - newline(); + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } + newline(); } - if (ast.components.length || ast.directives.length || ast.temps) { - push(`\n`); - newline(); - } - // generate the VNode tree expression - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } - else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); + } + if (ast.filters && ast.filters.length) { + newline(); + genAssets(ast.filters, "filter", context); + newline(); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { deindent(); push(`}`); - return { - ast, - code: context.code, - preamble: ``, - // SourceMapGenerator does have toJSON() method but it's not in the types - map: context.map ? context.map.toJSON() : undefined - }; + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; } function genFunctionPreamble(ast, context) { - const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context; - const VueBinding = runtimeGlobalName; - // Generate const declaration for helpers - // In prefix mode, we place the const declaration at top so it's done - // only once; But if we not prefixing, we place the declaration inside the - // with block so it doesn't incur the `in` check cost for every helper access. - if (ast.helpers.length > 0) { - { - // "with" mode. - // save Vue in a separate variable to avoid collision - push(`const _Vue = ${VueBinding}\n`); - // in "with" mode, helpers are declared inside the with block to avoid - // has check cost, but hoists are lifted out of the function - we need - // to provide the helper here. - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ] - .filter(helper => ast.helpers.includes(helper)) - .map(aliasHelper) - .join(', '); - push(`const { ${staticHelpers} } = _Vue\n`); - } - } + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } } - genHoists(ast.hoists, context); - newline(); - push(`return `); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); } function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper(type === 'filter' - ? RESOLVE_FILTER - : type === 'component' - ? RESOLVE_COMPONENT - : RESOLVE_DIRECTIVE); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - // potential component implicit self-reference inferred from SFC filename - const maybeSelfReference = id.endsWith('__self'); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`); - if (i < assets.length - 1) { - newline(); - } + const resolver = helper( + type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } } function genHoists(hoists, context) { - if (!hoists.length) { - return; + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline, helper, scopeId, mode } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push( + `const _hoisted_${i + 1} = ${``}` + ); + genNode(exp, context); + newline(); } - context.pure = true; - const { push, newline, helper, scopeId, mode } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = ${``}`); - genNode(exp, context); - newline(); - } - } - context.pure = false; + } + context.pure = false; } - function isText$1(n) { - return (isString(n) || - n.type === 4 /* SIMPLE_EXPRESSION */ || - n.type === 2 /* TEXT */ || - n.type === 5 /* INTERPOLATION */ || - n.type === 8 /* COMPOUND_EXPRESSION */); + function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; } function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || - (nodes.some(n => isArray(n) || !isText$1(n))); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); + const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); } function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node); - } - else if (isArray(node)) { - genNodeListAsArray(node, context); - } - else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(','); - newline(); - } - else { - comma && push(', '); - } - } + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } } function genNode(node, context) { - if (isString(node)) { - context.push(node); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1 /* ELEMENT */: - case 9 /* IF */: - case 11 /* FOR */: - assert(node.codegenNode != null, `Codegen node is missing for element/if/for node. ` + - `Apply appropriate transforms first.`); - genNode(node.codegenNode, context); - break; - case 2 /* TEXT */: - genText(node, context); - break; - case 4 /* SIMPLE_EXPRESSION */: - genExpression(node, context); - break; - case 5 /* INTERPOLATION */: - genInterpolation(node, context); - break; - case 12 /* TEXT_CALL */: - genNode(node.codegenNode, context); - break; - case 8 /* COMPOUND_EXPRESSION */: - genCompoundExpression(node, context); - break; - case 3 /* COMMENT */: - genComment(node, context); - break; - case 13 /* VNODE_CALL */: - genVNodeCall(node, context); - break; - case 14 /* JS_CALL_EXPRESSION */: - genCallExpression(node, context); - break; - case 15 /* JS_OBJECT_EXPRESSION */: - genObjectExpression(node, context); - break; - case 17 /* JS_ARRAY_EXPRESSION */: - genArrayExpression(node, context); - break; - case 18 /* JS_FUNCTION_EXPRESSION */: - genFunctionExpression(node, context); - break; - case 19 /* JS_CONDITIONAL_EXPRESSION */: - genConditionalExpression(node, context); - break; - case 20 /* JS_CACHE_EXPRESSION */: - genCacheExpression(node, context); - break; - case 21 /* JS_BLOCK_STATEMENT */: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22 /* JS_TEMPLATE_LITERAL */: - break; - case 23 /* JS_IF_STATEMENT */: - break; - case 24 /* JS_ASSIGNMENT_EXPRESSION */: - break; - case 25 /* JS_SEQUENCE_EXPRESSION */: - break; - case 26 /* JS_RETURN_STATEMENT */: - break; - /* istanbul ignore next */ - case 10 /* IF_BRANCH */: - // noop - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - // make sure we exhaust all possible types - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } } function genText(node, context) { - context.push(JSON.stringify(node.content), node); + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); } function genExpression(node, context) { - const { content, isStatic } = node; - context.push(isStatic ? JSON.stringify(content) : content, node); + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); } function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) - push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); + const { push, helper, pure } = context; + if (pure) + push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); } function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child); - } - else { - genNode(child, context); - } + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); } + } } function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8 /* COMPOUND_EXPRESSION */) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } - else if (node.isStatic) { - // only quote keys if necessary - const text = isSimpleIdentifier(node.content) - ? node.content - : JSON.stringify(node.content); - push(text, node); - } - else { - push(`[${node.content}]`, node); - } + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } } function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node); + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); } function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node; - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock - ? getVNodeBlockHelper(context.inSSR, isComponent) - : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, node); - genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context); + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlag, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } } function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) - break; - } - return args.slice(0, i + 1).map(arg => arg || `null`); + let i = args.length; + while (i--) { + if (args[i] != null) + break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); } - // JavaScript function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, node); - genNodeList(node.arguments, context); - push(`)`); + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); } function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, node); - return; + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); } - const multilines = properties.length > 1 || - (properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */)); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - // key - genExpressionAsPropertyKey(key, context); - push(`: `); - // value - genNode(value, context); - if (i < properties.length - 1) { - // will only reach this if it's multilines - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); + } + multilines && deindent(); + push(multilines ? `}` : ` }`); } function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); + genNodeListAsArray(node.elements, context); } function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - // wrap slot functions with owner context - push(`_${helperNameMap[WITH_CTX]}(`); + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); } - push(`(`, node); - if (isArray(params)) { - genNodeList(params, context); + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); } - else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } - } - else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - if (node.isNonScopedSlot) { - push(`, undefined, true`); - } - push(`)`); - } - } - function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4 /* SIMPLE_EXPRESSION */) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } - else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent(true /* without newline */); - } - function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - push(`_cache[${node.index}] || (`); - if (node.isVNode) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1),`); - newline(); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (node.isVNode) { - push(`,`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + if (node.isNonScopedSlot) { + push(`, undefined, true`); } push(`)`); + } + } + function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); + } + function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + push(`_cache[${node.index}] || (`); + if (node.isVNode) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1),`); + newline(); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (node.isVNode) { + push(`,`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); } - function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = Object.create(null)) { - { - return; - } - } - function isReferencedIdentifier(id, parent, parentStack) { - { - return false; - } - } - function isInDestructureAssignment(parent, parentStack) { - if (parent && - (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern')) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === 'AssignmentExpression') { - return true; - } - else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) { - break; - } - } - } - return false; - } - function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } - } - function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === 'VariableDeclaration') { - if (stmt.declare) - continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } - else if (stmt.type === 'FunctionDeclaration' || - stmt.type === 'ClassDeclaration') { - if (stmt.declare || !stmt.id) - continue; - onIdent(stmt.id); - } - } - } - function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case 'Identifier': - nodes.push(param); - break; - case 'MemberExpression': - let object = param; - while (object.type === 'MemberExpression') { - object = object.object; - } - nodes.push(object); - break; - case 'ObjectPattern': - for (const prop of param.properties) { - if (prop.type === 'RestElement') { - extractIdentifiers(prop.argument, nodes); - } - else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case 'ArrayPattern': - param.elements.forEach(element => { - if (element) - extractIdentifiers(element, nodes); - }); - break; - case 'RestElement': - extractIdentifiers(param.argument, nodes); - break; - case 'AssignmentPattern': - extractIdentifiers(param.left, nodes); - break; - } - return nodes; - } - const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); - }; - const isStaticProperty = (node) => node && - (node.type === 'ObjectProperty' || node.type === 'ObjectMethod') && - !node.computed; - const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; - - // these keywords should not appear inside expressions, but operators like - // typeof, instanceof and in are allowed - const prohibitedKeywordRE = new RegExp('\\b' + - ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + - 'super,throw,while,yield,delete,export,import,return,switch,default,' + - 'extends,finally,continue,debugger,function,arguments,typeof,void') - .split(',') - .join('\\b|\\b') + - '\\b'); - // strip strings in expressions + const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" + ); const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; - /** - * Validate a non-prefixed expression. - * This is only called when using the in-browser runtime compiler since it - * doesn't prefix expressions. - */ function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { - const exp = node.content; - // empty expressions are validated per-directive since some directives - // do allow empty expressions. - if (!exp.trim()) { - return; - } - try { - new Function(asRawStatements - ? ` ${exp} ` - : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`); - } - catch (e) { - let message = e.message; - const keywordMatch = exp - .replace(stripStringRE, '') - .match(prohibitedKeywordRE); - if (keywordMatch) { - message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; - } - context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, message)); + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } } const transformExpression = (node, context) => { - if (node.type === 5 /* INTERPOLATION */) { - node.content = processExpression(node.content, context); - } - else if (node.type === 1 /* ELEMENT */) { - // handle directives on element - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - // do not process for v-on & v-for since they are special handled - if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') { - const exp = dir.exp; - const arg = dir.arg; - // do not process exp if this is v-on:arg - we need special handling - // for wrapping inline statements. - if (exp && - exp.type === 4 /* SIMPLE_EXPRESSION */ && - !(dir.name === 'on' && arg)) { - dir.exp = processExpression(exp, context, - // slot args must be processed as function params - dir.name === 'slot'); - } - if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg)) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } } + } }; - // Important: since this function uses Node.js only dependencies, it should - // always be used with a leading !true check so that it can be - // tree-shaken from the browser build. - function processExpression(node, context, - // some expressions like v-slot props & v-for aliases should be parsed as - // function params - asParams = false, - // v-on handler values may contain multiple statements - asRawStatements = false, localVars = Object.create(context.identifiers)) { + function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { { - { - // simple in-browser validation (same logic in 2.x) - validateBrowserExpression(node, context, asParams, asRawStatements); - } - return node; + validateBrowserExpression(node, context, asParams, asRawStatements); } + return node; + } + } + function stringifyExpression(exp) { + if (isString(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } } - const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => { + const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { return processIf(node, dir, context, (ifNode, branch, isRoot) => { - // #1587: We need to dynamically increment the key based on the current - // node's sibling nodes, since chained v-if/else branches are - // rendered at the same depth - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9 /* IF */) { - key += sibling.branches.length; - } + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; } - // Exit callback. Complete the codegenNode when all children have been - // transformed. - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context); - } - else { - // attach this branch's codegen node to the v-if root. - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context); - } - }; + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; }); - }); - // target-agnostic transform used for both Client and SSR + } + ); function processIf(node, dir, context, processCodegen) { - if (dir.name !== 'else' && - (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc)); - dir.exp = createSimpleExpression(`true`, false, loc); + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: node.loc, + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); } - if (dir.exp) { - validateBrowserExpression(dir.exp, context); - } - if (dir.name === 'if') { + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); const branch = createIfBranch(node, dir); - const ifNode = { - type: 9 /* IF */, - loc: node.loc, - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; } - } - else { - // locate the adjacent v-if - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3 /* COMMENT */) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && - sibling.type === 2 /* TEXT */ && - !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9 /* IF */) { - // Check if v-else was followed by v-else-if - if (dir.name === 'else-if' && - sibling.branches[sibling.branches.length - 1].condition === undefined) { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - // move the node to the if node's branches - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && - // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && - context.parent.type === 1 /* ELEMENT */ && - isBuiltInType(context.parent.tag, 'transition'))) { - branch.children = [...comments, ...branch.children]; - } - // check if user is forcing same key on different branches - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc)); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - // since the branch was removed, it will not be traversed. - // make sure to traverse here. - traverseNode(branch, context); - // call on exit - if (onExit) - onExit(); - // make sure to reset currentNode after traversal to indicate this - // node has been removed. - context.currentNode = null; - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - break; + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) + onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; } + } } function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3 /* TEMPLATE */; - return { - type: 10 /* IF_BRANCH */, - loc: node.loc, - condition: dir.name === 'else' ? undefined : dir.exp, - children: isTemplateIf && !findDir(node, 'for') ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; } function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - 'true' - ])); - } - else { - return createChildrenCodegenNode(branch, keyIndex, context); - } + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } } function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */)); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11 /* FOR */) { - // optimize away nested fragments when child is a ForNode - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } - else { - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (!branch.isTemplateIf && - children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, false, false /* isComponent */, branch.loc); - } + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + false, + false, + branch.loc + ); } - else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - // Change createVNode to createBlock. - if (vnodeCall.type === 13 /* VNODE_CALL */) { - makeBlock(vnodeCall, context); - } - // inject branch key - injectProp(vnodeCall, keyProperty, context); - return ret; + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); } + injectProp(vnodeCall, keyProperty, context); + return ret; + } } function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; } - if (a.type === 6 /* ATTRIBUTE */) { - if (a.value.content !== b.value.content) { - return false; - } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; } - else { - // directive - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 /* SIMPLE_EXPRESSION */ || - exp.isStatic !== branchExp.isStatic || - exp.content !== branchExp.content) { - return false; - } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; } - return true; + } + return true; } function getParentCondition(node) { - while (true) { - if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - node = node.alternate; - } - else { - return node; - } - } - else if (node.type === 20 /* JS_CACHE_EXPRESSION */) { - node = node.value; - } + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; } + } } - const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => { + const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { const { helper, removeHelper } = context; - return processFor(node, dir, context, forNode => { - // create the loop render function expression now, and add the - // iterator on exit after all children have been traversed - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, 'memo'); - const keyProp = findProp(node, `key`); - const keyExp = keyProp && - (keyProp.type === 6 /* ATTRIBUTE */ - ? createSimpleExpression(keyProp.value.content, true) - : keyProp.exp); - const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; - const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ && - forNode.source.constType > 0 /* NOT_CONSTANT */; - const fragmentFlag = isStableFragment - ? 64 /* STABLE_FRAGMENT */ - : keyProp - ? 128 /* KEYED_FRAGMENT */ - : 256 /* UNKEYED_FRAGMENT */; - forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag + - (` /* ${PatchFlagNames[fragmentFlag]} */` ), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc); - return () => { - // finish the codegen now that all children have been traversed - let childBlock; - const { children } = forNode; - // check <template v-for> key placement - if (isTemplate) { - node.children.some(c => { - if (c.type === 1 /* ELEMENT */) { - const key = findProp(c, 'key'); - if (key) { - context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc)); - return true; - } - } - }); + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`); + const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp); + const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag + (` /* ${PatchFlagNames[fragmentFlag]} */` ), + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */; - const slotOutlet = isSlotOutlet(node) - ? node - : isTemplate && - node.children.length === 1 && - isSlotOutlet(node.children[0]) - ? node.children[0] // api-extractor somehow fails to infer this - : null; - if (slotOutlet) { - // <slot v-for="..."> or <template v-for="..."><slot/></template> - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - // <template v-for="..." :key="..."><slot/></template> - // we need to inject the key to the renderSlot() call. - // the props for renderSlot is passed as the 3rd argument. - injectProp(childBlock, keyProperty, context); - } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64 + (` /* ${PatchFlagNames[64]} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); } - else if (needFragmentWrapper) { - // <template v-for="..."> with text or multi-elements - // should generate a fragment block for each loop - childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ + - (` /* ${PatchFlagNames[64 /* STABLE_FRAGMENT */]} */` - ), undefined, undefined, true, undefined, false /* isComponent */); - } - else { - // Normal element v-for. Directly use the child's codegenNode - // but mark it as a block. - childBlock = children[0] - .codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - // switch from block to vnode - removeHelper(OPEN_BLOCK); - removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - // switch from vnode to block - removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ])); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...(keyExp ? [` && _cached.key === `, keyExp] : []), - ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++))); - } - else { - renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */)); - } - }; + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached++)) + ); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; }); - }); - // target-agnostic transform used for both Client and SSR + } + ); function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc)); - return; - } - const parseResult = parseForExpression( - // can only be simple expression because vFor transform is applied - // before expression transform. - dir.exp, context); - if (!parseResult) { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc)); - return; - } - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11 /* FOR */, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - // bookkeeping - scopes.vFor++; - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (onExit) - onExit(); - }; + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) + onExit(); + }; } - const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; - // This regex doesn't cover the case if key or index aliases have destructuring, - // but those do not make sense in the first place, so this works in practice. - const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; - const stripParensRE = /^\(|\)$/g; - function parseForExpression(input, context) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) - return; - const [, LHS, RHS] = inMatch; - const result = { - source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: undefined, - key: undefined, - index: undefined - }; - { - validateBrowserExpression(result.source, context); + function finalizeForParseResult(result, context) { + if (result.finalized) + return; + { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); } - let valueContent = LHS.trim().replace(stripParensRE, '').trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, '').trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(loc, keyContent, keyOffset); - { - validateBrowserExpression(result.key, context, true); - } - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key - ? keyOffset + keyContent.length - : trimmedOffset + valueContent.length)); - { - validateBrowserExpression(result.index, context, true); - } - } - } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); } - if (valueContent) { - result.value = createAliasExpression(loc, valueContent, trimmedOffset); - { - validateBrowserExpression(result.value, context, true); - } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); } - return result; - } - function createAliasExpression(range, content, offset) { - return createSimpleExpression(content, false, getInnerRange(range, offset, content.length)); + } + result.finalized = true; } function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); + return createParamsList([value, key, index, ...memoArgs]); } function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) - break; - } - return args - .slice(0, i + 1) - .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false)); + let i = args.length; + while (i--) { + if (args[i]) + break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); } const defaultFallback = createSimpleExpression(`undefined`, false); - // A NodeTransform that: - // 1. Tracks scope identifiers for scoped slots so that they don't get prefixed - // by transformExpression. This is only applied in non-browser builds with - // { prefixIdentifiers: true }. - // 2. Track v-slot depths so that we know a slot is inside another slot. - // Note the exit callback is executed before buildSlots() on the same node, - // so only nested slots see positive numbers. const trackSlotScopes = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 1 /* COMPONENT */ || - node.tagType === 3 /* TEMPLATE */)) { - // We are only checking non-empty v-slot here - // since we only care about slots that introduce scope variables. - const vSlot = findDir(node, 'slot'); - if (vSlot) { - vSlot.exp; - context.scopes.vSlot++; - return () => { - context.scopes.vSlot--; - }; - } + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; } + } }; - // A NodeTransform that tracks scope identifiers for scoped slots with v-for. - // This transform is only applied in non-browser builds with { prefixIdentifiers: true } const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && - node.props.some(isVSlot) && - (vFor = findDir(node, 'for'))) { - const result = (vFor.parseResult = parseForExpression(vFor.exp, context)); - if (result) { - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; } + } }; - const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc); - // Instead of being a DirectiveTransform, v-slot processing is called during - // transformElement to build the slots object for a component. + const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc + ); function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - // If the slot is inside a v-for or another v-slot, force it to be dynamic - // since it likely uses a scope variable. - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - // 1. Check for slot with slotProps on component itself. - // <Comp v-slot="{ prop }"/> - const onComponentSlot = findDir(node, 'slot', true); + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc))); + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; } - // 2. Iterate through children and check for template slots - // <template v-slot:foo="{ prop }"> - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = new Set(); - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || - !(slotDir = findDir(slotElement, 'slot', true))) { - // not a <template v-slot>, skip. - if (slotElement.type !== 3 /* COMMENT */) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - // already has on-component slot - this is incorrect usage. - context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc)); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir; - // check if name is dynamic. - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } - else { - hasDynamicSlots = true; - } - const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc); - // check if this slot is conditional (v-if/v-for) - let vIf; - let vElse; - let vFor; - if ((vIf = findDir(slotElement, 'if'))) { - hasDynamicSlots = true; - dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)); - } - else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) { - // find adjacent v-if - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3 /* COMMENT */) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, 'if')) { - // remove node - children.splice(i, 1); - i--; - // attach this slot to previous conditional - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp - ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback) - : buildDynamicSlot(slotName, slotFunction); - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc)); - } - } - else if ((vFor = findDir(slotElement, 'for'))) { - hasDynamicSlots = true; - const parseResult = vFor.parseResult || - parseForExpression(vFor.exp, context); - if (parseResult) { - // Render the dynamic slots as an array and add it to the createSlot() - // args. The runtime knows how to handle it appropriately. - dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */) - ])); - } - else { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc)); - } - } - else { - // check duplicate static names - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc)); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === 'default') { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children) => { - const fn = buildSlotFn(props, children, loc); - if (context.compatConfig) { - fn.isNonScopedSlot = true; - } - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - // implicit default slot (on component) - slotsProperties.push(buildDefaultSlotProperty(undefined, children)); + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; } - else if (implicitDefaultChildren.length && - // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) { - // implicit default slot (mixed with named slots) - if (hasNamedDefaultSlot) { - context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc)); - } - else { - slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren)); - } + } + if (prev && isTemplateNode(prev) && findDir(prev, "if")) { + children.splice(i, 1); + i--; + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); } - const slotFlag = hasDynamicSlots - ? 2 /* DYNAMIC */ - : hasForwardedSlots(node.children) - ? 3 /* FORWARDED */ - : 1 /* STABLE */; - let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression(slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), false))), loc); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + if (context.compatConfig) { + fn.isNonScopedSlot = true; + } + return createObjectProperty(`default`, fn); }; - } - function buildDynamicSlot(name, fn) { - return createObjectExpression([ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) ]); + } + return { + slots, + hasDynamicSlots + }; + } + function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); } function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - if (child.tagType === 2 /* SLOT */ || - hasForwardedSlots(child.children)) { - return true; - } - break; - case 9 /* IF */: - if (hasForwardedSlots(child.branches)) - return true; - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - if (hasForwardedSlots(child.children)) - return true; - break; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; } + break; + case 9: + if (hasForwardedSlots(child.branches)) + return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) + return true; + break; } - return false; + } + return false; } function isNonWhitespaceContent(node) { - if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */) - return true; - return node.type === 2 /* TEXT */ - ? !!node.content.trim() - : isNonWhitespaceContent(node.content); + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); } - // some directive transforms (e.g. v-model) may return a symbol for runtime - // import, which should be used instead of a resolveDirective call. - const directiveImportMap = new WeakMap(); - // generate a JavaScript AST for this element's codegen + const directiveImportMap = /* @__PURE__ */ new WeakMap(); const transformElement = (node, context) => { - // perform the work on exit, after all child expressions have been - // processed and merged. - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */))) { - return; + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let vnodePatchFlag; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); } - const { tag, props } = node; - const isComponent = node.tagType === 1 /* COMPONENT */; - // The goal of the transform is to create a codegenNode implementing the - // VNodeCall interface. - let vnodeTag = isComponent - ? resolveComponentType(node, context) - : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let vnodePatchFlag; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = - // dynamic component may resolve to plain elements - isDynamicComponent || - vnodeTag === TELEPORT || - vnodeTag === SUSPENSE || - (!isComponent && - // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')); - // props - if (props.length > 0) { - const propsBuildResult = buildProps(node, context, undefined, isComponent, isDynamicComponent); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = - directives && directives.length - ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context))) - : undefined; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; } - // children - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - // Although a built-in component, we compile KeepAlive with raw children - // instead of slot functions so that it can be used inside Transition - // or other Transition-wrapping HOCs. - // To ensure correct updates with block optimizations, we need to: - // 1. Force keep-alive into a block. This avoids its children being - // collected by a parent block. - shouldUseBlock = true; - // 2. Force keep-alive to always be updated, since it uses raw children. - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - if (node.children.length > 1) { - context.onError(createCompilerError(45 /* X_KEEP_ALIVE_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - } - const shouldBuildAsSlots = isComponent && - // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && - // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } - else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - // check for dynamic text children - const hasDynamicTextChild = type === 5 /* INTERPOLATION */ || - type === 8 /* COMPOUND_EXPRESSION */; - if (hasDynamicTextChild && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - patchFlag |= 1 /* TEXT */; - } - // pass directly if the only child is a text node - // (plain / interpolation / expression) - if (hasDynamicTextChild || type === 2 /* TEXT */) { - vnodeChildren = child; - } - else { - vnodeChildren = node.children; - } - } - else { - vnodeChildren = node.children; - } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; } - // patchFlag & dynamicPropNames - if (patchFlag !== 0) { - { - if (patchFlag < 0) { - // special flags (negative and mutually exclusive) - vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } - else { - // bitwise flags - const flagNames = Object.keys(PatchFlagNames) - .map(Number) - .filter(n => n > 0 && patchFlag & n) - .map(n => PatchFlagNames[n]) - .join(`, `); - vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; } - node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc); - }; + } else { + vnodeChildren = node.children; + } + } + if (patchFlag !== 0) { + { + if (patchFlag < 0) { + vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + vnodePatchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; }; function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - // 1. dynamic component - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp(node, 'is'); - if (isProp) { - if (isExplicitDynamic || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))) { - const exp = isProp.type === 6 /* ATTRIBUTE */ - ? isProp.value && createSimpleExpression(isProp.value.content, true) - : isProp.exp; - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } - else if (isProp.type === 6 /* ATTRIBUTE */ && - isProp.value.content.startsWith('vue:')) { - // <button is="vue:xxx"> - // if not <component>, only is value that starts with "vue:" will be - // treated as component by the parse phase and reach here, unless it's - // compat mode where all is values are considered components - tag = isProp.value.content.slice(4); - } - } - // 1.5 v-is (TODO: Deprecate) - const isDir = !isExplicitDynamic && findDir(node, 'is'); - if (isDir && isDir.exp) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp(node, "is"); + if (isProp) { + if (isExplicitDynamic || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + )) { + const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp; + if (exp) { return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - isDir.exp + exp ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); } - // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...) - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - // built-ins are simply fallthroughs / have special handling during ssr - // so we don't need to import their runtime equivalents - if (!ssr) - context.helper(builtIn); - return builtIn; - } - // 5. user component (resolve) - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) + context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); } function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - // patchFlag analysis - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && - (!isComponent || isDynamicComponent) && - // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== 'onclick' && - // omit v-model handlers - name !== 'onUpdate:modelValue' && - // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (value.type === 20 /* JS_CACHE_EXPRESSION */ || - ((value.type === 4 /* SIMPLE_EXPRESSION */ || - value.type === 8 /* COMPOUND_EXPRESSION */) && - getConstantType(value, context) > 0)) { - // skip if the prop is a cached handler or has constant value - return; - } - if (name === 'ref') { - hasRef = true; - } - else if (name === 'class') { - hasClassBinding = true; - } - else if (name === 'style') { - hasStyleBinding = true; - } - else if (name !== 'key' && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - // treat the dynamic class and style binding of the component as dynamic props - if (isComponent && - (name === 'class' || name === 'style') && - !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) + mergeArgs.push(arg); + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); } - else { - hasDynamicKeys = true; + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); } - }; - for (let i = 0; i < props.length; i++) { - // static attribute - const prop = props[i]; - if (prop.type === 6 /* ATTRIBUTE */) { - const { loc, name, value } = prop; - let isStatic = true; - if (name === 'ref') { - hasRef = true; - if (context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled( + "COMPILER_IS_ON_ELEMENT", + context + ))) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushMergeArg(); + { + { + const hasOverridableKeys = mergeArgs.some((arg2) => { + if (arg2.type === 15) { + return arg2.properties.some(({ key }) => { + if (key.type !== 4 || !key.isStatic) { + return true; + } + return key.content !== "class" && key.content !== "style" && !isOn(key.content); + }); + } else { + return true; + } + }); + if (hasOverridableKeys) { + checkCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context, + loc + ); } - } - // skip is on <component>, or is="vue:xxx" - if (name === 'is' && - (isComponentTag(tag) || - (value && value.content.startsWith('vue:')) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context)))) { + } + if (isCompatEnabled( + "COMPILER_V_BIND_OBJECT_ORDER", + context + )) { + mergeArgs.unshift(exp); continue; + } } - properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc))); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); } - else { - // directives - const { name, arg, exp, loc } = prop; - const isVBind = name === 'bind'; - const isVOn = name === 'on'; - // skip v-slot - it is handled by its dedicated transform. - if (name === 'slot') { - if (!isComponent) { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc)); - } - continue; - } - // skip v-once/v-memo - they are handled by dedicated transforms. - if (name === 'once' || name === 'memo') { - continue; - } - // skip v-is and :is on <component> - if (name === 'is' || - (isVBind && - isStaticArgOf(arg, 'is') && - (isComponentTag(tag) || - (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))))) { - continue; - } - // skip v-on in SSR compilation - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - (isVBind && isStaticArgOf(arg, 'key')) || - // inline before-update hooks need to force block so that it is invoked - // before children - (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // special case for v-bind and v-on with no argument - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - properties = []; - } - if (isVBind) { - { - // 2.x v-bind object order compat - { - const hasOverridableKeys = mergeArgs.some(arg => { - if (arg.type === 15 /* JS_OBJECT_EXPRESSION */) { - return arg.properties.some(({ key }) => { - if (key.type !== 4 /* SIMPLE_EXPRESSION */ || - !key.isStatic) { - return true; - } - return (key.content !== 'class' && - key.content !== 'style' && - !isOn(key.content)); - }); - } - else { - // dynamic expression - return true; - } - }); - if (hasOverridableKeys) { - checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context, loc); - } - } - if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context)) { - mergeArgs.unshift(exp); - continue; - } - } - mergeArgs.push(exp); - } - else { - // v-on="obj" -> toHandlers(obj) - mergeArgs.push({ - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee: context.helper(TO_HANDLERS), - arguments: [exp] - }); - } - } - else { - context.onError(createCompilerError(isVBind - ? 34 /* X_V_BIND_NO_EXPRESSION */ - : 35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - continue; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - // has built-in directive transform. - const { props, needRuntime } = directiveTransform(prop, node, context); - !ssr && props.forEach(analyzePatchFlag); - properties.push(...props); - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } - else if (!isBuiltInDirective(name)) { - // no built-in transform, this is a user custom directive. - runtimeDirectives.push(prop); - // custom dirs may use beforeUpdate so they need to force blocks - // to ensure before-update gets called before children update - if (hasChildren) { - shouldUseBlock = true; - } - } + continue; + } + if (isVBind && modifiers.includes("prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } } - let propsExpression = undefined; - // has v-bind="object" or v-on="object", wrap with mergeProps - if (mergeArgs.length) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - } - if (mergeArgs.length > 1) { - propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc); - } - else { - // single v-bind with nothing else - no need for a mergeProps call - propsExpression = mergeArgs[0]; - } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; } - else if (properties.length) { - propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc); + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; } - // patchFlag analysis - if (hasDynamicKeys) { - patchFlag |= 16 /* FULL_PROPS */; + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; } - else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2 /* CLASS */; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4 /* STYLE */; - } - if (dynamicPropNames.length) { - patchFlag |= 8 /* PROPS */; - } - if (hasHydrationEventBinding) { - patchFlag |= 32 /* HYDRATE_EVENTS */; - } + if (dynamicPropNames.length) { + patchFlag |= 8; } - if (!shouldUseBlock && - (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) && - (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512 /* NEED_PATCH */; + if (hasHydrationEventBinding) { + patchFlag |= 32; } - // pre-normalize props, SSR is skipped for now - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15 /* JS_OBJECT_EXPRESSION */: - // means that there is no v-bind, - // but still need to deal with dynamic key binding - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === 'class') { - classKeyIndex = i; - } - else if (key.content === 'style') { - styleKeyIndex = i; - } - } - else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - // no dynamic key - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]); - } - if (styleProp && - // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || - (styleProp.value.type === 4 /* SIMPLE_EXPRESSION */ && - styleProp.value.content.trim()[0] === `[`) || - // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) { - styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]); - } - } - else { - // dynamic key binding, wrap with `normalizeProps` - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]); - } - break; - case 14 /* JS_CALL_EXPRESSION */: - // mergeProps call, do nothing - break; - default: - // single v-bind - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ]); - break; + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; } - // Dedupe props in an object literal. - // Literal duplicated attributes would have been warned during the parse phase, - // however, it's possible to encounter duplicated `onXXX` handlers with different - // modifiers. We also need to merge static and dynamic class / style attributes. - // - onXXX handlers / style: merge into array - // - class: merge into single expression with concatenation function dedupeProperties(properties) { - const knownProps = new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - // dynamic keys are always allowed - if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === 'style' || name === 'class' || isOn(name)) { - mergeAsArray(existing, prop); - } - // unexpected duplicate, should have emitted error during parse - } - else { - knownProps.set(name, prop); - deduped.push(prop); - } + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; } - return deduped; + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; } function mergeAsArray(existing, incoming) { - if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.value.elements.push(incoming.value); - } - else { - existing.value = createArrayExpression([existing.value, incoming.value], existing.loc); - } + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } } function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - // built-in directive with runtime - dirArgs.push(context.helperString(runtime)); + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); } - else { - { - // inject statement for resolving directive - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } + } + const { loc } = dir; + if (dir.exp) + dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); } - const { loc } = dir; - if (dir.exp) - dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc)); - } - return createArrayExpression(dirArgs, dir.loc); + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); } function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) - propsNamesString += ', '; - } - return propsNamesString + `]`; + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) + propsNamesString += ", "; + } + return propsNamesString + `]`; } function isComponentTag(tag) { - return tag === 'component' || tag === 'Component'; + return tag === "component" || tag === "Component"; } const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - '{}', - 'undefined', - 'true' - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); // remove unused arguments - node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc); + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } }; function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = undefined; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.value) { - if (p.name === 'name') { - slotName = JSON.stringify(p.value.content); - } - else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); } - else { - if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) { - if (p.exp) - slotName = p.exp; - } - else { - if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) + slotName = p.exp; + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); } + nonNameProps.push(p); + } } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps(node, context, nonNameProps, false, false); - slotProps = props; - if (directives.length) { - context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc)); - } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); } - return { - slotName, - slotProps - }; + } + return { + slotName, + slotProps + }; } - const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; - const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc)); + const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; + const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); } - let eventName; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - let rawName = arg.content; - // TODO deprecate @vnodeXXX usage - if (rawName.startsWith('vue:')) { - rawName = `vnode-${rawName.slice(4)}`; - } - // for all event listeners, auto convert it to camelCase. See issue #2249 - eventName = createSimpleExpression(toHandlerKey(camelize(rawName)), true, arg.loc); - } - else { - // #2388 - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp.content); + const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); + const hasMultipleStatements = exp.content.includes(`;`); + { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); } - else { - // already a compound expression. - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); } - // handler processing - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = undefined; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp.content); - const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); - const hasMultipleStatements = exp.content.includes(`;`); - { - validateBrowserExpression(exp, context, false, hasMultipleStatements); - } - if (isInlineStatement || (shouldCache && isMemberExp)) { - // wrap inline statement in a function expression - exp = createCompoundExpression([ - `${isInlineStatement - ? `$event` - : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc)) - ] - }; - // apply extended compiler augmentor - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - // cache handlers so that it's always the same handler being passed down. - // this avoids unnecessary re-renders when users use inline handlers on - // components. - ret.props[0].value = context.cache(ret.props[0].value); - } - // mark the key as handler for props normalization check - ret.props.forEach(p => (p.key.isHandlerKey = true)); - return ret; + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; }; - // v-bind without arg is handled directly in ./transformElements.ts due to it affecting - // codegen for the entire props object. This transform here is only for v-bind - // *with* args. const transformBind = (dir, _node, context) => { - const { exp, modifiers, loc } = dir; - const arg = dir.arg; - if (arg.type !== 4 /* SIMPLE_EXPRESSION */) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (!exp && arg.type === 4) { + const propName = camelize(arg.content); + exp = dir.exp = createSimpleExpression(propName, false, arg.loc); + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.includes("camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); } - else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; + } + if (!context.inSSR) { + if (modifiers.includes("prop")) { + injectPrefix(arg, "."); } - // .sync is replaced by v-model:arg - if (modifiers.includes('camel')) { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } - else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } - else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.includes('prop')) { - injectPrefix(arg, '.'); - } - if (modifiers.includes('attr')) { - injectPrefix(arg, '^'); - } - } - if (!exp || - (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) { - context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc)); - return { - props: [createObjectProperty(arg, createSimpleExpression('', true, loc))] - }; + if (modifiers.includes("attr")) { + injectPrefix(arg, "^"); } + } + if (!exp || exp.type === 4 && !exp.content.trim()) { + context.onError(createCompilerError(34, loc)); return { - props: [createObjectProperty(arg, exp)] + props: [createObjectProperty(arg, createSimpleExpression("", true, loc))] }; + } + return { + props: [createObjectProperty(arg, exp)] + }; }; const injectPrefix = (arg, prefix) => { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } - else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } - else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } }; - // Merge adjacent text nodes and expressions into a single expression - // e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child. const transformText = (node, context) => { - if (node.type === 0 /* ROOT */ || - node.type === 1 /* ELEMENT */ || - node.type === 11 /* FOR */ || - node.type === 10 /* IF_BRANCH */) { - // perform the transform on node exit so that all expressions have already - // been processed. - return () => { - const children = node.children; - let currentContainer = undefined; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression([child], child.loc); - } - // merge adjacent text node into current - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } - else { - currentContainer = undefined; - break; - } - } - } + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; } - if (!hasText || - // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - (children.length === 1 && - (node.type === 0 /* ROOT */ || - (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find(p => p.type === 7 /* DIRECTIVE */ && - !context.directiveTransforms[p.name]) && - // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(node.tag === 'template'))))) { - return; - } - // pre-convert text nodes into createTextVNode(text) calls to avoid - // runtime normalization. - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) { - const callArgs = []; - // createTextVNode defaults to single whitespace, so if it is a - // single space the code could be an empty call to save bytes. - if (child.type !== 2 /* TEXT */ || child.content !== ' ') { - callArgs.push(child); - } - // mark dynamic text with flag so it gets patched inside a block - if (!context.ssr && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - callArgs.push(1 /* TEXT */ + - (` /* ${PatchFlagNames[1 /* TEXT */]} */` )); - } - children[i] = { - type: 12 /* TEXT_CALL */, - content: child, - loc: child.loc, - codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs) - }; - } - } - }; - } - }; - - const seen = new WeakSet(); - const transformOnce = (node, context) => { - if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) { - if (seen.has(node) || context.inVOnce) { - return; + } } - seen.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */); - } - }; - } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + !(node.tag === "template"))) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } }; - const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc)); - return createTransformProps(); + const seen$1 = /* @__PURE__ */ new WeakSet(); + const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; } - const rawExp = exp.loc.source; - const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp; - // im SFC <script setup> inline mode, the exp may have been transformed into - // _unref(exp) - context.bindingMetadata[rawExp]; - const maybeRef = !true /* SETUP_CONST */; - if (!expString.trim() || - (!isMemberExpression(expString) && !maybeRef)) { - context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc)); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression('modelValue', true); - const eventName = arg - ? isStaticExp(arg) - ? `onUpdate:${arg.content}` - : createCompoundExpression(['"onUpdate:" + ', arg]) - : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - // modelModifiers: { foo: true, "bar-baz": true } - if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) { - const modifiers = dir.modifiers - .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`) - .join(`, `); - const modifiersKey = arg - ? isStaticExp(arg) - ? `${arg.content}Modifiers` - : createCompoundExpression([arg, ' + "Modifiers"']) - : `modelModifiers`; - props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */))); - } - return createTransformProps(props); + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true + /* isVNode */ + ); + } + }; + } + }; + + const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source; + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); }; function createTransformProps(props = []) { - return { props }; + return { props }; } const validDivisionCharRE = /[\w).+\-_$\]]/; const transformFilter = (node, context) => { - if (!isCompatEnabled("COMPILER_FILTER" /* COMPILER_FILTERS */, context)) { - return; - } - if (node.type === 5 /* INTERPOLATION */) { - // filter rewrite is applied before expression transform so only - // simple expressions are possible at this stage - rewriteFilter(node.content, context); - } - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((prop) => { - if (prop.type === 7 /* DIRECTIVE */ && - prop.name !== 'for' && - prop.exp) { - rewriteFilter(prop.exp, context); - } - }); - } + if (!isCompatEnabled("COMPILER_FILTERS", context)) { + return; + } + if (node.type === 5) { + rewriteFilter(node.content, context); + } + if (node.type === 1) { + node.props.forEach((prop) => { + if (prop.type === 7 && prop.name !== "for" && prop.exp) { + rewriteFilter(prop.exp, context); + } + }); + } }; function rewriteFilter(node, context) { - if (node.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(node, context); - } - else { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (typeof child !== 'object') - continue; - if (child.type === 4 /* SIMPLE_EXPRESSION */) { - parseFilter(child, context); - } - else if (child.type === 8 /* COMPOUND_EXPRESSION */) { - rewriteFilter(node, context); - } - else if (child.type === 5 /* INTERPOLATION */) { - rewriteFilter(child.content, context); - } - } + if (node.type === 4) { + parseFilter(node, context); + } else { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (typeof child !== "object") + continue; + if (child.type === 4) { + parseFilter(child, context); + } else if (child.type === 8) { + rewriteFilter(node, context); + } else if (child.type === 5) { + rewriteFilter(child.content, context); + } } + } } function parseFilter(node, context) { - const exp = node.content; - let inSingle = false; - let inDouble = false; - let inTemplateString = false; - let inRegex = false; - let curly = 0; - let square = 0; - let paren = 0; - let lastFilterIndex = 0; - let c, prev, i, expression, filters = []; - for (i = 0; i < exp.length; i++) { - prev = c; - c = exp.charCodeAt(i); - if (inSingle) { - if (c === 0x27 && prev !== 0x5c) - inSingle = false; - } - else if (inDouble) { - if (c === 0x22 && prev !== 0x5c) - inDouble = false; - } - else if (inTemplateString) { - if (c === 0x60 && prev !== 0x5c) - inTemplateString = false; - } - else if (inRegex) { - if (c === 0x2f && prev !== 0x5c) - inRegex = false; - } - else if (c === 0x7c && // pipe - exp.charCodeAt(i + 1) !== 0x7c && - exp.charCodeAt(i - 1) !== 0x7c && - !curly && - !square && - !paren) { - if (expression === undefined) { - // first filter, end of expression - lastFilterIndex = i + 1; - expression = exp.slice(0, i).trim(); - } - else { - pushFilter(); - } - } - else { - switch (c) { - case 0x22: - inDouble = true; - break; // " - case 0x27: - inSingle = true; - break; // ' - case 0x60: - inTemplateString = true; - break; // ` - case 0x28: - paren++; - break; // ( - case 0x29: - paren--; - break; // ) - case 0x5b: - square++; - break; // [ - case 0x5d: - square--; - break; // ] - case 0x7b: - curly++; - break; // { - case 0x7d: - curly--; - break; // } - } - if (c === 0x2f) { - // / - let j = i - 1; - let p; - // find first non-whitespace prev char - for (; j >= 0; j--) { - p = exp.charAt(j); - if (p !== ' ') - break; - } - if (!p || !validDivisionCharRE.test(p)) { - inRegex = true; - } - } - } - } - if (expression === undefined) { - expression = exp.slice(0, i).trim(); - } - else if (lastFilterIndex !== 0) { - pushFilter(); - } - function pushFilter() { - filters.push(exp.slice(lastFilterIndex, i).trim()); + const exp = node.content; + let inSingle = false; + let inDouble = false; + let inTemplateString = false; + let inRegex = false; + let curly = 0; + let square = 0; + let paren = 0; + let lastFilterIndex = 0; + let c, prev, i, expression, filters = []; + for (i = 0; i < exp.length; i++) { + prev = c; + c = exp.charCodeAt(i); + if (inSingle) { + if (c === 39 && prev !== 92) + inSingle = false; + } else if (inDouble) { + if (c === 34 && prev !== 92) + inDouble = false; + } else if (inTemplateString) { + if (c === 96 && prev !== 92) + inTemplateString = false; + } else if (inRegex) { + if (c === 47 && prev !== 92) + inRegex = false; + } else if (c === 124 && // pipe + exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) { + if (expression === void 0) { lastFilterIndex = i + 1; - } - if (filters.length) { - warnDeprecation("COMPILER_FILTER" /* COMPILER_FILTERS */, context, node.loc); - for (i = 0; i < filters.length; i++) { - expression = wrapFilter(expression, filters[i], context); + expression = exp.slice(0, i).trim(); + } else { + pushFilter(); + } + } else { + switch (c) { + case 34: + inDouble = true; + break; + case 39: + inSingle = true; + break; + case 96: + inTemplateString = true; + break; + case 40: + paren++; + break; + case 41: + paren--; + break; + case 91: + square++; + break; + case 93: + square--; + break; + case 123: + curly++; + break; + case 125: + curly--; + break; + } + if (c === 47) { + let j = i - 1; + let p; + for (; j >= 0; j--) { + p = exp.charAt(j); + if (p !== " ") + break; } - node.content = expression; + if (!p || !validDivisionCharRE.test(p)) { + inRegex = true; + } + } } + } + if (expression === void 0) { + expression = exp.slice(0, i).trim(); + } else if (lastFilterIndex !== 0) { + pushFilter(); + } + function pushFilter() { + filters.push(exp.slice(lastFilterIndex, i).trim()); + lastFilterIndex = i + 1; + } + if (filters.length) { + warnDeprecation( + "COMPILER_FILTERS", + context, + node.loc + ); + for (i = 0; i < filters.length; i++) { + expression = wrapFilter(expression, filters[i], context); + } + node.content = expression; + } } function wrapFilter(exp, filter, context) { - context.helper(RESOLVE_FILTER); - const i = filter.indexOf('('); - if (i < 0) { - context.filters.add(filter); - return `${toValidAssetId(filter, 'filter')}(${exp})`; - } - else { - const name = filter.slice(0, i); - const args = filter.slice(i + 1); - context.filters.add(name); - return `${toValidAssetId(name, 'filter')}(${exp}${args !== ')' ? ',' + args : args}`; - } + context.helper(RESOLVE_FILTER); + const i = filter.indexOf("("); + if (i < 0) { + context.filters.add(filter); + return `${toValidAssetId(filter, "filter")}(${exp})`; + } else { + const name = filter.slice(0, i); + const args = filter.slice(i + 1); + context.filters.add(name); + return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`; + } } - const seen$1 = new WeakSet(); + const seen = /* @__PURE__ */ new WeakSet(); const transformMemo = (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const dir = findDir(node, 'memo'); - if (!dir || seen$1.has(node)) { - return; - } - seen$1.add(node); - return () => { - const codegenNode = node.codegenNode || - context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) { - // non-component sub tree should be turned into a block - if (node.tagType !== 1 /* COMPONENT */) { - makeBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(undefined, codegenNode), - `_cache`, - String(context.cached++) - ]); - } - }; + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached++) + ]); + } + }; + } }; function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...([transformFilter] ), - ...([transformExpression] - ), - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; - } - // we name it `baseCompile` so that higher order compilers like - // @vue/compiler-dom can export `compile` while re-exporting everything else. - function baseCompile(template, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === 'module'; - /* istanbul ignore if */ + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[transformFilter] , + ...[transformExpression] , + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], { - if (options.prefixIdentifiers === true) { - onError(createCompilerError(46 /* X_PREFIX_ID_NOT_SUPPORTED */)); - } - else if (isModuleMode) { - onError(createCompilerError(47 /* X_MODULE_MODE_NOT_SUPPORTED */)); - } + on: transformOn$1, + bind: transformBind, + model: transformModel$1 } - const prefixIdentifiers = !true ; - if (options.cacheHandlers) { - onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */)); - } - const ast = isString(template) ? baseParse(template, options) : template; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); - transform(ast, extend({}, options, { - prefixIdentifiers, - nodeTransforms: [ - ...nodeTransforms, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: extend({}, directiveTransforms, options.directiveTransforms || {} // user transforms - ) - })); - return generate(ast, extend({}, options, { - prefixIdentifiers - })); + ]; } + function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); + } + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); + } + + const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" + }; const noopDirectiveTransform = () => ({ props: [] }); @@ -5025,474 +5793,493 @@ var VueCompilerDOM = (function (exports) { const TRANSITION = Symbol(`Transition` ); const TRANSITION_GROUP = Symbol(`TransitionGroup` ); registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` }); - /* eslint-disable no-restricted-globals */ let decoder; function decodeHtmlBrowser(raw, asAttr = false) { - if (!decoder) { - decoder = document.createElement('div'); - } - if (asAttr) { - decoder.innerHTML = `<div foo="${raw.replace(/"/g, '"')}">`; - return decoder.children[0].getAttribute('foo'); - } - else { - decoder.innerHTML = raw; - return decoder.textContent; - } + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } } - const isRawTextContainer = /*#__PURE__*/ makeMap('style,iframe,script,noscript', true); const parserOptions = { - isVoidTag, - isNativeTag: tag => isHTMLTag(tag) || isSVGTag(tag), - isPreTag: tag => tag === 'pre', - decodeEntities: decodeHtmlBrowser , - isBuiltInComponent: (tag) => { - if (isBuiltInType(tag, `Transition`)) { - return TRANSITION; - } - else if (isBuiltInType(tag, `TransitionGroup`)) { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent) { - let ns = parent ? parent.ns : 0 /* HTML */; - if (parent && ns === 2 /* MATH_ML */) { - if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ && - a.name === 'encoding' && - a.value != null && - (a.value.content === 'text/html' || - a.value.content === 'application/xhtml+xml'))) { - ns = 0 /* HTML */; - } - } - else if (/^m(?:[ions]|text)$/.test(parent.tag) && - tag !== 'mglyph' && - tag !== 'malignmark') { - ns = 0 /* HTML */; - } - } - else if (parent && ns === 1 /* SVG */) { - if (parent.tag === 'foreignObject' || - parent.tag === 'desc' || - parent.tag === 'title') { - ns = 0 /* HTML */; - } - } - if (ns === 0 /* HTML */) { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (tag === 'math') { - return 2 /* MATH_ML */; - } - } - return ns; - }, - // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments - getTextMode({ tag, ns }) { - if (ns === 0 /* HTML */) { - if (tag === 'textarea' || tag === 'title') { - return 1 /* RCDATA */; - } - if (isRawTextContainer(tag)) { - return 2 /* RAWTEXT */; - } - } - return 0 /* DATA */; + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } }; - // Parse inline CSS strings for static style attributes into an object. - // This is a NodeTransform since it works on the static `style` attribute and - // converts it into a dynamic equivalent: - // style="color: red" -> :style='{ "color": "red" }' - // It is then processed by `transformElement` and included in the generated - // props. - const transformStyle = node => { - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((p, i) => { - if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) { - // replace p with an expression node - node.props[i] = { - type: 7 /* DIRECTIVE */, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } + const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } }; const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */); + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); }; function createDOMCompilerError(code, loc) { - return createCompilerError(code, loc, DOMErrorMessages ); + return createCompilerError( + code, + loc, + DOMErrorMessages + ); } + const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" + }; const DOMErrorMessages = { - [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`, - [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`, - [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`, - [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`, - [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`, - [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`, - [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`, - [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` }; const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`innerHTML`, true, loc), exp || createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; }; const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`textContent`, true), exp - ? getConstantType(exp, context) > 0 - ? exp - : createCallExpression(context.helperString(TO_DISPLAY_STRING), [exp], loc) - : createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; }; - const transformModel$1 = (dir, node, context) => { - const baseResult = transformModel(dir, node, context); - // base transform has errors OR component v-model (only need props) - if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) { - return baseResult; - } - if (dir.arg) { - context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc)); - } - function checkDuplicatedValue() { - const value = findProp(node, 'value'); - if (value) { - context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === 'input' || - tag === 'textarea' || - tag === 'select' || - isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === 'input' || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7 /* DIRECTIVE */) { - // :type="foo" - directiveToUse = V_MODEL_DYNAMIC; - } - else if (type.value) { - switch (type.value.content) { - case 'radio': - directiveToUse = V_MODEL_RADIO; - break; - case 'checkbox': - directiveToUse = V_MODEL_CHECKBOX; - break; - case 'file': - isInvalidType = true; - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - // text type - checkDuplicatedValue(); - break; - } - } - } - else if (hasDynamicKeyVBind(node)) { - // element has bindings with dynamic keys, which can possibly contain - // "type". - directiveToUse = V_MODEL_DYNAMIC; - } - else { - // text type - checkDuplicatedValue(); - } - } - else if (tag === 'select') { - directiveToUse = V_MODEL_SELECT; - } - else { - // textarea - checkDuplicatedValue(); - } - // inject runtime directive - // by returning the helper symbol via needRuntime - // the import will replaced a resolveDirective call. - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - // native vmodel doesn't need the `modelValue` props since they are also - // passed to the runtime as `binding.value`. removing it reduces code size. - baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === 'modelValue')); + const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; }; - const isEventOptionModifier = /*#__PURE__*/ makeMap(`passive,once,capture`); - const isNonKeyModifier = /*#__PURE__*/ makeMap( - // event propagation management -`stop,prevent,self,` + - // system modifiers + exact - `ctrl,shift,alt,meta,exact,` + - // mouse - `middle`); - // left & right could be mouse or key modifiers based on event type - const maybeKeyModifier = /*#__PURE__*/ makeMap('left,right'); - const isKeyboardEvent = /*#__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`, true); + const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); + const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` + ); + const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); + const isKeyboardEvent = /* @__PURE__ */ makeMap( + `onkeyup,onkeydown,onkeypress`, + true + ); const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i]; - if (modifier === 'native' && - checkCompatEnabled("COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */, context, loc)) { - eventOptionModifiers.push(modifier); + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + if (modifier === "native" && checkCompatEnabled( + "COMPILER_V_ON_NATIVE", + context, + loc + )) { + eventOptionModifiers.push(modifier); + } else if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content)) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); } - else if (isEventOptionModifier(modifier)) { - // eventOptionModifiers: modifiers for addEventListener() options, - // e.g. .passive & .capture - eventOptionModifiers.push(modifier); - } - else { - // runtimeModifiers: modifiers that needs runtime guards - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content)) { - keyModifiers.push(modifier); - } - else { - nonKeyModifiers.push(modifier); - } - } - else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } - else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } - else { - keyModifiers.push(modifier); - } - } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); } + } } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; }; const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === 'onclick'; - return isStaticClick - ? createSimpleExpression(event, true) - : key.type !== 4 /* SIMPLE_EXPRESSION */ - ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) - : key; + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; }; - const transformOn$1 = (dir, node, context) => { - return transformOn(dir, node, context, baseResult => { - const { modifiers } = dir; - if (!modifiers.length) - return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - // normalize click.right and click.middle since they don't actually fire - if (nonKeyModifiers.includes('right')) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes('middle')) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && - // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(''); - key = isStaticExp(key) - ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) - : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); + const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) + return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); }; const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc)); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; }; const transformTransition = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - // warn multiple transition children - if (hasMultipleChildren(node)) { - context.onError(createDOMCompilerError(59 /* X_TRANSITION_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - // check if it's s single child w/ v-show - // if yes, inject "persisted: true" to the transition props - const child = node.children[0]; - if (child.type === 1 /* ELEMENT */) { - for (const p of child.props) { - if (p.type === 7 /* DIRECTIVE */ && p.name === 'show') { - node.props.push({ - type: 6 /* ATTRIBUTE */, - name: 'persisted', - value: undefined, - loc: node.loc - }); - } - } - } - }; + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; } + } }; function hasMultipleChildren(node) { - // #1352 filter out potential comment nodes. - const children = (node.children = node.children.filter(c => c.type !== 3 /* COMMENT */ && - !(c.type === 2 /* TEXT */ && !c.content.trim()))); - const child = children[0]; - return (children.length !== 1 || - child.type === 11 /* FOR */ || - (child.type === 9 /* IF */ && child.branches.some(hasMultipleChildren))); + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); } const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - (node.tag === 'script' || node.tag === 'style')) { - context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc)); - context.removeNode(); - } + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } }; const DOMNodeTransforms = [ - transformStyle, - ...([transformTransition] ) + transformStyle, + ...[transformTransition] ]; const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel$1, - on: transformOn$1, - show: transformShow + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow }; - function compile(template, options = {}) { - return baseCompile(template, extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...(options.nodeTransforms || []) - ], - directiveTransforms: extend({}, DOMDirectiveTransforms, options.directiveTransforms || {}), - transformHoist: null - })); + function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); } function parse(template, options = {}) { - return baseParse(template, extend({}, parserOptions, options)); + return baseParse(template, extend({}, parserOptions, options)); } exports.BASE_TRANSITION = BASE_TRANSITION; + exports.BindingTypes = BindingTypes; exports.CAMELIZE = CAMELIZE; exports.CAPITALIZE = CAPITALIZE; exports.CREATE_BLOCK = CREATE_BLOCK; @@ -5503,8 +6290,14 @@ var VueCompilerDOM = (function (exports) { exports.CREATE_STATIC = CREATE_STATIC; exports.CREATE_TEXT = CREATE_TEXT; exports.CREATE_VNODE = CREATE_VNODE; + exports.CompilerDeprecationTypes = CompilerDeprecationTypes; + exports.ConstantTypes = ConstantTypes; exports.DOMDirectiveTransforms = DOMDirectiveTransforms; + exports.DOMErrorCodes = DOMErrorCodes; + exports.DOMErrorMessages = DOMErrorMessages; exports.DOMNodeTransforms = DOMNodeTransforms; + exports.ElementTypes = ElementTypes; + exports.ErrorCodes = ErrorCodes; exports.FRAGMENT = FRAGMENT; exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS; exports.IS_MEMO_SAME = IS_MEMO_SAME; @@ -5514,6 +6307,8 @@ var VueCompilerDOM = (function (exports) { exports.NORMALIZE_CLASS = NORMALIZE_CLASS; exports.NORMALIZE_PROPS = NORMALIZE_PROPS; exports.NORMALIZE_STYLE = NORMALIZE_STYLE; + exports.Namespaces = Namespaces; + exports.NodeTypes = NodeTypes; exports.OPEN_BLOCK = OPEN_BLOCK; exports.POP_SCOPE_ID = POP_SCOPE_ID; exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID; @@ -5531,6 +6326,7 @@ var VueCompilerDOM = (function (exports) { exports.TO_HANDLER_KEY = TO_HANDLER_KEY; exports.TRANSITION = TRANSITION; exports.TRANSITION_GROUP = TRANSITION_GROUP; + exports.TS_NODE_TYPES = TS_NODE_TYPES; exports.UNREF = UNREF; exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX; exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC; @@ -5553,6 +6349,7 @@ var VueCompilerDOM = (function (exports) { exports.buildSlots = buildSlots; exports.checkCompatEnabled = checkCompatEnabled; exports.compile = compile; + exports.convertToBlock = convertToBlock; exports.createArrayExpression = createArrayExpression; exports.createAssignmentExpression = createAssignmentExpression; exports.createBlockStatement = createBlockStatement; @@ -5576,14 +6373,15 @@ var VueCompilerDOM = (function (exports) { exports.createTemplateLiteral = createTemplateLiteral; exports.createTransformContext = createTransformContext; exports.createVNodeCall = createVNodeCall; + exports.errorMessages = errorMessages; exports.extractIdentifiers = extractIdentifiers; exports.findDir = findDir; exports.findProp = findProp; + exports.forAliasRE = forAliasRE; exports.generate = generate; exports.generateCodeFrame = generateCodeFrame; exports.getBaseTransformPreset = getBaseTransformPreset; exports.getConstantType = getConstantType; - exports.getInnerRange = getInnerRange; exports.getMemoedVNodeCall = getMemoedVNodeCall; exports.getVNodeBlockHelper = getVNodeBlockHelper; exports.getVNodeHelper = getVNodeHelper; @@ -5591,10 +6389,10 @@ var VueCompilerDOM = (function (exports) { exports.hasScopeRef = hasScopeRef; exports.helperNameMap = helperNameMap; exports.injectProp = injectProp; - exports.isBuiltInType = isBuiltInType; exports.isCoreComponent = isCoreComponent; exports.isFunctionType = isFunctionType; exports.isInDestructureAssignment = isInDestructureAssignment; + exports.isInNewExpression = isInNewExpression; exports.isMemberExpression = isMemberExpression; exports.isMemberExpressionBrowser = isMemberExpressionBrowser; exports.isMemberExpressionNode = isMemberExpressionNode; @@ -5606,10 +6404,9 @@ var VueCompilerDOM = (function (exports) { exports.isStaticProperty = isStaticProperty; exports.isStaticPropertyKey = isStaticPropertyKey; exports.isTemplateNode = isTemplateNode; - exports.isText = isText; + exports.isText = isText$1; exports.isVSlot = isVSlot; exports.locStub = locStub; - exports.makeBlock = makeBlock; exports.noopDirectiveTransform = noopDirectiveTransform; exports.parse = parse; exports.parserOptions = parserOptions; @@ -5619,6 +6416,7 @@ var VueCompilerDOM = (function (exports) { exports.processSlotOutlet = processSlotOutlet; exports.registerRuntimeHelpers = registerRuntimeHelpers; exports.resolveComponentType = resolveComponentType; + exports.stringifyExpression = stringifyExpression; exports.toValidAssetId = toValidAssetId; exports.trackSlotScopes = trackSlotScopes; exports.trackVForSlotScopes = trackVForSlotScopes; @@ -5626,17 +6424,16 @@ var VueCompilerDOM = (function (exports) { exports.transformBind = transformBind; exports.transformElement = transformElement; exports.transformExpression = transformExpression; - exports.transformModel = transformModel; - exports.transformOn = transformOn; + exports.transformModel = transformModel$1; + exports.transformOn = transformOn$1; exports.transformStyle = transformStyle; exports.traverseNode = traverseNode; + exports.unwrapTSNode = unwrapTSNode; exports.walkBlockDeclarations = walkBlockDeclarations; exports.walkFunctionParams = walkFunctionParams; exports.walkIdentifiers = walkIdentifiers; exports.warnDeprecation = warnDeprecation; - Object.defineProperty(exports, '__esModule', { value: true }); - return exports; -}({})); +})({}); diff --git a/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js b/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js index d86ba078..2f344aa0 100644 --- a/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js +++ b/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js @@ -1 +1,6 @@ -var VueCompilerDOM=function(e){"use strict";function t(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=/;(?![^(]*\))/g,o=/:(.+)/;const r=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),s=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),i=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),c={},l=()=>{},a=()=>!1,p=/^on[^a-z]/,u=e=>p.test(e),f=Object.assign,d=Array.isArray,h=e=>"string"==typeof e,m=e=>"symbol"==typeof e,g=e=>null!==e&&"object"==typeof e,y=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),v=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),S=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},b=/-(\w)/g,E=S((e=>e.replace(b,((e,t)=>t?t.toUpperCase():"")))),N=/\B([A-Z])/g,_=S((e=>e.replace(N,"-$1").toLowerCase())),x=S((e=>e.charAt(0).toUpperCase()+e.slice(1))),T=S((e=>e?`on${x(e)}`:""));function k(e){throw e}function O(e){}function C(e,t,n,o){const r=new SyntaxError(String(e));return r.code=e,r.loc=t,r}const I=Symbol(""),M=Symbol(""),R=Symbol(""),P=Symbol(""),w=Symbol(""),$=Symbol(""),L=Symbol(""),V=Symbol(""),A=Symbol(""),D=Symbol(""),B=Symbol(""),F=Symbol(""),j=Symbol(""),H=Symbol(""),W=Symbol(""),K=Symbol(""),U=Symbol(""),J=Symbol(""),G=Symbol(""),z=Symbol(""),Y=Symbol(""),q=Symbol(""),Z=Symbol(""),X=Symbol(""),Q=Symbol(""),ee=Symbol(""),te=Symbol(""),ne=Symbol(""),oe=Symbol(""),re=Symbol(""),se=Symbol(""),ie=Symbol(""),ce=Symbol(""),le=Symbol(""),ae=Symbol(""),pe=Symbol(""),ue=Symbol(""),fe=Symbol(""),de=Symbol(""),he={[I]:"Fragment",[M]:"Teleport",[R]:"Suspense",[P]:"KeepAlive",[w]:"BaseTransition",[$]:"openBlock",[L]:"createBlock",[V]:"createElementBlock",[A]:"createVNode",[D]:"createElementVNode",[B]:"createCommentVNode",[F]:"createTextVNode",[j]:"createStaticVNode",[H]:"resolveComponent",[W]:"resolveDynamicComponent",[K]:"resolveDirective",[U]:"resolveFilter",[J]:"withDirectives",[G]:"renderList",[z]:"renderSlot",[Y]:"createSlots",[q]:"toDisplayString",[Z]:"mergeProps",[X]:"normalizeClass",[Q]:"normalizeStyle",[ee]:"normalizeProps",[te]:"guardReactiveProps",[ne]:"toHandlers",[oe]:"camelize",[re]:"capitalize",[se]:"toHandlerKey",[ie]:"setBlockTracking",[ce]:"pushScopeId",[le]:"popScopeId",[ae]:"withCtx",[pe]:"unref",[ue]:"isRef",[fe]:"withMemo",[de]:"isMemoSame"};function me(e){Object.getOwnPropertySymbols(e).forEach((t=>{he[t]=e[t]}))}const ge={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function ye(e,t=ge){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}function ve(e,t,n,o,r,s,i,c=!1,l=!1,a=!1,p=ge){return e&&(c?(e.helper($),e.helper(Xe(e.inSSR,a))):e.helper(Ze(e.inSSR,a)),i&&e.helper(J)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:c,disableTracking:l,isComponent:a,loc:p}}function Se(e,t=ge){return{type:17,loc:t,elements:e}}function be(e,t=ge){return{type:15,loc:t,properties:e}}function Ee(e,t){return{type:16,loc:ge,key:h(e)?Ne(e,!0):e,value:t}}function Ne(e,t=!1,n=ge,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function _e(e,t=ge){return{type:8,loc:t,children:e}}function xe(e,t=[],n=ge){return{type:14,loc:n,callee:e,arguments:t}}function Te(e,t,n=!1,o=!1,r=ge){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function ke(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:ge}}function Oe(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:ge}}function Ce(e){return{type:21,body:e,loc:ge}}const Ie=e=>4===e.type&&e.isStatic,Me=(e,t)=>e===t||e===_(t);function Re(e){return Me(e,"Teleport")?M:Me(e,"Suspense")?R:Me(e,"KeepAlive")?P:Me(e,"BaseTransition")?w:void 0}const Pe=/^\d|[^\$\w]/,we=e=>!Pe.test(e),$e=/[A-Za-z_$\xA0-\uFFFF]/,Le=/[\.\?\w$\xA0-\uFFFF]/,Ve=/\s+[.[]\s*|\s*[.[]\s+/g,Ae=e=>{e=e.trim().replace(Ve,(e=>e.trim()));let t=0,n=[],o=0,r=0,s=null;for(let i=0;i<e.length;i++){const c=e.charAt(i);switch(t){case 0:if("["===c)n.push(t),t=1,o++;else if("("===c)n.push(t),t=2,r++;else if(!(0===i?$e:Le).test(c))return!1;break;case 1:"'"===c||'"'===c||"`"===c?(n.push(t),t=3,s=c):"["===c?o++:"]"===c&&(--o||(t=n.pop()));break;case 2:if("'"===c||'"'===c||"`"===c)n.push(t),t=3,s=c;else if("("===c)r++;else if(")"===c){if(i===e.length-1)return!1;--r||(t=n.pop())}break;case 3:c===s&&(t=n.pop(),s=null)}}return!o&&!r},De=l,Be=Ae;function Fe(e,t,n){const o={source:e.source.slice(t,t+n),start:je(e.start,e.source,t),end:e.end};return null!=n&&(o.end=je(e.start,e.source,t+n)),o}function je(e,t,n=t.length){return He(f({},e),t,n)}function He(e,t,n=t.length){let o=0,r=-1;for(let s=0;s<n;s++)10===t.charCodeAt(s)&&(o++,r=s);return e.offset+=n,e.line+=o,e.column=-1===r?e.column+n:n-r,e}function We(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(7===r.type&&(n||r.exp)&&(h(t)?r.name===t:t.test(r.name)))return r}}function Ke(e,t,n=!1,o=!1){for(let r=0;r<e.props.length;r++){const s=e.props[r];if(6===s.type){if(n)continue;if(s.name===t&&(s.value||o))return s}else if("bind"===s.name&&(s.exp||o)&&Ue(s.arg,t))return s}}function Ue(e,t){return!(!e||!Ie(e)||e.content!==t)}function Je(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))}function Ge(e){return 5===e.type||2===e.type}function ze(e){return 7===e.type&&"slot"===e.name}function Ye(e){return 1===e.type&&3===e.tagType}function qe(e){return 1===e.type&&2===e.tagType}function Ze(e,t){return e||t?A:D}function Xe(e,t){return e||t?L:V}const Qe=new Set([ee,te]);function et(e,t=[]){if(e&&!h(e)&&14===e.type){const n=e.callee;if(!h(n)&&Qe.has(n))return et(e.arguments[0],t.concat(e))}return[e,t]}function tt(e,t,n){let o,r,s=13===e.type?e.props:e.arguments[2],i=[];if(s&&!h(s)&&14===s.type){const e=et(s);s=e[0],i=e[1],r=i[i.length-1]}if(null==s||h(s))o=be([t]);else if(14===s.type){const e=s.arguments[0];h(e)||15!==e.type?s.callee===ne?o=xe(n.helper(Z),[be([t]),s]):s.arguments.unshift(be([t])):e.properties.unshift(t),!o&&(o=s)}else if(15===s.type){let e=!1;if(4===t.key.type){const n=t.key.content;e=s.properties.some((e=>4===e.key.type&&e.key.content===n))}e||s.properties.unshift(t),o=s}else o=xe(n.helper(Z),[be([t]),s]),r&&r.callee===te&&(r=i[i.length-2]);13===e.type?r?r.arguments[0]=o:e.props=o:r?r.arguments[0]=o:e.arguments[2]=o}function nt(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function ot(e){return 14===e.type&&e.callee===fe?e.arguments[1].returns:e}function rt(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Ze(o,e.isComponent)),t($),t(Xe(o,e.isComponent)))}const st={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_PROP:{message:".prop modifier for v-bind has been removed and no longer necessary. Vue 3 will automatically set a binding as DOM property when appropriate."},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTER:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function it(e,t){const n=t.options?t.options.compatConfig:t.compatConfig,o=n&&n[e];return"MODE"===e?o||3:o}function ct(e,t){const n=it("MODE",t),o=it(e,t);return 3===n?!0===o:!1!==o}function lt(e,t,n,...o){return ct(e,t)}const at=/&(gt|lt|amp|apos|quot);/g,pt={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},ut={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:a,isPreTag:a,isCustomElement:a,decodeEntities:e=>e.replace(at,((e,t)=>pt[t])),onError:k,onWarn:O,comments:!1};function ft(e,t={}){const n=function(e,t){const n=f({},ut);let o;for(o in t)n[o]=void 0===t[o]?ut[o]:t[o];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),o=kt(n);return ye(dt(n,0,[]),Ot(n,o))}function dt(e,t,n){const o=Ct(n),r=o?o.ns:0,s=[];for(;!wt(e,t,n);){const i=e.source;let c;if(0===t||1===t)if(!e.inVPre&&It(i,e.options.delimiters[0]))c=_t(e,t);else if(0===t&&"<"===i[0])if(1===i.length);else if("!"===i[1])c=It(i,"\x3c!--")?gt(e):It(i,"<!DOCTYPE")?yt(e):It(i,"<![CDATA[")&&0!==r?mt(e,n):yt(e);else if("/"===i[1])if(2===i.length);else{if(">"===i[2]){Mt(e,3);continue}if(/[a-z]/i.test(i[2])){bt(e,1,o);continue}c=yt(e)}else/[a-z]/i.test(i[1])?(c=vt(e,n),ct("COMPILER_NATIVE_TEMPLATE",e)&&c&&"template"===c.tag&&!c.props.some((e=>7===e.type&&St(e.name)))&&(c=c.children)):"?"===i[1]&&(c=yt(e));if(c||(c=xt(e,t)),d(c))for(let e=0;e<c.length;e++)ht(s,c[e]);else ht(s,c)}let i=!1;if(2!==t&&1!==t){const t="preserve"!==e.options.whitespace;for(let n=0;n<s.length;n++){const o=s[n];if(e.inPre||2!==o.type)3!==o.type||e.options.comments||(i=!0,s[n]=null);else if(/[^\t\r\n\f ]/.test(o.content))t&&(o.content=o.content.replace(/[\t\r\n\f ]+/g," "));else{const e=s[n-1],r=s[n+1];!e||!r||t&&(3===e.type||3===r.type||1===e.type&&1===r.type&&/[\r\n]/.test(o.content))?(i=!0,s[n]=null):o.content=" "}}if(e.inPre&&o&&e.options.isPreTag(o.tag)){const e=s[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}}return i?s.filter(Boolean):s}function ht(e,t){if(2===t.type){const n=Ct(e);if(n&&2===n.type&&n.loc.end.offset===t.loc.start.offset)return n.content+=t.content,n.loc.end=t.loc.end,void(n.loc.source+=t.loc.source)}e.push(t)}function mt(e,t){Mt(e,9);const n=dt(e,3,t);return 0===e.source.length||Mt(e,3),n}function gt(e){const t=kt(e);let n;const o=/--(\!)?>/.exec(e.source);if(o){n=e.source.slice(4,o.index);const t=e.source.slice(0,o.index);let r=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",r));)Mt(e,s-r+1),r=s+1;Mt(e,o.index+o[0].length-r+1)}else n=e.source.slice(4),Mt(e,e.source.length);return{type:3,content:n,loc:Ot(e,t)}}function yt(e){const t=kt(e),n="?"===e.source[1]?1:2;let o;const r=e.source.indexOf(">");return-1===r?(o=e.source.slice(n),Mt(e,e.source.length)):(o=e.source.slice(n,r),Mt(e,r+1)),{type:3,content:o,loc:Ot(e,t)}}function vt(e,t){const n=e.inPre,o=e.inVPre,r=Ct(t),s=bt(e,0,r),i=e.inPre&&!n,c=e.inVPre&&!o;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),c&&(e.inVPre=!1),s;t.push(s);const l=e.options.getTextMode(s,r),a=dt(e,l,t);t.pop();{const t=s.props.find((e=>6===e.type&&"inline-template"===e.name));if(t&<("COMPILER_INLINE_TEMPLATE",e)){const n=Ot(e,s.loc.end);t.value={type:2,content:n.source,loc:n}}}if(s.children=a,$t(e.source,s.tag))bt(e,1,r);else if(0===e.source.length&&"script"===s.tag.toLowerCase()){const e=a[0];e&&It(e.loc.source,"\x3c!--")}return s.loc=Ot(e,s.loc.start),i&&(e.inPre=!1),c&&(e.inVPre=!1),s}const St=t("if,else,else-if,for,slot");function bt(e,t,n){const o=kt(e),r=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=r[1],i=e.options.getNamespace(s,n);Mt(e,r[0].length),Rt(e);const c=kt(e),l=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let a=Et(e,t);0===t&&!e.inVPre&&a.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,f(e,c),e.source=l,a=Et(e,t).filter((e=>"v-pre"!==e.name)));let p=!1;if(0===e.source.length||(p=It(e.source,"/>"),Mt(e,p?2:1)),1===t)return;let u=0;return e.inVPre||("slot"===s?u=2:"template"===s?a.some((e=>7===e.type&&St(e.name)))&&(u=3):function(e,t,n){const o=n.options;if(o.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||Re(e)||o.isBuiltInComponent&&o.isBuiltInComponent(e)||o.isNativeTag&&!o.isNativeTag(e))return!0;for(let r=0;r<t.length;r++){const e=t[r];if(6===e.type){if("is"===e.name&&e.value){if(e.value.content.startsWith("vue:"))return!0;if(lt("COMPILER_IS_ON_ELEMENT",n))return!0}}else{if("is"===e.name)return!0;if("bind"===e.name&&Ue(e.arg,"is")&<("COMPILER_IS_ON_ELEMENT",n))return!0}}}(s,a,e)&&(u=1)),{type:1,ns:i,tag:s,tagType:u,props:a,isSelfClosing:p,children:[],loc:Ot(e,o),codegenNode:void 0}}function Et(e,t){const n=[],o=new Set;for(;e.source.length>0&&!It(e.source,">")&&!It(e.source,"/>");){if(It(e.source,"/")){Mt(e,1),Rt(e);continue}const r=Nt(e,o);6===r.type&&r.value&&"class"===r.name&&(r.value.content=r.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(r),/^[^\t\r\n\f />]/.test(e.source),Rt(e)}return n}function Nt(e,t){const n=kt(e),o=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(o),t.add(o);{const e=/["'<]/g;let t;for(;t=e.exec(o););}let r;Mt(e,o.length),/^[\t\r\n\f ]*=/.test(e.source)&&(Rt(e),Mt(e,1),Rt(e),r=function(e){const t=kt(e);let n;const o=e.source[0],r='"'===o||"'"===o;if(r){Mt(e,1);const t=e.source.indexOf(o);-1===t?n=Tt(e,e.source.length,4):(n=Tt(e,t,4),Mt(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const o=/["'<=`]/g;let r;for(;r=o.exec(t[0]););n=Tt(e,t[0].length,4)}return{content:n,isQuoted:r,loc:Ot(e,t)}}(e));const s=Ot(e,n);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(o)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(o);let i,c=It(o,"."),l=t[1]||(c||It(o,":")?"bind":It(o,"@")?"on":"slot");if(t[2]){const r="slot"===l,s=o.lastIndexOf(t[2]),c=Ot(e,Pt(e,n,s),Pt(e,n,s+t[2].length+(r&&t[3]||"").length));let a=t[2],p=!0;a.startsWith("[")?(p=!1,a=a.endsWith("]")?a.slice(1,a.length-1):a.slice(1)):r&&(a+=t[3]||""),i={type:4,content:a,isStatic:p,constType:p?3:0,loc:c}}if(r&&r.isQuoted){const e=r.loc;e.start.offset++,e.start.column++,e.end=je(e.start,r.content),e.source=e.source.slice(1,-1)}const a=t[3]?t[3].slice(1).split("."):[];return c&&a.push("prop"),"bind"===l&&i&&a.includes("sync")&<("COMPILER_V_BIND_SYNC",e,0)&&(l="model",a.splice(a.indexOf("sync"),1)),{type:7,name:l,exp:r&&{type:4,content:r.content,isStatic:!1,constType:0,loc:r.loc},arg:i,modifiers:a,loc:s}}return!e.inVPre&&It(o,"v-"),{type:6,name:o,value:r&&{type:2,content:r.content,loc:r.loc},loc:s}}function _t(e,t){const[n,o]=e.options.delimiters,r=e.source.indexOf(o,n.length);if(-1===r)return;const s=kt(e);Mt(e,n.length);const i=kt(e),c=kt(e),l=r-n.length,a=e.source.slice(0,l),p=Tt(e,l,t),u=p.trim(),f=p.indexOf(u);f>0&&He(i,a,f);return He(c,a,l-(p.length-u.length-f)),Mt(e,o.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:u,loc:Ot(e,i,c)},loc:Ot(e,s)}}function xt(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let o=e.source.length;for(let s=0;s<n.length;s++){const t=e.source.indexOf(n[s],1);-1!==t&&o>t&&(o=t)}const r=kt(e);return{type:2,content:Tt(e,o,t),loc:Ot(e,r)}}function Tt(e,t,n){const o=e.source.slice(0,t);return Mt(e,t),2!==n&&3!==n&&o.includes("&")?e.options.decodeEntities(o,4===n):o}function kt(e){const{column:t,line:n,offset:o}=e;return{column:t,line:n,offset:o}}function Ot(e,t,n){return{start:t,end:n=n||kt(e),source:e.originalSource.slice(t.offset,n.offset)}}function Ct(e){return e[e.length-1]}function It(e,t){return e.startsWith(t)}function Mt(e,t){const{source:n}=e;He(e,n,t),e.source=n.slice(t)}function Rt(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&Mt(e,t[0].length)}function Pt(e,t,n){return je(t,e.originalSource.slice(t.offset,n),n)}function wt(e,t,n){const o=e.source;switch(t){case 0:if(It(o,"</"))for(let e=n.length-1;e>=0;--e)if($t(o,n[e].tag))return!0;break;case 1:case 2:{const e=Ct(n);if(e&&$t(o,e.tag))return!0;break}case 3:if(It(o,"]]>"))return!0}return!o}function $t(e,t){return It(e,"</")&&e.slice(2,2+t.length).toLowerCase()===t.toLowerCase()&&/[\t\r\n\f />]/.test(e[2+t.length]||">")}function Lt(e,t){At(e,t,Vt(e,e.children[0]))}function Vt(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!qe(t)}function At(e,t,n=!1){const{children:o}=e,r=o.length;let s=0;for(let i=0;i<o.length;i++){const e=o[i];if(1===e.type&&0===e.tagType){const o=n?0:Dt(e,t);if(o>0){if(o>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),s++;continue}}else{const n=e.codegenNode;if(13===n.type){const o=Wt(n);if((!o||512===o||1===o)&&jt(e,t)>=2){const o=Ht(e);o&&(n.props=t.hoist(o))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}else 12===e.type&&Dt(e.content,t)>=2&&(e.codegenNode=t.hoist(e.codegenNode),s++);if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,At(e,t),n&&t.scopes.vSlot--}else if(11===e.type)At(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)At(e.branches[n],t,1===e.branches[n].children.length)}s&&t.transformHoist&&t.transformHoist(o,t,e),s&&s===r&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&d(e.codegenNode.children)&&(e.codegenNode.children=t.hoist(Se(e.codegenNode.children)))}function Dt(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(Wt(r))return n.set(e,0),0;{let o=3;const s=jt(e,t);if(0===s)return n.set(e,0),0;s<o&&(o=s);for(let r=0;r<e.children.length;r++){const s=Dt(e.children[r],t);if(0===s)return n.set(e,0),0;s<o&&(o=s)}if(o>1)for(let r=0;r<e.props.length;r++){const s=e.props[r];if(7===s.type&&"bind"===s.name&&s.exp){const r=Dt(s.exp,t);if(0===r)return n.set(e,0),0;r<o&&(o=r)}}if(r.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper($),t.removeHelper(Xe(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(Ze(t.inSSR,r.isComponent))}return n.set(e,o),o}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return Dt(e.content,t);case 4:return e.constType;case 8:let s=3;for(let n=0;n<e.children.length;n++){const o=e.children[n];if(h(o)||m(o))continue;const r=Dt(o,t);if(0===r)return 0;r<s&&(s=r)}return s}}const Bt=new Set([X,Q,ee,te]);function Ft(e,t){if(14===e.type&&!h(e.callee)&&Bt.has(e.callee)){const n=e.arguments[0];if(4===n.type)return Dt(n,t);if(14===n.type)return Ft(n,t)}return 0}function jt(e,t){let n=3;const o=Ht(e);if(o&&15===o.type){const{properties:e}=o;for(let o=0;o<e.length;o++){const{key:r,value:s}=e[o],i=Dt(r,t);if(0===i)return i;let c;if(i<n&&(n=i),c=4===s.type?Dt(s,t):14===s.type?Ft(s,t):0,0===c)return c;c<n&&(n=c)}}return n}function Ht(e){const t=e.codegenNode;if(13===t.type)return t.props}function Wt(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function Kt(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:o=!1,cacheHandlers:r=!1,nodeTransforms:s=[],directiveTransforms:i={},transformHoist:a=null,isBuiltInComponent:p=l,isCustomElement:u=l,expressionPlugins:f=[],scopeId:d=null,slotted:m=!0,ssr:g=!1,inSSR:y=!1,ssrCssVars:v="",bindingMetadata:S=c,inline:b=!1,isTS:N=!1,onError:_=k,onWarn:T=O,compatConfig:C}){const I=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),M={selfName:I&&x(E(I[1])),prefixIdentifiers:n,hoistStatic:o,cacheHandlers:r,nodeTransforms:s,directiveTransforms:i,transformHoist:a,isBuiltInComponent:p,isCustomElement:u,expressionPlugins:f,scopeId:d,slotted:m,ssr:g,inSSR:y,ssrCssVars:v,bindingMetadata:S,inline:b,isTS:N,onError:_,onWarn:T,compatConfig:C,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new Map,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=M.helpers.get(e)||0;return M.helpers.set(e,t+1),e},removeHelper(e){const t=M.helpers.get(e);if(t){const n=t-1;n?M.helpers.set(e,n):M.helpers.delete(e)}},helperString:e=>`_${he[M.helper(e)]}`,replaceNode(e){M.parent.children[M.childIndex]=M.currentNode=e},removeNode(e){const t=e?M.parent.children.indexOf(e):M.currentNode?M.childIndex:-1;e&&e!==M.currentNode?M.childIndex>t&&(M.childIndex--,M.onNodeRemoved()):(M.currentNode=null,M.onNodeRemoved()),M.parent.children.splice(t,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){h(e)&&(e=Ne(e)),M.hoists.push(e);const t=Ne(`_hoisted_${M.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>Oe(M.cached++,e,t)};return M.filters=new Set,M}function Ut(e,t){const n=Kt(e,t);Jt(e,n),t.hoistStatic&&Lt(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(Vt(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&rt(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=ve(t,n(I),void 0,e.children,o+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=[...n.helpers.keys()],e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.filters=[...n.filters]}function Jt(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let s=0;s<n.length;s++){const r=n[s](e,t);if(r&&(d(r)?o.push(...r):o.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(B);break;case 5:t.ssr||t.helper(q);break;case 9:for(let n=0;n<e.branches.length;n++)Jt(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];h(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=o,Jt(r,t))}}(e,t)}t.currentNode=e;let r=o.length;for(;r--;)o[r]()}function Gt(e,t){const n=h(e)?t=>t===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(ze))return;const s=[];for(let i=0;i<r.length;i++){const c=r[i];if(7===c.type&&n(c.name)){r.splice(i,1),i--;const n=t(e,c,o);n&&s.push(n)}}return s}}}const zt="/*#__PURE__*/",Yt=e=>`${he[e]}: _${he[e]}`;function qt(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:c="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:p=!1,isTS:u=!1,inSSR:f=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:c,runtimeModuleName:l,ssrRuntimeModuleName:a,ssr:p,isTS:u,inSSR:f,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${he[e]}`,push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:c,newline:l,ssr:a}=n,p=e.helpers.length>0,u=!s&&"module"!==o;!function(e,t){const{push:n,newline:o,runtimeGlobalName:r}=t,s=r;if(e.helpers.length>0&&(n(`const _Vue = ${s}\n`),e.hoists.length)){n(`const { ${[A,D,B,F,j].filter((t=>e.helpers.includes(t))).map(Yt).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r<e.length;r++){const s=e[r];s&&(n(`const _hoisted_${r+1} = `),en(s,t),o())}t.pure=!1})(e.hoists,t),o(),n("return ")}(e,n);if(r(`function ${a?"ssrRender":"render"}(${(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),i(),u&&(r("with (_ctx) {"),i(),p&&(r(`const { ${e.helpers.map(Yt).join(", ")} } = _Vue`),r("\n"),l())),e.components.length&&(Zt(e.components,"component",n),(e.directives.length||e.temps>0)&&l()),e.directives.length&&(Zt(e.directives,"directive",n),e.temps>0&&l()),e.filters&&e.filters.length&&(l(),Zt(e.filters,"filter",n),l()),e.temps>0){r("let ");for(let t=0;t<e.temps;t++)r(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n"),l()),a||r("return "),e.codegenNode?en(e.codegenNode,n):r("null"),u&&(c(),r("}")),c(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Zt(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("filter"===t?U:"component"===t?H:K);for(let c=0;c<e.length;c++){let n=e[c];const l=n.endsWith("__self");l&&(n=n.slice(0,-6)),o(`const ${nt(n,t)} = ${i}(${JSON.stringify(n)}${l?", true":""})${s?"!":""}`),c<e.length-1&&r()}}function Xt(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Qt(e,t,n),n&&t.deindent(),t.push("]")}function Qt(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;i<e.length;i++){const c=e[i];h(c)?r(c):d(c)?Xt(c,t):en(c,t),i<e.length-1&&(n?(o&&r(","),s()):o&&r(", "))}}function en(e,t){if(h(e))t.push(e);else if(m(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:en(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),e)}(e,t);break;case 4:tn(e,t);break;case 5:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n(zt);n(`${o(q)}(`),en(e.content,t),n(")")}(e,t);break;case 8:nn(e,t);break;case 3:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n(zt);n(`${o(B)}(${JSON.stringify(e.content)})`,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:o,pure:r}=t,{tag:s,props:i,children:c,patchFlag:l,dynamicProps:a,directives:p,isBlock:u,disableTracking:f,isComponent:d}=e;p&&n(o(J)+"(");u&&n(`(${o($)}(${f?"true":""}), `);r&&n(zt);const h=u?Xe(t.inSSR,d):Ze(t.inSSR,d);n(o(h)+"(",e),Qt(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([s,i,c,l,a]),t),n(")"),u&&n(")");p&&(n(", "),en(p,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=h(e.callee)?e.callee:o(e.callee);r&&n(zt);n(s+"(",e),Qt(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const c=i.length>1||!1;n(c?"{":"{ "),c&&o();for(let l=0;l<i.length;l++){const{key:e,value:o}=i[l];on(e,t),n(": "),en(o,t),l<i.length-1&&(n(","),s())}c&&r(),n(c?"}":" }")}(e,t);break;case 17:!function(e,t){Xt(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:o,deindent:r}=t,{params:s,returns:i,body:c,newline:l,isSlot:a}=e;a&&n(`_${he[ae]}(`);n("(",e),d(s)?Qt(s,t):s&&en(s,t);n(") => "),(l||c)&&(n("{"),o());i?(l&&n("return "),d(i)?Xt(i,t):en(i,t)):c&&en(c,t);(l||c)&&(r(),n("}"));a&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:c,deindent:l,newline:a}=t;if(4===n.type){const e=!we(n.content);e&&i("("),tn(n,t),e&&i(")")}else i("("),en(n,t),i(")");s&&c(),t.indentLevel++,s||i(" "),i("? "),en(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const p=19===r.type;p||t.indentLevel++;en(r,t),p||t.indentLevel--;s&&l(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(ie)}(-1),`),i());n(`_cache[${e.index}] = `),en(e.value,t),e.isVNode&&(n(","),i(),n(`${o(ie)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:Qt(e.body,t,!0,!1)}}function tn(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,e)}function nn(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];h(o)?t.push(o):en(o,t)}}function on(e,t){const{push:n}=t;if(8===e.type)n("["),nn(e,t),n("]");else if(e.isStatic){n(we(e.content)?e.content:JSON.stringify(e.content),e)}else n(`[${e.content}]`,e)}function rn(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(const o of e.properties)rn("RestElement"===o.type?o.argument:o.value,t);break;case"ArrayPattern":e.elements.forEach((e=>{e&&rn(e,t)}));break;case"RestElement":rn(e.argument,t);break;case"AssignmentPattern":rn(e.left,t)}return t}const sn=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed;function cn(e,t,n=!1,o=!1,r=Object.create(t.identifiers)){return e}const ln=Gt(/^(if|else|else-if)$/,((e,t,n)=>an(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=un(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=un(t,i+e.branches.length-1,n)}}}))));function an(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){t.exp=Ne("true",!1,t.exp?t.exp.loc:e.loc)}if("if"===t.name){const r=pn(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){n.removeNode();const r=pn(e,t);i.branches.push(r);const s=o&&o(i,r,!1);Jt(r,n),s&&s(),n.currentNode=null}break}n.removeNode(i)}}}function pn(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!We(e,"for")?e.children:[e],userKey:Ke(e,"key"),isTemplateIf:n}}function un(e,t,n){return e.condition?ke(e.condition,fn(e,t,n),xe(n.helper(B),['""',"true"])):fn(e,t,n)}function fn(e,t,n){const{helper:o}=n,r=Ee("key",Ne(`${t}`,!1,ge,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return tt(e,r,n),e}{let t=64;return ve(n,o(I),be([r]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=ot(e);return 13===t.type&&rt(t,n),tt(t,r,n),e}}const dn=Gt("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return hn(e,t,n,(t=>{const s=xe(o(G),[t.source]),i=Ye(e),c=We(e,"memo"),l=Ke(e,"key"),a=l&&(6===l.type?Ne(l.value.content,!0):l.exp),p=l?Ee("key",a):null,u=4===t.source.type&&t.source.constType>0,f=u?64:l?128:256;return t.codegenNode=ve(n,o(I),void 0,s,f+"",void 0,void 0,!0,!u,!1,e.loc),()=>{let l;const{children:f}=t,d=1!==f.length||1!==f[0].type,h=qe(e)?e:i&&1===e.children.length&&qe(e.children[0])?e.children[0]:null;if(h?(l=h.codegenNode,i&&p&&tt(l,p,n)):d?l=ve(n,o(I),p?be([p]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(l=f[0].codegenNode,i&&p&&tt(l,p,n),l.isBlock!==!u&&(l.isBlock?(r($),r(Xe(n.inSSR,l.isComponent))):r(Ze(n.inSSR,l.isComponent))),l.isBlock=!u,l.isBlock?(o($),o(Xe(n.inSSR,l.isComponent))):o(Ze(n.inSSR,l.isComponent))),c){const e=Te(bn(t.parseResult,[Ne("_cached")]));e.body=Ce([_e(["const _memo = (",c.exp,")"]),_e(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(de)}(_cached, _memo)) return _cached`]),_e(["const _item = ",l]),Ne("_item.memo = _memo"),Ne("return _item")]),s.arguments.push(e,Ne("_cache"),Ne(String(n.cached++)))}else s.arguments.push(Te(bn(t.parseResult),l,!0))}}))}));function hn(e,t,n,o){if(!t.exp)return;const r=vn(t.exp);if(!r)return;const{scopes:s}=n,{source:i,value:c,key:l,index:a}=r,p={type:11,loc:t.loc,source:i,valueAlias:c,keyAlias:l,objectIndexAlias:a,parseResult:r,children:Ye(e)?e.children:[e]};n.replaceNode(p),s.vFor++;const u=o&&o(p);return()=>{s.vFor--,u&&u()}}const mn=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,gn=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,yn=/^\(|\)$/g;function vn(e,t){const n=e.loc,o=e.content,r=o.match(mn);if(!r)return;const[,s,i]=r,c={source:Sn(n,i.trim(),o.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let l=s.trim().replace(yn,"").trim();const a=s.indexOf(l),p=l.match(gn);if(p){l=l.replace(gn,"").trim();const e=p[1].trim();let t;if(e&&(t=o.indexOf(e,a+l.length),c.key=Sn(n,e,t)),p[2]){const r=p[2].trim();r&&(c.index=Sn(n,r,o.indexOf(r,c.key?t+e.length:a+l.length)))}}return l&&(c.value=Sn(n,l,a)),c}function Sn(e,t,n){return Ne(t,!1,Fe(e,n,t.length))}function bn({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Ne("_".repeat(t+1),!1)))}([e,t,n,...o])}const En=Ne("undefined",!1),Nn=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=We(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},_n=(e,t,n)=>Te(e,t,!1,!0,t.length?t[0].loc:n);function xn(e,t,n=_n){t.helper(ae);const{children:o,loc:r}=e,s=[],i=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const l=We(e,"slot",!0);if(l){const{arg:e,exp:t}=l;e&&!Ie(e)&&(c=!0),s.push(Ee(e||Ne("default",!0),n(t,o,r)))}let a=!1,p=!1;const u=[],f=new Set;for(let m=0;m<o.length;m++){const e=o[m];let r;if(!Ye(e)||!(r=We(e,"slot",!0))){3!==e.type&&u.push(e);continue}if(l)break;a=!0;const{children:d,loc:h}=e,{arg:g=Ne("default",!0),exp:y}=r;let v;Ie(g)?v=g?g.content:"default":c=!0;const S=n(y,d,h);let b,E,N;if(b=We(e,"if"))c=!0,i.push(ke(b.exp,Tn(g,S),En));else if(E=We(e,/^else(-if)?$/,!0)){let e,t=m;for(;t--&&(e=o[t],3===e.type););if(e&&Ye(e)&&We(e,"if")){o.splice(m,1),m--;let e=i[i.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=E.exp?ke(E.exp,Tn(g,S),En):Tn(g,S)}}else if(N=We(e,"for")){c=!0;const e=N.parseResult||vn(N.exp);e&&i.push(xe(t.helper(G),[e.source,Te(bn(e),Tn(g,S),!0)]))}else{if(v){if(f.has(v))continue;f.add(v),"default"===v&&(p=!0)}s.push(Ee(g,S))}}if(!l){const e=(e,o)=>{const s=n(e,o,r);return t.compatConfig&&(s.isNonScopedSlot=!0),Ee("default",s)};a?u.length&&u.some((e=>On(e)))&&(p||s.push(e(void 0,u))):s.push(e(void 0,o))}const d=c?2:kn(e.children)?3:1;let h=be(s.concat(Ee("_",Ne(d+"",!1))),r);return i.length&&(h=xe(t.helper(Y),[h,Se(i)])),{slots:h,hasDynamicSlots:c}}function Tn(e,t){return be([Ee("name",e),Ee("fn",t)])}function kn(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||kn(n.children))return!0;break;case 9:if(kn(n.branches))return!0;break;case 10:case 11:if(kn(n.children))return!0}}return!1}function On(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():On(e.content))}const Cn=new WeakMap,In=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?Mn(e,t):`"${n}"`;const i=g(s)&&s.callee===W;let c,l,a,p,u,f,d=0,h=i||s===M||s===R||!r&&("svg"===n||"foreignObject"===n);if(o.length>0){const n=Rn(e,t,void 0,r,i);c=n.props,d=n.patchFlag,u=n.dynamicPropNames;const o=n.directives;f=o&&o.length?Se(o.map((e=>$n(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===P&&(h=!0,d|=1024);if(r&&s!==M&&s!==P){const{slots:n,hasDynamicSlots:o}=xn(e,t);l=n,o&&(d|=1024)}else if(1===e.children.length&&s!==M){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Dt(n,t)&&(d|=1),l=r||2===o?n:e.children}else l=e.children}0!==d&&(a=String(d),u&&u.length&&(p=function(e){let t="[";for(let n=0,o=e.length;n<o;n++)t+=JSON.stringify(e[n]),n<o-1&&(t+=", ");return t+"]"}(u))),e.codegenNode=ve(t,s,c,l,a,p,f,!!h,!1,r,e.loc)};function Mn(e,t,n=!1){let{tag:o}=e;const r=Ln(o),s=Ke(e,"is");if(s)if(r||ct("COMPILER_IS_ON_ELEMENT",t)){const e=6===s.type?s.value&&Ne(s.value.content,!0):s.exp;if(e)return xe(t.helper(W),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=!r&&We(e,"is");if(i&&i.exp)return xe(t.helper(W),[i.exp]);const c=Re(o)||t.isBuiltInComponent(o);return c?(n||t.helper(c),c):(t.helper(H),t.components.add(o),nt(o,"component"))}function Rn(e,t,n=e.props,o,r,s=!1){const{tag:i,loc:c,children:l}=e;let a=[];const p=[],f=[],d=l.length>0;let h=!1,g=0,S=!1,b=!1,E=!1,N=!1,_=!1,x=!1;const T=[],k=({key:e,value:n})=>{if(Ie(e)){const s=e.content,i=u(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||y(s)||(N=!0),i&&y(s)&&(x=!0),20===n.type||(4===n.type||8===n.type)&&Dt(n,t)>0)return;"ref"===s?S=!0:"class"===s?b=!0:"style"===s?E=!0:"key"===s||T.includes(s)||T.push(s),!o||"class"!==s&&"style"!==s||T.includes(s)||T.push(s)}else _=!0};for(let u=0;u<n.length;u++){const o=n[u];if(6===o.type){const{loc:e,name:n,value:r}=o;let s=!0;if("ref"===n&&(S=!0,t.scopes.vFor>0&&a.push(Ee(Ne("ref_for",!0),Ne("true")))),"is"===n&&(Ln(i)||r&&r.content.startsWith("vue:")||ct("COMPILER_IS_ON_ELEMENT",t)))continue;a.push(Ee(Ne(n,!0,Fe(e,0,n.length)),Ne(r?r.content:"",s,r?r.loc:e)))}else{const{name:n,arg:r,exp:l,loc:u}=o,g="bind"===n,y="on"===n;if("slot"===n)continue;if("once"===n||"memo"===n)continue;if("is"===n||g&&Ue(r,"is")&&(Ln(i)||ct("COMPILER_IS_ON_ELEMENT",t)))continue;if(y&&s)continue;if((g&&Ue(r,"key")||y&&d&&Ue(r,"vue:before-update"))&&(h=!0),g&&Ue(r,"ref")&&t.scopes.vFor>0&&a.push(Ee(Ne("ref_for",!0),Ne("true"))),!r&&(g||y)){if(_=!0,l)if(a.length&&(p.push(be(Pn(a),c)),a=[]),g){if(ct("COMPILER_V_BIND_OBJECT_ORDER",t)){p.unshift(l);continue}p.push(l)}else p.push({type:14,loc:u,callee:t.helper(ne),arguments:[l]});continue}const S=t.directiveTransforms[n];if(S){const{props:n,needRuntime:r}=S(o,e,t);!s&&n.forEach(k),a.push(...n),r&&(f.push(o),m(r)&&Cn.set(o,r))}else v(n)||(f.push(o),d&&(h=!0))}}let O;if(p.length?(a.length&&p.push(be(Pn(a),c)),O=p.length>1?xe(t.helper(Z),p,c):p[0]):a.length&&(O=be(Pn(a),c)),_?g|=16:(b&&!o&&(g|=2),E&&!o&&(g|=4),T.length&&(g|=8),N&&(g|=32)),h||0!==g&&32!==g||!(S||x||f.length>0)||(g|=512),!t.inSSR&&O)switch(O.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t<O.properties.length;t++){const r=O.properties[t].key;Ie(r)?"class"===r.content?e=t:"style"===r.content&&(n=t):r.isHandlerKey||(o=!0)}const r=O.properties[e],s=O.properties[n];o?O=xe(t.helper(ee),[O]):(r&&!Ie(r.value)&&(r.value=xe(t.helper(X),[r.value])),s&&(E||4===s.value.type&&"["===s.value.content.trim()[0]||17===s.value.type)&&(s.value=xe(t.helper(Q),[s.value])));break;case 14:break;default:O=xe(t.helper(ee),[xe(t.helper(te),[O])])}return{props:O,directives:f,patchFlag:g,dynamicPropNames:T,shouldUseBlock:h}}function Pn(e){const t=new Map,n=[];for(let o=0;o<e.length;o++){const r=e[o];if(8===r.key.type||!r.key.isStatic){n.push(r);continue}const s=r.key.content,i=t.get(s);i?("style"===s||"class"===s||u(s))&&wn(i,r):(t.set(s,r),n.push(r))}return n}function wn(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=Se([e.value,t.value],e.loc)}function $n(e,t){const n=[],o=Cn.get(e);o?n.push(t.helperString(o)):(t.helper(K),t.directives.add(e.name),n.push(nt(e.name,"directive")));const{loc:r}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Ne("true",!1,r);n.push(be(e.modifiers.map((e=>Ee(e,t))),r))}return Se(n,e.loc)}function Ln(e){return"component"===e||"Component"===e}const Vn=(e,t)=>{if(qe(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=An(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let c=2;s&&(i[2]=s,c=3),n.length&&(i[3]=Te([],n,!1,!1,o),c=4),t.scopeId&&!t.slotted&&(c=5),i.splice(c),e.codegenNode=xe(t.helper(z),i,o)}};function An(e,t){let n,o='"default"';const r=[];for(let s=0;s<e.props.length;s++){const t=e.props[s];6===t.type?t.value&&("name"===t.name?o=JSON.stringify(t.value.content):(t.name=E(t.name),r.push(t))):"bind"===t.name&&Ue(t.arg,"name")?t.exp&&(o=t.exp):("bind"===t.name&&t.arg&&Ie(t.arg)&&(t.arg.content=E(t.arg.content)),r.push(t))}if(r.length>0){const{props:o,directives:s}=Rn(e,t,r,!1,!1);n=o}return{slotName:o,slotProps:n}}const Dn=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Bn=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let c;if(4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),c=Ne(T(E(e)),!0,i.loc)}else c=_e([`${n.helperString(se)}(`,i,")"]);else c=i,c.children.unshift(`${n.helperString(se)}(`),c.children.push(")");let l=e.exp;l&&!l.content.trim()&&(l=void 0);let a=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const e=Be(l.content),t=!(e||Dn.test(l.content)),n=l.content.includes(";");(t||a&&e)&&(l=_e([`${t?"$event":"(...args)"} => ${n?"{":"("}`,l,n?"}":")"]))}let p={props:[Ee(c,l||Ne("() => {}",!1,r))]};return o&&(p=o(p)),a&&(p.props[0].value=n.cache(p.props[0].value)),p.props.forEach((e=>e.key.isHandlerKey=!0)),p},Fn=(e,t,n)=>{const{exp:o,modifiers:r,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),r.includes("camel")&&(4===i.type?i.content=i.isStatic?E(i.content):`${n.helperString(oe)}(${i.content})`:(i.children.unshift(`${n.helperString(oe)}(`),i.children.push(")"))),n.inSSR||(r.includes("prop")&&jn(i,"."),r.includes("attr")&&jn(i,"^")),!o||4===o.type&&!o.content.trim()?{props:[Ee(i,Ne("",!0,s))]}:{props:[Ee(i,o)]}},jn=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Hn=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e<n.length;e++){const t=n[e];if(Ge(t)){r=!0;for(let r=e+1;r<n.length;r++){const s=n[r];if(!Ge(s)){o=void 0;break}o||(o=n[e]=_e([t],t.loc)),o.children.push(" + ",s),n.splice(r,1),r--}}}if(r&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e<n.length;e++){const o=n[e];if(Ge(o)||8===o.type){const r=[];2===o.type&&" "===o.content||r.push(o),t.ssr||0!==Dt(o,t)||r.push("1"),n[e]={type:12,content:o,loc:o.loc,codegenNode:xe(t.helper(F),r)}}}}},Wn=new WeakSet,Kn=(e,t)=>{if(1===e.type&&We(e,"once",!0)){if(Wn.has(e)||t.inVOnce)return;return Wn.add(e),t.inVOnce=!0,t.helper(ie),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},Un=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return Jn();const s=o.loc.source,i=4===o.type?o.content:s;if(!i.trim()||!Be(i))return Jn();const c=r||Ne("modelValue",!0),l=r?Ie(r)?`onUpdate:${r.content}`:_e(['"onUpdate:" + ',r]):"onUpdate:modelValue";let a;a=_e([`${n.isTS?"($event: any)":"$event"} => ((`,o,") = $event)"]);const p=[Ee(c,e.exp),Ee(l,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(we(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?Ie(r)?`${r.content}Modifiers`:_e([r,' + "Modifiers"']):"modelModifiers";p.push(Ee(n,Ne(`{ ${t} }`,!1,e.loc,2)))}return Jn(p)};function Jn(e=[]){return{props:e}}const Gn=/[\w).+\-_$\]]/,zn=(e,t)=>{ct("COMPILER_FILTER",t)&&(5===e.type&&Yn(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&Yn(e.exp,t)})))};function Yn(e,t){if(4===e.type)qn(e,t);else for(let n=0;n<e.children.length;n++){const o=e.children[n];"object"==typeof o&&(4===o.type?qn(o,t):8===o.type?Yn(e,t):5===o.type&&Yn(o.content,t))}}function qn(e,t){const n=e.content;let o,r,s,i,c=!1,l=!1,a=!1,p=!1,u=0,f=0,d=0,h=0,m=[];for(s=0;s<n.length;s++)if(r=o,o=n.charCodeAt(s),c)39===o&&92!==r&&(c=!1);else if(l)34===o&&92!==r&&(l=!1);else if(a)96===o&&92!==r&&(a=!1);else if(p)47===o&&92!==r&&(p=!1);else if(124!==o||124===n.charCodeAt(s+1)||124===n.charCodeAt(s-1)||u||f||d){switch(o){case 34:l=!0;break;case 39:c=!0;break;case 96:a=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:u++;break;case 125:u--}if(47===o){let e,t=s-1;for(;t>=0&&(e=n.charAt(t)," "===e);t--);e&&Gn.test(e)||(p=!0)}}else void 0===i?(h=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(h,s).trim()),h=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==h&&g(),m.length){for(s=0;s<m.length;s++)i=Zn(i,m[s],t);e.content=i}}function Zn(e,t,n){n.helper(U);const o=t.indexOf("(");if(o<0)return n.filters.add(t),`${nt(t,"filter")}(${e})`;{const r=t.slice(0,o),s=t.slice(o+1);return n.filters.add(r),`${nt(r,"filter")}(${e}${")"!==s?","+s:s}`}}const Xn=new WeakSet,Qn=(e,t)=>{if(1===e.type){const n=We(e,"memo");if(!n||Xn.has(e))return;return Xn.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&rt(o,t),e.codegenNode=xe(t.helper(fe),[n.exp,Te(void 0,o),"_cache",String(t.cached++)]))}}};function eo(e){return[[Kn,ln,Qn,dn,zn,Vn,In,Nn,Hn],{on:Bn,bind:Fn,model:Un}]}function to(e,t={}){const n=t.onError||k,o="module"===t.mode;!0===t.prefixIdentifiers?n(C(46)):o&&n(C(47));t.cacheHandlers&&n(C(48)),t.scopeId&&!o&&n(C(49));const r=h(e)?ft(e,t):e,[s,i]=eo();return Ut(r,f({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:f({},i,t.directiveTransforms||{})})),qt(r,f({},t,{prefixIdentifiers:false}))}const no=()=>({props:[]}),oo=Symbol(""),ro=Symbol(""),so=Symbol(""),io=Symbol(""),co=Symbol(""),lo=Symbol(""),ao=Symbol(""),po=Symbol(""),uo=Symbol(""),fo=Symbol("");let ho;me({[oo]:"vModelRadio",[ro]:"vModelCheckbox",[so]:"vModelText",[io]:"vModelSelect",[co]:"vModelDynamic",[lo]:"withModifiers",[ao]:"withKeys",[po]:"vShow",[uo]:"Transition",[fo]:"TransitionGroup"});const mo=t("style,iframe,script,noscript",!0),go={isVoidTag:i,isNativeTag:e=>r(e)||s(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return ho||(ho=document.createElement("div")),t?(ho.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,ho.children[0].getAttribute("foo")):(ho.innerHTML=e,ho.textContent)},isBuiltInComponent:e=>Me(e,"Transition")?uo:Me(e,"TransitionGroup")?fo:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(mo(e))return 2}return 0}},yo=e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Ne("style",!0,t.loc),exp:vo(t.value.content,t.loc),modifiers:[],loc:t.loc})}))},vo=(e,t)=>{const r=function(e){const t={};return e.split(n).forEach((e=>{if(e){const n=e.split(o);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}(e);return Ne(JSON.stringify(r),!1,t,3)};function So(e,t){return C(e,t)}const bo=t("passive,once,capture"),Eo=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),No=t("left,right"),_o=t("onkeyup,onkeydown,onkeypress",!0),xo=(e,t)=>Ie(e)&&"onclick"===e.content.toLowerCase()?Ne(t,!0):4!==e.type?_e(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,To=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},ko=[yo],Oo={cloak:no,html:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[Ee(Ne("innerHTML",!0,r),o||Ne("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[Ee(Ne("textContent",!0),o?Dt(o,n)>0?o:xe(n.helperString(q),[o],r):Ne("",!0))]}},model:(e,t,n)=>{const o=Un(e,t,n);if(!o.props.length||1===t.tagType)return o;const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let e=so,i=!1;if("input"===r||s){const n=Ke(t,"type");if(n){if(7===n.type)e=co;else if(n.value)switch(n.value.content){case"radio":e=oo;break;case"checkbox":e=ro;break;case"file":i=!0}}else Je(t)&&(e=co)}else"select"===r&&(e=io);i||(o.needRuntime=n.helper(e))}return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>Bn(e,0,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:c,eventOptionModifiers:l}=((e,t,n,o)=>{const r=[],s=[],i=[];for(let c=0;c<t.length;c++){const o=t[c];"native"===o&<("COMPILER_V_ON_NATIVE",n)||bo(o)?i.push(o):No(o)?Ie(e)?_o(e.content)?r.push(o):s.push(o):(r.push(o),s.push(o)):Eo(o)?s.push(o):r.push(o)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:i}})(r,o,n);if(c.includes("right")&&(r=xo(r,"onContextmenu")),c.includes("middle")&&(r=xo(r,"onMouseup")),c.length&&(s=xe(n.helper(lo),[s,JSON.stringify(c)])),!i.length||Ie(r)&&!_o(r.content)||(s=xe(n.helper(ao),[s,JSON.stringify(i)])),l.length){const e=l.map(x).join("");r=Ie(r)?Ne(`${r.content}${e}`,!0):_e(["(",r,`) + "${e}"`])}return{props:[Ee(r,s)]}})),show:(e,t,n)=>({props:[],needRuntime:n.helper(po)})};return e.BASE_TRANSITION=w,e.CAMELIZE=oe,e.CAPITALIZE=re,e.CREATE_BLOCK=L,e.CREATE_COMMENT=B,e.CREATE_ELEMENT_BLOCK=V,e.CREATE_ELEMENT_VNODE=D,e.CREATE_SLOTS=Y,e.CREATE_STATIC=j,e.CREATE_TEXT=F,e.CREATE_VNODE=A,e.DOMDirectiveTransforms=Oo,e.DOMNodeTransforms=ko,e.FRAGMENT=I,e.GUARD_REACTIVE_PROPS=te,e.IS_MEMO_SAME=de,e.IS_REF=ue,e.KEEP_ALIVE=P,e.MERGE_PROPS=Z,e.NORMALIZE_CLASS=X,e.NORMALIZE_PROPS=ee,e.NORMALIZE_STYLE=Q,e.OPEN_BLOCK=$,e.POP_SCOPE_ID=le,e.PUSH_SCOPE_ID=ce,e.RENDER_LIST=G,e.RENDER_SLOT=z,e.RESOLVE_COMPONENT=H,e.RESOLVE_DIRECTIVE=K,e.RESOLVE_DYNAMIC_COMPONENT=W,e.RESOLVE_FILTER=U,e.SET_BLOCK_TRACKING=ie,e.SUSPENSE=R,e.TELEPORT=M,e.TO_DISPLAY_STRING=q,e.TO_HANDLERS=ne,e.TO_HANDLER_KEY=se,e.TRANSITION=uo,e.TRANSITION_GROUP=fo,e.UNREF=pe,e.V_MODEL_CHECKBOX=ro,e.V_MODEL_DYNAMIC=co,e.V_MODEL_RADIO=oo,e.V_MODEL_SELECT=io,e.V_MODEL_TEXT=so,e.V_ON_WITH_KEYS=ao,e.V_ON_WITH_MODIFIERS=lo,e.V_SHOW=po,e.WITH_CTX=ae,e.WITH_DIRECTIVES=J,e.WITH_MEMO=fe,e.advancePositionWithClone=je,e.advancePositionWithMutation=He,e.assert=function(e,t){if(!e)throw new Error(t||"unexpected compiler condition")},e.baseCompile=to,e.baseParse=ft,e.buildDirectiveArgs=$n,e.buildProps=Rn,e.buildSlots=xn,e.checkCompatEnabled=lt,e.compile=function(e,t={}){return to(e,f({},go,t,{nodeTransforms:[To,...ko,...t.nodeTransforms||[]],directiveTransforms:f({},Oo,t.directiveTransforms||{}),transformHoist:null}))},e.createArrayExpression=Se,e.createAssignmentExpression=function(e,t){return{type:24,left:e,right:t,loc:ge}},e.createBlockStatement=Ce,e.createCacheExpression=Oe,e.createCallExpression=xe,e.createCompilerError=C,e.createCompoundExpression=_e,e.createConditionalExpression=ke,e.createDOMCompilerError=So,e.createForLoopParams=bn,e.createFunctionExpression=Te,e.createIfStatement=function(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:ge}},e.createInterpolation=function(e,t){return{type:5,loc:t,content:h(e)?Ne(e,!1,t):e}},e.createObjectExpression=be,e.createObjectProperty=Ee,e.createReturnStatement=function(e){return{type:26,returns:e,loc:ge}},e.createRoot=ye,e.createSequenceExpression=function(e){return{type:25,expressions:e,loc:ge}},e.createSimpleExpression=Ne,e.createStructuralDirectiveTransform=Gt,e.createTemplateLiteral=function(e){return{type:22,elements:e,loc:ge}},e.createTransformContext=Kt,e.createVNodeCall=ve,e.extractIdentifiers=rn,e.findDir=We,e.findProp=Ke,e.generate=qt,e.generateCodeFrame=function(e,t=0,n=e.length){let o=e.split(/(\r?\n)/);const r=o.filter(((e,t)=>t%2==1));o=o.filter(((e,t)=>t%2==0));let s=0;const i=[];for(let c=0;c<o.length;c++)if(s+=o[c].length+(r[c]&&r[c].length||0),s>=t){for(let e=c-2;e<=c+2||n>s;e++){if(e<0||e>=o.length)continue;const l=e+1;i.push(`${l}${" ".repeat(Math.max(3-String(l).length,0))}| ${o[e]}`);const a=o[e].length,p=r[e]&&r[e].length||0;if(e===c){const e=t-(s-(a+p)),o=Math.max(1,n>s?a-e:n-t);i.push(" | "+" ".repeat(e)+"^".repeat(o))}else if(e>c){if(n>s){const e=Math.max(Math.min(n-s,a),1);i.push(" | "+"^".repeat(e))}s+=a+p}}break}return i.join("\n")},e.getBaseTransformPreset=eo,e.getConstantType=Dt,e.getInnerRange=Fe,e.getMemoedVNodeCall=ot,e.getVNodeBlockHelper=Xe,e.getVNodeHelper=Ze,e.hasDynamicKeyVBind=Je,e.hasScopeRef=function e(t,n){if(!t||0===Object.keys(n).length)return!1;switch(t.type){case 1:for(let o=0;o<t.props.length;o++){const r=t.props[o];if(7===r.type&&(e(r.arg,n)||e(r.exp,n)))return!0}return t.children.some((t=>e(t,n)));case 11:return!!e(t.source,n)||t.children.some((t=>e(t,n)));case 9:return t.branches.some((t=>e(t,n)));case 10:return!!e(t.condition,n)||t.children.some((t=>e(t,n)));case 4:return!t.isStatic&&we(t.content)&&!!n[t.content];case 8:return t.children.some((t=>g(t)&&e(t,n)));case 5:case 12:return e(t.content,n);default:return!1}},e.helperNameMap=he,e.injectProp=tt,e.isBuiltInType=Me,e.isCoreComponent=Re,e.isFunctionType=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),e.isInDestructureAssignment=function(e,t){if(e&&("ObjectProperty"===e.type||"ArrayPattern"===e.type)){let e=t.length;for(;e--;){const n=t[e];if("AssignmentExpression"===n.type)return!0;if("ObjectProperty"!==n.type&&!n.type.endsWith("Pattern"))break}}return!1},e.isMemberExpression=Be,e.isMemberExpressionBrowser=Ae,e.isMemberExpressionNode=De,e.isReferencedIdentifier=function(e,t,n){return!1},e.isSimpleIdentifier=we,e.isSlotOutlet=qe,e.isStaticArgOf=Ue,e.isStaticExp=Ie,e.isStaticProperty=sn,e.isStaticPropertyKey=(e,t)=>sn(t)&&t.key===e,e.isTemplateNode=Ye,e.isText=Ge,e.isVSlot=ze,e.locStub=ge,e.makeBlock=rt,e.noopDirectiveTransform=no,e.parse=function(e,t={}){return ft(e,f({},go,t))},e.parserOptions=go,e.processExpression=cn,e.processFor=hn,e.processIf=an,e.processSlotOutlet=An,e.registerRuntimeHelpers=me,e.resolveComponentType=Mn,e.toValidAssetId=nt,e.trackSlotScopes=Nn,e.trackVForSlotScopes=(e,t)=>{let n;if(Ye(e)&&e.props.some(ze)&&(n=We(e,"for"))){const e=n.parseResult=vn(n.exp);if(e){const{value:n,key:o,index:r}=e,{addIdentifiers:s,removeIdentifiers:i}=t;return n&&s(n),o&&s(o),r&&s(r),()=>{n&&i(n),o&&i(o),r&&i(r)}}}},e.transform=Ut,e.transformBind=Fn,e.transformElement=In,e.transformExpression=(e,t)=>{if(5===e.type)e.content=cn(e.content,t);else if(1===e.type)for(let n=0;n<e.props.length;n++){const o=e.props[n];if(7===o.type&&"for"!==o.name){const e=o.exp,n=o.arg;!e||4!==e.type||"on"===o.name&&n||(o.exp=cn(e,t,"slot"===o.name)),n&&4===n.type&&!n.isStatic&&(o.arg=cn(n,t))}}},e.transformModel=Un,e.transformOn=Bn,e.transformStyle=yo,e.traverseNode=Jt,e.walkBlockDeclarations=function(e,t){for(const n of e.body)if("VariableDeclaration"===n.type){if(n.declare)continue;for(const e of n.declarations)for(const n of rn(e.id))t(n)}else if("FunctionDeclaration"===n.type||"ClassDeclaration"===n.type){if(n.declare||!n.id)continue;t(n.id)}},e.walkFunctionParams=function(e,t){for(const n of e.params)for(const e of rn(n))t(e)},e.walkIdentifiers=function(e,t,n=!1,o=[],r=Object.create(null)){},e.warnDeprecation=function(e,t,n,...o){if("suppress-warning"===it(e,t))return;const{message:r,link:s}=st[e],i=`(deprecation ${e}) ${"function"==typeof r?r(...o):r}${s?`\n Details: ${s}`:""}`,c=new SyntaxError(i);c.code=e,n&&(c.loc=n),t.onWarn(c)},Object.defineProperty(e,"__esModule",{value:!0}),e}({}); +/** +* @vue/compiler-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var VueCompilerDOM=function(e){"use strict";function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},s=()=>{},i=()=>!1,o=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),r=Object.assign,a=Array.isArray,c=e=>"string"==typeof e,l=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,p=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),d=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),u=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},f=/-(\w)/g,m=u((e=>e.replace(f,((e,t)=>t?t.toUpperCase():"")))),E=u((e=>e.charAt(0).toUpperCase()+e.slice(1))),_=u((e=>e?`on${E(e)}`:""));const S=/;(?![^(]*\))/g,T=/:([^]+)/,g=/\/\*[^]*?\*\//g;const N=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),I=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),y=t("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),O=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),A=Symbol(""),C=Symbol(""),b=Symbol(""),v=Symbol(""),R=Symbol(""),x=Symbol(""),L=Symbol(""),M=Symbol(""),P=Symbol(""),D=Symbol(""),k=Symbol(""),V=Symbol(""),X=Symbol(""),w=Symbol(""),U=Symbol(""),F=Symbol(""),B=Symbol(""),$=Symbol(""),H=Symbol(""),G=Symbol(""),q=Symbol(""),J=Symbol(""),j=Symbol(""),W=Symbol(""),K=Symbol(""),Y=Symbol(""),Q=Symbol(""),z=Symbol(""),Z=Symbol(""),ee=Symbol(""),te=Symbol(""),ne=Symbol(""),se=Symbol(""),ie=Symbol(""),oe=Symbol(""),re=Symbol(""),ae=Symbol(""),ce=Symbol(""),le=Symbol(""),he={[A]:"Fragment",[C]:"Teleport",[b]:"Suspense",[v]:"KeepAlive",[R]:"BaseTransition",[x]:"openBlock",[L]:"createBlock",[M]:"createElementBlock",[P]:"createVNode",[D]:"createElementVNode",[k]:"createCommentVNode",[V]:"createTextVNode",[X]:"createStaticVNode",[w]:"resolveComponent",[U]:"resolveDynamicComponent",[F]:"resolveDirective",[B]:"resolveFilter",[$]:"withDirectives",[H]:"renderList",[G]:"renderSlot",[q]:"createSlots",[J]:"toDisplayString",[j]:"mergeProps",[W]:"normalizeClass",[K]:"normalizeStyle",[Y]:"normalizeProps",[Q]:"guardReactiveProps",[z]:"toHandlers",[Z]:"camelize",[ee]:"capitalize",[te]:"toHandlerKey",[ne]:"setBlockTracking",[se]:"pushScopeId",[ie]:"popScopeId",[oe]:"withCtx",[re]:"unref",[ae]:"isRef",[ce]:"withMemo",[le]:"isMemoSame"};function pe(e){Object.getOwnPropertySymbols(e).forEach((t=>{he[t]=e[t]}))}const de={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ue(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:de}}function fe(e,t,n,s,i,o,r,a=!1,c=!1,l=!1,h=de){return e&&(a?(e.helper(x),e.helper(Ce(e.inSSR,l))):e.helper(Ae(e.inSSR,l)),r&&e.helper($)),{type:13,tag:t,props:n,children:s,patchFlag:i,dynamicProps:o,directives:r,isBlock:a,disableTracking:c,isComponent:l,loc:h}}function me(e,t=de){return{type:17,loc:t,elements:e}}function Ee(e,t=de){return{type:15,loc:t,properties:e}}function _e(e,t){return{type:16,loc:de,key:c(e)?Se(e,!0):e,value:t}}function Se(e,t=!1,n=de,s=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:s}}function Te(e,t=de){return{type:8,loc:t,children:e}}function ge(e,t=[],n=de){return{type:14,loc:n,callee:e,arguments:t}}function Ne(e,t=void 0,n=!1,s=!1,i=de){return{type:18,params:e,returns:t,newline:n,isSlot:s,loc:i}}function Ie(e,t,n,s=!0){return{type:19,test:e,consequent:t,alternate:n,newline:s,loc:de}}function ye(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:de}}function Oe(e){return{type:21,body:e,loc:de}}function Ae(e,t){return e||t?P:D}function Ce(e,t){return e||t?L:M}function be(e,{helper:t,removeHelper:n,inSSR:s}){e.isBlock||(e.isBlock=!0,n(Ae(s,e.isComponent)),t(x),t(Ce(s,e.isComponent)))}const ve=new Uint8Array([123,123]),Re=new Uint8Array([125,125]);function xe(e){return e>=97&&e<=122||e>=65&&e<=90}function Le(e){return 32===e||10===e||9===e||12===e||13===e}function Me(e){return 47===e||62===e||Le(e)}function Pe(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const De={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};const ke={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function Ve(e,{compatConfig:t}){const n=t&&t[e];return"MODE"===e?n||3:n}function Xe(e,t){const n=Ve("MODE",t),s=Ve(e,t);return 3===n?!0===s:!1!==s}function we(e,t,n,...s){return Xe(e,t)}function Ue(e){throw e}function Fe(e){}function Be(e,t,n,s){const i=new SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return i.code=e,i.loc=t,i}const $e={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '\x3c!--' in comment.",17:"Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).",18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:"v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.",45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',52:""};function He(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(const s of e.properties)He("RestElement"===s.type?s.argument:s.value,t);break;case"ArrayPattern":e.elements.forEach((e=>{e&&He(e,t)}));break;case"RestElement":He(e.argument,t);break;case"AssignmentPattern":He(e.left,t)}return t}const Ge=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,qe=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];const Je=e=>4===e.type&&e.isStatic;function je(e){switch(e){case"Teleport":case"teleport":return C;case"Suspense":case"suspense":return b;case"KeepAlive":case"keep-alive":return v;case"BaseTransition":case"base-transition":return R}}const We=/^\d|[^\$\w]/,Ke=e=>!We.test(e),Ye=/[A-Za-z_$\xA0-\uFFFF]/,Qe=/[\.\?\w$\xA0-\uFFFF]/,ze=/\s+[.[]\s*|\s*[.[]\s+/g,Ze=e=>{e=e.trim().replace(ze,(e=>e.trim()));let t=0,n=[],s=0,i=0,o=null;for(let r=0;r<e.length;r++){const a=e.charAt(r);switch(t){case 0:if("["===a)n.push(t),t=1,s++;else if("("===a)n.push(t),t=2,i++;else if(!(0===r?Ye:Qe).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(n.push(t),t=3,o=a):"["===a?s++:"]"===a&&(--s||(t=n.pop()));break;case 2:if("'"===a||'"'===a||"`"===a)n.push(t),t=3,o=a;else if("("===a)i++;else if(")"===a){if(r===e.length-1)return!1;--i||(t=n.pop())}break;case 3:a===o&&(t=n.pop(),o=null)}}return!s&&!i},et=s,tt=Ze;function nt(e,t,n=t.length){let s=0,i=-1;for(let o=0;o<n;o++)10===t.charCodeAt(o)&&(s++,i=o);return e.offset+=n,e.line+=s,e.column=-1===i?e.column+n:n-i,e}function st(e,t,n=!1){for(let s=0;s<e.props.length;s++){const i=e.props[s];if(7===i.type&&(n||i.exp)&&(c(t)?i.name===t:t.test(i.name)))return i}}function it(e,t,n=!1,s=!1){for(let i=0;i<e.props.length;i++){const o=e.props[i];if(6===o.type){if(n)continue;if(o.name===t&&(o.value||s))return o}else if("bind"===o.name&&(o.exp||s)&&ot(o.arg,t))return o}}function ot(e,t){return!(!e||!Je(e)||e.content!==t)}function rt(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))}function at(e){return 5===e.type||2===e.type}function ct(e){return 7===e.type&&"slot"===e.name}function lt(e){return 1===e.type&&3===e.tagType}function ht(e){return 1===e.type&&2===e.tagType}const pt=new Set([Y,Q]);function dt(e,t=[]){if(e&&!c(e)&&14===e.type){const n=e.callee;if(!c(n)&&pt.has(n))return dt(e.arguments[0],t.concat(e))}return[e,t]}function ut(e,t,n){let s,i,o=13===e.type?e.props:e.arguments[2],r=[];if(o&&!c(o)&&14===o.type){const e=dt(o);o=e[0],r=e[1],i=r[r.length-1]}if(null==o||c(o))s=Ee([t]);else if(14===o.type){const e=o.arguments[0];c(e)||15!==e.type?o.callee===z?s=ge(n.helper(j),[Ee([t]),o]):o.arguments.unshift(Ee([t])):ft(t,e)||e.properties.unshift(t),!s&&(s=o)}else 15===o.type?(ft(t,o)||o.properties.unshift(t),s=o):(s=ge(n.helper(j),[Ee([t]),o]),i&&i.callee===Q&&(i=r[r.length-2]));13===e.type?i?i.arguments[0]=s:e.props=s:i?i.arguments[0]=s:e.arguments[2]=s}function ft(e,t){let n=!1;if(4===e.key.type){const s=e.key.content;n=t.properties.some((e=>4===e.key.type&&e.key.content===s))}return n}function mt(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function Et(e){return 14===e.type&&e.callee===ce?e.arguments[1].returns:e}const _t=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,St={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:i,isPreTag:i,isCustomElement:i,onError:Ue,onWarn:Fe,comments:!1,prefixIdentifiers:!1};let Tt=St,gt=null,Nt="",It=null,yt=null,Ot="",At=-1,Ct=-1,bt=0,vt=!1,Rt=null;const xt=[],Lt=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=ve,this.delimiterClose=Re,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=ve,this.delimiterClose=Re}getPos(e){let t=1,n=e+1;for(let s=this.newlines.length-1;s>=0;s--){const i=this.newlines[s];if(e>i){t=s+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?Me(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||Le(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.sectionStart=t+2,this.stateInClosingTagName(e),void(this.inRCDATA=!1)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===De.TitleEnd||this.currentSequence===De.TextareaEnd&&!this.inSFCRoot?e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===De.Cdata[this.sequenceIndex]?++this.sequenceIndex===De.Cdata.length&&(this.state=28,this.currentSequence=De.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===De.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){if(33===e)this.state=22,this.sectionStart=this.index+1;else if(63===e)this.state=24,this.sectionStart=this.index+1;else if(xe(e))if(this.sectionStart=this.index,0===this.mode)this.state=6;else if(this.inSFCRoot)this.state=34;else if(this.inXML)this.state=6;else{const t=32|e;this.state=116===t?30:115===t?29:6}else 47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){Me(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(Me(e)){const t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(Pe("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){Le(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=xe(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||Le(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Le(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Le(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||Me(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||Me(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||Me(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||Me(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||Me(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):Le(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):Le(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){Le(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):39!==e&&60!==e&&61!==e&&96!==e||this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=De.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const t=32|e;t===De.ScriptEnd[3]?this.startSpecial(De.ScriptEnd,4):t===De.StyleEnd[3]?this.startSpecial(De.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){const t=32|e;t===De.TitleEnd[3]?this.startSpecial(De.TitleEnd,4):t===De.TextareaEnd[3]?this.startSpecial(De.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):19!==this.state&&20!==this.state&&21!==this.state||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===De.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(xt,{onerr:Qt,ontext(e,t){Vt(Dt(e,t),e,t)},ontextentity(e,t,n){Vt(e,t,n)},oninterpolation(e,t){if(vt)return Vt(Dt(e,t),e,t);let n=e+Lt.delimiterOpen.length,s=t-Lt.delimiterClose.length;for(;Le(Nt.charCodeAt(n));)n++;for(;Le(Nt.charCodeAt(s-1));)s--;let i=Dt(n,s);i.includes("&")&&(i=Tt.decodeEntities(i,!1)),Jt({type:5,content:Yt(i,!1,jt(n,s)),loc:jt(e,t)})},onopentagname(e,t){const n=Dt(e,t);It={type:1,tag:n,ns:Tt.getNamespace(n,xt[0],Tt.ns),tagType:0,props:[],children:[],loc:jt(e-1,t),codegenNode:void 0}},onopentagend(e){kt(e)},onclosetag(e,t){const n=Dt(e,t);if(!Tt.isVoidTag(n)){let s=!1;for(let e=0;e<xt.length;e++){if(xt[e].tag.toLowerCase()===n.toLowerCase()){s=!0;for(let n=0;n<=e;n++){Xt(xt.shift(),t,n<e)}break}}s||wt(e,60)}},onselfclosingtag(e){var t;const n=It.tag;It.isSelfClosing=!0,kt(e),(null==(t=xt[0])?void 0:t.tag)===n&&Xt(xt.shift(),e)},onattribname(e,t){yt={type:6,name:Dt(e,t),nameLoc:jt(e,t),value:void 0,loc:jt(e)}},ondirname(e,t){const n=Dt(e,t),s="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(vt||""===s)yt={type:6,name:n,nameLoc:jt(e,t),value:void 0,loc:jt(e)};else if(yt={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?["prop"]:[],loc:jt(e)},"pre"===s){vt=Lt.inVPre=!0,Rt=It;const e=It.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=Kt(e[t]))}},ondirarg(e,t){if(e===t)return;const n=Dt(e,t);if(vt)yt.name+=n,Wt(yt.nameLoc,t);else{const s="["!==n[0];yt.arg=Yt(s?n:n.slice(1,-1),s,jt(e,t),s?3:0)}},ondirmodifier(e,t){const n=Dt(e,t);if(vt)yt.name+="."+n,Wt(yt.nameLoc,t);else if("slot"===yt.name){const e=yt.arg;e&&(e.content+="."+n,Wt(e.loc,t))}else yt.modifiers.push(n)},onattribdata(e,t){Ot+=Dt(e,t),At<0&&(At=e),Ct=t},onattribentity(e,t,n){Ot+=e,At<0&&(At=t),Ct=n},onattribnameend(e){const t=Dt(yt.loc.start.offset,e);7===yt.type&&(yt.rawName=t),It.props.some((e=>(7===e.type?e.rawName:e.name)===t))},onattribend(e,t){if(It&&yt){if(Wt(yt.loc,t),0!==e)if(Ot.includes("&")&&(Ot=Tt.decodeEntities(Ot,!0)),6===yt.type)"class"===yt.name&&(Ot=qt(Ot).trim()),yt.value={type:2,content:Ot,loc:1===e?jt(At,Ct):jt(At-1,Ct+1)},Lt.inSFCRoot&&"template"===It.tag&&"lang"===yt.name&&Ot&&"html"!==Ot&&Lt.enterRCDATA(Pe("</template"),0);else{let e=0;yt.exp=Yt(Ot,!1,jt(At,Ct),0,e),"for"===yt.name&&(yt.forParseResult=function(e){const t=e.loc,n=e.content,s=n.match(_t);if(!s)return;const[,i,o]=s,r=(e,n,s=!1)=>{const i=t.start.offset+n;return Yt(e,!1,jt(i,i+e.length),0,s?1:0)},a={source:r(o.trim(),n.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=i.trim().replace(Pt,"").trim();const l=i.indexOf(c),h=c.match(Mt);if(h){c=c.replace(Mt,"").trim();const e=h[1].trim();let t;if(e&&(t=n.indexOf(e,l+c.length),a.key=r(e,t,!0)),h[2]){const s=h[2].trim();s&&(a.index=r(s,n.indexOf(s,a.key?t+e.length:l+c.length),!0))}}c&&(a.value=r(c,l,!0));return a}(yt.exp));let t=-1;"bind"===yt.name&&(t=yt.modifiers.indexOf("sync"))>-1&&we("COMPILER_V_BIND_SYNC",Tt,0)&&(yt.name="model",yt.modifiers.splice(t,1))}7===yt.type&&"pre"===yt.name||It.props.push(yt)}Ot="",At=Ct=-1},oncomment(e,t){Tt.comments&&Jt({type:3,content:Dt(e,t),loc:jt(e-4,t+3)})},onend(){const e=Nt.length;for(let t=0;t<xt.length;t++)Xt(xt[t],e-1)},oncdata(e,t){0!==xt[0].ns&&Vt(Dt(e,t),e,t)},onprocessinginstruction(e){0===(xt[0]?xt[0].ns:Tt.ns)&&Qt(21,e-1)}}),Mt=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Pt=/^\(|\)$/g;function Dt(e,t){return Nt.slice(e,t)}function kt(e){Lt.inSFCRoot&&(It.innerLoc=jt(e+1,e+1)),Jt(It);const{tag:t,ns:n}=It;0===n&&Tt.isPreTag(t)&&bt++,Tt.isVoidTag(t)?Xt(It,e):(xt.unshift(It),1!==n&&2!==n||(Lt.inXML=!0)),It=null}function Vt(e,t,n){var s;{const t=null==(s=xt[0])?void 0:s.tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=Tt.decodeEntities(e,!1))}const i=xt[0]||gt,o=i.children[i.children.length-1];2===(null==o?void 0:o.type)?(o.content+=e,Wt(o.loc,n)):i.children.push({type:2,content:e,loc:jt(t,n)})}function Xt(e,t,n=!1){Wt(e.loc,n?wt(t,60):t+1),Lt.inSFCRoot&&(e.innerLoc.end=r({},e.children.length?e.children[e.children.length-1].loc.end:e.innerLoc.start),e.innerLoc.source=Dt(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:s,ns:i}=e;vt||("slot"===s?e.tagType=2:Ft(e)?e.tagType=3:function({tag:e,props:t}){var n;if(Tt.isCustomElement(e))return!1;if("component"===e||(s=e.charCodeAt(0),s>64&&s<91)||je(e)||(null==(n=Tt.isBuiltInComponent)?void 0:n.call(Tt,e))||Tt.isNativeTag&&!Tt.isNativeTag(e))return!0;var s;for(let i=0;i<t.length;i++){const e=t[i];if(6===e.type){if("is"===e.name&&e.value){if(e.value.content.startsWith("vue:"))return!0;if(we("COMPILER_IS_ON_ELEMENT",Tt))return!0}}else if("bind"===e.name&&ot(e.arg,"is")&&we("COMPILER_IS_ON_ELEMENT",Tt))return!0}return!1}(e)&&(e.tagType=1)),Lt.inRCDATA||(e.children=$t(e.children,e.tag)),0===i&&Tt.isPreTag(s)&&bt--,Rt===e&&(vt=Lt.inVPre=!1,Rt=null),Lt.inXML&&0===(xt[0]?xt[0].ns:Tt.ns)&&(Lt.inXML=!1);{const t=e.props;if(!Lt.inSFCRoot&&Xe("COMPILER_NATIVE_TEMPLATE",Tt)&&"template"===e.tag&&!Ft(e)){const t=xt[0]||gt,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}const n=t.find((e=>6===e.type&&"inline-template"===e.name));n&&we("COMPILER_INLINE_TEMPLATE",Tt)&&e.children.length&&(n.value={type:2,content:Dt(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function wt(e,t){let n=e;for(;Nt.charCodeAt(n)!==t&&n>=0;)n--;return n}const Ut=new Set(["if","else","else-if","for","slot"]);function Ft({tag:e,props:t}){if("template"===e)for(let n=0;n<t.length;n++)if(7===t[n].type&&Ut.has(t[n].name))return!0;return!1}const Bt=/\r\n/g;function $t(e,t){var n,s;const i="preserve"!==Tt.whitespace;let o=!1;for(let r=0;r<e.length;r++){const t=e[r];if(2===t.type)if(bt)t.content=t.content.replace(Bt,"\n");else if(Ht(t.content)){const a=null==(n=e[r-1])?void 0:n.type,c=null==(s=e[r+1])?void 0:s.type;!a||!c||i&&(3===a&&(3===c||1===c)||1===a&&(3===c||1===c&&Gt(t.content)))?(o=!0,e[r]=null):t.content=" "}else i&&(t.content=qt(t.content))}if(bt&&t&&Tt.isPreTag(t)){const t=e[0];t&&2===t.type&&(t.content=t.content.replace(/^\r?\n/,""))}return o?e.filter(Boolean):e}function Ht(e){for(let t=0;t<e.length;t++)if(!Le(e.charCodeAt(t)))return!1;return!0}function Gt(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}function qt(e){let t="",n=!1;for(let s=0;s<e.length;s++)Le(e.charCodeAt(s))?n||(t+=" ",n=!0):(t+=e[s],n=!1);return t}function Jt(e){(xt[0]||gt).children.push(e)}function jt(e,t){return{start:Lt.getPos(e),end:null==t?t:Lt.getPos(t),source:null==t?t:Dt(e,t)}}function Wt(e,t){e.end=Lt.getPos(t),e.source=Dt(e.start.offset,t)}function Kt(e){const t={type:6,name:e.rawName,nameLoc:jt(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function Yt(e,t=!1,n,s=0,i=0){return Se(e,t,n,s)}function Qt(e,t,n){Tt.onError(Be(e,jt(t,t)))}function zt(e,t){if(Lt.reset(),It=null,yt=null,Ot="",At=-1,Ct=-1,xt.length=0,Nt=e,Tt=r({},St),t){let e;for(e in t)null!=t[e]&&(Tt[e]=t[e])}Lt.mode="html"===Tt.parseMode?1:"sfc"===Tt.parseMode?2:0,Lt.inXML=1===Tt.ns||2===Tt.ns;const n=null==t?void 0:t.delimiters;n&&(Lt.delimiterOpen=Pe(n[0]),Lt.delimiterClose=Pe(n[1]));const s=gt=ue([],e);return Lt.parse(Nt),s.loc=jt(0,e.length),s.children=$t(s.children),gt=null,s}function Zt(e,t){tn(e,t,en(e,e.children[0]))}function en(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!ht(t)}function tn(e,t,n=!1){const{children:s}=e,i=s.length;let o=0;for(let r=0;r<s.length;r++){const e=s[r];if(1===e.type&&0===e.tagType){const s=n?0:nn(e,t);if(s>0){if(s>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),o++;continue}}else{const n=e.codegenNode;if(13===n.type){const s=cn(n);if((!s||512===s||1===s)&&rn(e,t)>=2){const s=an(e);s&&(n.props=t.hoist(s))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,tn(e,t),n&&t.scopes.vSlot--}else if(11===e.type)tn(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)tn(e.branches[n],t,1===e.branches[n].children.length)}if(o&&t.transformHoist&&t.transformHoist(s,t,e),o&&o===i&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&a(e.codegenNode.children)){const n=t.hoist(me(e.codegenNode.children));t.hmr&&(n.content=`[...${n.content}]`),e.codegenNode.children=n}}function nn(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const s=n.get(e);if(void 0!==s)return s;const i=e.codegenNode;if(13!==i.type)return 0;if(i.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(cn(i))return n.set(e,0),0;{let s=3;const o=rn(e,t);if(0===o)return n.set(e,0),0;o<s&&(s=o);for(let i=0;i<e.children.length;i++){const o=nn(e.children[i],t);if(0===o)return n.set(e,0),0;o<s&&(s=o)}if(s>1)for(let i=0;i<e.props.length;i++){const o=e.props[i];if(7===o.type&&"bind"===o.name&&o.exp){const i=nn(o.exp,t);if(0===i)return n.set(e,0),0;i<s&&(s=i)}}if(i.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(x),t.removeHelper(Ce(t.inSSR,i.isComponent)),i.isBlock=!1,t.helper(Ae(t.inSSR,i.isComponent))}return n.set(e,s),s}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return nn(e.content,t);case 4:return e.constType;case 8:let o=3;for(let n=0;n<e.children.length;n++){const s=e.children[n];if(c(s)||l(s))continue;const i=nn(s,t);if(0===i)return 0;i<o&&(o=i)}return o}}const sn=new Set([W,K,Y,Q]);function on(e,t){if(14===e.type&&!c(e.callee)&&sn.has(e.callee)){const n=e.arguments[0];if(4===n.type)return nn(n,t);if(14===n.type)return on(n,t)}return 0}function rn(e,t){let n=3;const s=an(e);if(s&&15===s.type){const{properties:e}=s;for(let s=0;s<e.length;s++){const{key:i,value:o}=e[s],r=nn(i,t);if(0===r)return r;let a;if(r<n&&(n=r),a=4===o.type?nn(o,t):14===o.type?on(o,t):0,0===a)return a;a<n&&(n=a)}}return n}function an(e){const t=e.codegenNode;if(13===t.type)return t.props}function cn(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function ln(e,{filename:t="",prefixIdentifiers:i=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:a=!1,nodeTransforms:l=[],directiveTransforms:h={},transformHoist:p=null,isBuiltInComponent:d=s,isCustomElement:u=s,expressionPlugins:f=[],scopeId:_=null,slotted:S=!0,ssr:T=!1,inSSR:g=!1,ssrCssVars:N="",bindingMetadata:I=n,inline:y=!1,isTS:O=!1,onError:A=Ue,onWarn:C=Fe,compatConfig:b}){const v=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),R={filename:t,selfName:v&&E(m(v[1])),prefixIdentifiers:i,hoistStatic:o,hmr:r,cacheHandlers:a,nodeTransforms:l,directiveTransforms:h,transformHoist:p,isBuiltInComponent:d,isCustomElement:u,expressionPlugins:f,scopeId:_,slotted:S,ssr:T,inSSR:g,ssrCssVars:N,bindingMetadata:I,inline:y,isTS:O,onError:A,onWarn:C,compatConfig:b,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=R.helpers.get(e)||0;return R.helpers.set(e,t+1),e},removeHelper(e){const t=R.helpers.get(e);if(t){const n=t-1;n?R.helpers.set(e,n):R.helpers.delete(e)}},helperString:e=>`_${he[R.helper(e)]}`,replaceNode(e){R.parent.children[R.childIndex]=R.currentNode=e},removeNode(e){const t=e?R.parent.children.indexOf(e):R.currentNode?R.childIndex:-1;e&&e!==R.currentNode?R.childIndex>t&&(R.childIndex--,R.onNodeRemoved()):(R.currentNode=null,R.onNodeRemoved()),R.parent.children.splice(t,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){c(e)&&(e=Se(e)),R.hoists.push(e);const t=Se(`_hoisted_${R.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>ye(R.cached++,e,t)};return R.filters=new Set,R}function hn(e,t){const n=ln(e,t);pn(e,n),t.hoistStatic&&Zt(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:s}=e;if(1===s.length){const n=s[0];if(en(e,n)&&n.codegenNode){const s=n.codegenNode;13===s.type&&be(s,t),e.codegenNode=s}else e.codegenNode=n}else if(s.length>1){let s=64;e.codegenNode=fe(t,n(A),void 0,e.children,s+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function pn(e,t){t.currentNode=e;const{nodeTransforms:n}=t,s=[];for(let o=0;o<n.length;o++){const i=n[o](e,t);if(i&&(a(i)?s.push(...i):s.push(i)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(k);break;case 5:t.ssr||t.helper(J);break;case 9:for(let n=0;n<e.branches.length;n++)pn(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const s=()=>{n--};for(;n<e.children.length;n++){const i=e.children[n];c(i)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=s,pn(i,t))}}(e,t)}t.currentNode=e;let i=s.length;for(;i--;)s[i]()}function dn(e,t){const n=c(e)?t=>t===e:t=>e.test(t);return(e,s)=>{if(1===e.type){const{props:i}=e;if(3===e.tagType&&i.some(ct))return;const o=[];for(let r=0;r<i.length;r++){const a=i[r];if(7===a.type&&n(a.name)){i.splice(r,1),r--;const n=t(e,a,s);n&&o.push(n)}}return o}}}const un="/*#__PURE__*/",fn=e=>`${he[e]}: _${he[e]}`;function mn(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:s=!1,filename:i="template.vue.html",scopeId:o=null,optimizeImports:r=!1,runtimeGlobalName:a="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:l="vue/server-renderer",ssr:h=!1,isTS:p=!1,inSSR:d=!1}){const u={mode:t,prefixIdentifiers:n,sourceMap:s,filename:i,scopeId:o,optimizeImports:r,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:l,ssr:h,isTS:p,inSSR:d,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${he[e]}`,push(e,t=-2,n){u.code+=e},indent(){f(++u.indentLevel)},deindent(e=!1){e?--u.indentLevel:f(--u.indentLevel)},newline(){f(u.indentLevel)}};function f(e){u.push("\n"+" ".repeat(e),0)}return u}function En(e,t={}){const n=mn(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:i,prefixIdentifiers:o,indent:r,deindent:a,newline:c,ssr:l}=n,h=Array.from(e.helpers),p=h.length>0,d=!o&&"module"!==s,u=n;!function(e,t){const{push:n,newline:s,runtimeGlobalName:i}=t,o=i,r=Array.from(e.helpers);if(r.length>0&&(n(`const _Vue = ${o}\n`,-1),e.hoists.length)){n(`const { ${[P,D,k,V,X].filter((e=>r.includes(e))).map(fn).join(", ")} } = _Vue\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s}=t;s();for(let i=0;i<e.length;i++){const o=e[i];o&&(n(`const _hoisted_${i+1} = `),gn(o,t),s())}t.pure=!1})(e.hoists,t),s(),n("return ")}(e,u);if(i(`function ${l?"ssrRender":"render"}(${(l?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),r(),d&&(i("with (_ctx) {"),r(),p&&(i(`const { ${h.map(fn).join(", ")} } = _Vue\n`,-1),c())),e.components.length&&(_n(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(_n(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),_n(e.filters,"filter",n),c()),e.temps>0){i("let ");for(let t=0;t<e.temps;t++)i(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i("\n",0),c()),l||i("return "),e.codegenNode?gn(e.codegenNode,n):i("null"),d&&(a(),i("}")),a(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function _n(e,t,{helper:n,push:s,newline:i,isTS:o}){const r=n("filter"===t?B:"component"===t?w:F);for(let a=0;a<e.length;a++){let n=e[a];const c=n.endsWith("__self");c&&(n=n.slice(0,-6)),s(`const ${mt(n,t)} = ${r}(${JSON.stringify(n)}${c?", true":""})${o?"!":""}`),a<e.length-1&&i()}}function Sn(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Tn(e,t,n),n&&t.deindent(),t.push("]")}function Tn(e,t,n=!1,s=!0){const{push:i,newline:o}=t;for(let r=0;r<e.length;r++){const l=e[r];c(l)?i(l,-3):a(l)?Sn(l,t):gn(l,t),r<e.length-1&&(n?(s&&i(","),o()):s&&i(", "))}}function gn(e,t){if(c(e))t.push(e,-3);else if(l(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:gn(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:Nn(e,t);break;case 5:!function(e,t){const{push:n,helper:s,pure:i}=t;i&&n(un);n(`${s(J)}(`),gn(e.content,t),n(")")}(e,t);break;case 8:In(e,t);break;case 3:!function(e,t){const{push:n,helper:s,pure:i}=t;i&&n(un);n(`${s(k)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:s,pure:i}=t,{tag:o,props:r,children:a,patchFlag:c,dynamicProps:l,directives:h,isBlock:p,disableTracking:d,isComponent:u}=e;h&&n(s($)+"(");p&&n(`(${s(x)}(${d?"true":""}), `);i&&n(un);const f=p?Ce(t.inSSR,u):Ae(t.inSSR,u);n(s(f)+"(",-2,e),Tn(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([o,r,a,c,l]),t),n(")"),p&&n(")");h&&(n(", "),gn(h,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:s,pure:i}=t,o=c(e.callee)?e.callee:s(e.callee);i&&n(un);n(o+"(",-2,e),Tn(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:s,deindent:i,newline:o}=t,{properties:r}=e;if(!r.length)return void n("{}",-2,e);const a=r.length>1||!1;n(a?"{":"{ "),a&&s();for(let c=0;c<r.length;c++){const{key:e,value:s}=r[c];yn(e,t),n(": "),gn(s,t),c<r.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}(e,t);break;case 17:!function(e,t){Sn(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:s,deindent:i}=t,{params:o,returns:r,body:c,newline:l,isSlot:h}=e;h&&n(`_${he[oe]}(`);n("(",-2,e),a(o)?Tn(o,t):o&&gn(o,t);n(") => "),(l||c)&&(n("{"),s());r?(l&&n("return "),a(r)?Sn(r,t):gn(r,t)):c&&gn(c,t);(l||c)&&(i(),n("}"));h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:s,alternate:i,newline:o}=e,{push:r,indent:a,deindent:c,newline:l}=t;if(4===n.type){const e=!Ke(n.content);e&&r("("),Nn(n,t),e&&r(")")}else r("("),gn(n,t),r(")");o&&a(),t.indentLevel++,o||r(" "),r("? "),gn(s,t),t.indentLevel--,o&&l(),o||r(" "),r(": ");const h=19===i.type;h||t.indentLevel++;gn(i,t),h||t.indentLevel--;o&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:s,indent:i,deindent:o,newline:r}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(i(),n(`${s(ne)}(-1),`),r());n(`_cache[${e.index}] = `),gn(e.value,t),e.isVNode&&(n(","),r(),n(`${s(ne)}(1),`),r(),n(`_cache[${e.index}]`),o());n(")")}(e,t);break;case 21:Tn(e.body,t,!0,!1)}}function Nn(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,-3,e)}function In(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];c(s)?t.push(s,-3):gn(s,t)}}function yn(e,t){const{push:n}=t;if(8===e.type)n("["),In(e,t),n("]");else if(e.isStatic){n(Ke(e.content)?e.content:JSON.stringify(e.content),-2,e)}else n(`[${e.content}]`,-3,e)}function On(e,t,n=!1,s=!1,i=Object.create(t.identifiers)){return e}const An=dn(/^(if|else|else-if)$/,((e,t,n)=>Cn(e,t,n,((e,t,s)=>{const i=n.parent.children;let o=i.indexOf(e),r=0;for(;o-- >=0;){const e=i[o];e&&9===e.type&&(r+=e.branches.length)}return()=>{if(s)e.codegenNode=vn(t,r,n);else{const s=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);s.alternate=vn(t,r+e.branches.length-1,n)}}}))));function Cn(e,t,n,s){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const s=t.exp?t.exp.loc:e.loc;n.onError(Be(28,t.loc)),t.exp=Se("true",!1,s)}if("if"===t.name){const i=bn(e,t),o={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(o),s)return s(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(e);for(;o-- >=-1;){const r=i[o];if(r&&3===r.type)n.removeNode(r);else{if(!r||2!==r.type||r.content.trim().length){if(r&&9===r.type){"else-if"===t.name&&void 0===r.branches[r.branches.length-1].condition&&n.onError(Be(30,e.loc)),n.removeNode();const i=bn(e,t);r.branches.push(i);const o=s&&s(r,i,!1);pn(i,n),o&&o(),n.currentNode=null}else n.onError(Be(30,e.loc));break}n.removeNode(r)}}}}function bn(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!st(e,"for")?e.children:[e],userKey:it(e,"key"),isTemplateIf:n}}function vn(e,t,n){return e.condition?Ie(e.condition,Rn(e,t,n),ge(n.helper(k),['""',"true"])):Rn(e,t,n)}function Rn(e,t,n){const{helper:s}=n,i=_e("key",Se(`${t}`,!1,de,2)),{children:o}=e,r=o[0];if(1!==o.length||1!==r.type){if(1===o.length&&11===r.type){const e=r.codegenNode;return ut(e,i,n),e}{let t=64;return fe(n,s(A),Ee([i]),o,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=r.codegenNode,t=Et(e);return 13===t.type&&be(t,n),ut(t,i,n),e}}const xn=dn("for",((e,t,n)=>{const{helper:s,removeHelper:i}=n;return Ln(e,t,n,(t=>{const o=ge(s(H),[t.source]),r=lt(e),a=st(e,"memo"),c=it(e,"key"),l=c&&(6===c.type?Se(c.value.content,!0):c.exp),h=c?_e("key",l):null,p=4===t.source.type&&t.source.constType>0,d=p?64:c?128:256;return t.codegenNode=fe(n,s(A),void 0,o,d+"",void 0,void 0,!0,!p,!1,e.loc),()=>{let c;const{children:d}=t,u=1!==d.length||1!==d[0].type,f=ht(e)?e:r&&1===e.children.length&&ht(e.children[0])?e.children[0]:null;if(f?(c=f.codegenNode,r&&h&&ut(c,h,n)):u?c=fe(n,s(A),h?Ee([h]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=d[0].codegenNode,r&&h&&ut(c,h,n),c.isBlock!==!p&&(c.isBlock?(i(x),i(Ce(n.inSSR,c.isComponent))):i(Ae(n.inSSR,c.isComponent))),c.isBlock=!p,c.isBlock?(s(x),s(Ce(n.inSSR,c.isComponent))):s(Ae(n.inSSR,c.isComponent))),a){const e=Ne(Pn(t.parseResult,[Se("_cached")]));e.body=Oe([Te(["const _memo = (",a.exp,")"]),Te(["if (_cached",...l?[" && _cached.key === ",l]:[],` && ${n.helperString(le)}(_cached, _memo)) return _cached`]),Te(["const _item = ",c]),Se("_item.memo = _memo"),Se("return _item")]),o.arguments.push(e,Se("_cache"),Se(String(n.cached++)))}else o.arguments.push(Ne(Pn(t.parseResult),c,!0))}}))}));function Ln(e,t,n,s){if(!t.exp)return void n.onError(Be(31,t.loc));const i=t.forParseResult;if(!i)return void n.onError(Be(32,t.loc));Mn(i);const{scopes:o}=n,{source:r,value:a,key:c,index:l}=i,h={type:11,loc:t.loc,source:r,valueAlias:a,keyAlias:c,objectIndexAlias:l,parseResult:i,children:lt(e)?e.children:[e]};n.replaceNode(h),o.vFor++;const p=s&&s(h);return()=>{o.vFor--,p&&p()}}function Mn(e,t){e.finalized||(e.finalized=!0)}function Pn({value:e,key:t,index:n},s=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Se("_".repeat(t+1),!1)))}([e,t,n,...s])}const Dn=Se("undefined",!1),kn=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=st(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},Vn=(e,t,n,s)=>Ne(e,n,!1,!0,n.length?n[0].loc:s);function Xn(e,t,n=Vn){t.helper(oe);const{children:s,loc:i}=e,o=[],r=[];let a=t.scopes.vSlot>0||t.scopes.vFor>0;const c=st(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!Je(e)&&(a=!0),o.push(_e(e||Se("default",!0),n(t,void 0,s,i)))}let l=!1,h=!1;const p=[],d=new Set;let u=0;for(let E=0;E<s.length;E++){const e=s[E];let i;if(!lt(e)||!(i=st(e,"slot",!0))){3!==e.type&&p.push(e);continue}if(c){t.onError(Be(37,i.loc));break}l=!0;const{children:f,loc:m}=e,{arg:_=Se("default",!0),exp:S,loc:T}=i;let g;Je(_)?g=_?_.content:"default":a=!0;const N=st(e,"for"),I=n(S,N,f,m);let y,O;if(y=st(e,"if"))a=!0,r.push(Ie(y.exp,wn(_,I,u++),Dn));else if(O=st(e,/^else(-if)?$/,!0)){let e,n=E;for(;n--&&(e=s[n],3===e.type););if(e&<(e)&&st(e,"if")){s.splice(E,1),E--;let e=r[r.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=O.exp?Ie(O.exp,wn(_,I,u++),Dn):wn(_,I,u++)}else t.onError(Be(30,O.loc))}else if(N){a=!0;const e=N.forParseResult;e?(Mn(e),r.push(ge(t.helper(H),[e.source,Ne(Pn(e),wn(_,I),!0)]))):t.onError(Be(32,N.loc))}else{if(g){if(d.has(g)){t.onError(Be(38,T));continue}d.add(g),"default"===g&&(h=!0)}o.push(_e(_,I))}}if(!c){const e=(e,s)=>{const o=n(e,void 0,s,i);return t.compatConfig&&(o.isNonScopedSlot=!0),_e("default",o)};l?p.length&&p.some((e=>Fn(e)))&&(h?t.onError(Be(39,p[0].loc)):o.push(e(void 0,p))):o.push(e(void 0,s))}const f=a?2:Un(e.children)?3:1;let m=Ee(o.concat(_e("_",Se(f+"",!1))),i);return r.length&&(m=ge(t.helper(q),[m,me(r)])),{slots:m,hasDynamicSlots:a}}function wn(e,t,n){const s=[_e("name",e),_e("fn",t)];return null!=n&&s.push(_e("key",Se(String(n),!0))),Ee(s)}function Un(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||Un(n.children))return!0;break;case 9:if(Un(n.branches))return!0;break;case 10:case 11:if(Un(n.children))return!0}}return!1}function Fn(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():Fn(e.content))}const Bn=new WeakMap,$n=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:s}=e,i=1===e.tagType;let o=i?Hn(e,t):`"${n}"`;const r=h(o)&&o.callee===U;let a,c,l,p,d,u,f=0,m=r||o===C||o===b||!i&&("svg"===n||"foreignObject"===n);if(s.length>0){const n=Gn(e,t,void 0,i,r);a=n.props,f=n.patchFlag,d=n.dynamicPropNames;const s=n.directives;u=s&&s.length?me(s.map((e=>jn(e,t)))):void 0,n.shouldUseBlock&&(m=!0)}if(e.children.length>0){o===v&&(m=!0,f|=1024);if(i&&o!==C&&o!==v){const{slots:n,hasDynamicSlots:s}=Xn(e,t);c=n,s&&(f|=1024)}else if(1===e.children.length&&o!==C){const n=e.children[0],s=n.type,i=5===s||8===s;i&&0===nn(n,t)&&(f|=1),c=i||2===s?n:e.children}else c=e.children}0!==f&&(l=String(f),d&&d.length&&(p=function(e){let t="[";for(let n=0,s=e.length;n<s;n++)t+=JSON.stringify(e[n]),n<s-1&&(t+=", ");return t+"]"}(d))),e.codegenNode=fe(t,o,a,c,l,p,u,!!m,!1,i,e.loc)};function Hn(e,t,n=!1){let{tag:s}=e;const i=Wn(s),o=it(e,"is");if(o)if(i||Xe("COMPILER_IS_ON_ELEMENT",t)){const e=6===o.type?o.value&&Se(o.value.content,!0):o.exp;if(e)return ge(t.helper(U),[e])}else 6===o.type&&o.value.content.startsWith("vue:")&&(s=o.value.content.slice(4));const r=je(s)||t.isBuiltInComponent(s);return r?(n||t.helper(r),r):(t.helper(w),t.components.add(s),mt(s,"component"))}function Gn(e,t,n=e.props,s,i,r=!1){const{tag:a,loc:c,children:h}=e;let u=[];const f=[],m=[],E=h.length>0;let _=!1,S=0,T=!1,g=!1,N=!1,I=!1,y=!1,O=!1;const A=[],C=e=>{u.length&&(f.push(Ee(qn(u),c)),u=[]),e&&f.push(e)},b=({key:e,value:n})=>{if(Je(e)){const r=e.content,a=o(r);if(!a||s&&!i||"onclick"===r.toLowerCase()||"onUpdate:modelValue"===r||p(r)||(I=!0),a&&p(r)&&(O=!0),a&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&nn(n,t)>0)return;"ref"===r?T=!0:"class"===r?g=!0:"style"===r?N=!0:"key"===r||A.includes(r)||A.push(r),!s||"class"!==r&&"style"!==r||A.includes(r)||A.push(r)}else y=!0};for(let o=0;o<n.length;o++){const i=n[o];if(6===i.type){const{loc:e,name:n,nameLoc:s,value:o}=i;let r=!0;if("ref"===n&&(T=!0,t.scopes.vFor>0&&u.push(_e(Se("ref_for",!0),Se("true")))),"is"===n&&(Wn(a)||o&&o.content.startsWith("vue:")||Xe("COMPILER_IS_ON_ELEMENT",t)))continue;u.push(_e(Se(n,!0,s),Se(o?o.content:"",r,o?o.loc:e)))}else{const{name:n,arg:o,exp:h,loc:p,modifiers:T}=i,g="bind"===n,N="on"===n;if("slot"===n){s||t.onError(Be(40,p));continue}if("once"===n||"memo"===n)continue;if("is"===n||g&&ot(o,"is")&&(Wn(a)||Xe("COMPILER_IS_ON_ELEMENT",t)))continue;if(N&&r)continue;if((g&&ot(o,"key")||N&&E&&ot(o,"vue:before-update"))&&(_=!0),g&&ot(o,"ref")&&t.scopes.vFor>0&&u.push(_e(Se("ref_for",!0),Se("true"))),!o&&(g||N)){if(y=!0,h)if(g){if(C(),Xe("COMPILER_V_BIND_OBJECT_ORDER",t)){f.unshift(h);continue}f.push(h)}else C({type:14,loc:p,callee:t.helper(z),arguments:s?[h]:[h,"true"]});else t.onError(Be(g?34:35,p));continue}g&&T.includes("prop")&&(S|=32);const I=t.directiveTransforms[n];if(I){const{props:n,needRuntime:s}=I(i,e,t);!r&&n.forEach(b),N&&o&&!Je(o)?C(Ee(n,c)):u.push(...n),s&&(m.push(i),l(s)&&Bn.set(i,s))}else d(n)||(m.push(i),E&&(_=!0))}}let v;if(f.length?(C(),v=f.length>1?ge(t.helper(j),f,c):f[0]):u.length&&(v=Ee(qn(u),c)),y?S|=16:(g&&!s&&(S|=2),N&&!s&&(S|=4),A.length&&(S|=8),I&&(S|=32)),_||0!==S&&32!==S||!(T||O||m.length>0)||(S|=512),!t.inSSR&&v)switch(v.type){case 15:let e=-1,n=-1,s=!1;for(let t=0;t<v.properties.length;t++){const i=v.properties[t].key;Je(i)?"class"===i.content?e=t:"style"===i.content&&(n=t):i.isHandlerKey||(s=!0)}const i=v.properties[e],o=v.properties[n];s?v=ge(t.helper(Y),[v]):(i&&!Je(i.value)&&(i.value=ge(t.helper(W),[i.value])),o&&(N||4===o.value.type&&"["===o.value.content.trim()[0]||17===o.value.type)&&(o.value=ge(t.helper(K),[o.value])));break;case 14:break;default:v=ge(t.helper(Y),[ge(t.helper(Q),[v])])}return{props:v,directives:m,patchFlag:S,dynamicPropNames:A,shouldUseBlock:_}}function qn(e){const t=new Map,n=[];for(let s=0;s<e.length;s++){const i=e[s];if(8===i.key.type||!i.key.isStatic){n.push(i);continue}const r=i.key.content,a=t.get(r);a?("style"===r||"class"===r||o(r))&&Jn(a,i):(t.set(r,i),n.push(i))}return n}function Jn(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=me([e.value,t.value],e.loc)}function jn(e,t){const n=[],s=Bn.get(e);s?n.push(t.helperString(s)):(t.helper(F),t.directives.add(e.name),n.push(mt(e.name,"directive")));const{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Se("true",!1,i);n.push(Ee(e.modifiers.map((e=>_e(e,t))),i))}return me(n,e.loc)}function Wn(e){return"component"===e||"Component"===e}const Kn=(e,t)=>{if(ht(e)){const{children:n,loc:s}=e,{slotName:i,slotProps:o}=Yn(e,t),r=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let a=2;o&&(r[2]=o,a=3),n.length&&(r[3]=Ne([],n,!1,!1,s),a=4),t.scopeId&&!t.slotted&&(a=5),r.splice(a),e.codegenNode=ge(t.helper(G),r,s)}};function Yn(e,t){let n,s='"default"';const i=[];for(let o=0;o<e.props.length;o++){const t=e.props[o];6===t.type?t.value&&("name"===t.name?s=JSON.stringify(t.value.content):(t.name=m(t.name),i.push(t))):"bind"===t.name&&ot(t.arg,"name")?t.exp&&(s=t.exp):("bind"===t.name&&t.arg&&Je(t.arg)&&(t.arg.content=m(t.arg.content)),i.push(t))}if(i.length>0){const{props:s,directives:o}=Gn(e,t,i,!1,!1);n=s,o.length&&t.onError(Be(36,o[0].loc))}return{slotName:s,slotProps:n}}const Qn=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,zn=(e,t,n,s)=>{const{loc:i,modifiers:o,arg:r}=e;let a;if(4===r.type)if(r.isStatic){let e=r.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);a=Se(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?_(m(e)):`on:${e}`,!0,r.loc)}else a=Te([`${n.helperString(te)}(`,r,")"]);else a=r,a.children.unshift(`${n.helperString(te)}(`),a.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let l=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=tt(c.content),t=!(e||Qn.test(c.content)),n=c.content.includes(";");(t||l&&e)&&(c=Te([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let h={props:[_e(a,c||Se("() => {}",!1,i))]};return s&&(h=s(h)),l&&(h.props[0].value=n.cache(h.props[0].value)),h.props.forEach((e=>e.key.isHandlerKey=!0)),h},Zn=(e,t,n)=>{const{modifiers:s,loc:i}=e,o=e.arg;let{exp:r}=e;if(!r&&4===o.type){const t=m(o.content);r=e.exp=Se(t,!1,o.loc)}return 4!==o.type?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=`${o.content} || ""`),s.includes("camel")&&(4===o.type?o.content=o.isStatic?m(o.content):`${n.helperString(Z)}(${o.content})`:(o.children.unshift(`${n.helperString(Z)}(`),o.children.push(")"))),n.inSSR||(s.includes("prop")&&es(o,"."),s.includes("attr")&&es(o,"^")),!r||4===r.type&&!r.content.trim()?{props:[_e(o,Se("",!0,i))]}:{props:[_e(o,r)]}},es=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},ts=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let s,i=!1;for(let e=0;e<n.length;e++){const t=n[e];if(at(t)){i=!0;for(let i=e+1;i<n.length;i++){const o=n[i];if(!at(o)){s=void 0;break}s||(s=n[e]=Te([t],t.loc)),s.children.push(" + ",o),n.splice(i,1),i--}}}if(i&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e<n.length;e++){const s=n[e];if(at(s)||8===s.type){const i=[];2===s.type&&" "===s.content||i.push(s),t.ssr||0!==nn(s,t)||i.push("1"),n[e]={type:12,content:s,loc:s.loc,codegenNode:ge(t.helper(V),i)}}}}},ns=new WeakSet,ss=(e,t)=>{if(1===e.type&&st(e,"once",!0)){if(ns.has(e)||t.inVOnce||t.inSSR)return;return ns.add(e),t.inVOnce=!0,t.helper(ne),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},is=(e,t,n)=>{const{exp:s,arg:i}=e;if(!s)return n.onError(Be(41,e.loc)),os();const o=s.loc.source,r=4===s.type?s.content:o,a=n.bindingMetadata[o];if("props"===a||"props-aliased"===a)return os();if(!r.trim()||!tt(r))return n.onError(Be(42,s.loc)),os();const c=i||Se("modelValue",!0),l=i?Je(i)?`onUpdate:${m(i.content)}`:Te(['"onUpdate:" + ',i]):"onUpdate:modelValue";let h;h=Te([`${n.isTS?"($event: any)":"$event"} => ((`,s,") = $event)"]);const p=[_e(c,e.exp),_e(l,h)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Ke(e)?e:JSON.stringify(e))+": true")).join(", "),n=i?Je(i)?`${i.content}Modifiers`:Te([i,' + "Modifiers"']):"modelModifiers";p.push(_e(n,Se(`{ ${t} }`,!1,e.loc,2)))}return os(p)};function os(e=[]){return{props:e}}const rs=/[\w).+\-_$\]]/,as=(e,t)=>{Xe("COMPILER_FILTERS",t)&&(5===e.type&&cs(e.content,t),1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&cs(e.exp,t)})))};function cs(e,t){if(4===e.type)ls(e,t);else for(let n=0;n<e.children.length;n++){const s=e.children[n];"object"==typeof s&&(4===s.type?ls(s,t):8===s.type?cs(e,t):5===s.type&&cs(s.content,t))}}function ls(e,t){const n=e.content;let s,i,o,r,a=!1,c=!1,l=!1,h=!1,p=0,d=0,u=0,f=0,m=[];for(o=0;o<n.length;o++)if(i=s,s=n.charCodeAt(o),a)39===s&&92!==i&&(a=!1);else if(c)34===s&&92!==i&&(c=!1);else if(l)96===s&&92!==i&&(l=!1);else if(h)47===s&&92!==i&&(h=!1);else if(124!==s||124===n.charCodeAt(o+1)||124===n.charCodeAt(o-1)||p||d||u){switch(s){case 34:c=!0;break;case 39:a=!0;break;case 96:l=!0;break;case 40:u++;break;case 41:u--;break;case 91:d++;break;case 93:d--;break;case 123:p++;break;case 125:p--}if(47===s){let e,t=o-1;for(;t>=0&&(e=n.charAt(t)," "===e);t--);e&&rs.test(e)||(h=!0)}}else void 0===r?(f=o+1,r=n.slice(0,o).trim()):E();function E(){m.push(n.slice(f,o).trim()),f=o+1}if(void 0===r?r=n.slice(0,o).trim():0!==f&&E(),m.length){for(o=0;o<m.length;o++)r=hs(r,m[o],t);e.content=r}}function hs(e,t,n){n.helper(B);const s=t.indexOf("(");if(s<0)return n.filters.add(t),`${mt(t,"filter")}(${e})`;{const i=t.slice(0,s),o=t.slice(s+1);return n.filters.add(i),`${mt(i,"filter")}(${e}${")"!==o?","+o:o}`}}const ps=new WeakSet,ds=(e,t)=>{if(1===e.type){const n=st(e,"memo");if(!n||ps.has(e))return;return ps.add(e),()=>{const s=e.codegenNode||t.currentNode.codegenNode;s&&13===s.type&&(1!==e.tagType&&be(s,t),e.codegenNode=ge(t.helper(ce),[n.exp,Ne(void 0,s),"_cache",String(t.cached++)]))}}};function us(e){return[[ss,An,ds,xn,as,Kn,$n,kn,ts],{on:zn,bind:Zn,model:is}]}function fs(e,t={}){const n=t.onError||Ue,s="module"===t.mode;!0===t.prefixIdentifiers?n(Be(47)):s&&n(Be(48));t.cacheHandlers&&n(Be(49)),t.scopeId&&!s&&n(Be(50));const i=r({},t,{prefixIdentifiers:!1}),o=c(e)?zt(e,i):e,[a,l]=us();return hn(o,r({},i,{nodeTransforms:[...a,...t.nodeTransforms||[]],directiveTransforms:r({},l,t.directiveTransforms||{})})),En(o,i)}const ms=()=>({props:[]}),Es=Symbol(""),_s=Symbol(""),Ss=Symbol(""),Ts=Symbol(""),gs=Symbol(""),Ns=Symbol(""),Is=Symbol(""),ys=Symbol(""),Os=Symbol(""),As=Symbol("");let Cs;pe({[Es]:"vModelRadio",[_s]:"vModelCheckbox",[Ss]:"vModelText",[Ts]:"vModelSelect",[gs]:"vModelDynamic",[Ns]:"withModifiers",[Is]:"withKeys",[ys]:"vShow",[Os]:"Transition",[As]:"TransitionGroup"});const bs={parseMode:"html",isVoidTag:O,isNativeTag:e=>N(e)||I(e)||y(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return Cs||(Cs=document.createElement("div")),t?(Cs.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Cs.children[0].getAttribute("foo")):(Cs.innerHTML=e,Cs.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?Os:"TransitionGroup"===e||"transition-group"===e?As:void 0,getNamespace(e,t,n){let s=t?t.ns:n;if(t&&2===s)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(s=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(s=0);else t&&1===s&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(s=0));if(0===s){if("svg"===e)return 1;if("math"===e)return 2}return s}},vs=e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Se("style",!0,t.loc),exp:Rs(t.value.content,t.loc),modifiers:[],loc:t.loc})}))},Rs=(e,t)=>{const n=function(e){const t={};return e.replace(g,"").split(S).forEach((e=>{if(e){const n=e.split(T);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}(e);return Se(JSON.stringify(n),!1,t,3)};function xs(e,t){return Be(e,t)}const Ls={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},Ms=t("passive,once,capture"),Ps=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Ds=t("left,right"),ks=t("onkeyup,onkeydown,onkeypress",!0),Vs=(e,t)=>Je(e)&&"onclick"===e.content.toLowerCase()?Se(t,!0):4!==e.type?Te(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Xs=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},ws=[vs],Us={cloak:ms,html:(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(xs(53,i)),t.children.length&&(n.onError(xs(54,i)),t.children.length=0),{props:[_e(Se("innerHTML",!0,i),s||Se("",!0))]}},text:(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(xs(55,i)),t.children.length&&(n.onError(xs(56,i)),t.children.length=0),{props:[_e(Se("textContent",!0),s?nn(s,n)>0?s:ge(n.helperString(J),[s],i):Se("",!0))]}},model:(e,t,n)=>{const s=is(e,t,n);if(!s.props.length||1===t.tagType)return s;e.arg&&n.onError(xs(58,e.arg.loc));const{tag:i}=t,o=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||o){let r=Ss,a=!1;if("input"===i||o){const s=it(t,"type");if(s){if(7===s.type)r=gs;else if(s.value)switch(s.value.content){case"radio":r=Es;break;case"checkbox":r=_s;break;case"file":a=!0,n.onError(xs(59,e.loc))}}else rt(t)&&(r=gs)}else"select"===i&&(r=Ts);a||(s.needRuntime=n.helper(r))}else n.onError(xs(57,e.loc));return s.props=s.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),s},on:(e,t,n)=>zn(e,t,n,(t=>{const{modifiers:s}=e;if(!s.length)return t;let{key:i,value:o}=t.props[0];const{keyModifiers:r,nonKeyModifiers:a,eventOptionModifiers:c}=((e,t,n,s)=>{const i=[],o=[],r=[];for(let a=0;a<t.length;a++){const s=t[a];"native"===s&&we("COMPILER_V_ON_NATIVE",n)||Ms(s)?r.push(s):Ds(s)?Je(e)?ks(e.content)?i.push(s):o.push(s):(i.push(s),o.push(s)):Ps(s)?o.push(s):i.push(s)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:r}})(i,s,n);if(a.includes("right")&&(i=Vs(i,"onContextmenu")),a.includes("middle")&&(i=Vs(i,"onMouseup")),a.length&&(o=ge(n.helper(Ns),[o,JSON.stringify(a)])),!r.length||Je(i)&&!ks(i.content)||(o=ge(n.helper(Is),[o,JSON.stringify(r)])),c.length){const e=c.map(E).join("");i=Je(i)?Se(`${i.content}${e}`,!0):Te(["(",i,`) + "${e}"`])}return{props:[_e(i,o)]}})),show:(e,t,n)=>{const{exp:s,loc:i}=e;return s||n.onError(xs(61,i)),{props:[],needRuntime:n.helper(ys)}}};return e.BASE_TRANSITION=R,e.BindingTypes={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},e.CAMELIZE=Z,e.CAPITALIZE=ee,e.CREATE_BLOCK=L,e.CREATE_COMMENT=k,e.CREATE_ELEMENT_BLOCK=M,e.CREATE_ELEMENT_VNODE=D,e.CREATE_SLOTS=q,e.CREATE_STATIC=X,e.CREATE_TEXT=V,e.CREATE_VNODE=P,e.CompilerDeprecationTypes={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},e.ConstantTypes={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_HOIST:2,2:"CAN_HOIST",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},e.DOMDirectiveTransforms=Us,e.DOMErrorCodes={X_V_HTML_NO_EXPRESSION:53,53:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:54,54:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:55,55:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:56,56:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:57,57:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:58,58:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:59,59:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:60,60:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:61,61:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:62,62:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:63,63:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:64,64:"__EXTEND_POINT__"},e.DOMErrorMessages=Ls,e.DOMNodeTransforms=ws,e.ElementTypes={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},e.ErrorCodes={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_INVALID_EXPRESSION:45,45:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:46,46:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:47,47:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:48,48:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:49,49:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:50,50:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:51,51:"X_VNODE_HOOKS",__EXTEND_POINT__:52,52:"__EXTEND_POINT__"},e.FRAGMENT=A,e.GUARD_REACTIVE_PROPS=Q,e.IS_MEMO_SAME=le,e.IS_REF=ae,e.KEEP_ALIVE=v,e.MERGE_PROPS=j,e.NORMALIZE_CLASS=W,e.NORMALIZE_PROPS=Y,e.NORMALIZE_STYLE=K,e.Namespaces={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},e.NodeTypes={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},e.OPEN_BLOCK=x,e.POP_SCOPE_ID=ie,e.PUSH_SCOPE_ID=se,e.RENDER_LIST=H,e.RENDER_SLOT=G,e.RESOLVE_COMPONENT=w,e.RESOLVE_DIRECTIVE=F,e.RESOLVE_DYNAMIC_COMPONENT=U,e.RESOLVE_FILTER=B,e.SET_BLOCK_TRACKING=ne,e.SUSPENSE=b,e.TELEPORT=C,e.TO_DISPLAY_STRING=J,e.TO_HANDLERS=z,e.TO_HANDLER_KEY=te,e.TRANSITION=Os,e.TRANSITION_GROUP=As,e.TS_NODE_TYPES=qe,e.UNREF=re,e.V_MODEL_CHECKBOX=_s,e.V_MODEL_DYNAMIC=gs,e.V_MODEL_RADIO=Es,e.V_MODEL_SELECT=Ts,e.V_MODEL_TEXT=Ss,e.V_ON_WITH_KEYS=Is,e.V_ON_WITH_MODIFIERS=Ns,e.V_SHOW=ys,e.WITH_CTX=oe,e.WITH_DIRECTIVES=$,e.WITH_MEMO=ce,e.advancePositionWithClone=function(e,t,n=t.length){return nt({offset:e.offset,line:e.line,column:e.column},t,n)},e.advancePositionWithMutation=nt,e.assert=function(e,t){if(!e)throw new Error(t||"unexpected compiler condition")},e.baseCompile=fs,e.baseParse=zt,e.buildDirectiveArgs=jn,e.buildProps=Gn,e.buildSlots=Xn,e.checkCompatEnabled=we,e.compile=function(e,t={}){return fs(e,r({},bs,t,{nodeTransforms:[Xs,...ws,...t.nodeTransforms||[]],directiveTransforms:r({},Us,t.directiveTransforms||{}),transformHoist:null}))},e.convertToBlock=be,e.createArrayExpression=me,e.createAssignmentExpression=function(e,t){return{type:24,left:e,right:t,loc:de}},e.createBlockStatement=Oe,e.createCacheExpression=ye,e.createCallExpression=ge,e.createCompilerError=Be,e.createCompoundExpression=Te,e.createConditionalExpression=Ie,e.createDOMCompilerError=xs,e.createForLoopParams=Pn,e.createFunctionExpression=Ne,e.createIfStatement=function(e,t,n){return{type:23,test:e,consequent:t,alternate:n,loc:de}},e.createInterpolation=function(e,t){return{type:5,loc:t,content:c(e)?Se(e,!1,t):e}},e.createObjectExpression=Ee,e.createObjectProperty=_e,e.createReturnStatement=function(e){return{type:26,returns:e,loc:de}},e.createRoot=ue,e.createSequenceExpression=function(e){return{type:25,expressions:e,loc:de}},e.createSimpleExpression=Se,e.createStructuralDirectiveTransform=dn,e.createTemplateLiteral=function(e){return{type:22,elements:e,loc:de}},e.createTransformContext=ln,e.createVNodeCall=fe,e.errorMessages=$e,e.extractIdentifiers=He,e.findDir=st,e.findProp=it,e.forAliasRE=_t,e.generate=En,e.generateCodeFrame=function(e,t=0,n=e.length){let s=e.split(/(\r?\n)/);const i=s.filter(((e,t)=>t%2==1));s=s.filter(((e,t)=>t%2==0));let o=0;const r=[];for(let a=0;a<s.length;a++)if(o+=s[a].length+(i[a]&&i[a].length||0),o>=t){for(let e=a-2;e<=a+2||n>o;e++){if(e<0||e>=s.length)continue;const c=e+1;r.push(`${c}${" ".repeat(Math.max(3-String(c).length,0))}| ${s[e]}`);const l=s[e].length,h=i[e]&&i[e].length||0;if(e===a){const e=t-(o-(l+h)),s=Math.max(1,n>o?l-e:n-t);r.push(" | "+" ".repeat(e)+"^".repeat(s))}else if(e>a){if(n>o){const e=Math.max(Math.min(n-o,l),1);r.push(" | "+"^".repeat(e))}o+=l+h}}break}return r.join("\n")},e.getBaseTransformPreset=us,e.getConstantType=nn,e.getMemoedVNodeCall=Et,e.getVNodeBlockHelper=Ce,e.getVNodeHelper=Ae,e.hasDynamicKeyVBind=rt,e.hasScopeRef=function e(t,n){if(!t||0===Object.keys(n).length)return!1;switch(t.type){case 1:for(let s=0;s<t.props.length;s++){const i=t.props[s];if(7===i.type&&(e(i.arg,n)||e(i.exp,n)))return!0}return t.children.some((t=>e(t,n)));case 11:return!!e(t.source,n)||t.children.some((t=>e(t,n)));case 9:return t.branches.some((t=>e(t,n)));case 10:return!!e(t.condition,n)||t.children.some((t=>e(t,n)));case 4:return!t.isStatic&&Ke(t.content)&&!!n[t.content];case 8:return t.children.some((t=>h(t)&&e(t,n)));case 5:case 12:return e(t.content,n);default:return!1}},e.helperNameMap=he,e.injectProp=ut,e.isCoreComponent=je,e.isFunctionType=e=>/Function(?:Expression|Declaration)$|Method$/.test(e.type),e.isInDestructureAssignment=function(e,t){if(e&&("ObjectProperty"===e.type||"ArrayPattern"===e.type)){let e=t.length;for(;e--;){const n=t[e];if("AssignmentExpression"===n.type)return!0;if("ObjectProperty"!==n.type&&!n.type.endsWith("Pattern"))break}}return!1},e.isInNewExpression=function(e){let t=e.length;for(;t--;){const n=e[t];if("NewExpression"===n.type)return!0;if("MemberExpression"!==n.type)break}return!1},e.isMemberExpression=tt,e.isMemberExpressionBrowser=Ze,e.isMemberExpressionNode=et,e.isReferencedIdentifier=function(e,t,n){return!1},e.isSimpleIdentifier=Ke,e.isSlotOutlet=ht,e.isStaticArgOf=ot,e.isStaticExp=Je,e.isStaticProperty=Ge,e.isStaticPropertyKey=(e,t)=>Ge(t)&&t.key===e,e.isTemplateNode=lt,e.isText=at,e.isVSlot=ct,e.locStub=de,e.noopDirectiveTransform=ms,e.parse=function(e,t={}){return zt(e,r({},bs,t))},e.parserOptions=bs,e.processExpression=On,e.processFor=Ln,e.processIf=Cn,e.processSlotOutlet=Yn,e.registerRuntimeHelpers=pe,e.resolveComponentType=Hn,e.stringifyExpression=function e(t){return c(t)?t:4===t.type?t.content:t.children.map(e).join("")},e.toValidAssetId=mt,e.trackSlotScopes=kn,e.trackVForSlotScopes=(e,t)=>{let n;if(lt(e)&&e.props.some(ct)&&(n=st(e,"for"))){const e=n.forParseResult;if(e){Mn(e);const{value:n,key:s,index:i}=e,{addIdentifiers:o,removeIdentifiers:r}=t;return n&&o(n),s&&o(s),i&&o(i),()=>{n&&r(n),s&&r(s),i&&r(i)}}}},e.transform=hn,e.transformBind=Zn,e.transformElement=$n,e.transformExpression=(e,t)=>{if(5===e.type)e.content=On(e.content,t);else if(1===e.type)for(let n=0;n<e.props.length;n++){const s=e.props[n];if(7===s.type&&"for"!==s.name){const e=s.exp,n=s.arg;!e||4!==e.type||"on"===s.name&&n||(s.exp=On(e,t,"slot"===s.name)),n&&4===n.type&&!n.isStatic&&(s.arg=On(n,t))}}},e.transformModel=is,e.transformOn=zn,e.transformStyle=vs,e.traverseNode=pn,e.unwrapTSNode=function e(t){return qe.includes(t.type)?e(t.expression):t},e.walkBlockDeclarations=function(e,t){for(const n of e.body)if("VariableDeclaration"===n.type){if(n.declare)continue;for(const e of n.declarations)for(const n of He(e.id))t(n)}else if("FunctionDeclaration"===n.type||"ClassDeclaration"===n.type){if(n.declare||!n.id)continue;t(n.id)}else if("ForOfStatement"===n.type||"ForInStatement"===n.type||"ForStatement"===n.type){const e="ForStatement"===n.type?n.init:n.left;if(e&&"VariableDeclaration"===e.type)for(const n of e.declarations)for(const e of He(n.id))t(e)}},e.walkFunctionParams=function(e,t){for(const n of e.params)for(const e of He(n))t(e)},e.walkIdentifiers=function(e,t,n=!1,s=[],i=Object.create(null)){},e.warnDeprecation=function(e,t,n,...s){if("suppress-warning"===Ve(e,t))return;const{message:i,link:o}=ke[e],r=`(deprecation ${e}) ${"function"==typeof i?i(...s):i}${o?`\n Details: ${o}`:""}`,a=new SyntaxError(r);a.code=e,n&&(a.loc=n),t.onWarn(a)},e}({}); diff --git a/node_modules/@vue/compiler-dom/package.json b/node_modules/@vue/compiler-dom/package.json index 2a0a3880..ee2e0274 100644 --- a/node_modules/@vue/compiler-dom/package.json +++ b/node_modules/@vue/compiler-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-dom", - "version": "3.2.36", + "version": "3.4.15", "description": "@vue/compiler-dom", "main": "index.js", "module": "dist/compiler-dom.esm-bundler.js", @@ -11,6 +11,20 @@ "index.js", "dist" ], + "exports": { + ".": { + "types": "./dist/compiler-dom.d.ts", + "node": { + "production": "./dist/compiler-dom.cjs.prod.js", + "development": "./dist/compiler-dom.cjs.js", + "default": "./index.js" + }, + "module": "./dist/compiler-dom.esm-bundler.js", + "import": "./dist/compiler-dom.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, "sideEffects": false, "buildOptions": { "name": "VueCompilerDOM", @@ -37,7 +51,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme", "dependencies": { - "@vue/shared": "3.2.36", - "@vue/compiler-core": "3.2.36" + "@vue/shared": "3.4.15", + "@vue/compiler-core": "3.4.15" } -} +} \ No newline at end of file diff --git a/node_modules/@vue/compiler-sfc/README.md b/node_modules/@vue/compiler-sfc/README.md index c76618e4..4f8ff3ac 100644 --- a/node_modules/@vue/compiler-sfc/README.md +++ b/node_modules/@vue/compiler-sfc/README.md @@ -4,7 +4,7 @@ **Note: as of 3.2.13+, this package is included as a dependency of the main `vue` package and can be accessed as `vue/compiler-sfc`. This means you no longer need to explicitly install this package and ensure its version match that of `vue`'s. Just use the main `vue/compiler-sfc` deep import instead.** -This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue Single File Components (SFCs) into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader), [rollup-plugin-vue](https://github.com/vuejs/rollup-plugin-vue) and [vite](https://github.com/vitejs/vite). +This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue Single File Components (SFCs) into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader) and [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue). ## API @@ -77,4 +77,4 @@ export default script Options needed for these APIs can be passed via the query string. -For detailed API references and options, check out the source type definitions. For actual usage of these APIs, check out [rollup-plugin-vue](https://github.com/vuejs/rollup-plugin-vue/tree/next) or [vue-loader](https://github.com/vuejs/vue-loader/tree/next). +For detailed API references and options, check out the source type definitions. For actual usage of these APIs, check out [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue) or [vue-loader](https://github.com/vuejs/vue-loader/tree/next). diff --git a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js index e453448d..e79c3e61 100644 --- a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +++ b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js @@ -1,44 +1,108 @@ +/** +* @vue/compiler-sfc v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -var CompilerDOM = require('@vue/compiler-dom'); -var sourceMap = require('source-map'); -var MagicString = require('magic-string'); -var parser$2 = require('@babel/parser'); -var shared = require('@vue/shared'); -var estreeWalker = require('estree-walker'); -var path = require('path'); var compilerCore = require('@vue/compiler-core'); +var CompilerDOM = require('@vue/compiler-dom'); +var sourceMapJs = require('source-map-js'); +var path$3 = require('path'); +var shared = require('@vue/shared'); var url = require('url'); var CompilerSSR = require('@vue/compiler-ssr'); -var fs = require('fs'); -var util$2 = require('util'); -var reactivityTransform = require('@vue/reactivity-transform'); -var _postcss = require('postcss'); +var require$$2 = require('util'); +var require$$0 = require('fs'); +var require$$0$1 = require('postcss'); +var estreeWalker = require('estree-walker'); +var MagicString = require('magic-string'); +var parser$1 = require('@babel/parser'); +var process$1 = require('process'); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; } - -function _interopNamespace(e) { - if (e && e.__esModule) return e; +function _interopNamespaceDefault(e) { var n = Object.create(null); if (e) { - Object.keys(e).forEach(function (k) { + for (var k in e) { n[k] = e[k]; - }); + } } - n['default'] = e; + n.default = e; return Object.freeze(n); } -var CompilerDOM__namespace = /*#__PURE__*/_interopNamespace(CompilerDOM); -var sourceMap__default = /*#__PURE__*/_interopDefaultLegacy(sourceMap); -var MagicString__default = /*#__PURE__*/_interopDefaultLegacy(MagicString); -var path__default = /*#__PURE__*/_interopDefaultLegacy(path); -var CompilerSSR__namespace = /*#__PURE__*/_interopNamespace(CompilerSSR); -var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); -var util__default = /*#__PURE__*/_interopDefaultLegacy(util$2); -var _postcss__default = /*#__PURE__*/_interopDefaultLegacy(_postcss); +var CompilerDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(CompilerDOM); +var CompilerSSR__namespace = /*#__PURE__*/_interopNamespaceDefault(CompilerSSR); +var process__namespace = /*#__PURE__*/_interopNamespaceDefault(process$1); + +const UNKNOWN_TYPE = "Unknown"; +function resolveObjectKey(node, computed) { + switch (node.type) { + case "StringLiteral": + case "NumericLiteral": + return String(node.value); + case "Identifier": + if (!computed) + return node.name; + } + return void 0; +} +function concatStrings(strs) { + return strs.filter((s) => !!s).join(", "); +} +function isLiteralNode(node) { + return node.type.endsWith("Literal"); +} +function isCallOf(node, test) { + return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name))); +} +function toRuntimeTypeString(types) { + return types.length > 1 ? `[${types.join(", ")}]` : types[0]; +} +function getImportedName(specifier) { + if (specifier.type === "ImportSpecifier") + return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value; + else if (specifier.type === "ImportNamespaceSpecifier") + return "*"; + return "default"; +} +function getId(node) { + return node.type === "Identifier" ? node.name : node.type === "StringLiteral" ? node.value : null; +} +const identity = (str) => str; +const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; +const toLowerCase = (str) => str.toLowerCase(); +function toFileNameLowerCase(x) { + return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x; +} +function createGetCanonicalFileName(useCaseSensitiveFileNames) { + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; +} +const normalize = (path$3.posix || path$3).normalize; +const windowsSlashRE = /\\/g; +function normalizePath(p) { + return normalize(p.replace(windowsSlashRE, "/")); +} +const joinPaths = (path$3.posix || path$3).join; +const propNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~\-]/; +function getEscapedPropName(key) { + return propNameEscapeSymbolsRE.test(key) ? JSON.stringify(key) : key; +} +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => doubleEscape ? `\\\\${s}` : `\\${s}` + ); +} + +var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} function pad (hash, len) { while (hash.length < len) { @@ -70,7 +134,7 @@ function foldObject (hash, o, seen) { } function foldValue (input, value, key, seen) { - var hash = fold(fold(fold(input, key), toString(value)), typeof value); + var hash = fold(fold(fold(input, key), toString$1(value)), typeof value); if (value === null) { return fold(hash, 'null'); } @@ -98,7 +162,7 @@ function foldValue (input, value, key, seen) { return fold(hash, value.toString()); } -function toString (o) { +function toString$1 (o) { return Object.prototype.toString.call(o); } @@ -108,6116 +172,5043 @@ function sum (o) { var hashSum = sum; +var hash$1 = /*@__PURE__*/getDefaultExportFromCjs(hashSum); + const CSS_VARS_HELPER = `useCssVars`; -// match v-bind() with max 2-levels of nested parens. -const cssVarRE = /v-bind\s*\(((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/g; function genCssVarsFromList(vars, id, isProd, isSSR = false) { - return `{\n ${vars - .map(key => `"${isSSR ? `--` : ``}${genVarName(id, key, isProd)}": (${key})`) - .join(',\n ')}\n}`; + return `{ + ${vars.map( + (key) => `"${isSSR ? `--` : ``}${genVarName(id, key, isProd, isSSR)}": (${key})` + ).join(",\n ")} +}`; } -function genVarName(id, raw, isProd) { - if (isProd) { - return hashSum(id + raw); - } - else { - return `${id}-${raw.replace(/([^\w-])/g, '_')}`; - } +function genVarName(id, raw, isProd, isSSR = false) { + if (isProd) { + return hash$1(id + raw); + } else { + return `${id}-${getEscapedCssVarName(raw, isSSR)}`; + } } function normalizeExpression(exp) { - exp = exp.trim(); - if ((exp[0] === `'` && exp[exp.length - 1] === `'`) || - (exp[0] === `"` && exp[exp.length - 1] === `"`)) { - return exp.slice(1, -1); - } - return exp; + exp = exp.trim(); + if (exp[0] === `'` && exp[exp.length - 1] === `'` || exp[0] === `"` && exp[exp.length - 1] === `"`) { + return exp.slice(1, -1); + } + return exp; } +const vBindRE = /v-bind\s*\(/g; function parseCssVars(sfc) { - const vars = []; - sfc.styles.forEach(style => { - let match; - // ignore v-bind() in comments /* ... */ - const content = style.content.replace(/\/\*([\s\S]*?)\*\//g, ''); - while ((match = cssVarRE.exec(content))) { - const variable = normalizeExpression(match[1]); - if (!vars.includes(variable)) { - vars.push(variable); - } + const vars = []; + sfc.styles.forEach((style) => { + let match; + const content = style.content.replace(/\/\*([\s\S]*?)\*\/|\/\/.*/g, ""); + while (match = vBindRE.exec(content)) { + const start = match.index + match[0].length; + const end = lexBinding(content, start); + if (end !== null) { + const variable = normalizeExpression(content.slice(start, end)); + if (!vars.includes(variable)) { + vars.push(variable); } - }); - return vars; + } + } + }); + return vars; } -const cssVarsPlugin = opts => { - const { id, isProd } = opts; - return { - postcssPlugin: 'vue-sfc-vars', - Declaration(decl) { - // rewrite CSS variables - if (cssVarRE.test(decl.value)) { - decl.value = decl.value.replace(cssVarRE, (_, $1) => { - return `var(--${genVarName(id, normalizeExpression($1), isProd)})`; - }); - } +function lexBinding(content, start) { + let state = 0 /* inParens */; + let parenDepth = 0; + for (let i = start; i < content.length; i++) { + const char = content.charAt(i); + switch (state) { + case 0 /* inParens */: + if (char === `'`) { + state = 1 /* inSingleQuoteString */; + } else if (char === `"`) { + state = 2 /* inDoubleQuoteString */; + } else if (char === `(`) { + parenDepth++; + } else if (char === `)`) { + if (parenDepth > 0) { + parenDepth--; + } else { + return i; + } } - }; + break; + case 1 /* inSingleQuoteString */: + if (char === `'`) { + state = 0 /* inParens */; + } + break; + case 2 /* inDoubleQuoteString */: + if (char === `"`) { + state = 0 /* inParens */; + } + break; + } + } + return null; +} +const cssVarsPlugin = (opts) => { + const { id, isProd } = opts; + return { + postcssPlugin: "vue-sfc-vars", + Declaration(decl) { + const value = decl.value; + if (vBindRE.test(value)) { + vBindRE.lastIndex = 0; + let transformed = ""; + let lastIndex = 0; + let match; + while (match = vBindRE.exec(value)) { + const start = match.index + match[0].length; + const end = lexBinding(value, start); + if (end !== null) { + const variable = normalizeExpression(value.slice(start, end)); + transformed += value.slice(lastIndex, match.index) + `var(--${genVarName(id, variable, isProd)})`; + lastIndex = end + 1; + } + } + decl.value = transformed + value.slice(lastIndex); + } + } + }; }; cssVarsPlugin.postcss = true; function genCssVarsCode(vars, bindings, id, isProd) { - const varsExp = genCssVarsFromList(vars, id, isProd); - const exp = CompilerDOM.createSimpleExpression(varsExp, false); - const context = CompilerDOM.createTransformContext(CompilerDOM.createRoot([]), { - prefixIdentifiers: true, - inline: true, - bindingMetadata: bindings.__isScriptSetup === false ? undefined : bindings - }); - const transformed = CompilerDOM.processExpression(exp, context); - const transformedString = transformed.type === 4 /* SIMPLE_EXPRESSION */ - ? transformed.content - : transformed.children - .map(c => { - return typeof c === 'string' - ? c - : c.content; - }) - .join(''); - return `_${CSS_VARS_HELPER}(_ctx => (${transformedString}))`; + const varsExp = genCssVarsFromList(vars, id, isProd); + const exp = CompilerDOM.createSimpleExpression(varsExp, false); + const context = CompilerDOM.createTransformContext(CompilerDOM.createRoot([]), { + prefixIdentifiers: true, + inline: true, + bindingMetadata: bindings.__isScriptSetup === false ? void 0 : bindings + }); + const transformed = CompilerDOM.processExpression(exp, context); + const transformedString = transformed.type === 4 ? transformed.content : transformed.children.map((c) => { + return typeof c === "string" ? c : c.content; + }).join(""); + return `_${CSS_VARS_HELPER}(_ctx => (${transformedString}))`; } -// <script setup> already gets the calls injected as part of the transform -// this is only for single normal <script> -function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd) { - return (`\nimport { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue'\n` + - `const __injectCSSVars__ = () => {\n${genCssVarsCode(cssVars, bindings, id, isProd)}}\n` + - `const __setup__ = __default__.setup\n` + - `__default__.setup = __setup__\n` + - ` ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) }\n` + - ` : __injectCSSVars__\n`); +function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd, defaultVar) { + return ` +import { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue' +const __injectCSSVars__ = () => { +${genCssVarsCode( + cssVars, + bindings, + id, + isProd + )}} +const __setup__ = ${defaultVar}.setup +${defaultVar}.setup = __setup__ + ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) } + : __injectCSSVars__ +`; } -var iterator = function (Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value; - } - }; +/** + * @module LRUCache + */ +const perf = typeof performance === 'object' && + performance && + typeof performance.now === 'function' + ? performance + : Date; +const warned = new Set(); +/* c8 ignore start */ +const PROCESS = (typeof process === 'object' && !!process ? process : {}); +/* c8 ignore start */ +const emitWarning = (msg, type, code, fn) => { + typeof PROCESS.emitWarning === 'function' + ? PROCESS.emitWarning(msg, type, code, fn) + : console.error(`[${code}] ${type}: ${msg}`); }; - -var yallist = Yallist; - -Yallist.Node = Node; -Yallist.create = Yallist; - -function Yallist (list) { - var self = this; - if (!(self instanceof Yallist)) { - self = new Yallist(); - } - - self.tail = null; - self.head = null; - self.length = 0; - - if (list && typeof list.forEach === 'function') { - list.forEach(function (item) { - self.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]); - } - } - - return self -} - -Yallist.prototype.removeNode = function (node) { - if (node.list !== this) { - throw new Error('removing node which does not belong to this list') - } - - var next = node.next; - var prev = node.prev; - - if (next) { - next.prev = prev; - } - - if (prev) { - prev.next = next; - } - - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - - return next -}; - -Yallist.prototype.unshiftNode = function (node) { - if (node === this.head) { - return - } - - if (node.list) { - node.list.removeNode(node); - } - - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; -}; - -Yallist.prototype.pushNode = function (node) { - if (node === this.tail) { - return - } - - if (node.list) { - node.list.removeNode(node); - } - - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; -}; - -Yallist.prototype.push = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); - } - return this.length -}; - -Yallist.prototype.unshift = function () { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); - } - return this.length -}; - -Yallist.prototype.pop = function () { - if (!this.tail) { - return undefined - } - - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; - } - this.length--; - return res -}; - -Yallist.prototype.shift = function () { - if (!this.head) { - return undefined - } - - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; - } - this.length--; - return res -}; - -Yallist.prototype.forEach = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } -}; - -Yallist.prototype.forEachReverse = function (fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } -}; - -Yallist.prototype.get = function (n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.next; - } - if (i === n && walker !== null) { - return walker.value - } -}; - -Yallist.prototype.getReverse = function (n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - // abort out of the list early if we hit a cycle - walker = walker.prev; - } - if (i === n && walker !== null) { - return walker.value - } -}; - -Yallist.prototype.map = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.head; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res -}; - -Yallist.prototype.mapReverse = function (fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.tail; walker !== null;) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res -}; - -Yallist.prototype.reduce = function (fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - - return acc -}; - -Yallist.prototype.reduceReverse = function (fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError('Reduce of empty list with no initial value') - } - - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - - return acc -}; - -Yallist.prototype.toArray = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr -}; - -Yallist.prototype.toArrayReverse = function () { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr -}; - -Yallist.prototype.slice = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret -}; - -Yallist.prototype.sliceReverse = function (from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret -}; - -Yallist.prototype.splice = function (start, deleteCount /*, ...nodes */) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; - } - - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (walker === null) { - walker = this.tail; - } - - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; - } - - for (var i = 2; i < arguments.length; i++) { - walker = insert(this, walker, arguments[i]); - } - return ret; -}; - -Yallist.prototype.reverse = function () { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this -}; - -function insert (self, node, value) { - var inserted = node === self.head ? - new Node(value, null, node, self) : - new Node(value, node, node.next, self); - - if (inserted.next === null) { - self.tail = inserted; - } - if (inserted.prev === null) { - self.head = inserted; - } - - self.length++; - - return inserted -} - -function push (self, item) { - self.tail = new Node(item, self.tail, null, self); - if (!self.head) { - self.head = self.tail; - } - self.length++; -} - -function unshift (self, item) { - self.head = new Node(item, null, self.head, self); - if (!self.tail) { - self.tail = self.head; - } - self.length++; -} - -function Node (value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list) - } - - this.list = list; - this.value = value; - - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; - } -} - -try { - // add if support for Symbol.iterator is present - iterator(Yallist); -} catch (er) {} - -// A linked list to keep track of recently-used-ness - - -const MAX = Symbol('max'); -const LENGTH = Symbol('length'); -const LENGTH_CALCULATOR = Symbol('lengthCalculator'); -const ALLOW_STALE = Symbol('allowStale'); -const MAX_AGE = Symbol('maxAge'); -const DISPOSE = Symbol('dispose'); -const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet'); -const LRU_LIST = Symbol('lruList'); -const CACHE = Symbol('cache'); -const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet'); - -const naiveLength = () => 1; - -// lruList is a yallist where the head is the youngest -// item, and the tail is the oldest. the list contains the Hit -// objects as the entries. -// Each Hit object has a reference to its Yallist.Node. This -// never changes. -// -// cache is a Map (or PseudoMap) that matches the keys to -// the Yallist.Node object. -class LRUCache { - constructor (options) { - if (typeof options === 'number') - options = { max: options }; - - if (!options) - options = {}; - - if (options.max && (typeof options.max !== 'number' || options.max < 0)) - throw new TypeError('max must be a non-negative number') - // Kind of weird to have a default max of Infinity, but oh well. - this[MAX] = options.max || Infinity; - - const lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== 'number') - throw new TypeError('maxAge must be a number') - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); - } - - // resize the cache when the max changes. - set max (mL) { - if (typeof mL !== 'number' || mL < 0) - throw new TypeError('max must be a non-negative number') - - this[MAX] = mL || Infinity; - trim(this); - } - get max () { - return this[MAX] - } - - set allowStale (allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - get allowStale () { - return this[ALLOW_STALE] - } - - set maxAge (mA) { - if (typeof mA !== 'number') - throw new TypeError('maxAge must be a non-negative number') - - this[MAX_AGE] = mA; - trim(this); - } - get maxAge () { - return this[MAX_AGE] - } - - // resize the cache when the lengthCalculator changes. - set lengthCalculator (lC) { - if (typeof lC !== 'function') - lC = naiveLength; - - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach(hit => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); - this[LENGTH] += hit.length; - }); - } - trim(this); - } - get lengthCalculator () { return this[LENGTH_CALCULATOR] } - - get length () { return this[LENGTH] } - get itemCount () { return this[LRU_LIST].length } - - rforEach (fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].tail; walker !== null;) { - const prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - - forEach (fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].head; walker !== null;) { - const next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - - keys () { - return this[LRU_LIST].toArray().map(k => k.key) - } - - values () { - return this[LRU_LIST].toArray().map(k => k.value) - } - - reset () { - if (this[DISPOSE] && - this[LRU_LIST] && - this[LRU_LIST].length) { - this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value)); - } - - this[CACHE] = new Map(); // hash of items by key - this[LRU_LIST] = new yallist(); // list of items in order of use recency - this[LENGTH] = 0; // length of items in the list - } - - dump () { - return this[LRU_LIST].map(hit => - isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter(h => h) - } - - dumpLru () { - return this[LRU_LIST] - } - - set (key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - - if (maxAge && typeof maxAge !== 'number') - throw new TypeError('maxAge must be a number') - - const now = maxAge ? Date.now() : 0; - const len = this[LENGTH_CALCULATOR](value, key); - - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)); - return false - } - - const node = this[CACHE].get(key); - const item = node.value; - - // dispose of the old one before overwriting - // split out into 2 ifs for better coverage tracking - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value); - } - - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim(this); - return true - } - - const hit = new Entry(key, value, len, now, maxAge); - - // oversized objects fall out of cache automatically. - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value); - - return false - } - - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim(this); - return true - } - - has (key) { - if (!this[CACHE].has(key)) return false - const hit = this[CACHE].get(key).value; - return !isStale(this, hit) - } - - get (key) { - return get(this, key, true) - } - - peek (key) { - return get(this, key, false) - } - - pop () { - const node = this[LRU_LIST].tail; - if (!node) - return null - - del(this, node); - return node.value - } - - del (key) { - del(this, this[CACHE].get(key)); - } - - load (arr) { - // reset the cache - this.reset(); - - const now = Date.now(); - // A previous serialized cache has the most recent items first - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l]; - const expiresAt = hit.e || 0; - if (expiresAt === 0) - // the item was created without expiration in a non aged cache - this.set(hit.k, hit.v); - else { - const maxAge = expiresAt - now; - // dont add already expired items - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); +let AC = globalThis.AbortController; +let AS = globalThis.AbortSignal; +/* c8 ignore start */ +if (typeof AC === 'undefined') { + //@ts-ignore + AS = class AbortSignal { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(_, fn) { + this._onabort.push(fn); } - } + }; + //@ts-ignore + AC = class AbortController { + constructor() { + warnACPolyfill(); + } + signal = new AS(); + abort(reason) { + if (this.signal.aborted) + return; + //@ts-ignore + this.signal.reason = reason; + //@ts-ignore + this.signal.aborted = true; + //@ts-ignore + for (const fn of this.signal._onabort) { + fn(reason); + } + this.signal.onabort?.(reason); + } + }; + let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; + const warnACPolyfill = () => { + if (!printACPolyfillWarning) + return; + printACPolyfillWarning = false; + emitWarning('AbortController is not defined. If using lru-cache in ' + + 'node 14, load an AbortController polyfill from the ' + + '`node-abort-controller` package. A minimal polyfill is ' + + 'provided for use by LRUCache.fetch(), but it should not be ' + + 'relied upon in other contexts (eg, passing it to other APIs that ' + + 'use AbortController/AbortSignal might have undesirable effects). ' + + 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); + }; +} +/* c8 ignore stop */ +const shouldWarn = (code) => !warned.has(code); +const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); +/* c8 ignore start */ +// This is a little bit ridiculous, tbh. +// The maximum array length is 2^32-1 or thereabouts on most JS impls. +// And well before that point, you're caching the entire world, I mean, +// that's ~32GB of just integers for the next/prev links, plus whatever +// else to hold that many keys and values. Just filling the memory with +// zeroes at init time is brutal when you get that big. +// But why not be complete? +// Maybe in the future, these limits will have expanded. +const getUintArray = (max) => !isPosInt(max) + ? null + : max <= Math.pow(2, 8) + ? Uint8Array + : max <= Math.pow(2, 16) + ? Uint16Array + : max <= Math.pow(2, 32) + ? Uint32Array + : max <= Number.MAX_SAFE_INTEGER + ? ZeroArray + : null; +/* c8 ignore stop */ +class ZeroArray extends Array { + constructor(size) { + super(size); + this.fill(0); } - } - - prune () { - this[CACHE].forEach((value, key) => get(this, key, false)); - } } - -const get = (self, key, doUse) => { - const node = self[CACHE].get(key); - if (node) { - const hit = node.value; - if (isStale(self, hit)) { - del(self, node); - if (!self[ALLOW_STALE]) - return undefined - } else { - if (doUse) { - if (self[UPDATE_AGE_ON_GET]) - node.value.now = Date.now(); - self[LRU_LIST].unshiftNode(node); - } +class Stack { + heap; + length; + // private constructor + static #constructing = false; + static create(max) { + const HeapCls = getUintArray(max); + if (!HeapCls) + return []; + Stack.#constructing = true; + const s = new Stack(max, HeapCls); + Stack.#constructing = false; + return s; } - return hit.value - } -}; - -const isStale = (self, hit) => { - if (!hit || (!hit.maxAge && !self[MAX_AGE])) - return false - - const diff = Date.now() - hit.now; - return hit.maxAge ? diff > hit.maxAge - : self[MAX_AGE] && (diff > self[MAX_AGE]) -}; - -const trim = self => { - if (self[LENGTH] > self[MAX]) { - for (let walker = self[LRU_LIST].tail; - self[LENGTH] > self[MAX] && walker !== null;) { - // We know that we're about to delete this one, and also - // what the next least recently used key will be, so just - // go ahead and set it now. - const prev = walker.prev; - del(self, walker); - walker = prev; + constructor(max, HeapCls) { + /* c8 ignore start */ + if (!Stack.#constructing) { + throw new TypeError('instantiate Stack using Stack.create(n)'); + } + /* c8 ignore stop */ + this.heap = new HeapCls(max); + this.length = 0; + } + push(n) { + this.heap[this.length++] = n; + } + pop() { + return this.heap[--this.length]; } - } -}; - -const del = (self, node) => { - if (node) { - const hit = node.value; - if (self[DISPOSE]) - self[DISPOSE](hit.key, hit.value); - - self[LENGTH] -= hit.length; - self[CACHE].delete(hit.key); - self[LRU_LIST].removeNode(node); - } -}; - -class Entry { - constructor (key, value, length, now, maxAge) { - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; - } -} - -const forEachStep = (self, fn, node, thisp) => { - let hit = node.value; - if (isStale(self, hit)) { - del(self, node); - if (!self[ALLOW_STALE]) - hit = undefined; - } - if (hit) - fn.call(thisp, hit.value, hit.key, self); -}; - -var lruCache = LRUCache; - -function createCache(size = 500) { - return new lruCache(size); -} - -function isRelativeUrl(url) { - const firstChar = url.charAt(0); - return firstChar === '.' || firstChar === '~' || firstChar === '@'; -} -const externalRE = /^(https?:)?\/\//; -function isExternalUrl(url) { - return externalRE.test(url); -} -const dataUrlRE = /^\s*data:/i; -function isDataUrl(url) { - return dataUrlRE.test(url); } /** - * Parses string url into URL object. + * Default export, the thing you're using this module to get. + * + * All properties from the options object (with the exception of + * {@link OptionsBase.max} and {@link OptionsBase.maxSize}) are added as + * normal public members. (`max` and `maxBase` are read-only getters.) + * Changing any of these will alter the defaults for subsequent method calls, + * but is otherwise safe. */ -function parseUrl(url) { - const firstChar = url.charAt(0); - if (firstChar === '~') { - const secondChar = url.charAt(1); - url = url.slice(secondChar === '/' ? 2 : 1); - } - return parseUriParts(url); -} -/** - * vuejs/component-compiler-utils#22 Support uri fragment in transformed require - * @param urlString an url as a string - */ -function parseUriParts(urlString) { - // A TypeError is thrown if urlString is not a string - // @see https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost - return url.parse(shared.isString(urlString) ? urlString : '', false, true); -} - -const defaultAssetUrlOptions = { - base: null, - includeAbsolute: false, - tags: { - video: ['src', 'poster'], - source: ['src'], - img: ['src'], - image: ['xlink:href', 'href'], - use: ['xlink:href', 'href'] - } -}; -const normalizeOptions = (options) => { - if (Object.keys(options).some(key => shared.isArray(options[key]))) { - // legacy option format which directly passes in tags config +class LRUCache { + // properties coming in from the options of these, only max and maxSize + // really *need* to be protected. The rest can be modified, as they just + // set defaults for various methods. + #max; + #maxSize; + #dispose; + #disposeAfter; + #fetchMethod; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort; + // computed properties + #size; + #calculatedSize; + #keyMap; + #keyList; + #valList; + #next; + #prev; + #head; + #tail; + #free; + #disposed; + #sizes; + #starts; + #ttls; + #hasDispose; + #hasFetchMethod; + #hasDisposeAfter; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c) { return { - ...defaultAssetUrlOptions, - tags: options + // properties + starts: c.#starts, + ttls: c.#ttls, + sizes: c.#sizes, + keyMap: c.#keyMap, + keyList: c.#keyList, + valList: c.#valList, + next: c.#next, + prev: c.#prev, + get head() { + return c.#head; + }, + get tail() { + return c.#tail; + }, + free: c.#free, + // methods + isBackgroundFetch: (p) => c.#isBackgroundFetch(p), + backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), + moveToTail: (index) => c.#moveToTail(index), + indexes: (options) => c.#indexes(options), + rindexes: (options) => c.#rindexes(options), + isStale: (index) => c.#isStale(index), }; } - return { - ...defaultAssetUrlOptions, - ...options - }; -}; -const createAssetUrlTransformWithOptions = (options) => { - return (node, context) => transformAssetUrl(node, context, options); -}; -/** - * A `@vue/compiler-core` plugin that transforms relative asset urls into - * either imports or absolute urls. - * - * ``` js - * // Before - * createVNode('img', { src: './logo.png' }) - * - * // After - * import _imports_0 from './logo.png' - * createVNode('img', { src: _imports_0 }) - * ``` - */ -const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => { - if (node.type === 1 /* ELEMENT */) { - if (!node.props.length) { - return; - } - const tags = options.tags || defaultAssetUrlOptions.tags; - const attrs = tags[node.tag]; - const wildCardAttrs = tags['*']; - if (!attrs && !wildCardAttrs) { - return; - } - const assetAttrs = (attrs || []).concat(wildCardAttrs || []); - node.props.forEach((attr, index) => { - if (attr.type !== 6 /* ATTRIBUTE */ || - !assetAttrs.includes(attr.name) || - !attr.value || - isExternalUrl(attr.value.content) || - isDataUrl(attr.value.content) || - attr.value.content[0] === '#' || - (!options.includeAbsolute && !isRelativeUrl(attr.value.content))) { - return; - } - const url = parseUrl(attr.value.content); - if (options.base && attr.value.content[0] === '.') { - // explicit base - directly rewrite relative urls into absolute url - // to avoid generating extra imports - // Allow for full hostnames provided in options.base - const base = parseUrl(options.base); - const protocol = base.protocol || ''; - const host = base.host ? protocol + '//' + base.host : ''; - const basePath = base.path || '/'; - // when packaged in the browser, path will be using the posix- - // only version provided by rollup-plugin-node-builtins. - attr.value.content = - host + - (path__default.posix || path__default).join(basePath, url.path + (url.hash || '')); - return; - } - // otherwise, transform the url into an import. - // this assumes a bundler will resolve the import into the correct - // absolute url (e.g. webpack file-loader) - const exp = getImportsExpressionExp(url.path, url.hash, attr.loc, context); - node.props[index] = { - type: 7 /* DIRECTIVE */, - name: 'bind', - arg: compilerCore.createSimpleExpression(attr.name, true, attr.loc), - exp, - modifiers: [], - loc: attr.loc - }; - }); + // Protected read-only members + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max() { + return this.#max; } -}; -function getImportsExpressionExp(path, hash, loc, context) { - if (path) { - let name; - let exp; - const existingIndex = context.imports.findIndex(i => i.path === path); - if (existingIndex > -1) { - name = `_imports_${existingIndex}`; - exp = context.imports[existingIndex].exp; + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize() { + return this.#maxSize; + } + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize() { + return this.#calculatedSize; + } + /** + * The number of items stored in the cache (read-only) + */ + get size() { + return this.#size; + } + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod() { + return this.#fetchMethod; + } + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose() { + return this.#dispose; + } + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter() { + return this.#disposeAfter; + } + constructor(options) { + const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; + if (max !== 0 && !isPosInt(max)) { + throw new TypeError('max option must be a nonnegative integer'); + } + const UintArray = max ? getUintArray(max) : Array; + if (!UintArray) { + throw new Error('invalid max value: ' + max); + } + this.#max = max; + this.#maxSize = maxSize; + this.maxEntrySize = maxEntrySize || this.#maxSize; + this.sizeCalculation = sizeCalculation; + if (this.sizeCalculation) { + if (!this.#maxSize && !this.maxEntrySize) { + throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); + } + if (typeof this.sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation set to non-function'); + } + } + if (fetchMethod !== undefined && + typeof fetchMethod !== 'function') { + throw new TypeError('fetchMethod must be a function if specified'); + } + this.#fetchMethod = fetchMethod; + this.#hasFetchMethod = !!fetchMethod; + this.#keyMap = new Map(); + this.#keyList = new Array(max).fill(undefined); + this.#valList = new Array(max).fill(undefined); + this.#next = new UintArray(max); + this.#prev = new UintArray(max); + this.#head = 0; + this.#tail = 0; + this.#free = Stack.create(max); + this.#size = 0; + this.#calculatedSize = 0; + if (typeof dispose === 'function') { + this.#dispose = dispose; + } + if (typeof disposeAfter === 'function') { + this.#disposeAfter = disposeAfter; + this.#disposed = []; } else { - name = `_imports_${context.imports.length}`; - exp = compilerCore.createSimpleExpression(name, false, loc, 3 /* CAN_STRINGIFY */); - context.imports.push({ exp, path }); + this.#disposeAfter = undefined; + this.#disposed = undefined; } - if (!hash) { - return exp; + this.#hasDispose = !!this.#dispose; + this.#hasDisposeAfter = !!this.#disposeAfter; + this.noDisposeOnSet = !!noDisposeOnSet; + this.noUpdateTTL = !!noUpdateTTL; + this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; + this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; + this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; + this.ignoreFetchAbort = !!ignoreFetchAbort; + // NB: maxEntrySize is set to maxSize if it's set + if (this.maxEntrySize !== 0) { + if (this.#maxSize !== 0) { + if (!isPosInt(this.#maxSize)) { + throw new TypeError('maxSize must be a positive integer if specified'); + } + } + if (!isPosInt(this.maxEntrySize)) { + throw new TypeError('maxEntrySize must be a positive integer if specified'); + } + this.#initializeSizeTracking(); } - const hashExp = `${name} + '${hash}'`; - const finalExp = compilerCore.createSimpleExpression(hashExp, false, loc, 3 /* CAN_STRINGIFY */); - if (!context.hoistStatic) { - return finalExp; + this.allowStale = !!allowStale; + this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; + this.updateAgeOnGet = !!updateAgeOnGet; + this.updateAgeOnHas = !!updateAgeOnHas; + this.ttlResolution = + isPosInt(ttlResolution) || ttlResolution === 0 + ? ttlResolution + : 1; + this.ttlAutopurge = !!ttlAutopurge; + this.ttl = ttl || 0; + if (this.ttl) { + if (!isPosInt(this.ttl)) { + throw new TypeError('ttl must be a positive integer if specified'); + } + this.#initializeTTLTracking(); } - const existingHoistIndex = context.hoists.findIndex(h => { - return (h && - h.type === 4 /* SIMPLE_EXPRESSION */ && - !h.isStatic && - h.content === hashExp); + // do not allow completely unbounded caches + if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { + throw new TypeError('At least one of max, maxSize, or ttl is required'); + } + if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { + const code = 'LRU_CACHE_UNBOUNDED'; + if (shouldWarn(code)) { + warned.add(code); + const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + + 'result in unbounded memory consumption.'; + emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); + } + } + } + /** + * Return the remaining TTL time for a given entry key + */ + getRemainingTTL(key) { + return this.#keyMap.has(key) ? Infinity : 0; + } + #initializeTTLTracking() { + const ttls = new ZeroArray(this.#max); + const starts = new ZeroArray(this.#max); + this.#ttls = ttls; + this.#starts = starts; + this.#setItemTTL = (index, ttl, start = perf.now()) => { + starts[index] = ttl !== 0 ? start : 0; + ttls[index] = ttl; + if (ttl !== 0 && this.ttlAutopurge) { + const t = setTimeout(() => { + if (this.#isStale(index)) { + this.delete(this.#keyList[index]); + } + }, ttl + 1); + // unref() not supported on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + }; + this.#updateItemAge = index => { + starts[index] = ttls[index] !== 0 ? perf.now() : 0; + }; + this.#statusTTL = (status, index) => { + if (ttls[index]) { + const ttl = ttls[index]; + const start = starts[index]; + /* c8 ignore next */ + if (!ttl || !start) + return; + status.ttl = ttl; + status.start = start; + status.now = cachedNow || getNow(); + const age = status.now - start; + status.remainingTTL = ttl - age; + } + }; + // debounce calls to perf.now() to 1s so we're not hitting + // that costly call repeatedly. + let cachedNow = 0; + const getNow = () => { + const n = perf.now(); + if (this.ttlResolution > 0) { + cachedNow = n; + const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); + // not available on all platforms + /* c8 ignore start */ + if (t.unref) { + t.unref(); + } + /* c8 ignore stop */ + } + return n; + }; + this.getRemainingTTL = key => { + const index = this.#keyMap.get(key); + if (index === undefined) { + return 0; + } + const ttl = ttls[index]; + const start = starts[index]; + if (!ttl || !start) { + return Infinity; + } + const age = (cachedNow || getNow()) - start; + return ttl - age; + }; + this.#isStale = index => { + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; + }; + } + // conditionally set private methods related to TTL + #updateItemAge = () => { }; + #statusTTL = () => { }; + #setItemTTL = () => { }; + /* c8 ignore stop */ + #isStale = () => false; + #initializeSizeTracking() { + const sizes = new ZeroArray(this.#max); + this.#calculatedSize = 0; + this.#sizes = sizes; + this.#removeItemSize = index => { + this.#calculatedSize -= sizes[index]; + sizes[index] = 0; + }; + this.#requireSize = (k, v, size, sizeCalculation) => { + // provisionally accept background fetches. + // actual value size will be checked when they return. + if (this.#isBackgroundFetch(v)) { + return 0; + } + if (!isPosInt(size)) { + if (sizeCalculation) { + if (typeof sizeCalculation !== 'function') { + throw new TypeError('sizeCalculation must be a function'); + } + size = sizeCalculation(v, k); + if (!isPosInt(size)) { + throw new TypeError('sizeCalculation return invalid (expect positive integer)'); + } + } + else { + throw new TypeError('invalid size value (must be positive integer). ' + + 'When maxSize or maxEntrySize is used, sizeCalculation ' + + 'or size must be set.'); + } + } + return size; + }; + this.#addItemSize = (index, size, status) => { + sizes[index] = size; + if (this.#maxSize) { + const maxSize = this.#maxSize - sizes[index]; + while (this.#calculatedSize > maxSize) { + this.#evict(true); + } + } + this.#calculatedSize += sizes[index]; + if (status) { + status.entrySize = size; + status.totalCalculatedSize = this.#calculatedSize; + } + }; + } + #removeItemSize = _i => { }; + #addItemSize = (_i, _s, _st) => { }; + #requireSize = (_k, _v, size, sizeCalculation) => { + if (size || sizeCalculation) { + throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); + } + return 0; + }; + *#indexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#tail; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#head) { + break; + } + else { + i = this.#prev[i]; + } + } + } + } + *#rindexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#head; true;) { + if (!this.#isValidIndex(i)) { + break; + } + if (allowStale || !this.#isStale(i)) { + yield i; + } + if (i === this.#tail) { + break; + } + else { + i = this.#next[i]; + } + } + } + } + #isValidIndex(index) { + return (index !== undefined && + this.#keyMap.get(this.#keyList[index]) === index); + } + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + *entries() { + for (const i of this.#indexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + *rentries() { + for (const i of this.#rindexes()) { + if (this.#valList[i] !== undefined && + this.#keyList[i] !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } + } + } + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + *keys() { + for (const i of this.#indexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + *rkeys() { + for (const i of this.#rindexes()) { + const k = this.#keyList[i]; + if (k !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + *values() { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + *rvalues() { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + if (v !== undefined && + !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator]() { + return this.entries(); + } + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to Array.find(). fn is called as fn(value, key, cache). + */ + find(fn, getOptions = {}) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + if (fn(value, this.#keyList[i], this)) { + return this.get(this.#keyList[i], getOptions); + } + } + } + /** + * Call the supplied function on each item in the cache, in order from + * most recently used to least recently used. fn is called as + * fn(value, key, cache). Does not update age or recenty of use. + * Does not iterate over stale values. + */ + forEach(fn, thisp = this) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn, thisp = this) { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + continue; + fn.call(thisp, value, this.#keyList[i], this); + } + } + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale() { + let deleted = false; + for (const i of this.#rindexes({ allowStale: true })) { + if (this.#isStale(i)) { + this.delete(this.#keyList[i]); + deleted = true; + } + } + return deleted; + } + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Like {@link LRUCache#dump}, but just for a + * single key. Always returns stale values, if their info is found in the + * cache, so be sure to check for expired TTLs if relevant. + */ + info(key) { + const i = this.#keyMap.get(key); + if (i === undefined) + return undefined; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined) + return undefined; + const entry = { value }; + if (this.#ttls && this.#starts) { + const ttl = this.#ttls[i]; + const start = this.#starts[i]; + if (ttl && start) { + const remain = ttl - (perf.now() - start); + entry.ttl = remain; + entry.start = Date.now(); + } + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + return entry; + } + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to cache.load() + */ + dump() { + const arr = []; + for (const i of this.#indexes({ allowStale: true })) { + const key = this.#keyList[i]; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) + ? v.__staleWhileFetching + : v; + if (value === undefined || key === undefined) + continue; + const entry = { value }; + if (this.#ttls && this.#starts) { + entry.ttl = this.#ttls[i]; + // always dump the start relative to a portable timestamp + // it's ok for this to be a bit slow, it's a rare operation. + const age = perf.now() - this.#starts[i]; + entry.start = Math.floor(Date.now() - age); + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + arr.unshift([key, entry]); + } + return arr; + } + /** + * Reset the cache and load in the items in entries in the order listed. + * Note that the shape of the resulting cache may be different if the + * same options are not used in both caches. + */ + load(arr) { + this.clear(); + for (const [key, entry] of arr) { + if (entry.start) { + // entry.start is a portable timestamp, but we may be using + // node's performance.now(), so calculate the offset, so that + // we get the intended remaining TTL, no matter how long it's + // been on ice. + // + // it's ok for this to be a bit slow, it's a rare operation. + const age = Date.now() - entry.start; + entry.start = perf.now() - age; + } + this.set(key, entry.value, entry); + } + } + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + */ + set(k, v, setOptions = {}) { + if (v === undefined) { + this.delete(k); + return this; + } + const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; + let { noUpdateTTL = this.noUpdateTTL } = setOptions; + const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); + // if the item doesn't fit, don't do anything + // NB: maxEntrySize set to maxSize by default + if (this.maxEntrySize && size > this.maxEntrySize) { + if (status) { + status.set = 'miss'; + status.maxEntrySizeExceeded = true; + } + // have to delete, in case something is there already. + this.delete(k); + return this; + } + let index = this.#size === 0 ? undefined : this.#keyMap.get(k); + if (index === undefined) { + // addition + index = (this.#size === 0 + ? this.#tail + : this.#free.length !== 0 + ? this.#free.pop() + : this.#size === this.#max + ? this.#evict(false) + : this.#size); + this.#keyList[index] = k; + this.#valList[index] = v; + this.#keyMap.set(k, index); + this.#next[this.#tail] = index; + this.#prev[index] = this.#tail; + this.#tail = index; + this.#size++; + this.#addItemSize(index, size, status); + if (status) + status.set = 'add'; + noUpdateTTL = false; + } + else { + // update + this.#moveToTail(index); + const oldVal = this.#valList[index]; + if (v !== oldVal) { + if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { + oldVal.__abortController.abort(new Error('replaced')); + const { __staleWhileFetching: s } = oldVal; + if (s !== undefined && !noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(s, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([s, k, 'set']); + } + } + } + else if (!noDisposeOnSet) { + if (this.#hasDispose) { + this.#dispose?.(oldVal, k, 'set'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([oldVal, k, 'set']); + } + } + this.#removeItemSize(index); + this.#addItemSize(index, size, status); + this.#valList[index] = v; + if (status) { + status.set = 'replace'; + const oldValue = oldVal && this.#isBackgroundFetch(oldVal) + ? oldVal.__staleWhileFetching + : oldVal; + if (oldValue !== undefined) + status.oldValue = oldValue; + } + } + else if (status) { + status.set = 'update'; + } + } + if (ttl !== 0 && !this.#ttls) { + this.#initializeTTLTracking(); + } + if (this.#ttls) { + if (!noUpdateTTL) { + this.#setItemTTL(index, ttl, start); + } + if (status) + this.#statusTTL(status, index); + } + if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return this; + } + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop() { + try { + while (this.#size) { + const val = this.#valList[this.#head]; + this.#evict(true); + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; + } + } + else if (val !== undefined) { + return val; + } + } + } + finally { + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } + } + #evict(free) { + const head = this.#head; + const k = this.#keyList[head]; + const v = this.#valList[head]; + if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('evicted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, 'evict'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'evict']); + } + } + this.#removeItemSize(head); + // if we aren't about to use the index, then null these out + if (free) { + this.#keyList[head] = undefined; + this.#valList[head] = undefined; + this.#free.push(head); + } + if (this.#size === 1) { + this.#head = this.#tail = 0; + this.#free.length = 0; + } + else { + this.#head = this.#next[head]; + } + this.#keyMap.delete(k); + this.#size--; + return head; + } + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k, hasOptions = {}) { + const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v) && + v.__staleWhileFetching === undefined) { + return false; + } + if (!this.#isStale(index)) { + if (updateAgeOnHas) { + this.#updateItemAge(index); + } + if (status) { + status.has = 'hit'; + this.#statusTTL(status, index); + } + return true; + } + else if (status) { + status.has = 'stale'; + this.#statusTTL(status, index); + } + } + else if (status) { + status.has = 'miss'; + } + return false; + } + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k, peekOptions = {}) { + const { allowStale = this.allowStale } = peekOptions; + const index = this.#keyMap.get(k); + if (index === undefined || + (!allowStale && this.#isStale(index))) { + return; + } + const v = this.#valList[index]; + // either stale and allowed, or forcing a refresh of non-stale value + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + } + #backgroundFetch(k, index, options, context) { + const v = index === undefined ? undefined : this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + return v; + } + const ac = new AC(); + const { signal } = options; + // when/if our AC signals, then stop listening to theirs. + signal?.addEventListener('abort', () => ac.abort(signal.reason), { + signal: ac.signal, }); - if (existingHoistIndex > -1) { - return compilerCore.createSimpleExpression(`_hoisted_${existingHoistIndex + 1}`, false, loc, 3 /* CAN_STRINGIFY */); - } - return context.hoist(finalExp); - } - else { - return compilerCore.createSimpleExpression(`''`, false, loc, 3 /* CAN_STRINGIFY */); - } -} - -const srcsetTags = ['img', 'source']; -// http://w3c.github.io/html/semantics-embedded-content.html#ref-for-image-candidate-string-5 -const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g; -const createSrcsetTransformWithOptions = (options) => { - return (node, context) => transformSrcset(node, context, options); -}; -const transformSrcset = (node, context, options = defaultAssetUrlOptions) => { - if (node.type === 1 /* ELEMENT */) { - if (srcsetTags.includes(node.tag) && node.props.length) { - node.props.forEach((attr, index) => { - if (attr.name === 'srcset' && attr.type === 6 /* ATTRIBUTE */) { - if (!attr.value) - return; - const value = attr.value.content; - if (!value) - return; - const imageCandidates = value.split(',').map(s => { - // The attribute value arrives here with all whitespace, except - // normal spaces, represented by escape sequences - const [url, descriptor] = s - .replace(escapedSpaceCharacters, ' ') - .trim() - .split(' ', 2); - return { url, descriptor }; - }); - // data urls contains comma after the encoding so we need to re-merge - // them - for (let i = 0; i < imageCandidates.length; i++) { - const { url } = imageCandidates[i]; - if (isDataUrl(url)) { - imageCandidates[i + 1].url = - url + ',' + imageCandidates[i + 1].url; - imageCandidates.splice(i, 1); - } + const fetchOpts = { + signal: ac.signal, + options, + context, + }; + const cb = (v, updateCache = false) => { + const { aborted } = ac.signal; + const ignoreAbort = options.ignoreFetchAbort && v !== undefined; + if (options.status) { + if (aborted && !updateCache) { + options.status.fetchAborted = true; + options.status.fetchError = ac.signal.reason; + if (ignoreAbort) + options.status.fetchAbortIgnored = true; + } + else { + options.status.fetchResolved = true; + } + } + if (aborted && !ignoreAbort && !updateCache) { + return fetchFail(ac.signal.reason); + } + // either we didn't abort, and are still here, or we did, and ignored + const bf = p; + if (this.#valList[index] === p) { + if (v === undefined) { + if (bf.__staleWhileFetching) { + this.#valList[index] = bf.__staleWhileFetching; } - const shouldProcessUrl = (url) => { - return (!isExternalUrl(url) && - !isDataUrl(url) && - (options.includeAbsolute || isRelativeUrl(url))); - }; - // When srcset does not contain any qualified URLs, skip transforming - if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) { - return; + else { + this.delete(k); } - if (options.base) { - const base = options.base; - const set = []; - let needImportTransform = false; - imageCandidates.forEach(candidate => { - let { url, descriptor } = candidate; - descriptor = descriptor ? ` ${descriptor}` : ``; - if (url[0] === '.') { - candidate.url = (path__default.posix || path__default).join(base, url); - set.push(candidate.url + descriptor); - } - else if (shouldProcessUrl(url)) { - needImportTransform = true; - } - else { - set.push(url + descriptor); - } - }); - if (!needImportTransform) { - attr.value.content = set.join(', '); - return; - } + } + else { + if (options.status) + options.status.fetchUpdated = true; + this.set(k, v, fetchOpts.options); + } + } + return v; + }; + const eb = (er) => { + if (options.status) { + options.status.fetchRejected = true; + options.status.fetchError = er; + } + return fetchFail(er); + }; + const fetchFail = (er) => { + const { aborted } = ac.signal; + const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; + const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; + const noDelete = allowStale || options.noDeleteOnFetchRejection; + const bf = p; + if (this.#valList[index] === p) { + // if we allow stale on fetch rejections, then we need to ensure that + // the stale value is not removed from the cache when the fetch fails. + const del = !noDelete || bf.__staleWhileFetching === undefined; + if (del) { + this.delete(k); + } + else if (!allowStaleAborted) { + // still replace the *promise* with the stale value, + // since we are done with the promise at this point. + // leave it untouched if we're still waiting for an + // aborted background fetch that hasn't yet returned. + this.#valList[index] = bf.__staleWhileFetching; + } + } + if (allowStale) { + if (options.status && bf.__staleWhileFetching !== undefined) { + options.status.returnedStale = true; + } + return bf.__staleWhileFetching; + } + else if (bf.__returned === bf) { + throw er; + } + }; + const pcall = (res, rej) => { + const fmp = this.#fetchMethod?.(k, v, fetchOpts); + if (fmp && fmp instanceof Promise) { + fmp.then(v => res(v === undefined ? undefined : v), rej); + } + // ignored, we go until we finish, regardless. + // defer check until we are actually aborting, + // so fetchMethod can override. + ac.signal.addEventListener('abort', () => { + if (!options.ignoreFetchAbort || + options.allowStaleOnFetchAbort) { + res(undefined); + // when it eventually resolves, update the cache. + if (options.allowStaleOnFetchAbort) { + res = v => cb(v, true); } - const compoundExpression = compilerCore.createCompoundExpression([], attr.loc); - imageCandidates.forEach(({ url, descriptor }, index) => { - if (shouldProcessUrl(url)) { - const { path } = parseUrl(url); - let exp; - if (path) { - const existingImportsIndex = context.imports.findIndex(i => i.path === path); - if (existingImportsIndex > -1) { - exp = compilerCore.createSimpleExpression(`_imports_${existingImportsIndex}`, false, attr.loc, 3 /* CAN_STRINGIFY */); - } - else { - exp = compilerCore.createSimpleExpression(`_imports_${context.imports.length}`, false, attr.loc, 3 /* CAN_STRINGIFY */); - context.imports.push({ exp, path }); - } - compoundExpression.children.push(exp); - } - } - else { - const exp = compilerCore.createSimpleExpression(`"${url}"`, false, attr.loc, 3 /* CAN_STRINGIFY */); - compoundExpression.children.push(exp); - } - const isNotLast = imageCandidates.length - 1 > index; - if (descriptor && isNotLast) { - compoundExpression.children.push(` + ' ${descriptor}, ' + `); - } - else if (descriptor) { - compoundExpression.children.push(` + ' ${descriptor}'`); - } - else if (isNotLast) { - compoundExpression.children.push(` + ', ' + `); - } - }); - let exp = compoundExpression; - if (context.hoistStatic) { - exp = context.hoist(compoundExpression); - exp.constType = 3 /* CAN_STRINGIFY */; - } - node.props[index] = { - type: 7 /* DIRECTIVE */, - name: 'bind', - arg: compilerCore.createSimpleExpression('srcset', true, attr.loc), - exp, - modifiers: [], - loc: attr.loc - }; } }); - } - } -}; - -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -function getAugmentedNamespace(n) { - if (n.__esModule) return n; - var a = Object.defineProperty({}, '__esModule', {value: true}); - Object.keys(n).forEach(function (k) { - var d = Object.getOwnPropertyDescriptor(n, k); - Object.defineProperty(a, k, d.get ? d : { - enumerable: true, - get: function () { - return n[k]; - } - }); - }); - return a; -} - -function createCommonjsModule(fn) { - var module = { exports: {} }; - return fn(module, module.exports), module.exports; -} - -function commonjsRequire (path) { - throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); -} - -var consolidate = createCommonjsModule(function (module, exports) { -/* - * Engines which do not support caching of their file contents - * should use the `read()` function defined in consolidate.js - * On top of this, when an engine compiles to a `Function`, - * these functions should either be cached within consolidate.js - * or the engine itself via `options.cache`. This will allow - * users and frameworks to pass `options.cache = true` for - * `NODE_ENV=production`, however edit the file(s) without - * re-loading the application in development. - */ - -/** - * Module dependencies. - */ - - -var path = path__default; - - -var join = path.join; -var resolve = path.resolve; -var extname = path.extname; -var dirname = path.dirname; -var isAbsolute = path.isAbsolute; - -var readCache = {}; - -/** - * Require cache. - */ - -var cacheStore = {}; - -/** - * Require cache. - */ - -var requires = {}; - -/** - * Clear the cache. - * - * @api public - */ - -exports.clearCache = function() { - readCache = {}; - cacheStore = {}; -}; - -/** - * Conditionally cache `compiled` template based - * on the `options` filename and `.cache` boolean. - * - * @param {Object} options - * @param {Function} compiled - * @return {Function} - * @api private - */ - -function cache(options, compiled) { - // cachable - if (compiled && options.filename && options.cache) { - delete readCache[options.filename]; - cacheStore[options.filename] = compiled; - return compiled; - } - - // check cache - if (options.filename && options.cache) { - return cacheStore[options.filename]; - } - - return compiled; -} - -/** - * Read `path` with `options` with - * callback `(err, str)`. When `options.cache` - * is true the template string will be cached. - * - * @param {String} options - * @param {Function} cb - * @api private - */ - -function read(path, options, cb) { - var str = readCache[path]; - var cached = options.cache && str && typeof str === 'string'; - - // cached (only if cached is a string and not a compiled template function) - if (cached) return cb(null, str); - - // read - fs__default.readFile(path, 'utf8', function(err, str) { - if (err) return cb(err); - // remove extraneous utf8 BOM marker - str = str.replace(/^\uFEFF/, ''); - if (options.cache) readCache[path] = str; - cb(null, str); - }); -} - -/** - * Read `path` with `options` with - * callback `(err, str)`. When `options.cache` - * is true the partial string will be cached. - * - * @param {String} options - * @param {Function} fn - * @api private - */ - -function readPartials(path, options, cb) { - if (!options.partials) return cb(); - var keys = Object.keys(options.partials); - var partials = {}; - - function next(index) { - if (index === keys.length) return cb(null, partials); - var key = keys[index]; - var partialPath = options.partials[key]; - - if (partialPath === undefined || partialPath === null || partialPath === false) { - return next(++index); - } - - var file; - if (isAbsolute(partialPath)) { - if (extname(partialPath) !== '') { - file = partialPath; - } else { - file = join(partialPath + extname(path)); - } - } else { - file = join(dirname(path), partialPath + extname(path)); - } - - read(file, options, function(err, str) { - if (err) return cb(err); - partials[key] = str; - next(++index); - }); - } - - next(0); -} - -/** - * promisify - */ -function promisify(cb, fn) { - return new Promise(function(resolve, reject) { - cb = cb || function(err, html) { - if (err) { - return reject(err); - } - resolve(html); - }; - fn(cb); - }); -} - -/** - * fromStringRenderer - */ - -function fromStringRenderer(name) { - return function(path, options, cb) { - options.filename = path; - - return promisify(cb, function(cb) { - readPartials(path, options, function(err, partials) { - var extend = (requires.extend || (requires.extend = util__default._extend)); - var opts = extend({}, options); - opts.partials = partials; - if (err) return cb(err); - if (cache(opts)) { - exports[name].render('', opts, cb); - } else { - read(path, opts, function(err, str) { - if (err) return cb(err); - exports[name].render(str, opts, cb); - }); - } - }); - }); - }; -} - -/** - * velocity support. - */ - -exports.velocityjs = fromStringRenderer('velocityjs'); - -/** - * velocity string support. - */ - -exports.velocityjs.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.velocityjs || (requires.velocityjs = require('velocityjs')); - try { - options.locals = options; - cb(null, engine.render(str, options).trimLeft()); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Liquid support. - */ - -exports.liquid = fromStringRenderer('liquid'); - -/** - * Liquid string support. - */ - -/** - * Note that in order to get filters and custom tags we've had to push - * all user-defined locals down into @locals. However, just to make things - * backwards-compatible, any property of `options` that is left after - * processing and removing `locals`, `meta`, `filters`, `customTags` and - * `includeDir` will also become a local. - */ - -function _renderTinyliquid(engine, str, options, cb) { - var context = engine.newContext(); - var k; - - /** - * Note that there's a bug in the library that doesn't allow us to pass - * the locals to newContext(), hence looping through the keys: - */ - - if (options.locals) { - for (k in options.locals) { - context.setLocals(k, options.locals[k]); - } - delete options.locals; - } - - if (options.meta) { - context.setLocals('page', options.meta); - delete options.meta; - } - - /** - * Add any defined filters: - */ - - if (options.filters) { - for (k in options.filters) { - context.setFilter(k, options.filters[k]); - } - delete options.filters; - } - - /** - * Set up a callback for the include directory: - */ - - var includeDir = options.includeDir || process.cwd(); - - context.onInclude(function(name, callback) { - var extname = path.extname(name) ? '' : '.liquid'; - var filename = path.resolve(includeDir, name + extname); - - fs__default.readFile(filename, {encoding: 'utf8'}, function(err, data) { - if (err) return callback(err); - callback(null, engine.parse(data)); - }); - }); - delete options.includeDir; - - /** - * The custom tag functions need to have their results pushed back - * through the parser, so set up a shim before calling the provided - * callback: - */ - - var compileOptions = { - customTags: {} - }; - - if (options.customTags) { - var tagFunctions = options.customTags; - - for (k in options.customTags) { - /*Tell jshint there's no problem with having this function in the loop */ - /*jshint -W083 */ - compileOptions.customTags[k] = function(context, name, body) { - var tpl = tagFunctions[name](body.trim()); - context.astStack.push(engine.parse(tpl)); - }; - /*jshint +W083 */ - } - delete options.customTags; - } - - /** - * Now anything left in `options` becomes a local: - */ - - for (k in options) { - context.setLocals(k, options[k]); - } - - /** - * Finally, execute the template: - */ - - var tmpl = cache(context) || cache(context, engine.compile(str, compileOptions)); - tmpl(context, cb); -} - -exports.liquid.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.liquid; - var Liquid; - - try { - // set up tinyliquid engine - engine = requires.liquid = require('tinyliquid'); - - // use tinyliquid engine - _renderTinyliquid(engine, str, options, cb); - - return; - - } catch (err) { - - // set up liquid-node engine - try { - Liquid = requires.liquid = require('liquid-node'); - engine = new Liquid.Engine(); - } catch (err) { - throw err; - } - - } - - // use liquid-node engine - try { - var locals = options.locals || {}; - - if (options.meta) { - locals.pages = options.meta; - delete options.meta; - } - - /** - * Add any defined filters: - */ - - if (options.filters) { - engine.registerFilters(options.filters); - delete options.filters; - } - - /** - * Set up a callback for the include directory: - */ - - var includeDir = options.includeDir || process.cwd(); - engine.fileSystem = new Liquid.LocalFileSystem(includeDir, 'liquid'); - delete options.includeDir; - - /** - * The custom tag functions need to have their results pushed back - * through the parser, so set up a shim before calling the provided - * callback: - */ - - if (options.customTags) { - var tagFunctions = options.customTags; - - for (k in options.customTags) { - engine.registerTag(k, tagFunctions[k]); - } - delete options.customTags; - } - - /** - * Now anything left in `options` becomes a local: - */ - - for (var k in options) { - locals[k] = options[k]; - } - - /** - * Finally, execute the template: - */ - - return engine - .parseAndRender(str, locals) - .nodeify(function(err, result) { - if (err) { - throw new Error(err); - } else { - return cb(null, result); - } + }; + if (options.status) + options.status.fetchDispatched = true; + const p = new Promise(pcall).then(cb, eb); + const bf = Object.assign(p, { + __abortController: ac, + __staleWhileFetching: v, + __returned: undefined, }); - - } catch (err) { - cb(err); - } - }); -}; - -/** - * Jade support. - */ - -exports.jade = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.jade; - if (!engine) { - try { - engine = requires.jade = require('jade'); - } catch (err) { - try { - engine = requires.jade = require('then-jade'); - } catch (otherError) { - throw err; + if (index === undefined) { + // internal, don't expose status. + this.set(k, bf, { ...fetchOpts.options, status: undefined }); + index = this.#keyMap.get(k); } - } - } - - try { - var tmpl = cache(options) || cache(options, engine.compileFile(path, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Jade string support. - */ - -exports.jade.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.jade; - if (!engine) { - try { - engine = requires.jade = require('jade'); - } catch (err) { - try { - engine = requires.jade = require('then-jade'); - } catch (otherError) { - throw err; + else { + this.#valList[index] = bf; } - } + return bf; } - - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); + #isBackgroundFetch(p) { + if (!this.#hasFetchMethod) + return false; + const b = p; + return (!!b && + b instanceof Promise && + b.hasOwnProperty('__staleWhileFetching') && + b.__abortController instanceof AC); } - }); -}; - -/** - * Dust support. - */ - -exports.dust = fromStringRenderer('dust'); - -/** - * Dust string support. - */ - -exports.dust.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.dust; - if (!engine) { - try { - engine = requires.dust = require('dust'); - } catch (err) { - try { - engine = requires.dust = require('dustjs-helpers'); - } catch (err) { - engine = requires.dust = require('dustjs-linkedin'); + async fetch(k, fetchOptions = {}) { + const { + // get options + allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, + // set options + ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, + // fetch exclusive options + noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; + if (!this.#hasFetchMethod) { + if (status) + status.fetch = 'get'; + return this.get(k, { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + status, + }); } - } - } - - var ext = 'dust'; - var views = '.'; - - if (options) { - if (options.ext) ext = options.ext; - if (options.views) views = options.views; - if (options.settings && options.settings.views) views = options.settings.views; - } - if (!options || (options && !options.cache)) engine.cache = {}; - - engine.onLoad = function(path, callback) { - if (extname(path) === '') path += '.' + ext; - if (path[0] !== '/') path = views + '/' + path; - read(path, options, callback); - }; - - try { - var templateName; - if (options.filename) { - templateName = options.filename.replace(new RegExp('^' + views + '/'), '').replace(new RegExp('\\.' + ext), ''); - } - - var tmpl = cache(options) || cache(options, engine.compileFn(str, templateName)); - tmpl(options, cb); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Swig support. - */ - -exports.swig = fromStringRenderer('swig'); - -/** - * Swig string support. - */ - -exports.swig.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.swig; - if (!engine) { - try { - engine = requires.swig = require('swig'); - } catch (err) { - try { - engine = requires.swig = require('swig-templates'); - } catch (otherError) { - throw err; + const options = { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + ttl, + noDisposeOnSet, + size, + sizeCalculation, + noUpdateTTL, + noDeleteOnFetchRejection, + allowStaleOnFetchRejection, + allowStaleOnFetchAbort, + ignoreFetchAbort, + status, + signal, + }; + let index = this.#keyMap.get(k); + if (index === undefined) { + if (status) + status.fetch = 'miss'; + const p = this.#backgroundFetch(k, index, options, context); + return (p.__returned = p); } - } - } - - try { - if (options.cache === true) options.cache = 'memory'; - engine.setDefaults({ cache: options.cache }); - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Razor support. - */ - -exports.razor = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.razor; - if (!engine) { - try { - engine = requires.razor = require('razor-tmpl'); - - } catch (err) { - - throw err; - - } - } - try { - - var tmpl = cache(options) || cache(options, (locals) => { - console.log('Rendering razor file', path); - return engine.renderFileSync(path, locals); - }); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * razor string support. - */ - -exports.razor.render = function(str, options, cb) { - return promisify(cb, function(cb) { - - try { - var engine = requires.razor = require('razor-tmpl'); - } catch (err) { - throw err; - } - - try { - var tf = engine.compile(str); - var tmpl = cache(options) || cache(options, tf); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Atpl support. - */ - -exports.atpl = fromStringRenderer('atpl'); - -/** - * Atpl string support. - */ - -exports.atpl.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.atpl || (requires.atpl = require('atpl')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Liquor support, - */ - -exports.liquor = fromStringRenderer('liquor'); - -/** - * Liquor string support. - */ - -exports.liquor.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.liquor || (requires.liquor = require('liquor')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Twig support. - */ - -exports.twig = fromStringRenderer('twig'); - -/** - * Twig string support. - */ - -exports.twig.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.twig || (requires.twig = require('twig').twig); - var templateData = { - data: str, - allowInlineIncludes: options.allowInlineIncludes, - namespaces: options.namespaces, - path: options.path - }; - try { - var tmpl = cache(templateData) || cache(templateData, engine(templateData)); - cb(null, tmpl.render(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * EJS support. - */ - -exports.ejs = fromStringRenderer('ejs'); - -/** - * EJS string support. - */ - -exports.ejs.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.ejs || (requires.ejs = require('ejs')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Eco support. - */ - -exports.eco = fromStringRenderer('eco'); - -/** - * Eco string support. - */ - -exports.eco.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.eco || (requires.eco = require('eco')); - try { - cb(null, engine.render(str, options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Jazz support. - */ - -exports.jazz = fromStringRenderer('jazz'); - -/** - * Jazz string support. - */ - -exports.jazz.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.jazz || (requires.jazz = require('jazz')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - tmpl.eval(options, function(str) { - cb(null, str); - }); - } catch (err) { - cb(err); - } - }); -}; - -/** - * JQTPL support. - */ - -exports.jqtpl = fromStringRenderer('jqtpl'); - -/** - * JQTPL string support. - */ - -exports.jqtpl.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.jqtpl || (requires.jqtpl = require('jqtpl')); - try { - engine.template(str, str); - cb(null, engine.tmpl(str, options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Haml support. - */ - -exports.haml = fromStringRenderer('haml'); - -/** - * Haml string support. - */ - -exports.haml.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.haml || (requires.haml = require('hamljs')); - try { - options.locals = options; - cb(null, engine.render(str, options).trimLeft()); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Hamlet support. - */ - -exports.hamlet = fromStringRenderer('hamlet'); - -/** - * Hamlet string support. - */ - -exports.hamlet.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.hamlet || (requires.hamlet = require('hamlet')); - try { - options.locals = options; - cb(null, engine.render(str, options).trimLeft()); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Whiskers support. - */ - -exports.whiskers = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.whiskers || (requires.whiskers = require('whiskers')); - engine.__express(path, options, cb); - }); -}; - -/** - * Whiskers string support. - */ - -exports.whiskers.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.whiskers || (requires.whiskers = require('whiskers')); - try { - cb(null, engine.render(str, options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Coffee-HAML support. - */ - -exports['haml-coffee'] = fromStringRenderer('haml-coffee'); - -/** - * Coffee-HAML string support. - */ - -exports['haml-coffee'].render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires['haml-coffee'] || (requires['haml-coffee'] = require('haml-coffee')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Hogan support. - */ - -exports.hogan = fromStringRenderer('hogan'); - -/** - * Hogan string support. - */ - -exports.hogan.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.hogan || (requires.hogan = require('hogan.js')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl.render(options, options.partials)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * templayed.js support. - */ - -exports.templayed = fromStringRenderer('templayed'); - -/** - * templayed.js string support. - */ - -exports.templayed.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.templayed || (requires.templayed = require('templayed')); - try { - var tmpl = cache(options) || cache(options, engine(str)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Handlebars support. - */ - -exports.handlebars = fromStringRenderer('handlebars'); - -/** - * Handlebars string support. - */ - -exports.handlebars.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.handlebars || (requires.handlebars = require('handlebars')); - try { - for (var partial in options.partials) { - engine.registerPartial(partial, options.partials[partial]); - } - for (var helper in options.helpers) { - engine.registerHelper(helper, options.helpers[helper]); - } - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Underscore support. - */ - -exports.underscore = fromStringRenderer('underscore'); - -/** - * Underscore string support. - */ - -exports.underscore.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.underscore || (requires.underscore = require('underscore')); - try { - const partials = {}; - for (var partial in options.partials) { - partials[partial] = engine.template(options.partials[partial]); - } - options.partials = partials; - var tmpl = cache(options) || cache(options, engine.template(str, null, options)); - cb(null, tmpl(options).replace(/\n$/, '')); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Lodash support. - */ - -exports.lodash = fromStringRenderer('lodash'); - -/** - * Lodash string support. - */ - -exports.lodash.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.lodash || (requires.lodash = require('lodash')); - try { - var tmpl = cache(options) || cache(options, engine.template(str, options)); - cb(null, tmpl(options).replace(/\n$/, '')); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Pug support. (formerly Jade) - */ - -exports.pug = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.pug; - if (!engine) { - try { - engine = requires.pug = require('pug'); - } catch (err) { - try { - engine = requires.pug = require('then-pug'); - } catch (otherError) { - throw err; + else { + // in cache, maybe already fetching + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + const stale = allowStale && v.__staleWhileFetching !== undefined; + if (status) { + status.fetch = 'inflight'; + if (stale) + status.returnedStale = true; + } + return stale ? v.__staleWhileFetching : (v.__returned = v); + } + // if we force a refresh, that means do NOT serve the cached value, + // unless we are already in the process of refreshing the cache. + const isStale = this.#isStale(index); + if (!forceRefresh && !isStale) { + if (status) + status.fetch = 'hit'; + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + if (status) + this.#statusTTL(status, index); + return v; + } + // ok, it is stale or a forced refresh, and not already fetching. + // refresh the cache. + const p = this.#backgroundFetch(k, index, options, context); + const hasStale = p.__staleWhileFetching !== undefined; + const staleVal = hasStale && allowStale; + if (status) { + status.fetch = isStale ? 'stale' : 'refresh'; + if (staleVal && isStale) + status.returnedStale = true; + } + return staleVal ? p.__staleWhileFetching : (p.__returned = p); } - } } - - try { - var tmpl = cache(options) || cache(options, engine.compileFile(path, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Pug string support. - */ - -exports.pug.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.pug; - if (!engine) { - try { - engine = requires.pug = require('pug'); - } catch (err) { - try { - engine = requires.pug = require('then-pug'); - } catch (otherError) { - throw err; + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k, getOptions = {}) { + const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; + const index = this.#keyMap.get(k); + if (index !== undefined) { + const value = this.#valList[index]; + const fetching = this.#isBackgroundFetch(value); + if (status) + this.#statusTTL(status, index); + if (this.#isStale(index)) { + if (status) + status.get = 'stale'; + // delete only if not an in-flight background fetch + if (!fetching) { + if (!noDeleteOnStaleGet) { + this.delete(k); + } + if (status && allowStale) + status.returnedStale = true; + return allowStale ? value : undefined; + } + else { + if (status && + allowStale && + value.__staleWhileFetching !== undefined) { + status.returnedStale = true; + } + return allowStale ? value.__staleWhileFetching : undefined; + } + } + else { + if (status) + status.get = 'hit'; + // if we're currently fetching it, we don't actually have it yet + // it's not stale, which means this isn't a staleWhileRefetching. + // If it's not stale, and fetching, AND has a __staleWhileFetching + // value, then that means the user fetched with {forceRefresh:true}, + // so it's safe to return that value. + if (fetching) { + return value.__staleWhileFetching; + } + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + return value; + } + } + else if (status) { + status.get = 'miss'; } - } } + #connect(p, n) { + this.#prev[n] = p; + this.#next[p] = n; + } + #moveToTail(index) { + // if tail already, nothing to do + // if head, move head to next[index] + // else + // move next[prev[index]] to next[index] (head has no prev) + // move prev[next[index]] to prev[index] + // prev[index] = tail + // next[tail] = index + // tail = index + if (index !== this.#tail) { + if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + this.#connect(this.#prev[index], this.#next[index]); + } + this.#connect(this.#tail, index); + this.#tail = index; + } + } + /** + * Deletes a key out of the cache. + * Returns true if the key was deleted, false otherwise. + */ + delete(k) { + let deleted = false; + if (this.#size !== 0) { + const index = this.#keyMap.get(k); + if (index !== undefined) { + deleted = true; + if (this.#size === 1) { + this.clear(); + } + else { + this.#removeItemSize(index); + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + this.#dispose?.(v, k, 'delete'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'delete']); + } + } + this.#keyMap.delete(k); + this.#keyList[index] = undefined; + this.#valList[index] = undefined; + if (index === this.#tail) { + this.#tail = this.#prev[index]; + } + else if (index === this.#head) { + this.#head = this.#next[index]; + } + else { + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; + } + this.#size--; + this.#free.push(index); + } + } + } + if (this.#hasDisposeAfter && this.#disposed?.length) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + return deleted; + } + /** + * Clear the cache entirely, throwing away all values. + */ + clear() { + for (const index of this.#rindexes({ allowStale: true })) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error('deleted')); + } + else { + const k = this.#keyList[index]; + if (this.#hasDispose) { + this.#dispose?.(v, k, 'delete'); + } + if (this.#hasDisposeAfter) { + this.#disposed?.push([v, k, 'delete']); + } + } + } + this.#keyMap.clear(); + this.#valList.fill(undefined); + this.#keyList.fill(undefined); + if (this.#ttls && this.#starts) { + this.#ttls.fill(0); + this.#starts.fill(0); + } + if (this.#sizes) { + this.#sizes.fill(0); + } + this.#head = 0; + this.#tail = 0; + this.#free.length = 0; + this.#calculatedSize = 0; + this.#size = 0; + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while ((task = dt?.shift())) { + this.#disposeAfter?.(...task); + } + } + } +} - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); +function createCache(max = 500) { + return new LRUCache({ max }); +} + +function isImportUsed(local, sfc) { + return resolveTemplateUsedIdentifiers(sfc).has(local); +} +const templateUsageCheckCache = createCache(); +function resolveTemplateUsedIdentifiers(sfc) { + const { content, ast } = sfc.template; + const cached = templateUsageCheckCache.get(content); + if (cached) { + return cached; + } + const ids = /* @__PURE__ */ new Set(); + ast.children.forEach(walk); + function walk(node) { + var _a; + switch (node.type) { + case 1: + let tag = node.tag; + if (tag.includes(".")) + tag = tag.split(".")[0].trim(); + if (!CompilerDOM.parserOptions.isNativeTag(tag) && !CompilerDOM.parserOptions.isBuiltInComponent(tag)) { + ids.add(shared.camelize(tag)); + ids.add(shared.capitalize(shared.camelize(tag))); + } + for (let i = 0; i < node.props.length; i++) { + const prop = node.props[i]; + if (prop.type === 7) { + if (!shared.isBuiltInDirective(prop.name)) { + ids.add(`v${shared.capitalize(shared.camelize(prop.name))}`); + } + if (prop.arg && !prop.arg.isStatic) { + extractIdentifiers(ids, prop.arg); + } + if (prop.name === "for") { + extractIdentifiers(ids, prop.forParseResult.source); + } else if (prop.exp) { + extractIdentifiers(ids, prop.exp); + } + } + if (prop.type === 6 && prop.name === "ref" && ((_a = prop.value) == null ? void 0 : _a.content)) { + ids.add(prop.value.content); + } + } + node.children.forEach(walk); + break; + case 5: + extractIdentifiers(ids, node.content); + break; + } + } + templateUsageCheckCache.set(content, ids); + return ids; +} +function extractIdentifiers(ids, node) { + if (node.ast) { + CompilerDOM.walkIdentifiers(node.ast, (n) => ids.add(n.name)); + } else if (node.ast === null) { + ids.add(node.content); + } +} + +const DEFAULT_FILENAME = "anonymous.vue"; +const parseCache$1 = createCache(); +function genCacheKey(source, options) { + var _a; + return source + JSON.stringify( + { + ...options, + compiler: { parse: (_a = options.compiler) == null ? void 0 : _a.parse } + }, + (_, val) => typeof val === "function" ? val.toString() : val + ); +} +function parse$2(source, options = {}) { + const sourceKey = genCacheKey(source, options); + const cache = parseCache$1.get(sourceKey); + if (cache) { + return cache; + } + const { + sourceMap = true, + filename = DEFAULT_FILENAME, + sourceRoot = "", + pad = false, + ignoreEmpty = true, + compiler = CompilerDOM__namespace, + templateParseOptions = {}, + parseExpressions = true + } = options; + const descriptor = { + filename, + source, + template: null, + script: null, + scriptSetup: null, + styles: [], + customBlocks: [], + cssVars: [], + slotted: false, + shouldForceReload: (prevImports) => hmrShouldReload(prevImports, descriptor) + }; + const errors = []; + const ast = compiler.parse(source, { + parseMode: "sfc", + prefixIdentifiers: parseExpressions, + ...templateParseOptions, + onError: (e) => { + errors.push(e); } }); -}; - -/** - * QEJS support. - */ - -exports.qejs = fromStringRenderer('qejs'); - -/** - * QEJS string support. - */ - -exports.qejs.render = function(str, options, cb) { - return promisify(cb, function(cb) { - try { - var engine = requires.qejs || (requires.qejs = require('qejs')); - engine.render(str, options).then(function(result) { - cb(null, result); - }, function(err) { - cb(err); - }).done(); - } catch (err) { - cb(err); + ast.children.forEach((node) => { + if (node.type !== 1) { + return; } - }); -}; - -/** - * Walrus support. - */ - -exports.walrus = fromStringRenderer('walrus'); - -/** - * Walrus string support. - */ - -exports.walrus.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.walrus || (requires.walrus = require('walrus')); - try { - var tmpl = cache(options) || cache(options, engine.parse(str)); - cb(null, tmpl.compile(options)); - } catch (err) { - cb(err); + if (ignoreEmpty && node.tag !== "template" && isEmpty(node) && !hasSrc(node)) { + return; } - }); -}; - -/** - * Mustache support. - */ - -exports.mustache = fromStringRenderer('mustache'); - -/** - * Mustache string support. - */ - -exports.mustache.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.mustache || (requires.mustache = require('mustache')); - try { - cb(null, engine.render(str, options, options.partials)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Just support. - */ - -exports.just = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.just; - if (!engine) { - var JUST = require('just'); - engine = requires.just = new JUST(); - } - engine.configure({ useCache: options.cache }); - engine.render(path, options, cb); - }); -}; - -/** - * Just string support. - */ - -exports.just.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var JUST = require('just'); - var engine = new JUST({ root: { page: str }}); - engine.render('page', options, cb); - }); -}; - -/** - * ECT support. - */ - -exports.ect = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.ect; - if (!engine) { - var ECT = require('ect'); - engine = requires.ect = new ECT(options); - } - engine.configure({ cache: options.cache }); - engine.render(path, options, cb); - }); -}; - -/** - * ECT string support. - */ - -exports.ect.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var ECT = require('ect'); - var engine = new ECT({ root: { page: str }}); - engine.render('page', options, cb); - }); -}; - -/** - * mote support. - */ - -exports.mote = fromStringRenderer('mote'); - -/** - * mote string support. - */ - -exports.mote.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.mote || (requires.mote = require('mote')); - try { - var tmpl = cache(options) || cache(options, engine.compile(str)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Toffee support. - */ - -exports.toffee = function(path, options, cb) { - return promisify(cb, function(cb) { - var toffee = requires.toffee || (requires.toffee = require('toffee')); - toffee.__consolidate_engine_render(path, options, cb); - }); -}; - -/** - * Toffee string support. - */ - -exports.toffee.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.toffee || (requires.toffee = require('toffee')); - try { - engine.str_render(str, options, cb); - } catch (err) { - cb(err); - } - }); -}; - -/** - * doT support. - */ - -exports.dot = fromStringRenderer('dot'); - -/** - * doT string support. - */ - -exports.dot.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.dot || (requires.dot = require('dot')); - var extend = (requires.extend || (requires.extend = util__default._extend)); - try { - var settings = {}; - settings = extend(settings, engine.templateSettings); - settings = extend(settings, options ? options.dot : {}); - var tmpl = cache(options) || cache(options, engine.template(str, settings, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * bracket support. - */ - -exports.bracket = fromStringRenderer('bracket'); - -/** - * bracket string support. - */ - -exports.bracket.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.bracket || (requires.bracket = require('bracket-template')); - try { - var tmpl = cache(options) || cache(options, engine.default.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Ractive support. - */ - -exports.ractive = fromStringRenderer('ractive'); - -/** - * Ractive string support. - */ - -exports.ractive.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var Engine = requires.ractive || (requires.ractive = require('ractive')); - - var template = cache(options) || cache(options, Engine.parse(str)); - options.template = template; - - if (options.data === null || options.data === undefined) { - var extend = (requires.extend || (requires.extend = util__default._extend)); - - // Shallow clone the options object - options.data = extend({}, options); - - // Remove consolidate-specific properties from the clone - var i; - var length; - var properties = ['template', 'filename', 'cache', 'partials']; - for (i = 0, length = properties.length; i < length; i++) { - var property = properties[i]; - delete options.data[property]; - } - } - - try { - cb(null, new Engine(options).toHTML()); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Nunjucks support. - */ - -exports.nunjucks = fromStringRenderer('nunjucks'); - -/** - * Nunjucks string support. - */ - -exports.nunjucks.render = function(str, options, cb) { - return promisify(cb, function(cb) { - - try { - - var engine = options.nunjucksEnv || requires.nunjucks || (requires.nunjucks = require('nunjucks')); - - var env = engine; - - // deprecated fallback support for express - // <https://github.com/tj/consolidate.js/pull/152> - // <https://github.com/tj/consolidate.js/pull/224> - if (options.settings && options.settings.views) { - env = engine.configure(options.settings.views); - } else if (options.nunjucks && options.nunjucks.configure) { - env = engine.configure.apply(engine, options.nunjucks.configure); - } - - // - // because `renderString` does not initiate loaders - // we must manually create a loader for it based off - // either `options.settings.views` or `options.nunjucks` or `options.nunjucks.root` - // - // <https://github.com/mozilla/nunjucks/issues/730> - // <https://github.com/crocodilejs/node-email-templates/issues/182> - // - - // so instead we simply check if we passed a custom loader - // otherwise we create a simple file based loader - if (options.loader) { - env = new engine.Environment(options.loader); - } else if (options.settings && options.settings.views) { - env = new engine.Environment( - new engine.FileSystemLoader(options.settings.views) - ); - } else if (options.nunjucks && options.nunjucks.loader) { - if (typeof options.nunjucks.loader === 'string') { - env = new engine.Environment(new engine.FileSystemLoader(options.nunjucks.loader)); + switch (node.tag) { + case "template": + if (!descriptor.template) { + const templateBlock = descriptor.template = createBlock( + node, + source, + false + ); + if (!templateBlock.attrs.src) { + templateBlock.ast = compilerCore.createRoot(node.children, source); + } + if (templateBlock.attrs.functional) { + const err = new SyntaxError( + `<template functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal <template> instead.` + ); + err.loc = node.props.find( + (p) => p.type === 6 && p.name === "functional" + ).loc; + errors.push(err); + } } else { - env = new engine.Environment( - new engine.FileSystemLoader( - options.nunjucks.loader[0], - options.nunjucks.loader[1] + errors.push(createDuplicateBlockError(node)); + } + break; + case "script": + const scriptBlock = createBlock(node, source, pad); + const isSetup = !!scriptBlock.attrs.setup; + if (isSetup && !descriptor.scriptSetup) { + descriptor.scriptSetup = scriptBlock; + break; + } + if (!isSetup && !descriptor.script) { + descriptor.script = scriptBlock; + break; + } + errors.push(createDuplicateBlockError(node, isSetup)); + break; + case "style": + const styleBlock = createBlock(node, source, pad); + if (styleBlock.attrs.vars) { + errors.push( + new SyntaxError( + `<style vars> has been replaced by a new proposal: https://github.com/vuejs/rfcs/pull/231` ) ); } - } - - env.renderString(str, options, cb); - } catch (err) { - throw cb(err); + descriptor.styles.push(styleBlock); + break; + default: + descriptor.customBlocks.push(createBlock(node, source, pad)); + break; } }); -}; - -/** - * HTMLing support. - */ - -exports.htmling = fromStringRenderer('htmling'); - -/** - * HTMLing string support. - */ - -exports.htmling.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.htmling || (requires.htmling = require('htmling')); - try { - var tmpl = cache(options) || cache(options, engine.string(str)); - cb(null, tmpl.render(options)); - } catch (err) { - cb(err); + if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) { + errors.push( + new SyntaxError( + `At least one <template> or <script> is required in a single file component.` + ) + ); + } + if (descriptor.scriptSetup) { + if (descriptor.scriptSetup.src) { + errors.push( + new SyntaxError( + `<script setup> cannot use the "src" attribute because its syntax will be ambiguous outside of the component.` + ) + ); + descriptor.scriptSetup = null; } - }); -}; - -/** - * Rendering function - */ -function requireReact(module, filename) { - var babel = requires.babel || (requires.babel = require('babel-core')); - - var compiled = babel.transformFileSync(filename, { presets: [ 'react' ] }).code; - - return module._compile(compiled, filename); -} - -exports.requireReact = requireReact; - -/** - * Converting a string into a node module. - */ -function requireReactString(src, filename) { - var babel = requires.babel || (requires.babel = require('babel-core')); - - if (!filename) filename = ''; - var m = new module.constructor(); - filename = filename || ''; - - // Compile Using React - var compiled = babel.transform(src, { presets: [ 'react' ] }).code; - - // Compile as a module - m.paths = module.paths; - m._compile(compiled, filename); - - return m.exports; -} - -/** - * A naive helper to replace {{tags}} with options.tags content - */ -function reactBaseTmpl(data, options) { - - var exp; - var regex; - - // Iterates through the keys in file object - // and interpolate / replace {{key}} with it's value - for (var k in options) { - if (options.hasOwnProperty(k)) { - exp = '{{' + k + '}}'; - regex = new RegExp(exp, 'g'); - if (data.match(regex)) { - data = data.replace(regex, options[k]); - } + if (descriptor.script && descriptor.script.src) { + errors.push( + new SyntaxError( + `<script> cannot use the "src" attribute when <script setup> is also present because they must be processed together.` + ) + ); + descriptor.script = null; } } - - return data; -} - -/** -* Plates Support. -*/ - -exports.plates = fromStringRenderer('plates'); - -/** -* Plates string support. -*/ - -exports.plates.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.plates || (requires.plates = require('plates')); - var map = options.map || undefined; - try { - var tmpl = engine.bind(str, options, map); - cb(null, tmpl); - } catch (err) { - cb(err); - } - }); -}; - -/** - * The main render parser for React bsaed templates - */ -function reactRenderer(type) { - - if (commonjsRequire.extensions) { - - // Ensure JSX is transformed on require - if (!commonjsRequire.extensions['.jsx']) { - commonjsRequire.extensions['.jsx'] = requireReact; - } - - // Supporting .react extension as well as test cases - // Using .react extension is not recommended. - if (!commonjsRequire.extensions['.react']) { - commonjsRequire.extensions['.react'] = requireReact; - } - + let templateColumnOffset = 0; + if (descriptor.template && (descriptor.template.lang === "pug" || descriptor.template.lang === "jade")) { + [descriptor.template.content, templateColumnOffset] = dedent( + descriptor.template.content + ); } - - // Return rendering fx - return function(str, options, cb) { - return promisify(cb, function(cb) { - // React Import - var ReactDOM = requires.ReactDOM || (requires.ReactDOM = require('react-dom/server')); - var react = requires.react || (requires.react = require('react')); - - // Assign HTML Base - var base = options.base; - delete options.base; - - var enableCache = options.cache; - delete options.cache; - - var isNonStatic = options.isNonStatic; - delete options.isNonStatic; - - // Start Conversion - try { - - var Code; - var Factory; - - var baseStr; - var content; - var parsed; - - if (!cache(options)) { - // Parsing - if (type === 'path') { - var path = resolve(str); - delete require.cache[path]; - Code = commonjsRequire(path); - } else { - Code = requireReactString(str); - } - Factory = cache(options, react.createFactory(Code)); - - } else { - Factory = cache(options); - } - - parsed = new Factory(options); - content = (isNonStatic) ? ReactDOM.renderToString(parsed) : ReactDOM.renderToStaticMarkup(parsed); - - if (base) { - baseStr = readCache[str] || fs__default.readFileSync(resolve(base), 'utf8'); - - if (enableCache) { - readCache[str] = baseStr; - } - - options.content = content; - content = reactBaseTmpl(baseStr, options); - } - - cb(null, content); - - } catch (err) { - cb(err); + if (sourceMap) { + const genMap = (block, columnOffset = 0) => { + if (block && !block.src) { + block.map = generateSourceMap( + filename, + source, + block.content, + sourceRoot, + !pad || block.type === "template" ? block.loc.start.line - 1 : 0, + columnOffset + ); } - }); - }; -} - -/** - * React JS Support - */ -exports.react = reactRenderer('path'); - -/** - * React JS string support. - */ -exports.react.render = reactRenderer('string'); - -/** - * ARC-templates support. - */ - -exports['arc-templates'] = fromStringRenderer('arc-templates'); - -/** - * ARC-templates string support. - */ - -exports['arc-templates'].render = function(str, options, cb) { - var readFileWithOptions = util__default.promisify(read); - var consolidateFileSystem = {}; - consolidateFileSystem.readFile = function(path) { - return readFileWithOptions(path, options); - }; - - return promisify(cb, function(cb) { - try { - var engine = requires['arc-templates']; - if (!engine) { - var Engine = require('arc-templates/dist/es5'); - engine = requires['arc-templates'] = new Engine({ filesystem: consolidateFileSystem }); - } - - var compiler = cache(options) || cache(options, engine.compileString(str, options.filename)); - compiler.then(function(func) { return func(options); }) - .then(function(result) { cb(null, result.content); }) - .catch(cb); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Vash support - */ -exports.vash = fromStringRenderer('vash'); - -/** - * Vash string support - */ -exports.vash.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.vash || (requires.vash = require('vash')); - - try { - // helper system : https://github.com/kirbysayshi/vash#helper-system - if (options.helpers) { - for (var key in options.helpers) { - if (!options.helpers.hasOwnProperty(key) || typeof options.helpers[key] !== 'function') { - continue; - } - engine.helpers[key] = options.helpers[key]; - } - } - - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - tmpl(options, function sealLayout(err, ctx) { - if (err) cb(err); - ctx.finishLayout(); - cb(null, ctx.toString().replace(/\n$/, '')); - }); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Slm support. - */ - -exports.slm = fromStringRenderer('slm'); - -/** - * Slm string support. - */ - -exports.slm.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.slm || (requires.slm = require('slm')); - - try { - var tmpl = cache(options) || cache(options, engine.compile(str, options)); - cb(null, tmpl(options)); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Marko support. - */ - -exports.marko = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.marko || (requires.marko = require('marko')); - options.writeToDisk = !!options.cache; - - try { - var tmpl = cache(options) || cache(options, engine.load(path, options)); - tmpl.renderToString(options, cb); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Marko string support. - */ - -exports.marko.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.marko || (requires.marko = require('marko')); - options.writeToDisk = !!options.cache; - options.filename = options.filename || 'string.marko'; - - try { - var tmpl = cache(options) || cache(options, engine.load(options.filename, str, options)); - tmpl.renderToString(options, cb); - } catch (err) { - cb(err); - } - }); -}; - -/** - * Teacup support. - */ -exports.teacup = function(path, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.teacup || (requires.teacup = require('teacup/lib/express')); - commonjsRequire.extensions['.teacup'] = commonjsRequire.extensions['.coffee']; - if (path[0] !== '/') { - path = join(process.cwd(), path); - } - if (!options.cache) { - var callback = cb; - cb = function() { - delete require.cache[path]; - callback.apply(this, arguments); - }; - } - engine.renderFile(path, options, cb); - }); -}; - -/** - * Teacup string support. - */ -exports.teacup.render = function(str, options, cb) { - var coffee = require('coffee-script'); - var vm = require('vm'); - var sandbox = { - module: {exports: {}}, - require: commonjsRequire - }; - return promisify(cb, function(cb) { - vm.runInNewContext(coffee.compile(str), sandbox); - var tmpl = sandbox.module.exports; - cb(null, tmpl(options)); - }); -}; - -/** - * Squirrelly support. - */ - -exports.squirrelly = fromStringRenderer('squirrelly'); - -/** - * Squirrelly string support. - */ - -exports.squirrelly.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.squirrelly || (requires.squirrelly = require('squirrelly')); - try { - for (var partial in options.partials) { - engine.definePartial(partial, options.partials[partial]); - } - for (var helper in options.helpers) { - engine.defineHelper(helper, options.helpers[helper]); - } - var tmpl = cache(options) || cache(options, engine.Compile(str, options)); - cb(null, tmpl(options, engine)); - } catch (err) { - cb(err); - } - }); -}; -/** - * Twing support. - */ - -exports.twing = fromStringRenderer('twing'); - -/** - * Twing string support. - */ - -exports.twing.render = function(str, options, cb) { - return promisify(cb, function(cb) { - var engine = requires.twing || (requires.twing = require('twing')); - try { - new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).then((twingTemplate) => { - twingTemplate.render(options).then((rendTmpl) => { - var tmpl = cache(options) || cache(options, rendTmpl); - cb(null, tmpl); - }); - }); - } catch (err) { - cb(err); - } - }); -}; -/** - * expose the instance of the engine - */ -exports.requires = requires; -}); - -var consolidate$1 = consolidate; - -const hasWarned = {}; -function warnOnce(msg) { - const isNodeProd = typeof process !== 'undefined' && process.env.NODE_ENV === 'production'; - if (!isNodeProd && !false && !hasWarned[msg]) { - hasWarned[msg] = true; - warn(msg); - } -} -function warn(msg) { - console.warn(`\x1b[1m\x1b[33m[@vue/compiler-sfc]\x1b[0m\x1b[33m ${msg}\x1b[0m\n`); -} - -function preprocess({ source, filename, preprocessOptions }, preprocessor) { - // Consolidate exposes a callback based API, but the callback is in fact - // called synchronously for most templating engines. In our case, we have to - // expose a synchronous API so that it is usable in Jest transforms (which - // have to be sync because they are applied via Node.js require hooks) - let res = ''; - let err = null; - preprocessor.render(source, { filename, ...preprocessOptions }, (_err, _res) => { - if (_err) - err = _err; - res = _res; - }); - if (err) - throw err; - return res; -} -function compileTemplate(options) { - const { preprocessLang, preprocessCustomRequire } = options; - const preprocessor = preprocessLang - ? preprocessCustomRequire - ? preprocessCustomRequire(preprocessLang) - : consolidate$1[preprocessLang] - : false; - if (preprocessor) { - try { - return doCompileTemplate({ - ...options, - source: preprocess(options, preprocessor) - }); - } - catch (e) { - return { - code: `export default function render() {}`, - source: options.source, - tips: [], - errors: [e] - }; - } - } - else if (preprocessLang) { - return { - code: `export default function render() {}`, - source: options.source, - tips: [ - `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.` - ], - errors: [ - `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.` - ] - }; - } - else { - return doCompileTemplate(options); - } -} -function doCompileTemplate({ filename, id, scoped, slotted, inMap, source, ssr = false, ssrCssVars, isProd = false, compiler = ssr ? CompilerSSR__namespace : CompilerDOM__namespace, compilerOptions = {}, transformAssetUrls }) { - const errors = []; - const warnings = []; - let nodeTransforms = []; - if (shared.isObject(transformAssetUrls)) { - const assetOptions = normalizeOptions(transformAssetUrls); - nodeTransforms = [ - createAssetUrlTransformWithOptions(assetOptions), - createSrcsetTransformWithOptions(assetOptions) - ]; - } - else if (transformAssetUrls !== false) { - nodeTransforms = [transformAssetUrl, transformSrcset]; - } - if (ssr && !ssrCssVars) { - warnOnce(`compileTemplate is called with \`ssr: true\` but no ` + - `corresponding \`cssVars\` option.\`.`); - } - if (!id) { - warnOnce(`compileTemplate now requires the \`id\` option.\`.`); - id = ''; - } - const shortId = id.replace(/^data-v-/, ''); - const longId = `data-v-${shortId}`; - let { code, ast, preamble, map } = compiler.compile(source, { - mode: 'module', - prefixIdentifiers: true, - hoistStatic: true, - cacheHandlers: true, - ssrCssVars: ssr && ssrCssVars && ssrCssVars.length - ? genCssVarsFromList(ssrCssVars, shortId, isProd, true) - : '', - scopeId: scoped ? longId : undefined, - slotted, - sourceMap: true, - ...compilerOptions, - nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []), - filename, - onError: e => errors.push(e), - onWarn: w => warnings.push(w) - }); - // inMap should be the map produced by ./parse.ts which is a simple line-only - // mapping. If it is present, we need to adjust the final map and errors to - // reflect the original line numbers. - if (inMap) { - if (map) { - map = mapLines(inMap, map); - } - if (errors.length) { - patchErrors(errors, source, inMap); - } - } - const tips = warnings.map(w => { - let msg = w.message; - if (w.loc) { - msg += `\n${shared.generateCodeFrame(source, w.loc.start.offset, w.loc.end.offset)}`; - } - return msg; - }); - return { code, ast, preamble, source, errors, tips, map }; -} -function mapLines(oldMap, newMap) { - if (!oldMap) - return newMap; - if (!newMap) - return oldMap; - const oldMapConsumer = new sourceMap.SourceMapConsumer(oldMap); - const newMapConsumer = new sourceMap.SourceMapConsumer(newMap); - const mergedMapGenerator = new sourceMap.SourceMapGenerator(); - newMapConsumer.eachMapping(m => { - if (m.originalLine == null) { - return; - } - const origPosInOldMap = oldMapConsumer.originalPositionFor({ - line: m.originalLine, - column: m.originalColumn - }); - if (origPosInOldMap.source == null) { - return; - } - mergedMapGenerator.addMapping({ - generated: { - line: m.generatedLine, - column: m.generatedColumn - }, - original: { - line: origPosInOldMap.line, - // use current column, since the oldMap produced by @vue/compiler-sfc - // does not - column: m.originalColumn - }, - source: origPosInOldMap.source, - name: origPosInOldMap.name - }); - }); - // source-map's type definition is incomplete - const generator = mergedMapGenerator; - oldMapConsumer.sources.forEach((sourceFile) => { - generator._sources.add(sourceFile); - const sourceContent = oldMapConsumer.sourceContentFor(sourceFile); - if (sourceContent != null) { - mergedMapGenerator.setSourceContent(sourceFile, sourceContent); - } - }); - generator._sourceRoot = oldMap.sourceRoot; - generator._file = oldMap.file; - return generator.toJSON(); -} -function patchErrors(errors, source, inMap) { - const originalSource = inMap.sourcesContent[0]; - const offset = originalSource.indexOf(source); - const lineOffset = originalSource.slice(0, offset).split(/\r?\n/).length - 1; - errors.forEach(err => { - if (err.loc) { - err.loc.start.line += lineOffset; - err.loc.start.offset += offset; - if (err.loc.end !== err.loc.start) { - err.loc.end.line += lineOffset; - err.loc.end.offset += offset; - } - } - }); -} - -const defaultExportRE = /((?:^|\n|;)\s*)export(\s*)default/; -const namedDefaultExportRE = /((?:^|\n|;)\s*)export(.+)(?:as)?(\s*)default/s; -const exportDefaultClassRE = /((?:^|\n|;)\s*)export\s+default\s+class\s+([\w$]+)/; -/** - * Utility for rewriting `export default` in a script block into a variable - * declaration so that we can inject things into it - */ -function rewriteDefault(input, as, parserPlugins) { - if (!hasDefaultExport(input)) { - return input + `\nconst ${as} = {}`; - } - let replaced; - const classMatch = input.match(exportDefaultClassRE); - if (classMatch) { - replaced = - input.replace(exportDefaultClassRE, '$1class $2') + - `\nconst ${as} = ${classMatch[2]}`; - } - else { - replaced = input.replace(defaultExportRE, `$1const ${as} =`); - } - if (!hasDefaultExport(replaced)) { - return replaced; - } - // if the script somehow still contains `default export`, it probably has - // multi-line comments or template strings. fallback to a full parse. - const s = new MagicString__default(input); - const ast = parser$2.parse(input, { - sourceType: 'module', - plugins: parserPlugins - }).program.body; - ast.forEach(node => { - if (node.type === 'ExportDefaultDeclaration') { - s.overwrite(node.start, node.declaration.start, `const ${as} = `); - } - if (node.type === 'ExportNamedDeclaration') { - for (const specifier of node.specifiers) { - if (specifier.type === 'ExportSpecifier' && - specifier.exported.type === 'Identifier' && - specifier.exported.name === 'default') { - if (node.source) { - if (specifier.local.name === 'default') { - const end = specifierEnd(input, specifier.local.end, node.end); - s.prepend(`import { default as __VUE_DEFAULT__ } from '${node.source.value}'\n`); - s.overwrite(specifier.start, end, ``); - s.append(`\nconst ${as} = __VUE_DEFAULT__`); - continue; - } - else { - const end = specifierEnd(input, specifier.exported.end, node.end); - s.prepend(`import { ${input.slice(specifier.local.start, specifier.local.end)} } from '${node.source.value}'\n`); - s.overwrite(specifier.start, end, ``); - s.append(`\nconst ${as} = ${specifier.local.name}`); - continue; - } - } - const end = specifierEnd(input, specifier.end, node.end); - s.overwrite(specifier.start, end, ``); - s.append(`\nconst ${as} = ${specifier.local.name}`); - } - } - } - }); - return s.toString(); -} -function hasDefaultExport(input) { - return defaultExportRE.test(input) || namedDefaultExportRE.test(input); -} -function specifierEnd(input, end, nodeEnd) { - // export { default , foo } ... - let hasCommas = false; - let oldEnd = end; - while (end < nodeEnd) { - if (/\s/.test(input.charAt(end))) { - end++; - } - else if (input.charAt(end) === ',') { - end++; - hasCommas = true; - break; - } - else if (input.charAt(end) === '}') { - break; - } - } - return hasCommas ? end : oldEnd; -} - -// Special compiler macros -const DEFINE_PROPS = 'defineProps'; -const DEFINE_EMITS = 'defineEmits'; -const DEFINE_EXPOSE = 'defineExpose'; -const WITH_DEFAULTS = 'withDefaults'; -// constants -const DEFAULT_VAR = `__default__`; -const isBuiltInDir = shared.makeMap(`once,memo,if,for,else,else-if,slot,text,html,on,bind,model,show,cloak,is`); -/** - * Compile `<script setup>` - * It requires the whole SFC descriptor because we need to handle and merge - * normal `<script>` + `<script setup>` if both are present. - */ -function compileScript(sfc, options) { - var _a; - let { script, scriptSetup, source, filename } = sfc; - // feature flags - // TODO remove support for deprecated options when out of experimental - const enableReactivityTransform = !!options.reactivityTransform || - !!options.refSugar || - !!options.refTransform; - const enablePropsTransform = !!options.reactivityTransform || !!options.propsDestructureTransform; - const isProd = !!options.isProd; - const genSourceMap = options.sourceMap !== false; - let refBindings; - if (!options.id) { - warnOnce(`compileScript now requires passing the \`id\` option.\n` + - `Upgrade your vite or vue-loader version for compatibility with ` + - `the latest experimental proposals.`); - } - const scopeId = options.id ? options.id.replace(/^data-v-/, '') : ''; - const cssVars = sfc.cssVars; - const scriptLang = script && script.lang; - const scriptSetupLang = scriptSetup && scriptSetup.lang; - const isTS = scriptLang === 'ts' || - scriptLang === 'tsx' || - scriptSetupLang === 'ts' || - scriptSetupLang === 'tsx'; - // resolve parser plugins - const plugins = []; - if (!isTS || scriptLang === 'tsx' || scriptSetupLang === 'tsx') { - plugins.push('jsx'); - } - else { - // If don't match the case of adding jsx, should remove the jsx from the babelParserPlugins - if (options.babelParserPlugins) - options.babelParserPlugins = options.babelParserPlugins.filter(n => n !== 'jsx'); - } - if (options.babelParserPlugins) - plugins.push(...options.babelParserPlugins); - if (isTS) - plugins.push('typescript', 'decorators-legacy'); - if (!scriptSetup) { - if (!script) { - throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`); - } - if (scriptLang && !isTS && scriptLang !== 'jsx') { - // do not process non js/ts script blocks - return script; - } - try { - let content = script.content; - let map = script.map; - const scriptAst = parser$2.parse(content, { - plugins, - sourceType: 'module' - }).program; - const bindings = analyzeScriptBindings(scriptAst.body); - if (enableReactivityTransform && reactivityTransform.shouldTransform(content)) { - const s = new MagicString__default(source); - const startOffset = script.loc.start.offset; - const endOffset = script.loc.end.offset; - const { importedHelpers } = reactivityTransform.transformAST(scriptAst, s, startOffset); - if (importedHelpers.length) { - s.prepend(`import { ${importedHelpers - .map(h => `${h} as _${h}`) - .join(', ')} } from 'vue'\n`); - } - s.remove(0, startOffset); - s.remove(endOffset, source.length); - content = s.toString(); - if (genSourceMap) { - map = s.generateMap({ - source: filename, - hires: true, - includeContent: true - }); - } - } - if (cssVars.length) { - content = rewriteDefault(content, DEFAULT_VAR, plugins); - content += genNormalScriptCssVarsCode(cssVars, bindings, scopeId, isProd); - content += `\nexport default ${DEFAULT_VAR}`; - } - return { - ...script, - content, - map, - bindings, - scriptAst: scriptAst.body - }; - } - catch (e) { - // silently fallback if parse fails since user may be using custom - // babel syntax - return script; - } - } - if (script && scriptLang !== scriptSetupLang) { - throw new Error(`[@vue/compiler-sfc] <script> and <script setup> must have the same ` + - `language type.`); - } - if (scriptSetupLang && !isTS && scriptSetupLang !== 'jsx') { - // do not process non js/ts script blocks - return scriptSetup; - } - // metadata that needs to be returned - const bindingMetadata = {}; - const helperImports = new Set(); - const userImports = Object.create(null); - const userImportAlias = Object.create(null); - const scriptBindings = Object.create(null); - const setupBindings = Object.create(null); - let defaultExport; - let hasDefinePropsCall = false; - let hasDefineEmitCall = false; - let hasDefineExposeCall = false; - let hasDefaultExportName = false; - let hasDefaultExportRender = false; - let propsRuntimeDecl; - let propsRuntimeDefaults; - let propsDestructureDecl; - let propsDestructureRestId; - let propsTypeDecl; - let propsTypeDeclRaw; - let propsIdentifier; - let emitsRuntimeDecl; - let emitsTypeDecl; - let emitsTypeDeclRaw; - let emitIdentifier; - let hasAwait = false; - let hasInlinedSsrRenderFn = false; - // props/emits declared via types - const typeDeclaredProps = {}; - const typeDeclaredEmits = new Set(); - // record declared types for runtime props type generation - const declaredTypes = {}; - // props destructure data - const propsDestructuredBindings = Object.create(null); - // magic-string state - const s = new MagicString__default(source); - const startOffset = scriptSetup.loc.start.offset; - const endOffset = scriptSetup.loc.end.offset; - const scriptStartOffset = script && script.loc.start.offset; - const scriptEndOffset = script && script.loc.end.offset; - function helper(key) { - helperImports.add(key); - return `_${key}`; - } - function parse(input, options, offset) { - try { - return parser$2.parse(input, options).program; - } - catch (e) { - e.message = `[@vue/compiler-sfc] ${e.message}\n\n${sfc.filename}\n${shared.generateCodeFrame(source, e.pos + offset, e.pos + offset + 1)}`; - throw e; - } - } - function error(msg, node, end = node.end + startOffset) { - throw new Error(`[@vue/compiler-sfc] ${msg}\n\n${sfc.filename}\n${shared.generateCodeFrame(source, node.start + startOffset, end)}`); - } - function registerUserImport(source, local, imported, isType, isFromSetup, needTemplateUsageCheck) { - if (source === 'vue' && imported) { - userImportAlias[imported] = local; - } - // template usage check is only needed in non-inline mode, so we can skip - // the work if inlineTemplate is true. - let isUsedInTemplate = needTemplateUsageCheck; - if (needTemplateUsageCheck && - isTS && - sfc.template && - !sfc.template.src && - !sfc.template.lang) { - isUsedInTemplate = isImportUsed(local, sfc); - } - userImports[local] = { - isType, - imported: imported || 'default', - source, - isFromSetup, - isUsedInTemplate - }; - } - function processDefineProps(node, declId) { - if (!isCallOf(node, DEFINE_PROPS)) { - return false; - } - if (hasDefinePropsCall) { - error(`duplicate ${DEFINE_PROPS}() call`, node); - } - hasDefinePropsCall = true; - propsRuntimeDecl = node.arguments[0]; - // call has type parameters - infer runtime types from it - if (node.typeParameters) { - if (propsRuntimeDecl) { - error(`${DEFINE_PROPS}() cannot accept both type and non-type arguments ` + - `at the same time. Use one or the other.`, node); - } - propsTypeDeclRaw = node.typeParameters.params[0]; - propsTypeDecl = resolveQualifiedType(propsTypeDeclRaw, node => node.type === 'TSTypeLiteral'); - if (!propsTypeDecl) { - error(`type argument passed to ${DEFINE_PROPS}() must be a literal type, ` + - `or a reference to an interface or literal type.`, propsTypeDeclRaw); - } - } - if (declId) { - if (enablePropsTransform && declId.type === 'ObjectPattern') { - propsDestructureDecl = declId; - // props destructure - handle compilation sugar - for (const prop of declId.properties) { - if (prop.type === 'ObjectProperty') { - if (prop.computed) { - error(`${DEFINE_PROPS}() destructure cannot use computed key.`, prop.key); - } - const propKey = prop.key.type === 'StringLiteral' - ? prop.key.value - : prop.key.name; - if (prop.value.type === 'AssignmentPattern') { - // default value { foo = 123 } - const { left, right } = prop.value; - if (left.type !== 'Identifier') { - error(`${DEFINE_PROPS}() destructure does not support nested patterns.`, left); - } - // store default value - propsDestructuredBindings[propKey] = { - local: left.name, - default: right - }; - } - else if (prop.value.type === 'Identifier') { - // simple destructure - propsDestructuredBindings[propKey] = { - local: prop.value.name - }; - } - else { - error(`${DEFINE_PROPS}() destructure does not support nested patterns.`, prop.value); - } - } - else { - // rest spread - propsDestructureRestId = prop.argument.name; - } - } - } - else { - propsIdentifier = scriptSetup.content.slice(declId.start, declId.end); - } - } - return true; - } - function processWithDefaults(node, declId) { - if (!isCallOf(node, WITH_DEFAULTS)) { - return false; - } - if (processDefineProps(node.arguments[0], declId)) { - if (propsRuntimeDecl) { - error(`${WITH_DEFAULTS} can only be used with type-based ` + - `${DEFINE_PROPS} declaration.`, node); - } - if (propsDestructureDecl) { - error(`${WITH_DEFAULTS}() is unnecessary when using destructure with ${DEFINE_PROPS}().\n` + - `Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...).`, node.callee); - } - propsRuntimeDefaults = node.arguments[1]; - if (!propsRuntimeDefaults || - propsRuntimeDefaults.type !== 'ObjectExpression') { - error(`The 2nd argument of ${WITH_DEFAULTS} must be an object literal.`, propsRuntimeDefaults || node); - } - } - else { - error(`${WITH_DEFAULTS}' first argument must be a ${DEFINE_PROPS} call.`, node.arguments[0] || node); - } - return true; - } - function processDefineEmits(node, declId) { - if (!isCallOf(node, DEFINE_EMITS)) { - return false; - } - if (hasDefineEmitCall) { - error(`duplicate ${DEFINE_EMITS}() call`, node); - } - hasDefineEmitCall = true; - emitsRuntimeDecl = node.arguments[0]; - if (node.typeParameters) { - if (emitsRuntimeDecl) { - error(`${DEFINE_EMITS}() cannot accept both type and non-type arguments ` + - `at the same time. Use one or the other.`, node); - } - emitsTypeDeclRaw = node.typeParameters.params[0]; - emitsTypeDecl = resolveQualifiedType(emitsTypeDeclRaw, node => node.type === 'TSFunctionType' || node.type === 'TSTypeLiteral'); - if (!emitsTypeDecl) { - error(`type argument passed to ${DEFINE_EMITS}() must be a function type, ` + - `a literal type with call signatures, or a reference to the above types.`, emitsTypeDeclRaw); - } - } - if (declId) { - emitIdentifier = scriptSetup.content.slice(declId.start, declId.end); - } - return true; - } - function resolveQualifiedType(node, qualifier) { - if (qualifier(node)) { - return node; - } - if (node.type === 'TSTypeReference' && - node.typeName.type === 'Identifier') { - const refName = node.typeName.name; - const isQualifiedType = (node) => { - if (node.type === 'TSInterfaceDeclaration' && - node.id.name === refName) { - return node.body; - } - else if (node.type === 'TSTypeAliasDeclaration' && - node.id.name === refName && - qualifier(node.typeAnnotation)) { - return node.typeAnnotation; - } - else if (node.type === 'ExportNamedDeclaration' && node.declaration) { - return isQualifiedType(node.declaration); - } - }; - const body = scriptAst - ? [...scriptSetupAst.body, ...scriptAst.body] - : scriptSetupAst.body; - for (const node of body) { - const qualified = isQualifiedType(node); - if (qualified) { - return qualified; - } - } - } - } - function processDefineExpose(node) { - if (isCallOf(node, DEFINE_EXPOSE)) { - if (hasDefineExposeCall) { - error(`duplicate ${DEFINE_EXPOSE}() call`, node); - } - hasDefineExposeCall = true; - return true; - } - return false; - } - function checkInvalidScopeReference(node, method) { - if (!node) - return; - CompilerDOM.walkIdentifiers(node, id => { - if (setupBindings[id.name]) { - error(`\`${method}()\` in <script setup> cannot reference locally ` + - `declared variables because it will be hoisted outside of the ` + - `setup() function. If your component options require initialization ` + - `in the module scope, use a separate normal <script> to export ` + - `the options instead.`, id); - } - }); - } - /** - * await foo() - * --> - * ;( - * ([__temp,__restore] = withAsyncContext(() => foo())), - * await __temp, - * __restore() - * ) - * - * const a = await foo() - * --> - * const a = ( - * ([__temp, __restore] = withAsyncContext(() => foo())), - * __temp = await __temp, - * __restore(), - * __temp - * ) - */ - function processAwait(node, needSemi, isStatement) { - const argumentStart = node.argument.extra && node.argument.extra.parenthesized - ? node.argument.extra.parenStart - : node.argument.start; - const argumentStr = source.slice(argumentStart + startOffset, node.argument.end + startOffset); - const containsNestedAwait = /\bawait\b/.test(argumentStr); - s.overwrite(node.start + startOffset, argumentStart + startOffset, `${needSemi ? `;` : ``}(\n ([__temp,__restore] = ${helper(`withAsyncContext`)}(${containsNestedAwait ? `async ` : ``}() => `); - s.appendLeft(node.end + startOffset, `)),\n ${isStatement ? `` : `__temp = `}await __temp,\n __restore()${isStatement ? `` : `,\n __temp`}\n)`); - } - /** - * check defaults. If the default object is an object literal with only - * static properties, we can directly generate more optimized default - * declarations. Otherwise we will have to fallback to runtime merging. - */ - function hasStaticWithDefaults() { - return (propsRuntimeDefaults && - propsRuntimeDefaults.type === 'ObjectExpression' && - propsRuntimeDefaults.properties.every(node => (node.type === 'ObjectProperty' && !node.computed) || - node.type === 'ObjectMethod')); - } - function genRuntimeProps(props) { - const keys = Object.keys(props); - if (!keys.length) { - return ``; - } - const hasStaticDefaults = hasStaticWithDefaults(); - const scriptSetupSource = scriptSetup.content; - let propsDecls = `{ - ${keys - .map(key => { - let defaultString; - const destructured = genDestructuredDefaultValue(key); - if (destructured) { - defaultString = `default: ${destructured}`; - } - else if (hasStaticDefaults) { - const prop = propsRuntimeDefaults.properties.find((node) => node.key.name === key); - if (prop) { - if (prop.type === 'ObjectProperty') { - // prop has corresponding static default value - defaultString = `default: ${scriptSetupSource.slice(prop.value.start, prop.value.end)}`; - } - else { - defaultString = `default() ${scriptSetupSource.slice(prop.body.start, prop.body.end)}`; - } - } - } - const { type, required } = props[key]; - if (!isProd) { - return `${key}: { type: ${toRuntimeTypeString(type)}, required: ${required}${defaultString ? `, ${defaultString}` : ``} }`; - } - else if (type.some(el => el === 'Boolean' || (defaultString && el === 'Function'))) { - // #4783 production: if boolean or defaultString and function exists, should keep the type. - return `${key}: { type: ${toRuntimeTypeString(type)}${defaultString ? `, ${defaultString}` : ``} }`; - } - else { - // production: checks are useless - return `${key}: ${defaultString ? `{ ${defaultString} }` : 'null'}`; - } - }) - .join(',\n ')}\n }`; - if (propsRuntimeDefaults && !hasStaticDefaults) { - propsDecls = `${helper('mergeDefaults')}(${propsDecls}, ${source.slice(propsRuntimeDefaults.start + startOffset, propsRuntimeDefaults.end + startOffset)})`; - } - return `\n props: ${propsDecls},`; - } - function genDestructuredDefaultValue(key) { - const destructured = propsDestructuredBindings[key]; - if (destructured && destructured.default) { - const value = scriptSetup.content.slice(destructured.default.start, destructured.default.end); - const isLiteral = destructured.default.type.endsWith('Literal'); - return isLiteral ? value : `() => (${value})`; - } - } - function genSetupPropsType(node) { - const scriptSetupSource = scriptSetup.content; - if (hasStaticWithDefaults()) { - // if withDefaults() is used, we need to remove the optional flags - // on props that have default values - let res = `{ `; - const members = node.type === 'TSTypeLiteral' ? node.members : node.body; - for (const m of members) { - if ((m.type === 'TSPropertySignature' || - m.type === 'TSMethodSignature') && - m.typeAnnotation && - m.key.type === 'Identifier') { - if (propsRuntimeDefaults.properties.some((p) => p.key.name === m.key.name)) { - res += - m.key.name + - (m.type === 'TSMethodSignature' ? '()' : '') + - scriptSetupSource.slice(m.typeAnnotation.start, m.typeAnnotation.end) + - ', '; - } - else { - res += - scriptSetupSource.slice(m.start, m.typeAnnotation.end) + `, `; - } - } - } - return (res.length ? res.slice(0, -2) : res) + ` }`; - } - else { - return scriptSetupSource.slice(node.start, node.end); - } - } - // 1. process normal <script> first if it exists - let scriptAst; - if (script) { - scriptAst = parse(script.content, { - plugins, - sourceType: 'module' - }, scriptStartOffset); - for (const node of scriptAst.body) { - if (node.type === 'ImportDeclaration') { - // record imports for dedupe - for (const specifier of node.specifiers) { - const imported = specifier.type === 'ImportSpecifier' && - specifier.imported.type === 'Identifier' && - specifier.imported.name; - registerUserImport(node.source.value, specifier.local.name, imported, node.importKind === 'type' || - (specifier.type === 'ImportSpecifier' && - specifier.importKind === 'type'), false, !options.inlineTemplate); - } - } - else if (node.type === 'ExportDefaultDeclaration') { - // export default - defaultExport = node; - // check if user has manually specified `name` or 'render` option in - // export default - // if has name, skip name inference - // if has render and no template, generate return object instead of - // empty render function (#4980) - let optionProperties; - if (defaultExport.declaration.type === 'ObjectExpression') { - optionProperties = defaultExport.declaration.properties; - } - else if (defaultExport.declaration.type === 'CallExpression' && - defaultExport.declaration.arguments[0].type === 'ObjectExpression') { - optionProperties = defaultExport.declaration.arguments[0].properties; - } - if (optionProperties) { - for (const s of optionProperties) { - if (s.type === 'ObjectProperty' && - s.key.type === 'Identifier' && - s.key.name === 'name') { - hasDefaultExportName = true; - } - if ((s.type === 'ObjectMethod' || s.type === 'ObjectProperty') && - s.key.type === 'Identifier' && - s.key.name === 'render') { - // TODO warn when we provide a better way to do it? - hasDefaultExportRender = true; - } - } - } - // export default { ... } --> const __default__ = { ... } - const start = node.start + scriptStartOffset; - const end = node.declaration.start + scriptStartOffset; - s.overwrite(start, end, `const ${DEFAULT_VAR} = `); - } - else if (node.type === 'ExportNamedDeclaration') { - const defaultSpecifier = node.specifiers.find(s => s.exported.type === 'Identifier' && s.exported.name === 'default'); - if (defaultSpecifier) { - defaultExport = node; - // 1. remove specifier - if (node.specifiers.length > 1) { - s.remove(defaultSpecifier.start + scriptStartOffset, defaultSpecifier.end + scriptStartOffset); - } - else { - s.remove(node.start + scriptStartOffset, node.end + scriptStartOffset); - } - if (node.source) { - // export { x as default } from './x' - // rewrite to `import { x as __default__ } from './x'` and - // add to top - s.prepend(`import { ${defaultSpecifier.local.name} as ${DEFAULT_VAR} } from '${node.source.value}'\n`); - } - else { - // export { x as default } - // rewrite to `const __default__ = x` and move to end - s.appendLeft(scriptEndOffset, `\nconst ${DEFAULT_VAR} = ${defaultSpecifier.local.name}\n`); - } - } - if (node.declaration) { - walkDeclaration(node.declaration, scriptBindings, userImportAlias); - } - } - else if ((node.type === 'VariableDeclaration' || - node.type === 'FunctionDeclaration' || - node.type === 'ClassDeclaration' || - node.type === 'TSEnumDeclaration') && - !node.declare) { - walkDeclaration(node, scriptBindings, userImportAlias); - } - } - // apply reactivity transform - if (enableReactivityTransform && reactivityTransform.shouldTransform(script.content)) { - const { rootRefs, importedHelpers } = reactivityTransform.transformAST(scriptAst, s, scriptStartOffset); - refBindings = rootRefs; - for (const h of importedHelpers) { - helperImports.add(h); - } - } - // <script> after <script setup> - // we need to move the block up so that `const __default__` is - // declared before being used in the actual component definition - if (scriptStartOffset > startOffset) { - // if content doesn't end with newline, add one - if (!/\n$/.test(script.content.trim())) { - s.appendLeft(scriptEndOffset, `\n`); - } - s.move(scriptStartOffset, scriptEndOffset, 0); - } - } - // 2. parse <script setup> and walk over top level statements - const scriptSetupAst = parse(scriptSetup.content, { - plugins: [ - ...plugins, - // allow top level await but only inside <script setup> - 'topLevelAwait' - ], - sourceType: 'module' - }, startOffset); - for (const node of scriptSetupAst.body) { - const start = node.start + startOffset; - let end = node.end + startOffset; - // locate comment - if (node.trailingComments && node.trailingComments.length > 0) { - const lastCommentNode = node.trailingComments[node.trailingComments.length - 1]; - end = lastCommentNode.end + startOffset; - } - // locate the end of whitespace between this statement and the next - while (end <= source.length) { - if (!/\s/.test(source.charAt(end))) { - break; - } - end++; - } - // (Dropped) `ref: x` bindings - if (node.type === 'LabeledStatement' && - node.label.name === 'ref' && - node.body.type === 'ExpressionStatement') { - error(`ref sugar using the label syntax was an experimental proposal and ` + - `has been dropped based on community feedback. Please check out ` + - `the new proposal at https://github.com/vuejs/rfcs/discussions/369`, node); - } - if (node.type === 'ImportDeclaration') { - // import declarations are moved to top - s.move(start, end, 0); - // dedupe imports - let removed = 0; - const removeSpecifier = (i) => { - const removeLeft = i > removed; - removed++; - const current = node.specifiers[i]; - const next = node.specifiers[i + 1]; - s.remove(removeLeft - ? node.specifiers[i - 1].end + startOffset - : current.start + startOffset, next && !removeLeft - ? next.start + startOffset - : current.end + startOffset); - }; - for (let i = 0; i < node.specifiers.length; i++) { - const specifier = node.specifiers[i]; - const local = specifier.local.name; - let imported = specifier.type === 'ImportSpecifier' && - specifier.imported.type === 'Identifier' && - specifier.imported.name; - if (specifier.type === 'ImportNamespaceSpecifier') { - imported = '*'; - } - const source = node.source.value; - const existing = userImports[local]; - if (source === 'vue' && - (imported === DEFINE_PROPS || - imported === DEFINE_EMITS || - imported === DEFINE_EXPOSE)) { - warnOnce(`\`${imported}\` is a compiler macro and no longer needs to be imported.`); - removeSpecifier(i); - } - else if (existing) { - if (existing.source === source && existing.imported === imported) { - // already imported in <script setup>, dedupe - removeSpecifier(i); - } - else { - error(`different imports aliased to same local name.`, specifier); - } - } - else { - registerUserImport(source, local, imported, node.importKind === 'type' || - (specifier.type === 'ImportSpecifier' && - specifier.importKind === 'type'), true, !options.inlineTemplate); - } - } - if (node.specifiers.length && removed === node.specifiers.length) { - s.remove(node.start + startOffset, node.end + startOffset); - } - } - if (node.type === 'ExpressionStatement') { - // process `defineProps` and `defineEmit(s)` calls - if (processDefineProps(node.expression) || - processDefineEmits(node.expression) || - processWithDefaults(node.expression)) { - s.remove(node.start + startOffset, node.end + startOffset); - } - else if (processDefineExpose(node.expression)) { - // defineExpose({}) -> expose({}) - const callee = node.expression.callee; - s.overwrite(callee.start + startOffset, callee.end + startOffset, 'expose'); - } - } - if (node.type === 'VariableDeclaration' && !node.declare) { - const total = node.declarations.length; - let left = total; - for (let i = 0; i < total; i++) { - const decl = node.declarations[i]; - if (decl.init) { - // defineProps / defineEmits - const isDefineProps = processDefineProps(decl.init, decl.id) || - processWithDefaults(decl.init, decl.id); - const isDefineEmits = processDefineEmits(decl.init, decl.id); - if (isDefineProps || isDefineEmits) { - if (left === 1) { - s.remove(node.start + startOffset, node.end + startOffset); - } - else { - let start = decl.start + startOffset; - let end = decl.end + startOffset; - if (i < total - 1) { - // not the last one, locate the start of the next - end = node.declarations[i + 1].start + startOffset; - } - else { - // last one, locate the end of the prev - start = node.declarations[i - 1].end + startOffset; - } - s.remove(start, end); - left--; - } - } - } - } - } - // walk declarations to record declared bindings - if ((node.type === 'VariableDeclaration' || - node.type === 'FunctionDeclaration' || - node.type === 'ClassDeclaration') && - !node.declare) { - walkDeclaration(node, setupBindings, userImportAlias); - } - // walk statements & named exports / variable declarations for top level - // await - if ((node.type === 'VariableDeclaration' && !node.declare) || - node.type.endsWith('Statement')) { - const scope = [scriptSetupAst.body]; - estreeWalker.walk(node, { - enter(child, parent) { - if (CompilerDOM.isFunctionType(child)) { - this.skip(); - } - if (child.type === 'BlockStatement') { - scope.push(child.body); - } - if (child.type === 'AwaitExpression') { - hasAwait = true; - // if the await expression is an expression statement and - // - is in the root scope - // - or is not the first statement in a nested block scope - // then it needs a semicolon before the generated code. - const currentScope = scope[scope.length - 1]; - const needsSemi = currentScope.some((n, i) => { - return ((scope.length === 1 || i > 0) && - n.type === 'ExpressionStatement' && - n.start === child.start); - }); - processAwait(child, needsSemi, parent.type === 'ExpressionStatement'); - } - }, - exit(node) { - if (node.type === 'BlockStatement') - scope.pop(); - } - }); - } - if ((node.type === 'ExportNamedDeclaration' && node.exportKind !== 'type') || - node.type === 'ExportAllDeclaration' || - node.type === 'ExportDefaultDeclaration') { - error(`<script setup> cannot contain ES module exports. ` + - `If you are using a previous version of <script setup>, please ` + - `consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.`, node); - } - if (isTS) { - // runtime enum - if (node.type === 'TSEnumDeclaration') { - registerBinding(setupBindings, node.id, "setup-const" /* SETUP_CONST */); - } - // move all Type declarations to outer scope - if (node.type.startsWith('TS') || - (node.type === 'ExportNamedDeclaration' && - node.exportKind === 'type') || - (node.type === 'VariableDeclaration' && node.declare)) { - recordType(node, declaredTypes); - s.move(start, end, 0); - } - } - } - // 3. Apply reactivity transform - if ((enableReactivityTransform && - // normal <script> had ref bindings that maybe used in <script setup> - (refBindings || reactivityTransform.shouldTransform(scriptSetup.content))) || - propsDestructureDecl) { - const { rootRefs, importedHelpers } = reactivityTransform.transformAST(scriptSetupAst, s, startOffset, refBindings, propsDestructuredBindings); - refBindings = refBindings ? [...refBindings, ...rootRefs] : rootRefs; - for (const h of importedHelpers) { - helperImports.add(h); - } - } - // 4. extract runtime props/emits code from setup context type - if (propsTypeDecl) { - extractRuntimeProps(propsTypeDecl, typeDeclaredProps, declaredTypes); - } - if (emitsTypeDecl) { - extractRuntimeEmits(emitsTypeDecl, typeDeclaredEmits); - } - // 5. check useOptions args to make sure it doesn't reference setup scope - // variables - checkInvalidScopeReference(propsRuntimeDecl, DEFINE_PROPS); - checkInvalidScopeReference(propsRuntimeDefaults, DEFINE_PROPS); - checkInvalidScopeReference(propsDestructureDecl, DEFINE_PROPS); - checkInvalidScopeReference(emitsRuntimeDecl, DEFINE_EMITS); - // 6. remove non-script content - if (script) { - if (startOffset < scriptStartOffset) { - // <script setup> before <script> - s.remove(0, startOffset); - s.remove(endOffset, scriptStartOffset); - s.remove(scriptEndOffset, source.length); - } - else { - // <script> before <script setup> - s.remove(0, scriptStartOffset); - s.remove(scriptEndOffset, startOffset); - s.remove(endOffset, source.length); - } - } - else { - // only <script setup> - s.remove(0, startOffset); - s.remove(endOffset, source.length); - } - // 7. analyze binding metadata - if (scriptAst) { - Object.assign(bindingMetadata, analyzeScriptBindings(scriptAst.body)); - } - if (propsRuntimeDecl) { - for (const key of getObjectOrArrayExpressionKeys(propsRuntimeDecl)) { - bindingMetadata[key] = "props" /* PROPS */; - } - } - for (const key in typeDeclaredProps) { - bindingMetadata[key] = "props" /* PROPS */; - } - // props aliases - if (propsDestructureDecl) { - if (propsDestructureRestId) { - bindingMetadata[propsDestructureRestId] = - "setup-reactive-const" /* SETUP_REACTIVE_CONST */; - } - for (const key in propsDestructuredBindings) { - const { local } = propsDestructuredBindings[key]; - if (local !== key) { - bindingMetadata[local] = "props-aliased" /* PROPS_ALIASED */; - (bindingMetadata.__propsAliases || - (bindingMetadata.__propsAliases = {}))[local] = key; - } - } - } - for (const [key, { isType, imported, source }] of Object.entries(userImports)) { - if (isType) - continue; - bindingMetadata[key] = - imported === '*' || - (imported === 'default' && source.endsWith('.vue')) || - source === 'vue' - ? "setup-const" /* SETUP_CONST */ - : "setup-maybe-ref" /* SETUP_MAYBE_REF */; - } - for (const key in scriptBindings) { - bindingMetadata[key] = scriptBindings[key]; - } - for (const key in setupBindings) { - bindingMetadata[key] = setupBindings[key]; - } - // known ref bindings - if (refBindings) { - for (const key of refBindings) { - bindingMetadata[key] = "setup-ref" /* SETUP_REF */; - } - } - // 8. inject `useCssVars` calls - if (cssVars.length && - // no need to do this when targeting SSR - !(options.inlineTemplate && ((_a = options.templateOptions) === null || _a === void 0 ? void 0 : _a.ssr))) { - helperImports.add(CSS_VARS_HELPER); - helperImports.add('unref'); - s.prependRight(startOffset, `\n${genCssVarsCode(cssVars, bindingMetadata, scopeId, isProd)}\n`); - } - // 9. finalize setup() argument signature - let args = `__props`; - if (propsTypeDecl) { - // mark as any and only cast on assignment - // since the user defined complex types may be incompatible with the - // inferred type from generated runtime declarations - args += `: any`; - } - // inject user assignment of props - // we use a default __props so that template expressions referencing props - // can use it directly - if (propsIdentifier) { - s.prependLeft(startOffset, `\nconst ${propsIdentifier} = __props${propsTypeDecl ? ` as ${genSetupPropsType(propsTypeDecl)}` : ``}\n`); - } - if (propsDestructureRestId) { - s.prependLeft(startOffset, `\nconst ${propsDestructureRestId} = ${helper(`createPropsRestProxy`)}(__props, ${JSON.stringify(Object.keys(propsDestructuredBindings))})\n`); - } - // inject temp variables for async context preservation - if (hasAwait) { - const any = isTS ? `: any` : ``; - s.prependLeft(startOffset, `\nlet __temp${any}, __restore${any}\n`); - } - const destructureElements = hasDefineExposeCall || !options.inlineTemplate ? [`expose`] : []; - if (emitIdentifier) { - destructureElements.push(emitIdentifier === `emit` ? `emit` : `emit: ${emitIdentifier}`); - } - if (destructureElements.length) { - args += `, { ${destructureElements.join(', ')} }`; - if (emitsTypeDecl) { - args += `: { emit: (${scriptSetup.content.slice(emitsTypeDecl.start, emitsTypeDecl.end)}), expose: any, slots: any, attrs: any }`; - } - } - // 10. generate return statement - let returned; - if (!options.inlineTemplate || (!sfc.template && hasDefaultExportRender)) { - // non-inline mode, or has manual render in normal <script> - // return bindings from script and script setup - const allBindings = { - ...scriptBindings, - ...setupBindings - }; - for (const key in userImports) { - if (!userImports[key].isType && userImports[key].isUsedInTemplate) { - allBindings[key] = true; - } - } - returned = `{ ${Object.keys(allBindings).join(', ')} }`; - } - else { - // inline mode - if (sfc.template && !sfc.template.src) { - if (options.templateOptions && options.templateOptions.ssr) { - hasInlinedSsrRenderFn = true; - } - // inline render function mode - we are going to compile the template and - // inline it right here - const { code, ast, preamble, tips, errors } = compileTemplate({ - filename, - source: sfc.template.content, - inMap: sfc.template.map, - ...options.templateOptions, - id: scopeId, - scoped: sfc.styles.some(s => s.scoped), - isProd: options.isProd, - ssrCssVars: sfc.cssVars, - compilerOptions: { - ...(options.templateOptions && - options.templateOptions.compilerOptions), - inline: true, - isTS, - bindingMetadata - } - }); - if (tips.length) { - tips.forEach(warnOnce); - } - const err = errors[0]; - if (typeof err === 'string') { - throw new Error(err); - } - else if (err) { - if (err.loc) { - err.message += - `\n\n` + - sfc.filename + - '\n' + - shared.generateCodeFrame(source, err.loc.start.offset, err.loc.end.offset) + - `\n`; - } - throw err; - } - if (preamble) { - s.prepend(preamble); - } - // avoid duplicated unref import - // as this may get injected by the render function preamble OR the - // css vars codegen - if (ast && ast.helpers.includes(CompilerDOM.UNREF)) { - helperImports.delete('unref'); - } - returned = code; - } - else { - returned = `() => {}`; - } - } - if (!options.inlineTemplate && !false) { - // in non-inline mode, the `__isScriptSetup: true` flag is used by - // componentPublicInstance proxy to allow properties that start with $ or _ - s.appendRight(endOffset, `\nconst __returned__ = ${returned}\n` + - `Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\n` + - `return __returned__` + - `\n}\n\n`); - } - else { - s.appendRight(endOffset, `\nreturn ${returned}\n}\n\n`); - } - // 11. finalize default export - let runtimeOptions = ``; - if (!hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) { - const match = filename.match(/([^/\\]+)\.\w+$/); - if (match) { - runtimeOptions += `\n name: '${match[1]}',`; - } - } - if (hasInlinedSsrRenderFn) { - runtimeOptions += `\n __ssrInlineRender: true,`; - } - if (propsRuntimeDecl) { - let declCode = scriptSetup.content - .slice(propsRuntimeDecl.start, propsRuntimeDecl.end) - .trim(); - if (propsDestructureDecl) { - const defaults = []; - for (const key in propsDestructuredBindings) { - const d = genDestructuredDefaultValue(key); - if (d) - defaults.push(`${key}: ${d}`); - } - if (defaults.length) { - declCode = `${helper(`mergeDefaults`)}(${declCode}, {\n ${defaults.join(',\n ')}\n})`; - } - } - runtimeOptions += `\n props: ${declCode},`; - } - else if (propsTypeDecl) { - runtimeOptions += genRuntimeProps(typeDeclaredProps); - } - if (emitsRuntimeDecl) { - runtimeOptions += `\n emits: ${scriptSetup.content - .slice(emitsRuntimeDecl.start, emitsRuntimeDecl.end) - .trim()},`; - } - else if (emitsTypeDecl) { - runtimeOptions += genRuntimeEmits(typeDeclaredEmits); - } - // <script setup> components are closed by default. If the user did not - // explicitly call `defineExpose`, call expose() with no args. - const exposeCall = hasDefineExposeCall || options.inlineTemplate ? `` : ` expose();\n`; - // wrap setup code with function. - if (isTS) { - // for TS, make sure the exported type is still valid type with - // correct props information - // we have to use object spread for types to be merged properly - // user's TS setting should compile it down to proper targets - // export default defineComponent({ ...__default__, ... }) - const def = defaultExport ? `\n ...${DEFAULT_VAR},` : ``; - s.prependLeft(startOffset, `\nexport default /*#__PURE__*/${helper(`defineComponent`)}({${def}${runtimeOptions}\n ${hasAwait ? `async ` : ``}setup(${args}) {\n${exposeCall}`); - s.appendRight(endOffset, `})`); - } - else { - if (defaultExport) { - // without TS, can't rely on rest spread, so we use Object.assign - // export default Object.assign(__default__, { ... }) - s.prependLeft(startOffset, `\nexport default /*#__PURE__*/Object.assign(${DEFAULT_VAR}, {${runtimeOptions}\n ` + - `${hasAwait ? `async ` : ``}setup(${args}) {\n${exposeCall}`); - s.appendRight(endOffset, `})`); - } - else { - s.prependLeft(startOffset, `\nexport default {${runtimeOptions}\n ` + - `${hasAwait ? `async ` : ``}setup(${args}) {\n${exposeCall}`); - s.appendRight(endOffset, `}`); - } - } - // 12. finalize Vue helper imports - if (helperImports.size > 0) { - s.prepend(`import { ${[...helperImports] - .map(h => `${h} as _${h}`) - .join(', ')} } from 'vue'\n`); - } - s.trim(); - return { - ...scriptSetup, - bindings: bindingMetadata, - imports: userImports, - content: s.toString(), - map: genSourceMap - ? s.generateMap({ - source: filename, - hires: true, - includeContent: true - }) - : undefined, - scriptAst: scriptAst === null || scriptAst === void 0 ? void 0 : scriptAst.body, - scriptSetupAst: scriptSetupAst === null || scriptSetupAst === void 0 ? void 0 : scriptSetupAst.body }; -} -function registerBinding(bindings, node, type) { - bindings[node.name] = type; -} -function walkDeclaration(node, bindings, userImportAlias) { - if (node.type === 'VariableDeclaration') { - const isConst = node.kind === 'const'; - // export const foo = ... - for (const { id, init } of node.declarations) { - const isDefineCall = !!(isConst && - isCallOf(init, c => c === DEFINE_PROPS || c === DEFINE_EMITS || c === WITH_DEFAULTS)); - if (id.type === 'Identifier') { - let bindingType; - const userReactiveBinding = userImportAlias['reactive'] || 'reactive'; - if (isCallOf(init, userReactiveBinding)) { - // treat reactive() calls as let since it's meant to be mutable - bindingType = isConst - ? "setup-reactive-const" /* SETUP_REACTIVE_CONST */ - : "setup-let" /* SETUP_LET */; - } - else if ( - // if a declaration is a const literal, we can mark it so that - // the generated render fn code doesn't need to unref() it - isDefineCall || - (isConst && canNeverBeRef(init, userReactiveBinding))) { - bindingType = isCallOf(init, DEFINE_PROPS) - ? "setup-reactive-const" /* SETUP_REACTIVE_CONST */ - : "setup-const" /* SETUP_CONST */; - } - else if (isConst) { - if (isCallOf(init, userImportAlias['ref'] || 'ref')) { - bindingType = "setup-ref" /* SETUP_REF */; - } - else { - bindingType = "setup-maybe-ref" /* SETUP_MAYBE_REF */; - } - } - else { - bindingType = "setup-let" /* SETUP_LET */; - } - registerBinding(bindings, id, bindingType); - } - else { - if (isCallOf(init, DEFINE_PROPS)) { - // skip walking props destructure - return; - } - if (id.type === 'ObjectPattern') { - walkObjectPattern(id, bindings, isConst, isDefineCall); - } - else if (id.type === 'ArrayPattern') { - walkArrayPattern(id, bindings, isConst, isDefineCall); - } - } - } - } - else if (node.type === 'TSEnumDeclaration' || - node.type === 'FunctionDeclaration' || - node.type === 'ClassDeclaration') { - // export function foo() {} / export class Foo {} - // export declarations must be named. - bindings[node.id.name] = "setup-const" /* SETUP_CONST */; - } -} -function walkObjectPattern(node, bindings, isConst, isDefineCall = false) { - for (const p of node.properties) { - if (p.type === 'ObjectProperty') { - if (p.key.type === 'Identifier' && p.key === p.value) { - // shorthand: const { x } = ... - const type = isDefineCall - ? "setup-const" /* SETUP_CONST */ - : isConst - ? "setup-maybe-ref" /* SETUP_MAYBE_REF */ - : "setup-let" /* SETUP_LET */; - registerBinding(bindings, p.key, type); - } - else { - walkPattern(p.value, bindings, isConst, isDefineCall); - } - } - else { - // ...rest - // argument can only be identifier when destructuring - const type = isConst ? "setup-const" /* SETUP_CONST */ : "setup-let" /* SETUP_LET */; - registerBinding(bindings, p.argument, type); - } - } -} -function walkArrayPattern(node, bindings, isConst, isDefineCall = false) { - for (const e of node.elements) { - e && walkPattern(e, bindings, isConst, isDefineCall); - } -} -function walkPattern(node, bindings, isConst, isDefineCall = false) { - if (node.type === 'Identifier') { - const type = isDefineCall - ? "setup-const" /* SETUP_CONST */ - : isConst - ? "setup-maybe-ref" /* SETUP_MAYBE_REF */ - : "setup-let" /* SETUP_LET */; - registerBinding(bindings, node, type); - } - else if (node.type === 'RestElement') { - // argument can only be identifier when destructuring - const type = isConst ? "setup-const" /* SETUP_CONST */ : "setup-let" /* SETUP_LET */; - registerBinding(bindings, node.argument, type); - } - else if (node.type === 'ObjectPattern') { - walkObjectPattern(node, bindings, isConst); - } - else if (node.type === 'ArrayPattern') { - walkArrayPattern(node, bindings, isConst); - } - else if (node.type === 'AssignmentPattern') { - if (node.left.type === 'Identifier') { - const type = isDefineCall - ? "setup-const" /* SETUP_CONST */ - : isConst - ? "setup-maybe-ref" /* SETUP_MAYBE_REF */ - : "setup-let" /* SETUP_LET */; - registerBinding(bindings, node.left, type); - } - else { - walkPattern(node.left, bindings, isConst); - } - } -} -function recordType(node, declaredTypes) { - if (node.type === 'TSInterfaceDeclaration') { - declaredTypes[node.id.name] = [`Object`]; - } - else if (node.type === 'TSTypeAliasDeclaration') { - declaredTypes[node.id.name] = inferRuntimeType(node.typeAnnotation, declaredTypes); - } - else if (node.type === 'ExportNamedDeclaration' && node.declaration) { - recordType(node.declaration, declaredTypes); - } -} -function extractRuntimeProps(node, props, declaredTypes, isProd) { - const members = node.type === 'TSTypeLiteral' ? node.members : node.body; - for (const m of members) { - if ((m.type === 'TSPropertySignature' || m.type === 'TSMethodSignature') && - m.key.type === 'Identifier') { - let type; - if (m.type === 'TSMethodSignature') { - type = ['Function']; - } - else if (m.typeAnnotation) { - type = inferRuntimeType(m.typeAnnotation.typeAnnotation, declaredTypes); - } - props[m.key.name] = { - key: m.key.name, - required: !m.optional, - type: type || [`null`] - }; - } - } -} -function inferRuntimeType(node, declaredTypes) { - switch (node.type) { - case 'TSStringKeyword': - return ['String']; - case 'TSNumberKeyword': - return ['Number']; - case 'TSBooleanKeyword': - return ['Boolean']; - case 'TSObjectKeyword': - return ['Object']; - case 'TSTypeLiteral': - // TODO (nice to have) generate runtime property validation - return ['Object']; - case 'TSFunctionType': - return ['Function']; - case 'TSArrayType': - case 'TSTupleType': - // TODO (nice to have) generate runtime element type/length checks - return ['Array']; - case 'TSLiteralType': - switch (node.literal.type) { - case 'StringLiteral': - return ['String']; - case 'BooleanLiteral': - return ['Boolean']; - case 'NumericLiteral': - case 'BigIntLiteral': - return ['Number']; - default: - return [`null`]; - } - case 'TSTypeReference': - if (node.typeName.type === 'Identifier') { - if (declaredTypes[node.typeName.name]) { - return declaredTypes[node.typeName.name]; - } - switch (node.typeName.name) { - case 'Array': - case 'Function': - case 'Object': - case 'Set': - case 'Map': - case 'WeakSet': - case 'WeakMap': - case 'Date': - case 'Promise': - return [node.typeName.name]; - case 'Record': - case 'Partial': - case 'Readonly': - case 'Pick': - case 'Omit': - case 'Exclude': - case 'Extract': - case 'Required': - case 'InstanceType': - return ['Object']; - } - } - return [`null`]; - case 'TSParenthesizedType': - return inferRuntimeType(node.typeAnnotation, declaredTypes); - case 'TSUnionType': - return [ - ...new Set([].concat(...node.types.map(t => inferRuntimeType(t, declaredTypes)))) - ]; - case 'TSIntersectionType': - return ['Object']; - case 'TSSymbolKeyword': - return ['Symbol']; - default: - return [`null`]; // no runtime check - } -} -function toRuntimeTypeString(types) { - return types.length > 1 ? `[${types.join(', ')}]` : types[0]; -} -function extractRuntimeEmits(node, emits) { - if (node.type === 'TSTypeLiteral' || node.type === 'TSInterfaceBody') { - const members = node.type === 'TSTypeLiteral' ? node.members : node.body; - for (let t of members) { - if (t.type === 'TSCallSignatureDeclaration') { - extractEventNames(t.parameters[0], emits); - } - } - return; - } - else { - extractEventNames(node.parameters[0], emits); - } -} -function extractEventNames(eventName, emits) { - if (eventName.type === 'Identifier' && - eventName.typeAnnotation && - eventName.typeAnnotation.type === 'TSTypeAnnotation') { - const typeNode = eventName.typeAnnotation.typeAnnotation; - if (typeNode.type === 'TSLiteralType') { - if (typeNode.literal.type !== 'UnaryExpression') { - emits.add(String(typeNode.literal.value)); - } - } - else if (typeNode.type === 'TSUnionType') { - for (const t of typeNode.types) { - if (t.type === 'TSLiteralType' && - t.literal.type !== 'UnaryExpression') { - emits.add(String(t.literal.value)); - } - } - } - } -} -function genRuntimeEmits(emits) { - return emits.size - ? `\n emits: [${Array.from(emits) - .map(p => JSON.stringify(p)) - .join(', ')}],` - : ``; -} -function isCallOf(node, test) { - return !!(node && - node.type === 'CallExpression' && - node.callee.type === 'Identifier' && - (typeof test === 'string' - ? node.callee.name === test - : test(node.callee.name))); -} -function canNeverBeRef(node, userReactiveImport) { - if (isCallOf(node, userReactiveImport)) { - return true; - } - switch (node.type) { - case 'UnaryExpression': - case 'BinaryExpression': - case 'ArrayExpression': - case 'ObjectExpression': - case 'FunctionExpression': - case 'ArrowFunctionExpression': - case 'UpdateExpression': - case 'ClassExpression': - case 'TaggedTemplateExpression': - return true; - case 'SequenceExpression': - return canNeverBeRef(node.expressions[node.expressions.length - 1], userReactiveImport); - default: - if (node.type.endsWith('Literal')) { - return true; - } - return false; - } -} -/** - * Analyze bindings in normal `<script>` - * Note that `compileScriptSetup` already analyzes bindings as part of its - * compilation process so this should only be used on single `<script>` SFCs. - */ -function analyzeScriptBindings(ast) { - for (const node of ast) { - if (node.type === 'ExportDefaultDeclaration' && - node.declaration.type === 'ObjectExpression') { - return analyzeBindingsFromOptions(node.declaration); - } - } - return {}; -} -function analyzeBindingsFromOptions(node) { - const bindings = {}; - // #3270, #3275 - // mark non-script-setup so we don't resolve components/directives from these - Object.defineProperty(bindings, '__isScriptSetup', { - enumerable: false, - value: false - }); - for (const property of node.properties) { - if (property.type === 'ObjectProperty' && - !property.computed && - property.key.type === 'Identifier') { - // props - if (property.key.name === 'props') { - // props: ['foo'] - // props: { foo: ... } - for (const key of getObjectOrArrayExpressionKeys(property.value)) { - bindings[key] = "props" /* PROPS */; - } - } - // inject - else if (property.key.name === 'inject') { - // inject: ['foo'] - // inject: { foo: {} } - for (const key of getObjectOrArrayExpressionKeys(property.value)) { - bindings[key] = "options" /* OPTIONS */; - } - } - // computed & methods - else if (property.value.type === 'ObjectExpression' && - (property.key.name === 'computed' || property.key.name === 'methods')) { - // methods: { foo() {} } - // computed: { foo() {} } - for (const key of getObjectExpressionKeys(property.value)) { - bindings[key] = "options" /* OPTIONS */; - } - } - } - // setup & data - else if (property.type === 'ObjectMethod' && - property.key.type === 'Identifier' && - (property.key.name === 'setup' || property.key.name === 'data')) { - for (const bodyItem of property.body.body) { - // setup() { - // return { - // foo: null - // } - // } - if (bodyItem.type === 'ReturnStatement' && - bodyItem.argument && - bodyItem.argument.type === 'ObjectExpression') { - for (const key of getObjectExpressionKeys(bodyItem.argument)) { - bindings[key] = - property.key.name === 'setup' - ? "setup-maybe-ref" /* SETUP_MAYBE_REF */ - : "data" /* DATA */; - } - } - } - } - } - return bindings; -} -function getObjectExpressionKeys(node) { - const keys = []; - for (const prop of node.properties) { - if ((prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') && - !prop.computed) { - if (prop.key.type === 'Identifier') { - keys.push(prop.key.name); - } - else if (prop.key.type === 'StringLiteral') { - keys.push(prop.key.value); - } - } - } - return keys; -} -function getArrayExpressionKeys(node) { - const keys = []; - for (const element of node.elements) { - if (element && element.type === 'StringLiteral') { - keys.push(element.value); - } - } - return keys; -} -function getObjectOrArrayExpressionKeys(value) { - if (value.type === 'ArrayExpression') { - return getArrayExpressionKeys(value); - } - if (value.type === 'ObjectExpression') { - return getObjectExpressionKeys(value); - } - return []; -} -const templateUsageCheckCache = createCache(); -function resolveTemplateUsageCheckString(sfc) { - const { content, ast } = sfc.template; - const cached = templateUsageCheckCache.get(content); - if (cached) { - return cached; - } - let code = ''; - CompilerDOM.transform(CompilerDOM.createRoot([ast]), { - nodeTransforms: [ - node => { - if (node.type === 1 /* ELEMENT */) { - if (!CompilerDOM.parserOptions.isNativeTag(node.tag) && - !CompilerDOM.parserOptions.isBuiltInComponent(node.tag)) { - code += `,${shared.camelize(node.tag)},${shared.capitalize(shared.camelize(node.tag))}`; - } - for (let i = 0; i < node.props.length; i++) { - const prop = node.props[i]; - if (prop.type === 7 /* DIRECTIVE */) { - if (!isBuiltInDir(prop.name)) { - code += `,v${shared.capitalize(shared.camelize(prop.name))}`; - } - if (prop.exp) { - code += `,${processExp(prop.exp.content, prop.name)}`; - } - } - } - } - else if (node.type === 5 /* INTERPOLATION */) { - code += `,${processExp(node.content.content)}`; - } - } - ] - }); - code += ';'; - templateUsageCheckCache.set(content, code); - return code; -} -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -function processExp(exp, dir) { - if (/ as\s+\w|<.*>|:/.test(exp)) { - if (dir === 'slot') { - exp = `(${exp})=>{}`; - } - else if (dir === 'for') { - const inMatch = exp.match(forAliasRE); - if (inMatch) { - const [, LHS, RHS] = inMatch; - return processExp(`(${LHS})=>{}`) + processExp(RHS); - } - } - let ret = ''; - // has potential type cast or generic arguments that uses types - const ast = parser$2.parseExpression(exp, { plugins: ['typescript'] }); - CompilerDOM.walkIdentifiers(ast, node => { - ret += `,` + node.name; - }); - return ret; - } - return stripStrings(exp); -} -function stripStrings(exp) { - return exp - .replace(/'[^']*'|"[^"]*"/g, '') - .replace(/`[^`]+`/g, stripTemplateString); -} -function stripTemplateString(str) { - const interpMatch = str.match(/\${[^}]+}/g); - if (interpMatch) { - return interpMatch.map(m => m.slice(2, -1)).join(','); - } - return ''; -} -function isImportUsed(local, sfc) { - return new RegExp( - // #4274 escape $ since it's a special char in regex - // (and is the only regex special char that is valid in identifiers) - `[^\\w$_]${local.replace(/\$/g, '\\$')}[^\\w$_]`).test(resolveTemplateUsageCheckString(sfc)); -} -/** - * Note: this comparison assumes the prev/next script are already identical, - * and only checks the special case where <script setup lang="ts"> unused import - * pruning result changes due to template changes. - */ -function hmrShouldReload(prevImports, next) { - if (!next.scriptSetup || - (next.scriptSetup.lang !== 'ts' && next.scriptSetup.lang !== 'tsx')) { - return false; - } - // for each previous import, check if its used status remain the same based on - // the next descriptor's template - for (const key in prevImports) { - // if an import was previous unused, but now is used, we need to force - // reload so that the script now includes that import. - if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) { - return true; - } - } - return false; -} - -const DEFAULT_FILENAME = 'anonymous.vue'; -const sourceToSFC = createCache(); -function parse(source, { sourceMap = true, filename = DEFAULT_FILENAME, sourceRoot = '', pad = false, ignoreEmpty = true, compiler = CompilerDOM__namespace } = {}) { - const sourceKey = source + sourceMap + filename + sourceRoot + pad + compiler.parse; - const cache = sourceToSFC.get(sourceKey); - if (cache) { - return cache; - } - const descriptor = { - filename, - source, - template: null, - script: null, - scriptSetup: null, - styles: [], - customBlocks: [], - cssVars: [], - slotted: false, - shouldForceReload: prevImports => hmrShouldReload(prevImports, descriptor) - }; - const errors = []; - const ast = compiler.parse(source, { - // there are no components at SFC parsing level - isNativeTag: () => true, - // preserve all whitespaces - isPreTag: () => true, - getTextMode: ({ tag, props }, parent) => { - // all top level elements except <template> are parsed as raw text - // containers - if ((!parent && tag !== 'template') || - // <template lang="xxx"> should also be treated as raw text - (tag === 'template' && - props.some(p => p.type === 6 /* ATTRIBUTE */ && - p.name === 'lang' && - p.value && - p.value.content && - p.value.content !== 'html'))) { - return 2 /* RAWTEXT */; - } - else { - return 0 /* DATA */; - } - }, - onError: e => { - errors.push(e); - } - }); - ast.children.forEach(node => { - if (node.type !== 1 /* ELEMENT */) { - return; - } - // we only want to keep the nodes that are not empty (when the tag is not a template) - if (ignoreEmpty && - node.tag !== 'template' && - isEmpty(node) && - !hasSrc(node)) { - return; - } - switch (node.tag) { - case 'template': - if (!descriptor.template) { - const templateBlock = (descriptor.template = createBlock(node, source, false)); - templateBlock.ast = node; - // warn against 2.x <template functional> - if (templateBlock.attrs.functional) { - const err = new SyntaxError(`<template functional> is no longer supported in Vue 3, since ` + - `functional components no longer have significant performance ` + - `difference from stateful ones. Just use a normal <template> ` + - `instead.`); - err.loc = node.props.find(p => p.name === 'functional').loc; - errors.push(err); - } - } - else { - errors.push(createDuplicateBlockError(node)); - } - break; - case 'script': - const scriptBlock = createBlock(node, source, pad); - const isSetup = !!scriptBlock.attrs.setup; - if (isSetup && !descriptor.scriptSetup) { - descriptor.scriptSetup = scriptBlock; - break; - } - if (!isSetup && !descriptor.script) { - descriptor.script = scriptBlock; - break; - } - errors.push(createDuplicateBlockError(node, isSetup)); - break; - case 'style': - const styleBlock = createBlock(node, source, pad); - if (styleBlock.attrs.vars) { - errors.push(new SyntaxError(`<style vars> has been replaced by a new proposal: ` + - `https://github.com/vuejs/rfcs/pull/231`)); - } - descriptor.styles.push(styleBlock); - break; - default: - descriptor.customBlocks.push(createBlock(node, source, pad)); - break; - } - }); - if (descriptor.scriptSetup) { - if (descriptor.scriptSetup.src) { - errors.push(new SyntaxError(`<script setup> cannot use the "src" attribute because ` + - `its syntax will be ambiguous outside of the component.`)); - descriptor.scriptSetup = null; - } - if (descriptor.script && descriptor.script.src) { - errors.push(new SyntaxError(`<script> cannot use the "src" attribute when <script setup> is ` + - `also present because they must be processed together.`)); - descriptor.script = null; - } - } - if (sourceMap) { - const genMap = (block) => { - if (block && !block.src) { - block.map = generateSourceMap(filename, source, block.content, sourceRoot, !pad || block.type === 'template' ? block.loc.start.line - 1 : 0); - } - }; - genMap(descriptor.template); - genMap(descriptor.script); - descriptor.styles.forEach(genMap); - descriptor.customBlocks.forEach(genMap); - } - // parse CSS vars - descriptor.cssVars = parseCssVars(descriptor); - // check if the SFC uses :slotted - const slottedRE = /(?:::v-|:)slotted\(/; - descriptor.slotted = descriptor.styles.some(s => s.scoped && slottedRE.test(s.content)); - const result = { - descriptor, - errors - }; - sourceToSFC.set(sourceKey, result); - return result; + genMap(descriptor.template, templateColumnOffset); + genMap(descriptor.script); + descriptor.styles.forEach((s) => genMap(s)); + descriptor.customBlocks.forEach((s) => genMap(s)); + } + descriptor.cssVars = parseCssVars(descriptor); + const slottedRE = /(?:::v-|:)slotted\(/; + descriptor.slotted = descriptor.styles.some( + (s) => s.scoped && slottedRE.test(s.content) + ); + const result = { + descriptor, + errors + }; + parseCache$1.set(sourceKey, result); + return result; } function createDuplicateBlockError(node, isScriptSetup = false) { - const err = new SyntaxError(`Single file component can contain only one <${node.tag}${isScriptSetup ? ` setup` : ``}> element`); - err.loc = node.loc; - return err; + const err = new SyntaxError( + `Single file component can contain only one <${node.tag}${isScriptSetup ? ` setup` : ``}> element` + ); + err.loc = node.loc; + return err; } function createBlock(node, source, pad) { - const type = node.tag; - let { start, end } = node.loc; - let content = ''; - if (node.children.length) { - start = node.children[0].loc.start; - end = node.children[node.children.length - 1].loc.end; - content = source.slice(start.offset, end.offset); - } - else { - const offset = node.loc.source.indexOf(`</`); - if (offset > -1) { - start = { - line: start.line, - column: start.column + offset, - offset: start.offset + offset - }; + const type = node.tag; + const loc = node.innerLoc; + const attrs = {}; + const block = { + type, + content: source.slice(loc.start.offset, loc.end.offset), + loc, + attrs + }; + if (pad) { + block.content = padContent(source, block, pad) + block.content; + } + node.props.forEach((p) => { + if (p.type === 6) { + const name = p.name; + attrs[name] = p.value ? p.value.content || true : true; + if (name === "lang") { + block.lang = p.value && p.value.content; + } else if (name === "src") { + block.src = p.value && p.value.content; + } else if (type === "style") { + if (name === "scoped") { + block.scoped = true; + } else if (name === "module") { + block.module = attrs[name]; } - end = { ...start }; + } else if (type === "script" && name === "setup") { + block.setup = attrs.setup; + } } - const loc = { - source: content, - start, - end - }; - const attrs = {}; - const block = { - type, - content, - loc, - attrs - }; - if (pad) { - block.content = padContent(source, block, pad) + block.content; - } - node.props.forEach(p => { - if (p.type === 6 /* ATTRIBUTE */) { - attrs[p.name] = p.value ? p.value.content || true : true; - if (p.name === 'lang') { - block.lang = p.value && p.value.content; - } - else if (p.name === 'src') { - block.src = p.value && p.value.content; - } - else if (type === 'style') { - if (p.name === 'scoped') { - block.scoped = true; - } - else if (p.name === 'module') { - block.module = attrs[p.name]; - } - } - else if (type === 'script' && p.name === 'setup') { - block.setup = attrs.setup; - } - } - }); - return block; + }); + return block; } const splitRE = /\r?\n/g; const emptyRE = /^(?:\/\/)?\s*$/; const replaceRE = /./g; -function generateSourceMap(filename, source, generated, sourceRoot, lineOffset) { - const map = new sourceMap.SourceMapGenerator({ - file: filename.replace(/\\/g, '/'), - sourceRoot: sourceRoot.replace(/\\/g, '/') - }); - map.setSourceContent(filename, source); - generated.split(splitRE).forEach((line, index) => { - if (!emptyRE.test(line)) { - const originalLine = index + 1 + lineOffset; - const generatedLine = index + 1; - for (let i = 0; i < line.length; i++) { - if (!/\s/.test(line[i])) { - map.addMapping({ - source: filename, - original: { - line: originalLine, - column: i - }, - generated: { - line: generatedLine, - column: i - } - }); - } - } +function generateSourceMap(filename, source, generated, sourceRoot, lineOffset, columnOffset) { + const map = new sourceMapJs.SourceMapGenerator({ + file: filename.replace(/\\/g, "/"), + sourceRoot: sourceRoot.replace(/\\/g, "/") + }); + map.setSourceContent(filename, source); + map._sources.add(filename); + generated.split(splitRE).forEach((line, index) => { + if (!emptyRE.test(line)) { + const originalLine = index + 1 + lineOffset; + const generatedLine = index + 1; + for (let i = 0; i < line.length; i++) { + if (!/\s/.test(line[i])) { + map._mappings.add({ + originalLine, + originalColumn: i + columnOffset, + generatedLine, + generatedColumn: i, + source: filename, + // @ts-expect-error + name: null + }); } - }); - return JSON.parse(map.toString()); + } + } + }); + return map.toJSON(); } function padContent(content, block, pad) { - content = content.slice(0, block.loc.start.offset); - if (pad === 'space') { - return content.replace(replaceRE, ' '); - } - else { - const offset = content.split(splitRE).length; - const padChar = block.type === 'script' && !block.lang ? '//\n' : '\n'; - return Array(offset).join(padChar); - } + content = content.slice(0, block.loc.start.offset); + if (pad === "space") { + return content.replace(replaceRE, " "); + } else { + const offset = content.split(splitRE).length; + const padChar = block.type === "script" && !block.lang ? "//\n" : "\n"; + return Array(offset).join(padChar); + } } function hasSrc(node) { - return node.props.some(p => { - if (p.type !== 6 /* ATTRIBUTE */) { - return false; - } - return p.name === 'src'; - }); -} -/** - * Returns true if the node has no children - * once the empty text nodes (trimmed content) have been filtered out. - */ -function isEmpty(node) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (child.type !== 2 /* TEXT */ || child.content.trim() !== '') { - return false; - } + return node.props.some((p) => { + if (p.type !== 6) { + return false; } - return true; + return p.name === "src"; + }); +} +function isEmpty(node) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (child.type !== 2 || child.content.trim() !== "") { + return false; + } + } + return true; +} +function hmrShouldReload(prevImports, next) { + if (!next.scriptSetup || next.scriptSetup.lang !== "ts" && next.scriptSetup.lang !== "tsx") { + return false; + } + for (const key in prevImports) { + if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) { + return true; + } + } + return false; +} +function dedent(s) { + const lines = s.split("\n"); + const minIndent = lines.reduce(function(minIndent2, line) { + var _a, _b; + if (line.trim() === "") { + return minIndent2; + } + const indent = ((_b = (_a = line.match(/^\s*/)) == null ? void 0 : _a[0]) == null ? void 0 : _b.length) || 0; + return Math.min(indent, minIndent2); + }, Infinity); + if (minIndent === 0) { + return [s, minIndent]; + } + return [ + lines.map(function(line) { + return line.slice(minIndent); + }).join("\n"), + minIndent + ]; +} + +function isRelativeUrl(url) { + const firstChar = url.charAt(0); + return firstChar === "." || firstChar === "~" || firstChar === "@"; +} +const externalRE = /^(https?:)?\/\//; +function isExternalUrl(url) { + return externalRE.test(url); +} +const dataUrlRE = /^\s*data:/i; +function isDataUrl(url) { + return dataUrlRE.test(url); +} +function parseUrl(url) { + const firstChar = url.charAt(0); + if (firstChar === "~") { + const secondChar = url.charAt(1); + url = url.slice(secondChar === "/" ? 2 : 1); + } + return parseUriParts(url); +} +function parseUriParts(urlString) { + return url.parse(shared.isString(urlString) ? urlString : "", false, true); +} + +const defaultAssetUrlOptions = { + base: null, + includeAbsolute: false, + tags: { + video: ["src", "poster"], + source: ["src"], + img: ["src"], + image: ["xlink:href", "href"], + use: ["xlink:href", "href"] + } +}; +const normalizeOptions = (options) => { + if (Object.keys(options).some((key) => shared.isArray(options[key]))) { + return { + ...defaultAssetUrlOptions, + tags: options + }; + } + return { + ...defaultAssetUrlOptions, + ...options + }; +}; +const createAssetUrlTransformWithOptions = (options) => { + return (node, context) => transformAssetUrl(node, context, options); +}; +const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => { + if (node.type === 1) { + if (!node.props.length) { + return; + } + const tags = options.tags || defaultAssetUrlOptions.tags; + const attrs = tags[node.tag]; + const wildCardAttrs = tags["*"]; + if (!attrs && !wildCardAttrs) { + return; + } + const assetAttrs = (attrs || []).concat(wildCardAttrs || []); + node.props.forEach((attr, index) => { + if (attr.type !== 6 || !assetAttrs.includes(attr.name) || !attr.value || isExternalUrl(attr.value.content) || isDataUrl(attr.value.content) || attr.value.content[0] === "#" || !options.includeAbsolute && !isRelativeUrl(attr.value.content)) { + return; + } + const url = parseUrl(attr.value.content); + if (options.base && attr.value.content[0] === ".") { + const base = parseUrl(options.base); + const protocol = base.protocol || ""; + const host = base.host ? protocol + "//" + base.host : ""; + const basePath = base.path || "/"; + attr.value.content = host + (path$3.posix || path$3).join(basePath, url.path + (url.hash || "")); + return; + } + const exp = getImportsExpressionExp(url.path, url.hash, attr.loc, context); + node.props[index] = { + type: 7, + name: "bind", + arg: compilerCore.createSimpleExpression(attr.name, true, attr.loc), + exp, + modifiers: [], + loc: attr.loc + }; + }); + } +}; +function getImportsExpressionExp(path2, hash, loc, context) { + if (path2) { + let name; + let exp; + const existingIndex = context.imports.findIndex((i) => i.path === path2); + if (existingIndex > -1) { + name = `_imports_${existingIndex}`; + exp = context.imports[existingIndex].exp; + } else { + name = `_imports_${context.imports.length}`; + exp = compilerCore.createSimpleExpression( + name, + false, + loc, + 3 + ); + context.imports.push({ + exp, + path: decodeURIComponent(path2) + }); + } + if (!hash) { + return exp; + } + const hashExp = `${name} + '${hash}'`; + const finalExp = compilerCore.createSimpleExpression( + hashExp, + false, + loc, + 3 + ); + if (!context.hoistStatic) { + return finalExp; + } + const existingHoistIndex = context.hoists.findIndex((h) => { + return h && h.type === 4 && !h.isStatic && h.content === hashExp; + }); + if (existingHoistIndex > -1) { + return compilerCore.createSimpleExpression( + `_hoisted_${existingHoistIndex + 1}`, + false, + loc, + 3 + ); + } + return context.hoist(finalExp); + } else { + return compilerCore.createSimpleExpression(`''`, false, loc, 3); + } +} + +const srcsetTags = ["img", "source"]; +const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g; +const createSrcsetTransformWithOptions = (options) => { + return (node, context) => transformSrcset(node, context, options); +}; +const transformSrcset = (node, context, options = defaultAssetUrlOptions) => { + if (node.type === 1) { + if (srcsetTags.includes(node.tag) && node.props.length) { + node.props.forEach((attr, index) => { + if (attr.name === "srcset" && attr.type === 6) { + if (!attr.value) + return; + const value = attr.value.content; + if (!value) + return; + const imageCandidates = value.split(",").map((s) => { + const [url, descriptor] = s.replace(escapedSpaceCharacters, " ").trim().split(" ", 2); + return { url, descriptor }; + }); + for (let i = 0; i < imageCandidates.length; i++) { + const { url } = imageCandidates[i]; + if (isDataUrl(url)) { + imageCandidates[i + 1].url = url + "," + imageCandidates[i + 1].url; + imageCandidates.splice(i, 1); + } + } + const shouldProcessUrl = (url) => { + return !isExternalUrl(url) && !isDataUrl(url) && (options.includeAbsolute || isRelativeUrl(url)); + }; + if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) { + return; + } + if (options.base) { + const base = options.base; + const set = []; + let needImportTransform = false; + imageCandidates.forEach((candidate) => { + let { url, descriptor } = candidate; + descriptor = descriptor ? ` ${descriptor}` : ``; + if (url[0] === ".") { + candidate.url = (path$3.posix || path$3).join(base, url); + set.push(candidate.url + descriptor); + } else if (shouldProcessUrl(url)) { + needImportTransform = true; + } else { + set.push(url + descriptor); + } + }); + if (!needImportTransform) { + attr.value.content = set.join(", "); + return; + } + } + const compoundExpression = compilerCore.createCompoundExpression([], attr.loc); + imageCandidates.forEach(({ url, descriptor }, index2) => { + if (shouldProcessUrl(url)) { + const { path: path2 } = parseUrl(url); + let exp2; + if (path2) { + const existingImportsIndex = context.imports.findIndex( + (i) => i.path === path2 + ); + if (existingImportsIndex > -1) { + exp2 = compilerCore.createSimpleExpression( + `_imports_${existingImportsIndex}`, + false, + attr.loc, + 3 + ); + } else { + exp2 = compilerCore.createSimpleExpression( + `_imports_${context.imports.length}`, + false, + attr.loc, + 3 + ); + context.imports.push({ exp: exp2, path: path2 }); + } + compoundExpression.children.push(exp2); + } + } else { + const exp2 = compilerCore.createSimpleExpression( + `"${url}"`, + false, + attr.loc, + 3 + ); + compoundExpression.children.push(exp2); + } + const isNotLast = imageCandidates.length - 1 > index2; + if (descriptor && isNotLast) { + compoundExpression.children.push(` + ' ${descriptor}, ' + `); + } else if (descriptor) { + compoundExpression.children.push(` + ' ${descriptor}'`); + } else if (isNotLast) { + compoundExpression.children.push(` + ', ' + `); + } + }); + let exp = compoundExpression; + if (context.hoistStatic) { + exp = context.hoist(compoundExpression); + exp.constType = 3; + } + node.props[index] = { + type: 7, + name: "bind", + arg: compilerCore.createSimpleExpression("srcset", true, attr.loc), + exp, + modifiers: [], + loc: attr.loc + }; + } + }); + } + } +}; + +function commonjsRequire(path) { + throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); +} + +var consolidate$2 = {exports: {}}; + +(function (module, exports) { + /* + * Engines which do not support caching of their file contents + * should use the `read()` function defined in consolidate.js + * On top of this, when an engine compiles to a `Function`, + * these functions should either be cached within consolidate.js + * or the engine itself via `options.cache`. This will allow + * users and frameworks to pass `options.cache = true` for + * `NODE_ENV=production`, however edit the file(s) without + * re-loading the application in development. + */ + + /** + * Module dependencies. + */ + + var fs = require$$0; + var path = path$3; + var util = require$$2; + + var join = path.join; + var resolve = path.resolve; + var extname = path.extname; + var dirname = path.dirname; + var isAbsolute = path.isAbsolute; + + var readCache = {}; + + /** + * Require cache. + */ + + var cacheStore = {}; + + /** + * Require cache. + */ + + var requires = {}; + + /** + * Clear the cache. + * + * @api public + */ + + exports.clearCache = function() { + readCache = {}; + cacheStore = {}; + }; + + /** + * Conditionally cache `compiled` template based + * on the `options` filename and `.cache` boolean. + * + * @param {Object} options + * @param {Function} compiled + * @return {Function} + * @api private + */ + + function cache(options, compiled) { + // cachable + if (compiled && options.filename && options.cache) { + delete readCache[options.filename]; + cacheStore[options.filename] = compiled; + return compiled; + } + + // check cache + if (options.filename && options.cache) { + return cacheStore[options.filename]; + } + + return compiled; + } + + /** + * Read `path` with `options` with + * callback `(err, str)`. When `options.cache` + * is true the template string will be cached. + * + * @param {String} options + * @param {Function} cb + * @api private + */ + + function read(path, options, cb) { + var str = readCache[path]; + var cached = options.cache && str && typeof str === 'string'; + + // cached (only if cached is a string and not a compiled template function) + if (cached) return cb(null, str); + + // read + fs.readFile(path, 'utf8', function(err, str) { + if (err) return cb(err); + // remove extraneous utf8 BOM marker + str = str.replace(/^\uFEFF/, ''); + if (options.cache) readCache[path] = str; + cb(null, str); + }); + } + + /** + * Read `path` with `options` with + * callback `(err, str)`. When `options.cache` + * is true the partial string will be cached. + * + * @param {String} options + * @param {Function} fn + * @api private + */ + + function readPartials(path, options, cb) { + if (!options.partials) return cb(); + var keys = Object.keys(options.partials); + var partials = {}; + + function next(index) { + if (index === keys.length) return cb(null, partials); + var key = keys[index]; + var partialPath = options.partials[key]; + + if (partialPath === undefined || partialPath === null || partialPath === false) { + return next(++index); + } + + var file; + if (isAbsolute(partialPath)) { + if (extname(partialPath) !== '') { + file = partialPath; + } else { + file = join(partialPath + extname(path)); + } + } else { + file = join(dirname(path), partialPath + extname(path)); + } + + read(file, options, function(err, str) { + if (err) return cb(err); + partials[key] = str; + next(++index); + }); + } + + next(0); + } + + /** + * promisify + */ + function promisify(cb, fn) { + return new Promise(function(resolve, reject) { + cb = cb || function(err, html) { + if (err) { + return reject(err); + } + resolve(html); + }; + fn(cb); + }); + } + + /** + * fromStringRenderer + */ + + function fromStringRenderer(name) { + return function(path, options, cb) { + options.filename = path; + + return promisify(cb, function(cb) { + readPartials(path, options, function(err, partials) { + var extend = (requires.extend || (requires.extend = require$$2._extend)); + var opts = extend({}, options); + opts.partials = partials; + if (err) return cb(err); + if (cache(opts)) { + exports[name].render('', opts, cb); + } else { + read(path, opts, function(err, str) { + if (err) return cb(err); + exports[name].render(str, opts, cb); + }); + } + }); + }); + }; + } + + /** + * velocity support. + */ + + exports.velocityjs = fromStringRenderer('velocityjs'); + + /** + * velocity string support. + */ + + exports.velocityjs.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.velocityjs || (requires.velocityjs = require('velocityjs')); + try { + options.locals = options; + cb(null, engine.render(str, options).trimLeft()); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Liquid support. + */ + + exports.liquid = fromStringRenderer('liquid'); + + /** + * Liquid string support. + */ + + /** + * Note that in order to get filters and custom tags we've had to push + * all user-defined locals down into @locals. However, just to make things + * backwards-compatible, any property of `options` that is left after + * processing and removing `locals`, `meta`, `filters`, `customTags` and + * `includeDir` will also become a local. + */ + + function _renderTinyliquid(engine, str, options, cb) { + var context = engine.newContext(); + var k; + + /** + * Note that there's a bug in the library that doesn't allow us to pass + * the locals to newContext(), hence looping through the keys: + */ + + if (options.locals) { + for (k in options.locals) { + context.setLocals(k, options.locals[k]); + } + delete options.locals; + } + + if (options.meta) { + context.setLocals('page', options.meta); + delete options.meta; + } + + /** + * Add any defined filters: + */ + + if (options.filters) { + for (k in options.filters) { + context.setFilter(k, options.filters[k]); + } + delete options.filters; + } + + /** + * Set up a callback for the include directory: + */ + + var includeDir = options.includeDir || process.cwd(); + + context.onInclude(function(name, callback) { + var extname = path.extname(name) ? '' : '.liquid'; + var filename = path.resolve(includeDir, name + extname); + + fs.readFile(filename, {encoding: 'utf8'}, function(err, data) { + if (err) return callback(err); + callback(null, engine.parse(data)); + }); + }); + delete options.includeDir; + + /** + * The custom tag functions need to have their results pushed back + * through the parser, so set up a shim before calling the provided + * callback: + */ + + var compileOptions = { + customTags: {} + }; + + if (options.customTags) { + var tagFunctions = options.customTags; + + for (k in options.customTags) { + /*Tell jshint there's no problem with having this function in the loop */ + /*jshint -W083 */ + compileOptions.customTags[k] = function(context, name, body) { + var tpl = tagFunctions[name](body.trim()); + context.astStack.push(engine.parse(tpl)); + }; + /*jshint +W083 */ + } + delete options.customTags; + } + + /** + * Now anything left in `options` becomes a local: + */ + + for (k in options) { + context.setLocals(k, options[k]); + } + + /** + * Finally, execute the template: + */ + + var tmpl = cache(context) || cache(context, engine.compile(str, compileOptions)); + tmpl(context, cb); + } + + exports.liquid.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.liquid; + var Liquid; + + try { + // set up tinyliquid engine + engine = requires.liquid = require('tinyliquid'); + + // use tinyliquid engine + _renderTinyliquid(engine, str, options, cb); + + return; + + } catch (err) { + + // set up liquid-node engine + try { + Liquid = requires.liquid = require('liquid-node'); + engine = new Liquid.Engine(); + } catch (err) { + throw err; + } + + } + + // use liquid-node engine + try { + var locals = options.locals || {}; + + if (options.meta) { + locals.pages = options.meta; + delete options.meta; + } + + /** + * Add any defined filters: + */ + + if (options.filters) { + engine.registerFilters(options.filters); + delete options.filters; + } + + /** + * Set up a callback for the include directory: + */ + + var includeDir = options.includeDir || process.cwd(); + engine.fileSystem = new Liquid.LocalFileSystem(includeDir, 'liquid'); + delete options.includeDir; + + /** + * The custom tag functions need to have their results pushed back + * through the parser, so set up a shim before calling the provided + * callback: + */ + + if (options.customTags) { + var tagFunctions = options.customTags; + + for (k in options.customTags) { + engine.registerTag(k, tagFunctions[k]); + } + delete options.customTags; + } + + /** + * Now anything left in `options` becomes a local: + */ + + for (var k in options) { + locals[k] = options[k]; + } + + /** + * Finally, execute the template: + */ + + return engine + .parseAndRender(str, locals) + .nodeify(function(err, result) { + if (err) { + throw new Error(err); + } else { + return cb(null, result); + } + }); + + } catch (err) { + cb(err); + } + }); + }; + + /** + * Jade support. + */ + + exports.jade = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.jade; + if (!engine) { + try { + engine = requires.jade = require('jade'); + } catch (err) { + try { + engine = requires.jade = require('then-jade'); + } catch (otherError) { + throw err; + } + } + } + + try { + var tmpl = cache(options) || cache(options, engine.compileFile(path, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Jade string support. + */ + + exports.jade.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.jade; + if (!engine) { + try { + engine = requires.jade = require('jade'); + } catch (err) { + try { + engine = requires.jade = require('then-jade'); + } catch (otherError) { + throw err; + } + } + } + + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Dust support. + */ + + exports.dust = fromStringRenderer('dust'); + + /** + * Dust string support. + */ + + exports.dust.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.dust; + if (!engine) { + try { + engine = requires.dust = require('dust'); + } catch (err) { + try { + engine = requires.dust = require('dustjs-helpers'); + } catch (err) { + engine = requires.dust = require('dustjs-linkedin'); + } + } + } + + var ext = 'dust'; + var views = '.'; + + if (options) { + if (options.ext) ext = options.ext; + if (options.views) views = options.views; + if (options.settings && options.settings.views) views = options.settings.views; + } + if (!options || (options && !options.cache)) engine.cache = {}; + + engine.onLoad = function(path, callback) { + if (extname(path) === '') path += '.' + ext; + if (path[0] !== '/') path = views + '/' + path; + read(path, options, callback); + }; + + try { + var templateName; + if (options.filename) { + templateName = options.filename.replace(new RegExp('^' + views + '/'), '').replace(new RegExp('\\.' + ext), ''); + } + + var tmpl = cache(options) || cache(options, engine.compileFn(str, templateName)); + tmpl(options, cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Swig support. + */ + + exports.swig = fromStringRenderer('swig'); + + /** + * Swig string support. + */ + + exports.swig.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.swig; + if (!engine) { + try { + engine = requires.swig = require('swig'); + } catch (err) { + try { + engine = requires.swig = require('swig-templates'); + } catch (otherError) { + throw err; + } + } + } + + try { + if (options.cache === true) options.cache = 'memory'; + engine.setDefaults({ cache: options.cache }); + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Razor support. + */ + + exports.razor = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.razor; + if (!engine) { + try { + engine = requires.razor = require('razor-tmpl'); + + } catch (err) { + + throw err; + + } + } + try { + + var tmpl = cache(options) || cache(options, (locals) => { + console.log('Rendering razor file', path); + return engine.renderFileSync(path, locals); + }); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * razor string support. + */ + + exports.razor.render = function(str, options, cb) { + return promisify(cb, function(cb) { + + try { + var engine = requires.razor = require('razor-tmpl'); + } catch (err) { + throw err; + } + + try { + var tf = engine.compile(str); + var tmpl = cache(options) || cache(options, tf); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Atpl support. + */ + + exports.atpl = fromStringRenderer('atpl'); + + /** + * Atpl string support. + */ + + exports.atpl.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.atpl || (requires.atpl = require('atpl')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Liquor support, + */ + + exports.liquor = fromStringRenderer('liquor'); + + /** + * Liquor string support. + */ + + exports.liquor.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.liquor || (requires.liquor = require('liquor')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Twig support. + */ + + exports.twig = fromStringRenderer('twig'); + + /** + * Twig string support. + */ + + exports.twig.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.twig || (requires.twig = require('twig').twig); + var templateData = { + data: str, + allowInlineIncludes: options.allowInlineIncludes, + namespaces: options.namespaces, + path: options.path + }; + try { + var tmpl = cache(templateData) || cache(templateData, engine(templateData)); + cb(null, tmpl.render(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * EJS support. + */ + + exports.ejs = fromStringRenderer('ejs'); + + /** + * EJS string support. + */ + + exports.ejs.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.ejs || (requires.ejs = require('ejs')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Eco support. + */ + + exports.eco = fromStringRenderer('eco'); + + /** + * Eco string support. + */ + + exports.eco.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.eco || (requires.eco = require('eco')); + try { + cb(null, engine.render(str, options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Jazz support. + */ + + exports.jazz = fromStringRenderer('jazz'); + + /** + * Jazz string support. + */ + + exports.jazz.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.jazz || (requires.jazz = require('jazz')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + tmpl.eval(options, function(str) { + cb(null, str); + }); + } catch (err) { + cb(err); + } + }); + }; + + /** + * JQTPL support. + */ + + exports.jqtpl = fromStringRenderer('jqtpl'); + + /** + * JQTPL string support. + */ + + exports.jqtpl.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.jqtpl || (requires.jqtpl = require('jqtpl')); + try { + engine.template(str, str); + cb(null, engine.tmpl(str, options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Haml support. + */ + + exports.haml = fromStringRenderer('haml'); + + /** + * Haml string support. + */ + + exports.haml.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.haml || (requires.haml = require('hamljs')); + try { + options.locals = options; + cb(null, engine.render(str, options).trimLeft()); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Hamlet support. + */ + + exports.hamlet = fromStringRenderer('hamlet'); + + /** + * Hamlet string support. + */ + + exports.hamlet.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.hamlet || (requires.hamlet = require('hamlet')); + try { + options.locals = options; + cb(null, engine.render(str, options).trimLeft()); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Whiskers support. + */ + + exports.whiskers = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.whiskers || (requires.whiskers = require('whiskers')); + engine.__express(path, options, cb); + }); + }; + + /** + * Whiskers string support. + */ + + exports.whiskers.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.whiskers || (requires.whiskers = require('whiskers')); + try { + cb(null, engine.render(str, options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Coffee-HAML support. + */ + + exports['haml-coffee'] = fromStringRenderer('haml-coffee'); + + /** + * Coffee-HAML string support. + */ + + exports['haml-coffee'].render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires['haml-coffee'] || (requires['haml-coffee'] = require('haml-coffee')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Hogan support. + */ + + exports.hogan = fromStringRenderer('hogan'); + + /** + * Hogan string support. + */ + + exports.hogan.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.hogan || (requires.hogan = require('hogan.js')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl.render(options, options.partials)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * templayed.js support. + */ + + exports.templayed = fromStringRenderer('templayed'); + + /** + * templayed.js string support. + */ + + exports.templayed.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.templayed || (requires.templayed = require('templayed')); + try { + var tmpl = cache(options) || cache(options, engine(str)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Handlebars support. + */ + + exports.handlebars = fromStringRenderer('handlebars'); + + /** + * Handlebars string support. + */ + + exports.handlebars.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.handlebars || (requires.handlebars = require('handlebars')); + try { + for (var partial in options.partials) { + engine.registerPartial(partial, options.partials[partial]); + } + for (var helper in options.helpers) { + engine.registerHelper(helper, options.helpers[helper]); + } + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Underscore support. + */ + + exports.underscore = fromStringRenderer('underscore'); + + /** + * Underscore string support. + */ + + exports.underscore.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.underscore || (requires.underscore = require('underscore')); + try { + const partials = {}; + for (var partial in options.partials) { + partials[partial] = engine.template(options.partials[partial]); + } + options.partials = partials; + var tmpl = cache(options) || cache(options, engine.template(str, null, options)); + cb(null, tmpl(options).replace(/\n$/, '')); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Lodash support. + */ + + exports.lodash = fromStringRenderer('lodash'); + + /** + * Lodash string support. + */ + + exports.lodash.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.lodash || (requires.lodash = require('lodash')); + try { + var tmpl = cache(options) || cache(options, engine.template(str, options)); + cb(null, tmpl(options).replace(/\n$/, '')); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Pug support. (formerly Jade) + */ + + exports.pug = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.pug; + if (!engine) { + try { + engine = requires.pug = require('pug'); + } catch (err) { + try { + engine = requires.pug = require('then-pug'); + } catch (otherError) { + throw err; + } + } + } + + try { + var tmpl = cache(options) || cache(options, engine.compileFile(path, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Pug string support. + */ + + exports.pug.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.pug; + if (!engine) { + try { + engine = requires.pug = require('pug'); + } catch (err) { + try { + engine = requires.pug = require('then-pug'); + } catch (otherError) { + throw err; + } + } + } + + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * QEJS support. + */ + + exports.qejs = fromStringRenderer('qejs'); + + /** + * QEJS string support. + */ + + exports.qejs.render = function(str, options, cb) { + return promisify(cb, function(cb) { + try { + var engine = requires.qejs || (requires.qejs = require('qejs')); + engine.render(str, options).then(function(result) { + cb(null, result); + }, function(err) { + cb(err); + }).done(); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Walrus support. + */ + + exports.walrus = fromStringRenderer('walrus'); + + /** + * Walrus string support. + */ + + exports.walrus.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.walrus || (requires.walrus = require('walrus')); + try { + var tmpl = cache(options) || cache(options, engine.parse(str)); + cb(null, tmpl.compile(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Mustache support. + */ + + exports.mustache = fromStringRenderer('mustache'); + + /** + * Mustache string support. + */ + + exports.mustache.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.mustache || (requires.mustache = require('mustache')); + try { + cb(null, engine.render(str, options, options.partials)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Just support. + */ + + exports.just = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.just; + if (!engine) { + var JUST = require('just'); + engine = requires.just = new JUST(); + } + engine.configure({ useCache: options.cache }); + engine.render(path, options, cb); + }); + }; + + /** + * Just string support. + */ + + exports.just.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var JUST = require('just'); + var engine = new JUST({ root: { page: str }}); + engine.render('page', options, cb); + }); + }; + + /** + * ECT support. + */ + + exports.ect = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.ect; + if (!engine) { + var ECT = require('ect'); + engine = requires.ect = new ECT(options); + } + engine.configure({ cache: options.cache }); + engine.render(path, options, cb); + }); + }; + + /** + * ECT string support. + */ + + exports.ect.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var ECT = require('ect'); + var engine = new ECT({ root: { page: str }}); + engine.render('page', options, cb); + }); + }; + + /** + * mote support. + */ + + exports.mote = fromStringRenderer('mote'); + + /** + * mote string support. + */ + + exports.mote.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.mote || (requires.mote = require('mote')); + try { + var tmpl = cache(options) || cache(options, engine.compile(str)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Toffee support. + */ + + exports.toffee = function(path, options, cb) { + return promisify(cb, function(cb) { + var toffee = requires.toffee || (requires.toffee = require('toffee')); + toffee.__consolidate_engine_render(path, options, cb); + }); + }; + + /** + * Toffee string support. + */ + + exports.toffee.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.toffee || (requires.toffee = require('toffee')); + try { + engine.str_render(str, options, cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * doT support. + */ + + exports.dot = fromStringRenderer('dot'); + + /** + * doT string support. + */ + + exports.dot.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.dot || (requires.dot = require('dot')); + var extend = (requires.extend || (requires.extend = require$$2._extend)); + try { + var settings = {}; + settings = extend(settings, engine.templateSettings); + settings = extend(settings, options ? options.dot : {}); + var tmpl = cache(options) || cache(options, engine.template(str, settings, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * bracket support. + */ + + exports.bracket = fromStringRenderer('bracket'); + + /** + * bracket string support. + */ + + exports.bracket.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.bracket || (requires.bracket = require('bracket-template')); + try { + var tmpl = cache(options) || cache(options, engine.default.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Ractive support. + */ + + exports.ractive = fromStringRenderer('ractive'); + + /** + * Ractive string support. + */ + + exports.ractive.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var Engine = requires.ractive || (requires.ractive = require('ractive')); + + var template = cache(options) || cache(options, Engine.parse(str)); + options.template = template; + + if (options.data === null || options.data === undefined) { + var extend = (requires.extend || (requires.extend = require$$2._extend)); + + // Shallow clone the options object + options.data = extend({}, options); + + // Remove consolidate-specific properties from the clone + var i; + var length; + var properties = ['template', 'filename', 'cache', 'partials']; + for (i = 0, length = properties.length; i < length; i++) { + var property = properties[i]; + delete options.data[property]; + } + } + + try { + cb(null, new Engine(options).toHTML()); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Nunjucks support. + */ + + exports.nunjucks = fromStringRenderer('nunjucks'); + + /** + * Nunjucks string support. + */ + + exports.nunjucks.render = function(str, options, cb) { + return promisify(cb, function(cb) { + + try { + + var engine = options.nunjucksEnv || requires.nunjucks || (requires.nunjucks = require('nunjucks')); + + var env = engine; + + // deprecated fallback support for express + // <https://github.com/tj/consolidate.js/pull/152> + // <https://github.com/tj/consolidate.js/pull/224> + if (options.settings && options.settings.views) { + env = engine.configure(options.settings.views); + } else if (options.nunjucks && options.nunjucks.configure) { + env = engine.configure.apply(engine, options.nunjucks.configure); + } + + // + // because `renderString` does not initiate loaders + // we must manually create a loader for it based off + // either `options.settings.views` or `options.nunjucks` or `options.nunjucks.root` + // + // <https://github.com/mozilla/nunjucks/issues/730> + // <https://github.com/crocodilejs/node-email-templates/issues/182> + // + + // so instead we simply check if we passed a custom loader + // otherwise we create a simple file based loader + if (options.loader) { + env = new engine.Environment(options.loader); + } else if (options.settings && options.settings.views) { + env = new engine.Environment( + new engine.FileSystemLoader(options.settings.views) + ); + } else if (options.nunjucks && options.nunjucks.loader) { + if (typeof options.nunjucks.loader === 'string') { + env = new engine.Environment(new engine.FileSystemLoader(options.nunjucks.loader)); + } else { + env = new engine.Environment( + new engine.FileSystemLoader( + options.nunjucks.loader[0], + options.nunjucks.loader[1] + ) + ); + } + } + + env.renderString(str, options, cb); + } catch (err) { + throw cb(err); + } + }); + }; + + /** + * HTMLing support. + */ + + exports.htmling = fromStringRenderer('htmling'); + + /** + * HTMLing string support. + */ + + exports.htmling.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.htmling || (requires.htmling = require('htmling')); + try { + var tmpl = cache(options) || cache(options, engine.string(str)); + cb(null, tmpl.render(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Rendering function + */ + function requireReact(module, filename) { + var babel = requires.babel || (requires.babel = require('babel-core')); + + var compiled = babel.transformFileSync(filename, { presets: [ 'react' ] }).code; + + return module._compile(compiled, filename); + } + + exports.requireReact = requireReact; + + /** + * Converting a string into a node module. + */ + function requireReactString(src, filename) { + var babel = requires.babel || (requires.babel = require('babel-core')); + + if (!filename) filename = ''; + var m = new module.constructor(); + filename = filename || ''; + + // Compile Using React + var compiled = babel.transform(src, { presets: [ 'react' ] }).code; + + // Compile as a module + m.paths = module.paths; + m._compile(compiled, filename); + + return m.exports; + } + + /** + * A naive helper to replace {{tags}} with options.tags content + */ + function reactBaseTmpl(data, options) { + + var exp; + var regex; + + // Iterates through the keys in file object + // and interpolate / replace {{key}} with it's value + for (var k in options) { + if (options.hasOwnProperty(k)) { + exp = '{{' + k + '}}'; + regex = new RegExp(exp, 'g'); + if (data.match(regex)) { + data = data.replace(regex, options[k]); + } + } + } + + return data; + } + + /** + * Plates Support. + */ + + exports.plates = fromStringRenderer('plates'); + + /** + * Plates string support. + */ + + exports.plates.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.plates || (requires.plates = require('plates')); + var map = options.map || undefined; + try { + var tmpl = engine.bind(str, options, map); + cb(null, tmpl); + } catch (err) { + cb(err); + } + }); + }; + + /** + * The main render parser for React bsaed templates + */ + function reactRenderer(type) { + + if (commonjsRequire.extensions) { + + // Ensure JSX is transformed on require + if (!commonjsRequire.extensions['.jsx']) { + commonjsRequire.extensions['.jsx'] = requireReact; + } + + // Supporting .react extension as well as test cases + // Using .react extension is not recommended. + if (!commonjsRequire.extensions['.react']) { + commonjsRequire.extensions['.react'] = requireReact; + } + + } + + // Return rendering fx + return function(str, options, cb) { + return promisify(cb, function(cb) { + // React Import + var ReactDOM = requires.ReactDOM || (requires.ReactDOM = require('react-dom/server')); + var react = requires.react || (requires.react = require('react')); + + // Assign HTML Base + var base = options.base; + delete options.base; + + var enableCache = options.cache; + delete options.cache; + + var isNonStatic = options.isNonStatic; + delete options.isNonStatic; + + // Start Conversion + try { + + var Code; + var Factory; + + var baseStr; + var content; + var parsed; + + if (!cache(options)) { + // Parsing + if (type === 'path') { + var path = resolve(str); + delete require.cache[path]; + Code = commonjsRequire(path); + } else { + Code = requireReactString(str); + } + Factory = cache(options, react.createFactory(Code)); + + } else { + Factory = cache(options); + } + + parsed = new Factory(options); + content = (isNonStatic) ? ReactDOM.renderToString(parsed) : ReactDOM.renderToStaticMarkup(parsed); + + if (base) { + baseStr = readCache[str] || fs.readFileSync(resolve(base), 'utf8'); + + if (enableCache) { + readCache[str] = baseStr; + } + + options.content = content; + content = reactBaseTmpl(baseStr, options); + } + + cb(null, content); + + } catch (err) { + cb(err); + } + }); + }; + } + + /** + * React JS Support + */ + exports.react = reactRenderer('path'); + + /** + * React JS string support. + */ + exports.react.render = reactRenderer('string'); + + /** + * ARC-templates support. + */ + + exports['arc-templates'] = fromStringRenderer('arc-templates'); + + /** + * ARC-templates string support. + */ + + exports['arc-templates'].render = function(str, options, cb) { + var readFileWithOptions = util.promisify(read); + var consolidateFileSystem = {}; + consolidateFileSystem.readFile = function(path) { + return readFileWithOptions(path, options); + }; + + return promisify(cb, function(cb) { + try { + var engine = requires['arc-templates']; + if (!engine) { + var Engine = require('arc-templates/dist/es5'); + engine = requires['arc-templates'] = new Engine({ filesystem: consolidateFileSystem }); + } + + var compiler = cache(options) || cache(options, engine.compileString(str, options.filename)); + compiler.then(function(func) { return func(options); }) + .then(function(result) { cb(null, result.content); }) + .catch(cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Vash support + */ + exports.vash = fromStringRenderer('vash'); + + /** + * Vash string support + */ + exports.vash.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.vash || (requires.vash = require('vash')); + + try { + // helper system : https://github.com/kirbysayshi/vash#helper-system + if (options.helpers) { + for (var key in options.helpers) { + if (!options.helpers.hasOwnProperty(key) || typeof options.helpers[key] !== 'function') { + continue; + } + engine.helpers[key] = options.helpers[key]; + } + } + + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + tmpl(options, function sealLayout(err, ctx) { + if (err) cb(err); + ctx.finishLayout(); + cb(null, ctx.toString().replace(/\n$/, '')); + }); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Slm support. + */ + + exports.slm = fromStringRenderer('slm'); + + /** + * Slm string support. + */ + + exports.slm.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.slm || (requires.slm = require('slm')); + + try { + var tmpl = cache(options) || cache(options, engine.compile(str, options)); + cb(null, tmpl(options)); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Marko support. + */ + + exports.marko = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.marko || (requires.marko = require('marko')); + options.writeToDisk = !!options.cache; + + try { + var tmpl = cache(options) || cache(options, engine.load(path, options)); + tmpl.renderToString(options, cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Marko string support. + */ + + exports.marko.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.marko || (requires.marko = require('marko')); + options.writeToDisk = !!options.cache; + options.filename = options.filename || 'string.marko'; + + try { + var tmpl = cache(options) || cache(options, engine.load(options.filename, str, options)); + tmpl.renderToString(options, cb); + } catch (err) { + cb(err); + } + }); + }; + + /** + * Teacup support. + */ + exports.teacup = function(path, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.teacup || (requires.teacup = require('teacup/lib/express')); + commonjsRequire.extensions['.teacup'] = commonjsRequire.extensions['.coffee']; + if (path[0] !== '/') { + path = join(process.cwd(), path); + } + if (!options.cache) { + var callback = cb; + cb = function() { + delete require.cache[path]; + callback.apply(this, arguments); + }; + } + engine.renderFile(path, options, cb); + }); + }; + + /** + * Teacup string support. + */ + exports.teacup.render = function(str, options, cb) { + var coffee = require('coffee-script'); + var vm = require('vm'); + var sandbox = { + module: {exports: {}}, + require: commonjsRequire + }; + return promisify(cb, function(cb) { + vm.runInNewContext(coffee.compile(str), sandbox); + var tmpl = sandbox.module.exports; + cb(null, tmpl(options)); + }); + }; + + /** + * Squirrelly support. + */ + + exports.squirrelly = fromStringRenderer('squirrelly'); + + /** + * Squirrelly string support. + */ + + exports.squirrelly.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.squirrelly || (requires.squirrelly = require('squirrelly')); + try { + for (var partial in options.partials) { + engine.definePartial(partial, options.partials[partial]); + } + for (var helper in options.helpers) { + engine.defineHelper(helper, options.helpers[helper]); + } + var tmpl = cache(options) || cache(options, engine.Compile(str, options)); + cb(null, tmpl(options, engine)); + } catch (err) { + cb(err); + } + }); + }; + /** + * Twing support. + */ + + exports.twing = fromStringRenderer('twing'); + + /** + * Twing string support. + */ + + exports.twing.render = function(str, options, cb) { + return promisify(cb, function(cb) { + var engine = requires.twing || (requires.twing = require('twing')); + try { + new engine.TwingEnvironment(new engine.TwingLoaderNull()).createTemplate(str).then((twingTemplate) => { + twingTemplate.render(options).then((rendTmpl) => { + var tmpl = cache(options) || cache(options, rendTmpl); + cb(null, tmpl); + }); + }); + } catch (err) { + cb(err); + } + }); + }; + /** + * expose the instance of the engine + */ + exports.requires = requires; +} (consolidate$2, consolidate$2.exports)); + +var consolidateExports = consolidate$2.exports; + +var consolidate = consolidateExports; + +var consolidate$1 = /*@__PURE__*/getDefaultExportFromCjs(consolidate); + +const hasWarned = {}; +function warnOnce(msg) { + const isNodeProd = typeof process !== "undefined" && process.env.NODE_ENV === "production"; + if (!isNodeProd && true && !hasWarned[msg]) { + hasWarned[msg] = true; + warn(msg); + } +} +function warn(msg) { + console.warn( + `\x1B[1m\x1B[33m[@vue/compiler-sfc]\x1B[0m\x1B[33m ${msg}\x1B[0m +` + ); +} + +function preprocess$1({ source, filename, preprocessOptions }, preprocessor) { + let res = ""; + let err = null; + preprocessor.render( + source, + { filename, ...preprocessOptions }, + (_err, _res) => { + if (_err) + err = _err; + res = _res; + } + ); + if (err) + throw err; + return res; +} +function compileTemplate(options) { + const { preprocessLang, preprocessCustomRequire } = options; + const preprocessor = preprocessLang ? preprocessCustomRequire ? preprocessCustomRequire(preprocessLang) : consolidate$1[preprocessLang] : false; + if (preprocessor) { + try { + return doCompileTemplate({ + ...options, + source: preprocess$1(options, preprocessor), + ast: void 0 + // invalidate AST if template goes through preprocessor + }); + } catch (e) { + return { + code: `export default function render() {}`, + source: options.source, + tips: [], + errors: [e] + }; + } + } else if (preprocessLang) { + return { + code: `export default function render() {}`, + source: options.source, + tips: [ + `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.` + ], + errors: [ + `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.` + ] + }; + } else { + return doCompileTemplate(options); + } +} +function doCompileTemplate({ + filename, + id, + scoped, + slotted, + inMap, + source, + ast: inAST, + ssr = false, + ssrCssVars, + isProd = false, + compiler, + compilerOptions = {}, + transformAssetUrls +}) { + const errors = []; + const warnings = []; + let nodeTransforms = []; + if (shared.isObject(transformAssetUrls)) { + const assetOptions = normalizeOptions(transformAssetUrls); + nodeTransforms = [ + createAssetUrlTransformWithOptions(assetOptions), + createSrcsetTransformWithOptions(assetOptions) + ]; + } else if (transformAssetUrls !== false) { + nodeTransforms = [transformAssetUrl, transformSrcset]; + } + if (ssr && !ssrCssVars) { + warnOnce( + `compileTemplate is called with \`ssr: true\` but no corresponding \`cssVars\` option.\`.` + ); + } + if (!id) { + warnOnce(`compileTemplate now requires the \`id\` option.\`.`); + id = ""; + } + const shortId = id.replace(/^data-v-/, ""); + const longId = `data-v-${shortId}`; + const defaultCompiler = ssr ? CompilerSSR__namespace : CompilerDOM__namespace; + compiler = compiler || defaultCompiler; + if (compiler !== defaultCompiler) { + inAST = void 0; + } + if (inAST == null ? void 0 : inAST.transformed) { + const newAST = (ssr ? CompilerDOM__namespace : compiler).parse(inAST.source, { + prefixIdentifiers: true, + ...compilerOptions, + parseMode: "sfc", + onError: (e) => errors.push(e) + }); + const template = newAST.children.find( + (node) => node.type === 1 && node.tag === "template" + ); + inAST = compilerCore.createRoot(template.children, inAST.source); + } + let { code, ast, preamble, map } = compiler.compile(inAST || source, { + mode: "module", + prefixIdentifiers: true, + hoistStatic: true, + cacheHandlers: true, + ssrCssVars: ssr && ssrCssVars && ssrCssVars.length ? genCssVarsFromList(ssrCssVars, shortId, isProd, true) : "", + scopeId: scoped ? longId : void 0, + slotted, + sourceMap: true, + ...compilerOptions, + hmr: !isProd, + nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []), + filename, + onError: (e) => errors.push(e), + onWarn: (w) => warnings.push(w) + }); + if (inMap && !inAST) { + if (map) { + map = mapLines(inMap, map); + } + if (errors.length) { + patchErrors(errors, source, inMap); + } + } + const tips = warnings.map((w) => { + let msg = w.message; + if (w.loc) { + msg += ` +${shared.generateCodeFrame( + (inAST == null ? void 0 : inAST.source) || source, + w.loc.start.offset, + w.loc.end.offset + )}`; + } + return msg; + }); + return { code, ast, preamble, source, errors, tips, map }; +} +function mapLines(oldMap, newMap) { + if (!oldMap) + return newMap; + if (!newMap) + return oldMap; + const oldMapConsumer = new sourceMapJs.SourceMapConsumer(oldMap); + const newMapConsumer = new sourceMapJs.SourceMapConsumer(newMap); + const mergedMapGenerator = new sourceMapJs.SourceMapGenerator(); + newMapConsumer.eachMapping((m) => { + if (m.originalLine == null) { + return; + } + const origPosInOldMap = oldMapConsumer.originalPositionFor({ + line: m.originalLine, + column: m.originalColumn + }); + if (origPosInOldMap.source == null) { + return; + } + mergedMapGenerator.addMapping({ + generated: { + line: m.generatedLine, + column: m.generatedColumn + }, + original: { + line: origPosInOldMap.line, + // map line + // use current column, since the oldMap produced by @vue/compiler-sfc + // does not + column: m.originalColumn + }, + source: origPosInOldMap.source, + name: origPosInOldMap.name + }); + }); + const generator = mergedMapGenerator; + oldMapConsumer.sources.forEach((sourceFile) => { + generator._sources.add(sourceFile); + const sourceContent = oldMapConsumer.sourceContentFor(sourceFile); + if (sourceContent != null) { + mergedMapGenerator.setSourceContent(sourceFile, sourceContent); + } + }); + generator._sourceRoot = oldMap.sourceRoot; + generator._file = oldMap.file; + return generator.toJSON(); +} +function patchErrors(errors, source, inMap) { + const originalSource = inMap.sourcesContent[0]; + const offset = originalSource.indexOf(source); + const lineOffset = originalSource.slice(0, offset).split(/\r?\n/).length - 1; + errors.forEach((err) => { + if (err.loc) { + err.loc.start.line += lineOffset; + err.loc.start.offset += offset; + if (err.loc.end !== err.loc.start) { + err.loc.end.line += lineOffset; + err.loc.end.offset += offset; + } + } + }); } const trimPlugin = () => { - return { - postcssPlugin: 'vue-sfc-trim', - Once(root) { - root.walk(({ type, raws }) => { - if (type === 'rule' || type === 'atrule') { - if (raws.before) - raws.before = '\n'; - if ('after' in raws && raws.after) - raws.after = '\n'; - } - }); + return { + postcssPlugin: "vue-sfc-trim", + Once(root) { + root.walk(({ type, raws }) => { + if (type === "rule" || type === "atrule") { + if (raws.before) + raws.before = "\n"; + if ("after" in raws && raws.after) + raws.after = "\n"; } - }; + }); + } + }; }; trimPlugin.postcss = true; - -var unesc_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = unesc; - -// Many thanks for this post which made this migration much easier. -// https://mathiasbynens.be/notes/css-escapes - -/** - * - * @param {string} str - * @returns {[string, number]|undefined} - */ -function gobbleHex(str) { - var lower = str.toLowerCase(); - var hex = ''; - var spaceTerminated = false; - - for (var i = 0; i < 6 && lower[i] !== undefined; i++) { - var code = lower.charCodeAt(i); // check to see if we are dealing with a valid hex char [a-f|0-9] - - var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point - - spaceTerminated = code === 32; - - if (!valid) { - break; - } - - hex += lower[i]; - } - - if (hex.length === 0) { - return undefined; - } - - var codePoint = parseInt(hex, 16); - var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; // Add special case for - // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" - // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point - - if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { - return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; - } - - return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; -} - -var CONTAINS_ESCAPE = /\\/; - -function unesc(str) { - var needToProcess = CONTAINS_ESCAPE.test(str); - - if (!needToProcess) { - return str; - } - - var ret = ""; - - for (var i = 0; i < str.length; i++) { - if (str[i] === "\\") { - var gobbled = gobbleHex(str.slice(i + 1, i + 7)); - - if (gobbled !== undefined) { - ret += gobbled[0]; - i += gobbled[1]; - continue; - } // Retain a pair of \\ if double escaped `\\\\` - // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e - - - if (str[i + 1] === "\\") { - ret += "\\"; - i++; - continue; - } // if \\ is at the end of the string retain it - // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb - - - if (str.length === i + 1) { - ret += str[i]; - } - - continue; - } - - ret += str[i]; - } - - return ret; -} - -module.exports = exports.default; -}); - -var getProp_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = getProp; - -function getProp(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - - while (props.length > 0) { - var prop = props.shift(); - - if (!obj[prop]) { - return undefined; - } - - obj = obj[prop]; - } - - return obj; -} - -module.exports = exports.default; -}); - -var ensureObject_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = ensureObject; - -function ensureObject(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - - while (props.length > 0) { - var prop = props.shift(); - - if (!obj[prop]) { - obj[prop] = {}; - } - - obj = obj[prop]; - } -} - -module.exports = exports.default; -}); - -var stripComments_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = stripComments; - -function stripComments(str) { - var s = ""; - var commentStart = str.indexOf("/*"); - var lastEnd = 0; - - while (commentStart >= 0) { - s = s + str.slice(lastEnd, commentStart); - var commentEnd = str.indexOf("*/", commentStart + 2); - - if (commentEnd < 0) { - return s; - } - - lastEnd = commentEnd + 2; - commentStart = str.indexOf("/*", lastEnd); - } - - s = s + str.slice(lastEnd); - return s; -} - -module.exports = exports.default; -}); - -var util = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0; - -var _unesc = _interopRequireDefault(unesc_1); - -exports.unesc = _unesc["default"]; - -var _getProp = _interopRequireDefault(getProp_1); - -exports.getProp = _getProp["default"]; - -var _ensureObject = _interopRequireDefault(ensureObject_1); - -exports.ensureObject = _ensureObject["default"]; - -var _stripComments = _interopRequireDefault(stripComments_1); - -exports.stripComments = _stripComments["default"]; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -}); - -var node = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - - - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var cloneNode = function cloneNode(obj, parent) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - var cloned = new obj.constructor(); - - for (var i in obj) { - if (!obj.hasOwnProperty(i)) { - continue; - } - - var value = obj[i]; - var type = typeof value; - - if (i === 'parent' && type === 'object') { - if (parent) { - cloned[i] = parent; - } - } else if (value instanceof Array) { - cloned[i] = value.map(function (j) { - return cloneNode(j, cloned); - }); - } else { - cloned[i] = cloneNode(value, cloned); - } - } - - return cloned; -}; - -var Node = /*#__PURE__*/function () { - function Node(opts) { - if (opts === void 0) { - opts = {}; - } - - Object.assign(this, opts); - this.spaces = this.spaces || {}; - this.spaces.before = this.spaces.before || ''; - this.spaces.after = this.spaces.after || ''; - } - - var _proto = Node.prototype; - - _proto.remove = function remove() { - if (this.parent) { - this.parent.removeChild(this); - } - - this.parent = undefined; - return this; - }; - - _proto.replaceWith = function replaceWith() { - if (this.parent) { - for (var index in arguments) { - this.parent.insertBefore(this, arguments[index]); - } - - this.remove(); - } - - return this; - }; - - _proto.next = function next() { - return this.parent.at(this.parent.index(this) + 1); - }; - - _proto.prev = function prev() { - return this.parent.at(this.parent.index(this) - 1); - }; - - _proto.clone = function clone(overrides) { - if (overrides === void 0) { - overrides = {}; - } - - var cloned = cloneNode(this); - - for (var name in overrides) { - cloned[name] = overrides[name]; - } - - return cloned; - } - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows non standard syntax to be appended to an existing property - * by specifying the escaped value. By specifying the escaped value, - * illegal characters are allowed to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped optional. the escaped value of the property. - */ - ; - - _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - - var originalValue = this[name]; - var originalEscaped = this.raws[name]; - this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. - - if (originalEscaped || valueEscaped !== value) { - this.raws[name] = (originalEscaped || originalValue) + valueEscaped; - } else { - delete this.raws[name]; // delete any escaped value that was created by the setter. - } - } - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows the escaped value to be specified directly, allowing illegal - * characters to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped the escaped value of the property. - */ - ; - - _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - - this.raws[name] = valueEscaped; - } - /** - * When you want a value to passed through to CSS directly. This method - * deletes the corresponding raw value causing the stringifier to fallback - * to the unescaped value. - * @param {string} name the property to set. - * @param {any} value The value that is both escaped and unescaped. - */ - ; - - _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - - if (this.raws) { - delete this.raws[name]; - } - } - /** - * - * @param {number} line The number (starting with 1) - * @param {number} column The column number (starting with 1) - */ - ; - - _proto.isAtPosition = function isAtPosition(line, column) { - if (this.source && this.source.start && this.source.end) { - if (this.source.start.line > line) { - return false; - } - - if (this.source.end.line < line) { - return false; - } - - if (this.source.start.line === line && this.source.start.column > column) { - return false; - } - - if (this.source.end.line === line && this.source.end.column < column) { - return false; - } - - return true; - } - - return undefined; - }; - - _proto.stringifyProperty = function stringifyProperty(name) { - return this.raws && this.raws[name] || this[name]; - }; - - _proto.valueToString = function valueToString() { - return String(this.stringifyProperty("value")); - }; - - _proto.toString = function toString() { - return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); - }; - - _createClass(Node, [{ - key: "rawSpaceBefore", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; - - if (rawSpace === undefined) { - rawSpace = this.spaces && this.spaces.before; - } - - return rawSpace || ""; - }, - set: function set(raw) { - (0, util.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.before = raw; - } - }, { - key: "rawSpaceAfter", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; - - if (rawSpace === undefined) { - rawSpace = this.spaces.after; - } - - return rawSpace || ""; - }, - set: function set(raw) { - (0, util.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.after = raw; - } - }]); - - return Node; -}(); - -exports["default"] = Node; -module.exports = exports.default; -}); - -var types = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0; +var trimPlugin$1 = trimPlugin; + +var dist = {exports: {}}; + +var processor = {exports: {}}; + +var parser = {exports: {}}; + +var root$2 = {exports: {}}; + +var container = {exports: {}}; + +var node$1 = {exports: {}}; + +var util$6 = {}; + +var unesc = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = unesc; + // Many thanks for this post which made this migration much easier. + // https://mathiasbynens.be/notes/css-escapes + + /** + * + * @param {string} str + * @returns {[string, number]|undefined} + */ + function gobbleHex(str) { + var lower = str.toLowerCase(); + var hex = ''; + var spaceTerminated = false; + for (var i = 0; i < 6 && lower[i] !== undefined; i++) { + var code = lower.charCodeAt(i); + // check to see if we are dealing with a valid hex char [a-f|0-9] + var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; + // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + spaceTerminated = code === 32; + if (!valid) { + break; + } + hex += lower[i]; + } + if (hex.length === 0) { + return undefined; + } + var codePoint = parseInt(hex, 16); + var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; + // Add special case for + // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" + // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point + if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { + return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; + } + return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; + } + var CONTAINS_ESCAPE = /\\/; + function unesc(str) { + var needToProcess = CONTAINS_ESCAPE.test(str); + if (!needToProcess) { + return str; + } + var ret = ""; + for (var i = 0; i < str.length; i++) { + if (str[i] === "\\") { + var gobbled = gobbleHex(str.slice(i + 1, i + 7)); + if (gobbled !== undefined) { + ret += gobbled[0]; + i += gobbled[1]; + continue; + } + + // Retain a pair of \\ if double escaped `\\\\` + // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e + if (str[i + 1] === "\\") { + ret += "\\"; + i++; + continue; + } + + // if \\ is at the end of the string retain it + // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb + if (str.length === i + 1) { + ret += str[i]; + } + continue; + } + ret += str[i]; + } + return ret; + } + module.exports = exports.default; +} (unesc, unesc.exports)); + +var unescExports = unesc.exports; + +var getProp = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = getProp; + function getProp(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + return undefined; + } + obj = obj[prop]; + } + return obj; + } + module.exports = exports.default; +} (getProp, getProp.exports)); + +var getPropExports = getProp.exports; + +var ensureObject = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = ensureObject; + function ensureObject(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + obj[prop] = {}; + } + obj = obj[prop]; + } + } + module.exports = exports.default; +} (ensureObject, ensureObject.exports)); + +var ensureObjectExports = ensureObject.exports; + +var stripComments = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = stripComments; + function stripComments(str) { + var s = ""; + var commentStart = str.indexOf("/*"); + var lastEnd = 0; + while (commentStart >= 0) { + s = s + str.slice(lastEnd, commentStart); + var commentEnd = str.indexOf("*/", commentStart + 2); + if (commentEnd < 0) { + return s; + } + lastEnd = commentEnd + 2; + commentStart = str.indexOf("/*", lastEnd); + } + s = s + str.slice(lastEnd); + return s; + } + module.exports = exports.default; +} (stripComments, stripComments.exports)); + +var stripCommentsExports = stripComments.exports; + +util$6.__esModule = true; +util$6.unesc = util$6.stripComments = util$6.getProp = util$6.ensureObject = void 0; +var _unesc = _interopRequireDefault$5(unescExports); +util$6.unesc = _unesc["default"]; +var _getProp = _interopRequireDefault$5(getPropExports); +util$6.getProp = _getProp["default"]; +var _ensureObject = _interopRequireDefault$5(ensureObjectExports); +util$6.ensureObject = _ensureObject["default"]; +var _stripComments = _interopRequireDefault$5(stripCommentsExports); +util$6.stripComments = _stripComments["default"]; +function _interopRequireDefault$5(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _util = util$6; + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var cloneNode = function cloneNode(obj, parent) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + var cloned = new obj.constructor(); + for (var i in obj) { + if (!obj.hasOwnProperty(i)) { + continue; + } + var value = obj[i]; + var type = typeof value; + if (i === 'parent' && type === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + cloned[i] = cloneNode(value, cloned); + } + } + return cloned; + }; + var Node = /*#__PURE__*/function () { + function Node(opts) { + if (opts === void 0) { + opts = {}; + } + Object.assign(this, opts); + this.spaces = this.spaces || {}; + this.spaces.before = this.spaces.before || ''; + this.spaces.after = this.spaces.after || ''; + } + var _proto = Node.prototype; + _proto.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + this.parent = undefined; + return this; + }; + _proto.replaceWith = function replaceWith() { + if (this.parent) { + for (var index in arguments) { + this.parent.insertBefore(this, arguments[index]); + } + this.remove(); + } + return this; + }; + _proto.next = function next() { + return this.parent.at(this.parent.index(this) + 1); + }; + _proto.prev = function prev() { + return this.parent.at(this.parent.index(this) - 1); + }; + _proto.clone = function clone(overrides) { + if (overrides === void 0) { + overrides = {}; + } + var cloned = cloneNode(this); + for (var name in overrides) { + cloned[name] = overrides[name]; + } + return cloned; + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */; + _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + var originalValue = this[name]; + var originalEscaped = this.raws[name]; + this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. + if (originalEscaped || valueEscaped !== value) { + this.raws[name] = (originalEscaped || originalValue) + valueEscaped; + } else { + delete this.raws[name]; // delete any escaped value that was created by the setter. + } + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows the escaped value to be specified directly, allowing illegal + * characters to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped the escaped value of the property. + */; + _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + this.raws[name] = valueEscaped; + } + + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param {string} name the property to set. + * @param {any} value The value that is both escaped and unescaped. + */; + _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + if (this.raws) { + delete this.raws[name]; + } + } + + /** + * + * @param {number} line The number (starting with 1) + * @param {number} column The column number (starting with 1) + */; + _proto.isAtPosition = function isAtPosition(line, column) { + if (this.source && this.source.start && this.source.end) { + if (this.source.start.line > line) { + return false; + } + if (this.source.end.line < line) { + return false; + } + if (this.source.start.line === line && this.source.start.column > column) { + return false; + } + if (this.source.end.line === line && this.source.end.column < column) { + return false; + } + return true; + } + return undefined; + }; + _proto.stringifyProperty = function stringifyProperty(name) { + return this.raws && this.raws[name] || this[name]; + }; + _proto.valueToString = function valueToString() { + return String(this.stringifyProperty("value")); + }; + _proto.toString = function toString() { + return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); + }; + _createClass(Node, [{ + key: "rawSpaceBefore", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; + if (rawSpace === undefined) { + rawSpace = this.spaces && this.spaces.before; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.before = raw; + } + }, { + key: "rawSpaceAfter", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; + if (rawSpace === undefined) { + rawSpace = this.spaces.after; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.after = raw; + } + }]); + return Node; + }(); + exports["default"] = Node; + module.exports = exports.default; +} (node$1, node$1.exports)); + +var nodeExports = node$1.exports; + +var types$1 = {}; + +types$1.__esModule = true; +types$1.UNIVERSAL = types$1.TAG = types$1.STRING = types$1.SELECTOR = types$1.ROOT = types$1.PSEUDO = types$1.NESTING = types$1.ID = types$1.COMMENT = types$1.COMBINATOR = types$1.CLASS = types$1.ATTRIBUTE = void 0; var TAG = 'tag'; -exports.TAG = TAG; +types$1.TAG = TAG; var STRING = 'string'; -exports.STRING = STRING; +types$1.STRING = STRING; var SELECTOR = 'selector'; -exports.SELECTOR = SELECTOR; +types$1.SELECTOR = SELECTOR; var ROOT = 'root'; -exports.ROOT = ROOT; +types$1.ROOT = ROOT; var PSEUDO = 'pseudo'; -exports.PSEUDO = PSEUDO; +types$1.PSEUDO = PSEUDO; var NESTING = 'nesting'; -exports.NESTING = NESTING; +types$1.NESTING = NESTING; var ID = 'id'; -exports.ID = ID; +types$1.ID = ID; var COMMENT = 'comment'; -exports.COMMENT = COMMENT; +types$1.COMMENT = COMMENT; var COMBINATOR = 'combinator'; -exports.COMBINATOR = COMBINATOR; +types$1.COMBINATOR = COMBINATOR; var CLASS = 'class'; -exports.CLASS = CLASS; +types$1.CLASS = CLASS; var ATTRIBUTE = 'attribute'; -exports.ATTRIBUTE = ATTRIBUTE; +types$1.ATTRIBUTE = ATTRIBUTE; var UNIVERSAL = 'universal'; -exports.UNIVERSAL = UNIVERSAL; -}); - -var container = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - -var types$1 = _interopRequireWildcard(types); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Container = /*#__PURE__*/function (_Node) { - _inheritsLoose(Container, _Node); - - function Container(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - - if (!_this.nodes) { - _this.nodes = []; - } - - return _this; - } - - var _proto = Container.prototype; - - _proto.append = function append(selector) { - selector.parent = this; - this.nodes.push(selector); - return this; - }; - - _proto.prepend = function prepend(selector) { - selector.parent = this; - this.nodes.unshift(selector); - return this; - }; - - _proto.at = function at(index) { - return this.nodes[index]; - }; - - _proto.index = function index(child) { - if (typeof child === 'number') { - return child; - } - - return this.nodes.indexOf(child); - }; - - _proto.removeChild = function removeChild(child) { - child = this.index(child); - this.at(child).parent = undefined; - this.nodes.splice(child, 1); - var index; - - for (var id in this.indexes) { - index = this.indexes[id]; - - if (index >= child) { - this.indexes[id] = index - 1; - } - } - - return this; - }; - - _proto.removeAll = function removeAll() { - for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { - var node = _step.value; - node.parent = undefined; - } - - this.nodes = []; - return this; - }; - - _proto.empty = function empty() { - return this.removeAll(); - }; - - _proto.insertAfter = function insertAfter(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex + 1, 0, newNode); - newNode.parent = this; - var index; - - for (var id in this.indexes) { - index = this.indexes[id]; - - if (oldIndex <= index) { - this.indexes[id] = index + 1; - } - } - - return this; - }; - - _proto.insertBefore = function insertBefore(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex, 0, newNode); - newNode.parent = this; - var index; - - for (var id in this.indexes) { - index = this.indexes[id]; - - if (index <= oldIndex) { - this.indexes[id] = index + 1; - } - } - - return this; - }; - - _proto._findChildAtPosition = function _findChildAtPosition(line, col) { - var found = undefined; - this.each(function (node) { - if (node.atPosition) { - var foundChild = node.atPosition(line, col); - - if (foundChild) { - found = foundChild; - return false; - } - } else if (node.isAtPosition(line, col)) { - found = node; - return false; - } - }); - return found; - } - /** - * Return the most specific node at the line and column number given. - * The source location is based on the original parsed location, locations aren't - * updated as selector nodes are mutated. - * - * Note that this location is relative to the location of the first character - * of the selector, and not the location of the selector in the overall document - * when used in conjunction with postcss. - * - * If not found, returns undefined. - * @param {number} line The line number of the node to find. (1-based index) - * @param {number} col The column number of the node to find. (1-based index) - */ - ; - - _proto.atPosition = function atPosition(line, col) { - if (this.isAtPosition(line, col)) { - return this._findChildAtPosition(line, col) || this; - } else { - return undefined; - } - }; - - _proto._inferEndPosition = function _inferEndPosition() { - if (this.last && this.last.source && this.last.source.end) { - this.source = this.source || {}; - this.source.end = this.source.end || {}; - Object.assign(this.source.end, this.last.source.end); - } - }; - - _proto.each = function each(callback) { - if (!this.lastEach) { - this.lastEach = 0; - } - - if (!this.indexes) { - this.indexes = {}; - } - - this.lastEach++; - var id = this.lastEach; - this.indexes[id] = 0; - - if (!this.length) { - return undefined; - } - - var index, result; - - while (this.indexes[id] < this.length) { - index = this.indexes[id]; - result = callback(this.at(index), index); - - if (result === false) { - break; - } - - this.indexes[id] += 1; - } - - delete this.indexes[id]; - - if (result === false) { - return false; - } - }; - - _proto.walk = function walk(callback) { - return this.each(function (node, i) { - var result = callback(node, i); - - if (result !== false && node.length) { - result = node.walk(callback); - } - - if (result === false) { - return false; - } - }); - }; - - _proto.walkAttributes = function walkAttributes(callback) { - var _this2 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.ATTRIBUTE) { - return callback.call(_this2, selector); - } - }); - }; - - _proto.walkClasses = function walkClasses(callback) { - var _this3 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.CLASS) { - return callback.call(_this3, selector); - } - }); - }; - - _proto.walkCombinators = function walkCombinators(callback) { - var _this4 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.COMBINATOR) { - return callback.call(_this4, selector); - } - }); - }; - - _proto.walkComments = function walkComments(callback) { - var _this5 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.COMMENT) { - return callback.call(_this5, selector); - } - }); - }; - - _proto.walkIds = function walkIds(callback) { - var _this6 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.ID) { - return callback.call(_this6, selector); - } - }); - }; - - _proto.walkNesting = function walkNesting(callback) { - var _this7 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.NESTING) { - return callback.call(_this7, selector); - } - }); - }; - - _proto.walkPseudos = function walkPseudos(callback) { - var _this8 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.PSEUDO) { - return callback.call(_this8, selector); - } - }); - }; - - _proto.walkTags = function walkTags(callback) { - var _this9 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.TAG) { - return callback.call(_this9, selector); - } - }); - }; - - _proto.walkUniversals = function walkUniversals(callback) { - var _this10 = this; - - return this.walk(function (selector) { - if (selector.type === types$1.UNIVERSAL) { - return callback.call(_this10, selector); - } - }); - }; - - _proto.split = function split(callback) { - var _this11 = this; - - var current = []; - return this.reduce(function (memo, node, index) { - var split = callback.call(_this11, node); - current.push(node); - - if (split) { - memo.push(current); - current = []; - } else if (index === _this11.length - 1) { - memo.push(current); - } - - return memo; - }, []); - }; - - _proto.map = function map(callback) { - return this.nodes.map(callback); - }; - - _proto.reduce = function reduce(callback, memo) { - return this.nodes.reduce(callback, memo); - }; - - _proto.every = function every(callback) { - return this.nodes.every(callback); - }; - - _proto.some = function some(callback) { - return this.nodes.some(callback); - }; - - _proto.filter = function filter(callback) { - return this.nodes.filter(callback); - }; - - _proto.sort = function sort(callback) { - return this.nodes.sort(callback); - }; - - _proto.toString = function toString() { - return this.map(String).join(''); - }; - - _createClass(Container, [{ - key: "first", - get: function get() { - return this.at(0); - } - }, { - key: "last", - get: function get() { - return this.at(this.length - 1); - } - }, { - key: "length", - get: function get() { - return this.nodes.length; - } - }]); - - return Container; -}(_node["default"]); - -exports["default"] = Container; -module.exports = exports.default; -}); - -var root = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _container = _interopRequireDefault(container); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Root = /*#__PURE__*/function (_Container) { - _inheritsLoose(Root, _Container); - - function Root(opts) { - var _this; - - _this = _Container.call(this, opts) || this; - _this.type = types.ROOT; - return _this; - } - - var _proto = Root.prototype; - - _proto.toString = function toString() { - var str = this.reduce(function (memo, selector) { - memo.push(String(selector)); - return memo; - }, []).join(','); - return this.trailingComma ? str + ',' : str; - }; - - _proto.error = function error(message, options) { - if (this._error) { - return this._error(message, options); - } else { - return new Error(message); - } - }; - - _createClass(Root, [{ - key: "errorGenerator", - set: function set(handler) { - this._error = handler; - } - }]); - - return Root; -}(_container["default"]); - -exports["default"] = Root; -module.exports = exports.default; -}); - -var selector = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _container = _interopRequireDefault(container); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Selector = /*#__PURE__*/function (_Container) { - _inheritsLoose(Selector, _Container); - - function Selector(opts) { - var _this; - - _this = _Container.call(this, opts) || this; - _this.type = types.SELECTOR; - return _this; - } - - return Selector; -}(_container["default"]); - -exports["default"] = Selector; -module.exports = exports.default; -}); +types$1.UNIVERSAL = UNIVERSAL; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var types = _interopRequireWildcard(types$1); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Container = /*#__PURE__*/function (_Node) { + _inheritsLoose(Container, _Node); + function Container(opts) { + var _this; + _this = _Node.call(this, opts) || this; + if (!_this.nodes) { + _this.nodes = []; + } + return _this; + } + var _proto = Container.prototype; + _proto.append = function append(selector) { + selector.parent = this; + this.nodes.push(selector); + return this; + }; + _proto.prepend = function prepend(selector) { + selector.parent = this; + this.nodes.unshift(selector); + return this; + }; + _proto.at = function at(index) { + return this.nodes[index]; + }; + _proto.index = function index(child) { + if (typeof child === 'number') { + return child; + } + return this.nodes.indexOf(child); + }; + _proto.removeChild = function removeChild(child) { + child = this.index(child); + this.at(child).parent = undefined; + this.nodes.splice(child, 1); + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + return this; + }; + _proto.removeAll = function removeAll() { + for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { + var node = _step.value; + node.parent = undefined; + } + this.nodes = []; + return this; + }; + _proto.empty = function empty() { + return this.removeAll(); + }; + _proto.insertAfter = function insertAfter(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex + 1, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (oldIndex <= index) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto.insertBefore = function insertBefore(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index <= oldIndex) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto._findChildAtPosition = function _findChildAtPosition(line, col) { + var found = undefined; + this.each(function (node) { + if (node.atPosition) { + var foundChild = node.atPosition(line, col); + if (foundChild) { + found = foundChild; + return false; + } + } else if (node.isAtPosition(line, col)) { + found = node; + return false; + } + }); + return found; + } + + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param {number} line The line number of the node to find. (1-based index) + * @param {number} col The column number of the node to find. (1-based index) + */; + _proto.atPosition = function atPosition(line, col) { + if (this.isAtPosition(line, col)) { + return this._findChildAtPosition(line, col) || this; + } else { + return undefined; + } + }; + _proto._inferEndPosition = function _inferEndPosition() { + if (this.last && this.last.source && this.last.source.end) { + this.source = this.source || {}; + this.source.end = this.source.end || {}; + Object.assign(this.source.end, this.last.source.end); + } + }; + _proto.each = function each(callback) { + if (!this.lastEach) { + this.lastEach = 0; + } + if (!this.indexes) { + this.indexes = {}; + } + this.lastEach++; + var id = this.lastEach; + this.indexes[id] = 0; + if (!this.length) { + return undefined; + } + var index, result; + while (this.indexes[id] < this.length) { + index = this.indexes[id]; + result = callback(this.at(index), index); + if (result === false) { + break; + } + this.indexes[id] += 1; + } + delete this.indexes[id]; + if (result === false) { + return false; + } + }; + _proto.walk = function walk(callback) { + return this.each(function (node, i) { + var result = callback(node, i); + if (result !== false && node.length) { + result = node.walk(callback); + } + if (result === false) { + return false; + } + }); + }; + _proto.walkAttributes = function walkAttributes(callback) { + var _this2 = this; + return this.walk(function (selector) { + if (selector.type === types.ATTRIBUTE) { + return callback.call(_this2, selector); + } + }); + }; + _proto.walkClasses = function walkClasses(callback) { + var _this3 = this; + return this.walk(function (selector) { + if (selector.type === types.CLASS) { + return callback.call(_this3, selector); + } + }); + }; + _proto.walkCombinators = function walkCombinators(callback) { + var _this4 = this; + return this.walk(function (selector) { + if (selector.type === types.COMBINATOR) { + return callback.call(_this4, selector); + } + }); + }; + _proto.walkComments = function walkComments(callback) { + var _this5 = this; + return this.walk(function (selector) { + if (selector.type === types.COMMENT) { + return callback.call(_this5, selector); + } + }); + }; + _proto.walkIds = function walkIds(callback) { + var _this6 = this; + return this.walk(function (selector) { + if (selector.type === types.ID) { + return callback.call(_this6, selector); + } + }); + }; + _proto.walkNesting = function walkNesting(callback) { + var _this7 = this; + return this.walk(function (selector) { + if (selector.type === types.NESTING) { + return callback.call(_this7, selector); + } + }); + }; + _proto.walkPseudos = function walkPseudos(callback) { + var _this8 = this; + return this.walk(function (selector) { + if (selector.type === types.PSEUDO) { + return callback.call(_this8, selector); + } + }); + }; + _proto.walkTags = function walkTags(callback) { + var _this9 = this; + return this.walk(function (selector) { + if (selector.type === types.TAG) { + return callback.call(_this9, selector); + } + }); + }; + _proto.walkUniversals = function walkUniversals(callback) { + var _this10 = this; + return this.walk(function (selector) { + if (selector.type === types.UNIVERSAL) { + return callback.call(_this10, selector); + } + }); + }; + _proto.split = function split(callback) { + var _this11 = this; + var current = []; + return this.reduce(function (memo, node, index) { + var split = callback.call(_this11, node); + current.push(node); + if (split) { + memo.push(current); + current = []; + } else if (index === _this11.length - 1) { + memo.push(current); + } + return memo; + }, []); + }; + _proto.map = function map(callback) { + return this.nodes.map(callback); + }; + _proto.reduce = function reduce(callback, memo) { + return this.nodes.reduce(callback, memo); + }; + _proto.every = function every(callback) { + return this.nodes.every(callback); + }; + _proto.some = function some(callback) { + return this.nodes.some(callback); + }; + _proto.filter = function filter(callback) { + return this.nodes.filter(callback); + }; + _proto.sort = function sort(callback) { + return this.nodes.sort(callback); + }; + _proto.toString = function toString() { + return this.map(String).join(''); + }; + _createClass(Container, [{ + key: "first", + get: function get() { + return this.at(0); + } + }, { + key: "last", + get: function get() { + return this.at(this.length - 1); + } + }, { + key: "length", + get: function get() { + return this.nodes.length; + } + }]); + return Container; + }(_node["default"]); + exports["default"] = Container; + module.exports = exports.default; +} (container, container.exports)); + +var containerExports = container.exports; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(containerExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Root = /*#__PURE__*/function (_Container) { + _inheritsLoose(Root, _Container); + function Root(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.ROOT; + return _this; + } + var _proto = Root.prototype; + _proto.toString = function toString() { + var str = this.reduce(function (memo, selector) { + memo.push(String(selector)); + return memo; + }, []).join(','); + return this.trailingComma ? str + ',' : str; + }; + _proto.error = function error(message, options) { + if (this._error) { + return this._error(message, options); + } else { + return new Error(message); + } + }; + _createClass(Root, [{ + key: "errorGenerator", + set: function set(handler) { + this._error = handler; + } + }]); + return Root; + }(_container["default"]); + exports["default"] = Root; + module.exports = exports.default; +} (root$2, root$2.exports)); + +var rootExports = root$2.exports; + +var selector$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(containerExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Selector = /*#__PURE__*/function (_Container) { + _inheritsLoose(Selector, _Container); + function Selector(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.SELECTOR; + return _this; + } + return Selector; + }(_container["default"]); + exports["default"] = Selector; + module.exports = exports.default; +} (selector$1, selector$1.exports)); + +var selectorExports = selector$1.exports; + +var className$1 = {exports: {}}; /*! https://mths.be/cssesc v3.0.0 by @mathias */ var object = {}; -var hasOwnProperty = object.hasOwnProperty; -var merge = function merge(options, defaults) { +var hasOwnProperty$1 = object.hasOwnProperty; +var merge$2 = function merge(options, defaults) { if (!options) { return defaults; } @@ -6225,7 +5216,7 @@ var merge = function merge(options, defaults) { for (var key in defaults) { // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since // only recognized option names are used. - result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key]; + result[key] = hasOwnProperty$1.call(options, key) ? options[key] : defaults[key]; } return result; }; @@ -6236,7 +5227,7 @@ var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; // https://mathiasbynens.be/notes/css-escapes#css var cssesc = function cssesc(string, options) { - options = merge(options, cssesc.options); + options = merge$2(options, cssesc.options); if (options.quotes != 'single' && options.quotes != 'double') { options.quotes = 'single'; } @@ -6322,3219 +5313,5837 @@ cssesc.version = '3.0.0'; var cssesc_1 = cssesc; -var className = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _cssesc = _interopRequireDefault(cssesc_1); - - - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var ClassName = /*#__PURE__*/function (_Node) { - _inheritsLoose(ClassName, _Node); - - function ClassName(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types.CLASS; - _this._constructed = true; - return _this; - } - - var _proto = ClassName.prototype; - - _proto.valueToString = function valueToString() { - return '.' + _Node.prototype.valueToString.call(this); - }; - - _createClass(ClassName, [{ - key: "value", - get: function get() { - return this._value; - }, - set: function set(v) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - - if (escaped !== v) { - (0, util.ensureObject)(this, "raws"); - this.raws.value = escaped; - } else if (this.raws) { - delete this.raws.value; - } - } - - this._value = v; - } - }]); - - return ClassName; -}(_node["default"]); - -exports["default"] = ClassName; -module.exports = exports.default; -}); - -var comment = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Comment = /*#__PURE__*/function (_Node) { - _inheritsLoose(Comment, _Node); - - function Comment(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types.COMMENT; - return _this; - } - - return Comment; -}(_node["default"]); - -exports["default"] = Comment; -module.exports = exports.default; -}); - -var id = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var ID = /*#__PURE__*/function (_Node) { - _inheritsLoose(ID, _Node); - - function ID(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types.ID; - return _this; - } - - var _proto = ID.prototype; - - _proto.valueToString = function valueToString() { - return '#' + _Node.prototype.valueToString.call(this); - }; - - return ID; -}(_node["default"]); - -exports["default"] = ID; -module.exports = exports.default; -}); - -var namespace = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _cssesc = _interopRequireDefault(cssesc_1); - - - -var _node = _interopRequireDefault(node); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Namespace = /*#__PURE__*/function (_Node) { - _inheritsLoose(Namespace, _Node); - - function Namespace() { - return _Node.apply(this, arguments) || this; - } - - var _proto = Namespace.prototype; - - _proto.qualifiedName = function qualifiedName(value) { - if (this.namespace) { - return this.namespaceString + "|" + value; - } else { - return value; - } - }; - - _proto.valueToString = function valueToString() { - return this.qualifiedName(_Node.prototype.valueToString.call(this)); - }; - - _createClass(Namespace, [{ - key: "namespace", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - if (namespace === true || namespace === "*" || namespace === "&") { - this._namespace = namespace; - - if (this.raws) { - delete this.raws.namespace; - } - - return; - } - - var escaped = (0, _cssesc["default"])(namespace, { - isIdentifier: true - }); - this._namespace = namespace; - - if (escaped !== namespace) { - (0, util.ensureObject)(this, "raws"); - this.raws.namespace = escaped; - } else if (this.raws) { - delete this.raws.namespace; - } - } - }, { - key: "ns", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - this.namespace = namespace; - } - }, { - key: "namespaceString", - get: function get() { - if (this.namespace) { - var ns = this.stringifyProperty("namespace"); - - if (ns === true) { - return ''; - } else { - return ns; - } - } else { - return ''; - } - } - }]); - - return Namespace; -}(_node["default"]); - -exports["default"] = Namespace; -module.exports = exports.default; -}); - -var tag = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _namespace = _interopRequireDefault(namespace); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Tag = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Tag, _Namespace); - - function Tag(opts) { - var _this; - - _this = _Namespace.call(this, opts) || this; - _this.type = types.TAG; - return _this; - } - - return Tag; -}(_namespace["default"]); - -exports["default"] = Tag; -module.exports = exports.default; -}); - -var string = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var String = /*#__PURE__*/function (_Node) { - _inheritsLoose(String, _Node); - - function String(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types.STRING; - return _this; - } - - return String; -}(_node["default"]); - -exports["default"] = String; -module.exports = exports.default; -}); - -var pseudo = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _container = _interopRequireDefault(container); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Pseudo = /*#__PURE__*/function (_Container) { - _inheritsLoose(Pseudo, _Container); - - function Pseudo(opts) { - var _this; - - _this = _Container.call(this, opts) || this; - _this.type = types.PSEUDO; - return _this; - } - - var _proto = Pseudo.prototype; - - _proto.toString = function toString() { - var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; - return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); - }; - - return Pseudo; -}(_container["default"]); - -exports["default"] = Pseudo; -module.exports = exports.default; -}); +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(cssesc_1); + var _util = util$6; + var _node = _interopRequireDefault(nodeExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ClassName = /*#__PURE__*/function (_Node) { + _inheritsLoose(ClassName, _Node); + function ClassName(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.CLASS; + _this._constructed = true; + return _this; + } + var _proto = ClassName.prototype; + _proto.valueToString = function valueToString() { + return '.' + _Node.prototype.valueToString.call(this); + }; + _createClass(ClassName, [{ + key: "value", + get: function get() { + return this._value; + }, + set: function set(v) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped !== v) { + (0, _util.ensureObject)(this, "raws"); + this.raws.value = escaped; + } else if (this.raws) { + delete this.raws.value; + } + } + this._value = v; + } + }]); + return ClassName; + }(_node["default"]); + exports["default"] = ClassName; + module.exports = exports.default; +} (className$1, className$1.exports)); + +var classNameExports = className$1.exports; + +var comment$2 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Comment = /*#__PURE__*/function (_Node) { + _inheritsLoose(Comment, _Node); + function Comment(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMMENT; + return _this; + } + return Comment; + }(_node["default"]); + exports["default"] = Comment; + module.exports = exports.default; +} (comment$2, comment$2.exports)); + +var commentExports = comment$2.exports; + +var id$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ID = /*#__PURE__*/function (_Node) { + _inheritsLoose(ID, _Node); + function ID(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.ID; + return _this; + } + var _proto = ID.prototype; + _proto.valueToString = function valueToString() { + return '#' + _Node.prototype.valueToString.call(this); + }; + return ID; + }(_node["default"]); + exports["default"] = ID; + module.exports = exports.default; +} (id$1, id$1.exports)); + +var idExports = id$1.exports; + +var tag$1 = {exports: {}}; + +var namespace = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(cssesc_1); + var _util = util$6; + var _node = _interopRequireDefault(nodeExports); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Namespace = /*#__PURE__*/function (_Node) { + _inheritsLoose(Namespace, _Node); + function Namespace() { + return _Node.apply(this, arguments) || this; + } + var _proto = Namespace.prototype; + _proto.qualifiedName = function qualifiedName(value) { + if (this.namespace) { + return this.namespaceString + "|" + value; + } else { + return value; + } + }; + _proto.valueToString = function valueToString() { + return this.qualifiedName(_Node.prototype.valueToString.call(this)); + }; + _createClass(Namespace, [{ + key: "namespace", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + if (namespace === true || namespace === "*" || namespace === "&") { + this._namespace = namespace; + if (this.raws) { + delete this.raws.namespace; + } + return; + } + var escaped = (0, _cssesc["default"])(namespace, { + isIdentifier: true + }); + this._namespace = namespace; + if (escaped !== namespace) { + (0, _util.ensureObject)(this, "raws"); + this.raws.namespace = escaped; + } else if (this.raws) { + delete this.raws.namespace; + } + } + }, { + key: "ns", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + this.namespace = namespace; + } + }, { + key: "namespaceString", + get: function get() { + if (this.namespace) { + var ns = this.stringifyProperty("namespace"); + if (ns === true) { + return ''; + } else { + return ns; + } + } else { + return ''; + } + } + }]); + return Namespace; + }(_node["default"]); + exports["default"] = Namespace; + module.exports = exports.default; +} (namespace, namespace.exports)); + +var namespaceExports = namespace.exports; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(namespaceExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Tag = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Tag, _Namespace); + function Tag(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.TAG; + return _this; + } + return Tag; + }(_namespace["default"]); + exports["default"] = Tag; + module.exports = exports.default; +} (tag$1, tag$1.exports)); + +var tagExports = tag$1.exports; + +var string$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var String = /*#__PURE__*/function (_Node) { + _inheritsLoose(String, _Node); + function String(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.STRING; + return _this; + } + return String; + }(_node["default"]); + exports["default"] = String; + module.exports = exports.default; +} (string$1, string$1.exports)); + +var stringExports = string$1.exports; + +var pseudo$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(containerExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Pseudo = /*#__PURE__*/function (_Container) { + _inheritsLoose(Pseudo, _Container); + function Pseudo(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.PSEUDO; + return _this; + } + var _proto = Pseudo.prototype; + _proto.toString = function toString() { + var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; + return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); + }; + return Pseudo; + }(_container["default"]); + exports["default"] = Pseudo; + module.exports = exports.default; +} (pseudo$1, pseudo$1.exports)); + +var pseudoExports = pseudo$1.exports; + +var attribute$1 = {}; /** * For Node.js, simply re-export the core `util.deprecate` function. */ -var node$1 = util__default.deprecate; - -var attribute = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.unescapeValue = unescapeValue; -exports["default"] = void 0; - -var _cssesc = _interopRequireDefault(cssesc_1); - -var _unesc = _interopRequireDefault(unesc_1); - -var _namespace = _interopRequireDefault(namespace); - - - -var _CSSESC_QUOTE_OPTIONS; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - - - -var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; -var warnOfDeprecatedValueAssignment = node$1(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); -var warnOfDeprecatedQuotedAssignment = node$1(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); -var warnOfDeprecatedConstructor = node$1(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); - -function unescapeValue(value) { - var deprecatedUsage = false; - var quoteMark = null; - var unescaped = value; - var m = unescaped.match(WRAPPED_IN_QUOTES); - - if (m) { - quoteMark = m[1]; - unescaped = m[2]; - } - - unescaped = (0, _unesc["default"])(unescaped); - - if (unescaped !== value) { - deprecatedUsage = true; - } - - return { - deprecatedUsage: deprecatedUsage, - unescaped: unescaped, - quoteMark: quoteMark - }; -} - -function handleDeprecatedContructorOpts(opts) { - if (opts.quoteMark !== undefined) { - return opts; - } - - if (opts.value === undefined) { - return opts; - } - - warnOfDeprecatedConstructor(); - - var _unescapeValue = unescapeValue(opts.value), - quoteMark = _unescapeValue.quoteMark, - unescaped = _unescapeValue.unescaped; - - if (!opts.raws) { - opts.raws = {}; - } - - if (opts.raws.value === undefined) { - opts.raws.value = opts.value; - } - - opts.value = unescaped; - opts.quoteMark = quoteMark; - return opts; -} - -var Attribute = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Attribute, _Namespace); - - function Attribute(opts) { - var _this; - - if (opts === void 0) { - opts = {}; - } - - _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; - _this.type = types.ATTRIBUTE; - _this.raws = _this.raws || {}; - Object.defineProperty(_this.raws, 'unquoted', { - get: node$1(function () { - return _this.value; - }, "attr.raws.unquoted is deprecated. Call attr.value instead."), - set: node$1(function () { - return _this.value; - }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") - }); - _this._constructed = true; - return _this; - } - /** - * Returns the Attribute's value quoted such that it would be legal to use - * in the value of a css file. The original value's quotation setting - * used for stringification is left unchanged. See `setValue(value, options)` - * if you want to control the quote settings of a new value for the attribute. - * - * You can also change the quotation used for the current value by setting quoteMark. - * - * Options: - * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this - * option is not set, the original value for quoteMark will be used. If - * indeterminate, a double quote is used. The legal values are: - * * `null` - the value will be unquoted and characters will be escaped as necessary. - * * `'` - the value will be quoted with a single quote and single quotes are escaped. - * * `"` - the value will be quoted with a double quote and double quotes are escaped. - * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark - * over the quoteMark option value. - * * smart {boolean} - if true, will select a quote mark based on the value - * and the other options specified here. See the `smartQuoteMark()` - * method. - **/ - - - var _proto = Attribute.prototype; - - _proto.getQuotedValue = function getQuotedValue(options) { - if (options === void 0) { - options = {}; - } - - var quoteMark = this._determineQuoteMark(options); - - var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; - var escaped = (0, _cssesc["default"])(this._value, cssescopts); - return escaped; - }; - - _proto._determineQuoteMark = function _determineQuoteMark(options) { - return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); - } - /** - * Set the unescaped value with the specified quotation options. The value - * provided must not include any wrapping quote marks -- those quotes will - * be interpreted as part of the value and escaped accordingly. - */ - ; - - _proto.setValue = function setValue(value, options) { - if (options === void 0) { - options = {}; - } - - this._value = value; - this._quoteMark = this._determineQuoteMark(options); - - this._syncRawValue(); - } - /** - * Intelligently select a quoteMark value based on the value's contents. If - * the value is a legal CSS ident, it will not be quoted. Otherwise a quote - * mark will be picked that minimizes the number of escapes. - * - * If there's no clear winner, the quote mark from these options is used, - * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is - * true). If the quoteMark is unspecified, a double quote is used. - * - * @param options This takes the quoteMark and preferCurrentQuoteMark options - * from the quoteValue method. - */ - ; - - _proto.smartQuoteMark = function smartQuoteMark(options) { - var v = this.value; - var numSingleQuotes = v.replace(/[^']/g, '').length; - var numDoubleQuotes = v.replace(/[^"]/g, '').length; - - if (numSingleQuotes + numDoubleQuotes === 0) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - - if (escaped === v) { - return Attribute.NO_QUOTE; - } else { - var pref = this.preferredQuoteMark(options); - - if (pref === Attribute.NO_QUOTE) { - // pick a quote mark that isn't none and see if it's smaller - var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; - var opts = CSSESC_QUOTE_OPTIONS[quote]; - var quoteValue = (0, _cssesc["default"])(v, opts); - - if (quoteValue.length < escaped.length) { - return quote; - } - } - - return pref; - } - } else if (numDoubleQuotes === numSingleQuotes) { - return this.preferredQuoteMark(options); - } else if (numDoubleQuotes < numSingleQuotes) { - return Attribute.DOUBLE_QUOTE; - } else { - return Attribute.SINGLE_QUOTE; - } - } - /** - * Selects the preferred quote mark based on the options and the current quote mark value. - * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` - * instead. - */ - ; - - _proto.preferredQuoteMark = function preferredQuoteMark(options) { - var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; - - if (quoteMark === undefined) { - quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; - } - - if (quoteMark === undefined) { - quoteMark = Attribute.DOUBLE_QUOTE; - } - - return quoteMark; - }; - - _proto._syncRawValue = function _syncRawValue() { - var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); - - if (rawValue === this._value) { - if (this.raws) { - delete this.raws.value; - } - } else { - this.raws.value = rawValue; - } - }; - - _proto._handleEscapes = function _handleEscapes(prop, value) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(value, { - isIdentifier: true - }); - - if (escaped !== value) { - this.raws[prop] = escaped; - } else { - delete this.raws[prop]; - } - } - }; - - _proto._spacesFor = function _spacesFor(name) { - var attrSpaces = { - before: '', - after: '' - }; - var spaces = this.spaces[name] || {}; - var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; - return Object.assign(attrSpaces, spaces, rawSpaces); - }; - - _proto._stringFor = function _stringFor(name, spaceName, concat) { - if (spaceName === void 0) { - spaceName = name; - } - - if (concat === void 0) { - concat = defaultAttrConcat; - } - - var attrSpaces = this._spacesFor(spaceName); - - return concat(this.stringifyProperty(name), attrSpaces); - } - /** - * returns the offset of the attribute part specified relative to the - * start of the node of the output string. - * - * * "ns" - alias for "namespace" - * * "namespace" - the namespace if it exists. - * * "attribute" - the attribute name - * * "attributeNS" - the start of the attribute or its namespace - * * "operator" - the match operator of the attribute - * * "value" - The value (string or identifier) - * * "insensitive" - the case insensitivity flag; - * @param part One of the possible values inside an attribute. - * @returns -1 if the name is invalid or the value doesn't exist in this attribute. - */ - ; - - _proto.offsetOf = function offsetOf(name) { - var count = 1; - - var attributeSpaces = this._spacesFor("attribute"); - - count += attributeSpaces.before.length; - - if (name === "namespace" || name === "ns") { - return this.namespace ? count : -1; - } - - if (name === "attributeNS") { - return count; - } - - count += this.namespaceString.length; - - if (this.namespace) { - count += 1; - } - - if (name === "attribute") { - return count; - } - - count += this.stringifyProperty("attribute").length; - count += attributeSpaces.after.length; - - var operatorSpaces = this._spacesFor("operator"); - - count += operatorSpaces.before.length; - var operator = this.stringifyProperty("operator"); - - if (name === "operator") { - return operator ? count : -1; - } - - count += operator.length; - count += operatorSpaces.after.length; - - var valueSpaces = this._spacesFor("value"); - - count += valueSpaces.before.length; - var value = this.stringifyProperty("value"); - - if (name === "value") { - return value ? count : -1; - } - - count += value.length; - count += valueSpaces.after.length; - - var insensitiveSpaces = this._spacesFor("insensitive"); - - count += insensitiveSpaces.before.length; - - if (name === "insensitive") { - return this.insensitive ? count : -1; - } - - return -1; - }; - - _proto.toString = function toString() { - var _this2 = this; - - var selector = [this.rawSpaceBefore, '[']; - selector.push(this._stringFor('qualifiedAttribute', 'attribute')); - - if (this.operator && (this.value || this.value === '')) { - selector.push(this._stringFor('operator')); - selector.push(this._stringFor('value')); - selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { - if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { - attrSpaces.before = " "; - } - - return defaultAttrConcat(attrValue, attrSpaces); - })); - } - - selector.push(']'); - selector.push(this.rawSpaceAfter); - return selector.join(''); - }; - - _createClass(Attribute, [{ - key: "quoted", - get: function get() { - var qm = this.quoteMark; - return qm === "'" || qm === '"'; - }, - set: function set(value) { - warnOfDeprecatedQuotedAssignment(); - } - /** - * returns a single (`'`) or double (`"`) quote character if the value is quoted. - * returns `null` if the value is not quoted. - * returns `undefined` if the quotation state is unknown (this can happen when - * the attribute is constructed without specifying a quote mark.) - */ - - }, { - key: "quoteMark", - get: function get() { - return this._quoteMark; - } - /** - * Set the quote mark to be used by this attribute's value. - * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute - * value is updated accordingly. - * - * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. - */ - , - set: function set(quoteMark) { - if (!this._constructed) { - this._quoteMark = quoteMark; - return; - } - - if (this._quoteMark !== quoteMark) { - this._quoteMark = quoteMark; - - this._syncRawValue(); - } - } - }, { - key: "qualifiedAttribute", - get: function get() { - return this.qualifiedName(this.raws.attribute || this.attribute); - } - }, { - key: "insensitiveFlag", - get: function get() { - return this.insensitive ? 'i' : ''; - } - }, { - key: "value", - get: function get() { - return this._value; - } - /** - * Before 3.0, the value had to be set to an escaped value including any wrapped - * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value - * is unescaped during parsing and any quote marks are removed. - * - * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, - * a deprecation warning is raised when the new value contains any characters that would - * require escaping (including if it contains wrapped quotes). - * - * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe - * how the new value is quoted. - */ - , - set: function set(v) { - if (this._constructed) { - var _unescapeValue2 = unescapeValue(v), - deprecatedUsage = _unescapeValue2.deprecatedUsage, - unescaped = _unescapeValue2.unescaped, - quoteMark = _unescapeValue2.quoteMark; - - if (deprecatedUsage) { - warnOfDeprecatedValueAssignment(); - } - - if (unescaped === this._value && quoteMark === this._quoteMark) { - return; - } - - this._value = unescaped; - this._quoteMark = quoteMark; - - this._syncRawValue(); - } else { - this._value = v; - } - } - }, { - key: "attribute", - get: function get() { - return this._attribute; - }, - set: function set(name) { - this._handleEscapes("attribute", name); - - this._attribute = name; - } - }]); - - return Attribute; -}(_namespace["default"]); - -exports["default"] = Attribute; -Attribute.NO_QUOTE = null; -Attribute.SINGLE_QUOTE = "'"; -Attribute.DOUBLE_QUOTE = '"'; -var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { - "'": { - quotes: 'single', - wrap: true - }, - '"': { - quotes: 'double', - wrap: true - } -}, _CSSESC_QUOTE_OPTIONS[null] = { - isIdentifier: true -}, _CSSESC_QUOTE_OPTIONS); - -function defaultAttrConcat(attrValue, attrSpaces) { - return "" + attrSpaces.before + attrValue + attrSpaces.after; -} -}); - -var universal = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _namespace = _interopRequireDefault(namespace); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Universal = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Universal, _Namespace); - - function Universal(opts) { - var _this; - - _this = _Namespace.call(this, opts) || this; - _this.type = types.UNIVERSAL; - _this.value = '*'; - return _this; - } - - return Universal; -}(_namespace["default"]); - -exports["default"] = Universal; -module.exports = exports.default; -}); - -var combinator = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Combinator = /*#__PURE__*/function (_Node) { - _inheritsLoose(Combinator, _Node); - - function Combinator(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types.COMBINATOR; - return _this; - } - - return Combinator; -}(_node["default"]); - -exports["default"] = Combinator; -module.exports = exports.default; -}); - -var nesting = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Nesting = /*#__PURE__*/function (_Node) { - _inheritsLoose(Nesting, _Node); - - function Nesting(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types.NESTING; - _this.value = '&'; - return _this; - } - - return Nesting; -}(_node["default"]); - -exports["default"] = Nesting; -module.exports = exports.default; -}); - -var sortAscending_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = sortAscending; - -function sortAscending(list) { - return list.sort(function (a, b) { - return a - b; - }); -} -module.exports = exports.default; -}); - -var tokenTypes = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0; +var node = require$$2.deprecate; + +(function (exports) { + + exports.__esModule = true; + exports["default"] = void 0; + exports.unescapeValue = unescapeValue; + var _cssesc = _interopRequireDefault(cssesc_1); + var _unesc = _interopRequireDefault(unescExports); + var _namespace = _interopRequireDefault(namespaceExports); + var _types = types$1; + var _CSSESC_QUOTE_OPTIONS; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var deprecate = node; + var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; + var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); + var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); + var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); + function unescapeValue(value) { + var deprecatedUsage = false; + var quoteMark = null; + var unescaped = value; + var m = unescaped.match(WRAPPED_IN_QUOTES); + if (m) { + quoteMark = m[1]; + unescaped = m[2]; + } + unescaped = (0, _unesc["default"])(unescaped); + if (unescaped !== value) { + deprecatedUsage = true; + } + return { + deprecatedUsage: deprecatedUsage, + unescaped: unescaped, + quoteMark: quoteMark + }; + } + function handleDeprecatedContructorOpts(opts) { + if (opts.quoteMark !== undefined) { + return opts; + } + if (opts.value === undefined) { + return opts; + } + warnOfDeprecatedConstructor(); + var _unescapeValue = unescapeValue(opts.value), + quoteMark = _unescapeValue.quoteMark, + unescaped = _unescapeValue.unescaped; + if (!opts.raws) { + opts.raws = {}; + } + if (opts.raws.value === undefined) { + opts.raws.value = opts.value; + } + opts.value = unescaped; + opts.quoteMark = quoteMark; + return opts; + } + var Attribute = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Attribute, _Namespace); + function Attribute(opts) { + var _this; + if (opts === void 0) { + opts = {}; + } + _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; + _this.type = _types.ATTRIBUTE; + _this.raws = _this.raws || {}; + Object.defineProperty(_this.raws, 'unquoted', { + get: deprecate(function () { + return _this.value; + }, "attr.raws.unquoted is deprecated. Call attr.value instead."), + set: deprecate(function () { + return _this.value; + }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") + }); + _this._constructed = true; + return _this; + } + + /** + * Returns the Attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute. + * + * You can also change the quotation used for the current value by setting quoteMark. + * + * Options: + * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this + * option is not set, the original value for quoteMark will be used. If + * indeterminate, a double quote is used. The legal values are: + * * `null` - the value will be unquoted and characters will be escaped as necessary. + * * `'` - the value will be quoted with a single quote and single quotes are escaped. + * * `"` - the value will be quoted with a double quote and double quotes are escaped. + * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark + * over the quoteMark option value. + * * smart {boolean} - if true, will select a quote mark based on the value + * and the other options specified here. See the `smartQuoteMark()` + * method. + **/ + var _proto = Attribute.prototype; + _proto.getQuotedValue = function getQuotedValue(options) { + if (options === void 0) { + options = {}; + } + var quoteMark = this._determineQuoteMark(options); + var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; + var escaped = (0, _cssesc["default"])(this._value, cssescopts); + return escaped; + }; + _proto._determineQuoteMark = function _determineQuoteMark(options) { + return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); + } + + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + */; + _proto.setValue = function setValue(value, options) { + if (options === void 0) { + options = {}; + } + this._value = value; + this._quoteMark = this._determineQuoteMark(options); + this._syncRawValue(); + } + + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + * + * @param options This takes the quoteMark and preferCurrentQuoteMark options + * from the quoteValue method. + */; + _proto.smartQuoteMark = function smartQuoteMark(options) { + var v = this.value; + var numSingleQuotes = v.replace(/[^']/g, '').length; + var numDoubleQuotes = v.replace(/[^"]/g, '').length; + if (numSingleQuotes + numDoubleQuotes === 0) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped === v) { + return Attribute.NO_QUOTE; + } else { + var pref = this.preferredQuoteMark(options); + if (pref === Attribute.NO_QUOTE) { + // pick a quote mark that isn't none and see if it's smaller + var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; + var opts = CSSESC_QUOTE_OPTIONS[quote]; + var quoteValue = (0, _cssesc["default"])(v, opts); + if (quoteValue.length < escaped.length) { + return quote; + } + } + return pref; + } + } else if (numDoubleQuotes === numSingleQuotes) { + return this.preferredQuoteMark(options); + } else if (numDoubleQuotes < numSingleQuotes) { + return Attribute.DOUBLE_QUOTE; + } else { + return Attribute.SINGLE_QUOTE; + } + } + + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */; + _proto.preferredQuoteMark = function preferredQuoteMark(options) { + var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; + if (quoteMark === undefined) { + quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; + } + if (quoteMark === undefined) { + quoteMark = Attribute.DOUBLE_QUOTE; + } + return quoteMark; + }; + _proto._syncRawValue = function _syncRawValue() { + var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); + if (rawValue === this._value) { + if (this.raws) { + delete this.raws.value; + } + } else { + this.raws.value = rawValue; + } + }; + _proto._handleEscapes = function _handleEscapes(prop, value) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(value, { + isIdentifier: true + }); + if (escaped !== value) { + this.raws[prop] = escaped; + } else { + delete this.raws[prop]; + } + } + }; + _proto._spacesFor = function _spacesFor(name) { + var attrSpaces = { + before: '', + after: '' + }; + var spaces = this.spaces[name] || {}; + var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; + return Object.assign(attrSpaces, spaces, rawSpaces); + }; + _proto._stringFor = function _stringFor(name, spaceName, concat) { + if (spaceName === void 0) { + spaceName = name; + } + if (concat === void 0) { + concat = defaultAttrConcat; + } + var attrSpaces = this._spacesFor(spaceName); + return concat(this.stringifyProperty(name), attrSpaces); + } + + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */; + _proto.offsetOf = function offsetOf(name) { + var count = 1; + var attributeSpaces = this._spacesFor("attribute"); + count += attributeSpaces.before.length; + if (name === "namespace" || name === "ns") { + return this.namespace ? count : -1; + } + if (name === "attributeNS") { + return count; + } + count += this.namespaceString.length; + if (this.namespace) { + count += 1; + } + if (name === "attribute") { + return count; + } + count += this.stringifyProperty("attribute").length; + count += attributeSpaces.after.length; + var operatorSpaces = this._spacesFor("operator"); + count += operatorSpaces.before.length; + var operator = this.stringifyProperty("operator"); + if (name === "operator") { + return operator ? count : -1; + } + count += operator.length; + count += operatorSpaces.after.length; + var valueSpaces = this._spacesFor("value"); + count += valueSpaces.before.length; + var value = this.stringifyProperty("value"); + if (name === "value") { + return value ? count : -1; + } + count += value.length; + count += valueSpaces.after.length; + var insensitiveSpaces = this._spacesFor("insensitive"); + count += insensitiveSpaces.before.length; + if (name === "insensitive") { + return this.insensitive ? count : -1; + } + return -1; + }; + _proto.toString = function toString() { + var _this2 = this; + var selector = [this.rawSpaceBefore, '[']; + selector.push(this._stringFor('qualifiedAttribute', 'attribute')); + if (this.operator && (this.value || this.value === '')) { + selector.push(this._stringFor('operator')); + selector.push(this._stringFor('value')); + selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { + if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { + attrSpaces.before = " "; + } + return defaultAttrConcat(attrValue, attrSpaces); + })); + } + selector.push(']'); + selector.push(this.rawSpaceAfter); + return selector.join(''); + }; + _createClass(Attribute, [{ + key: "quoted", + get: function get() { + var qm = this.quoteMark; + return qm === "'" || qm === '"'; + }, + set: function set(value) { + warnOfDeprecatedQuotedAssignment(); + } + + /** + * returns a single (`'`) or double (`"`) quote character if the value is quoted. + * returns `null` if the value is not quoted. + * returns `undefined` if the quotation state is unknown (this can happen when + * the attribute is constructed without specifying a quote mark.) + */ + }, { + key: "quoteMark", + get: function get() { + return this._quoteMark; + } + + /** + * Set the quote mark to be used by this attribute's value. + * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute + * value is updated accordingly. + * + * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. + */, + set: function set(quoteMark) { + if (!this._constructed) { + this._quoteMark = quoteMark; + return; + } + if (this._quoteMark !== quoteMark) { + this._quoteMark = quoteMark; + this._syncRawValue(); + } + } + }, { + key: "qualifiedAttribute", + get: function get() { + return this.qualifiedName(this.raws.attribute || this.attribute); + } + }, { + key: "insensitiveFlag", + get: function get() { + return this.insensitive ? 'i' : ''; + } + }, { + key: "value", + get: function get() { + return this._value; + }, + set: + /** + * Before 3.0, the value had to be set to an escaped value including any wrapped + * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value + * is unescaped during parsing and any quote marks are removed. + * + * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, + * a deprecation warning is raised when the new value contains any characters that would + * require escaping (including if it contains wrapped quotes). + * + * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe + * how the new value is quoted. + */ + function set(v) { + if (this._constructed) { + var _unescapeValue2 = unescapeValue(v), + deprecatedUsage = _unescapeValue2.deprecatedUsage, + unescaped = _unescapeValue2.unescaped, + quoteMark = _unescapeValue2.quoteMark; + if (deprecatedUsage) { + warnOfDeprecatedValueAssignment(); + } + if (unescaped === this._value && quoteMark === this._quoteMark) { + return; + } + this._value = unescaped; + this._quoteMark = quoteMark; + this._syncRawValue(); + } else { + this._value = v; + } + } + }, { + key: "insensitive", + get: function get() { + return this._insensitive; + } + + /** + * Set the case insensitive flag. + * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` + * of the attribute is updated accordingly. + * + * @param {true | false} insensitive true if the attribute should match case-insensitively. + */, + set: function set(insensitive) { + if (!insensitive) { + this._insensitive = false; + + // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. + // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. + if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { + this.raws.insensitiveFlag = undefined; + } + } + this._insensitive = insensitive; + } + }, { + key: "attribute", + get: function get() { + return this._attribute; + }, + set: function set(name) { + this._handleEscapes("attribute", name); + this._attribute = name; + } + }]); + return Attribute; + }(_namespace["default"]); + exports["default"] = Attribute; + Attribute.NO_QUOTE = null; + Attribute.SINGLE_QUOTE = "'"; + Attribute.DOUBLE_QUOTE = '"'; + var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { + "'": { + quotes: 'single', + wrap: true + }, + '"': { + quotes: 'double', + wrap: true + } + }, _CSSESC_QUOTE_OPTIONS[null] = { + isIdentifier: true + }, _CSSESC_QUOTE_OPTIONS); + function defaultAttrConcat(attrValue, attrSpaces) { + return "" + attrSpaces.before + attrValue + attrSpaces.after; + } +} (attribute$1)); + +var universal$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(namespaceExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Universal = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Universal, _Namespace); + function Universal(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.UNIVERSAL; + _this.value = '*'; + return _this; + } + return Universal; + }(_namespace["default"]); + exports["default"] = Universal; + module.exports = exports.default; +} (universal$1, universal$1.exports)); + +var universalExports = universal$1.exports; + +var combinator$2 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Combinator = /*#__PURE__*/function (_Node) { + _inheritsLoose(Combinator, _Node); + function Combinator(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMBINATOR; + return _this; + } + return Combinator; + }(_node["default"]); + exports["default"] = Combinator; + module.exports = exports.default; +} (combinator$2, combinator$2.exports)); + +var combinatorExports = combinator$2.exports; + +var nesting$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types$1; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Nesting = /*#__PURE__*/function (_Node) { + _inheritsLoose(Nesting, _Node); + function Nesting(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.NESTING; + _this.value = '&'; + return _this; + } + return Nesting; + }(_node["default"]); + exports["default"] = Nesting; + module.exports = exports.default; +} (nesting$1, nesting$1.exports)); + +var nestingExports = nesting$1.exports; + +var sortAscending = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = sortAscending; + function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); + } + module.exports = exports.default; +} (sortAscending, sortAscending.exports)); + +var sortAscendingExports = sortAscending.exports; + +var tokenize = {}; + +var tokenTypes = {}; + +tokenTypes.__esModule = true; +tokenTypes.word = tokenTypes.tilde = tokenTypes.tab = tokenTypes.str = tokenTypes.space = tokenTypes.slash = tokenTypes.singleQuote = tokenTypes.semicolon = tokenTypes.plus = tokenTypes.pipe = tokenTypes.openSquare = tokenTypes.openParenthesis = tokenTypes.newline = tokenTypes.greaterThan = tokenTypes.feed = tokenTypes.equals = tokenTypes.doubleQuote = tokenTypes.dollar = tokenTypes.cr = tokenTypes.comment = tokenTypes.comma = tokenTypes.combinator = tokenTypes.colon = tokenTypes.closeSquare = tokenTypes.closeParenthesis = tokenTypes.caret = tokenTypes.bang = tokenTypes.backslash = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0; var ampersand = 38; // `&`.charCodeAt(0); - -exports.ampersand = ampersand; +tokenTypes.ampersand = ampersand; var asterisk = 42; // `*`.charCodeAt(0); - -exports.asterisk = asterisk; +tokenTypes.asterisk = asterisk; var at = 64; // `@`.charCodeAt(0); - -exports.at = at; -var comma = 44; // `,`.charCodeAt(0); - -exports.comma = comma; -var colon = 58; // `:`.charCodeAt(0); - -exports.colon = colon; +tokenTypes.at = at; +var comma$1 = 44; // `,`.charCodeAt(0); +tokenTypes.comma = comma$1; +var colon$1 = 58; // `:`.charCodeAt(0); +tokenTypes.colon = colon$1; var semicolon = 59; // `;`.charCodeAt(0); - -exports.semicolon = semicolon; +tokenTypes.semicolon = semicolon; var openParenthesis = 40; // `(`.charCodeAt(0); - -exports.openParenthesis = openParenthesis; +tokenTypes.openParenthesis = openParenthesis; var closeParenthesis = 41; // `)`.charCodeAt(0); - -exports.closeParenthesis = closeParenthesis; +tokenTypes.closeParenthesis = closeParenthesis; var openSquare = 91; // `[`.charCodeAt(0); - -exports.openSquare = openSquare; +tokenTypes.openSquare = openSquare; var closeSquare = 93; // `]`.charCodeAt(0); - -exports.closeSquare = closeSquare; +tokenTypes.closeSquare = closeSquare; var dollar = 36; // `$`.charCodeAt(0); - -exports.dollar = dollar; +tokenTypes.dollar = dollar; var tilde = 126; // `~`.charCodeAt(0); - -exports.tilde = tilde; +tokenTypes.tilde = tilde; var caret = 94; // `^`.charCodeAt(0); - -exports.caret = caret; -var plus = 43; // `+`.charCodeAt(0); - -exports.plus = plus; +tokenTypes.caret = caret; +var plus$1 = 43; // `+`.charCodeAt(0); +tokenTypes.plus = plus$1; var equals = 61; // `=`.charCodeAt(0); - -exports.equals = equals; +tokenTypes.equals = equals; var pipe = 124; // `|`.charCodeAt(0); - -exports.pipe = pipe; +tokenTypes.pipe = pipe; var greaterThan = 62; // `>`.charCodeAt(0); - -exports.greaterThan = greaterThan; +tokenTypes.greaterThan = greaterThan; var space = 32; // ` `.charCodeAt(0); - -exports.space = space; -var singleQuote = 39; // `'`.charCodeAt(0); - -exports.singleQuote = singleQuote; -var doubleQuote = 34; // `"`.charCodeAt(0); - -exports.doubleQuote = doubleQuote; -var slash = 47; // `/`.charCodeAt(0); - -exports.slash = slash; +tokenTypes.space = space; +var singleQuote$1 = 39; // `'`.charCodeAt(0); +tokenTypes.singleQuote = singleQuote$1; +var doubleQuote$1 = 34; // `"`.charCodeAt(0); +tokenTypes.doubleQuote = doubleQuote$1; +var slash$1 = 47; // `/`.charCodeAt(0); +tokenTypes.slash = slash$1; var bang = 33; // `!`.charCodeAt(0); - -exports.bang = bang; -var backslash = 92; // '\\'.charCodeAt(0); - -exports.backslash = backslash; +tokenTypes.bang = bang; +var backslash$1 = 92; // '\\'.charCodeAt(0); +tokenTypes.backslash = backslash$1; var cr = 13; // '\r'.charCodeAt(0); - -exports.cr = cr; +tokenTypes.cr = cr; var feed = 12; // '\f'.charCodeAt(0); - -exports.feed = feed; +tokenTypes.feed = feed; var newline = 10; // '\n'.charCodeAt(0); - -exports.newline = newline; +tokenTypes.newline = newline; var tab = 9; // '\t'.charCodeAt(0); + // Expose aliases primarily for readability. +tokenTypes.tab = tab; +var str = singleQuote$1; -exports.tab = tab; -var str = singleQuote; // No good single character representation! - -exports.str = str; -var comment = -1; -exports.comment = comment; +// No good single character representation! +tokenTypes.str = str; +var comment$1 = -1; +tokenTypes.comment = comment$1; var word = -2; -exports.word = word; -var combinator = -3; -exports.combinator = combinator; -}); - -var tokenize_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = tokenize; -exports.FIELDS = void 0; - -var t = _interopRequireWildcard(tokenTypes); - -var _unescapable, _wordDelimiters; - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); -var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); -var hex = {}; -var hexChars = "0123456789abcdefABCDEF"; - -for (var i = 0; i < hexChars.length; i++) { - hex[hexChars.charCodeAt(i)] = true; -} -/** - * Returns the last index of the bar css word - * @param {string} css The string in which the word begins - * @param {number} start The index into the string where word's first letter occurs - */ - - -function consumeWord(css, start) { - var next = start; - var code; - - do { - code = css.charCodeAt(next); - - if (wordDelimiters[code]) { - return next - 1; - } else if (code === t.backslash) { - next = consumeEscape(css, next) + 1; - } else { - // All other characters are part of the word - next++; - } - } while (next < css.length); - - return next - 1; -} -/** - * Returns the last index of the escape sequence - * @param {string} css The string in which the sequence begins - * @param {number} start The index into the string where escape character (`\`) occurs. - */ - - -function consumeEscape(css, start) { - var next = start; - var code = css.charCodeAt(next + 1); - - if (unescapable[code]) ; else if (hex[code]) { - var hexDigits = 0; // consume up to 6 hex chars - - do { - next++; - hexDigits++; - code = css.charCodeAt(next + 1); - } while (hex[code] && hexDigits < 6); // if fewer than 6 hex chars, a trailing space ends the escape - - - if (hexDigits < 6 && code === t.space) { - next++; - } - } else { - // the next char is part of the current word - next++; - } - - return next; -} - -var FIELDS = { - TYPE: 0, - START_LINE: 1, - START_COL: 2, - END_LINE: 3, - END_COL: 4, - START_POS: 5, - END_POS: 6 -}; -exports.FIELDS = FIELDS; - -function tokenize(input) { - var tokens = []; - var css = input.css.valueOf(); - var _css = css, - length = _css.length; - var offset = -1; - var line = 1; - var start = 0; - var end = 0; - var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; - - function unclosed(what, fix) { - if (input.safe) { - // fyi: this is never set to true. - css += fix; - next = css.length - 1; - } else { - throw input.error('Unclosed ' + what, line, start - offset, start); - } - } - - while (start < length) { - code = css.charCodeAt(start); - - if (code === t.newline) { - offset = start; - line += 1; - } - - switch (code) { - case t.space: - case t.tab: - case t.newline: - case t.cr: - case t.feed: - next = start; - - do { - next += 1; - code = css.charCodeAt(next); - - if (code === t.newline) { - offset = next; - line += 1; - } - } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); - - tokenType = t.space; - endLine = line; - endColumn = next - offset - 1; - end = next; - break; - - case t.plus: - case t.greaterThan: - case t.tilde: - case t.pipe: - next = start; - - do { - next += 1; - code = css.charCodeAt(next); - } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); - - tokenType = t.combinator; - endLine = line; - endColumn = start - offset; - end = next; - break; - // Consume these characters as single tokens. - - case t.asterisk: - case t.ampersand: - case t.bang: - case t.comma: - case t.equals: - case t.dollar: - case t.caret: - case t.openSquare: - case t.closeSquare: - case t.colon: - case t.semicolon: - case t.openParenthesis: - case t.closeParenthesis: - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - - case t.singleQuote: - case t.doubleQuote: - quote = code === t.singleQuote ? "'" : '"'; - next = start; - - do { - escaped = false; - next = css.indexOf(quote, next + 1); - - if (next === -1) { - unclosed('quote', quote); - } - - escapePos = next; - - while (css.charCodeAt(escapePos - 1) === t.backslash) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped); - - tokenType = t.str; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - - default: - if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { - next = css.indexOf('*/', start + 2) + 1; - - if (next === 0) { - unclosed('comment', '*/'); - } - - content = css.slice(start, next + 1); - lines = content.split('\n'); - last = lines.length - 1; - - if (last > 0) { - nextLine = line + last; - nextOffset = next - lines[last].length; - } else { - nextLine = line; - nextOffset = offset; - } - - tokenType = t.comment; - line = nextLine; - endLine = nextLine; - endColumn = next - nextOffset; - } else if (code === t.slash) { - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - } else { - next = consumeWord(css, start); - tokenType = t.word; - endLine = line; - endColumn = next - offset; - } - - end = next + 1; - break; - } // Ensure that the token structure remains consistent - - - tokens.push([tokenType, // [0] Token type - line, // [1] Starting line - start - offset, // [2] Starting column - endLine, // [3] Ending line - endColumn, // [4] Ending column - start, // [5] Start position / Source index - end // [6] End position - ]); // Reset offset for the next token - - if (nextOffset) { - offset = nextOffset; - nextOffset = null; - } - - start = end; - } - - return tokens; -} -}); - -var parser = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _root = _interopRequireDefault(root); - -var _selector = _interopRequireDefault(selector); - -var _className = _interopRequireDefault(className); - -var _comment = _interopRequireDefault(comment); - -var _id = _interopRequireDefault(id); - -var _tag = _interopRequireDefault(tag); - -var _string = _interopRequireDefault(string); - -var _pseudo = _interopRequireDefault(pseudo); - -var _attribute = _interopRequireWildcard(attribute); - -var _universal = _interopRequireDefault(universal); - -var _combinator = _interopRequireDefault(combinator); - -var _nesting = _interopRequireDefault(nesting); - -var _sortAscending = _interopRequireDefault(sortAscending_1); - -var _tokenize = _interopRequireWildcard(tokenize_1); - -var tokens = _interopRequireWildcard(tokenTypes); - -var types$1 = _interopRequireWildcard(types); - - - -var _WHITESPACE_TOKENS, _Object$assign; - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); -var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); - -function tokenStart(token) { - return { - line: token[_tokenize.FIELDS.START_LINE], - column: token[_tokenize.FIELDS.START_COL] - }; -} - -function tokenEnd(token) { - return { - line: token[_tokenize.FIELDS.END_LINE], - column: token[_tokenize.FIELDS.END_COL] - }; -} - -function getSource(startLine, startColumn, endLine, endColumn) { - return { - start: { - line: startLine, - column: startColumn - }, - end: { - line: endLine, - column: endColumn - } - }; -} - -function getTokenSource(token) { - return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); -} - -function getTokenSourceSpan(startToken, endToken) { - if (!startToken) { - return undefined; - } - - return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); -} - -function unescapeProp(node, prop) { - var value = node[prop]; - - if (typeof value !== "string") { - return; - } - - if (value.indexOf("\\") !== -1) { - (0, util.ensureObject)(node, 'raws'); - node[prop] = (0, util.unesc)(value); - - if (node.raws[prop] === undefined) { - node.raws[prop] = value; - } - } - - return node; -} - -function indexesOf(array, item) { - var i = -1; - var indexes = []; - - while ((i = array.indexOf(item, i + 1)) !== -1) { - indexes.push(i); - } - - return indexes; -} - -function uniqs() { - var list = Array.prototype.concat.apply([], arguments); - return list.filter(function (item, i) { - return i === list.indexOf(item); - }); -} - -var Parser = /*#__PURE__*/function () { - function Parser(rule, options) { - if (options === void 0) { - options = {}; - } - - this.rule = rule; - this.options = Object.assign({ - lossy: false, - safe: false - }, options); - this.position = 0; - this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; - this.tokens = (0, _tokenize["default"])({ - css: this.css, - error: this._errorGenerator(), - safe: this.options.safe - }); - var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); - this.root = new _root["default"]({ - source: rootSource - }); - this.root.errorGenerator = this._errorGenerator(); - var selector = new _selector["default"]({ - source: { - start: { - line: 1, - column: 1 - } - } - }); - this.root.append(selector); - this.current = selector; - this.loop(); - } - - var _proto = Parser.prototype; - - _proto._errorGenerator = function _errorGenerator() { - var _this = this; - - return function (message, errorOptions) { - if (typeof _this.rule === 'string') { - return new Error(message); - } - - return _this.rule.error(message, errorOptions); - }; - }; - - _proto.attribute = function attribute() { - var attr = []; - var startingToken = this.currToken; - this.position++; - - while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - attr.push(this.currToken); - this.position++; - } - - if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - } - - var len = attr.length; - var node = { - source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - }; - - if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { - return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); - } - - var pos = 0; - var spaceBefore = ''; - var commentBefore = ''; - var lastAdded = null; - var spaceAfterMeaningfulToken = false; - - while (pos < len) { - var token = attr[pos]; - var content = this.content(token); - var next = attr[pos + 1]; - - switch (token[_tokenize.FIELDS.TYPE]) { - case tokens.space: - // if ( - // len === 1 || - // pos === 0 && this.content(next) === '|' - // ) { - // return this.expected('attribute', token[TOKEN.START_POS], content); - // } - spaceAfterMeaningfulToken = true; - - if (this.options.lossy) { - break; - } - - if (lastAdded) { - (0, util.ensureObject)(node, 'spaces', lastAdded); - var prevContent = node.spaces[lastAdded].after || ''; - node.spaces[lastAdded].after = prevContent + content; - var existingComment = (0, util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; - - if (existingComment) { - node.raws.spaces[lastAdded].after = existingComment + content; - } - } else { - spaceBefore = spaceBefore + content; - commentBefore = commentBefore + content; - } - - break; - - case tokens.asterisk: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { - if (spaceBefore) { - (0, util.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - - if (commentBefore) { - (0, util.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = spaceBefore; - commentBefore = ''; - } - - node.namespace = (node.namespace || "") + content; - var rawValue = (0, util.getProp)(node, 'raws', 'namespace') || null; - - if (rawValue) { - node.raws.namespace += content; - } - - lastAdded = 'namespace'; - } - - spaceAfterMeaningfulToken = false; - break; - - case tokens.dollar: - if (lastAdded === "value") { - var oldRawValue = (0, util.getProp)(node, 'raws', 'value'); - node.value += "$"; - - if (oldRawValue) { - node.raws.value = oldRawValue + "$"; - } - - break; - } - - // Falls through - - case tokens.caret: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - - spaceAfterMeaningfulToken = false; - break; - - case tokens.combinator: - if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - - if (content !== '|') { - spaceAfterMeaningfulToken = false; - break; - } - - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if (!node.namespace && !node.attribute) { - node.namespace = true; - } - - spaceAfterMeaningfulToken = false; - break; - - case tokens.word: - if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved. - !node.operator && !node.namespace) { - node.namespace = content; - lastAdded = 'namespace'; - } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { - if (spaceBefore) { - (0, util.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - - if (commentBefore) { - (0, util.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = commentBefore; - commentBefore = ''; - } - - node.attribute = (node.attribute || "") + content; - - var _rawValue = (0, util.getProp)(node, 'raws', 'attribute') || null; - - if (_rawValue) { - node.raws.attribute += content; - } - - lastAdded = 'attribute'; - } else if (!node.value && node.value !== "" || lastAdded === "value" && !spaceAfterMeaningfulToken) { - var _unescaped = (0, util.unesc)(content); - - var _oldRawValue = (0, util.getProp)(node, 'raws', 'value') || ''; - - var oldValue = node.value || ''; - node.value = oldValue + _unescaped; - node.quoteMark = null; - - if (_unescaped !== content || _oldRawValue) { - (0, util.ensureObject)(node, 'raws'); - node.raws.value = (_oldRawValue || oldValue) + content; - } - - lastAdded = 'value'; - } else { - var insensitive = content === 'i' || content === "I"; - - if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { - node.insensitive = insensitive; - - if (!insensitive || content === "I") { - (0, util.ensureObject)(node, 'raws'); - node.raws.insensitiveFlag = content; - } - - lastAdded = 'insensitive'; - - if (spaceBefore) { - (0, util.ensureObject)(node, 'spaces', 'insensitive'); - node.spaces.insensitive.before = spaceBefore; - spaceBefore = ''; - } - - if (commentBefore) { - (0, util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); - node.raws.spaces.insensitive.before = commentBefore; - commentBefore = ''; - } - } else if (node.value || node.value === '') { - lastAdded = 'value'; - node.value += content; - - if (node.raws.value) { - node.raws.value += content; - } - } - } - - spaceAfterMeaningfulToken = false; - break; - - case tokens.str: - if (!node.attribute || !node.operator) { - return this.error("Expected an attribute followed by an operator preceding the string.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - - var _unescapeValue = (0, _attribute.unescapeValue)(content), - unescaped = _unescapeValue.unescaped, - quoteMark = _unescapeValue.quoteMark; - - node.value = unescaped; - node.quoteMark = quoteMark; - lastAdded = 'value'; - (0, util.ensureObject)(node, 'raws'); - node.raws.value = content; - spaceAfterMeaningfulToken = false; - break; - - case tokens.equals: - if (!node.attribute) { - return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); - } - - if (node.value) { - return this.error('Unexpected "=" found; an operator was already defined.', { - index: token[_tokenize.FIELDS.START_POS] - }); - } - - node.operator = node.operator ? node.operator + content : content; - lastAdded = 'operator'; - spaceAfterMeaningfulToken = false; - break; - - case tokens.comment: - if (lastAdded) { - if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { - var lastComment = (0, util.getProp)(node, 'spaces', lastAdded, 'after') || ''; - var rawLastComment = (0, util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; - (0, util.ensureObject)(node, 'raws', 'spaces', lastAdded); - node.raws.spaces[lastAdded].after = rawLastComment + content; - } else { - var lastValue = node[lastAdded] || ''; - var rawLastValue = (0, util.getProp)(node, 'raws', lastAdded) || lastValue; - (0, util.ensureObject)(node, 'raws'); - node.raws[lastAdded] = rawLastValue + content; - } - } else { - commentBefore = commentBefore + content; - } - - break; - - default: - return this.error("Unexpected \"" + content + "\" found.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - - pos++; - } - - unescapeProp(node, "attribute"); - unescapeProp(node, "namespace"); - this.newNode(new _attribute["default"](node)); - this.position++; - } - /** - * return a node containing meaningless garbage up to (but not including) the specified token position. - * if the token position is negative, all remaining tokens are consumed. - * - * This returns an array containing a single string node if all whitespace, - * otherwise an array of comment nodes with space before and after. - * - * These tokens are not added to the current selector, the caller can add them or use them to amend - * a previous node's space metadata. - * - * In lossy mode, this returns only comments. - */ - ; - - _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { - if (stopPosition < 0) { - stopPosition = this.tokens.length; - } - - var startPosition = this.position; - var nodes = []; - var space = ""; - var lastComment = undefined; - - do { - if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { - if (!this.options.lossy) { - space += this.content(); - } - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { - var spaces = {}; - - if (space) { - spaces.before = space; - space = ""; - } - - lastComment = new _comment["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - spaces: spaces - }); - nodes.push(lastComment); - } - } while (++this.position < stopPosition); - - if (space) { - if (lastComment) { - lastComment.spaces.after = space; - } else if (!this.options.lossy) { - var firstToken = this.tokens[startPosition]; - var lastToken = this.tokens[this.position - 1]; - nodes.push(new _string["default"]({ - value: '', - source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: { - before: space, - after: '' - } - })); - } - } - - return nodes; - } - /** - * - * @param {*} nodes - */ - ; - - _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { - var _this2 = this; - - if (requiredSpace === void 0) { - requiredSpace = false; - } - - var space = ""; - var rawSpace = ""; - nodes.forEach(function (n) { - var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); - - var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); - - space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); - rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); - }); - - if (rawSpace === space) { - rawSpace = undefined; - } - - var result = { - space: space, - rawSpace: rawSpace - }; - return result; - }; - - _proto.isNamedCombinator = function isNamedCombinator(position) { - if (position === void 0) { - position = this.position; - } - - return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; - }; - - _proto.namedCombinator = function namedCombinator() { - if (this.isNamedCombinator()) { - var nameRaw = this.content(this.tokens[this.position + 1]); - var name = (0, util.unesc)(nameRaw).toLowerCase(); - var raws = {}; - - if (name !== nameRaw) { - raws.value = "/" + nameRaw + "/"; - } - - var node = new _combinator["default"]({ - value: "/" + name + "/", - source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - raws: raws - }); - this.position = this.position + 3; - return node; - } else { - this.unexpected(); - } - }; - - _proto.combinator = function combinator() { - var _this3 = this; - - if (this.content() === '|') { - return this.namespace(); - } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. - - - var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); - - if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { - var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - - if (nodes.length > 0) { - var last = this.current.last; - - if (last) { - var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), - space = _this$convertWhitespa.space, - rawSpace = _this$convertWhitespa.rawSpace; - - if (rawSpace !== undefined) { - last.rawSpaceAfter += rawSpace; - } - - last.spaces.after += space; - } else { - nodes.forEach(function (n) { - return _this3.newNode(n); - }); - } - } - - return; - } - - var firstToken = this.currToken; - var spaceOrDescendantSelectorNodes = undefined; - - if (nextSigTokenPos > this.position) { - spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - } - - var node; - - if (this.isNamedCombinator()) { - node = this.namedCombinator(); - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { - node = new _combinator["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] - }); - this.position++; - } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { - this.unexpected(); - } - - if (node) { - if (spaceOrDescendantSelectorNodes) { - var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), - _space = _this$convertWhitespa2.space, - _rawSpace = _this$convertWhitespa2.rawSpace; - - node.spaces.before = _space; - node.rawSpaceBefore = _rawSpace; - } - } else { - // descendant combinator - var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), - _space2 = _this$convertWhitespa3.space, - _rawSpace2 = _this$convertWhitespa3.rawSpace; - - if (!_rawSpace2) { - _rawSpace2 = _space2; - } - - var spaces = {}; - var raws = { - spaces: {} - }; - - if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { - spaces.before = _space2.slice(0, _space2.length - 1); - raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); - } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { - spaces.after = _space2.slice(1); - raws.spaces.after = _rawSpace2.slice(1); - } else { - raws.value = _rawSpace2; - } - - node = new _combinator["default"]({ - value: ' ', - source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: spaces, - raws: raws - }); - } - - if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { - node.spaces.after = this.optionalSpace(this.content()); - this.position++; - } - - return this.newNode(node); - }; - - _proto.comma = function comma() { - if (this.position === this.tokens.length - 1) { - this.root.trailingComma = true; - this.position++; - return; - } - - this.current._inferEndPosition(); - - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position + 1]) - } - }); - this.current.parent.append(selector); - this.current = selector; - this.position++; - }; - - _proto.comment = function comment() { - var current = this.currToken; - this.newNode(new _comment["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - - _proto.error = function error(message, opts) { - throw this.root.error(message, opts); - }; - - _proto.missingBackslash = function missingBackslash() { - return this.error('Expected a backslash preceding the semicolon.', { - index: this.currToken[_tokenize.FIELDS.START_POS] - }); - }; - - _proto.missingParenthesis = function missingParenthesis() { - return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - }; - - _proto.missingSquareBracket = function missingSquareBracket() { - return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - }; - - _proto.unexpected = function unexpected() { - return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - - _proto.namespace = function namespace() { - var before = this.prevToken && this.content(this.prevToken) || true; - - if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.position++; - return this.word(before); - } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { - this.position++; - return this.universal(before); - } - }; - - _proto.nesting = function nesting() { - if (this.nextToken) { - var nextContent = this.content(this.nextToken); - - if (nextContent === "|") { - this.position++; - return; - } - } - - var current = this.currToken; - this.newNode(new _nesting["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - - _proto.parentheses = function parentheses() { - var last = this.current.last; - var unbalanced = 1; - this.position++; - - if (last && last.type === types$1.PSEUDO) { - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position - 1]) - } - }); - var cache = this.current; - last.append(selector); - this.current = selector; - - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - - if (unbalanced) { - this.parse(); - } else { - this.current.source.end = tokenEnd(this.currToken); - this.current.parent.source.end = tokenEnd(this.currToken); - this.position++; - } - } - - this.current = cache; - } else { - // I think this case should be an error. It's used to implement a basic parse of media queries - // but I don't think it's a good idea. - var parenStart = this.currToken; - var parenValue = "("; - var parenEnd; - - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - - parenEnd = this.currToken; - parenValue += this.parseParenthesisToken(this.currToken); - this.position++; - } - - if (last) { - last.appendToPropertyAndEscape("value", parenValue, parenValue); - } else { - this.newNode(new _string["default"]({ - value: parenValue, - source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), - sourceIndex: parenStart[_tokenize.FIELDS.START_POS] - })); - } - } - - if (unbalanced) { - return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - - _proto.pseudo = function pseudo() { - var _this4 = this; - - var pseudoStr = ''; - var startingToken = this.currToken; - - while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { - pseudoStr += this.content(); - this.position++; - } - - if (!this.currToken) { - return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); - } - - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.splitWord(false, function (first, length) { - pseudoStr += first; - - _this4.newNode(new _pseudo["default"]({ - value: pseudoStr, - source: getTokenSourceSpan(startingToken, _this4.currToken), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - })); - - if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - _this4.error('Misplaced parenthesis.', { - index: _this4.nextToken[_tokenize.FIELDS.START_POS] - }); - } - }); - } else { - return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - - _proto.space = function space() { - var content = this.content(); // Handle space before and after the selector - - if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { - return node.type === 'comment'; - })) { - this.spaces = this.optionalSpace(content); - this.position++; - } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - this.current.last.spaces.after = this.optionalSpace(content); - this.position++; - } else { - this.combinator(); - } - }; - - _proto.string = function string() { - var current = this.currToken; - this.newNode(new _string["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - - _proto.universal = function universal(namespace) { - var nextToken = this.nextToken; - - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - - var current = this.currToken; - this.newNode(new _universal["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - }), namespace); - this.position++; - }; - - _proto.splitWord = function splitWord(namespace, firstCallback) { - var _this5 = this; - - var nextToken = this.nextToken; - var word = this.content(); - - while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { - this.position++; - var current = this.content(); - word += current; - - if (current.lastIndexOf('\\') === current.length - 1) { - var next = this.nextToken; - - if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { - word += this.requiredSpace(this.content(next)); - this.position++; - } - } - - nextToken = this.nextToken; - } - - var hasClass = indexesOf(word, '.').filter(function (i) { - // Allow escaped dot within class name - var escapedDot = word[i - 1] === '\\'; // Allow decimal numbers percent in @keyframes - - var isKeyframesPercent = /^\d+\.\d+%$/.test(word); - return !escapedDot && !isKeyframesPercent; - }); - var hasId = indexesOf(word, '#').filter(function (i) { - return word[i - 1] !== '\\'; - }); // Eliminate Sass interpolations from the list of id indexes - - var interpolations = indexesOf(word, '#{'); - - if (interpolations.length) { - hasId = hasId.filter(function (hashIndex) { - return !~interpolations.indexOf(hashIndex); - }); - } - - var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); - indices.forEach(function (ind, i) { - var index = indices[i + 1] || word.length; - var value = word.slice(ind, index); - - if (i === 0 && firstCallback) { - return firstCallback.call(_this5, value, indices.length); - } - - var node; - var current = _this5.currToken; - var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; - var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); - - if (~hasClass.indexOf(ind)) { - var classNameOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _className["default"](unescapeProp(classNameOpts, "value")); - } else if (~hasId.indexOf(ind)) { - var idOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _id["default"](unescapeProp(idOpts, "value")); - } else { - var tagOpts = { - value: value, - source: source, - sourceIndex: sourceIndex - }; - unescapeProp(tagOpts, "value"); - node = new _tag["default"](tagOpts); - } - - _this5.newNode(node, namespace); // Ensure that the namespace is used only once - - - namespace = null; - }); - this.position++; - }; - - _proto.word = function word(namespace) { - var nextToken = this.nextToken; - - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - - return this.splitWord(namespace); - }; - - _proto.loop = function loop() { - while (this.position < this.tokens.length) { - this.parse(true); - } - - this.current._inferEndPosition(); - - return this.root; - }; - - _proto.parse = function parse(throwOnParenthesis) { - switch (this.currToken[_tokenize.FIELDS.TYPE]) { - case tokens.space: - this.space(); - break; - - case tokens.comment: - this.comment(); - break; - - case tokens.openParenthesis: - this.parentheses(); - break; - - case tokens.closeParenthesis: - if (throwOnParenthesis) { - this.missingParenthesis(); - } - - break; - - case tokens.openSquare: - this.attribute(); - break; - - case tokens.dollar: - case tokens.caret: - case tokens.equals: - case tokens.word: - this.word(); - break; - - case tokens.colon: - this.pseudo(); - break; - - case tokens.comma: - this.comma(); - break; - - case tokens.asterisk: - this.universal(); - break; - - case tokens.ampersand: - this.nesting(); - break; - - case tokens.slash: - case tokens.combinator: - this.combinator(); - break; - - case tokens.str: - this.string(); - break; - // These cases throw; no break needed. - - case tokens.closeSquare: - this.missingSquareBracket(); - - case tokens.semicolon: - this.missingBackslash(); - - default: - this.unexpected(); - } - } - /** - * Helpers - */ - ; - - _proto.expected = function expected(description, index, found) { - if (Array.isArray(description)) { - var last = description.pop(); - description = description.join(', ') + " or " + last; - } - - var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; - - if (!found) { - return this.error("Expected " + an + " " + description + ".", { - index: index - }); - } - - return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { - index: index - }); - }; - - _proto.requiredSpace = function requiredSpace(space) { - return this.options.lossy ? ' ' : space; - }; - - _proto.optionalSpace = function optionalSpace(space) { - return this.options.lossy ? '' : space; - }; - - _proto.lossySpace = function lossySpace(space, required) { - if (this.options.lossy) { - return required ? ' ' : ''; - } else { - return space; - } - }; - - _proto.parseParenthesisToken = function parseParenthesisToken(token) { - var content = this.content(token); - - if (token[_tokenize.FIELDS.TYPE] === tokens.space) { - return this.requiredSpace(content); - } else { - return content; - } - }; - - _proto.newNode = function newNode(node, namespace) { - if (namespace) { - if (/^ +$/.test(namespace)) { - if (!this.options.lossy) { - this.spaces = (this.spaces || '') + namespace; - } - - namespace = true; - } - - node.namespace = namespace; - unescapeProp(node, "namespace"); - } - - if (this.spaces) { - node.spaces.before = this.spaces; - this.spaces = ''; - } - - return this.current.append(node); - }; - - _proto.content = function content(token) { - if (token === void 0) { - token = this.currToken; - } - - return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); - }; - - /** - * returns the index of the next non-whitespace, non-comment token. - * returns -1 if no meaningful token is found. - */ - _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { - if (startPosition === void 0) { - startPosition = this.position + 1; - } - - var searchPosition = startPosition; - - while (searchPosition < this.tokens.length) { - if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { - searchPosition++; - continue; - } else { - return searchPosition; - } - } - - return -1; - }; - - _createClass(Parser, [{ - key: "currToken", - get: function get() { - return this.tokens[this.position]; - } - }, { - key: "nextToken", - get: function get() { - return this.tokens[this.position + 1]; - } - }, { - key: "prevToken", - get: function get() { - return this.tokens[this.position - 1]; - } - }]); - - return Parser; -}(); - -exports["default"] = Parser; -module.exports = exports.default; -}); - -var processor = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _parser = _interopRequireDefault(parser); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -var Processor = /*#__PURE__*/function () { - function Processor(func, options) { - this.func = func || function noop() {}; - - this.funcRes = null; - this.options = options; - } - - var _proto = Processor.prototype; - - _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { - if (options === void 0) { - options = {}; - } - - var merged = Object.assign({}, this.options, options); - - if (merged.updateSelector === false) { - return false; - } else { - return typeof rule !== "string"; - } - }; - - _proto._isLossy = function _isLossy(options) { - if (options === void 0) { - options = {}; - } - - var merged = Object.assign({}, this.options, options); - - if (merged.lossless === false) { - return true; - } else { - return false; - } - }; - - _proto._root = function _root(rule, options) { - if (options === void 0) { - options = {}; - } - - var parser = new _parser["default"](rule, this._parseOptions(options)); - return parser.root; - }; - - _proto._parseOptions = function _parseOptions(options) { - return { - lossy: this._isLossy(options) - }; - }; - - _proto._run = function _run(rule, options) { - var _this = this; - - if (options === void 0) { - options = {}; - } - - return new Promise(function (resolve, reject) { - try { - var root = _this._root(rule, options); - - Promise.resolve(_this.func(root)).then(function (transform) { - var string = undefined; - - if (_this._shouldUpdateSelector(rule, options)) { - string = root.toString(); - rule.selector = string; - } - - return { - transform: transform, - root: root, - string: string - }; - }).then(resolve, reject); - } catch (e) { - reject(e); - return; - } - }); - }; - - _proto._runSync = function _runSync(rule, options) { - if (options === void 0) { - options = {}; - } - - var root = this._root(rule, options); - - var transform = this.func(root); - - if (transform && typeof transform.then === "function") { - throw new Error("Selector processor returned a promise to a synchronous call."); - } - - var string = undefined; - - if (options.updateSelector && typeof rule !== "string") { - string = root.toString(); - rule.selector = string; - } - - return { - transform: transform, - root: root, - string: string - }; - } - /** - * Process rule into a selector AST. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<parser.Root>} The AST of the selector after processing it. - */ - ; - - _proto.ast = function ast(rule, options) { - return this._run(rule, options).then(function (result) { - return result.root; - }); - } - /** - * Process rule into a selector AST synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {parser.Root} The AST of the selector after processing it. - */ - ; - - _proto.astSync = function astSync(rule, options) { - return this._runSync(rule, options).root; - } - /** - * Process a selector into a transformed value asynchronously - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<any>} The value returned by the processor. - */ - ; - - _proto.transform = function transform(rule, options) { - return this._run(rule, options).then(function (result) { - return result.transform; - }); - } - /** - * Process a selector into a transformed value synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {any} The value returned by the processor. - */ - ; - - _proto.transformSync = function transformSync(rule, options) { - return this._runSync(rule, options).transform; - } - /** - * Process a selector into a new selector string asynchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */ - ; - - _proto.process = function process(rule, options) { - return this._run(rule, options).then(function (result) { - return result.string || result.root.toString(); - }); - } - /** - * Process a selector into a new selector string synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */ - ; - - _proto.processSync = function processSync(rule, options) { - var result = this._runSync(rule, options); - - return result.string || result.root.toString(); - }; - - return Processor; -}(); - -exports["default"] = Processor; -module.exports = exports.default; -}); - -var constructors = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0; - -var _attribute = _interopRequireDefault(attribute); - -var _className = _interopRequireDefault(className); - -var _combinator = _interopRequireDefault(combinator); - -var _comment = _interopRequireDefault(comment); - -var _id = _interopRequireDefault(id); - -var _nesting = _interopRequireDefault(nesting); - -var _pseudo = _interopRequireDefault(pseudo); - -var _root = _interopRequireDefault(root); - -var _selector = _interopRequireDefault(selector); - -var _string = _interopRequireDefault(string); - -var _tag = _interopRequireDefault(tag); - -var _universal = _interopRequireDefault(universal); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -var attribute$1 = function attribute(opts) { +tokenTypes.word = word; +var combinator$1 = -3; +tokenTypes.combinator = combinator$1; + +(function (exports) { + + exports.__esModule = true; + exports.FIELDS = void 0; + exports["default"] = tokenize; + var t = _interopRequireWildcard(tokenTypes); + var _unescapable, _wordDelimiters; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); + var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); + var hex = {}; + var hexChars = "0123456789abcdefABCDEF"; + for (var i = 0; i < hexChars.length; i++) { + hex[hexChars.charCodeAt(i)] = true; + } + + /** + * Returns the last index of the bar css word + * @param {string} css The string in which the word begins + * @param {number} start The index into the string where word's first letter occurs + */ + function consumeWord(css, start) { + var next = start; + var code; + do { + code = css.charCodeAt(next); + if (wordDelimiters[code]) { + return next - 1; + } else if (code === t.backslash) { + next = consumeEscape(css, next) + 1; + } else { + // All other characters are part of the word + next++; + } + } while (next < css.length); + return next - 1; + } + + /** + * Returns the last index of the escape sequence + * @param {string} css The string in which the sequence begins + * @param {number} start The index into the string where escape character (`\`) occurs. + */ + function consumeEscape(css, start) { + var next = start; + var code = css.charCodeAt(next + 1); + if (unescapable[code]) ; else if (hex[code]) { + var hexDigits = 0; + // consume up to 6 hex chars + do { + next++; + hexDigits++; + code = css.charCodeAt(next + 1); + } while (hex[code] && hexDigits < 6); + // if fewer than 6 hex chars, a trailing space ends the escape + if (hexDigits < 6 && code === t.space) { + next++; + } + } else { + // the next char is part of the current word + next++; + } + return next; + } + var FIELDS = { + TYPE: 0, + START_LINE: 1, + START_COL: 2, + END_LINE: 3, + END_COL: 4, + START_POS: 5, + END_POS: 6 + }; + exports.FIELDS = FIELDS; + function tokenize(input) { + var tokens = []; + var css = input.css.valueOf(); + var _css = css, + length = _css.length; + var offset = -1; + var line = 1; + var start = 0; + var end = 0; + var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; + function unclosed(what, fix) { + if (input.safe) { + // fyi: this is never set to true. + css += fix; + next = css.length - 1; + } else { + throw input.error('Unclosed ' + what, line, start - offset, start); + } + } + while (start < length) { + code = css.charCodeAt(start); + if (code === t.newline) { + offset = start; + line += 1; + } + switch (code) { + case t.space: + case t.tab: + case t.newline: + case t.cr: + case t.feed: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + if (code === t.newline) { + offset = next; + line += 1; + } + } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); + tokenType = t.space; + endLine = line; + endColumn = next - offset - 1; + end = next; + break; + case t.plus: + case t.greaterThan: + case t.tilde: + case t.pipe: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); + tokenType = t.combinator; + endLine = line; + endColumn = start - offset; + end = next; + break; + + // Consume these characters as single tokens. + case t.asterisk: + case t.ampersand: + case t.bang: + case t.comma: + case t.equals: + case t.dollar: + case t.caret: + case t.openSquare: + case t.closeSquare: + case t.colon: + case t.semicolon: + case t.openParenthesis: + case t.closeParenthesis: + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + case t.singleQuote: + case t.doubleQuote: + quote = code === t.singleQuote ? "'" : '"'; + next = start; + do { + escaped = false; + next = css.indexOf(quote, next + 1); + if (next === -1) { + unclosed('quote', quote); + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === t.backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + tokenType = t.str; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + default: + if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { + next = css.indexOf('*/', start + 2) + 1; + if (next === 0) { + unclosed('comment', '*/'); + } + content = css.slice(start, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + tokenType = t.comment; + line = nextLine; + endLine = nextLine; + endColumn = next - nextOffset; + } else if (code === t.slash) { + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + } else { + next = consumeWord(css, start); + tokenType = t.word; + endLine = line; + endColumn = next - offset; + } + end = next + 1; + break; + } + + // Ensure that the token structure remains consistent + tokens.push([tokenType, + // [0] Token type + line, + // [1] Starting line + start - offset, + // [2] Starting column + endLine, + // [3] Ending line + endColumn, + // [4] Ending column + start, + // [5] Start position / Source index + end // [6] End position + ]); + + // Reset offset for the next token + if (nextOffset) { + offset = nextOffset; + nextOffset = null; + } + start = end; + } + return tokens; + } +} (tokenize)); + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _root = _interopRequireDefault(rootExports); + var _selector = _interopRequireDefault(selectorExports); + var _className = _interopRequireDefault(classNameExports); + var _comment = _interopRequireDefault(commentExports); + var _id = _interopRequireDefault(idExports); + var _tag = _interopRequireDefault(tagExports); + var _string = _interopRequireDefault(stringExports); + var _pseudo = _interopRequireDefault(pseudoExports); + var _attribute = _interopRequireWildcard(attribute$1); + var _universal = _interopRequireDefault(universalExports); + var _combinator = _interopRequireDefault(combinatorExports); + var _nesting = _interopRequireDefault(nestingExports); + var _sortAscending = _interopRequireDefault(sortAscendingExports); + var _tokenize = _interopRequireWildcard(tokenize); + var tokens = _interopRequireWildcard(tokenTypes); + var types = _interopRequireWildcard(types$1); + var _util = util$6; + var _WHITESPACE_TOKENS, _Object$assign; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); + var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); + function tokenStart(token) { + return { + line: token[_tokenize.FIELDS.START_LINE], + column: token[_tokenize.FIELDS.START_COL] + }; + } + function tokenEnd(token) { + return { + line: token[_tokenize.FIELDS.END_LINE], + column: token[_tokenize.FIELDS.END_COL] + }; + } + function getSource(startLine, startColumn, endLine, endColumn) { + return { + start: { + line: startLine, + column: startColumn + }, + end: { + line: endLine, + column: endColumn + } + }; + } + function getTokenSource(token) { + return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); + } + function getTokenSourceSpan(startToken, endToken) { + if (!startToken) { + return undefined; + } + return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); + } + function unescapeProp(node, prop) { + var value = node[prop]; + if (typeof value !== "string") { + return; + } + if (value.indexOf("\\") !== -1) { + (0, _util.ensureObject)(node, 'raws'); + node[prop] = (0, _util.unesc)(value); + if (node.raws[prop] === undefined) { + node.raws[prop] = value; + } + } + return node; + } + function indexesOf(array, item) { + var i = -1; + var indexes = []; + while ((i = array.indexOf(item, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + function uniqs() { + var list = Array.prototype.concat.apply([], arguments); + return list.filter(function (item, i) { + return i === list.indexOf(item); + }); + } + var Parser = /*#__PURE__*/function () { + function Parser(rule, options) { + if (options === void 0) { + options = {}; + } + this.rule = rule; + this.options = Object.assign({ + lossy: false, + safe: false + }, options); + this.position = 0; + this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; + this.tokens = (0, _tokenize["default"])({ + css: this.css, + error: this._errorGenerator(), + safe: this.options.safe + }); + var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); + this.root = new _root["default"]({ + source: rootSource + }); + this.root.errorGenerator = this._errorGenerator(); + var selector = new _selector["default"]({ + source: { + start: { + line: 1, + column: 1 + } + } + }); + this.root.append(selector); + this.current = selector; + this.loop(); + } + var _proto = Parser.prototype; + _proto._errorGenerator = function _errorGenerator() { + var _this = this; + return function (message, errorOptions) { + if (typeof _this.rule === 'string') { + return new Error(message); + } + return _this.rule.error(message, errorOptions); + }; + }; + _proto.attribute = function attribute() { + var attr = []; + var startingToken = this.currToken; + this.position++; + while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + attr.push(this.currToken); + this.position++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + } + var len = attr.length; + var node = { + source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + }; + if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { + return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); + } + var pos = 0; + var spaceBefore = ''; + var commentBefore = ''; + var lastAdded = null; + var spaceAfterMeaningfulToken = false; + while (pos < len) { + var token = attr[pos]; + var content = this.content(token); + var next = attr[pos + 1]; + switch (token[_tokenize.FIELDS.TYPE]) { + case tokens.space: + // if ( + // len === 1 || + // pos === 0 && this.content(next) === '|' + // ) { + // return this.expected('attribute', token[TOKEN.START_POS], content); + // } + spaceAfterMeaningfulToken = true; + if (this.options.lossy) { + break; + } + if (lastAdded) { + (0, _util.ensureObject)(node, 'spaces', lastAdded); + var prevContent = node.spaces[lastAdded].after || ''; + node.spaces[lastAdded].after = prevContent + content; + var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; + if (existingComment) { + node.raws.spaces[lastAdded].after = existingComment + content; + } + } else { + spaceBefore = spaceBefore + content; + commentBefore = commentBefore + content; + } + break; + case tokens.asterisk: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = spaceBefore; + commentBefore = ''; + } + node.namespace = (node.namespace || "") + content; + var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; + if (rawValue) { + node.raws.namespace += content; + } + lastAdded = 'namespace'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.dollar: + if (lastAdded === "value") { + var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); + node.value += "$"; + if (oldRawValue) { + node.raws.value = oldRawValue + "$"; + } + break; + } + // Falls through + case tokens.caret: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.combinator: + if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + if (content !== '|') { + spaceAfterMeaningfulToken = false; + break; + } + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if (!node.namespace && !node.attribute) { + node.namespace = true; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.word: + if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && + // this look-ahead probably fails with comment nodes involved. + !node.operator && !node.namespace) { + node.namespace = content; + lastAdded = 'namespace'; + } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = commentBefore; + commentBefore = ''; + } + node.attribute = (node.attribute || "") + content; + var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; + if (_rawValue) { + node.raws.attribute += content; + } + lastAdded = 'attribute'; + } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { + var _unescaped = (0, _util.unesc)(content); + var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; + var oldValue = node.value || ''; + node.value = oldValue + _unescaped; + node.quoteMark = null; + if (_unescaped !== content || _oldRawValue) { + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = (_oldRawValue || oldValue) + content; + } + lastAdded = 'value'; + } else { + var insensitive = content === 'i' || content === "I"; + if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { + node.insensitive = insensitive; + if (!insensitive || content === "I") { + (0, _util.ensureObject)(node, 'raws'); + node.raws.insensitiveFlag = content; + } + lastAdded = 'insensitive'; + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'insensitive'); + node.spaces.insensitive.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); + node.raws.spaces.insensitive.before = commentBefore; + commentBefore = ''; + } + } else if (node.value || node.value === '') { + lastAdded = 'value'; + node.value += content; + if (node.raws.value) { + node.raws.value += content; + } + } + } + spaceAfterMeaningfulToken = false; + break; + case tokens.str: + if (!node.attribute || !node.operator) { + return this.error("Expected an attribute followed by an operator preceding the string.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + var _unescapeValue = (0, _attribute.unescapeValue)(content), + unescaped = _unescapeValue.unescaped, + quoteMark = _unescapeValue.quoteMark; + node.value = unescaped; + node.quoteMark = quoteMark; + lastAdded = 'value'; + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = content; + spaceAfterMeaningfulToken = false; + break; + case tokens.equals: + if (!node.attribute) { + return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); + } + if (node.value) { + return this.error('Unexpected "=" found; an operator was already defined.', { + index: token[_tokenize.FIELDS.START_POS] + }); + } + node.operator = node.operator ? node.operator + content : content; + lastAdded = 'operator'; + spaceAfterMeaningfulToken = false; + break; + case tokens.comment: + if (lastAdded) { + if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { + var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; + var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; + (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); + node.raws.spaces[lastAdded].after = rawLastComment + content; + } else { + var lastValue = node[lastAdded] || ''; + var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; + (0, _util.ensureObject)(node, 'raws'); + node.raws[lastAdded] = rawLastValue + content; + } + } else { + commentBefore = commentBefore + content; + } + break; + default: + return this.error("Unexpected \"" + content + "\" found.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + pos++; + } + unescapeProp(node, "attribute"); + unescapeProp(node, "namespace"); + this.newNode(new _attribute["default"](node)); + this.position++; + } + + /** + * return a node containing meaningless garbage up to (but not including) the specified token position. + * if the token position is negative, all remaining tokens are consumed. + * + * This returns an array containing a single string node if all whitespace, + * otherwise an array of comment nodes with space before and after. + * + * These tokens are not added to the current selector, the caller can add them or use them to amend + * a previous node's space metadata. + * + * In lossy mode, this returns only comments. + */; + _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { + if (stopPosition < 0) { + stopPosition = this.tokens.length; + } + var startPosition = this.position; + var nodes = []; + var space = ""; + var lastComment = undefined; + do { + if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { + if (!this.options.lossy) { + space += this.content(); + } + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { + var spaces = {}; + if (space) { + spaces.before = space; + space = ""; + } + lastComment = new _comment["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + spaces: spaces + }); + nodes.push(lastComment); + } + } while (++this.position < stopPosition); + if (space) { + if (lastComment) { + lastComment.spaces.after = space; + } else if (!this.options.lossy) { + var firstToken = this.tokens[startPosition]; + var lastToken = this.tokens[this.position - 1]; + nodes.push(new _string["default"]({ + value: '', + source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: { + before: space, + after: '' + } + })); + } + } + return nodes; + } + + /** + * + * @param {*} nodes + */; + _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { + var _this2 = this; + if (requiredSpace === void 0) { + requiredSpace = false; + } + var space = ""; + var rawSpace = ""; + nodes.forEach(function (n) { + var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); + var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); + space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); + rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); + }); + if (rawSpace === space) { + rawSpace = undefined; + } + var result = { + space: space, + rawSpace: rawSpace + }; + return result; + }; + _proto.isNamedCombinator = function isNamedCombinator(position) { + if (position === void 0) { + position = this.position; + } + return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; + }; + _proto.namedCombinator = function namedCombinator() { + if (this.isNamedCombinator()) { + var nameRaw = this.content(this.tokens[this.position + 1]); + var name = (0, _util.unesc)(nameRaw).toLowerCase(); + var raws = {}; + if (name !== nameRaw) { + raws.value = "/" + nameRaw + "/"; + } + var node = new _combinator["default"]({ + value: "/" + name + "/", + source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + raws: raws + }); + this.position = this.position + 3; + return node; + } else { + this.unexpected(); + } + }; + _proto.combinator = function combinator() { + var _this3 = this; + if (this.content() === '|') { + return this.namespace(); + } + // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { + var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + if (nodes.length > 0) { + var last = this.current.last; + if (last) { + var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), + space = _this$convertWhitespa.space, + rawSpace = _this$convertWhitespa.rawSpace; + if (rawSpace !== undefined) { + last.rawSpaceAfter += rawSpace; + } + last.spaces.after += space; + } else { + nodes.forEach(function (n) { + return _this3.newNode(n); + }); + } + } + return; + } + var firstToken = this.currToken; + var spaceOrDescendantSelectorNodes = undefined; + if (nextSigTokenPos > this.position) { + spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + } + var node; + if (this.isNamedCombinator()) { + node = this.namedCombinator(); + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { + node = new _combinator["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] + }); + this.position++; + } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { + this.unexpected(); + } + if (node) { + if (spaceOrDescendantSelectorNodes) { + var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), + _space = _this$convertWhitespa2.space, + _rawSpace = _this$convertWhitespa2.rawSpace; + node.spaces.before = _space; + node.rawSpaceBefore = _rawSpace; + } + } else { + // descendant combinator + var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), + _space2 = _this$convertWhitespa3.space, + _rawSpace2 = _this$convertWhitespa3.rawSpace; + if (!_rawSpace2) { + _rawSpace2 = _space2; + } + var spaces = {}; + var raws = { + spaces: {} + }; + if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { + spaces.before = _space2.slice(0, _space2.length - 1); + raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); + } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { + spaces.after = _space2.slice(1); + raws.spaces.after = _rawSpace2.slice(1); + } else { + raws.value = _rawSpace2; + } + node = new _combinator["default"]({ + value: ' ', + source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: spaces, + raws: raws + }); + } + if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { + node.spaces.after = this.optionalSpace(this.content()); + this.position++; + } + return this.newNode(node); + }; + _proto.comma = function comma() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = true; + this.position++; + return; + } + this.current._inferEndPosition(); + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position + 1]) + } + }); + this.current.parent.append(selector); + this.current = selector; + this.position++; + }; + _proto.comment = function comment() { + var current = this.currToken; + this.newNode(new _comment["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.error = function error(message, opts) { + throw this.root.error(message, opts); + }; + _proto.missingBackslash = function missingBackslash() { + return this.error('Expected a backslash preceding the semicolon.', { + index: this.currToken[_tokenize.FIELDS.START_POS] + }); + }; + _proto.missingParenthesis = function missingParenthesis() { + return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.missingSquareBracket = function missingSquareBracket() { + return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpected = function unexpected() { + return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpectedPipe = function unexpectedPipe() { + return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.namespace = function namespace() { + var before = this.prevToken && this.content(this.prevToken) || true; + if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.position++; + return this.word(before); + } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { + this.position++; + return this.universal(before); + } + this.unexpectedPipe(); + }; + _proto.nesting = function nesting() { + if (this.nextToken) { + var nextContent = this.content(this.nextToken); + if (nextContent === "|") { + this.position++; + return; + } + } + var current = this.currToken; + this.newNode(new _nesting["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.parentheses = function parentheses() { + var last = this.current.last; + var unbalanced = 1; + this.position++; + if (last && last.type === types.PSEUDO) { + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position - 1]) + } + }); + var cache = this.current; + last.append(selector); + this.current = selector; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + if (unbalanced) { + this.parse(); + } else { + this.current.source.end = tokenEnd(this.currToken); + this.current.parent.source.end = tokenEnd(this.currToken); + this.position++; + } + } + this.current = cache; + } else { + // I think this case should be an error. It's used to implement a basic parse of media queries + // but I don't think it's a good idea. + var parenStart = this.currToken; + var parenValue = "("; + var parenEnd; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + parenEnd = this.currToken; + parenValue += this.parseParenthesisToken(this.currToken); + this.position++; + } + if (last) { + last.appendToPropertyAndEscape("value", parenValue, parenValue); + } else { + this.newNode(new _string["default"]({ + value: parenValue, + source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), + sourceIndex: parenStart[_tokenize.FIELDS.START_POS] + })); + } + } + if (unbalanced) { + return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.pseudo = function pseudo() { + var _this4 = this; + var pseudoStr = ''; + var startingToken = this.currToken; + while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { + pseudoStr += this.content(); + this.position++; + } + if (!this.currToken) { + return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.splitWord(false, function (first, length) { + pseudoStr += first; + _this4.newNode(new _pseudo["default"]({ + value: pseudoStr, + source: getTokenSourceSpan(startingToken, _this4.currToken), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + })); + if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + _this4.error('Misplaced parenthesis.', { + index: _this4.nextToken[_tokenize.FIELDS.START_POS] + }); + } + }); + } else { + return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.space = function space() { + var content = this.content(); + // Handle space before and after the selector + if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { + return node.type === 'comment'; + })) { + this.spaces = this.optionalSpace(content); + this.position++; + } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + this.current.last.spaces.after = this.optionalSpace(content); + this.position++; + } else { + this.combinator(); + } + }; + _proto.string = function string() { + var current = this.currToken; + this.newNode(new _string["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.universal = function universal(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + var current = this.currToken; + this.newNode(new _universal["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + }), namespace); + this.position++; + }; + _proto.splitWord = function splitWord(namespace, firstCallback) { + var _this5 = this; + var nextToken = this.nextToken; + var word = this.content(); + while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { + this.position++; + var current = this.content(); + word += current; + if (current.lastIndexOf('\\') === current.length - 1) { + var next = this.nextToken; + if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { + word += this.requiredSpace(this.content(next)); + this.position++; + } + } + nextToken = this.nextToken; + } + var hasClass = indexesOf(word, '.').filter(function (i) { + // Allow escaped dot within class name + var escapedDot = word[i - 1] === '\\'; + // Allow decimal numbers percent in @keyframes + var isKeyframesPercent = /^\d+\.\d+%$/.test(word); + return !escapedDot && !isKeyframesPercent; + }); + var hasId = indexesOf(word, '#').filter(function (i) { + return word[i - 1] !== '\\'; + }); + // Eliminate Sass interpolations from the list of id indexes + var interpolations = indexesOf(word, '#{'); + if (interpolations.length) { + hasId = hasId.filter(function (hashIndex) { + return !~interpolations.indexOf(hashIndex); + }); + } + var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length; + var value = word.slice(ind, index); + if (i === 0 && firstCallback) { + return firstCallback.call(_this5, value, indices.length); + } + var node; + var current = _this5.currToken; + var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; + var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); + if (~hasClass.indexOf(ind)) { + var classNameOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _className["default"](unescapeProp(classNameOpts, "value")); + } else if (~hasId.indexOf(ind)) { + var idOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _id["default"](unescapeProp(idOpts, "value")); + } else { + var tagOpts = { + value: value, + source: source, + sourceIndex: sourceIndex + }; + unescapeProp(tagOpts, "value"); + node = new _tag["default"](tagOpts); + } + _this5.newNode(node, namespace); + // Ensure that the namespace is used only once + namespace = null; + }); + this.position++; + }; + _proto.word = function word(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + return this.splitWord(namespace); + }; + _proto.loop = function loop() { + while (this.position < this.tokens.length) { + this.parse(true); + } + this.current._inferEndPosition(); + return this.root; + }; + _proto.parse = function parse(throwOnParenthesis) { + switch (this.currToken[_tokenize.FIELDS.TYPE]) { + case tokens.space: + this.space(); + break; + case tokens.comment: + this.comment(); + break; + case tokens.openParenthesis: + this.parentheses(); + break; + case tokens.closeParenthesis: + if (throwOnParenthesis) { + this.missingParenthesis(); + } + break; + case tokens.openSquare: + this.attribute(); + break; + case tokens.dollar: + case tokens.caret: + case tokens.equals: + case tokens.word: + this.word(); + break; + case tokens.colon: + this.pseudo(); + break; + case tokens.comma: + this.comma(); + break; + case tokens.asterisk: + this.universal(); + break; + case tokens.ampersand: + this.nesting(); + break; + case tokens.slash: + case tokens.combinator: + this.combinator(); + break; + case tokens.str: + this.string(); + break; + // These cases throw; no break needed. + case tokens.closeSquare: + this.missingSquareBracket(); + case tokens.semicolon: + this.missingBackslash(); + default: + this.unexpected(); + } + } + + /** + * Helpers + */; + _proto.expected = function expected(description, index, found) { + if (Array.isArray(description)) { + var last = description.pop(); + description = description.join(', ') + " or " + last; + } + var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; + if (!found) { + return this.error("Expected " + an + " " + description + ".", { + index: index + }); + } + return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { + index: index + }); + }; + _proto.requiredSpace = function requiredSpace(space) { + return this.options.lossy ? ' ' : space; + }; + _proto.optionalSpace = function optionalSpace(space) { + return this.options.lossy ? '' : space; + }; + _proto.lossySpace = function lossySpace(space, required) { + if (this.options.lossy) { + return required ? ' ' : ''; + } else { + return space; + } + }; + _proto.parseParenthesisToken = function parseParenthesisToken(token) { + var content = this.content(token); + if (token[_tokenize.FIELDS.TYPE] === tokens.space) { + return this.requiredSpace(content); + } else { + return content; + } + }; + _proto.newNode = function newNode(node, namespace) { + if (namespace) { + if (/^ +$/.test(namespace)) { + if (!this.options.lossy) { + this.spaces = (this.spaces || '') + namespace; + } + namespace = true; + } + node.namespace = namespace; + unescapeProp(node, "namespace"); + } + if (this.spaces) { + node.spaces.before = this.spaces; + this.spaces = ''; + } + return this.current.append(node); + }; + _proto.content = function content(token) { + if (token === void 0) { + token = this.currToken; + } + return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); + }; + /** + * returns the index of the next non-whitespace, non-comment token. + * returns -1 if no meaningful token is found. + */ + _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { + if (startPosition === void 0) { + startPosition = this.position + 1; + } + var searchPosition = startPosition; + while (searchPosition < this.tokens.length) { + if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { + searchPosition++; + continue; + } else { + return searchPosition; + } + } + return -1; + }; + _createClass(Parser, [{ + key: "currToken", + get: function get() { + return this.tokens[this.position]; + } + }, { + key: "nextToken", + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: "prevToken", + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + return Parser; + }(); + exports["default"] = Parser; + module.exports = exports.default; +} (parser, parser.exports)); + +var parserExports = parser.exports; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _parser = _interopRequireDefault(parserExports); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var Processor = /*#__PURE__*/function () { + function Processor(func, options) { + this.func = func || function noop() {}; + this.funcRes = null; + this.options = options; + } + var _proto = Processor.prototype; + _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.updateSelector === false) { + return false; + } else { + return typeof rule !== "string"; + } + }; + _proto._isLossy = function _isLossy(options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.lossless === false) { + return true; + } else { + return false; + } + }; + _proto._root = function _root(rule, options) { + if (options === void 0) { + options = {}; + } + var parser = new _parser["default"](rule, this._parseOptions(options)); + return parser.root; + }; + _proto._parseOptions = function _parseOptions(options) { + return { + lossy: this._isLossy(options) + }; + }; + _proto._run = function _run(rule, options) { + var _this = this; + if (options === void 0) { + options = {}; + } + return new Promise(function (resolve, reject) { + try { + var root = _this._root(rule, options); + Promise.resolve(_this.func(root)).then(function (transform) { + var string = undefined; + if (_this._shouldUpdateSelector(rule, options)) { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + }).then(resolve, reject); + } catch (e) { + reject(e); + return; + } + }); + }; + _proto._runSync = function _runSync(rule, options) { + if (options === void 0) { + options = {}; + } + var root = this._root(rule, options); + var transform = this.func(root); + if (transform && typeof transform.then === "function") { + throw new Error("Selector processor returned a promise to a synchronous call."); + } + var string = undefined; + if (options.updateSelector && typeof rule !== "string") { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + } + + /** + * Process rule into a selector AST. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<parser.Root>} The AST of the selector after processing it. + */; + _proto.ast = function ast(rule, options) { + return this._run(rule, options).then(function (result) { + return result.root; + }); + } + + /** + * Process rule into a selector AST synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {parser.Root} The AST of the selector after processing it. + */; + _proto.astSync = function astSync(rule, options) { + return this._runSync(rule, options).root; + } + + /** + * Process a selector into a transformed value asynchronously + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<any>} The value returned by the processor. + */; + _proto.transform = function transform(rule, options) { + return this._run(rule, options).then(function (result) { + return result.transform; + }); + } + + /** + * Process a selector into a transformed value synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {any} The value returned by the processor. + */; + _proto.transformSync = function transformSync(rule, options) { + return this._runSync(rule, options).transform; + } + + /** + * Process a selector into a new selector string asynchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.process = function process(rule, options) { + return this._run(rule, options).then(function (result) { + return result.string || result.root.toString(); + }); + } + + /** + * Process a selector into a new selector string synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.processSync = function processSync(rule, options) { + var result = this._runSync(rule, options); + return result.string || result.root.toString(); + }; + return Processor; + }(); + exports["default"] = Processor; + module.exports = exports.default; +} (processor, processor.exports)); + +var processorExports = processor.exports; + +var selectors = {}; + +var constructors = {}; + +constructors.__esModule = true; +constructors.universal = constructors.tag = constructors.string = constructors.selector = constructors.root = constructors.pseudo = constructors.nesting = constructors.id = constructors.comment = constructors.combinator = constructors.className = constructors.attribute = void 0; +var _attribute = _interopRequireDefault$4(attribute$1); +var _className = _interopRequireDefault$4(classNameExports); +var _combinator = _interopRequireDefault$4(combinatorExports); +var _comment = _interopRequireDefault$4(commentExports); +var _id = _interopRequireDefault$4(idExports); +var _nesting = _interopRequireDefault$4(nestingExports); +var _pseudo = _interopRequireDefault$4(pseudoExports); +var _root = _interopRequireDefault$4(rootExports); +var _selector = _interopRequireDefault$4(selectorExports); +var _string = _interopRequireDefault$4(stringExports); +var _tag = _interopRequireDefault$4(tagExports); +var _universal = _interopRequireDefault$4(universalExports); +function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +var attribute = function attribute(opts) { return new _attribute["default"](opts); }; - -exports.attribute = attribute$1; - -var className$1 = function className(opts) { +constructors.attribute = attribute; +var className = function className(opts) { return new _className["default"](opts); }; - -exports.className = className$1; - -var combinator$1 = function combinator(opts) { +constructors.className = className; +var combinator = function combinator(opts) { return new _combinator["default"](opts); }; - -exports.combinator = combinator$1; - -var comment$1 = function comment(opts) { +constructors.combinator = combinator; +var comment = function comment(opts) { return new _comment["default"](opts); }; - -exports.comment = comment$1; - -var id$1 = function id(opts) { +constructors.comment = comment; +var id = function id(opts) { return new _id["default"](opts); }; - -exports.id = id$1; - -var nesting$1 = function nesting(opts) { +constructors.id = id; +var nesting = function nesting(opts) { return new _nesting["default"](opts); }; - -exports.nesting = nesting$1; - -var pseudo$1 = function pseudo(opts) { +constructors.nesting = nesting; +var pseudo = function pseudo(opts) { return new _pseudo["default"](opts); }; - -exports.pseudo = pseudo$1; - +constructors.pseudo = pseudo; var root$1 = function root(opts) { return new _root["default"](opts); }; - -exports.root = root$1; - -var selector$1 = function selector(opts) { +constructors.root = root$1; +var selector = function selector(opts) { return new _selector["default"](opts); }; - -exports.selector = selector$1; - -var string$1 = function string(opts) { +constructors.selector = selector; +var string = function string(opts) { return new _string["default"](opts); }; - -exports.string = string$1; - -var tag$1 = function tag(opts) { +constructors.string = string; +var tag = function tag(opts) { return new _tag["default"](opts); }; - -exports.tag = tag$1; - -var universal$1 = function universal(opts) { +constructors.tag = tag; +var universal = function universal(opts) { return new _universal["default"](opts); }; +constructors.universal = universal; -exports.universal = universal$1; -}); - -var guards = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.isNode = isNode; -exports.isPseudoElement = isPseudoElement; -exports.isPseudoClass = isPseudoClass; -exports.isContainer = isContainer; -exports.isNamespace = isNamespace; -exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0; - - +var guards = {}; +guards.__esModule = true; +guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0; +guards.isContainer = isContainer; +guards.isIdentifier = void 0; +guards.isNamespace = isNamespace; +guards.isNesting = void 0; +guards.isNode = isNode; +guards.isPseudo = void 0; +guards.isPseudoClass = isPseudoClass; +guards.isPseudoElement = isPseudoElement; +guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = void 0; +var _types = types$1; var _IS_TYPE; - -var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[types.ATTRIBUTE] = true, _IS_TYPE[types.CLASS] = true, _IS_TYPE[types.COMBINATOR] = true, _IS_TYPE[types.COMMENT] = true, _IS_TYPE[types.ID] = true, _IS_TYPE[types.NESTING] = true, _IS_TYPE[types.PSEUDO] = true, _IS_TYPE[types.ROOT] = true, _IS_TYPE[types.SELECTOR] = true, _IS_TYPE[types.STRING] = true, _IS_TYPE[types.TAG] = true, _IS_TYPE[types.UNIVERSAL] = true, _IS_TYPE); - +var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); function isNode(node) { return typeof node === "object" && IS_TYPE[node.type]; } - function isNodeType(type, node) { return isNode(node) && node.type === type; } - -var isAttribute = isNodeType.bind(null, types.ATTRIBUTE); -exports.isAttribute = isAttribute; -var isClassName = isNodeType.bind(null, types.CLASS); -exports.isClassName = isClassName; -var isCombinator = isNodeType.bind(null, types.COMBINATOR); -exports.isCombinator = isCombinator; -var isComment = isNodeType.bind(null, types.COMMENT); -exports.isComment = isComment; -var isIdentifier = isNodeType.bind(null, types.ID); -exports.isIdentifier = isIdentifier; -var isNesting = isNodeType.bind(null, types.NESTING); -exports.isNesting = isNesting; -var isPseudo = isNodeType.bind(null, types.PSEUDO); -exports.isPseudo = isPseudo; -var isRoot = isNodeType.bind(null, types.ROOT); -exports.isRoot = isRoot; -var isSelector = isNodeType.bind(null, types.SELECTOR); -exports.isSelector = isSelector; -var isString = isNodeType.bind(null, types.STRING); -exports.isString = isString; -var isTag = isNodeType.bind(null, types.TAG); -exports.isTag = isTag; -var isUniversal = isNodeType.bind(null, types.UNIVERSAL); -exports.isUniversal = isUniversal; - +var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); +guards.isAttribute = isAttribute; +var isClassName = isNodeType.bind(null, _types.CLASS); +guards.isClassName = isClassName; +var isCombinator = isNodeType.bind(null, _types.COMBINATOR); +guards.isCombinator = isCombinator; +var isComment = isNodeType.bind(null, _types.COMMENT); +guards.isComment = isComment; +var isIdentifier = isNodeType.bind(null, _types.ID); +guards.isIdentifier = isIdentifier; +var isNesting = isNodeType.bind(null, _types.NESTING); +guards.isNesting = isNesting; +var isPseudo = isNodeType.bind(null, _types.PSEUDO); +guards.isPseudo = isPseudo; +var isRoot = isNodeType.bind(null, _types.ROOT); +guards.isRoot = isRoot; +var isSelector = isNodeType.bind(null, _types.SELECTOR); +guards.isSelector = isSelector; +var isString = isNodeType.bind(null, _types.STRING); +guards.isString = isString; +var isTag = isNodeType.bind(null, _types.TAG); +guards.isTag = isTag; +var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); +guards.isUniversal = isUniversal; function isPseudoElement(node) { - return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after"); + return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); } - function isPseudoClass(node) { return isPseudo(node) && !isPseudoElement(node); } - function isContainer(node) { return !!(isNode(node) && node.walk); } - function isNamespace(node) { return isAttribute(node) || isTag(node); } -}); -var selectors = createCommonjsModule(function (module, exports) { +(function (exports) { -exports.__esModule = true; + exports.__esModule = true; + var _types = types$1; + Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _types[key]) return; + exports[key] = _types[key]; + }); + var _constructors = constructors; + Object.keys(_constructors).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _constructors[key]) return; + exports[key] = _constructors[key]; + }); + var _guards = guards; + Object.keys(_guards).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _guards[key]) return; + exports[key] = _guards[key]; + }); +} (selectors)); +(function (module, exports) { + exports.__esModule = true; + exports["default"] = void 0; + var _processor = _interopRequireDefault(processorExports); + var selectors$1 = _interopRequireWildcard(selectors); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var parser = function parser(processor) { + return new _processor["default"](processor); + }; + Object.assign(parser, selectors$1); + delete parser.__esModule; + var _default = parser; + exports["default"] = _default; + module.exports = exports.default; +} (dist, dist.exports)); -Object.keys(types).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === types[key]) return; - exports[key] = types[key]; -}); - - - -Object.keys(constructors).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === constructors[key]) return; - exports[key] = constructors[key]; -}); - - - -Object.keys(guards).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === guards[key]) return; - exports[key] = guards[key]; -}); -}); - -var dist = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _processor = _interopRequireDefault(processor); - -var selectors$1 = _interopRequireWildcard(selectors); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -var parser = function parser(processor) { - return new _processor["default"](processor); -}; - -Object.assign(parser, selectors$1); -delete parser.__esModule; -var _default = parser; -exports["default"] = _default; -module.exports = exports.default; -}); - -var selectorParser = /*@__PURE__*/getDefaultExportFromCjs(dist); +var distExports = dist.exports; +var selectorParser$2 = /*@__PURE__*/getDefaultExportFromCjs(distExports); const animationNameRE = /^(-\w+-)?animation-name$/; const animationRE = /^(-\w+-)?animation$/; -const scopedPlugin = (id = '') => { - const keyframes = Object.create(null); - const shortId = id.replace(/^data-v-/, ''); - return { - postcssPlugin: 'vue-sfc-scoped', - Rule(rule) { - processRule(id, rule); - }, - AtRule(node) { - if (/-?keyframes$/.test(node.name) && - !node.params.endsWith(`-${shortId}`)) { - // register keyframes - keyframes[node.params] = node.params = node.params + '-' + shortId; - } - }, - OnceExit(root) { - if (Object.keys(keyframes).length) { - // If keyframes are found in this <style>, find and rewrite animation names - // in declarations. - // Caveat: this only works for keyframes and animation rules in the same - // <style> element. - // individual animation-name declaration - root.walkDecls(decl => { - if (animationNameRE.test(decl.prop)) { - decl.value = decl.value - .split(',') - .map(v => keyframes[v.trim()] || v.trim()) - .join(','); - } - // shorthand - if (animationRE.test(decl.prop)) { - decl.value = decl.value - .split(',') - .map(v => { - const vals = v.trim().split(/\s+/); - const i = vals.findIndex(val => keyframes[val]); - if (i !== -1) { - vals.splice(i, 1, keyframes[vals[i]]); - return vals.join(' '); - } - else { - return v; - } - }) - .join(','); - } - }); - } - } - }; -}; -const processedRules = new WeakSet(); -function processRule(id, rule) { - if (processedRules.has(rule) || - (rule.parent && - rule.parent.type === 'atrule' && - /-?keyframes$/.test(rule.parent.name))) { - return; - } - processedRules.add(rule); - rule.selector = selectorParser(selectorRoot => { - selectorRoot.each(selector => { - rewriteSelector(id, selector, selectorRoot); +const scopedPlugin = (id = "") => { + const keyframes = /* @__PURE__ */ Object.create(null); + const shortId = id.replace(/^data-v-/, ""); + return { + postcssPlugin: "vue-sfc-scoped", + Rule(rule) { + processRule(id, rule); + }, + AtRule(node) { + if (/-?keyframes$/.test(node.name) && !node.params.endsWith(`-${shortId}`)) { + keyframes[node.params] = node.params = node.params + "-" + shortId; + } + }, + OnceExit(root) { + if (Object.keys(keyframes).length) { + root.walkDecls((decl) => { + if (animationNameRE.test(decl.prop)) { + decl.value = decl.value.split(",").map((v) => keyframes[v.trim()] || v.trim()).join(","); + } + if (animationRE.test(decl.prop)) { + decl.value = decl.value.split(",").map((v) => { + const vals = v.trim().split(/\s+/); + const i = vals.findIndex((val) => keyframes[val]); + if (i !== -1) { + vals.splice(i, 1, keyframes[vals[i]]); + return vals.join(" "); + } else { + return v; + } + }).join(","); + } }); - }).processSync(rule.selector); + } + } + }; +}; +const processedRules = /* @__PURE__ */ new WeakSet(); +function processRule(id, rule) { + if (processedRules.has(rule) || rule.parent && rule.parent.type === "atrule" && /-?keyframes$/.test(rule.parent.name)) { + return; + } + processedRules.add(rule); + rule.selector = selectorParser$2((selectorRoot) => { + selectorRoot.each((selector) => { + rewriteSelector(id, selector, selectorRoot); + }); + }).processSync(rule.selector); } function rewriteSelector(id, selector, selectorRoot, slotted = false) { - let node = null; - let shouldInject = true; - // find the last child node to insert attribute selector - selector.each(n => { - // DEPRECATED ">>>" and "/deep/" combinator - if (n.type === 'combinator' && - (n.value === '>>>' || n.value === '/deep/')) { - n.value = ' '; - n.spaces.before = n.spaces.after = ''; - warn(`the >>> and /deep/ combinators have been deprecated. ` + - `Use :deep() instead.`); - return false; - } - if (n.type === 'pseudo') { - const { value } = n; - // deep: inject [id] attribute at the node before the ::v-deep - // combinator. - if (value === ':deep' || value === '::v-deep') { - if (n.nodes.length) { - // .foo ::v-deep(.bar) -> .foo[xxxxxxx] .bar - // replace the current node with ::v-deep's inner selector - let last = n; - n.nodes[0].each(ss => { - selector.insertAfter(last, ss); - last = ss; - }); - // insert a space combinator before if it doesn't already have one - const prev = selector.at(selector.index(n) - 1); - if (!prev || !isSpaceCombinator(prev)) { - selector.insertAfter(n, selectorParser.combinator({ - value: ' ' - })); - } - selector.removeChild(n); - } - else { - // DEPRECATED usage - // .foo ::v-deep .bar -> .foo[xxxxxxx] .bar - warn(`::v-deep usage as a combinator has ` + - `been deprecated. Use :deep(<inner-selector>) instead.`); - const prev = selector.at(selector.index(n) - 1); - if (prev && isSpaceCombinator(prev)) { - selector.removeChild(prev); - } - selector.removeChild(n); - } - return false; - } - // slot: use selector inside `::v-slotted` and inject [id + '-s'] - // instead. - // ::v-slotted(.foo) -> .foo[xxxxxxx-s] - if (value === ':slotted' || value === '::v-slotted') { - rewriteSelector(id, n.nodes[0], selectorRoot, true /* slotted */); - let last = n; - n.nodes[0].each(ss => { - selector.insertAfter(last, ss); - last = ss; - }); - // selector.insertAfter(n, n.nodes[0]) - selector.removeChild(n); - // since slotted attribute already scopes the selector there's no - // need for the non-slot attribute. - shouldInject = false; - return false; - } - // global: replace with inner selector and do not inject [id]. - // ::v-global(.foo) -> .foo - if (value === ':global' || value === '::v-global') { - selectorRoot.insertAfter(selector, n.nodes[0]); - selectorRoot.removeChild(selector); - return false; - } - } - if (n.type !== 'pseudo' && n.type !== 'combinator') { - node = n; - } - }); - if (node) { - node.spaces.after = ''; + let node = null; + let shouldInject = true; + selector.each((n) => { + if (n.type === "combinator" && (n.value === ">>>" || n.value === "/deep/")) { + n.value = " "; + n.spaces.before = n.spaces.after = ""; + warn( + `the >>> and /deep/ combinators have been deprecated. Use :deep() instead.` + ); + return false; } - else { - // For deep selectors & standalone pseudo selectors, - // the attribute selectors are prepended rather than appended. - // So all leading spaces must be eliminated to avoid problems. - selector.first.spaces.before = ''; + if (n.type === "pseudo") { + const { value } = n; + if (value === ":deep" || value === "::v-deep") { + if (n.nodes.length) { + let last = n; + n.nodes[0].each((ss) => { + selector.insertAfter(last, ss); + last = ss; + }); + const prev = selector.at(selector.index(n) - 1); + if (!prev || !isSpaceCombinator(prev)) { + selector.insertAfter( + n, + selectorParser$2.combinator({ + value: " " + }) + ); + } + selector.removeChild(n); + } else { + warn( + `${value} usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of ${value} <inner-selector>.` + ); + const prev = selector.at(selector.index(n) - 1); + if (prev && isSpaceCombinator(prev)) { + selector.removeChild(prev); + } + selector.removeChild(n); + } + return false; + } + if (value === ":slotted" || value === "::v-slotted") { + rewriteSelector( + id, + n.nodes[0], + selectorRoot, + true + /* slotted */ + ); + let last = n; + n.nodes[0].each((ss) => { + selector.insertAfter(last, ss); + last = ss; + }); + selector.removeChild(n); + shouldInject = false; + return false; + } + if (value === ":global" || value === "::v-global") { + selectorRoot.insertAfter(selector, n.nodes[0]); + selectorRoot.removeChild(selector); + return false; + } } - if (shouldInject) { - const idToAdd = slotted ? id + '-s' : id; - selector.insertAfter( - // If node is null it means we need to inject [id] at the start - // insertAfter can handle `null` here - node, selectorParser.attribute({ - attribute: idToAdd, - value: idToAdd, - raws: {}, - quoteMark: `"` - })); + if (n.type !== "pseudo" && n.type !== "combinator" || n.type === "pseudo" && (n.value === ":is" || n.value === ":where")) { + node = n; } + }); + if (node) { + const { type, value } = node; + if (type === "pseudo" && (value === ":is" || value === ":where")) { + node.nodes.forEach( + (value2) => rewriteSelector(id, value2, selectorRoot, slotted) + ); + shouldInject = false; + } + } + if (node) { + node.spaces.after = ""; + } else { + selector.first.spaces.before = ""; + } + if (shouldInject) { + const idToAdd = slotted ? id + "-s" : id; + selector.insertAfter( + // If node is null it means we need to inject [id] at the start + // insertAfter can handle `null` here + node, + selectorParser$2.attribute({ + attribute: idToAdd, + value: idToAdd, + raws: {}, + quoteMark: `"` + }) + ); + } } function isSpaceCombinator(node) { - return node.type === 'combinator' && /^\s+$/.test(node.value); + return node.type === "combinator" && /^\s+$/.test(node.value); } scopedPlugin.postcss = true; +var scopedPlugin$1 = scopedPlugin; -var SourceMapConsumer = sourceMap__default.SourceMapConsumer; -var SourceMapGenerator = sourceMap__default.SourceMapGenerator; +var sourceMap$1 = {}; -var mergeSourceMap = merge$1; +var sourceMapGenerator = {}; + +var base64Vlq = {}; + +var base64$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +base64$1.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +base64$1.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = base64$1; + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +base64Vlq.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; + +var util$5 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +(function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; +} (util$5)); + +var arraySet = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util$4 = util$5; +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet$2() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet$2.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet$2(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet$2.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet$2.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util$4.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet$2.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util$4.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet$2.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util$4.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet$2.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet$2.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +arraySet.ArraySet = ArraySet$2; + +var mappingList = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util$3 = util$5; + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util$3.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList$1() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList$1.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList$1.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList$1.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util$3.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +mappingList.MappingList = MappingList$1; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ$1 = base64Vlq; +var util$2 = util$5; +var ArraySet$1 = arraySet.ArraySet; +var MappingList = mappingList.MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator$2(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util$2.getArg(aArgs, 'file', null); + this._sourceRoot = util$2.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util$2.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet$1(); + this._names = new ArraySet$1(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator$2.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator$2.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator$2({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util$2.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util$2.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator$2.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util$2.getArg(aArgs, 'generated'); + var original = util$2.getArg(aArgs, 'original', null); + var source = util$2.getArg(aArgs, 'source', null); + var name = util$2.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator$2.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util$2.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util$2.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util$2.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator$2.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util$2.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet$1(); + var newNames = new ArraySet$1(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util$2.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util$2.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util$2.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util$2.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator$2.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator$2.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util$2.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ$1.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ$1.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ$1.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ$1.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ$1.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator$2.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util$2.relative(aSourceRoot, source); + } + var key = util$2.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator$2.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator$2.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +sourceMapGenerator.SourceMapGenerator = SourceMapGenerator$2; + +var sourceMapConsumer = {}; + +var binarySearch$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +(function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; +} (binarySearch$1)); + +var quickSort$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ +quickSort$1.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util$1 = util$5; +var binarySearch = binarySearch$1; +var ArraySet = arraySet.ArraySet; +var base64VLQ = base64Vlq; +var quickSort = quickSort$1.quickSort; + +function SourceMapConsumer$1(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util$1.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer$1.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +}; + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer$1.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer$1.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer$1.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer$1.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer$1.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer$1.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer$1.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer$1.GENERATED_ORDER = 1; +SourceMapConsumer$1.ORIGINAL_ORDER = 2; + +SourceMapConsumer$1.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer$1.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer$1.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer$1.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer$1.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer$1.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util$1.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer$1.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util$1.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util$1.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util$1.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util$1.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util$1.getArg(mapping, 'generatedLine', null), + column: util$1.getArg(mapping, 'generatedColumn', null), + lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util$1.getArg(mapping, 'generatedLine', null), + column: util$1.getArg(mapping, 'generatedColumn', null), + lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +sourceMapConsumer.SourceMapConsumer = SourceMapConsumer$1; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util$1.parseSourceMapInput(aSourceMap); + } + + var version = util$1.getArg(sourceMap, 'version'); + var sources = util$1.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util$1.getArg(sourceMap, 'names', []); + var sourceRoot = util$1.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util$1.getArg(sourceMap, 'sourcesContent', null); + var mappings = util$1.getArg(sourceMap, 'mappings'); + var file = util$1.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util$1.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util$1.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util$1.isAbsolute(sourceRoot) && util$1.isAbsolute(source) + ? util$1.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util$1.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer$1; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util$1.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util$1.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util$1.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util$1.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util$1.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util$1.getArg(aArgs, 'line'), + generatedColumn: util$1.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util$1.compareByGeneratedPositionsDeflated, + util$1.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util$1.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util$1.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util$1.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util$1.getArg(mapping, 'originalLine', null), + column: util$1.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util$1.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util$1.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util$1.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util$1.getArg(aArgs, 'line'), + originalColumn: util$1.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util$1.compareByOriginalPositions, + util$1.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util$1.getArg(mapping, 'generatedLine', null), + column: util$1.getArg(mapping, 'generatedColumn', null), + lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util$1.parseSourceMapInput(aSourceMap); + } + + var version = util$1.getArg(sourceMap, 'version'); + var sections = util$1.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util$1.getArg(s, 'offset'); + var offsetLine = util$1.getArg(offset, 'line'); + var offsetColumn = util$1.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer$1(util$1.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer$1; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util$1.getArg(aArgs, 'line'), + generatedColumn: util$1.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util$1.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util$1.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util$1.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util$1.compareByOriginalPositions); + }; + +sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + +var sourceNode = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator; +var util = util$5; + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator$1(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +sourceNode.SourceNode = SourceNode; + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +sourceMap$1.SourceMapGenerator = sourceMapGenerator.SourceMapGenerator; +sourceMap$1.SourceMapConsumer = sourceMapConsumer.SourceMapConsumer; +sourceMap$1.SourceNode = sourceNode.SourceNode; + +var sourceMap = sourceMap$1; +var SourceMapConsumer = sourceMap.SourceMapConsumer; +var SourceMapGenerator = sourceMap.SourceMapGenerator; + +var mergeSourceMap = merge; /** * Merge old source map and new source map and return merged. @@ -9544,7 +11153,7 @@ var mergeSourceMap = merge$1; * @param {object|string} [newmap] new source map object * @return {object|undefined} merged source map object, or undefined when both old and new source map are undefined */ -function merge$1(oldMap, newMap) { +function merge(oldMap, newMap) { if (!oldMap) return newMap if (!newMap) return oldMap @@ -9596,103 +11205,469 @@ function merge$1(oldMap, newMap) { return JSON.parse(mergedMapGenerator.toString()) } -// .scss/.sass processor +var merge$1 = /*@__PURE__*/getDefaultExportFromCjs(mergeSourceMap); + const scss = (source, map, options, load = require) => { - const nodeSass = load('sass'); - const finalOptions = { - ...options, - data: getSource(source, options.filename, options.additionalData), - file: options.filename, - outFile: options.filename, - sourceMap: !!map - }; - try { - const result = nodeSass.renderSync(finalOptions); - const dependencies = result.stats.includedFiles; - if (map) { - return { - code: result.css.toString(), - map: mergeSourceMap(map, JSON.parse(result.map.toString())), - errors: [], - dependencies - }; - } - return { code: result.css.toString(), errors: [], dependencies }; - } - catch (e) { - return { code: '', errors: [e], dependencies: [] }; + const nodeSass = load("sass"); + const finalOptions = { + ...options, + data: getSource(source, options.filename, options.additionalData), + file: options.filename, + outFile: options.filename, + sourceMap: !!map + }; + try { + const result = nodeSass.renderSync(finalOptions); + const dependencies = result.stats.includedFiles; + if (map) { + return { + code: result.css.toString(), + map: merge$1(map, JSON.parse(result.map.toString())), + errors: [], + dependencies + }; } + return { code: result.css.toString(), errors: [], dependencies }; + } catch (e) { + return { code: "", errors: [e], dependencies: [] }; + } }; -const sass = (source, map, options, load) => scss(source, map, { +const sass = (source, map, options, load) => scss( + source, + map, + { ...options, indentedSyntax: true -}, load); -// .less + }, + load +); const less = (source, map, options, load = require) => { - const nodeLess = load('less'); - let result; - let error = null; - nodeLess.render(getSource(source, options.filename, options.additionalData), { ...options, syncImport: true }, (err, output) => { - error = err; - result = output; - }); - if (error) - return { code: '', errors: [error], dependencies: [] }; - const dependencies = result.imports; - if (map) { - return { - code: result.css.toString(), - map: mergeSourceMap(map, result.map), - errors: [], - dependencies: dependencies - }; + const nodeLess = load("less"); + let result; + let error = null; + nodeLess.render( + getSource(source, options.filename, options.additionalData), + { ...options, syncImport: true }, + (err, output) => { + error = err; + result = output; } + ); + if (error) + return { code: "", errors: [error], dependencies: [] }; + const dependencies = result.imports; + if (map) { return { - code: result.css.toString(), - errors: [], - dependencies: dependencies + code: result.css.toString(), + map: merge$1(map, result.map), + errors: [], + dependencies }; + } + return { + code: result.css.toString(), + errors: [], + dependencies + }; }; -// .styl const styl = (source, map, options, load = require) => { - const nodeStylus = load('stylus'); - try { - const ref = nodeStylus(source); - Object.keys(options).forEach(key => ref.set(key, options[key])); - if (map) - ref.set('sourcemap', { inline: false, comment: false }); - const result = ref.render(); - const dependencies = ref.deps(); - if (map) { - return { - code: result, - map: mergeSourceMap(map, ref.sourcemap), - errors: [], - dependencies - }; - } - return { code: result, errors: [], dependencies }; - } - catch (e) { - return { code: '', errors: [e], dependencies: [] }; + const nodeStylus = load("stylus"); + try { + const ref = nodeStylus(source, options); + if (map) + ref.set("sourcemap", { inline: false, comment: false }); + const result = ref.render(); + const dependencies = ref.deps(); + if (map) { + return { + code: result, + map: merge$1(map, ref.sourcemap), + errors: [], + dependencies + }; } + return { code: result, errors: [], dependencies }; + } catch (e) { + return { code: "", errors: [e], dependencies: [] }; + } }; function getSource(source, filename, additionalData) { - if (!additionalData) - return source; - if (shared.isFunction(additionalData)) { - return additionalData(source, filename); - } - return additionalData + source; + if (!additionalData) + return source; + if (shared.isFunction(additionalData)) { + return additionalData(source, filename); + } + return additionalData + source; } const processors = { - less, - sass, - scss, - styl, - stylus: styl + less, + sass, + scss, + styl, + stylus: styl }; +var build = {exports: {}}; + +var fs = {}; + +Object.defineProperty(fs, "__esModule", { + value: true +}); +fs.getFileSystem = getFileSystem; +fs.setFileSystem = setFileSystem; +let fileSystem = { + readFile: () => { + throw Error("readFile not implemented"); + }, + writeFile: () => { + throw Error("writeFile not implemented"); + } +}; + +function setFileSystem(fs) { + fileSystem.readFile = fs.readFile; + fileSystem.writeFile = fs.writeFile; +} + +function getFileSystem() { + return fileSystem; +} + +var pluginFactory = {}; + +var unquote$1 = {}; + +Object.defineProperty(unquote$1, "__esModule", { + value: true +}); +unquote$1.default = unquote; +// copied from https://github.com/lakenen/node-unquote +const reg = /['"]/; + +function unquote(str) { + if (!str) { + return ""; + } + + if (reg.test(str.charAt(0))) { + str = str.substr(1); + } + + if (reg.test(str.charAt(str.length - 1))) { + str = str.substr(0, str.length - 1); + } + + return str; +} + +var Parser$1 = {}; + +const matchValueName = /[$]?[\w-]+/g; + +const replaceValueSymbols$2 = (value, replacements) => { + let matches; + + while ((matches = matchValueName.exec(value))) { + const replacement = replacements[matches[0]]; + + if (replacement) { + value = + value.slice(0, matches.index) + + replacement + + value.slice(matchValueName.lastIndex); + + matchValueName.lastIndex -= matches[0].length - replacement.length; + } + } + + return value; +}; + +var replaceValueSymbols_1 = replaceValueSymbols$2; + +const replaceValueSymbols$1 = replaceValueSymbols_1; + +const replaceSymbols$1 = (css, replacements) => { + css.walk((node) => { + if (node.type === "decl" && node.value) { + node.value = replaceValueSymbols$1(node.value.toString(), replacements); + } else if (node.type === "rule" && node.selector) { + node.selector = replaceValueSymbols$1( + node.selector.toString(), + replacements + ); + } else if (node.type === "atrule" && node.params) { + node.params = replaceValueSymbols$1(node.params.toString(), replacements); + } + }); +}; + +var replaceSymbols_1 = replaceSymbols$1; + +const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/; +const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/; + +const getDeclsObject = (rule) => { + const object = {}; + + rule.walkDecls((decl) => { + const before = decl.raws.before ? decl.raws.before.trim() : ""; + + object[before + decl.prop] = decl.value; + }); + + return object; +}; +/** + * + * @param {string} css + * @param {boolean} removeRules + * @param {'auto' | 'rule' | 'at-rule'} mode + */ +const extractICSS$2 = (css, removeRules = true, mode = "auto") => { + const icssImports = {}; + const icssExports = {}; + + function addImports(node, path) { + const unquoted = path.replace(/'|"/g, ""); + icssImports[unquoted] = Object.assign( + icssImports[unquoted] || {}, + getDeclsObject(node) + ); + + if (removeRules) { + node.remove(); + } + } + + function addExports(node) { + Object.assign(icssExports, getDeclsObject(node)); + if (removeRules) { + node.remove(); + } + } + + css.each((node) => { + if (node.type === "rule" && mode !== "at-rule") { + if (node.selector.slice(0, 7) === ":import") { + const matches = importPattern.exec(node.selector); + + if (matches) { + addImports(node, matches[1]); + } + } + + if (node.selector === ":export") { + addExports(node); + } + } + + if (node.type === "atrule" && mode !== "rule") { + if (node.name === "icss-import") { + const matches = balancedQuotes.exec(node.params); + + if (matches) { + addImports(node, matches[1]); + } + } + if (node.name === "icss-export") { + addExports(node); + } + } + }); + + return { icssImports, icssExports }; +}; + +var extractICSS_1 = extractICSS$2; + +const createImports = (imports, postcss, mode = "rule") => { + return Object.keys(imports).map((path) => { + const aliases = imports[path]; + const declarations = Object.keys(aliases).map((key) => + postcss.decl({ + prop: key, + value: aliases[key], + raws: { before: "\n " }, + }) + ); + + const hasDeclarations = declarations.length > 0; + + const rule = + mode === "rule" + ? postcss.rule({ + selector: `:import('${path}')`, + raws: { after: hasDeclarations ? "\n" : "" }, + }) + : postcss.atRule({ + name: "icss-import", + params: `'${path}'`, + raws: { after: hasDeclarations ? "\n" : "" }, + }); + + if (hasDeclarations) { + rule.append(declarations); + } + + return rule; + }); +}; + +const createExports = (exports, postcss, mode = "rule") => { + const declarations = Object.keys(exports).map((key) => + postcss.decl({ + prop: key, + value: exports[key], + raws: { before: "\n " }, + }) + ); + + if (declarations.length === 0) { + return []; + } + const rule = + mode === "rule" + ? postcss.rule({ + selector: `:export`, + raws: { after: "\n" }, + }) + : postcss.atRule({ + name: "icss-export", + raws: { after: "\n" }, + }); + + rule.append(declarations); + + return [rule]; +}; + +const createICSSRules$1 = (imports, exports, postcss, mode) => [ + ...createImports(imports, postcss, mode), + ...createExports(exports, postcss, mode), +]; + +var createICSSRules_1 = createICSSRules$1; + +const replaceValueSymbols = replaceValueSymbols_1; +const replaceSymbols = replaceSymbols_1; +const extractICSS$1 = extractICSS_1; +const createICSSRules = createICSSRules_1; + +var src$4 = { + replaceValueSymbols, + replaceSymbols, + extractICSS: extractICSS$1, + createICSSRules, +}; + +Object.defineProperty(Parser$1, "__esModule", { + value: true +}); +Parser$1.default = void 0; + +var _icssUtils = src$4; + +// Initially copied from https://github.com/css-modules/css-modules-loader-core +const importRegexp = /^:import\((.+)\)$/; + +class Parser { + constructor(pathFetcher, trace) { + this.pathFetcher = pathFetcher; + this.plugin = this.plugin.bind(this); + this.exportTokens = {}; + this.translations = {}; + this.trace = trace; + } + + plugin() { + const parser = this; + return { + postcssPlugin: "css-modules-parser", + + async OnceExit(css) { + await Promise.all(parser.fetchAllImports(css)); + parser.linkImportedSymbols(css); + return parser.extractExports(css); + } + + }; + } + + fetchAllImports(css) { + let imports = []; + css.each(node => { + if (node.type == "rule" && node.selector.match(importRegexp)) { + imports.push(this.fetchImport(node, css.source.input.from, imports.length)); + } + }); + return imports; + } + + linkImportedSymbols(css) { + (0, _icssUtils.replaceSymbols)(css, this.translations); + } + + extractExports(css) { + css.each(node => { + if (node.type == "rule" && node.selector == ":export") this.handleExport(node); + }); + } + + handleExport(exportNode) { + exportNode.each(decl => { + if (decl.type == "decl") { + Object.keys(this.translations).forEach(translation => { + decl.value = decl.value.replace(translation, this.translations[translation]); + }); + this.exportTokens[decl.prop] = decl.value; + } + }); + exportNode.remove(); + } + + async fetchImport(importNode, relativeTo, depNr) { + const file = importNode.selector.match(importRegexp)[1]; + const depTrace = this.trace + String.fromCharCode(depNr); + const exports = await this.pathFetcher(file, relativeTo, depTrace); + + try { + importNode.each(decl => { + if (decl.type == "decl") { + this.translations[decl.prop] = exports[decl.value]; + } + }); + importNode.remove(); + } catch (err) { + console.log(err); + } + } + +} + +Parser$1.default = Parser; + +var saveJSON$1 = {}; + +Object.defineProperty(saveJSON$1, "__esModule", { + value: true +}); +saveJSON$1.default = saveJSON; + +var _fs$2 = fs; + +function saveJSON(cssFile, json) { + return new Promise((resolve, reject) => { + const { + writeFile + } = (0, _fs$2.getFileSystem)(); + writeFile(`${cssFile}.json`, JSON.stringify(json), e => e ? reject(e) : resolve(json)); + }); +} + +var localsConvention = {}; + /** * lodash (Custom Build) <https://lodash.com/> * Build: `lodash modularize exports="npm" -o ./` @@ -9850,7 +11825,7 @@ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjs var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ -var root$1 = freeGlobal || freeSelf || Function('return this')(); +var root = freeGlobal || freeSelf || Function('return this')(); /** * A specialized version of `_.reduce` for arrays without support for @@ -9990,7 +11965,7 @@ var objectProto = Object.prototype; var objectToString = objectProto.toString; /** Built-in value references. */ -var Symbol$1 = root$1.Symbol; +var Symbol$1 = root.Symbol; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined, @@ -10070,7 +12045,7 @@ function castSlice(array, start, end) { */ function createCaseFirst(methodName) { return function(string) { - string = toString$1(string); + string = toString(string); var strSymbols = hasUnicode(string) ? stringToArray(string) @@ -10172,7 +12147,7 @@ function isSymbol(value) { * _.toString([1, 2, 3]); * // => '1,2,3' */ -function toString$1(value) { +function toString(value) { return value == null ? '' : baseToString(value); } @@ -10217,7 +12192,7 @@ var camelCase = createCompounder(function(result, word, index) { * // => 'Fred' */ function capitalize(string) { - return upperFirst(toString$1(string).toLowerCase()); + return upperFirst(toString(string).toLowerCase()); } /** @@ -10239,7 +12214,7 @@ function capitalize(string) { * // => 'deja vu' */ function deburr(string) { - string = toString$1(string); + string = toString(string); return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); } @@ -10282,7 +12257,7 @@ var upperFirst = createCaseFirst('toUpperCase'); * // => ['fred', 'barney', '&', 'pebbles'] */ function words(string, pattern, guard) { - string = toString$1(string); + string = toString(string); pattern = guard ? undefined : pattern; if (pattern === undefined) { @@ -10293,4436 +12268,1089 @@ function words(string, pattern, guard) { var lodash_camelcase = camelCase; -var unicode = createCommonjsModule(function (module, exports) { -Object.defineProperty(exports,"__esModule",{value:true});exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;exports.ID_Start=/[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\u08B6-\u08BD\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\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\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\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7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uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/;exports.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\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\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\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9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; +Object.defineProperty(localsConvention, "__esModule", { + value: true }); +localsConvention.makeLocalsConventionReducer = makeLocalsConventionReducer; -var isSpaceSeparator_1=isSpaceSeparator;var isIdStartChar_1=isIdStartChar;var isIdContinueChar_1=isIdContinueChar;var isDigit_1=isDigit;var isHexDigit_1=isHexDigit;var unicode$1=_interopRequireWildcard(unicode);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else {var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj.default=obj;return newObj}}function isSpaceSeparator(c){return unicode$1.Space_Separator.test(c)}function isIdStartChar(c){return c>='a'&&c<='z'||c>='A'&&c<='Z'||c==='$'||c==='_'||unicode$1.ID_Start.test(c)}function isIdContinueChar(c){return c>='a'&&c<='z'||c>='A'&&c<='Z'||c>='0'&&c<='9'||c==='$'||c==='_'||c==='\u200C'||c==='\u200D'||unicode$1.ID_Continue.test(c)}function isDigit(c){return /[0-9]/.test(c)}function isHexDigit(c){return /[0-9A-Fa-f]/.test(c)} +var _lodash = _interopRequireDefault$3(lodash_camelcase); -var util$1 = /*#__PURE__*/Object.defineProperty({ - isSpaceSeparator: isSpaceSeparator_1, - isIdStartChar: isIdStartChar_1, - isIdContinueChar: isIdContinueChar_1, - isDigit: isDigit_1, - isHexDigit: isHexDigit_1 -}, '__esModule', {value: true}); +function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var parse_1 = createCommonjsModule(function (module, exports) { -Object.defineProperty(exports,'__esModule',{value:true});var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};exports.default=parse;var util=_interopRequireWildcard(util$1);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else {var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj.default=obj;return newObj}}var source=void 0;var parseState=void 0;var stack=void 0;var pos=void 0;var line=void 0;var column=void 0;var token=void 0;var key=void 0;var root=void 0;function parse(text,reviver){source=String(text);parseState='start';stack=[];pos=0;line=1;column=0;token=undefined;key=undefined;root=undefined;do{token=lex();parseStates[parseState]();}while(token.type!=='eof');if(typeof reviver==='function'){return internalize({'':root},'',reviver)}return root}function internalize(holder,name,reviver){var value=holder[name];if(value!=null&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){for(var _key in value){var replacement=internalize(value,_key,reviver);if(replacement===undefined){delete value[_key];}else {value[_key]=replacement;}}}return reviver.call(holder,name,value)}var lexState=void 0;var buffer=void 0;var doubleQuote=void 0;var _sign=void 0;var c=void 0;function lex(){lexState='default';buffer='';doubleQuote=false;_sign=1;for(;;){c=peek();var _token=lexStates[lexState]();if(_token){return _token}}}function peek(){if(source[pos]){return String.fromCodePoint(source.codePointAt(pos))}}function read(){var c=peek();if(c==='\n'){line++;column=0;}else if(c){column+=c.length;}else {column++;}if(c){pos+=c.length;}return c}var lexStates={default:function _default(){switch(c){case'\t':case'\x0B':case'\f':case' ':case'\xA0':case'\uFEFF':case'\n':case'\r':case'\u2028':case'\u2029':read();return;case'/':read();lexState='comment';return;case undefined:read();return newToken('eof');}if(util.isSpaceSeparator(c)){read();return}return lexStates[parseState]()},comment:function comment(){switch(c){case'*':read();lexState='multiLineComment';return;case'/':read();lexState='singleLineComment';return;}throw invalidChar(read())},multiLineComment:function multiLineComment(){switch(c){case'*':read();lexState='multiLineCommentAsterisk';return;case undefined:throw invalidChar(read());}read();},multiLineCommentAsterisk:function multiLineCommentAsterisk(){switch(c){case'*':read();return;case'/':read();lexState='default';return;case undefined:throw invalidChar(read());}read();lexState='multiLineComment';},singleLineComment:function singleLineComment(){switch(c){case'\n':case'\r':case'\u2028':case'\u2029':read();lexState='default';return;case undefined:read();return newToken('eof');}read();},value:function value(){switch(c){case'{':case'[':return newToken('punctuator',read());case'n':read();literal('ull');return newToken('null',null);case't':read();literal('rue');return newToken('boolean',true);case'f':read();literal('alse');return newToken('boolean',false);case'-':case'+':if(read()==='-'){_sign=-1;}lexState='sign';return;case'.':buffer=read();lexState='decimalPointLeading';return;case'0':buffer=read();lexState='zero';return;case'1':case'2':case'3':case'4':case'5':case'6':case'7':case'8':case'9':buffer=read();lexState='decimalInteger';return;case'I':read();literal('nfinity');return newToken('numeric',Infinity);case'N':read();literal('aN');return newToken('numeric',NaN);case'"':case'\'':doubleQuote=read()==='"';buffer='';lexState='string';return;}throw invalidChar(read())},identifierNameStartEscape:function identifierNameStartEscape(){if(c!=='u'){throw invalidChar(read())}read();var u=unicodeEscape();switch(u){case'$':case'_':break;default:if(!util.isIdStartChar(u)){throw invalidIdentifier()}break;}buffer+=u;lexState='identifierName';},identifierName:function identifierName(){switch(c){case'$':case'_':case'\u200C':case'\u200D':buffer+=read();return;case'\\':read();lexState='identifierNameEscape';return;}if(util.isIdContinueChar(c)){buffer+=read();return}return newToken('identifier',buffer)},identifierNameEscape:function identifierNameEscape(){if(c!=='u'){throw invalidChar(read())}read();var u=unicodeEscape();switch(u){case'$':case'_':case'\u200C':case'\u200D':break;default:if(!util.isIdContinueChar(u)){throw invalidIdentifier()}break;}buffer+=u;lexState='identifierName';},sign:function sign(){switch(c){case'.':buffer=read();lexState='decimalPointLeading';return;case'0':buffer=read();lexState='zero';return;case'1':case'2':case'3':case'4':case'5':case'6':case'7':case'8':case'9':buffer=read();lexState='decimalInteger';return;case'I':read();literal('nfinity');return newToken('numeric',_sign*Infinity);case'N':read();literal('aN');return newToken('numeric',NaN);}throw invalidChar(read())},zero:function zero(){switch(c){case'.':buffer+=read();lexState='decimalPoint';return;case'e':case'E':buffer+=read();lexState='decimalExponent';return;case'x':case'X':buffer+=read();lexState='hexadecimal';return;}return newToken('numeric',_sign*0)},decimalInteger:function decimalInteger(){switch(c){case'.':buffer+=read();lexState='decimalPoint';return;case'e':case'E':buffer+=read();lexState='decimalExponent';return;}if(util.isDigit(c)){buffer+=read();return}return newToken('numeric',_sign*Number(buffer))},decimalPointLeading:function decimalPointLeading(){if(util.isDigit(c)){buffer+=read();lexState='decimalFraction';return}throw invalidChar(read())},decimalPoint:function decimalPoint(){switch(c){case'e':case'E':buffer+=read();lexState='decimalExponent';return;}if(util.isDigit(c)){buffer+=read();lexState='decimalFraction';return}return newToken('numeric',_sign*Number(buffer))},decimalFraction:function decimalFraction(){switch(c){case'e':case'E':buffer+=read();lexState='decimalExponent';return;}if(util.isDigit(c)){buffer+=read();return}return newToken('numeric',_sign*Number(buffer))},decimalExponent:function decimalExponent(){switch(c){case'+':case'-':buffer+=read();lexState='decimalExponentSign';return;}if(util.isDigit(c)){buffer+=read();lexState='decimalExponentInteger';return}throw invalidChar(read())},decimalExponentSign:function decimalExponentSign(){if(util.isDigit(c)){buffer+=read();lexState='decimalExponentInteger';return}throw invalidChar(read())},decimalExponentInteger:function decimalExponentInteger(){if(util.isDigit(c)){buffer+=read();return}return newToken('numeric',_sign*Number(buffer))},hexadecimal:function hexadecimal(){if(util.isHexDigit(c)){buffer+=read();lexState='hexadecimalInteger';return}throw invalidChar(read())},hexadecimalInteger:function hexadecimalInteger(){if(util.isHexDigit(c)){buffer+=read();return}return newToken('numeric',_sign*Number(buffer))},string:function string(){switch(c){case'\\':read();buffer+=escape();return;case'"':if(doubleQuote){read();return newToken('string',buffer)}buffer+=read();return;case'\'':if(!doubleQuote){read();return newToken('string',buffer)}buffer+=read();return;case'\n':case'\r':throw invalidChar(read());case'\u2028':case'\u2029':separatorChar(c);break;case undefined:throw invalidChar(read());}buffer+=read();},start:function start(){switch(c){case'{':case'[':return newToken('punctuator',read());}lexState='value';},beforePropertyName:function beforePropertyName(){switch(c){case'$':case'_':buffer=read();lexState='identifierName';return;case'\\':read();lexState='identifierNameStartEscape';return;case'}':return newToken('punctuator',read());case'"':case'\'':doubleQuote=read()==='"';lexState='string';return;}if(util.isIdStartChar(c)){buffer+=read();lexState='identifierName';return}throw invalidChar(read())},afterPropertyName:function afterPropertyName(){if(c===':'){return newToken('punctuator',read())}throw invalidChar(read())},beforePropertyValue:function beforePropertyValue(){lexState='value';},afterPropertyValue:function afterPropertyValue(){switch(c){case',':case'}':return newToken('punctuator',read());}throw invalidChar(read())},beforeArrayValue:function beforeArrayValue(){if(c===']'){return newToken('punctuator',read())}lexState='value';},afterArrayValue:function afterArrayValue(){switch(c){case',':case']':return newToken('punctuator',read());}throw invalidChar(read())},end:function end(){throw invalidChar(read())}};function newToken(type,value){return {type:type,value:value,line:line,column:column}}function literal(s){var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=s[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _c=_step.value;var p=peek();if(p!==_c){throw invalidChar(read())}read();}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError}}}}function escape(){var c=peek();switch(c){case'b':read();return '\b';case'f':read();return '\f';case'n':read();return '\n';case'r':read();return '\r';case't':read();return '\t';case'v':read();return '\x0B';case'0':read();if(util.isDigit(peek())){throw invalidChar(read())}return '\0';case'x':read();return hexEscape();case'u':read();return unicodeEscape();case'\n':case'\u2028':case'\u2029':read();return '';case'\r':read();if(peek()==='\n'){read();}return '';case'1':case'2':case'3':case'4':case'5':case'6':case'7':case'8':case'9':throw invalidChar(read());case undefined:throw invalidChar(read());}return read()}function hexEscape(){var buffer='';var c=peek();if(!util.isHexDigit(c)){throw invalidChar(read())}buffer+=read();c=peek();if(!util.isHexDigit(c)){throw invalidChar(read())}buffer+=read();return String.fromCodePoint(parseInt(buffer,16))}function unicodeEscape(){var buffer='';var count=4;while(count-->0){var _c2=peek();if(!util.isHexDigit(_c2)){throw invalidChar(read())}buffer+=read();}return String.fromCodePoint(parseInt(buffer,16))}var parseStates={start:function start(){if(token.type==='eof'){throw invalidEOF()}push();},beforePropertyName:function beforePropertyName(){switch(token.type){case'identifier':case'string':key=token.value;parseState='afterPropertyName';return;case'punctuator':pop();return;case'eof':throw invalidEOF();}},afterPropertyName:function afterPropertyName(){if(token.type==='eof'){throw invalidEOF()}parseState='beforePropertyValue';},beforePropertyValue:function beforePropertyValue(){if(token.type==='eof'){throw invalidEOF()}push();},beforeArrayValue:function beforeArrayValue(){if(token.type==='eof'){throw invalidEOF()}if(token.type==='punctuator'&&token.value===']'){pop();return}push();},afterPropertyValue:function afterPropertyValue(){if(token.type==='eof'){throw invalidEOF()}switch(token.value){case',':parseState='beforePropertyName';return;case'}':pop();}},afterArrayValue:function afterArrayValue(){if(token.type==='eof'){throw invalidEOF()}switch(token.value){case',':parseState='beforeArrayValue';return;case']':pop();}},end:function end(){}};function push(){var value=void 0;switch(token.type){case'punctuator':switch(token.value){case'{':value={};break;case'[':value=[];break;}break;case'null':case'boolean':case'numeric':case'string':value=token.value;break;}if(root===undefined){root=value;}else {var parent=stack[stack.length-1];if(Array.isArray(parent)){parent.push(value);}else {parent[key]=value;}}if(value!==null&&(typeof value==='undefined'?'undefined':_typeof(value))==='object'){stack.push(value);if(Array.isArray(value)){parseState='beforeArrayValue';}else {parseState='beforePropertyName';}}else {var current=stack[stack.length-1];if(current==null){parseState='end';}else if(Array.isArray(current)){parseState='afterArrayValue';}else {parseState='afterPropertyValue';}}}function pop(){stack.pop();var current=stack[stack.length-1];if(current==null){parseState='end';}else if(Array.isArray(current)){parseState='afterArrayValue';}else {parseState='afterPropertyValue';}}function invalidChar(c){if(c===undefined){return syntaxError('JSON5: invalid end of input at '+line+':'+column)}return syntaxError('JSON5: invalid character \''+formatChar(c)+'\' at '+line+':'+column)}function invalidEOF(){return syntaxError('JSON5: invalid end of input at '+line+':'+column)}function invalidIdentifier(){column-=5;return syntaxError('JSON5: invalid identifier character at '+line+':'+column)}function separatorChar(c){console.warn('JSON5: \''+c+'\' is not valid ECMAScript; consider escaping');}function formatChar(c){var replacements={'\'':'\\\'','"':'\\"','\\':'\\\\','\b':'\\b','\f':'\\f','\n':'\\n','\r':'\\r','\t':'\\t','\x0B':'\\v','\0':'\\0','\u2028':'\\u2028','\u2029':'\\u2029'};if(replacements[c]){return replacements[c]}if(c<' '){var hexString=c.charCodeAt(0).toString(16);return '\\x'+('00'+hexString).substring(hexString.length)}return c}function syntaxError(message){var err=new SyntaxError(message);err.lineNumber=line;err.columnNumber=column;return err}module.exports=exports['default']; +function dashesCamelCase(string) { + return string.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase()); +} + +function makeLocalsConventionReducer(localsConvention, inputFile) { + const isFunc = typeof localsConvention === "function"; + return (tokens, [className, value]) => { + if (isFunc) { + const convention = localsConvention(className, value, inputFile); + tokens[convention] = value; + return tokens; + } + + switch (localsConvention) { + case "camelCase": + tokens[className] = value; + tokens[(0, _lodash.default)(className)] = value; + break; + + case "camelCaseOnly": + tokens[(0, _lodash.default)(className)] = value; + break; + + case "dashes": + tokens[className] = value; + tokens[dashesCamelCase(className)] = value; + break; + + case "dashesOnly": + tokens[dashesCamelCase(className)] = value; + break; + } + + return tokens; + }; +} + +var FileSystemLoader$1 = {}; + +Object.defineProperty(FileSystemLoader$1, "__esModule", { + value: true }); +FileSystemLoader$1.default = void 0; -var stringify_1 = createCommonjsModule(function (module, exports) { -Object.defineProperty(exports,'__esModule',{value:true});var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};exports.default=stringify;var util=_interopRequireWildcard(util$1);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else {var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj.default=obj;return newObj}}function stringify(value,replacer,space){var stack=[];var indent='';var propertyList=void 0;var replacerFunc=void 0;var gap='';var quote=void 0;if(replacer!=null&&(typeof replacer==='undefined'?'undefined':_typeof(replacer))==='object'&&!Array.isArray(replacer)){space=replacer.space;quote=replacer.quote;replacer=replacer.replacer;}if(typeof replacer==='function'){replacerFunc=replacer;}else if(Array.isArray(replacer)){propertyList=[];var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=replacer[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var v=_step.value;var item=void 0;if(typeof v==='string'){item=v;}else if(typeof v==='number'||v instanceof String||v instanceof Number){item=String(v);}if(item!==undefined&&propertyList.indexOf(item)<0){propertyList.push(item);}}}catch(err){_didIteratorError=true;_iteratorError=err;}finally{try{if(!_iteratorNormalCompletion&&_iterator.return){_iterator.return();}}finally{if(_didIteratorError){throw _iteratorError}}}}if(space instanceof Number){space=Number(space);}else if(space instanceof String){space=String(space);}if(typeof space==='number'){if(space>0){space=Math.min(10,Math.floor(space));gap=' '.substr(0,space);}}else if(typeof space==='string'){gap=space.substr(0,10);}return serializeProperty('',{'':value});function serializeProperty(key,holder){var value=holder[key];if(value!=null){if(typeof value.toJSON5==='function'){value=value.toJSON5(key);}else if(typeof value.toJSON==='function'){value=value.toJSON(key);}}if(replacerFunc){value=replacerFunc.call(holder,key,value);}if(value instanceof Number){value=Number(value);}else if(value instanceof String){value=String(value);}else if(value instanceof Boolean){value=value.valueOf();}switch(value){case null:return 'null';case true:return 'true';case false:return 'false';}if(typeof value==='string'){return quoteString(value)}if(typeof value==='number'){return String(value)}if((typeof value==='undefined'?'undefined':_typeof(value))==='object'){return Array.isArray(value)?serializeArray(value):serializeObject(value)}return undefined}function quoteString(value){var quotes={'\'':0.1,'"':0.2};var replacements={'\'':'\\\'','"':'\\"','\\':'\\\\','\b':'\\b','\f':'\\f','\n':'\\n','\r':'\\r','\t':'\\t','\x0B':'\\v','\0':'\\0','\u2028':'\\u2028','\u2029':'\\u2029'};var product='';var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=value[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var c=_step2.value;switch(c){case'\'':case'"':quotes[c]++;product+=c;continue;}if(replacements[c]){product+=replacements[c];continue}if(c<' '){var hexString=c.charCodeAt(0).toString(16);product+='\\x'+('00'+hexString).substring(hexString.length);continue}product+=c;}}catch(err){_didIteratorError2=true;_iteratorError2=err;}finally{try{if(!_iteratorNormalCompletion2&&_iterator2.return){_iterator2.return();}}finally{if(_didIteratorError2){throw _iteratorError2}}}var quoteChar=quote||Object.keys(quotes).reduce(function(a,b){return quotes[a]<quotes[b]?a:b});product=product.replace(new RegExp(quoteChar,'g'),replacements[quoteChar]);return quoteChar+product+quoteChar}function serializeObject(value){if(stack.indexOf(value)>=0){throw TypeError('Converting circular structure to JSON5')}stack.push(value);var stepback=indent;indent=indent+gap;var keys=propertyList||Object.keys(value);var partial=[];var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=keys[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var key=_step3.value;var propertyString=serializeProperty(key,value);if(propertyString!==undefined){var member=serializeKey(key)+':';if(gap!==''){member+=' ';}member+=propertyString;partial.push(member);}}}catch(err){_didIteratorError3=true;_iteratorError3=err;}finally{try{if(!_iteratorNormalCompletion3&&_iterator3.return){_iterator3.return();}}finally{if(_didIteratorError3){throw _iteratorError3}}}var final=void 0;if(partial.length===0){final='{}';}else {var properties=void 0;if(gap===''){properties=partial.join(',');final='{'+properties+'}';}else {var separator=',\n'+indent;properties=partial.join(separator);final='{\n'+indent+properties+',\n'+stepback+'}';}}stack.pop();indent=stepback;return final}function serializeKey(key){if(key.length===0){return quoteString(key)}var firstChar=String.fromCodePoint(key.codePointAt(0));if(!util.isIdStartChar(firstChar)){return quoteString(key)}for(var i=firstChar.length;i<key.length;i++){if(!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))){return quoteString(key)}}return key}function serializeArray(value){if(stack.indexOf(value)>=0){throw TypeError('Converting circular structure to JSON5')}stack.push(value);var stepback=indent;indent=indent+gap;var partial=[];for(var i=0;i<value.length;i++){var propertyString=serializeProperty(String(i),value);partial.push(propertyString!==undefined?propertyString:'null');}var final=void 0;if(partial.length===0){final='[]';}else {if(gap===''){var properties=partial.join(',');final='['+properties+']';}else {var separator=',\n'+indent;var _properties=partial.join(separator);final='[\n'+indent+_properties+',\n'+stepback+']';}}stack.pop();indent=stepback;return final}}module.exports=exports['default']; -}); +var _postcss$1 = _interopRequireDefault$2(require$$0$1); -var lib = createCommonjsModule(function (module, exports) { -Object.defineProperty(exports,'__esModule',{value:true});var _parse2=_interopRequireDefault(parse_1);var _stringify2=_interopRequireDefault(stringify_1);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}exports.default={parse:_parse2.default,stringify:_stringify2.default};module.exports=exports['default']; -}); +var _path = _interopRequireDefault$2(path$3); -const specialValues = { - null: null, - true: true, - false: false, +var _Parser$1 = _interopRequireDefault$2(Parser$1); + +var _fs$1 = fs; + +function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Initially copied from https://github.com/css-modules/css-modules-loader-core +class Core { + constructor(plugins) { + this.plugins = plugins || Core.defaultPlugins; + } + + async load(sourceString, sourcePath, trace, pathFetcher) { + const parser = new _Parser$1.default(pathFetcher, trace); + const plugins = this.plugins.concat([parser.plugin()]); + const result = await (0, _postcss$1.default)(plugins).process(sourceString, { + from: sourcePath + }); + return { + injectableSource: result.css, + exportTokens: parser.exportTokens + }; + } + +} // Sorts dependencies in the following way: +// AAA comes before AA and A +// AB comes after AA and before A +// All Bs come after all As +// This ensures that the files are always returned in the following order: +// - In the order they were required, except +// - After all their dependencies + + +const traceKeySorter = (a, b) => { + if (a.length < b.length) { + return a < b.substring(0, a.length) ? -1 : 1; + } + + if (a.length > b.length) { + return a.substring(0, b.length) <= b ? -1 : 1; + } + + return a < b ? -1 : 1; }; -function parseQuery(query) { - if (query.substr(0, 1) !== '?') { - throw new Error( - "A valid query string passed to parseQuery should begin with '?'" - ); - } +class FileSystemLoader { + constructor(root, plugins, fileResolve) { + if (root === "/" && process.platform === "win32") { + const cwdDrive = process.cwd().slice(0, 3); - query = query.substr(1); - - if (!query) { - return {}; - } - - if (query.substr(0, 1) === '{' && query.substr(-1) === '}') { - return lib.parse(query); - } - - const queryArgs = query.split(/[,&]/g); - const result = {}; - - queryArgs.forEach((arg) => { - const idx = arg.indexOf('='); - - if (idx >= 0) { - let name = arg.substr(0, idx); - let value = decodeURIComponent(arg.substr(idx + 1)); - - if (specialValues.hasOwnProperty(value)) { - value = specialValues[value]; + if (!/^[A-Za-z]:\\$/.test(cwdDrive)) { + throw new Error(`Failed to obtain root from "${process.cwd()}".`); } - if (name.substr(-2) === '[]') { - name = decodeURIComponent(name.substr(0, name.length - 2)); + root = cwdDrive; + } - if (!Array.isArray(result[name])) { - result[name] = []; - } + this.root = root; + this.fileResolve = fileResolve; + this.sources = {}; + this.traces = {}; + this.importNr = 0; + this.core = new Core(plugins); + this.tokensByFile = {}; + this.fs = (0, _fs$1.getFileSystem)(); + } - result[name].push(value); - } else { - name = decodeURIComponent(name); - result[name] = value; - } - } else { - if (arg.substr(0, 1) === '-') { - result[decodeURIComponent(arg.substr(1))] = false; - } else if (arg.substr(0, 1) === '+') { - result[decodeURIComponent(arg.substr(1))] = true; - } else { - result[decodeURIComponent(arg)] = true; + async fetch(_newPath, relativeTo, _trace) { + const newPath = _newPath.replace(/^["']|["']$/g, ""); + + const trace = _trace || String.fromCharCode(this.importNr++); + + const useFileResolve = typeof this.fileResolve === "function"; + const fileResolvedPath = useFileResolve ? await this.fileResolve(newPath, relativeTo) : await Promise.resolve(); + + if (fileResolvedPath && !_path.default.isAbsolute(fileResolvedPath)) { + throw new Error('The returned path from the "fileResolve" option must be absolute.'); + } + + const relativeDir = _path.default.dirname(relativeTo); + + const rootRelativePath = fileResolvedPath || _path.default.resolve(relativeDir, newPath); + + let fileRelativePath = fileResolvedPath || _path.default.resolve(_path.default.resolve(this.root, relativeDir), newPath); // if the path is not relative or absolute, try to resolve it in node_modules + + + if (!useFileResolve && newPath[0] !== "." && !_path.default.isAbsolute(newPath)) { + try { + fileRelativePath = require.resolve(newPath); + } catch (e) {// noop } } - }); + + const tokens = this.tokensByFile[fileRelativePath]; + if (tokens) return tokens; + return new Promise((resolve, reject) => { + this.fs.readFile(fileRelativePath, "utf-8", async (err, source) => { + if (err) reject(err); + const { + injectableSource, + exportTokens + } = await this.core.load(source, rootRelativePath, trace, this.fetch.bind(this)); + this.sources[fileRelativePath] = injectableSource; + this.traces[trace] = fileRelativePath; + this.tokensByFile[fileRelativePath] = exportTokens; + resolve(exportTokens); + }); + }); + } + + get finalSource() { + const traces = this.traces; + const sources = this.sources; + let written = new Set(); + return Object.keys(traces).sort(traceKeySorter).map(key => { + const filename = traces[key]; + + if (written.has(filename)) { + return null; + } + + written.add(filename); + return sources[filename]; + }).join(""); + } + +} + +FileSystemLoader$1.default = FileSystemLoader; + +var scoping = {}; + +var src$3 = {exports: {}}; + +const PERMANENT_MARKER = 2; +const TEMPORARY_MARKER = 1; + +function createError(node, graph) { + const er = new Error("Nondeterministic import's order"); + + const related = graph[node]; + const relatedNode = related.find( + (relatedNode) => graph[relatedNode].indexOf(node) > -1 + ); + + er.nodes = [node, relatedNode]; + + return er; +} + +function walkGraph(node, graph, state, result, strict) { + if (state[node] === PERMANENT_MARKER) { + return; + } + + if (state[node] === TEMPORARY_MARKER) { + if (strict) { + return createError(node, graph); + } + + return; + } + + state[node] = TEMPORARY_MARKER; + + const children = graph[node]; + const length = children.length; + + for (let i = 0; i < length; ++i) { + const error = walkGraph(children[i], graph, state, result, strict); + + if (error instanceof Error) { + return error; + } + } + + state[node] = PERMANENT_MARKER; + + result.push(node); +} + +function topologicalSort$1(graph, strict) { + const result = []; + const state = {}; + + const nodes = Object.keys(graph); + const length = nodes.length; + + for (let i = 0; i < length; ++i) { + const er = walkGraph(nodes[i], graph, state, result, strict); + + if (er instanceof Error) { + return er; + } + } return result; } -var parseQuery_1 = parseQuery; +var topologicalSort_1 = topologicalSort$1; -function getOptions(loaderContext) { - const query = loaderContext.query; +const topologicalSort = topologicalSort_1; - if (typeof query === 'string' && query !== '') { - return parseQuery_1(loaderContext.query); +const matchImports$1 = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/; +const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/; + +const VISITED_MARKER = 1; + +/** + * :import('G') {} + * + * Rule + * composes: ... from 'A' + * composes: ... from 'B' + + * Rule + * composes: ... from 'A' + * composes: ... from 'A' + * composes: ... from 'C' + * + * Results in: + * + * graph: { + * G: [], + * A: [], + * B: ['A'], + * C: ['A'], + * } + */ +function addImportToGraph(importId, parentId, graph, visited) { + const siblingsId = parentId + "_" + "siblings"; + const visitedId = parentId + "_" + importId; + + if (visited[visitedId] !== VISITED_MARKER) { + if (!Array.isArray(visited[siblingsId])) { + visited[siblingsId] = []; + } + + const siblings = visited[siblingsId]; + + if (Array.isArray(graph[importId])) { + graph[importId] = graph[importId].concat(siblings); + } else { + graph[importId] = siblings.slice(); + } + + visited[visitedId] = VISITED_MARKER; + + siblings.push(importId); } - - if (!query || typeof query !== 'object') { - // Not object-like queries are not supported. - return null; - } - - return query; } -var getOptions_1 = getOptions; +src$3.exports = (options = {}) => { + let importIndex = 0; + const createImportedName = + typeof options.createImportedName !== "function" + ? (importName /*, path*/) => + `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` + : options.createImportedName; + const failOnWrongOrder = options.failOnWrongOrder; -const matchRelativePath = /^\.\.?[/\\]/; + return { + postcssPlugin: "postcss-modules-extract-imports", + prepare() { + const graph = {}; + const visited = {}; + const existingImports = {}; + const importDecls = {}; + const imports = {}; -function isAbsolutePath(str) { - return path__default.posix.isAbsolute(str) || path__default.win32.isAbsolute(str); -} + return { + Once(root, postcss) { + // Check the existing imports order and save refs + root.walkRules((rule) => { + const matches = icssImport.exec(rule.selector); -function isRelativePath(str) { - return matchRelativePath.test(str); -} + if (matches) { + const [, /*match*/ doubleQuotePath, singleQuotePath] = matches; + const importPath = doubleQuotePath || singleQuotePath; -function stringifyRequest(loaderContext, request) { - const splitted = request.split('!'); - const context = - loaderContext.context || - (loaderContext.options && loaderContext.options.context); + addImportToGraph(importPath, "root", graph, visited); - return JSON.stringify( - splitted - .map((part) => { - // First, separate singlePath from query, because the query might contain paths again - const splittedPart = part.match(/^(.*?)(\?.*)/); - const query = splittedPart ? splittedPart[2] : ''; - let singlePath = splittedPart ? splittedPart[1] : part; + existingImports[importPath] = rule; + } + }); - if (isAbsolutePath(singlePath) && context) { - singlePath = path__default.relative(context, singlePath); + root.walkDecls(/^composes$/, (declaration) => { + const matches = declaration.value.match(matchImports$1); - if (isAbsolutePath(singlePath)) { - // If singlePath still matches an absolute path, singlePath was on a different drive than context. - // In this case, we leave the path platform-specific without replacing any separators. - // @see https://github.com/webpack/loader-utils/pull/14 - return singlePath + query; + if (!matches) { + return; + } + + let tmpSymbols; + let [ + , + /*match*/ symbols, + doubleQuotePath, + singleQuotePath, + global, + ] = matches; + + if (global) { + // Composing globals simply means changing these classes to wrap them in global(name) + tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`); + } else { + const importPath = doubleQuotePath || singleQuotePath; + + let parent = declaration.parent; + let parentIndexes = ""; + + while (parent.type !== "root") { + parentIndexes = + parent.parent.index(parent) + "_" + parentIndexes; + parent = parent.parent; + } + + const { selector } = declaration.parent; + const parentRule = `_${parentIndexes}${selector}`; + + addImportToGraph(importPath, parentRule, graph, visited); + + importDecls[importPath] = declaration; + imports[importPath] = imports[importPath] || {}; + + tmpSymbols = symbols.split(/\s+/).map((s) => { + if (!imports[importPath][s]) { + imports[importPath][s] = createImportedName(s, importPath); + } + + return imports[importPath][s]; + }); + } + + declaration.value = tmpSymbols.join(" "); + }); + + const importsOrder = topologicalSort(graph, failOnWrongOrder); + + if (importsOrder instanceof Error) { + const importPath = importsOrder.nodes.find((importPath) => + // eslint-disable-next-line no-prototype-builtins + importDecls.hasOwnProperty(importPath) + ); + const decl = importDecls[importPath]; + + throw decl.error( + "Failed to resolve order of composed modules " + + importsOrder.nodes + .map((importPath) => "`" + importPath + "`") + .join(", ") + + ".", + { + plugin: "postcss-modules-extract-imports", + word: "composes", + } + ); } - if (isRelativePath(singlePath) === false) { - // Ensure that the relative path starts at least with ./ otherwise it would be a request into the modules directory (like node_modules). - singlePath = './' + singlePath; - } - } - - return singlePath.replace(/\\/g, '/') + query; - }) - .join('!') - ); -} - -var stringifyRequest_1 = stringifyRequest; - -function getRemainingRequest(loaderContext) { - if (loaderContext.remainingRequest) { - return loaderContext.remainingRequest; - } - - const request = loaderContext.loaders - .slice(loaderContext.loaderIndex + 1) - .map((obj) => obj.request) - .concat([loaderContext.resource]); - - return request.join('!'); -} - -var getRemainingRequest_1 = getRemainingRequest; - -function getCurrentRequest(loaderContext) { - if (loaderContext.currentRequest) { - return loaderContext.currentRequest; - } - - const request = loaderContext.loaders - .slice(loaderContext.loaderIndex) - .map((obj) => obj.request) - .concat([loaderContext.resource]); - - return request.join('!'); -} - -var getCurrentRequest_1 = getCurrentRequest; - -function isUrlRequest(url, root) { - // An URL is not an request if - - // 1. It's an absolute url and it is not `windows` path like `C:\dir\file` - if (/^[a-z][a-z0-9+.-]*:/i.test(url) && !path__default.win32.isAbsolute(url)) { - return false; - } - - // 2. It's a protocol-relative - if (/^\/\//.test(url)) { - return false; - } - - // 3. It's some kind of url for a template - if (/^[{}[\]#*;,'§$%&(=?`´^°<>]/.test(url)) { - return false; - } - - // 4. It's also not an request if root isn't set and it's a root-relative url - if ((root === undefined || root === false) && /^\//.test(url)) { - return false; - } - - return true; -} - -var isUrlRequest_1 = isUrlRequest; - -// we can't use path.win32.isAbsolute because it also matches paths starting with a forward slash -const matchNativeWin32Path = /^[A-Z]:[/\\]|^\\\\/i; - -function urlToRequest(url, root) { - // Do not rewrite an empty url - if (url === '') { - return ''; - } - - const moduleRequestRegex = /^[^?]*~/; - let request; - - if (matchNativeWin32Path.test(url)) { - // absolute windows path, keep it - request = url; - } else if (root !== undefined && root !== false && /^\//.test(url)) { - // if root is set and the url is root-relative - switch (typeof root) { - // 1. root is a string: root is prefixed to the url - case 'string': - // special case: `~` roots convert to module request - if (moduleRequestRegex.test(root)) { - request = root.replace(/([^~/])$/, '$1/') + url.slice(1); - } else { - request = root + url; - } - break; - // 2. root is `true`: absolute paths are allowed - // *nix only, windows-style absolute paths are always allowed as they doesn't start with a `/` - case 'boolean': - request = url; - break; - default: - throw new Error( - "Unexpected parameters to loader-utils 'urlToRequest': url = " + - url + - ', root = ' + - root + - '.' - ); - } - } else if (/^\.\.?\//.test(url)) { - // A relative url stays - request = url; - } else { - // every other url is threaded like a relative url - request = './' + url; - } - - // A `~` makes the url an module - if (moduleRequestRegex.test(request)) { - request = request.replace(moduleRequestRegex, ''); - } - - return request; -} - -var urlToRequest_1 = urlToRequest; - -function parseString(str) { - try { - if (str[0] === '"') { - return JSON.parse(str); - } - - if (str[0] === "'" && str.substr(str.length - 1) === "'") { - return parseString( - str - .replace(/\\.|"/g, (x) => (x === '"' ? '\\"' : x)) - .replace(/^'|'$/g, '"') - ); - } - - return JSON.parse('"' + str + '"'); - } catch (e) { - return str; - } -} - -var parseString_1 = parseString; - -/* - * big.js v5.2.2 - * A small, fast, easy-to-use library for arbitrary-precision decimal arithmetic. - * Copyright (c) 2018 Michael Mclaughlin <M8ch88l@gmail.com> - * https://github.com/MikeMcl/big.js/LICENCE - */ - - -/************************************** EDITABLE DEFAULTS *****************************************/ - - - // The default values below must be integers within the stated ranges. - - /* - * The maximum number of decimal places (DP) of the results of operations involving division: - * div and sqrt, and pow with negative exponents. - */ -var DP = 20, // 0 to MAX_DP - - /* - * The rounding mode (RM) used when rounding to the above decimal places. - * - * 0 Towards zero (i.e. truncate, no rounding). (ROUND_DOWN) - * 1 To nearest neighbour. If equidistant, round up. (ROUND_HALF_UP) - * 2 To nearest neighbour. If equidistant, to even. (ROUND_HALF_EVEN) - * 3 Away from zero. (ROUND_UP) - */ - RM = 1, // 0, 1, 2 or 3 - - // The maximum value of DP and Big.DP. - MAX_DP = 1E6, // 0 to 1000000 - - // The maximum magnitude of the exponent argument to the pow method. - MAX_POWER = 1E6, // 1 to 1000000 - - /* - * The negative exponent (NE) at and beneath which toString returns exponential notation. - * (JavaScript numbers: -7) - * -1000000 is the minimum recommended exponent value of a Big. - */ - NE = -7, // 0 to -1000000 - - /* - * The positive exponent (PE) at and above which toString returns exponential notation. - * (JavaScript numbers: 21) - * 1000000 is the maximum recommended exponent value of a Big. - * (This limit is not enforced or checked.) - */ - PE = 21, // 0 to 1000000 - - -/**************************************************************************************************/ - - - // Error messages. - NAME = '[big.js] ', - INVALID = NAME + 'Invalid ', - INVALID_DP = INVALID + 'decimal places', - INVALID_RM = INVALID + 'rounding mode', - DIV_BY_ZERO = NAME + 'Division by zero', - - // The shared prototype object. - P = {}, - UNDEFINED = void 0, - NUMERIC = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i; - - -/* - * Create and return a Big constructor. - * - */ -function _Big_() { - - /* - * The Big constructor and exported function. - * Create and return a new instance of a Big number object. - * - * n {number|string|Big} A numeric value. - */ - function Big(n) { - var x = this; - - // Enable constructor usage without new. - if (!(x instanceof Big)) return n === UNDEFINED ? _Big_() : new Big(n); - - // Duplicate. - if (n instanceof Big) { - x.s = n.s; - x.e = n.e; - x.c = n.c.slice(); - } else { - parse$1(x, n); - } - - /* - * Retain a reference to this Big constructor, and shadow Big.prototype.constructor which - * points to Object. - */ - x.constructor = Big; - } - - Big.prototype = P; - Big.DP = DP; - Big.RM = RM; - Big.NE = NE; - Big.PE = PE; - Big.version = '5.2.2'; - - return Big; -} - - -/* - * Parse the number or string value passed to a Big constructor. - * - * x {Big} A Big number instance. - * n {number|string} A numeric value. - */ -function parse$1(x, n) { - var e, i, nl; - - // Minus zero? - if (n === 0 && 1 / n < 0) n = '-0'; - else if (!NUMERIC.test(n += '')) throw Error(INVALID + 'number'); - - // Determine sign. - x.s = n.charAt(0) == '-' ? (n = n.slice(1), -1) : 1; - - // Decimal point? - if ((e = n.indexOf('.')) > -1) n = n.replace('.', ''); - - // Exponential form? - if ((i = n.search(/e/i)) > 0) { - - // Determine exponent. - if (e < 0) e = i; - e += +n.slice(i + 1); - n = n.substring(0, i); - } else if (e < 0) { - - // Integer. - e = n.length; - } - - nl = n.length; - - // Determine leading zeros. - for (i = 0; i < nl && n.charAt(i) == '0';) ++i; - - if (i == nl) { - - // Zero. - x.c = [x.e = 0]; - } else { - - // Determine trailing zeros. - for (; nl > 0 && n.charAt(--nl) == '0';); - x.e = e - i - 1; - x.c = []; - - // Convert string to array of digits without leading/trailing zeros. - for (e = 0; i <= nl;) x.c[e++] = +n.charAt(i++); - } - - return x; -} - - -/* - * Round Big x to a maximum of dp decimal places using rounding mode rm. - * Called by stringify, P.div, P.round and P.sqrt. - * - * x {Big} The Big to round. - * dp {number} Integer, 0 to MAX_DP inclusive. - * rm {number} 0, 1, 2 or 3 (DOWN, HALF_UP, HALF_EVEN, UP) - * [more] {boolean} Whether the result of division was truncated. - */ -function round(x, dp, rm, more) { - var xc = x.c, - i = x.e + dp + 1; - - if (i < xc.length) { - if (rm === 1) { - - // xc[i] is the digit after the digit that may be rounded up. - more = xc[i] >= 5; - } else if (rm === 2) { - more = xc[i] > 5 || xc[i] == 5 && - (more || i < 0 || xc[i + 1] !== UNDEFINED || xc[i - 1] & 1); - } else if (rm === 3) { - more = more || !!xc[0]; - } else { - more = false; - if (rm !== 0) throw Error(INVALID_RM); - } - - if (i < 1) { - xc.length = 1; - - if (more) { - - // 1, 0.1, 0.01, 0.001, 0.0001 etc. - x.e = -dp; - xc[0] = 1; - } else { - - // Zero. - xc[0] = x.e = 0; - } - } else { - - // Remove any digits after the required decimal places. - xc.length = i--; - - // Round up? - if (more) { - - // Rounding up may mean the previous digit has to be rounded up. - for (; ++xc[i] > 9;) { - xc[i] = 0; - if (!i--) { - ++x.e; - xc.unshift(1); - } - } - } - - // Remove trailing zeros. - for (i = xc.length; !xc[--i];) xc.pop(); - } - } else if (rm < 0 || rm > 3 || rm !== ~~rm) { - throw Error(INVALID_RM); - } - - return x; -} - - -/* - * Return a string representing the value of Big x in normal or exponential notation. - * Handles P.toExponential, P.toFixed, P.toJSON, P.toPrecision, P.toString and P.valueOf. - * - * x {Big} - * id? {number} Caller id. - * 1 toExponential - * 2 toFixed - * 3 toPrecision - * 4 valueOf - * n? {number|undefined} Caller's argument. - * k? {number|undefined} - */ -function stringify(x, id, n, k) { - var e, s, - Big = x.constructor, - z = !x.c[0]; - - if (n !== UNDEFINED) { - if (n !== ~~n || n < (id == 3) || n > MAX_DP) { - throw Error(id == 3 ? INVALID + 'precision' : INVALID_DP); - } - - x = new Big(x); - - // The index of the digit that may be rounded up. - n = k - x.e; - - // Round? - if (x.c.length > ++k) round(x, n, Big.RM); - - // toFixed: recalculate k as x.e may have changed if value rounded up. - if (id == 2) k = x.e + n + 1; - - // Append zeros? - for (; x.c.length < k;) x.c.push(0); - } - - e = x.e; - s = x.c.join(''); - n = s.length; - - // Exponential notation? - if (id != 2 && (id == 1 || id == 3 && k <= e || e <= Big.NE || e >= Big.PE)) { - s = s.charAt(0) + (n > 1 ? '.' + s.slice(1) : '') + (e < 0 ? 'e' : 'e+') + e; - - // Normal notation. - } else if (e < 0) { - for (; ++e;) s = '0' + s; - s = '0.' + s; - } else if (e > 0) { - if (++e > n) for (e -= n; e--;) s += '0'; - else if (e < n) s = s.slice(0, e) + '.' + s.slice(e); - } else if (n > 1) { - s = s.charAt(0) + '.' + s.slice(1); - } - - return x.s < 0 && (!z || id == 4) ? '-' + s : s; -} - - -// Prototype/instance methods - - -/* - * Return a new Big whose value is the absolute value of this Big. - */ -P.abs = function () { - var x = new this.constructor(this); - x.s = 1; - return x; + let lastImportRule; + + importsOrder.forEach((path) => { + const importedSymbols = imports[path]; + let rule = existingImports[path]; + + if (!rule && importedSymbols) { + rule = postcss.rule({ + selector: `:import("${path}")`, + raws: { after: "\n" }, + }); + + if (lastImportRule) { + root.insertAfter(lastImportRule, rule); + } else { + root.prepend(rule); + } + } + + lastImportRule = rule; + + if (!importedSymbols) { + return; + } + + Object.keys(importedSymbols).forEach((importedSymbol) => { + rule.append( + postcss.decl({ + value: importedSymbol, + prop: importedSymbols[importedSymbol], + raws: { before: "\n " }, + }) + ); + }); + }); + }, + }; + }, + }; }; +src$3.exports.postcss = true; + +var srcExports$2 = src$3.exports; + +var BulkUpdateDecorator_1; +var hasRequiredBulkUpdateDecorator; + +function requireBulkUpdateDecorator () { + if (hasRequiredBulkUpdateDecorator) return BulkUpdateDecorator_1; + hasRequiredBulkUpdateDecorator = 1; + const BULK_SIZE = 2000; + + // We are using an object instead of a Map as this will stay static during the runtime + // so access to it can be optimized by v8 + const digestCaches = {}; + + class BulkUpdateDecorator { + /** + * @param {Hash | function(): Hash} hashOrFactory function to create a hash + * @param {string=} hashKey key for caching + */ + constructor(hashOrFactory, hashKey) { + this.hashKey = hashKey; + + if (typeof hashOrFactory === "function") { + this.hashFactory = hashOrFactory; + this.hash = undefined; + } else { + this.hashFactory = undefined; + this.hash = hashOrFactory; + } + + this.buffer = ""; + } + + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + if ( + inputEncoding !== undefined || + typeof data !== "string" || + data.length > BULK_SIZE + ) { + if (this.hash === undefined) { + this.hash = this.hashFactory(); + } + + if (this.buffer.length > 0) { + this.hash.update(this.buffer); + this.buffer = ""; + } + + this.hash.update(data, inputEncoding); + } else { + this.buffer += data; + + if (this.buffer.length > BULK_SIZE) { + if (this.hash === undefined) { + this.hash = this.hashFactory(); + } + + this.hash.update(this.buffer); + this.buffer = ""; + } + } + + return this; + } + + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + let digestCache; + + const buffer = this.buffer; + + if (this.hash === undefined) { + // short data for hash, we can use caching + const cacheKey = `${this.hashKey}-${encoding}`; + + digestCache = digestCaches[cacheKey]; + + if (digestCache === undefined) { + digestCache = digestCaches[cacheKey] = new Map(); + } + + const cacheEntry = digestCache.get(buffer); + + if (cacheEntry !== undefined) { + return cacheEntry; + } + + this.hash = this.hashFactory(); + } + + if (buffer.length > 0) { + this.hash.update(buffer); + } + + const digestResult = this.hash.digest(encoding); + + if (digestCache !== undefined) { + digestCache.set(buffer, digestResult); + } + + return digestResult; + } + } + + BulkUpdateDecorator_1 = BulkUpdateDecorator; + return BulkUpdateDecorator_1; +} + +var wasmHash = {exports: {}}; /* - * Return 1 if the value of this Big is greater than the value of Big y, - * -1 if the value of this Big is less than the value of Big y, or - * 0 if they have the same value. + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra */ -P.cmp = function (y) { - var isneg, - x = this, - xc = x.c, - yc = (y = new x.constructor(y)).c, - i = x.s, - j = y.s, - k = x.e, - l = y.e; - // Either zero? - if (!xc[0] || !yc[0]) return !xc[0] ? !yc[0] ? 0 : -j : i; +var hasRequiredWasmHash; - // Signs differ? - if (i != j) return i; +function requireWasmHash () { + if (hasRequiredWasmHash) return wasmHash.exports; + hasRequiredWasmHash = 1; - isneg = i < 0; + // 65536 is the size of a wasm memory page + // 64 is the maximum chunk size for every possible wasm hash implementation + // 4 is the maximum number of bytes per char for string encoding (max is utf-8) + // ~3 makes sure that it's always a block of 4 chars, so avoid partially encoded bytes for base64 + const MAX_SHORT_STRING = Math.floor((65536 - 64) / 4) & ~3; - // Compare exponents. - if (k != l) return k > l ^ isneg ? 1 : -1; + class WasmHash { + /** + * @param {WebAssembly.Instance} instance wasm instance + * @param {WebAssembly.Instance[]} instancesPool pool of instances + * @param {number} chunkSize size of data chunks passed to wasm + * @param {number} digestSize size of digest returned by wasm + */ + constructor(instance, instancesPool, chunkSize, digestSize) { + const exports = /** @type {any} */ (instance.exports); - j = (k = xc.length) < (l = yc.length) ? k : l; + exports.init(); - // Compare digit by digit. - for (i = -1; ++i < j;) { - if (xc[i] != yc[i]) return xc[i] > yc[i] ^ isneg ? 1 : -1; - } + this.exports = exports; + this.mem = Buffer.from(exports.memory.buffer, 0, 65536); + this.buffered = 0; + this.instancesPool = instancesPool; + this.chunkSize = chunkSize; + this.digestSize = digestSize; + } - // Compare lengths. - return k == l ? 0 : k > l ^ isneg ? 1 : -1; -}; + reset() { + this.buffered = 0; + this.exports.init(); + } + /** + * @param {Buffer | string} data data + * @param {BufferEncoding=} encoding encoding + * @returns {this} itself + */ + update(data, encoding) { + if (typeof data === "string") { + while (data.length > MAX_SHORT_STRING) { + this._updateWithShortString(data.slice(0, MAX_SHORT_STRING), encoding); + data = data.slice(MAX_SHORT_STRING); + } + + this._updateWithShortString(data, encoding); + + return this; + } + + this._updateWithBuffer(data); + + return this; + } + + /** + * @param {string} data data + * @param {BufferEncoding=} encoding encoding + * @returns {void} + */ + _updateWithShortString(data, encoding) { + const { exports, buffered, mem, chunkSize } = this; + + let endPos; + + if (data.length < 70) { + if (!encoding || encoding === "utf-8" || encoding === "utf8") { + endPos = buffered; + for (let i = 0; i < data.length; i++) { + const cc = data.charCodeAt(i); + + if (cc < 0x80) { + mem[endPos++] = cc; + } else if (cc < 0x800) { + mem[endPos] = (cc >> 6) | 0xc0; + mem[endPos + 1] = (cc & 0x3f) | 0x80; + endPos += 2; + } else { + // bail-out for weird chars + endPos += mem.write(data.slice(i), endPos, encoding); + break; + } + } + } else if (encoding === "latin1") { + endPos = buffered; + + for (let i = 0; i < data.length; i++) { + const cc = data.charCodeAt(i); + + mem[endPos++] = cc; + } + } else { + endPos = buffered + mem.write(data, buffered, encoding); + } + } else { + endPos = buffered + mem.write(data, buffered, encoding); + } + + if (endPos < chunkSize) { + this.buffered = endPos; + } else { + const l = endPos & ~(this.chunkSize - 1); + + exports.update(l); + + const newBuffered = endPos - l; + + this.buffered = newBuffered; + + if (newBuffered > 0) { + mem.copyWithin(0, l, endPos); + } + } + } + + /** + * @param {Buffer} data data + * @returns {void} + */ + _updateWithBuffer(data) { + const { exports, buffered, mem } = this; + const length = data.length; + + if (buffered + length < this.chunkSize) { + data.copy(mem, buffered, 0, length); + + this.buffered += length; + } else { + const l = (buffered + length) & ~(this.chunkSize - 1); + + if (l > 65536) { + let i = 65536 - buffered; + + data.copy(mem, buffered, 0, i); + exports.update(65536); + + const stop = l - buffered - 65536; + + while (i < stop) { + data.copy(mem, 0, i, i + 65536); + exports.update(65536); + i += 65536; + } + + data.copy(mem, 0, i, l - buffered); + + exports.update(l - buffered - i); + } else { + data.copy(mem, buffered, 0, l - buffered); + + exports.update(l); + } + + const newBuffered = length + buffered - l; + + this.buffered = newBuffered; + + if (newBuffered > 0) { + data.copy(mem, 0, length - newBuffered, length); + } + } + } + + digest(type) { + const { exports, buffered, mem, digestSize } = this; + + exports.final(buffered); + + this.instancesPool.push(this); + + const hex = mem.toString("latin1", 0, digestSize); + + if (type === "hex") { + return hex; + } + + if (type === "binary" || !type) { + return Buffer.from(hex, "hex"); + } + + return Buffer.from(hex, "hex").toString(type); + } + } + + const create = (wasmModule, instancesPool, chunkSize, digestSize) => { + if (instancesPool.length > 0) { + const old = instancesPool.pop(); + + old.reset(); + + return old; + } else { + return new WasmHash( + new WebAssembly.Instance(wasmModule), + instancesPool, + chunkSize, + digestSize + ); + } + }; + + wasmHash.exports = create; + wasmHash.exports.MAX_SHORT_STRING = MAX_SHORT_STRING; + return wasmHash.exports; +} /* - * Return a new Big whose value is the value of this Big divided by the value of Big y, rounded, - * if necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. - */ -P.div = function (y) { - var x = this, - Big = x.constructor, - a = x.c, // dividend - b = (y = new Big(y)).c, // divisor - k = x.s == y.s ? 1 : -1, - dp = Big.DP; + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ - if (dp !== ~~dp || dp < 0 || dp > MAX_DP) throw Error(INVALID_DP); +var md4_1; +var hasRequiredMd4; - // Divisor is zero? - if (!b[0]) throw Error(DIV_BY_ZERO); +function requireMd4 () { + if (hasRequiredMd4) return md4_1; + hasRequiredMd4 = 1; - // Dividend is 0? Return +-0. - if (!a[0]) return new Big(k * 0); + const create = requireWasmHash(); - var bl, bt, n, cmp, ri, - bz = b.slice(), - ai = bl = b.length, - al = a.length, - r = a.slice(0, bl), // remainder - rl = r.length, - q = y, // quotient - qc = q.c = [], - qi = 0, - d = dp + (q.e = x.e - y.e) + 1; // number of digits of the result + //#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1 + const md4 = new WebAssembly.Module( + Buffer.from( + // 2150 bytes + "AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZ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64" + ) + ); + //#endregion - q.s = k; - k = d < 0 ? 0 : d; + md4_1 = create.bind(null, md4, [], 64, 32); + return md4_1; +} - // Create version of divisor with leading zero. - bz.unshift(0); +var BatchedHash_1; +var hasRequiredBatchedHash; - // Add zeros to make remainder as long as divisor. - for (; rl++ < bl;) r.push(0); +function requireBatchedHash () { + if (hasRequiredBatchedHash) return BatchedHash_1; + hasRequiredBatchedHash = 1; + const MAX_SHORT_STRING = requireWasmHash().MAX_SHORT_STRING; - do { + class BatchedHash { + constructor(hash) { + this.string = undefined; + this.encoding = undefined; + this.hash = hash; + } - // n is how many times the divisor goes into current remainder. - for (n = 0; n < 10; n++) { + /** + * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding} + * @param {string|Buffer} data data + * @param {string=} inputEncoding data encoding + * @returns {this} updated hash + */ + update(data, inputEncoding) { + if (this.string !== undefined) { + if ( + typeof data === "string" && + inputEncoding === this.encoding && + this.string.length + data.length < MAX_SHORT_STRING + ) { + this.string += data; - // Compare divisor and remainder. - if (bl != (rl = r.length)) { - cmp = bl > rl ? 1 : -1; - } else { - for (ri = -1, cmp = 0; ++ri < bl;) { - if (b[ri] != r[ri]) { - cmp = b[ri] > r[ri] ? 1 : -1; - break; - } - } - } + return this; + } - // If divisor < remainder, subtract divisor from remainder. - if (cmp < 0) { + this.hash.update(this.string, this.encoding); + this.string = undefined; + } - // Remainder can't be more than 1 digit longer than divisor. - // Equalise lengths using divisor with extra leading zero? - for (bt = rl == bl ? b : bz; rl;) { - if (r[--rl] < bt[rl]) { - ri = rl; - for (; ri && !r[--ri];) r[ri] = 9; - --r[ri]; - r[rl] += 10; - } - r[rl] -= bt[rl]; - } + if (typeof data === "string") { + if ( + data.length < MAX_SHORT_STRING && + // base64 encoding is not valid since it may contain padding chars + (!inputEncoding || !inputEncoding.startsWith("ba")) + ) { + this.string = data; + this.encoding = inputEncoding; + } else { + this.hash.update(data, inputEncoding); + } + } else { + this.hash.update(data); + } - for (; !r[0];) r.shift(); - } else { - break; - } - } + return this; + } - // Add the digit n to the result array. - qc[qi++] = cmp ? n : ++n; + /** + * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding} + * @param {string=} encoding encoding of the return value + * @returns {string|Buffer} digest + */ + digest(encoding) { + if (this.string !== undefined) { + this.hash.update(this.string, this.encoding); + } - // Update the remainder. - if (r[0] && cmp) r[rl] = a[ai] || 0; - else r = [a[ai]]; - - } while ((ai++ < al || r[0] !== UNDEFINED) && k--); - - // Leading zero? Do not remove if result is simply zero (qi == 1). - if (!qc[0] && qi != 1) { - - // There can't be more than one zero. - qc.shift(); - q.e--; - } - - // Round? - if (qi > d) round(q, dp, Big.RM, r[0] !== UNDEFINED); - - return q; -}; + return this.hash.digest(encoding); + } + } + BatchedHash_1 = BatchedHash; + return BatchedHash_1; +} /* - * Return true if the value of this Big is equal to the value of Big y, otherwise return false. - */ -P.eq = function (y) { - return !this.cmp(y); -}; - - -/* - * Return true if the value of this Big is greater than the value of Big y, otherwise return - * false. - */ -P.gt = function (y) { - return this.cmp(y) > 0; -}; - - -/* - * Return true if the value of this Big is greater than or equal to the value of Big y, otherwise - * return false. - */ -P.gte = function (y) { - return this.cmp(y) > -1; -}; - - -/* - * Return true if the value of this Big is less than the value of Big y, otherwise return false. - */ -P.lt = function (y) { - return this.cmp(y) < 0; -}; - - -/* - * Return true if the value of this Big is less than or equal to the value of Big y, otherwise - * return false. - */ -P.lte = function (y) { - return this.cmp(y) < 1; -}; - - -/* - * Return a new Big whose value is the value of this Big minus the value of Big y. - */ -P.minus = P.sub = function (y) { - var i, j, t, xlty, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - // Signs differ? - if (a != b) { - y.s = -b; - return x.plus(y); - } - - var xc = x.c.slice(), - xe = x.e, - yc = y.c, - ye = y.e; - - // Either zero? - if (!xc[0] || !yc[0]) { - - // y is non-zero? x is non-zero? Or both are zero. - return yc[0] ? (y.s = -b, y) : new Big(xc[0] ? x : 0); - } - - // Determine which is the bigger number. Prepend zeros to equalise exponents. - if (a = xe - ye) { - - if (xlty = a < 0) { - a = -a; - t = xc; - } else { - ye = xe; - t = yc; - } - - t.reverse(); - for (b = a; b--;) t.push(0); - t.reverse(); - } else { - - // Exponents equal. Check digit by digit. - j = ((xlty = xc.length < yc.length) ? xc : yc).length; - - for (a = b = 0; b < j; b++) { - if (xc[b] != yc[b]) { - xlty = xc[b] < yc[b]; - break; - } - } - } - - // x < y? Point xc to the array of the bigger number. - if (xlty) { - t = xc; - xc = yc; - yc = t; - y.s = -y.s; - } - - /* - * Append zeros to xc if shorter. No need to add zeros to yc if shorter as subtraction only - * needs to start at yc.length. - */ - if ((b = (j = yc.length) - (i = xc.length)) > 0) for (; b--;) xc[i++] = 0; - - // Subtract yc from xc. - for (b = i; j > a;) { - if (xc[--j] < yc[j]) { - for (i = j; i && !xc[--i];) xc[i] = 9; - --xc[i]; - xc[j] += 10; - } - - xc[j] -= yc[j]; - } - - // Remove trailing zeros. - for (; xc[--b] === 0;) xc.pop(); - - // Remove leading zeros and adjust exponent accordingly. - for (; xc[0] === 0;) { - xc.shift(); - --ye; - } - - if (!xc[0]) { - - // n - n = +0 - y.s = 1; - - // Result must be zero. - xc = [ye = 0]; - } - - y.c = xc; - y.e = ye; - - return y; -}; - - -/* - * Return a new Big whose value is the value of this Big modulo the value of Big y. - */ -P.mod = function (y) { - var ygtx, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - if (!y.c[0]) throw Error(DIV_BY_ZERO); - - x.s = y.s = 1; - ygtx = y.cmp(x) == 1; - x.s = a; - y.s = b; - - if (ygtx) return new Big(x); - - a = Big.DP; - b = Big.RM; - Big.DP = Big.RM = 0; - x = x.div(y); - Big.DP = a; - Big.RM = b; - - return this.minus(x.times(y)); -}; - - -/* - * Return a new Big whose value is the value of this Big plus the value of Big y. - */ -P.plus = P.add = function (y) { - var t, - x = this, - Big = x.constructor, - a = x.s, - b = (y = new Big(y)).s; - - // Signs differ? - if (a != b) { - y.s = -b; - return x.minus(y); - } - - var xe = x.e, - xc = x.c, - ye = y.e, - yc = y.c; - - // Either zero? y is non-zero? x is non-zero? Or both are zero. - if (!xc[0] || !yc[0]) return yc[0] ? y : new Big(xc[0] ? x : a * 0); - - xc = xc.slice(); - - // Prepend zeros to equalise exponents. - // Note: reverse faster than unshifts. - if (a = xe - ye) { - if (a > 0) { - ye = xe; - t = yc; - } else { - a = -a; - t = xc; - } - - t.reverse(); - for (; a--;) t.push(0); - t.reverse(); - } - - // Point xc to the longer array. - if (xc.length - yc.length < 0) { - t = yc; - yc = xc; - xc = t; - } - - a = yc.length; - - // Only start adding at yc.length - 1 as the further digits of xc can be left as they are. - for (b = 0; a; xc[a] %= 10) b = (xc[--a] = xc[a] + yc[a] + b) / 10 | 0; - - // No need to check for zero, as +x + +y != 0 && -x + -y != 0 - - if (b) { - xc.unshift(b); - ++ye; - } - - // Remove trailing zeros. - for (a = xc.length; xc[--a] === 0;) xc.pop(); - - y.c = xc; - y.e = ye; - - return y; -}; - - -/* - * Return a Big whose value is the value of this Big raised to the power n. - * If n is negative, round to a maximum of Big.DP decimal places using rounding - * mode Big.RM. - * - * n {number} Integer, -MAX_POWER to MAX_POWER inclusive. - */ -P.pow = function (n) { - var x = this, - one = new x.constructor(1), - y = one, - isneg = n < 0; - - if (n !== ~~n || n < -MAX_POWER || n > MAX_POWER) throw Error(INVALID + 'exponent'); - if (isneg) n = -n; - - for (;;) { - if (n & 1) y = y.times(x); - n >>= 1; - if (!n) break; - x = x.times(x); - } - - return isneg ? one.div(y) : y; -}; - - -/* - * Return a new Big whose value is the value of this Big rounded using rounding mode rm - * to a maximum of dp decimal places, or, if dp is negative, to an integer which is a - * multiple of 10**-dp. - * If dp is not specified, round to 0 decimal places. - * If rm is not specified, use Big.RM. - * - * dp? {number} Integer, -MAX_DP to MAX_DP inclusive. - * rm? 0, 1, 2 or 3 (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_UP) - */ -P.round = function (dp, rm) { - var Big = this.constructor; - if (dp === UNDEFINED) dp = 0; - else if (dp !== ~~dp || dp < -MAX_DP || dp > MAX_DP) throw Error(INVALID_DP); - return round(new Big(this), dp, rm === UNDEFINED ? Big.RM : rm); -}; - - -/* - * Return a new Big whose value is the square root of the value of this Big, rounded, if - * necessary, to a maximum of Big.DP decimal places using rounding mode Big.RM. - */ -P.sqrt = function () { - var r, c, t, - x = this, - Big = x.constructor, - s = x.s, - e = x.e, - half = new Big(0.5); - - // Zero? - if (!x.c[0]) return new Big(x); - - // Negative? - if (s < 0) throw Error(NAME + 'No square root'); - - // Estimate. - s = Math.sqrt(x + ''); - - // Math.sqrt underflow/overflow? - // Re-estimate: pass x coefficient to Math.sqrt as integer, then adjust the result exponent. - if (s === 0 || s === 1 / 0) { - c = x.c.join(''); - if (!(c.length + e & 1)) c += '0'; - s = Math.sqrt(c); - e = ((e + 1) / 2 | 0) - (e < 0 || e & 1); - r = new Big((s == 1 / 0 ? '1e' : (s = s.toExponential()).slice(0, s.indexOf('e') + 1)) + e); - } else { - r = new Big(s); - } - - e = r.e + (Big.DP += 4); - - // Newton-Raphson iteration. - do { - t = r; - r = half.times(t.plus(x.div(t))); - } while (t.c.slice(0, e).join('') !== r.c.slice(0, e).join('')); - - return round(r, Big.DP -= 4, Big.RM); -}; - - -/* - * Return a new Big whose value is the value of this Big times the value of Big y. - */ -P.times = P.mul = function (y) { - var c, - x = this, - Big = x.constructor, - xc = x.c, - yc = (y = new Big(y)).c, - a = xc.length, - b = yc.length, - i = x.e, - j = y.e; - - // Determine sign of result. - y.s = x.s == y.s ? 1 : -1; - - // Return signed 0 if either 0. - if (!xc[0] || !yc[0]) return new Big(y.s * 0); - - // Initialise exponent of result as x.e + y.e. - y.e = i + j; - - // If array xc has fewer digits than yc, swap xc and yc, and lengths. - if (a < b) { - c = xc; - xc = yc; - yc = c; - j = a; - a = b; - b = j; - } - - // Initialise coefficient array of result with zeros. - for (c = new Array(j = a + b); j--;) c[j] = 0; - - // Multiply. - - // i is initially xc.length. - for (i = b; i--;) { - b = 0; - - // a is yc.length. - for (j = a + i; j > i;) { - - // Current sum of products at this digit position, plus carry. - b = c[j] + yc[i] * xc[j - i - 1] + b; - c[j--] = b % 10; - - // carry - b = b / 10 | 0; - } - - c[j] = (c[j] + b) % 10; - } - - // Increment result exponent if there is a final carry, otherwise remove leading zero. - if (b) ++y.e; - else c.shift(); - - // Remove trailing zeros. - for (i = c.length; !c[--i];) c.pop(); - y.c = c; - - return y; -}; - - -/* - * Return a string representing the value of this Big in exponential notation to dp fixed decimal - * places and rounded using Big.RM. - * - * dp? {number} Integer, 0 to MAX_DP inclusive. - */ -P.toExponential = function (dp) { - return stringify(this, 1, dp, dp); -}; - - -/* - * Return a string representing the value of this Big in normal notation to dp fixed decimal - * places and rounded using Big.RM. - * - * dp? {number} Integer, 0 to MAX_DP inclusive. - * - * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'. - * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'. - */ -P.toFixed = function (dp) { - return stringify(this, 2, dp, this.e + dp); -}; - - -/* - * Return a string representing the value of this Big rounded to sd significant digits using - * Big.RM. Use exponential notation if sd is less than the number of digits necessary to represent - * the integer part of the value in normal notation. - * - * sd {number} Integer, 1 to MAX_DP inclusive. - */ -P.toPrecision = function (sd) { - return stringify(this, 3, sd, sd - 1); -}; - - -/* - * Return a string representing the value of this Big. - * Return exponential notation if this Big has a positive exponent equal to or greater than - * Big.PE, or a negative exponent equal to or less than Big.NE. - * Omit the sign for negative zero. - */ -P.toString = function () { - return stringify(this); -}; - - -/* - * Return a string representing the value of this Big. - * Return exponential notation if this Big has a positive exponent equal to or greater than - * Big.PE, or a negative exponent equal to or less than Big.NE. - * Include the sign for negative zero. - */ -P.valueOf = P.toJSON = function () { - return stringify(this, 4); -}; - - -// Export - - -var Big = _Big_(); - -var big = /*#__PURE__*/Object.freeze({ - __proto__: null, - Big: Big, - 'default': Big -}); - -var require$$0 = /*@__PURE__*/getAugmentedNamespace(big); + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ + +var xxhash64_1; +var hasRequiredXxhash64; + +function requireXxhash64 () { + if (hasRequiredXxhash64) return xxhash64_1; + hasRequiredXxhash64 = 1; + + const create = requireWasmHash(); + + //#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1 + const xxhash64 = new WebAssembly.Module( + Buffer.from( + // 1173 bytes + "AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", + "base64" + ) + ); + //#endregion + + xxhash64_1 = create.bind(null, xxhash64, [], 32, 16); + return xxhash64_1; +} const baseEncodeTables = { - 26: 'abcdefghijklmnopqrstuvwxyz', - 32: '123456789abcdefghjkmnpqrstuvwxyz', // no 0lio - 36: '0123456789abcdefghijklmnopqrstuvwxyz', - 49: 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ', // no lIO - 52: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', - 58: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ', // no 0lIO - 62: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', - 64: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_', + 26: "abcdefghijklmnopqrstuvwxyz", + 32: "123456789abcdefghjkmnpqrstuvwxyz", // no 0lio + 36: "0123456789abcdefghijklmnopqrstuvwxyz", + 49: "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", // no lIO + 52: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + 58: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", // no 0lIO + 62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + 64: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_", }; -function encodeBufferToBase(buffer, base) { +/** + * @param {Uint32Array} uint32Array Treated as a long base-0x100000000 number, little endian + * @param {number} divisor The divisor + * @return {number} Modulo (remainder) of the division + */ +function divmod32(uint32Array, divisor) { + let carry = 0; + for (let i = uint32Array.length - 1; i >= 0; i--) { + const value = carry * 0x100000000 + uint32Array[i]; + carry = value % divisor; + uint32Array[i] = Math.floor(value / divisor); + } + return carry; +} + +function encodeBufferToBase(buffer, base, length) { const encodeTable = baseEncodeTables[base]; + if (!encodeTable) { - throw new Error('Unknown encoding base' + base); + throw new Error("Unknown encoding base" + base); } - const readLength = buffer.length; - const Big = require$$0; + // Input bits are only enough to generate this many characters + const limit = Math.ceil((buffer.length * 8) / Math.log2(base)); + length = Math.min(length, limit); - Big.RM = Big.DP = 0; - let b = new Big(0); + // Most of the crypto digests (if not all) has length a multiple of 4 bytes. + // Fewer numbers in the array means faster math. + const uint32Array = new Uint32Array(Math.ceil(buffer.length / 4)); - for (let i = readLength - 1; i >= 0; i--) { - b = b.times(256).plus(buffer[i]); + // Make sure the input buffer data is copied and is not mutated by reference. + // divmod32() would corrupt the BulkUpdateDecorator cache otherwise. + buffer.copy(Buffer.from(uint32Array.buffer)); + + let output = ""; + + for (let i = 0; i < length; i++) { + output = encodeTable[divmod32(uint32Array, base)] + output; } - let output = ''; - while (b.gt(0)) { - output = encodeTable[b.mod(base)] + output; - b = b.div(base); - } - - Big.DP = 20; - Big.RM = 1; - return output; } -function getHashDigest(buffer, hashType, digestType, maxLength) { - hashType = hashType || 'md5'; +let crypto = undefined; +let createXXHash64 = undefined; +let createMd4 = undefined; +let BatchedHash = undefined; +let BulkUpdateDecorator = undefined; + +function getHashDigest$1(buffer, algorithm, digestType, maxLength) { + algorithm = algorithm || "xxhash64"; maxLength = maxLength || 9999; - const hash = require('crypto').createHash(hashType); + let hash; + + if (algorithm === "xxhash64") { + if (createXXHash64 === undefined) { + createXXHash64 = requireXxhash64(); + + if (BatchedHash === undefined) { + BatchedHash = requireBatchedHash(); + } + } + + hash = new BatchedHash(createXXHash64()); + } else if (algorithm === "md4") { + if (createMd4 === undefined) { + createMd4 = requireMd4(); + + if (BatchedHash === undefined) { + BatchedHash = requireBatchedHash(); + } + } + + hash = new BatchedHash(createMd4()); + } else if (algorithm === "native-md4") { + if (typeof crypto === "undefined") { + crypto = require("crypto"); + + if (BulkUpdateDecorator === undefined) { + BulkUpdateDecorator = requireBulkUpdateDecorator(); + } + } + + hash = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4"); + } else { + if (typeof crypto === "undefined") { + crypto = require("crypto"); + + if (BulkUpdateDecorator === undefined) { + BulkUpdateDecorator = requireBulkUpdateDecorator(); + } + } + + hash = new BulkUpdateDecorator( + () => crypto.createHash(algorithm), + algorithm + ); + } hash.update(buffer); if ( - digestType === 'base26' || - digestType === 'base32' || - digestType === 'base36' || - digestType === 'base49' || - digestType === 'base52' || - digestType === 'base58' || - digestType === 'base62' || - digestType === 'base64' + digestType === "base26" || + digestType === "base32" || + digestType === "base36" || + digestType === "base49" || + digestType === "base52" || + digestType === "base58" || + digestType === "base62" ) { - return encodeBufferToBase(hash.digest(), digestType.substr(4)).substr( - 0, - maxLength - ); + return encodeBufferToBase(hash.digest(), digestType.substr(4), maxLength); } else { - return hash.digest(digestType || 'hex').substr(0, maxLength); + return hash.digest(digestType || "hex").substr(0, maxLength); } } -var getHashDigest_1 = getHashDigest; +var getHashDigest_1 = getHashDigest$1; -var emojisList = [ - "🀄️", - "🃏", - "🅰️", - "🅱️", - "🅾️", - "🅿️", - "🆎", - "🆑", - "🆒", - "🆓", - "🆔", - "🆕", - "🆖", - "🆗", - "🆘", - "🆙", - "🆚", - "🇦🇨", - "🇦🇩", - "🇦🇪", - "🇦🇫", - "🇦🇬", - "🇦🇮", - "🇦🇱", - "🇦🇲", - "🇦🇴", - "🇦🇶", - "🇦🇷", - "🇦🇸", - "🇦🇹", - "🇦🇺", - "🇦🇼", - "🇦🇽", - "🇦🇿", - "🇦", - "🇧🇦", - "🇧🇧", - "🇧🇩", - "🇧🇪", - "🇧🇫", - "🇧🇬", - "🇧🇭", - "🇧🇮", - "🇧🇯", - "🇧🇱", - "🇧🇲", - "🇧🇳", - "🇧🇴", - "🇧🇶", - "🇧🇷", - "🇧🇸", - "🇧🇹", - "🇧🇻", - "🇧🇼", - "🇧🇾", - "🇧🇿", - "🇧", - "🇨🇦", - "🇨🇨", - "🇨🇩", - "🇨🇫", - "🇨🇬", - "🇨🇭", - "🇨🇮", - "🇨🇰", - "🇨🇱", - "🇨🇲", - "🇨🇳", - "🇨🇴", - "🇨🇵", - "🇨🇷", - "🇨🇺", - "🇨🇻", - "🇨🇼", - "🇨🇽", - "🇨🇾", - "🇨🇿", - "🇨", - "🇩🇪", - "🇩🇬", - "🇩🇯", - "🇩🇰", - "🇩🇲", - "🇩🇴", - "🇩🇿", - "🇩", - "🇪🇦", - "🇪🇨", - "🇪🇪", - "🇪🇬", - "🇪🇭", - "🇪🇷", - "🇪🇸", - "🇪🇹", - "🇪🇺", - "🇪", - "🇫🇮", - "🇫🇯", - "🇫🇰", - "🇫🇲", - "🇫🇴", - "🇫🇷", - "🇫", - "🇬🇦", - "🇬🇧", - "🇬🇩", - "🇬🇪", - "🇬🇫", - "🇬🇬", - "🇬🇭", - "🇬🇮", - "🇬🇱", - "🇬🇲", - "🇬🇳", - "🇬🇵", - "🇬🇶", - "🇬🇷", - "🇬🇸", - "🇬🇹", - "🇬🇺", - "🇬🇼", - "🇬🇾", - "🇬", - "🇭🇰", - "🇭🇲", - "🇭🇳", - "🇭🇷", - "🇭🇹", - "🇭🇺", - "🇭", - "🇮🇨", - "🇮🇩", - "🇮🇪", - "🇮🇱", - "🇮🇲", - "🇮🇳", - "🇮🇴", - "🇮🇶", - "🇮🇷", - "🇮🇸", - "🇮🇹", - "🇮", - "🇯🇪", - "🇯🇲", - "🇯🇴", - "🇯🇵", - "🇯", - "🇰🇪", - "🇰🇬", - "🇰🇭", - "🇰🇮", - "🇰🇲", - "🇰🇳", - "🇰🇵", - "🇰🇷", - "🇰🇼", - "🇰🇾", - "🇰🇿", - "🇰", - "🇱🇦", - "🇱🇧", - "🇱🇨", - "🇱🇮", - "🇱🇰", - "🇱🇷", - "🇱🇸", - "🇱🇹", - "🇱🇺", - "🇱🇻", - "🇱🇾", - "🇱", - "🇲🇦", - "🇲🇨", - "🇲🇩", - "🇲🇪", - "🇲🇫", - "🇲🇬", - "🇲🇭", - "🇲🇰", - "🇲🇱", - "🇲🇲", - "🇲🇳", - "🇲🇴", - "🇲🇵", - "🇲🇶", - "🇲🇷", - "🇲🇸", - "🇲🇹", - "🇲🇺", - "🇲🇻", - "🇲🇼", - "🇲🇽", - "🇲🇾", - "🇲🇿", - "🇲", - "🇳🇦", - "🇳🇨", - "🇳🇪", - "🇳🇫", - "🇳🇬", - "🇳🇮", - "🇳🇱", - "🇳🇴", - "🇳🇵", - "🇳🇷", - "🇳🇺", - "🇳🇿", - "🇳", - "🇴🇲", - "🇴", - "🇵🇦", - "🇵🇪", - "🇵🇫", - "🇵🇬", - "🇵🇭", - "🇵🇰", - "🇵🇱", - "🇵🇲", - "🇵🇳", - "🇵🇷", - "🇵🇸", - "🇵🇹", - "🇵🇼", - "🇵🇾", - "🇵", - "🇶🇦", - "🇶", - "🇷🇪", - "🇷🇴", - "🇷🇸", - "🇷🇺", - "🇷🇼", - "🇷", - "🇸🇦", - "🇸🇧", - "🇸🇨", - "🇸🇩", - "🇸🇪", - "🇸🇬", - "🇸🇭", - "🇸🇮", - "🇸🇯", - "🇸🇰", - "🇸🇱", - "🇸🇲", - "🇸🇳", - "🇸🇴", - "🇸🇷", - "🇸🇸", - "🇸🇹", - "🇸🇻", - "🇸🇽", - "🇸🇾", - "🇸🇿", - "🇸", - "🇹🇦", - "🇹🇨", - "🇹🇩", - "🇹🇫", - "🇹🇬", - "🇹🇭", - "🇹🇯", - "🇹🇰", - "🇹🇱", - "🇹🇲", - "🇹🇳", - "🇹🇴", - "🇹🇷", - "🇹🇹", - "🇹🇻", - "🇹🇼", - "🇹🇿", - "🇹", - "🇺🇦", - "🇺🇬", - "🇺🇲", - "🇺🇳", - "🇺🇸", - "🇺🇾", - "🇺🇿", - "🇺", - "🇻🇦", - "🇻🇨", - "🇻🇪", - "🇻🇬", - "🇻🇮", - "🇻🇳", - "🇻🇺", - "🇻", - "🇼🇫", - "🇼🇸", - "🇼", - "🇽🇰", - "🇽", - "🇾🇪", - "🇾🇹", - "🇾", - "🇿🇦", - "🇿🇲", - "🇿🇼", - "🇿", - "🈁", - "🈂️", - "🈚️", - "🈯️", - "🈲", - "🈳", - "🈴", - "🈵", - "🈶", - "🈷️", - "🈸", - "🈹", - "🈺", - "🉐", - "🉑", - "🌀", - "🌁", - "🌂", - "🌃", - "🌄", - "🌅", - "🌆", - "🌇", - "🌈", - "🌉", - "🌊", - "🌋", - "🌌", - "🌍", - "🌎", - "🌏", - "🌐", - "🌑", - "🌒", - "🌓", - "🌔", - "🌕", - "🌖", - "🌗", - "🌘", - "🌙", - "🌚", - "🌛", - "🌜", - "🌝", - "🌞", - "🌟", - "🌠", - "🌡️", - "🌤️", - "🌥️", - "🌦️", - "🌧️", - "🌨️", - "🌩️", - "🌪️", - "🌫️", - "🌬️", - "🌭", - "🌮", - "🌯", - "🌰", - "🌱", - "🌲", - "🌳", - "🌴", - "🌵", - "🌶️", - "🌷", - "🌸", - "🌹", - "🌺", - "🌻", - "🌼", - "🌽", - "🌾", - "🌿", - "🍀", - "🍁", - "🍂", - "🍃", - "🍄", - "🍅", - "🍆", - "🍇", - "🍈", - "🍉", - "🍊", - "🍋", - "🍌", - "🍍", - "🍎", - "🍏", - "🍐", - "🍑", - "🍒", - "🍓", - "🍔", - "🍕", - "🍖", - "🍗", - "🍘", - "🍙", - "🍚", - "🍛", - "🍜", - "🍝", - "🍞", - "🍟", - "🍠", - "🍡", - "🍢", - "🍣", - "🍤", - "🍥", - "🍦", - "🍧", - "🍨", - "🍩", - "🍪", - "🍫", - "🍬", - "🍭", - "🍮", - "🍯", - "🍰", - "🍱", - "🍲", - "🍳", - "🍴", - "🍵", - "🍶", - "🍷", - "🍸", - "🍹", - "🍺", - "🍻", - "🍼", - "🍽️", - "🍾", - "🍿", - "🎀", - "🎁", - "🎂", - "🎃", - "🎄", - "🎅🏻", - "🎅🏼", - "🎅🏽", - "🎅🏾", - "🎅🏿", - "🎅", - "🎆", - "🎇", - "🎈", - "🎉", - "🎊", - "🎋", - "🎌", - "🎍", - "🎎", - "🎏", - "🎐", - "🎑", - "🎒", - "🎓", - "🎖️", - "🎗️", - "🎙️", - "🎚️", - "🎛️", - "🎞️", - "🎟️", - "🎠", - "🎡", - "🎢", - "🎣", - "🎤", - "🎥", - "🎦", - "🎧", - "🎨", - "🎩", - "🎪", - "🎫", - "🎬", - "🎭", - "🎮", - "🎯", - "🎰", - "🎱", - "🎲", - "🎳", - "🎴", - "🎵", - "🎶", - "🎷", - "🎸", - "🎹", - "🎺", - "🎻", - "🎼", - "🎽", - "🎾", - "🎿", - "🏀", - "🏁", - "🏂🏻", - "🏂🏼", - "🏂🏽", - "🏂🏾", - "🏂🏿", - "🏂", - "🏃🏻‍♀️", - "🏃🏻‍♂️", - "🏃🏻", - "🏃🏼‍♀️", - "🏃🏼‍♂️", - "🏃🏼", - "🏃🏽‍♀️", - "🏃🏽‍♂️", - "🏃🏽", - "🏃🏾‍♀️", - "🏃🏾‍♂️", - "🏃🏾", - "🏃🏿‍♀️", - "🏃🏿‍♂️", - "🏃🏿", - "🏃‍♀️", - "🏃‍♂️", - "🏃", - "🏄🏻‍♀️", - "🏄🏻‍♂️", - "🏄🏻", - "🏄🏼‍♀️", - "🏄🏼‍♂️", - "🏄🏼", - "🏄🏽‍♀️", - "🏄🏽‍♂️", - "🏄🏽", - "🏄🏾‍♀️", - "🏄🏾‍♂️", - "🏄🏾", - "🏄🏿‍♀️", - "🏄🏿‍♂️", - "🏄🏿", - "🏄‍♀️", - "🏄‍♂️", - "🏄", - "🏅", - "🏆", - "🏇🏻", - "🏇🏼", - "🏇🏽", - "🏇🏾", - "🏇🏿", - "🏇", - "🏈", - "🏉", - "🏊🏻‍♀️", - "🏊🏻‍♂️", - "🏊🏻", - "🏊🏼‍♀️", - "🏊🏼‍♂️", - "🏊🏼", - "🏊🏽‍♀️", - "🏊🏽‍♂️", - "🏊🏽", - "🏊🏾‍♀️", - "🏊🏾‍♂️", - "🏊🏾", - "🏊🏿‍♀️", - "🏊🏿‍♂️", - "🏊🏿", - "🏊‍♀️", - "🏊‍♂️", - "🏊", - "🏋🏻‍♀️", - "🏋🏻‍♂️", - "🏋🏻", - "🏋🏼‍♀️", - "🏋🏼‍♂️", - "🏋🏼", - "🏋🏽‍♀️", - "🏋🏽‍♂️", - "🏋🏽", - "🏋🏾‍♀️", - "🏋🏾‍♂️", - "🏋🏾", - "🏋🏿‍♀️", - "🏋🏿‍♂️", - "🏋🏿", - "🏋️‍♀️", - "🏋️‍♂️", - "🏋️", - "🏌🏻‍♀️", - "🏌🏻‍♂️", - "🏌🏻", - "🏌🏼‍♀️", - "🏌🏼‍♂️", - "🏌🏼", - "🏌🏽‍♀️", - "🏌🏽‍♂️", - "🏌🏽", - "🏌🏾‍♀️", - "🏌🏾‍♂️", - "🏌🏾", - "🏌🏿‍♀️", - "🏌🏿‍♂️", - "🏌🏿", - "🏌️‍♀️", - "🏌️‍♂️", - "🏌️", - "🏍️", - "🏎️", - "🏏", - "🏐", - "🏑", - "🏒", - "🏓", - "🏔️", - "🏕️", - "🏖️", - "🏗️", - "🏘️", - "🏙️", - "🏚️", - "🏛️", - "🏜️", - "🏝️", - "🏞️", - "🏟️", - "🏠", - "🏡", - "🏢", - "🏣", - "🏤", - "🏥", - "🏦", - "🏧", - "🏨", - "🏩", - "🏪", - "🏫", - "🏬", - "🏭", - "🏮", - "🏯", - "🏰", - "🏳️‍🌈", - "🏳️", - "🏴‍☠️", - "🏴󠁧󠁢󠁥󠁮󠁧󠁿", - "🏴󠁧󠁢󠁳󠁣󠁴󠁿", - "🏴󠁧󠁢󠁷󠁬󠁳󠁿", - "🏴", - "🏵️", - "🏷️", - "🏸", - "🏹", - "🏺", - "🏻", - "🏼", - "🏽", - "🏾", - "🏿", - "🐀", - "🐁", - "🐂", - "🐃", - "🐄", - "🐅", - "🐆", - "🐇", - "🐈", - "🐉", - "🐊", - "🐋", - "🐌", - "🐍", - "🐎", - "🐏", - "🐐", - "🐑", - "🐒", - "🐓", - "🐔", - "🐕‍🦺", - "🐕", - "🐖", - "🐗", - "🐘", - "🐙", - "🐚", - "🐛", - "🐜", - "🐝", - "🐞", - "🐟", - "🐠", - "🐡", - "🐢", - "🐣", - "🐤", - "🐥", - "🐦", - "🐧", - "🐨", - "🐩", - "🐪", - "🐫", - "🐬", - "🐭", - "🐮", - "🐯", - "🐰", - "🐱", - "🐲", - "🐳", - "🐴", - "🐵", - "🐶", - "🐷", - "🐸", - "🐹", - "🐺", - "🐻", - "🐼", - "🐽", - "🐾", - "🐿️", - "👀", - "👁‍🗨", - "👁️", - "👂🏻", - "👂🏼", - "👂🏽", - "👂🏾", - "👂🏿", - "👂", - "👃🏻", - "👃🏼", - "👃🏽", - "👃🏾", - "👃🏿", - "👃", - "👄", - "👅", - "👆🏻", - "👆🏼", - "👆🏽", - "👆🏾", - "👆🏿", - "👆", - "👇🏻", - "👇🏼", - "👇🏽", - "👇🏾", - "👇🏿", - "👇", - "👈🏻", - "👈🏼", - "👈🏽", - "👈🏾", - "👈🏿", - "👈", - "👉🏻", - "👉🏼", - "👉🏽", - "👉🏾", - "👉🏿", - "👉", - "👊🏻", - "👊🏼", - "👊🏽", - "👊🏾", - "👊🏿", - "👊", - "👋🏻", - "👋🏼", - "👋🏽", - "👋🏾", - "👋🏿", - "👋", - "👌🏻", - "👌🏼", - "👌🏽", - "👌🏾", - "👌🏿", - "👌", - "👍🏻", - "👍🏼", - "👍🏽", - "👍🏾", - "👍🏿", - "👍", - "👎🏻", - "👎🏼", - "👎🏽", - "👎🏾", - "👎🏿", - "👎", - "👏🏻", - "👏🏼", - "👏🏽", - "👏🏾", - "👏🏿", - "👏", - "👐🏻", - "👐🏼", - "👐🏽", - "👐🏾", - "👐🏿", - "👐", - "👑", - "👒", - "👓", - "👔", - "👕", - "👖", - "👗", - "👘", - "👙", - "👚", - "👛", - "👜", - "👝", - "👞", - "👟", - "👠", - "👡", - "👢", - "👣", - "👤", - "👥", - "👦🏻", - "👦🏼", - "👦🏽", - "👦🏾", - "👦🏿", - "👦", - "👧🏻", - "👧🏼", - "👧🏽", - "👧🏾", - "👧🏿", - "👧", - "👨🏻‍🌾", - "👨🏻‍🍳", - "👨🏻‍🎓", - "👨🏻‍🎤", - "👨🏻‍🎨", - "👨🏻‍🏫", - "👨🏻‍🏭", - "👨🏻‍💻", - "👨🏻‍💼", - "👨🏻‍🔧", - "👨🏻‍🔬", - "👨🏻‍🚀", - "👨🏻‍🚒", - "👨🏻‍🦯", - "👨🏻‍🦰", - "👨🏻‍🦱", - "👨🏻‍🦲", - "👨🏻‍🦳", - "👨🏻‍🦼", - "👨🏻‍🦽", - "👨🏻‍⚕️", - "👨🏻‍⚖️", - "👨🏻‍✈️", - "👨🏻", - "👨🏼‍🌾", - "👨🏼‍🍳", - "👨🏼‍🎓", - "👨🏼‍🎤", - "👨🏼‍🎨", - "👨🏼‍🏫", - "👨🏼‍🏭", - "👨🏼‍💻", - "👨🏼‍💼", - "👨🏼‍🔧", - "👨🏼‍🔬", - "👨🏼‍🚀", - "👨🏼‍🚒", - "👨🏼‍🤝‍👨🏻", - "👨🏼‍🦯", - "👨🏼‍🦰", - "👨🏼‍🦱", - "👨🏼‍🦲", - "👨🏼‍🦳", - "👨🏼‍🦼", - "👨🏼‍🦽", - "👨🏼‍⚕️", - "👨🏼‍⚖️", - "👨🏼‍✈️", - "👨🏼", - "👨🏽‍🌾", - "👨🏽‍🍳", - "👨🏽‍🎓", - "👨🏽‍🎤", - "👨🏽‍🎨", - "👨🏽‍🏫", - "👨🏽‍🏭", - "👨🏽‍💻", - "👨🏽‍💼", - "👨🏽‍🔧", - "👨🏽‍🔬", - "👨🏽‍🚀", - "👨🏽‍🚒", - "👨🏽‍🤝‍👨🏻", - "👨🏽‍🤝‍👨🏼", - "👨🏽‍🦯", - "👨🏽‍🦰", - "👨🏽‍🦱", - "👨🏽‍🦲", - "👨🏽‍🦳", - "👨🏽‍🦼", - "👨🏽‍🦽", - "👨🏽‍⚕️", - "👨🏽‍⚖️", - "👨🏽‍✈️", - "👨🏽", - "👨🏾‍🌾", - "👨🏾‍🍳", - "👨🏾‍🎓", - "👨🏾‍🎤", - "👨🏾‍🎨", - "👨🏾‍🏫", - "👨🏾‍🏭", - "👨🏾‍💻", - "👨🏾‍💼", - "👨🏾‍🔧", - "👨🏾‍🔬", - "👨🏾‍🚀", - "👨🏾‍🚒", - "👨🏾‍🤝‍👨🏻", - "👨🏾‍🤝‍👨🏼", - "👨🏾‍🤝‍👨🏽", - "👨🏾‍🦯", - "👨🏾‍🦰", - "👨🏾‍🦱", - "👨🏾‍🦲", - "👨🏾‍🦳", - "👨🏾‍🦼", - "👨🏾‍🦽", - "👨🏾‍⚕️", - "👨🏾‍⚖️", - "👨🏾‍✈️", - "👨🏾", - "👨🏿‍🌾", - "👨🏿‍🍳", - "👨🏿‍🎓", - "👨🏿‍🎤", - "👨🏿‍🎨", - "👨🏿‍🏫", - "👨🏿‍🏭", - "👨🏿‍💻", - "👨🏿‍💼", - "👨🏿‍🔧", - "👨🏿‍🔬", - "👨🏿‍🚀", - "👨🏿‍🚒", - "👨🏿‍🤝‍👨🏻", - "👨🏿‍🤝‍👨🏼", - "👨🏿‍🤝‍👨🏽", - "👨🏿‍🤝‍👨🏾", - "👨🏿‍🦯", - "👨🏿‍🦰", - "👨🏿‍🦱", - "👨🏿‍🦲", - "👨🏿‍🦳", - "👨🏿‍🦼", - "👨🏿‍🦽", - "👨🏿‍⚕️", - "👨🏿‍⚖️", - "👨🏿‍✈️", - "👨🏿", - "👨‍🌾", - "👨‍🍳", - "👨‍🎓", - "👨‍🎤", - "👨‍🎨", - "👨‍🏫", - "👨‍🏭", - "👨‍👦‍👦", - "👨‍👦", - "👨‍👧‍👦", - "👨‍👧‍👧", - "👨‍👧", - "👨‍👨‍👦‍👦", - "👨‍👨‍👦", - "👨‍👨‍👧‍👦", - "👨‍👨‍👧‍👧", - "👨‍👨‍👧", - "👨‍👩‍👦‍👦", - "👨‍👩‍👦", - "👨‍👩‍👧‍👦", - "👨‍👩‍👧‍👧", - "👨‍👩‍👧", - "👨‍💻", - "👨‍💼", - "👨‍🔧", - "👨‍🔬", - "👨‍🚀", - "👨‍🚒", - "👨‍🦯", - "👨‍🦰", - "👨‍🦱", - "👨‍🦲", - "👨‍🦳", - "👨‍🦼", - "👨‍🦽", - "👨‍⚕️", - "👨‍⚖️", - "👨‍✈️", - "👨‍❤️‍👨", - "👨‍❤️‍💋‍👨", - "👨", - "👩🏻‍🌾", - "👩🏻‍🍳", - "👩🏻‍🎓", - "👩🏻‍🎤", - "👩🏻‍🎨", - "👩🏻‍🏫", - "👩🏻‍🏭", - "👩🏻‍💻", - "👩🏻‍💼", - "👩🏻‍🔧", - "👩🏻‍🔬", - "👩🏻‍🚀", - "👩🏻‍🚒", - "👩🏻‍🤝‍👨🏼", - "👩🏻‍🤝‍👨🏽", - "👩🏻‍🤝‍👨🏾", - "👩🏻‍🤝‍👨🏿", - "👩🏻‍🦯", - "👩🏻‍🦰", - "👩🏻‍🦱", - "👩🏻‍🦲", - "👩🏻‍🦳", - "👩🏻‍🦼", - "👩🏻‍🦽", - "👩🏻‍⚕️", - "👩🏻‍⚖️", - "👩🏻‍✈️", - "👩🏻", - "👩🏼‍🌾", - "👩🏼‍🍳", - "👩🏼‍🎓", - "👩🏼‍🎤", - "👩🏼‍🎨", - "👩🏼‍🏫", - "👩🏼‍🏭", - "👩🏼‍💻", - "👩🏼‍💼", - "👩🏼‍🔧", - "👩🏼‍🔬", - "👩🏼‍🚀", - "👩🏼‍🚒", - "👩🏼‍🤝‍👨🏻", - "👩🏼‍🤝‍👨🏽", - "👩🏼‍🤝‍👨🏾", - "👩🏼‍🤝‍👨🏿", - "👩🏼‍🤝‍👩🏻", - "👩🏼‍🦯", - "👩🏼‍🦰", - "👩🏼‍🦱", - "👩🏼‍🦲", - "👩🏼‍🦳", - "👩🏼‍🦼", - "👩🏼‍🦽", - "👩🏼‍⚕️", - "👩🏼‍⚖️", - "👩🏼‍✈️", - "👩🏼", - "👩🏽‍🌾", - "👩🏽‍🍳", - "👩🏽‍🎓", - "👩🏽‍🎤", - "👩🏽‍🎨", - "👩🏽‍🏫", - "👩🏽‍🏭", - "👩🏽‍💻", - "👩🏽‍💼", - "👩🏽‍🔧", - "👩🏽‍🔬", - "👩🏽‍🚀", - "👩🏽‍🚒", - "👩🏽‍🤝‍👨🏻", - "👩🏽‍🤝‍👨🏼", - "👩🏽‍🤝‍👨🏾", - "👩🏽‍🤝‍👨🏿", - "👩🏽‍🤝‍👩🏻", - "👩🏽‍🤝‍👩🏼", - "👩🏽‍🦯", - "👩🏽‍🦰", - "👩🏽‍🦱", - "👩🏽‍🦲", - "👩🏽‍🦳", - "👩🏽‍🦼", - "👩🏽‍🦽", - "👩🏽‍⚕️", - "👩🏽‍⚖️", - "👩🏽‍✈️", - "👩🏽", - "👩🏾‍🌾", - "👩🏾‍🍳", - "👩🏾‍🎓", - "👩🏾‍🎤", - "👩🏾‍🎨", - "👩🏾‍🏫", - "👩🏾‍🏭", - "👩🏾‍💻", - "👩🏾‍💼", - "👩🏾‍🔧", - "👩🏾‍🔬", - "👩🏾‍🚀", - "👩🏾‍🚒", - "👩🏾‍🤝‍👨🏻", - "👩🏾‍🤝‍👨🏼", - "👩🏾‍🤝‍👨🏽", - "👩🏾‍🤝‍👨🏿", - "👩🏾‍🤝‍👩🏻", - "👩🏾‍🤝‍👩🏼", - "👩🏾‍🤝‍👩🏽", - "👩🏾‍🦯", - "👩🏾‍🦰", - "👩🏾‍🦱", - "👩🏾‍🦲", - "👩🏾‍🦳", - "👩🏾‍🦼", - "👩🏾‍🦽", - "👩🏾‍⚕️", - "👩🏾‍⚖️", - "👩🏾‍✈️", - "👩🏾", - "👩🏿‍🌾", - "👩🏿‍🍳", - "👩🏿‍🎓", - "👩🏿‍🎤", - "👩🏿‍🎨", - "👩🏿‍🏫", - "👩🏿‍🏭", - "👩🏿‍💻", - "👩🏿‍💼", - "👩🏿‍🔧", - "👩🏿‍🔬", - "👩🏿‍🚀", - "👩🏿‍🚒", - "👩🏿‍🤝‍👨🏻", - "👩🏿‍🤝‍👨🏼", - "👩🏿‍🤝‍👨🏽", - "👩🏿‍🤝‍👨🏾", - "👩🏿‍🤝‍👩🏻", - "👩🏿‍🤝‍👩🏼", - "👩🏿‍🤝‍👩🏽", - "👩🏿‍🤝‍👩🏾", - "👩🏿‍🦯", - "👩🏿‍🦰", - "👩🏿‍🦱", - "👩🏿‍🦲", - "👩🏿‍🦳", - "👩🏿‍🦼", - "👩🏿‍🦽", - "👩🏿‍⚕️", - "👩🏿‍⚖️", - "👩🏿‍✈️", - "👩🏿", - "👩‍🌾", - "👩‍🍳", - "👩‍🎓", - "👩‍🎤", - "👩‍🎨", - "👩‍🏫", - "👩‍🏭", - "👩‍👦‍👦", - "👩‍👦", - "👩‍👧‍👦", - "👩‍👧‍👧", - "👩‍👧", - "👩‍👩‍👦‍👦", - "👩‍👩‍👦", - "👩‍👩‍👧‍👦", - "👩‍👩‍👧‍👧", - "👩‍👩‍👧", - "👩‍💻", - "👩‍💼", - "👩‍🔧", - "👩‍🔬", - "👩‍🚀", - "👩‍🚒", - "👩‍🦯", - "👩‍🦰", - "👩‍🦱", - "👩‍🦲", - "👩‍🦳", - "👩‍🦼", - "👩‍🦽", - "👩‍⚕️", - "👩‍⚖️", - "👩‍✈️", - "👩‍❤️‍👨", - "👩‍❤️‍👩", - "👩‍❤️‍💋‍👨", - "👩‍❤️‍💋‍👩", - "👩", - "👪", - "👫🏻", - "👫🏼", - "👫🏽", - "👫🏾", - "👫🏿", - "👫", - "👬🏻", - "👬🏼", - "👬🏽", - "👬🏾", - "👬🏿", - "👬", - "👭🏻", - "👭🏼", - "👭🏽", - "👭🏾", - "👭🏿", - "👭", - "👮🏻‍♀️", - "👮🏻‍♂️", - "👮🏻", - "👮🏼‍♀️", - "👮🏼‍♂️", - "👮🏼", - "👮🏽‍♀️", - "👮🏽‍♂️", - "👮🏽", - "👮🏾‍♀️", - "👮🏾‍♂️", - "👮🏾", - "👮🏿‍♀️", - "👮🏿‍♂️", - "👮🏿", - "👮‍♀️", - "👮‍♂️", - "👮", - "👯‍♀️", - "👯‍♂️", - "👯", - "👰🏻", - "👰🏼", - "👰🏽", - "👰🏾", - "👰🏿", - "👰", - "👱🏻‍♀️", - "👱🏻‍♂️", - "👱🏻", - "👱🏼‍♀️", - "👱🏼‍♂️", - "👱🏼", - "👱🏽‍♀️", - "👱🏽‍♂️", - "👱🏽", - "👱🏾‍♀️", - "👱🏾‍♂️", - "👱🏾", - "👱🏿‍♀️", - "👱🏿‍♂️", - "👱🏿", - "👱‍♀️", - "👱‍♂️", - "👱", - "👲🏻", - "👲🏼", - "👲🏽", - "👲🏾", - "👲🏿", - "👲", - "👳🏻‍♀️", - "👳🏻‍♂️", - "👳🏻", - "👳🏼‍♀️", - "👳🏼‍♂️", - "👳🏼", - "👳🏽‍♀️", - "👳🏽‍♂️", - "👳🏽", - "👳🏾‍♀️", - "👳🏾‍♂️", - "👳🏾", - "👳🏿‍♀️", - "👳🏿‍♂️", - "👳🏿", - "👳‍♀️", - "👳‍♂️", - "👳", - "👴🏻", - "👴🏼", - "👴🏽", - "👴🏾", - "👴🏿", - "👴", - "👵🏻", - "👵🏼", - "👵🏽", - "👵🏾", - "👵🏿", - "👵", - "👶🏻", - "👶🏼", - "👶🏽", - "👶🏾", - "👶🏿", - "👶", - "👷🏻‍♀️", - "👷🏻‍♂️", - "👷🏻", - "👷🏼‍♀️", - "👷🏼‍♂️", - "👷🏼", - "👷🏽‍♀️", - "👷🏽‍♂️", - "👷🏽", - "👷🏾‍♀️", - "👷🏾‍♂️", - "👷🏾", - "👷🏿‍♀️", - "👷🏿‍♂️", - "👷🏿", - "👷‍♀️", - "👷‍♂️", - "👷", - "👸🏻", - "👸🏼", - "👸🏽", - "👸🏾", - "👸🏿", - "👸", - "👹", - "👺", - "👻", - "👼🏻", - "👼🏼", - "👼🏽", - "👼🏾", - "👼🏿", - "👼", - "👽", - "👾", - "👿", - "💀", - "💁🏻‍♀️", - "💁🏻‍♂️", - "💁🏻", - "💁🏼‍♀️", - "💁🏼‍♂️", - "💁🏼", - "💁🏽‍♀️", - "💁🏽‍♂️", - "💁🏽", - "💁🏾‍♀️", - "💁🏾‍♂️", - "💁🏾", - "💁🏿‍♀️", - "💁🏿‍♂️", - "💁🏿", - "💁‍♀️", - "💁‍♂️", - "💁", - "💂🏻‍♀️", - "💂🏻‍♂️", - "💂🏻", - "💂🏼‍♀️", - "💂🏼‍♂️", - "💂🏼", - "💂🏽‍♀️", - "💂🏽‍♂️", - "💂🏽", - "💂🏾‍♀️", - "💂🏾‍♂️", - "💂🏾", - "💂🏿‍♀️", - "💂🏿‍♂️", - "💂🏿", - "💂‍♀️", - "💂‍♂️", - "💂", - "💃🏻", - "💃🏼", - "💃🏽", - "💃🏾", - "💃🏿", - "💃", - "💄", - "💅🏻", - "💅🏼", - "💅🏽", - "💅🏾", - "💅🏿", - "💅", - "💆🏻‍♀️", - "💆🏻‍♂️", - "💆🏻", - "💆🏼‍♀️", - "💆🏼‍♂️", - "💆🏼", - "💆🏽‍♀️", - "💆🏽‍♂️", - "💆🏽", - "💆🏾‍♀️", - "💆🏾‍♂️", - "💆🏾", - "💆🏿‍♀️", - "💆🏿‍♂️", - "💆🏿", - "💆‍♀️", - "💆‍♂️", - "💆", - "💇🏻‍♀️", - "💇🏻‍♂️", - "💇🏻", - "💇🏼‍♀️", - "💇🏼‍♂️", - "💇🏼", - "💇🏽‍♀️", - "💇🏽‍♂️", - "💇🏽", - "💇🏾‍♀️", - "💇🏾‍♂️", - "💇🏾", - "💇🏿‍♀️", - "💇🏿‍♂️", - "💇🏿", - "💇‍♀️", - "💇‍♂️", - "💇", - "💈", - "💉", - "💊", - "💋", - "💌", - "💍", - "💎", - "💏", - "💐", - "💑", - "💒", - "💓", - "💔", - "💕", - "💖", - "💗", - "💘", - "💙", - "💚", - "💛", - "💜", - "💝", - "💞", - "💟", - "💠", - "💡", - "💢", - "💣", - "💤", - "💥", - "💦", - "💧", - "💨", - "💩", - "💪🏻", - "💪🏼", - "💪🏽", - "💪🏾", - "💪🏿", - "💪", - "💫", - "💬", - "💭", - "💮", - "💯", - "💰", - "💱", - "💲", - "💳", - "💴", - "💵", - "💶", - "💷", - "💸", - "💹", - "💺", - "💻", - "💼", - "💽", - "💾", - "💿", - "📀", - "📁", - "📂", - "📃", - "📄", - "📅", - "📆", - "📇", - "📈", - "📉", - "📊", - "📋", - "📌", - "📍", - "📎", - "📏", - "📐", - "📑", - "📒", - "📓", - "📔", - "📕", - "📖", - "📗", - "📘", - "📙", - "📚", - "📛", - "📜", - "📝", - "📞", - "📟", - "📠", - "📡", - "📢", - "📣", - "📤", - "📥", - "📦", - "📧", - "📨", - "📩", - "📪", - "📫", - "📬", - "📭", - "📮", - "📯", - "📰", - "📱", - "📲", - "📳", - "📴", - "📵", - "📶", - "📷", - "📸", - "📹", - "📺", - "📻", - "📼", - "📽️", - "📿", - "🔀", - "🔁", - "🔂", - "🔃", - "🔄", - "🔅", - "🔆", - "🔇", - "🔈", - "🔉", - "🔊", - "🔋", - "🔌", - "🔍", - "🔎", - "🔏", - "🔐", - "🔑", - "🔒", - "🔓", - "🔔", - "🔕", - "🔖", - "🔗", - "🔘", - "🔙", - "🔚", - "🔛", - "🔜", - "🔝", - "🔞", - "🔟", - "🔠", - "🔡", - "🔢", - "🔣", - "🔤", - "🔥", - "🔦", - "🔧", - "🔨", - "🔩", - "🔪", - "🔫", - "🔬", - "🔭", - "🔮", - "🔯", - "🔰", - "🔱", - "🔲", - "🔳", - "🔴", - "🔵", - "🔶", - "🔷", - "🔸", - "🔹", - "🔺", - "🔻", - "🔼", - "🔽", - "🕉️", - "🕊️", - "🕋", - "🕌", - "🕍", - "🕎", - "🕐", - "🕑", - "🕒", - "🕓", - "🕔", - "🕕", - "🕖", - "🕗", - "🕘", - "🕙", - "🕚", - "🕛", - "🕜", - "🕝", - "🕞", - "🕟", - "🕠", - "🕡", - "🕢", - "🕣", - "🕤", - "🕥", - "🕦", - "🕧", - "🕯️", - "🕰️", - "🕳️", - "🕴🏻‍♀️", - "🕴🏻‍♂️", - "🕴🏻", - "🕴🏼‍♀️", - "🕴🏼‍♂️", - "🕴🏼", - "🕴🏽‍♀️", - "🕴🏽‍♂️", - "🕴🏽", - "🕴🏾‍♀️", - "🕴🏾‍♂️", - "🕴🏾", - "🕴🏿‍♀️", - "🕴🏿‍♂️", - "🕴🏿", - "🕴️‍♀️", - "🕴️‍♂️", - "🕴️", - "🕵🏻‍♀️", - "🕵🏻‍♂️", - "🕵🏻", - "🕵🏼‍♀️", - "🕵🏼‍♂️", - "🕵🏼", - "🕵🏽‍♀️", - "🕵🏽‍♂️", - "🕵🏽", - "🕵🏾‍♀️", - "🕵🏾‍♂️", - "🕵🏾", - "🕵🏿‍♀️", - "🕵🏿‍♂️", - "🕵🏿", - "🕵️‍♀️", - "🕵️‍♂️", - "🕵️", - "🕶️", - "🕷️", - "🕸️", - "🕹️", - "🕺🏻", - "🕺🏼", - "🕺🏽", - "🕺🏾", - "🕺🏿", - "🕺", - "🖇️", - "🖊️", - "🖋️", - "🖌️", - "🖍️", - "🖐🏻", - "🖐🏼", - "🖐🏽", - "🖐🏾", - "🖐🏿", - "🖐️", - "🖕🏻", - "🖕🏼", - "🖕🏽", - "🖕🏾", - "🖕🏿", - "🖕", - "🖖🏻", - "🖖🏼", - "🖖🏽", - "🖖🏾", - "🖖🏿", - "🖖", - "🖤", - "🖥️", - "🖨️", - "🖱️", - "🖲️", - "🖼️", - "🗂️", - "🗃️", - "🗄️", - "🗑️", - "🗒️", - "🗓️", - "🗜️", - "🗝️", - "🗞️", - "🗡️", - "🗣️", - "🗨️", - "🗯️", - "🗳️", - "🗺️", - "🗻", - "🗼", - "🗽", - "🗾", - "🗿", - "😀", - "😁", - "😂", - "😃", - "😄", - "😅", - "😆", - "😇", - "😈", - "😉", - "😊", - "😋", - "😌", - "😍", - "😎", - "😏", - "😐", - "😑", - "😒", - "😓", - "😔", - "😕", - "😖", - "😗", - "😘", - "😙", - "😚", - "😛", - "😜", - "😝", - "😞", - "😟", - "😠", - "😡", - "😢", - "😣", - "😤", - "😥", - "😦", - "😧", - "😨", - "😩", - "😪", - "😫", - "😬", - "😭", - "😮", - "😯", - "😰", - "😱", - "😲", - "😳", - "😴", - "😵", - "😶", - "😷", - "😸", - "😹", - "😺", - "😻", - "😼", - "😽", - "😾", - "😿", - "🙀", - "🙁", - "🙂", - "🙃", - "🙄", - "🙅🏻‍♀️", - "🙅🏻‍♂️", - "🙅🏻", - "🙅🏼‍♀️", - "🙅🏼‍♂️", - "🙅🏼", - "🙅🏽‍♀️", - "🙅🏽‍♂️", - "🙅🏽", - "🙅🏾‍♀️", - "🙅🏾‍♂️", - "🙅🏾", - "🙅🏿‍♀️", - "🙅🏿‍♂️", - "🙅🏿", - "🙅‍♀️", - "🙅‍♂️", - "🙅", - "🙆🏻‍♀️", - "🙆🏻‍♂️", - "🙆🏻", - "🙆🏼‍♀️", - "🙆🏼‍♂️", - "🙆🏼", - "🙆🏽‍♀️", - "🙆🏽‍♂️", - "🙆🏽", - "🙆🏾‍♀️", - "🙆🏾‍♂️", - "🙆🏾", - "🙆🏿‍♀️", - "🙆🏿‍♂️", - "🙆🏿", - "🙆‍♀️", - "🙆‍♂️", - "🙆", - "🙇🏻‍♀️", - "🙇🏻‍♂️", - "🙇🏻", - "🙇🏼‍♀️", - "🙇🏼‍♂️", - "🙇🏼", - "🙇🏽‍♀️", - "🙇🏽‍♂️", - "🙇🏽", - "🙇🏾‍♀️", - "🙇🏾‍♂️", - "🙇🏾", - "🙇🏿‍♀️", - "🙇🏿‍♂️", - "🙇🏿", - "🙇‍♀️", - "🙇‍♂️", - "🙇", - "🙈", - "🙉", - "🙊", - "🙋🏻‍♀️", - "🙋🏻‍♂️", - "🙋🏻", - "🙋🏼‍♀️", - "🙋🏼‍♂️", - "🙋🏼", - "🙋🏽‍♀️", - "🙋🏽‍♂️", - "🙋🏽", - "🙋🏾‍♀️", - "🙋🏾‍♂️", - "🙋🏾", - "🙋🏿‍♀️", - "🙋🏿‍♂️", - "🙋🏿", - "🙋‍♀️", - "🙋‍♂️", - "🙋", - "🙌🏻", - "🙌🏼", - "🙌🏽", - "🙌🏾", - "🙌🏿", - "🙌", - "🙍🏻‍♀️", - "🙍🏻‍♂️", - "🙍🏻", - "🙍🏼‍♀️", - "🙍🏼‍♂️", - "🙍🏼", - "🙍🏽‍♀️", - "🙍🏽‍♂️", - "🙍🏽", - "🙍🏾‍♀️", - "🙍🏾‍♂️", - "🙍🏾", - "🙍🏿‍♀️", - "🙍🏿‍♂️", - "🙍🏿", - "🙍‍♀️", - "🙍‍♂️", - "🙍", - "🙎🏻‍♀️", - "🙎🏻‍♂️", - "🙎🏻", - "🙎🏼‍♀️", - "🙎🏼‍♂️", - "🙎🏼", - "🙎🏽‍♀️", - "🙎🏽‍♂️", - "🙎🏽", - "🙎🏾‍♀️", - "🙎🏾‍♂️", - "🙎🏾", - "🙎🏿‍♀️", - "🙎🏿‍♂️", - "🙎🏿", - "🙎‍♀️", - "🙎‍♂️", - "🙎", - "🙏🏻", - "🙏🏼", - "🙏🏽", - "🙏🏾", - "🙏🏿", - "🙏", - "🚀", - "🚁", - "🚂", - "🚃", - "🚄", - "🚅", - "🚆", - "🚇", - "🚈", - "🚉", - "🚊", - "🚋", - "🚌", - "🚍", - "🚎", - "🚏", - "🚐", - "🚑", - "🚒", - "🚓", - "🚔", - "🚕", - "🚖", - "🚗", - "🚘", - "🚙", - "🚚", - "🚛", - "🚜", - "🚝", - "🚞", - "🚟", - "🚠", - "🚡", - "🚢", - "🚣🏻‍♀️", - "🚣🏻‍♂️", - "🚣🏻", - "🚣🏼‍♀️", - "🚣🏼‍♂️", - "🚣🏼", - "🚣🏽‍♀️", - "🚣🏽‍♂️", - "🚣🏽", - "🚣🏾‍♀️", - "🚣🏾‍♂️", - "🚣🏾", - "🚣🏿‍♀️", - "🚣🏿‍♂️", - "🚣🏿", - "🚣‍♀️", - "🚣‍♂️", - "🚣", - "🚤", - "🚥", - "🚦", - "🚧", - "🚨", - "🚩", - "🚪", - "🚫", - "🚬", - "🚭", - "🚮", - "🚯", - "🚰", - "🚱", - "🚲", - "🚳", - "🚴🏻‍♀️", - "🚴🏻‍♂️", - "🚴🏻", - "🚴🏼‍♀️", - "🚴🏼‍♂️", - "🚴🏼", - "🚴🏽‍♀️", - "🚴🏽‍♂️", - "🚴🏽", - "🚴🏾‍♀️", - "🚴🏾‍♂️", - "🚴🏾", - "🚴🏿‍♀️", - "🚴🏿‍♂️", - "🚴🏿", - "🚴‍♀️", - "🚴‍♂️", - "🚴", - "🚵🏻‍♀️", - "🚵🏻‍♂️", - "🚵🏻", - "🚵🏼‍♀️", - "🚵🏼‍♂️", - "🚵🏼", - "🚵🏽‍♀️", - "🚵🏽‍♂️", - "🚵🏽", - "🚵🏾‍♀️", - "🚵🏾‍♂️", - "🚵🏾", - "🚵🏿‍♀️", - "🚵🏿‍♂️", - "🚵🏿", - "🚵‍♀️", - "🚵‍♂️", - "🚵", - "🚶🏻‍♀️", - "🚶🏻‍♂️", - "🚶🏻", - "🚶🏼‍♀️", - "🚶🏼‍♂️", - "🚶🏼", - "🚶🏽‍♀️", - "🚶🏽‍♂️", - "🚶🏽", - "🚶🏾‍♀️", - "🚶🏾‍♂️", - "🚶🏾", - "🚶🏿‍♀️", - "🚶🏿‍♂️", - "🚶🏿", - "🚶‍♀️", - "🚶‍♂️", - "🚶", - "🚷", - "🚸", - "🚹", - "🚺", - "🚻", - "🚼", - "🚽", - "🚾", - "🚿", - "🛀🏻", - "🛀🏼", - "🛀🏽", - "🛀🏾", - "🛀🏿", - "🛀", - "🛁", - "🛂", - "🛃", - "🛄", - "🛅", - "🛋️", - "🛌🏻", - "🛌🏼", - "🛌🏽", - "🛌🏾", - "🛌🏿", - "🛌", - "🛍️", - "🛎️", - "🛏️", - "🛐", - "🛑", - "🛒", - "🛕", - "🛠️", - "🛡️", - "🛢️", - "🛣️", - "🛤️", - "🛥️", - "🛩️", - "🛫", - "🛬", - "🛰️", - "🛳️", - "🛴", - "🛵", - "🛶", - "🛷", - "🛸", - "🛹", - "🛺", - "🟠", - "🟡", - "🟢", - "🟣", - "🟤", - "🟥", - "🟦", - "🟧", - "🟨", - "🟩", - "🟪", - "🟫", - "🤍", - "🤎", - "🤏🏻", - "🤏🏼", - "🤏🏽", - "🤏🏾", - "🤏🏿", - "🤏", - "🤐", - "🤑", - "🤒", - "🤓", - "🤔", - "🤕", - "🤖", - "🤗", - "🤘🏻", - "🤘🏼", - "🤘🏽", - "🤘🏾", - "🤘🏿", - "🤘", - "🤙🏻", - "🤙🏼", - "🤙🏽", - "🤙🏾", - "🤙🏿", - "🤙", - "🤚🏻", - "🤚🏼", - "🤚🏽", - "🤚🏾", - "🤚🏿", - "🤚", - "🤛🏻", - "🤛🏼", - "🤛🏽", - "🤛🏾", - "🤛🏿", - "🤛", - "🤜🏻", - "🤜🏼", - "🤜🏽", - "🤜🏾", - "🤜🏿", - "🤜", - "🤝", - "🤞🏻", - "🤞🏼", - "🤞🏽", - "🤞🏾", - "🤞🏿", - "🤞", - "🤟🏻", - "🤟🏼", - "🤟🏽", - "🤟🏾", - "🤟🏿", - "🤟", - "🤠", - "🤡", - "🤢", - "🤣", - "🤤", - "🤥", - "🤦🏻‍♀️", - "🤦🏻‍♂️", - "🤦🏻", - "🤦🏼‍♀️", - "🤦🏼‍♂️", - "🤦🏼", - "🤦🏽‍♀️", - "🤦🏽‍♂️", - "🤦🏽", - "🤦🏾‍♀️", - "🤦🏾‍♂️", - "🤦🏾", - "🤦🏿‍♀️", - "🤦🏿‍♂️", - "🤦🏿", - "🤦‍♀️", - "🤦‍♂️", - "🤦", - "🤧", - "🤨", - "🤩", - "🤪", - "🤫", - "🤬", - "🤭", - "🤮", - "🤯", - "🤰🏻", - "🤰🏼", - "🤰🏽", - "🤰🏾", - "🤰🏿", - "🤰", - "🤱🏻", - "🤱🏼", - "🤱🏽", - "🤱🏾", - "🤱🏿", - "🤱", - "🤲🏻", - "🤲🏼", - "🤲🏽", - "🤲🏾", - "🤲🏿", - "🤲", - "🤳🏻", - "🤳🏼", - "🤳🏽", - "🤳🏾", - "🤳🏿", - "🤳", - "🤴🏻", - "🤴🏼", - "🤴🏽", - "🤴🏾", - "🤴🏿", - "🤴", - "🤵🏻‍♀️", - "🤵🏻‍♂️", - "🤵🏻", - "🤵🏼‍♀️", - "🤵🏼‍♂️", - "🤵🏼", - "🤵🏽‍♀️", - "🤵🏽‍♂️", - "🤵🏽", - "🤵🏾‍♀️", - "🤵🏾‍♂️", - "🤵🏾", - "🤵🏿‍♀️", - "🤵🏿‍♂️", - "🤵🏿", - "🤵‍♀️", - "🤵‍♂️", - "🤵", - "🤶🏻", - "🤶🏼", - "🤶🏽", - "🤶🏾", - "🤶🏿", - "🤶", - "🤷🏻‍♀️", - "🤷🏻‍♂️", - "🤷🏻", - "🤷🏼‍♀️", - "🤷🏼‍♂️", - "🤷🏼", - "🤷🏽‍♀️", - "🤷🏽‍♂️", - "🤷🏽", - "🤷🏾‍♀️", - "🤷🏾‍♂️", - "🤷🏾", - "🤷🏿‍♀️", - "🤷🏿‍♂️", - "🤷🏿", - "🤷‍♀️", - "🤷‍♂️", - "🤷", - "🤸🏻‍♀️", - "🤸🏻‍♂️", - "🤸🏻", - "🤸🏼‍♀️", - "🤸🏼‍♂️", - "🤸🏼", - "🤸🏽‍♀️", - "🤸🏽‍♂️", - "🤸🏽", - "🤸🏾‍♀️", - "🤸🏾‍♂️", - "🤸🏾", - "🤸🏿‍♀️", - "🤸🏿‍♂️", - "🤸🏿", - "🤸‍♀️", - "🤸‍♂️", - "🤸", - "🤹🏻‍♀️", - "🤹🏻‍♂️", - "🤹🏻", - "🤹🏼‍♀️", - "🤹🏼‍♂️", - "🤹🏼", - "🤹🏽‍♀️", - "🤹🏽‍♂️", - "🤹🏽", - "🤹🏾‍♀️", - "🤹🏾‍♂️", - "🤹🏾", - "🤹🏿‍♀️", - "🤹🏿‍♂️", - "🤹🏿", - "🤹‍♀️", - "🤹‍♂️", - "🤹", - "🤺", - "🤼‍♀️", - "🤼‍♂️", - "🤼", - "🤽🏻‍♀️", - "🤽🏻‍♂️", - "🤽🏻", - "🤽🏼‍♀️", - "🤽🏼‍♂️", - "🤽🏼", - "🤽🏽‍♀️", - "🤽🏽‍♂️", - "🤽🏽", - "🤽🏾‍♀️", - "🤽🏾‍♂️", - "🤽🏾", - "🤽🏿‍♀️", - "🤽🏿‍♂️", - "🤽🏿", - "🤽‍♀️", - "🤽‍♂️", - "🤽", - "🤾🏻‍♀️", - "🤾🏻‍♂️", - "🤾🏻", - "🤾🏼‍♀️", - "🤾🏼‍♂️", - "🤾🏼", - "🤾🏽‍♀️", - "🤾🏽‍♂️", - "🤾🏽", - "🤾🏾‍♀️", - "🤾🏾‍♂️", - "🤾🏾", - "🤾🏿‍♀️", - "🤾🏿‍♂️", - "🤾🏿", - "🤾‍♀️", - "🤾‍♂️", - "🤾", - "🤿", - "🥀", - "🥁", - "🥂", - "🥃", - "🥄", - "🥅", - "🥇", - "🥈", - "🥉", - "🥊", - "🥋", - "🥌", - "🥍", - "🥎", - "🥏", - "🥐", - "🥑", - "🥒", - "🥓", - "🥔", - "🥕", - "🥖", - "🥗", - "🥘", - "🥙", - "🥚", - "🥛", - "🥜", - "🥝", - "🥞", - "🥟", - "🥠", - "🥡", - "🥢", - "🥣", - "🥤", - "🥥", - "🥦", - "🥧", - "🥨", - "🥩", - "🥪", - "🥫", - "🥬", - "🥭", - "🥮", - "🥯", - "🥰", - "🥱", - "🥳", - "🥴", - "🥵", - "🥶", - "🥺", - "🥻", - "🥼", - "🥽", - "🥾", - "🥿", - "🦀", - "🦁", - "🦂", - "🦃", - "🦄", - "🦅", - "🦆", - "🦇", - "🦈", - "🦉", - "🦊", - "🦋", - "🦌", - "🦍", - "🦎", - "🦏", - "🦐", - "🦑", - "🦒", - "🦓", - "🦔", - "🦕", - "🦖", - "🦗", - "🦘", - "🦙", - "🦚", - "🦛", - "🦜", - "🦝", - "🦞", - "🦟", - "🦠", - "🦡", - "🦢", - "🦥", - "🦦", - "🦧", - "🦨", - "🦩", - "🦪", - "🦮", - "🦯", - "🦰", - "🦱", - "🦲", - "🦳", - "🦴", - "🦵🏻", - "🦵🏼", - "🦵🏽", - "🦵🏾", - "🦵🏿", - "🦵", - "🦶🏻", - "🦶🏼", - "🦶🏽", - "🦶🏾", - "🦶🏿", - "🦶", - "🦷", - "🦸🏻‍♀️", - "🦸🏻‍♂️", - "🦸🏻", - "🦸🏼‍♀️", - "🦸🏼‍♂️", - "🦸🏼", - "🦸🏽‍♀️", - "🦸🏽‍♂️", - "🦸🏽", - "🦸🏾‍♀️", - "🦸🏾‍♂️", - "🦸🏾", - "🦸🏿‍♀️", - "🦸🏿‍♂️", - "🦸🏿", - "🦸‍♀️", - "🦸‍♂️", - "🦸", - "🦹🏻‍♀️", - "🦹🏻‍♂️", - "🦹🏻", - "🦹🏼‍♀️", - "🦹🏼‍♂️", - "🦹🏼", - "🦹🏽‍♀️", - "🦹🏽‍♂️", - "🦹🏽", - "🦹🏾‍♀️", - "🦹🏾‍♂️", - "🦹🏾", - "🦹🏿‍♀️", - "🦹🏿‍♂️", - "🦹🏿", - "🦹‍♀️", - "🦹‍♂️", - "🦹", - "🦺", - "🦻🏻", - "🦻🏼", - "🦻🏽", - "🦻🏾", - "🦻🏿", - "🦻", - "🦼", - "🦽", - "🦾", - "🦿", - "🧀", - "🧁", - "🧂", - "🧃", - "🧄", - "🧅", - "🧆", - "🧇", - "🧈", - "🧉", - "🧊", - "🧍🏻‍♀️", - "🧍🏻‍♂️", - "🧍🏻", - "🧍🏼‍♀️", - "🧍🏼‍♂️", - "🧍🏼", - "🧍🏽‍♀️", - "🧍🏽‍♂️", - "🧍🏽", - "🧍🏾‍♀️", - "🧍🏾‍♂️", - "🧍🏾", - "🧍🏿‍♀️", - "🧍🏿‍♂️", - "🧍🏿", - "🧍‍♀️", - "🧍‍♂️", - "🧍", - "🧎🏻‍♀️", - "🧎🏻‍♂️", - "🧎🏻", - "🧎🏼‍♀️", - "🧎🏼‍♂️", - "🧎🏼", - "🧎🏽‍♀️", - "🧎🏽‍♂️", - "🧎🏽", - "🧎🏾‍♀️", - "🧎🏾‍♂️", - "🧎🏾", - "🧎🏿‍♀️", - "🧎🏿‍♂️", - "🧎🏿", - "🧎‍♀️", - "🧎‍♂️", - "🧎", - "🧏🏻‍♀️", - "🧏🏻‍♂️", - "🧏🏻", - "🧏🏼‍♀️", - "🧏🏼‍♂️", - "🧏🏼", - "🧏🏽‍♀️", - "🧏🏽‍♂️", - "🧏🏽", - "🧏🏾‍♀️", - "🧏🏾‍♂️", - "🧏🏾", - "🧏🏿‍♀️", - "🧏🏿‍♂️", - "🧏🏿", - "🧏‍♀️", - "🧏‍♂️", - "🧏", - "🧐", - "🧑🏻‍🤝‍🧑🏻", - "🧑🏻", - "🧑🏼‍🤝‍🧑🏻", - "🧑🏼‍🤝‍🧑🏼", - "🧑🏼", - "🧑🏽‍🤝‍🧑🏻", - "🧑🏽‍🤝‍🧑🏼", - "🧑🏽‍🤝‍🧑🏽", - "🧑🏽", - "🧑🏾‍🤝‍🧑🏻", - "🧑🏾‍🤝‍🧑🏼", - "🧑🏾‍🤝‍🧑🏽", - "🧑🏾‍🤝‍🧑🏾", - "🧑🏾", - "🧑🏿‍🤝‍🧑🏻", - "🧑🏿‍🤝‍🧑🏼", - "🧑🏿‍🤝‍🧑🏽", - "🧑🏿‍🤝‍🧑🏾", - "🧑🏿‍🤝‍🧑🏿", - "🧑🏿", - "🧑‍🤝‍🧑", - "🧑", - "🧒🏻", - "🧒🏼", - "🧒🏽", - "🧒🏾", - "🧒🏿", - "🧒", - "🧓🏻", - "🧓🏼", - "🧓🏽", - "🧓🏾", - "🧓🏿", - "🧓", - "🧔🏻", - "🧔🏼", - "🧔🏽", - "🧔🏾", - "🧔🏿", - "🧔", - "🧕🏻", - "🧕🏼", - "🧕🏽", - "🧕🏾", - "🧕🏿", - "🧕", - "🧖🏻‍♀️", - "🧖🏻‍♂️", - "🧖🏻", - "🧖🏼‍♀️", - "🧖🏼‍♂️", - "🧖🏼", - "🧖🏽‍♀️", - "🧖🏽‍♂️", - "🧖🏽", - "🧖🏾‍♀️", - "🧖🏾‍♂️", - "🧖🏾", - "🧖🏿‍♀️", - "🧖🏿‍♂️", - "🧖🏿", - "🧖‍♀️", - "🧖‍♂️", - "🧖", - "🧗🏻‍♀️", - "🧗🏻‍♂️", - "🧗🏻", - "🧗🏼‍♀️", - "🧗🏼‍♂️", - "🧗🏼", - "🧗🏽‍♀️", - "🧗🏽‍♂️", - "🧗🏽", - "🧗🏾‍♀️", - "🧗🏾‍♂️", - "🧗🏾", - "🧗🏿‍♀️", - "🧗🏿‍♂️", - "🧗🏿", - "🧗‍♀️", - "🧗‍♂️", - "🧗", - "🧘🏻‍♀️", - "🧘🏻‍♂️", - "🧘🏻", - "🧘🏼‍♀️", - "🧘🏼‍♂️", - "🧘🏼", - "🧘🏽‍♀️", - "🧘🏽‍♂️", - "🧘🏽", - "🧘🏾‍♀️", - "🧘🏾‍♂️", - "🧘🏾", - "🧘🏿‍♀️", - "🧘🏿‍♂️", - "🧘🏿", - "🧘‍♀️", - "🧘‍♂️", - "🧘", - "🧙🏻‍♀️", - "🧙🏻‍♂️", - "🧙🏻", - "🧙🏼‍♀️", - "🧙🏼‍♂️", - "🧙🏼", - "🧙🏽‍♀️", - "🧙🏽‍♂️", - "🧙🏽", - "🧙🏾‍♀️", - "🧙🏾‍♂️", - "🧙🏾", - "🧙🏿‍♀️", - "🧙🏿‍♂️", - "🧙🏿", - "🧙‍♀️", - "🧙‍♂️", - "🧙", - "🧚🏻‍♀️", - "🧚🏻‍♂️", - "🧚🏻", - "🧚🏼‍♀️", - "🧚🏼‍♂️", - "🧚🏼", - "🧚🏽‍♀️", - "🧚🏽‍♂️", - "🧚🏽", - "🧚🏾‍♀️", - "🧚🏾‍♂️", - "🧚🏾", - "🧚🏿‍♀️", - "🧚🏿‍♂️", - "🧚🏿", - "🧚‍♀️", - "🧚‍♂️", - "🧚", - "🧛🏻‍♀️", - "🧛🏻‍♂️", - "🧛🏻", - "🧛🏼‍♀️", - "🧛🏼‍♂️", - "🧛🏼", - "🧛🏽‍♀️", - "🧛🏽‍♂️", - "🧛🏽", - "🧛🏾‍♀️", - "🧛🏾‍♂️", - "🧛🏾", - "🧛🏿‍♀️", - "🧛🏿‍♂️", - "🧛🏿", - "🧛‍♀️", - "🧛‍♂️", - "🧛", - "🧜🏻‍♀️", - "🧜🏻‍♂️", - "🧜🏻", - "🧜🏼‍♀️", - "🧜🏼‍♂️", - "🧜🏼", - "🧜🏽‍♀️", - "🧜🏽‍♂️", - "🧜🏽", - "🧜🏾‍♀️", - "🧜🏾‍♂️", - "🧜🏾", - "🧜🏿‍♀️", - "🧜🏿‍♂️", - "🧜🏿", - "🧜‍♀️", - "🧜‍♂️", - "🧜", - "🧝🏻‍♀️", - "🧝🏻‍♂️", - "🧝🏻", - "🧝🏼‍♀️", - "🧝🏼‍♂️", - "🧝🏼", - "🧝🏽‍♀️", - "🧝🏽‍♂️", - "🧝🏽", - "🧝🏾‍♀️", - "🧝🏾‍♂️", - "🧝🏾", - "🧝🏿‍♀️", - "🧝🏿‍♂️", - "🧝🏿", - "🧝‍♀️", - "🧝‍♂️", - "🧝", - "🧞‍♀️", - "🧞‍♂️", - "🧞", - "🧟‍♀️", - "🧟‍♂️", - "🧟", - "🧠", - "🧡", - "🧢", - "🧣", - "🧤", - "🧥", - "🧦", - "🧧", - "🧨", - "🧩", - "🧪", - "🧫", - "🧬", - "🧭", - "🧮", - "🧯", - "🧰", - "🧱", - "🧲", - "🧳", - "🧴", - "🧵", - "🧶", - "🧷", - "🧸", - "🧹", - "🧺", - "🧻", - "🧼", - "🧽", - "🧾", - "🧿", - "🩰", - "🩱", - "🩲", - "🩳", - "🩸", - "🩹", - "🩺", - "🪀", - "🪁", - "🪂", - "🪐", - "🪑", - "🪒", - "🪓", - "🪔", - "🪕", - "‼️", - "⁉️", - "™️", - "ℹ️", - "↔️", - "↕️", - "↖️", - "↗️", - "↘️", - "↙️", - "↩️", - "↪️", - "#⃣", - "⌚️", - "⌛️", - "⌨️", - "⏏️", - "⏩", - "⏪", - "⏫", - "⏬", - "⏭️", - "⏮️", - "⏯️", - "⏰", - "⏱️", - "⏲️", - "⏳", - "⏸️", - "⏹️", - "⏺️", - "Ⓜ️", - "▪️", - "▫️", - "▶️", - "◀️", - "◻️", - "◼️", - "◽️", - "◾️", - "☀️", - "☁️", - "☂️", - "☃️", - "☄️", - "☎️", - "☑️", - "☔️", - "☕️", - "☘️", - "☝🏻", - "☝🏼", - "☝🏽", - "☝🏾", - "☝🏿", - "☝️", - "☠️", - "☢️", - "☣️", - "☦️", - "☪️", - "☮️", - "☯️", - "☸️", - "☹️", - "☺️", - "♀️", - "♂️", - "♈️", - "♉️", - "♊️", - "♋️", - "♌️", - "♍️", - "♎️", - "♏️", - "♐️", - "♑️", - "♒️", - "♓️", - "♟️", - "♠️", - "♣️", - "♥️", - "♦️", - "♨️", - "♻️", - "♾", - "♿️", - "⚒️", - "⚓️", - "⚔️", - "⚕️", - "⚖️", - "⚗️", - "⚙️", - "⚛️", - "⚜️", - "⚠️", - "⚡️", - "⚪️", - "⚫️", - "⚰️", - "⚱️", - "⚽️", - "⚾️", - "⛄️", - "⛅️", - "⛈️", - "⛎", - "⛏️", - "⛑️", - "⛓️", - "⛔️", - "⛩️", - "⛪️", - "⛰️", - "⛱️", - "⛲️", - "⛳️", - "⛴️", - "⛵️", - "⛷🏻", - "⛷🏼", - "⛷🏽", - "⛷🏾", - "⛷🏿", - "⛷️", - "⛸️", - "⛹🏻‍♀️", - "⛹🏻‍♂️", - "⛹🏻", - "⛹🏼‍♀️", - "⛹🏼‍♂️", - "⛹🏼", - "⛹🏽‍♀️", - "⛹🏽‍♂️", - "⛹🏽", - "⛹🏾‍♀️", - "⛹🏾‍♂️", - "⛹🏾", - "⛹🏿‍♀️", - "⛹🏿‍♂️", - "⛹🏿", - "⛹️‍♀️", - "⛹️‍♂️", - "⛹️", - "⛺️", - "⛽️", - "✂️", - "✅", - "✈️", - "✉️", - "✊🏻", - "✊🏼", - "✊🏽", - "✊🏾", - "✊🏿", - "✊", - "✋🏻", - "✋🏼", - "✋🏽", - "✋🏾", - "✋🏿", - "✋", - "✌🏻", - "✌🏼", - "✌🏽", - "✌🏾", - "✌🏿", - "✌️", - "✍🏻", - "✍🏼", - "✍🏽", - "✍🏾", - "✍🏿", - "✍️", - "✏️", - "✒️", - "✔️", - "✖️", - "✝️", - "✡️", - "✨", - "✳️", - "✴️", - "❄️", - "❇️", - "❌", - "❎", - "❓", - "❔", - "❕", - "❗️", - "❣️", - "❤️", - "➕", - "➖", - "➗", - "➡️", - "➰", - "➿", - "⤴️", - "⤵️", - "*⃣", - "⬅️", - "⬆️", - "⬇️", - "⬛️", - "⬜️", - "⭐️", - "⭕️", - "0⃣", - "〰️", - "〽️", - "1⃣", - "2⃣", - "㊗️", - "㊙️", - "3⃣", - "4⃣", - "5⃣", - "6⃣", - "7⃣", - "8⃣", - "9⃣", - "©️", - "®️", - "" -]; +const path$2 = path$3; +const getHashDigest = getHashDigest_1; -const emojiRegex = /[\uD800-\uDFFF]./; -const emojiList = emojisList.filter((emoji) => emojiRegex.test(emoji)); -const emojiCache = {}; - -function encodeStringToEmoji(content, length) { - if (emojiCache[content]) { - return emojiCache[content]; - } - - length = length || 1; - - const emojis = []; - - do { - if (!emojiList.length) { - throw new Error('Ran out of emoji'); - } - - const index = Math.floor(Math.random() * emojiList.length); - - emojis.push(emojiList[index]); - emojiList.splice(index, 1); - } while (--length > 0); - - const emojiEncoding = emojis.join(''); - - emojiCache[content] = emojiEncoding; - - return emojiEncoding; -} - -function interpolateName(loaderContext, name, options) { +function interpolateName$1(loaderContext, name, options = {}) { let filename; const hasQuery = loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1; - if (typeof name === 'function') { + if (typeof name === "function") { filename = name( loaderContext.resourcePath, hasQuery ? loaderContext.resourceQuery : undefined ); } else { - filename = name || '[hash].[ext]'; + filename = name || "[hash].[ext]"; } const context = options.context; const content = options.content; const regExp = options.regExp; - let ext = 'bin'; - let basename = 'file'; - let directory = ''; - let folder = ''; - let query = ''; + let ext = "bin"; + let basename = "file"; + let directory = ""; + let folder = ""; + let query = ""; if (loaderContext.resourcePath) { - const parsed = path__default.parse(loaderContext.resourcePath); + const parsed = path$2.parse(loaderContext.resourcePath); let resourcePath = loaderContext.resourcePath; if (parsed.ext) { @@ -14731,30 +13359,30 @@ function interpolateName(loaderContext, name, options) { if (parsed.dir) { basename = parsed.name; - resourcePath = parsed.dir + path__default.sep; + resourcePath = parsed.dir + path$2.sep; } - if (typeof context !== 'undefined') { - directory = path__default - .relative(context, resourcePath + '_') - .replace(/\\/g, '/') - .replace(/\.\.(\/)?/g, '_$1'); + if (typeof context !== "undefined") { + directory = path$2 + .relative(context, resourcePath + "_") + .replace(/\\/g, "/") + .replace(/\.\.(\/)?/g, "_$1"); directory = directory.substr(0, directory.length - 1); } else { - directory = resourcePath.replace(/\\/g, '/').replace(/\.\.(\/)?/g, '_$1'); + directory = resourcePath.replace(/\\/g, "/").replace(/\.\.(\/)?/g, "_$1"); } if (directory.length === 1) { - directory = ''; + directory = ""; } else if (directory.length > 1) { - folder = path__default.basename(directory); + folder = path$2.basename(directory); } } if (loaderContext.resourceQuery && loaderContext.resourceQuery.length > 1) { query = loaderContext.resourceQuery; - const hashIdx = query.indexOf('#'); + const hashIdx = query.indexOf("#"); if (hashIdx >= 0) { query = query.substr(0, hashIdx); @@ -14769,12 +13397,9 @@ function interpolateName(loaderContext, name, options) { // `hash` and `contenthash` are same in `loader-utils` context // let's keep `hash` for backward compatibility .replace( - /\[(?:([^:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi, + /\[(?:([^[:\]]+):)?(?:hash|contenthash)(?::([a-z]+\d*))?(?::(\d+))?\]/gi, (all, hashType, digestType, maxLength) => - getHashDigest_1(content, hashType, digestType, parseInt(maxLength, 10)) - ) - .replace(/\[emoji(?::(\d+))?\]/gi, (all, length) => - encodeStringToEmoji(content, parseInt(length, 10)) + getHashDigest(content, hashType, digestType, parseInt(maxLength, 10)) ); } @@ -14790,13 +13415,13 @@ function interpolateName(loaderContext, name, options) { match && match.forEach((matched, i) => { - url = url.replace(new RegExp('\\[' + i + '\\]', 'ig'), matched); + url = url.replace(new RegExp("\\[" + i + "\\]", "ig"), matched); }); } if ( - typeof loaderContext.options === 'object' && - typeof loaderContext.options.customInterpolateName === 'function' + typeof loaderContext.options === "object" && + typeof loaderContext.options.customInterpolateName === "function" ) { url = loaderContext.options.customInterpolateName.call( loaderContext, @@ -14809,34 +13434,10 @@ function interpolateName(loaderContext, name, options) { return url; } -var interpolateName_1 = interpolateName; - -var getOptions_1$1 = getOptions_1; -var parseQuery_1$1 = parseQuery_1; -var stringifyRequest_1$1 = stringifyRequest_1; -var getRemainingRequest_1$1 = getRemainingRequest_1; -var getCurrentRequest_1$1 = getCurrentRequest_1; -var isUrlRequest_1$1 = isUrlRequest_1; -var urlToRequest_1$1 = urlToRequest_1; -var parseString_1$1 = parseString_1; -var getHashDigest_1$1 = getHashDigest_1; -var interpolateName_1$1 = interpolateName_1; - -var lib$1 = { - getOptions: getOptions_1$1, - parseQuery: parseQuery_1$1, - stringifyRequest: stringifyRequest_1$1, - getRemainingRequest: getRemainingRequest_1$1, - getCurrentRequest: getCurrentRequest_1$1, - isUrlRequest: isUrlRequest_1$1, - urlToRequest: urlToRequest_1$1, - parseString: parseString_1$1, - getHashDigest: getHashDigest_1$1, - interpolateName: interpolateName_1$1 -}; - -var interpolateName$1 = lib$1.interpolateName; +var interpolateName_1 = interpolateName$1; +var interpolateName = interpolateName_1; +var path$1 = path$3; /** * @param {string} pattern @@ -14862,320 +13463,26 @@ var genericNames = function createGenerator(pattern, options) { return function generate(localName, filepath) { var name = pattern.replace(/\[local\]/gi, localName); var loaderContext = { - resourcePath: filepath + resourcePath: filepath, }; var loaderOptions = { content: hashPrefix + - path__default.relative(context, filepath).replace(/\\/g, "/") + - "+" + + path$1.relative(context, filepath).replace(/\\/g, "/") + + "\x00" + localName, - context: context + context: context, }; - var genericName = interpolateName$1(loaderContext, name, loaderOptions); + var genericName = interpolateName(loaderContext, name, loaderOptions); return genericName .replace(new RegExp("[^a-zA-Z0-9\\-_\u00A0-\uFFFF]", "g"), "-") .replace(/^((-?[0-9])|--)/, "_$1"); }; }; -var _default = unquote; -// copied from https://github.com/lakenen/node-unquote - -var reg = /['"]/; - -function unquote(str) { - if (!str) { - return ""; - } - if (reg.test(str.charAt(0))) { - str = str.substr(1); - } - if (reg.test(str.charAt(str.length - 1))) { - str = str.substr(0, str.length - 1); - } - return str; -} - -var unquote_1 = /*#__PURE__*/Object.defineProperty({ - default: _default -}, '__esModule', {value: true}); - -var replaceAll_1 = replaceAll; -var matchConstName = /[$#]?[\w-\.]+/g; - -function replaceAll(replacements, text) { - var matches = void 0; - while (matches = matchConstName.exec(text)) { - var replacement = replacements[matches[0]]; - if (replacement) { - text = text.slice(0, matches.index) + replacement + text.slice(matchConstName.lastIndex); - matchConstName.lastIndex -= matches[0].length - replacement.length; - } - } - return text; -} - -var _default$1 = function (css, translations) { - css.walkDecls(function (decl) { - return decl.value = replaceAll(translations, decl.value); - }); - css.walkAtRules('media', function (atRule) { - return atRule.params = replaceAll(translations, atRule.params); - }); -}; - -var lib$2 = /*#__PURE__*/Object.defineProperty({ - replaceAll: replaceAll_1, - default: _default$1 -}, '__esModule', {value: true}); - -var _icssReplaceSymbols2 = _interopRequireDefault(lib$2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// Copied from https://github.com/css-modules/css-modules-loader-core - -const importRegexp = /^:import\((.+)\)$/; -class Parser { - constructor(pathFetcher, trace) { - this.pathFetcher = pathFetcher; - this.plugin = this.plugin.bind(this); - this.exportTokens = {}; - this.translations = {}; - this.trace = trace; - } - - plugin() { - const parser = this; - return { - postcssPlugin: "css-modules-parser", - OnceExit(css) { - return Promise.all(parser.fetchAllImports(css)).then(() => parser.linkImportedSymbols(css)).then(() => parser.extractExports(css)); - } - }; - } - - fetchAllImports(css) { - let imports = []; - css.each(node => { - if (node.type == "rule" && node.selector.match(importRegexp)) { - imports.push(this.fetchImport(node, css.source.input.from, imports.length)); - } - }); - return imports; - } - - linkImportedSymbols(css) { - (0, _icssReplaceSymbols2.default)(css, this.translations); - } - - extractExports(css) { - css.each(node => { - if (node.type == "rule" && node.selector == ":export") this.handleExport(node); - }); - } - - handleExport(exportNode) { - exportNode.each(decl => { - if (decl.type == "decl") { - Object.keys(this.translations).forEach(translation => { - decl.value = decl.value.replace(translation, this.translations[translation]); - }); - this.exportTokens[decl.prop] = decl.value; - } - }); - exportNode.remove(); - } - - fetchImport(importNode, relativeTo, depNr) { - let file = importNode.selector.match(importRegexp)[1], - depTrace = this.trace + String.fromCharCode(depNr); - return this.pathFetcher(file, relativeTo, depTrace).then(exports => { - importNode.each(decl => { - if (decl.type == "decl") { - this.translations[decl.prop] = exports[decl.value]; - } - }); - importNode.remove(); - }, err => console.log(err)); - } -} -var _default$2 = Parser; - -var parser$1 = /*#__PURE__*/Object.defineProperty({ - default: _default$2 -}, '__esModule', {value: true}); - -var _postcss2 = _interopRequireDefault$1(_postcss__default); - - - -var _fs2 = _interopRequireDefault$1(fs__default); - - - -var _path2 = _interopRequireDefault$1(path__default); - - - -var _parser2 = _interopRequireDefault$1(parser$1); - -function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// Copied from https://github.com/css-modules/css-modules-loader-core - -class Core { - constructor(plugins) { - this.plugins = plugins || Core.defaultPlugins; - } - - load(sourceString, sourcePath, trace, pathFetcher) { - let parser = new _parser2.default(pathFetcher, trace); - - return (0, _postcss2.default)(this.plugins.concat([parser.plugin()])).process(sourceString, { from: "/" + sourcePath }).then(result => { - return { - injectableSource: result.css, - exportTokens: parser.exportTokens - }; - }); - } -} - -// Sorts dependencies in the following way: -// AAA comes before AA and A -// AB comes after AA and before A -// All Bs come after all As -// This ensures that the files are always returned in the following order: -// - In the order they were required, except -// - After all their dependencies -const traceKeySorter = (a, b) => { - if (a.length < b.length) { - return a < b.substring(0, a.length) ? -1 : 1; - } else if (a.length > b.length) { - return a.substring(0, b.length) <= b ? -1 : 1; - } else { - return a < b ? -1 : 1; - } -}; - -class FileSystemLoader { - constructor(root, plugins) { - this.root = root; - this.sources = {}; - this.traces = {}; - this.importNr = 0; - this.core = new Core(plugins); - this.tokensByFile = {}; - } - - fetch(_newPath, relativeTo, _trace) { - let newPath = _newPath.replace(/^["']|["']$/g, ""), - trace = _trace || String.fromCharCode(this.importNr++); - return new Promise((resolve, reject) => { - let relativeDir = _path2.default.dirname(relativeTo), - rootRelativePath = _path2.default.resolve(relativeDir, newPath), - fileRelativePath = _path2.default.resolve(_path2.default.join(this.root, relativeDir), newPath); - - // if the path is not relative or absolute, try to resolve it in node_modules - if (newPath[0] !== "." && newPath[0] !== "/") { - try { - fileRelativePath = require.resolve(newPath); - } catch (e) { - // noop - } - } - - const tokens = this.tokensByFile[fileRelativePath]; - if (tokens) { - return resolve(tokens); - } - - _fs2.default.readFile(fileRelativePath, "utf-8", (err, source) => { - if (err) reject(err); - this.core.load(source, rootRelativePath, trace, this.fetch.bind(this)).then(({ injectableSource, exportTokens }) => { - this.sources[fileRelativePath] = injectableSource; - this.traces[trace] = fileRelativePath; - this.tokensByFile[fileRelativePath] = exportTokens; - resolve(exportTokens); - }, reject); - }); - }); - } - - get finalSource() { - const traces = this.traces; - const sources = this.sources; - let written = new Set(); - - return Object.keys(traces).sort(traceKeySorter).map(key => { - const filename = traces[key]; - if (written.has(filename)) { - return null; - } - written.add(filename); - - return sources[filename]; - }).join(""); - } -} -var _default$3 = FileSystemLoader; - -var loader = /*#__PURE__*/Object.defineProperty({ - default: _default$3 -}, '__esModule', {value: true}); - -function hash(str) { - var hash = 5381, - i = str.length; - - while(i) { - hash = (hash * 33) ^ str.charCodeAt(--i); - } - - /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed - * integers. Since we want the results to be always positive, convert the - * signed int to an unsigned by doing an unsigned bitshift. */ - return hash >>> 0; -} - -var stringHash = hash; - -var _default$4 = generateScopedName; - - - -var _stringHash2 = _interopRequireDefault$2(stringHash); - -function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function generateScopedName(name, filename, css) { - const i = css.indexOf(`.${name}`); - const lineNumber = css.substr(0, i).split(/[\r\n]/).length; - const hash = (0, _stringHash2.default)(css).toString(36).substr(0, 5); - - return `_${name}_${hash}_${lineNumber}`; -} - -var generateScopedName_1 = /*#__PURE__*/Object.defineProperty({ - default: _default$4 -}, '__esModule', {value: true}); - -var _default$5 = saveJSON; - - - -function saveJSON(cssFile, json) { - return new Promise((resolve, reject) => { - (0, fs__default.writeFile)(`${cssFile}.json`, JSON.stringify(json), e => e ? reject(e) : resolve(json)); - }); -} - -var saveJSON_1 = /*#__PURE__*/Object.defineProperty({ - default: _default$5 -}, '__esModule', {value: true}); +var src$2 = {exports: {}}; var openParentheses = "(".charCodeAt(0); var closeParentheses = ")".charCodeAt(0); @@ -15185,13 +13492,13 @@ var backslash = "\\".charCodeAt(0); var slash = "/".charCodeAt(0); var comma = ",".charCodeAt(0); var colon = ":".charCodeAt(0); -var star = "*".charCodeAt(0); +var star$2 = "*".charCodeAt(0); var uLower = "u".charCodeAt(0); var uUpper = "U".charCodeAt(0); var plus = "+".charCodeAt(0); var isUnicodeRange = /^[a-f0-9?-]+$/i; -var parse$2 = function(input) { +var parse$1 = function(input) { var tokens = []; var value = input; @@ -15234,7 +13541,7 @@ var parse$2 = function(input) { code === comma || code === colon || (code === slash && - value.charCodeAt(next + 1) !== star && + value.charCodeAt(next + 1) !== star$2 && (!parent || (parent && parent.type === "function" && parent.value !== "calc"))) ) { @@ -15281,7 +13588,7 @@ var parse$2 = function(input) { code = value.charCodeAt(pos); // Comments - } else if (code === slash && value.charCodeAt(pos + 1) === star) { + } else if (code === slash && value.charCodeAt(pos + 1) === star$2) { next = value.indexOf("*/", pos); token = { @@ -15304,7 +13611,7 @@ var parse$2 = function(input) { // Operation within calc } else if ( - (code === slash || code === star) && + (code === slash || code === star$2) && parent && parent.type === "function" && parent.value === "calc" @@ -15453,7 +13760,7 @@ var parse$2 = function(input) { code === colon || code === slash || code === openParentheses || - (code === star && + (code === star$2 && parent && parent.type === "function" && parent.value === "calc") || @@ -15499,7 +13806,7 @@ var parse$2 = function(input) { return stack[0].nodes; }; -var walk = function walk(nodes, cb, bubble) { +var walk$2 = function walk(nodes, cb, bubble) { var i, max, node, result; for (i = 0, max = nodes.length; i < max; i += 1) { @@ -15569,347 +13876,169 @@ function stringify$1(nodes, custom) { return stringifyNode(nodes, custom); } -var stringify_1$1 = stringify$1; +var stringify_1 = stringify$1; -var minus = "-".charCodeAt(0); -var plus$1 = "+".charCodeAt(0); -var dot = ".".charCodeAt(0); -var exp = "e".charCodeAt(0); -var EXP = "E".charCodeAt(0); +var unit; +var hasRequiredUnit; -// Check if three code points would start a number -// https://www.w3.org/TR/css-syntax-3/#starts-with-a-number -function likeNumber(value) { - var code = value.charCodeAt(0); - var nextCode; +function requireUnit () { + if (hasRequiredUnit) return unit; + hasRequiredUnit = 1; + var minus = "-".charCodeAt(0); + var plus = "+".charCodeAt(0); + var dot = ".".charCodeAt(0); + var exp = "e".charCodeAt(0); + var EXP = "E".charCodeAt(0); - if (code === plus$1 || code === minus) { - nextCode = value.charCodeAt(1); + // Check if three code points would start a number + // https://www.w3.org/TR/css-syntax-3/#starts-with-a-number + function likeNumber(value) { + var code = value.charCodeAt(0); + var nextCode; - if (nextCode >= 48 && nextCode <= 57) { - return true; - } + if (code === plus || code === minus) { + nextCode = value.charCodeAt(1); - var nextNextCode = value.charCodeAt(2); + if (nextCode >= 48 && nextCode <= 57) { + return true; + } - if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) { - return true; - } + var nextNextCode = value.charCodeAt(2); - return false; - } + if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) { + return true; + } - if (code === dot) { - nextCode = value.charCodeAt(1); + return false; + } - if (nextCode >= 48 && nextCode <= 57) { - return true; - } + if (code === dot) { + nextCode = value.charCodeAt(1); - return false; - } + if (nextCode >= 48 && nextCode <= 57) { + return true; + } - if (code >= 48 && code <= 57) { - return true; - } + return false; + } - return false; + if (code >= 48 && code <= 57) { + return true; + } + + return false; + } + + // Consume a number + // https://www.w3.org/TR/css-syntax-3/#consume-number + unit = function(value) { + var pos = 0; + var length = value.length; + var code; + var nextCode; + var nextNextCode; + + if (length === 0 || !likeNumber(value)) { + return false; + } + + code = value.charCodeAt(pos); + + if (code === plus || code === minus) { + pos++; + } + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + + code = value.charCodeAt(pos); + nextCode = value.charCodeAt(pos + 1); + + if (code === dot && nextCode >= 48 && nextCode <= 57) { + pos += 2; + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + } + + code = value.charCodeAt(pos); + nextCode = value.charCodeAt(pos + 1); + nextNextCode = value.charCodeAt(pos + 2); + + if ( + (code === exp || code === EXP) && + ((nextCode >= 48 && nextCode <= 57) || + ((nextCode === plus || nextCode === minus) && + nextNextCode >= 48 && + nextNextCode <= 57)) + ) { + pos += nextCode === plus || nextCode === minus ? 3 : 2; + + while (pos < length) { + code = value.charCodeAt(pos); + + if (code < 48 || code > 57) { + break; + } + + pos += 1; + } + } + + return { + number: value.slice(0, pos), + unit: value.slice(pos) + }; + }; + return unit; } -// Consume a number -// https://www.w3.org/TR/css-syntax-3/#consume-number -var unit = function(value) { - var pos = 0; - var length = value.length; - var code; - var nextCode; - var nextNextCode; - - if (length === 0 || !likeNumber(value)) { - return false; - } - - code = value.charCodeAt(pos); - - if (code === plus$1 || code === minus) { - pos++; - } - - while (pos < length) { - code = value.charCodeAt(pos); - - if (code < 48 || code > 57) { - break; - } - - pos += 1; - } - - code = value.charCodeAt(pos); - nextCode = value.charCodeAt(pos + 1); - - if (code === dot && nextCode >= 48 && nextCode <= 57) { - pos += 2; - - while (pos < length) { - code = value.charCodeAt(pos); - - if (code < 48 || code > 57) { - break; - } - - pos += 1; - } - } - - code = value.charCodeAt(pos); - nextCode = value.charCodeAt(pos + 1); - nextNextCode = value.charCodeAt(pos + 2); - - if ( - (code === exp || code === EXP) && - ((nextCode >= 48 && nextCode <= 57) || - ((nextCode === plus$1 || nextCode === minus) && - nextNextCode >= 48 && - nextNextCode <= 57)) - ) { - pos += nextCode === plus$1 || nextCode === minus ? 3 : 2; - - while (pos < length) { - code = value.charCodeAt(pos); - - if (code < 48 || code > 57) { - break; - } - - pos += 1; - } - } - - return { - number: value.slice(0, pos), - unit: value.slice(pos) - }; -}; +var parse = parse$1; +var walk$1 = walk$2; +var stringify = stringify_1; function ValueParser(value) { if (this instanceof ValueParser) { - this.nodes = parse$2(value); + this.nodes = parse(value); return this; } return new ValueParser(value); } ValueParser.prototype.toString = function() { - return Array.isArray(this.nodes) ? stringify_1$1(this.nodes) : ""; + return Array.isArray(this.nodes) ? stringify(this.nodes) : ""; }; ValueParser.prototype.walk = function(cb, bubble) { - walk(this.nodes, cb, bubble); + walk$1(this.nodes, cb, bubble); return this; }; -ValueParser.unit = unit; +ValueParser.unit = requireUnit(); -ValueParser.walk = walk; +ValueParser.walk = walk$1; -ValueParser.stringify = stringify_1$1; +ValueParser.stringify = stringify; -var lib$3 = ValueParser; +var lib = ValueParser; -const matchValueName = /[$]?[\w-]+/g; - -const replaceValueSymbols = (value, replacements) => { - let matches; - - while ((matches = matchValueName.exec(value))) { - const replacement = replacements[matches[0]]; - - if (replacement) { - value = - value.slice(0, matches.index) + - replacement + - value.slice(matchValueName.lastIndex); - - matchValueName.lastIndex -= matches[0].length - replacement.length; - } - } - - return value; -}; - -var replaceValueSymbols_1 = replaceValueSymbols; - -const replaceSymbols = (css, replacements) => { - css.walk((node) => { - if (node.type === "decl" && node.value) { - node.value = replaceValueSymbols_1(node.value.toString(), replacements); - } else if (node.type === "rule" && node.selector) { - node.selector = replaceValueSymbols_1( - node.selector.toString(), - replacements - ); - } else if (node.type === "atrule" && node.params) { - node.params = replaceValueSymbols_1(node.params.toString(), replacements); - } - }); -}; - -var replaceSymbols_1 = replaceSymbols; - -const importPattern = /^:import\(("[^"]*"|'[^']*'|[^"']+)\)$/; -const balancedQuotes = /^("[^"]*"|'[^']*'|[^"']+)$/; - -const getDeclsObject = (rule) => { - const object = {}; - - rule.walkDecls((decl) => { - const before = decl.raws.before ? decl.raws.before.trim() : ""; - - object[before + decl.prop] = decl.value; - }); - - return object; -}; -/** - * - * @param {string} css - * @param {boolean} removeRules - * @param {'auto' | 'rule' | 'at-rule'} mode - */ -const extractICSS = (css, removeRules = true, mode = "auto") => { - const icssImports = {}; - const icssExports = {}; - - function addImports(node, path) { - const unquoted = path.replace(/'|"/g, ""); - icssImports[unquoted] = Object.assign( - icssImports[unquoted] || {}, - getDeclsObject(node) - ); - - if (removeRules) { - node.remove(); - } - } - - function addExports(node) { - Object.assign(icssExports, getDeclsObject(node)); - if (removeRules) { - node.remove(); - } - } - - css.each((node) => { - if (node.type === "rule" && mode !== "at-rule") { - if (node.selector.slice(0, 7) === ":import") { - const matches = importPattern.exec(node.selector); - - if (matches) { - addImports(node, matches[1]); - } - } - - if (node.selector === ":export") { - addExports(node); - } - } - - if (node.type === "atrule" && mode !== "rule") { - if (node.name === "icss-import") { - const matches = balancedQuotes.exec(node.params); - - if (matches) { - addImports(node, matches[1]); - } - } - if (node.name === "icss-export") { - addExports(node); - } - } - }); - - return { icssImports, icssExports }; -}; - -var extractICSS_1 = extractICSS; - -const createImports = (imports, postcss, mode = "rule") => { - return Object.keys(imports).map((path) => { - const aliases = imports[path]; - const declarations = Object.keys(aliases).map((key) => - postcss.decl({ - prop: key, - value: aliases[key], - raws: { before: "\n " }, - }) - ); - - const hasDeclarations = declarations.length > 0; - - const rule = - mode === "rule" - ? postcss.rule({ - selector: `:import('${path}')`, - raws: { after: hasDeclarations ? "\n" : "" }, - }) - : postcss.atRule({ - name: "icss-import", - params: `'${path}'`, - raws: { after: hasDeclarations ? "\n" : "" }, - }); - - if (hasDeclarations) { - rule.append(declarations); - } - - return rule; - }); -}; - -const createExports = (exports, postcss, mode = "rule") => { - const declarations = Object.keys(exports).map((key) => - postcss.decl({ - prop: key, - value: exports[key], - raws: { before: "\n " }, - }) - ); - - if (declarations.length === 0) { - return []; - } - const rule = - mode === "rule" - ? postcss.rule({ - selector: `:export`, - raws: { after: "\n" }, - }) - : postcss.atRule({ - name: "icss-export", - raws: { after: "\n" }, - }); - - rule.append(declarations); - - return [rule]; -}; - -const createICSSRules = (imports, exports, postcss, mode) => [ - ...createImports(imports, postcss, mode), - ...createExports(exports, postcss, mode), -]; - -var createICSSRules_1 = createICSSRules; - -var src = { - replaceValueSymbols: replaceValueSymbols_1, - replaceSymbols: replaceSymbols_1, - extractICSS: extractICSS_1, - createICSSRules: createICSSRules_1, -}; - -const { extractICSS: extractICSS$1 } = src; +const selectorParser$1 = distExports; +const valueParser = lib; +const { extractICSS } = src$4; const isSpacing = (node) => node.type === "combinator" && node.value === " "; @@ -16056,9 +14185,19 @@ function localizeNode(rule, mode, localAliasMap) { hasLocals: false, explicit: context.explicit, }; - newNodes = node.map((childNode) => - transform(childNode, childContext) - ); + newNodes = node.map((childNode) => { + const newContext = { + ...childContext, + enforceNoSpacing: false, + }; + + const result = transform(childNode, newContext); + + childContext.global = newContext.global; + childContext.hasLocals = newContext.hasLocals; + + return result; + }); node = node.clone(); node.nodes = normalizeNodeArray(newNodes); @@ -16094,7 +14233,7 @@ function localizeNode(rule, mode, localAliasMap) { // we make up for it by adding an extra combinator in since adding // spacing on the parent selector doesn't work return addBackSpacing - ? dist.combinator({ value: " " }) + ? selectorParser$1.combinator({ value: " " }) : null; } break; @@ -16116,7 +14255,7 @@ function localizeNode(rule, mode, localAliasMap) { const innerNode = node.clone(); innerNode.spaces = { before: "", after: "" }; - node = dist.pseudo({ + node = selectorParser$1.pseudo({ value: ":local", nodes: [innerNode], spaces: node.spaces, @@ -16141,7 +14280,7 @@ function localizeNode(rule, mode, localAliasMap) { hasPureGlobals: false, }; - rootContext.selector = dist((root) => { + rootContext.selector = selectorParser$1((root) => { transform(root, rootContext); }).processSync(rule, { updateSelector: false, lossless: true }); @@ -16199,19 +14338,34 @@ function localizeDeclNode(node, context) { return node; } -function isWordAFunctionArgument(wordNode, functionNode) { - return functionNode - ? functionNode.nodes.some( - (functionNodeChild) => - functionNodeChild.sourceIndex === wordNode.sourceIndex - ) - : false; -} +// `none` is special value, other is global values +const specialKeywords = [ + "none", + "inherit", + "initial", + "revert", + "revert-layer", + "unset", +]; function localizeDeclarationValues(localize, declaration, context) { - const valueNodes = lib$3(declaration.value); + const valueNodes = valueParser(declaration.value); valueNodes.walk((node, index, nodes) => { + if ( + node.type === "function" && + (node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env") + ) { + return false; + } + + if ( + node.type === "word" && + specialKeywords.includes(node.value.toLowerCase()) + ) { + return; + } + const subContext = { options: context.options, global: context.global, @@ -16228,57 +14382,80 @@ function localizeDeclaration(declaration, context) { const isAnimation = /animation$/i.test(declaration.prop); if (isAnimation) { - const validIdent = /^-?[_a-z][_a-z0-9-]*$/i; + // letter + // An uppercase letter or a lowercase letter. + // + // ident-start code point + // A letter, a non-ASCII code point, or U+005F LOW LINE (_). + // + // ident code point + // An ident-start code point, a digit, or U+002D HYPHEN-MINUS (-). + + // We don't validate `hex digits`, because we don't need it, it is work of linters. + const validIdent = + /^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-)((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i; /* The spec defines some keywords that you can use to describe properties such as the timing function. These are still valid animation names, so as long as there is a property that accepts a keyword, it is given priority. Only when all the properties that can take a keyword are exhausted can the animation name be set to the keyword. I.e. - + animation: infinite infinite; - + The animation will repeat an infinite number of times from the first argument, and will have an animation name of infinite from the second. */ const animationKeywords = { + // animation-direction + $normal: 1, + $reverse: 1, $alternate: 1, "$alternate-reverse": 1, + // animation-fill-mode + $forwards: 1, $backwards: 1, $both: 1, + // animation-iteration-count + $infinite: 1, + // animation-play-state + $paused: 1, + $running: 1, + // animation-timing-function $ease: 1, "$ease-in": 1, - "$ease-in-out": 1, "$ease-out": 1, - $forwards: 1, - $infinite: 1, + "$ease-in-out": 1, $linear: 1, - $none: Infinity, // No matter how many times you write none, it will never be an animation name - $normal: 1, - $paused: 1, - $reverse: 1, - $running: 1, "$step-end": 1, "$step-start": 1, + // Special + $none: Infinity, // No matter how many times you write none, it will never be an animation name + // Global values $initial: Infinity, $inherit: Infinity, $unset: Infinity, + $revert: Infinity, + "$revert-layer": Infinity, }; let parsedAnimationKeywords = {}; - let stepsFunctionNode = null; - const valueNodes = lib$3(declaration.value).walk((node) => { - /* If div-token appeared (represents as comma ','), a possibility of an animation-keywords should be reflesh. */ + const valueNodes = valueParser(declaration.value).walk((node) => { + // If div-token appeared (represents as comma ','), a possibility of an animation-keywords should be reflesh. if (node.type === "div") { parsedAnimationKeywords = {}; + + return; } - if (node.type === "function" && node.value.toLowerCase() === "steps") { - stepsFunctionNode = node; + // Do not handle nested functions + else if (node.type === "function") { + return false; } - const value = - node.type === "word" && - !isWordAFunctionArgument(node, stepsFunctionNode) - ? node.value.toLowerCase() - : null; + // Ignore all except word + else if (node.type !== "word") { + return; + } + + const value = node.type === "word" ? node.value.toLowerCase() : null; let shouldParseAnimationName = false; @@ -16303,6 +14480,7 @@ function localizeDeclaration(declaration, context) { localizeNextItem: shouldParseAnimationName && !context.global, localAliasMap: context.localAliasMap, }; + return localizeDeclNode(node, subContext); }); @@ -16324,7 +14502,7 @@ function localizeDeclaration(declaration, context) { } } -var src$1 = (options = {}) => { +src$2.exports = (options = {}) => { if ( options && options.mode && @@ -16347,7 +14525,7 @@ var src$1 = (options = {}) => { return { Once(root) { - const { icssImports } = extractICSS$1(root, false); + const { icssImports } = extractICSS(root, false); Object.keys(icssImports).forEach((key) => { Object.keys(icssImports[key]).forEach((prop) => { @@ -16441,277 +14619,13 @@ var src$1 = (options = {}) => { }, }; }; -var postcss = true; -src$1.postcss = postcss; +src$2.exports.postcss = true; -const PERMANENT_MARKER = 2; -const TEMPORARY_MARKER = 1; +var srcExports$1 = src$2.exports; -function createError(node, graph) { - const er = new Error("Nondeterministic import's order"); +const selectorParser = distExports; - const related = graph[node]; - const relatedNode = related.find( - (relatedNode) => graph[relatedNode].indexOf(node) > -1 - ); - - er.nodes = [node, relatedNode]; - - return er; -} - -function walkGraph(node, graph, state, result, strict) { - if (state[node] === PERMANENT_MARKER) { - return; - } - - if (state[node] === TEMPORARY_MARKER) { - if (strict) { - return createError(node, graph); - } - - return; - } - - state[node] = TEMPORARY_MARKER; - - const children = graph[node]; - const length = children.length; - - for (let i = 0; i < length; ++i) { - const error = walkGraph(children[i], graph, state, result, strict); - - if (error instanceof Error) { - return error; - } - } - - state[node] = PERMANENT_MARKER; - - result.push(node); -} - -function topologicalSort(graph, strict) { - const result = []; - const state = {}; - - const nodes = Object.keys(graph); - const length = nodes.length; - - for (let i = 0; i < length; ++i) { - const er = walkGraph(nodes[i], graph, state, result, strict); - - if (er instanceof Error) { - return er; - } - } - - return result; -} - -var topologicalSort_1 = topologicalSort; - -const matchImports = /^(.+?)\s+from\s+(?:"([^"]+)"|'([^']+)'|(global))$/; -const icssImport = /^:import\((?:"([^"]+)"|'([^']+)')\)/; - -const VISITED_MARKER = 1; - -/** - * :import('G') {} - * - * Rule - * composes: ... from 'A' - * composes: ... from 'B' - - * Rule - * composes: ... from 'A' - * composes: ... from 'A' - * composes: ... from 'C' - * - * Results in: - * - * graph: { - * G: [], - * A: [], - * B: ['A'], - * C: ['A'], - * } - */ -function addImportToGraph(importId, parentId, graph, visited) { - const siblingsId = parentId + "_" + "siblings"; - const visitedId = parentId + "_" + importId; - - if (visited[visitedId] !== VISITED_MARKER) { - if (!Array.isArray(visited[siblingsId])) { - visited[siblingsId] = []; - } - - const siblings = visited[siblingsId]; - - if (Array.isArray(graph[importId])) { - graph[importId] = graph[importId].concat(siblings); - } else { - graph[importId] = siblings.slice(); - } - - visited[visitedId] = VISITED_MARKER; - - siblings.push(importId); - } -} - -var src$2 = (options = {}) => { - let importIndex = 0; - const createImportedName = - typeof options.createImportedName !== "function" - ? (importName /*, path*/) => - `i__imported_${importName.replace(/\W/g, "_")}_${importIndex++}` - : options.createImportedName; - const failOnWrongOrder = options.failOnWrongOrder; - - return { - postcssPlugin: "postcss-modules-extract-imports", - prepare() { - const graph = {}; - const visited = {}; - const existingImports = {}; - const importDecls = {}; - const imports = {}; - - return { - Once(root, postcss) { - // Check the existing imports order and save refs - root.walkRules((rule) => { - const matches = icssImport.exec(rule.selector); - - if (matches) { - const [, /*match*/ doubleQuotePath, singleQuotePath] = matches; - const importPath = doubleQuotePath || singleQuotePath; - - addImportToGraph(importPath, "root", graph, visited); - - existingImports[importPath] = rule; - } - }); - - root.walkDecls(/^composes$/, (declaration) => { - const matches = declaration.value.match(matchImports); - - if (!matches) { - return; - } - - let tmpSymbols; - let [ - , - /*match*/ symbols, - doubleQuotePath, - singleQuotePath, - global, - ] = matches; - - if (global) { - // Composing globals simply means changing these classes to wrap them in global(name) - tmpSymbols = symbols.split(/\s+/).map((s) => `global(${s})`); - } else { - const importPath = doubleQuotePath || singleQuotePath; - - let parent = declaration.parent; - let parentIndexes = ""; - - while (parent.type !== "root") { - parentIndexes = - parent.parent.index(parent) + "_" + parentIndexes; - parent = parent.parent; - } - - const { selector } = declaration.parent; - const parentRule = `_${parentIndexes}${selector}`; - - addImportToGraph(importPath, parentRule, graph, visited); - - importDecls[importPath] = declaration; - imports[importPath] = imports[importPath] || {}; - - tmpSymbols = symbols.split(/\s+/).map((s) => { - if (!imports[importPath][s]) { - imports[importPath][s] = createImportedName(s, importPath); - } - - return imports[importPath][s]; - }); - } - - declaration.value = tmpSymbols.join(" "); - }); - - const importsOrder = topologicalSort_1(graph, failOnWrongOrder); - - if (importsOrder instanceof Error) { - const importPath = importsOrder.nodes.find((importPath) => - // eslint-disable-next-line no-prototype-builtins - importDecls.hasOwnProperty(importPath) - ); - const decl = importDecls[importPath]; - - throw decl.error( - "Failed to resolve order of composed modules " + - importsOrder.nodes - .map((importPath) => "`" + importPath + "`") - .join(", ") + - ".", - { - plugin: "postcss-modules-extract-imports", - word: "composes", - } - ); - } - - let lastImportRule; - - importsOrder.forEach((path) => { - const importedSymbols = imports[path]; - let rule = existingImports[path]; - - if (!rule && importedSymbols) { - rule = postcss.rule({ - selector: `:import("${path}")`, - raws: { after: "\n" }, - }); - - if (lastImportRule) { - root.insertAfter(lastImportRule, rule); - } else { - root.prepend(rule); - } - } - - lastImportRule = rule; - - if (!importedSymbols) { - return; - } - - Object.keys(importedSymbols).forEach((importedSymbol) => { - rule.append( - postcss.decl({ - value: importedSymbol, - prop: importedSymbols[importedSymbol], - raws: { before: "\n " }, - }) - ); - }); - }); - }, - }; - }, - }; -}; - -var postcss$1 = true; -src$2.postcss = postcss$1; - -const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwnProperty = Object.prototype.hasOwnProperty; function getSingleLocalNamesForComposes(root) { return root.nodes.map((node) => { @@ -16772,7 +14686,7 @@ const unescapeRegExp = new RegExp( "ig" ); -function unescape(str) { +function unescape$1(str) { return str.replace(unescapeRegExp, (_, escaped, escapedWhitespace) => { const high = "0x" + escaped - 0x10000; @@ -16829,14 +14743,14 @@ const plugin = (options = {}) => { node.nodes = node.map(localizeNode); return node; case "class": - return dist.className({ + return selectorParser.className({ value: exportScopedName( node.value, node.raws && node.raws.value ? node.raws.value : null ), }); case "id": { - return dist.id({ + return selectorParser.id({ value: exportScopedName( node.value, node.raws && node.raws.value ? node.raws.value : null @@ -16905,7 +14819,7 @@ const plugin = (options = {}) => { // Find any :local selectors root.walkRules((rule) => { - let parsedSelector = dist().astSync(rule); + let parsedSelector = selectorParser().astSync(rule); rule.selector = traverseNode(parsedSelector.clone()).toString(); @@ -16920,11 +14834,11 @@ const plugin = (options = {}) => { localNames.forEach((exportedName) => { exports[exportedName].push(global[1]); }); - } else if (hasOwnProperty$1.call(importedNames, className)) { + } else if (hasOwnProperty.call(importedNames, className)) { localNames.forEach((exportedName) => { exports[exportedName].push(className); }); - } else if (hasOwnProperty$1.call(exports, className)) { + } else if (hasOwnProperty.call(exports, className)) { localNames.forEach((exportedName) => { exports[className].forEach((item) => { exports[exportedName].push(item); @@ -17019,18 +14933,38 @@ plugin.generateScopedName = function (name, path) { plugin.generateExportEntry = function (name, scopedName) { return { - key: unescape(name), - value: unescape(scopedName), + key: unescape$1(name), + value: unescape$1(scopedName), }; }; -var src$3 = plugin; +var src$1 = plugin; -const matchImports$1 = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; +function hash(str) { + var hash = 5381, + i = str.length; + + while(i) { + hash = (hash * 33) ^ str.charCodeAt(--i); + } + + /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed + * integers. Since we want the results to be always positive, convert the + * signed int to an unsigned by doing an unsigned bitshift. */ + return hash >>> 0; +} + +var stringHash = hash; + +var src = {exports: {}}; + +const ICSSUtils = src$4; + +const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; const matchValueDefinition = /(?:\s+|^)([\w-]+):?(.*?)$/; const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; -var src$4 = (options) => { +src.exports = (options) => { let importIndex = 0; const createImportedName = (options && options.createImportedName) || @@ -17046,7 +14980,7 @@ var src$4 = (options) => { return { Once(root, postcss) { root.walkAtRules(/value/i, (atRule) => { - const matches = atRule.params.match(matchImports$1); + const matches = atRule.params.match(matchImports); if (matches) { let [, /*match*/ aliases, path] = matches; @@ -17103,7 +15037,7 @@ var src$4 = (options) => { } // Add to the definitions, knowing that values can refer to each other - definitions[key] = src.replaceValueSymbols( + definitions[key] = ICSSUtils.replaceValueSymbols( value, definitions ); @@ -17117,7 +15051,7 @@ var src$4 = (options) => { } /* Perform replacements */ - src.replaceSymbols(root, definitions); + ICSSUtils.replaceSymbols(root, definitions); /* We want to export anything defined by now, but don't add it to the CSS yet or it well get picked up by the replacement stuff */ const exportDeclarations = Object.keys(definitions).map((key) => @@ -17163,121 +15097,108 @@ var src$4 = (options) => { }; }; -var postcss$2 = true; -src$4.postcss = postcss$2; +src.exports.postcss = true; -var behaviours_1 = createCommonjsModule(function (module, exports) { +var srcExports = src.exports; -Object.defineProperty(exports, "__esModule", { +Object.defineProperty(scoping, "__esModule", { value: true }); -exports.behaviours = undefined; -exports.getDefaultPlugins = getDefaultPlugins; -exports.isValidBehaviour = isValidBehaviour; +scoping.behaviours = void 0; +scoping.getDefaultPlugins = getDefaultPlugins; +scoping.getDefaultScopeBehaviour = getDefaultScopeBehaviour; +scoping.getScopedNameGenerator = getScopedNameGenerator; +var _postcssModulesExtractImports = _interopRequireDefault$1(srcExports$2); +var _genericNames = _interopRequireDefault$1(genericNames); -var _postcssModulesLocalByDefault2 = _interopRequireDefault(src$1); +var _postcssModulesLocalByDefault = _interopRequireDefault$1(srcExports$1); +var _postcssModulesScope = _interopRequireDefault$1(src$1); +var _stringHash = _interopRequireDefault$1(stringHash); -var _postcssModulesExtractImports2 = _interopRequireDefault(src$2); +var _postcssModulesValues = _interopRequireDefault$1(srcExports); +function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _postcssModulesScope2 = _interopRequireDefault(src$3); - - - -var _postcssModulesValues2 = _interopRequireDefault(src$4); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const behaviours = exports.behaviours = { +const behaviours = { LOCAL: "local", GLOBAL: "global" }; +scoping.behaviours = behaviours; function getDefaultPlugins({ behaviour, generateScopedName, exportGlobals }) { - const scope = (0, _postcssModulesScope2.default)({ generateScopedName, exportGlobals }); - + const scope = (0, _postcssModulesScope.default)({ + generateScopedName, + exportGlobals + }); const plugins = { - [behaviours.LOCAL]: [_postcssModulesValues2.default, _postcssModulesLocalByDefault2.default, _postcssModulesExtractImports2.default, scope], - [behaviours.GLOBAL]: [_postcssModulesValues2.default, _postcssModulesExtractImports2.default, scope] + [behaviours.LOCAL]: [_postcssModulesValues.default, (0, _postcssModulesLocalByDefault.default)({ + mode: "local" + }), _postcssModulesExtractImports.default, scope], + [behaviours.GLOBAL]: [_postcssModulesValues.default, (0, _postcssModulesLocalByDefault.default)({ + mode: "global" + }), _postcssModulesExtractImports.default, scope] }; - return plugins[behaviour]; } function isValidBehaviour(behaviour) { return Object.keys(behaviours).map(key => behaviours[key]).indexOf(behaviour) > -1; } -}); -var _postcss2$1 = _interopRequireDefault$3(_postcss__default); - - - -var _lodash2 = _interopRequireDefault$3(lodash_camelcase); - - - -var _genericNames2 = _interopRequireDefault$3(genericNames); - - - -var _unquote2 = _interopRequireDefault$3(unquote_1); - - - -var _parser2$1 = _interopRequireDefault$3(parser$1); - - - -var _loader2 = _interopRequireDefault$3(loader); - - - -var _generateScopedName2 = _interopRequireDefault$3(generateScopedName_1); - - - -var _saveJSON2 = _interopRequireDefault$3(saveJSON_1); - - - -function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } - -const PLUGIN_NAME = "postcss-modules"; - -function getDefaultScopeBehaviour(opts) { - if (opts.scopeBehaviour && (0, behaviours_1.isValidBehaviour)(opts.scopeBehaviour)) { - return opts.scopeBehaviour; - } - - return behaviours_1.behaviours.LOCAL; +function getDefaultScopeBehaviour(scopeBehaviour) { + return scopeBehaviour && isValidBehaviour(scopeBehaviour) ? scopeBehaviour : behaviours.LOCAL; } -function getScopedNameGenerator(opts) { - const scopedNameGenerator = opts.generateScopedName || _generateScopedName2.default; +function generateScopedNameDefault(name, filename, css) { + const i = css.indexOf(`.${name}`); + const lineNumber = css.substr(0, i).split(/[\r\n]/).length; + const hash = (0, _stringHash.default)(css).toString(36).substr(0, 5); + return `_${name}_${hash}_${lineNumber}`; +} - if (typeof scopedNameGenerator === "function") return scopedNameGenerator; - return (0, _genericNames2.default)(scopedNameGenerator, { +function getScopedNameGenerator(generateScopedName, hashPrefix) { + const scopedNameGenerator = generateScopedName || generateScopedNameDefault; + + if (typeof scopedNameGenerator === "function") { + return scopedNameGenerator; + } + + return (0, _genericNames.default)(scopedNameGenerator, { context: process.cwd(), - hashPrefix: opts.hashPrefix + hashPrefix: hashPrefix }); } -function getLoader(opts, plugins) { - const root = typeof opts.root === "undefined" ? "/" : opts.root; - return typeof opts.Loader === "function" ? new opts.Loader(root, plugins) : new _loader2.default(root, plugins); -} +Object.defineProperty(pluginFactory, "__esModule", { + value: true +}); +pluginFactory.makePlugin = makePlugin; + +var _postcss = _interopRequireDefault(require$$0$1); + +var _unquote = _interopRequireDefault(unquote$1); + +var _Parser = _interopRequireDefault(Parser$1); + +var _saveJSON = _interopRequireDefault(saveJSON$1); + +var _localsConvention = localsConvention; + +var _FileSystemLoader = _interopRequireDefault(FileSystemLoader$1); + +var _scoping = scoping; + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const PLUGIN_NAME = "postcss-modules"; function isGlobalModule(globalModules, inputFile) { return globalModules.some(regex => inputFile.match(regex)); @@ -17286,253 +15207,5439 @@ function isGlobalModule(globalModules, inputFile) { function getDefaultPluginsList(opts, inputFile) { const globalModulesList = opts.globalModulePaths || null; const exportGlobals = opts.exportGlobals || false; - const defaultBehaviour = getDefaultScopeBehaviour(opts); - const generateScopedName = getScopedNameGenerator(opts); + const defaultBehaviour = (0, _scoping.getDefaultScopeBehaviour)(opts.scopeBehaviour); + const generateScopedName = (0, _scoping.getScopedNameGenerator)(opts.generateScopedName, opts.hashPrefix); if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) { - return (0, behaviours_1.getDefaultPlugins)({ - behaviour: behaviours_1.behaviours.GLOBAL, + return (0, _scoping.getDefaultPlugins)({ + behaviour: _scoping.behaviours.GLOBAL, generateScopedName, exportGlobals }); } - return (0, behaviours_1.getDefaultPlugins)({ + return (0, _scoping.getDefaultPlugins)({ behaviour: defaultBehaviour, generateScopedName, exportGlobals }); } +function getLoader(opts, plugins) { + const root = typeof opts.root === "undefined" ? "/" : opts.root; + return typeof opts.Loader === "function" ? new opts.Loader(root, plugins, opts.resolve) : new _FileSystemLoader.default(root, plugins, opts.resolve); +} + function isOurPlugin(plugin) { return plugin.postcssPlugin === PLUGIN_NAME; } -function dashesCamelCase(string) { - return string.replace(/-+(\w)/g, (_, firstLetter) => firstLetter.toUpperCase()); -} - -var build = (opts = {}) => { +function makePlugin(opts) { return { postcssPlugin: PLUGIN_NAME, - OnceExit(css, { result }) { - return _asyncToGenerator(function* () { - const getJSON = opts.getJSON || _saveJSON2.default; - const inputFile = css.source.input.file; - const pluginList = getDefaultPluginsList(opts, inputFile); - const resultPluginIndex = result.processor.plugins.findIndex(function (plugin) { - return isOurPlugin(plugin); - }); - if (resultPluginIndex === -1) { - throw new Error('Plugin missing from options.'); - } - const earlierPlugins = result.processor.plugins.slice(0, resultPluginIndex); - const loaderPlugins = [...earlierPlugins, ...pluginList]; - const loader = getLoader(opts, loaderPlugins); - const fetcher = function fetcher(file, relativeTo, depTrace) { - const unquoteFile = (0, _unquote2.default)(file); - const resolvedResult = typeof opts.resolve === 'function' && opts.resolve(unquoteFile); - const resolvedFile = resolvedResult instanceof Promise ? resolvedResult : Promise.resolve(resolvedResult); - return resolvedFile.then(function (f) { - return loader.fetch.call(loader, `"${f || unquoteFile}"`, relativeTo, depTrace); - }); - }; - const parser = new _parser2$1.default(fetcher); + async OnceExit(css, { + result + }) { + const getJSON = opts.getJSON || _saveJSON.default; + const inputFile = css.source.input.file; + const pluginList = getDefaultPluginsList(opts, inputFile); + const resultPluginIndex = result.processor.plugins.findIndex(plugin => isOurPlugin(plugin)); - yield (0, _postcss2$1.default)([...pluginList, parser.plugin()]).process(css, { - from: inputFile - }); + if (resultPluginIndex === -1) { + throw new Error("Plugin missing from options."); + } - const out = loader.finalSource; - if (out) css.prepend(out); + const earlierPlugins = result.processor.plugins.slice(0, resultPluginIndex); + const loaderPlugins = [...earlierPlugins, ...pluginList]; + const loader = getLoader(opts, loaderPlugins); - if (opts.localsConvention) { - const isFunc = typeof opts.localsConvention === "function"; + const fetcher = async (file, relativeTo, depTrace) => { + const unquoteFile = (0, _unquote.default)(file); + return loader.fetch.call(loader, unquoteFile, relativeTo, depTrace); + }; - parser.exportTokens = Object.entries(parser.exportTokens).reduce(function (tokens, [className, value]) { - if (isFunc) { - tokens[opts.localsConvention(className, value, inputFile)] = value; + const parser = new _Parser.default(fetcher); + await (0, _postcss.default)([...pluginList, parser.plugin()]).process(css, { + from: inputFile + }); + const out = loader.finalSource; + if (out) css.prepend(out); - return tokens; - } + if (opts.localsConvention) { + const reducer = (0, _localsConvention.makeLocalsConventionReducer)(opts.localsConvention, inputFile); + parser.exportTokens = Object.entries(parser.exportTokens).reduce(reducer, {}); + } - switch (opts.localsConvention) { - case "camelCase": - tokens[className] = value; - tokens[(0, _lodash2.default)(className)] = value; + result.messages.push({ + type: "export", + plugin: "postcss-modules", + exportTokens: parser.exportTokens + }); // getJSON may return a promise - break; - case "camelCaseOnly": - tokens[(0, _lodash2.default)(className)] = value; - - break; - case "dashes": - tokens[className] = value; - tokens[dashesCamelCase(className)] = value; - - break; - case "dashesOnly": - tokens[dashesCamelCase(className)] = value; - - break; - } - - return tokens; - }, {}); - } - - result.messages.push({ - type: "export", - plugin: "postcss-modules", - exportTokens: parser.exportTokens - }); - - // getJSON may return a promise - return getJSON(css.source.input.file, parser.exportTokens, result.opts.to); - })(); + return getJSON(css.source.input.file, parser.exportTokens, result.opts.to); } - }; -}; -var postcss$3 = true; -build.postcss = postcss$3; + }; +} + +var _fs = require$$0; + +var _fs2 = fs; + +var _pluginFactory = pluginFactory; + +(0, _fs2.setFileSystem)({ + readFile: _fs.readFile, + writeFile: _fs.writeFile +}); + +build.exports = (opts = {}) => (0, _pluginFactory.makePlugin)(opts); + +build.exports.postcss = true; + +var buildExports = build.exports; +var postcssModules = /*@__PURE__*/getDefaultExportFromCjs(buildExports); function compileStyle(options) { - return doCompileStyle({ - ...options, - isAsync: false - }); + return doCompileStyle({ + ...options, + isAsync: false + }); } function compileStyleAsync(options) { - return doCompileStyle({ - ...options, - isAsync: true - }); + return doCompileStyle({ + ...options, + isAsync: true + }); } function doCompileStyle(options) { - const { filename, id, scoped = false, trim = true, isProd = false, modules = false, modulesOptions = {}, preprocessLang, postcssOptions, postcssPlugins } = options; - const preprocessor = preprocessLang && processors[preprocessLang]; - const preProcessedSource = preprocessor && preprocess$1(options, preprocessor); - const map = preProcessedSource - ? preProcessedSource.map - : options.inMap || options.map; - const source = preProcessedSource ? preProcessedSource.code : options.source; - const shortId = id.replace(/^data-v-/, ''); - const longId = `data-v-${shortId}`; - const plugins = (postcssPlugins || []).slice(); - plugins.unshift(cssVarsPlugin({ id: shortId, isProd })); - if (trim) { - plugins.push(trimPlugin()); + const { + filename, + id, + scoped = false, + trim = true, + isProd = false, + modules = false, + modulesOptions = {}, + preprocessLang, + postcssOptions, + postcssPlugins + } = options; + const preprocessor = preprocessLang && processors[preprocessLang]; + const preProcessedSource = preprocessor && preprocess(options, preprocessor); + const map = preProcessedSource ? preProcessedSource.map : options.inMap || options.map; + const source = preProcessedSource ? preProcessedSource.code : options.source; + const shortId = id.replace(/^data-v-/, ""); + const longId = `data-v-${shortId}`; + const plugins = (postcssPlugins || []).slice(); + plugins.unshift(cssVarsPlugin({ id: shortId, isProd })); + if (trim) { + plugins.push(trimPlugin$1()); + } + if (scoped) { + plugins.push(scopedPlugin$1(longId)); + } + let cssModules; + if (modules) { + if (!options.isAsync) { + throw new Error( + "[@vue/compiler-sfc] `modules` option can only be used with compileStyleAsync()." + ); } - if (scoped) { - plugins.push(scopedPlugin(longId)); - } - let cssModules; - if (modules) { - if (!options.isAsync) { - throw new Error('[@vue/compiler-sfc] `modules` option can only be used with compileStyleAsync().'); + plugins.push( + postcssModules({ + ...modulesOptions, + getJSON: (_cssFileName, json) => { + cssModules = json; } - plugins.push(build({ - ...modulesOptions, - getJSON: (_cssFileName, json) => { - cssModules = json; - } - })); - } - const postCSSOptions = { - ...postcssOptions, - to: filename, - from: filename + }) + ); + } + const postCSSOptions = { + ...postcssOptions, + to: filename, + from: filename + }; + if (map) { + postCSSOptions.map = { + inline: false, + annotation: false, + prev: map }; - if (map) { - postCSSOptions.map = { - inline: false, - annotation: false, - prev: map - }; + } + let result; + let code; + let outMap; + const dependencies = new Set( + preProcessedSource ? preProcessedSource.dependencies : [] + ); + dependencies.delete(filename); + const errors = []; + if (preProcessedSource && preProcessedSource.errors.length) { + errors.push(...preProcessedSource.errors); + } + const recordPlainCssDependencies = (messages) => { + messages.forEach((msg) => { + if (msg.type === "dependency") { + dependencies.add(msg.file); + } + }); + return dependencies; + }; + try { + result = require$$0$1(plugins).process(source, postCSSOptions); + if (options.isAsync) { + return result.then((result2) => ({ + code: result2.css || "", + map: result2.map && result2.map.toJSON(), + errors, + modules: cssModules, + rawResult: result2, + dependencies: recordPlainCssDependencies(result2.messages) + })).catch((error) => ({ + code: "", + map: void 0, + errors: [...errors, error], + rawResult: void 0, + dependencies + })); } - let result; - let code; - let outMap; - // stylus output include plain css. so need remove the repeat item - const dependencies = new Set(preProcessedSource ? preProcessedSource.dependencies : []); - // sass has filename self when provided filename option - dependencies.delete(filename); - const errors = []; - if (preProcessedSource && preProcessedSource.errors.length) { - errors.push(...preProcessedSource.errors); + recordPlainCssDependencies(result.messages); + code = result.css; + outMap = result.map; + } catch (e) { + errors.push(e); + } + return { + code: code || ``, + map: outMap && outMap.toJSON(), + errors, + rawResult: result, + dependencies + }; +} +function preprocess(options, preprocessor) { + return preprocessor( + options.source, + options.inMap || options.map, + { + filename: options.filename, + ...options.preprocessOptions + }, + options.preprocessCustomRequire + ); +} + +function analyzeScriptBindings(ast) { + for (const node of ast) { + if (node.type === "ExportDefaultDeclaration" && node.declaration.type === "ObjectExpression") { + return analyzeBindingsFromOptions(node.declaration); } - const recordPlainCssDependencies = (messages) => { - messages.forEach(msg => { - if (msg.type === 'dependency') { - // postcss output path is absolute position path - dependencies.add(msg.file); - } - }); - return dependencies; - }; - try { - result = _postcss__default(plugins).process(source, postCSSOptions); - // In async mode, return a promise. - if (options.isAsync) { - return result - .then(result => ({ - code: result.css || '', - map: result.map && result.map.toJSON(), - errors, - modules: cssModules, - rawResult: result, - dependencies: recordPlainCssDependencies(result.messages) - })) - .catch(error => ({ - code: '', - map: undefined, - errors: [...errors, error], - rawResult: undefined, - dependencies - })); + } + return {}; +} +function analyzeBindingsFromOptions(node) { + const bindings = {}; + Object.defineProperty(bindings, "__isScriptSetup", { + enumerable: false, + value: false + }); + for (const property of node.properties) { + if (property.type === "ObjectProperty" && !property.computed && property.key.type === "Identifier") { + if (property.key.name === "props") { + for (const key of getObjectOrArrayExpressionKeys(property.value)) { + bindings[key] = "props"; } - recordPlainCssDependencies(result.messages); - // force synchronous transform (we know we only have sync plugins) - code = result.css; - outMap = result.map; + } else if (property.key.name === "inject") { + for (const key of getObjectOrArrayExpressionKeys(property.value)) { + bindings[key] = "options"; + } + } else if (property.value.type === "ObjectExpression" && (property.key.name === "computed" || property.key.name === "methods")) { + for (const key of getObjectExpressionKeys(property.value)) { + bindings[key] = "options"; + } + } + } else if (property.type === "ObjectMethod" && property.key.type === "Identifier" && (property.key.name === "setup" || property.key.name === "data")) { + for (const bodyItem of property.body.body) { + if (bodyItem.type === "ReturnStatement" && bodyItem.argument && bodyItem.argument.type === "ObjectExpression") { + for (const key of getObjectExpressionKeys(bodyItem.argument)) { + bindings[key] = property.key.name === "setup" ? "setup-maybe-ref" : "data"; + } + } + } } - catch (e) { - errors.push(e); + } + return bindings; +} +function getObjectExpressionKeys(node) { + const keys = []; + for (const prop of node.properties) { + if (prop.type === "SpreadElement") + continue; + const key = resolveObjectKey(prop.key, prop.computed); + if (key) + keys.push(String(key)); + } + return keys; +} +function getArrayExpressionKeys(node) { + const keys = []; + for (const element of node.elements) { + if (element && element.type === "StringLiteral") { + keys.push(element.value); + } + } + return keys; +} +function getObjectOrArrayExpressionKeys(value) { + if (value.type === "ArrayExpression") { + return getArrayExpressionKeys(value); + } + if (value.type === "ObjectExpression") { + return getObjectExpressionKeys(value); + } + return []; +} + +var _a, _b; +class ScriptCompileContext { + constructor(descriptor, options) { + this.descriptor = descriptor; + this.options = options; + this.isCE = false; + this.source = this.descriptor.source; + this.filename = this.descriptor.filename; + this.s = new MagicString(this.source); + this.startOffset = (_a = this.descriptor.scriptSetup) == null ? void 0 : _a.loc.start.offset; + this.endOffset = (_b = this.descriptor.scriptSetup) == null ? void 0 : _b.loc.end.offset; + this.userImports = /* @__PURE__ */ Object.create(null); + // macros presence check + this.hasDefinePropsCall = false; + this.hasDefineEmitCall = false; + this.hasDefineExposeCall = false; + this.hasDefaultExportName = false; + this.hasDefaultExportRender = false; + this.hasDefineOptionsCall = false; + this.hasDefineSlotsCall = false; + this.hasDefineModelCall = false; + this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null); + // defineModel + this.modelDecls = /* @__PURE__ */ Object.create(null); + // codegen + this.bindingMetadata = {}; + this.helperImports = /* @__PURE__ */ new Set(); + const { script, scriptSetup } = descriptor; + const scriptLang = script && script.lang; + const scriptSetupLang = scriptSetup && scriptSetup.lang; + this.isJS = scriptLang === "js" || scriptLang === "jsx" || scriptSetupLang === "js" || scriptSetupLang === "jsx"; + this.isTS = scriptLang === "ts" || scriptLang === "tsx" || scriptSetupLang === "ts" || scriptSetupLang === "tsx"; + const customElement = options.customElement; + const filename = this.descriptor.filename; + if (customElement) { + this.isCE = typeof customElement === "boolean" ? customElement : customElement(filename); + } + const plugins = resolveParserPlugins( + scriptLang || scriptSetupLang, + options.babelParserPlugins + ); + function parse(input, offset) { + try { + return parser$1.parse(input, { + plugins, + sourceType: "module" + }).program; + } catch (e) { + e.message = `[vue/compiler-sfc] ${e.message} + +${descriptor.filename} +${shared.generateCodeFrame( + descriptor.source, + e.pos + offset, + e.pos + offset + 1 + )}`; + throw e; + } + } + this.scriptAst = descriptor.script && parse(descriptor.script.content, descriptor.script.loc.start.offset); + this.scriptSetupAst = descriptor.scriptSetup && parse(descriptor.scriptSetup.content, this.startOffset); + } + helper(key) { + this.helperImports.add(key); + return `_${key}`; + } + getString(node, scriptSetup = true) { + const block = scriptSetup ? this.descriptor.scriptSetup : this.descriptor.script; + return block.content.slice(node.start, node.end); + } + error(msg, node, scope) { + const offset = scope ? scope.offset : this.startOffset; + throw new Error( + `[@vue/compiler-sfc] ${msg} + +${(scope || this.descriptor).filename} +${shared.generateCodeFrame( + (scope || this.descriptor).source, + node.start + offset, + node.end + offset + )}` + ); + } +} +function resolveParserPlugins(lang, userPlugins, dts = false) { + const plugins = []; + if (!userPlugins || !userPlugins.some( + (p) => p === "importAssertions" || p === "importAttributes" || shared.isArray(p) && p[0] === "importAttributes" + )) { + plugins.push("importAttributes"); + } + if (lang === "jsx" || lang === "tsx") { + plugins.push("jsx"); + } else if (userPlugins) { + userPlugins = userPlugins.filter((p) => p !== "jsx"); + } + if (lang === "ts" || lang === "tsx") { + plugins.push(["typescript", { dts }], "explicitResourceManagement"); + if (!userPlugins || !userPlugins.includes("decorators")) { + plugins.push("decorators-legacy"); + } + } + if (userPlugins) { + plugins.push(...userPlugins); + } + return plugins; +} + +function rewriteDefault(input, as, parserPlugins) { + const ast = parser$1.parse(input, { + sourceType: "module", + plugins: resolveParserPlugins("js", parserPlugins) + }).program.body; + const s = new MagicString(input); + rewriteDefaultAST(ast, s, as); + return s.toString(); +} +function rewriteDefaultAST(ast, s, as) { + if (!hasDefaultExport(ast)) { + s.append(` +const ${as} = {}`); + return; + } + ast.forEach((node) => { + if (node.type === "ExportDefaultDeclaration") { + if (node.declaration.type === "ClassDeclaration" && node.declaration.id) { + let start = node.declaration.decorators && node.declaration.decorators.length > 0 ? node.declaration.decorators[node.declaration.decorators.length - 1].end : node.start; + s.overwrite(start, node.declaration.id.start, ` class `); + s.append(` +const ${as} = ${node.declaration.id.name}`); + } else { + s.overwrite(node.start, node.declaration.start, `const ${as} = `); + } + } else if (node.type === "ExportNamedDeclaration") { + for (const specifier of node.specifiers) { + if (specifier.type === "ExportSpecifier" && specifier.exported.type === "Identifier" && specifier.exported.name === "default") { + if (node.source) { + if (specifier.local.name === "default") { + s.prepend( + `import { default as __VUE_DEFAULT__ } from '${node.source.value}' +` + ); + const end2 = specifierEnd(s, specifier.local.end, node.end); + s.remove(specifier.start, end2); + s.append(` +const ${as} = __VUE_DEFAULT__`); + continue; + } else { + s.prepend( + `import { ${s.slice( + specifier.local.start, + specifier.local.end + )} as __VUE_DEFAULT__ } from '${node.source.value}' +` + ); + const end2 = specifierEnd(s, specifier.exported.end, node.end); + s.remove(specifier.start, end2); + s.append(` +const ${as} = __VUE_DEFAULT__`); + continue; + } + } + const end = specifierEnd(s, specifier.end, node.end); + s.remove(specifier.start, end); + s.append(` +const ${as} = ${specifier.local.name}`); + } + } + } + }); +} +function hasDefaultExport(ast) { + for (const stmt of ast) { + if (stmt.type === "ExportDefaultDeclaration") { + return true; + } else if (stmt.type === "ExportNamedDeclaration" && stmt.specifiers.some( + (spec) => spec.exported.name === "default" + )) { + return true; + } + } + return false; +} +function specifierEnd(s, end, nodeEnd) { + let hasCommas = false; + let oldEnd = end; + while (end < nodeEnd) { + if (/\s/.test(s.slice(end, end + 1))) { + end++; + } else if (s.slice(end, end + 1) === ",") { + end++; + hasCommas = true; + break; + } else if (s.slice(end, end + 1) === "}") { + break; + } + } + return hasCommas ? end : oldEnd; +} + +const normalScriptDefaultVar = `__default__`; +function processNormalScript(ctx, scopeId) { + var _a; + const script = ctx.descriptor.script; + if (script.lang && !ctx.isJS && !ctx.isTS) { + return script; + } + try { + let content = script.content; + let map = script.map; + const scriptAst = ctx.scriptAst; + const bindings = analyzeScriptBindings(scriptAst.body); + const { cssVars } = ctx.descriptor; + const { genDefaultAs, isProd } = ctx.options; + if (cssVars.length || genDefaultAs) { + const defaultVar = genDefaultAs || normalScriptDefaultVar; + const s = new MagicString(content); + rewriteDefaultAST(scriptAst.body, s, defaultVar); + content = s.toString(); + if (cssVars.length && !((_a = ctx.options.templateOptions) == null ? void 0 : _a.ssr)) { + content += genNormalScriptCssVarsCode( + cssVars, + bindings, + scopeId, + !!isProd, + defaultVar + ); + } + if (!genDefaultAs) { + content += ` +export default ${defaultVar}`; + } } return { - code: code || ``, - map: outMap && outMap.toJSON(), - errors, - rawResult: result, - dependencies + ...script, + content, + map, + bindings, + scriptAst: scriptAst.body }; -} -function preprocess$1(options, preprocessor) { - return preprocessor(options.source, options.inMap || options.map, { - filename: options.filename, - ...options.preprocessOptions - }, options.preprocessCustomRequire); + } catch (e) { + return script; + } } -// API -const walk$1 = estreeWalker.walk; +var balancedMatch = balanced$1; +function balanced$1(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced$1.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + +var balanced = balancedMatch; + +var braceExpansion = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m) return [str]; + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + if (/\$$/.test(m.pre)) { + for (var k = 0; k < post.length; k++) { + var expansion = pre+ '{' + m.body + '}' + post[k]; + expansions.push(expansion); + } + } else { + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = []; + + for (var j = 0; j < n.length; j++) { + N.push.apply(N, expand(n[j], false)); + } + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + } + + return expansions; +} + +var expand$1 = /*@__PURE__*/getDefaultExportFromCjs(braceExpansion); + +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; + +// translate the various posix character classes into unicode properties +// this works across all unicode locales +// { <posix class>: [<translation>, /u flag required, negated] +const posixClasses = { + '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], + '[:alpha:]': ['\\p{L}\\p{Nl}', true], + '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], + '[:blank:]': ['\\p{Zs}\\t', true], + '[:cntrl:]': ['\\p{Cc}', true], + '[:digit:]': ['\\p{Nd}', true], + '[:graph:]': ['\\p{Z}\\p{C}', true, true], + '[:lower:]': ['\\p{Ll}', true], + '[:print:]': ['\\p{C}', true], + '[:punct:]': ['\\p{P}', true], + '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], + '[:upper:]': ['\\p{Lu}', true], + '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], + '[:xdigit:]': ['A-Fa-f0-9', false], +}; +// only need to escape a few things inside of brace expressions +// escapes: [ \ ] - +const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); +// escape all regexp magic characters +const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// everything has already been escaped, we just have to join +const rangesToString = (ranges) => ranges.join(''); +// takes a glob string at a posix brace expression, and returns +// an equivalent regular expression source, and boolean indicating +// whether the /u flag needs to be applied, and the number of chars +// consumed to parse the character class. +// This also removes out of order ranges, and returns ($.) if the +// entire class just no good. +const parseClass = (glob, position) => { + const pos = position; + /* c8 ignore start */ + if (glob.charAt(pos) !== '[') { + throw new Error('not in a brace expression'); + } + /* c8 ignore stop */ + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ''; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === '!' || c === '^') && i === pos + 1) { + negate = true; + i++; + continue; + } + if (c === ']' && sawStart && !escaping) { + endPos = i + 1; + break; + } + sawStart = true; + if (c === '\\') { + if (!escaping) { + escaping = true; + i++; + continue; + } + // escaped \ char, fall through and treat like normal char + } + if (c === '[' && !escaping) { + // either a posix class, a collation equivalent, or just a [ + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + // invalid, [a-[] is fine, but not [a-[:alpha]] + if (rangeStart) { + return ['$.', false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } + } + } + // now it's just a normal character, effectively + escaping = false; + if (rangeStart) { + // throw this range away if it's not valid, but others + // can still match. + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); + } + else if (c === rangeStart) { + ranges.push(braceEscape(c)); + } + rangeStart = ''; + i++; + continue; + } + // now might be the start of a range. + // can be either c-d or c-] or c<more...>] or c] at this point + if (glob.startsWith('-]', i + 1)) { + ranges.push(braceEscape(c + '-')); + i += 2; + continue; + } + if (glob.startsWith('-', i + 1)) { + rangeStart = c; + i += 2; + continue; + } + // not the start of a range, just a single character + ranges.push(braceEscape(c)); + i++; + } + if (endPos < i) { + // didn't see the end of the class, not a valid class, + // but might still be valid as a literal match. + return ['', false, 0, false]; + } + // if we got no ranges and no negates, then we have a range that + // cannot possibly match anything, and that poisons the whole glob + if (!ranges.length && !negs.length) { + return ['$.', false, glob.length - pos, true]; + } + // if we got one positive range, and it's a single character, then that's + // not actually a magic pattern, it's just that one literal character. + // we should not treat that as "magic", we should just return the literal + // character. [_] is a perfectly valid way to escape glob magic chars. + if (negs.length === 0 && + ranges.length === 1 && + /^\\?.$/.test(ranges[0]) && + !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; + const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; + const comb = ranges.length && negs.length + ? '(' + sranges + '|' + snegs + ')' + : ranges.length + ? sranges + : snegs; + return [comb, uflag, endPos - pos, true]; +}; + +/** + * Un-escape a string that has been escaped with {@link escape}. + * + * If the {@link windowsPathsNoEscape} option is used, then square-brace + * escapes are removed, but not backslash escapes. For example, it will turn + * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`, + * becuase `\` is a path separator in `windowsPathsNoEscape` mode. + * + * When `windowsPathsNoEscape` is not set, then both brace escapes and + * backslash escapes are removed. + * + * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped + * or unescaped. + */ +const unescape = (s, { windowsPathsNoEscape = false, } = {}) => { + return windowsPathsNoEscape + ? s.replace(/\[([^\/\\])\]/g, '$1') + : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1'); +}; + +// parse a single path portion +const types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => types.has(c); +// Patterns that get prepended to bind to the start of either the +// entire string, or just a single path portion, to prevent dots +// and/or traversal patterns, when needed. +// Exts don't need the ^ or / bit, because the root binds that already. +const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; +const startNoDot = '(?!\\.)'; +// characters that indicate a start of pattern needs the "no dots" bit, +// because a dot *might* be matched. ( is not in the list, because in +// the case of a child extglob, it will handle the prevention itself. +const addPatternStart = new Set(['[', '.']); +// cases where traversal is A-OK, no dot prevention needed +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape$1 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +const qmark$1 = '[^/]'; +// * => any number of characters +const star$1 = qmark$1 + '*?'; +// use + when we need to ensure that *something* matches, because the * is +// the only thing in the path portion. +const starNoEmpty = qmark$1 + '+?'; +// remove the \ chars that we added if we end up doing a nonmagic compare +// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') +class AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; + constructor(type, parent, options = {}) { + this.type = type; + // extglobs are inherently magical + if (type) + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + get hasMagic() { + /* c8 ignore start */ + if (this.#hasMagic !== undefined) + return this.#hasMagic; + /* c8 ignore stop */ + for (const p of this.#parts) { + if (typeof p === 'string') + continue; + if (p.type || p.hasMagic) + return (this.#hasMagic = true); + } + // note: will be undefined until we generate the regexp src and find out + return this.#hasMagic; + } + // reconstructs the pattern + toString() { + if (this.#toString !== undefined) + return this.#toString; + if (!this.type) { + return (this.#toString = this.#parts.map(p => String(p)).join('')); + } + else { + return (this.#toString = + this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); + } + } + #fillNegs() { + /* c8 ignore start */ + if (this !== this.#root) + throw new Error('should only call on root'); + if (this.#filledNegs) + return this; + /* c8 ignore stop */ + // call toString() once to fill this out + this.toString(); + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); + } + } + toJSON() { + const ret = this.type === null + ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + : [this.type, ...this.#parts.map(p => p.toJSON())]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) + return false; + if (this.#parentIndex === 0) + return true; + // if everything AHEAD of this is a negation, then it's still the "start" + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; + if (!(pp instanceof AST && pp.type === '!')) { + return false; + } + } + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) + return false; + if (!this.type) + return this.#parent?.isEnd(); + // if not root, it'll always have a parent + /* c8 ignore start */ + const pl = this.#parent ? this.#parent.#parts.length : 0; + /* c8 ignore stop */ + return this.#parentIndex === pl - 1; + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + ast.push(acc); + acc = ''; + const ext = new AST(c, ast); + i = AST.#parseAST(str, ext, i, opt); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new AST(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === '(') { + part.push(acc); + acc = ''; + const ext = new AST(c, part); + part.push(ext); + i = AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new AST(null, ast); + continue; + } + if (c === ')') { + if (acc === '' && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // unfinished extglob + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#hasMagic = undefined; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new AST(null, undefined, options); + AST.#parseAST(pattern, ast, 0, options); + return ast; + } + // returns the regular expression if there's magic, or the unescaped + // string if not. + toMMPattern() { + // should only be called on root + /* c8 ignore start */ + if (this !== this.#root) + return this.#root.toMMPattern(); + /* c8 ignore stop */ + const glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + // if we're in nocase mode, and not nocaseMagicOnly, then we do + // still need a regular expression if we have to case-insensitively + // match capital/lowercase characters. + const anyMagic = hasMagic || + this.#hasMagic || + (this.#options.nocase && + !this.#options.nocaseMagicOnly && + glob.toUpperCase() !== glob.toLowerCase()); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob, + }); + } + // returns the string match, the regexp source, whether there's magic + // in the regexp (so a regular expression is required) and whether or + // not the uflag is needed for the regular expression (for posix classes) + // TODO: instead of injecting the start/end at this point, just return + // the BODY of the regexp, along with the start/end portions suitable + // for binding the start/end in either a joined full-path makeRe context + // (where we bind to (^|/), or a standalone matchPart context (where + // we bind to ^, and not /). Otherwise slashes get duped! + // + // In part-matching mode, the start is: + // - if not isStart: nothing + // - if traversal possible, but not allowed: ^(?!\.\.?$) + // - if dots allowed or not possible: ^ + // - if dots possible and not allowed: ^(?!\.) + // end is: + // - if not isEnd(): nothing + // - else: $ + // + // In full-path matching mode, we put the slash at the START of the + // pattern, so start is: + // - if first pattern: same as part-matching mode + // - if not isStart(): nothing + // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) + // - if dots allowed or not possible: / + // - if dots possible and not allowed: /(?!\.) + // end is: + // - if last pattern, same as part-matching mode + // - else nothing + // + // Always put the (?:$|/) on negated tails, though, because that has to be + // there to bind the end of the negated pattern portion, and it's easier to + // just stick it in now rather than try to inject it later in the middle of + // the pattern. + // + // We can just always return the same end, and leave it up to the caller + // to know whether it's going to be used joined or in parts. + // And, if the start is adjusted slightly, can do the same there: + // - if not isStart: nothing + // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) + // - if dots allowed or not possible: (?:/|^) + // - if dots possible and not allowed: (?:/|^)(?!\.) + // + // But it's better to have a simpler binding without a conditional, for + // performance, so probably better to return both start options. + // + // Then the caller just ignores the end if it's not the first pattern, + // and the start always gets applied. + // + // But that's always going to be $ if it's the ending pattern, or nothing, + // so the caller can just attach $ at the end of the pattern when building. + // + // So the todo is: + // - better detect what kind of start is needed + // - return both flavors of starting pattern + // - attach $ at the end of the pattern when creating the actual RegExp + // + // Ah, but wait, no, that all only applies to the root when the first pattern + // is not an extglob. If the first pattern IS an extglob, then we need all + // that dot prevention biz to live in the extglob portions, because eg + // +(*|.x*) can match .xy but not .yx. + // + // So, return the two flavors if it's #root and the first child is not an + // AST, otherwise leave it to the child AST to handle it, and there, + // use the (?:^|/) style of start binding. + // + // Even simplified further: + // - Since the start for a join is eg /(?!\.) and the start for a part + // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root + // or start or whatever) and prepend ^ or / at the Regexp construction. + toRegExpSource(allowDot) { + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) + this.#fillNegs(); + if (!this.type) { + const noEmpty = this.isStart() && this.isEnd(); + const src = this.#parts + .map(p => { + const [re, _, hasMagic, uflag] = typeof p === 'string' + ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; + return re; + }) + .join(''); + let start = ''; + if (this.isStart()) { + if (typeof this.#parts[0] === 'string') { + // this is the string that will match the start of the pattern, + // so we need to protect against dots and such. + // '.' and '..' cannot match unless the pattern is that exactly, + // even if it starts with . or dot:true is set. + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (!dotTravAllowed) { + const aps = addPatternStart; + // check if we have a possibility of matching . or .., + // and prevent that. + const needNoTrav = + // dots are allowed, and the pattern starts with [ or . + (dot && aps.has(src.charAt(0))) || + // the pattern starts with \., and then [ or . + (src.startsWith('\\.') && aps.has(src.charAt(2))) || + // the pattern starts with \.\., and then [ or . + (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); + // no need to prevent dots if it can't match a dot, or if a + // sub-pattern will be preventing it anyway. + const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); + start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + } + } + } + // append the "end of path portion" pattern to negation tails + let end = ''; + if (this.isEnd() && + this.#root.#filledNegs && + this.#parent?.type === '!') { + end = '(?:$|\\/)'; + } + const final = start + src + end; + return [ + final, + unescape(src), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + // We need to calculate the body *twice* if it's a repeat pattern + // at the start, once in nodot mode, then again in dot mode, so a + // pattern like *(?) can match 'x.y' + const repeated = this.type === '*' || this.type === '+'; + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + let body = this.#partsToRegExp(dot); + if (this.isStart() && this.isEnd() && !body && this.type !== '!') { + // invalid extglob, has to at least be *something* present, if it's + // the entire path portion. + const s = this.toString(); + this.#parts = [s]; + this.type = null; + this.#hasMagic = undefined; + return [s, unescape(this.toString()), false, false]; + } + // XXX abstract out this map method + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot + ? '' + : this.#partsToRegExp(true); + if (bodyDotAllowed === body) { + bodyDotAllowed = ''; + } + if (bodyDotAllowed) { + body = `(?:${body})(?:${bodyDotAllowed})*?`; + } + // an empty !() is exactly equivalent to a starNoEmpty + let final = ''; + if (this.type === '!' && this.#emptyExt) { + final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; + } + else { + const close = this.type === '!' + ? // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star$1 + + ')' + : this.type === '@' + ? ')' + : this.type === '?' + ? ')?' + : this.type === '+' && bodyDotAllowed + ? ')' + : this.type === '*' && bodyDotAllowed + ? `)?` + : `)${this.type}`; + final = start + body + close; + } + return [ + final, + unescape(body), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + #partsToRegExp(dot) { + return this.#parts + .map(p => { + // extglob ASTs should only contain parent ASTs + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + // can ignore hasMagic, because extglobs are already always magic + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }) + .filter(p => !(this.isStart() && this.isEnd()) || !!p) + .join('|'); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ''; + let uflag = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = parseClass(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '*') { + if (noEmpty && glob === '*') + re += starNoEmpty; + else + re += star$1; + hasMagic = true; + continue; + } + if (c === '?') { + re += qmark$1; + hasMagic = true; + continue; + } + re += regExpEscape$1(c); + } + return [re, unescape(glob), !!hasMagic, uflag]; + } +} + +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +const escape = (s, { windowsPathsNoEscape = false, } = {}) => { + // don't need to escape +@! because we escape the parens + // that make those magic, and escaping ! as [!] isn't valid, + // because [!]] is a valid glob class meaning not ']'. + return windowsPathsNoEscape + ? s.replace(/[?*()[\]]/g, '[$&]') + : s.replace(/[?*()[\]\\]/g, '\\$&'); +}; + +const minimatch = (p, pattern, options = {}) => { + assertValidPattern(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false; + } + return new Minimatch(pattern, options).match(p); +}; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const defaultPlatform = (typeof process === 'object' && process + ? (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'); +const path = { + win32: { sep: '\\' }, + posix: { sep: '/' }, +}; +/* c8 ignore stop */ +const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; +minimatch.sep = sep; +const GLOBSTAR = Symbol('globstar **'); +minimatch.GLOBSTAR = GLOBSTAR; +// any single thing other than / +// don't need to escape / when using new RegExp() +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options); +minimatch.filter = filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +const defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch; + } + const orig = minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + AST: class AST extends orig.AST { + /* c8 ignore start */ + constructor(type, parent, options = {}) { + super(type, parent, ext(def, options)); + } + /* c8 ignore stop */ + static fromGlob(pattern, options = {}) { + return orig.AST.fromGlob(pattern, ext(def, options)); + } + }, + unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), + escape: (s, options = {}) => orig.escape(s, ext(def, options)), + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: GLOBSTAR, + }); +}; +minimatch.defaults = defaults; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +const braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern); + // Thanks to Yeting Li <https://github.com/yetingli> for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; + } + return expand$1(pattern); +}; +minimatch.braceExpand = braceExpand; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +minimatch.makeRe = makeRe; +const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +minimatch.match = match; +// replace stuff like \* with * +const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(pattern, options = {}) { + assertValidPattern(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === 'win32'; + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = + options.windowsNoMagicRoot !== undefined + ? options.windowsNoMagicRoot + : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; + } + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== 'string') + return true; + } + } + return false; + } + debug(..._) { } + make() { + const pattern = this.pattern; + const options = this.options; + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + // step 1: figure out negation, etc. + this.parseNegate(); + // step 2: expand braces + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // step 3: now we have a set, so turn each one into a series of + // path-portion matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + // + // First, we preprocess to make the glob pattern sets a bit simpler + // and deduped. There are some perf-killing patterns that can cause + // problems with a glob walk, but we can simplify them down a bit. + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => { + if (this.isWindows && this.windowsNoMagicRoot) { + // check if it's a drive or unc path. + const isUNC = s[0] === '' && + s[1] === '' && + (s[2] === '?' || !globMagic.test(s[2])) && + !globMagic.test(s[3]); + const isDrive = /^[a-z]:/i.test(s[0]); + if (isUNC) { + return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + } + else if (isDrive) { + return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; + } + } + return s.map(ss => this.parse(ss)); + }); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (this.isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; + } + } + } + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + // if we're not in globstar mode, then turn all ** into * + if (this.options.noglobstar) { + for (let i = 0; i < globParts.length; i++) { + for (let j = 0; j < globParts[i].length; j++) { + if (globParts[i][j] === '**') { + globParts[i][j] = '*'; + } + } + } + } + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + // aggressive optimization for the purpose of fs walking + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); + } + else if (optimizationLevel >= 1) { + // just basic optimizations to remove some .. parts + globParts = this.levelOneOptimize(globParts); + } + else { + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map(parts => { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let i = gs; + while (parts[i + 1] === '**') { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); + } + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); + } + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); + } + let didSomething = false; + do { + didSomething = false; + // <pre>/<e>/<rest> -> <pre>/<rest> + if (!this.preserveMultipleSlashes) { + for (let i = 1; i < parts.length - 1; i++) { + const p = parts[i]; + // don't squeeze out UNC patterns + if (i === 1 && p === '' && parts[0] === '') + continue; + if (p === '.' || p === '') { + didSomething = true; + parts.splice(i, 1); + i--; + } + } + if (parts[0] === '.' && + parts.length === 2 && + (parts[1] === '.' || parts[1] === '')) { + didSomething = true; + parts.pop(); + } + } + // <pre>/<p>/../<rest> -> <pre>/<rest> + let dd = 0; + while (-1 !== (dd = parts.indexOf('..', dd + 1))) { + const p = parts[dd - 1]; + if (p && p !== '.' && p !== '..' && p !== '**') { + didSomething = true; + parts.splice(dd - 1, 2); + dd -= 2; + } + } + } while (didSomething); + return parts.length === 0 ? [''] : parts; + } + // First phase: single-pattern processing + // <pre> is 1 or more portions + // <rest> is 1 or more portions + // <p> is any portion other than ., .., '', or ** + // <e> is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>} + // <pre>/<e>/<rest> -> <pre>/<rest> + // <pre>/<p>/../<rest> -> <pre>/<rest> + // **/**/<rest> -> **/<rest> + // + // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow + // this WOULD be allowed if ** did follow symlinks, or * didn't + firstPhasePreProcess(globParts) { + let didSomething = false; + do { + didSomething = false; + // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + // <pre>/**/**/<rest> -> <pre>/**/<rest> + gss++; + } + // eg, if gs is 2 and gss is 4, that means we have 3 ** + // parts, and can remove 2 of them. + if (gss > gs) { + parts.splice(gs + 1, gss - gs); + } + let next = parts[gs + 1]; + const p = parts[gs + 2]; + const p2 = parts[gs + 3]; + if (next !== '..') + continue; + if (!p || + p === '.' || + p === '..' || + !p2 || + p2 === '.' || + p2 === '..') { + continue; + } + didSomething = true; + // edit parts in place, and push the new one + parts.splice(gs, 1); + const other = parts.slice(0); + other[gs] = '**'; + globParts.push(other); + gs--; + } + // <pre>/<e>/<rest> -> <pre>/<rest> + if (!this.preserveMultipleSlashes) { + for (let i = 1; i < parts.length - 1; i++) { + const p = parts[i]; + // don't squeeze out UNC patterns + if (i === 1 && p === '' && parts[0] === '') + continue; + if (p === '.' || p === '') { + didSomething = true; + parts.splice(i, 1); + i--; + } + } + if (parts[0] === '.' && + parts.length === 2 && + (parts[1] === '.' || parts[1] === '')) { + didSomething = true; + parts.pop(); + } + } + // <pre>/<p>/../<rest> -> <pre>/<rest> + let dd = 0; + while (-1 !== (dd = parts.indexOf('..', dd + 1))) { + const p = parts[dd - 1]; + if (p && p !== '.' && p !== '..' && p !== '**') { + didSomething = true; + const needDot = dd === 1 && parts[dd + 1] === '**'; + const splin = needDot ? ['.'] : []; + parts.splice(dd - 1, 2, ...splin); + if (parts.length === 0) + parts.push(''); + dd -= 2; + } + } + } + } while (didSomething); + return globParts; + } + // second phase: multi-pattern dedupes + // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest> + // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest> + // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest> + // + // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest> + // ^-- not valid because ** doens't follow symlinks + secondPhasePreProcess(globParts) { + for (let i = 0; i < globParts.length - 1; i++) { + for (let j = i + 1; j < globParts.length; j++) { + const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes); + if (!matched) + continue; + globParts[i] = matched; + globParts[j] = []; + } + } + return globParts.filter(gs => gs.length); + } + partsMatch(a, b, emptyGSMatch = false) { + let ai = 0; + let bi = 0; + let result = []; + let which = ''; + while (ai < a.length && bi < b.length) { + if (a[ai] === b[bi]) { + result.push(which === 'b' ? b[bi] : a[ai]); + ai++; + bi++; + } + else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) { + result.push(a[ai]); + ai++; + } + else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) { + result.push(b[bi]); + bi++; + } + else if (a[ai] === '*' && + b[bi] && + (this.options.dot || !b[bi].startsWith('.')) && + b[bi] !== '**') { + if (which === 'b') + return false; + which = 'a'; + result.push(a[ai]); + ai++; + bi++; + } + else if (b[bi] === '*' && + a[ai] && + (this.options.dot || !a[ai].startsWith('.')) && + a[ai] !== '**') { + if (which === 'a') + return false; + which = 'b'; + result.push(b[bi]); + ai++; + bi++; + } + else { + return false; + } + } + // if we fall out of the loop, it means they two are identical + // as long as their lengths match + return a.length === b.length && result; + } + parseNegate() { + if (this.nonegate) + return; + const pattern = this.pattern; + let negate = false; + let negateOffset = 0; + for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) + this.pattern = pattern.slice(negateOffset); + this.negate = negate; + } + // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + matchOne(file, pattern, partial = false) { + const options = this.options; + // UNC paths like //?/X:/... can match X:/... and vice versa + // Drive letters in absolute drive or unc paths are always compared + // case-insensitively. + if (this.isWindows) { + const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]); + const fileUNC = !fileDrive && + file[0] === '' && + file[1] === '' && + file[2] === '?' && + /^[a-z]:$/i.test(file[3]); + const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]); + const patternUNC = !patternDrive && + pattern[0] === '' && + pattern[1] === '' && + pattern[2] === '?' && + typeof pattern[3] === 'string' && + /^[a-z]:$/i.test(pattern[3]); + const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined; + const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined; + if (typeof fdi === 'number' && typeof pdi === 'number') { + const [fd, pd] = [file[fdi], pattern[pdi]]; + if (fd.toLowerCase() === pd.toLowerCase()) { + pattern[pdi] = fd; + if (pdi > fdi) { + pattern = pattern.slice(pdi); + } + else if (fdi > pdi) { + file = file.slice(fdi); + } + } + } + } + // resolve and reduce . and .. portions in the file as well. + // dont' need to do the second phase, because it's only one string[] + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + file = this.levelTwoFileOptimize(file); + } + this.debug('matchOne', this, { file, pattern }); + this.debug('matchOne', file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug('matchOne loop'); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + // should be impossible. + // some invalid regexp stuff in the set. + /* c8 ignore start */ + if (p === false) { + return false; + } + /* c8 ignore stop */ + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]); + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug('** at the end'); + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || + file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) + return false; + } + return true; + } + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr]; + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee); + // found a match. + return true; + } + else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || + swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr); + break; + } + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue'); + fr++; + } + } + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + /* c8 ignore start */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr); + if (fr === fl) { + return true; + } + } + /* c8 ignore stop */ + return false; + } + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + let hit; + if (typeof p === 'string') { + hit = f === p; + this.debug('string match', p, f, hit); + } + else { + hit = p.test(f); + this.debug('pattern match', p, f, hit); + } + if (!hit) + return false; + } + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true; + } + else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial; + } + else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return fi === fl - 1 && file[fi] === ''; + /* c8 ignore start */ + } + else { + // should be unreachable. + throw new Error('wtf?'); + } + /* c8 ignore stop */ + } + braceExpand() { + return braceExpand(this.pattern, this.options); + } + parse(pattern) { + assertValidPattern(pattern); + const options = this.options; + // shortcuts + if (pattern === '**') + return GLOBSTAR; + if (pattern === '') + return ''; + // far and away, the most common glob pattern parts are + // *, *.*, and *.<ext> Add a fast check method for those. + let m; + let fastTest = null; + if ((m = pattern.match(starRE))) { + fastTest = options.dot ? starTestDot : starTest; + } + else if ((m = pattern.match(starDotExtRE))) { + fastTest = (options.nocase + ? options.dot + ? starDotExtTestNocaseDot + : starDotExtTestNocase + : options.dot + ? starDotExtTestDot + : starDotExtTest)(m[1]); + } + else if ((m = pattern.match(qmarksRE))) { + fastTest = (options.nocase + ? options.dot + ? qmarksTestNocaseDot + : qmarksTestNocase + : options.dot + ? qmarksTestDot + : qmarksTest)(m); + } + else if ((m = pattern.match(starDotStarRE))) { + fastTest = options.dot ? starDotStarTestDot : starDotStarTest; + } + else if ((m = pattern.match(dotStarRE))) { + fastTest = dotStarTest; + } + const re = AST.fromGlob(pattern, this.options).toMMPattern(); + return fastTest ? Object.assign(re, { test: fastTest }) : re; + } + makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + const set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + const options = this.options; + const twoStar = options.noglobstar + ? star + : options.dot + ? twoStarDot + : twoStarNoDot; + const flags = new Set(options.nocase ? ['i'] : []); + // regexpify non-globstar patterns + // if ** is only item, then we just do one twoStar + // if ** is first, and there are more, prepend (\/|twoStar\/)? to next + // if ** is last, append (\/twoStar|) to previous + // if ** is in the middle, append (\/|\/twoStar\/) to previous + // then filter out GLOBSTAR symbols + let re = set + .map(pattern => { + const pp = pattern.map(p => { + if (p instanceof RegExp) { + for (const f of p.flags.split('')) + flags.add(f); + } + return typeof p === 'string' + ? regExpEscape(p) + : p === GLOBSTAR + ? GLOBSTAR + : p._src; + }); + pp.forEach((p, i) => { + const next = pp[i + 1]; + const prev = pp[i - 1]; + if (p !== GLOBSTAR || prev === GLOBSTAR) { + return; + } + if (prev === undefined) { + if (next !== undefined && next !== GLOBSTAR) { + pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next; + } + else { + pp[i] = twoStar; + } + } + else if (next === undefined) { + pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?'; + } + else if (next !== GLOBSTAR) { + pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next; + pp[i + 1] = GLOBSTAR; + } + }); + return pp.filter(p => p !== GLOBSTAR).join('/'); + }) + .join('|'); + // need to wrap in parens if we had more than one thing with |, + // otherwise only the first will be anchored to ^ and the last to $ + const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']; + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^' + open + re + close + '$'; + // can match anything, as long as it's not this. + if (this.negate) + re = '^(?!' + re + ').+$'; + try { + this.regexp = new RegExp(re, [...flags].join('')); + /* c8 ignore start */ + } + catch (ex) { + // should be impossible + this.regexp = false; + } + /* c8 ignore stop */ + return this.regexp; + } + slashSplit(p) { + // if p starts with // on windows, we preserve that + // so that UNC paths aren't broken. Otherwise, any number of + // / characters are coalesced into one, unless + // preserveMultipleSlashes is set to true. + if (this.preserveMultipleSlashes) { + return p.split('/'); + } + else if (this.isWindows && /^\/\/[^\/]+/.test(p)) { + // add an extra '' for the one we lose + return ['', ...p.split(/\/+/)]; + } + else { + return p.split(/\/+/); + } + } + match(f, partial = this.partial) { + this.debug('match', f, this.pattern); + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) { + return false; + } + if (this.empty) { + return f === ''; + } + if (f === '/' && partial) { + return true; + } + const options = this.options; + // windows: need to use /, not \ + if (this.isWindows) { + f = f.split('\\').join('/'); + } + // treat the test path as a set of pathparts. + const ff = this.slashSplit(f); + this.debug(this.pattern, 'split', ff); + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + const set = this.set; + this.debug(this.pattern, 'set', set); + // Find the basename of the path by looking for the last non-empty segment + let filename = ff[ff.length - 1]; + if (!filename) { + for (let i = ff.length - 2; !filename && i >= 0; i--) { + filename = ff[i]; + } + } + for (let i = 0; i < set.length; i++) { + const pattern = set[i]; + let file = ff; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + const hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) { + return true; + } + return !this.negate; + } + } + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) { + return false; + } + return this.negate; + } + static defaults(def) { + return minimatch.defaults(def).Minimatch; + } +} +/* c8 ignore stop */ +minimatch.AST = AST; +minimatch.Minimatch = Minimatch; +minimatch.escape = escape; +minimatch.unescape = unescape; + +class TypeScope { + constructor(filename, source, offset = 0, imports = /* @__PURE__ */ Object.create(null), types = /* @__PURE__ */ Object.create(null), declares = /* @__PURE__ */ Object.create(null)) { + this.filename = filename; + this.source = source; + this.offset = offset; + this.imports = imports; + this.types = types; + this.declares = declares; + this.isGenericScope = false; + this.resolvedImportSources = /* @__PURE__ */ Object.create(null); + this.exportedTypes = /* @__PURE__ */ Object.create(null); + this.exportedDeclares = /* @__PURE__ */ Object.create(null); + } +} +function resolveTypeElements(ctx, node, scope, typeParameters) { + const canCache = !typeParameters; + if (canCache && node._resolvedElements) { + return node._resolvedElements; + } + const resolved = innerResolveTypeElements( + ctx, + node, + node._ownerScope || scope || ctxToScope(ctx), + typeParameters + ); + return canCache ? node._resolvedElements = resolved : resolved; +} +function innerResolveTypeElements(ctx, node, scope, typeParameters) { + var _a, _b; + switch (node.type) { + case "TSTypeLiteral": + return typeElementsToMap(ctx, node.members, scope, typeParameters); + case "TSInterfaceDeclaration": + return resolveInterfaceMembers(ctx, node, scope, typeParameters); + case "TSTypeAliasDeclaration": + case "TSParenthesizedType": + return resolveTypeElements( + ctx, + node.typeAnnotation, + scope, + typeParameters + ); + case "TSFunctionType": { + return { props: {}, calls: [node] }; + } + case "TSUnionType": + case "TSIntersectionType": + return mergeElements( + node.types.map((t) => resolveTypeElements(ctx, t, scope, typeParameters)), + node.type + ); + case "TSMappedType": + return resolveMappedType(ctx, node, scope); + case "TSIndexedAccessType": { + const types = resolveIndexType(ctx, node, scope); + return mergeElements( + types.map((t) => resolveTypeElements(ctx, t, t._ownerScope)), + "TSUnionType" + ); + } + case "TSExpressionWithTypeArguments": + case "TSTypeReference": { + const typeName = getReferenceName(node); + if ((typeName === "ExtractPropTypes" || typeName === "ExtractPublicPropTypes") && node.typeParameters && ((_a = scope.imports[typeName]) == null ? void 0 : _a.source) === "vue") { + return resolveExtractPropTypes( + resolveTypeElements( + ctx, + node.typeParameters.params[0], + scope, + typeParameters + ), + scope + ); + } + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + let typeParams; + if ((resolved.type === "TSTypeAliasDeclaration" || resolved.type === "TSInterfaceDeclaration") && resolved.typeParameters && node.typeParameters) { + typeParams = /* @__PURE__ */ Object.create(null); + resolved.typeParameters.params.forEach((p, i) => { + let param = typeParameters && typeParameters[p.name]; + if (!param) + param = node.typeParameters.params[i]; + typeParams[p.name] = param; + }); + } + return resolveTypeElements( + ctx, + resolved, + resolved._ownerScope, + typeParams + ); + } else { + if (typeof typeName === "string") { + if (typeParameters && typeParameters[typeName]) { + return resolveTypeElements( + ctx, + typeParameters[typeName], + scope, + typeParameters + ); + } + if ( + // @ts-expect-error + SupportedBuiltinsSet.has(typeName) + ) { + return resolveBuiltin( + ctx, + node, + typeName, + scope, + typeParameters + ); + } else if (typeName === "ReturnType" && node.typeParameters) { + const ret = resolveReturnType( + ctx, + node.typeParameters.params[0], + scope + ); + if (ret) { + return resolveTypeElements(ctx, ret, scope); + } + } + } + return ctx.error( + `Unresolvable type reference or unsupported built-in utility type`, + node, + scope + ); + } + } + case "TSImportType": { + if (getId(node.argument) === "vue" && ((_b = node.qualifier) == null ? void 0 : _b.type) === "Identifier" && node.qualifier.name === "ExtractPropTypes" && node.typeParameters) { + return resolveExtractPropTypes( + resolveTypeElements(ctx, node.typeParameters.params[0], scope), + scope + ); + } + const sourceScope = importSourceToScope( + ctx, + node.argument, + scope, + node.argument.value + ); + const resolved = resolveTypeReference(ctx, node, sourceScope); + if (resolved) { + return resolveTypeElements(ctx, resolved, resolved._ownerScope); + } + break; + } + case "TSTypeQuery": + { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveTypeElements(ctx, resolved, resolved._ownerScope); + } + } + break; + } + return ctx.error(`Unresolvable type: ${node.type}`, node, scope); +} +function typeElementsToMap(ctx, elements, scope = ctxToScope(ctx), typeParameters) { + const res = { props: {} }; + for (const e of elements) { + if (e.type === "TSPropertySignature" || e.type === "TSMethodSignature") { + if (typeParameters) { + scope = createChildScope(scope); + scope.isGenericScope = true; + Object.assign(scope.types, typeParameters); + } + e._ownerScope = scope; + const name = getId(e.key); + if (name && !e.computed) { + res.props[name] = e; + } else if (e.key.type === "TemplateLiteral") { + for (const key of resolveTemplateKeys(ctx, e.key, scope)) { + res.props[key] = e; + } + } else { + ctx.error( + `Unsupported computed key in type referenced by a macro`, + e.key, + scope + ); + } + } else if (e.type === "TSCallSignatureDeclaration") { + (res.calls || (res.calls = [])).push(e); + } + } + return res; +} +function mergeElements(maps, type) { + if (maps.length === 1) + return maps[0]; + const res = { props: {} }; + const { props: baseProps } = res; + for (const { props, calls } of maps) { + for (const key in props) { + if (!shared.hasOwn(baseProps, key)) { + baseProps[key] = props[key]; + } else { + baseProps[key] = createProperty( + baseProps[key].key, + { + type, + // @ts-expect-error + types: [baseProps[key], props[key]] + }, + baseProps[key]._ownerScope, + baseProps[key].optional || props[key].optional + ); + } + } + if (calls) { + (res.calls || (res.calls = [])).push(...calls); + } + } + return res; +} +function createProperty(key, typeAnnotation, scope, optional) { + return { + type: "TSPropertySignature", + key, + kind: "get", + optional, + typeAnnotation: { + type: "TSTypeAnnotation", + typeAnnotation + }, + _ownerScope: scope + }; +} +function resolveInterfaceMembers(ctx, node, scope, typeParameters) { + const base = typeElementsToMap( + ctx, + node.body.body, + node._ownerScope, + typeParameters + ); + if (node.extends) { + for (const ext of node.extends) { + if (ext.leadingComments && ext.leadingComments.some((c) => c.value.includes("@vue-ignore"))) { + continue; + } + try { + const { props, calls } = resolveTypeElements(ctx, ext, scope); + for (const key in props) { + if (!shared.hasOwn(base.props, key)) { + base.props[key] = props[key]; + } + } + if (calls) { + ; + (base.calls || (base.calls = [])).push(...calls); + } + } catch (e) { + ctx.error( + `Failed to resolve extends base type. +If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example: + +interface Props extends /* @vue-ignore */ Base {} + +Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`, + ext + ); + } + } + } + return base; +} +function resolveMappedType(ctx, node, scope) { + const res = { props: {} }; + const keys = resolveStringType(ctx, node.typeParameter.constraint, scope); + for (const key of keys) { + res.props[key] = createProperty( + { + type: "Identifier", + name: key + }, + node.typeAnnotation, + scope, + !!node.optional + ); + } + return res; +} +function resolveIndexType(ctx, node, scope) { + var _a, _b; + if (node.indexType.type === "TSNumberKeyword") { + return resolveArrayElementType(ctx, node.objectType, scope); + } + const { indexType, objectType } = node; + const types = []; + let keys; + let resolved; + if (indexType.type === "TSStringKeyword") { + resolved = resolveTypeElements(ctx, objectType, scope); + keys = Object.keys(resolved.props); + } else { + keys = resolveStringType(ctx, indexType, scope); + resolved = resolveTypeElements(ctx, objectType, scope); + } + for (const key of keys) { + const targetType = (_b = (_a = resolved.props[key]) == null ? void 0 : _a.typeAnnotation) == null ? void 0 : _b.typeAnnotation; + if (targetType) { + targetType._ownerScope = resolved.props[key]._ownerScope; + types.push(targetType); + } + } + return types; +} +function resolveArrayElementType(ctx, node, scope) { + if (node.type === "TSArrayType") { + return [node.elementType]; + } + if (node.type === "TSTupleType") { + return node.elementTypes.map( + (t) => t.type === "TSNamedTupleMember" ? t.elementType : t + ); + } + if (node.type === "TSTypeReference") { + if (getReferenceName(node) === "Array" && node.typeParameters) { + return node.typeParameters.params; + } else { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveArrayElementType(ctx, resolved, scope); + } + } + } + return ctx.error( + "Failed to resolve element type from target type", + node, + scope + ); +} +function resolveStringType(ctx, node, scope) { + switch (node.type) { + case "StringLiteral": + return [node.value]; + case "TSLiteralType": + return resolveStringType(ctx, node.literal, scope); + case "TSUnionType": + return node.types.map((t) => resolveStringType(ctx, t, scope)).flat(); + case "TemplateLiteral": { + return resolveTemplateKeys(ctx, node, scope); + } + case "TSTypeReference": { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveStringType(ctx, resolved, scope); + } + if (node.typeName.type === "Identifier") { + const getParam = (index = 0) => resolveStringType(ctx, node.typeParameters.params[index], scope); + switch (node.typeName.name) { + case "Extract": + return getParam(1); + case "Exclude": { + const excluded = getParam(1); + return getParam().filter((s) => !excluded.includes(s)); + } + case "Uppercase": + return getParam().map((s) => s.toUpperCase()); + case "Lowercase": + return getParam().map((s) => s.toLowerCase()); + case "Capitalize": + return getParam().map(shared.capitalize); + case "Uncapitalize": + return getParam().map((s) => s[0].toLowerCase() + s.slice(1)); + default: + ctx.error( + "Unsupported type when resolving index type", + node.typeName, + scope + ); + } + } + } + } + return ctx.error("Failed to resolve index type into finite keys", node, scope); +} +function resolveTemplateKeys(ctx, node, scope) { + if (!node.expressions.length) { + return [node.quasis[0].value.raw]; + } + const res = []; + const e = node.expressions[0]; + const q = node.quasis[0]; + const leading = q ? q.value.raw : ``; + const resolved = resolveStringType(ctx, e, scope); + const restResolved = resolveTemplateKeys( + ctx, + { + ...node, + expressions: node.expressions.slice(1), + quasis: q ? node.quasis.slice(1) : node.quasis + }, + scope + ); + for (const r of resolved) { + for (const rr of restResolved) { + res.push(leading + r + rr); + } + } + return res; +} +const SupportedBuiltinsSet = /* @__PURE__ */ new Set([ + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" +]); +function resolveBuiltin(ctx, node, name, scope, typeParameters) { + const t = resolveTypeElements( + ctx, + node.typeParameters.params[0], + scope, + typeParameters + ); + switch (name) { + case "Partial": { + const res2 = { props: {}, calls: t.calls }; + Object.keys(t.props).forEach((key) => { + res2.props[key] = { ...t.props[key], optional: true }; + }); + return res2; + } + case "Required": { + const res2 = { props: {}, calls: t.calls }; + Object.keys(t.props).forEach((key) => { + res2.props[key] = { ...t.props[key], optional: false }; + }); + return res2; + } + case "Readonly": + return t; + case "Pick": { + const picked = resolveStringType( + ctx, + node.typeParameters.params[1], + scope + ); + const res2 = { props: {}, calls: t.calls }; + for (const key of picked) { + res2.props[key] = t.props[key]; + } + return res2; + } + case "Omit": + const omitted = resolveStringType( + ctx, + node.typeParameters.params[1], + scope + ); + const res = { props: {}, calls: t.calls }; + for (const key in t.props) { + if (!omitted.includes(key)) { + res.props[key] = t.props[key]; + } + } + return res; + } +} +function resolveTypeReference(ctx, node, scope, name, onlyExported = false) { + const canCache = !(scope == null ? void 0 : scope.isGenericScope); + if (canCache && node._resolvedReference) { + return node._resolvedReference; + } + const resolved = innerResolveTypeReference( + ctx, + scope || ctxToScope(ctx), + name || getReferenceName(node), + node, + onlyExported + ); + return canCache ? node._resolvedReference = resolved : resolved; +} +function innerResolveTypeReference(ctx, scope, name, node, onlyExported) { + if (typeof name === "string") { + if (scope.imports[name]) { + return resolveTypeFromImport(ctx, node, name, scope); + } else { + const lookupSource = node.type === "TSTypeQuery" ? onlyExported ? scope.exportedDeclares : scope.declares : onlyExported ? scope.exportedTypes : scope.types; + if (lookupSource[name]) { + return lookupSource[name]; + } else { + const globalScopes = resolveGlobalScope(ctx); + if (globalScopes) { + for (const s of globalScopes) { + const src = node.type === "TSTypeQuery" ? s.declares : s.types; + if (src[name]) { + (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(s.filename); + return src[name]; + } + } + } + } + } + } else { + let ns = innerResolveTypeReference(ctx, scope, name[0], node, onlyExported); + if (ns) { + if (ns.type !== "TSModuleDeclaration") { + ns = ns._ns; + } + if (ns) { + const childScope = moduleDeclToScope(ctx, ns, ns._ownerScope || scope); + return innerResolveTypeReference( + ctx, + childScope, + name.length > 2 ? name.slice(1) : name[name.length - 1], + node, + !ns.declare + ); + } + } + } +} +function getReferenceName(node) { + const ref = node.type === "TSTypeReference" ? node.typeName : node.type === "TSExpressionWithTypeArguments" ? node.expression : node.type === "TSImportType" ? node.qualifier : node.exprName; + if ((ref == null ? void 0 : ref.type) === "Identifier") { + return ref.name; + } else if ((ref == null ? void 0 : ref.type) === "TSQualifiedName") { + return qualifiedNameToPath(ref); + } else { + return "default"; + } +} +function qualifiedNameToPath(node) { + if (node.type === "Identifier") { + return [node.name]; + } else { + return [...qualifiedNameToPath(node.left), node.right.name]; + } +} +function resolveGlobalScope(ctx) { + if (ctx.options.globalTypeFiles) { + const fs = resolveFS(ctx); + if (!fs) { + throw new Error("[vue/compiler-sfc] globalTypeFiles requires fs access."); + } + return ctx.options.globalTypeFiles.map( + (file) => fileToScope(ctx, normalizePath(file), true) + ); + } +} +let ts; +let loadTS; +function registerTS(_loadTS) { + loadTS = () => { + try { + return _loadTS(); + } catch (err) { + if (typeof err.message === "string" && err.message.includes("Cannot find module")) { + throw new Error( + 'Failed to load TypeScript, which is required for resolving imported types. Please make sure "typescript" is installed as a project dependency.' + ); + } else { + throw new Error( + "Failed to load TypeScript for resolving imported types." + ); + } + } + }; +} +function resolveFS(ctx) { + if (ctx.fs) { + return ctx.fs; + } + if (!ts && loadTS) { + ts = loadTS(); + } + const fs = ctx.options.fs || (ts == null ? void 0 : ts.sys); + if (!fs) { + return; + } + return ctx.fs = { + fileExists(file) { + if (file.endsWith(".vue.ts")) { + file = file.replace(/\.ts$/, ""); + } + return fs.fileExists(file); + }, + readFile(file) { + if (file.endsWith(".vue.ts")) { + file = file.replace(/\.ts$/, ""); + } + return fs.readFile(file); + }, + realpath: fs.realpath + }; +} +function resolveTypeFromImport(ctx, node, name, scope) { + const { source, imported } = scope.imports[name]; + const sourceScope = importSourceToScope(ctx, node, scope, source); + return resolveTypeReference(ctx, node, sourceScope, imported, true); +} +function importSourceToScope(ctx, node, scope, source) { + let fs; + try { + fs = resolveFS(ctx); + } catch (err) { + return ctx.error(err.message, node, scope); + } + if (!fs) { + return ctx.error( + `No fs option provided to \`compileScript\` in non-Node environment. File system access is required for resolving imported types.`, + node, + scope + ); + } + let resolved = scope.resolvedImportSources[source]; + if (!resolved) { + if (source.startsWith("..")) { + const osSpecificJoinFn = process__namespace.platform === "win32" ? path$3.join : joinPaths; + const filename = osSpecificJoinFn(path$3.dirname(scope.filename), source); + resolved = resolveExt(filename, fs); + } else if (source.startsWith(".")) { + const filename = joinPaths(path$3.dirname(scope.filename), source); + resolved = resolveExt(filename, fs); + } else { + if (!ts) { + if (loadTS) + ts = loadTS(); + if (!ts) { + return ctx.error( + `Failed to resolve import source ${JSON.stringify(source)}. typescript is required as a peer dep for vue in order to support resolving types from module imports.`, + node, + scope + ); + } + } + resolved = resolveWithTS(scope.filename, source, ts, fs); + } + if (resolved) { + resolved = scope.resolvedImportSources[source] = normalizePath(resolved); + } + } + if (resolved) { + (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved); + return fileToScope(ctx, resolved); + } else { + return ctx.error( + `Failed to resolve import source ${JSON.stringify(source)}.`, + node, + scope + ); + } +} +function resolveExt(filename, fs) { + filename = filename.replace(/\.js$/, ""); + const tryResolve = (filename2) => { + if (fs.fileExists(filename2)) + return filename2; + }; + return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.d.ts`)); +} +const tsConfigCache = createCache(); +const tsConfigRefMap = /* @__PURE__ */ new Map(); +function resolveWithTS(containingFile, source, ts2, fs) { + var _a, _b; + const configPath = ts2.findConfigFile(containingFile, fs.fileExists); + let tsCompilerOptions; + let tsResolveCache; + if (configPath) { + let configs; + const normalizedConfigPath = normalizePath(configPath); + const cached = tsConfigCache.get(normalizedConfigPath); + if (!cached) { + configs = loadTSConfig(configPath, ts2, fs).map((config) => ({ config })); + tsConfigCache.set(normalizedConfigPath, configs); + } else { + configs = cached; + } + let matchedConfig; + if (configs.length === 1) { + matchedConfig = configs[0]; + } else { + for (const c of configs) { + const base = normalizePath( + c.config.options.pathsBasePath || path$3.dirname(c.config.options.configFilePath) + ); + const included = (_a = c.config.raw) == null ? void 0 : _a.include; + const excluded = (_b = c.config.raw) == null ? void 0 : _b.exclude; + if (!included && (!base || containingFile.startsWith(base)) || included.some((p) => minimatch(containingFile, joinPaths(base, p)))) { + if (excluded && excluded.some((p) => minimatch(containingFile, joinPaths(base, p)))) { + continue; + } + matchedConfig = c; + break; + } + } + if (!matchedConfig) { + matchedConfig = configs[configs.length - 1]; + } + } + tsCompilerOptions = matchedConfig.config.options; + tsResolveCache = matchedConfig.cache || (matchedConfig.cache = ts2.createModuleResolutionCache( + process__namespace.cwd(), + createGetCanonicalFileName(ts2.sys.useCaseSensitiveFileNames), + tsCompilerOptions + )); + } else { + tsCompilerOptions = {}; + } + const res = ts2.resolveModuleName( + source, + containingFile, + tsCompilerOptions, + fs, + tsResolveCache + ); + if (res.resolvedModule) { + let filename = res.resolvedModule.resolvedFileName; + if (filename.endsWith(".vue.ts")) { + filename = filename.replace(/\.ts$/, ""); + } + return fs.realpath ? fs.realpath(filename) : filename; + } +} +function loadTSConfig(configPath, ts2, fs) { + const parseConfigHost = ts2.sys; + const config = ts2.parseJsonConfigFileContent( + ts2.readConfigFile(configPath, fs.readFile).config, + parseConfigHost, + path$3.dirname(configPath), + void 0, + configPath + ); + const res = [config]; + if (config.projectReferences) { + for (const ref of config.projectReferences) { + tsConfigRefMap.set(ref.path, configPath); + res.unshift(...loadTSConfig(ref.path, ts2, fs)); + } + } + return res; +} +const fileToScopeCache = createCache(); +function invalidateTypeCache(filename) { + filename = normalizePath(filename); + fileToScopeCache.delete(filename); + tsConfigCache.delete(filename); + const affectedConfig = tsConfigRefMap.get(filename); + if (affectedConfig) + tsConfigCache.delete(affectedConfig); +} +function fileToScope(ctx, filename, asGlobal = false) { + const cached = fileToScopeCache.get(filename); + if (cached) { + return cached; + } + const fs = resolveFS(ctx); + const source = fs.readFile(filename) || ""; + const body = parseFile(filename, source, ctx.options.babelParserPlugins); + const scope = new TypeScope(filename, source, 0, recordImports(body)); + recordTypes(ctx, body, scope, asGlobal); + fileToScopeCache.set(filename, scope); + return scope; +} +function parseFile(filename, content, parserPlugins) { + const ext = path$3.extname(filename); + if (ext === ".ts" || ext === ".tsx") { + return parser$1.parse(content, { + plugins: resolveParserPlugins( + ext.slice(1), + parserPlugins, + filename.endsWith(".d.ts") + ), + sourceType: "module" + }).program.body; + } else if (ext === ".vue") { + const { + descriptor: { script, scriptSetup } + } = parse$2(content); + if (!script && !scriptSetup) { + return []; + } + const scriptOffset = script ? script.loc.start.offset : Infinity; + const scriptSetupOffset = scriptSetup ? scriptSetup.loc.start.offset : Infinity; + const firstBlock = scriptOffset < scriptSetupOffset ? script : scriptSetup; + const secondBlock = scriptOffset < scriptSetupOffset ? scriptSetup : script; + let scriptContent = " ".repeat(Math.min(scriptOffset, scriptSetupOffset)) + firstBlock.content; + if (secondBlock) { + scriptContent += " ".repeat(secondBlock.loc.start.offset - script.loc.end.offset) + secondBlock.content; + } + const lang = (script == null ? void 0 : script.lang) || (scriptSetup == null ? void 0 : scriptSetup.lang); + return parser$1.parse(scriptContent, { + plugins: resolveParserPlugins(lang, parserPlugins), + sourceType: "module" + }).program.body; + } + return []; +} +function ctxToScope(ctx) { + if (ctx.scope) { + return ctx.scope; + } + const body = "ast" in ctx ? ctx.ast : ctx.scriptAst ? [...ctx.scriptAst.body, ...ctx.scriptSetupAst.body] : ctx.scriptSetupAst.body; + const scope = new TypeScope( + ctx.filename, + ctx.source, + "startOffset" in ctx ? ctx.startOffset : 0, + "userImports" in ctx ? Object.create(ctx.userImports) : recordImports(body) + ); + recordTypes(ctx, body, scope); + return ctx.scope = scope; +} +function moduleDeclToScope(ctx, node, parentScope) { + if (node._resolvedChildScope) { + return node._resolvedChildScope; + } + const scope = createChildScope(parentScope); + if (node.body.type === "TSModuleDeclaration") { + const decl = node.body; + decl._ownerScope = scope; + const id = getId(decl.id); + scope.types[id] = scope.exportedTypes[id] = decl; + } else { + recordTypes(ctx, node.body.body, scope); + } + return node._resolvedChildScope = scope; +} +function createChildScope(parentScope) { + return new TypeScope( + parentScope.filename, + parentScope.source, + parentScope.offset, + Object.create(parentScope.imports), + Object.create(parentScope.types), + Object.create(parentScope.declares) + ); +} +const importExportRE = /^Import|^Export/; +function recordTypes(ctx, body, scope, asGlobal = false) { + const { types, declares, exportedTypes, exportedDeclares, imports } = scope; + const isAmbient = asGlobal ? !body.some((s) => importExportRE.test(s.type)) : false; + for (const stmt of body) { + if (asGlobal) { + if (isAmbient) { + if (stmt.declare) { + recordType(stmt, types, declares); + } + } else if (stmt.type === "TSModuleDeclaration" && stmt.global) { + for (const s of stmt.body.body) { + recordType(s, types, declares); + } + } + } else { + recordType(stmt, types, declares); + } + } + if (!asGlobal) { + for (const stmt of body) { + if (stmt.type === "ExportNamedDeclaration") { + if (stmt.declaration) { + recordType(stmt.declaration, types, declares); + recordType(stmt.declaration, exportedTypes, exportedDeclares); + } else { + for (const spec of stmt.specifiers) { + if (spec.type === "ExportSpecifier") { + const local = spec.local.name; + const exported = getId(spec.exported); + if (stmt.source) { + imports[exported] = { + source: stmt.source.value, + imported: local + }; + exportedTypes[exported] = { + type: "TSTypeReference", + typeName: { + type: "Identifier", + name: local + }, + _ownerScope: scope + }; + } else if (types[local]) { + exportedTypes[exported] = types[local]; + } + } + } + } + } else if (stmt.type === "ExportAllDeclaration") { + const sourceScope = importSourceToScope( + ctx, + stmt.source, + scope, + stmt.source.value + ); + Object.assign(scope.exportedTypes, sourceScope.exportedTypes); + } else if (stmt.type === "ExportDefaultDeclaration" && stmt.declaration) { + if (stmt.declaration.type !== "Identifier") { + recordType(stmt.declaration, types, declares, "default"); + recordType( + stmt.declaration, + exportedTypes, + exportedDeclares, + "default" + ); + } else if (types[stmt.declaration.name]) { + exportedTypes["default"] = types[stmt.declaration.name]; + } + } + } + } + for (const key of Object.keys(types)) { + const node = types[key]; + node._ownerScope = scope; + if (node._ns) + node._ns._ownerScope = scope; + } + for (const key of Object.keys(declares)) { + declares[key]._ownerScope = scope; + } +} +function recordType(node, types, declares, overwriteId) { + switch (node.type) { + case "TSInterfaceDeclaration": + case "TSEnumDeclaration": + case "TSModuleDeclaration": { + const id = overwriteId || getId(node.id); + let existing = types[id]; + if (existing) { + if (node.type === "TSModuleDeclaration") { + if (existing.type === "TSModuleDeclaration") { + mergeNamespaces(existing, node); + } else { + attachNamespace(existing, node); + } + break; + } + if (existing.type === "TSModuleDeclaration") { + types[id] = node; + attachNamespace(node, existing); + break; + } + if (existing.type !== node.type) { + break; + } + if (node.type === "TSInterfaceDeclaration") { + existing.body.body.push(...node.body.body); + } else { + existing.members.push(...node.members); + } + } else { + types[id] = node; + } + break; + } + case "ClassDeclaration": + if (overwriteId || node.id) + types[overwriteId || getId(node.id)] = node; + break; + case "TSTypeAliasDeclaration": + types[node.id.name] = node.typeParameters ? node : node.typeAnnotation; + break; + case "TSDeclareFunction": + if (node.id) + declares[node.id.name] = node; + break; + case "VariableDeclaration": { + if (node.declare) { + for (const decl of node.declarations) { + if (decl.id.type === "Identifier" && decl.id.typeAnnotation) { + declares[decl.id.name] = decl.id.typeAnnotation.typeAnnotation; + } + } + } + break; + } + } +} +function mergeNamespaces(to, from) { + const toBody = to.body; + const fromBody = from.body; + if (toBody.type === "TSModuleDeclaration") { + if (fromBody.type === "TSModuleDeclaration") { + mergeNamespaces(toBody, fromBody); + } else { + fromBody.body.push({ + type: "ExportNamedDeclaration", + declaration: toBody, + exportKind: "type", + specifiers: [] + }); + } + } else if (fromBody.type === "TSModuleDeclaration") { + toBody.body.push({ + type: "ExportNamedDeclaration", + declaration: fromBody, + exportKind: "type", + specifiers: [] + }); + } else { + toBody.body.push(...fromBody.body); + } +} +function attachNamespace(to, ns) { + if (!to._ns) { + to._ns = ns; + } else { + mergeNamespaces(to._ns, ns); + } +} +function recordImports(body) { + const imports = /* @__PURE__ */ Object.create(null); + for (const s of body) { + recordImport(s, imports); + } + return imports; +} +function recordImport(node, imports) { + if (node.type !== "ImportDeclaration") { + return; + } + for (const s of node.specifiers) { + imports[s.local.name] = { + imported: getImportedName(s), + source: node.source.value + }; + } +} +function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)) { + try { + switch (node.type) { + case "TSStringKeyword": + return ["String"]; + case "TSNumberKeyword": + return ["Number"]; + case "TSBooleanKeyword": + return ["Boolean"]; + case "TSObjectKeyword": + return ["Object"]; + case "TSNullKeyword": + return ["null"]; + case "TSTypeLiteral": + case "TSInterfaceDeclaration": { + const types = /* @__PURE__ */ new Set(); + const members = node.type === "TSTypeLiteral" ? node.members : node.body.body; + for (const m of members) { + if (m.type === "TSCallSignatureDeclaration" || m.type === "TSConstructSignatureDeclaration") { + types.add("Function"); + } else { + types.add("Object"); + } + } + return types.size ? Array.from(types) : ["Object"]; + } + case "TSPropertySignature": + if (node.typeAnnotation) { + return inferRuntimeType( + ctx, + node.typeAnnotation.typeAnnotation, + scope + ); + } + break; + case "TSMethodSignature": + case "TSFunctionType": + return ["Function"]; + case "TSArrayType": + case "TSTupleType": + return ["Array"]; + case "TSLiteralType": + switch (node.literal.type) { + case "StringLiteral": + return ["String"]; + case "BooleanLiteral": + return ["Boolean"]; + case "NumericLiteral": + case "BigIntLiteral": + return ["Number"]; + default: + return [UNKNOWN_TYPE]; + } + case "TSTypeReference": { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return inferRuntimeType(ctx, resolved, resolved._ownerScope); + } + if (node.typeName.type === "Identifier") { + switch (node.typeName.name) { + case "Array": + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + case "Error": + return [node.typeName.name]; + case "Partial": + case "Required": + case "Readonly": + case "Record": + case "Pick": + case "Omit": + case "InstanceType": + return ["Object"]; + case "Uppercase": + case "Lowercase": + case "Capitalize": + case "Uncapitalize": + return ["String"]; + case "Parameters": + case "ConstructorParameters": + return ["Array"]; + case "NonNullable": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope + ).filter((t) => t !== "null"); + } + break; + case "Extract": + if (node.typeParameters && node.typeParameters.params[1]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[1], + scope + ); + } + break; + case "Exclude": + case "OmitThisParameter": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope + ); + } + break; + } + } + break; + } + case "TSParenthesizedType": + return inferRuntimeType(ctx, node.typeAnnotation, scope); + case "TSUnionType": + return flattenTypes(ctx, node.types, scope); + case "TSIntersectionType": { + return flattenTypes(ctx, node.types, scope).filter( + (t) => t !== UNKNOWN_TYPE + ); + } + case "TSEnumDeclaration": + return inferEnumType(node); + case "TSSymbolKeyword": + return ["Symbol"]; + case "TSIndexedAccessType": { + const types = resolveIndexType(ctx, node, scope); + return flattenTypes(ctx, types, scope); + } + case "ClassDeclaration": + return ["Object"]; + case "TSImportType": { + const sourceScope = importSourceToScope( + ctx, + node.argument, + scope, + node.argument.value + ); + const resolved = resolveTypeReference(ctx, node, sourceScope); + if (resolved) { + return inferRuntimeType(ctx, resolved, resolved._ownerScope); + } + break; + } + case "TSTypeQuery": { + const id = node.exprName; + if (id.type === "Identifier") { + const matched = scope.declares[id.name]; + if (matched) { + return inferRuntimeType(ctx, matched, matched._ownerScope); + } + } + break; + } + } + } catch (e) { + } + return [UNKNOWN_TYPE]; +} +function flattenTypes(ctx, types, scope) { + if (types.length === 1) { + return inferRuntimeType(ctx, types[0], scope); + } + return [ + ...new Set( + [].concat( + ...types.map((t) => inferRuntimeType(ctx, t, scope)) + ) + ) + ]; +} +function inferEnumType(node) { + const types = /* @__PURE__ */ new Set(); + for (const m of node.members) { + if (m.initializer) { + switch (m.initializer.type) { + case "StringLiteral": + types.add("String"); + break; + case "NumericLiteral": + types.add("Number"); + break; + } + } + } + return types.size ? [...types] : ["Number"]; +} +function resolveExtractPropTypes({ props }, scope) { + const res = { props: {} }; + for (const key in props) { + const raw = props[key]; + res.props[key] = reverseInferType( + raw.key, + raw.typeAnnotation.typeAnnotation, + scope + ); + } + return res; +} +function reverseInferType(key, node, scope, optional = true, checkObjectSyntax = true) { + if (checkObjectSyntax && node.type === "TSTypeLiteral") { + const typeType = findStaticPropertyType(node, "type"); + if (typeType) { + const requiredType = findStaticPropertyType(node, "required"); + const optional2 = requiredType && requiredType.type === "TSLiteralType" && requiredType.literal.type === "BooleanLiteral" ? !requiredType.literal.value : true; + return reverseInferType(key, typeType, scope, optional2, false); + } + } else if (node.type === "TSTypeReference" && node.typeName.type === "Identifier") { + if (node.typeName.name.endsWith("Constructor")) { + return createProperty( + key, + ctorToType(node.typeName.name), + scope, + optional + ); + } else if (node.typeName.name === "PropType" && node.typeParameters) { + return createProperty(key, node.typeParameters.params[0], scope, optional); + } + } + if ((node.type === "TSTypeReference" || node.type === "TSImportType") && node.typeParameters) { + for (const t of node.typeParameters.params) { + const inferred = reverseInferType(key, t, scope, optional); + if (inferred) + return inferred; + } + } + return createProperty(key, { type: `TSNullKeyword` }, scope, optional); +} +function ctorToType(ctorType) { + const ctor = ctorType.slice(0, -11); + switch (ctor) { + case "String": + case "Number": + case "Boolean": + return { type: `TS${ctor}Keyword` }; + case "Array": + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + return { + type: "TSTypeReference", + typeName: { type: "Identifier", name: ctor } + }; + } + return { type: `TSNullKeyword` }; +} +function findStaticPropertyType(node, key) { + const prop = node.members.find( + (m) => m.type === "TSPropertySignature" && !m.computed && getId(m.key) === key && m.typeAnnotation + ); + return prop && prop.typeAnnotation.typeAnnotation; +} +function resolveReturnType(ctx, arg, scope) { + var _a; + let resolved = arg; + if (arg.type === "TSTypeReference" || arg.type === "TSTypeQuery" || arg.type === "TSImportType") { + resolved = resolveTypeReference(ctx, arg, scope); + } + if (!resolved) + return; + if (resolved.type === "TSFunctionType") { + return (_a = resolved.typeAnnotation) == null ? void 0 : _a.typeAnnotation; + } + if (resolved.type === "TSDeclareFunction") { + return resolved.returnType; + } +} +function resolveUnionType(ctx, node, scope) { + if (node.type === "TSTypeReference") { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) + node = resolved; + } + let types; + if (node.type === "TSUnionType") { + types = node.types.flatMap((node2) => resolveUnionType(ctx, node2, scope)); + } else { + types = [node]; + } + return types; +} + +const DEFINE_MODEL = "defineModel"; +function processDefineModel(ctx, node, declId) { + if (!isCallOf(node, DEFINE_MODEL)) { + return false; + } + ctx.hasDefineModelCall = true; + const type = node.typeParameters && node.typeParameters.params[0] || void 0; + let modelName; + let options; + const arg0 = node.arguments[0] && CompilerDOM.unwrapTSNode(node.arguments[0]); + const hasName = arg0 && arg0.type === "StringLiteral"; + if (hasName) { + modelName = arg0.value; + options = node.arguments[1]; + } else { + modelName = "modelValue"; + options = arg0; + } + if (ctx.modelDecls[modelName]) { + ctx.error(`duplicate model name ${JSON.stringify(modelName)}`, node); + } + let optionsString = options && ctx.getString(options); + let optionsRemoved = !options; + const runtimeOptionNodes = []; + if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) { + let removed = 0; + for (let i = options.properties.length - 1; i >= 0; i--) { + const p = options.properties[i]; + const next = options.properties[i + 1]; + const start = p.start; + const end = next ? next.start : options.end - 1; + if ((p.type === "ObjectProperty" || p.type === "ObjectMethod") && (p.key.type === "Identifier" && (p.key.name === "get" || p.key.name === "set") || p.key.type === "StringLiteral" && (p.key.value === "get" || p.key.value === "set"))) { + optionsString = optionsString.slice(0, start - options.start) + optionsString.slice(end - options.start); + } else { + removed++; + ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end); + runtimeOptionNodes.push(p); + } + } + if (removed === options.properties.length) { + optionsRemoved = true; + ctx.s.remove( + ctx.startOffset + (hasName ? arg0.end : options.start), + ctx.startOffset + options.end + ); + } + } + ctx.modelDecls[modelName] = { + type, + options: optionsString, + runtimeOptionNodes, + identifier: declId && declId.type === "Identifier" ? declId.name : void 0 + }; + ctx.bindingMetadata[modelName] = "props"; + ctx.s.overwrite( + ctx.startOffset + node.callee.start, + ctx.startOffset + node.callee.end, + ctx.helper("useModel") + ); + ctx.s.appendLeft( + ctx.startOffset + (node.arguments.length ? node.arguments[0].start : node.end - 1), + `__props, ` + (hasName ? `` : `${JSON.stringify(modelName)}${optionsRemoved ? `` : `, `}`) + ); + return true; +} +function genModelProps(ctx) { + if (!ctx.hasDefineModelCall) + return; + const isProd = !!ctx.options.isProd; + let modelPropsDecl = ""; + for (const [name, { type, options }] of Object.entries(ctx.modelDecls)) { + let skipCheck = false; + let runtimeTypes = type && inferRuntimeType(ctx, type); + if (runtimeTypes) { + const hasUnknownType = runtimeTypes.includes(UNKNOWN_TYPE); + runtimeTypes = runtimeTypes.filter((el) => { + if (el === UNKNOWN_TYPE) + return false; + return isProd ? el === "Boolean" || el === "Function" && options : true; + }); + skipCheck = !isProd && hasUnknownType && runtimeTypes.length > 0; + } + let runtimeType = runtimeTypes && runtimeTypes.length > 0 && toRuntimeTypeString(runtimeTypes) || void 0; + const codegenOptions = concatStrings([ + runtimeType && `type: ${runtimeType}`, + skipCheck && "skipCheck: true" + ]); + let decl; + if (runtimeType && options) { + decl = ctx.isTS ? `{ ${codegenOptions}, ...${options} }` : `Object.assign({ ${codegenOptions} }, ${options})`; + } else { + decl = options || (runtimeType ? `{ ${codegenOptions} }` : "{}"); + } + modelPropsDecl += ` + ${JSON.stringify(name)}: ${decl},`; + const modifierPropName = JSON.stringify( + name === "modelValue" ? `modelModifiers` : `${name}Modifiers` + ); + modelPropsDecl += ` + ${modifierPropName}: {},`; + } + return `{${modelPropsDecl} + }`; +} + +const DEFINE_PROPS = "defineProps"; +const WITH_DEFAULTS = "withDefaults"; +function processDefineProps(ctx, node, declId) { + if (!isCallOf(node, DEFINE_PROPS)) { + return processWithDefaults(ctx, node, declId); + } + if (ctx.hasDefinePropsCall) { + ctx.error(`duplicate ${DEFINE_PROPS}() call`, node); + } + ctx.hasDefinePropsCall = true; + ctx.propsRuntimeDecl = node.arguments[0]; + if (ctx.propsRuntimeDecl) { + for (const key of getObjectOrArrayExpressionKeys(ctx.propsRuntimeDecl)) { + if (!(key in ctx.bindingMetadata)) { + ctx.bindingMetadata[key] = "props"; + } + } + } + if (node.typeParameters) { + if (ctx.propsRuntimeDecl) { + ctx.error( + `${DEFINE_PROPS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, + node + ); + } + ctx.propsTypeDecl = node.typeParameters.params[0]; + } + if (declId && declId.type === "ObjectPattern") { + processPropsDestructure(ctx, declId); + } + ctx.propsCall = node; + ctx.propsDecl = declId; + return true; +} +function processWithDefaults(ctx, node, declId) { + if (!isCallOf(node, WITH_DEFAULTS)) { + return false; + } + if (!processDefineProps(ctx, node.arguments[0], declId)) { + ctx.error( + `${WITH_DEFAULTS}' first argument must be a ${DEFINE_PROPS} call.`, + node.arguments[0] || node + ); + } + if (ctx.propsRuntimeDecl) { + ctx.error( + `${WITH_DEFAULTS} can only be used with type-based ${DEFINE_PROPS} declaration.`, + node + ); + } + if (ctx.propsDestructureDecl) { + ctx.error( + `${WITH_DEFAULTS}() is unnecessary when using destructure with ${DEFINE_PROPS}(). +Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...).`, + node.callee + ); + } + ctx.propsRuntimeDefaults = node.arguments[1]; + if (!ctx.propsRuntimeDefaults) { + ctx.error(`The 2nd argument of ${WITH_DEFAULTS} is required.`, node); + } + ctx.propsCall = node; + return true; +} +function genRuntimeProps(ctx) { + let propsDecls; + if (ctx.propsRuntimeDecl) { + propsDecls = ctx.getString(ctx.propsRuntimeDecl).trim(); + if (ctx.propsDestructureDecl) { + const defaults = []; + for (const key in ctx.propsDestructuredBindings) { + const d = genDestructuredDefaultValue(ctx, key); + const finalKey = getEscapedPropName(key); + if (d) + defaults.push( + `${finalKey}: ${d.valueString}${d.needSkipFactory ? `, __skip_${finalKey}: true` : ``}` + ); + } + if (defaults.length) { + propsDecls = `/*#__PURE__*/${ctx.helper( + `mergeDefaults` + )}(${propsDecls}, { + ${defaults.join(",\n ")} +})`; + } + } + } else if (ctx.propsTypeDecl) { + propsDecls = extractRuntimeProps(ctx); + } + const modelsDecls = genModelProps(ctx); + if (propsDecls && modelsDecls) { + return `/*#__PURE__*/${ctx.helper( + "mergeModels" + )}(${propsDecls}, ${modelsDecls})`; + } else { + return modelsDecls || propsDecls; + } +} +function extractRuntimeProps(ctx) { + const props = resolveRuntimePropsFromType(ctx, ctx.propsTypeDecl); + if (!props.length) { + return; + } + const propStrings = []; + const hasStaticDefaults = hasStaticWithDefaults(ctx); + for (const prop of props) { + propStrings.push(genRuntimePropFromType(ctx, prop, hasStaticDefaults)); + if ("bindingMetadata" in ctx && !(prop.key in ctx.bindingMetadata)) { + ctx.bindingMetadata[prop.key] = "props"; + } + } + let propsDecls = `{ + ${propStrings.join(",\n ")} + }`; + if (ctx.propsRuntimeDefaults && !hasStaticDefaults) { + propsDecls = `/*#__PURE__*/${ctx.helper( + "mergeDefaults" + )}(${propsDecls}, ${ctx.getString(ctx.propsRuntimeDefaults)})`; + } + return propsDecls; +} +function resolveRuntimePropsFromType(ctx, node) { + const props = []; + const elements = resolveTypeElements(ctx, node); + for (const key in elements.props) { + const e = elements.props[key]; + let type = inferRuntimeType(ctx, e); + let skipCheck = false; + if (type.includes(UNKNOWN_TYPE)) { + if (type.includes("Boolean") || type.includes("Function")) { + type = type.filter((t) => t !== UNKNOWN_TYPE); + skipCheck = true; + } else { + type = ["null"]; + } + } + props.push({ + key, + required: !e.optional, + type: type || [`null`], + skipCheck + }); + } + return props; +} +function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStaticDefaults) { + let defaultString; + const destructured = genDestructuredDefaultValue(ctx, key, type); + if (destructured) { + defaultString = `default: ${destructured.valueString}${destructured.needSkipFactory ? `, skipFactory: true` : ``}`; + } else if (hasStaticDefaults) { + const prop = ctx.propsRuntimeDefaults.properties.find( + (node) => { + if (node.type === "SpreadElement") + return false; + return resolveObjectKey(node.key, node.computed) === key; + } + ); + if (prop) { + if (prop.type === "ObjectProperty") { + defaultString = `default: ${ctx.getString(prop.value)}`; + } else { + defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`; + } + } + } + const finalKey = getEscapedPropName(key); + if (!ctx.options.isProd) { + return `${finalKey}: { ${concatStrings([ + `type: ${toRuntimeTypeString(type)}`, + `required: ${required}`, + skipCheck && "skipCheck: true", + defaultString + ])} }`; + } else if (type.some( + (el) => el === "Boolean" || (!hasStaticDefaults || defaultString) && el === "Function" + )) { + return `${finalKey}: { ${concatStrings([ + `type: ${toRuntimeTypeString(type)}`, + defaultString + ])} }`; + } else { + if (ctx.isCE) { + if (defaultString) { + return `${finalKey}: ${`{ ${defaultString}, type: ${toRuntimeTypeString( + type + )} }`}`; + } else { + return `${finalKey}: {type: ${toRuntimeTypeString(type)}}`; + } + } + return `${finalKey}: ${defaultString ? `{ ${defaultString} }` : `{}`}`; + } +} +function hasStaticWithDefaults(ctx) { + return !!(ctx.propsRuntimeDefaults && ctx.propsRuntimeDefaults.type === "ObjectExpression" && ctx.propsRuntimeDefaults.properties.every( + (node) => node.type !== "SpreadElement" && (!node.computed || node.key.type.endsWith("Literal")) + )); +} +function genDestructuredDefaultValue(ctx, key, inferredType) { + const destructured = ctx.propsDestructuredBindings[key]; + const defaultVal = destructured && destructured.default; + if (defaultVal) { + const value = ctx.getString(defaultVal); + const unwrapped = CompilerDOM.unwrapTSNode(defaultVal); + if (inferredType && inferredType.length && !inferredType.includes("null")) { + const valueType = inferValueType(unwrapped); + if (valueType && !inferredType.includes(valueType)) { + ctx.error( + `Default value of prop "${key}" does not match declared type.`, + unwrapped + ); + } + } + const needSkipFactory = !inferredType && (CompilerDOM.isFunctionType(unwrapped) || unwrapped.type === "Identifier"); + const needFactoryWrap = !needSkipFactory && !isLiteralNode(unwrapped) && !(inferredType == null ? void 0 : inferredType.includes("Function")); + return { + valueString: needFactoryWrap ? `() => (${value})` : value, + needSkipFactory + }; + } +} +function inferValueType(node) { + switch (node.type) { + case "StringLiteral": + return "String"; + case "NumericLiteral": + return "Number"; + case "BooleanLiteral": + return "Boolean"; + case "ObjectExpression": + return "Object"; + case "ArrayExpression": + return "Array"; + case "FunctionExpression": + case "ArrowFunctionExpression": + return "Function"; + } +} + +function processPropsDestructure(ctx, declId) { + if (!ctx.options.propsDestructure) { + return; + } + warnOnce( + `This project is using reactive props destructure, which is an experimental feature. It may receive breaking changes or be removed in the future, so use at your own risk. +To stay updated, follow the RFC at https://github.com/vuejs/rfcs/discussions/502.` + ); + ctx.propsDestructureDecl = declId; + const registerBinding = (key, local, defaultValue) => { + ctx.propsDestructuredBindings[key] = { local, default: defaultValue }; + if (local !== key) { + ctx.bindingMetadata[local] = "props-aliased"; + (ctx.bindingMetadata.__propsAliases || (ctx.bindingMetadata.__propsAliases = {}))[local] = key; + } + }; + for (const prop of declId.properties) { + if (prop.type === "ObjectProperty") { + const propKey = resolveObjectKey(prop.key, prop.computed); + if (!propKey) { + ctx.error( + `${DEFINE_PROPS}() destructure cannot use computed key.`, + prop.key + ); + } + if (prop.value.type === "AssignmentPattern") { + const { left, right } = prop.value; + if (left.type !== "Identifier") { + ctx.error( + `${DEFINE_PROPS}() destructure does not support nested patterns.`, + left + ); + } + registerBinding(propKey, left.name, right); + } else if (prop.value.type === "Identifier") { + registerBinding(propKey, prop.value.name); + } else { + ctx.error( + `${DEFINE_PROPS}() destructure does not support nested patterns.`, + prop.value + ); + } + } else { + ctx.propsDestructureRestId = prop.argument.name; + ctx.bindingMetadata[ctx.propsDestructureRestId] = "setup-reactive-const"; + } + } +} +function transformDestructuredProps(ctx, vueImportAliases) { + if (!ctx.options.propsDestructure) { + return; + } + const rootScope = {}; + const scopeStack = [rootScope]; + let currentScope = rootScope; + const excludedIds = /* @__PURE__ */ new WeakSet(); + const parentStack = []; + const propsLocalToPublicMap = /* @__PURE__ */ Object.create(null); + for (const key in ctx.propsDestructuredBindings) { + const { local } = ctx.propsDestructuredBindings[key]; + rootScope[local] = true; + propsLocalToPublicMap[local] = key; + } + function pushScope() { + scopeStack.push(currentScope = Object.create(currentScope)); + } + function popScope() { + scopeStack.pop(); + currentScope = scopeStack[scopeStack.length - 1] || null; + } + function registerLocalBinding(id) { + excludedIds.add(id); + if (currentScope) { + currentScope[id.name] = false; + } else { + ctx.error( + "registerBinding called without active scope, something is wrong.", + id + ); + } + } + function walkScope(node, isRoot = false) { + for (const stmt of node.body) { + if (stmt.type === "VariableDeclaration") { + walkVariableDeclaration(stmt, isRoot); + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) + continue; + registerLocalBinding(stmt.id); + } else if ((stmt.type === "ForOfStatement" || stmt.type === "ForInStatement") && stmt.left.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.left); + } else if (stmt.type === "ExportNamedDeclaration" && stmt.declaration && stmt.declaration.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.declaration, isRoot); + } else if (stmt.type === "LabeledStatement" && stmt.body.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.body, isRoot); + } + } + } + function walkVariableDeclaration(stmt, isRoot = false) { + if (stmt.declare) { + return; + } + for (const decl of stmt.declarations) { + const isDefineProps = isRoot && decl.init && isCallOf(CompilerDOM.unwrapTSNode(decl.init), "defineProps"); + for (const id of CompilerDOM.extractIdentifiers(decl.id)) { + if (isDefineProps) { + excludedIds.add(id); + } else { + registerLocalBinding(id); + } + } + } + } + function rewriteId(id, parent, parentStack2) { + if (parent.type === "AssignmentExpression" && id === parent.left || parent.type === "UpdateExpression") { + ctx.error(`Cannot assign to destructured props as they are readonly.`, id); + } + if (CompilerDOM.isStaticProperty(parent) && parent.shorthand) { + if (!parent.inPattern || CompilerDOM.isInDestructureAssignment(parent, parentStack2)) { + ctx.s.appendLeft( + id.end + ctx.startOffset, + `: ${shared.genPropsAccessExp(propsLocalToPublicMap[id.name])}` + ); + } + } else { + ctx.s.overwrite( + id.start + ctx.startOffset, + id.end + ctx.startOffset, + shared.genPropsAccessExp(propsLocalToPublicMap[id.name]) + ); + } + } + function checkUsage(node, method, alias = method) { + if (isCallOf(node, alias)) { + const arg = CompilerDOM.unwrapTSNode(node.arguments[0]); + if (arg.type === "Identifier" && currentScope[arg.name]) { + ctx.error( + `"${arg.name}" is a destructured prop and should not be passed directly to ${method}(). Pass a getter () => ${arg.name} instead.`, + arg + ); + } + } + } + const ast = ctx.scriptSetupAst; + walkScope(ast, true); + estreeWalker.walk(ast, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && parent.type !== "TSAsExpression" && parent.type !== "TSNonNullExpression" && parent.type !== "TSTypeAssertion") { + return this.skip(); + } + checkUsage(node, "watch", vueImportAliases.watch); + checkUsage(node, "toRef", vueImportAliases.toRef); + if (CompilerDOM.isFunctionType(node)) { + pushScope(); + CompilerDOM.walkFunctionParams(node, registerLocalBinding); + if (node.body.type === "BlockStatement") { + walkScope(node.body); + } + return; + } + if (node.type === "CatchClause") { + pushScope(); + if (node.param && node.param.type === "Identifier") { + registerLocalBinding(node.param); + } + walkScope(node.body); + return; + } + if (node.type === "BlockStatement" && !CompilerDOM.isFunctionType(parent)) { + pushScope(); + walkScope(node); + return; + } + if (node.type === "Identifier") { + if (CompilerDOM.isReferencedIdentifier(node, parent, parentStack) && !excludedIds.has(node)) { + if (currentScope[node.name]) { + rewriteId(node, parent, parentStack); + } + } + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node.type === "BlockStatement" && !CompilerDOM.isFunctionType(parent) || CompilerDOM.isFunctionType(node)) { + popScope(); + } + } + }); +} + +const DEFINE_EMITS = "defineEmits"; +function processDefineEmits(ctx, node, declId) { + if (!isCallOf(node, DEFINE_EMITS)) { + return false; + } + if (ctx.hasDefineEmitCall) { + ctx.error(`duplicate ${DEFINE_EMITS}() call`, node); + } + ctx.hasDefineEmitCall = true; + ctx.emitsRuntimeDecl = node.arguments[0]; + if (node.typeParameters) { + if (ctx.emitsRuntimeDecl) { + ctx.error( + `${DEFINE_EMITS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, + node + ); + } + ctx.emitsTypeDecl = node.typeParameters.params[0]; + } + ctx.emitDecl = declId; + return true; +} +function genRuntimeEmits(ctx) { + let emitsDecl = ""; + if (ctx.emitsRuntimeDecl) { + emitsDecl = ctx.getString(ctx.emitsRuntimeDecl).trim(); + } else if (ctx.emitsTypeDecl) { + const typeDeclaredEmits = extractRuntimeEmits(ctx); + emitsDecl = typeDeclaredEmits.size ? `[${Array.from(typeDeclaredEmits).map((k) => JSON.stringify(k)).join(", ")}]` : ``; + } + if (ctx.hasDefineModelCall) { + let modelEmitsDecl = `[${Object.keys(ctx.modelDecls).map((n) => JSON.stringify(`update:${n}`)).join(", ")}]`; + emitsDecl = emitsDecl ? `/*#__PURE__*/${ctx.helper( + "mergeModels" + )}(${emitsDecl}, ${modelEmitsDecl})` : modelEmitsDecl; + } + return emitsDecl; +} +function extractRuntimeEmits(ctx) { + const emits = /* @__PURE__ */ new Set(); + const node = ctx.emitsTypeDecl; + if (node.type === "TSFunctionType") { + extractEventNames(ctx, node.parameters[0], emits); + return emits; + } + const { props, calls } = resolveTypeElements(ctx, node); + let hasProperty = false; + for (const key in props) { + emits.add(key); + hasProperty = true; + } + if (calls) { + if (hasProperty) { + ctx.error( + `defineEmits() type cannot mixed call signature and property syntax.`, + node + ); + } + for (const call of calls) { + extractEventNames(ctx, call.parameters[0], emits); + } + } + return emits; +} +function extractEventNames(ctx, eventName, emits) { + if (eventName.type === "Identifier" && eventName.typeAnnotation && eventName.typeAnnotation.type === "TSTypeAnnotation") { + const types = resolveUnionType(ctx, eventName.typeAnnotation.typeAnnotation); + for (const type of types) { + if (type.type === "TSLiteralType") { + if (type.literal.type !== "UnaryExpression" && type.literal.type !== "TemplateLiteral") { + emits.add(String(type.literal.value)); + } + } + } + } +} + +const DEFINE_EXPOSE = "defineExpose"; +function processDefineExpose(ctx, node) { + if (isCallOf(node, DEFINE_EXPOSE)) { + if (ctx.hasDefineExposeCall) { + ctx.error(`duplicate ${DEFINE_EXPOSE}() call`, node); + } + ctx.hasDefineExposeCall = true; + return true; + } + return false; +} + +const DEFINE_SLOTS = "defineSlots"; +function processDefineSlots(ctx, node, declId) { + if (!isCallOf(node, DEFINE_SLOTS)) { + return false; + } + if (ctx.hasDefineSlotsCall) { + ctx.error(`duplicate ${DEFINE_SLOTS}() call`, node); + } + ctx.hasDefineSlotsCall = true; + if (node.arguments.length > 0) { + ctx.error(`${DEFINE_SLOTS}() cannot accept arguments`, node); + } + if (declId) { + ctx.s.overwrite( + ctx.startOffset + node.start, + ctx.startOffset + node.end, + `${ctx.helper("useSlots")}()` + ); + } + return true; +} + +const DEFINE_OPTIONS = "defineOptions"; +function processDefineOptions(ctx, node) { + if (!isCallOf(node, DEFINE_OPTIONS)) { + return false; + } + if (ctx.hasDefineOptionsCall) { + ctx.error(`duplicate ${DEFINE_OPTIONS}() call`, node); + } + if (node.typeParameters) { + ctx.error(`${DEFINE_OPTIONS}() cannot accept type arguments`, node); + } + if (!node.arguments[0]) + return true; + ctx.hasDefineOptionsCall = true; + ctx.optionsRuntimeDecl = CompilerDOM.unwrapTSNode(node.arguments[0]); + let propsOption = void 0; + let emitsOption = void 0; + let exposeOption = void 0; + let slotsOption = void 0; + if (ctx.optionsRuntimeDecl.type === "ObjectExpression") { + for (const prop of ctx.optionsRuntimeDecl.properties) { + if ((prop.type === "ObjectProperty" || prop.type === "ObjectMethod") && prop.key.type === "Identifier") { + if (prop.key.name === "props") + propsOption = prop; + if (prop.key.name === "emits") + emitsOption = prop; + if (prop.key.name === "expose") + exposeOption = prop; + if (prop.key.name === "slots") + slotsOption = prop; + } + } + } + if (propsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare props. Use ${DEFINE_PROPS}() instead.`, + propsOption + ); + } + if (emitsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare emits. Use ${DEFINE_EMITS}() instead.`, + emitsOption + ); + } + if (exposeOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare expose. Use ${DEFINE_EXPOSE}() instead.`, + exposeOption + ); + } + if (slotsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare slots. Use ${DEFINE_SLOTS}() instead.`, + slotsOption + ); + } + return true; +} + +function processAwait(ctx, node, needSemi, isStatement) { + const argumentStart = node.argument.extra && node.argument.extra.parenthesized ? node.argument.extra.parenStart : node.argument.start; + const startOffset = ctx.startOffset; + const argumentStr = ctx.descriptor.source.slice( + argumentStart + startOffset, + node.argument.end + startOffset + ); + const containsNestedAwait = /\bawait\b/.test(argumentStr); + ctx.s.overwrite( + node.start + startOffset, + argumentStart + startOffset, + `${needSemi ? `;` : ``}( + ([__temp,__restore] = ${ctx.helper( + `withAsyncContext` + )}(${containsNestedAwait ? `async ` : ``}() => ` + ); + ctx.s.appendLeft( + node.end + startOffset, + `)), + ${isStatement ? `` : `__temp = `}await __temp, + __restore()${isStatement ? `` : `, + __temp`} +)` + ); +} + +function compileScript(sfc, options) { + var _a; + if (!options.id) { + warnOnce( + `compileScript now requires passing the \`id\` option. +Upgrade your vite or vue-loader version for compatibility with the latest experimental proposals.` + ); + } + const ctx = new ScriptCompileContext(sfc, options); + const { script, scriptSetup, source, filename } = sfc; + const hoistStatic = options.hoistStatic !== false && !script; + const scopeId = options.id ? options.id.replace(/^data-v-/, "") : ""; + const scriptLang = script && script.lang; + const scriptSetupLang = scriptSetup && scriptSetup.lang; + if (!scriptSetup) { + if (!script) { + throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`); + } + return processNormalScript(ctx, scopeId); + } + if (script && scriptLang !== scriptSetupLang) { + throw new Error( + `[@vue/compiler-sfc] <script> and <script setup> must have the same language type.` + ); + } + if (scriptSetupLang && !ctx.isJS && !ctx.isTS) { + return scriptSetup; + } + const scriptBindings = /* @__PURE__ */ Object.create(null); + const setupBindings = /* @__PURE__ */ Object.create(null); + let defaultExport; + let hasAwait = false; + let hasInlinedSsrRenderFn = false; + const startOffset = ctx.startOffset; + const endOffset = ctx.endOffset; + const scriptStartOffset = script && script.loc.start.offset; + const scriptEndOffset = script && script.loc.end.offset; + function hoistNode(node) { + const start = node.start + startOffset; + let end = node.end + startOffset; + if (node.trailingComments && node.trailingComments.length > 0) { + const lastCommentNode = node.trailingComments[node.trailingComments.length - 1]; + end = lastCommentNode.end + startOffset; + } + while (end <= source.length) { + if (!/\s/.test(source.charAt(end))) { + break; + } + end++; + } + ctx.s.move(start, end, 0); + } + function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) { + let isUsedInTemplate = needTemplateUsageCheck; + if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) { + isUsedInTemplate = isImportUsed(local, sfc); + } + ctx.userImports[local] = { + isType, + imported, + local, + source: source2, + isFromSetup, + isUsedInTemplate + }; + } + function checkInvalidScopeReference(node, method) { + if (!node) + return; + CompilerDOM.walkIdentifiers(node, (id) => { + const binding = setupBindings[id.name]; + if (binding && binding !== "literal-const") { + ctx.error( + `\`${method}()\` in <script setup> cannot reference locally declared variables because it will be hoisted outside of the setup() function. If your component options require initialization in the module scope, use a separate normal <script> to export the options instead.`, + id + ); + } + }); + } + const scriptAst = ctx.scriptAst; + const scriptSetupAst = ctx.scriptSetupAst; + if (scriptAst) { + for (const node of scriptAst.body) { + if (node.type === "ImportDeclaration") { + for (const specifier of node.specifiers) { + const imported = getImportedName(specifier); + registerUserImport( + node.source.value, + specifier.local.name, + imported, + node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", + false, + !options.inlineTemplate + ); + } + } + } + } + for (const node of scriptSetupAst.body) { + if (node.type === "ImportDeclaration") { + hoistNode(node); + let removed = 0; + const removeSpecifier = (i) => { + const removeLeft = i > removed; + removed++; + const current = node.specifiers[i]; + const next = node.specifiers[i + 1]; + ctx.s.remove( + removeLeft ? node.specifiers[i - 1].end + startOffset : current.start + startOffset, + next && !removeLeft ? next.start + startOffset : current.end + startOffset + ); + }; + for (let i = 0; i < node.specifiers.length; i++) { + const specifier = node.specifiers[i]; + const local = specifier.local.name; + const imported = getImportedName(specifier); + const source2 = node.source.value; + const existing = ctx.userImports[local]; + if (source2 === "vue" && (imported === DEFINE_PROPS || imported === DEFINE_EMITS || imported === DEFINE_EXPOSE)) { + warnOnce( + `\`${imported}\` is a compiler macro and no longer needs to be imported.` + ); + removeSpecifier(i); + } else if (existing) { + if (existing.source === source2 && existing.imported === imported) { + removeSpecifier(i); + } else { + ctx.error( + `different imports aliased to same local name.`, + specifier + ); + } + } else { + registerUserImport( + source2, + local, + imported, + node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", + true, + !options.inlineTemplate + ); + } + } + if (node.specifiers.length && removed === node.specifiers.length) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } + } + } + const vueImportAliases = {}; + for (const key in ctx.userImports) { + const { source: source2, imported, local } = ctx.userImports[key]; + if (source2 === "vue") + vueImportAliases[imported] = local; + } + if (script && scriptAst) { + for (const node of scriptAst.body) { + if (node.type === "ExportDefaultDeclaration") { + defaultExport = node; + let optionProperties; + if (defaultExport.declaration.type === "ObjectExpression") { + optionProperties = defaultExport.declaration.properties; + } else if (defaultExport.declaration.type === "CallExpression" && defaultExport.declaration.arguments[0] && defaultExport.declaration.arguments[0].type === "ObjectExpression") { + optionProperties = defaultExport.declaration.arguments[0].properties; + } + if (optionProperties) { + for (const p of optionProperties) { + if (p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "name") { + ctx.hasDefaultExportName = true; + } + if ((p.type === "ObjectMethod" || p.type === "ObjectProperty") && p.key.type === "Identifier" && p.key.name === "render") { + ctx.hasDefaultExportRender = true; + } + } + } + const start = node.start + scriptStartOffset; + const end = node.declaration.start + scriptStartOffset; + ctx.s.overwrite(start, end, `const ${normalScriptDefaultVar} = `); + } else if (node.type === "ExportNamedDeclaration") { + const defaultSpecifier = node.specifiers.find( + (s) => s.exported.type === "Identifier" && s.exported.name === "default" + ); + if (defaultSpecifier) { + defaultExport = node; + if (node.specifiers.length > 1) { + ctx.s.remove( + defaultSpecifier.start + scriptStartOffset, + defaultSpecifier.end + scriptStartOffset + ); + } else { + ctx.s.remove( + node.start + scriptStartOffset, + node.end + scriptStartOffset + ); + } + if (node.source) { + ctx.s.prepend( + `import { ${defaultSpecifier.local.name} as ${normalScriptDefaultVar} } from '${node.source.value}' +` + ); + } else { + ctx.s.appendLeft( + scriptEndOffset, + ` +const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name} +` + ); + } + } + if (node.declaration) { + walkDeclaration( + "script", + node.declaration, + scriptBindings, + vueImportAliases, + hoistStatic + ); + } + } else if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { + walkDeclaration( + "script", + node, + scriptBindings, + vueImportAliases, + hoistStatic + ); + } + } + if (scriptStartOffset > startOffset) { + if (!/\n$/.test(script.content.trim())) { + ctx.s.appendLeft(scriptEndOffset, ` +`); + } + ctx.s.move(scriptStartOffset, scriptEndOffset, 0); + } + } + for (const node of scriptSetupAst.body) { + if (node.type === "ExpressionStatement") { + const expr = CompilerDOM.unwrapTSNode(node.expression); + if (processDefineProps(ctx, expr) || processDefineEmits(ctx, expr) || processDefineOptions(ctx, expr) || processDefineSlots(ctx, expr)) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } else if (processDefineExpose(ctx, expr)) { + const callee = expr.callee; + ctx.s.overwrite( + callee.start + startOffset, + callee.end + startOffset, + "__expose" + ); + } else { + processDefineModel(ctx, expr); + } + } + if (node.type === "VariableDeclaration" && !node.declare) { + const total = node.declarations.length; + let left = total; + let lastNonRemoved; + for (let i = 0; i < total; i++) { + const decl = node.declarations[i]; + const init = decl.init && CompilerDOM.unwrapTSNode(decl.init); + if (init) { + if (processDefineOptions(ctx, init)) { + ctx.error( + `${DEFINE_OPTIONS}() has no returning value, it cannot be assigned.`, + node + ); + } + const isDefineProps = processDefineProps(ctx, init, decl.id); + const isDefineEmits = !isDefineProps && processDefineEmits(ctx, init, decl.id); + !isDefineEmits && (processDefineSlots(ctx, init, decl.id) || processDefineModel(ctx, init, decl.id)); + if (isDefineProps && !ctx.propsDestructureRestId && ctx.propsDestructureDecl) { + if (left === 1) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } else { + let start = decl.start + startOffset; + let end = decl.end + startOffset; + if (i === total - 1) { + start = node.declarations[lastNonRemoved].end + startOffset; + } else { + end = node.declarations[i + 1].start + startOffset; + } + ctx.s.remove(start, end); + left--; + } + } else if (isDefineEmits) { + ctx.s.overwrite( + startOffset + init.start, + startOffset + init.end, + "__emit" + ); + } else { + lastNonRemoved = i; + } + } + } + } + let isAllLiteral = false; + if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { + isAllLiteral = walkDeclaration( + "scriptSetup", + node, + setupBindings, + vueImportAliases, + hoistStatic + ); + } + if (hoistStatic && isAllLiteral) { + hoistNode(node); + } + if (node.type === "VariableDeclaration" && !node.declare || node.type.endsWith("Statement")) { + const scope = [scriptSetupAst.body]; + estreeWalker.walk(node, { + enter(child, parent) { + if (CompilerDOM.isFunctionType(child)) { + this.skip(); + } + if (child.type === "BlockStatement") { + scope.push(child.body); + } + if (child.type === "AwaitExpression") { + hasAwait = true; + const currentScope = scope[scope.length - 1]; + const needsSemi = currentScope.some((n, i) => { + return (scope.length === 1 || i > 0) && n.type === "ExpressionStatement" && n.start === child.start; + }); + processAwait( + ctx, + child, + needsSemi, + parent.type === "ExpressionStatement" + ); + } + }, + exit(node2) { + if (node2.type === "BlockStatement") + scope.pop(); + } + }); + } + if (node.type === "ExportNamedDeclaration" && node.exportKind !== "type" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration") { + ctx.error( + `<script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.`, + node + ); + } + if (ctx.isTS) { + if (node.type.startsWith("TS") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "VariableDeclaration" && node.declare) { + if (node.type !== "TSEnumDeclaration") { + hoistNode(node); + } + } + } + } + if (ctx.propsDestructureDecl) { + transformDestructuredProps(ctx, vueImportAliases); + } + checkInvalidScopeReference(ctx.propsRuntimeDecl, DEFINE_PROPS); + checkInvalidScopeReference(ctx.propsRuntimeDefaults, DEFINE_PROPS); + checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS); + checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS); + checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS); + for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) { + for (const node of runtimeOptionNodes) { + checkInvalidScopeReference(node, DEFINE_MODEL); + } + } + if (script) { + if (startOffset < scriptStartOffset) { + ctx.s.remove(0, startOffset); + ctx.s.remove(endOffset, scriptStartOffset); + ctx.s.remove(scriptEndOffset, source.length); + } else { + ctx.s.remove(0, scriptStartOffset); + ctx.s.remove(scriptEndOffset, startOffset); + ctx.s.remove(endOffset, source.length); + } + } else { + ctx.s.remove(0, startOffset); + ctx.s.remove(endOffset, source.length); + } + if (scriptAst) { + Object.assign(ctx.bindingMetadata, analyzeScriptBindings(scriptAst.body)); + } + for (const [key, { isType, imported, source: source2 }] of Object.entries( + ctx.userImports + )) { + if (isType) + continue; + ctx.bindingMetadata[key] = imported === "*" || imported === "default" && source2.endsWith(".vue") || source2 === "vue" ? "setup-const" : "setup-maybe-ref"; + } + for (const key in scriptBindings) { + ctx.bindingMetadata[key] = scriptBindings[key]; + } + for (const key in setupBindings) { + ctx.bindingMetadata[key] = setupBindings[key]; + } + if (sfc.cssVars.length && // no need to do this when targeting SSR + !((_a = options.templateOptions) == null ? void 0 : _a.ssr)) { + ctx.helperImports.add(CSS_VARS_HELPER); + ctx.helperImports.add("unref"); + ctx.s.prependLeft( + startOffset, + ` +${genCssVarsCode( + sfc.cssVars, + ctx.bindingMetadata, + scopeId, + !!options.isProd + )} +` + ); + } + let args = `__props`; + if (ctx.propsTypeDecl) { + args += `: any`; + } + if (ctx.propsDecl) { + if (ctx.propsDestructureRestId) { + ctx.s.overwrite( + startOffset + ctx.propsCall.start, + startOffset + ctx.propsCall.end, + `${ctx.helper(`createPropsRestProxy`)}(__props, ${JSON.stringify( + Object.keys(ctx.propsDestructuredBindings) + )})` + ); + ctx.s.overwrite( + startOffset + ctx.propsDestructureDecl.start, + startOffset + ctx.propsDestructureDecl.end, + ctx.propsDestructureRestId + ); + } else if (!ctx.propsDestructureDecl) { + ctx.s.overwrite( + startOffset + ctx.propsCall.start, + startOffset + ctx.propsCall.end, + "__props" + ); + } + } + if (hasAwait) { + const any = ctx.isTS ? `: any` : ``; + ctx.s.prependLeft(startOffset, ` +let __temp${any}, __restore${any} +`); + } + const destructureElements = ctx.hasDefineExposeCall || !options.inlineTemplate ? [`expose: __expose`] : []; + if (ctx.emitDecl) { + destructureElements.push(`emit: __emit`); + } + if (destructureElements.length) { + args += `, { ${destructureElements.join(", ")} }`; + } + let returned; + if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) { + const allBindings = { + ...scriptBindings, + ...setupBindings + }; + for (const key in ctx.userImports) { + if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) { + allBindings[key] = true; + } + } + returned = `{ `; + for (const key in allBindings) { + if (allBindings[key] === true && ctx.userImports[key].source !== "vue" && !ctx.userImports[key].source.endsWith(".vue")) { + returned += `get ${key}() { return ${key} }, `; + } else if (ctx.bindingMetadata[key] === "setup-let") { + const setArg = key === "v" ? `_v` : `v`; + returned += `get ${key}() { return ${key} }, set ${key}(${setArg}) { ${key} = ${setArg} }, `; + } else { + returned += `${key}, `; + } + } + returned = returned.replace(/, $/, "") + ` }`; + } else { + if (sfc.template && !sfc.template.src) { + if (options.templateOptions && options.templateOptions.ssr) { + hasInlinedSsrRenderFn = true; + } + const { code, ast, preamble, tips, errors } = compileTemplate({ + filename, + ast: sfc.template.ast, + source: sfc.template.content, + inMap: sfc.template.map, + ...options.templateOptions, + id: scopeId, + scoped: sfc.styles.some((s) => s.scoped), + isProd: options.isProd, + ssrCssVars: sfc.cssVars, + compilerOptions: { + ...options.templateOptions && options.templateOptions.compilerOptions, + inline: true, + isTS: ctx.isTS, + bindingMetadata: ctx.bindingMetadata + } + }); + if (tips.length) { + tips.forEach(warnOnce); + } + const err = errors[0]; + if (typeof err === "string") { + throw new Error(err); + } else if (err) { + if (err.loc) { + err.message += ` + +` + sfc.filename + "\n" + shared.generateCodeFrame( + source, + err.loc.start.offset, + err.loc.end.offset + ) + ` +`; + } + throw err; + } + if (preamble) { + ctx.s.prepend(preamble); + } + if (ast && ast.helpers.has(CompilerDOM.UNREF)) { + ctx.helperImports.delete("unref"); + } + returned = code; + } else { + returned = `() => {}`; + } + } + if (!options.inlineTemplate && true) { + ctx.s.appendRight( + endOffset, + ` +const __returned__ = ${returned} +Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true }) +return __returned__ +} + +` + ); + } else { + ctx.s.appendRight(endOffset, ` +return ${returned} +} + +`); + } + const genDefaultAs = options.genDefaultAs ? `const ${options.genDefaultAs} =` : `export default`; + let runtimeOptions = ``; + if (!ctx.hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) { + const match = filename.match(/([^/\\]+)\.\w+$/); + if (match) { + runtimeOptions += ` + __name: '${match[1]}',`; + } + } + if (hasInlinedSsrRenderFn) { + runtimeOptions += ` + __ssrInlineRender: true,`; + } + const propsDecl = genRuntimeProps(ctx); + if (propsDecl) + runtimeOptions += ` + props: ${propsDecl},`; + const emitsDecl = genRuntimeEmits(ctx); + if (emitsDecl) + runtimeOptions += ` + emits: ${emitsDecl},`; + let definedOptions = ""; + if (ctx.optionsRuntimeDecl) { + definedOptions = scriptSetup.content.slice(ctx.optionsRuntimeDecl.start, ctx.optionsRuntimeDecl.end).trim(); + } + const exposeCall = ctx.hasDefineExposeCall || options.inlineTemplate ? `` : ` __expose(); +`; + if (ctx.isTS) { + const def = (defaultExport ? ` + ...${normalScriptDefaultVar},` : ``) + (definedOptions ? ` + ...${definedOptions},` : ""); + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} /*#__PURE__*/${ctx.helper( + `defineComponent` + )}({${def}${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `})`); + } else { + if (defaultExport || definedOptions) { + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} /*#__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `})`); + } else { + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} {${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `}`); + } + } + if (ctx.helperImports.size > 0) { + ctx.s.prepend( + `import { ${[...ctx.helperImports].map((h) => `${h} as _${h}`).join(", ")} } from 'vue' +` + ); + } + return { + ...scriptSetup, + bindings: ctx.bindingMetadata, + imports: ctx.userImports, + content: ctx.s.toString(), + map: options.sourceMap !== false ? ctx.s.generateMap({ + source: filename, + hires: true, + includeContent: true + }) : void 0, + scriptAst: scriptAst == null ? void 0 : scriptAst.body, + scriptSetupAst: scriptSetupAst == null ? void 0 : scriptSetupAst.body, + deps: ctx.deps ? [...ctx.deps] : void 0 + }; +} +function registerBinding(bindings, node, type) { + bindings[node.name] = type; +} +function walkDeclaration(from, node, bindings, userImportAliases, hoistStatic) { + let isAllLiteral = false; + if (node.type === "VariableDeclaration") { + const isConst = node.kind === "const"; + isAllLiteral = isConst && node.declarations.every( + (decl) => decl.id.type === "Identifier" && isStaticNode(decl.init) + ); + for (const { id, init: _init } of node.declarations) { + const init = _init && CompilerDOM.unwrapTSNode(_init); + const isDefineCall = !!(isConst && isCallOf( + init, + (c) => c === DEFINE_PROPS || c === DEFINE_EMITS || c === WITH_DEFAULTS + )); + if (id.type === "Identifier") { + let bindingType; + const userReactiveBinding = userImportAliases["reactive"]; + if ((hoistStatic || from === "script") && (isAllLiteral || isConst && isStaticNode(init))) { + bindingType = "literal-const"; + } else if (isCallOf(init, userReactiveBinding)) { + bindingType = isConst ? "setup-reactive-const" : "setup-let"; + } else if ( + // if a declaration is a const literal, we can mark it so that + // the generated render fn code doesn't need to unref() it + isDefineCall || isConst && canNeverBeRef(init, userReactiveBinding) + ) { + bindingType = isCallOf(init, DEFINE_PROPS) ? "setup-reactive-const" : "setup-const"; + } else if (isConst) { + if (isCallOf( + init, + (m) => m === userImportAliases["ref"] || m === userImportAliases["computed"] || m === userImportAliases["shallowRef"] || m === userImportAliases["customRef"] || m === userImportAliases["toRef"] || m === DEFINE_MODEL + )) { + bindingType = "setup-ref"; + } else { + bindingType = "setup-maybe-ref"; + } + } else { + bindingType = "setup-let"; + } + registerBinding(bindings, id, bindingType); + } else { + if (isCallOf(init, DEFINE_PROPS)) { + continue; + } + if (id.type === "ObjectPattern") { + walkObjectPattern(id, bindings, isConst, isDefineCall); + } else if (id.type === "ArrayPattern") { + walkArrayPattern(id, bindings, isConst, isDefineCall); + } + } + } + } else if (node.type === "TSEnumDeclaration") { + isAllLiteral = node.members.every( + (member) => !member.initializer || isStaticNode(member.initializer) + ); + bindings[node.id.name] = isAllLiteral ? "literal-const" : "setup-const"; + } else if (node.type === "FunctionDeclaration" || node.type === "ClassDeclaration") { + bindings[node.id.name] = "setup-const"; + } + return isAllLiteral; +} +function walkObjectPattern(node, bindings, isConst, isDefineCall = false) { + for (const p of node.properties) { + if (p.type === "ObjectProperty") { + if (p.key.type === "Identifier" && p.key === p.value) { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, p.key, type); + } else { + walkPattern(p.value, bindings, isConst, isDefineCall); + } + } else { + const type = isConst ? "setup-const" : "setup-let"; + registerBinding(bindings, p.argument, type); + } + } +} +function walkArrayPattern(node, bindings, isConst, isDefineCall = false) { + for (const e of node.elements) { + e && walkPattern(e, bindings, isConst, isDefineCall); + } +} +function walkPattern(node, bindings, isConst, isDefineCall = false) { + if (node.type === "Identifier") { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, node, type); + } else if (node.type === "RestElement") { + const type = isConst ? "setup-const" : "setup-let"; + registerBinding(bindings, node.argument, type); + } else if (node.type === "ObjectPattern") { + walkObjectPattern(node, bindings, isConst); + } else if (node.type === "ArrayPattern") { + walkArrayPattern(node, bindings, isConst); + } else if (node.type === "AssignmentPattern") { + if (node.left.type === "Identifier") { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, node.left, type); + } else { + walkPattern(node.left, bindings, isConst); + } + } +} +function canNeverBeRef(node, userReactiveImport) { + if (isCallOf(node, userReactiveImport)) { + return true; + } + switch (node.type) { + case "UnaryExpression": + case "BinaryExpression": + case "ArrayExpression": + case "ObjectExpression": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "UpdateExpression": + case "ClassExpression": + case "TaggedTemplateExpression": + return true; + case "SequenceExpression": + return canNeverBeRef( + node.expressions[node.expressions.length - 1], + userReactiveImport + ); + default: + if (isLiteralNode(node)) { + return true; + } + return false; + } +} +function isStaticNode(node) { + node = CompilerDOM.unwrapTSNode(node); + switch (node.type) { + case "UnaryExpression": + return isStaticNode(node.argument); + case "LogicalExpression": + case "BinaryExpression": + return isStaticNode(node.left) && isStaticNode(node.right); + case "ConditionalExpression": { + return isStaticNode(node.test) && isStaticNode(node.consequent) && isStaticNode(node.alternate); + } + case "SequenceExpression": + case "TemplateLiteral": + return node.expressions.every((expr) => isStaticNode(expr)); + case "ParenthesizedExpression": + return isStaticNode(node.expression); + case "StringLiteral": + case "NumericLiteral": + case "BooleanLiteral": + case "NullLiteral": + case "BigIntLiteral": + return true; + } + return false; +} + +const version = "3.4.15"; +const parseCache = parseCache$1; +const errorMessages = { + ...CompilerDOM.errorMessages, + ...CompilerDOM.DOMErrorMessages +}; +const walk = estreeWalker.walk; +const shouldTransformRef = () => false; -exports.MagicString = MagicString__default; -exports.babelParse = parser$2.parse; exports.extractIdentifiers = compilerCore.extractIdentifiers; exports.generateCodeFrame = compilerCore.generateCodeFrame; exports.isInDestructureAssignment = compilerCore.isInDestructureAssignment; exports.isStaticProperty = compilerCore.isStaticProperty; exports.walkIdentifiers = compilerCore.walkIdentifiers; -exports.shouldTransformRef = reactivityTransform.shouldTransform; -exports.transformRef = reactivityTransform.transform; -exports.transformRefAST = reactivityTransform.transformAST; +exports.MagicString = MagicString; +exports.babelParse = parser$1.parse; exports.compileScript = compileScript; exports.compileStyle = compileStyle; exports.compileStyleAsync = compileStyleAsync; exports.compileTemplate = compileTemplate; -exports.parse = parse; +exports.errorMessages = errorMessages; +exports.extractRuntimeEmits = extractRuntimeEmits; +exports.extractRuntimeProps = extractRuntimeProps; +exports.inferRuntimeType = inferRuntimeType; +exports.invalidateTypeCache = invalidateTypeCache; +exports.parse = parse$2; +exports.parseCache = parseCache; +exports.registerTS = registerTS; +exports.resolveTypeElements = resolveTypeElements; exports.rewriteDefault = rewriteDefault; -exports.walk = walk$1; +exports.rewriteDefaultAST = rewriteDefaultAST; +exports.shouldTransformRef = shouldTransformRef; +exports.version = version; +exports.walk = walk; diff --git a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts index c1e640aa..cbfbc562 100644 --- a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +++ b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts @@ -1,27 +1,19 @@ -import { parse as babelParse } from '@babel/parser'; -import { BindingMetadata } from '@vue/compiler-core'; -import { CodegenResult } from '@vue/compiler-core'; -import { CompilerError } from '@vue/compiler-core'; -import { CompilerOptions } from '@vue/compiler-core'; -import { ElementNode } from '@vue/compiler-core'; -import { extractIdentifiers } from '@vue/compiler-core'; -import { generateCodeFrame } from '@vue/compiler-core'; -import { isInDestructureAssignment } from '@vue/compiler-core'; -import { isStaticProperty } from '@vue/compiler-core'; -import { LazyResult } from 'postcss'; -import MagicString from 'magic-string'; -import { ParserOptions } from '@vue/compiler-core'; +import * as _babel_types from '@babel/types'; +import { Statement, Expression, TSType, Node, Program, CallExpression, ObjectPattern, TSModuleDeclaration, TSPropertySignature, TSMethodSignature, TSCallSignatureDeclaration, TSFunctionType } from '@babel/types'; +import { RootNode, CompilerOptions, CodegenResult, ParserOptions, CompilerError, SourceLocation, BindingMetadata as BindingMetadata$1 } from '@vue/compiler-core'; +export { BindingMetadata, CompilerError, CompilerOptions, extractIdentifiers, generateCodeFrame, isInDestructureAssignment, isStaticProperty, walkIdentifiers } from '@vue/compiler-core'; +import { RawSourceMap } from 'source-map-js'; import { ParserPlugin } from '@babel/parser'; -import { RawSourceMap } from 'source-map'; -import { Result } from 'postcss'; -import { RootNode } from '@vue/compiler-core'; -import { shouldTransform as shouldTransformRef } from '@vue/reactivity-transform'; -import { SourceLocation } from '@vue/compiler-core'; -import { transform as transformRef } from '@vue/reactivity-transform'; -import { transformAST as transformRefAST } from '@vue/reactivity-transform'; -import { walkIdentifiers } from '@vue/compiler-core'; +export { parse as babelParse } from '@babel/parser'; +import { Result, LazyResult } from 'postcss'; +import MagicString from 'magic-string'; +export { default as MagicString } from 'magic-string'; +import TS from 'typescript'; -export declare interface AssetURLOptions { +export interface AssetURLTagConfig { + [name: string]: string[]; +} +export interface AssetURLOptions { /** * If base is provided, instead of transforming relative asset urls into * imports, they will be directly rewritten to absolute urls. @@ -34,240 +26,22 @@ export declare interface AssetURLOptions { tags?: AssetURLTagConfig; } -export declare interface AssetURLTagConfig { - [name: string]: string[]; +export interface TemplateCompiler { + compile(source: string | RootNode, options: CompilerOptions): CodegenResult; + parse(template: string, options: ParserOptions): RootNode; } - -export { babelParse } - -export { BindingMetadata } - -export { CompilerError } - -export { CompilerOptions } - -/** - * Compile `<script setup>` - * It requires the whole SFC descriptor because we need to handle and merge - * normal `<script>` + `<script setup>` if both are present. - */ -export declare function compileScript(sfc: SFCDescriptor, options: SFCScriptCompileOptions): SFCScriptBlock; - -export declare function compileStyle(options: SFCStyleCompileOptions): SFCStyleCompileResults; - -export declare function compileStyleAsync(options: SFCAsyncStyleCompileOptions): Promise<SFCStyleCompileResults>; - -export declare function compileTemplate(options: SFCTemplateCompileOptions): SFCTemplateCompileResults; - -/** - * Aligns with postcss-modules - * https://github.com/css-modules/postcss-modules - */ -declare interface CSSModulesOptions { - scopeBehaviour?: 'global' | 'local'; - generateScopedName?: string | ((name: string, filename: string, css: string) => string); - hashPrefix?: string; - localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'; - exportGlobals?: boolean; - globalModulePaths?: RegExp[]; -} - -export { extractIdentifiers } - -export { generateCodeFrame } - -declare interface ImportBinding { - isType: boolean; - imported: string; - source: string; - isFromSetup: boolean; - isUsedInTemplate: boolean; -} - -export { isInDestructureAssignment } - -export { isStaticProperty } - -export { MagicString } - -export declare function parse(source: string, { sourceMap, filename, sourceRoot, pad, ignoreEmpty, compiler }?: SFCParseOptions): SFCParseResult; - -declare type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus'; - -/** - * Utility for rewriting `export default` in a script block into a variable - * declaration so that we can inject things into it - */ -export declare function rewriteDefault(input: string, as: string, parserPlugins?: ParserPlugin[]): string; - -export declare interface SFCAsyncStyleCompileOptions extends SFCStyleCompileOptions { - isAsync?: boolean; - modules?: boolean; - modulesOptions?: CSSModulesOptions; -} - -export declare interface SFCBlock { - type: string; - content: string; - attrs: Record<string, string | true>; - loc: SourceLocation; - map?: RawSourceMap; - lang?: string; - src?: string; -} - -export declare interface SFCDescriptor { - filename: string; - source: string; - template: SFCTemplateBlock | null; - script: SFCScriptBlock | null; - scriptSetup: SFCScriptBlock | null; - styles: SFCStyleBlock[]; - customBlocks: SFCBlock[]; - cssVars: string[]; - /** - * whether the SFC uses :slotted() modifier. - * this is used as a compiler optimization hint. - */ - slotted: boolean; - /** - * compare with an existing descriptor to determine whether HMR should perform - * a reload vs. re-render. - * - * Note: this comparison assumes the prev/next script are already identical, - * and only checks the special case where <script setup lang="ts"> unused import - * pruning result changes due to template changes. - */ - shouldForceReload: (prevImports: Record<string, ImportBinding>) => boolean; -} - -export declare interface SFCParseOptions { - filename?: string; - sourceMap?: boolean; - sourceRoot?: string; - pad?: boolean | 'line' | 'space'; - ignoreEmpty?: boolean; - compiler?: TemplateCompiler; -} - -export declare interface SFCParseResult { - descriptor: SFCDescriptor; - errors: (CompilerError | SyntaxError)[]; -} - -export declare interface SFCScriptBlock extends SFCBlock { - type: 'script'; - setup?: string | boolean; - bindings?: BindingMetadata; - imports?: Record<string, ImportBinding>; - /** - * import('\@babel/types').Statement - */ - scriptAst?: any[]; - /** - * import('\@babel/types').Statement - */ - scriptSetupAst?: any[]; -} - -export declare interface SFCScriptCompileOptions { - /** - * Scope ID for prefixing injected CSS variables. - * This must be consistent with the `id` passed to `compileStyle`. - */ - id: string; - /** - * Production mode. Used to determine whether to generate hashed CSS variables - */ - isProd?: boolean; - /** - * Enable/disable source map. Defaults to true. - */ - sourceMap?: boolean; - /** - * https://babeljs.io/docs/en/babel-parser#plugins - */ - babelParserPlugins?: ParserPlugin[]; - /** - * (Experimental) Enable syntax transform for using refs without `.value` and - * using destructured props with reactivity - */ - reactivityTransform?: boolean; - /** - * (Experimental) Enable syntax transform for using refs without `.value` - * https://github.com/vuejs/rfcs/discussions/369 - * @deprecated now part of `reactivityTransform` - * @default false - */ - refTransform?: boolean; - /** - * (Experimental) Enable syntax transform for destructuring from defineProps() - * https://github.com/vuejs/rfcs/discussions/394 - * @deprecated now part of `reactivityTransform` - * @default false - */ - propsDestructureTransform?: boolean; - /** - * @deprecated use `reactivityTransform` instead. - */ - refSugar?: boolean; - /** - * Compile the template and inline the resulting render function - * directly inside setup(). - * - Only affects `<script setup>` - * - This should only be used in production because it prevents the template - * from being hot-reloaded separately from component state. - */ - inlineTemplate?: boolean; - /** - * Options for template compilation when inlining. Note these are options that - * would normally be passed to `compiler-sfc`'s own `compileTemplate()`, not - * options passed to `compiler-dom`. - */ - templateOptions?: Partial<SFCTemplateCompileOptions>; -} - -export declare interface SFCStyleBlock extends SFCBlock { - type: 'style'; - scoped?: boolean; - module?: string | boolean; -} - -export declare interface SFCStyleCompileOptions { - source: string; - filename: string; - id: string; - scoped?: boolean; - trim?: boolean; - isProd?: boolean; - inMap?: RawSourceMap; - preprocessLang?: PreprocessLang; - preprocessOptions?: any; - preprocessCustomRequire?: (id: string) => any; - postcssOptions?: any; - postcssPlugins?: any[]; - /** - * @deprecated use `inMap` instead. - */ - map?: RawSourceMap; -} - -export declare interface SFCStyleCompileResults { +export interface SFCTemplateCompileResults { code: string; - map: RawSourceMap | undefined; - rawResult: Result | LazyResult | undefined; - errors: Error[]; - modules?: Record<string, string>; - dependencies: Set<string>; -} - -export declare interface SFCTemplateBlock extends SFCBlock { - type: 'template'; - ast: ElementNode; -} - -export declare interface SFCTemplateCompileOptions { + ast?: RootNode; + preamble?: string; source: string; + tips: string[]; + errors: (string | CompilerError)[]; + map?: RawSourceMap; +} +export interface SFCTemplateCompileOptions { + source: string; + ast?: RootNode; filename: string; id: string; scoped?: boolean; @@ -292,30 +66,477 @@ export declare interface SFCTemplateCompileOptions { */ transformAssetUrls?: AssetURLOptions | AssetURLTagConfig | boolean; } +export declare function compileTemplate(options: SFCTemplateCompileOptions): SFCTemplateCompileResults; -export declare interface SFCTemplateCompileResults { - code: string; - ast?: RootNode; - preamble?: string; +export interface SFCScriptCompileOptions { + /** + * Scope ID for prefixing injected CSS variables. + * This must be consistent with the `id` passed to `compileStyle`. + */ + id: string; + /** + * Production mode. Used to determine whether to generate hashed CSS variables + */ + isProd?: boolean; + /** + * Enable/disable source map. Defaults to true. + */ + sourceMap?: boolean; + /** + * https://babeljs.io/docs/en/babel-parser#plugins + */ + babelParserPlugins?: ParserPlugin[]; + /** + * A list of files to parse for global types to be made available for type + * resolving in SFC macros. The list must be fully resolved file system paths. + */ + globalTypeFiles?: string[]; + /** + * Compile the template and inline the resulting render function + * directly inside setup(). + * - Only affects `<script setup>` + * - This should only be used in production because it prevents the template + * from being hot-reloaded separately from component state. + */ + inlineTemplate?: boolean; + /** + * Generate the final component as a variable instead of default export. + * This is useful in e.g. @vitejs/plugin-vue where the script needs to be + * placed inside the main module. + */ + genDefaultAs?: string; + /** + * Options for template compilation when inlining. Note these are options that + * would normally be passed to `compiler-sfc`'s own `compileTemplate()`, not + * options passed to `compiler-dom`. + */ + templateOptions?: Partial<SFCTemplateCompileOptions>; + /** + * Hoist <script setup> static constants. + * - Only enables when one `<script setup>` exists. + * @default true + */ + hoistStatic?: boolean; + /** + * (**Experimental**) Enable reactive destructure for `defineProps` + * @default false + */ + propsDestructure?: boolean; + /** + * File system access methods to be used when resolving types + * imported in SFC macros. Defaults to ts.sys in Node.js, can be overwritten + * to use a virtual file system for use in browsers (e.g. in REPLs) + */ + fs?: { + fileExists(file: string): boolean; + readFile(file: string): string | undefined; + realpath?(file: string): string; + }; + /** + * Transform Vue SFCs into custom elements. + */ + customElement?: boolean | ((filename: string) => boolean); +} +interface ImportBinding { + isType: boolean; + imported: string; + local: string; source: string; - tips: string[]; - errors: (string | CompilerError)[]; + isFromSetup: boolean; + isUsedInTemplate: boolean; +} +/** + * Compile `<script setup>` + * It requires the whole SFC descriptor because we need to handle and merge + * normal `<script>` + `<script setup>` if both are present. + */ +export declare function compileScript(sfc: SFCDescriptor, options: SFCScriptCompileOptions): SFCScriptBlock; + +export interface SFCParseOptions { + filename?: string; + sourceMap?: boolean; + sourceRoot?: string; + pad?: boolean | 'line' | 'space'; + ignoreEmpty?: boolean; + compiler?: TemplateCompiler; + templateParseOptions?: ParserOptions; + /** + * TODO remove in 3.5 + * @deprecated use `templateParseOptions: { prefixIdentifiers: false }` instead + */ + parseExpressions?: boolean; +} +export interface SFCBlock { + type: string; + content: string; + attrs: Record<string, string | true>; + loc: SourceLocation; + map?: RawSourceMap; + lang?: string; + src?: string; +} +export interface SFCTemplateBlock extends SFCBlock { + type: 'template'; + ast?: RootNode; +} +export interface SFCScriptBlock extends SFCBlock { + type: 'script'; + setup?: string | boolean; + bindings?: BindingMetadata$1; + imports?: Record<string, ImportBinding>; + scriptAst?: _babel_types.Statement[]; + scriptSetupAst?: _babel_types.Statement[]; + warnings?: string[]; + /** + * Fully resolved dependency file paths (unix slashes) with imported types + * used in macros, used for HMR cache busting in @vitejs/plugin-vue and + * vue-loader. + */ + deps?: string[]; +} +export interface SFCStyleBlock extends SFCBlock { + type: 'style'; + scoped?: boolean; + module?: string | boolean; +} +export interface SFCDescriptor { + filename: string; + source: string; + template: SFCTemplateBlock | null; + script: SFCScriptBlock | null; + scriptSetup: SFCScriptBlock | null; + styles: SFCStyleBlock[]; + customBlocks: SFCBlock[]; + cssVars: string[]; + /** + * whether the SFC uses :slotted() modifier. + * this is used as a compiler optimization hint. + */ + slotted: boolean; + /** + * compare with an existing descriptor to determine whether HMR should perform + * a reload vs. re-render. + * + * Note: this comparison assumes the prev/next script are already identical, + * and only checks the special case where <script setup lang="ts"> unused import + * pruning result changes due to template changes. + */ + shouldForceReload: (prevImports: Record<string, ImportBinding>) => boolean; +} +export interface SFCParseResult { + descriptor: SFCDescriptor; + errors: (CompilerError | SyntaxError)[]; +} +export declare function parse(source: string, options?: SFCParseOptions): SFCParseResult; + +type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus'; + +export interface SFCStyleCompileOptions { + source: string; + filename: string; + id: string; + scoped?: boolean; + trim?: boolean; + isProd?: boolean; + inMap?: RawSourceMap; + preprocessLang?: PreprocessLang; + preprocessOptions?: any; + preprocessCustomRequire?: (id: string) => any; + postcssOptions?: any; + postcssPlugins?: any[]; + /** + * @deprecated use `inMap` instead. + */ map?: RawSourceMap; } +/** + * Aligns with postcss-modules + * https://github.com/css-modules/postcss-modules + */ +interface CSSModulesOptions { + scopeBehaviour?: 'global' | 'local'; + generateScopedName?: string | ((name: string, filename: string, css: string) => string); + hashPrefix?: string; + localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'; + exportGlobals?: boolean; + globalModulePaths?: RegExp[]; +} +export interface SFCAsyncStyleCompileOptions extends SFCStyleCompileOptions { + isAsync?: boolean; + modules?: boolean; + modulesOptions?: CSSModulesOptions; +} +export interface SFCStyleCompileResults { + code: string; + map: RawSourceMap | undefined; + rawResult: Result | LazyResult | undefined; + errors: Error[]; + modules?: Record<string, string>; + dependencies: Set<string>; +} +export declare function compileStyle(options: SFCStyleCompileOptions): SFCStyleCompileResults; +export declare function compileStyleAsync(options: SFCAsyncStyleCompileOptions): Promise<SFCStyleCompileResults>; -export { shouldTransformRef } +export declare function rewriteDefault(input: string, as: string, parserPlugins?: ParserPlugin[]): string; +/** + * Utility for rewriting `export default` in a script block into a variable + * declaration so that we can inject things into it + */ +export declare function rewriteDefaultAST(ast: Statement[], s: MagicString, as: string): void; -export declare interface TemplateCompiler { - compile(template: string, options: CompilerOptions): CodegenResult; - parse(template: string, options: ParserOptions): RootNode; +type PropsDestructureBindings = Record<string, // public prop key +{ + local: string; + default?: Expression; +}>; +export declare function extractRuntimeProps(ctx: TypeResolveContext): string | undefined; + +interface ModelDecl { + type: TSType | undefined; + options: string | undefined; + identifier: string | undefined; + runtimeOptionNodes: Node[]; } -export { transformRef } +declare enum BindingTypes { + /** + * returned from data() + */ + DATA = "data", + /** + * declared as a prop + */ + PROPS = "props", + /** + * a local alias of a `<script setup>` destructured prop. + * the original is stored in __propsAliases of the bindingMetadata object. + */ + PROPS_ALIASED = "props-aliased", + /** + * a let binding (may or may not be a ref) + */ + SETUP_LET = "setup-let", + /** + * a const binding that can never be a ref. + * these bindings don't need `unref()` calls when processed in inlined + * template expressions. + */ + SETUP_CONST = "setup-const", + /** + * a const binding that does not need `unref()`, but may be mutated. + */ + SETUP_REACTIVE_CONST = "setup-reactive-const", + /** + * a const binding that may be a ref. + */ + SETUP_MAYBE_REF = "setup-maybe-ref", + /** + * bindings that are guaranteed to be refs + */ + SETUP_REF = "setup-ref", + /** + * declared by other options, e.g. computed, inject + */ + OPTIONS = "options", + /** + * a literal constant, e.g. 'foo', 1, true + */ + LITERAL_CONST = "literal-const" +} +type BindingMetadata = { + [key: string]: BindingTypes | undefined; +} & { + __isScriptSetup?: boolean; + __propsAliases?: Record<string, string>; +}; -export { transformRefAST } +export declare class ScriptCompileContext { + descriptor: SFCDescriptor; + options: Partial<SFCScriptCompileOptions>; + isJS: boolean; + isTS: boolean; + isCE: boolean; + scriptAst: Program | null; + scriptSetupAst: Program | null; + source: string; + filename: string; + s: MagicString; + startOffset: number | undefined; + endOffset: number | undefined; + scope?: TypeScope; + globalScopes?: TypeScope[]; + userImports: Record<string, ImportBinding>; + hasDefinePropsCall: boolean; + hasDefineEmitCall: boolean; + hasDefineExposeCall: boolean; + hasDefaultExportName: boolean; + hasDefaultExportRender: boolean; + hasDefineOptionsCall: boolean; + hasDefineSlotsCall: boolean; + hasDefineModelCall: boolean; + propsCall: CallExpression | undefined; + propsDecl: Node | undefined; + propsRuntimeDecl: Node | undefined; + propsTypeDecl: Node | undefined; + propsDestructureDecl: ObjectPattern | undefined; + propsDestructuredBindings: PropsDestructureBindings; + propsDestructureRestId: string | undefined; + propsRuntimeDefaults: Node | undefined; + emitsRuntimeDecl: Node | undefined; + emitsTypeDecl: Node | undefined; + emitDecl: Node | undefined; + modelDecls: Record<string, ModelDecl>; + optionsRuntimeDecl: Node | undefined; + bindingMetadata: BindingMetadata; + helperImports: Set<string>; + helper(key: string): string; + /** + * to be exposed on compiled script block for HMR cache busting + */ + deps?: Set<string>; + /** + * cache for resolved fs + */ + fs?: NonNullable<SFCScriptCompileOptions['fs']>; + constructor(descriptor: SFCDescriptor, options: Partial<SFCScriptCompileOptions>); + getString(node: Node, scriptSetup?: boolean): string; + error(msg: string, node: Node, scope?: TypeScope): never; +} + +export type SimpleTypeResolveOptions = Partial<Pick<SFCScriptCompileOptions, 'globalTypeFiles' | 'fs' | 'babelParserPlugins' | 'isProd'>>; +/** + * TypeResolveContext is compatible with ScriptCompileContext + * but also allows a simpler version of it with minimal required properties + * when resolveType needs to be used in a non-SFC context, e.g. in a babel + * plugin. The simplest context can be just: + * ```ts + * const ctx: SimpleTypeResolveContext = { + * filename: '...', + * source: '...', + * options: {}, + * error() {}, + * ast: [] + * } + * ``` + */ +export type SimpleTypeResolveContext = Pick<ScriptCompileContext, 'source' | 'filename' | 'error' | 'helper' | 'getString' | 'propsTypeDecl' | 'propsRuntimeDefaults' | 'propsDestructuredBindings' | 'emitsTypeDecl' | 'isCE'> & Partial<Pick<ScriptCompileContext, 'scope' | 'globalScopes' | 'deps' | 'fs'>> & { + ast: Statement[]; + options: SimpleTypeResolveOptions; +}; +export type TypeResolveContext = ScriptCompileContext | SimpleTypeResolveContext; +type Import = Pick<ImportBinding, 'source' | 'imported'>; +interface WithScope { + _ownerScope: TypeScope; +} +type ScopeTypeNode = Node & WithScope & { + _ns?: TSModuleDeclaration & WithScope; +}; +declare class TypeScope { + filename: string; + source: string; + offset: number; + imports: Record<string, Import>; + types: Record<string, ScopeTypeNode>; + declares: Record<string, ScopeTypeNode>; + constructor(filename: string, source: string, offset?: number, imports?: Record<string, Import>, types?: Record<string, ScopeTypeNode>, declares?: Record<string, ScopeTypeNode>); + isGenericScope: boolean; + resolvedImportSources: Record<string, string>; + exportedTypes: Record<string, ScopeTypeNode>; + exportedDeclares: Record<string, ScopeTypeNode>; +} +interface MaybeWithScope { + _ownerScope?: TypeScope; +} +interface ResolvedElements { + props: Record<string, (TSPropertySignature | TSMethodSignature) & { + _ownerScope: TypeScope; + }>; + calls?: (TSCallSignatureDeclaration | TSFunctionType)[]; +} +/** + * Resolve arbitrary type node to a list of type elements that can be then + * mapped to runtime props or emits. + */ +export declare function resolveTypeElements(ctx: TypeResolveContext, node: Node & MaybeWithScope & { + _resolvedElements?: ResolvedElements; +}, scope?: TypeScope, typeParameters?: Record<string, Node>): ResolvedElements; +/** + * @private + */ +export declare function registerTS(_loadTS: () => typeof TS): void; +/** + * @private + */ +export declare function invalidateTypeCache(filename: string): void; +export declare function inferRuntimeType(ctx: TypeResolveContext, node: Node & MaybeWithScope, scope?: TypeScope): string[]; + +export declare function extractRuntimeEmits(ctx: TypeResolveContext): Set<string>; + +export declare const version: string; + +export declare const parseCache: Map<string, SFCParseResult>; +export declare const errorMessages: { + 0: string; + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; + 13: string; + 14: string; + 15: string; + 16: string; + 17: string; + 18: string; + 19: string; + 20: string; + 21: string; + 22: string; + 23: string; + 24: string; + 25: string; + 26: string; + 27: string; + 28: string; + 29: string; + 30: string; + 31: string; + 32: string; + 33: string; + 34: string; + 35: string; + 36: string; + 37: string; + 38: string; + 39: string; + 40: string; + 41: string; + 42: string; + 43: string; + 44: string; + 45: string; + 46: string; + 47: string; + 48: string; + 49: string; + 50: string; + 51: string; + 52: string; +}; export declare const walk: any; -export { walkIdentifiers } +/** + * @deprecated this is preserved to avoid breaking vite-plugin-vue < 5.0 + * with reactivityTransform: true. The desired behavior should be silently + * ignoring the option instead of breaking. + */ +export declare const shouldTransformRef: () => boolean; -export { } diff --git a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js index b87d2b99..e2134f74 100644 --- a/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +++ b/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js @@ -1,541 +1,305 @@ /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ +* @vue/compiler-sfc v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); +} + +const EMPTY_OBJ = Object.freeze({}) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const extend = Object.assign; +const hasOwnProperty$3 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$3.call(val, key); +const isArray$3 = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isFunction$1 = (val) => typeof val === "function"; +const isString$2 = (val) => typeof val === "string"; +const isSymbol$1 = (val) => typeof val === "symbol"; +const isObject$2 = (val) => val !== null && typeof val === "object"; +const objectToString$1 = Object.prototype.toString; +const toTypeString = (value) => objectToString$1.call(value); +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); +}); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize$1 = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize$1(str)}` : ``; + return s; +}); +const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; +function genPropsAccessExp(name) { + return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; } -/** - * dev only flag -> name mapping - */ const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` }; -/** - * Dev only - */ const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" }; -const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; -const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); const range = 2; function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; } + } + break; } - return res.join('\n'); + } + return res.join("\n"); } -/** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ +function normalizeStyle(value) { + if (isArray$3(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString$2(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString$2(value) || isObject$2(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString$2(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString$2(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString$2(value)) { + res = value; + } else if (isArray$3(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject$2(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -/** - * The full list is needed during SSR to produce the correct initial markup. - */ -const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs + - `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` + - `loop,open,required,reversed,scoped,seamless,` + - `checked,muted,multiple,selected`); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; const attrValidationCache = {}; function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return (attrValidationCache[name] = !isUnsafe); + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; } const propsToAttrMap = { - acceptCharset: 'accept-charset', - className: 'class', - htmlFor: 'for', - httpEquiv: 'http-equiv' + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" }; -/** - * CSS properties that accept plain numbers - */ -const isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,` + - `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` + - `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` + - `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` + - `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` + - `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` + - // SVG - `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` + - `stroke-miterlimit,stroke-opacity,stroke-width`); -/** - * Known attributes, this is used for stringification of runtime static nodes - * so that we don't stringify bindings that cannot be set from HTML. - * Don't also forget to allow `data-*` and `aria-*`! - * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes - */ -const isKnownHtmlAttr = /*#__PURE__*/ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,` + - `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` + - `border,buffered,capture,challenge,charset,checked,cite,class,code,` + - `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` + - `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` + - `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` + - `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` + - `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` + - `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` + - `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` + - `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` + - `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` + - `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` + - `start,step,style,summary,tabindex,target,title,translate,type,usemap,` + - `value,width,wrap`); -/** - * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute - */ -const isKnownSvgAttr = /*#__PURE__*/ makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,` + - `arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,` + - `baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,` + - `clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,` + - `color-interpolation-filters,color-profile,color-rendering,` + - `contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,` + - `descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,` + - `dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,` + - `fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,` + - `font-family,font-size,font-size-adjust,font-stretch,font-style,` + - `font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,` + - `glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,` + - `gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,` + - `horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,` + - `k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,` + - `lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,` + - `marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,` + - `mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,` + - `name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,` + - `overflow,overline-position,overline-thickness,panose-1,paint-order,path,` + - `pathLength,patternContentUnits,patternTransform,patternUnits,ping,` + - `pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,` + - `preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,` + - `rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,` + - `restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,` + - `specularConstant,specularExponent,speed,spreadMethod,startOffset,` + - `stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,` + - `strikethrough-position,strikethrough-thickness,string,stroke,` + - `stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,` + - `stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,` + - `systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,` + - `text-decoration,text-rendering,textLength,to,transform,transform-origin,` + - `type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,` + - `unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,` + - `v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,` + - `vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,` + - `writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,` + - `xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,` + - `xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`); - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - let ret = ''; - if (!styles || isString(styles)) { - return ret; - } - for (const key in styles) { - const value = styles[key]; - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - if (isString(value) || - (typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) { - // only render valid values - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); -} - -// These tag configs are shared between compiler-dom and runtime-dom, so they -// https://developer.mozilla.org/en-US/docs/Web/HTML/Element -const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; -// https://developer.mozilla.org/en-US/docs/Web/SVG/Element -const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; -const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS); +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); const escapeRE = /["'&<>]/; function escapeHtml(string) { - const str = '' + string; - const match = escapeRE.exec(str); - if (!match) { - return str; + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; } - let html = ''; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: // " - escaped = '"'; - break; - case 38: // & - escaped = '&'; - break; - case 39: // ' - escaped = '''; - break; - case 60: // < - escaped = '<'; - break; - case 62: // > - escaped = '>'; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; + if (lastIndex !== index) { + html += str.slice(lastIndex, index); } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; } -/** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); + return isString$2(val) ? val : val == null ? "" : isArray$3(val) || isObject$2(val) && (val.toString === objectToString$1 || !isFunction$1(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); }; const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol$1(val)) { + return stringifySymbol(val); + } else if (isObject$2(val) && !isArray$3(val) && !isPlainObject(val)) { + return String(val); + } + return val; }; - -const EMPTY_OBJ = Object.freeze({}) - ; -Object.freeze([]) ; -const NOOP = () => { }; -/** - * Always return false. - */ -const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const extend = Object.assign; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); -const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === '[object Map]'; -const isSet = (val) => toTypeString(val) === '[object Set]'; -const isFunction = (val) => typeof val === 'function'; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; -const objectToString = Object.prototype.toString; -const toTypeString = (value) => objectToString.call(value); -const isPlainObject = (val) => toTypeString(val) === '[object Object]'; -const isReservedProp = /*#__PURE__*/ makeMap( -// the leading comma is intentional so empty string "" is also included -',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); -const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); -const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); -}; -const camelizeRE = /-(\w)/g; -/** - * @private - */ -const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); -}); -const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -/** - * @private - */ -const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); -const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; -function genPropsAccessExp(name) { - return identRE.test(name) - ? `__props.${name}` - : `__props[${JSON.stringify(name)}]`; -} - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) - ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '<!--' in comment.", - [17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */]: 'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).', - [18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */]: 'Unquoted attribute value cannot contain U+0022 ("), U+0027 (\'), U+003C (<), U+003D (=), and U+0060 (`).', - [19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */]: "Attribute name cannot start with '='.", - [21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */]: "'<?' is allowed only in XML context.", - [20 /* UNEXPECTED_NULL_CHARACTER */]: `Unexpected null character.`, - [22 /* UNEXPECTED_SOLIDUS_IN_TAG */]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23 /* X_INVALID_END_TAG */]: 'Invalid end tag.', - [24 /* X_MISSING_END_TAG */]: 'Element is missing end tag.', - [25 /* X_MISSING_INTERPOLATION_END */]: 'Interpolation end sign was not found.', - [27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */]: 'End bracket for dynamic directive argument was not found. ' + - 'Note that dynamic directive argument cannot contain spaces.', - [26 /* X_MISSING_DIRECTIVE_NAME */]: 'Legal directive name was expected.', - // transform errors - [28 /* X_V_IF_NO_EXPRESSION */]: `v-if/v-else-if is missing expression.`, - [29 /* X_V_IF_SAME_KEY */]: `v-if/else branches must use unique keys.`, - [30 /* X_V_ELSE_NO_ADJACENT_IF */]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31 /* X_V_FOR_NO_EXPRESSION */]: `v-for is missing expression.`, - [32 /* X_V_FOR_MALFORMED_EXPRESSION */]: `v-for has invalid expression.`, - [33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */]: `<template v-for> key should be placed on the <template> tag.`, - [34 /* X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`, - [35 /* X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`, - [36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`, - [37 /* X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` + - `When there are multiple named slots, all slots should use <template> ` + - `syntax to avoid scope ambiguity.`, - [38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `, - [39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */]: `Extraneous children found when component already has explicitly named ` + - `default slot. These children will be ignored.`, - [40 /* X_V_SLOT_MISPLACED */]: `v-slot can only be used on components or <template> tags.`, - [41 /* X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`, - [42 /* X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`, - [43 /* X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44 /* X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `, - [45 /* X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`, - // generic errors - [46 /* X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`, - [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [50 /* __EXTEND_POINT__ */]: `` +const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol$1(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; }; const FRAGMENT = Symbol(`Fragment` ); @@ -552,7 +316,9 @@ const CREATE_COMMENT = Symbol(`createCommentVNode` ); const CREATE_TEXT = Symbol(`createTextVNode` ); const CREATE_STATIC = Symbol(`createStaticVNode` ); const RESOLVE_COMPONENT = Symbol(`resolveComponent` ); -const RESOLVE_DYNAMIC_COMPONENT = Symbol(`resolveDynamicComponent` ); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` +); const RESOLVE_DIRECTIVE = Symbol(`resolveDirective` ); const RESOLVE_FILTER = Symbol(`resolveFilter` ); const WITH_DIRECTIVES = Symbol(`withDirectives` ); @@ -577,292 +343,2049 @@ const UNREF = Symbol(`unref` ); const IS_REF = Symbol(`isRef` ); const WITH_MEMO = Symbol(`withMemo` ); const IS_MEMO_SAME = Symbol(`isMemoSame` ); -// Name mapping for runtime helpers that need to be imported from 'vue' in -// generated code. Make sure these are correctly exported in the runtime! -// Using `any` here because TS doesn't allow symbols as index type. const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` }; function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach(s => { - helperNameMap[s] = helpers[s]; - }); + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); } -// AST Utilities --------------------------------------------------------------- -// Some expressions, e.g. sequence and conditional expressions, are never -// associated with template nodes, so their source locations are just a stub. -// Container types like CompoundExpression also don't need a real location. -const locStub = { - source: '', - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 } +const Namespaces = { + "HTML": 0, + "0": "HTML", + "SVG": 1, + "1": "SVG", + "MATH_ML": 2, + "2": "MATH_ML" }; -function createRoot(children, loc = locStub) { - return { - type: 0 /* ROOT */, - children, - helpers: [], - components: [], - directives: [], - hoists: [], - imports: [], - cached: 0, - temps: 0, - codegenNode: undefined, - loc - }; +const NodeTypes = { + "ROOT": 0, + "0": "ROOT", + "ELEMENT": 1, + "1": "ELEMENT", + "TEXT": 2, + "2": "TEXT", + "COMMENT": 3, + "3": "COMMENT", + "SIMPLE_EXPRESSION": 4, + "4": "SIMPLE_EXPRESSION", + "INTERPOLATION": 5, + "5": "INTERPOLATION", + "ATTRIBUTE": 6, + "6": "ATTRIBUTE", + "DIRECTIVE": 7, + "7": "DIRECTIVE", + "COMPOUND_EXPRESSION": 8, + "8": "COMPOUND_EXPRESSION", + "IF": 9, + "9": "IF", + "IF_BRANCH": 10, + "10": "IF_BRANCH", + "FOR": 11, + "11": "FOR", + "TEXT_CALL": 12, + "12": "TEXT_CALL", + "VNODE_CALL": 13, + "13": "VNODE_CALL", + "JS_CALL_EXPRESSION": 14, + "14": "JS_CALL_EXPRESSION", + "JS_OBJECT_EXPRESSION": 15, + "15": "JS_OBJECT_EXPRESSION", + "JS_PROPERTY": 16, + "16": "JS_PROPERTY", + "JS_ARRAY_EXPRESSION": 17, + "17": "JS_ARRAY_EXPRESSION", + "JS_FUNCTION_EXPRESSION": 18, + "18": "JS_FUNCTION_EXPRESSION", + "JS_CONDITIONAL_EXPRESSION": 19, + "19": "JS_CONDITIONAL_EXPRESSION", + "JS_CACHE_EXPRESSION": 20, + "20": "JS_CACHE_EXPRESSION", + "JS_BLOCK_STATEMENT": 21, + "21": "JS_BLOCK_STATEMENT", + "JS_TEMPLATE_LITERAL": 22, + "22": "JS_TEMPLATE_LITERAL", + "JS_IF_STATEMENT": 23, + "23": "JS_IF_STATEMENT", + "JS_ASSIGNMENT_EXPRESSION": 24, + "24": "JS_ASSIGNMENT_EXPRESSION", + "JS_SEQUENCE_EXPRESSION": 25, + "25": "JS_SEQUENCE_EXPRESSION", + "JS_RETURN_STATEMENT": 26, + "26": "JS_RETURN_STATEMENT" +}; +const ElementTypes = { + "ELEMENT": 0, + "0": "ELEMENT", + "COMPONENT": 1, + "1": "COMPONENT", + "SLOT": 2, + "2": "SLOT", + "TEMPLATE": 3, + "3": "TEMPLATE" +}; +const ConstantTypes = { + "NOT_CONSTANT": 0, + "0": "NOT_CONSTANT", + "CAN_SKIP_PATCH": 1, + "1": "CAN_SKIP_PATCH", + "CAN_HOIST": 2, + "2": "CAN_HOIST", + "CAN_STRINGIFY": 3, + "3": "CAN_STRINGIFY" +}; +const locStub = { + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" +}; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: 0, + temps: 0, + codegenNode: void 0, + loc: locStub + }; } function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } - else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); } - return { - type: 13 /* VNODE_CALL */, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; } function createArrayExpression(elements, loc = locStub) { - return { - type: 17 /* JS_ARRAY_EXPRESSION */, - loc, - elements - }; + return { + type: 17, + loc, + elements + }; } function createObjectExpression(properties, loc = locStub) { - return { - type: 15 /* JS_OBJECT_EXPRESSION */, - loc, - properties - }; + return { + type: 15, + loc, + properties + }; } function createObjectProperty(key, value) { - return { - type: 16 /* JS_PROPERTY */, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; + return { + type: 16, + loc: locStub, + key: isString$2(key) ? createSimpleExpression(key, true) : key, + value + }; } -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0 /* NOT_CONSTANT */) { - return { - type: 4 /* SIMPLE_EXPRESSION */, - loc, - content, - isStatic, - constType: isStatic ? 3 /* CAN_STRINGIFY */ : constType - }; +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; } function createInterpolation(content, loc) { - return { - type: 5 /* INTERPOLATION */, - loc, - content: isString(content) - ? createSimpleExpression(content, false, loc) - : content - }; + return { + type: 5, + loc, + content: isString$2(content) ? createSimpleExpression(content, false, loc) : content + }; } function createCompoundExpression(children, loc = locStub) { - return { - type: 8 /* COMPOUND_EXPRESSION */, - loc, - children - }; + return { + type: 8, + loc, + children + }; } function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee, - arguments: args - }; + return { + type: 14, + loc, + callee, + arguments: args + }; } -function createFunctionExpression(params, returns = undefined, newline = false, isSlot = false, loc = locStub) { - return { - type: 18 /* JS_FUNCTION_EXPRESSION */, - params, - returns, - newline, - isSlot, - loc - }; +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; } function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19 /* JS_CONDITIONAL_EXPRESSION */, - test, - consequent, - alternate, - newline, - loc: locStub - }; + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; } function createCacheExpression(index, value, isVNode = false) { - return { - type: 20 /* JS_CACHE_EXPRESSION */, - index, - value, - isVNode, - loc: locStub - }; + return { + type: 20, + index, + value, + isVNode, + loc: locStub + }; } function createBlockStatement(body) { - return { - type: 21 /* JS_BLOCK_STATEMENT */, - body, - loc: locStub - }; + return { + type: 21, + body, + loc: locStub + }; } function createTemplateLiteral(elements) { - return { - type: 22 /* JS_TEMPLATE_LITERAL */, - elements, - loc: locStub - }; + return { + type: 22, + elements, + loc: locStub + }; } function createIfStatement(test, consequent, alternate) { - return { - type: 23 /* JS_IF_STATEMENT */, - test, - consequent, - alternate, - loc: locStub - }; + return { + type: 23, + test, + consequent, + alternate, + loc: locStub + }; } function createAssignmentExpression(left, right) { - return { - type: 24 /* JS_ASSIGNMENT_EXPRESSION */, - left, - right, - loc: locStub - }; + return { + type: 24, + left, + right, + loc: locStub + }; } function createSequenceExpression(expressions) { - return { - type: 25 /* JS_SEQUENCE_EXPRESSION */, - expressions, - loc: locStub - }; + return { + type: 25, + expressions, + loc: locStub + }; } function createReturnStatement(returns) { - return { - type: 26 /* JS_RETURN_STATEMENT */, - returns, - loc: locStub + return { + type: 26, + returns, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } +} + +// Generated using scripts/write-decode-map.ts +var htmlDecodeTree = new Uint16Array( +// prettier-ignore +"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" + .split("") + .map((c) => c.charCodeAt(0))); + +// Generated using scripts/write-decode-map.ts +var xmlDecodeTree = new Uint16Array( +// prettier-ignore +"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" + .split("") + .map((c) => c.charCodeAt(0))); + +// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 +var _a$1; +const decodeMap = new Map([ + [0, 65533], + // C1 Unicode control character reference replacements + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376], +]); +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +const fromCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins +(_a$1 = String.fromCodePoint) !== null && _a$1 !== void 0 ? _a$1 : function (codePoint) { + let output = ""; + if (codePoint > 0xffff) { + codePoint -= 0x10000; + output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + output += String.fromCharCode(codePoint); + return output; +}; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +function replaceCodePoint(codePoint) { + var _a; + if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { + return 0xfffd; + } + return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; +} + +var CharCodes; +(function (CharCodes) { + CharCodes[CharCodes["NUM"] = 35] = "NUM"; + CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; + CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; + CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; + CharCodes[CharCodes["NINE"] = 57] = "NINE"; + CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; + CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; + CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; + CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; + CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; + CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; + CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; +})(CharCodes || (CharCodes = {})); +/** Bit that needs to be set to convert an upper case ASCII character to lower case */ +const TO_LOWER_BIT = 0b100000; +var BinTrieFlags; +(function (BinTrieFlags) { + BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; + BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; + BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; +})(BinTrieFlags || (BinTrieFlags = {})); +function isNumber$2(code) { + return code >= CharCodes.ZERO && code <= CharCodes.NINE; +} +function isHexadecimalCharacter(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); +} +function isAsciiAlphaNumeric(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || + isNumber$2(code)); +} +/** + * Checks if the given character is a valid end character for an entity in an attribute. + * + * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. + * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + */ +function isEntityInAttributeInvalidEnd(code) { + return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); +} +var EntityDecoderState; +(function (EntityDecoderState) { + EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; + EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; + EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; + EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; + EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; +})(EntityDecoderState || (EntityDecoderState = {})); +var DecodingMode; +(function (DecodingMode) { + /** Entities in text nodes that can end with any character. */ + DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; + /** Only allow entities terminated with a semicolon. */ + DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; + /** Entities in attributes have limitations on ending characters. */ + DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; +})(DecodingMode || (DecodingMode = {})); +/** + * Token decoder with support of writing partial entities. + */ +class EntityDecoder { + constructor( + /** The tree used to decode entities. */ + decodeTree, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint, + /** An object that is used to produce errors. */ + errors) { + this.decodeTree = decodeTree; + this.emitCodePoint = emitCodePoint; + this.errors = errors; + /** The current state of the decoder. */ + this.state = EntityDecoderState.EntityStart; + /** Characters that were consumed while parsing an entity. */ + this.consumed = 1; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + this.result = 0; + /** The current index in the decode tree. */ + this.treeIndex = 0; + /** The number of characters that were consumed in excess. */ + this.excess = 1; + /** The mode in which the decoder is operating. */ + this.decodeMode = DecodingMode.Strict; + } + /** Resets the instance to make it reusable. */ + startEntity(decodeMode) { + this.decodeMode = decodeMode; + this.state = EntityDecoderState.EntityStart; + this.result = 0; + this.treeIndex = 0; + this.excess = 1; + this.consumed = 1; + } + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(str, offset) { + switch (this.state) { + case EntityDecoderState.EntityStart: { + if (str.charCodeAt(offset) === CharCodes.NUM) { + this.state = EntityDecoderState.NumericStart; + this.consumed += 1; + return this.stateNumericStart(str, offset + 1); + } + this.state = EntityDecoderState.NamedEntity; + return this.stateNamedEntity(str, offset); + } + case EntityDecoderState.NumericStart: { + return this.stateNumericStart(str, offset); + } + case EntityDecoderState.NumericDecimal: { + return this.stateNumericDecimal(str, offset); + } + case EntityDecoderState.NumericHex: { + return this.stateNumericHex(str, offset); + } + case EntityDecoderState.NamedEntity: { + return this.stateNamedEntity(str, offset); + } + } + } + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericStart(str, offset) { + if (offset >= str.length) { + return -1; + } + if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { + this.state = EntityDecoderState.NumericHex; + this.consumed += 1; + return this.stateNumericHex(str, offset + 1); + } + this.state = EntityDecoderState.NumericDecimal; + return this.stateNumericDecimal(str, offset); + } + addToNumericResult(str, start, end, base) { + if (start !== end) { + const digitCount = end - start; + this.result = + this.result * Math.pow(base, digitCount) + + parseInt(str.substr(start, digitCount), base); + this.consumed += digitCount; + } + } + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericHex(str, offset) { + const startIdx = offset; + while (offset < str.length) { + const char = str.charCodeAt(offset); + if (isNumber$2(char) || isHexadecimalCharacter(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 16); + return this.emitNumericEntity(char, 3); + } + } + this.addToNumericResult(str, startIdx, offset, 16); + return -1; + } + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericDecimal(str, offset) { + const startIdx = offset; + while (offset < str.length) { + const char = str.charCodeAt(offset); + if (isNumber$2(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 10); + return this.emitNumericEntity(char, 2); + } + } + this.addToNumericResult(str, startIdx, offset, 10); + return -1; + } + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + emitNumericEntity(lastCp, expectedLength) { + var _a; + // Ensure we consumed at least one digit. + if (this.consumed <= expectedLength) { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + // Figure out if this is a legit end of the entity + if (lastCp === CharCodes.SEMI) { + this.consumed += 1; + } + else if (this.decodeMode === DecodingMode.Strict) { + return 0; + } + this.emitCodePoint(replaceCodePoint(this.result), this.consumed); + if (this.errors) { + if (lastCp !== CharCodes.SEMI) { + this.errors.missingSemicolonAfterCharacterReference(); + } + this.errors.validateNumericCharacterReference(this.result); + } + return this.consumed; + } + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNamedEntity(str, offset) { + const { decodeTree } = this; + let current = decodeTree[this.treeIndex]; + // The mask is the number of bytes of the value, including the current byte. + let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + for (; offset < str.length; offset++, this.excess++) { + const char = str.charCodeAt(offset); + this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); + if (this.treeIndex < 0) { + return this.result === 0 || + // If we are parsing an attribute + (this.decodeMode === DecodingMode.Attribute && + // We shouldn't have consumed any characters after the entity, + (valueLength === 0 || + // And there should be no invalid characters. + isEntityInAttributeInvalidEnd(char))) + ? 0 + : this.emitNotTerminatedNamedEntity(); + } + current = decodeTree[this.treeIndex]; + valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + // If the branch is a value, store it and continue + if (valueLength !== 0) { + // If the entity is terminated by a semicolon, we are done. + if (char === CharCodes.SEMI) { + return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); + } + // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. + if (this.decodeMode !== DecodingMode.Strict) { + this.result = this.treeIndex; + this.consumed += this.excess; + this.excess = 0; + } + } + } + return -1; + } + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + emitNotTerminatedNamedEntity() { + var _a; + const { result, decodeTree } = this; + const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; + this.emitNamedEntityData(result, valueLength, this.consumed); + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + return this.consumed; + } + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + emitNamedEntityData(result, valueLength, consumed) { + const { decodeTree } = this; + this.emitCodePoint(valueLength === 1 + ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH + : decodeTree[result + 1], consumed); + if (valueLength === 3) { + // For multi-byte values, we need to emit the second byte. + this.emitCodePoint(decodeTree[result + 2], consumed); + } + return consumed; + } + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + end() { + var _a; + switch (this.state) { + case EntityDecoderState.NamedEntity: { + // Emit a named entity if we have one. + return this.result !== 0 && + (this.decodeMode !== DecodingMode.Attribute || + this.result === this.treeIndex) + ? this.emitNotTerminatedNamedEntity() + : 0; + } + // Otherwise, emit a numeric entity if we have one. + case EntityDecoderState.NumericDecimal: { + return this.emitNumericEntity(0, 2); + } + case EntityDecoderState.NumericHex: { + return this.emitNumericEntity(0, 3); + } + case EntityDecoderState.NumericStart: { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + case EntityDecoderState.EntityStart: { + // Return 0 if we have no entity. + return 0; + } + } + } +} +/** + * Creates a function that decodes entities in a string. + * + * @param decodeTree The decode tree. + * @returns A function that decodes entities in a string. + */ +function getDecoder(decodeTree) { + let ret = ""; + const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str))); + return function decodeWithTrie(str, decodeMode) { + let lastIndex = 0; + let offset = 0; + while ((offset = str.indexOf("&", offset)) >= 0) { + ret += str.slice(lastIndex, offset); + decoder.startEntity(decodeMode); + const len = decoder.write(str, + // Skip the "&" + offset + 1); + if (len < 0) { + lastIndex = offset + decoder.end(); + break; + } + lastIndex = offset + len; + // If `len` is 0, skip the current `&` and continue. + offset = len === 0 ? lastIndex + 1 : lastIndex; + } + const result = ret + str.slice(lastIndex); + // Make sure we don't keep a reference to the final string. + ret = ""; + return result; }; } - -const lineBreak = /\r\n?|[\n\u2028\u2029]/; -const lineBreakG = new RegExp(lineBreak.source, "g"); -function isNewLine(code) { - switch (code) { - case 10: - case 13: - case 8232: - case 8233: - return true; - - default: - return false; - } +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +function determineBranch(decodeTree, current, nodeIdx, char) { + const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; + const jumpOffset = current & BinTrieFlags.JUMP_TABLE; + // Case 1: Single branch encoded in jump offset + if (branchCount === 0) { + return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; + } + // Case 2: Multiple branches encoded in jump table + if (jumpOffset) { + const value = char - jumpOffset; + return value < 0 || value >= branchCount + ? -1 + : decodeTree[nodeIdx + value] - 1; + } + // Case 3: Multiple branches encoded in dictionary + // Binary search for the character. + let lo = nodeIdx; + let hi = lo + branchCount - 1; + while (lo <= hi) { + const mid = (lo + hi) >>> 1; + const midVal = decodeTree[mid]; + if (midVal < char) { + lo = mid + 1; + } + else if (midVal > char) { + hi = mid - 1; + } + else { + return decodeTree[mid + branchCount]; + } + } + return -1; } -const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; -const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y; -const skipWhiteSpaceToLineBreak = new RegExp("(?=(" + skipWhiteSpaceInLine.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"); -function isWhitespace(code) { - switch (code) { - case 0x0009: - case 0x000b: - case 0x000c: - case 32: - case 160: - case 5760: - case 0x2000: - case 0x2001: - case 0x2002: - case 0x2003: - case 0x2004: - case 0x2005: - case 0x2006: - case 0x2007: - case 0x2008: - case 0x2009: - case 0x200a: - case 0x202f: - case 0x205f: - case 0x3000: - case 0xfeff: - return true; - - default: - return false; - } +const htmlDecoder = getDecoder(htmlDecodeTree); +getDecoder(xmlDecodeTree); +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +function decodeHTML(str, mode = DecodingMode.Legacy) { + return htmlDecoder(str, mode); } +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace$1(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace$1(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +let Tokenizer$1 = class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + { + this.entityDecoder = new EntityDecoder( + htmlDecodeTree, + (cp, consumed) => this.emitCodePoint(cp, consumed) + ); + } + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (c === 38) { + this.startEntity(); + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace$1(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === 38) { + this.startEntity(); + } else if (c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + const lower = c | 32; + if (lower === 116) { + this.state = 30; + } else { + this.state = lower === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace$1(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace$1(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace$1(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace$1(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace$1(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace$1(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || false) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } else if (c === 38) { + this.startEntity(); + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace$1(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else if (c === 38) { + this.startEntity(); + } + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + const lower = c | 32; + if (lower === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (lower === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + const lower = c | 32; + if (lower === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (lower === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + { + this.baseState = this.state; + this.state = 33; + this.entityStart = this.index; + this.entityDecoder.startEntity( + this.baseState === 1 || this.baseState === 32 ? DecodingMode.Legacy : DecodingMode.Attribute + ); + } + } + stateInEntity() { + { + const length = this.entityDecoder.write(this.buffer, this.index); + if (length >= 0) { + this.state = this.baseState; + if (length === 0) { + this.index = this.entityStart; + } + } else { + this.index = this.buffer.length - 1; + } + } + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + if (this.state === 33) { + this.entityDecoder.end(); + this.state = this.baseState; + } + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + { + if (this.baseState !== 1 && this.baseState !== 32) { + if (this.sectionStart < this.entityStart) { + this.cbs.onattribdata(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.onattribentity( + fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } else { + if (this.sectionStart < this.entityStart) { + this.cbs.ontext(this.sectionStart, this.entityStart); + } + this.sectionStart = this.entityStart + consumed; + this.index = this.sectionStart - 1; + this.cbs.ontextentity( + fromCodePoint(cp), + this.entityStart, + this.sectionStart + ); + } + } + } +}; + +const CompilerDeprecationTypes = { + "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT", + "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC", + "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER", + "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE", + "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE", + "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE", + "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE", + "COMPILER_FILTERS": "COMPILER_FILTERS" +}; +const deprecationData = { + ["COMPILER_IS_ON_ELEMENT"]: { + message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`, + link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` + }, + ["COMPILER_V_BIND_SYNC"]: { + message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` + }, + ["COMPILER_V_BIND_OBJECT_ORDER"]: { + message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` + }, + ["COMPILER_V_ON_NATIVE"]: { + message: `.native modifier for v-on has been removed as is no longer necessary.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` + }, + ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: { + message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`, + link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` + }, + ["COMPILER_NATIVE_TEMPLATE"]: { + message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.` + }, + ["COMPILER_INLINE_TEMPLATE"]: { + message: `"inline-template" has been removed in Vue 3.`, + link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` + }, + ["COMPILER_FILTERS"]: { + message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`, + link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` + } +}; +function getCompatValue(key, { compatConfig }) { + const value = compatConfig && compatConfig[key]; + if (key === "MODE") { + return value || 3; + } else { + return value; + } +} +function isCompatEnabled(key, context) { + const mode = getCompatValue("MODE", context); + const value = getCompatValue(key, context); + return mode === 3 ? value === true : value !== false; +} +function checkCompatEnabled(key, context, loc, ...args) { + const enabled = isCompatEnabled(key, context); + if (enabled) { + warnDeprecation(key, context, loc, ...args); + } + return enabled; +} +function warnDeprecation(key, context, loc, ...args) { + const val = getCompatValue(key, context); + if (val === "suppress-warning") { + return; + } + const { message, link } = deprecationData[key]; + const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? ` + Details: ${link}` : ``}`; + const err = new SyntaxError(msg); + err.code = key; + if (loc) + err.loc = loc; + context.onWarn(err); +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages$1)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const ErrorCodes = { + "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0, + "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT", + "CDATA_IN_HTML_CONTENT": 1, + "1": "CDATA_IN_HTML_CONTENT", + "DUPLICATE_ATTRIBUTE": 2, + "2": "DUPLICATE_ATTRIBUTE", + "END_TAG_WITH_ATTRIBUTES": 3, + "3": "END_TAG_WITH_ATTRIBUTES", + "END_TAG_WITH_TRAILING_SOLIDUS": 4, + "4": "END_TAG_WITH_TRAILING_SOLIDUS", + "EOF_BEFORE_TAG_NAME": 5, + "5": "EOF_BEFORE_TAG_NAME", + "EOF_IN_CDATA": 6, + "6": "EOF_IN_CDATA", + "EOF_IN_COMMENT": 7, + "7": "EOF_IN_COMMENT", + "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8, + "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT", + "EOF_IN_TAG": 9, + "9": "EOF_IN_TAG", + "INCORRECTLY_CLOSED_COMMENT": 10, + "10": "INCORRECTLY_CLOSED_COMMENT", + "INCORRECTLY_OPENED_COMMENT": 11, + "11": "INCORRECTLY_OPENED_COMMENT", + "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12, + "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME", + "MISSING_ATTRIBUTE_VALUE": 13, + "13": "MISSING_ATTRIBUTE_VALUE", + "MISSING_END_TAG_NAME": 14, + "14": "MISSING_END_TAG_NAME", + "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15, + "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES", + "NESTED_COMMENT": 16, + "16": "NESTED_COMMENT", + "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17, + "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME", + "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18, + "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE", + "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19, + "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME", + "UNEXPECTED_NULL_CHARACTER": 20, + "20": "UNEXPECTED_NULL_CHARACTER", + "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21, + "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME", + "UNEXPECTED_SOLIDUS_IN_TAG": 22, + "22": "UNEXPECTED_SOLIDUS_IN_TAG", + "X_INVALID_END_TAG": 23, + "23": "X_INVALID_END_TAG", + "X_MISSING_END_TAG": 24, + "24": "X_MISSING_END_TAG", + "X_MISSING_INTERPOLATION_END": 25, + "25": "X_MISSING_INTERPOLATION_END", + "X_MISSING_DIRECTIVE_NAME": 26, + "26": "X_MISSING_DIRECTIVE_NAME", + "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27, + "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END", + "X_V_IF_NO_EXPRESSION": 28, + "28": "X_V_IF_NO_EXPRESSION", + "X_V_IF_SAME_KEY": 29, + "29": "X_V_IF_SAME_KEY", + "X_V_ELSE_NO_ADJACENT_IF": 30, + "30": "X_V_ELSE_NO_ADJACENT_IF", + "X_V_FOR_NO_EXPRESSION": 31, + "31": "X_V_FOR_NO_EXPRESSION", + "X_V_FOR_MALFORMED_EXPRESSION": 32, + "32": "X_V_FOR_MALFORMED_EXPRESSION", + "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33, + "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT", + "X_V_BIND_NO_EXPRESSION": 34, + "34": "X_V_BIND_NO_EXPRESSION", + "X_V_ON_NO_EXPRESSION": 35, + "35": "X_V_ON_NO_EXPRESSION", + "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36, + "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET", + "X_V_SLOT_MIXED_SLOT_USAGE": 37, + "37": "X_V_SLOT_MIXED_SLOT_USAGE", + "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38, + "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES", + "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39, + "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN", + "X_V_SLOT_MISPLACED": 40, + "40": "X_V_SLOT_MISPLACED", + "X_V_MODEL_NO_EXPRESSION": 41, + "41": "X_V_MODEL_NO_EXPRESSION", + "X_V_MODEL_MALFORMED_EXPRESSION": 42, + "42": "X_V_MODEL_MALFORMED_EXPRESSION", + "X_V_MODEL_ON_SCOPE_VARIABLE": 43, + "43": "X_V_MODEL_ON_SCOPE_VARIABLE", + "X_V_MODEL_ON_PROPS": 44, + "44": "X_V_MODEL_ON_PROPS", + "X_INVALID_EXPRESSION": 45, + "45": "X_INVALID_EXPRESSION", + "X_KEEP_ALIVE_INVALID_CHILDREN": 46, + "46": "X_KEEP_ALIVE_INVALID_CHILDREN", + "X_PREFIX_ID_NOT_SUPPORTED": 47, + "47": "X_PREFIX_ID_NOT_SUPPORTED", + "X_MODULE_MODE_NOT_SUPPORTED": 48, + "48": "X_MODULE_MODE_NOT_SUPPORTED", + "X_CACHE_HANDLER_NOT_SUPPORTED": 49, + "49": "X_CACHE_HANDLER_NOT_SUPPORTED", + "X_SCOPE_ID_NOT_SUPPORTED": 50, + "50": "X_SCOPE_ID_NOT_SUPPORTED", + "X_VNODE_HOOKS": 51, + "51": "X_VNODE_HOOKS", + "__EXTEND_POINT__": 52, + "52": "__EXTEND_POINT__" +}; +const errorMessages$1 = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [52]: `` +}; + +function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + +function getAugmentedNamespace(n) { + if (n.__esModule) return n; + var f = n.default; + if (typeof f == "function") { + var a = function a () { + if (this instanceof a) { + return Reflect.construct(f, arguments, this.constructor); + } + return f.apply(this, arguments); + }; + a.prototype = f.prototype; + } else a = {}; + Object.defineProperty(a, '__esModule', {value: true}); + Object.keys(n).forEach(function (k) { + var d = Object.getOwnPropertyDescriptor(n, k); + Object.defineProperty(a, k, d.get ? d : { + enumerable: true, + get: function () { + return n[k]; + } + }); + }); + return a; +} + +var lib = {}; + +Object.defineProperty(lib, '__esModule', { + value: true +}); +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + return target; +} class Position { - constructor(line, col) { + constructor(line, col, index) { this.line = void 0; this.column = void 0; + this.index = void 0; this.line = line; this.column = col; + this.index = index; } - } class SourceLocation { constructor(start, end) { @@ -873,317 +2396,195 @@ class SourceLocation { this.start = start; this.end = end; } - } -function getLineInfo(input, offset) { - let line = 1; - let lineStart = 0; - let match; - lineBreakG.lastIndex = 0; - - while ((match = lineBreakG.exec(input)) && match.index < offset) { - line++; - lineStart = lineBreakG.lastIndex; - } - - return new Position(line, offset - lineStart); +function createPositionWithColumnOffset(position, columnOffset) { + const { + line, + column, + index + } = position; + return new Position(line, column + columnOffset, index + columnOffset); } - -class BaseParser { - constructor() { - this.sawUnambiguousESM = false; - this.ambiguousScriptDifferentAst = false; +const code = "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"; +var ModuleErrors = { + ImportMetaOutsideModule: { + message: `import.meta may appear only with 'sourceType: "module"'`, + code + }, + ImportOutsideModule: { + message: `'import' and 'export' may appear only with 'sourceType: "module"'`, + code } - - hasPlugin(name) { - return this.plugins.has(name); - } - - getPluginOption(plugin, name) { - if (this.hasPlugin(plugin)) return this.plugins.get(plugin)[name]; - } - -} - -function setTrailingComments(node, comments) { - if (node.trailingComments === undefined) { - node.trailingComments = comments; - } else { - node.trailingComments.unshift(...comments); - } -} - -function setLeadingComments(node, comments) { - if (node.leadingComments === undefined) { - node.leadingComments = comments; - } else { - node.leadingComments.unshift(...comments); - } -} - -function setInnerComments(node, comments) { - if (node.innerComments === undefined) { - node.innerComments = comments; - } else { - node.innerComments.unshift(...comments); - } -} - -function adjustInnerComments(node, elements, commentWS) { - let lastElement = null; - let i = elements.length; - - while (lastElement === null && i > 0) { - lastElement = elements[--i]; - } - - if (lastElement === null || lastElement.start > commentWS.start) { - setInnerComments(node, commentWS.comments); - } else { - setTrailingComments(lastElement, commentWS.comments); - } -} - -class CommentsParser extends BaseParser { - addComment(comment) { - if (this.filename) comment.loc.filename = this.filename; - this.state.comments.push(comment); - } - - processComment(node) { - const { - commentStack - } = this.state; - const commentStackLength = commentStack.length; - if (commentStackLength === 0) return; - let i = commentStackLength - 1; - const lastCommentWS = commentStack[i]; - - if (lastCommentWS.start === node.end) { - lastCommentWS.leadingNode = node; - i--; - } - - const { - start: nodeStart - } = node; - - for (; i >= 0; i--) { - const commentWS = commentStack[i]; - const commentEnd = commentWS.end; - - if (commentEnd > nodeStart) { - commentWS.containingNode = node; - this.finalizeComment(commentWS); - commentStack.splice(i, 1); - } else { - if (commentEnd === nodeStart) { - commentWS.trailingNode = node; - } - - break; - } - } - } - - finalizeComment(commentWS) { - const { - comments - } = commentWS; - - if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) { - if (commentWS.leadingNode !== null) { - setTrailingComments(commentWS.leadingNode, comments); - } - - if (commentWS.trailingNode !== null) { - setLeadingComments(commentWS.trailingNode, comments); - } - } else { - const { - containingNode: node, - start: commentStart - } = commentWS; - - if (this.input.charCodeAt(commentStart - 1) === 44) { - switch (node.type) { - case "ObjectExpression": - case "ObjectPattern": - case "RecordExpression": - adjustInnerComments(node, node.properties, commentWS); - break; - - case "CallExpression": - case "OptionalCallExpression": - adjustInnerComments(node, node.arguments, commentWS); - break; - - case "FunctionDeclaration": - case "FunctionExpression": - case "ArrowFunctionExpression": - case "ObjectMethod": - case "ClassMethod": - case "ClassPrivateMethod": - adjustInnerComments(node, node.params, commentWS); - break; - - case "ArrayExpression": - case "ArrayPattern": - case "TupleExpression": - adjustInnerComments(node, node.elements, commentWS); - break; - - case "ExportNamedDeclaration": - case "ImportDeclaration": - adjustInnerComments(node, node.specifiers, commentWS); - break; - - default: - { - setInnerComments(node, comments); - } - } - } else { - setInnerComments(node, comments); - } - } - } - - finalizeRemainingComments() { - const { - commentStack - } = this.state; - - for (let i = commentStack.length - 1; i >= 0; i--) { - this.finalizeComment(commentStack[i]); - } - - this.state.commentStack = []; - } - - resetPreviousNodeTrailingComments(node) { - const { - commentStack - } = this.state; - const { - length - } = commentStack; - if (length === 0) return; - const commentWS = commentStack[length - 1]; - - if (commentWS.leadingNode === node) { - commentWS.leadingNode = null; - } - } - - takeSurroundingComments(node, start, end) { - const { - commentStack - } = this.state; - const commentStackLength = commentStack.length; - if (commentStackLength === 0) return; - let i = commentStackLength - 1; - - for (; i >= 0; i--) { - const commentWS = commentStack[i]; - const commentEnd = commentWS.end; - const commentStart = commentWS.start; - - if (commentStart === end) { - commentWS.leadingNode = node; - } else if (commentEnd === start) { - commentWS.trailingNode = node; - } else if (commentEnd < start) { - break; - } - } - } - -} - -const ErrorCodes = Object.freeze({ - SyntaxError: "BABEL_PARSER_SYNTAX_ERROR", - SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED" -}); - -const ErrorMessages = makeErrorTemplates({ - AccessorIsGenerator: "A %0ter cannot be a generator.", +}; +const NodeDescriptions = { + 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" +}; +const toNodeDescription = ({ + type, + prefix +}) => type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[String(prefix)] : NodeDescriptions[type]; +var StandardErrors = { + AccessorIsGenerator: ({ + kind + }) => `A ${kind}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.", AwaitNotInAsyncFunction: "'await' is only allowed within async functions.", - BadGetterArity: "A 'get' accesor must not have any formal parameters.", - BadSetterArity: "A 'set' accesor must have exactly one formal parameter.", - BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.", + 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: "'%0' require an initialization value.", - DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.", + DeclarationMissingInitializer: ({ + kind + }) => `Missing initializer in ${kind} 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: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.", + 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: "`%0` has already been exported. Exported identifiers must be unique.", + DuplicateExport: ({ + exportName + }) => `\`${exportName}\` has already been exported. Exported identifiers must be unique.`, DuplicateProto: "Redefinition of __proto__ property.", DuplicateRegExpFlags: "Duplicate regular expression flag.", + DynamicImportPhaseRequiresImportExpressions: ({ + phase + }) => `'import.${phase}(...)' can only be parsed when using the 'createImportExpressions' option.`, ElementAfterRest: "Rest element must be last element.", EscapedCharNotAnIdentifier: "Invalid Unicode escape.", - ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?", + ExportBindingIsString: ({ + localName, + exportName + }) => `A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${localName}' as '${exportName}' } from 'some-module'\`?`, ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.", - ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.", + ForInOfLoopInitializer: ({ + type + }) => `'${type === "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: "Unsyntactic %0.", + IllegalBreakContinue: ({ + type + }) => `Unsyntactic ${type === "BreakStatement" ? "break" : "continue"}.`, IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.", IllegalReturn: "'return' outside of function.", - ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?', + ImportAttributesUseAssert: "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.", + ImportBindingIsString: ({ + importName + }) => `A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${importName}" as foo }\`?`, ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.", - ImportCallArity: "`import()` requires exactly %0.", + ImportCallArity: ({ + maxArgumentCount + }) => `\`import()\` requires exactly ${maxArgumentCount === 1 ? "one argument" : "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.", + InvalidCoverInitializedName: "Invalid shorthand property initializer.", InvalidDecimal: "Invalid decimal.", - InvalidDigit: "Expected number in radix %0.", + InvalidDigit: ({ + radix + }) => `Expected number in radix ${radix}.`, InvalidEscapeSequence: "Bad character escape sequence.", InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.", - InvalidEscapedReservedWord: "Escape sequence in keyword %0.", - InvalidIdentifier: "Invalid identifier %0.", - InvalidLhs: "Invalid left-hand side in %0.", - InvalidLhsBinding: "Binding invalid left-hand side in %0.", + InvalidEscapedReservedWord: ({ + reservedWord + }) => `Escape sequence in keyword ${reservedWord}.`, + InvalidIdentifier: ({ + identifierName + }) => `Invalid identifier ${identifierName}.`, + InvalidLhs: ({ + ancestor + }) => `Invalid left-hand side in ${toNodeDescription(ancestor)}.`, + InvalidLhsBinding: ({ + ancestor + }) => `Binding invalid left-hand side in ${toNodeDescription(ancestor)}.`, + InvalidLhsOptionalChaining: ({ + ancestor + }) => `Invalid optional chaining in the left-hand side of ${toNodeDescription(ancestor)}.`, InvalidNumber: "Invalid number.", InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.", - InvalidOrUnexpectedToken: "Unexpected character '%0'.", + InvalidOrUnexpectedToken: ({ + unexpected + }) => `Unexpected character '${unexpected}'.`, InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.", - InvalidPrivateFieldResolution: "Private name #%0 is not defined.", + InvalidPrivateFieldResolution: ({ + identifierName + }) => `Private name #${identifierName} 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: "Label '%0' is already declared.", - LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.", + LabelRedeclaration: ({ + labelName + }) => `Label '${labelName}' 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 + }) => `This experimental syntax requires enabling the parser plugin: ${missingPlugin.map(name => JSON.stringify(name)).join(", ")}.`, + MissingOneOfPlugins: ({ + missingPlugin + }) => `This experimental syntax requires enabling one of the following parser plugin(s): ${missingPlugin.map(name => JSON.stringify(name)).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: 'Duplicate key "%0" is not allowed in module attributes.', - ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.", - ModuleExportUndefined: "Export '%0' is not defined.", + ModuleAttributesWithDuplicateKeys: ({ + key + }) => `Duplicate key "${key}" is not allowed in module attributes.`, + ModuleExportNameHasLoneSurrogate: ({ + surrogateCharCode + }) => `An export name cannot include a lone surrogate, found '\\u${surrogateCharCode.toString(16)}'.`, + ModuleExportUndefined: ({ + localName + }) => `Export '${localName}' is not defined.`, MultipleDefaultsInSwitch: "Multiple default clauses.", NewlineAfterThrow: "Illegal newline after throw.", NoCatchOrFinally: "Missing catch or finally clause.", @@ -1196,34 +2597,21 @@ const ErrorMessages = makeErrorTemplates({ ParamDupe: "Argument name clash.", PatternHasAccessor: "Object pattern can't contain getter or setter.", PatternHasMethod: "Object pattern can't contain methods.", - PipeBodyIsTighter: "Unexpected %0 after pipeline body; any %0 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: 'Invalid topic token %0. In order to use %0 as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "%0" }.', - PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", - PipeUnparenthesizedBody: "Hack-style pipe body cannot be an unparenthesized %0 expression; 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.', - PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).", - PrivateNameRedeclaration: "Duplicate private name #%0.", + PrivateInExpectedIn: ({ + identifierName + }) => `Private names are only allowed in property accesses (\`obj.#${identifierName}\`) or in \`in\` expressions (\`#${identifierName} in obj\`).`, + PrivateNameRedeclaration: ({ + identifierName + }) => `Duplicate private name #${identifierName}.`, 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, inside a block, or as the body of an if statement.", + 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.", - StrictDelete: "Deleting local variable in strict mode.", - StrictEvalArguments: "Assigning to '%0' in strict mode.", - StrictEvalArgumentsBinding: "Binding '%0' 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.", 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.", @@ -1234,21 +2622,32 @@ const ErrorMessages = makeErrorTemplates({ 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: "Unexpected keyword '%0'.", + UnexpectedKeyword: ({ + keyword + }) => `Unexpected keyword '${keyword}'.`, 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: "Private names can only be used as the name of a class element (i.e. class C { #p = 42; #m() {} } )\n or a property of member expression (i.e. this.#p).", - UnexpectedReservedWord: "Unexpected reserved word '%0'.", + UnexpectedPrivateField: "Unexpected private name.", + UnexpectedReservedWord: ({ + reservedWord + }) => `Unexpected reserved word '${reservedWord}'.`, UnexpectedSuper: "'super' is only allowed in object methods and classes.", - UnexpectedToken: "Unexpected token '%0'.", + UnexpectedToken: ({ + expected, + unexpected + }) => `Unexpected token${unexpected ? ` '${unexpected}'.` : ""}${expected ? `, expected "${expected}"` : ""}`, 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`.", 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: "The only valid meta property for %0 is %0.%1.", + UnsupportedMetaProperty: ({ + target, + onlyValidPropertyName + }) => `The only valid meta property for ${target} is ${target}.${onlyValidPropertyName}.`, 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]).", @@ -1256,118 +2655,162 @@ const ErrorMessages = makeErrorTemplates({ UnterminatedRegExp: "Unterminated regular expression.", UnterminatedString: "Unterminated string constant.", UnterminatedTemplate: "Unterminated template.", - VarRedeclaration: "Identifier '%0' has already been declared.", + UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.", + VarRedeclaration: ({ + identifierName + }) => `Identifier '${identifierName}' has already been declared.`, YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.", YieldInParameter: "Yield expression is not allowed in formal parameters.", ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0." -}, ErrorCodes.SyntaxError); -const SourceTypeModuleErrorMessages = makeErrorTemplates({ - ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`, - ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'` -}, ErrorCodes.SourceTypeModuleError); - -function keepReasonCodeCompat(reasonCode, syntaxPlugin) { - { - if (syntaxPlugin === "flow" && reasonCode === "PatternIsOptional") { - return "OptionalBindingPattern"; - } - } - return reasonCode; -} - -function makeErrorTemplates(messages, code, syntaxPlugin) { - const templates = {}; - Object.keys(messages).forEach(reasonCode => { - templates[reasonCode] = Object.freeze({ - code, - reasonCode: keepReasonCodeCompat(reasonCode, syntaxPlugin), - template: messages[reasonCode] - }); +}; +var StrictModeErrors = { + StrictDelete: "Deleting local variable in strict mode.", + StrictEvalArguments: ({ + referenceName + }) => `Assigning to '${referenceName}' in strict mode.`, + StrictEvalArgumentsBinding: ({ + bindingName + }) => `Binding '${bindingName}' 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." +}; +const UnparenthesizedPipeBodyDescriptions = new Set(["ArrowFunctionExpression", "AssignmentExpression", "ConditionalExpression", "YieldExpression"]); +var PipelineOperatorErrors = { + 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 + }) => `Invalid topic token ${token}. In order to use ${token} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${token}" }.`, + PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.", + PipeUnparenthesizedBody: ({ + type + }) => `Hack-style pipe body cannot be an unparenthesized ${toNodeDescription({ + type + })}; 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.' +}; +const _excluded$1 = ["toMessage"], + _excluded2$1 = ["message"]; +function defineHidden(obj, key, value) { + Object.defineProperty(obj, key, { + enumerable: false, + configurable: true, + value }); - return Object.freeze(templates); } -class ParserError extends CommentsParser { - getLocationForPosition(pos) { - let loc; - if (pos === this.state.start) loc = this.state.startLoc;else if (pos === this.state.lastTokStart) loc = this.state.lastTokStartLoc;else if (pos === this.state.end) loc = this.state.endLoc;else if (pos === this.state.lastTokEnd) loc = this.state.lastTokEndLoc;else loc = getLineInfo(this.input, pos); - return loc; - } - - raise(pos, { - code, - reasonCode, - template - }, ...params) { - return this.raiseWithData(pos, { - code, - reasonCode - }, template, ...params); - } - - raiseOverwrite(pos, { - code, - template - }, ...params) { - const loc = this.getLocationForPosition(pos); - const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`; - - if (this.options.errorRecovery) { - const errors = this.state.errors; - - for (let i = errors.length - 1; i >= 0; i--) { - const error = errors[i]; - - if (error.pos === pos) { - return Object.assign(error, { - message - }); - } else if (error.pos < pos) { - break; - } +function toParseErrorConstructor(_ref) { + let { + toMessage + } = _ref, + properties = _objectWithoutPropertiesLoose(_ref, _excluded$1); + return function constructor({ + loc, + details + }) { + const error = new SyntaxError(); + Object.assign(error, properties, { + loc, + pos: loc.index + }); + if ("missingPlugin" in details) { + Object.assign(error, { + missingPlugin: details.missingPlugin + }); + } + defineHidden(error, "clone", function clone(overrides = {}) { + var _overrides$loc; + const { + line, + column, + index + } = (_overrides$loc = overrides.loc) != null ? _overrides$loc : loc; + return constructor({ + loc: new Position(line, column, index), + details: Object.assign({}, details, overrides.details) + }); + }); + defineHidden(error, "details", details); + Object.defineProperty(error, "message", { + configurable: true, + get() { + const message = `${toMessage(details)} (${loc.line}:${loc.column})`; + this.message = message; + return message; + }, + set(value) { + Object.defineProperty(this, "message", { + value, + writable: true + }); } - } - - return this._raise({ - code, - loc, - pos - }, message); - } - - raiseWithData(pos, data, errorTemplate, ...params) { - const loc = this.getLocationForPosition(pos); - const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`; - return this._raise(Object.assign({ - loc, - pos - }, data), message); - } - - _raise(errorContext, message) { - const err = new SyntaxError(message); - Object.assign(err, errorContext); - - if (this.options.errorRecovery) { - if (!this.isLookahead) this.state.errors.push(err); - return err; - } else { - throw err; - } - } - + }); + return error; + }; } - -var estree = (superClass => class extends superClass { +function ParseErrorEnum(argument, syntaxPlugin) { + if (Array.isArray(argument)) { + return parseErrorTemplates => ParseErrorEnum(parseErrorTemplates, argument[0]); + } + const ParseErrorConstructors = {}; + for (const reasonCode of Object.keys(argument)) { + const template = argument[reasonCode]; + const _ref2 = typeof template === "string" ? { + message: () => template + } : typeof template === "function" ? { + message: template + } : template, + { + message + } = _ref2, + rest = _objectWithoutPropertiesLoose(_ref2, _excluded2$1); + const toMessage = typeof message === "string" ? () => message : message; + ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({ + code: "BABEL_PARSER_SYNTAX_ERROR", + reasonCode, + toMessage + }, syntaxPlugin ? { + syntaxPlugin + } : {}, rest)); + } + return ParseErrorConstructors; +} +const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors)); +const { + defineProperty +} = Object; +const toUnenumerable = (object, key) => defineProperty(object, key, { + enumerable: false, + value: object[key] +}); +function toESTreeLocation(node) { + node.loc.start && toUnenumerable(node.loc.start, "index"); + node.loc.end && toUnenumerable(node.loc.end, "index"); + return node; +} +var estree = superClass => class ESTreeParserMixin extends superClass { + parse() { + const file = toESTreeLocation(super.parse()); + if (this.options.tokens) { + file.tokens = file.tokens.map(toESTreeLocation); + } + return file; + } parseRegExpLiteral({ pattern, flags }) { let regex = null; - try { regex = new RegExp(pattern, flags); } catch (e) {} - const node = this.estreeParseLiteral(regex); node.regex = { pattern, @@ -1375,64 +2818,55 @@ var estree = (superClass => class extends superClass { }; return node; } - parseBigIntLiteral(value) { let bigInt; - try { bigInt = BigInt(value); } catch (_unused) { bigInt = null; } - const node = this.estreeParseLiteral(bigInt); node.bigint = String(node.value || value); return node; } - parseDecimalLiteral(value) { const decimal = null; const node = this.estreeParseLiteral(decimal); node.decimal = String(node.value || value); return node; } - estreeParseLiteral(value) { return this.parseLiteral(value, "Literal"); } - parseStringLiteral(value) { return this.estreeParseLiteral(value); } - parseNumericLiteral(value) { return this.estreeParseLiteral(value); } - parseNullLiteral() { return this.estreeParseLiteral(null); } - parseBooleanLiteral(value) { return this.estreeParseLiteral(value); } - directiveToStmt(directive) { - const directiveLiteral = directive.value; - const stmt = this.startNodeAt(directive.start, directive.loc.start); - const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start); - expression.value = directiveLiteral.extra.expressionValue; - expression.raw = directiveLiteral.extra.raw; - stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.end, directiveLiteral.loc.end); - stmt.directive = directiveLiteral.extra.raw.slice(1, -1); - return this.finishNodeAt(stmt, "ExpressionStatement", directive.end, directive.loc.end); + const expression = directive.value; + delete directive.value; + expression.type = "Literal"; + expression.raw = expression.extra.raw; + expression.value = expression.extra.expressionValue; + const stmt = directive; + stmt.type = "ExpressionStatement"; + stmt.expression = expression; + stmt.directive = expression.extra.rawValue; + delete expression.extra; + return stmt; } - initFunction(node, isAsync) { super.initFunction(node, isAsync); node.expression = false; } - checkDeclaration(node) { if (node != null && this.isObjectProperty(node)) { this.checkDeclaration(node.value); @@ -1440,35 +2874,27 @@ var estree = (superClass => class extends superClass { super.checkDeclaration(node); } } - getObjectOrClassMethodParams(method) { return method.value.params; } - isValidDirective(stmt) { var _stmt$expression$extr; - return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized); } - - parseBlockBody(node, ...args) { - super.parseBlockBody(node, ...args); + parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { + super.parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse); const directiveStatements = node.directives.map(d => this.directiveToStmt(d)); node.body = directiveStatements.concat(node.body); delete node.directives; } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true); - if (method.typeParameters) { method.value.typeParameters = method.typeParameters; delete method.typeParameters; } - classBody.body.push(method); } - parsePrivateName() { const node = super.parsePrivateName(); { @@ -1478,7 +2904,6 @@ var estree = (superClass => class extends superClass { } return this.convertPrivateNameToPrivateIdentifier(node); } - convertPrivateNameToPrivateIdentifier(node) { const name = super.getPrivateNameSV(node); node = node; @@ -1487,7 +2912,6 @@ var estree = (superClass => class extends superClass { node.type = "PrivateIdentifier"; return node; } - isPrivateName(node) { { if (!this.getPluginOption("estree", "classFeatures")) { @@ -1496,7 +2920,6 @@ var estree = (superClass => class extends superClass { } return node.type === "PrivateIdentifier"; } - getPrivateNameSV(node) { { if (!this.getPluginOption("estree", "classFeatures")) { @@ -1505,19 +2928,16 @@ var estree = (superClass => class extends superClass { } return node.name; } - parseLiteral(value, type) { const node = super.parseLiteral(value, type); node.raw = node.extra.raw; delete node.extra; return node; } - parseFunctionBody(node, allowExpression, isMethod = false) { super.parseFunctionBody(node, allowExpression, isMethod); node.expression = node.body.type !== "BlockStatement"; } - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { let funcNode = this.startNode(); funcNode.kind = node.kind; @@ -1525,15 +2945,11 @@ var estree = (superClass => class extends superClass { funcNode.type = "FunctionExpression"; delete funcNode.kind; node.value = funcNode; - if (type === "ClassPrivateMethod") { node.computed = false; } - - type = "MethodDefinition"; - return this.finishNode(node, type); + return this.finishNode(node, "MethodDefinition"); } - parseClassProperty(...args) { const propertyNode = super.parseClassProperty(...args); { @@ -1544,7 +2960,6 @@ var estree = (superClass => class extends superClass { propertyNode.type = "PropertyDefinition"; return propertyNode; } - parseClassPrivateProperty(...args) { const propertyNode = super.parseClassPrivateProperty(...args); { @@ -1556,114 +2971,115 @@ var estree = (superClass => class extends superClass { propertyNode.computed = false; return propertyNode; } - parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor); - if (node) { node.type = "Property"; - if (node.kind === "method") node.kind = "init"; + if (node.kind === "method") { + node.kind = "init"; + } node.shorthand = false; } - return node; } - - parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) { - const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors); - + parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { + const node = super.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); if (node) { node.kind = "init"; node.type = "Property"; } - return node; } - + isValidLVal(type, isUnparenthesizedInAssign, binding) { + return type === "Property" ? "value" : super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } isAssignable(node, isBinding) { if (node != null && this.isObjectProperty(node)) { return this.isAssignable(node.value, isBinding); } - return super.isAssignable(node, isBinding); } - toAssignable(node, isLHS = false) { if (node != null && this.isObjectProperty(node)) { - this.toAssignable(node.value, isLHS); - return node; - } - - return super.toAssignable(node, isLHS); - } - - toAssignableObjectExpressionProp(prop, ...args) { - if (prop.kind === "get" || prop.kind === "set") { - this.raise(prop.key.start, ErrorMessages.PatternHasAccessor); - } else if (prop.method) { - this.raise(prop.key.start, ErrorMessages.PatternHasMethod); + const { + key, + value + } = node; + if (this.isPrivateName(key)) { + this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); + } + this.toAssignable(value, isLHS); } else { - super.toAssignableObjectExpressionProp(prop, ...args); + super.toAssignable(node, isLHS); } } - - finishCallExpression(node, optional) { - super.finishCallExpression(node, optional); - + toAssignableObjectExpressionProp(prop, isLast, isLHS) { + if (prop.kind === "get" || prop.kind === "set") { + this.raise(Errors.PatternHasAccessor, { + at: prop.key + }); + } else if (prop.method) { + this.raise(Errors.PatternHasMethod, { + at: prop.key + }); + } else { + super.toAssignableObjectExpressionProp(prop, isLast, isLHS); + } + } + finishCallExpression(unfinished, optional) { + const node = super.finishCallExpression(unfinished, optional); if (node.callee.type === "Import") { node.type = "ImportExpression"; node.source = node.arguments[0]; - - if (this.hasPlugin("importAssertions")) { - var _node$arguments$; - - node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null; + if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + var _node$arguments$, _node$arguments$2; + node.options = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null; + node.attributes = (_node$arguments$2 = node.arguments[1]) != null ? _node$arguments$2 : null; } - delete node.arguments; delete node.callee; } - return node; } - toReferencedArguments(node) { if (node.type === "ImportExpression") { return; } - super.toReferencedArguments(node); } - - parseExport(node) { - super.parseExport(node); - + parseExport(unfinished, decorators) { + const exportStartLoc = this.state.lastTokStartLoc; + const node = super.parseExport(unfinished, decorators); switch (node.type) { case "ExportAllDeclaration": node.exported = null; break; - case "ExportNamedDeclaration": if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") { node.type = "ExportAllDeclaration"; node.exported = node.specifiers[0].exported; delete node.specifiers; } - + case "ExportDefaultDeclaration": + { + var _declaration$decorato; + const { + declaration + } = node; + if ((declaration == null ? void 0 : declaration.type) === "ClassDeclaration" && ((_declaration$decorato = declaration.decorators) == null ? void 0 : _declaration$decorato.length) > 0 && declaration.start === node.start) { + this.resetStartLocation(node, exportStartLoc); + } + } break; } - return node; } - - parseSubscript(base, startPos, startLoc, noCalls, state) { - const node = super.parseSubscript(base, startPos, startLoc, noCalls, state); - + parseSubscript(base, startLoc, noCalls, state) { + const node = super.parseSubscript(base, startLoc, noCalls, state); if (state.optionalChainMember) { if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") { node.type = node.type.substring(8); } - if (state.stop) { const chain = this.startNodeAtNode(node); chain.expression = node; @@ -1672,32 +3088,38 @@ var estree = (superClass => class extends superClass { } else if (node.type === "MemberExpression" || node.type === "CallExpression") { node.optional = false; } - return node; } - + isOptionalMemberExpression(node) { + if (node.type === "ChainExpression") { + return node.expression.type === "MemberExpression"; + } + return super.isOptionalMemberExpression(node); + } hasPropertyAsPrivateName(node) { if (node.type === "ChainExpression") { node = node.expression; } - return super.hasPropertyAsPrivateName(node); } - - isOptionalChain(node) { - return node.type === "ChainExpression"; - } - isObjectProperty(node) { return node.type === "Property" && node.kind === "init" && !node.method; } - isObjectMethod(node) { return node.method || node.kind === "get" || node.kind === "set"; } - -}); - + finishNodeAt(node, type, endLoc) { + return toESTreeLocation(super.finishNodeAt(node, type, endLoc)); + } + resetStartLocation(node, startLoc) { + super.resetStartLocation(node, startLoc); + toESTreeLocation(node); + } + resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { + super.resetEndLocation(node, endLoc); + toESTreeLocation(node); + } +}; class TokContext { constructor(token, preserveSpace) { this.token = void 0; @@ -1705,13 +3127,16 @@ class TokContext { this.token = token; this.preserveSpace = !!preserveSpace; } - } -const types = { +const types$1 = { brace: new TokContext("{"), - template: new TokContext("`", true) + j_oTag: new TokContext("<tag"), + j_cTag: new TokContext("</tag"), + j_expr: new TokContext("<tag>...</tag>", true) }; - +{ + types$1.template = new TokContext("`", true); +} const beforeExpr = true; const startsExpr = true; const isLoop = true; @@ -1744,48 +3169,40 @@ class ExportedTokenType { this.updateContext = null; } } - } const keywords$1 = new Map(); - function createKeyword(name, options = {}) { options.keyword = name; const token = createToken(name, options); keywords$1.set(name, token); return token; } - function createBinop(name, binop) { return createToken(name, { beforeExpr, binop }); } - let tokenTypeCounter = -1; -const tokenTypes = []; +const tokenTypes$1 = []; const tokenLabels = []; const tokenBinops = []; const tokenBeforeExprs = []; const tokenStartsExprs = []; const tokenPrefixes = []; - function createToken(name, options = {}) { var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix; - ++tokenTypeCounter; tokenLabels.push(name); tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1); tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false); tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false); tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false); - tokenTypes.push(new ExportedTokenType(name, options)); + tokenTypes$1.push(new ExportedTokenType(name, options)); return tokenTypeCounter; } - function createKeywordLike(name, options = {}) { var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2; - ++tokenTypeCounter; keywords$1.set(name, tokenTypeCounter); tokenLabels.push(name); @@ -1793,10 +3210,9 @@ function createKeywordLike(name, options = {}) { tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false); tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false); tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false); - tokenTypes.push(new ExportedTokenType("name", options)); + tokenTypes$1.push(new ExportedTokenType("name", options)); return tokenTypeCounter; } - const tt = { bracketL: createToken("[", { beforeExpr, @@ -1824,9 +3240,7 @@ const tt = { beforeExpr, startsExpr }), - braceR: createToken("}", { - beforeExpr - }), + braceR: createToken("}"), braceBarR: createToken("|}"), parenL: createToken("(", { beforeExpr, @@ -1864,6 +3278,13 @@ const tt = { beforeExpr, startsExpr }), + templateTail: createToken("...`", { + startsExpr + }), + templateNonTail: createToken("...${", { + beforeExpr, + startsExpr + }), at: createToken("@"), hash: createToken("#", { startsExpr @@ -1904,6 +3325,12 @@ const tt = { prefix, startsExpr }), + doubleCaret: createToken("^^", { + startsExpr + }), + doubleAt: createToken("@@", { + startsExpr + }), pipeline: createBinop("|>", 0), nullishCoalescing: createBinop("??", 1), logicalOR: createBinop("||", 1), @@ -1916,6 +3343,8 @@ const tt = { gt: createBinop("</>/<=/>=", 7), relational: createBinop("</>/<=/>=", 7), bitShift: createBinop("<</>>/>>>", 8), + bitShiftL: createBinop("<</>>/>>>", 8), + bitShiftR: createBinop("<</>>/>>>", 8), plusMin: createToken("+/-", { beforeExpr, binop: 9, @@ -2040,6 +3469,9 @@ const tt = { _await: createKeywordLike("await", { startsExpr }), + _defer: createKeywordLike("defer", { + startsExpr + }), _from: createKeywordLike("from", { startsExpr }), @@ -2061,9 +3493,15 @@ const tt = { _set: createKeywordLike("set", { startsExpr }), + _source: createKeywordLike("source", { + startsExpr + }), _static: createKeywordLike("static", { startsExpr }), + _using: createKeywordLike("using", { + startsExpr + }), _yield: createKeywordLike("yield", { startsExpr }), @@ -2100,6 +3538,9 @@ const tt = { _require: createKeywordLike("require", { startsExpr }), + _satisfies: createKeywordLike("satisfies", { + startsExpr + }), _keyof: createKeywordLike("keyof", { startsExpr }), @@ -2168,16 +3609,16 @@ const tt = { }) }; function tokenIsIdentifier(token) { - return token >= 87 && token <= 122; + return token >= 93 && token <= 132; } function tokenKeywordOrIdentifierIsKeyword(token) { - return token <= 86; + return token <= 92; } function tokenIsKeywordOrIdentifier(token) { - return token >= 52 && token <= 122; + return token >= 58 && token <= 132; } function tokenIsLiteralPropertyName(token) { - return token >= 52 && token <= 126; + return token >= 58 && token <= 136; } function tokenComesBeforeExpression(token) { return tokenBeforeExprs[token]; @@ -2186,31 +3627,31 @@ function tokenCanStartExpression(token) { return tokenStartsExprs[token]; } function tokenIsAssignment(token) { - return token >= 27 && token <= 31; + return token >= 29 && token <= 33; } function tokenIsFlowInterfaceOrTypeOrOpaque(token) { - return token >= 119 && token <= 121; + return token >= 129 && token <= 131; } function tokenIsLoop(token) { - return token >= 84 && token <= 86; + return token >= 90 && token <= 92; } function tokenIsKeyword(token) { - return token >= 52 && token <= 86; + return token >= 58 && token <= 92; } function tokenIsOperator(token) { - return token >= 35 && token <= 53; + return token >= 39 && token <= 59; } function tokenIsPostfix(token) { - return token === 32; + return token === 34; } function tokenIsPrefix(token) { return tokenPrefixes[token]; } function tokenIsTSTypeOperator(token) { - return token >= 111 && token <= 113; + return token >= 121 && token <= 123; } function tokenIsTSDeclarationStart(token) { - return token >= 114 && token <= 120; + return token >= 124 && token <= 130; } function tokenLabelName(token) { return tokenLabels[token]; @@ -2219,67 +3660,57 @@ function tokenOperatorPrecedence(token) { return tokenBinops[token]; } function tokenIsRightAssociative(token) { - return token === 51; + return token === 57; +} +function tokenIsTemplate(token) { + return token >= 24 && token <= 25; } function getExportedToken(token) { - return tokenTypes[token]; -} -function isTokenType(obj) { - return typeof obj === "number"; + return tokenTypes$1[token]; } { - tokenTypes[8].updateContext = context => { + tokenTypes$1[8].updateContext = context => { context.pop(); }; - - tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => { - context.push(types.brace); + tokenTypes$1[5].updateContext = tokenTypes$1[7].updateContext = tokenTypes$1[23].updateContext = context => { + context.push(types$1.brace); }; - - tokenTypes[22].updateContext = context => { - if (context[context.length - 1] === types.template) { + tokenTypes$1[22].updateContext = context => { + if (context[context.length - 1] === types$1.template) { context.pop(); } else { - context.push(types.template); + context.push(types$1.template); } }; - - tokenTypes[132].updateContext = context => { - context.push(types.j_expr, types.j_oTag); + tokenTypes$1[142].updateContext = context => { + context.push(types$1.j_expr, types$1.j_oTag); }; } - let nonASCIIidentifierStartChars = "\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-\u088e\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\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\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-\u1c88\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-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\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"; -let nonASCIIidentifierChars = "\u200c\u200d\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\u0898-\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\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-\u0ecd\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-\u1ace\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\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\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"; +let nonASCIIidentifierChars = "\u200c\u200d\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\u0898-\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-\u1ace\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"; const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; -const astralIdentifierStartCodes = [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, 68, 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, 71, 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, 349, 41, 7, 1, 79, 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, 85, 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, 159, 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, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 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, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 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, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938]; -const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 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, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 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, 406, 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, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 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, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; - +const astralIdentifierStartCodes = [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, 68, 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, 71, 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, 349, 41, 7, 1, 79, 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, 159, 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, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 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, 757, 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, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; +const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 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, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 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, 406, 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, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 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, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; function isInAstralSet(code, set) { let pos = 0x10000; - for (let i = 0, length = set.length; i < length; i += 2) { pos += set[i]; if (pos > code) return false; pos += set[i + 1]; if (pos >= code) return true; } - return false; } - function isIdentifierStart(code) { if (code < 65) return code === 36; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); } - return isInAstralSet(code, astralIdentifierStartCodes); } function isIdentifierChar(code) { @@ -2289,14 +3720,11 @@ function isIdentifierChar(code) { if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; - if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } - const reservedWords = { 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"], @@ -2320,60 +3748,13 @@ function isStrictBindReservedWord(word, inModule) { function isKeyword(word) { return keywords.has(word); } - -function isIteratorStart(current, next) { - return current === 64 && next === 64; +function isIteratorStart(current, next, next2) { + return current === 64 && next === 64 && isIdentifierStart(next2); } const reservedWordLikeSet = 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 canBeReservedWord(word) { return reservedWordLikeSet.has(word); } - -const SCOPE_OTHER = 0b000000000, - SCOPE_PROGRAM = 0b000000001, - SCOPE_FUNCTION = 0b000000010, - SCOPE_ARROW = 0b000000100, - SCOPE_SIMPLE_CATCH = 0b000001000, - SCOPE_SUPER = 0b000010000, - SCOPE_DIRECT_SUPER = 0b000100000, - SCOPE_CLASS = 0b001000000, - SCOPE_STATIC_BLOCK = 0b010000000, - SCOPE_TS_MODULE = 0b100000000, - SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE; -const BIND_KIND_VALUE = 0b000000000001, - BIND_KIND_TYPE = 0b000000000010, - BIND_SCOPE_VAR = 0b000000000100, - BIND_SCOPE_LEXICAL = 0b000000001000, - BIND_SCOPE_FUNCTION = 0b000000010000, - BIND_FLAGS_NONE = 0b000001000000, - BIND_FLAGS_CLASS = 0b000010000000, - BIND_FLAGS_TS_ENUM = 0b000100000000, - BIND_FLAGS_TS_CONST_ENUM = 0b001000000000, - BIND_FLAGS_TS_EXPORT_ONLY = 0b010000000000, - BIND_FLAGS_FLOW_DECLARE_FN = 0b100000000000; -const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS, - BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0, - BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0, - BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0, - BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS, - BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0, - BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM, - BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY, - BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE, - BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE, - BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM, - BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY, - BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN; -const CLASS_ELEMENT_FLAG_STATIC = 0b100, - CLASS_ELEMENT_KIND_GETTER = 0b010, - CLASS_ELEMENT_KIND_SETTER = 0b001, - CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER; -const CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC, - CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC, - CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER, - CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER, - CLASS_ELEMENT_OTHER = 0; - class Scope { constructor(flags) { this.var = new Set(); @@ -2381,219 +3762,431 @@ class Scope { this.functions = new Set(); this.flags = flags; } - } class ScopeHandler { - constructor(raise, inModule) { + constructor(parser, inModule) { + this.parser = void 0; this.scopeStack = []; + this.inModule = void 0; this.undefinedExports = new Map(); - this.undefinedPrivateNames = new Map(); - this.raise = raise; + this.parser = parser; this.inModule = inModule; } - + get inTopLevel() { + return (this.currentScope().flags & 1) > 0; + } get inFunction() { - return (this.currentVarScopeFlags() & SCOPE_FUNCTION) > 0; + return (this.currentVarScopeFlags() & 2) > 0; } - get allowSuper() { - return (this.currentThisScopeFlags() & SCOPE_SUPER) > 0; + return (this.currentThisScopeFlags() & 16) > 0; } - get allowDirectSuper() { - return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER) > 0; + return (this.currentThisScopeFlags() & 32) > 0; } - get inClass() { - return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0; + return (this.currentThisScopeFlags() & 64) > 0; } - get inClassAndNotInNonArrowFunction() { const flags = this.currentThisScopeFlags(); - return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION) === 0; + return (flags & 64) > 0 && (flags & 2) === 0; } - get inStaticBlock() { for (let i = this.scopeStack.length - 1;; i--) { const { flags } = this.scopeStack[i]; - - if (flags & SCOPE_STATIC_BLOCK) { + if (flags & 128) { return true; } - - if (flags & (SCOPE_VAR | SCOPE_CLASS)) { + if (flags & (387 | 64)) { return false; } } } - get inNonArrowFunction() { - return (this.currentThisScopeFlags() & SCOPE_FUNCTION) > 0; + return (this.currentThisScopeFlags() & 2) > 0; } - get treatFunctionsAsVar() { return this.treatFunctionsAsVarInScope(this.currentScope()); } - createScope(flags) { return new Scope(flags); } - enter(flags) { this.scopeStack.push(this.createScope(flags)); } - exit() { - this.scopeStack.pop(); + const scope = this.scopeStack.pop(); + return scope.flags; } - treatFunctionsAsVarInScope(scope) { - return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM); + return !!(scope.flags & (2 | 128) || !this.parser.inModule && scope.flags & 1); } - - declareName(name, bindingType, pos) { + declareName(name, bindingType, loc) { let scope = this.currentScope(); - - if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) { - this.checkRedeclarationInScope(scope, name, bindingType, pos); - - if (bindingType & BIND_SCOPE_FUNCTION) { + if (bindingType & 8 || bindingType & 16) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); + if (bindingType & 16) { scope.functions.add(name); } else { scope.lexical.add(name); } - - if (bindingType & BIND_SCOPE_LEXICAL) { + if (bindingType & 8) { this.maybeExportDefined(scope, name); } - } else if (bindingType & BIND_SCOPE_VAR) { + } else if (bindingType & 4) { for (let i = this.scopeStack.length - 1; i >= 0; --i) { scope = this.scopeStack[i]; - this.checkRedeclarationInScope(scope, name, bindingType, pos); + this.checkRedeclarationInScope(scope, name, bindingType, loc); scope.var.add(name); this.maybeExportDefined(scope, name); - if (scope.flags & SCOPE_VAR) break; + if (scope.flags & 387) break; } } - - if (this.inModule && scope.flags & SCOPE_PROGRAM) { + if (this.parser.inModule && scope.flags & 1) { this.undefinedExports.delete(name); } } - maybeExportDefined(scope, name) { - if (this.inModule && scope.flags & SCOPE_PROGRAM) { + if (this.parser.inModule && scope.flags & 1) { this.undefinedExports.delete(name); } } - - checkRedeclarationInScope(scope, name, bindingType, pos) { + checkRedeclarationInScope(scope, name, bindingType, loc) { if (this.isRedeclaredInScope(scope, name, bindingType)) { - this.raise(pos, ErrorMessages.VarRedeclaration, name); + this.parser.raise(Errors.VarRedeclaration, { + at: loc, + identifierName: name + }); } } - isRedeclaredInScope(scope, name, bindingType) { - if (!(bindingType & BIND_KIND_VALUE)) return false; - - if (bindingType & BIND_SCOPE_LEXICAL) { + if (!(bindingType & 1)) return false; + if (bindingType & 8) { return scope.lexical.has(name) || scope.functions.has(name) || scope.var.has(name); } - - if (bindingType & BIND_SCOPE_FUNCTION) { + if (bindingType & 16) { return scope.lexical.has(name) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name); } - - return scope.lexical.has(name) && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical.values().next().value === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name); + return scope.lexical.has(name) && !(scope.flags & 8 && scope.lexical.values().next().value === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name); } - checkLocalExport(id) { const { name } = id; const topLevelScope = this.scopeStack[0]; - if (!topLevelScope.lexical.has(name) && !topLevelScope.var.has(name) && !topLevelScope.functions.has(name)) { - this.undefinedExports.set(name, id.start); + this.undefinedExports.set(name, id.loc.start); } } - currentScope() { return this.scopeStack[this.scopeStack.length - 1]; } - currentVarScopeFlags() { for (let i = this.scopeStack.length - 1;; i--) { const { flags } = this.scopeStack[i]; - - if (flags & SCOPE_VAR) { + if (flags & 387) { return flags; } } } - currentThisScopeFlags() { for (let i = this.scopeStack.length - 1;; i--) { const { flags } = this.scopeStack[i]; - - if (flags & (SCOPE_VAR | SCOPE_CLASS) && !(flags & SCOPE_ARROW)) { + if (flags & (387 | 64) && !(flags & 4)) { return flags; } } } - } - class FlowScope extends Scope { constructor(...args) { super(...args); this.declareFunctions = new Set(); } - } - class FlowScopeHandler extends ScopeHandler { createScope(flags) { return new FlowScope(flags); } - - declareName(name, bindingType, pos) { + declareName(name, bindingType, loc) { const scope = this.currentScope(); - - if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) { - this.checkRedeclarationInScope(scope, name, bindingType, pos); + if (bindingType & 2048) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); this.maybeExportDefined(scope, name); scope.declareFunctions.add(name); return; } - - super.declareName(...arguments); + super.declareName(name, bindingType, loc); } - isRedeclaredInScope(scope, name, bindingType) { - if (super.isRedeclaredInScope(...arguments)) return true; - - if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) { + if (super.isRedeclaredInScope(scope, name, bindingType)) return true; + if (bindingType & 2048) { return !scope.declareFunctions.has(name) && (scope.lexical.has(name) || scope.functions.has(name)); } - return false; } - checkLocalExport(id) { if (!this.scopeStack[0].declareFunctions.has(id.name)) { super.checkLocalExport(id); } } - } - +class BaseParser { + constructor() { + this.sawUnambiguousESM = false; + this.ambiguousScriptDifferentAst = false; + } + hasPlugin(pluginConfig) { + if (typeof pluginConfig === "string") { + return this.plugins.has(pluginConfig); + } else { + const [pluginName, pluginOptions] = pluginConfig; + if (!this.hasPlugin(pluginName)) { + return false; + } + const actualOptions = this.plugins.get(pluginName); + for (const key of Object.keys(pluginOptions)) { + if ((actualOptions == null ? void 0 : actualOptions[key]) !== pluginOptions[key]) { + return false; + } + } + return true; + } + } + getPluginOption(plugin, name) { + var _this$plugins$get; + return (_this$plugins$get = this.plugins.get(plugin)) == null ? void 0 : _this$plugins$get[name]; + } +} +function setTrailingComments(node, comments) { + if (node.trailingComments === undefined) { + node.trailingComments = comments; + } else { + node.trailingComments.unshift(...comments); + } +} +function setLeadingComments(node, comments) { + if (node.leadingComments === undefined) { + node.leadingComments = comments; + } else { + node.leadingComments.unshift(...comments); + } +} +function setInnerComments(node, comments) { + if (node.innerComments === undefined) { + node.innerComments = comments; + } else { + node.innerComments.unshift(...comments); + } +} +function adjustInnerComments(node, elements, commentWS) { + let lastElement = null; + let i = elements.length; + while (lastElement === null && i > 0) { + lastElement = elements[--i]; + } + if (lastElement === null || lastElement.start > commentWS.start) { + setInnerComments(node, commentWS.comments); + } else { + setTrailingComments(lastElement, commentWS.comments); + } +} +class CommentsParser extends BaseParser { + addComment(comment) { + if (this.filename) comment.loc.filename = this.filename; + this.state.comments.push(comment); + } + processComment(node) { + const { + commentStack + } = this.state; + const commentStackLength = commentStack.length; + if (commentStackLength === 0) return; + let i = commentStackLength - 1; + const lastCommentWS = commentStack[i]; + if (lastCommentWS.start === node.end) { + lastCommentWS.leadingNode = node; + i--; + } + const { + start: nodeStart + } = node; + for (; i >= 0; i--) { + const commentWS = commentStack[i]; + const commentEnd = commentWS.end; + if (commentEnd > nodeStart) { + commentWS.containingNode = node; + this.finalizeComment(commentWS); + commentStack.splice(i, 1); + } else { + if (commentEnd === nodeStart) { + commentWS.trailingNode = node; + } + break; + } + } + } + finalizeComment(commentWS) { + const { + comments + } = commentWS; + if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) { + if (commentWS.leadingNode !== null) { + setTrailingComments(commentWS.leadingNode, comments); + } + if (commentWS.trailingNode !== null) { + setLeadingComments(commentWS.trailingNode, comments); + } + } else { + const { + containingNode: node, + start: commentStart + } = commentWS; + if (this.input.charCodeAt(commentStart - 1) === 44) { + switch (node.type) { + case "ObjectExpression": + case "ObjectPattern": + case "RecordExpression": + adjustInnerComments(node, node.properties, commentWS); + break; + case "CallExpression": + case "OptionalCallExpression": + adjustInnerComments(node, node.arguments, commentWS); + break; + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "ObjectMethod": + case "ClassMethod": + case "ClassPrivateMethod": + adjustInnerComments(node, node.params, commentWS); + break; + case "ArrayExpression": + case "ArrayPattern": + case "TupleExpression": + adjustInnerComments(node, node.elements, commentWS); + break; + case "ExportNamedDeclaration": + case "ImportDeclaration": + adjustInnerComments(node, node.specifiers, commentWS); + break; + default: + { + setInnerComments(node, comments); + } + } + } else { + setInnerComments(node, comments); + } + } + } + finalizeRemainingComments() { + const { + commentStack + } = this.state; + for (let i = commentStack.length - 1; i >= 0; i--) { + this.finalizeComment(commentStack[i]); + } + this.state.commentStack = []; + } + resetPreviousNodeTrailingComments(node) { + const { + commentStack + } = this.state; + const { + length + } = commentStack; + if (length === 0) return; + const commentWS = commentStack[length - 1]; + if (commentWS.leadingNode === node) { + commentWS.leadingNode = null; + } + } + resetPreviousIdentifierLeadingComments(node) { + const { + commentStack + } = this.state; + const { + length + } = commentStack; + if (length === 0) return; + if (commentStack[length - 1].trailingNode === node) { + commentStack[length - 1].trailingNode = null; + } else if (length >= 2 && commentStack[length - 2].trailingNode === node) { + commentStack[length - 2].trailingNode = null; + } + } + takeSurroundingComments(node, start, end) { + const { + commentStack + } = this.state; + const commentStackLength = commentStack.length; + if (commentStackLength === 0) return; + let i = commentStackLength - 1; + for (; i >= 0; i--) { + const commentWS = commentStack[i]; + const commentEnd = commentWS.end; + const commentStart = commentWS.start; + if (commentStart === end) { + commentWS.leadingNode = node; + } else if (commentEnd === start) { + commentWS.trailingNode = node; + } else if (commentEnd < start) { + break; + } + } + } +} +const lineBreak = /\r\n?|[\n\u2028\u2029]/; +const lineBreakG = new RegExp(lineBreak.source, "g"); +function isNewLine(code) { + switch (code) { + case 10: + case 13: + case 8232: + case 8233: + return true; + default: + return false; + } +} +const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; +const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g; +const skipWhiteSpaceToLineBreak = new RegExp("(?=(" + skipWhiteSpaceInLine.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y"); +function isWhitespace(code) { + switch (code) { + case 0x0009: + case 0x000b: + case 0x000c: + case 32: + case 160: + case 5760: + case 0x2000: + case 0x2001: + case 0x2002: + case 0x2003: + case 0x2004: + case 0x2005: + case 0x2006: + case 0x2007: + case 0x2008: + case 0x2009: + case 0x200a: + case 0x202f: + case 0x205f: + case 0x3000: + case 0xfeff: + return true; + default: + return false; + } +} class State { constructor() { this.strict = void 0; @@ -2611,6 +4204,7 @@ class State { this.hasFlowComment = false; this.isAmbientContext = false; this.inAbstractClass = false; + this.inDisallowConditionalTypesContext = false; this.topicContext = { maxNumOfResolvableTopics: 0, maxTopicIndex: null @@ -2618,25 +4212,23 @@ class State { this.soloAwait = false; this.inFSharpPipelineDirectBody = false; this.labels = []; - this.decoratorStack = [[]]; this.comments = []; this.commentStack = []; this.pos = 0; - this.type = 129; + this.type = 139; this.value = null; this.start = 0; this.end = 0; this.lastTokEndLoc = null; this.lastTokStartLoc = null; this.lastTokStart = 0; - this.lastTokEnd = 0; - this.context = [types.brace]; + this.context = [types$1.brace]; this.canStartJSXElement = true; this.containsEsc = false; + this.firstInvalidTemplateEscapePos = null; this.strictErrors = new Map(); this.tokensLength = 0; } - init({ strictMode, sourceType, @@ -2646,46 +4238,316 @@ class State { this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module"; this.curLine = startLine; this.lineStart = -startColumn; - this.startLoc = this.endLoc = new Position(startLine, startColumn); + this.startLoc = this.endLoc = new Position(startLine, startColumn, 0); } - curPosition() { - return new Position(this.curLine, this.pos - this.lineStart); + return new Position(this.curLine, this.pos - this.lineStart, this.pos); } - clone(skipArrays) { const state = new State(); const keys = Object.keys(this); - for (let i = 0, length = keys.length; i < length; i++) { const key = keys[i]; let val = this[key]; - if (!skipArrays && Array.isArray(val)) { val = val.slice(); } - state[key] = val; } - return state; } - } - var _isDigit = function isDigit(code) { return code >= 48 && code <= 57; }; -const VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100]); const forbiddenNumericSeparatorSiblings = { - decBinOct: [46, 66, 69, 79, 95, 98, 101, 111], - hex: [46, 88, 95, 120] + decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]), + hex: new Set([46, 88, 95, 120]) }; -const allowedNumericSeparatorSiblings = {}; -allowedNumericSeparatorSiblings.bin = [48, 49]; -allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55]; -allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57]; -allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]; +const isAllowedNumericSeparatorSibling = { + bin: ch => ch === 48 || ch === 49, + oct: ch => ch >= 48 && ch <= 55, + dec: ch => ch >= 48 && ch <= 57, + hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102 +}; +function readStringContents(type, input, pos, lineStart, curLine, errors) { + const initialPos = pos; + const initialLineStart = lineStart; + const initialCurLine = curLine; + let out = ""; + let firstInvalidLoc = null; + let chunkStart = pos; + const { + length + } = input; + for (;;) { + if (pos >= length) { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + out += input.slice(chunkStart, pos); + break; + } + const ch = input.charCodeAt(pos); + if (isStringEnd(type, ch, input, pos)) { + out += input.slice(chunkStart, pos); + break; + } + if (ch === 92) { + out += input.slice(chunkStart, pos); + const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors); + if (res.ch === null && !firstInvalidLoc) { + firstInvalidLoc = { + pos, + lineStart, + curLine + }; + } else { + out += res.ch; + } + ({ + pos, + lineStart, + curLine + } = res); + chunkStart = pos; + } else if (ch === 8232 || ch === 8233) { + ++pos; + ++curLine; + lineStart = pos; + } else if (ch === 10 || ch === 13) { + if (type === "template") { + out += input.slice(chunkStart, pos) + "\n"; + ++pos; + if (ch === 13 && input.charCodeAt(pos) === 10) { + ++pos; + } + ++curLine; + chunkStart = lineStart = pos; + } else { + errors.unterminated(initialPos, initialLineStart, initialCurLine); + } + } else { + ++pos; + } + } + return { + pos, + str: out, + firstInvalidLoc, + lineStart, + curLine, + containsInvalid: !!firstInvalidLoc + }; +} +function isStringEnd(type, ch, input, pos) { + if (type === "template") { + return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123; + } + return ch === (type === "double" ? 34 : 39); +} +function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) { + const throwOnInvalid = !inTemplate; + pos++; + const res = ch => ({ + pos, + ch, + lineStart, + curLine + }); + const ch = input.charCodeAt(pos++); + switch (ch) { + case 110: + return res("\n"); + case 114: + return res("\r"); + case 120: + { + let code; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCharCode(code)); + } + case 117: + { + let code; + ({ + code, + pos + } = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors)); + return res(code === null ? null : String.fromCodePoint(code)); + } + case 116: + return res("\t"); + case 98: + return res("\b"); + case 118: + return res("\u000b"); + case 102: + return res("\f"); + case 13: + if (input.charCodeAt(pos) === 10) { + ++pos; + } + case 10: + lineStart = pos; + ++curLine; + case 8232: + case 8233: + return res(""); + case 56: + case 57: + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(pos - 1, lineStart, curLine); + } + default: + if (ch >= 48 && ch <= 55) { + const startPos = pos - 1; + const match = input.slice(startPos, pos + 2).match(/^[0-7]+/); + let octalStr = match[0]; + let octal = parseInt(octalStr, 8); + if (octal > 255) { + octalStr = octalStr.slice(0, -1); + octal = parseInt(octalStr, 8); + } + pos += octalStr.length - 1; + const next = input.charCodeAt(pos); + if (octalStr !== "0" || next === 56 || next === 57) { + if (inTemplate) { + return res(null); + } else { + errors.strictNumericEscape(startPos, lineStart, curLine); + } + } + return res(String.fromCharCode(octal)); + } + return res(String.fromCharCode(ch)); + } +} +function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) { + const initialPos = pos; + let n; + ({ + n, + pos + } = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid)); + if (n === null) { + if (throwOnInvalid) { + errors.invalidEscapeSequence(initialPos, lineStart, curLine); + } else { + pos = initialPos - 1; + } + } + return { + code: n, + pos + }; +} +function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) { + const start = pos; + const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; + const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin; + let invalid = false; + let total = 0; + for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { + const code = input.charCodeAt(pos); + let val; + if (code === 95 && allowNumSeparator !== "bail") { + const prev = input.charCodeAt(pos - 1); + const next = input.charCodeAt(pos + 1); + if (!allowNumSeparator) { + if (bailOnError) return { + n: null, + pos + }; + errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine); + } else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) { + if (bailOnError) return { + n: null, + pos + }; + errors.unexpectedNumericSeparator(pos, lineStart, curLine); + } + ++pos; + continue; + } + if (code >= 97) { + val = code - 97 + 10; + } else if (code >= 65) { + val = code - 65 + 10; + } else if (_isDigit(code)) { + val = code - 48; + } else { + val = Infinity; + } + if (val >= radix) { + if (val <= 9 && bailOnError) { + return { + n: null, + pos + }; + } else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) { + val = 0; + } else if (forceLen) { + val = 0; + invalid = true; + } else { + break; + } + } + ++pos; + total = total * radix + val; + } + if (pos === start || len != null && pos - start !== len || invalid) { + return { + n: null, + pos + }; + } + return { + n: total, + pos + }; +} +function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) { + const ch = input.charCodeAt(pos); + let code; + if (ch === 123) { + ++pos; + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors)); + ++pos; + if (code !== null && code > 0x10ffff) { + if (throwOnInvalid) { + errors.invalidCodePoint(pos, lineStart, curLine); + } else { + return { + code: null, + pos + }; + } + } + } else { + ({ + code, + pos + } = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors)); + } + return { + code, + pos + }; +} +const _excluded = ["at"], + _excluded2 = ["at"]; +function buildPosition(pos, lineStart, curLine) { + return new Position(curLine, pos - lineStart, pos); +} +const VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100, 118]); class Token { constructor(state) { this.type = state.type; @@ -2694,40 +4556,69 @@ class Token { this.end = state.end; this.loc = new SourceLocation(state.startLoc, state.endLoc); } - } -class Tokenizer extends ParserError { +class Tokenizer extends CommentsParser { constructor(options, input) { super(); this.isLookahead = void 0; this.tokens = []; + this.errorHandlers_readInt = { + invalidDigit: (pos, lineStart, curLine, radix) => { + if (!this.options.errorRecovery) return false; + this.raise(Errors.InvalidDigit, { + at: buildPosition(pos, lineStart, curLine), + radix + }); + return true; + }, + numericSeparatorInEscapeSequence: this.errorBuilder(Errors.NumericSeparatorInEscapeSequence), + unexpectedNumericSeparator: this.errorBuilder(Errors.UnexpectedNumericSeparator) + }; + this.errorHandlers_readCodePoint = Object.assign({}, this.errorHandlers_readInt, { + invalidEscapeSequence: this.errorBuilder(Errors.InvalidEscapeSequence), + invalidCodePoint: this.errorBuilder(Errors.InvalidCodePoint) + }); + this.errorHandlers_readStringContents_string = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: (pos, lineStart, curLine) => { + this.recordStrictModeErrors(Errors.StrictNumericEscape, { + at: buildPosition(pos, lineStart, curLine) + }); + }, + unterminated: (pos, lineStart, curLine) => { + throw this.raise(Errors.UnterminatedString, { + at: buildPosition(pos - 1, lineStart, curLine) + }); + } + }); + this.errorHandlers_readStringContents_template = Object.assign({}, this.errorHandlers_readCodePoint, { + strictNumericEscape: this.errorBuilder(Errors.StrictNumericEscape), + unterminated: (pos, lineStart, curLine) => { + throw this.raise(Errors.UnterminatedTemplate, { + at: buildPosition(pos, lineStart, curLine) + }); + } + }); this.state = new State(); this.state.init(options); this.input = input; this.length = input.length; this.isLookahead = false; } - pushToken(token) { this.tokens.length = this.state.tokensLength; this.tokens.push(token); ++this.state.tokensLength; } - next() { this.checkKeywordEscapes(); - if (this.options.tokens) { this.pushToken(new Token(this.state)); } - - this.state.lastTokEnd = this.state.end; this.state.lastTokStart = this.state.start; this.state.lastTokEndLoc = this.state.endLoc; this.state.lastTokStartLoc = this.state.startLoc; this.nextToken(); } - eat(type) { if (this.match(type)) { this.next(); @@ -2736,11 +4627,9 @@ class Tokenizer extends ParserError { return false; } } - match(type) { return this.state.type === type; } - createLookaheadState(state) { return { pos: state.pos, @@ -2748,12 +4637,15 @@ class Tokenizer extends ParserError { type: state.type, start: state.start, end: state.end, - lastTokEnd: state.end, context: [this.curContext()], - inType: state.inType + inType: state.inType, + startLoc: state.startLoc, + lastTokEndLoc: state.lastTokEndLoc, + curLine: state.curLine, + lineStart: state.lineStart, + curPosition: state.curPosition }; } - lookahead() { const old = this.state; this.state = this.createLookaheadState(old); @@ -2764,103 +4656,95 @@ class Tokenizer extends ParserError { this.state = old; return curr; } - nextTokenStart() { return this.nextTokenStartSince(this.state.pos); } - nextTokenStartSince(pos) { skipWhiteSpace.lastIndex = pos; return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos; } - lookaheadCharCode() { return this.input.charCodeAt(this.nextTokenStart()); } - + nextTokenInLineStart() { + return this.nextTokenInLineStartSince(this.state.pos); + } + nextTokenInLineStartSince(pos) { + skipWhiteSpaceInLine.lastIndex = pos; + return skipWhiteSpaceInLine.test(this.input) ? skipWhiteSpaceInLine.lastIndex : pos; + } + lookaheadInLineCharCode() { + return this.input.charCodeAt(this.nextTokenInLineStart()); + } codePointAtPos(pos) { let cp = this.input.charCodeAt(pos); - if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) { const trail = this.input.charCodeAt(pos); - if ((trail & 0xfc00) === 0xdc00) { cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff); } } - return cp; } - setStrict(strict) { this.state.strict = strict; - if (strict) { - this.state.strictErrors.forEach((message, pos) => this.raise(pos, message)); + this.state.strictErrors.forEach(([toParseError, at]) => this.raise(toParseError, { + at + })); this.state.strictErrors.clear(); } } - curContext() { return this.state.context[this.state.context.length - 1]; } - nextToken() { - const curContext = this.curContext(); - if (!curContext.preserveSpace) this.skipSpace(); + this.skipSpace(); this.state.start = this.state.pos; if (!this.isLookahead) this.state.startLoc = this.state.curPosition(); - if (this.state.pos >= this.length) { - this.finishToken(129); + this.finishToken(139); return; } - - if (curContext === types.template) { - this.readTmplToken(); - } else { - this.getTokenFromCode(this.codePointAtPos(this.state.pos)); - } + this.getTokenFromCode(this.codePointAtPos(this.state.pos)); } - - skipBlockComment() { + skipBlockComment(commentEnd) { let startLoc; if (!this.isLookahead) startLoc = this.state.curPosition(); const start = this.state.pos; - const end = this.input.indexOf("*/", start + 2); - if (end === -1) throw this.raise(start, ErrorMessages.UnterminatedComment); - this.state.pos = end + 2; + const end = this.input.indexOf(commentEnd, start + 2); + if (end === -1) { + throw this.raise(Errors.UnterminatedComment, { + at: this.state.curPosition() + }); + } + this.state.pos = end + commentEnd.length; lineBreakG.lastIndex = start + 2; - while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) { ++this.state.curLine; this.state.lineStart = lineBreakG.lastIndex; } - if (this.isLookahead) return; const comment = { type: "CommentBlock", value: this.input.slice(start + 2, end), start, - end: end + 2, + end: end + commentEnd.length, loc: new SourceLocation(startLoc, this.state.curPosition()) }; if (this.options.tokens) this.pushToken(comment); return comment; } - skipLineComment(startSkip) { const start = this.state.pos; let startLoc; if (!this.isLookahead) startLoc = this.state.curPosition(); let ch = this.input.charCodeAt(this.state.pos += startSkip); - if (this.state.pos < this.length) { while (!isNewLine(ch) && ++this.state.pos < this.length) { ch = this.input.charCodeAt(this.state.pos); } } - if (this.isLookahead) return; const end = this.state.pos; const value = this.input.slice(start + startSkip, end); @@ -2874,26 +4758,21 @@ class Tokenizer extends ParserError { if (this.options.tokens) this.pushToken(comment); return comment; } - skipSpace() { const spaceStart = this.state.pos; const comments = []; - loop: while (this.state.pos < this.length) { const ch = this.input.charCodeAt(this.state.pos); - switch (ch) { 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: @@ -2901,48 +4780,37 @@ class Tokenizer extends ParserError { ++this.state.curLine; this.state.lineStart = this.state.pos; break; - case 47: switch (this.input.charCodeAt(this.state.pos + 1)) { case 42: { - const comment = this.skipBlockComment(); - + const comment = this.skipBlockComment("*/"); if (comment !== undefined) { this.addComment(comment); if (this.options.attachComment) comments.push(comment); } - break; } - case 47: { const comment = this.skipLineComment(2); - if (comment !== undefined) { this.addComment(comment); if (this.options.attachComment) comments.push(comment); } - break; } - default: break loop; } - break; - default: if (isWhitespace(ch)) { ++this.state.pos; - } else if (ch === 45 && !this.inModule) { + } else if (ch === 45 && !this.inModule && this.options.annexB) { const pos = this.state.pos; - if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) { const comment = this.skipLineComment(3); - if (comment !== undefined) { this.addComment(comment); if (this.options.attachComment) comments.push(comment); @@ -2950,12 +4818,10 @@ class Tokenizer extends ParserError { } else { break loop; } - } else if (ch === 60 && !this.inModule) { + } else if (ch === 60 && !this.inModule && this.options.annexB) { const pos = this.state.pos; - if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) { const comment = this.skipLineComment(4); - if (comment !== undefined) { this.addComment(comment); if (this.options.attachComment) comments.push(comment); @@ -2966,13 +4832,11 @@ class Tokenizer extends ParserError { } else { break loop; } - } } - if (comments.length > 0) { const end = this.state.pos; - const CommentWhitespace = { + const commentWhitespace = { start: spaceStart, end, comments, @@ -2980,48 +4844,42 @@ class Tokenizer extends ParserError { trailingNode: null, containingNode: null }; - this.state.commentStack.push(CommentWhitespace); + this.state.commentStack.push(commentWhitespace); } } - finishToken(type, val) { this.state.end = this.state.pos; + this.state.endLoc = this.state.curPosition(); const prevType = this.state.type; this.state.type = type; this.state.value = val; - if (!this.isLookahead) { - this.state.endLoc = this.state.curPosition(); this.updateContext(prevType); } } - replaceToken(type) { this.state.type = type; this.updateContext(); } - readToken_numberSign() { if (this.state.pos === 0 && this.readToken_interpreter()) { return; } - const nextPos = this.state.pos + 1; const next = this.codePointAtPos(nextPos); - if (next >= 48 && next <= 57) { - throw this.raise(this.state.pos, ErrorMessages.UnexpectedDigitAfterHash); + throw this.raise(Errors.UnexpectedDigitAfterHash, { + at: this.state.curPosition() + }); } - if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) { this.expectPlugin("recordAndTuple"); - - if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") { - throw this.raise(this.state.pos, next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType); + if (this.getPluginOption("recordAndTuple", "syntaxType") === "bar") { + throw this.raise(next === 123 ? Errors.RecordExpressionHashIncorrectStartSyntaxType : Errors.TupleExpressionHashIncorrectStartSyntaxType, { + at: this.state.curPosition() + }); } - this.state.pos += 2; - if (next === 123) { this.finishToken(7); } else { @@ -3029,23 +4887,20 @@ class Tokenizer extends ParserError { } } else if (isIdentifierStart(next)) { ++this.state.pos; - this.finishToken(128, this.readWord1(next)); + this.finishToken(138, this.readWord1(next)); } else if (next === 92) { ++this.state.pos; - this.finishToken(128, this.readWord1()); + this.finishToken(138, this.readWord1()); } else { - this.finishOp(25, 1); + this.finishOp(27, 1); } } - readToken_dot() { const next = this.input.charCodeAt(this.state.pos + 1); - if (next >= 48 && next <= 57) { this.readNumber(true); return; } - if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) { this.state.pos += 3; this.finishToken(21); @@ -3054,201 +4909,184 @@ class Tokenizer extends ParserError { this.finishToken(16); } } - readToken_slash() { const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - this.finishOp(29, 2); + this.finishOp(31, 2); } else { - this.finishOp(50, 1); + this.finishOp(56, 1); } } - readToken_interpreter() { if (this.state.pos !== 0 || this.length < 2) return false; let ch = this.input.charCodeAt(this.state.pos + 1); if (ch !== 33) return false; const start = this.state.pos; this.state.pos += 1; - while (!isNewLine(ch) && ++this.state.pos < this.length) { ch = this.input.charCodeAt(this.state.pos); } - const value = this.input.slice(start + 2, this.state.pos); - this.finishToken(26, value); + this.finishToken(28, value); return true; } - readToken_mult_modulo(code) { - let type = code === 42 ? 49 : 48; + let type = code === 42 ? 55 : 54; let width = 1; let next = this.input.charCodeAt(this.state.pos + 1); - if (code === 42 && next === 42) { width++; next = this.input.charCodeAt(this.state.pos + 2); - type = 51; + type = 57; } - if (next === 61 && !this.state.inType) { width++; - type = code === 37 ? 31 : 28; + type = code === 37 ? 33 : 30; } - this.finishOp(type, width); } - readToken_pipe_amp(code) { const next = this.input.charCodeAt(this.state.pos + 1); - if (next === code) { if (this.input.charCodeAt(this.state.pos + 2) === 61) { - this.finishOp(28, 3); + this.finishOp(30, 3); } else { - this.finishOp(code === 124 ? 37 : 38, 2); + this.finishOp(code === 124 ? 41 : 42, 2); } - return; } - if (code === 124) { if (next === 62) { - this.finishOp(35, 2); + this.finishOp(39, 2); return; } - if (this.hasPlugin("recordAndTuple") && next === 125) { if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType); + throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, { + at: this.state.curPosition() + }); } - this.state.pos += 2; this.finishToken(9); return; } - if (this.hasPlugin("recordAndTuple") && next === 93) { if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") { - throw this.raise(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType); + throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, { + at: this.state.curPosition() + }); } - this.state.pos += 2; this.finishToken(4); return; } } - if (next === 61) { - this.finishOp(28, 2); + this.finishOp(30, 2); return; } - - this.finishOp(code === 124 ? 39 : 41, 1); + this.finishOp(code === 124 ? 43 : 45, 1); } - readToken_caret() { const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61 && !this.state.inType) { - this.finishOp(30, 2); + this.finishOp(32, 2); + } else if (next === 94 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "^^" + }])) { + this.finishOp(37, 2); + const lookaheadCh = this.input.codePointAt(this.state.pos); + if (lookaheadCh === 94) { + this.unexpected(); + } } else { - this.finishOp(40, 1); + this.finishOp(44, 1); + } + } + readToken_atSign() { + const next = this.input.charCodeAt(this.state.pos + 1); + if (next === 64 && this.hasPlugin(["pipelineOperator", { + proposal: "hack", + topicToken: "@@" + }])) { + this.finishOp(38, 2); + } else { + this.finishOp(26, 1); } } - readToken_plus_min(code) { const next = this.input.charCodeAt(this.state.pos + 1); - if (next === code) { - this.finishOp(32, 2); + this.finishOp(34, 2); return; } - if (next === 61) { - this.finishOp(28, 2); + this.finishOp(30, 2); } else { - this.finishOp(47, 1); + this.finishOp(53, 1); } } - readToken_lt() { const { pos } = this.state; const next = this.input.charCodeAt(pos + 1); - if (next === 60) { if (this.input.charCodeAt(pos + 2) === 61) { - this.finishOp(28, 3); + this.finishOp(30, 3); return; } - - this.finishOp(46, 2); + this.finishOp(51, 2); return; } - if (next === 61) { - this.finishOp(45, 2); + this.finishOp(49, 2); return; } - - this.finishOp(43, 1); + this.finishOp(47, 1); } - readToken_gt() { const { pos } = this.state; const next = this.input.charCodeAt(pos + 1); - if (next === 62) { const size = this.input.charCodeAt(pos + 2) === 62 ? 3 : 2; - if (this.input.charCodeAt(pos + size) === 61) { - this.finishOp(28, size + 1); + this.finishOp(30, size + 1); return; } - - this.finishOp(46, size); + this.finishOp(52, size); return; } - if (next === 61) { - this.finishOp(45, 2); + this.finishOp(49, 2); return; } - - this.finishOp(44, 1); + this.finishOp(48, 1); } - readToken_eq_excl(code) { const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 61) { - this.finishOp(42, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); + this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2); return; } - if (code === 61 && next === 62) { this.state.pos += 2; this.finishToken(19); return; } - - this.finishOp(code === 61 ? 27 : 33, 1); + this.finishOp(code === 61 ? 29 : 35, 1); } - readToken_question() { const next = this.input.charCodeAt(this.state.pos + 1); const next2 = this.input.charCodeAt(this.state.pos + 2); - if (next === 63) { if (next2 === 61) { - this.finishOp(28, 3); + this.finishOp(30, 3); } else { - this.finishOp(36, 2); + this.finishOp(40, 2); } } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) { this.state.pos += 2; @@ -3258,73 +5096,63 @@ class Tokenizer extends ParserError { this.finishToken(17); } } - getTokenFromCode(code) { switch (code) { 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(this.state.pos, ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType); + throw this.raise(Errors.TupleExpressionBarIncorrectStartSyntaxType, { + at: 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(this.state.pos, ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType); + throw this.raise(Errors.RecordExpressionBarIncorrectStartSyntaxType, { + at: 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); @@ -3332,38 +5160,29 @@ class Tokenizer extends ParserError { ++this.state.pos; this.finishToken(14); } - return; - case 63: this.readToken_question(); return; - case 96: - ++this.state.pos; - this.finishToken(22); + this.readTemplateToken(); return; - case 48: { const next = this.input.charCodeAt(this.state.pos + 1); - if (next === 120 || next === 88) { this.readRadixNumber(16); return; } - if (next === 111 || next === 79) { this.readRadixNumber(8); return; } - if (next === 98 || next === 66) { this.readRadixNumber(2); return; } } - case 49: case 50: case 51: @@ -3375,100 +5194,85 @@ class Tokenizer extends ParserError { case 57: this.readNumber(false); return; - case 34: case 39: this.readString(code); return; - case 47: this.readToken_slash(); return; - case 37: case 42: this.readToken_mult_modulo(code); return; - case 124: case 38: this.readToken_pipe_amp(code); return; - case 94: this.readToken_caret(); return; - case 43: case 45: this.readToken_plus_min(code); return; - case 60: this.readToken_lt(); return; - case 62: this.readToken_gt(); return; - case 61: case 33: this.readToken_eq_excl(code); return; - case 126: - this.finishOp(34, 1); + this.finishOp(36, 1); return; - case 64: - ++this.state.pos; - this.finishToken(24); + this.readToken_atSign(); return; - case 35: this.readToken_numberSign(); return; - case 92: this.readWord(); return; - default: if (isIdentifierStart(code)) { this.readWord(code); return; } - } - - throw this.raise(this.state.pos, ErrorMessages.InvalidOrUnexpectedToken, String.fromCodePoint(code)); + throw this.raise(Errors.InvalidOrUnexpectedToken, { + at: this.state.curPosition(), + unexpected: String.fromCodePoint(code) + }); } - finishOp(type, size) { const str = this.input.slice(this.state.pos, this.state.pos + size); this.state.pos += size; this.finishToken(type, str); } - readRegexp() { + const startLoc = this.state.startLoc; const start = this.state.start + 1; let escaped, inClass; let { pos } = this.state; - for (;; ++pos) { if (pos >= this.length) { - throw this.raise(start, ErrorMessages.UnterminatedRegExp); + throw this.raise(Errors.UnterminatedRegExp, { + at: createPositionWithColumnOffset(startLoc, 1) + }); } - const ch = this.input.charCodeAt(pos); - if (isNewLine(ch)) { - throw this.raise(start, ErrorMessages.UnterminatedRegExp); + throw this.raise(Errors.UnterminatedRegExp, { + at: createPositionWithColumnOffset(startLoc, 1) + }); } - if (escaped) { escaped = false; } else { @@ -3479,942 +5283,678 @@ class Tokenizer extends ParserError { } else if (ch === 47 && !inClass) { break; } - escaped = ch === 92; } } - const content = this.input.slice(start, pos); ++pos; let mods = ""; - + const nextPos = () => createPositionWithColumnOffset(startLoc, pos + 2 - start); while (pos < this.length) { const cp = this.codePointAtPos(pos); const char = String.fromCharCode(cp); - if (VALID_REGEX_FLAGS.has(cp)) { + if (cp === 118) { + if (mods.includes("u")) { + this.raise(Errors.IncompatibleRegExpUVFlags, { + at: nextPos() + }); + } + } else if (cp === 117) { + if (mods.includes("v")) { + this.raise(Errors.IncompatibleRegExpUVFlags, { + at: nextPos() + }); + } + } if (mods.includes(char)) { - this.raise(pos + 1, ErrorMessages.DuplicateRegExpFlags); + this.raise(Errors.DuplicateRegExpFlags, { + at: nextPos() + }); } } else if (isIdentifierChar(cp) || cp === 92) { - this.raise(pos + 1, ErrorMessages.MalformedRegExpFlags); + this.raise(Errors.MalformedRegExpFlags, { + at: nextPos() + }); } else { break; } - ++pos; mods += char; } - this.state.pos = pos; - this.finishToken(127, { + this.finishToken(137, { pattern: content, flags: mods }); } - - readInt(radix, len, forceLen, allowNumSeparator = true) { - const start = this.state.pos; - const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct; - const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin; - let invalid = false; - let total = 0; - - for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) { - const code = this.input.charCodeAt(this.state.pos); - let val; - - if (code === 95) { - const prev = this.input.charCodeAt(this.state.pos - 1); - const next = this.input.charCodeAt(this.state.pos + 1); - - if (allowedSiblings.indexOf(next) === -1) { - this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator); - } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) { - this.raise(this.state.pos, ErrorMessages.UnexpectedNumericSeparator); - } - - if (!allowNumSeparator) { - this.raise(this.state.pos, ErrorMessages.NumericSeparatorInEscapeSequence); - } - - ++this.state.pos; - continue; - } - - if (code >= 97) { - val = code - 97 + 10; - } else if (code >= 65) { - val = code - 65 + 10; - } else if (_isDigit(code)) { - val = code - 48; - } else { - val = Infinity; - } - - if (val >= radix) { - if (this.options.errorRecovery && val <= 9) { - val = 0; - this.raise(this.state.start + i + 2, ErrorMessages.InvalidDigit, radix); - } else if (forceLen) { - val = 0; - invalid = true; - } else { - break; - } - } - - ++this.state.pos; - total = total * radix + val; - } - - if (this.state.pos === start || len != null && this.state.pos - start !== len || invalid) { - return null; - } - - return total; + readInt(radix, len, forceLen = false, allowNumSeparator = true) { + const { + n, + pos + } = readInt(this.input, this.state.pos, this.state.lineStart, this.state.curLine, radix, len, forceLen, allowNumSeparator, this.errorHandlers_readInt, false); + this.state.pos = pos; + return n; } - readRadixNumber(radix) { - const start = this.state.pos; + const startLoc = this.state.curPosition(); let isBigInt = false; this.state.pos += 2; const val = this.readInt(radix); - if (val == null) { - this.raise(this.state.start + 2, ErrorMessages.InvalidDigit, radix); + this.raise(Errors.InvalidDigit, { + at: createPositionWithColumnOffset(startLoc, 2), + radix + }); } - const next = this.input.charCodeAt(this.state.pos); - if (next === 110) { ++this.state.pos; isBigInt = true; } else if (next === 109) { - throw this.raise(start, ErrorMessages.InvalidDecimal); + throw this.raise(Errors.InvalidDecimal, { + at: startLoc + }); } - if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { - throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier); + throw this.raise(Errors.NumberIdentifier, { + at: this.state.curPosition() + }); } - if (isBigInt) { - const str = this.input.slice(start, this.state.pos).replace(/[_n]/g, ""); - this.finishToken(125, str); + const str = this.input.slice(startLoc.index, this.state.pos).replace(/[_n]/g, ""); + this.finishToken(135, str); return; } - - this.finishToken(124, val); + this.finishToken(134, val); } - readNumber(startsWithDot) { const start = this.state.pos; + const startLoc = this.state.curPosition(); let isFloat = false; let isBigInt = false; let isDecimal = false; let hasExponent = false; let isOctal = false; - if (!startsWithDot && this.readInt(10) === null) { - this.raise(start, ErrorMessages.InvalidNumber); + this.raise(Errors.InvalidNumber, { + at: this.state.curPosition() + }); } - const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48; - if (hasLeadingZero) { const integer = this.input.slice(start, this.state.pos); - this.recordStrictModeErrors(start, ErrorMessages.StrictOctalLiteral); - + this.recordStrictModeErrors(Errors.StrictOctalLiteral, { + at: startLoc + }); if (!this.state.strict) { const underscorePos = integer.indexOf("_"); - if (underscorePos > 0) { - this.raise(underscorePos + start, ErrorMessages.ZeroDigitNumericSeparator); + this.raise(Errors.ZeroDigitNumericSeparator, { + at: createPositionWithColumnOffset(startLoc, underscorePos) + }); } } - isOctal = hasLeadingZero && !/[89]/.test(integer); } - let next = this.input.charCodeAt(this.state.pos); - if (next === 46 && !isOctal) { ++this.state.pos; this.readInt(10); isFloat = true; next = this.input.charCodeAt(this.state.pos); } - if ((next === 69 || next === 101) && !isOctal) { next = this.input.charCodeAt(++this.state.pos); - if (next === 43 || next === 45) { ++this.state.pos; } - if (this.readInt(10) === null) { - this.raise(start, ErrorMessages.InvalidOrMissingExponent); + this.raise(Errors.InvalidOrMissingExponent, { + at: startLoc + }); } - isFloat = true; hasExponent = true; next = this.input.charCodeAt(this.state.pos); } - if (next === 110) { if (isFloat || hasLeadingZero) { - this.raise(start, ErrorMessages.InvalidBigIntLiteral); + this.raise(Errors.InvalidBigIntLiteral, { + at: startLoc + }); } - ++this.state.pos; isBigInt = true; } - if (next === 109) { - this.expectPlugin("decimal", this.state.pos); - + this.expectPlugin("decimal", this.state.curPosition()); if (hasExponent || hasLeadingZero) { - this.raise(start, ErrorMessages.InvalidDecimal); + this.raise(Errors.InvalidDecimal, { + at: startLoc + }); } - ++this.state.pos; isDecimal = true; } - if (isIdentifierStart(this.codePointAtPos(this.state.pos))) { - throw this.raise(this.state.pos, ErrorMessages.NumberIdentifier); + throw this.raise(Errors.NumberIdentifier, { + at: this.state.curPosition() + }); } - const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, ""); - if (isBigInt) { - this.finishToken(125, str); + this.finishToken(135, str); return; } - if (isDecimal) { - this.finishToken(126, str); + this.finishToken(136, str); return; } - const val = isOctal ? parseInt(str, 8) : parseFloat(str); - this.finishToken(124, val); + this.finishToken(134, val); } - readCodePoint(throwOnInvalid) { - const ch = this.input.charCodeAt(this.state.pos); - let code; - - if (ch === 123) { - const codePos = ++this.state.pos; - code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid); - ++this.state.pos; - - if (code !== null && code > 0x10ffff) { - if (throwOnInvalid) { - this.raise(codePos, ErrorMessages.InvalidCodePoint); - } else { - return null; - } - } - } else { - code = this.readHexChar(4, false, throwOnInvalid); - } - + const { + code, + pos + } = readCodePoint(this.input, this.state.pos, this.state.lineStart, this.state.curLine, throwOnInvalid, this.errorHandlers_readCodePoint); + this.state.pos = pos; return code; } - readString(quote) { - let out = "", - chunkStart = ++this.state.pos; - - for (;;) { - if (this.state.pos >= this.length) { - throw this.raise(this.state.start, ErrorMessages.UnterminatedString); - } - - const ch = this.input.charCodeAt(this.state.pos); - if (ch === quote) break; - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - out += this.readEscapedChar(false); - chunkStart = this.state.pos; - } else if (ch === 8232 || ch === 8233) { - ++this.state.pos; - ++this.state.curLine; - this.state.lineStart = this.state.pos; - } else if (isNewLine(ch)) { - throw this.raise(this.state.start, ErrorMessages.UnterminatedString); - } else { - ++this.state.pos; - } - } - - out += this.input.slice(chunkStart, this.state.pos++); - this.finishToken(123, out); + const { + str, + pos, + curLine, + lineStart + } = readStringContents(quote === 34 ? "double" : "single", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_string); + this.state.pos = pos + 1; + this.state.lineStart = lineStart; + this.state.curLine = curLine; + this.finishToken(133, str); } - - readTmplToken() { - let out = "", - chunkStart = this.state.pos, - containsInvalid = false; - - for (;;) { - if (this.state.pos >= this.length) { - throw this.raise(this.state.start, ErrorMessages.UnterminatedTemplate); - } - - const ch = this.input.charCodeAt(this.state.pos); - - if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) { - if (this.state.pos === this.state.start && this.match(20)) { - if (ch === 36) { - this.state.pos += 2; - this.finishToken(23); - return; - } else { - ++this.state.pos; - this.finishToken(22); - return; - } - } - - out += this.input.slice(chunkStart, this.state.pos); - this.finishToken(20, containsInvalid ? null : out); - return; - } - - if (ch === 92) { - out += this.input.slice(chunkStart, this.state.pos); - const escaped = this.readEscapedChar(true); - - if (escaped === null) { - containsInvalid = true; - } else { - out += escaped; - } - - chunkStart = this.state.pos; - } else if (isNewLine(ch)) { - out += this.input.slice(chunkStart, this.state.pos); - ++this.state.pos; - - switch (ch) { - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - out += "\n"; - break; - - default: - out += String.fromCharCode(ch); - break; - } - - ++this.state.curLine; - this.state.lineStart = this.state.pos; - chunkStart = this.state.pos; - } else { - ++this.state.pos; - } + readTemplateContinuation() { + if (!this.match(8)) { + this.unexpected(null, 8); } + this.state.pos--; + this.readTemplateToken(); } - - recordStrictModeErrors(pos, message) { - if (this.state.strict && !this.state.strictErrors.has(pos)) { - this.raise(pos, message); + readTemplateToken() { + const opening = this.input[this.state.pos]; + const { + str, + firstInvalidLoc, + pos, + curLine, + lineStart + } = readStringContents("template", this.input, this.state.pos + 1, this.state.lineStart, this.state.curLine, this.errorHandlers_readStringContents_template); + this.state.pos = pos + 1; + this.state.lineStart = lineStart; + this.state.curLine = curLine; + if (firstInvalidLoc) { + this.state.firstInvalidTemplateEscapePos = new Position(firstInvalidLoc.curLine, firstInvalidLoc.pos - firstInvalidLoc.lineStart, firstInvalidLoc.pos); + } + if (this.input.codePointAt(pos) === 96) { + this.finishToken(24, firstInvalidLoc ? null : opening + str + "`"); } else { - this.state.strictErrors.set(pos, message); + this.state.pos++; + this.finishToken(25, firstInvalidLoc ? null : opening + str + "${"); } } - - readEscapedChar(inTemplate) { - const throwOnInvalid = !inTemplate; - const ch = this.input.charCodeAt(++this.state.pos); - ++this.state.pos; - - switch (ch) { - case 110: - return "\n"; - - case 114: - return "\r"; - - case 120: - { - const code = this.readHexChar(2, false, throwOnInvalid); - return code === null ? null : String.fromCharCode(code); - } - - case 117: - { - const code = this.readCodePoint(throwOnInvalid); - return code === null ? null : String.fromCodePoint(code); - } - - case 116: - return "\t"; - - case 98: - return "\b"; - - case 118: - return "\u000b"; - - case 102: - return "\f"; - - case 13: - if (this.input.charCodeAt(this.state.pos) === 10) { - ++this.state.pos; - } - - case 10: - this.state.lineStart = this.state.pos; - ++this.state.curLine; - - case 8232: - case 8233: - return ""; - - case 56: - case 57: - if (inTemplate) { - return null; - } else { - this.recordStrictModeErrors(this.state.pos - 1, ErrorMessages.StrictNumericEscape); - } - - default: - if (ch >= 48 && ch <= 55) { - const codePos = this.state.pos - 1; - const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/); - let octalStr = match[0]; - let octal = parseInt(octalStr, 8); - - if (octal > 255) { - octalStr = octalStr.slice(0, -1); - octal = parseInt(octalStr, 8); - } - - this.state.pos += octalStr.length - 1; - const next = this.input.charCodeAt(this.state.pos); - - if (octalStr !== "0" || next === 56 || next === 57) { - if (inTemplate) { - return null; - } else { - this.recordStrictModeErrors(codePos, ErrorMessages.StrictNumericEscape); - } - } - - return String.fromCharCode(octal); - } - - return String.fromCharCode(ch); + recordStrictModeErrors(toParseError, { + at + }) { + const index = at.index; + if (this.state.strict && !this.state.strictErrors.has(index)) { + this.raise(toParseError, { + at + }); + } else { + this.state.strictErrors.set(index, [toParseError, at]); } } - - readHexChar(len, forceLen, throwOnInvalid) { - const codePos = this.state.pos; - const n = this.readInt(16, len, forceLen, false); - - if (n === null) { - if (throwOnInvalid) { - this.raise(codePos, ErrorMessages.InvalidEscapeSequence); - } else { - this.state.pos = codePos - 1; - } - } - - return n; - } - readWord1(firstCode) { this.state.containsEsc = false; let word = ""; const start = this.state.pos; let chunkStart = this.state.pos; - if (firstCode !== undefined) { this.state.pos += firstCode <= 0xffff ? 1 : 2; } - while (this.state.pos < this.length) { const ch = this.codePointAtPos(this.state.pos); - if (isIdentifierChar(ch)) { this.state.pos += ch <= 0xffff ? 1 : 2; } else if (ch === 92) { this.state.containsEsc = true; word += this.input.slice(chunkStart, this.state.pos); - const escStart = this.state.pos; + const escStart = this.state.curPosition(); const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar; - if (this.input.charCodeAt(++this.state.pos) !== 117) { - this.raise(this.state.pos, ErrorMessages.MissingUnicodeEscape); + this.raise(Errors.MissingUnicodeEscape, { + at: this.state.curPosition() + }); chunkStart = this.state.pos - 1; continue; } - ++this.state.pos; const esc = this.readCodePoint(true); - if (esc !== null) { if (!identifierCheck(esc)) { - this.raise(escStart, ErrorMessages.EscapedCharNotAnIdentifier); + this.raise(Errors.EscapedCharNotAnIdentifier, { + at: escStart + }); } - word += String.fromCodePoint(esc); } - chunkStart = this.state.pos; } else { break; } } - return word + this.input.slice(chunkStart, this.state.pos); } - readWord(firstCode) { const word = this.readWord1(firstCode); const type = keywords$1.get(word); - if (type !== undefined) { this.finishToken(type, tokenLabelName(type)); } else { - this.finishToken(122, word); + this.finishToken(132, word); } } - checkKeywordEscapes() { const { type } = this.state; - if (tokenIsKeyword(type) && this.state.containsEsc) { - this.raise(this.state.start, ErrorMessages.InvalidEscapedReservedWord, tokenLabelName(type)); + this.raise(Errors.InvalidEscapedReservedWord, { + at: this.state.startLoc, + reservedWord: tokenLabelName(type) + }); } } - - updateContext(prevType) { + raise(toParseError, raiseProperties) { const { - context, - type - } = this.state; - - switch (type) { - case 8: - context.pop(); - break; - - case 5: - case 7: - case 23: - context.push(types.brace); - break; - - case 22: - if (context[context.length - 1] === types.template) { - context.pop(); - } else { - context.push(types.template); - } - - break; + at + } = raiseProperties, + details = _objectWithoutPropertiesLoose(raiseProperties, _excluded); + const loc = at instanceof Position ? at : at.loc.start; + const error = toParseError({ + loc, + details + }); + if (!this.options.errorRecovery) throw error; + if (!this.isLookahead) this.state.errors.push(error); + return error; + } + raiseOverwrite(toParseError, raiseProperties) { + const { + at + } = raiseProperties, + details = _objectWithoutPropertiesLoose(raiseProperties, _excluded2); + const loc = at instanceof Position ? at : at.loc.start; + const pos = loc.index; + const errors = this.state.errors; + for (let i = errors.length - 1; i >= 0; i--) { + const error = errors[i]; + if (error.loc.index === pos) { + return errors[i] = toParseError({ + loc, + details + }); + } + if (error.loc.index < pos) break; + } + return this.raise(toParseError, raiseProperties); + } + updateContext(prevType) {} + unexpected(loc, type) { + throw this.raise(Errors.UnexpectedToken, { + expected: type ? tokenLabelName(type) : null, + at: loc != null ? loc : this.state.startLoc + }); + } + expectPlugin(pluginName, loc) { + if (this.hasPlugin(pluginName)) { + return true; + } + throw this.raise(Errors.MissingPlugin, { + at: loc != null ? loc : this.state.startLoc, + missingPlugin: [pluginName] + }); + } + expectOnePlugin(pluginNames) { + if (!pluginNames.some(name => this.hasPlugin(name))) { + throw this.raise(Errors.MissingOneOfPlugins, { + at: this.state.startLoc, + missingPlugin: pluginNames + }); } } - + errorBuilder(error) { + return (pos, lineStart, curLine) => { + this.raise(error, { + at: buildPosition(pos, lineStart, curLine) + }); + }; + } } - class ClassScope { constructor() { this.privateNames = new Set(); this.loneAccessors = new Map(); this.undefinedPrivateNames = new Map(); } - } class ClassScopeHandler { - constructor(raise) { + constructor(parser) { + this.parser = void 0; this.stack = []; this.undefinedPrivateNames = new Map(); - this.raise = raise; + this.parser = parser; } - current() { return this.stack[this.stack.length - 1]; } - enter() { this.stack.push(new ClassScope()); } - exit() { const oldClassScope = this.stack.pop(); const current = this.current(); - - for (const [name, pos] of Array.from(oldClassScope.undefinedPrivateNames)) { + for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) { if (current) { if (!current.undefinedPrivateNames.has(name)) { - current.undefinedPrivateNames.set(name, pos); + current.undefinedPrivateNames.set(name, loc); } } else { - this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name); + this.parser.raise(Errors.InvalidPrivateFieldResolution, { + at: loc, + identifierName: name + }); } } } - - declarePrivateName(name, elementType, pos) { - const classScope = this.current(); - let redefined = classScope.privateNames.has(name); - - if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) { - const accessor = redefined && classScope.loneAccessors.get(name); - + declarePrivateName(name, elementType, loc) { + const { + privateNames, + loneAccessors, + undefinedPrivateNames + } = this.current(); + let redefined = privateNames.has(name); + if (elementType & 3) { + const accessor = redefined && loneAccessors.get(name); if (accessor) { - const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC; - const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC; - const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR; - const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR; + const oldStatic = accessor & 4; + const newStatic = elementType & 4; + const oldKind = accessor & 3; + const newKind = elementType & 3; redefined = oldKind === newKind || oldStatic !== newStatic; - if (!redefined) classScope.loneAccessors.delete(name); + if (!redefined) loneAccessors.delete(name); } else if (!redefined) { - classScope.loneAccessors.set(name, elementType); + loneAccessors.set(name, elementType); } } - if (redefined) { - this.raise(pos, ErrorMessages.PrivateNameRedeclaration, name); + this.parser.raise(Errors.PrivateNameRedeclaration, { + at: loc, + identifierName: name + }); } - - classScope.privateNames.add(name); - classScope.undefinedPrivateNames.delete(name); + privateNames.add(name); + undefinedPrivateNames.delete(name); } - - usePrivateName(name, pos) { + usePrivateName(name, loc) { let classScope; - for (classScope of this.stack) { if (classScope.privateNames.has(name)) return; } - if (classScope) { - classScope.undefinedPrivateNames.set(name, pos); + classScope.undefinedPrivateNames.set(name, loc); } else { - this.raise(pos, ErrorMessages.InvalidPrivateFieldResolution, name); + this.parser.raise(Errors.InvalidPrivateFieldResolution, { + at: loc, + identifierName: name + }); } } - } - -const kExpression = 0, - kMaybeArrowParameterDeclaration = 1, - kMaybeAsyncArrowParameterDeclaration = 2, - kParameterDeclaration = 3; - class ExpressionScope { - constructor(type = kExpression) { - this.type = void 0; + constructor(type = 0) { this.type = type; } - canBeArrowParameterDeclaration() { - return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration; + return this.type === 2 || this.type === 1; } - isCertainlyParameterDeclaration() { - return this.type === kParameterDeclaration; + return this.type === 3; } - } - class ArrowHeadParsingScope extends ExpressionScope { constructor(type) { super(type); - this.errors = new Map(); + this.declarationErrors = new Map(); } - - recordDeclarationError(pos, template) { - this.errors.set(pos, template); + recordDeclarationError(ParsingErrorClass, { + at + }) { + const index = at.index; + this.declarationErrors.set(index, [ParsingErrorClass, at]); } - - clearDeclarationError(pos) { - this.errors.delete(pos); + clearDeclarationError(index) { + this.declarationErrors.delete(index); } - iterateErrors(iterator) { - this.errors.forEach(iterator); + this.declarationErrors.forEach(iterator); } - } - class ExpressionScopeHandler { - constructor(raise) { + constructor(parser) { + this.parser = void 0; this.stack = [new ExpressionScope()]; - this.raise = raise; + this.parser = parser; } - enter(scope) { this.stack.push(scope); } - exit() { this.stack.pop(); } - - recordParameterInitializerError(pos, template) { + recordParameterInitializerError(toParseError, { + at: node + }) { + const origin = { + at: node.loc.start + }; const { stack } = this; let i = stack.length - 1; let scope = stack[i]; - while (!scope.isCertainlyParameterDeclaration()) { if (scope.canBeArrowParameterDeclaration()) { - scope.recordDeclarationError(pos, template); + scope.recordDeclarationError(toParseError, origin); } else { return; } - scope = stack[--i]; } - - this.raise(pos, template); + this.parser.raise(toParseError, origin); } - - recordParenthesizedIdentifierError(pos, template) { + recordArrowParameterBindingError(error, { + at: node + }) { const { stack } = this; const scope = stack[stack.length - 1]; - + const origin = { + at: node.loc.start + }; if (scope.isCertainlyParameterDeclaration()) { - this.raise(pos, template); + this.parser.raise(error, origin); } else if (scope.canBeArrowParameterDeclaration()) { - scope.recordDeclarationError(pos, template); + scope.recordDeclarationError(error, origin); } else { return; } } - - recordAsyncArrowParametersError(pos, template) { + recordAsyncArrowParametersError({ + at + }) { const { stack } = this; let i = stack.length - 1; let scope = stack[i]; - while (scope.canBeArrowParameterDeclaration()) { - if (scope.type === kMaybeAsyncArrowParameterDeclaration) { - scope.recordDeclarationError(pos, template); + if (scope.type === 2) { + scope.recordDeclarationError(Errors.AwaitBindingIdentifier, { + at + }); } - scope = stack[--i]; } } - validateAsPattern() { const { stack } = this; const currentScope = stack[stack.length - 1]; if (!currentScope.canBeArrowParameterDeclaration()) return; - currentScope.iterateErrors((template, pos) => { - this.raise(pos, template); + currentScope.iterateErrors(([toParseError, loc]) => { + this.parser.raise(toParseError, { + at: loc + }); let i = stack.length - 2; let scope = stack[i]; - while (scope.canBeArrowParameterDeclaration()) { - scope.clearDeclarationError(pos); + scope.clearDeclarationError(loc.index); scope = stack[--i]; } }); } - } function newParameterDeclarationScope() { - return new ExpressionScope(kParameterDeclaration); + return new ExpressionScope(3); } function newArrowHeadScope() { - return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration); + return new ArrowHeadParsingScope(1); } function newAsyncArrowScope() { - return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration); + return new ArrowHeadParsingScope(2); } function newExpressionScope() { return new ExpressionScope(); } - -const PARAM = 0b0000, - PARAM_YIELD = 0b0001, - PARAM_AWAIT = 0b0010, - PARAM_RETURN = 0b0100, - PARAM_IN = 0b1000; class ProductionParameterHandler { constructor() { this.stacks = []; } - enter(flags) { this.stacks.push(flags); } - exit() { this.stacks.pop(); } - currentFlags() { return this.stacks[this.stacks.length - 1]; } - get hasAwait() { - return (this.currentFlags() & PARAM_AWAIT) > 0; + return (this.currentFlags() & 2) > 0; } - get hasYield() { - return (this.currentFlags() & PARAM_YIELD) > 0; + return (this.currentFlags() & 1) > 0; } - get hasReturn() { - return (this.currentFlags() & PARAM_RETURN) > 0; + return (this.currentFlags() & 4) > 0; } - get hasIn() { - return (this.currentFlags() & PARAM_IN) > 0; + return (this.currentFlags() & 8) > 0; } - } function functionFlags(isAsync, isGenerator) { - return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0); + return (isAsync ? 2 : 0) | (isGenerator ? 1 : 0); } - class UtilParser extends Tokenizer { - addExtra(node, key, val) { + addExtra(node, key, value, enumerable = true) { if (!node) return; const extra = node.extra = node.extra || {}; - extra[key] = val; + if (enumerable) { + extra[key] = value; + } else { + Object.defineProperty(extra, key, { + enumerable, + value + }); + } } - isContextual(token) { return this.state.type === token && !this.state.containsEsc; } - isUnparsedContextual(nameStart, name) { const nameEnd = nameStart + name.length; - if (this.input.slice(nameStart, nameEnd) === name) { const nextCh = this.input.charCodeAt(nameEnd); return !(isIdentifierChar(nextCh) || (nextCh & 0xfc00) === 0xd800); } - return false; } - isLookaheadContextual(name) { const next = this.nextTokenStart(); return this.isUnparsedContextual(next, name); } - eatContextual(token) { if (this.isContextual(token)) { this.next(); return true; } - return false; } - - expectContextual(token, template) { - if (!this.eatContextual(token)) this.unexpected(null, template); + expectContextual(token, toParseError) { + if (!this.eatContextual(token)) { + if (toParseError != null) { + throw this.raise(toParseError, { + at: this.state.startLoc + }); + } + this.unexpected(null, token); + } } - canInsertSemicolon() { - return this.match(129) || this.match(8) || this.hasPrecedingLineBreak(); + return this.match(139) || this.match(8) || this.hasPrecedingLineBreak(); } - hasPrecedingLineBreak() { - return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start)); + return lineBreak.test(this.input.slice(this.state.lastTokEndLoc.index, this.state.start)); } - hasFollowingLineBreak() { skipWhiteSpaceToLineBreak.lastIndex = this.state.end; return skipWhiteSpaceToLineBreak.test(this.input); } - isLineTerminator() { return this.eat(13) || this.canInsertSemicolon(); } - semicolon(allowAsi = true) { if (allowAsi ? this.isLineTerminator() : this.eat(13)) return; - this.raise(this.state.lastTokEnd, ErrorMessages.MissingSemicolon); + this.raise(Errors.MissingSemicolon, { + at: this.state.lastTokEndLoc + }); } - - expect(type, pos) { - this.eat(type) || this.unexpected(pos, type); + expect(type, loc) { + this.eat(type) || this.unexpected(loc, type); } - - assertNoSpace(message = "Unexpected space.") { - if (this.state.start > this.state.lastTokEnd) { - this.raise(this.state.lastTokEnd, { - code: ErrorCodes.SyntaxError, - reasonCode: "UnexpectedSpace", - template: message - }); - } - } - - unexpected(pos, messageOrType = { - code: ErrorCodes.SyntaxError, - reasonCode: "UnexpectedToken", - template: "Unexpected token" - }) { - if (isTokenType(messageOrType)) { - messageOrType = { - code: ErrorCodes.SyntaxError, - reasonCode: "UnexpectedToken", - template: `Unexpected token, expected "${tokenLabelName(messageOrType)}"` - }; - } - - throw this.raise(pos != null ? pos : this.state.start, messageOrType); - } - - expectPlugin(name, pos) { - if (!this.hasPlugin(name)) { - throw this.raiseWithData(pos != null ? pos : this.state.start, { - missingPlugin: [name] - }, `This experimental syntax requires enabling the parser plugin: '${name}'`); - } - - return true; - } - - expectOnePlugin(names, pos) { - if (!names.some(n => this.hasPlugin(n))) { - throw this.raiseWithData(pos != null ? pos : this.state.start, { - missingPlugin: names - }, `This experimental syntax requires enabling one of the following parser plugin(s): '${names.join(", ")}'`); - } - } - tryParse(fn, oldState = this.state.clone()) { const abortSignal = { node: null }; - try { const node = fn((node = null) => { abortSignal.node = node; throw abortSignal; }); - if (this.state.errors.length > oldState.errors.length) { const failState = this.state; this.state = oldState; @@ -4427,7 +5967,6 @@ class UtilParser extends Tokenizer { failState }; } - return { node, error: null, @@ -4438,7 +5977,6 @@ class UtilParser extends Tokenizer { } catch (error) { const failState = this.state; this.state = oldState; - if (error instanceof SyntaxError) { return { node: null, @@ -4448,7 +5986,6 @@ class UtilParser extends Tokenizer { failState }; } - if (error === abortSignal) { return { node: abortSignal.node, @@ -4458,65 +5995,58 @@ class UtilParser extends Tokenizer { failState }; } - throw error; } } - checkExpressionErrors(refExpressionErrors, andThrow) { if (!refExpressionErrors) return false; const { - shorthandAssign, - doubleProto, - optionalParameters + shorthandAssignLoc, + doubleProtoLoc, + privateKeyLoc, + optionalParametersLoc } = refExpressionErrors; - const hasErrors = shorthandAssign + doubleProto + optionalParameters > -3; - + const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc; if (!andThrow) { return hasErrors; - } else if (hasErrors) { - if (shorthandAssign >= 0) { - this.unexpected(shorthandAssign); - } - - if (doubleProto >= 0) { - this.raise(doubleProto, ErrorMessages.DuplicateProto); - } - - if (optionalParameters >= 0) { - this.unexpected(optionalParameters); - } + } + if (shorthandAssignLoc != null) { + this.raise(Errors.InvalidCoverInitializedName, { + at: shorthandAssignLoc + }); + } + if (doubleProtoLoc != null) { + this.raise(Errors.DuplicateProto, { + at: doubleProtoLoc + }); + } + if (privateKeyLoc != null) { + this.raise(Errors.UnexpectedPrivateField, { + at: privateKeyLoc + }); + } + if (optionalParametersLoc != null) { + this.unexpected(optionalParametersLoc); } } - isLiteralPropertyName() { return tokenIsLiteralPropertyName(this.state.type); } - isPrivateName(node) { return node.type === "PrivateName"; } - getPrivateNameSV(node) { return node.id.name; } - hasPropertyAsPrivateName(node) { return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property); } - - isOptionalChain(node) { - return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression"; - } - isObjectProperty(node) { return node.type === "ObjectProperty"; } - isObjectMethod(node) { return node.type === "ObjectMethod"; } - initializeScopes(inModule = this.options.sourceType === "module") { const oldLabels = this.state.labels; this.state.labels = []; @@ -4526,13 +6056,13 @@ class UtilParser extends Tokenizer { this.inModule = inModule; const oldScope = this.scope; const ScopeHandler = this.getScopeHandler(); - this.scope = new ScopeHandler(this.raise.bind(this), this.inModule); + this.scope = new ScopeHandler(this, inModule); const oldProdParam = this.prodParam; this.prodParam = new ProductionParameterHandler(); const oldClassScope = this.classScope; - this.classScope = new ClassScopeHandler(this.raise.bind(this)); + this.classScope = new ClassScopeHandler(this); const oldExpressionScope = this.expressionScope; - this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this)); + this.expressionScope = new ExpressionScopeHandler(this); return () => { this.state.labels = oldLabels; this.exportedIdentifiers = oldExportedIdentifiers; @@ -4543,29 +6073,32 @@ class UtilParser extends Tokenizer { this.expressionScope = oldExpressionScope; }; } - enterInitialScopes() { - let paramFlags = PARAM; - + let paramFlags = 0; if (this.inModule) { - paramFlags |= PARAM_AWAIT; + paramFlags |= 2; } - - this.scope.enter(SCOPE_PROGRAM); + this.scope.enter(1); this.prodParam.enter(paramFlags); } - + checkDestructuringPrivate(refExpressionErrors) { + const { + privateKeyLoc + } = refExpressionErrors; + if (privateKeyLoc !== null) { + this.expectPlugin("destructuringPrivate", privateKeyLoc); + } + } } class ExpressionErrors { constructor() { - this.shorthandAssign = -1; - this.doubleProto = -1; - this.optionalParameters = -1; + this.shorthandAssignLoc = null; + this.doubleProtoLoc = null; + this.privateKeyLoc = null; + this.optionalParametersLoc = null; } - } - -class Node { +let Node$5 = class Node { constructor(parser, pos, loc) { this.type = ""; this.start = pos; @@ -4574,31 +6107,24 @@ class Node { if (parser != null && parser.options.ranges) this.range = [pos, 0]; if (parser != null && parser.filename) this.loc.filename = parser.filename; } - -} - -const NodePrototype = Node.prototype; +}; +const NodePrototype = Node$5.prototype; { NodePrototype.__clone = function () { - const newNode = new Node(); + const newNode = new Node$5(undefined, this.start, this.loc.start); const keys = Object.keys(this); - for (let i = 0, length = keys.length; i < length; i++) { const key = keys[i]; - if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") { newNode[key] = this[key]; } } - return newNode; }; } - function clonePlaceholder(node) { return cloneIdentifier(node); } - function cloneIdentifier(node) { const { type, @@ -4617,11 +6143,9 @@ function cloneIdentifier(node) { cloned.range = range; cloned.extra = extra; cloned.name = name; - if (type === "Placeholder") { cloned.expectedNode = node.expectedNode; } - return cloned; } function cloneStringLiteral(node) { @@ -4633,86 +6157,113 @@ function cloneStringLiteral(node) { range, extra } = node; - if (type === "Placeholder") { return clonePlaceholder(node); } - const cloned = Object.create(NodePrototype); - cloned.type = "StringLiteral"; + cloned.type = type; cloned.start = start; cloned.end = end; cloned.loc = loc; cloned.range = range; - cloned.extra = extra; + if (node.raw !== undefined) { + cloned.raw = node.raw; + } else { + cloned.extra = extra; + } cloned.value = node.value; return cloned; } class NodeUtils extends UtilParser { startNode() { - return new Node(this, this.state.start, this.state.startLoc); + return new Node$5(this, this.state.start, this.state.startLoc); } - - startNodeAt(pos, loc) { - return new Node(this, pos, loc); + startNodeAt(loc) { + return new Node$5(this, loc.index, loc); } - startNodeAtNode(type) { - return this.startNodeAt(type.start, type.loc.start); + return this.startNodeAt(type.loc.start); } - finishNode(node, type) { - return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc); + return this.finishNodeAt(node, type, this.state.lastTokEndLoc); } - - finishNodeAt(node, type, pos, loc) { - + finishNodeAt(node, type, endLoc) { node.type = type; - node.end = pos; - node.loc.end = loc; - if (this.options.ranges) node.range[1] = pos; + node.end = endLoc.index; + node.loc.end = endLoc; + if (this.options.ranges) node.range[1] = endLoc.index; if (this.options.attachComment) this.processComment(node); return node; } - - resetStartLocation(node, start, startLoc) { - node.start = start; + resetStartLocation(node, startLoc) { + node.start = startLoc.index; node.loc.start = startLoc; - if (this.options.ranges) node.range[0] = start; + if (this.options.ranges) node.range[0] = startLoc.index; } - - resetEndLocation(node, end = this.state.lastTokEnd, endLoc = this.state.lastTokEndLoc) { - node.end = end; + resetEndLocation(node, endLoc = this.state.lastTokEndLoc) { + node.end = endLoc.index; node.loc.end = endLoc; - if (this.options.ranges) node.range[1] = end; + if (this.options.ranges) node.range[1] = endLoc.index; } - resetStartLocationFromNode(node, locationNode) { - this.resetStartLocation(node, locationNode.start, locationNode.loc.start); + this.resetStartLocation(node, locationNode.loc.start); } - } - const reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]); -const FlowErrors = makeErrorTemplates({ +const FlowErrors = ParseErrorEnum`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: "Cannot overwrite reserved type %0.", + AssignReservedType: ({ + reservedType + }) => `Cannot overwrite reserved type ${reservedType}.`, 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: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.", - EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.", - EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.", - EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.", - EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.", - EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.", - EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.", - EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.", - EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.", - EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.", - EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.", + EnumBooleanMemberNotInitialized: ({ + memberName, + enumName + }) => `Boolean enum members need to be initialized. Use either \`${memberName} = true,\` or \`${memberName} = false,\` in enum \`${enumName}\`.`, + EnumDuplicateMemberName: ({ + memberName, + enumName + }) => `Enum member names need to be unique, but the name \`${memberName}\` has already been used before in enum \`${enumName}\`.`, + EnumInconsistentMemberValues: ({ + enumName + }) => `Enum \`${enumName}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`, + EnumInvalidExplicitType: ({ + invalidEnumType, + enumName + }) => `Enum type \`${invalidEnumType}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, + EnumInvalidExplicitTypeUnknownSupplied: ({ + enumName + }) => `Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${enumName}\`.`, + EnumInvalidMemberInitializerPrimaryType: ({ + enumName, + memberName, + explicitType + }) => `Enum \`${enumName}\` has type \`${explicitType}\`, so the initializer of \`${memberName}\` needs to be a ${explicitType} literal.`, + EnumInvalidMemberInitializerSymbolType: ({ + enumName, + memberName + }) => `Symbol enum members cannot be initialized. Use \`${memberName},\` in enum \`${enumName}\`.`, + EnumInvalidMemberInitializerUnknownType: ({ + enumName, + memberName + }) => `The enum member initializer for \`${memberName}\` needs to be a literal (either a boolean, number, or string) in enum \`${enumName}\`.`, + EnumInvalidMemberName: ({ + enumName, + memberName, + suggestion + }) => `Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${memberName}\`, consider using \`${suggestion}\`, in enum \`${enumName}\`.`, + EnumNumberMemberNotInitialized: ({ + enumName, + memberName + }) => `Number enum members need to be initialized, e.g. \`${memberName} = 1\` in enum \`${enumName}\`.`, + EnumStringMemberInconsistentlyInitialized: ({ + enumName + }) => `String enum members need to consistently either all use initializers, or use no initializers, in enum \`${enumName}\`.`, 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.", @@ -4721,7 +6272,11 @@ const FlowErrors = makeErrorTemplates({ 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: "A binding pattern parameter cannot be optional in an implementation signature.", + 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.", @@ -4732,82 +6287,69 @@ const FlowErrors = makeErrorTemplates({ 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: "Unexpected reserved type %0.", + UnexpectedReservedType: ({ + reservedType + }) => `Unexpected reserved type ${reservedType}.`, 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: "`declare export %0` is not supported. Use `%1` instead.", + UnsupportedDeclareExportKind: ({ + unsupportedExportKind, + suggestion + }) => `\`declare export ${unsupportedExportKind}\` is not supported. Use \`${suggestion}\` instead.`, UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.", UnterminatedFlowComment: "Unterminated flow-comment." -}, ErrorCodes.SyntaxError, "flow"); - +}); function isEsModuleType(bodyElement) { return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration"); } - function hasTypeImportKind(node) { return node.importKind === "type" || node.importKind === "typeof"; } - -function isMaybeDefaultImport(type) { - return tokenIsKeywordOrIdentifier(type) && type !== 91; -} - const exportSuggestions = { const: "declare export var", let: "declare export var", type: "export type", interface: "export interface" }; - function partition(list, test) { const list1 = []; const list2 = []; - for (let i = 0; i < list.length; i++) { (test(list[i], i, list) ? list1 : list2).push(list[i]); } - return [list1, list2]; } - const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/; -var flow = (superClass => class extends superClass { +var flow = superClass => class FlowParserMixin extends superClass { constructor(...args) { super(...args); this.flowPragma = undefined; } - getScopeHandler() { return FlowScopeHandler; } - shouldParseTypes() { return this.getPluginOption("flow", "all") || this.flowPragma === "flow"; } - shouldParseEnums() { return !!this.getPluginOption("flow", "enums"); } - finishToken(type, val) { - if (type !== 123 && type !== 13 && type !== 26) { + if (type !== 133 && type !== 13 && type !== 28) { if (this.flowPragma === undefined) { this.flowPragma = null; } } - - return super.finishToken(type, val); + super.finishToken(type, val); } - addComment(comment) { if (this.flowPragma === undefined) { const matches = FLOW_PRAGMA_REGEX.exec(comment.value); - - if (!matches) ; else if (matches[1] === "flow") { + if (!matches) ;else if (matches[1] === "flow") { this.flowPragma = "flow"; } else if (matches[1] === "noflow") { this.flowPragma = "noflow"; @@ -4815,10 +6357,8 @@ var flow = (superClass => class extends superClass { throw new Error("Unexpected flow pragma"); } } - - return super.addComment(comment); + super.addComment(comment); } - flowParseTypeInitialiser(tok) { const oldInType = this.state.inType; this.state.inType = true; @@ -4827,66 +6367,57 @@ var flow = (superClass => class extends superClass { this.state.inType = oldInType; return type; } - flowParsePredicate() { const node = this.startNode(); - const moduloPos = this.state.start; + const moduloLoc = this.state.startLoc; this.next(); - this.expectContextual(101); - - if (this.state.lastTokStart > moduloPos + 1) { - this.raise(moduloPos, FlowErrors.UnexpectedSpaceBetweenModuloChecks); + this.expectContextual(110); + if (this.state.lastTokStart > moduloLoc.index + 1) { + this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, { + at: moduloLoc + }); } - if (this.eat(10)) { - node.value = this.parseExpression(); + node.value = super.parseExpression(); this.expect(11); return this.finishNode(node, "DeclaredPredicate"); } else { return this.finishNode(node, "InferredPredicate"); } } - flowParseTypeAndPredicateInitialiser() { const oldInType = this.state.inType; this.state.inType = true; this.expect(14); let type = null; let predicate = null; - - if (this.match(48)) { + if (this.match(54)) { this.state.inType = oldInType; predicate = this.flowParsePredicate(); } else { type = this.flowParseType(); this.state.inType = oldInType; - - if (this.match(48)) { + if (this.match(54)) { predicate = this.flowParsePredicate(); } } - return [type, predicate]; } - flowParseDeclareClass(node) { this.next(); this.flowParseInterfaceish(node, true); return this.finishNode(node, "DeclareClass"); } - flowParseDeclareFunction(node) { this.next(); const id = node.id = this.parseIdentifier(); const typeNode = this.startNode(); const typeContainer = this.startNode(); - - if (this.match(43)) { + if (this.match(47)) { typeNode.typeParameters = this.flowParseTypeParameterDeclaration(); } else { typeNode.typeParameters = null; } - this.expect(10); const tmp = this.flowParseFunctionTypeParams(); typeNode.params = tmp.params; @@ -4898,80 +6429,72 @@ var flow = (superClass => class extends superClass { id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation"); this.resetEndLocation(id); this.semicolon(); - this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.start); + this.scope.declareName(node.id.name, 2048, node.id.loc.start); return this.finishNode(node, "DeclareFunction"); } - flowParseDeclare(node, insideModule) { - if (this.match(74)) { + if (this.match(80)) { return this.flowParseDeclareClass(node); - } else if (this.match(62)) { - return this.flowParseDeclareFunction(node); } else if (this.match(68)) { + return this.flowParseDeclareFunction(node); + } else if (this.match(74)) { return this.flowParseDeclareVariable(node); - } else if (this.eatContextual(117)) { + } else if (this.eatContextual(127)) { if (this.match(16)) { return this.flowParseDeclareModuleExports(node); } else { if (insideModule) { - this.raise(this.state.lastTokStart, FlowErrors.NestedDeclareModule); + this.raise(FlowErrors.NestedDeclareModule, { + at: this.state.lastTokStartLoc + }); } - return this.flowParseDeclareModule(node); } - } else if (this.isContextual(120)) { + } else if (this.isContextual(130)) { return this.flowParseDeclareTypeAlias(node); - } else if (this.isContextual(121)) { + } else if (this.isContextual(131)) { return this.flowParseDeclareOpaqueType(node); - } else if (this.isContextual(119)) { + } else if (this.isContextual(129)) { return this.flowParseDeclareInterface(node); - } else if (this.match(76)) { + } else if (this.match(82)) { return this.flowParseDeclareExportDeclaration(node, insideModule); } else { - throw this.unexpected(); + this.unexpected(); } } - flowParseDeclareVariable(node) { this.next(); node.id = this.flowParseTypeAnnotatableIdentifier(true); - this.scope.declareName(node.id.name, BIND_VAR, node.id.start); + this.scope.declareName(node.id.name, 5, node.id.loc.start); this.semicolon(); return this.finishNode(node, "DeclareVariable"); } - flowParseDeclareModule(node) { - this.scope.enter(SCOPE_OTHER); - - if (this.match(123)) { - node.id = this.parseExprAtom(); + this.scope.enter(0); + if (this.match(133)) { + node.id = super.parseExprAtom(); } else { node.id = this.parseIdentifier(); } - const bodyNode = node.body = this.startNode(); const body = bodyNode.body = []; this.expect(5); - while (!this.match(8)) { let bodyNode = this.startNode(); - - if (this.match(77)) { + if (this.match(83)) { this.next(); - - if (!this.isContextual(120) && !this.match(81)) { - this.raise(this.state.lastTokStart, FlowErrors.InvalidNonTypeImportInDeclareModule); + if (!this.isContextual(130) && !this.match(87)) { + this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, { + at: this.state.lastTokStartLoc + }); } - - this.parseImport(bodyNode); + super.parseImport(bodyNode); } else { - this.expectContextual(115, FlowErrors.UnsupportedStatementInDeclareModule); + this.expectContextual(125, FlowErrors.UnsupportedStatementInDeclareModule); bodyNode = this.flowParseDeclare(bodyNode, true); } - body.push(bodyNode); } - this.scope.exit(); this.expect(8); this.finishNode(bodyNode, "BlockStatement"); @@ -4980,19 +6503,22 @@ var flow = (superClass => class extends superClass { body.forEach(bodyElement => { if (isEsModuleType(bodyElement)) { if (kind === "CommonJS") { - this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind); + this.raise(FlowErrors.AmbiguousDeclareModuleKind, { + at: bodyElement + }); } - kind = "ES"; } else if (bodyElement.type === "DeclareModuleExports") { if (hasModuleExport) { - this.raise(bodyElement.start, FlowErrors.DuplicateDeclareModuleExports); + this.raise(FlowErrors.DuplicateDeclareModuleExports, { + at: bodyElement + }); } - if (kind === "ES") { - this.raise(bodyElement.start, FlowErrors.AmbiguousDeclareModuleKind); + this.raise(FlowErrors.AmbiguousDeclareModuleKind, { + at: bodyElement + }); } - kind = "CommonJS"; hasModuleExport = true; } @@ -5000,112 +6526,95 @@ var flow = (superClass => class extends superClass { node.kind = kind || "CommonJS"; return this.finishNode(node, "DeclareModule"); } - flowParseDeclareExportDeclaration(node, insideModule) { - this.expect(76); - - if (this.eat(59)) { - if (this.match(62) || this.match(74)) { + this.expect(82); + if (this.eat(65)) { + if (this.match(68) || this.match(80)) { node.declaration = this.flowParseDeclare(this.startNode()); } else { node.declaration = this.flowParseType(); this.semicolon(); } - node.default = true; return this.finishNode(node, "DeclareExportDeclaration"); } else { - if (this.match(69) || this.isLet() || (this.isContextual(120) || this.isContextual(119)) && !insideModule) { + if (this.match(75) || this.isLet() || (this.isContextual(130) || this.isContextual(129)) && !insideModule) { const label = this.state.value; - const suggestion = exportSuggestions[label]; - throw this.raise(this.state.start, FlowErrors.UnsupportedDeclareExportKind, label, suggestion); + throw this.raise(FlowErrors.UnsupportedDeclareExportKind, { + at: this.state.startLoc, + unsupportedExportKind: label, + suggestion: exportSuggestions[label] + }); } - - if (this.match(68) || this.match(62) || this.match(74) || this.isContextual(121)) { + if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(131)) { node.declaration = this.flowParseDeclare(this.startNode()); node.default = false; return this.finishNode(node, "DeclareExportDeclaration"); - } else if (this.match(49) || this.match(5) || this.isContextual(119) || this.isContextual(120) || this.isContextual(121)) { - node = this.parseExport(node); - + } else if (this.match(55) || this.match(5) || this.isContextual(129) || this.isContextual(130) || this.isContextual(131)) { + node = this.parseExport(node, null); if (node.type === "ExportNamedDeclaration") { node.type = "ExportDeclaration"; node.default = false; delete node.exportKind; } - node.type = "Declare" + node.type; return node; } } - - throw this.unexpected(); + this.unexpected(); } - flowParseDeclareModuleExports(node) { this.next(); - this.expectContextual(102); + this.expectContextual(111); node.typeAnnotation = this.flowParseTypeAnnotation(); this.semicolon(); return this.finishNode(node, "DeclareModuleExports"); } - flowParseDeclareTypeAlias(node) { this.next(); - this.flowParseTypeAlias(node); - node.type = "DeclareTypeAlias"; - return node; + const finished = this.flowParseTypeAlias(node); + finished.type = "DeclareTypeAlias"; + return finished; } - flowParseDeclareOpaqueType(node) { this.next(); - this.flowParseOpaqueType(node, true); - node.type = "DeclareOpaqueType"; - return node; + const finished = this.flowParseOpaqueType(node, true); + finished.type = "DeclareOpaqueType"; + return finished; } - flowParseDeclareInterface(node) { this.next(); - this.flowParseInterfaceish(node); + this.flowParseInterfaceish(node, false); return this.finishNode(node, "DeclareInterface"); } - - flowParseInterfaceish(node, isClass = false) { + flowParseInterfaceish(node, isClass) { node.id = this.flowParseRestrictedIdentifier(!isClass, true); - this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION : BIND_LEXICAL, node.id.start); - - if (this.match(43)) { + this.scope.declareName(node.id.name, isClass ? 17 : 8201, node.id.loc.start); + if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } else { node.typeParameters = null; } - node.extends = []; - node.implements = []; - node.mixins = []; - - if (this.eat(75)) { + if (this.eat(81)) { do { node.extends.push(this.flowParseInterfaceExtends()); } while (!isClass && this.eat(12)); } - - if (this.isContextual(108)) { - this.next(); - - do { - node.mixins.push(this.flowParseInterfaceExtends()); - } while (this.eat(12)); + if (isClass) { + node.implements = []; + node.mixins = []; + if (this.eatContextual(117)) { + do { + node.mixins.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } + if (this.eatContextual(113)) { + do { + node.implements.push(this.flowParseInterfaceExtends()); + } while (this.eat(12)); + } } - - if (this.isContextual(104)) { - this.next(); - - do { - node.implements.push(this.flowParseInterfaceExtends()); - } while (this.eat(12)); - } - node.body = this.flowParseObjectType({ allowStatic: isClass, allowExact: false, @@ -5114,190 +6623,159 @@ var flow = (superClass => class extends superClass { allowInexact: false }); } - flowParseInterfaceExtends() { const node = this.startNode(); node.id = this.flowParseQualifiedTypeIdentifier(); - - if (this.match(43)) { + if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterInstantiation(); } else { node.typeParameters = null; } - return this.finishNode(node, "InterfaceExtends"); } - flowParseInterface(node) { - this.flowParseInterfaceish(node); + this.flowParseInterfaceish(node, false); return this.finishNode(node, "InterfaceDeclaration"); } - checkNotUnderscore(word) { if (word === "_") { - this.raise(this.state.start, FlowErrors.UnexpectedReservedUnderscore); + this.raise(FlowErrors.UnexpectedReservedUnderscore, { + at: this.state.startLoc + }); } } - checkReservedType(word, startLoc, declaration) { if (!reservedTypes.has(word)) return; - this.raise(startLoc, declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, word); + this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, { + at: startLoc, + reservedType: word + }); } - flowParseRestrictedIdentifier(liberal, declaration) { - this.checkReservedType(this.state.value, this.state.start, declaration); + this.checkReservedType(this.state.value, this.state.startLoc, declaration); return this.parseIdentifier(liberal); } - flowParseTypeAlias(node) { node.id = this.flowParseRestrictedIdentifier(false, true); - this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); - - if (this.match(43)) { + this.scope.declareName(node.id.name, 8201, node.id.loc.start); + if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } else { node.typeParameters = null; } - - node.right = this.flowParseTypeInitialiser(27); + node.right = this.flowParseTypeInitialiser(29); this.semicolon(); return this.finishNode(node, "TypeAlias"); } - flowParseOpaqueType(node, declare) { - this.expectContextual(120); + this.expectContextual(130); node.id = this.flowParseRestrictedIdentifier(true, true); - this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.start); - - if (this.match(43)) { + this.scope.declareName(node.id.name, 8201, node.id.loc.start); + if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } else { node.typeParameters = null; } - node.supertype = null; - if (this.match(14)) { node.supertype = this.flowParseTypeInitialiser(14); } - node.impltype = null; - if (!declare) { - node.impltype = this.flowParseTypeInitialiser(27); + node.impltype = this.flowParseTypeInitialiser(29); } - this.semicolon(); return this.finishNode(node, "OpaqueType"); } - flowParseTypeParameter(requireDefault = false) { - const nodeStart = this.state.start; + const nodeStartLoc = this.state.startLoc; const node = this.startNode(); const variance = this.flowParseVariance(); const ident = this.flowParseTypeAnnotatableIdentifier(); node.name = ident.name; node.variance = variance; node.bound = ident.typeAnnotation; - - if (this.match(27)) { - this.eat(27); + if (this.match(29)) { + this.eat(29); node.default = this.flowParseType(); } else { if (requireDefault) { - this.raise(nodeStart, FlowErrors.MissingTypeParamDefault); + this.raise(FlowErrors.MissingTypeParamDefault, { + at: nodeStartLoc + }); } } - return this.finishNode(node, "TypeParameter"); } - flowParseTypeParameterDeclaration() { const oldInType = this.state.inType; const node = this.startNode(); node.params = []; this.state.inType = true; - - if (this.match(43) || this.match(132)) { + if (this.match(47) || this.match(142)) { this.next(); } else { this.unexpected(); } - let defaultRequired = false; - do { const typeParameter = this.flowParseTypeParameter(defaultRequired); node.params.push(typeParameter); - if (typeParameter.default) { defaultRequired = true; } - - if (!this.match(44)) { + if (!this.match(48)) { this.expect(12); } - } while (!this.match(44)); - - this.expect(44); + } while (!this.match(48)); + this.expect(48); this.state.inType = oldInType; return this.finishNode(node, "TypeParameterDeclaration"); } - flowParseTypeParameterInstantiation() { const node = this.startNode(); const oldInType = this.state.inType; node.params = []; this.state.inType = true; - this.expect(43); + this.expect(47); const oldNoAnonFunctionType = this.state.noAnonFunctionType; this.state.noAnonFunctionType = false; - - while (!this.match(44)) { + while (!this.match(48)) { node.params.push(this.flowParseType()); - - if (!this.match(44)) { + if (!this.match(48)) { this.expect(12); } } - this.state.noAnonFunctionType = oldNoAnonFunctionType; - this.expect(44); + this.expect(48); this.state.inType = oldInType; return this.finishNode(node, "TypeParameterInstantiation"); } - flowParseTypeParameterInstantiationCallOrNew() { const node = this.startNode(); const oldInType = this.state.inType; node.params = []; this.state.inType = true; - this.expect(43); - - while (!this.match(44)) { + this.expect(47); + while (!this.match(48)) { node.params.push(this.flowParseTypeOrImplicitInstantiation()); - - if (!this.match(44)) { + if (!this.match(48)) { this.expect(12); } } - - this.expect(44); + this.expect(48); this.state.inType = oldInType; return this.finishNode(node, "TypeParameterInstantiation"); } - flowParseInterfaceType() { const node = this.startNode(); - this.expectContextual(119); + this.expectContextual(129); node.extends = []; - - if (this.eat(75)) { + if (this.eat(81)) { do { node.extends.push(this.flowParseInterfaceExtends()); } while (this.eat(12)); } - node.body = this.flowParseObjectType({ allowStatic: false, allowExact: false, @@ -5307,14 +6785,11 @@ var flow = (superClass => class extends superClass { }); return this.finishNode(node, "InterfaceTypeAnnotation"); } - flowParseObjectPropertyKey() { - return this.match(124) || this.match(123) ? this.parseExprAtom() : this.parseIdentifier(true); + return this.match(134) || this.match(133) ? super.parseExprAtom() : this.parseIdentifier(true); } - flowParseObjectTypeIndexer(node, isStatic, variance) { node.static = isStatic; - if (this.lookahead().type === 14) { node.id = this.flowParseObjectPropertyKey(); node.key = this.flowParseTypeInitialiser(); @@ -5322,81 +6797,64 @@ var flow = (superClass => class extends superClass { node.id = null; node.key = this.flowParseType(); } - this.expect(3); node.value = this.flowParseTypeInitialiser(); node.variance = variance; return this.finishNode(node, "ObjectTypeIndexer"); } - flowParseObjectTypeInternalSlot(node, isStatic) { node.static = isStatic; node.id = this.flowParseObjectPropertyKey(); this.expect(3); this.expect(3); - - if (this.match(43) || this.match(10)) { + if (this.match(47) || this.match(10)) { node.method = true; node.optional = false; - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); } else { node.method = false; - if (this.eat(17)) { node.optional = true; } - node.value = this.flowParseTypeInitialiser(); } - return this.finishNode(node, "ObjectTypeInternalSlot"); } - flowParseObjectTypeMethodish(node) { node.params = []; node.rest = null; node.typeParameters = null; node.this = null; - - if (this.match(43)) { + if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } - this.expect(10); - - if (this.match(72)) { + if (this.match(78)) { node.this = this.flowParseFunctionTypeParam(true); node.this.name = null; - if (!this.match(11)) { this.expect(12); } } - while (!this.match(11) && !this.match(21)) { node.params.push(this.flowParseFunctionTypeParam(false)); - if (!this.match(11)) { this.expect(12); } } - if (this.eat(21)) { node.rest = this.flowParseFunctionTypeParam(false); } - this.expect(11); node.returnType = this.flowParseTypeInitialiser(); return this.finishNode(node, "FunctionTypeAnnotation"); } - flowParseObjectTypeCallProperty(node, isStatic) { const valueNode = this.startNode(); node.static = isStatic; node.value = this.flowParseObjectTypeMethodish(valueNode); return this.finishNode(node, "ObjectTypeCallProperty"); } - flowParseObjectType({ allowStatic, allowExact, @@ -5414,7 +6872,6 @@ var flow = (superClass => class extends superClass { let endDelim; let exact; let inexact = false; - if (allowExact && this.match(6)) { this.expect(6); endDelim = 9; @@ -5424,366 +6881,306 @@ var flow = (superClass => class extends superClass { endDelim = 8; exact = false; } - nodeStart.exact = exact; - while (!this.match(endDelim)) { let isStatic = false; - let protoStart = null; - let inexactStart = null; + let protoStartLoc = null; + let inexactStartLoc = null; const node = this.startNode(); - - if (allowProto && this.isContextual(109)) { + if (allowProto && this.isContextual(118)) { const lookahead = this.lookahead(); - if (lookahead.type !== 14 && lookahead.type !== 17) { this.next(); - protoStart = this.state.start; + protoStartLoc = this.state.startLoc; allowStatic = false; } } - - if (allowStatic && this.isContextual(98)) { + if (allowStatic && this.isContextual(106)) { const lookahead = this.lookahead(); - if (lookahead.type !== 14 && lookahead.type !== 17) { this.next(); isStatic = true; } } - const variance = this.flowParseVariance(); - if (this.eat(0)) { - if (protoStart != null) { - this.unexpected(protoStart); + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); } - if (this.eat(0)) { if (variance) { - this.unexpected(variance.start); + this.unexpected(variance.loc.start); } - nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic)); } else { nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance)); } - } else if (this.match(10) || this.match(43)) { - if (protoStart != null) { - this.unexpected(protoStart); + } else if (this.match(10) || this.match(47)) { + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); } - if (variance) { - this.unexpected(variance.start); + this.unexpected(variance.loc.start); } - nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic)); } else { let kind = "init"; - - if (this.isContextual(92) || this.isContextual(97)) { + if (this.isContextual(99) || this.isContextual(104)) { const lookahead = this.lookahead(); - if (tokenIsLiteralPropertyName(lookahead.type)) { kind = this.state.value; this.next(); } } - - const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact); - + const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact); if (propOrInexact === null) { inexact = true; - inexactStart = this.state.lastTokStart; + inexactStartLoc = this.state.lastTokStartLoc; } else { nodeStart.properties.push(propOrInexact); } } - this.flowObjectTypeSemicolon(); - - if (inexactStart && !this.match(8) && !this.match(9)) { - this.raise(inexactStart, FlowErrors.UnexpectedExplicitInexactInObject); + if (inexactStartLoc && !this.match(8) && !this.match(9)) { + this.raise(FlowErrors.UnexpectedExplicitInexactInObject, { + at: inexactStartLoc + }); } } - this.expect(endDelim); - if (allowSpread) { nodeStart.inexact = inexact; } - const out = this.finishNode(nodeStart, "ObjectTypeAnnotation"); this.state.inType = oldInType; return out; } - - flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread, allowInexact) { + flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) { if (this.eat(21)) { const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9); - if (isInexactToken) { if (!allowSpread) { - this.raise(this.state.lastTokStart, FlowErrors.InexactInsideNonObject); + this.raise(FlowErrors.InexactInsideNonObject, { + at: this.state.lastTokStartLoc + }); } else if (!allowInexact) { - this.raise(this.state.lastTokStart, FlowErrors.InexactInsideExact); + this.raise(FlowErrors.InexactInsideExact, { + at: this.state.lastTokStartLoc + }); } - if (variance) { - this.raise(variance.start, FlowErrors.InexactVariance); + this.raise(FlowErrors.InexactVariance, { + at: variance + }); } - return null; } - if (!allowSpread) { - this.raise(this.state.lastTokStart, FlowErrors.UnexpectedSpreadType); + this.raise(FlowErrors.UnexpectedSpreadType, { + at: this.state.lastTokStartLoc + }); } - - if (protoStart != null) { - this.unexpected(protoStart); + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); } - if (variance) { - this.raise(variance.start, FlowErrors.SpreadVariance); + this.raise(FlowErrors.SpreadVariance, { + at: variance + }); } - node.argument = this.flowParseType(); return this.finishNode(node, "ObjectTypeSpreadProperty"); } else { node.key = this.flowParseObjectPropertyKey(); node.static = isStatic; - node.proto = protoStart != null; + node.proto = protoStartLoc != null; node.kind = kind; let optional = false; - - if (this.match(43) || this.match(10)) { + if (this.match(47) || this.match(10)) { node.method = true; - - if (protoStart != null) { - this.unexpected(protoStart); + if (protoStartLoc != null) { + this.unexpected(protoStartLoc); } - if (variance) { - this.unexpected(variance.start); + this.unexpected(variance.loc.start); } - - node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start)); - + node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.loc.start)); if (kind === "get" || kind === "set") { this.flowCheckGetterSetterParams(node); } - if (!allowSpread && node.key.name === "constructor" && node.value.this) { - this.raise(node.value.this.start, FlowErrors.ThisParamBannedInConstructor); + this.raise(FlowErrors.ThisParamBannedInConstructor, { + at: node.value.this + }); } } else { if (kind !== "init") this.unexpected(); node.method = false; - if (this.eat(17)) { optional = true; } - node.value = this.flowParseTypeInitialiser(); node.variance = variance; } - node.optional = optional; return this.finishNode(node, "ObjectTypeProperty"); } } - flowCheckGetterSetterParams(property) { const paramCount = property.kind === "get" ? 0 : 1; - const start = property.start; const length = property.value.params.length + (property.value.rest ? 1 : 0); - if (property.value.this) { - this.raise(property.value.this.start, property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam); + this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, { + at: property.value.this + }); } - if (length !== paramCount) { - if (property.kind === "get") { - this.raise(start, ErrorMessages.BadGetterArity); - } else { - this.raise(start, ErrorMessages.BadSetterArity); - } + this.raise(property.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, { + at: property + }); } - if (property.kind === "set" && property.value.rest) { - this.raise(start, ErrorMessages.BadSetterRestParameter); + this.raise(Errors.BadSetterRestParameter, { + at: property + }); } } - flowObjectTypeSemicolon() { if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) { this.unexpected(); } } - - flowParseQualifiedTypeIdentifier(startPos, startLoc, id) { - startPos = startPos || this.state.start; - startLoc = startLoc || this.state.startLoc; + flowParseQualifiedTypeIdentifier(startLoc, id) { + var _startLoc; + (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; let node = id || this.flowParseRestrictedIdentifier(true); - while (this.eat(16)) { - const node2 = this.startNodeAt(startPos, startLoc); + const node2 = this.startNodeAt(startLoc); node2.qualification = node; node2.id = this.flowParseRestrictedIdentifier(true); node = this.finishNode(node2, "QualifiedTypeIdentifier"); } - return node; } - - flowParseGenericType(startPos, startLoc, id) { - const node = this.startNodeAt(startPos, startLoc); + flowParseGenericType(startLoc, id) { + const node = this.startNodeAt(startLoc); node.typeParameters = null; - node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id); - - if (this.match(43)) { + node.id = this.flowParseQualifiedTypeIdentifier(startLoc, id); + if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterInstantiation(); } - return this.finishNode(node, "GenericTypeAnnotation"); } - flowParseTypeofType() { const node = this.startNode(); - this.expect(81); + this.expect(87); node.argument = this.flowParsePrimaryType(); return this.finishNode(node, "TypeofTypeAnnotation"); } - flowParseTupleType() { const node = this.startNode(); node.types = []; this.expect(0); - while (this.state.pos < this.length && !this.match(3)) { node.types.push(this.flowParseType()); if (this.match(3)) break; this.expect(12); } - this.expect(3); return this.finishNode(node, "TupleTypeAnnotation"); } - flowParseFunctionTypeParam(first) { let name = null; let optional = false; let typeAnnotation = null; const node = this.startNode(); const lh = this.lookahead(); - const isThis = this.state.type === 72; - + const isThis = this.state.type === 78; if (lh.type === 14 || lh.type === 17) { if (isThis && !first) { - this.raise(node.start, FlowErrors.ThisParamMustBeFirst); + this.raise(FlowErrors.ThisParamMustBeFirst, { + at: node + }); } - name = this.parseIdentifier(isThis); - if (this.eat(17)) { optional = true; - if (isThis) { - this.raise(node.start, FlowErrors.ThisParamMayNotBeOptional); + this.raise(FlowErrors.ThisParamMayNotBeOptional, { + at: node + }); } } - typeAnnotation = this.flowParseTypeInitialiser(); } else { typeAnnotation = this.flowParseType(); } - node.name = name; node.optional = optional; node.typeAnnotation = typeAnnotation; return this.finishNode(node, "FunctionTypeParam"); } - reinterpretTypeAsFunctionTypeParam(type) { - const node = this.startNodeAt(type.start, type.loc.start); + const node = this.startNodeAt(type.loc.start); node.name = null; node.optional = false; node.typeAnnotation = type; return this.finishNode(node, "FunctionTypeParam"); } - flowParseFunctionTypeParams(params = []) { let rest = null; let _this = null; - - if (this.match(72)) { + if (this.match(78)) { _this = this.flowParseFunctionTypeParam(true); _this.name = null; - if (!this.match(11)) { this.expect(12); } } - while (!this.match(11) && !this.match(21)) { params.push(this.flowParseFunctionTypeParam(false)); - if (!this.match(11)) { this.expect(12); } } - if (this.eat(21)) { rest = this.flowParseFunctionTypeParam(false); } - return { params, rest, _this }; } - - flowIdentToTypeAnnotation(startPos, startLoc, node, id) { + flowIdentToTypeAnnotation(startLoc, node, id) { switch (id.name) { case "any": return this.finishNode(node, "AnyTypeAnnotation"); - case "bool": case "boolean": return this.finishNode(node, "BooleanTypeAnnotation"); - case "mixed": return this.finishNode(node, "MixedTypeAnnotation"); - case "empty": return this.finishNode(node, "EmptyTypeAnnotation"); - case "number": return this.finishNode(node, "NumberTypeAnnotation"); - case "string": return this.finishNode(node, "StringTypeAnnotation"); - case "symbol": return this.finishNode(node, "SymbolTypeAnnotation"); - default: this.checkNotUnderscore(id.name); - return this.flowParseGenericType(startPos, startLoc, id); + return this.flowParseGenericType(startLoc, id); } } - flowParsePrimaryType() { - const startPos = this.state.start; const startLoc = this.state.startLoc; const node = this.startNode(); let tmp; let type; let isGroupedType = false; const oldNoAnonFunctionType = this.state.noAnonFunctionType; - switch (this.state.type) { case 5: return this.flowParseObjectType({ @@ -5793,7 +7190,6 @@ var flow = (superClass => class extends superClass { allowProto: false, allowInexact: true }); - case 6: return this.flowParseObjectType({ allowStatic: false, @@ -5802,14 +7198,12 @@ var flow = (superClass => class extends superClass { allowProto: false, allowInexact: false }); - case 0: this.state.noAnonFunctionType = false; type = this.flowParseTupleType(); this.state.noAnonFunctionType = oldNoAnonFunctionType; return type; - - case 43: + case 47: node.typeParameters = this.flowParseTypeParameterDeclaration(); this.expect(10); tmp = this.flowParseFunctionTypeParams(); @@ -5820,24 +7214,20 @@ var flow = (superClass => class extends superClass { this.expect(19); node.returnType = this.flowParseType(); return this.finishNode(node, "FunctionTypeAnnotation"); - case 10: this.next(); - if (!this.match(11) && !this.match(21)) { - if (tokenIsIdentifier(this.state.type) || this.match(72)) { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { const token = this.lookahead().type; isGroupedType = token !== 17 && token !== 14; } else { isGroupedType = true; } } - if (isGroupedType) { this.state.noAnonFunctionType = false; type = this.flowParseType(); this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { this.expect(11); return type; @@ -5845,13 +7235,11 @@ var flow = (superClass => class extends superClass { this.eat(12); } } - if (type) { tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); } else { tmp = this.flowParseFunctionTypeParams(); } - node.params = tmp.params; node.rest = tmp.rest; node.this = tmp._this; @@ -5860,88 +7248,69 @@ var flow = (superClass => class extends superClass { node.returnType = this.flowParseType(); node.typeParameters = null; return this.finishNode(node, "FunctionTypeAnnotation"); - - case 123: + case 133: return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); - - case 79: - case 80: - node.value = this.match(79); + case 85: + case 86: + node.value = this.match(85); this.next(); return this.finishNode(node, "BooleanLiteralTypeAnnotation"); - - case 47: + case 53: if (this.state.value === "-") { this.next(); - - if (this.match(124)) { + if (this.match(134)) { return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node); } - - if (this.match(125)) { + if (this.match(135)) { return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node); } - - throw this.raise(this.state.start, FlowErrors.UnexpectedSubtractionOperand); + throw this.raise(FlowErrors.UnexpectedSubtractionOperand, { + at: this.state.startLoc + }); } - - throw this.unexpected(); - - case 124: + this.unexpected(); + return; + case 134: return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation"); - - case 125: + case 135: return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation"); - - case 82: + case 88: this.next(); return this.finishNode(node, "VoidTypeAnnotation"); - - case 78: + case 84: this.next(); return this.finishNode(node, "NullLiteralTypeAnnotation"); - - case 72: + case 78: this.next(); return this.finishNode(node, "ThisTypeAnnotation"); - - case 49: + case 55: this.next(); return this.finishNode(node, "ExistsTypeAnnotation"); - - case 81: + case 87: return this.flowParseTypeofType(); - default: if (tokenIsKeyword(this.state.type)) { const label = tokenLabelName(this.state.type); this.next(); return super.createIdentifier(node, label); } else if (tokenIsIdentifier(this.state.type)) { - if (this.isContextual(119)) { + if (this.isContextual(129)) { return this.flowParseInterfaceType(); } - - return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier()); + return this.flowIdentToTypeAnnotation(startLoc, node, this.parseIdentifier()); } - } - - throw this.unexpected(); + this.unexpected(); } - flowParsePostfixType() { - const startPos = this.state.start; const startLoc = this.state.startLoc; let type = this.flowParsePrimaryType(); let seenOptionalIndexedAccess = false; - while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); const optional = this.eat(18); seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional; this.expect(0); - if (!optional && this.match(3)) { node.elementType = type; this.next(); @@ -5950,7 +7319,6 @@ var flow = (superClass => class extends superClass { node.objectType = type; node.indexType = this.flowParseType(); this.expect(3); - if (seenOptionalIndexedAccess) { node.optional = optional; type = this.finishNode(node, "OptionalIndexedAccessType"); @@ -5959,13 +7327,10 @@ var flow = (superClass => class extends superClass { } } } - return type; } - flowParsePrefixType() { const node = this.startNode(); - if (this.eat(17)) { node.typeAnnotation = this.flowParsePrefixType(); return this.finishNode(node, "NullableTypeAnnotation"); @@ -5973,12 +7338,10 @@ var flow = (superClass => class extends superClass { return this.flowParsePostfixType(); } } - flowParseAnonFunctionWithoutParens() { const param = this.flowParsePrefixType(); - if (!this.state.noAnonFunctionType && this.eat(19)) { - const node = this.startNodeAt(param.start, param.loc.start); + const node = this.startNodeAt(param.loc.start); node.params = [this.reinterpretTypeAsFunctionTypeParam(param)]; node.rest = null; node.this = null; @@ -5986,36 +7349,28 @@ var flow = (superClass => class extends superClass { node.typeParameters = null; return this.finishNode(node, "FunctionTypeAnnotation"); } - return param; } - flowParseIntersectionType() { const node = this.startNode(); - this.eat(41); + this.eat(45); const type = this.flowParseAnonFunctionWithoutParens(); node.types = [type]; - - while (this.eat(41)) { + while (this.eat(45)) { node.types.push(this.flowParseAnonFunctionWithoutParens()); } - return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation"); } - flowParseUnionType() { const node = this.startNode(); - this.eat(39); + this.eat(43); const type = this.flowParseIntersectionType(); node.types = [type]; - - while (this.eat(39)) { + while (this.eat(43)) { node.types.push(this.flowParseIntersectionType()); } - return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation"); } - flowParseType() { const oldInType = this.state.inType; this.state.inType = true; @@ -6023,106 +7378,85 @@ var flow = (superClass => class extends superClass { this.state.inType = oldInType; return type; } - flowParseTypeOrImplicitInstantiation() { - if (this.state.type === 122 && this.state.value === "_") { - const startPos = this.state.start; + if (this.state.type === 132 && this.state.value === "_") { const startLoc = this.state.startLoc; const node = this.parseIdentifier(); - return this.flowParseGenericType(startPos, startLoc, node); + return this.flowParseGenericType(startLoc, node); } else { return this.flowParseType(); } } - flowParseTypeAnnotation() { const node = this.startNode(); node.typeAnnotation = this.flowParseTypeInitialiser(); return this.finishNode(node, "TypeAnnotation"); } - flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) { const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier(); - if (this.match(14)) { ident.typeAnnotation = this.flowParseTypeAnnotation(); this.resetEndLocation(ident); } - return ident; } - typeCastToParameter(node) { node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end); + this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); return node.expression; } - flowParseVariance() { let variance = null; - - if (this.match(47)) { + if (this.match(53)) { variance = this.startNode(); - if (this.state.value === "+") { variance.kind = "plus"; } else { variance.kind = "minus"; } - this.next(); - this.finishNode(variance, "Variance"); + return this.finishNode(variance, "Variance"); } - return variance; } - parseFunctionBody(node, allowExpressionBody, isMethod = false) { if (allowExpressionBody) { - return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); + this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod)); + return; } - - return super.parseFunctionBody(node, false, isMethod); + super.parseFunctionBody(node, false, isMethod); } - parseFunctionBodyAndFinish(node, type, isMethod = false) { if (this.match(14)) { const typeNode = this.startNode(); [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser(); node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null; } - - super.parseFunctionBodyAndFinish(node, type, isMethod); + return super.parseFunctionBodyAndFinish(node, type, isMethod); } - - parseStatement(context, topLevel) { - if (this.state.strict && this.isContextual(119)) { + parseStatementLike(flags) { + if (this.state.strict && this.isContextual(129)) { const lookahead = this.lookahead(); - if (tokenIsKeywordOrIdentifier(lookahead.type)) { const node = this.startNode(); this.next(); return this.flowParseInterface(node); } - } else if (this.shouldParseEnums() && this.isContextual(116)) { + } else if (this.shouldParseEnums() && this.isContextual(126)) { const node = this.startNode(); this.next(); return this.flowParseEnumDeclaration(node); } - - const stmt = super.parseStatement(context, topLevel); - + const stmt = super.parseStatementLike(flags); if (this.flowPragma === undefined && !this.isValidDirective(stmt)) { this.flowPragma = null; } - return stmt; } - - parseExpressionStatement(node, expr) { + parseExpressionStatement(node, expr, decorators) { if (expr.type === "Identifier") { if (expr.name === "declare") { - if (this.match(74) || tokenIsIdentifier(this.state.type) || this.match(62) || this.match(68) || this.match(76)) { + if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) { return this.flowParseDeclare(node); } } else if (tokenIsIdentifier(this.state.type)) { @@ -6135,88 +7469,71 @@ var flow = (superClass => class extends superClass { } } } - - return super.parseExpressionStatement(node, expr); + return super.parseExpressionStatement(node, expr, decorators); } - shouldParseExportDeclaration() { const { type } = this.state; - - if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 116) { + if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 126) { return !this.state.containsEsc; } - return super.shouldParseExportDeclaration(); } - isExportDefaultSpecifier() { const { type } = this.state; - - if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 116) { + if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 126) { return this.state.containsEsc; } - return super.isExportDefaultSpecifier(); } - parseExportDefaultExpression() { - if (this.shouldParseEnums() && this.isContextual(116)) { + if (this.shouldParseEnums() && this.isContextual(126)) { const node = this.startNode(); this.next(); return this.flowParseEnumDeclaration(node); } - return super.parseExportDefaultExpression(); } - - parseConditional(expr, startPos, startLoc, refExpressionErrors) { + parseConditional(expr, startLoc, refExpressionErrors) { if (!this.match(17)) return expr; - if (this.state.maybeInArrowParameters) { const nextCh = this.lookaheadCharCode(); - if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) { this.setOptionalParametersError(refExpressionErrors); return expr; } } - this.expect(17); const state = this.state.clone(); const originalNoArrowAt = this.state.noArrowAt; - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); let { consequent, failed } = this.tryParseConditionalConsequent(); let [valid, invalid] = this.getArrowLikeExpressions(consequent); - if (failed || invalid.length > 0) { const noArrowAt = [...originalNoArrowAt]; - if (invalid.length > 0) { this.state = state; this.state.noArrowAt = noArrowAt; - for (let i = 0; i < invalid.length; i++) { noArrowAt.push(invalid[i].start); } - ({ consequent, failed } = this.tryParseConditionalConsequent()); [valid, invalid] = this.getArrowLikeExpressions(consequent); } - if (failed && valid.length > 1) { - this.raise(state.start, FlowErrors.AmbiguousConditionalArrow); + this.raise(FlowErrors.AmbiguousConditionalArrow, { + at: state.startLoc + }); } - if (failed && valid.length === 1) { this.state = state; noArrowAt.push(valid[0].start); @@ -6227,7 +7544,6 @@ var flow = (superClass => class extends superClass { } = this.tryParseConditionalConsequent()); } } - this.getArrowLikeExpressions(consequent, true); this.state.noArrowAt = originalNoArrowAt; this.expect(14); @@ -6236,7 +7552,6 @@ var flow = (superClass => class extends superClass { node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(undefined, undefined)); return this.finishNode(node, "ConditionalExpression"); } - tryParseConditionalConsequent() { this.state.noArrowParamsConversionAt.push(this.state.start); const consequent = this.parseMaybeAssignAllowIn(); @@ -6247,48 +7562,38 @@ var flow = (superClass => class extends superClass { failed }; } - getArrowLikeExpressions(node, disallowInvalid) { const stack = [node]; const arrows = []; - while (stack.length !== 0) { const node = stack.pop(); - if (node.type === "ArrowFunctionExpression") { if (node.typeParameters || !node.returnType) { this.finishArrowValidation(node); } else { arrows.push(node); } - stack.push(node.body); } else if (node.type === "ConditionalExpression") { stack.push(node.consequent); stack.push(node.alternate); } } - if (disallowInvalid) { arrows.forEach(node => this.finishArrowValidation(node)); return [arrows, []]; } - return partition(arrows, node => node.params.every(param => this.isAssignable(param, true))); } - finishArrowValidation(node) { var _node$extra; - - this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingComma, false); - this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW); + this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false); + this.scope.enter(2 | 4); super.checkParams(node, false, true); this.scope.exit(); } - forwardNoArrowParamsConversionAt(node, parse) { let result; - if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { this.state.noArrowParamsConversionAt.push(this.state.start); result = parse(); @@ -6296,70 +7601,51 @@ var flow = (superClass => class extends superClass { } else { result = parse(); } - return result; } - - parseParenItem(node, startPos, startLoc) { - node = super.parseParenItem(node, startPos, startLoc); - + parseParenItem(node, startLoc) { + node = super.parseParenItem(node, startLoc); if (this.eat(17)) { node.optional = true; this.resetEndLocation(node); } - if (this.match(14)) { - const typeCastNode = this.startNodeAt(startPos, startLoc); + const typeCastNode = this.startNodeAt(startLoc); typeCastNode.expression = node; typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); return this.finishNode(typeCastNode, "TypeCastExpression"); } - return node; } - assertModuleNodeAllowed(node) { if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { return; } - super.assertModuleNodeAllowed(node); } - - parseExport(node) { - const decl = super.parseExport(node); - - if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") { - decl.exportKind = decl.exportKind || "value"; - } - - return decl; - } - parseExportDeclaration(node) { - if (this.isContextual(120)) { + if (this.isContextual(130)) { node.exportKind = "type"; const declarationNode = this.startNode(); this.next(); - if (this.match(5)) { node.specifiers = this.parseExportSpecifiers(true); - this.parseExportFrom(node); + super.parseExportFrom(node); return null; } else { return this.flowParseTypeAlias(declarationNode); } - } else if (this.isContextual(121)) { + } else if (this.isContextual(131)) { node.exportKind = "type"; const declarationNode = this.startNode(); this.next(); return this.flowParseOpaqueType(declarationNode, false); - } else if (this.isContextual(119)) { + } else if (this.isContextual(129)) { node.exportKind = "type"; const declarationNode = this.startNode(); this.next(); return this.flowParseInterface(declarationNode); - } else if (this.shouldParseEnums() && this.isContextual(116)) { + } else if (this.shouldParseEnums() && this.isContextual(126)) { node.exportKind = "value"; const declarationNode = this.startNode(); this.next(); @@ -6368,97 +7654,88 @@ var flow = (superClass => class extends superClass { return super.parseExportDeclaration(node); } } - eatExportStar(node) { - if (super.eatExportStar(...arguments)) return true; - - if (this.isContextual(120) && this.lookahead().type === 49) { + if (super.eatExportStar(node)) return true; + if (this.isContextual(130) && this.lookahead().type === 55) { node.exportKind = "type"; this.next(); this.next(); return true; } - return false; } - maybeParseExportNamespaceSpecifier(node) { - const pos = this.state.start; + const { + startLoc + } = this.state; const hasNamespace = super.maybeParseExportNamespaceSpecifier(node); - if (hasNamespace && node.exportKind === "type") { - this.unexpected(pos); + this.unexpected(startLoc); } - return hasNamespace; } - parseClassId(node, isStatement, optionalId) { super.parseClassId(node, isStatement, optionalId); - - if (this.match(43)) { + if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } } - parseClassMember(classBody, member, state) { - const pos = this.state.start; - - if (this.isContextual(115)) { - if (this.parseClassMemberFromModifier(classBody, member)) { + const { + startLoc + } = this.state; + if (this.isContextual(125)) { + if (super.parseClassMemberFromModifier(classBody, member)) { return; } - member.declare = true; } - super.parseClassMember(classBody, member, state); - if (member.declare) { if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") { - this.raise(pos, FlowErrors.DeclareClassElement); + this.raise(FlowErrors.DeclareClassElement, { + at: startLoc + }); } else if (member.value) { - this.raise(member.value.start, FlowErrors.DeclareClassFieldInitializer); + this.raise(FlowErrors.DeclareClassFieldInitializer, { + at: member.value + }); } } } - isIterator(word) { return word === "iterator" || word === "asyncIterator"; } - readIterator() { const word = super.readWord1(); const fullWord = "@@" + word; - if (!this.isIterator(word) || !this.state.inType) { - this.raise(this.state.pos, ErrorMessages.InvalidIdentifier, fullWord); + this.raise(Errors.InvalidIdentifier, { + at: this.state.curPosition(), + identifierName: fullWord + }); } - - this.finishToken(122, fullWord); + this.finishToken(132, fullWord); } - getTokenFromCode(code) { const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 123 && next === 124) { - return this.finishOp(6, 2); + this.finishOp(6, 2); } else if (this.state.inType && (code === 62 || code === 60)) { - return this.finishOp(code === 62 ? 44 : 43, 1); + this.finishOp(code === 62 ? 48 : 47, 1); } else if (this.state.inType && code === 63) { if (next === 46) { - return this.finishOp(18, 2); + this.finishOp(18, 2); + } else { + this.finishOp(17, 1); } - - return this.finishOp(17, 1); - } else if (isIteratorStart(code, next)) { + } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) { this.state.pos += 2; - return this.readIterator(); + this.readIterator(); } else { - return super.getTokenFromCode(code); + super.getTokenFromCode(code); } } - isAssignable(node, isBinding) { if (node.type === "TypeCastExpression") { return this.isAssignable(node.expression, isBinding); @@ -6466,276 +7743,228 @@ var flow = (superClass => class extends superClass { return super.isAssignable(node, isBinding); } } - toAssignable(node, isLHS = false) { - if (node.type === "TypeCastExpression") { - return super.toAssignable(this.typeCastToParameter(node), isLHS); - } else { - return super.toAssignable(node, isLHS); + if (!isLHS && node.type === "AssignmentExpression" && node.left.type === "TypeCastExpression") { + node.left = this.typeCastToParameter(node.left); } + super.toAssignable(node, isLHS); } - - toAssignableList(exprList, trailingCommaPos, isLHS) { + toAssignableList(exprList, trailingCommaLoc, isLHS) { for (let i = 0; i < exprList.length; i++) { const expr = exprList[i]; - if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") { exprList[i] = this.typeCastToParameter(expr); } } - - return super.toAssignableList(exprList, trailingCommaPos, isLHS); + super.toAssignableList(exprList, trailingCommaLoc, isLHS); } - toReferencedList(exprList, isParenthesizedExpr) { for (let i = 0; i < exprList.length; i++) { var _expr$extra; - const expr = exprList[i]; - if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) { - this.raise(expr.typeAnnotation.start, FlowErrors.TypeCastInPattern); + this.raise(FlowErrors.TypeCastInPattern, { + at: expr.typeAnnotation + }); } } - return exprList; } - parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); - if (canBePattern && !this.state.maybeInArrowParameters) { this.toReferencedList(node.elements); } - return node; } - - checkLVal(expr, ...args) { - if (expr.type !== "TypeCastExpression") { - return super.checkLVal(expr, ...args); - } + isValidLVal(type, isParenthesized, binding) { + return type === "TypeCastExpression" || super.isValidLVal(type, isParenthesized, binding); } - parseClassProperty(node) { if (this.match(14)) { node.typeAnnotation = this.flowParseTypeAnnotation(); } - return super.parseClassProperty(node); } - parseClassPrivateProperty(node) { if (this.match(14)) { node.typeAnnotation = this.flowParseTypeAnnotation(); } - return super.parseClassPrivateProperty(node); } - isClassMethod() { - return this.match(43) || super.isClassMethod(); + return this.match(47) || super.isClassMethod(); } - isClassProperty() { return this.match(14) || super.isClassProperty(); } - isNonstaticConstructor(method) { return !this.match(14) && super.isNonstaticConstructor(method); } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { if (method.variance) { - this.unexpected(method.variance.start); + this.unexpected(method.variance.loc.start); } - delete method.variance; - - if (this.match(43)) { + if (this.match(47)) { method.typeParameters = this.flowParseTypeParameterDeclaration(); } - super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); - if (method.params && isConstructor) { const params = method.params; - if (params.length > 0 && this.isThisParam(params[0])) { - this.raise(method.start, FlowErrors.ThisParamBannedInConstructor); + this.raise(FlowErrors.ThisParamBannedInConstructor, { + at: method + }); } } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) { const params = method.value.params; - if (params.length > 0 && this.isThisParam(params[0])) { - this.raise(method.start, FlowErrors.ThisParamBannedInConstructor); + this.raise(FlowErrors.ThisParamBannedInConstructor, { + at: method + }); } } } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { if (method.variance) { - this.unexpected(method.variance.start); + this.unexpected(method.variance.loc.start); } - delete method.variance; - - if (this.match(43)) { + if (this.match(47)) { method.typeParameters = this.flowParseTypeParameterDeclaration(); } - super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); } - parseClassSuper(node) { super.parseClassSuper(node); - - if (node.superClass && this.match(43)) { + if (node.superClass && this.match(47)) { node.superTypeParameters = this.flowParseTypeParameterInstantiation(); } - - if (this.isContextual(104)) { + if (this.isContextual(113)) { this.next(); const implemented = node.implements = []; - do { const node = this.startNode(); node.id = this.flowParseRestrictedIdentifier(true); - - if (this.match(43)) { + if (this.match(47)) { node.typeParameters = this.flowParseTypeParameterInstantiation(); } else { node.typeParameters = null; } - implemented.push(this.finishNode(node, "ClassImplements")); } while (this.eat(12)); } } - checkGetterSetterParams(method) { super.checkGetterSetterParams(method); const params = this.getObjectOrClassMethodParams(method); - if (params.length > 0) { const param = params[0]; - if (this.isThisParam(param) && method.kind === "get") { - this.raise(param.start, FlowErrors.GetterMayNotHaveThisParam); + this.raise(FlowErrors.GetterMayNotHaveThisParam, { + at: param + }); } else if (this.isThisParam(param)) { - this.raise(param.start, FlowErrors.SetterMayNotHaveThisParam); + this.raise(FlowErrors.SetterMayNotHaveThisParam, { + at: param + }); } } } - parsePropertyNamePrefixOperator(node) { node.variance = this.flowParseVariance(); } - - parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { if (prop.variance) { - this.unexpected(prop.variance.start); + this.unexpected(prop.variance.loc.start); } - delete prop.variance; let typeParameters; - - if (this.match(43) && !isAccessor) { + if (this.match(47) && !isAccessor) { typeParameters = this.flowParseTypeParameterDeclaration(); if (!this.match(10)) this.unexpected(); } - - super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); - + const result = super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); if (typeParameters) { - (prop.value || prop).typeParameters = typeParameters; + (result.value || result).typeParameters = typeParameters; } + return result; } - parseAssignableListItemTypes(param) { if (this.eat(17)) { if (param.type !== "Identifier") { - this.raise(param.start, FlowErrors.PatternIsOptional); + this.raise(FlowErrors.PatternIsOptional, { + at: param + }); } - if (this.isThisParam(param)) { - this.raise(param.start, FlowErrors.ThisParamMayNotBeOptional); + this.raise(FlowErrors.ThisParamMayNotBeOptional, { + at: param + }); } - param.optional = true; } - if (this.match(14)) { param.typeAnnotation = this.flowParseTypeAnnotation(); } else if (this.isThisParam(param)) { - this.raise(param.start, FlowErrors.ThisParamAnnotationRequired); + this.raise(FlowErrors.ThisParamAnnotationRequired, { + at: param + }); } - - if (this.match(27) && this.isThisParam(param)) { - this.raise(param.start, FlowErrors.ThisParamNoDefault); + if (this.match(29) && this.isThisParam(param)) { + this.raise(FlowErrors.ThisParamNoDefault, { + at: param + }); } - this.resetEndLocation(param); return param; } - - parseMaybeDefault(startPos, startLoc, left) { - const node = super.parseMaybeDefault(startPos, startLoc, left); - + parseMaybeDefault(startLoc, left) { + const node = super.parseMaybeDefault(startLoc, left); if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, FlowErrors.TypeBeforeInitializer); + this.raise(FlowErrors.TypeBeforeInitializer, { + at: node.typeAnnotation + }); } - return node; } - - shouldParseDefaultImport(node) { - if (!hasTypeImportKind(node)) { - return super.shouldParseDefaultImport(node); + checkImportReflection(node) { + super.checkImportReflection(node); + if (node.module && node.importKind !== "value") { + this.raise(FlowErrors.ImportReflectionHasImportType, { + at: node.specifiers[0].loc.start + }); } - - return isMaybeDefaultImport(this.state.type); } - - parseImportSpecifierLocal(node, specifier, type, contextDescription) { + parseImportSpecifierLocal(node, specifier, type) { specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier(); - this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL); - node.specifiers.push(this.finishNode(specifier, type)); + node.specifiers.push(this.finishImportSpecifier(specifier, type)); } - - maybeParseDefaultImportSpecifier(node) { - node.importKind = "value"; - let kind = null; - - if (this.match(81)) { - kind = "typeof"; - } else if (this.isContextual(120)) { - kind = "type"; + isPotentialImportPhase(isExport) { + if (super.isPotentialImportPhase(isExport)) return true; + if (this.isContextual(130)) { + if (!isExport) return true; + const ch = this.lookaheadCharCode(); + return ch === 123 || ch === 42; } - - if (kind) { - const lh = this.lookahead(); - const { - type - } = lh; - - if (kind === "type" && type === 49) { - this.unexpected(lh.start); - } - - if (isMaybeDefaultImport(type) || type === 5 || type === 49) { - this.next(); - node.importKind = kind; - } - } - - return super.maybeParseDefaultImportSpecifier(node); + return !isExport && this.isContextual(87); } - - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) { + applyImportPhase(node, isExport, phase, loc) { + super.applyImportPhase(node, isExport, phase, loc); + if (isExport) { + if (!phase && this.match(65)) { + return; + } + node.exportKind = phase === "type" ? phase : "value"; + } else { + if (phase === "type" && this.match(55)) this.unexpected(); + node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; + } + } + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { const firstIdent = specifier.imported; let specifierTypeKind = null; - if (firstIdent.type === "Identifier") { if (firstIdent.name === "type") { specifierTypeKind = "type"; @@ -6743,12 +7972,9 @@ var flow = (superClass => class extends superClass { specifierTypeKind = "typeof"; } } - let isBinding = false; - - if (this.isContextual(87) && !this.isLookaheadContextual("as")) { + if (this.isContextual(93) && !this.isLookaheadContextual("as")) { const as_ident = this.parseIdentifier(true); - if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) { specifier.imported = as_ident; specifier.importKind = specifierTypeKind; @@ -6764,68 +7990,57 @@ var flow = (superClass => class extends superClass { specifier.importKind = specifierTypeKind; } else { if (importedIsString) { - throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, firstIdent.value); + throw this.raise(Errors.ImportBindingIsString, { + at: specifier, + importName: firstIdent.value + }); } - specifier.imported = firstIdent; specifier.importKind = null; } - - if (this.eatContextual(87)) { + if (this.eatContextual(93)) { specifier.local = this.parseIdentifier(); } else { isBinding = true; specifier.local = cloneIdentifier(specifier.imported); } } - const specifierIsTypeImport = hasTypeImportKind(specifier); - if (isInTypeOnlyImport && specifierIsTypeImport) { - this.raise(specifier.start, FlowErrors.ImportTypeShorthandOnlyInPureImport); + this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, { + at: specifier + }); } - if (isInTypeOnlyImport || specifierIsTypeImport) { - this.checkReservedType(specifier.local.name, specifier.local.start, true); + this.checkReservedType(specifier.local.name, specifier.local.loc.start, true); } - if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) { - this.checkReservedWord(specifier.local.name, specifier.start, true, true); + this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true); } - - this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL); - return this.finishNode(specifier, "ImportSpecifier"); + return this.finishImportSpecifier(specifier, "ImportSpecifier"); } - parseBindingAtom() { switch (this.state.type) { - case 72: + case 78: return this.parseIdentifier(true); - default: return super.parseBindingAtom(); } } - - parseFunctionParams(node, allowModifiers) { + parseFunctionParams(node, isConstructor) { const kind = node.kind; - - if (kind !== "get" && kind !== "set" && this.match(43)) { + if (kind !== "get" && kind !== "set" && this.match(47)) { node.typeParameters = this.flowParseTypeParameterDeclaration(); } - - super.parseFunctionParams(node, allowModifiers); + super.parseFunctionParams(node, isConstructor); } - parseVarId(decl, kind) { super.parseVarId(decl, kind); - if (this.match(14)) { decl.id.typeAnnotation = this.flowParseTypeAnnotation(); this.resetEndLocation(decl.id); } } - parseAsyncArrowFromCallExpression(node, call) { if (this.match(14)) { const oldNoAnonFunctionType = this.state.noAnonFunctionType; @@ -6833,44 +8048,33 @@ var flow = (superClass => class extends superClass { node.returnType = this.flowParseTypeAnnotation(); this.state.noAnonFunctionType = oldNoAnonFunctionType; } - return super.parseAsyncArrowFromCallExpression(node, call); } - shouldParseAsyncArrow() { return this.match(14) || super.shouldParseAsyncArrow(); } - parseMaybeAssign(refExpressionErrors, afterLeftParse) { var _jsx; - let state = null; let jsx; - - if (this.hasPlugin("jsx") && (this.match(132) || this.match(43))) { + if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) { state = this.state.clone(); jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); if (!jsx.error) return jsx.node; const { context } = this.state; - const curContext = context[context.length - 1]; - - if (curContext === types.j_oTag) { - context.length -= 2; - } else if (curContext === types.j_expr) { - context.length -= 1; + const currentContext = context[context.length - 1]; + if (currentContext === types$1.j_oTag || currentContext === types$1.j_expr) { + context.pop(); } } - - if ((_jsx = jsx) != null && _jsx.error || this.match(43)) { + if ((_jsx = jsx) != null && _jsx.error || this.match(47)) { var _jsx2, _jsx3; - state = state || this.state.clone(); let typeParameters; const arrow = this.tryParse(abort => { var _arrowExpression$extr; - typeParameters = this.flowParseTypeParameterDeclaration(); const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => { const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); @@ -6885,37 +8089,33 @@ var flow = (superClass => class extends superClass { return arrowExpression; }, state); let arrowExpression = null; - if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") { if (!arrow.error && !arrow.aborted) { if (arrow.node.async) { - this.raise(typeParameters.start, FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction); + this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, { + at: typeParameters + }); } - return arrow.node; } - arrowExpression = arrow.node; } - if ((_jsx2 = jsx) != null && _jsx2.node) { this.state = jsx.failState; return jsx.node; } - if (arrowExpression) { this.state = arrow.failState; return arrowExpression; } - if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error; if (arrow.thrown) throw arrow.error; - throw this.raise(typeParameters.start, FlowErrors.UnexpectedTokenAfterTypeParameter); + throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, { + at: typeParameters + }); } - return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); } - parseArrow(node) { if (this.match(14)) { const result = this.tryParse(() => { @@ -6932,14 +8132,11 @@ var flow = (superClass => class extends superClass { if (result.error) this.state = result.failState; node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null; } - return super.parseArrow(node); } - shouldParseArrow(params) { return this.match(14) || super.shouldParseArrow(params); } - setArrowFunctionParameters(node, params) { if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { node.params = params; @@ -6947,375 +8144,281 @@ var flow = (superClass => class extends superClass { super.setArrowFunctionParameters(node, params); } } - - checkParams(node, allowDuplicates, isArrowFunction) { + checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) { return; } - for (let i = 0; i < node.params.length; i++) { if (this.isThisParam(node.params[i]) && i > 0) { - this.raise(node.params[i].start, FlowErrors.ThisParamMustBeFirst); + this.raise(FlowErrors.ThisParamMustBeFirst, { + at: node.params[i] + }); } } - - return super.checkParams(...arguments); + super.checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged); } - parseParenAndDistinguishExpression(canBeArrow) { return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1); } - - parseSubscripts(base, startPos, startLoc, noCalls) { - if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) { + parseSubscripts(base, startLoc, noCalls) { + if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startLoc.index) !== -1) { this.next(); - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); node.callee = base; - node.arguments = this.parseCallExpressionArguments(11, false); + node.arguments = super.parseCallExpressionArguments(11, false); base = this.finishNode(node, "CallExpression"); - } else if (base.type === "Identifier" && base.name === "async" && this.match(43)) { + } else if (base.type === "Identifier" && base.name === "async" && this.match(47)) { const state = this.state.clone(); - const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state); + const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startLoc) || abort(), state); if (!arrow.error && !arrow.aborted) return arrow.node; - const result = this.tryParse(() => super.parseSubscripts(base, startPos, startLoc, noCalls), state); + const result = this.tryParse(() => super.parseSubscripts(base, startLoc, noCalls), state); if (result.node && !result.error) return result.node; - if (arrow.node) { this.state = arrow.failState; return arrow.node; } - if (result.node) { this.state = result.failState; return result.node; } - throw arrow.error || result.error; } - - return super.parseSubscripts(base, startPos, startLoc, noCalls); + return super.parseSubscripts(base, startLoc, noCalls); } - - parseSubscript(base, startPos, startLoc, noCalls, subscriptState) { + parseSubscript(base, startLoc, noCalls, subscriptState) { if (this.match(18) && this.isLookaheadToken_lt()) { subscriptState.optionalChainMember = true; - if (noCalls) { subscriptState.stop = true; return base; } - this.next(); - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); node.callee = base; node.typeArguments = this.flowParseTypeParameterInstantiation(); this.expect(10); node.arguments = this.parseCallExpressionArguments(11, false); node.optional = true; return this.finishCallExpression(node, true); - } else if (!noCalls && this.shouldParseTypes() && this.match(43)) { - const node = this.startNodeAt(startPos, startLoc); + } else if (!noCalls && this.shouldParseTypes() && this.match(47)) { + const node = this.startNodeAt(startLoc); node.callee = base; const result = this.tryParse(() => { node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew(); this.expect(10); - node.arguments = this.parseCallExpressionArguments(11, false); - if (subscriptState.optionalChainMember) node.optional = false; + node.arguments = super.parseCallExpressionArguments(11, false); + if (subscriptState.optionalChainMember) { + node.optional = false; + } return this.finishCallExpression(node, subscriptState.optionalChainMember); }); - if (result.node) { if (result.error) this.state = result.failState; return result.node; } } - - return super.parseSubscript(base, startPos, startLoc, noCalls, subscriptState); + return super.parseSubscript(base, startLoc, noCalls, subscriptState); } - - parseNewArguments(node) { + parseNewCallee(node) { + super.parseNewCallee(node); let targs = null; - - if (this.shouldParseTypes() && this.match(43)) { + if (this.shouldParseTypes() && this.match(47)) { targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node; } - node.typeArguments = targs; - super.parseNewArguments(node); } - - parseAsyncArrowWithTypeParameters(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - this.parseFunctionParams(node); + parseAsyncArrowWithTypeParameters(startLoc) { + const node = this.startNodeAt(startLoc); + this.parseFunctionParams(node, false); if (!this.parseArrow(node)) return; - return this.parseArrowExpression(node, undefined, true); + return super.parseArrowExpression(node, undefined, true); } - readToken_mult_modulo(code) { const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 42 && next === 47 && this.state.hasFlowComment) { this.state.hasFlowComment = false; this.state.pos += 2; this.nextToken(); return; } - super.readToken_mult_modulo(code); } - readToken_pipe_amp(code) { const next = this.input.charCodeAt(this.state.pos + 1); - if (code === 124 && next === 125) { this.finishOp(9, 2); return; } - super.readToken_pipe_amp(code); } - parseTopLevel(file, program) { const fileNode = super.parseTopLevel(file, program); - if (this.state.hasFlowComment) { - this.raise(this.state.pos, FlowErrors.UnterminatedFlowComment); + this.raise(FlowErrors.UnterminatedFlowComment, { + at: this.state.curPosition() + }); } - return fileNode; } - skipBlockComment() { if (this.hasPlugin("flowComments") && this.skipFlowComment()) { if (this.state.hasFlowComment) { - this.unexpected(null, FlowErrors.NestedFlowComment); + throw this.raise(FlowErrors.NestedFlowComment, { + at: this.state.startLoc + }); } - this.hasFlowCommentCompletion(); - this.state.pos += this.skipFlowComment(); - this.state.hasFlowComment = true; - return; - } - - if (this.state.hasFlowComment) { - const end = this.input.indexOf("*-/", this.state.pos += 2); - - if (end === -1) { - throw this.raise(this.state.pos - 2, ErrorMessages.UnterminatedComment); + const commentSkip = this.skipFlowComment(); + if (commentSkip) { + this.state.pos += commentSkip; + this.state.hasFlowComment = true; } - - this.state.pos = end + 3; return; } - - return super.skipBlockComment(); + return super.skipBlockComment(this.state.hasFlowComment ? "*-/" : "*/"); } - skipFlowComment() { const { pos } = this.state; let shiftToFirstNonWhiteSpace = 2; - while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) { shiftToFirstNonWhiteSpace++; } - const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos); const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1); - if (ch2 === 58 && ch3 === 58) { return shiftToFirstNonWhiteSpace + 2; } - if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") { return shiftToFirstNonWhiteSpace + 12; } - if (ch2 === 58 && ch3 !== 58) { return shiftToFirstNonWhiteSpace; } - return false; } - hasFlowCommentCompletion() { const end = this.input.indexOf("*/", this.state.pos); - if (end === -1) { - throw this.raise(this.state.pos, ErrorMessages.UnterminatedComment); + throw this.raise(Errors.UnterminatedComment, { + at: this.state.curPosition() + }); } } - - flowEnumErrorBooleanMemberNotInitialized(pos, { + flowEnumErrorBooleanMemberNotInitialized(loc, { enumName, memberName }) { - this.raise(pos, FlowErrors.EnumBooleanMemberNotInitialized, memberName, enumName); + this.raise(FlowErrors.EnumBooleanMemberNotInitialized, { + at: loc, + memberName, + enumName + }); } - - flowEnumErrorInvalidMemberName(pos, { + flowEnumErrorInvalidMemberInitializer(loc, enumContext) { + return this.raise(!enumContext.explicitType ? FlowErrors.EnumInvalidMemberInitializerUnknownType : enumContext.explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerPrimaryType, Object.assign({ + at: loc + }, enumContext)); + } + flowEnumErrorNumberMemberNotInitialized(loc, { enumName, memberName }) { - const suggestion = memberName[0].toUpperCase() + memberName.slice(1); - this.raise(pos, FlowErrors.EnumInvalidMemberName, memberName, suggestion, enumName); + this.raise(FlowErrors.EnumNumberMemberNotInitialized, { + at: loc, + enumName, + memberName + }); } - - flowEnumErrorDuplicateMemberName(pos, { - enumName, - memberName - }) { - this.raise(pos, FlowErrors.EnumDuplicateMemberName, memberName, enumName); - } - - flowEnumErrorInconsistentMemberValues(pos, { + flowEnumErrorStringMemberInconsistentlyInitialized(node, { enumName }) { - this.raise(pos, FlowErrors.EnumInconsistentMemberValues, enumName); + this.raise(FlowErrors.EnumStringMemberInconsistentlyInitialized, { + at: node, + enumName + }); } - - flowEnumErrorInvalidExplicitType(pos, { - enumName, - suppliedType - }) { - return this.raise(pos, suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, enumName, suppliedType); - } - - flowEnumErrorInvalidMemberInitializer(pos, { - enumName, - explicitType, - memberName - }) { - let message = null; - - switch (explicitType) { - case "boolean": - case "number": - case "string": - message = FlowErrors.EnumInvalidMemberInitializerPrimaryType; - break; - - case "symbol": - message = FlowErrors.EnumInvalidMemberInitializerSymbolType; - break; - - default: - message = FlowErrors.EnumInvalidMemberInitializerUnknownType; - } - - return this.raise(pos, message, enumName, memberName, explicitType); - } - - flowEnumErrorNumberMemberNotInitialized(pos, { - enumName, - memberName - }) { - this.raise(pos, FlowErrors.EnumNumberMemberNotInitialized, enumName, memberName); - } - - flowEnumErrorStringMemberInconsistentlyInitailized(pos, { - enumName - }) { - this.raise(pos, FlowErrors.EnumStringMemberInconsistentlyInitailized, enumName); - } - flowEnumMemberInit() { - const startPos = this.state.start; - + const startLoc = this.state.startLoc; const endOfInit = () => this.match(12) || this.match(8); - switch (this.state.type) { - case 124: + case 134: { const literal = this.parseNumericLiteral(this.state.value); - if (endOfInit()) { return { type: "number", - pos: literal.start, + loc: literal.loc.start, value: literal }; } - return { type: "invalid", - pos: startPos + loc: startLoc }; } - - case 123: + case 133: { const literal = this.parseStringLiteral(this.state.value); - if (endOfInit()) { return { type: "string", - pos: literal.start, + loc: literal.loc.start, value: literal }; } - return { type: "invalid", - pos: startPos + loc: startLoc }; } - - case 79: - case 80: + case 85: + case 86: { - const literal = this.parseBooleanLiteral(this.match(79)); - + const literal = this.parseBooleanLiteral(this.match(85)); if (endOfInit()) { return { type: "boolean", - pos: literal.start, + loc: literal.loc.start, value: literal }; } - return { type: "invalid", - pos: startPos + loc: startLoc }; } - default: return { type: "invalid", - pos: startPos + loc: startLoc }; } } - flowEnumMemberRaw() { - const pos = this.state.start; + const loc = this.state.startLoc; const id = this.parseIdentifier(true); - const init = this.eat(27) ? this.flowEnumMemberInit() : { + const init = this.eat(29) ? this.flowEnumMemberInit() : { type: "none", - pos + loc }; return { id, init }; } - - flowEnumCheckExplicitTypeMismatch(pos, context, expectedType) { + flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) { const { explicitType } = context; - if (explicitType === null) { return; } - if (explicitType !== expectedType) { - this.flowEnumErrorInvalidMemberInitializer(pos, context); + this.flowEnumErrorInvalidMemberInitializer(loc, context); } } - flowEnumMembers({ enumName, explicitType @@ -7328,38 +8431,35 @@ var flow = (superClass => class extends superClass { defaultedMembers: [] }; let hasUnknownMembers = false; - while (!this.match(8)) { if (this.eat(21)) { hasUnknownMembers = true; break; } - const memberNode = this.startNode(); const { id, init } = this.flowEnumMemberRaw(); const memberName = id.name; - if (memberName === "") { continue; } - if (/^[a-z]/.test(memberName)) { - this.flowEnumErrorInvalidMemberName(id.start, { - enumName, - memberName + this.raise(FlowErrors.EnumInvalidMemberName, { + at: id, + memberName, + suggestion: memberName[0].toUpperCase() + memberName.slice(1), + enumName }); } - if (seenNames.has(memberName)) { - this.flowEnumErrorDuplicateMemberName(id.start, { - enumName, - memberName + this.raise(FlowErrors.EnumDuplicateMemberName, { + at: id, + memberName, + enumName }); } - seenNames.add(memberName); const context = { enumName, @@ -7367,65 +8467,55 @@ var flow = (superClass => class extends superClass { memberName }; memberNode.id = id; - switch (init.type) { case "boolean": { - this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "boolean"); + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean"); memberNode.init = init.value; members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember")); break; } - case "number": { - this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "number"); + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number"); memberNode.init = init.value; members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember")); break; } - case "string": { - this.flowEnumCheckExplicitTypeMismatch(init.pos, context, "string"); + this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string"); memberNode.init = init.value; members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember")); break; } - case "invalid": { - throw this.flowEnumErrorInvalidMemberInitializer(init.pos, context); + throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context); } - case "none": { switch (explicitType) { case "boolean": - this.flowEnumErrorBooleanMemberNotInitialized(init.pos, context); + this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context); break; - case "number": - this.flowEnumErrorNumberMemberNotInitialized(init.pos, context); + this.flowEnumErrorNumberMemberNotInitialized(init.loc, context); break; - default: members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember")); } } } - if (!this.match(8)) { this.expect(12); } } - return { members, hasUnknownMembers }; } - flowEnumStringMembers(initializedMembers, defaultedMembers, { enumName }) { @@ -7435,56 +8525,46 @@ var flow = (superClass => class extends superClass { return initializedMembers; } else if (defaultedMembers.length > initializedMembers.length) { for (const member of initializedMembers) { - this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, { + this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { enumName }); } - return defaultedMembers; } else { for (const member of defaultedMembers) { - this.flowEnumErrorStringMemberInconsistentlyInitailized(member.start, { + this.flowEnumErrorStringMemberInconsistentlyInitialized(member, { enumName }); } - return initializedMembers; } } - flowEnumParseExplicitType({ enumName }) { - if (this.eatContextual(95)) { - if (!tokenIsIdentifier(this.state.type)) { - throw this.flowEnumErrorInvalidExplicitType(this.state.start, { - enumName, - suppliedType: null - }); - } - - const { - value - } = this.state; - this.next(); - - if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") { - this.flowEnumErrorInvalidExplicitType(this.state.start, { - enumName, - suppliedType: value - }); - } - - return value; + if (!this.eatContextual(102)) return null; + if (!tokenIsIdentifier(this.state.type)) { + throw this.raise(FlowErrors.EnumInvalidExplicitTypeUnknownSupplied, { + at: this.state.startLoc, + enumName + }); } - - return null; + const { + value + } = this.state; + this.next(); + if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") { + this.raise(FlowErrors.EnumInvalidExplicitType, { + at: this.state.startLoc, + enumName, + invalidEnumType: value + }); + } + return value; } - - flowEnumBody(node, { - enumName, - nameLoc - }) { + flowEnumBody(node, id) { + const enumName = id.name; + const nameLoc = id.loc.start; const explicitType = this.flowEnumParseExplicitType({ enumName }); @@ -7497,20 +8577,17 @@ var flow = (superClass => class extends superClass { explicitType }); node.hasUnknownMembers = hasUnknownMembers; - switch (explicitType) { case "boolean": node.explicitType = true; node.members = members.booleanMembers; this.expect(8); return this.finishNode(node, "EnumBooleanBody"); - case "number": node.explicitType = true; node.members = members.numberMembers; this.expect(8); return this.finishNode(node, "EnumNumberBody"); - case "string": node.explicitType = true; node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, { @@ -7518,12 +8595,10 @@ var flow = (superClass => class extends superClass { }); this.expect(8); return this.finishNode(node, "EnumStringBody"); - case "symbol": node.members = members.defaultedMembers; this.expect(8); return this.finishNode(node, "EnumSymbolBody"); - default: { const empty = () => { @@ -7531,13 +8606,11 @@ var flow = (superClass => class extends superClass { this.expect(8); return this.finishNode(node, "EnumStringBody"); }; - node.explicitType = false; const boolsLen = members.booleanMembers.length; const numsLen = members.numberMembers.length; const strsLen = members.stringMembers.length; const defaultedLen = members.defaultedMembers.length; - if (!boolsLen && !numsLen && !strsLen && !defaultedLen) { return empty(); } else if (!boolsLen && !numsLen) { @@ -7548,28 +8621,27 @@ var flow = (superClass => class extends superClass { return this.finishNode(node, "EnumStringBody"); } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) { for (const member of members.defaultedMembers) { - this.flowEnumErrorBooleanMemberNotInitialized(member.start, { + this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, { enumName, memberName: member.id.name }); } - node.members = members.booleanMembers; this.expect(8); return this.finishNode(node, "EnumBooleanBody"); } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) { for (const member of members.defaultedMembers) { - this.flowEnumErrorNumberMemberNotInitialized(member.start, { + this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, { enumName, memberName: member.id.name }); } - node.members = members.numberMembers; this.expect(8); return this.finishNode(node, "EnumNumberBody"); } else { - this.flowEnumErrorInconsistentMemberValues(nameLoc, { + this.raise(FlowErrors.EnumInconsistentMemberValues, { + at: nameLoc, enumName }); return empty(); @@ -7577,35 +8649,26 @@ var flow = (superClass => class extends superClass { } } } - flowParseEnumDeclaration(node) { const id = this.parseIdentifier(); node.id = id; - node.body = this.flowEnumBody(this.startNode(), { - enumName: id.name, - nameLoc: id.start - }); + node.body = this.flowEnumBody(this.startNode(), id); return this.finishNode(node, "EnumDeclaration"); } - isLookaheadToken_lt() { const next = this.nextTokenStart(); - if (this.input.charCodeAt(next) === 60) { const afterNext = this.input.charCodeAt(next + 1); return afterNext !== 60 && afterNext !== 61; } - return false; } - maybeUnwrapTypeCastExpression(node) { return node.type === "TypeCastExpression" ? node.expression : node; } - -}); - +}; const entities = { + __proto__: null, quot: "\u0022", amp: "&", apos: "\u0027", @@ -7860,78 +8923,69 @@ const entities = { hearts: "\u2665", diams: "\u2666" }; - -const HEX_NUMBER = /^[\da-fA-F]+$/; -const DECIMAL_NUMBER = /^\d+$/; -const JsxErrors = makeErrorTemplates({ +const JsxErrors = ParseErrorEnum`jsx`({ AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.", - MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.", + MissingClosingTagElement: ({ + openingTagName + }) => `Expected corresponding JSX closing tag for <${openingTagName}>.`, 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, + HTMLEntity + }) => `Unexpected token \`${unexpected}\`. Did you mean \`${HTMLEntity}\` or \`{'${unexpected}'}\`?`, 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 <>...</>?" -}, ErrorCodes.SyntaxError, "jsx"); -types.j_oTag = new TokContext("<tag"); -types.j_cTag = new TokContext("</tag"); -types.j_expr = new TokContext("<tag>...</tag>", true); - +}); function isFragment(object) { return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false; } - function getQualifiedJSXName(object) { if (object.type === "JSXIdentifier") { return object.name; } - if (object.type === "JSXNamespacedName") { return object.namespace.name + ":" + object.name.name; } - if (object.type === "JSXMemberExpression") { return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); } - throw new Error("Node had unexpected type: " + object.type); } - -var jsx = (superClass => class extends superClass { +var jsx = superClass => class JSXParserMixin extends superClass { jsxReadToken() { let out = ""; let chunkStart = this.state.pos; - for (;;) { if (this.state.pos >= this.length) { - throw this.raise(this.state.start, JsxErrors.UnterminatedJsxContent); + throw this.raise(JsxErrors.UnterminatedJsxContent, { + at: this.state.startLoc + }); } - const ch = this.input.charCodeAt(this.state.pos); - switch (ch) { case 60: case 123: if (this.state.pos === this.state.start) { if (ch === 60 && this.state.canStartJSXElement) { ++this.state.pos; - return this.finishToken(132); + this.finishToken(142); + } else { + super.getTokenFromCode(ch); } - - return super.getTokenFromCode(ch); + return; } - out += this.input.slice(chunkStart, this.state.pos); - return this.finishToken(131, out); - + this.finishToken(141, out); + return; case 38: out += this.input.slice(chunkStart, this.state.pos); out += this.jsxReadEntity(); chunkStart = this.state.pos; break; - case 62: case 125: - default: if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.state.pos); @@ -7940,40 +8994,34 @@ var jsx = (superClass => class extends superClass { } else { ++this.state.pos; } - } } } - jsxReadNewLine(normalizeCRLF) { const ch = this.input.charCodeAt(this.state.pos); let out; ++this.state.pos; - if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) { ++this.state.pos; out = normalizeCRLF ? "\n" : "\r\n"; } else { out = String.fromCharCode(ch); } - ++this.state.curLine; this.state.lineStart = this.state.pos; return out; } - jsxReadString(quote) { let out = ""; let chunkStart = ++this.state.pos; - for (;;) { if (this.state.pos >= this.length) { - throw this.raise(this.state.start, ErrorMessages.UnterminatedString); + throw this.raise(Errors.UnterminatedString, { + at: this.state.startLoc + }); } - const ch = this.input.charCodeAt(this.state.pos); if (ch === quote) break; - if (ch === 38) { out += this.input.slice(chunkStart, this.state.pos); out += this.jsxReadEntity(); @@ -7986,267 +9034,228 @@ var jsx = (superClass => class extends superClass { ++this.state.pos; } } - out += this.input.slice(chunkStart, this.state.pos++); - return this.finishToken(123, out); + this.finishToken(133, out); } - jsxReadEntity() { - let str = ""; - let count = 0; - let entity; - let ch = this.input[this.state.pos]; const startPos = ++this.state.pos; - - while (this.state.pos < this.length && count++ < 10) { - ch = this.input[this.state.pos++]; - - if (ch === ";") { - if (str[0] === "#") { - if (str[1] === "x") { - str = str.substr(2); - - if (HEX_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 16)); - } - } else { - str = str.substr(1); - - if (DECIMAL_NUMBER.test(str)) { - entity = String.fromCodePoint(parseInt(str, 10)); - } - } - } else { - entity = entities[str]; - } - - break; + if (this.codePointAtPos(this.state.pos) === 35) { + ++this.state.pos; + let radix = 10; + if (this.codePointAtPos(this.state.pos) === 120) { + radix = 16; + ++this.state.pos; + } + const codePoint = this.readInt(radix, undefined, false, "bail"); + if (codePoint !== null && this.codePointAtPos(this.state.pos) === 59) { + ++this.state.pos; + return String.fromCodePoint(codePoint); + } + } else { + let count = 0; + let semi = false; + while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) == 59)) { + ++this.state.pos; + } + if (semi) { + const desc = this.input.slice(startPos, this.state.pos); + const entity = entities[desc]; + ++this.state.pos; + if (entity) { + return entity; + } } - - str += ch; } - - if (!entity) { - this.state.pos = startPos; - return "&"; - } - - return entity; + this.state.pos = startPos; + return "&"; } - jsxReadWord() { let ch; const start = this.state.pos; - do { ch = this.input.charCodeAt(++this.state.pos); } while (isIdentifierChar(ch) || ch === 45); - - return this.finishToken(130, this.input.slice(start, this.state.pos)); + this.finishToken(140, this.input.slice(start, this.state.pos)); } - jsxParseIdentifier() { const node = this.startNode(); - - if (this.match(130)) { + if (this.match(140)) { node.name = this.state.value; } else if (tokenIsKeyword(this.state.type)) { node.name = tokenLabelName(this.state.type); } else { this.unexpected(); } - this.next(); return this.finishNode(node, "JSXIdentifier"); } - jsxParseNamespacedName() { - const startPos = this.state.start; const startLoc = this.state.startLoc; const name = this.jsxParseIdentifier(); if (!this.eat(14)) return name; - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); node.namespace = name; node.name = this.jsxParseIdentifier(); return this.finishNode(node, "JSXNamespacedName"); } - jsxParseElementName() { - const startPos = this.state.start; const startLoc = this.state.startLoc; let node = this.jsxParseNamespacedName(); - if (node.type === "JSXNamespacedName") { return node; } - while (this.eat(16)) { - const newNode = this.startNodeAt(startPos, startLoc); + const newNode = this.startNodeAt(startLoc); newNode.object = node; newNode.property = this.jsxParseIdentifier(); node = this.finishNode(newNode, "JSXMemberExpression"); } - return node; } - jsxParseAttributeValue() { let node; - switch (this.state.type) { case 5: node = this.startNode(); + this.setContext(types$1.brace); this.next(); - node = this.jsxParseExpressionContainer(node); - + node = this.jsxParseExpressionContainer(node, types$1.j_oTag); if (node.expression.type === "JSXEmptyExpression") { - this.raise(node.start, JsxErrors.AttributeIsEmpty); + this.raise(JsxErrors.AttributeIsEmpty, { + at: node + }); } - return node; - - case 132: - case 123: + case 142: + case 133: return this.parseExprAtom(); - default: - throw this.raise(this.state.start, JsxErrors.UnsupportedJsxValue); + throw this.raise(JsxErrors.UnsupportedJsxValue, { + at: this.state.startLoc + }); } } - jsxParseEmptyExpression() { - const node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc); - return this.finishNodeAt(node, "JSXEmptyExpression", this.state.start, this.state.startLoc); + const node = this.startNodeAt(this.state.lastTokEndLoc); + return this.finishNodeAt(node, "JSXEmptyExpression", this.state.startLoc); } - jsxParseSpreadChild(node) { this.next(); node.expression = this.parseExpression(); + this.setContext(types$1.j_expr); + this.state.canStartJSXElement = true; this.expect(8); return this.finishNode(node, "JSXSpreadChild"); } - - jsxParseExpressionContainer(node) { + jsxParseExpressionContainer(node, previousContext) { if (this.match(8)) { node.expression = this.jsxParseEmptyExpression(); } else { const expression = this.parseExpression(); node.expression = expression; } - + this.setContext(previousContext); + this.state.canStartJSXElement = true; this.expect(8); return this.finishNode(node, "JSXExpressionContainer"); } - jsxParseAttribute() { const node = this.startNode(); - - if (this.eat(5)) { + if (this.match(5)) { + this.setContext(types$1.brace); + this.next(); this.expect(21); node.argument = this.parseMaybeAssignAllowIn(); + this.setContext(types$1.j_oTag); + this.state.canStartJSXElement = true; this.expect(8); return this.finishNode(node, "JSXSpreadAttribute"); } - node.name = this.jsxParseNamespacedName(); - node.value = this.eat(27) ? this.jsxParseAttributeValue() : null; + node.value = this.eat(29) ? this.jsxParseAttributeValue() : null; return this.finishNode(node, "JSXAttribute"); } - - jsxParseOpeningElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - - if (this.match(133)) { - this.expect(133); + jsxParseOpeningElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + if (this.eat(143)) { return this.finishNode(node, "JSXOpeningFragment"); } - node.name = this.jsxParseElementName(); return this.jsxParseOpeningElementAfterName(node); } - jsxParseOpeningElementAfterName(node) { const attributes = []; - - while (!this.match(50) && !this.match(133)) { + while (!this.match(56) && !this.match(143)) { attributes.push(this.jsxParseAttribute()); } - node.attributes = attributes; - node.selfClosing = this.eat(50); - this.expect(133); + node.selfClosing = this.eat(56); + this.expect(143); return this.finishNode(node, "JSXOpeningElement"); } - - jsxParseClosingElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - - if (this.match(133)) { - this.expect(133); + jsxParseClosingElementAt(startLoc) { + const node = this.startNodeAt(startLoc); + if (this.eat(143)) { return this.finishNode(node, "JSXClosingFragment"); } - node.name = this.jsxParseElementName(); - this.expect(133); + this.expect(143); return this.finishNode(node, "JSXClosingElement"); } - - jsxParseElementAt(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); + jsxParseElementAt(startLoc) { + const node = this.startNodeAt(startLoc); const children = []; - const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc); + const openingElement = this.jsxParseOpeningElementAt(startLoc); let closingElement = null; - if (!openingElement.selfClosing) { contents: for (;;) { switch (this.state.type) { - case 132: - startPos = this.state.start; + case 142: startLoc = this.state.startLoc; this.next(); - - if (this.eat(50)) { - closingElement = this.jsxParseClosingElementAt(startPos, startLoc); + if (this.eat(56)) { + closingElement = this.jsxParseClosingElementAt(startLoc); break contents; } - - children.push(this.jsxParseElementAt(startPos, startLoc)); + children.push(this.jsxParseElementAt(startLoc)); break; - - case 131: + case 141: children.push(this.parseExprAtom()); break; - case 5: { const node = this.startNode(); + this.setContext(types$1.brace); this.next(); - if (this.match(21)) { children.push(this.jsxParseSpreadChild(node)); } else { - children.push(this.jsxParseExpressionContainer(node)); + children.push(this.jsxParseExpressionContainer(node, types$1.j_expr)); } - break; } - default: - throw this.unexpected(); + this.unexpected(); } } - - if (isFragment(openingElement) && !isFragment(closingElement)) { - this.raise(closingElement.start, JsxErrors.MissingClosingTagFragment); + if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) { + this.raise(JsxErrors.MissingClosingTagFragment, { + at: closingElement + }); } else if (!isFragment(openingElement) && isFragment(closingElement)) { - this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name)); + this.raise(JsxErrors.MissingClosingTagElement, { + at: closingElement, + openingTagName: getQualifiedJSXName(openingElement.name) + }); } else if (!isFragment(openingElement) && !isFragment(closingElement)) { if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { - this.raise(closingElement.start, JsxErrors.MissingClosingTagElement, getQualifiedJSXName(openingElement.name)); + this.raise(JsxErrors.MissingClosingTagElement, { + at: closingElement, + openingTagName: getQualifiedJSXName(openingElement.name) + }); } } } - if (isFragment(openingElement)) { node.openingFragment = openingElement; node.closingFragment = closingElement; @@ -8254,94 +9263,93 @@ var jsx = (superClass => class extends superClass { node.openingElement = openingElement; node.closingElement = closingElement; } - node.children = children; - - if (this.match(43)) { - throw this.raise(this.state.start, JsxErrors.UnwrappedAdjacentJSXElements); + if (this.match(47)) { + throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, { + at: this.state.startLoc + }); } - return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement"); } - jsxParseElement() { - const startPos = this.state.start; const startLoc = this.state.startLoc; this.next(); - return this.jsxParseElementAt(startPos, startLoc); + return this.jsxParseElementAt(startLoc); + } + setContext(newContext) { + const { + context + } = this.state; + context[context.length - 1] = newContext; } - parseExprAtom(refExpressionErrors) { - if (this.match(131)) { + if (this.match(141)) { return this.parseLiteral(this.state.value, "JSXText"); - } else if (this.match(132)) { + } else if (this.match(142)) { return this.jsxParseElement(); - } else if (this.match(43) && this.input.charCodeAt(this.state.pos) !== 33) { - this.replaceToken(132); + } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) { + this.replaceToken(142); return this.jsxParseElement(); } else { return super.parseExprAtom(refExpressionErrors); } } - + skipSpace() { + const curContext = this.curContext(); + if (!curContext.preserveSpace) super.skipSpace(); + } getTokenFromCode(code) { const context = this.curContext(); - - if (context === types.j_expr) { - return this.jsxReadToken(); + if (context === types$1.j_expr) { + this.jsxReadToken(); + return; } - - if (context === types.j_oTag || context === types.j_cTag) { + if (context === types$1.j_oTag || context === types$1.j_cTag) { if (isIdentifierStart(code)) { - return this.jsxReadWord(); + this.jsxReadWord(); + return; } - if (code === 62) { ++this.state.pos; - return this.finishToken(133); + this.finishToken(143); + return; } - - if ((code === 34 || code === 39) && context === types.j_oTag) { - return this.jsxReadString(code); + if ((code === 34 || code === 39) && context === types$1.j_oTag) { + this.jsxReadString(code); + return; } } - if (code === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) { ++this.state.pos; - return this.finishToken(132); + this.finishToken(142); + return; } - - return super.getTokenFromCode(code); + super.getTokenFromCode(code); } - updateContext(prevType) { - super.updateContext(prevType); const { context, type } = this.state; - - if (type === 50 && prevType === 132) { - context.splice(-2, 2, types.j_cTag); + if (type === 56 && prevType === 142) { + context.splice(-2, 2, types$1.j_cTag); this.state.canStartJSXElement = false; - } else if (type === 132) { - context.push(types.j_expr, types.j_oTag); - } else if (type === 133) { - const out = context.pop(); - - if (out === types.j_oTag && prevType === 50 || out === types.j_cTag) { + } else if (type === 142) { + context.push(types$1.j_oTag); + } else if (type === 143) { + const out = context[context.length - 1]; + if (out === types$1.j_oTag && prevType === 56 || out === types$1.j_cTag) { context.pop(); - this.state.canStartJSXElement = context[context.length - 1] === types.j_expr; + this.state.canStartJSXElement = context[context.length - 1] === types$1.j_expr; } else { + this.setContext(types$1.j_expr); this.state.canStartJSXElement = true; } } else { this.state.canStartJSXElement = tokenComesBeforeExpression(type); } } - -}); - +}; class TypeScriptScope extends Scope { constructor(...args) { super(...args); @@ -8351,135 +9359,610 @@ class TypeScriptScope extends Scope { this.classes = new Set(); this.exportOnlyBindings = new Set(); } - } - class TypeScriptScopeHandler extends ScopeHandler { + constructor(...args) { + super(...args); + this.importsStack = []; + } createScope(flags) { + this.importsStack.push(new Set()); return new TypeScriptScope(flags); } - - declareName(name, bindingType, pos) { + enter(flags) { + if (flags == 256) { + this.importsStack.push(new Set()); + } + super.enter(flags); + } + exit() { + const flags = super.exit(); + if (flags == 256) { + this.importsStack.pop(); + } + return flags; + } + hasImport(name, allowShadow) { + const len = this.importsStack.length; + if (this.importsStack[len - 1].has(name)) { + return true; + } + if (!allowShadow && len > 1) { + for (let i = 0; i < len - 1; i++) { + if (this.importsStack[i].has(name)) return true; + } + } + return false; + } + declareName(name, bindingType, loc) { + if (bindingType & 4096) { + if (this.hasImport(name, true)) { + this.parser.raise(Errors.VarRedeclaration, { + at: loc, + identifierName: name + }); + } + this.importsStack[this.importsStack.length - 1].add(name); + return; + } const scope = this.currentScope(); - - if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) { + if (bindingType & 1024) { this.maybeExportDefined(scope, name); scope.exportOnlyBindings.add(name); return; } - - super.declareName(...arguments); - - if (bindingType & BIND_KIND_TYPE) { - if (!(bindingType & BIND_KIND_VALUE)) { - this.checkRedeclarationInScope(scope, name, bindingType, pos); + super.declareName(name, bindingType, loc); + if (bindingType & 2) { + if (!(bindingType & 1)) { + this.checkRedeclarationInScope(scope, name, bindingType, loc); this.maybeExportDefined(scope, name); } - scope.types.add(name); } - - if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.add(name); - if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.add(name); - if (bindingType & BIND_FLAGS_CLASS) scope.classes.add(name); + if (bindingType & 256) scope.enums.add(name); + if (bindingType & 512) { + scope.constEnums.add(name); + } + if (bindingType & 128) scope.classes.add(name); } - isRedeclaredInScope(scope, name, bindingType) { if (scope.enums.has(name)) { - if (bindingType & BIND_FLAGS_TS_ENUM) { - const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM); + if (bindingType & 256) { + const isConst = !!(bindingType & 512); const wasConst = scope.constEnums.has(name); return isConst !== wasConst; } - return true; } - - if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name)) { + if (bindingType & 128 && scope.classes.has(name)) { if (scope.lexical.has(name)) { - return !!(bindingType & BIND_KIND_VALUE); + return !!(bindingType & 1); } else { return false; } } - - if (bindingType & BIND_KIND_TYPE && scope.types.has(name)) { + if (bindingType & 2 && scope.types.has(name)) { return true; } - - return super.isRedeclaredInScope(...arguments); + return super.isRedeclaredInScope(scope, name, bindingType); } - checkLocalExport(id) { - const topLevelScope = this.scopeStack[0]; const { name } = id; - - if (!topLevelScope.types.has(name) && !topLevelScope.exportOnlyBindings.has(name)) { - super.checkLocalExport(id); + if (this.hasImport(name)) return; + const len = this.scopeStack.length; + for (let i = len - 1; i >= 0; i--) { + const scope = this.scopeStack[i]; + if (scope.types.has(name) || scope.exportOnlyBindings.has(name)) return; + } + super.checkLocalExport(id); + } +} +const getOwn$1 = (object, key) => Object.hasOwnProperty.call(object, key) && object[key]; +const unwrapParenthesizedExpression = node => { + return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; +}; +class LValParser extends NodeUtils { + toAssignable(node, isLHS = false) { + var _node$extra, _node$extra3; + let parenthesized = undefined; + if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) { + parenthesized = unwrapParenthesizedExpression(node); + if (isLHS) { + if (parenthesized.type === "Identifier") { + this.expressionScope.recordArrowParameterBindingError(Errors.InvalidParenthesizedAssignment, { + at: node + }); + } else if (parenthesized.type !== "MemberExpression" && !this.isOptionalMemberExpression(parenthesized)) { + this.raise(Errors.InvalidParenthesizedAssignment, { + at: node + }); + } + } else { + this.raise(Errors.InvalidParenthesizedAssignment, { + at: node + }); + } + } + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break; + case "ObjectExpression": + node.type = "ObjectPattern"; + for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { + var _node$extra2; + const prop = node.properties[i]; + const isLast = i === last; + this.toAssignableObjectExpressionProp(prop, isLast, isLHS); + if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingCommaLoc) { + this.raise(Errors.RestTrailingComma, { + at: node.extra.trailingCommaLoc + }); + } + } + break; + case "ObjectProperty": + { + const { + key, + value + } = node; + if (this.isPrivateName(key)) { + this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start); + } + this.toAssignable(value, isLHS); + break; + } + case "SpreadElement": + { + throw new Error("Internal @babel/parser error (this is a bug, please report it)." + " SpreadElement should be converted by .toAssignable's caller."); + } + case "ArrayExpression": + node.type = "ArrayPattern"; + this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS); + break; + case "AssignmentExpression": + if (node.operator !== "=") { + this.raise(Errors.MissingEqInAssignment, { + at: node.left.loc.end + }); + } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isLHS); + break; + case "ParenthesizedExpression": + this.toAssignable(parenthesized, isLHS); + break; } } - + toAssignableObjectExpressionProp(prop, isLast, isLHS) { + if (prop.type === "ObjectMethod") { + this.raise(prop.kind === "get" || prop.kind === "set" ? Errors.PatternHasAccessor : Errors.PatternHasMethod, { + at: prop.key + }); + } else if (prop.type === "SpreadElement") { + prop.type = "RestElement"; + const arg = prop.argument; + this.checkToRestConversion(arg, false); + this.toAssignable(arg, isLHS); + if (!isLast) { + this.raise(Errors.RestTrailingComma, { + at: prop + }); + } + } else { + this.toAssignable(prop, isLHS); + } + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { + const end = exprList.length - 1; + for (let i = 0; i <= end; i++) { + const elt = exprList[i]; + if (!elt) continue; + if (elt.type === "SpreadElement") { + elt.type = "RestElement"; + const arg = elt.argument; + this.checkToRestConversion(arg, true); + this.toAssignable(arg, isLHS); + } else { + this.toAssignable(elt, isLHS); + } + if (elt.type === "RestElement") { + if (i < end) { + this.raise(Errors.RestTrailingComma, { + at: elt + }); + } else if (trailingCommaLoc) { + this.raise(Errors.RestTrailingComma, { + at: trailingCommaLoc + }); + } + } + } + } + isAssignable(node, isBinding) { + switch (node.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + return true; + case "ObjectExpression": + { + const last = node.properties.length - 1; + return node.properties.every((prop, i) => { + return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); + }); + } + case "ObjectProperty": + return this.isAssignable(node.value); + case "SpreadElement": + return this.isAssignable(node.argument); + case "ArrayExpression": + return node.elements.every(element => element === null || this.isAssignable(element)); + case "AssignmentExpression": + return node.operator === "="; + case "ParenthesizedExpression": + return this.isAssignable(node.expression); + case "MemberExpression": + case "OptionalMemberExpression": + return !isBinding; + default: + return false; + } + } + toReferencedList(exprList, isParenthesizedExpr) { + return exprList; + } + toReferencedListDeep(exprList, isParenthesizedExpr) { + this.toReferencedList(exprList, isParenthesizedExpr); + for (const expr of exprList) { + if ((expr == null ? void 0 : expr.type) === "ArrayExpression") { + this.toReferencedListDeep(expr.elements); + } + } + } + parseSpread(refExpressionErrors) { + const node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined); + return this.finishNode(node, "SpreadElement"); + } + parseRestBinding() { + const node = this.startNode(); + this.next(); + node.argument = this.parseBindingAtom(); + return this.finishNode(node, "RestElement"); + } + parseBindingAtom() { + switch (this.state.type) { + case 0: + { + const node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(3, 93, 1); + return this.finishNode(node, "ArrayPattern"); + } + case 5: + return this.parseObjectLike(8, true); + } + return this.parseIdentifier(); + } + parseBindingList(close, closeCharCode, flags) { + const allowEmpty = flags & 1; + const elts = []; + let first = true; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(12); + } + if (allowEmpty && this.match(12)) { + elts.push(null); + } else if (this.eat(close)) { + break; + } else if (this.match(21)) { + elts.push(this.parseAssignableListItemTypes(this.parseRestBinding(), flags)); + if (!this.checkCommaAfterRest(closeCharCode)) { + this.expect(close); + break; + } + } else { + const decorators = []; + if (this.match(26) && this.hasPlugin("decorators")) { + this.raise(Errors.UnsupportedParameterDecorator, { + at: this.state.startLoc + }); + } + while (this.match(26)) { + decorators.push(this.parseDecorator()); + } + elts.push(this.parseAssignableListItem(flags, decorators)); + } + } + return elts; + } + parseBindingRestProperty(prop) { + this.next(); + prop.argument = this.parseIdentifier(); + this.checkCommaAfterRest(125); + return this.finishNode(prop, "RestElement"); + } + parseBindingProperty() { + const prop = this.startNode(); + const { + type, + startLoc + } = this.state; + if (type === 21) { + return this.parseBindingRestProperty(prop); + } else if (type === 138) { + this.expectPlugin("destructuringPrivate", startLoc); + this.classScope.usePrivateName(this.state.value, startLoc); + prop.key = this.parsePrivateName(); + } else { + this.parsePropertyName(prop); + } + prop.method = false; + return this.parseObjPropValue(prop, startLoc, false, false, true, false); + } + parseAssignableListItem(flags, decorators) { + const left = this.parseMaybeDefault(); + this.parseAssignableListItemTypes(left, flags); + const elt = this.parseMaybeDefault(left.loc.start, left); + if (decorators.length) { + left.decorators = decorators; + } + return elt; + } + parseAssignableListItemTypes(param, flags) { + return param; + } + parseMaybeDefault(startLoc, left) { + var _startLoc, _left; + (_startLoc = startLoc) != null ? _startLoc : startLoc = this.state.startLoc; + left = (_left = left) != null ? _left : this.parseBindingAtom(); + if (!this.eat(29)) return left; + const node = this.startNodeAt(startLoc); + node.left = left; + node.right = this.parseMaybeAssignAllowIn(); + return this.finishNode(node, "AssignmentPattern"); + } + isValidLVal(type, isUnparenthesizedInAssign, binding) { + return getOwn$1({ + AssignmentPattern: "left", + RestElement: "argument", + ObjectProperty: "value", + ParenthesizedExpression: "expression", + ArrayPattern: "elements", + ObjectPattern: "properties" + }, type); + } + isOptionalMemberExpression(expression) { + return expression.type === "OptionalMemberExpression"; + } + checkLVal(expression, { + in: ancestor, + binding = 64, + checkClashes = false, + strictModeChanged = false, + hasParenthesizedAncestor = false + }) { + var _expression$extra; + const type = expression.type; + if (this.isObjectMethod(expression)) return; + const isOptionalMemberExpression = this.isOptionalMemberExpression(expression); + if (isOptionalMemberExpression || type === "MemberExpression") { + if (isOptionalMemberExpression) { + this.expectPlugin("optionalChainingAssign", expression.loc.start); + if (ancestor.type !== "AssignmentExpression") { + this.raise(Errors.InvalidLhsOptionalChaining, { + at: expression, + ancestor + }); + } + } + if (binding !== 64) { + this.raise(Errors.InvalidPropertyBindingPattern, { + at: expression + }); + } + return; + } + if (type === "Identifier") { + this.checkIdentifier(expression, binding, strictModeChanged); + const { + name + } = expression; + if (checkClashes) { + if (checkClashes.has(name)) { + this.raise(Errors.ParamDupe, { + at: expression + }); + } else { + checkClashes.add(name); + } + } + return; + } + const validity = this.isValidLVal(type, !(hasParenthesizedAncestor || (_expression$extra = expression.extra) != null && _expression$extra.parenthesized) && ancestor.type === "AssignmentExpression", binding); + if (validity === true) return; + if (validity === false) { + const ParseErrorClass = binding === 64 ? Errors.InvalidLhs : Errors.InvalidLhsBinding; + this.raise(ParseErrorClass, { + at: expression, + ancestor + }); + return; + } + const [key, isParenthesizedExpression] = Array.isArray(validity) ? validity : [validity, type === "ParenthesizedExpression"]; + const nextAncestor = type === "ArrayPattern" || type === "ObjectPattern" ? { + type + } : ancestor; + for (const child of [].concat(expression[key])) { + if (child) { + this.checkLVal(child, { + in: nextAncestor, + binding, + checkClashes, + strictModeChanged, + hasParenthesizedAncestor: isParenthesizedExpression + }); + } + } + } + checkIdentifier(at, bindingType, strictModeChanged = false) { + if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) { + if (bindingType === 64) { + this.raise(Errors.StrictEvalArguments, { + at, + referenceName: at.name + }); + } else { + this.raise(Errors.StrictEvalArgumentsBinding, { + at, + bindingName: at.name + }); + } + } + if (bindingType & 8192 && at.name === "let") { + this.raise(Errors.LetInLexicalBinding, { + at + }); + } + if (!(bindingType & 64)) { + this.declareNameFromIdentifier(at, bindingType); + } + } + declareNameFromIdentifier(identifier, binding) { + this.scope.declareName(identifier.name, binding, identifier.loc.start); + } + checkToRestConversion(node, allowPattern) { + switch (node.type) { + case "ParenthesizedExpression": + this.checkToRestConversion(node.expression, allowPattern); + break; + case "Identifier": + case "MemberExpression": + break; + case "ArrayExpression": + case "ObjectExpression": + if (allowPattern) break; + default: + this.raise(Errors.InvalidRestAssignmentPattern, { + at: node + }); + } + } + checkCommaAfterRest(close) { + if (!this.match(12)) { + return false; + } + this.raise(this.lookaheadCharCode() === close ? Errors.RestTrailingComma : Errors.ElementAfterRest, { + at: this.state.startLoc + }); + return true; + } } - +const getOwn = (object, key) => Object.hasOwnProperty.call(object, key) && object[key]; function nonNull(x) { if (x == null) { throw new Error(`Unexpected ${x} value.`); } - return x; } - -function assert(x) { +function assert$1(x) { if (!x) { throw new Error("Assert fail"); } } - -const TSErrors = makeErrorTemplates({ - AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.", - AbstractPropertyHasInitializer: "Property '%0' cannot have an initializer because it is marked abstract.", +const TSErrors = ParseErrorEnum`typescript`({ + AbstractMethodHasImplementation: ({ + methodName + }) => `Method '${methodName}' cannot have an implementation because it is marked abstract.`, + AbstractPropertyHasInitializer: ({ + propertyName + }) => `Property '${propertyName}' cannot have an initializer because it is marked abstract.`, AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.", AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.", + AccessorCannotBeOptional: "An 'accessor' property cannot be declared optional.", ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.", ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.", + ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference: "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: "'declare' is not allowed in %0ters.", + DeclareAccessor: ({ + kind + }) => `'declare' is not allowed in ${kind}ters.`, DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.", DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.", - DuplicateAccessibilityModifier: "Accessibility modifier already seen.", - DuplicateModifier: "Duplicate modifier: '%0'.", - EmptyHeritageClauseType: "'%0' list cannot be empty.", + DuplicateAccessibilityModifier: ({ + modifier + }) => `Accessibility modifier already seen.`, + DuplicateModifier: ({ + modifier + }) => `Duplicate modifier: '${modifier}'.`, + EmptyHeritageClauseType: ({ + token + }) => `'${token}' 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'.", - IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.", + ImportReflectionHasImportType: "An `import module` declaration can not use `type` modifier", + IncompatibleModifiers: ({ + modifiers + }) => `'${modifiers[0]}' modifier cannot be used with '${modifiers[1]}' modifier.`, IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.", - IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').", + IndexSignatureHasAccessibility: ({ + modifier + }) => `Index signatures cannot have an accessibility modifier ('${modifier}').`, 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.", - InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.", - InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.", + InitializerNotAllowedInAmbientContext: "Initializers are not allowed in ambient contexts.", + InvalidModifierOnTypeMember: ({ + modifier + }) => `'${modifier}' modifier cannot appear on a type member.`, + InvalidModifierOnTypeParameter: ({ + modifier + }) => `'${modifier}' modifier cannot appear on a type parameter.`, + InvalidModifierOnTypeParameterPositions: ({ + modifier + }) => `'${modifier}' modifier can only appear on a type parameter of a class, interface or type alias.`, + InvalidModifiersOrder: ({ + orderedModifiers + }) => `'${orderedModifiers[0]}' modifier must precede '${orderedModifiers[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.", - MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.", NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.", NonClassMethodPropertyHasAbstractModifer: "'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: "Private elements cannot have an accessibility modifier ('%0').", + PrivateElementHasAccessibility: ({ + modifier + }) => `Private elements cannot have an accessibility modifier ('${modifier}').`, 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.", SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.", SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.", SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.", + SingleTypeParameterWithoutTrailingComma: ({ + typeParameterName + }) => `Single type parameter ${typeParameterName} should have a trailing comma. Example usage: <${typeParameterName},>.`, 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.", @@ -8490,277 +9973,268 @@ const TSErrors = makeErrorTemplates({ 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: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0." -}, ErrorCodes.SyntaxError, "typescript"); - + UnsupportedSignatureParameterKind: ({ + type + }) => `Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${type}.` +}); function keywordTypeFromName(value) { switch (value) { 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 undefined; } } - function tsIsAccessModifier(modifier) { return modifier === "private" || modifier === "public" || modifier === "protected"; } - -var typescript = (superClass => class extends superClass { +function tsIsVarianceAnnotations(modifier) { + return modifier === "in" || modifier === "out"; +} +var typescript = superClass => class TypeScriptParserMixin extends superClass { + constructor(...args) { + super(...args); + this.tsParseInOutModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out"], + disallowedModifiers: ["const", "public", "private", "protected", "readonly", "declare", "abstract", "override"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameter + }); + this.tsParseConstModifier = this.tsParseModifiers.bind(this, { + allowedModifiers: ["const"], + disallowedModifiers: ["in", "out"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions + }); + this.tsParseInOutConstModifiers = this.tsParseModifiers.bind(this, { + allowedModifiers: ["in", "out", "const"], + disallowedModifiers: ["public", "private", "protected", "readonly", "declare", "abstract", "override"], + errorTemplate: TSErrors.InvalidModifierOnTypeParameter + }); + } getScopeHandler() { return TypeScriptScopeHandler; } - tsIsIdentifier() { return tokenIsIdentifier(this.state.type); } - tsTokenCanFollowModifier() { - return (this.match(0) || this.match(5) || this.match(49) || this.match(21) || this.match(128) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); + return (this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(138) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak(); } - tsNextTokenCanFollowModifier() { this.next(); return this.tsTokenCanFollowModifier(); } - tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) { - if (!tokenIsIdentifier(this.state.type)) { + if (!tokenIsIdentifier(this.state.type) && this.state.type !== 58 && this.state.type !== 75) { return undefined; } - const modifier = this.state.value; - if (allowedModifiers.indexOf(modifier) !== -1) { if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) { return undefined; } - if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) { return modifier; } } - return undefined; } - - tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate, stopOnStartOfClassStaticBlock) { - const enforceOrder = (pos, modifier, before, after) => { + tsParseModifiers({ + allowedModifiers, + disallowedModifiers, + stopOnStartOfClassStaticBlock, + errorTemplate = TSErrors.InvalidModifierOnTypeMember + }, modified) { + const enforceOrder = (loc, modifier, before, after) => { if (modifier === before && modified[after]) { - this.raise(pos, TSErrors.InvalidModifiersOrder, before, after); + this.raise(TSErrors.InvalidModifiersOrder, { + at: loc, + orderedModifiers: [before, after] + }); } }; - - const incompatible = (pos, modifier, mod1, mod2) => { + const incompatible = (loc, modifier, mod1, mod2) => { if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) { - this.raise(pos, TSErrors.IncompatibleModifiers, mod1, mod2); + this.raise(TSErrors.IncompatibleModifiers, { + at: loc, + modifiers: [mod1, mod2] + }); } }; - for (;;) { - const startPos = this.state.start; + const { + startLoc + } = this.state; const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock); if (!modifier) break; - if (tsIsAccessModifier(modifier)) { if (modified.accessibility) { - this.raise(startPos, TSErrors.DuplicateAccessibilityModifier); + this.raise(TSErrors.DuplicateAccessibilityModifier, { + at: startLoc, + modifier + }); } else { - enforceOrder(startPos, modifier, modifier, "override"); - enforceOrder(startPos, modifier, modifier, "static"); - enforceOrder(startPos, modifier, modifier, "readonly"); + enforceOrder(startLoc, modifier, modifier, "override"); + enforceOrder(startLoc, modifier, modifier, "static"); + enforceOrder(startLoc, modifier, modifier, "readonly"); modified.accessibility = modifier; } + } else if (tsIsVarianceAnnotations(modifier)) { + if (modified[modifier]) { + this.raise(TSErrors.DuplicateModifier, { + at: startLoc, + modifier + }); + } + modified[modifier] = true; + enforceOrder(startLoc, modifier, "in", "out"); } else { if (Object.hasOwnProperty.call(modified, modifier)) { - this.raise(startPos, TSErrors.DuplicateModifier, modifier); + this.raise(TSErrors.DuplicateModifier, { + at: startLoc, + modifier + }); } else { - enforceOrder(startPos, modifier, "static", "readonly"); - enforceOrder(startPos, modifier, "static", "override"); - enforceOrder(startPos, modifier, "override", "readonly"); - enforceOrder(startPos, modifier, "abstract", "override"); - incompatible(startPos, modifier, "declare", "override"); - incompatible(startPos, modifier, "static", "abstract"); + enforceOrder(startLoc, modifier, "static", "readonly"); + enforceOrder(startLoc, modifier, "static", "override"); + enforceOrder(startLoc, modifier, "override", "readonly"); + enforceOrder(startLoc, modifier, "abstract", "override"); + incompatible(startLoc, modifier, "declare", "override"); + incompatible(startLoc, modifier, "static", "abstract"); } - modified[modifier] = true; } - if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) { - this.raise(startPos, errorTemplate, modifier); + this.raise(errorTemplate, { + at: startLoc, + modifier + }); } } } - tsIsListTerminator(kind) { switch (kind) { 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(44); + return this.match(48); } - - throw new Error("Unreachable"); } - tsParseList(kind, parseElement) { const result = []; - while (!this.tsIsListTerminator(kind)) { result.push(parseElement()); } - return result; } - tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) { return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos)); } - tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) { const result = []; let trailingCommaPos = -1; - for (;;) { if (this.tsIsListTerminator(kind)) { break; } - trailingCommaPos = -1; const element = parseElement(); - if (element == null) { return undefined; } - result.push(element); - if (this.eat(12)) { trailingCommaPos = this.state.lastTokStart; continue; } - if (this.tsIsListTerminator(kind)) { break; } - if (expectSuccess) { this.expect(12); } - return undefined; } - if (refTrailingCommaPos) { refTrailingCommaPos.value = trailingCommaPos; } - return result; } - tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) { if (!skipFirstToken) { if (bracket) { this.expect(0); } else { - this.expect(43); + this.expect(47); } } - const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos); - if (bracket) { this.expect(3); } else { - this.expect(44); + this.expect(48); } - return result; } - tsParseImportType() { const node = this.startNode(); - this.expect(77); + this.expect(83); this.expect(10); - - if (!this.match(123)) { - this.raise(this.state.start, TSErrors.UnsupportedImportTypeArgument); + if (!this.match(133)) { + this.raise(TSErrors.UnsupportedImportTypeArgument, { + at: this.state.startLoc + }); } - - node.argument = this.parseExprAtom(); + node.argument = super.parseExprAtom(); this.expect(11); - if (this.eat(16)) { - node.qualifier = this.tsParseEntityName(true); + node.qualifier = this.tsParseEntityName(); } - - if (this.match(43)) { + if (this.match(47)) { node.typeParameters = this.tsParseTypeArguments(); } - return this.finishNode(node, "TSImportType"); } - - tsParseEntityName(allowReservedWords) { - let entity = this.parseIdentifier(); - + tsParseEntityName(allowReservedWords = true) { + let entity = this.parseIdentifier(allowReservedWords); while (this.eat(16)) { const node = this.startNodeAtNode(entity); node.left = entity; node.right = this.parseIdentifier(allowReservedWords); entity = this.finishNode(node, "TSQualifiedName"); } - return entity; } - tsParseTypeReference() { const node = this.startNode(); - node.typeName = this.tsParseEntityName(false); - - if (!this.hasPrecedingLineBreak() && this.match(43)) { + node.typeName = this.tsParseEntityName(); + if (!this.hasPrecedingLineBreak() && this.match(47)) { node.typeParameters = this.tsParseTypeArguments(); } - return this.finishNode(node, "TSTypeReference"); } - tsParseThisTypePredicate(lhs) { this.next(); const node = this.startNodeAtNode(lhs); @@ -8769,125 +10243,108 @@ var typescript = (superClass => class extends superClass { node.asserts = false; return this.finishNode(node, "TSTypePredicate"); } - tsParseThisTypeNode() { const node = this.startNode(); this.next(); return this.finishNode(node, "TSThisType"); } - tsParseTypeQuery() { const node = this.startNode(); - this.expect(81); - - if (this.match(77)) { + this.expect(87); + if (this.match(83)) { node.exprName = this.tsParseImportType(); } else { - node.exprName = this.tsParseEntityName(true); + node.exprName = this.tsParseEntityName(); + } + if (!this.hasPrecedingLineBreak() && this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); } - return this.finishNode(node, "TSTypeQuery"); } - - tsParseTypeParameter() { + tsParseTypeParameter(parseModifiers) { const node = this.startNode(); + parseModifiers(node); node.name = this.tsParseTypeParameterName(); - node.constraint = this.tsEatThenParseType(75); - node.default = this.tsEatThenParseType(27); + node.constraint = this.tsEatThenParseType(81); + node.default = this.tsEatThenParseType(29); return this.finishNode(node, "TSTypeParameter"); } - - tsTryParseTypeParameters() { - if (this.match(43)) { - return this.tsParseTypeParameters(); + tsTryParseTypeParameters(parseModifiers) { + if (this.match(47)) { + return this.tsParseTypeParameters(parseModifiers); } } - - tsParseTypeParameters() { + tsParseTypeParameters(parseModifiers) { const node = this.startNode(); - - if (this.match(43) || this.match(132)) { + if (this.match(47) || this.match(142)) { this.next(); } else { this.unexpected(); } - const refTrailingCommaPos = { value: -1 }; - node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true, refTrailingCommaPos); - + node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this, parseModifiers), false, true, refTrailingCommaPos); if (node.params.length === 0) { - this.raise(node.start, TSErrors.EmptyTypeParameters); + this.raise(TSErrors.EmptyTypeParameters, { + at: node + }); } - if (refTrailingCommaPos.value !== -1) { this.addExtra(node, "trailingComma", refTrailingCommaPos.value); } - return this.finishNode(node, "TSTypeParameterDeclaration"); } - - tsTryNextParseConstantContext() { - if (this.lookahead().type === 69) { - this.next(); - return this.tsParseTypeReference(); - } - - return null; - } - tsFillSignature(returnToken, signature) { const returnTokenRequired = returnToken === 19; - signature.typeParameters = this.tsTryParseTypeParameters(); + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; + signature.typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); this.expect(10); - signature.parameters = this.tsParseBindingListForSignature(); - + signature[paramsKey] = this.tsParseBindingListForSignature(); if (returnTokenRequired) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); } else if (this.match(returnToken)) { - signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken); + signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken); } } - tsParseBindingListForSignature() { - return this.parseBindingList(11, 41).map(pattern => { - if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") { - this.raise(pattern.start, TSErrors.UnsupportedSignatureParameterKind, pattern.type); + const list = super.parseBindingList(11, 41, 2); + for (const pattern of list) { + const { + type + } = pattern; + if (type === "AssignmentPattern" || type === "TSParameterProperty") { + this.raise(TSErrors.UnsupportedSignatureParameterKind, { + at: pattern, + type + }); } - - return pattern; - }); + } + return list; } - tsParseTypeMemberSemicolon() { if (!this.eat(12) && !this.isLineTerminator()) { this.expect(13); } } - tsParseSignatureMember(kind, node) { this.tsFillSignature(14, node); this.tsParseTypeMemberSemicolon(); return this.finishNode(node, kind); } - tsIsUnambiguouslyIndexSignature() { this.next(); - if (tokenIsIdentifier(this.state.type)) { this.next(); return this.match(14); } - return false; } - tsTryParseIndexSignature(node) { if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) { - return undefined; + return; } - this.expect(0); const id = this.parseIdentifier(); id.typeAnnotation = this.tsParseTypeAnnotation(); @@ -8899,59 +10356,67 @@ var typescript = (superClass => class extends superClass { this.tsParseTypeMemberSemicolon(); return this.finishNode(node, "TSIndexSignature"); } - tsParsePropertyOrMethodSignature(node, readonly) { if (this.eat(17)) node.optional = true; const nodeAny = node; - - if (this.match(10) || this.match(43)) { + if (this.match(10) || this.match(47)) { if (readonly) { - this.raise(node.start, TSErrors.ReadonlyForMethodSignature); + this.raise(TSErrors.ReadonlyForMethodSignature, { + at: node + }); } - const method = nodeAny; - - if (method.kind && this.match(43)) { - this.raise(this.state.pos, TSErrors.AccesorCannotHaveTypeParameters); + if (method.kind && this.match(47)) { + this.raise(TSErrors.AccesorCannotHaveTypeParameters, { + at: this.state.curPosition() + }); } - this.tsFillSignature(14, method); this.tsParseTypeMemberSemicolon(); - + const paramsKey = "parameters"; + const returnTypeKey = "typeAnnotation"; if (method.kind === "get") { - if (method.parameters.length > 0) { - this.raise(this.state.pos, ErrorMessages.BadGetterArity); - - if (this.isThisParam(method.parameters[0])) { - this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter); + if (method[paramsKey].length > 0) { + this.raise(Errors.BadGetterArity, { + at: this.state.curPosition() + }); + if (this.isThisParam(method[paramsKey][0])) { + this.raise(TSErrors.AccesorCannotDeclareThisParameter, { + at: this.state.curPosition() + }); } } } else if (method.kind === "set") { - if (method.parameters.length !== 1) { - this.raise(this.state.pos, ErrorMessages.BadSetterArity); + if (method[paramsKey].length !== 1) { + this.raise(Errors.BadSetterArity, { + at: this.state.curPosition() + }); } else { - const firstParameter = method.parameters[0]; - + const firstParameter = method[paramsKey][0]; if (this.isThisParam(firstParameter)) { - this.raise(this.state.pos, TSErrors.AccesorCannotDeclareThisParameter); + this.raise(TSErrors.AccesorCannotDeclareThisParameter, { + at: this.state.curPosition() + }); } - if (firstParameter.type === "Identifier" && firstParameter.optional) { - this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveOptionalParameter); + this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, { + at: this.state.curPosition() + }); } - if (firstParameter.type === "RestElement") { - this.raise(this.state.pos, TSErrors.SetAccesorCannotHaveRestParameter); + this.raise(TSErrors.SetAccesorCannotHaveRestParameter, { + at: this.state.curPosition() + }); } } - - if (method.typeAnnotation) { - this.raise(method.typeAnnotation.start, TSErrors.SetAccesorCannotHaveReturnType); + if (method[returnTypeKey]) { + this.raise(TSErrors.SetAccesorCannotHaveReturnType, { + at: method[returnTypeKey] + }); } } else { method.kind = "method"; } - return this.finishNode(method, "TSMethodSignature"); } else { const property = nodeAny; @@ -8962,190 +10427,187 @@ var typescript = (superClass => class extends superClass { return this.finishNode(property, "TSPropertySignature"); } } - tsParseTypeMember() { const node = this.startNode(); - - if (this.match(10) || this.match(43)) { + if (this.match(10) || this.match(47)) { return this.tsParseSignatureMember("TSCallSignatureDeclaration", node); } - - if (this.match(71)) { + if (this.match(77)) { const id = this.startNode(); this.next(); - - if (this.match(10) || this.match(43)) { + if (this.match(10) || this.match(47)) { return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node); } else { node.key = this.createIdentifier(id, "new"); return this.tsParsePropertyOrMethodSignature(node, false); } } - - this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember); + this.tsParseModifiers({ + allowedModifiers: ["readonly"], + disallowedModifiers: ["declare", "abstract", "private", "protected", "public", "static", "override"] + }, node); const idx = this.tsTryParseIndexSignature(node); - if (idx) { return idx; } - - this.parsePropertyName(node); - + super.parsePropertyName(node); if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) { node.kind = node.key.name; - this.parsePropertyName(node); + super.parsePropertyName(node); } - return this.tsParsePropertyOrMethodSignature(node, !!node.readonly); } - tsParseTypeLiteral() { const node = this.startNode(); node.members = this.tsParseObjectTypeMembers(); return this.finishNode(node, "TSTypeLiteral"); } - tsParseObjectTypeMembers() { this.expect(5); const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this)); this.expect(8); return members; } - tsIsStartOfMappedType() { this.next(); - - if (this.eat(47)) { - return this.isContextual(112); + if (this.eat(53)) { + return this.isContextual(122); } - - if (this.isContextual(112)) { + if (this.isContextual(122)) { this.next(); } - if (!this.match(0)) { return false; } - this.next(); - if (!this.tsIsIdentifier()) { return false; } - this.next(); - return this.match(52); + return this.match(58); } - tsParseMappedTypeParameter() { const node = this.startNode(); node.name = this.tsParseTypeParameterName(); - node.constraint = this.tsExpectThenParseType(52); + node.constraint = this.tsExpectThenParseType(58); return this.finishNode(node, "TSTypeParameter"); } - tsParseMappedType() { const node = this.startNode(); this.expect(5); - - if (this.match(47)) { + if (this.match(53)) { node.readonly = this.state.value; this.next(); - this.expectContextual(112); - } else if (this.eatContextual(112)) { + this.expectContextual(122); + } else if (this.eatContextual(122)) { node.readonly = true; } - this.expect(0); node.typeParameter = this.tsParseMappedTypeParameter(); - node.nameType = this.eatContextual(87) ? this.tsParseType() : null; + node.nameType = this.eatContextual(93) ? this.tsParseType() : null; this.expect(3); - - if (this.match(47)) { + if (this.match(53)) { node.optional = this.state.value; this.next(); this.expect(17); } else if (this.eat(17)) { node.optional = true; } - node.typeAnnotation = this.tsTryParseType(); this.semicolon(); this.expect(8); return this.finishNode(node, "TSMappedType"); } - tsParseTupleType() { const node = this.startNode(); node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false); let seenOptionalElement = false; - let labeledElements = null; node.elementTypes.forEach(elementNode => { - var _labeledElements; - - let { + const { type } = elementNode; - if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) { - this.raise(elementNode.start, TSErrors.OptionalTypeBeforeRequired); - } - - seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"; - - if (type === "TSRestType") { - elementNode = elementNode.typeAnnotation; - type = elementNode.type; - } - - const isLabeled = type === "TSNamedTupleMember"; - labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled; - - if (labeledElements !== isLabeled) { - this.raise(elementNode.start, TSErrors.MixedLabeledAndUnlabeledElements); + this.raise(TSErrors.OptionalTypeBeforeRequired, { + at: elementNode + }); } + seenOptionalElement || (seenOptionalElement = type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType"); }); return this.finishNode(node, "TSTupleType"); } - tsParseTupleElementType() { const { - start: startPos, startLoc } = this.state; const rest = this.eat(21); - let type = this.tsParseType(); - const optional = this.eat(17); - const labeled = this.eat(14); - - if (labeled) { - const labeledNode = this.startNodeAtNode(type); - labeledNode.optional = optional; - - if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") { - labeledNode.label = type.typeName; + let labeled; + let label; + let optional; + let type; + const isWord = tokenIsKeywordOrIdentifier(this.state.type); + const chAfterWord = isWord ? this.lookaheadCharCode() : null; + if (chAfterWord === 58) { + labeled = true; + optional = false; + label = this.parseIdentifier(true); + this.expect(14); + type = this.tsParseType(); + } else if (chAfterWord === 63) { + optional = true; + const startLoc = this.state.startLoc; + const wordName = this.state.value; + const typeOrLabel = this.tsParseNonArrayType(); + if (this.lookaheadCharCode() === 58) { + labeled = true; + label = this.createIdentifier(this.startNodeAt(startLoc), wordName); + this.expect(17); + this.expect(14); + type = this.tsParseType(); } else { - this.raise(type.start, TSErrors.InvalidTupleMemberLabel); - labeledNode.label = type; + labeled = false; + type = typeOrLabel; + this.expect(17); + } + } else { + type = this.tsParseType(); + optional = this.eat(17); + labeled = this.eat(14); + } + if (labeled) { + let labeledNode; + if (label) { + labeledNode = this.startNodeAtNode(label); + labeledNode.optional = optional; + labeledNode.label = label; + labeledNode.elementType = type; + if (this.eat(17)) { + labeledNode.optional = true; + this.raise(TSErrors.TupleOptionalAfterType, { + at: this.state.lastTokStartLoc + }); + } + } else { + labeledNode = this.startNodeAtNode(type); + labeledNode.optional = optional; + this.raise(TSErrors.InvalidTupleMemberLabel, { + at: type + }); + labeledNode.label = type; + labeledNode.elementType = this.tsParseType(); } - - labeledNode.elementType = this.tsParseType(); type = this.finishNode(labeledNode, "TSNamedTupleMember"); } else if (optional) { const optionalTypeNode = this.startNodeAtNode(type); optionalTypeNode.typeAnnotation = type; type = this.finishNode(optionalTypeNode, "TSOptionalType"); } - if (rest) { - const restNode = this.startNodeAt(startPos, startLoc); + const restNode = this.startNodeAt(startLoc); restNode.typeAnnotation = type; type = this.finishNode(restNode, "TSRestType"); } - return type; } - tsParseParenthesizedType() { const node = this.startNode(); this.expect(10); @@ -9153,132 +10615,102 @@ var typescript = (superClass => class extends superClass { this.expect(11); return this.finishNode(node, "TSParenthesizedType"); } - tsParseFunctionOrConstructorType(type, abstract) { const node = this.startNode(); - if (type === "TSConstructorType") { node.abstract = !!abstract; if (abstract) this.next(); this.next(); } - - this.tsFillSignature(19, node); + this.tsInAllowConditionalTypesContext(() => this.tsFillSignature(19, node)); return this.finishNode(node, type); } - tsParseLiteralTypeNode() { const node = this.startNode(); - - node.literal = (() => { - switch (this.state.type) { - case 124: - case 125: - case 123: - case 79: - case 80: - return this.parseExprAtom(); - - default: - throw this.unexpected(); - } - })(); - + switch (this.state.type) { + case 134: + case 135: + case 133: + case 85: + case 86: + node.literal = super.parseExprAtom(); + break; + default: + this.unexpected(); + } return this.finishNode(node, "TSLiteralType"); } - tsParseTemplateLiteralType() { const node = this.startNode(); - node.literal = this.parseTemplate(false); + node.literal = super.parseTemplate(false); return this.finishNode(node, "TSLiteralType"); } - parseTemplateSubstitution() { if (this.state.inType) return this.tsParseType(); return super.parseTemplateSubstitution(); } - tsParseThisTypeOrThisTypePredicate() { const thisKeyword = this.tsParseThisTypeNode(); - - if (this.isContextual(107) && !this.hasPrecedingLineBreak()) { + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { return this.tsParseThisTypePredicate(thisKeyword); } else { return thisKeyword; } } - tsParseNonArrayType() { switch (this.state.type) { - case 123: - case 124: - case 125: - case 79: - case 80: + case 133: + case 134: + case 135: + case 85: + case 86: return this.tsParseLiteralTypeNode(); - - case 47: + case 53: if (this.state.value === "-") { const node = this.startNode(); const nextToken = this.lookahead(); - - if (nextToken.type !== 124 && nextToken.type !== 125) { - throw this.unexpected(); + if (nextToken.type !== 134 && nextToken.type !== 135) { + this.unexpected(); } - node.literal = this.parseMaybeUnary(); return this.finishNode(node, "TSLiteralType"); } - break; - - case 72: + case 78: return this.tsParseThisTypeOrThisTypePredicate(); - - case 81: + case 87: return this.tsParseTypeQuery(); - - case 77: + 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 22: + case 25: + case 24: return this.tsParseTemplateLiteralType(); - default: { const { type } = this.state; - - if (tokenIsIdentifier(type) || type === 82 || type === 78) { - const nodeType = type === 82 ? "TSVoidKeyword" : type === 78 ? "TSNullKeyword" : keywordTypeFromName(this.state.value); - + if (tokenIsIdentifier(type) || type === 88 || type === 84) { + const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value); if (nodeType !== undefined && this.lookaheadCharCode() !== 46) { const node = this.startNode(); this.next(); return this.finishNode(node, nodeType); } - return this.tsParseTypeReference(); } } } - - throw this.unexpected(); + this.unexpected(); } - tsParseArrayTypeOrHigher() { let type = this.tsParseNonArrayType(); - while (!this.hasPrecedingLineBreak() && this.eat(0)) { if (this.match(3)) { const node = this.startNodeAtNode(type); @@ -9293,159 +10725,134 @@ var typescript = (superClass => class extends superClass { type = this.finishNode(node, "TSIndexedAccessType"); } } - return type; } - tsParseTypeOperator() { const node = this.startNode(); const operator = this.state.value; this.next(); node.operator = operator; node.typeAnnotation = this.tsParseTypeOperatorOrHigher(); - if (operator === "readonly") { this.tsCheckTypeAnnotationForReadOnly(node); } - return this.finishNode(node, "TSTypeOperator"); } - tsCheckTypeAnnotationForReadOnly(node) { switch (node.typeAnnotation.type) { case "TSTupleType": case "TSArrayType": return; - default: - this.raise(node.start, TSErrors.UnexpectedReadonly); + this.raise(TSErrors.UnexpectedReadonly, { + at: node + }); } } - tsParseInferType() { const node = this.startNode(); - this.expectContextual(106); + this.expectContextual(115); const typeParameter = this.startNode(); typeParameter.name = this.tsParseTypeParameterName(); + typeParameter.constraint = this.tsTryParse(() => this.tsParseConstraintForInferType()); node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter"); return this.finishNode(node, "TSInferType"); } - + tsParseConstraintForInferType() { + if (this.eat(81)) { + const constraint = this.tsInDisallowConditionalTypesContext(() => this.tsParseType()); + if (this.state.inDisallowConditionalTypesContext || !this.match(17)) { + return constraint; + } + } + } tsParseTypeOperatorOrHigher() { const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc; - return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(106) ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher(); + return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(115) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher()); } - tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) { const node = this.startNode(); const hasLeadingOperator = this.eat(operator); const types = []; - do { types.push(parseConstituentType()); } while (this.eat(operator)); - if (types.length === 1 && !hasLeadingOperator) { return types[0]; } - node.types = types; return this.finishNode(node, kind); } - tsParseIntersectionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 41); + return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45); } - tsParseUnionTypeOrHigher() { - return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 39); + return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43); } - tsIsStartOfFunctionType() { - if (this.match(43)) { + if (this.match(47)) { return true; } - return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this)); } - tsSkipParameterStart() { - if (tokenIsIdentifier(this.state.type) || this.match(72)) { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { this.next(); return true; } - if (this.match(5)) { - let braceStackCounter = 1; - this.next(); - - while (braceStackCounter > 0) { - if (this.match(5)) { - ++braceStackCounter; - } else if (this.match(8)) { - --braceStackCounter; - } - - this.next(); + const { + errors + } = this.state; + const previousErrorCount = errors.length; + try { + this.parseObjectLike(8, true); + return errors.length === previousErrorCount; + } catch (_unused) { + return false; } - - return true; } - if (this.match(0)) { - let braceStackCounter = 1; this.next(); - - while (braceStackCounter > 0) { - if (this.match(0)) { - ++braceStackCounter; - } else if (this.match(3)) { - --braceStackCounter; - } - - this.next(); + const { + errors + } = this.state; + const previousErrorCount = errors.length; + try { + super.parseBindingList(3, 93, 1); + return errors.length === previousErrorCount; + } catch (_unused2) { + return false; } - - return true; } - return false; } - tsIsUnambiguouslyStartOfFunctionType() { this.next(); - if (this.match(11) || this.match(21)) { return true; } - if (this.tsSkipParameterStart()) { - if (this.match(14) || this.match(12) || this.match(17) || this.match(27)) { + if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) { return true; } - if (this.match(11)) { this.next(); - if (this.match(19)) { return true; } } } - return false; } - tsParseTypeOrTypePredicateAnnotation(returnToken) { return this.tsInType(() => { const t = this.startNode(); this.expect(returnToken); const node = this.startNode(); const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this)); - - if (asserts && this.match(72)) { + if (asserts && this.match(78)) { let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate(); - if (thisTypePredicate.type === "TSThisType") { node.parameterName = thisTypePredicate; node.asserts = true; @@ -9455,25 +10862,20 @@ var typescript = (superClass => class extends superClass { this.resetStartLocationFromNode(thisTypePredicate, node); thisTypePredicate.asserts = true; } - t.typeAnnotation = thisTypePredicate; return this.finishNode(t, "TSTypeAnnotation"); } - const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this)); - if (!typePredicateVariable) { if (!asserts) { return this.tsParseTypeAnnotation(false, t); } - node.parameterName = this.parseIdentifier(); node.asserts = asserts; node.typeAnnotation = null; t.typeAnnotation = this.finishNode(node, "TSTypePredicate"); return this.finishNode(t, "TSTypeAnnotation"); } - const type = this.tsParseTypeAnnotation(false); node.parameterName = typePredicateVariable; node.typeAnnotation = type; @@ -9482,47 +10884,43 @@ var typescript = (superClass => class extends superClass { return this.finishNode(t, "TSTypeAnnotation"); }); } - tsTryParseTypeOrTypePredicateAnnotation() { - return this.match(14) ? this.tsParseTypeOrTypePredicateAnnotation(14) : undefined; + if (this.match(14)) { + return this.tsParseTypeOrTypePredicateAnnotation(14); + } } - tsTryParseTypeAnnotation() { - return this.match(14) ? this.tsParseTypeAnnotation() : undefined; + if (this.match(14)) { + return this.tsParseTypeAnnotation(); + } } - tsTryParseType() { return this.tsEatThenParseType(14); } - tsParseTypePredicatePrefix() { const id = this.parseIdentifier(); - - if (this.isContextual(107) && !this.hasPrecedingLineBreak()) { + if (this.isContextual(116) && !this.hasPrecedingLineBreak()) { this.next(); return id; } } - tsParseTypePredicateAsserts() { - if (this.state.type !== 100) { + if (this.state.type !== 109) { return false; } - const containsEsc = this.state.containsEsc; this.next(); - - if (!tokenIsIdentifier(this.state.type) && !this.match(72)) { + if (!tokenIsIdentifier(this.state.type) && !this.match(78)) { return false; } - if (containsEsc) { - this.raise(this.state.lastTokStart, ErrorMessages.InvalidEscapedReservedWord, "asserts"); + this.raise(Errors.InvalidEscapedReservedWord, { + at: this.state.lastTokStartLoc, + reservedWord: "asserts" + }); } - return true; } - tsParseTypeAnnotation(eatColon = true, t = this.startNode()) { this.tsInType(() => { if (eatColon) this.expect(14); @@ -9530,369 +10928,343 @@ var typescript = (superClass => class extends superClass { }); return this.finishNode(t, "TSTypeAnnotation"); } - tsParseType() { - assert(this.state.inType); + assert$1(this.state.inType); const type = this.tsParseNonConditionalType(); - - if (this.hasPrecedingLineBreak() || !this.eat(75)) { + if (this.state.inDisallowConditionalTypesContext || this.hasPrecedingLineBreak() || !this.eat(81)) { return type; } - const node = this.startNodeAtNode(type); node.checkType = type; - node.extendsType = this.tsParseNonConditionalType(); + node.extendsType = this.tsInDisallowConditionalTypesContext(() => this.tsParseNonConditionalType()); this.expect(17); - node.trueType = this.tsParseType(); + node.trueType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); this.expect(14); - node.falseType = this.tsParseType(); + node.falseType = this.tsInAllowConditionalTypesContext(() => this.tsParseType()); return this.finishNode(node, "TSConditionalType"); } - isAbstractConstructorSignature() { - return this.isContextual(114) && this.lookahead().type === 71; + return this.isContextual(124) && this.lookahead().type === 77; } - tsParseNonConditionalType() { if (this.tsIsStartOfFunctionType()) { return this.tsParseFunctionOrConstructorType("TSFunctionType"); } - - if (this.match(71)) { + if (this.match(77)) { return this.tsParseFunctionOrConstructorType("TSConstructorType"); } else if (this.isAbstractConstructorSignature()) { return this.tsParseFunctionOrConstructorType("TSConstructorType", true); } - return this.tsParseUnionTypeOrHigher(); } - tsParseTypeAssertion() { if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { - this.raise(this.state.start, TSErrors.ReservedTypeAssertion); + this.raise(TSErrors.ReservedTypeAssertion, { + at: this.state.startLoc + }); } - const node = this.startNode(); - - const _const = this.tsTryNextParseConstantContext(); - - node.typeAnnotation = _const || this.tsNextThenParseType(); - this.expect(44); + node.typeAnnotation = this.tsInType(() => { + this.next(); + return this.match(75) ? this.tsParseTypeReference() : this.tsParseType(); + }); + this.expect(48); node.expression = this.parseMaybeUnary(); return this.finishNode(node, "TSTypeAssertion"); } - - tsParseHeritageClause(descriptor) { - const originalStart = this.state.start; - const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this)); - + tsParseHeritageClause(token) { + const originalStartLoc = this.state.startLoc; + const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", () => { + const node = this.startNode(); + node.expression = this.tsParseEntityName(); + if (this.match(47)) { + node.typeParameters = this.tsParseTypeArguments(); + } + return this.finishNode(node, "TSExpressionWithTypeArguments"); + }); if (!delimitedList.length) { - this.raise(originalStart, TSErrors.EmptyHeritageClauseType, descriptor); + this.raise(TSErrors.EmptyHeritageClauseType, { + at: originalStartLoc, + token + }); } - return delimitedList; } - - tsParseExpressionWithTypeArguments() { - const node = this.startNode(); - node.expression = this.tsParseEntityName(false); - - if (this.match(43)) { - node.typeParameters = this.tsParseTypeArguments(); - } - - return this.finishNode(node, "TSExpressionWithTypeArguments"); - } - - tsParseInterfaceDeclaration(node) { + tsParseInterfaceDeclaration(node, properties = {}) { + if (this.hasFollowingLineBreak()) return null; + this.expectContextual(129); + if (properties.declare) node.declare = true; if (tokenIsIdentifier(this.state.type)) { node.id = this.parseIdentifier(); - this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE); + this.checkIdentifier(node.id, 130); } else { node.id = null; - this.raise(this.state.start, TSErrors.MissingInterfaceName); + this.raise(TSErrors.MissingInterfaceName, { + at: this.state.startLoc + }); } - - node.typeParameters = this.tsTryParseTypeParameters(); - - if (this.eat(75)) { + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); + if (this.eat(81)) { node.extends = this.tsParseHeritageClause("extends"); } - const body = this.startNode(); body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)); node.body = this.finishNode(body, "TSInterfaceBody"); return this.finishNode(node, "TSInterfaceDeclaration"); } - tsParseTypeAliasDeclaration(node) { node.id = this.parseIdentifier(); - this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE); - node.typeParameters = this.tsTryParseTypeParameters(); + this.checkIdentifier(node.id, 2); node.typeAnnotation = this.tsInType(() => { - this.expect(27); - - if (this.isContextual(105) && this.lookahead().type !== 16) { + node.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutModifiers); + this.expect(29); + if (this.isContextual(114) && this.lookahead().type !== 16) { const node = this.startNode(); this.next(); return this.finishNode(node, "TSIntrinsicKeyword"); } - return this.tsParseType(); }); this.semicolon(); return this.finishNode(node, "TSTypeAliasDeclaration"); } - tsInNoContext(cb) { const oldContext = this.state.context; this.state.context = [oldContext[0]]; - try { return cb(); } finally { this.state.context = oldContext; } } - tsInType(cb) { const oldInType = this.state.inType; this.state.inType = true; - try { return cb(); } finally { this.state.inType = oldInType; } } - + tsInDisallowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = true; + try { + return cb(); + } finally { + this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } + tsInAllowConditionalTypesContext(cb) { + const oldInDisallowConditionalTypesContext = this.state.inDisallowConditionalTypesContext; + this.state.inDisallowConditionalTypesContext = false; + try { + return cb(); + } finally { + this.state.inDisallowConditionalTypesContext = oldInDisallowConditionalTypesContext; + } + } tsEatThenParseType(token) { - return !this.match(token) ? undefined : this.tsNextThenParseType(); + if (this.match(token)) { + return this.tsNextThenParseType(); + } } - tsExpectThenParseType(token) { - return this.tsDoThenParseType(() => this.expect(token)); - } - - tsNextThenParseType() { - return this.tsDoThenParseType(() => this.next()); - } - - tsDoThenParseType(cb) { return this.tsInType(() => { - cb(); + this.expect(token); + return this.tsParseType(); + }); + } + tsNextThenParseType() { + return this.tsInType(() => { + this.next(); return this.tsParseType(); }); } - tsParseEnumMember() { const node = this.startNode(); - node.id = this.match(123) ? this.parseExprAtom() : this.parseIdentifier(true); - - if (this.eat(27)) { - node.initializer = this.parseMaybeAssignAllowIn(); + node.id = this.match(133) ? super.parseStringLiteral(this.state.value) : this.parseIdentifier(true); + if (this.eat(29)) { + node.initializer = super.parseMaybeAssignAllowIn(); } - return this.finishNode(node, "TSEnumMember"); } - - tsParseEnumDeclaration(node, isConst) { - if (isConst) node.const = true; + tsParseEnumDeclaration(node, properties = {}) { + if (properties.const) node.const = true; + if (properties.declare) node.declare = true; + this.expectContextual(126); node.id = this.parseIdentifier(); - this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM); + this.checkIdentifier(node.id, node.const ? 8971 : 8459); this.expect(5); node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this)); this.expect(8); return this.finishNode(node, "TSEnumDeclaration"); } - tsParseModuleBlock() { const node = this.startNode(); - this.scope.enter(SCOPE_OTHER); + this.scope.enter(0); this.expect(5); - this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, 8); + super.parseBlockOrModuleBlockBody(node.body = [], undefined, true, 8); this.scope.exit(); return this.finishNode(node, "TSModuleBlock"); } - tsParseModuleOrNamespaceDeclaration(node, nested = false) { node.id = this.parseIdentifier(); - if (!nested) { - this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE); + this.checkIdentifier(node.id, 1024); } - if (this.eat(16)) { const inner = this.startNode(); this.tsParseModuleOrNamespaceDeclaration(inner, true); node.body = inner; } else { - this.scope.enter(SCOPE_TS_MODULE); - this.prodParam.enter(PARAM); + this.scope.enter(256); + this.prodParam.enter(0); node.body = this.tsParseModuleBlock(); this.prodParam.exit(); this.scope.exit(); } - return this.finishNode(node, "TSModuleDeclaration"); } - tsParseAmbientExternalModuleDeclaration(node) { - if (this.isContextual(103)) { + if (this.isContextual(112)) { node.global = true; node.id = this.parseIdentifier(); - } else if (this.match(123)) { - node.id = this.parseExprAtom(); + } else if (this.match(133)) { + node.id = super.parseStringLiteral(this.state.value); } else { this.unexpected(); } - if (this.match(5)) { - this.scope.enter(SCOPE_TS_MODULE); - this.prodParam.enter(PARAM); + this.scope.enter(256); + this.prodParam.enter(0); node.body = this.tsParseModuleBlock(); this.prodParam.exit(); this.scope.exit(); } else { this.semicolon(); } - return this.finishNode(node, "TSModuleDeclaration"); } - - tsParseImportEqualsDeclaration(node, isExport) { + tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, isExport) { node.isExport = isExport || false; - node.id = this.parseIdentifier(); - this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL); - this.expect(27); + node.id = maybeDefaultIdentifier || this.parseIdentifier(); + this.checkIdentifier(node.id, 4096); + this.expect(29); const moduleReference = this.tsParseModuleReference(); - if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") { - this.raise(moduleReference.start, TSErrors.ImportAliasHasImportType); + this.raise(TSErrors.ImportAliasHasImportType, { + at: moduleReference + }); } - node.moduleReference = moduleReference; this.semicolon(); return this.finishNode(node, "TSImportEqualsDeclaration"); } - tsIsExternalModuleReference() { - return this.isContextual(110) && this.lookaheadCharCode() === 40; + return this.isContextual(119) && this.lookaheadCharCode() === 40; } - tsParseModuleReference() { return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false); } - tsParseExternalModuleReference() { const node = this.startNode(); - this.expectContextual(110); + this.expectContextual(119); this.expect(10); - - if (!this.match(123)) { - throw this.unexpected(); + if (!this.match(133)) { + this.unexpected(); } - - node.expression = this.parseExprAtom(); + node.expression = super.parseExprAtom(); this.expect(11); + this.sawUnambiguousESM = true; return this.finishNode(node, "TSExternalModuleReference"); } - tsLookAhead(f) { const state = this.state.clone(); const res = f(); this.state = state; return res; } - tsTryParseAndCatch(f) { const result = this.tryParse(abort => f() || abort()); - if (result.aborted || !result.node) return undefined; + if (result.aborted || !result.node) return; if (result.error) this.state = result.failState; return result.node; } - tsTryParse(f) { const state = this.state.clone(); const result = f(); - if (result !== undefined && result !== false) { return result; - } else { - this.state = state; - return undefined; } + this.state = state; } - tsTryParseDeclare(nany) { if (this.isLineTerminator()) { return; } - - let starttype = this.state.type; + let startType = this.state.type; let kind; - - if (this.isContextual(93)) { - starttype = 68; + if (this.isContextual(100)) { + startType = 74; kind = "let"; } - return this.tsInAmbientContext(() => { - switch (starttype) { - case 62: + switch (startType) { + case 68: nany.declare = true; - return this.parseFunctionStatement(nany, false, true); - - case 74: + return super.parseFunctionStatement(nany, false, false); + case 80: nany.declare = true; return this.parseClass(nany, true, false); - - case 69: - if (this.match(69) && this.isLookaheadContextual("enum")) { - this.expect(69); - this.expectContextual(116); - return this.tsParseEnumDeclaration(nany, true); - } - - case 68: - kind = kind || this.state.value; - return this.parseVarStatement(nany, kind); - - case 103: + case 126: + return this.tsParseEnumDeclaration(nany, { + declare: true + }); + case 112: return this.tsParseAmbientExternalModuleDeclaration(nany); - - default: + case 75: + case 74: + if (!this.match(75) || !this.isLookaheadContextual("enum")) { + nany.declare = true; + return this.parseVarStatement(nany, kind || this.state.value, true); + } + this.expect(75); + return this.tsParseEnumDeclaration(nany, { + const: true, + declare: true + }); + case 129: { - if (tokenIsIdentifier(starttype)) { - return this.tsParseDeclaration(nany, this.state.value, true); - } + const result = this.tsParseInterfaceDeclaration(nany, { + declare: true + }); + if (result) return result; + } + default: + if (tokenIsIdentifier(startType)) { + return this.tsParseDeclaration(nany, this.state.value, true, null); } } }); } - tsTryParseExportDeclaration() { - return this.tsParseDeclaration(this.startNode(), this.state.value, true); + return this.tsParseDeclaration(this.startNode(), this.state.value, true, null); } - - tsParseExpressionStatement(node, expr) { + tsParseExpressionStatement(node, expr, decorators) { switch (expr.name) { case "declare": { const declaration = this.tsTryParseDeclare(node); - if (declaration) { declaration.declare = true; - return declaration; } - - break; + return declaration; } - case "global": if (this.match(5)) { - this.scope.enter(SCOPE_TS_MODULE); - this.prodParam.enter(PARAM); + this.scope.enter(256); + this.prodParam.enter(0); const mod = node; mod.global = true; mod.id = expr; @@ -9901,830 +11273,790 @@ var typescript = (superClass => class extends superClass { this.prodParam.exit(); return this.finishNode(mod, "TSModuleDeclaration"); } - break; - default: - return this.tsParseDeclaration(node, expr.name, false); + return this.tsParseDeclaration(node, expr.name, false, decorators); } } - - tsParseDeclaration(node, value, next) { + tsParseDeclaration(node, value, next, decorators) { switch (value) { case "abstract": - if (this.tsCheckLineTerminator(next) && (this.match(74) || tokenIsIdentifier(this.state.type))) { - return this.tsParseAbstractDeclaration(node); + if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) { + return this.tsParseAbstractDeclaration(node, decorators); } - break; - - case "enum": - if (next || tokenIsIdentifier(this.state.type)) { - if (next) this.next(); - return this.tsParseEnumDeclaration(node, false); - } - - break; - - case "interface": - if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { - return this.tsParseInterfaceDeclaration(node); - } - - break; - case "module": if (this.tsCheckLineTerminator(next)) { - if (this.match(123)) { + if (this.match(133)) { return this.tsParseAmbientExternalModuleDeclaration(node); } else if (tokenIsIdentifier(this.state.type)) { return this.tsParseModuleOrNamespaceDeclaration(node); } } - break; - case "namespace": if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { return this.tsParseModuleOrNamespaceDeclaration(node); } - break; - case "type": if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) { return this.tsParseTypeAliasDeclaration(node); } - break; } } - tsCheckLineTerminator(next) { if (next) { if (this.hasFollowingLineBreak()) return false; this.next(); return true; } - return !this.isLineTerminator(); } - - tsTryParseGenericAsyncArrowFunction(startPos, startLoc) { - if (!this.match(43)) { - return undefined; - } - + tsTryParseGenericAsyncArrowFunction(startLoc) { + if (!this.match(47)) return; const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; this.state.maybeInArrowParameters = true; const res = this.tsTryParseAndCatch(() => { - const node = this.startNodeAt(startPos, startLoc); - node.typeParameters = this.tsParseTypeParameters(); + const node = this.startNodeAt(startLoc); + node.typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); super.parseFunctionParams(node); node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation(); this.expect(19); return node; }); this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - - if (!res) { - return undefined; - } - - return this.parseArrowExpression(res, null, true); + if (!res) return; + return super.parseArrowExpression(res, null, true); + } + tsParseTypeArgumentsInExpression() { + if (this.reScan_lt() !== 47) return; + return this.tsParseTypeArguments(); } - tsParseTypeArguments() { const node = this.startNode(); node.params = this.tsInType(() => this.tsInNoContext(() => { - this.expect(43); + this.expect(47); return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this)); })); - if (node.params.length === 0) { - this.raise(node.start, TSErrors.EmptyTypeArguments); + this.raise(TSErrors.EmptyTypeArguments, { + at: node + }); + } else if (!this.state.inType && this.curContext() === types$1.brace) { + this.reScan_lt_gt(); } - - this.expect(44); + this.expect(48); return this.finishNode(node, "TSTypeParameterInstantiation"); } - tsIsDeclarationStart() { return tokenIsTSDeclarationStart(this.state.type); } - isExportDefaultSpecifier() { if (this.tsIsDeclarationStart()) return false; return super.isExportDefaultSpecifier(); } - - parseAssignableListItem(allowModifiers, decorators) { - const startPos = this.state.start; + parseAssignableListItem(flags, decorators) { const startLoc = this.state.startLoc; - let accessibility; - let readonly = false; - let override = false; - - if (allowModifiers !== undefined) { - const modified = {}; - this.tsParseModifiers(modified, ["public", "private", "protected", "override", "readonly"]); - accessibility = modified.accessibility; - override = modified.override; - readonly = modified.readonly; - - if (allowModifiers === false && (accessibility || readonly || override)) { - this.raise(startPos, TSErrors.UnexpectedParameterModifier); - } + const modified = {}; + this.tsParseModifiers({ + allowedModifiers: ["public", "private", "protected", "override", "readonly"] + }, modified); + const accessibility = modified.accessibility; + const override = modified.override; + const readonly = modified.readonly; + if (!(flags & 4) && (accessibility || readonly || override)) { + this.raise(TSErrors.UnexpectedParameterModifier, { + at: startLoc + }); } - const left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - const elt = this.parseMaybeDefault(left.start, left.loc.start, left); - + this.parseAssignableListItemTypes(left, flags); + const elt = this.parseMaybeDefault(left.loc.start, left); if (accessibility || readonly || override) { - const pp = this.startNodeAt(startPos, startLoc); - + const pp = this.startNodeAt(startLoc); if (decorators.length) { pp.decorators = decorators; } - if (accessibility) pp.accessibility = accessibility; if (readonly) pp.readonly = readonly; if (override) pp.override = override; - if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") { - this.raise(pp.start, TSErrors.UnsupportedParameterPropertyKind); + this.raise(TSErrors.UnsupportedParameterPropertyKind, { + at: pp + }); } - pp.parameter = elt; return this.finishNode(pp, "TSParameterProperty"); } - if (decorators.length) { left.decorators = decorators; } - return elt; } - + isSimpleParameter(node) { + return node.type === "TSParameterProperty" && super.isSimpleParameter(node.parameter) || super.isSimpleParameter(node); + } + tsDisallowOptionalPattern(node) { + for (const param of node.params) { + if (param.type !== "Identifier" && param.optional && !this.state.isAmbientContext) { + this.raise(TSErrors.PatternIsOptional, { + at: param + }); + } + } + } + setArrowFunctionParameters(node, params, trailingCommaLoc) { + super.setArrowFunctionParameters(node, params, trailingCommaLoc); + this.tsDisallowOptionalPattern(node); + } parseFunctionBodyAndFinish(node, type, isMethod = false) { if (this.match(14)) { node.returnType = this.tsParseTypeOrTypePredicateAnnotation(14); } - const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : undefined; - if (bodilessType && !this.match(5) && this.isLineTerminator()) { - this.finishNode(node, bodilessType); - return; + return this.finishNode(node, bodilessType); } - if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) { - this.raise(node.start, TSErrors.DeclareFunctionHasImplementation); - + this.raise(TSErrors.DeclareFunctionHasImplementation, { + at: node + }); if (node.declare) { - super.parseFunctionBodyAndFinish(node, bodilessType, isMethod); - return; + return super.parseFunctionBodyAndFinish(node, bodilessType, isMethod); } } - - super.parseFunctionBodyAndFinish(node, type, isMethod); + this.tsDisallowOptionalPattern(node); + return super.parseFunctionBodyAndFinish(node, type, isMethod); } - registerFunctionStatementId(node) { if (!node.body && node.id) { - this.checkLVal(node.id, "function name", BIND_TS_AMBIENT); + this.checkIdentifier(node.id, 1024); } else { - super.registerFunctionStatementId(...arguments); + super.registerFunctionStatementId(node); } } - tsCheckForInvalidTypeCasts(items) { items.forEach(node => { if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") { - this.raise(node.typeAnnotation.start, TSErrors.UnexpectedTypeAnnotation); + this.raise(TSErrors.UnexpectedTypeAnnotation, { + at: node.typeAnnotation + }); } }); } - toReferencedList(exprList, isInParens) { this.tsCheckForInvalidTypeCasts(exprList); return exprList; } - - parseArrayLike(...args) { - const node = super.parseArrayLike(...args); - + parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { + const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors); if (node.type === "ArrayExpression") { this.tsCheckForInvalidTypeCasts(node.elements); } - return node; } - - parseSubscript(base, startPos, startLoc, noCalls, state) { - if (!this.hasPrecedingLineBreak() && this.match(33)) { + parseSubscript(base, startLoc, noCalls, state) { + if (!this.hasPrecedingLineBreak() && this.match(35)) { this.state.canStartJSXElement = false; this.next(); - const nonNullExpression = this.startNodeAt(startPos, startLoc); + const nonNullExpression = this.startNodeAt(startLoc); nonNullExpression.expression = base; return this.finishNode(nonNullExpression, "TSNonNullExpression"); } - let isOptionalCall = false; - if (this.match(18) && this.lookaheadCharCode() === 60) { if (noCalls) { state.stop = true; return base; } - state.optionalChainMember = isOptionalCall = true; this.next(); } - - if (this.match(43)) { - let missingParenErrorPos; + if (this.match(47) || this.match(51)) { + let missingParenErrorLoc; const result = this.tsTryParseAndCatch(() => { if (!noCalls && this.atPossibleAsyncArrow(base)) { - const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc); - + const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc); if (asyncArrowFn) { return asyncArrowFn; } } - - const node = this.startNodeAt(startPos, startLoc); - node.callee = base; - const typeArguments = this.tsParseTypeArguments(); - - if (typeArguments) { - if (isOptionalCall && !this.match(10)) { - missingParenErrorPos = this.state.pos; - this.unexpected(); - } - - if (!noCalls && this.eat(10)) { - node.arguments = this.parseCallExpressionArguments(11, false); - this.tsCheckForInvalidTypeCasts(node.arguments); - node.typeParameters = typeArguments; - - if (state.optionalChainMember) { - node.optional = isOptionalCall; - } - - return this.finishCallExpression(node, state.optionalChainMember); - } else if (this.match(22)) { - const result = this.parseTaggedTemplateExpression(base, startPos, startLoc, state); - result.typeParameters = typeArguments; - return result; - } + const typeArguments = this.tsParseTypeArgumentsInExpression(); + if (!typeArguments) return; + if (isOptionalCall && !this.match(10)) { + missingParenErrorLoc = this.state.curPosition(); + return; } - - this.unexpected(); + if (tokenIsTemplate(this.state.type)) { + const result = super.parseTaggedTemplateExpression(base, startLoc, state); + result.typeParameters = typeArguments; + return result; + } + if (!noCalls && this.eat(10)) { + const node = this.startNodeAt(startLoc); + node.callee = base; + node.arguments = this.parseCallExpressionArguments(11, false); + this.tsCheckForInvalidTypeCasts(node.arguments); + node.typeParameters = typeArguments; + if (state.optionalChainMember) { + node.optional = isOptionalCall; + } + return this.finishCallExpression(node, state.optionalChainMember); + } + const tokenType = this.state.type; + if (tokenType === 48 || tokenType === 52 || tokenType !== 10 && tokenCanStartExpression(tokenType) && !this.hasPrecedingLineBreak()) { + return; + } + const node = this.startNodeAt(startLoc); + node.expression = base; + node.typeParameters = typeArguments; + return this.finishNode(node, "TSInstantiationExpression"); }); - - if (missingParenErrorPos) { - this.unexpected(missingParenErrorPos, 10); + if (missingParenErrorLoc) { + this.unexpected(missingParenErrorLoc, 10); } - - if (result) return result; - } - - return super.parseSubscript(base, startPos, startLoc, noCalls, state); - } - - parseNewArguments(node) { - if (this.match(43)) { - const typeParameters = this.tsTryParseAndCatch(() => { - const args = this.tsParseTypeArguments(); - if (!this.match(10)) this.unexpected(); - return args; - }); - - if (typeParameters) { - node.typeParameters = typeParameters; + if (result) { + if (result.type === "TSInstantiationExpression" && (this.match(16) || this.match(18) && this.lookaheadCharCode() !== 40)) { + this.raise(TSErrors.InvalidPropertyAccessAfterInstantiationExpression, { + at: this.state.startLoc + }); + } + return result; } } - - super.parseNewArguments(node); + return super.parseSubscript(base, startLoc, noCalls, state); } - - parseExprOp(left, leftStartPos, leftStartLoc, minPrec) { - if (tokenOperatorPrecedence(52) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual(87)) { - const node = this.startNodeAt(leftStartPos, leftStartLoc); + parseNewCallee(node) { + var _callee$extra; + super.parseNewCallee(node); + const { + callee + } = node; + if (callee.type === "TSInstantiationExpression" && !((_callee$extra = callee.extra) != null && _callee$extra.parenthesized)) { + node.typeParameters = callee.typeParameters; + node.callee = callee.expression; + } + } + parseExprOp(left, leftStartLoc, minPrec) { + let isSatisfies; + if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && (this.isContextual(93) || (isSatisfies = this.isContextual(120)))) { + const node = this.startNodeAt(leftStartLoc); node.expression = left; - - const _const = this.tsTryNextParseConstantContext(); - - if (_const) { - node.typeAnnotation = _const; - } else { - node.typeAnnotation = this.tsNextThenParseType(); - } - - this.finishNode(node, "TSAsExpression"); - this.reScan_lt_gt(); - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec); - } - - return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec); - } - - checkReservedWord(word, startLoc, checkKeywords, isBinding) {} - - checkDuplicateExports() {} - - parseImport(node) { - node.importKind = "value"; - - if (tokenIsIdentifier(this.state.type) || this.match(49) || this.match(5)) { - let ahead = this.lookahead(); - - if (this.isContextual(120) && ahead.type !== 12 && ahead.type !== 91 && ahead.type !== 27) { - node.importKind = "type"; + node.typeAnnotation = this.tsInType(() => { this.next(); - ahead = this.lookahead(); - } - - if (tokenIsIdentifier(this.state.type) && ahead.type === 27) { - return this.tsParseImportEqualsDeclaration(node); - } + if (this.match(75)) { + if (isSatisfies) { + this.raise(Errors.UnexpectedKeyword, { + at: this.state.startLoc, + keyword: "const" + }); + } + return this.tsParseTypeReference(); + } + return this.tsParseType(); + }); + this.finishNode(node, isSatisfies ? "TSSatisfiesExpression" : "TSAsExpression"); + this.reScan_lt_gt(); + return this.parseExprOp(node, leftStartLoc, minPrec); + } + return super.parseExprOp(left, leftStartLoc, minPrec); + } + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (!this.state.isAmbientContext) { + super.checkReservedWord(word, startLoc, checkKeywords, isBinding); + } + } + checkImportReflection(node) { + super.checkImportReflection(node); + if (node.module && node.importKind !== "value") { + this.raise(TSErrors.ImportReflectionHasImportType, { + at: node.specifiers[0].loc.start + }); + } + } + checkDuplicateExports() {} + isPotentialImportPhase(isExport) { + if (super.isPotentialImportPhase(isExport)) return true; + if (this.isContextual(130)) { + const ch = this.lookaheadCharCode(); + return isExport ? ch === 123 || ch === 42 : ch !== 61; + } + return !isExport && this.isContextual(87); + } + applyImportPhase(node, isExport, phase, loc) { + super.applyImportPhase(node, isExport, phase, loc); + if (isExport) { + node.exportKind = phase === "type" ? "type" : "value"; + } else { + node.importKind = phase === "type" || phase === "typeof" ? phase : "value"; + } + } + parseImport(node) { + if (this.match(133)) { + node.importKind = "value"; + return super.parseImport(node); + } + let importNode; + if (tokenIsIdentifier(this.state.type) && this.lookaheadCharCode() === 61) { + node.importKind = "value"; + return this.tsParseImportEqualsDeclaration(node); + } else if (this.isContextual(130)) { + const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); + if (this.lookaheadCharCode() === 61) { + return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier); + } else { + importNode = super.parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier); + } + } else { + importNode = super.parseImport(node); } - - const importNode = super.parseImport(node); - if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") { - this.raise(importNode.start, TSErrors.TypeImportCannotSpecifyDefaultAndNamed); + this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, { + at: importNode + }); } - return importNode; } - - parseExport(node) { - if (this.match(77)) { + parseExport(node, decorators) { + if (this.match(83)) { this.next(); - - if (this.isContextual(120) && this.lookaheadCharCode() !== 61) { - node.importKind = "type"; - this.next(); + let maybeDefaultIdentifier = null; + if (this.isContextual(130) && this.isPotentialImportPhase(false)) { + maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); } else { node.importKind = "value"; } - - return this.tsParseImportEqualsDeclaration(node, true); - } else if (this.eat(27)) { + return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, true); + } else if (this.eat(29)) { const assign = node; - assign.expression = this.parseExpression(); + assign.expression = super.parseExpression(); this.semicolon(); + this.sawUnambiguousESM = true; return this.finishNode(assign, "TSExportAssignment"); - } else if (this.eatContextual(87)) { + } else if (this.eatContextual(93)) { const decl = node; - this.expectContextual(118); + this.expectContextual(128); decl.id = this.parseIdentifier(); this.semicolon(); return this.finishNode(decl, "TSNamespaceExportDeclaration"); } else { - if (this.isContextual(120) && this.lookahead().type === 5) { - this.next(); - node.exportKind = "type"; - } else { - node.exportKind = "value"; - } - - return super.parseExport(node); + return super.parseExport(node, decorators); } } - isAbstractClass() { - return this.isContextual(114) && this.lookahead().type === 74; + return this.isContextual(124) && this.lookahead().type === 80; } - parseExportDefaultExpression() { if (this.isAbstractClass()) { const cls = this.startNode(); this.next(); cls.abstract = true; - this.parseClass(cls, true, true); - return cls; + return this.parseClass(cls, true, true); } - - if (this.match(119)) { - const interfaceNode = this.startNode(); - this.next(); - const result = this.tsParseInterfaceDeclaration(interfaceNode); + if (this.match(129)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); if (result) return result; } - return super.parseExportDefaultExpression(); } - - parseStatementContent(context, topLevel) { - if (this.state.type === 69) { - const ahead = this.lookahead(); - - if (ahead.type === 116) { - const node = this.startNode(); - this.next(); - this.expectContextual(116); - return this.tsParseEnumDeclaration(node, true); + parseVarStatement(node, kind, allowMissingInitializer = false) { + const { + isAmbientContext + } = this.state; + const declaration = super.parseVarStatement(node, kind, allowMissingInitializer || isAmbientContext); + if (!isAmbientContext) return declaration; + for (const { + id, + init + } of declaration.declarations) { + if (!init) continue; + if (kind !== "const" || !!id.typeAnnotation) { + this.raise(TSErrors.InitializerNotAllowedInAmbientContext, { + at: init + }); + } else if (!isValidAmbientConstInitializer(init, this.hasPlugin("estree"))) { + this.raise(TSErrors.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference, { + at: init + }); } } - - return super.parseStatementContent(context, topLevel); + return declaration; + } + parseStatementContent(flags, decorators) { + if (this.match(75) && this.isLookaheadContextual("enum")) { + const node = this.startNode(); + this.expect(75); + return this.tsParseEnumDeclaration(node, { + const: true + }); + } + if (this.isContextual(126)) { + return this.tsParseEnumDeclaration(this.startNode()); + } + if (this.isContextual(129)) { + const result = this.tsParseInterfaceDeclaration(this.startNode()); + if (result) return result; + } + return super.parseStatementContent(flags, decorators); } - parseAccessModifier() { return this.tsParseModifier(["public", "protected", "private"]); } - tsHasSomeModifiers(member, modifiers) { return modifiers.some(modifier => { if (tsIsAccessModifier(modifier)) { return member.accessibility === modifier; } - return !!member[modifier]; }); } - tsIsStartOfStaticBlocks() { - return this.isContextual(98) && this.lookaheadCharCode() === 123; + return this.isContextual(106) && this.lookaheadCharCode() === 123; } - parseClassMember(classBody, member, state) { const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"]; - this.tsParseModifiers(member, modifiers, undefined, undefined, true); - + this.tsParseModifiers({ + allowedModifiers: modifiers, + disallowedModifiers: ["in", "out"], + stopOnStartOfClassStaticBlock: true, + errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions + }, member); const callParseClassMemberWithIsStatic = () => { if (this.tsIsStartOfStaticBlocks()) { this.next(); this.next(); - if (this.tsHasSomeModifiers(member, modifiers)) { - this.raise(this.state.pos, TSErrors.StaticBlockCannotHaveModifier); + this.raise(TSErrors.StaticBlockCannotHaveModifier, { + at: this.state.curPosition() + }); } - - this.parseClassStaticBlock(classBody, member); + super.parseClassStaticBlock(classBody, member); } else { this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static); } }; - if (member.declare) { this.tsInAmbientContext(callParseClassMemberWithIsStatic); } else { callParseClassMemberWithIsStatic(); } } - parseClassMemberWithIsStatic(classBody, member, state, isStatic) { const idx = this.tsTryParseIndexSignature(member); - if (idx) { classBody.body.push(idx); - if (member.abstract) { - this.raise(member.start, TSErrors.IndexSignatureHasAbstract); + this.raise(TSErrors.IndexSignatureHasAbstract, { + at: member + }); } - if (member.accessibility) { - this.raise(member.start, TSErrors.IndexSignatureHasAccessibility, member.accessibility); + this.raise(TSErrors.IndexSignatureHasAccessibility, { + at: member, + modifier: member.accessibility + }); } - if (member.declare) { - this.raise(member.start, TSErrors.IndexSignatureHasDeclare); + this.raise(TSErrors.IndexSignatureHasDeclare, { + at: member + }); } - if (member.override) { - this.raise(member.start, TSErrors.IndexSignatureHasOverride); + this.raise(TSErrors.IndexSignatureHasOverride, { + at: member + }); } - return; } - if (!this.state.inAbstractClass && member.abstract) { - this.raise(member.start, TSErrors.NonAbstractClassHasAbstractMethod); + this.raise(TSErrors.NonAbstractClassHasAbstractMethod, { + at: member + }); } - if (member.override) { if (!state.hadSuperClass) { - this.raise(member.start, TSErrors.OverrideNotInSubClass); + this.raise(TSErrors.OverrideNotInSubClass, { + at: member + }); } } - super.parseClassMemberWithIsStatic(classBody, member, state, isStatic); } - parsePostMemberNameModifiers(methodOrProp) { const optional = this.eat(17); if (optional) methodOrProp.optional = true; - if (methodOrProp.readonly && this.match(10)) { - this.raise(methodOrProp.start, TSErrors.ClassMethodHasReadonly); + this.raise(TSErrors.ClassMethodHasReadonly, { + at: methodOrProp + }); } - if (methodOrProp.declare && this.match(10)) { - this.raise(methodOrProp.start, TSErrors.ClassMethodHasDeclare); + this.raise(TSErrors.ClassMethodHasDeclare, { + at: methodOrProp + }); } } - - parseExpressionStatement(node, expr) { - const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined; - return decl || super.parseExpressionStatement(node, expr); + parseExpressionStatement(node, expr, decorators) { + const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr, decorators) : undefined; + return decl || super.parseExpressionStatement(node, expr, decorators); } - shouldParseExportDeclaration() { if (this.tsIsDeclarationStart()) return true; return super.shouldParseExportDeclaration(); } - - parseConditional(expr, startPos, startLoc, refExpressionErrors) { + parseConditional(expr, startLoc, refExpressionErrors) { if (!this.state.maybeInArrowParameters || !this.match(17)) { - return super.parseConditional(expr, startPos, startLoc, refExpressionErrors); + return super.parseConditional(expr, startLoc, refExpressionErrors); } - - const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc)); - + const result = this.tryParse(() => super.parseConditional(expr, startLoc)); if (!result.node) { if (result.error) { super.setOptionalParametersError(refExpressionErrors, result.error); } - return expr; } - if (result.error) this.state = result.failState; return result.node; } - - parseParenItem(node, startPos, startLoc) { - node = super.parseParenItem(node, startPos, startLoc); - + parseParenItem(node, startLoc) { + node = super.parseParenItem(node, startLoc); if (this.eat(17)) { node.optional = true; this.resetEndLocation(node); } - if (this.match(14)) { - const typeCastNode = this.startNodeAt(startPos, startLoc); + const typeCastNode = this.startNodeAt(startLoc); typeCastNode.expression = node; typeCastNode.typeAnnotation = this.tsParseTypeAnnotation(); return this.finishNode(typeCastNode, "TSTypeCastExpression"); } - return node; } - parseExportDeclaration(node) { - const startPos = this.state.start; + if (!this.state.isAmbientContext && this.isContextual(125)) { + return this.tsInAmbientContext(() => this.parseExportDeclaration(node)); + } const startLoc = this.state.startLoc; - const isDeclare = this.eatContextual(115); - - if (isDeclare && (this.isContextual(115) || !this.shouldParseExportDeclaration())) { - throw this.raise(this.state.start, TSErrors.ExpectedAmbientAfterExportDeclare); + const isDeclare = this.eatContextual(125); + if (isDeclare && (this.isContextual(125) || !this.shouldParseExportDeclaration())) { + throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, { + at: this.state.startLoc + }); } - - let declaration; - - if (tokenIsIdentifier(this.state.type)) { - declaration = this.tsTryParseExportDeclaration(); - } - - if (!declaration) { - declaration = super.parseExportDeclaration(node); - } - - if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) { + const isIdentifier = tokenIsIdentifier(this.state.type); + const declaration = isIdentifier && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(node); + if (!declaration) return null; + if (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare) { node.exportKind = "type"; } - - if (declaration && isDeclare) { - this.resetStartLocation(declaration, startPos, startLoc); + if (isDeclare) { + this.resetStartLocation(declaration, startLoc); declaration.declare = true; } - return declaration; } - - parseClassId(node, isStatement, optionalId) { - if ((!isStatement || optionalId) && this.isContextual(104)) { + parseClassId(node, isStatement, optionalId, bindingType) { + if ((!isStatement || optionalId) && this.isContextual(113)) { return; } - - super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS); - const typeParameters = this.tsTryParseTypeParameters(); + super.parseClassId(node, isStatement, optionalId, node.declare ? 1024 : 8331); + const typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers); if (typeParameters) node.typeParameters = typeParameters; } - parseClassPropertyAnnotation(node) { - if (!node.optional && this.eat(33)) { - node.definite = true; + if (!node.optional) { + if (this.eat(35)) { + node.definite = true; + } else if (this.eat(17)) { + node.optional = true; + } } - const type = this.tsTryParseTypeAnnotation(); if (type) node.typeAnnotation = type; } - parseClassProperty(node) { this.parseClassPropertyAnnotation(node); - - if (this.state.isAmbientContext && this.match(27)) { - this.raise(this.state.start, TSErrors.DeclareClassFieldHasInitializer); + if (this.state.isAmbientContext && !(node.readonly && !node.typeAnnotation) && this.match(29)) { + this.raise(TSErrors.DeclareClassFieldHasInitializer, { + at: this.state.startLoc + }); } - - if (node.abstract && this.match(27)) { + if (node.abstract && this.match(29)) { const { key } = node; - this.raise(this.state.start, TSErrors.AbstractPropertyHasInitializer, key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(key.start, key.end)}]`); + this.raise(TSErrors.AbstractPropertyHasInitializer, { + at: this.state.startLoc, + propertyName: key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }); } - return super.parseClassProperty(node); } - parseClassPrivateProperty(node) { if (node.abstract) { - this.raise(node.start, TSErrors.PrivateElementHasAbstract); + this.raise(TSErrors.PrivateElementHasAbstract, { + at: node + }); } - if (node.accessibility) { - this.raise(node.start, TSErrors.PrivateElementHasAccessibility, node.accessibility); + this.raise(TSErrors.PrivateElementHasAccessibility, { + at: node, + modifier: node.accessibility + }); } - this.parseClassPropertyAnnotation(node); return super.parseClassPrivateProperty(node); } - + parseClassAccessorProperty(node) { + this.parseClassPropertyAnnotation(node); + if (node.optional) { + this.raise(TSErrors.AccessorCannotBeOptional, { + at: node + }); + } + return super.parseClassAccessorProperty(node); + } pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { - const typeParameters = this.tsTryParseTypeParameters(); - + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); if (typeParameters && isConstructor) { - this.raise(typeParameters.start, TSErrors.ConstructorHasTypeParameters); + this.raise(TSErrors.ConstructorHasTypeParameters, { + at: typeParameters + }); } - - if (method.declare && (method.kind === "get" || method.kind === "set")) { - this.raise(method.start, TSErrors.DeclareAccessor, method.kind); + const { + declare = false, + kind + } = method; + if (declare && (kind === "get" || kind === "set")) { + this.raise(TSErrors.DeclareAccessor, { + at: method, + kind + }); } - if (typeParameters) method.typeParameters = typeParameters; super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper); } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { - const typeParameters = this.tsTryParseTypeParameters(); + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); if (typeParameters) method.typeParameters = typeParameters; super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync); } - declareClassPrivateMethodInScope(node, kind) { if (node.type === "TSDeclareMethod") return; if (node.type === "MethodDefinition" && !node.value.body) return; super.declareClassPrivateMethodInScope(node, kind); } - parseClassSuper(node) { super.parseClassSuper(node); - - if (node.superClass && this.match(43)) { - node.superTypeParameters = this.tsParseTypeArguments(); + if (node.superClass && (this.match(47) || this.match(51))) { + node.superTypeParameters = this.tsParseTypeArgumentsInExpression(); } - - if (this.eatContextual(104)) { + if (this.eatContextual(113)) { node.implements = this.tsParseHeritageClause("implements"); } } - - parseObjPropValue(prop, ...args) { - const typeParameters = this.tsTryParseTypeParameters(); + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); if (typeParameters) prop.typeParameters = typeParameters; - super.parseObjPropValue(prop, ...args); + return super.parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors); } - - parseFunctionParams(node, allowModifiers) { - const typeParameters = this.tsTryParseTypeParameters(); + parseFunctionParams(node, isConstructor) { + const typeParameters = this.tsTryParseTypeParameters(this.tsParseConstModifier); if (typeParameters) node.typeParameters = typeParameters; - super.parseFunctionParams(node, allowModifiers); + super.parseFunctionParams(node, isConstructor); } - parseVarId(decl, kind) { super.parseVarId(decl, kind); - - if (decl.id.type === "Identifier" && this.eat(33)) { + if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) { decl.definite = true; } - const type = this.tsTryParseTypeAnnotation(); - if (type) { decl.id.typeAnnotation = type; this.resetEndLocation(decl.id); } } - parseAsyncArrowFromCallExpression(node, call) { if (this.match(14)) { node.returnType = this.tsParseTypeAnnotation(); } - return super.parseAsyncArrowFromCallExpression(node, call); } - - parseMaybeAssign(...args) { - var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3; - + parseMaybeAssign(refExpressionErrors, afterLeftParse) { + var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2; let state; let jsx; let typeCast; - - if (this.hasPlugin("jsx") && (this.match(132) || this.match(43))) { + if (this.hasPlugin("jsx") && (this.match(142) || this.match(47))) { state = this.state.clone(); - jsx = this.tryParse(() => super.parseMaybeAssign(...args), state); + jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); if (!jsx.error) return jsx.node; const { context } = this.state; - - if (context[context.length - 1] === types.j_oTag) { - context.length -= 2; - } else if (context[context.length - 1] === types.j_expr) { - context.length -= 1; + const currentContext = context[context.length - 1]; + if (currentContext === types$1.j_oTag || currentContext === types$1.j_expr) { + context.pop(); } } - - if (!((_jsx = jsx) != null && _jsx.error) && !this.match(43)) { - return super.parseMaybeAssign(...args); + if (!((_jsx = jsx) != null && _jsx.error) && !this.match(47)) { + return super.parseMaybeAssign(refExpressionErrors, afterLeftParse); } - + if (!state || state === this.state) state = this.state.clone(); let typeParameters; - state = state || this.state.clone(); const arrow = this.tryParse(abort => { var _expr$extra, _typeParameters; - - typeParameters = this.tsParseTypeParameters(); - const expr = super.parseMaybeAssign(...args); - + typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier); + const expr = super.parseMaybeAssign(refExpressionErrors, afterLeftParse); if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { abort(); } - if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) { this.resetStartLocationFromNode(expr, typeParameters); } - expr.typeParameters = typeParameters; return expr; }, state); - if (!arrow.error && !arrow.aborted) { if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); return arrow.node; } - if (!jsx) { - assert(!this.hasPlugin("jsx")); - typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state); + assert$1(!this.hasPlugin("jsx")); + typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state); if (!typeCast.error) return typeCast.node; } - if ((_jsx2 = jsx) != null && _jsx2.node) { this.state = jsx.failState; return jsx.node; } - if (arrow.node) { this.state = arrow.failState; if (typeParameters) this.reportReservedArrowTypeParam(typeParameters); return arrow.node; } - if ((_typeCast = typeCast) != null && _typeCast.node) { this.state = typeCast.failState; return typeCast.node; } - - if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error; - if (arrow.thrown) throw arrow.error; - if ((_typeCast2 = typeCast) != null && _typeCast2.thrown) throw typeCast.error; - throw ((_jsx4 = jsx) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error); + throw ((_jsx3 = jsx) == null ? void 0 : _jsx3.error) || arrow.error || ((_typeCast2 = typeCast) == null ? void 0 : _typeCast2.error); } - reportReservedArrowTypeParam(node) { var _node$extra; - - if (node.params.length === 1 && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { - this.raise(node.start, TSErrors.ReservedArrowTypeParam); + if (node.params.length === 1 && !node.params[0].constraint && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) { + this.raise(TSErrors.ReservedArrowTypeParam, { + at: node + }); } } - - parseMaybeUnary(refExpressionErrors) { - if (!this.hasPlugin("jsx") && this.match(43)) { + parseMaybeUnary(refExpressionErrors, sawUnary) { + if (!this.hasPlugin("jsx") && this.match(47)) { return this.tsParseTypeAssertion(); - } else { - return super.parseMaybeUnary(refExpressionErrors); } + return super.parseMaybeUnary(refExpressionErrors, sawUnary); } - parseArrow(node) { if (this.match(14)) { const result = this.tryParse(abort => { @@ -10733,247 +12065,205 @@ var typescript = (superClass => class extends superClass { return returnType; }); if (result.aborted) return; - if (!result.thrown) { if (result.error) this.state = result.failState; node.returnType = result.node; } } - return super.parseArrow(node); } - - parseAssignableListItemTypes(param) { + parseAssignableListItemTypes(param, flags) { + if (!(flags & 2)) return param; if (this.eat(17)) { - if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) { - this.raise(param.start, TSErrors.PatternIsOptional); - } - param.optional = true; } - const type = this.tsTryParseTypeAnnotation(); if (type) param.typeAnnotation = type; this.resetEndLocation(param); return param; } - isAssignable(node, isBinding) { switch (node.type) { case "TSTypeCastExpression": return this.isAssignable(node.expression, isBinding); - case "TSParameterProperty": return true; - default: return super.isAssignable(node, isBinding); } } - toAssignable(node, isLHS = false) { switch (node.type) { - case "TSTypeCastExpression": - return super.toAssignable(this.typeCastToParameter(node), isLHS); - - case "TSParameterProperty": - return super.toAssignable(node, isLHS); - case "ParenthesizedExpression": - return this.toAssignableParenthesizedExpression(node, isLHS); - + this.toAssignableParenthesizedExpression(node, isLHS); + break; case "TSAsExpression": + case "TSSatisfiesExpression": case "TSNonNullExpression": case "TSTypeAssertion": - node.expression = this.toAssignable(node.expression, isLHS); - return node; - + if (isLHS) { + this.expressionScope.recordArrowParameterBindingError(TSErrors.UnexpectedTypeCastInParameter, { + at: node + }); + } else { + this.raise(TSErrors.UnexpectedTypeCastInParameter, { + at: node + }); + } + this.toAssignable(node.expression, isLHS); + break; + case "AssignmentExpression": + if (!isLHS && node.left.type === "TSTypeCastExpression") { + node.left = this.typeCastToParameter(node.left); + } default: - return super.toAssignable(node, isLHS); + super.toAssignable(node, isLHS); } } - toAssignableParenthesizedExpression(node, isLHS) { switch (node.expression.type) { case "TSAsExpression": + case "TSSatisfiesExpression": case "TSNonNullExpression": case "TSTypeAssertion": case "ParenthesizedExpression": - node.expression = this.toAssignable(node.expression, isLHS); - return node; - + this.toAssignable(node.expression, isLHS); + break; default: - return super.toAssignable(node, isLHS); + super.toAssignable(node, isLHS); } } - - checkLVal(expr, contextDescription, ...args) { - var _expr$extra2; - - switch (expr.type) { - case "TSTypeCastExpression": - return; - - case "TSParameterProperty": - this.checkLVal(expr.parameter, "parameter property", ...args); - return; - + checkToRestConversion(node, allowPattern) { + switch (node.type) { case "TSAsExpression": + case "TSSatisfiesExpression": case "TSTypeAssertion": - if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) { - this.raise(expr.start, ErrorMessages.InvalidLhs, contextDescription); - break; - } - - this.checkLVal(expr.expression, "parenthesized expression", ...args); - return; - case "TSNonNullExpression": - this.checkLVal(expr.expression, contextDescription, ...args); - return; - + this.checkToRestConversion(node.expression, false); + break; default: - super.checkLVal(expr, contextDescription, ...args); - return; + super.checkToRestConversion(node, allowPattern); } } - + isValidLVal(type, isUnparenthesizedInAssign, binding) { + return getOwn({ + TSTypeCastExpression: true, + TSParameterProperty: "parameter", + TSNonNullExpression: "expression", + TSAsExpression: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true], + TSSatisfiesExpression: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true], + TSTypeAssertion: (binding !== 64 || !isUnparenthesizedInAssign) && ["expression", true] + }, type) || super.isValidLVal(type, isUnparenthesizedInAssign, binding); + } parseBindingAtom() { - switch (this.state.type) { - case 72: - return this.parseIdentifier(true); - - default: - return super.parseBindingAtom(); + if (this.state.type === 78) { + return this.parseIdentifier(true); } + return super.parseBindingAtom(); } - parseMaybeDecoratorArguments(expr) { - if (this.match(43)) { - const typeArguments = this.tsParseTypeArguments(); - + if (this.match(47) || this.match(51)) { + const typeArguments = this.tsParseTypeArgumentsInExpression(); if (this.match(10)) { const call = super.parseMaybeDecoratorArguments(expr); call.typeParameters = typeArguments; return call; } - - this.unexpected(this.state.start, 10); + this.unexpected(null, 10); } - return super.parseMaybeDecoratorArguments(expr); } - checkCommaAfterRest(close) { if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) { this.next(); - } else { - super.checkCommaAfterRest(close); + return false; } + return super.checkCommaAfterRest(close); } - isClassMethod() { - return this.match(43) || super.isClassMethod(); + return this.match(47) || super.isClassMethod(); } - isClassProperty() { - return this.match(33) || this.match(14) || super.isClassProperty(); + return this.match(35) || this.match(14) || super.isClassProperty(); } - - parseMaybeDefault(...args) { - const node = super.parseMaybeDefault(...args); - + parseMaybeDefault(startLoc, left) { + const node = super.parseMaybeDefault(startLoc, left); if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) { - this.raise(node.typeAnnotation.start, TSErrors.TypeAnnotationAfterAssign); + this.raise(TSErrors.TypeAnnotationAfterAssign, { + at: node.typeAnnotation + }); } - return node; } - getTokenFromCode(code) { if (this.state.inType) { if (code === 62) { - return this.finishOp(44, 1); + this.finishOp(48, 1); + return; } - if (code === 60) { - return this.finishOp(43, 1); + this.finishOp(47, 1); + return; } } - - return super.getTokenFromCode(code); + super.getTokenFromCode(code); } - reScan_lt_gt() { const { type } = this.state; - - if (type === 43) { + if (type === 47) { this.state.pos -= 1; this.readToken_lt(); - } else if (type === 44) { + } else if (type === 48) { this.state.pos -= 1; this.readToken_gt(); } } - - toAssignableList(exprList) { + reScan_lt() { + const { + type + } = this.state; + if (type === 51) { + this.state.pos -= 2; + this.finishOp(47, 1); + return 47; + } + return type; + } + toAssignableList(exprList, trailingCommaLoc, isLHS) { for (let i = 0; i < exprList.length; i++) { const expr = exprList[i]; - if (!expr) continue; - - switch (expr.type) { - case "TSTypeCastExpression": - exprList[i] = this.typeCastToParameter(expr); - break; - - case "TSAsExpression": - case "TSTypeAssertion": - if (!this.state.maybeInArrowParameters) { - exprList[i] = this.typeCastToParameter(expr); - } else { - this.raise(expr.start, TSErrors.UnexpectedTypeCastInParameter); - } - - break; + if ((expr == null ? void 0 : expr.type) === "TSTypeCastExpression") { + exprList[i] = this.typeCastToParameter(expr); } } - - return super.toAssignableList(...arguments); + super.toAssignableList(exprList, trailingCommaLoc, isLHS); } - typeCastToParameter(node) { node.expression.typeAnnotation = node.typeAnnotation; - this.resetEndLocation(node.expression, node.typeAnnotation.end, node.typeAnnotation.loc.end); + this.resetEndLocation(node.expression, node.typeAnnotation.loc.end); return node.expression; } - shouldParseArrow(params) { if (this.match(14)) { return params.every(expr => this.isAssignable(expr, true)); } - return super.shouldParseArrow(params); } - shouldParseAsyncArrow() { return this.match(14) || super.shouldParseAsyncArrow(); } - canHaveLeadingDecorator() { return super.canHaveLeadingDecorator() || this.isAbstractClass(); } - jsxParseOpeningElementAfterName(node) { - if (this.match(43)) { - const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArguments()); + if (this.match(47) || this.match(51)) { + const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression()); if (typeArguments) node.typeParameters = typeArguments; } - return super.jsxParseOpeningElementAfterName(node); } - getGetterSetterExpectedParamCount(method) { const baseCount = super.getGetterSetterExpectedParamCount(method); const params = this.getObjectOrClassMethodParams(method); @@ -10981,119 +12271,100 @@ var typescript = (superClass => class extends superClass { const hasContextParam = firstParam && this.isThisParam(firstParam); return hasContextParam ? baseCount + 1 : baseCount; } - parseCatchClauseParam() { const param = super.parseCatchClauseParam(); const type = this.tsTryParseTypeAnnotation(); - if (type) { param.typeAnnotation = type; this.resetEndLocation(param); } - return param; } - tsInAmbientContext(cb) { const oldIsAmbientContext = this.state.isAmbientContext; this.state.isAmbientContext = true; - try { return cb(); } finally { this.state.isAmbientContext = oldIsAmbientContext; } } - - parseClass(node, ...args) { + parseClass(node, isStatement, optionalId) { const oldInAbstractClass = this.state.inAbstractClass; this.state.inAbstractClass = !!node.abstract; - try { - return super.parseClass(node, ...args); + return super.parseClass(node, isStatement, optionalId); } finally { this.state.inAbstractClass = oldInAbstractClass; } } - - tsParseAbstractDeclaration(node) { - if (this.match(74)) { + tsParseAbstractDeclaration(node, decorators) { + if (this.match(80)) { node.abstract = true; - return this.parseClass(node, true, false); - } else if (this.isContextual(119)) { + return this.maybeTakeDecorators(decorators, this.parseClass(node, true, false)); + } else if (this.isContextual(129)) { if (!this.hasFollowingLineBreak()) { node.abstract = true; - this.raise(node.start, TSErrors.NonClassMethodPropertyHasAbstractModifer); - this.next(); + this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, { + at: node + }); return this.tsParseInterfaceDeclaration(node); } } else { - this.unexpected(null, 74); + this.unexpected(null, 80); } } - - parseMethod(...args) { - const method = super.parseMethod(...args); - + parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) { + const method = super.parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope); if (method.abstract) { const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body; - if (hasBody) { const { key } = method; - this.raise(method.start, TSErrors.AbstractMethodHasImplementation, key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]`); + this.raise(TSErrors.AbstractMethodHasImplementation, { + at: method, + methodName: key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]` + }); } } - return method; } - tsParseTypeParameterName() { const typeName = this.parseIdentifier(); return typeName.name; } - shouldParseAsAmbientContext() { return !!this.getPluginOption("typescript", "dts"); } - parse() { if (this.shouldParseAsAmbientContext()) { this.state.isAmbientContext = true; } - return super.parse(); } - getExpression() { if (this.shouldParseAsAmbientContext()) { this.state.isAmbientContext = true; } - return super.getExpression(); } - parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { if (!isString && isMaybeTypeOnly) { this.parseTypeOnlyImportExportSpecifier(node, false, isInTypeExport); return this.finishNode(node, "ExportSpecifier"); } - node.exportKind = "value"; return super.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly); } - - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) { + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { if (!importedIsString && isMaybeTypeOnly) { this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport); return this.finishNode(specifier, "ImportSpecifier"); } - specifier.importKind = "value"; - return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly); + return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, isInTypeOnlyImport ? 4098 : 4096); } - parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) { const leftOfAsKey = isImport ? "imported" : "local"; const rightOfAsKey = isImport ? "local" : "exported"; @@ -11101,18 +12372,15 @@ var typescript = (superClass => class extends superClass { let rightOfAs; let hasTypeSpecifier = false; let canParseAsKeyword = true; - const pos = leftOfAs.start; - - if (this.isContextual(87)) { + const loc = leftOfAs.loc.start; + if (this.isContextual(93)) { const firstAs = this.parseIdentifier(); - - if (this.isContextual(87)) { + if (this.isContextual(93)) { const secondAs = this.parseIdentifier(); - if (tokenIsKeywordOrIdentifier(this.state.type)) { hasTypeSpecifier = true; leftOfAs = firstAs; - rightOfAs = this.parseIdentifier(); + rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); canParseAsKeyword = false; } else { rightOfAs = secondAs; @@ -11120,294 +12388,337 @@ var typescript = (superClass => class extends superClass { } } else if (tokenIsKeywordOrIdentifier(this.state.type)) { canParseAsKeyword = false; - rightOfAs = this.parseIdentifier(); + rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName(); } else { hasTypeSpecifier = true; leftOfAs = firstAs; } } else if (tokenIsKeywordOrIdentifier(this.state.type)) { hasTypeSpecifier = true; - leftOfAs = this.parseIdentifier(); + if (isImport) { + leftOfAs = this.parseIdentifier(true); + if (!this.isContextual(93)) { + this.checkReservedWord(leftOfAs.name, leftOfAs.loc.start, true, true); + } + } else { + leftOfAs = this.parseModuleExportName(); + } } - if (hasTypeSpecifier && isInTypeOnlyImportExport) { - this.raise(pos, isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports); + this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, { + at: loc + }); } - node[leftOfAsKey] = leftOfAs; node[rightOfAsKey] = rightOfAs; const kindKey = isImport ? "importKind" : "exportKind"; node[kindKey] = hasTypeSpecifier ? "type" : "value"; - - if (canParseAsKeyword && this.eatContextual(87)) { + if (canParseAsKeyword && this.eatContextual(93)) { node[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName(); } - if (!node[rightOfAsKey]) { node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]); } - if (isImport) { - this.checkLVal(node[rightOfAsKey], "import specifier", BIND_LEXICAL); + this.checkIdentifier(node[rightOfAsKey], hasTypeSpecifier ? 4098 : 4096); } } - +}; +function isPossiblyLiteralEnum(expression) { + if (expression.type !== "MemberExpression") return false; + const { + computed, + property + } = expression; + if (computed && property.type !== "StringLiteral" && (property.type !== "TemplateLiteral" || property.expressions.length > 0)) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); +} +function isValidAmbientConstInitializer(expression, estree) { + var _expression$extra; + const { + type + } = expression; + if ((_expression$extra = expression.extra) != null && _expression$extra.parenthesized) { + return false; + } + if (estree) { + if (type === "Literal") { + const { + value + } = expression; + if (typeof value === "string" || typeof value === "boolean") { + return true; + } + } + } else { + if (type === "StringLiteral" || type === "BooleanLiteral") { + return true; + } + } + if (isNumber$1(expression, estree) || isNegativeNumber(expression, estree)) { + return true; + } + if (type === "TemplateLiteral" && expression.expressions.length === 0) { + return true; + } + if (isPossiblyLiteralEnum(expression)) { + return true; + } + return false; +} +function isNumber$1(expression, estree) { + if (estree) { + return expression.type === "Literal" && (typeof expression.value === "number" || "bigint" in expression); + } + return expression.type === "NumericLiteral" || expression.type === "BigIntLiteral"; +} +function isNegativeNumber(expression, estree) { + if (expression.type === "UnaryExpression") { + const { + operator, + argument + } = expression; + if (operator === "-" && isNumber$1(argument, estree)) { + return true; + } + } + return false; +} +function isUncomputedMemberExpressionChain(expression) { + if (expression.type === "Identifier") return true; + if (expression.type !== "MemberExpression" || expression.computed) { + return false; + } + return isUncomputedMemberExpressionChain(expression.object); +} +const PlaceholderErrors = ParseErrorEnum`placeholders`({ + ClassNameIsRequired: "A class name is required.", + UnexpectedSpace: "Unexpected space in placeholder." }); - -const PlaceHolderErrors = makeErrorTemplates({ - ClassNameIsRequired: "A class name is required." -}, ErrorCodes.SyntaxError); -var placeholders = (superClass => class extends superClass { +var placeholders = superClass => class PlaceholdersParserMixin extends superClass { parsePlaceholder(expectedNode) { - if (this.match(134)) { + if (this.match(144)) { const node = this.startNode(); this.next(); - this.assertNoSpace("Unexpected space in placeholder."); + this.assertNoSpace(); node.name = super.parseIdentifier(true); - this.assertNoSpace("Unexpected space in placeholder."); - this.expect(134); + this.assertNoSpace(); + this.expect(144); return this.finishPlaceholder(node, expectedNode); } } - finishPlaceholder(node, expectedNode) { const isFinished = !!(node.expectedNode && node.type === "Placeholder"); node.expectedNode = expectedNode; return isFinished ? node : this.finishNode(node, "Placeholder"); } - getTokenFromCode(code) { if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { - return this.finishOp(134, 2); + this.finishOp(144, 2); + } else { + super.getTokenFromCode(code); } - - return super.getTokenFromCode(...arguments); } - - parseExprAtom() { - return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments); + parseExprAtom(refExpressionErrors) { + return this.parsePlaceholder("Expression") || super.parseExprAtom(refExpressionErrors); } - - parseIdentifier() { - return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments); + parseIdentifier(liberal) { + return this.parsePlaceholder("Identifier") || super.parseIdentifier(liberal); } - - checkReservedWord(word) { - if (word !== undefined) super.checkReservedWord(...arguments); + checkReservedWord(word, startLoc, checkKeywords, isBinding) { + if (word !== undefined) { + super.checkReservedWord(word, startLoc, checkKeywords, isBinding); + } } - parseBindingAtom() { - return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments); + return this.parsePlaceholder("Pattern") || super.parseBindingAtom(); } - - checkLVal(expr) { - if (expr.type !== "Placeholder") super.checkLVal(...arguments); + isValidLVal(type, isParenthesized, binding) { + return type === "Placeholder" || super.isValidLVal(type, isParenthesized, binding); } - - toAssignable(node) { + toAssignable(node, isLHS) { if (node && node.type === "Placeholder" && node.expectedNode === "Expression") { node.expectedNode = "Pattern"; - return node; + } else { + super.toAssignable(node, isLHS); } - - return super.toAssignable(...arguments); } - - isLet(context) { - if (super.isLet(context)) { + chStartsBindingIdentifier(ch, pos) { + if (super.chStartsBindingIdentifier(ch, pos)) { return true; } - - if (!this.isContextual(93)) { - return false; - } - - if (context) return false; const nextToken = this.lookahead(); - - if (nextToken.type === 134) { + if (nextToken.type === 144) { return true; } - return false; } - - verifyBreakContinue(node) { + verifyBreakContinue(node, isBreak) { if (node.label && node.label.type === "Placeholder") return; - super.verifyBreakContinue(...arguments); + super.verifyBreakContinue(node, isBreak); } - parseExpressionStatement(node, expr) { - if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) { - return super.parseExpressionStatement(...arguments); + var _expr$extra; + if (expr.type !== "Placeholder" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) { + return super.parseExpressionStatement(node, expr); } - if (this.match(14)) { const stmt = node; stmt.label = this.finishPlaceholder(expr, "Identifier"); this.next(); - stmt.body = this.parseStatement("label"); + stmt.body = super.parseStatementOrSloppyAnnexBFunctionDeclaration(); return this.finishNode(stmt, "LabeledStatement"); } - this.semicolon(); node.name = expr.name; return this.finishPlaceholder(node, "Statement"); } - - parseBlock() { - return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments); + parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) { + return this.parsePlaceholder("BlockStatement") || super.parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse); } - - parseFunctionId() { - return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments); + parseFunctionId(requireId) { + return this.parsePlaceholder("Identifier") || super.parseFunctionId(requireId); } - parseClass(node, isStatement, optionalId) { const type = isStatement ? "ClassDeclaration" : "ClassExpression"; this.next(); - this.takeDecorators(node); const oldStrict = this.state.strict; const placeholder = this.parsePlaceholder("Identifier"); - if (placeholder) { - if (this.match(75) || this.match(134) || this.match(5)) { + if (this.match(81) || this.match(144) || this.match(5)) { node.id = placeholder; } else if (optionalId || !isStatement) { node.id = null; node.body = this.finishPlaceholder(placeholder, "ClassBody"); return this.finishNode(node, type); } else { - this.unexpected(null, PlaceHolderErrors.ClassNameIsRequired); + throw this.raise(PlaceholderErrors.ClassNameIsRequired, { + at: this.state.startLoc + }); } } else { this.parseClassId(node, isStatement, optionalId); } - - this.parseClassSuper(node); - node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict); + super.parseClassSuper(node); + node.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node.superClass, oldStrict); return this.finishNode(node, type); } - - parseExport(node) { + parseExport(node, decorators) { const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseExport(...arguments); - - if (!this.isContextual(91) && !this.match(12)) { + if (!placeholder) return super.parseExport(node, decorators); + if (!this.isContextual(98) && !this.match(12)) { node.specifiers = []; node.source = null; node.declaration = this.finishPlaceholder(placeholder, "Declaration"); return this.finishNode(node, "ExportNamedDeclaration"); } - this.expectPlugin("exportDefaultFrom"); const specifier = this.startNode(); specifier.exported = placeholder; node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return super.parseExport(node); + return super.parseExport(node, decorators); } - isExportDefaultSpecifier() { - if (this.match(59)) { + if (this.match(65)) { const next = this.nextTokenStart(); - if (this.isUnparsedContextual(next, "from")) { - if (this.input.startsWith(tokenLabelName(134), this.nextTokenStartSince(next + 4))) { + if (this.input.startsWith(tokenLabelName(144), this.nextTokenStartSince(next + 4))) { return true; } } } - return super.isExportDefaultSpecifier(); } - - maybeParseExportDefaultSpecifier(node) { - if (node.specifiers && node.specifiers.length > 0) { + maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { + var _specifiers; + if ((_specifiers = node.specifiers) != null && _specifiers.length) { return true; } - - return super.maybeParseExportDefaultSpecifier(...arguments); + return super.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); } - checkExport(node) { const { specifiers } = node; - if (specifiers != null && specifiers.length) { node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder"); } - super.checkExport(node); node.specifiers = specifiers; } - parseImport(node) { const placeholder = this.parsePlaceholder("Identifier"); - if (!placeholder) return super.parseImport(...arguments); + if (!placeholder) return super.parseImport(node); node.specifiers = []; - - if (!this.isContextual(91) && !this.match(12)) { + if (!this.isContextual(98) && !this.match(12)) { node.source = this.finishPlaceholder(placeholder, "StringLiteral"); this.semicolon(); return this.finishNode(node, "ImportDeclaration"); } - const specifier = this.startNodeAtNode(placeholder); specifier.local = placeholder; - this.finishNode(specifier, "ImportDefaultSpecifier"); - node.specifiers.push(specifier); - + node.specifiers.push(this.finishNode(specifier, "ImportDefaultSpecifier")); if (this.eat(12)) { const hasStarImport = this.maybeParseStarImportSpecifier(node); if (!hasStarImport) this.parseNamedImportSpecifiers(node); } - - this.expectContextual(91); + this.expectContextual(98); node.source = this.parseImportSource(); this.semicolon(); return this.finishNode(node, "ImportDeclaration"); } - parseImportSource() { - return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments); + return this.parsePlaceholder("StringLiteral") || super.parseImportSource(); } - -}); - -var v8intrinsic = (superClass => class extends superClass { + assertNoSpace() { + if (this.state.start > this.state.lastTokEndLoc.index) { + this.raise(PlaceholderErrors.UnexpectedSpace, { + at: this.state.lastTokEndLoc + }); + } + } +}; +var v8intrinsic = superClass => class V8IntrinsicMixin extends superClass { parseV8Intrinsic() { - if (this.match(48)) { - const v8IntrinsicStart = this.state.start; + if (this.match(54)) { + const v8IntrinsicStartLoc = this.state.startLoc; const node = this.startNode(); this.next(); - if (tokenIsIdentifier(this.state.type)) { - const name = this.parseIdentifierName(this.state.start); + const name = this.parseIdentifierName(); const identifier = this.createIdentifier(node, name); identifier.type = "V8IntrinsicIdentifier"; - if (this.match(10)) { return identifier; } } - - this.unexpected(v8IntrinsicStart); + this.unexpected(v8IntrinsicStartLoc); } } - - parseExprAtom() { - return this.parseV8Intrinsic() || super.parseExprAtom(...arguments); + parseExprAtom(refExpressionErrors) { + return this.parseV8Intrinsic() || super.parseExprAtom(refExpressionErrors); } - -}); - -function hasPlugin(plugins, name) { - return plugins.some(plugin => { - if (Array.isArray(plugin)) { - return plugin[0] === name; +}; +function hasPlugin(plugins, expectedConfig) { + const [expectedName, expectedOptions] = typeof expectedConfig === "string" ? [expectedConfig, {}] : expectedConfig; + const expectedKeys = Object.keys(expectedOptions); + const expectedOptionsIsEmpty = expectedKeys.length === 0; + return plugins.some(p => { + if (typeof p === "string") { + return expectedOptionsIsEmpty && p === expectedName; } else { - return plugin === name; + const [pluginName, pluginOptions] = p; + if (pluginName !== expectedName) { + return false; + } + for (const key of expectedKeys) { + if (pluginOptions[key] !== expectedOptions[key]) { + return false; + } + } + return true; } }); } @@ -11419,65 +12730,55 @@ function getPluginOption(plugins, name, option) { return plugin === name; } }); - - if (plugin && Array.isArray(plugin)) { + if (plugin && Array.isArray(plugin) && plugin.length > 1) { return plugin[1][option]; } - return null; } const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"]; -const TOPIC_TOKENS = ["^", "%", "#"]; +const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"]; const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"]; function validatePlugins(plugins) { if (hasPlugin(plugins, "decorators")) { if (hasPlugin(plugins, "decorators-legacy")) { throw new Error("Cannot use the decorators and decorators-legacy plugin together"); } - const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport"); - - if (decoratorsBeforeExport == null) { - throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'."); - } else if (typeof decoratorsBeforeExport !== "boolean") { - throw new Error("'decoratorsBeforeExport' must be a boolean."); + if (decoratorsBeforeExport != null && typeof decoratorsBeforeExport !== "boolean") { + throw new Error("'decoratorsBeforeExport' must be a boolean, if specified."); + } + const allowCallParenthesized = getPluginOption(plugins, "decorators", "allowCallParenthesized"); + if (allowCallParenthesized != null && typeof allowCallParenthesized !== "boolean") { + throw new Error("'allowCallParenthesized' must be a boolean."); } } - if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) { throw new Error("Cannot combine flow and typescript plugins."); } - if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) { throw new Error("Cannot combine placeholders and v8intrinsic plugins."); } - if (hasPlugin(plugins, "pipelineOperator")) { const proposal = getPluginOption(plugins, "pipelineOperator", "proposal"); - if (!PIPELINE_PROPOSALS.includes(proposal)) { const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", "); throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`); } - - const tupleSyntaxIsHash = hasPlugin(plugins, "recordAndTuple") && getPluginOption(plugins, "recordAndTuple", "syntaxType") === "hash"; - + const tupleSyntaxIsHash = hasPlugin(plugins, ["recordAndTuple", { + syntaxType: "hash" + }]); if (proposal === "hack") { if (hasPlugin(plugins, "placeholders")) { throw new Error("Cannot combine placeholders plugin and Hack-style pipes."); } - if (hasPlugin(plugins, "v8intrinsic")) { throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes."); } - const topicToken = getPluginOption(plugins, "pipelineOperator", "topicToken"); - if (!TOPIC_TOKENS.includes(topicToken)) { const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", "); throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`); } - if (topicToken === "#" && tupleSyntaxIsHash) { throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.'); } @@ -11485,30 +12786,31 @@ function validatePlugins(plugins) { throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.'); } } - if (hasPlugin(plugins, "moduleAttributes")) { { - if (hasPlugin(plugins, "importAssertions")) { - throw new Error("Cannot combine importAssertions and moduleAttributes plugins."); + if (hasPlugin(plugins, "importAssertions") || hasPlugin(plugins, "importAttributes")) { + throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins."); } - - const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version"); - - if (moduleAttributesVerionPluginOption !== "may-2020") { + const moduleAttributesVersionPluginOption = getPluginOption(plugins, "moduleAttributes", "version"); + if (moduleAttributesVersionPluginOption !== "may-2020") { throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'."); } } } - - if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) { - throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", ")); + if (hasPlugin(plugins, "importAssertions") && hasPlugin(plugins, "importAttributes")) { + throw new Error("Cannot combine importAssertions and importAttributes plugins."); + } + if (hasPlugin(plugins, "recordAndTuple") && getPluginOption(plugins, "recordAndTuple", "syntaxType") != null && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) { + throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", ")); } - if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) { const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins."); error.missingPlugins = "doExpressions"; throw error; } + if (hasPlugin(plugins, "optionalChainingAssign") && getPluginOption(plugins, "optionalChainingAssign", "version") !== "2023-07") { + throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is '2023-07'."); + } } const mixinPlugins = { estree, @@ -11519,7 +12821,6 @@ const mixinPlugins = { placeholders }; const mixinPluginNames = Object.keys(mixinPlugins); - const defaultOptions = { sourceType: "script", sourceFilename: undefined, @@ -11527,6 +12828,7 @@ const defaultOptions = { startLine: 1, allowAwaitOutsideFunction: false, allowReturnOutsideFunction: false, + allowNewTargetOutsideFunction: false, allowImportExportEverywhere: false, allowSuperOutsideMethod: false, allowUndeclaredExports: false, @@ -11534,937 +12836,457 @@ const defaultOptions = { strictMode: null, ranges: false, tokens: false, + createImportExpressions: false, createParenthesizedExpressions: false, errorRecovery: false, - attachComment: true + attachComment: true, + annexB: true }; function getOptions(opts) { - const options = {}; - - for (const key of Object.keys(defaultOptions)) { - options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key]; + if (opts == null) { + return Object.assign({}, defaultOptions); + } + if (opts.annexB != null && opts.annexB !== false) { + throw new Error("The `annexB` option can only be set to `false`."); + } + const options = {}; + for (const key of Object.keys(defaultOptions)) { + var _opts$key; + options[key] = (_opts$key = opts[key]) != null ? _opts$key : defaultOptions[key]; } - return options; } - -const unwrapParenthesizedExpression = node => { - return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node; -}; - -class LValParser extends NodeUtils { - toAssignable(node, isLHS = false) { - var _node$extra, _node$extra3; - - let parenthesized = undefined; - - if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) { - parenthesized = unwrapParenthesizedExpression(node); - - if (isLHS) { - if (parenthesized.type === "Identifier") { - this.expressionScope.recordParenthesizedIdentifierError(node.start, ErrorMessages.InvalidParenthesizedAssignment); - } else if (parenthesized.type !== "MemberExpression") { - this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment); - } - } else { - this.raise(node.start, ErrorMessages.InvalidParenthesizedAssignment); - } - } - - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - case "RestElement": - break; - - case "ObjectExpression": - node.type = "ObjectPattern"; - - for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) { - var _node$extra2; - - const prop = node.properties[i]; - const isLast = i === last; - this.toAssignableObjectExpressionProp(prop, isLast, isLHS); - - if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingComma) { - this.raiseRestNotLast(node.extra.trailingComma); - } - } - - break; - - case "ObjectProperty": - this.toAssignable(node.value, isLHS); - break; - - case "SpreadElement": - { - this.checkToRestConversion(node); - node.type = "RestElement"; - const arg = node.argument; - this.toAssignable(arg, isLHS); - break; - } - - case "ArrayExpression": - node.type = "ArrayPattern"; - this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingComma, isLHS); - break; - - case "AssignmentExpression": - if (node.operator !== "=") { - this.raise(node.left.end, ErrorMessages.MissingEqInAssignment); - } - - node.type = "AssignmentPattern"; - delete node.operator; - this.toAssignable(node.left, isLHS); - break; - - case "ParenthesizedExpression": - this.toAssignable(parenthesized, isLHS); - break; - } - - return node; - } - - toAssignableObjectExpressionProp(prop, isLast, isLHS) { - if (prop.type === "ObjectMethod") { - const error = prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod; - this.raise(prop.key.start, error); - } else if (prop.type === "SpreadElement" && !isLast) { - this.raiseRestNotLast(prop.start); - } else { - this.toAssignable(prop, isLHS); - } - } - - toAssignableList(exprList, trailingCommaPos, isLHS) { - let end = exprList.length; - - if (end) { - const last = exprList[end - 1]; - - if ((last == null ? void 0 : last.type) === "RestElement") { - --end; - } else if ((last == null ? void 0 : last.type) === "SpreadElement") { - last.type = "RestElement"; - let arg = last.argument; - this.toAssignable(arg, isLHS); - arg = unwrapParenthesizedExpression(arg); - - if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") { - this.unexpected(arg.start); - } - - if (trailingCommaPos) { - this.raiseTrailingCommaAfterRest(trailingCommaPos); - } - - --end; - } - } - - for (let i = 0; i < end; i++) { - const elt = exprList[i]; - - if (elt) { - this.toAssignable(elt, isLHS); - - if (elt.type === "RestElement") { - this.raiseRestNotLast(elt.start); - } - } - } - - return exprList; - } - - isAssignable(node, isBinding) { - switch (node.type) { - case "Identifier": - case "ObjectPattern": - case "ArrayPattern": - case "AssignmentPattern": - case "RestElement": - return true; - - case "ObjectExpression": - { - const last = node.properties.length - 1; - return node.properties.every((prop, i) => { - return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop); - }); - } - - case "ObjectProperty": - return this.isAssignable(node.value); - - case "SpreadElement": - return this.isAssignable(node.argument); - - case "ArrayExpression": - return node.elements.every(element => element === null || this.isAssignable(element)); - - case "AssignmentExpression": - return node.operator === "="; - - case "ParenthesizedExpression": - return this.isAssignable(node.expression); - - case "MemberExpression": - case "OptionalMemberExpression": - return !isBinding; - - default: - return false; - } - } - - toReferencedList(exprList, isParenthesizedExpr) { - return exprList; - } - - toReferencedListDeep(exprList, isParenthesizedExpr) { - this.toReferencedList(exprList, isParenthesizedExpr); - - for (const expr of exprList) { - if ((expr == null ? void 0 : expr.type) === "ArrayExpression") { - this.toReferencedListDeep(expr.elements); - } - } - } - - parseSpread(refExpressionErrors, refNeedsArrowPos) { - const node = this.startNode(); - this.next(); - node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined, refNeedsArrowPos); - return this.finishNode(node, "SpreadElement"); - } - - parseRestBinding() { - const node = this.startNode(); - this.next(); - node.argument = this.parseBindingAtom(); - return this.finishNode(node, "RestElement"); - } - - parseBindingAtom() { - switch (this.state.type) { - case 0: - { - const node = this.startNode(); - this.next(); - node.elements = this.parseBindingList(3, 93, true); - return this.finishNode(node, "ArrayPattern"); - } - - case 5: - return this.parseObjectLike(8, true); - } - - return this.parseIdentifier(); - } - - parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) { - const elts = []; - let first = true; - - while (!this.eat(close)) { - if (first) { - first = false; - } else { - this.expect(12); - } - - if (allowEmpty && this.match(12)) { - elts.push(null); - } else if (this.eat(close)) { - break; - } else if (this.match(21)) { - elts.push(this.parseAssignableListItemTypes(this.parseRestBinding())); - this.checkCommaAfterRest(closeCharCode); - this.expect(close); - break; - } else { - const decorators = []; - - if (this.match(24) && this.hasPlugin("decorators")) { - this.raise(this.state.start, ErrorMessages.UnsupportedParameterDecorator); - } - - while (this.match(24)) { - decorators.push(this.parseDecorator()); - } - - elts.push(this.parseAssignableListItem(allowModifiers, decorators)); - } - } - - return elts; - } - - parseBindingRestProperty(prop) { - this.next(); - prop.argument = this.parseIdentifier(); - this.checkCommaAfterRest(125); - return this.finishNode(prop, "RestElement"); - } - - parseBindingProperty() { - const prop = this.startNode(); - const { - type, - start: startPos, - startLoc - } = this.state; - - if (type === 21) { - return this.parseBindingRestProperty(prop); - } else { - this.parsePropertyName(prop); - } - - prop.method = false; - this.parseObjPropValue(prop, startPos, startLoc, false, false, true, false); - return prop; - } - - parseAssignableListItem(allowModifiers, decorators) { - const left = this.parseMaybeDefault(); - this.parseAssignableListItemTypes(left); - const elt = this.parseMaybeDefault(left.start, left.loc.start, left); - - if (decorators.length) { - left.decorators = decorators; - } - - return elt; - } - - parseAssignableListItemTypes(param) { - return param; - } - - parseMaybeDefault(startPos, startLoc, left) { - var _startLoc, _startPos, _left; - - startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc; - startPos = (_startPos = startPos) != null ? _startPos : this.state.start; - left = (_left = left) != null ? _left : this.parseBindingAtom(); - if (!this.eat(27)) return left; - const node = this.startNodeAt(startPos, startLoc); - node.left = left; - node.right = this.parseMaybeAssignAllowIn(); - return this.finishNode(node, "AssignmentPattern"); - } - - checkLVal(expr, contextDescription, bindingType = BIND_NONE, checkClashes, disallowLetBinding, strictModeChanged = false) { - switch (expr.type) { - case "Identifier": - { - const { - name - } = expr; - - if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name, this.inModule) : isStrictBindOnlyReservedWord(name))) { - this.raise(expr.start, bindingType === BIND_NONE ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, name); - } - - if (checkClashes) { - if (checkClashes.has(name)) { - this.raise(expr.start, ErrorMessages.ParamDupe); - } else { - checkClashes.add(name); - } - } - - if (disallowLetBinding && name === "let") { - this.raise(expr.start, ErrorMessages.LetInLexicalBinding); - } - - if (!(bindingType & BIND_NONE)) { - this.scope.declareName(name, bindingType, expr.start); - } - - break; - } - - case "MemberExpression": - if (bindingType !== BIND_NONE) { - this.raise(expr.start, ErrorMessages.InvalidPropertyBindingPattern); - } - - break; - - case "ObjectPattern": - for (let prop of expr.properties) { - if (this.isObjectProperty(prop)) prop = prop.value;else if (this.isObjectMethod(prop)) continue; - this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding); - } - - break; - - case "ArrayPattern": - for (const elem of expr.elements) { - if (elem) { - this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding); - } - } - - break; - - case "AssignmentPattern": - this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes); - break; - - case "RestElement": - this.checkLVal(expr.argument, "rest element", bindingType, checkClashes); - break; - - case "ParenthesizedExpression": - this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes); - break; - - default: - { - this.raise(expr.start, bindingType === BIND_NONE ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, contextDescription); - } - } - } - - checkToRestConversion(node) { - if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") { - this.raise(node.argument.start, ErrorMessages.InvalidRestAssignmentPattern); - } - } - - checkCommaAfterRest(close) { - if (this.match(12)) { - if (this.lookaheadCharCode() === close) { - this.raiseTrailingCommaAfterRest(this.state.start); - } else { - this.raiseRestNotLast(this.state.start); - } - } - } - - raiseRestNotLast(pos) { - throw this.raise(pos, ErrorMessages.ElementAfterRest); - } - - raiseTrailingCommaAfterRest(pos) { - this.raise(pos, ErrorMessages.RestTrailingComma); - } - -} - -const invalidHackPipeBodies = new Map([["ArrowFunctionExpression", "arrow function"], ["AssignmentExpression", "assignment"], ["ConditionalExpression", "conditional"], ["YieldExpression", "yield"]]); class ExpressionParser extends LValParser { checkProto(prop, isRecord, protoRef, refExpressionErrors) { if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) { return; } - const key = prop.key; const name = key.type === "Identifier" ? key.name : key.value; - if (name === "__proto__") { if (isRecord) { - this.raise(key.start, ErrorMessages.RecordNoProto); + this.raise(Errors.RecordNoProto, { + at: key + }); return; } - if (protoRef.used) { if (refExpressionErrors) { - if (refExpressionErrors.doubleProto === -1) { - refExpressionErrors.doubleProto = key.start; + if (refExpressionErrors.doubleProtoLoc === null) { + refExpressionErrors.doubleProtoLoc = key.loc.start; } } else { - this.raise(key.start, ErrorMessages.DuplicateProto); + this.raise(Errors.DuplicateProto, { + at: key + }); } } - protoRef.used = true; } } - shouldExitDescending(expr, potentialArrowAt) { return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt; } - getExpression() { this.enterInitialScopes(); this.nextToken(); const expr = this.parseExpression(); - - if (!this.match(129)) { + if (!this.match(139)) { this.unexpected(); } - this.finalizeRemainingComments(); expr.comments = this.state.comments; expr.errors = this.state.errors; - if (this.options.tokens) { expr.tokens = this.tokens; } - return expr; } - parseExpression(disallowIn, refExpressionErrors) { if (disallowIn) { return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors)); } - return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors)); } - parseExpressionBase(refExpressionErrors) { - const startPos = this.state.start; const startLoc = this.state.startLoc; const expr = this.parseMaybeAssign(refExpressionErrors); - if (this.match(12)) { - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); node.expressions = [expr]; - while (this.eat(12)) { node.expressions.push(this.parseMaybeAssign(refExpressionErrors)); } - this.toReferencedList(node.expressions); return this.finishNode(node, "SequenceExpression"); } - return expr; } - parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) { return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); } - parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) { return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse)); } - setOptionalParametersError(refExpressionErrors, resultError) { - var _resultError$pos; - - refExpressionErrors.optionalParameters = (_resultError$pos = resultError == null ? void 0 : resultError.pos) != null ? _resultError$pos : this.state.start; + var _resultError$loc; + refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc; } - parseMaybeAssign(refExpressionErrors, afterLeftParse) { - const startPos = this.state.start; const startLoc = this.state.startLoc; - - if (this.isContextual(99)) { + if (this.isContextual(108)) { if (this.prodParam.hasYield) { let left = this.parseYield(); - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); + left = afterLeftParse.call(this, left, startLoc); } - return left; } } - let ownExpressionErrors; - if (refExpressionErrors) { ownExpressionErrors = false; } else { refExpressionErrors = new ExpressionErrors(); ownExpressionErrors = true; } - const { type } = this.state; - if (type === 10 || tokenIsIdentifier(type)) { this.state.potentialArrowAt = this.state.start; } - let left = this.parseMaybeConditional(refExpressionErrors); - if (afterLeftParse) { - left = afterLeftParse.call(this, left, startPos, startLoc); + left = afterLeftParse.call(this, left, startLoc); } - if (tokenIsAssignment(this.state.type)) { - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); const operator = this.state.value; node.operator = operator; - - if (this.match(27)) { - node.left = this.toAssignable(left, true); - - if (refExpressionErrors.doubleProto >= startPos) { - refExpressionErrors.doubleProto = -1; + if (this.match(29)) { + this.toAssignable(left, true); + node.left = left; + const startIndex = startLoc.index; + if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startIndex) { + refExpressionErrors.doubleProtoLoc = null; } - - if (refExpressionErrors.shorthandAssign >= startPos) { - refExpressionErrors.shorthandAssign = -1; + if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startIndex) { + refExpressionErrors.shorthandAssignLoc = null; + } + if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startIndex) { + this.checkDestructuringPrivate(refExpressionErrors); + refExpressionErrors.privateKeyLoc = null; } } else { node.left = left; } - - this.checkLVal(left, "assignment expression"); this.next(); node.right = this.parseMaybeAssign(); - return this.finishNode(node, "AssignmentExpression"); + this.checkLVal(left, { + in: this.finishNode(node, "AssignmentExpression") + }); + return node; } else if (ownExpressionErrors) { this.checkExpressionErrors(refExpressionErrors, true); } - return left; } - parseMaybeConditional(refExpressionErrors) { - const startPos = this.state.start; const startLoc = this.state.startLoc; const potentialArrowAt = this.state.potentialArrowAt; const expr = this.parseExprOps(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { return expr; } - - return this.parseConditional(expr, startPos, startLoc, refExpressionErrors); + return this.parseConditional(expr, startLoc, refExpressionErrors); } - - parseConditional(expr, startPos, startLoc, refExpressionErrors) { + parseConditional(expr, startLoc, refExpressionErrors) { if (this.eat(17)) { - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); node.test = expr; node.consequent = this.parseMaybeAssignAllowIn(); this.expect(14); node.alternate = this.parseMaybeAssign(); return this.finishNode(node, "ConditionalExpression"); } - return expr; } - parseMaybeUnaryOrPrivate(refExpressionErrors) { - return this.match(128) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors); + return this.match(138) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors); } - parseExprOps(refExpressionErrors) { - const startPos = this.state.start; const startLoc = this.state.startLoc; const potentialArrowAt = this.state.potentialArrowAt; const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { return expr; } - - return this.parseExprOp(expr, startPos, startLoc, -1); + return this.parseExprOp(expr, startLoc, -1); } - - parseExprOp(left, leftStartPos, leftStartLoc, minPrec) { + parseExprOp(left, leftStartLoc, minPrec) { if (this.isPrivateName(left)) { const value = this.getPrivateNameSV(left); - const { - start - } = left; - - if (minPrec >= tokenOperatorPrecedence(52) || !this.prodParam.hasIn || !this.match(52)) { - this.raise(start, ErrorMessages.PrivateInExpectedIn, value); + if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) { + this.raise(Errors.PrivateInExpectedIn, { + at: left, + identifierName: value + }); } - - this.classScope.usePrivateName(value, start); + this.classScope.usePrivateName(value, left.loc.start); } - const op = this.state.type; - - if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(52))) { + if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) { let prec = tokenOperatorPrecedence(op); - if (prec > minPrec) { - if (op === 35) { + if (op === 39) { this.expectPlugin("pipelineOperator"); - if (this.state.inFSharpPipelineDirectBody) { return left; } - - this.checkPipelineAtInfixOperator(left, leftStartPos); + this.checkPipelineAtInfixOperator(left, leftStartLoc); } - - const node = this.startNodeAt(leftStartPos, leftStartLoc); + const node = this.startNodeAt(leftStartLoc); node.left = left; node.operator = this.state.value; - const logical = op === 37 || op === 38; - const coalesce = op === 36; - + const logical = op === 41 || op === 42; + const coalesce = op === 40; if (coalesce) { - prec = tokenOperatorPrecedence(38); + prec = tokenOperatorPrecedence(42); } - this.next(); - - if (op === 35 && this.getPluginOption("pipelineOperator", "proposal") === "minimal") { - if (this.state.type === 90 && this.prodParam.hasAwait) { - throw this.raise(this.state.start, ErrorMessages.UnexpectedAwaitAfterPipelineBody); + if (op === 39 && this.hasPlugin(["pipelineOperator", { + proposal: "minimal" + }])) { + if (this.state.type === 96 && this.prodParam.hasAwait) { + throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, { + at: this.state.startLoc + }); } } - node.right = this.parseExprOpRightExpr(op, prec); - this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression"); + const finishedNode = this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression"); const nextOp = this.state.type; - - if (coalesce && (nextOp === 37 || nextOp === 38) || logical && nextOp === 36) { - throw this.raise(this.state.start, ErrorMessages.MixingCoalesceWithLogical); + if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) { + throw this.raise(Errors.MixingCoalesceWithLogical, { + at: this.state.startLoc + }); } - - return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec); + return this.parseExprOp(finishedNode, leftStartLoc, minPrec); } } - return left; } - parseExprOpRightExpr(op, prec) { - const startPos = this.state.start; const startLoc = this.state.startLoc; - switch (op) { - case 35: + case 39: switch (this.getPluginOption("pipelineOperator", "proposal")) { case "hack": return this.withTopicBindingContext(() => { return this.parseHackPipeBody(); }); - case "smart": return this.withTopicBindingContext(() => { - if (this.prodParam.hasYield && this.isContextual(99)) { - throw this.raise(this.state.start, ErrorMessages.PipeBodyIsTighter, this.state.value); + if (this.prodParam.hasYield && this.isContextual(108)) { + throw this.raise(Errors.PipeBodyIsTighter, { + at: this.state.startLoc + }); } - - return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc); + return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startLoc); }); - case "fsharp": return this.withSoloAwaitPermittingContext(() => { return this.parseFSharpPipelineBody(prec); }); } - default: return this.parseExprOpBaseRightExpr(op, prec); } } - parseExprOpBaseRightExpr(op, prec) { - const startPos = this.state.start; const startLoc = this.state.startLoc; - return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startPos, startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec); + return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec); } - parseHackPipeBody() { var _body$extra; - const { - start + startLoc } = this.state; const body = this.parseMaybeAssign(); - - if (invalidHackPipeBodies.has(body.type) && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) { - this.raise(start, ErrorMessages.PipeUnparenthesizedBody, invalidHackPipeBodies.get(body.type)); + const requiredParentheses = UnparenthesizedPipeBodyDescriptions.has(body.type); + if (requiredParentheses && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) { + this.raise(Errors.PipeUnparenthesizedBody, { + at: startLoc, + type: body.type + }); } - if (!this.topicReferenceWasUsedInCurrentContext()) { - this.raise(start, ErrorMessages.PipeTopicUnused); + this.raise(Errors.PipeTopicUnused, { + at: startLoc + }); } - return body; } - checkExponentialAfterUnary(node) { - if (this.match(51)) { - this.raise(node.argument.start, ErrorMessages.UnexpectedTokenUnaryExponentiation); + if (this.match(57)) { + this.raise(Errors.UnexpectedTokenUnaryExponentiation, { + at: node.argument + }); } } - parseMaybeUnary(refExpressionErrors, sawUnary) { - const startPos = this.state.start; const startLoc = this.state.startLoc; - const isAwait = this.isContextual(90); - + const isAwait = this.isContextual(96); if (isAwait && this.isAwaitAllowed()) { this.next(); - const expr = this.parseAwait(startPos, startLoc); + const expr = this.parseAwait(startLoc); if (!sawUnary) this.checkExponentialAfterUnary(expr); return expr; } - - const update = this.match(32); + const update = this.match(34); const node = this.startNode(); - if (tokenIsPrefix(this.state.type)) { node.operator = this.state.value; node.prefix = true; - - if (this.match(66)) { + if (this.match(72)) { this.expectPlugin("throwExpressions"); } - - const isDelete = this.match(83); + const isDelete = this.match(89); this.next(); node.argument = this.parseMaybeUnary(null, true); this.checkExpressionErrors(refExpressionErrors, true); - if (this.state.strict && isDelete) { const arg = node.argument; - if (arg.type === "Identifier") { - this.raise(node.start, ErrorMessages.StrictDelete); + this.raise(Errors.StrictDelete, { + at: node + }); } else if (this.hasPropertyAsPrivateName(arg)) { - this.raise(node.start, ErrorMessages.DeletePrivateField); + this.raise(Errors.DeletePrivateField, { + at: node + }); } } - if (!update) { - if (!sawUnary) this.checkExponentialAfterUnary(node); + if (!sawUnary) { + this.checkExponentialAfterUnary(node); + } return this.finishNode(node, "UnaryExpression"); } } - const expr = this.parseUpdate(node, update, refExpressionErrors); - if (isAwait) { const { type } = this.state; - const startsExpr = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(48); - + const startsExpr = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54); if (startsExpr && !this.isAmbiguousAwait()) { - this.raiseOverwrite(startPos, ErrorMessages.AwaitNotInAsyncContext); - return this.parseAwait(startPos, startLoc); + this.raiseOverwrite(Errors.AwaitNotInAsyncContext, { + at: startLoc + }); + return this.parseAwait(startLoc); } } - return expr; } - parseUpdate(node, update, refExpressionErrors) { if (update) { - this.checkLVal(node.argument, "prefix operation"); - return this.finishNode(node, "UpdateExpression"); + const updateExpressionNode = node; + this.checkLVal(updateExpressionNode.argument, { + in: this.finishNode(updateExpressionNode, "UpdateExpression") + }); + return node; } - - const startPos = this.state.start; const startLoc = this.state.startLoc; let expr = this.parseExprSubscripts(refExpressionErrors); if (this.checkExpressionErrors(refExpressionErrors, false)) return expr; - while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) { - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); node.operator = this.state.value; node.prefix = false; node.argument = expr; - this.checkLVal(expr, "postfix operation"); this.next(); - expr = this.finishNode(node, "UpdateExpression"); + this.checkLVal(expr, { + in: expr = this.finishNode(node, "UpdateExpression") + }); } - return expr; } - parseExprSubscripts(refExpressionErrors) { - const startPos = this.state.start; const startLoc = this.state.startLoc; const potentialArrowAt = this.state.potentialArrowAt; const expr = this.parseExprAtom(refExpressionErrors); - if (this.shouldExitDescending(expr, potentialArrowAt)) { return expr; } - - return this.parseSubscripts(expr, startPos, startLoc); + return this.parseSubscripts(expr, startLoc); } - - parseSubscripts(base, startPos, startLoc, noCalls) { + parseSubscripts(base, startLoc, noCalls) { const state = { optionalChainMember: false, maybeAsyncArrow: this.atPossibleAsyncArrow(base), stop: false }; - do { - base = this.parseSubscript(base, startPos, startLoc, noCalls, state); + base = this.parseSubscript(base, startLoc, noCalls, state); state.maybeAsyncArrow = false; } while (!state.stop); - return base; } - - parseSubscript(base, startPos, startLoc, noCalls, state) { - if (!noCalls && this.eat(15)) { - return this.parseBind(base, startPos, startLoc, noCalls, state); - } else if (this.match(22)) { - return this.parseTaggedTemplateExpression(base, startPos, startLoc, state); + parseSubscript(base, startLoc, noCalls, state) { + const { + type + } = this.state; + if (!noCalls && type === 15) { + return this.parseBind(base, startLoc, noCalls, state); + } else if (tokenIsTemplate(type)) { + return this.parseTaggedTemplateExpression(base, startLoc, state); } - let optional = false; - - if (this.match(18)) { - if (noCalls && this.lookaheadCharCode() === 40) { - state.stop = true; - return base; + if (type === 18) { + if (noCalls) { + this.raise(Errors.OptionalChainingNoNew, { + at: this.state.startLoc + }); + if (this.lookaheadCharCode() === 40) { + state.stop = true; + return base; + } } - state.optionalChainMember = optional = true; this.next(); } - if (!noCalls && this.match(10)) { - return this.parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional); + return this.parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional); } else { const computed = this.eat(0); - if (computed || optional || this.eat(16)) { - return this.parseMember(base, startPos, startLoc, state, computed, optional); + return this.parseMember(base, startLoc, state, computed, optional); } else { state.stop = true; return base; } } } - - parseMember(base, startPos, startLoc, state, computed, optional) { - const node = this.startNodeAt(startPos, startLoc); + parseMember(base, startLoc, state, computed, optional) { + const node = this.startNodeAt(startLoc); node.object = base; node.computed = computed; - const privateName = !computed && this.match(128) && this.state.value; - const property = computed ? this.parseExpression() : privateName ? this.parsePrivateName() : this.parseIdentifier(true); - - if (privateName !== false) { - if (node.object.type === "Super") { - this.raise(startPos, ErrorMessages.SuperPrivateField); - } - - this.classScope.usePrivateName(privateName, property.start); - } - - node.property = property; - if (computed) { + node.property = this.parseExpression(); this.expect(3); + } else if (this.match(138)) { + if (base.type === "Super") { + this.raise(Errors.SuperPrivateField, { + at: startLoc + }); + } + this.classScope.usePrivateName(this.state.value, this.state.startLoc); + node.property = this.parsePrivateName(); + } else { + node.property = this.parseIdentifier(true); } - if (state.optionalChainMember) { node.optional = optional; return this.finishNode(node, "OptionalMemberExpression"); @@ -12472,544 +13294,497 @@ class ExpressionParser extends LValParser { return this.finishNode(node, "MemberExpression"); } } - - parseBind(base, startPos, startLoc, noCalls, state) { - const node = this.startNodeAt(startPos, startLoc); + parseBind(base, startLoc, noCalls, state) { + const node = this.startNodeAt(startLoc); node.object = base; + this.next(); node.callee = this.parseNoCallExpr(); state.stop = true; - return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls); + return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, noCalls); } - - parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional) { + parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional) { const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; let refExpressionErrors = null; this.state.maybeInArrowParameters = true; this.next(); - let node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); node.callee = base; - - if (state.maybeAsyncArrow) { + const { + maybeAsyncArrow, + optionalChainMember + } = state; + if (maybeAsyncArrow) { this.expressionScope.enter(newAsyncArrowScope()); refExpressionErrors = new ExpressionErrors(); } - - if (state.optionalChainMember) { + if (optionalChainMember) { node.optional = optional; } - if (optional) { node.arguments = this.parseCallExpressionArguments(11); } else { node.arguments = this.parseCallExpressionArguments(11, base.type === "Import", base.type !== "Super", node, refExpressionErrors); } - - this.finishCallExpression(node, state.optionalChainMember); - - if (state.maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) { + let finishedNode = this.finishCallExpression(node, optionalChainMember); + if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) { state.stop = true; + this.checkDestructuringPrivate(refExpressionErrors); this.expressionScope.validateAsPattern(); this.expressionScope.exit(); - node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node); + finishedNode = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startLoc), finishedNode); } else { - if (state.maybeAsyncArrow) { + if (maybeAsyncArrow) { this.checkExpressionErrors(refExpressionErrors, true); this.expressionScope.exit(); } - - this.toReferencedArguments(node); + this.toReferencedArguments(finishedNode); } - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; - return node; + return finishedNode; } - toReferencedArguments(node, isParenthesizedExpr) { this.toReferencedListDeep(node.arguments, isParenthesizedExpr); } - - parseTaggedTemplateExpression(base, startPos, startLoc, state) { - const node = this.startNodeAt(startPos, startLoc); + parseTaggedTemplateExpression(base, startLoc, state) { + const node = this.startNodeAt(startLoc); node.tag = base; node.quasi = this.parseTemplate(true); - if (state.optionalChainMember) { - this.raise(startPos, ErrorMessages.OptionalChainingNoTemplate); + this.raise(Errors.OptionalChainingNoTemplate, { + at: startLoc + }); } - return this.finishNode(node, "TaggedTemplateExpression"); } - atPossibleAsyncArrow(base) { - return base.type === "Identifier" && base.name === "async" && this.state.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt; + return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt; + } + expectImportAttributesPlugin() { + if (!this.hasPlugin("importAssertions")) { + this.expectPlugin("importAttributes"); + } } - finishCallExpression(node, optional) { if (node.callee.type === "Import") { if (node.arguments.length === 2) { { if (!this.hasPlugin("moduleAttributes")) { - this.expectPlugin("importAssertions"); + this.expectImportAttributesPlugin(); } } } - if (node.arguments.length === 0 || node.arguments.length > 2) { - this.raise(node.start, ErrorMessages.ImportCallArity, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument"); + this.raise(Errors.ImportCallArity, { + at: node, + maxArgumentCount: this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? 2 : 1 + }); } else { for (const arg of node.arguments) { if (arg.type === "SpreadElement") { - this.raise(arg.start, ErrorMessages.ImportCallSpreadArgument); + this.raise(Errors.ImportCallSpreadArgument, { + at: arg + }); } } } } - return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression"); } - parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) { const elts = []; let first = true; const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.inFSharpPipelineDirectBody = false; - while (!this.eat(close)) { if (first) { first = false; } else { this.expect(12); - if (this.match(close)) { - if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) { - this.raise(this.state.lastTokStart, ErrorMessages.ImportCallArgumentTrailingComma); + if (dynamicImport && !this.hasPlugin("importAttributes") && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) { + this.raise(Errors.ImportCallArgumentTrailingComma, { + at: this.state.lastTokStartLoc + }); } - if (nodeForExtra) { - this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart); + this.addTrailingCommaExtraToNode(nodeForExtra); } - this.next(); break; } } - elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder)); } - this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; return elts; } - shouldParseAsyncArrow() { return this.match(19) && !this.canInsertSemicolon(); } - parseAsyncArrowFromCallExpression(node, call) { var _call$extra; - this.resetPreviousNodeTrailingComments(call); this.expect(19); - this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingComma); - + this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc); if (call.innerComments) { setInnerComments(node, call.innerComments); } - if (call.callee.trailingComments) { setInnerComments(node, call.callee.trailingComments); } - return node; } - parseNoCallExpr() { - const startPos = this.state.start; const startLoc = this.state.startLoc; - return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true); + return this.parseSubscripts(this.parseExprAtom(), startLoc, true); } - parseExprAtom(refExpressionErrors) { let node; + let decorators = null; const { type } = this.state; - switch (type) { - case 73: + case 79: return this.parseSuper(); - - case 77: + case 83: node = this.startNode(); this.next(); - if (this.match(16)) { return this.parseImportMetaProperty(node); } - - if (!this.match(10)) { - this.raise(this.state.lastTokStart, ErrorMessages.UnsupportedImport); + if (this.match(10)) { + if (this.options.createImportExpressions) { + return this.parseImportCall(node); + } else { + return this.finishNode(node, "Import"); + } + } else { + this.raise(Errors.UnsupportedImport, { + at: this.state.lastTokStartLoc + }); + return this.finishNode(node, "Import"); } - - return this.finishNode(node, "Import"); - - case 72: + case 78: node = this.startNode(); this.next(); return this.finishNode(node, "ThisExpression"); - - case 84: + case 90: { return this.parseDo(this.startNode(), false); } - - case 50: - case 29: + case 56: + case 31: { this.readRegexp(); return this.parseRegExpLiteral(this.state.value); } - - case 124: + case 134: return this.parseNumericLiteral(this.state.value); - - case 125: + case 135: return this.parseBigIntLiteral(this.state.value); - - case 126: + case 136: return this.parseDecimalLiteral(this.state.value); - - case 123: + case 133: return this.parseStringLiteral(this.state.value); - - case 78: + case 84: return this.parseNullLiteral(); - - case 79: + case 85: return this.parseBooleanLiteral(true); - - case 80: + case 86: return this.parseBooleanLiteral(false); - case 10: { const canBeArrow = this.state.potentialArrowAt === this.state.start; return this.parseParenAndDistinguishExpression(canBeArrow); } - case 2: case 1: { return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true); } - case 0: { return this.parseArrayLike(3, true, false, refExpressionErrors); } - case 6: case 7: { return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true); } - case 5: { return this.parseObjectLike(8, false, false, refExpressionErrors); } - - case 62: + case 68: return this.parseFunctionOrFunctionSent(); - - case 24: - this.parseDecorators(); - - case 74: - node = this.startNode(); - this.takeDecorators(node); - return this.parseClass(node, false); - - case 71: + case 26: + decorators = this.parseDecorators(); + case 80: + return this.parseClass(this.maybeTakeDecorators(decorators, this.startNode()), false); + case 77: return this.parseNewOrNewTarget(); - - case 22: + case 25: + case 24: return this.parseTemplate(false); - case 15: { node = this.startNode(); this.next(); node.object = null; const callee = node.callee = this.parseNoCallExpr(); - if (callee.type === "MemberExpression") { return this.finishNode(node, "BindExpression"); } else { - throw this.raise(callee.start, ErrorMessages.UnsupportedBind); + throw this.raise(Errors.UnsupportedBind, { + at: callee + }); } } - - case 128: + case 138: { - this.raise(this.state.start, ErrorMessages.PrivateInExpectedIn, this.state.value); + this.raise(Errors.PrivateInExpectedIn, { + at: this.state.startLoc, + identifierName: this.state.value + }); return this.parsePrivateName(); } - - case 31: + case 33: { - return this.parseTopicReferenceThenEqualsSign(48, "%"); + return this.parseTopicReferenceThenEqualsSign(54, "%"); } - - case 30: + case 32: { - return this.parseTopicReferenceThenEqualsSign(40, "^"); + return this.parseTopicReferenceThenEqualsSign(44, "^"); } - - case 40: - case 48: - case 25: + case 37: + case 38: + { + return this.parseTopicReference("hack"); + } + case 44: + case 54: + case 27: { const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); - if (pipeProposal) { return this.parseTopicReference(pipeProposal); - } else { - throw this.unexpected(); } + this.unexpected(); + break; } - - case 43: + case 47: { const lookaheadCh = this.input.codePointAt(this.nextTokenStart()); - if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) { this.expectOnePlugin(["jsx", "flow", "typescript"]); - break; } else { - throw this.unexpected(); + this.unexpected(); } + break; } - default: if (tokenIsIdentifier(type)) { - if (this.isContextual(117) && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) { + if (this.isContextual(127) && this.lookaheadInLineCharCode() === 123) { return this.parseModuleExpression(); } - const canBeArrow = this.state.potentialArrowAt === this.state.start; const containsEsc = this.state.containsEsc; const id = this.parseIdentifier(); - if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) { const { type } = this.state; - - if (type === 62) { + if (type === 68) { this.resetPreviousNodeTrailingComments(id); this.next(); - return this.parseFunction(this.startNodeAtNode(id), undefined, true); + return this.parseAsyncFunctionExpression(this.startNodeAtNode(id)); } else if (tokenIsIdentifier(type)) { if (this.lookaheadCharCode() === 61) { return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id)); } else { return id; } - } else if (type === 84) { + } else if (type === 90) { this.resetPreviousNodeTrailingComments(id); return this.parseDo(this.startNodeAtNode(id), true); } } - if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) { this.next(); return this.parseArrowExpression(this.startNodeAtNode(id), [id], false); } - return id; } else { - throw this.unexpected(); + this.unexpected(); } - } } - parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) { const pipeProposal = this.getPluginOption("pipelineOperator", "proposal"); - if (pipeProposal) { this.state.type = topicTokenType; this.state.value = topicTokenValue; this.state.pos--; this.state.end--; - this.state.endLoc.column--; + this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1); return this.parseTopicReference(pipeProposal); } else { - throw this.unexpected(); + this.unexpected(); } } - parseTopicReference(pipeProposal) { const node = this.startNode(); - const start = this.state.start; + const startLoc = this.state.startLoc; const tokenType = this.state.type; this.next(); - return this.finishTopicReference(node, start, pipeProposal, tokenType); + return this.finishTopicReference(node, startLoc, pipeProposal, tokenType); } - - finishTopicReference(node, start, pipeProposal, tokenType) { - if (this.testTopicReferenceConfiguration(pipeProposal, start, tokenType)) { - let nodeType; - - if (pipeProposal === "smart") { - nodeType = "PipelinePrimaryTopicReference"; - } else { - nodeType = "TopicReference"; - } - + finishTopicReference(node, startLoc, pipeProposal, tokenType) { + if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) { + const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference"; if (!this.topicReferenceIsAllowedInCurrentContext()) { - if (pipeProposal === "smart") { - this.raise(start, ErrorMessages.PrimaryTopicNotAllowed); - } else { - this.raise(start, ErrorMessages.PipeTopicUnbound); - } + this.raise(pipeProposal === "smart" ? Errors.PrimaryTopicNotAllowed : Errors.PipeTopicUnbound, { + at: startLoc + }); } - this.registerTopicReference(); return this.finishNode(node, nodeType); } else { - throw this.raise(start, ErrorMessages.PipeTopicUnconfiguredToken, tokenLabelName(tokenType)); + throw this.raise(Errors.PipeTopicUnconfiguredToken, { + at: startLoc, + token: tokenLabelName(tokenType) + }); } } - - testTopicReferenceConfiguration(pipeProposal, start, tokenType) { + testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) { switch (pipeProposal) { case "hack": { - const pluginTopicToken = this.getPluginOption("pipelineOperator", "topicToken"); - return tokenLabelName(tokenType) === pluginTopicToken; + return this.hasPlugin(["pipelineOperator", { + topicToken: tokenLabelName(tokenType) + }]); } - case "smart": - return tokenType === 25; - + return tokenType === 27; default: - throw this.raise(start, ErrorMessages.PipeTopicRequiresHackPipes); + throw this.raise(Errors.PipeTopicRequiresHackPipes, { + at: startLoc + }); } } - parseAsyncArrowUnaryFunction(node) { this.prodParam.enter(functionFlags(true, this.prodParam.hasYield)); const params = [this.parseIdentifier()]; this.prodParam.exit(); - if (this.hasPrecedingLineBreak()) { - this.raise(this.state.pos, ErrorMessages.LineTerminatorBeforeArrow); + this.raise(Errors.LineTerminatorBeforeArrow, { + at: this.state.curPosition() + }); } - this.expect(19); - this.parseArrowExpression(node, params, true); - return node; + return this.parseArrowExpression(node, params, true); } - parseDo(node, isAsync) { this.expectPlugin("doExpressions"); - if (isAsync) { this.expectPlugin("asyncDoExpressions"); } - node.async = isAsync; this.next(); const oldLabels = this.state.labels; this.state.labels = []; - if (isAsync) { - this.prodParam.enter(PARAM_AWAIT); + this.prodParam.enter(2); node.body = this.parseBlock(); this.prodParam.exit(); } else { node.body = this.parseBlock(); } - this.state.labels = oldLabels; return this.finishNode(node, "DoExpression"); } - parseSuper() { const node = this.startNode(); this.next(); - if (this.match(10) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) { - this.raise(node.start, ErrorMessages.SuperNotAllowed); + this.raise(Errors.SuperNotAllowed, { + at: node + }); } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) { - this.raise(node.start, ErrorMessages.UnexpectedSuper); + this.raise(Errors.UnexpectedSuper, { + at: node + }); } - if (!this.match(10) && !this.match(0) && !this.match(16)) { - this.raise(node.start, ErrorMessages.UnsupportedSuper); + this.raise(Errors.UnsupportedSuper, { + at: node + }); } - return this.finishNode(node, "Super"); } - parsePrivateName() { const node = this.startNode(); - const id = this.startNodeAt(this.state.start + 1, new Position(this.state.curLine, this.state.start + 1 - this.state.lineStart)); + const id = this.startNodeAt(createPositionWithColumnOffset(this.state.startLoc, 1)); const name = this.state.value; this.next(); node.id = this.createIdentifier(id, name); return this.finishNode(node, "PrivateName"); } - parseFunctionOrFunctionSent() { const node = this.startNode(); this.next(); - if (this.prodParam.hasYield && this.match(16)) { const meta = this.createIdentifier(this.startNodeAtNode(node), "function"); this.next(); - - if (this.match(96)) { + if (this.match(103)) { this.expectPlugin("functionSent"); } else if (!this.hasPlugin("functionSent")) { this.unexpected(); } - return this.parseMetaProperty(node, meta, "sent"); } - return this.parseFunction(node); } - parseMetaProperty(node, meta, propertyName) { node.meta = meta; const containsEsc = this.state.containsEsc; node.property = this.parseIdentifier(true); - if (node.property.name !== propertyName || containsEsc) { - this.raise(node.property.start, ErrorMessages.UnsupportedMetaProperty, meta.name, propertyName); + this.raise(Errors.UnsupportedMetaProperty, { + at: node.property, + target: meta.name, + onlyValidPropertyName: propertyName + }); } - return this.finishNode(node, "MetaProperty"); } - parseImportMetaProperty(node) { const id = this.createIdentifier(this.startNodeAtNode(node), "import"); this.next(); - - if (this.isContextual(94)) { + if (this.isContextual(101)) { if (!this.inModule) { - this.raise(id.start, SourceTypeModuleErrorMessages.ImportMetaOutsideModule); + this.raise(Errors.ImportMetaOutsideModule, { + at: id + }); } - this.sawUnambiguousESM = true; + } else if (this.isContextual(105) || this.isContextual(97)) { + const isSource = this.isContextual(105); + if (!isSource) this.unexpected(); + this.expectPlugin(isSource ? "sourcePhaseImports" : "deferredImportEvaluation"); + if (!this.options.createImportExpressions) { + throw this.raise(Errors.DynamicImportPhaseRequiresImportExpressions, { + at: this.state.startLoc, + phase: this.state.value + }); + } + this.next(); + node.phase = isSource ? "source" : "defer"; + return this.parseImportCall(node); } - return this.parseMetaProperty(node, id, "meta"); } - parseLiteralAtNode(value, type, node) { this.addExtra(node, "rawValue", value); this.addExtra(node, "raw", this.input.slice(node.start, this.state.end)); @@ -13017,50 +13792,40 @@ class ExpressionParser extends LValParser { this.next(); return this.finishNode(node, type); } - parseLiteral(value, type) { const node = this.startNode(); return this.parseLiteralAtNode(value, type, node); } - parseStringLiteral(value) { return this.parseLiteral(value, "StringLiteral"); } - parseNumericLiteral(value) { return this.parseLiteral(value, "NumericLiteral"); } - parseBigIntLiteral(value) { return this.parseLiteral(value, "BigIntLiteral"); } - parseDecimalLiteral(value) { return this.parseLiteral(value, "DecimalLiteral"); } - parseRegExpLiteral(value) { const node = this.parseLiteral(value.value, "RegExpLiteral"); node.pattern = value.pattern; node.flags = value.flags; return node; } - parseBooleanLiteral(value) { const node = this.startNode(); node.value = value; this.next(); return this.finishNode(node, "BooleanLiteral"); } - parseNullLiteral() { const node = this.startNode(); this.next(); return this.finishNode(node, "NullLiteral"); } - parseParenAndDistinguishExpression(canBeArrow) { - const startPos = this.state.start; const startLoc = this.state.startLoc; let val; this.next(); @@ -13069,134 +13834,103 @@ class ExpressionParser extends LValParser { const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.maybeInArrowParameters = true; this.state.inFSharpPipelineDirectBody = false; - const innerStartPos = this.state.start; const innerStartLoc = this.state.startLoc; const exprList = []; const refExpressionErrors = new ExpressionErrors(); let first = true; - let spreadStart; - let optionalCommaStart; - + let spreadStartLoc; + let optionalCommaStartLoc; while (!this.match(11)) { if (first) { first = false; } else { - this.expect(12, refExpressionErrors.optionalParameters === -1 ? null : refExpressionErrors.optionalParameters); - + this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc); if (this.match(11)) { - optionalCommaStart = this.state.start; + optionalCommaStartLoc = this.state.startLoc; break; } } - if (this.match(21)) { - const spreadNodeStartPos = this.state.start; const spreadNodeStartLoc = this.state.startLoc; - spreadStart = this.state.start; - exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc)); - this.checkCommaAfterRest(41); - break; + spreadStartLoc = this.state.startLoc; + exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc)); + if (!this.checkCommaAfterRest(41)) { + break; + } } else { exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem)); } } - - const innerEndPos = this.state.lastTokEnd; const innerEndLoc = this.state.lastTokEndLoc; this.expect(11); this.state.maybeInArrowParameters = oldMaybeInArrowParameters; this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; - let arrowNode = this.startNodeAt(startPos, startLoc); - + let arrowNode = this.startNodeAt(startLoc); if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) { + this.checkDestructuringPrivate(refExpressionErrors); this.expressionScope.validateAsPattern(); this.expressionScope.exit(); this.parseArrowExpression(arrowNode, exprList, false); return arrowNode; } - this.expressionScope.exit(); - if (!exprList.length) { - this.unexpected(this.state.lastTokStart); + this.unexpected(this.state.lastTokStartLoc); } - - if (optionalCommaStart) this.unexpected(optionalCommaStart); - if (spreadStart) this.unexpected(spreadStart); + if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc); + if (spreadStartLoc) this.unexpected(spreadStartLoc); this.checkExpressionErrors(refExpressionErrors, true); this.toReferencedListDeep(exprList, true); - if (exprList.length > 1) { - val = this.startNodeAt(innerStartPos, innerStartLoc); + val = this.startNodeAt(innerStartLoc); val.expressions = exprList; this.finishNode(val, "SequenceExpression"); - this.resetEndLocation(val, innerEndPos, innerEndLoc); + this.resetEndLocation(val, innerEndLoc); } else { val = exprList[0]; } - - if (!this.options.createParenthesizedExpressions) { - this.addExtra(val, "parenthesized", true); - this.addExtra(val, "parenStart", startPos); - this.takeSurroundingComments(val, startPos, this.state.lastTokEnd); - return val; - } - - const parenExpression = this.startNodeAt(startPos, startLoc); - parenExpression.expression = val; - this.finishNode(parenExpression, "ParenthesizedExpression"); - return parenExpression; + return this.wrapParenthesis(startLoc, val); + } + wrapParenthesis(startLoc, expression) { + if (!this.options.createParenthesizedExpressions) { + this.addExtra(expression, "parenthesized", true); + this.addExtra(expression, "parenStart", startLoc.index); + this.takeSurroundingComments(expression, startLoc.index, this.state.lastTokEndLoc.index); + return expression; + } + const parenExpression = this.startNodeAt(startLoc); + parenExpression.expression = expression; + return this.finishNode(parenExpression, "ParenthesizedExpression"); } - shouldParseArrow(params) { return !this.canInsertSemicolon(); } - parseArrow(node) { if (this.eat(19)) { return node; } } - - parseParenItem(node, startPos, startLoc) { + parseParenItem(node, startLoc) { return node; } - parseNewOrNewTarget() { const node = this.startNode(); this.next(); - if (this.match(16)) { const meta = this.createIdentifier(this.startNodeAtNode(node), "new"); this.next(); const metaProp = this.parseMetaProperty(node, meta, "target"); - - if (!this.scope.inNonArrowFunction && !this.scope.inClass) { - this.raise(metaProp.start, ErrorMessages.UnexpectedNewTarget); + if (!this.scope.inNonArrowFunction && !this.scope.inClass && !this.options.allowNewTargetOutsideFunction) { + this.raise(Errors.UnexpectedNewTarget, { + at: metaProp + }); } - return metaProp; } - return this.parseNew(node); } - parseNew(node) { - node.callee = this.parseNoCallExpr(); - - if (node.callee.type === "Import") { - this.raise(node.callee.start, ErrorMessages.ImportCallNotNewExpression); - } else if (this.isOptionalChain(node.callee)) { - this.raise(this.state.lastTokEnd, ErrorMessages.OptionalChainingNoNew); - } else if (this.eat(18)) { - this.raise(this.state.start, ErrorMessages.OptionalChainingNoNew); - } - - this.parseNewArguments(node); - return this.finishNode(node, "NewExpression"); - } - - parseNewArguments(node) { + this.parseNewCallee(node); if (this.eat(10)) { const args = this.parseExprList(11); this.toReferencedList(args); @@ -13204,53 +13938,66 @@ class ExpressionParser extends LValParser { } else { node.arguments = []; } + return this.finishNode(node, "NewExpression"); + } + parseNewCallee(node) { + const isImport = this.match(83); + const callee = this.parseNoCallExpr(); + node.callee = callee; + if (isImport && (callee.type === "Import" || callee.type === "ImportExpression")) { + this.raise(Errors.ImportCallNotNewExpression, { + at: callee + }); + } } - parseTemplateElement(isTagged) { - const elem = this.startNode(); - - if (this.state.value === null) { + const { + start, + startLoc, + end, + value + } = this.state; + const elemStart = start + 1; + const elem = this.startNodeAt(createPositionWithColumnOffset(startLoc, 1)); + if (value === null) { if (!isTagged) { - this.raise(this.state.start + 1, ErrorMessages.InvalidEscapeSequenceTemplate); + this.raise(Errors.InvalidEscapeSequenceTemplate, { + at: createPositionWithColumnOffset(this.state.firstInvalidTemplateEscapePos, 1) + }); } } - + const isTail = this.match(24); + const endOffset = isTail ? -1 : -2; + const elemEnd = end + endOffset; elem.value = { - raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, "\n"), - cooked: this.state.value + raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"), + cooked: value === null ? null : value.slice(1, endOffset) }; + elem.tail = isTail; this.next(); - elem.tail = this.match(22); - return this.finishNode(elem, "TemplateElement"); + const finishedNode = this.finishNode(elem, "TemplateElement"); + this.resetEndLocation(finishedNode, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset)); + return finishedNode; } - parseTemplate(isTagged) { const node = this.startNode(); - this.next(); node.expressions = []; let curElt = this.parseTemplateElement(isTagged); node.quasis = [curElt]; - while (!curElt.tail) { - this.expect(23); node.expressions.push(this.parseTemplateSubstitution()); - this.expect(8); + this.readTemplateContinuation(); node.quasis.push(curElt = this.parseTemplateElement(isTagged)); } - - this.next(); return this.finishNode(node, "TemplateLiteral"); } - parseTemplateSubstitution() { return this.parseExpression(); } - parseObjectLike(close, isPattern, isRecord, refExpressionErrors) { if (isRecord) { this.expectPlugin("recordAndTuple"); } - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.inFSharpPipelineDirectBody = false; const propHash = Object.create(null); @@ -13258,161 +14005,134 @@ class ExpressionParser extends LValParser { const node = this.startNode(); node.properties = []; this.next(); - while (!this.match(close)) { if (first) { first = false; } else { this.expect(12); - if (this.match(close)) { - this.addExtra(node, "trailingComma", this.state.lastTokStart); + this.addTrailingCommaExtraToNode(node); break; } } - let prop; - if (isPattern) { prop = this.parseBindingProperty(); } else { prop = this.parsePropertyDefinition(refExpressionErrors); this.checkProto(prop, isRecord, propHash, refExpressionErrors); } - if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") { - this.raise(prop.start, ErrorMessages.InvalidRecordProperty); + this.raise(Errors.InvalidRecordProperty, { + at: prop + }); } - if (prop.shorthand) { this.addExtra(prop, "shorthand", true); } - node.properties.push(prop); } - this.next(); this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; let type = "ObjectExpression"; - if (isPattern) { type = "ObjectPattern"; } else if (isRecord) { type = "RecordExpression"; } - return this.finishNode(node, type); } - - maybeAsyncOrAccessorProp(prop) { - return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(49)); + addTrailingCommaExtraToNode(node) { + this.addExtra(node, "trailingComma", this.state.lastTokStart); + this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false); + } + maybeAsyncOrAccessorProp(prop) { + return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55)); } - parsePropertyDefinition(refExpressionErrors) { let decorators = []; - - if (this.match(24)) { + if (this.match(26)) { if (this.hasPlugin("decorators")) { - this.raise(this.state.start, ErrorMessages.UnsupportedPropertyDecorator); + this.raise(Errors.UnsupportedPropertyDecorator, { + at: this.state.startLoc + }); } - - while (this.match(24)) { + while (this.match(26)) { decorators.push(this.parseDecorator()); } } - const prop = this.startNode(); let isAsync = false; let isAccessor = false; - let startPos; let startLoc; - if (this.match(21)) { if (decorators.length) this.unexpected(); return this.parseSpread(); } - if (decorators.length) { prop.decorators = decorators; decorators = []; } - prop.method = false; - if (refExpressionErrors) { - startPos = this.state.start; startLoc = this.state.startLoc; } - - let isGenerator = this.eat(49); + let isGenerator = this.eat(55); this.parsePropertyNamePrefixOperator(prop); const containsEsc = this.state.containsEsc; - const key = this.parsePropertyName(prop); - + const key = this.parsePropertyName(prop, refExpressionErrors); if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) { const keyName = key.name; - if (keyName === "async" && !this.hasPrecedingLineBreak()) { isAsync = true; this.resetPreviousNodeTrailingComments(key); - isGenerator = this.eat(49); + isGenerator = this.eat(55); this.parsePropertyName(prop); } - if (keyName === "get" || keyName === "set") { isAccessor = true; this.resetPreviousNodeTrailingComments(key); prop.kind = keyName; - - if (this.match(49)) { + if (this.match(55)) { isGenerator = true; - this.raise(this.state.pos, ErrorMessages.AccessorIsGenerator, keyName); + this.raise(Errors.AccessorIsGenerator, { + at: this.state.curPosition(), + kind: keyName + }); this.next(); } - this.parsePropertyName(prop); } } - - this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors); - return prop; + return this.parseObjPropValue(prop, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors); } - getGetterSetterExpectedParamCount(method) { return method.kind === "get" ? 0 : 1; } - getObjectOrClassMethodParams(method) { return method.params; } - checkGetterSetterParams(method) { var _params; - const paramCount = this.getGetterSetterExpectedParamCount(method); const params = this.getObjectOrClassMethodParams(method); - const start = method.start; - if (params.length !== paramCount) { - if (method.kind === "get") { - this.raise(start, ErrorMessages.BadGetterArity); - } else { - this.raise(start, ErrorMessages.BadSetterArity); - } + this.raise(method.kind === "get" ? Errors.BadGetterArity : Errors.BadSetterArity, { + at: method + }); } - if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") { - this.raise(start, ErrorMessages.BadSetterRestParameter); + this.raise(Errors.BadSetterRestParameter, { + at: method + }); } } - parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) { if (isAccessor) { - this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod"); - this.checkGetterSetterParams(prop); - return prop; + const finishedProp = this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod"); + this.checkGetterSetterParams(finishedProp); + return finishedProp; } - if (isAsync || isGenerator || this.match(10)) { if (isPattern) this.unexpected(); prop.kind = "method"; @@ -13420,42 +14140,41 @@ class ExpressionParser extends LValParser { return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod"); } } - - parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) { + parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors) { prop.shorthand = false; - if (this.eat(14)) { - prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors); + prop.value = isPattern ? this.parseMaybeDefault(this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors); return this.finishNode(prop, "ObjectProperty"); } - if (!prop.computed && prop.key.type === "Identifier") { - this.checkReservedWord(prop.key.name, prop.key.start, true, false); - + this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false); if (isPattern) { - prop.value = this.parseMaybeDefault(startPos, startLoc, cloneIdentifier(prop.key)); - } else if (this.match(27) && refExpressionErrors) { - if (refExpressionErrors.shorthandAssign === -1) { - refExpressionErrors.shorthandAssign = this.state.start; + prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); + } else if (this.match(29)) { + const shorthandAssignLoc = this.state.startLoc; + if (refExpressionErrors != null) { + if (refExpressionErrors.shorthandAssignLoc === null) { + refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc; + } + } else { + this.raise(Errors.InvalidCoverInitializedName, { + at: shorthandAssignLoc + }); } - - prop.value = this.parseMaybeDefault(startPos, startLoc, cloneIdentifier(prop.key)); + prop.value = this.parseMaybeDefault(startLoc, cloneIdentifier(prop.key)); } else { prop.value = cloneIdentifier(prop.key); } - prop.shorthand = true; return this.finishNode(prop, "ObjectProperty"); } } - - parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { - const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors); + parseObjPropValue(prop, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) { + const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startLoc, isPattern, refExpressionErrors); if (!node) this.unexpected(); return node; } - - parsePropertyName(prop) { + parsePropertyName(prop, refExpressionErrors) { if (this.eat(0)) { prop.computed = true; prop.key = this.parseMaybeAssignAllowIn(); @@ -13466,74 +14185,68 @@ class ExpressionParser extends LValParser { value } = this.state; let key; - if (tokenIsKeywordOrIdentifier(type)) { key = this.parseIdentifier(true); } else { switch (type) { - case 124: + case 134: key = this.parseNumericLiteral(value); break; - - case 123: + case 133: key = this.parseStringLiteral(value); break; - - case 125: + case 135: key = this.parseBigIntLiteral(value); break; - - case 126: + case 136: key = this.parseDecimalLiteral(value); break; - - case 128: + case 138: { - const privateKeyPos = this.state.start + 1; - this.raise(privateKeyPos, ErrorMessages.UnexpectedPrivateField); + const privateKeyLoc = this.state.startLoc; + if (refExpressionErrors != null) { + if (refExpressionErrors.privateKeyLoc === null) { + refExpressionErrors.privateKeyLoc = privateKeyLoc; + } + } else { + this.raise(Errors.UnexpectedPrivateField, { + at: privateKeyLoc + }); + } key = this.parsePrivateName(); break; } - default: - throw this.unexpected(); + this.unexpected(); } } - prop.key = key; - - if (type !== 128) { + if (type !== 138) { prop.computed = false; } } - return prop.key; } - initFunction(node, isAsync) { node.id = null; node.generator = false; - node.async = !!isAsync; + node.async = isAsync; } - parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) { this.initFunction(node, isAsync); - node.generator = !!isGenerator; - const allowModifiers = isConstructor; - this.scope.enter(SCOPE_FUNCTION | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + node.generator = isGenerator; + this.scope.enter(2 | 16 | (inClassScope ? 64 : 0) | (allowDirectSuper ? 32 : 0)); this.prodParam.enter(functionFlags(isAsync, node.generator)); - this.parseFunctionParams(node, allowModifiers); - this.parseFunctionBodyAndFinish(node, type, true); + this.parseFunctionParams(node, isConstructor); + const finishedNode = this.parseFunctionBodyAndFinish(node, type, true); this.prodParam.exit(); this.scope.exit(); - return node; + return finishedNode; } - parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) { if (isTuple) { this.expectPlugin("recordAndTuple"); } - const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.inFSharpPipelineDirectBody = false; const node = this.startNode(); @@ -13542,24 +14255,19 @@ class ExpressionParser extends LValParser { this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression"); } - - parseArrowExpression(node, params, isAsync, trailingCommaPos) { - this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW); + parseArrowExpression(node, params, isAsync, trailingCommaLoc) { + this.scope.enter(2 | 4); let flags = functionFlags(isAsync, false); - - if (!this.match(0) && this.prodParam.hasIn) { - flags |= PARAM_IN; + if (!this.match(5) && this.prodParam.hasIn) { + flags |= 8; } - this.prodParam.enter(flags); this.initFunction(node, isAsync); const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; - if (params) { this.state.maybeInArrowParameters = true; - this.setArrowFunctionParameters(node, params, trailingCommaPos); + this.setArrowFunctionParameters(node, params, trailingCommaLoc); } - this.state.maybeInArrowParameters = false; this.parseFunctionBody(node, true); this.prodParam.exit(); @@ -13567,20 +14275,17 @@ class ExpressionParser extends LValParser { this.state.maybeInArrowParameters = oldMaybeInArrowParameters; return this.finishNode(node, "ArrowFunctionExpression"); } - - setArrowFunctionParameters(node, params, trailingCommaPos) { - node.params = this.toAssignableList(params, trailingCommaPos, false); + setArrowFunctionParameters(node, params, trailingCommaLoc) { + this.toAssignableList(params, trailingCommaLoc, false); + node.params = params; } - parseFunctionBodyAndFinish(node, type, isMethod = false) { this.parseFunctionBody(node, false, isMethod); - this.finishNode(node, type); + return this.finishNode(node, type); } - parseFunctionBody(node, allowExpression, isMethod = false) { const isExpression = allowExpression && !this.match(5); this.expressionScope.enter(newExpressionScope()); - if (isExpression) { node.body = this.parseMaybeAssign(); this.checkParams(node, false, allowExpression, false); @@ -13588,201 +14293,198 @@ class ExpressionParser extends LValParser { const oldStrict = this.state.strict; const oldLabels = this.state.labels; this.state.labels = []; - this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN); + this.prodParam.enter(this.prodParam.currentFlags() | 4); node.body = this.parseBlock(true, false, hasStrictModeDirective => { const nonSimple = !this.isSimpleParamList(node.params); - if (hasStrictModeDirective && nonSimple) { - const errorPos = (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.end : node.start; - this.raise(errorPos, ErrorMessages.IllegalLanguageModeDirective); + this.raise(Errors.IllegalLanguageModeDirective, { + at: (node.kind === "method" || node.kind === "constructor") && !!node.key ? node.key.loc.end : node + }); } - const strictModeChanged = !oldStrict && this.state.strict; this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged); - if (this.state.strict && node.id) { - this.checkLVal(node.id, "function name", BIND_OUTSIDE, undefined, undefined, strictModeChanged); + this.checkIdentifier(node.id, 65, strictModeChanged); } }); this.prodParam.exit(); this.state.labels = oldLabels; } - this.expressionScope.exit(); } - + isSimpleParameter(node) { + return node.type === "Identifier"; + } isSimpleParamList(params) { for (let i = 0, len = params.length; i < len; i++) { - if (params[i].type !== "Identifier") return false; + if (!this.isSimpleParameter(params[i])) return false; } - return true; } - checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) { - const checkClashes = new Set(); - + const checkClashes = !allowDuplicates && new Set(); + const formalParameters = { + type: "FormalParameters" + }; for (const param of node.params) { - this.checkLVal(param, "function parameter list", BIND_VAR, allowDuplicates ? null : checkClashes, undefined, strictModeChanged); + this.checkLVal(param, { + in: formalParameters, + binding: 5, + checkClashes, + strictModeChanged + }); } } - parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) { const elts = []; let first = true; - while (!this.eat(close)) { if (first) { first = false; } else { this.expect(12); - if (this.match(close)) { if (nodeForExtra) { - this.addExtra(nodeForExtra, "trailingComma", this.state.lastTokStart); + this.addTrailingCommaExtraToNode(nodeForExtra); } - this.next(); break; } } - elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors)); } - return elts; } - parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) { let elt; - if (this.match(12)) { if (!allowEmpty) { - this.raise(this.state.pos, ErrorMessages.UnexpectedToken, ","); + this.raise(Errors.UnexpectedToken, { + at: this.state.curPosition(), + unexpected: "," + }); } - elt = null; } else if (this.match(21)) { - const spreadNodeStartPos = this.state.start; const spreadNodeStartLoc = this.state.startLoc; - elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartPos, spreadNodeStartLoc); + elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartLoc); } else if (this.match(17)) { this.expectPlugin("partialApplication"); - if (!allowPlaceholder) { - this.raise(this.state.start, ErrorMessages.UnexpectedArgumentPlaceholder); + this.raise(Errors.UnexpectedArgumentPlaceholder, { + at: this.state.startLoc + }); } - const node = this.startNode(); this.next(); elt = this.finishNode(node, "ArgumentPlaceholder"); } else { elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem); } - return elt; } - parseIdentifier(liberal) { const node = this.startNode(); - const name = this.parseIdentifierName(node.start, liberal); + const name = this.parseIdentifierName(liberal); return this.createIdentifier(node, name); } - createIdentifier(node, name) { node.name = name; node.loc.identifierName = name; return this.finishNode(node, "Identifier"); } - - parseIdentifierName(pos, liberal) { + parseIdentifierName(liberal) { let name; const { - start, + startLoc, type } = this.state; - if (tokenIsKeywordOrIdentifier(type)) { name = this.state.value; } else { - throw this.unexpected(); + this.unexpected(); } - const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type); - if (liberal) { if (tokenIsKeyword) { - this.replaceToken(122); + this.replaceToken(132); } } else { - this.checkReservedWord(name, start, tokenIsKeyword, false); + this.checkReservedWord(name, startLoc, tokenIsKeyword, false); } - this.next(); return name; } - checkReservedWord(word, startLoc, checkKeywords, isBinding) { if (word.length > 10) { return; } - if (!canBeReservedWord(word)) { return; } - - if (word === "yield") { + if (checkKeywords && isKeyword(word)) { + this.raise(Errors.UnexpectedKeyword, { + at: startLoc, + keyword: word + }); + return; + } + const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; + if (reservedTest(word, this.inModule)) { + this.raise(Errors.UnexpectedReservedWord, { + at: startLoc, + reservedWord: word + }); + return; + } else if (word === "yield") { if (this.prodParam.hasYield) { - this.raise(startLoc, ErrorMessages.YieldBindingIdentifier); + this.raise(Errors.YieldBindingIdentifier, { + at: startLoc + }); return; } } else if (word === "await") { if (this.prodParam.hasAwait) { - this.raise(startLoc, ErrorMessages.AwaitBindingIdentifier); + this.raise(Errors.AwaitBindingIdentifier, { + at: startLoc + }); return; - } else if (this.scope.inStaticBlock) { - this.raise(startLoc, ErrorMessages.AwaitBindingIdentifierInStaticBlock); - return; - } else { - this.expressionScope.recordAsyncArrowParametersError(startLoc, ErrorMessages.AwaitBindingIdentifier); } + if (this.scope.inStaticBlock) { + this.raise(Errors.AwaitBindingIdentifierInStaticBlock, { + at: startLoc + }); + return; + } + this.expressionScope.recordAsyncArrowParametersError({ + at: startLoc + }); } else if (word === "arguments") { if (this.scope.inClassAndNotInNonArrowFunction) { - this.raise(startLoc, ErrorMessages.ArgumentsInClass); + this.raise(Errors.ArgumentsInClass, { + at: startLoc + }); return; } } - - if (checkKeywords && isKeyword(word)) { - this.raise(startLoc, ErrorMessages.UnexpectedKeyword, word); - return; - } - - const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord; - - if (reservedTest(word, this.inModule)) { - this.raise(startLoc, ErrorMessages.UnexpectedReservedWord, word); - } } - isAwaitAllowed() { if (this.prodParam.hasAwait) return true; - if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) { return true; } - return false; } - - parseAwait(startPos, startLoc) { - const node = this.startNodeAt(startPos, startLoc); - this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.AwaitExpressionFormalParameter); - - if (this.eat(49)) { - this.raise(node.start, ErrorMessages.ObsoleteAwaitStar); + parseAwait(startLoc) { + const node = this.startNodeAt(startLoc); + this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, { + at: node + }); + if (this.eat(55)) { + this.raise(Errors.ObsoleteAwaitStar, { + at: node + }); } - if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) { if (this.isAmbiguousAwait()) { this.ambiguousScriptDifferentAst = true; @@ -13790,31 +14492,31 @@ class ExpressionParser extends LValParser { this.sawUnambiguousESM = true; } } - if (!this.state.soloAwait) { node.argument = this.parseMaybeUnary(null, true); } - return this.finishNode(node, "AwaitExpression"); } - isAmbiguousAwait() { - return this.hasPrecedingLineBreak() || this.match(47) || this.match(10) || this.match(0) || this.match(22) || this.match(127) || this.match(50) || this.hasPlugin("v8intrinsic") && this.match(48); + if (this.hasPrecedingLineBreak()) return true; + const { + type + } = this.state; + return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 102 && !this.state.containsEsc || type === 137 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54; } - parseYield() { const node = this.startNode(); - this.expressionScope.recordParameterInitializerError(node.start, ErrorMessages.YieldInParameter); + this.expressionScope.recordParameterInitializerError(Errors.YieldInParameter, { + at: node + }); this.next(); let delegating = false; let argument = null; - if (!this.hasPrecedingLineBreak()) { - delegating = this.eat(49); - + delegating = this.eat(55); switch (this.state.type) { case 13: - case 129: + case 139: case 8: case 11: case 3: @@ -13822,89 +14524,96 @@ class ExpressionParser extends LValParser { case 14: case 12: if (!delegating) break; - default: argument = this.parseMaybeAssign(); } } - node.delegate = delegating; node.argument = argument; return this.finishNode(node, "YieldExpression"); } - - checkPipelineAtInfixOperator(left, leftStartPos) { - if (this.getPluginOption("pipelineOperator", "proposal") === "smart") { + parseImportCall(node) { + this.next(); + node.source = this.parseMaybeAssignAllowIn(); + if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + node.options = null; + } + if (this.eat(12)) { + this.expectImportAttributesPlugin(); + if (!this.match(11)) { + node.options = this.parseMaybeAssignAllowIn(); + this.eat(12); + } + } + this.expect(11); + return this.finishNode(node, "ImportExpression"); + } + checkPipelineAtInfixOperator(left, leftStartLoc) { + if (this.hasPlugin(["pipelineOperator", { + proposal: "smart" + }])) { if (left.type === "SequenceExpression") { - this.raise(leftStartPos, ErrorMessages.PipelineHeadSequenceExpression); + this.raise(Errors.PipelineHeadSequenceExpression, { + at: leftStartLoc + }); } } } - - checkHackPipeBodyEarlyErrors(startPos) { - if (!this.topicReferenceWasUsedInCurrentContext()) { - this.raise(startPos, ErrorMessages.PipeTopicUnused); - } - } - - parseSmartPipelineBodyInStyle(childExpr, startPos, startLoc) { - const bodyNode = this.startNodeAt(startPos, startLoc); - + parseSmartPipelineBodyInStyle(childExpr, startLoc) { if (this.isSimpleReference(childExpr)) { + const bodyNode = this.startNodeAt(startLoc); bodyNode.callee = childExpr; return this.finishNode(bodyNode, "PipelineBareFunction"); } else { - this.checkSmartPipeTopicBodyEarlyErrors(startPos); + const bodyNode = this.startNodeAt(startLoc); + this.checkSmartPipeTopicBodyEarlyErrors(startLoc); bodyNode.expression = childExpr; return this.finishNode(bodyNode, "PipelineTopicExpression"); } } - isSimpleReference(expression) { switch (expression.type) { case "MemberExpression": return !expression.computed && this.isSimpleReference(expression.object); - case "Identifier": return true; - default: return false; } } - - checkSmartPipeTopicBodyEarlyErrors(startPos) { + checkSmartPipeTopicBodyEarlyErrors(startLoc) { if (this.match(19)) { - throw this.raise(this.state.start, ErrorMessages.PipelineBodyNoArrow); - } else if (!this.topicReferenceWasUsedInCurrentContext()) { - this.raise(startPos, ErrorMessages.PipelineTopicUnused); + throw this.raise(Errors.PipelineBodyNoArrow, { + at: this.state.startLoc + }); + } + if (!this.topicReferenceWasUsedInCurrentContext()) { + this.raise(Errors.PipelineTopicUnused, { + at: startLoc + }); } } - withTopicBindingContext(callback) { const outerContextTopicState = this.state.topicContext; this.state.topicContext = { maxNumOfResolvableTopics: 1, maxTopicIndex: null }; - try { return callback(); } finally { this.state.topicContext = outerContextTopicState; } } - withSmartMixTopicForbiddingContext(callback) { - const proposal = this.getPluginOption("pipelineOperator", "proposal"); - - if (proposal === "smart") { + if (this.hasPlugin(["pipelineOperator", { + proposal: "smart" + }])) { const outerContextTopicState = this.state.topicContext; this.state.topicContext = { maxNumOfResolvableTopics: 0, maxTopicIndex: null }; - try { return callback(); } finally { @@ -13914,179 +14623,223 @@ class ExpressionParser extends LValParser { return callback(); } } - withSoloAwaitPermittingContext(callback) { const outerContextSoloAwaitState = this.state.soloAwait; this.state.soloAwait = true; - try { return callback(); } finally { this.state.soloAwait = outerContextSoloAwaitState; } } - allowInAnd(callback) { const flags = this.prodParam.currentFlags(); - const prodParamToSet = PARAM_IN & ~flags; - + const prodParamToSet = 8 & ~flags; if (prodParamToSet) { - this.prodParam.enter(flags | PARAM_IN); - + this.prodParam.enter(flags | 8); try { return callback(); } finally { this.prodParam.exit(); } } - return callback(); } - disallowInAnd(callback) { const flags = this.prodParam.currentFlags(); - const prodParamToClear = PARAM_IN & flags; - + const prodParamToClear = 8 & flags; if (prodParamToClear) { - this.prodParam.enter(flags & ~PARAM_IN); - + this.prodParam.enter(flags & ~8); try { return callback(); } finally { this.prodParam.exit(); } } - return callback(); } - 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(prec) { - const startPos = this.state.start; const startLoc = this.state.startLoc; this.state.potentialArrowAt = this.state.start; const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody; this.state.inFSharpPipelineDirectBody = true; - const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startPos, startLoc, prec); + const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startLoc, prec); this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody; return ret; } - parseModuleExpression() { this.expectPlugin("moduleBlocks"); const node = this.startNode(); this.next(); - this.eat(5); + if (!this.match(5)) { + this.unexpected(null, 5); + } + const program = this.startNodeAt(this.state.endLoc); + this.next(); const revertScopes = this.initializeScopes(true); this.enterInitialScopes(); - const program = this.startNode(); - try { node.body = this.parseProgram(program, 8, "module"); } finally { revertScopes(); } - - this.eat(8); return this.finishNode(node, "ModuleExpression"); } - parsePropertyNamePrefixOperator(prop) {} - } - const loopLabel = { - kind: "loop" -}, - switchLabel = { - kind: "switch" -}; -const FUNC_NO_FLAGS = 0b000, - FUNC_STATEMENT = 0b001, - FUNC_HANGING_STATEMENT = 0b010, - FUNC_NULLABLE_ID = 0b100; + kind: "loop" + }, + switchLabel = { + kind: "switch" + }; const loneSurrogate = /[\uD800-\uDFFF]/u; const keywordRelationalOperator = /in(?:stanceof)?/y; - -function babel7CompatTokens(tokens) { +function babel7CompatTokens(tokens, input) { for (let i = 0; i < tokens.length; i++) { const token = tokens[i]; const { type } = token; - - if (type === 128) { - { - const { - loc, - start, - value, - end - } = token; - const hashEndPos = start + 1; - const hashEndLoc = new Position(loc.start.line, loc.start.column + 1); - tokens.splice(i, 1, new Token({ - type: getExportedToken(25), - value: "#", - start: start, - end: hashEndPos, - startLoc: loc.start, - endLoc: hashEndLoc - }), new Token({ - type: getExportedToken(122), - value: value, - start: hashEndPos, - end: end, - startLoc: hashEndLoc, - endLoc: loc.end - })); - i++; - continue; - } - } - if (typeof type === "number") { + { + if (type === 138) { + const { + loc, + start, + value, + end + } = token; + const hashEndPos = start + 1; + const hashEndLoc = createPositionWithColumnOffset(loc.start, 1); + tokens.splice(i, 1, new Token({ + type: getExportedToken(27), + value: "#", + start: start, + end: hashEndPos, + startLoc: loc.start, + endLoc: hashEndLoc + }), new Token({ + type: getExportedToken(132), + value: value, + start: hashEndPos, + end: end, + startLoc: hashEndLoc, + endLoc: loc.end + })); + i++; + continue; + } + if (tokenIsTemplate(type)) { + const { + loc, + start, + value, + end + } = token; + const backquoteEnd = start + 1; + const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1); + let startToken; + if (input.charCodeAt(start) === 96) { + startToken = new Token({ + type: getExportedToken(22), + value: "`", + start: start, + end: backquoteEnd, + startLoc: loc.start, + endLoc: backquoteEndLoc + }); + } else { + startToken = new Token({ + type: getExportedToken(8), + value: "}", + start: start, + end: backquoteEnd, + startLoc: loc.start, + endLoc: backquoteEndLoc + }); + } + let templateValue, templateElementEnd, templateElementEndLoc, endToken; + if (type === 24) { + templateElementEnd = end - 1; + templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1); + templateValue = value === null ? null : value.slice(1, -1); + endToken = new Token({ + type: getExportedToken(22), + value: "`", + start: templateElementEnd, + end: end, + startLoc: templateElementEndLoc, + endLoc: loc.end + }); + } else { + templateElementEnd = end - 2; + templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2); + templateValue = value === null ? null : value.slice(1, -2); + endToken = new Token({ + type: getExportedToken(23), + value: "${", + start: templateElementEnd, + end: end, + startLoc: templateElementEndLoc, + endLoc: loc.end + }); + } + tokens.splice(i, 1, startToken, new Token({ + type: getExportedToken(20), + value: templateValue, + start: backquoteEnd, + end: templateElementEnd, + startLoc: backquoteEndLoc, + endLoc: templateElementEndLoc + }), endToken); + i += 2; + continue; + } + } token.type = getExportedToken(type); } } - return tokens; } - class StatementParser extends ExpressionParser { parseTopLevel(file, program) { file.program = this.parseProgram(program); file.comments = this.state.comments; - if (this.options.tokens) file.tokens = babel7CompatTokens(this.tokens); + if (this.options.tokens) { + file.tokens = babel7CompatTokens(this.tokens, this.input); + } return this.finishNode(file, "File"); } - - parseProgram(program, end = 129, sourceType = this.options.sourceType) { + parseProgram(program, end = 139, sourceType = this.options.sourceType) { program.sourceType = sourceType; program.interpreter = this.parseInterpreterDirective(); this.parseBlockBody(program, true, true, end); - if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) { - for (const [name] of Array.from(this.scope.undefinedExports)) { - const pos = this.scope.undefinedExports.get(name); - this.raise(pos, ErrorMessages.ModuleExportUndefined, name); + for (const [localName, at] of Array.from(this.scope.undefinedExports)) { + this.raise(Errors.ModuleExportUndefined, { + at, + localName + }); } } - - return this.finishNode(program, "Program"); + let finishedProgram; + if (end === 139) { + finishedProgram = this.finishNode(program, "Program"); + } else { + finishedProgram = this.finishNodeAt(program, "Program", createPositionWithColumnOffset(this.state.startLoc, -1)); + } + return finishedProgram; } - stmtToDirective(stmt) { const directive = stmt; directive.type = "Directive"; @@ -14102,277 +14855,347 @@ class StatementParser extends ExpressionParser { directiveLiteral.type = "DirectiveLiteral"; return directive; } - parseInterpreterDirective() { - if (!this.match(26)) { + if (!this.match(28)) { return null; } - const node = this.startNode(); node.value = this.state.value; this.next(); return this.finishNode(node, "InterpreterDirective"); } - - isLet(context) { - if (!this.isContextual(93)) { + isLet() { + if (!this.isContextual(100)) { return false; } - - return this.isLetKeyword(context); + return this.hasFollowingBindingAtom(); } - - isLetKeyword(context) { - const next = this.nextTokenStart(); - const nextCh = this.codePointAtPos(next); - - if (nextCh === 92 || nextCh === 91) { - return true; - } - - if (context) return false; - if (nextCh === 123) return true; - - if (isIdentifierStart(nextCh)) { - keywordRelationalOperator.lastIndex = next; - + chStartsBindingIdentifier(ch, pos) { + if (isIdentifierStart(ch)) { + keywordRelationalOperator.lastIndex = pos; if (keywordRelationalOperator.test(this.input)) { const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex); - if (!isIdentifierChar(endCh) && endCh !== 92) { return false; } } - + return true; + } else if (ch === 92) { + return true; + } else { + return false; + } + } + chStartsBindingPattern(ch) { + return ch === 91 || ch === 123; + } + hasFollowingBindingAtom() { + const next = this.nextTokenStart(); + const nextCh = this.codePointAtPos(next); + return this.chStartsBindingPattern(nextCh) || this.chStartsBindingIdentifier(nextCh, next); + } + hasInLineFollowingBindingIdentifier() { + const next = this.nextTokenInLineStart(); + const nextCh = this.codePointAtPos(next); + return this.chStartsBindingIdentifier(nextCh, next); + } + startsUsingForOf() { + const { + type, + containsEsc + } = this.lookahead(); + if (type === 102 && !containsEsc) { + return false; + } else if (tokenIsIdentifier(type) && !this.hasFollowingLineBreak()) { + this.expectPlugin("explicitResourceManagement"); return true; } - + } + startsAwaitUsing() { + let next = this.nextTokenInLineStart(); + if (this.isUnparsedContextual(next, "using")) { + next = this.nextTokenInLineStartSince(next + 5); + const nextCh = this.codePointAtPos(next); + if (this.chStartsBindingIdentifier(nextCh, next)) { + this.expectPlugin("explicitResourceManagement"); + return true; + } + } return false; } - - parseStatement(context, topLevel) { - if (this.match(24)) { - this.parseDecorators(true); - } - - return this.parseStatementContent(context, topLevel); + parseModuleItem() { + return this.parseStatementLike(1 | 2 | 4 | 8); } - - parseStatementContent(context, topLevel) { - let starttype = this.state.type; - const node = this.startNode(); - let kind; - - if (this.isLet(context)) { - starttype = 68; - kind = "let"; + parseStatementListItem() { + return this.parseStatementLike(2 | 4 | (!this.options.annexB || this.state.strict ? 0 : 8)); + } + parseStatementOrSloppyAnnexBFunctionDeclaration(allowLabeledFunction = false) { + let flags = 0; + if (this.options.annexB && !this.state.strict) { + flags |= 4; + if (allowLabeledFunction) { + flags |= 8; + } } - + return this.parseStatementLike(flags); + } + parseStatement() { + return this.parseStatementLike(0); + } + parseStatementLike(flags) { + let decorators = null; + if (this.match(26)) { + decorators = this.parseDecorators(true); + } + return this.parseStatementContent(flags, decorators); + } + parseStatementContent(flags, decorators) { + const starttype = this.state.type; + const node = this.startNode(); + const allowDeclaration = !!(flags & 2); + const allowFunctionDeclaration = !!(flags & 4); + const topLevel = flags & 1; switch (starttype) { - case 54: + case 60: return this.parseBreakContinueStatement(node, true); - - case 57: + case 63: return this.parseBreakContinueStatement(node, false); - - case 58: + case 64: return this.parseDebuggerStatement(node); - - case 84: - return this.parseDoStatement(node); - - case 85: + case 90: + return this.parseDoWhileStatement(node); + case 91: return this.parseForStatement(node); - - case 62: + case 68: if (this.lookaheadCharCode() === 46) break; - - if (context) { - if (this.state.strict) { - this.raise(this.state.start, ErrorMessages.StrictFunction); - } else if (context !== "if" && context !== "label") { - this.raise(this.state.start, ErrorMessages.SloppyFunction); + if (!allowFunctionDeclaration) { + this.raise(this.state.strict ? Errors.StrictFunction : this.options.annexB ? Errors.SloppyFunctionAnnexB : Errors.SloppyFunction, { + at: this.state.startLoc + }); + } + return this.parseFunctionStatement(node, false, !allowDeclaration && allowFunctionDeclaration); + case 80: + if (!allowDeclaration) this.unexpected(); + return this.parseClass(this.maybeTakeDecorators(decorators, node), true); + case 69: + return this.parseIfStatement(node); + case 70: + return this.parseReturnStatement(node); + case 71: + return this.parseSwitchStatement(node); + case 72: + return this.parseThrowStatement(node); + case 73: + return this.parseTryStatement(node); + case 96: + if (!this.state.containsEsc && this.startsAwaitUsing()) { + if (!this.isAwaitAllowed()) { + this.raise(Errors.AwaitUsingNotInAsyncContext, { + at: node + }); + } else if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, { + at: node + }); + } + this.next(); + return this.parseVarStatement(node, "await using"); + } + break; + case 107: + if (this.state.containsEsc || !this.hasInLineFollowingBindingIdentifier()) { + break; + } + this.expectPlugin("explicitResourceManagement"); + if (!this.scope.inModule && this.scope.inTopLevel) { + this.raise(Errors.UnexpectedUsingDeclaration, { + at: this.state.startLoc + }); + } else if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, { + at: this.state.startLoc + }); + } + return this.parseVarStatement(node, "using"); + case 100: + { + if (this.state.containsEsc) { + break; + } + const next = this.nextTokenStart(); + const nextCh = this.codePointAtPos(next); + if (nextCh !== 91) { + if (!allowDeclaration && this.hasFollowingLineBreak()) break; + if (!this.chStartsBindingIdentifier(nextCh, next) && nextCh !== 123) { + break; + } } } - - return this.parseFunctionStatement(node, false, !context); - - case 74: - if (context) this.unexpected(); - return this.parseClass(node, true); - - case 63: - return this.parseIfStatement(node); - - case 64: - return this.parseReturnStatement(node); - - case 65: - return this.parseSwitchStatement(node); - - case 66: - return this.parseThrowStatement(node); - - case 67: - return this.parseTryStatement(node); - - case 69: - case 68: - kind = kind || this.state.value; - - if (context && kind !== "var") { - this.raise(this.state.start, ErrorMessages.UnexpectedLexicalDeclaration); + case 75: + { + if (!allowDeclaration) { + this.raise(Errors.UnexpectedLexicalDeclaration, { + at: this.state.startLoc + }); + } } - - return this.parseVarStatement(node, kind); - - case 86: + case 74: + { + const kind = this.state.value; + return this.parseVarStatement(node, kind); + } + case 92: return this.parseWhileStatement(node); - - case 70: + case 76: return this.parseWithStatement(node); - case 5: return this.parseBlock(); - case 13: return this.parseEmptyStatement(node); - - case 77: + case 83: { const nextTokenCharCode = this.lookaheadCharCode(); - if (nextTokenCharCode === 40 || nextTokenCharCode === 46) { break; } } - - case 76: + case 82: { if (!this.options.allowImportExportEverywhere && !topLevel) { - this.raise(this.state.start, ErrorMessages.UnexpectedImportExport); + this.raise(Errors.UnexpectedImportExport, { + at: this.state.startLoc + }); } - this.next(); let result; - - if (starttype === 77) { + if (starttype === 83) { result = this.parseImport(node); - if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) { this.sawUnambiguousESM = true; } } else { - result = this.parseExport(node); - + result = this.parseExport(node, decorators); if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") { this.sawUnambiguousESM = true; } } - - this.assertModuleNodeAllowed(node); + this.assertModuleNodeAllowed(result); return result; } - default: { if (this.isAsyncFunction()) { - if (context) { - this.raise(this.state.start, ErrorMessages.AsyncFunctionInSingleStatementContext); + if (!allowDeclaration) { + this.raise(Errors.AsyncFunctionInSingleStatementContext, { + at: this.state.startLoc + }); } - this.next(); - return this.parseFunctionStatement(node, true, !context); + return this.parseFunctionStatement(node, true, !allowDeclaration && allowFunctionDeclaration); } } } - const maybeName = this.state.value; const expr = this.parseExpression(); - if (tokenIsIdentifier(starttype) && expr.type === "Identifier" && this.eat(14)) { - return this.parseLabeledStatement(node, maybeName, expr, context); + return this.parseLabeledStatement(node, maybeName, expr, flags); } else { - return this.parseExpressionStatement(node, expr); + return this.parseExpressionStatement(node, expr, decorators); } } - assertModuleNodeAllowed(node) { if (!this.options.allowImportExportEverywhere && !this.inModule) { - this.raise(node.start, SourceTypeModuleErrorMessages.ImportOutsideModule); + this.raise(Errors.ImportOutsideModule, { + at: node + }); } } - - takeDecorators(node) { - const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (decorators.length) { - node.decorators = decorators; - this.resetStartLocationFromNode(node, decorators[0]); - this.state.decoratorStack[this.state.decoratorStack.length - 1] = []; - } + decoratorsEnabledBeforeExport() { + if (this.hasPlugin("decorators-legacy")) return true; + return this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") !== false; + } + maybeTakeDecorators(maybeDecorators, classNode, exportNode) { + if (maybeDecorators) { + if (classNode.decorators && classNode.decorators.length > 0) { + if (typeof this.getPluginOption("decorators", "decoratorsBeforeExport") !== "boolean") { + this.raise(Errors.DecoratorsBeforeAfterExport, { + at: classNode.decorators[0] + }); + } + classNode.decorators.unshift(...maybeDecorators); + } else { + classNode.decorators = maybeDecorators; + } + this.resetStartLocationFromNode(classNode, maybeDecorators[0]); + if (exportNode) this.resetStartLocationFromNode(exportNode, classNode); + } + return classNode; } - canHaveLeadingDecorator() { - return this.match(74); + return this.match(80); } - parseDecorators(allowExport) { - const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - while (this.match(24)) { - const decorator = this.parseDecorator(); - currentContextDecorators.push(decorator); - } - - if (this.match(76)) { + const decorators = []; + do { + decorators.push(this.parseDecorator()); + } while (this.match(26)); + if (this.match(82)) { if (!allowExport) { this.unexpected(); } - - if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.raise(this.state.start, ErrorMessages.DecoratorExportClass); + if (!this.decoratorsEnabledBeforeExport()) { + this.raise(Errors.DecoratorExportClass, { + at: this.state.startLoc + }); } } else if (!this.canHaveLeadingDecorator()) { - throw this.raise(this.state.start, ErrorMessages.UnexpectedLeadingDecorator); + throw this.raise(Errors.UnexpectedLeadingDecorator, { + at: this.state.startLoc + }); } + return decorators; } - parseDecorator() { - this.expectOnePlugin(["decorators-legacy", "decorators"]); + this.expectOnePlugin(["decorators", "decorators-legacy"]); const node = this.startNode(); this.next(); - if (this.hasPlugin("decorators")) { - this.state.decoratorStack.push([]); - const startPos = this.state.start; const startLoc = this.state.startLoc; let expr; - - if (this.eat(10)) { + if (this.match(10)) { + const startLoc = this.state.startLoc; + this.next(); expr = this.parseExpression(); this.expect(11); + expr = this.wrapParenthesis(startLoc, expr); + const paramsStartLoc = this.state.startLoc; + node.expression = this.parseMaybeDecoratorArguments(expr); + if (this.getPluginOption("decorators", "allowCallParenthesized") === false && node.expression !== expr) { + this.raise(Errors.DecoratorArgumentsOutsideParentheses, { + at: paramsStartLoc + }); + } } else { expr = this.parseIdentifier(false); - while (this.eat(16)) { - const node = this.startNodeAt(startPos, startLoc); + const node = this.startNodeAt(startLoc); node.object = expr; - node.property = this.parseIdentifier(true); + if (this.match(138)) { + this.classScope.usePrivateName(this.state.value, this.state.startLoc); + node.property = this.parsePrivateName(); + } else { + node.property = this.parseIdentifier(true); + } node.computed = false; expr = this.finishNode(node, "MemberExpression"); } + node.expression = this.parseMaybeDecoratorArguments(expr); } - - node.expression = this.parseMaybeDecoratorArguments(expr); - this.state.decoratorStack.pop(); } else { node.expression = this.parseExprSubscripts(); } - return this.finishNode(node, "Decorator"); } - parseMaybeDecoratorArguments(expr) { if (this.eat(10)) { const node = this.startNodeAtNode(expr); @@ -14381,306 +15204,300 @@ class StatementParser extends ExpressionParser { this.toReferencedList(node.arguments); return this.finishNode(node, "CallExpression"); } - return expr; } - parseBreakContinueStatement(node, isBreak) { this.next(); - if (this.isLineTerminator()) { node.label = null; } else { node.label = this.parseIdentifier(); this.semicolon(); } - this.verifyBreakContinue(node, isBreak); return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); } - verifyBreakContinue(node, isBreak) { let i; - for (i = 0; i < this.state.labels.length; ++i) { const lab = this.state.labels[i]; - if (node.label == null || lab.name === node.label.name) { if (lab.kind != null && (isBreak || lab.kind === "loop")) break; if (node.label && isBreak) break; } } - if (i === this.state.labels.length) { - this.raise(node.start, ErrorMessages.IllegalBreakContinue, isBreak ? "break" : "continue"); + const type = isBreak ? "BreakStatement" : "ContinueStatement"; + this.raise(Errors.IllegalBreakContinue, { + at: node, + type + }); } } - parseDebuggerStatement(node) { this.next(); this.semicolon(); return this.finishNode(node, "DebuggerStatement"); } - parseHeaderExpression() { this.expect(10); const val = this.parseExpression(); this.expect(11); return val; } - - parseDoStatement(node) { + parseDoWhileStatement(node) { this.next(); this.state.labels.push(loopLabel); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("do")); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); this.state.labels.pop(); - this.expect(86); + this.expect(92); node.test = this.parseHeaderExpression(); this.eat(13); return this.finishNode(node, "DoWhileStatement"); } - parseForStatement(node) { this.next(); this.state.labels.push(loopLabel); - let awaitAt = -1; - - if (this.isAwaitAllowed() && this.eatContextual(90)) { - awaitAt = this.state.lastTokStart; + let awaitAt = null; + if (this.isAwaitAllowed() && this.eatContextual(96)) { + awaitAt = this.state.lastTokStartLoc; } - - this.scope.enter(SCOPE_OTHER); + this.scope.enter(0); this.expect(10); - if (this.match(13)) { - if (awaitAt > -1) { + if (awaitAt !== null) { this.unexpected(awaitAt); } - return this.parseFor(node, null); } - - const startsWithLet = this.isContextual(93); - const isLet = startsWithLet && this.isLetKeyword(); - - if (this.match(68) || this.match(69) || isLet) { - const init = this.startNode(); - const kind = isLet ? "let" : this.state.value; - this.next(); - this.parseVar(init, true, kind); - this.finishNode(init, "VariableDeclaration"); - - if ((this.match(52) || this.isContextual(95)) && init.declarations.length === 1) { - return this.parseForIn(node, init, awaitAt); + const startsWithLet = this.isContextual(100); + { + const startsWithAwaitUsing = this.isContextual(96) && this.startsAwaitUsing(); + const starsWithUsingDeclaration = startsWithAwaitUsing || this.isContextual(107) && this.startsUsingForOf(); + const isLetOrUsing = startsWithLet && this.hasFollowingBindingAtom() || starsWithUsingDeclaration; + if (this.match(74) || this.match(75) || isLetOrUsing) { + const initNode = this.startNode(); + let kind; + if (startsWithAwaitUsing) { + kind = "await using"; + if (!this.isAwaitAllowed()) { + this.raise(Errors.AwaitUsingNotInAsyncContext, { + at: this.state.startLoc + }); + } + this.next(); + } else { + kind = this.state.value; + } + this.next(); + this.parseVar(initNode, true, kind); + const init = this.finishNode(initNode, "VariableDeclaration"); + const isForIn = this.match(58); + if (isForIn && starsWithUsingDeclaration) { + this.raise(Errors.ForInUsing, { + at: init + }); + } + if ((isForIn || this.isContextual(102)) && init.declarations.length === 1) { + return this.parseForIn(node, init, awaitAt); + } + if (awaitAt !== null) { + this.unexpected(awaitAt); + } + return this.parseFor(node, init); } - - if (awaitAt > -1) { - this.unexpected(awaitAt); - } - - return this.parseFor(node, init); } - - const startsWithAsync = this.isContextual(89); + const startsWithAsync = this.isContextual(95); const refExpressionErrors = new ExpressionErrors(); const init = this.parseExpression(true, refExpressionErrors); - const isForOf = this.isContextual(95); - + const isForOf = this.isContextual(102); if (isForOf) { if (startsWithLet) { - this.raise(init.start, ErrorMessages.ForOfLet); - } else if (awaitAt === -1 && startsWithAsync && init.type === "Identifier") { - this.raise(init.start, ErrorMessages.ForOfAsync); + this.raise(Errors.ForOfLet, { + at: init + }); + } + if (awaitAt === null && startsWithAsync && init.type === "Identifier") { + this.raise(Errors.ForOfAsync, { + at: init + }); } } - - if (isForOf || this.match(52)) { + if (isForOf || this.match(58)) { + this.checkDestructuringPrivate(refExpressionErrors); this.toAssignable(init, true); - const description = isForOf ? "for-of statement" : "for-in statement"; - this.checkLVal(init, description); + const type = isForOf ? "ForOfStatement" : "ForInStatement"; + this.checkLVal(init, { + in: { + type + } + }); return this.parseForIn(node, init, awaitAt); } else { this.checkExpressionErrors(refExpressionErrors, true); } - - if (awaitAt > -1) { + if (awaitAt !== null) { this.unexpected(awaitAt); } - return this.parseFor(node, init); } - - parseFunctionStatement(node, isAsync, declarationPosition) { + parseFunctionStatement(node, isAsync, isHangingDeclaration) { this.next(); - return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync); + return this.parseFunction(node, 1 | (isHangingDeclaration ? 2 : 0) | (isAsync ? 8 : 0)); } - parseIfStatement(node) { this.next(); node.test = this.parseHeaderExpression(); - node.consequent = this.parseStatement("if"); - node.alternate = this.eat(60) ? this.parseStatement("if") : null; + node.consequent = this.parseStatementOrSloppyAnnexBFunctionDeclaration(); + node.alternate = this.eat(66) ? this.parseStatementOrSloppyAnnexBFunctionDeclaration() : null; return this.finishNode(node, "IfStatement"); } - parseReturnStatement(node) { if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) { - this.raise(this.state.start, ErrorMessages.IllegalReturn); + this.raise(Errors.IllegalReturn, { + at: this.state.startLoc + }); } - this.next(); - if (this.isLineTerminator()) { node.argument = null; } else { node.argument = this.parseExpression(); this.semicolon(); } - return this.finishNode(node, "ReturnStatement"); } - parseSwitchStatement(node) { this.next(); node.discriminant = this.parseHeaderExpression(); const cases = node.cases = []; this.expect(5); this.state.labels.push(switchLabel); - this.scope.enter(SCOPE_OTHER); + this.scope.enter(0); let cur; - for (let sawDefault; !this.match(8);) { - if (this.match(55) || this.match(59)) { - const isCase = this.match(55); + if (this.match(61) || this.match(65)) { + const isCase = this.match(61); if (cur) this.finishNode(cur, "SwitchCase"); cases.push(cur = this.startNode()); cur.consequent = []; this.next(); - if (isCase) { cur.test = this.parseExpression(); } else { if (sawDefault) { - this.raise(this.state.lastTokStart, ErrorMessages.MultipleDefaultsInSwitch); + this.raise(Errors.MultipleDefaultsInSwitch, { + at: this.state.lastTokStartLoc + }); } - sawDefault = true; cur.test = null; } - this.expect(14); } else { if (cur) { - cur.consequent.push(this.parseStatement(null)); + cur.consequent.push(this.parseStatementListItem()); } else { this.unexpected(); } } } - this.scope.exit(); if (cur) this.finishNode(cur, "SwitchCase"); this.next(); this.state.labels.pop(); return this.finishNode(node, "SwitchStatement"); } - parseThrowStatement(node) { this.next(); - if (this.hasPrecedingLineBreak()) { - this.raise(this.state.lastTokEnd, ErrorMessages.NewlineAfterThrow); + this.raise(Errors.NewlineAfterThrow, { + at: this.state.lastTokEndLoc + }); } - node.argument = this.parseExpression(); this.semicolon(); return this.finishNode(node, "ThrowStatement"); } - parseCatchClauseParam() { const param = this.parseBindingAtom(); - const simple = param.type === "Identifier"; - this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0); - this.checkLVal(param, "catch clause", BIND_LEXICAL); + this.scope.enter(this.options.annexB && param.type === "Identifier" ? 8 : 0); + this.checkLVal(param, { + in: { + type: "CatchClause" + }, + binding: 9 + }); return param; } - parseTryStatement(node) { this.next(); node.block = this.parseBlock(); node.handler = null; - - if (this.match(56)) { + if (this.match(62)) { const clause = this.startNode(); this.next(); - if (this.match(10)) { this.expect(10); clause.param = this.parseCatchClauseParam(); this.expect(11); } else { clause.param = null; - this.scope.enter(SCOPE_OTHER); + this.scope.enter(0); } - clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false)); this.scope.exit(); node.handler = this.finishNode(clause, "CatchClause"); } - - node.finalizer = this.eat(61) ? this.parseBlock() : null; - + node.finalizer = this.eat(67) ? this.parseBlock() : null; if (!node.handler && !node.finalizer) { - this.raise(node.start, ErrorMessages.NoCatchOrFinally); + this.raise(Errors.NoCatchOrFinally, { + at: node + }); } - return this.finishNode(node, "TryStatement"); } - - parseVarStatement(node, kind) { + parseVarStatement(node, kind, allowMissingInitializer = false) { this.next(); - this.parseVar(node, false, kind); + this.parseVar(node, false, kind, allowMissingInitializer); this.semicolon(); return this.finishNode(node, "VariableDeclaration"); } - parseWhileStatement(node) { this.next(); node.test = this.parseHeaderExpression(); this.state.labels.push(loopLabel); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("while")); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); this.state.labels.pop(); return this.finishNode(node, "WhileStatement"); } - parseWithStatement(node) { if (this.state.strict) { - this.raise(this.state.start, ErrorMessages.StrictWith); + this.raise(Errors.StrictWith, { + at: this.state.startLoc + }); } - this.next(); node.object = this.parseHeaderExpression(); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("with")); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); return this.finishNode(node, "WithStatement"); } - parseEmptyStatement(node) { this.next(); return this.finishNode(node, "EmptyStatement"); } - - parseLabeledStatement(node, maybeName, expr, context) { + parseLabeledStatement(node, maybeName, expr, flags) { for (const label of this.state.labels) { if (label.name === maybeName) { - this.raise(expr.start, ErrorMessages.LabelRedeclaration, maybeName); + this.raise(Errors.LabelRedeclaration, { + at: expr, + labelName: maybeName + }); } } - - const kind = tokenIsLoop(this.state.type) ? "loop" : this.match(65) ? "switch" : null; - + const kind = tokenIsLoop(this.state.type) ? "loop" : this.match(71) ? "switch" : null; for (let i = this.state.labels.length - 1; i >= 0; i--) { const label = this.state.labels[i]; - if (label.statementStart === node.start) { label.statementStart = this.state.start; label.kind = kind; @@ -14688,95 +15505,71 @@ class StatementParser extends ExpressionParser { break; } } - this.state.labels.push({ name: maybeName, kind: kind, statementStart: this.state.start }); - node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + node.body = flags & 8 ? this.parseStatementOrSloppyAnnexBFunctionDeclaration(true) : this.parseStatement(); this.state.labels.pop(); node.label = expr; return this.finishNode(node, "LabeledStatement"); } - - parseExpressionStatement(node, expr) { + parseExpressionStatement(node, expr, decorators) { node.expression = expr; this.semicolon(); return this.finishNode(node, "ExpressionStatement"); } - parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) { const node = this.startNode(); - if (allowDirectives) { this.state.strictErrors.clear(); } - this.expect(5); - if (createNewLexicalScope) { - this.scope.enter(SCOPE_OTHER); + this.scope.enter(0); } - this.parseBlockBody(node, allowDirectives, false, 8, afterBlockParse); - if (createNewLexicalScope) { this.scope.exit(); } - return this.finishNode(node, "BlockStatement"); } - isValidDirective(stmt) { return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized; } - parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) { const body = node.body = []; const directives = node.directives = []; this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse); } - parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) { const oldStrict = this.state.strict; let hasStrictModeDirective = false; let parsedNonDirective = false; - while (!this.match(end)) { - const stmt = this.parseStatement(null, topLevel); - + const stmt = topLevel ? this.parseModuleItem() : this.parseStatementListItem(); if (directives && !parsedNonDirective) { if (this.isValidDirective(stmt)) { const directive = this.stmtToDirective(stmt); directives.push(directive); - if (!hasStrictModeDirective && directive.value.value === "use strict") { hasStrictModeDirective = true; this.setStrict(true); } - continue; } - parsedNonDirective = true; this.state.strictErrors.clear(); } - body.push(stmt); } - - if (afterBlockParse) { - afterBlockParse.call(this, hasStrictModeDirective); - } - + afterBlockParse == null || afterBlockParse.call(this, hasStrictModeDirective); if (!oldStrict) { this.setStrict(false); } - this.next(); } - parseFor(node, init) { node.init = init; this.semicolon(false); @@ -14784,131 +15577,131 @@ class StatementParser extends ExpressionParser { this.semicolon(false); node.update = this.match(11) ? null : this.parseExpression(); this.expect(11); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("for")); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); this.scope.exit(); this.state.labels.pop(); return this.finishNode(node, "ForStatement"); } - parseForIn(node, init, awaitAt) { - const isForIn = this.match(52); + const isForIn = this.match(58); this.next(); - if (isForIn) { - if (awaitAt > -1) this.unexpected(awaitAt); + if (awaitAt !== null) this.unexpected(awaitAt); } else { - node.await = awaitAt > -1; + node.await = awaitAt !== null; } - - if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { - this.raise(init.start, ErrorMessages.ForInOfLoopInitializer, isForIn ? "for-in" : "for-of"); - } else if (init.type === "AssignmentPattern") { - this.raise(init.start, ErrorMessages.InvalidLhs, "for-loop"); + if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { + this.raise(Errors.ForInOfLoopInitializer, { + at: init, + type: isForIn ? "ForInStatement" : "ForOfStatement" + }); + } + if (init.type === "AssignmentPattern") { + this.raise(Errors.InvalidLhs, { + at: init, + ancestor: { + type: "ForStatement" + } + }); } - node.left = init; node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn(); this.expect(11); - node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("for")); + node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement()); this.scope.exit(); this.state.labels.pop(); return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); } - - parseVar(node, isFor, kind) { + parseVar(node, isFor, kind, allowMissingInitializer = false) { const declarations = node.declarations = []; - const isTypescript = this.hasPlugin("typescript"); node.kind = kind; - for (;;) { const decl = this.startNode(); this.parseVarId(decl, kind); - - if (this.eat(27)) { - decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); - } else { - if (kind === "const" && !(this.match(52) || this.isContextual(95))) { - if (!isTypescript) { - this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Const declarations"); - } - } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(52) || this.isContextual(95)))) { - this.raise(this.state.lastTokEnd, ErrorMessages.DeclarationMissingInitializer, "Complex binding patterns"); + decl.init = !this.eat(29) ? null : isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn(); + if (decl.init === null && !allowMissingInitializer) { + if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(102)))) { + this.raise(Errors.DeclarationMissingInitializer, { + at: this.state.lastTokEndLoc, + kind: "destructuring" + }); + } else if (kind === "const" && !(this.match(58) || this.isContextual(102))) { + this.raise(Errors.DeclarationMissingInitializer, { + at: this.state.lastTokEndLoc, + kind: "const" + }); } - - decl.init = null; } - declarations.push(this.finishNode(decl, "VariableDeclarator")); if (!this.eat(12)) break; } - return node; } - parseVarId(decl, kind) { - decl.id = this.parseBindingAtom(); - this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, kind !== "var"); + const id = this.parseBindingAtom(); + this.checkLVal(id, { + in: { + type: "VariableDeclarator" + }, + binding: kind === "var" ? 5 : 8201 + }); + decl.id = id; } - - parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) { - const isStatement = statement & FUNC_STATEMENT; - const isHangingStatement = statement & FUNC_HANGING_STATEMENT; - const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID); + parseAsyncFunctionExpression(node) { + return this.parseFunction(node, 8); + } + parseFunction(node, flags = 0) { + const hangingDeclaration = flags & 2; + const isDeclaration = !!(flags & 1); + const requireId = isDeclaration && !(flags & 4); + const isAsync = !!(flags & 8); this.initFunction(node, isAsync); - - if (this.match(49) && isHangingStatement) { - this.raise(this.state.start, ErrorMessages.GeneratorInSingleStatementContext); + if (this.match(55)) { + if (hangingDeclaration) { + this.raise(Errors.GeneratorInSingleStatementContext, { + at: this.state.startLoc + }); + } + this.next(); + node.generator = true; } - - node.generator = this.eat(49); - - if (isStatement) { + if (isDeclaration) { node.id = this.parseFunctionId(requireId); } - const oldMaybeInArrowParameters = this.state.maybeInArrowParameters; this.state.maybeInArrowParameters = false; - this.scope.enter(SCOPE_FUNCTION); + this.scope.enter(2); this.prodParam.enter(functionFlags(isAsync, node.generator)); - - if (!isStatement) { + if (!isDeclaration) { node.id = this.parseFunctionId(); } - this.parseFunctionParams(node, false); this.withSmartMixTopicForbiddingContext(() => { - this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); + this.parseFunctionBodyAndFinish(node, isDeclaration ? "FunctionDeclaration" : "FunctionExpression"); }); this.prodParam.exit(); this.scope.exit(); - - if (isStatement && !isHangingStatement) { + if (isDeclaration && !hangingDeclaration) { this.registerFunctionStatementId(node); } - this.state.maybeInArrowParameters = oldMaybeInArrowParameters; return node; } - parseFunctionId(requireId) { return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null; } - - parseFunctionParams(node, allowModifiers) { + parseFunctionParams(node, isConstructor) { this.expect(10); this.expressionScope.enter(newParameterDeclarationScope()); - node.params = this.parseBindingList(11, 41, false, allowModifiers); + node.params = this.parseBindingList(11, 41, 2 | (isConstructor ? 4 : 0)); this.expressionScope.exit(); } - registerFunctionStatementId(node) { if (!node.id) return; - this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, node.id.start); + this.scope.declareName(node.id.name, !this.options.annexB || this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? 5 : 8201 : 17, node.id.loc.start); } - parseClass(node, isStatement, optionalId) { this.next(); - this.takeDecorators(node); const oldStrict = this.state.strict; this.state.strict = true; this.parseClassId(node, isStatement, optionalId); @@ -14916,19 +15709,15 @@ class StatementParser extends ExpressionParser { node.body = this.parseClassBody(!!node.superClass, oldStrict); return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); } - isClassProperty() { - return this.match(27) || this.match(13) || this.match(8); + return this.match(29) || this.match(13) || this.match(8); } - isClassMethod() { return this.match(10); } - isNonstaticConstructor(method) { return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); } - parseClassBody(hadSuperClass, oldStrict) { this.classScope.enter(); const state = { @@ -14943,46 +15732,42 @@ class StatementParser extends ExpressionParser { while (!this.match(8)) { if (this.eat(13)) { if (decorators.length > 0) { - throw this.raise(this.state.lastTokEnd, ErrorMessages.DecoratorSemicolon); + throw this.raise(Errors.DecoratorSemicolon, { + at: this.state.lastTokEndLoc + }); } - continue; } - - if (this.match(24)) { + if (this.match(26)) { decorators.push(this.parseDecorator()); continue; } - const member = this.startNode(); - if (decorators.length) { member.decorators = decorators; this.resetStartLocationFromNode(member, decorators[0]); decorators = []; } - this.parseClassMember(classBody, member, state); - if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) { - this.raise(member.start, ErrorMessages.DecoratorConstructor); + this.raise(Errors.DecoratorConstructor, { + at: member + }); } } }); this.state.strict = oldStrict; this.next(); - if (decorators.length) { - throw this.raise(this.state.start, ErrorMessages.TrailingDecorator); + throw this.raise(Errors.TrailingDecorator, { + at: this.state.startLoc + }); } - this.classScope.exit(); return this.finishNode(classBody, "ClassBody"); } - parseClassMemberFromModifier(classBody, member) { const key = this.parseIdentifier(true); - if (this.isClassMethod()) { const method = member; method.kind = "method"; @@ -14999,88 +15784,76 @@ class StatementParser extends ExpressionParser { classBody.body.push(this.parseClassProperty(prop)); return true; } - this.resetPreviousNodeTrailingComments(key); return false; } - parseClassMember(classBody, member, state) { - const isStatic = this.isContextual(98); - + const isStatic = this.isContextual(106); if (isStatic) { if (this.parseClassMemberFromModifier(classBody, member)) { return; } - if (this.eat(5)) { this.parseClassStaticBlock(classBody, member); return; } } - this.parseClassMemberWithIsStatic(classBody, member, state, isStatic); } - parseClassMemberWithIsStatic(classBody, member, state, isStatic) { const publicMethod = member; const privateMethod = member; const publicProp = member; const privateProp = member; + const accessorProp = member; const method = publicMethod; const publicMember = publicMethod; member.static = isStatic; this.parsePropertyNamePrefixOperator(member); - - if (this.eat(49)) { + if (this.eat(55)) { method.kind = "method"; - const isPrivateName = this.match(128); + const isPrivateName = this.match(138); this.parseClassElementName(method); - if (isPrivateName) { this.pushClassPrivateMethod(classBody, privateMethod, true, false); return; } - if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsGenerator); + this.raise(Errors.ConstructorIsGenerator, { + at: publicMethod.key + }); } - this.pushClassMethod(classBody, publicMethod, true, false, false, false); return; } - const isContextual = tokenIsIdentifier(this.state.type) && !this.state.containsEsc; - const isPrivate = this.match(128); + const isPrivate = this.match(138); const key = this.parseClassElementName(member); - const maybeQuestionTokenStart = this.state.start; + const maybeQuestionTokenStartLoc = this.state.startLoc; this.parsePostMemberNameModifiers(publicMember); - if (this.isClassMethod()) { method.kind = "method"; - if (isPrivate) { this.pushClassPrivateMethod(classBody, privateMethod, false, false); return; } - const isConstructor = this.isNonstaticConstructor(publicMethod); let allowsDirectSuper = false; - if (isConstructor) { publicMethod.kind = "constructor"; - if (state.hadConstructor && !this.hasPlugin("typescript")) { - this.raise(key.start, ErrorMessages.DuplicateConstructor); + this.raise(Errors.DuplicateConstructor, { + at: key + }); } - if (isConstructor && this.hasPlugin("typescript") && member.override) { - this.raise(key.start, ErrorMessages.OverrideOnConstructor); + this.raise(Errors.OverrideOnConstructor, { + at: key + }); } - state.hadConstructor = true; allowsDirectSuper = state.hadSuperClass; } - this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper); } else if (this.isClassProperty()) { if (isPrivate) { @@ -15090,43 +15863,46 @@ class StatementParser extends ExpressionParser { } } else if (isContextual && key.name === "async" && !this.isLineTerminator()) { this.resetPreviousNodeTrailingComments(key); - const isGenerator = this.eat(49); - + const isGenerator = this.eat(55); if (publicMember.optional) { - this.unexpected(maybeQuestionTokenStart); + this.unexpected(maybeQuestionTokenStartLoc); } - method.kind = "method"; - const isPrivate = this.match(128); + const isPrivate = this.match(138); this.parseClassElementName(method); this.parsePostMemberNameModifiers(publicMember); - if (isPrivate) { this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true); } else { if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAsync); + this.raise(Errors.ConstructorIsAsync, { + at: publicMethod.key + }); } - this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); } - } else if (isContextual && (key.name === "get" || key.name === "set") && !(this.match(49) && this.isLineTerminator())) { + } else if (isContextual && (key.name === "get" || key.name === "set") && !(this.match(55) && this.isLineTerminator())) { this.resetPreviousNodeTrailingComments(key); method.kind = key.name; - const isPrivate = this.match(128); + const isPrivate = this.match(138); this.parseClassElementName(publicMethod); - if (isPrivate) { this.pushClassPrivateMethod(classBody, privateMethod, false, false); } else { if (this.isNonstaticConstructor(publicMethod)) { - this.raise(publicMethod.key.start, ErrorMessages.ConstructorIsAccessor); + this.raise(Errors.ConstructorIsAccessor, { + at: publicMethod.key + }); } - this.pushClassMethod(classBody, publicMethod, false, false, false, false); } - this.checkGetterSetterParams(publicMethod); + } else if (isContextual && key.name === "accessor" && !this.isLineTerminator()) { + this.expectPlugin("decoratorAutoAccessors"); + this.resetPreviousNodeTrailingComments(key); + const isPrivate = this.match(138); + this.parseClassElementName(publicProp); + this.pushClassAccessorProperty(classBody, accessorProp, isPrivate); } else if (this.isLineTerminator()) { if (isPrivate) { this.pushClassPrivateProperty(classBody, privateProp); @@ -15137,195 +15913,221 @@ class StatementParser extends ExpressionParser { this.unexpected(); } } - parseClassElementName(member) { const { type, - value, - start + value } = this.state; - - if ((type === 122 || type === 123) && member.static && value === "prototype") { - this.raise(start, ErrorMessages.StaticPrototype); + if ((type === 132 || type === 133) && member.static && value === "prototype") { + this.raise(Errors.StaticPrototype, { + at: this.state.startLoc + }); } - - if (type === 128) { + if (type === 138) { if (value === "constructor") { - this.raise(start, ErrorMessages.ConstructorClassPrivateField); + this.raise(Errors.ConstructorClassPrivateField, { + at: this.state.startLoc + }); } - const key = this.parsePrivateName(); member.key = key; return key; } - return this.parsePropertyName(member); } - parseClassStaticBlock(classBody, member) { var _member$decorators; - - this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER); + this.scope.enter(64 | 128 | 16); const oldLabels = this.state.labels; this.state.labels = []; - this.prodParam.enter(PARAM); + this.prodParam.enter(0); const body = member.body = []; this.parseBlockOrModuleBlockBody(body, undefined, false, 8); this.prodParam.exit(); this.scope.exit(); this.state.labels = oldLabels; classBody.body.push(this.finishNode(member, "StaticBlock")); - if ((_member$decorators = member.decorators) != null && _member$decorators.length) { - this.raise(member.start, ErrorMessages.DecoratorStaticBlock); + this.raise(Errors.DecoratorStaticBlock, { + at: member + }); } } - pushClassProperty(classBody, prop) { if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) { - this.raise(prop.key.start, ErrorMessages.ConstructorClassField); + this.raise(Errors.ConstructorClassField, { + at: prop.key + }); } - classBody.body.push(this.parseClassProperty(prop)); } - pushClassPrivateProperty(classBody, prop) { const node = this.parseClassPrivateProperty(prop); classBody.body.push(node); - this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.start); + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); + } + pushClassAccessorProperty(classBody, prop, isPrivate) { + if (!isPrivate && !prop.computed) { + const key = prop.key; + if (key.name === "constructor" || key.value === "constructor") { + this.raise(Errors.ConstructorClassField, { + at: key + }); + } + } + const node = this.parseClassAccessorProperty(prop); + classBody.body.push(node); + if (isPrivate) { + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); + } } - pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) { classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true)); } - pushClassPrivateMethod(classBody, method, isGenerator, isAsync) { const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true); classBody.body.push(node); - const kind = node.kind === "get" ? node.static ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node.kind === "set" ? node.static ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER; + const kind = node.kind === "get" ? node.static ? 6 : 2 : node.kind === "set" ? node.static ? 5 : 1 : 0; this.declareClassPrivateMethodInScope(node, kind); } - declareClassPrivateMethodInScope(node, kind) { - this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.start); + this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.loc.start); } - parsePostMemberNameModifiers(methodOrProp) {} - parseClassPrivateProperty(node) { this.parseInitializer(node); this.semicolon(); return this.finishNode(node, "ClassPrivateProperty"); } - parseClassProperty(node) { this.parseInitializer(node); this.semicolon(); return this.finishNode(node, "ClassProperty"); } - + parseClassAccessorProperty(node) { + this.parseInitializer(node); + this.semicolon(); + return this.finishNode(node, "ClassAccessorProperty"); + } parseInitializer(node) { - this.scope.enter(SCOPE_CLASS | SCOPE_SUPER); + this.scope.enter(64 | 16); this.expressionScope.enter(newExpressionScope()); - this.prodParam.enter(PARAM); - node.value = this.eat(27) ? this.parseMaybeAssignAllowIn() : null; + this.prodParam.enter(0); + node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null; this.expressionScope.exit(); this.prodParam.exit(); this.scope.exit(); } - - parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) { + parseClassId(node, isStatement, optionalId, bindingType = 8331) { if (tokenIsIdentifier(this.state.type)) { node.id = this.parseIdentifier(); - if (isStatement) { - this.checkLVal(node.id, "class name", bindingType); + this.declareNameFromIdentifier(node.id, bindingType); } } else { if (optionalId || !isStatement) { node.id = null; } else { - this.unexpected(null, ErrorMessages.MissingClassName); + throw this.raise(Errors.MissingClassName, { + at: this.state.startLoc + }); } } } - parseClassSuper(node) { - node.superClass = this.eat(75) ? this.parseExprSubscripts() : null; + node.superClass = this.eat(81) ? this.parseExprSubscripts() : null; } - - parseExport(node) { - const hasDefault = this.maybeParseExportDefaultSpecifier(node); + parseExport(node, decorators) { + const maybeDefaultIdentifier = this.parseMaybeImportPhase(node, true); + const hasDefault = this.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier); const parseAfterDefault = !hasDefault || this.eat(12); const hasStar = parseAfterDefault && this.eatExportStar(node); const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node); const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12)); const isFromRequired = hasDefault || hasStar; - if (hasStar && !hasNamespace) { if (hasDefault) this.unexpected(); + if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, { + at: node + }); + } this.parseExportFrom(node, true); return this.finishNode(node, "ExportAllDeclaration"); } - const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node); - - if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) { - throw this.unexpected(null, 5); + if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) { + this.unexpected(null, 5); + } + if (hasNamespace && parseAfterNamespace) { + this.unexpected(null, 98); } - let hasDeclaration; - if (isFromRequired || hasSpecifiers) { hasDeclaration = false; + if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, { + at: node + }); + } this.parseExportFrom(node, isFromRequired); } else { hasDeclaration = this.maybeParseExportDeclaration(node); } - if (isFromRequired || hasSpecifiers || hasDeclaration) { - this.checkExport(node, true, false, !!node.source); - return this.finishNode(node, "ExportNamedDeclaration"); + var _node2$declaration; + const node2 = node; + this.checkExport(node2, true, false, !!node2.source); + if (((_node2$declaration = node2.declaration) == null ? void 0 : _node2$declaration.type) === "ClassDeclaration") { + this.maybeTakeDecorators(decorators, node2.declaration, node2); + } else if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, { + at: node + }); + } + return this.finishNode(node2, "ExportNamedDeclaration"); } - - if (this.eat(59)) { - node.declaration = this.parseExportDefaultExpression(); - this.checkExport(node, true, true); - return this.finishNode(node, "ExportDefaultDeclaration"); + if (this.eat(65)) { + const node2 = node; + const decl = this.parseExportDefaultExpression(); + node2.declaration = decl; + if (decl.type === "ClassDeclaration") { + this.maybeTakeDecorators(decorators, decl, node2); + } else if (decorators) { + throw this.raise(Errors.UnsupportedDecoratorExport, { + at: node + }); + } + this.checkExport(node2, true, true); + return this.finishNode(node2, "ExportDefaultDeclaration"); } - - throw this.unexpected(null, 5); + this.unexpected(null, 5); } - eatExportStar(node) { - return this.eat(49); + return this.eat(55); } - - maybeParseExportDefaultSpecifier(node) { - if (this.isExportDefaultSpecifier()) { - this.expectPlugin("exportDefaultFrom"); - const specifier = this.startNode(); - specifier.exported = this.parseIdentifier(true); + maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier) { + if (maybeDefaultIdentifier || this.isExportDefaultSpecifier()) { + this.expectPlugin("exportDefaultFrom", maybeDefaultIdentifier == null ? void 0 : maybeDefaultIdentifier.loc.start); + const id = maybeDefaultIdentifier || this.parseIdentifier(true); + const specifier = this.startNodeAtNode(id); + specifier.exported = id; node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; return true; } - return false; } - maybeParseExportNamespaceSpecifier(node) { - if (this.isContextual(87)) { + if (this.isContextual(93)) { if (!node.specifiers) node.specifiers = []; - const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc); + const specifier = this.startNodeAt(this.state.lastTokStartLoc); this.next(); specifier.exported = this.parseModuleExportName(); node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier")); return true; } - return false; } - maybeParseExportNamedSpecifiers(node) { if (this.match(5)) { if (!node.specifiers) node.specifiers = []; @@ -15333,179 +16135,159 @@ class StatementParser extends ExpressionParser { node.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); node.source = null; node.declaration = null; - if (this.hasPlugin("importAssertions")) { node.assertions = []; } - return true; } - return false; } - maybeParseExportDeclaration(node) { if (this.shouldParseExportDeclaration()) { node.specifiers = []; node.source = null; - if (this.hasPlugin("importAssertions")) { node.assertions = []; } - node.declaration = this.parseExportDeclaration(node); return true; } - return false; } - isAsyncFunction() { - if (!this.isContextual(89)) return false; - const next = this.nextTokenStart(); - return !lineBreak.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function"); + if (!this.isContextual(95)) return false; + const next = this.nextTokenInLineStart(); + return this.isUnparsedContextual(next, "function"); } - parseExportDefaultExpression() { const expr = this.startNode(); - const isAsync = this.isAsyncFunction(); - - if (this.match(62) || isAsync) { + if (this.match(68)) { this.next(); - - if (isAsync) { - this.next(); - } - - return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync); - } else if (this.match(74)) { - return this.parseClass(expr, true, true); - } else if (this.match(24)) { - if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.raise(this.state.start, ErrorMessages.DecoratorBeforeExport); - } - - this.parseDecorators(false); - return this.parseClass(expr, true, true); - } else if (this.match(69) || this.match(68) || this.isLet()) { - throw this.raise(this.state.start, ErrorMessages.UnsupportedDefaultExport); - } else { - const res = this.parseMaybeAssignAllowIn(); - this.semicolon(); - return res; + return this.parseFunction(expr, 1 | 4); + } else if (this.isAsyncFunction()) { + this.next(); + this.next(); + return this.parseFunction(expr, 1 | 4 | 8); } + if (this.match(80)) { + return this.parseClass(expr, true, true); + } + if (this.match(26)) { + if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { + this.raise(Errors.DecoratorBeforeExport, { + at: this.state.startLoc + }); + } + return this.parseClass(this.maybeTakeDecorators(this.parseDecorators(false), this.startNode()), true, true); + } + if (this.match(75) || this.match(74) || this.isLet()) { + throw this.raise(Errors.UnsupportedDefaultExport, { + at: this.state.startLoc + }); + } + const res = this.parseMaybeAssignAllowIn(); + this.semicolon(); + return res; } - parseExportDeclaration(node) { - return this.parseStatement(null); + if (this.match(80)) { + const node = this.parseClass(this.startNode(), true, false); + return node; + } + return this.parseStatementListItem(); } - isExportDefaultSpecifier() { const { type } = this.state; - if (tokenIsIdentifier(type)) { - if (type === 89 && !this.state.containsEsc || type === 93) { + if (type === 95 && !this.state.containsEsc || type === 100) { return false; } - - if ((type === 120 || type === 119) && !this.state.containsEsc) { + if ((type === 130 || type === 129) && !this.state.containsEsc) { const { type: nextType } = this.lookahead(); - - if (tokenIsIdentifier(nextType) && nextType !== 91 || nextType === 5) { + if (tokenIsIdentifier(nextType) && nextType !== 98 || nextType === 5) { this.expectOnePlugin(["flow", "typescript"]); return false; } } - } else if (!this.match(59)) { + } else if (!this.match(65)) { return false; } - const next = this.nextTokenStart(); const hasFrom = this.isUnparsedContextual(next, "from"); - if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) { return true; } - - if (this.match(59) && hasFrom) { + if (this.match(65) && hasFrom) { const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4)); return nextAfterFrom === 34 || nextAfterFrom === 39; } - return false; } - parseExportFrom(node, expect) { - if (this.eatContextual(91)) { + if (this.eatContextual(98)) { node.source = this.parseImportSource(); this.checkExport(node); - const assertions = this.maybeParseImportAssertions(); - - if (assertions) { - node.assertions = assertions; - } + this.maybeParseImportAttributes(node); + this.checkJSONModuleImport(node); } else if (expect) { this.unexpected(); } - this.semicolon(); } - shouldParseExportDeclaration() { const { type } = this.state; - - if (type === 24) { + if (type === 26) { this.expectOnePlugin(["decorators", "decorators-legacy"]); - if (this.hasPlugin("decorators")) { - if (this.getPluginOption("decorators", "decoratorsBeforeExport")) { - this.unexpected(this.state.start, ErrorMessages.DecoratorBeforeExport); - } else { - return true; + if (this.getPluginOption("decorators", "decoratorsBeforeExport") === true) { + this.raise(Errors.DecoratorBeforeExport, { + at: this.state.startLoc + }); } + return true; } } - - return type === 68 || type === 69 || type === 62 || type === 74 || this.isLet() || this.isAsyncFunction(); + return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction(); } - checkExport(node, checkNames, isDefault, isFrom) { if (checkNames) { + var _node$specifiers; if (isDefault) { this.checkDuplicateExports(node, "default"); - if (this.hasPlugin("exportDefaultFrom")) { var _declaration$extra; - const declaration = node.declaration; - if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) { - this.raise(declaration.start, ErrorMessages.ExportDefaultFromAsIdentifier); + this.raise(Errors.ExportDefaultFromAsIdentifier, { + at: declaration + }); } } - } else if (node.specifiers && node.specifiers.length) { + } else if ((_node$specifiers = node.specifiers) != null && _node$specifiers.length) { for (const specifier of node.specifiers) { const { exported } = specifier; - const exportedName = exported.type === "Identifier" ? exported.name : exported.value; - this.checkDuplicateExports(specifier, exportedName); - + const exportName = exported.type === "Identifier" ? exported.name : exported.value; + this.checkDuplicateExports(specifier, exportName); if (!isFrom && specifier.local) { const { local } = specifier; - if (local.type !== "Identifier") { - this.raise(specifier.start, ErrorMessages.ExportBindingIsString, local.value, exportedName); + this.raise(Errors.ExportBindingIsString, { + at: specifier, + localName: local.value, + exportName + }); } else { - this.checkReservedWord(local.name, local.start, true, false); + this.checkReservedWord(local.name, local.loc.start, true, false); this.scope.checkLocalExport(local); } } @@ -15522,14 +16304,7 @@ class StatementParser extends ExpressionParser { } } } - - const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1]; - - if (currentContextDecorators.length) { - throw this.raise(node.start, ErrorMessages.UnsupportedDecoratorExport); - } } - checkDeclaration(node) { if (node.type === "Identifier") { this.checkDuplicateExports(node, node.name); @@ -15551,20 +16326,25 @@ class StatementParser extends ExpressionParser { this.checkDeclaration(node.left); } } - - checkDuplicateExports(node, name) { - if (this.exportedIdentifiers.has(name)) { - this.raise(node.start, name === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, name); + checkDuplicateExports(node, exportName) { + if (this.exportedIdentifiers.has(exportName)) { + if (exportName === "default") { + this.raise(Errors.DuplicateDefaultExport, { + at: node + }); + } else { + this.raise(Errors.DuplicateExport, { + at: node, + exportName + }); + } } - - this.exportedIdentifiers.add(name); + this.exportedIdentifiers.add(exportName); } - parseExportSpecifiers(isInTypeExport) { const nodes = []; let first = true; this.expect(5); - while (!this.eat(8)) { if (first) { first = false; @@ -15572,255 +16352,372 @@ class StatementParser extends ExpressionParser { this.expect(12); if (this.eat(8)) break; } - - const isMaybeTypeOnly = this.isContextual(120); - const isString = this.match(123); + const isMaybeTypeOnly = this.isContextual(130); + const isString = this.match(133); const node = this.startNode(); node.local = this.parseModuleExportName(); nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly)); } - return nodes; } - parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) { - if (this.eatContextual(87)) { + if (this.eatContextual(93)) { node.exported = this.parseModuleExportName(); } else if (isString) { node.exported = cloneStringLiteral(node.local); } else if (!node.exported) { node.exported = cloneIdentifier(node.local); } - return this.finishNode(node, "ExportSpecifier"); } - parseModuleExportName() { - if (this.match(123)) { + if (this.match(133)) { const result = this.parseStringLiteral(this.state.value); const surrogate = result.value.match(loneSurrogate); - if (surrogate) { - this.raise(result.start, ErrorMessages.ModuleExportNameHasLoneSurrogate, surrogate[0].charCodeAt(0).toString(16)); + this.raise(Errors.ModuleExportNameHasLoneSurrogate, { + at: result, + surrogateCharCode: surrogate[0].charCodeAt(0) + }); } - return result; } - return this.parseIdentifier(true); } - - parseImport(node) { - node.specifiers = []; - - if (!this.match(123)) { - const hasDefault = this.maybeParseDefaultImportSpecifier(node); - const parseNext = !hasDefault || this.eat(12); - const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); - if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); - this.expectContextual(91); + isJSONModuleImport(node) { + if (node.assertions != null) { + return node.assertions.some(({ + key, + value + }) => { + return value.value === "json" && (key.type === "Identifier" ? key.name === "type" : key.value === "type"); + }); } - - node.source = this.parseImportSource(); - const assertions = this.maybeParseImportAssertions(); - - if (assertions) { - node.assertions = assertions; - } else { - const attributes = this.maybeParseModuleAttributes(); - - if (attributes) { - node.attributes = attributes; + return false; + } + checkImportReflection(node) { + const { + specifiers + } = node; + const singleBindingType = specifiers.length === 1 ? specifiers[0].type : null; + if (node.phase === "source") { + if (singleBindingType !== "ImportDefaultSpecifier") { + this.raise(Errors.SourcePhaseImportRequiresDefault, { + at: specifiers[0].loc.start + }); + } + } else if (node.phase === "defer") { + if (singleBindingType !== "ImportNamespaceSpecifier") { + this.raise(Errors.DeferImportRequiresNamespace, { + at: specifiers[0].loc.start + }); + } + } else if (node.module) { + var _node$assertions; + if (singleBindingType !== "ImportDefaultSpecifier") { + this.raise(Errors.ImportReflectionNotBinding, { + at: specifiers[0].loc.start + }); + } + if (((_node$assertions = node.assertions) == null ? void 0 : _node$assertions.length) > 0) { + this.raise(Errors.ImportReflectionHasAssertion, { + at: node.specifiers[0].loc.start + }); } } - + } + checkJSONModuleImport(node) { + if (this.isJSONModuleImport(node) && node.type !== "ExportAllDeclaration") { + const { + specifiers + } = node; + if (specifiers != null) { + const nonDefaultNamedSpecifier = specifiers.find(specifier => { + let imported; + if (specifier.type === "ExportSpecifier") { + imported = specifier.local; + } else if (specifier.type === "ImportSpecifier") { + imported = specifier.imported; + } + if (imported !== undefined) { + return imported.type === "Identifier" ? imported.name !== "default" : imported.value !== "default"; + } + }); + if (nonDefaultNamedSpecifier !== undefined) { + this.raise(Errors.ImportJSONBindingNotDefault, { + at: nonDefaultNamedSpecifier.loc.start + }); + } + } + } + } + isPotentialImportPhase(isExport) { + if (isExport) return false; + return this.isContextual(105) || this.isContextual(97) || this.isContextual(127); + } + applyImportPhase(node, isExport, phase, loc) { + if (isExport) { + return; + } + if (phase === "module") { + this.expectPlugin("importReflection", loc); + node.module = true; + } else if (this.hasPlugin("importReflection")) { + node.module = false; + } + if (phase === "source") { + this.expectPlugin("sourcePhaseImports", loc); + node.phase = "source"; + } else if (phase === "defer") { + this.expectPlugin("deferredImportEvaluation", loc); + node.phase = "defer"; + } else if (this.hasPlugin("sourcePhaseImports")) { + node.phase = null; + } + } + parseMaybeImportPhase(node, isExport) { + if (!this.isPotentialImportPhase(isExport)) { + this.applyImportPhase(node, isExport, null); + return null; + } + const phaseIdentifier = this.parseIdentifier(true); + const { + type + } = this.state; + const isImportPhase = tokenIsKeywordOrIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; + if (isImportPhase) { + this.resetPreviousIdentifierLeadingComments(phaseIdentifier); + this.applyImportPhase(node, isExport, phaseIdentifier.name, phaseIdentifier.loc.start); + return null; + } else { + this.applyImportPhase(node, isExport, null); + return phaseIdentifier; + } + } + isPrecedingIdImportPhase(phase) { + const { + type + } = this.state; + return tokenIsIdentifier(type) ? type !== 98 || this.lookaheadCharCode() === 102 : type !== 12; + } + parseImport(node) { + if (this.match(133)) { + return this.parseImportSourceAndAttributes(node); + } + return this.parseImportSpecifiersAndAfter(node, this.parseMaybeImportPhase(node, false)); + } + parseImportSpecifiersAndAfter(node, maybeDefaultIdentifier) { + node.specifiers = []; + const hasDefault = this.maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier); + const parseNext = !hasDefault || this.eat(12); + const hasStar = parseNext && this.maybeParseStarImportSpecifier(node); + if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node); + this.expectContextual(98); + return this.parseImportSourceAndAttributes(node); + } + parseImportSourceAndAttributes(node) { + var _node$specifiers2; + (_node$specifiers2 = node.specifiers) != null ? _node$specifiers2 : node.specifiers = []; + node.source = this.parseImportSource(); + this.maybeParseImportAttributes(node); + this.checkImportReflection(node); + this.checkJSONModuleImport(node); this.semicolon(); return this.finishNode(node, "ImportDeclaration"); } - parseImportSource() { - if (!this.match(123)) this.unexpected(); + if (!this.match(133)) this.unexpected(); return this.parseExprAtom(); } - - shouldParseDefaultImport(node) { - return tokenIsIdentifier(this.state.type); - } - - parseImportSpecifierLocal(node, specifier, type, contextDescription) { + parseImportSpecifierLocal(node, specifier, type) { specifier.local = this.parseIdentifier(); - this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL); - node.specifiers.push(this.finishNode(specifier, type)); + node.specifiers.push(this.finishImportSpecifier(specifier, type)); } - - parseAssertEntries() { + finishImportSpecifier(specifier, type, bindingType = 8201) { + this.checkLVal(specifier.local, { + in: { + type + }, + binding: bindingType + }); + return this.finishNode(specifier, type); + } + parseImportAttributes() { + this.expect(5); const attrs = []; const attrNames = new Set(); - do { if (this.match(8)) { break; } - const node = this.startNode(); const keyName = this.state.value; - if (attrNames.has(keyName)) { - this.raise(this.state.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, keyName); + this.raise(Errors.ModuleAttributesWithDuplicateKeys, { + at: this.state.startLoc, + key: keyName + }); } - attrNames.add(keyName); - - if (this.match(123)) { + if (this.match(133)) { node.key = this.parseStringLiteral(keyName); } else { node.key = this.parseIdentifier(true); } - this.expect(14); - - if (!this.match(123)) { - throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue); + if (!this.match(133)) { + throw this.raise(Errors.ModuleAttributeInvalidValue, { + at: this.state.startLoc + }); } - node.value = this.parseStringLiteral(this.state.value); - this.finishNode(node, "ImportAttribute"); - attrs.push(node); + attrs.push(this.finishNode(node, "ImportAttribute")); } while (this.eat(12)); - + this.expect(8); return attrs; } - - maybeParseModuleAttributes() { - if (this.match(70) && !this.hasPrecedingLineBreak()) { - this.expectPlugin("moduleAttributes"); - this.next(); - } else { - if (this.hasPlugin("moduleAttributes")) return []; - return null; - } - + parseModuleAttributes() { const attrs = []; const attributes = new Set(); - do { const node = this.startNode(); node.key = this.parseIdentifier(true); - if (node.key.name !== "type") { - this.raise(node.key.start, ErrorMessages.ModuleAttributeDifferentFromType, node.key.name); + this.raise(Errors.ModuleAttributeDifferentFromType, { + at: node.key + }); } - if (attributes.has(node.key.name)) { - this.raise(node.key.start, ErrorMessages.ModuleAttributesWithDuplicateKeys, node.key.name); + this.raise(Errors.ModuleAttributesWithDuplicateKeys, { + at: node.key, + key: node.key.name + }); } - attributes.add(node.key.name); this.expect(14); - - if (!this.match(123)) { - throw this.unexpected(this.state.start, ErrorMessages.ModuleAttributeInvalidValue); + if (!this.match(133)) { + throw this.raise(Errors.ModuleAttributeInvalidValue, { + at: this.state.startLoc + }); } - node.value = this.parseStringLiteral(this.state.value); - this.finishNode(node, "ImportAttribute"); - attrs.push(node); + attrs.push(this.finishNode(node, "ImportAttribute")); } while (this.eat(12)); - return attrs; } - - maybeParseImportAssertions() { - if (this.isContextual(88) && !this.hasPrecedingLineBreak()) { - this.expectPlugin("importAssertions"); + maybeParseImportAttributes(node) { + let attributes; + let useWith = false; + if (this.match(76)) { + if (this.hasPrecedingLineBreak() && this.lookaheadCharCode() === 40) { + return; + } this.next(); + { + if (this.hasPlugin("moduleAttributes")) { + attributes = this.parseModuleAttributes(); + } else { + this.expectImportAttributesPlugin(); + attributes = this.parseImportAttributes(); + } + } + useWith = true; + } else if (this.isContextual(94) && !this.hasPrecedingLineBreak()) { + if (this.hasPlugin("importAttributes")) { + if (this.getPluginOption("importAttributes", "deprecatedAssertSyntax") !== true) { + this.raise(Errors.ImportAttributesUseAssert, { + at: this.state.startLoc + }); + } + this.addExtra(node, "deprecatedAssertSyntax", true); + } else { + this.expectOnePlugin(["importAttributes", "importAssertions"]); + } + this.next(); + attributes = this.parseImportAttributes(); + } else if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { + attributes = []; } else { - if (this.hasPlugin("importAssertions")) return []; - return null; + if (this.hasPlugin("moduleAttributes")) { + attributes = []; + } else return; + } + if (!useWith && this.hasPlugin("importAssertions")) { + node.assertions = attributes; + } else { + node.attributes = attributes; } - - this.eat(5); - const attrs = this.parseAssertEntries(); - this.eat(8); - return attrs; } - - maybeParseDefaultImportSpecifier(node) { - if (this.shouldParseDefaultImport(node)) { - this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier"); + maybeParseDefaultImportSpecifier(node, maybeDefaultIdentifier) { + if (maybeDefaultIdentifier) { + const specifier = this.startNodeAtNode(maybeDefaultIdentifier); + specifier.local = maybeDefaultIdentifier; + node.specifiers.push(this.finishImportSpecifier(specifier, "ImportDefaultSpecifier")); + return true; + } else if (tokenIsKeywordOrIdentifier(this.state.type)) { + this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier"); return true; } - return false; } - maybeParseStarImportSpecifier(node) { - if (this.match(49)) { + if (this.match(55)) { const specifier = this.startNode(); this.next(); - this.expectContextual(87); - this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier"); + this.expectContextual(93); + this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier"); return true; } - return false; } - parseNamedImportSpecifiers(node) { let first = true; this.expect(5); - while (!this.eat(8)) { if (first) { first = false; } else { if (this.eat(14)) { - throw this.raise(this.state.start, ErrorMessages.DestructureNamedImport); + throw this.raise(Errors.DestructureNamedImport, { + at: this.state.startLoc + }); } - this.expect(12); if (this.eat(8)) break; } - const specifier = this.startNode(); - const importedIsString = this.match(123); - const isMaybeTypeOnly = this.isContextual(120); + const importedIsString = this.match(133); + const isMaybeTypeOnly = this.isContextual(130); specifier.imported = this.parseModuleExportName(); - const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly); + const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly, undefined); node.specifiers.push(importSpecifier); } } - - parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) { - if (this.eatContextual(87)) { + parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) { + if (this.eatContextual(93)) { specifier.local = this.parseIdentifier(); } else { const { imported } = specifier; - if (importedIsString) { - throw this.raise(specifier.start, ErrorMessages.ImportBindingIsString, imported.value); + throw this.raise(Errors.ImportBindingIsString, { + at: specifier, + importName: imported.value + }); } - - this.checkReservedWord(imported.name, specifier.start, true, true); - + this.checkReservedWord(imported.name, specifier.loc.start, true, true); if (!specifier.local) { specifier.local = cloneIdentifier(imported); } } - - this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL); - return this.finishNode(specifier, "ImportSpecifier"); + return this.finishImportSpecifier(specifier, "ImportSpecifier", bindingType); } - isThisParam(param) { return param.type === "Identifier" && param.name === "this"; } - } - -class Parser extends StatementParser { +let Parser$2 = class Parser extends StatementParser { constructor(options, input) { options = getOptions(options); super(options, input); @@ -15829,11 +16726,9 @@ class Parser extends StatementParser { this.plugins = pluginsMap(this.options.plugins); this.filename = options.sourceFilename; } - getScopeHandler() { return ScopeHandler; } - parse() { this.enterInitialScopes(); const file = this.startNode(); @@ -15844,35 +16739,26 @@ class Parser extends StatementParser { file.errors = this.state.errors; return file; } - -} - +}; function pluginsMap(plugins) { const pluginMap = new Map(); - for (const plugin of plugins) { const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}]; if (!pluginMap.has(name)) pluginMap.set(name, options || {}); } - return pluginMap; } - -function parse(input, options) { +function parse$9(input, options) { var _options; - if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") { options = Object.assign({}, options); - try { options.sourceType = "module"; const parser = getParser(options, input); const ast = parser.parse(); - if (parser.sawUnambiguousESM) { return ast; } - if (parser.ambiguousScriptDifferentAst) { try { options.sourceType = "script"; @@ -15881,14 +16767,12 @@ function parse(input, options) { } else { ast.program.sourceType = "script"; } - return ast; } catch (moduleError) { try { options.sourceType = "script"; return getParser(options, input).parse(); } catch (_unused2) {} - throw moduleError; } } else { @@ -15897,1909 +16781,2107 @@ function parse(input, options) { } function parseExpression(input, options) { const parser = getParser(options, input); - if (parser.options.strictMode) { parser.state.strict = true; } - return parser.getExpression(); } - function generateExportedTokenTypes(internalTokenTypes) { const tokenTypes = {}; - for (const typeName of Object.keys(internalTokenTypes)) { tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]); } - return tokenTypes; } - const tokTypes = generateExportedTokenTypes(tt); - function getParser(options, input) { - let cls = Parser; - + let cls = Parser$2; if (options != null && options.plugins) { validatePlugins(options.plugins); cls = getParserClass(options.plugins); } - return new cls(options, input); } - const parserClassCache = {}; - function getParserClass(pluginsFromOptions) { const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name)); const key = pluginList.join("/"); let cls = parserClassCache[key]; - if (!cls) { - cls = Parser; - + cls = Parser$2; for (const plugin of pluginList) { cls = mixinPlugins[plugin](cls); } - parserClassCache[key] = cls; } - return cls; } +var parse_1$1 = lib.parse = parse$9; +var parseExpression_1 = lib.parseExpression = parseExpression; +lib.tokTypes = tokTypes; -var parse_1 = parse; -var parseExpression_1 = parseExpression; -var tokTypes_1 = tokTypes; -//# sourceMappingURL=index.js.map +// @ts-check +/** @typedef { import('estree').BaseNode} BaseNode */ -/*#__PURE__*/Object.defineProperty({ - parse: parse_1, - parseExpression: parseExpression_1, - tokTypes: tokTypes_1 -}, '__esModule', {value: true}); +/** @typedef {{ + skip: () => void; + remove: () => void; + replace: (node: BaseNode) => void; +}} WalkerContext */ -const isStaticExp = (p) => p.type === 4 /* SIMPLE_EXPRESSION */ && p.isStatic; -const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected); +class WalkerBase { + constructor() { + /** @type {boolean} */ + this.should_skip = false; + + /** @type {boolean} */ + this.should_remove = false; + + /** @type {BaseNode | null} */ + this.replacement = null; + + /** @type {WalkerContext} */ + this.context = { + skip: () => (this.should_skip = true), + remove: () => (this.should_remove = true), + replace: (node) => (this.replacement = node) + }; + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + * @param {BaseNode} node + */ + replace(parent, prop, index, node) { + if (parent) { + if (index !== null) { + parent[prop][index] = node; + } else { + parent[prop] = node; + } + } + } + + /** + * + * @param {any} parent + * @param {string} prop + * @param {number} index + */ + remove(parent, prop, index) { + if (parent) { + if (index !== null) { + parent[prop].splice(index, 1); + } else { + delete parent[prop]; + } + } + } +} + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ + +/** @typedef {( + * this: WalkerContext, + * node: BaseNode, + * parent: BaseNode, + * key: string, + * index: number + * ) => void} SyncHandler */ + +class SyncWalker extends WalkerBase { + /** + * + * @param {SyncHandler} enter + * @param {SyncHandler} leave + */ + constructor(enter, leave) { + super(); + + /** @type {SyncHandler} */ + this.enter = enter; + + /** @type {SyncHandler} */ + this.leave = leave; + } + + /** + * + * @param {BaseNode} node + * @param {BaseNode} parent + * @param {string} [prop] + * @param {number} [index] + * @returns {BaseNode} + */ + visit(node, parent, prop, index) { + if (node) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + + this.enter.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const skipped = this.should_skip; + const removed = this.should_remove; + + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + + if (skipped) return node; + if (removed) return null; + } + + for (const key in node) { + const value = node[key]; + + if (typeof value !== "object") { + continue; + } else if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + if (value[i] !== null && typeof value[i].type === 'string') { + if (!this.visit(value[i], node, key, i)) { + // removed + i--; + } + } + } + } else if (value !== null && typeof value.type === "string") { + this.visit(value, node, key, null); + } + } + + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + + this.leave.call(this.context, node, parent, prop, index); + + if (this.replacement) { + node = this.replacement; + this.replace(parent, prop, index, node); + } + + if (this.should_remove) { + this.remove(parent, prop, index); + } + + const removed = this.should_remove; + + this.replacement = _replacement; + this.should_remove = _should_remove; + + if (removed) return null; + } + } + + return node; + } +} + +// @ts-check + +/** @typedef { import('estree').BaseNode} BaseNode */ +/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ +/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ + +/** + * + * @param {BaseNode} ast + * @param {{ + * enter?: SyncHandler + * leave?: SyncHandler + * }} walker + * @returns {BaseNode} + */ +function walk$2(ast, { enter, leave }) { + const instance = new SyncWalker(enter, leave); + return instance.visit(ast, null); +} + +function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) { + const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root; + walk$2(root, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) { + return this.skip(); + } + if (node.type === "Identifier") { + const isLocal = !!knownIds[node.name]; + const isRefed = isReferencedIdentifier(node, parent, parentStack); + if (includeAll || isRefed && !isLocal) { + onIdentifier(node, parent, parentStack, isRefed, isLocal); + } + } else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") { + node.inPattern = true; + } else if (isFunctionType(node)) { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkFunctionParams( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } else if (node.type === "BlockStatement") { + if (node.scopeIds) { + node.scopeIds.forEach((id) => markKnownIds(id, knownIds)); + } else { + walkBlockDeclarations( + node, + (id) => markScopeIdentifier(node, id, knownIds) + ); + } + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node !== rootExp && node.scopeIds) { + for (const id of node.scopeIds) { + knownIds[id]--; + if (knownIds[id] === 0) { + delete knownIds[id]; + } + } + } + } + }); +} +function isReferencedIdentifier(id, parent, parentStack) { + if (!parent) { + return true; + } + if (id.name === "arguments") { + return false; + } + if (isReferenced(id, parent)) { + return true; + } + switch (parent.type) { + case "AssignmentExpression": + case "AssignmentPattern": + return true; + case "ObjectPattern": + case "ArrayPattern": + return isInDestructureAssignment(parent, parentStack); + } + return false; +} +function isInDestructureAssignment(parent, parentStack) { + if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "AssignmentExpression") { + return true; + } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) { + break; + } + } + } + return false; +} +function isInNewExpression(parentStack) { + let i = parentStack.length; + while (i--) { + const p = parentStack[i]; + if (p.type === "NewExpression") { + return true; + } else if (p.type !== "MemberExpression") { + break; + } + } + return false; +} +function walkFunctionParams(node, onIdent) { + for (const p of node.params) { + for (const id of extractIdentifiers$1(p)) { + onIdent(id); + } + } +} +function walkBlockDeclarations(block, onIdent) { + for (const stmt of block.body) { + if (stmt.type === "VariableDeclaration") { + if (stmt.declare) + continue; + for (const decl of stmt.declarations) { + for (const id of extractIdentifiers$1(decl.id)) { + onIdent(id); + } + } + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) + continue; + onIdent(stmt.id); + } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") { + const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left; + if (variable && variable.type === "VariableDeclaration") { + for (const decl of variable.declarations) { + for (const id of extractIdentifiers$1(decl.id)) { + onIdent(id); + } + } + } + } + } +} +function extractIdentifiers$1(param, nodes = []) { + switch (param.type) { + case "Identifier": + nodes.push(param); + break; + case "MemberExpression": + let object = param; + while (object.type === "MemberExpression") { + object = object.object; + } + nodes.push(object); + break; + case "ObjectPattern": + for (const prop of param.properties) { + if (prop.type === "RestElement") { + extractIdentifiers$1(prop.argument, nodes); + } else { + extractIdentifiers$1(prop.value, nodes); + } + } + break; + case "ArrayPattern": + param.elements.forEach((element) => { + if (element) + extractIdentifiers$1(element, nodes); + }); + break; + case "RestElement": + extractIdentifiers$1(param.argument, nodes); + break; + case "AssignmentPattern": + extractIdentifiers$1(param.left, nodes); + break; + } + return nodes; +} +function markKnownIds(name, knownIds) { + if (name in knownIds) { + knownIds[name]++; + } else { + knownIds[name] = 1; + } +} +function markScopeIdentifier(node, child, knownIds) { + const { name } = child; + if (node.scopeIds && node.scopeIds.has(name)) { + return; + } + markKnownIds(name, knownIds); + (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name); +} +const isFunctionType = (node) => { + return /Function(?:Expression|Declaration)$|Method$/.test(node.type); +}; +const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed; +const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; +function isReferenced(node, parent, grandparent) { + switch (parent.type) { + case "MemberExpression": + case "OptionalMemberExpression": + if (parent.property === node) { + return !!parent.computed; + } + return parent.object === node; + case "JSXMemberExpression": + return parent.object === node; + case "VariableDeclarator": + return parent.init === node; + case "ArrowFunctionExpression": + return parent.body === node; + case "PrivateName": + return false; + case "ClassMethod": + case "ClassPrivateMethod": + case "ObjectMethod": + if (parent.key === node) { + return !!parent.computed; + } + return false; + case "ObjectProperty": + if (parent.key === node) { + return !!parent.computed; + } + return !grandparent || grandparent.type !== "ObjectPattern"; + case "ClassProperty": + if (parent.key === node) { + return !!parent.computed; + } + return true; + case "ClassPrivateProperty": + return parent.key !== node; + case "ClassDeclaration": + case "ClassExpression": + return parent.superClass === node; + case "AssignmentExpression": + return parent.right === node; + case "AssignmentPattern": + return parent.right === node; + case "LabeledStatement": + return false; + case "CatchClause": + return false; + case "RestElement": + return false; + case "BreakStatement": + case "ContinueStatement": + return false; + case "FunctionDeclaration": + case "FunctionExpression": + return false; + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return false; + case "ExportSpecifier": + if (grandparent == null ? void 0 : grandparent.source) { + return false; + } + return parent.local === node; + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return false; + case "ImportAttribute": + return false; + case "JSXAttribute": + return false; + case "ObjectPattern": + case "ArrayPattern": + return false; + case "MetaProperty": + return false; + case "ObjectTypeProperty": + return parent.key !== node; + case "TSEnumMember": + return parent.id !== node; + case "TSPropertySignature": + if (parent.key === node) { + return !!parent.computed; + } + return true; + } + return true; +} +const TS_NODE_TYPES = [ + "TSAsExpression", + // foo as number + "TSTypeAssertion", + // (<number>foo) + "TSNonNullExpression", + // foo! + "TSInstantiationExpression", + // foo<string> + "TSSatisfiesExpression" + // foo satisfies T +]; +function unwrapTSNode(node) { + if (TS_NODE_TYPES.includes(node.type)) { + return unwrapTSNode(node.expression); + } else { + return node; + } +} + +const isStaticExp = (p) => p.type === 4 && p.isStatic; function isCoreComponent(tag) { - if (isBuiltInType(tag, 'Teleport')) { - return TELEPORT; - } - else if (isBuiltInType(tag, 'Suspense')) { - return SUSPENSE; - } - else if (isBuiltInType(tag, 'KeepAlive')) { - return KEEP_ALIVE; - } - else if (isBuiltInType(tag, 'BaseTransition')) { - return BASE_TRANSITION; - } + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } } const nonIdentifierRE = /^\d|[^\$\w]/; const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -/** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ const isMemberExpressionBrowser = (path) => { - // remove whitespaces around . or [ first - path = path.trim().replace(whitespaceRE, s => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === '[') { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } - else if (char === '(') { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } - else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `[`) { - currentOpenBracketCount++; - } - else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `(`) { - currentOpenParensCount++; - } - else if (char === `)`) { - // if the exp ends as a call then it should not be considered valid - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; + path = path.trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; } - return !currentOpenBracketCount && !currentOpenParensCount; + } + return !currentOpenBracketCount && !currentOpenParensCount; }; const isMemberExpressionNode = (path, context) => { - try { - let ret = parseExpression_1(path, { - plugins: context.expressionPlugins - }); - if (ret.type === 'TSAsExpression' || ret.type === 'TSTypeAssertion') { - ret = ret.expression; - } - return (ret.type === 'MemberExpression' || - ret.type === 'OptionalMemberExpression' || - ret.type === 'Identifier'); - } - catch (e) { - return false; - } - }; + try { + let ret = parseExpression_1(path, { + plugins: context.expressionPlugins + }); + ret = unwrapTSNode(ret); + return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined"; + } catch (e) { + return false; + } +}; const isMemberExpression = isMemberExpressionNode; -function getInnerRange(loc, offset, length) { - const source = loc.source.slice(offset, offset + length); - const newLoc = { - source, - start: advancePositionWithClone(loc.start, loc.source, offset), - end: loc.end - }; - if (length != null) { - newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length); - } - return newLoc; -} function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation(extend({}, pos), source, numberOfCharacters); + return advancePositionWithMutation( + { + offset: pos.offset, + line: pos.line, + column: pos.column + }, + source, + numberOfCharacters + ); } -// advance by mutation without cloning (for performance reasons), since this -// gets called a lot in the parser function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10 /* newline char code */) { - linesCount++; - lastNewLinePos = i; - } + let linesCount = 0; + let lastNewLinePos = -1; + for (let i = 0; i < numberOfCharacters; i++) { + if (source.charCodeAt(i) === 10) { + linesCount++; + lastNewLinePos = i; } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = - lastNewLinePos === -1 - ? pos.column + numberOfCharacters - : numberOfCharacters - lastNewLinePos; - return pos; + } + pos.offset += numberOfCharacters; + pos.line += linesCount; + pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos; + return pos; } -function assert$1(condition, msg) { - /* istanbul ignore if */ - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } +function assert(condition, msg) { + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } } function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (allowEmpty || p.exp) && - (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString$2(name) ? p.name === name : name.test(p.name))) { + return p; } + } } function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (dynamicOnly) - continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } - else if (p.name === 'bind' && - (p.exp || allowEmpty) && - isStaticArgOf(p.arg, name)) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) + continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; } + } } function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); + return !!(arg && isStaticExp(arg) && arg.content === name); } function hasDynamicKeyVBind(node) { - return node.props.some(p => p.type === 7 /* DIRECTIVE */ && - p.name === 'bind' && - (!p.arg || // v-bind="obj" - p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo] - !p.arg.isStatic) // v-bind:[foo] - ); + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); } -function isText(node) { - return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */; +function isText$1(node) { + return node.type === 5 || node.type === 2; } function isVSlot(p) { - return p.type === 7 /* DIRECTIVE */ && p.name === 'slot'; + return p.type === 7 && p.name === "slot"; } function isTemplateNode(node) { - return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */); + return node.type === 1 && node.tagType === 3; } function isSlotOutlet(node) { - return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */; + return node.type === 1 && node.tagType === 2; } -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); function getUnnormalizedProps(props, callPath = []) { - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps(props.arguments[0], callPath.concat(props)); - } + if (props && !isString$2(props) && props.type === 14) { + const callee = props.callee; + if (!isString$2(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); } - return [props, callPath]; + } + return [props, callPath]; } function injectProp(node, prop, context) { - let propsWithInjection; - /** - * 1. mergeProps(...) - * 2. toHandlers(...) - * 3. normalizeProps(...) - * 4. normalizeProps(guardReactiveProps(...)) - * - * we need to get the real props before normalization - */ - let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } - else if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // merged props... add ours - // only inject key to object literal if it's the first argument so that - // if doesn't override user provided keys - const first = props.arguments[0]; - if (!isString(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) { - first.properties.unshift(prop); - } - else { - if (props.callee === TO_HANDLERS) { - // #2366 - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } - else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } - else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) { - let alreadyExists = false; - // check existing key to avoid overriding user provided keys - if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) { - const propKeyName = prop.key.content; - alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === propKeyName); - } - if (!alreadyExists) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } - else { - // single v-bind with expression, return a merged replacement + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString$2(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString$2(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString$2(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props + createObjectExpression([prop]), + props ]); - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`, - // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`, - // the `guardReactiveProps` will no longer be needed - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } + } else { + props.arguments.unshift(createObjectExpression([prop])); + } } - if (node.type === 13 /* VNODE_CALL */) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.props = propsWithInjection; - } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); } - else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.arguments[2] = propsWithInjection; - } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; } function toValidAssetId(name, type) { - // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString(); - })}`; + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; } -// Check if a node contains expressions that reference current context scope ids function hasScopeRef(node, ids) { - if (!node || Object.keys(ids).length === 0) { - return false; - } - switch (node.type) { - case 1 /* ELEMENT */: - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { - return true; - } - } - return node.children.some(c => hasScopeRef(c, ids)); - case 11 /* FOR */: - if (hasScopeRef(node.source, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 9 /* IF */: - return node.branches.some(b => hasScopeRef(b, ids)); - case 10 /* IF_BRANCH */: - if (hasScopeRef(node.condition, ids)) { - return true; - } - return node.children.some(c => hasScopeRef(c, ids)); - case 4 /* SIMPLE_EXPRESSION */: - return (!node.isStatic && - isSimpleIdentifier(node.content) && - !!ids[node.content]); - case 8 /* COMPOUND_EXPRESSION */: - return node.children.some(c => isObject(c) && hasScopeRef(c, ids)); - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return hasScopeRef(node.content, ids); - case 2 /* TEXT */: - case 3 /* COMMENT */: - return false; - default: - return false; - } + if (!node || Object.keys(ids).length === 0) { + return false; + } + switch (node.type) { + case 1: + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) { + return true; + } + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 11: + if (hasScopeRef(node.source, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 9: + return node.branches.some((b) => hasScopeRef(b, ids)); + case 10: + if (hasScopeRef(node.condition, ids)) { + return true; + } + return node.children.some((c) => hasScopeRef(c, ids)); + case 4: + return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content]; + case 8: + return node.children.some((c) => isObject$2(c) && hasScopeRef(c, ids)); + case 5: + case 12: + return hasScopeRef(node.content, ids); + case 2: + case 3: + return false; + default: + return false; + } } function getMemoedVNodeCall(node) { - if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } - else { - return node; - } -} -function makeBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } } +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: { - message: `Platform-native elements with "is" prop will no longer be ` + - `treated as components in Vue 3 unless the "is" value is explicitly ` + - `prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: { - message: key => `.sync modifier for v-bind has been removed. Use v-model with ` + - `argument instead. \`v-bind:${key}.sync\` should be changed to ` + - `\`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: { - message: `.prop modifier for v-bind has been removed and no longer necessary. ` + - `Vue 3 will automatically set a binding as DOM property when appropriate.` - }, - ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` + - `object spread: it will now overwrite an existing non-mergeable attribute ` + - `that appears before v-bind in the case of conflict. ` + - `To retain 2.x behavior, move v-bind to make it the first attribute. ` + - `You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: { - message: `v-if / v-for precedence when used on the same element has changed ` + - `in Vue 3: v-if now takes higher precedence and will no longer have ` + - `access to v-for scope variables. It is best to avoid the ambiguity ` + - `with <template> tags or use a computed property that filters v-for ` + - `data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: { - message: `<template> with no special directives will render as a native template ` + - `element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTER" /* COMPILER_FILTERS */]: { - message: `filters have been removed in Vue 3. ` + - `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` + - `Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, context) { - const config = context.options - ? context.options.compatConfig - : context.compatConfig; - const value = config && config[key]; - if (key === 'MODE') { - return value || 3; // compiler defaults to v3 behavior - } - else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue('MODE', context); - const value = getCompatValue(key, context); - // in v3 mode, only enable if explicitly set to true - // otherwise enable for any non-false value - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === 'suppress-warning') { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) - err.loc = loc; - context.onWarn(err); -} - -// The default decoder only provides escapes for characters reserved as part of -// the template syntax, and is only used if the custom renderer did not provide -// a platform-specific decoder. -const decodeRE = /&(gt|lt|amp|apos|quot);/g; -const decodeMap = { - gt: '>', - lt: '<', - amp: '&', - apos: "'", - quot: '"' -}; const defaultParserOptions = { - delimiters: [`{{`, `}}`], - getNamespace: () => 0 /* HTML */, - getTextMode: () => 0 /* DATA */, - isVoidTag: NO, - isPreTag: NO, - isCustomElement: NO, - decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]), - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false }; -function baseParse(content, options = {}) { - const context = createParserContext(content, options); - const start = getCursor(context); - return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start)); -} -function createParserContext(content, rawOptions) { - const options = extend({}, defaultParserOptions); - let key; - for (key in rawOptions) { - // @ts-ignore - options[key] = - rawOptions[key] === undefined - ? defaultParserOptions[key] - : rawOptions[key]; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer$2 = new Tokenizer$1(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); } - return { - options, - column: 1, - line: 1, - offset: 0, - originalSource: content, - source: content, - inPre: false, - inVPre: false, - onWarn: options.onWarn + let innerStart = start + tokenizer$2.delimiterOpen.length; + let innerEnd = end - tokenizer$2.delimiterClose.length; + while (isWhitespace$1(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace$1(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = decodeHTML(exp); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 }; -} -function parseChildren(context, mode, ancestors) { - const parent = last(ancestors); - const ns = parent ? parent.ns : 0 /* HTML */; - const nodes = []; - while (!isEnd(context, mode, ancestors)) { - const s = context.source; - let node = undefined; - if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) { - if (!context.inVPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode); - } - else if (mode === 0 /* DATA */ && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1); - } - else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '<!--')) { - node = parseComment(context); - } - else if (startsWith(s, '<!DOCTYPE')) { - // Ignore DOCTYPE by a limitation. - node = parseBogusComment(context); - } - else if (startsWith(s, '<![CDATA[')) { - if (ns !== 0 /* HTML */) { - node = parseCDATA(context, ancestors); - } - else { - emitError(context, 1 /* CDATA_IN_HTML_CONTENT */); - node = parseBogusComment(context); - } - } - else { - emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */); - node = parseBogusComment(context); - } - } - else if (s[1] === '/') { - // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state - if (s.length === 2) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2); - } - else if (s[2] === '>') { - emitError(context, 14 /* MISSING_END_TAG_NAME */, 2); - advanceBy(context, 3); - continue; - } - else if (/[a-z]/i.test(s[2])) { - emitError(context, 23 /* X_INVALID_END_TAG */); - parseTag(context, 1 /* End */, parent); - continue; - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2); - node = parseBogusComment(context); - } - } - else if (/[a-z]/i.test(s[1])) { - node = parseElement(context, ancestors); - } - else if (s[1] === '?') { - emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1); - node = parseBogusComment(context); - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1); - } - } - } - if (!node) { - node = parseText(context, mode); - } - if (isArray(node)) { - for (let i = 0; i < node.length; i++) { - pushNode(nodes, node[i]); - } - } - else { - pushNode(nodes, node); + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } } - // Whitespace handling strategy like v2 - let removedWhitespace = false; - if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) { - const shouldCondense = context.options.whitespace !== 'preserve'; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!context.inPre && node.type === 2 /* TEXT */) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1]; - const next = nodes[i + 1]; - // Remove if: - // - the whitespace is the first or last node, or: - // - (condense mode) the whitespace is adjacent to a comment, or: - // - (condense mode) the whitespace is between two elements AND contains newline - if (!prev || - !next || - (shouldCondense && - (prev.type === 3 /* COMMENT */ || - next.type === 3 /* COMMENT */ || - (prev.type === 1 /* ELEMENT */ && - next.type === 1 /* ELEMENT */ && - /[\r\n]/.test(node.content))))) { - removedWhitespace = true; - nodes[i] = null; - } - else { - // Otherwise, the whitespace is condensed into a single space - node.content = ' '; - } - } - else if (shouldCondense) { - // in condense mode, consecutive whitespaces in text are condensed - // down to a single space. - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' '); - } - } - // Remove comment nodes if desired by configuration. - else if (node.type === 3 /* COMMENT */ && !context.options.comments) { - removedWhitespace = true; - nodes[i] = null; - } - } - if (context.inPre && parent && context.options.isPreTag(parent.tag)) { - // remove leading newline per html spec - // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element - const first = nodes[0]; - if (first && first.type === 2 /* TEXT */) { - first.content = first.content.replace(/^\r?\n/, ''); - } - } + }, + onselfclosingtag(end) { + var _a; + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (((_a = stack[0]) == null ? void 0 : _a.tag) === name) { + onCloseTag(stack.shift(), end); } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function pushNode(nodes, node) { - if (node.type === 2 /* TEXT */) { - const prev = last(nodes); - // Merge if both this and the previous node are text and those are - // consecutive. This happens for cases like "a < b". - if (prev && - prev.type === 2 /* TEXT */ && - prev.loc.end.offset === node.loc.start.offset) { - prev.content += node.content; - prev.loc.end = node.loc.end; - prev.loc.source += node.loc.source; - return; - } - } - nodes.push(node); -} -function parseCDATA(context, ancestors) { - advanceBy(context, 9); - const nodes = parseChildren(context, 3 /* CDATA */, ancestors); - if (context.source.length === 0) { - emitError(context, 6 /* EOF_IN_CDATA */); - } - else { - advanceBy(context, 3); - } - return nodes; -} -function parseComment(context) { - const start = getCursor(context); - let content; - // Regular comment. - const match = /--(\!)?>/.exec(context.source); - if (!match) { - content = context.source.slice(4); - advanceBy(context, context.source.length); - emitError(context, 7 /* EOF_IN_COMMENT */); - } - else { - if (match.index <= 3) { - emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */); - } - if (match[1]) { - emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */); - } - content = context.source.slice(4, match.index); - // Advancing with reporting nested comments. - const s = context.source.slice(0, match.index); - let prevIndex = 1, nestedIndex = 0; - while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) { - advanceBy(context, nestedIndex - prevIndex + 1); - if (nestedIndex + 4 < s.length) { - emitError(context, 16 /* NESTED_COMMENT */); - } - prevIndex = nestedIndex + 1; - } - advanceBy(context, match.index + match[0].length - prevIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) }; -} -function parseBogusComment(context) { - const start = getCursor(context); - const contentStart = context.source[1] === '?' ? 1 : 2; - let content; - const closeIndex = context.source.indexOf('>'); - if (closeIndex === -1) { - content = context.source.slice(contentStart); - advanceBy(context, context.source.length); + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); } - else { - content = context.source.slice(contentStart, closeIndex); - advanceBy(context, closeIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) - }; -} -function parseElement(context, ancestors) { - // Start tag. - const wasInPre = context.inPre; - const wasInVPre = context.inVPre; - const parent = last(ancestors); - const element = parseTag(context, 0 /* Start */, parent); - const isPreBoundary = context.inPre && !wasInPre; - const isVPreBoundary = context.inVPre && !wasInVPre; - if (element.isSelfClosing || context.options.isVoidTag(element.tag)) { - // #4030 self-closing <pre> tag - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - // Children. - ancestors.push(element); - const mode = context.options.getTextMode(element, parent); - const children = parseChildren(context, mode, ancestors); - ancestors.pop(); - element.children = children; - // End tag. - if (startsWithEndTagOpen(context.source, element.tag)) { - parseTag(context, 1 /* End */, parent); - } - else { - emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start); - if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { - const first = children[0]; - if (first && startsWith(first.loc.source, '<!--')) { - emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */); - } - } - } - element.loc = getSelection(context, element.loc.start); - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; -} -const isSpecialTemplateDirective = /*#__PURE__*/ makeMap(`if,else,else-if,for,slot`); -function parseTag(context, type, parent) { - // Tag open. - const start = getCursor(context); - const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source); - const tag = match[1]; - const ns = context.options.getNamespace(tag, parent); - advanceBy(context, match[0].length); - advanceSpaces(context); - // save current state in case we need to re-parse attributes with v-pre - const cursor = getCursor(context); - const currentSource = context.source; - // check <pre> tag - if (context.options.isPreTag(tag)) { - context.inPre = true; - } - // Attributes. - let props = parseAttributes(context, type); - // check v-pre - if (type === 0 /* Start */ && - !context.inVPre && - props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) { - context.inVPre = true; - // reset context - extend(context, cursor); - context.source = currentSource; - // re-parse attrs and filter out v-pre itself - props = parseAttributes(context, type).filter(p => p.name !== 'v-pre'); - } - // Tag close. - let isSelfClosing = false; - if (context.source.length === 0) { - emitError(context, 9 /* EOF_IN_TAG */); - } - else { - isSelfClosing = startsWith(context.source, '/>'); - if (type === 1 /* End */ && isSelfClosing) { - emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */); - } - advanceBy(context, isSelfClosing ? 2 : 1); - } - if (type === 1 /* End */) { - return; - } - let tagType = 0 /* ELEMENT */; - if (!context.inVPre) { - if (tag === 'slot') { - tagType = 2 /* SLOT */; - } - else if (tag === 'template') { - if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) { - tagType = 3 /* TEMPLATE */; - } - } - else if (isComponent(tag, props, context)) { - tagType = 1 /* COMPONENT */; - } - } - return { - type: 1 /* ELEMENT */, - ns, - tag, - tagType, - props, - isSelfClosing, - children: [], - loc: getSelection(context, start), - codegenNode: undefined // to be created during transform phase - }; -} -function isComponent(tag, props, context) { - const options = context.options; - if (options.isCustomElement(tag)) { - return false; - } - if (tag === 'component' || - /^[A-Z]/.test(tag) || - isCoreComponent(tag) || - (options.isBuiltInComponent && options.isBuiltInComponent(tag)) || - (options.isNativeTag && !options.isNativeTag(tag))) { - return true; - } - // at this point the tag should be a native tag, but check for potential "is" - // casting - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.name === 'is' && p.value) { - if (p.value.content.startsWith('vue:')) { - return true; - } - } - } - else { - // directive - // v-is (TODO Deprecate) - if (p.name === 'is') { - return true; - } - else if ( - // :is on plain element - only treat as component in compat mode - p.name === 'bind' && - isStaticArgOf(p.arg, 'is') && - false && - checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } -} -function parseAttributes(context, type) { - const props = []; - const attributeNames = new Set(); - while (context.source.length > 0 && - !startsWith(context.source, '>') && - !startsWith(context.source, '/>')) { - if (startsWith(context.source, '/')) { - emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */); - advanceBy(context, 1); - advanceSpaces(context); - continue; - } - if (type === 1 /* End */) { - emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */); - } - const attr = parseAttribute(context, attributeNames); - // Trim whitespace between class - // https://github.com/vuejs/core/issues/4251 - if (attr.type === 6 /* ATTRIBUTE */ && - attr.value && - attr.name === 'class') { - attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim(); - } - if (type === 0 /* Start */) { - props.push(attr); - } - if (/^[^\t\r\n\f />]/.test(context.source)) { - emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */); - } - advanceSpaces(context); - } - return props; -} -function parseAttribute(context, nameSet) { - // Name. - const start = getCursor(context); - const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source); - const name = match[0]; - if (nameSet.has(name)) { - emitError(context, 2 /* DUPLICATE_ATTRIBUTE */); - } - nameSet.add(name); - if (name[0] === '=') { - emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */); - } - { - const pattern = /["'<]/g; - let m; - while ((m = pattern.exec(name))) { - emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index); - } - } - advanceBy(context, name.length); - // Value - let value = undefined; - if (/^[\t\r\n\f ]*=/.test(context.source)) { - advanceSpaces(context); - advanceBy(context, 1); - advanceSpaces(context); - value = parseAttributeValue(context); - if (!value) { - emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */); - } - } - const loc = getSelection(context, start); - if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) { - const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name); - let isPropShorthand = startsWith(name, '.'); - let dirName = match[1] || - (isPropShorthand || startsWith(name, ':') - ? 'bind' - : startsWith(name, '@') - ? 'on' - : 'slot'); - let arg; - if (match[2]) { - const isSlot = dirName === 'slot'; - const startOffset = name.lastIndexOf(match[2]); - const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length)); - let content = match[2]; - let isStatic = true; - if (content.startsWith('[')) { - isStatic = false; - if (!content.endsWith(']')) { - emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */); - content = content.slice(1); - } - else { - content = content.slice(1, content.length - 1); - } - } - else if (isSlot) { - // #1241 special case for v-slot: vuetify relies extensively on slot - // names containing dots. v-slot doesn't have any modifiers and Vue 2.x - // supports such usage so we are keeping it consistent with 2.x. - content += match[3] || ''; - } - arg = { - type: 4 /* SIMPLE_EXPRESSION */, - content, - isStatic, - constType: isStatic - ? 3 /* CAN_STRINGIFY */ - : 0 /* NOT_CONSTANT */, - loc - }; - } - if (value && value.isQuoted) { - const valueLoc = value.loc; - valueLoc.start.offset++; - valueLoc.start.column++; - valueLoc.end = advancePositionWithClone(valueLoc.start, value.content); - valueLoc.source = valueLoc.source.slice(1, -1); - } - const modifiers = match[3] ? match[3].slice(1).split('.') : []; - if (isPropShorthand) - modifiers.push('prop'); - return { - type: 7 /* DIRECTIVE */, - name: dirName, - exp: value && { - type: 4 /* SIMPLE_EXPRESSION */, - content: value.content, - isStatic: false, - // Treat as non-constant by default. This can be potentially set to - // other values by `transformExpression` to make it eligible for hoisting. - constType: 0 /* NOT_CONSTANT */, - loc: value.loc - }, - arg, - modifiers, - loc - }; - } - // missing directive name or illegal directive name - if (!context.inVPre && startsWith(name, 'v-')) { - emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */); - } - return { - type: 6 /* ATTRIBUTE */, + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, name, - value: value && { - type: 2 /* TEXT */, - content: value.content, - loc: value.loc - }, - loc - }; -} -function parseAttributeValue(context) { - const start = getCursor(context); - let content; - const quote = context.source[0]; - const isQuoted = quote === `"` || quote === `'`; - if (isQuoted) { - // Quoted value. - advanceBy(context, 1); - const endIndex = context.source.indexOf(quote); - if (endIndex === -1) { - content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */); - } - else { - content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */); - advanceBy(context, 1); + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? ["prop"] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer$2.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } } + } } - else { - // Unquoted - const match = /^[^\t\r\n\f >]+/.exec(context.source); - if (!match) { - return undefined; - } - const unexpectedChars = /["'<=`]/g; - let m; - while ((m = unexpectedChars.exec(match[0]))) { - emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index); - } - content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */); + }, + ondirarg(start, end) { + if (start === end) + return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); } - return { content, isQuoted, loc: getSelection(context, start) }; -} -function parseInterpolation(context, mode) { - const [open, close] = context.options.delimiters; - const closeIndex = context.source.indexOf(close, open.length); - if (closeIndex === -1) { - emitError(context, 25 /* X_MISSING_INTERPOLATION_END */); - return undefined; + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + currentProp.modifiers.push(mod); } - const start = getCursor(context); - advanceBy(context, open.length); - const innerStart = getCursor(context); - const innerEnd = getCursor(context); - const rawContentLength = closeIndex - open.length; - const rawContent = context.source.slice(0, rawContentLength); - const preTrimContent = parseTextData(context, rawContentLength, mode); - const content = preTrimContent.trim(); - const startOffset = preTrimContent.indexOf(content); - if (startOffset > 0) { - advancePositionWithMutation(innerStart, rawContent, startOffset); + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; } - const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset); - advancePositionWithMutation(innerEnd, rawContent, endOffset); - advanceBy(context, close.length); - return { - type: 5 /* INTERPOLATION */, - content: { - type: 4 /* SIMPLE_EXPRESSION */, - isStatic: false, - // Set `isConstant` to false by default and will decide in transformExpression - constType: 0 /* NOT_CONSTANT */, - content, - loc: getSelection(context, innerStart, innerEnd) - }, - loc: getSelection(context, start) - }; -} -function parseText(context, mode) { - const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]]; - let endIndex = context.source.length; - for (let i = 0; i < endTokens.length; i++) { - const index = context.source.indexOf(endTokens[i], 1); - if (index !== -1 && endIndex > index) { - endIndex = index; - } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); } - const start = getCursor(context); - const content = parseTextData(context, endIndex, mode); - return { - type: 2 /* TEXT */, - content, - loc: getSelection(context, start) - }; -} -/** - * Get text data with a given length from the current location. - * This translates HTML entities in the text data. - */ -function parseTextData(context, length, mode) { - const rawText = context.source.slice(0, length); - advanceBy(context, length); - if (mode === 2 /* RAWTEXT */ || - mode === 3 /* CDATA */ || - !rawText.includes('&')) { - return rawText; - } - else { - // DATA or RCDATA containing "&"". Entity decoding required. - return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */); - } -} -function getCursor(context) { - const { column, line, offset } = context; - return { column, line, offset }; -} -function getSelection(context, start, end) { - end = end || getCursor(context); - return { - start, - end, - source: context.originalSource.slice(start.offset, end.offset) - }; -} -function last(xs) { - return xs[xs.length - 1]; -} -function startsWith(source, searchString) { - return source.startsWith(searchString); -} -function advanceBy(context, numberOfCharacters) { - const { source } = context; - advancePositionWithMutation(context, source, numberOfCharacters); - context.source = source.slice(numberOfCharacters); -} -function advanceSpaces(context) { - const match = /^[\t\r\n\f ]+/.exec(context.source); - if (match) { - advanceBy(context, match[0].length); - } -} -function getNewPosition(context, start, numberOfCharacters) { - return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters); -} -function emitError(context, code, offset, loc = getCursor(context)) { - if (offset) { - loc.offset += offset; - loc.column += offset; - } - context.options.onError(createCompilerError(code, { - start: loc, - end: loc, - source: '' - })); -} -function isEnd(context, mode, ancestors) { - const s = context.source; - switch (mode) { - case 0 /* DATA */: - if (startsWith(s, '</')) { - // TODO: probably bad performance - for (let i = ancestors.length - 1; i >= 0; --i) { - if (startsWithEndTagOpen(s, ancestors[i].tag)) { - return true; - } - } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer$2.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer$2.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + { + if (currentProp.name === "for") { + expParseMode = 3 /* Skip */; + } else if (currentProp.name === "slot") { + expParseMode = 1 /* Params */; + } else if (currentProp.name === "on" && currentAttrValue.includes(";")) { + expParseMode = 2 /* Statements */; } - break; - case 1 /* RCDATA */: - case 2 /* RAWTEXT */: { - const parent = last(ancestors); - if (parent && startsWithEndTagOpen(s, parent.tag)) { - return true; - } - break; + } + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } } - case 3 /* CDATA */: - if (startsWith(s, ']]>')) { - return true; - } - break; + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } } - return !s; + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer$2.state !== 1) { + switch (tokenizer$2.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer$2.sectionStart + ); + break; + case 28: + if (tokenizer$2.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) + return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; } -function startsWithEndTagOpen(source, tag) { - return (startsWith(source, '</') && - source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && - /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')); +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer$2.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer$2.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if ((lastNode == null ? void 0 : lastNode.type) === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, end + 1); + } + if (tokenizer$2.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer$2.inRCDATA) { + el.children = condenseWhitespace(el.children, el.tag); + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer$2.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer$2.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer$2.inXML = false; + } +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) + i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + var _a; + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || ((_a = currentOptions.isBuiltInComponent) == null ? void 0 : _a.call(currentOptions, tag)) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } + } + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + var _a, _b; + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = (_a = nodes[i - 1]) == null ? void 0 : _a.type; + const next = (_b = nodes[i + 1]) == null ? void 0 : _b.type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + if (inPre && tag && currentOptions.isPreTag(tag)) { + const first = nodes[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace$1(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace$1(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer$2.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer$2.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function setLocEnd(loc, end) { + loc.end = tokenizer$2.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc + }; + } + return attr; +} +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) { + if (isSimpleIdentifier(content)) { + exp.ast = null; + return exp; + } + try { + const plugins = currentOptions.expressionPlugins; + const options = { + plugins: plugins ? [...plugins, "typescript"] : ["typescript"] + }; + if (parseMode === 2 /* Statements */) { + exp.ast = parse_1$1(` ${content} `, options).program; + } else if (parseMode === 1 /* Params */) { + exp.ast = parseExpression_1(`(${content})=>{}`, options); + } else { + exp.ast = parseExpression_1(`(${content})`, options); + } + } catch (e) { + exp.ast = false; + emitError(45, loc.start.offset, e.message); + } + } + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer$2.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } + } + } + { + if (currentOptions.decodeEntities) { + console.warn( + `[@vue/compiler-core] decodeEntities option is passed but will be ignored in non-browser builds.` + ); + } + } + tokenizer$2.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer$2.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options == null ? void 0 : options.delimiters; + if (delimiters) { + tokenizer$2.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer$2.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer$2.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; } function hoistStatic(root, context) { - walk(root, context, + walk$1( + root, + context, // Root node is unfortunately non-hoistable due to potential parent // fallthrough attributes. - isSingleElementRoot(root, root.children[0])); + isSingleElementRoot(root, root.children[0]) + ); } function isSingleElementRoot(root, child) { - const { children } = root; - return (children.length === 1 && - child.type === 1 /* ELEMENT */ && - !isSlotOutlet(child)); + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); } -function walk(node, context, doNotHoistNode = false) { - const { children } = node; - const originalCount = children.length; - let hoistedCount = 0; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - // only plain elements & text calls are eligible for hoisting. - if (child.type === 1 /* ELEMENT */ && - child.tagType === 0 /* ELEMENT */) { - const constantType = doNotHoistNode - ? 0 /* NOT_CONSTANT */ - : getConstantType(child, context); - if (constantType > 0 /* NOT_CONSTANT */) { - if (constantType >= 2 /* CAN_HOIST */) { - child.codegenNode.patchFlag = - -1 /* HOISTED */ + (` /* HOISTED */` ); - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - continue; - } - } - else { - // node may contain dynamic children, but its props may be eligible for - // hoisting. - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - const flag = getPatchFlag(codegenNode); - if ((!flag || - flag === 512 /* NEED_PATCH */ || - flag === 1 /* TEXT */) && - getGeneratedPropsConstantType(child, context) >= - 2 /* CAN_HOIST */) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } +function walk$1(node, context, doNotHoistNode = false) { + const { children } = node; + const originalCount = children.length; + let hoistedCount = 0; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1 + (` /* HOISTED */` ); + child.codegenNode = context.hoist(child.codegenNode); + hoistedCount++; + continue; } - else if (child.type === 12 /* TEXT_CALL */ && - getConstantType(child.content, context) >= 2 /* CAN_HOIST */) { - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - } - // walk further - if (child.type === 1 /* ELEMENT */) { - const isComponent = child.tagType === 1 /* COMPONENT */; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, context); - if (isComponent) { - context.scopes.vSlot--; - } - } - else if (child.type === 11 /* FOR */) { - // Do not hoist v-for single child because it has to be a block - walk(child, context, child.children.length === 1); - } - else if (child.type === 9 /* IF */) { - for (let i = 0; i < child.branches.length; i++) { - // Do not hoist v-if single child because it has to be a block - walk(child.branches[i], context, child.branches[i].children.length === 1); + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = getPatchFlag(codegenNode); + if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } } + } } - if (hoistedCount && context.transformHoist) { - context.transformHoist(children, context, node); + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk$1(child, context); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk$1(child, context, child.children.length === 1); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk$1( + child.branches[i2], + context, + child.branches[i2].children.length === 1 + ); + } } - // all children were hoisted - the entire children array is hoistable. - if (hoistedCount && - hoistedCount === originalCount && - node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - node.codegenNode && - node.codegenNode.type === 13 /* VNODE_CALL */ && - isArray(node.codegenNode.children)) { - node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children)); + } + if (hoistedCount && context.transformHoist) { + context.transformHoist(children, context, node); + } + if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray$3(node.codegenNode.children)) { + const hoisted = context.hoist( + createArrayExpression(node.codegenNode.children) + ); + if (context.hmr) { + hoisted.content = `[...${hoisted.content}]`; } + node.codegenNode.children = hoisted; + } } function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1 /* ELEMENT */: - if (node.tagType !== 0 /* ELEMENT */) { - return 0 /* NOT_CONSTANT */; + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") { + return 0; + } + const flag = getPatchFlag(codegenNode); + if (!flag) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } } - const cached = constantCache.get(node); - if (cached !== undefined) { - return cached; + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13 /* VNODE_CALL */) { - return 0 /* NOT_CONSTANT */; - } - if (codegenNode.isBlock && - node.tag !== 'svg' && - node.tag !== 'foreignObject') { - return 0 /* NOT_CONSTANT */; - } - const flag = getPatchFlag(codegenNode); - if (!flag) { - let returnType = 3 /* CAN_STRINGIFY */; - // Element itself has no patch flag. However we still need to check: - // 1. Even for a node with no patch flag, it is possible for it to contain - // non-hoistable expressions that refers to scope variables, e.g. compiler - // injected keys or cached event handlers. Therefore we need to always - // check the codegenNode's props to be sure. - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (generatedPropsType < returnType) { - returnType = generatedPropsType; - } - // 2. its children. - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (childType < returnType) { - returnType = childType; - } - } - // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0 - // type, check if any of the props can cause the type to be lowered - // we can skip can_patch because it's guaranteed by the absence of a - // patchFlag. - if (returnType > 1 /* CAN_SKIP_PATCH */) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (expType < returnType) { - returnType = expType; - } - } - } - } - // only svg/foreignObject could be block here, however if they are - // static then they don't need to be blocks since there will be no - // nested updates. - if (codegenNode.isBlock) { - // except set custom directives. - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType); - return returnType; - } - else { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - case 2 /* TEXT */: - case 3 /* COMMENT */: - return 3 /* CAN_STRINGIFY */; - case 9 /* IF */: - case 11 /* FOR */: - case 10 /* IF_BRANCH */: - return 0 /* NOT_CONSTANT */; - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return getConstantType(node.content, context); - case 4 /* SIMPLE_EXPRESSION */: - return node.constType; - case 8 /* COMPOUND_EXPRESSION */: - let returnType = 3 /* CAN_STRINGIFY */; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0 /* NOT_CONSTANT */) { - return 0 /* NOT_CONSTANT */; - } - else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - default: - return 0 /* NOT_CONSTANT */; - } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString$2(child) || isSymbol$1(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + default: + return 0; + } } -const allowHoistedHelperSet = new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS ]); function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 /* JS_CALL_EXPRESSION */ && - !isString(value.callee) && - allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - return getConstantType(arg, context); - } - else if (arg.type === 14 /* JS_CALL_EXPRESSION */) { - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))` - return getConstantTypeOfHelperCall(arg, context); - } + if (value.type === 14 && !isString$2(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); } - return 0 /* NOT_CONSTANT */; + } + return 0; } function getGeneratedPropsConstantType(node, context) { - let returnType = 3 /* CAN_STRINGIFY */; - const props = getNodeProps(node); - if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0 /* NOT_CONSTANT */) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4 /* SIMPLE_EXPRESSION */) { - valueType = getConstantType(value, context); - } - else if (value.type === 14 /* JS_CALL_EXPRESSION */) { - // some helper calls can be hoisted, - // such as the `normalizeProps` generated by the compiler for pre-normalize class, - // in this case we need to respect the ConstantType of the helper's arguments - valueType = getConstantTypeOfHelperCall(value, context); - } - else { - valueType = 0 /* NOT_CONSTANT */; - } - if (valueType === 0 /* NOT_CONSTANT */) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } } - return returnType; + } + return returnType; } function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - return codegenNode.props; - } + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } } function getPatchFlag(node) { - const flag = node.patchFlag; - return flag ? parseInt(flag, 10) : undefined; + const flag = node.patchFlag; + return flag ? parseInt(flag, 10) : void 0; } -function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) { - const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/); - const context = { - // options - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: new Map(), - components: new Set(), - directives: new Set(), - hoists: [], - imports: [], - constantCache: new Map(), - temps: 0, - cached: 0, - identifiers: Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } - else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - /* istanbul ignore if */ - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node - ? list.indexOf(node) - : context.currentNode - ? context.childIndex - : -1; - /* istanbul ignore if */ - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - // current node removed - context.currentNode = null; - context.onNodeRemoved(); - } - else { - // sibling node removed - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: () => { }, - addIdentifiers(exp) { - // identifier tracking only happens in non-browser builds. - { - if (isString(exp)) { - addId(exp); - } - else if (exp.identifiers) { - exp.identifiers.forEach(addId); - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - addId(exp.content); - } - } - }, - removeIdentifiers(exp) { - { - if (isString(exp)) { - removeId(exp); - } - else if (exp.identifiers) { - exp.identifiers.forEach(removeId); - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - removeId(exp.content); - } - } - }, - hoist(exp) { - if (isString(exp)) - exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false) { - return createCacheExpression(context.cached++, exp, isVNode); +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic: hoistStatic2 = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize$1(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic: hoistStatic2, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + cached: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); } - }; - function addId(id) { - const { identifiers } = context; - if (identifiers[id] === undefined) { - identifiers[id] = 0; + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); } - identifiers[id]++; + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + { + if (isString$2(exp)) { + addId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(addId); + } else if (exp.type === 4) { + addId(exp.content); + } + } + }, + removeIdentifiers(exp) { + { + if (isString$2(exp)) { + removeId(exp); + } else if (exp.identifiers) { + exp.identifiers.forEach(removeId); + } else if (exp.type === 4) { + removeId(exp.content); + } + } + }, + hoist(exp) { + if (isString$2(exp)) + exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false) { + return createCacheExpression(context.cached++, exp, isVNode); } - function removeId(id) { - context.identifiers[id]--; + }; + function addId(id) { + const { identifiers } = context; + if (identifiers[id] === void 0) { + identifiers[id] = 0; } - return context; + identifiers[id]++; + } + function removeId(id) { + context.identifiers[id]--; + } + return context; } function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - hoistStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - // finalize meta information - root.helpers = [...context.helpers.keys()]; - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + hoistStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; } function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - // if the single child is an element, turn it into a block. - if (isSingleElementRoot(root, child) && child.codegenNode) { - // single element root is never hoisted so codegenNode will never be - // SimpleExpressionNode - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - makeBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } - else { - // - single <slot/>, IfNode, ForNode: already blocks. - // - single text node: always patched. - // root codegen falls through via genNode() - root.codegenNode = child; - } + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; } - else if (children.length > 1) { - // root has multiple nodes - return a fragment block. - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, undefined, false /* isComponent */); + } else if (children.length > 1) { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; } - else ; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else ; } function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) - continue; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString$2(child)) + continue; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } } function traverseNode(node, context) { - context.currentNode = node; - // apply transform plugins - const { nodeTransforms } = context; - const exitFns = []; - for (let i = 0; i < nodeTransforms.length; i++) { - const onExit = nodeTransforms[i](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } - else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - // node was removed - return; - } - else { - // node may have been replaced - node = context.currentNode; - } + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray$3(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } } - switch (node.type) { - case 3 /* COMMENT */: - if (!context.ssr) { - // inject import for the Comment symbol, which is needed for creating - // comment nodes with `createVNode` - context.helper(CREATE_COMMENT); - } - break; - case 5 /* INTERPOLATION */: - // no need to traverse, but we need to inject toString helper - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9 /* IF */: - for (let i = 0; i < node.branches.length; i++) { - traverseNode(node.branches[i], context); - } - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - case 1 /* ELEMENT */: - case 0 /* ROOT */: - traverseChildren(node, context); - break; - } - // exit transforms - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); + if (!context.currentNode) { + return; + } else { + node = context.currentNode; } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } } function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) - ? (n) => n === name - : (n) => name.test(n); - return (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const { props } = node; - // structural directive transforms are not concerned with slots - // as they are handled separately in vSlot.ts - if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) { - // structural directives are removed to avoid infinite recursion - // also we remove them *before* applying so that it can further - // traverse itself in case it moves the node around - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) - exitFns.push(onExit); - } - } - return exitFns; + const matches = isString$2(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) + exitFns.push(onExit); } - }; + } + return exitFns; + } + }; } +var sourceMap$2 = {}; + +var sourceMapGenerator$1 = {}; + +var base64Vlq$1 = {}; + +var base64$3 = {}; + /* -*- Mode: js; js-indent-level: 2; -*- */ + /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause */ -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); +var intToCharMap$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); /** * Encode an integer in the range of 0 to 63 to a single base 64 digit. */ -var encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; +base64$3.encode = function (number) { + if (0 <= number && number < intToCharMap$1.length) { + return intToCharMap$1[number]; } throw new TypeError("Must be between 0 and 63: " + number); }; @@ -17808,7 +18890,7 @@ var encode = function (number) { * Decode a single base 64 character code digit to an integer. Returns -1 on * failure. */ -var decode = function (charCode) { +base64$3.decode = function (charCode) { var bigA = 65; // 'A' var bigZ = 90; // 'Z' @@ -17853,9 +18935,21892 @@ var decode = function (charCode) { return -1; }; -var base64 = { - encode: encode, - decode: decode +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64$2 = base64$3; + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT$1 = 5; + +// binary: 100000 +var VLQ_BASE$1 = 1 << VLQ_BASE_SHIFT$1; + +// binary: 011111 +var VLQ_BASE_MASK$1 = VLQ_BASE$1 - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT$1 = VLQ_BASE$1; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned$1(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned$1(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +base64Vlq$1.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned$1(aValue); + + do { + digit = vlq & VLQ_BASE_MASK$1; + vlq >>>= VLQ_BASE_SHIFT$1; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT$1; + } + encoded += base64$2.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +base64Vlq$1.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64$2.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT$1); + digit &= VLQ_BASE_MASK$1; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT$1; + } while (continuation); + + aOutParam.value = fromVLQSigned$1(result); + aOutParam.rest = aIndex; +}; + +var util$c = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +(function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + var MAX_CACHED_INPUTS = 32; + + /** + * Takes some function `f(input) -> result` and returns a memoized version of + * `f`. + * + * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The + * memoization is a dumb-simple, linear least-recently-used cache. + */ + function lruMemoize(f) { + var cache = []; + + return function(input) { + for (var i = 0; i < cache.length; i++) { + if (cache[i].input === input) { + var temp = cache[0]; + cache[0] = cache[i]; + cache[i] = temp; + return cache[0].result; + } + } + + var result = f(input); + + cache.unshift({ + input, + result, + }); + + if (cache.length > MAX_CACHED_INPUTS) { + cache.pop(); + } + + return result; + }; + } + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + var normalize = lruMemoize(function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + // Split the path into parts between `/` characters. This is much faster than + // using `.split(/\/+/g)`. + var parts = []; + var start = 0; + var i = 0; + while (true) { + start = i; + i = path.indexOf("/", start); + if (i === -1) { + parts.push(path.slice(start)); + break; + } else { + parts.push(path.slice(start, i)); + while (i < path.length && path[i] === "/") { + i++; + } + } + } + + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + }); + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; + + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); + + function identity (s) { + return s; + } + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; + + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; + + function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; + + function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; + + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + + function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; + + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; + } + + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; + + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; +} (util$c)); + +var arraySet$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util$b = util$c; +var has$1 = Object.prototype.hasOwnProperty; +var hasNativeMap$1 = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet$5() { + this._array = []; + this._set = hasNativeMap$1 ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet$5.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet$5(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet$5.prototype.size = function ArraySet_size() { + return hasNativeMap$1 ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet$5.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap$1 ? aStr : util$b.toSetString(aStr); + var isDuplicate = hasNativeMap$1 ? this.has(aStr) : has$1.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap$1) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet$5.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap$1) { + return this._set.has(aStr); + } else { + var sStr = util$b.toSetString(aStr); + return has$1.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet$5.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap$1) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util$b.toSetString(aStr); + if (has$1.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet$5.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet$5.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +arraySet$1.ArraySet = ArraySet$5; + +var mappingList$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util$a = util$c; + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter$1(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util$a.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList$3() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList$3.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList$3.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter$1(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList$3.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util$a.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +mappingList$1.MappingList = MappingList$3; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ$3 = base64Vlq$1; +var util$9 = util$c; +var ArraySet$4 = arraySet$1.ArraySet; +var MappingList$2 = mappingList$1.MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator$8(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util$9.getArg(aArgs, 'file', null); + this._sourceRoot = util$9.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util$9.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet$4(); + this._names = new ArraySet$4(); + this._mappings = new MappingList$2(); + this._sourcesContents = null; +} + +SourceMapGenerator$8.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator$8.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator$8({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util$9.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util$9.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator$8.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util$9.getArg(aArgs, 'generated'); + var original = util$9.getArg(aArgs, 'original', null); + var source = util$9.getArg(aArgs, 'source', null); + var name = util$9.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator$8.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util$9.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util$9.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util$9.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator$8.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util$9.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet$4(); + var newNames = new ArraySet$4(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util$9.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util$9.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util$9.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util$9.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator$8.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator$8.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ''; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util$9.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ$3.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ$3.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ$3.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ$3.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ$3.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator$8.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util$9.relative(aSourceRoot, source); + } + var key = util$9.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator$8.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator$8.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +sourceMapGenerator$1.SourceMapGenerator = SourceMapGenerator$8; + +var sourceMapConsumer$1 = {}; + +var binarySearch$3 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +(function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; + }; +} (binarySearch$3)); + +var quickSort$3 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +function SortTemplate(comparator) { + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot, false) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + + return doQuickSort; +} + +function cloneSort(comparator) { + let template = SortTemplate.toString(); + let templateFn = new Function(`return ${template}`)(); + return templateFn(comparator); +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ + +let sortCache = new WeakMap(); +quickSort$3.quickSort = function (ary, comparator, start = 0) { + let doQuickSort = sortCache.get(comparator); + if (doQuickSort === void 0) { + doQuickSort = cloneSort(comparator); + sortCache.set(comparator, doQuickSort); + } + doQuickSort(ary, comparator, start, ary.length - 1); +}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util$8 = util$c; +var binarySearch$2 = binarySearch$3; +var ArraySet$3 = arraySet$1.ArraySet; +var base64VLQ$2 = base64Vlq$1; +var quickSort$2 = quickSort$3.quickSort; + +function SourceMapConsumer$6(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util$8.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer$1(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer$1(sourceMap, aSourceMapURL); +} + +SourceMapConsumer$6.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer$1.fromSourceMap(aSourceMap, aSourceMapURL); +}; + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer$6.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer$6.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer$6.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer$6.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer$6.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer$6.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer$6.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer$6.GENERATED_ORDER = 1; +SourceMapConsumer$6.ORIGINAL_ORDER = 2; + +SourceMapConsumer$6.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer$6.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer$6.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer$6.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer$6.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer$6.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + var boundCallback = aCallback.bind(context); + var names = this._names; + var sources = this._sources; + var sourceMapURL = this._sourceMapURL; + + for (var i = 0, n = mappings.length; i < n; i++) { + var mapping = mappings[i]; + var source = mapping.source === null ? null : sources.at(mapping.source); + source = util$8.computeSourceURL(sourceRoot, source, sourceMapURL); + boundCallback({ + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : names.at(mapping.name) + }); + } + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer$6.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util$8.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util$8.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util$8.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util$8.compareByOriginalPositions, + binarySearch$2.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util$8.getArg(mapping, 'generatedLine', null), + column: util$8.getArg(mapping, 'generatedColumn', null), + lastColumn: util$8.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util$8.getArg(mapping, 'generatedLine', null), + column: util$8.getArg(mapping, 'generatedColumn', null), + lastColumn: util$8.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +sourceMapConsumer$1.SourceMapConsumer = SourceMapConsumer$6; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer$1(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util$8.parseSourceMapInput(aSourceMap); + } + + var version = util$8.getArg(sourceMap, 'version'); + var sources = util$8.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util$8.getArg(sourceMap, 'names', []); + var sourceRoot = util$8.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util$8.getArg(sourceMap, 'sourcesContent', null); + var mappings = util$8.getArg(sourceMap, 'mappings'); + var file = util$8.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util$8.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util$8.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util$8.isAbsolute(sourceRoot) && util$8.isAbsolute(source) + ? util$8.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet$3.fromArray(names.map(String), true); + this._sources = ArraySet$3.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util$8.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer$1.prototype = Object.create(SourceMapConsumer$6.prototype); +BasicSourceMapConsumer$1.prototype.consumer = SourceMapConsumer$6; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer$1.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util$8.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer$1.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer$1.prototype); + + var names = smc._names = ArraySet$3.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet$3.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util$8.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping$1; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort$2(smc.__originalMappings, util$8.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer$1.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer$1.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping$1() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + +const compareGenerated = util$8.compareByGeneratedPositionsDeflatedNoLine; +function sortGenerated(array, start) { + let l = array.length; + let n = array.length - start; + if (n <= 1) { + return; + } else if (n == 2) { + let a = array[start]; + let b = array[start + 1]; + if (compareGenerated(a, b) > 0) { + array[start] = b; + array[start + 1] = a; + } + } else if (n < 20) { + for (let i = start; i < l; i++) { + for (let j = i; j > start; j--) { + let a = array[j - 1]; + let b = array[j]; + if (compareGenerated(a, b) <= 0) { + break; + } + array[j - 1] = b; + array[j] = a; + } + } + } else { + quickSort$2(array, compareGenerated, start); + } +} +BasicSourceMapConsumer$1.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, segment, end, value; + + let subarrayStart = 0; + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + + sortGenerated(generatedMappings, subarrayStart); + subarrayStart = generatedMappings.length; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping$1(); + mapping.generatedLine = generatedLine; + + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + aStr.slice(index, end); + + segment = []; + while (index < end) { + base64VLQ$2.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + let currentSource = mapping.source; + while (originalMappings.length <= currentSource) { + originalMappings.push(null); + } + if (originalMappings[currentSource] === null) { + originalMappings[currentSource] = []; + } + originalMappings[currentSource].push(mapping); + } + } + } + + sortGenerated(generatedMappings, subarrayStart); + this.__generatedMappings = generatedMappings; + + for (var i = 0; i < originalMappings.length; i++) { + if (originalMappings[i] != null) { + quickSort$2(originalMappings[i], util$8.compareByOriginalPositionsNoSource); + } + } + this.__originalMappings = [].concat(...originalMappings); + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer$1.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch$2.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer$1.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer$1.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util$8.getArg(aArgs, 'line'), + generatedColumn: util$8.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util$8.compareByGeneratedPositionsDeflated, + util$8.getArg(aArgs, 'bias', SourceMapConsumer$6.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util$8.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util$8.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util$8.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util$8.getArg(mapping, 'originalLine', null), + column: util$8.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer$1.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer$1.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util$8.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util$8.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer$1.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util$8.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util$8.getArg(aArgs, 'line'), + originalColumn: util$8.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util$8.compareByOriginalPositions, + util$8.getArg(aArgs, 'bias', SourceMapConsumer$6.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util$8.getArg(mapping, 'generatedLine', null), + column: util$8.getArg(mapping, 'generatedColumn', null), + lastColumn: util$8.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +sourceMapConsumer$1.BasicSourceMapConsumer = BasicSourceMapConsumer$1; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer$1(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util$8.parseSourceMapInput(aSourceMap); + } + + var version = util$8.getArg(sourceMap, 'version'); + var sections = util$8.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet$3(); + this._names = new ArraySet$3(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util$8.getArg(s, 'offset'); + var offsetLine = util$8.getArg(offset, 'line'); + var offsetColumn = util$8.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer$6(util$8.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer$1.prototype = Object.create(SourceMapConsumer$6.prototype); +IndexedSourceMapConsumer$1.prototype.constructor = SourceMapConsumer$6; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer$1.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer$1.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer$1.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util$8.getArg(aArgs, 'line'), + generatedColumn: util$8.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch$2.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer$1.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer$1.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer$1.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util$8.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer$1.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util$8.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort$2(this.__generatedMappings, util$8.compareByGeneratedPositionsDeflated); + quickSort$2(this.__originalMappings, util$8.compareByOriginalPositions); + }; + +sourceMapConsumer$1.IndexedSourceMapConsumer = IndexedSourceMapConsumer$1; + +var sourceNode$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator$7 = sourceMapGenerator$1.SourceMapGenerator; +var util$7 = util$c; + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE$1 = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE$1 = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode$1 = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode$1(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode$1] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode$1.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode$1(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE$1); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util$7.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util$7.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode$1(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode$1.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode$1] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode$1.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode$1] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode$1.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode$1]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode$1.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode$1.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode$1]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode$1.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util$7.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode$1.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode$1]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util$7.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode$1.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode$1.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator$7(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE$1) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +sourceNode$1.SourceNode = SourceNode$1; + +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator$6 = sourceMap$2.SourceMapGenerator = sourceMapGenerator$1.SourceMapGenerator; +var SourceMapConsumer$5 = sourceMap$2.SourceMapConsumer = sourceMapConsumer$1.SourceMapConsumer; +sourceMap$2.SourceNode = sourceNode$1.SourceNode; + +const PURE_ANNOTATION = `/*#__PURE__*/`; +const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + if (context.map) { + if (node) { + let name; + if (node.type === 4 && !node.isStatic) { + const content = node.content.replace(/^_ctx\./, ""); + if (content !== node.content && isSimpleIdentifier(content)) { + name = content; + } + } + addMapping(node.loc.start, name); + } + if (newlineIndex === -3 /* Unknown */) { + advancePositionWithMutation(context, code); + } else { + context.offset += code.length; + if (newlineIndex === -2 /* None */) { + context.column += code.length; + } else { + if (newlineIndex === -1 /* End */) { + newlineIndex = code.length - 1; + } + context.line++; + context.column = code.length - newlineIndex; + } + } + if (node && node.loc !== locStub) { + addMapping(node.loc.end); + } + } + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); + } + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + function addMapping(loc, name = null) { + const { _names, _mappings } = context.map; + if (name !== null && !_names.has(name)) + _names.add(name); + _mappings.add({ + originalLine: loc.line, + originalColumn: loc.column - 1, + // source-map column is 0 based + generatedLine: context.line, + generatedColumn: context.column - 1, + source: filename, + // @ts-expect-error it is possible to be null + name + }); + } + if (sourceMap) { + context.map = new SourceMapGenerator$6(); + context.map.setSourceContent(filename, context.source); + context.map._sources.add(filename); + } + return context; +} +function generate(ast, options = {}) { + const context = createCodegenContext(ast, options); + if (options.onContextCreated) + options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const genScopeId = scopeId != null && mode === "module"; + const isSetupInlined = !!options.inline; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + if (mode === "module") { + genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); + } else { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + if (options.bindingMetadata && !options.inline) { + args.push("$props", "$setup", "$data", "$options"); + } + const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", "); + if (isSetupInlined) { + push(`(${signature}) => {`); + } else { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); + indent(); + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); + } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); + } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); + if (ast.temps > 0) { + newline(); + } + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); + } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { + deindent(); + push(`}`); + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; +} +function genFunctionPreamble(ast, context) { + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + if (prefixIdentifiers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding} +`, + -1 /* End */ + ); + } else { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } + } + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}") +`, + -1 /* End */ + ); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); +} +function genModulePreamble(ast, context, genScopeId, inline) { + const { + push, + newline, + optimizeImports, + runtimeModuleName, + ssrRuntimeModuleName + } = context; + if (genScopeId && ast.hoists.length) { + ast.helpers.add(PUSH_SCOPE_ID); + ast.helpers.add(POP_SCOPE_ID); + } + if (ast.helpers.size) { + const helpers = Array.from(ast.helpers); + if (optimizeImports) { + push( + `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + push( + ` +// Binding optimization for webpack code-split +const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")} +`, + -1 /* End */ + ); + } else { + push( + `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)} +`, + -1 /* End */ + ); + } + } + if (ast.ssrHelpers && ast.ssrHelpers.length) { + push( + `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}" +`, + -1 /* End */ + ); + } + if (ast.imports.length) { + genImports(ast.imports, context); + newline(); + } + genHoists(ast.hoists, context); + newline(); + if (!inline) { + push(`export `); + } +} +function genAssets(assets, type, { helper, push, newline, isTS }) { + const resolver = helper( + type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); + } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } +} +function genHoists(hoists, context) { + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline, helper, scopeId, mode } = context; + const genScopeId = scopeId != null && mode !== "function"; + newline(); + if (genScopeId) { + push( + `const _withScopeId = n => (${helper( + PUSH_SCOPE_ID + )}("${scopeId}"),n=n(),${helper(POP_SCOPE_ID)}(),n)` + ); + newline(); + } + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + const needScopeIdWrapper = genScopeId && exp.type === 13; + push( + `const _hoisted_${i + 1} = ${needScopeIdWrapper ? `${PURE_ANNOTATION} _withScopeId(() => ` : ``}` + ); + genNode(exp, context); + if (needScopeIdWrapper) { + push(`)`); + } + newline(); + } + } + context.pure = false; +} +function genImports(importsOptions, context) { + if (!importsOptions.length) { + return; + } + importsOptions.forEach((imports) => { + context.push(`import `); + genNode(imports.exp, context); + context.push(` from '${imports.path}'`); + context.newline(); + }); +} +function isText(n) { + return isString$2(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; +} +function genNodeListAsArray(nodes, context) { + const multilines = nodes.length > 3 || nodes.some((n) => isArray$3(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); +} +function genNodeList(nodes, context, multilines = false, comma = true) { + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString$2(node)) { + push(node, -3 /* Unknown */); + } else if (isArray$3(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); + } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } +} +function genNode(node, context) { + if (isString$2(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol$1(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + case 22: + genTemplateLiteral(node, context); + break; + case 23: + genIfStatement(node, context); + break; + case 24: + genAssignmentExpression(node, context); + break; + case 25: + genSequenceExpression(node, context); + break; + case 26: + genReturnStatement(node, context); + break; + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } +} +function genText(node, context) { + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); +} +function genExpression(node, context) { + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); +} +function genInterpolation(node, context) { + const { push, helper, pure } = context; + if (pure) + push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); +} +function genCompoundExpression(node, context) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString$2(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); + } + } +} +function genExpressionAsPropertyKey(node, context) { + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } +} +function genComment(node, context) { + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); +} +function genVNodeCall(node, context) { + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlag, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { + push(`)`); + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } +} +function genNullableArgs(args) { + let i = args.length; + while (i--) { + if (args[i] != null) + break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); +} +function genCallExpression(node, context) { + const { push, helper, pure } = context; + const callee = isString$2(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); +} +function genObjectExpression(node, context) { + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); + } + } + multilines && deindent(); + push(multilines ? `}` : ` }`); +} +function genArrayExpression(node, context) { + genNodeListAsArray(node.elements, context); +} +function genFunctionExpression(node, context) { + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray$3(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); + } + if (isArray$3(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + push(`)`); + } +} +function genConditionalExpression(node, context) { + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { + context.indentLevel++; + } + genNode(alternate, context); + if (!isNested) { + context.indentLevel--; + } + needNewline && deindent( + true + /* without newline */ + ); +} +function genCacheExpression(node, context) { + const { push, helper, indent, deindent, newline } = context; + push(`_cache[${node.index}] || (`); + if (node.isVNode) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1),`); + newline(); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (node.isVNode) { + push(`,`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); +} +function genTemplateLiteral(node, context) { + const { push, indent, deindent } = context; + push("`"); + const l = node.elements.length; + const multilines = l > 3; + for (let i = 0; i < l; i++) { + const e = node.elements[i]; + if (isString$2(e)) { + push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */); + } else { + push("${"); + if (multilines) + indent(); + genNode(e, context); + if (multilines) + deindent(); + push("}"); + } + } + push("`"); +} +function genIfStatement(node, context) { + const { push, indent, deindent } = context; + const { test, consequent, alternate } = node; + push(`if (`); + genNode(test, context); + push(`) {`); + indent(); + genNode(consequent, context); + deindent(); + push(`}`); + if (alternate) { + push(` else `); + if (alternate.type === 23) { + genIfStatement(alternate, context); + } else { + push(`{`); + indent(); + genNode(alternate, context); + deindent(); + push(`}`); + } + } +} +function genAssignmentExpression(node, context) { + genNode(node.left, context); + context.push(` = `); + genNode(node.right, context); +} +function genSequenceExpression(node, context) { + context.push(`(`); + genNodeList(node.expressions, context); + context.push(`)`); +} +function genReturnStatement({ returns }, context) { + context.push(`return `); + if (isArray$3(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); + } +} + +const isLiteralWhitelisted = /* @__PURE__ */ makeMap("true,false,null,this"); +const constantBailRE = /\w\s*\(|\.[^\d]/; +const transformExpression = (node, context) => { + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg)) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); + } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } + } + } +}; +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + if (!context.prefixIdentifiers || !node.content.trim()) { + return node; + } + const { inline, bindingMetadata } = context; + const rewriteIdentifier = (raw, parent, id) => { + const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; + if (inline) { + const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id; + const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id; + const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); + const isNewExpression = parent && isInNewExpression(parentStack); + const wrapWithUnref = (raw2) => { + const wrapped = `${context.helperString(UNREF)}(${raw2})`; + return isNewExpression ? `(${wrapped})` : wrapped; + }; + if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) { + return raw; + } else if (type === "setup-ref") { + return `${raw}.value`; + } else if (type === "setup-maybe-ref") { + return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw); + } else if (type === "setup-let") { + if (isAssignmentLVal) { + const { right: rVal, operator } = parent; + const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); + const rExpString = stringifyExpression( + processExpression( + createSimpleExpression(rExp, false), + context, + false, + false, + knownIds + ) + ); + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; + } else if (isUpdateArg) { + id.start = parent.start; + id.end = parent.end; + const { prefix: isPrefix, operator } = parent; + const prefix = isPrefix ? operator : ``; + const postfix = isPrefix ? `` : operator; + return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore +` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; + } else if (isDestructureAssignment) { + return raw; + } else { + return wrapWithUnref(raw); + } + } else if (type === "props") { + return genPropsAccessExp(raw); + } else if (type === "props-aliased") { + return genPropsAccessExp(bindingMetadata.__propsAliases[raw]); + } + } else { + if (type && type.startsWith("setup") || type === "literal-const") { + return `$setup.${raw}`; + } else if (type === "props-aliased") { + return `$props['${bindingMetadata.__propsAliases[raw]}']`; + } else if (type) { + return `$${type}.${raw}`; + } + } + return `_ctx.${raw}`; + }; + const rawExp = node.content; + const bailConstant = constantBailRE.test(rawExp); + let ast = node.ast; + if (ast === false) { + return node; + } + if (ast === null || !ast && isSimpleIdentifier(rawExp)) { + const isScopeVarReference = context.identifiers[rawExp]; + const isAllowedGlobal = isGloballyAllowed(rawExp); + const isLiteral = isLiteralWhitelisted(rawExp); + if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) { + if (isConst(bindingMetadata[rawExp])) { + node.constType = 1; + } + node.content = rewriteIdentifier(rawExp); + } else if (!isScopeVarReference) { + if (isLiteral) { + node.constType = 3; + } else { + node.constType = 2; + } + } + return node; + } + if (!ast) { + const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`; + try { + ast = parse_1$1(source, { + plugins: context.expressionPlugins + }).program; + } catch (e) { + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + e.message + ) + ); + return node; + } + } + const ids = []; + const parentStack = []; + const knownIds = Object.create(context.identifiers); + walkIdentifiers( + ast, + (node2, parent, _, isReferenced, isLocal) => { + if (isStaticPropertyKey(node2, parent)) { + return; + } + const needPrefix = isReferenced && canPrefix(node2); + if (needPrefix && !isLocal) { + if (isStaticProperty(parent) && parent.shorthand) { + node2.prefix = `${node2.name}: `; + } + node2.name = rewriteIdentifier(node2.name, parent, node2); + ids.push(node2); + } else { + if (!(needPrefix && isLocal) && !bailConstant) { + node2.isConstant = true; + } + ids.push(node2); + } + }, + true, + // invoke on ALL identifiers + parentStack, + knownIds + ); + const children = []; + ids.sort((a, b) => a.start - b.start); + ids.forEach((id, i) => { + const start = id.start - 1; + const end = id.end - 1; + const last = ids[i - 1]; + const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); + if (leadingText.length || id.prefix) { + children.push(leadingText + (id.prefix || ``)); + } + const source = rawExp.slice(start, end); + children.push( + createSimpleExpression( + id.name, + false, + { + start: advancePositionWithClone(node.loc.start, source, start), + end: advancePositionWithClone(node.loc.start, source, end), + source + }, + id.isConstant ? 3 : 0 + ) + ); + if (i === ids.length - 1 && end < rawExp.length) { + children.push(rawExp.slice(end)); + } + }); + let ret; + if (children.length) { + ret = createCompoundExpression(children, node.loc); + ret.ast = ast; + } else { + ret = node; + ret.constType = bailConstant ? 0 : 3; + } + ret.identifiers = Object.keys(knownIds); + return ret; +} +function canPrefix(id) { + if (isGloballyAllowed(id.name)) { + return false; + } + if (id.name === "require") { + return false; + } + return true; +} +function stringifyExpression(exp) { + if (isString$2(exp)) { + return exp; + } else if (exp.type === 4) { + return exp.content; + } else { + return exp.children.map(stringifyExpression).join(""); + } +} +function isConst(type) { + return type === "setup-const" || type === "literal-const"; +} + +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { + return processIf(node, dir, context, (ifNode, branch, isRoot) => { + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; + } + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; + }); + } +); +function processIf(node, dir, context, processCodegen) { + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (context.prefixIdentifiers && dir.exp) { + dir.exp = processExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: node.loc, + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); + } + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); + const branch = createIfBranch(node, dir); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; + } + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } + } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) + onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; + } + } +} +function createIfBranch(node, dir) { + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; +} +function createCodegenNodeForBranch(branch, keyIndex, context) { + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } +} +function createChildrenCodegenNode(branch, keyIndex, context) { + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + false, + false, + branch.loc + ); + } + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); + } + injectProp(vnodeCall, keyProperty, context); + return ret; + } +} +function isSameKey(a, b) { + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; + } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; + } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; + } + } + return true; +} +function getParentCondition(node) { + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; + } + } +} + +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { + const { helper, removeHelper } = context; + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`); + const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp); + const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + if (isTemplate) { + if (memo) { + memo.exp = processExpression( + memo.exp, + context + ); + } + if (keyProperty && keyProp.type !== 6) { + keyProperty.value = processExpression( + keyProperty.value, + context + ); + } + } + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag + (` /* ${PatchFlagNames[fragmentFlag]} */` ), + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } + } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64 + (` /* ${PatchFlagNames[64]} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); + } + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached++)) + ); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; + }); + } +); +function processFor(node, dir, context, processCodegen) { + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + if (context.prefixIdentifiers) { + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + } + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (context.prefixIdentifiers) { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + } + if (onExit) + onExit(); + }; +} +function finalizeForParseResult(result, context) { + if (result.finalized) + return; + if (context.prefixIdentifiers) { + result.source = processExpression( + result.source, + context + ); + if (result.key) { + result.key = processExpression( + result.key, + context, + true + ); + } + if (result.index) { + result.index = processExpression( + result.index, + context, + true + ); + } + if (result.value) { + result.value = processExpression( + result.value, + context, + true + ); + } + } + result.finalized = true; +} +function createForLoopParams({ value, key, index }, memoArgs = []) { + return createParamsList([value, key, index, ...memoArgs]); +} +function createParamsList(args) { + let i = args.length; + while (i--) { + if (args[i]) + break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); +} + +const defaultFallback = createSimpleExpression(`undefined`, false); +const trackSlotScopes = (node, context) => { + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + const slotProps = vSlot.exp; + if (context.prefixIdentifiers) { + slotProps && context.addIdentifiers(slotProps); + } + context.scopes.vSlot++; + return () => { + if (context.prefixIdentifiers) { + slotProps && context.removeIdentifiers(slotProps); + } + context.scopes.vSlot--; + }; + } + } +}; +const trackVForSlotScopes = (node, context) => { + let vFor; + if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) { + const result = vFor.forParseResult; + if (result) { + finalizeForParseResult(result, context); + const { value, key, index } = result; + const { addIdentifiers, removeIdentifiers } = context; + value && addIdentifiers(value); + key && addIdentifiers(key); + index && addIdentifiers(index); + return () => { + value && removeIdentifiers(value); + key && removeIdentifiers(key); + index && removeIdentifiers(index); + }; + } + } +}; +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); +function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + if (!context.ssr && context.prefixIdentifiers) { + hasDynamicSlots = hasScopeRef(node, context.identifiers); + } + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } + if (onComponentSlot) { + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; + } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; + } + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; + } + } + if (prev && isTemplateNode(prev) && findDir(prev, "if")) { + children.splice(i, 1); + i--; + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; + } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); + } + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + return createObjectProperty(`default`, fn); + }; + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) + ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); +} +function hasForwardedSlots(children) { + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; + } + break; + case 9: + if (hasForwardedSlots(child.branches)) + return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) + return true; + break; + } + } + return false; +} +function isNonWhitespaceContent(node) { + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); +} + +const directiveImportMap = /* @__PURE__ */ new WeakMap(); +const transformElement = (node, context) => { + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject$2(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let vnodePatchFlag; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); + } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; + } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; + } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; + } + } else { + vnodeChildren = node.children; + } + } + if (patchFlag !== 0) { + { + if (patchFlag < 0) { + vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + vnodePatchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; +}; +function resolveComponentType(node, context, ssr = false) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp(node, "is"); + if (isProp) { + if (isExplicitDynamic || false) { + const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp; + if (exp) { + return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ + exp + ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); + } + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) + context.helper(builtIn); + return builtIn; + } + { + const fromSetup = resolveSetupReference(tag, context); + if (fromSetup) { + return fromSetup; + } + const dotIndex = tag.indexOf("."); + if (dotIndex > 0) { + const ns = resolveSetupReference(tag.slice(0, dotIndex), context); + if (ns) { + return ns + tag.slice(dotIndex); + } + } + } + if (context.selfName && capitalize$1(camelize(tag)) === context.selfName) { + context.helper(RESOLVE_COMPONENT); + context.components.add(tag + `__self`); + return toValidAssetId(tag, `component`); + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); +} +function resolveSetupReference(name, context) { + const bindings = context.bindingMetadata; + if (!bindings || bindings.__isScriptSetup === false) { + return; + } + const camelName = camelize(name); + const PascalName = capitalize$1(camelName); + const checkType = (type) => { + if (bindings[name] === type) { + return name; + } + if (bindings[camelName] === type) { + return camelName; + } + if (bindings[PascalName] === type) { + return PascalName; + } + }; + const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const"); + if (fromConst) { + return context.inline ? ( + // in inline mode, const setup bindings (e.g. imports) can be used as-is + fromConst + ) : `$setup[${JSON.stringify(fromConst)}]`; + } + const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref"); + if (fromMaybeRef) { + return context.inline ? ( + // setup scope bindings that may be refs need to be unrefed + `${context.helperString(UNREF)}(${fromMaybeRef})` + ) : `$setup[${JSON.stringify(fromMaybeRef)}]`; + } + const fromProps = checkType("props"); + if (fromProps) { + return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`; + } +} +function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; + } + if (arg) + mergeArgs.push(arg); + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; + } + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (value && context.inline) { + const binding = context.bindingMetadata[value.content]; + if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") { + isStatic = false; + properties.push( + createObjectProperty( + createSimpleExpression("ref_key", true), + createSimpleExpression(value.content, true, value.loc) + ) + ); + } + } + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); + } + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || false)) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushMergeArg(); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); + } + continue; + } + if (isVBind && modifiers.includes("prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); + } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol$1(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } + } + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; + } + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } + } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; + } + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; +} +function dedupeProperties(properties) { + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; + } + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; +} +function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } +} +function buildDirectiveArgs(dir, context) { + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + const fromSetup = resolveSetupReference("v-" + dir.name, context); + if (fromSetup) { + dirArgs.push(fromSetup); + } else { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); + } + } + const { loc } = dir; + if (dir.exp) + dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); + } + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); +} +function stringifyDynamicPropNames(props) { + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) + propsNamesString += ", "; + } + return propsNamesString + `]`; +} +function isComponentTag(tag) { + return tag === "component" || tag === "Component"; +} + +const transformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; + } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } +}; +function processSlotOutlet(node, context) { + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); + } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) + slotName = p.exp; + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); + } + nonNameProps.push(p); + } + } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); + } + } + return { + slotName, + slotProps + }; +} + +const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); + } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp.content, context); + const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); + const hasMultipleStatements = exp.content.includes(`;`); + if (context.prefixIdentifiers) { + isInlineStatement && context.addIdentifiers(`$event`); + exp = dir.exp = processExpression( + exp, + context, + false, + hasMultipleStatements + ); + isInlineStatement && context.removeIdentifiers(`$event`); + shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once + !context.inVOnce && // runtime constants don't need to be cached + // (this is analyzed by compileScript in SFC <script setup>) + !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component - + // we need to use the original function to preserve arity, + // e.g. <transition> relies on checking cb.length to determine + // transition end handling. Inline function is ok since its arity + // is preserved even when cached. + !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot) + // it must be passed fresh to avoid stale values. + !hasScopeRef(exp, context.identifiers); + if (shouldCache && isMemberExp) { + if (exp.type === 4) { + exp.content = `${exp.content} && ${exp.content}(...args)`; + } else { + exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; + } + } + } + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? ` +//@ts-ignore +` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); + } + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; +}; + +const transformBind = (dir, _node, context) => { + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (!exp && arg.type === 4) { + const propName = camelize(arg.content); + exp = dir.exp = createSimpleExpression(propName, false, arg.loc); + { + exp = dir.exp = processExpression(exp, context); + } + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.includes("camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); + } + } + if (!context.inSSR) { + if (modifiers.includes("prop")) { + injectPrefix(arg, "."); + } + if (modifiers.includes("attr")) { + injectPrefix(arg, "^"); + } + } + if (!exp || exp.type === 4 && !exp.content.trim()) { + context.onError(createCompilerError(34, loc)); + return { + props: [createObjectProperty(arg, createSimpleExpression("", true, loc))] + }; + } + return { + props: [createObjectProperty(arg, exp)] + }; +}; +const injectPrefix = (arg, prefix) => { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; + } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } +}; + +const transformText = (node, context) => { + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; + } + } + } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + true)) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } +}; + +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; + } + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true + /* isVNode */ + ); + } + }; + } +}; + +const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source; + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref"); + if (!expString.trim() || !isMemberExpression(expString, context) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) { + context.onError( + createCompilerError(43, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + if (maybeRef) { + if (bindingType === "setup-ref") { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event)` + ]); + } else { + const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`; + assignmentExp = createCompoundExpression([ + `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, + createSimpleExpression(rawExp, false, exp.loc), + `).value = $event : ${altAssignment})` + ]); + } + } else { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) { + props[1].value = context.cache(props[1].value); + } + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); +}; +function createTransformProps(props = []) { + return { props }; +} + +const seen = /* @__PURE__ */ new WeakSet(); +const transformMemo = (node, context) => { + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; + } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached++) + ]); + } + }; + } +}; + +function getBaseTransformPreset(prefixIdentifiers) { + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[], + ...prefixIdentifiers ? [ + // order is important + trackVForSlotScopes, + transformExpression + ] : [], + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], + { + on: transformOn$1, + bind: transformBind, + model: transformModel$1 + } + ]; +} +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode; + if (!prefixIdentifiers && options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString$2(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); + if (options.isTS) { + const { expressionPlugins } = options; + if (!expressionPlugins || !expressionPlugins.includes("typescript")) { + options.expressionPlugins = [...expressionPlugins || [], "typescript"]; + } + } + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); +} + +const BindingTypes = { + "DATA": "data", + "PROPS": "props", + "PROPS_ALIASED": "props-aliased", + "SETUP_LET": "setup-let", + "SETUP_CONST": "setup-const", + "SETUP_REACTIVE_CONST": "setup-reactive-const", + "SETUP_MAYBE_REF": "setup-maybe-ref", + "SETUP_REF": "setup-ref", + "OPTIONS": "options", + "LITERAL_CONST": "literal-const" +}; + +const noopDirectiveTransform = () => ({ props: [] }); + +const V_MODEL_RADIO = Symbol(`vModelRadio` ); +const V_MODEL_CHECKBOX = Symbol(`vModelCheckbox` ); +const V_MODEL_TEXT = Symbol(`vModelText` ); +const V_MODEL_SELECT = Symbol(`vModelSelect` ); +const V_MODEL_DYNAMIC = Symbol(`vModelDynamic` ); +const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` ); +const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` ); +const V_SHOW = Symbol(`vShow` ); +const TRANSITION = Symbol(`Transition` ); +const TRANSITION_GROUP = Symbol(`TransitionGroup` ); +registerRuntimeHelpers({ + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` +}); + +const parserOptions = { + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + decodeEntities: void 0, + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; + } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } +}; + +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } +}; +const parseInlineCSS = (cssText, loc) => { + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); +}; + +function createDOMCompilerError(code, loc) { + return createCompilerError( + code, + loc, + DOMErrorMessages + ); +} +const DOMErrorCodes = { + "X_V_HTML_NO_EXPRESSION": 53, + "53": "X_V_HTML_NO_EXPRESSION", + "X_V_HTML_WITH_CHILDREN": 54, + "54": "X_V_HTML_WITH_CHILDREN", + "X_V_TEXT_NO_EXPRESSION": 55, + "55": "X_V_TEXT_NO_EXPRESSION", + "X_V_TEXT_WITH_CHILDREN": 56, + "56": "X_V_TEXT_WITH_CHILDREN", + "X_V_MODEL_ON_INVALID_ELEMENT": 57, + "57": "X_V_MODEL_ON_INVALID_ELEMENT", + "X_V_MODEL_ARG_ON_ELEMENT": 58, + "58": "X_V_MODEL_ARG_ON_ELEMENT", + "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59, + "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT", + "X_V_MODEL_UNNECESSARY_VALUE": 60, + "60": "X_V_MODEL_UNNECESSARY_VALUE", + "X_V_SHOW_NO_EXPRESSION": 61, + "61": "X_V_SHOW_NO_EXPRESSION", + "X_TRANSITION_INVALID_CHILDREN": 62, + "62": "X_TRANSITION_INVALID_CHILDREN", + "X_IGNORED_SIDE_EFFECT_TAG": 63, + "63": "X_IGNORED_SIDE_EFFECT_TAG", + "__EXTEND_POINT__": 64, + "64": "__EXTEND_POINT__" +}; +const DOMErrorMessages = { + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` +}; + +const transformVHtml = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; +}; + +const transformVText = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; +}; + +const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { + return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; +}; + +const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ makeMap( + `onkeyup,onkeydown,onkeypress`, + true +); +const resolveModifiers = (key, modifiers, context, loc) => { + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content)) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); + } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); + } + } + } + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; +}; +const transformClick = (key, event) => { + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; +}; +const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) + return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize$1).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); +}; + +const transformShow = (dir, node, context) => { + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; +}; + +const transformTransition = (node, context) => { + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; + } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; + } + } +}; +function hasMultipleChildren(node) { + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); +} + +const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; +const stringifyStatic = (children, context, parent) => { + if (context.scopes.vSlot > 0) { + return; + } + let nc = 0; + let ec = 0; + const currentChunk = []; + const stringifyCurrentChunk = (currentIndex) => { + if (nc >= 20 || ec >= 5) { + const staticCall = createCallExpression(context.helper(CREATE_STATIC), [ + JSON.stringify( + currentChunk.map((node) => stringifyNode(node, context)).join("") + ).replace(expReplaceRE, `" + $1 + "`), + // the 2nd argument indicates the number of DOM nodes this static vnode + // will insert / hydrate + String(currentChunk.length) + ]); + replaceHoist(currentChunk[0], staticCall, context); + if (currentChunk.length > 1) { + for (let i2 = 1; i2 < currentChunk.length; i2++) { + replaceHoist(currentChunk[i2], null, context); + } + const deleteCount = currentChunk.length - 1; + children.splice(currentIndex - currentChunk.length + 1, deleteCount); + return deleteCount; + } + } + return 0; + }; + let i = 0; + for (; i < children.length; i++) { + const child = children[i]; + const hoisted = getHoistedNode(child); + if (hoisted) { + const node = child; + const result = analyzeNode(node); + if (result) { + nc += result[0]; + ec += result[1]; + currentChunk.push(node); + continue; + } + } + i -= stringifyCurrentChunk(i); + nc = 0; + ec = 0; + currentChunk.length = 0; + } + stringifyCurrentChunk(i); +}; +const getHoistedNode = (node) => (node.type === 1 && node.tagType === 0 || node.type == 12) && node.codegenNode && node.codegenNode.type === 4 && node.codegenNode.hoisted; +const dataAriaRE = /^(data|aria)-/; +const isStringifiableAttr = (name, ns) => { + return (ns === 0 ? isKnownHtmlAttr(name) : ns === 1 ? isKnownSvgAttr(name) : false) || dataAriaRE.test(name); +}; +const replaceHoist = (node, replacement, context) => { + const hoistToReplace = node.codegenNode.hoisted; + context.hoists[context.hoists.indexOf(hoistToReplace)] = replacement; +}; +const isNonStringifiable = /* @__PURE__ */ makeMap( + `caption,thead,tr,th,tbody,td,tfoot,colgroup,col` +); +function analyzeNode(node) { + if (node.type === 1 && isNonStringifiable(node.tag)) { + return false; + } + if (node.type === 12) { + return [1, 0]; + } + let nc = 1; + let ec = node.props.length > 0 ? 1 : 0; + let bailed = false; + const bail = () => { + bailed = true; + return false; + }; + function walk(node2) { + for (let i = 0; i < node2.props.length; i++) { + const p = node2.props[i]; + if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) { + return bail(); + } + if (p.type === 7 && p.name === "bind") { + if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) { + return bail(); + } + if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) { + return bail(); + } + } + } + for (let i = 0; i < node2.children.length; i++) { + nc++; + const child = node2.children[i]; + if (child.type === 1) { + if (child.props.length > 0) { + ec++; + } + walk(child); + if (bailed) { + return false; + } + } + } + return true; + } + return walk(node) ? [nc, ec] : false; +} +function stringifyNode(node, context) { + if (isString$2(node)) { + return node; + } + if (isSymbol$1(node)) { + return ``; + } + switch (node.type) { + case 1: + return stringifyElement(node, context); + case 2: + return escapeHtml(node.content); + case 3: + return `<!--${escapeHtml(node.content)}-->`; + case 5: + return escapeHtml(toDisplayString(evaluateConstant(node.content))); + case 8: + return escapeHtml(evaluateConstant(node)); + case 12: + return stringifyNode(node.content, context); + default: + return ""; + } +} +function stringifyElement(node, context) { + let res = `<${node.tag}`; + let innerHTML = ""; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + res += ` ${p.name}`; + if (p.value) { + res += `="${escapeHtml(p.value.content)}"`; + } + } else if (p.type === 7) { + if (p.name === "bind") { + const exp = p.exp; + if (exp.content[0] === "_") { + res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; + continue; + } + if (isBooleanAttr(p.arg.content) && exp.content === "false") { + continue; + } + let evaluated = evaluateConstant(exp); + if (evaluated != null) { + const arg = p.arg && p.arg.content; + if (arg === "class") { + evaluated = normalizeClass(evaluated); + } else if (arg === "style") { + evaluated = stringifyStyle(normalizeStyle(evaluated)); + } + res += ` ${p.arg.content}="${escapeHtml( + evaluated + )}"`; + } + } else if (p.name === "html") { + innerHTML = evaluateConstant(p.exp); + } else if (p.name === "text") { + innerHTML = escapeHtml( + toDisplayString(evaluateConstant(p.exp)) + ); + } + } + } + if (context.scopeId) { + res += ` ${context.scopeId}`; + } + res += `>`; + if (innerHTML) { + res += innerHTML; + } else { + for (let i = 0; i < node.children.length; i++) { + res += stringifyNode(node.children[i], context); + } + } + if (!isVoidTag(node.tag)) { + res += `</${node.tag}>`; + } + return res; +} +function evaluateConstant(exp) { + if (exp.type === 4) { + return new Function(`return (${exp.content})`)(); + } else { + let res = ``; + exp.children.forEach((c) => { + if (isString$2(c) || isSymbol$1(c)) { + return; + } + if (c.type === 2) { + res += c.content; + } else if (c.type === 5) { + res += toDisplayString(evaluateConstant(c.content)); + } else { + res += evaluateConstant(c); + } + }); + return res; + } +} + +const ignoreSideEffectTags = (node, context) => { + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } +}; + +const DOMNodeTransforms = [ + transformStyle, + ...[transformTransition] +]; +const DOMDirectiveTransforms = { + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow +}; +function compile$1(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: stringifyStatic + }) + ); +} +function parse$8(template, options = {}) { + return baseParse(template, extend({}, parserOptions, options)); +} + +var CompilerDOM = /*#__PURE__*/Object.freeze({ + __proto__: null, + BASE_TRANSITION: BASE_TRANSITION, + BindingTypes: BindingTypes, + CAMELIZE: CAMELIZE, + CAPITALIZE: CAPITALIZE, + CREATE_BLOCK: CREATE_BLOCK, + CREATE_COMMENT: CREATE_COMMENT, + CREATE_ELEMENT_BLOCK: CREATE_ELEMENT_BLOCK, + CREATE_ELEMENT_VNODE: CREATE_ELEMENT_VNODE, + CREATE_SLOTS: CREATE_SLOTS, + CREATE_STATIC: CREATE_STATIC, + CREATE_TEXT: CREATE_TEXT, + CREATE_VNODE: CREATE_VNODE, + CompilerDeprecationTypes: CompilerDeprecationTypes, + ConstantTypes: ConstantTypes, + DOMDirectiveTransforms: DOMDirectiveTransforms, + DOMErrorCodes: DOMErrorCodes, + DOMErrorMessages: DOMErrorMessages, + DOMNodeTransforms: DOMNodeTransforms, + ElementTypes: ElementTypes, + ErrorCodes: ErrorCodes, + FRAGMENT: FRAGMENT, + GUARD_REACTIVE_PROPS: GUARD_REACTIVE_PROPS, + IS_MEMO_SAME: IS_MEMO_SAME, + IS_REF: IS_REF, + KEEP_ALIVE: KEEP_ALIVE, + MERGE_PROPS: MERGE_PROPS, + NORMALIZE_CLASS: NORMALIZE_CLASS, + NORMALIZE_PROPS: NORMALIZE_PROPS, + NORMALIZE_STYLE: NORMALIZE_STYLE, + Namespaces: Namespaces, + NodeTypes: NodeTypes, + OPEN_BLOCK: OPEN_BLOCK, + POP_SCOPE_ID: POP_SCOPE_ID, + PUSH_SCOPE_ID: PUSH_SCOPE_ID, + RENDER_LIST: RENDER_LIST, + RENDER_SLOT: RENDER_SLOT, + RESOLVE_COMPONENT: RESOLVE_COMPONENT, + RESOLVE_DIRECTIVE: RESOLVE_DIRECTIVE, + RESOLVE_DYNAMIC_COMPONENT: RESOLVE_DYNAMIC_COMPONENT, + RESOLVE_FILTER: RESOLVE_FILTER, + SET_BLOCK_TRACKING: SET_BLOCK_TRACKING, + SUSPENSE: SUSPENSE, + TELEPORT: TELEPORT, + TO_DISPLAY_STRING: TO_DISPLAY_STRING, + TO_HANDLERS: TO_HANDLERS, + TO_HANDLER_KEY: TO_HANDLER_KEY, + TRANSITION: TRANSITION, + TRANSITION_GROUP: TRANSITION_GROUP, + TS_NODE_TYPES: TS_NODE_TYPES, + UNREF: UNREF, + V_MODEL_CHECKBOX: V_MODEL_CHECKBOX, + V_MODEL_DYNAMIC: V_MODEL_DYNAMIC, + V_MODEL_RADIO: V_MODEL_RADIO, + V_MODEL_SELECT: V_MODEL_SELECT, + V_MODEL_TEXT: V_MODEL_TEXT, + V_ON_WITH_KEYS: V_ON_WITH_KEYS, + V_ON_WITH_MODIFIERS: V_ON_WITH_MODIFIERS, + V_SHOW: V_SHOW, + WITH_CTX: WITH_CTX, + WITH_DIRECTIVES: WITH_DIRECTIVES, + WITH_MEMO: WITH_MEMO, + advancePositionWithClone: advancePositionWithClone, + advancePositionWithMutation: advancePositionWithMutation, + assert: assert, + baseCompile: baseCompile, + baseParse: baseParse, + buildDirectiveArgs: buildDirectiveArgs, + buildProps: buildProps, + buildSlots: buildSlots, + checkCompatEnabled: checkCompatEnabled, + compile: compile$1, + convertToBlock: convertToBlock, + createArrayExpression: createArrayExpression, + createAssignmentExpression: createAssignmentExpression, + createBlockStatement: createBlockStatement, + createCacheExpression: createCacheExpression, + createCallExpression: createCallExpression, + createCompilerError: createCompilerError, + createCompoundExpression: createCompoundExpression, + createConditionalExpression: createConditionalExpression, + createDOMCompilerError: createDOMCompilerError, + createForLoopParams: createForLoopParams, + createFunctionExpression: createFunctionExpression, + createIfStatement: createIfStatement, + createInterpolation: createInterpolation, + createObjectExpression: createObjectExpression, + createObjectProperty: createObjectProperty, + createReturnStatement: createReturnStatement, + createRoot: createRoot, + createSequenceExpression: createSequenceExpression, + createSimpleExpression: createSimpleExpression, + createStructuralDirectiveTransform: createStructuralDirectiveTransform, + createTemplateLiteral: createTemplateLiteral, + createTransformContext: createTransformContext, + createVNodeCall: createVNodeCall, + errorMessages: errorMessages$1, + extractIdentifiers: extractIdentifiers$1, + findDir: findDir, + findProp: findProp, + forAliasRE: forAliasRE, + generate: generate, + generateCodeFrame: generateCodeFrame, + getBaseTransformPreset: getBaseTransformPreset, + getConstantType: getConstantType, + getMemoedVNodeCall: getMemoedVNodeCall, + getVNodeBlockHelper: getVNodeBlockHelper, + getVNodeHelper: getVNodeHelper, + hasDynamicKeyVBind: hasDynamicKeyVBind, + hasScopeRef: hasScopeRef, + helperNameMap: helperNameMap, + injectProp: injectProp, + isCoreComponent: isCoreComponent, + isFunctionType: isFunctionType, + isInDestructureAssignment: isInDestructureAssignment, + isInNewExpression: isInNewExpression, + isMemberExpression: isMemberExpression, + isMemberExpressionBrowser: isMemberExpressionBrowser, + isMemberExpressionNode: isMemberExpressionNode, + isReferencedIdentifier: isReferencedIdentifier, + isSimpleIdentifier: isSimpleIdentifier, + isSlotOutlet: isSlotOutlet, + isStaticArgOf: isStaticArgOf, + isStaticExp: isStaticExp, + isStaticProperty: isStaticProperty, + isStaticPropertyKey: isStaticPropertyKey, + isTemplateNode: isTemplateNode, + isText: isText$1, + isVSlot: isVSlot, + locStub: locStub, + noopDirectiveTransform: noopDirectiveTransform, + parse: parse$8, + parserOptions: parserOptions, + processExpression: processExpression, + processFor: processFor, + processIf: processIf, + processSlotOutlet: processSlotOutlet, + registerRuntimeHelpers: registerRuntimeHelpers, + resolveComponentType: resolveComponentType, + stringifyExpression: stringifyExpression, + toValidAssetId: toValidAssetId, + trackSlotScopes: trackSlotScopes, + trackVForSlotScopes: trackVForSlotScopes, + transform: transform, + transformBind: transformBind, + transformElement: transformElement, + transformExpression: transformExpression, + transformModel: transformModel$1, + transformOn: transformOn$1, + transformStyle: transformStyle, + traverseNode: traverseNode, + unwrapTSNode: unwrapTSNode, + walkBlockDeclarations: walkBlockDeclarations, + walkFunctionParams: walkFunctionParams, + walkIdentifiers: walkIdentifiers, + warnDeprecation: warnDeprecation +}); + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); +}; + +// path.resolve([from ...], to) +// posix version +function resolve$2() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : '/'; + + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +} +// path.normalize(path) +// posix version +function normalize$1(path) { + var isPathAbsolute = isAbsolute$1(path), + trailingSlash = substr(path, -1) === '/'; + + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isPathAbsolute).join('/'); + + if (!path && !isPathAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isPathAbsolute ? '/' : '') + path; +} +// posix version +function isAbsolute$1(path) { + return path.charAt(0) === '/'; +} + +// posix version +function join$1() { + var paths = Array.prototype.slice.call(arguments, 0); + return normalize$1(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +} + + +// path.relative(from, to) +// posix version +function relative$1(from, to) { + from = resolve$2(from).substr(1); + to = resolve$2(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +} + +var sep$1 = '/'; +var delimiter$1 = ':'; + +function dirname$2(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +} + +function basename(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +} + + +function extname(path) { + return splitPath(path)[3]; +} +var path = { + extname: extname, + basename: basename, + dirname: dirname$2, + sep: sep$1, + delimiter: delimiter$1, + relative: relative$1, + join: join$1, + isAbsolute: isAbsolute$1, + normalize: normalize$1, + resolve: resolve$2 +}; +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' ? + function (str, start, len) { return str.substr(start, len) } : + function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; + +var _polyfillNode_path = /*#__PURE__*/Object.freeze({ + __proto__: null, + basename: basename, + default: path, + delimiter: delimiter$1, + dirname: dirname$2, + extname: extname, + isAbsolute: isAbsolute$1, + join: join$1, + normalize: normalize$1, + relative: relative$1, + resolve: resolve$2, + sep: sep$1 +}); + +const UNKNOWN_TYPE = "Unknown"; +function resolveObjectKey(node, computed) { + switch (node.type) { + case "StringLiteral": + case "NumericLiteral": + return String(node.value); + case "Identifier": + if (!computed) + return node.name; + } + return void 0; +} +function concatStrings(strs) { + return strs.filter((s) => !!s).join(", "); +} +function isLiteralNode(node) { + return node.type.endsWith("Literal"); +} +function isCallOf(node, test) { + return !!(node && test && node.type === "CallExpression" && node.callee.type === "Identifier" && (typeof test === "string" ? node.callee.name === test : test(node.callee.name))); +} +function toRuntimeTypeString(types) { + return types.length > 1 ? `[${types.join(", ")}]` : types[0]; +} +function getImportedName(specifier) { + if (specifier.type === "ImportSpecifier") + return specifier.imported.type === "Identifier" ? specifier.imported.name : specifier.imported.value; + else if (specifier.type === "ImportNamespaceSpecifier") + return "*"; + return "default"; +} +function getId(node) { + return node.type === "Identifier" ? node.name : node.type === "StringLiteral" ? node.value : null; +} +const normalize = (path.posix || path).normalize; +const windowsSlashRE = /\\/g; +function normalizePath(p) { + return normalize(p.replace(windowsSlashRE, "/")); +} +const joinPaths = (path.posix || path).join; +const propNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~\-]/; +function getEscapedPropName(key) { + return propNameEscapeSymbolsRE.test(key) ? JSON.stringify(key) : key; +} +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => doubleEscape ? `\\\\${s}` : `\\${s}` + ); +} + +function pad$1 (hash, len) { + while (hash.length < len) { + hash = '0' + hash; + } + return hash; +} + +function fold (hash, text) { + var i; + var chr; + var len; + if (text.length === 0) { + return hash; + } + for (i = 0, len = text.length; i < len; i++) { + chr = text.charCodeAt(i); + hash = ((hash << 5) - hash) + chr; + hash |= 0; + } + return hash < 0 ? hash * -2 : hash; +} + +function foldObject (hash, o, seen) { + return Object.keys(o).sort().reduce(foldKey, hash); + function foldKey (hash, key) { + return foldValue(hash, o[key], key, seen); + } +} + +function foldValue (input, value, key, seen) { + var hash = fold(fold(fold(input, key), toString$2(value)), typeof value); + if (value === null) { + return fold(hash, 'null'); + } + if (value === undefined) { + return fold(hash, 'undefined'); + } + if (typeof value === 'object' || typeof value === 'function') { + if (seen.indexOf(value) !== -1) { + return fold(hash, '[Circular]' + key); + } + seen.push(value); + + var objHash = foldObject(hash, value, seen); + + if (!('valueOf' in value) || typeof value.valueOf !== 'function') { + return objHash; + } + + try { + return fold(objHash, String(value.valueOf())) + } catch (err) { + return fold(objHash, '[valueOf exception]' + (err.stack || err.message)) + } + } + return fold(hash, value.toString()); +} + +function toString$2 (o) { + return Object.prototype.toString.call(o); +} + +function sum (o) { + return pad$1(foldValue(0, o, '', []).toString(16), 8); +} + +var hashSum = sum; + +var hash = /*@__PURE__*/getDefaultExportFromCjs(hashSum); + +const CSS_VARS_HELPER = `useCssVars`; +function genCssVarsFromList(vars, id, isProd, isSSR = false) { + return `{ + ${vars.map( + (key) => `"${isSSR ? `--` : ``}${genVarName(id, key, isProd, isSSR)}": (${key})` + ).join(",\n ")} +}`; +} +function genVarName(id, raw, isProd, isSSR = false) { + if (isProd) { + return hash(id + raw); + } else { + return `${id}-${getEscapedCssVarName(raw, isSSR)}`; + } +} +function normalizeExpression(exp) { + exp = exp.trim(); + if (exp[0] === `'` && exp[exp.length - 1] === `'` || exp[0] === `"` && exp[exp.length - 1] === `"`) { + return exp.slice(1, -1); + } + return exp; +} +const vBindRE = /v-bind\s*\(/g; +function parseCssVars(sfc) { + const vars = []; + sfc.styles.forEach((style) => { + let match; + const content = style.content.replace(/\/\*([\s\S]*?)\*\/|\/\/.*/g, ""); + while (match = vBindRE.exec(content)) { + const start = match.index + match[0].length; + const end = lexBinding(content, start); + if (end !== null) { + const variable = normalizeExpression(content.slice(start, end)); + if (!vars.includes(variable)) { + vars.push(variable); + } + } + } + }); + return vars; +} +function lexBinding(content, start) { + let state = 0 /* inParens */; + let parenDepth = 0; + for (let i = start; i < content.length; i++) { + const char = content.charAt(i); + switch (state) { + case 0 /* inParens */: + if (char === `'`) { + state = 1 /* inSingleQuoteString */; + } else if (char === `"`) { + state = 2 /* inDoubleQuoteString */; + } else if (char === `(`) { + parenDepth++; + } else if (char === `)`) { + if (parenDepth > 0) { + parenDepth--; + } else { + return i; + } + } + break; + case 1 /* inSingleQuoteString */: + if (char === `'`) { + state = 0 /* inParens */; + } + break; + case 2 /* inDoubleQuoteString */: + if (char === `"`) { + state = 0 /* inParens */; + } + break; + } + } + return null; +} +const cssVarsPlugin = (opts) => { + const { id, isProd } = opts; + return { + postcssPlugin: "vue-sfc-vars", + Declaration(decl) { + const value = decl.value; + if (vBindRE.test(value)) { + vBindRE.lastIndex = 0; + let transformed = ""; + let lastIndex = 0; + let match; + while (match = vBindRE.exec(value)) { + const start = match.index + match[0].length; + const end = lexBinding(value, start); + if (end !== null) { + const variable = normalizeExpression(value.slice(start, end)); + transformed += value.slice(lastIndex, match.index) + `var(--${genVarName(id, variable, isProd)})`; + lastIndex = end + 1; + } + } + decl.value = transformed + value.slice(lastIndex); + } + } + }; +}; +cssVarsPlugin.postcss = true; +function genCssVarsCode(vars, bindings, id, isProd) { + const varsExp = genCssVarsFromList(vars, id, isProd); + const exp = createSimpleExpression(varsExp, false); + const context = createTransformContext(createRoot([]), { + prefixIdentifiers: true, + inline: true, + bindingMetadata: bindings.__isScriptSetup === false ? void 0 : bindings + }); + const transformed = processExpression(exp, context); + const transformedString = transformed.type === 4 ? transformed.content : transformed.children.map((c) => { + return typeof c === "string" ? c : c.content; + }).join(""); + return `_${CSS_VARS_HELPER}(_ctx => (${transformedString}))`; +} +function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd, defaultVar) { + return ` +import { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue' +const __injectCSSVars__ = () => { +${genCssVarsCode( + cssVars, + bindings, + id, + isProd + )}} +const __setup__ = ${defaultVar}.setup +${defaultVar}.setup = __setup__ + ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) } + : __injectCSSVars__ +`; +} + +var global$1 = (typeof global !== "undefined" ? global : + typeof self !== "undefined" ? self : + typeof window !== "undefined" ? window : {}); + +// shim for using process in browser +// based off https://github.com/defunctzombie/node-process/blob/master/browser.js + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +var cachedSetTimeout = defaultSetTimout; +var cachedClearTimeout = defaultClearTimeout; +if (typeof global$1.setTimeout === 'function') { + cachedSetTimeout = setTimeout; +} +if (typeof global$1.clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; +} + +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} +function nextTick(fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +} +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +var title = 'browser'; +var platform = 'browser'; +var browser = true; +var env = {}; +var argv = []; +var version$1 = ''; // empty string to avoid regexp issues +var versions = {}; +var release = {}; +var config = {}; + +function noop() {} + +var on = noop; +var addListener = noop; +var once = noop; +var off = noop; +var removeListener = noop; +var removeAllListeners = noop; +var emit = noop; + +function binding(name) { + throw new Error('process.binding is not supported'); +} + +function cwd () { return '/' } +function chdir (dir) { + throw new Error('process.chdir is not supported'); +}function umask() { return 0; } + +// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js +var performance = global$1.performance || {}; +var performanceNow = + performance.now || + performance.mozNow || + performance.msNow || + performance.oNow || + performance.webkitNow || + function(){ return (new Date()).getTime() }; + +// generate timestamp or delta +// see http://nodejs.org/api/process.html#process_process_hrtime +function hrtime(previousTimestamp){ + var clocktime = performanceNow.call(performance)*1e-3; + var seconds = Math.floor(clocktime); + var nanoseconds = Math.floor((clocktime%1)*1e9); + if (previousTimestamp) { + seconds = seconds - previousTimestamp[0]; + nanoseconds = nanoseconds - previousTimestamp[1]; + if (nanoseconds<0) { + seconds--; + nanoseconds += 1e9; + } + } + return [seconds,nanoseconds] +} + +var startTime = new Date(); +function uptime() { + var currentTime = new Date(); + var dif = currentTime - startTime; + return dif / 1000; +} + +var browser$1 = { + nextTick: nextTick, + title: title, + browser: browser, + env: env, + argv: argv, + version: version$1, + versions: versions, + on: on, + addListener: addListener, + once: once, + off: off, + removeListener: removeListener, + removeAllListeners: removeAllListeners, + emit: emit, + binding: binding, + cwd: cwd, + chdir: chdir, + umask: umask, + hrtime: hrtime, + platform: platform, + release: release, + config: config, + uptime: uptime +}; + +function createCache(max = 500) { + { + return /* @__PURE__ */ new Map(); + } +} + +function isImportUsed(local, sfc) { + return resolveTemplateUsedIdentifiers(sfc).has(local); +} +const templateUsageCheckCache = createCache(); +function resolveTemplateUsedIdentifiers(sfc) { + const { content, ast } = sfc.template; + const cached = templateUsageCheckCache.get(content); + if (cached) { + return cached; + } + const ids = /* @__PURE__ */ new Set(); + ast.children.forEach(walk); + function walk(node) { + var _a; + switch (node.type) { + case 1: + let tag = node.tag; + if (tag.includes(".")) + tag = tag.split(".")[0].trim(); + if (!parserOptions.isNativeTag(tag) && !parserOptions.isBuiltInComponent(tag)) { + ids.add(camelize(tag)); + ids.add(capitalize$1(camelize(tag))); + } + for (let i = 0; i < node.props.length; i++) { + const prop = node.props[i]; + if (prop.type === 7) { + if (!isBuiltInDirective(prop.name)) { + ids.add(`v${capitalize$1(camelize(prop.name))}`); + } + if (prop.arg && !prop.arg.isStatic) { + extractIdentifiers(ids, prop.arg); + } + if (prop.name === "for") { + extractIdentifiers(ids, prop.forParseResult.source); + } else if (prop.exp) { + extractIdentifiers(ids, prop.exp); + } + } + if (prop.type === 6 && prop.name === "ref" && ((_a = prop.value) == null ? void 0 : _a.content)) { + ids.add(prop.value.content); + } + } + node.children.forEach(walk); + break; + case 5: + extractIdentifiers(ids, node.content); + break; + } + } + templateUsageCheckCache.set(content, ids); + return ids; +} +function extractIdentifiers(ids, node) { + if (node.ast) { + walkIdentifiers(node.ast, (n) => ids.add(n.name)); + } else if (node.ast === null) { + ids.add(node.content); + } +} + +var __defProp$a = Object.defineProperty; +var __defProps$9 = Object.defineProperties; +var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$a = Object.getOwnPropertySymbols; +var __hasOwnProp$a = Object.prototype.hasOwnProperty; +var __propIsEnum$a = Object.prototype.propertyIsEnumerable; +var __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$a = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$a.call(b, prop)) + __defNormalProp$a(a, prop, b[prop]); + if (__getOwnPropSymbols$a) + for (var prop of __getOwnPropSymbols$a(b)) { + if (__propIsEnum$a.call(b, prop)) + __defNormalProp$a(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b)); +const DEFAULT_FILENAME = "anonymous.vue"; +const parseCache$1 = createCache(); +function genCacheKey(source, options) { + var _a; + return source + JSON.stringify( + __spreadProps$9(__spreadValues$a({}, options), { + compiler: { parse: (_a = options.compiler) == null ? void 0 : _a.parse } + }), + (_, val) => typeof val === "function" ? val.toString() : val + ); +} +function parse$7(source, options = {}) { + const sourceKey = genCacheKey(source, options); + const cache = parseCache$1.get(sourceKey); + if (cache) { + return cache; + } + const { + sourceMap = true, + filename = DEFAULT_FILENAME, + sourceRoot = "", + pad = false, + ignoreEmpty = true, + compiler = CompilerDOM, + templateParseOptions = {}, + parseExpressions = true + } = options; + const descriptor = { + filename, + source, + template: null, + script: null, + scriptSetup: null, + styles: [], + customBlocks: [], + cssVars: [], + slotted: false, + shouldForceReload: (prevImports) => hmrShouldReload(prevImports, descriptor) + }; + const errors = []; + const ast = compiler.parse(source, __spreadProps$9(__spreadValues$a({ + parseMode: "sfc", + prefixIdentifiers: parseExpressions + }, templateParseOptions), { + onError: (e) => { + errors.push(e); + } + })); + ast.children.forEach((node) => { + if (node.type !== 1) { + return; + } + if (ignoreEmpty && node.tag !== "template" && isEmpty(node) && !hasSrc(node)) { + return; + } + switch (node.tag) { + case "template": + if (!descriptor.template) { + const templateBlock = descriptor.template = createBlock( + node, + source, + false + ); + if (!templateBlock.attrs.src) { + templateBlock.ast = createRoot(node.children, source); + } + if (templateBlock.attrs.functional) { + const err = new SyntaxError( + `<template functional> is no longer supported in Vue 3, since functional components no longer have significant performance difference from stateful ones. Just use a normal <template> instead.` + ); + err.loc = node.props.find( + (p) => p.type === 6 && p.name === "functional" + ).loc; + errors.push(err); + } + } else { + errors.push(createDuplicateBlockError(node)); + } + break; + case "script": + const scriptBlock = createBlock(node, source, pad); + const isSetup = !!scriptBlock.attrs.setup; + if (isSetup && !descriptor.scriptSetup) { + descriptor.scriptSetup = scriptBlock; + break; + } + if (!isSetup && !descriptor.script) { + descriptor.script = scriptBlock; + break; + } + errors.push(createDuplicateBlockError(node, isSetup)); + break; + case "style": + const styleBlock = createBlock(node, source, pad); + if (styleBlock.attrs.vars) { + errors.push( + new SyntaxError( + `<style vars> has been replaced by a new proposal: https://github.com/vuejs/rfcs/pull/231` + ) + ); + } + descriptor.styles.push(styleBlock); + break; + default: + descriptor.customBlocks.push(createBlock(node, source, pad)); + break; + } + }); + if (!descriptor.template && !descriptor.script && !descriptor.scriptSetup) { + errors.push( + new SyntaxError( + `At least one <template> or <script> is required in a single file component.` + ) + ); + } + if (descriptor.scriptSetup) { + if (descriptor.scriptSetup.src) { + errors.push( + new SyntaxError( + `<script setup> cannot use the "src" attribute because its syntax will be ambiguous outside of the component.` + ) + ); + descriptor.scriptSetup = null; + } + if (descriptor.script && descriptor.script.src) { + errors.push( + new SyntaxError( + `<script> cannot use the "src" attribute when <script setup> is also present because they must be processed together.` + ) + ); + descriptor.script = null; + } + } + let templateColumnOffset = 0; + if (descriptor.template && (descriptor.template.lang === "pug" || descriptor.template.lang === "jade")) { + [descriptor.template.content, templateColumnOffset] = dedent( + descriptor.template.content + ); + } + if (sourceMap) { + const genMap = (block, columnOffset = 0) => { + if (block && !block.src) { + block.map = generateSourceMap( + filename, + source, + block.content, + sourceRoot, + !pad || block.type === "template" ? block.loc.start.line - 1 : 0, + columnOffset + ); + } + }; + genMap(descriptor.template, templateColumnOffset); + genMap(descriptor.script); + descriptor.styles.forEach((s) => genMap(s)); + descriptor.customBlocks.forEach((s) => genMap(s)); + } + descriptor.cssVars = parseCssVars(descriptor); + const slottedRE = /(?:::v-|:)slotted\(/; + descriptor.slotted = descriptor.styles.some( + (s) => s.scoped && slottedRE.test(s.content) + ); + const result = { + descriptor, + errors + }; + parseCache$1.set(sourceKey, result); + return result; +} +function createDuplicateBlockError(node, isScriptSetup = false) { + const err = new SyntaxError( + `Single file component can contain only one <${node.tag}${isScriptSetup ? ` setup` : ``}> element` + ); + err.loc = node.loc; + return err; +} +function createBlock(node, source, pad) { + const type = node.tag; + const loc = node.innerLoc; + const attrs = {}; + const block = { + type, + content: source.slice(loc.start.offset, loc.end.offset), + loc, + attrs + }; + if (pad) { + block.content = padContent(source, block, pad) + block.content; + } + node.props.forEach((p) => { + if (p.type === 6) { + const name = p.name; + attrs[name] = p.value ? p.value.content || true : true; + if (name === "lang") { + block.lang = p.value && p.value.content; + } else if (name === "src") { + block.src = p.value && p.value.content; + } else if (type === "style") { + if (name === "scoped") { + block.scoped = true; + } else if (name === "module") { + block.module = attrs[name]; + } + } else if (type === "script" && name === "setup") { + block.setup = attrs.setup; + } + } + }); + return block; +} +const splitRE = /\r?\n/g; +const emptyRE = /^(?:\/\/)?\s*$/; +const replaceRE = /./g; +function generateSourceMap(filename, source, generated, sourceRoot, lineOffset, columnOffset) { + const map = new SourceMapGenerator$6({ + file: filename.replace(/\\/g, "/"), + sourceRoot: sourceRoot.replace(/\\/g, "/") + }); + map.setSourceContent(filename, source); + map._sources.add(filename); + generated.split(splitRE).forEach((line, index) => { + if (!emptyRE.test(line)) { + const originalLine = index + 1 + lineOffset; + const generatedLine = index + 1; + for (let i = 0; i < line.length; i++) { + if (!/\s/.test(line[i])) { + map._mappings.add({ + originalLine, + originalColumn: i + columnOffset, + generatedLine, + generatedColumn: i, + source: filename, + // @ts-expect-error + name: null + }); + } + } + } + }); + return map.toJSON(); +} +function padContent(content, block, pad) { + content = content.slice(0, block.loc.start.offset); + if (pad === "space") { + return content.replace(replaceRE, " "); + } else { + const offset = content.split(splitRE).length; + const padChar = block.type === "script" && !block.lang ? "//\n" : "\n"; + return Array(offset).join(padChar); + } +} +function hasSrc(node) { + return node.props.some((p) => { + if (p.type !== 6) { + return false; + } + return p.name === "src"; + }); +} +function isEmpty(node) { + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (child.type !== 2 || child.content.trim() !== "") { + return false; + } + } + return true; +} +function hmrShouldReload(prevImports, next) { + if (!next.scriptSetup || next.scriptSetup.lang !== "ts" && next.scriptSetup.lang !== "tsx") { + return false; + } + for (const key in prevImports) { + if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) { + return true; + } + } + return false; +} +function dedent(s) { + const lines = s.split("\n"); + const minIndent = lines.reduce(function(minIndent2, line) { + var _a, _b; + if (line.trim() === "") { + return minIndent2; + } + const indent = ((_b = (_a = line.match(/^\s*/)) == null ? void 0 : _a[0]) == null ? void 0 : _b.length) || 0; + return Math.min(indent, minIndent2); + }, Infinity); + if (minIndent === 0) { + return [s, minIndent]; + } + return [ + lines.map(function(line) { + return line.slice(minIndent); + }).join("\n"), + minIndent + ]; +} + +/*! https://mths.be/punycode v1.4.1 by @mathias */ + + +/** Highest positive signed 32-bit float value */ +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' +var regexNonASCII = /[^\x20-\x7E]/; // unprintable ASCII chars + non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map$1(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map$1(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see <https://mathiasbynens.be/notes/javascript-encoding> + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +} + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for ( /* no initialization */ ; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +} + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +function encode$1(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */ ; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); +} + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) ? + 'xn--' + encode$1(string) : + string; + }); +} + +var lookup = []; +var revLookup = []; +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; +var inited = false; +function init () { + inited = true; + var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; + } + + revLookup['-'.charCodeAt(0)] = 62; + revLookup['_'.charCodeAt(0)] = 63; +} + +function toByteArray (b64) { + if (!inited) { + init(); + } + var i, j, l, tmp, placeHolders, arr; + var len = b64.length; + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(len * 3 / 4 - placeHolders); + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len; + + var L = 0; + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]; + arr[L++] = (tmp >> 16) & 0xFF; + arr[L++] = (tmp >> 8) & 0xFF; + arr[L++] = tmp & 0xFF; + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[L++] = tmp & 0xFF; + } else if (placeHolders === 1) { + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[L++] = (tmp >> 8) & 0xFF; + arr[L++] = tmp & 0xFF; + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp; + var output = []; + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); + output.push(tripletToBase64(tmp)); + } + return output.join('') +} + +function fromByteArray (uint8) { + if (!inited) { + init(); + } + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var output = ''; + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1]; + output += lookup[tmp >> 2]; + output += lookup[(tmp << 4) & 0x3F]; + output += '=='; + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); + output += lookup[tmp >> 10]; + output += lookup[(tmp >> 4) & 0x3F]; + output += lookup[(tmp << 2) & 0x3F]; + output += '='; + } + + parts.push(output); + + return parts.join('') +} + +function read (buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? (nBytes - 1) : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +function write (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); + var i = isLE ? 0 : (nBytes - 1); + var d = isLE ? 1 : -1; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128; +} + +var toString$1 = {}.toString; + +var isArray$2 = Array.isArray || function (arr) { + return toString$1.call(arr) == '[object Array]'; +}; + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> + * @license MIT + */ + +var INSPECT_MAX_BYTES = 50; + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Due to various browser bugs, sometimes the Object implementation will be used even + * when the browser supports typed arrays. + * + * Note: + * + * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they + * get the Object implementation, which is slower but behaves correctly. + */ +Buffer$1.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined + ? global$1.TYPED_ARRAY_SUPPORT + : true; + +/* + * Export kMaxLength after typed array support is determined. + */ +kMaxLength(); + +function kMaxLength () { + return Buffer$1.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +function createBuffer (that, length) { + if (kMaxLength() < length) { + throw new RangeError('Invalid typed array length') + } + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = new Uint8Array(length); + that.__proto__ = Buffer$1.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + if (that === null) { + that = new Buffer$1(length); + } + that.length = length; + } + + return that +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer$1 (arg, encodingOrOffset, length) { + if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) { + return new Buffer$1(arg, encodingOrOffset, length) + } + + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new Error( + 'If encoding is specified then the first argument must be a string' + ) + } + return allocUnsafe(this, arg) + } + return from(this, arg, encodingOrOffset, length) +} + +Buffer$1.poolSize = 8192; // not used by this implementation + +// TODO: Legacy, not needed anymore. Remove in next major version. +Buffer$1._augment = function (arr) { + arr.__proto__ = Buffer$1.prototype; + return arr +}; + +function from (that, value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { + return fromArrayBuffer(that, value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(that, value, encodingOrOffset) + } + + return fromObject(that, value) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer$1.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) +}; + +if (Buffer$1.TYPED_ARRAY_SUPPORT) { + Buffer$1.prototype.__proto__ = Uint8Array.prototype; + Buffer$1.__proto__ = Uint8Array; + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer$1[Symbol.species] === Buffer$1) ; +} + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } +} + +function alloc (that, size, fill, encoding) { + assertSize(size); + if (size <= 0) { + return createBuffer(that, size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) + } + return createBuffer(that, size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer$1.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) +}; + +function allocUnsafe (that, size) { + assertSize(size); + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < size; ++i) { + that[i] = 0; + } + } + return that +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer$1.allocUnsafe = function (size) { + return allocUnsafe(null, size) +}; +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer$1.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) +}; + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8'; + } + + if (!Buffer$1.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + var length = byteLength(string, encoding) | 0; + that = createBuffer(that, length); + + var actual = that.write(string, encoding); + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + that = that.slice(0, actual); + } + + return that +} + +function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + that = createBuffer(that, length); + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255; + } + return that +} + +function fromArrayBuffer (that, array, byteOffset, length) { + array.byteLength; // this throws if `array` is not a valid ArrayBuffer + + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('\'offset\' is out of bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('\'length\' is out of bounds') + } + + if (byteOffset === undefined && length === undefined) { + array = new Uint8Array(array); + } else if (length === undefined) { + array = new Uint8Array(array, byteOffset); + } else { + array = new Uint8Array(array, byteOffset, length); + } + + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = array; + that.__proto__ = Buffer$1.prototype; + } else { + // Fallback: Return an object instance of the Buffer class + that = fromArrayLike(that, array); + } + return that +} + +function fromObject (that, obj) { + if (internalIsBuffer(obj)) { + var len = checked(obj.length) | 0; + that = createBuffer(that, len); + + if (that.length === 0) { + return that + } + + obj.copy(that, 0, 0, len); + return that + } + + if (obj) { + if ((typeof ArrayBuffer !== 'undefined' && + obj.buffer instanceof ArrayBuffer) || 'length' in obj) { + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) + } + return fromArrayLike(that, obj) + } + + if (obj.type === 'Buffer' && isArray$2(obj.data)) { + return fromArrayLike(that, obj.data) + } + } + + throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') +} + +function checked (length) { + // Note: cannot use `length < kMaxLength()` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} +Buffer$1.isBuffer = isBuffer$1; +function internalIsBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer$1.compare = function compare (a, b) { + if (!internalIsBuffer(a) || !internalIsBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +}; + +Buffer$1.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +}; + +Buffer$1.concat = function concat (list, length) { + if (!isArray$2(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer$1.alloc(0) + } + + var i; + if (length === undefined) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + + var buffer = Buffer$1.allocUnsafe(length); + var pos = 0; + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + if (!internalIsBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos); + pos += buf.length; + } + return buffer +}; + +function byteLength (string, encoding) { + if (internalIsBuffer(string)) { + return string.length + } + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && + (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + string = '' + string; + } + + var len = string.length; + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + case undefined: + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +} +Buffer$1.byteLength = byteLength; + +function slowToString (encoding, start, end) { + var loweredCase = false; + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0; + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length; + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0; + start >>>= 0; + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8'; + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase(); + loweredCase = true; + } + } +} + +// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect +// Buffer instances. +Buffer$1.prototype._isBuffer = true; + +function swap$1 (b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; +} + +Buffer$1.prototype.swap16 = function swap16 () { + var len = this.length; + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap$1(this, i, i + 1); + } + return this +}; + +Buffer$1.prototype.swap32 = function swap32 () { + var len = this.length; + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap$1(this, i, i + 3); + swap$1(this, i + 1, i + 2); + } + return this +}; + +Buffer$1.prototype.swap64 = function swap64 () { + var len = this.length; + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap$1(this, i, i + 7); + swap$1(this, i + 1, i + 6); + swap$1(this, i + 2, i + 5); + swap$1(this, i + 3, i + 4); + } + return this +}; + +Buffer$1.prototype.toString = function toString () { + var length = this.length | 0; + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +}; + +Buffer$1.prototype.equals = function equals (b) { + if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer$1.compare(this, b) === 0 +}; + +Buffer$1.prototype.inspect = function inspect () { + var str = ''; + var max = INSPECT_MAX_BYTES; + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); + if (this.length > max) str += ' ... '; + } + return '<Buffer ' + str + '>' +}; + +Buffer$1.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!internalIsBuffer(target)) { + throw new TypeError('Argument must be a Buffer') + } + + if (start === undefined) { + start = 0; + } + if (end === undefined) { + end = target ? target.length : 0; + } + if (thisStart === undefined) { + thisStart = 0; + } + if (thisEnd === undefined) { + thisEnd = this.length; + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + + if (this === target) return 0 + + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); + + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +}; + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + byteOffset = +byteOffset; // Coerce to Number. + if (isNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1); + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0; + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer$1.from(val, encoding); + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (internalIsBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF; // Search for a byte value [0-255] + if (Buffer$1.TYPED_ARRAY_SUPPORT && + typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i; + if (dir) { + var foundIndex = -1; + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + for (i = byteOffset; i >= 0; i--) { + var found = true; + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer$1.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +}; + +Buffer$1.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +}; + +Buffer$1.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +}; + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + if (!length) { + length = remaining; + } else { + length = Number(length); + if (length > remaining) { + length = remaining; + } + } + + // must be an even number of digits + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2; + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (isNaN(parsed)) return i + buf[offset + i] = parsed; + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer$1.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8'; + length = this.length; + offset = 0; + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset; + length = this.length; + offset = 0; + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0; + if (isFinite(length)) { + length = length | 0; + if (encoding === undefined) encoding = 'utf8'; + } else { + encoding = length; + length = undefined; + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset; + if (length === undefined || length > remaining) length = remaining; + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8'; + + var loweredCase = false; + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase(); + loweredCase = true; + } + } +}; + +Buffer$1.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +}; + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return fromByteArray(buf) + } else { + return fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end); + var res = []; + + var i = start; + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1; + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + break + case 2: + secondByte = buf[i + 1]; + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint; + } + } + break + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint; + } + } + break + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint; + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD; + bytesPerSequence = 1; + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000; + res.push(codePoint >>> 10 & 0x3FF | 0xD800); + codePoint = 0xDC00 | codePoint & 0x3FF; + } + + res.push(codePoint); + i += bytesPerSequence; + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000; + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = ''; + var i = 0; + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ); + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F); + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = ''; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length; + + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; + + var out = ''; + for (var i = start; i < end; ++i) { + out += toHex(buf[i]); + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end); + var res = ''; + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + return res +} + +Buffer$1.prototype.slice = function slice (start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; + } + + if (end < start) end = start; + + var newBuf; + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + newBuf = this.subarray(start, end); + newBuf.__proto__ = Buffer$1.prototype; + } else { + var sliceLen = end - start; + newBuf = new Buffer$1(sliceLen, undefined); + for (var i = 0; i < sliceLen; ++i) { + newBuf[i] = this[i + start]; + } + } + + return newBuf +}; + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer$1.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + return val +}; + +Buffer$1.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + checkOffset(offset, byteLength, this.length); + } + + var val = this[offset + --byteLength]; + var mul = 1; + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; + } + + return val +}; + +Buffer$1.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset] +}; + +Buffer$1.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | (this[offset + 1] << 8) +}; + +Buffer$1.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + return (this[offset] << 8) | this[offset + 1] +}; + +Buffer$1.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +}; + +Buffer$1.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +}; + +Buffer$1.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val +}; + +Buffer$1.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val +}; + +Buffer$1.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +}; + +Buffer$1.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | (this[offset + 1] << 8); + return (val & 0x8000) ? val | 0xFFFF0000 : val +}; + +Buffer$1.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | (this[offset] << 8); + return (val & 0x8000) ? val | 0xFFFF0000 : val +}; + +Buffer$1.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +}; + +Buffer$1.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +}; + +Buffer$1.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, true, 23, 4) +}; + +Buffer$1.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, false, 23, 4) +}; + +Buffer$1.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, true, 52, 8) +}; + +Buffer$1.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, false, 52, 8) +}; + +function checkInt (buf, value, offset, ext, max, min) { + if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer$1.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var mul = 1; + var i = 0; + this[offset] = value & 0xFF; + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF; + } + + return offset + byteLength +}; + +Buffer$1.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + byteLength = byteLength | 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xFF; + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF; + } + + return offset + byteLength +}; + +Buffer$1.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + this[offset] = (value & 0xff); + return offset + 1 +}; + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8; + } +} + +Buffer$1.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + } else { + objectWriteUInt16(this, value, offset, true); + } + return offset + 2 +}; + +Buffer$1.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8); + this[offset + 1] = (value & 0xff); + } else { + objectWriteUInt16(this, value, offset, false); + } + return offset + 2 +}; + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1; + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; + } +} + +Buffer$1.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24); + this[offset + 2] = (value >>> 16); + this[offset + 1] = (value >>> 8); + this[offset] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, true); + } + return offset + 4 +}; + +Buffer$1.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24); + this[offset + 1] = (value >>> 16); + this[offset + 2] = (value >>> 8); + this[offset + 3] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, false); + } + return offset + 4 +}; + +Buffer$1.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xFF; + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; + } + + return offset + byteLength +}; + +Buffer$1.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xFF; + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; + } + + return offset + byteLength +}; + +Buffer$1.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); + if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (value < 0) value = 0xff + value + 1; + this[offset] = (value & 0xff); + return offset + 1 +}; + +Buffer$1.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + } else { + objectWriteUInt16(this, value, offset, true); + } + return offset + 2 +}; + +Buffer$1.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8); + this[offset + 1] = (value & 0xff); + } else { + objectWriteUInt16(this, value, offset, false); + } + return offset + 2 +}; + +Buffer$1.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value & 0xff); + this[offset + 1] = (value >>> 8); + this[offset + 2] = (value >>> 16); + this[offset + 3] = (value >>> 24); + } else { + objectWriteUInt32(this, value, offset, true); + } + return offset + 4 +}; + +Buffer$1.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value; + offset = offset | 0; + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + if (Buffer$1.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24); + this[offset + 1] = (value >>> 16); + this[offset + 2] = (value >>> 8); + this[offset + 3] = (value & 0xff); + } else { + objectWriteUInt32(this, value, offset, false); + } + return offset + 4 +}; + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4); + } + write(buf, value, offset, littleEndian, 23, 4); + return offset + 4 +} + +Buffer$1.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +}; + +Buffer$1.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +}; + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8); + } + write(buf, value, offset, littleEndian, 52, 8); + return offset + 8 +} + +Buffer$1.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +}; + +Buffer$1.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +}; + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer$1.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length; + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + + var len = end - start; + var i; + + if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) { + // ascending copy from start + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ); + } + + return len +}; + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer$1.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === 'string') { + encoding = end; + end = this.length; + } + if (val.length === 1) { + var code = val.charCodeAt(0); + if (code < 256) { + val = code; + } + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + } else if (typeof val === 'number') { + val = val & 255; + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + + if (!val) val = 0; + + var i; + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + var bytes = internalIsBuffer(val) + ? val + : utf8ToBytes(new Buffer$1(val, encoding).toString()); + var len = bytes.length; + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + + return this +}; + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '='; + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + continue + } + + // valid lead + leadSurrogate = codePoint; + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + leadSurrogate = codePoint; + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); + } + + leadSurrogate = null; + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ); + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF); + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo; + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + + return byteArray +} + + +function base64ToBytes (str) { + return toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i]; + } + return i +} + +function isnan (val) { + return val !== val // eslint-disable-line no-self-compare +} + + +// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +function isBuffer$1(obj) { + return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) +} + +function isFastBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} + +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)) +} + +var inherits; +if (typeof Object.create === 'function'){ + inherits = function inherits(ctor, superCtor) { + // implementation from standard node.js 'util' module + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + inherits = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; +} +var inherits$1 = inherits; + +var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || + function getOwnPropertyDescriptors(obj) { + var keys = Object.keys(obj); + var descriptors = {}; + for (var i = 0; i < keys.length; i++) { + descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]); + } + return descriptors; + }; + +var formatRegExp = /%[sdj%]/g; +function format$1(f) { + if (!isString$1(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject$1(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +} + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +function deprecate(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global$1.process)) { + return function() { + return deprecate(fn, msg).apply(this, arguments); + }; + } + + if (browser$1.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (browser$1.throwDeprecation) { + throw new Error(msg); + } else if (browser$1.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +} + +var debugs = {}; +var debugEnviron; +function debuglog(set) { + if (isUndefined(debugEnviron)) + debugEnviron = browser$1.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = 0; + debugs[set] = function() { + var msg = format$1.apply(null, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +} + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + _extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString$1(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray$1(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString$1(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty$2(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty$2(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var length = output.reduce(function(prev, cur) { + if (cur.indexOf('\n') >= 0) ; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray$1(ar) { + return Array.isArray(ar); +} + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} + +function isNull(arg) { + return arg === null; +} + +function isNullOrUndefined(arg) { + return arg == null; +} + +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isString$1(arg) { + return typeof arg === 'string'; +} + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} + +function isUndefined(arg) { + return arg === void 0; +} + +function isRegExp(re) { + return isObject$1(re) && objectToString(re) === '[object RegExp]'; +} + +function isObject$1(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isDate(d) { + return isObject$1(d) && objectToString(d) === '[object Date]'; +} + +function isError(e) { + return isObject$1(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} + +function isFunction(arg) { + return typeof arg === 'function'; +} + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} + +function isBuffer(maybeBuf) { + return Buffer$1.isBuffer(maybeBuf); +} + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +function log() { + console.log('%s - %s', timestamp(), format$1.apply(null, arguments)); +} + +function _extend(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject$1(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +} +function hasOwnProperty$2(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined; + +function promisify(original) { + if (typeof original !== 'function') + throw new TypeError('The "original" argument must be of type Function'); + + if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) { + var fn = original[kCustomPromisifiedSymbol]; + if (typeof fn !== 'function') { + throw new TypeError('The "util.promisify.custom" argument must be of type Function'); + } + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return fn; + } + + function fn() { + var promiseResolve, promiseReject; + var promise = new Promise(function (resolve, reject) { + promiseResolve = resolve; + promiseReject = reject; + }); + + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + args.push(function (err, value) { + if (err) { + promiseReject(err); + } else { + promiseResolve(value); + } + }); + + try { + original.apply(this, args); + } catch (err) { + promiseReject(err); + } + + return promise; + } + + Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); + + if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return Object.defineProperties( + fn, + getOwnPropertyDescriptors(original) + ); +} + +promisify.custom = kCustomPromisifiedSymbol; + +function callbackifyOnRejected(reason, cb) { + // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). + // Because `null` is a special error value in callbacks which means "no error + // occurred", we error-wrap so the callback consumer can distinguish between + // "the promise rejected with null" or "the promise fulfilled with undefined". + if (!reason) { + var newReason = new Error('Promise was rejected with a falsy value'); + newReason.reason = reason; + reason = newReason; + } + return cb(reason); +} + +function callbackify(original) { + if (typeof original !== 'function') { + throw new TypeError('The "original" argument must be of type Function'); + } + + // We DO NOT return the promise as it gives the user a false sense that + // the promise is actually somehow related to the callback's execution + // and that the callback throwing will reject the promise. + function callbackified() { + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + + var maybeCb = args.pop(); + if (typeof maybeCb !== 'function') { + throw new TypeError('The last argument must be of type Function'); + } + var self = this; + var cb = function() { + return maybeCb.apply(self, arguments); + }; + // In true node style we process the callback on `nextTick` with all the + // implications (stack, `uncaughtException`, `async_hooks`) + original.apply(this, args) + .then(function(ret) { browser$1.nextTick(cb.bind(null, null, ret)); }, + function(rej) { browser$1.nextTick(callbackifyOnRejected.bind(null, rej, cb)); }); + } + + Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)); + Object.defineProperties(callbackified, getOwnPropertyDescriptors(original)); + return callbackified; +} + +var _polyfillNode_util = { + inherits: inherits$1, + _extend: _extend, + log: log, + isBuffer: isBuffer, + isPrimitive: isPrimitive, + isFunction: isFunction, + isError: isError, + isDate: isDate, + isObject: isObject$1, + isRegExp: isRegExp, + isUndefined: isUndefined, + isSymbol: isSymbol, + isString: isString$1, + isNumber: isNumber, + isNullOrUndefined: isNullOrUndefined, + isNull: isNull, + isBoolean: isBoolean, + isArray: isArray$1, + inspect: inspect, + deprecate: deprecate, + format: format$1, + debuglog: debuglog, + promisify: promisify, + callbackify: callbackify, +}; + +var _polyfillNode_util$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + _extend: _extend, + callbackify: callbackify, + debuglog: debuglog, + default: _polyfillNode_util, + deprecate: deprecate, + format: format$1, + inherits: inherits$1, + inspect: inspect, + isArray: isArray$1, + isBoolean: isBoolean, + isBuffer: isBuffer, + isDate: isDate, + isError: isError, + isFunction: isFunction, + isNull: isNull, + isNullOrUndefined: isNullOrUndefined, + isNumber: isNumber, + isObject: isObject$1, + isPrimitive: isPrimitive, + isRegExp: isRegExp, + isString: isString$1, + isSymbol: isSymbol, + isUndefined: isUndefined, + log: log, + promisify: promisify +}); + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty$1(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; +function stringifyPrimitive(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +} + +function stringify$5 (obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +} +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; + +function parse$6(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty$1(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +} + +// WHATWG API +const URL$1 = global$1.URL; +const URLSearchParams = global$1.URLSearchParams; +var _polyfillNode_url = { + parse: urlParse, + resolve: urlResolve, + resolveObject: urlResolveObject, + fileURLToPath: urlFileURLToPath, + format: urlFormat, + Url: Url, + + // WHATWG API + URL: URL$1, + URLSearchParams, +}; +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }; + +function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && isObject$1(url) && url instanceof Url) return url; + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; +} +Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + return parse$5(this, url, parseQueryString, slashesDenoteHost); +}; + +function parse$5(self, url, parseQueryString, slashesDenoteHost) { + if (!isString$1(url)) { + throw new TypeError('Parameter \'url\' must be a string, not ' + typeof url); + } + + // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + var queryIndex = url.indexOf('?'), + splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + self.path = rest; + self.href = rest; + self.pathname = simplePath[1]; + if (simplePath[2]) { + self.search = simplePath[2]; + if (parseQueryString) { + self.query = parse$6(self.search.substr(1)); + } else { + self.query = self.search.substr(1); + } + } else if (parseQueryString) { + self.search = ''; + self.query = {}; + } + return self; + } + } + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + self.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + self.slashes = true; + } + } + var i, hec, l, p; + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (i = 0; i < hostEndingChars.length; i++) { + hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + self.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (i = 0; i < nonHostChars.length; i++) { + hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + self.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + parseHost(self); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + self.hostname = self.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = self.hostname[0] === '[' && + self.hostname[self.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = self.hostname.split(/\./); + for (i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + self.hostname = validParts.join('.'); + break; + } + } + } + } + + if (self.hostname.length > hostnameMaxLen) { + self.hostname = ''; + } else { + // hostnames are always lower case. + self.hostname = self.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a punycoded representation of "domain". + // It only converts parts of the domain name that + // have non-ASCII characters, i.e. it doesn't matter if + // you call it with a domain that already is ASCII-only. + self.hostname = toASCII(self.hostname); + } + + p = self.port ? ':' + self.port : ''; + var h = self.hostname || ''; + self.host = h + p; + self.href += self.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + self.hostname = self.hostname.substr(1, self.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + continue; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + self.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + self.search = rest.substr(qm); + self.query = rest.substr(qm + 1); + if (parseQueryString) { + self.query = parse$6(self.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + self.search = ''; + self.query = {}; + } + if (rest) self.pathname = rest; + if (slashedProtocol[lowerProto] && + self.hostname && !self.pathname) { + self.pathname = '/'; + } + + //to support http.request + if (self.pathname || self.search) { + p = self.pathname || ''; + var s = self.search || ''; + self.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + self.href = format(self); + return self; +} + +function urlFileURLToPath(path) { + if (typeof path === 'string') + path = new Url().parse(path); + else if (!(path instanceof Url)) + throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type ' + (typeof path) + String(path)); + if (path.protocol !== 'file:') + throw new TypeError('The URL must be of scheme file'); + return getPathFromURLPosix(path); +} + +function getPathFromURLPosix(url) { + const pathname = url.pathname; + for (let n = 0; n < pathname.length; n++) { + if (pathname[n] === '%') { + const third = pathname.codePointAt(n + 2) | 0x20; + if (pathname[n + 1] === '2' && third === 102) { + throw new TypeError( + 'must not include encoded / characters' + ); + } + } + } + return decodeURIComponent(pathname); +} + +// format a parsed object into a url string +function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (isString$1(obj)) obj = parse$5({}, obj); + return format(obj); +} + +function format(self) { + var auth = self.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = self.protocol || '', + pathname = self.pathname || '', + hash = self.hash || '', + host = false, + query = ''; + + if (self.host) { + host = auth + self.host; + } else if (self.hostname) { + host = auth + (self.hostname.indexOf(':') === -1 ? + self.hostname : + '[' + this.hostname + ']'); + if (self.port) { + host += ':' + self.port; + } + } + + if (self.query && + isObject$1(self.query) && + Object.keys(self.query).length) { + query = stringify$5(self.query); + } + + var search = self.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (self.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; +} + +Url.prototype.format = function() { + return format(this); +}; + +function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); +} + +Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); +}; + +function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); +} + +Url.prototype.resolveObject = function(relative) { + if (isString$1(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') + result[rkey] = relative[rkey]; + } + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + var relPath; + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())); + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + relPath = relative.pathname && relative.pathname.split('/') || []; + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + var authInHost; + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!isNull(result.pathname) || !isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!isNull(result.pathname) || !isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; +}; + +Url.prototype.parseHost = function() { + return parseHost(this); +}; + +function parseHost(self) { + var host = self.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + self.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) self.hostname = host; +} + +var _polyfillNode_url$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + URL: URL$1, + URLSearchParams: URLSearchParams, + Url: Url, + default: _polyfillNode_url, + fileURLToPath: urlFileURLToPath, + format: urlFormat, + parse: urlParse, + resolve: urlResolve, + resolveObject: urlResolveObject +}); + +function isRelativeUrl(url) { + const firstChar = url.charAt(0); + return firstChar === "." || firstChar === "~" || firstChar === "@"; +} +const externalRE = /^(https?:)?\/\//; +function isExternalUrl(url) { + return externalRE.test(url); +} +const dataUrlRE = /^\s*data:/i; +function isDataUrl(url) { + return dataUrlRE.test(url); +} +function parseUrl(url) { + const firstChar = url.charAt(0); + if (firstChar === "~") { + const secondChar = url.charAt(1); + url = url.slice(secondChar === "/" ? 2 : 1); + } + return parseUriParts(url); +} +function parseUriParts(urlString) { + return urlParse(isString$2(urlString) ? urlString : "", false, true); +} + +var __defProp$9 = Object.defineProperty; +var __defProps$8 = Object.defineProperties; +var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols; +var __hasOwnProp$9 = Object.prototype.hasOwnProperty; +var __propIsEnum$9 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$9 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$9.call(b, prop)) + __defNormalProp$9(a, prop, b[prop]); + if (__getOwnPropSymbols$9) + for (var prop of __getOwnPropSymbols$9(b)) { + if (__propIsEnum$9.call(b, prop)) + __defNormalProp$9(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b)); +const defaultAssetUrlOptions = { + base: null, + includeAbsolute: false, + tags: { + video: ["src", "poster"], + source: ["src"], + img: ["src"], + image: ["xlink:href", "href"], + use: ["xlink:href", "href"] + } +}; +const normalizeOptions = (options) => { + if (Object.keys(options).some((key) => isArray$3(options[key]))) { + return __spreadProps$8(__spreadValues$9({}, defaultAssetUrlOptions), { + tags: options + }); + } + return __spreadValues$9(__spreadValues$9({}, defaultAssetUrlOptions), options); +}; +const createAssetUrlTransformWithOptions = (options) => { + return (node, context) => transformAssetUrl(node, context, options); +}; +const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => { + if (node.type === 1) { + if (!node.props.length) { + return; + } + const tags = options.tags || defaultAssetUrlOptions.tags; + const attrs = tags[node.tag]; + const wildCardAttrs = tags["*"]; + if (!attrs && !wildCardAttrs) { + return; + } + const assetAttrs = (attrs || []).concat(wildCardAttrs || []); + node.props.forEach((attr, index) => { + if (attr.type !== 6 || !assetAttrs.includes(attr.name) || !attr.value || isExternalUrl(attr.value.content) || isDataUrl(attr.value.content) || attr.value.content[0] === "#" || !options.includeAbsolute && !isRelativeUrl(attr.value.content)) { + return; + } + const url = parseUrl(attr.value.content); + if (options.base && attr.value.content[0] === ".") { + const base = parseUrl(options.base); + const protocol = base.protocol || ""; + const host = base.host ? protocol + "//" + base.host : ""; + const basePath = base.path || "/"; + attr.value.content = host + (path.posix || path).join(basePath, url.path + (url.hash || "")); + return; + } + const exp = getImportsExpressionExp(url.path, url.hash, attr.loc, context); + node.props[index] = { + type: 7, + name: "bind", + arg: createSimpleExpression(attr.name, true, attr.loc), + exp, + modifiers: [], + loc: attr.loc + }; + }); + } +}; +function getImportsExpressionExp(path2, hash, loc, context) { + if (path2) { + let name; + let exp; + const existingIndex = context.imports.findIndex((i) => i.path === path2); + if (existingIndex > -1) { + name = `_imports_${existingIndex}`; + exp = context.imports[existingIndex].exp; + } else { + name = `_imports_${context.imports.length}`; + exp = createSimpleExpression( + name, + false, + loc, + 3 + ); + context.imports.push({ + exp, + path: decodeURIComponent(path2) + }); + } + if (!hash) { + return exp; + } + const hashExp = `${name} + '${hash}'`; + const finalExp = createSimpleExpression( + hashExp, + false, + loc, + 3 + ); + if (!context.hoistStatic) { + return finalExp; + } + const existingHoistIndex = context.hoists.findIndex((h) => { + return h && h.type === 4 && !h.isStatic && h.content === hashExp; + }); + if (existingHoistIndex > -1) { + return createSimpleExpression( + `_hoisted_${existingHoistIndex + 1}`, + false, + loc, + 3 + ); + } + return context.hoist(finalExp); + } else { + return createSimpleExpression(`''`, false, loc, 3); + } +} + +const srcsetTags = ["img", "source"]; +const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g; +const createSrcsetTransformWithOptions = (options) => { + return (node, context) => transformSrcset(node, context, options); +}; +const transformSrcset = (node, context, options = defaultAssetUrlOptions) => { + if (node.type === 1) { + if (srcsetTags.includes(node.tag) && node.props.length) { + node.props.forEach((attr, index) => { + if (attr.name === "srcset" && attr.type === 6) { + if (!attr.value) + return; + const value = attr.value.content; + if (!value) + return; + const imageCandidates = value.split(",").map((s) => { + const [url, descriptor] = s.replace(escapedSpaceCharacters, " ").trim().split(" ", 2); + return { url, descriptor }; + }); + for (let i = 0; i < imageCandidates.length; i++) { + const { url } = imageCandidates[i]; + if (isDataUrl(url)) { + imageCandidates[i + 1].url = url + "," + imageCandidates[i + 1].url; + imageCandidates.splice(i, 1); + } + } + const shouldProcessUrl = (url) => { + return !isExternalUrl(url) && !isDataUrl(url) && (options.includeAbsolute || isRelativeUrl(url)); + }; + if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) { + return; + } + if (options.base) { + const base = options.base; + const set = []; + let needImportTransform = false; + imageCandidates.forEach((candidate) => { + let { url, descriptor } = candidate; + descriptor = descriptor ? ` ${descriptor}` : ``; + if (url[0] === ".") { + candidate.url = (path.posix || path).join(base, url); + set.push(candidate.url + descriptor); + } else if (shouldProcessUrl(url)) { + needImportTransform = true; + } else { + set.push(url + descriptor); + } + }); + if (!needImportTransform) { + attr.value.content = set.join(", "); + return; + } + } + const compoundExpression = createCompoundExpression([], attr.loc); + imageCandidates.forEach(({ url, descriptor }, index2) => { + if (shouldProcessUrl(url)) { + const { path: path2 } = parseUrl(url); + let exp2; + if (path2) { + const existingImportsIndex = context.imports.findIndex( + (i) => i.path === path2 + ); + if (existingImportsIndex > -1) { + exp2 = createSimpleExpression( + `_imports_${existingImportsIndex}`, + false, + attr.loc, + 3 + ); + } else { + exp2 = createSimpleExpression( + `_imports_${context.imports.length}`, + false, + attr.loc, + 3 + ); + context.imports.push({ exp: exp2, path: path2 }); + } + compoundExpression.children.push(exp2); + } + } else { + const exp2 = createSimpleExpression( + `"${url}"`, + false, + attr.loc, + 3 + ); + compoundExpression.children.push(exp2); + } + const isNotLast = imageCandidates.length - 1 > index2; + if (descriptor && isNotLast) { + compoundExpression.children.push(` + ' ${descriptor}, ' + `); + } else if (descriptor) { + compoundExpression.children.push(` + ' ${descriptor}'`); + } else if (isNotLast) { + compoundExpression.children.push(` + ', ' + `); + } + }); + let exp = compoundExpression; + if (context.hoistStatic) { + exp = context.hoist(compoundExpression); + exp.constType = 3; + } + node.props[index] = { + type: 7, + name: "bind", + arg: createSimpleExpression("srcset", true, attr.loc), + exp, + modifiers: [], + loc: attr.loc + }; + } + }); + } + } +}; + +const SSR_INTERPOLATE = Symbol(`ssrInterpolate`); +const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`); +const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`); +const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`); +const SSR_RENDER_SLOT_INNER = Symbol(`ssrRenderSlotInner`); +const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`); +const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`); +const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`); +const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`); +const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`); +const SSR_RENDER_LIST = Symbol(`ssrRenderList`); +const SSR_INCLUDE_BOOLEAN_ATTR = Symbol(`ssrIncludeBooleanAttr`); +const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`); +const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`); +const SSR_RENDER_DYNAMIC_MODEL = Symbol(`ssrRenderDynamicModel`); +const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol(`ssrGetDynamicModelProps`); +const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); +const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); +const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`); +const ssrHelpers = { + [SSR_INTERPOLATE]: `ssrInterpolate`, + [SSR_RENDER_VNODE]: `ssrRenderVNode`, + [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, + [SSR_RENDER_SLOT]: `ssrRenderSlot`, + [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`, + [SSR_RENDER_CLASS]: `ssrRenderClass`, + [SSR_RENDER_STYLE]: `ssrRenderStyle`, + [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, + [SSR_RENDER_ATTR]: `ssrRenderAttr`, + [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, + [SSR_RENDER_LIST]: `ssrRenderList`, + [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`, + [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, + [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, + [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, + [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, + [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`, + [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`, + [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps` +}; +registerRuntimeHelpers(ssrHelpers); + +const ssrTransformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + processIf +); +function ssrProcessIf(node, context, disableNestedFragments = false) { + const [rootBranch] = node.branches; + const ifStatement = createIfStatement( + rootBranch.condition, + processIfBranch(rootBranch, context, disableNestedFragments) + ); + context.pushStatement(ifStatement); + let currentIf = ifStatement; + for (let i = 1; i < node.branches.length; i++) { + const branch = node.branches[i]; + const branchBlockStatement = processIfBranch( + branch, + context, + disableNestedFragments + ); + if (branch.condition) { + currentIf = currentIf.alternate = createIfStatement( + branch.condition, + branchBlockStatement + ); + } else { + currentIf.alternate = branchBlockStatement; + } + } + if (!currentIf.alternate) { + currentIf.alternate = createBlockStatement([ + createCallExpression(`_push`, ["`<!---->`"]) + ]); + } +} +function processIfBranch(branch, context, disableNestedFragments = false) { + const { children } = branch; + const needFragmentWrapper = !disableNestedFragments && (children.length !== 1 || children[0].type !== 1) && // optimize away nested fragments when the only child is a ForNode + !(children.length === 1 && children[0].type === 11); + return processChildrenAsStatement(branch, context, needFragmentWrapper); +} + +const ssrTransformFor = createStructuralDirectiveTransform( + "for", + processFor +); +function ssrProcessFor(node, context, disableNestedFragments = false) { + const needFragmentWrapper = !disableNestedFragments && (node.children.length !== 1 || node.children[0].type !== 1); + const renderLoop = createFunctionExpression( + createForLoopParams(node.parseResult) + ); + renderLoop.body = processChildrenAsStatement( + node, + context, + needFragmentWrapper + ); + if (!disableNestedFragments) { + context.pushStringPart(`<!--[-->`); + } + context.pushStatement( + createCallExpression(context.helper(SSR_RENDER_LIST), [ + node.source, + renderLoop + ]) + ); + if (!disableNestedFragments) { + context.pushStringPart(`<!--]-->`); + } +} + +const ssrTransformSlotOutlet = (node, context) => { + if (isSlotOutlet(node)) { + const { slotName, slotProps } = processSlotOutlet(node, context); + const args = [ + `_ctx.$slots`, + slotName, + slotProps || `{}`, + // fallback content placeholder. will be replaced in the process phase + `null`, + `_push`, + `_parent` + ]; + if (context.scopeId && context.slotted !== false) { + args.push(`"${context.scopeId}-s"`); + } + let method = SSR_RENDER_SLOT; + const parent = context.parent; + let componentType; + if (parent && parent.type === 1 && parent.tagType === 1 && ((componentType = resolveComponentType(parent, context, true)) === TRANSITION || componentType === TRANSITION_GROUP) && parent.children.filter((c) => c.type === 1).length === 1) { + method = SSR_RENDER_SLOT_INNER; + if (!(context.scopeId && context.slotted !== false)) { + args.push("null"); + } + args.push("true"); + } + node.ssrCodegenNode = createCallExpression(context.helper(method), args); + } +}; +function ssrProcessSlotOutlet(node, context) { + const renderCall = node.ssrCodegenNode; + if (node.children.length) { + const fallbackRenderFn = createFunctionExpression([]); + fallbackRenderFn.body = processChildrenAsStatement(node, context); + renderCall.arguments[3] = fallbackRenderFn; + } + if (context.withSlotScopeId) { + const slotScopeId = renderCall.arguments[6]; + renderCall.arguments[6] = slotScopeId ? `${slotScopeId} + _scopeId` : `_scopeId`; + } + context.pushStatement(node.ssrCodegenNode); +} + +function createSSRCompilerError(code, loc) { + return createCompilerError(code, loc, SSRErrorMessages); +} +const SSRErrorMessages = { + [65]: `Unsafe attribute name for SSR.`, + [66]: `Missing the 'to' prop on teleport element.`, + [67]: `Invalid AST node during SSR transform.` +}; + +function ssrProcessTeleport(node, context) { + const targetProp = findProp(node, "to"); + if (!targetProp) { + context.onError( + createSSRCompilerError(66, node.loc) + ); + return; + } + let target; + if (targetProp.type === 6) { + target = targetProp.value && createSimpleExpression(targetProp.value.content, true); + } else { + target = targetProp.exp; + } + if (!target) { + context.onError( + createSSRCompilerError( + 66, + targetProp.loc + ) + ); + return; + } + const disabledProp = findProp( + node, + "disabled", + false, + true + /* allow empty */ + ); + const disabled = disabledProp ? disabledProp.type === 6 ? `true` : disabledProp.exp || `false` : `false`; + const contentRenderFn = createFunctionExpression( + [`_push`], + void 0, + // Body is added later + true, + // newline + false, + // isSlot + node.loc + ); + contentRenderFn.body = processChildrenAsStatement(node, context); + context.pushStatement( + createCallExpression(context.helper(SSR_RENDER_TELEPORT), [ + `_push`, + contentRenderFn, + target, + disabled, + `_parent` + ]) + ); +} + +const wipMap$3 = /* @__PURE__ */ new WeakMap(); +function ssrTransformSuspense(node, context) { + return () => { + if (node.children.length) { + const wipEntry = { + slotsExp: null, + // to be immediately set + wipSlots: [] + }; + wipMap$3.set(node, wipEntry); + wipEntry.slotsExp = buildSlots( + node, + context, + (_props, _vForExp, children, loc) => { + const fn = createFunctionExpression( + [], + void 0, + // no return, assign body later + true, + // newline + false, + // suspense slots are not treated as normal slots + loc + ); + wipEntry.wipSlots.push({ + fn, + children + }); + return fn; + } + ).slots; + } + }; +} +function ssrProcessSuspense(node, context) { + const wipEntry = wipMap$3.get(node); + if (!wipEntry) { + return; + } + const { slotsExp, wipSlots } = wipEntry; + for (let i = 0; i < wipSlots.length; i++) { + const slot = wipSlots[i]; + slot.fn.body = processChildrenAsStatement(slot, context); + } + context.pushStatement( + createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [ + `_push`, + slotsExp + ]) + ); +} + +const rawChildrenMap = /* @__PURE__ */ new WeakMap(); +const ssrTransformElement = (node, context) => { + if (node.type !== 1 || node.tagType !== 0) { + return; + } + return function ssrPostTransformElement() { + const openTag = [`<${node.tag}`]; + const needTagForRuntime = node.tag === "textarea" || node.tag.indexOf("-") > 0; + const hasDynamicVBind = hasDynamicKeyVBind(node); + const hasCustomDir = node.props.some( + (p) => p.type === 7 && !isBuiltInDirective(p.name) + ); + const needMergeProps = hasDynamicVBind || hasCustomDir; + if (needMergeProps) { + const { props, directives } = buildProps( + node, + context, + node.props, + false, + false, + true + ); + if (props || directives.length) { + const mergedProps = buildSSRProps(props, directives, context); + const propsExp = createCallExpression( + context.helper(SSR_RENDER_ATTRS), + [mergedProps] + ); + if (node.tag === "textarea") { + const existingText = node.children[0]; + if (!existingText || existingText.type !== 5) { + const tempId = `_temp${context.temps++}`; + propsExp.arguments = [ + createAssignmentExpression( + createSimpleExpression(tempId, false), + mergedProps + ) + ]; + rawChildrenMap.set( + node, + createCallExpression(context.helper(SSR_INTERPOLATE), [ + createConditionalExpression( + createSimpleExpression(`"value" in ${tempId}`, false), + createSimpleExpression(`${tempId}.value`, false), + createSimpleExpression( + existingText ? existingText.content : ``, + true + ), + false + ) + ]) + ); + } + } else if (node.tag === "input") { + const vModel = findVModel(node); + if (vModel) { + const tempId = `_temp${context.temps++}`; + const tempExp = createSimpleExpression(tempId, false); + propsExp.arguments = [ + createSequenceExpression([ + createAssignmentExpression(tempExp, mergedProps), + createCallExpression(context.helper(MERGE_PROPS), [ + tempExp, + createCallExpression( + context.helper(SSR_GET_DYNAMIC_MODEL_PROPS), + [ + tempExp, + // existing props + vModel.exp + // model + ] + ) + ]) + ]) + ]; + } + } + if (needTagForRuntime) { + propsExp.arguments.push(`"${node.tag}"`); + } + openTag.push(propsExp); + } + } + let dynamicClassBinding = void 0; + let staticClassBinding = void 0; + let dynamicStyleBinding = void 0; + for (let i = 0; i < node.props.length; i++) { + const prop = node.props[i]; + if (node.tag === "input" && isTrueFalseValue(prop)) { + continue; + } + if (prop.type === 7) { + if (prop.name === "html" && prop.exp) { + rawChildrenMap.set(node, prop.exp); + } else if (prop.name === "text" && prop.exp) { + node.children = [createInterpolation(prop.exp, prop.loc)]; + } else if (prop.name === "slot") { + context.onError( + createCompilerError(40, prop.loc) + ); + } else if (isTextareaWithValue(node, prop) && prop.exp) { + if (!needMergeProps) { + node.children = [createInterpolation(prop.exp, prop.loc)]; + } + } else if (!needMergeProps && prop.name !== "on") { + const directiveTransform = context.directiveTransforms[prop.name]; + if (directiveTransform) { + const { props, ssrTagParts } = directiveTransform( + prop, + node, + context + ); + if (ssrTagParts) { + openTag.push(...ssrTagParts); + } + for (let j = 0; j < props.length; j++) { + const { key, value } = props[j]; + if (isStaticExp(key)) { + let attrName = key.content; + if (attrName === "key" || attrName === "ref") { + continue; + } + if (attrName === "class") { + openTag.push( + ` class="`, + dynamicClassBinding = createCallExpression( + context.helper(SSR_RENDER_CLASS), + [value] + ), + `"` + ); + } else if (attrName === "style") { + if (dynamicStyleBinding) { + mergeCall(dynamicStyleBinding, value); + } else { + openTag.push( + ` style="`, + dynamicStyleBinding = createCallExpression( + context.helper(SSR_RENDER_STYLE), + [value] + ), + `"` + ); + } + } else { + attrName = node.tag.indexOf("-") > 0 ? attrName : propsToAttrMap[attrName] || attrName.toLowerCase(); + if (isBooleanAttr(attrName)) { + openTag.push( + createConditionalExpression( + createCallExpression( + context.helper(SSR_INCLUDE_BOOLEAN_ATTR), + [value] + ), + createSimpleExpression(" " + attrName, true), + createSimpleExpression("", true), + false + ) + ); + } else if (isSSRSafeAttrName(attrName)) { + openTag.push( + createCallExpression(context.helper(SSR_RENDER_ATTR), [ + key, + value + ]) + ); + } else { + context.onError( + createSSRCompilerError( + 65, + key.loc + ) + ); + } + } + } else { + const args = [key, value]; + if (needTagForRuntime) { + args.push(`"${node.tag}"`); + } + openTag.push( + createCallExpression( + context.helper(SSR_RENDER_DYNAMIC_ATTR), + args + ) + ); + } + } + } + } + } else { + const name = prop.name; + if (node.tag === "textarea" && name === "value" && prop.value) { + rawChildrenMap.set(node, escapeHtml(prop.value.content)); + } else if (!needMergeProps) { + if (name === "key" || name === "ref") { + continue; + } + if (name === "class" && prop.value) { + staticClassBinding = JSON.stringify(prop.value.content); + } + openTag.push( + ` ${prop.name}` + (prop.value ? `="${escapeHtml(prop.value.content)}"` : ``) + ); + } + } + } + if (dynamicClassBinding && staticClassBinding) { + mergeCall(dynamicClassBinding, staticClassBinding); + removeStaticBinding(openTag, "class"); + } + if (context.scopeId) { + openTag.push(` ${context.scopeId}`); + } + node.ssrCodegenNode = createTemplateLiteral(openTag); + }; +}; +function buildSSRProps(props, directives, context) { + let mergePropsArgs = []; + if (props) { + if (props.type === 14) { + mergePropsArgs = props.arguments; + } else { + mergePropsArgs.push(props); + } + } + if (directives.length) { + for (const dir of directives) { + mergePropsArgs.push( + createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [ + `_ctx`, + ...buildDirectiveArgs(dir, context).elements + ]) + ); + } + } + return mergePropsArgs.length > 1 ? createCallExpression(context.helper(MERGE_PROPS), mergePropsArgs) : mergePropsArgs[0]; +} +function isTrueFalseValue(prop) { + if (prop.type === 7) { + return prop.name === "bind" && prop.arg && isStaticExp(prop.arg) && (prop.arg.content === "true-value" || prop.arg.content === "false-value"); + } else { + return prop.name === "true-value" || prop.name === "false-value"; + } +} +function isTextareaWithValue(node, prop) { + return !!(node.tag === "textarea" && prop.name === "bind" && isStaticArgOf(prop.arg, "value")); +} +function mergeCall(call, arg) { + const existing = call.arguments[0]; + if (existing.type === 17) { + existing.elements.push(arg); + } else { + call.arguments[0] = createArrayExpression([existing, arg]); + } +} +function removeStaticBinding(tag, binding) { + const regExp = new RegExp(`^ ${binding}=".+"$`); + const i = tag.findIndex((e) => typeof e === "string" && regExp.test(e)); + if (i > -1) { + tag.splice(i, 1); + } +} +function findVModel(node) { + return node.props.find( + (p) => p.type === 7 && p.name === "model" && p.exp + ); +} +function ssrProcessElement(node, context) { + const isVoidTag = context.options.isVoidTag || NO; + const elementsToAdd = node.ssrCodegenNode.elements; + for (let j = 0; j < elementsToAdd.length; j++) { + context.pushStringPart(elementsToAdd[j]); + } + if (context.withSlotScopeId) { + context.pushStringPart(createSimpleExpression(`_scopeId`, false)); + } + context.pushStringPart(`>`); + const rawChildren = rawChildrenMap.get(node); + if (rawChildren) { + context.pushStringPart(rawChildren); + } else if (node.children.length) { + processChildren(node, context); + } + if (!isVoidTag(node.tag)) { + context.pushStringPart(`</${node.tag}>`); + } +} + +const wipMap$2 = /* @__PURE__ */ new WeakMap(); +function ssrTransformTransitionGroup(node, context) { + return () => { + const tag = findProp(node, "tag"); + if (tag) { + const otherProps = node.props.filter((p) => p !== tag); + const { props, directives } = buildProps( + node, + context, + otherProps, + true, + false, + true + ); + let propsExp = null; + if (props || directives.length) { + propsExp = createCallExpression(context.helper(SSR_RENDER_ATTRS), [ + buildSSRProps(props, directives, context) + ]); + } + wipMap$2.set(node, { + tag, + propsExp, + scopeId: context.scopeId || null + }); + } + }; +} +function ssrProcessTransitionGroup(node, context) { + const entry = wipMap$2.get(node); + if (entry) { + const { tag, propsExp, scopeId } = entry; + if (tag.type === 7) { + context.pushStringPart(`<`); + context.pushStringPart(tag.exp); + if (propsExp) { + context.pushStringPart(propsExp); + } + if (scopeId) { + context.pushStringPart(` ${scopeId}`); + } + context.pushStringPart(`>`); + processChildren( + node, + context, + false, + /** + * TransitionGroup has the special runtime behavior of flattening and + * concatenating all children into a single fragment (in order for them to + * be patched using the same key map) so we need to account for that here + * by disabling nested fragment wrappers from being generated. + */ + true + ); + context.pushStringPart(`</`); + context.pushStringPart(tag.exp); + context.pushStringPart(`>`); + } else { + context.pushStringPart(`<${tag.value.content}`); + if (propsExp) { + context.pushStringPart(propsExp); + } + if (scopeId) { + context.pushStringPart(` ${scopeId}`); + } + context.pushStringPart(`>`); + processChildren(node, context, false, true); + context.pushStringPart(`</${tag.value.content}>`); + } + } else { + processChildren(node, context, true, true); + } +} + +const wipMap$1 = /* @__PURE__ */ new WeakMap(); +function ssrTransformTransition(node, context) { + return () => { + const appear = findProp(node, "appear", false, true); + wipMap$1.set(node, !!appear); + }; +} +function ssrProcessTransition(node, context) { + node.children = node.children.filter((c) => c.type !== 3); + const appear = wipMap$1.get(node); + if (appear) { + context.pushStringPart(`<template>`); + processChildren(node, context, false, true); + context.pushStringPart(`</template>`); + } else { + processChildren(node, context, false, true); + } +} + +var __defProp$8 = Object.defineProperty; +var __defProps$7 = Object.defineProperties; +var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols; +var __hasOwnProp$8 = Object.prototype.hasOwnProperty; +var __propIsEnum$8 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$8 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$8.call(b, prop)) + __defNormalProp$8(a, prop, b[prop]); + if (__getOwnPropSymbols$8) + for (var prop of __getOwnPropSymbols$8(b)) { + if (__propIsEnum$8.call(b, prop)) + __defNormalProp$8(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b)); +const wipMap = /* @__PURE__ */ new WeakMap(); +const WIP_SLOT = Symbol(); +const componentTypeMap = /* @__PURE__ */ new WeakMap(); +const ssrTransformComponent = (node, context) => { + if (node.type !== 1 || node.tagType !== 1) { + return; + } + const component = resolveComponentType( + node, + context, + true + /* ssr */ + ); + const isDynamicComponent = isObject$2(component) && component.callee === RESOLVE_DYNAMIC_COMPONENT; + componentTypeMap.set(node, component); + if (isSymbol$1(component)) { + if (component === SUSPENSE) { + return ssrTransformSuspense(node, context); + } else if (component === TRANSITION_GROUP) { + return ssrTransformTransitionGroup(node, context); + } else if (component === TRANSITION) { + return ssrTransformTransition(node); + } + return; + } + const vnodeBranches = []; + const clonedNode = clone(node); + return function ssrPostTransformComponent() { + if (clonedNode.children.length) { + buildSlots(clonedNode, context, (props, vFor, children) => { + vnodeBranches.push( + createVNodeSlotBranch(props, vFor, children, context) + ); + return createFunctionExpression(void 0); + }); + } + let propsExp = `null`; + if (node.props.length) { + const { props, directives } = buildProps( + node, + context, + void 0, + true, + isDynamicComponent + ); + if (props || directives.length) { + propsExp = buildSSRProps(props, directives, context); + } + } + const wipEntries = []; + wipMap.set(node, wipEntries); + const buildSSRSlotFn = (props, _vForExp, children, loc) => { + const param0 = props && stringifyExpression(props) || `_`; + const fn = createFunctionExpression( + [param0, `_push`, `_parent`, `_scopeId`], + void 0, + // no return, assign body later + true, + // newline + true, + // isSlot + loc + ); + wipEntries.push({ + type: WIP_SLOT, + fn, + children, + // also collect the corresponding vnode branch built earlier + vnodeBranch: vnodeBranches[wipEntries.length] + }); + return fn; + }; + const slots = node.children.length ? buildSlots(node, context, buildSSRSlotFn).slots : `null`; + if (typeof component !== "string") { + node.ssrCodegenNode = createCallExpression( + context.helper(SSR_RENDER_VNODE), + [ + `_push`, + createCallExpression(context.helper(CREATE_VNODE), [ + component, + propsExp, + slots + ]), + `_parent` + ] + ); + } else { + node.ssrCodegenNode = createCallExpression( + context.helper(SSR_RENDER_COMPONENT), + [component, propsExp, slots, `_parent`] + ); + } + }; +}; +function ssrProcessComponent(node, context, parent) { + const component = componentTypeMap.get(node); + if (!node.ssrCodegenNode) { + if (component === TELEPORT) { + return ssrProcessTeleport(node, context); + } else if (component === SUSPENSE) { + return ssrProcessSuspense(node, context); + } else if (component === TRANSITION_GROUP) { + return ssrProcessTransitionGroup(node, context); + } else { + if (parent.type === WIP_SLOT) { + context.pushStringPart(``); + } + if (component === TRANSITION) { + return ssrProcessTransition(node, context); + } + processChildren(node, context); + } + } else { + const wipEntries = wipMap.get(node) || []; + for (let i = 0; i < wipEntries.length; i++) { + const { fn, vnodeBranch } = wipEntries[i]; + fn.body = createIfStatement( + createSimpleExpression(`_push`, false), + processChildrenAsStatement( + wipEntries[i], + context, + false, + true + ), + vnodeBranch + ); + } + if (context.withSlotScopeId) { + node.ssrCodegenNode.arguments.push(`_scopeId`); + } + if (typeof component === "string") { + context.pushStatement( + createCallExpression(`_push`, [node.ssrCodegenNode]) + ); + } else { + context.pushStatement(node.ssrCodegenNode); + } + } +} +const rawOptionsMap = /* @__PURE__ */ new WeakMap(); +const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset(true); +const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms]; +const vnodeDirectiveTransforms = __spreadValues$8(__spreadValues$8({}, baseDirectiveTransforms), DOMDirectiveTransforms); +function createVNodeSlotBranch(slotProps, vFor, children, parentContext) { + const rawOptions = rawOptionsMap.get(parentContext.root); + const subOptions = __spreadProps$7(__spreadValues$8({}, rawOptions), { + // overwrite with vnode-based transforms + nodeTransforms: [ + ...vnodeNodeTransforms, + ...rawOptions.nodeTransforms || [] + ], + directiveTransforms: __spreadValues$8(__spreadValues$8({}, vnodeDirectiveTransforms), rawOptions.directiveTransforms || {}) + }); + const wrapperProps = []; + if (slotProps) { + wrapperProps.push({ + type: 7, + name: "slot", + exp: slotProps, + arg: void 0, + modifiers: [], + loc: locStub + }); + } + if (vFor) { + wrapperProps.push(extend({}, vFor)); + } + const wrapperNode = { + type: 1, + ns: 0, + tag: "template", + tagType: 3, + props: wrapperProps, + children, + loc: locStub, + codegenNode: void 0 + }; + subTransform(wrapperNode, subOptions, parentContext); + return createReturnStatement(children); +} +function subTransform(node, options, parentContext) { + const childRoot = createRoot([node]); + const childContext = createTransformContext(childRoot, options); + childContext.ssr = false; + childContext.scopes = __spreadValues$8({}, parentContext.scopes); + childContext.identifiers = __spreadValues$8({}, parentContext.identifiers); + childContext.imports = parentContext.imports; + traverseNode(childRoot, childContext); + ["helpers", "components", "directives"].forEach((key) => { + childContext[key].forEach((value, helperKey) => { + if (key === "helpers") { + const parentCount = parentContext.helpers.get(helperKey); + if (parentCount === void 0) { + parentContext.helpers.set(helperKey, value); + } else { + parentContext.helpers.set(helperKey, value + parentCount); + } + } else { + parentContext[key].add(value); + } + }); + }); +} +function clone(v) { + if (isArray$3(v)) { + return v.map(clone); + } else if (isPlainObject(v)) { + const res = {}; + for (const key in v) { + res[key] = clone(v[key]); + } + return res; + } else { + return v; + } +} + +function ssrCodegenTransform(ast, options) { + const context = createSSRTransformContext(ast, options); + if (options.ssrCssVars) { + const cssContext = createTransformContext(createRoot([]), options); + const varsExp = processExpression( + createSimpleExpression(options.ssrCssVars, false), + cssContext + ); + context.body.push( + createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`]) + ); + Array.from(cssContext.helpers.keys()).forEach((helper) => { + ast.helpers.add(helper); + }); + } + const isFragment = ast.children.length > 1 && ast.children.some((c) => !isText$1(c)); + processChildren(ast, context, isFragment); + ast.codegenNode = createBlockStatement(context.body); + ast.ssrHelpers = Array.from( + /* @__PURE__ */ new Set([ + ...Array.from(ast.helpers).filter((h) => h in ssrHelpers), + ...context.helpers + ]) + ); + ast.helpers = new Set(Array.from(ast.helpers).filter((h) => !(h in ssrHelpers))); +} +function createSSRTransformContext(root, options, helpers = /* @__PURE__ */ new Set(), withSlotScopeId = false) { + const body = []; + let currentString = null; + return { + root, + options, + body, + helpers, + withSlotScopeId, + onError: options.onError || ((e) => { + throw e; + }), + helper(name) { + helpers.add(name); + return name; + }, + pushStringPart(part) { + if (!currentString) { + const currentCall = createCallExpression(`_push`); + body.push(currentCall); + currentString = createTemplateLiteral([]); + currentCall.arguments.push(currentString); + } + const bufferedElements = currentString.elements; + const lastItem = bufferedElements[bufferedElements.length - 1]; + if (isString$2(part) && isString$2(lastItem)) { + bufferedElements[bufferedElements.length - 1] += part; + } else { + bufferedElements.push(part); + } + }, + pushStatement(statement) { + currentString = null; + body.push(statement); + } + }; +} +function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) { + return createSSRTransformContext( + parent.root, + parent.options, + parent.helpers, + withSlotScopeId + ); +} +function processChildren(parent, context, asFragment = false, disableNestedFragments = false) { + if (asFragment) { + context.pushStringPart(`<!--[-->`); + } + const { children } = parent; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + switch (child.tagType) { + case 0: + ssrProcessElement(child, context); + break; + case 1: + ssrProcessComponent(child, context, parent); + break; + case 2: + ssrProcessSlotOutlet(child, context); + break; + case 3: + break; + default: + context.onError( + createSSRCompilerError( + 67, + child.loc + ) + ); + const exhaustiveCheck2 = child; + return exhaustiveCheck2; + } + break; + case 2: + context.pushStringPart(escapeHtml(child.content)); + break; + case 3: + context.pushStringPart(`<!--${child.content}-->`); + break; + case 5: + context.pushStringPart( + createCallExpression(context.helper(SSR_INTERPOLATE), [ + child.content + ]) + ); + break; + case 9: + ssrProcessIf(child, context, disableNestedFragments); + break; + case 11: + ssrProcessFor(child, context, disableNestedFragments); + break; + case 10: + break; + case 12: + case 8: + break; + default: + context.onError( + createSSRCompilerError( + 67, + child.loc + ) + ); + const exhaustiveCheck = child; + return exhaustiveCheck; + } + } + if (asFragment) { + context.pushStringPart(`<!--]-->`); + } +} +function processChildrenAsStatement(parent, parentContext, asFragment = false, withSlotScopeId = parentContext.withSlotScopeId) { + const childContext = createChildContext(parentContext, withSlotScopeId); + processChildren(parent, childContext, asFragment); + return createBlockStatement(childContext.body); +} + +const ssrTransformModel = (dir, node, context) => { + const model = dir.exp; + function checkDuplicatedValue() { + const value = findProp(node, "value"); + if (value) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + function processOption(plainNode) { + if (plainNode.tag === "option") { + if (plainNode.props.findIndex((p) => p.name === "selected") === -1) { + const value = findValueBinding(plainNode); + plainNode.ssrCodegenNode.elements.push( + createConditionalExpression( + createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [ + createConditionalExpression( + createCallExpression(`Array.isArray`, [model]), + createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ + model, + value + ]), + createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + value + ]) + ) + ]), + createSimpleExpression(" selected", true), + createSimpleExpression("", true), + false + ) + ); + } + } else if (plainNode.tag === "optgroup") { + plainNode.children.forEach( + (option) => processOption(option) + ); + } + } + if (node.tagType === 0) { + const res = { props: [] }; + const defaultProps = [ + // default value binding for text type inputs + createObjectProperty(`value`, model) + ]; + if (node.tag === "input") { + const type = findProp(node, "type"); + if (type) { + const value = findValueBinding(node); + if (type.type === 7) { + res.ssrTagParts = [ + createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [ + type.exp, + model, + value + ]) + ]; + } else if (type.value) { + switch (type.value.content) { + case "radio": + res.props = [ + createObjectProperty( + `checked`, + createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + value + ]) + ) + ]; + break; + case "checkbox": + const trueValueBinding = findProp(node, "true-value"); + if (trueValueBinding) { + const trueValue = trueValueBinding.type === 6 ? JSON.stringify(trueValueBinding.value.content) : trueValueBinding.exp; + res.props = [ + createObjectProperty( + `checked`, + createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + trueValue + ]) + ) + ]; + } else { + res.props = [ + createObjectProperty( + `checked`, + createConditionalExpression( + createCallExpression(`Array.isArray`, [model]), + createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ + model, + value + ]), + model + ) + ) + ]; + } + break; + case "file": + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + res.props = defaultProps; + break; + } + } + } else if (hasDynamicKeyVBind(node)) ; else { + checkDuplicatedValue(); + res.props = defaultProps; + } + } else if (node.tag === "textarea") { + checkDuplicatedValue(); + node.children = [createInterpolation(model, model.loc)]; + } else if (node.tag === "select") { + node.children.forEach((child) => { + if (child.type === 1) { + processOption(child); + } + }); + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + return res; + } else { + return transformModel$1(dir, node, context); + } +}; +function findValueBinding(node) { + const valueBinding = findProp(node, "value"); + return valueBinding ? valueBinding.type === 7 ? valueBinding.exp : createSimpleExpression(valueBinding.value.content, true) : createSimpleExpression(`null`, false); +} + +const ssrTransformShow = (dir, node, context) => { + if (!dir.exp) { + context.onError( + createDOMCompilerError(61) + ); + } + return { + props: [ + createObjectProperty( + `style`, + createConditionalExpression( + dir.exp, + createSimpleExpression(`null`, false), + createObjectExpression([ + createObjectProperty( + `display`, + createSimpleExpression(`none`, true) + ) + ]), + false + ) + ) + ] + }; +}; + +const filterChild = (node) => node.children.filter((n) => n.type !== 3); +const hasSingleChild = (node) => filterChild(node).length === 1; +const ssrInjectFallthroughAttrs = (node, context) => { + if (node.type === 0) { + context.identifiers._attrs = 1; + } + if (node.type === 1 && node.tagType === 1 && (node.tag === "transition" || node.tag === "Transition" || node.tag === "KeepAlive" || node.tag === "keep-alive")) { + const rootChildren = filterChild(context.root); + if (rootChildren.length === 1 && rootChildren[0] === node) { + if (hasSingleChild(node)) { + injectFallthroughAttrs(node.children[0]); + } + return; + } + } + const parent = context.parent; + if (!parent || parent.type !== 0) { + return; + } + if (node.type === 10 && hasSingleChild(node)) { + let hasEncounteredIf = false; + for (const c of filterChild(parent)) { + if (c.type === 9 || c.type === 1 && findDir(c, "if")) { + if (hasEncounteredIf) + return; + hasEncounteredIf = true; + } else if ( + // node before v-if + !hasEncounteredIf || // non else nodes + !(c.type === 1 && findDir(c, /else/, true)) + ) { + return; + } + } + injectFallthroughAttrs(node.children[0]); + } else if (hasSingleChild(parent)) { + injectFallthroughAttrs(node); + } +}; +function injectFallthroughAttrs(node) { + if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !findDir(node, "for")) { + node.props.push({ + type: 7, + name: "bind", + arg: void 0, + exp: createSimpleExpression(`_attrs`, false), + modifiers: [], + loc: locStub + }); + } +} + +const ssrInjectCssVars = (node, context) => { + if (!context.ssrCssVars) { + return; + } + if (node.type === 0) { + context.identifiers._cssVars = 1; + } + const parent = context.parent; + if (!parent || parent.type !== 0) { + return; + } + if (node.type === 10) { + for (const child of node.children) { + injectCssVars(child); + } + } else { + injectCssVars(node); + } +}; +function injectCssVars(node) { + if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !findDir(node, "for")) { + if (node.tag === "suspense" || node.tag === "Suspense") { + for (const child of node.children) { + if (child.type === 1 && child.tagType === 3) { + child.children.forEach(injectCssVars); + } else { + injectCssVars(child); + } + } + } else { + node.props.push({ + type: 7, + name: "bind", + arg: void 0, + exp: createSimpleExpression(`_cssVars`, false), + modifiers: [], + loc: locStub + }); + } + } +} + +var __defProp$7 = Object.defineProperty; +var __defProps$6 = Object.defineProperties; +var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols; +var __hasOwnProp$7 = Object.prototype.hasOwnProperty; +var __propIsEnum$7 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$7 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$7.call(b, prop)) + __defNormalProp$7(a, prop, b[prop]); + if (__getOwnPropSymbols$7) + for (var prop of __getOwnPropSymbols$7(b)) { + if (__propIsEnum$7.call(b, prop)) + __defNormalProp$7(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b)); +function compile(source, options = {}) { + options = __spreadProps$6(__spreadValues$7(__spreadValues$7({}, options), parserOptions), { + ssr: true, + inSSR: true, + scopeId: options.mode === "function" ? null : options.scopeId, + // always prefix since compiler-ssr doesn't have size concern + prefixIdentifiers: true, + // disable optimizations that are unnecessary for ssr + cacheHandlers: false, + hoistStatic: false + }); + const ast = typeof source === "string" ? baseParse(source, options) : source; + rawOptionsMap.set(ast, options); + transform(ast, __spreadProps$6(__spreadValues$7({}, options), { + hoistStatic: false, + nodeTransforms: [ + ssrTransformIf, + ssrTransformFor, + trackVForSlotScopes, + transformExpression, + ssrTransformSlotOutlet, + ssrInjectFallthroughAttrs, + ssrInjectCssVars, + ssrTransformElement, + ssrTransformComponent, + trackSlotScopes, + transformStyle, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: __spreadValues$7({ + // reusing core v-bind + bind: transformBind, + on: transformOn$1, + // model and show have dedicated SSR handling + model: ssrTransformModel, + show: ssrTransformShow, + // the following are ignored during SSR + // on: noopDirectiveTransform, + cloak: noopDirectiveTransform, + once: noopDirectiveTransform, + memo: noopDirectiveTransform + }, options.directiveTransforms || {}) + })); + ssrCodegenTransform(ast, options); + return generate(ast, options); +} + +var CompilerSSR = /*#__PURE__*/Object.freeze({ + __proto__: null, + compile: compile +}); + +var _polyfillNode_fs = {}; + +var _polyfillNode_fs$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + default: _polyfillNode_fs +}); + +var require$$0$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_fs$1); + +var require$$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path); + +var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_util$1); + +const hasWarned = {}; +function warnOnce$3(msg) { + const isNodeProd = typeof process !== "undefined" && process.env.NODE_ENV === "production"; + if (!isNodeProd && true && !hasWarned[msg]) { + hasWarned[msg] = true; + warn(msg); + } +} +function warn(msg) { + console.warn( + `\x1B[1m\x1B[33m[@vue/compiler-sfc]\x1B[0m\x1B[33m ${msg}\x1B[0m +` + ); +} + +var __defProp$6 = Object.defineProperty; +var __defProps$5 = Object.defineProperties; +var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols; +var __hasOwnProp$6 = Object.prototype.hasOwnProperty; +var __propIsEnum$6 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$6 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$6.call(b, prop)) + __defNormalProp$6(a, prop, b[prop]); + if (__getOwnPropSymbols$6) + for (var prop of __getOwnPropSymbols$6(b)) { + if (__propIsEnum$6.call(b, prop)) + __defNormalProp$6(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b)); +function preprocess$1({ source, filename, preprocessOptions }, preprocessor) { + let res = ""; + let err = null; + preprocessor.render( + source, + __spreadValues$6({ filename }, preprocessOptions), + (_err, _res) => { + if (_err) + err = _err; + res = _res; + } + ); + if (err) + throw err; + return res; +} +function compileTemplate(options) { + const { preprocessLang, preprocessCustomRequire } = options; + if (preprocessLang && !preprocessCustomRequire) { + throw new Error( + `[@vue/compiler-sfc] Template preprocessing in the browser build must provide the \`preprocessCustomRequire\` option to return the in-browser version of the preprocessor in the shape of { render(): string }.` + ); + } + const preprocessor = preprocessLang ? preprocessCustomRequire ? preprocessCustomRequire(preprocessLang) : void 0 : false; + if (preprocessor) { + try { + return doCompileTemplate(__spreadProps$5(__spreadValues$6({}, options), { + source: preprocess$1(options, preprocessor), + ast: void 0 + // invalidate AST if template goes through preprocessor + })); + } catch (e) { + return { + code: `export default function render() {}`, + source: options.source, + tips: [], + errors: [e] + }; + } + } else if (preprocessLang) { + return { + code: `export default function render() {}`, + source: options.source, + tips: [ + `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.` + ], + errors: [ + `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.` + ] + }; + } else { + return doCompileTemplate(options); + } +} +function doCompileTemplate({ + filename, + id, + scoped, + slotted, + inMap, + source, + ast: inAST, + ssr = false, + ssrCssVars, + isProd = false, + compiler, + compilerOptions = {}, + transformAssetUrls +}) { + const errors = []; + const warnings = []; + let nodeTransforms = []; + if (isObject$2(transformAssetUrls)) { + const assetOptions = normalizeOptions(transformAssetUrls); + nodeTransforms = [ + createAssetUrlTransformWithOptions(assetOptions), + createSrcsetTransformWithOptions(assetOptions) + ]; + } else if (transformAssetUrls !== false) { + nodeTransforms = [transformAssetUrl, transformSrcset]; + } + if (ssr && !ssrCssVars) { + warnOnce$3( + `compileTemplate is called with \`ssr: true\` but no corresponding \`cssVars\` option.\`.` + ); + } + if (!id) { + warnOnce$3(`compileTemplate now requires the \`id\` option.\`.`); + id = ""; + } + const shortId = id.replace(/^data-v-/, ""); + const longId = `data-v-${shortId}`; + const defaultCompiler = ssr ? CompilerSSR : CompilerDOM; + compiler = compiler || defaultCompiler; + if (compiler !== defaultCompiler) { + inAST = void 0; + } + if (inAST == null ? void 0 : inAST.transformed) { + const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, __spreadProps$5(__spreadValues$6({ + prefixIdentifiers: true + }, compilerOptions), { + parseMode: "sfc", + onError: (e) => errors.push(e) + })); + const template = newAST.children.find( + (node) => node.type === 1 && node.tag === "template" + ); + inAST = createRoot(template.children, inAST.source); + } + let { code, ast, preamble, map } = compiler.compile(inAST || source, __spreadProps$5(__spreadValues$6({ + mode: "module", + prefixIdentifiers: true, + hoistStatic: true, + cacheHandlers: true, + ssrCssVars: ssr && ssrCssVars && ssrCssVars.length ? genCssVarsFromList(ssrCssVars, shortId, isProd, true) : "", + scopeId: scoped ? longId : void 0, + slotted, + sourceMap: true + }, compilerOptions), { + hmr: !isProd, + nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []), + filename, + onError: (e) => errors.push(e), + onWarn: (w) => warnings.push(w) + })); + if (inMap && !inAST) { + if (map) { + map = mapLines(inMap, map); + } + if (errors.length) { + patchErrors(errors, source, inMap); + } + } + const tips = warnings.map((w) => { + let msg = w.message; + if (w.loc) { + msg += ` +${generateCodeFrame( + (inAST == null ? void 0 : inAST.source) || source, + w.loc.start.offset, + w.loc.end.offset + )}`; + } + return msg; + }); + return { code, ast, preamble, source, errors, tips, map }; +} +function mapLines(oldMap, newMap) { + if (!oldMap) + return newMap; + if (!newMap) + return oldMap; + const oldMapConsumer = new SourceMapConsumer$5(oldMap); + const newMapConsumer = new SourceMapConsumer$5(newMap); + const mergedMapGenerator = new SourceMapGenerator$6(); + newMapConsumer.eachMapping((m) => { + if (m.originalLine == null) { + return; + } + const origPosInOldMap = oldMapConsumer.originalPositionFor({ + line: m.originalLine, + column: m.originalColumn + }); + if (origPosInOldMap.source == null) { + return; + } + mergedMapGenerator.addMapping({ + generated: { + line: m.generatedLine, + column: m.generatedColumn + }, + original: { + line: origPosInOldMap.line, + // map line + // use current column, since the oldMap produced by @vue/compiler-sfc + // does not + column: m.originalColumn + }, + source: origPosInOldMap.source, + name: origPosInOldMap.name + }); + }); + const generator = mergedMapGenerator; + oldMapConsumer.sources.forEach((sourceFile) => { + generator._sources.add(sourceFile); + const sourceContent = oldMapConsumer.sourceContentFor(sourceFile); + if (sourceContent != null) { + mergedMapGenerator.setSourceContent(sourceFile, sourceContent); + } + }); + generator._sourceRoot = oldMap.sourceRoot; + generator._file = oldMap.file; + return generator.toJSON(); +} +function patchErrors(errors, source, inMap) { + const originalSource = inMap.sourcesContent[0]; + const offset = originalSource.indexOf(source); + const lineOffset = originalSource.slice(0, offset).split(/\r?\n/).length - 1; + errors.forEach((err) => { + if (err.loc) { + err.loc.start.line += lineOffset; + err.loc.start.offset += offset; + if (err.loc.end !== err.loc.start) { + err.loc.end.line += lineOffset; + err.loc.end.offset += offset; + } + } + }); +} + +var picocolors = {exports: {}}; + +// MIT lisence +// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js + +function isatty() { + return false; +} + +function ReadStream() { + throw new Error('tty.ReadStream is not implemented'); +} + +function WriteStream() { + throw new Error('tty.ReadStream is not implemented'); +} + +var _polyfillNode_tty = { + isatty: isatty, + ReadStream: ReadStream, + WriteStream: WriteStream +}; + +var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + ReadStream: ReadStream, + WriteStream: WriteStream, + default: _polyfillNode_tty, + isatty: isatty +}); + +var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_tty$1); + +let tty = require$$0; + +let isColorSupported = + !("NO_COLOR" in ({}) || browser$1.argv.includes("--no-color")) && + ("FORCE_COLOR" in ({}) || + browser$1.argv.includes("--color") || + "" === "win32" || + (tty.isatty(1) && browser$1.env.TERM !== "dumb") || + "CI" in ({})); + +let formatter = + (open, close, replace = open) => + input => { + let string = "" + input; + let index = string.indexOf(close, open.length); + return ~index + ? open + replaceClose(string, close, replace, index) + close + : open + string + close + }; + +let replaceClose = (string, close, replace, index) => { + let start = string.substring(0, index) + replace; + let end = string.substring(index + close.length); + let nextIndex = end.indexOf(close); + return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end +}; + +let createColors = (enabled = isColorSupported) => ({ + isColorSupported: enabled, + reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, + bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, + dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, + italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, + underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, + inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, + hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, + strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, + black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, + red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, + green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, + yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, + blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, + magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, + cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, + white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, + gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, + bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, + bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, + bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, + bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, + bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, + bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, + bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, + bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, +}); + +picocolors.exports = createColors(); +picocolors.exports.createColors = createColors; + +var picocolorsExports = picocolors.exports; + +const SINGLE_QUOTE = "'".charCodeAt(0); +const DOUBLE_QUOTE = '"'.charCodeAt(0); +const BACKSLASH = '\\'.charCodeAt(0); +const SLASH = '/'.charCodeAt(0); +const NEWLINE = '\n'.charCodeAt(0); +const SPACE = ' '.charCodeAt(0); +const FEED = '\f'.charCodeAt(0); +const TAB = '\t'.charCodeAt(0); +const CR = '\r'.charCodeAt(0); +const OPEN_SQUARE = '['.charCodeAt(0); +const CLOSE_SQUARE = ']'.charCodeAt(0); +const OPEN_PARENTHESES = '('.charCodeAt(0); +const CLOSE_PARENTHESES = ')'.charCodeAt(0); +const OPEN_CURLY = '{'.charCodeAt(0); +const CLOSE_CURLY = '}'.charCodeAt(0); +const SEMICOLON = ';'.charCodeAt(0); +const ASTERISK = '*'.charCodeAt(0); +const COLON = ':'.charCodeAt(0); +const AT = '@'.charCodeAt(0); + +const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g; +const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; +const RE_BAD_BRACKET = /.[\r\n"'(/\\]/; +const RE_HEX_ESCAPE = /[\da-f]/i; + +var tokenize$1 = function tokenizer(input, options = {}) { + let css = input.css.valueOf(); + let ignore = options.ignoreErrors; + + let code, next, quote, content, escape; + let escaped, escapePos, prev, n, currentToken; + + let length = css.length; + let pos = 0; + let buffer = []; + let returned = []; + + function position() { + return pos + } + + function unclosed(what) { + throw input.error('Unclosed ' + what, pos) + } + + function endOfFile() { + return returned.length === 0 && pos >= length + } + + function nextToken(opts) { + if (returned.length) return returned.pop() + if (pos >= length) return + + let ignoreUnclosed = opts ? opts.ignoreUnclosed : false; + + code = css.charCodeAt(pos); + + switch (code) { + case NEWLINE: + case SPACE: + case TAB: + case CR: + case FEED: { + next = pos; + do { + next += 1; + code = css.charCodeAt(next); + } while ( + code === SPACE || + code === NEWLINE || + code === TAB || + code === CR || + code === FEED + ) + + currentToken = ['space', css.slice(pos, next)]; + pos = next - 1; + break + } + + case OPEN_SQUARE: + case CLOSE_SQUARE: + case OPEN_CURLY: + case CLOSE_CURLY: + case COLON: + case SEMICOLON: + case CLOSE_PARENTHESES: { + let controlChar = String.fromCharCode(code); + currentToken = [controlChar, controlChar, pos]; + break + } + + case OPEN_PARENTHESES: { + prev = buffer.length ? buffer.pop()[1] : ''; + n = css.charCodeAt(pos + 1); + if ( + prev === 'url' && + n !== SINGLE_QUOTE && + n !== DOUBLE_QUOTE && + n !== SPACE && + n !== NEWLINE && + n !== TAB && + n !== FEED && + n !== CR + ) { + next = pos; + do { + escaped = false; + next = css.indexOf(')', next + 1); + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos; + break + } else { + unclosed('bracket'); + } + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped) + + currentToken = ['brackets', css.slice(pos, next + 1), pos, next]; + + pos = next; + } else { + next = css.indexOf(')', pos + 1); + content = css.slice(pos, next + 1); + + if (next === -1 || RE_BAD_BRACKET.test(content)) { + currentToken = ['(', '(', pos]; + } else { + currentToken = ['brackets', content, pos, next]; + pos = next; + } + } + + break + } + + case SINGLE_QUOTE: + case DOUBLE_QUOTE: { + quote = code === SINGLE_QUOTE ? "'" : '"'; + next = pos; + do { + escaped = false; + next = css.indexOf(quote, next + 1); + if (next === -1) { + if (ignore || ignoreUnclosed) { + next = pos + 1; + break + } else { + unclosed('string'); + } + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === BACKSLASH) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped) + + currentToken = ['string', css.slice(pos, next + 1), pos, next]; + pos = next; + break + } + + case AT: { + RE_AT_END.lastIndex = pos + 1; + RE_AT_END.test(css); + if (RE_AT_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_AT_END.lastIndex - 2; + } + + currentToken = ['at-word', css.slice(pos, next + 1), pos, next]; + + pos = next; + break + } + + case BACKSLASH: { + next = pos; + escape = true; + while (css.charCodeAt(next + 1) === BACKSLASH) { + next += 1; + escape = !escape; + } + code = css.charCodeAt(next + 1); + if ( + escape && + code !== SLASH && + code !== SPACE && + code !== NEWLINE && + code !== TAB && + code !== CR && + code !== FEED + ) { + next += 1; + if (RE_HEX_ESCAPE.test(css.charAt(next))) { + while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { + next += 1; + } + if (css.charCodeAt(next + 1) === SPACE) { + next += 1; + } + } + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next]; + + pos = next; + break + } + + default: { + if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { + next = css.indexOf('*/', pos + 2) + 1; + if (next === 0) { + if (ignore || ignoreUnclosed) { + next = css.length; + } else { + unclosed('comment'); + } + } + + currentToken = ['comment', css.slice(pos, next + 1), pos, next]; + pos = next; + } else { + RE_WORD_END.lastIndex = pos + 1; + RE_WORD_END.test(css); + if (RE_WORD_END.lastIndex === 0) { + next = css.length - 1; + } else { + next = RE_WORD_END.lastIndex - 2; + } + + currentToken = ['word', css.slice(pos, next + 1), pos, next]; + buffer.push(currentToken); + pos = next; + } + + break + } + } + + pos++; + return currentToken + } + + function back(token) { + returned.push(token); + } + + return { + back, + endOfFile, + nextToken, + position + } +}; + +let pico$1 = picocolorsExports; + +let tokenizer$1 = tokenize$1; + +let Input$5; + +function registerInput(dependant) { + Input$5 = dependant; +} + +const HIGHLIGHT_THEME = { + ';': pico$1.yellow, + ':': pico$1.yellow, + '(': pico$1.cyan, + ')': pico$1.cyan, + '[': pico$1.yellow, + ']': pico$1.yellow, + '{': pico$1.yellow, + '}': pico$1.yellow, + 'at-word': pico$1.cyan, + 'brackets': pico$1.cyan, + 'call': pico$1.cyan, + 'class': pico$1.yellow, + 'comment': pico$1.gray, + 'hash': pico$1.magenta, + 'string': pico$1.green +}; + +function getTokenType([type, value], processor) { + if (type === 'word') { + if (value[0] === '.') { + return 'class' + } + if (value[0] === '#') { + return 'hash' + } + } + + if (!processor.endOfFile()) { + let next = processor.nextToken(); + processor.back(next); + if (next[0] === 'brackets' || next[0] === '(') return 'call' + } + + return type +} + +function terminalHighlight$2(css) { + let processor = tokenizer$1(new Input$5(css), { ignoreErrors: true }); + let result = ''; + while (!processor.endOfFile()) { + let token = processor.nextToken(); + let color = HIGHLIGHT_THEME[getTokenType(token, processor)]; + if (color) { + result += token[1] + .split(/\r?\n/) + .map(i => color(i)) + .join('\n'); + } else { + result += token[1]; + } + } + return result +} + +terminalHighlight$2.registerInput = registerInput; + +var terminalHighlight_1 = terminalHighlight$2; + +let pico = picocolorsExports; + +let terminalHighlight$1 = terminalHighlight_1; + +let CssSyntaxError$3 = class CssSyntaxError extends Error { + constructor(message, line, column, source, file, plugin) { + super(message); + this.name = 'CssSyntaxError'; + this.reason = message; + + if (file) { + this.file = file; + } + if (source) { + this.source = source; + } + if (plugin) { + this.plugin = plugin; + } + if (typeof line !== 'undefined' && typeof column !== 'undefined') { + if (typeof line === 'number') { + this.line = line; + this.column = column; + } else { + this.line = line.line; + this.column = line.column; + this.endLine = column.line; + this.endColumn = column.column; + } + } + + this.setMessage(); + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, CssSyntaxError); + } + } + + setMessage() { + this.message = this.plugin ? this.plugin + ': ' : ''; + this.message += this.file ? this.file : '<css input>'; + if (typeof this.line !== 'undefined') { + this.message += ':' + this.line + ':' + this.column; + } + this.message += ': ' + this.reason; + } + + showSourceCode(color) { + if (!this.source) return '' + + let css = this.source; + if (color == null) color = pico.isColorSupported; + if (terminalHighlight$1) { + if (color) css = terminalHighlight$1(css); + } + + let lines = css.split(/\r?\n/); + let start = Math.max(this.line - 3, 0); + let end = Math.min(this.line + 2, lines.length); + + let maxWidth = String(end).length; + + let mark, aside; + if (color) { + let { bold, gray, red } = pico.createColors(true); + mark = text => bold(red(text)); + aside = text => gray(text); + } else { + mark = aside = str => str; + } + + return lines + .slice(start, end) + .map((line, index) => { + let number = start + 1 + index; + let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '; + if (number === this.line) { + let spacing = + aside(gutter.replace(/\d/g, ' ')) + + line.slice(0, this.column - 1).replace(/[^\t]/g, ' '); + return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^') + } + return ' ' + aside(gutter) + line + }) + .join('\n') + } + + toString() { + let code = this.showSourceCode(); + if (code) { + code = '\n\n' + code + '\n'; + } + return this.name + ': ' + this.message + code + } +}; + +var cssSyntaxError = CssSyntaxError$3; +CssSyntaxError$3.default = CssSyntaxError$3; + +var symbols = {}; + +symbols.isClean = Symbol('isClean'); + +symbols.my = Symbol('my'); + +const DEFAULT_RAW = { + after: '\n', + beforeClose: '\n', + beforeComment: '\n', + beforeDecl: '\n', + beforeOpen: ' ', + beforeRule: '\n', + colon: ': ', + commentLeft: ' ', + commentRight: ' ', + emptyBody: '', + indent: ' ', + semicolon: false +}; + +function capitalize(str) { + return str[0].toUpperCase() + str.slice(1) +} + +let Stringifier$2 = class Stringifier { + constructor(builder) { + this.builder = builder; + } + + atrule(node, semicolon) { + let name = '@' + node.name; + let params = node.params ? this.rawValue(node, 'params') : ''; + + if (typeof node.raws.afterName !== 'undefined') { + name += node.raws.afterName; + } else if (params) { + name += ' '; + } + + if (node.nodes) { + this.block(node, name + params); + } else { + let end = (node.raws.between || '') + (semicolon ? ';' : ''); + this.builder(name + params + end, node); + } + } + + beforeAfter(node, detect) { + let value; + if (node.type === 'decl') { + value = this.raw(node, null, 'beforeDecl'); + } else if (node.type === 'comment') { + value = this.raw(node, null, 'beforeComment'); + } else if (detect === 'before') { + value = this.raw(node, null, 'beforeRule'); + } else { + value = this.raw(node, null, 'beforeClose'); + } + + let buf = node.parent; + let depth = 0; + while (buf && buf.type !== 'root') { + depth += 1; + buf = buf.parent; + } + + if (value.includes('\n')) { + let indent = this.raw(node, null, 'indent'); + if (indent.length) { + for (let step = 0; step < depth; step++) value += indent; + } + } + + return value + } + + block(node, start) { + let between = this.raw(node, 'between', 'beforeOpen'); + this.builder(start + between + '{', node, 'start'); + + let after; + if (node.nodes && node.nodes.length) { + this.body(node); + after = this.raw(node, 'after'); + } else { + after = this.raw(node, 'after', 'emptyBody'); + } + + if (after) this.builder(after); + this.builder('}', node, 'end'); + } + + body(node) { + let last = node.nodes.length - 1; + while (last > 0) { + if (node.nodes[last].type !== 'comment') break + last -= 1; + } + + let semicolon = this.raw(node, 'semicolon'); + for (let i = 0; i < node.nodes.length; i++) { + let child = node.nodes[i]; + let before = this.raw(child, 'before'); + if (before) this.builder(before); + this.stringify(child, last !== i || semicolon); + } + } + + comment(node) { + let left = this.raw(node, 'left', 'commentLeft'); + let right = this.raw(node, 'right', 'commentRight'); + this.builder('/*' + left + node.text + right + '*/', node); + } + + decl(node, semicolon) { + let between = this.raw(node, 'between', 'colon'); + let string = node.prop + between + this.rawValue(node, 'value'); + + if (node.important) { + string += node.raws.important || ' !important'; + } + + if (semicolon) string += ';'; + this.builder(string, node); + } + + document(node) { + this.body(node); + } + + raw(node, own, detect) { + let value; + if (!detect) detect = own; + + // Already had + if (own) { + value = node.raws[own]; + if (typeof value !== 'undefined') return value + } + + let parent = node.parent; + + if (detect === 'before') { + // Hack for first rule in CSS + if (!parent || (parent.type === 'root' && parent.first === node)) { + return '' + } + + // `root` nodes in `document` should use only their own raws + if (parent && parent.type === 'document') { + return '' + } + } + + // Floating child without parent + if (!parent) return DEFAULT_RAW[detect] + + // Detect style by other nodes + let root = node.root(); + if (!root.rawCache) root.rawCache = {}; + if (typeof root.rawCache[detect] !== 'undefined') { + return root.rawCache[detect] + } + + if (detect === 'before' || detect === 'after') { + return this.beforeAfter(node, detect) + } else { + let method = 'raw' + capitalize(detect); + if (this[method]) { + value = this[method](root, node); + } else { + root.walk(i => { + value = i.raws[own]; + if (typeof value !== 'undefined') return false + }); + } + } + + if (typeof value === 'undefined') value = DEFAULT_RAW[detect]; + + root.rawCache[detect] = value; + return value + } + + rawBeforeClose(root) { + let value; + root.walk(i => { + if (i.nodes && i.nodes.length > 0) { + if (typeof i.raws.after !== 'undefined') { + value = i.raws.after; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false + } + } + }); + if (value) value = value.replace(/\S/g, ''); + return value + } + + rawBeforeComment(root, node) { + let value; + root.walkComments(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false + } + }); + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeDecl'); + } else if (value) { + value = value.replace(/\S/g, ''); + } + return value + } + + rawBeforeDecl(root, node) { + let value; + root.walkDecls(i => { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false + } + }); + if (typeof value === 'undefined') { + value = this.raw(node, null, 'beforeRule'); + } else if (value) { + value = value.replace(/\S/g, ''); + } + return value + } + + rawBeforeOpen(root) { + let value; + root.walk(i => { + if (i.type !== 'decl') { + value = i.raws.between; + if (typeof value !== 'undefined') return false + } + }); + return value + } + + rawBeforeRule(root) { + let value; + root.walk(i => { + if (i.nodes && (i.parent !== root || root.first !== i)) { + if (typeof i.raws.before !== 'undefined') { + value = i.raws.before; + if (value.includes('\n')) { + value = value.replace(/[^\n]+$/, ''); + } + return false + } + } + }); + if (value) value = value.replace(/\S/g, ''); + return value + } + + rawColon(root) { + let value; + root.walkDecls(i => { + if (typeof i.raws.between !== 'undefined') { + value = i.raws.between.replace(/[^\s:]/g, ''); + return false + } + }); + return value + } + + rawEmptyBody(root) { + let value; + root.walk(i => { + if (i.nodes && i.nodes.length === 0) { + value = i.raws.after; + if (typeof value !== 'undefined') return false + } + }); + return value + } + + rawIndent(root) { + if (root.raws.indent) return root.raws.indent + let value; + root.walk(i => { + let p = i.parent; + if (p && p !== root && p.parent && p.parent === root) { + if (typeof i.raws.before !== 'undefined') { + let parts = i.raws.before.split('\n'); + value = parts[parts.length - 1]; + value = value.replace(/\S/g, ''); + return false + } + } + }); + return value + } + + rawSemicolon(root) { + let value; + root.walk(i => { + if (i.nodes && i.nodes.length && i.last.type === 'decl') { + value = i.raws.semicolon; + if (typeof value !== 'undefined') return false + } + }); + return value + } + + rawValue(node, prop) { + let value = node[prop]; + let raw = node.raws[prop]; + if (raw && raw.value === value) { + return raw.raw + } + + return value + } + + root(node) { + this.body(node); + if (node.raws.after) this.builder(node.raws.after); + } + + rule(node) { + this.block(node, this.rawValue(node, 'selector')); + if (node.raws.ownSemicolon) { + this.builder(node.raws.ownSemicolon, node, 'end'); + } + } + + stringify(node, semicolon) { + /* c8 ignore start */ + if (!this[node.type]) { + throw new Error( + 'Unknown AST node type ' + + node.type + + '. ' + + 'Maybe you need to change PostCSS stringifier.' + ) + } + /* c8 ignore stop */ + this[node.type](node, semicolon); + } +}; + +var stringifier = Stringifier$2; +Stringifier$2.default = Stringifier$2; + +let Stringifier$1 = stringifier; + +function stringify$4(node, builder) { + let str = new Stringifier$1(builder); + str.stringify(node); +} + +var stringify_1 = stringify$4; +stringify$4.default = stringify$4; + +let { isClean: isClean$2, my: my$2 } = symbols; +let CssSyntaxError$2 = cssSyntaxError; +let Stringifier = stringifier; +let stringify$3 = stringify_1; + +function cloneNode(obj, parent) { + let cloned = new obj.constructor(); + + for (let i in obj) { + if (!Object.prototype.hasOwnProperty.call(obj, i)) { + /* c8 ignore next 2 */ + continue + } + if (i === 'proxyCache') continue + let value = obj[i]; + let type = typeof value; + + if (i === 'parent' && type === 'object') { + if (parent) cloned[i] = parent; + } else if (i === 'source') { + cloned[i] = value; + } else if (Array.isArray(value)) { + cloned[i] = value.map(j => cloneNode(j, cloned)); + } else { + if (type === 'object' && value !== null) value = cloneNode(value); + cloned[i] = value; + } + } + + return cloned +} + +let Node$4 = class Node { + constructor(defaults = {}) { + this.raws = {}; + this[isClean$2] = false; + this[my$2] = true; + + for (let name in defaults) { + if (name === 'nodes') { + this.nodes = []; + for (let node of defaults[name]) { + if (typeof node.clone === 'function') { + this.append(node.clone()); + } else { + this.append(node); + } + } + } else { + this[name] = defaults[name]; + } + } + } + + addToError(error) { + error.postcssNode = this; + if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { + let s = this.source; + error.stack = error.stack.replace( + /\n\s{4}at /, + `$&${s.input.from}:${s.start.line}:${s.start.column}$&` + ); + } + return error + } + + after(add) { + this.parent.insertAfter(this, add); + return this + } + + assign(overrides = {}) { + for (let name in overrides) { + this[name] = overrides[name]; + } + return this + } + + before(add) { + this.parent.insertBefore(this, add); + return this + } + + cleanRaws(keepBetween) { + delete this.raws.before; + delete this.raws.after; + if (!keepBetween) delete this.raws.between; + } + + clone(overrides = {}) { + let cloned = cloneNode(this); + for (let name in overrides) { + cloned[name] = overrides[name]; + } + return cloned + } + + cloneAfter(overrides = {}) { + let cloned = this.clone(overrides); + this.parent.insertAfter(this, cloned); + return cloned + } + + cloneBefore(overrides = {}) { + let cloned = this.clone(overrides); + this.parent.insertBefore(this, cloned); + return cloned + } + + error(message, opts = {}) { + if (this.source) { + let { end, start } = this.rangeBy(opts); + return this.source.input.error( + message, + { column: start.column, line: start.line }, + { column: end.column, line: end.line }, + opts + ) + } + return new CssSyntaxError$2(message) + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (prop === 'root') { + return () => node.root().toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value; + if ( + prop === 'prop' || + prop === 'value' || + prop === 'name' || + prop === 'params' || + prop === 'important' || + /* c8 ignore next */ + prop === 'text' + ) { + node.markDirty(); + } + return true + } + } + } + + markDirty() { + if (this[isClean$2]) { + this[isClean$2] = false; + let next = this; + while ((next = next.parent)) { + next[isClean$2] = false; + } + } + } + + next() { + if (!this.parent) return undefined + let index = this.parent.index(this); + return this.parent.nodes[index + 1] + } + + positionBy(opts, stringRepresentation) { + let pos = this.source.start; + if (opts.index) { + pos = this.positionInside(opts.index, stringRepresentation); + } else if (opts.word) { + stringRepresentation = this.toString(); + let index = stringRepresentation.indexOf(opts.word); + if (index !== -1) pos = this.positionInside(index, stringRepresentation); + } + return pos + } + + positionInside(index, stringRepresentation) { + let string = stringRepresentation || this.toString(); + let column = this.source.start.column; + let line = this.source.start.line; + + for (let i = 0; i < index; i++) { + if (string[i] === '\n') { + column = 1; + line += 1; + } else { + column += 1; + } + } + + return { column, line } + } + + prev() { + if (!this.parent) return undefined + let index = this.parent.index(this); + return this.parent.nodes[index - 1] + } + + rangeBy(opts) { + let start = { + column: this.source.start.column, + line: this.source.start.line + }; + let end = this.source.end + ? { + column: this.source.end.column + 1, + line: this.source.end.line + } + : { + column: start.column + 1, + line: start.line + }; + + if (opts.word) { + let stringRepresentation = this.toString(); + let index = stringRepresentation.indexOf(opts.word); + if (index !== -1) { + start = this.positionInside(index, stringRepresentation); + end = this.positionInside(index + opts.word.length, stringRepresentation); + } + } else { + if (opts.start) { + start = { + column: opts.start.column, + line: opts.start.line + }; + } else if (opts.index) { + start = this.positionInside(opts.index); + } + + if (opts.end) { + end = { + column: opts.end.column, + line: opts.end.line + }; + } else if (opts.endIndex) { + end = this.positionInside(opts.endIndex); + } else if (opts.index) { + end = this.positionInside(opts.index + 1); + } + } + + if ( + end.line < start.line || + (end.line === start.line && end.column <= start.column) + ) { + end = { column: start.column + 1, line: start.line }; + } + + return { end, start } + } + + raw(prop, defaultType) { + let str = new Stringifier(); + return str.raw(this, prop, defaultType) + } + + remove() { + if (this.parent) { + this.parent.removeChild(this); + } + this.parent = undefined; + return this + } + + replaceWith(...nodes) { + if (this.parent) { + let bookmark = this; + let foundSelf = false; + for (let node of nodes) { + if (node === this) { + foundSelf = true; + } else if (foundSelf) { + this.parent.insertAfter(bookmark, node); + bookmark = node; + } else { + this.parent.insertBefore(bookmark, node); + } + } + + if (!foundSelf) { + this.remove(); + } + } + + return this + } + + root() { + let result = this; + while (result.parent && result.parent.type !== 'document') { + result = result.parent; + } + return result + } + + toJSON(_, inputs) { + let fixed = {}; + let emitInputs = inputs == null; + inputs = inputs || new Map(); + let inputsNextIndex = 0; + + for (let name in this) { + if (!Object.prototype.hasOwnProperty.call(this, name)) { + /* c8 ignore next 2 */ + continue + } + if (name === 'parent' || name === 'proxyCache') continue + let value = this[name]; + + if (Array.isArray(value)) { + fixed[name] = value.map(i => { + if (typeof i === 'object' && i.toJSON) { + return i.toJSON(null, inputs) + } else { + return i + } + }); + } else if (typeof value === 'object' && value.toJSON) { + fixed[name] = value.toJSON(null, inputs); + } else if (name === 'source') { + let inputId = inputs.get(value.input); + if (inputId == null) { + inputId = inputsNextIndex; + inputs.set(value.input, inputsNextIndex); + inputsNextIndex++; + } + fixed[name] = { + end: value.end, + inputId, + start: value.start + }; + } else { + fixed[name] = value; + } + } + + if (emitInputs) { + fixed.inputs = [...inputs.keys()].map(input => input.toJSON()); + } + + return fixed + } + + toProxy() { + if (!this.proxyCache) { + this.proxyCache = new Proxy(this, this.getProxyProcessor()); + } + return this.proxyCache + } + + toString(stringifier = stringify$3) { + if (stringifier.stringify) stringifier = stringifier.stringify; + let result = ''; + stringifier(this, i => { + result += i; + }); + return result + } + + warn(result, text, opts) { + let data = { node: this }; + for (let i in opts) data[i] = opts[i]; + return result.warn(text, data) + } + + get proxyOf() { + return this + } +}; + +var node$2 = Node$4; +Node$4.default = Node$4; + +let Node$3 = node$2; + +let Declaration$4 = class Declaration extends Node$3 { + constructor(defaults) { + if ( + defaults && + typeof defaults.value !== 'undefined' && + typeof defaults.value !== 'string' + ) { + defaults = { ...defaults, value: String(defaults.value) }; + } + super(defaults); + this.type = 'decl'; + } + + get variable() { + return this.prop.startsWith('--') || this.prop[0] === '$' + } +}; + +var declaration = Declaration$4; +Declaration$4.default = Declaration$4; + +var require$$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_url$1); + +let urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'; +let customAlphabet = (alphabet, defaultSize = 21) => { + return (size = defaultSize) => { + let id = ''; + let i = size; + while (i--) { + id += alphabet[(Math.random() * alphabet.length) | 0]; + } + return id + } +}; +let nanoid$1 = (size = 21) => { + let id = ''; + let i = size; + while (i--) { + id += urlAlphabet[(Math.random() * 64) | 0]; + } + return id +}; +var nonSecure = { nanoid: nanoid$1, customAlphabet }; + +let { SourceMapConsumer: SourceMapConsumer$4, SourceMapGenerator: SourceMapGenerator$5 } = sourceMap$2; +let { existsSync, readFileSync } = require$$0$2; +let { dirname: dirname$1, join } = require$$1; + +function fromBase64(str) { + if (Buffer$1) { + return Buffer$1.from(str, 'base64').toString() + } else { + /* c8 ignore next 2 */ + return window.atob(str) + } +} + +let PreviousMap$2 = class PreviousMap { + constructor(css, opts) { + if (opts.map === false) return + this.loadAnnotation(css); + this.inline = this.startWith(this.annotation, 'data:'); + + let prev = opts.map ? opts.map.prev : undefined; + let text = this.loadMap(opts.from, prev); + if (!this.mapFile && opts.from) { + this.mapFile = opts.from; + } + if (this.mapFile) this.root = dirname$1(this.mapFile); + if (text) this.text = text; + } + + consumer() { + if (!this.consumerCache) { + this.consumerCache = new SourceMapConsumer$4(this.text); + } + return this.consumerCache + } + + decodeInline(text) { + let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; + let baseUri = /^data:application\/json;base64,/; + let charsetUri = /^data:application\/json;charset=utf-?8,/; + let uri = /^data:application\/json,/; + + if (charsetUri.test(text) || uri.test(text)) { + return decodeURIComponent(text.substr(RegExp.lastMatch.length)) + } + + if (baseCharsetUri.test(text) || baseUri.test(text)) { + return fromBase64(text.substr(RegExp.lastMatch.length)) + } + + let encoding = text.match(/data:application\/json;([^,]+),/)[1]; + throw new Error('Unsupported source map encoding ' + encoding) + } + + getAnnotationURL(sourceMapString) { + return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() + } + + isMap(map) { + if (typeof map !== 'object') return false + return ( + typeof map.mappings === 'string' || + typeof map._mappings === 'string' || + Array.isArray(map.sections) + ) + } + + loadAnnotation(css) { + let comments = css.match(/\/\*\s*# sourceMappingURL=/gm); + if (!comments) return + + // sourceMappingURLs from comments, strings, etc. + let start = css.lastIndexOf(comments.pop()); + let end = css.indexOf('*/', start); + + if (start > -1 && end > -1) { + // Locate the last sourceMappingURL to avoid pickin + this.annotation = this.getAnnotationURL(css.substring(start, end)); + } + } + + loadFile(path) { + this.root = dirname$1(path); + if (existsSync(path)) { + this.mapFile = path; + return readFileSync(path, 'utf-8').toString().trim() + } + } + + loadMap(file, prev) { + if (prev === false) return false + + if (prev) { + if (typeof prev === 'string') { + return prev + } else if (typeof prev === 'function') { + let prevPath = prev(file); + if (prevPath) { + let map = this.loadFile(prevPath); + if (!map) { + throw new Error( + 'Unable to load previous source map: ' + prevPath.toString() + ) + } + return map + } + } else if (prev instanceof SourceMapConsumer$4) { + return SourceMapGenerator$5.fromSourceMap(prev).toString() + } else if (prev instanceof SourceMapGenerator$5) { + return prev.toString() + } else if (this.isMap(prev)) { + return JSON.stringify(prev) + } else { + throw new Error( + 'Unsupported previous source map format: ' + prev.toString() + ) + } + } else if (this.inline) { + return this.decodeInline(this.annotation) + } else if (this.annotation) { + let map = this.annotation; + if (file) map = join(dirname$1(file), map); + return this.loadFile(map) + } + } + + startWith(string, start) { + if (!string) return false + return string.substr(0, start.length) === start + } + + withContent() { + return !!( + this.consumer().sourcesContent && + this.consumer().sourcesContent.length > 0 + ) + } +}; + +var previousMap = PreviousMap$2; +PreviousMap$2.default = PreviousMap$2; + +let { SourceMapConsumer: SourceMapConsumer$3, SourceMapGenerator: SourceMapGenerator$4 } = sourceMap$2; +let { fileURLToPath, pathToFileURL: pathToFileURL$1 } = require$$2; +let { isAbsolute, resolve: resolve$1 } = require$$1; +let { nanoid } = nonSecure; + +let terminalHighlight = terminalHighlight_1; +let CssSyntaxError$1 = cssSyntaxError; +let PreviousMap$1 = previousMap; + +let fromOffsetCache = Symbol('fromOffsetCache'); + +let sourceMapAvailable$1 = Boolean(SourceMapConsumer$3 && SourceMapGenerator$4); +let pathAvailable$1 = Boolean(resolve$1 && isAbsolute); + +let Input$4 = class Input { + constructor(css, opts = {}) { + if ( + css === null || + typeof css === 'undefined' || + (typeof css === 'object' && !css.toString) + ) { + throw new Error(`PostCSS received ${css} instead of CSS string`) + } + + this.css = css.toString(); + + if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { + this.hasBOM = true; + this.css = this.css.slice(1); + } else { + this.hasBOM = false; + } + + if (opts.from) { + if ( + !pathAvailable$1 || + /^\w+:\/\//.test(opts.from) || + isAbsolute(opts.from) + ) { + this.file = opts.from; + } else { + this.file = resolve$1(opts.from); + } + } + + if (pathAvailable$1 && sourceMapAvailable$1) { + let map = new PreviousMap$1(this.css, opts); + if (map.text) { + this.map = map; + let file = map.consumer().file; + if (!this.file && file) this.file = this.mapResolve(file); + } + } + + if (!this.file) { + this.id = '<input css ' + nanoid(6) + '>'; + } + if (this.map) this.map.file = this.from; + } + + error(message, line, column, opts = {}) { + let result, endLine, endColumn; + + if (line && typeof line === 'object') { + let start = line; + let end = column; + if (typeof start.offset === 'number') { + let pos = this.fromOffset(start.offset); + line = pos.line; + column = pos.col; + } else { + line = start.line; + column = start.column; + } + if (typeof end.offset === 'number') { + let pos = this.fromOffset(end.offset); + endLine = pos.line; + endColumn = pos.col; + } else { + endLine = end.line; + endColumn = end.column; + } + } else if (!column) { + let pos = this.fromOffset(line); + line = pos.line; + column = pos.col; + } + + let origin = this.origin(line, column, endLine, endColumn); + if (origin) { + result = new CssSyntaxError$1( + message, + origin.endLine === undefined + ? origin.line + : { column: origin.column, line: origin.line }, + origin.endLine === undefined + ? origin.column + : { column: origin.endColumn, line: origin.endLine }, + origin.source, + origin.file, + opts.plugin + ); + } else { + result = new CssSyntaxError$1( + message, + endLine === undefined ? line : { column, line }, + endLine === undefined ? column : { column: endColumn, line: endLine }, + this.css, + this.file, + opts.plugin + ); + } + + result.input = { column, endColumn, endLine, line, source: this.css }; + if (this.file) { + if (pathToFileURL$1) { + result.input.url = pathToFileURL$1(this.file).toString(); + } + result.input.file = this.file; + } + + return result + } + + fromOffset(offset) { + let lastLine, lineToIndex; + if (!this[fromOffsetCache]) { + let lines = this.css.split('\n'); + lineToIndex = new Array(lines.length); + let prevIndex = 0; + + for (let i = 0, l = lines.length; i < l; i++) { + lineToIndex[i] = prevIndex; + prevIndex += lines[i].length + 1; + } + + this[fromOffsetCache] = lineToIndex; + } else { + lineToIndex = this[fromOffsetCache]; + } + lastLine = lineToIndex[lineToIndex.length - 1]; + + let min = 0; + if (offset >= lastLine) { + min = lineToIndex.length - 1; + } else { + let max = lineToIndex.length - 2; + let mid; + while (min < max) { + mid = min + ((max - min) >> 1); + if (offset < lineToIndex[mid]) { + max = mid - 1; + } else if (offset >= lineToIndex[mid + 1]) { + min = mid + 1; + } else { + min = mid; + break + } + } + } + return { + col: offset - lineToIndex[min] + 1, + line: min + 1 + } + } + + mapResolve(file) { + if (/^\w+:\/\//.test(file)) { + return file + } + return resolve$1(this.map.consumer().sourceRoot || this.map.root || '.', file) + } + + origin(line, column, endLine, endColumn) { + if (!this.map) return false + let consumer = this.map.consumer(); + + let from = consumer.originalPositionFor({ column, line }); + if (!from.source) return false + + let to; + if (typeof endLine === 'number') { + to = consumer.originalPositionFor({ column: endColumn, line: endLine }); + } + + let fromUrl; + + if (isAbsolute(from.source)) { + fromUrl = pathToFileURL$1(from.source); + } else { + fromUrl = new URL( + from.source, + this.map.consumer().sourceRoot || pathToFileURL$1(this.map.mapFile) + ); + } + + let result = { + column: from.column, + endColumn: to && to.column, + endLine: to && to.line, + line: from.line, + url: fromUrl.toString() + }; + + if (fromUrl.protocol === 'file:') { + if (fileURLToPath) { + result.file = fileURLToPath(fromUrl); + } else { + /* c8 ignore next 2 */ + throw new Error(`file: protocol is not available in this PostCSS build`) + } + } + + let source = consumer.sourceContentFor(from.source); + if (source) result.source = source; + + return result + } + + toJSON() { + let json = {}; + for (let name of ['hasBOM', 'css', 'file', 'id']) { + if (this[name] != null) { + json[name] = this[name]; + } + } + if (this.map) { + json.map = { ...this.map }; + if (json.map.consumerCache) { + json.map.consumerCache = undefined; + } + } + return json + } + + get from() { + return this.file || this.id + } +}; + +var input = Input$4; +Input$4.default = Input$4; + +if (terminalHighlight && terminalHighlight.registerInput) { + terminalHighlight.registerInput(Input$4); +} + +let { SourceMapConsumer: SourceMapConsumer$2, SourceMapGenerator: SourceMapGenerator$3 } = sourceMap$2; +let { dirname, relative, resolve, sep } = require$$1; +let { pathToFileURL } = require$$2; + +let Input$3 = input; + +let sourceMapAvailable = Boolean(SourceMapConsumer$2 && SourceMapGenerator$3); +let pathAvailable = Boolean(dirname && resolve && relative && sep); + +let MapGenerator$2 = class MapGenerator { + constructor(stringify, root, opts, cssString) { + this.stringify = stringify; + this.mapOpts = opts.map || {}; + this.root = root; + this.opts = opts; + this.css = cssString; + this.originalCSS = cssString; + this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute; + + this.memoizedFileURLs = new Map(); + this.memoizedPaths = new Map(); + this.memoizedURLs = new Map(); + } + + addAnnotation() { + let content; + + if (this.isInline()) { + content = + 'data:application/json;base64,' + this.toBase64(this.map.toString()); + } else if (typeof this.mapOpts.annotation === 'string') { + content = this.mapOpts.annotation; + } else if (typeof this.mapOpts.annotation === 'function') { + content = this.mapOpts.annotation(this.opts.to, this.root); + } else { + content = this.outputFile() + '.map'; + } + let eol = '\n'; + if (this.css.includes('\r\n')) eol = '\r\n'; + + this.css += eol + '/*# sourceMappingURL=' + content + ' */'; + } + + applyPrevMaps() { + for (let prev of this.previous()) { + let from = this.toUrl(this.path(prev.file)); + let root = prev.root || dirname(prev.file); + let map; + + if (this.mapOpts.sourcesContent === false) { + map = new SourceMapConsumer$2(prev.text); + if (map.sourcesContent) { + map.sourcesContent = map.sourcesContent.map(() => null); + } + } else { + map = prev.consumer(); + } + + this.map.applySourceMap(map, from, this.toUrl(this.path(root))); + } + } + + clearAnnotation() { + if (this.mapOpts.annotation === false) return + + if (this.root) { + let node; + for (let i = this.root.nodes.length - 1; i >= 0; i--) { + node = this.root.nodes[i]; + if (node.type !== 'comment') continue + if (node.text.indexOf('# sourceMappingURL=') === 0) { + this.root.removeChild(i); + } + } + } else if (this.css) { + this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, ''); + } + } + + generate() { + this.clearAnnotation(); + if (pathAvailable && sourceMapAvailable && this.isMap()) { + return this.generateMap() + } else { + let result = ''; + this.stringify(this.root, i => { + result += i; + }); + return [result] + } + } + + generateMap() { + if (this.root) { + this.generateString(); + } else if (this.previous().length === 1) { + let prev = this.previous()[0].consumer(); + prev.file = this.outputFile(); + this.map = SourceMapGenerator$3.fromSourceMap(prev); + } else { + this.map = new SourceMapGenerator$3({ file: this.outputFile() }); + this.map.addMapping({ + generated: { column: 0, line: 1 }, + original: { column: 0, line: 1 }, + source: this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '<no source>' + }); + } + + if (this.isSourcesContent()) this.setSourcesContent(); + if (this.root && this.previous().length > 0) this.applyPrevMaps(); + if (this.isAnnotation()) this.addAnnotation(); + + if (this.isInline()) { + return [this.css] + } else { + return [this.css, this.map] + } + } + + generateString() { + this.css = ''; + this.map = new SourceMapGenerator$3({ file: this.outputFile() }); + + let line = 1; + let column = 1; + + let noSource = '<no source>'; + let mapping = { + generated: { column: 0, line: 0 }, + original: { column: 0, line: 0 }, + source: '' + }; + + let lines, last; + this.stringify(this.root, (str, node, type) => { + this.css += str; + + if (node && type !== 'end') { + mapping.generated.line = line; + mapping.generated.column = column - 1; + if (node.source && node.source.start) { + mapping.source = this.sourcePath(node); + mapping.original.line = node.source.start.line; + mapping.original.column = node.source.start.column - 1; + this.map.addMapping(mapping); + } else { + mapping.source = noSource; + mapping.original.line = 1; + mapping.original.column = 0; + this.map.addMapping(mapping); + } + } + + lines = str.match(/\n/g); + if (lines) { + line += lines.length; + last = str.lastIndexOf('\n'); + column = str.length - last; + } else { + column += str.length; + } + + if (node && type !== 'start') { + let p = node.parent || { raws: {} }; + let childless = + node.type === 'decl' || (node.type === 'atrule' && !node.nodes); + if (!childless || node !== p.last || p.raws.semicolon) { + if (node.source && node.source.end) { + mapping.source = this.sourcePath(node); + mapping.original.line = node.source.end.line; + mapping.original.column = node.source.end.column - 1; + mapping.generated.line = line; + mapping.generated.column = column - 2; + this.map.addMapping(mapping); + } else { + mapping.source = noSource; + mapping.original.line = 1; + mapping.original.column = 0; + mapping.generated.line = line; + mapping.generated.column = column - 1; + this.map.addMapping(mapping); + } + } + } + }); + } + + isAnnotation() { + if (this.isInline()) { + return true + } + if (typeof this.mapOpts.annotation !== 'undefined') { + return this.mapOpts.annotation + } + if (this.previous().length) { + return this.previous().some(i => i.annotation) + } + return true + } + + isInline() { + if (typeof this.mapOpts.inline !== 'undefined') { + return this.mapOpts.inline + } + + let annotation = this.mapOpts.annotation; + if (typeof annotation !== 'undefined' && annotation !== true) { + return false + } + + if (this.previous().length) { + return this.previous().some(i => i.inline) + } + return true + } + + isMap() { + if (typeof this.opts.map !== 'undefined') { + return !!this.opts.map + } + return this.previous().length > 0 + } + + isSourcesContent() { + if (typeof this.mapOpts.sourcesContent !== 'undefined') { + return this.mapOpts.sourcesContent + } + if (this.previous().length) { + return this.previous().some(i => i.withContent()) + } + return true + } + + outputFile() { + if (this.opts.to) { + return this.path(this.opts.to) + } else if (this.opts.from) { + return this.path(this.opts.from) + } else { + return 'to.css' + } + } + + path(file) { + if (this.mapOpts.absolute) return file + if (file.charCodeAt(0) === 60 /* `<` */) return file + if (/^\w+:\/\//.test(file)) return file + let cached = this.memoizedPaths.get(file); + if (cached) return cached + + let from = this.opts.to ? dirname(this.opts.to) : '.'; + + if (typeof this.mapOpts.annotation === 'string') { + from = dirname(resolve(from, this.mapOpts.annotation)); + } + + let path = relative(from, file); + this.memoizedPaths.set(file, path); + + return path + } + + previous() { + if (!this.previousMaps) { + this.previousMaps = []; + if (this.root) { + this.root.walk(node => { + if (node.source && node.source.input.map) { + let map = node.source.input.map; + if (!this.previousMaps.includes(map)) { + this.previousMaps.push(map); + } + } + }); + } else { + let input = new Input$3(this.originalCSS, this.opts); + if (input.map) this.previousMaps.push(input.map); + } + } + + return this.previousMaps + } + + setSourcesContent() { + let already = {}; + if (this.root) { + this.root.walk(node => { + if (node.source) { + let from = node.source.input.from; + if (from && !already[from]) { + already[from] = true; + let fromUrl = this.usesFileUrls + ? this.toFileUrl(from) + : this.toUrl(this.path(from)); + this.map.setSourceContent(fromUrl, node.source.input.css); + } + } + }); + } else if (this.css) { + let from = this.opts.from + ? this.toUrl(this.path(this.opts.from)) + : '<no source>'; + this.map.setSourceContent(from, this.css); + } + } + + sourcePath(node) { + if (this.mapOpts.from) { + return this.toUrl(this.mapOpts.from) + } else if (this.usesFileUrls) { + return this.toFileUrl(node.source.input.from) + } else { + return this.toUrl(this.path(node.source.input.from)) + } + } + + toBase64(str) { + if (Buffer$1) { + return Buffer$1.from(str).toString('base64') + } else { + return window.btoa(unescape(encodeURIComponent(str))) + } + } + + toFileUrl(path) { + let cached = this.memoizedFileURLs.get(path); + if (cached) return cached + + if (pathToFileURL) { + let fileURL = pathToFileURL(path).toString(); + this.memoizedFileURLs.set(path, fileURL); + + return fileURL + } else { + throw new Error( + '`map.absolute` option is not available in this PostCSS build' + ) + } + } + + toUrl(path) { + let cached = this.memoizedURLs.get(path); + if (cached) return cached + + if (sep === '\\') { + path = path.replace(/\\/g, '/'); + } + + let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent); + this.memoizedURLs.set(path, url); + + return url + } +}; + +var mapGenerator = MapGenerator$2; + +let Node$2 = node$2; + +let Comment$4 = class Comment extends Node$2 { + constructor(defaults) { + super(defaults); + this.type = 'comment'; + } +}; + +var comment$3 = Comment$4; +Comment$4.default = Comment$4; + +let { isClean: isClean$1, my: my$1 } = symbols; +let Declaration$3 = declaration; +let Comment$3 = comment$3; +let Node$1 = node$2; + +let parse$4, Rule$4, AtRule$4, Root$6; + +function cleanSource(nodes) { + return nodes.map(i => { + if (i.nodes) i.nodes = cleanSource(i.nodes); + delete i.source; + return i + }) +} + +function markDirtyUp(node) { + node[isClean$1] = false; + if (node.proxyOf.nodes) { + for (let i of node.proxyOf.nodes) { + markDirtyUp(i); + } + } +} + +let Container$7 = class Container extends Node$1 { + append(...children) { + for (let child of children) { + let nodes = this.normalize(child, this.last); + for (let node of nodes) this.proxyOf.nodes.push(node); + } + + this.markDirty(); + + return this + } + + cleanRaws(keepBetween) { + super.cleanRaws(keepBetween); + if (this.nodes) { + for (let node of this.nodes) node.cleanRaws(keepBetween); + } + } + + each(callback) { + if (!this.proxyOf.nodes) return undefined + let iterator = this.getIterator(); + + let index, result; + while (this.indexes[iterator] < this.proxyOf.nodes.length) { + index = this.indexes[iterator]; + result = callback(this.proxyOf.nodes[index], index); + if (result === false) break + + this.indexes[iterator] += 1; + } + + delete this.indexes[iterator]; + return result + } + + every(condition) { + return this.nodes.every(condition) + } + + getIterator() { + if (!this.lastEach) this.lastEach = 0; + if (!this.indexes) this.indexes = {}; + + this.lastEach += 1; + let iterator = this.lastEach; + this.indexes[iterator] = 0; + + return iterator + } + + getProxyProcessor() { + return { + get(node, prop) { + if (prop === 'proxyOf') { + return node + } else if (!node[prop]) { + return node[prop] + } else if ( + prop === 'each' || + (typeof prop === 'string' && prop.startsWith('walk')) + ) { + return (...args) => { + return node[prop]( + ...args.map(i => { + if (typeof i === 'function') { + return (child, index) => i(child.toProxy(), index) + } else { + return i + } + }) + ) + } + } else if (prop === 'every' || prop === 'some') { + return cb => { + return node[prop]((child, ...other) => + cb(child.toProxy(), ...other) + ) + } + } else if (prop === 'root') { + return () => node.root().toProxy() + } else if (prop === 'nodes') { + return node.nodes.map(i => i.toProxy()) + } else if (prop === 'first' || prop === 'last') { + return node[prop].toProxy() + } else { + return node[prop] + } + }, + + set(node, prop, value) { + if (node[prop] === value) return true + node[prop] = value; + if (prop === 'name' || prop === 'params' || prop === 'selector') { + node.markDirty(); + } + return true + } + } + } + + index(child) { + if (typeof child === 'number') return child + if (child.proxyOf) child = child.proxyOf; + return this.proxyOf.nodes.indexOf(child) + } + + insertAfter(exist, add) { + let existIndex = this.index(exist); + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse(); + existIndex = this.index(exist); + for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node); + + let index; + for (let id in this.indexes) { + index = this.indexes[id]; + if (existIndex < index) { + this.indexes[id] = index + nodes.length; + } + } + + this.markDirty(); + + return this + } + + insertBefore(exist, add) { + let existIndex = this.index(exist); + let type = existIndex === 0 ? 'prepend' : false; + let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse(); + existIndex = this.index(exist); + for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node); + + let index; + for (let id in this.indexes) { + index = this.indexes[id]; + if (existIndex <= index) { + this.indexes[id] = index + nodes.length; + } + } + + this.markDirty(); + + return this + } + + normalize(nodes, sample) { + if (typeof nodes === 'string') { + nodes = cleanSource(parse$4(nodes).nodes); + } else if (Array.isArray(nodes)) { + nodes = nodes.slice(0); + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore'); + } + } else if (nodes.type === 'root' && this.type !== 'document') { + nodes = nodes.nodes.slice(0); + for (let i of nodes) { + if (i.parent) i.parent.removeChild(i, 'ignore'); + } + } else if (nodes.type) { + nodes = [nodes]; + } else if (nodes.prop) { + if (typeof nodes.value === 'undefined') { + throw new Error('Value field is missed in node creation') + } else if (typeof nodes.value !== 'string') { + nodes.value = String(nodes.value); + } + nodes = [new Declaration$3(nodes)]; + } else if (nodes.selector) { + nodes = [new Rule$4(nodes)]; + } else if (nodes.name) { + nodes = [new AtRule$4(nodes)]; + } else if (nodes.text) { + nodes = [new Comment$3(nodes)]; + } else { + throw new Error('Unknown node type in node creation') + } + + let processed = nodes.map(i => { + /* c8 ignore next */ + if (!i[my$1]) Container.rebuild(i); + i = i.proxyOf; + if (i.parent) i.parent.removeChild(i); + if (i[isClean$1]) markDirtyUp(i); + if (typeof i.raws.before === 'undefined') { + if (sample && typeof sample.raws.before !== 'undefined') { + i.raws.before = sample.raws.before.replace(/\S/g, ''); + } + } + i.parent = this.proxyOf; + return i + }); + + return processed + } + + prepend(...children) { + children = children.reverse(); + for (let child of children) { + let nodes = this.normalize(child, this.first, 'prepend').reverse(); + for (let node of nodes) this.proxyOf.nodes.unshift(node); + for (let id in this.indexes) { + this.indexes[id] = this.indexes[id] + nodes.length; + } + } + + this.markDirty(); + + return this + } + + push(child) { + child.parent = this; + this.proxyOf.nodes.push(child); + return this + } + + removeAll() { + for (let node of this.proxyOf.nodes) node.parent = undefined; + this.proxyOf.nodes = []; + + this.markDirty(); + + return this + } + + removeChild(child) { + child = this.index(child); + this.proxyOf.nodes[child].parent = undefined; + this.proxyOf.nodes.splice(child, 1); + + let index; + for (let id in this.indexes) { + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + + this.markDirty(); + + return this + } + + replaceValues(pattern, opts, callback) { + if (!callback) { + callback = opts; + opts = {}; + } + + this.walkDecls(decl => { + if (opts.props && !opts.props.includes(decl.prop)) return + if (opts.fast && !decl.value.includes(opts.fast)) return + + decl.value = decl.value.replace(pattern, callback); + }); + + this.markDirty(); + + return this + } + + some(condition) { + return this.nodes.some(condition) + } + + walk(callback) { + return this.each((child, i) => { + let result; + try { + result = callback(child, i); + } catch (e) { + throw child.addToError(e) + } + if (result !== false && child.walk) { + result = child.walk(callback); + } + + return result + }) + } + + walkAtRules(name, callback) { + if (!callback) { + callback = name; + return this.walk((child, i) => { + if (child.type === 'atrule') { + return callback(child, i) + } + }) + } + if (name instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'atrule' && name.test(child.name)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'atrule' && child.name === name) { + return callback(child, i) + } + }) + } + + walkComments(callback) { + return this.walk((child, i) => { + if (child.type === 'comment') { + return callback(child, i) + } + }) + } + + walkDecls(prop, callback) { + if (!callback) { + callback = prop; + return this.walk((child, i) => { + if (child.type === 'decl') { + return callback(child, i) + } + }) + } + if (prop instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'decl' && prop.test(child.prop)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'decl' && child.prop === prop) { + return callback(child, i) + } + }) + } + + walkRules(selector, callback) { + if (!callback) { + callback = selector; + + return this.walk((child, i) => { + if (child.type === 'rule') { + return callback(child, i) + } + }) + } + if (selector instanceof RegExp) { + return this.walk((child, i) => { + if (child.type === 'rule' && selector.test(child.selector)) { + return callback(child, i) + } + }) + } + return this.walk((child, i) => { + if (child.type === 'rule' && child.selector === selector) { + return callback(child, i) + } + }) + } + + get first() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[0] + } + + get last() { + if (!this.proxyOf.nodes) return undefined + return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] + } +}; + +Container$7.registerParse = dependant => { + parse$4 = dependant; +}; + +Container$7.registerRule = dependant => { + Rule$4 = dependant; +}; + +Container$7.registerAtRule = dependant => { + AtRule$4 = dependant; +}; + +Container$7.registerRoot = dependant => { + Root$6 = dependant; +}; + +var container$1 = Container$7; +Container$7.default = Container$7; + +/* c8 ignore start */ +Container$7.rebuild = node => { + if (node.type === 'atrule') { + Object.setPrototypeOf(node, AtRule$4.prototype); + } else if (node.type === 'rule') { + Object.setPrototypeOf(node, Rule$4.prototype); + } else if (node.type === 'decl') { + Object.setPrototypeOf(node, Declaration$3.prototype); + } else if (node.type === 'comment') { + Object.setPrototypeOf(node, Comment$3.prototype); + } else if (node.type === 'root') { + Object.setPrototypeOf(node, Root$6.prototype); + } + + node[my$1] = true; + + if (node.nodes) { + node.nodes.forEach(child => { + Container$7.rebuild(child); + }); + } +}; + +let Container$6 = container$1; + +let LazyResult$4, Processor$3; + +let Document$3 = class Document extends Container$6 { + constructor(defaults) { + // type needs to be passed to super, otherwise child roots won't be normalized correctly + super({ type: 'document', ...defaults }); + + if (!this.nodes) { + this.nodes = []; + } + } + + toResult(opts = {}) { + let lazy = new LazyResult$4(new Processor$3(), this, opts); + + return lazy.stringify() + } +}; + +Document$3.registerLazyResult = dependant => { + LazyResult$4 = dependant; +}; + +Document$3.registerProcessor = dependant => { + Processor$3 = dependant; +}; + +var document = Document$3; +Document$3.default = Document$3; + +/* eslint-disable no-console */ + +let printed = {}; + +var warnOnce$2 = function warnOnce(message) { + if (printed[message]) return + printed[message] = true; + + if (typeof console !== 'undefined' && console.warn) { + console.warn(message); + } +}; + +let Warning$2 = class Warning { + constructor(text, opts = {}) { + this.type = 'warning'; + this.text = text; + + if (opts.node && opts.node.source) { + let range = opts.node.rangeBy(opts); + this.line = range.start.line; + this.column = range.start.column; + this.endLine = range.end.line; + this.endColumn = range.end.column; + } + + for (let opt in opts) this[opt] = opts[opt]; + } + + toString() { + if (this.node) { + return this.node.error(this.text, { + index: this.index, + plugin: this.plugin, + word: this.word + }).message + } + + if (this.plugin) { + return this.plugin + ': ' + this.text + } + + return this.text + } +}; + +var warning = Warning$2; +Warning$2.default = Warning$2; + +let Warning$1 = warning; + +let Result$3 = class Result { + constructor(processor, root, opts) { + this.processor = processor; + this.messages = []; + this.root = root; + this.opts = opts; + this.css = undefined; + this.map = undefined; + } + + toString() { + return this.css + } + + warn(text, opts = {}) { + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin; + } + } + + let warning = new Warning$1(text, opts); + this.messages.push(warning); + + return warning + } + + warnings() { + return this.messages.filter(i => i.type === 'warning') + } + + get content() { + return this.css + } +}; + +var result = Result$3; +Result$3.default = Result$3; + +let Container$5 = container$1; + +let AtRule$3 = class AtRule extends Container$5 { + constructor(defaults) { + super(defaults); + this.type = 'atrule'; + } + + append(...children) { + if (!this.proxyOf.nodes) this.nodes = []; + return super.append(...children) + } + + prepend(...children) { + if (!this.proxyOf.nodes) this.nodes = []; + return super.prepend(...children) + } +}; + +var atRule = AtRule$3; +AtRule$3.default = AtRule$3; + +Container$5.registerAtRule(AtRule$3); + +let Container$4 = container$1; + +let LazyResult$3, Processor$2; + +let Root$5 = class Root extends Container$4 { + constructor(defaults) { + super(defaults); + this.type = 'root'; + if (!this.nodes) this.nodes = []; + } + + normalize(child, sample, type) { + let nodes = super.normalize(child); + + if (sample) { + if (type === 'prepend') { + if (this.nodes.length > 1) { + sample.raws.before = this.nodes[1].raws.before; + } else { + delete sample.raws.before; + } + } else if (this.first !== sample) { + for (let node of nodes) { + node.raws.before = sample.raws.before; + } + } + } + + return nodes + } + + removeChild(child, ignore) { + let index = this.index(child); + + if (!ignore && index === 0 && this.nodes.length > 1) { + this.nodes[1].raws.before = this.nodes[index].raws.before; + } + + return super.removeChild(child) + } + + toResult(opts = {}) { + let lazy = new LazyResult$3(new Processor$2(), this, opts); + return lazy.stringify() + } +}; + +Root$5.registerLazyResult = dependant => { + LazyResult$3 = dependant; +}; + +Root$5.registerProcessor = dependant => { + Processor$2 = dependant; +}; + +var root$2 = Root$5; +Root$5.default = Root$5; + +Container$4.registerRoot(Root$5); + +let list$2 = { + comma(string) { + return list$2.split(string, [','], true) + }, + + space(string) { + let spaces = [' ', '\n', '\t']; + return list$2.split(string, spaces) + }, + + split(string, separators, last) { + let array = []; + let current = ''; + let split = false; + + let func = 0; + let inQuote = false; + let prevQuote = ''; + let escape = false; + + for (let letter of string) { + if (escape) { + escape = false; + } else if (letter === '\\') { + escape = true; + } else if (inQuote) { + if (letter === prevQuote) { + inQuote = false; + } + } else if (letter === '"' || letter === "'") { + inQuote = true; + prevQuote = letter; + } else if (letter === '(') { + func += 1; + } else if (letter === ')') { + if (func > 0) func -= 1; + } else if (func === 0) { + if (separators.includes(letter)) split = true; + } + + if (split) { + if (current !== '') array.push(current.trim()); + current = ''; + split = false; + } else { + current += letter; + } + } + + if (last || current !== '') array.push(current.trim()); + return array + } +}; + +var list_1 = list$2; +list$2.default = list$2; + +let Container$3 = container$1; +let list$1 = list_1; + +let Rule$3 = class Rule extends Container$3 { + constructor(defaults) { + super(defaults); + this.type = 'rule'; + if (!this.nodes) this.nodes = []; + } + + get selectors() { + return list$1.comma(this.selector) + } + + set selectors(values) { + let match = this.selector ? this.selector.match(/,\s*/) : null; + let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen'); + this.selector = values.join(sep); + } +}; + +var rule = Rule$3; +Rule$3.default = Rule$3; + +Container$3.registerRule(Rule$3); + +let Declaration$2 = declaration; +let tokenizer = tokenize$1; +let Comment$2 = comment$3; +let AtRule$2 = atRule; +let Root$4 = root$2; +let Rule$2 = rule; + +const SAFE_COMMENT_NEIGHBOR = { + empty: true, + space: true +}; + +function findLastWithPosition(tokens) { + for (let i = tokens.length - 1; i >= 0; i--) { + let token = tokens[i]; + let pos = token[3] || token[2]; + if (pos) return pos + } +} + +let Parser$1 = class Parser { + constructor(input) { + this.input = input; + + this.root = new Root$4(); + this.current = this.root; + this.spaces = ''; + this.semicolon = false; + this.customProperty = false; + + this.createTokenizer(); + this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }; + } + + atrule(token) { + let node = new AtRule$2(); + node.name = token[1].slice(1); + if (node.name === '') { + this.unnamedAtrule(node, token); + } + this.init(node, token[2]); + + let type; + let prev; + let shift; + let last = false; + let open = false; + let params = []; + let brackets = []; + + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken(); + type = token[0]; + + if (type === '(' || type === '[') { + brackets.push(type === '(' ? ')' : ']'); + } else if (type === '{' && brackets.length > 0) { + brackets.push('}'); + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + } + + if (brackets.length === 0) { + if (type === ';') { + node.source.end = this.getPosition(token[2]); + node.source.end.offset++; + this.semicolon = true; + break + } else if (type === '{') { + open = true; + break + } else if (type === '}') { + if (params.length > 0) { + shift = params.length - 1; + prev = params[shift]; + while (prev && prev[0] === 'space') { + prev = params[--shift]; + } + if (prev) { + node.source.end = this.getPosition(prev[3] || prev[2]); + node.source.end.offset++; + } + } + this.end(token); + break + } else { + params.push(token); + } + } else { + params.push(token); + } + + if (this.tokenizer.endOfFile()) { + last = true; + break + } + } + + node.raws.between = this.spacesAndCommentsFromEnd(params); + if (params.length) { + node.raws.afterName = this.spacesAndCommentsFromStart(params); + this.raw(node, 'params', params); + if (last) { + token = params[params.length - 1]; + node.source.end = this.getPosition(token[3] || token[2]); + node.source.end.offset++; + this.spaces = node.raws.between; + node.raws.between = ''; + } + } else { + node.raws.afterName = ''; + node.params = ''; + } + + if (open) { + node.nodes = []; + this.current = node; + } + } + + checkMissedSemicolon(tokens) { + let colon = this.colon(tokens); + if (colon === false) return + + let founded = 0; + let token; + for (let j = colon - 1; j >= 0; j--) { + token = tokens[j]; + if (token[0] !== 'space') { + founded += 1; + if (founded === 2) break + } + } + // If the token is a word, e.g. `!important`, `red` or any other valid property's value. + // Then we need to return the colon after that word token. [3] is the "end" colon of that word. + // And because we need it after that one we do +1 to get the next one. + throw this.input.error( + 'Missed semicolon', + token[0] === 'word' ? token[3] + 1 : token[2] + ) + } + + colon(tokens) { + let brackets = 0; + let token, type, prev; + for (let [i, element] of tokens.entries()) { + token = element; + type = token[0]; + + if (type === '(') { + brackets += 1; + } + if (type === ')') { + brackets -= 1; + } + if (brackets === 0 && type === ':') { + if (!prev) { + this.doubleColon(token); + } else if (prev[0] === 'word' && prev[1] === 'progid') { + continue + } else { + return i + } + } + + prev = token; + } + return false + } + + comment(token) { + let node = new Comment$2(); + this.init(node, token[2]); + node.source.end = this.getPosition(token[3] || token[2]); + node.source.end.offset++; + + let text = token[1].slice(2, -2); + if (/^\s*$/.test(text)) { + node.text = ''; + node.raws.left = text; + node.raws.right = ''; + } else { + let match = text.match(/^(\s*)([^]*\S)(\s*)$/); + node.text = match[2]; + node.raws.left = match[1]; + node.raws.right = match[3]; + } + } + + createTokenizer() { + this.tokenizer = tokenizer(this.input); + } + + decl(tokens, customProperty) { + let node = new Declaration$2(); + this.init(node, tokens[0][2]); + + let last = tokens[tokens.length - 1]; + if (last[0] === ';') { + this.semicolon = true; + tokens.pop(); + } + + node.source.end = this.getPosition( + last[3] || last[2] || findLastWithPosition(tokens) + ); + node.source.end.offset++; + + while (tokens[0][0] !== 'word') { + if (tokens.length === 1) this.unknownWord(tokens); + node.raws.before += tokens.shift()[1]; + } + node.source.start = this.getPosition(tokens[0][2]); + + node.prop = ''; + while (tokens.length) { + let type = tokens[0][0]; + if (type === ':' || type === 'space' || type === 'comment') { + break + } + node.prop += tokens.shift()[1]; + } + + node.raws.between = ''; + + let token; + while (tokens.length) { + token = tokens.shift(); + + if (token[0] === ':') { + node.raws.between += token[1]; + break + } else { + if (token[0] === 'word' && /\w/.test(token[1])) { + this.unknownWord([token]); + } + node.raws.between += token[1]; + } + } + + if (node.prop[0] === '_' || node.prop[0] === '*') { + node.raws.before += node.prop[0]; + node.prop = node.prop.slice(1); + } + + let firstSpaces = []; + let next; + while (tokens.length) { + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break + firstSpaces.push(tokens.shift()); + } + + this.precheckMissedSemicolon(tokens); + + for (let i = tokens.length - 1; i >= 0; i--) { + token = tokens[i]; + if (token[1].toLowerCase() === '!important') { + node.important = true; + let string = this.stringFrom(tokens, i); + string = this.spacesFromEnd(tokens) + string; + if (string !== ' !important') node.raws.important = string; + break + } else if (token[1].toLowerCase() === 'important') { + let cache = tokens.slice(0); + let str = ''; + for (let j = i; j > 0; j--) { + let type = cache[j][0]; + if (str.trim().indexOf('!') === 0 && type !== 'space') { + break + } + str = cache.pop()[1] + str; + } + if (str.trim().indexOf('!') === 0) { + node.important = true; + node.raws.important = str; + tokens = cache; + } + } + + if (token[0] !== 'space' && token[0] !== 'comment') { + break + } + } + + let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment'); + + if (hasWord) { + node.raws.between += firstSpaces.map(i => i[1]).join(''); + firstSpaces = []; + } + this.raw(node, 'value', firstSpaces.concat(tokens), customProperty); + + if (node.value.includes(':') && !customProperty) { + this.checkMissedSemicolon(tokens); + } + } + + doubleColon(token) { + throw this.input.error( + 'Double colon', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } + + emptyRule(token) { + let node = new Rule$2(); + this.init(node, token[2]); + node.selector = ''; + node.raws.between = ''; + this.current = node; + } + + end(token) { + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + this.semicolon = false; + + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.spaces = ''; + + if (this.current.parent) { + this.current.source.end = this.getPosition(token[2]); + this.current.source.end.offset++; + this.current = this.current.parent; + } else { + this.unexpectedClose(token); + } + } + + endFile() { + if (this.current.parent) this.unclosedBlock(); + if (this.current.nodes && this.current.nodes.length) { + this.current.raws.semicolon = this.semicolon; + } + this.current.raws.after = (this.current.raws.after || '') + this.spaces; + this.root.source.end = this.getPosition(this.tokenizer.position()); + } + + freeSemicolon(token) { + this.spaces += token[1]; + if (this.current.nodes) { + let prev = this.current.nodes[this.current.nodes.length - 1]; + if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { + prev.raws.ownSemicolon = this.spaces; + this.spaces = ''; + } + } + } + + // Helpers + + getPosition(offset) { + let pos = this.input.fromOffset(offset); + return { + column: pos.col, + line: pos.line, + offset + } + } + + init(node, offset) { + this.current.push(node); + node.source = { + input: this.input, + start: this.getPosition(offset) + }; + node.raws.before = this.spaces; + this.spaces = ''; + if (node.type !== 'comment') this.semicolon = false; + } + + other(start) { + let end = false; + let type = null; + let colon = false; + let bracket = null; + let brackets = []; + let customProperty = start[1].startsWith('--'); + + let tokens = []; + let token = start; + while (token) { + type = token[0]; + tokens.push(token); + + if (type === '(' || type === '[') { + if (!bracket) bracket = token; + brackets.push(type === '(' ? ')' : ']'); + } else if (customProperty && colon && type === '{') { + if (!bracket) bracket = token; + brackets.push('}'); + } else if (brackets.length === 0) { + if (type === ';') { + if (colon) { + this.decl(tokens, customProperty); + return + } else { + break + } + } else if (type === '{') { + this.rule(tokens); + return + } else if (type === '}') { + this.tokenizer.back(tokens.pop()); + end = true; + break + } else if (type === ':') { + colon = true; + } + } else if (type === brackets[brackets.length - 1]) { + brackets.pop(); + if (brackets.length === 0) bracket = null; + } + + token = this.tokenizer.nextToken(); + } + + if (this.tokenizer.endOfFile()) end = true; + if (brackets.length > 0) this.unclosedBracket(bracket); + + if (end && colon) { + if (!customProperty) { + while (tokens.length) { + token = tokens[tokens.length - 1][0]; + if (token !== 'space' && token !== 'comment') break + this.tokenizer.back(tokens.pop()); + } + } + this.decl(tokens, customProperty); + } else { + this.unknownWord(tokens); + } + } + + parse() { + let token; + while (!this.tokenizer.endOfFile()) { + token = this.tokenizer.nextToken(); + + switch (token[0]) { + case 'space': + this.spaces += token[1]; + break + + case ';': + this.freeSemicolon(token); + break + + case '}': + this.end(token); + break + + case 'comment': + this.comment(token); + break + + case 'at-word': + this.atrule(token); + break + + case '{': + this.emptyRule(token); + break + + default: + this.other(token); + break + } + } + this.endFile(); + } + + precheckMissedSemicolon(/* tokens */) { + // Hook for Safe Parser + } + + raw(node, prop, tokens, customProperty) { + let token, type; + let length = tokens.length; + let value = ''; + let clean = true; + let next, prev; + + for (let i = 0; i < length; i += 1) { + token = tokens[i]; + type = token[0]; + if (type === 'space' && i === length - 1 && !customProperty) { + clean = false; + } else if (type === 'comment') { + prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'; + next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'; + if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { + if (value.slice(-1) === ',') { + clean = false; + } else { + value += token[1]; + } + } else { + clean = false; + } + } else { + value += token[1]; + } + } + if (!clean) { + let raw = tokens.reduce((all, i) => all + i[1], ''); + node.raws[prop] = { raw, value }; + } + node[prop] = value; + } + + rule(tokens) { + tokens.pop(); + + let node = new Rule$2(); + this.init(node, tokens[0][2]); + + node.raws.between = this.spacesAndCommentsFromEnd(tokens); + this.raw(node, 'selector', tokens); + this.current = node; + } + + spacesAndCommentsFromEnd(tokens) { + let lastTokenType; + let spaces = ''; + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space' && lastTokenType !== 'comment') break + spaces = tokens.pop()[1] + spaces; + } + return spaces + } + + // Errors + + spacesAndCommentsFromStart(tokens) { + let next; + let spaces = ''; + while (tokens.length) { + next = tokens[0][0]; + if (next !== 'space' && next !== 'comment') break + spaces += tokens.shift()[1]; + } + return spaces + } + + spacesFromEnd(tokens) { + let lastTokenType; + let spaces = ''; + while (tokens.length) { + lastTokenType = tokens[tokens.length - 1][0]; + if (lastTokenType !== 'space') break + spaces = tokens.pop()[1] + spaces; + } + return spaces + } + + stringFrom(tokens, from) { + let result = ''; + for (let i = from; i < tokens.length; i++) { + result += tokens[i][1]; + } + tokens.splice(from, tokens.length - from); + return result + } + + unclosedBlock() { + let pos = this.current.source.start; + throw this.input.error('Unclosed block', pos.line, pos.column) + } + + unclosedBracket(bracket) { + throw this.input.error( + 'Unclosed bracket', + { offset: bracket[2] }, + { offset: bracket[2] + 1 } + ) + } + + unexpectedClose(token) { + throw this.input.error( + 'Unexpected }', + { offset: token[2] }, + { offset: token[2] + 1 } + ) + } + + unknownWord(tokens) { + throw this.input.error( + 'Unknown word', + { offset: tokens[0][2] }, + { offset: tokens[0][2] + tokens[0][1].length } + ) + } + + unnamedAtrule(node, token) { + throw this.input.error( + 'At-rule without name', + { offset: token[2] }, + { offset: token[2] + token[1].length } + ) + } +}; + +var parser$1 = Parser$1; + +let Container$2 = container$1; +let Parser = parser$1; +let Input$2 = input; + +function parse$3(css, opts) { + let input = new Input$2(css, opts); + let parser = new Parser(input); + try { + parser.parse(); + } catch (e) { + if (browser$1.env.NODE_ENV !== 'production') { + if (e.name === 'CssSyntaxError' && opts && opts.from) { + if (/\.scss$/i.test(opts.from)) { + e.message += + '\nYou tried to parse SCSS with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-scss parser'; + } else if (/\.sass/i.test(opts.from)) { + e.message += + '\nYou tried to parse Sass with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-sass parser'; + } else if (/\.less$/i.test(opts.from)) { + e.message += + '\nYou tried to parse Less with ' + + 'the standard CSS parser; ' + + 'try again with the postcss-less parser'; + } + } + } + throw e + } + + return parser.root +} + +var parse_1 = parse$3; +parse$3.default = parse$3; + +Container$2.registerParse(parse$3); + +let { isClean, my } = symbols; +let MapGenerator$1 = mapGenerator; +let stringify$2 = stringify_1; +let Container$1 = container$1; +let Document$2 = document; +let warnOnce$1 = warnOnce$2; +let Result$2 = result; +let parse$2 = parse_1; +let Root$3 = root$2; + +const TYPE_TO_CLASS_NAME = { + atrule: 'AtRule', + comment: 'Comment', + decl: 'Declaration', + document: 'Document', + root: 'Root', + rule: 'Rule' +}; + +const PLUGIN_PROPS = { + AtRule: true, + AtRuleExit: true, + Comment: true, + CommentExit: true, + Declaration: true, + DeclarationExit: true, + Document: true, + DocumentExit: true, + Once: true, + OnceExit: true, + postcssPlugin: true, + prepare: true, + Root: true, + RootExit: true, + Rule: true, + RuleExit: true +}; + +const NOT_VISITORS = { + Once: true, + postcssPlugin: true, + prepare: true +}; + +const CHILDREN = 0; + +function isPromise(obj) { + return typeof obj === 'object' && typeof obj.then === 'function' +} + +function getEvents(node) { + let key = false; + let type = TYPE_TO_CLASS_NAME[node.type]; + if (node.type === 'decl') { + key = node.prop.toLowerCase(); + } else if (node.type === 'atrule') { + key = node.name.toLowerCase(); + } + + if (key && node.append) { + return [ + type, + type + '-' + key, + CHILDREN, + type + 'Exit', + type + 'Exit-' + key + ] + } else if (key) { + return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] + } else if (node.append) { + return [type, CHILDREN, type + 'Exit'] + } else { + return [type, type + 'Exit'] + } +} + +function toStack(node) { + let events; + if (node.type === 'document') { + events = ['Document', CHILDREN, 'DocumentExit']; + } else if (node.type === 'root') { + events = ['Root', CHILDREN, 'RootExit']; + } else { + events = getEvents(node); + } + + return { + eventIndex: 0, + events, + iterator: 0, + node, + visitorIndex: 0, + visitors: [] + } +} + +function cleanMarks(node) { + node[isClean] = false; + if (node.nodes) node.nodes.forEach(i => cleanMarks(i)); + return node +} + +let postcss$2 = {}; + +let LazyResult$2 = class LazyResult { + constructor(processor, css, opts) { + this.stringified = false; + this.processed = false; + + let root; + if ( + typeof css === 'object' && + css !== null && + (css.type === 'root' || css.type === 'document') + ) { + root = cleanMarks(css); + } else if (css instanceof LazyResult || css instanceof Result$2) { + root = cleanMarks(css.root); + if (css.map) { + if (typeof opts.map === 'undefined') opts.map = {}; + if (!opts.map.inline) opts.map.inline = false; + opts.map.prev = css.map; + } + } else { + let parser = parse$2; + if (opts.syntax) parser = opts.syntax.parse; + if (opts.parser) parser = opts.parser; + if (parser.parse) parser = parser.parse; + + try { + root = parser(css, opts); + } catch (error) { + this.processed = true; + this.error = error; + } + + if (root && !root[my]) { + /* c8 ignore next 2 */ + Container$1.rebuild(root); + } + } + + this.result = new Result$2(processor, root, opts); + this.helpers = { ...postcss$2, postcss: postcss$2, result: this.result }; + this.plugins = this.processor.plugins.map(plugin => { + if (typeof plugin === 'object' && plugin.prepare) { + return { ...plugin, ...plugin.prepare(this.result) } + } else { + return plugin + } + }); + } + + async() { + if (this.error) return Promise.reject(this.error) + if (this.processed) return Promise.resolve(this.result) + if (!this.processing) { + this.processing = this.runAsync(); + } + return this.processing + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + getAsyncError() { + throw new Error('Use process(css).then(cb) to work with async plugins') + } + + handleError(error, node) { + let plugin = this.result.lastPlugin; + try { + if (node) node.addToError(error); + this.error = error; + if (error.name === 'CssSyntaxError' && !error.plugin) { + error.plugin = plugin.postcssPlugin; + error.setMessage(); + } else if (plugin.postcssVersion) { + if (browser$1.env.NODE_ENV !== 'production') { + let pluginName = plugin.postcssPlugin; + let pluginVer = plugin.postcssVersion; + let runtimeVer = this.result.processor.version; + let a = pluginVer.split('.'); + let b = runtimeVer.split('.'); + + if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { + // eslint-disable-next-line no-console + console.error( + 'Unknown error from PostCSS plugin. Your current PostCSS ' + + 'version is ' + + runtimeVer + + ', but ' + + pluginName + + ' uses ' + + pluginVer + + '. Perhaps this is the source of the error below.' + ); + } + } + } + } catch (err) { + /* c8 ignore next 3 */ + // eslint-disable-next-line no-console + if (console && console.error) console.error(err); + } + return error + } + + prepareVisitors() { + this.listeners = {}; + let add = (plugin, type, cb) => { + if (!this.listeners[type]) this.listeners[type] = []; + this.listeners[type].push([plugin, cb]); + }; + for (let plugin of this.plugins) { + if (typeof plugin === 'object') { + for (let event in plugin) { + if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { + throw new Error( + `Unknown event ${event} in ${plugin.postcssPlugin}. ` + + `Try to update PostCSS (${this.processor.version} now).` + ) + } + if (!NOT_VISITORS[event]) { + if (typeof plugin[event] === 'object') { + for (let filter in plugin[event]) { + if (filter === '*') { + add(plugin, event, plugin[event][filter]); + } else { + add( + plugin, + event + '-' + filter.toLowerCase(), + plugin[event][filter] + ); + } + } + } else if (typeof plugin[event] === 'function') { + add(plugin, event, plugin[event]); + } + } + } + } + } + this.hasListener = Object.keys(this.listeners).length > 0; + } + + async runAsync() { + this.plugin = 0; + for (let i = 0; i < this.plugins.length; i++) { + let plugin = this.plugins[i]; + let promise = this.runOnRoot(plugin); + if (isPromise(promise)) { + try { + await promise; + } catch (error) { + throw this.handleError(error) + } + } + } + + this.prepareVisitors(); + if (this.hasListener) { + let root = this.result.root; + while (!root[isClean]) { + root[isClean] = true; + let stack = [toStack(root)]; + while (stack.length > 0) { + let promise = this.visitTick(stack); + if (isPromise(promise)) { + try { + await promise; + } catch (e) { + let node = stack[stack.length - 1].node; + throw this.handleError(e, node) + } + } + } + } + + if (this.listeners.OnceExit) { + for (let [plugin, visitor] of this.listeners.OnceExit) { + this.result.lastPlugin = plugin; + try { + if (root.type === 'document') { + let roots = root.nodes.map(subRoot => + visitor(subRoot, this.helpers) + ); + + await Promise.all(roots); + } else { + await visitor(root, this.helpers); + } + } catch (e) { + throw this.handleError(e) + } + } + } + } + + this.processed = true; + return this.stringify() + } + + runOnRoot(plugin) { + this.result.lastPlugin = plugin; + try { + if (typeof plugin === 'object' && plugin.Once) { + if (this.result.root.type === 'document') { + let roots = this.result.root.nodes.map(root => + plugin.Once(root, this.helpers) + ); + + if (isPromise(roots[0])) { + return Promise.all(roots) + } + + return roots + } + + return plugin.Once(this.result.root, this.helpers) + } else if (typeof plugin === 'function') { + return plugin(this.result.root, this.result) + } + } catch (error) { + throw this.handleError(error) + } + } + + stringify() { + if (this.error) throw this.error + if (this.stringified) return this.result + this.stringified = true; + + this.sync(); + + let opts = this.result.opts; + let str = stringify$2; + if (opts.syntax) str = opts.syntax.stringify; + if (opts.stringifier) str = opts.stringifier; + if (str.stringify) str = str.stringify; + + let map = new MapGenerator$1(str, this.result.root, this.result.opts); + let data = map.generate(); + this.result.css = data[0]; + this.result.map = data[1]; + + return this.result + } + + sync() { + if (this.error) throw this.error + if (this.processed) return this.result + this.processed = true; + + if (this.processing) { + throw this.getAsyncError() + } + + for (let plugin of this.plugins) { + let promise = this.runOnRoot(plugin); + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + + this.prepareVisitors(); + if (this.hasListener) { + let root = this.result.root; + while (!root[isClean]) { + root[isClean] = true; + this.walkSync(root); + } + if (this.listeners.OnceExit) { + if (root.type === 'document') { + for (let subRoot of root.nodes) { + this.visitSync(this.listeners.OnceExit, subRoot); + } + } else { + this.visitSync(this.listeners.OnceExit, root); + } + } + } + + return this.result + } + + then(onFulfilled, onRejected) { + if (browser$1.env.NODE_ENV !== 'production') { + if (!('from' in this.opts)) { + warnOnce$1( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ); + } + } + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this.css + } + + visitSync(visitors, node) { + for (let [plugin, visitor] of visitors) { + this.result.lastPlugin = plugin; + let promise; + try { + promise = visitor(node, this.helpers); + } catch (e) { + throw this.handleError(e, node.proxyOf) + } + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + return true + } + if (isPromise(promise)) { + throw this.getAsyncError() + } + } + } + + visitTick(stack) { + let visit = stack[stack.length - 1]; + let { node, visitors } = visit; + + if (node.type !== 'root' && node.type !== 'document' && !node.parent) { + stack.pop(); + return + } + + if (visitors.length > 0 && visit.visitorIndex < visitors.length) { + let [plugin, visitor] = visitors[visit.visitorIndex]; + visit.visitorIndex += 1; + if (visit.visitorIndex === visitors.length) { + visit.visitors = []; + visit.visitorIndex = 0; + } + this.result.lastPlugin = plugin; + try { + return visitor(node.toProxy(), this.helpers) + } catch (e) { + throw this.handleError(e, node) + } + } + + if (visit.iterator !== 0) { + let iterator = visit.iterator; + let child; + while ((child = node.nodes[node.indexes[iterator]])) { + node.indexes[iterator] += 1; + if (!child[isClean]) { + child[isClean] = true; + stack.push(toStack(child)); + return + } + } + visit.iterator = 0; + delete node.indexes[iterator]; + } + + let events = visit.events; + while (visit.eventIndex < events.length) { + let event = events[visit.eventIndex]; + visit.eventIndex += 1; + if (event === CHILDREN) { + if (node.nodes && node.nodes.length) { + node[isClean] = true; + visit.iterator = node.getIterator(); + } + return + } else if (this.listeners[event]) { + visit.visitors = this.listeners[event]; + return + } + } + stack.pop(); + } + + walkSync(node) { + node[isClean] = true; + let events = getEvents(node); + for (let event of events) { + if (event === CHILDREN) { + if (node.nodes) { + node.each(child => { + if (!child[isClean]) this.walkSync(child); + }); + } + } else { + let visitors = this.listeners[event]; + if (visitors) { + if (this.visitSync(visitors, node.toProxy())) return + } + } + } + } + + warnings() { + return this.sync().warnings() + } + + get content() { + return this.stringify().content + } + + get css() { + return this.stringify().css + } + + get map() { + return this.stringify().map + } + + get messages() { + return this.sync().messages + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + return this.sync().root + } + + get [Symbol.toStringTag]() { + return 'LazyResult' + } +}; + +LazyResult$2.registerPostcss = dependant => { + postcss$2 = dependant; +}; + +var lazyResult = LazyResult$2; +LazyResult$2.default = LazyResult$2; + +Root$3.registerLazyResult(LazyResult$2); +Document$2.registerLazyResult(LazyResult$2); + +let MapGenerator = mapGenerator; +let stringify$1 = stringify_1; +let warnOnce = warnOnce$2; +let parse$1 = parse_1; +const Result$1 = result; + +let NoWorkResult$1 = class NoWorkResult { + constructor(processor, css, opts) { + css = css.toString(); + this.stringified = false; + + this._processor = processor; + this._css = css; + this._opts = opts; + this._map = undefined; + let root; + + let str = stringify$1; + this.result = new Result$1(this._processor, root, this._opts); + this.result.css = css; + + let self = this; + Object.defineProperty(this.result, 'root', { + get() { + return self.root + } + }); + + let map = new MapGenerator(str, root, this._opts, css); + if (map.isMap()) { + let [generatedCSS, generatedMap] = map.generate(); + if (generatedCSS) { + this.result.css = generatedCSS; + } + if (generatedMap) { + this.result.map = generatedMap; + } + } else { + map.clearAnnotation(); + this.result.css = map.css; + } + } + + async() { + if (this.error) return Promise.reject(this.error) + return Promise.resolve(this.result) + } + + catch(onRejected) { + return this.async().catch(onRejected) + } + + finally(onFinally) { + return this.async().then(onFinally, onFinally) + } + + sync() { + if (this.error) throw this.error + return this.result + } + + then(onFulfilled, onRejected) { + if (browser$1.env.NODE_ENV !== 'production') { + if (!('from' in this._opts)) { + warnOnce( + 'Without `from` option PostCSS could generate wrong source map ' + + 'and will not find Browserslist config. Set it to CSS file path ' + + 'or to `undefined` to prevent this warning.' + ); + } + } + + return this.async().then(onFulfilled, onRejected) + } + + toString() { + return this._css + } + + warnings() { + return [] + } + + get content() { + return this.result.css + } + + get css() { + return this.result.css + } + + get map() { + return this.result.map + } + + get messages() { + return [] + } + + get opts() { + return this.result.opts + } + + get processor() { + return this.result.processor + } + + get root() { + if (this._root) { + return this._root + } + + let root; + let parser = parse$1; + + try { + root = parser(this._css, this._opts); + } catch (error) { + this.error = error; + } + + if (this.error) { + throw this.error + } else { + this._root = root; + return root + } + } + + get [Symbol.toStringTag]() { + return 'NoWorkResult' + } +}; + +var noWorkResult = NoWorkResult$1; +NoWorkResult$1.default = NoWorkResult$1; + +let NoWorkResult = noWorkResult; +let LazyResult$1 = lazyResult; +let Document$1 = document; +let Root$2 = root$2; + +let Processor$1 = class Processor { + constructor(plugins = []) { + this.version = '8.4.33'; + this.plugins = this.normalize(plugins); + } + + normalize(plugins) { + let normalized = []; + for (let i of plugins) { + if (i.postcss === true) { + i = i(); + } else if (i.postcss) { + i = i.postcss; + } + + if (typeof i === 'object' && Array.isArray(i.plugins)) { + normalized = normalized.concat(i.plugins); + } else if (typeof i === 'object' && i.postcssPlugin) { + normalized.push(i); + } else if (typeof i === 'function') { + normalized.push(i); + } else if (typeof i === 'object' && (i.parse || i.stringify)) { + if (browser$1.env.NODE_ENV !== 'production') { + throw new Error( + 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' + + 'one of the syntax/parser/stringifier options as outlined ' + + 'in your PostCSS runner documentation.' + ) + } + } else { + throw new Error(i + ' is not a PostCSS plugin') + } + } + return normalized + } + + process(css, opts = {}) { + if ( + !this.plugins.length && + !opts.parser && + !opts.stringifier && + !opts.syntax + ) { + return new NoWorkResult(this, css, opts) + } else { + return new LazyResult$1(this, css, opts) + } + } + + use(plugin) { + this.plugins = this.plugins.concat(this.normalize([plugin])); + return this + } +}; + +var processor$1 = Processor$1; +Processor$1.default = Processor$1; + +Root$2.registerProcessor(Processor$1); +Document$1.registerProcessor(Processor$1); + +let Declaration$1 = declaration; +let PreviousMap = previousMap; +let Comment$1 = comment$3; +let AtRule$1 = atRule; +let Input$1 = input; +let Root$1 = root$2; +let Rule$1 = rule; + +function fromJSON$1(json, inputs) { + if (Array.isArray(json)) return json.map(n => fromJSON$1(n)) + + let { inputs: ownInputs, ...defaults } = json; + if (ownInputs) { + inputs = []; + for (let input of ownInputs) { + let inputHydrated = { ...input, __proto__: Input$1.prototype }; + if (inputHydrated.map) { + inputHydrated.map = { + ...inputHydrated.map, + __proto__: PreviousMap.prototype + }; + } + inputs.push(inputHydrated); + } + } + if (defaults.nodes) { + defaults.nodes = json.nodes.map(n => fromJSON$1(n, inputs)); + } + if (defaults.source) { + let { inputId, ...source } = defaults.source; + defaults.source = source; + if (inputId != null) { + defaults.source.input = inputs[inputId]; + } + } + if (defaults.type === 'root') { + return new Root$1(defaults) + } else if (defaults.type === 'decl') { + return new Declaration$1(defaults) + } else if (defaults.type === 'rule') { + return new Rule$1(defaults) + } else if (defaults.type === 'comment') { + return new Comment$1(defaults) + } else if (defaults.type === 'atrule') { + return new AtRule$1(defaults) + } else { + throw new Error('Unknown node type: ' + json.type) + } +} + +var fromJSON_1 = fromJSON$1; +fromJSON$1.default = fromJSON$1; + +let CssSyntaxError = cssSyntaxError; +let Declaration = declaration; +let LazyResult = lazyResult; +let Container = container$1; +let Processor = processor$1; +let stringify = stringify_1; +let fromJSON = fromJSON_1; +let Document = document; +let Warning = warning; +let Comment = comment$3; +let AtRule = atRule; +let Result = result; +let Input = input; +let parse = parse_1; +let list = list_1; +let Rule = rule; +let Root = root$2; +let Node = node$2; + +function postcss(...plugins) { + if (plugins.length === 1 && Array.isArray(plugins[0])) { + plugins = plugins[0]; + } + return new Processor(plugins) +} + +postcss.plugin = function plugin(name, initializer) { + let warningPrinted = false; + function creator(...args) { + // eslint-disable-next-line no-console + if (console && console.warn && !warningPrinted) { + warningPrinted = true; + // eslint-disable-next-line no-console + console.warn( + name + + ': postcss.plugin was deprecated. Migration guide:\n' + + 'https://evilmartians.com/chronicles/postcss-8-plugin-migration' + ); + if (browser$1.env.LANG && browser$1.env.LANG.startsWith('cn')) { + /* c8 ignore next 7 */ + // eslint-disable-next-line no-console + console.warn( + name + + ': 里面 postcss.plugin 被弃用. 迁移指南:\n' + + 'https://www.w3ctech.com/topic/2226' + ); + } + } + let transformer = initializer(...args); + transformer.postcssPlugin = name; + transformer.postcssVersion = new Processor().version; + return transformer + } + + let cache; + Object.defineProperty(creator, 'postcss', { + get() { + if (!cache) cache = creator(); + return cache + } + }); + + creator.process = function (css, processOpts, pluginOpts) { + return postcss([creator(pluginOpts)]).process(css, processOpts) + }; + + return creator +}; + +postcss.stringify = stringify; +postcss.parse = parse; +postcss.fromJSON = fromJSON; +postcss.list = list; + +postcss.comment = defaults => new Comment(defaults); +postcss.atRule = defaults => new AtRule(defaults); +postcss.decl = defaults => new Declaration(defaults); +postcss.rule = defaults => new Rule(defaults); +postcss.root = defaults => new Root(defaults); +postcss.document = defaults => new Document(defaults); + +postcss.CssSyntaxError = CssSyntaxError; +postcss.Declaration = Declaration; +postcss.Container = Container; +postcss.Processor = Processor; +postcss.Document = Document; +postcss.Comment = Comment; +postcss.Warning = Warning; +postcss.AtRule = AtRule; +postcss.Result = Result; +postcss.Input = Input; +postcss.Rule = Rule; +postcss.Root = Root; +postcss.Node = Node; + +LazyResult.registerPostcss(postcss); + +var postcss_1 = postcss; +postcss.default = postcss; + +var postcss$1 = /*@__PURE__*/getDefaultExportFromCjs(postcss_1); + +postcss$1.stringify; +postcss$1.fromJSON; +postcss$1.plugin; +postcss$1.parse; +postcss$1.list; + +postcss$1.document; +postcss$1.comment; +postcss$1.atRule; +postcss$1.rule; +postcss$1.decl; +postcss$1.root; + +postcss$1.CssSyntaxError; +postcss$1.Declaration; +postcss$1.Container; +postcss$1.Processor; +postcss$1.Document; +postcss$1.Comment; +postcss$1.Warning; +postcss$1.AtRule; +postcss$1.Result; +postcss$1.Input; +postcss$1.Rule; +postcss$1.Root; +postcss$1.Node; + +const trimPlugin = () => { + return { + postcssPlugin: "vue-sfc-trim", + Once(root) { + root.walk(({ type, raws }) => { + if (type === "rule" || type === "atrule") { + if (raws.before) + raws.before = "\n"; + if ("after" in raws && raws.after) + raws.after = "\n"; + } + }); + } + }; +}; +trimPlugin.postcss = true; +var trimPlugin$1 = trimPlugin; + +var dist = {exports: {}}; + +var processor = {exports: {}}; + +var parser = {exports: {}}; + +var root$1 = {exports: {}}; + +var container = {exports: {}}; + +var node$1 = {exports: {}}; + +var util$6 = {}; + +var unesc = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = unesc; + // Many thanks for this post which made this migration much easier. + // https://mathiasbynens.be/notes/css-escapes + + /** + * + * @param {string} str + * @returns {[string, number]|undefined} + */ + function gobbleHex(str) { + var lower = str.toLowerCase(); + var hex = ''; + var spaceTerminated = false; + for (var i = 0; i < 6 && lower[i] !== undefined; i++) { + var code = lower.charCodeAt(i); + // check to see if we are dealing with a valid hex char [a-f|0-9] + var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; + // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point + spaceTerminated = code === 32; + if (!valid) { + break; + } + hex += lower[i]; + } + if (hex.length === 0) { + return undefined; + } + var codePoint = parseInt(hex, 16); + var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; + // Add special case for + // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" + // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point + if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { + return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; + } + return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; + } + var CONTAINS_ESCAPE = /\\/; + function unesc(str) { + var needToProcess = CONTAINS_ESCAPE.test(str); + if (!needToProcess) { + return str; + } + var ret = ""; + for (var i = 0; i < str.length; i++) { + if (str[i] === "\\") { + var gobbled = gobbleHex(str.slice(i + 1, i + 7)); + if (gobbled !== undefined) { + ret += gobbled[0]; + i += gobbled[1]; + continue; + } + + // Retain a pair of \\ if double escaped `\\\\` + // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e + if (str[i + 1] === "\\") { + ret += "\\"; + i++; + continue; + } + + // if \\ is at the end of the string retain it + // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb + if (str.length === i + 1) { + ret += str[i]; + } + continue; + } + ret += str[i]; + } + return ret; + } + module.exports = exports.default; +} (unesc, unesc.exports)); + +var unescExports = unesc.exports; + +var getProp = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = getProp; + function getProp(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + return undefined; + } + obj = obj[prop]; + } + return obj; + } + module.exports = exports.default; +} (getProp, getProp.exports)); + +var getPropExports = getProp.exports; + +var ensureObject = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = ensureObject; + function ensureObject(obj) { + for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + props[_key - 1] = arguments[_key]; + } + while (props.length > 0) { + var prop = props.shift(); + if (!obj[prop]) { + obj[prop] = {}; + } + obj = obj[prop]; + } + } + module.exports = exports.default; +} (ensureObject, ensureObject.exports)); + +var ensureObjectExports = ensureObject.exports; + +var stripComments = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = stripComments; + function stripComments(str) { + var s = ""; + var commentStart = str.indexOf("/*"); + var lastEnd = 0; + while (commentStart >= 0) { + s = s + str.slice(lastEnd, commentStart); + var commentEnd = str.indexOf("*/", commentStart + 2); + if (commentEnd < 0) { + return s; + } + lastEnd = commentEnd + 2; + commentStart = str.indexOf("/*", lastEnd); + } + s = s + str.slice(lastEnd); + return s; + } + module.exports = exports.default; +} (stripComments, stripComments.exports)); + +var stripCommentsExports = stripComments.exports; + +util$6.__esModule = true; +util$6.unesc = util$6.stripComments = util$6.getProp = util$6.ensureObject = void 0; +var _unesc = _interopRequireDefault$1(unescExports); +util$6.unesc = _unesc["default"]; +var _getProp = _interopRequireDefault$1(getPropExports); +util$6.getProp = _getProp["default"]; +var _ensureObject = _interopRequireDefault$1(ensureObjectExports); +util$6.ensureObject = _ensureObject["default"]; +var _stripComments = _interopRequireDefault$1(stripCommentsExports); +util$6.stripComments = _stripComments["default"]; +function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _util = util$6; + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var cloneNode = function cloneNode(obj, parent) { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + var cloned = new obj.constructor(); + for (var i in obj) { + if (!obj.hasOwnProperty(i)) { + continue; + } + var value = obj[i]; + var type = typeof value; + if (i === 'parent' && type === 'object') { + if (parent) { + cloned[i] = parent; + } + } else if (value instanceof Array) { + cloned[i] = value.map(function (j) { + return cloneNode(j, cloned); + }); + } else { + cloned[i] = cloneNode(value, cloned); + } + } + return cloned; + }; + var Node = /*#__PURE__*/function () { + function Node(opts) { + if (opts === void 0) { + opts = {}; + } + Object.assign(this, opts); + this.spaces = this.spaces || {}; + this.spaces.before = this.spaces.before || ''; + this.spaces.after = this.spaces.after || ''; + } + var _proto = Node.prototype; + _proto.remove = function remove() { + if (this.parent) { + this.parent.removeChild(this); + } + this.parent = undefined; + return this; + }; + _proto.replaceWith = function replaceWith() { + if (this.parent) { + for (var index in arguments) { + this.parent.insertBefore(this, arguments[index]); + } + this.remove(); + } + return this; + }; + _proto.next = function next() { + return this.parent.at(this.parent.index(this) + 1); + }; + _proto.prev = function prev() { + return this.parent.at(this.parent.index(this) - 1); + }; + _proto.clone = function clone(overrides) { + if (overrides === void 0) { + overrides = {}; + } + var cloned = cloneNode(this); + for (var name in overrides) { + cloned[name] = overrides[name]; + } + return cloned; + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows non standard syntax to be appended to an existing property + * by specifying the escaped value. By specifying the escaped value, + * illegal characters are allowed to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped optional. the escaped value of the property. + */; + _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + var originalValue = this[name]; + var originalEscaped = this.raws[name]; + this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. + if (originalEscaped || valueEscaped !== value) { + this.raws[name] = (originalEscaped || originalValue) + valueEscaped; + } else { + delete this.raws[name]; // delete any escaped value that was created by the setter. + } + } + + /** + * Some non-standard syntax doesn't follow normal escaping rules for css. + * This allows the escaped value to be specified directly, allowing illegal + * characters to be directly inserted into css output. + * @param {string} name the property to set + * @param {any} value the unescaped value of the property + * @param {string} valueEscaped the escaped value of the property. + */; + _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { + if (!this.raws) { + this.raws = {}; + } + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + this.raws[name] = valueEscaped; + } + + /** + * When you want a value to passed through to CSS directly. This method + * deletes the corresponding raw value causing the stringifier to fallback + * to the unescaped value. + * @param {string} name the property to set. + * @param {any} value The value that is both escaped and unescaped. + */; + _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { + this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. + if (this.raws) { + delete this.raws[name]; + } + } + + /** + * + * @param {number} line The number (starting with 1) + * @param {number} column The column number (starting with 1) + */; + _proto.isAtPosition = function isAtPosition(line, column) { + if (this.source && this.source.start && this.source.end) { + if (this.source.start.line > line) { + return false; + } + if (this.source.end.line < line) { + return false; + } + if (this.source.start.line === line && this.source.start.column > column) { + return false; + } + if (this.source.end.line === line && this.source.end.column < column) { + return false; + } + return true; + } + return undefined; + }; + _proto.stringifyProperty = function stringifyProperty(name) { + return this.raws && this.raws[name] || this[name]; + }; + _proto.valueToString = function valueToString() { + return String(this.stringifyProperty("value")); + }; + _proto.toString = function toString() { + return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); + }; + _createClass(Node, [{ + key: "rawSpaceBefore", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; + if (rawSpace === undefined) { + rawSpace = this.spaces && this.spaces.before; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.before = raw; + } + }, { + key: "rawSpaceAfter", + get: function get() { + var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; + if (rawSpace === undefined) { + rawSpace = this.spaces.after; + } + return rawSpace || ""; + }, + set: function set(raw) { + (0, _util.ensureObject)(this, "raws", "spaces"); + this.raws.spaces.after = raw; + } + }]); + return Node; + }(); + exports["default"] = Node; + module.exports = exports.default; +} (node$1, node$1.exports)); + +var nodeExports = node$1.exports; + +var types = {}; + +types.__esModule = true; +types.UNIVERSAL = types.TAG = types.STRING = types.SELECTOR = types.ROOT = types.PSEUDO = types.NESTING = types.ID = types.COMMENT = types.COMBINATOR = types.CLASS = types.ATTRIBUTE = void 0; +var TAG = 'tag'; +types.TAG = TAG; +var STRING = 'string'; +types.STRING = STRING; +var SELECTOR = 'selector'; +types.SELECTOR = SELECTOR; +var ROOT = 'root'; +types.ROOT = ROOT; +var PSEUDO = 'pseudo'; +types.PSEUDO = PSEUDO; +var NESTING = 'nesting'; +types.NESTING = NESTING; +var ID = 'id'; +types.ID = ID; +var COMMENT = 'comment'; +types.COMMENT = COMMENT; +var COMBINATOR = 'combinator'; +types.COMBINATOR = COMBINATOR; +var CLASS = 'class'; +types.CLASS = CLASS; +var ATTRIBUTE = 'attribute'; +types.ATTRIBUTE = ATTRIBUTE; +var UNIVERSAL = 'universal'; +types.UNIVERSAL = UNIVERSAL; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var types$1 = _interopRequireWildcard(types); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Container = /*#__PURE__*/function (_Node) { + _inheritsLoose(Container, _Node); + function Container(opts) { + var _this; + _this = _Node.call(this, opts) || this; + if (!_this.nodes) { + _this.nodes = []; + } + return _this; + } + var _proto = Container.prototype; + _proto.append = function append(selector) { + selector.parent = this; + this.nodes.push(selector); + return this; + }; + _proto.prepend = function prepend(selector) { + selector.parent = this; + this.nodes.unshift(selector); + return this; + }; + _proto.at = function at(index) { + return this.nodes[index]; + }; + _proto.index = function index(child) { + if (typeof child === 'number') { + return child; + } + return this.nodes.indexOf(child); + }; + _proto.removeChild = function removeChild(child) { + child = this.index(child); + this.at(child).parent = undefined; + this.nodes.splice(child, 1); + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index >= child) { + this.indexes[id] = index - 1; + } + } + return this; + }; + _proto.removeAll = function removeAll() { + for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { + var node = _step.value; + node.parent = undefined; + } + this.nodes = []; + return this; + }; + _proto.empty = function empty() { + return this.removeAll(); + }; + _proto.insertAfter = function insertAfter(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex + 1, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (oldIndex <= index) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto.insertBefore = function insertBefore(oldNode, newNode) { + newNode.parent = this; + var oldIndex = this.index(oldNode); + this.nodes.splice(oldIndex, 0, newNode); + newNode.parent = this; + var index; + for (var id in this.indexes) { + index = this.indexes[id]; + if (index <= oldIndex) { + this.indexes[id] = index + 1; + } + } + return this; + }; + _proto._findChildAtPosition = function _findChildAtPosition(line, col) { + var found = undefined; + this.each(function (node) { + if (node.atPosition) { + var foundChild = node.atPosition(line, col); + if (foundChild) { + found = foundChild; + return false; + } + } else if (node.isAtPosition(line, col)) { + found = node; + return false; + } + }); + return found; + } + + /** + * Return the most specific node at the line and column number given. + * The source location is based on the original parsed location, locations aren't + * updated as selector nodes are mutated. + * + * Note that this location is relative to the location of the first character + * of the selector, and not the location of the selector in the overall document + * when used in conjunction with postcss. + * + * If not found, returns undefined. + * @param {number} line The line number of the node to find. (1-based index) + * @param {number} col The column number of the node to find. (1-based index) + */; + _proto.atPosition = function atPosition(line, col) { + if (this.isAtPosition(line, col)) { + return this._findChildAtPosition(line, col) || this; + } else { + return undefined; + } + }; + _proto._inferEndPosition = function _inferEndPosition() { + if (this.last && this.last.source && this.last.source.end) { + this.source = this.source || {}; + this.source.end = this.source.end || {}; + Object.assign(this.source.end, this.last.source.end); + } + }; + _proto.each = function each(callback) { + if (!this.lastEach) { + this.lastEach = 0; + } + if (!this.indexes) { + this.indexes = {}; + } + this.lastEach++; + var id = this.lastEach; + this.indexes[id] = 0; + if (!this.length) { + return undefined; + } + var index, result; + while (this.indexes[id] < this.length) { + index = this.indexes[id]; + result = callback(this.at(index), index); + if (result === false) { + break; + } + this.indexes[id] += 1; + } + delete this.indexes[id]; + if (result === false) { + return false; + } + }; + _proto.walk = function walk(callback) { + return this.each(function (node, i) { + var result = callback(node, i); + if (result !== false && node.length) { + result = node.walk(callback); + } + if (result === false) { + return false; + } + }); + }; + _proto.walkAttributes = function walkAttributes(callback) { + var _this2 = this; + return this.walk(function (selector) { + if (selector.type === types$1.ATTRIBUTE) { + return callback.call(_this2, selector); + } + }); + }; + _proto.walkClasses = function walkClasses(callback) { + var _this3 = this; + return this.walk(function (selector) { + if (selector.type === types$1.CLASS) { + return callback.call(_this3, selector); + } + }); + }; + _proto.walkCombinators = function walkCombinators(callback) { + var _this4 = this; + return this.walk(function (selector) { + if (selector.type === types$1.COMBINATOR) { + return callback.call(_this4, selector); + } + }); + }; + _proto.walkComments = function walkComments(callback) { + var _this5 = this; + return this.walk(function (selector) { + if (selector.type === types$1.COMMENT) { + return callback.call(_this5, selector); + } + }); + }; + _proto.walkIds = function walkIds(callback) { + var _this6 = this; + return this.walk(function (selector) { + if (selector.type === types$1.ID) { + return callback.call(_this6, selector); + } + }); + }; + _proto.walkNesting = function walkNesting(callback) { + var _this7 = this; + return this.walk(function (selector) { + if (selector.type === types$1.NESTING) { + return callback.call(_this7, selector); + } + }); + }; + _proto.walkPseudos = function walkPseudos(callback) { + var _this8 = this; + return this.walk(function (selector) { + if (selector.type === types$1.PSEUDO) { + return callback.call(_this8, selector); + } + }); + }; + _proto.walkTags = function walkTags(callback) { + var _this9 = this; + return this.walk(function (selector) { + if (selector.type === types$1.TAG) { + return callback.call(_this9, selector); + } + }); + }; + _proto.walkUniversals = function walkUniversals(callback) { + var _this10 = this; + return this.walk(function (selector) { + if (selector.type === types$1.UNIVERSAL) { + return callback.call(_this10, selector); + } + }); + }; + _proto.split = function split(callback) { + var _this11 = this; + var current = []; + return this.reduce(function (memo, node, index) { + var split = callback.call(_this11, node); + current.push(node); + if (split) { + memo.push(current); + current = []; + } else if (index === _this11.length - 1) { + memo.push(current); + } + return memo; + }, []); + }; + _proto.map = function map(callback) { + return this.nodes.map(callback); + }; + _proto.reduce = function reduce(callback, memo) { + return this.nodes.reduce(callback, memo); + }; + _proto.every = function every(callback) { + return this.nodes.every(callback); + }; + _proto.some = function some(callback) { + return this.nodes.some(callback); + }; + _proto.filter = function filter(callback) { + return this.nodes.filter(callback); + }; + _proto.sort = function sort(callback) { + return this.nodes.sort(callback); + }; + _proto.toString = function toString() { + return this.map(String).join(''); + }; + _createClass(Container, [{ + key: "first", + get: function get() { + return this.at(0); + } + }, { + key: "last", + get: function get() { + return this.at(this.length - 1); + } + }, { + key: "length", + get: function get() { + return this.nodes.length; + } + }]); + return Container; + }(_node["default"]); + exports["default"] = Container; + module.exports = exports.default; +} (container, container.exports)); + +var containerExports = container.exports; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(containerExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Root = /*#__PURE__*/function (_Container) { + _inheritsLoose(Root, _Container); + function Root(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.ROOT; + return _this; + } + var _proto = Root.prototype; + _proto.toString = function toString() { + var str = this.reduce(function (memo, selector) { + memo.push(String(selector)); + return memo; + }, []).join(','); + return this.trailingComma ? str + ',' : str; + }; + _proto.error = function error(message, options) { + if (this._error) { + return this._error(message, options); + } else { + return new Error(message); + } + }; + _createClass(Root, [{ + key: "errorGenerator", + set: function set(handler) { + this._error = handler; + } + }]); + return Root; + }(_container["default"]); + exports["default"] = Root; + module.exports = exports.default; +} (root$1, root$1.exports)); + +var rootExports = root$1.exports; + +var selector$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(containerExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Selector = /*#__PURE__*/function (_Container) { + _inheritsLoose(Selector, _Container); + function Selector(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.SELECTOR; + return _this; + } + return Selector; + }(_container["default"]); + exports["default"] = Selector; + module.exports = exports.default; +} (selector$1, selector$1.exports)); + +var selectorExports = selector$1.exports; + +var className$1 = {exports: {}}; + +/*! https://mths.be/cssesc v3.0.0 by @mathias */ + +var object = {}; +var hasOwnProperty = object.hasOwnProperty; +var merge$2 = function merge(options, defaults) { + if (!options) { + return defaults; + } + var result = {}; + for (var key in defaults) { + // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since + // only recognized option names are used. + result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key]; + } + return result; +}; + +var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; +var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; +var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; + +// https://mathiasbynens.be/notes/css-escapes#css +var cssesc = function cssesc(string, options) { + options = merge$2(options, cssesc.options); + if (options.quotes != 'single' && options.quotes != 'double') { + options.quotes = 'single'; + } + var quote = options.quotes == 'double' ? '"' : '\''; + var isIdentifier = options.isIdentifier; + + var firstChar = string.charAt(0); + var output = ''; + var counter = 0; + var length = string.length; + while (counter < length) { + var character = string.charAt(counter++); + var codePoint = character.charCodeAt(); + var value = void 0; + // If it’s not a printable ASCII character… + if (codePoint < 0x20 || codePoint > 0x7E) { + if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) { + // It’s a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // next character is low surrogate + codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000; + } else { + // It’s an unmatched surrogate; only append this code unit, in case + // the next code unit is the high surrogate of a surrogate pair. + counter--; + } + } + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } else { + if (options.escapeEverything) { + if (regexAnySingleEscape.test(character)) { + value = '\\' + character; + } else { + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } + } else if (/[\t\n\f\r\x0B]/.test(character)) { + value = '\\' + codePoint.toString(16).toUpperCase() + ' '; + } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) { + value = '\\' + character; + } else { + value = character; + } + } + output += value; + } + + if (isIdentifier) { + if (/^-[-\d]/.test(output)) { + output = '\\-' + output.slice(1); + } else if (/\d/.test(firstChar)) { + output = '\\3' + firstChar + ' ' + output.slice(1); + } + } + + // Remove spaces after `\HEX` escapes that are not followed by a hex digit, + // since they’re redundant. Note that this is only possible if the escape + // sequence isn’t preceded by an odd number of backslashes. + output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) { + if ($1 && $1.length % 2) { + // It’s not safe to remove the space, so don’t. + return $0; + } + // Strip the space. + return ($1 || '') + $2; + }); + + if (!isIdentifier && options.wrap) { + return quote + output + quote; + } + return output; +}; + +// Expose default options (so they can be overridden globally). +cssesc.options = { + 'escapeEverything': false, + 'isIdentifier': false, + 'quotes': 'single', + 'wrap': false +}; + +cssesc.version = '3.0.0'; + +var cssesc_1 = cssesc; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(cssesc_1); + var _util = util$6; + var _node = _interopRequireDefault(nodeExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ClassName = /*#__PURE__*/function (_Node) { + _inheritsLoose(ClassName, _Node); + function ClassName(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.CLASS; + _this._constructed = true; + return _this; + } + var _proto = ClassName.prototype; + _proto.valueToString = function valueToString() { + return '.' + _Node.prototype.valueToString.call(this); + }; + _createClass(ClassName, [{ + key: "value", + get: function get() { + return this._value; + }, + set: function set(v) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped !== v) { + (0, _util.ensureObject)(this, "raws"); + this.raws.value = escaped; + } else if (this.raws) { + delete this.raws.value; + } + } + this._value = v; + } + }]); + return ClassName; + }(_node["default"]); + exports["default"] = ClassName; + module.exports = exports.default; +} (className$1, className$1.exports)); + +var classNameExports = className$1.exports; + +var comment$2 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Comment = /*#__PURE__*/function (_Node) { + _inheritsLoose(Comment, _Node); + function Comment(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMMENT; + return _this; + } + return Comment; + }(_node["default"]); + exports["default"] = Comment; + module.exports = exports.default; +} (comment$2, comment$2.exports)); + +var commentExports = comment$2.exports; + +var id$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var ID = /*#__PURE__*/function (_Node) { + _inheritsLoose(ID, _Node); + function ID(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.ID; + return _this; + } + var _proto = ID.prototype; + _proto.valueToString = function valueToString() { + return '#' + _Node.prototype.valueToString.call(this); + }; + return ID; + }(_node["default"]); + exports["default"] = ID; + module.exports = exports.default; +} (id$1, id$1.exports)); + +var idExports = id$1.exports; + +var tag$1 = {exports: {}}; + +var namespace = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _cssesc = _interopRequireDefault(cssesc_1); + var _util = util$6; + var _node = _interopRequireDefault(nodeExports); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Namespace = /*#__PURE__*/function (_Node) { + _inheritsLoose(Namespace, _Node); + function Namespace() { + return _Node.apply(this, arguments) || this; + } + var _proto = Namespace.prototype; + _proto.qualifiedName = function qualifiedName(value) { + if (this.namespace) { + return this.namespaceString + "|" + value; + } else { + return value; + } + }; + _proto.valueToString = function valueToString() { + return this.qualifiedName(_Node.prototype.valueToString.call(this)); + }; + _createClass(Namespace, [{ + key: "namespace", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + if (namespace === true || namespace === "*" || namespace === "&") { + this._namespace = namespace; + if (this.raws) { + delete this.raws.namespace; + } + return; + } + var escaped = (0, _cssesc["default"])(namespace, { + isIdentifier: true + }); + this._namespace = namespace; + if (escaped !== namespace) { + (0, _util.ensureObject)(this, "raws"); + this.raws.namespace = escaped; + } else if (this.raws) { + delete this.raws.namespace; + } + } + }, { + key: "ns", + get: function get() { + return this._namespace; + }, + set: function set(namespace) { + this.namespace = namespace; + } + }, { + key: "namespaceString", + get: function get() { + if (this.namespace) { + var ns = this.stringifyProperty("namespace"); + if (ns === true) { + return ''; + } else { + return ns; + } + } else { + return ''; + } + } + }]); + return Namespace; + }(_node["default"]); + exports["default"] = Namespace; + module.exports = exports.default; +} (namespace, namespace.exports)); + +var namespaceExports = namespace.exports; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(namespaceExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Tag = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Tag, _Namespace); + function Tag(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.TAG; + return _this; + } + return Tag; + }(_namespace["default"]); + exports["default"] = Tag; + module.exports = exports.default; +} (tag$1, tag$1.exports)); + +var tagExports = tag$1.exports; + +var string$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var String = /*#__PURE__*/function (_Node) { + _inheritsLoose(String, _Node); + function String(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.STRING; + return _this; + } + return String; + }(_node["default"]); + exports["default"] = String; + module.exports = exports.default; +} (string$1, string$1.exports)); + +var stringExports = string$1.exports; + +var pseudo$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _container = _interopRequireDefault(containerExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Pseudo = /*#__PURE__*/function (_Container) { + _inheritsLoose(Pseudo, _Container); + function Pseudo(opts) { + var _this; + _this = _Container.call(this, opts) || this; + _this.type = _types.PSEUDO; + return _this; + } + var _proto = Pseudo.prototype; + _proto.toString = function toString() { + var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; + return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); + }; + return Pseudo; + }(_container["default"]); + exports["default"] = Pseudo; + module.exports = exports.default; +} (pseudo$1, pseudo$1.exports)); + +var pseudoExports = pseudo$1.exports; + +var attribute$1 = {}; + +/** + * For Node.js, simply re-export the core `util.deprecate` function. + */ + +var node = require$$0$1.deprecate; + +(function (exports) { + + exports.__esModule = true; + exports["default"] = void 0; + exports.unescapeValue = unescapeValue; + var _cssesc = _interopRequireDefault(cssesc_1); + var _unesc = _interopRequireDefault(unescExports); + var _namespace = _interopRequireDefault(namespaceExports); + var _types = types; + var _CSSESC_QUOTE_OPTIONS; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var deprecate = node; + var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; + var warnOfDeprecatedValueAssignment = deprecate(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); + var warnOfDeprecatedQuotedAssignment = deprecate(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); + var warnOfDeprecatedConstructor = deprecate(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); + function unescapeValue(value) { + var deprecatedUsage = false; + var quoteMark = null; + var unescaped = value; + var m = unescaped.match(WRAPPED_IN_QUOTES); + if (m) { + quoteMark = m[1]; + unescaped = m[2]; + } + unescaped = (0, _unesc["default"])(unescaped); + if (unescaped !== value) { + deprecatedUsage = true; + } + return { + deprecatedUsage: deprecatedUsage, + unescaped: unescaped, + quoteMark: quoteMark + }; + } + function handleDeprecatedContructorOpts(opts) { + if (opts.quoteMark !== undefined) { + return opts; + } + if (opts.value === undefined) { + return opts; + } + warnOfDeprecatedConstructor(); + var _unescapeValue = unescapeValue(opts.value), + quoteMark = _unescapeValue.quoteMark, + unescaped = _unescapeValue.unescaped; + if (!opts.raws) { + opts.raws = {}; + } + if (opts.raws.value === undefined) { + opts.raws.value = opts.value; + } + opts.value = unescaped; + opts.quoteMark = quoteMark; + return opts; + } + var Attribute = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Attribute, _Namespace); + function Attribute(opts) { + var _this; + if (opts === void 0) { + opts = {}; + } + _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; + _this.type = _types.ATTRIBUTE; + _this.raws = _this.raws || {}; + Object.defineProperty(_this.raws, 'unquoted', { + get: deprecate(function () { + return _this.value; + }, "attr.raws.unquoted is deprecated. Call attr.value instead."), + set: deprecate(function () { + return _this.value; + }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") + }); + _this._constructed = true; + return _this; + } + + /** + * Returns the Attribute's value quoted such that it would be legal to use + * in the value of a css file. The original value's quotation setting + * used for stringification is left unchanged. See `setValue(value, options)` + * if you want to control the quote settings of a new value for the attribute. + * + * You can also change the quotation used for the current value by setting quoteMark. + * + * Options: + * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this + * option is not set, the original value for quoteMark will be used. If + * indeterminate, a double quote is used. The legal values are: + * * `null` - the value will be unquoted and characters will be escaped as necessary. + * * `'` - the value will be quoted with a single quote and single quotes are escaped. + * * `"` - the value will be quoted with a double quote and double quotes are escaped. + * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark + * over the quoteMark option value. + * * smart {boolean} - if true, will select a quote mark based on the value + * and the other options specified here. See the `smartQuoteMark()` + * method. + **/ + var _proto = Attribute.prototype; + _proto.getQuotedValue = function getQuotedValue(options) { + if (options === void 0) { + options = {}; + } + var quoteMark = this._determineQuoteMark(options); + var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; + var escaped = (0, _cssesc["default"])(this._value, cssescopts); + return escaped; + }; + _proto._determineQuoteMark = function _determineQuoteMark(options) { + return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); + } + + /** + * Set the unescaped value with the specified quotation options. The value + * provided must not include any wrapping quote marks -- those quotes will + * be interpreted as part of the value and escaped accordingly. + */; + _proto.setValue = function setValue(value, options) { + if (options === void 0) { + options = {}; + } + this._value = value; + this._quoteMark = this._determineQuoteMark(options); + this._syncRawValue(); + } + + /** + * Intelligently select a quoteMark value based on the value's contents. If + * the value is a legal CSS ident, it will not be quoted. Otherwise a quote + * mark will be picked that minimizes the number of escapes. + * + * If there's no clear winner, the quote mark from these options is used, + * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is + * true). If the quoteMark is unspecified, a double quote is used. + * + * @param options This takes the quoteMark and preferCurrentQuoteMark options + * from the quoteValue method. + */; + _proto.smartQuoteMark = function smartQuoteMark(options) { + var v = this.value; + var numSingleQuotes = v.replace(/[^']/g, '').length; + var numDoubleQuotes = v.replace(/[^"]/g, '').length; + if (numSingleQuotes + numDoubleQuotes === 0) { + var escaped = (0, _cssesc["default"])(v, { + isIdentifier: true + }); + if (escaped === v) { + return Attribute.NO_QUOTE; + } else { + var pref = this.preferredQuoteMark(options); + if (pref === Attribute.NO_QUOTE) { + // pick a quote mark that isn't none and see if it's smaller + var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; + var opts = CSSESC_QUOTE_OPTIONS[quote]; + var quoteValue = (0, _cssesc["default"])(v, opts); + if (quoteValue.length < escaped.length) { + return quote; + } + } + return pref; + } + } else if (numDoubleQuotes === numSingleQuotes) { + return this.preferredQuoteMark(options); + } else if (numDoubleQuotes < numSingleQuotes) { + return Attribute.DOUBLE_QUOTE; + } else { + return Attribute.SINGLE_QUOTE; + } + } + + /** + * Selects the preferred quote mark based on the options and the current quote mark value. + * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` + * instead. + */; + _proto.preferredQuoteMark = function preferredQuoteMark(options) { + var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; + if (quoteMark === undefined) { + quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; + } + if (quoteMark === undefined) { + quoteMark = Attribute.DOUBLE_QUOTE; + } + return quoteMark; + }; + _proto._syncRawValue = function _syncRawValue() { + var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); + if (rawValue === this._value) { + if (this.raws) { + delete this.raws.value; + } + } else { + this.raws.value = rawValue; + } + }; + _proto._handleEscapes = function _handleEscapes(prop, value) { + if (this._constructed) { + var escaped = (0, _cssesc["default"])(value, { + isIdentifier: true + }); + if (escaped !== value) { + this.raws[prop] = escaped; + } else { + delete this.raws[prop]; + } + } + }; + _proto._spacesFor = function _spacesFor(name) { + var attrSpaces = { + before: '', + after: '' + }; + var spaces = this.spaces[name] || {}; + var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; + return Object.assign(attrSpaces, spaces, rawSpaces); + }; + _proto._stringFor = function _stringFor(name, spaceName, concat) { + if (spaceName === void 0) { + spaceName = name; + } + if (concat === void 0) { + concat = defaultAttrConcat; + } + var attrSpaces = this._spacesFor(spaceName); + return concat(this.stringifyProperty(name), attrSpaces); + } + + /** + * returns the offset of the attribute part specified relative to the + * start of the node of the output string. + * + * * "ns" - alias for "namespace" + * * "namespace" - the namespace if it exists. + * * "attribute" - the attribute name + * * "attributeNS" - the start of the attribute or its namespace + * * "operator" - the match operator of the attribute + * * "value" - The value (string or identifier) + * * "insensitive" - the case insensitivity flag; + * @param part One of the possible values inside an attribute. + * @returns -1 if the name is invalid or the value doesn't exist in this attribute. + */; + _proto.offsetOf = function offsetOf(name) { + var count = 1; + var attributeSpaces = this._spacesFor("attribute"); + count += attributeSpaces.before.length; + if (name === "namespace" || name === "ns") { + return this.namespace ? count : -1; + } + if (name === "attributeNS") { + return count; + } + count += this.namespaceString.length; + if (this.namespace) { + count += 1; + } + if (name === "attribute") { + return count; + } + count += this.stringifyProperty("attribute").length; + count += attributeSpaces.after.length; + var operatorSpaces = this._spacesFor("operator"); + count += operatorSpaces.before.length; + var operator = this.stringifyProperty("operator"); + if (name === "operator") { + return operator ? count : -1; + } + count += operator.length; + count += operatorSpaces.after.length; + var valueSpaces = this._spacesFor("value"); + count += valueSpaces.before.length; + var value = this.stringifyProperty("value"); + if (name === "value") { + return value ? count : -1; + } + count += value.length; + count += valueSpaces.after.length; + var insensitiveSpaces = this._spacesFor("insensitive"); + count += insensitiveSpaces.before.length; + if (name === "insensitive") { + return this.insensitive ? count : -1; + } + return -1; + }; + _proto.toString = function toString() { + var _this2 = this; + var selector = [this.rawSpaceBefore, '[']; + selector.push(this._stringFor('qualifiedAttribute', 'attribute')); + if (this.operator && (this.value || this.value === '')) { + selector.push(this._stringFor('operator')); + selector.push(this._stringFor('value')); + selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { + if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { + attrSpaces.before = " "; + } + return defaultAttrConcat(attrValue, attrSpaces); + })); + } + selector.push(']'); + selector.push(this.rawSpaceAfter); + return selector.join(''); + }; + _createClass(Attribute, [{ + key: "quoted", + get: function get() { + var qm = this.quoteMark; + return qm === "'" || qm === '"'; + }, + set: function set(value) { + warnOfDeprecatedQuotedAssignment(); + } + + /** + * returns a single (`'`) or double (`"`) quote character if the value is quoted. + * returns `null` if the value is not quoted. + * returns `undefined` if the quotation state is unknown (this can happen when + * the attribute is constructed without specifying a quote mark.) + */ + }, { + key: "quoteMark", + get: function get() { + return this._quoteMark; + } + + /** + * Set the quote mark to be used by this attribute's value. + * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute + * value is updated accordingly. + * + * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. + */, + set: function set(quoteMark) { + if (!this._constructed) { + this._quoteMark = quoteMark; + return; + } + if (this._quoteMark !== quoteMark) { + this._quoteMark = quoteMark; + this._syncRawValue(); + } + } + }, { + key: "qualifiedAttribute", + get: function get() { + return this.qualifiedName(this.raws.attribute || this.attribute); + } + }, { + key: "insensitiveFlag", + get: function get() { + return this.insensitive ? 'i' : ''; + } + }, { + key: "value", + get: function get() { + return this._value; + }, + set: + /** + * Before 3.0, the value had to be set to an escaped value including any wrapped + * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value + * is unescaped during parsing and any quote marks are removed. + * + * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, + * a deprecation warning is raised when the new value contains any characters that would + * require escaping (including if it contains wrapped quotes). + * + * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe + * how the new value is quoted. + */ + function set(v) { + if (this._constructed) { + var _unescapeValue2 = unescapeValue(v), + deprecatedUsage = _unescapeValue2.deprecatedUsage, + unescaped = _unescapeValue2.unescaped, + quoteMark = _unescapeValue2.quoteMark; + if (deprecatedUsage) { + warnOfDeprecatedValueAssignment(); + } + if (unescaped === this._value && quoteMark === this._quoteMark) { + return; + } + this._value = unescaped; + this._quoteMark = quoteMark; + this._syncRawValue(); + } else { + this._value = v; + } + } + }, { + key: "insensitive", + get: function get() { + return this._insensitive; + } + + /** + * Set the case insensitive flag. + * If the case insensitive flag changes, the raw (escaped) value at `attr.raws.insensitiveFlag` + * of the attribute is updated accordingly. + * + * @param {true | false} insensitive true if the attribute should match case-insensitively. + */, + set: function set(insensitive) { + if (!insensitive) { + this._insensitive = false; + + // "i" and "I" can be used in "this.raws.insensitiveFlag" to store the original notation. + // When setting `attr.insensitive = false` both should be erased to ensure correct serialization. + if (this.raws && (this.raws.insensitiveFlag === 'I' || this.raws.insensitiveFlag === 'i')) { + this.raws.insensitiveFlag = undefined; + } + } + this._insensitive = insensitive; + } + }, { + key: "attribute", + get: function get() { + return this._attribute; + }, + set: function set(name) { + this._handleEscapes("attribute", name); + this._attribute = name; + } + }]); + return Attribute; + }(_namespace["default"]); + exports["default"] = Attribute; + Attribute.NO_QUOTE = null; + Attribute.SINGLE_QUOTE = "'"; + Attribute.DOUBLE_QUOTE = '"'; + var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { + "'": { + quotes: 'single', + wrap: true + }, + '"': { + quotes: 'double', + wrap: true + } + }, _CSSESC_QUOTE_OPTIONS[null] = { + isIdentifier: true + }, _CSSESC_QUOTE_OPTIONS); + function defaultAttrConcat(attrValue, attrSpaces) { + return "" + attrSpaces.before + attrValue + attrSpaces.after; + } +} (attribute$1)); + +var universal$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _namespace = _interopRequireDefault(namespaceExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Universal = /*#__PURE__*/function (_Namespace) { + _inheritsLoose(Universal, _Namespace); + function Universal(opts) { + var _this; + _this = _Namespace.call(this, opts) || this; + _this.type = _types.UNIVERSAL; + _this.value = '*'; + return _this; + } + return Universal; + }(_namespace["default"]); + exports["default"] = Universal; + module.exports = exports.default; +} (universal$1, universal$1.exports)); + +var universalExports = universal$1.exports; + +var combinator$2 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Combinator = /*#__PURE__*/function (_Node) { + _inheritsLoose(Combinator, _Node); + function Combinator(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.COMBINATOR; + return _this; + } + return Combinator; + }(_node["default"]); + exports["default"] = Combinator; + module.exports = exports.default; +} (combinator$2, combinator$2.exports)); + +var combinatorExports = combinator$2.exports; + +var nesting$1 = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _node = _interopRequireDefault(nodeExports); + var _types = types; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } + function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + var Nesting = /*#__PURE__*/function (_Node) { + _inheritsLoose(Nesting, _Node); + function Nesting(opts) { + var _this; + _this = _Node.call(this, opts) || this; + _this.type = _types.NESTING; + _this.value = '&'; + return _this; + } + return Nesting; + }(_node["default"]); + exports["default"] = Nesting; + module.exports = exports.default; +} (nesting$1, nesting$1.exports)); + +var nestingExports = nesting$1.exports; + +var sortAscending = {exports: {}}; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = sortAscending; + function sortAscending(list) { + return list.sort(function (a, b) { + return a - b; + }); + } + module.exports = exports.default; +} (sortAscending, sortAscending.exports)); + +var sortAscendingExports = sortAscending.exports; + +var tokenize = {}; + +var tokenTypes = {}; + +tokenTypes.__esModule = true; +tokenTypes.word = tokenTypes.tilde = tokenTypes.tab = tokenTypes.str = tokenTypes.space = tokenTypes.slash = tokenTypes.singleQuote = tokenTypes.semicolon = tokenTypes.plus = tokenTypes.pipe = tokenTypes.openSquare = tokenTypes.openParenthesis = tokenTypes.newline = tokenTypes.greaterThan = tokenTypes.feed = tokenTypes.equals = tokenTypes.doubleQuote = tokenTypes.dollar = tokenTypes.cr = tokenTypes.comment = tokenTypes.comma = tokenTypes.combinator = tokenTypes.colon = tokenTypes.closeSquare = tokenTypes.closeParenthesis = tokenTypes.caret = tokenTypes.bang = tokenTypes.backslash = tokenTypes.at = tokenTypes.asterisk = tokenTypes.ampersand = void 0; +var ampersand = 38; // `&`.charCodeAt(0); +tokenTypes.ampersand = ampersand; +var asterisk = 42; // `*`.charCodeAt(0); +tokenTypes.asterisk = asterisk; +var at = 64; // `@`.charCodeAt(0); +tokenTypes.at = at; +var comma$1 = 44; // `,`.charCodeAt(0); +tokenTypes.comma = comma$1; +var colon = 58; // `:`.charCodeAt(0); +tokenTypes.colon = colon; +var semicolon$1 = 59; // `;`.charCodeAt(0); +tokenTypes.semicolon = semicolon$1; +var openParenthesis = 40; // `(`.charCodeAt(0); +tokenTypes.openParenthesis = openParenthesis; +var closeParenthesis = 41; // `)`.charCodeAt(0); +tokenTypes.closeParenthesis = closeParenthesis; +var openSquare = 91; // `[`.charCodeAt(0); +tokenTypes.openSquare = openSquare; +var closeSquare = 93; // `]`.charCodeAt(0); +tokenTypes.closeSquare = closeSquare; +var dollar = 36; // `$`.charCodeAt(0); +tokenTypes.dollar = dollar; +var tilde = 126; // `~`.charCodeAt(0); +tokenTypes.tilde = tilde; +var caret = 94; // `^`.charCodeAt(0); +tokenTypes.caret = caret; +var plus = 43; // `+`.charCodeAt(0); +tokenTypes.plus = plus; +var equals = 61; // `=`.charCodeAt(0); +tokenTypes.equals = equals; +var pipe = 124; // `|`.charCodeAt(0); +tokenTypes.pipe = pipe; +var greaterThan = 62; // `>`.charCodeAt(0); +tokenTypes.greaterThan = greaterThan; +var space = 32; // ` `.charCodeAt(0); +tokenTypes.space = space; +var singleQuote = 39; // `'`.charCodeAt(0); +tokenTypes.singleQuote = singleQuote; +var doubleQuote = 34; // `"`.charCodeAt(0); +tokenTypes.doubleQuote = doubleQuote; +var slash = 47; // `/`.charCodeAt(0); +tokenTypes.slash = slash; +var bang = 33; // `!`.charCodeAt(0); +tokenTypes.bang = bang; +var backslash = 92; // '\\'.charCodeAt(0); +tokenTypes.backslash = backslash; +var cr = 13; // '\r'.charCodeAt(0); +tokenTypes.cr = cr; +var feed = 12; // '\f'.charCodeAt(0); +tokenTypes.feed = feed; +var newline = 10; // '\n'.charCodeAt(0); +tokenTypes.newline = newline; +var tab = 9; // '\t'.charCodeAt(0); + +// Expose aliases primarily for readability. +tokenTypes.tab = tab; +var str = singleQuote; + +// No good single character representation! +tokenTypes.str = str; +var comment$1 = -1; +tokenTypes.comment = comment$1; +var word = -2; +tokenTypes.word = word; +var combinator$1 = -3; +tokenTypes.combinator = combinator$1; + +(function (exports) { + + exports.__esModule = true; + exports.FIELDS = void 0; + exports["default"] = tokenize; + var t = _interopRequireWildcard(tokenTypes); + var _unescapable, _wordDelimiters; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); + var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); + var hex = {}; + var hexChars = "0123456789abcdefABCDEF"; + for (var i = 0; i < hexChars.length; i++) { + hex[hexChars.charCodeAt(i)] = true; + } + + /** + * Returns the last index of the bar css word + * @param {string} css The string in which the word begins + * @param {number} start The index into the string where word's first letter occurs + */ + function consumeWord(css, start) { + var next = start; + var code; + do { + code = css.charCodeAt(next); + if (wordDelimiters[code]) { + return next - 1; + } else if (code === t.backslash) { + next = consumeEscape(css, next) + 1; + } else { + // All other characters are part of the word + next++; + } + } while (next < css.length); + return next - 1; + } + + /** + * Returns the last index of the escape sequence + * @param {string} css The string in which the sequence begins + * @param {number} start The index into the string where escape character (`\`) occurs. + */ + function consumeEscape(css, start) { + var next = start; + var code = css.charCodeAt(next + 1); + if (unescapable[code]) ; else if (hex[code]) { + var hexDigits = 0; + // consume up to 6 hex chars + do { + next++; + hexDigits++; + code = css.charCodeAt(next + 1); + } while (hex[code] && hexDigits < 6); + // if fewer than 6 hex chars, a trailing space ends the escape + if (hexDigits < 6 && code === t.space) { + next++; + } + } else { + // the next char is part of the current word + next++; + } + return next; + } + var FIELDS = { + TYPE: 0, + START_LINE: 1, + START_COL: 2, + END_LINE: 3, + END_COL: 4, + START_POS: 5, + END_POS: 6 + }; + exports.FIELDS = FIELDS; + function tokenize(input) { + var tokens = []; + var css = input.css.valueOf(); + var _css = css, + length = _css.length; + var offset = -1; + var line = 1; + var start = 0; + var end = 0; + var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; + function unclosed(what, fix) { + if (input.safe) { + // fyi: this is never set to true. + css += fix; + next = css.length - 1; + } else { + throw input.error('Unclosed ' + what, line, start - offset, start); + } + } + while (start < length) { + code = css.charCodeAt(start); + if (code === t.newline) { + offset = start; + line += 1; + } + switch (code) { + case t.space: + case t.tab: + case t.newline: + case t.cr: + case t.feed: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + if (code === t.newline) { + offset = next; + line += 1; + } + } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); + tokenType = t.space; + endLine = line; + endColumn = next - offset - 1; + end = next; + break; + case t.plus: + case t.greaterThan: + case t.tilde: + case t.pipe: + next = start; + do { + next += 1; + code = css.charCodeAt(next); + } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); + tokenType = t.combinator; + endLine = line; + endColumn = start - offset; + end = next; + break; + + // Consume these characters as single tokens. + case t.asterisk: + case t.ampersand: + case t.bang: + case t.comma: + case t.equals: + case t.dollar: + case t.caret: + case t.openSquare: + case t.closeSquare: + case t.colon: + case t.semicolon: + case t.openParenthesis: + case t.closeParenthesis: + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + case t.singleQuote: + case t.doubleQuote: + quote = code === t.singleQuote ? "'" : '"'; + next = start; + do { + escaped = false; + next = css.indexOf(quote, next + 1); + if (next === -1) { + unclosed('quote', quote); + } + escapePos = next; + while (css.charCodeAt(escapePos - 1) === t.backslash) { + escapePos -= 1; + escaped = !escaped; + } + } while (escaped); + tokenType = t.str; + endLine = line; + endColumn = start - offset; + end = next + 1; + break; + default: + if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { + next = css.indexOf('*/', start + 2) + 1; + if (next === 0) { + unclosed('comment', '*/'); + } + content = css.slice(start, next + 1); + lines = content.split('\n'); + last = lines.length - 1; + if (last > 0) { + nextLine = line + last; + nextOffset = next - lines[last].length; + } else { + nextLine = line; + nextOffset = offset; + } + tokenType = t.comment; + line = nextLine; + endLine = nextLine; + endColumn = next - nextOffset; + } else if (code === t.slash) { + next = start; + tokenType = code; + endLine = line; + endColumn = start - offset; + end = next + 1; + } else { + next = consumeWord(css, start); + tokenType = t.word; + endLine = line; + endColumn = next - offset; + } + end = next + 1; + break; + } + + // Ensure that the token structure remains consistent + tokens.push([tokenType, + // [0] Token type + line, + // [1] Starting line + start - offset, + // [2] Starting column + endLine, + // [3] Ending line + endColumn, + // [4] Ending column + start, + // [5] Start position / Source index + end // [6] End position + ]); + + // Reset offset for the next token + if (nextOffset) { + offset = nextOffset; + nextOffset = null; + } + start = end; + } + return tokens; + } +} (tokenize)); + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _root = _interopRequireDefault(rootExports); + var _selector = _interopRequireDefault(selectorExports); + var _className = _interopRequireDefault(classNameExports); + var _comment = _interopRequireDefault(commentExports); + var _id = _interopRequireDefault(idExports); + var _tag = _interopRequireDefault(tagExports); + var _string = _interopRequireDefault(stringExports); + var _pseudo = _interopRequireDefault(pseudoExports); + var _attribute = _interopRequireWildcard(attribute$1); + var _universal = _interopRequireDefault(universalExports); + var _combinator = _interopRequireDefault(combinatorExports); + var _nesting = _interopRequireDefault(nestingExports); + var _sortAscending = _interopRequireDefault(sortAscendingExports); + var _tokenize = _interopRequireWildcard(tokenize); + var tokens = _interopRequireWildcard(tokenTypes); + var types$1 = _interopRequireWildcard(types); + var _util = util$6; + var _WHITESPACE_TOKENS, _Object$assign; + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); + var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); + function tokenStart(token) { + return { + line: token[_tokenize.FIELDS.START_LINE], + column: token[_tokenize.FIELDS.START_COL] + }; + } + function tokenEnd(token) { + return { + line: token[_tokenize.FIELDS.END_LINE], + column: token[_tokenize.FIELDS.END_COL] + }; + } + function getSource(startLine, startColumn, endLine, endColumn) { + return { + start: { + line: startLine, + column: startColumn + }, + end: { + line: endLine, + column: endColumn + } + }; + } + function getTokenSource(token) { + return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); + } + function getTokenSourceSpan(startToken, endToken) { + if (!startToken) { + return undefined; + } + return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); + } + function unescapeProp(node, prop) { + var value = node[prop]; + if (typeof value !== "string") { + return; + } + if (value.indexOf("\\") !== -1) { + (0, _util.ensureObject)(node, 'raws'); + node[prop] = (0, _util.unesc)(value); + if (node.raws[prop] === undefined) { + node.raws[prop] = value; + } + } + return node; + } + function indexesOf(array, item) { + var i = -1; + var indexes = []; + while ((i = array.indexOf(item, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + function uniqs() { + var list = Array.prototype.concat.apply([], arguments); + return list.filter(function (item, i) { + return i === list.indexOf(item); + }); + } + var Parser = /*#__PURE__*/function () { + function Parser(rule, options) { + if (options === void 0) { + options = {}; + } + this.rule = rule; + this.options = Object.assign({ + lossy: false, + safe: false + }, options); + this.position = 0; + this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; + this.tokens = (0, _tokenize["default"])({ + css: this.css, + error: this._errorGenerator(), + safe: this.options.safe + }); + var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); + this.root = new _root["default"]({ + source: rootSource + }); + this.root.errorGenerator = this._errorGenerator(); + var selector = new _selector["default"]({ + source: { + start: { + line: 1, + column: 1 + } + } + }); + this.root.append(selector); + this.current = selector; + this.loop(); + } + var _proto = Parser.prototype; + _proto._errorGenerator = function _errorGenerator() { + var _this = this; + return function (message, errorOptions) { + if (typeof _this.rule === 'string') { + return new Error(message); + } + return _this.rule.error(message, errorOptions); + }; + }; + _proto.attribute = function attribute() { + var attr = []; + var startingToken = this.currToken; + this.position++; + while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + attr.push(this.currToken); + this.position++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { + return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + } + var len = attr.length; + var node = { + source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + }; + if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { + return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); + } + var pos = 0; + var spaceBefore = ''; + var commentBefore = ''; + var lastAdded = null; + var spaceAfterMeaningfulToken = false; + while (pos < len) { + var token = attr[pos]; + var content = this.content(token); + var next = attr[pos + 1]; + switch (token[_tokenize.FIELDS.TYPE]) { + case tokens.space: + // if ( + // len === 1 || + // pos === 0 && this.content(next) === '|' + // ) { + // return this.expected('attribute', token[TOKEN.START_POS], content); + // } + spaceAfterMeaningfulToken = true; + if (this.options.lossy) { + break; + } + if (lastAdded) { + (0, _util.ensureObject)(node, 'spaces', lastAdded); + var prevContent = node.spaces[lastAdded].after || ''; + node.spaces[lastAdded].after = prevContent + content; + var existingComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; + if (existingComment) { + node.raws.spaces[lastAdded].after = existingComment + content; + } + } else { + spaceBefore = spaceBefore + content; + commentBefore = commentBefore + content; + } + break; + case tokens.asterisk: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = spaceBefore; + commentBefore = ''; + } + node.namespace = (node.namespace || "") + content; + var rawValue = (0, _util.getProp)(node, 'raws', 'namespace') || null; + if (rawValue) { + node.raws.namespace += content; + } + lastAdded = 'namespace'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.dollar: + if (lastAdded === "value") { + var oldRawValue = (0, _util.getProp)(node, 'raws', 'value'); + node.value += "$"; + if (oldRawValue) { + node.raws.value = oldRawValue + "$"; + } + break; + } + // Falls through + case tokens.caret: + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.combinator: + if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } + if (content !== '|') { + spaceAfterMeaningfulToken = false; + break; + } + if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { + node.operator = content; + lastAdded = 'operator'; + } else if (!node.namespace && !node.attribute) { + node.namespace = true; + } + spaceAfterMeaningfulToken = false; + break; + case tokens.word: + if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && + // this look-ahead probably fails with comment nodes involved. + !node.operator && !node.namespace) { + node.namespace = content; + lastAdded = 'namespace'; + } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'attribute'); + node.spaces.attribute.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'attribute'); + node.raws.spaces.attribute.before = commentBefore; + commentBefore = ''; + } + node.attribute = (node.attribute || "") + content; + var _rawValue = (0, _util.getProp)(node, 'raws', 'attribute') || null; + if (_rawValue) { + node.raws.attribute += content; + } + lastAdded = 'attribute'; + } else if (!node.value && node.value !== "" || lastAdded === "value" && !(spaceAfterMeaningfulToken || node.quoteMark)) { + var _unescaped = (0, _util.unesc)(content); + var _oldRawValue = (0, _util.getProp)(node, 'raws', 'value') || ''; + var oldValue = node.value || ''; + node.value = oldValue + _unescaped; + node.quoteMark = null; + if (_unescaped !== content || _oldRawValue) { + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = (_oldRawValue || oldValue) + content; + } + lastAdded = 'value'; + } else { + var insensitive = content === 'i' || content === "I"; + if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { + node.insensitive = insensitive; + if (!insensitive || content === "I") { + (0, _util.ensureObject)(node, 'raws'); + node.raws.insensitiveFlag = content; + } + lastAdded = 'insensitive'; + if (spaceBefore) { + (0, _util.ensureObject)(node, 'spaces', 'insensitive'); + node.spaces.insensitive.before = spaceBefore; + spaceBefore = ''; + } + if (commentBefore) { + (0, _util.ensureObject)(node, 'raws', 'spaces', 'insensitive'); + node.raws.spaces.insensitive.before = commentBefore; + commentBefore = ''; + } + } else if (node.value || node.value === '') { + lastAdded = 'value'; + node.value += content; + if (node.raws.value) { + node.raws.value += content; + } + } + } + spaceAfterMeaningfulToken = false; + break; + case tokens.str: + if (!node.attribute || !node.operator) { + return this.error("Expected an attribute followed by an operator preceding the string.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + var _unescapeValue = (0, _attribute.unescapeValue)(content), + unescaped = _unescapeValue.unescaped, + quoteMark = _unescapeValue.quoteMark; + node.value = unescaped; + node.quoteMark = quoteMark; + lastAdded = 'value'; + (0, _util.ensureObject)(node, 'raws'); + node.raws.value = content; + spaceAfterMeaningfulToken = false; + break; + case tokens.equals: + if (!node.attribute) { + return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); + } + if (node.value) { + return this.error('Unexpected "=" found; an operator was already defined.', { + index: token[_tokenize.FIELDS.START_POS] + }); + } + node.operator = node.operator ? node.operator + content : content; + lastAdded = 'operator'; + spaceAfterMeaningfulToken = false; + break; + case tokens.comment: + if (lastAdded) { + if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { + var lastComment = (0, _util.getProp)(node, 'spaces', lastAdded, 'after') || ''; + var rawLastComment = (0, _util.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; + (0, _util.ensureObject)(node, 'raws', 'spaces', lastAdded); + node.raws.spaces[lastAdded].after = rawLastComment + content; + } else { + var lastValue = node[lastAdded] || ''; + var rawLastValue = (0, _util.getProp)(node, 'raws', lastAdded) || lastValue; + (0, _util.ensureObject)(node, 'raws'); + node.raws[lastAdded] = rawLastValue + content; + } + } else { + commentBefore = commentBefore + content; + } + break; + default: + return this.error("Unexpected \"" + content + "\" found.", { + index: token[_tokenize.FIELDS.START_POS] + }); + } + pos++; + } + unescapeProp(node, "attribute"); + unescapeProp(node, "namespace"); + this.newNode(new _attribute["default"](node)); + this.position++; + } + + /** + * return a node containing meaningless garbage up to (but not including) the specified token position. + * if the token position is negative, all remaining tokens are consumed. + * + * This returns an array containing a single string node if all whitespace, + * otherwise an array of comment nodes with space before and after. + * + * These tokens are not added to the current selector, the caller can add them or use them to amend + * a previous node's space metadata. + * + * In lossy mode, this returns only comments. + */; + _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { + if (stopPosition < 0) { + stopPosition = this.tokens.length; + } + var startPosition = this.position; + var nodes = []; + var space = ""; + var lastComment = undefined; + do { + if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { + if (!this.options.lossy) { + space += this.content(); + } + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { + var spaces = {}; + if (space) { + spaces.before = space; + space = ""; + } + lastComment = new _comment["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + spaces: spaces + }); + nodes.push(lastComment); + } + } while (++this.position < stopPosition); + if (space) { + if (lastComment) { + lastComment.spaces.after = space; + } else if (!this.options.lossy) { + var firstToken = this.tokens[startPosition]; + var lastToken = this.tokens[this.position - 1]; + nodes.push(new _string["default"]({ + value: '', + source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: { + before: space, + after: '' + } + })); + } + } + return nodes; + } + + /** + * + * @param {*} nodes + */; + _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { + var _this2 = this; + if (requiredSpace === void 0) { + requiredSpace = false; + } + var space = ""; + var rawSpace = ""; + nodes.forEach(function (n) { + var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); + var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); + space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); + rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); + }); + if (rawSpace === space) { + rawSpace = undefined; + } + var result = { + space: space, + rawSpace: rawSpace + }; + return result; + }; + _proto.isNamedCombinator = function isNamedCombinator(position) { + if (position === void 0) { + position = this.position; + } + return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; + }; + _proto.namedCombinator = function namedCombinator() { + if (this.isNamedCombinator()) { + var nameRaw = this.content(this.tokens[this.position + 1]); + var name = (0, _util.unesc)(nameRaw).toLowerCase(); + var raws = {}; + if (name !== nameRaw) { + raws.value = "/" + nameRaw + "/"; + } + var node = new _combinator["default"]({ + value: "/" + name + "/", + source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], + raws: raws + }); + this.position = this.position + 3; + return node; + } else { + this.unexpected(); + } + }; + _proto.combinator = function combinator() { + var _this3 = this; + if (this.content() === '|') { + return this.namespace(); + } + // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. + var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { + var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + if (nodes.length > 0) { + var last = this.current.last; + if (last) { + var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), + space = _this$convertWhitespa.space, + rawSpace = _this$convertWhitespa.rawSpace; + if (rawSpace !== undefined) { + last.rawSpaceAfter += rawSpace; + } + last.spaces.after += space; + } else { + nodes.forEach(function (n) { + return _this3.newNode(n); + }); + } + } + return; + } + var firstToken = this.currToken; + var spaceOrDescendantSelectorNodes = undefined; + if (nextSigTokenPos > this.position) { + spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); + } + var node; + if (this.isNamedCombinator()) { + node = this.namedCombinator(); + } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { + node = new _combinator["default"]({ + value: this.content(), + source: getTokenSource(this.currToken), + sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] + }); + this.position++; + } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { + this.unexpected(); + } + if (node) { + if (spaceOrDescendantSelectorNodes) { + var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), + _space = _this$convertWhitespa2.space, + _rawSpace = _this$convertWhitespa2.rawSpace; + node.spaces.before = _space; + node.rawSpaceBefore = _rawSpace; + } + } else { + // descendant combinator + var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), + _space2 = _this$convertWhitespa3.space, + _rawSpace2 = _this$convertWhitespa3.rawSpace; + if (!_rawSpace2) { + _rawSpace2 = _space2; + } + var spaces = {}; + var raws = { + spaces: {} + }; + if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { + spaces.before = _space2.slice(0, _space2.length - 1); + raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); + } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { + spaces.after = _space2.slice(1); + raws.spaces.after = _rawSpace2.slice(1); + } else { + raws.value = _rawSpace2; + } + node = new _combinator["default"]({ + value: ' ', + source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), + sourceIndex: firstToken[_tokenize.FIELDS.START_POS], + spaces: spaces, + raws: raws + }); + } + if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { + node.spaces.after = this.optionalSpace(this.content()); + this.position++; + } + return this.newNode(node); + }; + _proto.comma = function comma() { + if (this.position === this.tokens.length - 1) { + this.root.trailingComma = true; + this.position++; + return; + } + this.current._inferEndPosition(); + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position + 1]) + } + }); + this.current.parent.append(selector); + this.current = selector; + this.position++; + }; + _proto.comment = function comment() { + var current = this.currToken; + this.newNode(new _comment["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.error = function error(message, opts) { + throw this.root.error(message, opts); + }; + _proto.missingBackslash = function missingBackslash() { + return this.error('Expected a backslash preceding the semicolon.', { + index: this.currToken[_tokenize.FIELDS.START_POS] + }); + }; + _proto.missingParenthesis = function missingParenthesis() { + return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.missingSquareBracket = function missingSquareBracket() { + return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpected = function unexpected() { + return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.unexpectedPipe = function unexpectedPipe() { + return this.error("Unexpected '|'.", this.currToken[_tokenize.FIELDS.START_POS]); + }; + _proto.namespace = function namespace() { + var before = this.prevToken && this.content(this.prevToken) || true; + if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.position++; + return this.word(before); + } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { + this.position++; + return this.universal(before); + } + this.unexpectedPipe(); + }; + _proto.nesting = function nesting() { + if (this.nextToken) { + var nextContent = this.content(this.nextToken); + if (nextContent === "|") { + this.position++; + return; + } + } + var current = this.currToken; + this.newNode(new _nesting["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.parentheses = function parentheses() { + var last = this.current.last; + var unbalanced = 1; + this.position++; + if (last && last.type === types$1.PSEUDO) { + var selector = new _selector["default"]({ + source: { + start: tokenStart(this.tokens[this.position - 1]) + } + }); + var cache = this.current; + last.append(selector); + this.current = selector; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + if (unbalanced) { + this.parse(); + } else { + this.current.source.end = tokenEnd(this.currToken); + this.current.parent.source.end = tokenEnd(this.currToken); + this.position++; + } + } + this.current = cache; + } else { + // I think this case should be an error. It's used to implement a basic parse of media queries + // but I don't think it's a good idea. + var parenStart = this.currToken; + var parenValue = "("; + var parenEnd; + while (this.position < this.tokens.length && unbalanced) { + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + unbalanced++; + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + unbalanced--; + } + parenEnd = this.currToken; + parenValue += this.parseParenthesisToken(this.currToken); + this.position++; + } + if (last) { + last.appendToPropertyAndEscape("value", parenValue, parenValue); + } else { + this.newNode(new _string["default"]({ + value: parenValue, + source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), + sourceIndex: parenStart[_tokenize.FIELDS.START_POS] + })); + } + } + if (unbalanced) { + return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.pseudo = function pseudo() { + var _this4 = this; + var pseudoStr = ''; + var startingToken = this.currToken; + while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { + pseudoStr += this.content(); + this.position++; + } + if (!this.currToken) { + return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); + } + if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { + this.splitWord(false, function (first, length) { + pseudoStr += first; + _this4.newNode(new _pseudo["default"]({ + value: pseudoStr, + source: getTokenSourceSpan(startingToken, _this4.currToken), + sourceIndex: startingToken[_tokenize.FIELDS.START_POS] + })); + if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { + _this4.error('Misplaced parenthesis.', { + index: _this4.nextToken[_tokenize.FIELDS.START_POS] + }); + } + }); + } else { + return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); + } + }; + _proto.space = function space() { + var content = this.content(); + // Handle space before and after the selector + if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { + return node.type === 'comment'; + })) { + this.spaces = this.optionalSpace(content); + this.position++; + } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { + this.current.last.spaces.after = this.optionalSpace(content); + this.position++; + } else { + this.combinator(); + } + }; + _proto.string = function string() { + var current = this.currToken; + this.newNode(new _string["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + })); + this.position++; + }; + _proto.universal = function universal(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + var current = this.currToken; + this.newNode(new _universal["default"]({ + value: this.content(), + source: getTokenSource(current), + sourceIndex: current[_tokenize.FIELDS.START_POS] + }), namespace); + this.position++; + }; + _proto.splitWord = function splitWord(namespace, firstCallback) { + var _this5 = this; + var nextToken = this.nextToken; + var word = this.content(); + while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { + this.position++; + var current = this.content(); + word += current; + if (current.lastIndexOf('\\') === current.length - 1) { + var next = this.nextToken; + if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { + word += this.requiredSpace(this.content(next)); + this.position++; + } + } + nextToken = this.nextToken; + } + var hasClass = indexesOf(word, '.').filter(function (i) { + // Allow escaped dot within class name + var escapedDot = word[i - 1] === '\\'; + // Allow decimal numbers percent in @keyframes + var isKeyframesPercent = /^\d+\.\d+%$/.test(word); + return !escapedDot && !isKeyframesPercent; + }); + var hasId = indexesOf(word, '#').filter(function (i) { + return word[i - 1] !== '\\'; + }); + // Eliminate Sass interpolations from the list of id indexes + var interpolations = indexesOf(word, '#{'); + if (interpolations.length) { + hasId = hasId.filter(function (hashIndex) { + return !~interpolations.indexOf(hashIndex); + }); + } + var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); + indices.forEach(function (ind, i) { + var index = indices[i + 1] || word.length; + var value = word.slice(ind, index); + if (i === 0 && firstCallback) { + return firstCallback.call(_this5, value, indices.length); + } + var node; + var current = _this5.currToken; + var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; + var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); + if (~hasClass.indexOf(ind)) { + var classNameOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _className["default"](unescapeProp(classNameOpts, "value")); + } else if (~hasId.indexOf(ind)) { + var idOpts = { + value: value.slice(1), + source: source, + sourceIndex: sourceIndex + }; + node = new _id["default"](unescapeProp(idOpts, "value")); + } else { + var tagOpts = { + value: value, + source: source, + sourceIndex: sourceIndex + }; + unescapeProp(tagOpts, "value"); + node = new _tag["default"](tagOpts); + } + _this5.newNode(node, namespace); + // Ensure that the namespace is used only once + namespace = null; + }); + this.position++; + }; + _proto.word = function word(namespace) { + var nextToken = this.nextToken; + if (nextToken && this.content(nextToken) === '|') { + this.position++; + return this.namespace(); + } + return this.splitWord(namespace); + }; + _proto.loop = function loop() { + while (this.position < this.tokens.length) { + this.parse(true); + } + this.current._inferEndPosition(); + return this.root; + }; + _proto.parse = function parse(throwOnParenthesis) { + switch (this.currToken[_tokenize.FIELDS.TYPE]) { + case tokens.space: + this.space(); + break; + case tokens.comment: + this.comment(); + break; + case tokens.openParenthesis: + this.parentheses(); + break; + case tokens.closeParenthesis: + if (throwOnParenthesis) { + this.missingParenthesis(); + } + break; + case tokens.openSquare: + this.attribute(); + break; + case tokens.dollar: + case tokens.caret: + case tokens.equals: + case tokens.word: + this.word(); + break; + case tokens.colon: + this.pseudo(); + break; + case tokens.comma: + this.comma(); + break; + case tokens.asterisk: + this.universal(); + break; + case tokens.ampersand: + this.nesting(); + break; + case tokens.slash: + case tokens.combinator: + this.combinator(); + break; + case tokens.str: + this.string(); + break; + // These cases throw; no break needed. + case tokens.closeSquare: + this.missingSquareBracket(); + case tokens.semicolon: + this.missingBackslash(); + default: + this.unexpected(); + } + } + + /** + * Helpers + */; + _proto.expected = function expected(description, index, found) { + if (Array.isArray(description)) { + var last = description.pop(); + description = description.join(', ') + " or " + last; + } + var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; + if (!found) { + return this.error("Expected " + an + " " + description + ".", { + index: index + }); + } + return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { + index: index + }); + }; + _proto.requiredSpace = function requiredSpace(space) { + return this.options.lossy ? ' ' : space; + }; + _proto.optionalSpace = function optionalSpace(space) { + return this.options.lossy ? '' : space; + }; + _proto.lossySpace = function lossySpace(space, required) { + if (this.options.lossy) { + return required ? ' ' : ''; + } else { + return space; + } + }; + _proto.parseParenthesisToken = function parseParenthesisToken(token) { + var content = this.content(token); + if (token[_tokenize.FIELDS.TYPE] === tokens.space) { + return this.requiredSpace(content); + } else { + return content; + } + }; + _proto.newNode = function newNode(node, namespace) { + if (namespace) { + if (/^ +$/.test(namespace)) { + if (!this.options.lossy) { + this.spaces = (this.spaces || '') + namespace; + } + namespace = true; + } + node.namespace = namespace; + unescapeProp(node, "namespace"); + } + if (this.spaces) { + node.spaces.before = this.spaces; + this.spaces = ''; + } + return this.current.append(node); + }; + _proto.content = function content(token) { + if (token === void 0) { + token = this.currToken; + } + return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); + }; + /** + * returns the index of the next non-whitespace, non-comment token. + * returns -1 if no meaningful token is found. + */ + _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { + if (startPosition === void 0) { + startPosition = this.position + 1; + } + var searchPosition = startPosition; + while (searchPosition < this.tokens.length) { + if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { + searchPosition++; + continue; + } else { + return searchPosition; + } + } + return -1; + }; + _createClass(Parser, [{ + key: "currToken", + get: function get() { + return this.tokens[this.position]; + } + }, { + key: "nextToken", + get: function get() { + return this.tokens[this.position + 1]; + } + }, { + key: "prevToken", + get: function get() { + return this.tokens[this.position - 1]; + } + }]); + return Parser; + }(); + exports["default"] = Parser; + module.exports = exports.default; +} (parser, parser.exports)); + +var parserExports = parser.exports; + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _parser = _interopRequireDefault(parserExports); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var Processor = /*#__PURE__*/function () { + function Processor(func, options) { + this.func = func || function noop() {}; + this.funcRes = null; + this.options = options; + } + var _proto = Processor.prototype; + _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.updateSelector === false) { + return false; + } else { + return typeof rule !== "string"; + } + }; + _proto._isLossy = function _isLossy(options) { + if (options === void 0) { + options = {}; + } + var merged = Object.assign({}, this.options, options); + if (merged.lossless === false) { + return true; + } else { + return false; + } + }; + _proto._root = function _root(rule, options) { + if (options === void 0) { + options = {}; + } + var parser = new _parser["default"](rule, this._parseOptions(options)); + return parser.root; + }; + _proto._parseOptions = function _parseOptions(options) { + return { + lossy: this._isLossy(options) + }; + }; + _proto._run = function _run(rule, options) { + var _this = this; + if (options === void 0) { + options = {}; + } + return new Promise(function (resolve, reject) { + try { + var root = _this._root(rule, options); + Promise.resolve(_this.func(root)).then(function (transform) { + var string = undefined; + if (_this._shouldUpdateSelector(rule, options)) { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + }).then(resolve, reject); + } catch (e) { + reject(e); + return; + } + }); + }; + _proto._runSync = function _runSync(rule, options) { + if (options === void 0) { + options = {}; + } + var root = this._root(rule, options); + var transform = this.func(root); + if (transform && typeof transform.then === "function") { + throw new Error("Selector processor returned a promise to a synchronous call."); + } + var string = undefined; + if (options.updateSelector && typeof rule !== "string") { + string = root.toString(); + rule.selector = string; + } + return { + transform: transform, + root: root, + string: string + }; + } + + /** + * Process rule into a selector AST. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<parser.Root>} The AST of the selector after processing it. + */; + _proto.ast = function ast(rule, options) { + return this._run(rule, options).then(function (result) { + return result.root; + }); + } + + /** + * Process rule into a selector AST synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {parser.Root} The AST of the selector after processing it. + */; + _proto.astSync = function astSync(rule, options) { + return this._runSync(rule, options).root; + } + + /** + * Process a selector into a transformed value asynchronously + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {Promise<any>} The value returned by the processor. + */; + _proto.transform = function transform(rule, options) { + return this._run(rule, options).then(function (result) { + return result.transform; + }); + } + + /** + * Process a selector into a transformed value synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {any} The value returned by the processor. + */; + _proto.transformSync = function transformSync(rule, options) { + return this._runSync(rule, options).transform; + } + + /** + * Process a selector into a new selector string asynchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.process = function process(rule, options) { + return this._run(rule, options).then(function (result) { + return result.string || result.root.toString(); + }); + } + + /** + * Process a selector into a new selector string synchronously. + * + * @param rule {postcss.Rule | string} The css selector to be processed + * @param options The options for processing + * @returns {string} the selector after processing. + */; + _proto.processSync = function processSync(rule, options) { + var result = this._runSync(rule, options); + return result.string || result.root.toString(); + }; + return Processor; + }(); + exports["default"] = Processor; + module.exports = exports.default; +} (processor, processor.exports)); + +var processorExports = processor.exports; + +var selectors = {}; + +var constructors = {}; + +constructors.__esModule = true; +constructors.universal = constructors.tag = constructors.string = constructors.selector = constructors.root = constructors.pseudo = constructors.nesting = constructors.id = constructors.comment = constructors.combinator = constructors.className = constructors.attribute = void 0; +var _attribute = _interopRequireDefault(attribute$1); +var _className = _interopRequireDefault(classNameExports); +var _combinator = _interopRequireDefault(combinatorExports); +var _comment = _interopRequireDefault(commentExports); +var _id = _interopRequireDefault(idExports); +var _nesting = _interopRequireDefault(nestingExports); +var _pseudo = _interopRequireDefault(pseudoExports); +var _root = _interopRequireDefault(rootExports); +var _selector = _interopRequireDefault(selectorExports); +var _string = _interopRequireDefault(stringExports); +var _tag = _interopRequireDefault(tagExports); +var _universal = _interopRequireDefault(universalExports); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } +var attribute = function attribute(opts) { + return new _attribute["default"](opts); +}; +constructors.attribute = attribute; +var className = function className(opts) { + return new _className["default"](opts); +}; +constructors.className = className; +var combinator = function combinator(opts) { + return new _combinator["default"](opts); +}; +constructors.combinator = combinator; +var comment = function comment(opts) { + return new _comment["default"](opts); +}; +constructors.comment = comment; +var id = function id(opts) { + return new _id["default"](opts); +}; +constructors.id = id; +var nesting = function nesting(opts) { + return new _nesting["default"](opts); +}; +constructors.nesting = nesting; +var pseudo = function pseudo(opts) { + return new _pseudo["default"](opts); +}; +constructors.pseudo = pseudo; +var root = function root(opts) { + return new _root["default"](opts); +}; +constructors.root = root; +var selector = function selector(opts) { + return new _selector["default"](opts); +}; +constructors.selector = selector; +var string = function string(opts) { + return new _string["default"](opts); +}; +constructors.string = string; +var tag = function tag(opts) { + return new _tag["default"](opts); +}; +constructors.tag = tag; +var universal = function universal(opts) { + return new _universal["default"](opts); +}; +constructors.universal = universal; + +var guards = {}; + +guards.__esModule = true; +guards.isComment = guards.isCombinator = guards.isClassName = guards.isAttribute = void 0; +guards.isContainer = isContainer; +guards.isIdentifier = void 0; +guards.isNamespace = isNamespace; +guards.isNesting = void 0; +guards.isNode = isNode; +guards.isPseudo = void 0; +guards.isPseudoClass = isPseudoClass; +guards.isPseudoElement = isPseudoElement; +guards.isUniversal = guards.isTag = guards.isString = guards.isSelector = guards.isRoot = void 0; +var _types = types; +var _IS_TYPE; +var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE); +function isNode(node) { + return typeof node === "object" && IS_TYPE[node.type]; +} +function isNodeType(type, node) { + return isNode(node) && node.type === type; +} +var isAttribute = isNodeType.bind(null, _types.ATTRIBUTE); +guards.isAttribute = isAttribute; +var isClassName = isNodeType.bind(null, _types.CLASS); +guards.isClassName = isClassName; +var isCombinator = isNodeType.bind(null, _types.COMBINATOR); +guards.isCombinator = isCombinator; +var isComment = isNodeType.bind(null, _types.COMMENT); +guards.isComment = isComment; +var isIdentifier = isNodeType.bind(null, _types.ID); +guards.isIdentifier = isIdentifier; +var isNesting = isNodeType.bind(null, _types.NESTING); +guards.isNesting = isNesting; +var isPseudo = isNodeType.bind(null, _types.PSEUDO); +guards.isPseudo = isPseudo; +var isRoot = isNodeType.bind(null, _types.ROOT); +guards.isRoot = isRoot; +var isSelector = isNodeType.bind(null, _types.SELECTOR); +guards.isSelector = isSelector; +var isString = isNodeType.bind(null, _types.STRING); +guards.isString = isString; +var isTag = isNodeType.bind(null, _types.TAG); +guards.isTag = isTag; +var isUniversal = isNodeType.bind(null, _types.UNIVERSAL); +guards.isUniversal = isUniversal; +function isPseudoElement(node) { + return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after" || node.value.toLowerCase() === ":first-letter" || node.value.toLowerCase() === ":first-line"); +} +function isPseudoClass(node) { + return isPseudo(node) && !isPseudoElement(node); +} +function isContainer(node) { + return !!(isNode(node) && node.walk); +} +function isNamespace(node) { + return isAttribute(node) || isTag(node); +} + +(function (exports) { + + exports.__esModule = true; + var _types = types; + Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _types[key]) return; + exports[key] = _types[key]; + }); + var _constructors = constructors; + Object.keys(_constructors).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _constructors[key]) return; + exports[key] = _constructors[key]; + }); + var _guards = guards; + Object.keys(_guards).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _guards[key]) return; + exports[key] = _guards[key]; + }); +} (selectors)); + +(function (module, exports) { + + exports.__esModule = true; + exports["default"] = void 0; + var _processor = _interopRequireDefault(processorExports); + var selectors$1 = _interopRequireWildcard(selectors); + function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } + function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + var parser = function parser(processor) { + return new _processor["default"](processor); + }; + Object.assign(parser, selectors$1); + delete parser.__esModule; + var _default = parser; + exports["default"] = _default; + module.exports = exports.default; +} (dist, dist.exports)); + +var distExports = dist.exports; +var selectorParser = /*@__PURE__*/getDefaultExportFromCjs(distExports); + +const animationNameRE = /^(-\w+-)?animation-name$/; +const animationRE = /^(-\w+-)?animation$/; +const scopedPlugin = (id = "") => { + const keyframes = /* @__PURE__ */ Object.create(null); + const shortId = id.replace(/^data-v-/, ""); + return { + postcssPlugin: "vue-sfc-scoped", + Rule(rule) { + processRule(id, rule); + }, + AtRule(node) { + if (/-?keyframes$/.test(node.name) && !node.params.endsWith(`-${shortId}`)) { + keyframes[node.params] = node.params = node.params + "-" + shortId; + } + }, + OnceExit(root) { + if (Object.keys(keyframes).length) { + root.walkDecls((decl) => { + if (animationNameRE.test(decl.prop)) { + decl.value = decl.value.split(",").map((v) => keyframes[v.trim()] || v.trim()).join(","); + } + if (animationRE.test(decl.prop)) { + decl.value = decl.value.split(",").map((v) => { + const vals = v.trim().split(/\s+/); + const i = vals.findIndex((val) => keyframes[val]); + if (i !== -1) { + vals.splice(i, 1, keyframes[vals[i]]); + return vals.join(" "); + } else { + return v; + } + }).join(","); + } + }); + } + } + }; +}; +const processedRules = /* @__PURE__ */ new WeakSet(); +function processRule(id, rule) { + if (processedRules.has(rule) || rule.parent && rule.parent.type === "atrule" && /-?keyframes$/.test(rule.parent.name)) { + return; + } + processedRules.add(rule); + rule.selector = selectorParser((selectorRoot) => { + selectorRoot.each((selector) => { + rewriteSelector(id, selector, selectorRoot); + }); + }).processSync(rule.selector); +} +function rewriteSelector(id, selector, selectorRoot, slotted = false) { + let node = null; + let shouldInject = true; + selector.each((n) => { + if (n.type === "combinator" && (n.value === ">>>" || n.value === "/deep/")) { + n.value = " "; + n.spaces.before = n.spaces.after = ""; + warn( + `the >>> and /deep/ combinators have been deprecated. Use :deep() instead.` + ); + return false; + } + if (n.type === "pseudo") { + const { value } = n; + if (value === ":deep" || value === "::v-deep") { + if (n.nodes.length) { + let last = n; + n.nodes[0].each((ss) => { + selector.insertAfter(last, ss); + last = ss; + }); + const prev = selector.at(selector.index(n) - 1); + if (!prev || !isSpaceCombinator(prev)) { + selector.insertAfter( + n, + selectorParser.combinator({ + value: " " + }) + ); + } + selector.removeChild(n); + } else { + warn( + `${value} usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead of ${value} <inner-selector>.` + ); + const prev = selector.at(selector.index(n) - 1); + if (prev && isSpaceCombinator(prev)) { + selector.removeChild(prev); + } + selector.removeChild(n); + } + return false; + } + if (value === ":slotted" || value === "::v-slotted") { + rewriteSelector( + id, + n.nodes[0], + selectorRoot, + true + /* slotted */ + ); + let last = n; + n.nodes[0].each((ss) => { + selector.insertAfter(last, ss); + last = ss; + }); + selector.removeChild(n); + shouldInject = false; + return false; + } + if (value === ":global" || value === "::v-global") { + selectorRoot.insertAfter(selector, n.nodes[0]); + selectorRoot.removeChild(selector); + return false; + } + } + if (n.type !== "pseudo" && n.type !== "combinator" || n.type === "pseudo" && (n.value === ":is" || n.value === ":where")) { + node = n; + } + }); + if (node) { + const { type, value } = node; + if (type === "pseudo" && (value === ":is" || value === ":where")) { + node.nodes.forEach( + (value2) => rewriteSelector(id, value2, selectorRoot, slotted) + ); + shouldInject = false; + } + } + if (node) { + node.spaces.after = ""; + } else { + selector.first.spaces.before = ""; + } + if (shouldInject) { + const idToAdd = slotted ? id + "-s" : id; + selector.insertAfter( + // If node is null it means we need to inject [id] at the start + // insertAfter can handle `null` here + node, + selectorParser.attribute({ + attribute: idToAdd, + value: idToAdd, + raws: {}, + quoteMark: `"` + }) + ); + } +} +function isSpaceCombinator(node) { + return node.type === "combinator" && /^\s+$/.test(node.value); +} +scopedPlugin.postcss = true; +var scopedPlugin$1 = scopedPlugin; + +var sourceMap$1 = {}; + +var sourceMapGenerator = {}; + +var base64Vlq = {}; + +var base64$1 = {}; + +/* -*- Mode: js; js-indent-level: 2; -*- */ + +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +base64$1.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +base64$1.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; }; /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -17896,7 +40861,7 @@ var base64 = { * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - +var base64 = base64$1; // A single base 64 digit can contain 6 bits of data. For the base 64 variable // length quantities we use in the source map spec, the first bit is the sign, @@ -17950,7 +40915,7 @@ function fromVLQSigned(aValue) { /** * Returns the base 64 VLQ encoded value. */ -var encode$1 = function base64VLQ_encode(aValue) { +base64Vlq.encode = function base64VLQ_encode(aValue) { var encoded = ""; var digit; @@ -17974,7 +40939,7 @@ var encode$1 = function base64VLQ_encode(aValue) { * Decodes the next base 64 VLQ value from the given string and returns the * value and the rest of the string via the out parameter. */ -var decode$1 = function base64VLQ_decode(aStr, aIndex, aOutParam) { +base64Vlq.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { var strLen = aStr.length; var result = 0; var shift = 0; @@ -18000,526 +40965,501 @@ var decode$1 = function base64VLQ_decode(aStr, aIndex, aOutParam) { aOutParam.rest = aIndex; }; -var base64Vlq = { - encode: encode$1, - decode: decode$1 -}; - -function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -function getAugmentedNamespace(n) { - if (n.__esModule) return n; - var a = Object.defineProperty({}, '__esModule', {value: true}); - Object.keys(n).forEach(function (k) { - var d = Object.getOwnPropertyDescriptor(n, k); - Object.defineProperty(a, k, d.get ? d : { - enumerable: true, - get: function () { - return n[k]; - } - }); - }); - return a; -} - -function createCommonjsModule(fn) { - var module = { exports: {} }; - return fn(module, module.exports), module.exports; -} +var util$5 = {}; /* -*- Mode: js; js-indent-level: 2; -*- */ -var util = createCommonjsModule(function (module, exports) { -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ +(function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '<dir>/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); - if (path === '') { - path = isAbsolute ? '/' : '.'; - } + if (path === '') { + path = isAbsolute ? '/' : '.'; + } - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); -}; + exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); + }; -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } - aRoot = aRoot.replace(/\/$/, ''); + aRoot = aRoot.replace(/\/$/, ''); - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } - ++level; - } + ++level; + } - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports.relative = relative; -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); + var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); + }()); -function identity (s) { - return s; -} + function identity (s) { + return s; + } -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; + return aStr; + } + exports.toSetString = supportsNullProto ? identity : toSetString; -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; + return aStr; + } + exports.fromSetString = supportsNullProto ? identity : fromSetString; -function isProtoString(s) { - if (!s) { - return false; - } + function isProtoString(s) { + if (!s) { + return false; + } - var length = s.length; + var length = s.length; - if (length < 9 /* "__proto__".length */) { - return false; - } + if (length < 9 /* "__proto__".length */) { + return false; + } - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } - return true; -} + return true; + } -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByOriginalPositions = compareByOriginalPositions; + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByOriginalPositions = compareByOriginalPositions; -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } + /** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } - if (aStr1 === null) { - return 1; // aStr2 !== null - } + if (aStr1 === null) { + return 1; // aStr2 !== null + } - if (aStr2 === null) { - return -1; // aStr1 !== null - } + if (aStr2 === null) { + return -1; // aStr1 !== null + } - if (aStr1 > aStr2) { - return 1; - } + if (aStr1 > aStr2) { + return 1; + } - return -1; -} + return -1; + } -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } + /** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + return strcmp(mappingA.name, mappingB.name); + } + exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; -/** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ -function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); -} -exports.parseSourceMapInput = parseSourceMapInput; + /** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); + } + exports.parseSourceMapInput = parseSourceMapInput; -/** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ -function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; + /** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } - return normalize(sourceURL); -} -exports.computeSourceURL = computeSourceURL; -}); + return normalize(sourceURL); + } + exports.computeSourceURL = computeSourceURL; +} (util$5)); + +var arraySet = {}; /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -18529,7 +41469,7 @@ exports.computeSourceURL = computeSourceURL; * http://opensource.org/licenses/BSD-3-Clause */ - +var util$4 = util$5; var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; @@ -18539,7 +41479,7 @@ var hasNativeMap = typeof Map !== "undefined"; * element is O(1). Removing elements from the set is not supported. Only * strings are supported for membership. */ -function ArraySet() { +function ArraySet$2() { this._array = []; this._set = hasNativeMap ? new Map() : Object.create(null); } @@ -18547,8 +41487,8 @@ function ArraySet() { /** * Static method for creating ArraySet instances from an existing array. */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); +ArraySet$2.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet$2(); for (var i = 0, len = aArray.length; i < len; i++) { set.add(aArray[i], aAllowDuplicates); } @@ -18561,7 +41501,7 @@ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { * * @returns Number */ -ArraySet.prototype.size = function ArraySet_size() { +ArraySet$2.prototype.size = function ArraySet_size() { return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; }; @@ -18570,8 +41510,8 @@ ArraySet.prototype.size = function ArraySet_size() { * * @param String aStr */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); +ArraySet$2.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util$4.toSetString(aStr); var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); var idx = this._array.length; if (!isDuplicate || aAllowDuplicates) { @@ -18591,11 +41531,11 @@ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { * * @param String aStr */ -ArraySet.prototype.has = function ArraySet_has(aStr) { +ArraySet$2.prototype.has = function ArraySet_has(aStr) { if (hasNativeMap) { return this._set.has(aStr); } else { - var sStr = util.toSetString(aStr); + var sStr = util$4.toSetString(aStr); return has.call(this._set, sStr); } }; @@ -18605,14 +41545,14 @@ ArraySet.prototype.has = function ArraySet_has(aStr) { * * @param String aStr */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { +ArraySet$2.prototype.indexOf = function ArraySet_indexOf(aStr) { if (hasNativeMap) { var idx = this._set.get(aStr); if (idx >= 0) { return idx; } } else { - var sStr = util.toSetString(aStr); + var sStr = util$4.toSetString(aStr); if (has.call(this._set, sStr)) { return this._set[sStr]; } @@ -18626,7 +41566,7 @@ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { * * @param Number aIdx */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { +ArraySet$2.prototype.at = function ArraySet_at(aIdx) { if (aIdx >= 0 && aIdx < this._array.length) { return this._array[aIdx]; } @@ -18638,15 +41578,13 @@ ArraySet.prototype.at = function ArraySet_at(aIdx) { * indicated by indexOf). Note that this is a copy of the internal array used * for storing the members so that no one can mess with internal state. */ -ArraySet.prototype.toArray = function ArraySet_toArray() { +ArraySet$2.prototype.toArray = function ArraySet_toArray() { return this._array.slice(); }; -var ArraySet_1 = ArraySet; +arraySet.ArraySet = ArraySet$2; -var arraySet = { - ArraySet: ArraySet_1 -}; +var mappingList = {}; /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -18656,7 +41594,7 @@ var arraySet = { * http://opensource.org/licenses/BSD-3-Clause */ - +var util$3 = util$5; /** * Determine whether mappingB is after mappingA with respect to generated @@ -18669,7 +41607,7 @@ function generatedPositionAfter(mappingA, mappingB) { var columnA = mappingA.generatedColumn; var columnB = mappingB.generatedColumn; return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + util$3.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; } /** @@ -18677,7 +41615,7 @@ function generatedPositionAfter(mappingA, mappingB) { * performance conscious manner. It trades a neglibable overhead in general * case for a large speedup in case of mappings being added in order. */ -function MappingList() { +function MappingList$1() { this._array = []; this._sorted = true; // Serves as infimum @@ -18690,7 +41628,7 @@ function MappingList() { * * NOTE: The order of the mappings is NOT guaranteed. */ -MappingList.prototype.unsortedForEach = +MappingList$1.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { this._array.forEach(aCallback, aThisArg); }; @@ -18700,7 +41638,7 @@ MappingList.prototype.unsortedForEach = * * @param Object aMapping */ -MappingList.prototype.add = function MappingList_add(aMapping) { +MappingList$1.prototype.add = function MappingList_add(aMapping) { if (generatedPositionAfter(this._last, aMapping)) { this._last = aMapping; this._array.push(aMapping); @@ -18719,19 +41657,15 @@ MappingList.prototype.add = function MappingList_add(aMapping) { * an immutable borrow. If you want to take ownership, you must make your own * copy. */ -MappingList.prototype.toArray = function MappingList_toArray() { +MappingList$1.prototype.toArray = function MappingList_toArray() { if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); + this._array.sort(util$3.compareByGeneratedPositionsInflated); this._sorted = true; } return this._array; }; -var MappingList_1 = MappingList; - -var mappingList = { - MappingList: MappingList_1 -}; +mappingList.MappingList = MappingList$1; /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -18741,10 +41675,10 @@ var mappingList = { * http://opensource.org/licenses/BSD-3-Clause */ - - +var base64VLQ$1 = base64Vlq; +var util$2 = util$5; var ArraySet$1 = arraySet.ArraySet; -var MappingList$1 = mappingList.MappingList; +var MappingList = mappingList.MappingList; /** * An instance of the SourceMapGenerator represents a source map which is @@ -18754,30 +41688,30 @@ var MappingList$1 = mappingList.MappingList; * - file: The filename of the generated source. * - sourceRoot: A root for all relative URLs in this source map. */ -function SourceMapGenerator(aArgs) { +function SourceMapGenerator$2(aArgs) { if (!aArgs) { aArgs = {}; } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._file = util$2.getArg(aArgs, 'file', null); + this._sourceRoot = util$2.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util$2.getArg(aArgs, 'skipValidation', false); this._sources = new ArraySet$1(); this._names = new ArraySet$1(); - this._mappings = new MappingList$1(); + this._mappings = new MappingList(); this._sourcesContents = null; } -SourceMapGenerator.prototype._version = 3; +SourceMapGenerator$2.prototype._version = 3; /** * Creates a new SourceMapGenerator based on a SourceMapConsumer * * @param aSourceMapConsumer The SourceMap. */ -SourceMapGenerator.fromSourceMap = +SourceMapGenerator$2.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ + var generator = new SourceMapGenerator$2({ file: aSourceMapConsumer.file, sourceRoot: sourceRoot }); @@ -18792,7 +41726,7 @@ SourceMapGenerator.fromSourceMap = if (mapping.source != null) { newMapping.source = mapping.source; if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); + newMapping.source = util$2.relative(sourceRoot, newMapping.source); } newMapping.original = { @@ -18810,7 +41744,7 @@ SourceMapGenerator.fromSourceMap = aSourceMapConsumer.sources.forEach(function (sourceFile) { var sourceRelative = sourceFile; if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); + sourceRelative = util$2.relative(sourceRoot, sourceFile); } if (!generator._sources.has(sourceRelative)) { @@ -18835,12 +41769,12 @@ SourceMapGenerator.fromSourceMap = * - source: The original source file (relative to the sourceRoot). * - name: An optional original token name for this mapping. */ -SourceMapGenerator.prototype.addMapping = +SourceMapGenerator$2.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); + var generated = util$2.getArg(aArgs, 'generated'); + var original = util$2.getArg(aArgs, 'original', null); + var source = util$2.getArg(aArgs, 'source', null); + var name = util$2.getArg(aArgs, 'name', null); if (!this._skipValidation) { this._validateMapping(generated, original, source, name); @@ -18873,11 +41807,11 @@ SourceMapGenerator.prototype.addMapping = /** * Set the source content for a source file. */ -SourceMapGenerator.prototype.setSourceContent = +SourceMapGenerator$2.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { var source = aSourceFile; if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); + source = util$2.relative(this._sourceRoot, source); } if (aSourceContent != null) { @@ -18886,11 +41820,11 @@ SourceMapGenerator.prototype.setSourceContent = if (!this._sourcesContents) { this._sourcesContents = Object.create(null); } - this._sourcesContents[util.toSetString(source)] = aSourceContent; + this._sourcesContents[util$2.toSetString(source)] = aSourceContent; } else if (this._sourcesContents) { // Remove the source file from the _sourcesContents map. // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; + delete this._sourcesContents[util$2.toSetString(source)]; if (Object.keys(this._sourcesContents).length === 0) { this._sourcesContents = null; } @@ -18913,7 +41847,7 @@ SourceMapGenerator.prototype.setSourceContent = * paths. If so, those relative source paths need to be rewritten * relative to the SourceMapGenerator. */ -SourceMapGenerator.prototype.applySourceMap = +SourceMapGenerator$2.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { var sourceFile = aSourceFile; // If aSourceFile is omitted, we will use the file property of the SourceMap @@ -18929,7 +41863,7 @@ SourceMapGenerator.prototype.applySourceMap = var sourceRoot = this._sourceRoot; // Make "sourceFile" relative if an absolute Url is passed. if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); + sourceFile = util$2.relative(sourceRoot, sourceFile); } // Applying the SourceMap can add and remove items from the sources and // the names array. @@ -18948,10 +41882,10 @@ SourceMapGenerator.prototype.applySourceMap = // Copy mapping mapping.source = original.source; if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source); + mapping.source = util$2.join(aSourceMapPath, mapping.source); } if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); + mapping.source = util$2.relative(sourceRoot, mapping.source); } mapping.originalLine = original.line; mapping.originalColumn = original.column; @@ -18980,10 +41914,10 @@ SourceMapGenerator.prototype.applySourceMap = var content = aSourceMapConsumer.sourceContentFor(sourceFile); if (content != null) { if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); + sourceFile = util$2.join(aSourceMapPath, sourceFile); } if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); + sourceFile = util$2.relative(sourceRoot, sourceFile); } this.setSourceContent(sourceFile, content); } @@ -19001,7 +41935,7 @@ SourceMapGenerator.prototype.applySourceMap = * To maintain consistency, we validate that any new mapping being added falls * in to one of these categories. */ -SourceMapGenerator.prototype._validateMapping = +SourceMapGenerator$2.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { // When aOriginal is truthy but has empty values for .line and .column, @@ -19044,7 +41978,7 @@ SourceMapGenerator.prototype._validateMapping = * Serialize the accumulated mappings in to the stream of base 64 VLQs * specified by the source map format. */ -SourceMapGenerator.prototype._serializeMappings = +SourceMapGenerator$2.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { var previousGeneratedColumn = 0; var previousGeneratedLine = 1; @@ -19072,34 +42006,34 @@ SourceMapGenerator.prototype._serializeMappings = } else { if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + if (!util$2.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { continue; } next += ','; } } - next += base64Vlq.encode(mapping.generatedColumn + next += base64VLQ$1.encode(mapping.generatedColumn - previousGeneratedColumn); previousGeneratedColumn = mapping.generatedColumn; if (mapping.source != null) { sourceIdx = this._sources.indexOf(mapping.source); - next += base64Vlq.encode(sourceIdx - previousSource); + next += base64VLQ$1.encode(sourceIdx - previousSource); previousSource = sourceIdx; // lines are stored 0-based in SourceMap spec version 3 - next += base64Vlq.encode(mapping.originalLine - 1 + next += base64VLQ$1.encode(mapping.originalLine - 1 - previousOriginalLine); previousOriginalLine = mapping.originalLine - 1; - next += base64Vlq.encode(mapping.originalColumn + next += base64VLQ$1.encode(mapping.originalColumn - previousOriginalColumn); previousOriginalColumn = mapping.originalColumn; if (mapping.name != null) { nameIdx = this._names.indexOf(mapping.name); - next += base64Vlq.encode(nameIdx - previousName); + next += base64VLQ$1.encode(nameIdx - previousName); previousName = nameIdx; } } @@ -19110,16 +42044,16 @@ SourceMapGenerator.prototype._serializeMappings = return result; }; -SourceMapGenerator.prototype._generateSourcesContent = +SourceMapGenerator$2.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { return aSources.map(function (source) { if (!this._sourcesContents) { return null; } if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); + source = util$2.relative(aSourceRoot, source); } - var key = util.toSetString(source); + var key = util$2.toSetString(source); return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; @@ -19129,7 +42063,7 @@ SourceMapGenerator.prototype._generateSourcesContent = /** * Externalize the source map. */ -SourceMapGenerator.prototype.toJSON = +SourceMapGenerator$2.prototype.toJSON = function SourceMapGenerator_toJSON() { var map = { version: this._version, @@ -19153,133 +42087,136 @@ SourceMapGenerator.prototype.toJSON = /** * Render the source map being generated to a string. */ -SourceMapGenerator.prototype.toString = +SourceMapGenerator$2.prototype.toString = function SourceMapGenerator_toString() { return JSON.stringify(this.toJSON()); }; -var SourceMapGenerator_1 = SourceMapGenerator; +sourceMapGenerator.SourceMapGenerator = SourceMapGenerator$2; -var sourceMapGenerator = { - SourceMapGenerator: SourceMapGenerator_1 -}; +var sourceMapConsumer = {}; + +var binarySearch$1 = {}; /* -*- Mode: js; js-indent-level: 2; -*- */ -var binarySearch = createCommonjsModule(function (module, exports) { -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ +(function (exports) { + /* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; + exports.GREATEST_LOWER_BOUND = 1; + exports.LEAST_UPPER_BOUND = 2; -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } + /** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } - return index; -}; -}); + return index; + }; +} (binarySearch$1)); + +var quickSort$1 = {}; /* -*- Mode: js; js-indent-level: 2; -*- */ + /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: @@ -19390,14 +42327,10 @@ function doQuickSort(ary, comparator, p, r) { * @param {function} comparator * Function to use to compare two items. */ -var quickSort_1 = function (ary, comparator) { +quickSort$1.quickSort = function (ary, comparator) { doQuickSort(ary, comparator, 0, ary.length - 1); }; -var quickSort = { - quickSort: quickSort_1 -}; - /* -*- Mode: js; js-indent-level: 2; -*- */ /* @@ -19406,16 +42339,16 @@ var quickSort = { * http://opensource.org/licenses/BSD-3-Clause */ +var util$1 = util$5; +var binarySearch = binarySearch$1; +var ArraySet = arraySet.ArraySet; +var base64VLQ = base64Vlq; +var quickSort = quickSort$1.quickSort; - -var ArraySet$2 = arraySet.ArraySet; - -var quickSort$1 = quickSort.quickSort; - -function SourceMapConsumer(aSourceMap, aSourceMapURL) { +function SourceMapConsumer$1(aSourceMap, aSourceMapURL) { var sourceMap = aSourceMap; if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); + sourceMap = util$1.parseSourceMapInput(aSourceMap); } return sourceMap.sections != null @@ -19423,14 +42356,14 @@ function SourceMapConsumer(aSourceMap, aSourceMapURL) { : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); } -SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { +SourceMapConsumer$1.fromSourceMap = function(aSourceMap, aSourceMapURL) { return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); }; /** * The version of the source mapping spec that we are consuming. */ -SourceMapConsumer.prototype._version = 3; +SourceMapConsumer$1.prototype._version = 3; // `__generatedMappings` and `__originalMappings` are arrays that hold the // parsed mapping coordinates from the source map's "mappings" attribute. They @@ -19462,8 +42395,8 @@ SourceMapConsumer.prototype._version = 3; // // `_originalMappings` is ordered by the original positions. -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { +SourceMapConsumer$1.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer$1.prototype, '_generatedMappings', { configurable: true, enumerable: true, get: function () { @@ -19475,8 +42408,8 @@ Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { } }); -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { +SourceMapConsumer$1.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer$1.prototype, '_originalMappings', { configurable: true, enumerable: true, get: function () { @@ -19488,7 +42421,7 @@ Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { } }); -SourceMapConsumer.prototype._charIsMappingSeparator = +SourceMapConsumer$1.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { var c = aStr.charAt(index); return c === ";" || c === ","; @@ -19499,16 +42432,16 @@ SourceMapConsumer.prototype._charIsMappingSeparator = * query (the ordered arrays in the `this.__generatedMappings` and * `this.__originalMappings` properties). */ -SourceMapConsumer.prototype._parseMappings = +SourceMapConsumer$1.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { throw new Error("Subclasses must implement _parseMappings"); }; -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; +SourceMapConsumer$1.GENERATED_ORDER = 1; +SourceMapConsumer$1.ORIGINAL_ORDER = 2; -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; +SourceMapConsumer$1.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer$1.LEAST_UPPER_BOUND = 2; /** * Iterate over each mapping between an original source/line/column and a @@ -19526,17 +42459,17 @@ SourceMapConsumer.LEAST_UPPER_BOUND = 2; * order or the original's source/line/column order, respectively. Defaults to * `SourceMapConsumer.GENERATED_ORDER`. */ -SourceMapConsumer.prototype.eachMapping = +SourceMapConsumer$1.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var order = aOrder || SourceMapConsumer$1.GENERATED_ORDER; var mappings; switch (order) { - case SourceMapConsumer.GENERATED_ORDER: + case SourceMapConsumer$1.GENERATED_ORDER: mappings = this._generatedMappings; break; - case SourceMapConsumer.ORIGINAL_ORDER: + case SourceMapConsumer$1.ORIGINAL_ORDER: mappings = this._originalMappings; break; default: @@ -19546,7 +42479,7 @@ SourceMapConsumer.prototype.eachMapping = var sourceRoot = this.sourceRoot; mappings.map(function (mapping) { var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + source = util$1.computeSourceURL(sourceRoot, source, this._sourceMapURL); return { source: source, generatedLine: mapping.generatedLine, @@ -19580,18 +42513,18 @@ SourceMapConsumer.prototype.eachMapping = * - column: The column number in the generated source, or null. * The column number is 0-based. */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = +SourceMapConsumer$1.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); + var line = util$1.getArg(aArgs, 'line'); // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping // returns the index of the closest mapping less than the needle. By // setting needle.originalColumn to 0, we thus find the last mapping for // the given line, provided such a mapping exists. var needle = { - source: util.getArg(aArgs, 'source'), + source: util$1.getArg(aArgs, 'source'), originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) + originalColumn: util$1.getArg(aArgs, 'column', 0) }; needle.source = this._findSourceIndex(needle.source); @@ -19605,7 +42538,7 @@ SourceMapConsumer.prototype.allGeneratedPositionsFor = this._originalMappings, "originalLine", "originalColumn", - util.compareByOriginalPositions, + util$1.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND); if (index >= 0) { var mapping = this._originalMappings[index]; @@ -19619,9 +42552,9 @@ SourceMapConsumer.prototype.allGeneratedPositionsFor = // the line we found. while (mapping && mapping.originalLine === originalLine) { mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + line: util$1.getArg(mapping, 'generatedLine', null), + column: util$1.getArg(mapping, 'generatedColumn', null), + lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) }); mapping = this._originalMappings[++index]; @@ -19637,9 +42570,9 @@ SourceMapConsumer.prototype.allGeneratedPositionsFor = mapping.originalLine === line && mapping.originalColumn == originalColumn) { mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + line: util$1.getArg(mapping, 'generatedLine', null), + column: util$1.getArg(mapping, 'generatedColumn', null), + lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) }); mapping = this._originalMappings[++index]; @@ -19650,7 +42583,7 @@ SourceMapConsumer.prototype.allGeneratedPositionsFor = return mappings; }; -var SourceMapConsumer_1 = SourceMapConsumer; +sourceMapConsumer.SourceMapConsumer = SourceMapConsumer$1; /** * A BasicSourceMapConsumer instance represents a parsed source map which we can @@ -19689,18 +42622,18 @@ var SourceMapConsumer_1 = SourceMapConsumer; function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { var sourceMap = aSourceMap; if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); + sourceMap = util$1.parseSourceMapInput(aSourceMap); } - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); + var version = util$1.getArg(sourceMap, 'version'); + var sources = util$1.getArg(sourceMap, 'sources'); // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); + var names = util$1.getArg(sourceMap, 'names', []); + var sourceRoot = util$1.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util$1.getArg(sourceMap, 'sourcesContent', null); + var mappings = util$1.getArg(sourceMap, 'mappings'); + var file = util$1.getArg(sourceMap, 'file', null); // Once again, Sass deviates from the spec and supplies the version as a // string rather than a number, so we use loose equality checking here. @@ -19709,7 +42642,7 @@ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { } if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); + sourceRoot = util$1.normalize(sourceRoot); } sources = sources @@ -19717,14 +42650,14 @@ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { // Some source maps produce relative source paths like "./foo.js" instead of // "foo.js". Normalize these first so that future comparisons will succeed. // See bugzil.la/1090768. - .map(util.normalize) + .map(util$1.normalize) // Always ensure that absolute sources are internally stored relative to // the source root, if the source root is absolute. Not doing this would // be particularly problematic when the source root is a prefix of the // source (valid, but why??). See github issue #199 and bugzil.la/1188982. .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) + return sourceRoot && util$1.isAbsolute(sourceRoot) && util$1.isAbsolute(source) + ? util$1.relative(sourceRoot, source) : source; }); @@ -19732,11 +42665,11 @@ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { // are intended to be compressed and deduplicated, the TypeScript compiler // sometimes generates source maps with duplicates in them. See Github issue // #72 and bugzil.la/889492. - this._names = ArraySet$2.fromArray(names.map(String), true); - this._sources = ArraySet$2.fromArray(sources, true); + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + return util$1.computeSourceURL(sourceRoot, s, aSourceMapURL); }); this.sourceRoot = sourceRoot; @@ -19746,8 +42679,8 @@ function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { this.file = file; } -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer$1; /** * Utility function to find the index of a source. Returns -1 if not @@ -19756,7 +42689,7 @@ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { var relativeSource = aSource; if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); + relativeSource = util$1.relative(this.sourceRoot, relativeSource); } if (this._sources.has(relativeSource)) { @@ -19788,15 +42721,15 @@ BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { var smc = Object.create(BasicSourceMapConsumer.prototype); - var names = smc._names = ArraySet$2.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet$2.fromArray(aSourceMap._sources.toArray(), true); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); smc.sourceRoot = aSourceMap._sourceRoot; smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot); smc.file = aSourceMap._file; smc._sourceMapURL = aSourceMapURL; smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + return util$1.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); }); // Because we are modifying the entries (by converting string sources and @@ -19829,7 +42762,7 @@ BasicSourceMapConsumer.fromSourceMap = destGeneratedMappings.push(destMapping); } - quickSort$1(smc.__originalMappings, util.compareByOriginalPositions); + quickSort(smc.__originalMappings, util$1.compareByOriginalPositions); return smc; }; @@ -19912,7 +42845,7 @@ BasicSourceMapConsumer.prototype._parseMappings = } else { segment = []; while (index < end) { - base64Vlq.decode(aStr, index, temp); + base64VLQ.decode(aStr, index, temp); value = temp.value; index = temp.rest; segment.push(value); @@ -19962,10 +42895,10 @@ BasicSourceMapConsumer.prototype._parseMappings = } } - quickSort$1(generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(generatedMappings, util$1.compareByGeneratedPositionsDeflated); this.__generatedMappings = generatedMappings; - quickSort$1(originalMappings, util.compareByOriginalPositions); + quickSort(originalMappings, util$1.compareByOriginalPositions); this.__originalMappings = originalMappings; }; @@ -20047,8 +42980,8 @@ BasicSourceMapConsumer.prototype.computeColumnSpans = BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') + generatedLine: util$1.getArg(aArgs, 'line'), + generatedColumn: util$1.getArg(aArgs, 'column') }; var index = this._findMapping( @@ -20056,27 +42989,27 @@ BasicSourceMapConsumer.prototype.originalPositionFor = this._generatedMappings, "generatedLine", "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + util$1.compareByGeneratedPositionsDeflated, + util$1.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND) ); if (index >= 0) { var mapping = this._generatedMappings[index]; if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); + var source = util$1.getArg(mapping, 'source', null); if (source !== null) { source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + source = util$1.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); } - var name = util.getArg(mapping, 'name', null); + var name = util$1.getArg(mapping, 'name', null); if (name !== null) { name = this._names.at(name); } return { source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), + line: util$1.getArg(mapping, 'originalLine', null), + column: util$1.getArg(mapping, 'originalColumn', null), name: name }; } @@ -20121,12 +43054,12 @@ BasicSourceMapConsumer.prototype.sourceContentFor = var relativeSource = aSource; if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); + relativeSource = util$1.relative(this.sourceRoot, relativeSource); } var url; if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { + && (url = util$1.urlParse(this.sourceRoot))) { // XXX: file:// URIs and absolute paths lead to unexpected behavior for // many users. We can help them out when they expect file:// URIs to // behave like it would if they were running a local HTTP server. See @@ -20180,7 +43113,7 @@ BasicSourceMapConsumer.prototype.sourceContentFor = */ BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); + var source = util$1.getArg(aArgs, 'source'); source = this._findSourceIndex(source); if (source < 0) { return { @@ -20192,8 +43125,8 @@ BasicSourceMapConsumer.prototype.generatedPositionFor = var needle = { source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') + originalLine: util$1.getArg(aArgs, 'line'), + originalColumn: util$1.getArg(aArgs, 'column') }; var index = this._findMapping( @@ -20201,8 +43134,8 @@ BasicSourceMapConsumer.prototype.generatedPositionFor = this._originalMappings, "originalLine", "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + util$1.compareByOriginalPositions, + util$1.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND) ); if (index >= 0) { @@ -20210,9 +43143,9 @@ BasicSourceMapConsumer.prototype.generatedPositionFor = if (mapping.source === needle.source) { return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + line: util$1.getArg(mapping, 'generatedLine', null), + column: util$1.getArg(mapping, 'generatedColumn', null), + lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) }; } } @@ -20224,7 +43157,7 @@ BasicSourceMapConsumer.prototype.generatedPositionFor = }; }; -var BasicSourceMapConsumer_1 = BasicSourceMapConsumer; +sourceMapConsumer.BasicSourceMapConsumer = BasicSourceMapConsumer; /** * An IndexedSourceMapConsumer instance represents a parsed source map which @@ -20278,18 +43211,18 @@ var BasicSourceMapConsumer_1 = BasicSourceMapConsumer; function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { var sourceMap = aSourceMap; if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); + sourceMap = util$1.parseSourceMapInput(aSourceMap); } - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); + var version = util$1.getArg(sourceMap, 'version'); + var sections = util$1.getArg(sourceMap, 'sections'); if (version != this._version) { throw new Error('Unsupported version: ' + version); } - this._sources = new ArraySet$2(); - this._names = new ArraySet$2(); + this._sources = new ArraySet(); + this._names = new ArraySet(); var lastOffset = { line: -1, @@ -20301,9 +43234,9 @@ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { // See https://github.com/mozilla/source-map/issues/16 throw new Error('Support for url field in sections not implemented.'); } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); + var offset = util$1.getArg(s, 'offset'); + var offsetLine = util$1.getArg(offset, 'line'); + var offsetColumn = util$1.getArg(offset, 'column'); if (offsetLine < lastOffset.line || (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { @@ -20318,13 +43251,13 @@ function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { generatedLine: offsetLine + 1, generatedColumn: offsetColumn + 1 }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + consumer: new SourceMapConsumer$1(util$1.getArg(s, 'map'), aSourceMapURL) } }); } -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer$1; /** * The version of the source mapping spec that we are consuming. @@ -20368,8 +43301,8 @@ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') + generatedLine: util$1.getArg(aArgs, 'line'), + generatedColumn: util$1.getArg(aArgs, 'column') }; // Find the section containing the generated position we're trying to map @@ -20465,7 +43398,7 @@ IndexedSourceMapConsumer.prototype.generatedPositionFor = // Only consider this section if the requested source is in the list of // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + if (section.consumer._findSourceIndex(util$1.getArg(aArgs, 'source')) === -1) { continue; } var generatedPosition = section.consumer.generatedPositionFor(aArgs); @@ -20504,7 +43437,7 @@ IndexedSourceMapConsumer.prototype._parseMappings = var mapping = sectionMappings[j]; var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + source = util$1.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); this._sources.add(source); source = this._sources.indexOf(source); @@ -20539,17 +43472,13 @@ IndexedSourceMapConsumer.prototype._parseMappings = } } - quickSort$1(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort$1(this.__originalMappings, util.compareByOriginalPositions); + quickSort(this.__generatedMappings, util$1.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util$1.compareByOriginalPositions); }; -var IndexedSourceMapConsumer_1 = IndexedSourceMapConsumer; +sourceMapConsumer.IndexedSourceMapConsumer = IndexedSourceMapConsumer; -var sourceMapConsumer = { - SourceMapConsumer: SourceMapConsumer_1, - BasicSourceMapConsumer: BasicSourceMapConsumer_1, - IndexedSourceMapConsumer: IndexedSourceMapConsumer_1 -}; +var sourceNode = {}; /* -*- Mode: js; js-indent-level: 2; -*- */ @@ -20560,7 +43489,7 @@ var sourceMapConsumer = { */ var SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator; - +var util = util$5; // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // operating systems these days (capturing the result). @@ -20964,11 +43893,7 @@ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSou return { code: generated.code, map: map }; }; -var SourceNode_1 = SourceNode; - -var sourceNode = { - SourceNode: SourceNode_1 -}; +sourceNode.SourceNode = SourceNode; /* * Copyright 2009-2011 Mozilla Foundation and contributors @@ -20976,28114 +43901,15 @@ var sourceNode = { * http://opensource.org/licenses/BSD-3-Clause */ -var SourceMapGenerator$2 = sourceMapGenerator.SourceMapGenerator; -var SourceMapConsumer$1 = sourceMapConsumer.SourceMapConsumer; -var SourceNode$1 = sourceNode.SourceNode; +sourceMap$1.SourceMapGenerator = sourceMapGenerator.SourceMapGenerator; +sourceMap$1.SourceMapConsumer = sourceMapConsumer.SourceMapConsumer; +sourceMap$1.SourceNode = sourceNode.SourceNode; -var sourceMap = { - SourceMapGenerator: SourceMapGenerator$2, - SourceMapConsumer: SourceMapConsumer$1, - SourceNode: SourceNode$1 -}; +var sourceMap = sourceMap$1; +var SourceMapConsumer = sourceMap.SourceMapConsumer; +var SourceMapGenerator = sourceMap.SourceMapGenerator; -const PURE_ANNOTATION = `/*#__PURE__*/`; -const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.loc.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: undefined, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, node) { - context.code += code; - if (context.map) { - if (node) { - let name; - if (node.type === 4 /* SIMPLE_EXPRESSION */ && !node.isStatic) { - const content = node.content.replace(/^_ctx\./, ''); - if (content !== node.content && isSimpleIdentifier(content)) { - name = content; - } - } - addMapping(node.loc.start, name); - } - advancePositionWithMutation(context, code); - if (node && node.loc !== locStub) { - addMapping(node.loc.end); - } - } - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } - else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push('\n' + ` `.repeat(n)); - } - function addMapping(loc, name) { - context.map.addMapping({ - name, - source: context.filename, - original: { - line: loc.line, - column: loc.column - 1 // source-map column is 0 based - }, - generated: { - line: context.line, - column: context.column - 1 - } - }); - } - if (sourceMap) { - // lazy require source-map implementation, only in non-browser builds - context.map = new SourceMapGenerator$2(); - context.map.setSourceContent(filename, context.source); - } - return context; -} -function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) - options.onContextCreated(context); - const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context; - const hasHelpers = ast.helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== 'module'; - const genScopeId = scopeId != null && mode === 'module'; - const isSetupInlined = !!options.inline; - // preambles - // in setup() inline mode, the preamble is generated in a sub context - // and returned separately. - const preambleContext = isSetupInlined - ? createCodegenContext(ast, options) - : context; - if (mode === 'module') { - genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined); - } - else { - genFunctionPreamble(ast, preambleContext); - } - // enter render function - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache']; - if (options.bindingMetadata && !options.inline) { - // binding optimization args - args.push('$props', '$setup', '$data', '$options'); - } - const signature = options.isTS - ? args.map(arg => `${arg}: any`).join(',') - : args.join(', '); - if (isSetupInlined) { - push(`(${signature}) => {`); - } - else { - push(`function ${functionName}(${signature}) {`); - } - indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - // function mode const declarations should be inside with block - // also they should be renamed to avoid collision with user properties - if (hasHelpers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`); - push(`\n`); - newline(); - } - } - // generate asset resolution statements - if (ast.components.length) { - genAssets(ast.components, 'component', context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, 'directive', context); - if (ast.temps > 0) { - newline(); - } - } - if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } - } - if (ast.components.length || ast.directives.length || ast.temps) { - push(`\n`); - newline(); - } - // generate the VNode tree expression - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } - else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); - } - deindent(); - push(`}`); - return { - ast, - code: context.code, - preamble: isSetupInlined ? preambleContext.code : ``, - // SourceMapGenerator does have toJSON() method but it's not in the types - map: context.map ? context.map.toJSON() : undefined - }; -} -function genFunctionPreamble(ast, context) { - const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context; - const VueBinding = ssr - ? `require(${JSON.stringify(runtimeModuleName)})` - : runtimeGlobalName; - // Generate const declaration for helpers - // In prefix mode, we place the const declaration at top so it's done - // only once; But if we not prefixing, we place the declaration inside the - // with block so it doesn't incur the `in` check cost for every helper access. - if (ast.helpers.length > 0) { - if (prefixIdentifiers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = ${VueBinding}\n`); - } - else { - // "with" mode. - // save Vue in a separate variable to avoid collision - push(`const _Vue = ${VueBinding}\n`); - // in "with" mode, helpers are declared inside the with block to avoid - // has check cost, but hoists are lifted out of the function - we need - // to provide the helper here. - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ] - .filter(helper => ast.helpers.includes(helper)) - .map(aliasHelper) - .join(', '); - push(`const { ${staticHelpers} } = _Vue\n`); - } - } - } - // generate variables for ssr helpers - if (ast.ssrHelpers && ast.ssrHelpers.length) { - // ssr guarantees prefixIdentifier: true - push(`const { ${ast.ssrHelpers - .map(aliasHelper) - .join(', ')} } = require("${ssrRuntimeModuleName}")\n`); - } - genHoists(ast.hoists, context); - newline(); - push(`return `); -} -function genModulePreamble(ast, context, genScopeId, inline) { - const { push, newline, optimizeImports, runtimeModuleName, ssrRuntimeModuleName } = context; - if (genScopeId && ast.hoists.length) { - ast.helpers.push(PUSH_SCOPE_ID, POP_SCOPE_ID); - } - // generate import statements for helpers - if (ast.helpers.length) { - if (optimizeImports) { - // when bundled with webpack with code-split, calling an import binding - // as a function leads to it being wrapped with `Object(a.b)` or `(0,a.b)`, - // incurring both payload size increase and potential perf overhead. - // therefore we assign the imports to variables (which is a constant ~50b - // cost per-component instead of scaling with template size) - push(`import { ${ast.helpers - .map(s => helperNameMap[s]) - .join(', ')} } from ${JSON.stringify(runtimeModuleName)}\n`); - push(`\n// Binding optimization for webpack code-split\nconst ${ast.helpers - .map(s => `_${helperNameMap[s]} = ${helperNameMap[s]}`) - .join(', ')}\n`); - } - else { - push(`import { ${ast.helpers - .map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`) - .join(', ')} } from ${JSON.stringify(runtimeModuleName)}\n`); - } - } - if (ast.ssrHelpers && ast.ssrHelpers.length) { - push(`import { ${ast.ssrHelpers - .map(s => `${helperNameMap[s]} as _${helperNameMap[s]}`) - .join(', ')} } from "${ssrRuntimeModuleName}"\n`); - } - if (ast.imports.length) { - genImports(ast.imports, context); - newline(); - } - genHoists(ast.hoists, context); - newline(); - if (!inline) { - push(`export `); - } -} -function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper(type === 'component' - ? RESOLVE_COMPONENT - : RESOLVE_DIRECTIVE); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - // potential component implicit self-reference inferred from SFC filename - const maybeSelfReference = id.endsWith('__self'); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`); - if (i < assets.length - 1) { - newline(); - } - } -} -function genHoists(hoists, context) { - if (!hoists.length) { - return; - } - context.pure = true; - const { push, newline, helper, scopeId, mode } = context; - const genScopeId = scopeId != null && mode !== 'function'; - newline(); - // generate inlined withScopeId helper - if (genScopeId) { - push(`const _withScopeId = n => (${helper(PUSH_SCOPE_ID)}("${scopeId}"),n=n(),${helper(POP_SCOPE_ID)}(),n)`); - newline(); - } - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - const needScopeIdWrapper = genScopeId && exp.type === 13 /* VNODE_CALL */; - push(`const _hoisted_${i + 1} = ${needScopeIdWrapper ? `${PURE_ANNOTATION} _withScopeId(() => ` : ``}`); - genNode(exp, context); - if (needScopeIdWrapper) { - push(`)`); - } - newline(); - } - } - context.pure = false; -} -function genImports(importsOptions, context) { - if (!importsOptions.length) { - return; - } - importsOptions.forEach(imports => { - context.push(`import `); - genNode(imports.exp, context); - context.push(` from '${imports.path}'`); - context.newline(); - }); -} -function isText$1(n) { - return (isString(n) || - n.type === 4 /* SIMPLE_EXPRESSION */ || - n.type === 2 /* TEXT */ || - n.type === 5 /* INTERPOLATION */ || - n.type === 8 /* COMPOUND_EXPRESSION */); -} -function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || - (nodes.some(n => isArray(n) || !isText$1(n))); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); -} -function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node); - } - else if (isArray(node)) { - genNodeListAsArray(node, context); - } - else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(','); - newline(); - } - else { - comma && push(', '); - } - } - } -} -function genNode(node, context) { - if (isString(node)) { - context.push(node); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1 /* ELEMENT */: - case 9 /* IF */: - case 11 /* FOR */: - assert$1(node.codegenNode != null, `Codegen node is missing for element/if/for node. ` + - `Apply appropriate transforms first.`); - genNode(node.codegenNode, context); - break; - case 2 /* TEXT */: - genText(node, context); - break; - case 4 /* SIMPLE_EXPRESSION */: - genExpression(node, context); - break; - case 5 /* INTERPOLATION */: - genInterpolation(node, context); - break; - case 12 /* TEXT_CALL */: - genNode(node.codegenNode, context); - break; - case 8 /* COMPOUND_EXPRESSION */: - genCompoundExpression(node, context); - break; - case 3 /* COMMENT */: - genComment(node, context); - break; - case 13 /* VNODE_CALL */: - genVNodeCall(node, context); - break; - case 14 /* JS_CALL_EXPRESSION */: - genCallExpression(node, context); - break; - case 15 /* JS_OBJECT_EXPRESSION */: - genObjectExpression(node, context); - break; - case 17 /* JS_ARRAY_EXPRESSION */: - genArrayExpression(node, context); - break; - case 18 /* JS_FUNCTION_EXPRESSION */: - genFunctionExpression(node, context); - break; - case 19 /* JS_CONDITIONAL_EXPRESSION */: - genConditionalExpression(node, context); - break; - case 20 /* JS_CACHE_EXPRESSION */: - genCacheExpression(node, context); - break; - case 21 /* JS_BLOCK_STATEMENT */: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22 /* JS_TEMPLATE_LITERAL */: - genTemplateLiteral(node, context); - break; - case 23 /* JS_IF_STATEMENT */: - genIfStatement(node, context); - break; - case 24 /* JS_ASSIGNMENT_EXPRESSION */: - genAssignmentExpression(node, context); - break; - case 25 /* JS_SEQUENCE_EXPRESSION */: - genSequenceExpression(node, context); - break; - case 26 /* JS_RETURN_STATEMENT */: - genReturnStatement(node, context); - break; - /* istanbul ignore next */ - case 10 /* IF_BRANCH */: - // noop - break; - default: - { - assert$1(false, `unhandled codegen node type: ${node.type}`); - // make sure we exhaust all possible types - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } -} -function genText(node, context) { - context.push(JSON.stringify(node.content), node); -} -function genExpression(node, context) { - const { content, isStatic } = node; - context.push(isStatic ? JSON.stringify(content) : content, node); -} -function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) - push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); -} -function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child); - } - else { - genNode(child, context); - } - } -} -function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8 /* COMPOUND_EXPRESSION */) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } - else if (node.isStatic) { - // only quote keys if necessary - const text = isSimpleIdentifier(node.content) - ? node.content - : JSON.stringify(node.content); - push(text, node); - } - else { - push(`[${node.content}]`, node); - } -} -function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node); -} -function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node; - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock - ? getVNodeBlockHelper(context.inSSR, isComponent) - : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, node); - genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context); - push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } -} -function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) - break; - } - return args.slice(0, i + 1).map(arg => arg || `null`); -} -// JavaScript -function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, node); - genNodeList(node.arguments, context); - push(`)`); -} -function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, node); - return; - } - const multilines = properties.length > 1 || - (properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */)); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - // key - genExpressionAsPropertyKey(key, context); - push(`: `); - // value - genNode(value, context); - if (i < properties.length - 1) { - // will only reach this if it's multilines - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); -} -function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); -} -function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - // wrap slot functions with owner context - push(`_${helperNameMap[WITH_CTX]}(`); - } - push(`(`, node); - if (isArray(params)) { - genNodeList(params, context); - } - else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } - } - else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - push(`)`); - } -} -function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4 /* SIMPLE_EXPRESSION */) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } - else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); - context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); - context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent(true /* without newline */); -} -function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - push(`_cache[${node.index}] || (`); - if (node.isVNode) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1),`); - newline(); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (node.isVNode) { - push(`,`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); -} -function genTemplateLiteral(node, context) { - const { push, indent, deindent } = context; - push('`'); - const l = node.elements.length; - const multilines = l > 3; - for (let i = 0; i < l; i++) { - const e = node.elements[i]; - if (isString(e)) { - push(e.replace(/(`|\$|\\)/g, '\\$1')); - } - else { - push('${'); - if (multilines) - indent(); - genNode(e, context); - if (multilines) - deindent(); - push('}'); - } - } - push('`'); -} -function genIfStatement(node, context) { - const { push, indent, deindent } = context; - const { test, consequent, alternate } = node; - push(`if (`); - genNode(test, context); - push(`) {`); - indent(); - genNode(consequent, context); - deindent(); - push(`}`); - if (alternate) { - push(` else `); - if (alternate.type === 23 /* JS_IF_STATEMENT */) { - genIfStatement(alternate, context); - } - else { - push(`{`); - indent(); - genNode(alternate, context); - deindent(); - push(`}`); - } - } -} -function genAssignmentExpression(node, context) { - genNode(node.left, context); - context.push(` = `); - genNode(node.right, context); -} -function genSequenceExpression(node, context) { - context.push(`(`); - genNodeList(node.expressions, context); - context.push(`)`); -} -function genReturnStatement({ returns }, context) { - context.push(`return `); - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } -} - -// @ts-check -/** @typedef { import('estree').BaseNode} BaseNode */ - -/** @typedef {{ - skip: () => void; - remove: () => void; - replace: (node: BaseNode) => void; -}} WalkerContext */ - -class WalkerBase { - constructor() { - /** @type {boolean} */ - this.should_skip = false; - - /** @type {boolean} */ - this.should_remove = false; - - /** @type {BaseNode | null} */ - this.replacement = null; - - /** @type {WalkerContext} */ - this.context = { - skip: () => (this.should_skip = true), - remove: () => (this.should_remove = true), - replace: (node) => (this.replacement = node) - }; - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - * @param {BaseNode} node - */ - replace(parent, prop, index, node) { - if (parent) { - if (index !== null) { - parent[prop][index] = node; - } else { - parent[prop] = node; - } - } - } - - /** - * - * @param {any} parent - * @param {string} prop - * @param {number} index - */ - remove(parent, prop, index) { - if (parent) { - if (index !== null) { - parent[prop].splice(index, 1); - } else { - delete parent[prop]; - } - } - } -} - -// @ts-check - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./walker.js').WalkerContext} WalkerContext */ - -/** @typedef {( - * this: WalkerContext, - * node: BaseNode, - * parent: BaseNode, - * key: string, - * index: number - * ) => void} SyncHandler */ - -class SyncWalker extends WalkerBase { - /** - * - * @param {SyncHandler} enter - * @param {SyncHandler} leave - */ - constructor(enter, leave) { - super(); - - /** @type {SyncHandler} */ - this.enter = enter; - - /** @type {SyncHandler} */ - this.leave = leave; - } - - /** - * - * @param {BaseNode} node - * @param {BaseNode} parent - * @param {string} [prop] - * @param {number} [index] - * @returns {BaseNode} - */ - visit(node, parent, prop, index) { - if (node) { - if (this.enter) { - const _should_skip = this.should_skip; - const _should_remove = this.should_remove; - const _replacement = this.replacement; - this.should_skip = false; - this.should_remove = false; - this.replacement = null; - - this.enter.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const skipped = this.should_skip; - const removed = this.should_remove; - - this.should_skip = _should_skip; - this.should_remove = _should_remove; - this.replacement = _replacement; - - if (skipped) return node; - if (removed) return null; - } - - for (const key in node) { - const value = node[key]; - - if (typeof value !== "object") { - continue; - } else if (Array.isArray(value)) { - for (let i = 0; i < value.length; i += 1) { - if (value[i] !== null && typeof value[i].type === 'string') { - if (!this.visit(value[i], node, key, i)) { - // removed - i--; - } - } - } - } else if (value !== null && typeof value.type === "string") { - this.visit(value, node, key, null); - } - } - - if (this.leave) { - const _replacement = this.replacement; - const _should_remove = this.should_remove; - this.replacement = null; - this.should_remove = false; - - this.leave.call(this.context, node, parent, prop, index); - - if (this.replacement) { - node = this.replacement; - this.replace(parent, prop, index, node); - } - - if (this.should_remove) { - this.remove(parent, prop, index); - } - - const removed = this.should_remove; - - this.replacement = _replacement; - this.should_remove = _should_remove; - - if (removed) return null; - } - } - - return node; - } -} - -// @ts-check - -/** @typedef { import('estree').BaseNode} BaseNode */ -/** @typedef { import('./sync.js').SyncHandler} SyncHandler */ -/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */ - -/** - * - * @param {BaseNode} ast - * @param {{ - * enter?: SyncHandler - * leave?: SyncHandler - * }} walker - * @returns {BaseNode} - */ -function walk$1(ast, { enter, leave }) { - const instance = new SyncWalker(enter, leave); - return instance.visit(ast, null); -} - -function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = Object.create(null)) { - const rootExp = root.type === 'Program' && - root.body[0].type === 'ExpressionStatement' && - root.body[0].expression; - walk$1(root, { - enter(node, parent) { - parent && parentStack.push(parent); - if (parent && - parent.type.startsWith('TS') && - parent.type !== 'TSAsExpression' && - parent.type !== 'TSNonNullExpression' && - parent.type !== 'TSTypeAssertion') { - return this.skip(); - } - if (node.type === 'Identifier') { - const isLocal = !!knownIds[node.name]; - const isRefed = isReferencedIdentifier(node, parent, parentStack); - if (includeAll || (isRefed && !isLocal)) { - onIdentifier(node, parent, parentStack, isRefed, isLocal); - } - } - else if (node.type === 'ObjectProperty' && - parent.type === 'ObjectPattern') { - node.inPattern = true; - } - else if (isFunctionType(node)) { - // walk function expressions and add its arguments to known identifiers - // so that we don't prefix them - walkFunctionParams(node, id => markScopeIdentifier(node, id, knownIds)); - } - else if (node.type === 'BlockStatement') { - // #3445 record block-level local variables - walkBlockDeclarations(node, id => markScopeIdentifier(node, id, knownIds)); - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if (node !== rootExp && node.scopeIds) { - for (const id of node.scopeIds) { - knownIds[id]--; - if (knownIds[id] === 0) { - delete knownIds[id]; - } - } - } - } - }); -} -function isReferencedIdentifier(id, parent, parentStack) { - if (!parent) { - return true; - } - // is a special keyword but parsed as identifier - if (id.name === 'arguments') { - return false; - } - if (isReferenced(id, parent)) { - return true; - } - // babel's isReferenced check returns false for ids being assigned to, so we - // need to cover those cases here - switch (parent.type) { - case 'AssignmentExpression': - case 'AssignmentPattern': - return true; - case 'ObjectPattern': - case 'ArrayPattern': - return isInDestructureAssignment(parent, parentStack); - } - return false; -} -function isInDestructureAssignment(parent, parentStack) { - if (parent && - (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern')) { - let i = parentStack.length; - while (i--) { - const p = parentStack[i]; - if (p.type === 'AssignmentExpression') { - return true; - } - else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) { - break; - } - } - } - return false; -} -function walkFunctionParams(node, onIdent) { - for (const p of node.params) { - for (const id of extractIdentifiers(p)) { - onIdent(id); - } - } -} -function walkBlockDeclarations(block, onIdent) { - for (const stmt of block.body) { - if (stmt.type === 'VariableDeclaration') { - if (stmt.declare) - continue; - for (const decl of stmt.declarations) { - for (const id of extractIdentifiers(decl.id)) { - onIdent(id); - } - } - } - else if (stmt.type === 'FunctionDeclaration' || - stmt.type === 'ClassDeclaration') { - if (stmt.declare || !stmt.id) - continue; - onIdent(stmt.id); - } - } -} -function extractIdentifiers(param, nodes = []) { - switch (param.type) { - case 'Identifier': - nodes.push(param); - break; - case 'MemberExpression': - let object = param; - while (object.type === 'MemberExpression') { - object = object.object; - } - nodes.push(object); - break; - case 'ObjectPattern': - for (const prop of param.properties) { - if (prop.type === 'RestElement') { - extractIdentifiers(prop.argument, nodes); - } - else { - extractIdentifiers(prop.value, nodes); - } - } - break; - case 'ArrayPattern': - param.elements.forEach(element => { - if (element) - extractIdentifiers(element, nodes); - }); - break; - case 'RestElement': - extractIdentifiers(param.argument, nodes); - break; - case 'AssignmentPattern': - extractIdentifiers(param.left, nodes); - break; - } - return nodes; -} -function markScopeIdentifier(node, child, knownIds) { - const { name } = child; - if (node.scopeIds && node.scopeIds.has(name)) { - return; - } - if (name in knownIds) { - knownIds[name]++; - } - else { - knownIds[name] = 1; - } - (node.scopeIds || (node.scopeIds = new Set())).add(name); -} -const isFunctionType = (node) => { - return /Function(?:Expression|Declaration)$|Method$/.test(node.type); -}; -const isStaticProperty = (node) => node && - (node.type === 'ObjectProperty' || node.type === 'ObjectMethod') && - !node.computed; -const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node; -/** - * Copied from https://github.com/babel/babel/blob/main/packages/babel-types/src/validators/isReferenced.ts - * To avoid runtime dependency on @babel/types (which includes process references) - * This file should not change very often in babel but we may need to keep it - * up-to-date from time to time. - * - * https://github.com/babel/babel/blob/main/LICENSE - * - */ -function isReferenced(node, parent, grandparent) { - switch (parent.type) { - // yes: PARENT[NODE] - // yes: NODE.child - // no: parent.NODE - case 'MemberExpression': - case 'OptionalMemberExpression': - if (parent.property === node) { - return !!parent.computed; - } - return parent.object === node; - case 'JSXMemberExpression': - return parent.object === node; - // no: let NODE = init; - // yes: let id = NODE; - case 'VariableDeclarator': - return parent.init === node; - // yes: () => NODE - // no: (NODE) => {} - case 'ArrowFunctionExpression': - return parent.body === node; - // no: class { #NODE; } - // no: class { get #NODE() {} } - // no: class { #NODE() {} } - // no: class { fn() { return this.#NODE; } } - case 'PrivateName': - return false; - // no: class { NODE() {} } - // yes: class { [NODE]() {} } - // no: class { foo(NODE) {} } - case 'ClassMethod': - case 'ClassPrivateMethod': - case 'ObjectMethod': - if (parent.key === node) { - return !!parent.computed; - } - return false; - // yes: { [NODE]: "" } - // no: { NODE: "" } - // depends: { NODE } - // depends: { key: NODE } - case 'ObjectProperty': - if (parent.key === node) { - return !!parent.computed; - } - // parent.value === node - return !grandparent || grandparent.type !== 'ObjectPattern'; - // no: class { NODE = value; } - // yes: class { [NODE] = value; } - // yes: class { key = NODE; } - case 'ClassProperty': - if (parent.key === node) { - return !!parent.computed; - } - return true; - case 'ClassPrivateProperty': - return parent.key !== node; - // no: class NODE {} - // yes: class Foo extends NODE {} - case 'ClassDeclaration': - case 'ClassExpression': - return parent.superClass === node; - // yes: left = NODE; - // no: NODE = right; - case 'AssignmentExpression': - return parent.right === node; - // no: [NODE = foo] = []; - // yes: [foo = NODE] = []; - case 'AssignmentPattern': - return parent.right === node; - // no: NODE: for (;;) {} - case 'LabeledStatement': - return false; - // no: try {} catch (NODE) {} - case 'CatchClause': - return false; - // no: function foo(...NODE) {} - case 'RestElement': - return false; - case 'BreakStatement': - case 'ContinueStatement': - return false; - // no: function NODE() {} - // no: function foo(NODE) {} - case 'FunctionDeclaration': - case 'FunctionExpression': - return false; - // no: export NODE from "foo"; - // no: export * as NODE from "foo"; - case 'ExportNamespaceSpecifier': - case 'ExportDefaultSpecifier': - return false; - // no: export { foo as NODE }; - // yes: export { NODE as foo }; - // no: export { NODE as foo } from "foo"; - case 'ExportSpecifier': - // @ts-expect-error - if (grandparent === null || grandparent === void 0 ? void 0 : grandparent.source) { - return false; - } - return parent.local === node; - // no: import NODE from "foo"; - // no: import * as NODE from "foo"; - // no: import { NODE as foo } from "foo"; - // no: import { foo as NODE } from "foo"; - // no: import NODE from "bar"; - case 'ImportDefaultSpecifier': - case 'ImportNamespaceSpecifier': - case 'ImportSpecifier': - return false; - // no: import "foo" assert { NODE: "json" } - case 'ImportAttribute': - return false; - // no: <div NODE="foo" /> - case 'JSXAttribute': - return false; - // no: [NODE] = []; - // no: ({ NODE }) = []; - case 'ObjectPattern': - case 'ArrayPattern': - return false; - // no: new.NODE - // no: NODE.target - case 'MetaProperty': - return false; - // yes: type X = { someProperty: NODE } - // no: type X = { NODE: OtherType } - case 'ObjectTypeProperty': - return parent.key !== node; - // yes: enum X { Foo = NODE } - // no: enum X { NODE } - case 'TSEnumMember': - return parent.id !== node; - // yes: { [NODE]: value } - // no: { NODE: value } - case 'TSPropertySignature': - if (parent.key === node) { - return !!parent.computed; - } - return true; - } - return true; -} - -const isLiteralWhitelisted = /*#__PURE__*/ makeMap('true,false,null,this'); -const transformExpression = (node, context) => { - if (node.type === 5 /* INTERPOLATION */) { - node.content = processExpression(node.content, context); - } - else if (node.type === 1 /* ELEMENT */) { - // handle directives on element - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - // do not process for v-on & v-for since they are special handled - if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') { - const exp = dir.exp; - const arg = dir.arg; - // do not process exp if this is v-on:arg - we need special handling - // for wrapping inline statements. - if (exp && - exp.type === 4 /* SIMPLE_EXPRESSION */ && - !(dir.name === 'on' && arg)) { - dir.exp = processExpression(exp, context, - // slot args must be processed as function params - dir.name === 'slot'); - } - if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } - } - } -}; -// Important: since this function uses Node.js only dependencies, it should -// always be used with a leading !false check so that it can be -// tree-shaken from the browser build. -function processExpression(node, context, -// some expressions like v-slot props & v-for aliases should be parsed as -// function params -asParams = false, -// v-on handler values may contain multiple statements -asRawStatements = false, localVars = Object.create(context.identifiers)) { - if (!context.prefixIdentifiers || !node.content.trim()) { - return node; - } - const { inline, bindingMetadata } = context; - const rewriteIdentifier = (raw, parent, id) => { - const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw]; - if (inline) { - // x = y - const isAssignmentLVal = parent && parent.type === 'AssignmentExpression' && parent.left === id; - // x++ - const isUpdateArg = parent && parent.type === 'UpdateExpression' && parent.argument === id; - // ({ x } = y) - const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack); - if (type === "setup-const" /* SETUP_CONST */ || - type === "setup-reactive-const" /* SETUP_REACTIVE_CONST */ || - localVars[raw]) { - return raw; - } - else if (type === "setup-ref" /* SETUP_REF */) { - return `${raw}.value`; - } - else if (type === "setup-maybe-ref" /* SETUP_MAYBE_REF */) { - // const binding that may or may not be ref - // if it's not a ref, then assignments don't make sense - - // so we ignore the non-ref assignment case and generate code - // that assumes the value to be a ref for more efficiency - return isAssignmentLVal || isUpdateArg || isDestructureAssignment - ? `${raw}.value` - : `${context.helperString(UNREF)}(${raw})`; - } - else if (type === "setup-let" /* SETUP_LET */) { - if (isAssignmentLVal) { - // let binding. - // this is a bit more tricky as we need to cover the case where - // let is a local non-ref value, and we need to replicate the - // right hand side value. - // x = y --> isRef(x) ? x.value = y : x = y - const { right: rVal, operator } = parent; - const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1); - const rExpString = stringifyExpression(processExpression(createSimpleExpression(rExp, false), context, false, false, knownIds)); - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore\n` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`; - } - else if (isUpdateArg) { - // make id replace parent in the code range so the raw update operator - // is removed - id.start = parent.start; - id.end = parent.end; - const { prefix: isPrefix, operator } = parent; - const prefix = isPrefix ? operator : ``; - const postfix = isPrefix ? `` : operator; - // let binding. - // x++ --> isRef(a) ? a.value++ : a++ - return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore\n` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`; - } - else if (isDestructureAssignment) { - // TODO - // let binding in a destructure assignment - it's very tricky to - // handle both possible cases here without altering the original - // structure of the code, so we just assume it's not a ref here - // for now - return raw; - } - else { - return `${context.helperString(UNREF)}(${raw})`; - } - } - else if (type === "props" /* PROPS */) { - // use __props which is generated by compileScript so in ts mode - // it gets correct type - return genPropsAccessExp(raw); - } - else if (type === "props-aliased" /* PROPS_ALIASED */) { - // prop with a different local alias (from defineProps() destructure) - return genPropsAccessExp(bindingMetadata.__propsAliases[raw]); - } - } - else { - if (type && type.startsWith('setup')) { - // setup bindings in non-inline mode - return `$setup.${raw}`; - } - else if (type === "props-aliased" /* PROPS_ALIASED */) { - return `$props['${bindingMetadata.__propsAliases[raw]}']`; - } - else if (type) { - return `$${type}.${raw}`; - } - } - // fallback to ctx - return `_ctx.${raw}`; - }; - // fast path if expression is a simple identifier. - const rawExp = node.content; - // bail constant on parens (function invocation) and dot (member access) - const bailConstant = rawExp.indexOf(`(`) > -1 || rawExp.indexOf('.') > 0; - if (isSimpleIdentifier(rawExp)) { - const isScopeVarReference = context.identifiers[rawExp]; - const isAllowedGlobal = isGloballyWhitelisted(rawExp); - const isLiteral = isLiteralWhitelisted(rawExp); - if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) { - // const bindings exposed from setup can be skipped for patching but - // cannot be hoisted to module scope - if (bindingMetadata[node.content] === "setup-const" /* SETUP_CONST */) { - node.constType = 1 /* CAN_SKIP_PATCH */; - } - node.content = rewriteIdentifier(rawExp); - } - else if (!isScopeVarReference) { - if (isLiteral) { - node.constType = 3 /* CAN_STRINGIFY */; - } - else { - node.constType = 2 /* CAN_HOIST */; - } - } - return node; - } - let ast; - // exp needs to be parsed differently: - // 1. Multiple inline statements (v-on, with presence of `;`): parse as raw - // exp, but make sure to pad with spaces for consistent ranges - // 2. Expressions: wrap with parens (for e.g. object expressions) - // 3. Function arguments (v-for, v-slot): place in a function argument position - const source = asRawStatements - ? ` ${rawExp} ` - : `(${rawExp})${asParams ? `=>{}` : ``}`; - try { - ast = parse_1(source, { - plugins: context.expressionPlugins - }).program; - } - catch (e) { - context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, e.message)); - return node; - } - const ids = []; - const parentStack = []; - const knownIds = Object.create(context.identifiers); - walkIdentifiers(ast, (node, parent, _, isReferenced, isLocal) => { - if (isStaticPropertyKey(node, parent)) { - return; - } - const needPrefix = isReferenced && canPrefix(node); - if (needPrefix && !isLocal) { - if (isStaticProperty(parent) && parent.shorthand) { - node.prefix = `${node.name}: `; - } - node.name = rewriteIdentifier(node.name, parent, node); - ids.push(node); - } - else { - // The identifier is considered constant unless it's pointing to a - // local scope variable (a v-for alias, or a v-slot prop) - if (!(needPrefix && isLocal) && !bailConstant) { - node.isConstant = true; - } - // also generate sub-expressions for other identifiers for better - // source map support. (except for property keys which are static) - ids.push(node); - } - }, true, // invoke on ALL identifiers - parentStack, knownIds); - // We break up the compound expression into an array of strings and sub - // expressions (for identifiers that have been prefixed). In codegen, if - // an ExpressionNode has the `.children` property, it will be used instead of - // `.content`. - const children = []; - ids.sort((a, b) => a.start - b.start); - ids.forEach((id, i) => { - // range is offset by -1 due to the wrapping parens when parsed - const start = id.start - 1; - const end = id.end - 1; - const last = ids[i - 1]; - const leadingText = rawExp.slice(last ? last.end - 1 : 0, start); - if (leadingText.length || id.prefix) { - children.push(leadingText + (id.prefix || ``)); - } - const source = rawExp.slice(start, end); - children.push(createSimpleExpression(id.name, false, { - source, - start: advancePositionWithClone(node.loc.start, source, start), - end: advancePositionWithClone(node.loc.start, source, end) - }, id.isConstant ? 3 /* CAN_STRINGIFY */ : 0 /* NOT_CONSTANT */)); - if (i === ids.length - 1 && end < rawExp.length) { - children.push(rawExp.slice(end)); - } - }); - let ret; - if (children.length) { - ret = createCompoundExpression(children, node.loc); - } - else { - ret = node; - ret.constType = bailConstant - ? 0 /* NOT_CONSTANT */ - : 3 /* CAN_STRINGIFY */; - } - ret.identifiers = Object.keys(knownIds); - return ret; -} -function canPrefix(id) { - // skip whitelisted globals - if (isGloballyWhitelisted(id.name)) { - return false; - } - // special case for webpack compilation - if (id.name === 'require') { - return false; - } - return true; -} -function stringifyExpression(exp) { - if (isString(exp)) { - return exp; - } - else if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - return exp.content; - } - else { - return exp.children - .map(stringifyExpression) - .join(''); - } -} - -const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => { - return processIf(node, dir, context, (ifNode, branch, isRoot) => { - // #1587: We need to dynamically increment the key based on the current - // node's sibling nodes, since chained v-if/else branches are - // rendered at the same depth - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9 /* IF */) { - key += sibling.branches.length; - } - } - // Exit callback. Complete the codegenNode when all children have been - // transformed. - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context); - } - else { - // attach this branch's codegen node to the v-if root. - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context); - } - }; - }); -}); -// target-agnostic transform used for both Client and SSR -function processIf(node, dir, context, processCodegen) { - if (dir.name !== 'else' && - (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc)); - dir.exp = createSimpleExpression(`true`, false, loc); - } - if (context.prefixIdentifiers && dir.exp) { - // dir.exp can only be simple expression because vIf transform is applied - // before expression transform. - dir.exp = processExpression(dir.exp, context); - } - if (dir.name === 'if') { - const branch = createIfBranch(node, dir); - const ifNode = { - type: 9 /* IF */, - loc: node.loc, - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); - } - } - else { - // locate the adjacent v-if - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3 /* COMMENT */) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && - sibling.type === 2 /* TEXT */ && - !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9 /* IF */) { - // Check if v-else was followed by v-else-if - if (dir.name === 'else-if' && - sibling.branches[sibling.branches.length - 1].condition === undefined) { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - // move the node to the if node's branches - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && - // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && - context.parent.type === 1 /* ELEMENT */ && - isBuiltInType(context.parent.tag, 'transition'))) { - branch.children = [...comments, ...branch.children]; - } - // check if user is forcing same key on different branches - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc)); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - // since the branch was removed, it will not be traversed. - // make sure to traverse here. - traverseNode(branch, context); - // call on exit - if (onExit) - onExit(); - // make sure to reset currentNode after traversal to indicate this - // node has been removed. - context.currentNode = null; - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - break; - } - } -} -function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3 /* TEMPLATE */; - return { - type: 10 /* IF_BRANCH */, - loc: node.loc, - condition: dir.name === 'else' ? undefined : dir.exp, - children: isTemplateIf && !findDir(node, 'for') ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; -} -function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - 'true' - ])); - } - else { - return createChildrenCodegenNode(branch, keyIndex, context); - } -} -function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */)); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11 /* FOR */) { - // optimize away nested fragments when child is a ForNode - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } - else { - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (!branch.isTemplateIf && - children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, false, false /* isComponent */, branch.loc); - } - } - else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - // Change createVNode to createBlock. - if (vnodeCall.type === 13 /* VNODE_CALL */) { - makeBlock(vnodeCall, context); - } - // inject branch key - injectProp(vnodeCall, keyProperty, context); - return ret; - } -} -function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; - } - if (a.type === 6 /* ATTRIBUTE */) { - if (a.value.content !== b.value.content) { - return false; - } - } - else { - // directive - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 /* SIMPLE_EXPRESSION */ || - exp.isStatic !== branchExp.isStatic || - exp.content !== branchExp.content) { - return false; - } - } - return true; -} -function getParentCondition(node) { - while (true) { - if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - node = node.alternate; - } - else { - return node; - } - } - else if (node.type === 20 /* JS_CACHE_EXPRESSION */) { - node = node.value; - } - } -} - -const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => { - const { helper, removeHelper } = context; - return processFor(node, dir, context, forNode => { - // create the loop render function expression now, and add the - // iterator on exit after all children have been traversed - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, 'memo'); - const keyProp = findProp(node, `key`); - const keyExp = keyProp && - (keyProp.type === 6 /* ATTRIBUTE */ - ? createSimpleExpression(keyProp.value.content, true) - : keyProp.exp); - const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; - if (isTemplate) { - // #2085 / #5288 process :key and v-memo expressions need to be - // processed on `<template v-for>`. In this case the node is discarded - // and never traversed so its binding expressions won't be processed - // by the normal transforms. - if (memo) { - memo.exp = processExpression(memo.exp, context); - } - if (keyProperty && keyProp.type !== 6 /* ATTRIBUTE */) { - keyProperty.value = processExpression(keyProperty.value, context); - } - } - const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ && - forNode.source.constType > 0 /* NOT_CONSTANT */; - const fragmentFlag = isStableFragment - ? 64 /* STABLE_FRAGMENT */ - : keyProp - ? 128 /* KEYED_FRAGMENT */ - : 256 /* UNKEYED_FRAGMENT */; - forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag + - (` /* ${PatchFlagNames[fragmentFlag]} */` ), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc); - return () => { - // finish the codegen now that all children have been traversed - let childBlock; - const { children } = forNode; - // check <template v-for> key placement - if (isTemplate) { - node.children.some(c => { - if (c.type === 1 /* ELEMENT */) { - const key = findProp(c, 'key'); - if (key) { - context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc)); - return true; - } - } - }); - } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */; - const slotOutlet = isSlotOutlet(node) - ? node - : isTemplate && - node.children.length === 1 && - isSlotOutlet(node.children[0]) - ? node.children[0] // api-extractor somehow fails to infer this - : null; - if (slotOutlet) { - // <slot v-for="..."> or <template v-for="..."><slot/></template> - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - // <template v-for="..." :key="..."><slot/></template> - // we need to inject the key to the renderSlot() call. - // the props for renderSlot is passed as the 3rd argument. - injectProp(childBlock, keyProperty, context); - } - } - else if (needFragmentWrapper) { - // <template v-for="..."> with text or multi-elements - // should generate a fragment block for each loop - childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ + - (` /* ${PatchFlagNames[64 /* STABLE_FRAGMENT */]} */` - ), undefined, undefined, true, undefined, false /* isComponent */); - } - else { - // Normal element v-for. Directly use the child's codegenNode - // but mark it as a block. - childBlock = children[0] - .codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - // switch from block to vnode - removeHelper(OPEN_BLOCK); - removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - // switch from vnode to block - removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ])); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...(keyExp ? [` && _cached.key === `, keyExp] : []), - ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++))); - } - else { - renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */)); - } - }; - }); -}); -// target-agnostic transform used for both Client and SSR -function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc)); - return; - } - const parseResult = parseForExpression( - // can only be simple expression because vFor transform is applied - // before expression transform. - dir.exp, context); - if (!parseResult) { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc)); - return; - } - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11 /* FOR */, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - // bookkeeping - scopes.vFor++; - if (context.prefixIdentifiers) { - // scope management - // inject identifiers to context - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - } - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (context.prefixIdentifiers) { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - } - if (onExit) - onExit(); - }; -} -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -// This regex doesn't cover the case if key or index aliases have destructuring, -// but those do not make sense in the first place, so this works in practice. -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input, context) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) - return; - const [, LHS, RHS] = inMatch; - const result = { - source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: undefined, - key: undefined, - index: undefined - }; - if (context.prefixIdentifiers) { - result.source = processExpression(result.source, context); - } - let valueContent = LHS.trim().replace(stripParensRE, '').trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, '').trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(loc, keyContent, keyOffset); - if (context.prefixIdentifiers) { - result.key = processExpression(result.key, context, true); - } - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key - ? keyOffset + keyContent.length - : trimmedOffset + valueContent.length)); - if (context.prefixIdentifiers) { - result.index = processExpression(result.index, context, true); - } - } - } - } - if (valueContent) { - result.value = createAliasExpression(loc, valueContent, trimmedOffset); - if (context.prefixIdentifiers) { - result.value = processExpression(result.value, context, true); - } - } - return result; -} -function createAliasExpression(range, content, offset) { - return createSimpleExpression(content, false, getInnerRange(range, offset, content.length)); -} -function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); -} -function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) - break; - } - return args - .slice(0, i + 1) - .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false)); -} - -const defaultFallback = createSimpleExpression(`undefined`, false); -// A NodeTransform that: -// 1. Tracks scope identifiers for scoped slots so that they don't get prefixed -// by transformExpression. This is only applied in non-browser builds with -// { prefixIdentifiers: true }. -// 2. Track v-slot depths so that we know a slot is inside another slot. -// Note the exit callback is executed before buildSlots() on the same node, -// so only nested slots see positive numbers. -const trackSlotScopes = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 1 /* COMPONENT */ || - node.tagType === 3 /* TEMPLATE */)) { - // We are only checking non-empty v-slot here - // since we only care about slots that introduce scope variables. - const vSlot = findDir(node, 'slot'); - if (vSlot) { - const slotProps = vSlot.exp; - if (context.prefixIdentifiers) { - slotProps && context.addIdentifiers(slotProps); - } - context.scopes.vSlot++; - return () => { - if (context.prefixIdentifiers) { - slotProps && context.removeIdentifiers(slotProps); - } - context.scopes.vSlot--; - }; - } - } -}; -// A NodeTransform that tracks scope identifiers for scoped slots with v-for. -// This transform is only applied in non-browser builds with { prefixIdentifiers: true } -const trackVForSlotScopes = (node, context) => { - let vFor; - if (isTemplateNode(node) && - node.props.some(isVSlot) && - (vFor = findDir(node, 'for'))) { - const result = (vFor.parseResult = parseForExpression(vFor.exp, context)); - if (result) { - const { value, key, index } = result; - const { addIdentifiers, removeIdentifiers } = context; - value && addIdentifiers(value); - key && addIdentifiers(key); - index && addIdentifiers(index); - return () => { - value && removeIdentifiers(value); - key && removeIdentifiers(key); - index && removeIdentifiers(index); - }; - } - } -}; -const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc); -// Instead of being a DirectiveTransform, v-slot processing is called during -// transformElement to build the slots object for a component. -function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - // If the slot is inside a v-for or another v-slot, force it to be dynamic - // since it likely uses a scope variable. - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - // with `prefixIdentifiers: true`, this can be further optimized to make - // it dynamic only when the slot actually uses the scope variables. - if (!context.ssr && context.prefixIdentifiers) { - hasDynamicSlots = hasScopeRef(node, context.identifiers); - } - // 1. Check for slot with slotProps on component itself. - // <Comp v-slot="{ prop }"/> - const onComponentSlot = findDir(node, 'slot', true); - if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc))); - } - // 2. Iterate through children and check for template slots - // <template v-slot:foo="{ prop }"> - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = new Set(); - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || - !(slotDir = findDir(slotElement, 'slot', true))) { - // not a <template v-slot>, skip. - if (slotElement.type !== 3 /* COMMENT */) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - // already has on-component slot - this is incorrect usage. - context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc)); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir; - // check if name is dynamic. - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } - else { - hasDynamicSlots = true; - } - const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc); - // check if this slot is conditional (v-if/v-for) - let vIf; - let vElse; - let vFor; - if ((vIf = findDir(slotElement, 'if'))) { - hasDynamicSlots = true; - dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)); - } - else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) { - // find adjacent v-if - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3 /* COMMENT */) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, 'if')) { - // remove node - children.splice(i, 1); - i--; - // attach this slot to previous conditional - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp - ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback) - : buildDynamicSlot(slotName, slotFunction); - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc)); - } - } - else if ((vFor = findDir(slotElement, 'for'))) { - hasDynamicSlots = true; - const parseResult = vFor.parseResult || - parseForExpression(vFor.exp, context); - if (parseResult) { - // Render the dynamic slots as an array and add it to the createSlot() - // args. The runtime knows how to handle it appropriately. - dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */) - ])); - } - else { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc)); - } - } - else { - // check duplicate static names - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc)); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === 'default') { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } - } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children) => { - const fn = buildSlotFn(props, children, loc); - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - // implicit default slot (on component) - slotsProperties.push(buildDefaultSlotProperty(undefined, children)); - } - else if (implicitDefaultChildren.length && - // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) { - // implicit default slot (mixed with named slots) - if (hasNamedDefaultSlot) { - context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc)); - } - else { - slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren)); - } - } - } - const slotFlag = hasDynamicSlots - ? 2 /* DYNAMIC */ - : hasForwardedSlots(node.children) - ? 3 /* FORWARDED */ - : 1 /* STABLE */; - let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression(slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), false))), loc); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots - }; -} -function buildDynamicSlot(name, fn) { - return createObjectExpression([ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) - ]); -} -function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - if (child.tagType === 2 /* SLOT */ || - hasForwardedSlots(child.children)) { - return true; - } - break; - case 9 /* IF */: - if (hasForwardedSlots(child.branches)) - return true; - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - if (hasForwardedSlots(child.children)) - return true; - break; - } - } - return false; -} -function isNonWhitespaceContent(node) { - if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */) - return true; - return node.type === 2 /* TEXT */ - ? !!node.content.trim() - : isNonWhitespaceContent(node.content); -} - -// some directive transforms (e.g. v-model) may return a symbol for runtime -// import, which should be used instead of a resolveDirective call. -const directiveImportMap = new WeakMap(); -// generate a JavaScript AST for this element's codegen -const transformElement = (node, context) => { - // perform the work on exit, after all child expressions have been - // processed and merged. - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */))) { - return; - } - const { tag, props } = node; - const isComponent = node.tagType === 1 /* COMPONENT */; - // The goal of the transform is to create a codegenNode implementing the - // VNodeCall interface. - let vnodeTag = isComponent - ? resolveComponentType(node, context) - : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let vnodePatchFlag; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = - // dynamic component may resolve to plain elements - isDynamicComponent || - vnodeTag === TELEPORT || - vnodeTag === SUSPENSE || - (!isComponent && - // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')); - // props - if (props.length > 0) { - const propsBuildResult = buildProps(node, context, undefined, isComponent, isDynamicComponent); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = - directives && directives.length - ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context))) - : undefined; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } - } - // children - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - // Although a built-in component, we compile KeepAlive with raw children - // instead of slot functions so that it can be used inside Transition - // or other Transition-wrapping HOCs. - // To ensure correct updates with block optimizations, we need to: - // 1. Force keep-alive into a block. This avoids its children being - // collected by a parent block. - shouldUseBlock = true; - // 2. Force keep-alive to always be updated, since it uses raw children. - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - if (node.children.length > 1) { - context.onError(createCompilerError(45 /* X_KEEP_ALIVE_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - } - const shouldBuildAsSlots = isComponent && - // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && - // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } - else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - // check for dynamic text children - const hasDynamicTextChild = type === 5 /* INTERPOLATION */ || - type === 8 /* COMPOUND_EXPRESSION */; - if (hasDynamicTextChild && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - patchFlag |= 1 /* TEXT */; - } - // pass directly if the only child is a text node - // (plain / interpolation / expression) - if (hasDynamicTextChild || type === 2 /* TEXT */) { - vnodeChildren = child; - } - else { - vnodeChildren = node.children; - } - } - else { - vnodeChildren = node.children; - } - } - // patchFlag & dynamicPropNames - if (patchFlag !== 0) { - { - if (patchFlag < 0) { - // special flags (negative and mutually exclusive) - vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } - else { - // bitwise flags - const flagNames = Object.keys(PatchFlagNames) - .map(Number) - .filter(n => n > 0 && patchFlag & n) - .map(n => PatchFlagNames[n]) - .join(`, `); - vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } - } - node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc); - }; -}; -function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - // 1. dynamic component - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp(node, 'is'); - if (isProp) { - if (isExplicitDynamic || - (false )) { - const exp = isProp.type === 6 /* ATTRIBUTE */ - ? isProp.value && createSimpleExpression(isProp.value.content, true) - : isProp.exp; - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } - else if (isProp.type === 6 /* ATTRIBUTE */ && - isProp.value.content.startsWith('vue:')) { - // <button is="vue:xxx"> - // if not <component>, only is value that starts with "vue:" will be - // treated as component by the parse phase and reach here, unless it's - // compat mode where all is values are considered components - tag = isProp.value.content.slice(4); - } - } - // 1.5 v-is (TODO: Deprecate) - const isDir = !isExplicitDynamic && findDir(node, 'is'); - if (isDir && isDir.exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - isDir.exp - ]); - } - // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...) - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - // built-ins are simply fallthroughs / have special handling during ssr - // so we don't need to import their runtime equivalents - if (!ssr) - context.helper(builtIn); - return builtIn; - } - // 3. user component (from setup bindings) - // this is skipped in browser build since browser builds do not perform - // binding analysis. - { - const fromSetup = resolveSetupReference(tag, context); - if (fromSetup) { - return fromSetup; - } - const dotIndex = tag.indexOf('.'); - if (dotIndex > 0) { - const ns = resolveSetupReference(tag.slice(0, dotIndex), context); - if (ns) { - return ns + tag.slice(dotIndex); - } - } - } - // 4. Self referencing component (inferred from filename) - if (context.selfName && - capitalize(camelize(tag)) === context.selfName) { - context.helper(RESOLVE_COMPONENT); - // codegen.ts has special check for __self postfix when generating - // component imports, which will pass additional `maybeSelfReference` flag - // to `resolveComponent`. - context.components.add(tag + `__self`); - return toValidAssetId(tag, `component`); - } - // 5. user component (resolve) - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); -} -function resolveSetupReference(name, context) { - const bindings = context.bindingMetadata; - if (!bindings || bindings.__isScriptSetup === false) { - return; - } - const camelName = camelize(name); - const PascalName = capitalize(camelName); - const checkType = (type) => { - if (bindings[name] === type) { - return name; - } - if (bindings[camelName] === type) { - return camelName; - } - if (bindings[PascalName] === type) { - return PascalName; - } - }; - const fromConst = checkType("setup-const" /* SETUP_CONST */) || - checkType("setup-reactive-const" /* SETUP_REACTIVE_CONST */); - if (fromConst) { - return context.inline - ? // in inline mode, const setup bindings (e.g. imports) can be used as-is - fromConst - : `$setup[${JSON.stringify(fromConst)}]`; - } - const fromMaybeRef = checkType("setup-let" /* SETUP_LET */) || - checkType("setup-ref" /* SETUP_REF */) || - checkType("setup-maybe-ref" /* SETUP_MAYBE_REF */); - if (fromMaybeRef) { - return context.inline - ? // setup scope bindings that may be refs need to be unrefed - `${context.helperString(UNREF)}(${fromMaybeRef})` - : `$setup[${JSON.stringify(fromMaybeRef)}]`; - } -} -function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - // patchFlag analysis - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && - (!isComponent || isDynamicComponent) && - // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== 'onclick' && - // omit v-model handlers - name !== 'onUpdate:modelValue' && - // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (value.type === 20 /* JS_CACHE_EXPRESSION */ || - ((value.type === 4 /* SIMPLE_EXPRESSION */ || - value.type === 8 /* COMPOUND_EXPRESSION */) && - getConstantType(value, context) > 0)) { - // skip if the prop is a cached handler or has constant value - return; - } - if (name === 'ref') { - hasRef = true; - } - else if (name === 'class') { - hasClassBinding = true; - } - else if (name === 'style') { - hasStyleBinding = true; - } - else if (name !== 'key' && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - // treat the dynamic class and style binding of the component as dynamic props - if (isComponent && - (name === 'class' || name === 'style') && - !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } - else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - // static attribute - const prop = props[i]; - if (prop.type === 6 /* ATTRIBUTE */) { - const { loc, name, value } = prop; - let isStatic = true; - if (name === 'ref') { - hasRef = true; - if (context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // in inline mode there is no setupState object, so we can't use string - // keys to set the ref. Instead, we need to transform it to pass the - // actual ref instead. - if (value && - context.inline && - context.bindingMetadata[value.content]) { - isStatic = false; - properties.push(createObjectProperty(createSimpleExpression('ref_key', true), createSimpleExpression(value.content, true, value.loc))); - } - } - // skip is on <component>, or is="vue:xxx" - if (name === 'is' && - (isComponentTag(tag) || - (value && value.content.startsWith('vue:')) || - (false ))) { - continue; - } - properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc))); - } - else { - // directives - const { name, arg, exp, loc } = prop; - const isVBind = name === 'bind'; - const isVOn = name === 'on'; - // skip v-slot - it is handled by its dedicated transform. - if (name === 'slot') { - if (!isComponent) { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc)); - } - continue; - } - // skip v-once/v-memo - they are handled by dedicated transforms. - if (name === 'once' || name === 'memo') { - continue; - } - // skip v-is and :is on <component> - if (name === 'is' || - (isVBind && - isStaticArgOf(arg, 'is') && - (isComponentTag(tag) || - (false )))) { - continue; - } - // skip v-on in SSR compilation - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - (isVBind && isStaticArgOf(arg, 'key')) || - // inline before-update hooks need to force block so that it is invoked - // before children - (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // special case for v-bind and v-on with no argument - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - properties = []; - } - if (isVBind) { - mergeArgs.push(exp); - } - else { - // v-on="obj" -> toHandlers(obj) - mergeArgs.push({ - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee: context.helper(TO_HANDLERS), - arguments: [exp] - }); - } - } - else { - context.onError(createCompilerError(isVBind - ? 34 /* X_V_BIND_NO_EXPRESSION */ - : 35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - continue; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - // has built-in directive transform. - const { props, needRuntime } = directiveTransform(prop, node, context); - !ssr && props.forEach(analyzePatchFlag); - properties.push(...props); - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } - else if (!isBuiltInDirective(name)) { - // no built-in transform, this is a user custom directive. - runtimeDirectives.push(prop); - // custom dirs may use beforeUpdate so they need to force blocks - // to ensure before-update gets called before children update - if (hasChildren) { - shouldUseBlock = true; - } - } - } - } - let propsExpression = undefined; - // has v-bind="object" or v-on="object", wrap with mergeProps - if (mergeArgs.length) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - } - if (mergeArgs.length > 1) { - propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc); - } - else { - // single v-bind with nothing else - no need for a mergeProps call - propsExpression = mergeArgs[0]; - } - } - else if (properties.length) { - propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc); - } - // patchFlag analysis - if (hasDynamicKeys) { - patchFlag |= 16 /* FULL_PROPS */; - } - else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2 /* CLASS */; - } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4 /* STYLE */; - } - if (dynamicPropNames.length) { - patchFlag |= 8 /* PROPS */; - } - if (hasHydrationEventBinding) { - patchFlag |= 32 /* HYDRATE_EVENTS */; - } - } - if (!shouldUseBlock && - (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) && - (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512 /* NEED_PATCH */; - } - // pre-normalize props, SSR is skipped for now - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15 /* JS_OBJECT_EXPRESSION */: - // means that there is no v-bind, - // but still need to deal with dynamic key binding - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === 'class') { - classKeyIndex = i; - } - else if (key.content === 'style') { - styleKeyIndex = i; - } - } - else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - // no dynamic key - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]); - } - if (styleProp && - // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || - (styleProp.value.type === 4 /* SIMPLE_EXPRESSION */ && - styleProp.value.content.trim()[0] === `[`) || - // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) { - styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]); - } - } - else { - // dynamic key binding, wrap with `normalizeProps` - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]); - } - break; - case 14 /* JS_CALL_EXPRESSION */: - // mergeProps call, do nothing - break; - default: - // single v-bind - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ]); - break; - } - } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; -} -// Dedupe props in an object literal. -// Literal duplicated attributes would have been warned during the parse phase, -// however, it's possible to encounter duplicated `onXXX` handlers with different -// modifiers. We also need to merge static and dynamic class / style attributes. -// - onXXX handlers / style: merge into array -// - class: merge into single expression with concatenation -function dedupeProperties(properties) { - const knownProps = new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - // dynamic keys are always allowed - if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === 'style' || name === 'class' || isOn(name)) { - mergeAsArray(existing, prop); - } - // unexpected duplicate, should have emitted error during parse - } - else { - knownProps.set(name, prop); - deduped.push(prop); - } - } - return deduped; -} -function mergeAsArray(existing, incoming) { - if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.value.elements.push(incoming.value); - } - else { - existing.value = createArrayExpression([existing.value, incoming.value], existing.loc); - } -} -function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - // built-in directive with runtime - dirArgs.push(context.helperString(runtime)); - } - else { - // user directive. - // see if we have directives exposed via <script setup> - const fromSetup = resolveSetupReference('v-' + dir.name, context); - if (fromSetup) { - dirArgs.push(fromSetup); - } - else { - // inject statement for resolving directive - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } - } - const { loc } = dir; - if (dir.exp) - dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); - } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc)); - } - return createArrayExpression(dirArgs, dir.loc); -} -function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) - propsNamesString += ', '; - } - return propsNamesString + `]`; -} -function isComponentTag(tag) { - return tag === 'component' || tag === 'Component'; -} - -const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - '{}', - 'undefined', - 'true' - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); // remove unused arguments - node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc); - } -}; -function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = undefined; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.value) { - if (p.name === 'name') { - slotName = JSON.stringify(p.value.content); - } - else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } - } - else { - if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) { - if (p.exp) - slotName = p.exp; - } - else { - if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } - } - } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps(node, context, nonNameProps, false, false); - slotProps = props; - if (directives.length) { - context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc)); - } - } - return { - slotName, - slotProps - }; -} - -const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; -const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - let eventName; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - let rawName = arg.content; - // TODO deprecate @vnodeXXX usage - if (rawName.startsWith('vue:')) { - rawName = `vnode-${rawName.slice(4)}`; - } - // for all event listeners, auto convert it to camelCase. See issue #2249 - eventName = createSimpleExpression(toHandlerKey(camelize(rawName)), true, arg.loc); - } - else { - // #2388 - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } - } - else { - // already a compound expression. - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); - } - // handler processing - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = undefined; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp.content, context); - const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); - const hasMultipleStatements = exp.content.includes(`;`); - // process the expression since it's been skipped - if (context.prefixIdentifiers) { - isInlineStatement && context.addIdentifiers(`$event`); - exp = dir.exp = processExpression(exp, context, false, hasMultipleStatements); - isInlineStatement && context.removeIdentifiers(`$event`); - // with scope analysis, the function is hoistable if it has no reference - // to scope variables. - shouldCache = - context.cacheHandlers && - // unnecessary to cache inside v-once - !context.inVOnce && - // runtime constants don't need to be cached - // (this is analyzed by compileScript in SFC <script setup>) - !(exp.type === 4 /* SIMPLE_EXPRESSION */ && exp.constType > 0) && - // #1541 bail if this is a member exp handler passed to a component - - // we need to use the original function to preserve arity, - // e.g. <transition> relies on checking cb.length to determine - // transition end handling. Inline function is ok since its arity - // is preserved even when cached. - !(isMemberExp && node.tagType === 1 /* COMPONENT */) && - // bail if the function references closure variables (v-for, v-slot) - // it must be passed fresh to avoid stale values. - !hasScopeRef(exp, context.identifiers); - // If the expression is optimizable and is a member expression pointing - // to a function, turn it into invocation (and wrap in an arrow function - // below) so that it always accesses the latest value when called - thus - // avoiding the need to be patched. - if (shouldCache && isMemberExp) { - if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - exp.content = `${exp.content} && ${exp.content}(...args)`; - } - else { - exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`]; - } - } - } - if (isInlineStatement || (shouldCache && isMemberExp)) { - // wrap inline statement in a function expression - exp = createCompoundExpression([ - `${isInlineStatement - ? context.isTS - ? `($event: any)` - : `$event` - : `${context.isTS ? `\n//@ts-ignore\n` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc)) - ] - }; - // apply extended compiler augmentor - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - // cache handlers so that it's always the same handler being passed down. - // this avoids unnecessary re-renders when users use inline handlers on - // components. - ret.props[0].value = context.cache(ret.props[0].value); - } - // mark the key as handler for props normalization check - ret.props.forEach(p => (p.key.isHandlerKey = true)); - return ret; -}; - -// v-bind without arg is handled directly in ./transformElements.ts due to it affecting -// codegen for the entire props object. This transform here is only for v-bind -// *with* args. -const transformBind = (dir, _node, context) => { - const { exp, modifiers, loc } = dir; - const arg = dir.arg; - if (arg.type !== 4 /* SIMPLE_EXPRESSION */) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); - } - else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; - } - // .sync is replaced by v-model:arg - if (modifiers.includes('camel')) { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } - else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } - else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.includes('prop')) { - injectPrefix(arg, '.'); - } - if (modifiers.includes('attr')) { - injectPrefix(arg, '^'); - } - } - if (!exp || - (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) { - context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc)); - return { - props: [createObjectProperty(arg, createSimpleExpression('', true, loc))] - }; - } - return { - props: [createObjectProperty(arg, exp)] - }; -}; -const injectPrefix = (arg, prefix) => { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } - else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } - else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); - } -}; - -// Merge adjacent text nodes and expressions into a single expression -// e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child. -const transformText = (node, context) => { - if (node.type === 0 /* ROOT */ || - node.type === 1 /* ELEMENT */ || - node.type === 11 /* FOR */ || - node.type === 10 /* IF_BRANCH */) { - // perform the transform on node exit so that all expressions have already - // been processed. - return () => { - const children = node.children; - let currentContainer = undefined; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression([child], child.loc); - } - // merge adjacent text node into current - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } - else { - currentContainer = undefined; - break; - } - } - } - } - if (!hasText || - // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - (children.length === 1 && - (node.type === 0 /* ROOT */ || - (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find(p => p.type === 7 /* DIRECTIVE */ && - !context.directiveTransforms[p.name]) && - // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(false ))))) { - return; - } - // pre-convert text nodes into createTextVNode(text) calls to avoid - // runtime normalization. - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) { - const callArgs = []; - // createTextVNode defaults to single whitespace, so if it is a - // single space the code could be an empty call to save bytes. - if (child.type !== 2 /* TEXT */ || child.content !== ' ') { - callArgs.push(child); - } - // mark dynamic text with flag so it gets patched inside a block - if (!context.ssr && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - callArgs.push(1 /* TEXT */ + - (` /* ${PatchFlagNames[1 /* TEXT */]} */` )); - } - children[i] = { - type: 12 /* TEXT_CALL */, - content: child, - loc: child.loc, - codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs) - }; - } - } - }; - } -}; - -const seen = new WeakSet(); -const transformOnce = (node, context) => { - if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) { - if (seen.has(node) || context.inVOnce) { - return; - } - seen.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */); - } - }; - } -}; - -const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc)); - return createTransformProps(); - } - const rawExp = exp.loc.source; - const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp; - // im SFC <script setup> inline mode, the exp may have been transformed into - // _unref(exp) - const bindingType = context.bindingMetadata[rawExp]; - const maybeRef = context.inline && - bindingType && - bindingType !== "setup-const" /* SETUP_CONST */; - if (!expString.trim() || - (!isMemberExpression(expString, context) && !maybeRef)) { - context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc)); - return createTransformProps(); - } - if (context.prefixIdentifiers && - isSimpleIdentifier(expString) && - context.identifiers[expString]) { - context.onError(createCompilerError(43 /* X_V_MODEL_ON_SCOPE_VARIABLE */, exp.loc)); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression('modelValue', true); - const eventName = arg - ? isStaticExp(arg) - ? `onUpdate:${arg.content}` - : createCompoundExpression(['"onUpdate:" + ', arg]) - : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - if (maybeRef) { - if (bindingType === "setup-ref" /* SETUP_REF */) { - // v-model used on known ref. - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event)` - ]); - } - else { - // v-model used on a potentially ref binding in <script setup> inline mode. - // the assignment needs to check whether the binding is actually a ref. - const altAssignment = bindingType === "setup-let" /* SETUP_LET */ ? `${rawExp} = $event` : `null`; - assignmentExp = createCompoundExpression([ - `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`, - createSimpleExpression(rawExp, false, exp.loc), - `).value = $event : ${altAssignment})` - ]); - } - } - else { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - // cache v-model handler if applicable (when it doesn't refer any scope vars) - if (context.prefixIdentifiers && - !context.inVOnce && - context.cacheHandlers && - !hasScopeRef(exp, context.identifiers)) { - props[1].value = context.cache(props[1].value); - } - // modelModifiers: { foo: true, "bar-baz": true } - if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) { - const modifiers = dir.modifiers - .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`) - .join(`, `); - const modifiersKey = arg - ? isStaticExp(arg) - ? `${arg.content}Modifiers` - : createCompoundExpression([arg, ' + "Modifiers"']) - : `modelModifiers`; - props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */))); - } - return createTransformProps(props); -}; -function createTransformProps(props = []) { - return { props }; -} - -const seen$1 = new WeakSet(); -const transformMemo = (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const dir = findDir(node, 'memo'); - if (!dir || seen$1.has(node)) { - return; - } - seen$1.add(node); - return () => { - const codegenNode = node.codegenNode || - context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) { - // non-component sub tree should be turned into a block - if (node.tagType !== 1 /* COMPONENT */) { - makeBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(undefined, codegenNode), - `_cache`, - String(context.cached++) - ]); - } - }; - } -}; - -function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...([]), - ...(prefixIdentifiers - ? [ - // order is important - trackVForSlotScopes, - transformExpression - ] - : []), - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; -} -// we name it `baseCompile` so that higher order compilers like -// @vue/compiler-dom can export `compile` while re-exporting everything else. -function baseCompile(template, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === 'module'; - const prefixIdentifiers = (options.prefixIdentifiers === true || isModuleMode); - if (!prefixIdentifiers && options.cacheHandlers) { - onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */)); - } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */)); - } - const ast = isString(template) ? baseParse(template, options) : template; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers); - if (options.isTS) { - const { expressionPlugins } = options; - if (!expressionPlugins || !expressionPlugins.includes('typescript')) { - options.expressionPlugins = [...(expressionPlugins || []), 'typescript']; - } - } - transform(ast, extend({}, options, { - prefixIdentifiers, - nodeTransforms: [ - ...nodeTransforms, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: extend({}, directiveTransforms, options.directiveTransforms || {} // user transforms - ) - })); - return generate(ast, extend({}, options, { - prefixIdentifiers - })); -} - -const noopDirectiveTransform = () => ({ props: [] }); - -const V_MODEL_RADIO = Symbol(`vModelRadio` ); -const V_MODEL_CHECKBOX = Symbol(`vModelCheckbox` ); -const V_MODEL_TEXT = Symbol(`vModelText` ); -const V_MODEL_SELECT = Symbol(`vModelSelect` ); -const V_MODEL_DYNAMIC = Symbol(`vModelDynamic` ); -const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` ); -const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` ); -const V_SHOW = Symbol(`vShow` ); -const TRANSITION = Symbol(`Transition` ); -const TRANSITION_GROUP = Symbol(`TransitionGroup` ); -registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` -}); - -var namedCharacterReferences = { - GT: ">", - gt: ">", - LT: "<", - lt: "<", - "ac;": "∾", - "af;": "⁡", - AMP: "&", - amp: "&", - "ap;": "≈", - "DD;": "ⅅ", - "dd;": "ⅆ", - deg: "°", - "ee;": "ⅇ", - "eg;": "⪚", - "el;": "⪙", - ETH: "Ð", - eth: "ð", - "gE;": "≧", - "ge;": "≥", - "Gg;": "⋙", - "gg;": "≫", - "gl;": "≷", - "GT;": ">", - "Gt;": "≫", - "gt;": ">", - "ic;": "⁣", - "ii;": "ⅈ", - "Im;": "ℑ", - "in;": "∈", - "it;": "⁢", - "lE;": "≦", - "le;": "≤", - "lg;": "≶", - "Ll;": "⋘", - "ll;": "≪", - "LT;": "<", - "Lt;": "≪", - "lt;": "<", - "mp;": "∓", - "Mu;": "Μ", - "mu;": "μ", - "ne;": "≠", - "ni;": "∋", - not: "¬", - "Nu;": "Ν", - "nu;": "ν", - "Or;": "⩔", - "or;": "∨", - "oS;": "Ⓢ", - "Pi;": "Π", - "pi;": "π", - "pm;": "±", - "Pr;": "⪻", - "pr;": "≺", - "Re;": "ℜ", - REG: "®", - reg: "®", - "rx;": "℞", - "Sc;": "⪼", - "sc;": "≻", - shy: "­", - uml: "¨", - "wp;": "℘", - "wr;": "≀", - "Xi;": "Ξ", - "xi;": "ξ", - yen: "¥", - "acd;": "∿", - "acE;": "∾̳", - "Acy;": "А", - "acy;": "а", - "Afr;": "𝔄", - "afr;": "𝔞", - "AMP;": "&", - "amp;": "&", - "And;": "⩓", - "and;": "∧", - "ang;": "∠", - "apE;": "⩰", - "ape;": "≊", - "ast;": "*", - Auml: "Ä", - auml: "ä", - "Bcy;": "Б", - "bcy;": "б", - "Bfr;": "𝔅", - "bfr;": "𝔟", - "bne;": "=⃥", - "bot;": "⊥", - "Cap;": "⋒", - "cap;": "∩", - cent: "¢", - "Cfr;": "ℭ", - "cfr;": "𝔠", - "Chi;": "Χ", - "chi;": "χ", - "cir;": "○", - COPY: "©", - copy: "©", - "Cup;": "⋓", - "cup;": "∪", - "Dcy;": "Д", - "dcy;": "д", - "deg;": "°", - "Del;": "∇", - "Dfr;": "𝔇", - "dfr;": "𝔡", - "die;": "¨", - "div;": "÷", - "Dot;": "¨", - "dot;": "˙", - "Ecy;": "Э", - "ecy;": "э", - "Efr;": "𝔈", - "efr;": "𝔢", - "egs;": "⪖", - "ell;": "ℓ", - "els;": "⪕", - "ENG;": "Ŋ", - "eng;": "ŋ", - "Eta;": "Η", - "eta;": "η", - "ETH;": "Ð", - "eth;": "ð", - Euml: "Ë", - euml: "ë", - "Fcy;": "Ф", - "fcy;": "ф", - "Ffr;": "𝔉", - "ffr;": "𝔣", - "gap;": "⪆", - "Gcy;": "Г", - "gcy;": "г", - "gEl;": "⪌", - "gel;": "⋛", - "geq;": "≥", - "ges;": "⩾", - "Gfr;": "𝔊", - "gfr;": "𝔤", - "ggg;": "⋙", - "gla;": "⪥", - "glE;": "⪒", - "glj;": "⪤", - "gnE;": "≩", - "gne;": "⪈", - "Hat;": "^", - "Hfr;": "ℌ", - "hfr;": "𝔥", - "Icy;": "И", - "icy;": "и", - "iff;": "⇔", - "Ifr;": "ℑ", - "ifr;": "𝔦", - "Int;": "∬", - "int;": "∫", - Iuml: "Ï", - iuml: "ï", - "Jcy;": "Й", - "jcy;": "й", - "Jfr;": "𝔍", - "jfr;": "𝔧", - "Kcy;": "К", - "kcy;": "к", - "Kfr;": "𝔎", - "kfr;": "𝔨", - "lap;": "⪅", - "lat;": "⪫", - "Lcy;": "Л", - "lcy;": "л", - "lEg;": "⪋", - "leg;": "⋚", - "leq;": "≤", - "les;": "⩽", - "Lfr;": "𝔏", - "lfr;": "𝔩", - "lgE;": "⪑", - "lnE;": "≨", - "lne;": "⪇", - "loz;": "◊", - "lrm;": "‎", - "Lsh;": "↰", - "lsh;": "↰", - macr: "¯", - "Map;": "⤅", - "map;": "↦", - "Mcy;": "М", - "mcy;": "м", - "Mfr;": "𝔐", - "mfr;": "𝔪", - "mho;": "℧", - "mid;": "∣", - "nap;": "≉", - nbsp: " ", - "Ncy;": "Н", - "ncy;": "н", - "Nfr;": "𝔑", - "nfr;": "𝔫", - "ngE;": "≧̸", - "nge;": "≱", - "nGg;": "⋙̸", - "nGt;": "≫⃒", - "ngt;": "≯", - "nis;": "⋼", - "niv;": "∋", - "nlE;": "≦̸", - "nle;": "≰", - "nLl;": "⋘̸", - "nLt;": "≪⃒", - "nlt;": "≮", - "Not;": "⫬", - "not;": "¬", - "npr;": "⊀", - "nsc;": "⊁", - "num;": "#", - "Ocy;": "О", - "ocy;": "о", - "Ofr;": "𝔒", - "ofr;": "𝔬", - "ogt;": "⧁", - "ohm;": "Ω", - "olt;": "⧀", - "ord;": "⩝", - ordf: "ª", - ordm: "º", - "orv;": "⩛", - Ouml: "Ö", - ouml: "ö", - "par;": "∥", - para: "¶", - "Pcy;": "П", - "pcy;": "п", - "Pfr;": "𝔓", - "pfr;": "𝔭", - "Phi;": "Φ", - "phi;": "φ", - "piv;": "ϖ", - "prE;": "⪳", - "pre;": "⪯", - "Psi;": "Ψ", - "psi;": "ψ", - "Qfr;": "𝔔", - "qfr;": "𝔮", - QUOT: "\"", - quot: "\"", - "Rcy;": "Р", - "rcy;": "р", - "REG;": "®", - "reg;": "®", - "Rfr;": "ℜ", - "rfr;": "𝔯", - "Rho;": "Ρ", - "rho;": "ρ", - "rlm;": "‏", - "Rsh;": "↱", - "rsh;": "↱", - "scE;": "⪴", - "sce;": "⪰", - "Scy;": "С", - "scy;": "с", - sect: "§", - "Sfr;": "𝔖", - "sfr;": "𝔰", - "shy;": "­", - "sim;": "∼", - "smt;": "⪪", - "sol;": "/", - "squ;": "□", - "Sub;": "⋐", - "sub;": "⊂", - "Sum;": "∑", - "sum;": "∑", - "Sup;": "⋑", - "sup;": "⊃", - sup1: "¹", - sup2: "²", - sup3: "³", - "Tab;": "\t", - "Tau;": "Τ", - "tau;": "τ", - "Tcy;": "Т", - "tcy;": "т", - "Tfr;": "𝔗", - "tfr;": "𝔱", - "top;": "⊤", - "Ucy;": "У", - "ucy;": "у", - "Ufr;": "𝔘", - "ufr;": "𝔲", - "uml;": "¨", - Uuml: "Ü", - uuml: "ü", - "Vcy;": "В", - "vcy;": "в", - "Vee;": "⋁", - "vee;": "∨", - "Vfr;": "𝔙", - "vfr;": "𝔳", - "Wfr;": "𝔚", - "wfr;": "𝔴", - "Xfr;": "𝔛", - "xfr;": "𝔵", - "Ycy;": "Ы", - "ycy;": "ы", - "yen;": "¥", - "Yfr;": "𝔜", - "yfr;": "𝔶", - yuml: "ÿ", - "Zcy;": "З", - "zcy;": "з", - "Zfr;": "ℨ", - "zfr;": "𝔷", - "zwj;": "‍", - Acirc: "Â", - acirc: "â", - acute: "´", - AElig: "Æ", - aelig: "æ", - "andd;": "⩜", - "andv;": "⩚", - "ange;": "⦤", - "Aopf;": "𝔸", - "aopf;": "𝕒", - "apid;": "≋", - "apos;": "'", - Aring: "Å", - aring: "å", - "Ascr;": "𝒜", - "ascr;": "𝒶", - "Auml;": "Ä", - "auml;": "ä", - "Barv;": "⫧", - "bbrk;": "⎵", - "Beta;": "Β", - "beta;": "β", - "beth;": "ℶ", - "bNot;": "⫭", - "bnot;": "⌐", - "Bopf;": "𝔹", - "bopf;": "𝕓", - "boxH;": "═", - "boxh;": "─", - "boxV;": "║", - "boxv;": "│", - "Bscr;": "ℬ", - "bscr;": "𝒷", - "bsim;": "∽", - "bsol;": "\\", - "bull;": "•", - "bump;": "≎", - "caps;": "∩︀", - "Cdot;": "Ċ", - "cdot;": "ċ", - cedil: "¸", - "cent;": "¢", - "CHcy;": "Ч", - "chcy;": "ч", - "circ;": "ˆ", - "cirE;": "⧃", - "cire;": "≗", - "comp;": "∁", - "cong;": "≅", - "Copf;": "ℂ", - "copf;": "𝕔", - "COPY;": "©", - "copy;": "©", - "Cscr;": "𝒞", - "cscr;": "𝒸", - "csub;": "⫏", - "csup;": "⫐", - "cups;": "∪︀", - "Darr;": "↡", - "dArr;": "⇓", - "darr;": "↓", - "dash;": "‐", - "dHar;": "⥥", - "diam;": "⋄", - "DJcy;": "Ђ", - "djcy;": "ђ", - "Dopf;": "𝔻", - "dopf;": "𝕕", - "Dscr;": "𝒟", - "dscr;": "𝒹", - "DScy;": "Ѕ", - "dscy;": "ѕ", - "dsol;": "⧶", - "dtri;": "▿", - "DZcy;": "Џ", - "dzcy;": "џ", - "ecir;": "≖", - Ecirc: "Ê", - ecirc: "ê", - "Edot;": "Ė", - "eDot;": "≑", - "edot;": "ė", - "emsp;": " ", - "ensp;": " ", - "Eopf;": "𝔼", - "eopf;": "𝕖", - "epar;": "⋕", - "epsi;": "ε", - "Escr;": "ℰ", - "escr;": "ℯ", - "Esim;": "⩳", - "esim;": "≂", - "Euml;": "Ë", - "euml;": "ë", - "euro;": "€", - "excl;": "!", - "flat;": "♭", - "fnof;": "ƒ", - "Fopf;": "𝔽", - "fopf;": "𝕗", - "fork;": "⋔", - "Fscr;": "ℱ", - "fscr;": "𝒻", - "Gdot;": "Ġ", - "gdot;": "ġ", - "geqq;": "≧", - "gesl;": "⋛︀", - "GJcy;": "Ѓ", - "gjcy;": "ѓ", - "gnap;": "⪊", - "gneq;": "⪈", - "Gopf;": "𝔾", - "gopf;": "𝕘", - "Gscr;": "𝒢", - "gscr;": "ℊ", - "gsim;": "≳", - "gtcc;": "⪧", - "gvnE;": "≩︀", - "half;": "½", - "hArr;": "⇔", - "harr;": "↔", - "hbar;": "ℏ", - "Hopf;": "ℍ", - "hopf;": "𝕙", - "Hscr;": "ℋ", - "hscr;": "𝒽", - Icirc: "Î", - icirc: "î", - "Idot;": "İ", - "IEcy;": "Е", - "iecy;": "е", - iexcl: "¡", - "imof;": "⊷", - "IOcy;": "Ё", - "iocy;": "ё", - "Iopf;": "𝕀", - "iopf;": "𝕚", - "Iota;": "Ι", - "iota;": "ι", - "Iscr;": "ℐ", - "iscr;": "𝒾", - "isin;": "∈", - "Iuml;": "Ï", - "iuml;": "ï", - "Jopf;": "𝕁", - "jopf;": "𝕛", - "Jscr;": "𝒥", - "jscr;": "𝒿", - "KHcy;": "Х", - "khcy;": "х", - "KJcy;": "Ќ", - "kjcy;": "ќ", - "Kopf;": "𝕂", - "kopf;": "𝕜", - "Kscr;": "𝒦", - "kscr;": "𝓀", - "Lang;": "⟪", - "lang;": "⟨", - laquo: "«", - "Larr;": "↞", - "lArr;": "⇐", - "larr;": "←", - "late;": "⪭", - "lcub;": "{", - "ldca;": "⤶", - "ldsh;": "↲", - "leqq;": "≦", - "lesg;": "⋚︀", - "lHar;": "⥢", - "LJcy;": "Љ", - "ljcy;": "љ", - "lnap;": "⪉", - "lneq;": "⪇", - "Lopf;": "𝕃", - "lopf;": "𝕝", - "lozf;": "⧫", - "lpar;": "(", - "Lscr;": "ℒ", - "lscr;": "𝓁", - "lsim;": "≲", - "lsqb;": "[", - "ltcc;": "⪦", - "ltri;": "◃", - "lvnE;": "≨︀", - "macr;": "¯", - "male;": "♂", - "malt;": "✠", - micro: "µ", - "mlcp;": "⫛", - "mldr;": "…", - "Mopf;": "𝕄", - "mopf;": "𝕞", - "Mscr;": "ℳ", - "mscr;": "𝓂", - "nang;": "∠⃒", - "napE;": "⩰̸", - "nbsp;": " ", - "ncap;": "⩃", - "ncup;": "⩂", - "ngeq;": "≱", - "nges;": "⩾̸", - "ngtr;": "≯", - "nGtv;": "≫̸", - "nisd;": "⋺", - "NJcy;": "Њ", - "njcy;": "њ", - "nldr;": "‥", - "nleq;": "≰", - "nles;": "⩽̸", - "nLtv;": "≪̸", - "nmid;": "∤", - "Nopf;": "ℕ", - "nopf;": "𝕟", - "npar;": "∦", - "npre;": "⪯̸", - "nsce;": "⪰̸", - "Nscr;": "𝒩", - "nscr;": "𝓃", - "nsim;": "≁", - "nsub;": "⊄", - "nsup;": "⊅", - "ntgl;": "≹", - "ntlg;": "≸", - "nvap;": "≍⃒", - "nvge;": "≥⃒", - "nvgt;": ">⃒", - "nvle;": "≤⃒", - "nvlt;": "<⃒", - "oast;": "⊛", - "ocir;": "⊚", - Ocirc: "Ô", - ocirc: "ô", - "odiv;": "⨸", - "odot;": "⊙", - "ogon;": "˛", - "oint;": "∮", - "omid;": "⦶", - "Oopf;": "𝕆", - "oopf;": "𝕠", - "opar;": "⦷", - "ordf;": "ª", - "ordm;": "º", - "oror;": "⩖", - "Oscr;": "𝒪", - "oscr;": "ℴ", - "osol;": "⊘", - "Ouml;": "Ö", - "ouml;": "ö", - "para;": "¶", - "part;": "∂", - "perp;": "⊥", - "phiv;": "ϕ", - "plus;": "+", - "Popf;": "ℙ", - "popf;": "𝕡", - pound: "£", - "prap;": "⪷", - "prec;": "≺", - "prnE;": "⪵", - "prod;": "∏", - "prop;": "∝", - "Pscr;": "𝒫", - "pscr;": "𝓅", - "qint;": "⨌", - "Qopf;": "ℚ", - "qopf;": "𝕢", - "Qscr;": "𝒬", - "qscr;": "𝓆", - "QUOT;": "\"", - "quot;": "\"", - "race;": "∽̱", - "Rang;": "⟫", - "rang;": "⟩", - raquo: "»", - "Rarr;": "↠", - "rArr;": "⇒", - "rarr;": "→", - "rcub;": "}", - "rdca;": "⤷", - "rdsh;": "↳", - "real;": "ℜ", - "rect;": "▭", - "rHar;": "⥤", - "rhov;": "ϱ", - "ring;": "˚", - "Ropf;": "ℝ", - "ropf;": "𝕣", - "rpar;": ")", - "Rscr;": "ℛ", - "rscr;": "𝓇", - "rsqb;": "]", - "rtri;": "▹", - "scap;": "⪸", - "scnE;": "⪶", - "sdot;": "⋅", - "sect;": "§", - "semi;": ";", - "sext;": "✶", - "SHcy;": "Ш", - "shcy;": "ш", - "sime;": "≃", - "simg;": "⪞", - "siml;": "⪝", - "smid;": "∣", - "smte;": "⪬", - "solb;": "⧄", - "Sopf;": "𝕊", - "sopf;": "𝕤", - "spar;": "∥", - "Sqrt;": "√", - "squf;": "▪", - "Sscr;": "𝒮", - "sscr;": "𝓈", - "Star;": "⋆", - "star;": "☆", - "subE;": "⫅", - "sube;": "⊆", - "succ;": "≻", - "sung;": "♪", - "sup1;": "¹", - "sup2;": "²", - "sup3;": "³", - "supE;": "⫆", - "supe;": "⊇", - szlig: "ß", - "tbrk;": "⎴", - "tdot;": "⃛", - THORN: "Þ", - thorn: "þ", - times: "×", - "tint;": "∭", - "toea;": "⤨", - "Topf;": "𝕋", - "topf;": "𝕥", - "tosa;": "⤩", - "trie;": "≜", - "Tscr;": "𝒯", - "tscr;": "𝓉", - "TScy;": "Ц", - "tscy;": "ц", - "Uarr;": "↟", - "uArr;": "⇑", - "uarr;": "↑", - Ucirc: "Û", - ucirc: "û", - "uHar;": "⥣", - "Uopf;": "𝕌", - "uopf;": "𝕦", - "Upsi;": "ϒ", - "upsi;": "υ", - "Uscr;": "𝒰", - "uscr;": "𝓊", - "utri;": "▵", - "Uuml;": "Ü", - "uuml;": "ü", - "vArr;": "⇕", - "varr;": "↕", - "Vbar;": "⫫", - "vBar;": "⫨", - "Vert;": "‖", - "vert;": "|", - "Vopf;": "𝕍", - "vopf;": "𝕧", - "Vscr;": "𝒱", - "vscr;": "𝓋", - "Wopf;": "𝕎", - "wopf;": "𝕨", - "Wscr;": "𝒲", - "wscr;": "𝓌", - "xcap;": "⋂", - "xcup;": "⋃", - "xmap;": "⟼", - "xnis;": "⋻", - "Xopf;": "𝕏", - "xopf;": "𝕩", - "Xscr;": "𝒳", - "xscr;": "𝓍", - "xvee;": "⋁", - "YAcy;": "Я", - "yacy;": "я", - "YIcy;": "Ї", - "yicy;": "ї", - "Yopf;": "𝕐", - "yopf;": "𝕪", - "Yscr;": "𝒴", - "yscr;": "𝓎", - "YUcy;": "Ю", - "yucy;": "ю", - "Yuml;": "Ÿ", - "yuml;": "ÿ", - "Zdot;": "Ż", - "zdot;": "ż", - "Zeta;": "Ζ", - "zeta;": "ζ", - "ZHcy;": "Ж", - "zhcy;": "ж", - "Zopf;": "ℤ", - "zopf;": "𝕫", - "Zscr;": "𝒵", - "zscr;": "𝓏", - "zwnj;": "‌", - Aacute: "Á", - aacute: "á", - "Acirc;": "Â", - "acirc;": "â", - "acute;": "´", - "AElig;": "Æ", - "aelig;": "æ", - Agrave: "À", - agrave: "à", - "aleph;": "ℵ", - "Alpha;": "Α", - "alpha;": "α", - "Amacr;": "Ā", - "amacr;": "ā", - "amalg;": "⨿", - "angle;": "∠", - "angrt;": "∟", - "angst;": "Å", - "Aogon;": "Ą", - "aogon;": "ą", - "Aring;": "Å", - "aring;": "å", - "asymp;": "≈", - Atilde: "Ã", - atilde: "ã", - "awint;": "⨑", - "bcong;": "≌", - "bdquo;": "„", - "bepsi;": "϶", - "blank;": "␣", - "blk12;": "▒", - "blk14;": "░", - "blk34;": "▓", - "block;": "█", - "boxDL;": "╗", - "boxDl;": "╖", - "boxdL;": "╕", - "boxdl;": "┐", - "boxDR;": "╔", - "boxDr;": "╓", - "boxdR;": "╒", - "boxdr;": "┌", - "boxHD;": "╦", - "boxHd;": "╤", - "boxhD;": "╥", - "boxhd;": "┬", - "boxHU;": "╩", - "boxHu;": "╧", - "boxhU;": "╨", - "boxhu;": "┴", - "boxUL;": "╝", - "boxUl;": "╜", - "boxuL;": "╛", - "boxul;": "┘", - "boxUR;": "╚", - "boxUr;": "╙", - "boxuR;": "╘", - "boxur;": "└", - "boxVH;": "╬", - "boxVh;": "╫", - "boxvH;": "╪", - "boxvh;": "┼", - "boxVL;": "╣", - "boxVl;": "╢", - "boxvL;": "╡", - "boxvl;": "┤", - "boxVR;": "╠", - "boxVr;": "╟", - "boxvR;": "╞", - "boxvr;": "├", - "Breve;": "˘", - "breve;": "˘", - brvbar: "¦", - "bsemi;": "⁏", - "bsime;": "⋍", - "bsolb;": "⧅", - "bumpE;": "⪮", - "bumpe;": "≏", - "caret;": "⁁", - "caron;": "ˇ", - "ccaps;": "⩍", - Ccedil: "Ç", - ccedil: "ç", - "Ccirc;": "Ĉ", - "ccirc;": "ĉ", - "ccups;": "⩌", - "cedil;": "¸", - "check;": "✓", - "clubs;": "♣", - "Colon;": "∷", - "colon;": ":", - "comma;": ",", - "crarr;": "↵", - "Cross;": "⨯", - "cross;": "✗", - "csube;": "⫑", - "csupe;": "⫒", - "ctdot;": "⋯", - "cuepr;": "⋞", - "cuesc;": "⋟", - "cupor;": "⩅", - curren: "¤", - "cuvee;": "⋎", - "cuwed;": "⋏", - "cwint;": "∱", - "Dashv;": "⫤", - "dashv;": "⊣", - "dblac;": "˝", - "ddarr;": "⇊", - "Delta;": "Δ", - "delta;": "δ", - "dharl;": "⇃", - "dharr;": "⇂", - "diams;": "♦", - "disin;": "⋲", - divide: "÷", - "doteq;": "≐", - "dtdot;": "⋱", - "dtrif;": "▾", - "duarr;": "⇵", - "duhar;": "⥯", - Eacute: "É", - eacute: "é", - "Ecirc;": "Ê", - "ecirc;": "ê", - "eDDot;": "⩷", - "efDot;": "≒", - Egrave: "È", - egrave: "è", - "Emacr;": "Ē", - "emacr;": "ē", - "empty;": "∅", - "Eogon;": "Ę", - "eogon;": "ę", - "eplus;": "⩱", - "epsiv;": "ϵ", - "eqsim;": "≂", - "Equal;": "⩵", - "equiv;": "≡", - "erarr;": "⥱", - "erDot;": "≓", - "esdot;": "≐", - "exist;": "∃", - "fflig;": "ff", - "filig;": "fi", - "fjlig;": "fj", - "fllig;": "fl", - "fltns;": "▱", - "forkv;": "⫙", - frac12: "½", - frac14: "¼", - frac34: "¾", - "frasl;": "⁄", - "frown;": "⌢", - "Gamma;": "Γ", - "gamma;": "γ", - "Gcirc;": "Ĝ", - "gcirc;": "ĝ", - "gescc;": "⪩", - "gimel;": "ℷ", - "gneqq;": "≩", - "gnsim;": "⋧", - "grave;": "`", - "gsime;": "⪎", - "gsiml;": "⪐", - "gtcir;": "⩺", - "gtdot;": "⋗", - "Hacek;": "ˇ", - "harrw;": "↭", - "Hcirc;": "Ĥ", - "hcirc;": "ĥ", - "hoarr;": "⇿", - Iacute: "Í", - iacute: "í", - "Icirc;": "Î", - "icirc;": "î", - "iexcl;": "¡", - Igrave: "Ì", - igrave: "ì", - "iiint;": "∭", - "iiota;": "℩", - "IJlig;": "IJ", - "ijlig;": "ij", - "Imacr;": "Ī", - "imacr;": "ī", - "image;": "ℑ", - "imath;": "ı", - "imped;": "Ƶ", - "infin;": "∞", - "Iogon;": "Į", - "iogon;": "į", - "iprod;": "⨼", - iquest: "¿", - "isinE;": "⋹", - "isins;": "⋴", - "isinv;": "∈", - "Iukcy;": "І", - "iukcy;": "і", - "Jcirc;": "Ĵ", - "jcirc;": "ĵ", - "jmath;": "ȷ", - "Jukcy;": "Є", - "jukcy;": "є", - "Kappa;": "Κ", - "kappa;": "κ", - "lAarr;": "⇚", - "langd;": "⦑", - "laquo;": "«", - "larrb;": "⇤", - "lates;": "⪭︀", - "lBarr;": "⤎", - "lbarr;": "⤌", - "lbbrk;": "❲", - "lbrke;": "⦋", - "lceil;": "⌈", - "ldquo;": "“", - "lescc;": "⪨", - "lhard;": "↽", - "lharu;": "↼", - "lhblk;": "▄", - "llarr;": "⇇", - "lltri;": "◺", - "lneqq;": "≨", - "lnsim;": "⋦", - "loang;": "⟬", - "loarr;": "⇽", - "lobrk;": "⟦", - "lopar;": "⦅", - "lrarr;": "⇆", - "lrhar;": "⇋", - "lrtri;": "⊿", - "lsime;": "⪍", - "lsimg;": "⪏", - "lsquo;": "‘", - "ltcir;": "⩹", - "ltdot;": "⋖", - "ltrie;": "⊴", - "ltrif;": "◂", - "mdash;": "—", - "mDDot;": "∺", - "micro;": "µ", - middot: "·", - "minus;": "−", - "mumap;": "⊸", - "nabla;": "∇", - "napid;": "≋̸", - "napos;": "ʼn", - "natur;": "♮", - "nbump;": "≎̸", - "ncong;": "≇", - "ndash;": "–", - "neArr;": "⇗", - "nearr;": "↗", - "nedot;": "≐̸", - "nesim;": "≂̸", - "ngeqq;": "≧̸", - "ngsim;": "≵", - "nhArr;": "⇎", - "nharr;": "↮", - "nhpar;": "⫲", - "nlArr;": "⇍", - "nlarr;": "↚", - "nleqq;": "≦̸", - "nless;": "≮", - "nlsim;": "≴", - "nltri;": "⋪", - "notin;": "∉", - "notni;": "∌", - "npart;": "∂̸", - "nprec;": "⊀", - "nrArr;": "⇏", - "nrarr;": "↛", - "nrtri;": "⋫", - "nsime;": "≄", - "nsmid;": "∤", - "nspar;": "∦", - "nsubE;": "⫅̸", - "nsube;": "⊈", - "nsucc;": "⊁", - "nsupE;": "⫆̸", - "nsupe;": "⊉", - Ntilde: "Ñ", - ntilde: "ñ", - "numsp;": " ", - "nvsim;": "∼⃒", - "nwArr;": "⇖", - "nwarr;": "↖", - Oacute: "Ó", - oacute: "ó", - "Ocirc;": "Ô", - "ocirc;": "ô", - "odash;": "⊝", - "OElig;": "Œ", - "oelig;": "œ", - "ofcir;": "⦿", - Ograve: "Ò", - ograve: "ò", - "ohbar;": "⦵", - "olarr;": "↺", - "olcir;": "⦾", - "oline;": "‾", - "Omacr;": "Ō", - "omacr;": "ō", - "Omega;": "Ω", - "omega;": "ω", - "operp;": "⦹", - "oplus;": "⊕", - "orarr;": "↻", - "order;": "ℴ", - Oslash: "Ø", - oslash: "ø", - Otilde: "Õ", - otilde: "õ", - "ovbar;": "⌽", - "parsl;": "⫽", - "phone;": "☎", - "plusb;": "⊞", - "pluse;": "⩲", - plusmn: "±", - "pound;": "£", - "prcue;": "≼", - "Prime;": "″", - "prime;": "′", - "prnap;": "⪹", - "prsim;": "≾", - "quest;": "?", - "rAarr;": "⇛", - "radic;": "√", - "rangd;": "⦒", - "range;": "⦥", - "raquo;": "»", - "rarrb;": "⇥", - "rarrc;": "⤳", - "rarrw;": "↝", - "ratio;": "∶", - "RBarr;": "⤐", - "rBarr;": "⤏", - "rbarr;": "⤍", - "rbbrk;": "❳", - "rbrke;": "⦌", - "rceil;": "⌉", - "rdquo;": "”", - "reals;": "ℝ", - "rhard;": "⇁", - "rharu;": "⇀", - "rlarr;": "⇄", - "rlhar;": "⇌", - "rnmid;": "⫮", - "roang;": "⟭", - "roarr;": "⇾", - "robrk;": "⟧", - "ropar;": "⦆", - "rrarr;": "⇉", - "rsquo;": "’", - "rtrie;": "⊵", - "rtrif;": "▸", - "sbquo;": "‚", - "sccue;": "≽", - "Scirc;": "Ŝ", - "scirc;": "ŝ", - "scnap;": "⪺", - "scsim;": "≿", - "sdotb;": "⊡", - "sdote;": "⩦", - "seArr;": "⇘", - "searr;": "↘", - "setmn;": "∖", - "sharp;": "♯", - "Sigma;": "Σ", - "sigma;": "σ", - "simeq;": "≃", - "simgE;": "⪠", - "simlE;": "⪟", - "simne;": "≆", - "slarr;": "←", - "smile;": "⌣", - "smtes;": "⪬︀", - "sqcap;": "⊓", - "sqcup;": "⊔", - "sqsub;": "⊏", - "sqsup;": "⊐", - "srarr;": "→", - "starf;": "★", - "strns;": "¯", - "subnE;": "⫋", - "subne;": "⊊", - "supnE;": "⫌", - "supne;": "⊋", - "swArr;": "⇙", - "swarr;": "↙", - "szlig;": "ß", - "Theta;": "Θ", - "theta;": "θ", - "thkap;": "≈", - "THORN;": "Þ", - "thorn;": "þ", - "Tilde;": "∼", - "tilde;": "˜", - "times;": "×", - "TRADE;": "™", - "trade;": "™", - "trisb;": "⧍", - "TSHcy;": "Ћ", - "tshcy;": "ћ", - "twixt;": "≬", - Uacute: "Ú", - uacute: "ú", - "Ubrcy;": "Ў", - "ubrcy;": "ў", - "Ucirc;": "Û", - "ucirc;": "û", - "udarr;": "⇅", - "udhar;": "⥮", - Ugrave: "Ù", - ugrave: "ù", - "uharl;": "↿", - "uharr;": "↾", - "uhblk;": "▀", - "ultri;": "◸", - "Umacr;": "Ū", - "umacr;": "ū", - "Union;": "⋃", - "Uogon;": "Ų", - "uogon;": "ų", - "uplus;": "⊎", - "upsih;": "ϒ", - "UpTee;": "⊥", - "Uring;": "Ů", - "uring;": "ů", - "urtri;": "◹", - "utdot;": "⋰", - "utrif;": "▴", - "uuarr;": "⇈", - "varpi;": "ϖ", - "vBarv;": "⫩", - "VDash;": "⊫", - "Vdash;": "⊩", - "vDash;": "⊨", - "vdash;": "⊢", - "veeeq;": "≚", - "vltri;": "⊲", - "vnsub;": "⊂⃒", - "vnsup;": "⊃⃒", - "vprop;": "∝", - "vrtri;": "⊳", - "Wcirc;": "Ŵ", - "wcirc;": "ŵ", - "Wedge;": "⋀", - "wedge;": "∧", - "xcirc;": "◯", - "xdtri;": "▽", - "xhArr;": "⟺", - "xharr;": "⟷", - "xlArr;": "⟸", - "xlarr;": "⟵", - "xodot;": "⨀", - "xrArr;": "⟹", - "xrarr;": "⟶", - "xutri;": "△", - Yacute: "Ý", - yacute: "ý", - "Ycirc;": "Ŷ", - "ycirc;": "ŷ", - "Aacute;": "Á", - "aacute;": "á", - "Abreve;": "Ă", - "abreve;": "ă", - "Agrave;": "À", - "agrave;": "à", - "andand;": "⩕", - "angmsd;": "∡", - "angsph;": "∢", - "apacir;": "⩯", - "approx;": "≈", - "Assign;": "≔", - "Atilde;": "Ã", - "atilde;": "ã", - "barvee;": "⊽", - "Barwed;": "⌆", - "barwed;": "⌅", - "becaus;": "∵", - "bernou;": "ℬ", - "bigcap;": "⋂", - "bigcup;": "⋃", - "bigvee;": "⋁", - "bkarow;": "⤍", - "bottom;": "⊥", - "bowtie;": "⋈", - "boxbox;": "⧉", - "bprime;": "‵", - "brvbar;": "¦", - "bullet;": "•", - "Bumpeq;": "≎", - "bumpeq;": "≏", - "Cacute;": "Ć", - "cacute;": "ć", - "capand;": "⩄", - "capcap;": "⩋", - "capcup;": "⩇", - "capdot;": "⩀", - "Ccaron;": "Č", - "ccaron;": "č", - "Ccedil;": "Ç", - "ccedil;": "ç", - "circeq;": "≗", - "cirmid;": "⫯", - "Colone;": "⩴", - "colone;": "≔", - "commat;": "@", - "compfn;": "∘", - "Conint;": "∯", - "conint;": "∮", - "coprod;": "∐", - "copysr;": "℗", - "cularr;": "↶", - "CupCap;": "≍", - "cupcap;": "⩆", - "cupcup;": "⩊", - "cupdot;": "⊍", - "curarr;": "↷", - "curren;": "¤", - "cylcty;": "⌭", - "Dagger;": "‡", - "dagger;": "†", - "daleth;": "ℸ", - "Dcaron;": "Ď", - "dcaron;": "ď", - "dfisht;": "⥿", - "divide;": "÷", - "divonx;": "⋇", - "dlcorn;": "⌞", - "dlcrop;": "⌍", - "dollar;": "$", - "DotDot;": "⃜", - "drcorn;": "⌟", - "drcrop;": "⌌", - "Dstrok;": "Đ", - "dstrok;": "đ", - "Eacute;": "É", - "eacute;": "é", - "easter;": "⩮", - "Ecaron;": "Ě", - "ecaron;": "ě", - "ecolon;": "≕", - "Egrave;": "È", - "egrave;": "è", - "egsdot;": "⪘", - "elsdot;": "⪗", - "emptyv;": "∅", - "emsp13;": " ", - "emsp14;": " ", - "eparsl;": "⧣", - "eqcirc;": "≖", - "equals;": "=", - "equest;": "≟", - "Exists;": "∃", - "female;": "♀", - "ffilig;": "ffi", - "ffllig;": "ffl", - "ForAll;": "∀", - "forall;": "∀", - "frac12;": "½", - "frac13;": "⅓", - "frac14;": "¼", - "frac15;": "⅕", - "frac16;": "⅙", - "frac18;": "⅛", - "frac23;": "⅔", - "frac25;": "⅖", - "frac34;": "¾", - "frac35;": "⅗", - "frac38;": "⅜", - "frac45;": "⅘", - "frac56;": "⅚", - "frac58;": "⅝", - "frac78;": "⅞", - "gacute;": "ǵ", - "Gammad;": "Ϝ", - "gammad;": "ϝ", - "Gbreve;": "Ğ", - "gbreve;": "ğ", - "Gcedil;": "Ģ", - "gesdot;": "⪀", - "gesles;": "⪔", - "gtlPar;": "⦕", - "gtrarr;": "⥸", - "gtrdot;": "⋗", - "gtrsim;": "≳", - "hairsp;": " ", - "hamilt;": "ℋ", - "HARDcy;": "Ъ", - "hardcy;": "ъ", - "hearts;": "♥", - "hellip;": "…", - "hercon;": "⊹", - "homtht;": "∻", - "horbar;": "―", - "hslash;": "ℏ", - "Hstrok;": "Ħ", - "hstrok;": "ħ", - "hybull;": "⁃", - "hyphen;": "‐", - "Iacute;": "Í", - "iacute;": "í", - "Igrave;": "Ì", - "igrave;": "ì", - "iiiint;": "⨌", - "iinfin;": "⧜", - "incare;": "℅", - "inodot;": "ı", - "intcal;": "⊺", - "iquest;": "¿", - "isinsv;": "⋳", - "Itilde;": "Ĩ", - "itilde;": "ĩ", - "Jsercy;": "Ј", - "jsercy;": "ј", - "kappav;": "ϰ", - "Kcedil;": "Ķ", - "kcedil;": "ķ", - "kgreen;": "ĸ", - "Lacute;": "Ĺ", - "lacute;": "ĺ", - "lagran;": "ℒ", - "Lambda;": "Λ", - "lambda;": "λ", - "langle;": "⟨", - "larrfs;": "⤝", - "larrhk;": "↩", - "larrlp;": "↫", - "larrpl;": "⤹", - "larrtl;": "↢", - "lAtail;": "⤛", - "latail;": "⤙", - "lbrace;": "{", - "lbrack;": "[", - "Lcaron;": "Ľ", - "lcaron;": "ľ", - "Lcedil;": "Ļ", - "lcedil;": "ļ", - "ldquor;": "„", - "lesdot;": "⩿", - "lesges;": "⪓", - "lfisht;": "⥼", - "lfloor;": "⌊", - "lharul;": "⥪", - "llhard;": "⥫", - "Lmidot;": "Ŀ", - "lmidot;": "ŀ", - "lmoust;": "⎰", - "loplus;": "⨭", - "lowast;": "∗", - "lowbar;": "_", - "lparlt;": "⦓", - "lrhard;": "⥭", - "lsaquo;": "‹", - "lsquor;": "‚", - "Lstrok;": "Ł", - "lstrok;": "ł", - "lthree;": "⋋", - "ltimes;": "⋉", - "ltlarr;": "⥶", - "ltrPar;": "⦖", - "mapsto;": "↦", - "marker;": "▮", - "mcomma;": "⨩", - "midast;": "*", - "midcir;": "⫰", - "middot;": "·", - "minusb;": "⊟", - "minusd;": "∸", - "mnplus;": "∓", - "models;": "⊧", - "mstpos;": "∾", - "Nacute;": "Ń", - "nacute;": "ń", - "nbumpe;": "≏̸", - "Ncaron;": "Ň", - "ncaron;": "ň", - "Ncedil;": "Ņ", - "ncedil;": "ņ", - "nearhk;": "⤤", - "nequiv;": "≢", - "nesear;": "⤨", - "nexist;": "∄", - "nltrie;": "⋬", - "notinE;": "⋹̸", - "nparsl;": "⫽⃥", - "nprcue;": "⋠", - "nrarrc;": "⤳̸", - "nrarrw;": "↝̸", - "nrtrie;": "⋭", - "nsccue;": "⋡", - "nsimeq;": "≄", - "Ntilde;": "Ñ", - "ntilde;": "ñ", - "numero;": "№", - "nVDash;": "⊯", - "nVdash;": "⊮", - "nvDash;": "⊭", - "nvdash;": "⊬", - "nvHarr;": "⤄", - "nvlArr;": "⤂", - "nvrArr;": "⤃", - "nwarhk;": "⤣", - "nwnear;": "⤧", - "Oacute;": "Ó", - "oacute;": "ó", - "Odblac;": "Ő", - "odblac;": "ő", - "odsold;": "⦼", - "Ograve;": "Ò", - "ograve;": "ò", - "ominus;": "⊖", - "origof;": "⊶", - "Oslash;": "Ø", - "oslash;": "ø", - "Otilde;": "Õ", - "otilde;": "õ", - "Otimes;": "⨷", - "otimes;": "⊗", - "parsim;": "⫳", - "percnt;": "%", - "period;": ".", - "permil;": "‰", - "phmmat;": "ℳ", - "planck;": "ℏ", - "plankv;": "ℏ", - "plusdo;": "∔", - "plusdu;": "⨥", - "plusmn;": "±", - "preceq;": "⪯", - "primes;": "ℙ", - "prnsim;": "⋨", - "propto;": "∝", - "prurel;": "⊰", - "puncsp;": " ", - "qprime;": "⁗", - "Racute;": "Ŕ", - "racute;": "ŕ", - "rangle;": "⟩", - "rarrap;": "⥵", - "rarrfs;": "⤞", - "rarrhk;": "↪", - "rarrlp;": "↬", - "rarrpl;": "⥅", - "Rarrtl;": "⤖", - "rarrtl;": "↣", - "rAtail;": "⤜", - "ratail;": "⤚", - "rbrace;": "}", - "rbrack;": "]", - "Rcaron;": "Ř", - "rcaron;": "ř", - "Rcedil;": "Ŗ", - "rcedil;": "ŗ", - "rdquor;": "”", - "rfisht;": "⥽", - "rfloor;": "⌋", - "rharul;": "⥬", - "rmoust;": "⎱", - "roplus;": "⨮", - "rpargt;": "⦔", - "rsaquo;": "›", - "rsquor;": "’", - "rthree;": "⋌", - "rtimes;": "⋊", - "Sacute;": "Ś", - "sacute;": "ś", - "Scaron;": "Š", - "scaron;": "š", - "Scedil;": "Ş", - "scedil;": "ş", - "scnsim;": "⋩", - "searhk;": "⤥", - "seswar;": "⤩", - "sfrown;": "⌢", - "SHCHcy;": "Щ", - "shchcy;": "щ", - "sigmaf;": "ς", - "sigmav;": "ς", - "simdot;": "⩪", - "smashp;": "⨳", - "SOFTcy;": "Ь", - "softcy;": "ь", - "solbar;": "⌿", - "spades;": "♠", - "sqcaps;": "⊓︀", - "sqcups;": "⊔︀", - "sqsube;": "⊑", - "sqsupe;": "⊒", - "Square;": "□", - "square;": "□", - "squarf;": "▪", - "ssetmn;": "∖", - "ssmile;": "⌣", - "sstarf;": "⋆", - "subdot;": "⪽", - "Subset;": "⋐", - "subset;": "⊂", - "subsim;": "⫇", - "subsub;": "⫕", - "subsup;": "⫓", - "succeq;": "⪰", - "supdot;": "⪾", - "Supset;": "⋑", - "supset;": "⊃", - "supsim;": "⫈", - "supsub;": "⫔", - "supsup;": "⫖", - "swarhk;": "⤦", - "swnwar;": "⤪", - "target;": "⌖", - "Tcaron;": "Ť", - "tcaron;": "ť", - "Tcedil;": "Ţ", - "tcedil;": "ţ", - "telrec;": "⌕", - "there4;": "∴", - "thetav;": "ϑ", - "thinsp;": " ", - "thksim;": "∼", - "timesb;": "⊠", - "timesd;": "⨰", - "topbot;": "⌶", - "topcir;": "⫱", - "tprime;": "‴", - "tridot;": "◬", - "Tstrok;": "Ŧ", - "tstrok;": "ŧ", - "Uacute;": "Ú", - "uacute;": "ú", - "Ubreve;": "Ŭ", - "ubreve;": "ŭ", - "Udblac;": "Ű", - "udblac;": "ű", - "ufisht;": "⥾", - "Ugrave;": "Ù", - "ugrave;": "ù", - "ulcorn;": "⌜", - "ulcrop;": "⌏", - "urcorn;": "⌝", - "urcrop;": "⌎", - "Utilde;": "Ũ", - "utilde;": "ũ", - "vangrt;": "⦜", - "varphi;": "ϕ", - "varrho;": "ϱ", - "Vdashl;": "⫦", - "veebar;": "⊻", - "vellip;": "⋮", - "Verbar;": "‖", - "verbar;": "|", - "vsubnE;": "⫋︀", - "vsubne;": "⊊︀", - "vsupnE;": "⫌︀", - "vsupne;": "⊋︀", - "Vvdash;": "⊪", - "wedbar;": "⩟", - "wedgeq;": "≙", - "weierp;": "℘", - "wreath;": "≀", - "xoplus;": "⨁", - "xotime;": "⨂", - "xsqcup;": "⨆", - "xuplus;": "⨄", - "xwedge;": "⋀", - "Yacute;": "Ý", - "yacute;": "ý", - "Zacute;": "Ź", - "zacute;": "ź", - "Zcaron;": "Ž", - "zcaron;": "ž", - "zeetrf;": "ℨ", - "alefsym;": "ℵ", - "angrtvb;": "⊾", - "angzarr;": "⍼", - "asympeq;": "≍", - "backsim;": "∽", - "Because;": "∵", - "because;": "∵", - "bemptyv;": "⦰", - "between;": "≬", - "bigcirc;": "◯", - "bigodot;": "⨀", - "bigstar;": "★", - "bnequiv;": "≡⃥", - "boxplus;": "⊞", - "Cayleys;": "ℭ", - "Cconint;": "∰", - "ccupssm;": "⩐", - "Cedilla;": "¸", - "cemptyv;": "⦲", - "cirscir;": "⧂", - "coloneq;": "≔", - "congdot;": "⩭", - "cudarrl;": "⤸", - "cudarrr;": "⤵", - "cularrp;": "⤽", - "curarrm;": "⤼", - "dbkarow;": "⤏", - "ddagger;": "‡", - "ddotseq;": "⩷", - "demptyv;": "⦱", - "Diamond;": "⋄", - "diamond;": "⋄", - "digamma;": "ϝ", - "dotplus;": "∔", - "DownTee;": "⊤", - "dwangle;": "⦦", - "Element;": "∈", - "Epsilon;": "Ε", - "epsilon;": "ε", - "eqcolon;": "≕", - "equivDD;": "⩸", - "gesdoto;": "⪂", - "gtquest;": "⩼", - "gtrless;": "≷", - "harrcir;": "⥈", - "Implies;": "⇒", - "intprod;": "⨼", - "isindot;": "⋵", - "larrbfs;": "⤟", - "larrsim;": "⥳", - "lbrksld;": "⦏", - "lbrkslu;": "⦍", - "ldrdhar;": "⥧", - "LeftTee;": "⊣", - "lesdoto;": "⪁", - "lessdot;": "⋖", - "lessgtr;": "≶", - "lesssim;": "≲", - "lotimes;": "⨴", - "lozenge;": "◊", - "ltquest;": "⩻", - "luruhar;": "⥦", - "maltese;": "✠", - "minusdu;": "⨪", - "napprox;": "≉", - "natural;": "♮", - "nearrow;": "↗", - "NewLine;": "\n", - "nexists;": "∄", - "NoBreak;": "⁠", - "notinva;": "∉", - "notinvb;": "⋷", - "notinvc;": "⋶", - "NotLess;": "≮", - "notniva;": "∌", - "notnivb;": "⋾", - "notnivc;": "⋽", - "npolint;": "⨔", - "npreceq;": "⪯̸", - "nsqsube;": "⋢", - "nsqsupe;": "⋣", - "nsubset;": "⊂⃒", - "nsucceq;": "⪰̸", - "nsupset;": "⊃⃒", - "nvinfin;": "⧞", - "nvltrie;": "⊴⃒", - "nvrtrie;": "⊵⃒", - "nwarrow;": "↖", - "olcross;": "⦻", - "Omicron;": "Ο", - "omicron;": "ο", - "orderof;": "ℴ", - "orslope;": "⩗", - "OverBar;": "‾", - "pertenk;": "‱", - "planckh;": "ℎ", - "pluscir;": "⨢", - "plussim;": "⨦", - "plustwo;": "⨧", - "precsim;": "≾", - "Product;": "∏", - "quatint;": "⨖", - "questeq;": "≟", - "rarrbfs;": "⤠", - "rarrsim;": "⥴", - "rbrksld;": "⦎", - "rbrkslu;": "⦐", - "rdldhar;": "⥩", - "realine;": "ℛ", - "rotimes;": "⨵", - "ruluhar;": "⥨", - "searrow;": "↘", - "simplus;": "⨤", - "simrarr;": "⥲", - "subedot;": "⫃", - "submult;": "⫁", - "subplus;": "⪿", - "subrarr;": "⥹", - "succsim;": "≿", - "supdsub;": "⫘", - "supedot;": "⫄", - "suphsol;": "⟉", - "suphsub;": "⫗", - "suplarr;": "⥻", - "supmult;": "⫂", - "supplus;": "⫀", - "swarrow;": "↙", - "topfork;": "⫚", - "triplus;": "⨹", - "tritime;": "⨻", - "UpArrow;": "↑", - "Uparrow;": "⇑", - "uparrow;": "↑", - "Upsilon;": "Υ", - "upsilon;": "υ", - "uwangle;": "⦧", - "vzigzag;": "⦚", - "zigrarr;": "⇝", - "andslope;": "⩘", - "angmsdaa;": "⦨", - "angmsdab;": "⦩", - "angmsdac;": "⦪", - "angmsdad;": "⦫", - "angmsdae;": "⦬", - "angmsdaf;": "⦭", - "angmsdag;": "⦮", - "angmsdah;": "⦯", - "angrtvbd;": "⦝", - "approxeq;": "≊", - "awconint;": "∳", - "backcong;": "≌", - "barwedge;": "⌅", - "bbrktbrk;": "⎶", - "bigoplus;": "⨁", - "bigsqcup;": "⨆", - "biguplus;": "⨄", - "bigwedge;": "⋀", - "boxminus;": "⊟", - "boxtimes;": "⊠", - "bsolhsub;": "⟈", - "capbrcup;": "⩉", - "circledR;": "®", - "circledS;": "Ⓢ", - "cirfnint;": "⨐", - "clubsuit;": "♣", - "cupbrcap;": "⩈", - "curlyvee;": "⋎", - "cwconint;": "∲", - "DDotrahd;": "⤑", - "doteqdot;": "≑", - "DotEqual;": "≐", - "dotminus;": "∸", - "drbkarow;": "⤐", - "dzigrarr;": "⟿", - "elinters;": "⏧", - "emptyset;": "∅", - "eqvparsl;": "⧥", - "fpartint;": "⨍", - "geqslant;": "⩾", - "gesdotol;": "⪄", - "gnapprox;": "⪊", - "hksearow;": "⤥", - "hkswarow;": "⤦", - "imagline;": "ℐ", - "imagpart;": "ℑ", - "infintie;": "⧝", - "integers;": "ℤ", - "Integral;": "∫", - "intercal;": "⊺", - "intlarhk;": "⨗", - "laemptyv;": "⦴", - "ldrushar;": "⥋", - "leqslant;": "⩽", - "lesdotor;": "⪃", - "LessLess;": "⪡", - "llcorner;": "⌞", - "lnapprox;": "⪉", - "lrcorner;": "⌟", - "lurdshar;": "⥊", - "mapstoup;": "↥", - "multimap;": "⊸", - "naturals;": "ℕ", - "ncongdot;": "⩭̸", - "NotEqual;": "≠", - "notindot;": "⋵̸", - "NotTilde;": "≁", - "otimesas;": "⨶", - "parallel;": "∥", - "PartialD;": "∂", - "plusacir;": "⨣", - "pointint;": "⨕", - "Precedes;": "≺", - "precneqq;": "⪵", - "precnsim;": "⋨", - "profalar;": "⌮", - "profline;": "⌒", - "profsurf;": "⌓", - "raemptyv;": "⦳", - "realpart;": "ℜ", - "RightTee;": "⊢", - "rppolint;": "⨒", - "rtriltri;": "⧎", - "scpolint;": "⨓", - "setminus;": "∖", - "shortmid;": "∣", - "smeparsl;": "⧤", - "sqsubset;": "⊏", - "sqsupset;": "⊐", - "subseteq;": "⊆", - "Succeeds;": "≻", - "succneqq;": "⪶", - "succnsim;": "⋩", - "SuchThat;": "∋", - "Superset;": "⊃", - "supseteq;": "⊇", - "thetasym;": "ϑ", - "thicksim;": "∼", - "timesbar;": "⨱", - "triangle;": "▵", - "triminus;": "⨺", - "trpezium;": "⏢", - "Uarrocir;": "⥉", - "ulcorner;": "⌜", - "UnderBar;": "_", - "urcorner;": "⌝", - "varkappa;": "ϰ", - "varsigma;": "ς", - "vartheta;": "ϑ", - "backprime;": "‵", - "backsimeq;": "⋍", - "Backslash;": "∖", - "bigotimes;": "⨂", - "CenterDot;": "·", - "centerdot;": "·", - "checkmark;": "✓", - "CircleDot;": "⊙", - "complexes;": "ℂ", - "Congruent;": "≡", - "Coproduct;": "∐", - "dotsquare;": "⊡", - "DoubleDot;": "¨", - "DownArrow;": "↓", - "Downarrow;": "⇓", - "downarrow;": "↓", - "DownBreve;": "̑", - "gtrapprox;": "⪆", - "gtreqless;": "⋛", - "gvertneqq;": "≩︀", - "heartsuit;": "♥", - "HumpEqual;": "≏", - "LeftArrow;": "←", - "Leftarrow;": "⇐", - "leftarrow;": "←", - "LeftFloor;": "⌊", - "lesseqgtr;": "⋚", - "LessTilde;": "≲", - "lvertneqq;": "≨︀", - "Mellintrf;": "ℳ", - "MinusPlus;": "∓", - "ngeqslant;": "⩾̸", - "nleqslant;": "⩽̸", - "NotCupCap;": "≭", - "NotExists;": "∄", - "NotSubset;": "⊂⃒", - "nparallel;": "∦", - "nshortmid;": "∤", - "nsubseteq;": "⊈", - "nsupseteq;": "⊉", - "OverBrace;": "⏞", - "pitchfork;": "⋔", - "PlusMinus;": "±", - "rationals;": "ℚ", - "spadesuit;": "♠", - "subseteqq;": "⫅", - "subsetneq;": "⊊", - "supseteqq;": "⫆", - "supsetneq;": "⊋", - "Therefore;": "∴", - "therefore;": "∴", - "ThinSpace;": " ", - "triangleq;": "≜", - "TripleDot;": "⃛", - "UnionPlus;": "⊎", - "varpropto;": "∝", - "Bernoullis;": "ℬ", - "circledast;": "⊛", - "CirclePlus;": "⊕", - "complement;": "∁", - "curlywedge;": "⋏", - "eqslantgtr;": "⪖", - "EqualTilde;": "≂", - "Fouriertrf;": "ℱ", - "gtreqqless;": "⪌", - "ImaginaryI;": "ⅈ", - "Laplacetrf;": "ℒ", - "LeftVector;": "↼", - "lessapprox;": "⪅", - "lesseqqgtr;": "⪋", - "Lleftarrow;": "⇚", - "lmoustache;": "⎰", - "longmapsto;": "⟼", - "mapstodown;": "↧", - "mapstoleft;": "↤", - "nLeftarrow;": "⇍", - "nleftarrow;": "↚", - "NotElement;": "∉", - "NotGreater;": "≯", - "nsubseteqq;": "⫅̸", - "nsupseteqq;": "⫆̸", - "precapprox;": "⪷", - "Proportion;": "∷", - "RightArrow;": "→", - "Rightarrow;": "⇒", - "rightarrow;": "→", - "RightFloor;": "⌋", - "rmoustache;": "⎱", - "sqsubseteq;": "⊑", - "sqsupseteq;": "⊒", - "subsetneqq;": "⫋", - "succapprox;": "⪸", - "supsetneqq;": "⫌", - "ThickSpace;": "  ", - "TildeEqual;": "≃", - "TildeTilde;": "≈", - "UnderBrace;": "⏟", - "UpArrowBar;": "⤒", - "UpTeeArrow;": "↥", - "upuparrows;": "⇈", - "varepsilon;": "ϵ", - "varnothing;": "∅", - "backepsilon;": "϶", - "blacksquare;": "▪", - "circledcirc;": "⊚", - "circleddash;": "⊝", - "CircleMinus;": "⊖", - "CircleTimes;": "⊗", - "curlyeqprec;": "⋞", - "curlyeqsucc;": "⋟", - "diamondsuit;": "♦", - "eqslantless;": "⪕", - "Equilibrium;": "⇌", - "expectation;": "ℰ", - "GreaterLess;": "≷", - "LeftCeiling;": "⌈", - "LessGreater;": "≶", - "MediumSpace;": " ", - "NotLessLess;": "≪̸", - "NotPrecedes;": "⊀", - "NotSucceeds;": "⊁", - "NotSuperset;": "⊃⃒", - "nRightarrow;": "⇏", - "nrightarrow;": "↛", - "OverBracket;": "⎴", - "preccurlyeq;": "≼", - "precnapprox;": "⪹", - "quaternions;": "ℍ", - "RightVector;": "⇀", - "Rrightarrow;": "⇛", - "RuleDelayed;": "⧴", - "SmallCircle;": "∘", - "SquareUnion;": "⊔", - "straightphi;": "ϕ", - "SubsetEqual;": "⊆", - "succcurlyeq;": "≽", - "succnapprox;": "⪺", - "thickapprox;": "≈", - "UpDownArrow;": "↕", - "Updownarrow;": "⇕", - "updownarrow;": "↕", - "VerticalBar;": "∣", - "blacklozenge;": "⧫", - "DownArrowBar;": "⤓", - "DownTeeArrow;": "↧", - "ExponentialE;": "ⅇ", - "exponentiale;": "ⅇ", - "GreaterEqual;": "≥", - "GreaterTilde;": "≳", - "HilbertSpace;": "ℋ", - "HumpDownHump;": "≎", - "Intersection;": "⋂", - "LeftArrowBar;": "⇤", - "LeftTeeArrow;": "↤", - "LeftTriangle;": "⊲", - "LeftUpVector;": "↿", - "NotCongruent;": "≢", - "NotHumpEqual;": "≏̸", - "NotLessEqual;": "≰", - "NotLessTilde;": "≴", - "Proportional;": "∝", - "RightCeiling;": "⌉", - "risingdotseq;": "≓", - "RoundImplies;": "⥰", - "ShortUpArrow;": "↑", - "SquareSubset;": "⊏", - "triangledown;": "▿", - "triangleleft;": "◃", - "UnderBracket;": "⎵", - "varsubsetneq;": "⊊︀", - "varsupsetneq;": "⊋︀", - "VerticalLine;": "|", - "ApplyFunction;": "⁡", - "bigtriangleup;": "△", - "blacktriangle;": "▴", - "DifferentialD;": "ⅆ", - "divideontimes;": "⋇", - "DoubleLeftTee;": "⫤", - "DoubleUpArrow;": "⇑", - "fallingdotseq;": "≒", - "hookleftarrow;": "↩", - "leftarrowtail;": "↢", - "leftharpoonup;": "↼", - "LeftTeeVector;": "⥚", - "LeftVectorBar;": "⥒", - "LessFullEqual;": "≦", - "LongLeftArrow;": "⟵", - "Longleftarrow;": "⟸", - "longleftarrow;": "⟵", - "looparrowleft;": "↫", - "measuredangle;": "∡", - "NotEqualTilde;": "≂̸", - "NotTildeEqual;": "≄", - "NotTildeTilde;": "≉", - "ntriangleleft;": "⋪", - "Poincareplane;": "ℌ", - "PrecedesEqual;": "⪯", - "PrecedesTilde;": "≾", - "RightArrowBar;": "⇥", - "RightTeeArrow;": "↦", - "RightTriangle;": "⊳", - "RightUpVector;": "↾", - "shortparallel;": "∥", - "smallsetminus;": "∖", - "SucceedsEqual;": "⪰", - "SucceedsTilde;": "≿", - "SupersetEqual;": "⊇", - "triangleright;": "▹", - "UpEquilibrium;": "⥮", - "upharpoonleft;": "↿", - "varsubsetneqq;": "⫋︀", - "varsupsetneqq;": "⫌︀", - "VerticalTilde;": "≀", - "VeryThinSpace;": " ", - "curvearrowleft;": "↶", - "DiacriticalDot;": "˙", - "doublebarwedge;": "⌆", - "DoubleRightTee;": "⊨", - "downdownarrows;": "⇊", - "DownLeftVector;": "↽", - "GreaterGreater;": "⪢", - "hookrightarrow;": "↪", - "HorizontalLine;": "─", - "InvisibleComma;": "⁣", - "InvisibleTimes;": "⁢", - "LeftDownVector;": "⇃", - "leftleftarrows;": "⇇", - "LeftRightArrow;": "↔", - "Leftrightarrow;": "⇔", - "leftrightarrow;": "↔", - "leftthreetimes;": "⋋", - "LessSlantEqual;": "⩽", - "LongRightArrow;": "⟶", - "Longrightarrow;": "⟹", - "longrightarrow;": "⟶", - "looparrowright;": "↬", - "LowerLeftArrow;": "↙", - "NestedLessLess;": "≪", - "NotGreaterLess;": "≹", - "NotLessGreater;": "≸", - "NotSubsetEqual;": "⊈", - "NotVerticalBar;": "∤", - "nshortparallel;": "∦", - "ntriangleright;": "⋫", - "OpenCurlyQuote;": "‘", - "ReverseElement;": "∋", - "rightarrowtail;": "↣", - "rightharpoonup;": "⇀", - "RightTeeVector;": "⥛", - "RightVectorBar;": "⥓", - "ShortDownArrow;": "↓", - "ShortLeftArrow;": "←", - "SquareSuperset;": "⊐", - "TildeFullEqual;": "≅", - "trianglelefteq;": "⊴", - "upharpoonright;": "↾", - "UpperLeftArrow;": "↖", - "ZeroWidthSpace;": "​", - "bigtriangledown;": "▽", - "circlearrowleft;": "↺", - "CloseCurlyQuote;": "’", - "ContourIntegral;": "∮", - "curvearrowright;": "↷", - "DoubleDownArrow;": "⇓", - "DoubleLeftArrow;": "⇐", - "downharpoonleft;": "⇃", - "DownRightVector;": "⇁", - "leftharpoondown;": "↽", - "leftrightarrows;": "⇆", - "LeftRightVector;": "⥎", - "LeftTriangleBar;": "⧏", - "LeftUpTeeVector;": "⥠", - "LeftUpVectorBar;": "⥘", - "LowerRightArrow;": "↘", - "nLeftrightarrow;": "⇎", - "nleftrightarrow;": "↮", - "NotGreaterEqual;": "≱", - "NotGreaterTilde;": "≵", - "NotHumpDownHump;": "≎̸", - "NotLeftTriangle;": "⋪", - "NotSquareSubset;": "⊏̸", - "ntrianglelefteq;": "⋬", - "OverParenthesis;": "⏜", - "RightDownVector;": "⇂", - "rightleftarrows;": "⇄", - "rightsquigarrow;": "↝", - "rightthreetimes;": "⋌", - "ShortRightArrow;": "→", - "straightepsilon;": "ϵ", - "trianglerighteq;": "⊵", - "UpperRightArrow;": "↗", - "vartriangleleft;": "⊲", - "circlearrowright;": "↻", - "DiacriticalAcute;": "´", - "DiacriticalGrave;": "`", - "DiacriticalTilde;": "˜", - "DoubleRightArrow;": "⇒", - "DownArrowUpArrow;": "⇵", - "downharpoonright;": "⇂", - "EmptySmallSquare;": "◻", - "GreaterEqualLess;": "⋛", - "GreaterFullEqual;": "≧", - "LeftAngleBracket;": "⟨", - "LeftUpDownVector;": "⥑", - "LessEqualGreater;": "⋚", - "NonBreakingSpace;": " ", - "NotPrecedesEqual;": "⪯̸", - "NotRightTriangle;": "⋫", - "NotSucceedsEqual;": "⪰̸", - "NotSucceedsTilde;": "≿̸", - "NotSupersetEqual;": "⊉", - "ntrianglerighteq;": "⋭", - "rightharpoondown;": "⇁", - "rightrightarrows;": "⇉", - "RightTriangleBar;": "⧐", - "RightUpTeeVector;": "⥜", - "RightUpVectorBar;": "⥔", - "twoheadleftarrow;": "↞", - "UnderParenthesis;": "⏝", - "UpArrowDownArrow;": "⇅", - "vartriangleright;": "⊳", - "blacktriangledown;": "▾", - "blacktriangleleft;": "◂", - "DoubleUpDownArrow;": "⇕", - "DoubleVerticalBar;": "∥", - "DownLeftTeeVector;": "⥞", - "DownLeftVectorBar;": "⥖", - "FilledSmallSquare;": "◼", - "GreaterSlantEqual;": "⩾", - "LeftDoubleBracket;": "⟦", - "LeftDownTeeVector;": "⥡", - "LeftDownVectorBar;": "⥙", - "leftrightharpoons;": "⇋", - "LeftTriangleEqual;": "⊴", - "NegativeThinSpace;": "​", - "NotGreaterGreater;": "≫̸", - "NotLessSlantEqual;": "⩽̸", - "NotNestedLessLess;": "⪡̸", - "NotReverseElement;": "∌", - "NotSquareSuperset;": "⊐̸", - "NotTildeFullEqual;": "≇", - "RightAngleBracket;": "⟩", - "rightleftharpoons;": "⇌", - "RightUpDownVector;": "⥏", - "SquareSubsetEqual;": "⊑", - "twoheadrightarrow;": "↠", - "VerticalSeparator;": "❘", - "blacktriangleright;": "▸", - "DownRightTeeVector;": "⥟", - "DownRightVectorBar;": "⥗", - "LongLeftRightArrow;": "⟷", - "Longleftrightarrow;": "⟺", - "longleftrightarrow;": "⟷", - "NegativeThickSpace;": "​", - "NotLeftTriangleBar;": "⧏̸", - "PrecedesSlantEqual;": "≼", - "ReverseEquilibrium;": "⇋", - "RightDoubleBracket;": "⟧", - "RightDownTeeVector;": "⥝", - "RightDownVectorBar;": "⥕", - "RightTriangleEqual;": "⊵", - "SquareIntersection;": "⊓", - "SucceedsSlantEqual;": "≽", - "DoubleLongLeftArrow;": "⟸", - "DownLeftRightVector;": "⥐", - "LeftArrowRightArrow;": "⇆", - "leftrightsquigarrow;": "↭", - "NegativeMediumSpace;": "​", - "NotGreaterFullEqual;": "≧̸", - "NotRightTriangleBar;": "⧐̸", - "RightArrowLeftArrow;": "⇄", - "SquareSupersetEqual;": "⊒", - "CapitalDifferentialD;": "ⅅ", - "DoubleLeftRightArrow;": "⇔", - "DoubleLongRightArrow;": "⟹", - "EmptyVerySmallSquare;": "▫", - "NestedGreaterGreater;": "≫", - "NotDoubleVerticalBar;": "∦", - "NotGreaterSlantEqual;": "⩾̸", - "NotLeftTriangleEqual;": "⋬", - "NotSquareSubsetEqual;": "⋢", - "OpenCurlyDoubleQuote;": "“", - "ReverseUpEquilibrium;": "⥯", - "CloseCurlyDoubleQuote;": "”", - "DoubleContourIntegral;": "∯", - "FilledVerySmallSquare;": "▪", - "NegativeVeryThinSpace;": "​", - "NotPrecedesSlantEqual;": "⋠", - "NotRightTriangleEqual;": "⋭", - "NotSucceedsSlantEqual;": "⋡", - "DiacriticalDoubleAcute;": "˝", - "NotSquareSupersetEqual;": "⋣", - "NotNestedGreaterGreater;": "⪢̸", - "ClockwiseContourIntegral;": "∲", - "DoubleLongLeftRightArrow;": "⟺", - "CounterClockwiseContourIntegral;": "∳" -}; - -// lazy compute this to make this file tree-shakable for browser -let maxCRNameLength; -const decodeHtml = (rawText, asAttr) => { - let offset = 0; - const end = rawText.length; - let decodedText = ''; - function advance(length) { - offset += length; - rawText = rawText.slice(length); - } - while (offset < end) { - const head = /&(?:#x?)?/i.exec(rawText); - if (!head || offset + head.index >= end) { - const remaining = end - offset; - decodedText += rawText.slice(0, remaining); - advance(remaining); - break; - } - // Advance to the "&". - decodedText += rawText.slice(0, head.index); - advance(head.index); - if (head[0] === '&') { - // Named character reference. - let name = ''; - let value = undefined; - if (/[0-9a-z]/i.test(rawText[1])) { - if (!maxCRNameLength) { - maxCRNameLength = Object.keys(namedCharacterReferences).reduce((max, name) => Math.max(max, name.length), 0); - } - for (let length = maxCRNameLength; !value && length > 0; --length) { - name = rawText.slice(1, 1 + length); - value = namedCharacterReferences[name]; - } - if (value) { - const semi = name.endsWith(';'); - if (asAttr && - !semi && - /[=a-z0-9]/i.test(rawText[name.length + 1] || '')) { - decodedText += '&' + name; - advance(1 + name.length); - } - else { - decodedText += value; - advance(1 + name.length); - } - } - else { - decodedText += '&' + name; - advance(1 + name.length); - } - } - else { - decodedText += '&'; - advance(1); - } - } - else { - // Numeric character reference. - const hex = head[0] === '&#x'; - const pattern = hex ? /^&#x([0-9a-f]+);?/i : /^&#([0-9]+);?/; - const body = pattern.exec(rawText); - if (!body) { - decodedText += head[0]; - advance(head[0].length); - } - else { - // https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state - let cp = Number.parseInt(body[1], hex ? 16 : 10); - if (cp === 0) { - cp = 0xfffd; - } - else if (cp > 0x10ffff) { - cp = 0xfffd; - } - else if (cp >= 0xd800 && cp <= 0xdfff) { - cp = 0xfffd; - } - else if ((cp >= 0xfdd0 && cp <= 0xfdef) || (cp & 0xfffe) === 0xfffe) ; - else if ((cp >= 0x01 && cp <= 0x08) || - cp === 0x0b || - (cp >= 0x0d && cp <= 0x1f) || - (cp >= 0x7f && cp <= 0x9f)) { - cp = CCR_REPLACEMENTS[cp] || cp; - } - decodedText += String.fromCodePoint(cp); - advance(body[0].length); - } - } - } - return decodedText; -}; -// https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state -const CCR_REPLACEMENTS = { - 0x80: 0x20ac, - 0x82: 0x201a, - 0x83: 0x0192, - 0x84: 0x201e, - 0x85: 0x2026, - 0x86: 0x2020, - 0x87: 0x2021, - 0x88: 0x02c6, - 0x89: 0x2030, - 0x8a: 0x0160, - 0x8b: 0x2039, - 0x8c: 0x0152, - 0x8e: 0x017d, - 0x91: 0x2018, - 0x92: 0x2019, - 0x93: 0x201c, - 0x94: 0x201d, - 0x95: 0x2022, - 0x96: 0x2013, - 0x97: 0x2014, - 0x98: 0x02dc, - 0x99: 0x2122, - 0x9a: 0x0161, - 0x9b: 0x203a, - 0x9c: 0x0153, - 0x9e: 0x017e, - 0x9f: 0x0178 -}; - -const isRawTextContainer = /*#__PURE__*/ makeMap('style,iframe,script,noscript', true); -const parserOptions = { - isVoidTag, - isNativeTag: tag => isHTMLTag(tag) || isSVGTag(tag), - isPreTag: tag => tag === 'pre', - decodeEntities: decodeHtml, - isBuiltInComponent: (tag) => { - if (isBuiltInType(tag, `Transition`)) { - return TRANSITION; - } - else if (isBuiltInType(tag, `TransitionGroup`)) { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent) { - let ns = parent ? parent.ns : 0 /* HTML */; - if (parent && ns === 2 /* MATH_ML */) { - if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ && - a.name === 'encoding' && - a.value != null && - (a.value.content === 'text/html' || - a.value.content === 'application/xhtml+xml'))) { - ns = 0 /* HTML */; - } - } - else if (/^m(?:[ions]|text)$/.test(parent.tag) && - tag !== 'mglyph' && - tag !== 'malignmark') { - ns = 0 /* HTML */; - } - } - else if (parent && ns === 1 /* SVG */) { - if (parent.tag === 'foreignObject' || - parent.tag === 'desc' || - parent.tag === 'title') { - ns = 0 /* HTML */; - } - } - if (ns === 0 /* HTML */) { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (tag === 'math') { - return 2 /* MATH_ML */; - } - } - return ns; - }, - // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments - getTextMode({ tag, ns }) { - if (ns === 0 /* HTML */) { - if (tag === 'textarea' || tag === 'title') { - return 1 /* RCDATA */; - } - if (isRawTextContainer(tag)) { - return 2 /* RAWTEXT */; - } - } - return 0 /* DATA */; - } -}; - -// Parse inline CSS strings for static style attributes into an object. -// This is a NodeTransform since it works on the static `style` attribute and -// converts it into a dynamic equivalent: -// style="color: red" -> :style='{ "color": "red" }' -// It is then processed by `transformElement` and included in the generated -// props. -const transformStyle = node => { - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((p, i) => { - if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) { - // replace p with an expression node - node.props[i] = { - type: 7 /* DIRECTIVE */, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } -}; -const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */); -}; - -function createDOMCompilerError(code, loc) { - return createCompilerError(code, loc, DOMErrorMessages ); -} -const DOMErrorMessages = { - [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`, - [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`, - [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`, - [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`, - [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`, - [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`, - [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`, - [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` -}; - -const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`innerHTML`, true, loc), exp || createSimpleExpression('', true)) - ] - }; -}; - -const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`textContent`, true), exp - ? getConstantType(exp, context) > 0 - ? exp - : createCallExpression(context.helperString(TO_DISPLAY_STRING), [exp], loc) - : createSimpleExpression('', true)) - ] - }; -}; - -const transformModel$1 = (dir, node, context) => { - const baseResult = transformModel(dir, node, context); - // base transform has errors OR component v-model (only need props) - if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) { - return baseResult; - } - if (dir.arg) { - context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc)); - } - function checkDuplicatedValue() { - const value = findProp(node, 'value'); - if (value) { - context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === 'input' || - tag === 'textarea' || - tag === 'select' || - isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === 'input' || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7 /* DIRECTIVE */) { - // :type="foo" - directiveToUse = V_MODEL_DYNAMIC; - } - else if (type.value) { - switch (type.value.content) { - case 'radio': - directiveToUse = V_MODEL_RADIO; - break; - case 'checkbox': - directiveToUse = V_MODEL_CHECKBOX; - break; - case 'file': - isInvalidType = true; - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - // text type - checkDuplicatedValue(); - break; - } - } - } - else if (hasDynamicKeyVBind(node)) { - // element has bindings with dynamic keys, which can possibly contain - // "type". - directiveToUse = V_MODEL_DYNAMIC; - } - else { - // text type - checkDuplicatedValue(); - } - } - else if (tag === 'select') { - directiveToUse = V_MODEL_SELECT; - } - else { - // textarea - checkDuplicatedValue(); - } - // inject runtime directive - // by returning the helper symbol via needRuntime - // the import will replaced a resolveDirective call. - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - // native vmodel doesn't need the `modelValue` props since they are also - // passed to the runtime as `binding.value`. removing it reduces code size. - baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === 'modelValue')); - return baseResult; -}; - -const isEventOptionModifier = /*#__PURE__*/ makeMap(`passive,once,capture`); -const isNonKeyModifier = /*#__PURE__*/ makeMap( -// event propagation management -`stop,prevent,self,` + - // system modifiers + exact - `ctrl,shift,alt,meta,exact,` + - // mouse - `middle`); -// left & right could be mouse or key modifiers based on event type -const maybeKeyModifier = /*#__PURE__*/ makeMap('left,right'); -const isKeyboardEvent = /*#__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`, true); -const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i]; - if (isEventOptionModifier(modifier)) { - // eventOptionModifiers: modifiers for addEventListener() options, - // e.g. .passive & .capture - eventOptionModifiers.push(modifier); - } - else { - // runtimeModifiers: modifiers that needs runtime guards - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content)) { - keyModifiers.push(modifier); - } - else { - nonKeyModifiers.push(modifier); - } - } - else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } - else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } - else { - keyModifiers.push(modifier); - } - } - } - } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; -}; -const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === 'onclick'; - return isStaticClick - ? createSimpleExpression(event, true) - : key.type !== 4 /* SIMPLE_EXPRESSION */ - ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) - : key; -}; -const transformOn$1 = (dir, node, context) => { - return transformOn(dir, node, context, baseResult => { - const { modifiers } = dir; - if (!modifiers.length) - return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - // normalize click.right and click.middle since they don't actually fire - if (nonKeyModifiers.includes('right')) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes('middle')) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && - // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(''); - key = isStaticExp(key) - ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) - : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); -}; - -const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc)); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; -}; - -const transformTransition = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION) { - return () => { - if (!node.children.length) { - return; - } - // warn multiple transition children - if (hasMultipleChildren(node)) { - context.onError(createDOMCompilerError(59 /* X_TRANSITION_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - // check if it's s single child w/ v-show - // if yes, inject "persisted: true" to the transition props - const child = node.children[0]; - if (child.type === 1 /* ELEMENT */) { - for (const p of child.props) { - if (p.type === 7 /* DIRECTIVE */ && p.name === 'show') { - node.props.push({ - type: 6 /* ATTRIBUTE */, - name: 'persisted', - value: undefined, - loc: node.loc - }); - } - } - } - }; - } - } -}; -function hasMultipleChildren(node) { - // #1352 filter out potential comment nodes. - const children = (node.children = node.children.filter(c => c.type !== 3 /* COMMENT */ && - !(c.type === 2 /* TEXT */ && !c.content.trim()))); - const child = children[0]; - return (children.length !== 1 || - child.type === 11 /* FOR */ || - (child.type === 9 /* IF */ && child.branches.some(hasMultipleChildren))); -} - -/** - * This module is Node-only. - */ -/** - * Regex for replacing placeholders for embedded constant variables - * (e.g. import URL string constants generated by compiler-sfc) - */ -const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g; -/** - * Turn eligible hoisted static trees into stringified static nodes, e.g. - * - * ```js - * const _hoisted_1 = createStaticVNode(`<div class="foo">bar</div>`) - * ``` - * - * A single static vnode can contain stringified content for **multiple** - * consecutive nodes (element and plain text), called a "chunk". - * `@vue/runtime-dom` will create the content via innerHTML in a hidden - * container element and insert all the nodes in place. The call must also - * provide the number of nodes contained in the chunk so that during hydration - * we can know how many nodes the static vnode should adopt. - * - * The optimization scans a children list that contains hoisted nodes, and - * tries to find the largest chunk of consecutive hoisted nodes before running - * into a non-hoisted node or the end of the list. A chunk is then converted - * into a single static vnode and replaces the hoisted expression of the first - * node in the chunk. Other nodes in the chunk are considered "merged" and - * therefore removed from both the hoist list and the children array. - * - * This optimization is only performed in Node.js. - */ -const stringifyStatic = (children, context, parent) => { - // bail stringification for slot content - if (context.scopes.vSlot > 0) { - return; - } - let nc = 0; // current node count - let ec = 0; // current element with binding count - const currentChunk = []; - const stringifyCurrentChunk = (currentIndex) => { - if (nc >= 20 /* NODE_COUNT */ || - ec >= 5 /* ELEMENT_WITH_BINDING_COUNT */) { - // combine all currently eligible nodes into a single static vnode call - const staticCall = createCallExpression(context.helper(CREATE_STATIC), [ - JSON.stringify(currentChunk.map(node => stringifyNode(node, context)).join('')).replace(expReplaceRE, `" + $1 + "`), - // the 2nd argument indicates the number of DOM nodes this static vnode - // will insert / hydrate - String(currentChunk.length) - ]); - // replace the first node's hoisted expression with the static vnode call - replaceHoist(currentChunk[0], staticCall, context); - if (currentChunk.length > 1) { - for (let i = 1; i < currentChunk.length; i++) { - // for the merged nodes, set their hoisted expression to null - replaceHoist(currentChunk[i], null, context); - } - // also remove merged nodes from children - const deleteCount = currentChunk.length - 1; - children.splice(currentIndex - currentChunk.length + 1, deleteCount); - return deleteCount; - } - } - return 0; - }; - let i = 0; - for (; i < children.length; i++) { - const child = children[i]; - const hoisted = getHoistedNode(child); - if (hoisted) { - // presence of hoisted means child must be a stringifiable node - const node = child; - const result = analyzeNode(node); - if (result) { - // node is stringifiable, record state - nc += result[0]; - ec += result[1]; - currentChunk.push(node); - continue; - } - } - // we only reach here if we ran into a node that is not stringifiable - // check if currently analyzed nodes meet criteria for stringification. - // adjust iteration index - i -= stringifyCurrentChunk(i); - // reset state - nc = 0; - ec = 0; - currentChunk.length = 0; - } - // in case the last node was also stringifiable - stringifyCurrentChunk(i); -}; -const getHoistedNode = (node) => ((node.type === 1 /* ELEMENT */ && node.tagType === 0 /* ELEMENT */) || - node.type == 12 /* TEXT_CALL */) && - node.codegenNode && - node.codegenNode.type === 4 /* SIMPLE_EXPRESSION */ && - node.codegenNode.hoisted; -const dataAriaRE = /^(data|aria)-/; -const isStringifiableAttr = (name, ns) => { - return ((ns === 0 /* HTML */ - ? isKnownHtmlAttr(name) - : ns === 1 /* SVG */ - ? isKnownSvgAttr(name) - : false) || dataAriaRE.test(name)); -}; -const replaceHoist = (node, replacement, context) => { - const hoistToReplace = node.codegenNode.hoisted; - context.hoists[context.hoists.indexOf(hoistToReplace)] = replacement; -}; -const isNonStringifiable = /*#__PURE__*/ makeMap(`caption,thead,tr,th,tbody,td,tfoot,colgroup,col`); -/** - * for a hoisted node, analyze it and return: - * - false: bailed (contains non-stringifiable props or runtime constant) - * - [nc, ec] where - * - nc is the number of nodes inside - * - ec is the number of element with bindings inside - */ -function analyzeNode(node) { - if (node.type === 1 /* ELEMENT */ && isNonStringifiable(node.tag)) { - return false; - } - if (node.type === 12 /* TEXT_CALL */) { - return [1, 0]; - } - let nc = 1; // node count - let ec = node.props.length > 0 ? 1 : 0; // element w/ binding count - let bailed = false; - const bail = () => { - bailed = true; - return false; - }; - // TODO: check for cases where using innerHTML will result in different - // output compared to imperative node insertions. - // probably only need to check for most common case - // i.e. non-phrasing-content tags inside `<p>` - function walk(node) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - // bail on non-attr bindings - if (p.type === 6 /* ATTRIBUTE */ && - !isStringifiableAttr(p.name, node.ns)) { - return bail(); - } - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind') { - // bail on non-attr bindings - if (p.arg && - (p.arg.type === 8 /* COMPOUND_EXPRESSION */ || - (p.arg.isStatic && !isStringifiableAttr(p.arg.content, node.ns)))) { - return bail(); - } - if (p.exp && - (p.exp.type === 8 /* COMPOUND_EXPRESSION */ || - p.exp.constType < 3 /* CAN_STRINGIFY */)) { - return bail(); - } - } - } - for (let i = 0; i < node.children.length; i++) { - nc++; - const child = node.children[i]; - if (child.type === 1 /* ELEMENT */) { - if (child.props.length > 0) { - ec++; - } - walk(child); - if (bailed) { - return false; - } - } - } - return true; - } - return walk(node) ? [nc, ec] : false; -} -function stringifyNode(node, context) { - if (isString(node)) { - return node; - } - if (isSymbol(node)) { - return ``; - } - switch (node.type) { - case 1 /* ELEMENT */: - return stringifyElement(node, context); - case 2 /* TEXT */: - return escapeHtml(node.content); - case 3 /* COMMENT */: - return `<!--${escapeHtml(node.content)}-->`; - case 5 /* INTERPOLATION */: - return escapeHtml(toDisplayString(evaluateConstant(node.content))); - case 8 /* COMPOUND_EXPRESSION */: - return escapeHtml(evaluateConstant(node)); - case 12 /* TEXT_CALL */: - return stringifyNode(node.content, context); - default: - // static trees will not contain if/for nodes - return ''; - } -} -function stringifyElement(node, context) { - let res = `<${node.tag}`; - let innerHTML = ''; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - res += ` ${p.name}`; - if (p.value) { - res += `="${escapeHtml(p.value.content)}"`; - } - } - else if (p.type === 7 /* DIRECTIVE */) { - if (p.name === 'bind') { - const exp = p.exp; - if (exp.content[0] === '_') { - // internally generated string constant references - // e.g. imported URL strings via compiler-sfc transformAssetUrl plugin - res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`; - continue; - } - // constant v-bind, e.g. :foo="1" - let evaluated = evaluateConstant(exp); - if (evaluated != null) { - const arg = p.arg && p.arg.content; - if (arg === 'class') { - evaluated = normalizeClass(evaluated); - } - else if (arg === 'style') { - evaluated = stringifyStyle(normalizeStyle(evaluated)); - } - res += ` ${p.arg.content}="${escapeHtml(evaluated)}"`; - } - } - else if (p.name === 'html') { - // #5439 v-html with constant value - // not sure why would anyone do this but it can happen - innerHTML = evaluateConstant(p.exp); - } - else if (p.name === 'text') { - innerHTML = escapeHtml(toDisplayString(evaluateConstant(p.exp))); - } - } - } - if (context.scopeId) { - res += ` ${context.scopeId}`; - } - res += `>`; - if (innerHTML) { - res += innerHTML; - } - else { - for (let i = 0; i < node.children.length; i++) { - res += stringifyNode(node.children[i], context); - } - } - if (!isVoidTag(node.tag)) { - res += `</${node.tag}>`; - } - return res; -} -// __UNSAFE__ -// Reason: eval. -// It's technically safe to eval because only constant expressions are possible -// here, e.g. `{{ 1 }}` or `{{ 'foo' }}` -// in addition, constant exps bail on presence of parens so you can't even -// run JSFuck in here. But we mark it unsafe for security review purposes. -// (see compiler-core/src/transforms/transformExpression) -function evaluateConstant(exp) { - if (exp.type === 4 /* SIMPLE_EXPRESSION */) { - return new Function(`return ${exp.content}`)(); - } - else { - // compound - let res = ``; - exp.children.forEach(c => { - if (isString(c) || isSymbol(c)) { - return; - } - if (c.type === 2 /* TEXT */) { - res += c.content; - } - else if (c.type === 5 /* INTERPOLATION */) { - res += toDisplayString(evaluateConstant(c.content)); - } - else { - res += evaluateConstant(c); - } - }); - return res; - } -} - -const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - (node.tag === 'script' || node.tag === 'style')) { - context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc)); - context.removeNode(); - } -}; - -const DOMNodeTransforms = [ - transformStyle, - ...([transformTransition] ) -]; -const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel$1, - on: transformOn$1, - show: transformShow -}; -function compile(template, options = {}) { - return baseCompile(template, extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...(options.nodeTransforms || []) - ], - directiveTransforms: extend({}, DOMDirectiveTransforms, options.directiveTransforms || {}), - transformHoist: stringifyStatic - })); -} -function parse$1(template, options = {}) { - return baseParse(template, extend({}, parserOptions, options)); -} - -var CompilerDOM = /*#__PURE__*/Object.freeze({ - __proto__: null, - parserOptions: parserOptions, - DOMNodeTransforms: DOMNodeTransforms, - DOMDirectiveTransforms: DOMDirectiveTransforms, - compile: compile, - parse: parse$1, - transformStyle: transformStyle, - createDOMCompilerError: createDOMCompilerError, - V_MODEL_RADIO: V_MODEL_RADIO, - V_MODEL_CHECKBOX: V_MODEL_CHECKBOX, - V_MODEL_TEXT: V_MODEL_TEXT, - V_MODEL_SELECT: V_MODEL_SELECT, - V_MODEL_DYNAMIC: V_MODEL_DYNAMIC, - V_ON_WITH_MODIFIERS: V_ON_WITH_MODIFIERS, - V_ON_WITH_KEYS: V_ON_WITH_KEYS, - V_SHOW: V_SHOW, - TRANSITION: TRANSITION, - TRANSITION_GROUP: TRANSITION_GROUP, - baseCompile: baseCompile, - baseParse: baseParse, - transform: transform, - createTransformContext: createTransformContext, - traverseNode: traverseNode, - createStructuralDirectiveTransform: createStructuralDirectiveTransform, - generate: generate, - createCompilerError: createCompilerError, - getBaseTransformPreset: getBaseTransformPreset, - transformModel: transformModel, - transformOn: transformOn, - transformBind: transformBind, - noopDirectiveTransform: noopDirectiveTransform, - processIf: processIf, - processFor: processFor, - createForLoopParams: createForLoopParams, - transformExpression: transformExpression, - processExpression: processExpression, - buildSlots: buildSlots, - trackVForSlotScopes: trackVForSlotScopes, - trackSlotScopes: trackSlotScopes, - transformElement: transformElement, - resolveComponentType: resolveComponentType, - buildProps: buildProps, - buildDirectiveArgs: buildDirectiveArgs, - processSlotOutlet: processSlotOutlet, - getConstantType: getConstantType, - generateCodeFrame: generateCodeFrame, - checkCompatEnabled: checkCompatEnabled, - warnDeprecation: warnDeprecation, - locStub: locStub, - createRoot: createRoot, - createVNodeCall: createVNodeCall, - createArrayExpression: createArrayExpression, - createObjectExpression: createObjectExpression, - createObjectProperty: createObjectProperty, - createSimpleExpression: createSimpleExpression, - createInterpolation: createInterpolation, - createCompoundExpression: createCompoundExpression, - createCallExpression: createCallExpression, - createFunctionExpression: createFunctionExpression, - createConditionalExpression: createConditionalExpression, - createCacheExpression: createCacheExpression, - createBlockStatement: createBlockStatement, - createTemplateLiteral: createTemplateLiteral, - createIfStatement: createIfStatement, - createAssignmentExpression: createAssignmentExpression, - createSequenceExpression: createSequenceExpression, - createReturnStatement: createReturnStatement, - isStaticExp: isStaticExp, - isBuiltInType: isBuiltInType, - isCoreComponent: isCoreComponent, - isSimpleIdentifier: isSimpleIdentifier, - isMemberExpressionBrowser: isMemberExpressionBrowser, - isMemberExpressionNode: isMemberExpressionNode, - isMemberExpression: isMemberExpression, - getInnerRange: getInnerRange, - advancePositionWithClone: advancePositionWithClone, - advancePositionWithMutation: advancePositionWithMutation, - assert: assert$1, - findDir: findDir, - findProp: findProp, - isStaticArgOf: isStaticArgOf, - hasDynamicKeyVBind: hasDynamicKeyVBind, - isText: isText, - isVSlot: isVSlot, - isTemplateNode: isTemplateNode, - isSlotOutlet: isSlotOutlet, - getVNodeHelper: getVNodeHelper, - getVNodeBlockHelper: getVNodeBlockHelper, - injectProp: injectProp, - toValidAssetId: toValidAssetId, - hasScopeRef: hasScopeRef, - getMemoedVNodeCall: getMemoedVNodeCall, - makeBlock: makeBlock, - walkIdentifiers: walkIdentifiers, - isReferencedIdentifier: isReferencedIdentifier, - isInDestructureAssignment: isInDestructureAssignment, - walkFunctionParams: walkFunctionParams, - walkBlockDeclarations: walkBlockDeclarations, - extractIdentifiers: extractIdentifiers, - isFunctionType: isFunctionType, - isStaticProperty: isStaticProperty, - isStaticPropertyKey: isStaticPropertyKey, - FRAGMENT: FRAGMENT, - TELEPORT: TELEPORT, - SUSPENSE: SUSPENSE, - KEEP_ALIVE: KEEP_ALIVE, - BASE_TRANSITION: BASE_TRANSITION, - OPEN_BLOCK: OPEN_BLOCK, - CREATE_BLOCK: CREATE_BLOCK, - CREATE_ELEMENT_BLOCK: CREATE_ELEMENT_BLOCK, - CREATE_VNODE: CREATE_VNODE, - CREATE_ELEMENT_VNODE: CREATE_ELEMENT_VNODE, - CREATE_COMMENT: CREATE_COMMENT, - CREATE_TEXT: CREATE_TEXT, - CREATE_STATIC: CREATE_STATIC, - RESOLVE_COMPONENT: RESOLVE_COMPONENT, - RESOLVE_DYNAMIC_COMPONENT: RESOLVE_DYNAMIC_COMPONENT, - RESOLVE_DIRECTIVE: RESOLVE_DIRECTIVE, - RESOLVE_FILTER: RESOLVE_FILTER, - WITH_DIRECTIVES: WITH_DIRECTIVES, - RENDER_LIST: RENDER_LIST, - RENDER_SLOT: RENDER_SLOT, - CREATE_SLOTS: CREATE_SLOTS, - TO_DISPLAY_STRING: TO_DISPLAY_STRING, - MERGE_PROPS: MERGE_PROPS, - NORMALIZE_CLASS: NORMALIZE_CLASS, - NORMALIZE_STYLE: NORMALIZE_STYLE, - NORMALIZE_PROPS: NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS: GUARD_REACTIVE_PROPS, - TO_HANDLERS: TO_HANDLERS, - CAMELIZE: CAMELIZE, - CAPITALIZE: CAPITALIZE, - TO_HANDLER_KEY: TO_HANDLER_KEY, - SET_BLOCK_TRACKING: SET_BLOCK_TRACKING, - PUSH_SCOPE_ID: PUSH_SCOPE_ID, - POP_SCOPE_ID: POP_SCOPE_ID, - WITH_CTX: WITH_CTX, - UNREF: UNREF, - IS_REF: IS_REF, - WITH_MEMO: WITH_MEMO, - IS_MEMO_SAME: IS_MEMO_SAME, - helperNameMap: helperNameMap, - registerRuntimeHelpers: registerRuntimeHelpers -}); - -function pad (hash, len) { - while (hash.length < len) { - hash = '0' + hash; - } - return hash; -} - -function fold (hash, text) { - var i; - var chr; - var len; - if (text.length === 0) { - return hash; - } - for (i = 0, len = text.length; i < len; i++) { - chr = text.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; - } - return hash < 0 ? hash * -2 : hash; -} - -function foldObject (hash, o, seen) { - return Object.keys(o).sort().reduce(foldKey, hash); - function foldKey (hash, key) { - return foldValue(hash, o[key], key, seen); - } -} - -function foldValue (input, value, key, seen) { - var hash = fold(fold(fold(input, key), toString(value)), typeof value); - if (value === null) { - return fold(hash, 'null'); - } - if (value === undefined) { - return fold(hash, 'undefined'); - } - if (typeof value === 'object' || typeof value === 'function') { - if (seen.indexOf(value) !== -1) { - return fold(hash, '[Circular]' + key); - } - seen.push(value); - - var objHash = foldObject(hash, value, seen); - - if (!('valueOf' in value) || typeof value.valueOf !== 'function') { - return objHash; - } - - try { - return fold(objHash, String(value.valueOf())) - } catch (err) { - return fold(objHash, '[valueOf exception]' + (err.stack || err.message)) - } - } - return fold(hash, value.toString()); -} - -function toString (o) { - return Object.prototype.toString.call(o); -} - -function sum (o) { - return pad(foldValue(0, o, '', []).toString(16), 8); -} - -var hashSum = sum; - -const CSS_VARS_HELPER = `useCssVars`; -// match v-bind() with max 2-levels of nested parens. -const cssVarRE = /v-bind\s*\(((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/g; -function genCssVarsFromList(vars, id, isProd, isSSR = false) { - return `{\n ${vars - .map(key => `"${isSSR ? `--` : ``}${genVarName(id, key, isProd)}": (${key})`) - .join(',\n ')}\n}`; -} -function genVarName(id, raw, isProd) { - if (isProd) { - return hashSum(id + raw); - } - else { - return `${id}-${raw.replace(/([^\w-])/g, '_')}`; - } -} -function normalizeExpression(exp) { - exp = exp.trim(); - if ((exp[0] === `'` && exp[exp.length - 1] === `'`) || - (exp[0] === `"` && exp[exp.length - 1] === `"`)) { - return exp.slice(1, -1); - } - return exp; -} -function parseCssVars(sfc) { - const vars = []; - sfc.styles.forEach(style => { - let match; - // ignore v-bind() in comments /* ... */ - const content = style.content.replace(/\/\*([\s\S]*?)\*\//g, ''); - while ((match = cssVarRE.exec(content))) { - const variable = normalizeExpression(match[1]); - if (!vars.includes(variable)) { - vars.push(variable); - } - } - }); - return vars; -} -const cssVarsPlugin = opts => { - const { id, isProd } = opts; - return { - postcssPlugin: 'vue-sfc-vars', - Declaration(decl) { - // rewrite CSS variables - if (cssVarRE.test(decl.value)) { - decl.value = decl.value.replace(cssVarRE, (_, $1) => { - return `var(--${genVarName(id, normalizeExpression($1), isProd)})`; - }); - } - } - }; -}; -cssVarsPlugin.postcss = true; -function genCssVarsCode(vars, bindings, id, isProd) { - const varsExp = genCssVarsFromList(vars, id, isProd); - const exp = createSimpleExpression(varsExp, false); - const context = createTransformContext(createRoot([]), { - prefixIdentifiers: true, - inline: true, - bindingMetadata: bindings.__isScriptSetup === false ? undefined : bindings - }); - const transformed = processExpression(exp, context); - const transformedString = transformed.type === 4 /* SIMPLE_EXPRESSION */ - ? transformed.content - : transformed.children - .map(c => { - return typeof c === 'string' - ? c - : c.content; - }) - .join(''); - return `_${CSS_VARS_HELPER}(_ctx => (${transformedString}))`; -} -// <script setup> already gets the calls injected as part of the transform -// this is only for single normal <script> -function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd) { - return (`\nimport { ${CSS_VARS_HELPER} as _${CSS_VARS_HELPER} } from 'vue'\n` + - `const __injectCSSVars__ = () => {\n${genCssVarsCode(cssVars, bindings, id, isProd)}}\n` + - `const __setup__ = __default__.setup\n` + - `__default__.setup = __setup__\n` + - ` ? (props, ctx) => { __injectCSSVars__();return __setup__(props, ctx) }\n` + - ` : __injectCSSVars__\n`); -} - -function createCache(size = 500) { - return new Map() - ; -} - -var global = (typeof global !== "undefined" ? global : - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : {}); - -var lookup = []; -var revLookup = []; -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; -var inited = false; -function init () { - inited = true; - var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i]; - revLookup[code.charCodeAt(i)] = i; - } - - revLookup['-'.charCodeAt(0)] = 62; - revLookup['_'.charCodeAt(0)] = 63; -} - -function toByteArray (b64) { - if (!inited) { - init(); - } - var i, j, l, tmp, placeHolders, arr; - var len = b64.length; - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(len * 3 / 4 - placeHolders); - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? len - 4 : len; - - var L = 0; - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]; - arr[L++] = (tmp >> 16) & 0xFF; - arr[L++] = (tmp >> 8) & 0xFF; - arr[L++] = tmp & 0xFF; - } - - if (placeHolders === 2) { - tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4); - arr[L++] = tmp & 0xFF; - } else if (placeHolders === 1) { - tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2); - arr[L++] = (tmp >> 8) & 0xFF; - arr[L++] = tmp & 0xFF; - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp; - var output = []; - for (var i = start; i < end; i += 3) { - tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); - output.push(tripletToBase64(tmp)); - } - return output.join('') -} - -function fromByteArray (uint8) { - if (!inited) { - init(); - } - var tmp; - var len = uint8.length; - var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes - var output = ''; - var parts = []; - var maxChunkLength = 16383; // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1]; - output += lookup[tmp >> 2]; - output += lookup[(tmp << 4) & 0x3F]; - output += '=='; - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); - output += lookup[tmp >> 10]; - output += lookup[(tmp >> 4) & 0x3F]; - output += lookup[(tmp << 2) & 0x3F]; - output += '='; - } - - parts.push(output); - - return parts.join('') -} - -function read (buffer, offset, isLE, mLen, nBytes) { - var e, m; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = -7; - var i = isLE ? (nBytes - 1) : 0; - var d = isLE ? -1 : 1; - var s = buffer[offset + i]; - - i += d; - - e = s & ((1 << (-nBits)) - 1); - s >>= (-nBits); - nBits += eLen; - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1); - e >>= (-nBits); - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -function write (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); - var i = isLE ? 0 : (nBytes - 1); - var d = isLE ? 1 : -1; - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; - - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m; - eLen += mLen; - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128; -} - -var toString$1 = {}.toString; - -var isArray$1 = Array.isArray || function (arr) { - return toString$1.call(arr) == '[object Array]'; -}; - -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> - * @license MIT - */ - -var INSPECT_MAX_BYTES = 50; - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : true; - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length); - that.__proto__ = Buffer.prototype; - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length); - } - that.length = length; - } - - return that -} - -/** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - -function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) -} - -Buffer.poolSize = 8192; // not used by this implementation - -// TODO: Legacy, not needed anymore. Remove in next major version. -Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype; - return arr -}; - -function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - - return fromObject(that, value) -} - -/** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ -Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) -}; - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype; - Buffer.__proto__ = Uint8Array; -} - -function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } -} - -function alloc (that, size, fill, encoding) { - assertSize(size); - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) -} - -/** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ -Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) -}; - -function allocUnsafe (that, size) { - assertSize(size); - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0; - } - } - return that -} - -/** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ -Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) -}; -/** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ -Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) -}; - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8'; - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - var length = byteLength(string, encoding) | 0; - that = createBuffer(that, length); - - var actual = that.write(string, encoding); - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual); - } - - return that -} - -function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0; - that = createBuffer(that, length); - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255; - } - return that -} - -function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength; // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array); - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset); - } else { - array = new Uint8Array(array, byteOffset, length); - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array; - that.__proto__ = Buffer.prototype; - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array); - } - return that -} - -function fromObject (that, obj) { - if (internalIsBuffer(obj)) { - var len = checked(obj.length) | 0; - that = createBuffer(that, len); - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len); - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray$1(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') -} - -function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} -Buffer.isBuffer = isBuffer; -function internalIsBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!internalIsBuffer(a) || !internalIsBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length; - var y = b.length; - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i]; - y = b[i]; - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -}; - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -}; - -Buffer.concat = function concat (list, length) { - if (!isArray$1(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i; - if (length === undefined) { - length = 0; - for (i = 0; i < list.length; ++i) { - length += list[i].length; - } - } - - var buffer = Buffer.allocUnsafe(length); - var pos = 0; - for (i = 0; i < list.length; ++i) { - var buf = list[i]; - if (!internalIsBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos); - pos += buf.length; - } - return buffer -}; - -function byteLength (string, encoding) { - if (internalIsBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string; - } - - var len = string.length; - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false; - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase(); - loweredCase = true; - } - } -} -Buffer.byteLength = byteLength; - -function slowToString (encoding, start, end) { - var loweredCase = false; - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0; - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length; - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0; - start >>>= 0; - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8'; - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase(); - loweredCase = true; - } - } -} - -// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect -// Buffer instances. -Buffer.prototype._isBuffer = true; - -function swap$1 (b, n, m) { - var i = b[n]; - b[n] = b[m]; - b[m] = i; -} - -Buffer.prototype.swap16 = function swap16 () { - var len = this.length; - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap$1(this, i, i + 1); - } - return this -}; - -Buffer.prototype.swap32 = function swap32 () { - var len = this.length; - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap$1(this, i, i + 3); - swap$1(this, i + 1, i + 2); - } - return this -}; - -Buffer.prototype.swap64 = function swap64 () { - var len = this.length; - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap$1(this, i, i + 7); - swap$1(this, i + 1, i + 6); - swap$1(this, i + 2, i + 5); - swap$1(this, i + 3, i + 4); - } - return this -}; - -Buffer.prototype.toString = function toString () { - var length = this.length | 0; - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -}; - -Buffer.prototype.equals = function equals (b) { - if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -}; - -Buffer.prototype.inspect = function inspect () { - var str = ''; - var max = INSPECT_MAX_BYTES; - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); - if (this.length > max) str += ' ... '; - } - return '<Buffer ' + str + '>' -}; - -Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!internalIsBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0; - } - if (end === undefined) { - end = target ? target.length : 0; - } - if (thisStart === undefined) { - thisStart = 0; - } - if (thisEnd === undefined) { - thisEnd = this.length; - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0; - end >>>= 0; - thisStart >>>= 0; - thisEnd >>>= 0; - - if (this === target) return 0 - - var x = thisEnd - thisStart; - var y = end - start; - var len = Math.min(x, y); - - var thisCopy = this.slice(thisStart, thisEnd); - var targetCopy = target.slice(start, end); - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i]; - y = targetCopy[i]; - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -}; - -// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, -// OR the last index of `val` in `buffer` at offset <= `byteOffset`. -// -// Arguments: -// - buffer - a Buffer to search -// - val - a string, Buffer, or number -// - byteOffset - an index into `buffer`; will be clamped to an int32 -// - encoding - an optional encoding, relevant is val is a string -// - dir - true for indexOf, false for lastIndexOf -function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset; - byteOffset = 0; - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff; - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000; - } - byteOffset = +byteOffset; // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1); - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset; - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1; - } else if (byteOffset < 0) { - if (dir) byteOffset = 0; - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding); - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (internalIsBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF; // Search for a byte value [0-255] - if (Buffer.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') -} - -function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1; - var arrLength = arr.length; - var valLength = val.length; - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase(); - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2; - arrLength /= 2; - valLength /= 2; - byteOffset /= 2; - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i; - if (dir) { - var foundIndex = -1; - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i; - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex; - foundIndex = -1; - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; - for (i = byteOffset; i >= 0; i--) { - var found = true; - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false; - break - } - } - if (found) return i - } - } - - return -1 -} - -Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 -}; - -Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) -}; - -Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) -}; - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0; - var remaining = buf.length - offset; - if (!length) { - length = remaining; - } else { - length = Number(length); - if (length > remaining) { - length = remaining; - } - } - - // must be an even number of digits - var strLen = string.length; - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2; - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16); - if (isNaN(parsed)) return i - buf[offset + i] = parsed; - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8'; - length = this.length; - offset = 0; - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset; - length = this.length; - offset = 0; - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0; - if (isFinite(length)) { - length = length | 0; - if (encoding === undefined) encoding = 'utf8'; - } else { - encoding = length; - length = undefined; - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset; - if (length === undefined || length > remaining) length = remaining; - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8'; - - var loweredCase = false; - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase(); - loweredCase = true; - } - } -}; - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -}; - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return fromByteArray(buf) - } else { - return fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end); - var res = []; - - var i = start; - while (i < end) { - var firstByte = buf[i]; - var codePoint = null; - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1; - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint; - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte; - } - break - case 2: - secondByte = buf[i + 1]; - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint; - } - } - break - case 3: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint; - } - } - break - case 4: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - fourthByte = buf[i + 3]; - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint; - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD; - bytesPerSequence = 1; - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000; - res.push(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF; - } - - res.push(codePoint); - i += bytesPerSequence; - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000; - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length; - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = ''; - var i = 0; - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ); - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F); - } - return ret -} - -function latin1Slice (buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]); - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length; - - if (!start || start < 0) start = 0; - if (!end || end < 0 || end > len) end = len; - - var out = ''; - for (var i = start; i < end; ++i) { - out += toHex(buf[i]); - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end); - var res = ''; - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length; - start = ~~start; - end = end === undefined ? len : ~~end; - - if (start < 0) { - start += len; - if (start < 0) start = 0; - } else if (start > len) { - start = len; - } - - if (end < 0) { - end += len; - if (end < 0) end = 0; - } else if (end > len) { - end = len; - } - - if (end < start) end = start; - - var newBuf; - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end); - newBuf.__proto__ = Buffer.prototype; - } else { - var sliceLen = end - start; - newBuf = new Buffer(sliceLen, undefined); - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start]; - } - } - - return newBuf -}; - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var val = this[offset]; - var mul = 1; - var i = 0; - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul; - } - - return val -}; - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - checkOffset(offset, byteLength, this.length); - } - - var val = this[offset + --byteLength]; - var mul = 1; - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul; - } - - return val -}; - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - return this[offset] -}; - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return this[offset] | (this[offset + 1] << 8) -}; - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return (this[offset] << 8) | this[offset + 1] -}; - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -}; - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -}; - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var val = this[offset]; - var mul = 1; - var i = 0; - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul; - } - mul *= 0x80; - - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - - return val -}; - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var i = byteLength; - var mul = 1; - var val = this[offset + --i]; - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul; - } - mul *= 0x80; - - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - - return val -}; - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -}; - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset] | (this[offset + 1] << 8); - return (val & 0x8000) ? val | 0xFFFF0000 : val -}; - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset + 1] | (this[offset] << 8); - return (val & 0x8000) ? val | 0xFFFF0000 : val -}; - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -}; - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -}; - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return read(this, offset, true, 23, 4) -}; - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return read(this, offset, false, 23, 4) -}; - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return read(this, offset, true, 52, 8) -}; - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return read(this, offset, false, 52, 8) -}; - -function checkInt (buf, value, offset, ext, max, min) { - if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - - var mul = 1; - var i = 0; - this[offset] = value & 0xFF; - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF; - } - - return offset + byteLength -}; - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - - var i = byteLength - 1; - var mul = 1; - this[offset + i] = value & 0xFF; - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF; - } - - return offset + byteLength -}; - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - this[offset] = (value & 0xff); - return offset + 1 -}; - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1; - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8; - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - } else { - objectWriteUInt16(this, value, offset, true); - } - return offset + 2 -}; - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8); - this[offset + 1] = (value & 0xff); - } else { - objectWriteUInt16(this, value, offset, false); - } - return offset + 2 -}; - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1; - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24); - this[offset + 2] = (value >>> 16); - this[offset + 1] = (value >>> 8); - this[offset] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, true); - } - return offset + 4 -}; - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24); - this[offset + 1] = (value >>> 16); - this[offset + 2] = (value >>> 8); - this[offset + 3] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, false); - } - return offset + 4 -}; - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - - var i = 0; - var mul = 1; - var sub = 0; - this[offset] = value & 0xFF; - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1; - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; - } - - return offset + byteLength -}; - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - - var i = byteLength - 1; - var mul = 1; - var sub = 0; - this[offset + i] = value & 0xFF; - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1; - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; - } - - return offset + byteLength -}; - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - if (value < 0) value = 0xff + value + 1; - this[offset] = (value & 0xff); - return offset + 1 -}; - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - } else { - objectWriteUInt16(this, value, offset, true); - } - return offset + 2 -}; - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8); - this[offset + 1] = (value & 0xff); - } else { - objectWriteUInt16(this, value, offset, false); - } - return offset + 2 -}; - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - this[offset + 2] = (value >>> 16); - this[offset + 3] = (value >>> 24); - } else { - objectWriteUInt32(this, value, offset, true); - } - return offset + 4 -}; - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (value < 0) value = 0xffffffff + value + 1; - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24); - this[offset + 1] = (value >>> 16); - this[offset + 2] = (value >>> 8); - this[offset + 3] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, false); - } - return offset + 4 -}; - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4); - } - write(buf, value, offset, littleEndian, 23, 4); - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -}; - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -}; - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8); - } - write(buf, value, offset, littleEndian, 52, 8); - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -}; - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -}; - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0; - if (!end && end !== 0) end = this.length; - if (targetStart >= target.length) targetStart = target.length; - if (!targetStart) targetStart = 0; - if (end > 0 && end < start) end = start; - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length; - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start; - } - - var len = end - start; - var i; - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start]; - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start]; - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ); - } - - return len -}; - -// Usage: -// buffer.fill(number[, offset[, end]]) -// buffer.fill(buffer[, offset[, end]]) -// buffer.fill(string[, offset[, end]][, encoding]) -Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start; - start = 0; - end = this.length; - } else if (typeof end === 'string') { - encoding = end; - end = this.length; - } - if (val.length === 1) { - var code = val.charCodeAt(0); - if (code < 256) { - val = code; - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255; - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0; - end = end === undefined ? this.length : end >>> 0; - - if (!val) val = 0; - - var i; - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val; - } - } else { - var bytes = internalIsBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()); - var len = bytes.length; - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len]; - } - } - - return this -}; - -// HELPER FUNCTIONS -// ================ - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, ''); - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '='; - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity; - var codePoint; - var length = string.length; - var leadSurrogate = null; - var bytes = []; - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i); - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue - } - - // valid lead - leadSurrogate = codePoint; - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - leadSurrogate = codePoint; - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - } - - leadSurrogate = null; - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint); - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ); - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ); - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ); - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = []; - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF); - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo; - var byteArray = []; - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i); - hi = c >> 8; - lo = c % 256; - byteArray.push(lo); - byteArray.push(hi); - } - - return byteArray -} - - -function base64ToBytes (str) { - return toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i]; - } - return i -} - -function isnan (val) { - return val !== val // eslint-disable-line no-self-compare -} - - -// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence -// The _isBuffer check is for Safari 5-7 support, because it's missing -// Object.prototype.constructor. Remove this eventually -function isBuffer(obj) { - return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) -} - -function isFastBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} - -// For Node v0.10 support. Remove this eventually. -function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)) -} - -var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; -function encode$2(decoded) { - var sourceFileIndex = 0; // second field - var sourceCodeLine = 0; // third field - var sourceCodeColumn = 0; // fourth field - var nameIndex = 0; // fifth field - var mappings = ''; - for (var i = 0; i < decoded.length; i++) { - var line = decoded[i]; - if (i > 0) - mappings += ';'; - if (line.length === 0) - continue; - var generatedCodeColumn = 0; // first field - var lineMappings = []; - for (var _i = 0, line_1 = line; _i < line_1.length; _i++) { - var segment = line_1[_i]; - var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn); - generatedCodeColumn = segment[0]; - if (segment.length > 1) { - segmentMappings += - encodeInteger(segment[1] - sourceFileIndex) + - encodeInteger(segment[2] - sourceCodeLine) + - encodeInteger(segment[3] - sourceCodeColumn); - sourceFileIndex = segment[1]; - sourceCodeLine = segment[2]; - sourceCodeColumn = segment[3]; - } - if (segment.length === 5) { - segmentMappings += encodeInteger(segment[4] - nameIndex); - nameIndex = segment[4]; - } - lineMappings.push(segmentMappings); - } - mappings += lineMappings.join(','); - } - return mappings; -} -function encodeInteger(num) { - var result = ''; - num = num < 0 ? (-num << 1) | 1 : num << 1; - do { - var clamped = num & 31; - num >>>= 5; - if (num > 0) { - clamped |= 32; - } - result += chars[clamped]; - } while (num > 0); - return result; -} - -var BitSet = function BitSet(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; -}; - -BitSet.prototype.add = function add (n) { - this.bits[n >> 5] |= 1 << (n & 31); -}; - -BitSet.prototype.has = function has (n) { - return !!(this.bits[n >> 5] & (1 << (n & 31))); -}; - -var Chunk = function Chunk(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - // we make these non-enumerable, for sanity while debugging - Object.defineProperties(this, { - previous: { writable: true, value: null }, - next: { writable: true, value: null } - }); -}; - -Chunk.prototype.appendLeft = function appendLeft (content) { - this.outro += content; -}; - -Chunk.prototype.appendRight = function appendRight (content) { - this.intro = this.intro + content; -}; - -Chunk.prototype.clone = function clone () { - var chunk = new Chunk(this.start, this.end, this.original); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; -}; - -Chunk.prototype.contains = function contains (index) { - return this.start < index && index < this.end; -}; - -Chunk.prototype.eachNext = function eachNext (fn) { - var chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; - } -}; - -Chunk.prototype.eachPrevious = function eachPrevious (fn) { - var chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; - } -}; - -Chunk.prototype.edit = function edit (content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { - this.intro = ''; - this.outro = ''; - } - this.storeName = storeName; - - this.edited = true; - - return this; -}; - -Chunk.prototype.prependLeft = function prependLeft (content) { - this.outro = content + this.outro; -}; - -Chunk.prototype.prependRight = function prependRight (content) { - this.intro = content + this.intro; -}; - -Chunk.prototype.split = function split (index) { - var sliceIndex = index - this.start; - - var originalBefore = this.original.slice(0, sliceIndex); - var originalAfter = this.original.slice(sliceIndex); - - this.original = originalBefore; - - var newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if (this.edited) { - // TODO is this block necessary?... - newChunk.edit('', false); - this.content = ''; - } else { - this.content = originalBefore; - } - - newChunk.next = this.next; - if (newChunk.next) { newChunk.next.previous = newChunk; } - newChunk.previous = this; - this.next = newChunk; - - return newChunk; -}; - -Chunk.prototype.toString = function toString () { - return this.intro + this.content + this.outro; -}; - -Chunk.prototype.trimEnd = function trimEnd (rx) { - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - - var trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit('', undefined, true); - } - return true; - - } else { - this.edit('', undefined, true); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - } -}; - -Chunk.prototype.trimStart = function trimStart (rx) { - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - - var trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.end - trimmed.length); - this.edit('', undefined, true); - } - return true; - - } else { - this.edit('', undefined, true); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - } -}; - -var btoa = function () { - throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); -}; -if (typeof window !== 'undefined' && typeof window.btoa === 'function') { - btoa = function (str) { return window.btoa(unescape(encodeURIComponent(str))); }; -} else if (typeof Buffer === 'function') { - btoa = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); }; -} - -var SourceMap = function SourceMap(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = encode$2(properties.mappings); -}; - -SourceMap.prototype.toString = function toString () { - return JSON.stringify(this); -}; - -SourceMap.prototype.toUrl = function toUrl () { - return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); -}; - -function guessIndent(code) { - var lines = code.split('\n'); - - var tabbed = lines.filter(function (line) { return /^\t+/.test(line); }); - var spaced = lines.filter(function (line) { return /^ {2,}/.test(line); }); - - if (tabbed.length === 0 && spaced.length === 0) { - return null; - } - - // More lines tabbed than spaced? Assume tabs, and - // default to tabs in the case of a tie (or nothing - // to go on) - if (tabbed.length >= spaced.length) { - return '\t'; - } - - // Otherwise, we need to guess the multiple - var min = spaced.reduce(function (previous, current) { - var numSpaces = /^ +/.exec(current)[0].length; - return Math.min(numSpaces, previous); - }, Infinity); - - return new Array(min + 1).join(' '); -} - -function getRelativePath(from, to) { - var fromParts = from.split(/[/\\]/); - var toParts = to.split(/[/\\]/); - - fromParts.pop(); // get dirname - - while (fromParts[0] === toParts[0]) { - fromParts.shift(); - toParts.shift(); - } - - if (fromParts.length) { - var i = fromParts.length; - while (i--) { fromParts[i] = '..'; } - } - - return fromParts.concat(toParts).join('/'); -} - -var toString$2 = Object.prototype.toString; - -function isObject$1(thing) { - return toString$2.call(thing) === '[object Object]'; -} - -function getLocator(source) { - var originalLines = source.split('\n'); - var lineOffsets = []; - - for (var i = 0, pos = 0; i < originalLines.length; i++) { - lineOffsets.push(pos); - pos += originalLines[i].length + 1; - } - - return function locate(index) { - var i = 0; - var j = lineOffsets.length; - while (i < j) { - var m = (i + j) >> 1; - if (index < lineOffsets[m]) { - j = m; - } else { - i = m + 1; - } - } - var line = i - 1; - var column = index - lineOffsets[line]; - return { line: line, column: column }; - }; -} - -var Mappings = function Mappings(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; -}; - -Mappings.prototype.addEdit = function addEdit (sourceIndex, content, loc, nameIndex) { - if (content.length) { - var segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - } else if (this.pending) { - this.rawSegments.push(this.pending); - } - - this.advance(content); - this.pending = null; -}; - -Mappings.prototype.addUneditedChunk = function addUneditedChunk (sourceIndex, chunk, original, loc, sourcemapLocations) { - var originalCharIndex = chunk.start; - var first = true; - - while (originalCharIndex < chunk.end) { - if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { - this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]); - } - - if (original[originalCharIndex] === '\n') { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first = true; - } else { - loc.column += 1; - this.generatedCodeColumn += 1; - first = false; - } - - originalCharIndex += 1; - } - - this.pending = null; -}; - -Mappings.prototype.advance = function advance (str) { - if (!str) { return; } - - var lines = str.split('\n'); - - if (lines.length > 1) { - for (var i = 0; i < lines.length - 1; i++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } - this.generatedCodeColumn = 0; - } - - this.generatedCodeColumn += lines[lines.length - 1].length; -}; - -var n = '\n'; - -var warned = { - insertLeft: false, - insertRight: false, - storeName: false -}; - -var MagicString = function MagicString(string, options) { - if ( options === void 0 ) options = {}; - - var chunk = new Chunk(0, string.length, string); - - Object.defineProperties(this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: new BitSet() }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: guessIndent(string) } - }); - - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; -}; - -MagicString.prototype.addSourcemapLocation = function addSourcemapLocation (char) { - this.sourcemapLocations.add(char); -}; - -MagicString.prototype.append = function append (content) { - if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); } - - this.outro += content; - return this; -}; - -MagicString.prototype.appendLeft = function appendLeft (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byEnd[index]; - - if (chunk) { - chunk.appendLeft(content); - } else { - this.intro += content; - } - return this; -}; - -MagicString.prototype.appendRight = function appendRight (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byStart[index]; - - if (chunk) { - chunk.appendRight(content); - } else { - this.outro += content; - } - return this; -}; - -MagicString.prototype.clone = function clone () { - var cloned = new MagicString(this.original, { filename: this.filename }); - - var originalChunk = this.firstChunk; - var clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); - - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - - var nextOriginalChunk = originalChunk.next; - var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if (this.indentExclusionRanges) { - cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - } - - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - - cloned.intro = this.intro; - cloned.outro = this.outro; - - return cloned; -}; - -MagicString.prototype.generateDecodedMap = function generateDecodedMap (options) { - var this$1 = this; - - options = options || {}; - - var sourceIndex = 0; - var names = Object.keys(this.storedNames); - var mappings = new Mappings(options.hires); - - var locate = getLocator(this.original); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.firstChunk.eachNext(function (chunk) { - var loc = locate(chunk.start); - - if (chunk.intro.length) { mappings.advance(chunk.intro); } - - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1 - ); - } else { - mappings.addUneditedChunk(sourceIndex, chunk, this$1.original, loc, this$1.sourcemapLocations); - } - - if (chunk.outro.length) { mappings.advance(chunk.outro); } - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : null, - sources: [options.source ? getRelativePath(options.file || '', options.source) : null], - sourcesContent: options.includeContent ? [this.original] : [null], - names: names, - mappings: mappings.raw - }; -}; - -MagicString.prototype.generateMap = function generateMap (options) { - return new SourceMap(this.generateDecodedMap(options)); -}; - -MagicString.prototype.getIndentString = function getIndentString () { - return this.indentStr === null ? '\t' : this.indentStr; -}; - -MagicString.prototype.indent = function indent (indentStr, options) { - var pattern = /^[^\r\n]/gm; - - if (isObject$1(indentStr)) { - options = indentStr; - indentStr = undefined; - } - - indentStr = indentStr !== undefined ? indentStr : this.indentStr || '\t'; - - if (indentStr === '') { return this; } // noop - - options = options || {}; - - // Process exclusion ranges - var isExcluded = {}; - - if (options.exclude) { - var exclusions = - typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; - exclusions.forEach(function (exclusion) { - for (var i = exclusion[0]; i < exclusion[1]; i += 1) { - isExcluded[i] = true; - } - }); - } - - var shouldIndentNextCharacter = options.indentStart !== false; - var replacer = function (match) { - if (shouldIndentNextCharacter) { return ("" + indentStr + match); } - shouldIndentNextCharacter = true; - return match; - }; - - this.intro = this.intro.replace(pattern, replacer); - - var charIndex = 0; - var chunk = this.firstChunk; - - while (chunk) { - var end = chunk.end; - - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); - - if (chunk.content.length) { - shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; - } - } - } else { - charIndex = chunk.start; - - while (charIndex < end) { - if (!isExcluded[charIndex]) { - var char = this.original[charIndex]; - - if (char === '\n') { - shouldIndentNextCharacter = true; - } else if (char !== '\r' && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - - if (charIndex === chunk.start) { - chunk.prependRight(indentStr); - } else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } - } - } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace(pattern, replacer); - - return this; -}; - -MagicString.prototype.insert = function insert () { - throw new Error('magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)'); -}; - -MagicString.prototype.insertLeft = function insertLeft (index, content) { - if (!warned.insertLeft) { - console.warn('magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'); // eslint-disable-line no-console - warned.insertLeft = true; - } - - return this.appendLeft(index, content); -}; - -MagicString.prototype.insertRight = function insertRight (index, content) { - if (!warned.insertRight) { - console.warn('magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'); // eslint-disable-line no-console - warned.insertRight = true; - } - - return this.prependRight(index, content); -}; - -MagicString.prototype.move = function move (start, end, index) { - if (index >= start && index <= end) { throw new Error('Cannot move a selection inside itself'); } - - this._split(start); - this._split(end); - this._split(index); - - var first = this.byStart[start]; - var last = this.byEnd[end]; - - var oldLeft = first.previous; - var oldRight = last.next; - - var newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) { return this; } - var newLeft = newRight ? newRight.previous : this.lastChunk; - - if (oldLeft) { oldLeft.next = oldRight; } - if (oldRight) { oldRight.previous = oldLeft; } - - if (newLeft) { newLeft.next = first; } - if (newRight) { newRight.previous = last; } - - if (!first.previous) { this.firstChunk = last.next; } - if (!last.next) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight || null; - - if (!newLeft) { this.firstChunk = first; } - if (!newRight) { this.lastChunk = last; } - return this; -}; - -MagicString.prototype.overwrite = function overwrite (start, end, content, options) { - if (typeof content !== 'string') { throw new TypeError('replacement content must be a string'); } - - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - if (end > this.original.length) { throw new Error('end is out of bounds'); } - if (start === end) - { throw new Error('Cannot overwrite a zero-length range – use appendLeft or prependRight instead'); } - - this._split(start); - this._split(end); - - if (options === true) { - if (!warned.storeName) { - console.warn('The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'); // eslint-disable-line no-console - warned.storeName = true; - } - - options = { storeName: true }; - } - var storeName = options !== undefined ? options.storeName : false; - var contentOnly = options !== undefined ? options.contentOnly : false; - - if (storeName) { - var original = this.original.slice(start, end); - this.storedNames[original] = true; - } - - var first = this.byStart[start]; - var last = this.byEnd[end]; - - if (first) { - if (end > first.end && first.next !== this.byStart[first.end]) { - throw new Error('Cannot overwrite across a split point'); - } - - first.edit(content, storeName, contentOnly); - - if (first !== last) { - var chunk = first.next; - while (chunk !== last) { - chunk.edit('', false); - chunk = chunk.next; - } - - chunk.edit('', false); - } - } else { - // must be inserting at the end - var newChunk = new Chunk(start, end, '').edit(content, storeName); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - return this; -}; - -MagicString.prototype.prepend = function prepend (content) { - if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); } - - this.intro = content + this.intro; - return this; -}; - -MagicString.prototype.prependLeft = function prependLeft (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byEnd[index]; - - if (chunk) { - chunk.prependLeft(content); - } else { - this.intro = content + this.intro; - } - return this; -}; - -MagicString.prototype.prependRight = function prependRight (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byStart[index]; - - if (chunk) { - chunk.prependRight(content); - } else { - this.outro = content + this.outro; - } - return this; -}; - -MagicString.prototype.remove = function remove (start, end) { - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - if (start === end) { return this; } - - if (start < 0 || end > this.original.length) { throw new Error('Character is out of bounds'); } - if (start > end) { throw new Error('end must be greater than start'); } - - this._split(start); - this._split(end); - - var chunk = this.byStart[start]; - - while (chunk) { - chunk.intro = ''; - chunk.outro = ''; - chunk.edit(''); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; -}; - -MagicString.prototype.lastChar = function lastChar () { - if (this.outro.length) - { return this.outro[this.outro.length - 1]; } - var chunk = this.lastChunk; - do { - if (chunk.outro.length) - { return chunk.outro[chunk.outro.length - 1]; } - if (chunk.content.length) - { return chunk.content[chunk.content.length - 1]; } - if (chunk.intro.length) - { return chunk.intro[chunk.intro.length - 1]; } - } while (chunk = chunk.previous); - if (this.intro.length) - { return this.intro[this.intro.length - 1]; } - return ''; -}; - -MagicString.prototype.lastLine = function lastLine () { - var lineIndex = this.outro.lastIndexOf(n); - if (lineIndex !== -1) - { return this.outro.substr(lineIndex + 1); } - var lineStr = this.outro; - var chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n); - if (lineIndex !== -1) - { return chunk.outro.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.outro + lineStr; - } - - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n); - if (lineIndex !== -1) - { return chunk.content.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.content + lineStr; - } - - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n); - if (lineIndex !== -1) - { return chunk.intro.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.intro + lineStr; - } - } while (chunk = chunk.previous); - lineIndex = this.intro.lastIndexOf(n); - if (lineIndex !== -1) - { return this.intro.substr(lineIndex + 1) + lineStr; } - return this.intro + lineStr; -}; - -MagicString.prototype.slice = function slice (start, end) { - if ( start === void 0 ) start = 0; - if ( end === void 0 ) end = this.original.length; - - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - var result = ''; - - // find start chunk - var chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - // found end chunk before start - if (chunk.start < end && chunk.end >= end) { - return result; - } - - chunk = chunk.next; - } - - if (chunk && chunk.edited && chunk.start !== start) - { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); } - - var startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { - result += chunk.intro; - } - - var containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) - { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); } - - var sliceStart = startChunk === chunk ? start - chunk.start : 0; - var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice(sliceStart, sliceEnd); - - if (chunk.outro && (!containsEnd || chunk.end === end)) { - result += chunk.outro; - } - - if (containsEnd) { - break; - } - - chunk = chunk.next; - } - - return result; -}; - -// TODO deprecate this? not really very useful -MagicString.prototype.snip = function snip (start, end) { - var clone = this.clone(); - clone.remove(0, start); - clone.remove(end, clone.original.length); - - return clone; -}; - -MagicString.prototype._split = function _split (index) { - if (this.byStart[index] || this.byEnd[index]) { return; } - - var chunk = this.lastSearchedChunk; - var searchForward = index > chunk.end; - - while (chunk) { - if (chunk.contains(index)) { return this._splitChunk(chunk, index); } - - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - } -}; - -MagicString.prototype._splitChunk = function _splitChunk (chunk, index) { - if (chunk.edited && chunk.content.length) { - // zero-length edited chunks are a special case (overlapping replacements) - var loc = getLocator(this.original)(index); - throw new Error( - ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")") - ); - } - - var newChunk = chunk.split(index); - - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - - if (chunk === this.lastChunk) { this.lastChunk = newChunk; } - - this.lastSearchedChunk = chunk; - return true; -}; - -MagicString.prototype.toString = function toString () { - var str = this.intro; - - var chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; -}; - -MagicString.prototype.isEmpty = function isEmpty () { - var chunk = this.firstChunk; - do { - if (chunk.intro.length && chunk.intro.trim() || - chunk.content.length && chunk.content.trim() || - chunk.outro.length && chunk.outro.trim()) - { return false; } - } while (chunk = chunk.next); - return true; -}; - -MagicString.prototype.length = function length () { - var chunk = this.firstChunk; - var length = 0; - do { - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - } while (chunk = chunk.next); - return length; -}; - -MagicString.prototype.trimLines = function trimLines () { - return this.trim('[\\r\\n]'); -}; - -MagicString.prototype.trim = function trim (charType) { - return this.trimStart(charType).trimEnd(charType); -}; - -MagicString.prototype.trimEndAborted = function trimEndAborted (charType) { - var rx = new RegExp((charType || '\\s') + '+$'); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - - var chunk = this.lastChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimEnd(rx); - - // if chunk was trimmed, we have a new lastChunk - if (chunk.end !== end) { - if (this.lastChunk === chunk) { - this.lastChunk = chunk.next; - } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) { return true; } - chunk = chunk.previous; - } while (chunk); - - return false; -}; - -MagicString.prototype.trimEnd = function trimEnd (charType) { - this.trimEndAborted(charType); - return this; -}; -MagicString.prototype.trimStartAborted = function trimStartAborted (charType) { - var rx = new RegExp('^' + (charType || '\\s') + '+'); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - - var chunk = this.firstChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimStart(rx); - - if (chunk.end !== end) { - // special case... - if (chunk === this.lastChunk) { this.lastChunk = chunk.next; } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) { return true; } - chunk = chunk.next; - } while (chunk); - - return false; -}; - -MagicString.prototype.trimStart = function trimStart (charType) { - this.trimStartAborted(charType); - return this; -}; - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// resolves . and .. elements in a path array with directory names there -// must be no slashes, empty elements, or device names (c:\) in the array -// (so also no leading and trailing slashes - it does not distinguish -// relative and absolute paths) -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = parts.length - 1; i >= 0; i--) { - var last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); - } - } - - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -var splitPathRe = - /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; -var splitPath = function(filename) { - return splitPathRe.exec(filename).slice(1); -}; - -// path.resolve([from ...], to) -// posix version -function resolve() { - var resolvedPath = '', - resolvedAbsolute = false; - - for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { - var path = (i >= 0) ? arguments[i] : '/'; - - // Skip empty and invalid entries - if (typeof path !== 'string') { - throw new TypeError('Arguments to path.resolve must be strings'); - } else if (!path) { - continue; - } - - resolvedPath = path + '/' + resolvedPath; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { - return !!p; - }), !resolvedAbsolute).join('/'); - - return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; -} -// path.normalize(path) -// posix version -function normalize(path) { - var isPathAbsolute = isAbsolute(path), - trailingSlash = substr(path, -1) === '/'; - - // Normalize the path - path = normalizeArray(filter(path.split('/'), function(p) { - return !!p; - }), !isPathAbsolute).join('/'); - - if (!path && !isPathAbsolute) { - path = '.'; - } - if (path && trailingSlash) { - path += '/'; - } - - return (isPathAbsolute ? '/' : '') + path; -} -// posix version -function isAbsolute(path) { - return path.charAt(0) === '/'; -} - -// posix version -function join() { - var paths = Array.prototype.slice.call(arguments, 0); - return normalize(filter(paths, function(p, index) { - if (typeof p !== 'string') { - throw new TypeError('Arguments to path.join must be strings'); - } - return p; - }).join('/')); -} - - -// path.relative(from, to) -// posix version -function relative(from, to) { - from = resolve(from).substr(1); - to = resolve(to).substr(1); - - function trim(arr) { - var start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') break; - } - - var end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') break; - } - - if (start > end) return []; - return arr.slice(start, end - start + 1); - } - - var fromParts = trim(from.split('/')); - var toParts = trim(to.split('/')); - - var length = Math.min(fromParts.length, toParts.length); - var samePartsLength = length; - for (var i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; - } - } - - var outputParts = []; - for (var i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -} - -var sep = '/'; -var delimiter = ':'; - -function dirname(path) { - var result = splitPath(path), - root = result[0], - dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.substr(0, dir.length - 1); - } - - return root + dir; -} - -function basename(path, ext) { - var f = splitPath(path)[2]; - // TODO: make this comparison case-insensitive on windows? - if (ext && f.substr(-1 * ext.length) === ext) { - f = f.substr(0, f.length - ext.length); - } - return f; -} - - -function extname(path) { - return splitPath(path)[3]; -} -var path = { - extname: extname, - basename: basename, - dirname: dirname, - sep: sep, - delimiter: delimiter, - relative: relative, - join: join, - isAbsolute: isAbsolute, - normalize: normalize, - resolve: resolve -}; -function filter (xs, f) { - if (xs.filter) return xs.filter(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - if (f(xs[i], i, xs)) res.push(xs[i]); - } - return res; -} - -// String.prototype.substr - negative index don't work in IE8 -var substr = 'ab'.substr(-1) === 'b' ? - function (str, start, len) { return str.substr(start, len) } : - function (str, start, len) { - if (start < 0) start = str.length + start; - return str.substr(start, len); - } -; - -var _polyfillNode_path = /*#__PURE__*/Object.freeze({ - __proto__: null, - resolve: resolve, - normalize: normalize, - isAbsolute: isAbsolute, - join: join, - relative: relative, - sep: sep, - delimiter: delimiter, - dirname: dirname, - basename: basename, - extname: extname, - 'default': path -}); - -/*! https://mths.be/punycode v1.4.1 by @mathias */ - - -/** Highest positive signed 32-bit float value */ -var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 - -/** Bootstring parameters */ -var base = 36; -var tMin = 1; -var tMax = 26; -var skew = 38; -var damp = 700; -var initialBias = 72; -var initialN = 128; // 0x80 -var delimiter$1 = '-'; // '\x2D' -var regexNonASCII = /[^\x20-\x7E]/; // unprintable ASCII chars + non-ASCII chars -var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators - -/** Error messages */ -var errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' -}; - -/** Convenience shortcuts */ -var baseMinusTMin = base - tMin; -var floor = Math.floor; -var stringFromCharCode = String.fromCharCode; - -/*--------------------------------------------------------------------------*/ - -/** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ -function error(type) { - throw new RangeError(errors[type]); -} - -/** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ -function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; -} - -/** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ -function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; -} - -/** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see <https://mathiasbynens.be/notes/javascript-encoding> - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ -function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; -} - -/** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ -function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); -} - -/** - * Bias adaptation function as per section 3.4 of RFC 3492. - * https://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ -function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for ( /* no initialization */ ; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); -} - -/** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ -function encode$3(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter$1); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */ ; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); -} - -/** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ -function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) ? - 'xn--' + encode$3(string) : - string; - }); -} - -// shim for using process in browser -// based off https://github.com/defunctzombie/node-process/blob/master/browser.js - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -var cachedSetTimeout = defaultSetTimout; -var cachedClearTimeout = defaultClearTimeout; -if (typeof global.setTimeout === 'function') { - cachedSetTimeout = setTimeout; -} -if (typeof global.clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; -} - -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} -function nextTick(fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -} -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -var title = 'browser'; -var platform = 'browser'; -var browser = true; -var env = {}; -var argv = []; -var version = ''; // empty string to avoid regexp issues -var versions = {}; -var release = {}; -var config = {}; - -function noop() {} - -var on = noop; -var addListener = noop; -var once = noop; -var off = noop; -var removeListener = noop; -var removeAllListeners = noop; -var emit = noop; - -function binding(name) { - throw new Error('process.binding is not supported'); -} - -function cwd () { return '/' } -function chdir (dir) { - throw new Error('process.chdir is not supported'); -}function umask() { return 0; } - -// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js -var performance = global.performance || {}; -var performanceNow = - performance.now || - performance.mozNow || - performance.msNow || - performance.oNow || - performance.webkitNow || - function(){ return (new Date()).getTime() }; - -// generate timestamp or delta -// see http://nodejs.org/api/process.html#process_process_hrtime -function hrtime(previousTimestamp){ - var clocktime = performanceNow.call(performance)*1e-3; - var seconds = Math.floor(clocktime); - var nanoseconds = Math.floor((clocktime%1)*1e9); - if (previousTimestamp) { - seconds = seconds - previousTimestamp[0]; - nanoseconds = nanoseconds - previousTimestamp[1]; - if (nanoseconds<0) { - seconds--; - nanoseconds += 1e9; - } - } - return [seconds,nanoseconds] -} - -var startTime = new Date(); -function uptime() { - var currentTime = new Date(); - var dif = currentTime - startTime; - return dif / 1000; -} - -var browser$1 = { - nextTick: nextTick, - title: title, - browser: browser, - env: env, - argv: argv, - version: version, - versions: versions, - on: on, - addListener: addListener, - once: once, - off: off, - removeListener: removeListener, - removeAllListeners: removeAllListeners, - emit: emit, - binding: binding, - cwd: cwd, - chdir: chdir, - umask: umask, - hrtime: hrtime, - platform: platform, - release: release, - config: config, - uptime: uptime -}; - -var inherits; -if (typeof Object.create === 'function'){ - inherits = function inherits(ctor, superCtor) { - // implementation from standard node.js 'util' module - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - inherits = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; -} -var inherits$1 = inherits; - -var formatRegExp = /%[sdj%]/g; -function format(f) { - if (!isString$1(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject$2(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -} - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -function deprecate(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return deprecate(fn, msg).apply(this, arguments); - }; - } - - if (browser$1.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (browser$1.throwDeprecation) { - throw new Error(msg); - } else if (browser$1.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -var debugs = {}; -var debugEnviron; -function debuglog(set) { - if (isUndefined(debugEnviron)) - debugEnviron = browser$1.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = 0; - debugs[set] = function() { - var msg = format.apply(null, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -} - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - _extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction$1(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString$1(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction$1(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray$2(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction$1(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString$1(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty$1(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty$1(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var length = output.reduce(function(prev, cur) { - if (cur.indexOf('\n') >= 0) ; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray$2(ar) { - return Array.isArray(ar); -} - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} - -function isNull(arg) { - return arg === null; -} - -function isNullOrUndefined(arg) { - return arg == null; -} - -function isNumber(arg) { - return typeof arg === 'number'; -} - -function isString$1(arg) { - return typeof arg === 'string'; -} - -function isSymbol$1(arg) { - return typeof arg === 'symbol'; -} - -function isUndefined(arg) { - return arg === void 0; -} - -function isRegExp(re) { - return isObject$2(re) && objectToString$1(re) === '[object RegExp]'; -} - -function isObject$2(arg) { - return typeof arg === 'object' && arg !== null; -} - -function isDate(d) { - return isObject$2(d) && objectToString$1(d) === '[object Date]'; -} - -function isError(e) { - return isObject$2(e) && - (objectToString$1(e) === '[object Error]' || e instanceof Error); -} - -function isFunction$1(arg) { - return typeof arg === 'function'; -} - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} - -function isBuffer$1(maybeBuf) { - return Buffer.isBuffer(maybeBuf); -} - -function objectToString$1(o) { - return Object.prototype.toString.call(o); -} - - -function pad$1(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad$1(d.getHours()), - pad$1(d.getMinutes()), - pad$1(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -function log() { - console.log('%s - %s', timestamp(), format.apply(null, arguments)); -} - -function _extend(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject$2(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -} -function hasOwnProperty$1(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -var _polyfillNode_util = { - inherits: inherits$1, - _extend: _extend, - log: log, - isBuffer: isBuffer$1, - isPrimitive: isPrimitive, - isFunction: isFunction$1, - isError: isError, - isDate: isDate, - isObject: isObject$2, - isRegExp: isRegExp, - isUndefined: isUndefined, - isSymbol: isSymbol$1, - isString: isString$1, - isNumber: isNumber, - isNullOrUndefined: isNullOrUndefined, - isNull: isNull, - isBoolean: isBoolean, - isArray: isArray$2, - inspect: inspect, - deprecate: deprecate, - format: format, - debuglog: debuglog -}; - -var _polyfillNode_util$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - format: format, - deprecate: deprecate, - debuglog: debuglog, - inspect: inspect, - isArray: isArray$2, - isBoolean: isBoolean, - isNull: isNull, - isNullOrUndefined: isNullOrUndefined, - isNumber: isNumber, - isString: isString$1, - isSymbol: isSymbol$1, - isUndefined: isUndefined, - isRegExp: isRegExp, - isObject: isObject$2, - isDate: isDate, - isError: isError, - isFunction: isFunction$1, - isPrimitive: isPrimitive, - isBuffer: isBuffer$1, - log: log, - inherits: inherits$1, - _extend: _extend, - 'default': _polyfillNode_util -}); - -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty$2(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} -var isArray$3 = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; -function stringifyPrimitive(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -} - -function stringify (obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return map$1(objectKeys(obj), function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (isArray$3(obj[k])) { - return map$1(obj[k], function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -} -function map$1 (xs, f) { - if (xs.map) return xs.map(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - res.push(f(xs[i], i)); - } - return res; -} - -var objectKeys = Object.keys || function (obj) { - var res = []; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); - } - return res; -}; - -function parse$2(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty$2(obj, k)) { - obj[k] = v; - } else if (isArray$3(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -} - -// Copyright Joyent, Inc. and other Node contributors. -var _polyfillNode_url = { - parse: urlParse, - resolve: urlResolve, - resolveObject: urlResolveObject, - format: urlFormat, - Url: Url -}; -function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.host = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.query = null; - this.pathname = null; - this.path = null; - this.href = null; -} - -// Reference: RFC 3986, RFC 1808, RFC 2396 - -// define these here so at least they only have to be -// compiled once on the first module load. -var protocolPattern = /^([a-z0-9.+-]+:)/i, - portPattern = /:[0-9]*$/, - - // Special case for a simple path URL - simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, - - // RFC 2396: characters reserved for delimiting URLs. - // We actually just auto-escape these. - delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], - - // RFC 2396: characters not allowed for various reasons. - unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), - - // Allowed by RFCs, but cause of XSS attacks. Always escape these. - autoEscape = ['\''].concat(unwise), - // Characters that are never ever allowed in a hostname. - // Note that any invalid chars are also handled, but these - // are the ones that are *expected* to be seen, so we fast-path - // them. - nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), - hostEndingChars = ['/', '?', '#'], - hostnameMaxLen = 255, - hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, - hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, - // protocols that can allow "unsafe" and "unwise" chars. - unsafeProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that never have a hostname. - hostlessProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that always contain a // bit. - slashedProtocol = { - 'http': true, - 'https': true, - 'ftp': true, - 'gopher': true, - 'file': true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true - }; - -function urlParse(url, parseQueryString, slashesDenoteHost) { - if (url && isObject$2(url) && url instanceof Url) return url; - - var u = new Url; - u.parse(url, parseQueryString, slashesDenoteHost); - return u; -} -Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { - return parse$3(this, url, parseQueryString, slashesDenoteHost); -}; - -function parse$3(self, url, parseQueryString, slashesDenoteHost) { - if (!isString$1(url)) { - throw new TypeError('Parameter \'url\' must be a string, not ' + typeof url); - } - - // Copy chrome, IE, opera backslash-handling behavior. - // Back slashes before the query string get converted to forward slashes - // See: https://code.google.com/p/chromium/issues/detail?id=25916 - var queryIndex = url.indexOf('?'), - splitter = - (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', - uSplit = url.split(splitter), - slashRegex = /\\/g; - uSplit[0] = uSplit[0].replace(slashRegex, '/'); - url = uSplit.join(splitter); - - var rest = url; - - // trim before proceeding. - // This is to support parse stuff like " http://foo.com \n" - rest = rest.trim(); - - if (!slashesDenoteHost && url.split('#').length === 1) { - // Try fast path regexp - var simplePath = simplePathPattern.exec(rest); - if (simplePath) { - self.path = rest; - self.href = rest; - self.pathname = simplePath[1]; - if (simplePath[2]) { - self.search = simplePath[2]; - if (parseQueryString) { - self.query = parse$2(self.search.substr(1)); - } else { - self.query = self.search.substr(1); - } - } else if (parseQueryString) { - self.search = ''; - self.query = {}; - } - return self; - } - } - - var proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - var lowerProto = proto.toLowerCase(); - self.protocol = lowerProto; - rest = rest.substr(proto.length); - } - - // figure out if it's got a host - // user@server is *always* interpreted as a hostname, and url - // resolution will treat //foo/bar as host=foo,path=bar because that's - // how the browser resolves relative URLs. - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var slashes = rest.substr(0, 2) === '//'; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - self.slashes = true; - } - } - var i, hec, l, p; - if (!hostlessProtocol[proto] && - (slashes || (proto && !slashedProtocol[proto]))) { - - // there's a hostname. - // the first instance of /, ?, ;, or # ends the host. - // - // If there is an @ in the hostname, then non-host chars *are* allowed - // to the left of the last @ sign, unless some host-ending character - // comes *before* the @-sign. - // URLs are obnoxious. - // - // ex: - // http://a@b@c/ => user:a@b host:c - // http://a@b?@c => user:a host:c path:/?@c - - // v0.12 TODO(isaacs): This is not quite how Chrome does things. - // Review our test case against browsers more comprehensively. - - // find the first instance of any hostEndingChars - var hostEnd = -1; - for (i = 0; i < hostEndingChars.length; i++) { - hec = rest.indexOf(hostEndingChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - - // at this point, either we have an explicit point where the - // auth portion cannot go past, or the last @ char is the decider. - var auth, atSign; - if (hostEnd === -1) { - // atSign can be anywhere. - atSign = rest.lastIndexOf('@'); - } else { - // atSign must be in auth portion. - // http://a@b/c@d => host:b auth:a path:/c@d - atSign = rest.lastIndexOf('@', hostEnd); - } - - // Now we have a portion which is definitely the auth. - // Pull that off. - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - self.auth = decodeURIComponent(auth); - } - - // the host is the remaining to the left of the first non-host char - hostEnd = -1; - for (i = 0; i < nonHostChars.length; i++) { - hec = rest.indexOf(nonHostChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - // if we still have not hit it, then the entire thing is a host. - if (hostEnd === -1) - hostEnd = rest.length; - - self.host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); - - // pull out port. - parseHost(self); - - // we've indicated that there is a hostname, - // so even if it's empty, it has to be present. - self.hostname = self.hostname || ''; - - // if hostname begins with [ and ends with ] - // assume that it's an IPv6 address. - var ipv6Hostname = self.hostname[0] === '[' && - self.hostname[self.hostname.length - 1] === ']'; - - // validate a little. - if (!ipv6Hostname) { - var hostparts = self.hostname.split(/\./); - for (i = 0, l = hostparts.length; i < l; i++) { - var part = hostparts[i]; - if (!part) continue; - if (!part.match(hostnamePartPattern)) { - var newpart = ''; - for (var j = 0, k = part.length; j < k; j++) { - if (part.charCodeAt(j) > 127) { - // we replace non-ASCII char with a temporary placeholder - // we need this to make sure size of hostname is not - // broken by replacing non-ASCII by nothing - newpart += 'x'; - } else { - newpart += part[j]; - } - } - // we test again with ASCII char only - if (!newpart.match(hostnamePartPattern)) { - var validParts = hostparts.slice(0, i); - var notHost = hostparts.slice(i + 1); - var bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = '/' + notHost.join('.') + rest; - } - self.hostname = validParts.join('.'); - break; - } - } - } - } - - if (self.hostname.length > hostnameMaxLen) { - self.hostname = ''; - } else { - // hostnames are always lower case. - self.hostname = self.hostname.toLowerCase(); - } - - if (!ipv6Hostname) { - // IDNA Support: Returns a punycoded representation of "domain". - // It only converts parts of the domain name that - // have non-ASCII characters, i.e. it doesn't matter if - // you call it with a domain that already is ASCII-only. - self.hostname = toASCII(self.hostname); - } - - p = self.port ? ':' + self.port : ''; - var h = self.hostname || ''; - self.host = h + p; - self.href += self.host; - - // strip [ and ] from the hostname - // the host field still retains them, though - if (ipv6Hostname) { - self.hostname = self.hostname.substr(1, self.hostname.length - 2); - if (rest[0] !== '/') { - rest = '/' + rest; - } - } - } - - // now rest is set to the post-host stuff. - // chop off any delim chars. - if (!unsafeProtocol[lowerProto]) { - - // First, make 100% sure that any "autoEscape" chars get - // escaped, even if encodeURIComponent doesn't think they - // need to be. - for (i = 0, l = autoEscape.length; i < l; i++) { - var ae = autoEscape[i]; - if (rest.indexOf(ae) === -1) - continue; - var esc = encodeURIComponent(ae); - if (esc === ae) { - esc = escape(ae); - } - rest = rest.split(ae).join(esc); - } - } - - - // chop off from the tail first. - var hash = rest.indexOf('#'); - if (hash !== -1) { - // got a fragment string. - self.hash = rest.substr(hash); - rest = rest.slice(0, hash); - } - var qm = rest.indexOf('?'); - if (qm !== -1) { - self.search = rest.substr(qm); - self.query = rest.substr(qm + 1); - if (parseQueryString) { - self.query = parse$2(self.query); - } - rest = rest.slice(0, qm); - } else if (parseQueryString) { - // no query string, but parseQueryString still requested - self.search = ''; - self.query = {}; - } - if (rest) self.pathname = rest; - if (slashedProtocol[lowerProto] && - self.hostname && !self.pathname) { - self.pathname = '/'; - } - - //to support http.request - if (self.pathname || self.search) { - p = self.pathname || ''; - var s = self.search || ''; - self.path = p + s; - } - - // finally, reconstruct the href based on what has been validated. - self.href = format$1(self); - return self; -} - -// format a parsed object into a url string -function urlFormat(obj) { - // ensure it's an object, and not a string url. - // If it's an obj, this is a no-op. - // this way, you can call url_format() on strings - // to clean up potentially wonky urls. - if (isString$1(obj)) obj = parse$3({}, obj); - return format$1(obj); -} - -function format$1(self) { - var auth = self.auth || ''; - if (auth) { - auth = encodeURIComponent(auth); - auth = auth.replace(/%3A/i, ':'); - auth += '@'; - } - - var protocol = self.protocol || '', - pathname = self.pathname || '', - hash = self.hash || '', - host = false, - query = ''; - - if (self.host) { - host = auth + self.host; - } else if (self.hostname) { - host = auth + (self.hostname.indexOf(':') === -1 ? - self.hostname : - '[' + this.hostname + ']'); - if (self.port) { - host += ':' + self.port; - } - } - - if (self.query && - isObject$2(self.query) && - Object.keys(self.query).length) { - query = stringify(self.query); - } - - var search = self.search || (query && ('?' + query)) || ''; - - if (protocol && protocol.substr(-1) !== ':') protocol += ':'; - - // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. - // unless they had them to begin with. - if (self.slashes || - (!protocol || slashedProtocol[protocol]) && host !== false) { - host = '//' + (host || ''); - if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; - } else if (!host) { - host = ''; - } - - if (hash && hash.charAt(0) !== '#') hash = '#' + hash; - if (search && search.charAt(0) !== '?') search = '?' + search; - - pathname = pathname.replace(/[?#]/g, function(match) { - return encodeURIComponent(match); - }); - search = search.replace('#', '%23'); - - return protocol + host + pathname + search + hash; -} - -Url.prototype.format = function() { - return format$1(this); -}; - -function urlResolve(source, relative) { - return urlParse(source, false, true).resolve(relative); -} - -Url.prototype.resolve = function(relative) { - return this.resolveObject(urlParse(relative, false, true)).format(); -}; - -function urlResolveObject(source, relative) { - if (!source) return relative; - return urlParse(source, false, true).resolveObject(relative); -} - -Url.prototype.resolveObject = function(relative) { - if (isString$1(relative)) { - var rel = new Url(); - rel.parse(relative, false, true); - relative = rel; - } - - var result = new Url(); - var tkeys = Object.keys(this); - for (var tk = 0; tk < tkeys.length; tk++) { - var tkey = tkeys[tk]; - result[tkey] = this[tkey]; - } - - // hash is always overridden, no matter what. - // even href="" will remove it. - result.hash = relative.hash; - - // if the relative url is empty, then there's nothing left to do here. - if (relative.href === '') { - result.href = result.format(); - return result; - } - - // hrefs like //foo/bar always cut to the protocol. - if (relative.slashes && !relative.protocol) { - // take everything except the protocol from relative - var rkeys = Object.keys(relative); - for (var rk = 0; rk < rkeys.length; rk++) { - var rkey = rkeys[rk]; - if (rkey !== 'protocol') - result[rkey] = relative[rkey]; - } - - //urlParse appends trailing / to urls like http://www.example.com - if (slashedProtocol[result.protocol] && - result.hostname && !result.pathname) { - result.path = result.pathname = '/'; - } - - result.href = result.format(); - return result; - } - var relPath; - if (relative.protocol && relative.protocol !== result.protocol) { - // if it's a known url protocol, then changing - // the protocol does weird things - // first, if it's not file:, then we MUST have a host, - // and if there was a path - // to begin with, then we MUST have a path. - // if it is file:, then the host is dropped, - // because that's known to be hostless. - // anything else is assumed to be absolute. - if (!slashedProtocol[relative.protocol]) { - var keys = Object.keys(relative); - for (var v = 0; v < keys.length; v++) { - var k = keys[v]; - result[k] = relative[k]; - } - result.href = result.format(); - return result; - } - - result.protocol = relative.protocol; - if (!relative.host && !hostlessProtocol[relative.protocol]) { - relPath = (relative.pathname || '').split('/'); - while (relPath.length && !(relative.host = relPath.shift())); - if (!relative.host) relative.host = ''; - if (!relative.hostname) relative.hostname = ''; - if (relPath[0] !== '') relPath.unshift(''); - if (relPath.length < 2) relPath.unshift(''); - result.pathname = relPath.join('/'); - } else { - result.pathname = relative.pathname; - } - result.search = relative.search; - result.query = relative.query; - result.host = relative.host || ''; - result.auth = relative.auth; - result.hostname = relative.hostname || relative.host; - result.port = relative.port; - // to support http.request - if (result.pathname || result.search) { - var p = result.pathname || ''; - var s = result.search || ''; - result.path = p + s; - } - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; - } - - var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), - isRelAbs = ( - relative.host || - relative.pathname && relative.pathname.charAt(0) === '/' - ), - mustEndAbs = (isRelAbs || isSourceAbs || - (result.host && relative.pathname)), - removeAllDots = mustEndAbs, - srcPath = result.pathname && result.pathname.split('/') || [], - psychotic = result.protocol && !slashedProtocol[result.protocol]; - relPath = relative.pathname && relative.pathname.split('/') || []; - // if the url is a non-slashed url, then relative - // links like ../.. should be able - // to crawl up to the hostname, as well. This is strange. - // result.protocol has already been set by now. - // Later on, put the first path part into the host field. - if (psychotic) { - result.hostname = ''; - result.port = null; - if (result.host) { - if (srcPath[0] === '') srcPath[0] = result.host; - else srcPath.unshift(result.host); - } - result.host = ''; - if (relative.protocol) { - relative.hostname = null; - relative.port = null; - if (relative.host) { - if (relPath[0] === '') relPath[0] = relative.host; - else relPath.unshift(relative.host); - } - relative.host = null; - } - mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); - } - var authInHost; - if (isRelAbs) { - // it's absolute. - result.host = (relative.host || relative.host === '') ? - relative.host : result.host; - result.hostname = (relative.hostname || relative.hostname === '') ? - relative.hostname : result.hostname; - result.search = relative.search; - result.query = relative.query; - srcPath = relPath; - // fall through to the dot-handling below. - } else if (relPath.length) { - // it's relative - // throw away the existing file, and take the new path instead. - if (!srcPath) srcPath = []; - srcPath.pop(); - srcPath = srcPath.concat(relPath); - result.search = relative.search; - result.query = relative.query; - } else if (!isNullOrUndefined(relative.search)) { - // just pull out the search. - // like href='?foo'. - // Put this after the other two cases because it simplifies the booleans - if (psychotic) { - result.hostname = result.host = srcPath.shift(); - //occationaly the auth can get stuck only in host - //this especially happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - result.search = relative.search; - result.query = relative.query; - //to support http.request - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.href = result.format(); - return result; - } - - if (!srcPath.length) { - // no path at all. easy. - // we've already handled the other stuff above. - result.pathname = null; - //to support http.request - if (result.search) { - result.path = '/' + result.search; - } else { - result.path = null; - } - result.href = result.format(); - return result; - } - - // if a url ENDs in . or .., then it must get a trailing slash. - // however, if it ends in anything else non-slashy, - // then it must NOT get a trailing slash. - var last = srcPath.slice(-1)[0]; - var hasTrailingSlash = ( - (result.host || relative.host || srcPath.length > 1) && - (last === '.' || last === '..') || last === ''); - - // strip single dots, resolve double dots to parent dir - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = srcPath.length; i >= 0; i--) { - last = srcPath[i]; - if (last === '.') { - srcPath.splice(i, 1); - } else if (last === '..') { - srcPath.splice(i, 1); - up++; - } else if (up) { - srcPath.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { - srcPath.unshift('..'); - } - } - - if (mustEndAbs && srcPath[0] !== '' && - (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { - srcPath.unshift(''); - } - - if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { - srcPath.push(''); - } - - var isAbsolute = srcPath[0] === '' || - (srcPath[0] && srcPath[0].charAt(0) === '/'); - - // put the host back - if (psychotic) { - result.hostname = result.host = isAbsolute ? '' : - srcPath.length ? srcPath.shift() : ''; - //occationaly the auth can get stuck only in host - //this especially happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - - mustEndAbs = mustEndAbs || (result.host && srcPath.length); - - if (mustEndAbs && !isAbsolute) { - srcPath.unshift(''); - } - - if (!srcPath.length) { - result.pathname = null; - result.path = null; - } else { - result.pathname = srcPath.join('/'); - } - - //to support request.http - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.auth = relative.auth || result.auth; - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; -}; - -Url.prototype.parseHost = function() { - return parseHost(this); -}; - -function parseHost(self) { - var host = self.host; - var port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ':') { - self.port = port.substr(1); - } - host = host.substr(0, host.length - port.length); - } - if (host) self.hostname = host; -} - -var _polyfillNode_url$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - parse: urlParse, - resolve: urlResolve, - resolveObject: urlResolveObject, - format: urlFormat, - 'default': _polyfillNode_url, - Url: Url -}); - -function isRelativeUrl(url) { - const firstChar = url.charAt(0); - return firstChar === '.' || firstChar === '~' || firstChar === '@'; -} -const externalRE = /^(https?:)?\/\//; -function isExternalUrl(url) { - return externalRE.test(url); -} -const dataUrlRE = /^\s*data:/i; -function isDataUrl(url) { - return dataUrlRE.test(url); -} -/** - * Parses string url into URL object. - */ -function parseUrl(url) { - const firstChar = url.charAt(0); - if (firstChar === '~') { - const secondChar = url.charAt(1); - url = url.slice(secondChar === '/' ? 2 : 1); - } - return parseUriParts(url); -} -/** - * vuejs/component-compiler-utils#22 Support uri fragment in transformed require - * @param urlString an url as a string - */ -function parseUriParts(urlString) { - // A TypeError is thrown if urlString is not a string - // @see https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost - return urlParse(isString(urlString) ? urlString : '', false, true); -} - -const defaultAssetUrlOptions = { - base: null, - includeAbsolute: false, - tags: { - video: ['src', 'poster'], - source: ['src'], - img: ['src'], - image: ['xlink:href', 'href'], - use: ['xlink:href', 'href'] - } -}; -const normalizeOptions = (options) => { - if (Object.keys(options).some(key => isArray(options[key]))) { - // legacy option format which directly passes in tags config - return Object.assign(Object.assign({}, defaultAssetUrlOptions), { tags: options }); - } - return Object.assign(Object.assign({}, defaultAssetUrlOptions), options); -}; -const createAssetUrlTransformWithOptions = (options) => { - return (node, context) => transformAssetUrl(node, context, options); -}; -/** - * A `@vue/compiler-core` plugin that transforms relative asset urls into - * either imports or absolute urls. - * - * ``` js - * // Before - * createVNode('img', { src: './logo.png' }) - * - * // After - * import _imports_0 from './logo.png' - * createVNode('img', { src: _imports_0 }) - * ``` - */ -const transformAssetUrl = (node, context, options = defaultAssetUrlOptions) => { - if (node.type === 1 /* ELEMENT */) { - if (!node.props.length) { - return; - } - const tags = options.tags || defaultAssetUrlOptions.tags; - const attrs = tags[node.tag]; - const wildCardAttrs = tags['*']; - if (!attrs && !wildCardAttrs) { - return; - } - const assetAttrs = (attrs || []).concat(wildCardAttrs || []); - node.props.forEach((attr, index) => { - if (attr.type !== 6 /* ATTRIBUTE */ || - !assetAttrs.includes(attr.name) || - !attr.value || - isExternalUrl(attr.value.content) || - isDataUrl(attr.value.content) || - attr.value.content[0] === '#' || - (!options.includeAbsolute && !isRelativeUrl(attr.value.content))) { - return; - } - const url = parseUrl(attr.value.content); - if (options.base && attr.value.content[0] === '.') { - // explicit base - directly rewrite relative urls into absolute url - // to avoid generating extra imports - // Allow for full hostnames provided in options.base - const base = parseUrl(options.base); - const protocol = base.protocol || ''; - const host = base.host ? protocol + '//' + base.host : ''; - const basePath = base.path || '/'; - // when packaged in the browser, path will be using the posix- - // only version provided by rollup-plugin-node-builtins. - attr.value.content = - host + - (path.posix || path).join(basePath, url.path + (url.hash || '')); - return; - } - // otherwise, transform the url into an import. - // this assumes a bundler will resolve the import into the correct - // absolute url (e.g. webpack file-loader) - const exp = getImportsExpressionExp(url.path, url.hash, attr.loc, context); - node.props[index] = { - type: 7 /* DIRECTIVE */, - name: 'bind', - arg: createSimpleExpression(attr.name, true, attr.loc), - exp, - modifiers: [], - loc: attr.loc - }; - }); - } -}; -function getImportsExpressionExp(path, hash, loc, context) { - if (path) { - let name; - let exp; - const existingIndex = context.imports.findIndex(i => i.path === path); - if (existingIndex > -1) { - name = `_imports_${existingIndex}`; - exp = context.imports[existingIndex].exp; - } - else { - name = `_imports_${context.imports.length}`; - exp = createSimpleExpression(name, false, loc, 3 /* CAN_STRINGIFY */); - context.imports.push({ exp, path }); - } - if (!hash) { - return exp; - } - const hashExp = `${name} + '${hash}'`; - const finalExp = createSimpleExpression(hashExp, false, loc, 3 /* CAN_STRINGIFY */); - if (!context.hoistStatic) { - return finalExp; - } - const existingHoistIndex = context.hoists.findIndex(h => { - return (h && - h.type === 4 /* SIMPLE_EXPRESSION */ && - !h.isStatic && - h.content === hashExp); - }); - if (existingHoistIndex > -1) { - return createSimpleExpression(`_hoisted_${existingHoistIndex + 1}`, false, loc, 3 /* CAN_STRINGIFY */); - } - return context.hoist(finalExp); - } - else { - return createSimpleExpression(`''`, false, loc, 3 /* CAN_STRINGIFY */); - } -} - -const srcsetTags = ['img', 'source']; -// http://w3c.github.io/html/semantics-embedded-content.html#ref-for-image-candidate-string-5 -const escapedSpaceCharacters = /( |\\t|\\n|\\f|\\r)+/g; -const createSrcsetTransformWithOptions = (options) => { - return (node, context) => transformSrcset(node, context, options); -}; -const transformSrcset = (node, context, options = defaultAssetUrlOptions) => { - if (node.type === 1 /* ELEMENT */) { - if (srcsetTags.includes(node.tag) && node.props.length) { - node.props.forEach((attr, index) => { - if (attr.name === 'srcset' && attr.type === 6 /* ATTRIBUTE */) { - if (!attr.value) - return; - const value = attr.value.content; - if (!value) - return; - const imageCandidates = value.split(',').map(s => { - // The attribute value arrives here with all whitespace, except - // normal spaces, represented by escape sequences - const [url, descriptor] = s - .replace(escapedSpaceCharacters, ' ') - .trim() - .split(' ', 2); - return { url, descriptor }; - }); - // data urls contains comma after the encoding so we need to re-merge - // them - for (let i = 0; i < imageCandidates.length; i++) { - const { url } = imageCandidates[i]; - if (isDataUrl(url)) { - imageCandidates[i + 1].url = - url + ',' + imageCandidates[i + 1].url; - imageCandidates.splice(i, 1); - } - } - const shouldProcessUrl = (url) => { - return (!isExternalUrl(url) && - !isDataUrl(url) && - (options.includeAbsolute || isRelativeUrl(url))); - }; - // When srcset does not contain any qualified URLs, skip transforming - if (!imageCandidates.some(({ url }) => shouldProcessUrl(url))) { - return; - } - if (options.base) { - const base = options.base; - const set = []; - let needImportTransform = false; - imageCandidates.forEach(candidate => { - let { url, descriptor } = candidate; - descriptor = descriptor ? ` ${descriptor}` : ``; - if (url[0] === '.') { - candidate.url = (path.posix || path).join(base, url); - set.push(candidate.url + descriptor); - } - else if (shouldProcessUrl(url)) { - needImportTransform = true; - } - else { - set.push(url + descriptor); - } - }); - if (!needImportTransform) { - attr.value.content = set.join(', '); - return; - } - } - const compoundExpression = createCompoundExpression([], attr.loc); - imageCandidates.forEach(({ url, descriptor }, index) => { - if (shouldProcessUrl(url)) { - const { path } = parseUrl(url); - let exp; - if (path) { - const existingImportsIndex = context.imports.findIndex(i => i.path === path); - if (existingImportsIndex > -1) { - exp = createSimpleExpression(`_imports_${existingImportsIndex}`, false, attr.loc, 3 /* CAN_STRINGIFY */); - } - else { - exp = createSimpleExpression(`_imports_${context.imports.length}`, false, attr.loc, 3 /* CAN_STRINGIFY */); - context.imports.push({ exp, path }); - } - compoundExpression.children.push(exp); - } - } - else { - const exp = createSimpleExpression(`"${url}"`, false, attr.loc, 3 /* CAN_STRINGIFY */); - compoundExpression.children.push(exp); - } - const isNotLast = imageCandidates.length - 1 > index; - if (descriptor && isNotLast) { - compoundExpression.children.push(` + ' ${descriptor}, ' + `); - } - else if (descriptor) { - compoundExpression.children.push(` + ' ${descriptor}'`); - } - else if (isNotLast) { - compoundExpression.children.push(` + ', ' + `); - } - }); - let exp = compoundExpression; - if (context.hoistStatic) { - exp = context.hoist(compoundExpression); - exp.constType = 3 /* CAN_STRINGIFY */; - } - node.props[index] = { - type: 7 /* DIRECTIVE */, - name: 'bind', - arg: createSimpleExpression('srcset', true, attr.loc), - exp, - modifiers: [], - loc: attr.loc - }; - } - }); - } - } -}; - -const SSR_INTERPOLATE = Symbol(`ssrInterpolate`); -const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`); -const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`); -const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`); -const SSR_RENDER_SLOT_INNER = Symbol(`ssrRenderSlotInner`); -const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`); -const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`); -const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`); -const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`); -const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`); -const SSR_RENDER_LIST = Symbol(`ssrRenderList`); -const SSR_INCLUDE_BOOLEAN_ATTR = Symbol(`ssrIncludeBooleanAttr`); -const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`); -const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`); -const SSR_RENDER_DYNAMIC_MODEL = Symbol(`ssrRenderDynamicModel`); -const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol(`ssrGetDynamicModelProps`); -const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); -const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); -const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`); -const ssrHelpers = { - [SSR_INTERPOLATE]: `ssrInterpolate`, - [SSR_RENDER_VNODE]: `ssrRenderVNode`, - [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, - [SSR_RENDER_SLOT]: `ssrRenderSlot`, - [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`, - [SSR_RENDER_CLASS]: `ssrRenderClass`, - [SSR_RENDER_STYLE]: `ssrRenderStyle`, - [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, - [SSR_RENDER_ATTR]: `ssrRenderAttr`, - [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, - [SSR_RENDER_LIST]: `ssrRenderList`, - [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`, - [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, - [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, - [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, - [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, - [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`, - [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`, - [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps` -}; -// Note: these are helpers imported from @vue/server-renderer -// make sure the names match! -registerRuntimeHelpers(ssrHelpers); - -// Plugin for the first transform pass, which simply constructs the AST node -const ssrTransformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, processIf); -// This is called during the 2nd transform pass to construct the SSR-specific -// codegen nodes. -function ssrProcessIf(node, context, disableNestedFragments = false) { - const [rootBranch] = node.branches; - const ifStatement = createIfStatement(rootBranch.condition, processIfBranch(rootBranch, context, disableNestedFragments)); - context.pushStatement(ifStatement); - let currentIf = ifStatement; - for (let i = 1; i < node.branches.length; i++) { - const branch = node.branches[i]; - const branchBlockStatement = processIfBranch(branch, context, disableNestedFragments); - if (branch.condition) { - // else-if - currentIf = currentIf.alternate = createIfStatement(branch.condition, branchBlockStatement); - } - else { - // else - currentIf.alternate = branchBlockStatement; - } - } - if (!currentIf.alternate) { - currentIf.alternate = createBlockStatement([ - createCallExpression(`_push`, ['`<!---->`']) - ]); - } -} -function processIfBranch(branch, context, disableNestedFragments = false) { - const { children } = branch; - const needFragmentWrapper = !disableNestedFragments && - (children.length !== 1 || children[0].type !== 1 /* ELEMENT */) && - // optimize away nested fragments when the only child is a ForNode - !(children.length === 1 && children[0].type === 11 /* FOR */); - return processChildrenAsStatement(branch, context, needFragmentWrapper); -} - -// Plugin for the first transform pass, which simply constructs the AST node -const ssrTransformFor = createStructuralDirectiveTransform('for', processFor); -// This is called during the 2nd transform pass to construct the SSR-specific -// codegen nodes. -function ssrProcessFor(node, context, disableNestedFragments = false) { - const needFragmentWrapper = !disableNestedFragments && - (node.children.length !== 1 || node.children[0].type !== 1 /* ELEMENT */); - const renderLoop = createFunctionExpression(createForLoopParams(node.parseResult)); - renderLoop.body = processChildrenAsStatement(node, context, needFragmentWrapper); - // v-for always renders a fragment unless explicitly disabled - if (!disableNestedFragments) { - context.pushStringPart(`<!--[-->`); - } - context.pushStatement(createCallExpression(context.helper(SSR_RENDER_LIST), [ - node.source, - renderLoop - ])); - if (!disableNestedFragments) { - context.pushStringPart(`<!--]-->`); - } -} - -const ssrTransformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { slotName, slotProps } = processSlotOutlet(node, context); - const args = [ - `_ctx.$slots`, - slotName, - slotProps || `{}`, - // fallback content placeholder. will be replaced in the process phase - `null`, - `_push`, - `_parent` - ]; - // inject slot scope id if current template uses :slotted - if (context.scopeId && context.slotted !== false) { - args.push(`"${context.scopeId}-s"`); - } - let method = SSR_RENDER_SLOT; - // #3989 - // check if this is a single slot inside a transition wrapper - since - // transition will unwrap the slot fragment into a single vnode at runtime, - // we need to avoid rendering the slot as a fragment. - const parent = context.parent; - if (parent && - parent.type === 1 /* ELEMENT */ && - parent.tagType === 1 /* COMPONENT */ && - resolveComponentType(parent, context, true) === TRANSITION && - parent.children.filter(c => c.type === 1 /* ELEMENT */).length === 1) { - method = SSR_RENDER_SLOT_INNER; - } - node.ssrCodegenNode = createCallExpression(context.helper(method), args); - } -}; -function ssrProcessSlotOutlet(node, context) { - const renderCall = node.ssrCodegenNode; - // has fallback content - if (node.children.length) { - const fallbackRenderFn = createFunctionExpression([]); - fallbackRenderFn.body = processChildrenAsStatement(node, context); - // _renderSlot(slots, name, props, fallback, ...) - renderCall.arguments[3] = fallbackRenderFn; - } - // Forwarded <slot/>. Merge slot scope ids - if (context.withSlotScopeId) { - const slotScopeId = renderCall.arguments[6]; - renderCall.arguments[6] = slotScopeId - ? `${slotScopeId} + _scopeId` - : `_scopeId`; - } - context.pushStatement(node.ssrCodegenNode); -} - -function createSSRCompilerError(code, loc) { - return createCompilerError(code, loc, SSRErrorMessages); -} -const SSRErrorMessages = { - [61 /* X_SSR_UNSAFE_ATTR_NAME */]: `Unsafe attribute name for SSR.`, - [62 /* X_SSR_NO_TELEPORT_TARGET */]: `Missing the 'to' prop on teleport element.`, - [63 /* X_SSR_INVALID_AST_NODE */]: `Invalid AST node during SSR transform.` -}; - -// Note: this is a 2nd-pass codegen transform. -function ssrProcessTeleport(node, context) { - const targetProp = findProp(node, 'to'); - if (!targetProp) { - context.onError(createSSRCompilerError(62 /* X_SSR_NO_TELEPORT_TARGET */, node.loc)); - return; - } - let target; - if (targetProp.type === 6 /* ATTRIBUTE */) { - target = - targetProp.value && createSimpleExpression(targetProp.value.content, true); - } - else { - target = targetProp.exp; - } - if (!target) { - context.onError(createSSRCompilerError(62 /* X_SSR_NO_TELEPORT_TARGET */, targetProp.loc)); - return; - } - const disabledProp = findProp(node, 'disabled', false, true /* allow empty */); - const disabled = disabledProp - ? disabledProp.type === 6 /* ATTRIBUTE */ - ? `true` - : disabledProp.exp || `false` - : `false`; - const contentRenderFn = createFunctionExpression([`_push`], undefined, // Body is added later - true, // newline - false, // isSlot - node.loc); - contentRenderFn.body = processChildrenAsStatement(node, context); - context.pushStatement(createCallExpression(context.helper(SSR_RENDER_TELEPORT), [ - `_push`, - contentRenderFn, - target, - disabled, - `_parent` - ])); -} - -const wipMap = new WeakMap(); -// phase 1 -function ssrTransformSuspense(node, context) { - return () => { - if (node.children.length) { - const wipEntry = { - slotsExp: null, - wipSlots: [] - }; - wipMap.set(node, wipEntry); - wipEntry.slotsExp = buildSlots(node, context, (_props, children, loc) => { - const fn = createFunctionExpression([], undefined, // no return, assign body later - true, // newline - false, // suspense slots are not treated as normal slots - loc); - wipEntry.wipSlots.push({ - fn, - children - }); - return fn; - }).slots; - } - }; -} -// phase 2 -function ssrProcessSuspense(node, context) { - // complete wip slots with ssr code - const wipEntry = wipMap.get(node); - if (!wipEntry) { - return; - } - const { slotsExp, wipSlots } = wipEntry; - for (let i = 0; i < wipSlots.length; i++) { - const slot = wipSlots[i]; - slot.fn.body = processChildrenAsStatement(slot, context); - } - // _push(ssrRenderSuspense(slots)) - context.pushStatement(createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [ - `_push`, - slotsExp - ])); -} - -// for directives with children overwrite (e.g. v-html & v-text), we need to -// store the raw children so that they can be added in the 2nd pass. -const rawChildrenMap = new WeakMap(); -const ssrTransformElement = (node, context) => { - if (node.type !== 1 /* ELEMENT */ || - node.tagType !== 0 /* ELEMENT */) { - return; - } - return function ssrPostTransformElement() { - // element - // generate the template literal representing the open tag. - const openTag = [`<${node.tag}`]; - // some tags need to be passed to runtime for special checks - const needTagForRuntime = node.tag === 'textarea' || node.tag.indexOf('-') > 0; - // v-bind="obj", v-bind:[key] and custom directives can potentially - // overwrite other static attrs and can affect final rendering result, - // so when they are present we need to bail out to full `renderAttrs` - const hasDynamicVBind = hasDynamicKeyVBind(node); - const hasCustomDir = node.props.some(p => p.type === 7 /* DIRECTIVE */ && !isBuiltInDirective(p.name)); - const needMergeProps = hasDynamicVBind || hasCustomDir; - if (needMergeProps) { - const { props, directives } = buildProps(node, context, node.props, false /* isComponent */, false /* isDynamicComponent */, true /* ssr */); - if (props || directives.length) { - const mergedProps = buildSSRProps(props, directives, context); - const propsExp = createCallExpression(context.helper(SSR_RENDER_ATTRS), [mergedProps]); - if (node.tag === 'textarea') { - const existingText = node.children[0]; - // If interpolation, this is dynamic <textarea> content, potentially - // injected by v-model and takes higher priority than v-bind value - if (!existingText || existingText.type !== 5 /* INTERPOLATION */) { - // <textarea> with dynamic v-bind. We don't know if the final props - // will contain .value, so we will have to do something special: - // assign the merged props to a temp variable, and check whether - // it contains value (if yes, render is as children). - const tempId = `_temp${context.temps++}`; - propsExp.arguments = [ - createAssignmentExpression(createSimpleExpression(tempId, false), mergedProps) - ]; - rawChildrenMap.set(node, createCallExpression(context.helper(SSR_INTERPOLATE), [ - createConditionalExpression(createSimpleExpression(`"value" in ${tempId}`, false), createSimpleExpression(`${tempId}.value`, false), createSimpleExpression(existingText ? existingText.content : ``, true), false) - ])); - } - } - else if (node.tag === 'input') { - // <input v-bind="obj" v-model> - // we need to determine the props to render for the dynamic v-model - // and merge it with the v-bind expression. - const vModel = findVModel(node); - if (vModel) { - // 1. save the props (san v-model) in a temp variable - const tempId = `_temp${context.temps++}`; - const tempExp = createSimpleExpression(tempId, false); - propsExp.arguments = [ - createSequenceExpression([ - createAssignmentExpression(tempExp, mergedProps), - createCallExpression(context.helper(MERGE_PROPS), [ - tempExp, - createCallExpression(context.helper(SSR_GET_DYNAMIC_MODEL_PROPS), [ - tempExp, - vModel.exp // model - ]) - ]) - ]) - ]; - } - } - if (needTagForRuntime) { - propsExp.arguments.push(`"${node.tag}"`); - } - openTag.push(propsExp); - } - } - // book keeping static/dynamic class merging. - let dynamicClassBinding = undefined; - let staticClassBinding = undefined; - // all style bindings are converted to dynamic by transformStyle. - // but we need to make sure to merge them. - let dynamicStyleBinding = undefined; - for (let i = 0; i < node.props.length; i++) { - const prop = node.props[i]; - // ignore true-value/false-value on input - if (node.tag === 'input' && isTrueFalseValue(prop)) { - continue; - } - // special cases with children override - if (prop.type === 7 /* DIRECTIVE */) { - if (prop.name === 'html' && prop.exp) { - rawChildrenMap.set(node, prop.exp); - } - else if (prop.name === 'text' && prop.exp) { - node.children = [createInterpolation(prop.exp, prop.loc)]; - } - else if (prop.name === 'slot') { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, prop.loc)); - } - else if (isTextareaWithValue(node, prop) && prop.exp) { - if (!needMergeProps) { - node.children = [createInterpolation(prop.exp, prop.loc)]; - } - } - else if (!needMergeProps && prop.name !== 'on') { - // Directive transforms. - const directiveTransform = context.directiveTransforms[prop.name]; - if (directiveTransform) { - const { props, ssrTagParts } = directiveTransform(prop, node, context); - if (ssrTagParts) { - openTag.push(...ssrTagParts); - } - for (let j = 0; j < props.length; j++) { - const { key, value } = props[j]; - if (isStaticExp(key)) { - let attrName = key.content; - // static key attr - if (attrName === 'key' || attrName === 'ref') { - continue; - } - if (attrName === 'class') { - openTag.push(` class="`, (dynamicClassBinding = createCallExpression(context.helper(SSR_RENDER_CLASS), [value])), `"`); - } - else if (attrName === 'style') { - if (dynamicStyleBinding) { - // already has style binding, merge into it. - mergeCall(dynamicStyleBinding, value); - } - else { - openTag.push(` style="`, (dynamicStyleBinding = createCallExpression(context.helper(SSR_RENDER_STYLE), [value])), `"`); - } - } - else { - attrName = - node.tag.indexOf('-') > 0 - ? attrName // preserve raw name on custom elements - : propsToAttrMap[attrName] || attrName.toLowerCase(); - if (isBooleanAttr(attrName)) { - openTag.push(createConditionalExpression(createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [value]), createSimpleExpression(' ' + attrName, true), createSimpleExpression('', true), false /* no newline */)); - } - else if (isSSRSafeAttrName(attrName)) { - openTag.push(createCallExpression(context.helper(SSR_RENDER_ATTR), [ - key, - value - ])); - } - else { - context.onError(createSSRCompilerError(61 /* X_SSR_UNSAFE_ATTR_NAME */, key.loc)); - } - } - } - else { - // dynamic key attr - // this branch is only encountered for custom directive - // transforms that returns properties with dynamic keys - const args = [key, value]; - if (needTagForRuntime) { - args.push(`"${node.tag}"`); - } - openTag.push(createCallExpression(context.helper(SSR_RENDER_DYNAMIC_ATTR), args)); - } - } - } - } - } - else { - // special case: value on <textarea> - if (node.tag === 'textarea' && prop.name === 'value' && prop.value) { - rawChildrenMap.set(node, escapeHtml(prop.value.content)); - } - else if (!needMergeProps) { - if (prop.name === 'key' || prop.name === 'ref') { - continue; - } - // static prop - if (prop.name === 'class' && prop.value) { - staticClassBinding = JSON.stringify(prop.value.content); - } - openTag.push(` ${prop.name}` + - (prop.value ? `="${escapeHtml(prop.value.content)}"` : ``)); - } - } - } - // handle co-existence of dynamic + static class bindings - if (dynamicClassBinding && staticClassBinding) { - mergeCall(dynamicClassBinding, staticClassBinding); - removeStaticBinding(openTag, 'class'); - } - if (context.scopeId) { - openTag.push(` ${context.scopeId}`); - } - node.ssrCodegenNode = createTemplateLiteral(openTag); - }; -}; -function buildSSRProps(props, directives, context) { - let mergePropsArgs = []; - if (props) { - if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // already a mergeProps call - mergePropsArgs = props.arguments; - } - else { - mergePropsArgs.push(props); - } - } - if (directives.length) { - for (const dir of directives) { - mergePropsArgs.push(createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [ - `_ctx`, - ...buildDirectiveArgs(dir, context).elements - ])); - } - } - return mergePropsArgs.length > 1 - ? createCallExpression(context.helper(MERGE_PROPS), mergePropsArgs) - : mergePropsArgs[0]; -} -function isTrueFalseValue(prop) { - if (prop.type === 7 /* DIRECTIVE */) { - return (prop.name === 'bind' && - prop.arg && - isStaticExp(prop.arg) && - (prop.arg.content === 'true-value' || prop.arg.content === 'false-value')); - } - else { - return prop.name === 'true-value' || prop.name === 'false-value'; - } -} -function isTextareaWithValue(node, prop) { - return !!(node.tag === 'textarea' && - prop.name === 'bind' && - isStaticArgOf(prop.arg, 'value')); -} -function mergeCall(call, arg) { - const existing = call.arguments[0]; - if (existing.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.elements.push(arg); - } - else { - call.arguments[0] = createArrayExpression([existing, arg]); - } -} -function removeStaticBinding(tag, binding) { - const regExp = new RegExp(`^ ${binding}=".+"$`); - const i = tag.findIndex(e => typeof e === 'string' && regExp.test(e)); - if (i > -1) { - tag.splice(i, 1); - } -} -function findVModel(node) { - return node.props.find(p => p.type === 7 /* DIRECTIVE */ && p.name === 'model' && p.exp); -} -function ssrProcessElement(node, context) { - const isVoidTag = context.options.isVoidTag || NO; - const elementsToAdd = node.ssrCodegenNode.elements; - for (let j = 0; j < elementsToAdd.length; j++) { - context.pushStringPart(elementsToAdd[j]); - } - // Handle slot scopeId - if (context.withSlotScopeId) { - context.pushStringPart(createSimpleExpression(`_scopeId`, false)); - } - // close open tag - context.pushStringPart(`>`); - const rawChildren = rawChildrenMap.get(node); - if (rawChildren) { - context.pushStringPart(rawChildren); - } - else if (node.children.length) { - processChildren(node, context); - } - if (!isVoidTag(node.tag)) { - // push closing tag - context.pushStringPart(`</${node.tag}>`); - } -} - -const wipMap$1 = new WeakMap(); -// phase 1: build props -function ssrTransformTransitionGroup(node, context) { - return () => { - const tag = findProp(node, 'tag'); - if (tag) { - const otherProps = node.props.filter(p => p !== tag); - const { props, directives } = buildProps(node, context, otherProps, true, /* isComponent */ false, /* isDynamicComponent */ true /* ssr (skip event listeners) */); - let propsExp = null; - if (props || directives.length) { - propsExp = createCallExpression(context.helper(SSR_RENDER_ATTRS), [ - buildSSRProps(props, directives, context) - ]); - } - wipMap$1.set(node, { - tag, - propsExp - }); - } - }; -} -// phase 2: process children -function ssrProcessTransitionGroup(node, context) { - const entry = wipMap$1.get(node); - if (entry) { - const { tag, propsExp } = entry; - if (tag.type === 7 /* DIRECTIVE */) { - // dynamic :tag - context.pushStringPart(`<`); - context.pushStringPart(tag.exp); - if (propsExp) { - context.pushStringPart(propsExp); - } - context.pushStringPart(`>`); - processChildren(node, context, false, - /** - * TransitionGroup has the special runtime behavior of flattening and - * concatenating all children into a single fragment (in order for them to - * be patched using the same key map) so we need to account for that here - * by disabling nested fragment wrappers from being generated. - */ - true); - context.pushStringPart(`</`); - context.pushStringPart(tag.exp); - context.pushStringPart(`>`); - } - else { - // static tag - context.pushStringPart(`<${tag.value.content}`); - if (propsExp) { - context.pushStringPart(propsExp); - } - context.pushStringPart(`>`); - processChildren(node, context, false, true); - context.pushStringPart(`</${tag.value.content}>`); - } - } - else { - // fragment - processChildren(node, context, true, true); - } -} - -// We need to construct the slot functions in the 1st pass to ensure proper -// scope tracking, but the children of each slot cannot be processed until -// the 2nd pass, so we store the WIP slot functions in a weakMap during the 1st -// pass and complete them in the 2nd pass. -const wipMap$2 = new WeakMap(); -const WIP_SLOT = Symbol(); -const componentTypeMap = new WeakMap(); -// ssr component transform is done in two phases: -// In phase 1. we use `buildSlot` to analyze the children of the component into -// WIP slot functions (it must be done in phase 1 because `buildSlot` relies on -// the core transform context). -// In phase 2. we convert the WIP slots from phase 1 into ssr-specific codegen -// nodes. -const ssrTransformComponent = (node, context) => { - if (node.type !== 1 /* ELEMENT */ || - node.tagType !== 1 /* COMPONENT */) { - return; - } - const component = resolveComponentType(node, context, true /* ssr */); - const isDynamicComponent = isObject(component) && component.callee === RESOLVE_DYNAMIC_COMPONENT; - componentTypeMap.set(node, component); - if (isSymbol(component)) { - if (component === SUSPENSE) { - return ssrTransformSuspense(node, context); - } - if (component === TRANSITION_GROUP) { - return ssrTransformTransitionGroup(node, context); - } - return; // other built-in components: fallthrough - } - // Build the fallback vnode-based branch for the component's slots. - // We need to clone the node into a fresh copy and use the buildSlots' logic - // to get access to the children of each slot. We then compile them with - // a child transform pipeline using vnode-based transforms (instead of ssr- - // based ones), and save the result branch (a ReturnStatement) in an array. - // The branch is retrieved when processing slots again in ssr mode. - const vnodeBranches = []; - const clonedNode = clone(node); - return function ssrPostTransformComponent() { - // Using the cloned node, build the normal VNode-based branches (for - // fallback in case the child is render-fn based). Store them in an array - // for later use. - if (clonedNode.children.length) { - buildSlots(clonedNode, context, (props, children) => { - vnodeBranches.push(createVNodeSlotBranch(props, children, context)); - return createFunctionExpression(undefined); - }); - } - let propsExp = `null`; - if (node.props.length) { - // note we are not passing ssr: true here because for components, v-on - // handlers should still be passed - const { props, directives } = buildProps(node, context, undefined, true, isDynamicComponent); - if (props || directives.length) { - propsExp = buildSSRProps(props, directives, context); - } - } - const wipEntries = []; - wipMap$2.set(node, wipEntries); - const buildSSRSlotFn = (props, children, loc) => { - const fn = createFunctionExpression([props || `_`, `_push`, `_parent`, `_scopeId`], undefined, // no return, assign body later - true, // newline - true, // isSlot - loc); - wipEntries.push({ - type: WIP_SLOT, - fn, - children, - // also collect the corresponding vnode branch built earlier - vnodeBranch: vnodeBranches[wipEntries.length] - }); - return fn; - }; - const slots = node.children.length - ? buildSlots(node, context, buildSSRSlotFn).slots - : `null`; - if (typeof component !== 'string') { - // dynamic component that resolved to a `resolveDynamicComponent` call - // expression - since the resolved result may be a plain element (string) - // or a VNode, handle it with `renderVNode`. - node.ssrCodegenNode = createCallExpression(context.helper(SSR_RENDER_VNODE), [ - `_push`, - createCallExpression(context.helper(CREATE_VNODE), [ - component, - propsExp, - slots - ]), - `_parent` - ]); - } - else { - node.ssrCodegenNode = createCallExpression(context.helper(SSR_RENDER_COMPONENT), [component, propsExp, slots, `_parent`]); - } - }; -}; -function ssrProcessComponent(node, context, parent) { - const component = componentTypeMap.get(node); - if (!node.ssrCodegenNode) { - // this is a built-in component that fell-through. - if (component === TELEPORT) { - return ssrProcessTeleport(node, context); - } - else if (component === SUSPENSE) { - return ssrProcessSuspense(node, context); - } - else if (component === TRANSITION_GROUP) { - return ssrProcessTransitionGroup(node, context); - } - else { - // real fall-through: Transition / KeepAlive - // just render its children. - // #5352: if is at root level of a slot, push an empty string. - // this does not affect the final output, but avoids all-comment slot - // content of being treated as empty by ssrRenderSlot(). - if (parent.type === WIP_SLOT) { - context.pushStringPart(``); - } - // #5351: filter out comment children inside transition - if (component === TRANSITION) { - node.children = node.children.filter(c => c.type !== 3 /* COMMENT */); - } - processChildren(node, context); - } - } - else { - // finish up slot function expressions from the 1st pass. - const wipEntries = wipMap$2.get(node) || []; - for (let i = 0; i < wipEntries.length; i++) { - const { fn, vnodeBranch } = wipEntries[i]; - // For each slot, we generate two branches: one SSR-optimized branch and - // one normal vnode-based branch. The branches are taken based on the - // presence of the 2nd `_push` argument (which is only present if the slot - // is called by `_ssrRenderSlot`. - fn.body = createIfStatement(createSimpleExpression(`_push`, false), processChildrenAsStatement(wipEntries[i], context, false, true /* withSlotScopeId */), vnodeBranch); - } - // component is inside a slot, inherit slot scope Id - if (context.withSlotScopeId) { - node.ssrCodegenNode.arguments.push(`_scopeId`); - } - if (typeof component === 'string') { - // static component - context.pushStatement(createCallExpression(`_push`, [node.ssrCodegenNode])); - } - else { - // dynamic component (`resolveDynamicComponent` call) - // the codegen node is a `renderVNode` call - context.pushStatement(node.ssrCodegenNode); - } - } -} -const rawOptionsMap = new WeakMap(); -const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset(true); -const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms]; -const vnodeDirectiveTransforms = Object.assign(Object.assign({}, baseDirectiveTransforms), DOMDirectiveTransforms); -function createVNodeSlotBranch(props, children, parentContext) { - // apply a sub-transform using vnode-based transforms. - const rawOptions = rawOptionsMap.get(parentContext.root); - const subOptions = Object.assign(Object.assign({}, rawOptions), { - // overwrite with vnode-based transforms - nodeTransforms: [ - ...vnodeNodeTransforms, - ...(rawOptions.nodeTransforms || []) - ], directiveTransforms: Object.assign(Object.assign({}, vnodeDirectiveTransforms), (rawOptions.directiveTransforms || {})) }); - // wrap the children with a wrapper template for proper children treatment. - const wrapperNode = { - type: 1 /* ELEMENT */, - ns: 0 /* HTML */, - tag: 'template', - tagType: 3 /* TEMPLATE */, - isSelfClosing: false, - // important: provide v-slot="props" on the wrapper for proper - // scope analysis - props: [ - { - type: 7 /* DIRECTIVE */, - name: 'slot', - exp: props, - arg: undefined, - modifiers: [], - loc: locStub - } - ], - children, - loc: locStub, - codegenNode: undefined - }; - subTransform(wrapperNode, subOptions, parentContext); - return createReturnStatement(children); -} -function subTransform(node, options, parentContext) { - const childRoot = createRoot([node]); - const childContext = createTransformContext(childRoot, options); - // this sub transform is for vnode fallback branch so it should be handled - // like normal render functions - childContext.ssr = false; - // inherit parent scope analysis state - childContext.scopes = Object.assign({}, parentContext.scopes); - childContext.identifiers = Object.assign({}, parentContext.identifiers); - childContext.imports = parentContext.imports; - // traverse - traverseNode(childRoot, childContext); - ['helpers', 'components', 'directives'].forEach(key => { - childContext[key].forEach((value, helperKey) => { - if (key === 'helpers') { - const parentCount = parentContext.helpers.get(helperKey); - if (parentCount === undefined) { - parentContext.helpers.set(helperKey, value); - } - else { - parentContext.helpers.set(helperKey, value + parentCount); - } - } - else { - parentContext[key].add(value); - } - }); - }); - // imports/hoists are not merged because: - // - imports are only used for asset urls and should be consistent between - // node/client branches - // - hoists are not enabled for the client branch here -} -function clone(v) { - if (isArray(v)) { - return v.map(clone); - } - else if (isObject(v)) { - const res = {}; - for (const key in v) { - res[key] = clone(v[key]); - } - return res; - } - else { - return v; - } -} - -// Because SSR codegen output is completely different from client-side output -// (e.g. multiple elements can be concatenated into a single template literal -// instead of each getting a corresponding call), we need to apply an extra -// transform pass to convert the template AST into a fresh JS AST before -// passing it to codegen. -function ssrCodegenTransform(ast, options) { - const context = createSSRTransformContext(ast, options); - // inject SFC <style> CSS variables - // we do this instead of inlining the expression to ensure the vars are - // only resolved once per render - if (options.ssrCssVars) { - const varsExp = processExpression(createSimpleExpression(options.ssrCssVars, false), createTransformContext(createRoot([]), options)); - context.body.push(createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`])); - } - const isFragment = ast.children.length > 1 && ast.children.some(c => !isText(c)); - processChildren(ast, context, isFragment); - ast.codegenNode = createBlockStatement(context.body); - // Finalize helpers. - // We need to separate helpers imported from 'vue' vs. '@vue/server-renderer' - ast.ssrHelpers = Array.from(new Set([...ast.helpers.filter(h => h in ssrHelpers), ...context.helpers])); - ast.helpers = ast.helpers.filter(h => !(h in ssrHelpers)); -} -function createSSRTransformContext(root, options, helpers = new Set(), withSlotScopeId = false) { - const body = []; - let currentString = null; - return { - root, - options, - body, - helpers, - withSlotScopeId, - onError: options.onError || - (e => { - throw e; - }), - helper(name) { - helpers.add(name); - return name; - }, - pushStringPart(part) { - if (!currentString) { - const currentCall = createCallExpression(`_push`); - body.push(currentCall); - currentString = createTemplateLiteral([]); - currentCall.arguments.push(currentString); - } - const bufferedElements = currentString.elements; - const lastItem = bufferedElements[bufferedElements.length - 1]; - if (isString(part) && isString(lastItem)) { - bufferedElements[bufferedElements.length - 1] += part; - } - else { - bufferedElements.push(part); - } - }, - pushStatement(statement) { - // close current string - currentString = null; - body.push(statement); - } - }; -} -function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) { - // ensure child inherits parent helpers - return createSSRTransformContext(parent.root, parent.options, parent.helpers, withSlotScopeId); -} -function processChildren(parent, context, asFragment = false, disableNestedFragments = false) { - if (asFragment) { - context.pushStringPart(`<!--[-->`); - } - const { children } = parent; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - switch (child.tagType) { - case 0 /* ELEMENT */: - ssrProcessElement(child, context); - break; - case 1 /* COMPONENT */: - ssrProcessComponent(child, context, parent); - break; - case 2 /* SLOT */: - ssrProcessSlotOutlet(child, context); - break; - case 3 /* TEMPLATE */: - // TODO - break; - default: - context.onError(createSSRCompilerError(63 /* X_SSR_INVALID_AST_NODE */, child.loc)); - // make sure we exhaust all possible types - const exhaustiveCheck = child; - return exhaustiveCheck; - } - break; - case 2 /* TEXT */: - context.pushStringPart(escapeHtml(child.content)); - break; - case 3 /* COMMENT */: - // no need to escape comment here because the AST can only - // contain valid comments. - context.pushStringPart(`<!--${child.content}-->`); - break; - case 5 /* INTERPOLATION */: - context.pushStringPart(createCallExpression(context.helper(SSR_INTERPOLATE), [child.content])); - break; - case 9 /* IF */: - ssrProcessIf(child, context, disableNestedFragments); - break; - case 11 /* FOR */: - ssrProcessFor(child, context, disableNestedFragments); - break; - case 10 /* IF_BRANCH */: - // no-op - handled by ssrProcessIf - break; - case 12 /* TEXT_CALL */: - case 8 /* COMPOUND_EXPRESSION */: - // no-op - these two types can never appear as template child node since - // `transformText` is not used during SSR compile. - break; - default: - context.onError(createSSRCompilerError(63 /* X_SSR_INVALID_AST_NODE */, child.loc)); - // make sure we exhaust all possible types - const exhaustiveCheck = child; - return exhaustiveCheck; - } - } - if (asFragment) { - context.pushStringPart(`<!--]-->`); - } -} -function processChildrenAsStatement(parent, parentContext, asFragment = false, withSlotScopeId = parentContext.withSlotScopeId) { - const childContext = createChildContext(parentContext, withSlotScopeId); - processChildren(parent, childContext, asFragment); - return createBlockStatement(childContext.body); -} - -const ssrTransformModel = (dir, node, context) => { - const model = dir.exp; - function checkDuplicatedValue() { - const value = findProp(node, 'value'); - if (value) { - context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } - } - if (node.tagType === 0 /* ELEMENT */) { - const res = { props: [] }; - const defaultProps = [ - // default value binding for text type inputs - createObjectProperty(`value`, model) - ]; - if (node.tag === 'input') { - const type = findProp(node, 'type'); - if (type) { - const value = findValueBinding(node); - if (type.type === 7 /* DIRECTIVE */) { - // dynamic type - res.ssrTagParts = [ - createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [ - type.exp, - model, - value - ]) - ]; - } - else if (type.value) { - // static type - switch (type.value.content) { - case 'radio': - res.props = [ - createObjectProperty(`checked`, createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - value - ])) - ]; - break; - case 'checkbox': - const trueValueBinding = findProp(node, 'true-value'); - if (trueValueBinding) { - const trueValue = trueValueBinding.type === 6 /* ATTRIBUTE */ - ? JSON.stringify(trueValueBinding.value.content) - : trueValueBinding.exp; - res.props = [ - createObjectProperty(`checked`, createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - trueValue - ])) - ]; - } - else { - res.props = [ - createObjectProperty(`checked`, createConditionalExpression(createCallExpression(`Array.isArray`, [model]), createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ - model, - value - ]), model)) - ]; - } - break; - case 'file': - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - checkDuplicatedValue(); - res.props = defaultProps; - break; - } - } - } - else if (hasDynamicKeyVBind(node)) ; - else { - // text type - checkDuplicatedValue(); - res.props = defaultProps; - } - } - else if (node.tag === 'textarea') { - checkDuplicatedValue(); - node.children = [createInterpolation(model, model.loc)]; - } - else if (node.tag === 'select') ; - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - return res; - } - else { - // component v-model - return transformModel(dir, node, context); - } -}; -function findValueBinding(node) { - const valueBinding = findProp(node, 'value'); - return valueBinding - ? valueBinding.type === 7 /* DIRECTIVE */ - ? valueBinding.exp - : createSimpleExpression(valueBinding.value.content, true) - : createSimpleExpression(`null`, false); -} - -const ssrTransformShow = (dir, node, context) => { - if (!dir.exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */)); - } - return { - props: [ - createObjectProperty(`style`, createConditionalExpression(dir.exp, createSimpleExpression(`null`, false), createObjectExpression([ - createObjectProperty(`display`, createSimpleExpression(`none`, true)) - ]), false /* no newline */)) - ] - }; -}; - -const filterChild = (node) => node.children.filter(n => n.type !== 3 /* COMMENT */); -const hasSingleChild = (node) => filterChild(node).length === 1; -const ssrInjectFallthroughAttrs = (node, context) => { - // _attrs is provided as a function argument. - // mark it as a known identifier so that it doesn't get prefixed by - // transformExpression. - if (node.type === 0 /* ROOT */) { - context.identifiers._attrs = 1; - } - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */ && - (isBuiltInType(node.tag, 'Transition') || - isBuiltInType(node.tag, 'KeepAlive'))) { - const rootChildren = filterChild(context.root); - if (rootChildren.length === 1 && rootChildren[0] === node) { - if (hasSingleChild(node)) { - injectFallthroughAttrs(node.children[0]); - } - return; - } - } - const parent = context.parent; - if (!parent || parent.type !== 0 /* ROOT */) { - return; - } - if (node.type === 10 /* IF_BRANCH */ && hasSingleChild(node)) { - // detect cases where the parent v-if is not the only root level node - let hasEncounteredIf = false; - for (const c of filterChild(parent)) { - if (c.type === 9 /* IF */ || - (c.type === 1 /* ELEMENT */ && findDir(c, 'if'))) { - // multiple root v-if - if (hasEncounteredIf) - return; - hasEncounteredIf = true; - } - else if ( - // node before v-if - !hasEncounteredIf || - // non else nodes - !(c.type === 1 /* ELEMENT */ && findDir(c, /else/, true))) { - return; - } - } - injectFallthroughAttrs(node.children[0]); - } - else if (hasSingleChild(parent)) { - injectFallthroughAttrs(node); - } -}; -function injectFallthroughAttrs(node) { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */) && - !findDir(node, 'for')) { - node.props.push({ - type: 7 /* DIRECTIVE */, - name: 'bind', - arg: undefined, - exp: createSimpleExpression(`_attrs`, false), - modifiers: [], - loc: locStub - }); - } -} - -const ssrInjectCssVars = (node, context) => { - if (!context.ssrCssVars) { - return; - } - // _cssVars is initialized once per render function - // the code is injected in ssrCodegenTransform when creating the - // ssr transform context - if (node.type === 0 /* ROOT */) { - context.identifiers._cssVars = 1; - } - const parent = context.parent; - if (!parent || parent.type !== 0 /* ROOT */) { - return; - } - if (node.type === 10 /* IF_BRANCH */) { - for (const child of node.children) { - injectCssVars(child); - } - } - else { - injectCssVars(node); - } -}; -function injectCssVars(node) { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */) && - !findDir(node, 'for')) { - if (isBuiltInType(node.tag, 'Suspense')) { - for (const child of node.children) { - if (child.type === 1 /* ELEMENT */ && - child.tagType === 3 /* TEMPLATE */) { - // suspense slot - child.children.forEach(injectCssVars); - } - else { - injectCssVars(child); - } - } - } - else { - node.props.push({ - type: 7 /* DIRECTIVE */, - name: 'bind', - arg: undefined, - exp: createSimpleExpression(`_cssVars`, false), - modifiers: [], - loc: locStub - }); - } - } -} - -function compile$1(template, options = {}) { - options = Object.assign(Object.assign(Object.assign({}, options), parserOptions), { ssr: true, inSSR: true, scopeId: options.mode === 'function' ? null : options.scopeId, - // always prefix since compiler-ssr doesn't have size concern - prefixIdentifiers: true, - // disable optimizations that are unnecessary for ssr - cacheHandlers: false, hoistStatic: false }); - const ast = baseParse(template, options); - // Save raw options for AST. This is needed when performing sub-transforms - // on slot vnode branches. - rawOptionsMap.set(ast, options); - transform(ast, Object.assign(Object.assign({}, options), { hoistStatic: false, nodeTransforms: [ - ssrTransformIf, - ssrTransformFor, - trackVForSlotScopes, - transformExpression, - ssrTransformSlotOutlet, - ssrInjectFallthroughAttrs, - ssrInjectCssVars, - ssrTransformElement, - ssrTransformComponent, - trackSlotScopes, - transformStyle, - ...(options.nodeTransforms || []) // user transforms - ], directiveTransforms: Object.assign({ - // reusing core v-bind - bind: transformBind, on: transformOn, - // model and show has dedicated SSR handling - model: ssrTransformModel, show: ssrTransformShow, - // the following are ignored during SSR - // on: noopDirectiveTransform, - cloak: noopDirectiveTransform, once: noopDirectiveTransform, memo: noopDirectiveTransform }, (options.directiveTransforms || {}) // user transforms - ) })); - // traverse the template AST and convert into SSR codegen AST - // by replacing ast.codegenNode. - ssrCodegenTransform(ast, options); - return generate(ast, options); -} - -var CompilerSSR = /*#__PURE__*/Object.freeze({ - __proto__: null, - compile: compile$1 -}); - -var _polyfillNode_fs = {}; - -var _polyfillNode_fs$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - 'default': _polyfillNode_fs -}); - -var _fs = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_fs$1); - -var _path = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path); - -var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_util$1); - -const hasWarned = {}; -function warnOnce(msg) { - const isNodeProd = typeof process !== 'undefined' && ({}).NODE_ENV === 'production'; - if (!isNodeProd && !false && !hasWarned[msg]) { - hasWarned[msg] = true; - warn(msg); - } -} -function warn(msg) { - console.warn(`\x1b[1m\x1b[33m[@vue/compiler-sfc]\x1b[0m\x1b[33m ${msg}\x1b[0m\n`); -} - -function preprocess({ source, filename, preprocessOptions }, preprocessor) { - // Consolidate exposes a callback based API, but the callback is in fact - // called synchronously for most templating engines. In our case, we have to - // expose a synchronous API so that it is usable in Jest transforms (which - // have to be sync because they are applied via Node.js require hooks) - let res = ''; - let err = null; - preprocessor.render(source, Object.assign({ filename }, preprocessOptions), (_err, _res) => { - if (_err) - err = _err; - res = _res; - }); - if (err) - throw err; - return res; -} -function compileTemplate(options) { - const { preprocessLang, preprocessCustomRequire } = options; - if (preprocessLang && - !preprocessCustomRequire) { - throw new Error(`[@vue/compiler-sfc] Template preprocessing in the browser build must ` + - `provide the \`preprocessCustomRequire\` option to return the in-browser ` + - `version of the preprocessor in the shape of { render(): string }.`); - } - const preprocessor = preprocessLang - ? preprocessCustomRequire - ? preprocessCustomRequire(preprocessLang) - : undefined - - : false; - if (preprocessor) { - try { - return doCompileTemplate(Object.assign(Object.assign({}, options), { source: preprocess(options, preprocessor) })); - } - catch (e) { - return { - code: `export default function render() {}`, - source: options.source, - tips: [], - errors: [e] - }; - } - } - else if (preprocessLang) { - return { - code: `export default function render() {}`, - source: options.source, - tips: [ - `Component ${options.filename} uses lang ${preprocessLang} for template. Please install the language preprocessor.` - ], - errors: [ - `Component ${options.filename} uses lang ${preprocessLang} for template, however it is not installed.` - ] - }; - } - else { - return doCompileTemplate(options); - } -} -function doCompileTemplate({ filename, id, scoped, slotted, inMap, source, ssr = false, ssrCssVars, isProd = false, compiler = ssr ? CompilerSSR : CompilerDOM, compilerOptions = {}, transformAssetUrls }) { - const errors = []; - const warnings = []; - let nodeTransforms = []; - if (isObject(transformAssetUrls)) { - const assetOptions = normalizeOptions(transformAssetUrls); - nodeTransforms = [ - createAssetUrlTransformWithOptions(assetOptions), - createSrcsetTransformWithOptions(assetOptions) - ]; - } - else if (transformAssetUrls !== false) { - nodeTransforms = [transformAssetUrl, transformSrcset]; - } - if (ssr && !ssrCssVars) { - warnOnce(`compileTemplate is called with \`ssr: true\` but no ` + - `corresponding \`cssVars\` option.\`.`); - } - if (!id) { - warnOnce(`compileTemplate now requires the \`id\` option.\`.`); - id = ''; - } - const shortId = id.replace(/^data-v-/, ''); - const longId = `data-v-${shortId}`; - let { code, ast, preamble, map } = compiler.compile(source, Object.assign(Object.assign({ mode: 'module', prefixIdentifiers: true, hoistStatic: true, cacheHandlers: true, ssrCssVars: ssr && ssrCssVars && ssrCssVars.length - ? genCssVarsFromList(ssrCssVars, shortId, isProd, true) - : '', scopeId: scoped ? longId : undefined, slotted, sourceMap: true }, compilerOptions), { nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []), filename, onError: e => errors.push(e), onWarn: w => warnings.push(w) })); - // inMap should be the map produced by ./parse.ts which is a simple line-only - // mapping. If it is present, we need to adjust the final map and errors to - // reflect the original line numbers. - if (inMap) { - if (map) { - map = mapLines(inMap, map); - } - if (errors.length) { - patchErrors(errors, source, inMap); - } - } - const tips = warnings.map(w => { - let msg = w.message; - if (w.loc) { - msg += `\n${generateCodeFrame(source, w.loc.start.offset, w.loc.end.offset)}`; - } - return msg; - }); - return { code, ast, preamble, source, errors, tips, map }; -} -function mapLines(oldMap, newMap) { - if (!oldMap) - return newMap; - if (!newMap) - return oldMap; - const oldMapConsumer = new SourceMapConsumer$1(oldMap); - const newMapConsumer = new SourceMapConsumer$1(newMap); - const mergedMapGenerator = new SourceMapGenerator$2(); - newMapConsumer.eachMapping(m => { - if (m.originalLine == null) { - return; - } - const origPosInOldMap = oldMapConsumer.originalPositionFor({ - line: m.originalLine, - column: m.originalColumn - }); - if (origPosInOldMap.source == null) { - return; - } - mergedMapGenerator.addMapping({ - generated: { - line: m.generatedLine, - column: m.generatedColumn - }, - original: { - line: origPosInOldMap.line, - // use current column, since the oldMap produced by @vue/compiler-sfc - // does not - column: m.originalColumn - }, - source: origPosInOldMap.source, - name: origPosInOldMap.name - }); - }); - // source-map's type definition is incomplete - const generator = mergedMapGenerator; - oldMapConsumer.sources.forEach((sourceFile) => { - generator._sources.add(sourceFile); - const sourceContent = oldMapConsumer.sourceContentFor(sourceFile); - if (sourceContent != null) { - mergedMapGenerator.setSourceContent(sourceFile, sourceContent); - } - }); - generator._sourceRoot = oldMap.sourceRoot; - generator._file = oldMap.file; - return generator.toJSON(); -} -function patchErrors(errors, source, inMap) { - const originalSource = inMap.sourcesContent[0]; - const offset = originalSource.indexOf(source); - const lineOffset = originalSource.slice(0, offset).split(/\r?\n/).length - 1; - errors.forEach(err => { - if (err.loc) { - err.loc.start.line += lineOffset; - err.loc.start.offset += offset; - if (err.loc.end !== err.loc.start) { - err.loc.end.line += lineOffset; - err.loc.end.offset += offset; - } - } - }); -} - -const defaultExportRE = /((?:^|\n|;)\s*)export(\s*)default/; -const namedDefaultExportRE = /((?:^|\n|;)\s*)export(.+)(?:as)?(\s*)default/s; -const exportDefaultClassRE = /((?:^|\n|;)\s*)export\s+default\s+class\s+([\w$]+)/; -/** - * Utility for rewriting `export default` in a script block into a variable - * declaration so that we can inject things into it - */ -function rewriteDefault(input, as, parserPlugins) { - if (!hasDefaultExport(input)) { - return input + `\nconst ${as} = {}`; - } - let replaced; - const classMatch = input.match(exportDefaultClassRE); - if (classMatch) { - replaced = - input.replace(exportDefaultClassRE, '$1class $2') + - `\nconst ${as} = ${classMatch[2]}`; - } - else { - replaced = input.replace(defaultExportRE, `$1const ${as} =`); - } - if (!hasDefaultExport(replaced)) { - return replaced; - } - // if the script somehow still contains `default export`, it probably has - // multi-line comments or template strings. fallback to a full parse. - const s = new MagicString(input); - const ast = parse_1(input, { - sourceType: 'module', - plugins: parserPlugins - }).program.body; - ast.forEach(node => { - if (node.type === 'ExportDefaultDeclaration') { - s.overwrite(node.start, node.declaration.start, `const ${as} = `); - } - if (node.type === 'ExportNamedDeclaration') { - for (const specifier of node.specifiers) { - if (specifier.type === 'ExportSpecifier' && - specifier.exported.type === 'Identifier' && - specifier.exported.name === 'default') { - if (node.source) { - if (specifier.local.name === 'default') { - const end = specifierEnd(input, specifier.local.end, node.end); - s.prepend(`import { default as __VUE_DEFAULT__ } from '${node.source.value}'\n`); - s.overwrite(specifier.start, end, ``); - s.append(`\nconst ${as} = __VUE_DEFAULT__`); - continue; - } - else { - const end = specifierEnd(input, specifier.exported.end, node.end); - s.prepend(`import { ${input.slice(specifier.local.start, specifier.local.end)} } from '${node.source.value}'\n`); - s.overwrite(specifier.start, end, ``); - s.append(`\nconst ${as} = ${specifier.local.name}`); - continue; - } - } - const end = specifierEnd(input, specifier.end, node.end); - s.overwrite(specifier.start, end, ``); - s.append(`\nconst ${as} = ${specifier.local.name}`); - } - } - } - }); - return s.toString(); -} -function hasDefaultExport(input) { - return defaultExportRE.test(input) || namedDefaultExportRE.test(input); -} -function specifierEnd(input, end, nodeEnd) { - // export { default , foo } ... - let hasCommas = false; - let oldEnd = end; - while (end < nodeEnd) { - if (/\s/.test(input.charAt(end))) { - end++; - } - else if (input.charAt(end) === ',') { - end++; - hasCommas = true; - break; - } - else if (input.charAt(end) === '}') { - break; - } - } - return hasCommas ? end : oldEnd; -} - -const CONVERT_SYMBOL = '$'; -const ESCAPE_SYMBOL = '$$'; -const shorthands = ['ref', 'computed', 'shallowRef', 'toRef', 'customRef']; -const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/; -function shouldTransform(src) { - return transformCheckRE.test(src); -} -function transform$1(src, { filename, sourceMap, parserPlugins, importHelpersFrom = 'vue' } = {}) { - const plugins = parserPlugins || []; - if (filename) { - if (/\.tsx?$/.test(filename)) { - plugins.push('typescript'); - } - if (filename.endsWith('x')) { - plugins.push('jsx'); - } - } - const ast = parse_1(src, { - sourceType: 'module', - plugins - }); - const s = new MagicString(src); - const res = transformAST(ast.program, s, 0); - // inject helper imports - if (res.importedHelpers.length) { - s.prepend(`import { ${res.importedHelpers - .map(h => `${h} as _${h}`) - .join(', ')} } from '${importHelpersFrom}'\n`); - } - return Object.assign(Object.assign({}, res), { code: s.toString(), map: sourceMap - ? s.generateMap({ - source: filename, - hires: true, - includeContent: true - }) - : null }); -} -function transformAST(ast, s, offset = 0, knownRefs, knownProps) { - // TODO remove when out of experimental - warnExperimental(); - let convertSymbol = CONVERT_SYMBOL; - let escapeSymbol = ESCAPE_SYMBOL; - // macro import handling - for (const node of ast.body) { - if (node.type === 'ImportDeclaration' && - node.source.value === 'vue/macros') { - // remove macro imports - s.remove(node.start + offset, node.end + offset); - // check aliasing - for (const specifier of node.specifiers) { - if (specifier.type === 'ImportSpecifier') { - const imported = specifier.imported.name; - const local = specifier.local.name; - if (local !== imported) { - if (imported === ESCAPE_SYMBOL) { - escapeSymbol = local; - } - else if (imported === CONVERT_SYMBOL) { - convertSymbol = local; - } - else { - error(`macro imports for ref-creating methods do not support aliasing.`, specifier); - } - } - } - } - } - } - const importedHelpers = new Set(); - const rootScope = {}; - const scopeStack = [rootScope]; - let currentScope = rootScope; - let escapeScope; // inside $$() - const excludedIds = new WeakSet(); - const parentStack = []; - const propsLocalToPublicMap = Object.create(null); - if (knownRefs) { - for (const key of knownRefs) { - rootScope[key] = true; - } - } - if (knownProps) { - for (const key in knownProps) { - const { local } = knownProps[key]; - rootScope[local] = 'prop'; - propsLocalToPublicMap[local] = key; - } - } - function isRefCreationCall(callee) { - if (callee === convertSymbol) { - return convertSymbol; - } - if (callee[0] === '$' && shorthands.includes(callee.slice(1))) { - return callee; - } - return false; - } - function error(msg, node) { - const e = new Error(msg); - e.node = node; - throw e; - } - function helper(msg) { - importedHelpers.add(msg); - return `_${msg}`; - } - function registerBinding(id, isRef = false) { - excludedIds.add(id); - if (currentScope) { - currentScope[id.name] = isRef; - } - else { - error('registerBinding called without active scope, something is wrong.', id); - } - } - const registerRefBinding = (id) => registerBinding(id, true); - let tempVarCount = 0; - function genTempVar() { - return `__$temp_${++tempVarCount}`; - } - function snip(node) { - return s.original.slice(node.start + offset, node.end + offset); - } - function walkScope(node, isRoot = false) { - for (const stmt of node.body) { - if (stmt.type === 'VariableDeclaration') { - walkVariableDeclaration(stmt, isRoot); - } - else if (stmt.type === 'FunctionDeclaration' || - stmt.type === 'ClassDeclaration') { - if (stmt.declare || !stmt.id) - continue; - registerBinding(stmt.id); - } - else if ((stmt.type === 'ForOfStatement' || stmt.type === 'ForInStatement') && - stmt.left.type === 'VariableDeclaration') { - walkVariableDeclaration(stmt.left); - } - else if (stmt.type === 'ExportNamedDeclaration' && - stmt.declaration && - stmt.declaration.type === 'VariableDeclaration') { - walkVariableDeclaration(stmt.declaration, isRoot); - } - else if (stmt.type === 'LabeledStatement' && - stmt.body.type === 'VariableDeclaration') { - walkVariableDeclaration(stmt.body, isRoot); - } - } - } - function walkVariableDeclaration(stmt, isRoot = false) { - if (stmt.declare) { - return; - } - for (const decl of stmt.declarations) { - let refCall; - const isCall = decl.init && - decl.init.type === 'CallExpression' && - decl.init.callee.type === 'Identifier'; - if (isCall && - (refCall = isRefCreationCall(decl.init.callee.name))) { - processRefDeclaration(refCall, decl.id, decl.init); - } - else { - const isProps = isRoot && isCall && decl.init.callee.name === 'defineProps'; - for (const id of extractIdentifiers(decl.id)) { - if (isProps) { - // for defineProps destructure, only exclude them since they - // are already passed in as knownProps - excludedIds.add(id); - } - else { - registerBinding(id); - } - } - } - } - } - function processRefDeclaration(method, id, call) { - excludedIds.add(call.callee); - if (method === convertSymbol) { - // $ - // remove macro - s.remove(call.callee.start + offset, call.callee.end + offset); - if (id.type === 'Identifier') { - // single variable - registerRefBinding(id); - } - else if (id.type === 'ObjectPattern') { - processRefObjectPattern(id, call); - } - else if (id.type === 'ArrayPattern') { - processRefArrayPattern(id, call); - } - } - else { - // shorthands - if (id.type === 'Identifier') { - registerRefBinding(id); - // replace call - s.overwrite(call.start + offset, call.start + method.length + offset, helper(method.slice(1))); - } - else { - error(`${method}() cannot be used with destructure patterns.`, call); - } - } - } - function processRefObjectPattern(pattern, call, tempVar, path = []) { - if (!tempVar) { - tempVar = genTempVar(); - // const { x } = $(useFoo()) --> const __$temp_1 = useFoo() - s.overwrite(pattern.start + offset, pattern.end + offset, tempVar); - } - for (const p of pattern.properties) { - let nameId; - let key; - let defaultValue; - if (p.type === 'ObjectProperty') { - if (p.key.start === p.value.start) { - // shorthand { foo } - nameId = p.key; - if (p.value.type === 'Identifier') { - // avoid shorthand value identifier from being processed - excludedIds.add(p.value); - } - else if (p.value.type === 'AssignmentPattern' && - p.value.left.type === 'Identifier') { - // { foo = 1 } - excludedIds.add(p.value.left); - defaultValue = p.value.right; - } - } - else { - key = p.computed ? p.key : p.key.name; - if (p.value.type === 'Identifier') { - // { foo: bar } - nameId = p.value; - } - else if (p.value.type === 'ObjectPattern') { - processRefObjectPattern(p.value, call, tempVar, [...path, key]); - } - else if (p.value.type === 'ArrayPattern') { - processRefArrayPattern(p.value, call, tempVar, [...path, key]); - } - else if (p.value.type === 'AssignmentPattern') { - if (p.value.left.type === 'Identifier') { - // { foo: bar = 1 } - nameId = p.value.left; - defaultValue = p.value.right; - } - else if (p.value.left.type === 'ObjectPattern') { - processRefObjectPattern(p.value.left, call, tempVar, [ - ...path, - [key, p.value.right] - ]); - } - else if (p.value.left.type === 'ArrayPattern') { - processRefArrayPattern(p.value.left, call, tempVar, [ - ...path, - [key, p.value.right] - ]); - } - else ; - } - } - } - else { - // rest element { ...foo } - error(`reactivity destructure does not support rest elements.`, p); - } - if (nameId) { - registerRefBinding(nameId); - // inject toRef() after original replaced pattern - const source = pathToString(tempVar, path); - const keyStr = isString(key) - ? `'${key}'` - : key - ? snip(key) - : `'${nameId.name}'`; - const defaultStr = defaultValue ? `, ${snip(defaultValue)}` : ``; - s.appendLeft(call.end + offset, `,\n ${nameId.name} = ${helper('toRef')}(${source}, ${keyStr}${defaultStr})`); - } - } - } - function processRefArrayPattern(pattern, call, tempVar, path = []) { - if (!tempVar) { - // const [x] = $(useFoo()) --> const __$temp_1 = useFoo() - tempVar = genTempVar(); - s.overwrite(pattern.start + offset, pattern.end + offset, tempVar); - } - for (let i = 0; i < pattern.elements.length; i++) { - const e = pattern.elements[i]; - if (!e) - continue; - let nameId; - let defaultValue; - if (e.type === 'Identifier') { - // [a] --> [__a] - nameId = e; - } - else if (e.type === 'AssignmentPattern') { - // [a = 1] - nameId = e.left; - defaultValue = e.right; - } - else if (e.type === 'RestElement') { - // [...a] - error(`reactivity destructure does not support rest elements.`, e); - } - else if (e.type === 'ObjectPattern') { - processRefObjectPattern(e, call, tempVar, [...path, i]); - } - else if (e.type === 'ArrayPattern') { - processRefArrayPattern(e, call, tempVar, [...path, i]); - } - if (nameId) { - registerRefBinding(nameId); - // inject toRef() after original replaced pattern - const source = pathToString(tempVar, path); - const defaultStr = defaultValue ? `, ${snip(defaultValue)}` : ``; - s.appendLeft(call.end + offset, `,\n ${nameId.name} = ${helper('toRef')}(${source}, ${i}${defaultStr})`); - } - } - } - function pathToString(source, path) { - if (path.length) { - for (const seg of path) { - if (isArray(seg)) { - source = `(${source}${segToString(seg[0])} || ${snip(seg[1])})`; - } - else { - source += segToString(seg); - } - } - } - return source; - } - function segToString(seg) { - if (typeof seg === 'number') { - return `[${seg}]`; - } - else if (typeof seg === 'string') { - return `.${seg}`; - } - else { - return snip(seg); - } - } - function rewriteId(scope, id, parent, parentStack) { - if (hasOwn(scope, id.name)) { - const bindingType = scope[id.name]; - if (bindingType) { - const isProp = bindingType === 'prop'; - if (isStaticProperty(parent) && parent.shorthand) { - // let binding used in a property shorthand - // skip for destructure patterns - if (!parent.inPattern || - isInDestructureAssignment(parent, parentStack)) { - if (isProp) { - if (escapeScope) { - // prop binding in $$() - // { prop } -> { prop: __props_prop } - registerEscapedPropBinding(id); - s.appendLeft(id.end + offset, `: __props_${propsLocalToPublicMap[id.name]}`); - } - else { - // { prop } -> { prop: __props.prop } - s.appendLeft(id.end + offset, `: ${genPropsAccessExp(propsLocalToPublicMap[id.name])}`); - } - } - else { - // { foo } -> { foo: foo.value } - s.appendLeft(id.end + offset, `: ${id.name}.value`); - } - } - } - else { - if (isProp) { - if (escapeScope) { - // x --> __props_x - registerEscapedPropBinding(id); - s.overwrite(id.start + offset, id.end + offset, `__props_${propsLocalToPublicMap[id.name]}`); - } - else { - // x --> __props.x - s.overwrite(id.start + offset, id.end + offset, genPropsAccessExp(propsLocalToPublicMap[id.name])); - } - } - else { - // x --> x.value - s.appendLeft(id.end + offset, '.value'); - } - } - } - return true; - } - return false; - } - const propBindingRefs = {}; - function registerEscapedPropBinding(id) { - if (!propBindingRefs.hasOwnProperty(id.name)) { - propBindingRefs[id.name] = true; - const publicKey = propsLocalToPublicMap[id.name]; - s.prependRight(offset, `const __props_${publicKey} = ${helper(`toRef`)}(__props, '${publicKey}')\n`); - } - } - // check root scope first - walkScope(ast, true); - walk$1(ast, { - enter(node, parent) { - parent && parentStack.push(parent); - // function scopes - if (isFunctionType(node)) { - scopeStack.push((currentScope = {})); - walkFunctionParams(node, registerBinding); - if (node.body.type === 'BlockStatement') { - walkScope(node.body); - } - return; - } - // catch param - if (node.type === 'CatchClause') { - scopeStack.push((currentScope = {})); - if (node.param && node.param.type === 'Identifier') { - registerBinding(node.param); - } - walkScope(node.body); - return; - } - // non-function block scopes - if (node.type === 'BlockStatement' && !isFunctionType(parent)) { - scopeStack.push((currentScope = {})); - walkScope(node); - return; - } - // skip type nodes - if (parent && - parent.type.startsWith('TS') && - parent.type !== 'TSAsExpression' && - parent.type !== 'TSNonNullExpression' && - parent.type !== 'TSTypeAssertion') { - return this.skip(); - } - if (node.type === 'Identifier' && - // if inside $$(), skip unless this is a destructured prop binding - !(escapeScope && rootScope[node.name] !== 'prop') && - isReferencedIdentifier(node, parent, parentStack) && - !excludedIds.has(node)) { - // walk up the scope chain to check if id should be appended .value - let i = scopeStack.length; - while (i--) { - if (rewriteId(scopeStack[i], node, parent, parentStack)) { - return; - } - } - } - if (node.type === 'CallExpression' && node.callee.type === 'Identifier') { - const callee = node.callee.name; - const refCall = isRefCreationCall(callee); - if (refCall && (!parent || parent.type !== 'VariableDeclarator')) { - return error(`${refCall} can only be used as the initializer of ` + - `a variable declaration.`, node); - } - if (callee === escapeSymbol) { - s.remove(node.callee.start + offset, node.callee.end + offset); - escapeScope = node; - } - // TODO remove when out of experimental - if (callee === '$raw') { - error(`$raw() has been replaced by $$(). ` + - `See ${RFC_LINK} for latest updates.`, node); - } - if (callee === '$fromRef') { - error(`$fromRef() has been replaced by $(). ` + - `See ${RFC_LINK} for latest updates.`, node); - } - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if ((node.type === 'BlockStatement' && !isFunctionType(parent)) || - isFunctionType(node)) { - scopeStack.pop(); - currentScope = scopeStack[scopeStack.length - 1] || null; - } - if (node === escapeScope) { - escapeScope = undefined; - } - } - }); - return { - rootRefs: Object.keys(rootScope).filter(key => rootScope[key] === true), - importedHelpers: [...importedHelpers] - }; -} -const RFC_LINK = `https://github.com/vuejs/rfcs/discussions/369`; -const hasWarned$1 = {}; -function warnExperimental() { - // eslint-disable-next-line - if (typeof window !== 'undefined') { - return; - } - warnOnce$1(`Reactivity transform is an experimental feature.\n` + - `Experimental features may change behavior between patch versions.\n` + - `It is recommended to pin your vue dependencies to exact versions to avoid breakage.\n` + - `You can follow the proposal's status at ${RFC_LINK}.`); -} -function warnOnce$1(msg) { - const isNodeProd = typeof process !== 'undefined' && ({}).NODE_ENV === 'production'; - if (!isNodeProd && !false && !hasWarned$1[msg]) { - hasWarned$1[msg] = true; - warn$1(msg); - } -} -function warn$1(msg) { - console.warn(`\x1b[1m\x1b[33m[@vue/reactivity-transform]\x1b[0m\x1b[33m ${msg}\x1b[0m\n`); -} - -// Special compiler macros -const DEFINE_PROPS = 'defineProps'; -const DEFINE_EMITS = 'defineEmits'; -const DEFINE_EXPOSE = 'defineExpose'; -const WITH_DEFAULTS = 'withDefaults'; -// constants -const DEFAULT_VAR = `__default__`; -const isBuiltInDir = makeMap(`once,memo,if,for,else,else-if,slot,text,html,on,bind,model,show,cloak,is`); -/** - * Compile `<script setup>` - * It requires the whole SFC descriptor because we need to handle and merge - * normal `<script>` + `<script setup>` if both are present. - */ -function compileScript(sfc, options) { - var _a; - let { script, scriptSetup, source, filename } = sfc; - // feature flags - // TODO remove support for deprecated options when out of experimental - const enableReactivityTransform = !!options.reactivityTransform || - !!options.refSugar || - !!options.refTransform; - const enablePropsTransform = !!options.reactivityTransform || !!options.propsDestructureTransform; - const isProd = !!options.isProd; - const genSourceMap = options.sourceMap !== false; - let refBindings; - if (!options.id) { - warnOnce(`compileScript now requires passing the \`id\` option.\n` + - `Upgrade your vite or vue-loader version for compatibility with ` + - `the latest experimental proposals.`); - } - const scopeId = options.id ? options.id.replace(/^data-v-/, '') : ''; - const cssVars = sfc.cssVars; - const scriptLang = script && script.lang; - const scriptSetupLang = scriptSetup && scriptSetup.lang; - const isTS = scriptLang === 'ts' || - scriptLang === 'tsx' || - scriptSetupLang === 'ts' || - scriptSetupLang === 'tsx'; - // resolve parser plugins - const plugins = []; - if (!isTS || scriptLang === 'tsx' || scriptSetupLang === 'tsx') { - plugins.push('jsx'); - } - else { - // If don't match the case of adding jsx, should remove the jsx from the babelParserPlugins - if (options.babelParserPlugins) - options.babelParserPlugins = options.babelParserPlugins.filter(n => n !== 'jsx'); - } - if (options.babelParserPlugins) - plugins.push(...options.babelParserPlugins); - if (isTS) - plugins.push('typescript', 'decorators-legacy'); - if (!scriptSetup) { - if (!script) { - throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`); - } - if (scriptLang && !isTS && scriptLang !== 'jsx') { - // do not process non js/ts script blocks - return script; - } - try { - let content = script.content; - let map = script.map; - const scriptAst = parse_1(content, { - plugins, - sourceType: 'module' - }).program; - const bindings = analyzeScriptBindings(scriptAst.body); - if (enableReactivityTransform && shouldTransform(content)) { - const s = new MagicString(source); - const startOffset = script.loc.start.offset; - const endOffset = script.loc.end.offset; - const { importedHelpers } = transformAST(scriptAst, s, startOffset); - if (importedHelpers.length) { - s.prepend(`import { ${importedHelpers - .map(h => `${h} as _${h}`) - .join(', ')} } from 'vue'\n`); - } - s.remove(0, startOffset); - s.remove(endOffset, source.length); - content = s.toString(); - if (genSourceMap) { - map = s.generateMap({ - source: filename, - hires: true, - includeContent: true - }); - } - } - if (cssVars.length) { - content = rewriteDefault(content, DEFAULT_VAR, plugins); - content += genNormalScriptCssVarsCode(cssVars, bindings, scopeId, isProd); - content += `\nexport default ${DEFAULT_VAR}`; - } - return Object.assign(Object.assign({}, script), { content, - map, - bindings, scriptAst: scriptAst.body }); - } - catch (e) { - // silently fallback if parse fails since user may be using custom - // babel syntax - return script; - } - } - if (script && scriptLang !== scriptSetupLang) { - throw new Error(`[@vue/compiler-sfc] <script> and <script setup> must have the same ` + - `language type.`); - } - if (scriptSetupLang && !isTS && scriptSetupLang !== 'jsx') { - // do not process non js/ts script blocks - return scriptSetup; - } - // metadata that needs to be returned - const bindingMetadata = {}; - const helperImports = new Set(); - const userImports = Object.create(null); - const userImportAlias = Object.create(null); - const scriptBindings = Object.create(null); - const setupBindings = Object.create(null); - let defaultExport; - let hasDefinePropsCall = false; - let hasDefineEmitCall = false; - let hasDefineExposeCall = false; - let hasDefaultExportName = false; - let hasDefaultExportRender = false; - let propsRuntimeDecl; - let propsRuntimeDefaults; - let propsDestructureDecl; - let propsDestructureRestId; - let propsTypeDecl; - let propsTypeDeclRaw; - let propsIdentifier; - let emitsRuntimeDecl; - let emitsTypeDecl; - let emitsTypeDeclRaw; - let emitIdentifier; - let hasAwait = false; - let hasInlinedSsrRenderFn = false; - // props/emits declared via types - const typeDeclaredProps = {}; - const typeDeclaredEmits = new Set(); - // record declared types for runtime props type generation - const declaredTypes = {}; - // props destructure data - const propsDestructuredBindings = Object.create(null); - // magic-string state - const s = new MagicString(source); - const startOffset = scriptSetup.loc.start.offset; - const endOffset = scriptSetup.loc.end.offset; - const scriptStartOffset = script && script.loc.start.offset; - const scriptEndOffset = script && script.loc.end.offset; - function helper(key) { - helperImports.add(key); - return `_${key}`; - } - function parse(input, options, offset) { - try { - return parse_1(input, options).program; - } - catch (e) { - e.message = `[@vue/compiler-sfc] ${e.message}\n\n${sfc.filename}\n${generateCodeFrame(source, e.pos + offset, e.pos + offset + 1)}`; - throw e; - } - } - function error(msg, node, end = node.end + startOffset) { - throw new Error(`[@vue/compiler-sfc] ${msg}\n\n${sfc.filename}\n${generateCodeFrame(source, node.start + startOffset, end)}`); - } - function registerUserImport(source, local, imported, isType, isFromSetup, needTemplateUsageCheck) { - if (source === 'vue' && imported) { - userImportAlias[imported] = local; - } - // template usage check is only needed in non-inline mode, so we can skip - // the work if inlineTemplate is true. - let isUsedInTemplate = needTemplateUsageCheck; - if (needTemplateUsageCheck && - isTS && - sfc.template && - !sfc.template.src && - !sfc.template.lang) { - isUsedInTemplate = isImportUsed(local, sfc); - } - userImports[local] = { - isType, - imported: imported || 'default', - source, - isFromSetup, - isUsedInTemplate - }; - } - function processDefineProps(node, declId) { - if (!isCallOf(node, DEFINE_PROPS)) { - return false; - } - if (hasDefinePropsCall) { - error(`duplicate ${DEFINE_PROPS}() call`, node); - } - hasDefinePropsCall = true; - propsRuntimeDecl = node.arguments[0]; - // call has type parameters - infer runtime types from it - if (node.typeParameters) { - if (propsRuntimeDecl) { - error(`${DEFINE_PROPS}() cannot accept both type and non-type arguments ` + - `at the same time. Use one or the other.`, node); - } - propsTypeDeclRaw = node.typeParameters.params[0]; - propsTypeDecl = resolveQualifiedType(propsTypeDeclRaw, node => node.type === 'TSTypeLiteral'); - if (!propsTypeDecl) { - error(`type argument passed to ${DEFINE_PROPS}() must be a literal type, ` + - `or a reference to an interface or literal type.`, propsTypeDeclRaw); - } - } - if (declId) { - if (enablePropsTransform && declId.type === 'ObjectPattern') { - propsDestructureDecl = declId; - // props destructure - handle compilation sugar - for (const prop of declId.properties) { - if (prop.type === 'ObjectProperty') { - if (prop.computed) { - error(`${DEFINE_PROPS}() destructure cannot use computed key.`, prop.key); - } - const propKey = prop.key.type === 'StringLiteral' - ? prop.key.value - : prop.key.name; - if (prop.value.type === 'AssignmentPattern') { - // default value { foo = 123 } - const { left, right } = prop.value; - if (left.type !== 'Identifier') { - error(`${DEFINE_PROPS}() destructure does not support nested patterns.`, left); - } - // store default value - propsDestructuredBindings[propKey] = { - local: left.name, - default: right - }; - } - else if (prop.value.type === 'Identifier') { - // simple destructure - propsDestructuredBindings[propKey] = { - local: prop.value.name - }; - } - else { - error(`${DEFINE_PROPS}() destructure does not support nested patterns.`, prop.value); - } - } - else { - // rest spread - propsDestructureRestId = prop.argument.name; - } - } - } - else { - propsIdentifier = scriptSetup.content.slice(declId.start, declId.end); - } - } - return true; - } - function processWithDefaults(node, declId) { - if (!isCallOf(node, WITH_DEFAULTS)) { - return false; - } - if (processDefineProps(node.arguments[0], declId)) { - if (propsRuntimeDecl) { - error(`${WITH_DEFAULTS} can only be used with type-based ` + - `${DEFINE_PROPS} declaration.`, node); - } - if (propsDestructureDecl) { - error(`${WITH_DEFAULTS}() is unnecessary when using destructure with ${DEFINE_PROPS}().\n` + - `Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...).`, node.callee); - } - propsRuntimeDefaults = node.arguments[1]; - if (!propsRuntimeDefaults || - propsRuntimeDefaults.type !== 'ObjectExpression') { - error(`The 2nd argument of ${WITH_DEFAULTS} must be an object literal.`, propsRuntimeDefaults || node); - } - } - else { - error(`${WITH_DEFAULTS}' first argument must be a ${DEFINE_PROPS} call.`, node.arguments[0] || node); - } - return true; - } - function processDefineEmits(node, declId) { - if (!isCallOf(node, DEFINE_EMITS)) { - return false; - } - if (hasDefineEmitCall) { - error(`duplicate ${DEFINE_EMITS}() call`, node); - } - hasDefineEmitCall = true; - emitsRuntimeDecl = node.arguments[0]; - if (node.typeParameters) { - if (emitsRuntimeDecl) { - error(`${DEFINE_EMITS}() cannot accept both type and non-type arguments ` + - `at the same time. Use one or the other.`, node); - } - emitsTypeDeclRaw = node.typeParameters.params[0]; - emitsTypeDecl = resolveQualifiedType(emitsTypeDeclRaw, node => node.type === 'TSFunctionType' || node.type === 'TSTypeLiteral'); - if (!emitsTypeDecl) { - error(`type argument passed to ${DEFINE_EMITS}() must be a function type, ` + - `a literal type with call signatures, or a reference to the above types.`, emitsTypeDeclRaw); - } - } - if (declId) { - emitIdentifier = scriptSetup.content.slice(declId.start, declId.end); - } - return true; - } - function resolveQualifiedType(node, qualifier) { - if (qualifier(node)) { - return node; - } - if (node.type === 'TSTypeReference' && - node.typeName.type === 'Identifier') { - const refName = node.typeName.name; - const isQualifiedType = (node) => { - if (node.type === 'TSInterfaceDeclaration' && - node.id.name === refName) { - return node.body; - } - else if (node.type === 'TSTypeAliasDeclaration' && - node.id.name === refName && - qualifier(node.typeAnnotation)) { - return node.typeAnnotation; - } - else if (node.type === 'ExportNamedDeclaration' && node.declaration) { - return isQualifiedType(node.declaration); - } - }; - const body = scriptAst - ? [...scriptSetupAst.body, ...scriptAst.body] - : scriptSetupAst.body; - for (const node of body) { - const qualified = isQualifiedType(node); - if (qualified) { - return qualified; - } - } - } - } - function processDefineExpose(node) { - if (isCallOf(node, DEFINE_EXPOSE)) { - if (hasDefineExposeCall) { - error(`duplicate ${DEFINE_EXPOSE}() call`, node); - } - hasDefineExposeCall = true; - return true; - } - return false; - } - function checkInvalidScopeReference(node, method) { - if (!node) - return; - walkIdentifiers(node, id => { - if (setupBindings[id.name]) { - error(`\`${method}()\` in <script setup> cannot reference locally ` + - `declared variables because it will be hoisted outside of the ` + - `setup() function. If your component options require initialization ` + - `in the module scope, use a separate normal <script> to export ` + - `the options instead.`, id); - } - }); - } - /** - * await foo() - * --> - * ;( - * ([__temp,__restore] = withAsyncContext(() => foo())), - * await __temp, - * __restore() - * ) - * - * const a = await foo() - * --> - * const a = ( - * ([__temp, __restore] = withAsyncContext(() => foo())), - * __temp = await __temp, - * __restore(), - * __temp - * ) - */ - function processAwait(node, needSemi, isStatement) { - const argumentStart = node.argument.extra && node.argument.extra.parenthesized - ? node.argument.extra.parenStart - : node.argument.start; - const argumentStr = source.slice(argumentStart + startOffset, node.argument.end + startOffset); - const containsNestedAwait = /\bawait\b/.test(argumentStr); - s.overwrite(node.start + startOffset, argumentStart + startOffset, `${needSemi ? `;` : ``}(\n ([__temp,__restore] = ${helper(`withAsyncContext`)}(${containsNestedAwait ? `async ` : ``}() => `); - s.appendLeft(node.end + startOffset, `)),\n ${isStatement ? `` : `__temp = `}await __temp,\n __restore()${isStatement ? `` : `,\n __temp`}\n)`); - } - /** - * check defaults. If the default object is an object literal with only - * static properties, we can directly generate more optimized default - * declarations. Otherwise we will have to fallback to runtime merging. - */ - function hasStaticWithDefaults() { - return (propsRuntimeDefaults && - propsRuntimeDefaults.type === 'ObjectExpression' && - propsRuntimeDefaults.properties.every(node => (node.type === 'ObjectProperty' && !node.computed) || - node.type === 'ObjectMethod')); - } - function genRuntimeProps(props) { - const keys = Object.keys(props); - if (!keys.length) { - return ``; - } - const hasStaticDefaults = hasStaticWithDefaults(); - const scriptSetupSource = scriptSetup.content; - let propsDecls = `{ - ${keys - .map(key => { - let defaultString; - const destructured = genDestructuredDefaultValue(key); - if (destructured) { - defaultString = `default: ${destructured}`; - } - else if (hasStaticDefaults) { - const prop = propsRuntimeDefaults.properties.find((node) => node.key.name === key); - if (prop) { - if (prop.type === 'ObjectProperty') { - // prop has corresponding static default value - defaultString = `default: ${scriptSetupSource.slice(prop.value.start, prop.value.end)}`; - } - else { - defaultString = `default() ${scriptSetupSource.slice(prop.body.start, prop.body.end)}`; - } - } - } - const { type, required } = props[key]; - if (!isProd) { - return `${key}: { type: ${toRuntimeTypeString(type)}, required: ${required}${defaultString ? `, ${defaultString}` : ``} }`; - } - else if (type.some(el => el === 'Boolean' || (defaultString && el === 'Function'))) { - // #4783 production: if boolean or defaultString and function exists, should keep the type. - return `${key}: { type: ${toRuntimeTypeString(type)}${defaultString ? `, ${defaultString}` : ``} }`; - } - else { - // production: checks are useless - return `${key}: ${defaultString ? `{ ${defaultString} }` : 'null'}`; - } - }) - .join(',\n ')}\n }`; - if (propsRuntimeDefaults && !hasStaticDefaults) { - propsDecls = `${helper('mergeDefaults')}(${propsDecls}, ${source.slice(propsRuntimeDefaults.start + startOffset, propsRuntimeDefaults.end + startOffset)})`; - } - return `\n props: ${propsDecls},`; - } - function genDestructuredDefaultValue(key) { - const destructured = propsDestructuredBindings[key]; - if (destructured && destructured.default) { - const value = scriptSetup.content.slice(destructured.default.start, destructured.default.end); - const isLiteral = destructured.default.type.endsWith('Literal'); - return isLiteral ? value : `() => (${value})`; - } - } - function genSetupPropsType(node) { - const scriptSetupSource = scriptSetup.content; - if (hasStaticWithDefaults()) { - // if withDefaults() is used, we need to remove the optional flags - // on props that have default values - let res = `{ `; - const members = node.type === 'TSTypeLiteral' ? node.members : node.body; - for (const m of members) { - if ((m.type === 'TSPropertySignature' || - m.type === 'TSMethodSignature') && - m.typeAnnotation && - m.key.type === 'Identifier') { - if (propsRuntimeDefaults.properties.some((p) => p.key.name === m.key.name)) { - res += - m.key.name + - (m.type === 'TSMethodSignature' ? '()' : '') + - scriptSetupSource.slice(m.typeAnnotation.start, m.typeAnnotation.end) + - ', '; - } - else { - res += - scriptSetupSource.slice(m.start, m.typeAnnotation.end) + `, `; - } - } - } - return (res.length ? res.slice(0, -2) : res) + ` }`; - } - else { - return scriptSetupSource.slice(node.start, node.end); - } - } - // 1. process normal <script> first if it exists - let scriptAst; - if (script) { - scriptAst = parse(script.content, { - plugins, - sourceType: 'module' - }, scriptStartOffset); - for (const node of scriptAst.body) { - if (node.type === 'ImportDeclaration') { - // record imports for dedupe - for (const specifier of node.specifiers) { - const imported = specifier.type === 'ImportSpecifier' && - specifier.imported.type === 'Identifier' && - specifier.imported.name; - registerUserImport(node.source.value, specifier.local.name, imported, node.importKind === 'type' || - (specifier.type === 'ImportSpecifier' && - specifier.importKind === 'type'), false, !options.inlineTemplate); - } - } - else if (node.type === 'ExportDefaultDeclaration') { - // export default - defaultExport = node; - // check if user has manually specified `name` or 'render` option in - // export default - // if has name, skip name inference - // if has render and no template, generate return object instead of - // empty render function (#4980) - let optionProperties; - if (defaultExport.declaration.type === 'ObjectExpression') { - optionProperties = defaultExport.declaration.properties; - } - else if (defaultExport.declaration.type === 'CallExpression' && - defaultExport.declaration.arguments[0].type === 'ObjectExpression') { - optionProperties = defaultExport.declaration.arguments[0].properties; - } - if (optionProperties) { - for (const s of optionProperties) { - if (s.type === 'ObjectProperty' && - s.key.type === 'Identifier' && - s.key.name === 'name') { - hasDefaultExportName = true; - } - if ((s.type === 'ObjectMethod' || s.type === 'ObjectProperty') && - s.key.type === 'Identifier' && - s.key.name === 'render') { - // TODO warn when we provide a better way to do it? - hasDefaultExportRender = true; - } - } - } - // export default { ... } --> const __default__ = { ... } - const start = node.start + scriptStartOffset; - const end = node.declaration.start + scriptStartOffset; - s.overwrite(start, end, `const ${DEFAULT_VAR} = `); - } - else if (node.type === 'ExportNamedDeclaration') { - const defaultSpecifier = node.specifiers.find(s => s.exported.type === 'Identifier' && s.exported.name === 'default'); - if (defaultSpecifier) { - defaultExport = node; - // 1. remove specifier - if (node.specifiers.length > 1) { - s.remove(defaultSpecifier.start + scriptStartOffset, defaultSpecifier.end + scriptStartOffset); - } - else { - s.remove(node.start + scriptStartOffset, node.end + scriptStartOffset); - } - if (node.source) { - // export { x as default } from './x' - // rewrite to `import { x as __default__ } from './x'` and - // add to top - s.prepend(`import { ${defaultSpecifier.local.name} as ${DEFAULT_VAR} } from '${node.source.value}'\n`); - } - else { - // export { x as default } - // rewrite to `const __default__ = x` and move to end - s.appendLeft(scriptEndOffset, `\nconst ${DEFAULT_VAR} = ${defaultSpecifier.local.name}\n`); - } - } - if (node.declaration) { - walkDeclaration(node.declaration, scriptBindings, userImportAlias); - } - } - else if ((node.type === 'VariableDeclaration' || - node.type === 'FunctionDeclaration' || - node.type === 'ClassDeclaration' || - node.type === 'TSEnumDeclaration') && - !node.declare) { - walkDeclaration(node, scriptBindings, userImportAlias); - } - } - // apply reactivity transform - if (enableReactivityTransform && shouldTransform(script.content)) { - const { rootRefs, importedHelpers } = transformAST(scriptAst, s, scriptStartOffset); - refBindings = rootRefs; - for (const h of importedHelpers) { - helperImports.add(h); - } - } - // <script> after <script setup> - // we need to move the block up so that `const __default__` is - // declared before being used in the actual component definition - if (scriptStartOffset > startOffset) { - // if content doesn't end with newline, add one - if (!/\n$/.test(script.content.trim())) { - s.appendLeft(scriptEndOffset, `\n`); - } - s.move(scriptStartOffset, scriptEndOffset, 0); - } - } - // 2. parse <script setup> and walk over top level statements - const scriptSetupAst = parse(scriptSetup.content, { - plugins: [ - ...plugins, - // allow top level await but only inside <script setup> - 'topLevelAwait' - ], - sourceType: 'module' - }, startOffset); - for (const node of scriptSetupAst.body) { - const start = node.start + startOffset; - let end = node.end + startOffset; - // locate comment - if (node.trailingComments && node.trailingComments.length > 0) { - const lastCommentNode = node.trailingComments[node.trailingComments.length - 1]; - end = lastCommentNode.end + startOffset; - } - // locate the end of whitespace between this statement and the next - while (end <= source.length) { - if (!/\s/.test(source.charAt(end))) { - break; - } - end++; - } - // (Dropped) `ref: x` bindings - if (node.type === 'LabeledStatement' && - node.label.name === 'ref' && - node.body.type === 'ExpressionStatement') { - error(`ref sugar using the label syntax was an experimental proposal and ` + - `has been dropped based on community feedback. Please check out ` + - `the new proposal at https://github.com/vuejs/rfcs/discussions/369`, node); - } - if (node.type === 'ImportDeclaration') { - // import declarations are moved to top - s.move(start, end, 0); - // dedupe imports - let removed = 0; - const removeSpecifier = (i) => { - const removeLeft = i > removed; - removed++; - const current = node.specifiers[i]; - const next = node.specifiers[i + 1]; - s.remove(removeLeft - ? node.specifiers[i - 1].end + startOffset - : current.start + startOffset, next && !removeLeft - ? next.start + startOffset - : current.end + startOffset); - }; - for (let i = 0; i < node.specifiers.length; i++) { - const specifier = node.specifiers[i]; - const local = specifier.local.name; - let imported = specifier.type === 'ImportSpecifier' && - specifier.imported.type === 'Identifier' && - specifier.imported.name; - if (specifier.type === 'ImportNamespaceSpecifier') { - imported = '*'; - } - const source = node.source.value; - const existing = userImports[local]; - if (source === 'vue' && - (imported === DEFINE_PROPS || - imported === DEFINE_EMITS || - imported === DEFINE_EXPOSE)) { - warnOnce(`\`${imported}\` is a compiler macro and no longer needs to be imported.`); - removeSpecifier(i); - } - else if (existing) { - if (existing.source === source && existing.imported === imported) { - // already imported in <script setup>, dedupe - removeSpecifier(i); - } - else { - error(`different imports aliased to same local name.`, specifier); - } - } - else { - registerUserImport(source, local, imported, node.importKind === 'type' || - (specifier.type === 'ImportSpecifier' && - specifier.importKind === 'type'), true, !options.inlineTemplate); - } - } - if (node.specifiers.length && removed === node.specifiers.length) { - s.remove(node.start + startOffset, node.end + startOffset); - } - } - if (node.type === 'ExpressionStatement') { - // process `defineProps` and `defineEmit(s)` calls - if (processDefineProps(node.expression) || - processDefineEmits(node.expression) || - processWithDefaults(node.expression)) { - s.remove(node.start + startOffset, node.end + startOffset); - } - else if (processDefineExpose(node.expression)) { - // defineExpose({}) -> expose({}) - const callee = node.expression.callee; - s.overwrite(callee.start + startOffset, callee.end + startOffset, 'expose'); - } - } - if (node.type === 'VariableDeclaration' && !node.declare) { - const total = node.declarations.length; - let left = total; - for (let i = 0; i < total; i++) { - const decl = node.declarations[i]; - if (decl.init) { - // defineProps / defineEmits - const isDefineProps = processDefineProps(decl.init, decl.id) || - processWithDefaults(decl.init, decl.id); - const isDefineEmits = processDefineEmits(decl.init, decl.id); - if (isDefineProps || isDefineEmits) { - if (left === 1) { - s.remove(node.start + startOffset, node.end + startOffset); - } - else { - let start = decl.start + startOffset; - let end = decl.end + startOffset; - if (i < total - 1) { - // not the last one, locate the start of the next - end = node.declarations[i + 1].start + startOffset; - } - else { - // last one, locate the end of the prev - start = node.declarations[i - 1].end + startOffset; - } - s.remove(start, end); - left--; - } - } - } - } - } - // walk declarations to record declared bindings - if ((node.type === 'VariableDeclaration' || - node.type === 'FunctionDeclaration' || - node.type === 'ClassDeclaration') && - !node.declare) { - walkDeclaration(node, setupBindings, userImportAlias); - } - // walk statements & named exports / variable declarations for top level - // await - if ((node.type === 'VariableDeclaration' && !node.declare) || - node.type.endsWith('Statement')) { - const scope = [scriptSetupAst.body]; - walk$1(node, { - enter(child, parent) { - if (isFunctionType(child)) { - this.skip(); - } - if (child.type === 'BlockStatement') { - scope.push(child.body); - } - if (child.type === 'AwaitExpression') { - hasAwait = true; - // if the await expression is an expression statement and - // - is in the root scope - // - or is not the first statement in a nested block scope - // then it needs a semicolon before the generated code. - const currentScope = scope[scope.length - 1]; - const needsSemi = currentScope.some((n, i) => { - return ((scope.length === 1 || i > 0) && - n.type === 'ExpressionStatement' && - n.start === child.start); - }); - processAwait(child, needsSemi, parent.type === 'ExpressionStatement'); - } - }, - exit(node) { - if (node.type === 'BlockStatement') - scope.pop(); - } - }); - } - if ((node.type === 'ExportNamedDeclaration' && node.exportKind !== 'type') || - node.type === 'ExportAllDeclaration' || - node.type === 'ExportDefaultDeclaration') { - error(`<script setup> cannot contain ES module exports. ` + - `If you are using a previous version of <script setup>, please ` + - `consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.`, node); - } - if (isTS) { - // runtime enum - if (node.type === 'TSEnumDeclaration') { - registerBinding(setupBindings, node.id, "setup-const" /* SETUP_CONST */); - } - // move all Type declarations to outer scope - if (node.type.startsWith('TS') || - (node.type === 'ExportNamedDeclaration' && - node.exportKind === 'type') || - (node.type === 'VariableDeclaration' && node.declare)) { - recordType(node, declaredTypes); - s.move(start, end, 0); - } - } - } - // 3. Apply reactivity transform - if ((enableReactivityTransform && - // normal <script> had ref bindings that maybe used in <script setup> - (refBindings || shouldTransform(scriptSetup.content))) || - propsDestructureDecl) { - const { rootRefs, importedHelpers } = transformAST(scriptSetupAst, s, startOffset, refBindings, propsDestructuredBindings); - refBindings = refBindings ? [...refBindings, ...rootRefs] : rootRefs; - for (const h of importedHelpers) { - helperImports.add(h); - } - } - // 4. extract runtime props/emits code from setup context type - if (propsTypeDecl) { - extractRuntimeProps(propsTypeDecl, typeDeclaredProps, declaredTypes); - } - if (emitsTypeDecl) { - extractRuntimeEmits(emitsTypeDecl, typeDeclaredEmits); - } - // 5. check useOptions args to make sure it doesn't reference setup scope - // variables - checkInvalidScopeReference(propsRuntimeDecl, DEFINE_PROPS); - checkInvalidScopeReference(propsRuntimeDefaults, DEFINE_PROPS); - checkInvalidScopeReference(propsDestructureDecl, DEFINE_PROPS); - checkInvalidScopeReference(emitsRuntimeDecl, DEFINE_EMITS); - // 6. remove non-script content - if (script) { - if (startOffset < scriptStartOffset) { - // <script setup> before <script> - s.remove(0, startOffset); - s.remove(endOffset, scriptStartOffset); - s.remove(scriptEndOffset, source.length); - } - else { - // <script> before <script setup> - s.remove(0, scriptStartOffset); - s.remove(scriptEndOffset, startOffset); - s.remove(endOffset, source.length); - } - } - else { - // only <script setup> - s.remove(0, startOffset); - s.remove(endOffset, source.length); - } - // 7. analyze binding metadata - if (scriptAst) { - Object.assign(bindingMetadata, analyzeScriptBindings(scriptAst.body)); - } - if (propsRuntimeDecl) { - for (const key of getObjectOrArrayExpressionKeys(propsRuntimeDecl)) { - bindingMetadata[key] = "props" /* PROPS */; - } - } - for (const key in typeDeclaredProps) { - bindingMetadata[key] = "props" /* PROPS */; - } - // props aliases - if (propsDestructureDecl) { - if (propsDestructureRestId) { - bindingMetadata[propsDestructureRestId] = - "setup-reactive-const" /* SETUP_REACTIVE_CONST */; - } - for (const key in propsDestructuredBindings) { - const { local } = propsDestructuredBindings[key]; - if (local !== key) { - bindingMetadata[local] = "props-aliased" /* PROPS_ALIASED */; - (bindingMetadata.__propsAliases || - (bindingMetadata.__propsAliases = {}))[local] = key; - } - } - } - for (const [key, { isType, imported, source }] of Object.entries(userImports)) { - if (isType) - continue; - bindingMetadata[key] = - imported === '*' || - (imported === 'default' && source.endsWith('.vue')) || - source === 'vue' - ? "setup-const" /* SETUP_CONST */ - : "setup-maybe-ref" /* SETUP_MAYBE_REF */; - } - for (const key in scriptBindings) { - bindingMetadata[key] = scriptBindings[key]; - } - for (const key in setupBindings) { - bindingMetadata[key] = setupBindings[key]; - } - // known ref bindings - if (refBindings) { - for (const key of refBindings) { - bindingMetadata[key] = "setup-ref" /* SETUP_REF */; - } - } - // 8. inject `useCssVars` calls - if (cssVars.length && - // no need to do this when targeting SSR - !(options.inlineTemplate && ((_a = options.templateOptions) === null || _a === void 0 ? void 0 : _a.ssr))) { - helperImports.add(CSS_VARS_HELPER); - helperImports.add('unref'); - s.prependRight(startOffset, `\n${genCssVarsCode(cssVars, bindingMetadata, scopeId, isProd)}\n`); - } - // 9. finalize setup() argument signature - let args = `__props`; - if (propsTypeDecl) { - // mark as any and only cast on assignment - // since the user defined complex types may be incompatible with the - // inferred type from generated runtime declarations - args += `: any`; - } - // inject user assignment of props - // we use a default __props so that template expressions referencing props - // can use it directly - if (propsIdentifier) { - s.prependLeft(startOffset, `\nconst ${propsIdentifier} = __props${propsTypeDecl ? ` as ${genSetupPropsType(propsTypeDecl)}` : ``}\n`); - } - if (propsDestructureRestId) { - s.prependLeft(startOffset, `\nconst ${propsDestructureRestId} = ${helper(`createPropsRestProxy`)}(__props, ${JSON.stringify(Object.keys(propsDestructuredBindings))})\n`); - } - // inject temp variables for async context preservation - if (hasAwait) { - const any = isTS ? `: any` : ``; - s.prependLeft(startOffset, `\nlet __temp${any}, __restore${any}\n`); - } - const destructureElements = hasDefineExposeCall || !options.inlineTemplate ? [`expose`] : []; - if (emitIdentifier) { - destructureElements.push(emitIdentifier === `emit` ? `emit` : `emit: ${emitIdentifier}`); - } - if (destructureElements.length) { - args += `, { ${destructureElements.join(', ')} }`; - if (emitsTypeDecl) { - args += `: { emit: (${scriptSetup.content.slice(emitsTypeDecl.start, emitsTypeDecl.end)}), expose: any, slots: any, attrs: any }`; - } - } - // 10. generate return statement - let returned; - if (!options.inlineTemplate || (!sfc.template && hasDefaultExportRender)) { - // non-inline mode, or has manual render in normal <script> - // return bindings from script and script setup - const allBindings = Object.assign(Object.assign({}, scriptBindings), setupBindings); - for (const key in userImports) { - if (!userImports[key].isType && userImports[key].isUsedInTemplate) { - allBindings[key] = true; - } - } - returned = `{ ${Object.keys(allBindings).join(', ')} }`; - } - else { - // inline mode - if (sfc.template && !sfc.template.src) { - if (options.templateOptions && options.templateOptions.ssr) { - hasInlinedSsrRenderFn = true; - } - // inline render function mode - we are going to compile the template and - // inline it right here - const { code, ast, preamble, tips, errors } = compileTemplate(Object.assign(Object.assign({ filename, source: sfc.template.content, inMap: sfc.template.map }, options.templateOptions), { id: scopeId, scoped: sfc.styles.some(s => s.scoped), isProd: options.isProd, ssrCssVars: sfc.cssVars, compilerOptions: Object.assign(Object.assign({}, (options.templateOptions && - options.templateOptions.compilerOptions)), { inline: true, isTS, - bindingMetadata }) })); - if (tips.length) { - tips.forEach(warnOnce); - } - const err = errors[0]; - if (typeof err === 'string') { - throw new Error(err); - } - else if (err) { - if (err.loc) { - err.message += - `\n\n` + - sfc.filename + - '\n' + - generateCodeFrame(source, err.loc.start.offset, err.loc.end.offset) + - `\n`; - } - throw err; - } - if (preamble) { - s.prepend(preamble); - } - // avoid duplicated unref import - // as this may get injected by the render function preamble OR the - // css vars codegen - if (ast && ast.helpers.includes(UNREF)) { - helperImports.delete('unref'); - } - returned = code; - } - else { - returned = `() => {}`; - } - } - if (!options.inlineTemplate && !false) { - // in non-inline mode, the `__isScriptSetup: true` flag is used by - // componentPublicInstance proxy to allow properties that start with $ or _ - s.appendRight(endOffset, `\nconst __returned__ = ${returned}\n` + - `Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\n` + - `return __returned__` + - `\n}\n\n`); - } - else { - s.appendRight(endOffset, `\nreturn ${returned}\n}\n\n`); - } - // 11. finalize default export - let runtimeOptions = ``; - if (!hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) { - const match = filename.match(/([^/\\]+)\.\w+$/); - if (match) { - runtimeOptions += `\n name: '${match[1]}',`; - } - } - if (hasInlinedSsrRenderFn) { - runtimeOptions += `\n __ssrInlineRender: true,`; - } - if (propsRuntimeDecl) { - let declCode = scriptSetup.content - .slice(propsRuntimeDecl.start, propsRuntimeDecl.end) - .trim(); - if (propsDestructureDecl) { - const defaults = []; - for (const key in propsDestructuredBindings) { - const d = genDestructuredDefaultValue(key); - if (d) - defaults.push(`${key}: ${d}`); - } - if (defaults.length) { - declCode = `${helper(`mergeDefaults`)}(${declCode}, {\n ${defaults.join(',\n ')}\n})`; - } - } - runtimeOptions += `\n props: ${declCode},`; - } - else if (propsTypeDecl) { - runtimeOptions += genRuntimeProps(typeDeclaredProps); - } - if (emitsRuntimeDecl) { - runtimeOptions += `\n emits: ${scriptSetup.content - .slice(emitsRuntimeDecl.start, emitsRuntimeDecl.end) - .trim()},`; - } - else if (emitsTypeDecl) { - runtimeOptions += genRuntimeEmits(typeDeclaredEmits); - } - // <script setup> components are closed by default. If the user did not - // explicitly call `defineExpose`, call expose() with no args. - const exposeCall = hasDefineExposeCall || options.inlineTemplate ? `` : ` expose();\n`; - // wrap setup code with function. - if (isTS) { - // for TS, make sure the exported type is still valid type with - // correct props information - // we have to use object spread for types to be merged properly - // user's TS setting should compile it down to proper targets - // export default defineComponent({ ...__default__, ... }) - const def = defaultExport ? `\n ...${DEFAULT_VAR},` : ``; - s.prependLeft(startOffset, `\nexport default /*#__PURE__*/${helper(`defineComponent`)}({${def}${runtimeOptions}\n ${hasAwait ? `async ` : ``}setup(${args}) {\n${exposeCall}`); - s.appendRight(endOffset, `})`); - } - else { - if (defaultExport) { - // without TS, can't rely on rest spread, so we use Object.assign - // export default Object.assign(__default__, { ... }) - s.prependLeft(startOffset, `\nexport default /*#__PURE__*/Object.assign(${DEFAULT_VAR}, {${runtimeOptions}\n ` + - `${hasAwait ? `async ` : ``}setup(${args}) {\n${exposeCall}`); - s.appendRight(endOffset, `})`); - } - else { - s.prependLeft(startOffset, `\nexport default {${runtimeOptions}\n ` + - `${hasAwait ? `async ` : ``}setup(${args}) {\n${exposeCall}`); - s.appendRight(endOffset, `}`); - } - } - // 12. finalize Vue helper imports - if (helperImports.size > 0) { - s.prepend(`import { ${[...helperImports] - .map(h => `${h} as _${h}`) - .join(', ')} } from 'vue'\n`); - } - s.trim(); - return Object.assign(Object.assign({}, scriptSetup), { bindings: bindingMetadata, imports: userImports, content: s.toString(), map: genSourceMap - ? s.generateMap({ - source: filename, - hires: true, - includeContent: true - }) - : undefined, scriptAst: scriptAst === null || scriptAst === void 0 ? void 0 : scriptAst.body, scriptSetupAst: scriptSetupAst === null || scriptSetupAst === void 0 ? void 0 : scriptSetupAst.body }); -} -function registerBinding(bindings, node, type) { - bindings[node.name] = type; -} -function walkDeclaration(node, bindings, userImportAlias) { - if (node.type === 'VariableDeclaration') { - const isConst = node.kind === 'const'; - // export const foo = ... - for (const { id, init } of node.declarations) { - const isDefineCall = !!(isConst && - isCallOf(init, c => c === DEFINE_PROPS || c === DEFINE_EMITS || c === WITH_DEFAULTS)); - if (id.type === 'Identifier') { - let bindingType; - const userReactiveBinding = userImportAlias['reactive'] || 'reactive'; - if (isCallOf(init, userReactiveBinding)) { - // treat reactive() calls as let since it's meant to be mutable - bindingType = isConst - ? "setup-reactive-const" /* SETUP_REACTIVE_CONST */ - : "setup-let" /* SETUP_LET */; - } - else if ( - // if a declaration is a const literal, we can mark it so that - // the generated render fn code doesn't need to unref() it - isDefineCall || - (isConst && canNeverBeRef(init, userReactiveBinding))) { - bindingType = isCallOf(init, DEFINE_PROPS) - ? "setup-reactive-const" /* SETUP_REACTIVE_CONST */ - : "setup-const" /* SETUP_CONST */; - } - else if (isConst) { - if (isCallOf(init, userImportAlias['ref'] || 'ref')) { - bindingType = "setup-ref" /* SETUP_REF */; - } - else { - bindingType = "setup-maybe-ref" /* SETUP_MAYBE_REF */; - } - } - else { - bindingType = "setup-let" /* SETUP_LET */; - } - registerBinding(bindings, id, bindingType); - } - else { - if (isCallOf(init, DEFINE_PROPS)) { - // skip walking props destructure - return; - } - if (id.type === 'ObjectPattern') { - walkObjectPattern(id, bindings, isConst, isDefineCall); - } - else if (id.type === 'ArrayPattern') { - walkArrayPattern(id, bindings, isConst, isDefineCall); - } - } - } - } - else if (node.type === 'TSEnumDeclaration' || - node.type === 'FunctionDeclaration' || - node.type === 'ClassDeclaration') { - // export function foo() {} / export class Foo {} - // export declarations must be named. - bindings[node.id.name] = "setup-const" /* SETUP_CONST */; - } -} -function walkObjectPattern(node, bindings, isConst, isDefineCall = false) { - for (const p of node.properties) { - if (p.type === 'ObjectProperty') { - if (p.key.type === 'Identifier' && p.key === p.value) { - // shorthand: const { x } = ... - const type = isDefineCall - ? "setup-const" /* SETUP_CONST */ - : isConst - ? "setup-maybe-ref" /* SETUP_MAYBE_REF */ - : "setup-let" /* SETUP_LET */; - registerBinding(bindings, p.key, type); - } - else { - walkPattern(p.value, bindings, isConst, isDefineCall); - } - } - else { - // ...rest - // argument can only be identifier when destructuring - const type = isConst ? "setup-const" /* SETUP_CONST */ : "setup-let" /* SETUP_LET */; - registerBinding(bindings, p.argument, type); - } - } -} -function walkArrayPattern(node, bindings, isConst, isDefineCall = false) { - for (const e of node.elements) { - e && walkPattern(e, bindings, isConst, isDefineCall); - } -} -function walkPattern(node, bindings, isConst, isDefineCall = false) { - if (node.type === 'Identifier') { - const type = isDefineCall - ? "setup-const" /* SETUP_CONST */ - : isConst - ? "setup-maybe-ref" /* SETUP_MAYBE_REF */ - : "setup-let" /* SETUP_LET */; - registerBinding(bindings, node, type); - } - else if (node.type === 'RestElement') { - // argument can only be identifier when destructuring - const type = isConst ? "setup-const" /* SETUP_CONST */ : "setup-let" /* SETUP_LET */; - registerBinding(bindings, node.argument, type); - } - else if (node.type === 'ObjectPattern') { - walkObjectPattern(node, bindings, isConst); - } - else if (node.type === 'ArrayPattern') { - walkArrayPattern(node, bindings, isConst); - } - else if (node.type === 'AssignmentPattern') { - if (node.left.type === 'Identifier') { - const type = isDefineCall - ? "setup-const" /* SETUP_CONST */ - : isConst - ? "setup-maybe-ref" /* SETUP_MAYBE_REF */ - : "setup-let" /* SETUP_LET */; - registerBinding(bindings, node.left, type); - } - else { - walkPattern(node.left, bindings, isConst); - } - } -} -function recordType(node, declaredTypes) { - if (node.type === 'TSInterfaceDeclaration') { - declaredTypes[node.id.name] = [`Object`]; - } - else if (node.type === 'TSTypeAliasDeclaration') { - declaredTypes[node.id.name] = inferRuntimeType(node.typeAnnotation, declaredTypes); - } - else if (node.type === 'ExportNamedDeclaration' && node.declaration) { - recordType(node.declaration, declaredTypes); - } -} -function extractRuntimeProps(node, props, declaredTypes, isProd) { - const members = node.type === 'TSTypeLiteral' ? node.members : node.body; - for (const m of members) { - if ((m.type === 'TSPropertySignature' || m.type === 'TSMethodSignature') && - m.key.type === 'Identifier') { - let type; - if (m.type === 'TSMethodSignature') { - type = ['Function']; - } - else if (m.typeAnnotation) { - type = inferRuntimeType(m.typeAnnotation.typeAnnotation, declaredTypes); - } - props[m.key.name] = { - key: m.key.name, - required: !m.optional, - type: type || [`null`] - }; - } - } -} -function inferRuntimeType(node, declaredTypes) { - switch (node.type) { - case 'TSStringKeyword': - return ['String']; - case 'TSNumberKeyword': - return ['Number']; - case 'TSBooleanKeyword': - return ['Boolean']; - case 'TSObjectKeyword': - return ['Object']; - case 'TSTypeLiteral': - // TODO (nice to have) generate runtime property validation - return ['Object']; - case 'TSFunctionType': - return ['Function']; - case 'TSArrayType': - case 'TSTupleType': - // TODO (nice to have) generate runtime element type/length checks - return ['Array']; - case 'TSLiteralType': - switch (node.literal.type) { - case 'StringLiteral': - return ['String']; - case 'BooleanLiteral': - return ['Boolean']; - case 'NumericLiteral': - case 'BigIntLiteral': - return ['Number']; - default: - return [`null`]; - } - case 'TSTypeReference': - if (node.typeName.type === 'Identifier') { - if (declaredTypes[node.typeName.name]) { - return declaredTypes[node.typeName.name]; - } - switch (node.typeName.name) { - case 'Array': - case 'Function': - case 'Object': - case 'Set': - case 'Map': - case 'WeakSet': - case 'WeakMap': - case 'Date': - case 'Promise': - return [node.typeName.name]; - case 'Record': - case 'Partial': - case 'Readonly': - case 'Pick': - case 'Omit': - case 'Exclude': - case 'Extract': - case 'Required': - case 'InstanceType': - return ['Object']; - } - } - return [`null`]; - case 'TSParenthesizedType': - return inferRuntimeType(node.typeAnnotation, declaredTypes); - case 'TSUnionType': - return [ - ...new Set([].concat(...node.types.map(t => inferRuntimeType(t, declaredTypes)))) - ]; - case 'TSIntersectionType': - return ['Object']; - case 'TSSymbolKeyword': - return ['Symbol']; - default: - return [`null`]; // no runtime check - } -} -function toRuntimeTypeString(types) { - return types.length > 1 ? `[${types.join(', ')}]` : types[0]; -} -function extractRuntimeEmits(node, emits) { - if (node.type === 'TSTypeLiteral' || node.type === 'TSInterfaceBody') { - const members = node.type === 'TSTypeLiteral' ? node.members : node.body; - for (let t of members) { - if (t.type === 'TSCallSignatureDeclaration') { - extractEventNames(t.parameters[0], emits); - } - } - return; - } - else { - extractEventNames(node.parameters[0], emits); - } -} -function extractEventNames(eventName, emits) { - if (eventName.type === 'Identifier' && - eventName.typeAnnotation && - eventName.typeAnnotation.type === 'TSTypeAnnotation') { - const typeNode = eventName.typeAnnotation.typeAnnotation; - if (typeNode.type === 'TSLiteralType') { - if (typeNode.literal.type !== 'UnaryExpression') { - emits.add(String(typeNode.literal.value)); - } - } - else if (typeNode.type === 'TSUnionType') { - for (const t of typeNode.types) { - if (t.type === 'TSLiteralType' && - t.literal.type !== 'UnaryExpression') { - emits.add(String(t.literal.value)); - } - } - } - } -} -function genRuntimeEmits(emits) { - return emits.size - ? `\n emits: [${Array.from(emits) - .map(p => JSON.stringify(p)) - .join(', ')}],` - : ``; -} -function isCallOf(node, test) { - return !!(node && - node.type === 'CallExpression' && - node.callee.type === 'Identifier' && - (typeof test === 'string' - ? node.callee.name === test - : test(node.callee.name))); -} -function canNeverBeRef(node, userReactiveImport) { - if (isCallOf(node, userReactiveImport)) { - return true; - } - switch (node.type) { - case 'UnaryExpression': - case 'BinaryExpression': - case 'ArrayExpression': - case 'ObjectExpression': - case 'FunctionExpression': - case 'ArrowFunctionExpression': - case 'UpdateExpression': - case 'ClassExpression': - case 'TaggedTemplateExpression': - return true; - case 'SequenceExpression': - return canNeverBeRef(node.expressions[node.expressions.length - 1], userReactiveImport); - default: - if (node.type.endsWith('Literal')) { - return true; - } - return false; - } -} -/** - * Analyze bindings in normal `<script>` - * Note that `compileScriptSetup` already analyzes bindings as part of its - * compilation process so this should only be used on single `<script>` SFCs. - */ -function analyzeScriptBindings(ast) { - for (const node of ast) { - if (node.type === 'ExportDefaultDeclaration' && - node.declaration.type === 'ObjectExpression') { - return analyzeBindingsFromOptions(node.declaration); - } - } - return {}; -} -function analyzeBindingsFromOptions(node) { - const bindings = {}; - // #3270, #3275 - // mark non-script-setup so we don't resolve components/directives from these - Object.defineProperty(bindings, '__isScriptSetup', { - enumerable: false, - value: false - }); - for (const property of node.properties) { - if (property.type === 'ObjectProperty' && - !property.computed && - property.key.type === 'Identifier') { - // props - if (property.key.name === 'props') { - // props: ['foo'] - // props: { foo: ... } - for (const key of getObjectOrArrayExpressionKeys(property.value)) { - bindings[key] = "props" /* PROPS */; - } - } - // inject - else if (property.key.name === 'inject') { - // inject: ['foo'] - // inject: { foo: {} } - for (const key of getObjectOrArrayExpressionKeys(property.value)) { - bindings[key] = "options" /* OPTIONS */; - } - } - // computed & methods - else if (property.value.type === 'ObjectExpression' && - (property.key.name === 'computed' || property.key.name === 'methods')) { - // methods: { foo() {} } - // computed: { foo() {} } - for (const key of getObjectExpressionKeys(property.value)) { - bindings[key] = "options" /* OPTIONS */; - } - } - } - // setup & data - else if (property.type === 'ObjectMethod' && - property.key.type === 'Identifier' && - (property.key.name === 'setup' || property.key.name === 'data')) { - for (const bodyItem of property.body.body) { - // setup() { - // return { - // foo: null - // } - // } - if (bodyItem.type === 'ReturnStatement' && - bodyItem.argument && - bodyItem.argument.type === 'ObjectExpression') { - for (const key of getObjectExpressionKeys(bodyItem.argument)) { - bindings[key] = - property.key.name === 'setup' - ? "setup-maybe-ref" /* SETUP_MAYBE_REF */ - : "data" /* DATA */; - } - } - } - } - } - return bindings; -} -function getObjectExpressionKeys(node) { - const keys = []; - for (const prop of node.properties) { - if ((prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') && - !prop.computed) { - if (prop.key.type === 'Identifier') { - keys.push(prop.key.name); - } - else if (prop.key.type === 'StringLiteral') { - keys.push(prop.key.value); - } - } - } - return keys; -} -function getArrayExpressionKeys(node) { - const keys = []; - for (const element of node.elements) { - if (element && element.type === 'StringLiteral') { - keys.push(element.value); - } - } - return keys; -} -function getObjectOrArrayExpressionKeys(value) { - if (value.type === 'ArrayExpression') { - return getArrayExpressionKeys(value); - } - if (value.type === 'ObjectExpression') { - return getObjectExpressionKeys(value); - } - return []; -} -const templateUsageCheckCache = createCache(); -function resolveTemplateUsageCheckString(sfc) { - const { content, ast } = sfc.template; - const cached = templateUsageCheckCache.get(content); - if (cached) { - return cached; - } - let code = ''; - transform(createRoot([ast]), { - nodeTransforms: [ - node => { - if (node.type === 1 /* ELEMENT */) { - if (!parserOptions.isNativeTag(node.tag) && - !parserOptions.isBuiltInComponent(node.tag)) { - code += `,${camelize(node.tag)},${capitalize(camelize(node.tag))}`; - } - for (let i = 0; i < node.props.length; i++) { - const prop = node.props[i]; - if (prop.type === 7 /* DIRECTIVE */) { - if (!isBuiltInDir(prop.name)) { - code += `,v${capitalize(camelize(prop.name))}`; - } - if (prop.exp) { - code += `,${processExp(prop.exp.content, prop.name)}`; - } - } - } - } - else if (node.type === 5 /* INTERPOLATION */) { - code += `,${processExp(node.content.content)}`; - } - } - ] - }); - code += ';'; - templateUsageCheckCache.set(content, code); - return code; -} -const forAliasRE$1 = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -function processExp(exp, dir) { - if (/ as\s+\w|<.*>|:/.test(exp)) { - if (dir === 'slot') { - exp = `(${exp})=>{}`; - } - else if (dir === 'for') { - const inMatch = exp.match(forAliasRE$1); - if (inMatch) { - const [, LHS, RHS] = inMatch; - return processExp(`(${LHS})=>{}`) + processExp(RHS); - } - } - let ret = ''; - // has potential type cast or generic arguments that uses types - const ast = parseExpression_1(exp, { plugins: ['typescript'] }); - walkIdentifiers(ast, node => { - ret += `,` + node.name; - }); - return ret; - } - return stripStrings(exp); -} -function stripStrings(exp) { - return exp - .replace(/'[^']*'|"[^"]*"/g, '') - .replace(/`[^`]+`/g, stripTemplateString); -} -function stripTemplateString(str) { - const interpMatch = str.match(/\${[^}]+}/g); - if (interpMatch) { - return interpMatch.map(m => m.slice(2, -1)).join(','); - } - return ''; -} -function isImportUsed(local, sfc) { - return new RegExp( - // #4274 escape $ since it's a special char in regex - // (and is the only regex special char that is valid in identifiers) - `[^\\w$_]${local.replace(/\$/g, '\\$')}[^\\w$_]`).test(resolveTemplateUsageCheckString(sfc)); -} -/** - * Note: this comparison assumes the prev/next script are already identical, - * and only checks the special case where <script setup lang="ts"> unused import - * pruning result changes due to template changes. - */ -function hmrShouldReload(prevImports, next) { - if (!next.scriptSetup || - (next.scriptSetup.lang !== 'ts' && next.scriptSetup.lang !== 'tsx')) { - return false; - } - // for each previous import, check if its used status remain the same based on - // the next descriptor's template - for (const key in prevImports) { - // if an import was previous unused, but now is used, we need to force - // reload so that the script now includes that import. - if (!prevImports[key].isUsedInTemplate && isImportUsed(key, next)) { - return true; - } - } - return false; -} - -const DEFAULT_FILENAME = 'anonymous.vue'; -const sourceToSFC = createCache(); -function parse$4(source, { sourceMap = true, filename = DEFAULT_FILENAME, sourceRoot = '', pad = false, ignoreEmpty = true, compiler = CompilerDOM } = {}) { - const sourceKey = source + sourceMap + filename + sourceRoot + pad + compiler.parse; - const cache = sourceToSFC.get(sourceKey); - if (cache) { - return cache; - } - const descriptor = { - filename, - source, - template: null, - script: null, - scriptSetup: null, - styles: [], - customBlocks: [], - cssVars: [], - slotted: false, - shouldForceReload: prevImports => hmrShouldReload(prevImports, descriptor) - }; - const errors = []; - const ast = compiler.parse(source, { - // there are no components at SFC parsing level - isNativeTag: () => true, - // preserve all whitespaces - isPreTag: () => true, - getTextMode: ({ tag, props }, parent) => { - // all top level elements except <template> are parsed as raw text - // containers - if ((!parent && tag !== 'template') || - // <template lang="xxx"> should also be treated as raw text - (tag === 'template' && - props.some(p => p.type === 6 /* ATTRIBUTE */ && - p.name === 'lang' && - p.value && - p.value.content && - p.value.content !== 'html'))) { - return 2 /* RAWTEXT */; - } - else { - return 0 /* DATA */; - } - }, - onError: e => { - errors.push(e); - } - }); - ast.children.forEach(node => { - if (node.type !== 1 /* ELEMENT */) { - return; - } - // we only want to keep the nodes that are not empty (when the tag is not a template) - if (ignoreEmpty && - node.tag !== 'template' && - isEmpty(node) && - !hasSrc(node)) { - return; - } - switch (node.tag) { - case 'template': - if (!descriptor.template) { - const templateBlock = (descriptor.template = createBlock(node, source, false)); - templateBlock.ast = node; - // warn against 2.x <template functional> - if (templateBlock.attrs.functional) { - const err = new SyntaxError(`<template functional> is no longer supported in Vue 3, since ` + - `functional components no longer have significant performance ` + - `difference from stateful ones. Just use a normal <template> ` + - `instead.`); - err.loc = node.props.find(p => p.name === 'functional').loc; - errors.push(err); - } - } - else { - errors.push(createDuplicateBlockError(node)); - } - break; - case 'script': - const scriptBlock = createBlock(node, source, pad); - const isSetup = !!scriptBlock.attrs.setup; - if (isSetup && !descriptor.scriptSetup) { - descriptor.scriptSetup = scriptBlock; - break; - } - if (!isSetup && !descriptor.script) { - descriptor.script = scriptBlock; - break; - } - errors.push(createDuplicateBlockError(node, isSetup)); - break; - case 'style': - const styleBlock = createBlock(node, source, pad); - if (styleBlock.attrs.vars) { - errors.push(new SyntaxError(`<style vars> has been replaced by a new proposal: ` + - `https://github.com/vuejs/rfcs/pull/231`)); - } - descriptor.styles.push(styleBlock); - break; - default: - descriptor.customBlocks.push(createBlock(node, source, pad)); - break; - } - }); - if (descriptor.scriptSetup) { - if (descriptor.scriptSetup.src) { - errors.push(new SyntaxError(`<script setup> cannot use the "src" attribute because ` + - `its syntax will be ambiguous outside of the component.`)); - descriptor.scriptSetup = null; - } - if (descriptor.script && descriptor.script.src) { - errors.push(new SyntaxError(`<script> cannot use the "src" attribute when <script setup> is ` + - `also present because they must be processed together.`)); - descriptor.script = null; - } - } - if (sourceMap) { - const genMap = (block) => { - if (block && !block.src) { - block.map = generateSourceMap(filename, source, block.content, sourceRoot, !pad || block.type === 'template' ? block.loc.start.line - 1 : 0); - } - }; - genMap(descriptor.template); - genMap(descriptor.script); - descriptor.styles.forEach(genMap); - descriptor.customBlocks.forEach(genMap); - } - // parse CSS vars - descriptor.cssVars = parseCssVars(descriptor); - // check if the SFC uses :slotted - const slottedRE = /(?:::v-|:)slotted\(/; - descriptor.slotted = descriptor.styles.some(s => s.scoped && slottedRE.test(s.content)); - const result = { - descriptor, - errors - }; - sourceToSFC.set(sourceKey, result); - return result; -} -function createDuplicateBlockError(node, isScriptSetup = false) { - const err = new SyntaxError(`Single file component can contain only one <${node.tag}${isScriptSetup ? ` setup` : ``}> element`); - err.loc = node.loc; - return err; -} -function createBlock(node, source, pad) { - const type = node.tag; - let { start, end } = node.loc; - let content = ''; - if (node.children.length) { - start = node.children[0].loc.start; - end = node.children[node.children.length - 1].loc.end; - content = source.slice(start.offset, end.offset); - } - else { - const offset = node.loc.source.indexOf(`</`); - if (offset > -1) { - start = { - line: start.line, - column: start.column + offset, - offset: start.offset + offset - }; - } - end = Object.assign({}, start); - } - const loc = { - source: content, - start, - end - }; - const attrs = {}; - const block = { - type, - content, - loc, - attrs - }; - if (pad) { - block.content = padContent(source, block, pad) + block.content; - } - node.props.forEach(p => { - if (p.type === 6 /* ATTRIBUTE */) { - attrs[p.name] = p.value ? p.value.content || true : true; - if (p.name === 'lang') { - block.lang = p.value && p.value.content; - } - else if (p.name === 'src') { - block.src = p.value && p.value.content; - } - else if (type === 'style') { - if (p.name === 'scoped') { - block.scoped = true; - } - else if (p.name === 'module') { - block.module = attrs[p.name]; - } - } - else if (type === 'script' && p.name === 'setup') { - block.setup = attrs.setup; - } - } - }); - return block; -} -const splitRE = /\r?\n/g; -const emptyRE = /^(?:\/\/)?\s*$/; -const replaceRE = /./g; -function generateSourceMap(filename, source, generated, sourceRoot, lineOffset) { - const map = new SourceMapGenerator$2({ - file: filename.replace(/\\/g, '/'), - sourceRoot: sourceRoot.replace(/\\/g, '/') - }); - map.setSourceContent(filename, source); - generated.split(splitRE).forEach((line, index) => { - if (!emptyRE.test(line)) { - const originalLine = index + 1 + lineOffset; - const generatedLine = index + 1; - for (let i = 0; i < line.length; i++) { - if (!/\s/.test(line[i])) { - map.addMapping({ - source: filename, - original: { - line: originalLine, - column: i - }, - generated: { - line: generatedLine, - column: i - } - }); - } - } - } - }); - return JSON.parse(map.toString()); -} -function padContent(content, block, pad) { - content = content.slice(0, block.loc.start.offset); - if (pad === 'space') { - return content.replace(replaceRE, ' '); - } - else { - const offset = content.split(splitRE).length; - const padChar = block.type === 'script' && !block.lang ? '//\n' : '\n'; - return Array(offset).join(padChar); - } -} -function hasSrc(node) { - return node.props.some(p => { - if (p.type !== 6 /* ATTRIBUTE */) { - return false; - } - return p.name === 'src'; - }); -} -/** - * Returns true if the node has no children - * once the empty text nodes (trimmed content) have been filtered out. - */ -function isEmpty(node) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (child.type !== 2 /* TEXT */ || child.content.trim() !== '') { - return false; - } - } - return true; -} - -// MIT lisence -// from https://github.com/substack/tty-browserify/blob/1ba769a6429d242f36226538835b4034bf6b7886/index.js - -function isatty() { - return false; -} - -function ReadStream() { - throw new Error('tty.ReadStream is not implemented'); -} - -function WriteStream() { - throw new Error('tty.ReadStream is not implemented'); -} - -var _polyfillNode_tty = { - isatty: isatty, - ReadStream: ReadStream, - WriteStream: WriteStream -}; - -var _polyfillNode_tty$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - isatty: isatty, - ReadStream: ReadStream, - WriteStream: WriteStream, - 'default': _polyfillNode_tty -}); - -var tty = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_tty$1); - -let isColorSupported = - !("NO_COLOR" in ({}) || browser$1.argv.includes("--no-color")) && - ("FORCE_COLOR" in ({}) || - browser$1.argv.includes("--color") || - "" === "win32" || - (tty.isatty(1) && ({}).TERM !== "dumb") || - "CI" in ({})); - -let formatter = - (open, close, replace = open) => - input => { - let string = "" + input; - let index = string.indexOf(close, open.length); - return ~index - ? open + replaceClose(string, close, replace, index) + close - : open + string + close - }; - -let replaceClose = (string, close, replace, index) => { - let start = string.substring(0, index) + replace; - let end = string.substring(index + close.length); - let nextIndex = end.indexOf(close); - return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end -}; - -let createColors = (enabled = isColorSupported) => ({ - isColorSupported: enabled, - reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String, - bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String, - dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String, - italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String, - underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String, - inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String, - hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String, - strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String, - black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String, - red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String, - green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String, - yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String, - blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String, - magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String, - cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String, - white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String, - gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String, - bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String, - bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String, - bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String, - bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String, - bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String, - bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String, - bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String, - bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String, -}); - -var picocolors = createColors(); -var createColors_1 = createColors; -picocolors.createColors = createColors_1; - -const SINGLE_QUOTE = "'".charCodeAt(0); -const DOUBLE_QUOTE = '"'.charCodeAt(0); -const BACKSLASH = '\\'.charCodeAt(0); -const SLASH = '/'.charCodeAt(0); -const NEWLINE = '\n'.charCodeAt(0); -const SPACE = ' '.charCodeAt(0); -const FEED = '\f'.charCodeAt(0); -const TAB = '\t'.charCodeAt(0); -const CR = '\r'.charCodeAt(0); -const OPEN_SQUARE = '['.charCodeAt(0); -const CLOSE_SQUARE = ']'.charCodeAt(0); -const OPEN_PARENTHESES = '('.charCodeAt(0); -const CLOSE_PARENTHESES = ')'.charCodeAt(0); -const OPEN_CURLY = '{'.charCodeAt(0); -const CLOSE_CURLY = '}'.charCodeAt(0); -const SEMICOLON = ';'.charCodeAt(0); -const ASTERISK = '*'.charCodeAt(0); -const COLON = ':'.charCodeAt(0); -const AT = '@'.charCodeAt(0); - -const RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g; -const RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; -const RE_BAD_BRACKET = /.[\n"'(/\\]/; -const RE_HEX_ESCAPE = /[\da-f]/i; - -var tokenize = function tokenizer(input, options = {}) { - let css = input.css.valueOf(); - let ignore = options.ignoreErrors; - - let code, next, quote, content, escape; - let escaped, escapePos, prev, n, currentToken; - - let length = css.length; - let pos = 0; - let buffer = []; - let returned = []; - - function position() { - return pos - } - - function unclosed(what) { - throw input.error('Unclosed ' + what, pos) - } - - function endOfFile() { - return returned.length === 0 && pos >= length - } - - function nextToken(opts) { - if (returned.length) return returned.pop() - if (pos >= length) return - - let ignoreUnclosed = opts ? opts.ignoreUnclosed : false; - - code = css.charCodeAt(pos); - - switch (code) { - case NEWLINE: - case SPACE: - case TAB: - case CR: - case FEED: { - next = pos; - do { - next += 1; - code = css.charCodeAt(next); - } while ( - code === SPACE || - code === NEWLINE || - code === TAB || - code === CR || - code === FEED - ) - - currentToken = ['space', css.slice(pos, next)]; - pos = next - 1; - break - } - - case OPEN_SQUARE: - case CLOSE_SQUARE: - case OPEN_CURLY: - case CLOSE_CURLY: - case COLON: - case SEMICOLON: - case CLOSE_PARENTHESES: { - let controlChar = String.fromCharCode(code); - currentToken = [controlChar, controlChar, pos]; - break - } - - case OPEN_PARENTHESES: { - prev = buffer.length ? buffer.pop()[1] : ''; - n = css.charCodeAt(pos + 1); - if ( - prev === 'url' && - n !== SINGLE_QUOTE && - n !== DOUBLE_QUOTE && - n !== SPACE && - n !== NEWLINE && - n !== TAB && - n !== FEED && - n !== CR - ) { - next = pos; - do { - escaped = false; - next = css.indexOf(')', next + 1); - if (next === -1) { - if (ignore || ignoreUnclosed) { - next = pos; - break - } else { - unclosed('bracket'); - } - } - escapePos = next; - while (css.charCodeAt(escapePos - 1) === BACKSLASH) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped) - - currentToken = ['brackets', css.slice(pos, next + 1), pos, next]; - - pos = next; - } else { - next = css.indexOf(')', pos + 1); - content = css.slice(pos, next + 1); - - if (next === -1 || RE_BAD_BRACKET.test(content)) { - currentToken = ['(', '(', pos]; - } else { - currentToken = ['brackets', content, pos, next]; - pos = next; - } - } - - break - } - - case SINGLE_QUOTE: - case DOUBLE_QUOTE: { - quote = code === SINGLE_QUOTE ? "'" : '"'; - next = pos; - do { - escaped = false; - next = css.indexOf(quote, next + 1); - if (next === -1) { - if (ignore || ignoreUnclosed) { - next = pos + 1; - break - } else { - unclosed('string'); - } - } - escapePos = next; - while (css.charCodeAt(escapePos - 1) === BACKSLASH) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped) - - currentToken = ['string', css.slice(pos, next + 1), pos, next]; - pos = next; - break - } - - case AT: { - RE_AT_END.lastIndex = pos + 1; - RE_AT_END.test(css); - if (RE_AT_END.lastIndex === 0) { - next = css.length - 1; - } else { - next = RE_AT_END.lastIndex - 2; - } - - currentToken = ['at-word', css.slice(pos, next + 1), pos, next]; - - pos = next; - break - } - - case BACKSLASH: { - next = pos; - escape = true; - while (css.charCodeAt(next + 1) === BACKSLASH) { - next += 1; - escape = !escape; - } - code = css.charCodeAt(next + 1); - if ( - escape && - code !== SLASH && - code !== SPACE && - code !== NEWLINE && - code !== TAB && - code !== CR && - code !== FEED - ) { - next += 1; - if (RE_HEX_ESCAPE.test(css.charAt(next))) { - while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) { - next += 1; - } - if (css.charCodeAt(next + 1) === SPACE) { - next += 1; - } - } - } - - currentToken = ['word', css.slice(pos, next + 1), pos, next]; - - pos = next; - break - } - - default: { - if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) { - next = css.indexOf('*/', pos + 2) + 1; - if (next === 0) { - if (ignore || ignoreUnclosed) { - next = css.length; - } else { - unclosed('comment'); - } - } - - currentToken = ['comment', css.slice(pos, next + 1), pos, next]; - pos = next; - } else { - RE_WORD_END.lastIndex = pos + 1; - RE_WORD_END.test(css); - if (RE_WORD_END.lastIndex === 0) { - next = css.length - 1; - } else { - next = RE_WORD_END.lastIndex - 2; - } - - currentToken = ['word', css.slice(pos, next + 1), pos, next]; - buffer.push(currentToken); - pos = next; - } - - break - } - } - - pos++; - return currentToken - } - - function back(token) { - returned.push(token); - } - - return { - back, - nextToken, - endOfFile, - position - } -}; - -let Input; - -function registerInput(dependant) { - Input = dependant; -} - -const HIGHLIGHT_THEME = { - 'brackets': picocolors.cyan, - 'at-word': picocolors.cyan, - 'comment': picocolors.gray, - 'string': picocolors.green, - 'class': picocolors.yellow, - 'hash': picocolors.magenta, - 'call': picocolors.cyan, - '(': picocolors.cyan, - ')': picocolors.cyan, - '{': picocolors.yellow, - '}': picocolors.yellow, - '[': picocolors.yellow, - ']': picocolors.yellow, - ':': picocolors.yellow, - ';': picocolors.yellow -}; - -function getTokenType([type, value], processor) { - if (type === 'word') { - if (value[0] === '.') { - return 'class' - } - if (value[0] === '#') { - return 'hash' - } - } - - if (!processor.endOfFile()) { - let next = processor.nextToken(); - processor.back(next); - if (next[0] === 'brackets' || next[0] === '(') return 'call' - } - - return type -} - -function terminalHighlight(css) { - let processor = tokenize(new Input(css), { ignoreErrors: true }); - let result = ''; - while (!processor.endOfFile()) { - let token = processor.nextToken(); - let color = HIGHLIGHT_THEME[getTokenType(token, processor)]; - if (color) { - result += token[1] - .split(/\r?\n/) - .map(i => color(i)) - .join('\n'); - } else { - result += token[1]; - } - } - return result -} - -terminalHighlight.registerInput = registerInput; - -var terminalHighlight_1 = terminalHighlight; - -class CssSyntaxError extends Error { - constructor(message, line, column, source, file, plugin) { - super(message); - this.name = 'CssSyntaxError'; - this.reason = message; - - if (file) { - this.file = file; - } - if (source) { - this.source = source; - } - if (plugin) { - this.plugin = plugin; - } - if (typeof line !== 'undefined' && typeof column !== 'undefined') { - if (typeof line === 'number') { - this.line = line; - this.column = column; - } else { - this.line = line.line; - this.column = line.column; - this.endLine = column.line; - this.endColumn = column.column; - } - } - - this.setMessage(); - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, CssSyntaxError); - } - } - - setMessage() { - this.message = this.plugin ? this.plugin + ': ' : ''; - this.message += this.file ? this.file : '<css input>'; - if (typeof this.line !== 'undefined') { - this.message += ':' + this.line + ':' + this.column; - } - this.message += ': ' + this.reason; - } - - showSourceCode(color) { - if (!this.source) return '' - - let css = this.source; - if (color == null) color = picocolors.isColorSupported; - if (terminalHighlight_1) { - if (color) css = terminalHighlight_1(css); - } - - let lines = css.split(/\r?\n/); - let start = Math.max(this.line - 3, 0); - let end = Math.min(this.line + 2, lines.length); - - let maxWidth = String(end).length; - - let mark, aside; - if (color) { - let { bold, red, gray } = picocolors.createColors(true); - mark = text => bold(red(text)); - aside = text => gray(text); - } else { - mark = aside = str => str; - } - - return lines - .slice(start, end) - .map((line, index) => { - let number = start + 1 + index; - let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '; - if (number === this.line) { - let spacing = - aside(gutter.replace(/\d/g, ' ')) + - line.slice(0, this.column - 1).replace(/[^\t]/g, ' '); - return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^') - } - return ' ' + aside(gutter) + line - }) - .join('\n') - } - - toString() { - let code = this.showSourceCode(); - if (code) { - code = '\n\n' + code + '\n'; - } - return this.name + ': ' + this.message + code - } -} - -var cssSyntaxError = CssSyntaxError; -CssSyntaxError.default = CssSyntaxError; - -var isClean = Symbol('isClean'); - -var my = Symbol('my'); - -var symbols = { - isClean: isClean, - my: my -}; - -const DEFAULT_RAW = { - colon: ': ', - indent: ' ', - beforeDecl: '\n', - beforeRule: '\n', - beforeOpen: ' ', - beforeClose: '\n', - beforeComment: '\n', - after: '\n', - emptyBody: '', - commentLeft: ' ', - commentRight: ' ', - semicolon: false -}; - -function capitalize$1(str) { - return str[0].toUpperCase() + str.slice(1) -} - -class Stringifier { - constructor(builder) { - this.builder = builder; - } - - stringify(node, semicolon) { - /* c8 ignore start */ - if (!this[node.type]) { - throw new Error( - 'Unknown AST node type ' + - node.type + - '. ' + - 'Maybe you need to change PostCSS stringifier.' - ) - } - /* c8 ignore stop */ - this[node.type](node, semicolon); - } - - document(node) { - this.body(node); - } - - root(node) { - this.body(node); - if (node.raws.after) this.builder(node.raws.after); - } - - comment(node) { - let left = this.raw(node, 'left', 'commentLeft'); - let right = this.raw(node, 'right', 'commentRight'); - this.builder('/*' + left + node.text + right + '*/', node); - } - - decl(node, semicolon) { - let between = this.raw(node, 'between', 'colon'); - let string = node.prop + between + this.rawValue(node, 'value'); - - if (node.important) { - string += node.raws.important || ' !important'; - } - - if (semicolon) string += ';'; - this.builder(string, node); - } - - rule(node) { - this.block(node, this.rawValue(node, 'selector')); - if (node.raws.ownSemicolon) { - this.builder(node.raws.ownSemicolon, node, 'end'); - } - } - - atrule(node, semicolon) { - let name = '@' + node.name; - let params = node.params ? this.rawValue(node, 'params') : ''; - - if (typeof node.raws.afterName !== 'undefined') { - name += node.raws.afterName; - } else if (params) { - name += ' '; - } - - if (node.nodes) { - this.block(node, name + params); - } else { - let end = (node.raws.between || '') + (semicolon ? ';' : ''); - this.builder(name + params + end, node); - } - } - - body(node) { - let last = node.nodes.length - 1; - while (last > 0) { - if (node.nodes[last].type !== 'comment') break - last -= 1; - } - - let semicolon = this.raw(node, 'semicolon'); - for (let i = 0; i < node.nodes.length; i++) { - let child = node.nodes[i]; - let before = this.raw(child, 'before'); - if (before) this.builder(before); - this.stringify(child, last !== i || semicolon); - } - } - - block(node, start) { - let between = this.raw(node, 'between', 'beforeOpen'); - this.builder(start + between + '{', node, 'start'); - - let after; - if (node.nodes && node.nodes.length) { - this.body(node); - after = this.raw(node, 'after'); - } else { - after = this.raw(node, 'after', 'emptyBody'); - } - - if (after) this.builder(after); - this.builder('}', node, 'end'); - } - - raw(node, own, detect) { - let value; - if (!detect) detect = own; - - // Already had - if (own) { - value = node.raws[own]; - if (typeof value !== 'undefined') return value - } - - let parent = node.parent; - - if (detect === 'before') { - // Hack for first rule in CSS - if (!parent || (parent.type === 'root' && parent.first === node)) { - return '' - } - - // `root` nodes in `document` should use only their own raws - if (parent && parent.type === 'document') { - return '' - } - } - - // Floating child without parent - if (!parent) return DEFAULT_RAW[detect] - - // Detect style by other nodes - let root = node.root(); - if (!root.rawCache) root.rawCache = {}; - if (typeof root.rawCache[detect] !== 'undefined') { - return root.rawCache[detect] - } - - if (detect === 'before' || detect === 'after') { - return this.beforeAfter(node, detect) - } else { - let method = 'raw' + capitalize$1(detect); - if (this[method]) { - value = this[method](root, node); - } else { - root.walk(i => { - value = i.raws[own]; - if (typeof value !== 'undefined') return false - }); - } - } - - if (typeof value === 'undefined') value = DEFAULT_RAW[detect]; - - root.rawCache[detect] = value; - return value - } - - rawSemicolon(root) { - let value; - root.walk(i => { - if (i.nodes && i.nodes.length && i.last.type === 'decl') { - value = i.raws.semicolon; - if (typeof value !== 'undefined') return false - } - }); - return value - } - - rawEmptyBody(root) { - let value; - root.walk(i => { - if (i.nodes && i.nodes.length === 0) { - value = i.raws.after; - if (typeof value !== 'undefined') return false - } - }); - return value - } - - rawIndent(root) { - if (root.raws.indent) return root.raws.indent - let value; - root.walk(i => { - let p = i.parent; - if (p && p !== root && p.parent && p.parent === root) { - if (typeof i.raws.before !== 'undefined') { - let parts = i.raws.before.split('\n'); - value = parts[parts.length - 1]; - value = value.replace(/\S/g, ''); - return false - } - } - }); - return value - } - - rawBeforeComment(root, node) { - let value; - root.walkComments(i => { - if (typeof i.raws.before !== 'undefined') { - value = i.raws.before; - if (value.includes('\n')) { - value = value.replace(/[^\n]+$/, ''); - } - return false - } - }); - if (typeof value === 'undefined') { - value = this.raw(node, null, 'beforeDecl'); - } else if (value) { - value = value.replace(/\S/g, ''); - } - return value - } - - rawBeforeDecl(root, node) { - let value; - root.walkDecls(i => { - if (typeof i.raws.before !== 'undefined') { - value = i.raws.before; - if (value.includes('\n')) { - value = value.replace(/[^\n]+$/, ''); - } - return false - } - }); - if (typeof value === 'undefined') { - value = this.raw(node, null, 'beforeRule'); - } else if (value) { - value = value.replace(/\S/g, ''); - } - return value - } - - rawBeforeRule(root) { - let value; - root.walk(i => { - if (i.nodes && (i.parent !== root || root.first !== i)) { - if (typeof i.raws.before !== 'undefined') { - value = i.raws.before; - if (value.includes('\n')) { - value = value.replace(/[^\n]+$/, ''); - } - return false - } - } - }); - if (value) value = value.replace(/\S/g, ''); - return value - } - - rawBeforeClose(root) { - let value; - root.walk(i => { - if (i.nodes && i.nodes.length > 0) { - if (typeof i.raws.after !== 'undefined') { - value = i.raws.after; - if (value.includes('\n')) { - value = value.replace(/[^\n]+$/, ''); - } - return false - } - } - }); - if (value) value = value.replace(/\S/g, ''); - return value - } - - rawBeforeOpen(root) { - let value; - root.walk(i => { - if (i.type !== 'decl') { - value = i.raws.between; - if (typeof value !== 'undefined') return false - } - }); - return value - } - - rawColon(root) { - let value; - root.walkDecls(i => { - if (typeof i.raws.between !== 'undefined') { - value = i.raws.between.replace(/[^\s:]/g, ''); - return false - } - }); - return value - } - - beforeAfter(node, detect) { - let value; - if (node.type === 'decl') { - value = this.raw(node, null, 'beforeDecl'); - } else if (node.type === 'comment') { - value = this.raw(node, null, 'beforeComment'); - } else if (detect === 'before') { - value = this.raw(node, null, 'beforeRule'); - } else { - value = this.raw(node, null, 'beforeClose'); - } - - let buf = node.parent; - let depth = 0; - while (buf && buf.type !== 'root') { - depth += 1; - buf = buf.parent; - } - - if (value.includes('\n')) { - let indent = this.raw(node, null, 'indent'); - if (indent.length) { - for (let step = 0; step < depth; step++) value += indent; - } - } - - return value - } - - rawValue(node, prop) { - let value = node[prop]; - let raw = node.raws[prop]; - if (raw && raw.value === value) { - return raw.raw - } - - return value - } -} - -var stringifier = Stringifier; -Stringifier.default = Stringifier; - -function stringify$1(node, builder) { - let str = new stringifier(builder); - str.stringify(node); -} - -var stringify_1 = stringify$1; -stringify$1.default = stringify$1; - -let { isClean: isClean$1, my: my$1 } = symbols; - - - - -function cloneNode(obj, parent) { - let cloned = new obj.constructor(); - - for (let i in obj) { - if (!Object.prototype.hasOwnProperty.call(obj, i)) { - /* c8 ignore next 2 */ - continue - } - if (i === 'proxyCache') continue - let value = obj[i]; - let type = typeof value; - - if (i === 'parent' && type === 'object') { - if (parent) cloned[i] = parent; - } else if (i === 'source') { - cloned[i] = value; - } else if (Array.isArray(value)) { - cloned[i] = value.map(j => cloneNode(j, cloned)); - } else { - if (type === 'object' && value !== null) value = cloneNode(value); - cloned[i] = value; - } - } - - return cloned -} - -class Node$1 { - constructor(defaults = {}) { - this.raws = {}; - this[isClean$1] = false; - this[my$1] = true; - - for (let name in defaults) { - if (name === 'nodes') { - this.nodes = []; - for (let node of defaults[name]) { - if (typeof node.clone === 'function') { - this.append(node.clone()); - } else { - this.append(node); - } - } - } else { - this[name] = defaults[name]; - } - } - } - - error(message, opts = {}) { - if (this.source) { - let { start, end } = this.rangeBy(opts); - return this.source.input.error( - message, - { line: start.line, column: start.column }, - { line: end.line, column: end.column }, - opts - ) - } - return new cssSyntaxError(message) - } - - warn(result, text, opts) { - let data = { node: this }; - for (let i in opts) data[i] = opts[i]; - return result.warn(text, data) - } - - remove() { - if (this.parent) { - this.parent.removeChild(this); - } - this.parent = undefined; - return this - } - - toString(stringifier = stringify_1) { - if (stringifier.stringify) stringifier = stringifier.stringify; - let result = ''; - stringifier(this, i => { - result += i; - }); - return result - } - - assign(overrides = {}) { - for (let name in overrides) { - this[name] = overrides[name]; - } - return this - } - - clone(overrides = {}) { - let cloned = cloneNode(this); - for (let name in overrides) { - cloned[name] = overrides[name]; - } - return cloned - } - - cloneBefore(overrides = {}) { - let cloned = this.clone(overrides); - this.parent.insertBefore(this, cloned); - return cloned - } - - cloneAfter(overrides = {}) { - let cloned = this.clone(overrides); - this.parent.insertAfter(this, cloned); - return cloned - } - - replaceWith(...nodes) { - if (this.parent) { - let bookmark = this; - let foundSelf = false; - for (let node of nodes) { - if (node === this) { - foundSelf = true; - } else if (foundSelf) { - this.parent.insertAfter(bookmark, node); - bookmark = node; - } else { - this.parent.insertBefore(bookmark, node); - } - } - - if (!foundSelf) { - this.remove(); - } - } - - return this - } - - next() { - if (!this.parent) return undefined - let index = this.parent.index(this); - return this.parent.nodes[index + 1] - } - - prev() { - if (!this.parent) return undefined - let index = this.parent.index(this); - return this.parent.nodes[index - 1] - } - - before(add) { - this.parent.insertBefore(this, add); - return this - } - - after(add) { - this.parent.insertAfter(this, add); - return this - } - - root() { - let result = this; - while (result.parent && result.parent.type !== 'document') { - result = result.parent; - } - return result - } - - raw(prop, defaultType) { - let str = new stringifier(); - return str.raw(this, prop, defaultType) - } - - cleanRaws(keepBetween) { - delete this.raws.before; - delete this.raws.after; - if (!keepBetween) delete this.raws.between; - } - - toJSON(_, inputs) { - let fixed = {}; - let emitInputs = inputs == null; - inputs = inputs || new Map(); - let inputsNextIndex = 0; - - for (let name in this) { - if (!Object.prototype.hasOwnProperty.call(this, name)) { - /* c8 ignore next 2 */ - continue - } - if (name === 'parent' || name === 'proxyCache') continue - let value = this[name]; - - if (Array.isArray(value)) { - fixed[name] = value.map(i => { - if (typeof i === 'object' && i.toJSON) { - return i.toJSON(null, inputs) - } else { - return i - } - }); - } else if (typeof value === 'object' && value.toJSON) { - fixed[name] = value.toJSON(null, inputs); - } else if (name === 'source') { - let inputId = inputs.get(value.input); - if (inputId == null) { - inputId = inputsNextIndex; - inputs.set(value.input, inputsNextIndex); - inputsNextIndex++; - } - fixed[name] = { - inputId, - start: value.start, - end: value.end - }; - } else { - fixed[name] = value; - } - } - - if (emitInputs) { - fixed.inputs = [...inputs.keys()].map(input => input.toJSON()); - } - - return fixed - } - - positionInside(index) { - let string = this.toString(); - let column = this.source.start.column; - let line = this.source.start.line; - - for (let i = 0; i < index; i++) { - if (string[i] === '\n') { - column = 1; - line += 1; - } else { - column += 1; - } - } - - return { line, column } - } - - positionBy(opts) { - let pos = this.source.start; - if (opts.index) { - pos = this.positionInside(opts.index); - } else if (opts.word) { - let index = this.toString().indexOf(opts.word); - if (index !== -1) pos = this.positionInside(index); - } - return pos - } - - rangeBy(opts) { - let start = { - line: this.source.start.line, - column: this.source.start.column - }; - let end = this.source.end - ? { - line: this.source.end.line, - column: this.source.end.column + 1 - } - : { - line: start.line, - column: start.column + 1 - }; - - if (opts.word) { - let index = this.toString().indexOf(opts.word); - if (index !== -1) { - start = this.positionInside(index); - end = this.positionInside(index + opts.word.length); - } - } else { - if (opts.start) { - start = { - line: opts.start.line, - column: opts.start.column - }; - } else if (opts.index) { - start = this.positionInside(opts.index); - } - - if (opts.end) { - end = { - line: opts.end.line, - column: opts.end.column - }; - } else if (opts.endIndex) { - end = this.positionInside(opts.endIndex); - } else if (opts.index) { - end = this.positionInside(opts.index + 1); - } - } - - if ( - end.line < start.line || - (end.line === start.line && end.column <= start.column) - ) { - end = { line: start.line, column: start.column + 1 }; - } - - return { start, end } - } - - getProxyProcessor() { - return { - set(node, prop, value) { - if (node[prop] === value) return true - node[prop] = value; - if ( - prop === 'prop' || - prop === 'value' || - prop === 'name' || - prop === 'params' || - prop === 'important' || - /* c8 ignore next */ - prop === 'text' - ) { - node.markDirty(); - } - return true - }, - - get(node, prop) { - if (prop === 'proxyOf') { - return node - } else if (prop === 'root') { - return () => node.root().toProxy() - } else { - return node[prop] - } - } - } - } - - toProxy() { - if (!this.proxyCache) { - this.proxyCache = new Proxy(this, this.getProxyProcessor()); - } - return this.proxyCache - } - - addToError(error) { - error.postcssNode = this; - if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { - let s = this.source; - error.stack = error.stack.replace( - /\n\s{4}at /, - `$&${s.input.from}:${s.start.line}:${s.start.column}$&` - ); - } - return error - } - - markDirty() { - if (this[isClean$1]) { - this[isClean$1] = false; - let next = this; - while ((next = next.parent)) { - next[isClean$1] = false; - } - } - } - - get proxyOf() { - return this - } -} - -var node_1 = Node$1; -Node$1.default = Node$1; - -class Declaration extends node_1 { - constructor(defaults) { - if ( - defaults && - typeof defaults.value !== 'undefined' && - typeof defaults.value !== 'string' - ) { - defaults = { ...defaults, value: String(defaults.value) }; - } - super(defaults); - this.type = 'decl'; - } - - get variable() { - return this.prop.startsWith('--') || this.prop[0] === '$' - } -} - -var declaration = Declaration; -Declaration.default = Declaration; - -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -var encode$4 = function (number) { - if (0 <= number && number < intToCharMap$1.length) { - return intToCharMap$1[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -var decode$2 = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; - -var base64$1 = { - encode: encode$4, - decode: decode$2 -}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT$1 = 5; - -// binary: 100000 -var VLQ_BASE$1 = 1 << VLQ_BASE_SHIFT$1; - -// binary: 011111 -var VLQ_BASE_MASK$1 = VLQ_BASE$1 - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT$1 = VLQ_BASE$1; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned$1(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned$1(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -var encode$5 = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned$1(aValue); - - do { - digit = vlq & VLQ_BASE_MASK$1; - vlq >>>= VLQ_BASE_SHIFT$1; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT$1; - } - encoded += base64$1.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -var decode$3 = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64$1.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT$1); - digit &= VLQ_BASE_MASK$1; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT$1; - } while (continuation); - - aOutParam.value = fromVLQSigned$1(result); - aOutParam.rest = aIndex; -}; - -var base64Vlq$1 = { - encode: encode$5, - decode: decode$3 -}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var util$1 = createCommonjsModule(function (module, exports) { -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port; - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -var MAX_CACHED_INPUTS = 32; - -/** - * Takes some function `f(input) -> result` and returns a memoized version of - * `f`. - * - * We keep at most `MAX_CACHED_INPUTS` memoized results of `f` alive. The - * memoization is a dumb-simple, linear least-recently-used cache. - */ -function lruMemoize(f) { - var cache = []; - - return function(input) { - for (var i = 0; i < cache.length; i++) { - if (cache[i].input === input) { - var temp = cache[0]; - cache[0] = cache[i]; - cache[i] = temp; - return cache[0].result; - } - } - - var result = f(input); - - cache.unshift({ - input, - result, - }); - - if (cache.length > MAX_CACHED_INPUTS) { - cache.pop(); - } - - return result; - }; -} - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -var normalize = lruMemoize(function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - // Split the path into parts between `/` characters. This is much faster than - // using `.split(/\/+/g)`. - var parts = []; - var start = 0; - var i = 0; - while (true) { - start = i; - i = path.indexOf("/", start); - if (i === -1) { - parts.push(path.slice(start)); - break; - } else { - parts.push(path.slice(start, i)); - while (i < path.length && path[i] === "/") { - i++; - } - } - } - - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -}); -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - -/** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ -function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); -} -exports.parseSourceMapInput = parseSourceMapInput; - -/** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ -function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); -} -exports.computeSourceURL = computeSourceURL; -}); - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - -var has$1 = Object.prototype.hasOwnProperty; -var hasNativeMap$1 = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet$3() { - this._array = []; - this._set = hasNativeMap$1 ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet$3.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet$3(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet$3.prototype.size = function ArraySet_size() { - return hasNativeMap$1 ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet$3.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap$1 ? aStr : util$1.toSetString(aStr); - var isDuplicate = hasNativeMap$1 ? this.has(aStr) : has$1.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap$1) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet$3.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap$1) { - return this._set.has(aStr); - } else { - var sStr = util$1.toSetString(aStr); - return has$1.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet$3.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap$1) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util$1.toSetString(aStr); - if (has$1.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet$3.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet$3.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -var ArraySet_1$1 = ArraySet$3; - -var arraySet$1 = { - ArraySet: ArraySet_1$1 -}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter$1(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util$1.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList$2() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList$2.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList$2.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter$1(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList$2.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util$1.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -var MappingList_1$1 = MappingList$2; - -var mappingList$1 = { - MappingList: MappingList_1$1 -}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - - -var ArraySet$4 = arraySet$1.ArraySet; -var MappingList$3 = mappingList$1.MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator$3(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util$1.getArg(aArgs, 'file', null); - this._sourceRoot = util$1.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util$1.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet$4(); - this._names = new ArraySet$4(); - this._mappings = new MappingList$3(); - this._sourcesContents = null; -} - -SourceMapGenerator$3.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator$3.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator$3({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util$1.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util$1.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator$3.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util$1.getArg(aArgs, 'generated'); - var original = util$1.getArg(aArgs, 'original', null); - var source = util$1.getArg(aArgs, 'source', null); - var name = util$1.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator$3.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util$1.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util$1.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util$1.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator$3.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util$1.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet$4(); - var newNames = new ArraySet$4(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util$1.join(aSourceMapPath, mapping.source); - } - if (sourceRoot != null) { - mapping.source = util$1.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util$1.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util$1.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator$3.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator$3.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = ''; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util$1.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64Vlq$1.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64Vlq$1.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64Vlq$1.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64Vlq$1.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64Vlq$1.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator$3.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util$1.relative(aSourceRoot, source); - } - var key = util$1.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator$3.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator$3.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -var SourceMapGenerator_1$1 = SourceMapGenerator$3; - -var sourceMapGenerator$1 = { - SourceMapGenerator: SourceMapGenerator_1$1 -}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -var binarySearch$1 = createCommonjsModule(function (module, exports) { -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; -}); - -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -function SortTemplate(comparator) { - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot, false) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - - return doQuickSort; -} - -function cloneSort(comparator) { - let template = SortTemplate.toString(); - let templateFn = new Function(`return ${template}`)(); - return templateFn(comparator); -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - -let sortCache = new WeakMap(); -var quickSort_1$1 = function (ary, comparator, start = 0) { - let doQuickSort = sortCache.get(comparator); - if (doQuickSort === void 0) { - doQuickSort = cloneSort(comparator); - sortCache.set(comparator, doQuickSort); - } - doQuickSort(ary, comparator, start, ary.length - 1); -}; - -var quickSort$2 = { - quickSort: quickSort_1$1 -}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - - -var ArraySet$5 = arraySet$1.ArraySet; - -var quickSort$3 = quickSort$2.quickSort; - -function SourceMapConsumer$2(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util$1.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer$1(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer$1(sourceMap, aSourceMapURL); -} - -SourceMapConsumer$2.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer$1.fromSourceMap(aSourceMap, aSourceMapURL); -}; - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer$2.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer$2.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer$2.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer$2.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer$2.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer$2.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer$2.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer$2.GENERATED_ORDER = 1; -SourceMapConsumer$2.ORIGINAL_ORDER = 2; - -SourceMapConsumer$2.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer$2.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer$2.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer$2.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer$2.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer$2.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - var boundCallback = aCallback.bind(context); - var names = this._names; - var sources = this._sources; - var sourceMapURL = this._sourceMapURL; - - for (var i = 0, n = mappings.length; i < n; i++) { - var mapping = mappings[i]; - var source = mapping.source === null ? null : sources.at(mapping.source); - source = util$1.computeSourceURL(sourceRoot, source, sourceMapURL); - boundCallback({ - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : names.at(mapping.name) - }); - } - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -SourceMapConsumer$2.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util$1.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util$1.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util$1.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util$1.compareByOriginalPositions, - binarySearch$1.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util$1.getArg(mapping, 'generatedLine', null), - column: util$1.getArg(mapping, 'generatedColumn', null), - lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util$1.getArg(mapping, 'generatedLine', null), - column: util$1.getArg(mapping, 'generatedColumn', null), - lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -var SourceMapConsumer_1$1 = SourceMapConsumer$2; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer$1(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util$1.parseSourceMapInput(aSourceMap); - } - - var version = util$1.getArg(sourceMap, 'version'); - var sources = util$1.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util$1.getArg(sourceMap, 'names', []); - var sourceRoot = util$1.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util$1.getArg(sourceMap, 'sourcesContent', null); - var mappings = util$1.getArg(sourceMap, 'mappings'); - var file = util$1.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util$1.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util$1.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util$1.isAbsolute(sourceRoot) && util$1.isAbsolute(source) - ? util$1.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet$5.fromArray(names.map(String), true); - this._sources = ArraySet$5.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util$1.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; -} - -BasicSourceMapConsumer$1.prototype = Object.create(SourceMapConsumer$2.prototype); -BasicSourceMapConsumer$1.prototype.consumer = SourceMapConsumer$2; - -/** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ -BasicSourceMapConsumer$1.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util$1.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; -}; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer$1.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer$1.prototype); - - var names = smc._names = ArraySet$5.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet$5.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util$1.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping$1; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort$3(smc.__originalMappings, util$1.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer$1.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer$1.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping$1() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - -const compareGenerated = util$1.compareByGeneratedPositionsDeflatedNoLine; -function sortGenerated(array, start) { - let l = array.length; - let n = array.length - start; - if (n <= 1) { - return; - } else if (n == 2) { - let a = array[start]; - let b = array[start + 1]; - if (compareGenerated(a, b) > 0) { - array[start] = b; - array[start + 1] = a; - } - } else if (n < 20) { - for (let i = start; i < l; i++) { - for (let j = i; j > start; j--) { - let a = array[j - 1]; - let b = array[j]; - if (compareGenerated(a, b) <= 0) { - break; - } - array[j - 1] = b; - array[j] = a; - } - } - } else { - quickSort$3(array, compareGenerated, start); - } -} -BasicSourceMapConsumer$1.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, segment, end, value; - - let subarrayStart = 0; - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - - sortGenerated(generatedMappings, subarrayStart); - subarrayStart = generatedMappings.length; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping$1(); - mapping.generatedLine = generatedLine; - - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - aStr.slice(index, end); - - segment = []; - while (index < end) { - base64Vlq$1.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - let currentSource = mapping.source; - while (originalMappings.length <= currentSource) { - originalMappings.push(null); - } - if (originalMappings[currentSource] === null) { - originalMappings[currentSource] = []; - } - originalMappings[currentSource].push(mapping); - } - } - } - - sortGenerated(generatedMappings, subarrayStart); - this.__generatedMappings = generatedMappings; - - for (var i = 0; i < originalMappings.length; i++) { - if (originalMappings[i] != null) { - quickSort$3(originalMappings[i], util$1.compareByOriginalPositionsNoSource); - } - } - this.__originalMappings = [].concat(...originalMappings); - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer$1.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch$1.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer$1.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer$1.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util$1.getArg(aArgs, 'line'), - generatedColumn: util$1.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util$1.compareByGeneratedPositionsDeflated, - util$1.getArg(aArgs, 'bias', SourceMapConsumer$2.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util$1.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util$1.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util$1.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util$1.getArg(mapping, 'originalLine', null), - column: util$1.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer$1.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer$1.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util$1.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util$1.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -BasicSourceMapConsumer$1.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util$1.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util$1.getArg(aArgs, 'line'), - originalColumn: util$1.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util$1.compareByOriginalPositions, - util$1.getArg(aArgs, 'bias', SourceMapConsumer$2.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util$1.getArg(mapping, 'generatedLine', null), - column: util$1.getArg(mapping, 'generatedColumn', null), - lastColumn: util$1.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -var BasicSourceMapConsumer_1$1 = BasicSourceMapConsumer$1; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer$1(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util$1.parseSourceMapInput(aSourceMap); - } - - var version = util$1.getArg(sourceMap, 'version'); - var sections = util$1.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet$5(); - this._names = new ArraySet$5(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util$1.getArg(s, 'offset'); - var offsetLine = util$1.getArg(offset, 'line'); - var offsetColumn = util$1.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer$2(util$1.getArg(s, 'map'), aSourceMapURL) - } - }); -} - -IndexedSourceMapConsumer$1.prototype = Object.create(SourceMapConsumer$2.prototype); -IndexedSourceMapConsumer$1.prototype.constructor = SourceMapConsumer$2; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer$1.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer$1.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer$1.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util$1.getArg(aArgs, 'line'), - generatedColumn: util$1.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch$1.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer$1.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer$1.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -IndexedSourceMapConsumer$1.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util$1.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer$1.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util$1.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort$3(this.__generatedMappings, util$1.compareByGeneratedPositionsDeflated); - quickSort$3(this.__originalMappings, util$1.compareByOriginalPositions); - }; - -var IndexedSourceMapConsumer_1$1 = IndexedSourceMapConsumer$1; - -var sourceMapConsumer$1 = { - SourceMapConsumer: SourceMapConsumer_1$1, - BasicSourceMapConsumer: BasicSourceMapConsumer_1$1, - IndexedSourceMapConsumer: IndexedSourceMapConsumer_1$1 -}; - -/* -*- Mode: js; js-indent-level: 2; -*- */ - -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator$4 = sourceMapGenerator$1.SourceMapGenerator; - - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE$1 = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE$1 = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode$1 = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode$2(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode$1] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode$2.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode$2(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE$1); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util$1.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util$1.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode$2(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode$2.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode$1] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode$2.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode$1] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode$2.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode$1]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode$2.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode$2.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode$1]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode$2.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util$1.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode$2.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode$1]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util$1.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode$2.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode$2.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator$4(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE$1) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -var SourceNode_1$1 = SourceNode$2; - -var sourceNode$1 = { - SourceNode: SourceNode_1$1 -}; - -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator$5 = sourceMapGenerator$1.SourceMapGenerator; -var SourceMapConsumer$3 = sourceMapConsumer$1.SourceMapConsumer; -var SourceNode$3 = sourceNode$1.SourceNode; - -var sourceMap$1 = { - SourceMapGenerator: SourceMapGenerator$5, - SourceMapConsumer: SourceMapConsumer$3, - SourceNode: SourceNode$3 -}; - -let urlAlphabet = - 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'; -let customAlphabet = (alphabet, size) => { - return () => { - let id = ''; - let i = size; - while (i--) { - id += alphabet[(Math.random() * alphabet.length) | 0]; - } - return id - } -}; -let nanoid = (size = 21) => { - let id = ''; - let i = size; - while (i--) { - id += urlAlphabet[(Math.random() * 64) | 0]; - } - return id -}; -var nonSecure = { nanoid, customAlphabet }; - -let { SourceMapConsumer: SourceMapConsumer$4, SourceMapGenerator: SourceMapGenerator$6 } = sourceMap$1; -let { existsSync, readFileSync } = _fs; -let { dirname: dirname$1, join: join$1 } = _path; - -function fromBase64(str) { - if (Buffer) { - return Buffer.from(str, 'base64').toString() - } else { - /* c8 ignore next 2 */ - return window.atob(str) - } -} - -class PreviousMap { - constructor(css, opts) { - if (opts.map === false) return - this.loadAnnotation(css); - this.inline = this.startWith(this.annotation, 'data:'); - - let prev = opts.map ? opts.map.prev : undefined; - let text = this.loadMap(opts.from, prev); - if (!this.mapFile && opts.from) { - this.mapFile = opts.from; - } - if (this.mapFile) this.root = dirname$1(this.mapFile); - if (text) this.text = text; - } - - consumer() { - if (!this.consumerCache) { - this.consumerCache = new SourceMapConsumer$4(this.text); - } - return this.consumerCache - } - - withContent() { - return !!( - this.consumer().sourcesContent && - this.consumer().sourcesContent.length > 0 - ) - } - - startWith(string, start) { - if (!string) return false - return string.substr(0, start.length) === start - } - - getAnnotationURL(sourceMapString) { - return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim() - } - - loadAnnotation(css) { - let comments = css.match(/\/\*\s*# sourceMappingURL=/gm); - if (!comments) return - - // sourceMappingURLs from comments, strings, etc. - let start = css.lastIndexOf(comments.pop()); - let end = css.indexOf('*/', start); - - if (start > -1 && end > -1) { - // Locate the last sourceMappingURL to avoid pickin - this.annotation = this.getAnnotationURL(css.substring(start, end)); - } - } - - decodeInline(text) { - let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; - let baseUri = /^data:application\/json;base64,/; - let charsetUri = /^data:application\/json;charset=utf-?8,/; - let uri = /^data:application\/json,/; - - if (charsetUri.test(text) || uri.test(text)) { - return decodeURIComponent(text.substr(RegExp.lastMatch.length)) - } - - if (baseCharsetUri.test(text) || baseUri.test(text)) { - return fromBase64(text.substr(RegExp.lastMatch.length)) - } - - let encoding = text.match(/data:application\/json;([^,]+),/)[1]; - throw new Error('Unsupported source map encoding ' + encoding) - } - - loadFile(path) { - this.root = dirname$1(path); - if (existsSync(path)) { - this.mapFile = path; - return readFileSync(path, 'utf-8').toString().trim() - } - } - - loadMap(file, prev) { - if (prev === false) return false - - if (prev) { - if (typeof prev === 'string') { - return prev - } else if (typeof prev === 'function') { - let prevPath = prev(file); - if (prevPath) { - let map = this.loadFile(prevPath); - if (!map) { - throw new Error( - 'Unable to load previous source map: ' + prevPath.toString() - ) - } - return map - } - } else if (prev instanceof SourceMapConsumer$4) { - return SourceMapGenerator$6.fromSourceMap(prev).toString() - } else if (prev instanceof SourceMapGenerator$6) { - return prev.toString() - } else if (this.isMap(prev)) { - return JSON.stringify(prev) - } else { - throw new Error( - 'Unsupported previous source map format: ' + prev.toString() - ) - } - } else if (this.inline) { - return this.decodeInline(this.annotation) - } else if (this.annotation) { - let map = this.annotation; - if (file) map = join$1(dirname$1(file), map); - return this.loadFile(map) - } - } - - isMap(map) { - if (typeof map !== 'object') return false - return ( - typeof map.mappings === 'string' || - typeof map._mappings === 'string' || - Array.isArray(map.sections) - ) - } -} - -var previousMap = PreviousMap; -PreviousMap.default = PreviousMap; - -var require$$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_url$1); - -let { SourceMapConsumer: SourceMapConsumer$5, SourceMapGenerator: SourceMapGenerator$7 } = sourceMap$1; -let { fileURLToPath, pathToFileURL } = require$$2; -let { resolve: resolve$1, isAbsolute: isAbsolute$1 } = _path; -let { nanoid: nanoid$1 } = nonSecure; - - - - - -let fromOffsetCache = Symbol('fromOffsetCache'); - -let sourceMapAvailable = Boolean(SourceMapConsumer$5 && SourceMapGenerator$7); -let pathAvailable = Boolean(resolve$1 && isAbsolute$1); - -class Input$1 { - constructor(css, opts = {}) { - if ( - css === null || - typeof css === 'undefined' || - (typeof css === 'object' && !css.toString) - ) { - throw new Error(`PostCSS received ${css} instead of CSS string`) - } - - this.css = css.toString(); - - if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') { - this.hasBOM = true; - this.css = this.css.slice(1); - } else { - this.hasBOM = false; - } - - if (opts.from) { - if ( - !pathAvailable || - /^\w+:\/\//.test(opts.from) || - isAbsolute$1(opts.from) - ) { - this.file = opts.from; - } else { - this.file = resolve$1(opts.from); - } - } - - if (pathAvailable && sourceMapAvailable) { - let map = new previousMap(this.css, opts); - if (map.text) { - this.map = map; - let file = map.consumer().file; - if (!this.file && file) this.file = this.mapResolve(file); - } - } - - if (!this.file) { - this.id = '<input css ' + nanoid$1(6) + '>'; - } - if (this.map) this.map.file = this.from; - } - - fromOffset(offset) { - let lastLine, lineToIndex; - if (!this[fromOffsetCache]) { - let lines = this.css.split('\n'); - lineToIndex = new Array(lines.length); - let prevIndex = 0; - - for (let i = 0, l = lines.length; i < l; i++) { - lineToIndex[i] = prevIndex; - prevIndex += lines[i].length + 1; - } - - this[fromOffsetCache] = lineToIndex; - } else { - lineToIndex = this[fromOffsetCache]; - } - lastLine = lineToIndex[lineToIndex.length - 1]; - - let min = 0; - if (offset >= lastLine) { - min = lineToIndex.length - 1; - } else { - let max = lineToIndex.length - 2; - let mid; - while (min < max) { - mid = min + ((max - min) >> 1); - if (offset < lineToIndex[mid]) { - max = mid - 1; - } else if (offset >= lineToIndex[mid + 1]) { - min = mid + 1; - } else { - min = mid; - break - } - } - } - return { - line: min + 1, - col: offset - lineToIndex[min] + 1 - } - } - - error(message, line, column, opts = {}) { - let result, endLine, endColumn; - - if (line && typeof line === 'object') { - let start = line; - let end = column; - if (typeof line.offset === 'number') { - let pos = this.fromOffset(start.offset); - line = pos.line; - column = pos.col; - } else { - line = start.line; - column = start.column; - } - if (typeof end.offset === 'number') { - let pos = this.fromOffset(end.offset); - endLine = pos.line; - endColumn = pos.col; - } else { - endLine = end.line; - endColumn = end.column; - } - } else if (!column) { - let pos = this.fromOffset(line); - line = pos.line; - column = pos.col; - } - - let origin = this.origin(line, column, endLine, endColumn); - if (origin) { - result = new cssSyntaxError( - message, - origin.endLine === undefined - ? origin.line - : { line: origin.line, column: origin.column }, - origin.endLine === undefined - ? origin.column - : { line: origin.endLine, column: origin.endColumn }, - origin.source, - origin.file, - opts.plugin - ); - } else { - result = new cssSyntaxError( - message, - endLine === undefined ? line : { line, column }, - endLine === undefined ? column : { line: endLine, column: endColumn }, - this.css, - this.file, - opts.plugin - ); - } - - result.input = { line, column, endLine, endColumn, source: this.css }; - if (this.file) { - if (pathToFileURL) { - result.input.url = pathToFileURL(this.file).toString(); - } - result.input.file = this.file; - } - - return result - } - - origin(line, column, endLine, endColumn) { - if (!this.map) return false - let consumer = this.map.consumer(); - - let from = consumer.originalPositionFor({ line, column }); - if (!from.source) return false - - let to; - if (typeof endLine === 'number') { - to = consumer.originalPositionFor({ line: endLine, column: endColumn }); - } - - let fromUrl; - - if (isAbsolute$1(from.source)) { - fromUrl = pathToFileURL(from.source); - } else { - fromUrl = new URL( - from.source, - this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) - ); - } - - let result = { - url: fromUrl.toString(), - line: from.line, - column: from.column, - endLine: to && to.line, - endColumn: to && to.column - }; - - if (fromUrl.protocol === 'file:') { - if (fileURLToPath) { - result.file = fileURLToPath(fromUrl); - } else { - /* c8 ignore next 2 */ - throw new Error(`file: protocol is not available in this PostCSS build`) - } - } - - let source = consumer.sourceContentFor(from.source); - if (source) result.source = source; - - return result - } - - mapResolve(file) { - if (/^\w+:\/\//.test(file)) { - return file - } - return resolve$1(this.map.consumer().sourceRoot || this.map.root || '.', file) - } - - get from() { - return this.file || this.id - } - - toJSON() { - let json = {}; - for (let name of ['hasBOM', 'css', 'file', 'id']) { - if (this[name] != null) { - json[name] = this[name]; - } - } - if (this.map) { - json.map = { ...this.map }; - if (json.map.consumerCache) { - json.map.consumerCache = undefined; - } - } - return json - } -} - -var input = Input$1; -Input$1.default = Input$1; - -if (terminalHighlight_1 && terminalHighlight_1.registerInput) { - terminalHighlight_1.registerInput(Input$1); -} - -let { SourceMapConsumer: SourceMapConsumer$6, SourceMapGenerator: SourceMapGenerator$8 } = sourceMap$1; -let { dirname: dirname$2, resolve: resolve$2, relative: relative$1, sep: sep$1 } = _path; -let { pathToFileURL: pathToFileURL$1 } = require$$2; - - - -let sourceMapAvailable$1 = Boolean(SourceMapConsumer$6 && SourceMapGenerator$8); -let pathAvailable$1 = Boolean(dirname$2 && resolve$2 && relative$1 && sep$1); - -class MapGenerator { - constructor(stringify, root, opts, cssString) { - this.stringify = stringify; - this.mapOpts = opts.map || {}; - this.root = root; - this.opts = opts; - this.css = cssString; - } - - isMap() { - if (typeof this.opts.map !== 'undefined') { - return !!this.opts.map - } - return this.previous().length > 0 - } - - previous() { - if (!this.previousMaps) { - this.previousMaps = []; - if (this.root) { - this.root.walk(node => { - if (node.source && node.source.input.map) { - let map = node.source.input.map; - if (!this.previousMaps.includes(map)) { - this.previousMaps.push(map); - } - } - }); - } else { - let input$1 = new input(this.css, this.opts); - if (input$1.map) this.previousMaps.push(input$1.map); - } - } - - return this.previousMaps - } - - isInline() { - if (typeof this.mapOpts.inline !== 'undefined') { - return this.mapOpts.inline - } - - let annotation = this.mapOpts.annotation; - if (typeof annotation !== 'undefined' && annotation !== true) { - return false - } - - if (this.previous().length) { - return this.previous().some(i => i.inline) - } - return true - } - - isSourcesContent() { - if (typeof this.mapOpts.sourcesContent !== 'undefined') { - return this.mapOpts.sourcesContent - } - if (this.previous().length) { - return this.previous().some(i => i.withContent()) - } - return true - } - - clearAnnotation() { - if (this.mapOpts.annotation === false) return - - if (this.root) { - let node; - for (let i = this.root.nodes.length - 1; i >= 0; i--) { - node = this.root.nodes[i]; - if (node.type !== 'comment') continue - if (node.text.indexOf('# sourceMappingURL=') === 0) { - this.root.removeChild(i); - } - } - } else if (this.css) { - this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, ''); - } - } - - setSourcesContent() { - let already = {}; - if (this.root) { - this.root.walk(node => { - if (node.source) { - let from = node.source.input.from; - if (from && !already[from]) { - already[from] = true; - this.map.setSourceContent( - this.toUrl(this.path(from)), - node.source.input.css - ); - } - } - }); - } else if (this.css) { - let from = this.opts.from - ? this.toUrl(this.path(this.opts.from)) - : '<no source>'; - this.map.setSourceContent(from, this.css); - } - } - - applyPrevMaps() { - for (let prev of this.previous()) { - let from = this.toUrl(this.path(prev.file)); - let root = prev.root || dirname$2(prev.file); - let map; - - if (this.mapOpts.sourcesContent === false) { - map = new SourceMapConsumer$6(prev.text); - if (map.sourcesContent) { - map.sourcesContent = map.sourcesContent.map(() => null); - } - } else { - map = prev.consumer(); - } - - this.map.applySourceMap(map, from, this.toUrl(this.path(root))); - } - } - - isAnnotation() { - if (this.isInline()) { - return true - } - if (typeof this.mapOpts.annotation !== 'undefined') { - return this.mapOpts.annotation - } - if (this.previous().length) { - return this.previous().some(i => i.annotation) - } - return true - } - - toBase64(str) { - if (Buffer) { - return Buffer.from(str).toString('base64') - } else { - return window.btoa(unescape(encodeURIComponent(str))) - } - } - - addAnnotation() { - let content; - - if (this.isInline()) { - content = - 'data:application/json;base64,' + this.toBase64(this.map.toString()); - } else if (typeof this.mapOpts.annotation === 'string') { - content = this.mapOpts.annotation; - } else if (typeof this.mapOpts.annotation === 'function') { - content = this.mapOpts.annotation(this.opts.to, this.root); - } else { - content = this.outputFile() + '.map'; - } - let eol = '\n'; - if (this.css.includes('\r\n')) eol = '\r\n'; - - this.css += eol + '/*# sourceMappingURL=' + content + ' */'; - } - - outputFile() { - if (this.opts.to) { - return this.path(this.opts.to) - } else if (this.opts.from) { - return this.path(this.opts.from) - } else { - return 'to.css' - } - } - - generateMap() { - if (this.root) { - this.generateString(); - } else if (this.previous().length === 1) { - let prev = this.previous()[0].consumer(); - prev.file = this.outputFile(); - this.map = SourceMapGenerator$8.fromSourceMap(prev); - } else { - this.map = new SourceMapGenerator$8({ file: this.outputFile() }); - this.map.addMapping({ - source: this.opts.from - ? this.toUrl(this.path(this.opts.from)) - : '<no source>', - generated: { line: 1, column: 0 }, - original: { line: 1, column: 0 } - }); - } - - if (this.isSourcesContent()) this.setSourcesContent(); - if (this.root && this.previous().length > 0) this.applyPrevMaps(); - if (this.isAnnotation()) this.addAnnotation(); - - if (this.isInline()) { - return [this.css] - } else { - return [this.css, this.map] - } - } - - path(file) { - if (file.indexOf('<') === 0) return file - if (/^\w+:\/\//.test(file)) return file - if (this.mapOpts.absolute) return file - - let from = this.opts.to ? dirname$2(this.opts.to) : '.'; - - if (typeof this.mapOpts.annotation === 'string') { - from = dirname$2(resolve$2(from, this.mapOpts.annotation)); - } - - file = relative$1(from, file); - return file - } - - toUrl(path) { - if (sep$1 === '\\') { - path = path.replace(/\\/g, '/'); - } - return encodeURI(path).replace(/[#?]/g, encodeURIComponent) - } - - sourcePath(node) { - if (this.mapOpts.from) { - return this.toUrl(this.mapOpts.from) - } else if (this.mapOpts.absolute) { - if (pathToFileURL$1) { - return pathToFileURL$1(node.source.input.from).toString() - } else { - throw new Error( - '`map.absolute` option is not available in this PostCSS build' - ) - } - } else { - return this.toUrl(this.path(node.source.input.from)) - } - } - - generateString() { - this.css = ''; - this.map = new SourceMapGenerator$8({ file: this.outputFile() }); - - let line = 1; - let column = 1; - - let noSource = '<no source>'; - let mapping = { - source: '', - generated: { line: 0, column: 0 }, - original: { line: 0, column: 0 } - }; - - let lines, last; - this.stringify(this.root, (str, node, type) => { - this.css += str; - - if (node && type !== 'end') { - mapping.generated.line = line; - mapping.generated.column = column - 1; - if (node.source && node.source.start) { - mapping.source = this.sourcePath(node); - mapping.original.line = node.source.start.line; - mapping.original.column = node.source.start.column - 1; - this.map.addMapping(mapping); - } else { - mapping.source = noSource; - mapping.original.line = 1; - mapping.original.column = 0; - this.map.addMapping(mapping); - } - } - - lines = str.match(/\n/g); - if (lines) { - line += lines.length; - last = str.lastIndexOf('\n'); - column = str.length - last; - } else { - column += str.length; - } - - if (node && type !== 'start') { - let p = node.parent || { raws: {} }; - if (node.type !== 'decl' || node !== p.last || p.raws.semicolon) { - if (node.source && node.source.end) { - mapping.source = this.sourcePath(node); - mapping.original.line = node.source.end.line; - mapping.original.column = node.source.end.column - 1; - mapping.generated.line = line; - mapping.generated.column = column - 2; - this.map.addMapping(mapping); - } else { - mapping.source = noSource; - mapping.original.line = 1; - mapping.original.column = 0; - mapping.generated.line = line; - mapping.generated.column = column - 1; - this.map.addMapping(mapping); - } - } - } - }); - } - - generate() { - this.clearAnnotation(); - if (pathAvailable$1 && sourceMapAvailable$1 && this.isMap()) { - return this.generateMap() - } else { - let result = ''; - this.stringify(this.root, i => { - result += i; - }); - return [result] - } - } -} - -var mapGenerator = MapGenerator; - -class Comment extends node_1 { - constructor(defaults) { - super(defaults); - this.type = 'comment'; - } -} - -var comment = Comment; -Comment.default = Comment; - -let { isClean: isClean$2, my: my$2 } = symbols; - - - - -let parse$5, Rule, AtRule; - -function cleanSource(nodes) { - return nodes.map(i => { - if (i.nodes) i.nodes = cleanSource(i.nodes); - delete i.source; - return i - }) -} - -function markDirtyUp(node) { - node[isClean$2] = false; - if (node.proxyOf.nodes) { - for (let i of node.proxyOf.nodes) { - markDirtyUp(i); - } - } -} - -class Container extends node_1 { - push(child) { - child.parent = this; - this.proxyOf.nodes.push(child); - return this - } - - each(callback) { - if (!this.proxyOf.nodes) return undefined - let iterator = this.getIterator(); - - let index, result; - while (this.indexes[iterator] < this.proxyOf.nodes.length) { - index = this.indexes[iterator]; - result = callback(this.proxyOf.nodes[index], index); - if (result === false) break - - this.indexes[iterator] += 1; - } - - delete this.indexes[iterator]; - return result - } - - walk(callback) { - return this.each((child, i) => { - let result; - try { - result = callback(child, i); - } catch (e) { - throw child.addToError(e) - } - if (result !== false && child.walk) { - result = child.walk(callback); - } - - return result - }) - } - - walkDecls(prop, callback) { - if (!callback) { - callback = prop; - return this.walk((child, i) => { - if (child.type === 'decl') { - return callback(child, i) - } - }) - } - if (prop instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'decl' && prop.test(child.prop)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'decl' && child.prop === prop) { - return callback(child, i) - } - }) - } - - walkRules(selector, callback) { - if (!callback) { - callback = selector; - - return this.walk((child, i) => { - if (child.type === 'rule') { - return callback(child, i) - } - }) - } - if (selector instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'rule' && selector.test(child.selector)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'rule' && child.selector === selector) { - return callback(child, i) - } - }) - } - - walkAtRules(name, callback) { - if (!callback) { - callback = name; - return this.walk((child, i) => { - if (child.type === 'atrule') { - return callback(child, i) - } - }) - } - if (name instanceof RegExp) { - return this.walk((child, i) => { - if (child.type === 'atrule' && name.test(child.name)) { - return callback(child, i) - } - }) - } - return this.walk((child, i) => { - if (child.type === 'atrule' && child.name === name) { - return callback(child, i) - } - }) - } - - walkComments(callback) { - return this.walk((child, i) => { - if (child.type === 'comment') { - return callback(child, i) - } - }) - } - - append(...children) { - for (let child of children) { - let nodes = this.normalize(child, this.last); - for (let node of nodes) this.proxyOf.nodes.push(node); - } - - this.markDirty(); - - return this - } - - prepend(...children) { - children = children.reverse(); - for (let child of children) { - let nodes = this.normalize(child, this.first, 'prepend').reverse(); - for (let node of nodes) this.proxyOf.nodes.unshift(node); - for (let id in this.indexes) { - this.indexes[id] = this.indexes[id] + nodes.length; - } - } - - this.markDirty(); - - return this - } - - cleanRaws(keepBetween) { - super.cleanRaws(keepBetween); - if (this.nodes) { - for (let node of this.nodes) node.cleanRaws(keepBetween); - } - } - - insertBefore(exist, add) { - exist = this.index(exist); - - let type = exist === 0 ? 'prepend' : false; - let nodes = this.normalize(add, this.proxyOf.nodes[exist], type).reverse(); - for (let node of nodes) this.proxyOf.nodes.splice(exist, 0, node); - - let index; - for (let id in this.indexes) { - index = this.indexes[id]; - if (exist <= index) { - this.indexes[id] = index + nodes.length; - } - } - - this.markDirty(); - - return this - } - - insertAfter(exist, add) { - exist = this.index(exist); - - let nodes = this.normalize(add, this.proxyOf.nodes[exist]).reverse(); - for (let node of nodes) this.proxyOf.nodes.splice(exist + 1, 0, node); - - let index; - for (let id in this.indexes) { - index = this.indexes[id]; - if (exist < index) { - this.indexes[id] = index + nodes.length; - } - } - - this.markDirty(); - - return this - } - - removeChild(child) { - child = this.index(child); - this.proxyOf.nodes[child].parent = undefined; - this.proxyOf.nodes.splice(child, 1); - - let index; - for (let id in this.indexes) { - index = this.indexes[id]; - if (index >= child) { - this.indexes[id] = index - 1; - } - } - - this.markDirty(); - - return this - } - - removeAll() { - for (let node of this.proxyOf.nodes) node.parent = undefined; - this.proxyOf.nodes = []; - - this.markDirty(); - - return this - } - - replaceValues(pattern, opts, callback) { - if (!callback) { - callback = opts; - opts = {}; - } - - this.walkDecls(decl => { - if (opts.props && !opts.props.includes(decl.prop)) return - if (opts.fast && !decl.value.includes(opts.fast)) return - - decl.value = decl.value.replace(pattern, callback); - }); - - this.markDirty(); - - return this - } - - every(condition) { - return this.nodes.every(condition) - } - - some(condition) { - return this.nodes.some(condition) - } - - index(child) { - if (typeof child === 'number') return child - if (child.proxyOf) child = child.proxyOf; - return this.proxyOf.nodes.indexOf(child) - } - - get first() { - if (!this.proxyOf.nodes) return undefined - return this.proxyOf.nodes[0] - } - - get last() { - if (!this.proxyOf.nodes) return undefined - return this.proxyOf.nodes[this.proxyOf.nodes.length - 1] - } - - normalize(nodes, sample) { - if (typeof nodes === 'string') { - nodes = cleanSource(parse$5(nodes).nodes); - } else if (Array.isArray(nodes)) { - nodes = nodes.slice(0); - for (let i of nodes) { - if (i.parent) i.parent.removeChild(i, 'ignore'); - } - } else if (nodes.type === 'root' && this.type !== 'document') { - nodes = nodes.nodes.slice(0); - for (let i of nodes) { - if (i.parent) i.parent.removeChild(i, 'ignore'); - } - } else if (nodes.type) { - nodes = [nodes]; - } else if (nodes.prop) { - if (typeof nodes.value === 'undefined') { - throw new Error('Value field is missed in node creation') - } else if (typeof nodes.value !== 'string') { - nodes.value = String(nodes.value); - } - nodes = [new declaration(nodes)]; - } else if (nodes.selector) { - nodes = [new Rule(nodes)]; - } else if (nodes.name) { - nodes = [new AtRule(nodes)]; - } else if (nodes.text) { - nodes = [new comment(nodes)]; - } else { - throw new Error('Unknown node type in node creation') - } - - let processed = nodes.map(i => { - /* c8 ignore next */ - if (!i[my$2]) Container.rebuild(i); - i = i.proxyOf; - if (i.parent) i.parent.removeChild(i); - if (i[isClean$2]) markDirtyUp(i); - if (typeof i.raws.before === 'undefined') { - if (sample && typeof sample.raws.before !== 'undefined') { - i.raws.before = sample.raws.before.replace(/\S/g, ''); - } - } - i.parent = this; - return i - }); - - return processed - } - - getProxyProcessor() { - return { - set(node, prop, value) { - if (node[prop] === value) return true - node[prop] = value; - if (prop === 'name' || prop === 'params' || prop === 'selector') { - node.markDirty(); - } - return true - }, - - get(node, prop) { - if (prop === 'proxyOf') { - return node - } else if (!node[prop]) { - return node[prop] - } else if ( - prop === 'each' || - (typeof prop === 'string' && prop.startsWith('walk')) - ) { - return (...args) => { - return node[prop]( - ...args.map(i => { - if (typeof i === 'function') { - return (child, index) => i(child.toProxy(), index) - } else { - return i - } - }) - ) - } - } else if (prop === 'every' || prop === 'some') { - return cb => { - return node[prop]((child, ...other) => - cb(child.toProxy(), ...other) - ) - } - } else if (prop === 'root') { - return () => node.root().toProxy() - } else if (prop === 'nodes') { - return node.nodes.map(i => i.toProxy()) - } else if (prop === 'first' || prop === 'last') { - return node[prop].toProxy() - } else { - return node[prop] - } - } - } - } - - getIterator() { - if (!this.lastEach) this.lastEach = 0; - if (!this.indexes) this.indexes = {}; - - this.lastEach += 1; - let iterator = this.lastEach; - this.indexes[iterator] = 0; - - return iterator - } -} - -Container.registerParse = dependant => { - parse$5 = dependant; -}; - -Container.registerRule = dependant => { - Rule = dependant; -}; - -Container.registerAtRule = dependant => { - AtRule = dependant; -}; - -var container = Container; -Container.default = Container; - -/* c8 ignore start */ -Container.rebuild = node => { - if (node.type === 'atrule') { - Object.setPrototypeOf(node, AtRule.prototype); - } else if (node.type === 'rule') { - Object.setPrototypeOf(node, Rule.prototype); - } else if (node.type === 'decl') { - Object.setPrototypeOf(node, declaration.prototype); - } else if (node.type === 'comment') { - Object.setPrototypeOf(node, comment.prototype); - } - - node[my$2] = true; - - if (node.nodes) { - node.nodes.forEach(child => { - Container.rebuild(child); - }); - } -}; - -let LazyResult, Processor; - -class Document extends container { - constructor(defaults) { - // type needs to be passed to super, otherwise child roots won't be normalized correctly - super({ type: 'document', ...defaults }); - - if (!this.nodes) { - this.nodes = []; - } - } - - toResult(opts = {}) { - let lazy = new LazyResult(new Processor(), this, opts); - - return lazy.stringify() - } -} - -Document.registerLazyResult = dependant => { - LazyResult = dependant; -}; - -Document.registerProcessor = dependant => { - Processor = dependant; -}; - -var document = Document; -Document.default = Document; - -/* eslint-disable no-console */ - -let printed = {}; - -var warnOnce$2 = function warnOnce(message) { - if (printed[message]) return - printed[message] = true; - - if (typeof console !== 'undefined' && console.warn) { - console.warn(message); - } -}; - -class Warning { - constructor(text, opts = {}) { - this.type = 'warning'; - this.text = text; - - if (opts.node && opts.node.source) { - let range = opts.node.rangeBy(opts); - this.line = range.start.line; - this.column = range.start.column; - this.endLine = range.end.line; - this.endColumn = range.end.column; - } - - for (let opt in opts) this[opt] = opts[opt]; - } - - toString() { - if (this.node) { - return this.node.error(this.text, { - plugin: this.plugin, - index: this.index, - word: this.word - }).message - } - - if (this.plugin) { - return this.plugin + ': ' + this.text - } - - return this.text - } -} - -var warning = Warning; -Warning.default = Warning; - -class Result { - constructor(processor, root, opts) { - this.processor = processor; - this.messages = []; - this.root = root; - this.opts = opts; - this.css = undefined; - this.map = undefined; - } - - toString() { - return this.css - } - - warn(text, opts = {}) { - if (!opts.plugin) { - if (this.lastPlugin && this.lastPlugin.postcssPlugin) { - opts.plugin = this.lastPlugin.postcssPlugin; - } - } - - let warning$1 = new warning(text, opts); - this.messages.push(warning$1); - - return warning$1 - } - - warnings() { - return this.messages.filter(i => i.type === 'warning') - } - - get content() { - return this.css - } -} - -var result = Result; -Result.default = Result; - -class AtRule$1 extends container { - constructor(defaults) { - super(defaults); - this.type = 'atrule'; - } - - append(...children) { - if (!this.proxyOf.nodes) this.nodes = []; - return super.append(...children) - } - - prepend(...children) { - if (!this.proxyOf.nodes) this.nodes = []; - return super.prepend(...children) - } -} - -var atRule = AtRule$1; -AtRule$1.default = AtRule$1; - -container.registerAtRule(AtRule$1); - -let LazyResult$1, Processor$1; - -class Root extends container { - constructor(defaults) { - super(defaults); - this.type = 'root'; - if (!this.nodes) this.nodes = []; - } - - removeChild(child, ignore) { - let index = this.index(child); - - if (!ignore && index === 0 && this.nodes.length > 1) { - this.nodes[1].raws.before = this.nodes[index].raws.before; - } - - return super.removeChild(child) - } - - normalize(child, sample, type) { - let nodes = super.normalize(child); - - if (sample) { - if (type === 'prepend') { - if (this.nodes.length > 1) { - sample.raws.before = this.nodes[1].raws.before; - } else { - delete sample.raws.before; - } - } else if (this.first !== sample) { - for (let node of nodes) { - node.raws.before = sample.raws.before; - } - } - } - - return nodes - } - - toResult(opts = {}) { - let lazy = new LazyResult$1(new Processor$1(), this, opts); - return lazy.stringify() - } -} - -Root.registerLazyResult = dependant => { - LazyResult$1 = dependant; -}; - -Root.registerProcessor = dependant => { - Processor$1 = dependant; -}; - -var root = Root; -Root.default = Root; - -let list = { - split(string, separators, last) { - let array = []; - let current = ''; - let split = false; - - let func = 0; - let quote = false; - let escape = false; - - for (let letter of string) { - if (escape) { - escape = false; - } else if (letter === '\\') { - escape = true; - } else if (quote) { - if (letter === quote) { - quote = false; - } - } else if (letter === '"' || letter === "'") { - quote = letter; - } else if (letter === '(') { - func += 1; - } else if (letter === ')') { - if (func > 0) func -= 1; - } else if (func === 0) { - if (separators.includes(letter)) split = true; - } - - if (split) { - if (current !== '') array.push(current.trim()); - current = ''; - split = false; - } else { - current += letter; - } - } - - if (last || current !== '') array.push(current.trim()); - return array - }, - - space(string) { - let spaces = [' ', '\n', '\t']; - return list.split(string, spaces) - }, - - comma(string) { - return list.split(string, [','], true) - } -}; - -var list_1 = list; -list.default = list; - -class Rule$1 extends container { - constructor(defaults) { - super(defaults); - this.type = 'rule'; - if (!this.nodes) this.nodes = []; - } - - get selectors() { - return list_1.comma(this.selector) - } - - set selectors(values) { - let match = this.selector ? this.selector.match(/,\s*/) : null; - let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen'); - this.selector = values.join(sep); - } -} - -var rule = Rule$1; -Rule$1.default = Rule$1; - -container.registerRule(Rule$1); - -class Parser$1 { - constructor(input) { - this.input = input; - - this.root = new root(); - this.current = this.root; - this.spaces = ''; - this.semicolon = false; - this.customProperty = false; - - this.createTokenizer(); - this.root.source = { input, start: { offset: 0, line: 1, column: 1 } }; - } - - createTokenizer() { - this.tokenizer = tokenize(this.input); - } - - parse() { - let token; - while (!this.tokenizer.endOfFile()) { - token = this.tokenizer.nextToken(); - - switch (token[0]) { - case 'space': - this.spaces += token[1]; - break - - case ';': - this.freeSemicolon(token); - break - - case '}': - this.end(token); - break - - case 'comment': - this.comment(token); - break - - case 'at-word': - this.atrule(token); - break - - case '{': - this.emptyRule(token); - break - - default: - this.other(token); - break - } - } - this.endFile(); - } - - comment(token) { - let node = new comment(); - this.init(node, token[2]); - node.source.end = this.getPosition(token[3] || token[2]); - - let text = token[1].slice(2, -2); - if (/^\s*$/.test(text)) { - node.text = ''; - node.raws.left = text; - node.raws.right = ''; - } else { - let match = text.match(/^(\s*)([^]*\S)(\s*)$/); - node.text = match[2]; - node.raws.left = match[1]; - node.raws.right = match[3]; - } - } - - emptyRule(token) { - let node = new rule(); - this.init(node, token[2]); - node.selector = ''; - node.raws.between = ''; - this.current = node; - } - - other(start) { - let end = false; - let type = null; - let colon = false; - let bracket = null; - let brackets = []; - let customProperty = start[1].startsWith('--'); - - let tokens = []; - let token = start; - while (token) { - type = token[0]; - tokens.push(token); - - if (type === '(' || type === '[') { - if (!bracket) bracket = token; - brackets.push(type === '(' ? ')' : ']'); - } else if (customProperty && colon && type === '{') { - if (!bracket) bracket = token; - brackets.push('}'); - } else if (brackets.length === 0) { - if (type === ';') { - if (colon) { - this.decl(tokens, customProperty); - return - } else { - break - } - } else if (type === '{') { - this.rule(tokens); - return - } else if (type === '}') { - this.tokenizer.back(tokens.pop()); - end = true; - break - } else if (type === ':') { - colon = true; - } - } else if (type === brackets[brackets.length - 1]) { - brackets.pop(); - if (brackets.length === 0) bracket = null; - } - - token = this.tokenizer.nextToken(); - } - - if (this.tokenizer.endOfFile()) end = true; - if (brackets.length > 0) this.unclosedBracket(bracket); - - if (end && colon) { - while (tokens.length) { - token = tokens[tokens.length - 1][0]; - if (token !== 'space' && token !== 'comment') break - this.tokenizer.back(tokens.pop()); - } - this.decl(tokens, customProperty); - } else { - this.unknownWord(tokens); - } - } - - rule(tokens) { - tokens.pop(); - - let node = new rule(); - this.init(node, tokens[0][2]); - - node.raws.between = this.spacesAndCommentsFromEnd(tokens); - this.raw(node, 'selector', tokens); - this.current = node; - } - - decl(tokens, customProperty) { - let node = new declaration(); - this.init(node, tokens[0][2]); - - let last = tokens[tokens.length - 1]; - if (last[0] === ';') { - this.semicolon = true; - tokens.pop(); - } - node.source.end = this.getPosition(last[3] || last[2]); - - while (tokens[0][0] !== 'word') { - if (tokens.length === 1) this.unknownWord(tokens); - node.raws.before += tokens.shift()[1]; - } - node.source.start = this.getPosition(tokens[0][2]); - - node.prop = ''; - while (tokens.length) { - let type = tokens[0][0]; - if (type === ':' || type === 'space' || type === 'comment') { - break - } - node.prop += tokens.shift()[1]; - } - - node.raws.between = ''; - - let token; - while (tokens.length) { - token = tokens.shift(); - - if (token[0] === ':') { - node.raws.between += token[1]; - break - } else { - if (token[0] === 'word' && /\w/.test(token[1])) { - this.unknownWord([token]); - } - node.raws.between += token[1]; - } - } - - if (node.prop[0] === '_' || node.prop[0] === '*') { - node.raws.before += node.prop[0]; - node.prop = node.prop.slice(1); - } - let firstSpaces = this.spacesAndCommentsFromStart(tokens); - this.precheckMissedSemicolon(tokens); - - for (let i = tokens.length - 1; i >= 0; i--) { - token = tokens[i]; - if (token[1].toLowerCase() === '!important') { - node.important = true; - let string = this.stringFrom(tokens, i); - string = this.spacesFromEnd(tokens) + string; - if (string !== ' !important') node.raws.important = string; - break - } else if (token[1].toLowerCase() === 'important') { - let cache = tokens.slice(0); - let str = ''; - for (let j = i; j > 0; j--) { - let type = cache[j][0]; - if (str.trim().indexOf('!') === 0 && type !== 'space') { - break - } - str = cache.pop()[1] + str; - } - if (str.trim().indexOf('!') === 0) { - node.important = true; - node.raws.important = str; - tokens = cache; - } - } - - if (token[0] !== 'space' && token[0] !== 'comment') { - break - } - } - - let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment'); - this.raw(node, 'value', tokens); - if (hasWord) { - node.raws.between += firstSpaces; - } else { - node.value = firstSpaces + node.value; - } - - if (node.value.includes(':') && !customProperty) { - this.checkMissedSemicolon(tokens); - } - } - - atrule(token) { - let node = new atRule(); - node.name = token[1].slice(1); - if (node.name === '') { - this.unnamedAtrule(node, token); - } - this.init(node, token[2]); - - let type; - let prev; - let shift; - let last = false; - let open = false; - let params = []; - let brackets = []; - - while (!this.tokenizer.endOfFile()) { - token = this.tokenizer.nextToken(); - type = token[0]; - - if (type === '(' || type === '[') { - brackets.push(type === '(' ? ')' : ']'); - } else if (type === '{' && brackets.length > 0) { - brackets.push('}'); - } else if (type === brackets[brackets.length - 1]) { - brackets.pop(); - } - - if (brackets.length === 0) { - if (type === ';') { - node.source.end = this.getPosition(token[2]); - this.semicolon = true; - break - } else if (type === '{') { - open = true; - break - } else if (type === '}') { - if (params.length > 0) { - shift = params.length - 1; - prev = params[shift]; - while (prev && prev[0] === 'space') { - prev = params[--shift]; - } - if (prev) { - node.source.end = this.getPosition(prev[3] || prev[2]); - } - } - this.end(token); - break - } else { - params.push(token); - } - } else { - params.push(token); - } - - if (this.tokenizer.endOfFile()) { - last = true; - break - } - } - - node.raws.between = this.spacesAndCommentsFromEnd(params); - if (params.length) { - node.raws.afterName = this.spacesAndCommentsFromStart(params); - this.raw(node, 'params', params); - if (last) { - token = params[params.length - 1]; - node.source.end = this.getPosition(token[3] || token[2]); - this.spaces = node.raws.between; - node.raws.between = ''; - } - } else { - node.raws.afterName = ''; - node.params = ''; - } - - if (open) { - node.nodes = []; - this.current = node; - } - } - - end(token) { - if (this.current.nodes && this.current.nodes.length) { - this.current.raws.semicolon = this.semicolon; - } - this.semicolon = false; - - this.current.raws.after = (this.current.raws.after || '') + this.spaces; - this.spaces = ''; - - if (this.current.parent) { - this.current.source.end = this.getPosition(token[2]); - this.current = this.current.parent; - } else { - this.unexpectedClose(token); - } - } - - endFile() { - if (this.current.parent) this.unclosedBlock(); - if (this.current.nodes && this.current.nodes.length) { - this.current.raws.semicolon = this.semicolon; - } - this.current.raws.after = (this.current.raws.after || '') + this.spaces; - } - - freeSemicolon(token) { - this.spaces += token[1]; - if (this.current.nodes) { - let prev = this.current.nodes[this.current.nodes.length - 1]; - if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) { - prev.raws.ownSemicolon = this.spaces; - this.spaces = ''; - } - } - } - - // Helpers - - getPosition(offset) { - let pos = this.input.fromOffset(offset); - return { - offset, - line: pos.line, - column: pos.col - } - } - - init(node, offset) { - this.current.push(node); - node.source = { - start: this.getPosition(offset), - input: this.input - }; - node.raws.before = this.spaces; - this.spaces = ''; - if (node.type !== 'comment') this.semicolon = false; - } - - raw(node, prop, tokens) { - let token, type; - let length = tokens.length; - let value = ''; - let clean = true; - let next, prev; - let pattern = /^([#.|])?(\w)+/i; - - for (let i = 0; i < length; i += 1) { - token = tokens[i]; - type = token[0]; - - if (type === 'comment' && node.type === 'rule') { - prev = tokens[i - 1]; - next = tokens[i + 1]; - - if ( - prev[0] !== 'space' && - next[0] !== 'space' && - pattern.test(prev[1]) && - pattern.test(next[1]) - ) { - value += token[1]; - } else { - clean = false; - } - - continue - } - - if (type === 'comment' || (type === 'space' && i === length - 1)) { - clean = false; - } else { - value += token[1]; - } - } - if (!clean) { - let raw = tokens.reduce((all, i) => all + i[1], ''); - node.raws[prop] = { value, raw }; - } - node[prop] = value; - } - - spacesAndCommentsFromEnd(tokens) { - let lastTokenType; - let spaces = ''; - while (tokens.length) { - lastTokenType = tokens[tokens.length - 1][0]; - if (lastTokenType !== 'space' && lastTokenType !== 'comment') break - spaces = tokens.pop()[1] + spaces; - } - return spaces - } - - spacesAndCommentsFromStart(tokens) { - let next; - let spaces = ''; - while (tokens.length) { - next = tokens[0][0]; - if (next !== 'space' && next !== 'comment') break - spaces += tokens.shift()[1]; - } - return spaces - } - - spacesFromEnd(tokens) { - let lastTokenType; - let spaces = ''; - while (tokens.length) { - lastTokenType = tokens[tokens.length - 1][0]; - if (lastTokenType !== 'space') break - spaces = tokens.pop()[1] + spaces; - } - return spaces - } - - stringFrom(tokens, from) { - let result = ''; - for (let i = from; i < tokens.length; i++) { - result += tokens[i][1]; - } - tokens.splice(from, tokens.length - from); - return result - } - - colon(tokens) { - let brackets = 0; - let token, type, prev; - for (let [i, element] of tokens.entries()) { - token = element; - type = token[0]; - - if (type === '(') { - brackets += 1; - } - if (type === ')') { - brackets -= 1; - } - if (brackets === 0 && type === ':') { - if (!prev) { - this.doubleColon(token); - } else if (prev[0] === 'word' && prev[1] === 'progid') { - continue - } else { - return i - } - } - - prev = token; - } - return false - } - - // Errors - - unclosedBracket(bracket) { - throw this.input.error( - 'Unclosed bracket', - { offset: bracket[2] }, - { offset: bracket[2] + 1 } - ) - } - - unknownWord(tokens) { - throw this.input.error( - 'Unknown word', - { offset: tokens[0][2] }, - { offset: tokens[0][2] + tokens[0][1].length } - ) - } - - unexpectedClose(token) { - throw this.input.error( - 'Unexpected }', - { offset: token[2] }, - { offset: token[2] + 1 } - ) - } - - unclosedBlock() { - let pos = this.current.source.start; - throw this.input.error('Unclosed block', pos.line, pos.column) - } - - doubleColon(token) { - throw this.input.error( - 'Double colon', - { offset: token[2] }, - { offset: token[2] + token[1].length } - ) - } - - unnamedAtrule(node, token) { - throw this.input.error( - 'At-rule without name', - { offset: token[2] }, - { offset: token[2] + token[1].length } - ) - } - - precheckMissedSemicolon(/* tokens */) { - // Hook for Safe Parser - } - - checkMissedSemicolon(tokens) { - let colon = this.colon(tokens); - if (colon === false) return - - let founded = 0; - let token; - for (let j = colon - 1; j >= 0; j--) { - token = tokens[j]; - if (token[0] !== 'space') { - founded += 1; - if (founded === 2) break - } - } - // If the token is a word, e.g. `!important`, `red` or any other valid property's value. - // Then we need to return the colon after that word token. [3] is the "end" colon of that word. - // And because we need it after that one we do +1 to get the next one. - throw this.input.error( - 'Missed semicolon', - token[0] === 'word' ? token[3] + 1 : token[2] - ) - } -} - -var parser = Parser$1; - -function parse$6(css, opts) { - let input$1 = new input(css, opts); - let parser$1 = new parser(input$1); - try { - parser$1.parse(); - } catch (e) { - { - if (e.name === 'CssSyntaxError' && opts && opts.from) { - if (/\.scss$/i.test(opts.from)) { - e.message += - '\nYou tried to parse SCSS with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-scss parser'; - } else if (/\.sass/i.test(opts.from)) { - e.message += - '\nYou tried to parse Sass with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-sass parser'; - } else if (/\.less$/i.test(opts.from)) { - e.message += - '\nYou tried to parse Less with ' + - 'the standard CSS parser; ' + - 'try again with the postcss-less parser'; - } - } - } - throw e - } - - return parser$1.root -} - -var parse_1$1 = parse$6; -parse$6.default = parse$6; - -container.registerParse(parse$6); - -let { isClean: isClean$3, my: my$3 } = symbols; - - - - - - - - - -const TYPE_TO_CLASS_NAME = { - document: 'Document', - root: 'Root', - atrule: 'AtRule', - rule: 'Rule', - decl: 'Declaration', - comment: 'Comment' -}; - -const PLUGIN_PROPS = { - postcssPlugin: true, - prepare: true, - Once: true, - Document: true, - Root: true, - Declaration: true, - Rule: true, - AtRule: true, - Comment: true, - DeclarationExit: true, - RuleExit: true, - AtRuleExit: true, - CommentExit: true, - RootExit: true, - DocumentExit: true, - OnceExit: true -}; - -const NOT_VISITORS = { - postcssPlugin: true, - prepare: true, - Once: true -}; - -const CHILDREN = 0; - -function isPromise(obj) { - return typeof obj === 'object' && typeof obj.then === 'function' -} - -function getEvents(node) { - let key = false; - let type = TYPE_TO_CLASS_NAME[node.type]; - if (node.type === 'decl') { - key = node.prop.toLowerCase(); - } else if (node.type === 'atrule') { - key = node.name.toLowerCase(); - } - - if (key && node.append) { - return [ - type, - type + '-' + key, - CHILDREN, - type + 'Exit', - type + 'Exit-' + key - ] - } else if (key) { - return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key] - } else if (node.append) { - return [type, CHILDREN, type + 'Exit'] - } else { - return [type, type + 'Exit'] - } -} - -function toStack(node) { - let events; - if (node.type === 'document') { - events = ['Document', CHILDREN, 'DocumentExit']; - } else if (node.type === 'root') { - events = ['Root', CHILDREN, 'RootExit']; - } else { - events = getEvents(node); - } - - return { - node, - events, - eventIndex: 0, - visitors: [], - visitorIndex: 0, - iterator: 0 - } -} - -function cleanMarks(node) { - node[isClean$3] = false; - if (node.nodes) node.nodes.forEach(i => cleanMarks(i)); - return node -} - -let postcss = {}; - -class LazyResult$2 { - constructor(processor, css, opts) { - this.stringified = false; - this.processed = false; - - let root; - if ( - typeof css === 'object' && - css !== null && - (css.type === 'root' || css.type === 'document') - ) { - root = cleanMarks(css); - } else if (css instanceof LazyResult$2 || css instanceof result) { - root = cleanMarks(css.root); - if (css.map) { - if (typeof opts.map === 'undefined') opts.map = {}; - if (!opts.map.inline) opts.map.inline = false; - opts.map.prev = css.map; - } - } else { - let parser = parse_1$1; - if (opts.syntax) parser = opts.syntax.parse; - if (opts.parser) parser = opts.parser; - if (parser.parse) parser = parser.parse; - - try { - root = parser(css, opts); - } catch (error) { - this.processed = true; - this.error = error; - } - - if (root && !root[my$3]) { - /* c8 ignore next 2 */ - container.rebuild(root); - } - } - - this.result = new result(processor, root, opts); - this.helpers = { ...postcss, result: this.result, postcss }; - this.plugins = this.processor.plugins.map(plugin => { - if (typeof plugin === 'object' && plugin.prepare) { - return { ...plugin, ...plugin.prepare(this.result) } - } else { - return plugin - } - }); - } - - get [Symbol.toStringTag]() { - return 'LazyResult' - } - - get processor() { - return this.result.processor - } - - get opts() { - return this.result.opts - } - - get css() { - return this.stringify().css - } - - get content() { - return this.stringify().content - } - - get map() { - return this.stringify().map - } - - get root() { - return this.sync().root - } - - get messages() { - return this.sync().messages - } - - warnings() { - return this.sync().warnings() - } - - toString() { - return this.css - } - - then(onFulfilled, onRejected) { - { - if (!('from' in this.opts)) { - warnOnce$2( - 'Without `from` option PostCSS could generate wrong source map ' + - 'and will not find Browserslist config. Set it to CSS file path ' + - 'or to `undefined` to prevent this warning.' - ); - } - } - return this.async().then(onFulfilled, onRejected) - } - - catch(onRejected) { - return this.async().catch(onRejected) - } - - finally(onFinally) { - return this.async().then(onFinally, onFinally) - } - - async() { - if (this.error) return Promise.reject(this.error) - if (this.processed) return Promise.resolve(this.result) - if (!this.processing) { - this.processing = this.runAsync(); - } - return this.processing - } - - sync() { - if (this.error) throw this.error - if (this.processed) return this.result - this.processed = true; - - if (this.processing) { - throw this.getAsyncError() - } - - for (let plugin of this.plugins) { - let promise = this.runOnRoot(plugin); - if (isPromise(promise)) { - throw this.getAsyncError() - } - } - - this.prepareVisitors(); - if (this.hasListener) { - let root = this.result.root; - while (!root[isClean$3]) { - root[isClean$3] = true; - this.walkSync(root); - } - if (this.listeners.OnceExit) { - if (root.type === 'document') { - for (let subRoot of root.nodes) { - this.visitSync(this.listeners.OnceExit, subRoot); - } - } else { - this.visitSync(this.listeners.OnceExit, root); - } - } - } - - return this.result - } - - stringify() { - if (this.error) throw this.error - if (this.stringified) return this.result - this.stringified = true; - - this.sync(); - - let opts = this.result.opts; - let str = stringify_1; - if (opts.syntax) str = opts.syntax.stringify; - if (opts.stringifier) str = opts.stringifier; - if (str.stringify) str = str.stringify; - - let map = new mapGenerator(str, this.result.root, this.result.opts); - let data = map.generate(); - this.result.css = data[0]; - this.result.map = data[1]; - - return this.result - } - - walkSync(node) { - node[isClean$3] = true; - let events = getEvents(node); - for (let event of events) { - if (event === CHILDREN) { - if (node.nodes) { - node.each(child => { - if (!child[isClean$3]) this.walkSync(child); - }); - } - } else { - let visitors = this.listeners[event]; - if (visitors) { - if (this.visitSync(visitors, node.toProxy())) return - } - } - } - } - - visitSync(visitors, node) { - for (let [plugin, visitor] of visitors) { - this.result.lastPlugin = plugin; - let promise; - try { - promise = visitor(node, this.helpers); - } catch (e) { - throw this.handleError(e, node.proxyOf) - } - if (node.type !== 'root' && node.type !== 'document' && !node.parent) { - return true - } - if (isPromise(promise)) { - throw this.getAsyncError() - } - } - } - - runOnRoot(plugin) { - this.result.lastPlugin = plugin; - try { - if (typeof plugin === 'object' && plugin.Once) { - if (this.result.root.type === 'document') { - let roots = this.result.root.nodes.map(root => - plugin.Once(root, this.helpers) - ); - - if (isPromise(roots[0])) { - return Promise.all(roots) - } - - return roots - } - - return plugin.Once(this.result.root, this.helpers) - } else if (typeof plugin === 'function') { - return plugin(this.result.root, this.result) - } - } catch (error) { - throw this.handleError(error) - } - } - - getAsyncError() { - throw new Error('Use process(css).then(cb) to work with async plugins') - } - - handleError(error, node) { - let plugin = this.result.lastPlugin; - try { - if (node) node.addToError(error); - this.error = error; - if (error.name === 'CssSyntaxError' && !error.plugin) { - error.plugin = plugin.postcssPlugin; - error.setMessage(); - } else if (plugin.postcssVersion) { - if (({}).NODE_ENV !== 'production') { - let pluginName = plugin.postcssPlugin; - let pluginVer = plugin.postcssVersion; - let runtimeVer = this.result.processor.version; - let a = pluginVer.split('.'); - let b = runtimeVer.split('.'); - - if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { - // eslint-disable-next-line no-console - console.error( - 'Unknown error from PostCSS plugin. Your current PostCSS ' + - 'version is ' + - runtimeVer + - ', but ' + - pluginName + - ' uses ' + - pluginVer + - '. Perhaps this is the source of the error below.' - ); - } - } - } - } catch (err) { - /* c8 ignore next 3 */ - // eslint-disable-next-line no-console - if (console && console.error) console.error(err); - } - return error - } - - async runAsync() { - this.plugin = 0; - for (let i = 0; i < this.plugins.length; i++) { - let plugin = this.plugins[i]; - let promise = this.runOnRoot(plugin); - if (isPromise(promise)) { - try { - await promise; - } catch (error) { - throw this.handleError(error) - } - } - } - - this.prepareVisitors(); - if (this.hasListener) { - let root = this.result.root; - while (!root[isClean$3]) { - root[isClean$3] = true; - let stack = [toStack(root)]; - while (stack.length > 0) { - let promise = this.visitTick(stack); - if (isPromise(promise)) { - try { - await promise; - } catch (e) { - let node = stack[stack.length - 1].node; - throw this.handleError(e, node) - } - } - } - } - - if (this.listeners.OnceExit) { - for (let [plugin, visitor] of this.listeners.OnceExit) { - this.result.lastPlugin = plugin; - try { - if (root.type === 'document') { - let roots = root.nodes.map(subRoot => - visitor(subRoot, this.helpers) - ); - - await Promise.all(roots); - } else { - await visitor(root, this.helpers); - } - } catch (e) { - throw this.handleError(e) - } - } - } - } - - this.processed = true; - return this.stringify() - } - - prepareVisitors() { - this.listeners = {}; - let add = (plugin, type, cb) => { - if (!this.listeners[type]) this.listeners[type] = []; - this.listeners[type].push([plugin, cb]); - }; - for (let plugin of this.plugins) { - if (typeof plugin === 'object') { - for (let event in plugin) { - if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { - throw new Error( - `Unknown event ${event} in ${plugin.postcssPlugin}. ` + - `Try to update PostCSS (${this.processor.version} now).` - ) - } - if (!NOT_VISITORS[event]) { - if (typeof plugin[event] === 'object') { - for (let filter in plugin[event]) { - if (filter === '*') { - add(plugin, event, plugin[event][filter]); - } else { - add( - plugin, - event + '-' + filter.toLowerCase(), - plugin[event][filter] - ); - } - } - } else if (typeof plugin[event] === 'function') { - add(plugin, event, plugin[event]); - } - } - } - } - } - this.hasListener = Object.keys(this.listeners).length > 0; - } - - visitTick(stack) { - let visit = stack[stack.length - 1]; - let { node, visitors } = visit; - - if (node.type !== 'root' && node.type !== 'document' && !node.parent) { - stack.pop(); - return - } - - if (visitors.length > 0 && visit.visitorIndex < visitors.length) { - let [plugin, visitor] = visitors[visit.visitorIndex]; - visit.visitorIndex += 1; - if (visit.visitorIndex === visitors.length) { - visit.visitors = []; - visit.visitorIndex = 0; - } - this.result.lastPlugin = plugin; - try { - return visitor(node.toProxy(), this.helpers) - } catch (e) { - throw this.handleError(e, node) - } - } - - if (visit.iterator !== 0) { - let iterator = visit.iterator; - let child; - while ((child = node.nodes[node.indexes[iterator]])) { - node.indexes[iterator] += 1; - if (!child[isClean$3]) { - child[isClean$3] = true; - stack.push(toStack(child)); - return - } - } - visit.iterator = 0; - delete node.indexes[iterator]; - } - - let events = visit.events; - while (visit.eventIndex < events.length) { - let event = events[visit.eventIndex]; - visit.eventIndex += 1; - if (event === CHILDREN) { - if (node.nodes && node.nodes.length) { - node[isClean$3] = true; - visit.iterator = node.getIterator(); - } - return - } else if (this.listeners[event]) { - visit.visitors = this.listeners[event]; - return - } - } - stack.pop(); - } -} - -LazyResult$2.registerPostcss = dependant => { - postcss = dependant; -}; - -var lazyResult = LazyResult$2; -LazyResult$2.default = LazyResult$2; - -root.registerLazyResult(LazyResult$2); -document.registerLazyResult(LazyResult$2); - -class NoWorkResult { - constructor(processor, css, opts) { - css = css.toString(); - this.stringified = false; - - this._processor = processor; - this._css = css; - this._opts = opts; - this._map = undefined; - let root; - - let str = stringify_1; - this.result = new result(this._processor, root, this._opts); - this.result.css = css; - - let self = this; - Object.defineProperty(this.result, 'root', { - get() { - return self.root - } - }); - - let map = new mapGenerator(str, root, this._opts, css); - if (map.isMap()) { - let [generatedCSS, generatedMap] = map.generate(); - if (generatedCSS) { - this.result.css = generatedCSS; - } - if (generatedMap) { - this.result.map = generatedMap; - } - } - } - - get [Symbol.toStringTag]() { - return 'NoWorkResult' - } - - get processor() { - return this.result.processor - } - - get opts() { - return this.result.opts - } - - get css() { - return this.result.css - } - - get content() { - return this.result.css - } - - get map() { - return this.result.map - } - - get root() { - if (this._root) { - return this._root - } - - let root; - let parser = parse_1$1; - - try { - root = parser(this._css, this._opts); - } catch (error) { - this.error = error; - } - - this._root = root; - - return root - } - - get messages() { - return [] - } - - warnings() { - return [] - } - - toString() { - return this._css - } - - then(onFulfilled, onRejected) { - { - if (!('from' in this._opts)) { - warnOnce$2( - 'Without `from` option PostCSS could generate wrong source map ' + - 'and will not find Browserslist config. Set it to CSS file path ' + - 'or to `undefined` to prevent this warning.' - ); - } - } - - return this.async().then(onFulfilled, onRejected) - } - - catch(onRejected) { - return this.async().catch(onRejected) - } - - finally(onFinally) { - return this.async().then(onFinally, onFinally) - } - - async() { - if (this.error) return Promise.reject(this.error) - return Promise.resolve(this.result) - } - - sync() { - if (this.error) throw this.error - return this.result - } -} - -var noWorkResult = NoWorkResult; -NoWorkResult.default = NoWorkResult; - -class Processor$2 { - constructor(plugins = []) { - this.version = '8.4.4'; - this.plugins = this.normalize(plugins); - } - - use(plugin) { - this.plugins = this.plugins.concat(this.normalize([plugin])); - return this - } - - process(css, opts = {}) { - if ( - this.plugins.length === 0 && - typeof opts.parser === 'undefined' && - typeof opts.stringifier === 'undefined' && - typeof opts.syntax === 'undefined' - ) { - return new noWorkResult(this, css, opts) - } else { - return new lazyResult(this, css, opts) - } - } - - normalize(plugins) { - let normalized = []; - for (let i of plugins) { - if (i.postcss === true) { - i = i(); - } else if (i.postcss) { - i = i.postcss; - } - - if (typeof i === 'object' && Array.isArray(i.plugins)) { - normalized = normalized.concat(i.plugins); - } else if (typeof i === 'object' && i.postcssPlugin) { - normalized.push(i); - } else if (typeof i === 'function') { - normalized.push(i); - } else if (typeof i === 'object' && (i.parse || i.stringify)) { - { - throw new Error( - 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' + - 'one of the syntax/parser/stringifier options as outlined ' + - 'in your PostCSS runner documentation.' - ) - } - } else { - throw new Error(i + ' is not a PostCSS plugin') - } - } - return normalized - } -} - -var processor = Processor$2; -Processor$2.default = Processor$2; - -root.registerProcessor(Processor$2); -document.registerProcessor(Processor$2); - -function fromJSON(json, inputs) { - if (Array.isArray(json)) return json.map(n => fromJSON(n)) - - let { inputs: ownInputs, ...defaults } = json; - if (ownInputs) { - inputs = []; - for (let input$1 of ownInputs) { - let inputHydrated = { ...input$1, __proto__: input.prototype }; - if (inputHydrated.map) { - inputHydrated.map = { - ...inputHydrated.map, - __proto__: previousMap.prototype - }; - } - inputs.push(inputHydrated); - } - } - if (defaults.nodes) { - defaults.nodes = json.nodes.map(n => fromJSON(n, inputs)); - } - if (defaults.source) { - let { inputId, ...source } = defaults.source; - defaults.source = source; - if (inputId != null) { - defaults.source.input = inputs[inputId]; - } - } - if (defaults.type === 'root') { - return new root(defaults) - } else if (defaults.type === 'decl') { - return new declaration(defaults) - } else if (defaults.type === 'rule') { - return new rule(defaults) - } else if (defaults.type === 'comment') { - return new comment(defaults) - } else if (defaults.type === 'atrule') { - return new atRule(defaults) - } else { - throw new Error('Unknown node type: ' + json.type) - } -} - -var fromJSON_1 = fromJSON; -fromJSON.default = fromJSON; - -function postcss$1(...plugins) { - if (plugins.length === 1 && Array.isArray(plugins[0])) { - plugins = plugins[0]; - } - return new processor(plugins) -} - -postcss$1.plugin = function plugin(name, initializer) { - // eslint-disable-next-line no-console - if (console && console.warn) { - // eslint-disable-next-line no-console - console.warn( - name + - ': postcss.plugin was deprecated. Migration guide:\n' + - 'https://evilmartians.com/chronicles/postcss-8-plugin-migration' - ); - } - function creator(...args) { - let transformer = initializer(...args); - transformer.postcssPlugin = name; - transformer.postcssVersion = new processor().version; - return transformer - } - - let cache; - Object.defineProperty(creator, 'postcss', { - get() { - if (!cache) cache = creator(); - return cache - } - }); - - creator.process = function (css, processOpts, pluginOpts) { - return postcss$1([creator(pluginOpts)]).process(css, processOpts) - }; - - return creator -}; - -postcss$1.stringify = stringify_1; -postcss$1.parse = parse_1$1; -postcss$1.fromJSON = fromJSON_1; -postcss$1.list = list_1; - -postcss$1.comment = defaults => new comment(defaults); -postcss$1.atRule = defaults => new atRule(defaults); -postcss$1.decl = defaults => new declaration(defaults); -postcss$1.rule = defaults => new rule(defaults); -postcss$1.root = defaults => new root(defaults); -postcss$1.document = defaults => new document(defaults); - -postcss$1.CssSyntaxError = cssSyntaxError; -postcss$1.Declaration = declaration; -postcss$1.Container = container; -postcss$1.Processor = processor; -postcss$1.Document = document; -postcss$1.Comment = comment; -postcss$1.Warning = warning; -postcss$1.AtRule = atRule; -postcss$1.Result = result; -postcss$1.Input = input; -postcss$1.Rule = rule; -postcss$1.Root = root; -postcss$1.Node = node_1; - -lazyResult.registerPostcss(postcss$1); - -var postcss_1 = postcss$1; -postcss$1.default = postcss$1; - -const trimPlugin = () => { - return { - postcssPlugin: 'vue-sfc-trim', - Once(root) { - root.walk(({ type, raws }) => { - if (type === 'rule' || type === 'atrule') { - if (raws.before) - raws.before = '\n'; - if ('after' in raws && raws.after) - raws.after = '\n'; - } - }); - } - }; -}; -trimPlugin.postcss = true; - -var unesc_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = unesc; - -// Many thanks for this post which made this migration much easier. -// https://mathiasbynens.be/notes/css-escapes - -/** - * - * @param {string} str - * @returns {[string, number]|undefined} - */ -function gobbleHex(str) { - var lower = str.toLowerCase(); - var hex = ''; - var spaceTerminated = false; - - for (var i = 0; i < 6 && lower[i] !== undefined; i++) { - var code = lower.charCodeAt(i); // check to see if we are dealing with a valid hex char [a-f|0-9] - - var valid = code >= 97 && code <= 102 || code >= 48 && code <= 57; // https://drafts.csswg.org/css-syntax/#consume-escaped-code-point - - spaceTerminated = code === 32; - - if (!valid) { - break; - } - - hex += lower[i]; - } - - if (hex.length === 0) { - return undefined; - } - - var codePoint = parseInt(hex, 16); - var isSurrogate = codePoint >= 0xD800 && codePoint <= 0xDFFF; // Add special case for - // "If this number is zero, or is for a surrogate, or is greater than the maximum allowed code point" - // https://drafts.csswg.org/css-syntax/#maximum-allowed-code-point - - if (isSurrogate || codePoint === 0x0000 || codePoint > 0x10FFFF) { - return ["\uFFFD", hex.length + (spaceTerminated ? 1 : 0)]; - } - - return [String.fromCodePoint(codePoint), hex.length + (spaceTerminated ? 1 : 0)]; -} - -var CONTAINS_ESCAPE = /\\/; - -function unesc(str) { - var needToProcess = CONTAINS_ESCAPE.test(str); - - if (!needToProcess) { - return str; - } - - var ret = ""; - - for (var i = 0; i < str.length; i++) { - if (str[i] === "\\") { - var gobbled = gobbleHex(str.slice(i + 1, i + 7)); - - if (gobbled !== undefined) { - ret += gobbled[0]; - i += gobbled[1]; - continue; - } // Retain a pair of \\ if double escaped `\\\\` - // https://github.com/postcss/postcss-selector-parser/commit/268c9a7656fb53f543dc620aa5b73a30ec3ff20e - - - if (str[i + 1] === "\\") { - ret += "\\"; - i++; - continue; - } // if \\ is at the end of the string retain it - // https://github.com/postcss/postcss-selector-parser/commit/01a6b346e3612ce1ab20219acc26abdc259ccefb - - - if (str.length === i + 1) { - ret += str[i]; - } - - continue; - } - - ret += str[i]; - } - - return ret; -} - -module.exports = exports.default; -}); - -var getProp_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = getProp; - -function getProp(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - - while (props.length > 0) { - var prop = props.shift(); - - if (!obj[prop]) { - return undefined; - } - - obj = obj[prop]; - } - - return obj; -} - -module.exports = exports.default; -}); - -var ensureObject_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = ensureObject; - -function ensureObject(obj) { - for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - props[_key - 1] = arguments[_key]; - } - - while (props.length > 0) { - var prop = props.shift(); - - if (!obj[prop]) { - obj[prop] = {}; - } - - obj = obj[prop]; - } -} - -module.exports = exports.default; -}); - -var stripComments_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = stripComments; - -function stripComments(str) { - var s = ""; - var commentStart = str.indexOf("/*"); - var lastEnd = 0; - - while (commentStart >= 0) { - s = s + str.slice(lastEnd, commentStart); - var commentEnd = str.indexOf("*/", commentStart + 2); - - if (commentEnd < 0) { - return s; - } - - lastEnd = commentEnd + 2; - commentStart = str.indexOf("/*", lastEnd); - } - - s = s + str.slice(lastEnd); - return s; -} - -module.exports = exports.default; -}); - -var util$2 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.stripComments = exports.ensureObject = exports.getProp = exports.unesc = void 0; - -var _unesc = _interopRequireDefault(unesc_1); - -exports.unesc = _unesc["default"]; - -var _getProp = _interopRequireDefault(getProp_1); - -exports.getProp = _getProp["default"]; - -var _ensureObject = _interopRequireDefault(ensureObject_1); - -exports.ensureObject = _ensureObject["default"]; - -var _stripComments = _interopRequireDefault(stripComments_1); - -exports.stripComments = _stripComments["default"]; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -}); - -var node = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - - - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var cloneNode = function cloneNode(obj, parent) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - var cloned = new obj.constructor(); - - for (var i in obj) { - if (!obj.hasOwnProperty(i)) { - continue; - } - - var value = obj[i]; - var type = typeof value; - - if (i === 'parent' && type === 'object') { - if (parent) { - cloned[i] = parent; - } - } else if (value instanceof Array) { - cloned[i] = value.map(function (j) { - return cloneNode(j, cloned); - }); - } else { - cloned[i] = cloneNode(value, cloned); - } - } - - return cloned; -}; - -var Node = /*#__PURE__*/function () { - function Node(opts) { - if (opts === void 0) { - opts = {}; - } - - Object.assign(this, opts); - this.spaces = this.spaces || {}; - this.spaces.before = this.spaces.before || ''; - this.spaces.after = this.spaces.after || ''; - } - - var _proto = Node.prototype; - - _proto.remove = function remove() { - if (this.parent) { - this.parent.removeChild(this); - } - - this.parent = undefined; - return this; - }; - - _proto.replaceWith = function replaceWith() { - if (this.parent) { - for (var index in arguments) { - this.parent.insertBefore(this, arguments[index]); - } - - this.remove(); - } - - return this; - }; - - _proto.next = function next() { - return this.parent.at(this.parent.index(this) + 1); - }; - - _proto.prev = function prev() { - return this.parent.at(this.parent.index(this) - 1); - }; - - _proto.clone = function clone(overrides) { - if (overrides === void 0) { - overrides = {}; - } - - var cloned = cloneNode(this); - - for (var name in overrides) { - cloned[name] = overrides[name]; - } - - return cloned; - } - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows non standard syntax to be appended to an existing property - * by specifying the escaped value. By specifying the escaped value, - * illegal characters are allowed to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped optional. the escaped value of the property. - */ - ; - - _proto.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - - var originalValue = this[name]; - var originalEscaped = this.raws[name]; - this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first. - - if (originalEscaped || valueEscaped !== value) { - this.raws[name] = (originalEscaped || originalValue) + valueEscaped; - } else { - delete this.raws[name]; // delete any escaped value that was created by the setter. - } - } - /** - * Some non-standard syntax doesn't follow normal escaping rules for css. - * This allows the escaped value to be specified directly, allowing illegal - * characters to be directly inserted into css output. - * @param {string} name the property to set - * @param {any} value the unescaped value of the property - * @param {string} valueEscaped the escaped value of the property. - */ - ; - - _proto.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) { - if (!this.raws) { - this.raws = {}; - } - - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - - this.raws[name] = valueEscaped; - } - /** - * When you want a value to passed through to CSS directly. This method - * deletes the corresponding raw value causing the stringifier to fallback - * to the unescaped value. - * @param {string} name the property to set. - * @param {any} value The value that is both escaped and unescaped. - */ - ; - - _proto.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) { - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first. - - if (this.raws) { - delete this.raws[name]; - } - } - /** - * - * @param {number} line The number (starting with 1) - * @param {number} column The column number (starting with 1) - */ - ; - - _proto.isAtPosition = function isAtPosition(line, column) { - if (this.source && this.source.start && this.source.end) { - if (this.source.start.line > line) { - return false; - } - - if (this.source.end.line < line) { - return false; - } - - if (this.source.start.line === line && this.source.start.column > column) { - return false; - } - - if (this.source.end.line === line && this.source.end.column < column) { - return false; - } - - return true; - } - - return undefined; - }; - - _proto.stringifyProperty = function stringifyProperty(name) { - return this.raws && this.raws[name] || this[name]; - }; - - _proto.valueToString = function valueToString() { - return String(this.stringifyProperty("value")); - }; - - _proto.toString = function toString() { - return [this.rawSpaceBefore, this.valueToString(), this.rawSpaceAfter].join(''); - }; - - _createClass(Node, [{ - key: "rawSpaceBefore", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before; - - if (rawSpace === undefined) { - rawSpace = this.spaces && this.spaces.before; - } - - return rawSpace || ""; - }, - set: function set(raw) { - (0, util$2.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.before = raw; - } - }, { - key: "rawSpaceAfter", - get: function get() { - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after; - - if (rawSpace === undefined) { - rawSpace = this.spaces.after; - } - - return rawSpace || ""; - }, - set: function set(raw) { - (0, util$2.ensureObject)(this, "raws", "spaces"); - this.raws.spaces.after = raw; - } - }]); - - return Node; -}(); - -exports["default"] = Node; -module.exports = exports.default; -}); - -var types$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.UNIVERSAL = exports.ATTRIBUTE = exports.CLASS = exports.COMBINATOR = exports.COMMENT = exports.ID = exports.NESTING = exports.PSEUDO = exports.ROOT = exports.SELECTOR = exports.STRING = exports.TAG = void 0; -var TAG = 'tag'; -exports.TAG = TAG; -var STRING = 'string'; -exports.STRING = STRING; -var SELECTOR = 'selector'; -exports.SELECTOR = SELECTOR; -var ROOT = 'root'; -exports.ROOT = ROOT; -var PSEUDO = 'pseudo'; -exports.PSEUDO = PSEUDO; -var NESTING = 'nesting'; -exports.NESTING = NESTING; -var ID = 'id'; -exports.ID = ID; -var COMMENT = 'comment'; -exports.COMMENT = COMMENT; -var COMBINATOR = 'combinator'; -exports.COMBINATOR = COMBINATOR; -var CLASS = 'class'; -exports.CLASS = CLASS; -var ATTRIBUTE = 'attribute'; -exports.ATTRIBUTE = ATTRIBUTE; -var UNIVERSAL = 'universal'; -exports.UNIVERSAL = UNIVERSAL; -}); - -var container$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - -var types = _interopRequireWildcard(types$1); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Container = /*#__PURE__*/function (_Node) { - _inheritsLoose(Container, _Node); - - function Container(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - - if (!_this.nodes) { - _this.nodes = []; - } - - return _this; - } - - var _proto = Container.prototype; - - _proto.append = function append(selector) { - selector.parent = this; - this.nodes.push(selector); - return this; - }; - - _proto.prepend = function prepend(selector) { - selector.parent = this; - this.nodes.unshift(selector); - return this; - }; - - _proto.at = function at(index) { - return this.nodes[index]; - }; - - _proto.index = function index(child) { - if (typeof child === 'number') { - return child; - } - - return this.nodes.indexOf(child); - }; - - _proto.removeChild = function removeChild(child) { - child = this.index(child); - this.at(child).parent = undefined; - this.nodes.splice(child, 1); - var index; - - for (var id in this.indexes) { - index = this.indexes[id]; - - if (index >= child) { - this.indexes[id] = index - 1; - } - } - - return this; - }; - - _proto.removeAll = function removeAll() { - for (var _iterator = _createForOfIteratorHelperLoose(this.nodes), _step; !(_step = _iterator()).done;) { - var node = _step.value; - node.parent = undefined; - } - - this.nodes = []; - return this; - }; - - _proto.empty = function empty() { - return this.removeAll(); - }; - - _proto.insertAfter = function insertAfter(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex + 1, 0, newNode); - newNode.parent = this; - var index; - - for (var id in this.indexes) { - index = this.indexes[id]; - - if (oldIndex <= index) { - this.indexes[id] = index + 1; - } - } - - return this; - }; - - _proto.insertBefore = function insertBefore(oldNode, newNode) { - newNode.parent = this; - var oldIndex = this.index(oldNode); - this.nodes.splice(oldIndex, 0, newNode); - newNode.parent = this; - var index; - - for (var id in this.indexes) { - index = this.indexes[id]; - - if (index <= oldIndex) { - this.indexes[id] = index + 1; - } - } - - return this; - }; - - _proto._findChildAtPosition = function _findChildAtPosition(line, col) { - var found = undefined; - this.each(function (node) { - if (node.atPosition) { - var foundChild = node.atPosition(line, col); - - if (foundChild) { - found = foundChild; - return false; - } - } else if (node.isAtPosition(line, col)) { - found = node; - return false; - } - }); - return found; - } - /** - * Return the most specific node at the line and column number given. - * The source location is based on the original parsed location, locations aren't - * updated as selector nodes are mutated. - * - * Note that this location is relative to the location of the first character - * of the selector, and not the location of the selector in the overall document - * when used in conjunction with postcss. - * - * If not found, returns undefined. - * @param {number} line The line number of the node to find. (1-based index) - * @param {number} col The column number of the node to find. (1-based index) - */ - ; - - _proto.atPosition = function atPosition(line, col) { - if (this.isAtPosition(line, col)) { - return this._findChildAtPosition(line, col) || this; - } else { - return undefined; - } - }; - - _proto._inferEndPosition = function _inferEndPosition() { - if (this.last && this.last.source && this.last.source.end) { - this.source = this.source || {}; - this.source.end = this.source.end || {}; - Object.assign(this.source.end, this.last.source.end); - } - }; - - _proto.each = function each(callback) { - if (!this.lastEach) { - this.lastEach = 0; - } - - if (!this.indexes) { - this.indexes = {}; - } - - this.lastEach++; - var id = this.lastEach; - this.indexes[id] = 0; - - if (!this.length) { - return undefined; - } - - var index, result; - - while (this.indexes[id] < this.length) { - index = this.indexes[id]; - result = callback(this.at(index), index); - - if (result === false) { - break; - } - - this.indexes[id] += 1; - } - - delete this.indexes[id]; - - if (result === false) { - return false; - } - }; - - _proto.walk = function walk(callback) { - return this.each(function (node, i) { - var result = callback(node, i); - - if (result !== false && node.length) { - result = node.walk(callback); - } - - if (result === false) { - return false; - } - }); - }; - - _proto.walkAttributes = function walkAttributes(callback) { - var _this2 = this; - - return this.walk(function (selector) { - if (selector.type === types.ATTRIBUTE) { - return callback.call(_this2, selector); - } - }); - }; - - _proto.walkClasses = function walkClasses(callback) { - var _this3 = this; - - return this.walk(function (selector) { - if (selector.type === types.CLASS) { - return callback.call(_this3, selector); - } - }); - }; - - _proto.walkCombinators = function walkCombinators(callback) { - var _this4 = this; - - return this.walk(function (selector) { - if (selector.type === types.COMBINATOR) { - return callback.call(_this4, selector); - } - }); - }; - - _proto.walkComments = function walkComments(callback) { - var _this5 = this; - - return this.walk(function (selector) { - if (selector.type === types.COMMENT) { - return callback.call(_this5, selector); - } - }); - }; - - _proto.walkIds = function walkIds(callback) { - var _this6 = this; - - return this.walk(function (selector) { - if (selector.type === types.ID) { - return callback.call(_this6, selector); - } - }); - }; - - _proto.walkNesting = function walkNesting(callback) { - var _this7 = this; - - return this.walk(function (selector) { - if (selector.type === types.NESTING) { - return callback.call(_this7, selector); - } - }); - }; - - _proto.walkPseudos = function walkPseudos(callback) { - var _this8 = this; - - return this.walk(function (selector) { - if (selector.type === types.PSEUDO) { - return callback.call(_this8, selector); - } - }); - }; - - _proto.walkTags = function walkTags(callback) { - var _this9 = this; - - return this.walk(function (selector) { - if (selector.type === types.TAG) { - return callback.call(_this9, selector); - } - }); - }; - - _proto.walkUniversals = function walkUniversals(callback) { - var _this10 = this; - - return this.walk(function (selector) { - if (selector.type === types.UNIVERSAL) { - return callback.call(_this10, selector); - } - }); - }; - - _proto.split = function split(callback) { - var _this11 = this; - - var current = []; - return this.reduce(function (memo, node, index) { - var split = callback.call(_this11, node); - current.push(node); - - if (split) { - memo.push(current); - current = []; - } else if (index === _this11.length - 1) { - memo.push(current); - } - - return memo; - }, []); - }; - - _proto.map = function map(callback) { - return this.nodes.map(callback); - }; - - _proto.reduce = function reduce(callback, memo) { - return this.nodes.reduce(callback, memo); - }; - - _proto.every = function every(callback) { - return this.nodes.every(callback); - }; - - _proto.some = function some(callback) { - return this.nodes.some(callback); - }; - - _proto.filter = function filter(callback) { - return this.nodes.filter(callback); - }; - - _proto.sort = function sort(callback) { - return this.nodes.sort(callback); - }; - - _proto.toString = function toString() { - return this.map(String).join(''); - }; - - _createClass(Container, [{ - key: "first", - get: function get() { - return this.at(0); - } - }, { - key: "last", - get: function get() { - return this.at(this.length - 1); - } - }, { - key: "length", - get: function get() { - return this.nodes.length; - } - }]); - - return Container; -}(_node["default"]); - -exports["default"] = Container; -module.exports = exports.default; -}); - -var root$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _container = _interopRequireDefault(container$1); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Root = /*#__PURE__*/function (_Container) { - _inheritsLoose(Root, _Container); - - function Root(opts) { - var _this; - - _this = _Container.call(this, opts) || this; - _this.type = types$1.ROOT; - return _this; - } - - var _proto = Root.prototype; - - _proto.toString = function toString() { - var str = this.reduce(function (memo, selector) { - memo.push(String(selector)); - return memo; - }, []).join(','); - return this.trailingComma ? str + ',' : str; - }; - - _proto.error = function error(message, options) { - if (this._error) { - return this._error(message, options); - } else { - return new Error(message); - } - }; - - _createClass(Root, [{ - key: "errorGenerator", - set: function set(handler) { - this._error = handler; - } - }]); - - return Root; -}(_container["default"]); - -exports["default"] = Root; -module.exports = exports.default; -}); - -var selector = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _container = _interopRequireDefault(container$1); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Selector = /*#__PURE__*/function (_Container) { - _inheritsLoose(Selector, _Container); - - function Selector(opts) { - var _this; - - _this = _Container.call(this, opts) || this; - _this.type = types$1.SELECTOR; - return _this; - } - - return Selector; -}(_container["default"]); - -exports["default"] = Selector; -module.exports = exports.default; -}); - -/*! https://mths.be/cssesc v3.0.0 by @mathias */ - -var object = {}; -var hasOwnProperty$3 = object.hasOwnProperty; -var merge = function merge(options, defaults) { - if (!options) { - return defaults; - } - var result = {}; - for (var key in defaults) { - // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since - // only recognized option names are used. - result[key] = hasOwnProperty$3.call(options, key) ? options[key] : defaults[key]; - } - return result; -}; - -var regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/; -var regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/; -var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g; - -// https://mathiasbynens.be/notes/css-escapes#css -var cssesc = function cssesc(string, options) { - options = merge(options, cssesc.options); - if (options.quotes != 'single' && options.quotes != 'double') { - options.quotes = 'single'; - } - var quote = options.quotes == 'double' ? '"' : '\''; - var isIdentifier = options.isIdentifier; - - var firstChar = string.charAt(0); - var output = ''; - var counter = 0; - var length = string.length; - while (counter < length) { - var character = string.charAt(counter++); - var codePoint = character.charCodeAt(); - var value = void 0; - // If it’s not a printable ASCII character… - if (codePoint < 0x20 || codePoint > 0x7E) { - if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) { - // It’s a high surrogate, and there is a next character. - var extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { - // next character is low surrogate - codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000; - } else { - // It’s an unmatched surrogate; only append this code unit, in case - // the next code unit is the high surrogate of a surrogate pair. - counter--; - } - } - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } else { - if (options.escapeEverything) { - if (regexAnySingleEscape.test(character)) { - value = '\\' + character; - } else { - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } - } else if (/[\t\n\f\r\x0B]/.test(character)) { - value = '\\' + codePoint.toString(16).toUpperCase() + ' '; - } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) { - value = '\\' + character; - } else { - value = character; - } - } - output += value; - } - - if (isIdentifier) { - if (/^-[-\d]/.test(output)) { - output = '\\-' + output.slice(1); - } else if (/\d/.test(firstChar)) { - output = '\\3' + firstChar + ' ' + output.slice(1); - } - } - - // Remove spaces after `\HEX` escapes that are not followed by a hex digit, - // since they’re redundant. Note that this is only possible if the escape - // sequence isn’t preceded by an odd number of backslashes. - output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) { - if ($1 && $1.length % 2) { - // It’s not safe to remove the space, so don’t. - return $0; - } - // Strip the space. - return ($1 || '') + $2; - }); - - if (!isIdentifier && options.wrap) { - return quote + output + quote; - } - return output; -}; - -// Expose default options (so they can be overridden globally). -cssesc.options = { - 'escapeEverything': false, - 'isIdentifier': false, - 'quotes': 'single', - 'wrap': false -}; - -cssesc.version = '3.0.0'; - -var cssesc_1 = cssesc; - -var className = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _cssesc = _interopRequireDefault(cssesc_1); - - - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var ClassName = /*#__PURE__*/function (_Node) { - _inheritsLoose(ClassName, _Node); - - function ClassName(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types$1.CLASS; - _this._constructed = true; - return _this; - } - - var _proto = ClassName.prototype; - - _proto.valueToString = function valueToString() { - return '.' + _Node.prototype.valueToString.call(this); - }; - - _createClass(ClassName, [{ - key: "value", - get: function get() { - return this._value; - }, - set: function set(v) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - - if (escaped !== v) { - (0, util$2.ensureObject)(this, "raws"); - this.raws.value = escaped; - } else if (this.raws) { - delete this.raws.value; - } - } - - this._value = v; - } - }]); - - return ClassName; -}(_node["default"]); - -exports["default"] = ClassName; -module.exports = exports.default; -}); - -var comment$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Comment = /*#__PURE__*/function (_Node) { - _inheritsLoose(Comment, _Node); - - function Comment(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types$1.COMMENT; - return _this; - } - - return Comment; -}(_node["default"]); - -exports["default"] = Comment; -module.exports = exports.default; -}); - -var id = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var ID = /*#__PURE__*/function (_Node) { - _inheritsLoose(ID, _Node); - - function ID(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types$1.ID; - return _this; - } - - var _proto = ID.prototype; - - _proto.valueToString = function valueToString() { - return '#' + _Node.prototype.valueToString.call(this); - }; - - return ID; -}(_node["default"]); - -exports["default"] = ID; -module.exports = exports.default; -}); - -var namespace = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _cssesc = _interopRequireDefault(cssesc_1); - - - -var _node = _interopRequireDefault(node); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Namespace = /*#__PURE__*/function (_Node) { - _inheritsLoose(Namespace, _Node); - - function Namespace() { - return _Node.apply(this, arguments) || this; - } - - var _proto = Namespace.prototype; - - _proto.qualifiedName = function qualifiedName(value) { - if (this.namespace) { - return this.namespaceString + "|" + value; - } else { - return value; - } - }; - - _proto.valueToString = function valueToString() { - return this.qualifiedName(_Node.prototype.valueToString.call(this)); - }; - - _createClass(Namespace, [{ - key: "namespace", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - if (namespace === true || namespace === "*" || namespace === "&") { - this._namespace = namespace; - - if (this.raws) { - delete this.raws.namespace; - } - - return; - } - - var escaped = (0, _cssesc["default"])(namespace, { - isIdentifier: true - }); - this._namespace = namespace; - - if (escaped !== namespace) { - (0, util$2.ensureObject)(this, "raws"); - this.raws.namespace = escaped; - } else if (this.raws) { - delete this.raws.namespace; - } - } - }, { - key: "ns", - get: function get() { - return this._namespace; - }, - set: function set(namespace) { - this.namespace = namespace; - } - }, { - key: "namespaceString", - get: function get() { - if (this.namespace) { - var ns = this.stringifyProperty("namespace"); - - if (ns === true) { - return ''; - } else { - return ns; - } - } else { - return ''; - } - } - }]); - - return Namespace; -}(_node["default"]); - -exports["default"] = Namespace; -module.exports = exports.default; -}); - -var tag = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _namespace = _interopRequireDefault(namespace); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Tag = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Tag, _Namespace); - - function Tag(opts) { - var _this; - - _this = _Namespace.call(this, opts) || this; - _this.type = types$1.TAG; - return _this; - } - - return Tag; -}(_namespace["default"]); - -exports["default"] = Tag; -module.exports = exports.default; -}); - -var string = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var String = /*#__PURE__*/function (_Node) { - _inheritsLoose(String, _Node); - - function String(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types$1.STRING; - return _this; - } - - return String; -}(_node["default"]); - -exports["default"] = String; -module.exports = exports.default; -}); - -var pseudo = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _container = _interopRequireDefault(container$1); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Pseudo = /*#__PURE__*/function (_Container) { - _inheritsLoose(Pseudo, _Container); - - function Pseudo(opts) { - var _this; - - _this = _Container.call(this, opts) || this; - _this.type = types$1.PSEUDO; - return _this; - } - - var _proto = Pseudo.prototype; - - _proto.toString = function toString() { - var params = this.length ? '(' + this.map(String).join(',') + ')' : ''; - return [this.rawSpaceBefore, this.stringifyProperty("value"), params, this.rawSpaceAfter].join(''); - }; - - return Pseudo; -}(_container["default"]); - -exports["default"] = Pseudo; -module.exports = exports.default; -}); - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -var node$1 = require$$0.deprecate; - -var attribute = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.unescapeValue = unescapeValue; -exports["default"] = void 0; - -var _cssesc = _interopRequireDefault(cssesc_1); - -var _unesc = _interopRequireDefault(unesc_1); - -var _namespace = _interopRequireDefault(namespace); - - - -var _CSSESC_QUOTE_OPTIONS; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - - - -var WRAPPED_IN_QUOTES = /^('|")([^]*)\1$/; -var warnOfDeprecatedValueAssignment = node$1(function () {}, "Assigning an attribute a value containing characters that might need to be escaped is deprecated. " + "Call attribute.setValue() instead."); -var warnOfDeprecatedQuotedAssignment = node$1(function () {}, "Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."); -var warnOfDeprecatedConstructor = node$1(function () {}, "Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now."); - -function unescapeValue(value) { - var deprecatedUsage = false; - var quoteMark = null; - var unescaped = value; - var m = unescaped.match(WRAPPED_IN_QUOTES); - - if (m) { - quoteMark = m[1]; - unescaped = m[2]; - } - - unescaped = (0, _unesc["default"])(unescaped); - - if (unescaped !== value) { - deprecatedUsage = true; - } - - return { - deprecatedUsage: deprecatedUsage, - unescaped: unescaped, - quoteMark: quoteMark - }; -} - -function handleDeprecatedContructorOpts(opts) { - if (opts.quoteMark !== undefined) { - return opts; - } - - if (opts.value === undefined) { - return opts; - } - - warnOfDeprecatedConstructor(); - - var _unescapeValue = unescapeValue(opts.value), - quoteMark = _unescapeValue.quoteMark, - unescaped = _unescapeValue.unescaped; - - if (!opts.raws) { - opts.raws = {}; - } - - if (opts.raws.value === undefined) { - opts.raws.value = opts.value; - } - - opts.value = unescaped; - opts.quoteMark = quoteMark; - return opts; -} - -var Attribute = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Attribute, _Namespace); - - function Attribute(opts) { - var _this; - - if (opts === void 0) { - opts = {}; - } - - _this = _Namespace.call(this, handleDeprecatedContructorOpts(opts)) || this; - _this.type = types$1.ATTRIBUTE; - _this.raws = _this.raws || {}; - Object.defineProperty(_this.raws, 'unquoted', { - get: node$1(function () { - return _this.value; - }, "attr.raws.unquoted is deprecated. Call attr.value instead."), - set: node$1(function () { - return _this.value; - }, "Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.") - }); - _this._constructed = true; - return _this; - } - /** - * Returns the Attribute's value quoted such that it would be legal to use - * in the value of a css file. The original value's quotation setting - * used for stringification is left unchanged. See `setValue(value, options)` - * if you want to control the quote settings of a new value for the attribute. - * - * You can also change the quotation used for the current value by setting quoteMark. - * - * Options: - * * quoteMark {'"' | "'" | null} - Use this value to quote the value. If this - * option is not set, the original value for quoteMark will be used. If - * indeterminate, a double quote is used. The legal values are: - * * `null` - the value will be unquoted and characters will be escaped as necessary. - * * `'` - the value will be quoted with a single quote and single quotes are escaped. - * * `"` - the value will be quoted with a double quote and double quotes are escaped. - * * preferCurrentQuoteMark {boolean} - if true, prefer the source quote mark - * over the quoteMark option value. - * * smart {boolean} - if true, will select a quote mark based on the value - * and the other options specified here. See the `smartQuoteMark()` - * method. - **/ - - - var _proto = Attribute.prototype; - - _proto.getQuotedValue = function getQuotedValue(options) { - if (options === void 0) { - options = {}; - } - - var quoteMark = this._determineQuoteMark(options); - - var cssescopts = CSSESC_QUOTE_OPTIONS[quoteMark]; - var escaped = (0, _cssesc["default"])(this._value, cssescopts); - return escaped; - }; - - _proto._determineQuoteMark = function _determineQuoteMark(options) { - return options.smart ? this.smartQuoteMark(options) : this.preferredQuoteMark(options); - } - /** - * Set the unescaped value with the specified quotation options. The value - * provided must not include any wrapping quote marks -- those quotes will - * be interpreted as part of the value and escaped accordingly. - */ - ; - - _proto.setValue = function setValue(value, options) { - if (options === void 0) { - options = {}; - } - - this._value = value; - this._quoteMark = this._determineQuoteMark(options); - - this._syncRawValue(); - } - /** - * Intelligently select a quoteMark value based on the value's contents. If - * the value is a legal CSS ident, it will not be quoted. Otherwise a quote - * mark will be picked that minimizes the number of escapes. - * - * If there's no clear winner, the quote mark from these options is used, - * then the source quote mark (this is inverted if `preferCurrentQuoteMark` is - * true). If the quoteMark is unspecified, a double quote is used. - * - * @param options This takes the quoteMark and preferCurrentQuoteMark options - * from the quoteValue method. - */ - ; - - _proto.smartQuoteMark = function smartQuoteMark(options) { - var v = this.value; - var numSingleQuotes = v.replace(/[^']/g, '').length; - var numDoubleQuotes = v.replace(/[^"]/g, '').length; - - if (numSingleQuotes + numDoubleQuotes === 0) { - var escaped = (0, _cssesc["default"])(v, { - isIdentifier: true - }); - - if (escaped === v) { - return Attribute.NO_QUOTE; - } else { - var pref = this.preferredQuoteMark(options); - - if (pref === Attribute.NO_QUOTE) { - // pick a quote mark that isn't none and see if it's smaller - var quote = this.quoteMark || options.quoteMark || Attribute.DOUBLE_QUOTE; - var opts = CSSESC_QUOTE_OPTIONS[quote]; - var quoteValue = (0, _cssesc["default"])(v, opts); - - if (quoteValue.length < escaped.length) { - return quote; - } - } - - return pref; - } - } else if (numDoubleQuotes === numSingleQuotes) { - return this.preferredQuoteMark(options); - } else if (numDoubleQuotes < numSingleQuotes) { - return Attribute.DOUBLE_QUOTE; - } else { - return Attribute.SINGLE_QUOTE; - } - } - /** - * Selects the preferred quote mark based on the options and the current quote mark value. - * If you want the quote mark to depend on the attribute value, call `smartQuoteMark(opts)` - * instead. - */ - ; - - _proto.preferredQuoteMark = function preferredQuoteMark(options) { - var quoteMark = options.preferCurrentQuoteMark ? this.quoteMark : options.quoteMark; - - if (quoteMark === undefined) { - quoteMark = options.preferCurrentQuoteMark ? options.quoteMark : this.quoteMark; - } - - if (quoteMark === undefined) { - quoteMark = Attribute.DOUBLE_QUOTE; - } - - return quoteMark; - }; - - _proto._syncRawValue = function _syncRawValue() { - var rawValue = (0, _cssesc["default"])(this._value, CSSESC_QUOTE_OPTIONS[this.quoteMark]); - - if (rawValue === this._value) { - if (this.raws) { - delete this.raws.value; - } - } else { - this.raws.value = rawValue; - } - }; - - _proto._handleEscapes = function _handleEscapes(prop, value) { - if (this._constructed) { - var escaped = (0, _cssesc["default"])(value, { - isIdentifier: true - }); - - if (escaped !== value) { - this.raws[prop] = escaped; - } else { - delete this.raws[prop]; - } - } - }; - - _proto._spacesFor = function _spacesFor(name) { - var attrSpaces = { - before: '', - after: '' - }; - var spaces = this.spaces[name] || {}; - var rawSpaces = this.raws.spaces && this.raws.spaces[name] || {}; - return Object.assign(attrSpaces, spaces, rawSpaces); - }; - - _proto._stringFor = function _stringFor(name, spaceName, concat) { - if (spaceName === void 0) { - spaceName = name; - } - - if (concat === void 0) { - concat = defaultAttrConcat; - } - - var attrSpaces = this._spacesFor(spaceName); - - return concat(this.stringifyProperty(name), attrSpaces); - } - /** - * returns the offset of the attribute part specified relative to the - * start of the node of the output string. - * - * * "ns" - alias for "namespace" - * * "namespace" - the namespace if it exists. - * * "attribute" - the attribute name - * * "attributeNS" - the start of the attribute or its namespace - * * "operator" - the match operator of the attribute - * * "value" - The value (string or identifier) - * * "insensitive" - the case insensitivity flag; - * @param part One of the possible values inside an attribute. - * @returns -1 if the name is invalid or the value doesn't exist in this attribute. - */ - ; - - _proto.offsetOf = function offsetOf(name) { - var count = 1; - - var attributeSpaces = this._spacesFor("attribute"); - - count += attributeSpaces.before.length; - - if (name === "namespace" || name === "ns") { - return this.namespace ? count : -1; - } - - if (name === "attributeNS") { - return count; - } - - count += this.namespaceString.length; - - if (this.namespace) { - count += 1; - } - - if (name === "attribute") { - return count; - } - - count += this.stringifyProperty("attribute").length; - count += attributeSpaces.after.length; - - var operatorSpaces = this._spacesFor("operator"); - - count += operatorSpaces.before.length; - var operator = this.stringifyProperty("operator"); - - if (name === "operator") { - return operator ? count : -1; - } - - count += operator.length; - count += operatorSpaces.after.length; - - var valueSpaces = this._spacesFor("value"); - - count += valueSpaces.before.length; - var value = this.stringifyProperty("value"); - - if (name === "value") { - return value ? count : -1; - } - - count += value.length; - count += valueSpaces.after.length; - - var insensitiveSpaces = this._spacesFor("insensitive"); - - count += insensitiveSpaces.before.length; - - if (name === "insensitive") { - return this.insensitive ? count : -1; - } - - return -1; - }; - - _proto.toString = function toString() { - var _this2 = this; - - var selector = [this.rawSpaceBefore, '[']; - selector.push(this._stringFor('qualifiedAttribute', 'attribute')); - - if (this.operator && (this.value || this.value === '')) { - selector.push(this._stringFor('operator')); - selector.push(this._stringFor('value')); - selector.push(this._stringFor('insensitiveFlag', 'insensitive', function (attrValue, attrSpaces) { - if (attrValue.length > 0 && !_this2.quoted && attrSpaces.before.length === 0 && !(_this2.spaces.value && _this2.spaces.value.after)) { - attrSpaces.before = " "; - } - - return defaultAttrConcat(attrValue, attrSpaces); - })); - } - - selector.push(']'); - selector.push(this.rawSpaceAfter); - return selector.join(''); - }; - - _createClass(Attribute, [{ - key: "quoted", - get: function get() { - var qm = this.quoteMark; - return qm === "'" || qm === '"'; - }, - set: function set(value) { - warnOfDeprecatedQuotedAssignment(); - } - /** - * returns a single (`'`) or double (`"`) quote character if the value is quoted. - * returns `null` if the value is not quoted. - * returns `undefined` if the quotation state is unknown (this can happen when - * the attribute is constructed without specifying a quote mark.) - */ - - }, { - key: "quoteMark", - get: function get() { - return this._quoteMark; - } - /** - * Set the quote mark to be used by this attribute's value. - * If the quote mark changes, the raw (escaped) value at `attr.raws.value` of the attribute - * value is updated accordingly. - * - * @param {"'" | '"' | null} quoteMark The quote mark or `null` if the value should be unquoted. - */ - , - set: function set(quoteMark) { - if (!this._constructed) { - this._quoteMark = quoteMark; - return; - } - - if (this._quoteMark !== quoteMark) { - this._quoteMark = quoteMark; - - this._syncRawValue(); - } - } - }, { - key: "qualifiedAttribute", - get: function get() { - return this.qualifiedName(this.raws.attribute || this.attribute); - } - }, { - key: "insensitiveFlag", - get: function get() { - return this.insensitive ? 'i' : ''; - } - }, { - key: "value", - get: function get() { - return this._value; - } - /** - * Before 3.0, the value had to be set to an escaped value including any wrapped - * quote marks. In 3.0, the semantics of `Attribute.value` changed so that the value - * is unescaped during parsing and any quote marks are removed. - * - * Because the ambiguity of this semantic change, if you set `attr.value = newValue`, - * a deprecation warning is raised when the new value contains any characters that would - * require escaping (including if it contains wrapped quotes). - * - * Instead, you should call `attr.setValue(newValue, opts)` and pass options that describe - * how the new value is quoted. - */ - , - set: function set(v) { - if (this._constructed) { - var _unescapeValue2 = unescapeValue(v), - deprecatedUsage = _unescapeValue2.deprecatedUsage, - unescaped = _unescapeValue2.unescaped, - quoteMark = _unescapeValue2.quoteMark; - - if (deprecatedUsage) { - warnOfDeprecatedValueAssignment(); - } - - if (unescaped === this._value && quoteMark === this._quoteMark) { - return; - } - - this._value = unescaped; - this._quoteMark = quoteMark; - - this._syncRawValue(); - } else { - this._value = v; - } - } - }, { - key: "attribute", - get: function get() { - return this._attribute; - }, - set: function set(name) { - this._handleEscapes("attribute", name); - - this._attribute = name; - } - }]); - - return Attribute; -}(_namespace["default"]); - -exports["default"] = Attribute; -Attribute.NO_QUOTE = null; -Attribute.SINGLE_QUOTE = "'"; -Attribute.DOUBLE_QUOTE = '"'; -var CSSESC_QUOTE_OPTIONS = (_CSSESC_QUOTE_OPTIONS = { - "'": { - quotes: 'single', - wrap: true - }, - '"': { - quotes: 'double', - wrap: true - } -}, _CSSESC_QUOTE_OPTIONS[null] = { - isIdentifier: true -}, _CSSESC_QUOTE_OPTIONS); - -function defaultAttrConcat(attrValue, attrSpaces) { - return "" + attrSpaces.before + attrValue + attrSpaces.after; -} -}); - -var universal = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _namespace = _interopRequireDefault(namespace); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Universal = /*#__PURE__*/function (_Namespace) { - _inheritsLoose(Universal, _Namespace); - - function Universal(opts) { - var _this; - - _this = _Namespace.call(this, opts) || this; - _this.type = types$1.UNIVERSAL; - _this.value = '*'; - return _this; - } - - return Universal; -}(_namespace["default"]); - -exports["default"] = Universal; -module.exports = exports.default; -}); - -var combinator = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Combinator = /*#__PURE__*/function (_Node) { - _inheritsLoose(Combinator, _Node); - - function Combinator(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types$1.COMBINATOR; - return _this; - } - - return Combinator; -}(_node["default"]); - -exports["default"] = Combinator; -module.exports = exports.default; -}); - -var nesting = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _node = _interopRequireDefault(node); - - - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } - -function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } - -var Nesting = /*#__PURE__*/function (_Node) { - _inheritsLoose(Nesting, _Node); - - function Nesting(opts) { - var _this; - - _this = _Node.call(this, opts) || this; - _this.type = types$1.NESTING; - _this.value = '&'; - return _this; - } - - return Nesting; -}(_node["default"]); - -exports["default"] = Nesting; -module.exports = exports.default; -}); - -var sortAscending_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = sortAscending; - -function sortAscending(list) { - return list.sort(function (a, b) { - return a - b; - }); -} -module.exports = exports.default; -}); - -var tokenTypes$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0; -var ampersand = 38; // `&`.charCodeAt(0); - -exports.ampersand = ampersand; -var asterisk = 42; // `*`.charCodeAt(0); - -exports.asterisk = asterisk; -var at = 64; // `@`.charCodeAt(0); - -exports.at = at; -var comma = 44; // `,`.charCodeAt(0); - -exports.comma = comma; -var colon = 58; // `:`.charCodeAt(0); - -exports.colon = colon; -var semicolon = 59; // `;`.charCodeAt(0); - -exports.semicolon = semicolon; -var openParenthesis = 40; // `(`.charCodeAt(0); - -exports.openParenthesis = openParenthesis; -var closeParenthesis = 41; // `)`.charCodeAt(0); - -exports.closeParenthesis = closeParenthesis; -var openSquare = 91; // `[`.charCodeAt(0); - -exports.openSquare = openSquare; -var closeSquare = 93; // `]`.charCodeAt(0); - -exports.closeSquare = closeSquare; -var dollar = 36; // `$`.charCodeAt(0); - -exports.dollar = dollar; -var tilde = 126; // `~`.charCodeAt(0); - -exports.tilde = tilde; -var caret = 94; // `^`.charCodeAt(0); - -exports.caret = caret; -var plus = 43; // `+`.charCodeAt(0); - -exports.plus = plus; -var equals = 61; // `=`.charCodeAt(0); - -exports.equals = equals; -var pipe = 124; // `|`.charCodeAt(0); - -exports.pipe = pipe; -var greaterThan = 62; // `>`.charCodeAt(0); - -exports.greaterThan = greaterThan; -var space = 32; // ` `.charCodeAt(0); - -exports.space = space; -var singleQuote = 39; // `'`.charCodeAt(0); - -exports.singleQuote = singleQuote; -var doubleQuote = 34; // `"`.charCodeAt(0); - -exports.doubleQuote = doubleQuote; -var slash = 47; // `/`.charCodeAt(0); - -exports.slash = slash; -var bang = 33; // `!`.charCodeAt(0); - -exports.bang = bang; -var backslash = 92; // '\\'.charCodeAt(0); - -exports.backslash = backslash; -var cr = 13; // '\r'.charCodeAt(0); - -exports.cr = cr; -var feed = 12; // '\f'.charCodeAt(0); - -exports.feed = feed; -var newline = 10; // '\n'.charCodeAt(0); - -exports.newline = newline; -var tab = 9; // '\t'.charCodeAt(0); -// Expose aliases primarily for readability. - -exports.tab = tab; -var str = singleQuote; // No good single character representation! - -exports.str = str; -var comment = -1; -exports.comment = comment; -var word = -2; -exports.word = word; -var combinator = -3; -exports.combinator = combinator; -}); - -var tokenize_1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = tokenize; -exports.FIELDS = void 0; - -var t = _interopRequireWildcard(tokenTypes$1); - -var _unescapable, _wordDelimiters; - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -var unescapable = (_unescapable = {}, _unescapable[t.tab] = true, _unescapable[t.newline] = true, _unescapable[t.cr] = true, _unescapable[t.feed] = true, _unescapable); -var wordDelimiters = (_wordDelimiters = {}, _wordDelimiters[t.space] = true, _wordDelimiters[t.tab] = true, _wordDelimiters[t.newline] = true, _wordDelimiters[t.cr] = true, _wordDelimiters[t.feed] = true, _wordDelimiters[t.ampersand] = true, _wordDelimiters[t.asterisk] = true, _wordDelimiters[t.bang] = true, _wordDelimiters[t.comma] = true, _wordDelimiters[t.colon] = true, _wordDelimiters[t.semicolon] = true, _wordDelimiters[t.openParenthesis] = true, _wordDelimiters[t.closeParenthesis] = true, _wordDelimiters[t.openSquare] = true, _wordDelimiters[t.closeSquare] = true, _wordDelimiters[t.singleQuote] = true, _wordDelimiters[t.doubleQuote] = true, _wordDelimiters[t.plus] = true, _wordDelimiters[t.pipe] = true, _wordDelimiters[t.tilde] = true, _wordDelimiters[t.greaterThan] = true, _wordDelimiters[t.equals] = true, _wordDelimiters[t.dollar] = true, _wordDelimiters[t.caret] = true, _wordDelimiters[t.slash] = true, _wordDelimiters); -var hex = {}; -var hexChars = "0123456789abcdefABCDEF"; - -for (var i = 0; i < hexChars.length; i++) { - hex[hexChars.charCodeAt(i)] = true; -} -/** - * Returns the last index of the bar css word - * @param {string} css The string in which the word begins - * @param {number} start The index into the string where word's first letter occurs - */ - - -function consumeWord(css, start) { - var next = start; - var code; - - do { - code = css.charCodeAt(next); - - if (wordDelimiters[code]) { - return next - 1; - } else if (code === t.backslash) { - next = consumeEscape(css, next) + 1; - } else { - // All other characters are part of the word - next++; - } - } while (next < css.length); - - return next - 1; -} -/** - * Returns the last index of the escape sequence - * @param {string} css The string in which the sequence begins - * @param {number} start The index into the string where escape character (`\`) occurs. - */ - - -function consumeEscape(css, start) { - var next = start; - var code = css.charCodeAt(next + 1); - - if (unescapable[code]) ; else if (hex[code]) { - var hexDigits = 0; // consume up to 6 hex chars - - do { - next++; - hexDigits++; - code = css.charCodeAt(next + 1); - } while (hex[code] && hexDigits < 6); // if fewer than 6 hex chars, a trailing space ends the escape - - - if (hexDigits < 6 && code === t.space) { - next++; - } - } else { - // the next char is part of the current word - next++; - } - - return next; -} - -var FIELDS = { - TYPE: 0, - START_LINE: 1, - START_COL: 2, - END_LINE: 3, - END_COL: 4, - START_POS: 5, - END_POS: 6 -}; -exports.FIELDS = FIELDS; - -function tokenize(input) { - var tokens = []; - var css = input.css.valueOf(); - var _css = css, - length = _css.length; - var offset = -1; - var line = 1; - var start = 0; - var end = 0; - var code, content, endColumn, endLine, escaped, escapePos, last, lines, next, nextLine, nextOffset, quote, tokenType; - - function unclosed(what, fix) { - if (input.safe) { - // fyi: this is never set to true. - css += fix; - next = css.length - 1; - } else { - throw input.error('Unclosed ' + what, line, start - offset, start); - } - } - - while (start < length) { - code = css.charCodeAt(start); - - if (code === t.newline) { - offset = start; - line += 1; - } - - switch (code) { - case t.space: - case t.tab: - case t.newline: - case t.cr: - case t.feed: - next = start; - - do { - next += 1; - code = css.charCodeAt(next); - - if (code === t.newline) { - offset = next; - line += 1; - } - } while (code === t.space || code === t.newline || code === t.tab || code === t.cr || code === t.feed); - - tokenType = t.space; - endLine = line; - endColumn = next - offset - 1; - end = next; - break; - - case t.plus: - case t.greaterThan: - case t.tilde: - case t.pipe: - next = start; - - do { - next += 1; - code = css.charCodeAt(next); - } while (code === t.plus || code === t.greaterThan || code === t.tilde || code === t.pipe); - - tokenType = t.combinator; - endLine = line; - endColumn = start - offset; - end = next; - break; - // Consume these characters as single tokens. - - case t.asterisk: - case t.ampersand: - case t.bang: - case t.comma: - case t.equals: - case t.dollar: - case t.caret: - case t.openSquare: - case t.closeSquare: - case t.colon: - case t.semicolon: - case t.openParenthesis: - case t.closeParenthesis: - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - - case t.singleQuote: - case t.doubleQuote: - quote = code === t.singleQuote ? "'" : '"'; - next = start; - - do { - escaped = false; - next = css.indexOf(quote, next + 1); - - if (next === -1) { - unclosed('quote', quote); - } - - escapePos = next; - - while (css.charCodeAt(escapePos - 1) === t.backslash) { - escapePos -= 1; - escaped = !escaped; - } - } while (escaped); - - tokenType = t.str; - endLine = line; - endColumn = start - offset; - end = next + 1; - break; - - default: - if (code === t.slash && css.charCodeAt(start + 1) === t.asterisk) { - next = css.indexOf('*/', start + 2) + 1; - - if (next === 0) { - unclosed('comment', '*/'); - } - - content = css.slice(start, next + 1); - lines = content.split('\n'); - last = lines.length - 1; - - if (last > 0) { - nextLine = line + last; - nextOffset = next - lines[last].length; - } else { - nextLine = line; - nextOffset = offset; - } - - tokenType = t.comment; - line = nextLine; - endLine = nextLine; - endColumn = next - nextOffset; - } else if (code === t.slash) { - next = start; - tokenType = code; - endLine = line; - endColumn = start - offset; - end = next + 1; - } else { - next = consumeWord(css, start); - tokenType = t.word; - endLine = line; - endColumn = next - offset; - } - - end = next + 1; - break; - } // Ensure that the token structure remains consistent - - - tokens.push([tokenType, // [0] Token type - line, // [1] Starting line - start - offset, // [2] Starting column - endLine, // [3] Ending line - endColumn, // [4] Ending column - start, // [5] Start position / Source index - end // [6] End position - ]); // Reset offset for the next token - - if (nextOffset) { - offset = nextOffset; - nextOffset = null; - } - - start = end; - } - - return tokens; -} -}); - -var parser$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _root = _interopRequireDefault(root$1); - -var _selector = _interopRequireDefault(selector); - -var _className = _interopRequireDefault(className); - -var _comment = _interopRequireDefault(comment$1); - -var _id = _interopRequireDefault(id); - -var _tag = _interopRequireDefault(tag); - -var _string = _interopRequireDefault(string); - -var _pseudo = _interopRequireDefault(pseudo); - -var _attribute = _interopRequireWildcard(attribute); - -var _universal = _interopRequireDefault(universal); - -var _combinator = _interopRequireDefault(combinator); - -var _nesting = _interopRequireDefault(nesting); - -var _sortAscending = _interopRequireDefault(sortAscending_1); - -var _tokenize = _interopRequireWildcard(tokenize_1); - -var tokens = _interopRequireWildcard(tokenTypes$1); - -var types = _interopRequireWildcard(types$1); - - - -var _WHITESPACE_TOKENS, _Object$assign; - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var WHITESPACE_TOKENS = (_WHITESPACE_TOKENS = {}, _WHITESPACE_TOKENS[tokens.space] = true, _WHITESPACE_TOKENS[tokens.cr] = true, _WHITESPACE_TOKENS[tokens.feed] = true, _WHITESPACE_TOKENS[tokens.newline] = true, _WHITESPACE_TOKENS[tokens.tab] = true, _WHITESPACE_TOKENS); -var WHITESPACE_EQUIV_TOKENS = Object.assign({}, WHITESPACE_TOKENS, (_Object$assign = {}, _Object$assign[tokens.comment] = true, _Object$assign)); - -function tokenStart(token) { - return { - line: token[_tokenize.FIELDS.START_LINE], - column: token[_tokenize.FIELDS.START_COL] - }; -} - -function tokenEnd(token) { - return { - line: token[_tokenize.FIELDS.END_LINE], - column: token[_tokenize.FIELDS.END_COL] - }; -} - -function getSource(startLine, startColumn, endLine, endColumn) { - return { - start: { - line: startLine, - column: startColumn - }, - end: { - line: endLine, - column: endColumn - } - }; -} - -function getTokenSource(token) { - return getSource(token[_tokenize.FIELDS.START_LINE], token[_tokenize.FIELDS.START_COL], token[_tokenize.FIELDS.END_LINE], token[_tokenize.FIELDS.END_COL]); -} - -function getTokenSourceSpan(startToken, endToken) { - if (!startToken) { - return undefined; - } - - return getSource(startToken[_tokenize.FIELDS.START_LINE], startToken[_tokenize.FIELDS.START_COL], endToken[_tokenize.FIELDS.END_LINE], endToken[_tokenize.FIELDS.END_COL]); -} - -function unescapeProp(node, prop) { - var value = node[prop]; - - if (typeof value !== "string") { - return; - } - - if (value.indexOf("\\") !== -1) { - (0, util$2.ensureObject)(node, 'raws'); - node[prop] = (0, util$2.unesc)(value); - - if (node.raws[prop] === undefined) { - node.raws[prop] = value; - } - } - - return node; -} - -function indexesOf(array, item) { - var i = -1; - var indexes = []; - - while ((i = array.indexOf(item, i + 1)) !== -1) { - indexes.push(i); - } - - return indexes; -} - -function uniqs() { - var list = Array.prototype.concat.apply([], arguments); - return list.filter(function (item, i) { - return i === list.indexOf(item); - }); -} - -var Parser = /*#__PURE__*/function () { - function Parser(rule, options) { - if (options === void 0) { - options = {}; - } - - this.rule = rule; - this.options = Object.assign({ - lossy: false, - safe: false - }, options); - this.position = 0; - this.css = typeof this.rule === 'string' ? this.rule : this.rule.selector; - this.tokens = (0, _tokenize["default"])({ - css: this.css, - error: this._errorGenerator(), - safe: this.options.safe - }); - var rootSource = getTokenSourceSpan(this.tokens[0], this.tokens[this.tokens.length - 1]); - this.root = new _root["default"]({ - source: rootSource - }); - this.root.errorGenerator = this._errorGenerator(); - var selector = new _selector["default"]({ - source: { - start: { - line: 1, - column: 1 - } - } - }); - this.root.append(selector); - this.current = selector; - this.loop(); - } - - var _proto = Parser.prototype; - - _proto._errorGenerator = function _errorGenerator() { - var _this = this; - - return function (message, errorOptions) { - if (typeof _this.rule === 'string') { - return new Error(message); - } - - return _this.rule.error(message, errorOptions); - }; - }; - - _proto.attribute = function attribute() { - var attr = []; - var startingToken = this.currToken; - this.position++; - - while (this.position < this.tokens.length && this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - attr.push(this.currToken); - this.position++; - } - - if (this.currToken[_tokenize.FIELDS.TYPE] !== tokens.closeSquare) { - return this.expected('closing square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - } - - var len = attr.length; - var node = { - source: getSource(startingToken[1], startingToken[2], this.currToken[3], this.currToken[4]), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - }; - - if (len === 1 && !~[tokens.word].indexOf(attr[0][_tokenize.FIELDS.TYPE])) { - return this.expected('attribute', attr[0][_tokenize.FIELDS.START_POS]); - } - - var pos = 0; - var spaceBefore = ''; - var commentBefore = ''; - var lastAdded = null; - var spaceAfterMeaningfulToken = false; - - while (pos < len) { - var token = attr[pos]; - var content = this.content(token); - var next = attr[pos + 1]; - - switch (token[_tokenize.FIELDS.TYPE]) { - case tokens.space: - // if ( - // len === 1 || - // pos === 0 && this.content(next) === '|' - // ) { - // return this.expected('attribute', token[TOKEN.START_POS], content); - // } - spaceAfterMeaningfulToken = true; - - if (this.options.lossy) { - break; - } - - if (lastAdded) { - (0, util$2.ensureObject)(node, 'spaces', lastAdded); - var prevContent = node.spaces[lastAdded].after || ''; - node.spaces[lastAdded].after = prevContent + content; - var existingComment = (0, util$2.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || null; - - if (existingComment) { - node.raws.spaces[lastAdded].after = existingComment + content; - } - } else { - spaceBefore = spaceBefore + content; - commentBefore = commentBefore + content; - } - - break; - - case tokens.asterisk: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if ((!node.namespace || lastAdded === "namespace" && !spaceAfterMeaningfulToken) && next) { - if (spaceBefore) { - (0, util$2.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - - if (commentBefore) { - (0, util$2.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = spaceBefore; - commentBefore = ''; - } - - node.namespace = (node.namespace || "") + content; - var rawValue = (0, util$2.getProp)(node, 'raws', 'namespace') || null; - - if (rawValue) { - node.raws.namespace += content; - } - - lastAdded = 'namespace'; - } - - spaceAfterMeaningfulToken = false; - break; - - case tokens.dollar: - if (lastAdded === "value") { - var oldRawValue = (0, util$2.getProp)(node, 'raws', 'value'); - node.value += "$"; - - if (oldRawValue) { - node.raws.value = oldRawValue + "$"; - } - - break; - } - - // Falls through - - case tokens.caret: - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - - spaceAfterMeaningfulToken = false; - break; - - case tokens.combinator: - if (content === '~' && next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } - - if (content !== '|') { - spaceAfterMeaningfulToken = false; - break; - } - - if (next[_tokenize.FIELDS.TYPE] === tokens.equals) { - node.operator = content; - lastAdded = 'operator'; - } else if (!node.namespace && !node.attribute) { - node.namespace = true; - } - - spaceAfterMeaningfulToken = false; - break; - - case tokens.word: - if (next && this.content(next) === '|' && attr[pos + 2] && attr[pos + 2][_tokenize.FIELDS.TYPE] !== tokens.equals && // this look-ahead probably fails with comment nodes involved. - !node.operator && !node.namespace) { - node.namespace = content; - lastAdded = 'namespace'; - } else if (!node.attribute || lastAdded === "attribute" && !spaceAfterMeaningfulToken) { - if (spaceBefore) { - (0, util$2.ensureObject)(node, 'spaces', 'attribute'); - node.spaces.attribute.before = spaceBefore; - spaceBefore = ''; - } - - if (commentBefore) { - (0, util$2.ensureObject)(node, 'raws', 'spaces', 'attribute'); - node.raws.spaces.attribute.before = commentBefore; - commentBefore = ''; - } - - node.attribute = (node.attribute || "") + content; - - var _rawValue = (0, util$2.getProp)(node, 'raws', 'attribute') || null; - - if (_rawValue) { - node.raws.attribute += content; - } - - lastAdded = 'attribute'; - } else if (!node.value && node.value !== "" || lastAdded === "value" && !spaceAfterMeaningfulToken) { - var _unescaped = (0, util$2.unesc)(content); - - var _oldRawValue = (0, util$2.getProp)(node, 'raws', 'value') || ''; - - var oldValue = node.value || ''; - node.value = oldValue + _unescaped; - node.quoteMark = null; - - if (_unescaped !== content || _oldRawValue) { - (0, util$2.ensureObject)(node, 'raws'); - node.raws.value = (_oldRawValue || oldValue) + content; - } - - lastAdded = 'value'; - } else { - var insensitive = content === 'i' || content === "I"; - - if ((node.value || node.value === '') && (node.quoteMark || spaceAfterMeaningfulToken)) { - node.insensitive = insensitive; - - if (!insensitive || content === "I") { - (0, util$2.ensureObject)(node, 'raws'); - node.raws.insensitiveFlag = content; - } - - lastAdded = 'insensitive'; - - if (spaceBefore) { - (0, util$2.ensureObject)(node, 'spaces', 'insensitive'); - node.spaces.insensitive.before = spaceBefore; - spaceBefore = ''; - } - - if (commentBefore) { - (0, util$2.ensureObject)(node, 'raws', 'spaces', 'insensitive'); - node.raws.spaces.insensitive.before = commentBefore; - commentBefore = ''; - } - } else if (node.value || node.value === '') { - lastAdded = 'value'; - node.value += content; - - if (node.raws.value) { - node.raws.value += content; - } - } - } - - spaceAfterMeaningfulToken = false; - break; - - case tokens.str: - if (!node.attribute || !node.operator) { - return this.error("Expected an attribute followed by an operator preceding the string.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - - var _unescapeValue = (0, _attribute.unescapeValue)(content), - unescaped = _unescapeValue.unescaped, - quoteMark = _unescapeValue.quoteMark; - - node.value = unescaped; - node.quoteMark = quoteMark; - lastAdded = 'value'; - (0, util$2.ensureObject)(node, 'raws'); - node.raws.value = content; - spaceAfterMeaningfulToken = false; - break; - - case tokens.equals: - if (!node.attribute) { - return this.expected('attribute', token[_tokenize.FIELDS.START_POS], content); - } - - if (node.value) { - return this.error('Unexpected "=" found; an operator was already defined.', { - index: token[_tokenize.FIELDS.START_POS] - }); - } - - node.operator = node.operator ? node.operator + content : content; - lastAdded = 'operator'; - spaceAfterMeaningfulToken = false; - break; - - case tokens.comment: - if (lastAdded) { - if (spaceAfterMeaningfulToken || next && next[_tokenize.FIELDS.TYPE] === tokens.space || lastAdded === 'insensitive') { - var lastComment = (0, util$2.getProp)(node, 'spaces', lastAdded, 'after') || ''; - var rawLastComment = (0, util$2.getProp)(node, 'raws', 'spaces', lastAdded, 'after') || lastComment; - (0, util$2.ensureObject)(node, 'raws', 'spaces', lastAdded); - node.raws.spaces[lastAdded].after = rawLastComment + content; - } else { - var lastValue = node[lastAdded] || ''; - var rawLastValue = (0, util$2.getProp)(node, 'raws', lastAdded) || lastValue; - (0, util$2.ensureObject)(node, 'raws'); - node.raws[lastAdded] = rawLastValue + content; - } - } else { - commentBefore = commentBefore + content; - } - - break; - - default: - return this.error("Unexpected \"" + content + "\" found.", { - index: token[_tokenize.FIELDS.START_POS] - }); - } - - pos++; - } - - unescapeProp(node, "attribute"); - unescapeProp(node, "namespace"); - this.newNode(new _attribute["default"](node)); - this.position++; - } - /** - * return a node containing meaningless garbage up to (but not including) the specified token position. - * if the token position is negative, all remaining tokens are consumed. - * - * This returns an array containing a single string node if all whitespace, - * otherwise an array of comment nodes with space before and after. - * - * These tokens are not added to the current selector, the caller can add them or use them to amend - * a previous node's space metadata. - * - * In lossy mode, this returns only comments. - */ - ; - - _proto.parseWhitespaceEquivalentTokens = function parseWhitespaceEquivalentTokens(stopPosition) { - if (stopPosition < 0) { - stopPosition = this.tokens.length; - } - - var startPosition = this.position; - var nodes = []; - var space = ""; - var lastComment = undefined; - - do { - if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) { - if (!this.options.lossy) { - space += this.content(); - } - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.comment) { - var spaces = {}; - - if (space) { - spaces.before = space; - space = ""; - } - - lastComment = new _comment["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - spaces: spaces - }); - nodes.push(lastComment); - } - } while (++this.position < stopPosition); - - if (space) { - if (lastComment) { - lastComment.spaces.after = space; - } else if (!this.options.lossy) { - var firstToken = this.tokens[startPosition]; - var lastToken = this.tokens[this.position - 1]; - nodes.push(new _string["default"]({ - value: '', - source: getSource(firstToken[_tokenize.FIELDS.START_LINE], firstToken[_tokenize.FIELDS.START_COL], lastToken[_tokenize.FIELDS.END_LINE], lastToken[_tokenize.FIELDS.END_COL]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: { - before: space, - after: '' - } - })); - } - } - - return nodes; - } - /** - * - * @param {*} nodes - */ - ; - - _proto.convertWhitespaceNodesToSpace = function convertWhitespaceNodesToSpace(nodes, requiredSpace) { - var _this2 = this; - - if (requiredSpace === void 0) { - requiredSpace = false; - } - - var space = ""; - var rawSpace = ""; - nodes.forEach(function (n) { - var spaceBefore = _this2.lossySpace(n.spaces.before, requiredSpace); - - var rawSpaceBefore = _this2.lossySpace(n.rawSpaceBefore, requiredSpace); - - space += spaceBefore + _this2.lossySpace(n.spaces.after, requiredSpace && spaceBefore.length === 0); - rawSpace += spaceBefore + n.value + _this2.lossySpace(n.rawSpaceAfter, requiredSpace && rawSpaceBefore.length === 0); - }); - - if (rawSpace === space) { - rawSpace = undefined; - } - - var result = { - space: space, - rawSpace: rawSpace - }; - return result; - }; - - _proto.isNamedCombinator = function isNamedCombinator(position) { - if (position === void 0) { - position = this.position; - } - - return this.tokens[position + 0] && this.tokens[position + 0][_tokenize.FIELDS.TYPE] === tokens.slash && this.tokens[position + 1] && this.tokens[position + 1][_tokenize.FIELDS.TYPE] === tokens.word && this.tokens[position + 2] && this.tokens[position + 2][_tokenize.FIELDS.TYPE] === tokens.slash; - }; - - _proto.namedCombinator = function namedCombinator() { - if (this.isNamedCombinator()) { - var nameRaw = this.content(this.tokens[this.position + 1]); - var name = (0, util$2.unesc)(nameRaw).toLowerCase(); - var raws = {}; - - if (name !== nameRaw) { - raws.value = "/" + nameRaw + "/"; - } - - var node = new _combinator["default"]({ - value: "/" + name + "/", - source: getSource(this.currToken[_tokenize.FIELDS.START_LINE], this.currToken[_tokenize.FIELDS.START_COL], this.tokens[this.position + 2][_tokenize.FIELDS.END_LINE], this.tokens[this.position + 2][_tokenize.FIELDS.END_COL]), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS], - raws: raws - }); - this.position = this.position + 3; - return node; - } else { - this.unexpected(); - } - }; - - _proto.combinator = function combinator() { - var _this3 = this; - - if (this.content() === '|') { - return this.namespace(); - } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. - - - var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); - - if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { - var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - - if (nodes.length > 0) { - var last = this.current.last; - - if (last) { - var _this$convertWhitespa = this.convertWhitespaceNodesToSpace(nodes), - space = _this$convertWhitespa.space, - rawSpace = _this$convertWhitespa.rawSpace; - - if (rawSpace !== undefined) { - last.rawSpaceAfter += rawSpace; - } - - last.spaces.after += space; - } else { - nodes.forEach(function (n) { - return _this3.newNode(n); - }); - } - } - - return; - } - - var firstToken = this.currToken; - var spaceOrDescendantSelectorNodes = undefined; - - if (nextSigTokenPos > this.position) { - spaceOrDescendantSelectorNodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); - } - - var node; - - if (this.isNamedCombinator()) { - node = this.namedCombinator(); - } else if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.combinator) { - node = new _combinator["default"]({ - value: this.content(), - source: getTokenSource(this.currToken), - sourceIndex: this.currToken[_tokenize.FIELDS.START_POS] - }); - this.position++; - } else if (WHITESPACE_TOKENS[this.currToken[_tokenize.FIELDS.TYPE]]) ; else if (!spaceOrDescendantSelectorNodes) { - this.unexpected(); - } - - if (node) { - if (spaceOrDescendantSelectorNodes) { - var _this$convertWhitespa2 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes), - _space = _this$convertWhitespa2.space, - _rawSpace = _this$convertWhitespa2.rawSpace; - - node.spaces.before = _space; - node.rawSpaceBefore = _rawSpace; - } - } else { - // descendant combinator - var _this$convertWhitespa3 = this.convertWhitespaceNodesToSpace(spaceOrDescendantSelectorNodes, true), - _space2 = _this$convertWhitespa3.space, - _rawSpace2 = _this$convertWhitespa3.rawSpace; - - if (!_rawSpace2) { - _rawSpace2 = _space2; - } - - var spaces = {}; - var raws = { - spaces: {} - }; - - if (_space2.endsWith(' ') && _rawSpace2.endsWith(' ')) { - spaces.before = _space2.slice(0, _space2.length - 1); - raws.spaces.before = _rawSpace2.slice(0, _rawSpace2.length - 1); - } else if (_space2.startsWith(' ') && _rawSpace2.startsWith(' ')) { - spaces.after = _space2.slice(1); - raws.spaces.after = _rawSpace2.slice(1); - } else { - raws.value = _rawSpace2; - } - - node = new _combinator["default"]({ - value: ' ', - source: getTokenSourceSpan(firstToken, this.tokens[this.position - 1]), - sourceIndex: firstToken[_tokenize.FIELDS.START_POS], - spaces: spaces, - raws: raws - }); - } - - if (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.space) { - node.spaces.after = this.optionalSpace(this.content()); - this.position++; - } - - return this.newNode(node); - }; - - _proto.comma = function comma() { - if (this.position === this.tokens.length - 1) { - this.root.trailingComma = true; - this.position++; - return; - } - - this.current._inferEndPosition(); - - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position + 1]) - } - }); - this.current.parent.append(selector); - this.current = selector; - this.position++; - }; - - _proto.comment = function comment() { - var current = this.currToken; - this.newNode(new _comment["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - - _proto.error = function error(message, opts) { - throw this.root.error(message, opts); - }; - - _proto.missingBackslash = function missingBackslash() { - return this.error('Expected a backslash preceding the semicolon.', { - index: this.currToken[_tokenize.FIELDS.START_POS] - }); - }; - - _proto.missingParenthesis = function missingParenthesis() { - return this.expected('opening parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - }; - - _proto.missingSquareBracket = function missingSquareBracket() { - return this.expected('opening square bracket', this.currToken[_tokenize.FIELDS.START_POS]); - }; - - _proto.unexpected = function unexpected() { - return this.error("Unexpected '" + this.content() + "'. Escaping special characters with \\ may help.", this.currToken[_tokenize.FIELDS.START_POS]); - }; - - _proto.namespace = function namespace() { - var before = this.prevToken && this.content(this.prevToken) || true; - - if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.position++; - return this.word(before); - } else if (this.nextToken[_tokenize.FIELDS.TYPE] === tokens.asterisk) { - this.position++; - return this.universal(before); - } - }; - - _proto.nesting = function nesting() { - if (this.nextToken) { - var nextContent = this.content(this.nextToken); - - if (nextContent === "|") { - this.position++; - return; - } - } - - var current = this.currToken; - this.newNode(new _nesting["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - - _proto.parentheses = function parentheses() { - var last = this.current.last; - var unbalanced = 1; - this.position++; - - if (last && last.type === types.PSEUDO) { - var selector = new _selector["default"]({ - source: { - start: tokenStart(this.tokens[this.position - 1]) - } - }); - var cache = this.current; - last.append(selector); - this.current = selector; - - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - - if (unbalanced) { - this.parse(); - } else { - this.current.source.end = tokenEnd(this.currToken); - this.current.parent.source.end = tokenEnd(this.currToken); - this.position++; - } - } - - this.current = cache; - } else { - // I think this case should be an error. It's used to implement a basic parse of media queries - // but I don't think it's a good idea. - var parenStart = this.currToken; - var parenValue = "("; - var parenEnd; - - while (this.position < this.tokens.length && unbalanced) { - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - unbalanced++; - } - - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - unbalanced--; - } - - parenEnd = this.currToken; - parenValue += this.parseParenthesisToken(this.currToken); - this.position++; - } - - if (last) { - last.appendToPropertyAndEscape("value", parenValue, parenValue); - } else { - this.newNode(new _string["default"]({ - value: parenValue, - source: getSource(parenStart[_tokenize.FIELDS.START_LINE], parenStart[_tokenize.FIELDS.START_COL], parenEnd[_tokenize.FIELDS.END_LINE], parenEnd[_tokenize.FIELDS.END_COL]), - sourceIndex: parenStart[_tokenize.FIELDS.START_POS] - })); - } - } - - if (unbalanced) { - return this.expected('closing parenthesis', this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - - _proto.pseudo = function pseudo() { - var _this4 = this; - - var pseudoStr = ''; - var startingToken = this.currToken; - - while (this.currToken && this.currToken[_tokenize.FIELDS.TYPE] === tokens.colon) { - pseudoStr += this.content(); - this.position++; - } - - if (!this.currToken) { - return this.expected(['pseudo-class', 'pseudo-element'], this.position - 1); - } - - if (this.currToken[_tokenize.FIELDS.TYPE] === tokens.word) { - this.splitWord(false, function (first, length) { - pseudoStr += first; - - _this4.newNode(new _pseudo["default"]({ - value: pseudoStr, - source: getTokenSourceSpan(startingToken, _this4.currToken), - sourceIndex: startingToken[_tokenize.FIELDS.START_POS] - })); - - if (length > 1 && _this4.nextToken && _this4.nextToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis) { - _this4.error('Misplaced parenthesis.', { - index: _this4.nextToken[_tokenize.FIELDS.START_POS] - }); - } - }); - } else { - return this.expected(['pseudo-class', 'pseudo-element'], this.currToken[_tokenize.FIELDS.START_POS]); - } - }; - - _proto.space = function space() { - var content = this.content(); // Handle space before and after the selector - - if (this.position === 0 || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.prevToken[_tokenize.FIELDS.TYPE] === tokens.openParenthesis || this.current.nodes.every(function (node) { - return node.type === 'comment'; - })) { - this.spaces = this.optionalSpace(content); - this.position++; - } else if (this.position === this.tokens.length - 1 || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.comma || this.nextToken[_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { - this.current.last.spaces.after = this.optionalSpace(content); - this.position++; - } else { - this.combinator(); - } - }; - - _proto.string = function string() { - var current = this.currToken; - this.newNode(new _string["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - })); - this.position++; - }; - - _proto.universal = function universal(namespace) { - var nextToken = this.nextToken; - - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - - var current = this.currToken; - this.newNode(new _universal["default"]({ - value: this.content(), - source: getTokenSource(current), - sourceIndex: current[_tokenize.FIELDS.START_POS] - }), namespace); - this.position++; - }; - - _proto.splitWord = function splitWord(namespace, firstCallback) { - var _this5 = this; - - var nextToken = this.nextToken; - var word = this.content(); - - while (nextToken && ~[tokens.dollar, tokens.caret, tokens.equals, tokens.word].indexOf(nextToken[_tokenize.FIELDS.TYPE])) { - this.position++; - var current = this.content(); - word += current; - - if (current.lastIndexOf('\\') === current.length - 1) { - var next = this.nextToken; - - if (next && next[_tokenize.FIELDS.TYPE] === tokens.space) { - word += this.requiredSpace(this.content(next)); - this.position++; - } - } - - nextToken = this.nextToken; - } - - var hasClass = indexesOf(word, '.').filter(function (i) { - // Allow escaped dot within class name - var escapedDot = word[i - 1] === '\\'; // Allow decimal numbers percent in @keyframes - - var isKeyframesPercent = /^\d+\.\d+%$/.test(word); - return !escapedDot && !isKeyframesPercent; - }); - var hasId = indexesOf(word, '#').filter(function (i) { - return word[i - 1] !== '\\'; - }); // Eliminate Sass interpolations from the list of id indexes - - var interpolations = indexesOf(word, '#{'); - - if (interpolations.length) { - hasId = hasId.filter(function (hashIndex) { - return !~interpolations.indexOf(hashIndex); - }); - } - - var indices = (0, _sortAscending["default"])(uniqs([0].concat(hasClass, hasId))); - indices.forEach(function (ind, i) { - var index = indices[i + 1] || word.length; - var value = word.slice(ind, index); - - if (i === 0 && firstCallback) { - return firstCallback.call(_this5, value, indices.length); - } - - var node; - var current = _this5.currToken; - var sourceIndex = current[_tokenize.FIELDS.START_POS] + indices[i]; - var source = getSource(current[1], current[2] + ind, current[3], current[2] + (index - 1)); - - if (~hasClass.indexOf(ind)) { - var classNameOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _className["default"](unescapeProp(classNameOpts, "value")); - } else if (~hasId.indexOf(ind)) { - var idOpts = { - value: value.slice(1), - source: source, - sourceIndex: sourceIndex - }; - node = new _id["default"](unescapeProp(idOpts, "value")); - } else { - var tagOpts = { - value: value, - source: source, - sourceIndex: sourceIndex - }; - unescapeProp(tagOpts, "value"); - node = new _tag["default"](tagOpts); - } - - _this5.newNode(node, namespace); // Ensure that the namespace is used only once - - - namespace = null; - }); - this.position++; - }; - - _proto.word = function word(namespace) { - var nextToken = this.nextToken; - - if (nextToken && this.content(nextToken) === '|') { - this.position++; - return this.namespace(); - } - - return this.splitWord(namespace); - }; - - _proto.loop = function loop() { - while (this.position < this.tokens.length) { - this.parse(true); - } - - this.current._inferEndPosition(); - - return this.root; - }; - - _proto.parse = function parse(throwOnParenthesis) { - switch (this.currToken[_tokenize.FIELDS.TYPE]) { - case tokens.space: - this.space(); - break; - - case tokens.comment: - this.comment(); - break; - - case tokens.openParenthesis: - this.parentheses(); - break; - - case tokens.closeParenthesis: - if (throwOnParenthesis) { - this.missingParenthesis(); - } - - break; - - case tokens.openSquare: - this.attribute(); - break; - - case tokens.dollar: - case tokens.caret: - case tokens.equals: - case tokens.word: - this.word(); - break; - - case tokens.colon: - this.pseudo(); - break; - - case tokens.comma: - this.comma(); - break; - - case tokens.asterisk: - this.universal(); - break; - - case tokens.ampersand: - this.nesting(); - break; - - case tokens.slash: - case tokens.combinator: - this.combinator(); - break; - - case tokens.str: - this.string(); - break; - // These cases throw; no break needed. - - case tokens.closeSquare: - this.missingSquareBracket(); - - case tokens.semicolon: - this.missingBackslash(); - - default: - this.unexpected(); - } - } - /** - * Helpers - */ - ; - - _proto.expected = function expected(description, index, found) { - if (Array.isArray(description)) { - var last = description.pop(); - description = description.join(', ') + " or " + last; - } - - var an = /^[aeiou]/.test(description[0]) ? 'an' : 'a'; - - if (!found) { - return this.error("Expected " + an + " " + description + ".", { - index: index - }); - } - - return this.error("Expected " + an + " " + description + ", found \"" + found + "\" instead.", { - index: index - }); - }; - - _proto.requiredSpace = function requiredSpace(space) { - return this.options.lossy ? ' ' : space; - }; - - _proto.optionalSpace = function optionalSpace(space) { - return this.options.lossy ? '' : space; - }; - - _proto.lossySpace = function lossySpace(space, required) { - if (this.options.lossy) { - return required ? ' ' : ''; - } else { - return space; - } - }; - - _proto.parseParenthesisToken = function parseParenthesisToken(token) { - var content = this.content(token); - - if (token[_tokenize.FIELDS.TYPE] === tokens.space) { - return this.requiredSpace(content); - } else { - return content; - } - }; - - _proto.newNode = function newNode(node, namespace) { - if (namespace) { - if (/^ +$/.test(namespace)) { - if (!this.options.lossy) { - this.spaces = (this.spaces || '') + namespace; - } - - namespace = true; - } - - node.namespace = namespace; - unescapeProp(node, "namespace"); - } - - if (this.spaces) { - node.spaces.before = this.spaces; - this.spaces = ''; - } - - return this.current.append(node); - }; - - _proto.content = function content(token) { - if (token === void 0) { - token = this.currToken; - } - - return this.css.slice(token[_tokenize.FIELDS.START_POS], token[_tokenize.FIELDS.END_POS]); - }; - - /** - * returns the index of the next non-whitespace, non-comment token. - * returns -1 if no meaningful token is found. - */ - _proto.locateNextMeaningfulToken = function locateNextMeaningfulToken(startPosition) { - if (startPosition === void 0) { - startPosition = this.position + 1; - } - - var searchPosition = startPosition; - - while (searchPosition < this.tokens.length) { - if (WHITESPACE_EQUIV_TOKENS[this.tokens[searchPosition][_tokenize.FIELDS.TYPE]]) { - searchPosition++; - continue; - } else { - return searchPosition; - } - } - - return -1; - }; - - _createClass(Parser, [{ - key: "currToken", - get: function get() { - return this.tokens[this.position]; - } - }, { - key: "nextToken", - get: function get() { - return this.tokens[this.position + 1]; - } - }, { - key: "prevToken", - get: function get() { - return this.tokens[this.position - 1]; - } - }]); - - return Parser; -}(); - -exports["default"] = Parser; -module.exports = exports.default; -}); - -var processor$1 = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _parser = _interopRequireDefault(parser$1); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -var Processor = /*#__PURE__*/function () { - function Processor(func, options) { - this.func = func || function noop() {}; - - this.funcRes = null; - this.options = options; - } - - var _proto = Processor.prototype; - - _proto._shouldUpdateSelector = function _shouldUpdateSelector(rule, options) { - if (options === void 0) { - options = {}; - } - - var merged = Object.assign({}, this.options, options); - - if (merged.updateSelector === false) { - return false; - } else { - return typeof rule !== "string"; - } - }; - - _proto._isLossy = function _isLossy(options) { - if (options === void 0) { - options = {}; - } - - var merged = Object.assign({}, this.options, options); - - if (merged.lossless === false) { - return true; - } else { - return false; - } - }; - - _proto._root = function _root(rule, options) { - if (options === void 0) { - options = {}; - } - - var parser = new _parser["default"](rule, this._parseOptions(options)); - return parser.root; - }; - - _proto._parseOptions = function _parseOptions(options) { - return { - lossy: this._isLossy(options) - }; - }; - - _proto._run = function _run(rule, options) { - var _this = this; - - if (options === void 0) { - options = {}; - } - - return new Promise(function (resolve, reject) { - try { - var root = _this._root(rule, options); - - Promise.resolve(_this.func(root)).then(function (transform) { - var string = undefined; - - if (_this._shouldUpdateSelector(rule, options)) { - string = root.toString(); - rule.selector = string; - } - - return { - transform: transform, - root: root, - string: string - }; - }).then(resolve, reject); - } catch (e) { - reject(e); - return; - } - }); - }; - - _proto._runSync = function _runSync(rule, options) { - if (options === void 0) { - options = {}; - } - - var root = this._root(rule, options); - - var transform = this.func(root); - - if (transform && typeof transform.then === "function") { - throw new Error("Selector processor returned a promise to a synchronous call."); - } - - var string = undefined; - - if (options.updateSelector && typeof rule !== "string") { - string = root.toString(); - rule.selector = string; - } - - return { - transform: transform, - root: root, - string: string - }; - } - /** - * Process rule into a selector AST. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<parser.Root>} The AST of the selector after processing it. - */ - ; - - _proto.ast = function ast(rule, options) { - return this._run(rule, options).then(function (result) { - return result.root; - }); - } - /** - * Process rule into a selector AST synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {parser.Root} The AST of the selector after processing it. - */ - ; - - _proto.astSync = function astSync(rule, options) { - return this._runSync(rule, options).root; - } - /** - * Process a selector into a transformed value asynchronously - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {Promise<any>} The value returned by the processor. - */ - ; - - _proto.transform = function transform(rule, options) { - return this._run(rule, options).then(function (result) { - return result.transform; - }); - } - /** - * Process a selector into a transformed value synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {any} The value returned by the processor. - */ - ; - - _proto.transformSync = function transformSync(rule, options) { - return this._runSync(rule, options).transform; - } - /** - * Process a selector into a new selector string asynchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */ - ; - - _proto.process = function process(rule, options) { - return this._run(rule, options).then(function (result) { - return result.string || result.root.toString(); - }); - } - /** - * Process a selector into a new selector string synchronously. - * - * @param rule {postcss.Rule | string} The css selector to be processed - * @param options The options for processing - * @returns {string} the selector after processing. - */ - ; - - _proto.processSync = function processSync(rule, options) { - var result = this._runSync(rule, options); - - return result.string || result.root.toString(); - }; - - return Processor; -}(); - -exports["default"] = Processor; -module.exports = exports.default; -}); - -/*@__PURE__*/getDefaultExportFromCjs(processor$1); - -var constructors = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = void 0; - -var _attribute = _interopRequireDefault(attribute); - -var _className = _interopRequireDefault(className); - -var _combinator = _interopRequireDefault(combinator); - -var _comment = _interopRequireDefault(comment$1); - -var _id = _interopRequireDefault(id); - -var _nesting = _interopRequireDefault(nesting); - -var _pseudo = _interopRequireDefault(pseudo); - -var _root = _interopRequireDefault(root$1); - -var _selector = _interopRequireDefault(selector); - -var _string = _interopRequireDefault(string); - -var _tag = _interopRequireDefault(tag); - -var _universal = _interopRequireDefault(universal); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -var attribute$1 = function attribute(opts) { - return new _attribute["default"](opts); -}; - -exports.attribute = attribute$1; - -var className$1 = function className(opts) { - return new _className["default"](opts); -}; - -exports.className = className$1; - -var combinator$1 = function combinator(opts) { - return new _combinator["default"](opts); -}; - -exports.combinator = combinator$1; - -var comment = function comment(opts) { - return new _comment["default"](opts); -}; - -exports.comment = comment; - -var id$1 = function id(opts) { - return new _id["default"](opts); -}; - -exports.id = id$1; - -var nesting$1 = function nesting(opts) { - return new _nesting["default"](opts); -}; - -exports.nesting = nesting$1; - -var pseudo$1 = function pseudo(opts) { - return new _pseudo["default"](opts); -}; - -exports.pseudo = pseudo$1; - -var root = function root(opts) { - return new _root["default"](opts); -}; - -exports.root = root; - -var selector$1 = function selector(opts) { - return new _selector["default"](opts); -}; - -exports.selector = selector$1; - -var string$1 = function string(opts) { - return new _string["default"](opts); -}; - -exports.string = string$1; - -var tag$1 = function tag(opts) { - return new _tag["default"](opts); -}; - -exports.tag = tag$1; - -var universal$1 = function universal(opts) { - return new _universal["default"](opts); -}; - -exports.universal = universal$1; -}); - -var guards = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports.isNode = isNode; -exports.isPseudoElement = isPseudoElement; -exports.isPseudoClass = isPseudoClass; -exports.isContainer = isContainer; -exports.isNamespace = isNamespace; -exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = void 0; - - - -var _IS_TYPE; - -var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[types$1.ATTRIBUTE] = true, _IS_TYPE[types$1.CLASS] = true, _IS_TYPE[types$1.COMBINATOR] = true, _IS_TYPE[types$1.COMMENT] = true, _IS_TYPE[types$1.ID] = true, _IS_TYPE[types$1.NESTING] = true, _IS_TYPE[types$1.PSEUDO] = true, _IS_TYPE[types$1.ROOT] = true, _IS_TYPE[types$1.SELECTOR] = true, _IS_TYPE[types$1.STRING] = true, _IS_TYPE[types$1.TAG] = true, _IS_TYPE[types$1.UNIVERSAL] = true, _IS_TYPE); - -function isNode(node) { - return typeof node === "object" && IS_TYPE[node.type]; -} - -function isNodeType(type, node) { - return isNode(node) && node.type === type; -} - -var isAttribute = isNodeType.bind(null, types$1.ATTRIBUTE); -exports.isAttribute = isAttribute; -var isClassName = isNodeType.bind(null, types$1.CLASS); -exports.isClassName = isClassName; -var isCombinator = isNodeType.bind(null, types$1.COMBINATOR); -exports.isCombinator = isCombinator; -var isComment = isNodeType.bind(null, types$1.COMMENT); -exports.isComment = isComment; -var isIdentifier = isNodeType.bind(null, types$1.ID); -exports.isIdentifier = isIdentifier; -var isNesting = isNodeType.bind(null, types$1.NESTING); -exports.isNesting = isNesting; -var isPseudo = isNodeType.bind(null, types$1.PSEUDO); -exports.isPseudo = isPseudo; -var isRoot = isNodeType.bind(null, types$1.ROOT); -exports.isRoot = isRoot; -var isSelector = isNodeType.bind(null, types$1.SELECTOR); -exports.isSelector = isSelector; -var isString = isNodeType.bind(null, types$1.STRING); -exports.isString = isString; -var isTag = isNodeType.bind(null, types$1.TAG); -exports.isTag = isTag; -var isUniversal = isNodeType.bind(null, types$1.UNIVERSAL); -exports.isUniversal = isUniversal; - -function isPseudoElement(node) { - return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value.toLowerCase() === ":before" || node.value.toLowerCase() === ":after"); -} - -function isPseudoClass(node) { - return isPseudo(node) && !isPseudoElement(node); -} - -function isContainer(node) { - return !!(isNode(node) && node.walk); -} - -function isNamespace(node) { - return isAttribute(node) || isTag(node); -} -}); - -var selectors = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; - - - -Object.keys(types$1).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === types$1[key]) return; - exports[key] = types$1[key]; -}); - - - -Object.keys(constructors).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === constructors[key]) return; - exports[key] = constructors[key]; -}); - - - -Object.keys(guards).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (key in exports && exports[key] === guards[key]) return; - exports[key] = guards[key]; -}); -}); - -var dist = createCommonjsModule(function (module, exports) { - -exports.__esModule = true; -exports["default"] = void 0; - -var _processor = _interopRequireDefault(processor$1); - -var selectors$1 = _interopRequireWildcard(selectors); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - -var parser = function parser(processor) { - return new _processor["default"](processor); -}; - -Object.assign(parser, selectors$1); -delete parser.__esModule; -var _default = parser; -exports["default"] = _default; -module.exports = exports.default; -}); - -var selectorParser = /*@__PURE__*/getDefaultExportFromCjs(dist); - -const animationNameRE = /^(-\w+-)?animation-name$/; -const animationRE = /^(-\w+-)?animation$/; -const scopedPlugin = (id = '') => { - const keyframes = Object.create(null); - const shortId = id.replace(/^data-v-/, ''); - return { - postcssPlugin: 'vue-sfc-scoped', - Rule(rule) { - processRule(id, rule); - }, - AtRule(node) { - if (/-?keyframes$/.test(node.name) && - !node.params.endsWith(`-${shortId}`)) { - // register keyframes - keyframes[node.params] = node.params = node.params + '-' + shortId; - } - }, - OnceExit(root) { - if (Object.keys(keyframes).length) { - // If keyframes are found in this <style>, find and rewrite animation names - // in declarations. - // Caveat: this only works for keyframes and animation rules in the same - // <style> element. - // individual animation-name declaration - root.walkDecls(decl => { - if (animationNameRE.test(decl.prop)) { - decl.value = decl.value - .split(',') - .map(v => keyframes[v.trim()] || v.trim()) - .join(','); - } - // shorthand - if (animationRE.test(decl.prop)) { - decl.value = decl.value - .split(',') - .map(v => { - const vals = v.trim().split(/\s+/); - const i = vals.findIndex(val => keyframes[val]); - if (i !== -1) { - vals.splice(i, 1, keyframes[vals[i]]); - return vals.join(' '); - } - else { - return v; - } - }) - .join(','); - } - }); - } - } - }; -}; -const processedRules = new WeakSet(); -function processRule(id, rule) { - if (processedRules.has(rule) || - (rule.parent && - rule.parent.type === 'atrule' && - /-?keyframes$/.test(rule.parent.name))) { - return; - } - processedRules.add(rule); - rule.selector = selectorParser(selectorRoot => { - selectorRoot.each(selector => { - rewriteSelector(id, selector, selectorRoot); - }); - }).processSync(rule.selector); -} -function rewriteSelector(id, selector, selectorRoot, slotted = false) { - let node = null; - let shouldInject = true; - // find the last child node to insert attribute selector - selector.each(n => { - // DEPRECATED ">>>" and "/deep/" combinator - if (n.type === 'combinator' && - (n.value === '>>>' || n.value === '/deep/')) { - n.value = ' '; - n.spaces.before = n.spaces.after = ''; - warn(`the >>> and /deep/ combinators have been deprecated. ` + - `Use :deep() instead.`); - return false; - } - if (n.type === 'pseudo') { - const { value } = n; - // deep: inject [id] attribute at the node before the ::v-deep - // combinator. - if (value === ':deep' || value === '::v-deep') { - if (n.nodes.length) { - // .foo ::v-deep(.bar) -> .foo[xxxxxxx] .bar - // replace the current node with ::v-deep's inner selector - let last = n; - n.nodes[0].each(ss => { - selector.insertAfter(last, ss); - last = ss; - }); - // insert a space combinator before if it doesn't already have one - const prev = selector.at(selector.index(n) - 1); - if (!prev || !isSpaceCombinator(prev)) { - selector.insertAfter(n, selectorParser.combinator({ - value: ' ' - })); - } - selector.removeChild(n); - } - else { - // DEPRECATED usage - // .foo ::v-deep .bar -> .foo[xxxxxxx] .bar - warn(`::v-deep usage as a combinator has ` + - `been deprecated. Use :deep(<inner-selector>) instead.`); - const prev = selector.at(selector.index(n) - 1); - if (prev && isSpaceCombinator(prev)) { - selector.removeChild(prev); - } - selector.removeChild(n); - } - return false; - } - // slot: use selector inside `::v-slotted` and inject [id + '-s'] - // instead. - // ::v-slotted(.foo) -> .foo[xxxxxxx-s] - if (value === ':slotted' || value === '::v-slotted') { - rewriteSelector(id, n.nodes[0], selectorRoot, true /* slotted */); - let last = n; - n.nodes[0].each(ss => { - selector.insertAfter(last, ss); - last = ss; - }); - // selector.insertAfter(n, n.nodes[0]) - selector.removeChild(n); - // since slotted attribute already scopes the selector there's no - // need for the non-slot attribute. - shouldInject = false; - return false; - } - // global: replace with inner selector and do not inject [id]. - // ::v-global(.foo) -> .foo - if (value === ':global' || value === '::v-global') { - selectorRoot.insertAfter(selector, n.nodes[0]); - selectorRoot.removeChild(selector); - return false; - } - } - if (n.type !== 'pseudo' && n.type !== 'combinator') { - node = n; - } - }); - if (node) { - node.spaces.after = ''; - } - else { - // For deep selectors & standalone pseudo selectors, - // the attribute selectors are prepended rather than appended. - // So all leading spaces must be eliminated to avoid problems. - selector.first.spaces.before = ''; - } - if (shouldInject) { - const idToAdd = slotted ? id + '-s' : id; - selector.insertAfter( - // If node is null it means we need to inject [id] at the start - // insertAfter can handle `null` here - node, selectorParser.attribute({ - attribute: idToAdd, - value: idToAdd, - raws: {}, - quoteMark: `"` - })); - } -} -function isSpaceCombinator(node) { - return node.type === 'combinator' && /^\s+$/.test(node.value); -} -scopedPlugin.postcss = true; - -var SourceMapConsumer$7 = sourceMap.SourceMapConsumer; -var SourceMapGenerator$9 = sourceMap.SourceMapGenerator; - -var mergeSourceMap = merge$1; +var mergeSourceMap = merge; /** * Merge old source map and new source map and return merged. @@ -49093,13 +43919,13 @@ var mergeSourceMap = merge$1; * @param {object|string} [newmap] new source map object * @return {object|undefined} merged source map object, or undefined when both old and new source map are undefined */ -function merge$1(oldMap, newMap) { +function merge(oldMap, newMap) { if (!oldMap) return newMap if (!newMap) return oldMap - var oldMapConsumer = new SourceMapConsumer$7(oldMap); - var newMapConsumer = new SourceMapConsumer$7(newMap); - var mergedMapGenerator = new SourceMapGenerator$9(); + var oldMapConsumer = new SourceMapConsumer(oldMap); + var newMapConsumer = new SourceMapConsumer(newMap); + var mergedMapGenerator = new SourceMapGenerator(); // iterate on new map and overwrite original position of new map with one of old map newMapConsumer.eachMapping(function(m) { @@ -49145,199 +43971,4688 @@ function merge$1(oldMap, newMap) { return JSON.parse(mergedMapGenerator.toString()) } -// .scss/.sass processor +var merge$1 = /*@__PURE__*/getDefaultExportFromCjs(mergeSourceMap); + +var __defProp$5 = Object.defineProperty; +var __defProps$4 = Object.defineProperties; +var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols; +var __hasOwnProp$5 = Object.prototype.hasOwnProperty; +var __propIsEnum$5 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$5 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$5.call(b, prop)) + __defNormalProp$5(a, prop, b[prop]); + if (__getOwnPropSymbols$5) + for (var prop of __getOwnPropSymbols$5(b)) { + if (__propIsEnum$5.call(b, prop)) + __defNormalProp$5(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b)); const scss = (source, map, options, load = require) => { - const nodeSass = load('sass'); - const finalOptions = Object.assign(Object.assign({}, options), { data: getSource(source, options.filename, options.additionalData), file: options.filename, outFile: options.filename, sourceMap: !!map }); - try { - const result = nodeSass.renderSync(finalOptions); - const dependencies = result.stats.includedFiles; - if (map) { - return { - code: result.css.toString(), - map: mergeSourceMap(map, JSON.parse(result.map.toString())), - errors: [], - dependencies - }; - } - return { code: result.css.toString(), errors: [], dependencies }; - } - catch (e) { - return { code: '', errors: [e], dependencies: [] }; - } -}; -const sass = (source, map, options, load) => scss(source, map, Object.assign(Object.assign({}, options), { indentedSyntax: true }), load); -// .less -const less = (source, map, options, load = require) => { - const nodeLess = load('less'); - let result; - let error = null; - nodeLess.render(getSource(source, options.filename, options.additionalData), Object.assign(Object.assign({}, options), { syncImport: true }), (err, output) => { - error = err; - result = output; - }); - if (error) - return { code: '', errors: [error], dependencies: [] }; - const dependencies = result.imports; + const nodeSass = load("sass"); + const finalOptions = __spreadProps$4(__spreadValues$5({}, options), { + data: getSource(source, options.filename, options.additionalData), + file: options.filename, + outFile: options.filename, + sourceMap: !!map + }); + try { + const result = nodeSass.renderSync(finalOptions); + const dependencies = result.stats.includedFiles; if (map) { - return { - code: result.css.toString(), - map: mergeSourceMap(map, result.map), - errors: [], - dependencies: dependencies - }; - } - return { + return { code: result.css.toString(), + map: merge$1(map, JSON.parse(result.map.toString())), errors: [], - dependencies: dependencies - }; + dependencies + }; + } + return { code: result.css.toString(), errors: [], dependencies }; + } catch (e) { + return { code: "", errors: [e], dependencies: [] }; + } +}; +const sass = (source, map, options, load) => scss( + source, + map, + __spreadProps$4(__spreadValues$5({}, options), { + indentedSyntax: true + }), + load +); +const less = (source, map, options, load = require) => { + const nodeLess = load("less"); + let result; + let error = null; + nodeLess.render( + getSource(source, options.filename, options.additionalData), + __spreadProps$4(__spreadValues$5({}, options), { syncImport: true }), + (err, output) => { + error = err; + result = output; + } + ); + if (error) + return { code: "", errors: [error], dependencies: [] }; + const dependencies = result.imports; + if (map) { + return { + code: result.css.toString(), + map: merge$1(map, result.map), + errors: [], + dependencies + }; + } + return { + code: result.css.toString(), + errors: [], + dependencies + }; }; -// .styl const styl = (source, map, options, load = require) => { - const nodeStylus = load('stylus'); - try { - const ref = nodeStylus(source); - Object.keys(options).forEach(key => ref.set(key, options[key])); - if (map) - ref.set('sourcemap', { inline: false, comment: false }); - const result = ref.render(); - const dependencies = ref.deps(); - if (map) { - return { - code: result, - map: mergeSourceMap(map, ref.sourcemap), - errors: [], - dependencies - }; - } - return { code: result, errors: [], dependencies }; - } - catch (e) { - return { code: '', errors: [e], dependencies: [] }; + const nodeStylus = load("stylus"); + try { + const ref = nodeStylus(source, options); + if (map) + ref.set("sourcemap", { inline: false, comment: false }); + const result = ref.render(); + const dependencies = ref.deps(); + if (map) { + return { + code: result, + map: merge$1(map, ref.sourcemap), + errors: [], + dependencies + }; } + return { code: result, errors: [], dependencies }; + } catch (e) { + return { code: "", errors: [e], dependencies: [] }; + } }; function getSource(source, filename, additionalData) { - if (!additionalData) - return source; - if (isFunction(additionalData)) { - return additionalData(source, filename); - } - return additionalData + source; + if (!additionalData) + return source; + if (isFunction$1(additionalData)) { + return additionalData(source, filename); + } + return additionalData + source; } const processors = { - less, - sass, - scss, - styl, - stylus: styl + less, + sass, + scss, + styl, + stylus: styl }; +var __defProp$4 = Object.defineProperty; +var __defProps$3 = Object.defineProperties; +var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols; +var __hasOwnProp$4 = Object.prototype.hasOwnProperty; +var __propIsEnum$4 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$4 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$4.call(b, prop)) + __defNormalProp$4(a, prop, b[prop]); + if (__getOwnPropSymbols$4) + for (var prop of __getOwnPropSymbols$4(b)) { + if (__propIsEnum$4.call(b, prop)) + __defNormalProp$4(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b)); function compileStyle(options) { - return doCompileStyle(Object.assign(Object.assign({}, options), { isAsync: false })); + return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), { + isAsync: false + })); } function compileStyleAsync(options) { - return doCompileStyle(Object.assign(Object.assign({}, options), { isAsync: true })); + return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), { + isAsync: true + })); } function doCompileStyle(options) { - const { filename, id, scoped = false, trim = true, isProd = false, modules = false, modulesOptions = {}, preprocessLang, postcssOptions, postcssPlugins } = options; - const preprocessor = preprocessLang && processors[preprocessLang]; - const preProcessedSource = preprocessor && preprocess$1(options, preprocessor); - const map = preProcessedSource - ? preProcessedSource.map - : options.inMap || options.map; - const source = preProcessedSource ? preProcessedSource.code : options.source; - const shortId = id.replace(/^data-v-/, ''); - const longId = `data-v-${shortId}`; - const plugins = (postcssPlugins || []).slice(); - plugins.unshift(cssVarsPlugin({ id: shortId, isProd })); - if (trim) { - plugins.push(trimPlugin()); + const { + filename, + id, + scoped = false, + trim = true, + isProd = false, + modules = false, + modulesOptions = {}, + preprocessLang, + postcssOptions, + postcssPlugins + } = options; + const preprocessor = preprocessLang && processors[preprocessLang]; + const preProcessedSource = preprocessor && preprocess(options, preprocessor); + const map = preProcessedSource ? preProcessedSource.map : options.inMap || options.map; + const source = preProcessedSource ? preProcessedSource.code : options.source; + const shortId = id.replace(/^data-v-/, ""); + const longId = `data-v-${shortId}`; + const plugins = (postcssPlugins || []).slice(); + plugins.unshift(cssVarsPlugin({ id: shortId, isProd })); + if (trim) { + plugins.push(trimPlugin$1()); + } + if (scoped) { + plugins.push(scopedPlugin$1(longId)); + } + let cssModules; + if (modules) { + { + throw new Error( + "[@vue/compiler-sfc] `modules` option is not supported in the browser build." + ); } - if (scoped) { - plugins.push(scopedPlugin(longId)); - } - let cssModules; - if (modules) { - { - throw new Error('[@vue/compiler-sfc] `modules` option is not supported in the browser build.'); - } - } - const postCSSOptions = Object.assign(Object.assign({}, postcssOptions), { to: filename, from: filename }); - if (map) { - postCSSOptions.map = { - inline: false, - annotation: false, - prev: map - }; - } - let result; - let code; - let outMap; - // stylus output include plain css. so need remove the repeat item - const dependencies = new Set(preProcessedSource ? preProcessedSource.dependencies : []); - // sass has filename self when provided filename option - dependencies.delete(filename); - const errors = []; - if (preProcessedSource && preProcessedSource.errors.length) { - errors.push(...preProcessedSource.errors); - } - const recordPlainCssDependencies = (messages) => { - messages.forEach(msg => { - if (msg.type === 'dependency') { - // postcss output path is absolute position path - dependencies.add(msg.file); - } - }); - return dependencies; + } + const postCSSOptions = __spreadProps$3(__spreadValues$4({}, postcssOptions), { + to: filename, + from: filename + }); + if (map) { + postCSSOptions.map = { + inline: false, + annotation: false, + prev: map }; - try { - result = postcss_1(plugins).process(source, postCSSOptions); - // In async mode, return a promise. - if (options.isAsync) { - return result - .then(result => ({ - code: result.css || '', - map: result.map && result.map.toJSON(), - errors, - modules: cssModules, - rawResult: result, - dependencies: recordPlainCssDependencies(result.messages) - })) - .catch(error => ({ - code: '', - map: undefined, - errors: [...errors, error], - rawResult: undefined, - dependencies - })); - } - recordPlainCssDependencies(result.messages); - // force synchronous transform (we know we only have sync plugins) - code = result.css; - outMap = result.map; - } - catch (e) { - errors.push(e); - } - return { - code: code || ``, - map: outMap && outMap.toJSON(), + } + let result; + let code; + let outMap; + const dependencies = new Set( + preProcessedSource ? preProcessedSource.dependencies : [] + ); + dependencies.delete(filename); + const errors = []; + if (preProcessedSource && preProcessedSource.errors.length) { + errors.push(...preProcessedSource.errors); + } + const recordPlainCssDependencies = (messages) => { + messages.forEach((msg) => { + if (msg.type === "dependency") { + dependencies.add(msg.file); + } + }); + return dependencies; + }; + try { + result = postcss$1(plugins).process(source, postCSSOptions); + if (options.isAsync) { + return result.then((result2) => ({ + code: result2.css || "", + map: result2.map && result2.map.toJSON(), errors, - rawResult: result, + modules: cssModules, + rawResult: result2, + dependencies: recordPlainCssDependencies(result2.messages) + })).catch((error) => ({ + code: "", + map: void 0, + errors: [...errors, error], + rawResult: void 0, dependencies - }; -} -function preprocess$1(options, preprocessor) { - if (!options.preprocessCustomRequire) { - throw new Error(`[@vue/compiler-sfc] Style preprocessing in the browser build must ` + - `provide the \`preprocessCustomRequire\` option to return the in-browser ` + - `version of the preprocessor.`); + })); } - return preprocessor(options.source, options.inMap || options.map, Object.assign({ filename: options.filename }, options.preprocessOptions), options.preprocessCustomRequire); + recordPlainCssDependencies(result.messages); + code = result.css; + outMap = result.map; + } catch (e) { + errors.push(e); + } + return { + code: code || ``, + map: outMap && outMap.toJSON(), + errors, + rawResult: result, + dependencies + }; +} +function preprocess(options, preprocessor) { + if (!options.preprocessCustomRequire) { + throw new Error( + `[@vue/compiler-sfc] Style preprocessing in the browser build must provide the \`preprocessCustomRequire\` option to return the in-browser version of the preprocessor.` + ); + } + return preprocessor( + options.source, + options.inMap || options.map, + __spreadValues$4({ + filename: options.filename + }, options.preprocessOptions), + options.preprocessCustomRequire + ); } -// API -const walk$2 = walk$1; +function analyzeScriptBindings(ast) { + for (const node of ast) { + if (node.type === "ExportDefaultDeclaration" && node.declaration.type === "ObjectExpression") { + return analyzeBindingsFromOptions(node.declaration); + } + } + return {}; +} +function analyzeBindingsFromOptions(node) { + const bindings = {}; + Object.defineProperty(bindings, "__isScriptSetup", { + enumerable: false, + value: false + }); + for (const property of node.properties) { + if (property.type === "ObjectProperty" && !property.computed && property.key.type === "Identifier") { + if (property.key.name === "props") { + for (const key of getObjectOrArrayExpressionKeys(property.value)) { + bindings[key] = "props"; + } + } else if (property.key.name === "inject") { + for (const key of getObjectOrArrayExpressionKeys(property.value)) { + bindings[key] = "options"; + } + } else if (property.value.type === "ObjectExpression" && (property.key.name === "computed" || property.key.name === "methods")) { + for (const key of getObjectExpressionKeys(property.value)) { + bindings[key] = "options"; + } + } + } else if (property.type === "ObjectMethod" && property.key.type === "Identifier" && (property.key.name === "setup" || property.key.name === "data")) { + for (const bodyItem of property.body.body) { + if (bodyItem.type === "ReturnStatement" && bodyItem.argument && bodyItem.argument.type === "ObjectExpression") { + for (const key of getObjectExpressionKeys(bodyItem.argument)) { + bindings[key] = property.key.name === "setup" ? "setup-maybe-ref" : "data"; + } + } + } + } + } + return bindings; +} +function getObjectExpressionKeys(node) { + const keys = []; + for (const prop of node.properties) { + if (prop.type === "SpreadElement") + continue; + const key = resolveObjectKey(prop.key, prop.computed); + if (key) + keys.push(String(key)); + } + return keys; +} +function getArrayExpressionKeys(node) { + const keys = []; + for (const element of node.elements) { + if (element && element.type === "StringLiteral") { + keys.push(element.value); + } + } + return keys; +} +function getObjectOrArrayExpressionKeys(value) { + if (value.type === "ArrayExpression") { + return getArrayExpressionKeys(value); + } + if (value.type === "ObjectExpression") { + return getObjectExpressionKeys(value); + } + return []; +} -export { MagicString, parse_1 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, extractIdentifiers, generateCodeFrame, isInDestructureAssignment, isStaticProperty, parse$4 as parse, rewriteDefault, shouldTransform as shouldTransformRef, transform$1 as transformRef, transformAST as transformRefAST, walk$2 as walk, walkIdentifiers }; +const comma = ','.charCodeAt(0); +const semicolon = ';'.charCodeAt(0); +const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +const intToChar = new Uint8Array(64); // 64 possible chars. +const charToInt = new Uint8Array(128); // z is 122 in ASCII +for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; +} +// Provide a fallback for older environments. +const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; +function encode(decoded) { + const state = new Int32Array(5); + const bufLength = 1024 * 16; + const subLength = bufLength - 36; + const buf = new Uint8Array(bufLength); + const sub = buf.subarray(0, subLength); + let pos = 0; + let out = ''; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) { + if (pos === bufLength) { + out += td.decode(buf); + pos = 0; + } + buf[pos++] = semicolon; + } + if (line.length === 0) + continue; + state[0] = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + // We can push up to 5 ints, each int can take at most 7 chars, and we + // may push a comma. + if (pos > subLength) { + out += td.decode(sub); + buf.copyWithin(0, subLength, pos); + pos -= subLength; + } + if (j > 0) + buf[pos++] = comma; + pos = encodeInteger(buf, pos, state, segment, 0); // genColumn + if (segment.length === 1) + continue; + pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex + pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine + pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn + if (segment.length === 4) + continue; + pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex + } + } + return out + td.decode(buf.subarray(0, pos)); +} +function encodeInteger(buf, pos, state, segment, j) { + const next = segment[j]; + let num = next - state[j]; + state[j] = next; + num = num < 0 ? (-num << 1) | 1 : num << 1; + do { + let clamped = num & 0b011111; + num >>>= 5; + if (num > 0) + clamped |= 0b100000; + buf[pos++] = intToChar[clamped]; + } while (num > 0); + return pos; +} + +class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; + } + + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); + } + + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } +} + +class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + + this.intro = ''; + this.outro = ''; + + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } +} + +function getBtoa() { + if (typeof window !== 'undefined' && typeof window.btoa === 'function') { + return (str) => window.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } +} + +const btoa = /*#__PURE__*/ getBtoa(); + +class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); + } +} + +function guessIndent(code) { + const lines = code.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return null; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; + return Math.min(numSpaces, previous); + }, Infinity); + + return new Array(min + 1).join(' '); +} + +function getRelativePath(from, to) { + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); + + fromParts.pop(); // get dirname + + while (fromParts[0] === toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + if (fromParts.length) { + let i = fromParts.length; + while (i--) fromParts[i] = '..'; + } + + return fromParts.concat(toParts).join('/'); +} + +const toString = Object.prototype.toString; + +function isObject(thing) { + return toString.call(thing) === '[object Object]'; +} + +function getLocator(source) { + const originalLines = source.split('\n'); + const lineOffsets = []; + + for (let i = 0, pos = 0; i < originalLines.length; i++) { + lineOffsets.push(pos); + pos += originalLines[i].length + 1; + } + + return function locate(index) { + let i = 0; + let j = lineOffsets.length; + while (i < j) { + const m = (i + j) >> 1; + if (index < lineOffsets[m]) { + j = m; + } else { + i = m + 1; + } + } + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; + }; +} + +const wordRegex = /\w/; + +class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; + this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; + } + + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + while (contentLineEnd >= 0) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + } else { + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } +} + +const n = '\n'; + +const warned = { + insertLeft: false, + insertRight: false, + storeName: false, +}; + +class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); + + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, + }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; + } + + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } + + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.outro += content; + return this; + } + + appendLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); + } else { + this.intro += content; + } + return this; + } + + appendRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { + if (!isExcluded[charIndex]) { + chunk.content = chunk.content.replace(pattern, replacer); + + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; + } + } + } else { + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } + } + + charIndex = chunk.end; + chunk = chunk.next; + } + + this.outro = this.outro.replace(pattern, replacer); + + return this; + } + + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } + + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); // eslint-disable-line no-console + warned.insertLeft = true; + } + + return this.appendLeft(index, content); + } + + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); // eslint-disable-line no-console + warned.insertRight = true; + } + + return this.prependRight(index, content); + } + + move(start, end, index) { + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); // eslint-disable-line no-console + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, + }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; + } + + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.intro = content + this.intro; + return this; + } + + prependLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } + + prependRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } + + remove(start, end) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; + do { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { + break; + } + + chunk = chunk.next; + } + + return result; + } + + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); + + return clone; + } + + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; + + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; + } + } + + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) + this.overwrite( + match.index, + match.index + match[0].length, + getReplacement(match, this.original), + ); + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) + this.overwrite( + match.index, + match.index + match[0].length, + getReplacement(match, this.original), + ); + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } +} + +var _a, _b; +class ScriptCompileContext { + constructor(descriptor, options) { + this.descriptor = descriptor; + this.options = options; + this.isCE = false; + this.source = this.descriptor.source; + this.filename = this.descriptor.filename; + this.s = new MagicString(this.source); + this.startOffset = (_a = this.descriptor.scriptSetup) == null ? void 0 : _a.loc.start.offset; + this.endOffset = (_b = this.descriptor.scriptSetup) == null ? void 0 : _b.loc.end.offset; + this.userImports = /* @__PURE__ */ Object.create(null); + // macros presence check + this.hasDefinePropsCall = false; + this.hasDefineEmitCall = false; + this.hasDefineExposeCall = false; + this.hasDefaultExportName = false; + this.hasDefaultExportRender = false; + this.hasDefineOptionsCall = false; + this.hasDefineSlotsCall = false; + this.hasDefineModelCall = false; + this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null); + // defineModel + this.modelDecls = /* @__PURE__ */ Object.create(null); + // codegen + this.bindingMetadata = {}; + this.helperImports = /* @__PURE__ */ new Set(); + const { script, scriptSetup } = descriptor; + const scriptLang = script && script.lang; + const scriptSetupLang = scriptSetup && scriptSetup.lang; + this.isJS = scriptLang === "js" || scriptLang === "jsx" || scriptSetupLang === "js" || scriptSetupLang === "jsx"; + this.isTS = scriptLang === "ts" || scriptLang === "tsx" || scriptSetupLang === "ts" || scriptSetupLang === "tsx"; + const customElement = options.customElement; + const filename = this.descriptor.filename; + if (customElement) { + this.isCE = typeof customElement === "boolean" ? customElement : customElement(filename); + } + const plugins = resolveParserPlugins( + scriptLang || scriptSetupLang, + options.babelParserPlugins + ); + function parse(input, offset) { + try { + return parse_1$1(input, { + plugins, + sourceType: "module" + }).program; + } catch (e) { + e.message = `[vue/compiler-sfc] ${e.message} + +${descriptor.filename} +${generateCodeFrame( + descriptor.source, + e.pos + offset, + e.pos + offset + 1 + )}`; + throw e; + } + } + this.scriptAst = descriptor.script && parse(descriptor.script.content, descriptor.script.loc.start.offset); + this.scriptSetupAst = descriptor.scriptSetup && parse(descriptor.scriptSetup.content, this.startOffset); + } + helper(key) { + this.helperImports.add(key); + return `_${key}`; + } + getString(node, scriptSetup = true) { + const block = scriptSetup ? this.descriptor.scriptSetup : this.descriptor.script; + return block.content.slice(node.start, node.end); + } + error(msg, node, scope) { + const offset = scope ? scope.offset : this.startOffset; + throw new Error( + `[@vue/compiler-sfc] ${msg} + +${(scope || this.descriptor).filename} +${generateCodeFrame( + (scope || this.descriptor).source, + node.start + offset, + node.end + offset + )}` + ); + } +} +function resolveParserPlugins(lang, userPlugins, dts = false) { + const plugins = []; + if (!userPlugins || !userPlugins.some( + (p) => p === "importAssertions" || p === "importAttributes" || isArray$3(p) && p[0] === "importAttributes" + )) { + plugins.push("importAttributes"); + } + if (lang === "jsx" || lang === "tsx") { + plugins.push("jsx"); + } else if (userPlugins) { + userPlugins = userPlugins.filter((p) => p !== "jsx"); + } + if (lang === "ts" || lang === "tsx") { + plugins.push(["typescript", { dts }], "explicitResourceManagement"); + if (!userPlugins || !userPlugins.includes("decorators")) { + plugins.push("decorators-legacy"); + } + } + if (userPlugins) { + plugins.push(...userPlugins); + } + return plugins; +} + +function rewriteDefault(input, as, parserPlugins) { + const ast = parse_1$1(input, { + sourceType: "module", + plugins: resolveParserPlugins("js", parserPlugins) + }).program.body; + const s = new MagicString(input); + rewriteDefaultAST(ast, s, as); + return s.toString(); +} +function rewriteDefaultAST(ast, s, as) { + if (!hasDefaultExport(ast)) { + s.append(` +const ${as} = {}`); + return; + } + ast.forEach((node) => { + if (node.type === "ExportDefaultDeclaration") { + if (node.declaration.type === "ClassDeclaration" && node.declaration.id) { + let start = node.declaration.decorators && node.declaration.decorators.length > 0 ? node.declaration.decorators[node.declaration.decorators.length - 1].end : node.start; + s.overwrite(start, node.declaration.id.start, ` class `); + s.append(` +const ${as} = ${node.declaration.id.name}`); + } else { + s.overwrite(node.start, node.declaration.start, `const ${as} = `); + } + } else if (node.type === "ExportNamedDeclaration") { + for (const specifier of node.specifiers) { + if (specifier.type === "ExportSpecifier" && specifier.exported.type === "Identifier" && specifier.exported.name === "default") { + if (node.source) { + if (specifier.local.name === "default") { + s.prepend( + `import { default as __VUE_DEFAULT__ } from '${node.source.value}' +` + ); + const end2 = specifierEnd(s, specifier.local.end, node.end); + s.remove(specifier.start, end2); + s.append(` +const ${as} = __VUE_DEFAULT__`); + continue; + } else { + s.prepend( + `import { ${s.slice( + specifier.local.start, + specifier.local.end + )} as __VUE_DEFAULT__ } from '${node.source.value}' +` + ); + const end2 = specifierEnd(s, specifier.exported.end, node.end); + s.remove(specifier.start, end2); + s.append(` +const ${as} = __VUE_DEFAULT__`); + continue; + } + } + const end = specifierEnd(s, specifier.end, node.end); + s.remove(specifier.start, end); + s.append(` +const ${as} = ${specifier.local.name}`); + } + } + } + }); +} +function hasDefaultExport(ast) { + for (const stmt of ast) { + if (stmt.type === "ExportDefaultDeclaration") { + return true; + } else if (stmt.type === "ExportNamedDeclaration" && stmt.specifiers.some( + (spec) => spec.exported.name === "default" + )) { + return true; + } + } + return false; +} +function specifierEnd(s, end, nodeEnd) { + let hasCommas = false; + let oldEnd = end; + while (end < nodeEnd) { + if (/\s/.test(s.slice(end, end + 1))) { + end++; + } else if (s.slice(end, end + 1) === ",") { + end++; + hasCommas = true; + break; + } else if (s.slice(end, end + 1) === "}") { + break; + } + } + return hasCommas ? end : oldEnd; +} + +var __defProp$3 = Object.defineProperty; +var __defProps$2 = Object.defineProperties; +var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols; +var __hasOwnProp$3 = Object.prototype.hasOwnProperty; +var __propIsEnum$3 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$3 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$3.call(b, prop)) + __defNormalProp$3(a, prop, b[prop]); + if (__getOwnPropSymbols$3) + for (var prop of __getOwnPropSymbols$3(b)) { + if (__propIsEnum$3.call(b, prop)) + __defNormalProp$3(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b)); +const normalScriptDefaultVar = `__default__`; +function processNormalScript(ctx, scopeId) { + var _a; + const script = ctx.descriptor.script; + if (script.lang && !ctx.isJS && !ctx.isTS) { + return script; + } + try { + let content = script.content; + let map = script.map; + const scriptAst = ctx.scriptAst; + const bindings = analyzeScriptBindings(scriptAst.body); + const { cssVars } = ctx.descriptor; + const { genDefaultAs, isProd } = ctx.options; + if (cssVars.length || genDefaultAs) { + const defaultVar = genDefaultAs || normalScriptDefaultVar; + const s = new MagicString(content); + rewriteDefaultAST(scriptAst.body, s, defaultVar); + content = s.toString(); + if (cssVars.length && !((_a = ctx.options.templateOptions) == null ? void 0 : _a.ssr)) { + content += genNormalScriptCssVarsCode( + cssVars, + bindings, + scopeId, + !!isProd, + defaultVar + ); + } + if (!genDefaultAs) { + content += ` +export default ${defaultVar}`; + } + } + return __spreadProps$2(__spreadValues$3({}, script), { + content, + map, + bindings, + scriptAst: scriptAst.body + }); + } catch (e) { + return script; + } +} + +var __defProp$2 = Object.defineProperty; +var __defProps$1 = Object.defineProperties; +var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols; +var __hasOwnProp$2 = Object.prototype.hasOwnProperty; +var __propIsEnum$2 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$2 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$2.call(b, prop)) + __defNormalProp$2(a, prop, b[prop]); + if (__getOwnPropSymbols$2) + for (var prop of __getOwnPropSymbols$2(b)) { + if (__propIsEnum$2.call(b, prop)) + __defNormalProp$2(a, prop, b[prop]); + } + return a; +}; +var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)); +class TypeScope { + constructor(filename, source, offset = 0, imports = /* @__PURE__ */ Object.create(null), types = /* @__PURE__ */ Object.create(null), declares = /* @__PURE__ */ Object.create(null)) { + this.filename = filename; + this.source = source; + this.offset = offset; + this.imports = imports; + this.types = types; + this.declares = declares; + this.isGenericScope = false; + this.resolvedImportSources = /* @__PURE__ */ Object.create(null); + this.exportedTypes = /* @__PURE__ */ Object.create(null); + this.exportedDeclares = /* @__PURE__ */ Object.create(null); + } +} +function resolveTypeElements(ctx, node, scope, typeParameters) { + const canCache = !typeParameters; + if (canCache && node._resolvedElements) { + return node._resolvedElements; + } + const resolved = innerResolveTypeElements( + ctx, + node, + node._ownerScope || scope || ctxToScope(ctx), + typeParameters + ); + return canCache ? node._resolvedElements = resolved : resolved; +} +function innerResolveTypeElements(ctx, node, scope, typeParameters) { + var _a, _b; + switch (node.type) { + case "TSTypeLiteral": + return typeElementsToMap(ctx, node.members, scope, typeParameters); + case "TSInterfaceDeclaration": + return resolveInterfaceMembers(ctx, node, scope, typeParameters); + case "TSTypeAliasDeclaration": + case "TSParenthesizedType": + return resolveTypeElements( + ctx, + node.typeAnnotation, + scope, + typeParameters + ); + case "TSFunctionType": { + return { props: {}, calls: [node] }; + } + case "TSUnionType": + case "TSIntersectionType": + return mergeElements( + node.types.map((t) => resolveTypeElements(ctx, t, scope, typeParameters)), + node.type + ); + case "TSMappedType": + return resolveMappedType(ctx, node, scope); + case "TSIndexedAccessType": { + const types = resolveIndexType(ctx, node, scope); + return mergeElements( + types.map((t) => resolveTypeElements(ctx, t, t._ownerScope)), + "TSUnionType" + ); + } + case "TSExpressionWithTypeArguments": + case "TSTypeReference": { + const typeName = getReferenceName(node); + if ((typeName === "ExtractPropTypes" || typeName === "ExtractPublicPropTypes") && node.typeParameters && ((_a = scope.imports[typeName]) == null ? void 0 : _a.source) === "vue") { + return resolveExtractPropTypes( + resolveTypeElements( + ctx, + node.typeParameters.params[0], + scope, + typeParameters + ), + scope + ); + } + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + let typeParams; + if ((resolved.type === "TSTypeAliasDeclaration" || resolved.type === "TSInterfaceDeclaration") && resolved.typeParameters && node.typeParameters) { + typeParams = /* @__PURE__ */ Object.create(null); + resolved.typeParameters.params.forEach((p, i) => { + let param = typeParameters && typeParameters[p.name]; + if (!param) + param = node.typeParameters.params[i]; + typeParams[p.name] = param; + }); + } + return resolveTypeElements( + ctx, + resolved, + resolved._ownerScope, + typeParams + ); + } else { + if (typeof typeName === "string") { + if (typeParameters && typeParameters[typeName]) { + return resolveTypeElements( + ctx, + typeParameters[typeName], + scope, + typeParameters + ); + } + if ( + // @ts-expect-error + SupportedBuiltinsSet.has(typeName) + ) { + return resolveBuiltin( + ctx, + node, + typeName, + scope, + typeParameters + ); + } else if (typeName === "ReturnType" && node.typeParameters) { + const ret = resolveReturnType( + ctx, + node.typeParameters.params[0], + scope + ); + if (ret) { + return resolveTypeElements(ctx, ret, scope); + } + } + } + return ctx.error( + `Unresolvable type reference or unsupported built-in utility type`, + node, + scope + ); + } + } + case "TSImportType": { + if (getId(node.argument) === "vue" && ((_b = node.qualifier) == null ? void 0 : _b.type) === "Identifier" && node.qualifier.name === "ExtractPropTypes" && node.typeParameters) { + return resolveExtractPropTypes( + resolveTypeElements(ctx, node.typeParameters.params[0], scope), + scope + ); + } + const sourceScope = importSourceToScope( + ctx, + node.argument, + scope, + node.argument.value + ); + const resolved = resolveTypeReference(ctx, node, sourceScope); + if (resolved) { + return resolveTypeElements(ctx, resolved, resolved._ownerScope); + } + break; + } + case "TSTypeQuery": + { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveTypeElements(ctx, resolved, resolved._ownerScope); + } + } + break; + } + return ctx.error(`Unresolvable type: ${node.type}`, node, scope); +} +function typeElementsToMap(ctx, elements, scope = ctxToScope(ctx), typeParameters) { + const res = { props: {} }; + for (const e of elements) { + if (e.type === "TSPropertySignature" || e.type === "TSMethodSignature") { + if (typeParameters) { + scope = createChildScope(scope); + scope.isGenericScope = true; + Object.assign(scope.types, typeParameters); + } + e._ownerScope = scope; + const name = getId(e.key); + if (name && !e.computed) { + res.props[name] = e; + } else if (e.key.type === "TemplateLiteral") { + for (const key of resolveTemplateKeys(ctx, e.key, scope)) { + res.props[key] = e; + } + } else { + ctx.error( + `Unsupported computed key in type referenced by a macro`, + e.key, + scope + ); + } + } else if (e.type === "TSCallSignatureDeclaration") { + (res.calls || (res.calls = [])).push(e); + } + } + return res; +} +function mergeElements(maps, type) { + if (maps.length === 1) + return maps[0]; + const res = { props: {} }; + const { props: baseProps } = res; + for (const { props, calls } of maps) { + for (const key in props) { + if (!hasOwn(baseProps, key)) { + baseProps[key] = props[key]; + } else { + baseProps[key] = createProperty( + baseProps[key].key, + { + type, + // @ts-expect-error + types: [baseProps[key], props[key]] + }, + baseProps[key]._ownerScope, + baseProps[key].optional || props[key].optional + ); + } + } + if (calls) { + (res.calls || (res.calls = [])).push(...calls); + } + } + return res; +} +function createProperty(key, typeAnnotation, scope, optional) { + return { + type: "TSPropertySignature", + key, + kind: "get", + optional, + typeAnnotation: { + type: "TSTypeAnnotation", + typeAnnotation + }, + _ownerScope: scope + }; +} +function resolveInterfaceMembers(ctx, node, scope, typeParameters) { + const base = typeElementsToMap( + ctx, + node.body.body, + node._ownerScope, + typeParameters + ); + if (node.extends) { + for (const ext of node.extends) { + if (ext.leadingComments && ext.leadingComments.some((c) => c.value.includes("@vue-ignore"))) { + continue; + } + try { + const { props, calls } = resolveTypeElements(ctx, ext, scope); + for (const key in props) { + if (!hasOwn(base.props, key)) { + base.props[key] = props[key]; + } + } + if (calls) { + ; + (base.calls || (base.calls = [])).push(...calls); + } + } catch (e) { + ctx.error( + `Failed to resolve extends base type. +If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example: + +interface Props extends /* @vue-ignore */ Base {} + +Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.`, + ext + ); + } + } + } + return base; +} +function resolveMappedType(ctx, node, scope) { + const res = { props: {} }; + const keys = resolveStringType(ctx, node.typeParameter.constraint, scope); + for (const key of keys) { + res.props[key] = createProperty( + { + type: "Identifier", + name: key + }, + node.typeAnnotation, + scope, + !!node.optional + ); + } + return res; +} +function resolveIndexType(ctx, node, scope) { + var _a, _b; + if (node.indexType.type === "TSNumberKeyword") { + return resolveArrayElementType(ctx, node.objectType, scope); + } + const { indexType, objectType } = node; + const types = []; + let keys; + let resolved; + if (indexType.type === "TSStringKeyword") { + resolved = resolveTypeElements(ctx, objectType, scope); + keys = Object.keys(resolved.props); + } else { + keys = resolveStringType(ctx, indexType, scope); + resolved = resolveTypeElements(ctx, objectType, scope); + } + for (const key of keys) { + const targetType = (_b = (_a = resolved.props[key]) == null ? void 0 : _a.typeAnnotation) == null ? void 0 : _b.typeAnnotation; + if (targetType) { + targetType._ownerScope = resolved.props[key]._ownerScope; + types.push(targetType); + } + } + return types; +} +function resolveArrayElementType(ctx, node, scope) { + if (node.type === "TSArrayType") { + return [node.elementType]; + } + if (node.type === "TSTupleType") { + return node.elementTypes.map( + (t) => t.type === "TSNamedTupleMember" ? t.elementType : t + ); + } + if (node.type === "TSTypeReference") { + if (getReferenceName(node) === "Array" && node.typeParameters) { + return node.typeParameters.params; + } else { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveArrayElementType(ctx, resolved, scope); + } + } + } + return ctx.error( + "Failed to resolve element type from target type", + node, + scope + ); +} +function resolveStringType(ctx, node, scope) { + switch (node.type) { + case "StringLiteral": + return [node.value]; + case "TSLiteralType": + return resolveStringType(ctx, node.literal, scope); + case "TSUnionType": + return node.types.map((t) => resolveStringType(ctx, t, scope)).flat(); + case "TemplateLiteral": { + return resolveTemplateKeys(ctx, node, scope); + } + case "TSTypeReference": { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return resolveStringType(ctx, resolved, scope); + } + if (node.typeName.type === "Identifier") { + const getParam = (index = 0) => resolveStringType(ctx, node.typeParameters.params[index], scope); + switch (node.typeName.name) { + case "Extract": + return getParam(1); + case "Exclude": { + const excluded = getParam(1); + return getParam().filter((s) => !excluded.includes(s)); + } + case "Uppercase": + return getParam().map((s) => s.toUpperCase()); + case "Lowercase": + return getParam().map((s) => s.toLowerCase()); + case "Capitalize": + return getParam().map(capitalize$1); + case "Uncapitalize": + return getParam().map((s) => s[0].toLowerCase() + s.slice(1)); + default: + ctx.error( + "Unsupported type when resolving index type", + node.typeName, + scope + ); + } + } + } + } + return ctx.error("Failed to resolve index type into finite keys", node, scope); +} +function resolveTemplateKeys(ctx, node, scope) { + if (!node.expressions.length) { + return [node.quasis[0].value.raw]; + } + const res = []; + const e = node.expressions[0]; + const q = node.quasis[0]; + const leading = q ? q.value.raw : ``; + const resolved = resolveStringType(ctx, e, scope); + const restResolved = resolveTemplateKeys( + ctx, + __spreadProps$1(__spreadValues$2({}, node), { + expressions: node.expressions.slice(1), + quasis: q ? node.quasis.slice(1) : node.quasis + }), + scope + ); + for (const r of resolved) { + for (const rr of restResolved) { + res.push(leading + r + rr); + } + } + return res; +} +const SupportedBuiltinsSet = /* @__PURE__ */ new Set([ + "Partial", + "Required", + "Readonly", + "Pick", + "Omit" +]); +function resolveBuiltin(ctx, node, name, scope, typeParameters) { + const t = resolveTypeElements( + ctx, + node.typeParameters.params[0], + scope, + typeParameters + ); + switch (name) { + case "Partial": { + const res2 = { props: {}, calls: t.calls }; + Object.keys(t.props).forEach((key) => { + res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: true }); + }); + return res2; + } + case "Required": { + const res2 = { props: {}, calls: t.calls }; + Object.keys(t.props).forEach((key) => { + res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: false }); + }); + return res2; + } + case "Readonly": + return t; + case "Pick": { + const picked = resolveStringType( + ctx, + node.typeParameters.params[1], + scope + ); + const res2 = { props: {}, calls: t.calls }; + for (const key of picked) { + res2.props[key] = t.props[key]; + } + return res2; + } + case "Omit": + const omitted = resolveStringType( + ctx, + node.typeParameters.params[1], + scope + ); + const res = { props: {}, calls: t.calls }; + for (const key in t.props) { + if (!omitted.includes(key)) { + res.props[key] = t.props[key]; + } + } + return res; + } +} +function resolveTypeReference(ctx, node, scope, name, onlyExported = false) { + const canCache = !(scope == null ? void 0 : scope.isGenericScope); + if (canCache && node._resolvedReference) { + return node._resolvedReference; + } + const resolved = innerResolveTypeReference( + ctx, + scope || ctxToScope(ctx), + name || getReferenceName(node), + node, + onlyExported + ); + return canCache ? node._resolvedReference = resolved : resolved; +} +function innerResolveTypeReference(ctx, scope, name, node, onlyExported) { + if (typeof name === "string") { + if (scope.imports[name]) { + return resolveTypeFromImport(ctx, node, name, scope); + } else { + const lookupSource = node.type === "TSTypeQuery" ? onlyExported ? scope.exportedDeclares : scope.declares : onlyExported ? scope.exportedTypes : scope.types; + if (lookupSource[name]) { + return lookupSource[name]; + } else { + const globalScopes = resolveGlobalScope(ctx); + if (globalScopes) { + for (const s of globalScopes) { + const src = node.type === "TSTypeQuery" ? s.declares : s.types; + if (src[name]) { + (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(s.filename); + return src[name]; + } + } + } + } + } + } else { + let ns = innerResolveTypeReference(ctx, scope, name[0], node, onlyExported); + if (ns) { + if (ns.type !== "TSModuleDeclaration") { + ns = ns._ns; + } + if (ns) { + const childScope = moduleDeclToScope(ctx, ns, ns._ownerScope || scope); + return innerResolveTypeReference( + ctx, + childScope, + name.length > 2 ? name.slice(1) : name[name.length - 1], + node, + !ns.declare + ); + } + } + } +} +function getReferenceName(node) { + const ref = node.type === "TSTypeReference" ? node.typeName : node.type === "TSExpressionWithTypeArguments" ? node.expression : node.type === "TSImportType" ? node.qualifier : node.exprName; + if ((ref == null ? void 0 : ref.type) === "Identifier") { + return ref.name; + } else if ((ref == null ? void 0 : ref.type) === "TSQualifiedName") { + return qualifiedNameToPath(ref); + } else { + return "default"; + } +} +function qualifiedNameToPath(node) { + if (node.type === "Identifier") { + return [node.name]; + } else { + return [...qualifiedNameToPath(node.left), node.right.name]; + } +} +function resolveGlobalScope(ctx) { + if (ctx.options.globalTypeFiles) { + const fs = resolveFS(ctx); + if (!fs) { + throw new Error("[vue/compiler-sfc] globalTypeFiles requires fs access."); + } + return ctx.options.globalTypeFiles.map( + (file) => fileToScope(ctx, normalizePath(file), true) + ); + } +} +let ts; +let loadTS; +function registerTS(_loadTS) { + loadTS = () => { + try { + return _loadTS(); + } catch (err) { + if (typeof err.message === "string" && err.message.includes("Cannot find module")) { + throw new Error( + 'Failed to load TypeScript, which is required for resolving imported types. Please make sure "typescript" is installed as a project dependency.' + ); + } else { + throw new Error( + "Failed to load TypeScript for resolving imported types." + ); + } + } + }; +} +function resolveFS(ctx) { + if (ctx.fs) { + return ctx.fs; + } + if (!ts && loadTS) { + ts = loadTS(); + } + const fs = ctx.options.fs || (ts == null ? void 0 : ts.sys); + if (!fs) { + return; + } + return ctx.fs = { + fileExists(file) { + if (file.endsWith(".vue.ts")) { + file = file.replace(/\.ts$/, ""); + } + return fs.fileExists(file); + }, + readFile(file) { + if (file.endsWith(".vue.ts")) { + file = file.replace(/\.ts$/, ""); + } + return fs.readFile(file); + }, + realpath: fs.realpath + }; +} +function resolveTypeFromImport(ctx, node, name, scope) { + const { source, imported } = scope.imports[name]; + const sourceScope = importSourceToScope(ctx, node, scope, source); + return resolveTypeReference(ctx, node, sourceScope, imported, true); +} +function importSourceToScope(ctx, node, scope, source) { + let fs; + try { + fs = resolveFS(ctx); + } catch (err) { + return ctx.error(err.message, node, scope); + } + if (!fs) { + return ctx.error( + `No fs option provided to \`compileScript\` in non-Node environment. File system access is required for resolving imported types.`, + node, + scope + ); + } + let resolved = scope.resolvedImportSources[source]; + if (!resolved) { + if (source.startsWith("..")) { + const osSpecificJoinFn = joinPaths; + const filename = osSpecificJoinFn(dirname$2(scope.filename), source); + resolved = resolveExt(filename, fs); + } else if (source.startsWith(".")) { + const filename = joinPaths(dirname$2(scope.filename), source); + resolved = resolveExt(filename, fs); + } else { + { + return ctx.error( + `Type import from non-relative sources is not supported in the browser build.`, + node, + scope + ); + } + } + if (resolved) { + resolved = scope.resolvedImportSources[source] = normalizePath(resolved); + } + } + if (resolved) { + (ctx.deps || (ctx.deps = /* @__PURE__ */ new Set())).add(resolved); + return fileToScope(ctx, resolved); + } else { + return ctx.error( + `Failed to resolve import source ${JSON.stringify(source)}.`, + node, + scope + ); + } +} +function resolveExt(filename, fs) { + filename = filename.replace(/\.js$/, ""); + const tryResolve = (filename2) => { + if (fs.fileExists(filename2)) + return filename2; + }; + return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.d.ts`)); +} +const tsConfigCache = createCache(); +const tsConfigRefMap = /* @__PURE__ */ new Map(); +const fileToScopeCache = createCache(); +function invalidateTypeCache(filename) { + filename = normalizePath(filename); + fileToScopeCache.delete(filename); + tsConfigCache.delete(filename); + const affectedConfig = tsConfigRefMap.get(filename); + if (affectedConfig) + tsConfigCache.delete(affectedConfig); +} +function fileToScope(ctx, filename, asGlobal = false) { + const cached = fileToScopeCache.get(filename); + if (cached) { + return cached; + } + const fs = resolveFS(ctx); + const source = fs.readFile(filename) || ""; + const body = parseFile(filename, source, ctx.options.babelParserPlugins); + const scope = new TypeScope(filename, source, 0, recordImports(body)); + recordTypes(ctx, body, scope, asGlobal); + fileToScopeCache.set(filename, scope); + return scope; +} +function parseFile(filename, content, parserPlugins) { + const ext = extname(filename); + if (ext === ".ts" || ext === ".tsx") { + return parse_1$1(content, { + plugins: resolveParserPlugins( + ext.slice(1), + parserPlugins, + filename.endsWith(".d.ts") + ), + sourceType: "module" + }).program.body; + } else if (ext === ".vue") { + const { + descriptor: { script, scriptSetup } + } = parse$7(content); + if (!script && !scriptSetup) { + return []; + } + const scriptOffset = script ? script.loc.start.offset : Infinity; + const scriptSetupOffset = scriptSetup ? scriptSetup.loc.start.offset : Infinity; + const firstBlock = scriptOffset < scriptSetupOffset ? script : scriptSetup; + const secondBlock = scriptOffset < scriptSetupOffset ? scriptSetup : script; + let scriptContent = " ".repeat(Math.min(scriptOffset, scriptSetupOffset)) + firstBlock.content; + if (secondBlock) { + scriptContent += " ".repeat(secondBlock.loc.start.offset - script.loc.end.offset) + secondBlock.content; + } + const lang = (script == null ? void 0 : script.lang) || (scriptSetup == null ? void 0 : scriptSetup.lang); + return parse_1$1(scriptContent, { + plugins: resolveParserPlugins(lang, parserPlugins), + sourceType: "module" + }).program.body; + } + return []; +} +function ctxToScope(ctx) { + if (ctx.scope) { + return ctx.scope; + } + const body = "ast" in ctx ? ctx.ast : ctx.scriptAst ? [...ctx.scriptAst.body, ...ctx.scriptSetupAst.body] : ctx.scriptSetupAst.body; + const scope = new TypeScope( + ctx.filename, + ctx.source, + "startOffset" in ctx ? ctx.startOffset : 0, + "userImports" in ctx ? Object.create(ctx.userImports) : recordImports(body) + ); + recordTypes(ctx, body, scope); + return ctx.scope = scope; +} +function moduleDeclToScope(ctx, node, parentScope) { + if (node._resolvedChildScope) { + return node._resolvedChildScope; + } + const scope = createChildScope(parentScope); + if (node.body.type === "TSModuleDeclaration") { + const decl = node.body; + decl._ownerScope = scope; + const id = getId(decl.id); + scope.types[id] = scope.exportedTypes[id] = decl; + } else { + recordTypes(ctx, node.body.body, scope); + } + return node._resolvedChildScope = scope; +} +function createChildScope(parentScope) { + return new TypeScope( + parentScope.filename, + parentScope.source, + parentScope.offset, + Object.create(parentScope.imports), + Object.create(parentScope.types), + Object.create(parentScope.declares) + ); +} +const importExportRE = /^Import|^Export/; +function recordTypes(ctx, body, scope, asGlobal = false) { + const { types, declares, exportedTypes, exportedDeclares, imports } = scope; + const isAmbient = asGlobal ? !body.some((s) => importExportRE.test(s.type)) : false; + for (const stmt of body) { + if (asGlobal) { + if (isAmbient) { + if (stmt.declare) { + recordType(stmt, types, declares); + } + } else if (stmt.type === "TSModuleDeclaration" && stmt.global) { + for (const s of stmt.body.body) { + recordType(s, types, declares); + } + } + } else { + recordType(stmt, types, declares); + } + } + if (!asGlobal) { + for (const stmt of body) { + if (stmt.type === "ExportNamedDeclaration") { + if (stmt.declaration) { + recordType(stmt.declaration, types, declares); + recordType(stmt.declaration, exportedTypes, exportedDeclares); + } else { + for (const spec of stmt.specifiers) { + if (spec.type === "ExportSpecifier") { + const local = spec.local.name; + const exported = getId(spec.exported); + if (stmt.source) { + imports[exported] = { + source: stmt.source.value, + imported: local + }; + exportedTypes[exported] = { + type: "TSTypeReference", + typeName: { + type: "Identifier", + name: local + }, + _ownerScope: scope + }; + } else if (types[local]) { + exportedTypes[exported] = types[local]; + } + } + } + } + } else if (stmt.type === "ExportAllDeclaration") { + const sourceScope = importSourceToScope( + ctx, + stmt.source, + scope, + stmt.source.value + ); + Object.assign(scope.exportedTypes, sourceScope.exportedTypes); + } else if (stmt.type === "ExportDefaultDeclaration" && stmt.declaration) { + if (stmt.declaration.type !== "Identifier") { + recordType(stmt.declaration, types, declares, "default"); + recordType( + stmt.declaration, + exportedTypes, + exportedDeclares, + "default" + ); + } else if (types[stmt.declaration.name]) { + exportedTypes["default"] = types[stmt.declaration.name]; + } + } + } + } + for (const key of Object.keys(types)) { + const node = types[key]; + node._ownerScope = scope; + if (node._ns) + node._ns._ownerScope = scope; + } + for (const key of Object.keys(declares)) { + declares[key]._ownerScope = scope; + } +} +function recordType(node, types, declares, overwriteId) { + switch (node.type) { + case "TSInterfaceDeclaration": + case "TSEnumDeclaration": + case "TSModuleDeclaration": { + const id = overwriteId || getId(node.id); + let existing = types[id]; + if (existing) { + if (node.type === "TSModuleDeclaration") { + if (existing.type === "TSModuleDeclaration") { + mergeNamespaces(existing, node); + } else { + attachNamespace(existing, node); + } + break; + } + if (existing.type === "TSModuleDeclaration") { + types[id] = node; + attachNamespace(node, existing); + break; + } + if (existing.type !== node.type) { + break; + } + if (node.type === "TSInterfaceDeclaration") { + existing.body.body.push(...node.body.body); + } else { + existing.members.push(...node.members); + } + } else { + types[id] = node; + } + break; + } + case "ClassDeclaration": + if (overwriteId || node.id) + types[overwriteId || getId(node.id)] = node; + break; + case "TSTypeAliasDeclaration": + types[node.id.name] = node.typeParameters ? node : node.typeAnnotation; + break; + case "TSDeclareFunction": + if (node.id) + declares[node.id.name] = node; + break; + case "VariableDeclaration": { + if (node.declare) { + for (const decl of node.declarations) { + if (decl.id.type === "Identifier" && decl.id.typeAnnotation) { + declares[decl.id.name] = decl.id.typeAnnotation.typeAnnotation; + } + } + } + break; + } + } +} +function mergeNamespaces(to, from) { + const toBody = to.body; + const fromBody = from.body; + if (toBody.type === "TSModuleDeclaration") { + if (fromBody.type === "TSModuleDeclaration") { + mergeNamespaces(toBody, fromBody); + } else { + fromBody.body.push({ + type: "ExportNamedDeclaration", + declaration: toBody, + exportKind: "type", + specifiers: [] + }); + } + } else if (fromBody.type === "TSModuleDeclaration") { + toBody.body.push({ + type: "ExportNamedDeclaration", + declaration: fromBody, + exportKind: "type", + specifiers: [] + }); + } else { + toBody.body.push(...fromBody.body); + } +} +function attachNamespace(to, ns) { + if (!to._ns) { + to._ns = ns; + } else { + mergeNamespaces(to._ns, ns); + } +} +function recordImports(body) { + const imports = /* @__PURE__ */ Object.create(null); + for (const s of body) { + recordImport(s, imports); + } + return imports; +} +function recordImport(node, imports) { + if (node.type !== "ImportDeclaration") { + return; + } + for (const s of node.specifiers) { + imports[s.local.name] = { + imported: getImportedName(s), + source: node.source.value + }; + } +} +function inferRuntimeType(ctx, node, scope = node._ownerScope || ctxToScope(ctx)) { + try { + switch (node.type) { + case "TSStringKeyword": + return ["String"]; + case "TSNumberKeyword": + return ["Number"]; + case "TSBooleanKeyword": + return ["Boolean"]; + case "TSObjectKeyword": + return ["Object"]; + case "TSNullKeyword": + return ["null"]; + case "TSTypeLiteral": + case "TSInterfaceDeclaration": { + const types = /* @__PURE__ */ new Set(); + const members = node.type === "TSTypeLiteral" ? node.members : node.body.body; + for (const m of members) { + if (m.type === "TSCallSignatureDeclaration" || m.type === "TSConstructSignatureDeclaration") { + types.add("Function"); + } else { + types.add("Object"); + } + } + return types.size ? Array.from(types) : ["Object"]; + } + case "TSPropertySignature": + if (node.typeAnnotation) { + return inferRuntimeType( + ctx, + node.typeAnnotation.typeAnnotation, + scope + ); + } + break; + case "TSMethodSignature": + case "TSFunctionType": + return ["Function"]; + case "TSArrayType": + case "TSTupleType": + return ["Array"]; + case "TSLiteralType": + switch (node.literal.type) { + case "StringLiteral": + return ["String"]; + case "BooleanLiteral": + return ["Boolean"]; + case "NumericLiteral": + case "BigIntLiteral": + return ["Number"]; + default: + return [UNKNOWN_TYPE]; + } + case "TSTypeReference": { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) { + return inferRuntimeType(ctx, resolved, resolved._ownerScope); + } + if (node.typeName.type === "Identifier") { + switch (node.typeName.name) { + case "Array": + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + case "Error": + return [node.typeName.name]; + case "Partial": + case "Required": + case "Readonly": + case "Record": + case "Pick": + case "Omit": + case "InstanceType": + return ["Object"]; + case "Uppercase": + case "Lowercase": + case "Capitalize": + case "Uncapitalize": + return ["String"]; + case "Parameters": + case "ConstructorParameters": + return ["Array"]; + case "NonNullable": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope + ).filter((t) => t !== "null"); + } + break; + case "Extract": + if (node.typeParameters && node.typeParameters.params[1]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[1], + scope + ); + } + break; + case "Exclude": + case "OmitThisParameter": + if (node.typeParameters && node.typeParameters.params[0]) { + return inferRuntimeType( + ctx, + node.typeParameters.params[0], + scope + ); + } + break; + } + } + break; + } + case "TSParenthesizedType": + return inferRuntimeType(ctx, node.typeAnnotation, scope); + case "TSUnionType": + return flattenTypes(ctx, node.types, scope); + case "TSIntersectionType": { + return flattenTypes(ctx, node.types, scope).filter( + (t) => t !== UNKNOWN_TYPE + ); + } + case "TSEnumDeclaration": + return inferEnumType(node); + case "TSSymbolKeyword": + return ["Symbol"]; + case "TSIndexedAccessType": { + const types = resolveIndexType(ctx, node, scope); + return flattenTypes(ctx, types, scope); + } + case "ClassDeclaration": + return ["Object"]; + case "TSImportType": { + const sourceScope = importSourceToScope( + ctx, + node.argument, + scope, + node.argument.value + ); + const resolved = resolveTypeReference(ctx, node, sourceScope); + if (resolved) { + return inferRuntimeType(ctx, resolved, resolved._ownerScope); + } + break; + } + case "TSTypeQuery": { + const id = node.exprName; + if (id.type === "Identifier") { + const matched = scope.declares[id.name]; + if (matched) { + return inferRuntimeType(ctx, matched, matched._ownerScope); + } + } + break; + } + } + } catch (e) { + } + return [UNKNOWN_TYPE]; +} +function flattenTypes(ctx, types, scope) { + if (types.length === 1) { + return inferRuntimeType(ctx, types[0], scope); + } + return [ + ...new Set( + [].concat( + ...types.map((t) => inferRuntimeType(ctx, t, scope)) + ) + ) + ]; +} +function inferEnumType(node) { + const types = /* @__PURE__ */ new Set(); + for (const m of node.members) { + if (m.initializer) { + switch (m.initializer.type) { + case "StringLiteral": + types.add("String"); + break; + case "NumericLiteral": + types.add("Number"); + break; + } + } + } + return types.size ? [...types] : ["Number"]; +} +function resolveExtractPropTypes({ props }, scope) { + const res = { props: {} }; + for (const key in props) { + const raw = props[key]; + res.props[key] = reverseInferType( + raw.key, + raw.typeAnnotation.typeAnnotation, + scope + ); + } + return res; +} +function reverseInferType(key, node, scope, optional = true, checkObjectSyntax = true) { + if (checkObjectSyntax && node.type === "TSTypeLiteral") { + const typeType = findStaticPropertyType(node, "type"); + if (typeType) { + const requiredType = findStaticPropertyType(node, "required"); + const optional2 = requiredType && requiredType.type === "TSLiteralType" && requiredType.literal.type === "BooleanLiteral" ? !requiredType.literal.value : true; + return reverseInferType(key, typeType, scope, optional2, false); + } + } else if (node.type === "TSTypeReference" && node.typeName.type === "Identifier") { + if (node.typeName.name.endsWith("Constructor")) { + return createProperty( + key, + ctorToType(node.typeName.name), + scope, + optional + ); + } else if (node.typeName.name === "PropType" && node.typeParameters) { + return createProperty(key, node.typeParameters.params[0], scope, optional); + } + } + if ((node.type === "TSTypeReference" || node.type === "TSImportType") && node.typeParameters) { + for (const t of node.typeParameters.params) { + const inferred = reverseInferType(key, t, scope, optional); + if (inferred) + return inferred; + } + } + return createProperty(key, { type: `TSNullKeyword` }, scope, optional); +} +function ctorToType(ctorType) { + const ctor = ctorType.slice(0, -11); + switch (ctor) { + case "String": + case "Number": + case "Boolean": + return { type: `TS${ctor}Keyword` }; + case "Array": + case "Function": + case "Object": + case "Set": + case "Map": + case "WeakSet": + case "WeakMap": + case "Date": + case "Promise": + return { + type: "TSTypeReference", + typeName: { type: "Identifier", name: ctor } + }; + } + return { type: `TSNullKeyword` }; +} +function findStaticPropertyType(node, key) { + const prop = node.members.find( + (m) => m.type === "TSPropertySignature" && !m.computed && getId(m.key) === key && m.typeAnnotation + ); + return prop && prop.typeAnnotation.typeAnnotation; +} +function resolveReturnType(ctx, arg, scope) { + var _a; + let resolved = arg; + if (arg.type === "TSTypeReference" || arg.type === "TSTypeQuery" || arg.type === "TSImportType") { + resolved = resolveTypeReference(ctx, arg, scope); + } + if (!resolved) + return; + if (resolved.type === "TSFunctionType") { + return (_a = resolved.typeAnnotation) == null ? void 0 : _a.typeAnnotation; + } + if (resolved.type === "TSDeclareFunction") { + return resolved.returnType; + } +} +function resolveUnionType(ctx, node, scope) { + if (node.type === "TSTypeReference") { + const resolved = resolveTypeReference(ctx, node, scope); + if (resolved) + node = resolved; + } + let types; + if (node.type === "TSUnionType") { + types = node.types.flatMap((node2) => resolveUnionType(ctx, node2, scope)); + } else { + types = [node]; + } + return types; +} + +const DEFINE_MODEL = "defineModel"; +function processDefineModel(ctx, node, declId) { + if (!isCallOf(node, DEFINE_MODEL)) { + return false; + } + ctx.hasDefineModelCall = true; + const type = node.typeParameters && node.typeParameters.params[0] || void 0; + let modelName; + let options; + const arg0 = node.arguments[0] && unwrapTSNode(node.arguments[0]); + const hasName = arg0 && arg0.type === "StringLiteral"; + if (hasName) { + modelName = arg0.value; + options = node.arguments[1]; + } else { + modelName = "modelValue"; + options = arg0; + } + if (ctx.modelDecls[modelName]) { + ctx.error(`duplicate model name ${JSON.stringify(modelName)}`, node); + } + let optionsString = options && ctx.getString(options); + let optionsRemoved = !options; + const runtimeOptionNodes = []; + if (options && options.type === "ObjectExpression" && !options.properties.some((p) => p.type === "SpreadElement" || p.computed)) { + let removed = 0; + for (let i = options.properties.length - 1; i >= 0; i--) { + const p = options.properties[i]; + const next = options.properties[i + 1]; + const start = p.start; + const end = next ? next.start : options.end - 1; + if ((p.type === "ObjectProperty" || p.type === "ObjectMethod") && (p.key.type === "Identifier" && (p.key.name === "get" || p.key.name === "set") || p.key.type === "StringLiteral" && (p.key.value === "get" || p.key.value === "set"))) { + optionsString = optionsString.slice(0, start - options.start) + optionsString.slice(end - options.start); + } else { + removed++; + ctx.s.remove(ctx.startOffset + start, ctx.startOffset + end); + runtimeOptionNodes.push(p); + } + } + if (removed === options.properties.length) { + optionsRemoved = true; + ctx.s.remove( + ctx.startOffset + (hasName ? arg0.end : options.start), + ctx.startOffset + options.end + ); + } + } + ctx.modelDecls[modelName] = { + type, + options: optionsString, + runtimeOptionNodes, + identifier: declId && declId.type === "Identifier" ? declId.name : void 0 + }; + ctx.bindingMetadata[modelName] = "props"; + ctx.s.overwrite( + ctx.startOffset + node.callee.start, + ctx.startOffset + node.callee.end, + ctx.helper("useModel") + ); + ctx.s.appendLeft( + ctx.startOffset + (node.arguments.length ? node.arguments[0].start : node.end - 1), + `__props, ` + (hasName ? `` : `${JSON.stringify(modelName)}${optionsRemoved ? `` : `, `}`) + ); + return true; +} +function genModelProps(ctx) { + if (!ctx.hasDefineModelCall) + return; + const isProd = !!ctx.options.isProd; + let modelPropsDecl = ""; + for (const [name, { type, options }] of Object.entries(ctx.modelDecls)) { + let skipCheck = false; + let runtimeTypes = type && inferRuntimeType(ctx, type); + if (runtimeTypes) { + const hasUnknownType = runtimeTypes.includes(UNKNOWN_TYPE); + runtimeTypes = runtimeTypes.filter((el) => { + if (el === UNKNOWN_TYPE) + return false; + return isProd ? el === "Boolean" || el === "Function" && options : true; + }); + skipCheck = !isProd && hasUnknownType && runtimeTypes.length > 0; + } + let runtimeType = runtimeTypes && runtimeTypes.length > 0 && toRuntimeTypeString(runtimeTypes) || void 0; + const codegenOptions = concatStrings([ + runtimeType && `type: ${runtimeType}`, + skipCheck && "skipCheck: true" + ]); + let decl; + if (runtimeType && options) { + decl = ctx.isTS ? `{ ${codegenOptions}, ...${options} }` : `Object.assign({ ${codegenOptions} }, ${options})`; + } else { + decl = options || (runtimeType ? `{ ${codegenOptions} }` : "{}"); + } + modelPropsDecl += ` + ${JSON.stringify(name)}: ${decl},`; + const modifierPropName = JSON.stringify( + name === "modelValue" ? `modelModifiers` : `${name}Modifiers` + ); + modelPropsDecl += ` + ${modifierPropName}: {},`; + } + return `{${modelPropsDecl} + }`; +} + +const DEFINE_PROPS = "defineProps"; +const WITH_DEFAULTS = "withDefaults"; +function processDefineProps(ctx, node, declId) { + if (!isCallOf(node, DEFINE_PROPS)) { + return processWithDefaults(ctx, node, declId); + } + if (ctx.hasDefinePropsCall) { + ctx.error(`duplicate ${DEFINE_PROPS}() call`, node); + } + ctx.hasDefinePropsCall = true; + ctx.propsRuntimeDecl = node.arguments[0]; + if (ctx.propsRuntimeDecl) { + for (const key of getObjectOrArrayExpressionKeys(ctx.propsRuntimeDecl)) { + if (!(key in ctx.bindingMetadata)) { + ctx.bindingMetadata[key] = "props"; + } + } + } + if (node.typeParameters) { + if (ctx.propsRuntimeDecl) { + ctx.error( + `${DEFINE_PROPS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, + node + ); + } + ctx.propsTypeDecl = node.typeParameters.params[0]; + } + if (declId && declId.type === "ObjectPattern") { + processPropsDestructure(ctx, declId); + } + ctx.propsCall = node; + ctx.propsDecl = declId; + return true; +} +function processWithDefaults(ctx, node, declId) { + if (!isCallOf(node, WITH_DEFAULTS)) { + return false; + } + if (!processDefineProps(ctx, node.arguments[0], declId)) { + ctx.error( + `${WITH_DEFAULTS}' first argument must be a ${DEFINE_PROPS} call.`, + node.arguments[0] || node + ); + } + if (ctx.propsRuntimeDecl) { + ctx.error( + `${WITH_DEFAULTS} can only be used with type-based ${DEFINE_PROPS} declaration.`, + node + ); + } + if (ctx.propsDestructureDecl) { + ctx.error( + `${WITH_DEFAULTS}() is unnecessary when using destructure with ${DEFINE_PROPS}(). +Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...).`, + node.callee + ); + } + ctx.propsRuntimeDefaults = node.arguments[1]; + if (!ctx.propsRuntimeDefaults) { + ctx.error(`The 2nd argument of ${WITH_DEFAULTS} is required.`, node); + } + ctx.propsCall = node; + return true; +} +function genRuntimeProps(ctx) { + let propsDecls; + if (ctx.propsRuntimeDecl) { + propsDecls = ctx.getString(ctx.propsRuntimeDecl).trim(); + if (ctx.propsDestructureDecl) { + const defaults = []; + for (const key in ctx.propsDestructuredBindings) { + const d = genDestructuredDefaultValue(ctx, key); + const finalKey = getEscapedPropName(key); + if (d) + defaults.push( + `${finalKey}: ${d.valueString}${d.needSkipFactory ? `, __skip_${finalKey}: true` : ``}` + ); + } + if (defaults.length) { + propsDecls = `/*#__PURE__*/${ctx.helper( + `mergeDefaults` + )}(${propsDecls}, { + ${defaults.join(",\n ")} +})`; + } + } + } else if (ctx.propsTypeDecl) { + propsDecls = extractRuntimeProps(ctx); + } + const modelsDecls = genModelProps(ctx); + if (propsDecls && modelsDecls) { + return `/*#__PURE__*/${ctx.helper( + "mergeModels" + )}(${propsDecls}, ${modelsDecls})`; + } else { + return modelsDecls || propsDecls; + } +} +function extractRuntimeProps(ctx) { + const props = resolveRuntimePropsFromType(ctx, ctx.propsTypeDecl); + if (!props.length) { + return; + } + const propStrings = []; + const hasStaticDefaults = hasStaticWithDefaults(ctx); + for (const prop of props) { + propStrings.push(genRuntimePropFromType(ctx, prop, hasStaticDefaults)); + if ("bindingMetadata" in ctx && !(prop.key in ctx.bindingMetadata)) { + ctx.bindingMetadata[prop.key] = "props"; + } + } + let propsDecls = `{ + ${propStrings.join(",\n ")} + }`; + if (ctx.propsRuntimeDefaults && !hasStaticDefaults) { + propsDecls = `/*#__PURE__*/${ctx.helper( + "mergeDefaults" + )}(${propsDecls}, ${ctx.getString(ctx.propsRuntimeDefaults)})`; + } + return propsDecls; +} +function resolveRuntimePropsFromType(ctx, node) { + const props = []; + const elements = resolveTypeElements(ctx, node); + for (const key in elements.props) { + const e = elements.props[key]; + let type = inferRuntimeType(ctx, e); + let skipCheck = false; + if (type.includes(UNKNOWN_TYPE)) { + if (type.includes("Boolean") || type.includes("Function")) { + type = type.filter((t) => t !== UNKNOWN_TYPE); + skipCheck = true; + } else { + type = ["null"]; + } + } + props.push({ + key, + required: !e.optional, + type: type || [`null`], + skipCheck + }); + } + return props; +} +function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStaticDefaults) { + let defaultString; + const destructured = genDestructuredDefaultValue(ctx, key, type); + if (destructured) { + defaultString = `default: ${destructured.valueString}${destructured.needSkipFactory ? `, skipFactory: true` : ``}`; + } else if (hasStaticDefaults) { + const prop = ctx.propsRuntimeDefaults.properties.find( + (node) => { + if (node.type === "SpreadElement") + return false; + return resolveObjectKey(node.key, node.computed) === key; + } + ); + if (prop) { + if (prop.type === "ObjectProperty") { + defaultString = `default: ${ctx.getString(prop.value)}`; + } else { + defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`; + } + } + } + const finalKey = getEscapedPropName(key); + if (!ctx.options.isProd) { + return `${finalKey}: { ${concatStrings([ + `type: ${toRuntimeTypeString(type)}`, + `required: ${required}`, + skipCheck && "skipCheck: true", + defaultString + ])} }`; + } else if (type.some( + (el) => el === "Boolean" || (!hasStaticDefaults || defaultString) && el === "Function" + )) { + return `${finalKey}: { ${concatStrings([ + `type: ${toRuntimeTypeString(type)}`, + defaultString + ])} }`; + } else { + if (ctx.isCE) { + if (defaultString) { + return `${finalKey}: ${`{ ${defaultString}, type: ${toRuntimeTypeString( + type + )} }`}`; + } else { + return `${finalKey}: {type: ${toRuntimeTypeString(type)}}`; + } + } + return `${finalKey}: ${defaultString ? `{ ${defaultString} }` : `{}`}`; + } +} +function hasStaticWithDefaults(ctx) { + return !!(ctx.propsRuntimeDefaults && ctx.propsRuntimeDefaults.type === "ObjectExpression" && ctx.propsRuntimeDefaults.properties.every( + (node) => node.type !== "SpreadElement" && (!node.computed || node.key.type.endsWith("Literal")) + )); +} +function genDestructuredDefaultValue(ctx, key, inferredType) { + const destructured = ctx.propsDestructuredBindings[key]; + const defaultVal = destructured && destructured.default; + if (defaultVal) { + const value = ctx.getString(defaultVal); + const unwrapped = unwrapTSNode(defaultVal); + if (inferredType && inferredType.length && !inferredType.includes("null")) { + const valueType = inferValueType(unwrapped); + if (valueType && !inferredType.includes(valueType)) { + ctx.error( + `Default value of prop "${key}" does not match declared type.`, + unwrapped + ); + } + } + const needSkipFactory = !inferredType && (isFunctionType(unwrapped) || unwrapped.type === "Identifier"); + const needFactoryWrap = !needSkipFactory && !isLiteralNode(unwrapped) && !(inferredType == null ? void 0 : inferredType.includes("Function")); + return { + valueString: needFactoryWrap ? `() => (${value})` : value, + needSkipFactory + }; + } +} +function inferValueType(node) { + switch (node.type) { + case "StringLiteral": + return "String"; + case "NumericLiteral": + return "Number"; + case "BooleanLiteral": + return "Boolean"; + case "ObjectExpression": + return "Object"; + case "ArrayExpression": + return "Array"; + case "FunctionExpression": + case "ArrowFunctionExpression": + return "Function"; + } +} + +function processPropsDestructure(ctx, declId) { + if (!ctx.options.propsDestructure) { + return; + } + warnOnce$3( + `This project is using reactive props destructure, which is an experimental feature. It may receive breaking changes or be removed in the future, so use at your own risk. +To stay updated, follow the RFC at https://github.com/vuejs/rfcs/discussions/502.` + ); + ctx.propsDestructureDecl = declId; + const registerBinding = (key, local, defaultValue) => { + ctx.propsDestructuredBindings[key] = { local, default: defaultValue }; + if (local !== key) { + ctx.bindingMetadata[local] = "props-aliased"; + (ctx.bindingMetadata.__propsAliases || (ctx.bindingMetadata.__propsAliases = {}))[local] = key; + } + }; + for (const prop of declId.properties) { + if (prop.type === "ObjectProperty") { + const propKey = resolveObjectKey(prop.key, prop.computed); + if (!propKey) { + ctx.error( + `${DEFINE_PROPS}() destructure cannot use computed key.`, + prop.key + ); + } + if (prop.value.type === "AssignmentPattern") { + const { left, right } = prop.value; + if (left.type !== "Identifier") { + ctx.error( + `${DEFINE_PROPS}() destructure does not support nested patterns.`, + left + ); + } + registerBinding(propKey, left.name, right); + } else if (prop.value.type === "Identifier") { + registerBinding(propKey, prop.value.name); + } else { + ctx.error( + `${DEFINE_PROPS}() destructure does not support nested patterns.`, + prop.value + ); + } + } else { + ctx.propsDestructureRestId = prop.argument.name; + ctx.bindingMetadata[ctx.propsDestructureRestId] = "setup-reactive-const"; + } + } +} +function transformDestructuredProps(ctx, vueImportAliases) { + if (!ctx.options.propsDestructure) { + return; + } + const rootScope = {}; + const scopeStack = [rootScope]; + let currentScope = rootScope; + const excludedIds = /* @__PURE__ */ new WeakSet(); + const parentStack = []; + const propsLocalToPublicMap = /* @__PURE__ */ Object.create(null); + for (const key in ctx.propsDestructuredBindings) { + const { local } = ctx.propsDestructuredBindings[key]; + rootScope[local] = true; + propsLocalToPublicMap[local] = key; + } + function pushScope() { + scopeStack.push(currentScope = Object.create(currentScope)); + } + function popScope() { + scopeStack.pop(); + currentScope = scopeStack[scopeStack.length - 1] || null; + } + function registerLocalBinding(id) { + excludedIds.add(id); + if (currentScope) { + currentScope[id.name] = false; + } else { + ctx.error( + "registerBinding called without active scope, something is wrong.", + id + ); + } + } + function walkScope(node, isRoot = false) { + for (const stmt of node.body) { + if (stmt.type === "VariableDeclaration") { + walkVariableDeclaration(stmt, isRoot); + } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") { + if (stmt.declare || !stmt.id) + continue; + registerLocalBinding(stmt.id); + } else if ((stmt.type === "ForOfStatement" || stmt.type === "ForInStatement") && stmt.left.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.left); + } else if (stmt.type === "ExportNamedDeclaration" && stmt.declaration && stmt.declaration.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.declaration, isRoot); + } else if (stmt.type === "LabeledStatement" && stmt.body.type === "VariableDeclaration") { + walkVariableDeclaration(stmt.body, isRoot); + } + } + } + function walkVariableDeclaration(stmt, isRoot = false) { + if (stmt.declare) { + return; + } + for (const decl of stmt.declarations) { + const isDefineProps = isRoot && decl.init && isCallOf(unwrapTSNode(decl.init), "defineProps"); + for (const id of extractIdentifiers$1(decl.id)) { + if (isDefineProps) { + excludedIds.add(id); + } else { + registerLocalBinding(id); + } + } + } + } + function rewriteId(id, parent, parentStack2) { + if (parent.type === "AssignmentExpression" && id === parent.left || parent.type === "UpdateExpression") { + ctx.error(`Cannot assign to destructured props as they are readonly.`, id); + } + if (isStaticProperty(parent) && parent.shorthand) { + if (!parent.inPattern || isInDestructureAssignment(parent, parentStack2)) { + ctx.s.appendLeft( + id.end + ctx.startOffset, + `: ${genPropsAccessExp(propsLocalToPublicMap[id.name])}` + ); + } + } else { + ctx.s.overwrite( + id.start + ctx.startOffset, + id.end + ctx.startOffset, + genPropsAccessExp(propsLocalToPublicMap[id.name]) + ); + } + } + function checkUsage(node, method, alias = method) { + if (isCallOf(node, alias)) { + const arg = unwrapTSNode(node.arguments[0]); + if (arg.type === "Identifier" && currentScope[arg.name]) { + ctx.error( + `"${arg.name}" is a destructured prop and should not be passed directly to ${method}(). Pass a getter () => ${arg.name} instead.`, + arg + ); + } + } + } + const ast = ctx.scriptSetupAst; + walkScope(ast, true); + walk$2(ast, { + enter(node, parent) { + parent && parentStack.push(parent); + if (parent && parent.type.startsWith("TS") && parent.type !== "TSAsExpression" && parent.type !== "TSNonNullExpression" && parent.type !== "TSTypeAssertion") { + return this.skip(); + } + checkUsage(node, "watch", vueImportAliases.watch); + checkUsage(node, "toRef", vueImportAliases.toRef); + if (isFunctionType(node)) { + pushScope(); + walkFunctionParams(node, registerLocalBinding); + if (node.body.type === "BlockStatement") { + walkScope(node.body); + } + return; + } + if (node.type === "CatchClause") { + pushScope(); + if (node.param && node.param.type === "Identifier") { + registerLocalBinding(node.param); + } + walkScope(node.body); + return; + } + if (node.type === "BlockStatement" && !isFunctionType(parent)) { + pushScope(); + walkScope(node); + return; + } + if (node.type === "Identifier") { + if (isReferencedIdentifier(node, parent, parentStack) && !excludedIds.has(node)) { + if (currentScope[node.name]) { + rewriteId(node, parent, parentStack); + } + } + } + }, + leave(node, parent) { + parent && parentStack.pop(); + if (node.type === "BlockStatement" && !isFunctionType(parent) || isFunctionType(node)) { + popScope(); + } + } + }); +} + +const DEFINE_EMITS = "defineEmits"; +function processDefineEmits(ctx, node, declId) { + if (!isCallOf(node, DEFINE_EMITS)) { + return false; + } + if (ctx.hasDefineEmitCall) { + ctx.error(`duplicate ${DEFINE_EMITS}() call`, node); + } + ctx.hasDefineEmitCall = true; + ctx.emitsRuntimeDecl = node.arguments[0]; + if (node.typeParameters) { + if (ctx.emitsRuntimeDecl) { + ctx.error( + `${DEFINE_EMITS}() cannot accept both type and non-type arguments at the same time. Use one or the other.`, + node + ); + } + ctx.emitsTypeDecl = node.typeParameters.params[0]; + } + ctx.emitDecl = declId; + return true; +} +function genRuntimeEmits(ctx) { + let emitsDecl = ""; + if (ctx.emitsRuntimeDecl) { + emitsDecl = ctx.getString(ctx.emitsRuntimeDecl).trim(); + } else if (ctx.emitsTypeDecl) { + const typeDeclaredEmits = extractRuntimeEmits(ctx); + emitsDecl = typeDeclaredEmits.size ? `[${Array.from(typeDeclaredEmits).map((k) => JSON.stringify(k)).join(", ")}]` : ``; + } + if (ctx.hasDefineModelCall) { + let modelEmitsDecl = `[${Object.keys(ctx.modelDecls).map((n) => JSON.stringify(`update:${n}`)).join(", ")}]`; + emitsDecl = emitsDecl ? `/*#__PURE__*/${ctx.helper( + "mergeModels" + )}(${emitsDecl}, ${modelEmitsDecl})` : modelEmitsDecl; + } + return emitsDecl; +} +function extractRuntimeEmits(ctx) { + const emits = /* @__PURE__ */ new Set(); + const node = ctx.emitsTypeDecl; + if (node.type === "TSFunctionType") { + extractEventNames(ctx, node.parameters[0], emits); + return emits; + } + const { props, calls } = resolveTypeElements(ctx, node); + let hasProperty = false; + for (const key in props) { + emits.add(key); + hasProperty = true; + } + if (calls) { + if (hasProperty) { + ctx.error( + `defineEmits() type cannot mixed call signature and property syntax.`, + node + ); + } + for (const call of calls) { + extractEventNames(ctx, call.parameters[0], emits); + } + } + return emits; +} +function extractEventNames(ctx, eventName, emits) { + if (eventName.type === "Identifier" && eventName.typeAnnotation && eventName.typeAnnotation.type === "TSTypeAnnotation") { + const types = resolveUnionType(ctx, eventName.typeAnnotation.typeAnnotation); + for (const type of types) { + if (type.type === "TSLiteralType") { + if (type.literal.type !== "UnaryExpression" && type.literal.type !== "TemplateLiteral") { + emits.add(String(type.literal.value)); + } + } + } + } +} + +const DEFINE_EXPOSE = "defineExpose"; +function processDefineExpose(ctx, node) { + if (isCallOf(node, DEFINE_EXPOSE)) { + if (ctx.hasDefineExposeCall) { + ctx.error(`duplicate ${DEFINE_EXPOSE}() call`, node); + } + ctx.hasDefineExposeCall = true; + return true; + } + return false; +} + +const DEFINE_SLOTS = "defineSlots"; +function processDefineSlots(ctx, node, declId) { + if (!isCallOf(node, DEFINE_SLOTS)) { + return false; + } + if (ctx.hasDefineSlotsCall) { + ctx.error(`duplicate ${DEFINE_SLOTS}() call`, node); + } + ctx.hasDefineSlotsCall = true; + if (node.arguments.length > 0) { + ctx.error(`${DEFINE_SLOTS}() cannot accept arguments`, node); + } + if (declId) { + ctx.s.overwrite( + ctx.startOffset + node.start, + ctx.startOffset + node.end, + `${ctx.helper("useSlots")}()` + ); + } + return true; +} + +const DEFINE_OPTIONS = "defineOptions"; +function processDefineOptions(ctx, node) { + if (!isCallOf(node, DEFINE_OPTIONS)) { + return false; + } + if (ctx.hasDefineOptionsCall) { + ctx.error(`duplicate ${DEFINE_OPTIONS}() call`, node); + } + if (node.typeParameters) { + ctx.error(`${DEFINE_OPTIONS}() cannot accept type arguments`, node); + } + if (!node.arguments[0]) + return true; + ctx.hasDefineOptionsCall = true; + ctx.optionsRuntimeDecl = unwrapTSNode(node.arguments[0]); + let propsOption = void 0; + let emitsOption = void 0; + let exposeOption = void 0; + let slotsOption = void 0; + if (ctx.optionsRuntimeDecl.type === "ObjectExpression") { + for (const prop of ctx.optionsRuntimeDecl.properties) { + if ((prop.type === "ObjectProperty" || prop.type === "ObjectMethod") && prop.key.type === "Identifier") { + if (prop.key.name === "props") + propsOption = prop; + if (prop.key.name === "emits") + emitsOption = prop; + if (prop.key.name === "expose") + exposeOption = prop; + if (prop.key.name === "slots") + slotsOption = prop; + } + } + } + if (propsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare props. Use ${DEFINE_PROPS}() instead.`, + propsOption + ); + } + if (emitsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare emits. Use ${DEFINE_EMITS}() instead.`, + emitsOption + ); + } + if (exposeOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare expose. Use ${DEFINE_EXPOSE}() instead.`, + exposeOption + ); + } + if (slotsOption) { + ctx.error( + `${DEFINE_OPTIONS}() cannot be used to declare slots. Use ${DEFINE_SLOTS}() instead.`, + slotsOption + ); + } + return true; +} + +function processAwait(ctx, node, needSemi, isStatement) { + const argumentStart = node.argument.extra && node.argument.extra.parenthesized ? node.argument.extra.parenStart : node.argument.start; + const startOffset = ctx.startOffset; + const argumentStr = ctx.descriptor.source.slice( + argumentStart + startOffset, + node.argument.end + startOffset + ); + const containsNestedAwait = /\bawait\b/.test(argumentStr); + ctx.s.overwrite( + node.start + startOffset, + argumentStart + startOffset, + `${needSemi ? `;` : ``}( + ([__temp,__restore] = ${ctx.helper( + `withAsyncContext` + )}(${containsNestedAwait ? `async ` : ``}() => ` + ); + ctx.s.appendLeft( + node.end + startOffset, + `)), + ${isStatement ? `` : `__temp = `}await __temp, + __restore()${isStatement ? `` : `, + __temp`} +)` + ); +} + +var __defProp$1 = Object.defineProperty; +var __defProps = Object.defineProperties; +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; +var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; +var __hasOwnProp$1 = Object.prototype.hasOwnProperty; +var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; +var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues$1 = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp$1.call(b, prop)) + __defNormalProp$1(a, prop, b[prop]); + if (__getOwnPropSymbols$1) + for (var prop of __getOwnPropSymbols$1(b)) { + if (__propIsEnum$1.call(b, prop)) + __defNormalProp$1(a, prop, b[prop]); + } + return a; +}; +var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); +function compileScript(sfc, options) { + var _a; + if (!options.id) { + warnOnce$3( + `compileScript now requires passing the \`id\` option. +Upgrade your vite or vue-loader version for compatibility with the latest experimental proposals.` + ); + } + const ctx = new ScriptCompileContext(sfc, options); + const { script, scriptSetup, source, filename } = sfc; + const hoistStatic = options.hoistStatic !== false && !script; + const scopeId = options.id ? options.id.replace(/^data-v-/, "") : ""; + const scriptLang = script && script.lang; + const scriptSetupLang = scriptSetup && scriptSetup.lang; + if (!scriptSetup) { + if (!script) { + throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`); + } + return processNormalScript(ctx, scopeId); + } + if (script && scriptLang !== scriptSetupLang) { + throw new Error( + `[@vue/compiler-sfc] <script> and <script setup> must have the same language type.` + ); + } + if (scriptSetupLang && !ctx.isJS && !ctx.isTS) { + return scriptSetup; + } + const scriptBindings = /* @__PURE__ */ Object.create(null); + const setupBindings = /* @__PURE__ */ Object.create(null); + let defaultExport; + let hasAwait = false; + let hasInlinedSsrRenderFn = false; + const startOffset = ctx.startOffset; + const endOffset = ctx.endOffset; + const scriptStartOffset = script && script.loc.start.offset; + const scriptEndOffset = script && script.loc.end.offset; + function hoistNode(node) { + const start = node.start + startOffset; + let end = node.end + startOffset; + if (node.trailingComments && node.trailingComments.length > 0) { + const lastCommentNode = node.trailingComments[node.trailingComments.length - 1]; + end = lastCommentNode.end + startOffset; + } + while (end <= source.length) { + if (!/\s/.test(source.charAt(end))) { + break; + } + end++; + } + ctx.s.move(start, end, 0); + } + function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) { + let isUsedInTemplate = needTemplateUsageCheck; + if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) { + isUsedInTemplate = isImportUsed(local, sfc); + } + ctx.userImports[local] = { + isType, + imported, + local, + source: source2, + isFromSetup, + isUsedInTemplate + }; + } + function checkInvalidScopeReference(node, method) { + if (!node) + return; + walkIdentifiers(node, (id) => { + const binding = setupBindings[id.name]; + if (binding && binding !== "literal-const") { + ctx.error( + `\`${method}()\` in <script setup> cannot reference locally declared variables because it will be hoisted outside of the setup() function. If your component options require initialization in the module scope, use a separate normal <script> to export the options instead.`, + id + ); + } + }); + } + const scriptAst = ctx.scriptAst; + const scriptSetupAst = ctx.scriptSetupAst; + if (scriptAst) { + for (const node of scriptAst.body) { + if (node.type === "ImportDeclaration") { + for (const specifier of node.specifiers) { + const imported = getImportedName(specifier); + registerUserImport( + node.source.value, + specifier.local.name, + imported, + node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", + false, + !options.inlineTemplate + ); + } + } + } + } + for (const node of scriptSetupAst.body) { + if (node.type === "ImportDeclaration") { + hoistNode(node); + let removed = 0; + const removeSpecifier = (i) => { + const removeLeft = i > removed; + removed++; + const current = node.specifiers[i]; + const next = node.specifiers[i + 1]; + ctx.s.remove( + removeLeft ? node.specifiers[i - 1].end + startOffset : current.start + startOffset, + next && !removeLeft ? next.start + startOffset : current.end + startOffset + ); + }; + for (let i = 0; i < node.specifiers.length; i++) { + const specifier = node.specifiers[i]; + const local = specifier.local.name; + const imported = getImportedName(specifier); + const source2 = node.source.value; + const existing = ctx.userImports[local]; + if (source2 === "vue" && (imported === DEFINE_PROPS || imported === DEFINE_EMITS || imported === DEFINE_EXPOSE)) { + warnOnce$3( + `\`${imported}\` is a compiler macro and no longer needs to be imported.` + ); + removeSpecifier(i); + } else if (existing) { + if (existing.source === source2 && existing.imported === imported) { + removeSpecifier(i); + } else { + ctx.error( + `different imports aliased to same local name.`, + specifier + ); + } + } else { + registerUserImport( + source2, + local, + imported, + node.importKind === "type" || specifier.type === "ImportSpecifier" && specifier.importKind === "type", + true, + !options.inlineTemplate + ); + } + } + if (node.specifiers.length && removed === node.specifiers.length) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } + } + } + const vueImportAliases = {}; + for (const key in ctx.userImports) { + const { source: source2, imported, local } = ctx.userImports[key]; + if (source2 === "vue") + vueImportAliases[imported] = local; + } + if (script && scriptAst) { + for (const node of scriptAst.body) { + if (node.type === "ExportDefaultDeclaration") { + defaultExport = node; + let optionProperties; + if (defaultExport.declaration.type === "ObjectExpression") { + optionProperties = defaultExport.declaration.properties; + } else if (defaultExport.declaration.type === "CallExpression" && defaultExport.declaration.arguments[0] && defaultExport.declaration.arguments[0].type === "ObjectExpression") { + optionProperties = defaultExport.declaration.arguments[0].properties; + } + if (optionProperties) { + for (const p of optionProperties) { + if (p.type === "ObjectProperty" && p.key.type === "Identifier" && p.key.name === "name") { + ctx.hasDefaultExportName = true; + } + if ((p.type === "ObjectMethod" || p.type === "ObjectProperty") && p.key.type === "Identifier" && p.key.name === "render") { + ctx.hasDefaultExportRender = true; + } + } + } + const start = node.start + scriptStartOffset; + const end = node.declaration.start + scriptStartOffset; + ctx.s.overwrite(start, end, `const ${normalScriptDefaultVar} = `); + } else if (node.type === "ExportNamedDeclaration") { + const defaultSpecifier = node.specifiers.find( + (s) => s.exported.type === "Identifier" && s.exported.name === "default" + ); + if (defaultSpecifier) { + defaultExport = node; + if (node.specifiers.length > 1) { + ctx.s.remove( + defaultSpecifier.start + scriptStartOffset, + defaultSpecifier.end + scriptStartOffset + ); + } else { + ctx.s.remove( + node.start + scriptStartOffset, + node.end + scriptStartOffset + ); + } + if (node.source) { + ctx.s.prepend( + `import { ${defaultSpecifier.local.name} as ${normalScriptDefaultVar} } from '${node.source.value}' +` + ); + } else { + ctx.s.appendLeft( + scriptEndOffset, + ` +const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name} +` + ); + } + } + if (node.declaration) { + walkDeclaration( + "script", + node.declaration, + scriptBindings, + vueImportAliases, + hoistStatic + ); + } + } else if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { + walkDeclaration( + "script", + node, + scriptBindings, + vueImportAliases, + hoistStatic + ); + } + } + if (scriptStartOffset > startOffset) { + if (!/\n$/.test(script.content.trim())) { + ctx.s.appendLeft(scriptEndOffset, ` +`); + } + ctx.s.move(scriptStartOffset, scriptEndOffset, 0); + } + } + for (const node of scriptSetupAst.body) { + if (node.type === "ExpressionStatement") { + const expr = unwrapTSNode(node.expression); + if (processDefineProps(ctx, expr) || processDefineEmits(ctx, expr) || processDefineOptions(ctx, expr) || processDefineSlots(ctx, expr)) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } else if (processDefineExpose(ctx, expr)) { + const callee = expr.callee; + ctx.s.overwrite( + callee.start + startOffset, + callee.end + startOffset, + "__expose" + ); + } else { + processDefineModel(ctx, expr); + } + } + if (node.type === "VariableDeclaration" && !node.declare) { + const total = node.declarations.length; + let left = total; + let lastNonRemoved; + for (let i = 0; i < total; i++) { + const decl = node.declarations[i]; + const init = decl.init && unwrapTSNode(decl.init); + if (init) { + if (processDefineOptions(ctx, init)) { + ctx.error( + `${DEFINE_OPTIONS}() has no returning value, it cannot be assigned.`, + node + ); + } + const isDefineProps = processDefineProps(ctx, init, decl.id); + const isDefineEmits = !isDefineProps && processDefineEmits(ctx, init, decl.id); + !isDefineEmits && (processDefineSlots(ctx, init, decl.id) || processDefineModel(ctx, init, decl.id)); + if (isDefineProps && !ctx.propsDestructureRestId && ctx.propsDestructureDecl) { + if (left === 1) { + ctx.s.remove(node.start + startOffset, node.end + startOffset); + } else { + let start = decl.start + startOffset; + let end = decl.end + startOffset; + if (i === total - 1) { + start = node.declarations[lastNonRemoved].end + startOffset; + } else { + end = node.declarations[i + 1].start + startOffset; + } + ctx.s.remove(start, end); + left--; + } + } else if (isDefineEmits) { + ctx.s.overwrite( + startOffset + init.start, + startOffset + init.end, + "__emit" + ); + } else { + lastNonRemoved = i; + } + } + } + } + let isAllLiteral = false; + if ((node.type === "VariableDeclaration" || node.type === "FunctionDeclaration" || node.type === "ClassDeclaration" || node.type === "TSEnumDeclaration") && !node.declare) { + isAllLiteral = walkDeclaration( + "scriptSetup", + node, + setupBindings, + vueImportAliases, + hoistStatic + ); + } + if (hoistStatic && isAllLiteral) { + hoistNode(node); + } + if (node.type === "VariableDeclaration" && !node.declare || node.type.endsWith("Statement")) { + const scope = [scriptSetupAst.body]; + walk$2(node, { + enter(child, parent) { + if (isFunctionType(child)) { + this.skip(); + } + if (child.type === "BlockStatement") { + scope.push(child.body); + } + if (child.type === "AwaitExpression") { + hasAwait = true; + const currentScope = scope[scope.length - 1]; + const needsSemi = currentScope.some((n, i) => { + return (scope.length === 1 || i > 0) && n.type === "ExpressionStatement" && n.start === child.start; + }); + processAwait( + ctx, + child, + needsSemi, + parent.type === "ExpressionStatement" + ); + } + }, + exit(node2) { + if (node2.type === "BlockStatement") + scope.pop(); + } + }); + } + if (node.type === "ExportNamedDeclaration" && node.exportKind !== "type" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration") { + ctx.error( + `<script setup> cannot contain ES module exports. If you are using a previous version of <script setup>, please consult the updated RFC at https://github.com/vuejs/rfcs/pull/227.`, + node + ); + } + if (ctx.isTS) { + if (node.type.startsWith("TS") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "VariableDeclaration" && node.declare) { + if (node.type !== "TSEnumDeclaration") { + hoistNode(node); + } + } + } + } + if (ctx.propsDestructureDecl) { + transformDestructuredProps(ctx, vueImportAliases); + } + checkInvalidScopeReference(ctx.propsRuntimeDecl, DEFINE_PROPS); + checkInvalidScopeReference(ctx.propsRuntimeDefaults, DEFINE_PROPS); + checkInvalidScopeReference(ctx.propsDestructureDecl, DEFINE_PROPS); + checkInvalidScopeReference(ctx.emitsRuntimeDecl, DEFINE_EMITS); + checkInvalidScopeReference(ctx.optionsRuntimeDecl, DEFINE_OPTIONS); + for (const { runtimeOptionNodes } of Object.values(ctx.modelDecls)) { + for (const node of runtimeOptionNodes) { + checkInvalidScopeReference(node, DEFINE_MODEL); + } + } + if (script) { + if (startOffset < scriptStartOffset) { + ctx.s.remove(0, startOffset); + ctx.s.remove(endOffset, scriptStartOffset); + ctx.s.remove(scriptEndOffset, source.length); + } else { + ctx.s.remove(0, scriptStartOffset); + ctx.s.remove(scriptEndOffset, startOffset); + ctx.s.remove(endOffset, source.length); + } + } else { + ctx.s.remove(0, startOffset); + ctx.s.remove(endOffset, source.length); + } + if (scriptAst) { + Object.assign(ctx.bindingMetadata, analyzeScriptBindings(scriptAst.body)); + } + for (const [key, { isType, imported, source: source2 }] of Object.entries( + ctx.userImports + )) { + if (isType) + continue; + ctx.bindingMetadata[key] = imported === "*" || imported === "default" && source2.endsWith(".vue") || source2 === "vue" ? "setup-const" : "setup-maybe-ref"; + } + for (const key in scriptBindings) { + ctx.bindingMetadata[key] = scriptBindings[key]; + } + for (const key in setupBindings) { + ctx.bindingMetadata[key] = setupBindings[key]; + } + if (sfc.cssVars.length && // no need to do this when targeting SSR + !((_a = options.templateOptions) == null ? void 0 : _a.ssr)) { + ctx.helperImports.add(CSS_VARS_HELPER); + ctx.helperImports.add("unref"); + ctx.s.prependLeft( + startOffset, + ` +${genCssVarsCode( + sfc.cssVars, + ctx.bindingMetadata, + scopeId, + !!options.isProd + )} +` + ); + } + let args = `__props`; + if (ctx.propsTypeDecl) { + args += `: any`; + } + if (ctx.propsDecl) { + if (ctx.propsDestructureRestId) { + ctx.s.overwrite( + startOffset + ctx.propsCall.start, + startOffset + ctx.propsCall.end, + `${ctx.helper(`createPropsRestProxy`)}(__props, ${JSON.stringify( + Object.keys(ctx.propsDestructuredBindings) + )})` + ); + ctx.s.overwrite( + startOffset + ctx.propsDestructureDecl.start, + startOffset + ctx.propsDestructureDecl.end, + ctx.propsDestructureRestId + ); + } else if (!ctx.propsDestructureDecl) { + ctx.s.overwrite( + startOffset + ctx.propsCall.start, + startOffset + ctx.propsCall.end, + "__props" + ); + } + } + if (hasAwait) { + const any = ctx.isTS ? `: any` : ``; + ctx.s.prependLeft(startOffset, ` +let __temp${any}, __restore${any} +`); + } + const destructureElements = ctx.hasDefineExposeCall || !options.inlineTemplate ? [`expose: __expose`] : []; + if (ctx.emitDecl) { + destructureElements.push(`emit: __emit`); + } + if (destructureElements.length) { + args += `, { ${destructureElements.join(", ")} }`; + } + let returned; + if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) { + const allBindings = __spreadValues$1(__spreadValues$1({}, scriptBindings), setupBindings); + for (const key in ctx.userImports) { + if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) { + allBindings[key] = true; + } + } + returned = `{ `; + for (const key in allBindings) { + if (allBindings[key] === true && ctx.userImports[key].source !== "vue" && !ctx.userImports[key].source.endsWith(".vue")) { + returned += `get ${key}() { return ${key} }, `; + } else if (ctx.bindingMetadata[key] === "setup-let") { + const setArg = key === "v" ? `_v` : `v`; + returned += `get ${key}() { return ${key} }, set ${key}(${setArg}) { ${key} = ${setArg} }, `; + } else { + returned += `${key}, `; + } + } + returned = returned.replace(/, $/, "") + ` }`; + } else { + if (sfc.template && !sfc.template.src) { + if (options.templateOptions && options.templateOptions.ssr) { + hasInlinedSsrRenderFn = true; + } + const { code, ast, preamble, tips, errors } = compileTemplate(__spreadProps(__spreadValues$1({ + filename, + ast: sfc.template.ast, + source: sfc.template.content, + inMap: sfc.template.map + }, options.templateOptions), { + id: scopeId, + scoped: sfc.styles.some((s) => s.scoped), + isProd: options.isProd, + ssrCssVars: sfc.cssVars, + compilerOptions: __spreadProps(__spreadValues$1({}, options.templateOptions && options.templateOptions.compilerOptions), { + inline: true, + isTS: ctx.isTS, + bindingMetadata: ctx.bindingMetadata + }) + })); + if (tips.length) { + tips.forEach(warnOnce$3); + } + const err = errors[0]; + if (typeof err === "string") { + throw new Error(err); + } else if (err) { + if (err.loc) { + err.message += ` + +` + sfc.filename + "\n" + generateCodeFrame( + source, + err.loc.start.offset, + err.loc.end.offset + ) + ` +`; + } + throw err; + } + if (preamble) { + ctx.s.prepend(preamble); + } + if (ast && ast.helpers.has(UNREF)) { + ctx.helperImports.delete("unref"); + } + returned = code; + } else { + returned = `() => {}`; + } + } + if (!options.inlineTemplate && true) { + ctx.s.appendRight( + endOffset, + ` +const __returned__ = ${returned} +Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true }) +return __returned__ +} + +` + ); + } else { + ctx.s.appendRight(endOffset, ` +return ${returned} +} + +`); + } + const genDefaultAs = options.genDefaultAs ? `const ${options.genDefaultAs} =` : `export default`; + let runtimeOptions = ``; + if (!ctx.hasDefaultExportName && filename && filename !== DEFAULT_FILENAME) { + const match = filename.match(/([^/\\]+)\.\w+$/); + if (match) { + runtimeOptions += ` + __name: '${match[1]}',`; + } + } + if (hasInlinedSsrRenderFn) { + runtimeOptions += ` + __ssrInlineRender: true,`; + } + const propsDecl = genRuntimeProps(ctx); + if (propsDecl) + runtimeOptions += ` + props: ${propsDecl},`; + const emitsDecl = genRuntimeEmits(ctx); + if (emitsDecl) + runtimeOptions += ` + emits: ${emitsDecl},`; + let definedOptions = ""; + if (ctx.optionsRuntimeDecl) { + definedOptions = scriptSetup.content.slice(ctx.optionsRuntimeDecl.start, ctx.optionsRuntimeDecl.end).trim(); + } + const exposeCall = ctx.hasDefineExposeCall || options.inlineTemplate ? `` : ` __expose(); +`; + if (ctx.isTS) { + const def = (defaultExport ? ` + ...${normalScriptDefaultVar},` : ``) + (definedOptions ? ` + ...${definedOptions},` : ""); + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} /*#__PURE__*/${ctx.helper( + `defineComponent` + )}({${def}${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `})`); + } else { + if (defaultExport || definedOptions) { + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} /*#__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `})`); + } else { + ctx.s.prependLeft( + startOffset, + ` +${genDefaultAs} {${runtimeOptions} + ${hasAwait ? `async ` : ``}setup(${args}) { +${exposeCall}` + ); + ctx.s.appendRight(endOffset, `}`); + } + } + if (ctx.helperImports.size > 0) { + ctx.s.prepend( + `import { ${[...ctx.helperImports].map((h) => `${h} as _${h}`).join(", ")} } from 'vue' +` + ); + } + return __spreadProps(__spreadValues$1({}, scriptSetup), { + bindings: ctx.bindingMetadata, + imports: ctx.userImports, + content: ctx.s.toString(), + map: options.sourceMap !== false ? ctx.s.generateMap({ + source: filename, + hires: true, + includeContent: true + }) : void 0, + scriptAst: scriptAst == null ? void 0 : scriptAst.body, + scriptSetupAst: scriptSetupAst == null ? void 0 : scriptSetupAst.body, + deps: ctx.deps ? [...ctx.deps] : void 0 + }); +} +function registerBinding(bindings, node, type) { + bindings[node.name] = type; +} +function walkDeclaration(from, node, bindings, userImportAliases, hoistStatic) { + let isAllLiteral = false; + if (node.type === "VariableDeclaration") { + const isConst = node.kind === "const"; + isAllLiteral = isConst && node.declarations.every( + (decl) => decl.id.type === "Identifier" && isStaticNode(decl.init) + ); + for (const { id, init: _init } of node.declarations) { + const init = _init && unwrapTSNode(_init); + const isDefineCall = !!(isConst && isCallOf( + init, + (c) => c === DEFINE_PROPS || c === DEFINE_EMITS || c === WITH_DEFAULTS + )); + if (id.type === "Identifier") { + let bindingType; + const userReactiveBinding = userImportAliases["reactive"]; + if ((hoistStatic || from === "script") && (isAllLiteral || isConst && isStaticNode(init))) { + bindingType = "literal-const"; + } else if (isCallOf(init, userReactiveBinding)) { + bindingType = isConst ? "setup-reactive-const" : "setup-let"; + } else if ( + // if a declaration is a const literal, we can mark it so that + // the generated render fn code doesn't need to unref() it + isDefineCall || isConst && canNeverBeRef(init, userReactiveBinding) + ) { + bindingType = isCallOf(init, DEFINE_PROPS) ? "setup-reactive-const" : "setup-const"; + } else if (isConst) { + if (isCallOf( + init, + (m) => m === userImportAliases["ref"] || m === userImportAliases["computed"] || m === userImportAliases["shallowRef"] || m === userImportAliases["customRef"] || m === userImportAliases["toRef"] || m === DEFINE_MODEL + )) { + bindingType = "setup-ref"; + } else { + bindingType = "setup-maybe-ref"; + } + } else { + bindingType = "setup-let"; + } + registerBinding(bindings, id, bindingType); + } else { + if (isCallOf(init, DEFINE_PROPS)) { + continue; + } + if (id.type === "ObjectPattern") { + walkObjectPattern(id, bindings, isConst, isDefineCall); + } else if (id.type === "ArrayPattern") { + walkArrayPattern(id, bindings, isConst, isDefineCall); + } + } + } + } else if (node.type === "TSEnumDeclaration") { + isAllLiteral = node.members.every( + (member) => !member.initializer || isStaticNode(member.initializer) + ); + bindings[node.id.name] = isAllLiteral ? "literal-const" : "setup-const"; + } else if (node.type === "FunctionDeclaration" || node.type === "ClassDeclaration") { + bindings[node.id.name] = "setup-const"; + } + return isAllLiteral; +} +function walkObjectPattern(node, bindings, isConst, isDefineCall = false) { + for (const p of node.properties) { + if (p.type === "ObjectProperty") { + if (p.key.type === "Identifier" && p.key === p.value) { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, p.key, type); + } else { + walkPattern(p.value, bindings, isConst, isDefineCall); + } + } else { + const type = isConst ? "setup-const" : "setup-let"; + registerBinding(bindings, p.argument, type); + } + } +} +function walkArrayPattern(node, bindings, isConst, isDefineCall = false) { + for (const e of node.elements) { + e && walkPattern(e, bindings, isConst, isDefineCall); + } +} +function walkPattern(node, bindings, isConst, isDefineCall = false) { + if (node.type === "Identifier") { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, node, type); + } else if (node.type === "RestElement") { + const type = isConst ? "setup-const" : "setup-let"; + registerBinding(bindings, node.argument, type); + } else if (node.type === "ObjectPattern") { + walkObjectPattern(node, bindings, isConst); + } else if (node.type === "ArrayPattern") { + walkArrayPattern(node, bindings, isConst); + } else if (node.type === "AssignmentPattern") { + if (node.left.type === "Identifier") { + const type = isDefineCall ? "setup-const" : isConst ? "setup-maybe-ref" : "setup-let"; + registerBinding(bindings, node.left, type); + } else { + walkPattern(node.left, bindings, isConst); + } + } +} +function canNeverBeRef(node, userReactiveImport) { + if (isCallOf(node, userReactiveImport)) { + return true; + } + switch (node.type) { + case "UnaryExpression": + case "BinaryExpression": + case "ArrayExpression": + case "ObjectExpression": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "UpdateExpression": + case "ClassExpression": + case "TaggedTemplateExpression": + return true; + case "SequenceExpression": + return canNeverBeRef( + node.expressions[node.expressions.length - 1], + userReactiveImport + ); + default: + if (isLiteralNode(node)) { + return true; + } + return false; + } +} +function isStaticNode(node) { + node = unwrapTSNode(node); + switch (node.type) { + case "UnaryExpression": + return isStaticNode(node.argument); + case "LogicalExpression": + case "BinaryExpression": + return isStaticNode(node.left) && isStaticNode(node.right); + case "ConditionalExpression": { + return isStaticNode(node.test) && isStaticNode(node.consequent) && isStaticNode(node.alternate); + } + case "SequenceExpression": + case "TemplateLiteral": + return node.expressions.every((expr) => isStaticNode(expr)); + case "ParenthesizedExpression": + return isStaticNode(node.expression); + case "StringLiteral": + case "NumericLiteral": + case "BooleanLiteral": + case "NullLiteral": + case "BigIntLiteral": + return true; + } + return false; +} + +var __defProp = Object.defineProperty; +var __getOwnPropSymbols = Object.getOwnPropertySymbols; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __propIsEnum = Object.prototype.propertyIsEnumerable; +var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __spreadValues = (a, b) => { + for (var prop in b || (b = {})) + if (__hasOwnProp.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + if (__getOwnPropSymbols) + for (var prop of __getOwnPropSymbols(b)) { + if (__propIsEnum.call(b, prop)) + __defNormalProp(a, prop, b[prop]); + } + return a; +}; +const version = "3.4.15"; +const parseCache = parseCache$1; +const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages); +const walk = walk$2; +const shouldTransformRef = () => false; + +export { MagicString, parse_1$1 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, errorMessages, extractIdentifiers$1 as extractIdentifiers, extractRuntimeEmits, extractRuntimeProps, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$7 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransformRef, version, walk, walkIdentifiers }; diff --git a/node_modules/@vue/compiler-sfc/package.json b/node_modules/@vue/compiler-sfc/package.json index 6fda58f4..d39b5bf3 100644 --- a/node_modules/@vue/compiler-sfc/package.json +++ b/node_modules/@vue/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "3.2.36", + "version": "3.4.15", "description": "@vue/compiler-sfc", "main": "dist/compiler-sfc.cjs.js", "module": "dist/compiler-sfc.esm-browser.js", @@ -8,6 +8,16 @@ "files": [ "dist" ], + "exports": { + ".": { + "types": "./dist/compiler-sfc.d.ts", + "node": "./dist/compiler-sfc.cjs.js", + "module": "./dist/compiler-sfc.esm-browser.js", + "import": "./dist/compiler-sfc.esm-browser.js", + "require": "./dist/compiler-sfc.cjs.js" + }, + "./*": "./*" + }, "buildOptions": { "name": "VueCompilerSFC", "formats": [ @@ -32,28 +42,26 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.36", - "@vue/compiler-dom": "3.2.36", - "@vue/compiler-ssr": "3.2.36", - "@vue/reactivity-transform": "3.2.36", - "@vue/shared": "3.2.36", + "@babel/parser": "^7.23.6", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "source-map": "^0.6.1", - "postcss": "^8.1.10" + "magic-string": "^0.30.5", + "postcss": "^8.4.33", + "source-map-js": "^1.0.2", + "@vue/compiler-core": "3.4.15", + "@vue/shared": "3.4.15", + "@vue/compiler-dom": "3.4.15", + "@vue/compiler-ssr": "3.4.15" }, "devDependencies": { - "@types/estree": "^0.0.48", - "@babel/types": "^7.16.0", - "@types/lru-cache": "^5.1.0", - "pug": "^3.0.1", - "sass": "^1.26.9", + "@babel/types": "^7.23.6", "@vue/consolidate": "^0.17.3", "hash-sum": "^2.0.0", - "lru-cache": "^5.1.1", + "lru-cache": "^10.1.0", "merge-source-map": "^1.1.0", - "postcss-modules": "^4.0.0", - "postcss-selector-parser": "^6.0.4" + "minimatch": "^9.0.3", + "postcss-modules": "^6.0.0", + "postcss-selector-parser": "^6.0.15", + "pug": "^3.0.2", + "sass": "^1.69.7" } -} +} \ No newline at end of file diff --git a/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js b/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js index a223687a..de3b7817 100644 --- a/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +++ b/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js @@ -1,3 +1,8 @@ +/** +* @vue/compiler-ssr v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -25,1238 +30,1326 @@ const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`); const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`); const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`); const ssrHelpers = { - [SSR_INTERPOLATE]: `ssrInterpolate`, - [SSR_RENDER_VNODE]: `ssrRenderVNode`, - [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, - [SSR_RENDER_SLOT]: `ssrRenderSlot`, - [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`, - [SSR_RENDER_CLASS]: `ssrRenderClass`, - [SSR_RENDER_STYLE]: `ssrRenderStyle`, - [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, - [SSR_RENDER_ATTR]: `ssrRenderAttr`, - [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, - [SSR_RENDER_LIST]: `ssrRenderList`, - [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`, - [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, - [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, - [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, - [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, - [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`, - [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`, - [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps` + [SSR_INTERPOLATE]: `ssrInterpolate`, + [SSR_RENDER_VNODE]: `ssrRenderVNode`, + [SSR_RENDER_COMPONENT]: `ssrRenderComponent`, + [SSR_RENDER_SLOT]: `ssrRenderSlot`, + [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`, + [SSR_RENDER_CLASS]: `ssrRenderClass`, + [SSR_RENDER_STYLE]: `ssrRenderStyle`, + [SSR_RENDER_ATTRS]: `ssrRenderAttrs`, + [SSR_RENDER_ATTR]: `ssrRenderAttr`, + [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`, + [SSR_RENDER_LIST]: `ssrRenderList`, + [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`, + [SSR_LOOSE_EQUAL]: `ssrLooseEqual`, + [SSR_LOOSE_CONTAIN]: `ssrLooseContain`, + [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`, + [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`, + [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`, + [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`, + [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps` }; -// Note: these are helpers imported from @vue/server-renderer -// make sure the names match! compilerDom.registerRuntimeHelpers(ssrHelpers); -// Plugin for the first transform pass, which simply constructs the AST node -const ssrTransformIf = compilerDom.createStructuralDirectiveTransform(/^(if|else|else-if)$/, compilerDom.processIf); -// This is called during the 2nd transform pass to construct the SSR-specific -// codegen nodes. +const ssrTransformIf = compilerDom.createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + compilerDom.processIf +); function ssrProcessIf(node, context, disableNestedFragments = false) { - const [rootBranch] = node.branches; - const ifStatement = compilerDom.createIfStatement(rootBranch.condition, processIfBranch(rootBranch, context, disableNestedFragments)); - context.pushStatement(ifStatement); - let currentIf = ifStatement; - for (let i = 1; i < node.branches.length; i++) { - const branch = node.branches[i]; - const branchBlockStatement = processIfBranch(branch, context, disableNestedFragments); - if (branch.condition) { - // else-if - currentIf = currentIf.alternate = compilerDom.createIfStatement(branch.condition, branchBlockStatement); - } - else { - // else - currentIf.alternate = branchBlockStatement; - } - } - if (!currentIf.alternate) { - currentIf.alternate = compilerDom.createBlockStatement([ - compilerDom.createCallExpression(`_push`, ['`<!---->`']) - ]); + const [rootBranch] = node.branches; + const ifStatement = compilerDom.createIfStatement( + rootBranch.condition, + processIfBranch(rootBranch, context, disableNestedFragments) + ); + context.pushStatement(ifStatement); + let currentIf = ifStatement; + for (let i = 1; i < node.branches.length; i++) { + const branch = node.branches[i]; + const branchBlockStatement = processIfBranch( + branch, + context, + disableNestedFragments + ); + if (branch.condition) { + currentIf = currentIf.alternate = compilerDom.createIfStatement( + branch.condition, + branchBlockStatement + ); + } else { + currentIf.alternate = branchBlockStatement; } + } + if (!currentIf.alternate) { + currentIf.alternate = compilerDom.createBlockStatement([ + compilerDom.createCallExpression(`_push`, ["`<!---->`"]) + ]); + } } function processIfBranch(branch, context, disableNestedFragments = false) { - const { children } = branch; - const needFragmentWrapper = !disableNestedFragments && - (children.length !== 1 || children[0].type !== 1 /* ELEMENT */) && - // optimize away nested fragments when the only child is a ForNode - !(children.length === 1 && children[0].type === 11 /* FOR */); - return processChildrenAsStatement(branch, context, needFragmentWrapper); + const { children } = branch; + const needFragmentWrapper = !disableNestedFragments && (children.length !== 1 || children[0].type !== 1) && // optimize away nested fragments when the only child is a ForNode + !(children.length === 1 && children[0].type === 11); + return processChildrenAsStatement(branch, context, needFragmentWrapper); } -// Plugin for the first transform pass, which simply constructs the AST node -const ssrTransformFor = compilerDom.createStructuralDirectiveTransform('for', compilerDom.processFor); -// This is called during the 2nd transform pass to construct the SSR-specific -// codegen nodes. +const ssrTransformFor = compilerDom.createStructuralDirectiveTransform( + "for", + compilerDom.processFor +); function ssrProcessFor(node, context, disableNestedFragments = false) { - const needFragmentWrapper = !disableNestedFragments && - (node.children.length !== 1 || node.children[0].type !== 1 /* ELEMENT */); - const renderLoop = compilerDom.createFunctionExpression(compilerDom.createForLoopParams(node.parseResult)); - renderLoop.body = processChildrenAsStatement(node, context, needFragmentWrapper); - // v-for always renders a fragment unless explicitly disabled - if (!disableNestedFragments) { - context.pushStringPart(`<!--[-->`); - } - context.pushStatement(compilerDom.createCallExpression(context.helper(SSR_RENDER_LIST), [ - node.source, - renderLoop - ])); - if (!disableNestedFragments) { - context.pushStringPart(`<!--]-->`); - } + const needFragmentWrapper = !disableNestedFragments && (node.children.length !== 1 || node.children[0].type !== 1); + const renderLoop = compilerDom.createFunctionExpression( + compilerDom.createForLoopParams(node.parseResult) + ); + renderLoop.body = processChildrenAsStatement( + node, + context, + needFragmentWrapper + ); + if (!disableNestedFragments) { + context.pushStringPart(`<!--[-->`); + } + context.pushStatement( + compilerDom.createCallExpression(context.helper(SSR_RENDER_LIST), [ + node.source, + renderLoop + ]) + ); + if (!disableNestedFragments) { + context.pushStringPart(`<!--]-->`); + } } const ssrTransformSlotOutlet = (node, context) => { - if (compilerDom.isSlotOutlet(node)) { - const { slotName, slotProps } = compilerDom.processSlotOutlet(node, context); - const args = [ - `_ctx.$slots`, - slotName, - slotProps || `{}`, - // fallback content placeholder. will be replaced in the process phase - `null`, - `_push`, - `_parent` - ]; - // inject slot scope id if current template uses :slotted - if (context.scopeId && context.slotted !== false) { - args.push(`"${context.scopeId}-s"`); - } - let method = SSR_RENDER_SLOT; - // #3989 - // check if this is a single slot inside a transition wrapper - since - // transition will unwrap the slot fragment into a single vnode at runtime, - // we need to avoid rendering the slot as a fragment. - const parent = context.parent; - if (parent && - parent.type === 1 /* ELEMENT */ && - parent.tagType === 1 /* COMPONENT */ && - compilerDom.resolveComponentType(parent, context, true) === compilerDom.TRANSITION && - parent.children.filter(c => c.type === 1 /* ELEMENT */).length === 1) { - method = SSR_RENDER_SLOT_INNER; - } - node.ssrCodegenNode = compilerDom.createCallExpression(context.helper(method), args); + if (compilerDom.isSlotOutlet(node)) { + const { slotName, slotProps } = compilerDom.processSlotOutlet(node, context); + const args = [ + `_ctx.$slots`, + slotName, + slotProps || `{}`, + // fallback content placeholder. will be replaced in the process phase + `null`, + `_push`, + `_parent` + ]; + if (context.scopeId && context.slotted !== false) { + args.push(`"${context.scopeId}-s"`); } + let method = SSR_RENDER_SLOT; + const parent = context.parent; + let componentType; + if (parent && parent.type === 1 && parent.tagType === 1 && ((componentType = compilerDom.resolveComponentType(parent, context, true)) === compilerDom.TRANSITION || componentType === compilerDom.TRANSITION_GROUP) && parent.children.filter((c) => c.type === 1).length === 1) { + method = SSR_RENDER_SLOT_INNER; + if (!(context.scopeId && context.slotted !== false)) { + args.push("null"); + } + args.push("true"); + } + node.ssrCodegenNode = compilerDom.createCallExpression(context.helper(method), args); + } }; function ssrProcessSlotOutlet(node, context) { - const renderCall = node.ssrCodegenNode; - // has fallback content - if (node.children.length) { - const fallbackRenderFn = compilerDom.createFunctionExpression([]); - fallbackRenderFn.body = processChildrenAsStatement(node, context); - // _renderSlot(slots, name, props, fallback, ...) - renderCall.arguments[3] = fallbackRenderFn; - } - // Forwarded <slot/>. Merge slot scope ids - if (context.withSlotScopeId) { - const slotScopeId = renderCall.arguments[6]; - renderCall.arguments[6] = slotScopeId - ? `${slotScopeId} + _scopeId` - : `_scopeId`; - } - context.pushStatement(node.ssrCodegenNode); + const renderCall = node.ssrCodegenNode; + if (node.children.length) { + const fallbackRenderFn = compilerDom.createFunctionExpression([]); + fallbackRenderFn.body = processChildrenAsStatement(node, context); + renderCall.arguments[3] = fallbackRenderFn; + } + if (context.withSlotScopeId) { + const slotScopeId = renderCall.arguments[6]; + renderCall.arguments[6] = slotScopeId ? `${slotScopeId} + _scopeId` : `_scopeId`; + } + context.pushStatement(node.ssrCodegenNode); } function createSSRCompilerError(code, loc) { - return compilerDom.createCompilerError(code, loc, SSRErrorMessages); + return compilerDom.createCompilerError(code, loc, SSRErrorMessages); } const SSRErrorMessages = { - [61 /* X_SSR_UNSAFE_ATTR_NAME */]: `Unsafe attribute name for SSR.`, - [62 /* X_SSR_NO_TELEPORT_TARGET */]: `Missing the 'to' prop on teleport element.`, - [63 /* X_SSR_INVALID_AST_NODE */]: `Invalid AST node during SSR transform.` + [65]: `Unsafe attribute name for SSR.`, + [66]: `Missing the 'to' prop on teleport element.`, + [67]: `Invalid AST node during SSR transform.` }; -// Note: this is a 2nd-pass codegen transform. function ssrProcessTeleport(node, context) { - const targetProp = compilerDom.findProp(node, 'to'); - if (!targetProp) { - context.onError(createSSRCompilerError(62 /* X_SSR_NO_TELEPORT_TARGET */, node.loc)); - return; - } - let target; - if (targetProp.type === 6 /* ATTRIBUTE */) { - target = - targetProp.value && compilerDom.createSimpleExpression(targetProp.value.content, true); - } - else { - target = targetProp.exp; - } - if (!target) { - context.onError(createSSRCompilerError(62 /* X_SSR_NO_TELEPORT_TARGET */, targetProp.loc)); - return; - } - const disabledProp = compilerDom.findProp(node, 'disabled', false, true /* allow empty */); - const disabled = disabledProp - ? disabledProp.type === 6 /* ATTRIBUTE */ - ? `true` - : disabledProp.exp || `false` - : `false`; - const contentRenderFn = compilerDom.createFunctionExpression([`_push`], undefined, // Body is added later - true, // newline - false, // isSlot - node.loc); - contentRenderFn.body = processChildrenAsStatement(node, context); - context.pushStatement(compilerDom.createCallExpression(context.helper(SSR_RENDER_TELEPORT), [ - `_push`, - contentRenderFn, - target, - disabled, - `_parent` - ])); + const targetProp = compilerDom.findProp(node, "to"); + if (!targetProp) { + context.onError( + createSSRCompilerError(66, node.loc) + ); + return; + } + let target; + if (targetProp.type === 6) { + target = targetProp.value && compilerDom.createSimpleExpression(targetProp.value.content, true); + } else { + target = targetProp.exp; + } + if (!target) { + context.onError( + createSSRCompilerError( + 66, + targetProp.loc + ) + ); + return; + } + const disabledProp = compilerDom.findProp( + node, + "disabled", + false, + true + /* allow empty */ + ); + const disabled = disabledProp ? disabledProp.type === 6 ? `true` : disabledProp.exp || `false` : `false`; + const contentRenderFn = compilerDom.createFunctionExpression( + [`_push`], + void 0, + // Body is added later + true, + // newline + false, + // isSlot + node.loc + ); + contentRenderFn.body = processChildrenAsStatement(node, context); + context.pushStatement( + compilerDom.createCallExpression(context.helper(SSR_RENDER_TELEPORT), [ + `_push`, + contentRenderFn, + target, + disabled, + `_parent` + ]) + ); } -const wipMap = new WeakMap(); -// phase 1 +const wipMap$3 = /* @__PURE__ */ new WeakMap(); function ssrTransformSuspense(node, context) { - return () => { - if (node.children.length) { - const wipEntry = { - slotsExp: null, - wipSlots: [] - }; - wipMap.set(node, wipEntry); - wipEntry.slotsExp = compilerDom.buildSlots(node, context, (_props, children, loc) => { - const fn = compilerDom.createFunctionExpression([], undefined, // no return, assign body later - true, // newline - false, // suspense slots are not treated as normal slots - loc); - wipEntry.wipSlots.push({ - fn, - children - }); - return fn; - }).slots; + return () => { + if (node.children.length) { + const wipEntry = { + slotsExp: null, + // to be immediately set + wipSlots: [] + }; + wipMap$3.set(node, wipEntry); + wipEntry.slotsExp = compilerDom.buildSlots( + node, + context, + (_props, _vForExp, children, loc) => { + const fn = compilerDom.createFunctionExpression( + [], + void 0, + // no return, assign body later + true, + // newline + false, + // suspense slots are not treated as normal slots + loc + ); + wipEntry.wipSlots.push({ + fn, + children + }); + return fn; } - }; + ).slots; + } + }; } -// phase 2 function ssrProcessSuspense(node, context) { - // complete wip slots with ssr code - const wipEntry = wipMap.get(node); - if (!wipEntry) { - return; - } - const { slotsExp, wipSlots } = wipEntry; - for (let i = 0; i < wipSlots.length; i++) { - const slot = wipSlots[i]; - slot.fn.body = processChildrenAsStatement(slot, context); - } - // _push(ssrRenderSuspense(slots)) - context.pushStatement(compilerDom.createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [ - `_push`, - slotsExp - ])); + const wipEntry = wipMap$3.get(node); + if (!wipEntry) { + return; + } + const { slotsExp, wipSlots } = wipEntry; + for (let i = 0; i < wipSlots.length; i++) { + const slot = wipSlots[i]; + slot.fn.body = processChildrenAsStatement(slot, context); + } + context.pushStatement( + compilerDom.createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [ + `_push`, + slotsExp + ]) + ); } -// for directives with children overwrite (e.g. v-html & v-text), we need to -// store the raw children so that they can be added in the 2nd pass. -const rawChildrenMap = new WeakMap(); +const rawChildrenMap = /* @__PURE__ */ new WeakMap(); const ssrTransformElement = (node, context) => { - if (node.type !== 1 /* ELEMENT */ || - node.tagType !== 0 /* ELEMENT */) { - return; + if (node.type !== 1 || node.tagType !== 0) { + return; + } + return function ssrPostTransformElement() { + const openTag = [`<${node.tag}`]; + const needTagForRuntime = node.tag === "textarea" || node.tag.indexOf("-") > 0; + const hasDynamicVBind = compilerDom.hasDynamicKeyVBind(node); + const hasCustomDir = node.props.some( + (p) => p.type === 7 && !shared.isBuiltInDirective(p.name) + ); + const needMergeProps = hasDynamicVBind || hasCustomDir; + if (needMergeProps) { + const { props, directives } = compilerDom.buildProps( + node, + context, + node.props, + false, + false, + true + ); + if (props || directives.length) { + const mergedProps = buildSSRProps(props, directives, context); + const propsExp = compilerDom.createCallExpression( + context.helper(SSR_RENDER_ATTRS), + [mergedProps] + ); + if (node.tag === "textarea") { + const existingText = node.children[0]; + if (!existingText || existingText.type !== 5) { + const tempId = `_temp${context.temps++}`; + propsExp.arguments = [ + compilerDom.createAssignmentExpression( + compilerDom.createSimpleExpression(tempId, false), + mergedProps + ) + ]; + rawChildrenMap.set( + node, + compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ + compilerDom.createConditionalExpression( + compilerDom.createSimpleExpression(`"value" in ${tempId}`, false), + compilerDom.createSimpleExpression(`${tempId}.value`, false), + compilerDom.createSimpleExpression( + existingText ? existingText.content : ``, + true + ), + false + ) + ]) + ); + } + } else if (node.tag === "input") { + const vModel = findVModel(node); + if (vModel) { + const tempId = `_temp${context.temps++}`; + const tempExp = compilerDom.createSimpleExpression(tempId, false); + propsExp.arguments = [ + compilerDom.createSequenceExpression([ + compilerDom.createAssignmentExpression(tempExp, mergedProps), + compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), [ + tempExp, + compilerDom.createCallExpression( + context.helper(SSR_GET_DYNAMIC_MODEL_PROPS), + [ + tempExp, + // existing props + vModel.exp + // model + ] + ) + ]) + ]) + ]; + } + } + if (needTagForRuntime) { + propsExp.arguments.push(`"${node.tag}"`); + } + openTag.push(propsExp); + } } - return function ssrPostTransformElement() { - // element - // generate the template literal representing the open tag. - const openTag = [`<${node.tag}`]; - // some tags need to be passed to runtime for special checks - const needTagForRuntime = node.tag === 'textarea' || node.tag.indexOf('-') > 0; - // v-bind="obj", v-bind:[key] and custom directives can potentially - // overwrite other static attrs and can affect final rendering result, - // so when they are present we need to bail out to full `renderAttrs` - const hasDynamicVBind = compilerDom.hasDynamicKeyVBind(node); - const hasCustomDir = node.props.some(p => p.type === 7 /* DIRECTIVE */ && !shared.isBuiltInDirective(p.name)); - const needMergeProps = hasDynamicVBind || hasCustomDir; - if (needMergeProps) { - const { props, directives } = compilerDom.buildProps(node, context, node.props, false /* isComponent */, false /* isDynamicComponent */, true /* ssr */); - if (props || directives.length) { - const mergedProps = buildSSRProps(props, directives, context); - const propsExp = compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTRS), [mergedProps]); - if (node.tag === 'textarea') { - const existingText = node.children[0]; - // If interpolation, this is dynamic <textarea> content, potentially - // injected by v-model and takes higher priority than v-bind value - if (!existingText || existingText.type !== 5 /* INTERPOLATION */) { - // <textarea> with dynamic v-bind. We don't know if the final props - // will contain .value, so we will have to do something special: - // assign the merged props to a temp variable, and check whether - // it contains value (if yes, render is as children). - const tempId = `_temp${context.temps++}`; - propsExp.arguments = [ - compilerDom.createAssignmentExpression(compilerDom.createSimpleExpression(tempId, false), mergedProps) - ]; - rawChildrenMap.set(node, compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ - compilerDom.createConditionalExpression(compilerDom.createSimpleExpression(`"value" in ${tempId}`, false), compilerDom.createSimpleExpression(`${tempId}.value`, false), compilerDom.createSimpleExpression(existingText ? existingText.content : ``, true), false) - ])); - } + let dynamicClassBinding = void 0; + let staticClassBinding = void 0; + let dynamicStyleBinding = void 0; + for (let i = 0; i < node.props.length; i++) { + const prop = node.props[i]; + if (node.tag === "input" && isTrueFalseValue(prop)) { + continue; + } + if (prop.type === 7) { + if (prop.name === "html" && prop.exp) { + rawChildrenMap.set(node, prop.exp); + } else if (prop.name === "text" && prop.exp) { + node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; + } else if (prop.name === "slot") { + context.onError( + compilerDom.createCompilerError(40, prop.loc) + ); + } else if (isTextareaWithValue(node, prop) && prop.exp) { + if (!needMergeProps) { + node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; + } + } else if (!needMergeProps && prop.name !== "on") { + const directiveTransform = context.directiveTransforms[prop.name]; + if (directiveTransform) { + const { props, ssrTagParts } = directiveTransform( + prop, + node, + context + ); + if (ssrTagParts) { + openTag.push(...ssrTagParts); + } + for (let j = 0; j < props.length; j++) { + const { key, value } = props[j]; + if (compilerDom.isStaticExp(key)) { + let attrName = key.content; + if (attrName === "key" || attrName === "ref") { + continue; } - else if (node.tag === 'input') { - // <input v-bind="obj" v-model> - // we need to determine the props to render for the dynamic v-model - // and merge it with the v-bind expression. - const vModel = findVModel(node); - if (vModel) { - // 1. save the props (san v-model) in a temp variable - const tempId = `_temp${context.temps++}`; - const tempExp = compilerDom.createSimpleExpression(tempId, false); - propsExp.arguments = [ - compilerDom.createSequenceExpression([ - compilerDom.createAssignmentExpression(tempExp, mergedProps), - compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), [ - tempExp, - compilerDom.createCallExpression(context.helper(SSR_GET_DYNAMIC_MODEL_PROPS), [ - tempExp, - vModel.exp // model - ]) - ]) - ]) - ]; - } + if (attrName === "class") { + openTag.push( + ` class="`, + dynamicClassBinding = compilerDom.createCallExpression( + context.helper(SSR_RENDER_CLASS), + [value] + ), + `"` + ); + } else if (attrName === "style") { + if (dynamicStyleBinding) { + mergeCall(dynamicStyleBinding, value); + } else { + openTag.push( + ` style="`, + dynamicStyleBinding = compilerDom.createCallExpression( + context.helper(SSR_RENDER_STYLE), + [value] + ), + `"` + ); + } + } else { + attrName = node.tag.indexOf("-") > 0 ? attrName : shared.propsToAttrMap[attrName] || attrName.toLowerCase(); + if (shared.isBooleanAttr(attrName)) { + openTag.push( + compilerDom.createConditionalExpression( + compilerDom.createCallExpression( + context.helper(SSR_INCLUDE_BOOLEAN_ATTR), + [value] + ), + compilerDom.createSimpleExpression(" " + attrName, true), + compilerDom.createSimpleExpression("", true), + false + ) + ); + } else if (shared.isSSRSafeAttrName(attrName)) { + openTag.push( + compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTR), [ + key, + value + ]) + ); + } else { + context.onError( + createSSRCompilerError( + 65, + key.loc + ) + ); + } } + } else { + const args = [key, value]; if (needTagForRuntime) { - propsExp.arguments.push(`"${node.tag}"`); + args.push(`"${node.tag}"`); } - openTag.push(propsExp); + openTag.push( + compilerDom.createCallExpression( + context.helper(SSR_RENDER_DYNAMIC_ATTR), + args + ) + ); + } } + } } - // book keeping static/dynamic class merging. - let dynamicClassBinding = undefined; - let staticClassBinding = undefined; - // all style bindings are converted to dynamic by transformStyle. - // but we need to make sure to merge them. - let dynamicStyleBinding = undefined; - for (let i = 0; i < node.props.length; i++) { - const prop = node.props[i]; - // ignore true-value/false-value on input - if (node.tag === 'input' && isTrueFalseValue(prop)) { - continue; - } - // special cases with children override - if (prop.type === 7 /* DIRECTIVE */) { - if (prop.name === 'html' && prop.exp) { - rawChildrenMap.set(node, prop.exp); - } - else if (prop.name === 'text' && prop.exp) { - node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; - } - else if (prop.name === 'slot') { - context.onError(compilerDom.createCompilerError(40 /* X_V_SLOT_MISPLACED */, prop.loc)); - } - else if (isTextareaWithValue(node, prop) && prop.exp) { - if (!needMergeProps) { - node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)]; - } - } - else if (!needMergeProps && prop.name !== 'on') { - // Directive transforms. - const directiveTransform = context.directiveTransforms[prop.name]; - if (directiveTransform) { - const { props, ssrTagParts } = directiveTransform(prop, node, context); - if (ssrTagParts) { - openTag.push(...ssrTagParts); - } - for (let j = 0; j < props.length; j++) { - const { key, value } = props[j]; - if (compilerDom.isStaticExp(key)) { - let attrName = key.content; - // static key attr - if (attrName === 'key' || attrName === 'ref') { - continue; - } - if (attrName === 'class') { - openTag.push(` class="`, (dynamicClassBinding = compilerDom.createCallExpression(context.helper(SSR_RENDER_CLASS), [value])), `"`); - } - else if (attrName === 'style') { - if (dynamicStyleBinding) { - // already has style binding, merge into it. - mergeCall(dynamicStyleBinding, value); - } - else { - openTag.push(` style="`, (dynamicStyleBinding = compilerDom.createCallExpression(context.helper(SSR_RENDER_STYLE), [value])), `"`); - } - } - else { - attrName = - node.tag.indexOf('-') > 0 - ? attrName // preserve raw name on custom elements - : shared.propsToAttrMap[attrName] || attrName.toLowerCase(); - if (shared.isBooleanAttr(attrName)) { - openTag.push(compilerDom.createConditionalExpression(compilerDom.createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [value]), compilerDom.createSimpleExpression(' ' + attrName, true), compilerDom.createSimpleExpression('', true), false /* no newline */)); - } - else if (shared.isSSRSafeAttrName(attrName)) { - openTag.push(compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTR), [ - key, - value - ])); - } - else { - context.onError(createSSRCompilerError(61 /* X_SSR_UNSAFE_ATTR_NAME */, key.loc)); - } - } - } - else { - // dynamic key attr - // this branch is only encountered for custom directive - // transforms that returns properties with dynamic keys - const args = [key, value]; - if (needTagForRuntime) { - args.push(`"${node.tag}"`); - } - openTag.push(compilerDom.createCallExpression(context.helper(SSR_RENDER_DYNAMIC_ATTR), args)); - } - } - } - } - } - else { - // special case: value on <textarea> - if (node.tag === 'textarea' && prop.name === 'value' && prop.value) { - rawChildrenMap.set(node, shared.escapeHtml(prop.value.content)); - } - else if (!needMergeProps) { - if (prop.name === 'key' || prop.name === 'ref') { - continue; - } - // static prop - if (prop.name === 'class' && prop.value) { - staticClassBinding = JSON.stringify(prop.value.content); - } - openTag.push(` ${prop.name}` + - (prop.value ? `="${shared.escapeHtml(prop.value.content)}"` : ``)); - } - } + } else { + const name = prop.name; + if (node.tag === "textarea" && name === "value" && prop.value) { + rawChildrenMap.set(node, shared.escapeHtml(prop.value.content)); + } else if (!needMergeProps) { + if (name === "key" || name === "ref") { + continue; + } + if (name === "class" && prop.value) { + staticClassBinding = JSON.stringify(prop.value.content); + } + openTag.push( + ` ${prop.name}` + (prop.value ? `="${shared.escapeHtml(prop.value.content)}"` : ``) + ); } - // handle co-existence of dynamic + static class bindings - if (dynamicClassBinding && staticClassBinding) { - mergeCall(dynamicClassBinding, staticClassBinding); - removeStaticBinding(openTag, 'class'); - } - if (context.scopeId) { - openTag.push(` ${context.scopeId}`); - } - node.ssrCodegenNode = compilerDom.createTemplateLiteral(openTag); - }; + } + } + if (dynamicClassBinding && staticClassBinding) { + mergeCall(dynamicClassBinding, staticClassBinding); + removeStaticBinding(openTag, "class"); + } + if (context.scopeId) { + openTag.push(` ${context.scopeId}`); + } + node.ssrCodegenNode = compilerDom.createTemplateLiteral(openTag); + }; }; function buildSSRProps(props, directives, context) { - let mergePropsArgs = []; - if (props) { - if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // already a mergeProps call - mergePropsArgs = props.arguments; - } - else { - mergePropsArgs.push(props); - } + let mergePropsArgs = []; + if (props) { + if (props.type === 14) { + mergePropsArgs = props.arguments; + } else { + mergePropsArgs.push(props); } - if (directives.length) { - for (const dir of directives) { - mergePropsArgs.push(compilerDom.createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [ - `_ctx`, - ...compilerDom.buildDirectiveArgs(dir, context).elements - ])); - } + } + if (directives.length) { + for (const dir of directives) { + mergePropsArgs.push( + compilerDom.createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [ + `_ctx`, + ...compilerDom.buildDirectiveArgs(dir, context).elements + ]) + ); } - return mergePropsArgs.length > 1 - ? compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), mergePropsArgs) - : mergePropsArgs[0]; + } + return mergePropsArgs.length > 1 ? compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), mergePropsArgs) : mergePropsArgs[0]; } function isTrueFalseValue(prop) { - if (prop.type === 7 /* DIRECTIVE */) { - return (prop.name === 'bind' && - prop.arg && - compilerDom.isStaticExp(prop.arg) && - (prop.arg.content === 'true-value' || prop.arg.content === 'false-value')); - } - else { - return prop.name === 'true-value' || prop.name === 'false-value'; - } + if (prop.type === 7) { + return prop.name === "bind" && prop.arg && compilerDom.isStaticExp(prop.arg) && (prop.arg.content === "true-value" || prop.arg.content === "false-value"); + } else { + return prop.name === "true-value" || prop.name === "false-value"; + } } function isTextareaWithValue(node, prop) { - return !!(node.tag === 'textarea' && - prop.name === 'bind' && - compilerDom.isStaticArgOf(prop.arg, 'value')); + return !!(node.tag === "textarea" && prop.name === "bind" && compilerDom.isStaticArgOf(prop.arg, "value")); } function mergeCall(call, arg) { - const existing = call.arguments[0]; - if (existing.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.elements.push(arg); - } - else { - call.arguments[0] = compilerDom.createArrayExpression([existing, arg]); - } + const existing = call.arguments[0]; + if (existing.type === 17) { + existing.elements.push(arg); + } else { + call.arguments[0] = compilerDom.createArrayExpression([existing, arg]); + } } function removeStaticBinding(tag, binding) { - const regExp = new RegExp(`^ ${binding}=".+"$`); - const i = tag.findIndex(e => typeof e === 'string' && regExp.test(e)); - if (i > -1) { - tag.splice(i, 1); - } + const regExp = new RegExp(`^ ${binding}=".+"$`); + const i = tag.findIndex((e) => typeof e === "string" && regExp.test(e)); + if (i > -1) { + tag.splice(i, 1); + } } function findVModel(node) { - return node.props.find(p => p.type === 7 /* DIRECTIVE */ && p.name === 'model' && p.exp); + return node.props.find( + (p) => p.type === 7 && p.name === "model" && p.exp + ); } function ssrProcessElement(node, context) { - const isVoidTag = context.options.isVoidTag || shared.NO; - const elementsToAdd = node.ssrCodegenNode.elements; - for (let j = 0; j < elementsToAdd.length; j++) { - context.pushStringPart(elementsToAdd[j]); - } - // Handle slot scopeId - if (context.withSlotScopeId) { - context.pushStringPart(compilerDom.createSimpleExpression(`_scopeId`, false)); - } - // close open tag - context.pushStringPart(`>`); - const rawChildren = rawChildrenMap.get(node); - if (rawChildren) { - context.pushStringPart(rawChildren); - } - else if (node.children.length) { - processChildren(node, context); - } - if (!isVoidTag(node.tag)) { - // push closing tag - context.pushStringPart(`</${node.tag}>`); - } + const isVoidTag = context.options.isVoidTag || shared.NO; + const elementsToAdd = node.ssrCodegenNode.elements; + for (let j = 0; j < elementsToAdd.length; j++) { + context.pushStringPart(elementsToAdd[j]); + } + if (context.withSlotScopeId) { + context.pushStringPart(compilerDom.createSimpleExpression(`_scopeId`, false)); + } + context.pushStringPart(`>`); + const rawChildren = rawChildrenMap.get(node); + if (rawChildren) { + context.pushStringPart(rawChildren); + } else if (node.children.length) { + processChildren(node, context); + } + if (!isVoidTag(node.tag)) { + context.pushStringPart(`</${node.tag}>`); + } } -const wipMap$1 = new WeakMap(); -// phase 1: build props +const wipMap$2 = /* @__PURE__ */ new WeakMap(); function ssrTransformTransitionGroup(node, context) { - return () => { - const tag = compilerDom.findProp(node, 'tag'); - if (tag) { - const otherProps = node.props.filter(p => p !== tag); - const { props, directives } = compilerDom.buildProps(node, context, otherProps, true, /* isComponent */ false, /* isDynamicComponent */ true /* ssr (skip event listeners) */); - let propsExp = null; - if (props || directives.length) { - propsExp = compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTRS), [ - buildSSRProps(props, directives, context) - ]); - } - wipMap$1.set(node, { - tag, - propsExp - }); - } - }; + return () => { + const tag = compilerDom.findProp(node, "tag"); + if (tag) { + const otherProps = node.props.filter((p) => p !== tag); + const { props, directives } = compilerDom.buildProps( + node, + context, + otherProps, + true, + false, + true + ); + let propsExp = null; + if (props || directives.length) { + propsExp = compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTRS), [ + buildSSRProps(props, directives, context) + ]); + } + wipMap$2.set(node, { + tag, + propsExp, + scopeId: context.scopeId || null + }); + } + }; } -// phase 2: process children function ssrProcessTransitionGroup(node, context) { - const entry = wipMap$1.get(node); - if (entry) { - const { tag, propsExp } = entry; - if (tag.type === 7 /* DIRECTIVE */) { - // dynamic :tag - context.pushStringPart(`<`); - context.pushStringPart(tag.exp); - if (propsExp) { - context.pushStringPart(propsExp); - } - context.pushStringPart(`>`); - processChildren(node, context, false, - /** - * TransitionGroup has the special runtime behavior of flattening and - * concatenating all children into a single fragment (in order for them to - * be patched using the same key map) so we need to account for that here - * by disabling nested fragment wrappers from being generated. - */ - true); - context.pushStringPart(`</`); - context.pushStringPart(tag.exp); - context.pushStringPart(`>`); - } - else { - // static tag - context.pushStringPart(`<${tag.value.content}`); - if (propsExp) { - context.pushStringPart(propsExp); - } - context.pushStringPart(`>`); - processChildren(node, context, false, true); - context.pushStringPart(`</${tag.value.content}>`); - } - } - else { - // fragment - processChildren(node, context, true, true); + const entry = wipMap$2.get(node); + if (entry) { + const { tag, propsExp, scopeId } = entry; + if (tag.type === 7) { + context.pushStringPart(`<`); + context.pushStringPart(tag.exp); + if (propsExp) { + context.pushStringPart(propsExp); + } + if (scopeId) { + context.pushStringPart(` ${scopeId}`); + } + context.pushStringPart(`>`); + processChildren( + node, + context, + false, + /** + * TransitionGroup has the special runtime behavior of flattening and + * concatenating all children into a single fragment (in order for them to + * be patched using the same key map) so we need to account for that here + * by disabling nested fragment wrappers from being generated. + */ + true + ); + context.pushStringPart(`</`); + context.pushStringPart(tag.exp); + context.pushStringPart(`>`); + } else { + context.pushStringPart(`<${tag.value.content}`); + if (propsExp) { + context.pushStringPart(propsExp); + } + if (scopeId) { + context.pushStringPart(` ${scopeId}`); + } + context.pushStringPart(`>`); + processChildren(node, context, false, true); + context.pushStringPart(`</${tag.value.content}>`); } + } else { + processChildren(node, context, true, true); + } } -// We need to construct the slot functions in the 1st pass to ensure proper -// scope tracking, but the children of each slot cannot be processed until -// the 2nd pass, so we store the WIP slot functions in a weakMap during the 1st -// pass and complete them in the 2nd pass. -const wipMap$2 = new WeakMap(); +const wipMap$1 = /* @__PURE__ */ new WeakMap(); +function ssrTransformTransition(node, context) { + return () => { + const appear = compilerDom.findProp(node, "appear", false, true); + wipMap$1.set(node, !!appear); + }; +} +function ssrProcessTransition(node, context) { + node.children = node.children.filter((c) => c.type !== 3); + const appear = wipMap$1.get(node); + if (appear) { + context.pushStringPart(`<template>`); + processChildren(node, context, false, true); + context.pushStringPart(`</template>`); + } else { + processChildren(node, context, false, true); + } +} + +const wipMap = /* @__PURE__ */ new WeakMap(); const WIP_SLOT = Symbol(); -const componentTypeMap = new WeakMap(); -// ssr component transform is done in two phases: -// In phase 1. we use `buildSlot` to analyze the children of the component into -// WIP slot functions (it must be done in phase 1 because `buildSlot` relies on -// the core transform context). -// In phase 2. we convert the WIP slots from phase 1 into ssr-specific codegen -// nodes. +const componentTypeMap = /* @__PURE__ */ new WeakMap(); const ssrTransformComponent = (node, context) => { - if (node.type !== 1 /* ELEMENT */ || - node.tagType !== 1 /* COMPONENT */) { - return; + if (node.type !== 1 || node.tagType !== 1) { + return; + } + const component = compilerDom.resolveComponentType( + node, + context, + true + /* ssr */ + ); + const isDynamicComponent = shared.isObject(component) && component.callee === compilerDom.RESOLVE_DYNAMIC_COMPONENT; + componentTypeMap.set(node, component); + if (shared.isSymbol(component)) { + if (component === compilerDom.SUSPENSE) { + return ssrTransformSuspense(node, context); + } else if (component === compilerDom.TRANSITION_GROUP) { + return ssrTransformTransitionGroup(node, context); + } else if (component === compilerDom.TRANSITION) { + return ssrTransformTransition(node); } - const component = compilerDom.resolveComponentType(node, context, true /* ssr */); - const isDynamicComponent = shared.isObject(component) && component.callee === compilerDom.RESOLVE_DYNAMIC_COMPONENT; - componentTypeMap.set(node, component); - if (shared.isSymbol(component)) { - if (component === compilerDom.SUSPENSE) { - return ssrTransformSuspense(node, context); - } - if (component === compilerDom.TRANSITION_GROUP) { - return ssrTransformTransitionGroup(node, context); - } - return; // other built-in components: fallthrough + return; + } + const vnodeBranches = []; + const clonedNode = clone(node); + return function ssrPostTransformComponent() { + if (clonedNode.children.length) { + compilerDom.buildSlots(clonedNode, context, (props, vFor, children) => { + vnodeBranches.push( + createVNodeSlotBranch(props, vFor, children, context) + ); + return compilerDom.createFunctionExpression(void 0); + }); } - // Build the fallback vnode-based branch for the component's slots. - // We need to clone the node into a fresh copy and use the buildSlots' logic - // to get access to the children of each slot. We then compile them with - // a child transform pipeline using vnode-based transforms (instead of ssr- - // based ones), and save the result branch (a ReturnStatement) in an array. - // The branch is retrieved when processing slots again in ssr mode. - const vnodeBranches = []; - const clonedNode = clone(node); - return function ssrPostTransformComponent() { - // Using the cloned node, build the normal VNode-based branches (for - // fallback in case the child is render-fn based). Store them in an array - // for later use. - if (clonedNode.children.length) { - compilerDom.buildSlots(clonedNode, context, (props, children) => { - vnodeBranches.push(createVNodeSlotBranch(props, children, context)); - return compilerDom.createFunctionExpression(undefined); - }); - } - let propsExp = `null`; - if (node.props.length) { - // note we are not passing ssr: true here because for components, v-on - // handlers should still be passed - const { props, directives } = compilerDom.buildProps(node, context, undefined, true, isDynamicComponent); - if (props || directives.length) { - propsExp = buildSSRProps(props, directives, context); - } - } - const wipEntries = []; - wipMap$2.set(node, wipEntries); - const buildSSRSlotFn = (props, children, loc) => { - const fn = compilerDom.createFunctionExpression([props || `_`, `_push`, `_parent`, `_scopeId`], undefined, // no return, assign body later - true, // newline - true, // isSlot - loc); - wipEntries.push({ - type: WIP_SLOT, - fn, - children, - // also collect the corresponding vnode branch built earlier - vnodeBranch: vnodeBranches[wipEntries.length] - }); - return fn; - }; - const slots = node.children.length - ? compilerDom.buildSlots(node, context, buildSSRSlotFn).slots - : `null`; - if (typeof component !== 'string') { - // dynamic component that resolved to a `resolveDynamicComponent` call - // expression - since the resolved result may be a plain element (string) - // or a VNode, handle it with `renderVNode`. - node.ssrCodegenNode = compilerDom.createCallExpression(context.helper(SSR_RENDER_VNODE), [ - `_push`, - compilerDom.createCallExpression(context.helper(compilerDom.CREATE_VNODE), [ - component, - propsExp, - slots - ]), - `_parent` - ]); - } - else { - node.ssrCodegenNode = compilerDom.createCallExpression(context.helper(SSR_RENDER_COMPONENT), [component, propsExp, slots, `_parent`]); - } + let propsExp = `null`; + if (node.props.length) { + const { props, directives } = compilerDom.buildProps( + node, + context, + void 0, + true, + isDynamicComponent + ); + if (props || directives.length) { + propsExp = buildSSRProps(props, directives, context); + } + } + const wipEntries = []; + wipMap.set(node, wipEntries); + const buildSSRSlotFn = (props, _vForExp, children, loc) => { + const param0 = props && compilerDom.stringifyExpression(props) || `_`; + const fn = compilerDom.createFunctionExpression( + [param0, `_push`, `_parent`, `_scopeId`], + void 0, + // no return, assign body later + true, + // newline + true, + // isSlot + loc + ); + wipEntries.push({ + type: WIP_SLOT, + fn, + children, + // also collect the corresponding vnode branch built earlier + vnodeBranch: vnodeBranches[wipEntries.length] + }); + return fn; }; + const slots = node.children.length ? compilerDom.buildSlots(node, context, buildSSRSlotFn).slots : `null`; + if (typeof component !== "string") { + node.ssrCodegenNode = compilerDom.createCallExpression( + context.helper(SSR_RENDER_VNODE), + [ + `_push`, + compilerDom.createCallExpression(context.helper(compilerDom.CREATE_VNODE), [ + component, + propsExp, + slots + ]), + `_parent` + ] + ); + } else { + node.ssrCodegenNode = compilerDom.createCallExpression( + context.helper(SSR_RENDER_COMPONENT), + [component, propsExp, slots, `_parent`] + ); + } + }; }; function ssrProcessComponent(node, context, parent) { - const component = componentTypeMap.get(node); - if (!node.ssrCodegenNode) { - // this is a built-in component that fell-through. - if (component === compilerDom.TELEPORT) { - return ssrProcessTeleport(node, context); - } - else if (component === compilerDom.SUSPENSE) { - return ssrProcessSuspense(node, context); - } - else if (component === compilerDom.TRANSITION_GROUP) { - return ssrProcessTransitionGroup(node, context); - } - else { - // real fall-through: Transition / KeepAlive - // just render its children. - // #5352: if is at root level of a slot, push an empty string. - // this does not affect the final output, but avoids all-comment slot - // content of being treated as empty by ssrRenderSlot(). - if (parent.type === WIP_SLOT) { - context.pushStringPart(``); - } - // #5351: filter out comment children inside transition - if (component === compilerDom.TRANSITION) { - node.children = node.children.filter(c => c.type !== 3 /* COMMENT */); - } - processChildren(node, context); - } + const component = componentTypeMap.get(node); + if (!node.ssrCodegenNode) { + if (component === compilerDom.TELEPORT) { + return ssrProcessTeleport(node, context); + } else if (component === compilerDom.SUSPENSE) { + return ssrProcessSuspense(node, context); + } else if (component === compilerDom.TRANSITION_GROUP) { + return ssrProcessTransitionGroup(node, context); + } else { + if (parent.type === WIP_SLOT) { + context.pushStringPart(``); + } + if (component === compilerDom.TRANSITION) { + return ssrProcessTransition(node, context); + } + processChildren(node, context); } - else { - // finish up slot function expressions from the 1st pass. - const wipEntries = wipMap$2.get(node) || []; - for (let i = 0; i < wipEntries.length; i++) { - const { fn, vnodeBranch } = wipEntries[i]; - // For each slot, we generate two branches: one SSR-optimized branch and - // one normal vnode-based branch. The branches are taken based on the - // presence of the 2nd `_push` argument (which is only present if the slot - // is called by `_ssrRenderSlot`. - fn.body = compilerDom.createIfStatement(compilerDom.createSimpleExpression(`_push`, false), processChildrenAsStatement(wipEntries[i], context, false, true /* withSlotScopeId */), vnodeBranch); - } - // component is inside a slot, inherit slot scope Id - if (context.withSlotScopeId) { - node.ssrCodegenNode.arguments.push(`_scopeId`); - } - if (typeof component === 'string') { - // static component - context.pushStatement(compilerDom.createCallExpression(`_push`, [node.ssrCodegenNode])); - } - else { - // dynamic component (`resolveDynamicComponent` call) - // the codegen node is a `renderVNode` call - context.pushStatement(node.ssrCodegenNode); - } + } else { + const wipEntries = wipMap.get(node) || []; + for (let i = 0; i < wipEntries.length; i++) { + const { fn, vnodeBranch } = wipEntries[i]; + fn.body = compilerDom.createIfStatement( + compilerDom.createSimpleExpression(`_push`, false), + processChildrenAsStatement( + wipEntries[i], + context, + false, + true + ), + vnodeBranch + ); } + if (context.withSlotScopeId) { + node.ssrCodegenNode.arguments.push(`_scopeId`); + } + if (typeof component === "string") { + context.pushStatement( + compilerDom.createCallExpression(`_push`, [node.ssrCodegenNode]) + ); + } else { + context.pushStatement(node.ssrCodegenNode); + } + } } -const rawOptionsMap = new WeakMap(); +const rawOptionsMap = /* @__PURE__ */ new WeakMap(); const [baseNodeTransforms, baseDirectiveTransforms] = compilerDom.getBaseTransformPreset(true); const vnodeNodeTransforms = [...baseNodeTransforms, ...compilerDom.DOMNodeTransforms]; const vnodeDirectiveTransforms = { - ...baseDirectiveTransforms, - ...compilerDom.DOMDirectiveTransforms + ...baseDirectiveTransforms, + ...compilerDom.DOMDirectiveTransforms }; -function createVNodeSlotBranch(props, children, parentContext) { - // apply a sub-transform using vnode-based transforms. - const rawOptions = rawOptionsMap.get(parentContext.root); - const subOptions = { - ...rawOptions, - // overwrite with vnode-based transforms - nodeTransforms: [ - ...vnodeNodeTransforms, - ...(rawOptions.nodeTransforms || []) - ], - directiveTransforms: { - ...vnodeDirectiveTransforms, - ...(rawOptions.directiveTransforms || {}) - } - }; - // wrap the children with a wrapper template for proper children treatment. - const wrapperNode = { - type: 1 /* ELEMENT */, - ns: 0 /* HTML */, - tag: 'template', - tagType: 3 /* TEMPLATE */, - isSelfClosing: false, - // important: provide v-slot="props" on the wrapper for proper - // scope analysis - props: [ - { - type: 7 /* DIRECTIVE */, - name: 'slot', - exp: props, - arg: undefined, - modifiers: [], - loc: compilerDom.locStub - } - ], - children, - loc: compilerDom.locStub, - codegenNode: undefined - }; - subTransform(wrapperNode, subOptions, parentContext); - return compilerDom.createReturnStatement(children); +function createVNodeSlotBranch(slotProps, vFor, children, parentContext) { + const rawOptions = rawOptionsMap.get(parentContext.root); + const subOptions = { + ...rawOptions, + // overwrite with vnode-based transforms + nodeTransforms: [ + ...vnodeNodeTransforms, + ...rawOptions.nodeTransforms || [] + ], + directiveTransforms: { + ...vnodeDirectiveTransforms, + ...rawOptions.directiveTransforms || {} + } + }; + const wrapperProps = []; + if (slotProps) { + wrapperProps.push({ + type: 7, + name: "slot", + exp: slotProps, + arg: void 0, + modifiers: [], + loc: compilerDom.locStub + }); + } + if (vFor) { + wrapperProps.push(shared.extend({}, vFor)); + } + const wrapperNode = { + type: 1, + ns: 0, + tag: "template", + tagType: 3, + props: wrapperProps, + children, + loc: compilerDom.locStub, + codegenNode: void 0 + }; + subTransform(wrapperNode, subOptions, parentContext); + return compilerDom.createReturnStatement(children); } function subTransform(node, options, parentContext) { - const childRoot = compilerDom.createRoot([node]); - const childContext = compilerDom.createTransformContext(childRoot, options); - // this sub transform is for vnode fallback branch so it should be handled - // like normal render functions - childContext.ssr = false; - // inherit parent scope analysis state - childContext.scopes = { ...parentContext.scopes }; - childContext.identifiers = { ...parentContext.identifiers }; - childContext.imports = parentContext.imports; - // traverse - compilerDom.traverseNode(childRoot, childContext); - ['helpers', 'components', 'directives'].forEach(key => { - childContext[key].forEach((value, helperKey) => { - if (key === 'helpers') { - const parentCount = parentContext.helpers.get(helperKey); - if (parentCount === undefined) { - parentContext.helpers.set(helperKey, value); - } - else { - parentContext.helpers.set(helperKey, value + parentCount); - } - } - else { - parentContext[key].add(value); - } - }); + const childRoot = compilerDom.createRoot([node]); + const childContext = compilerDom.createTransformContext(childRoot, options); + childContext.ssr = false; + childContext.scopes = { ...parentContext.scopes }; + childContext.identifiers = { ...parentContext.identifiers }; + childContext.imports = parentContext.imports; + compilerDom.traverseNode(childRoot, childContext); + ["helpers", "components", "directives"].forEach((key) => { + childContext[key].forEach((value, helperKey) => { + if (key === "helpers") { + const parentCount = parentContext.helpers.get(helperKey); + if (parentCount === void 0) { + parentContext.helpers.set(helperKey, value); + } else { + parentContext.helpers.set(helperKey, value + parentCount); + } + } else { + parentContext[key].add(value); + } }); - // imports/hoists are not merged because: - // - imports are only used for asset urls and should be consistent between - // node/client branches - // - hoists are not enabled for the client branch here + }); } function clone(v) { - if (shared.isArray(v)) { - return v.map(clone); - } - else if (shared.isObject(v)) { - const res = {}; - for (const key in v) { - res[key] = clone(v[key]); - } - return res; - } - else { - return v; + if (shared.isArray(v)) { + return v.map(clone); + } else if (shared.isPlainObject(v)) { + const res = {}; + for (const key in v) { + res[key] = clone(v[key]); } + return res; + } else { + return v; + } } -// Because SSR codegen output is completely different from client-side output -// (e.g. multiple elements can be concatenated into a single template literal -// instead of each getting a corresponding call), we need to apply an extra -// transform pass to convert the template AST into a fresh JS AST before -// passing it to codegen. function ssrCodegenTransform(ast, options) { - const context = createSSRTransformContext(ast, options); - // inject SFC <style> CSS variables - // we do this instead of inlining the expression to ensure the vars are - // only resolved once per render - if (options.ssrCssVars) { - const varsExp = compilerDom.processExpression(compilerDom.createSimpleExpression(options.ssrCssVars, false), compilerDom.createTransformContext(compilerDom.createRoot([]), options)); - context.body.push(compilerDom.createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`])); - } - const isFragment = ast.children.length > 1 && ast.children.some(c => !compilerDom.isText(c)); - processChildren(ast, context, isFragment); - ast.codegenNode = compilerDom.createBlockStatement(context.body); - // Finalize helpers. - // We need to separate helpers imported from 'vue' vs. '@vue/server-renderer' - ast.ssrHelpers = Array.from(new Set([...ast.helpers.filter(h => h in ssrHelpers), ...context.helpers])); - ast.helpers = ast.helpers.filter(h => !(h in ssrHelpers)); + const context = createSSRTransformContext(ast, options); + if (options.ssrCssVars) { + const cssContext = compilerDom.createTransformContext(compilerDom.createRoot([]), options); + const varsExp = compilerDom.processExpression( + compilerDom.createSimpleExpression(options.ssrCssVars, false), + cssContext + ); + context.body.push( + compilerDom.createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`]) + ); + Array.from(cssContext.helpers.keys()).forEach((helper) => { + ast.helpers.add(helper); + }); + } + const isFragment = ast.children.length > 1 && ast.children.some((c) => !compilerDom.isText(c)); + processChildren(ast, context, isFragment); + ast.codegenNode = compilerDom.createBlockStatement(context.body); + ast.ssrHelpers = Array.from( + /* @__PURE__ */ new Set([ + ...Array.from(ast.helpers).filter((h) => h in ssrHelpers), + ...context.helpers + ]) + ); + ast.helpers = new Set(Array.from(ast.helpers).filter((h) => !(h in ssrHelpers))); } -function createSSRTransformContext(root, options, helpers = new Set(), withSlotScopeId = false) { - const body = []; - let currentString = null; - return { - root, - options, - body, - helpers, - withSlotScopeId, - onError: options.onError || - (e => { - throw e; - }), - helper(name) { - helpers.add(name); - return name; - }, - pushStringPart(part) { - if (!currentString) { - const currentCall = compilerDom.createCallExpression(`_push`); - body.push(currentCall); - currentString = compilerDom.createTemplateLiteral([]); - currentCall.arguments.push(currentString); - } - const bufferedElements = currentString.elements; - const lastItem = bufferedElements[bufferedElements.length - 1]; - if (shared.isString(part) && shared.isString(lastItem)) { - bufferedElements[bufferedElements.length - 1] += part; - } - else { - bufferedElements.push(part); - } - }, - pushStatement(statement) { - // close current string - currentString = null; - body.push(statement); - } - }; +function createSSRTransformContext(root, options, helpers = /* @__PURE__ */ new Set(), withSlotScopeId = false) { + const body = []; + let currentString = null; + return { + root, + options, + body, + helpers, + withSlotScopeId, + onError: options.onError || ((e) => { + throw e; + }), + helper(name) { + helpers.add(name); + return name; + }, + pushStringPart(part) { + if (!currentString) { + const currentCall = compilerDom.createCallExpression(`_push`); + body.push(currentCall); + currentString = compilerDom.createTemplateLiteral([]); + currentCall.arguments.push(currentString); + } + const bufferedElements = currentString.elements; + const lastItem = bufferedElements[bufferedElements.length - 1]; + if (shared.isString(part) && shared.isString(lastItem)) { + bufferedElements[bufferedElements.length - 1] += part; + } else { + bufferedElements.push(part); + } + }, + pushStatement(statement) { + currentString = null; + body.push(statement); + } + }; } function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) { - // ensure child inherits parent helpers - return createSSRTransformContext(parent.root, parent.options, parent.helpers, withSlotScopeId); + return createSSRTransformContext( + parent.root, + parent.options, + parent.helpers, + withSlotScopeId + ); } function processChildren(parent, context, asFragment = false, disableNestedFragments = false) { - if (asFragment) { - context.pushStringPart(`<!--[-->`); - } - const { children } = parent; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - switch (child.tagType) { - case 0 /* ELEMENT */: - ssrProcessElement(child, context); - break; - case 1 /* COMPONENT */: - ssrProcessComponent(child, context, parent); - break; - case 2 /* SLOT */: - ssrProcessSlotOutlet(child, context); - break; - case 3 /* TEMPLATE */: - // TODO - break; - default: - context.onError(createSSRCompilerError(63 /* X_SSR_INVALID_AST_NODE */, child.loc)); - // make sure we exhaust all possible types - const exhaustiveCheck = child; - return exhaustiveCheck; - } - break; - case 2 /* TEXT */: - context.pushStringPart(shared.escapeHtml(child.content)); - break; - case 3 /* COMMENT */: - // no need to escape comment here because the AST can only - // contain valid comments. - context.pushStringPart(`<!--${child.content}-->`); - break; - case 5 /* INTERPOLATION */: - context.pushStringPart(compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [child.content])); - break; - case 9 /* IF */: - ssrProcessIf(child, context, disableNestedFragments); - break; - case 11 /* FOR */: - ssrProcessFor(child, context, disableNestedFragments); - break; - case 10 /* IF_BRANCH */: - // no-op - handled by ssrProcessIf - break; - case 12 /* TEXT_CALL */: - case 8 /* COMPOUND_EXPRESSION */: - // no-op - these two types can never appear as template child node since - // `transformText` is not used during SSR compile. - break; - default: - context.onError(createSSRCompilerError(63 /* X_SSR_INVALID_AST_NODE */, child.loc)); - // make sure we exhaust all possible types - const exhaustiveCheck = child; - return exhaustiveCheck; + if (asFragment) { + context.pushStringPart(`<!--[-->`); + } + const { children } = parent; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + switch (child.tagType) { + case 0: + ssrProcessElement(child, context); + break; + case 1: + ssrProcessComponent(child, context, parent); + break; + case 2: + ssrProcessSlotOutlet(child, context); + break; + case 3: + break; + default: + context.onError( + createSSRCompilerError( + 67, + child.loc + ) + ); + const exhaustiveCheck2 = child; + return exhaustiveCheck2; } + break; + case 2: + context.pushStringPart(shared.escapeHtml(child.content)); + break; + case 3: + context.pushStringPart(`<!--${child.content}-->`); + break; + case 5: + context.pushStringPart( + compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [ + child.content + ]) + ); + break; + case 9: + ssrProcessIf(child, context, disableNestedFragments); + break; + case 11: + ssrProcessFor(child, context, disableNestedFragments); + break; + case 10: + break; + case 12: + case 8: + break; + default: + context.onError( + createSSRCompilerError( + 67, + child.loc + ) + ); + const exhaustiveCheck = child; + return exhaustiveCheck; } - if (asFragment) { - context.pushStringPart(`<!--]-->`); - } + } + if (asFragment) { + context.pushStringPart(`<!--]-->`); + } } function processChildrenAsStatement(parent, parentContext, asFragment = false, withSlotScopeId = parentContext.withSlotScopeId) { - const childContext = createChildContext(parentContext, withSlotScopeId); - processChildren(parent, childContext, asFragment); - return compilerDom.createBlockStatement(childContext.body); + const childContext = createChildContext(parentContext, withSlotScopeId); + processChildren(parent, childContext, asFragment); + return compilerDom.createBlockStatement(childContext.body); } const ssrTransformModel = (dir, node, context) => { - const model = dir.exp; - function checkDuplicatedValue() { - const value = compilerDom.findProp(node, 'value'); - if (value) { - context.onError(compilerDom.createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } + const model = dir.exp; + function checkDuplicatedValue() { + const value = compilerDom.findProp(node, "value"); + if (value) { + context.onError( + compilerDom.createDOMCompilerError( + 60, + value.loc + ) + ); } - if (node.tagType === 0 /* ELEMENT */) { - const res = { props: [] }; - const defaultProps = [ - // default value binding for text type inputs - compilerDom.createObjectProperty(`value`, model) - ]; - if (node.tag === 'input') { - const type = compilerDom.findProp(node, 'type'); - if (type) { - const value = findValueBinding(node); - if (type.type === 7 /* DIRECTIVE */) { - // dynamic type - res.ssrTagParts = [ - compilerDom.createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [ - type.exp, - model, - value - ]) - ]; - } - else if (type.value) { - // static type - switch (type.value.content) { - case 'radio': - res.props = [ - compilerDom.createObjectProperty(`checked`, compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - value - ])) - ]; - break; - case 'checkbox': - const trueValueBinding = compilerDom.findProp(node, 'true-value'); - if (trueValueBinding) { - const trueValue = trueValueBinding.type === 6 /* ATTRIBUTE */ - ? JSON.stringify(trueValueBinding.value.content) - : trueValueBinding.exp; - res.props = [ - compilerDom.createObjectProperty(`checked`, compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ - model, - trueValue - ])) - ]; - } - else { - res.props = [ - compilerDom.createObjectProperty(`checked`, compilerDom.createConditionalExpression(compilerDom.createCallExpression(`Array.isArray`, [model]), compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ - model, - value - ]), model)) - ]; - } - break; - case 'file': - context.onError(compilerDom.createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - checkDuplicatedValue(); - res.props = defaultProps; - break; - } - } - } - else if (compilerDom.hasDynamicKeyVBind(node)) ; - else { - // text type - checkDuplicatedValue(); - res.props = defaultProps; - } - } - else if (node.tag === 'textarea') { - checkDuplicatedValue(); - node.children = [compilerDom.createInterpolation(model, model.loc)]; - } - else if (node.tag === 'select') ; - else { - context.onError(compilerDom.createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - return res; + } + function processOption(plainNode) { + if (plainNode.tag === "option") { + if (plainNode.props.findIndex((p) => p.name === "selected") === -1) { + const value = findValueBinding(plainNode); + plainNode.ssrCodegenNode.elements.push( + compilerDom.createConditionalExpression( + compilerDom.createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [ + compilerDom.createConditionalExpression( + compilerDom.createCallExpression(`Array.isArray`, [model]), + compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ + model, + value + ]), + compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + value + ]) + ) + ]), + compilerDom.createSimpleExpression(" selected", true), + compilerDom.createSimpleExpression("", true), + false + ) + ); + } + } else if (plainNode.tag === "optgroup") { + plainNode.children.forEach( + (option) => processOption(option) + ); } - else { - // component v-model - return compilerDom.transformModel(dir, node, context); + } + if (node.tagType === 0) { + const res = { props: [] }; + const defaultProps = [ + // default value binding for text type inputs + compilerDom.createObjectProperty(`value`, model) + ]; + if (node.tag === "input") { + const type = compilerDom.findProp(node, "type"); + if (type) { + const value = findValueBinding(node); + if (type.type === 7) { + res.ssrTagParts = [ + compilerDom.createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [ + type.exp, + model, + value + ]) + ]; + } else if (type.value) { + switch (type.value.content) { + case "radio": + res.props = [ + compilerDom.createObjectProperty( + `checked`, + compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + value + ]) + ) + ]; + break; + case "checkbox": + const trueValueBinding = compilerDom.findProp(node, "true-value"); + if (trueValueBinding) { + const trueValue = trueValueBinding.type === 6 ? JSON.stringify(trueValueBinding.value.content) : trueValueBinding.exp; + res.props = [ + compilerDom.createObjectProperty( + `checked`, + compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [ + model, + trueValue + ]) + ) + ]; + } else { + res.props = [ + compilerDom.createObjectProperty( + `checked`, + compilerDom.createConditionalExpression( + compilerDom.createCallExpression(`Array.isArray`, [model]), + compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [ + model, + value + ]), + model + ) + ) + ]; + } + break; + case "file": + context.onError( + compilerDom.createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + res.props = defaultProps; + break; + } + } + } else if (compilerDom.hasDynamicKeyVBind(node)) ; else { + checkDuplicatedValue(); + res.props = defaultProps; + } + } else if (node.tag === "textarea") { + checkDuplicatedValue(); + node.children = [compilerDom.createInterpolation(model, model.loc)]; + } else if (node.tag === "select") { + node.children.forEach((child) => { + if (child.type === 1) { + processOption(child); + } + }); + } else { + context.onError( + compilerDom.createDOMCompilerError( + 57, + dir.loc + ) + ); } + return res; + } else { + return compilerDom.transformModel(dir, node, context); + } }; function findValueBinding(node) { - const valueBinding = compilerDom.findProp(node, 'value'); - return valueBinding - ? valueBinding.type === 7 /* DIRECTIVE */ - ? valueBinding.exp - : compilerDom.createSimpleExpression(valueBinding.value.content, true) - : compilerDom.createSimpleExpression(`null`, false); + const valueBinding = compilerDom.findProp(node, "value"); + return valueBinding ? valueBinding.type === 7 ? valueBinding.exp : compilerDom.createSimpleExpression(valueBinding.value.content, true) : compilerDom.createSimpleExpression(`null`, false); } const ssrTransformShow = (dir, node, context) => { - if (!dir.exp) { - context.onError(compilerDom.createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */)); - } - return { - props: [ - compilerDom.createObjectProperty(`style`, compilerDom.createConditionalExpression(dir.exp, compilerDom.createSimpleExpression(`null`, false), compilerDom.createObjectExpression([ - compilerDom.createObjectProperty(`display`, compilerDom.createSimpleExpression(`none`, true)) - ]), false /* no newline */)) - ] - }; + if (!dir.exp) { + context.onError( + compilerDom.createDOMCompilerError(61) + ); + } + return { + props: [ + compilerDom.createObjectProperty( + `style`, + compilerDom.createConditionalExpression( + dir.exp, + compilerDom.createSimpleExpression(`null`, false), + compilerDom.createObjectExpression([ + compilerDom.createObjectProperty( + `display`, + compilerDom.createSimpleExpression(`none`, true) + ) + ]), + false + ) + ) + ] + }; }; -const filterChild = (node) => node.children.filter(n => n.type !== 3 /* COMMENT */); +const filterChild = (node) => node.children.filter((n) => n.type !== 3); const hasSingleChild = (node) => filterChild(node).length === 1; const ssrInjectFallthroughAttrs = (node, context) => { - // _attrs is provided as a function argument. - // mark it as a known identifier so that it doesn't get prefixed by - // transformExpression. - if (node.type === 0 /* ROOT */) { - context.identifiers._attrs = 1; - } - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */ && - (compilerDom.isBuiltInType(node.tag, 'Transition') || - compilerDom.isBuiltInType(node.tag, 'KeepAlive'))) { - const rootChildren = filterChild(context.root); - if (rootChildren.length === 1 && rootChildren[0] === node) { - if (hasSingleChild(node)) { - injectFallthroughAttrs(node.children[0]); - } - return; - } - } - const parent = context.parent; - if (!parent || parent.type !== 0 /* ROOT */) { - return; - } - if (node.type === 10 /* IF_BRANCH */ && hasSingleChild(node)) { - // detect cases where the parent v-if is not the only root level node - let hasEncounteredIf = false; - for (const c of filterChild(parent)) { - if (c.type === 9 /* IF */ || - (c.type === 1 /* ELEMENT */ && compilerDom.findDir(c, 'if'))) { - // multiple root v-if - if (hasEncounteredIf) - return; - hasEncounteredIf = true; - } - else if ( - // node before v-if - !hasEncounteredIf || - // non else nodes - !(c.type === 1 /* ELEMENT */ && compilerDom.findDir(c, /else/, true))) { - return; - } - } + if (node.type === 0) { + context.identifiers._attrs = 1; + } + if (node.type === 1 && node.tagType === 1 && (node.tag === "transition" || node.tag === "Transition" || node.tag === "KeepAlive" || node.tag === "keep-alive")) { + const rootChildren = filterChild(context.root); + if (rootChildren.length === 1 && rootChildren[0] === node) { + if (hasSingleChild(node)) { injectFallthroughAttrs(node.children[0]); + } + return; } - else if (hasSingleChild(parent)) { - injectFallthroughAttrs(node); + } + const parent = context.parent; + if (!parent || parent.type !== 0) { + return; + } + if (node.type === 10 && hasSingleChild(node)) { + let hasEncounteredIf = false; + for (const c of filterChild(parent)) { + if (c.type === 9 || c.type === 1 && compilerDom.findDir(c, "if")) { + if (hasEncounteredIf) + return; + hasEncounteredIf = true; + } else if ( + // node before v-if + !hasEncounteredIf || // non else nodes + !(c.type === 1 && compilerDom.findDir(c, /else/, true)) + ) { + return; + } } + injectFallthroughAttrs(node.children[0]); + } else if (hasSingleChild(parent)) { + injectFallthroughAttrs(node); + } }; function injectFallthroughAttrs(node) { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */) && - !compilerDom.findDir(node, 'for')) { - node.props.push({ - type: 7 /* DIRECTIVE */, - name: 'bind', - arg: undefined, - exp: compilerDom.createSimpleExpression(`_attrs`, false), - modifiers: [], - loc: compilerDom.locStub - }); - } + if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !compilerDom.findDir(node, "for")) { + node.props.push({ + type: 7, + name: "bind", + arg: void 0, + exp: compilerDom.createSimpleExpression(`_attrs`, false), + modifiers: [], + loc: compilerDom.locStub + }); + } } const ssrInjectCssVars = (node, context) => { - if (!context.ssrCssVars) { - return; - } - // _cssVars is initialized once per render function - // the code is injected in ssrCodegenTransform when creating the - // ssr transform context - if (node.type === 0 /* ROOT */) { - context.identifiers._cssVars = 1; - } - const parent = context.parent; - if (!parent || parent.type !== 0 /* ROOT */) { - return; - } - if (node.type === 10 /* IF_BRANCH */) { - for (const child of node.children) { - injectCssVars(child); - } - } - else { - injectCssVars(node); + if (!context.ssrCssVars) { + return; + } + if (node.type === 0) { + context.identifiers._cssVars = 1; + } + const parent = context.parent; + if (!parent || parent.type !== 0) { + return; + } + if (node.type === 10) { + for (const child of node.children) { + injectCssVars(child); } + } else { + injectCssVars(node); + } }; function injectCssVars(node) { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */) && - !compilerDom.findDir(node, 'for')) { - if (compilerDom.isBuiltInType(node.tag, 'Suspense')) { - for (const child of node.children) { - if (child.type === 1 /* ELEMENT */ && - child.tagType === 3 /* TEMPLATE */) { - // suspense slot - child.children.forEach(injectCssVars); - } - else { - injectCssVars(child); - } - } - } - else { - node.props.push({ - type: 7 /* DIRECTIVE */, - name: 'bind', - arg: undefined, - exp: compilerDom.createSimpleExpression(`_cssVars`, false), - modifiers: [], - loc: compilerDom.locStub - }); + if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !compilerDom.findDir(node, "for")) { + if (node.tag === "suspense" || node.tag === "Suspense") { + for (const child of node.children) { + if (child.type === 1 && child.tagType === 3) { + child.children.forEach(injectCssVars); + } else { + injectCssVars(child); } + } + } else { + node.props.push({ + type: 7, + name: "bind", + arg: void 0, + exp: compilerDom.createSimpleExpression(`_cssVars`, false), + modifiers: [], + loc: compilerDom.locStub + }); } + } } -function compile(template, options = {}) { - options = { - ...options, - // apply DOM-specific parsing options - ...compilerDom.parserOptions, - ssr: true, - inSSR: true, - scopeId: options.mode === 'function' ? null : options.scopeId, - // always prefix since compiler-ssr doesn't have size concern - prefixIdentifiers: true, - // disable optimizations that are unnecessary for ssr - cacheHandlers: false, - hoistStatic: false - }; - const ast = compilerDom.baseParse(template, options); - // Save raw options for AST. This is needed when performing sub-transforms - // on slot vnode branches. - rawOptionsMap.set(ast, options); - compilerDom.transform(ast, { - ...options, - hoistStatic: false, - nodeTransforms: [ - ssrTransformIf, - ssrTransformFor, - compilerDom.trackVForSlotScopes, - compilerDom.transformExpression, - ssrTransformSlotOutlet, - ssrInjectFallthroughAttrs, - ssrInjectCssVars, - ssrTransformElement, - ssrTransformComponent, - compilerDom.trackSlotScopes, - compilerDom.transformStyle, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: { - // reusing core v-bind - bind: compilerDom.transformBind, - on: compilerDom.transformOn, - // model and show has dedicated SSR handling - model: ssrTransformModel, - show: ssrTransformShow, - // the following are ignored during SSR - // on: noopDirectiveTransform, - cloak: compilerDom.noopDirectiveTransform, - once: compilerDom.noopDirectiveTransform, - memo: compilerDom.noopDirectiveTransform, - ...(options.directiveTransforms || {}) // user transforms - } - }); - // traverse the template AST and convert into SSR codegen AST - // by replacing ast.codegenNode. - ssrCodegenTransform(ast, options); - return compilerDom.generate(ast, options); +function compile(source, options = {}) { + options = { + ...options, + ...compilerDom.parserOptions, + ssr: true, + inSSR: true, + scopeId: options.mode === "function" ? null : options.scopeId, + // always prefix since compiler-ssr doesn't have size concern + prefixIdentifiers: true, + // disable optimizations that are unnecessary for ssr + cacheHandlers: false, + hoistStatic: false + }; + const ast = typeof source === "string" ? compilerDom.baseParse(source, options) : source; + rawOptionsMap.set(ast, options); + compilerDom.transform(ast, { + ...options, + hoistStatic: false, + nodeTransforms: [ + ssrTransformIf, + ssrTransformFor, + compilerDom.trackVForSlotScopes, + compilerDom.transformExpression, + ssrTransformSlotOutlet, + ssrInjectFallthroughAttrs, + ssrInjectCssVars, + ssrTransformElement, + ssrTransformComponent, + compilerDom.trackSlotScopes, + compilerDom.transformStyle, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: { + // reusing core v-bind + bind: compilerDom.transformBind, + on: compilerDom.transformOn, + // model and show have dedicated SSR handling + model: ssrTransformModel, + show: ssrTransformShow, + // the following are ignored during SSR + // on: noopDirectiveTransform, + cloak: compilerDom.noopDirectiveTransform, + once: compilerDom.noopDirectiveTransform, + memo: compilerDom.noopDirectiveTransform, + ...options.directiveTransforms || {} + // user transforms + } + }); + ssrCodegenTransform(ast, options); + return compilerDom.generate(ast, options); } exports.compile = compile; diff --git a/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts b/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts index 8568c9e9..60dfb21c 100644 --- a/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +++ b/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts @@ -1,6 +1,4 @@ -import { CodegenResult } from '@vue/compiler-dom'; -import { CompilerOptions } from '@vue/compiler-dom'; +import { RootNode, CompilerOptions, CodegenResult } from '@vue/compiler-dom'; -export declare function compile(template: string, options?: CompilerOptions): CodegenResult; +export declare function compile(source: string | RootNode, options?: CompilerOptions): CodegenResult; -export { } diff --git a/node_modules/@vue/compiler-ssr/package.json b/node_modules/@vue/compiler-ssr/package.json index b5173631..e92e581a 100644 --- a/node_modules/@vue/compiler-ssr/package.json +++ b/node_modules/@vue/compiler-ssr/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-ssr", - "version": "3.2.36", + "version": "3.4.15", "description": "@vue/compiler-ssr", "main": "dist/compiler-ssr.cjs.js", "types": "dist/compiler-ssr.d.ts", @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme", "dependencies": { - "@vue/shared": "3.2.36", - "@vue/compiler-dom": "3.2.36" + "@vue/shared": "3.4.15", + "@vue/compiler-dom": "3.4.15" } -} +} \ No newline at end of file diff --git a/node_modules/@vue/reactivity-transform/README.md b/node_modules/@vue/reactivity-transform/README.md deleted file mode 100644 index 92277a8b..00000000 --- a/node_modules/@vue/reactivity-transform/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# @vue/reactivity-transform - -> ⚠️ This is experimental and currently only provided for testing and feedback. It may break during patches or even be removed. Use at your own risk! -> -> Follow https://github.com/vuejs/rfcs/discussions/369 for details and updates. - -## Basic Rules - -- Ref-creating APIs have `$`-prefixed versions that create reactive variables instead. They also do not need to be explicitly imported. These include: - - `ref` - - `computed` - - `shallowRef` - - `customRef` - - `toRef` -- `$()` can be used to destructure an object into reactive variables, or turn existing refs into reactive variables -- `$$()` to "escape" the transform, which allows access to underlying refs - -```js -import { watchEffect } from 'vue' - -// bind ref as a variable -let count = $ref(0) - -watchEffect(() => { - // no need for .value - console.log(count) -}) - -// assignments are reactive -count++ - -// get the actual ref -console.log($$(count)) // { value: 1 } -``` - -Macros can be optionally imported to make it more explicit: - -```js -// not necessary, but also works -import { $, $ref } from 'vue/macros' - -let count = $ref(0) -const { x, y } = $(useMouse()) -``` - -### Global Types - -To enable types for the macros globally, include the following in a `.d.ts` file: - -```ts -/// <reference types="vue/macros-global" /> -``` - -## API - -This package is the lower-level transform that can be used standalone. Higher-level tooling (e.g. `@vitejs/plugin-vue` and `vue-loader`) will provide integration via options. - -### `shouldTransform` - -Can be used to do a cheap check to determine whether full transform should be performed. - -```js -import { shouldTransform } from '@vue/reactivity-transform' - -shouldTransform(`let a = ref(0)`) // false -shouldTransform(`let a = $ref(0)`) // true -``` - -### `transform` - -```js -import { transform } from '@vue/reactivity-transform' - -const src = `let a = $ref(0); a++` -const { - code, // import { ref as _ref } from 'vue'; let a = (ref(0)); a.value++" - map -} = transform(src, { - filename: 'foo.ts', - sourceMap: true, - - // @babel/parser plugins to enable. - // 'typescript' and 'jsx' will be auto-inferred from filename if provided, - // so in most cases explicit parserPlugins are not necessary - parserPlugins: [ - /* ... */ - ] -}) -``` - -**Options** - -```ts -interface RefTransformOptions { - filename?: string - sourceMap?: boolean // default: false - parserPlugins?: ParserPlugin[] - importHelpersFrom?: string // default: "vue" -} -``` - -### `transformAST` - -Transform with an existing Babel AST + MagicString instance. This is used internally by `@vue/compiler-sfc` to avoid double parse/transform cost. - -```js -import { transformAST } from '@vue/reactivity-transform' -import { parse } from '@babel/parser' -import MagicString from 'magic-string' - -const src = `let a = $ref(0); a++` -const ast = parse(src, { sourceType: 'module' }) -const s = new MagicString(src) - -const { - rootRefs, // ['a'] - importedHelpers // ['ref'] -} = transformAST(ast, s) - -console.log(s.toString()) // let a = _ref(0); a.value++ -``` diff --git a/node_modules/@vue/reactivity-transform/dist/reactivity-transform.cjs.js b/node_modules/@vue/reactivity-transform/dist/reactivity-transform.cjs.js deleted file mode 100644 index 26f347d4..00000000 --- a/node_modules/@vue/reactivity-transform/dist/reactivity-transform.cjs.js +++ /dev/null @@ -1,538 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var MagicString = require('magic-string'); -var estreeWalker = require('estree-walker'); -var compilerCore = require('@vue/compiler-core'); -var parser = require('@babel/parser'); -var shared = require('@vue/shared'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; } - -var MagicString__default = /*#__PURE__*/_interopDefaultLegacy(MagicString); - -const CONVERT_SYMBOL = '$'; -const ESCAPE_SYMBOL = '$$'; -const shorthands = ['ref', 'computed', 'shallowRef', 'toRef', 'customRef']; -const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/; -function shouldTransform(src) { - return transformCheckRE.test(src); -} -function transform(src, { filename, sourceMap, parserPlugins, importHelpersFrom = 'vue' } = {}) { - const plugins = parserPlugins || []; - if (filename) { - if (/\.tsx?$/.test(filename)) { - plugins.push('typescript'); - } - if (filename.endsWith('x')) { - plugins.push('jsx'); - } - } - const ast = parser.parse(src, { - sourceType: 'module', - plugins - }); - const s = new MagicString__default(src); - const res = transformAST(ast.program, s, 0); - // inject helper imports - if (res.importedHelpers.length) { - s.prepend(`import { ${res.importedHelpers - .map(h => `${h} as _${h}`) - .join(', ')} } from '${importHelpersFrom}'\n`); - } - return { - ...res, - code: s.toString(), - map: sourceMap - ? s.generateMap({ - source: filename, - hires: true, - includeContent: true - }) - : null - }; -} -function transformAST(ast, s, offset = 0, knownRefs, knownProps) { - // TODO remove when out of experimental - warnExperimental(); - let convertSymbol = CONVERT_SYMBOL; - let escapeSymbol = ESCAPE_SYMBOL; - // macro import handling - for (const node of ast.body) { - if (node.type === 'ImportDeclaration' && - node.source.value === 'vue/macros') { - // remove macro imports - s.remove(node.start + offset, node.end + offset); - // check aliasing - for (const specifier of node.specifiers) { - if (specifier.type === 'ImportSpecifier') { - const imported = specifier.imported.name; - const local = specifier.local.name; - if (local !== imported) { - if (imported === ESCAPE_SYMBOL) { - escapeSymbol = local; - } - else if (imported === CONVERT_SYMBOL) { - convertSymbol = local; - } - else { - error(`macro imports for ref-creating methods do not support aliasing.`, specifier); - } - } - } - } - } - } - const importedHelpers = new Set(); - const rootScope = {}; - const scopeStack = [rootScope]; - let currentScope = rootScope; - let escapeScope; // inside $$() - const excludedIds = new WeakSet(); - const parentStack = []; - const propsLocalToPublicMap = Object.create(null); - if (knownRefs) { - for (const key of knownRefs) { - rootScope[key] = true; - } - } - if (knownProps) { - for (const key in knownProps) { - const { local } = knownProps[key]; - rootScope[local] = 'prop'; - propsLocalToPublicMap[local] = key; - } - } - function isRefCreationCall(callee) { - if (callee === convertSymbol) { - return convertSymbol; - } - if (callee[0] === '$' && shorthands.includes(callee.slice(1))) { - return callee; - } - return false; - } - function error(msg, node) { - const e = new Error(msg); - e.node = node; - throw e; - } - function helper(msg) { - importedHelpers.add(msg); - return `_${msg}`; - } - function registerBinding(id, isRef = false) { - excludedIds.add(id); - if (currentScope) { - currentScope[id.name] = isRef; - } - else { - error('registerBinding called without active scope, something is wrong.', id); - } - } - const registerRefBinding = (id) => registerBinding(id, true); - let tempVarCount = 0; - function genTempVar() { - return `__$temp_${++tempVarCount}`; - } - function snip(node) { - return s.original.slice(node.start + offset, node.end + offset); - } - function walkScope(node, isRoot = false) { - for (const stmt of node.body) { - if (stmt.type === 'VariableDeclaration') { - walkVariableDeclaration(stmt, isRoot); - } - else if (stmt.type === 'FunctionDeclaration' || - stmt.type === 'ClassDeclaration') { - if (stmt.declare || !stmt.id) - continue; - registerBinding(stmt.id); - } - else if ((stmt.type === 'ForOfStatement' || stmt.type === 'ForInStatement') && - stmt.left.type === 'VariableDeclaration') { - walkVariableDeclaration(stmt.left); - } - else if (stmt.type === 'ExportNamedDeclaration' && - stmt.declaration && - stmt.declaration.type === 'VariableDeclaration') { - walkVariableDeclaration(stmt.declaration, isRoot); - } - else if (stmt.type === 'LabeledStatement' && - stmt.body.type === 'VariableDeclaration') { - walkVariableDeclaration(stmt.body, isRoot); - } - } - } - function walkVariableDeclaration(stmt, isRoot = false) { - if (stmt.declare) { - return; - } - for (const decl of stmt.declarations) { - let refCall; - const isCall = decl.init && - decl.init.type === 'CallExpression' && - decl.init.callee.type === 'Identifier'; - if (isCall && - (refCall = isRefCreationCall(decl.init.callee.name))) { - processRefDeclaration(refCall, decl.id, decl.init); - } - else { - const isProps = isRoot && isCall && decl.init.callee.name === 'defineProps'; - for (const id of compilerCore.extractIdentifiers(decl.id)) { - if (isProps) { - // for defineProps destructure, only exclude them since they - // are already passed in as knownProps - excludedIds.add(id); - } - else { - registerBinding(id); - } - } - } - } - } - function processRefDeclaration(method, id, call) { - excludedIds.add(call.callee); - if (method === convertSymbol) { - // $ - // remove macro - s.remove(call.callee.start + offset, call.callee.end + offset); - if (id.type === 'Identifier') { - // single variable - registerRefBinding(id); - } - else if (id.type === 'ObjectPattern') { - processRefObjectPattern(id, call); - } - else if (id.type === 'ArrayPattern') { - processRefArrayPattern(id, call); - } - } - else { - // shorthands - if (id.type === 'Identifier') { - registerRefBinding(id); - // replace call - s.overwrite(call.start + offset, call.start + method.length + offset, helper(method.slice(1))); - } - else { - error(`${method}() cannot be used with destructure patterns.`, call); - } - } - } - function processRefObjectPattern(pattern, call, tempVar, path = []) { - if (!tempVar) { - tempVar = genTempVar(); - // const { x } = $(useFoo()) --> const __$temp_1 = useFoo() - s.overwrite(pattern.start + offset, pattern.end + offset, tempVar); - } - for (const p of pattern.properties) { - let nameId; - let key; - let defaultValue; - if (p.type === 'ObjectProperty') { - if (p.key.start === p.value.start) { - // shorthand { foo } - nameId = p.key; - if (p.value.type === 'Identifier') { - // avoid shorthand value identifier from being processed - excludedIds.add(p.value); - } - else if (p.value.type === 'AssignmentPattern' && - p.value.left.type === 'Identifier') { - // { foo = 1 } - excludedIds.add(p.value.left); - defaultValue = p.value.right; - } - } - else { - key = p.computed ? p.key : p.key.name; - if (p.value.type === 'Identifier') { - // { foo: bar } - nameId = p.value; - } - else if (p.value.type === 'ObjectPattern') { - processRefObjectPattern(p.value, call, tempVar, [...path, key]); - } - else if (p.value.type === 'ArrayPattern') { - processRefArrayPattern(p.value, call, tempVar, [...path, key]); - } - else if (p.value.type === 'AssignmentPattern') { - if (p.value.left.type === 'Identifier') { - // { foo: bar = 1 } - nameId = p.value.left; - defaultValue = p.value.right; - } - else if (p.value.left.type === 'ObjectPattern') { - processRefObjectPattern(p.value.left, call, tempVar, [ - ...path, - [key, p.value.right] - ]); - } - else if (p.value.left.type === 'ArrayPattern') { - processRefArrayPattern(p.value.left, call, tempVar, [ - ...path, - [key, p.value.right] - ]); - } - else ; - } - } - } - else { - // rest element { ...foo } - error(`reactivity destructure does not support rest elements.`, p); - } - if (nameId) { - registerRefBinding(nameId); - // inject toRef() after original replaced pattern - const source = pathToString(tempVar, path); - const keyStr = shared.isString(key) - ? `'${key}'` - : key - ? snip(key) - : `'${nameId.name}'`; - const defaultStr = defaultValue ? `, ${snip(defaultValue)}` : ``; - s.appendLeft(call.end + offset, `,\n ${nameId.name} = ${helper('toRef')}(${source}, ${keyStr}${defaultStr})`); - } - } - } - function processRefArrayPattern(pattern, call, tempVar, path = []) { - if (!tempVar) { - // const [x] = $(useFoo()) --> const __$temp_1 = useFoo() - tempVar = genTempVar(); - s.overwrite(pattern.start + offset, pattern.end + offset, tempVar); - } - for (let i = 0; i < pattern.elements.length; i++) { - const e = pattern.elements[i]; - if (!e) - continue; - let nameId; - let defaultValue; - if (e.type === 'Identifier') { - // [a] --> [__a] - nameId = e; - } - else if (e.type === 'AssignmentPattern') { - // [a = 1] - nameId = e.left; - defaultValue = e.right; - } - else if (e.type === 'RestElement') { - // [...a] - error(`reactivity destructure does not support rest elements.`, e); - } - else if (e.type === 'ObjectPattern') { - processRefObjectPattern(e, call, tempVar, [...path, i]); - } - else if (e.type === 'ArrayPattern') { - processRefArrayPattern(e, call, tempVar, [...path, i]); - } - if (nameId) { - registerRefBinding(nameId); - // inject toRef() after original replaced pattern - const source = pathToString(tempVar, path); - const defaultStr = defaultValue ? `, ${snip(defaultValue)}` : ``; - s.appendLeft(call.end + offset, `,\n ${nameId.name} = ${helper('toRef')}(${source}, ${i}${defaultStr})`); - } - } - } - function pathToString(source, path) { - if (path.length) { - for (const seg of path) { - if (shared.isArray(seg)) { - source = `(${source}${segToString(seg[0])} || ${snip(seg[1])})`; - } - else { - source += segToString(seg); - } - } - } - return source; - } - function segToString(seg) { - if (typeof seg === 'number') { - return `[${seg}]`; - } - else if (typeof seg === 'string') { - return `.${seg}`; - } - else { - return snip(seg); - } - } - function rewriteId(scope, id, parent, parentStack) { - if (shared.hasOwn(scope, id.name)) { - const bindingType = scope[id.name]; - if (bindingType) { - const isProp = bindingType === 'prop'; - if (compilerCore.isStaticProperty(parent) && parent.shorthand) { - // let binding used in a property shorthand - // skip for destructure patterns - if (!parent.inPattern || - compilerCore.isInDestructureAssignment(parent, parentStack)) { - if (isProp) { - if (escapeScope) { - // prop binding in $$() - // { prop } -> { prop: __props_prop } - registerEscapedPropBinding(id); - s.appendLeft(id.end + offset, `: __props_${propsLocalToPublicMap[id.name]}`); - } - else { - // { prop } -> { prop: __props.prop } - s.appendLeft(id.end + offset, `: ${shared.genPropsAccessExp(propsLocalToPublicMap[id.name])}`); - } - } - else { - // { foo } -> { foo: foo.value } - s.appendLeft(id.end + offset, `: ${id.name}.value`); - } - } - } - else { - if (isProp) { - if (escapeScope) { - // x --> __props_x - registerEscapedPropBinding(id); - s.overwrite(id.start + offset, id.end + offset, `__props_${propsLocalToPublicMap[id.name]}`); - } - else { - // x --> __props.x - s.overwrite(id.start + offset, id.end + offset, shared.genPropsAccessExp(propsLocalToPublicMap[id.name])); - } - } - else { - // x --> x.value - s.appendLeft(id.end + offset, '.value'); - } - } - } - return true; - } - return false; - } - const propBindingRefs = {}; - function registerEscapedPropBinding(id) { - if (!propBindingRefs.hasOwnProperty(id.name)) { - propBindingRefs[id.name] = true; - const publicKey = propsLocalToPublicMap[id.name]; - s.prependRight(offset, `const __props_${publicKey} = ${helper(`toRef`)}(__props, '${publicKey}')\n`); - } - } - // check root scope first - walkScope(ast, true); - estreeWalker.walk(ast, { - enter(node, parent) { - parent && parentStack.push(parent); - // function scopes - if (compilerCore.isFunctionType(node)) { - scopeStack.push((currentScope = {})); - compilerCore.walkFunctionParams(node, registerBinding); - if (node.body.type === 'BlockStatement') { - walkScope(node.body); - } - return; - } - // catch param - if (node.type === 'CatchClause') { - scopeStack.push((currentScope = {})); - if (node.param && node.param.type === 'Identifier') { - registerBinding(node.param); - } - walkScope(node.body); - return; - } - // non-function block scopes - if (node.type === 'BlockStatement' && !compilerCore.isFunctionType(parent)) { - scopeStack.push((currentScope = {})); - walkScope(node); - return; - } - // skip type nodes - if (parent && - parent.type.startsWith('TS') && - parent.type !== 'TSAsExpression' && - parent.type !== 'TSNonNullExpression' && - parent.type !== 'TSTypeAssertion') { - return this.skip(); - } - if (node.type === 'Identifier' && - // if inside $$(), skip unless this is a destructured prop binding - !(escapeScope && rootScope[node.name] !== 'prop') && - compilerCore.isReferencedIdentifier(node, parent, parentStack) && - !excludedIds.has(node)) { - // walk up the scope chain to check if id should be appended .value - let i = scopeStack.length; - while (i--) { - if (rewriteId(scopeStack[i], node, parent, parentStack)) { - return; - } - } - } - if (node.type === 'CallExpression' && node.callee.type === 'Identifier') { - const callee = node.callee.name; - const refCall = isRefCreationCall(callee); - if (refCall && (!parent || parent.type !== 'VariableDeclarator')) { - return error(`${refCall} can only be used as the initializer of ` + - `a variable declaration.`, node); - } - if (callee === escapeSymbol) { - s.remove(node.callee.start + offset, node.callee.end + offset); - escapeScope = node; - } - // TODO remove when out of experimental - if (callee === '$raw') { - error(`$raw() has been replaced by $$(). ` + - `See ${RFC_LINK} for latest updates.`, node); - } - if (callee === '$fromRef') { - error(`$fromRef() has been replaced by $(). ` + - `See ${RFC_LINK} for latest updates.`, node); - } - } - }, - leave(node, parent) { - parent && parentStack.pop(); - if ((node.type === 'BlockStatement' && !compilerCore.isFunctionType(parent)) || - compilerCore.isFunctionType(node)) { - scopeStack.pop(); - currentScope = scopeStack[scopeStack.length - 1] || null; - } - if (node === escapeScope) { - escapeScope = undefined; - } - } - }); - return { - rootRefs: Object.keys(rootScope).filter(key => rootScope[key] === true), - importedHelpers: [...importedHelpers] - }; -} -const RFC_LINK = `https://github.com/vuejs/rfcs/discussions/369`; -const hasWarned = {}; -function warnExperimental() { - // eslint-disable-next-line - if (typeof window !== 'undefined') { - return; - } - warnOnce(`Reactivity transform is an experimental feature.\n` + - `Experimental features may change behavior between patch versions.\n` + - `It is recommended to pin your vue dependencies to exact versions to avoid breakage.\n` + - `You can follow the proposal's status at ${RFC_LINK}.`); -} -function warnOnce(msg) { - const isNodeProd = typeof process !== 'undefined' && process.env.NODE_ENV === 'production'; - if (!isNodeProd && !false && !hasWarned[msg]) { - hasWarned[msg] = true; - warn(msg); - } -} -function warn(msg) { - console.warn(`\x1b[1m\x1b[33m[@vue/reactivity-transform]\x1b[0m\x1b[33m ${msg}\x1b[0m\n`); -} - -exports.shouldTransform = shouldTransform; -exports.transform = transform; -exports.transformAST = transformAST; diff --git a/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts b/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts deleted file mode 100644 index e08367be..00000000 --- a/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import MagicString from 'magic-string'; -import { ParserPlugin } from '@babel/parser'; -import { Program } from '@babel/types'; -import { SourceMap } from 'magic-string'; - -export declare interface RefTransformOptions { - filename?: string; - sourceMap?: boolean; - parserPlugins?: ParserPlugin[]; - importHelpersFrom?: string; -} - -export declare interface RefTransformResults { - code: string; - map: SourceMap | null; - rootRefs: string[]; - importedHelpers: string[]; -} - -export declare function shouldTransform(src: string): boolean; - -export declare function transform(src: string, { filename, sourceMap, parserPlugins, importHelpersFrom }?: RefTransformOptions): RefTransformResults; - -export declare function transformAST(ast: Program, s: MagicString, offset?: number, knownRefs?: string[], knownProps?: Record<string, // public prop key - { - local: string; - default?: any; -}>): { - rootRefs: string[]; - importedHelpers: string[]; -}; - -export { } diff --git a/node_modules/@vue/reactivity-transform/package.json b/node_modules/@vue/reactivity-transform/package.json deleted file mode 100644 index 0ffa0654..00000000 --- a/node_modules/@vue/reactivity-transform/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@vue/reactivity-transform", - "version": "3.2.36", - "description": "@vue/reactivity-transform", - "main": "dist/reactivity-transform.cjs.js", - "files": [ - "dist" - ], - "buildOptions": { - "formats": [ - "cjs" - ], - "prod": false - }, - "types": "dist/reactivity-transform.d.ts", - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/core.git", - "directory": "packages/reactivity-transform" - }, - "keywords": [ - "vue" - ], - "author": "Evan You", - "license": "MIT", - "bugs": { - "url": "https://github.com/vuejs/core/issues" - }, - "homepage": "https://github.com/vuejs/core/tree/dev/packages/reactivity-transform#readme", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.36", - "@vue/shared": "3.2.36", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" - }, - "devDependencies": { - "@babel/core": "^7.16.0", - "@babel/types": "^7.16.0" - } -} diff --git a/node_modules/@vue/reactivity/README.md b/node_modules/@vue/reactivity/README.md index 4eda9a3f..e4780740 100644 --- a/node_modules/@vue/reactivity/README.md +++ b/node_modules/@vue/reactivity/README.md @@ -4,7 +4,7 @@ This package is inlined into Global & Browser ESM builds of user-facing renderers (e.g. `@vue/runtime-dom`), but also published as a package that can be used standalone. The standalone build should not be used alongside a pre-bundled build of a user-facing renderer, as they will have different internal storage for reactivity connections. A user-facing renderer should re-export all APIs from this package. -For full exposed APIs, see `src/index.ts`. You can also run `yarn build reactivity --types` from repo root, which will generate an API report at `temp/reactivity.api.md`. +For full exposed APIs, see `src/index.ts`. ## Credits diff --git a/node_modules/@vue/reactivity/dist/reactivity.cjs.js b/node_modules/@vue/reactivity/dist/reactivity.cjs.js index 6cf666e8..0b89b75d 100644 --- a/node_modules/@vue/reactivity/dist/reactivity.cjs.js +++ b/node_modules/@vue/reactivity/dist/reactivity.cjs.js @@ -1,3 +1,8 @@ +/** +* @vue/reactivity v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -5,1243 +10,1239 @@ Object.defineProperty(exports, '__esModule', { value: true }); var shared = require('@vue/shared'); function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } -const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -const wasTracked = (dep) => (dep.w & trackOpBit) > 0; -const newTracked = (dep) => (dep.n & trackOpBit) > 0; -const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } -}; -const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } -}; - -const targetMap = new WeakMap(); -// The number of effects currently being tracked recursively. -let effectTrackDepth = 0; -let trackOpBit = 1; -/** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ -const maxMarkerBits = 30; let activeEffect; -const ITERATE_KEY = Symbol('iterate' ); -const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } -function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; +function triggerComputed(computed) { + return computed.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, shared.NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - shared.extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + shared.extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; +let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; + trackStack.push(shouldTrack); + shouldTrack = true; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } +function pauseScheduling() { + pauseScheduleStack++; } -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack({ - effect: activeEffect, - ...debuggerEventExtraInfo - }); - } - } +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, shared.extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && shared.isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!shared.isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (shared.isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (shared.isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!shared.isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (shared.isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (shared.isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } +} +const queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, shared.extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } -function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = shared.isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } -} -function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(shared.extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } +function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } -const isNonTrackableKeys = /*#__PURE__*/ shared.makeMap(`__proto__,__v_isRef,__isVue`); +const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; +}; + +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol("iterate" ); +const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && shared.isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !shared.isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!shared.isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (shared.isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!shared.isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (shared.isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} + +const isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( -/*#__PURE__*/ -Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(shared.isSymbol)); -const get = /*#__PURE__*/ createGetter(); -const shallowGet = /*#__PURE__*/ createGetter(false, true); -const readonlyGet = /*#__PURE__*/ createGetter(true); -const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); -const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(shared.isSymbol) +); +const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = shared.isArray(target); - if (!isReadonly && targetIsArray && shared.hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && shared.isIntegerKey(key) ? res : res.value; - } - if (shared.isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; -} -const set = /*#__PURE__*/ createSetter(); -const shallowSet = /*#__PURE__*/ createSetter(true); -function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = shared.isArray(target) && shared.isIntegerKey(key) - ? Number(key) < target.length - : shared.hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (shared.hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } -function deleteProperty(target, key) { +function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = shared.isArray(target); + if (!isReadonly2) { + if (targetIsArray && shared.hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && shared.isIntegerKey(key) ? res : res.value; + } + if (shared.isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = shared.hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; -} -function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!shared.isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; -} -function ownKeys(target) { - track(target, "iterate" /* ITERATE */, shared.isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + shared.isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } -const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys -}; -const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } -}; -const shallowReactiveHandlers = /*#__PURE__*/ shared.extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet -}); -// Props handlers are special in the sense that it should not unwrap top-level -// refs (in order to allow refs to be explicitly passed down), but should -// retain the reactivity of the normal readonly object. -const shallowReadonlyHandlers = /*#__PURE__*/ shared.extend({}, readonlyHandlers, { - get: shallowReadonlyGet -}); + return true; + } + deleteProperty(target, key) { + { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true +); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); -function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); +function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (shared.hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } -function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); +function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (shared.hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } -function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (shared.hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = shared.isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = shared.isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = shared.isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = shared.isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${shared.capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${shared.capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } -const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(shared.hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = shared.toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = shared.toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } -const reactiveMap = new WeakMap(); -const shallowReactiveMap = new WeakMap(); -const readonlyMap = new WeakMap(); -const shallowReadonlyMap = new WeakMap(); +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(shared.toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(shared.toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } -/** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } -/** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } -/** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } -function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!shared.isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!shared.isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - shared.def(value, "__v_skip" /* SKIP */, true); - return value; + shared.def(value, "__v_skip", true); + return value; } const toReactive = (value) => shared.isObject(value) ? reactive(value) : value; const toReadonly = (value) => shared.isObject(value) ? readonly(value) : value; -function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } - } -} -function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } -} -function isRef(r) { - return !!(r && r.__v_isRef === true); -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (shared.hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } -} -function triggerRef(ref) { - triggerRefValue(ref, ref.value ); -} -function unref(ref) { - return isRef(ref) ? ref.value : ref; -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = shared.isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } -} -function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); -} - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (shared.hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = shared.isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; + let getter; + let setter; + const onlyGetter = shared.isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; } -var _a; -const tick = /*#__PURE__*/ Promise.resolve(); -const queue = []; -let queued = false; -const scheduler = (fn) => { - queue.push(fn); - if (!queued) { - queued = true; - tick.then(flush); - } -}; -const flush = () => { - for (let i = 0; i < queue.length; i++) { - queue[i](); - } - queue.length = 0; - queued = false; -}; -class DeferredComputedRefImpl { - constructor(getter) { - this.dep = undefined; - this._dirty = true; - this.__v_isRef = true; - this[_a] = true; - let compareTarget; - let hasCompareTarget = false; - let scheduled = false; - this.effect = new ReactiveEffect(getter, (computedTrigger) => { - if (this.dep) { - if (computedTrigger) { - compareTarget = this._value; - hasCompareTarget = true; - } - else if (!scheduled) { - const valueToCompare = hasCompareTarget ? compareTarget : this._value; - scheduled = true; - hasCompareTarget = false; - scheduler(() => { - if (this.effect.active && this._get() !== valueToCompare) { - triggerRefValue(this); - } - scheduled = false; - }); - } - // chained upstream computeds are notified synchronously to ensure - // value invalidation in case of sync access; normal effects are - // deferred to be triggered in scheduler. - for (const e of this.dep) { - if (e.computed instanceof DeferredComputedRefImpl) { - e.scheduler(true /* computedTrigger */); - } - } - } - this._dirty = true; - }); - this.effect.computed = this; - } - _get() { - if (this._dirty) { - this._dirty = false; - return (this._value = this.effect.run()); - } - return this._value; - } - get value() { - trackRefValue(this); - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - return toRaw(this)._get(); - } +function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } } -_a = "__v_isReadonly" /* IS_READONLY */; -function deferredComputed(getter) { - return new DeferredComputedRefImpl(getter); +function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } } +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (shared.hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); + } + } +} +function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return shared.isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = shared.isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (shared.isFunction(source)) { + return new GetterRefImpl(source); + } else if (shared.isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +const deferredComputed = computed; + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; +const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw" +}; exports.EffectScope = EffectScope; exports.ITERATE_KEY = ITERATE_KEY; exports.ReactiveEffect = ReactiveEffect; +exports.ReactiveFlags = ReactiveFlags; +exports.TrackOpTypes = TrackOpTypes; +exports.TriggerOpTypes = TriggerOpTypes; exports.computed = computed; exports.customRef = customRef; exports.deferredComputed = deferredComputed; @@ -1256,11 +1257,13 @@ exports.isRef = isRef; exports.isShallow = isShallow; exports.markRaw = markRaw; exports.onScopeDispose = onScopeDispose; +exports.pauseScheduling = pauseScheduling; exports.pauseTracking = pauseTracking; exports.proxyRefs = proxyRefs; exports.reactive = reactive; exports.readonly = readonly; exports.ref = ref; +exports.resetScheduling = resetScheduling; exports.resetTracking = resetTracking; exports.shallowReactive = shallowReactive; exports.shallowReadonly = shallowReadonly; @@ -1269,6 +1272,7 @@ exports.stop = stop; exports.toRaw = toRaw; exports.toRef = toRef; exports.toRefs = toRefs; +exports.toValue = toValue; exports.track = track; exports.trigger = trigger; exports.triggerRef = triggerRef; diff --git a/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js b/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js index 622d1384..c3e2fd79 100644 --- a/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +++ b/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js @@ -1,3 +1,8 @@ +/** +* @vue/reactivity v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -6,1165 +11,1147 @@ var shared = require('@vue/shared'); let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } } -const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -const wasTracked = (dep) => (dep.w & trackOpBit) > 0; -const newTracked = (dep) => (dep.n & trackOpBit) > 0; -const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } -}; -const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } -}; - -const targetMap = new WeakMap(); -// The number of effects currently being tracked recursively. -let effectTrackDepth = 0; -let trackOpBit = 1; -/** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ -const maxMarkerBits = 30; let activeEffect; -const ITERATE_KEY = Symbol(''); -const MAP_KEY_ITERATE_KEY = Symbol(''); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } -function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; +function triggerComputed(computed) { + return computed.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, shared.NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - shared.extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + shared.extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; +let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; + trackStack.push(shouldTrack); + shouldTrack = true; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - trackEffects(dep); - } +function pauseScheduling() { + pauseScheduleStack++; } -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - } +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; - } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; - } - else if (key === 'length' && shared.isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!shared.isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (shared.isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (shared.isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!shared.isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (shared.isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (shared.isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0]); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } - { - triggerEffects(createDep(effects)); - } +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } + } } -function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = shared.isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect); - } +const queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } -function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } +function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } -const isNonTrackableKeys = /*#__PURE__*/ shared.makeMap(`__proto__,__v_isRef,__isVue`); +const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; +}; + +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol(""); +const MAP_KEY_ITERATE_KEY = Symbol(""); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && shared.isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !shared.isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!shared.isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (shared.isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!shared.isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (shared.isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (shared.isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} + +const isNonTrackableKeys = /* @__PURE__ */ shared.makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( -/*#__PURE__*/ -Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(shared.isSymbol)); -const get = /*#__PURE__*/ createGetter(); -const shallowGet = /*#__PURE__*/ createGetter(false, true); -const readonlyGet = /*#__PURE__*/ createGetter(true); -const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); -const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(shared.isSymbol) +); +const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = shared.isArray(target); - if (!isReadonly && targetIsArray && shared.hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && shared.isIntegerKey(key) ? res : res.value; - } - if (shared.isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; -} -const set = /*#__PURE__*/ createSetter(); -const shallowSet = /*#__PURE__*/ createSetter(true); -function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = shared.isArray(target) && shared.isIntegerKey(key) - ? Number(key) < target.length - : shared.hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (shared.hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } -function deleteProperty(target, key) { +function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = shared.isArray(target); + if (!isReadonly2) { + if (targetIsArray && shared.hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (shared.isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && shared.isIntegerKey(key) ? res : res.value; + } + if (shared.isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!shared.isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = shared.isArray(target) && shared.isIntegerKey(key) ? Number(key) < target.length : shared.hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger(target, "set", key, value); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = shared.hasOwn(target, key); target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined); + trigger(target, "delete", key, void 0); } return result; -} -function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!shared.isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; -} -function ownKeys(target) { - track(target, "iterate" /* ITERATE */, shared.isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + shared.isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } -const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys -}; -const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - return true; - }, - deleteProperty(target, key) { - return true; - } -}; -const shallowReactiveHandlers = /*#__PURE__*/ shared.extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet -}); -// Props handlers are special in the sense that it should not unwrap top-level -// refs (in order to allow refs to be explicitly passed down), but should -// retain the reactivity of the normal readonly object. -const shallowReadonlyHandlers = /*#__PURE__*/ shared.extend({}, readonlyHandlers, { - get: shallowReadonlyGet -}); +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + return true; + } + deleteProperty(target, key) { + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true +); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); -function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); +function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (shared.hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } -function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); +function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (shared.hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } -function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (shared.hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value); - } - return this; +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (shared.hasChanged(value, oldValue)) { + trigger(target, "set", key, value); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } + get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = shared.isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = shared.isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } -const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(shared.hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + shared.hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; -const reactiveMap = new WeakMap(); -const shallowReactiveMap = new WeakMap(); -const readonlyMap = new WeakMap(); -const shallowReadonlyMap = new WeakMap(); +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(shared.toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(shared.toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } -/** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } -/** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } -/** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } -function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!shared.isObject(target)) { - return target; - } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!shared.isObject(target)) { + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - shared.def(value, "__v_skip" /* SKIP */, true); - return value; + shared.def(value, "__v_skip", true); + return value; } const toReactive = (value) => shared.isObject(value) ? reactive(value) : value; const toReadonly = (value) => shared.isObject(value) ? readonly(value) : value; -function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep())); - } - } -} -function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep); - } - } -} -function isRef(r) { - return !!(r && r.__v_isRef === true); -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (shared.hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this); - } - } -} -function triggerRef(ref) { - triggerRefValue(ref); -} -function unref(ref) { - return isRef(ref) ? ref.value : ref; -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - const ret = shared.isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } -} -function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); -} - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (shared.hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = shared.isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = shared.NOOP; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - return cRef; + let getter; + let setter; + const onlyGetter = shared.isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = shared.NOOP; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + return cRef; } -var _a; -const tick = /*#__PURE__*/ Promise.resolve(); -const queue = []; -let queued = false; -const scheduler = (fn) => { - queue.push(fn); - if (!queued) { - queued = true; - tick.then(flush); - } -}; -const flush = () => { - for (let i = 0; i < queue.length; i++) { - queue[i](); - } - queue.length = 0; - queued = false; -}; -class DeferredComputedRefImpl { - constructor(getter) { - this.dep = undefined; - this._dirty = true; - this.__v_isRef = true; - this[_a] = true; - let compareTarget; - let hasCompareTarget = false; - let scheduled = false; - this.effect = new ReactiveEffect(getter, (computedTrigger) => { - if (this.dep) { - if (computedTrigger) { - compareTarget = this._value; - hasCompareTarget = true; - } - else if (!scheduled) { - const valueToCompare = hasCompareTarget ? compareTarget : this._value; - scheduled = true; - hasCompareTarget = false; - scheduler(() => { - if (this.effect.active && this._get() !== valueToCompare) { - triggerRefValue(this); - } - scheduled = false; - }); - } - // chained upstream computeds are notified synchronously to ensure - // value invalidation in case of sync access; normal effects are - // deferred to be triggered in scheduler. - for (const e of this.dep) { - if (e.computed instanceof DeferredComputedRefImpl) { - e.scheduler(true /* computedTrigger */); - } - } - } - this._dirty = true; - }); - this.effect.computed = this; - } - _get() { - if (this._dirty) { - this._dirty = false; - return (this._value = this.effect.run()); - } - return this._value; - } - get value() { - trackRefValue(this); - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - return toRaw(this)._get(); - } +function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + ))); + } } -_a = "__v_isReadonly" /* IS_READONLY */; -function deferredComputed(getter) { - return new DeferredComputedRefImpl(getter); +function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel); + } } +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (shared.hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2); + } + } +} +function triggerRef(ref2) { + triggerRefValue(ref2, 2); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return shared.isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + const ret = shared.isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (shared.isFunction(source)) { + return new GetterRefImpl(source); + } else if (shared.isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +const deferredComputed = computed; + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; +const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw" +}; exports.EffectScope = EffectScope; exports.ITERATE_KEY = ITERATE_KEY; exports.ReactiveEffect = ReactiveEffect; +exports.ReactiveFlags = ReactiveFlags; +exports.TrackOpTypes = TrackOpTypes; +exports.TriggerOpTypes = TriggerOpTypes; exports.computed = computed; exports.customRef = customRef; exports.deferredComputed = deferredComputed; @@ -1179,11 +1166,13 @@ exports.isRef = isRef; exports.isShallow = isShallow; exports.markRaw = markRaw; exports.onScopeDispose = onScopeDispose; +exports.pauseScheduling = pauseScheduling; exports.pauseTracking = pauseTracking; exports.proxyRefs = proxyRefs; exports.reactive = reactive; exports.readonly = readonly; exports.ref = ref; +exports.resetScheduling = resetScheduling; exports.resetTracking = resetTracking; exports.shallowReactive = shallowReactive; exports.shallowReadonly = shallowReadonly; @@ -1192,6 +1181,7 @@ exports.stop = stop; exports.toRaw = toRaw; exports.toRef = toRef; exports.toRefs = toRefs; +exports.toValue = toValue; exports.track = track; exports.trigger = trigger; exports.triggerRef = triggerRef; diff --git a/node_modules/@vue/reactivity/dist/reactivity.d.ts b/node_modules/@vue/reactivity/dist/reactivity.d.ts index eb4e4b03..9fff4c1f 100644 --- a/node_modules/@vue/reactivity/dist/reactivity.d.ts +++ b/node_modules/@vue/reactivity/dist/reactivity.d.ts @@ -1,180 +1,17 @@ import { IfAny } from '@vue/shared'; -declare type BaseTypes = string | number | boolean; - -declare type Builtin = Primitive | Function | Date | Error | RegExp; - -declare type CollectionTypes = IterableCollections | WeakCollections; - -export declare function computed<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>; - -export declare function computed<T>(options: WritableComputedOptions<T>, debugOptions?: DebuggerOptions): WritableComputedRef<T>; - -export declare type ComputedGetter<T> = (...args: any[]) => T; - -export declare interface ComputedRef<T = any> extends WritableComputedRef<T> { - readonly value: T; - [ComputedRefSymbol]: true; +export declare enum TrackOpTypes { + GET = "get", + HAS = "has", + ITERATE = "iterate" } - -declare class ComputedRefImpl<T> { - private readonly _setter; - dep?: Dep; - private _value; - readonly effect: ReactiveEffect<T>; - readonly __v_isRef = true; - readonly [ReactiveFlags.IS_READONLY]: boolean; - _dirty: boolean; - _cacheable: boolean; - constructor(getter: ComputedGetter<T>, _setter: ComputedSetter<T>, isReadonly: boolean, isSSR: boolean); - get value(): T; - set value(newValue: T); +export declare enum TriggerOpTypes { + SET = "set", + ADD = "add", + DELETE = "delete", + CLEAR = "clear" } - -declare const ComputedRefSymbol: unique symbol; - -export declare type ComputedSetter<T> = (v: T) => void; - -export declare function customRef<T>(factory: CustomRefFactory<T>): Ref<T>; - -export declare type CustomRefFactory<T> = (track: () => void, trigger: () => void) => { - get: () => T; - set: (value: T) => void; -}; - -export declare type DebuggerEvent = { - effect: ReactiveEffect; -} & DebuggerEventExtraInfo; - -export declare type DebuggerEventExtraInfo = { - target: object; - type: TrackOpTypes | TriggerOpTypes; - key: any; - newValue?: any; - oldValue?: any; - oldTarget?: Map<any, any> | Set<any>; -}; - -export declare interface DebuggerOptions { - onTrack?: (event: DebuggerEvent) => void; - onTrigger?: (event: DebuggerEvent) => void; -} - -export declare type DeepReadonly<T> = T extends Builtin ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends WeakSet<infer U> ? WeakSet<DeepReadonly<U>> : T extends Promise<infer U> ? Promise<DeepReadonly<U>> : T extends Ref<infer U> ? Readonly<Ref<DeepReadonly<U>>> : T extends {} ? { - readonly [K in keyof T]: DeepReadonly<T[K]>; -} : Readonly<T>; - -export declare function deferredComputed<T>(getter: () => T): ComputedRef<T>; - -declare type Dep = Set<ReactiveEffect> & TrackedMarkers; - -export declare function effect<T = any>(fn: () => T, options?: ReactiveEffectOptions): ReactiveEffectRunner; - -export declare type EffectScheduler = (...args: any[]) => any; - -export declare class EffectScope { - /* Excluded from this release type: active */ - /* Excluded from this release type: effects */ - /* Excluded from this release type: cleanups */ - /* Excluded from this release type: parent */ - /* Excluded from this release type: scopes */ - /* Excluded from this release type: index */ - constructor(detached?: boolean); - run<T>(fn: () => T): T | undefined; - /* Excluded from this release type: on */ - /* Excluded from this release type: off */ - stop(fromParent?: boolean): void; -} - -export declare function effectScope(detached?: boolean): EffectScope; - -export declare function enableTracking(): void; - -export declare function getCurrentScope(): EffectScope | undefined; - -export declare function isProxy(value: unknown): boolean; - -export declare function isReactive(value: unknown): boolean; - -export declare function isReadonly(value: unknown): boolean; - -export declare function isRef<T>(r: Ref<T> | unknown): r is Ref<T>; - -export declare function isShallow(value: unknown): boolean; - -declare type IterableCollections = Map<any, any> | Set<any>; - -export declare const ITERATE_KEY: unique symbol; - -export declare function markRaw<T extends object>(value: T): T & { - [RawSymbol]?: true; -}; - -export declare function onScopeDispose(fn: () => void): void; - -export declare function pauseTracking(): void; - -declare type Primitive = string | number | boolean | bigint | symbol | undefined | null; - -export declare function proxyRefs<T extends object>(objectWithRefs: T): ShallowUnwrapRef<T>; - -declare const RawSymbol: unique symbol; - -/** - * Creates a reactive copy of the original object. - * - * The reactive conversion is "deep"—it affects all nested properties. In the - * ES2015 Proxy based implementation, the returned proxy is **not** equal to the - * original object. It is recommended to work exclusively with the reactive - * proxy and avoid relying on the original object. - * - * A reactive object also automatically unwraps refs contained in it, so you - * don't need to use `.value` when accessing and mutating their value: - * - * ```js - * const count = ref(0) - * const obj = reactive({ - * count - * }) - * - * obj.count++ - * obj.count // -> 1 - * count.value // -> 1 - * ``` - */ -export declare function reactive<T extends object>(target: T): UnwrapNestedRefs<T>; - -export declare class ReactiveEffect<T = any> { - fn: () => T; - scheduler: EffectScheduler | null; - active: boolean; - deps: Dep[]; - parent: ReactiveEffect | undefined; - /* Excluded from this release type: computed */ - /* Excluded from this release type: allowRecurse */ - /* Excluded from this release type: deferStop */ - onStop?: () => void; - onTrack?: (event: DebuggerEvent) => void; - onTrigger?: (event: DebuggerEvent) => void; - constructor(fn: () => T, scheduler?: EffectScheduler | null, scope?: EffectScope); - run(): T | undefined; - stop(): void; -} - -export declare interface ReactiveEffectOptions extends DebuggerOptions { - lazy?: boolean; - scheduler?: EffectScheduler; - scope?: EffectScope; - allowRecurse?: boolean; - onStop?: () => void; -} - -export declare interface ReactiveEffectRunner<T = any> { - (): T; - effect: ReactiveEffect; -} - -export declare const enum ReactiveFlags { +export declare enum ReactiveFlags { SKIP = "__v_skip", IS_REACTIVE = "__v_isReactive", IS_READONLY = "__v_isReadonly", @@ -182,13 +19,393 @@ export declare const enum ReactiveFlags { RAW = "__v_raw" } +type Dep = Map<ReactiveEffect, number> & { + cleanup: () => void; + computed?: ComputedRefImpl<any>; +}; + +export declare class EffectScope { + detached: boolean; + constructor(detached?: boolean); + get active(): boolean; + run<T>(fn: () => T): T | undefined; + stop(fromParent?: boolean): void; +} /** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. + * Creates an effect scope object which can capture the reactive effects (i.e. + * computed and watchers) created within it so that these effects can be + * disposed together. For detailed use cases of this API, please consult its + * corresponding {@link https://github.com/vuejs/rfcs/blob/master/active-rfcs/0041-reactivity-effect-scope.md | RFC}. + * + * @param detached - Can be used to create a "detached" effect scope. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#effectscope} + */ +export declare function effectScope(detached?: boolean): EffectScope; +/** + * Returns the current active effect scope if there is one. + * + * @see {@link https://vuejs.org/api/reactivity-advanced.html#getcurrentscope} + */ +export declare function getCurrentScope(): EffectScope | undefined; +/** + * Registers a dispose callback on the current active effect scope. The + * callback will be invoked when the associated effect scope is stopped. + * + * @param fn - The callback function to attach to the scope's cleanup. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose} + */ +export declare function onScopeDispose(fn: () => void): void; + +export type EffectScheduler = (...args: any[]) => any; +export type DebuggerEvent = { + effect: ReactiveEffect; +} & DebuggerEventExtraInfo; +export type DebuggerEventExtraInfo = { + target: object; + type: TrackOpTypes | TriggerOpTypes; + key: any; + newValue?: any; + oldValue?: any; + oldTarget?: Map<any, any> | Set<any>; +}; +export declare class ReactiveEffect<T = any> { + fn: () => T; + trigger: () => void; + scheduler?: EffectScheduler | undefined; + active: boolean; + deps: Dep[]; + onStop?: () => void; + onTrack?: (event: DebuggerEvent) => void; + onTrigger?: (event: DebuggerEvent) => void; + constructor(fn: () => T, trigger: () => void, scheduler?: EffectScheduler | undefined, scope?: EffectScope); + get dirty(): boolean; + set dirty(v: boolean); + run(): T; + stop(): void; +} +export interface DebuggerOptions { + onTrack?: (event: DebuggerEvent) => void; + onTrigger?: (event: DebuggerEvent) => void; +} +export interface ReactiveEffectOptions extends DebuggerOptions { + lazy?: boolean; + scheduler?: EffectScheduler; + scope?: EffectScope; + allowRecurse?: boolean; + onStop?: () => void; +} +export interface ReactiveEffectRunner<T = any> { + (): T; + effect: ReactiveEffect; +} +/** + * Registers the given function to track reactive updates. + * + * The given function will be run once immediately. Every time any reactive + * property that's accessed within it gets updated, the function will run again. + * + * @param fn - The function that will track reactive updates. + * @param options - Allows to control the effect's behaviour. + * @returns A runner that can be used to control the effect after creation. + */ +export declare function effect<T = any>(fn: () => T, options?: ReactiveEffectOptions): ReactiveEffectRunner; +/** + * Stops the effect associated with the given runner. + * + * @param runner - Association with the effect to stop tracking. + */ +export declare function stop(runner: ReactiveEffectRunner): void; +/** + * Temporarily pauses tracking. + */ +export declare function pauseTracking(): void; +/** + * Re-enables effect tracking (if it was paused). + */ +export declare function enableTracking(): void; +/** + * Resets the previous global effect tracking state. + */ +export declare function resetTracking(): void; +export declare function pauseScheduling(): void; +export declare function resetScheduling(): void; + +declare const ComputedRefSymbol: unique symbol; +export interface ComputedRef<T = any> extends WritableComputedRef<T> { + readonly value: T; + [ComputedRefSymbol]: true; +} +export interface WritableComputedRef<T> extends Ref<T> { + readonly effect: ReactiveEffect<T>; +} +export type ComputedGetter<T> = (oldValue?: T) => T; +export type ComputedSetter<T> = (newValue: T) => void; +export interface WritableComputedOptions<T> { + get: ComputedGetter<T>; + set: ComputedSetter<T>; +} +declare class ComputedRefImpl<T> { + private readonly _setter; + dep?: Dep; + private _value; + readonly effect: ReactiveEffect<T>; + readonly __v_isRef = true; + readonly [ReactiveFlags.IS_READONLY]: boolean; + _cacheable: boolean; + constructor(getter: ComputedGetter<T>, _setter: ComputedSetter<T>, isReadonly: boolean, isSSR: boolean); + get value(): T; + set value(newValue: T); + get _dirty(): boolean; + set _dirty(v: boolean); +} +/** + * Takes a getter function and returns a readonly reactive ref object for the + * returned value from the getter. It can also take an object with get and set + * functions to create a writable ref object. + * + * @example + * ```js + * // Creating a readonly computed ref: + * const count = ref(1) + * const plusOne = computed(() => count.value + 1) + * + * console.log(plusOne.value) // 2 + * plusOne.value++ // error + * ``` + * + * ```js + * // Creating a writable computed ref: + * const count = ref(1) + * const plusOne = computed({ + * get: () => count.value + 1, + * set: (val) => { + * count.value = val - 1 + * } + * }) + * + * plusOne.value = 1 + * console.log(count.value) // 0 + * ``` + * + * @param getter - Function that produces the next value. + * @param debugOptions - For debugging. See {@link https://vuejs.org/guide/extras/reactivity-in-depth.html#computed-debugging}. + * @see {@link https://vuejs.org/api/reactivity-core.html#computed} + */ +export declare function computed<T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>; +export declare function computed<T>(options: WritableComputedOptions<T>, debugOptions?: DebuggerOptions): WritableComputedRef<T>; + +export type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRefSimple<T>; +/** + * Returns a reactive proxy of the object. + * + * The reactive conversion is "deep": it affects all nested properties. A + * reactive object also deeply unwraps any properties that are refs while + * maintaining reactivity. + * + * @example + * ```js + * const obj = reactive({ count: 0 }) + * ``` + * + * @param target - The source object. + * @see {@link https://vuejs.org/api/reactivity-core.html#reactive} + */ +export declare function reactive<T extends object>(target: T): UnwrapNestedRefs<T>; +declare const ShallowReactiveMarker: unique symbol; +export type ShallowReactive<T> = T & { + [ShallowReactiveMarker]?: true; +}; +/** + * Shallow version of {@link reactive()}. + * + * Unlike {@link reactive()}, there is no deep conversion: only root-level + * properties are reactive for a shallow reactive object. Property values are + * stored and exposed as-is - this also means properties with ref values will + * not be automatically unwrapped. + * + * @example + * ```js + * const state = shallowReactive({ + * foo: 1, + * nested: { + * bar: 2 + * } + * }) + * + * // mutating state's own properties is reactive + * state.foo++ + * + * // ...but does not convert nested objects + * isReactive(state.nested) // false + * + * // NOT reactive + * state.nested.bar++ + * ``` + * + * @param target - The source object. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive} + */ +export declare function shallowReactive<T extends object>(target: T): ShallowReactive<T>; +type Primitive = string | number | boolean | bigint | symbol | undefined | null; +type Builtin = Primitive | Function | Date | Error | RegExp; +export type DeepReadonly<T> = T extends Builtin ? T : T extends Map<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<DeepReadonly<K>, DeepReadonly<V>> : T extends Set<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends ReadonlySet<infer U> ? ReadonlySet<DeepReadonly<U>> : T extends WeakSet<infer U> ? WeakSet<DeepReadonly<U>> : T extends Promise<infer U> ? Promise<DeepReadonly<U>> : T extends Ref<infer U> ? Readonly<Ref<DeepReadonly<U>>> : T extends {} ? { + readonly [K in keyof T]: DeepReadonly<T[K]>; +} : Readonly<T>; +/** + * Takes an object (reactive or plain) or a ref and returns a readonly proxy to + * the original. + * + * A readonly proxy is deep: any nested property accessed will be readonly as + * well. It also has the same ref-unwrapping behavior as {@link reactive()}, + * except the unwrapped values will also be made readonly. + * + * @example + * ```js + * const original = reactive({ count: 0 }) + * + * const copy = readonly(original) + * + * watchEffect(() => { + * // works for reactivity tracking + * console.log(copy.count) + * }) + * + * // mutating original will trigger watchers relying on the copy + * original.count++ + * + * // mutating the copy will fail and result in a warning + * copy.count++ // warning! + * ``` + * + * @param target - The source object. + * @see {@link https://vuejs.org/api/reactivity-core.html#readonly} */ export declare function readonly<T extends object>(target: T): DeepReadonly<UnwrapNestedRefs<T>>; +/** + * Shallow version of {@link readonly()}. + * + * Unlike {@link readonly()}, there is no deep conversion: only root-level + * properties are made readonly. Property values are stored and exposed as-is - + * this also means properties with ref values will not be automatically + * unwrapped. + * + * @example + * ```js + * const state = shallowReadonly({ + * foo: 1, + * nested: { + * bar: 2 + * } + * }) + * + * // mutating state's own properties will fail + * state.foo++ + * + * // ...but works on nested objects + * isReadonly(state.nested) // false + * + * // works + * state.nested.bar++ + * ``` + * + * @param target - The source object. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly} + */ +export declare function shallowReadonly<T extends object>(target: T): Readonly<T>; +/** + * Checks if an object is a proxy created by {@link reactive()} or + * {@link shallowReactive()} (or {@link ref()} in some cases). + * + * @example + * ```js + * isReactive(reactive({})) // => true + * isReactive(readonly(reactive({}))) // => true + * isReactive(ref({}).value) // => true + * isReactive(readonly(ref({})).value) // => true + * isReactive(ref(true)) // => false + * isReactive(shallowRef({}).value) // => false + * isReactive(shallowReactive({})) // => true + * ``` + * + * @param value - The value to check. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive} + */ +export declare function isReactive(value: unknown): boolean; +/** + * Checks whether the passed value is a readonly object. The properties of a + * readonly object can change, but they can't be assigned directly via the + * passed object. + * + * The proxies created by {@link readonly()} and {@link shallowReadonly()} are + * both considered readonly, as is a computed ref without a set function. + * + * @param value - The value to check. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly} + */ +export declare function isReadonly(value: unknown): boolean; +export declare function isShallow(value: unknown): boolean; +/** + * Checks if an object is a proxy created by {@link reactive}, + * {@link readonly}, {@link shallowReactive} or {@link shallowReadonly()}. + * + * @param value - The value to check. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy} + */ +export declare function isProxy(value: unknown): boolean; +/** + * Returns the raw, original object of a Vue-created proxy. + * + * `toRaw()` can return the original object from proxies created by + * {@link reactive()}, {@link readonly()}, {@link shallowReactive()} or + * {@link shallowReadonly()}. + * + * This is an escape hatch that can be used to temporarily read without + * incurring proxy access / tracking overhead or write without triggering + * changes. It is **not** recommended to hold a persistent reference to the + * original object. Use with caution. + * + * @example + * ```js + * const foo = {} + * const reactiveFoo = reactive(foo) + * + * console.log(toRaw(reactiveFoo) === foo) // true + * ``` + * + * @param observed - The object for which the "raw" value is requested. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw} + */ +export declare function toRaw<T>(observed: T): T; +export type Raw<T> = T & { + [RawSymbol]?: true; +}; +/** + * Marks an object so that it will never be converted to a proxy. Returns the + * object itself. + * + * @example + * ```js + * const foo = markRaw({}) + * console.log(isReactive(reactive(foo))) // false + * + * // also works when nested inside other reactive objects + * const bar = reactive({ foo }) + * console.log(isReactive(bar.foo)) // false + * ``` + * + * **Warning:** `markRaw()` together with the shallow APIs such as + * {@link shallowReactive()} allow you to selectively opt-out of the default + * deep reactive/readonly conversion and embed raw, non-proxied objects in your + * state graph. + * + * @param value - The object to be marked as "raw". + * @see {@link https://vuejs.org/api/reactivity-advanced.html#markraw} + */ +export declare function markRaw<T extends object>(value: T): Raw<T>; -export declare interface Ref<T = any> { +declare const RefSymbol: unique symbol; +declare const RawSymbol: unique symbol; +export interface Ref<T = any> { value: T; /** * Type differentiator only. @@ -197,15 +414,190 @@ export declare interface Ref<T = any> { */ [RefSymbol]: true; } - -export declare function ref<T extends object>(value: T): [T] extends [Ref] ? T : Ref<UnwrapRef<T>>; - +/** + * Checks if a value is a ref object. + * + * @param r - The value to inspect. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#isref} + */ +export declare function isRef<T>(r: Ref<T> | unknown): r is Ref<T>; +/** + * Takes an inner value and returns a reactive and mutable ref object, which + * has a single property `.value` that points to the inner value. + * + * @param value - The object to wrap in the ref. + * @see {@link https://vuejs.org/api/reactivity-core.html#ref} + */ export declare function ref<T>(value: T): Ref<UnwrapRef<T>>; - export declare function ref<T = any>(): Ref<T | undefined>; - -declare const RefSymbol: unique symbol; - +declare const ShallowRefMarker: unique symbol; +export type ShallowRef<T = any> = Ref<T> & { + [ShallowRefMarker]?: true; +}; +/** + * Shallow version of {@link ref()}. + * + * @example + * ```js + * const state = shallowRef({ count: 1 }) + * + * // does NOT trigger change + * state.value.count = 2 + * + * // does trigger change + * state.value = { count: 2 } + * ``` + * + * @param value - The "inner value" for the shallow ref. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowref} + */ +export declare function shallowRef<T>(value: T): Ref extends T ? T extends Ref ? IfAny<T, ShallowRef<T>, T> : ShallowRef<T> : ShallowRef<T>; +export declare function shallowRef<T = any>(): ShallowRef<T | undefined>; +/** + * Force trigger effects that depends on a shallow ref. This is typically used + * after making deep mutations to the inner value of a shallow ref. + * + * @example + * ```js + * const shallow = shallowRef({ + * greet: 'Hello, world' + * }) + * + * // Logs "Hello, world" once for the first run-through + * watchEffect(() => { + * console.log(shallow.value.greet) + * }) + * + * // This won't trigger the effect because the ref is shallow + * shallow.value.greet = 'Hello, universe' + * + * // Logs "Hello, universe" + * triggerRef(shallow) + * ``` + * + * @param ref - The ref whose tied effects shall be executed. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#triggerref} + */ +export declare function triggerRef(ref: Ref): void; +export type MaybeRef<T = any> = T | Ref<T>; +export type MaybeRefOrGetter<T = any> = MaybeRef<T> | (() => T); +/** + * Returns the inner value if the argument is a ref, otherwise return the + * argument itself. This is a sugar function for + * `val = isRef(val) ? val.value : val`. + * + * @example + * ```js + * function useFoo(x: number | Ref<number>) { + * const unwrapped = unref(x) + * // unwrapped is guaranteed to be number now + * } + * ``` + * + * @param ref - Ref or plain value to be converted into the plain value. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#unref} + */ +export declare function unref<T>(ref: MaybeRef<T> | ComputedRef<T>): T; +/** + * Normalizes values / refs / getters to values. + * This is similar to {@link unref()}, except that it also normalizes getters. + * If the argument is a getter, it will be invoked and its return value will + * be returned. + * + * @example + * ```js + * toValue(1) // 1 + * toValue(ref(1)) // 1 + * toValue(() => 1) // 1 + * ``` + * + * @param source - A getter, an existing ref, or a non-function value. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#tovalue} + */ +export declare function toValue<T>(source: MaybeRefOrGetter<T> | ComputedRef<T>): T; +/** + * Returns a reactive proxy for the given object. + * + * If the object already is reactive, it's returned as-is. If not, a new + * reactive proxy is created. Direct child properties that are refs are properly + * handled, as well. + * + * @param objectWithRefs - Either an already-reactive object or a simple object + * that contains refs. + */ +export declare function proxyRefs<T extends object>(objectWithRefs: T): ShallowUnwrapRef<T>; +export type CustomRefFactory<T> = (track: () => void, trigger: () => void) => { + get: () => T; + set: (value: T) => void; +}; +/** + * Creates a customized ref with explicit control over its dependency tracking + * and updates triggering. + * + * @param factory - The function that receives the `track` and `trigger` callbacks. + * @see {@link https://vuejs.org/api/reactivity-advanced.html#customref} + */ +export declare function customRef<T>(factory: CustomRefFactory<T>): Ref<T>; +export type ToRefs<T = any> = { + [K in keyof T]: ToRef<T[K]>; +}; +/** + * Converts a reactive object to a plain object where each property of the + * resulting object is a ref pointing to the corresponding property of the + * original object. Each individual ref is created using {@link toRef()}. + * + * @param object - Reactive object to be made into an object of linked refs. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs} + */ +export declare function toRefs<T extends object>(object: T): ToRefs<T>; +export type ToRef<T> = IfAny<T, Ref<T>, [T] extends [Ref] ? T : Ref<T>>; +/** + * Used to normalize values / refs / getters into refs. + * + * @example + * ```js + * // returns existing refs as-is + * toRef(existingRef) + * + * // creates a ref that calls the getter on .value access + * toRef(() => props.foo) + * + * // creates normal refs from non-function values + * // equivalent to ref(1) + * toRef(1) + * ``` + * + * Can also be used to create a ref for a property on a source reactive object. + * The created ref is synced with its source property: mutating the source + * property will update the ref, and vice-versa. + * + * @example + * ```js + * const state = reactive({ + * foo: 1, + * bar: 2 + * }) + * + * const fooRef = toRef(state, 'foo') + * + * // mutating the ref updates the original + * fooRef.value++ + * console.log(state.foo) // 2 + * + * // mutating the original also updates the ref + * state.foo++ + * console.log(fooRef.value) // 3 + * ``` + * + * @param source - A getter, an existing ref, a non-function value, or a + * reactive object to create a property ref from. + * @param [key] - (optional) Name of the property in the reactive object. + * @see {@link https://vuejs.org/api/reactivity-utilities.html#toref} + */ +export declare function toRef<T>(value: T): T extends () => infer R ? Readonly<Ref<R>> : T extends Ref ? T : Ref<UnwrapRef<T>>; +export declare function toRef<T extends object, K extends keyof T>(object: T, key: K): ToRef<T[K]>; +export declare function toRef<T extends object, K extends keyof T>(object: T, key: K, defaultValue: T[K]): ToRef<Exclude<T[K], undefined>>; +type BaseTypes = string | number | boolean; /** * This is a special exported interface for other packages to declare * additional types that should bail out for ref unwrapping. For example @@ -218,114 +610,17 @@ declare const RefSymbol: unique symbol; * } * } * ``` - * - * Note that api-extractor somehow refuses to include `declare module` - * augmentations in its generated d.ts, so we have to manually append them - * to the final generated d.ts in our build process. */ -export declare interface RefUnwrapBailTypes { +export interface RefUnwrapBailTypes { } - -export declare function resetTracking(): void; - -export declare type ShallowReactive<T> = T & { - [ShallowReactiveMarker]?: true; +export type ShallowUnwrapRef<T> = { + [K in keyof T]: DistrubuteRef<T[K]>; }; - -/** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ -export declare function shallowReactive<T extends object>(target: T): ShallowReactive<T>; - -declare const ShallowReactiveMarker: unique symbol; - -/** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ -export declare function shallowReadonly<T extends object>(target: T): Readonly<T>; - -export declare type ShallowRef<T = any> = Ref<T> & { - [ShallowRefMarker]?: true; -}; - -export declare function shallowRef<T extends object>(value: T): T extends Ref ? T : ShallowRef<T>; - -export declare function shallowRef<T>(value: T): ShallowRef<T>; - -export declare function shallowRef<T = any>(): ShallowRef<T | undefined>; - -declare const ShallowRefMarker: unique symbol; - -export declare type ShallowUnwrapRef<T> = { - [K in keyof T]: T[K] extends Ref<infer V> ? V : T[K] extends Ref<infer V> | undefined ? unknown extends V ? undefined : V | undefined : T[K]; -}; - -declare function stop_2(runner: ReactiveEffectRunner): void; -export { stop_2 as stop } - -export declare function toRaw<T>(observed: T): T; - -export declare type ToRef<T> = IfAny<T, Ref<T>, [T] extends [Ref] ? T : Ref<T>>; - -export declare function toRef<T extends object, K extends keyof T>(object: T, key: K): ToRef<T[K]>; - -export declare function toRef<T extends object, K extends keyof T>(object: T, key: K, defaultValue: T[K]): ToRef<Exclude<T[K], undefined>>; - -export declare type ToRefs<T = any> = { - [K in keyof T]: ToRef<T[K]>; -}; - -export declare function toRefs<T extends object>(object: T): ToRefs<T>; - -export declare function track(target: object, type: TrackOpTypes, key: unknown): void; - -/** - * wasTracked and newTracked maintain the status for several levels of effect - * tracking recursion. One bit per level is used to define whether the dependency - * was/is tracked. - */ -declare type TrackedMarkers = { - /** - * wasTracked - */ - w: number; - /** - * newTracked - */ - n: number; -}; - -export declare const enum TrackOpTypes { - GET = "get", - HAS = "has", - ITERATE = "iterate" -} - -export declare function trigger(target: object, type: TriggerOpTypes, key?: unknown, newValue?: unknown, oldValue?: unknown, oldTarget?: Map<unknown, unknown> | Set<unknown>): void; - -export declare const enum TriggerOpTypes { - SET = "set", - ADD = "add", - DELETE = "delete", - CLEAR = "clear" -} - -export declare function triggerRef(ref: Ref): void; - -export declare function unref<T>(ref: T | Ref<T>): T; - -export declare type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRefSimple<T>; - -export declare type UnwrapRef<T> = T extends ShallowRef<infer V> ? V : T extends Ref<infer V> ? UnwrapRefSimple<V> : UnwrapRefSimple<T>; - -declare type UnwrapRefSimple<T> = T extends Function | CollectionTypes | BaseTypes | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | { +type DistrubuteRef<T> = T extends Ref<infer V> ? V : T; +export type UnwrapRef<T> = T extends ShallowRef<infer V> ? V : T extends Ref<infer V> ? UnwrapRefSimple<V> : UnwrapRefSimple<T>; +type UnwrapRefSimple<T> = T extends Function | BaseTypes | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | { [RawSymbol]?: true; -} ? T : T extends Array<any> ? { +} ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Map<any, any>>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakMap<any, any>>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Set<any>>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>> : T extends ReadonlyArray<any> ? { [K in keyof T]: UnwrapRefSimple<T[K]>; } : T extends object & { [ShallowReactiveMarker]?: never; @@ -333,15 +628,30 @@ declare type UnwrapRefSimple<T> = T extends Function | CollectionTypes | BaseTyp [P in keyof T]: P extends symbol ? T[P] : UnwrapRef<T[P]>; } : T; -declare type WeakCollections = WeakMap<any, any> | WeakSet<any>; +/** + * @deprecated use `computed` instead. See #5912 + */ +export declare const deferredComputed: typeof computed; -export declare interface WritableComputedOptions<T> { - get: ComputedGetter<T>; - set: ComputedSetter<T>; -} +export declare const ITERATE_KEY: unique symbol; +/** + * Tracks access to a reactive property. + * + * This will check which effect is running at the moment and record it as dep + * which records all effects that depend on the reactive property. + * + * @param target - Object holding the reactive property. + * @param type - Defines the type of access to the reactive property. + * @param key - Identifier of the reactive property to track. + */ +export declare function track(target: object, type: TrackOpTypes, key: unknown): void; +/** + * Finds all deps associated with the target (or a specific property) and + * triggers the effects stored within. + * + * @param target - The reactive object. + * @param type - Defines the type of the operation that needs to trigger effects. + * @param key - Can be used to target a specific reactive property in the target object. + */ +export declare function trigger(target: object, type: TriggerOpTypes, key?: unknown, newValue?: unknown, oldValue?: unknown, oldTarget?: Map<unknown, unknown> | Set<unknown>): void; -export declare interface WritableComputedRef<T> extends Ref<T> { - readonly effect: ReactiveEffect<T>; -} - -export { } diff --git a/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js b/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js index a4ff3d41..0450860e 100644 --- a/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js +++ b/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js @@ -1,1292 +1,1275 @@ /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ +* @vue/reactivity v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } -Object.freeze({}) - ; -Object.freeze([]) ; +const NOOP = () => { +}; const extend = Object.assign; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === '[object Map]'; -const isFunction = (val) => typeof val === 'function'; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; -const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -// compare whether a value has changed, accounting for NaN. +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); }; function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } -const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -const wasTracked = (dep) => (dep.w & trackOpBit) > 0; -const newTracked = (dep) => (dep.n & trackOpBit) > 0; -const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } -}; -const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } -}; - -const targetMap = new WeakMap(); -// The number of effects currently being tracked recursively. -let effectTrackDepth = 0; -let trackOpBit = 1; -/** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ -const maxMarkerBits = 30; let activeEffect; -const ITERATE_KEY = Symbol('iterate' ); -const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } -function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; +function triggerComputed(computed) { + return computed.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; +let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; + trackStack.push(shouldTrack); + shouldTrack = true; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } +function pauseScheduling() { + pauseScheduleStack++; } -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } +} +const queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } -function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } -} -function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } +function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } -const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); +const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; +}; + +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol("iterate" ); +const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( -/*#__PURE__*/ -Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); -const get = /*#__PURE__*/ createGetter(); -const shallowGet = /*#__PURE__*/ createGetter(false, true); -const readonlyGet = /*#__PURE__*/ createGetter(true); -const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); -const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; -} -const set = /*#__PURE__*/ createSetter(); -const shallowSet = /*#__PURE__*/ createSetter(true); -function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } -function deleteProperty(target, key) { +function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; -} -function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; -} -function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } -const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys -}; -const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } -}; -const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet -}); -// Props handlers are special in the sense that it should not unwrap top-level -// refs (in order to allow refs to be explicitly passed down), but should -// retain the reactivity of the normal readonly object. -const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet -}); + return true; + } + deleteProperty(target, key) { + { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true +); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); -function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); +function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } -function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); +function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } -function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } -const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } -const reactiveMap = new WeakMap(); -const shallowReactiveMap = new WeakMap(); -const readonlyMap = new WeakMap(); -const shallowReadonlyMap = new WeakMap(); +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } -/** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } -/** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } -/** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } -function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; -function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } - } -} -function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } -} -function isRef(r) { - return !!(r && r.__v_isRef === true); -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } -} -function triggerRef(ref) { - triggerRefValue(ref, ref.value ); -} -function unref(ref) { - return isRef(ref) ? ref.value : ref; -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } -} -function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); -} - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; } -var _a; -const tick = /*#__PURE__*/ Promise.resolve(); -const queue = []; -let queued = false; -const scheduler = (fn) => { - queue.push(fn); - if (!queued) { - queued = true; - tick.then(flush); - } -}; -const flush = () => { - for (let i = 0; i < queue.length; i++) { - queue[i](); - } - queue.length = 0; - queued = false; -}; -class DeferredComputedRefImpl { - constructor(getter) { - this.dep = undefined; - this._dirty = true; - this.__v_isRef = true; - this[_a] = true; - let compareTarget; - let hasCompareTarget = false; - let scheduled = false; - this.effect = new ReactiveEffect(getter, (computedTrigger) => { - if (this.dep) { - if (computedTrigger) { - compareTarget = this._value; - hasCompareTarget = true; - } - else if (!scheduled) { - const valueToCompare = hasCompareTarget ? compareTarget : this._value; - scheduled = true; - hasCompareTarget = false; - scheduler(() => { - if (this.effect.active && this._get() !== valueToCompare) { - triggerRefValue(this); - } - scheduled = false; - }); - } - // chained upstream computeds are notified synchronously to ensure - // value invalidation in case of sync access; normal effects are - // deferred to be triggered in scheduler. - for (const e of this.dep) { - if (e.computed instanceof DeferredComputedRefImpl) { - e.scheduler(true /* computedTrigger */); - } - } - } - this._dirty = true; - }); - this.effect.computed = this; - } - _get() { - if (this._dirty) { - this._dirty = false; - return (this._value = this.effect.run()); - } - return this._value; - } - get value() { - trackRefValue(this); - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - return toRaw(this)._get(); - } +function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } } -_a = "__v_isReadonly" /* IS_READONLY */; -function deferredComputed(getter) { - return new DeferredComputedRefImpl(getter); +function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } +} +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); + } + } +} +function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); } -export { EffectScope, ITERATE_KEY, ReactiveEffect, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, triggerRef, unref }; +const deferredComputed = computed; + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; +const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw" +}; + +export { EffectScope, ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseScheduling, pauseTracking, proxyRefs, reactive, readonly, ref, resetScheduling, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref }; diff --git a/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js b/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js index b51b0628..fb98decd 100644 --- a/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js +++ b/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js @@ -1 +1,6 @@ -function t(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const e=()=>{},n=Object.assign,s=Object.prototype.hasOwnProperty,i=(t,e)=>s.call(t,e),r=Array.isArray,c=t=>"[object Map]"===l(t),o=t=>"symbol"==typeof t,u=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),a=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,f=(t,e)=>!Object.is(t,e);let _;class p{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&_&&(this.parent=_,this.index=(_.scopes||(_.scopes=[])).push(this)-1)}run(t){if(this.active){const e=_;try{return _=this,t()}finally{_=e}}}on(){_=this}off(){_=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.active=!1}}}function d(t){return new p(t)}function v(t,e=_){e&&e.active&&e.effects.push(t)}function g(){return _}function y(t){_&&_.cleanups.push(t)}const w=t=>{const e=new Set(t);return e.w=0,e.n=0,e},b=t=>(t.w&k)>0,R=t=>(t.n&k)>0,S=new WeakMap;let m=0,k=1;let j;const O=Symbol(""),x=Symbol("");class E{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=j,e=W;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=j,j=this,W=!0,k=1<<++m,m<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=k})(this):P(this),this.fn()}finally{m<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];b(i)&&!R(i)?i.delete(t):e[n++]=i,i.w&=~k,i.n&=~k}e.length=n}})(this),k=1<<--m,j=this.parent,W=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){j===this?this.deferStop=!0:this.active&&(P(this),this.onStop&&this.onStop(),this.active=!1)}}function P(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}function M(t,e){t.effect&&(t=t.effect.fn);const s=new E(t);e&&(n(s,e),e.scope&&v(s,e.scope)),e&&e.lazy||s.run();const i=s.run.bind(s);return i.effect=s,i}function z(t){t.effect.stop()}let W=!0;const V=[];function A(){V.push(W),W=!1}function N(){V.push(W),W=!0}function I(){const t=V.pop();W=void 0===t||t}function K(t,e,n){if(W&&j){let e=S.get(t);e||S.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=w()),C(s)}}function C(t,e){let n=!1;m<=30?R(t)||(t.n|=k,n=!b(t)):n=!t.has(j),n&&(t.add(j),j.deps.push(t))}function L(t,e,n,s,i,o){const u=S.get(t);if(!u)return;let h=[];if("clear"===e)h=[...u.values()];else if("length"===n&&r(t))u.forEach(((t,e)=>{("length"===e||e>=s)&&h.push(t)}));else switch(void 0!==n&&h.push(u.get(n)),e){case"add":r(t)?a(n)&&h.push(u.get("length")):(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"delete":r(t)||(h.push(u.get(O)),c(t)&&h.push(u.get(x)));break;case"set":c(t)&&h.push(u.get(O))}if(1===h.length)h[0]&&q(h[0]);else{const t=[];for(const e of h)e&&t.push(...e);q(w(t))}}function q(t,e){const n=r(t)?t:[...t];for(const s of n)s.computed&&B(s);for(const s of n)s.computed||B(s)}function B(t,e){(t!==j||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const D=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(o)),G=X(),H=X(!1,!0),J=X(!0),Q=X(!0,!0),T=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Ct(this);for(let e=0,i=this.length;e<i;e++)K(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Ct)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A();const n=Ct(this)[e].apply(this,t);return I(),n}})),t}function X(t=!1,e=!1){return function(n,s,c){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&c===(t?e?xt:Ot:e?jt:kt).get(n))return n;const h=r(n);if(!t&&h&&i(T,s))return Reflect.get(T,s,c);const l=Reflect.get(n,s,c);return(o(s)?F.has(s):D(s))?l:(t||K(n,0,s),e?l:Gt(l)?h&&a(s)?l:l.value:u(l)?t?zt(l):Pt(l):l)}}function Y(t=!1){return function(e,n,s,c){let o=e[n];if(Nt(o)&&Gt(o)&&!Gt(s))return!1;if(!t&&!Nt(s)&&(It(s)||(s=Ct(s),o=Ct(o)),!r(e)&&Gt(o)&&!Gt(s)))return o.value=s,!0;const u=r(e)&&a(n)?Number(n)<e.length:i(e,n),h=Reflect.set(e,n,s,c);return e===Ct(c)&&(u?f(s,o)&&L(e,"set",n,s):L(e,"add",n,s)),h}}const Z={get:G,set:Y(),deleteProperty:function(t,e){const n=i(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&L(t,"delete",e,void 0),s},has:function(t,e){const n=Reflect.has(t,e);return o(e)&&F.has(e)||K(t,0,e),n},ownKeys:function(t){return K(t,0,r(t)?"length":O),Reflect.ownKeys(t)}},$={get:J,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},tt=n({},Z,{get:H,set:Y(!0)}),et=n({},$,{get:Q}),nt=t=>t,st=t=>Reflect.getPrototypeOf(t);function it(t,e,n=!1,s=!1){const i=Ct(t=t.__v_raw),r=Ct(e);n||(e!==r&&K(i,0,e),K(i,0,r));const{has:c}=st(i),o=s?nt:n?Bt:qt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function rt(t,e=!1){const n=this.__v_raw,s=Ct(n),i=Ct(t);return e||(t!==i&&K(s,0,t),K(s,0,i)),t===i?n.has(t):n.has(t)||n.has(i)}function ct(t,e=!1){return t=t.__v_raw,!e&&K(Ct(t),0,O),Reflect.get(t,"size",t)}function ot(t){t=Ct(t);const e=Ct(this);return st(e).has.call(e,t)||(e.add(t),L(e,"add",t,t)),this}function ut(t,e){e=Ct(e);const n=Ct(this),{has:s,get:i}=st(n);let r=s.call(n,t);r||(t=Ct(t),r=s.call(n,t));const c=i.call(n,t);return n.set(t,e),r?f(e,c)&&L(n,"set",t,e):L(n,"add",t,e),this}function ht(t){const e=Ct(this),{has:n,get:s}=st(e);let i=n.call(e,t);i||(t=Ct(t),i=n.call(e,t)),s&&s.call(e,t);const r=e.delete(t);return i&&L(e,"delete",t,void 0),r}function lt(){const t=Ct(this),e=0!==t.size,n=t.clear();return e&&L(t,"clear",void 0,void 0),n}function at(t,e){return function(n,s){const i=this,r=i.__v_raw,c=Ct(r),o=e?nt:t?Bt:qt;return!t&&K(c,0,O),r.forEach(((t,e)=>n.call(s,o(t),o(e),i)))}}function ft(t,e,n){return function(...s){const i=this.__v_raw,r=Ct(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,h="keys"===t&&o,l=i[t](...s),a=n?nt:e?Bt:qt;return!e&&K(r,0,h?x:O),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[a(t[0]),a(t[1])]:a(t),done:e}},[Symbol.iterator](){return this}}}}function _t(t){return function(...e){return"delete"!==t&&this}}function pt(){const t={get(t){return it(this,t)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:lt,forEach:at(!1,!1)},e={get(t){return it(this,t,!1,!0)},get size(){return ct(this)},has:rt,add:ot,set:ut,delete:ht,clear:lt,forEach:at(!1,!0)},n={get(t){return it(this,t,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:at(!0,!1)},s={get(t){return it(this,t,!0,!0)},get size(){return ct(this,!0)},has(t){return rt.call(this,t,!0)},add:_t("add"),set:_t("set"),delete:_t("delete"),clear:_t("clear"),forEach:at(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=ft(i,!1,!1),n[i]=ft(i,!0,!1),e[i]=ft(i,!1,!0),s[i]=ft(i,!0,!0)})),[t,n,e,s]}const[dt,vt,gt,yt]=pt();function wt(t,e){const n=e?t?yt:gt:t?vt:dt;return(e,s,r)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(i(n,s)&&s in e?n:e,s,r)}const bt={get:wt(!1,!1)},Rt={get:wt(!1,!0)},St={get:wt(!0,!1)},mt={get:wt(!0,!0)},kt=new WeakMap,jt=new WeakMap,Ot=new WeakMap,xt=new WeakMap;function Et(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>l(t).slice(8,-1))(t))}function Pt(t){return Nt(t)?t:Vt(t,!1,Z,bt,kt)}function Mt(t){return Vt(t,!1,tt,Rt,jt)}function zt(t){return Vt(t,!0,$,St,Ot)}function Wt(t){return Vt(t,!0,et,mt,xt)}function Vt(t,e,n,s,i){if(!u(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=Et(t);if(0===c)return t;const o=new Proxy(t,2===c?s:n);return i.set(t,o),o}function At(t){return Nt(t)?At(t.__v_raw):!(!t||!t.__v_isReactive)}function Nt(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Kt(t){return At(t)||Nt(t)}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}function Lt(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t}const qt=t=>u(t)?Pt(t):t,Bt=t=>u(t)?zt(t):t;function Dt(t){W&&j&&C((t=Ct(t)).dep||(t.dep=w()))}function Ft(t,e){(t=Ct(t)).dep&&q(t.dep)}function Gt(t){return!(!t||!0!==t.__v_isRef)}function Ht(t){return Qt(t,!1)}function Jt(t){return Qt(t,!0)}function Qt(t,e){return Gt(t)?t:new Tt(t,e)}class Tt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ct(t),this._value=e?t:qt(t)}get value(){return Dt(this),this._value}set value(t){t=this.__v_isShallow?t:Ct(t),f(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:qt(t),Ft(this))}}function Ut(t){Ft(t)}function Xt(t){return Gt(t)?t.value:t}const Yt={get:(t,e,n)=>Xt(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Gt(i)&&!Gt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function Zt(t){return At(t)?t:new Proxy(t,Yt)}class $t{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Dt(this)),(()=>Ft(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}function te(t){return new $t(t)}function ee(t){const e=r(t)?new Array(t.length):{};for(const n in t)e[n]=se(t,n);return e}class ne{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}}function se(t,e,n){const s=t[e];return Gt(s)?s:new ne(t,e,n)}class ie{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new E(t,(()=>{this._dirty||(this._dirty=!0,Ft(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Ct(this);return Dt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function re(t,n,s=!1){let i,r;const c="function"==typeof t;c?(i=t,r=e):(i=t.get,r=t.set);return new ie(i,r,c||!r,s)}var ce;const oe=Promise.resolve(),ue=[];let he=!1;const le=()=>{for(let t=0;t<ue.length;t++)ue[t]();ue.length=0,he=!1};class ae{constructor(t){let e;this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this[ce]=!0;let n=!1,s=!1;this.effect=new E(t,(t=>{if(this.dep){if(t)e=this._value,n=!0;else if(!s){const t=n?e:this._value;s=!0,n=!1,ue.push((()=>{this.effect.active&&this._get()!==t&&Ft(this),s=!1})),he||(he=!0,oe.then(le))}for(const t of this.dep)t.computed instanceof ae&&t.scheduler(!0)}this._dirty=!0})),this.effect.computed=this}_get(){return this._dirty?(this._dirty=!1,this._value=this.effect.run()):this._value}get value(){return Dt(this),Ct(this)._get()}}function fe(t){return new ae(t)}ce="__v_isReadonly";export{p as EffectScope,O as ITERATE_KEY,E as ReactiveEffect,re as computed,te as customRef,fe as deferredComputed,M as effect,d as effectScope,N as enableTracking,g as getCurrentScope,Kt as isProxy,At as isReactive,Nt as isReadonly,Gt as isRef,It as isShallow,Lt as markRaw,y as onScopeDispose,A as pauseTracking,Zt as proxyRefs,Pt as reactive,zt as readonly,Ht as ref,I as resetTracking,Mt as shallowReactive,Wt as shallowReadonly,Jt as shallowRef,z as stop,Ct as toRaw,se as toRef,ee as toRefs,K as track,L as trigger,Ut as triggerRef,Xt as unref}; +/** +* @vue/reactivity v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +function t(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const e=()=>{},s=Object.assign,n=Object.prototype.hasOwnProperty,i=(t,e)=>n.call(t,e),r=Array.isArray,c=t=>"[object Map]"===l(t),o=t=>"function"==typeof t,u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),_=t=>l(t).slice(8,-1),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);let p,v;class g{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!t&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=p;try{return p=this,t()}finally{p=e}}}on(){p=this}off(){p=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function y(t){return new g(t)}function w(t,e=p){e&&e.active&&e.effects.push(t)}function R(){return p}function b(t){p&&p.cleanups.push(t)}class S{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){A();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(k(e.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),W()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=I,e=v;try{return I=!0,v=this,this._runnings++,L(this),this.fn()}finally{E(this),this._runnings--,v=e,I=t}}stop(){var t;this.active&&(L(this),E(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function k(t){return t.value}function L(t){t._trackId++,t._depsLength=0}function E(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)O(t.deps[e],t);t.deps.length=t._depsLength}}function O(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}function m(t,n){t.effect instanceof S&&(t=t.effect.fn);const i=new S(t,e,(()=>{i.dirty&&i.run()}));n&&(s(i,n),n.scope&&w(i,n.scope)),n&&n.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r}function j(t){t.effect.stop()}let I=!0,x=0;const P=[];function A(){P.push(I),I=!1}function M(){P.push(I),I=!0}function W(){const t=P.pop();I=void 0===t||t}function z(){x++}function V(){for(x--;!x&&T.length;)T.shift()()}function N(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&O(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const T=[];function D(t,e,s){z();for(const n of t.keys())if(n._dirtyLevel<e&&t.get(n)===n._trackId){const t=n._dirtyLevel;n._dirtyLevel=e,0===t&&(n._shouldSchedule=!0,n.trigger())}C(t),V()}function C(t){for(const e of t.keys())e.scheduler&&e._shouldSchedule&&(!e._runnings||e.allowRecurse)&&t.get(e)===e._trackId&&(e._shouldSchedule=!1,T.push(e.scheduler))}const K=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},H=new WeakMap,G=Symbol(""),Y=Symbol("");function q(t,e,s){if(I&&v){let e=H.get(t);e||H.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=K((()=>e.delete(s)))),N(v,n)}}function B(t,e,s,n,i,o){const a=H.get(t);if(!a)return;let h=[];if("clear"===e)h=[...a.values()];else if("length"===s&&r(t)){const t=Number(n);a.forEach(((e,s)=>{("length"===s||!u(s)&&s>=t)&&h.push(e)}))}else switch(void 0!==s&&h.push(a.get(s)),e){case"add":r(t)?f(s)&&h.push(a.get("length")):(h.push(a.get(G)),c(t)&&h.push(a.get(Y)));break;case"delete":r(t)||(h.push(a.get(G)),c(t)&&h.push(a.get(Y)));break;case"set":c(t)&&h.push(a.get(G))}z();for(const r of h)r&&D(r,2);V()}const F=t("__proto__,__v_isRef,__isVue"),J=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),Q=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Ct(this);for(let e=0,i=this.length;e<i;e++)q(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Ct)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A(),z();const s=Ct(this)[e].apply(this,t);return V(),W(),s}})),t}function X(t){const e=Ct(this);return q(e,0,t),e.hasOwnProperty(t)}class Z{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,c=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return c;if("__v_raw"===e)return s===(n?c?xt:It:c?jt:mt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){if(o&&i(Q,e))return Reflect.get(Q,e,s);if("hasOwnProperty"===e)return X}const h=Reflect.get(t,e,s);return(u(e)?J.has(e):F(e))?h:(n||q(t,0,e),c?h:Jt(h)?o&&f(e)?h:h.value:a(h)?n?Mt(h):Pt(h):h)}}class $ extends Z{constructor(t=!1){super(!1,t)}set(t,e,s,n){let c=t[e];if(!this._shallow){const e=Nt(c);if(Tt(s)||Nt(s)||(c=Ct(c),s=Ct(s)),!r(t)&&Jt(c)&&!Jt(s))return!e&&(c.value=s,!0)}const o=r(t)&&f(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Ct(n)&&(o?d(s,c)&&B(t,"set",e,s):B(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&B(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&J.has(e)||q(t,0,e),s}ownKeys(t){return q(t,0,r(t)?"length":G),Reflect.ownKeys(t)}}class tt extends Z{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const et=new $,st=new tt,nt=new $(!0),it=new tt(!0),rt=t=>t,ct=t=>Reflect.getPrototypeOf(t);function ot(t,e,s=!1,n=!1){const i=Ct(t=t.__v_raw),r=Ct(e);s||(d(e,r)&&q(i,0,e),q(i,0,r));const{has:c}=ct(i),o=n?rt:s?Gt:Ht;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function ut(t,e=!1){const s=this.__v_raw,n=Ct(s),i=Ct(t);return e||(d(t,i)&&q(n,0,t),q(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function at(t,e=!1){return t=t.__v_raw,!e&&q(Ct(t),0,G),Reflect.get(t,"size",t)}function ht(t){t=Ct(t);const e=Ct(this);return ct(e).has.call(e,t)||(e.add(t),B(e,"add",t,t)),this}function lt(t,e){e=Ct(e);const s=Ct(this),{has:n,get:i}=ct(s);let r=n.call(s,t);r||(t=Ct(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?d(e,c)&&B(s,"set",t,e):B(s,"add",t,e),this}function _t(t){const e=Ct(this),{has:s,get:n}=ct(e);let i=s.call(e,t);i||(t=Ct(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&B(e,"delete",t,void 0),r}function ft(){const t=Ct(this),e=0!==t.size,s=t.clear();return e&&B(t,"clear",void 0,void 0),s}function dt(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Ct(r),o=e?rt:t?Gt:Ht;return!t&&q(c,0,G),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function pt(t,e,s){return function(...n){const i=this.__v_raw,r=Ct(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,a="keys"===t&&o,h=i[t](...n),l=s?rt:e?Gt:Ht;return!e&&q(r,0,a?Y:G),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function vt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function gt(){const t={get(t){return ot(this,t)},get size(){return at(this)},has:ut,add:ht,set:lt,delete:_t,clear:ft,forEach:dt(!1,!1)},e={get(t){return ot(this,t,!1,!0)},get size(){return at(this)},has:ut,add:ht,set:lt,delete:_t,clear:ft,forEach:dt(!1,!0)},s={get(t){return ot(this,t,!0)},get size(){return at(this,!0)},has(t){return ut.call(this,t,!0)},add:vt("add"),set:vt("set"),delete:vt("delete"),clear:vt("clear"),forEach:dt(!0,!1)},n={get(t){return ot(this,t,!0,!0)},get size(){return at(this,!0)},has(t){return ut.call(this,t,!0)},add:vt("add"),set:vt("set"),delete:vt("delete"),clear:vt("clear"),forEach:dt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=pt(i,!1,!1),s[i]=pt(i,!0,!1),e[i]=pt(i,!1,!0),n[i]=pt(i,!0,!0)})),[t,s,e,n]}const[yt,wt,Rt,bt]=gt();function St(t,e){const s=e?t?bt:Rt:t?wt:yt;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const kt={get:St(!1,!1)},Lt={get:St(!1,!0)},Et={get:St(!0,!1)},Ot={get:St(!0,!0)},mt=new WeakMap,jt=new WeakMap,It=new WeakMap,xt=new WeakMap;function Pt(t){return Nt(t)?t:zt(t,!1,et,kt,mt)}function At(t){return zt(t,!1,nt,Lt,jt)}function Mt(t){return zt(t,!0,st,Et,It)}function Wt(t){return zt(t,!0,it,Ot,xt)}function zt(t,e,s,n,i){if(!a(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function Vt(t){return Nt(t)?Vt(t.__v_raw):!(!t||!t.__v_isReactive)}function Nt(t){return!(!t||!t.__v_isReadonly)}function Tt(t){return!(!t||!t.__v_isShallow)}function Dt(t){return Vt(t)||Nt(t)}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}function Kt(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t}const Ht=t=>a(t)?Pt(t):t,Gt=t=>a(t)?Mt(t):t;class Yt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new S((()=>t(this._value)),(()=>Ft(this,1)),(()=>this.dep&&C(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Ct(this);return t._cacheable&&!t.effect.dirty||d(t._value,t._value=t.effect.run())&&Ft(t,2),Bt(t),t.effect._dirtyLevel>=1&&Ft(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function qt(t,s,n=!1){let i,r;const c=o(t);c?(i=t,r=e):(i=t.get,r=t.set);return new Yt(i,r,c||!r,n)}function Bt(t){I&&v&&(t=Ct(t),N(v,t.dep||(t.dep=K((()=>t.dep=void 0),t instanceof Yt?t:void 0))))}function Ft(t,e=2,s){const n=(t=Ct(t)).dep;n&&D(n,e)}function Jt(t){return!(!t||!0!==t.__v_isRef)}function Qt(t){return Xt(t,!1)}function Ut(t){return Xt(t,!0)}function Xt(t,e){return Jt(t)?t:new Zt(t,e)}class Zt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ct(t),this._value=e?t:Ht(t)}get value(){return Bt(this),this._value}set value(t){const e=this.__v_isShallow||Tt(t)||Nt(t);t=e?t:Ct(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Ht(t),Ft(this,2))}}function $t(t){Ft(t,2)}function te(t){return Jt(t)?t.value:t}function ee(t){return o(t)?t():te(t)}const se={get:(t,e,s)=>te(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Jt(i)&&!Jt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function ne(t){return Vt(t)?t:new Proxy(t,se)}class ie{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Bt(this)),(()=>Ft(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function re(t){return new ie(t)}function ce(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=he(t,s);return e}class oe{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Ct(this._object),e=this._key,null==(s=H.get(t))?void 0:s.get(e);var t,e,s}}class ue{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ae(t,e,s){return Jt(t)?t:o(t)?new ue(t):a(t)&&arguments.length>1?he(t,e,s):Qt(t)}function he(t,e,s){const n=t[e];return Jt(n)?n:new oe(t,e,s)}const le=qt,_e={GET:"get",HAS:"has",ITERATE:"iterate"},fe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},de={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"};export{g as EffectScope,G as ITERATE_KEY,S as ReactiveEffect,de as ReactiveFlags,_e as TrackOpTypes,fe as TriggerOpTypes,qt as computed,re as customRef,le as deferredComputed,m as effect,y as effectScope,M as enableTracking,R as getCurrentScope,Dt as isProxy,Vt as isReactive,Nt as isReadonly,Jt as isRef,Tt as isShallow,Kt as markRaw,b as onScopeDispose,z as pauseScheduling,A as pauseTracking,ne as proxyRefs,Pt as reactive,Mt as readonly,Qt as ref,V as resetScheduling,W as resetTracking,At as shallowReactive,Wt as shallowReadonly,Ut as shallowRef,j as stop,Ct as toRaw,ae as toRef,ce as toRefs,ee as toValue,q as track,B as trigger,$t as triggerRef,te as unref}; diff --git a/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js b/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js index 8990bb2b..224dd365 100644 --- a/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +++ b/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js @@ -1,1251 +1,1236 @@ -import { extend, isArray, isMap, isIntegerKey, hasOwn, isSymbol, isObject, hasChanged, makeMap, capitalize, toRawType, def, isFunction, NOOP } from '@vue/shared'; +/** +* @vue/reactivity v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { NOOP, extend, isArray, isSymbol, isMap, isIntegerKey, hasOwn, hasChanged, isObject, makeMap, capitalize, toRawType, def, isFunction } from '@vue/shared'; function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } -const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -const wasTracked = (dep) => (dep.w & trackOpBit) > 0; -const newTracked = (dep) => (dep.n & trackOpBit) > 0; -const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } -}; -const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } -}; - -const targetMap = new WeakMap(); -// The number of effects currently being tracked recursively. -let effectTrackDepth = 0; -let trackOpBit = 1; -/** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ -const maxMarkerBits = 30; let activeEffect; -const ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'iterate' : ''); -const MAP_KEY_ITERATE_KEY = Symbol((process.env.NODE_ENV !== 'production') ? 'Map key iterate' : ''); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } -function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; +function triggerComputed(computed) { + return computed.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; +let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; + trackStack.push(shouldTrack); + shouldTrack = true; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = (process.env.NODE_ENV !== 'production') - ? { effect: activeEffect, target, type, key } - : undefined; - trackEffects(dep, eventInfo); - } +function pauseScheduling() { + pauseScheduleStack++; } -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if ((process.env.NODE_ENV !== 'production') && activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; - } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = (process.env.NODE_ENV !== 'production') - ? { target, type, key, newValue, oldValue, oldTarget } - : undefined; - if (deps.length === 1) { - if (deps[0]) { - if ((process.env.NODE_ENV !== 'production')) { - triggerEffects(deps[0], eventInfo); - } - else { - triggerEffects(deps[0]); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } - if ((process.env.NODE_ENV !== 'production')) { - triggerEffects(createDep(effects), eventInfo); - } - else { - triggerEffects(createDep(effects)); - } + if (!!(process.env.NODE_ENV !== "production")) { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + } } -function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); +const queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; + if (!!(process.env.NODE_ENV !== "production")) { + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } -function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if ((process.env.NODE_ENV !== 'production') && effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } +function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } -const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); +const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; +}; + +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== "production") ? "iterate" : ""); +const MAP_KEY_ITERATE_KEY = Symbol(!!(process.env.NODE_ENV !== "production") ? "Map key iterate" : ""); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + !!(process.env.NODE_ENV !== "production") ? { + target, + type, + key + } : void 0 + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + !!(process.env.NODE_ENV !== "production") ? { + target, + type, + key, + newValue, + oldValue, + oldTarget + } : void 0 + ); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( -/*#__PURE__*/ -Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); -const get = /*#__PURE__*/ createGetter(); -const shallowGet = /*#__PURE__*/ createGetter(false, true); -const readonlyGet = /*#__PURE__*/ createGetter(true); -const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); -const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; -} -const set = /*#__PURE__*/ createSetter(); -const shallowSet = /*#__PURE__*/ createSetter(true); -function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } -function deleteProperty(target, key) { +function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; -} -function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; -} -function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } -const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys -}; -const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - if ((process.env.NODE_ENV !== 'production')) { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - if ((process.env.NODE_ENV !== 'production')) { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + if (!!(process.env.NODE_ENV !== "production")) { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } -}; -const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet -}); -// Props handlers are special in the sense that it should not unwrap top-level -// refs (in order to allow refs to be explicitly passed down), but should -// retain the reactivity of the normal readonly object. -const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet -}); + return true; + } + deleteProperty(target, key) { + if (!!(process.env.NODE_ENV !== "production")) { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true +); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); -function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); +function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } -function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); +function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } -function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else if ((process.env.NODE_ENV !== 'production')) { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else if (!!(process.env.NODE_ENV !== "production")) { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else if ((process.env.NODE_ENV !== 'production')) { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else if (!!(process.env.NODE_ENV !== "production")) { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = (process.env.NODE_ENV !== 'production') - ? isMap(target) - ? new Map(target) - : new Set(target) - : undefined; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - if ((process.env.NODE_ENV !== 'production')) { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + if (!!(process.env.NODE_ENV !== "production")) { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } -const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } -const reactiveMap = new WeakMap(); -const shallowReactiveMap = new WeakMap(); -const readonlyMap = new WeakMap(); -const shallowReadonlyMap = new WeakMap(); +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } -/** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } -/** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } -/** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } -function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - if ((process.env.NODE_ENV !== 'production')) { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + if (!!(process.env.NODE_ENV !== "production")) { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; -function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - if ((process.env.NODE_ENV !== 'production')) { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } - else { - trackEffects(ref.dep || (ref.dep = createDep())); - } - } -} -function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - if ((process.env.NODE_ENV !== 'production')) { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - else { - triggerEffects(ref.dep); - } - } -} -function isRef(r) { - return !!(r && r.__v_isRef === true); -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } -} -function triggerRef(ref) { - triggerRefValue(ref, (process.env.NODE_ENV !== 'production') ? ref.value : void 0); -} -function unref(ref) { - return isRef(ref) ? ref.value : ref; -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if ((process.env.NODE_ENV !== 'production') && !isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } -} -function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); -} - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = (process.env.NODE_ENV !== 'production') - ? () => { - console.warn('Write operation failed: computed value is readonly'); - } - : NOOP; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if ((process.env.NODE_ENV !== 'production') && debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = !!(process.env.NODE_ENV !== "production") ? () => { + console.warn("Write operation failed: computed value is readonly"); + } : NOOP; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (!!(process.env.NODE_ENV !== "production") && debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; } -var _a; -const tick = /*#__PURE__*/ Promise.resolve(); -const queue = []; -let queued = false; -const scheduler = (fn) => { - queue.push(fn); - if (!queued) { - queued = true; - tick.then(flush); - } -}; -const flush = () => { - for (let i = 0; i < queue.length; i++) { - queue[i](); - } - queue.length = 0; - queued = false; -}; -class DeferredComputedRefImpl { - constructor(getter) { - this.dep = undefined; - this._dirty = true; - this.__v_isRef = true; - this[_a] = true; - let compareTarget; - let hasCompareTarget = false; - let scheduled = false; - this.effect = new ReactiveEffect(getter, (computedTrigger) => { - if (this.dep) { - if (computedTrigger) { - compareTarget = this._value; - hasCompareTarget = true; - } - else if (!scheduled) { - const valueToCompare = hasCompareTarget ? compareTarget : this._value; - scheduled = true; - hasCompareTarget = false; - scheduler(() => { - if (this.effect.active && this._get() !== valueToCompare) { - triggerRefValue(this); - } - scheduled = false; - }); - } - // chained upstream computeds are notified synchronously to ensure - // value invalidation in case of sync access; normal effects are - // deferred to be triggered in scheduler. - for (const e of this.dep) { - if (e.computed instanceof DeferredComputedRefImpl) { - e.scheduler(true /* computedTrigger */); - } - } - } - this._dirty = true; - }); - this.effect.computed = this; - } - _get() { - if (this._dirty) { - this._dirty = false; - return (this._value = this.effect.run()); - } - return this._value; - } - get value() { - trackRefValue(this); - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - return toRaw(this)._get(); - } +function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + !!(process.env.NODE_ENV !== "production") ? { + target: ref2, + type: "get", + key: "value" + } : void 0 + ); + } } -_a = "__v_isReadonly" /* IS_READONLY */; -function deferredComputed(getter) { - return new DeferredComputedRefImpl(getter); +function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + !!(process.env.NODE_ENV !== "production") ? { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } : void 0 + ); + } +} +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); + } + } +} +function triggerRef(ref2) { + triggerRefValue(ref2, 2, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!!(process.env.NODE_ENV !== "production") && !isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); } -export { EffectScope, ITERATE_KEY, ReactiveEffect, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseTracking, proxyRefs, reactive, readonly, ref, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, track, trigger, triggerRef, unref }; +const deferredComputed = computed; + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; +const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw" +}; + +export { EffectScope, ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, computed, customRef, deferredComputed, effect, effectScope, enableTracking, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, pauseScheduling, pauseTracking, proxyRefs, reactive, readonly, ref, resetScheduling, resetTracking, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, track, trigger, triggerRef, unref }; diff --git a/node_modules/@vue/reactivity/dist/reactivity.global.js b/node_modules/@vue/reactivity/dist/reactivity.global.js index 0e888d43..f2d98ec1 100644 --- a/node_modules/@vue/reactivity/dist/reactivity.global.js +++ b/node_modules/@vue/reactivity/dist/reactivity.global.js @@ -1,1300 +1,1286 @@ +/** +* @vue/reactivity v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ var VueReactivity = (function (exports) { 'use strict'; - /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } - Object.freeze({}) - ; - Object.freeze([]) ; + const NOOP = () => { + }; const extend = Object.assign; - const hasOwnProperty = Object.prototype.hasOwnProperty; - const hasOwn = (val, key) => hasOwnProperty.call(val, key); + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; + const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; - const isMap = (val) => toTypeString(val) === '[object Map]'; - const isFunction = (val) => typeof val === 'function'; - const isString = (val) => typeof val === 'string'; - const isSymbol = (val) => typeof val === 'symbol'; - const isObject = (val) => val !== null && typeof val === 'object'; + const isMap = (val) => toTypeString(val) === "[object Map]"; + const isFunction = (val) => typeof val === "function"; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; - const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; + const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; - /** - * @private - */ - const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); - // compare whether a value has changed, accounting for NaN. + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); }; function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } - const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; - }; - const wasTracked = (dep) => (dep.w & trackOpBit) > 0; - const newTracked = (dep) => (dep.n & trackOpBit) > 0; - const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } - }; - const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } - }; - - const targetMap = new WeakMap(); - // The number of effects currently being tracked recursively. - let effectTrackDepth = 0; - let trackOpBit = 1; - /** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ - const maxMarkerBits = 30; let activeEffect; - const ITERATE_KEY = Symbol('iterate' ); - const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } - function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; + function triggerComputed(computed) { + return computed.value; + } + function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; + } + function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } + } + function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; + let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function enableTracking() { - trackStack.push(shouldTrack); - shouldTrack = true; + trackStack.push(shouldTrack); + shouldTrack = true; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } - function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } + function pauseScheduling() { + pauseScheduleStack++; } - function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } + function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } - function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; + function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } + } + const queueEffectSchedulers = []; + function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } - function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - } - function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } + function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } - const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); + const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; + }; + + const targetMap = /* @__PURE__ */ new WeakMap(); + const ITERATE_KEY = Symbol("iterate" ); + const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); + function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } + } + function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); + } + function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); + } + + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( - /*#__PURE__*/ - Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); - const get = /*#__PURE__*/ createGetter(); - const shallowGet = /*#__PURE__*/ createGetter(false, true); - const readonlyGet = /*#__PURE__*/ createGetter(true); - const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); - const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) + ); + const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; - } - function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; - } - const set = /*#__PURE__*/ createSetter(); - const shallowSet = /*#__PURE__*/ createSetter(true); - function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } - function deleteProperty(target, key) { + function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); + } + class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + } + class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; - } - function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; - } - function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } - const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys - }; - const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; + class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } - }; - const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet - }); - // Props handlers are special in the sense that it should not unwrap top-level - // refs (in order to allow refs to be explicitly passed down), but should - // retain the reactivity of the normal readonly object. - const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet - }); + return true; + } + deleteProperty(target, key) { + { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + } + const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); + const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true + ); + const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); - function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); + function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } - function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); + function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } - function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; + function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } - const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); + const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations + ] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; - function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } + function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } - const reactiveMap = new WeakMap(); - const shallowReactiveMap = new WeakMap(); - const readonlyMap = new WeakMap(); - const shallowReadonlyMap = new WeakMap(); + const reactiveMap = /* @__PURE__ */ new WeakMap(); + const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + const readonlyMap = /* @__PURE__ */ new WeakMap(); + const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } - /** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } - /** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } - /** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } - function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; - function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } - } - } - function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } - } - function isRef(r) { - return !!(r && r.__v_isRef === true); - } - function ref(value) { - return createRef(value, false); - } - function shallowRef(value) { - return createRef(value, true); - } - function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); - } - class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } - } - function triggerRef(ref) { - triggerRefValue(ref, ref.value ); - } - function unref(ref) { - return isRef(ref) ? ref.value : ref; - } - const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } - }; - function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); - } - class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } - } - function customRef(factory) { - return new CustomRefImpl(factory); - } - function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; - } - class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - } - function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); - } - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; } - var _a; - const tick = /*#__PURE__*/ Promise.resolve(); - const queue = []; - let queued = false; - const scheduler = (fn) => { - queue.push(fn); - if (!queued) { - queued = true; - tick.then(flush); - } - }; - const flush = () => { - for (let i = 0; i < queue.length; i++) { - queue[i](); - } - queue.length = 0; - queued = false; - }; - class DeferredComputedRefImpl { - constructor(getter) { - this.dep = undefined; - this._dirty = true; - this.__v_isRef = true; - this[_a] = true; - let compareTarget; - let hasCompareTarget = false; - let scheduled = false; - this.effect = new ReactiveEffect(getter, (computedTrigger) => { - if (this.dep) { - if (computedTrigger) { - compareTarget = this._value; - hasCompareTarget = true; - } - else if (!scheduled) { - const valueToCompare = hasCompareTarget ? compareTarget : this._value; - scheduled = true; - hasCompareTarget = false; - scheduler(() => { - if (this.effect.active && this._get() !== valueToCompare) { - triggerRefValue(this); - } - scheduled = false; - }); - } - // chained upstream computeds are notified synchronously to ensure - // value invalidation in case of sync access; normal effects are - // deferred to be triggered in scheduler. - for (const e of this.dep) { - if (e.computed instanceof DeferredComputedRefImpl) { - e.scheduler(true /* computedTrigger */); - } - } - } - this._dirty = true; - }); - this.effect.computed = this; - } - _get() { - if (this._dirty) { - this._dirty = false; - return (this._value = this.effect.run()); - } - return this._value; - } - get value() { - trackRefValue(this); - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - return toRaw(this)._get(); - } + function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } } - _a = "__v_isReadonly" /* IS_READONLY */; - function deferredComputed(getter) { - return new DeferredComputedRefImpl(getter); + function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } } + function isRef(r) { + return !!(r && r.__v_isRef === true); + } + function ref(value) { + return createRef(value, false); + } + function shallowRef(value) { + return createRef(value, true); + } + function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); + } + class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); + } + } + } + function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); + } + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + function toValue(source) { + return isFunction(source) ? source() : unref(source); + } + const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } + }; + function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); + } + class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } + } + function customRef(factory) { + return new CustomRefImpl(factory); + } + function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; + } + class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } + } + class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } + } + function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } + } + function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); + } + + const deferredComputed = computed; + + const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" + }; + const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" + }; + const ReactiveFlags = { + "SKIP": "__v_skip", + "IS_REACTIVE": "__v_isReactive", + "IS_READONLY": "__v_isReadonly", + "IS_SHALLOW": "__v_isShallow", + "RAW": "__v_raw" + }; exports.EffectScope = EffectScope; exports.ITERATE_KEY = ITERATE_KEY; exports.ReactiveEffect = ReactiveEffect; + exports.ReactiveFlags = ReactiveFlags; + exports.TrackOpTypes = TrackOpTypes; + exports.TriggerOpTypes = TriggerOpTypes; exports.computed = computed; exports.customRef = customRef; exports.deferredComputed = deferredComputed; @@ -1309,11 +1295,13 @@ var VueReactivity = (function (exports) { exports.isShallow = isShallow; exports.markRaw = markRaw; exports.onScopeDispose = onScopeDispose; + exports.pauseScheduling = pauseScheduling; exports.pauseTracking = pauseTracking; exports.proxyRefs = proxyRefs; exports.reactive = reactive; exports.readonly = readonly; exports.ref = ref; + exports.resetScheduling = resetScheduling; exports.resetTracking = resetTracking; exports.shallowReactive = shallowReactive; exports.shallowReadonly = shallowReadonly; @@ -1322,13 +1310,12 @@ var VueReactivity = (function (exports) { exports.toRaw = toRaw; exports.toRef = toRef; exports.toRefs = toRefs; + exports.toValue = toValue; exports.track = track; exports.trigger = trigger; exports.triggerRef = triggerRef; exports.unref = unref; - Object.defineProperty(exports, '__esModule', { value: true }); - return exports; -}({})); +})({}); diff --git a/node_modules/@vue/reactivity/dist/reactivity.global.prod.js b/node_modules/@vue/reactivity/dist/reactivity.global.prod.js index 1faa7f7f..b27356c4 100644 --- a/node_modules/@vue/reactivity/dist/reactivity.global.prod.js +++ b/node_modules/@vue/reactivity/dist/reactivity.global.prod.js @@ -1 +1,6 @@ -var VueReactivity=function(t){"use strict";function e(t,e){const n=Object.create(null),s=t.split(",");for(let i=0;i<s.length;i++)n[s[i]]=!0;return e?t=>!!n[t.toLowerCase()]:t=>!!n[t]}const n=()=>{},s=Object.assign,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.call(t,e),c=Array.isArray,o=t=>"[object Map]"===h(t),u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,l=Object.prototype.toString,h=t=>l.call(t),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,_=(t,e)=>!Object.is(t,e);let p;class d{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&p&&(this.parent=p,this.index=(p.scopes||(p.scopes=[])).push(this)-1)}run(t){if(this.active){const e=p;try{return p=this,t()}finally{p=e}}}on(){p=this}off(){p=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].stop();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.active=!1}}}function v(t,e=p){e&&e.active&&e.effects.push(t)}const g=t=>{const e=new Set(t);return e.w=0,e.n=0,e},y=t=>(t.w&S)>0,w=t=>(t.n&S)>0,R=new WeakMap;let b=0,S=1;let m;const k=Symbol(""),j=Symbol("");class E{constructor(t,e=null,n){this.fn=t,this.scheduler=e,this.active=!0,this.deps=[],this.parent=void 0,v(this,n)}run(){if(!this.active)return this.fn();let t=m,e=x;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=m,m=this,x=!0,S=1<<++b,b<=30?(({deps:t})=>{if(t.length)for(let e=0;e<t.length;e++)t[e].w|=S})(this):O(this),this.fn()}finally{b<=30&&(t=>{const{deps:e}=t;if(e.length){let n=0;for(let s=0;s<e.length;s++){const i=e[s];y(i)&&!w(i)?i.delete(t):e[n++]=i,i.w&=~S,i.n&=~S}e.length=n}})(this),S=1<<--b,m=this.parent,x=e,this.parent=void 0,this.deferStop&&this.stop()}}stop(){m===this?this.deferStop=!0:this.active&&(O(this),this.onStop&&this.onStop(),this.active=!1)}}function O(t){const{deps:e}=t;if(e.length){for(let n=0;n<e.length;n++)e[n].delete(t);e.length=0}}let x=!0;const P=[];function M(){P.push(x),x=!1}function z(){const t=P.pop();x=void 0===t||t}function V(t,e,n){if(x&&m){let e=R.get(t);e||R.set(t,e=new Map);let s=e.get(n);s||e.set(n,s=g()),W(s)}}function W(t,e){let n=!1;b<=30?w(t)||(t.n|=S,n=!y(t)):n=!t.has(m),n&&(t.add(m),m.deps.push(t))}function A(t,e,n,s,i,r){const u=R.get(t);if(!u)return;let a=[];if("clear"===e)a=[...u.values()];else if("length"===n&&c(t))u.forEach(((t,e)=>{("length"===e||e>=s)&&a.push(t)}));else switch(void 0!==n&&a.push(u.get(n)),e){case"add":c(t)?f(n)&&a.push(u.get("length")):(a.push(u.get(k)),o(t)&&a.push(u.get(j)));break;case"delete":c(t)||(a.push(u.get(k)),o(t)&&a.push(u.get(j)));break;case"set":o(t)&&a.push(u.get(k))}if(1===a.length)a[0]&&T(a[0]);else{const t=[];for(const e of a)e&&t.push(...e);T(g(t))}}function T(t,e){const n=c(t)?t:[...t];for(const s of n)s.computed&&N(s);for(const s of n)s.computed||N(s)}function N(t,e){(t!==m||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const C=e("__proto__,__v_isRef,__isVue"),I=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),K=F(),D=F(!1,!0),L=F(!0),Y=F(!0,!0),q=B();function B(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=Mt(this);for(let e=0,i=this.length;e<i;e++)V(n,0,e+"");const s=n[e](...t);return-1===s||!1===s?n[e](...t.map(Mt)):s}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){M();const n=Mt(this)[e].apply(this,t);return z(),n}})),t}function F(t=!1,e=!1){return function(n,s,i){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&i===(t?e?St:bt:e?Rt:wt).get(n))return n;const o=c(n);if(!t&&o&&r(q,s))return Reflect.get(q,s,i);const l=Reflect.get(n,s,i);return(u(s)?I.has(s):C(s))?l:(t||V(n,0,s),e?l:Tt(l)?o&&f(s)?l:l.value:a(l)?t?jt(l):kt(l):l)}}function G(t=!1){return function(e,n,s,i){let o=e[n];if(xt(o)&&Tt(o)&&!Tt(s))return!1;if(!t&&!xt(s)&&(Pt(s)||(s=Mt(s),o=Mt(o)),!c(e)&&Tt(o)&&!Tt(s)))return o.value=s,!0;const u=c(e)&&f(n)?Number(n)<e.length:r(e,n),a=Reflect.set(e,n,s,i);return e===Mt(i)&&(u?_(s,o)&&A(e,"set",n,s):A(e,"add",n,s)),a}}const H={get:K,set:G(),deleteProperty:function(t,e){const n=r(t,e),s=Reflect.deleteProperty(t,e);return s&&n&&A(t,"delete",e,void 0),s},has:function(t,e){const n=Reflect.has(t,e);return u(e)&&I.has(e)||V(t,0,e),n},ownKeys:function(t){return V(t,0,c(t)?"length":k),Reflect.ownKeys(t)}},J={get:L,set:(t,e)=>!0,deleteProperty:(t,e)=>!0},Q=s({},H,{get:D,set:G(!0)}),U=s({},J,{get:Y}),X=t=>t,Z=t=>Reflect.getPrototypeOf(t);function $(t,e,n=!1,s=!1){const i=Mt(t=t.__v_raw),r=Mt(e);n||(e!==r&&V(i,0,e),V(i,0,r));const{has:c}=Z(i),o=s?X:n?Vt:zt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function tt(t,e=!1){const n=this.__v_raw,s=Mt(n),i=Mt(t);return e||(t!==i&&V(s,0,t),V(s,0,i)),t===i?n.has(t):n.has(t)||n.has(i)}function et(t,e=!1){return t=t.__v_raw,!e&&V(Mt(t),0,k),Reflect.get(t,"size",t)}function nt(t){t=Mt(t);const e=Mt(this);return Z(e).has.call(e,t)||(e.add(t),A(e,"add",t,t)),this}function st(t,e){e=Mt(e);const n=Mt(this),{has:s,get:i}=Z(n);let r=s.call(n,t);r||(t=Mt(t),r=s.call(n,t));const c=i.call(n,t);return n.set(t,e),r?_(e,c)&&A(n,"set",t,e):A(n,"add",t,e),this}function it(t){const e=Mt(this),{has:n,get:s}=Z(e);let i=n.call(e,t);i||(t=Mt(t),i=n.call(e,t)),s&&s.call(e,t);const r=e.delete(t);return i&&A(e,"delete",t,void 0),r}function rt(){const t=Mt(this),e=0!==t.size,n=t.clear();return e&&A(t,"clear",void 0,void 0),n}function ct(t,e){return function(n,s){const i=this,r=i.__v_raw,c=Mt(r),o=e?X:t?Vt:zt;return!t&&V(c,0,k),r.forEach(((t,e)=>n.call(s,o(t),o(e),i)))}}function ot(t,e,n){return function(...s){const i=this.__v_raw,r=Mt(i),c=o(r),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=i[t](...s),h=n?X:e?Vt:zt;return!e&&V(r,0,a?j:k),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function ut(t){return function(...e){return"delete"!==t&&this}}function at(){const t={get(t){return $(this,t)},get size(){return et(this)},has:tt,add:nt,set:st,delete:it,clear:rt,forEach:ct(!1,!1)},e={get(t){return $(this,t,!1,!0)},get size(){return et(this)},has:tt,add:nt,set:st,delete:it,clear:rt,forEach:ct(!1,!0)},n={get(t){return $(this,t,!0)},get size(){return et(this,!0)},has(t){return tt.call(this,t,!0)},add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear"),forEach:ct(!0,!1)},s={get(t){return $(this,t,!0,!0)},get size(){return et(this,!0)},has(t){return tt.call(this,t,!0)},add:ut("add"),set:ut("set"),delete:ut("delete"),clear:ut("clear"),forEach:ct(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=ot(i,!1,!1),n[i]=ot(i,!0,!1),e[i]=ot(i,!1,!0),s[i]=ot(i,!0,!0)})),[t,n,e,s]}const[lt,ht,ft,_t]=at();function pt(t,e){const n=e?t?_t:ft:t?ht:lt;return(e,s,i)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get(r(n,s)&&s in e?n:e,s,i)}const dt={get:pt(!1,!1)},vt={get:pt(!1,!0)},gt={get:pt(!0,!1)},yt={get:pt(!0,!0)},wt=new WeakMap,Rt=new WeakMap,bt=new WeakMap,St=new WeakMap;function mt(t){return t.__v_skip||!Object.isExtensible(t)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((t=>h(t).slice(8,-1))(t))}function kt(t){return xt(t)?t:Et(t,!1,H,dt,wt)}function jt(t){return Et(t,!0,J,gt,bt)}function Et(t,e,n,s,i){if(!a(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=mt(t);if(0===c)return t;const o=new Proxy(t,2===c?s:n);return i.set(t,o),o}function Ot(t){return xt(t)?Ot(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!t.__v_isShallow)}function Mt(t){const e=t&&t.__v_raw;return e?Mt(e):t}const zt=t=>a(t)?kt(t):t,Vt=t=>a(t)?jt(t):t;function Wt(t){x&&m&&W((t=Mt(t)).dep||(t.dep=g()))}function At(t,e){(t=Mt(t)).dep&&T(t.dep)}function Tt(t){return!(!t||!0!==t.__v_isRef)}function Nt(t,e){return Tt(t)?t:new Ct(t,e)}class Ct{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Mt(t),this._value=e?t:zt(t)}get value(){return Wt(this),this._value}set value(t){t=this.__v_isShallow?t:Mt(t),_(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:zt(t),At(this))}}function It(t){return Tt(t)?t.value:t}const Kt={get:(t,e,n)=>It(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return Tt(i)&&!Tt(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};class Dt{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:n}=t((()=>Wt(this)),(()=>At(this)));this._get=e,this._set=n}get value(){return this._get()}set value(t){this._set(t)}}class Lt{constructor(t,e,n){this._object=t,this._key=e,this._defaultValue=n,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}}function Yt(t,e,n){const s=t[e];return Tt(s)?s:new Lt(t,e,n)}class qt{constructor(t,e,n,s){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new E(t,(()=>{this._dirty||(this._dirty=!0,At(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const t=Mt(this);return Wt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}var Bt;const Ft=Promise.resolve(),Gt=[];let Ht=!1;const Jt=()=>{for(let t=0;t<Gt.length;t++)Gt[t]();Gt.length=0,Ht=!1};class Qt{constructor(t){let e;this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this[Bt]=!0;let n=!1,s=!1;this.effect=new E(t,(t=>{if(this.dep){if(t)e=this._value,n=!0;else if(!s){const t=n?e:this._value;s=!0,n=!1,Gt.push((()=>{this.effect.active&&this._get()!==t&&At(this),s=!1})),Ht||(Ht=!0,Ft.then(Jt))}for(const t of this.dep)t.computed instanceof Qt&&t.scheduler(!0)}this._dirty=!0})),this.effect.computed=this}_get(){return this._dirty?(this._dirty=!1,this._value=this.effect.run()):this._value}get value(){return Wt(this),Mt(this)._get()}}return Bt="__v_isReadonly",t.EffectScope=d,t.ITERATE_KEY=k,t.ReactiveEffect=E,t.computed=function(t,e,s=!1){let i,r;const c="function"==typeof t;return c?(i=t,r=n):(i=t.get,r=t.set),new qt(i,r,c||!r,s)},t.customRef=function(t){return new Dt(t)},t.deferredComputed=function(t){return new Qt(t)},t.effect=function(t,e){t.effect&&(t=t.effect.fn);const n=new E(t);e&&(s(n,e),e.scope&&v(n,e.scope)),e&&e.lazy||n.run();const i=n.run.bind(n);return i.effect=n,i},t.effectScope=function(t){return new d(t)},t.enableTracking=function(){P.push(x),x=!0},t.getCurrentScope=function(){return p},t.isProxy=function(t){return Ot(t)||xt(t)},t.isReactive=Ot,t.isReadonly=xt,t.isRef=Tt,t.isShallow=Pt,t.markRaw=function(t){return((t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){p&&p.cleanups.push(t)},t.pauseTracking=M,t.proxyRefs=function(t){return Ot(t)?t:new Proxy(t,Kt)},t.reactive=kt,t.readonly=jt,t.ref=function(t){return Nt(t,!1)},t.resetTracking=z,t.shallowReactive=function(t){return Et(t,!1,Q,vt,Rt)},t.shallowReadonly=function(t){return Et(t,!0,U,yt,St)},t.shallowRef=function(t){return Nt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Mt,t.toRef=Yt,t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const n in t)e[n]=Yt(t,n);return e},t.track=V,t.trigger=A,t.triggerRef=function(t){At(t)},t.unref=It,Object.defineProperty(t,"__esModule",{value:!0}),t}({}); +/** +* @vue/reactivity v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var VueReactivity=function(t){"use strict";function e(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.call(t,e),c=Array.isArray,o=t=>"[object Map]"===f(t),u=t=>"function"==typeof t,a=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,f=t=>h.call(t),_=t=>f(t).slice(8,-1),d=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let v,g;class y{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=v,!t&&v&&(this.index=(v.scopes||(v.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=v;try{return v=this,t()}finally{v=e}}}on(){v=this}off(){v=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function w(t,e=v){e&&e.active&&e.effects.push(t)}class R{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){j();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(b(e.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),I()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=E,e=g;try{return E=!0,g=this,this._runnings++,S(this),this.fn()}finally{k(this),this._runnings--,g=e,E=t}}stop(){var t;this.active&&(S(this),k(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function S(t){t._trackId++,t._depsLength=0}function k(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)L(t.deps[e],t);t.deps.length=t._depsLength}}function L(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let E=!0,m=0;const O=[];function j(){O.push(E),E=!1}function I(){const t=O.pop();E=void 0===t||t}function x(){m++}function P(){for(m--;!m&&A.length;)A.shift()()}function T(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&L(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function M(t,e,s){x();for(const n of t.keys())if(n._dirtyLevel<e&&t.get(n)===n._trackId){const t=n._dirtyLevel;n._dirtyLevel=e,0===t&&(n._shouldSchedule=!0,n.trigger())}V(t),P()}function V(t){for(const e of t.keys())e.scheduler&&e._shouldSchedule&&(!e._runnings||e.allowRecurse)&&t.get(e)===e._trackId&&(e._shouldSchedule=!1,A.push(e.scheduler))}const W=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},z=new WeakMap,N=Symbol(""),C=Symbol("");function D(t,e,s){if(E&&g){let e=z.get(t);e||z.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=W((()=>e.delete(s)))),T(g,n)}}function K(t,e,s,n,i,r){const u=z.get(t);if(!u)return;let l=[];if("clear"===e)l=[...u.values()];else if("length"===s&&c(t)){const t=Number(n);u.forEach(((e,s)=>{("length"===s||!a(s)&&s>=t)&&l.push(e)}))}else switch(void 0!==s&&l.push(u.get(s)),e){case"add":c(t)?d(s)&&l.push(u.get("length")):(l.push(u.get(N)),o(t)&&l.push(u.get(C)));break;case"delete":c(t)||(l.push(u.get(N)),o(t)&&l.push(u.get(C)));break;case"set":o(t)&&l.push(u.get(N))}x();for(const c of l)c&&M(c,2);P()}const H=e("__proto__,__v_isRef,__isVue"),Y=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),F=G();function G(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Tt(this);for(let e=0,i=this.length;e<i;e++)D(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Tt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){j(),x();const s=Tt(this)[e].apply(this,t);return P(),I(),s}})),t}function q(t){const e=Tt(this);return D(e,0,t),e.hasOwnProperty(t)}class B{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,i=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?Et:Lt:i?kt:St).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=c(t);if(!n){if(o&&r(F,e))return Reflect.get(F,e,s);if("hasOwnProperty"===e)return q}const u=Reflect.get(t,e,s);return(a(e)?Y.has(e):H(e))?u:(n||D(t,0,e),i?u:Ct(u)?o&&d(e)?u:u.value:l(u)?n?Ot(u):mt(u):u)}}class J extends B{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._shallow){const e=xt(i);if(Pt(s)||xt(s)||(i=Tt(i),s=Tt(s)),!c(t)&&Ct(i)&&!Ct(s))return!e&&(i.value=s,!0)}const o=c(t)&&d(e)?Number(e)<t.length:r(t,e),u=Reflect.set(t,e,s,n);return t===Tt(n)&&(o?p(s,i)&&K(t,"set",e,s):K(t,"add",e,s)),u}deleteProperty(t,e){const s=r(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&K(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&Y.has(e)||D(t,0,e),s}ownKeys(t){return D(t,0,c(t)?"length":N),Reflect.ownKeys(t)}}class Q extends B{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const U=new J,X=new Q,Z=new J(!0),$=new Q(!0),tt=t=>t,et=t=>Reflect.getPrototypeOf(t);function st(t,e,s=!1,n=!1){const i=Tt(t=t.__v_raw),r=Tt(e);s||(p(e,r)&&D(i,0,e),D(i,0,r));const{has:c}=et(i),o=n?tt:s?Mt:At;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function nt(t,e=!1){const s=this.__v_raw,n=Tt(s),i=Tt(t);return e||(p(t,i)&&D(n,0,t),D(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function it(t,e=!1){return t=t.__v_raw,!e&&D(Tt(t),0,N),Reflect.get(t,"size",t)}function rt(t){t=Tt(t);const e=Tt(this);return et(e).has.call(e,t)||(e.add(t),K(e,"add",t,t)),this}function ct(t,e){e=Tt(e);const s=Tt(this),{has:n,get:i}=et(s);let r=n.call(s,t);r||(t=Tt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?p(e,c)&&K(s,"set",t,e):K(s,"add",t,e),this}function ot(t){const e=Tt(this),{has:s,get:n}=et(e);let i=s.call(e,t);i||(t=Tt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&K(e,"delete",t,void 0),r}function ut(){const t=Tt(this),e=0!==t.size,s=t.clear();return e&&K(t,"clear",void 0,void 0),s}function at(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Tt(r),o=e?tt:t?Mt:At;return!t&&D(c,0,N),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function lt(t,e,s){return function(...n){const i=this.__v_raw,r=Tt(i),c=o(r),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=i[t](...n),h=s?tt:e?Mt:At;return!e&&D(r,0,a?C:N),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function ht(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ft(){const t={get(t){return st(this,t)},get size(){return it(this)},has:nt,add:rt,set:ct,delete:ot,clear:ut,forEach:at(!1,!1)},e={get(t){return st(this,t,!1,!0)},get size(){return it(this)},has:nt,add:rt,set:ct,delete:ot,clear:ut,forEach:at(!1,!0)},s={get(t){return st(this,t,!0)},get size(){return it(this,!0)},has(t){return nt.call(this,t,!0)},add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear"),forEach:at(!0,!1)},n={get(t){return st(this,t,!0,!0)},get size(){return it(this,!0)},has(t){return nt.call(this,t,!0)},add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear"),forEach:at(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=lt(i,!1,!1),s[i]=lt(i,!0,!1),e[i]=lt(i,!1,!0),n[i]=lt(i,!0,!0)})),[t,s,e,n]}const[_t,dt,pt,vt]=ft();function gt(t,e){const s=e?t?vt:pt:t?dt:_t;return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(r(s,n)&&n in e?s:e,n,i)}const yt={get:gt(!1,!1)},wt={get:gt(!1,!0)},Rt={get:gt(!0,!1)},bt={get:gt(!0,!0)},St=new WeakMap,kt=new WeakMap,Lt=new WeakMap,Et=new WeakMap;function mt(t){return xt(t)?t:jt(t,!1,U,yt,St)}function Ot(t){return jt(t,!0,X,Rt,Lt)}function jt(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function It(t){return xt(t)?It(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!t.__v_isShallow)}function Tt(t){const e=t&&t.__v_raw;return e?Tt(e):t}const At=t=>l(t)?mt(t):t,Mt=t=>l(t)?Ot(t):t;class Vt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R((()=>t(this._value)),(()=>Nt(this,1)),(()=>this.dep&&V(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Tt(this);return t._cacheable&&!t.effect.dirty||p(t._value,t._value=t.effect.run())&&Nt(t,2),zt(t),t.effect._dirtyLevel>=1&&Nt(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Wt(t,e,n=!1){let i,r;const c=u(t);c?(i=t,r=s):(i=t.get,r=t.set);return new Vt(i,r,c||!r,n)}function zt(t){E&&g&&(t=Tt(t),T(g,t.dep||(t.dep=W((()=>t.dep=void 0),t instanceof Vt?t:void 0))))}function Nt(t,e=2,s){const n=(t=Tt(t)).dep;n&&M(n,e)}function Ct(t){return!(!t||!0!==t.__v_isRef)}function Dt(t){return Kt(t,!1)}function Kt(t,e){return Ct(t)?t:new Ht(t,e)}class Ht{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Tt(t),this._value=e?t:At(t)}get value(){return zt(this),this._value}set value(t){const e=this.__v_isShallow||Pt(t)||xt(t);t=e?t:Tt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:At(t),Nt(this,2))}}function Yt(t){return Ct(t)?t.value:t}const Ft={get:(t,e,s)=>Yt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Ct(i)&&!Ct(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Gt{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>zt(this)),(()=>Nt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}class qt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Tt(this._object),e=this._key,null==(s=z.get(t))?void 0:s.get(e);var t,e,s}}class Bt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Jt(t,e,s){const n=t[e];return Ct(n)?n:new qt(t,e,s)}const Qt=Wt;return t.EffectScope=y,t.ITERATE_KEY=N,t.ReactiveEffect=R,t.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},t.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},t.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t.computed=Wt,t.customRef=function(t){return new Gt(t)},t.deferredComputed=Qt,t.effect=function(t,e){t.effect instanceof R&&(t=t.effect.fn);const i=new R(t,s,(()=>{i.dirty&&i.run()}));e&&(n(i,e),e.scope&&w(i,e.scope)),e&&e.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r},t.effectScope=function(t){return new y(t)},t.enableTracking=function(){O.push(E),E=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return It(t)||xt(t)},t.isReactive=It,t.isReadonly=xt,t.isRef=Ct,t.isShallow=Pt,t.markRaw=function(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){v&&v.cleanups.push(t)},t.pauseScheduling=x,t.pauseTracking=j,t.proxyRefs=function(t){return It(t)?t:new Proxy(t,Ft)},t.reactive=mt,t.readonly=Ot,t.ref=Dt,t.resetScheduling=P,t.resetTracking=I,t.shallowReactive=function(t){return jt(t,!1,Z,wt,kt)},t.shallowReadonly=function(t){return jt(t,!0,$,bt,Et)},t.shallowRef=function(t){return Kt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Tt,t.toRef=function(t,e,s){return Ct(t)?t:u(t)?new Bt(t):l(t)&&arguments.length>1?Jt(t,e,s):Dt(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Jt(t,s);return e},t.toValue=function(t){return u(t)?t():Yt(t)},t.track=D,t.trigger=K,t.triggerRef=function(t){Nt(t,2)},t.unref=Yt,t}({}); diff --git a/node_modules/@vue/reactivity/package.json b/node_modules/@vue/reactivity/package.json index c976fade..9c40e7db 100644 --- a/node_modules/@vue/reactivity/package.json +++ b/node_modules/@vue/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.2.36", + "version": "3.4.15", "description": "@vue/reactivity", "main": "index.js", "module": "dist/reactivity.esm-bundler.js", @@ -11,6 +11,20 @@ "index.js", "dist" ], + "exports": { + ".": { + "types": "./dist/reactivity.d.ts", + "node": { + "production": "./dist/reactivity.cjs.prod.js", + "development": "./dist/reactivity.cjs.js", + "default": "./index.js" + }, + "module": "./dist/reactivity.esm-bundler.js", + "import": "./dist/reactivity.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, "sideEffects": false, "repository": { "type": "git", @@ -36,6 +50,6 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme", "dependencies": { - "@vue/shared": "3.2.36" + "@vue/shared": "3.4.15" } -} +} \ No newline at end of file diff --git a/node_modules/@vue/runtime-core/README.md b/node_modules/@vue/runtime-core/README.md index d1416dd6..3a5b2981 100644 --- a/node_modules/@vue/runtime-core/README.md +++ b/node_modules/@vue/runtime-core/README.md @@ -2,18 +2,18 @@ > This package is published only for typing and building custom renderers. It is NOT meant to be used in applications. -For full exposed APIs, see `src/index.ts`. You can also run `yarn build runtime-core --types` from repo root, which will generate an API report at `temp/runtime-core.api.md`. +For full exposed APIs, see `src/index.ts`. ## Building a Custom Renderer -``` ts +```ts import { createRenderer } from '@vue/runtime-core' const { render, createApp } = createRenderer({ patchProp, insert, remove, - createElement, + createElement // ... }) diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js b/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js index 4e23a7e8..76116ddf 100644 --- a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js +++ b/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js @@ -1,3 +1,8 @@ +/** +* @vue/runtime-core v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -7,7750 +12,8083 @@ var shared = require('@vue/shared'); const stack = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack.push(vnode); } function popWarningContext() { - stack.pop(); + stack.pop(); } -function warn(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - reactivity.pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); +function warn$1(msg, ...args) { + reactivity.pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - reactivity.resetTracking(); + console.warn(...warnArgs); + } + reactivity.resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } -/* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } -/* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } -/* istanbul ignore next */ function formatProp(key, value, raw) { - if (shared.isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (reactivity.isRef(value)) { - value = formatProp(key, reactivity.toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (shared.isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = reactivity.toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (shared.isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (reactivity.isRef(value)) { + value = formatProp(key, reactivity.toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (shared.isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = reactivity.toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } } -const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (shared.isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && shared.isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (shared.isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && shared.isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; -const pendingPreFlushCbs = []; -let activePreFlushCbs = null; -let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; -const resolvedPromise = /*#__PURE__*/ Promise.resolve(); +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; -let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } -// #2768 -// Use binary-search to find a suitable position in the queue, -// so that the queue maintains the increasing order of job's id, -// which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } -} -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} -function queueCb(cb, activeQueue, pendingQueue, index) { - if (!shared.isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } -function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); -} -function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - { - seen = seen || new Map(); - } - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) { - continue; - } - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!shared.isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; +const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; +}; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - { - seen = seen || new Map(); - } - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = (job) => checkRecursiveUpdates(seen, job) - ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (true && check(job)) { - continue; - } - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; } + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); } + } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } - else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`); - return true; - } - else { - seen.set(fn, count + 1); - } + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); } + } } -/* eslint-disable no-restricted-globals */ let isHmrUpdating = false; -const hmrDirtyComponents = new Set(); -// Expose the HMR runtime on the global object -// This makes it entirely tree-shakable without polluting the exports and makes -// it easier to be used in toolings like vue-loader -// Note: for a component to be eligible for HMR it also needs the __hmrId option -// to be set so that its instances can be registered / removed. +const hmrDirtyComponents = /* @__PURE__ */ new Set(); { - shared.getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; + shared.getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; } -const map = new Map(); +const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); } function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); + map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: new Set() - }); - return true; + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; } function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; + return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; } - // update initial record (for not-yet-rendered component) - record.initialDef.render = newRender; - [...record.instances].forEach(instance => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - // this flag forces child components with slot content to update - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); } function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - // update initial def (for not-yet-rendered components) - updateComponentDef(record.initialDef, newComp); - // create a snapshot which avoids the set being mutated during updates - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - // 1. Update existing comp definition to match new one - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - // 2. mark definition dirty. This forces the renderer to replace the - // component on patch. - hmrDirtyComponents.add(oldComp); - } - // 3. invalidate options resolution cache - instance.appContext.optionsCache.delete(instance.type); - // 4. actually update - if (instance.ceReload) { - // custom element - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } - else if (instance.parent) { - // 4. Force the parent instance to re-render. This will cause all updated - // components to be unmounted and re-mounted. Queue the update so that we - // don't end up forcing the same parent to re-render multiple times. - queueJob(instance.parent.update); - // instance is the inner component of an async custom element - // invoke to reset styles - if (instance.parent.type.__asyncLoader && - instance.parent.ceReload) { - instance.parent.ceReload(newComp.styles); - } - } - else if (instance.appContext.reload) { - // root instance mounted via createApp() has a reload method - instance.appContext.reload(); - } - else if (typeof window !== 'undefined') { - // root instance inside tree created via raw render(). Force reload. - window.location.reload(); - } - else { - console.warn('[HMR] Root or manually mounted instance modified. Full reload required.'); - } + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); } - // 5. make sure to cleanup dirty hmr components after update - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); - } - }); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); } function updateComponentDef(oldComp, newComp) { - shared.extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== '__file' && !(key in newComp)) { - delete oldComp[key]; - } + shared.extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; } + } } function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } - catch (e) { - console.error(e); - console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` + - `Full reload required.`); - } - }; + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; } +let devtools$1; let buffer = []; let devtoolsNotInstalled = false; -function emit(event, ...args) { - if (exports.devtools) { - exports.devtools.emit(event, ...args); - } - else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } } -function setDevtoolsHook(hook, target) { - var _a, _b; - exports.devtools = hook; - if (exports.devtools) { - exports.devtools.enabled = true; - buffer.forEach(({ event, args }) => exports.devtools.emit(event, ...args)); - buffer = []; - } - else if ( +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( // handle late devtools injection - only do this if we are in an actual // browser environment to avoid the timer handle stalling test runner exit // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!exports.devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3000); - } - else { - // non-browser env, assume not installed + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; - } + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } } function devtoolsInitApp(app, version) { - emit("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); } function devtoolsUnmountApp(app) { - emit("app:unmount" /* APP_UNMOUNT */, app); + emit$1("app:unmount" /* APP_UNMOUNT */, app); } -const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = -/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const devtoolsComponentRemoved = -/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */); +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ +); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; function createDevtoolsComponentHook(hook) { - return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component); - }; + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; } -const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ +); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ +); function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); - }; + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params); + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); } -function emit$1(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || shared.EMPTY_OBJ; - { - const { emitsOptions, propsOptions: [propsOptions] } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && - !(false )) { - if (!propsOptions || !(shared.toHandlerKey(event) in propsOptions)) { - warn(`Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "${shared.toHandlerKey(event)}" prop.`); - } - } - else { - const validator = emitsOptions[event]; - if (shared.isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn(`Invalid event arguments: event validation failed for event "${event}".`); - } - } - } +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || shared.EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(shared.toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${shared.toHandlerKey(event)}" prop.` + ); } - } - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || shared.EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(shared.toNumber); + } else { + const validator = emitsOptions[event]; + if (shared.isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } } + } } - { - devtoolsComponentEmit(instance, event, args); + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || shared.EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a); } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[shared.toHandlerKey(lowerCaseEvent)]) { - warn(`Event "${lowerCaseEvent}" is emitted in component ` + - `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` + - `Note that HTML attributes are case-insensitive and you cannot use ` + - `v-on to listen to camelCase events when using in-DOM templates. ` + - `You should probably use "${shared.hyphenate(event)}" instead of "${event}".`); - } + if (number) { + args = rawArgs.map(shared.looseToNumber); } - let handlerName; - let handler = props[(handlerName = shared.toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = shared.toHandlerKey(shared.camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = shared.toHandlerKey(shared.hyphenate(event)))]; + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[shared.toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${shared.hyphenate( + event + )}" instead of "${event}".` + ); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = shared.toHandlerKey(shared.camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!shared.isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + shared.extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (!shared.isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - shared.extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (shared.isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - shared.extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (shared.isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (shared.isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + shared.extend(normalized, raw); + } + if (shared.isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } -// Check if an incoming prop key is a declared emit event listener. -// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are -// both considered matched listeners. function isEmitListener(options, key) { - if (!options || !shared.isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - shared.hasOwn(options, shared.hyphenate(key)) || - shared.hasOwn(options, key)); + if (!options || !shared.isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key); } -/** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; -/** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } -/** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } -/** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } -/** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; -/** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only -) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } -/** - * dev only flag to track whether $attrs was used during render. - * If $attrs was used during render then the warning for failed attrs - * fallthrough can be suppressed. - */ let accessedAttrs = false; function markAttrsAccessed() { - accessedAttrs = true; + accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if (true && attrs === props) { - markAttrsAccessed(); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(shared.isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (shared.isOn(key)) { + if (!shared.isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } - result = normalizeVNode(render.length > 1 - ? render(props, true - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + } else { + extraAttrs.push(key); + } } - } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - let setRoot = undefined; - if (result.patchFlag > 0 && - result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(shared.isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (shared.isOn(key)) { - // ignore v-model handlers when they fail to fallthrough - if (!shared.isModelListener(key)) { - // remove `on`, lowercase first letter to reflect event casing - // accurately - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } - else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn(`Extraneous non-props attributes (` + - `${extraAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes.`); - } - if (eventAttrs.length) { - warn(`Extraneous non-emits event listeners (` + - `${eventAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes. ` + - `If the listener is intended to be a component custom event listener only, ` + - `declare it using the "emits" option.`); - } - } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); } - } - // inherit directives - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn(`Runtime directive used on component with non-element root node. ` + - `The directives will not function as intended.`); + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); } - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } } - // inherit transition data - if (vnode.transition) { - if (!isElementRoot(root)) { - warn(`Component inside <Transition> renders non-element root node ` + - `that cannot be animated.`); - } - root.transition = vnode.transition; + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); } - if (setRoot) { - setRoot(root); + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); } - else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } -/** - * dev only - * In dev mode, template root level comments are rendered, which turns the - * template into a fragment root, but we need to locate the single element - * root for attrs and scope id processing. - */ const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, undefined]; + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } - else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; + }; + return [normalizeVNode(childRoot), setRoot]; }; -function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || shared.isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || shared.isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!shared.isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!shared.isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; const isElementRoot = (vnode) => { - return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) || - vnode.type === Comment // potential v-if branch switch - ); + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // Parent component's render function was hot-updated. Since this may have - // caused the child component's slots content to have changed, we need to - // force the child to update as well. - if ((prevChildren || nextChildren) && isHmrUpdating) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { - return true; + if (prevProps === nextProps) { + return false; } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (!prevProps) { + return !!nextProps; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!nextProps) { + return true; } - return false; + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } -function updateHOCHostEl({ vnode, parent }, el // HostNode -) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (shared.isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === shared.camelize(name) || selfName === shared.capitalize(shared.camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${shared.capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[shared.camelize(name)] || registry[shared.capitalize(shared.camelize(name))]); } const isSuspense = (type) => type.__isSuspense; -// Suspense exposes a component-like API, and is treated like a component -// in the compiler, but internally it's a special built-in type that hooks -// directly into the renderer. +let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren }; -// Force-casted public typing for h and TSX props inference -const Suspense = (SuspenseImpl ); +const Suspense = SuspenseImpl ; function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (shared.isFunction(eventListener)) { - eventListener(); - } + const eventListener = vnode.props && vnode.props[name]; + if (shared.isFunction(eventListener)) { + eventListener(); + } } -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); } + } } + } } let hasWarned = false; -function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - /* istanbul ignore if */ - if (!hasWarned) { - hasWarned = true; - // @ts-ignore `console.info` cannot be null error - console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`); +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; } - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = shared.toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error(`suspense.resolve() is called without a pending branch.`); - } - if (suspense.isUnmounted) { - throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`); - } - } - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - { - pushWarningContext(vnode); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - { - popWarningContext(); - } - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } + } + const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } } - return result; - /* eslint-enable no-restricted-globals */ + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (shared.isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (shared.isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (shared.isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild) { - warn(`<Suspense> slots expect a single root node.`); - } - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); + } + if (shared.isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); } - return s; + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (shared.isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (shared.isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } -function provide(key, value) { - if (!currentInstance) { - { - warn(`provide() can only be used inside setup().`); - } +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); } - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && shared.isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else { - warn(`injection "${String(key)}" not found.`); - } - } - else { - warn(`inject() can only be used inside setup() or functional components.`); - } -} + return ctx; + } +}; -// Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, ({ ...options, flush: 'post' } - )); + return doWatch( + effect, + null, + shared.extend({}, options, { flush: "post" }) + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, ({ ...options, flush: 'sync' } - )); + return doWatch( + effect, + null, + shared.extend({}, options, { flush: "sync" }) + ); } -// initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; -// implementation function watch(source, cb, options) { - if (!shared.isFunction(cb)) { - warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` + - `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` + - `supports \`watch(source, cb, options?) signature.`); - } - return doWatch(source, cb, options); + if (!shared.isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); } -function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = shared.EMPTY_OBJ) { - if (!cb) { - if (immediate !== undefined) { - warn(`watch() "immediate" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - if (deep !== undefined) { - warn(`watch() "deep" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - } - const warnInvalidSource = (s) => { - warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.`); +function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger +} = shared.EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (reactivity.isRef(source)) { - getter = () => source.value; - forceTrigger = reactivity.isShallow(source); + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (reactivity.isReactive(source)) { - getter = () => source; - deep = true; + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (shared.isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => reactivity.isReactive(s) || reactivity.isShallow(s)); - getter = () => source.map(s => { - if (reactivity.isRef(s)) { - return s.value; - } - else if (reactivity.isReactive(s)) { - return traverse(s); - } - else if (shared.isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else { - warnInvalidSource(s); - } - }); + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (shared.isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = shared.NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; - }; - // in SSR there is no need to setup an actual effect, and it should be noop - // unless it's eager - if (isInSSRComponentSetup) { - // we will also not call the invalidate callback (+ runner is not set up) - onCleanup = shared.NOOP; - if (!cb) { - getter(); - } - else if (immediate) { - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - getter(), - isMultiSource ? [] : undefined, - onCleanup - ]); - } - return shared.NOOP; - } - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) - : shared.hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new reactivity.ReactiveEffect(getter, scheduler); - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - // initial run + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (reactivity.isRef(source)) { + getter = () => source.value; + forceTrigger = reactivity.isShallow(source); + } else if (reactivity.isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (shared.isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => reactivity.isReactive(s) || reactivity.isShallow(s)); + getter = () => source.map((s) => { + if (reactivity.isRef(s)) { + return s.value; + } else if (reactivity.isReactive(s)) { + return reactiveGetter(s); + } else if (shared.isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (shared.isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - shared.remove(instance.scope.effects, effect); - } + } else { + getter = shared.NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let ssrCleanup; + if (isInSSRComponentSetup) { + onCleanup = shared.NOOP; + if (!cb) { + getter(); + } else if (immediate) { + callWithAsyncErrorHandling(cb, instance, 3, [ + getter(), + isMultiSource ? [] : void 0, + onCleanup + ]); + } + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else { + return shared.NOOP; + } + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new reactivity.ReactiveEffect(getter, shared.NOOP, scheduler); + const scope = reactivity.getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + shared.remove(scope.effects, effect); + } + }; + { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + if (ssrCleanup) + ssrCleanup.push(unwatch); + return unwatch; } -// this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = shared.isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (shared.isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (shared.isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } -function traverse(value, seen) { - if (!shared.isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (reactivity.isRef(value)) { - traverse(value.value, seen); - } - else if (shared.isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (shared.isSet(value) || shared.isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (shared.isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } +function traverse(value, depth, currentDepth = 0, seen) { + if (!shared.isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (reactivity.isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (shared.isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (shared.isSet(value) || shared.isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (shared.isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } +function validateDirectiveName(name) { + if (shared.isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i]; + if (dir) { + if (shared.isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + reactivity.pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + reactivity.resetTracking(); + } + } +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - // warn more than one non-comment child - warn('<transition> can only be used on a single element or component. ' + - 'Use <transition-group> for lists.'); - break; - } - child = c; - hasFound = true; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = reactivity.toRaw(props); - const { mode } = rawProps; - // check mode - if (mode && - mode !== 'in-out' && - mode !== 'out-in' && - mode !== 'default') { - warn(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + const rawProps = reactivity.toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } -// The transition hooks are attached to the vnode as vnode.transition -// and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (shared.isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; -} -// the placeholder really only handles one special case: KeepAlive -// in the case of a KeepAlive in a leave phase we need to return a KeepAlive -// placeholder with empty content to avoid the KeepAlive instance from being -// unmounted. -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (shared.isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey]) { + el[enterCbKey]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } -// implementation, close to no-op -function defineComponent(options) { - return shared.isFunction(options) ? { setup: options, name: options.name } : options; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return shared.isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (shared.isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (shared.isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !shared.isObject(comp) && !shared.isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn(`Async component loader resolved to undefined. ` + - `If you are using retry(), make sure to return its return value.`); - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - if (comp && !shared.isObject(comp) && !shared.isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (isInSSRComponentSetup)) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = reactivity.ref(false); - const error = reactivity.ref(); - const delayed = reactivity.ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = reactivity.ref(false); + const error = reactivity.ref(); + const delayed = reactivity.ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } -function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - // if the internal renderer is not registered, it indicates that this is server-side rendering, - // for KeepAlive, we just need to render its children - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = new Map(); - const keys = new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - shared.invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - shared.invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + shared.invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + shared.invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (shared.isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (shared.isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (shared.isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (shared.isString(pattern)) { + return pattern.split(",").includes(name); + } else if (shared.isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - shared.remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + shared.remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - reactivity.pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - reactivity.resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; - } - else { - const apiName = shared.toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')); - warn(`${apiName} is called when there is no active component instance to be ` + - `associated with. ` + - `Lifecycle injection APIs can only be used during execution of setup().` + - (` If you are using async setup(), make sure to register lifecycle ` + - `hooks before the first await statement.` - )); + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + reactivity.pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + reactivity.resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } else { + const apiName = shared.toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } } -const createHook = (lifecycle) => (hook, target = currentInstance) => -// post-create lifecycle registrations are noops during SSR (except for serverPrefetch) -(!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); -const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); -const onMounted = createHook("m" /* MOUNTED */); -const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); -const onUpdated = createHook("u" /* UPDATED */); -const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); -const onUnmounted = createHook("um" /* UNMOUNTED */); -const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); -const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); -const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); +const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) +); +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook("bu"); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook("bum"); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook("sp"); +const onRenderTriggered = createHook( + "rtg" +); +const onRenderTracked = createHook( + "rtc" +); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } -/** -Runtime helper for applying directives to a vnode. Example usage: - -const comp = resolveComponent('comp') -const foo = resolveDirective('foo') -const bar = resolveDirective('bar') - -return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] -]) -*/ -function validateDirectiveName(name) { - if (shared.isBuiltInDirective(name)) { - warn('Do not use built-in directive ids as custom directive id: ' + name); - } -} -/** - * Adds directives to a VNode. - */ -function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i]; - if (shared.isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - reactivity.pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - reactivity.resetTracking(); - } - } -} - -const COMPONENTS = 'components'; -const DIRECTIVES = 'directives'; -/** - * @private - */ -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol(); -/** - * @private - */ -function resolveDynamicComponent(component) { - if (shared.isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } -} -/** - * @private - */ -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -// implementation -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === shared.camelize(name) || - selfName === shared.capitalize(shared.camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS - ? `\nIf this is a native custom element, make sure to exclude it from ` + - `component resolution via compilerOptions.isCustomElement.` - : ``; - warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } - else { - warn(`resolve${shared.capitalize(type.slice(0, -1))} ` + - `can only be used in render() or setup().`); - } -} -function resolve(registry, name) { - return (registry && - (registry[name] || - registry[shared.camelize(name)] || - registry[shared.capitalize(shared.camelize(name))])); -} - -/** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (shared.isArray(source) || shared.isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (shared.isArray(source) || shared.isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - if (!Number.isInteger(source)) { - warn(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); } - else if (shared.isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else { - ret = []; + } else if (shared.isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } -/** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (shared.isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (shared.isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } -/** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ -function renderSlot(slots, name, props = {}, -// this is not a user-facing function, so the fallback is always generated by -// the compiler and guaranteed to be a function returning an array -fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` + - `function. You need to mark this component with $dynamic-slots in the ` + - `parent template.`); - slot = () => []; - } - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } -/** - * For prefixing keys in v-on="obj" with "on" - * @private - */ -function toHandlers(obj) { - const ret = {}; - if (!shared.isObject(obj)) { - warn(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[shared.toHandlerKey(key)] = obj[key]; - } +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!shared.isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : shared.toHandlerKey(key)] = obj[key]; + } + return ret; } -/** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; -const publicPropertiesMap = -// Move PURE marker to new line to workaround compiler discarding it -// due to type annotation -/*#__PURE__*/ shared.extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => (reactivity.shallowReadonly(i.props) ), - $attrs: i => (reactivity.shallowReadonly(i.attrs) ), - $slots: i => (reactivity.shallowReadonly(i.slots) ), - $refs: i => (reactivity.shallowReadonly(i.refs) ), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (resolveMergedOptions(i) ), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (instanceWatch.bind(i) ) -}); -const isReservedPrefix = (key) => key === '_' || key === '$'; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => reactivity.shallowReadonly(i.props) , + $attrs: (i) => reactivity.shallowReadonly(i.attrs) , + $slots: (i) => reactivity.shallowReadonly(i.slots) , + $refs: (i) => reactivity.shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // for internal formatters to know that this is a Vue instance - if (key === '__isVue') { - return true; - } - // prioritize <script setup> bindings during dev. - // this allows even properties that start with _ or $ to be used - so that - // it aligns with the production behavior where the render fn is inlined and - // indeed has access to all declared variables. - if (setupState !== shared.EMPTY_OBJ && - setupState.__isScriptSetup && - shared.hasOwn(setupState, key)) { - return setupState[key]; - } - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - shared.hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - reactivity.track(instance, "get" /* GET */, key); - markAttrsAccessed(); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - shared.hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else if (currentRenderingInstance && - (!shared.isString(key) || - // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf('__v') !== 0)) { - if (data !== shared.EMPTY_OBJ && isReservedPrefix(key[0]) && shared.hasOwn(data, key)) { - warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` + - `character ("$" or "_") and is not proxied on the render context.`); - } - else if (instance === currentRenderingInstance) { - warn(`Property ${JSON.stringify(key)} was accessed during render ` + - `but is not defined on instance.`); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (shared.hasOwn(instance.props, key)) { - warn(`Attempting to mutate prop "${key}". Props are readonly.`, instance); - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - warn(`Attempting to mutate public property "${key}". ` + - `Properties starting with $ are reserved and readonly.`, instance); - return false; - } - else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } - else { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) || - (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key)) || - shared.hasOwn(ctx, key) || - shared.hasOwn(publicPropertiesMap, key) || - shared.hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (shared.hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + reactivity.track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + reactivity.track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, shared.hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!shared.isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== shared.EMPTY_OBJ && isReservedPrefix(key[0]) && shared.hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && shared.hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { + data[key] = value; + return true; + } else if (shared.hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (shared.hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } }; { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn(`Avoid app logic that relies on enumerating keys on a component instance. ` + - `The keys will be empty in production mode to avoid performance overhead.`); - return Reflect.ownKeys(target); - }; + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; } -const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ shared.extend({}, PublicInstanceProxyHandlers, { +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend( + {}, + PublicInstanceProxyHandlers, + { get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !shared.isGloballyWhitelisted(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`); - } - return has; + const has = key[0] !== "_" && !shared.isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } -}); -// dev only -// In dev mode, the proxy target exposes the same properties as seen on `this` -// for easier console inspection. In prod mode it will be an empty object so -// these properties definitions can be skipped. + } +); function createDevRenderContext(instance) { - const target = {}; - // expose internal instance for proxy handlers - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: shared.NOOP }); - // expose public properties - Object.keys(publicPropertiesMap).forEach(key => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: shared.NOOP - }); - }); - return target; + }); + return target; } -// dev only function exposePropsOnRenderContext(instance) { - const { ctx, propsOptions: [propsOptions] } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach(key => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: shared.NOOP - }); - }); - } -} -// dev only -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(reactivity.toRaw(setupState)).forEach(key => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` + - `which are reserved prefixes for Vue internals.`); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: shared.NOOP - }); - } + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: shared.NOOP + }); }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(reactivity.toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: shared.NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return shared.isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (shared.isArray(opt) || shared.isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (shared.isArray(a) && shared.isArray(b)) + return a.concat(b); + return shared.extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (shared.isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; } function createDuplicateChecker() { - const cache = Object.create(null); - return (type, key) => { - if (cache[key]) { - warn(`${type} property "${key}" is already defined in ${cache[key]}.`); - } - else { - cache[key] = type; - } - }; + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; } let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } } - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (shared.isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } - else { - warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` + - `Did you reference the function correctly?`); - } - } - } - if (dataOptions) { - if (!shared.isFunction(dataOptions)) { - warn(`The data option must be a function. ` + - `Plain object usage is no longer supported.`); - } - const data = dataOptions.call(publicThis, publicThis); - if (shared.isPromise(data)) { - warn(`data() returned a Promise - note data() cannot be async; If you ` + - `intend to perform data fetching before component renders, use ` + - `async setup() + <Suspense>.`); - } - if (!shared.isObject(data)) { - warn(`data() should return an object.`); - } - else { - instance.data = reactivity.reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - // expose data on ctx during dev - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: shared.NOOP - }); - } - } - } - } - } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = shared.isFunction(opt) - ? opt.bind(publicThis, publicThis) - : shared.isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : shared.NOOP; - if (get === shared.NOOP) { - warn(`Computed property "${key}" has no getter.`); - } - const set = !shared.isFunction(opt) && shared.isFunction(opt.set) - ? opt.set.bind(publicThis) - : () => { - warn(`Write operation failed: computed property "${key}" is readonly.`); - } - ; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = shared.isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (shared.isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (shared.isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === shared.NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP, unwrapRef = false) { - if (shared.isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (shared.isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (reactivity.isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - { - warn(`injected property "${key}" is a ref and will be auto-unwrapped ` + - `and no longer needs \`.value\` in the next minor release. ` + - `To opt-in to the new behavior now, ` + - `set \`app.config.unwrapInjectedRef = true\` (this config is ` + - `temporary and will not be needed in the future.)`); - } - ctx[key] = injected; - } - } - else { - ctx[key] = injected; + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (shared.isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); } { - checkDuplicateProperties("Inject" /* INJECT */, key); + checkDuplicateProperties("Methods" /* METHODS */, key); } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } } + } + if (dataOptions) { + if (!shared.isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (shared.isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!shared.isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactivity.reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: shared.NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = shared.isFunction(opt) ? opt.bind(publicThis, publicThis) : shared.isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : shared.NOOP; + if (get === shared.NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !shared.isFunction(opt) && shared.isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = shared.isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (shared.isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (shared.isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === shared.NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP) { + if (shared.isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (shared.isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (reactivity.isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } } function callHook(hook, instance, type) { - callWithAsyncErrorHandling(shared.isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); + callWithAsyncErrorHandling( + shared.isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (shared.isString(raw)) { - const handler = ctx[raw]; - if (shared.isFunction(handler)) { - watch(getter, handler); - } - else { - warn(`Invalid watch handler specified by key "${raw}"`, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (shared.isString(raw)) { + const handler = ctx[raw]; + if (shared.isFunction(handler)) { + watch(getter, handler); + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } - else if (shared.isFunction(raw)) { - watch(getter, raw.bind(publicThis)); - } - else if (shared.isObject(raw)) { - if (shared.isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = shared.isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (shared.isFunction(handler)) { - watch(getter, handler, raw); - } - else { - warn(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } - else { - warn(`Invalid watch option: "${key}"`, raw); + } else if (shared.isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (shared.isObject(raw)) { + if (shared.isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = shared.isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (shared.isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } } -/** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (shared.isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') { - warn(`"expose" option is ignored when declared in mixins or extends. ` + - `It should only be declared in the base component itself.`); - } - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (shared.extend)(shared.isFunction(to) ? to.call(this, this) : to, shared.isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (shared.extend)( + shared.isFunction(to) ? to.call(this, this) : to, + shared.isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (shared.isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (shared.isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? shared.extend(shared.extend(Object.create(null), to), from) : from; + return to ? shared.extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (shared.isArray(to) && shared.isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return shared.extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = shared.extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = shared.extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; } -function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison -isSSR = false) { - const props = {}; - const attrs = {}; - shared.def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; - } +function createAppContext() { + return { + app: null, + config: { + isNativeTag: shared.NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!shared.isFunction(rootComponent)) { + rootComponent = shared.extend({}, rootComponent); } - // validation + if (rootProps != null && !shared.isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && shared.isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (shared.isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { { - validateProps(rawProps || {}, props, instance); + warn$1(`provide() can only be used inside setup().`); } - if (isStateful) { - // stateful - instance.props = isSSR ? props : reactivity.shallowReactive(props); + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; - } - else { - // functional w/ declared props - instance.props = props; - } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); } - instance.attrs = attrs; + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + shared.def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : reactivity.shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = reactivity.toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = reactivity.toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !((instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId))) && - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (shared.hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = shared.camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (shared.hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = shared.camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!shared.hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!shared.hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !shared.hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - reactivity.trigger(instance, "set" /* SET */, '$attrs'); - } - { - validateProps(rawProps || {}, props, instance); - } + } + if (hasAttrsChanged) { + reactivity.trigger(instance, "set", "$attrs"); + } + { + validateProps(rawProps || {}, props, instance); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (shared.isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && shared.hasOwn(options, (camelKey = shared.camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (shared.isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = reactivity.toRaw(props); - const castValues = rawCastValues || shared.EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !shared.hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = reactivity.toRaw(props); + const castValues = rawCastValues || shared.EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !shared.hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = shared.hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && shared.isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === shared.hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = shared.hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === shared.hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!shared.isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + shared.extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (!shared.isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - shared.extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, shared.EMPTY_ARR); - return shared.EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (shared.isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!shared.isString(raw[i])) { - warn(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = shared.camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = shared.EMPTY_OBJ; - } - } + } + if (!raw && !hasExtends) { + if (shared.isObject(comp)) { + cache.set(comp, shared.EMPTY_ARR); } - else if (raw) { - if (!shared.isObject(raw)) { - warn(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = shared.camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || shared.hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } + return shared.EMPTY_ARR; + } + if (shared.isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!shared.isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = shared.camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = shared.EMPTY_OBJ; + } } - const res = [normalized, needCastKeys]; + } else if (raw) { + if (!shared.isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = shared.camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || shared.hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (shared.isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - else { - warn(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; + if (key[0] !== "$") { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; } -// use function string name to check type constructors -// so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (shared.isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (shared.isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (shared.isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (shared.isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } -/** - * dev only - */ function validateProps(rawProps, props, instance) { - const resolvedValues = reactivity.toRaw(props); - const options = instance.propsOptions[0]; - for (const key in options) { - let opt = options[key]; - if (opt == null) - continue; - validateProp(key, resolvedValues[key], opt, !shared.hasOwn(rawProps, key) && !shared.hasOwn(rawProps, shared.hyphenate(key))); - } + const resolvedValues = reactivity.toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + reactivity.shallowReadonly(resolvedValues) , + !shared.hasOwn(rawProps, key) && !shared.hasOwn(rawProps, shared.hyphenate(key)) + ); + } } -/** - * dev only - */ -function validateProp(name, value, prop, isAbsent) { - const { type, required, validator } = prop; - // required! - if (required && isAbsent) { - warn('Missing required prop: "' + name + '"'); - return; +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = shared.isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; } - // missing but optional - if (value == null && !prop.required) { - return; - } - // type check - if (type != null && type !== true) { - let isValid = false; - const types = shared.isArray(type) ? type : [type]; - const expectedTypes = []; - // value is valid as long as one of the specified types match - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ''); - isValid = valid; - } - if (!isValid) { - warn(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - // custom validator - if (validator && !validator(value)) { - warn('Invalid prop: custom validator check failed for prop "' + name + '".'); + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } } -const isSimpleType = /*#__PURE__*/ shared.makeMap('String,Number,Boolean,Function,Symbol,BigInt'); -/** - * dev only - */ +const isSimpleType = /* @__PURE__ */ shared.makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; } - else if (expectedType === 'Object') { - valid = shared.isObject(value); - } - else if (expectedType === 'Array') { - valid = shared.isArray(value); - } - else if (expectedType === 'null') { - valid = value === null; - } - else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; + } else if (expectedType === "Object") { + valid = shared.isObject(value); + } else if (expectedType === "Array") { + valid = shared.isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; } -/** - * dev only - */ function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid prop: type check failed for prop "${name}".` + - ` Expected ${expectedTypes.map(shared.capitalize).join(' | ')}`; - const expectedType = expectedTypes[0]; - const receivedType = shared.toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(shared.capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = shared.toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; } -/** - * dev only - */ function styleValue(value, type) { - if (type === 'String') { - return `"${value}"`; - } - else if (type === 'Number') { - return `${Number(value)}`; - } - else { - return `${value}`; - } + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } } -/** - * dev only - */ function isExplicable(type) { - const explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(elem => type.toLowerCase() === elem); + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); } -/** - * dev only - */ function isBoolean(...args) { - return args.some(elem => elem.toLowerCase() === 'boolean'); + return args.some((elem) => elem.toLowerCase() === "boolean"); } -const isInternalKey = (key) => key[0] === '_' || key === '$stable'; -const normalizeSlotValue = (value) => shared.isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); } - const normalized = withCtx((...args) => { - if (currentInstance) { - warn(`Slot "${key}" invoked outside of the render function: ` + - `this will not track dependencies used in the slot. ` + - `Invoke the slot function inside the render function instead.`); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (shared.isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - { - warn(`Non-function value encountered for slot "${key}". ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (shared.isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && - !(false )) { - warn(`Non-function value encountered for default slot. ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = reactivity.toRaw(children); - // make compiler marker non-enumerable - shared.def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = reactivity.toRaw(children); + shared.def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - shared.def(instance.slots, InternalObjectKey, 1); + } + shared.def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = shared.EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if (isHmrUpdating) { - // Parent was HMR updated so slot content may have changed. - // force update slots and mark instance for hmr as well - shared.extend(slots, children); - } - else if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - shared.extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = shared.EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + shared.extend(slots, children); + reactivity.trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + shared.extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; -function createAppContext() { - return { - app: null, - config: { - isNativeTag: shared.NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; -} -let uid = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!shared.isFunction(rootComponent)) { - rootComponent = { ...rootComponent }; - } - if (rootProps != null && !shared.isObject(rootProps)) { - warn(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn(`app.config cannot be replaced. Modify individual options instead.`); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn(`Plugin has already been applied to target app.`); - } - else if (plugin && shared.isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (shared.isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else { - warn(`A plugin must either be a function or an object with an "install" ` + - `function.`); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - else { - warn('Mixin has already been applied to target app' + - (mixin.name ? `: ${mixin.name}` : '')); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - // #5571 - if (rootContainer.__vue_app__) { - warn(`There is already an app instance mounted on the host container.\n` + - ` If you want to mount another app on the same host container,` + - ` you need to unmount the previous app by calling \`app.unmount()\` first.`); - } - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - // HMR root reload - { - context.reload = () => { - render(cloneVNode(vnode), rootContainer, isSVG); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - else { - warn(`App has already been mounted.\n` + - `If you want to remount the same app, move your app creation logic ` + - `into a factory function and create fresh app instances for each ` + - `mount - e.g. \`const createMyApp = () => createApp(App)\``); - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } - else { - warn(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn(`App already provides property with key "${String(key)}". ` + - `It will be overwritten with the new value.`); - } - context.provides[key] = value; - return app; - } - }); - return app; - }; -} - -/** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (shared.isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (shared.isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (shared.isString(oldRef)) { + refs[oldRef] = null; + if (shared.hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (reactivity.isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + - `A vnode with ref must be created inside the render function.`); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === shared.EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (shared.isString(oldRef)) { - refs[oldRef] = null; - if (shared.hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; + } + if (shared.isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = shared.isString(ref); + const _isRef = reactivity.isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? shared.hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + shared.isArray(existing) && shared.remove(existing, refValue); + } else { + if (!shared.isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (shared.hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } + } + } else if (_isString) { + refs[ref] = value; + if (shared.hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - else if (reactivity.isRef(oldRef)) { - oldRef.value = null; - } - } - if (shared.isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = shared.isString(ref); - const _isRef = reactivity.isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - shared.isArray(existing) && shared.remove(existing, refValue); - } - else { - if (!shared.isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (shared.hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } - else if (_isString) { - refs[ref] = value; - if (shared.hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (reactivity.isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else { - warn('Invalid template ref type:', ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } - else { - doSet(); - } - } - else { - warn('Invalid template ref type:', ref, `(${typeof ref})`); - } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } + } } let hasMismatch = false; -const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; +}; const isComment = (node) => node.nodeType === 8 /* COMMENT */; -// Note: hydration is DOM-specific -// But we have to place it in core due to tight coupling with core - splitting -// it out creates a ton of unnecessary complexity. -// Hydration also depends on some renderer internal logic which needs to be -// passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn(`Attempting to hydrate existing markup but container is empty. ` + - `Performing full mount instead.`); - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - warn(`Hydration text mismatch:` + - `\n- Client: ${JSON.stringify(node.data)}` + - `\n- Server: ${JSON.stringify(vnode.children)}`); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else { - warn('Invalid HostVNode type:', type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (shared.isOn(key) && !shared.isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if (!hasWarned) { - warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + if (!("__vnode" in node)) { + Object.defineProperty(node, "__vnode", { + value: vnode, + enumerable: false + }); + } + if (!("__vueParentComponent" in node)) { + Object.defineProperty(node, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + hasMismatch = true; + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + el.textContent = vnode.children; + } + } + if (props) { + { + for (const key in props) { + if (propHasMismatch(el, key, props[key], vnode)) { + hasMismatch = true; + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - return node; - }; - return [hydrate, hydrateNode]; + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = shared.normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style"); + expected = shared.isString(clientValue) ? clientValue : shared.stringifyStyle(shared.normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = mismatchKey = "style"; + } + } else if (el instanceof SVGElement && shared.isKnownSvgAttr(key) || el instanceof HTMLElement && (shared.isBooleanAttr(key) || shared.isKnownHtmlAttr(key))) { + if (shared.isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = shared.includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = shared.isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = `attribute`; + mismatchKey = key; + } + } + if (mismatchType) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${mismatchType} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key == null ? void 0 : key.trim(); + value = value == null ? void 0 : value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; } -/* eslint-disable no-restricted-globals */ let supported; let perf; function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } } function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } } function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } + if (supported !== void 0) { return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; } -const queuePostRenderEffect = queueEffectWithSuspense - ; -/** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ +const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } -// Separate API for creating hydration-enabled renderer. -// Hydration logic is only used when calling this function, making it -// tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } -// implementation function baseCreateRenderer(options, createHydrationFns) { - const target = shared.getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + const target = shared.getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = shared.NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = shared.NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else { - warn('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !shared.isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || shared.EMPTY_OBJ; + const newProps = n2.props || shared.EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); } + } } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); } - else { - // there's no support for dynamic comments - n2.el = n1.el; + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== shared.EMPTY_OBJ) { + for (const key in oldProps) { + if (!shared.isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); + } + for (const key in newProps) { + if (shared.isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !shared.isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + shared.invokeArrayFns(bm); } - { - Object.defineProperty(el, '__vnode', { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, '__vueParentComponent', { - value: parentComponent, - enumerable: false - }); + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && - subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - subTree = - filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || shared.EMPTY_OBJ; - const newProps = n2.props || shared.EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - // HMR updated, force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (shared.isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== shared.EMPTY_OBJ) { - for (const key in oldProps) { - if (!shared.isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (// #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) { - // HMR updated / Dev root fragment (w/ comments), force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { { - startMeasure(instance, `init`); + startMeasure(instance, `render`); } - setupComponent(instance); + instance.subTree = renderComponentRoot(instance); { - endMeasure(instance, `init`); + endMeasure(instance, `render`); } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); return; + } } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); + let originNext = next; + let vnodeHook; { - popWarningContext(); - endMeasure(instance, `mount`); + pushWarningContext(next || instance.vnode); } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - // async & still pending - just update props and slots - // since the component's reactive effect for render isn't set-up yet - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; + if (bu) { + shared.invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - shared.invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - { - startMeasure(instance, `render`); - } - const subTree = (instance.subTree = renderComponentRoot(instance)); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - shared.invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - // render - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new reactivity.ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates toggleRecurse(instance, true); { - effect.onTrack = instance.rtc - ? e => shared.invokeArrayFns(instance.rtc, e) - : void 0; - effect.onTrigger = instance.rtg - ? e => shared.invokeArrayFns(instance.rtg, e) - : void 0; - update.ownerInstance = instance; + startMeasure(instance, `render`); } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - reactivity.pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - reactivity.resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || shared.EMPTY_ARR; - c2 = c2 || shared.EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); + if (u) { + queuePostRenderEffect(u, parentSuspense); } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : shared.EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); - } - }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && - vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ && - transition && - !transition.persisted) { - vnode.children.forEach(child => { - if (child.type === Comment) { - hostRemove(child.el); - } - else { - remove(child); - } - }); - } - else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - shared.invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); } { - devtoolsComponentRemoved(instance); + devtoolsComponentUpdated(instance); } + { + popWarningContext(); + } + } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } + const effect = instance.effect = new reactivity.ReactiveEffect( + componentUpdateFn, + shared.NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + update.id = instance.uid; + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => shared.invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => shared.invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + reactivity.pauseTracking(); + flushPreFlushCbs(instance); + reactivity.resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || shared.EMPTY_ARR; + c2 = c2 || shared.EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : shared.EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + shared.invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } -/** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (shared.isArray(ch1) && shared.isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } - // also inherit for comment nodes, but not placeholders (e.g. v-if which - // would have received .el during block patch) - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } + const ch1 = n1.children; + const ch2 = n2.children; + if (shared.isArray(ch1) && shared.isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } } + } } -// https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); -const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (shared.isString(targetSelector)) { - if (!select) { - warn(`Current renderer does not support string target for Teleports. ` + - `(missing querySelector renderer option)`); - return null; - } - else { - const target = select(targetSelector); - if (!target) { - warn(`Failed to locate Teleport target with selector "${targetSelector}". ` + - `Note the target element must exist before the component is mounted - ` + - `i.e. the target cannot be rendered by the component itself, and ` + - `ideally should be outside of the entire Vue component tree.`); - } - return target; - } + const targetSelector = props && props.to; + if (shared.isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; } - else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); } + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - // #3302 - // HMR updated, force full diff - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = createComment('teleport start') - ); - const mainAnchor = (n2.anchor = createComment('teleport end') - ); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - else if (!disabled) { - warn('Invalid Teleport target on mount:', target, `(${typeof target})`); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } - } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - else { - warn('Invalid Teleport target on update:', target, `(${typeof target})`); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } - } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } + } else if (!disabled) { + warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } -// Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; +function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} -const Fragment = Symbol('Fragment' ); -const Text = Symbol('Text' ); -const Comment = Symbol('Comment' ); -const Static = Symbol('Static' ); -// Since v-if and v-for are the two possible ways node structure can dynamically -// change, once we consider v-if branches and each v-for fragment a block, we -// can divide a template into nested blocks, and within each block the node -// structure would be stable. This allows us to skip most children diffing -// and only worry about the dynamic nodes (indicated by patch flags). +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; -/** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } -// Whether we should be tracking dynamic child nodes inside a block. -// Only tracks when this value is > 0 -// We are not using a simple boolean because this value may need to be -// incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; -/** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } -/** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } -/** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 /* COMPONENT */ && - hmrDirtyComponents.has(n2.type)) { - // HMR only: if the component has been hot-updated, force a reload. - return false; - } - return n1.type === n2.type && n1.key === n2.key; + if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; } let vnodeArgsTransformer; -/** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; + vnodeArgsTransformer = transformer; } const createVNodeWithArgsTransform = (...args) => { - return _createVNode(...(vnodeArgsTransformer - ? vnodeArgsTransformer(args, currentRenderingInstance) - : args)); + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); }; const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= shared.isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // validate key - if (vnode.key !== vnode.key) { - warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= shared.isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } -const createVNode = (createVNodeWithArgsTransform ); +const createVNode = createVNodeWithArgsTransform ; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !shared.isString(klass)) { - props.class = shared.normalizeClass(klass); - } - if (shared.isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (reactivity.isProxy(style) && !shared.isArray(style)) { - style = shared.extend({}, style); - } - props.style = shared.normalizeStyle(style); - } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !shared.isString(klass)) { + props.class = shared.normalizeClass(klass); } - // encode the vnode type information into a bitmap - const shapeFlag = shared.isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : shared.isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : shared.isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && reactivity.isProxy(type)) { - type = reactivity.toRaw(type); - warn(`Vue received a Component which was made a reactive object. This can ` + - `lead to unnecessary performance overhead, and should be avoided by ` + - `marking the component with \`markRaw\` or using \`shallowRef\` ` + - `instead of \`ref\`.`, `\nComponent that was made reactive: `, type); + if (shared.isObject(style)) { + if (reactivity.isProxy(style) && !shared.isArray(style)) { + style = shared.extend({}, style); + } + props.style = shared.normalizeStyle(style); } - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = shared.isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : shared.isObject(type) ? 4 : shared.isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && reactivity.isProxy(type)) { + type = reactivity.toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return reactivity.isProxy(props) || InternalObjectKey in props - ? shared.extend({}, props) - : props; + if (!props) + return null; + return reactivity.isProxy(props) || InternalObjectKey in props ? shared.extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? shared.isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 /* HOISTED */ && shared.isArray(children) - ? children.map(deepCloneVNode) - : children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? shared.isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && shared.isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } -/** - * Dev only, for HMR of hoisted vnodes reused in v-for - * https://github.com/vitejs/vite/issues/2022 - */ function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (shared.isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; + const cloned = cloneVNode(vnode); + if (shared.isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; } -/** - * @private - */ -function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } -/** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } -/** - * @private - */ -function createCommentVNode(text = '', -// when used as the v-else branch, the comment node must be created as a -// block to ensure correct updates. -asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (shared.isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (shared.isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } -// optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (shared.isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (shared.isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (shared.isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (shared.isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = shared.normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = shared.normalizeStyle([ret.style, toMerge.style]); - } - else if (shared.isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(shared.isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = shared.normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = shared.normalizeStyle([ret.style, toMerge.style]); + } else if (shared.isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); -let uid$1 = 0; +let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new reactivity.EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: shared.EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: shared.EMPTY_OBJ, - data: shared.EMPTY_OBJ, - props: shared.EMPTY_OBJ, - attrs: shared.EMPTY_OBJ, - slots: shared.EMPTY_OBJ, - refs: shared.EMPTY_OBJ, - setupState: shared.EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new reactivity.EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: shared.EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: shared.EMPTY_OBJ, + data: shared.EMPTY_OBJ, + props: shared.EMPTY_OBJ, + attrs: shared.EMPTY_OBJ, + slots: shared.EMPTY_OBJ, + refs: shared.EMPTY_OBJ, + setupState: shared.EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = shared.getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) + setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) + setters.forEach((set) => set(v)); + else + setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; -const isBuiltInTag = /*#__PURE__*/ shared.makeMap('slot,component'); +const isBuiltInTag = /* @__PURE__ */ shared.makeMap("slot,component"); function validateComponentName(name, config) { - const appIsNativeTag = config.isNativeTag || shared.NO; - if (isBuiltInTag(name) || appIsNativeTag(name)) { - warn('Do not use built-in or reserved HTML elements as component id: ' + name); - } + const appIsNativeTag = config.isNativeTag || shared.NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } } function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn(`"compilerOptions" is only supported when using a build of Vue that ` + - `includes the runtime compiler. Since you are using a runtime-only ` + - `build, the options should be passed via your build tool config instead.`); - } + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); } - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - { - exposePropsOnRenderContext(instance); + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } } - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - reactivity.pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [reactivity.shallowReadonly(instance.props) , setupContext]); - reactivity.resetTracking(); - unsetCurrentInstance(); - if (shared.isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous'; - warn(`Component <${name}>: setup function returned a promise, but no ` + - `<Suspense> boundary was found in the parent component tree. ` + - `A component with async setup() must be nested in a <Suspense> ` + - `in order to be rendered.`); - } - } - } - else { - handleSetupResult(instance, setupResult, isSSR); + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + reactivity.pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + reactivity.shallowReadonly(instance.props) , + setupContext + ] + ); + reactivity.resetTracking(); + reset(); + if (shared.isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); } + } + } else { + handleSetupResult(instance, setupResult, isSSR); } - else { - finishComponentSetup(instance, isSSR); - } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (shared.isFunction(setupResult)) { - // setup returned an inline render function - if (instance.type.__ssrInlineRender) { - // when the function's name is `ssrRender` (compiled by SFC inline mode), - // set it as ssrRender instead. - instance.ssrRender = setupResult; - } - else { - instance.render = setupResult; - } + if (shared.isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; } - else if (shared.isObject(setupResult)) { - if (isVNode(setupResult)) { - warn(`setup() should not return VNodes directly - ` + - `return a render function instead.`); - } - // setup returned bindings. - // assuming a render function compiled from template is present. - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = reactivity.proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } + } else if (shared.isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); } - else if (setupResult !== undefined) { - warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`); + { + instance.devtoolsRawSetupState = setupResult; } - finishComponentSetup(instance, isSSR); + instance.setupState = reactivity.proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); } let compile; let installWithProxy; -/** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; } -// dev only const isRuntimeOnly = () => !compile; function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = shared.extend(shared.extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); } - instance.render = (Component.render || shared.NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); - } - } - // support for 2.x options - { - setCurrentInstance(instance); - reactivity.pauseTracking(); - applyOptions(instance); - reactivity.resetTracking(); - unsetCurrentInstance(); - } - // warn missing template/render - // the runtime compilation of template in SSR is done by server-render - if (!Component.render && instance.render === shared.NOOP && !isSSR) { - /* istanbul ignore if */ - if (!compile && Component.template) { - warn(`Component provided template option but ` + - `runtime compilation is not supported in this build of Vue.` + - (``) /* should not happen */); - } - else { - warn(`Component is missing template or render function.`); - } - } -} -function createAttrsProxy(instance) { - return new Proxy(instance.attrs, { - get(target, key) { - markAttrsAccessed(); - reactivity.track(instance, "get" /* GET */, '$attrs'); - return target[key]; + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = shared.extend( + shared.extend( + { + isCustomElement, + delimiters }, - set() { - warn(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn(`setupContext.attrs is readonly.`); - return false; - } - } + compilerOptions + ), + componentCompilerOptions ); + Component.render = compile(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || shared.NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + reactivity.pauseTracking(); + try { + applyOptions(instance); + } finally { + reactivity.resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === shared.NOOP && !isSSR) { + if (!compile && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (``) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } +} +function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + markAttrsAccessed(); + reactivity.track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } + )); +} +function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + reactivity.track(instance, "get", "$slots"); + return target[key]; + } + })); } function createSetupContext(instance) { - const expose = exposed => { - if (instance.exposed) { - warn(`expose() should be called only once per setup().`); - } - instance.exposed = exposed || {}; - }; - let attrs; + const expose = (exposed) => { { - // We use getters in dev in case libs like test-utils overwrite instance - // properties (overwrites should not be done in prod) - return Object.freeze({ - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - get slots() { - return reactivity.shallowReadonly(instance.slots); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (shared.isArray(exposed)) { + exposedType = "array"; + } else if (reactivity.isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } } + instance.exposed = exposed || {}; + }; + { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } } const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); -function getComponentName(Component) { - return shared.isFunction(Component) - ? Component.displayName || Component.name - : Component.name; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } -/* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { - return shared.isFunction(value) && '__vccOpts' in value; + return shared.isFunction(value) && "__vccOpts" in value; } -const computed = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup); -}); - -// dev only -const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` + - `<script setup> of a single file component. Its arguments should be ` + - `compiled away and passing it at runtime has no effect.`); -// implementation -function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; -} -// implementation -function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; -} -/** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } -} -/** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ -function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -/** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ -function mergeDefaults(raw, defaults) { - const props = shared.isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (shared.isArray(opt) || shared.isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else { - warn(`props default key "${key}" has no corresponding declaration.`); - } - } - return props; -} -/** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -/** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn(`withAsyncContext called without active current instance. ` + - `This is likely a bug.`); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (shared.isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -// Actual implementation -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -const ssrContextKey = Symbol(`ssrContext` ); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn(`Server rendering context not provided. Make sure to only call ` + - `useSSRContext() conditionally in the server build.`); - } - return ctx; - } +const computed = (getterOrOptions, debugOptions) => { + return reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup); }; +function useModel(props, name, options = shared.EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return reactivity.ref(); + } + if (!i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return reactivity.ref(); + } + const camelizedName = shared.camelize(name); + const hyphenatedName = shared.hyphenate(name); + const res = reactivity.customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (shared.hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } + }; + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - if (typeof window === 'undefined') { - return; - } - const vueStyle = { style: 'color:#3ba776' }; - const numberStyle = { style: 'color:#0b1bc9' }; - const stringStyle = { style: 'color:#b62e24' }; - const keywordStyle = { style: 'color:#9d288c' }; - // custom formatter for Chrome - // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html - const formatter = { - header(obj) { - // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup - if (!shared.isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ['div', vueStyle, `VueInstance`]; - } - else if (reactivity.isRef(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, genRefFlag(obj)], - '<', - formatValue(obj.value), - `>` - ]; - } - else if (reactivity.isReactive(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'], - '<', - formatValue(obj), - `>${reactivity.isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } - else if (reactivity.isReadonly(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'], - '<', - formatValue(obj), - '>' - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - 'div', - {}, - ...formatInstance(obj.$) - ]; - } - } - }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock('props', reactivity.toRaw(instance.props))); - } - if (instance.setupState !== shared.EMPTY_OBJ) { - blocks.push(createInstanceBlock('setup', instance.setupState)); - } - if (instance.data !== shared.EMPTY_OBJ) { - blocks.push(createInstanceBlock('data', reactivity.toRaw(instance.data))); - } - const computed = extractKeys(instance, 'computed'); - if (computed) { - blocks.push(createInstanceBlock('computed', computed)); - } - const injected = extractKeys(instance, 'inject'); - if (injected) { - blocks.push(createInstanceBlock('injected', injected)); - } - blocks.push([ - 'div', - {}, - [ - 'span', - { - style: keywordStyle.style + ';opacity:0.66' - }, - '$ (internal): ' - ], - ['object', { object: instance }] - ]); - return blocks; - } - function createInstanceBlock(type, target) { - target = shared.extend({}, target); - if (!Object.keys(target).length) { - return ['span', {}]; - } + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + header(obj) { + if (!shared.isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (reactivity.isRef(obj)) { return [ - 'div', - { style: 'line-height:1.25em;margin-bottom:0.6em' }, - [ - 'div', - { - style: 'color:#476582' - }, - type - ], - [ - 'div', - { - style: 'padding-left:1.25em' - }, - ...Object.keys(target).map(key => { - return [ - 'div', - {}, - ['span', keywordStyle, key + ': '], - formatValue(target[key], false) - ]; - }) - ] + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + formatValue(obj.value), + `>` ]; + } else if (reactivity.isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${reactivity.isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (reactivity.isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } } - function formatValue(v, asRaw = true) { - if (typeof v === 'number') { - return ['span', numberStyle, v]; - } - else if (typeof v === 'string') { - return ['span', stringStyle, JSON.stringify(v)]; - } - else if (typeof v === 'boolean') { - return ['span', keywordStyle, v]; - } - else if (shared.isObject(v)) { - return ['object', { object: asRaw ? reactivity.toRaw(v) : v }]; - } - else { - return ['span', stringStyle, String(v)]; - } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", reactivity.toRaw(instance.props))); } - function extractKeys(instance, type) { - const Comp = instance.type; - if (shared.isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; + if (instance.setupState !== shared.EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if ((shared.isArray(opts) && opts.includes(key)) || - (shared.isObject(opts) && key in opts)) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) { - return true; - } + if (instance.data !== shared.EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", reactivity.toRaw(instance.data))); } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); } - else { - window.devtoolsFormatters = [formatter]; + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = shared.extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (shared.isObject(v)) { + return ["object", { object: asRaw ? reactivity.toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (shared.isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (shared.isArray(opts) && opts.includes(key) || shared.isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (shared.hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (shared.hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } -// Core API ------------------------------------------------------------------ -const version = "3.2.36"; +const version = "3.4.15"; +const warn = warn$1 ; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = devtools$1 ; +const setDevtoolsHook = setDevtoolsHook$1 ; const _ssrUtils = { - createComponentInstance, - setupComponent, - renderComponentRoot, - setCurrentRenderingInstance, - isVNode, - normalizeVNode + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode }; -/** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ -const ssrUtils = (_ssrUtils ); -/** - * @internal only exposed in compat builds - */ +const ssrUtils = _ssrUtils ; const resolveFilter = null; -/** - * @internal only exposed in compat builds. - */ -const compatUtils = (null); +const compatUtils = null; +const DeprecationTypes = null; exports.EffectScope = reactivity.EffectScope; exports.ReactiveEffect = reactivity.ReactiveEffect; +exports.TrackOpTypes = reactivity.TrackOpTypes; +exports.TriggerOpTypes = reactivity.TriggerOpTypes; exports.customRef = reactivity.customRef; exports.effect = reactivity.effect; exports.effectScope = reactivity.effectScope; @@ -7773,6 +8111,7 @@ exports.stop = reactivity.stop; exports.toRaw = reactivity.toRaw; exports.toRef = reactivity.toRef; exports.toRefs = reactivity.toRefs; +exports.toValue = reactivity.toValue; exports.triggerRef = reactivity.triggerRef; exports.unref = reactivity.unref; exports.camelize = shared.camelize; @@ -7783,13 +8122,18 @@ exports.normalizeStyle = shared.normalizeStyle; exports.toDisplayString = shared.toDisplayString; exports.toHandlerKey = shared.toHandlerKey; exports.BaseTransition = BaseTransition; +exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; exports.Comment = Comment; +exports.DeprecationTypes = DeprecationTypes; +exports.ErrorCodes = ErrorCodes; +exports.ErrorTypeStrings = ErrorTypeStrings; exports.Fragment = Fragment; exports.KeepAlive = KeepAlive; exports.Static = Static; exports.Suspense = Suspense; exports.Teleport = Teleport; exports.Text = Text; +exports.assertNumber = assertNumber; exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; exports.callWithErrorHandling = callWithErrorHandling; exports.cloneVNode = cloneVNode; @@ -7810,18 +8154,24 @@ exports.defineAsyncComponent = defineAsyncComponent; exports.defineComponent = defineComponent; exports.defineEmits = defineEmits; exports.defineExpose = defineExpose; +exports.defineModel = defineModel; +exports.defineOptions = defineOptions; exports.defineProps = defineProps; +exports.defineSlots = defineSlots; +exports.devtools = devtools; exports.getCurrentInstance = getCurrentInstance; exports.getTransitionRawChildren = getTransitionRawChildren; exports.guardReactiveProps = guardReactiveProps; exports.h = h; exports.handleError = handleError; +exports.hasInjectionContext = hasInjectionContext; exports.initCustomFormatter = initCustomFormatter; exports.inject = inject; exports.isMemoSame = isMemoSame; exports.isRuntimeOnly = isRuntimeOnly; exports.isVNode = isVNode; exports.mergeDefaults = mergeDefaults; +exports.mergeModels = mergeModels; exports.mergeProps = mergeProps; exports.nextTick = nextTick; exports.onActivated = onActivated; @@ -7857,6 +8207,7 @@ exports.ssrUtils = ssrUtils; exports.toHandlers = toHandlers; exports.transformVNodeArgs = transformVNodeArgs; exports.useAttrs = useAttrs; +exports.useModel = useModel; exports.useSSRContext = useSSRContext; exports.useSlots = useSlots; exports.useTransitionState = useTransitionState; diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js b/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js index d014fb09..78bda8a7 100644 --- a/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +++ b/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js @@ -1,3 +1,8 @@ +/** +* @vue/runtime-core v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -5,6187 +10,6297 @@ Object.defineProperty(exports, '__esModule', { value: true }); var reactivity = require('@vue/reactivity'); var shared = require('@vue/shared'); -const stack = []; -function warn(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - reactivity.pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); - } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - reactivity.resetTracking(); -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -/* istanbul ignore next */ -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; -} -/* istanbul ignore next */ -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -/* istanbul ignore next */ -function formatProp(key, value, raw) { - if (shared.isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (reactivity.isRef(value)) { - value = formatProp(key, reactivity.toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (shared.isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = reactivity.toRaw(value); - return raw ? value : [`${key}=`, value]; - } +function assertNumber(val, type) { + return; } +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." +}; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (shared.isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && shared.isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (shared.isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && shared.isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = type; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - // recover in prod to reduce the impact on end-user - console.error(err); - } + { + console.error(err); + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; -const pendingPreFlushCbs = []; -let activePreFlushCbs = null; -let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; -const resolvedPromise = /*#__PURE__*/ Promise.resolve(); +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; -let currentPreFlushParentJob = null; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } -// #2768 -// Use binary-search to find a suitable position in the queue, -// so that the queue maintains the increasing order of job's id, -// which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } -} -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} -function queueCb(cb, activeQueue, pendingQueue, index) { - if (!shared.isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } -function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); -} -function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!shared.isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; +const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; +}; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = shared.NOOP; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (false && check(job)) ; - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } - } + isFlushPending = false; + isFlushing = true; + queue.sort(comparator); + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (false) ; + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } - } -} - -let buffer = []; -function setDevtoolsHook(hook, target) { - var _a, _b; - exports.devtools = hook; - if (exports.devtools) { - exports.devtools.enabled = true; - buffer.forEach(({ event, args }) => exports.devtools.emit(event, ...args)); - buffer = []; - } - else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!exports.devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - buffer = []; - } - }, 3000); - } - else { - buffer = []; + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(); } + } } function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || shared.EMPTY_OBJ; - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || shared.EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(shared.toNumber); - } + if (instance.isUnmounted) + return; + const props = instance.vnode.props || shared.EMPTY_OBJ; + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || shared.EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => shared.isString(a) ? a.trim() : a); } - let handlerName; - let handler = props[(handlerName = shared.toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = shared.toHandlerKey(shared.camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = shared.toHandlerKey(shared.hyphenate(event)))]; + if (number) { + args = rawArgs.map(shared.looseToNumber); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = shared.toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = shared.toHandlerKey(shared.camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = shared.toHandlerKey(shared.hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!shared.isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + shared.extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (!shared.isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - shared.extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (shared.isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - shared.extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (shared.isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (shared.isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + shared.extend(normalized, raw); + } + if (shared.isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } -// Check if an incoming prop key is a declared emit event listener. -// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are -// both considered matched listeners. function isEmitListener(options, key) { - if (!options || !shared.isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - shared.hasOwn(options, shared.hyphenate(key)) || - shared.hasOwn(options, key)); + if (!options || !shared.isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return shared.hasOwn(options, key[0].toLowerCase() + key.slice(1)) || shared.hasOwn(options, shared.hyphenate(key)) || shared.hasOwn(options, key); } -/** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; -/** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } -/** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } -/** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } -/** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; -/** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only -) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } function markAttrsAccessed() { } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = false ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if (false && attrs === props) ; - result = normalizeVNode(render.length > 1 - ? render(props, false - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (false) ; + result = normalizeVNode( + render2.length > 1 ? render2( + props, + false ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(shared.isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); } + root = cloneVNode(root, fallthroughAttrs); + } } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(shared.isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - } - } - // inherit directives - if (vnode.dirs) { - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - // inherit transition data - if (vnode.transition) { - root.transition = vnode.transition; - } - { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + } + if (vnode.dirs) { + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + root.transition = vnode.transition; + } + { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } -function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || shared.isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || shared.isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!shared.isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!shared.isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (prevProps === nextProps) { + return false; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!prevProps) { + return !!nextProps; } - return false; + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } -function updateHOCHostEl({ vnode, parent }, el // HostNode -) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (shared.isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === shared.camelize(name) || selfName === shared.capitalize(shared.camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + return res; + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[shared.camelize(name)] || registry[shared.capitalize(shared.camelize(name))]); } const isSuspense = (type) => type.__isSuspense; -// Suspense exposes a component-like API, and is treated like a component -// in the compiler, but internally it's a special built-in type that hooks -// directly into the renderer. +let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren -}; -// Force-casted public typing for h and TSX props inference -const Suspense = (SuspenseImpl ); -function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (shared.isFunction(eventListener)) { - eventListener(); - } -} -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. - suspense.resolve(); - } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = shared.toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, container, - hiddenContainer, anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } - } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); } - return result; - /* eslint-enable no-restricted-globals */ + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren +}; +const Suspense = SuspenseImpl ; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (shared.isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? shared.toNumber(vnode.props.timeout) : void 0; + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (shared.isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (shared.isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (shared.isArray(s)) { - const singleChild = filterSingleRoot(s); - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); - } - return s; + } + if (shared.isArray(s)) { + const singleChild = filterSingleRoot(s); + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (shared.isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (shared.isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } -function provide(key, value) { - if (!currentInstance) ; - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && shared.isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else ; - } -} +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + return ctx; + } +}; -// Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, ({ flush: 'post' })); + return doWatch( + effect, + null, + { flush: "post" } + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, ({ flush: 'sync' })); + return doWatch( + effect, + null, + { flush: "sync" } + ); } -// initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; -// implementation function watch(source, cb, options) { - return doWatch(source, cb, options); + return doWatch(source, cb, options); } -function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = shared.EMPTY_OBJ) { - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (reactivity.isRef(source)) { - getter = () => source.value; - forceTrigger = reactivity.isShallow(source); - } - else if (reactivity.isReactive(source)) { - getter = () => source; - deep = true; - } - else if (shared.isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => reactivity.isReactive(s) || reactivity.isShallow(s)); - getter = () => source.map(s => { - if (reactivity.isRef(s)) { - return s.value; - } - else if (reactivity.isReactive(s)) { - return traverse(s); - } - else if (shared.isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else ; - }); - } - else if (shared.isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = shared.NOOP; - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; +function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger +} = shared.EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - // in SSR there is no need to setup an actual effect, and it should be noop - // unless it's eager - if (isInSSRComponentSetup) { - // we will also not call the invalidate callback (+ runner is not set up) - onCleanup = shared.NOOP; - if (!cb) { - getter(); - } - else if (immediate) { - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - getter(), - isMultiSource ? [] : undefined, - onCleanup - ]); - } - return shared.NOOP; - } - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) - : shared.hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new reactivity.ReactiveEffect(getter, scheduler); - // initial run + } + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (reactivity.isRef(source)) { + getter = () => source.value; + forceTrigger = reactivity.isShallow(source); + } else if (reactivity.isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (shared.isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => reactivity.isReactive(s) || reactivity.isShallow(s)); + getter = () => source.map((s) => { + if (reactivity.isRef(s)) { + return s.value; + } else if (reactivity.isReactive(s)) { + return reactiveGetter(s); + } else if (shared.isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else ; + }); + } else if (shared.isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - shared.remove(instance.scope.effects, effect); - } + } else { + getter = shared.NOOP; + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let ssrCleanup; + if (isInSSRComponentSetup) { + onCleanup = shared.NOOP; + if (!cb) { + getter(); + } else if (immediate) { + callWithAsyncErrorHandling(cb, instance, 3, [ + getter(), + isMultiSource ? [] : void 0, + onCleanup + ]); + } + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else { + return shared.NOOP; + } + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => shared.hasChanged(v, oldValue[i])) : shared.hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new reactivity.ReactiveEffect(getter, shared.NOOP, scheduler); + const scope = reactivity.getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + shared.remove(scope.effects, effect); + } + }; + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + if (ssrCleanup) + ssrCleanup.push(unwatch); + return unwatch; } -// this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = shared.isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (shared.isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = shared.isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (shared.isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } -function traverse(value, seen) { - if (!shared.isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (reactivity.isRef(value)) { - traverse(value.value, seen); - } - else if (shared.isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (shared.isSet(value) || shared.isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (shared.isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } +function traverse(value, depth, currentDepth = 0, seen) { + if (!shared.isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (reactivity.isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (shared.isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (shared.isSet(value) || shared.isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (shared.isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i]; + if (dir) { + if (shared.isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + reactivity.pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + reactivity.resetTracking(); + } + } +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - child = c; - break; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = reactivity.toRaw(props); - const { mode } = rawProps; - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + for (const c of children) { + if (c.type !== Comment) { + child = c; + break; + } + } + } + const rawProps = reactivity.toRaw(props); + const { mode } = rawProps; + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } -// The transition hooks are attached to the vnode as vnode.transition -// and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (shared.isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; -} -// the placeholder really only handles one special case: KeepAlive -// in the case of a KeepAlive in a leave phase we need to return a KeepAlive -// placeholder with empty content to avoid the KeepAlive instance from being -// unmounted. -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (shared.isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey]) { + el[enterCbKey]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } -// implementation, close to no-op -function defineComponent(options) { - return shared.isFunction(options) ? { setup: options, name: options.name } : options; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return shared.isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (shared.isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (shared.isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (isInSSRComponentSetup)) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = reactivity.ref(false); - const error = reactivity.ref(); - const delayed = reactivity.ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = reactivity.ref(false); + const error = reactivity.ref(); + const delayed = reactivity.ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } -function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - // if the internal renderer is not registered, it indicates that this is server-side rendering, - // for KeepAlive, we just need to render its children - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = new Map(); - const keys = new Set(); - let current = null; - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - shared.invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - shared.invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + shared.invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + shared.invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (shared.isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (shared.isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (shared.isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (shared.isString(pattern)) { + return pattern.split(",").includes(name); + } else if (shared.isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - shared.remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + shared.remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - reactivity.pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - reactivity.resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + reactivity.pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + reactivity.resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } } -const createHook = (lifecycle) => (hook, target = currentInstance) => -// post-create lifecycle registrations are noops during SSR (except for serverPrefetch) -(!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); -const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); -const onMounted = createHook("m" /* MOUNTED */); -const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); -const onUpdated = createHook("u" /* UPDATED */); -const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); -const onUnmounted = createHook("um" /* UNMOUNTED */); -const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); -const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); -const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); +const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) +); +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook("bu"); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook("bum"); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook("sp"); +const onRenderTriggered = createHook( + "rtg" +); +const onRenderTracked = createHook( + "rtc" +); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } -/** -Runtime helper for applying directives to a vnode. Example usage: - -const comp = resolveComponent('comp') -const foo = resolveDirective('foo') -const bar = resolveDirective('bar') - -return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] -]) -*/ -/** - * Adds directives to a VNode. - */ -function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = shared.EMPTY_OBJ] = directives[i]; - if (shared.isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - reactivity.pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - reactivity.resetTracking(); - } - } -} - -const COMPONENTS = 'components'; -const DIRECTIVES = 'directives'; -/** - * @private - */ -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol(); -/** - * @private - */ -function resolveDynamicComponent(component) { - if (shared.isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } -} -/** - * @private - */ -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -// implementation -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === shared.camelize(name) || - selfName === shared.capitalize(shared.camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - return res; - } -} -function resolve(registry, name) { - return (registry && - (registry[name] || - registry[shared.camelize(name)] || - registry[shared.capitalize(shared.camelize(name))])); -} - -/** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (shared.isArray(source) || shared.isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (shared.isArray(source) || shared.isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else if (shared.isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + } else if (shared.isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } -/** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (shared.isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (shared.isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } -/** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ -function renderSlot(slots, name, props = {}, -// this is not a user-facing function, so the fallback is always generated by -// the compiler and guaranteed to be a function returning an array -fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } -/** - * For prefixing keys in v-on="obj" with "on" - * @private - */ -function toHandlers(obj) { - const ret = {}; - for (const key in obj) { - ret[shared.toHandlerKey(key)] = obj[key]; - } - return ret; +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : shared.toHandlerKey(key)] = obj[key]; + } + return ret; } -/** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; -const publicPropertiesMap = -// Move PURE marker to new line to workaround compiler discarding it -// due to type annotation -/*#__PURE__*/ shared.extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => (i.props), - $attrs: i => (i.attrs), - $slots: i => (i.slots), - $refs: i => (i.refs), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (resolveMergedOptions(i) ), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (instanceWatch.bind(i) ) -}); +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ shared.extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => i.props, + $attrs: (i) => i.attrs, + $slots: (i) => i.slots, + $refs: (i) => i.refs, + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - shared.hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - reactivity.track(instance, "get" /* GET */, key); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: return ctx[key]; + case 3 /* PROPS */: + return props[key]; } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - shared.hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else ; - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (shared.hasOwn(instance.props, key)) { - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - return false; - } - else { - { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) || - (setupState !== shared.EMPTY_OBJ && shared.hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key)) || - shared.hasOwn(ctx, key) || - shared.hasOwn(publicPropertiesMap, key) || - shared.hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (shared.hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && shared.hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + reactivity.track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== shared.EMPTY_OBJ && shared.hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, shared.hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else ; + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (data !== shared.EMPTY_OBJ && shared.hasOwn(data, key)) { + data[key] = value; + return true; + } else if (shared.hasOwn(instance.props, key)) { + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + return false; + } else { + { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== shared.EMPTY_OBJ && shared.hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && shared.hasOwn(normalizedProps, key) || shared.hasOwn(ctx, key) || shared.hasOwn(publicPropertiesMap, key) || shared.hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (shared.hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } }; -const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ shared.extend({}, PublicInstanceProxyHandlers, { +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ shared.extend( + {}, + PublicInstanceProxyHandlers, + { get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !shared.isGloballyWhitelisted(key); - return has; + const has = key[0] !== "_" && !shared.isGloballyAllowed(key); + return has; } -}); + } +); + +function defineProps() { + return null; +} +function defineEmits() { + return null; +} +function defineExpose(exposed) { +} +function defineOptions(options) { +} +function defineSlots() { + return null; +} +function defineModel() { +} +function withDefaults(props, defaults) { + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return shared.isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (shared.isArray(opt) || shared.isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else ; + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (shared.isArray(a) && shared.isArray(b)) + return a.concat(b); + return shared.extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (shared.isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; +} let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = null; - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (shared.isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - { - ctx[key] = methodHandler.bind(publicThis); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = null; + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (shared.isFunction(methodHandler)) { + { + ctx[key] = methodHandler.bind(publicThis); } + } } - if (dataOptions) { - const data = dataOptions.call(publicThis, publicThis); - if (!shared.isObject(data)) ; - else { - instance.data = reactivity.reactive(data); - } + } + if (dataOptions) { + const data = dataOptions.call(publicThis, publicThis); + if (!shared.isObject(data)) ; else { + instance.data = reactivity.reactive(data); } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = shared.isFunction(opt) - ? opt.bind(publicThis, publicThis) - : shared.isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : shared.NOOP; - const set = !shared.isFunction(opt) && shared.isFunction(opt.set) - ? opt.set.bind(publicThis) - : shared.NOOP; - const c = computed({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) - }); - } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = shared.isFunction(opt) ? opt.bind(publicThis, publicThis) : shared.isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : shared.NOOP; + const set = !shared.isFunction(opt) && shared.isFunction(opt.set) ? opt.set.bind(publicThis) : shared.NOOP; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); } - if (provideOptions) { - const provides = shared.isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); + } + if (provideOptions) { + const provides = shared.isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (shared.isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (shared.isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (shared.isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (shared.isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === shared.NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; + } + if (render && instance.render === shared.NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; } -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP, unwrapRef = false) { - if (shared.isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = shared.NOOP) { + if (shared.isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (shared.isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (shared.isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (reactivity.isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - ctx[key] = injected; - } - } - else { - ctx[key] = injected; - } + if (reactivity.isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; } + } } function callHook(hook, instance, type) { - callWithAsyncErrorHandling(shared.isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); + callWithAsyncErrorHandling( + shared.isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (shared.isString(raw)) { - const handler = ctx[raw]; - if (shared.isFunction(handler)) { - watch(getter, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (shared.isString(raw)) { + const handler = ctx[raw]; + if (shared.isFunction(handler)) { + watch(getter, handler); } - else if (shared.isFunction(raw)) { - watch(getter, raw.bind(publicThis)); + } else if (shared.isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (shared.isObject(raw)) { + if (shared.isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = shared.isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (shared.isFunction(handler)) { + watch(getter, handler, raw); + } } - else if (shared.isObject(raw)) { - if (shared.isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = shared.isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (shared.isFunction(handler)) { - watch(getter, handler, raw); - } - } - } - else ; + } else ; } -/** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (shared.isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") ; else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') ; - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (shared.extend)(shared.isFunction(to) ? to.call(this, this) : to, shared.isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (shared.extend)( + shared.isFunction(to) ? to.call(this, this) : to, + shared.isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (shared.isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (shared.isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? shared.extend(shared.extend(Object.create(null), to), from) : from; + return to ? shared.extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (shared.isArray(to) && shared.isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return shared.extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = shared.extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = shared.extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; } -function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison -isSSR = false) { - const props = {}; - const attrs = {}; - shared.def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; - } +function createAppContext() { + return { + app: null, + config: { + isNativeTag: shared.NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!shared.isFunction(rootComponent)) { + rootComponent = shared.extend({}, rootComponent); } - if (isStateful) { - // stateful - instance.props = isSSR ? props : reactivity.shallowReactive(props); + if (rootProps != null && !shared.isObject(rootProps)) { + rootProps = null; } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) ; else if (plugin && shared.isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (shared.isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else ; + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } } - else { - // functional w/ declared props - instance.props = props; + return app; + }, + component(name, component) { + if (!component) { + return context.components[name]; } + context.components[name] = component; + return app; + }, + directive(name, directive) { + if (!directive) { + return context.directives[name]; + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + return getExposeProxy(vnode.component) || vnode.component.proxy; + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + delete app._container.__vue_app__; + } + }, + provide(key, value) { + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) ; else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); } - instance.attrs = attrs; + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && shared.isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else ; + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + shared.def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + if (isStateful) { + instance.props = isSSR ? props : reactivity.shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = reactivity.toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = reactivity.toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (shared.hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = shared.camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (shared.hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = shared.camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!shared.hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } - } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!shared.hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } - } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - reactivity.trigger(instance, "set" /* SET */, '$attrs'); + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !shared.hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = shared.hyphenate(key)) === key || !shared.hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !shared.hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + reactivity.trigger(instance, "set", "$attrs"); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (shared.isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && shared.hasOwn(options, (camelKey = shared.camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (shared.isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && shared.hasOwn(options, camelKey = shared.camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = reactivity.toRaw(props); - const castValues = rawCastValues || shared.EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !shared.hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = reactivity.toRaw(props); + const castValues = rawCastValues || shared.EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !shared.hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = shared.hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && shared.isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === shared.hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = shared.hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && shared.isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === shared.hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!shared.isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + shared.extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (!shared.isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - shared.extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, shared.EMPTY_ARR); - return shared.EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (shared.isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - const normalizedKey = shared.camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = shared.EMPTY_OBJ; - } + } + if (!raw && !hasExtends) { + if (shared.isObject(comp)) { + cache.set(comp, shared.EMPTY_ARR); + } + return shared.EMPTY_ARR; + } + if (shared.isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + const normalizedKey = shared.camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = shared.EMPTY_OBJ; + } + } + } else if (raw) { + for (const key in raw) { + const normalizedKey = shared.camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || shared.hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } } + } } - else if (raw) { - for (const key in raw) { - const normalizedKey = shared.camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || shared.hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } - } - const res = [normalized, needCastKeys]; + } + const res = [normalized, needCastKeys]; + if (shared.isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - return false; + if (key[0] !== "$") { + return true; + } + return false; } -// use function string name to check type constructors -// so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (shared.isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (shared.isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (shared.isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (shared.isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } -const isInternalKey = (key) => key[0] === '_' || key === '$stable'; -const normalizeSlotValue = (value) => shared.isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; - } - const normalized = withCtx((...args) => { - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (false) ; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (shared.isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (shared.isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = reactivity.toRaw(children); - // make compiler marker non-enumerable - shared.def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = reactivity.toRaw(children); + shared.def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - shared.def(instance.slots, InternalObjectKey, 1); + } + shared.def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = shared.EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - shared.extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = shared.EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (optimized && type === 1) { + needDeletionCheck = false; + } else { + shared.extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; -function createAppContext() { - return { - app: null, - config: { - isNativeTag: shared.NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; -} -let uid = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!shared.isFunction(rootComponent)) { - rootComponent = { ...rootComponent }; - } - if (rootProps != null && !shared.isObject(rootProps)) { - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) ; - else if (plugin && shared.isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (shared.isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else ; - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - } - return app; - }, - component(name, component) { - if (!component) { - return context.components[name]; - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - if (!directive) { - return context.directives[name]; - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - delete app._container.__vue_app__; - } - }, - provide(key, value) { - context.provides[key] = value; - return app; - } - }); - return app; - }; -} - -/** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (shared.isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (shared.isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (shared.isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (shared.isString(oldRef)) { + refs[oldRef] = null; + if (shared.hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (reactivity.isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === shared.EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (shared.isString(oldRef)) { - refs[oldRef] = null; - if (shared.hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; - } - } - else if (reactivity.isRef(oldRef)) { - oldRef.value = null; - } - } - if (shared.isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = shared.isString(ref); - const _isRef = reactivity.isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - shared.isArray(existing) && shared.remove(existing, refValue); - } - else { - if (!shared.isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (shared.hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } + } + if (shared.isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = shared.isString(ref); + const _isRef = reactivity.isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? shared.hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + shared.isArray(existing) && shared.remove(existing, refValue); + } else { + if (!shared.isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (shared.hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; } - else if (_isString) { - refs[ref] = value; - if (shared.hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (reactivity.isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else ; - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } - else { - doSet(); - } - } + } + } else if (_isString) { + refs[ref] = value; + if (shared.hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else ; + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } } + } } let hasMismatch = false; -const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; +}; const isComment = (node) => node.nodeType === 8 /* COMMENT */; -// Note: hydration is DOM-specific -// But we have to place it in core due to tight coupling with core - splitting -// it out creates a ton of unnecessary complexity. -// Hydration also depends on some renderer internal logic which needs to be -// passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else ; - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - if (forcePatchValue || patchFlag !== -1 /* HOISTED */) { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (shared.isOn(key) && !shared.isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - while (next) { - hasMismatch = true; - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else ; + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + if (forcePatch || patchFlag !== -1) { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + while (next) { + hasMismatch = true; + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + el.textContent = vnode.children; + } + } + if (props) { + if (forcePatch || !optimized || patchFlag & (16 | 32)) { + for (const key in props) { + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } else if (props.onClick) { + patchProp( + el, + "onClick", + null, + props.onClick, + void 0, + void 0, + parentComponent + ); + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } } - return node; - }; - return [hydrate, hydrateNode]; + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; } -const queuePostRenderEffect = queueEffectWithSuspense - ; -/** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ +const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } -// Separate API for creating hydration-enabled renderer. -// Hydration logic is only used when calling this function, making it -// tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } -// implementation function baseCreateRenderer(options, createHydrationFns) { - const target = shared.getGlobalThis(); - target.__VUE__ = true; - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = shared.NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else ; - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); - } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); - } - else { - // there's no support for dynamic comments - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; - let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - if (vnode.el && - hostCloneNode !== undefined && - patchFlag === -1 /* HOISTED */) { - // If a vnode has non-null el, it means it's being reused. - // Only static vnodes can be reused, so its mounted DOM nodes should be - // exactly the same, and we can simply do a clone here. - // only do this in production since cloned trees cannot be HMR updated. - el = vnode.el = hostCloneNode(vnode.el); - } - else { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !shared.isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || shared.EMPTY_OBJ; - const newProps = n2.props || shared.EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (shared.isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== shared.EMPTY_OBJ) { - for (const key in oldProps) { - if (!shared.isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { - setupComponent(instance); - } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); - } - return; - } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - updateComponentPreRender(instance, n2, optimized); - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } - } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; - } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - shared.invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - instance.subTree = renderComponentRoot(instance); - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - const subTree = (instance.subTree = renderComponentRoot(instance)); - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - shared.invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - const nextTree = renderComponentRoot(instance); - const prevTree = instance.subTree; - instance.subTree = nextTree; - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new reactivity.ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates - toggleRecurse(instance, true); - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - reactivity.pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - reactivity.resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } - } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || shared.EMPTY_ARR; - c2 = c2 || shared.EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); - } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : shared.EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); - } - }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - shared.invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } - } - }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } - }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + const target = shared.getGlobalThis(); + target.__VUE__ = true; + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = shared.NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { + if (n1 === n2) { + return; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else ; + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !shared.isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || shared.EMPTY_OBJ; + const newProps = n2.props || shared.EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== shared.EMPTY_OBJ) { + for (const key in oldProps) { + if (!shared.isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + } + for (const key in newProps) { + if (shared.isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + if ( + // #2080 if the stable fragment has a key, it's a <template v-for> that may + // get moved around. Make sure all root level vnodes inherit el. + // #2134 or if it's a component root, it may also get moved around + // as the component is being moved. + n2.key != null || parentComponent && n2 === parentComponent.subTree + ) { + traverseStaticChildren( + n1, + n2, + true + /* shallow */ + ); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + setupComponent(instance); + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + updateComponentPreRender(instance, n2, optimized); + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + shared.invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + instance.subTree = renderComponentRoot(instance); + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + const subTree = instance.subTree = renderComponentRoot(instance); + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + shared.invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + const nextTree = renderComponentRoot(instance); + const prevTree = instance.subTree; + instance.subTree = nextTree; + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + } }; + const effect = instance.effect = new reactivity.ReactiveEffect( + componentUpdateFn, + shared.NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } + }; + update.id = instance.uid; + toggleRecurse(instance, true); + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + reactivity.pauseTracking(); + flushPreFlushCbs(instance); + reactivity.resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || shared.EMPTY_ARR; + c2 = c2 || shared.EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : shared.EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + const { bum, scope, update, subTree, um } = instance; + if (bum) { + shared.invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } -/** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (shared.isArray(ch1) && shared.isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } + const ch1 = n1.children; + const ch2 = n2.children; + if (shared.isArray(ch1) && shared.isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } } + } } -// https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); -const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (shared.isString(targetSelector)) { - if (!select) { - return null; - } - else { - const target = select(targetSelector); - return target; - } - } - else { - return targetSelector; + const targetSelector = props && props.to; + if (shared.isString(targetSelector)) { + if (!select) { + return null; + } else { + const target = select(targetSelector); + return target; } + } else { + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = createText('')); - const mainAnchor = (n2.anchor = createText('')); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (n1 == null) { + const placeholder = n2.el = createText(""); + const mainAnchor = n2.anchor = createText(""); + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + } } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } - } - } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } -// Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; +function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} -const Fragment = Symbol(undefined); -const Text = Symbol(undefined); -const Comment = Symbol(undefined); -const Static = Symbol(undefined); -// Since v-if and v-for are the two possible ways node structure can dynamically -// change, once we consider v-if branches and each v-for fragment a block, we -// can divide a template into nested blocks, and within each block the node -// structure would be stable. This allows us to skip most children diffing -// and only worry about the dynamic nodes (indicated by patch flags). +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; -/** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } -// Whether we should be tracking dynamic child nodes inside a block. -// Only tracks when this value is > 0 -// We are not using a simple boolean because this value may need to be -// incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; -/** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || shared.EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } -/** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } -/** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - return n1.type === n2.type && n1.key === n2.key; + return n1.type === n2.type && n1.key === n2.key; } -/** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { } const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? shared.isString(ref) || reactivity.isRef(ref) || shared.isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= shared.isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= shared.isString(children) ? 8 : 16; + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } -const createVNode = (_createVNode); +const createVNode = _createVNode; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !shared.isString(klass)) { + props.class = shared.normalizeClass(klass); } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !shared.isString(klass)) { - props.class = shared.normalizeClass(klass); - } - if (shared.isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (reactivity.isProxy(style) && !shared.isArray(style)) { - style = shared.extend({}, style); - } - props.style = shared.normalizeStyle(style); - } + if (shared.isObject(style)) { + if (reactivity.isProxy(style) && !shared.isArray(style)) { + style = shared.extend({}, style); + } + props.style = shared.normalizeStyle(style); } - // encode the vnode type information into a bitmap - const shapeFlag = shared.isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : shared.isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : shared.isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = shared.isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : shared.isObject(type) ? 4 : shared.isFunction(type) ? 2 : 0; + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return reactivity.isProxy(props) || InternalObjectKey in props - ? shared.extend({}, props) - : props; + if (!props) + return null; + return reactivity.isProxy(props) || InternalObjectKey in props ? shared.extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? shared.isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? shared.isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } -/** - * @private - */ -function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } -/** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } -/** - * @private - */ -function createCommentVNode(text = '', -// when used as the v-else branch, the comment node must be created as a -// block to ensure correct updates. -asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (shared.isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (shared.isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } -// optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (shared.isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (shared.isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (shared.isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (shared.isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = shared.normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = shared.normalizeStyle([ret.style, toMerge.style]); - } - else if (shared.isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(shared.isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = shared.normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = shared.normalizeStyle([ret.style, toMerge.style]); + } else if (shared.isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(shared.isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); -let uid$1 = 0; +let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new reactivity.EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: shared.EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: shared.EMPTY_OBJ, - data: shared.EMPTY_OBJ, - props: shared.EMPTY_OBJ, - attrs: shared.EMPTY_OBJ, - slots: shared.EMPTY_OBJ, - refs: shared.EMPTY_OBJ, - setupState: shared.EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = { _: instance }; - } - instance.root = parent ? parent.root : instance; - instance.emit = emit.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new reactivity.EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: shared.EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: shared.EMPTY_OBJ, + data: shared.EMPTY_OBJ, + props: shared.EMPTY_OBJ, + attrs: shared.EMPTY_OBJ, + slots: shared.EMPTY_OBJ, + refs: shared.EMPTY_OBJ, + setupState: shared.EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = { _: instance }; + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = shared.getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) + setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) + setters.forEach((set) => set(v)); + else + setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - const Component = instance.type; - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - reactivity.pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [instance.props, setupContext]); - reactivity.resetTracking(); - unsetCurrentInstance(); - if (shared.isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - } - } - else { - handleSetupResult(instance, setupResult, isSSR); - } - } - else { - finishComponentSetup(instance, isSSR); + const Component = instance.type; + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + reactivity.pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + instance.props, + setupContext + ] + ); + reactivity.resetTracking(); + reset(); + if (shared.isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + } + } else { + handleSetupResult(instance, setupResult, isSSR); } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (shared.isFunction(setupResult)) { - // setup returned an inline render function - if (instance.type.__ssrInlineRender) { - // when the function's name is `ssrRender` (compiled by SFC inline mode), - // set it as ssrRender instead. - instance.ssrRender = setupResult; - } - else { - instance.render = setupResult; - } + if (shared.isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; } - else if (shared.isObject(setupResult)) { - instance.setupState = reactivity.proxyRefs(setupResult); - } - else ; - finishComponentSetup(instance, isSSR); + } else if (shared.isObject(setupResult)) { + instance.setupState = reactivity.proxyRefs(setupResult); + } else ; + finishComponentSetup(instance, isSSR); } let compile; let installWithProxy; -/** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; } -// dev only const isRuntimeOnly = () => !compile; function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = shared.extend(shared.extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - } - } - instance.render = (Component.render || shared.NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); - } + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = shared.extend( + shared.extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + } } - // support for 2.x options - { - setCurrentInstance(instance); - reactivity.pauseTracking(); - applyOptions(instance); - reactivity.resetTracking(); - unsetCurrentInstance(); + instance.render = Component.render || shared.NOOP; + if (installWithProxy) { + installWithProxy(instance); } + } + { + const reset = setCurrentInstance(instance); + reactivity.pauseTracking(); + try { + applyOptions(instance); + } finally { + reactivity.resetTracking(); + reset(); + } + } } -function createAttrsProxy(instance) { - return new Proxy(instance.attrs, { - get(target, key) { - reactivity.track(instance, "get" /* GET */, '$attrs'); - return target[key]; - } - }); +function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + reactivity.track(instance, "get", "$attrs"); + return target[key]; + } + } + )); } function createSetupContext(instance) { - const expose = exposed => { - instance.exposed = exposed || {}; + const expose = (exposed) => { + instance.exposed = exposed || {}; + }; + { + return { + get attrs() { + return getAttrsProxy(instance); + }, + slots: instance.slots, + emit: instance.emit, + expose }; - let attrs; - { - return { - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - slots: instance.slots, - emit: instance.emit, - expose - }; - } + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } -} -const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); -function getComponentName(Component) { - return shared.isFunction(Component) - ? Component.displayName || Component.name - : Component.name; -} -/* istanbul ignore next */ -function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(reactivity.proxyRefs(reactivity.markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } +} +function getComponentName(Component, includeInferred = true) { + return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } function isClassComponent(value) { - return shared.isFunction(value) && '__vccOpts' in value; + return shared.isFunction(value) && "__vccOpts" in value; } -const computed = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup); -}); - -// implementation -function defineProps() { - return null; -} -// implementation -function defineEmits() { - return null; -} -/** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -function defineExpose(exposed) { -} -/** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ -function withDefaults(props, defaults) { - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -/** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ -function mergeDefaults(raw, defaults) { - const props = shared.isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (shared.isArray(opt) || shared.isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else ; - } - return props; -} -/** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -/** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (shared.isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -// Actual implementation -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -const ssrContextKey = Symbol(``); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn(`Server rendering context not provided. Make sure to only call ` + - `useSSRContext() conditionally in the server build.`); - } - return ctx; - } +const computed = (getterOrOptions, debugOptions) => { + return reactivity.computed(getterOrOptions, debugOptions, isInSSRComponentSetup); }; -function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - { - return; +function useModel(props, name, options = shared.EMPTY_OBJ) { + const i = getCurrentInstance(); + const camelizedName = shared.camelize(name); + const hyphenatedName = shared.hyphenate(name); + const res = reactivity.customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (shared.hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && shared.hasChanged(value, localValue)) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } + }; + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + { + return; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (shared.hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (shared.hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } -// Core API ------------------------------------------------------------------ -const version = "3.2.36"; +const version = "3.4.15"; +const warn$1 = shared.NOOP; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = void 0; +const setDevtoolsHook = shared.NOOP; const _ssrUtils = { - createComponentInstance, - setupComponent, - renderComponentRoot, - setCurrentRenderingInstance, - isVNode, - normalizeVNode + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode }; -/** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ -const ssrUtils = (_ssrUtils ); -/** - * @internal only exposed in compat builds - */ +const ssrUtils = _ssrUtils ; const resolveFilter = null; -/** - * @internal only exposed in compat builds. - */ -const compatUtils = (null); +const compatUtils = null; +const DeprecationTypes = null; exports.EffectScope = reactivity.EffectScope; exports.ReactiveEffect = reactivity.ReactiveEffect; +exports.TrackOpTypes = reactivity.TrackOpTypes; +exports.TriggerOpTypes = reactivity.TriggerOpTypes; exports.customRef = reactivity.customRef; exports.effect = reactivity.effect; exports.effectScope = reactivity.effectScope; @@ -6208,6 +6323,7 @@ exports.stop = reactivity.stop; exports.toRaw = reactivity.toRaw; exports.toRef = reactivity.toRef; exports.toRefs = reactivity.toRefs; +exports.toValue = reactivity.toValue; exports.triggerRef = reactivity.triggerRef; exports.unref = reactivity.unref; exports.camelize = shared.camelize; @@ -6218,13 +6334,18 @@ exports.normalizeStyle = shared.normalizeStyle; exports.toDisplayString = shared.toDisplayString; exports.toHandlerKey = shared.toHandlerKey; exports.BaseTransition = BaseTransition; +exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; exports.Comment = Comment; +exports.DeprecationTypes = DeprecationTypes; +exports.ErrorCodes = ErrorCodes; +exports.ErrorTypeStrings = ErrorTypeStrings; exports.Fragment = Fragment; exports.KeepAlive = KeepAlive; exports.Static = Static; exports.Suspense = Suspense; exports.Teleport = Teleport; exports.Text = Text; +exports.assertNumber = assertNumber; exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; exports.callWithErrorHandling = callWithErrorHandling; exports.cloneVNode = cloneVNode; @@ -6245,18 +6366,24 @@ exports.defineAsyncComponent = defineAsyncComponent; exports.defineComponent = defineComponent; exports.defineEmits = defineEmits; exports.defineExpose = defineExpose; +exports.defineModel = defineModel; +exports.defineOptions = defineOptions; exports.defineProps = defineProps; +exports.defineSlots = defineSlots; +exports.devtools = devtools; exports.getCurrentInstance = getCurrentInstance; exports.getTransitionRawChildren = getTransitionRawChildren; exports.guardReactiveProps = guardReactiveProps; exports.h = h; exports.handleError = handleError; +exports.hasInjectionContext = hasInjectionContext; exports.initCustomFormatter = initCustomFormatter; exports.inject = inject; exports.isMemoSame = isMemoSame; exports.isRuntimeOnly = isRuntimeOnly; exports.isVNode = isVNode; exports.mergeDefaults = mergeDefaults; +exports.mergeModels = mergeModels; exports.mergeProps = mergeProps; exports.nextTick = nextTick; exports.onActivated = onActivated; @@ -6292,11 +6419,12 @@ exports.ssrUtils = ssrUtils; exports.toHandlers = toHandlers; exports.transformVNodeArgs = transformVNodeArgs; exports.useAttrs = useAttrs; +exports.useModel = useModel; exports.useSSRContext = useSSRContext; exports.useSlots = useSlots; exports.useTransitionState = useTransitionState; exports.version = version; -exports.warn = warn; +exports.warn = warn$1; exports.watch = watch; exports.watchEffect = watchEffect; exports.watchPostEffect = watchPostEffect; diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.d.ts b/node_modules/@vue/runtime-core/dist/runtime-core.d.ts index 32e73947..c485727f 100644 --- a/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +++ b/node_modules/@vue/runtime-core/dist/runtime-core.d.ts @@ -1,293 +1,73 @@ -import { camelize } from '@vue/shared'; -import { capitalize } from '@vue/shared'; -import { ComponentPropsOptions as ComponentPropsOptions_2 } from '@vue/runtime-core'; -import { computed as computed_2 } from '@vue/reactivity'; -import { ComputedGetter } from '@vue/reactivity'; -import { ComputedRef } from '@vue/reactivity'; -import { ComputedSetter } from '@vue/reactivity'; -import { customRef } from '@vue/reactivity'; -import { CustomRefFactory } from '@vue/reactivity'; -import { DebuggerEvent } from '@vue/reactivity'; -import { DebuggerEventExtraInfo } from '@vue/reactivity'; -import { DebuggerOptions } from '@vue/reactivity'; -import { DeepReadonly } from '@vue/reactivity'; -import { effect } from '@vue/reactivity'; -import { EffectScheduler } from '@vue/reactivity'; -import { EffectScope } from '@vue/reactivity'; -import { effectScope } from '@vue/reactivity'; -import { getCurrentScope } from '@vue/reactivity'; -import { IfAny } from '@vue/shared'; -import { isProxy } from '@vue/reactivity'; -import { isReactive } from '@vue/reactivity'; -import { isReadonly } from '@vue/reactivity'; -import { isRef } from '@vue/reactivity'; -import { isShallow } from '@vue/reactivity'; -import { LooseRequired } from '@vue/shared'; -import { markRaw } from '@vue/reactivity'; -import { normalizeClass } from '@vue/shared'; -import { normalizeProps } from '@vue/shared'; -import { normalizeStyle } from '@vue/shared'; -import { onScopeDispose } from '@vue/reactivity'; -import { proxyRefs } from '@vue/reactivity'; -import { reactive } from '@vue/reactivity'; -import { ReactiveEffect } from '@vue/reactivity'; -import { ReactiveEffectOptions } from '@vue/reactivity'; -import { ReactiveEffectRunner } from '@vue/reactivity'; -import { ReactiveFlags } from '@vue/reactivity'; -import { readonly } from '@vue/reactivity'; -import { Ref } from '@vue/reactivity'; -import { ref } from '@vue/reactivity'; -import { ShallowReactive } from '@vue/reactivity'; -import { shallowReactive } from '@vue/reactivity'; -import { shallowReadonly } from '@vue/reactivity'; -import { ShallowRef } from '@vue/reactivity'; -import { shallowRef } from '@vue/reactivity'; -import { ShallowUnwrapRef } from '@vue/reactivity'; -import { ShapeFlags } from '@vue/shared'; -import { SlotFlags } from '@vue/shared'; -import { stop as stop_2 } from '@vue/reactivity'; -import { toDisplayString } from '@vue/shared'; -import { toHandlerKey } from '@vue/shared'; -import { toRaw } from '@vue/reactivity'; -import { ToRef } from '@vue/reactivity'; -import { toRef } from '@vue/reactivity'; -import { ToRefs } from '@vue/reactivity'; -import { toRefs } from '@vue/reactivity'; -import { TrackOpTypes } from '@vue/reactivity'; -import { TriggerOpTypes } from '@vue/reactivity'; -import { triggerRef } from '@vue/reactivity'; -import { UnionToIntersection } from '@vue/shared'; -import { unref } from '@vue/reactivity'; -import { UnwrapNestedRefs } from '@vue/reactivity'; -import { UnwrapRef } from '@vue/reactivity'; -import { WritableComputedOptions } from '@vue/reactivity'; -import { WritableComputedRef } from '@vue/reactivity'; +import { computed as computed$1, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, Ref, ReactiveEffect, ComputedRef, DebuggerOptions, reactive } from '@vue/reactivity'; +export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity'; +import { IfAny, Prettify, Awaited, UnionToIntersection, LooseRequired } from '@vue/shared'; +export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared'; -/** - * Default allowed non-declared props on component in TSX - */ -export declare interface AllowedComponentProps { - class?: unknown; - style?: unknown; -} +export declare const computed: typeof computed$1; -export declare interface App<HostElement = any> { - version: string; - config: AppConfig; - use(plugin: Plugin_2, ...options: any[]): this; - mixin(mixin: ComponentOptions): this; - component(name: string): Component | undefined; - component(name: string, component: Component): this; - directive(name: string): Directive | undefined; - directive(name: string, directive: Directive): this; - mount(rootContainer: HostElement | string, isHydrate?: boolean, isSVG?: boolean): ComponentPublicInstance; - unmount(): void; - provide<T>(key: InjectionKey<T> | string, value: T): this; - _uid: number; - _component: ConcreteComponent; - _props: Data | null; - _container: HostElement | null; - _context: AppContext; - _instance: ComponentInternalInstance | null; - /** - * v2 compat only - */ - filter?(name: string): Function | undefined; - filter?(name: string, filter: Function): this; - /* Excluded from this release type: _createRoot */ -} - -export declare interface AppConfig { - readonly isNativeTag?: (tag: string) => boolean; - performance: boolean; - optionMergeStrategies: Record<string, OptionMergeFunction>; - globalProperties: Record<string, any>; - errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void; - warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void; - /** - * Options to pass to `@vue/compiler-dom`. - * Only supported in runtime compiler build. - */ - compilerOptions: RuntimeCompilerOptions; - /** - * @deprecated use config.compilerOptions.isCustomElement - */ - isCustomElement?: (tag: string) => boolean; - /** - * Temporary config for opt-in to unwrap injected refs. - * TODO deprecate in 3.3 - */ - unwrapInjectedRef?: boolean; -} - -export declare interface AppContext { - app: App; - config: AppConfig; - mixins: ComponentOptions[]; - components: Record<string, Component>; - directives: Record<string, Directive>; - provides: Record<string | symbol, any>; - /* Excluded from this release type: optionsCache */ - /* Excluded from this release type: propsCache */ - /* Excluded from this release type: emitsCache */ - /* Excluded from this release type: reload */ - /* Excluded from this release type: filters */ -} - -declare interface AppRecord { - id: number; - app: App; - version: string; - types: Record<string, string | Symbol>; -} - -export declare type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>; - -export declare interface AsyncComponentOptions<T = any> { - loader: AsyncComponentLoader<T>; - loadingComponent?: Component; - errorComponent?: Component; - delay?: number; - timeout?: number; - suspensible?: boolean; - onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any; -} - -declare type AsyncComponentResolveResult<T = Component> = T | { - default: T; +export type Slot<T extends any = any> = (...args: IfAny<T, any[], [T] | (T extends undefined ? [] : never)>) => VNode[]; +type InternalSlots = { + [name: string]: Slot | undefined; +}; +export type Slots = Readonly<InternalSlots>; +declare const SlotSymbol: unique symbol; +export type SlotsType<T extends Record<string, any> = Record<string, any>> = { + [SlotSymbol]?: T; +}; +type StrictUnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<T> & T; +type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{ + [K in keyof T]: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : Slot<T[K]>; +}>>; +type RawSlots = { + [name: string]: unknown; + $stable?: boolean; }; -export declare const BaseTransition: new () => { - $props: BaseTransitionProps<any>; -}; - -export declare interface BaseTransitionProps<HostElement = RendererElement> { - mode?: 'in-out' | 'out-in' | 'default'; - appear?: boolean; - persisted?: boolean; - onBeforeEnter?: Hook<(el: HostElement) => void>; - onEnter?: Hook<(el: HostElement, done: () => void) => void>; - onAfterEnter?: Hook<(el: HostElement) => void>; - onEnterCancelled?: Hook<(el: HostElement) => void>; - onBeforeLeave?: Hook<(el: HostElement) => void>; - onLeave?: Hook<(el: HostElement, done: () => void) => void>; - onAfterLeave?: Hook<(el: HostElement) => void>; - onLeaveCancelled?: Hook<(el: HostElement) => void>; - onBeforeAppear?: Hook<(el: HostElement) => void>; - onAppear?: Hook<(el: HostElement, done: () => void) => void>; - onAfterAppear?: Hook<(el: HostElement) => void>; - onAppearCancelled?: Hook<(el: HostElement) => void>; -} - -declare const enum BooleanFlags { - shouldCast = 0, - shouldCastTrue = 1 -} - -export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any[]; - -export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any; - -export { camelize } - -export { capitalize } - -/** - * Use this for features with the same syntax but with mutually exclusive - * behavior in 2 vs 3. Only warn if compat is enabled. - * e.g. render function - */ -declare function checkCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): boolean; - -declare interface ClassComponent { - new (...args: any[]): ComponentPublicInstance<any, any, any, any, any>; - __vccOpts: ComponentOptions; -} - -export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean): VNode<T, U>; - -declare const Comment_2: unique symbol; -export { Comment_2 as Comment } - -declare type CompatConfig = Partial<Record<DeprecationTypes, boolean | 'suppress-warning'>> & { - MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3); -}; - -/* Excluded from this release type: compatUtils */ - -/** - * @deprecated the default `Vue` export has been removed in Vue 3. The type for - * the default export is provided only for migration purposes. Please use - * named imports instead - e.g. `import { createApp } from 'vue'`. - */ -export declare type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & { - configureCompat: typeof configureCompat; - new (options?: ComponentOptions): LegacyPublicInstance; - version: string; - config: AppConfig & LegacyConfig; - nextTick: typeof nextTick; - use(plugin: Plugin_2, ...options: any[]): CompatVue; - mixin(mixin: ComponentOptions): CompatVue; - component(name: string): Component | undefined; - component(name: string, component: Component): CompatVue; - directive(name: string): Directive | undefined; - directive(name: string, directive: Directive): CompatVue; - compile(template: string): RenderFunction; +interface SchedulerJob extends Function { + id?: number; + pre?: boolean; + active?: boolean; + computed?: boolean; /** - * @deprecated Vue 3 no longer supports extending constructors. + * Indicates whether the effect is allowed to recursively trigger itself + * when managed by the scheduler. + * + * By default, a job cannot trigger itself because some built-in method calls, + * e.g. Array.prototype.push actually performs reads as well (#1740) which + * can lead to confusing infinite loops. + * The allowed cases are component update functions and watch callbacks. + * Component update functions may update child component props, which in turn + * trigger flush: "pre" watch callbacks that mutates state that the parent + * relies on (#1801). Watch callbacks doesn't track its dependencies so if it + * triggers itself again, it's likely intentional and it is the user's + * responsibility to perform recursive state mutation that eventually + * stabilizes (#1727). */ - extend: (options?: ComponentOptions) => CompatVue; + allowRecurse?: boolean; /** - * @deprecated Vue 3 no longer needs set() for adding new properties. + * Attached by renderer.ts when setting up a component's render effect + * Used to obtain component information when reporting max recursive updates. + * dev only. */ - set(target: any, key: string | number | symbol, value: any): void; - /** - * @deprecated Vue 3 no longer needs delete() for property deletions. - */ - delete(target: any, key: string | number | symbol): void; - /** - * @deprecated use `reactive` instead. - */ - observable: typeof reactive; - /** - * @deprecated filters have been removed from Vue 3. - */ - filter(name: string, arg?: any): null; - /* Excluded from this release type: cid */ - /* Excluded from this release type: options */ - /* Excluded from this release type: util */ - /* Excluded from this release type: super */ -}; - -declare interface CompiledSlotDescriptor { - name: string; - fn: Slot; + ownerInstance?: ComponentInternalInstance; } +type SchedulerJobs = SchedulerJob | SchedulerJob[]; +export declare function nextTick<T = void, R = void>(this: T, fn?: (this: T) => R): Promise<Awaited<R>>; +export declare function queuePostFlushCb(cb: SchedulerJobs): void; -/** - * A type used in public APIs where a component type is expected. - * The constructor type is an artificial type returned by defineComponent(). - */ -export declare type Component<Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = ConcreteComponent<Props, RawBindings, D, C, M> | ComponentPublicInstanceConstructor<Props>; - -/** - * Interface for declaring custom options. - * - * @example - * ```ts - * declare module '@vue/runtime-core' { - * interface ComponentCustomOptions { - * beforeRouteUpdate?( - * to: Route, - * from: Route, - * next: () => void - * ): void - * } - * } - * ``` - */ -export declare interface ComponentCustomOptions { -} +export type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>; +export type EmitsOptions = ObjectEmitsOptions | string[]; +type EmitsToProps<T extends EmitsOptions> = T extends string[] ? { + [K in `on${Capitalize<T[number]>}`]?: (...args: any[]) => any; +} : T extends ObjectEmitsOptions ? { + [K in `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}` ? (...args: T[Uncapitalize<C>] extends (...args: infer P) => any ? P : T[Uncapitalize<C>] extends null ? any[] : never) => any : never; +} : {}; +type ShortEmitsToObject<E> = E extends Record<string, any[]> ? { + [K in keyof E]: (...args: E[K]) => any; +} : E; +type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ + [key in Event]: Options[key] extends (...args: infer Args) => any ? (event: key, ...args: Args) => void : Options[key] extends any[] ? (event: key, ...args: Options[key]) => void : (event: key, ...args: any[]) => void; +}[Event]>; /** * Custom properties added to component instances in any way and can be accessed through `this` @@ -314,184 +94,33 @@ export declare interface ComponentCustomOptions { * vm.$router.push('/') * ``` */ -export declare interface ComponentCustomProperties { +export interface ComponentCustomProperties { } - -/** - * For extending allowed non-declared props on components in TSX - */ -export declare interface ComponentCustomProps { -} - -declare type ComponentInjectOptions = string[] | ObjectInjectOptions; - -/** - * We expose a subset of properties on the internal instance as they are - * useful for advanced external libraries and tools. - */ -export declare interface ComponentInternalInstance { - uid: number; - type: ConcreteComponent; - parent: ComponentInternalInstance | null; - root: ComponentInternalInstance; - appContext: AppContext; - /** - * Vnode representing this component in its parent's vdom tree - */ - vnode: VNode; - /* Excluded from this release type: next */ - /** - * Root vnode of this component's own vdom tree - */ - subTree: VNode; - /** - * Render effect instance - */ - effect: ReactiveEffect; - /** - * Bound effect runner to be passed to schedulers - */ - update: SchedulerJob; - /* Excluded from this release type: render */ - /* Excluded from this release type: ssrRender */ - /* Excluded from this release type: provides */ - /* Excluded from this release type: scope */ - /* Excluded from this release type: accessCache */ - /* Excluded from this release type: renderCache */ - /* Excluded from this release type: components */ - /* Excluded from this release type: directives */ - /* Excluded from this release type: filters */ - /* Excluded from this release type: propsOptions */ - /* Excluded from this release type: emitsOptions */ - /* Excluded from this release type: inheritAttrs */ - /** - * is custom element? - */ - isCE?: boolean; - /** - * custom element specific HMR method - */ - ceReload?: (newStyles?: string[]) => void; - proxy: ComponentPublicInstance | null; - exposed: Record<string, any> | null; - exposeProxy: Record<string, any> | null; - /* Excluded from this release type: withProxy */ - /* Excluded from this release type: ctx */ - data: Data; - props: Data; - attrs: Data; - slots: InternalSlots; - refs: Data; - emit: EmitFn; - /* Excluded from this release type: emitted */ - /* Excluded from this release type: propsDefaults */ - /* Excluded from this release type: setupState */ - /* Excluded from this release type: devtoolsRawSetupState */ - /* Excluded from this release type: setupContext */ - /* Excluded from this release type: suspense */ - /* Excluded from this release type: suspenseId */ - /* Excluded from this release type: asyncDep */ - /* Excluded from this release type: asyncResolved */ - isMounted: boolean; - isUnmounted: boolean; - isDeactivated: boolean; - /* Excluded from this release type: bc */ - /* Excluded from this release type: c */ - /* Excluded from this release type: bm */ - /* Excluded from this release type: m */ - /* Excluded from this release type: bu */ - /* Excluded from this release type: u */ - /* Excluded from this release type: bum */ - /* Excluded from this release type: um */ - /* Excluded from this release type: rtc */ - /* Excluded from this release type: rtg */ - /* Excluded from this release type: a */ - /* Excluded from this release type: da */ - /* Excluded from this release type: ec */ - /* Excluded from this release type: sp */ - /** - * For caching bound $forceUpdate on public proxy access - */ - f?: () => void; - /** - * For caching bound $nextTick on public proxy access - */ - n?: () => Promise<void>; -} - -declare interface ComponentInternalOptions { - /* Excluded from this release type: __scopeId */ - /* Excluded from this release type: __cssModules */ - /* Excluded from this release type: __hmrId */ - /** - * Compat build only, for bailing out of certain compatibility behavior - */ - __isBuiltIn?: boolean; - /** - * This one should be exposed so that devtools can make use of it - */ - __file?: string; -} - -export declare type ComponentObjectPropsOptions<P = Data> = { - [K in keyof P]: Prop<P[K]> | null; -}; - -export declare type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E> & ThisType<CreateComponentPublicInstance<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>>>; - -export declare interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}> extends LegacyOptions<Props, D, C, M, Mixin, Extends>, ComponentInternalOptions, ComponentCustomOptions { - setup?: (this: void, props: Readonly<LooseRequired<Props & UnionToIntersection<ExtractOptionProp<Mixin>> & UnionToIntersection<ExtractOptionProp<Extends>>>>, ctx: SetupContext<E>) => Promise<RawBindings> | RawBindings | RenderFunction | void; - name?: string; - template?: string | object; - render?: Function; - components?: Record<string, Component>; - directives?: Record<string, Directive>; - inheritAttrs?: boolean; - emits?: (E | EE[]) & ThisType<void>; - expose?: string[]; - serverPrefetch?(): Promise<any>; - compilerOptions?: RuntimeCompilerOptions; - /* Excluded from this release type: ssrRender */ - /* Excluded from this release type: __ssrInlineRender */ - /* Excluded from this release type: __asyncLoader */ - /* Excluded from this release type: __asyncResolved */ - call?: (this: unknown, ...args: unknown[]) => never; +type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false; +type MixinToOptionTypes<T> = T extends ComponentOptionsBase<infer P, infer B, infer D, infer C, infer M, infer Mixin, infer Extends, any, any, infer Defaults, any, any, any> ? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> & IntersectionMixin<Mixin> & IntersectionMixin<Extends> : never; +type ExtractMixin<T> = { + Mixin: MixinToOptionTypes<T>; +}[T extends ComponentOptionsMixin ? 'Mixin' : never]; +type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType : UnionToIntersection<ExtractMixin<T>>; +type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never; +type EnsureNonVoid<T> = T extends void ? {} : T; +type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = { __isFragment?: never; __isTeleport?: never; __isSuspense?: never; - __defaults?: Defaults; -} - -export declare type ComponentOptionsMixin = ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>; - -export declare type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Props = Readonly<{ - [key in PropNames]?: any; -}> & EmitsToProps<E>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}> & { - props: PropNames[]; -} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E>>; - -export declare type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Props = Readonly<ExtractPropTypes<PropsOptions>> & EmitsToProps<E>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults> & { - props: PropsOptions & ThisType<void>; -} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false>>; - -export declare type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, PE = Props & EmitsToProps<E>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}> & { - props?: undefined; -} & ThisType<CreateComponentPublicInstance<PE, RawBindings, D, C, M, Mixin, Extends, E>>; - -export declare type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[]; - -export declare type ComponentProvideOptions = ObjectProvideOptions | Function; - -export declare type ComponentPublicInstance<P = {}, // props type extracted from props option + new (...args: any[]): T; +}; +export type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S>, I, S>; +export type ComponentPublicInstance<P = {}, // props type extracted from props option B = {}, // raw bindings returned from setup() D = {}, // return from data() -C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>> = { +C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}> = { $: ComponentInternalInstance; $data: D; - $props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<P & PublicProps, keyof Defaults> : P & PublicProps; + $props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<Prettify<P> & PublicProps, keyof Defaults> : Prettify<P> & PublicProps; $attrs: Data; $refs: Data; - $slots: Slots; + $slots: UnwrapSlotsType<S>; $root: ComponentPublicInstance | null; $parent: ComponentPublicInstance | null; $emit: EmitFn<E>; @@ -499,88 +128,211 @@ C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOpt $options: Options & MergedComponentOptionsOverride; $forceUpdate: () => void; $nextTick: typeof nextTick; - $watch(source: string | Function, cb: Function, options?: WatchOptions): WatchStopHandle; -} & P & ShallowUnwrapRef<B> & UnwrapNestedRefs<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties; + $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R]) => any : (...args: any) => any, options?: WatchOptions): WatchStopHandle; +} & IfAny<P, P, Omit<P, keyof ShallowUnwrapRef<B>>> & ShallowUnwrapRef<B> & UnwrapNestedRefs<D> & ExtractComputedReturns<C> & M & ComponentCustomProperties & InjectToObject<I>; -declare type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = { - __isFragment?: never; - __isTeleport?: never; - __isSuspense?: never; - new (...args: any[]): T; -}; - -declare type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[]; - -declare type ComponentWatchOptions = Record<string, ComponentWatchOptionItem>; - -export declare const computed: typeof computed_2; - -export { ComputedGetter } - -export declare type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>; - -export { ComputedRef } - -export { ComputedSetter } - -/** - * Concrete component type matches its actual value: it's either an options - * object, or a function. Use this where the code expects to work with actual - * values, e.g. checking if its a function or not. This is mostly for internal - * implementation code. - */ -export declare type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, any>; - -declare function configureCompat(config: CompatConfig): void; - -declare interface Constructor<P = any> { - __isFragment?: never; - __isTeleport?: never; - __isSuspense?: never; - new (...args: any[]): { - $props: P; - }; +declare enum LifecycleHooks { + BEFORE_CREATE = "bc", + CREATED = "c", + BEFORE_MOUNT = "bm", + MOUNTED = "m", + BEFORE_UPDATE = "bu", + UPDATED = "u", + BEFORE_UNMOUNT = "bum", + UNMOUNTED = "um", + DEACTIVATED = "da", + ACTIVATED = "a", + RENDER_TRIGGERED = "rtg", + RENDER_TRACKED = "rtc", + ERROR_CAPTURED = "ec", + SERVER_PREFETCH = "sp" } -export declare type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>; +export interface SuspenseProps { + onResolve?: () => void; + onPending?: () => void; + onFallback?: () => void; + timeout?: string | number; + /** + * Allow suspense to be captured by parent suspense + * + * @default false + */ + suspensible?: boolean; +} +declare const SuspenseImpl: { + name: string; + __isSuspense: boolean; + process(n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals): void; + hydrate: typeof hydrateSuspense; + create: typeof createSuspenseBoundary; + normalize: typeof normalizeSuspenseChildren; +}; +export declare const Suspense: { + new (): { + $props: VNodeProps & SuspenseProps; + $slots: { + default(): VNode[]; + fallback(): VNode[]; + }; + }; + __isSuspense: true; +}; +export interface SuspenseBoundary { + vnode: VNode<RendererNode, RendererElement, SuspenseProps>; + parent: SuspenseBoundary | null; + parentComponent: ComponentInternalInstance | null; + namespace: ElementNamespace; + container: RendererElement; + hiddenContainer: RendererElement; + activeBranch: VNode | null; + pendingBranch: VNode | null; + deps: number; + pendingId: number; + timeout: number; + isInFallback: boolean; + isHydrating: boolean; + isUnmounted: boolean; + effects: Function[]; + resolve(force?: boolean, sync?: boolean): void; + fallback(fallbackVNode: VNode): void; + move(container: RendererElement, anchor: RendererNode | null, type: MoveType): void; + next(): RendererNode | null; + registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn): void; + unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void; +} +declare function createSuspenseBoundary(vnode: VNode, parentSuspense: SuspenseBoundary | null, parentComponent: ComponentInternalInstance | null, container: RendererElement, hiddenContainer: RendererElement, anchor: RendererNode | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, isHydrating?: boolean): SuspenseBoundary; +declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null; +declare function normalizeSuspenseChildren(vnode: VNode): void; -/** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ -export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode; +export type RootHydrateFunction = (vnode: VNode<Node, Element>, container: (Element | ShadowRoot) & { + _vnode?: VNode; +}) => void; -/** - * @private - */ -export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode; +type Hook<T = () => void> = T | T[]; +export interface BaseTransitionProps<HostElement = RendererElement> { + mode?: 'in-out' | 'out-in' | 'default'; + appear?: boolean; + persisted?: boolean; + onBeforeEnter?: Hook<(el: HostElement) => void>; + onEnter?: Hook<(el: HostElement, done: () => void) => void>; + onAfterEnter?: Hook<(el: HostElement) => void>; + onEnterCancelled?: Hook<(el: HostElement) => void>; + onBeforeLeave?: Hook<(el: HostElement) => void>; + onLeave?: Hook<(el: HostElement, done: () => void) => void>; + onAfterLeave?: Hook<(el: HostElement) => void>; + onLeaveCancelled?: Hook<(el: HostElement) => void>; + onBeforeAppear?: Hook<(el: HostElement) => void>; + onAppear?: Hook<(el: HostElement, done: () => void) => void>; + onAfterAppear?: Hook<(el: HostElement) => void>; + onAppearCancelled?: Hook<(el: HostElement) => void>; +} +export interface TransitionHooks<HostElement = RendererElement> { + mode: BaseTransitionProps['mode']; + persisted: boolean; + beforeEnter(el: HostElement): void; + enter(el: HostElement): void; + leave(el: HostElement, remove: () => void): void; + clone(vnode: VNode): TransitionHooks<HostElement>; + afterLeave?(): void; + delayLeave?(el: HostElement, earlyRemove: () => void, delayedLeave: () => void): void; + delayedLeave?(): void; +} +export interface TransitionState { + isMounted: boolean; + isLeaving: boolean; + isUnmounting: boolean; + leavingVNodes: Map<any, Record<string, VNode>>; +} +export declare function useTransitionState(): TransitionState; +export declare const BaseTransitionPropsValidators: { + mode: StringConstructor; + appear: BooleanConstructor; + persisted: BooleanConstructor; + onBeforeEnter: (ArrayConstructor | FunctionConstructor)[]; + onEnter: (ArrayConstructor | FunctionConstructor)[]; + onAfterEnter: (ArrayConstructor | FunctionConstructor)[]; + onEnterCancelled: (ArrayConstructor | FunctionConstructor)[]; + onBeforeLeave: (ArrayConstructor | FunctionConstructor)[]; + onLeave: (ArrayConstructor | FunctionConstructor)[]; + onAfterLeave: (ArrayConstructor | FunctionConstructor)[]; + onLeaveCancelled: (ArrayConstructor | FunctionConstructor)[]; + onBeforeAppear: (ArrayConstructor | FunctionConstructor)[]; + onAppear: (ArrayConstructor | FunctionConstructor)[]; + onAfterAppear: (ArrayConstructor | FunctionConstructor)[]; + onAppearCancelled: (ArrayConstructor | FunctionConstructor)[]; +}; +export declare const BaseTransition: new () => { + $props: BaseTransitionProps<any>; + $slots: { + default(): VNode[]; + }; +}; +export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance): TransitionHooks; +export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void; +export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode['key']): VNode[]; -declare function createCompatVue(createApp: CreateAppFunction<Element>, createSingletonApp: CreateAppFunction<Element>): CompatVue; - -declare function createComponentInstance(vnode: VNode, parent: ComponentInternalInstance | null, suspense: SuspenseBoundary | null): ComponentInternalInstance; - -export declare type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults>>; - -/** - * @private - */ -export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode<RendererNode, RendererElement, { +export interface Renderer<HostElement = RendererElement> { + render: RootRenderFunction<HostElement>; + createApp: CreateAppFunction<HostElement>; +} +export interface HydrationRenderer extends Renderer<Element | ShadowRoot> { + hydrate: RootHydrateFunction; +} +export type ElementNamespace = 'svg' | 'mathml' | undefined; +export type RootRenderFunction<HostElement = RendererElement> = (vnode: VNode | null, container: HostElement, namespace?: ElementNamespace) => void; +export interface RendererOptions<HostNode = RendererNode, HostElement = RendererElement> { + patchProp(el: HostElement, key: string, prevValue: any, nextValue: any, namespace?: ElementNamespace, prevChildren?: VNode<HostNode, HostElement>[], parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, unmountChildren?: UnmountChildrenFn): void; + insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void; + remove(el: HostNode): void; + createElement(type: string, namespace?: ElementNamespace, isCustomizedBuiltIn?: string, vnodeProps?: (VNodeProps & { + [key: string]: any; + }) | null): HostElement; + createText(text: string): HostNode; + createComment(text: string): HostNode; + setText(node: HostNode, text: string): void; + setElementText(node: HostElement, text: string): void; + parentNode(node: HostNode): HostElement | null; + nextSibling(node: HostNode): HostNode | null; + querySelector?(selector: string): HostElement | null; + setScopeId?(el: HostElement, id: string): void; + cloneNode?(node: HostNode): HostNode; + insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, namespace: ElementNamespace, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode]; +} +export interface RendererNode { [key: string]: any; -}>; - -export declare function createElementVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number | ShapeFlags, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode<RendererNode, RendererElement, { - [key: string]: any; -}>; - -export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer; - -/* Excluded from this release type: createPropsRestProxy */ - -declare function createRecord(id: string, initialDef: HMRComponent): boolean; - +} +export interface RendererElement extends RendererNode { +} +interface RendererInternals<HostNode = RendererNode, HostElement = RendererElement> { + p: PatchFn; + um: UnmountFn; + r: RemoveFn; + m: MoveFn; + mt: MountComponentFn; + mc: MountChildrenFn; + pc: PatchChildrenFn; + pbc: PatchBlockChildrenFn; + n: NextFn; + o: RendererOptions<HostNode, HostElement>; +} +type PatchFn = (n1: VNode | null, // null means this is a mount +n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, namespace?: ElementNamespace, slotScopeIds?: string[] | null, optimized?: boolean) => void; +type MountChildrenFn = (children: VNodeArrayChildren, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, start?: number) => void; +type PatchChildrenFn = (n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean) => void; +type PatchBlockChildrenFn = (oldChildren: VNode[], newChildren: VNode[], fallbackContainer: RendererElement, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null) => void; +type MoveFn = (vnode: VNode, container: RendererElement, anchor: RendererNode | null, type: MoveType, parentSuspense?: SuspenseBoundary | null) => void; +type NextFn = (vnode: VNode) => RendererNode | null; +type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void; +type RemoveFn = (vnode: VNode) => void; +type UnmountChildrenFn = (children: VNode[], parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean, start?: number) => void; +type MountComponentFn = (initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void; +type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, optimized: boolean) => void; +declare enum MoveType { + ENTER = 0, + LEAVE = 1, + REORDER = 2 +} /** * The createRenderer function accepts two generic arguments: * HostNode and HostElement, corresponding to Node and Element types in the @@ -597,48 +349,77 @@ declare function createRecord(id: string, initialDef: HMRComponent): boolean; * ``` */ export declare function createRenderer<HostNode = RendererNode, HostElement = RendererElement>(options: RendererOptions<HostNode, HostElement>): Renderer<HostElement>; +export declare function createHydrationRenderer(options: RendererOptions<Node, Element>): HydrationRenderer; -/** - * Compiler runtime helper for creating dynamic slots object - * @private - */ -export declare function createSlots(slots: Record<string, Slot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, Slot>; +type MatchPattern = string | RegExp | (string | RegExp)[]; +export interface KeepAliveProps { + include?: MatchPattern; + exclude?: MatchPattern; + max?: number | string; +} +export declare const KeepAlive: { + new (): { + $props: VNodeProps & KeepAliveProps; + $slots: { + default(): VNode[]; + }; + }; + __isKeepAlive: true; +}; +export declare function onActivated(hook: Function, target?: ComponentInternalInstance | null): void; +export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void; -/** - * @private - */ -export declare function createStaticVNode(content: string, numberOfNodes: number): VNode; +export declare const onBeforeMount: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; +export declare const onMounted: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; +export declare const onBeforeUpdate: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; +export declare const onUpdated: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; +export declare const onBeforeUnmount: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; +export declare const onUnmounted: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; +export declare const onServerPrefetch: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; +type DebuggerHook = (e: DebuggerEvent) => void; +export declare const onRenderTriggered: (hook: DebuggerHook, target?: ComponentInternalInstance | null) => false | Function | undefined; +export declare const onRenderTracked: (hook: DebuggerHook, target?: ComponentInternalInstance | null) => false | Function | undefined; +type ErrorCapturedHook<TError = unknown> = (err: TError, instance: ComponentPublicInstance | null, info: string) => boolean | void; +export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void; -declare function createSuspenseBoundary(vnode: VNode, parent: SuspenseBoundary | null, parentComponent: ComponentInternalInstance | null, container: RendererElement, hiddenContainer: RendererElement, anchor: RendererNode | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, isHydrating?: boolean): SuspenseBoundary; - -/** - * @private - */ -export declare function createTextVNode(text?: string, flag?: number): VNode; - -export declare const createVNode: typeof _createVNode; - -declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode; - -export { customRef } - -export { CustomRefFactory } - -declare type Data = Record<string, unknown>; - -export { DebuggerEvent } - -export { DebuggerEventExtraInfo } - -declare type DebuggerHook = (e: DebuggerEvent) => void; - -export { DebuggerOptions } - -export { DeepReadonly } - -declare type DefaultFactory<T> = (props: Data) => T | null | undefined; - -declare type DefaultKeys<T> = { +export type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[]; +export type ComponentObjectPropsOptions<P = Data> = { + [K in keyof P]: Prop<P[K]> | null; +}; +export type Prop<T, D = T> = PropOptions<T, D> | PropType<T>; +type DefaultFactory<T> = (props: Data) => T | null | undefined; +interface PropOptions<T = any, D = T> { + type?: PropType<T> | true | null; + required?: boolean; + default?: D | DefaultFactory<D> | null | undefined | object; + validator?(value: unknown, props: Data): boolean; +} +export type PropType<T> = PropConstructor<T> | PropConstructor<T>[]; +type PropConstructor<T = any> = { + new (...args: any[]): T & {}; +} | { + (): T; +} | PropMethod<T>; +type PropMethod<T, TConstructor = any> = [T] extends [ + ((...args: any) => any) | undefined +] ? { + new (): TConstructor; + (): T; + readonly prototype: TConstructor; +} : never; +type RequiredKeys<T> = { + [K in keyof T]: T[K] extends { + required: true; + } | { + default: any; + } | BooleanConstructor | { + type: BooleanConstructor; + } ? T[K] extends { + default: undefined | (() => undefined); + } ? never : K : never; +}[keyof T]; +type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>; +type DefaultKeys<T> = { [K in keyof T]: T[K] extends { default: any; } | BooleanConstructor | { @@ -648,105 +429,95 @@ declare type DefaultKeys<T> = { required: true; } ? never : K : never; }[keyof T]; - -export declare function defineAsyncComponent<T extends Component = { - new (): ComponentPublicInstance; -}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T; - -export declare type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>), Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>> = ComponentPublicInstanceConstructor<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, PP & Props, Defaults, true> & Props> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults> & PP; - -export declare function defineComponent<Props, RawBindings = object>(setup: (props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction): DefineComponent<Props, RawBindings>; - -export declare function defineComponent<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>; - -export declare function defineComponent<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string>(options: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<Readonly<{ - [key in PropNames]?: any; -}>, RawBindings, D, C, M, Mixin, Extends, E, EE>; - -export declare function defineComponent<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>; +type InferPropType<T> = [T] extends [null] ? any : [T] extends [{ + type: null | true; +}] ? any : [T] extends [ObjectConstructor | { + type: ObjectConstructor; +}] ? Record<string, any> : [T] extends [BooleanConstructor | { + type: BooleanConstructor; +}] ? boolean : [T] extends [DateConstructor | { + type: DateConstructor; +}] ? Date : [T] extends [(infer U)[] | { + type: (infer U)[]; +}] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T; +/** + * Extract prop types from a runtime props options object. + * The extracted types are **internal** - i.e. the resolved props received by + * the component. + * - Boolean props are always present + * - Props with default values are always present + * + * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}. + */ +export type ExtractPropTypes<O> = { + [K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>; +} & { + [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>; +}; +type PublicRequiredKeys<T> = { + [K in keyof T]: T[K] extends { + required: true; + } ? K : never; +}[keyof T]; +type PublicOptionalKeys<T> = Exclude<keyof T, PublicRequiredKeys<T>>; +/** + * Extract prop types from a runtime props options object. + * The extracted types are **public** - i.e. the expected props that can be + * passed to component. + */ +export type ExtractPublicPropTypes<O> = { + [K in keyof Pick<O, PublicRequiredKeys<O>>]: InferPropType<O[K]>; +} & { + [K in keyof Pick<O, PublicOptionalKeys<O>>]?: InferPropType<O[K]>; +}; +export type ExtractDefaultPropTypes<O> = O extends object ? { + [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>; +} : {}; /** - * Vue `<script setup>` compiler macro for declaring a component's emitted - * events. The expected argument is the same as the component `emits` option. - * - * Example runtime declaration: - * ```js - * const emit = defineEmits(['change', 'update']) - * ``` - * - * Example type-based declaration: - * ```ts - * const emit = defineEmits<{ - * (event: 'change'): void - * (event: 'update', id: number): void - * }>() - * - * emit('change') - * emit('update', 1) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>; +Runtime helper for applying directives to a vnode. Example usage: -export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>; +const comp = resolveComponent('comp') +const foo = resolveDirective('foo') +const bar = resolveDirective('bar') -export declare function defineEmits<TypeEmit>(): TypeEmit; +return withDirectives(h(comp), [ + [foo, this.x], + [bar, this.y] +]) +*/ +export interface DirectiveBinding<V = any> { + instance: ComponentPublicInstance | null; + value: V; + oldValue: V | null; + arg?: string; + modifiers: DirectiveModifiers; + dir: ObjectDirective<any, V>; +} +export type DirectiveHook<T = any, Prev = VNode<any, T> | null, V = any> = (el: T, binding: DirectiveBinding<V>, vnode: VNode<any, T>, prevVNode: Prev) => void; +type SSRDirectiveHook = (binding: DirectiveBinding, vnode: VNode) => Data | undefined; +export interface ObjectDirective<T = any, V = any> { + created?: DirectiveHook<T, null, V>; + beforeMount?: DirectiveHook<T, null, V>; + mounted?: DirectiveHook<T, null, V>; + beforeUpdate?: DirectiveHook<T, VNode<any, T>, V>; + updated?: DirectiveHook<T, VNode<any, T>, V>; + beforeUnmount?: DirectiveHook<T, null, V>; + unmounted?: DirectiveHook<T, null, V>; + getSSRProps?: SSRDirectiveHook; + deep?: boolean; +} +export type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>; +export type Directive<T = any, V = any> = ObjectDirective<T, V> | FunctionDirective<T, V>; +type DirectiveModifiers = Record<string, boolean>; +export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string, DirectiveModifiers]>; /** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. + * Adds directives to a VNode. */ -export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void; +export declare function withDirectives<T extends VNode>(vnode: T, directives: DirectiveArguments): T; -/** - * Vue `<script setup>` compiler macro for declaring component props. The - * expected argument is the same as the component `props` option. - * - * Example runtime declaration: - * ```js - * // using Array syntax - * const props = defineProps(['foo', 'bar']) - * // using Object syntax - * const props = defineProps({ - * foo: String, - * bar: { - * type: Number, - * required: true - * } - * }) - * ``` - * - * Equivalent type-based declaration: - * ```ts - * // will be compiled into equivalent runtime declarations - * const props = defineProps<{ - * foo?: string - * bar: number - * }>() - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Readonly<{ - [key in PropNames]?: any; -}>; - -export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Readonly<ExtractPropTypes<PP>>; - -export declare function defineProps<TypeProps>(): Readonly<TypeProps>; - -export declare const enum DeprecationTypes { +declare enum DeprecationTypes$1 { GLOBAL_MOUNT = "GLOBAL_MOUNT", GLOBAL_MOUNT_CONTAINER = "GLOBAL_MOUNT_CONTAINER", GLOBAL_EXTEND = "GLOBAL_EXTEND", @@ -790,290 +561,99 @@ export declare const enum DeprecationTypes { FILTERS = "FILTERS", PRIVATE_APIS = "PRIVATE_APIS" } +type CompatConfig = Partial<Record<DeprecationTypes$1, boolean | 'suppress-warning'>> & { + MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3); +}; +declare function configureCompat(config: CompatConfig): void; -export declare let devtools: DevtoolsHook; - -declare interface DevtoolsHook { - enabled?: boolean; - emit: (event: string, ...payload: any[]) => void; - on: (event: string, handler: Function) => void; - once: (event: string, handler: Function) => void; - off: (event: string, handler: Function) => void; - appRecords: AppRecord[]; +/** + * Interface for declaring custom options. + * + * @example + * ```ts + * declare module '@vue/runtime-core' { + * interface ComponentCustomOptions { + * beforeRouteUpdate?( + * to: Route, + * from: Route, + * next: () => void + * ): void + * } + * } + * ``` + */ +export interface ComponentCustomOptions { } - -export declare type Directive<T = any, V = any> = ObjectDirective<T, V> | FunctionDirective<T, V>; - -export declare type DirectiveArguments = Array<[Directive] | [Directive, any] | [Directive, any, string] | [Directive, any, string, DirectiveModifiers]>; - -export declare interface DirectiveBinding<V = any> { - instance: ComponentPublicInstance | null; - value: V; - oldValue: V | null; - arg?: string; - modifiers: DirectiveModifiers; - dir: ObjectDirective<any, V>; +export type RenderFunction = () => VNodeChild; +export interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}> extends LegacyOptions<Props, D, C, M, Mixin, Extends, I, II>, ComponentInternalOptions, ComponentCustomOptions { + setup?: (this: void, props: LooseRequired<Props & Prettify<UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, 'P'>>>, ctx: SetupContext<E, S>) => Promise<RawBindings> | RawBindings | RenderFunction | void; + name?: string; + template?: string | object; + render?: Function; + components?: Record<string, Component>; + directives?: Record<string, Directive>; + inheritAttrs?: boolean; + emits?: (E | EE[]) & ThisType<void>; + slots?: S; + expose?: string[]; + serverPrefetch?(): void | Promise<any>; + compilerOptions?: RuntimeCompilerOptions; + call?: (this: unknown, ...args: unknown[]) => never; + __isFragment?: never; + __isTeleport?: never; + __isSuspense?: never; + __defaults?: Defaults; } - -export declare type DirectiveHook<T = any, Prev = VNode<any, T> | null, V = any> = (el: T, binding: DirectiveBinding<V>, vnode: VNode<any, T>, prevVNode: Prev) => void; - -declare type DirectiveModifiers = Record<string, boolean>; - -export { effect } - -export { EffectScheduler } - -export { EffectScope } - -export { effectScope } - -declare type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ - [key in Event]: Options[key] extends (...args: infer Args) => any ? (event: key, ...args: Args) => void : (event: key, ...args: any[]) => void; -}[Event]>; - -export declare type EmitsOptions = ObjectEmitsOptions | string[]; - -declare type EmitsToProps<T extends EmitsOptions> = T extends string[] ? { - [K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any; -} : T extends ObjectEmitsOptions ? { - [K in string & `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}` ? T[Uncapitalize<C>] extends null ? (...args: any[]) => any : (...args: T[Uncapitalize<C>] extends (...args: infer P) => any ? P : never) => any : never; -} : {}; - -declare type EnsureNonVoid<T> = T extends void ? {} : T; - -declare type ErrorCapturedHook<TError = unknown> = (err: TError, instance: ComponentPublicInstance | null, info: string) => boolean | void; - -export declare const enum ErrorCodes { - SETUP_FUNCTION = 0, - RENDER_FUNCTION = 1, - WATCH_GETTER = 2, - WATCH_CALLBACK = 3, - WATCH_CLEANUP = 4, - NATIVE_EVENT_HANDLER = 5, - COMPONENT_EVENT_HANDLER = 6, - VNODE_HOOK = 7, - DIRECTIVE_HOOK = 8, - TRANSITION_HOOK = 9, - APP_ERROR_HANDLER = 10, - APP_WARN_HANDLER = 11, - FUNCTION_REF = 12, - ASYNC_COMPONENT_LOADER = 13, - SCHEDULER = 14 +/** + * Subset of compiler options that makes sense for the runtime. + */ +export interface RuntimeCompilerOptions { + isCustomElement?: (tag: string) => boolean; + whitespace?: 'preserve' | 'condense'; + comments?: boolean; + delimiters?: [string, string]; } - -declare type ErrorTypes = LifecycleHooks | ErrorCodes; - -declare type ExtractComputedReturns<T extends any> = { +export type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, PE = Props & EmitsToProps<E>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S> & { + props?: undefined; +} & ThisType<CreateComponentPublicInstance<PE, RawBindings, D, C, M, Mixin, Extends, E, PE, {}, false, I, S>>; +export type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, Props = Prettify<Readonly<{ + [key in PropNames]?: any; +} & EmitsToProps<E>>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II, S> & { + props: PropNames[]; +} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, {}, false, I, S>>; +export type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}, Props = Prettify<Readonly<ExtractPropTypes<PropsOptions> & EmitsToProps<E>>>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II, S> & { + props: PropsOptions & ThisType<void>; +} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false, I, S>>; +export type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any, S extends SlotsType = any> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, string, S> & ThisType<CreateComponentPublicInstance<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>>>; +export type ComponentOptionsMixin = ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any, any>; +export type ComputedOptions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>; +export interface MethodOptions { + [key: string]: Function; +} +type ExtractComputedReturns<T extends any> = { [key in keyof T]: T[key] extends { get: (...args: any[]) => infer TReturn; } ? TReturn : T[key] extends (...args: any[]) => infer TReturn ? TReturn : never; }; - -export declare type ExtractDefaultPropTypes<O> = O extends object ? { - [K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>; -} : {}; - -declare type ExtractMixin<T> = { - Mixin: MixinToOptionTypes<T>; -}[T extends ComponentOptionsMixin ? 'Mixin' : never]; - -declare type ExtractOptionProp<T> = T extends ComponentOptionsBase<infer P, // Props -any, // RawBindings -any, // D -any, // C -any, // M -any, // Mixin -any, // Extends -any> ? unknown extends P ? {} : P : {}; - -export declare type ExtractPropTypes<O> = { - [K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>; -} & { - [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>; -}; - -export declare const Fragment: { - new (): { - $props: VNodeProps; - }; - __isFragment: true; -}; - -export declare interface FunctionalComponent<P = {}, E extends EmitsOptions = {}> extends ComponentInternalOptions { - (props: P, ctx: Omit<SetupContext<E>, 'expose'>): any; - props?: ComponentPropsOptions<P>; - emits?: E | (keyof E)[]; - inheritAttrs?: boolean; - displayName?: string; - compatConfig?: CompatConfig; -} - -export declare type FunctionDirective<T = any, V = any> = DirectiveHook<T, any, V>; - -export declare const getCurrentInstance: () => ComponentInternalInstance | null; - -export { getCurrentScope } - -export declare function getTransitionRawChildren(children: VNode[], keepComment?: boolean, parentKey?: VNode['key']): VNode[]; - -export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null; - -export declare function h(type: string, children?: RawChildren): VNode; - -export declare function h(type: string, props?: RawProps | null, children?: RawChildren | RawSlots): VNode; - -export declare function h(type: typeof Text_2 | typeof Comment_2, children?: string | number | boolean): VNode; - -export declare function h(type: typeof Text_2 | typeof Comment_2, props?: null, children?: string | number | boolean): VNode; - -export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode; - -export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode; - -export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren): VNode; - -export declare function h(type: typeof Suspense, children?: RawChildren): VNode; - -export declare function h(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): VNode; - -export declare function h<P, E extends EmitsOptions = {}>(type: FunctionalComponent<P, E>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; - -export declare function h(type: Component, children?: RawChildren): VNode; - -export declare function h<P>(type: ConcreteComponent | string, children?: RawChildren): VNode; - -export declare function h<P>(type: ConcreteComponent<P> | string, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren): VNode; - -export declare function h(type: Component, props: null, children?: RawChildren | RawSlots): VNode; - -export declare function h<P>(type: ComponentOptions<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; - -export declare function h(type: Constructor, children?: RawChildren): VNode; - -export declare function h<P>(type: Constructor<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; - -export declare function h(type: DefineComponent, children?: RawChildren): VNode; - -export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; - -export declare function handleError(err: unknown, instance: ComponentInternalInstance | null, type: ErrorTypes, throwInDev?: boolean): void; - -declare type HMRComponent = ComponentOptions | ClassComponent; - -export declare interface HMRRuntime { - createRecord: typeof createRecord; - rerender: typeof rerender; - reload: typeof reload; -} - -declare type Hook<T = () => void> = T | T[]; - -declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null; - -declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector } }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null; - -export declare interface HydrationRenderer extends Renderer<Element | ShadowRoot> { - hydrate: RootHydrateFunction; -} - -declare type InferDefault<P, T> = T extends null | number | string | boolean | symbol | Function ? T | ((props: P) => T) : (props: P) => T; - -declare type InferDefaults<T> = { - [K in keyof T]?: InferDefault<T, NotUndefined<T[K]>>; -}; - -declare type InferPropType<T> = [T] extends [null] ? any : [T] extends [{ - type: null | true; -}] ? any : [T] extends [ObjectConstructor | { - type: ObjectConstructor; -}] ? Record<string, any> : [T] extends [BooleanConstructor | { - type: BooleanConstructor; -}] ? boolean : [T] extends [DateConstructor | { - type: DateConstructor; -}] ? Date : [T] extends [(infer U)[] | { - type: (infer U)[]; -}] ? U extends DateConstructor ? Date | InferPropType<U> : InferPropType<U> : [T] extends [Prop<infer V, infer D>] ? unknown extends V ? IfAny<V, V, D> : V : T; - -export declare function initCustomFormatter(): void; - -export declare function inject<T>(key: InjectionKey<T> | string): T | undefined; - -export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T; - -export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T; - -export declare interface InjectionKey<T> extends Symbol { -} - -/* Excluded from this release type: InternalRenderFunction */ - -declare type InternalSlots = { - [name: string]: Slot | undefined; -}; - -declare type IntersectionMixin<T> = IsDefaultMixinComponent<T> extends true ? OptionTypesType<{}, {}, {}, {}, {}> : UnionToIntersection<ExtractMixin<T>>; - -declare function isCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, enableForBuiltIn?: boolean): boolean; - -declare type IsDefaultMixinComponent<T> = T extends ComponentOptionsMixin ? ComponentOptionsMixin extends T ? true : false : false; - -export declare function isMemoSame(cached: VNode, memo: any[]): boolean; - -export { isProxy } - -export { isReactive } - -export { isReadonly } - -export { isRef } - -export declare const isRuntimeOnly: () => boolean; - -export { isShallow } - -export declare function isVNode(value: any): value is VNode; - -export declare const KeepAlive: { - new (): { - $props: VNodeProps & KeepAliveProps; - }; - __isKeepAlive: true; -}; - -export declare interface KeepAliveProps { - include?: MatchPattern; - exclude?: MatchPattern; - max?: number | string; -} - -export declare type LegacyConfig = { - /** - * @deprecated `config.silent` option has been removed - */ - silent?: boolean; - /** - * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead - * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags - */ - devtools?: boolean; - /** - * @deprecated use `config.isCustomElement` instead - * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement - */ - ignoredElements?: (string | RegExp)[]; - /** - * @deprecated - * https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html - */ - keyCodes?: Record<string, number | number[]>; - /** - * @deprecated - * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed - */ - productionTip?: boolean; -}; - -declare interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin> { +type ObjectWatchOptionItem = { + handler: WatchCallback | string; +} & WatchOptions; +type WatchOptionItem = string | WatchCallback | ObjectWatchOptionItem; +type ComponentWatchOptionItem = WatchOptionItem | WatchOptionItem[]; +type ComponentWatchOptions = Record<string, ComponentWatchOptionItem>; +export type ComponentProvideOptions = ObjectProvideOptions | Function; +type ObjectProvideOptions = Record<string | symbol, unknown>; +export type ComponentInjectOptions = string[] | ObjectInjectOptions; +type ObjectInjectOptions = Record<string | symbol, string | symbol | { + from?: string | symbol; + default?: unknown; +}>; +type InjectToObject<T extends ComponentInjectOptions> = T extends string[] ? { + [K in T[number]]?: unknown; +} : T extends ObjectInjectOptions ? { + [K in keyof T]?: unknown; +} : never; +interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, I extends ComponentInjectOptions, II extends string> { compatConfig?: CompatConfig; [key: string]: any; data?: (this: CreateComponentPublicInstance<Props, {}, {}, {}, MethodOptions, Mixin, Extends>, vm: CreateComponentPublicInstance<Props, {}, {}, {}, MethodOptions, Mixin, Extends>) => D; @@ -1081,7 +661,7 @@ declare interface LegacyOptions<Props, D, C extends ComputedOptions, M extends M methods?: M; watch?: ComponentWatchOptions; provide?: ComponentProvideOptions; - inject?: ComponentInjectOptions; + inject?: I | II[]; filters?: Record<string, Function>; mixins?: Mixin[]; extends?: Extends; @@ -1117,52 +697,8 @@ declare interface LegacyOptions<Props, D, C extends ComputedOptions, M extends M */ __differentiator?: keyof D | keyof C | keyof M; } - -declare type LegacyPublicInstance = ComponentPublicInstance & LegacyPublicProperties; - -declare interface LegacyPublicProperties { - $set(target: object, key: string, value: any): void; - $delete(target: object, key: string): void; - $mount(el?: string | Element): this; - $destroy(): void; - $scopedSlots: Slots; - $on(event: string | string[], fn: Function): this; - $once(event: string, fn: Function): this; - $off(event?: string | string[], fn?: Function): this; - $children: LegacyPublicProperties[]; - $listeners: Record<string, Function | Function[]>; -} - -declare type LifecycleHook<TFn = Function> = TFn[] | null; - -declare const enum LifecycleHooks { - BEFORE_CREATE = "bc", - CREATED = "c", - BEFORE_MOUNT = "bm", - MOUNTED = "m", - BEFORE_UPDATE = "bu", - UPDATED = "u", - BEFORE_UNMOUNT = "bum", - UNMOUNTED = "um", - DEACTIVATED = "da", - ACTIVATED = "a", - RENDER_TRIGGERED = "rtg", - RENDER_TRACKED = "rtc", - ERROR_CAPTURED = "ec", - SERVER_PREFETCH = "sp" -} - -declare type MapSources<T, Immediate> = { - [K in keyof T]: T[K] extends WatchSource<infer V> ? Immediate extends true ? V | undefined : V : T[K] extends object ? Immediate extends true ? T[K] | undefined : T[K] : never; -}; - -export { markRaw } - -declare type MatchPattern = string | RegExp | (string | RegExp)[]; - -declare type MergedComponentOptions = ComponentOptions & MergedComponentOptionsOverride; - -declare type MergedComponentOptionsOverride = { +type MergedHook<T = () => void> = T | T[]; +type MergedComponentOptionsOverride = { beforeCreate?: MergedHook; created?: MergedHook; beforeMount?: MergedHook; @@ -1181,115 +717,219 @@ declare type MergedComponentOptionsOverride = { renderTriggered?: MergedHook<DebuggerHook>; errorCaptured?: MergedHook<ErrorCapturedHook>; }; +type OptionTypesKeys = 'P' | 'B' | 'D' | 'C' | 'M' | 'Defaults'; +type OptionTypesType<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Defaults = {}> = { + P: P; + B: B; + D: D; + C: C; + M: M; + Defaults: Defaults; +}; -/* Excluded from this release type: mergeDefaults */ - -declare type MergedHook<T = () => void> = T | T[]; - -export declare function mergeProps(...args: (Data & VNodeProps)[]): Data; - -export declare interface MethodOptions { - [key: string]: Function; +export interface InjectionKey<T> extends Symbol { } +export declare function provide<T, K = InjectionKey<T> | string | number>(key: K, value: K extends InjectionKey<infer V> ? V : T): void; +export declare function inject<T>(key: InjectionKey<T> | string): T | undefined; +export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T, treatDefaultAsFactory?: false): T; +export declare function inject<T>(key: InjectionKey<T> | string, defaultValue: T | (() => T), treatDefaultAsFactory: true): T; +/** + * Returns true if `inject()` can be used without warning about being called in the wrong place (e.g. outside of + * setup()). This is used by libraries that want to use `inject()` internally without triggering a warning to the end + * user. One example is `useRoute()` in `vue-router`. + */ +export declare function hasInjectionContext(): boolean; -declare type MixinToOptionTypes<T> = T extends ComponentOptionsBase<infer P, infer B, infer D, infer C, infer M, infer Mixin, infer Extends, any, any, infer Defaults> ? OptionTypesType<P & {}, B & {}, D & {}, C & {}, M & {}, Defaults & {}> & IntersectionMixin<Mixin> & IntersectionMixin<Extends> : never; +export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps; +type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>); +export type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}> = ComponentPublicInstanceConstructor<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, PP & Props, Defaults, true, {}, S>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S> & PP; +export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & { + props?: (keyof Props)[]; + emits?: E | EE[]; + slots?: S; +}): (props: Props & EmitsToProps<E>) => any; +export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & { + props?: ComponentObjectPropsOptions<Props>; + emits?: E | EE[]; + slots?: S; +}): (props: Props & EmitsToProps<E>) => any; +export declare function defineComponent<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}, I extends ComponentInjectOptions = {}, II extends string = string>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, PublicProps, ResolveProps<Props, E>, ExtractDefaultPropTypes<Props>, S>; +export declare function defineComponent<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}, I extends ComponentInjectOptions = {}, II extends string = string, Props = Readonly<{ + [key in PropNames]?: any; +}>>(options: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, PublicProps, ResolveProps<Props, E>, ExtractDefaultPropTypes<Props>, S>; +export declare function defineComponent<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}, I extends ComponentInjectOptions = {}, II extends string = string>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, PublicProps, ResolveProps<PropsOptions, E>, ExtractDefaultPropTypes<PropsOptions>, S>; -declare type MountChildrenFn = (children: VNodeArrayChildren, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, start?: number) => void; +export interface App<HostElement = any> { + version: string; + config: AppConfig; + use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): this; + use<Options>(plugin: Plugin<Options>, options: Options): this; + mixin(mixin: ComponentOptions): this; + component(name: string): Component | undefined; + component(name: string, component: Component | DefineComponent): this; + directive<T = any, V = any>(name: string): Directive<T, V> | undefined; + directive<T = any, V = any>(name: string, directive: Directive<T, V>): this; + mount(rootContainer: HostElement | string, isHydrate?: boolean, namespace?: boolean | ElementNamespace): ComponentPublicInstance; + unmount(): void; + provide<T>(key: InjectionKey<T> | string, value: T): this; + /** + * Runs a function with the app as active instance. This allows using of `inject()` within the function to get access + * to variables provided via `app.provide()`. + * + * @param fn - function to run with the app as active instance + */ + runWithContext<T>(fn: () => T): T; + _uid: number; + _component: ConcreteComponent; + _props: Data | null; + _container: HostElement | null; + _context: AppContext; + _instance: ComponentInternalInstance | null; + /** + * v2 compat only + */ + filter?(name: string): Function | undefined; + filter?(name: string, filter: Function): this; +} +export type OptionMergeFunction = (to: unknown, from: unknown) => any; +export interface AppConfig { + readonly isNativeTag?: (tag: string) => boolean; + performance: boolean; + optionMergeStrategies: Record<string, OptionMergeFunction>; + globalProperties: ComponentCustomProperties & Record<string, any>; + errorHandler?: (err: unknown, instance: ComponentPublicInstance | null, info: string) => void; + warnHandler?: (msg: string, instance: ComponentPublicInstance | null, trace: string) => void; + /** + * Options to pass to `@vue/compiler-dom`. + * Only supported in runtime compiler build. + */ + compilerOptions: RuntimeCompilerOptions; + /** + * @deprecated use config.compilerOptions.isCustomElement + */ + isCustomElement?: (tag: string) => boolean; +} +export interface AppContext { + app: App; + config: AppConfig; + mixins: ComponentOptions[]; + components: Record<string, Component>; + directives: Record<string, Directive>; + provides: Record<string | symbol, any>; +} +type PluginInstallFunction<Options = any[]> = Options extends unknown[] ? (app: App, ...options: Options) => any : (app: App, options: Options) => any; +export type ObjectPlugin<Options = any[]> = { + install: PluginInstallFunction<Options>; +}; +export type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>; +export type Plugin<Options = any[]> = FunctionPlugin<Options> | ObjectPlugin<Options>; +export type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>; -declare type MountComponentFn = (initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, optimized: boolean) => void; - -declare type MoveFn = (vnode: VNode, container: RendererElement, anchor: RendererNode | null, type: MoveType, parentSuspense?: SuspenseBoundary | null) => void; - -declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void; - -declare const enum MoveType { - ENTER = 0, - LEAVE = 1, +type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>; +export interface TeleportProps { + to: string | RendererElement | null | undefined; + disabled?: boolean; +} +declare const TeleportImpl: { + name: string; + __isTeleport: boolean; + process(n1: TeleportVNode | null, n2: TeleportVNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, namespace: ElementNamespace, slotScopeIds: string[] | null, optimized: boolean, internals: RendererInternals): void; + remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, optimized: boolean, { um: unmount, o: { remove: hostRemove } }: RendererInternals, doRemove: boolean): void; + move: typeof moveTeleport; + hydrate: typeof hydrateTeleport; +}; +declare enum TeleportMoveTypes { + TARGET_CHANGE = 0, + TOGGLE = 1, REORDER = 2 } +declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void; +declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null; +export declare const Teleport: { + new (): { + $props: VNodeProps & TeleportProps; + $slots: { + default(): VNode[]; + }; + }; + __isTeleport: true; +}; -declare type MultiWatchSources = (WatchSource<unknown> | object)[]; - -declare type NextFn = (vnode: VNode) => RendererNode | null; - -export declare function nextTick<T = void>(this: T, fn?: (this: T) => void): Promise<void>; - -export { normalizeClass } - -declare type NormalizedProp = null | (PropOptions & { - [BooleanFlags.shouldCast]?: boolean; - [BooleanFlags.shouldCastTrue]?: boolean; -}); - -declare type NormalizedProps = Record<string, NormalizedProp>; - -declare type NormalizedPropsOptions = [NormalizedProps, string[]] | []; - -export { normalizeProps } - -export { normalizeStyle } - -declare function normalizeSuspenseChildren(vnode: VNode): void; - -declare function normalizeVNode(child: VNodeChild): VNode; - -declare type NotUndefined<T> = T extends undefined ? never : T; - +/** + * @private + */ +export declare function resolveComponent(name: string, maybeSelfReference?: boolean): ConcreteComponent | string; declare const NULL_DYNAMIC_COMPONENT: unique symbol; +/** + * @private + */ +export declare function resolveDynamicComponent(component: unknown): VNodeTypes; +/** + * @private + */ +export declare function resolveDirective(name: string): Directive | undefined; -export declare interface ObjectDirective<T = any, V = any> { - created?: DirectiveHook<T, null, V>; - beforeMount?: DirectiveHook<T, null, V>; - mounted?: DirectiveHook<T, null, V>; - beforeUpdate?: DirectiveHook<T, VNode<any, T>, V>; - updated?: DirectiveHook<T, VNode<any, T>, V>; - beforeUnmount?: DirectiveHook<T, null, V>; - unmounted?: DirectiveHook<T, null, V>; - getSSRProps?: SSRDirectiveHook; - deep?: boolean; +export declare const Fragment: { + new (): { + $props: VNodeProps; + }; + __isFragment: true; +}; +export declare const Text: unique symbol; +export declare const Comment: unique symbol; +export declare const Static: unique symbol; +export type VNodeTypes = string | VNode | Component | typeof Text | typeof Static | typeof Comment | typeof Fragment | typeof Teleport | typeof TeleportImpl | typeof Suspense | typeof SuspenseImpl; +export type VNodeRef = string | Ref | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void); +type VNodeNormalizedRefAtom = { + i: ComponentInternalInstance; + r: VNodeRef; + k?: string; + f?: boolean; +}; +type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[]; +type VNodeMountHook = (vnode: VNode) => void; +type VNodeUpdateHook = (vnode: VNode, oldVNode: VNode) => void; +export type VNodeProps = { + key?: string | number | symbol; + ref?: VNodeRef; + ref_for?: boolean; + ref_key?: string; + onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[]; + onVnodeMounted?: VNodeMountHook | VNodeMountHook[]; + onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[]; + onVnodeUpdated?: VNodeUpdateHook | VNodeUpdateHook[]; + onVnodeBeforeUnmount?: VNodeMountHook | VNodeMountHook[]; + onVnodeUnmounted?: VNodeMountHook | VNodeMountHook[]; +}; +type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void; +export type VNodeArrayChildren = Array<VNodeArrayChildren | VNodeChildAtom>; +export type VNodeChild = VNodeChildAtom | VNodeArrayChildren; +export type VNodeNormalizedChildren = string | VNodeArrayChildren | RawSlots | null; +export interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = { + [key: string]: any; +}> { + type: VNodeTypes; + props: (VNodeProps & ExtraProps) | null; + key: string | number | symbol | null; + ref: VNodeNormalizedRef | null; + /** + * SFC only. This is assigned on vnode creation using currentScopeId + * which is set alongside currentRenderingInstance. + */ + scopeId: string | null; + children: VNodeNormalizedChildren; + component: ComponentInternalInstance | null; + dirs: DirectiveBinding[] | null; + transition: TransitionHooks<HostElement> | null; + el: HostNode | null; + anchor: HostNode | null; + target: HostElement | null; + targetAnchor: HostNode | null; + suspense: SuspenseBoundary | null; + shapeFlag: number; + patchFlag: number; + appContext: AppContext | null; } - -export declare type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>; - -declare type ObjectInjectOptions = Record<string | symbol, string | symbol | { - from?: string | symbol; - default?: unknown; -}>; - -declare type ObjectProvideOptions = Record<string | symbol, unknown>; - -declare type ObjectWatchOptionItem = { - handler: WatchCallback | string; -} & WatchOptions; - -export declare function onActivated(hook: Function, target?: ComponentInternalInstance | null): void; - -export declare const onBeforeMount: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; - -export declare const onBeforeUnmount: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; - -export declare const onBeforeUpdate: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; - -declare type OnCleanup = (cleanupFn: () => void) => void; - -export declare function onDeactivated(hook: Function, target?: ComponentInternalInstance | null): void; - -export declare function onErrorCaptured<TError = Error>(hook: ErrorCapturedHook<TError>, target?: ComponentInternalInstance | null): void; - -export declare const onMounted: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; - -export declare const onRenderTracked: (hook: DebuggerHook, target?: ComponentInternalInstance | null) => false | Function | undefined; - -export declare const onRenderTriggered: (hook: DebuggerHook, target?: ComponentInternalInstance | null) => false | Function | undefined; - -export { onScopeDispose } - -export declare const onServerPrefetch: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; - -export declare const onUnmounted: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; - -export declare const onUpdated: (hook: () => any, target?: ComponentInternalInstance | null) => false | Function | undefined; - /** * Open a block. * This must be called before `createBlock`. It cannot be part of `createBlock` @@ -1307,287 +947,6 @@ export declare const onUpdated: (hook: () => any, target?: ComponentInternalInst * @private */ export declare function openBlock(disableTracking?: boolean): void; - -declare type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>; - -export declare type OptionMergeFunction = (to: unknown, from: unknown) => any; - -declare type OptionTypesKeys = 'P' | 'B' | 'D' | 'C' | 'M' | 'Defaults'; - -declare type OptionTypesType<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Defaults = {}> = { - P: P; - B: B; - D: D; - C: C; - M: M; - Defaults: Defaults; -}; - -declare type PatchBlockChildrenFn = (oldChildren: VNode[], newChildren: VNode[], fallbackContainer: RendererElement, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null) => void; - -declare type PatchChildrenFn = (n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean) => void; - -declare type PatchFn = (n1: VNode | null, // null means this is a mount -n2: VNode, container: RendererElement, anchor?: RendererNode | null, parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, isSVG?: boolean, slotScopeIds?: string[] | null, optimized?: boolean) => void; - -declare type Plugin_2 = (PluginInstallFunction & { - install?: PluginInstallFunction; -}) | { - install: PluginInstallFunction; -}; -export { Plugin_2 as Plugin } - -declare type PluginInstallFunction = (app: App, ...options: any[]) => any; - -/** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ -export declare function popScopeId(): void; - -export declare type Prop<T, D = T> = PropOptions<T, D> | PropType<T>; - -declare type PropConstructor<T = any> = { - new (...args: any[]): T & {}; -} | { - (): T; -} | PropMethod<T>; - -declare type PropMethod<T, TConstructor = any> = [T] extends [ -((...args: any) => any) | undefined -] ? { - new (): TConstructor; - (): T; - readonly prototype: TConstructor; -} : never; - -declare interface PropOptions<T = any, D = T> { - type?: PropType<T> | true | null; - required?: boolean; - default?: D | DefaultFactory<D> | null | undefined | object; - validator?(value: unknown): boolean; -} - -declare type PropsWithDefaults<Base, Defaults> = Base & { - [K in keyof Defaults]: K extends keyof Base ? NotUndefined<Base[K]> : never; -}; - -export declare type PropType<T> = PropConstructor<T> | PropConstructor<T>[]; - -export declare function provide<T>(key: InjectionKey<T> | string | number, value: T): void; - -export { proxyRefs } - -declare type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps; - -/** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ -export declare function pushScopeId(id: string | null): void; - -export declare function queuePostFlushCb(cb: SchedulerJobs): void; - -declare type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any); - -declare type RawProps = VNodeProps & { - __v_isVNode?: never; - [Symbol.iterator]?: never; -} & Record<string, any>; - -declare type RawSlots = { - [name: string]: unknown; - $stable?: boolean; - /* Excluded from this release type: _ctx */ - /* Excluded from this release type: _ */ -}; - -export { reactive } - -export { ReactiveEffect } - -export { ReactiveEffectOptions } - -export { ReactiveEffectRunner } - -export { ReactiveFlags } - -export { readonly } - -export { Ref } - -export { ref } - -/** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ -export declare function registerRuntimeCompiler(_compile: any): void; - -declare function reload(id: string, newComp: HMRComponent): void; - -declare type RemoveFn = (vnode: VNode) => void; - -declare function renderComponentRoot(instance: ComponentInternalInstance): VNode; - -export declare interface Renderer<HostElement = RendererElement> { - render: RootRenderFunction<HostElement>; - createApp: CreateAppFunction<HostElement>; -} - -export declare interface RendererElement extends RendererNode { -} - -declare interface RendererInternals<HostNode = RendererNode, HostElement = RendererElement> { - p: PatchFn; - um: UnmountFn; - r: RemoveFn; - m: MoveFn; - mt: MountComponentFn; - mc: MountChildrenFn; - pc: PatchChildrenFn; - pbc: PatchBlockChildrenFn; - n: NextFn; - o: RendererOptions<HostNode, HostElement>; -} - -export declare interface RendererNode { - [key: string]: any; -} - -export declare interface RendererOptions<HostNode = RendererNode, HostElement = RendererElement> { - patchProp(el: HostElement, key: string, prevValue: any, nextValue: any, isSVG?: boolean, prevChildren?: VNode<HostNode, HostElement>[], parentComponent?: ComponentInternalInstance | null, parentSuspense?: SuspenseBoundary | null, unmountChildren?: UnmountChildrenFn): void; - insert(el: HostNode, parent: HostElement, anchor?: HostNode | null): void; - remove(el: HostNode): void; - createElement(type: string, isSVG?: boolean, isCustomizedBuiltIn?: string, vnodeProps?: (VNodeProps & { - [key: string]: any; - }) | null): HostElement; - createText(text: string): HostNode; - createComment(text: string): HostNode; - setText(node: HostNode, text: string): void; - setElementText(node: HostElement, text: string): void; - parentNode(node: HostNode): HostElement | null; - nextSibling(node: HostNode): HostNode | null; - querySelector?(selector: string): HostElement | null; - setScopeId?(el: HostElement, id: string): void; - cloneNode?(node: HostNode): HostNode; - insertStaticContent?(content: string, parent: HostElement, anchor: HostNode | null, isSVG: boolean, start?: HostNode | null, end?: HostNode | null): [HostNode, HostNode]; -} - -export declare type RenderFunction = () => VNodeChild; - -/** - * v-for string - * @private - */ -export declare function renderList(source: string, renderItem: (value: string, index: number) => VNodeChild): VNodeChild[]; - -/** - * v-for number - */ -export declare function renderList(source: number, renderItem: (value: number, index: number) => VNodeChild): VNodeChild[]; - -/** - * v-for array - */ -export declare function renderList<T>(source: T[], renderItem: (value: T, index: number) => VNodeChild): VNodeChild[]; - -/** - * v-for iterable - */ -export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T, index: number) => VNodeChild): VNodeChild[]; - -/** - * v-for object - */ -export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: K, index: number) => VNodeChild): VNodeChild[]; - -/** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ -export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean): VNode; - -declare type RequiredKeys<T> = { - [K in keyof T]: T[K] extends { - required: true; - } | { - default: any; - } | BooleanConstructor | { - type: BooleanConstructor; - } ? T[K] extends { - default: undefined | (() => undefined); - } ? never : K : never; -}[keyof T]; - -declare function rerender(id: string, newRender?: Function): void; - -/** - * @private - */ -export declare function resolveComponent(name: string, maybeSelfReference?: boolean): ConcreteComponent | string; - -/** - * @private - */ -export declare function resolveDirective(name: string): Directive | undefined; - -/** - * @private - */ -export declare function resolveDynamicComponent(component: unknown): VNodeTypes; - -/* Excluded from this release type: resolveFilter */ - -/* Excluded from this release type: resolveFilter_2 */ - -export declare function resolveTransitionHooks(vnode: VNode, props: BaseTransitionProps<any>, state: TransitionState, instance: ComponentInternalInstance): TransitionHooks; - -export declare type RootHydrateFunction = (vnode: VNode<Node, Element>, container: Element | ShadowRoot) => void; - -export declare type RootRenderFunction<HostElement = RendererElement> = (vnode: VNode | null, container: HostElement, isSVG?: boolean) => void; - -/** - * Subset of compiler options that makes sense for the runtime. - */ -export declare interface RuntimeCompilerOptions { - isCustomElement?: (tag: string) => boolean; - whitespace?: 'preserve' | 'condense'; - comments?: boolean; - delimiters?: [string, string]; -} - -declare interface SchedulerJob extends Function { - id?: number; - active?: boolean; - computed?: boolean; - /** - * Indicates whether the effect is allowed to recursively trigger itself - * when managed by the scheduler. - * - * By default, a job cannot trigger itself because some built-in method calls, - * e.g. Array.prototype.push actually performs reads as well (#1740) which - * can lead to confusing infinite loops. - * The allowed cases are component update functions and watch callbacks. - * Component update functions may update child component props, which in turn - * trigger flush: "pre" watch callbacks that mutates state that the parent - * relies on (#1801). Watch callbacks doesn't track its dependencies so if it - * triggers itself again, it's likely intentional and it is the user's - * responsibility to perform recursive state mutation that eventually - * stabilizes (#1727). - */ - allowRecurse?: boolean; - /** - * Attached by renderer.ts when setting up a component's render effect - * Used to obtain component information when reporting max recursive updates. - * dev only. - */ - ownerInstance?: ComponentInternalInstance; -} - -declare type SchedulerJobs = SchedulerJob | SchedulerJob[]; - /** * Block tracking sometimes needs to be disabled, for example during the * creation of a tree that needs to be cached by v-once. The compiler generates @@ -1605,167 +964,22 @@ declare type SchedulerJobs = SchedulerJob | SchedulerJob[]; * @private */ export declare function setBlockTracking(value: number): void; - /** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ -declare function setCurrentRenderingInstance(instance: ComponentInternalInstance | null): ComponentInternalInstance | null; - -export declare function setDevtoolsHook(hook: DevtoolsHook, target: any): void; - -export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void; - -declare function setupComponent(instance: ComponentInternalInstance, isSSR?: boolean): Promise<void> | undefined; - -export declare interface SetupContext<E = EmitsOptions> { - attrs: Data; - slots: Slots; - emit: EmitFn<E>; - expose: (exposed?: Record<string, any>) => void; -} - -declare type SetupRenderEffectFn = (instance: ComponentInternalInstance, initialVNode: VNode, container: RendererElement, anchor: RendererNode | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, optimized: boolean) => void; - -export { ShallowReactive } - -export { shallowReactive } - -export { shallowReadonly } - -export { ShallowRef } - -export { shallowRef } - -export { ShallowUnwrapRef } - -export declare type Slot = (...args: any[]) => VNode[]; - -export declare type Slots = Readonly<InternalSlots>; - -/** - * Use this for features where legacy usage is still possible, but will likely - * lead to runtime error if compat is disabled. (warn in all cases) - */ -declare function softAssertCompatEnabled(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): boolean; - -export declare const ssrContextKey: unique symbol; - -declare type SSRDirectiveHook = (binding: DirectiveBinding, vnode: VNode) => Data | undefined; - -/* Excluded from this release type: ssrUtils */ - -export declare const Static: unique symbol; - -export { stop_2 as stop } - -export declare const Suspense: { - new (): { - $props: VNodeProps & SuspenseProps; - }; - __isSuspense: true; -}; - -export declare interface SuspenseBoundary { - vnode: VNode<RendererNode, RendererElement, SuspenseProps>; - parent: SuspenseBoundary | null; - parentComponent: ComponentInternalInstance | null; - isSVG: boolean; - container: RendererElement; - hiddenContainer: RendererElement; - anchor: RendererNode | null; - activeBranch: VNode | null; - pendingBranch: VNode | null; - deps: number; - pendingId: number; - timeout: number; - isInFallback: boolean; - isHydrating: boolean; - isUnmounted: boolean; - effects: Function[]; - resolve(force?: boolean): void; - fallback(fallbackVNode: VNode): void; - move(container: RendererElement, anchor: RendererNode | null, type: MoveType): void; - next(): RendererNode | null; - registerDep(instance: ComponentInternalInstance, setupRenderEffect: SetupRenderEffectFn): void; - unmount(parentSuspense: SuspenseBoundary | null, doRemove?: boolean): void; -} - -declare const SuspenseImpl: { - name: string; - __isSuspense: boolean; - process(n1: VNode | null, n2: VNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals): void; - hydrate: typeof hydrateSuspense; - create: typeof createSuspenseBoundary; - normalize: typeof normalizeSuspenseChildren; -}; - -export declare interface SuspenseProps { - onResolve?: () => void; - onPending?: () => void; - onFallback?: () => void; - timeout?: string | number; -} - -export declare const Teleport: { - new (): { - $props: VNodeProps & TeleportProps; - }; - __isTeleport: true; -}; - -declare const TeleportImpl: { - __isTeleport: boolean; - process(n1: TeleportVNode | null, n2: TeleportVNode, container: RendererElement, anchor: RendererNode | null, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, internals: RendererInternals): void; - remove(vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, optimized: boolean, { um: unmount, o: { remove: hostRemove } }: RendererInternals, doRemove: Boolean): void; - move: typeof moveTeleport; - hydrate: typeof hydrateTeleport; -}; - -declare const enum TeleportMoveTypes { - TARGET_CHANGE = 0, - TOGGLE = 1, - REORDER = 2 -} - -export declare interface TeleportProps { - to: string | RendererElement | null | undefined; - disabled?: boolean; -} - -declare type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>; - -declare const Text_2: unique symbol; -export { Text_2 as Text } - -export { toDisplayString } - -export { toHandlerKey } - -/** - * For prefixing keys in v-on="obj" with "on" * @private */ -export declare function toHandlers(obj: Record<string, any>): Record<string, any>; - -export { toRaw } - -export { ToRef } - -export { toRef } - -export { ToRefs } - -export { toRefs } - -export { TrackOpTypes } - +export declare function createElementBlock(type: string | typeof Fragment, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[], shapeFlag?: number): VNode<RendererNode, RendererElement, { + [key: string]: any; +}>; +/** + * Create a block root vnode. Takes the same exact arguments as `createVNode`. + * A block root keeps track of dynamic nodes within the block in the + * `dynamicChildren` array. + * + * @private + */ +export declare function createBlock(type: VNodeTypes | ClassComponent, props?: Record<string, any> | null, children?: any, patchFlag?: number, dynamicProps?: string[]): VNode; +export declare function isVNode(value: any): value is VNode; +declare let vnodeArgsTransformer: ((args: Parameters<typeof _createVNode>, instance: ComponentInternalInstance | null) => Parameters<typeof _createVNode>) | undefined; /** * Internal API for registering an arguments transform for createVNode * used for creating stubs in the test-utils @@ -1773,174 +987,362 @@ export { TrackOpTypes } * typings */ export declare function transformVNodeArgs(transformer?: typeof vnodeArgsTransformer): void; - -export declare interface TransitionHooks<HostElement extends RendererElement = RendererElement> { - mode: BaseTransitionProps['mode']; - persisted: boolean; - beforeEnter(el: HostElement): void; - enter(el: HostElement): void; - leave(el: HostElement, remove: () => void): void; - clone(vnode: VNode): TransitionHooks<HostElement>; - afterLeave?(): void; - delayLeave?(el: HostElement, earlyRemove: () => void, delayedLeave: () => void): void; - delayedLeave?(): void; -} - -export declare interface TransitionState { - isMounted: boolean; - isLeaving: boolean; - isUnmounting: boolean; - leavingVNodes: Map<any, Record<string, VNode>>; -} - -export { TriggerOpTypes } - -export { triggerRef } - -declare type UnmountChildrenFn = (children: VNode[], parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean, start?: number) => void; - -declare type UnmountFn = (vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, doRemove?: boolean, optimized?: boolean) => void; - -export { unref } - -declare type UnwrapMixinsType<T, Type extends OptionTypesKeys> = T extends OptionTypesType ? T[Type] : never; - -export { UnwrapNestedRefs } - -export { UnwrapRef } - -export declare function useAttrs(): SetupContext['attrs']; - -export declare function useSlots(): SetupContext['slots']; - -export declare const useSSRContext: <T = Record<string, any>>() => T | undefined; - -export declare function useTransitionState(): TransitionState; - -export declare const version: string; - -export declare interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraProps = { +export declare function createBaseVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode<RendererNode, RendererElement, { [key: string]: any; -}> { - /* Excluded from this release type: __v_isVNode */ - /* Excluded from this release type: __v_skip */ - type: VNodeTypes; - props: (VNodeProps & ExtraProps) | null; - key: string | number | symbol | null; - ref: VNodeNormalizedRef | null; +}>; + +export declare const createVNode: typeof _createVNode; +declare function _createVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, isBlockNode?: boolean): VNode; +export declare function guardReactiveProps(props: (Data & VNodeProps) | null): (Data & VNodeProps) | null; +export declare function cloneVNode<T, U>(vnode: VNode<T, U>, extraProps?: (Data & VNodeProps) | null, mergeRef?: boolean): VNode<T, U>; +/** + * @private + */ +export declare function createTextVNode(text?: string, flag?: number): VNode; +/** + * @private + */ +export declare function createStaticVNode(content: string, numberOfNodes: number): VNode; +/** + * @private + */ +export declare function createCommentVNode(text?: string, asBlock?: boolean): VNode; +export declare function mergeProps(...args: (Data & VNodeProps)[]): Data; + +type Data = Record<string, unknown>; +/** + * Public utility type for extracting the instance type of a component. + * Works with all valid component definition types. This is intended to replace + * the usage of `InstanceType<typeof Comp>` which only works for + * constructor-based component definition types. + * + * Exmaple: + * ```ts + * const MyComp = { ... } + * declare const instance: ComponentInstance<typeof MyComp> + * ``` + */ +export type ComponentInstance<T> = T extends { + new (): ComponentPublicInstance; +} ? InstanceType<T> : T extends FunctionalComponent<infer Props, infer Emits> ? ComponentPublicInstance<Props, {}, {}, {}, {}, ShortEmitsToObject<Emits>> : T extends Component<infer Props, infer RawBindings, infer D, infer C, infer M> ? ComponentPublicInstance<unknown extends Props ? {} : Props, unknown extends RawBindings ? {} : RawBindings, unknown extends D ? {} : D, C, M> : never; +/** + * For extending allowed non-declared props on components in TSX + */ +export interface ComponentCustomProps { +} +/** + * Default allowed non-declared props on component in TSX + */ +export interface AllowedComponentProps { + class?: unknown; + style?: unknown; +} +interface ComponentInternalOptions { /** - * SFC only. This is assigned on vnode creation using currentScopeId - * which is set alongside currentRenderingInstance. + * Compat build only, for bailing out of certain compatibility behavior */ - scopeId: string | null; - /* Excluded from this release type: slotScopeIds */ - children: VNodeNormalizedChildren; - component: ComponentInternalInstance | null; - dirs: DirectiveBinding[] | null; - transition: TransitionHooks<HostElement> | null; - el: HostNode | null; - anchor: HostNode | null; - target: HostElement | null; - targetAnchor: HostNode | null; - /* Excluded from this release type: staticCount */ - suspense: SuspenseBoundary | null; - /* Excluded from this release type: ssContent */ - /* Excluded from this release type: ssFallback */ - shapeFlag: number; - patchFlag: number; - /* Excluded from this release type: dynamicProps */ - /* Excluded from this release type: dynamicChildren */ - appContext: AppContext | null; - /* Excluded from this release type: memo */ - /* Excluded from this release type: isCompatRoot */ - /* Excluded from this release type: ce */ + __isBuiltIn?: boolean; + /** + * This one should be exposed so that devtools can make use of it + */ + __file?: string; + /** + * name inferred from filename + */ + __name?: string; } - -declare let vnodeArgsTransformer: ((args: Parameters<typeof _createVNode>, instance: ComponentInternalInstance | null) => Parameters<typeof _createVNode>) | undefined; - -export declare type VNodeArrayChildren = Array<VNodeArrayChildren | VNodeChildAtom>; - -export declare type VNodeChild = VNodeChildAtom | VNodeArrayChildren; - -declare type VNodeChildAtom = VNode | string | number | boolean | null | undefined | void; - -declare type VNodeMountHook = (vnode: VNode) => void; - -export declare type VNodeNormalizedChildren = string | VNodeArrayChildren | RawSlots | null; - -declare type VNodeNormalizedRef = VNodeNormalizedRefAtom | VNodeNormalizedRefAtom[]; - -declare type VNodeNormalizedRefAtom = { - i: ComponentInternalInstance; - r: VNodeRef; - k?: string; - f?: boolean; -}; - -export declare type VNodeProps = { - key?: string | number | symbol; - ref?: VNodeRef; - ref_for?: boolean; - ref_key?: string; - onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[]; - onVnodeMounted?: VNodeMountHook | VNodeMountHook[]; - onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[]; - onVnodeUpdated?: VNodeUpdateHook | VNodeUpdateHook[]; - onVnodeBeforeUnmount?: VNodeMountHook | VNodeMountHook[]; - onVnodeUnmounted?: VNodeMountHook | VNodeMountHook[]; -}; - -export declare type VNodeRef = string | Ref | ((ref: Element | ComponentPublicInstance | null, refs: Record<string, any>) => void); - -export declare type VNodeTypes = string | VNode | Component | typeof Text_2 | typeof Static | typeof Comment_2 | typeof Fragment | typeof TeleportImpl | typeof SuspenseImpl; - -declare type VNodeUpdateHook = (vnode: VNode, oldVNode: VNode) => void; - -export declare function warn(msg: string, ...args: any[]): void; - -declare function warnDeprecation(key: DeprecationTypes, instance: ComponentInternalInstance | null, ...args: any[]): void; - -export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle; - -export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle; - -export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle; - -export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle; - -export declare type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any; - -export declare type WatchEffect = (onCleanup: OnCleanup) => void; - -export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchStopHandle; - -declare type WatchOptionItem = string | WatchCallback | ObjectWatchOptionItem; - -export declare interface WatchOptions<Immediate = boolean> extends WatchOptionsBase { - immediate?: Immediate; - deep?: boolean; +export interface FunctionalComponent<P = {}, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any, EE extends EmitsOptions = ShortEmitsToObject<E>> extends ComponentInternalOptions { + (props: P & EmitsToProps<EE>, ctx: Omit<SetupContext<EE, IfAny<S, {}, SlotsType<S>>>, 'expose'>): any; + props?: ComponentPropsOptions<P>; + emits?: EE | (keyof EE)[]; + slots?: IfAny<S, Slots, SlotsType<S>>; + inheritAttrs?: boolean; + displayName?: string; + compatConfig?: CompatConfig; } +interface ClassComponent { + new (...args: any[]): ComponentPublicInstance<any, any, any, any, any>; + __vccOpts: ComponentOptions; +} +/** + * Concrete component type matches its actual value: it's either an options + * object, or a function. Use this where the code expects to work with actual + * values, e.g. checking if its a function or not. This is mostly for internal + * implementation code. + */ +export type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ComponentOptions<Props, RawBindings, D, C, M> | FunctionalComponent<Props, E, S>; +/** + * A type used in public APIs where a component type is expected. + * The constructor type is an artificial type returned by defineComponent(). + */ +export type Component<Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ConcreteComponent<Props, RawBindings, D, C, M, E, S> | ComponentPublicInstanceConstructor<Props>; -export declare interface WatchOptionsBase extends DebuggerOptions { +export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? { + attrs: Data; + slots: UnwrapSlotsType<S>; + emit: EmitFn<E>; + expose: (exposed?: Record<string, any>) => void; +} : never; +/** + * We expose a subset of properties on the internal instance as they are + * useful for advanced external libraries and tools. + */ +export interface ComponentInternalInstance { + uid: number; + type: ConcreteComponent; + parent: ComponentInternalInstance | null; + root: ComponentInternalInstance; + appContext: AppContext; + /** + * Vnode representing this component in its parent's vdom tree + */ + vnode: VNode; + /** + * Root vnode of this component's own vdom tree + */ + subTree: VNode; + /** + * Render effect instance + */ + effect: ReactiveEffect; + /** + * Bound effect runner to be passed to schedulers + */ + update: SchedulerJob; + proxy: ComponentPublicInstance | null; + exposed: Record<string, any> | null; + exposeProxy: Record<string, any> | null; + data: Data; + props: Data; + attrs: Data; + slots: InternalSlots; + refs: Data; + emit: EmitFn; + attrsProxy: Data | null; + slotsProxy: Slots | null; + isMounted: boolean; + isUnmounted: boolean; + isDeactivated: boolean; +} +export declare const getCurrentInstance: () => ComponentInternalInstance | null; +/** + * For runtime-dom to register the compiler. + * Note the exported method uses any to avoid d.ts relying on the compiler types. + */ +export declare function registerRuntimeCompiler(_compile: any): void; +export declare const isRuntimeOnly: () => boolean; + +export type WatchEffect = (onCleanup: OnCleanup) => void; +export type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T); +export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any; +type MapSources<T, Immediate> = { + [K in keyof T]: T[K] extends WatchSource<infer V> ? Immediate extends true ? V | undefined : V : T[K] extends object ? Immediate extends true ? T[K] | undefined : T[K] : never; +}; +type OnCleanup = (cleanupFn: () => void) => void; +export interface WatchOptionsBase extends DebuggerOptions { flush?: 'pre' | 'post' | 'sync'; } - +export interface WatchOptions<Immediate = boolean> extends WatchOptionsBase { + immediate?: Immediate; + deep?: boolean; + once?: boolean; +} +export type WatchStopHandle = () => void; +export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchStopHandle; export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle; - -export declare type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T); - -export declare type WatchStopHandle = () => void; - export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchStopHandle; +type MultiWatchSources = (WatchSource<unknown> | object)[]; +export declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle; +export declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(sources: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle; +export declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle; +export declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T, cb: WatchCallback<T, Immediate extends true ? T | undefined : T>, options?: WatchOptions<Immediate>): WatchStopHandle; -/* Excluded from this release type: withAsyncContext */ +type AsyncComponentResolveResult<T = Component> = T | { + default: T; +}; +export type AsyncComponentLoader<T = any> = () => Promise<AsyncComponentResolveResult<T>>; +export interface AsyncComponentOptions<T = any> { + loader: AsyncComponentLoader<T>; + loadingComponent?: Component; + errorComponent?: Component; + delay?: number; + timeout?: number; + suspensible?: boolean; + onError?: (error: Error, retry: () => void, fail: () => void, attempts: number) => any; +} +/*! #__NO_SIDE_EFFECTS__ */ +export declare function defineAsyncComponent<T extends Component = { + new (): ComponentPublicInstance; +}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T; /** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper + * Vue `<script setup>` compiler macro for declaring component props. The + * expected argument is the same as the component `props` option. + * + * Example runtime declaration: + * ```js + * // using Array syntax + * const props = defineProps(['foo', 'bar']) + * // using Object syntax + * const props = defineProps({ + * foo: String, + * bar: { + * type: Number, + * required: true + * } + * }) + * ``` + * + * Equivalent type-based declaration: + * ```ts + * // will be compiled into equivalent runtime declarations + * const props = defineProps<{ + * foo?: string + * bar: number + * }>() + * ``` + * + * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits} + * + * This is only usable inside `<script setup>`, is compiled away in the + * output and should **not** be actually called at runtime. */ -export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | null, isNonScopedSlot?: boolean): Function; - +export declare function defineProps<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{ + [key in PropNames]?: any; +}>>; +export declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>; +export declare function defineProps<TypeProps>(): DefineProps<LooseRequired<TypeProps>, BooleanKey<TypeProps>>; +export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { + readonly [K in BKeys]-?: boolean; +}; +type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends [boolean | undefined] ? K : never : never; +/** + * Vue `<script setup>` compiler macro for declaring a component's emitted + * events. The expected argument is the same as the component `emits` option. + * + * Example runtime declaration: + * ```js + * const emit = defineEmits(['change', 'update']) + * ``` + * + * Example type-based declaration: + * ```ts + * const emit = defineEmits<{ + * // <eventName>: <expected arguments> + * change: [] + * update: [value: string] // named tuple syntax + * }>() + * + * emit('change') + * emit('update', 1) + * ``` + * + * This is only usable inside `<script setup>`, is compiled away in the + * output and should **not** be actually called at runtime. + * + * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits} + */ +export declare function defineEmits<EE extends string = string>(emitOptions: EE[]): EmitFn<EE[]>; +export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emitOptions: E): EmitFn<E>; +export declare function defineEmits<T extends ((...args: any[]) => any) | Record<string, any[]>>(): T extends (...args: any[]) => any ? T : ShortEmits<T>; +type RecordToUnion<T extends Record<string, any>> = T[keyof T]; +type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ + [K in keyof T]: (evt: K, ...args: T[K]) => void; +}>>; +/** + * Vue `<script setup>` compiler macro for declaring a component's exposed + * instance properties when it is accessed by a parent component via template + * refs. + * + * `<script setup>` components are closed by default - i.e. variables inside + * the `<script setup>` scope is not exposed to parent unless explicitly exposed + * via `defineExpose`. + * + * This is only usable inside `<script setup>`, is compiled away in the + * output and should **not** be actually called at runtime. + * + * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineexpose} + */ +export declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void; +/** + * Vue `<script setup>` compiler macro for declaring a component's additional + * options. This should be used only for options that cannot be expressed via + * Composition API - e.g. `inheritAttrs`. + * + * @see {@link https://vuejs.org/api/sfc-script-setup.html#defineoptions} + */ +export declare function defineOptions<RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin>(options?: ComponentOptionsWithoutProps<{}, RawBindings, D, C, M, Mixin, Extends> & { + emits?: undefined; + expose?: undefined; + slots?: undefined; +}): void; +export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>; +export type ModelRef<T, M extends string | number | symbol = string> = Ref<T> & [ + ModelRef<T, M>, + Record<M, true | undefined> +]; +type DefineModelOptions<T = any> = { + get?: (v: T) => any; + set?: (v: T) => any; +}; +/** + * Vue `<script setup>` compiler macro for declaring a + * two-way binding prop that can be consumed via `v-model` from the parent + * component. This will declare a prop with the same name and a corresponding + * `update:propName` event. + * + * If the first argument is a string, it will be used as the prop name; + * Otherwise the prop name will default to "modelValue". In both cases, you + * can also pass an additional object which will be used as the prop's options. + * + * The the returned ref behaves differently depending on whether the parent + * provided the corresponding v-model props or not: + * - If yes, the returned ref's value will always be in sync with the parent + * prop. + * - If not, the returned ref will behave like a normal local ref. + * + * @example + * ```ts + * // default model (consumed via `v-model`) + * const modelValue = defineModel<string>() + * modelValue.value = "hello" + * + * // default model with options + * const modelValue = defineModel<string>({ required: true }) + * + * // with specified name (consumed via `v-model:count`) + * const count = defineModel<number>('count') + * count.value++ + * + * // with specified name and default value + * const count = defineModel<number>('count', { default: 0 }) + * ``` + */ +export declare function defineModel<T, M extends string | number | symbol = string>(options: { + required: true; +} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>; +export declare function defineModel<T, M extends string | number | symbol = string>(options: { + default: any; +} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>; +export declare function defineModel<T, M extends string | number | symbol = string>(options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>; +export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options: { + required: true; +} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>; +export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options: { + default: any; +} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>; +export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>; +type NotUndefined<T> = T extends undefined ? never : T; +type InferDefaults<T> = { + [K in keyof T]?: InferDefault<T, T[K]>; +}; +type NativeType = null | number | string | boolean | symbol | Function; +type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never); +type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = Readonly<Omit<T, keyof Defaults>> & { + readonly [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? T[K] : NotUndefined<T[K]> : never; +} & { + readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean; +}; /** * Vue `<script setup>` compiler macro for providing props default values when * using type-based `defineProps` declaration. @@ -1958,55 +1360,303 @@ export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | * * This is only usable inside `<script setup>`, is compiled away in the output * and should **not** be actually called at runtime. + * + * @see {@link https://vuejs.org/guide/typescript/composition-api.html#typing-component-props} */ -export declare function withDefaults<Props, Defaults extends InferDefaults<Props>>(props: Props, defaults: Defaults): PropsWithDefaults<Props, Defaults>; +export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>; +export declare function useSlots(): SetupContext['slots']; +export declare function useAttrs(): SetupContext['attrs']; + +export declare function useModel<M extends string | number | symbol, T extends Record<string, any>, K extends keyof T>(props: T, name: K, options?: DefineModelOptions<T[K]>): ModelRef<T[K], M>; + +type RawProps = VNodeProps & { + __v_isVNode?: never; + [Symbol.iterator]?: never; +} & Record<string, any>; +type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any); +interface Constructor<P = any> { + __isFragment?: never; + __isTeleport?: never; + __isSuspense?: never; + new (...args: any[]): { + $props: P; + }; +} +type HTMLElementEventHandler = { + [K in keyof HTMLElementEventMap as `on${Capitalize<K>}`]?: (ev: HTMLElementEventMap[K]) => any; +}; +export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, children?: RawChildren): VNode; +export declare function h<K extends keyof HTMLElementTagNameMap>(type: K, props?: (RawProps & HTMLElementEventHandler) | null, children?: RawChildren | RawSlots): VNode; +export declare function h(type: string, children?: RawChildren): VNode; +export declare function h(type: string, props?: RawProps | null, children?: RawChildren | RawSlots): VNode; +export declare function h(type: typeof Text | typeof Comment, children?: string | number | boolean): VNode; +export declare function h(type: typeof Text | typeof Comment, props?: null, children?: string | number | boolean): VNode; +export declare function h(type: typeof Fragment, children?: VNodeArrayChildren): VNode; +export declare function h(type: typeof Fragment, props?: RawProps | null, children?: VNodeArrayChildren): VNode; +export declare function h(type: typeof Teleport, props: RawProps & TeleportProps, children: RawChildren | RawSlots): VNode; +export declare function h(type: typeof Suspense, children?: RawChildren): VNode; +export declare function h(type: typeof Suspense, props?: (RawProps & SuspenseProps) | null, children?: RawChildren | RawSlots): VNode; +export declare function h<P, E extends EmitsOptions = {}, S extends Record<string, any> = any>(type: FunctionalComponent<P, any, S, any>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | IfAny<S, RawSlots, S>): VNode; +export declare function h(type: Component, children?: RawChildren): VNode; +export declare function h<P>(type: ConcreteComponent | string, children?: RawChildren): VNode; +export declare function h<P>(type: ConcreteComponent<P> | string, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren): VNode; +export declare function h<P>(type: Component<P>, props?: (RawProps & P) | null, children?: RawChildren | RawSlots): VNode; +export declare function h<P>(type: ComponentOptions<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; +export declare function h(type: Constructor, children?: RawChildren): VNode; +export declare function h<P>(type: Constructor<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; +export declare function h(type: DefineComponent, children?: RawChildren): VNode; +export declare function h<P>(type: DefineComponent<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; +export declare function h(type: string | Component, children?: RawChildren): VNode; +export declare function h<P>(type: string | Component<P>, props?: (RawProps & P) | ({} extends P ? null : never), children?: RawChildren | RawSlots): VNode; + +export declare const ssrContextKey: unique symbol; +export declare const useSSRContext: <T = Record<string, any>>() => T | undefined; + +declare function warn$1(msg: string, ...args: any[]): void; + +export declare enum ErrorCodes { + SETUP_FUNCTION = 0, + RENDER_FUNCTION = 1, + WATCH_GETTER = 2, + WATCH_CALLBACK = 3, + WATCH_CLEANUP = 4, + NATIVE_EVENT_HANDLER = 5, + COMPONENT_EVENT_HANDLER = 6, + VNODE_HOOK = 7, + DIRECTIVE_HOOK = 8, + TRANSITION_HOOK = 9, + APP_ERROR_HANDLER = 10, + APP_WARN_HANDLER = 11, + FUNCTION_REF = 12, + ASYNC_COMPONENT_LOADER = 13, + SCHEDULER = 14 +} +type ErrorTypes = LifecycleHooks | ErrorCodes; +export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any; +export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any[]; +export declare function handleError(err: unknown, instance: ComponentInternalInstance | null, type: ErrorTypes, throwInDev?: boolean): void; + +export declare function initCustomFormatter(): void; + +interface AppRecord { + id: number; + app: App; + version: string; + types: Record<string, string | Symbol>; +} +interface DevtoolsHook { + enabled?: boolean; + emit: (event: string, ...payload: any[]) => void; + on: (event: string, handler: Function) => void; + once: (event: string, handler: Function) => void; + off: (event: string, handler: Function) => void; + appRecords: AppRecord[]; + /** + * Added at https://github.com/vuejs/devtools/commit/f2ad51eea789006ab66942e5a27c0f0986a257f9 + * Returns whether the arg was buffered or not + */ + cleanupBuffer?: (matchArg: unknown) => boolean; +} +declare function setDevtoolsHook$1(hook: DevtoolsHook, target: any): void; + +type HMRComponent = ComponentOptions | ClassComponent; +export interface HMRRuntime { + createRecord: typeof createRecord; + rerender: typeof rerender; + reload: typeof reload; +} +declare function createRecord(id: string, initialDef: HMRComponent): boolean; +declare function rerender(id: string, newRender?: Function): void; +declare function reload(id: string, newComp: HMRComponent): void; /** - * Adds directives to a VNode. + * Set scope id when creating hoisted vnodes. + * @private compiler helper */ -export declare function withDirectives<T extends VNode>(vnode: T, directives: DirectiveArguments): T; - -export declare function withMemo(memo: any[], render: () => VNode<any, any>, cache: any[], index: number): VNode<any, any, { - [key: string]: any; -}>; - +export declare function pushScopeId(id: string | null): void; +/** + * Technically we no longer need this after 3.0.8 but we need to keep the same + * API for backwards compat w/ code generated by compilers. + * @private + */ +export declare function popScopeId(): void; /** * Only for backwards compat * @private */ export declare const withScopeId: (_id: string) => typeof withCtx; +/** + * Wrap a slot function to memoize current rendering instance + * @private compiler helper + */ +export declare function withCtx(fn: Function, ctx?: ComponentInternalInstance | null, isNonScopedSlot?: boolean): Function; -export { WritableComputedOptions } +/** + * v-for string + * @private + */ +export declare function renderList(source: string, renderItem: (value: string, index: number) => VNodeChild): VNodeChild[]; +/** + * v-for number + */ +export declare function renderList(source: number, renderItem: (value: number, index: number) => VNodeChild): VNodeChild[]; +/** + * v-for array + */ +export declare function renderList<T>(source: T[], renderItem: (value: T, index: number) => VNodeChild): VNodeChild[]; +/** + * v-for iterable + */ +export declare function renderList<T>(source: Iterable<T>, renderItem: (value: T, index: number) => VNodeChild): VNodeChild[]; +/** + * v-for object + */ +export declare function renderList<T>(source: T, renderItem: <K extends keyof T>(value: T[K], key: K, index: number) => VNodeChild): VNodeChild[]; -export { WritableComputedRef } +/** + * For prefixing keys in v-on="obj" with "on" + * @private + */ +export declare function toHandlers(obj: Record<string, any>, preserveCaseIfNecessary?: boolean): Record<string, any>; -export { } +/** + * Compiler runtime helper for rendering `<slot/>` + * @private + */ +export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean): VNode; -// Note: this file is auto concatenated to the end of the bundled d.ts during -// build. +type SSRSlot = (...args: any[]) => VNode[] | undefined; +interface CompiledSlotDescriptor { + name: string; + fn: SSRSlot; + key?: string; +} +/** + * Compiler runtime helper for creating dynamic slots object + * @private + */ +export declare function createSlots(slots: Record<string, SSRSlot>, dynamicSlots: (CompiledSlotDescriptor | CompiledSlotDescriptor[] | undefined)[]): Record<string, SSRSlot>; -declare module '@vue/reactivity' { - export interface RefUnwrapBailTypes { - runtimeCoreBailTypes: - | VNode - | { - // directly bailing on ComponentPublicInstance results in recursion - // so we use this as a bail hint - $: ComponentInternalInstance - } - } +export declare function withMemo(memo: any[], render: () => VNode<any, any>, cache: any[], index: number): VNode<any, any, { + [key: string]: any; +}>; +export declare function isMemoSame(cached: VNode, memo: any[]): boolean; + +export type LegacyConfig = { + /** + * @deprecated `config.silent` option has been removed + */ + silent?: boolean; + /** + * @deprecated use __VUE_PROD_DEVTOOLS__ compile-time feature flag instead + * https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags + */ + devtools?: boolean; + /** + * @deprecated use `config.isCustomElement` instead + * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement + */ + ignoredElements?: (string | RegExp)[]; + /** + * @deprecated + * https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html + */ + keyCodes?: Record<string, number | number[]>; + /** + * @deprecated + * https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed + */ + productionTip?: boolean; +}; + +type LegacyPublicInstance = ComponentPublicInstance & LegacyPublicProperties; +interface LegacyPublicProperties { + $set(target: object, key: string, value: any): void; + $delete(target: object, key: string): void; + $mount(el?: string | Element): this; + $destroy(): void; + $scopedSlots: Slots; + $on(event: string | string[], fn: Function): this; + $once(event: string, fn: Function): this; + $off(event?: string | string[], fn?: Function): this; + $children: LegacyPublicProperties[]; + $listeners: Record<string, Function | Function[]>; } +/** + * @deprecated the default `Vue` export has been removed in Vue 3. The type for + * the default export is provided only for migration purposes. Please use + * named imports instead - e.g. `import { createApp } from 'vue'`. + */ +export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & { + configureCompat: typeof configureCompat; + new (options?: ComponentOptions): LegacyPublicInstance; + version: string; + config: AppConfig & LegacyConfig; + nextTick: typeof nextTick; + use(plugin: Plugin, ...options: any[]): CompatVue; + mixin(mixin: ComponentOptions): CompatVue; + component(name: string): Component | undefined; + component(name: string, component: Component): CompatVue; + directive<T = any, V = any>(name: string): Directive<T, V> | undefined; + directive<T = any, V = any>(name: string, directive: Directive<T, V>): CompatVue; + compile(template: string): RenderFunction; + /** + * @deprecated Vue 3 no longer supports extending constructors. + */ + extend: (options?: ComponentOptions) => CompatVue; + /** + * @deprecated Vue 3 no longer needs set() for adding new properties. + */ + set(target: any, key: string | number | symbol, value: any): void; + /** + * @deprecated Vue 3 no longer needs delete() for property deletions. + */ + delete(target: any, key: string | number | symbol): void; + /** + * @deprecated use `reactive` instead. + */ + observable: typeof reactive; + /** + * @deprecated filters have been removed from Vue 3. + */ + filter(name: string, arg?: any): null; +}; + +export declare const version: string; + +export declare const warn: typeof warn$1; + +export declare const devtools: DevtoolsHook; +export declare const setDevtoolsHook: typeof setDevtoolsHook$1; + +declare module '@vue/reactivity' { + interface RefUnwrapBailTypes { + runtimeCoreBailTypes: VNode | { + $: ComponentInternalInstance; + }; + } +} + +export declare const DeprecationTypes: typeof DeprecationTypes$1; + +export { createBaseVNode as createElementVNode, }; // Note: this file is auto concatenated to the end of the bundled d.ts during // build. type _defineProps = typeof defineProps type _defineEmits = typeof defineEmits type _defineExpose = typeof defineExpose +type _defineOptions = typeof defineOptions +type _defineSlots = typeof defineSlots +type _defineModel = typeof defineModel type _withDefaults = typeof withDefaults declare global { const defineProps: _defineProps const defineEmits: _defineEmits const defineExpose: _defineExpose + const defineOptions: _defineOptions + const defineSlots: _defineSlots + const defineModel: _defineModel const withDefaults: _withDefaults } diff --git a/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js b/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js index 9211c342..d5a8f71b 100644 --- a/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +++ b/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js @@ -1,7850 +1,8160 @@ -import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, EffectScope, markRaw, proxyRefs, computed as computed$1, isReadonly } from '@vue/reactivity'; -export { EffectScope, ReactiveEffect, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity'; -import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, toNumber, hyphenate, camelize, isOn, hasOwn, isModelListener, hasChanged, remove, isObject, isSet, isMap, isPlainObject, invokeArrayFns, isBuiltInDirective, capitalize, isGloballyWhitelisted, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, NO, normalizeClass, normalizeStyle } from '@vue/shared'; +/** +* @vue/runtime-core v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { pauseTracking, resetTracking, isRef, toRaw, isShallow as isShallow$1, isReactive, ReactiveEffect, getCurrentScope, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, customRef, isReadonly } from '@vue/reactivity'; +export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity'; +import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue } from '@vue/shared'; export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared'; const stack = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack.push(vnode); } function popWarningContext() { - stack.pop(); + stack.pop(); } -function warn(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); +function warn$1(msg, ...args) { + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } -/* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } -/* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } -/* istanbul ignore next */ function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (!!!(process.env.NODE_ENV !== "production")) + return; + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } } -const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = (process.env.NODE_ENV !== 'production') ? ErrorTypeStrings[type] : type; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - if ((process.env.NODE_ENV !== 'production')) { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + if (!!(process.env.NODE_ENV !== "production")) { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } - else { - // recover in prod to reduce the impact on end-user - console.error(err); + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } else { + console.error(err); + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; -const pendingPreFlushCbs = []; -let activePreFlushCbs = null; -let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; -const resolvedPromise = /*#__PURE__*/ Promise.resolve(); +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; -let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } -// #2768 -// Use binary-search to find a suitable position in the queue, -// so that the queue maintains the increasing order of job's id, -// which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } -} -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} -function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } -function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); -} -function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - if ((process.env.NODE_ENV !== 'production')) { - seen = seen || new Map(); - } - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - if ((process.env.NODE_ENV !== 'production') && - checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) { - continue; - } - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + if (!!(process.env.NODE_ENV !== "production")) { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - if ((process.env.NODE_ENV !== 'production')) { - seen = seen || new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if ((process.env.NODE_ENV !== 'production') && - checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + if (!!(process.env.NODE_ENV !== "production")) { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; +const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; +}; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - if ((process.env.NODE_ENV !== 'production')) { - seen = seen || new Map(); - } - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = (process.env.NODE_ENV !== 'production') - ? (job) => checkRecursiveUpdates(seen, job) - : NOOP; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if ((process.env.NODE_ENV !== 'production') && check(job)) { - continue; - } - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } + isFlushPending = false; + isFlushing = true; + if (!!(process.env.NODE_ENV !== "production")) { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = !!(process.env.NODE_ENV !== "production") ? (job) => checkRecursiveUpdates(seen, job) : NOOP; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (!!(process.env.NODE_ENV !== "production") && check(job)) { + continue; } + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); } + } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } - else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`); - return true; - } - else { - seen.set(fn, count + 1); - } + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); } + } } -/* eslint-disable no-restricted-globals */ let isHmrUpdating = false; -const hmrDirtyComponents = new Set(); -// Expose the HMR runtime on the global object -// This makes it entirely tree-shakable without polluting the exports and makes -// it easier to be used in toolings like vue-loader -// Note: for a component to be eligible for HMR it also needs the __hmrId option -// to be set so that its instances can be registered / removed. -if ((process.env.NODE_ENV !== 'production')) { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; +const hmrDirtyComponents = /* @__PURE__ */ new Set(); +if (!!(process.env.NODE_ENV !== "production")) { + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; } -const map = new Map(); +const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); } function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); + map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: new Set() - }); - return true; + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; } function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; + return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; } - // update initial record (for not-yet-rendered component) - record.initialDef.render = newRender; - [...record.instances].forEach(instance => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - // this flag forces child components with slot content to update - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); } function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - // update initial def (for not-yet-rendered components) - updateComponentDef(record.initialDef, newComp); - // create a snapshot which avoids the set being mutated during updates - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - // 1. Update existing comp definition to match new one - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - // 2. mark definition dirty. This forces the renderer to replace the - // component on patch. - hmrDirtyComponents.add(oldComp); - } - // 3. invalidate options resolution cache - instance.appContext.optionsCache.delete(instance.type); - // 4. actually update - if (instance.ceReload) { - // custom element - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } - else if (instance.parent) { - // 4. Force the parent instance to re-render. This will cause all updated - // components to be unmounted and re-mounted. Queue the update so that we - // don't end up forcing the same parent to re-render multiple times. - queueJob(instance.parent.update); - // instance is the inner component of an async custom element - // invoke to reset styles - if (instance.parent.type.__asyncLoader && - instance.parent.ceReload) { - instance.parent.ceReload(newComp.styles); - } - } - else if (instance.appContext.reload) { - // root instance mounted via createApp() has a reload method - instance.appContext.reload(); - } - else if (typeof window !== 'undefined') { - // root instance inside tree created via raw render(). Force reload. - window.location.reload(); - } - else { - console.warn('[HMR] Root or manually mounted instance modified. Full reload required.'); - } + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); } - // 5. make sure to cleanup dirty hmr components after update - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); - } - }); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); } function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== '__file' && !(key in newComp)) { - delete oldComp[key]; - } + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; } + } } function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } - catch (e) { - console.error(e); - console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` + - `Full reload required.`); - } - }; + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; } -let devtools; +let devtools$1; let buffer = []; let devtoolsNotInstalled = false; -function emit(event, ...args) { - if (devtools) { - devtools.emit(event, ...args); - } - else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } } -function setDevtoolsHook(hook, target) { - var _a, _b; - devtools = hook; - if (devtools) { - devtools.enabled = true; - buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); - buffer = []; - } - else if ( +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( // handle late devtools injection - only do this if we are in an actual // browser environment to avoid the timer handle stalling test runner exit // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3000); - } - else { - // non-browser env, assume not installed + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; - } + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } } function devtoolsInitApp(app, version) { - emit("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); } function devtoolsUnmountApp(app) { - emit("app:unmount" /* APP_UNMOUNT */, app); + emit$1("app:unmount" /* APP_UNMOUNT */, app); } -const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = -/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const devtoolsComponentRemoved = -/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */); +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ +); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; function createDevtoolsComponentHook(hook) { - return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component); - }; + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; } -const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ +); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ +); function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); - }; + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params); + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); } -function emit$1(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - if ((process.env.NODE_ENV !== 'production')) { - const { emitsOptions, propsOptions: [propsOptions] } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && - !(false )) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn(`Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "${toHandlerKey(event)}" prop.`); - } - } - else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn(`Invalid event arguments: event validation failed for event "${event}".`); - } - } - } +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + if (!!(process.env.NODE_ENV !== "production")) { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); } - } - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(toNumber); + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } } + } } - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentEmit(instance, event, args); + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); } - if ((process.env.NODE_ENV !== 'production')) { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn(`Event "${lowerCaseEvent}" is emitted in component ` + - `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` + - `Note that HTML attributes are case-insensitive and you cannot use ` + - `v-on to listen to camelCase events when using in-DOM templates. ` + - `You should probably use "${hyphenate(event)}" instead of "${event}".`); - } + if (number) { + args = rawArgs.map(looseToNumber); } - let handlerName; - let handler = props[(handlerName = toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = toHandlerKey(camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = toHandlerKey(hyphenate(event)))]; + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentEmit(instance, event, args); + } + if (!!(process.env.NODE_ENV !== "production")) { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (__VUE_OPTIONS_API__ && !isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (__VUE_OPTIONS_API__ && !isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } -// Check if an incoming prop key is a declared emit event listener. -// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are -// both considered matched listeners. function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - hasOwn(options, hyphenate(key)) || - hasOwn(options, key)); + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } -/** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; -/** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } -/** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } -/** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } -/** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; -/** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only -) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentUpdated(ctx); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } -/** - * dev only flag to track whether $attrs was used during render. - * If $attrs was used during render then the warning for failed attrs - * fallthrough can be suppressed. - */ let accessedAttrs = false; function markAttrsAccessed() { - accessedAttrs = true; + accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - if ((process.env.NODE_ENV !== 'production')) { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + if (!!(process.env.NODE_ENV !== "production")) { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if ((process.env.NODE_ENV !== 'production') && attrs === props) { - markAttrsAccessed(); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (!!(process.env.NODE_ENV !== "production") && attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + props, + !!(process.env.NODE_ENV !== "production") ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (!!(process.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } - result = normalizeVNode(render.length > 1 - ? render(props, (process.env.NODE_ENV !== 'production') - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + } else { + extraAttrs.push(key); + } } - } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - let setRoot = undefined; - if ((process.env.NODE_ENV !== 'production') && - result.patchFlag > 0 && - result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - else if ((process.env.NODE_ENV !== 'production') && !accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - // ignore v-model handlers when they fail to fallthrough - if (!isModelListener(key)) { - // remove `on`, lowercase first letter to reflect event casing - // accurately - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } - else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn(`Extraneous non-props attributes (` + - `${extraAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes.`); - } - if (eventAttrs.length) { - warn(`Extraneous non-emits event listeners (` + - `${eventAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes. ` + - `If the listener is intended to be a component custom event listener only, ` + - `declare it using the "emits" option.`); - } - } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); } - } - // inherit directives - if (vnode.dirs) { - if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) { - warn(`Runtime directive used on component with non-element root node. ` + - `The directives will not function as intended.`); + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); } - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } } - // inherit transition data - if (vnode.transition) { - if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) { - warn(`Component inside <Transition> renders non-element root node ` + - `that cannot be animated.`); - } - root.transition = vnode.transition; + } + if (vnode.dirs) { + if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); } - if ((process.env.NODE_ENV !== 'production') && setRoot) { - setRoot(root); + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); } - else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + root.transition = vnode.transition; + } + if (!!(process.env.NODE_ENV !== "production") && setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } -/** - * dev only - * In dev mode, template root level comments are rendered, which turns the - * template into a fragment root, but we need to locate the single element - * root for attrs and scope id processing. - */ const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, undefined]; + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } - else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; + }; + return [normalizeVNode(childRoot), setRoot]; }; -function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; const isElementRoot = (vnode) => { - return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) || - vnode.type === Comment // potential v-if branch switch - ); + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // Parent component's render function was hot-updated. Since this may have - // caused the child component's slots content to have changed, we need to - // force the child to update as well. - if ((process.env.NODE_ENV !== 'production') && (prevChildren || nextChildren) && isHmrUpdating) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if (!!(process.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { - return true; + if (prevProps === nextProps) { + return false; } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (!prevProps) { + return !!nextProps; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!nextProps) { + return true; } - return false; + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } -function updateHOCHostEl({ vnode, parent }, el // HostNode -) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } const isSuspense = (type) => type.__isSuspense; -// Suspense exposes a component-like API, and is treated like a component -// in the compiler, but internally it's a special built-in type that hooks -// directly into the renderer. +let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren }; -// Force-casted public typing for h and TSX props inference -const Suspense = (SuspenseImpl ); +const Suspense = SuspenseImpl ; function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } } -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); } + } } + } } let hasWarned = false; -function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - /* istanbul ignore if */ - if ((process.env.NODE_ENV !== 'production') && !false && !hasWarned) { - hasWarned = true; - // @ts-ignore `console.info` cannot be null error - console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`); +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!!(process.env.NODE_ENV !== "production") && true && !hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; } - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - if ((process.env.NODE_ENV !== 'production')) { - if (!resume && !suspense.pendingBranch) { - throw new Error(`suspense.resolve() is called without a pending branch.`); - } - if (suspense.isUnmounted) { - throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`); - } - } - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - if ((process.env.NODE_ENV !== 'production')) { - pushWarningContext(vnode); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - if ((process.env.NODE_ENV !== 'production')) { - popWarningContext(); - } - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + if (!!(process.env.NODE_ENV !== "production")) { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + if (!!(process.env.NODE_ENV !== "production")) { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + if (!!(process.env.NODE_ENV !== "production")) { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + if (!!(process.env.NODE_ENV !== "production")) { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } } - return result; - /* eslint-enable no-restricted-globals */ + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if ((process.env.NODE_ENV !== 'production') && !singleChild) { - warn(`<Suspense> slots expect a single root node.`); - } - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); } - return s; + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } -function provide(key, value) { - if (!currentInstance) { - if ((process.env.NODE_ENV !== 'production')) { - warn(`provide() can only be used inside setup().`); - } +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + !!(process.env.NODE_ENV !== "production") && warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); } - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`injection "${String(key)}" not found.`); - } - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`inject() can only be used inside setup() or functional components.`); - } -} + return ctx; + } +}; -// Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, ((process.env.NODE_ENV !== 'production') - ? Object.assign(Object.assign({}, options), { flush: 'post' }) : { flush: 'post' })); + return doWatch( + effect, + null, + !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "post" }) : { flush: "post" } + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, ((process.env.NODE_ENV !== 'production') - ? Object.assign(Object.assign({}, options), { flush: 'sync' }) : { flush: 'sync' })); + return doWatch( + effect, + null, + !!(process.env.NODE_ENV !== "production") ? extend({}, options, { flush: "sync" }) : { flush: "sync" } + ); } -// initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; -// implementation function watch(source, cb, options) { - if ((process.env.NODE_ENV !== 'production') && !isFunction(cb)) { - warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` + - `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` + - `supports \`watch(source, cb, options?) signature.`); - } - return doWatch(source, cb, options); + if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); } -function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - if ((process.env.NODE_ENV !== 'production') && !cb) { - if (immediate !== undefined) { - warn(`watch() "immediate" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - if (deep !== undefined) { - warn(`watch() "deep" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - } - const warnInvalidSource = (s) => { - warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.`); +function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger +} = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow$1(source); + } + if (!!(process.env.NODE_ENV !== "production") && deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!!(process.env.NODE_ENV !== "production") && !cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isReactive(source)) { - getter = () => source; - deep = true; + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => isReactive(s) || isShallow$1(s)); - getter = () => source.map(s => { - if (isRef(s)) { - return s.value; - } - else if (isReactive(s)) { - return traverse(s); - } - else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else { - (process.env.NODE_ENV !== 'production') && warnInvalidSource(s); - } - }); + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = NOOP; - (process.env.NODE_ENV !== 'production') && warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; - }; - // in SSR there is no need to setup an actual effect, and it should be noop - // unless it's eager - if (isInSSRComponentSetup) { - // we will also not call the invalidate callback (+ runner is not set up) - onCleanup = NOOP; - if (!cb) { - getter(); - } - else if (immediate) { - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - getter(), - isMultiSource ? [] : undefined, - onCleanup - ]); - } - return NOOP; - } - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => hasChanged(v, oldValue[i])) - : hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new ReactiveEffect(getter, scheduler); - if ((process.env.NODE_ENV !== 'production')) { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - // initial run + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow$1(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow$1(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + !!(process.env.NODE_ENV !== "production") && warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect); - } + } else { + getter = NOOP; + !!(process.env.NODE_ENV !== "production") && warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let ssrCleanup; + if (isInSSRComponentSetup) { + onCleanup = NOOP; + if (!cb) { + getter(); + } else if (immediate) { + callWithAsyncErrorHandling(cb, instance, 3, [ + getter(), + isMultiSource ? [] : void 0, + onCleanup + ]); + } + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else { + return NOOP; + } + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + if (!!(process.env.NODE_ENV !== "production")) { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + if (ssrCleanup) + ssrCleanup.push(unwatch); + return unwatch; } -// this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } -function traverse(value, seen) { - if (!isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } +function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + !!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - if ((process.env.NODE_ENV !== 'production') && hasFound) { - // warn more than one non-comment child - warn('<transition> can only be used on a single element or component. ' + - 'Use <transition-group> for lists.'); - break; - } - child = c; - hasFound = true; - if (!(process.env.NODE_ENV !== 'production')) - break; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = toRaw(props); - const { mode } = rawProps; - // check mode - if ((process.env.NODE_ENV !== 'production') && - mode && - mode !== 'in-out' && - mode !== 'out-in' && - mode !== 'default') { - warn(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (!!(process.env.NODE_ENV !== "production") && hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + if (!!!(process.env.NODE_ENV !== "production")) + break; + } + } + } + const rawProps = toRaw(props); + const { mode } = rawProps; + if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } -// The transition hooks are attached to the vnode as vnode.transition -// and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; -} -// the placeholder really only handles one special case: KeepAlive -// in the case of a KeepAlive in a leave phase we need to return a KeepAlive -// placeholder with empty content to avoid the KeepAlive instance from being -// unmounted. -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey]) { + el[enterCbKey]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + !!(process.env.NODE_ENV !== "production") && vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } -// implementation, close to no-op -function defineComponent(options) { - return isFunction(options) ? { setup: options, name: options.name } : options; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!!(process.env.NODE_ENV !== "production") && !comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (!!(process.env.NODE_ENV !== "production") && comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if ((process.env.NODE_ENV !== 'production') && !comp) { - warn(`Async component loader resolved to undefined. ` + - `If you are using retry(), make sure to return its return value.`); - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - if ((process.env.NODE_ENV !== 'production') && comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (isInSSRComponentSetup)) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } -function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - // if the internal renderer is not registered, it indicates that this is server-side rendering, - // for KeepAlive, we just need to render its children - if (!sharedContext.renderer) { - return () => { - const children = slots.default && slots.default(); - return children && children.length === 1 ? children[0] : children; - }; - } - const cache = new Map(); - const keys = new Set(); - let current = null; - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - if ((process.env.NODE_ENV !== 'production')) { - warn(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; - } - else if ((process.env.NODE_ENV !== 'production')) { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')); - warn(`${apiName} is called when there is no active component instance to be ` + - `associated with. ` + - `Lifecycle injection APIs can only be used during execution of setup().` + - (` If you are using async setup(), make sure to register lifecycle ` + - `hooks before the first await statement.` - )); + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } else if (!!(process.env.NODE_ENV !== "production")) { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } } -const createHook = (lifecycle) => (hook, target = currentInstance) => -// post-create lifecycle registrations are noops during SSR (except for serverPrefetch) -(!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); -const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); -const onMounted = createHook("m" /* MOUNTED */); -const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); -const onUpdated = createHook("u" /* UPDATED */); -const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); -const onUnmounted = createHook("um" /* UNMOUNTED */); -const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); -const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); -const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); +const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) +); +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook("bu"); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook("bum"); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook("sp"); +const onRenderTriggered = createHook( + "rtg" +); +const onRenderTracked = createHook( + "rtc" +); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } -/** -Runtime helper for applying directives to a vnode. Example usage: - -const comp = resolveComponent('comp') -const foo = resolveDirective('foo') -const bar = resolveDirective('bar') - -return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] -]) -*/ -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn('Do not use built-in directive ids as custom directive id: ' + name); - } -} -/** - * Adds directives to a VNode. - */ -function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - (process.env.NODE_ENV !== 'production') && warn(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} - -const COMPONENTS = 'components'; -const DIRECTIVES = 'directives'; -/** - * @private - */ -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol(); -/** - * @private - */ -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } -} -/** - * @private - */ -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -// implementation -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === camelize(name) || - selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - if ((process.env.NODE_ENV !== 'production') && warnMissing && !res) { - const extra = type === COMPONENTS - ? `\nIf this is a native custom element, make sure to exclude it from ` + - `component resolution via compilerOptions.isCustomElement.` - : ``; - warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`resolve${capitalize(type.slice(0, -1))} ` + - `can only be used in render() or setup().`); - } -} -function resolve(registry, name) { - return (registry && - (registry[name] || - registry[camelize(name)] || - registry[capitalize(camelize(name))])); -} - -/** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - if ((process.env.NODE_ENV !== 'production') && !Number.isInteger(source)) { - warn(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); } - else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else { - ret = []; + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } -/** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } -/** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ -function renderSlot(slots, name, props = {}, -// this is not a user-facing function, so the fallback is always generated by -// the compiler and guaranteed to be a function returning an array -fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - if ((process.env.NODE_ENV !== 'production') && slot && slot.length > 1) { - warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` + - `function. You need to mark this component with $dynamic-slots in the ` + - `parent template.`); - slot = () => []; - } - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (!!(process.env.NODE_ENV !== "production") && slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } -/** - * For prefixing keys in v-on="obj" with "on" - * @private - */ -function toHandlers(obj) { - const ret = {}; - if ((process.env.NODE_ENV !== 'production') && !isObject(obj)) { - warn(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[toHandlerKey(key)] = obj[key]; - } +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!!(process.env.NODE_ENV !== "production") && !isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; } -/** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; -const publicPropertiesMap = -// Move PURE marker to new line to workaround compiler discarding it -// due to type annotation -/*#__PURE__*/ extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => ((process.env.NODE_ENV !== 'production') ? shallowReadonly(i.props) : i.props), - $attrs: i => ((process.env.NODE_ENV !== 'production') ? shallowReadonly(i.attrs) : i.attrs), - $slots: i => ((process.env.NODE_ENV !== 'production') ? shallowReadonly(i.slots) : i.slots), - $refs: i => ((process.env.NODE_ENV !== 'production') ? shallowReadonly(i.refs) : i.refs), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (__VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (__VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP) -}); -const isReservedPrefix = (key) => key === '_' || key === '$'; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.props) : i.props, + $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.attrs) : i.attrs, + $slots: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.slots) : i.slots, + $refs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly(i.refs) : i.refs, + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type, + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // for internal formatters to know that this is a Vue instance - if ((process.env.NODE_ENV !== 'production') && key === '__isVue') { - return true; - } - // prioritize <script setup> bindings during dev. - // this allows even properties that start with _ or $ to be used - so that - // it aligns with the production behavior where the render fn is inlined and - // indeed has access to all declared variables. - if ((process.env.NODE_ENV !== 'production') && - setupState !== EMPTY_OBJ && - setupState.__isScriptSetup && - hasOwn(setupState, key)) { - return setupState[key]; - } - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - track(instance, "get" /* GET */, key); - (process.env.NODE_ENV !== 'production') && markAttrsAccessed(); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else if ((process.env.NODE_ENV !== 'production') && - currentRenderingInstance && - (!isString(key) || - // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf('__v') !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` + - `character ("$" or "_") and is not proxied on the render context.`); - } - else if (instance === currentRenderingInstance) { - warn(`Property ${JSON.stringify(key)} was accessed during render ` + - `but is not defined on instance.`); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (hasOwn(instance.props, key)) { - (process.env.NODE_ENV !== 'production') && - warn(`Attempting to mutate prop "${key}". Props are readonly.`, instance); - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - (process.env.NODE_ENV !== 'production') && - warn(`Attempting to mutate public property "${key}". ` + - `Properties starting with $ are reserved and readonly.`, instance); - return false; - } - else { - if ((process.env.NODE_ENV !== 'production') && key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } - else { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== EMPTY_OBJ && hasOwn(data, key)) || - (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) || - hasOwn(ctx, key) || - hasOwn(publicPropertiesMap, key) || - hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") { + return true; } -}; -if ((process.env.NODE_ENV !== 'production') && !false) { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn(`Avoid app logic that relies on enumerating keys on a component instance. ` + - `The keys will be empty in production mode to avoid performance overhead.`); - return Reflect.ownKeys(target); - }; -} -const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, PublicInstanceProxyHandlers, { - get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; } - return PublicInstanceProxyHandlers.get(target, key, target); + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + !!(process.env.NODE_ENV !== "production") && markAttrsAccessed(); + } else if (!!(process.env.NODE_ENV !== "production") && key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (!!(process.env.NODE_ENV !== "production") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + !!(process.env.NODE_ENV !== "production") && warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + !!(process.env.NODE_ENV !== "production") && warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (!!(process.env.NODE_ENV !== "production") && key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +if (!!(process.env.NODE_ENV !== "production") && true) { + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; +} +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend( + {}, + PublicInstanceProxyHandlers, + { + get(target, key) { + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !isGloballyWhitelisted(key); - if ((process.env.NODE_ENV !== 'production') && !has && PublicInstanceProxyHandlers.has(_, key)) { - warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`); - } - return has; + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } -}); -// dev only -// In dev mode, the proxy target exposes the same properties as seen on `this` -// for easier console inspection. In prod mode it will be an empty object so -// these properties definitions can be skipped. + } +); function createDevRenderContext(instance) { - const target = {}; - // expose internal instance for proxy handlers - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP }); - // expose public properties - Object.keys(publicPropertiesMap).forEach(key => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; + }); + return target; } -// dev only function exposePropsOnRenderContext(instance) { - const { ctx, propsOptions: [propsOptions] } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach(key => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } -} -// dev only -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach(key => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` + - `which are reserved prefixes for Vue internals.`); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + if (!!(process.env.NODE_ENV !== "production")) { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!!(process.env.NODE_ENV !== "production") && !i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (isArray(a) && isArray(b)) + return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!!(process.env.NODE_ENV !== "production") && !ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; } function createDuplicateChecker() { - const cache = Object.create(null); - return (type, key) => { - if (cache[key]) { - warn(`${type} property "${key}" is already defined in ${cache[key]}.`); - } - else { - cache[key] = type; - } - }; + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; } let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = (process.env.NODE_ENV !== 'production') ? createDuplicateChecker() : null; - if ((process.env.NODE_ENV !== 'production')) { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = !!(process.env.NODE_ENV !== "production") ? createDuplicateChecker() : null; + if (!!(process.env.NODE_ENV !== "production")) { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } } - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + if (!!(process.env.NODE_ENV !== "production")) { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } else { + ctx[key] = methodHandler.bind(publicThis); + } + if (!!(process.env.NODE_ENV !== "production")) { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - if ((process.env.NODE_ENV !== 'production')) { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - else { - ctx[key] = methodHandler.bind(publicThis); - } - if ((process.env.NODE_ENV !== 'production')) { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` + - `Did you reference the function correctly?`); - } - } + } + if (dataOptions) { + if (!!(process.env.NODE_ENV !== "production") && !isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); } - if (dataOptions) { - if ((process.env.NODE_ENV !== 'production') && !isFunction(dataOptions)) { - warn(`The data option must be a function. ` + - `Plain object usage is no longer supported.`); - } - const data = dataOptions.call(publicThis, publicThis); - if ((process.env.NODE_ENV !== 'production') && isPromise(data)) { - warn(`data() returned a Promise - note data() cannot be async; If you ` + - `intend to perform data fetching before component renders, use ` + - `async setup() + <Suspense>.`); - } - if (!isObject(data)) { - (process.env.NODE_ENV !== 'production') && warn(`data() should return an object.`); - } - else { - instance.data = reactive(data); - if ((process.env.NODE_ENV !== 'production')) { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - // expose data on ctx during dev - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } + const data = dataOptions.call(publicThis, publicThis); + if (!!(process.env.NODE_ENV !== "production") && isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) - ? opt.bind(publicThis, publicThis) - : isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : NOOP; - if ((process.env.NODE_ENV !== 'production') && get === NOOP) { - warn(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) - ? opt.set.bind(publicThis) - : (process.env.NODE_ENV !== 'production') - ? () => { - warn(`Write operation failed: computed property "${key}" is readonly.`); - } - : NOOP; - const c = computed({ - get, - set - }); + if (!isObject(data)) { + !!(process.env.NODE_ENV !== "production") && warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + if (!!(process.env.NODE_ENV !== "production")) { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP }); - if ((process.env.NODE_ENV !== 'production')) { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } + } } + } } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (!!(process.env.NODE_ENV !== "production") && get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } : NOOP; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + if (!!(process.env.NODE_ENV !== "production")) { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } } - if (provideOptions) { - const provides = isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; } -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - if ((process.env.NODE_ENV !== 'production')) { - warn(`injected property "${key}" is a ref and will be auto-unwrapped ` + - `and no longer needs \`.value\` in the next minor release. ` + - `To opt-in to the new behavior now, ` + - `set \`app.config.unwrapInjectedRef = true\` (this config is ` + - `temporary and will not be needed in the future.)`); - } - ctx[key] = injected; - } - } - else { - ctx[key] = injected; - } - if ((process.env.NODE_ENV !== 'production')) { - checkDuplicateProperties("Inject" /* INJECT */, key); - } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; } + if (!!(process.env.NODE_ENV !== "production")) { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } } function callHook(hook, instance, type) { - callWithAsyncErrorHandling(isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - watch(getter, handler); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`Invalid watch handler specified by key "${raw}"`, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + watch(getter, handler); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } - else if (isFunction(raw)) { - watch(getter, raw.bind(publicThis)); - } - else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`Invalid watch option: "${key}"`, raw); + } else if (isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Invalid watch option: "${key}"`, raw); + } } -/** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + !!(process.env.NODE_ENV !== "production") && warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') { - (process.env.NODE_ENV !== 'production') && - warn(`"expose" option is ignored when declared in mixins or extends. ` + - `It should only be declared in the base component itself.`); - } - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend(extend(Object.create(null), to), from) : from; + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; } -function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison -isSSR = false) { - const props = {}; - const attrs = {}; - def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + !!(process.env.NODE_ENV !== "production") && warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); } - } - // validation - if ((process.env.NODE_ENV !== 'production')) { - validateProps(rawProps || {}, props, instance); - } - if (isStateful) { - // stateful - instance.props = isSSR ? props : shallowReactive(props); - } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + !!(process.env.NODE_ENV !== "production") && warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); } - else { - // functional w/ declared props - instance.props = props; + return app; + }, + mixin(mixin) { + if (__VUE_OPTIONS_API__) { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1("Mixins are only available in builds supporting Options API"); } + return app; + }, + component(name, component) { + if (!!(process.env.NODE_ENV !== "production")) { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (!!(process.env.NODE_ENV !== "production") && context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + if (!!(process.env.NODE_ENV !== "production")) { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (!!(process.env.NODE_ENV !== "production") && context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (!!(process.env.NODE_ENV !== "production") && rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + if (!!(process.env.NODE_ENV !== "production")) { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (!!(process.env.NODE_ENV !== "production") && key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { + if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`provide() can only be used inside setup().`); } - instance.attrs = attrs; + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`injection "${String(key)}" not found.`); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + if (!!(process.env.NODE_ENV !== "production")) { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !((process.env.NODE_ENV !== 'production') && - (instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId))) && - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + !(!!(process.env.NODE_ENV !== "production") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - trigger(instance, "set" /* SET */, '$attrs'); - } - if ((process.env.NODE_ENV !== 'production')) { - validateProps(rawProps || {}, props, instance); - } + } + if (hasAttrsChanged) { + trigger(instance, "set", "$attrs"); + } + if (!!(process.env.NODE_ENV !== "production")) { + validateProps(rawProps || {}, props, instance); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && hasOwn(options, (camelKey = camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (__VUE_OPTIONS_API__ && !isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (__VUE_OPTIONS_API__ && !isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, EMPTY_ARR); - return EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if ((process.env.NODE_ENV !== 'production') && !isString(raw[i])) { - warn(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); } - else if (raw) { - if ((process.env.NODE_ENV !== 'production') && !isObject(raw)) { - warn(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - isArray(opt) || isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } } - const res = [normalized, needCastKeys]; + } else if (raw) { + if (!!(process.env.NODE_ENV !== "production") && !isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; + if (key[0] !== "$") { + return true; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; } -// use function string name to check type constructors -// so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } -/** - * dev only - */ function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - for (const key in options) { - let opt = options[key]; - if (opt == null) - continue; - validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))); - } + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + !!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues, + !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)) + ); + } } -/** - * dev only - */ -function validateProp(name, value, prop, isAbsent) { - const { type, required, validator } = prop; - // required! - if (required && isAbsent) { - warn('Missing required prop: "' + name + '"'); - return; +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; } - // missing but optional - if (value == null && !prop.required) { - return; - } - // type check - if (type != null && type !== true) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - // value is valid as long as one of the specified types match - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ''); - isValid = valid; - } - if (!isValid) { - warn(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - // custom validator - if (validator && !validator(value)) { - warn('Invalid prop: custom validator check failed for prop "' + name + '".'); + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } } -const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt'); -/** - * dev only - */ +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; } - else if (expectedType === 'Object') { - valid = isObject(value); - } - else if (expectedType === 'Array') { - valid = isArray(value); - } - else if (expectedType === 'null') { - valid = value === null; - } - else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; } -/** - * dev only - */ function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid prop: type check failed for prop "${name}".` + - ` Expected ${expectedTypes.map(capitalize).join(' | ')}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; } -/** - * dev only - */ function styleValue(value, type) { - if (type === 'String') { - return `"${value}"`; - } - else if (type === 'Number') { - return `${Number(value)}`; - } - else { - return `${value}`; - } + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } } -/** - * dev only - */ function isExplicable(type) { - const explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(elem => type.toLowerCase() === elem); + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); } -/** - * dev only - */ function isBoolean(...args) { - return args.some(elem => elem.toLowerCase() === 'boolean'); + return args.some((elem) => elem.toLowerCase() === "boolean"); } -const isInternalKey = (key) => key[0] === '_' || key === '$stable'; -const normalizeSlotValue = (value) => isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); } - const normalized = withCtx((...args) => { - if ((process.env.NODE_ENV !== 'production') && currentInstance) { - warn(`Slot "${key}" invoked outside of the render function: ` + - `this will not track dependencies used in the slot. ` + - `Invoke the slot function inside the render function instead.`); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - if ((process.env.NODE_ENV !== 'production') && - !(false )) { - warn(`Non-function value encountered for slot "${key}". ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + if (!!(process.env.NODE_ENV !== "production") && true) { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - if ((process.env.NODE_ENV !== 'production') && - !isKeepAlive(instance.vnode) && - !(false )) { - warn(`Non-function value encountered for default slot. ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + if (!!(process.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = toRaw(children); - // make compiler marker non-enumerable - def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = toRaw(children); + def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - def(instance.slots, InternalObjectKey, 1); + } + def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) { - // Parent was HMR updated so slot content may have changed. - // force update slots and mark instance for hmr as well - extend(slots, children); - } - else if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { + extend(slots, children); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; -function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; -} -let uid = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = Object.assign({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - (process.env.NODE_ENV !== 'production') && warn(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - if ((process.env.NODE_ENV !== 'production')) { - warn(`app.config cannot be replaced. Modify individual options instead.`); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - (process.env.NODE_ENV !== 'production') && warn(`Plugin has already been applied to target app.`); - } - else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`A plugin must either be a function or an object with an "install" ` + - `function.`); - } - return app; - }, - mixin(mixin) { - if (__VUE_OPTIONS_API__) { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn('Mixin has already been applied to target app' + - (mixin.name ? `: ${mixin.name}` : '')); - } - } - else if ((process.env.NODE_ENV !== 'production')) { - warn('Mixins are only available in builds supporting Options API'); - } - return app; - }, - component(name, component) { - if ((process.env.NODE_ENV !== 'production')) { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if ((process.env.NODE_ENV !== 'production') && context.components[name]) { - warn(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - if ((process.env.NODE_ENV !== 'production')) { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if ((process.env.NODE_ENV !== 'production') && context.directives[name]) { - warn(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - // #5571 - if ((process.env.NODE_ENV !== 'production') && rootContainer.__vue_app__) { - warn(`There is already an app instance mounted on the host container.\n` + - ` If you want to mount another app on the same host container,` + - ` you need to unmount the previous app by calling \`app.unmount()\` first.`); - } - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - // HMR root reload - if ((process.env.NODE_ENV !== 'production')) { - context.reload = () => { - render(cloneVNode(vnode), rootContainer, isSVG); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`App has already been mounted.\n` + - `If you want to remount the same app, move your app creation logic ` + - `into a factory function and create fresh app instances for each ` + - `mount - e.g. \`const createMyApp = () => createApp(App)\``); - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if ((process.env.NODE_ENV !== 'production') && key in context.provides) { - warn(`App already provides property with key "${String(key)}". ` + - `It will be overwritten with the new value.`); - } - context.provides[key] = value; - return app; - } - }); - return app; - }; -} - -/** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!!(process.env.NODE_ENV !== "production") && !owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if ((process.env.NODE_ENV !== 'production') && !owner) { - warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + - `A vnode with ref must be created inside the render function.`); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } + } + } else if (_isString) { + refs[ref] = value; + if (hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } - else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } - else if (_isString) { - refs[ref] = value; - if (hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else if ((process.env.NODE_ENV !== 'production')) { - warn('Invalid template ref type:', ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } - else { - doSet(); - } - } - else if ((process.env.NODE_ENV !== 'production')) { - warn('Invalid template ref type:', ref, `(${typeof ref})`); - } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } + } } let hasMismatch = false; -const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; +}; const isComment = (node) => node.nodeType === 8 /* COMMENT */; -// Note: hydration is DOM-specific -// But we have to place it in core due to tight coupling with core - splitting -// it out creates a ton of unnecessary complexity. -// Hydration also depends on some renderer internal logic which needs to be -// passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - (process.env.NODE_ENV !== 'production') && - warn(`Attempting to hydrate existing markup but container is empty. ` + - `Performing full mount instead.`); - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - (process.env.NODE_ENV !== 'production') && - warn(`Hydration text mismatch:` + - `\n- Client: ${JSON.stringify(node.data)}` + - `\n- Server: ${JSON.stringify(vnode.children)}`); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn('Invalid HostVNode type:', type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - if ((process.env.NODE_ENV !== 'production') || forcePatchValue || patchFlag !== -1 /* HOISTED */) { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (isOn(key) && !isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if ((process.env.NODE_ENV !== 'production') && !hasWarned) { - warn(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - (process.env.NODE_ENV !== 'production') && - warn(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if ((process.env.NODE_ENV !== 'production') && !hasWarned) { - warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + if (!("__vnode" in node)) { + Object.defineProperty(node, "__vnode", { + value: vnode, + enumerable: false + }); + } + if (!("__vueParentComponent" in node)) { + Object.defineProperty(node, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + if (!!(process.env.NODE_ENV !== "production") || forcePatch || patchFlag !== -1) { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + hasMismatch = true; + if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + el.textContent = vnode.children; + } + } + if (props) { + if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) { + for (const key in props) { + if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode)) { + hasMismatch = true; + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } else if (props.onClick) { + patchProp( + el, + "onClick", + null, + props.onClick, + void 0, + void 0, + parentComponent + ); + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - (process.env.NODE_ENV !== 'production') && - warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - return node; - }; - return [hydrate, hydrateNode]; + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style"); + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = `attribute`; + mismatchKey = key; + } + } + if (mismatchType) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${mismatchType} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key == null ? void 0 : key.trim(); + value = value == null ? void 0 : value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; } -/* eslint-disable no-restricted-globals */ let supported; let perf; function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } } function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } } function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } + if (supported !== void 0) { return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; } -/** - * This is only called in esm-bundler builds. - * It is called when a renderer is created, in `baseCreateRenderer` so that - * importing runtime-core is side-effects free. - * - * istanbul-ignore-next - */ function initFeatureFlags() { - const needWarn = []; - if (typeof __VUE_OPTIONS_API__ !== 'boolean') { - (process.env.NODE_ENV !== 'production') && needWarn.push(`__VUE_OPTIONS_API__`); - getGlobalThis().__VUE_OPTIONS_API__ = true; - } - if (typeof __VUE_PROD_DEVTOOLS__ !== 'boolean') { - (process.env.NODE_ENV !== 'production') && needWarn.push(`__VUE_PROD_DEVTOOLS__`); - getGlobalThis().__VUE_PROD_DEVTOOLS__ = false; - } - if ((process.env.NODE_ENV !== 'production') && needWarn.length) { - const multi = needWarn.length > 1; - console.warn(`Feature flag${multi ? `s` : ``} ${needWarn.join(', ')} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, ` + - `which expects these compile-time feature flags to be globally injected ` + - `via the bundler config in order to get better tree-shaking in the ` + - `production bundle.\n\n` + - `For more details, see https://link.vuejs.org/feature-flags.`); - } + const needWarn = []; + if (typeof __VUE_OPTIONS_API__ !== "boolean") { + !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_OPTIONS_API__`); + getGlobalThis().__VUE_OPTIONS_API__ = true; + } + if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") { + !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_PROD_DEVTOOLS__`); + getGlobalThis().__VUE_PROD_DEVTOOLS__ = false; + } + if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") { + !!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`); + getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false; + } + if (!!(process.env.NODE_ENV !== "production") && needWarn.length) { + const multi = needWarn.length > 1; + console.warn( + `Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle. + +For more details, see https://link.vuejs.org/feature-flags.` + ); + } } -const queuePostRenderEffect = queueEffectWithSuspense - ; -/** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ +const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } -// Separate API for creating hydration-enabled renderer. -// Hydration logic is only used when calling this function, making it -// tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } -// implementation function baseCreateRenderer(options, createHydrationFns) { - // compile-time feature flags check + { + initFeatureFlags(); + } + const target = getGlobalThis(); + target.__VUE__ = true; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!(process.env.NODE_ENV !== "production") && isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else if (!!(process.env.NODE_ENV !== "production")) { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (!!(process.env.NODE_ENV !== "production") && subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + if (!!(process.env.NODE_ENV !== "production")) { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if (!!(process.env.NODE_ENV !== "production") && // #5523 dev root fragment may inherit directives + (isHmrUpdating || patchFlag & 2048)) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + if (!!(process.env.NODE_ENV !== "production")) { + traverseStaticChildren(n1, n2); + } else if ( + // #2080 if the stable fragment has a key, it's a <template v-for> that may + // get moved around. Make sure all root level vnodes inherit el. + // #2134 or if it's a component root, it may also get moved around + // as the component is being moved. + n2.key != null || parentComponent && n2 === parentComponent.subTree + ) { + traverseStaticChildren( + n1, + n2, + true + /* shallow */ + ); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) { + registerHMR(instance); + } + if (!!(process.env.NODE_ENV !== "production")) { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } { - initFeatureFlags(); + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `init`); + } + setupComponent(instance); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `init`); + } } - const target = getGlobalThis(); - target.__VUE__ = true; - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = (process.env.NODE_ENV !== 'production') && isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; + if (!!(process.env.NODE_ENV !== "production")) { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + if (!!(process.env.NODE_ENV !== "production")) { + pushWarningContext(n2); } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; + updateComponentPreRender(instance, n2, optimized); + if (!!(process.env.NODE_ENV !== "production")) { + popWarningContext(); } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else if ((process.env.NODE_ENV !== 'production')) { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); - } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); - } - } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); - } - else { - // there's no support for dynamic comments - n2.el = n1.el; - } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); - } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; - } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; - } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; - } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - if (!(process.env.NODE_ENV !== 'production') && - vnode.el && - hostCloneNode !== undefined && - patchFlag === -1 /* HOISTED */) { - // If a vnode has non-null el, it means it's being reused. - // Only static vnodes can be reused, so its mounted DOM nodes should be - // exactly the same, and we can simply do a clone here. - // only do this in production since cloned trees cannot be HMR updated. - el = vnode.el = hostCloneNode(vnode.el); + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); } - else { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); } - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - Object.defineProperty(el, '__vnode', { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, '__vueParentComponent', { - value: parentComponent, - enumerable: false - }); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if ((process.env.NODE_ENV !== 'production') && - subTree.patchFlag > 0 && - subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - subTree = - filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) { - // HMR updated, force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - if ((process.env.NODE_ENV !== 'production') && parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if ((process.env.NODE_ENV !== 'production') && - // #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) { - // HMR updated / Dev root fragment (w/ comments), force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if ((process.env.NODE_ENV !== 'production') && parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - if ((process.env.NODE_ENV !== 'production') && instance.type.__hmrId) { - registerHMR(instance); - } - if ((process.env.NODE_ENV !== 'production')) { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { - if ((process.env.NODE_ENV !== 'production')) { - startMeasure(instance, `init`); - } - setupComponent(instance); - if ((process.env.NODE_ENV !== 'production')) { - endMeasure(instance, `init`); - } - } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); - } - return; - } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); - if ((process.env.NODE_ENV !== 'production')) { - popWarningContext(); - endMeasure(instance, `mount`); - } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - // async & still pending - just update props and slots - // since the component's reactive effect for render isn't set-up yet - if ((process.env.NODE_ENV !== 'production')) { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - if ((process.env.NODE_ENV !== 'production')) { - popWarningContext(); - } - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } - } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; - } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - if ((process.env.NODE_ENV !== 'production')) { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - if ((process.env.NODE_ENV !== 'production')) { - endMeasure(instance, `render`); - } - if ((process.env.NODE_ENV !== 'production')) { - startMeasure(instance, `hydrate`); - } - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - if ((process.env.NODE_ENV !== 'production')) { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - if ((process.env.NODE_ENV !== 'production')) { - startMeasure(instance, `render`); - } - const subTree = (instance.subTree = renderComponentRoot(instance)); - if ((process.env.NODE_ENV !== 'production')) { - endMeasure(instance, `render`); - } - if ((process.env.NODE_ENV !== 'production')) { - startMeasure(instance, `patch`); - } - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - if ((process.env.NODE_ENV !== 'production')) { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentAdded(instance); - } - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - if ((process.env.NODE_ENV !== 'production')) { - pushWarningContext(next || instance.vnode); - } - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - // render - if ((process.env.NODE_ENV !== 'production')) { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - if ((process.env.NODE_ENV !== 'production')) { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - if ((process.env.NODE_ENV !== 'production')) { - startMeasure(instance, `patch`); - } - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - if ((process.env.NODE_ENV !== 'production')) { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentUpdated(instance); - } - if ((process.env.NODE_ENV !== 'production')) { - popWarningContext(); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates toggleRecurse(instance, true); - if ((process.env.NODE_ENV !== 'production')) { - effect.onTrack = instance.rtc - ? e => invokeArrayFns(instance.rtc, e) - : void 0; - effect.onTrigger = instance.rtg - ? e => invokeArrayFns(instance.rtg, e) - : void 0; - update.ownerInstance = instance; + if (el && hydrateNode) { + const hydrateSubTree = () => { + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot(instance); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `render`); + } + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `render`); + } + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } + if (m) { + queuePostRenderEffect(m, parentSuspense); } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + instance.isMounted = true; + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentAdded(instance); } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); - } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - if ((process.env.NODE_ENV !== 'production') && keyToNewIndexMap.has(nextChild.key)) { - warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); return; + } } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let originNext = next; let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); + if (!!(process.env.NODE_ENV !== "production")) { + pushWarningContext(next || instance.vnode); } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } + if (bu) { + invokeArrayFns(bu); } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } + toggleRecurse(instance, true); + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot(instance); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentUpdated(instance); + } + if (!!(process.env.NODE_ENV !== "production")) { + popWarningContext(); + } + } }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if ((process.env.NODE_ENV !== 'production') && - vnode.patchFlag > 0 && - vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ && - transition && - !transition.persisted) { - vnode.children.forEach(child => { - if (child.type === Comment) { - hostRemove(child.el); - } - else { - remove(child); - } - }); - } - else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } + const effect = instance.effect = new ReactiveEffect( + componentUpdateFn, + NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if ((process.env.NODE_ENV !== 'production') && instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } - } - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - devtoolsComponentRemoved(instance); - } - }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } - }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + update.id = instance.uid; + toggleRecurse(instance, true); + if (!!(process.env.NODE_ENV !== "production")) { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (!!(process.env.NODE_ENV !== "production") && keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (!!(process.env.NODE_ENV !== "production") && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } -/** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } - // also inherit for comment nodes, but not placeholders (e.g. v-if which - // would have received .el during block patch) - if ((process.env.NODE_ENV !== 'production') && c2.type === Comment && !c2.el) { - c2.el = c1.el; - } + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (!!(process.env.NODE_ENV !== "production") && c2.type === Comment && !c2.el) { + c2.el = c1.el; + } } + } } -// https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); -const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - (process.env.NODE_ENV !== 'production') && - warn(`Current renderer does not support string target for Teleports. ` + - `(missing querySelector renderer option)`); - return null; - } - else { - const target = select(targetSelector); - if (!target) { - (process.env.NODE_ENV !== 'production') && - warn(`Failed to locate Teleport target with selector "${targetSelector}". ` + - `Note the target element must exist before the component is mounted - ` + - `i.e. the target cannot be rendered by the component itself, and ` + - `ideally should be outside of the entire Vue component tree.`); - } - return target; - } + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + !!(process.env.NODE_ENV !== "production") && warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target) { + !!(process.env.NODE_ENV !== "production") && warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; } - else { - if ((process.env.NODE_ENV !== 'production') && !targetSelector && !isTeleportDisabled(props)) { - warn(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + } else { + if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); } + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - // #3302 - // HMR updated, force full diff - if ((process.env.NODE_ENV !== 'production') && isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = (process.env.NODE_ENV !== 'production') - ? createComment('teleport start') - : createText('')); - const mainAnchor = (n2.anchor = (process.env.NODE_ENV !== 'production') - ? createComment('teleport end') - : createText('')); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - else if ((process.env.NODE_ENV !== 'production') && !disabled) { - warn('Invalid Teleport target on mount:', target, `(${typeof target})`); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } - } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn('Invalid Teleport target on update:', target, `(${typeof target})`); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } - } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) { + optimized = false; + dynamicChildren = null; } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } + if (n1 == null) { + const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText(""); + const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText(""); + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } + } else if (!!(process.env.NODE_ENV !== "production") && !disabled) { + warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } -// Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; +function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} -const Fragment = Symbol((process.env.NODE_ENV !== 'production') ? 'Fragment' : undefined); -const Text = Symbol((process.env.NODE_ENV !== 'production') ? 'Text' : undefined); -const Comment = Symbol((process.env.NODE_ENV !== 'production') ? 'Comment' : undefined); -const Static = Symbol((process.env.NODE_ENV !== 'production') ? 'Static' : undefined); -// Since v-if and v-for are the two possible ways node structure can dynamically -// change, once we consider v-if branches and each v-for fragment a block, we -// can divide a template into nested blocks, and within each block the node -// structure would be stable. This allows us to skip most children diffing -// and only worry about the dynamic nodes (indicated by patch flags). +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; -/** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } -// Whether we should be tracking dynamic child nodes inside a block. -// Only tracks when this value is > 0 -// We are not using a simple boolean because this value may need to be -// incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; -/** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } -/** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } -/** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if ((process.env.NODE_ENV !== 'production') && - n2.shapeFlag & 6 /* COMPONENT */ && - hmrDirtyComponents.has(n2.type)) { - // HMR only: if the component has been hot-updated, force a reload. - return false; - } - return n1.type === n2.type && n1.key === n2.key; + if (!!(process.env.NODE_ENV !== "production") && n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; } let vnodeArgsTransformer; -/** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; + vnodeArgsTransformer = transformer; } const createVNodeWithArgsTransform = (...args) => { - return _createVNode(...(vnodeArgsTransformer - ? vnodeArgsTransformer(args, currentRenderingInstance) - : args)); + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); }; const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? isString(ref) || isRef(ref) || isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // validate key - if ((process.env.NODE_ENV !== 'production') && vnode.key !== vnode.key) { - warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } -const createVNode = ((process.env.NODE_ENV !== 'production') ? createVNodeWithArgsTransform : _createVNode); +const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if ((process.env.NODE_ENV !== 'production') && !type) { - warn(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!!(process.env.NODE_ENV !== "production") && !type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); } - // encode the vnode type information into a bitmap - const shapeFlag = isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - if ((process.env.NODE_ENV !== 'production') && shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) { - type = toRaw(type); - warn(`Vue received a Component which was made a reactive object. This can ` + - `lead to unnecessary performance overhead, and should be avoided by ` + - `marking the component with \`markRaw\` or using \`shallowRef\` ` + - `instead of \`ref\`.`, `\nComponent that was made reactive: `, type); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); } - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return isProxy(props) || InternalObjectKey in props - ? extend({}, props) - : props; + if (!props) + return null; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: (process.env.NODE_ENV !== 'production') && patchFlag === -1 /* HOISTED */ && isArray(children) - ? children.map(deepCloneVNode) - : children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: !!(process.env.NODE_ENV !== "production") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } -/** - * Dev only, for HMR of hoisted vnodes reused in v-for - * https://github.com/vitejs/vite/issues/2022 - */ function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; } -/** - * @private - */ -function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } -/** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } -/** - * @private - */ -function createCommentVNode(text = '', -// when used as the v-else branch, the comment node must be created as a -// block to ensure correct updates. -asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } -// optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } - else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); -let uid$1 = 0; +let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - if ((process.env.NODE_ENV !== 'production')) { - instance.ctx = createDevRenderContext(instance); - } - else { - instance.ctx = { _: instance }; - } - instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + if (!!(process.env.NODE_ENV !== "production")) { + instance.ctx = createDevRenderContext(instance); + } else { + instance.ctx = { _: instance }; + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) + setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) + setters.forEach((set) => set(v)); + else + setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; -const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component'); +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); function validateComponentName(name, config) { - const appIsNativeTag = config.isNativeTag || NO; - if (isBuiltInTag(name) || appIsNativeTag(name)) { - warn('Do not use built-in or reserved HTML elements as component id: ' + name); - } + const appIsNativeTag = config.isNativeTag || NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } } function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - if ((process.env.NODE_ENV !== 'production')) { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn(`"compilerOptions" is only supported when using a build of Vue that ` + - `includes the runtime compiler. Since you are using a runtime-only ` + - `build, the options should be passed via your build tool config instead.`); - } + var _a; + const Component = instance.type; + if (!!(process.env.NODE_ENV !== "production")) { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); } - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - if ((process.env.NODE_ENV !== 'production')) { - exposePropsOnRenderContext(instance); + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } } - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [(process.env.NODE_ENV !== 'production') ? shallowReadonly(instance.props) : instance.props, setupContext]); - resetTracking(); - unsetCurrentInstance(); - if (isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - if ((process.env.NODE_ENV !== 'production') && !instance.suspense) { - const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous'; - warn(`Component <${name}>: setup function returned a promise, but no ` + - `<Suspense> boundary was found in the parent component tree. ` + - `A component with async setup() must be nested in a <Suspense> ` + - `in order to be rendered.`); - } - } - } - else { - handleSetupResult(instance, setupResult, isSSR); + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + if (!!(process.env.NODE_ENV !== "production")) { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + !!(process.env.NODE_ENV !== "production") ? shallowReadonly(instance.props) : instance.props, + setupContext + ] + ); + resetTracking(); + reset(); + if (isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); } + } + } else { + handleSetupResult(instance, setupResult, isSSR); } - else { - finishComponentSetup(instance, isSSR); - } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - // setup returned an inline render function - if (instance.type.__ssrInlineRender) { - // when the function's name is `ssrRender` (compiled by SFC inline mode), - // set it as ssrRender instead. - instance.ssrRender = setupResult; - } - else { - instance.render = setupResult; - } + if (isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; } - else if (isObject(setupResult)) { - if ((process.env.NODE_ENV !== 'production') && isVNode(setupResult)) { - warn(`setup() should not return VNodes directly - ` + - `return a render function instead.`); - } - // setup returned bindings. - // assuming a render function compiled from template is present. - if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - if ((process.env.NODE_ENV !== 'production')) { - exposeSetupStateOnRenderContext(instance); - } + } else if (isObject(setupResult)) { + if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); } - else if ((process.env.NODE_ENV !== 'production') && setupResult !== undefined) { - warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`); + if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) { + instance.devtoolsRawSetupState = setupResult; } - finishComponentSetup(instance, isSSR); + instance.setupState = proxyRefs(setupResult); + if (!!(process.env.NODE_ENV !== "production")) { + exposeSetupStateOnRenderContext(instance); + } + } else if (!!(process.env.NODE_ENV !== "production") && setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); } let compile; let installWithProxy; -/** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; } -// dev only const isRuntimeOnly = () => !compile; function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - if ((process.env.NODE_ENV !== 'production')) { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend(extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - if ((process.env.NODE_ENV !== 'production')) { - endMeasure(instance, `compile`); - } - } + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + if (!!(process.env.NODE_ENV !== "production")) { + startMeasure(instance, `compile`); } - instance.render = (Component.render || NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + if (!!(process.env.NODE_ENV !== "production")) { + endMeasure(instance, `compile`); } + } } - // support for 2.x options - if (__VUE_OPTIONS_API__ && !(false )) { - setCurrentInstance(instance); - pauseTracking(); - applyOptions(instance); - resetTracking(); - unsetCurrentInstance(); + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); } - // warn missing template/render - // the runtime compilation of template in SSR is done by server-render - if ((process.env.NODE_ENV !== 'production') && !Component.render && instance.render === NOOP && !isSSR) { - /* istanbul ignore if */ - if (!compile && Component.template) { - warn(`Component provided template option but ` + - `runtime compilation is not supported in this build of Vue.` + - (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` - ) /* should not happen */); - } - else { - warn(`Component is missing template or render function.`); - } + } + if (__VUE_OPTIONS_API__ && true) { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); } + } + if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) { + if (!compile && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` ) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } } -function createAttrsProxy(instance) { - return new Proxy(instance.attrs, (process.env.NODE_ENV !== 'production') - ? { - get(target, key) { - markAttrsAccessed(); - track(instance, "get" /* GET */, '$attrs'); - return target[key]; - }, - set() { - warn(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn(`setupContext.attrs is readonly.`); - return false; - } - } - : { - get(target, key) { - track(instance, "get" /* GET */, '$attrs'); - return target[key]; - } - }); +function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + !!(process.env.NODE_ENV !== "production") ? { + get(target, key) { + markAttrsAccessed(); + track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } : { + get(target, key) { + track(instance, "get", "$attrs"); + return target[key]; + } + } + )); +} +function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + })); } function createSetupContext(instance) { - const expose = exposed => { - if ((process.env.NODE_ENV !== 'production') && instance.exposed) { - warn(`expose() should be called only once per setup().`); + const expose = (exposed) => { + if (!!(process.env.NODE_ENV !== "production")) { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } } - instance.exposed = exposed || {}; + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + if (!!(process.env.NODE_ENV !== "production")) { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } else { + return { + get attrs() { + return getAttrsProxy(instance); + }, + slots: instance.slots, + emit: instance.emit, + expose }; - let attrs; - if ((process.env.NODE_ENV !== 'production')) { - // We use getters in dev in case libs like test-utils overwrite instance - // properties (overwrites should not be done in prod) - return Object.freeze({ - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - get slots() { - return shallowReadonly(instance.slots); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); - } - else { - return { - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - slots: instance.slots, - emit: instance.emit, - expose - }; - } + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } } const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); -function getComponentName(Component) { - return isFunction(Component) - ? Component.displayName || Component.name - : Component.name; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } -/* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { - return isFunction(value) && '__vccOpts' in value; + return isFunction(value) && "__vccOpts" in value; } -const computed = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); -}); - -// dev only -const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` + - `<script setup> of a single file component. Its arguments should be ` + - `compiled away and passing it at runtime has no effect.`); -// implementation -function defineProps() { - if ((process.env.NODE_ENV !== 'production')) { - warnRuntimeUsage(`defineProps`); - } - return null; -} -// implementation -function defineEmits() { - if ((process.env.NODE_ENV !== 'production')) { - warnRuntimeUsage(`defineEmits`); - } - return null; -} -/** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -function defineExpose(exposed) { - if ((process.env.NODE_ENV !== 'production')) { - warnRuntimeUsage(`defineExpose`); - } -} -/** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ -function withDefaults(props, defaults) { - if ((process.env.NODE_ENV !== 'production')) { - warnRuntimeUsage(`withDefaults`); - } - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - if ((process.env.NODE_ENV !== 'production') && !i) { - warn(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -/** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ -function mergeDefaults(raw, defaults) { - const props = isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`props default key "${key}" has no corresponding declaration.`); - } - } - return props; -} -/** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -/** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if ((process.env.NODE_ENV !== 'production') && !ctx) { - warn(`withAsyncContext called without active current instance. ` + - `This is likely a bug.`); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -// Actual implementation -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -const ssrContextKey = Symbol((process.env.NODE_ENV !== 'production') ? `ssrContext` : ``); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn(`Server rendering context not provided. Make sure to only call ` + - `useSSRContext() conditionally in the server build.`); - } - return ctx; - } +const computed = (getterOrOptions, debugOptions) => { + return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); }; +function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!!(process.env.NODE_ENV !== "production") && !i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const camelizedName = camelize(name); + const hyphenatedName = hyphenate(name); + const res = customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) { + localValue = value; + trigger(); + } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } + }; + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; + } + } + }; + }; + return res; +} + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); + } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - if (!(process.env.NODE_ENV !== 'production') || typeof window === 'undefined') { - return; - } - const vueStyle = { style: 'color:#3ba776' }; - const numberStyle = { style: 'color:#0b1bc9' }; - const stringStyle = { style: 'color:#b62e24' }; - const keywordStyle = { style: 'color:#9d288c' }; - // custom formatter for Chrome - // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html - const formatter = { - header(obj) { - // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ['div', vueStyle, `VueInstance`]; - } - else if (isRef(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, genRefFlag(obj)], - '<', - formatValue(obj.value), - `>` - ]; - } - else if (isReactive(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'], - '<', - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } - else if (isReadonly(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'], - '<', - formatValue(obj), - '>' - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - 'div', - {}, - ...formatInstance(obj.$) - ]; - } - } - }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock('props', toRaw(instance.props))); - } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('setup', instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('data', toRaw(instance.data))); - } - const computed = extractKeys(instance, 'computed'); - if (computed) { - blocks.push(createInstanceBlock('computed', computed)); - } - const injected = extractKeys(instance, 'inject'); - if (injected) { - blocks.push(createInstanceBlock('injected', injected)); - } - blocks.push([ - 'div', - {}, - [ - 'span', - { - style: keywordStyle.style + ';opacity:0.66' - }, - '$ (internal): ' - ], - ['object', { object: instance }] - ]); - return blocks; - } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ['span', {}]; - } + if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { return [ - 'div', - { style: 'line-height:1.25em;margin-bottom:0.6em' }, - [ - 'div', - { - style: 'color:#476582' - }, - type - ], - [ - 'div', - { - style: 'padding-left:1.25em' - }, - ...Object.keys(target).map(key => { - return [ - 'div', - {}, - ['span', keywordStyle, key + ': '], - formatValue(target[key], false) - ]; - }) - ] + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + formatValue(obj.value), + `>` ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } } - function formatValue(v, asRaw = true) { - if (typeof v === 'number') { - return ['span', numberStyle, v]; - } - else if (typeof v === 'string') { - return ['span', stringStyle, JSON.stringify(v)]; - } - else if (typeof v === 'boolean') { - return ['span', keywordStyle, v]; - } - else if (isObject(v)) { - return ['object', { object: asRaw ? toRaw(v) : v }]; - } - else { - return ['span', stringStyle, String(v)]; - } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if ((isArray(opts) && opts.includes(key)) || - (isObject(opts) && key in opts)) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) { - return true; - } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); } - else { - window.devtoolsFormatters = [formatter]; + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } -// Core API ------------------------------------------------------------------ -const version = "3.2.36"; +const version = "3.4.15"; +const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0; +const setDevtoolsHook = !!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP; const _ssrUtils = { - createComponentInstance, - setupComponent, - renderComponentRoot, - setCurrentRenderingInstance, - isVNode, - normalizeVNode + createComponentInstance, + setupComponent, + renderComponentRoot, + setCurrentRenderingInstance, + isVNode: isVNode, + normalizeVNode }; -/** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ -const ssrUtils = (_ssrUtils ); -/** - * @internal only exposed in compat builds - */ +const ssrUtils = _ssrUtils ; const resolveFilter = null; -/** - * @internal only exposed in compat builds. - */ -const compatUtils = (null); +const compatUtils = null; +const DeprecationTypes = null; -export { BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; +export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, Static, Suspense, Teleport, Text, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeModels, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useModel, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; diff --git a/node_modules/@vue/runtime-core/package.json b/node_modules/@vue/runtime-core/package.json index dc597ebd..1f757423 100644 --- a/node_modules/@vue/runtime-core/package.json +++ b/node_modules/@vue/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.2.36", + "version": "3.4.15", "description": "@vue/runtime-core", "main": "index.js", "module": "dist/runtime-core.esm-bundler.js", @@ -9,6 +9,20 @@ "index.js", "dist" ], + "exports": { + ".": { + "types": "./dist/runtime-core.d.ts", + "node": { + "production": "./dist/runtime-core.cjs.prod.js", + "development": "./dist/runtime-core.cjs.js", + "default": "./index.js" + }, + "module": "./dist/runtime-core.esm-bundler.js", + "import": "./dist/runtime-core.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, "buildOptions": { "name": "VueRuntimeCore", "formats": [ @@ -32,7 +46,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme", "dependencies": { - "@vue/shared": "3.2.36", - "@vue/reactivity": "3.2.36" + "@vue/shared": "3.4.15", + "@vue/reactivity": "3.4.15" } -} +} \ No newline at end of file diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js index 951d5aca..be8d7bfe 100644 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js +++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js @@ -1,3 +1,8 @@ +/** +* @vue/runtime-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -5,1647 +10,1525 @@ Object.defineProperty(exports, '__esModule', { value: true }); var runtimeCore = require('@vue/runtime-core'); var shared = require('@vue/shared'); -const svgNS = 'http://www.w3.org/2000/svg'; -const doc = (typeof document !== 'undefined' ? document : null); -const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; -// compiler should normalize class + :class bindings on the same element -// into a single binding ['staticClass', dynamic] -function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } -} - -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = shared.isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !shared.isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } -} -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (shared.isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(shared.hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } -} -const prefixes = ['Webkit', 'Moz', 'ms']; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = runtimeCore.camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = shared.capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; -} - -const xlinkNS = 'http://www.w3.org/1999/xlink'; -function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = shared.isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !shared.includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } -} - -// __UNSAFE__ -// functions. The user is responsible for using them with only trusted content. -function patchDOMProp(el, key, value, -// the following args are passed only due to potential innerHTML/textContent -// overriding existing VNodes, in which case the old tree must be properly -// unmounted. -prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = shared.includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - { - runtimeCore.warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` + - `value ${value} is invalid.`, e); - } - } - needRemove && el.removeAttribute(key); -} - -// Async edge case fix requires storing an event listener's attach timestamp. -const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; -})(); -// To avoid the overhead of repeatedly calling performance.now(), we cache -// and use the same timestamp for all event listeners attached in the same tick. -let cachedNow = 0; -const p = /*#__PURE__*/ Promise.resolve(); -const reset = () => { - cachedNow = 0; -}; -const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [shared.hyphenate(name.slice(2)), options]; -} -function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - runtimeCore.callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function patchStopImmediatePropagation(e, value) { - if (shared.isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } -} - -const nativeOnRE = /^on[a-z]/; -const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (shared.isOn(key)) { - // ignore v-model listeners - if (!shared.isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && shared.isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && shared.isString(value)) { - return false; - } - return key in el; -} - -function defineCustomElement(options, hydrate) { - const Comp = runtimeCore.defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); -}); -const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { -}); -class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - if (this.shadowRoot) { - runtimeCore.warn(`Custom element has pre-rendered declarative shadow root but is not ` + - `defined as hydratable. Use \`defineSSRCustomElement\`.`); - } - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - runtimeCore.nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !shared.isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = shared.toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(shared.camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = shared.toNumber(value); - } - this._setProp(shared.camelize(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(shared.hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(shared.hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(shared.hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = runtimeCore.createVNode(this._def, shared.extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // HMR - { - instance.ceReload = newStyles => { - // always reset styles - if (this._styles) { - this._styles.forEach(s => this.shadowRoot.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - // if this is an async component, ceReload is called from the inner - // component so no need to reload the async wrapper - if (!this._def.__asyncLoader) { - // reload - this._instance = null; - this._update(); - } - }; - } - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - // record for HMR - { - (this._styles || (this._styles = [])).push(s); - } - }); - } - } -} - -function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - const instance = runtimeCore.getCurrentInstance(); - if (!instance) { - runtimeCore.warn(`useCssModule must be called inside setup()`); - return shared.EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - runtimeCore.warn(`Current instance does not have CSS modules injected.`); - return shared.EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - runtimeCore.warn(`Current instance does not have CSS module named "${name}".`); - return shared.EMPTY_OBJ; - } - return mod; - } -} - -/** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ -function useCssVars(getter) { - return; -} - -const TRANSITION = 'transition'; -const ANIMATION = 'animation'; -// DOM Transition is a higher-order-component based on the platform-agnostic -// base Transition component, with DOM-specific logic. +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots); -Transition.displayName = 'Transition'; +Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; -const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ shared.extend({}, runtimeCore.BaseTransition.props, DOMTransitionPropsValidators)); -/** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ +const TransitionPropsValidators = Transition.props = /* @__PURE__ */ shared.extend( + {}, + runtimeCore.BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); const callHook = (hook, args = []) => { - if (shared.isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } + if (shared.isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; -/** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? shared.isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return shared.extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return shared.extend(baseProps, { - onBeforeEnter(el) { - callHook(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (shared.isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (shared.isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = shared.toNumber(val); - validateDuration(res); - return res; -} -function validateDuration(val) { - if (typeof val !== 'number') { - runtimeCore.warn(`<transition> explicit duration is not a valid number - ` + - `got ${JSON.stringify(val)}.`); - } - else if (isNaN(val)) { - runtimeCore.warn(`<transition> explicit duration is NaN - ` + - 'the duration expression might be incorrect.'); - } + const res = shared.toNumber(val); + { + runtimeCore.assertNumber(res, "<transition> explicit duration"); + } + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } -// Old versions of Chromium (below 61.0.3163.100) formats floating pointer -// numbers in a locale-dependent way, using a comma instead of a dot. -// If comma is not replaced with a dot, the input will be rounded down -// (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } -// synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } -const positionMap = new WeakMap(); -const newPositionMap = new WeakMap(); -const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ shared.extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = runtimeCore.getCurrentInstance(); - const state = runtimeCore.useTransitionState(); - let prevChildren; - let children; - runtimeCore.onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = runtimeCore.toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || runtimeCore.Fragment; - prevChildren = children; - children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - runtimeCore.setTransitionHooks(child, runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - else { - runtimeCore.warn(`<TransitionGroup> children must be keyed.`); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - runtimeCore.setTransitionHooks(child, runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return runtimeCore.createVNode(tag, null, children); - }; +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOldKey = Symbol("_vod"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); +function useCssVars(getter) { + return; +} + +function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = shared.isString(next); + if (next && !isCssString) { + if (prev && !shared.isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (shared.isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + { + if (semicolonRE.test(val)) { + runtimeCore.warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + shared.hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = runtimeCore.camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = shared.capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = shared.isSpecialBooleanAttr(key); + if (value == null || isBoolean && !shared.includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } +} + +function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = shared.includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + runtimeCore.warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + runtimeCore.callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function patchStopImmediatePropagation(e, value) { + if (shared.isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (shared.isOn(key)) { + if (!shared.isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && shared.isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && shared.isString(value)) { + return false; + } + return key in el; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, hydrate2) { + const Comp = runtimeCore.defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + if (this.shadowRoot) { + runtimeCore.warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + runtimeCore.nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !shared.isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = shared.toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(shared.camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = shared.camelize(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = shared.toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(shared.hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(shared.hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(shared.hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = runtimeCore.createVNode(this._def, shared.extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (shared.hyphenate(event) !== event) { + dispatch(shared.hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + { + (this._styles || (this._styles = [])).push(s); + } + }); + } + } +} + +function useCssModule(name = "$style") { + { + const instance = runtimeCore.getCurrentInstance(); + if (!instance) { + runtimeCore.warn(`useCssModule must be called inside setup()`); + return shared.EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + runtimeCore.warn(`Current instance does not have CSS modules injected.`); + return shared.EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + runtimeCore.warn(`Current instance does not have CSS module named "${name}".`); + return shared.EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = runtimeCore.getCurrentInstance(); + const state = runtimeCore.useTransitionState(); + let prevChildren; + let children; + runtimeCore.onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = runtimeCore.toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || runtimeCore.Fragment; + prevChildren = children; + children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + runtimeCore.setTransitionHooks( + child, + runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else { + runtimeCore.warn(`<TransitionGroup> children must be keyed.`); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + runtimeCore.setTransitionHooks( + child, + runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return runtimeCore.createVNode(tag, null, children); + }; + } +}; +const removeMode = (props) => delete props.mode; +/* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return shared.isArray(fn) ? value => shared.invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } -// We are exporting the v-model runtime directly as vnode hooks so that it can -// be tree-shaken in case v-model is never used. +const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = shared.toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && shared.toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = shared.looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? shared.looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (shared.isArray(modelValue)) { - const index = shared.looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (shared.isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (shared.isArray(modelValue)) { + const index = shared.looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (shared.isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (shared.isArray(value)) { - el.checked = shared.looseIndexOf(value, vnode.props.value) > -1; - } - else if (shared.isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = shared.looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (shared.isArray(value)) { + el.checked = shared.looseIndexOf(value, vnode.props.value) > -1; + } else if (shared.isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = shared.looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = shared.looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = shared.looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = shared.looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = shared.looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = shared.isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? shared.toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = shared.isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + runtimeCore.nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; -function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !shared.isArray(value) && !shared.isSet(value)) { - runtimeCore.warn(`<select multiple v-model> expects an Array or Set value for its binding, ` + - `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`); +function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = shared.isArray(value); + if (isMultiple && !isArrayValue && !shared.isSet(value)) { + runtimeCore.warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + if (isArrayValue && shared.looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? shared.looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = shared.looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (shared.looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (shared.isArray(value)) { - option.selected = shared.looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (shared.looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } -// retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } -// retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } -// SSR vnode transforms, only used when user includes client-oriented render -// function in SSR function initVModelForSSR() { - vModelText.getSSRProps = ({ value }) => ({ value }); - vModelRadio.getSSRProps = ({ value }, vnode) => { - if (vnode.props && shared.looseEqual(vnode.props.value, value)) { - return { checked: true }; - } - }; - vModelCheckbox.getSSRProps = ({ value }, vnode) => { - if (shared.isArray(value)) { - if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) { - return { checked: true }; - } - } - else if (shared.isSet(value)) { - if (vnode.props && value.has(vnode.props.value)) { - return { checked: true }; - } - } - else if (value) { - return { checked: true }; - } - }; - vModelDynamic.getSSRProps = (binding, vnode) => { - if (typeof vnode.type !== 'string') { - return; - } - const modelToUse = resolveDynamicModel( - // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase - vnode.type.toUpperCase(), vnode.props && vnode.props.type); - if (modelToUse.getSSRProps) { - return modelToUse.getSSRProps(binding, vnode); - } - }; -} - -const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; -const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) -}; -/** - * @private - */ -const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; -}; -// Kept for 2.x compat. -// Note: IE11 compat for `spacebar` and `del` is removed for now. -const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' -}; -/** - * @private - */ -const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = shared.hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; -}; - -const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && shared.looseEqual(vnode.props.value, value)) { + return { checked: true }; } -}; -function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; -} -// SSR vnode transforms, only used when user includes client-oriented render -// function in SSR -function initVShowForSSR() { - vShow.getSSRProps = ({ value }) => { - if (!value) { - return { style: { display: 'none' } }; - } - }; + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (shared.isArray(value)) { + if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (shared.isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; } -const rendererOptions = /*#__PURE__*/ shared.extend({ patchProp }, nodeOps); -// lazy create the renderer - this makes core renderer logic tree-shakable -// in case the user only imports reactivity utilities from Vue. +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = shared.hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = runtimeCore.createRenderer(rendererOptions))); + return renderer || (renderer = runtimeCore.createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : runtimeCore.createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } -// use explicit type casts here to avoid import() calls in rolled-up d.ts -const render = ((...args) => { - ensureRenderer().render(...args); -}); -const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); -}); -const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!shared.isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!shared.isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; -}); -const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; -}); + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} function injectNativeTagCheck(app) { - // Inject `isNativeTag` - // this is used for component name validation (dev only) - Object.defineProperty(app.config, 'isNativeTag', { - value: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag), - writable: false - }); + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag), + writable: false + }); } -// dev only function injectCompilerOptionsCheck(app) { - if (runtimeCore.isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, 'isCustomElement', { - get() { - return isCustomElement; - }, - set() { - runtimeCore.warn(`The \`isCustomElement\` config option is deprecated. Use ` + - `\`compilerOptions.isCustomElement\` instead.`); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using ` + - `a build of Vue.js that includes the runtime compiler (aka "full build"). ` + - `Since you are using the runtime-only build, \`compilerOptions\` ` + - `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` + - `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` + - `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` + - `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`; - Object.defineProperty(app.config, 'compilerOptions', { - get() { - runtimeCore.warn(msg); - return compilerOptions; - }, - set() { - runtimeCore.warn(msg); - } - }); - } + if (runtimeCore.isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + runtimeCore.warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + runtimeCore.warn(msg); + return compilerOptions; + }, + set() { + runtimeCore.warn(msg); + } + }); + } } function normalizeContainer(container) { - if (shared.isString(container)) { - const res = document.querySelector(container); - if (!res) { - runtimeCore.warn(`Failed to mount app: mount target selector "${container}" returned null.`); - } - return res; + if (shared.isString(container)) { + const res = document.querySelector(container); + if (!res) { + runtimeCore.warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); } - if (window.ShadowRoot && - container instanceof window.ShadowRoot && - container.mode === 'closed') { - runtimeCore.warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`); - } - return container; + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + runtimeCore.warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; } let ssrDirectiveInitialized = false; -/** - * @internal - */ const initDirectivesForSSR = () => { - if (!ssrDirectiveInitialized) { - ssrDirectiveInitialized = true; - initVModelForSSR(); - initVShowForSSR(); - } - } - ; + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; -Object.keys(runtimeCore).forEach(function (k) { - if (k !== 'default') exports[k] = runtimeCore[k]; -}); exports.Transition = Transition; exports.TransitionGroup = TransitionGroup; exports.VueElement = VueElement; @@ -1666,3 +1549,6 @@ exports.vModelText = vModelText; exports.vShow = vShow; exports.withKeys = withKeys; exports.withModifiers = withModifiers; +Object.keys(runtimeCore).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k]; +}); diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js index 33173472..66ffc32d 100644 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js @@ -1,3 +1,8 @@ +/** +* @vue/runtime-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -5,1542 +10,1425 @@ Object.defineProperty(exports, '__esModule', { value: true }); var runtimeCore = require('@vue/runtime-core'); var shared = require('@vue/shared'); -const svgNS = 'http://www.w3.org/2000/svg'; -const doc = (typeof document !== 'undefined' ? document : null); -const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; -// compiler should normalize class + :class bindings on the same element -// into a single binding ['staticClass', dynamic] -function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } -} - -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = shared.isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !shared.isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } -} -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (shared.isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(shared.hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } -} -const prefixes = ['Webkit', 'Moz', 'ms']; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = runtimeCore.camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = shared.capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; -} - -const xlinkNS = 'http://www.w3.org/1999/xlink'; -function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = shared.isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !shared.includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } -} - -// __UNSAFE__ -// functions. The user is responsible for using them with only trusted content. -function patchDOMProp(el, key, value, -// the following args are passed only due to potential innerHTML/textContent -// overriding existing VNodes, in which case the old tree must be properly -// unmounted. -prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = shared.includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - } - needRemove && el.removeAttribute(key); -} - -// Async edge case fix requires storing an event listener's attach timestamp. -const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; -})(); -// To avoid the overhead of repeatedly calling performance.now(), we cache -// and use the same timestamp for all event listeners attached in the same tick. -let cachedNow = 0; -const p = /*#__PURE__*/ Promise.resolve(); -const reset = () => { - cachedNow = 0; -}; -const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [shared.hyphenate(name.slice(2)), options]; -} -function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - runtimeCore.callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function patchStopImmediatePropagation(e, value) { - if (shared.isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } -} - -const nativeOnRE = /^on[a-z]/; -const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (shared.isOn(key)) { - // ignore v-model listeners - if (!shared.isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && shared.isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && shared.isString(value)) { - return false; - } - return key in el; -} - -function defineCustomElement(options, hydrate) { - const Comp = runtimeCore.defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); -}); -const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { -}); -class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - runtimeCore.nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !shared.isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = shared.toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(shared.camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = shared.toNumber(value); - } - this._setProp(shared.camelize(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(shared.hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(shared.hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(shared.hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = runtimeCore.createVNode(this._def, shared.extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - }); - } - } -} - -function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - const instance = runtimeCore.getCurrentInstance(); - if (!instance) { - return shared.EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - return shared.EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - return shared.EMPTY_OBJ; - } - return mod; - } -} - -/** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ -function useCssVars(getter) { - return; -} - -const TRANSITION = 'transition'; -const ANIMATION = 'animation'; -// DOM Transition is a higher-order-component based on the platform-agnostic -// base Transition component, with DOM-specific logic. +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots); -Transition.displayName = 'Transition'; +Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; -const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ shared.extend({}, runtimeCore.BaseTransition.props, DOMTransitionPropsValidators)); -/** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ +const TransitionPropsValidators = Transition.props = /* @__PURE__ */ shared.extend( + {}, + runtimeCore.BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); const callHook = (hook, args = []) => { - if (shared.isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } + if (shared.isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; -/** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? shared.isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return shared.extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return shared.extend(baseProps, { - onBeforeEnter(el) { - callHook(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (shared.isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (shared.isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = shared.toNumber(val); - return res; + const res = shared.toNumber(val); + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } -// Old versions of Chromium (below 61.0.3163.100) formats floating pointer -// numbers in a locale-dependent way, using a comma instead of a dot. -// If comma is not replaced with a dot, the input will be rounded down -// (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } -// synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } -const positionMap = new WeakMap(); -const newPositionMap = new WeakMap(); -const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ shared.extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = runtimeCore.getCurrentInstance(); - const state = runtimeCore.useTransitionState(); - let prevChildren; - let children; - runtimeCore.onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = runtimeCore.toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || runtimeCore.Fragment; - prevChildren = children; - children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - runtimeCore.setTransitionHooks(child, runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - runtimeCore.setTransitionHooks(child, runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return runtimeCore.createVNode(tag, null, children); - }; +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOldKey = Symbol("_vod"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; +function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol(""); +function useCssVars(getter) { + return; +} + +function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = shared.isString(next); + if (next && !isCssString) { + if (prev && !shared.isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } +} +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (shared.isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + shared.hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = runtimeCore.camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = shared.capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = shared.isSpecialBooleanAttr(key); + if (value == null || isBoolean && !shared.includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } +} + +function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = shared.includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + } + needRemove && el.removeAttribute(key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + runtimeCore.callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function patchStopImmediatePropagation(e, value) { + if (shared.isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (shared.isOn(key)) { + if (!shared.isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && shared.isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && shared.isString(value)) { + return false; + } + return key in el; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, hydrate2) { + const Comp = runtimeCore.defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + runtimeCore.nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !shared.isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = shared.toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(shared.camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = shared.camelize(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = shared.toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(shared.hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(shared.hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(shared.hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = runtimeCore.createVNode(this._def, shared.extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (shared.hyphenate(event) !== event) { + dispatch(shared.hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + }); + } + } +} + +function useCssModule(name = "$style") { + { + const instance = runtimeCore.getCurrentInstance(); + if (!instance) { + return shared.EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + return shared.EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + return shared.EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = runtimeCore.getCurrentInstance(); + const state = runtimeCore.useTransitionState(); + let prevChildren; + let children; + runtimeCore.onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = runtimeCore.toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || runtimeCore.Fragment; + prevChildren = children; + children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + runtimeCore.setTransitionHooks( + child, + runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + runtimeCore.setTransitionHooks( + child, + runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return runtimeCore.createVNode(tag, null, children); + }; + } +}; +const removeMode = (props) => delete props.mode; +/* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return shared.isArray(fn) ? value => shared.invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } -// We are exporting the v-model runtime directly as vnode hooks so that it can -// be tree-shaken in case v-model is never used. +const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = shared.toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && shared.toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = shared.looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? shared.looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (shared.isArray(modelValue)) { - const index = shared.looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (shared.isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (shared.isArray(modelValue)) { + const index = shared.looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (shared.isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (shared.isArray(value)) { - el.checked = shared.looseIndexOf(value, vnode.props.value) > -1; - } - else if (shared.isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = shared.looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (shared.isArray(value)) { + el.checked = shared.looseIndexOf(value, vnode.props.value) > -1; + } else if (shared.isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = shared.looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = shared.looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = shared.looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = shared.looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = shared.looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = shared.isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? shared.toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = shared.isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + runtimeCore.nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; -function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !shared.isArray(value) && !shared.isSet(value)) { +function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = shared.isArray(value); + if (isMultiple && !isArrayValue && !shared.isSet(value)) { + return; + } + if (isArrayValue && shared.looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? shared.looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = shared.looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (shared.looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (shared.isArray(value)) { - option.selected = shared.looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (shared.looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } -// retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } -// retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } -// SSR vnode transforms, only used when user includes client-oriented render -// function in SSR function initVModelForSSR() { - vModelText.getSSRProps = ({ value }) => ({ value }); - vModelRadio.getSSRProps = ({ value }, vnode) => { - if (vnode.props && shared.looseEqual(vnode.props.value, value)) { - return { checked: true }; - } - }; - vModelCheckbox.getSSRProps = ({ value }, vnode) => { - if (shared.isArray(value)) { - if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) { - return { checked: true }; - } - } - else if (shared.isSet(value)) { - if (vnode.props && value.has(vnode.props.value)) { - return { checked: true }; - } - } - else if (value) { - return { checked: true }; - } - }; - vModelDynamic.getSSRProps = (binding, vnode) => { - if (typeof vnode.type !== 'string') { - return; - } - const modelToUse = resolveDynamicModel( - // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase - vnode.type.toUpperCase(), vnode.props && vnode.props.type); - if (modelToUse.getSSRProps) { - return modelToUse.getSSRProps(binding, vnode); - } - }; -} - -const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; -const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) -}; -/** - * @private - */ -const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; -}; -// Kept for 2.x compat. -// Note: IE11 compat for `spacebar` and `del` is removed for now. -const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' -}; -/** - * @private - */ -const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = shared.hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; -}; - -const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && shared.looseEqual(vnode.props.value, value)) { + return { checked: true }; } -}; -function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; -} -// SSR vnode transforms, only used when user includes client-oriented render -// function in SSR -function initVShowForSSR() { - vShow.getSSRProps = ({ value }) => { - if (!value) { - return { style: { display: 'none' } }; - } - }; + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (shared.isArray(value)) { + if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (shared.isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; } -const rendererOptions = /*#__PURE__*/ shared.extend({ patchProp }, nodeOps); -// lazy create the renderer - this makes core renderer logic tree-shakable -// in case the user only imports reactivity utilities from Vue. +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = shared.hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = runtimeCore.createRenderer(rendererOptions))); + return renderer || (renderer = runtimeCore.createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : runtimeCore.createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } -// use explicit type casts here to avoid import() calls in rolled-up d.ts -const render = ((...args) => { - ensureRenderer().render(...args); -}); -const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); -}); -const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!shared.isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; -}); -const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; -}); -function normalizeContainer(container) { - if (shared.isString(container)) { - const res = document.querySelector(container); - return res; +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!shared.isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - return container; + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function normalizeContainer(container) { + if (shared.isString(container)) { + const res = document.querySelector(container); + return res; + } + return container; } let ssrDirectiveInitialized = false; -/** - * @internal - */ const initDirectivesForSSR = () => { - if (!ssrDirectiveInitialized) { - ssrDirectiveInitialized = true; - initVModelForSSR(); - initVShowForSSR(); - } - } - ; + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; -Object.keys(runtimeCore).forEach(function (k) { - if (k !== 'default') exports[k] = runtimeCore[k]; -}); exports.Transition = Transition; exports.TransitionGroup = TransitionGroup; exports.VueElement = VueElement; @@ -1561,3 +1449,6 @@ exports.vModelText = vModelText; exports.vShow = vShow; exports.withKeys = withKeys; exports.withModifiers = withModifiers; +Object.keys(runtimeCore).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k]; +}); diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts index 3366f5ad..a1d3ecbc 100644 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts @@ -1,89 +1,68 @@ -import { BaseTransitionProps } from '@vue/runtime-core'; -import { ComponentInternalInstance } from '@vue/runtime-core'; -import { ComponentOptionsMixin } from '@vue/runtime-core'; -import { ComponentOptionsWithArrayProps } from '@vue/runtime-core'; -import { ComponentOptionsWithObjectProps } from '@vue/runtime-core'; -import { ComponentOptionsWithoutProps } from '@vue/runtime-core'; -import { ComponentPropsOptions } from '@vue/runtime-core'; -import { ComponentPublicInstance } from '@vue/runtime-core'; -import { ComputedOptions } from '@vue/runtime-core'; -import { ConcreteComponent } from '@vue/runtime-core'; -import { CreateAppFunction } from '@vue/runtime-core'; -import { EmitsOptions } from '@vue/runtime-core'; -import { ExtractPropTypes } from '@vue/runtime-core'; -import { FunctionalComponent } from '@vue/runtime-core'; -import { MethodOptions } from '@vue/runtime-core'; -import { ObjectDirective } from '@vue/runtime-core'; -import { RenderFunction } from '@vue/runtime-core'; -import { RootHydrateFunction } from '@vue/runtime-core'; -import { RootRenderFunction } from '@vue/runtime-core'; -import { SetupContext } from '@vue/runtime-core'; +import { SetupContext, RenderFunction, ComputedOptions, MethodOptions, ComponentOptionsMixin, EmitsOptions, ComponentInjectOptions, SlotsType, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, ExtractPropTypes, DefineComponent, RootHydrateFunction, ConcreteComponent, BaseTransitionProps, FunctionalComponent, ObjectDirective, VNodeRef, RootRenderFunction, CreateAppFunction } from '@vue/runtime-core'; +export * from '@vue/runtime-core'; +import * as CSS from 'csstype'; -declare const ANIMATION = "animation"; - -declare type AssignerFn = (value: any) => void; - -declare const BaseClass: { - new (): HTMLElement; - prototype: HTMLElement; +export type VueElementConstructor<P = {}> = { + new (initialProps?: Record<string, any>): VueElement & P; }; - -export declare const createApp: CreateAppFunction<Element>; - -export declare const createSSRApp: CreateAppFunction<Element>; - export declare function defineCustomElement<Props, RawBindings = object>(setup: (props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction): VueElementConstructor<Props>; - -export declare function defineCustomElement<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE> & { +export declare function defineCustomElement<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S> & { styles?: string[]; }): VueElementConstructor<Props>; - -export declare function defineCustomElement<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string>(options: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE> & { +export declare function defineCustomElement<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}>(options: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S> & { styles?: string[]; }): VueElementConstructor<{ [K in PropNames]: any; }>; - -export declare function defineCustomElement<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE> & { +export declare function defineCustomElement<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, S extends SlotsType = {}>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S> & { styles?: string[]; }): VueElementConstructor<ExtractPropTypes<PropsOptions>>; - -export declare function defineCustomElement(options: { - new (...args: any[]): ComponentPublicInstance; -}): VueElementConstructor; - +export declare function defineCustomElement<P>(options: DefineComponent<P, any, any, any>): VueElementConstructor<ExtractPropTypes<P>>; +/*! #__NO_SIDE_EFFECTS__ */ export declare const defineSSRCustomElement: typeof defineCustomElement; - -export declare const hydrate: RootHydrateFunction; - -/* Excluded from this release type: initDirectivesForSSR */ - -declare type InnerComponentDef = ConcreteComponent & { +declare const BaseClass: { + new (): HTMLElement; + prototype: HTMLElement; +}; +type InnerComponentDef = ConcreteComponent & { styles?: string[]; }; +export declare class VueElement extends BaseClass { + private _def; + private _props; + private _connected; + private _resolved; + private _numberProps; + private _styles?; + private _ob?; + constructor(_def: InnerComponentDef, _props?: Record<string, any>, hydrate?: RootHydrateFunction); + connectedCallback(): void; + disconnectedCallback(): void; + /** + * resolve inner component definition (handle possible async component) + */ + private _resolveDef; + private _resolveProps; + protected _setAttr(key: string): void; + private _update; + private _createVNode; + private _applyStyles; +} -declare type ModelDirective<T> = ObjectDirective<T & { - _assign: AssignerFn; -}>; +export declare function useCssModule(name?: string): Record<string, string>; -export declare const render: RootRenderFunction<Element | ShadowRoot>; +/** + * Runtime helper for SFC's CSS variable injection feature. + * @private + */ +export declare function useCssVars(getter: (ctx: any) => Record<string, string>): void; declare const TRANSITION = "transition"; - -export declare const Transition: FunctionalComponent<TransitionProps>; - -export declare const TransitionGroup: new () => { - $props: TransitionGroupProps; -}; - -export declare type TransitionGroupProps = Omit<TransitionProps, 'mode'> & { - tag?: string; - moveClass?: string; -}; - -export declare interface TransitionProps extends BaseTransitionProps<Element> { +declare const ANIMATION = "animation"; +type AnimationTypes = typeof TRANSITION | typeof ANIMATION; +export interface TransitionProps extends BaseTransitionProps<Element> { name?: string; - type?: typeof TRANSITION | typeof ANIMATION; + type?: AnimationTypes; css?: boolean; duration?: number | { enter: number; @@ -99,1424 +78,1234 @@ export declare interface TransitionProps extends BaseTransitionProps<Element> { leaveActiveClass?: string; leaveToClass?: string; } +export declare const Transition: FunctionalComponent<TransitionProps>; -export declare function useCssModule(name?: string): Record<string, string>; - -/** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ -export declare function useCssVars(getter: (ctx: any) => Record<string, string>): void; - -export declare const vModelCheckbox: ModelDirective<HTMLInputElement>; - -export declare const vModelDynamic: ObjectDirective<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>; - -export declare const vModelRadio: ModelDirective<HTMLInputElement>; - -export declare const vModelSelect: ModelDirective<HTMLSelectElement>; - -export declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement>; - -export declare const vShow: ObjectDirective<VShowElement>; - -declare interface VShowElement extends HTMLElement { - _vod: string; -} - -export declare class VueElement extends BaseClass { - private _def; - private _props; - /* Excluded from this release type: _instance */ - private _connected; - private _resolved; - private _numberProps; - private _styles?; - constructor(_def: InnerComponentDef, _props?: Record<string, any>, hydrate?: RootHydrateFunction); - connectedCallback(): void; - disconnectedCallback(): void; - /** - * resolve inner component definition (handle possible async component) - */ - private _resolveDef; - protected _setAttr(key: string): void; - /* Excluded from this release type: _getProp */ - /* Excluded from this release type: _setProp */ - private _update; - private _createVNode; - private _applyStyles; -} - -export declare type VueElementConstructor<P = {}> = { - new (initialProps?: Record<string, any>): VueElement & P; +export type TransitionGroupProps = Omit<TransitionProps, 'mode'> & { + tag?: string; + moveClass?: string; +}; +export declare const TransitionGroup: new () => { + $props: TransitionGroupProps; }; -/** - * @private - */ -export declare const withKeys: (fn: Function, modifiers: string[]) => (event: KeyboardEvent) => any; +type AssignerFn = (value: any) => void; +declare const assignKey: unique symbol; +type ModelDirective<T> = ObjectDirective<T & { + [assignKey]: AssignerFn; + _assigning?: boolean; +}>; +export declare const vModelText: ModelDirective<HTMLInputElement | HTMLTextAreaElement>; +export declare const vModelCheckbox: ModelDirective<HTMLInputElement>; +export declare const vModelRadio: ModelDirective<HTMLInputElement>; +export declare const vModelSelect: ModelDirective<HTMLSelectElement>; +export declare const vModelDynamic: ObjectDirective<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>; /** * @private */ -export declare const withModifiers: (fn: Function, modifiers: string[]) => (event: Event, ...args: unknown[]) => any; +export declare const withModifiers: <T extends (event: Event, ...args: unknown[]) => any>(fn: T & { + _withMods?: { + [key: string]: T; + } | undefined; +}, modifiers: string[]) => T; +/** + * @private + */ +export declare const withKeys: <T extends (event: KeyboardEvent) => any>(fn: T & { + _withKeys?: { + [k: string]: T; + } | undefined; +}, modifiers: string[]) => T; - -export * from "@vue/runtime-core"; - -export { } - -// Note: this file is auto concatenated to the end of the bundled d.ts during -// build. - -// This code is based on react definition in DefinitelyTyped published under the MIT license. -// Repository: https://github.com/DefinitelyTyped/DefinitelyTyped -// Path in the repository: types/react/index.d.ts -// -// Copyrights of original definition are: -// AssureSign <http://www.assuresign.com> -// Microsoft <https://microsoft.com> -// John Reilly <https://github.com/johnnyreilly> -// Benoit Benezech <https://github.com/bbenezech> -// Patricio Zavolinsky <https://github.com/pzavolinsky> -// Digiguru <https://github.com/digiguru> -// Eric Anderson <https://github.com/ericanderson> -// Dovydas Navickas <https://github.com/DovydasNavickas> -// Josh Rutherford <https://github.com/theruther4d> -// Guilherme Hübner <https://github.com/guilhermehubner> -// Ferdy Budhidharma <https://github.com/ferdaber> -// Johann Rakotoharisoa <https://github.com/jrakotoharisoa> -// Olivier Pascal <https://github.com/pascaloliv> -// Martin Hochel <https://github.com/hotell> -// Frank Li <https://github.com/franklixuefei> -// Jessica Franco <https://github.com/Jessidhia> -// Saransh Kataria <https://github.com/saranshkataria> -// Kanitkorn Sujautra <https://github.com/lukyth> -// Sebastian Silbermann <https://github.com/eps1lon> - -import { VNode } from '@vue/runtime-core' -import * as CSS from 'csstype' - -export interface CSSProperties - extends CSS.Properties<string | number>, - CSS.PropertiesHyphen<string | number> { - /** - * The index signature was removed to enable closed typing for style - * using CSSType. You're able to use type assertion or module augmentation - * to add properties or an index signature of your own. - * - * For examples and more information, visit: - * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors - */ - [v: `--${string}`]: string | number | undefined +declare const vShowOldKey: unique symbol; +interface VShowElement extends HTMLElement { + [vShowOldKey]: string; } +export declare const vShow: ObjectDirective<VShowElement> & { + name?: 'show'; +}; -type Booleanish = boolean | 'true' | 'false' -type Numberish = number | string - -// All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/ -interface AriaAttributes { - /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ - 'aria-activedescendant'?: string - /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ - 'aria-atomic'?: Booleanish - /** - * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be - * presented if they are made. - */ - 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both' - /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ - 'aria-busy'?: Booleanish - /** - * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. - * @see aria-pressed @see aria-selected. - */ - 'aria-checked'?: Booleanish | 'mixed' - /** - * Defines the total number of columns in a table, grid, or treegrid. - * @see aria-colindex. - */ - 'aria-colcount'?: Numberish - /** - * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. - * @see aria-colcount @see aria-colspan. - */ - 'aria-colindex'?: Numberish - /** - * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-colindex @see aria-rowspan. - */ - 'aria-colspan'?: Numberish - /** - * Identifies the element (or elements) whose contents or presence are controlled by the current element. - * @see aria-owns. - */ - 'aria-controls'?: string - /** Indicates the element that represents the current item within a container or set of related elements. */ - 'aria-current'?: Booleanish | 'page' | 'step' | 'location' | 'date' | 'time' - /** - * Identifies the element (or elements) that describes the object. - * @see aria-labelledby - */ - 'aria-describedby'?: string - /** - * Identifies the element that provides a detailed, extended description for the object. - * @see aria-describedby. - */ - 'aria-details'?: string - /** - * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. - * @see aria-hidden @see aria-readonly. - */ - 'aria-disabled'?: Booleanish - /** - * Indicates what functions can be performed when a dragged object is released on the drop target. - * @deprecated in ARIA 1.1 - */ - 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup' - /** - * Identifies the element that provides an error message for the object. - * @see aria-invalid @see aria-describedby. - */ - 'aria-errormessage'?: string - /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ - 'aria-expanded'?: Booleanish - /** - * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, - * allows assistive technology to override the general default of reading in document source order. - */ - 'aria-flowto'?: string - /** - * Indicates an element's "grabbed" state in a drag-and-drop operation. - * @deprecated in ARIA 1.1 - */ - 'aria-grabbed'?: Booleanish - /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ - 'aria-haspopup'?: Booleanish | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' - /** - * Indicates whether the element is exposed to an accessibility API. - * @see aria-disabled. - */ - 'aria-hidden'?: Booleanish - /** - * Indicates the entered value does not conform to the format expected by the application. - * @see aria-errormessage. - */ - 'aria-invalid'?: Booleanish | 'grammar' | 'spelling' - /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ - 'aria-keyshortcuts'?: string - /** - * Defines a string value that labels the current element. - * @see aria-labelledby. - */ - 'aria-label'?: string - /** - * Identifies the element (or elements) that labels the current element. - * @see aria-describedby. - */ - 'aria-labelledby'?: string - /** Defines the hierarchical level of an element within a structure. */ - 'aria-level'?: Numberish - /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ - 'aria-live'?: 'off' | 'assertive' | 'polite' - /** Indicates whether an element is modal when displayed. */ - 'aria-modal'?: Booleanish - /** Indicates whether a text box accepts multiple lines of input or only a single line. */ - 'aria-multiline'?: Booleanish - /** Indicates that the user may select more than one item from the current selectable descendants. */ - 'aria-multiselectable'?: Booleanish - /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ - 'aria-orientation'?: 'horizontal' | 'vertical' - /** - * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship - * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. - * @see aria-controls. - */ - 'aria-owns'?: string - /** - * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. - * A hint could be a sample value or a brief description of the expected format. - */ - 'aria-placeholder'?: string - /** - * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - * @see aria-setsize. - */ - 'aria-posinset'?: Numberish - /** - * Indicates the current "pressed" state of toggle buttons. - * @see aria-checked @see aria-selected. - */ - 'aria-pressed'?: Booleanish | 'mixed' - /** - * Indicates that the element is not editable, but is otherwise operable. - * @see aria-disabled. - */ - 'aria-readonly'?: Booleanish - /** - * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. - * @see aria-atomic. - */ - 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text' - /** Indicates that user input is required on the element before a form may be submitted. */ - 'aria-required'?: Booleanish - /** Defines a human-readable, author-localized description for the role of an element. */ - 'aria-roledescription'?: string - /** - * Defines the total number of rows in a table, grid, or treegrid. - * @see aria-rowindex. - */ - 'aria-rowcount'?: Numberish - /** - * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. - * @see aria-rowcount @see aria-rowspan. - */ - 'aria-rowindex'?: Numberish - /** - * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. - * @see aria-rowindex @see aria-colspan. - */ - 'aria-rowspan'?: Numberish - /** - * Indicates the current "selected" state of various widgets. - * @see aria-checked @see aria-pressed. - */ - 'aria-selected'?: Booleanish - /** - * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. - * @see aria-posinset. - */ - 'aria-setsize'?: Numberish - /** Indicates if items in a table or grid are sorted in ascending or descending order. */ - 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other' - /** Defines the maximum allowed value for a range widget. */ - 'aria-valuemax'?: Numberish - /** Defines the minimum allowed value for a range widget. */ - 'aria-valuemin'?: Numberish - /** - * Defines the current value for a range widget. - * @see aria-valuetext. - */ - 'aria-valuenow'?: Numberish - /** Defines the human readable text alternative of aria-valuenow for a range widget. */ - 'aria-valuetext'?: string +export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> { + /** + * The index signature was removed to enable closed typing for style + * using CSSType. You're able to use type assertion or module augmentation + * to add properties or an index signature of your own. + * + * For examples and more information, visit: + * https://github.com/frenic/csstype#what-should-i-do-when-i-get-type-errors + */ + [v: `--${string}`]: string | number | undefined; } - -// Vue's style normalization supports nested arrays -export type StyleValue = string | CSSProperties | Array<StyleValue> - +type Booleanish = boolean | 'true' | 'false'; +type Numberish = number | string; +export interface AriaAttributes { + /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */ + 'aria-activedescendant'?: string; + /** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */ + 'aria-atomic'?: Booleanish; + /** + * Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be + * presented if they are made. + */ + 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'; + /** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */ + 'aria-busy'?: Booleanish; + /** + * Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. + * @see aria-pressed @see aria-selected. + */ + 'aria-checked'?: Booleanish | 'mixed'; + /** + * Defines the total number of columns in a table, grid, or treegrid. + * @see aria-colindex. + */ + 'aria-colcount'?: Numberish; + /** + * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. + * @see aria-colcount @see aria-colspan. + */ + 'aria-colindex'?: Numberish; + /** + * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-colindex @see aria-rowspan. + */ + 'aria-colspan'?: Numberish; + /** + * Identifies the element (or elements) whose contents or presence are controlled by the current element. + * @see aria-owns. + */ + 'aria-controls'?: string; + /** Indicates the element that represents the current item within a container or set of related elements. */ + 'aria-current'?: Booleanish | 'page' | 'step' | 'location' | 'date' | 'time'; + /** + * Identifies the element (or elements) that describes the object. + * @see aria-labelledby + */ + 'aria-describedby'?: string; + /** + * Identifies the element that provides a detailed, extended description for the object. + * @see aria-describedby. + */ + 'aria-details'?: string; + /** + * Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. + * @see aria-hidden @see aria-readonly. + */ + 'aria-disabled'?: Booleanish; + /** + * Indicates what functions can be performed when a dragged object is released on the drop target. + * @deprecated in ARIA 1.1 + */ + 'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'; + /** + * Identifies the element that provides an error message for the object. + * @see aria-invalid @see aria-describedby. + */ + 'aria-errormessage'?: string; + /** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */ + 'aria-expanded'?: Booleanish; + /** + * Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, + * allows assistive technology to override the general default of reading in document source order. + */ + 'aria-flowto'?: string; + /** + * Indicates an element's "grabbed" state in a drag-and-drop operation. + * @deprecated in ARIA 1.1 + */ + 'aria-grabbed'?: Booleanish; + /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */ + 'aria-haspopup'?: Booleanish | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'; + /** + * Indicates whether the element is exposed to an accessibility API. + * @see aria-disabled. + */ + 'aria-hidden'?: Booleanish; + /** + * Indicates the entered value does not conform to the format expected by the application. + * @see aria-errormessage. + */ + 'aria-invalid'?: Booleanish | 'grammar' | 'spelling'; + /** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */ + 'aria-keyshortcuts'?: string; + /** + * Defines a string value that labels the current element. + * @see aria-labelledby. + */ + 'aria-label'?: string; + /** + * Identifies the element (or elements) that labels the current element. + * @see aria-describedby. + */ + 'aria-labelledby'?: string; + /** Defines the hierarchical level of an element within a structure. */ + 'aria-level'?: Numberish; + /** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */ + 'aria-live'?: 'off' | 'assertive' | 'polite'; + /** Indicates whether an element is modal when displayed. */ + 'aria-modal'?: Booleanish; + /** Indicates whether a text box accepts multiple lines of input or only a single line. */ + 'aria-multiline'?: Booleanish; + /** Indicates that the user may select more than one item from the current selectable descendants. */ + 'aria-multiselectable'?: Booleanish; + /** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */ + 'aria-orientation'?: 'horizontal' | 'vertical'; + /** + * Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship + * between DOM elements where the DOM hierarchy cannot be used to represent the relationship. + * @see aria-controls. + */ + 'aria-owns'?: string; + /** + * Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. + * A hint could be a sample value or a brief description of the expected format. + */ + 'aria-placeholder'?: string; + /** + * Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-setsize. + */ + 'aria-posinset'?: Numberish; + /** + * Indicates the current "pressed" state of toggle buttons. + * @see aria-checked @see aria-selected. + */ + 'aria-pressed'?: Booleanish | 'mixed'; + /** + * Indicates that the element is not editable, but is otherwise operable. + * @see aria-disabled. + */ + 'aria-readonly'?: Booleanish; + /** + * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. + * @see aria-atomic. + */ + 'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals'; + /** Indicates that user input is required on the element before a form may be submitted. */ + 'aria-required'?: Booleanish; + /** Defines a human-readable, author-localized description for the role of an element. */ + 'aria-roledescription'?: string; + /** + * Defines the total number of rows in a table, grid, or treegrid. + * @see aria-rowindex. + */ + 'aria-rowcount'?: Numberish; + /** + * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. + * @see aria-rowcount @see aria-rowspan. + */ + 'aria-rowindex'?: Numberish; + /** + * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. + * @see aria-rowindex @see aria-colspan. + */ + 'aria-rowspan'?: Numberish; + /** + * Indicates the current "selected" state of various widgets. + * @see aria-checked @see aria-pressed. + */ + 'aria-selected'?: Booleanish; + /** + * Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. + * @see aria-posinset. + */ + 'aria-setsize'?: Numberish; + /** Indicates if items in a table or grid are sorted in ascending or descending order. */ + 'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'; + /** Defines the maximum allowed value for a range widget. */ + 'aria-valuemax'?: Numberish; + /** Defines the minimum allowed value for a range widget. */ + 'aria-valuemin'?: Numberish; + /** + * Defines the current value for a range widget. + * @see aria-valuetext. + */ + 'aria-valuenow'?: Numberish; + /** Defines the human readable text alternative of aria-valuenow for a range widget. */ + 'aria-valuetext'?: string; +} +export type StyleValue = false | null | undefined | string | CSSProperties | Array<StyleValue>; export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> { - innerHTML?: string - - class?: any - style?: StyleValue - - // Standard HTML Attributes - accesskey?: string - contenteditable?: Booleanish | 'inherit' - contextmenu?: string - dir?: string - draggable?: Booleanish - hidden?: Booleanish - id?: string - lang?: string - placeholder?: string - spellcheck?: Booleanish - tabindex?: Numberish - title?: string - translate?: 'yes' | 'no' - - // Unknown - radiogroup?: string // <command>, <menuitem> - - // WAI-ARIA - role?: string - - // RDFa Attributes - about?: string - datatype?: string - inlist?: any - prefix?: string - property?: string - resource?: string - typeof?: string - vocab?: string - - // Non-standard Attributes - autocapitalize?: string - autocorrect?: string - autosave?: string - color?: string - itemprop?: string - itemscope?: Booleanish - itemtype?: string - itemid?: string - itemref?: string - results?: Numberish - security?: string - unselectable?: 'on' | 'off' - - // Living Standard - /** - * Hints at the type of data that might be entered by the user while editing the element or its contents - * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute - */ - inputmode?: - | 'none' - | 'text' - | 'tel' - | 'url' - | 'email' - | 'numeric' - | 'decimal' - | 'search' - /** - * Specify that a standard HTML element should behave like a defined custom built-in element - * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is - */ - is?: string + innerHTML?: string; + class?: any; + style?: StyleValue; + accesskey?: string; + contenteditable?: Booleanish | 'inherit' | 'plaintext-only'; + contextmenu?: string; + dir?: string; + draggable?: Booleanish; + hidden?: Booleanish | '' | 'hidden' | 'until-found'; + id?: string; + inert?: Booleanish; + lang?: string; + placeholder?: string; + spellcheck?: Booleanish; + tabindex?: Numberish; + title?: string; + translate?: 'yes' | 'no'; + radiogroup?: string; + role?: string; + about?: string; + datatype?: string; + inlist?: any; + prefix?: string; + property?: string; + resource?: string; + typeof?: string; + vocab?: string; + autocapitalize?: string; + autocorrect?: string; + autosave?: string; + color?: string; + itemprop?: string; + itemscope?: Booleanish; + itemtype?: string; + itemid?: string; + itemref?: string; + results?: Numberish; + security?: string; + unselectable?: 'on' | 'off'; + /** + * Hints at the type of data that might be entered by the user while editing the element or its contents + * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute + */ + inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'; + /** + * Specify that a standard HTML element should behave like a defined custom built-in element + * @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is + */ + is?: string; } - +type HTMLAttributeReferrerPolicy = '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'; export interface AnchorHTMLAttributes extends HTMLAttributes { - download?: any - href?: string - hreflang?: string - media?: string - ping?: string - rel?: string - target?: string - type?: string - referrerpolicy?: string + download?: any; + href?: string; + hreflang?: string; + media?: string; + ping?: string; + rel?: string; + target?: string; + type?: string; + referrerpolicy?: HTMLAttributeReferrerPolicy; } - export interface AreaHTMLAttributes extends HTMLAttributes { - alt?: string - coords?: string - download?: any - href?: string - hreflang?: string - media?: string - rel?: string - shape?: string - target?: string + alt?: string; + coords?: string; + download?: any; + href?: string; + hreflang?: string; + media?: string; + referrerpolicy?: HTMLAttributeReferrerPolicy; + rel?: string; + shape?: string; + target?: string; +} +export interface AudioHTMLAttributes extends MediaHTMLAttributes { } - -export interface AudioHTMLAttributes extends MediaHTMLAttributes {} - export interface BaseHTMLAttributes extends HTMLAttributes { - href?: string - target?: string + href?: string; + target?: string; } - export interface BlockquoteHTMLAttributes extends HTMLAttributes { - cite?: string + cite?: string; } - export interface ButtonHTMLAttributes extends HTMLAttributes { - autofocus?: Booleanish - disabled?: Booleanish - form?: string - formaction?: string - formenctype?: string - formmethod?: string - formnovalidate?: Booleanish - formtarget?: string - name?: string - type?: 'submit' | 'reset' | 'button' - value?: string | string[] | number + autofocus?: Booleanish; + disabled?: Booleanish; + form?: string; + formaction?: string; + formenctype?: string; + formmethod?: string; + formnovalidate?: Booleanish; + formtarget?: string; + name?: string; + type?: 'submit' | 'reset' | 'button'; + value?: string | ReadonlyArray<string> | number; } - export interface CanvasHTMLAttributes extends HTMLAttributes { - height?: Numberish - width?: Numberish + height?: Numberish; + width?: Numberish; } - export interface ColHTMLAttributes extends HTMLAttributes { - span?: Numberish - width?: Numberish + span?: Numberish; + width?: Numberish; } - export interface ColgroupHTMLAttributes extends HTMLAttributes { - span?: Numberish + span?: Numberish; } - export interface DataHTMLAttributes extends HTMLAttributes { - value?: string | string[] | number + value?: string | ReadonlyArray<string> | number; } - export interface DetailsHTMLAttributes extends HTMLAttributes { - open?: Booleanish + open?: Booleanish; + onToggle?: Event; } - export interface DelHTMLAttributes extends HTMLAttributes { - cite?: string - datetime?: string + cite?: string; + datetime?: string; } - export interface DialogHTMLAttributes extends HTMLAttributes { - open?: Booleanish + open?: Booleanish; } - export interface EmbedHTMLAttributes extends HTMLAttributes { - height?: Numberish - src?: string - type?: string - width?: Numberish + height?: Numberish; + src?: string; + type?: string; + width?: Numberish; } - export interface FieldsetHTMLAttributes extends HTMLAttributes { - disabled?: Booleanish - form?: string - name?: string + disabled?: Booleanish; + form?: string; + name?: string; } - export interface FormHTMLAttributes extends HTMLAttributes { - acceptcharset?: string - action?: string - autocomplete?: string - enctype?: string - method?: string - name?: string - novalidate?: Booleanish - target?: string + acceptcharset?: string; + action?: string; + autocomplete?: string; + enctype?: string; + method?: string; + name?: string; + novalidate?: Booleanish; + target?: string; } - export interface HtmlHTMLAttributes extends HTMLAttributes { - manifest?: string + manifest?: string; } - export interface IframeHTMLAttributes extends HTMLAttributes { - allow?: string - allowfullscreen?: Booleanish - allowtransparency?: Booleanish - frameborder?: Numberish - height?: Numberish - marginheight?: Numberish - marginwidth?: Numberish - name?: string - referrerpolicy?: string - sandbox?: string - scrolling?: string - seamless?: Booleanish - src?: string - srcdoc?: string - width?: Numberish + allow?: string; + allowfullscreen?: Booleanish; + allowtransparency?: Booleanish; + /** @deprecated */ + frameborder?: Numberish; + height?: Numberish; + /** @deprecated */ + marginheight?: Numberish; + /** @deprecated */ + marginwidth?: Numberish; + name?: string; + referrerpolicy?: HTMLAttributeReferrerPolicy; + sandbox?: string; + /** @deprecated */ + scrolling?: string; + seamless?: Booleanish; + src?: string; + srcdoc?: string; + width?: Numberish; } - export interface ImgHTMLAttributes extends HTMLAttributes { - alt?: string - crossorigin?: 'anonymous' | 'use-credentials' | '' - decoding?: 'async' | 'auto' | 'sync' - height?: Numberish - sizes?: string - src?: string - srcset?: string - usemap?: string - width?: Numberish + alt?: string; + crossorigin?: 'anonymous' | 'use-credentials' | ''; + decoding?: 'async' | 'auto' | 'sync'; + height?: Numberish; + loading?: 'eager' | 'lazy'; + referrerpolicy?: HTMLAttributeReferrerPolicy; + sizes?: string; + src?: string; + srcset?: string; + usemap?: string; + width?: Numberish; } - export interface InsHTMLAttributes extends HTMLAttributes { - cite?: string - datetime?: string + cite?: string; + datetime?: string; } - +export type InputTypeHTMLAttribute = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week' | (string & {}); export interface InputHTMLAttributes extends HTMLAttributes { - accept?: string - alt?: string - autocomplete?: string - autofocus?: Booleanish - capture?: boolean | 'user' | 'environment' // https://www.w3.org/tr/html-media-capture/#the-capture-attribute - checked?: Booleanish | any[] | Set<any> // for IDE v-model multi-checkbox support - crossorigin?: string - disabled?: Booleanish - form?: string - formaction?: string - formenctype?: string - formmethod?: string - formnovalidate?: Booleanish - formtarget?: string - height?: Numberish - indeterminate?: boolean - list?: string - max?: Numberish - maxlength?: Numberish - min?: Numberish - minlength?: Numberish - multiple?: Booleanish - name?: string - pattern?: string - placeholder?: string - readonly?: Booleanish - required?: Booleanish - size?: Numberish - src?: string - step?: Numberish - type?: string - value?: any // we support :value to be bound to anything w/ v-model - width?: Numberish + accept?: string; + alt?: string; + autocomplete?: string; + autofocus?: Booleanish; + capture?: boolean | 'user' | 'environment'; + checked?: Booleanish | any[] | Set<any>; + crossorigin?: string; + disabled?: Booleanish; + enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; + form?: string; + formaction?: string; + formenctype?: string; + formmethod?: string; + formnovalidate?: Booleanish; + formtarget?: string; + height?: Numberish; + indeterminate?: boolean; + list?: string; + max?: Numberish; + maxlength?: Numberish; + min?: Numberish; + minlength?: Numberish; + multiple?: Booleanish; + name?: string; + pattern?: string; + placeholder?: string; + readonly?: Booleanish; + required?: Booleanish; + size?: Numberish; + src?: string; + step?: Numberish; + type?: InputTypeHTMLAttribute; + value?: any; + width?: Numberish; } - export interface KeygenHTMLAttributes extends HTMLAttributes { - autofocus?: Booleanish - challenge?: string - disabled?: Booleanish - form?: string - keytype?: string - keyparams?: string - name?: string + autofocus?: Booleanish; + challenge?: string; + disabled?: Booleanish; + form?: string; + keytype?: string; + keyparams?: string; + name?: string; } - export interface LabelHTMLAttributes extends HTMLAttributes { - for?: string - form?: string + for?: string; + form?: string; } - export interface LiHTMLAttributes extends HTMLAttributes { - value?: string | string[] | number + value?: string | ReadonlyArray<string> | number; } - export interface LinkHTMLAttributes extends HTMLAttributes { - as?: string - crossorigin?: string - href?: string - hreflang?: string - integrity?: string - media?: string - rel?: string - sizes?: string - type?: string + as?: string; + crossorigin?: string; + href?: string; + hreflang?: string; + integrity?: string; + media?: string; + referrerpolicy?: HTMLAttributeReferrerPolicy; + rel?: string; + sizes?: string; + type?: string; + charset?: string; } - export interface MapHTMLAttributes extends HTMLAttributes { - name?: string + name?: string; } - export interface MenuHTMLAttributes extends HTMLAttributes { - type?: string + type?: string; } - export interface MediaHTMLAttributes extends HTMLAttributes { - autoplay?: Booleanish - controls?: Booleanish - controlslist?: string - crossorigin?: string - loop?: Booleanish - mediagroup?: string - muted?: Booleanish - playsinline?: Booleanish - preload?: string - src?: string + autoplay?: Booleanish; + controls?: Booleanish; + controlslist?: string; + crossorigin?: string; + loop?: Booleanish; + mediagroup?: string; + muted?: Booleanish; + playsinline?: Booleanish; + preload?: string; + src?: string; } - export interface MetaHTMLAttributes extends HTMLAttributes { - charset?: string - content?: string - httpequiv?: string - name?: string + charset?: string; + content?: string; + httpequiv?: string; + name?: string; } - export interface MeterHTMLAttributes extends HTMLAttributes { - form?: string - high?: Numberish - low?: Numberish - max?: Numberish - min?: Numberish - optimum?: Numberish - value?: string | string[] | number + form?: string; + high?: Numberish; + low?: Numberish; + max?: Numberish; + min?: Numberish; + optimum?: Numberish; + value?: string | ReadonlyArray<string> | number; } - export interface QuoteHTMLAttributes extends HTMLAttributes { - cite?: string + cite?: string; } - export interface ObjectHTMLAttributes extends HTMLAttributes { - classid?: string - data?: string - form?: string - height?: Numberish - name?: string - type?: string - usemap?: string - width?: Numberish - wmode?: string + classid?: string; + data?: string; + form?: string; + height?: Numberish; + name?: string; + type?: string; + usemap?: string; + width?: Numberish; + wmode?: string; } - export interface OlHTMLAttributes extends HTMLAttributes { - reversed?: Booleanish - start?: Numberish - type?: '1' | 'a' | 'A' | 'i' | 'I' + reversed?: Booleanish; + start?: Numberish; + type?: '1' | 'a' | 'A' | 'i' | 'I'; } - export interface OptgroupHTMLAttributes extends HTMLAttributes { - disabled?: Booleanish - label?: string + disabled?: Booleanish; + label?: string; } - export interface OptionHTMLAttributes extends HTMLAttributes { - disabled?: Booleanish - label?: string - selected?: Booleanish - value?: any // we support :value to be bound to anything w/ v-model + disabled?: Booleanish; + label?: string; + selected?: Booleanish; + value?: any; } - export interface OutputHTMLAttributes extends HTMLAttributes { - for?: string - form?: string - name?: string + for?: string; + form?: string; + name?: string; } - export interface ParamHTMLAttributes extends HTMLAttributes { - name?: string - value?: string | string[] | number + name?: string; + value?: string | ReadonlyArray<string> | number; } - export interface ProgressHTMLAttributes extends HTMLAttributes { - max?: Numberish - value?: string | string[] | number + max?: Numberish; + value?: string | ReadonlyArray<string> | number; } - export interface ScriptHTMLAttributes extends HTMLAttributes { - async?: Booleanish - charset?: string - crossorigin?: string - defer?: Booleanish - integrity?: string - nomodule?: Booleanish - nonce?: string - src?: string - type?: string + async?: Booleanish; + /** @deprecated */ + charset?: string; + crossorigin?: string; + defer?: Booleanish; + integrity?: string; + nomodule?: Booleanish; + referrerpolicy?: HTMLAttributeReferrerPolicy; + nonce?: string; + src?: string; + type?: string; } - export interface SelectHTMLAttributes extends HTMLAttributes { - autocomplete?: string - autofocus?: Booleanish - disabled?: Booleanish - form?: string - multiple?: Booleanish - name?: string - required?: Booleanish - size?: Numberish - value?: any // we support :value to be bound to anything w/ v-model + autocomplete?: string; + autofocus?: Booleanish; + disabled?: Booleanish; + form?: string; + multiple?: Booleanish; + name?: string; + required?: Booleanish; + size?: Numberish; + value?: any; } - export interface SourceHTMLAttributes extends HTMLAttributes { - media?: string - sizes?: string - src?: string - srcset?: string - type?: string + media?: string; + sizes?: string; + src?: string; + srcset?: string; + type?: string; } - export interface StyleHTMLAttributes extends HTMLAttributes { - media?: string - nonce?: string - scoped?: Booleanish - type?: string + media?: string; + nonce?: string; + scoped?: Booleanish; + type?: string; } - export interface TableHTMLAttributes extends HTMLAttributes { - cellpadding?: Numberish - cellspacing?: Numberish - summary?: string + cellpadding?: Numberish; + cellspacing?: Numberish; + summary?: string; + width?: Numberish; } - export interface TextareaHTMLAttributes extends HTMLAttributes { - autocomplete?: string - autofocus?: Booleanish - cols?: Numberish - dirname?: string - disabled?: Booleanish - form?: string - maxlength?: Numberish - minlength?: Numberish - name?: string - placeholder?: string - readonly?: boolean - required?: Booleanish - rows?: Numberish - value?: string | string[] | number - wrap?: string + autocomplete?: string; + autofocus?: Booleanish; + cols?: Numberish; + dirname?: string; + disabled?: Booleanish; + form?: string; + maxlength?: Numberish; + minlength?: Numberish; + name?: string; + placeholder?: string; + readonly?: Booleanish; + required?: Booleanish; + rows?: Numberish; + value?: string | ReadonlyArray<string> | number | null; + wrap?: string; } - export interface TdHTMLAttributes extends HTMLAttributes { - align?: 'left' | 'center' | 'right' | 'justify' | 'char' - colspan?: Numberish - headers?: string - rowspan?: Numberish - scope?: string - valign?: 'top' | 'middle' | 'bottom' | 'baseline' + align?: 'left' | 'center' | 'right' | 'justify' | 'char'; + colspan?: Numberish; + headers?: string; + rowspan?: Numberish; + scope?: string; + abbr?: string; + height?: Numberish; + width?: Numberish; + valign?: 'top' | 'middle' | 'bottom' | 'baseline'; } - export interface ThHTMLAttributes extends HTMLAttributes { - align?: 'left' | 'center' | 'right' | 'justify' | 'char' - colspan?: Numberish - headers?: string - rowspan?: Numberish - scope?: string + align?: 'left' | 'center' | 'right' | 'justify' | 'char'; + colspan?: Numberish; + headers?: string; + rowspan?: Numberish; + scope?: string; + abbr?: string; } - export interface TimeHTMLAttributes extends HTMLAttributes { - datetime?: string + datetime?: string; } - export interface TrackHTMLAttributes extends HTMLAttributes { - default?: Booleanish - kind?: string - label?: string - src?: string - srclang?: string + default?: Booleanish; + kind?: string; + label?: string; + src?: string; + srclang?: string; } - export interface VideoHTMLAttributes extends MediaHTMLAttributes { - height?: Numberish - playsinline?: Booleanish - poster?: string - width?: Numberish - disablePictureInPicture?: Booleanish + height?: Numberish; + playsinline?: Booleanish; + poster?: string; + width?: Numberish; + disablePictureInPicture?: Booleanish; + disableRemotePlayback?: Booleanish; } - export interface WebViewHTMLAttributes extends HTMLAttributes { - allowfullscreen?: Booleanish - allowpopups?: Booleanish - autoFocus?: Booleanish - autosize?: Booleanish - blinkfeatures?: string - disableblinkfeatures?: string - disableguestresize?: Booleanish - disablewebsecurity?: Booleanish - guestinstance?: string - httpreferrer?: string - nodeintegration?: Booleanish - partition?: string - plugins?: Booleanish - preload?: string - src?: string - useragent?: string - webpreferences?: string + allowfullscreen?: Booleanish; + allowpopups?: Booleanish; + autoFocus?: Booleanish; + autosize?: Booleanish; + blinkfeatures?: string; + disableblinkfeatures?: string; + disableguestresize?: Booleanish; + disablewebsecurity?: Booleanish; + guestinstance?: string; + httpreferrer?: string; + nodeintegration?: Booleanish; + partition?: string; + plugins?: Booleanish; + preload?: string; + src?: string; + useragent?: string; + webpreferences?: string; } - export interface SVGAttributes extends AriaAttributes, EventHandlers<Events> { - innerHTML?: string - - /** - * SVG Styling Attributes - * @see https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling - */ - class?: any - style?: string | CSSProperties - - color?: string - height?: Numberish - id?: string - lang?: string - max?: Numberish - media?: string - method?: string - min?: Numberish - name?: string - target?: string - type?: string - width?: Numberish - - // Other HTML properties supported by SVG elements in browsers - role?: string - tabindex?: Numberish - - // SVG Specific attributes - 'accent-height'?: Numberish - accumulate?: 'none' | 'sum' - additive?: 'replace' | 'sum' - 'alignment-baseline'?: - | 'auto' - | 'baseline' - | 'before-edge' - | 'text-before-edge' - | 'middle' - | 'central' - | 'after-edge' - | 'text-after-edge' - | 'ideographic' - | 'alphabetic' - | 'hanging' - | 'mathematical' - | 'inherit' - allowReorder?: 'no' | 'yes' - alphabetic?: Numberish - amplitude?: Numberish - 'arabic-form'?: 'initial' | 'medial' | 'terminal' | 'isolated' - ascent?: Numberish - attributeName?: string - attributeType?: string - autoReverse?: Numberish - azimuth?: Numberish - baseFrequency?: Numberish - 'baseline-shift'?: Numberish - baseProfile?: Numberish - bbox?: Numberish - begin?: Numberish - bias?: Numberish - by?: Numberish - calcMode?: Numberish - 'cap-height'?: Numberish - clip?: Numberish - 'clip-path'?: string - clipPathUnits?: Numberish - 'clip-rule'?: Numberish - 'color-interpolation'?: Numberish - 'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB' | 'inherit' - 'color-profile'?: Numberish - 'color-rendering'?: Numberish - contentScriptType?: Numberish - contentStyleType?: Numberish - cursor?: Numberish - cx?: Numberish - cy?: Numberish - d?: string - decelerate?: Numberish - descent?: Numberish - diffuseConstant?: Numberish - direction?: Numberish - display?: Numberish - divisor?: Numberish - 'dominant-baseline'?: Numberish - dur?: Numberish - dx?: Numberish - dy?: Numberish - edgeMode?: Numberish - elevation?: Numberish - 'enable-background'?: Numberish - end?: Numberish - exponent?: Numberish - externalResourcesRequired?: Numberish - fill?: string - 'fill-opacity'?: Numberish - 'fill-rule'?: 'nonzero' | 'evenodd' | 'inherit' - filter?: string - filterRes?: Numberish - filterUnits?: Numberish - 'flood-color'?: Numberish - 'flood-opacity'?: Numberish - focusable?: Numberish - 'font-family'?: string - 'font-size'?: Numberish - 'font-size-adjust'?: Numberish - 'font-stretch'?: Numberish - 'font-style'?: Numberish - 'font-variant'?: Numberish - 'font-weight'?: Numberish - format?: Numberish - from?: Numberish - fx?: Numberish - fy?: Numberish - g1?: Numberish - g2?: Numberish - 'glyph-name'?: Numberish - 'glyph-orientation-horizontal'?: Numberish - 'glyph-orientation-vertical'?: Numberish - glyphRef?: Numberish - gradientTransform?: string - gradientUnits?: string - hanging?: Numberish - 'horiz-adv-x'?: Numberish - 'horiz-origin-x'?: Numberish - href?: string - ideographic?: Numberish - 'image-rendering'?: Numberish - in2?: Numberish - in?: string - intercept?: Numberish - k1?: Numberish - k2?: Numberish - k3?: Numberish - k4?: Numberish - k?: Numberish - kernelMatrix?: Numberish - kernelUnitLength?: Numberish - kerning?: Numberish - keyPoints?: Numberish - keySplines?: Numberish - keyTimes?: Numberish - lengthAdjust?: Numberish - 'letter-spacing'?: Numberish - 'lighting-color'?: Numberish - limitingConeAngle?: Numberish - local?: Numberish - 'marker-end'?: string - markerHeight?: Numberish - 'marker-mid'?: string - 'marker-start'?: string - markerUnits?: Numberish - markerWidth?: Numberish - mask?: string - maskContentUnits?: Numberish - maskUnits?: Numberish - mathematical?: Numberish - mode?: Numberish - numOctaves?: Numberish - offset?: Numberish - opacity?: Numberish - operator?: Numberish - order?: Numberish - orient?: Numberish - orientation?: Numberish - origin?: Numberish - overflow?: Numberish - 'overline-position'?: Numberish - 'overline-thickness'?: Numberish - 'paint-order'?: Numberish - 'panose-1'?: Numberish - pathLength?: Numberish - patternContentUnits?: string - patternTransform?: Numberish - patternUnits?: string - 'pointer-events'?: Numberish - points?: string - pointsAtX?: Numberish - pointsAtY?: Numberish - pointsAtZ?: Numberish - preserveAlpha?: Numberish - preserveAspectRatio?: string - primitiveUnits?: Numberish - r?: Numberish - radius?: Numberish - refX?: Numberish - refY?: Numberish - renderingIntent?: Numberish - repeatCount?: Numberish - repeatDur?: Numberish - requiredExtensions?: Numberish - requiredFeatures?: Numberish - restart?: Numberish - result?: string - rotate?: Numberish - rx?: Numberish - ry?: Numberish - scale?: Numberish - seed?: Numberish - 'shape-rendering'?: Numberish - slope?: Numberish - spacing?: Numberish - specularConstant?: Numberish - specularExponent?: Numberish - speed?: Numberish - spreadMethod?: string - startOffset?: Numberish - stdDeviation?: Numberish - stemh?: Numberish - stemv?: Numberish - stitchTiles?: Numberish - 'stop-color'?: string - 'stop-opacity'?: Numberish - 'strikethrough-position'?: Numberish - 'strikethrough-thickness'?: Numberish - string?: Numberish - stroke?: string - 'stroke-dasharray'?: Numberish - 'stroke-dashoffset'?: Numberish - 'stroke-linecap'?: 'butt' | 'round' | 'square' | 'inherit' - 'stroke-linejoin'?: 'miter' | 'round' | 'bevel' | 'inherit' - 'stroke-miterlimit'?: Numberish - 'stroke-opacity'?: Numberish - 'stroke-width'?: Numberish - surfaceScale?: Numberish - systemLanguage?: Numberish - tableValues?: Numberish - targetX?: Numberish - targetY?: Numberish - 'text-anchor'?: string - 'text-decoration'?: Numberish - textLength?: Numberish - 'text-rendering'?: Numberish - to?: Numberish - transform?: string - u1?: Numberish - u2?: Numberish - 'underline-position'?: Numberish - 'underline-thickness'?: Numberish - unicode?: Numberish - 'unicode-bidi'?: Numberish - 'unicode-range'?: Numberish - 'unitsPer-em'?: Numberish - 'v-alphabetic'?: Numberish - values?: string - 'vector-effect'?: Numberish - version?: string - 'vert-adv-y'?: Numberish - 'vert-origin-x'?: Numberish - 'vert-origin-y'?: Numberish - 'v-hanging'?: Numberish - 'v-ideographic'?: Numberish - viewBox?: string - viewTarget?: Numberish - visibility?: Numberish - 'v-mathematical'?: Numberish - widths?: Numberish - 'word-spacing'?: Numberish - 'writing-mode'?: Numberish - x1?: Numberish - x2?: Numberish - x?: Numberish - xChannelSelector?: string - 'x-height'?: Numberish - xlinkActuate?: string - xlinkArcrole?: string - xlinkHref?: string - xlinkRole?: string - xlinkShow?: string - xlinkTitle?: string - xlinkType?: string - xmlns?: string - y1?: Numberish - y2?: Numberish - y?: Numberish - yChannelSelector?: string - z?: Numberish - zoomAndPan?: string + innerHTML?: string; + /** + * SVG Styling Attributes + * @see https://www.w3.org/TR/SVG/styling.html#ElementSpecificStyling + */ + class?: any; + style?: StyleValue; + color?: string; + height?: Numberish; + id?: string; + lang?: string; + max?: Numberish; + media?: string; + method?: string; + min?: Numberish; + name?: string; + target?: string; + type?: string; + width?: Numberish; + role?: string; + tabindex?: Numberish; + crossOrigin?: 'anonymous' | 'use-credentials' | ''; + 'accent-height'?: Numberish; + accumulate?: 'none' | 'sum'; + additive?: 'replace' | 'sum'; + 'alignment-baseline'?: 'auto' | 'baseline' | 'before-edge' | 'text-before-edge' | 'middle' | 'central' | 'after-edge' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'inherit'; + allowReorder?: 'no' | 'yes'; + alphabetic?: Numberish; + amplitude?: Numberish; + 'arabic-form'?: 'initial' | 'medial' | 'terminal' | 'isolated'; + ascent?: Numberish; + attributeName?: string; + attributeType?: string; + autoReverse?: Numberish; + azimuth?: Numberish; + baseFrequency?: Numberish; + 'baseline-shift'?: Numberish; + baseProfile?: Numberish; + bbox?: Numberish; + begin?: Numberish; + bias?: Numberish; + by?: Numberish; + calcMode?: Numberish; + 'cap-height'?: Numberish; + clip?: Numberish; + 'clip-path'?: string; + clipPathUnits?: Numberish; + 'clip-rule'?: Numberish; + 'color-interpolation'?: Numberish; + 'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB' | 'inherit'; + 'color-profile'?: Numberish; + 'color-rendering'?: Numberish; + contentScriptType?: Numberish; + contentStyleType?: Numberish; + cursor?: Numberish; + cx?: Numberish; + cy?: Numberish; + d?: string; + decelerate?: Numberish; + descent?: Numberish; + diffuseConstant?: Numberish; + direction?: Numberish; + display?: Numberish; + divisor?: Numberish; + 'dominant-baseline'?: Numberish; + dur?: Numberish; + dx?: Numberish; + dy?: Numberish; + edgeMode?: Numberish; + elevation?: Numberish; + 'enable-background'?: Numberish; + end?: Numberish; + exponent?: Numberish; + externalResourcesRequired?: Numberish; + fill?: string; + 'fill-opacity'?: Numberish; + 'fill-rule'?: 'nonzero' | 'evenodd' | 'inherit'; + filter?: string; + filterRes?: Numberish; + filterUnits?: Numberish; + 'flood-color'?: Numberish; + 'flood-opacity'?: Numberish; + focusable?: Numberish; + 'font-family'?: string; + 'font-size'?: Numberish; + 'font-size-adjust'?: Numberish; + 'font-stretch'?: Numberish; + 'font-style'?: Numberish; + 'font-variant'?: Numberish; + 'font-weight'?: Numberish; + format?: Numberish; + from?: Numberish; + fx?: Numberish; + fy?: Numberish; + g1?: Numberish; + g2?: Numberish; + 'glyph-name'?: Numberish; + 'glyph-orientation-horizontal'?: Numberish; + 'glyph-orientation-vertical'?: Numberish; + glyphRef?: Numberish; + gradientTransform?: string; + gradientUnits?: string; + hanging?: Numberish; + 'horiz-adv-x'?: Numberish; + 'horiz-origin-x'?: Numberish; + href?: string; + ideographic?: Numberish; + 'image-rendering'?: Numberish; + in2?: Numberish; + in?: string; + intercept?: Numberish; + k1?: Numberish; + k2?: Numberish; + k3?: Numberish; + k4?: Numberish; + k?: Numberish; + kernelMatrix?: Numberish; + kernelUnitLength?: Numberish; + kerning?: Numberish; + keyPoints?: Numberish; + keySplines?: Numberish; + keyTimes?: Numberish; + lengthAdjust?: Numberish; + 'letter-spacing'?: Numberish; + 'lighting-color'?: Numberish; + limitingConeAngle?: Numberish; + local?: Numberish; + 'marker-end'?: string; + markerHeight?: Numberish; + 'marker-mid'?: string; + 'marker-start'?: string; + markerUnits?: Numberish; + markerWidth?: Numberish; + mask?: string; + maskContentUnits?: Numberish; + maskUnits?: Numberish; + mathematical?: Numberish; + mode?: Numberish; + numOctaves?: Numberish; + offset?: Numberish; + opacity?: Numberish; + operator?: Numberish; + order?: Numberish; + orient?: Numberish; + orientation?: Numberish; + origin?: Numberish; + overflow?: Numberish; + 'overline-position'?: Numberish; + 'overline-thickness'?: Numberish; + 'paint-order'?: Numberish; + 'panose-1'?: Numberish; + pathLength?: Numberish; + patternContentUnits?: string; + patternTransform?: Numberish; + patternUnits?: string; + 'pointer-events'?: Numberish; + points?: string; + pointsAtX?: Numberish; + pointsAtY?: Numberish; + pointsAtZ?: Numberish; + preserveAlpha?: Numberish; + preserveAspectRatio?: string; + primitiveUnits?: Numberish; + r?: Numberish; + radius?: Numberish; + refX?: Numberish; + refY?: Numberish; + renderingIntent?: Numberish; + repeatCount?: Numberish; + repeatDur?: Numberish; + requiredExtensions?: Numberish; + requiredFeatures?: Numberish; + restart?: Numberish; + result?: string; + rotate?: Numberish; + rx?: Numberish; + ry?: Numberish; + scale?: Numberish; + seed?: Numberish; + 'shape-rendering'?: Numberish; + slope?: Numberish; + spacing?: Numberish; + specularConstant?: Numberish; + specularExponent?: Numberish; + speed?: Numberish; + spreadMethod?: string; + startOffset?: Numberish; + stdDeviation?: Numberish; + stemh?: Numberish; + stemv?: Numberish; + stitchTiles?: Numberish; + 'stop-color'?: string; + 'stop-opacity'?: Numberish; + 'strikethrough-position'?: Numberish; + 'strikethrough-thickness'?: Numberish; + string?: Numberish; + stroke?: string; + 'stroke-dasharray'?: Numberish; + 'stroke-dashoffset'?: Numberish; + 'stroke-linecap'?: 'butt' | 'round' | 'square' | 'inherit'; + 'stroke-linejoin'?: 'miter' | 'round' | 'bevel' | 'inherit'; + 'stroke-miterlimit'?: Numberish; + 'stroke-opacity'?: Numberish; + 'stroke-width'?: Numberish; + surfaceScale?: Numberish; + systemLanguage?: Numberish; + tableValues?: Numberish; + targetX?: Numberish; + targetY?: Numberish; + 'text-anchor'?: string; + 'text-decoration'?: Numberish; + textLength?: Numberish; + 'text-rendering'?: Numberish; + to?: Numberish; + transform?: string; + u1?: Numberish; + u2?: Numberish; + 'underline-position'?: Numberish; + 'underline-thickness'?: Numberish; + unicode?: Numberish; + 'unicode-bidi'?: Numberish; + 'unicode-range'?: Numberish; + 'unitsPer-em'?: Numberish; + 'v-alphabetic'?: Numberish; + values?: string; + 'vector-effect'?: Numberish; + version?: string; + 'vert-adv-y'?: Numberish; + 'vert-origin-x'?: Numberish; + 'vert-origin-y'?: Numberish; + 'v-hanging'?: Numberish; + 'v-ideographic'?: Numberish; + viewBox?: string; + viewTarget?: Numberish; + visibility?: Numberish; + 'v-mathematical'?: Numberish; + widths?: Numberish; + 'word-spacing'?: Numberish; + 'writing-mode'?: Numberish; + x1?: Numberish; + x2?: Numberish; + x?: Numberish; + xChannelSelector?: string; + 'x-height'?: Numberish; + xlinkActuate?: string; + xlinkArcrole?: string; + xlinkHref?: string; + xlinkRole?: string; + xlinkShow?: string; + xlinkTitle?: string; + xlinkType?: string; + xmlns?: string; + xmlnsXlink?: string; + y1?: Numberish; + y2?: Numberish; + y?: Numberish; + yChannelSelector?: string; + z?: Numberish; + zoomAndPan?: string; } - -interface IntrinsicElementAttributes { - a: AnchorHTMLAttributes - abbr: HTMLAttributes - address: HTMLAttributes - area: AreaHTMLAttributes - article: HTMLAttributes - aside: HTMLAttributes - audio: AudioHTMLAttributes - b: HTMLAttributes - base: BaseHTMLAttributes - bdi: HTMLAttributes - bdo: HTMLAttributes - blockquote: BlockquoteHTMLAttributes - body: HTMLAttributes - br: HTMLAttributes - button: ButtonHTMLAttributes - canvas: CanvasHTMLAttributes - caption: HTMLAttributes - cite: HTMLAttributes - code: HTMLAttributes - col: ColHTMLAttributes - colgroup: ColgroupHTMLAttributes - data: DataHTMLAttributes - datalist: HTMLAttributes - dd: HTMLAttributes - del: DelHTMLAttributes - details: DetailsHTMLAttributes - dfn: HTMLAttributes - dialog: DialogHTMLAttributes - div: HTMLAttributes - dl: HTMLAttributes - dt: HTMLAttributes - em: HTMLAttributes - embed: EmbedHTMLAttributes - fieldset: FieldsetHTMLAttributes - figcaption: HTMLAttributes - figure: HTMLAttributes - footer: HTMLAttributes - form: FormHTMLAttributes - h1: HTMLAttributes - h2: HTMLAttributes - h3: HTMLAttributes - h4: HTMLAttributes - h5: HTMLAttributes - h6: HTMLAttributes - head: HTMLAttributes - header: HTMLAttributes - hgroup: HTMLAttributes - hr: HTMLAttributes - html: HtmlHTMLAttributes - i: HTMLAttributes - iframe: IframeHTMLAttributes - img: ImgHTMLAttributes - input: InputHTMLAttributes - ins: InsHTMLAttributes - kbd: HTMLAttributes - keygen: KeygenHTMLAttributes - label: LabelHTMLAttributes - legend: HTMLAttributes - li: LiHTMLAttributes - link: LinkHTMLAttributes - main: HTMLAttributes - map: MapHTMLAttributes - mark: HTMLAttributes - menu: MenuHTMLAttributes - meta: MetaHTMLAttributes - meter: MeterHTMLAttributes - nav: HTMLAttributes - noindex: HTMLAttributes - noscript: HTMLAttributes - object: ObjectHTMLAttributes - ol: OlHTMLAttributes - optgroup: OptgroupHTMLAttributes - option: OptionHTMLAttributes - output: OutputHTMLAttributes - p: HTMLAttributes - param: ParamHTMLAttributes - picture: HTMLAttributes - pre: HTMLAttributes - progress: ProgressHTMLAttributes - q: QuoteHTMLAttributes - rp: HTMLAttributes - rt: HTMLAttributes - ruby: HTMLAttributes - s: HTMLAttributes - samp: HTMLAttributes - script: ScriptHTMLAttributes - section: HTMLAttributes - select: SelectHTMLAttributes - small: HTMLAttributes - source: SourceHTMLAttributes - span: HTMLAttributes - strong: HTMLAttributes - style: StyleHTMLAttributes - sub: HTMLAttributes - summary: HTMLAttributes - sup: HTMLAttributes - table: TableHTMLAttributes - template: HTMLAttributes - tbody: HTMLAttributes - td: TdHTMLAttributes - textarea: TextareaHTMLAttributes - tfoot: HTMLAttributes - th: ThHTMLAttributes - thead: HTMLAttributes - time: TimeHTMLAttributes - title: HTMLAttributes - tr: HTMLAttributes - track: TrackHTMLAttributes - u: HTMLAttributes - ul: HTMLAttributes - var: HTMLAttributes - video: VideoHTMLAttributes - wbr: HTMLAttributes - webview: WebViewHTMLAttributes - - // SVG - svg: SVGAttributes - - animate: SVGAttributes - animateMotion: SVGAttributes - animateTransform: SVGAttributes - circle: SVGAttributes - clipPath: SVGAttributes - defs: SVGAttributes - desc: SVGAttributes - ellipse: SVGAttributes - feBlend: SVGAttributes - feColorMatrix: SVGAttributes - feComponentTransfer: SVGAttributes - feComposite: SVGAttributes - feConvolveMatrix: SVGAttributes - feDiffuseLighting: SVGAttributes - feDisplacementMap: SVGAttributes - feDistantLight: SVGAttributes - feDropShadow: SVGAttributes - feFlood: SVGAttributes - feFuncA: SVGAttributes - feFuncB: SVGAttributes - feFuncG: SVGAttributes - feFuncR: SVGAttributes - feGaussianBlur: SVGAttributes - feImage: SVGAttributes - feMerge: SVGAttributes - feMergeNode: SVGAttributes - feMorphology: SVGAttributes - feOffset: SVGAttributes - fePointLight: SVGAttributes - feSpecularLighting: SVGAttributes - feSpotLight: SVGAttributes - feTile: SVGAttributes - feTurbulence: SVGAttributes - filter: SVGAttributes - foreignObject: SVGAttributes - g: SVGAttributes - image: SVGAttributes - line: SVGAttributes - linearGradient: SVGAttributes - marker: SVGAttributes - mask: SVGAttributes - metadata: SVGAttributes - mpath: SVGAttributes - path: SVGAttributes - pattern: SVGAttributes - polygon: SVGAttributes - polyline: SVGAttributes - radialGradient: SVGAttributes - rect: SVGAttributes - stop: SVGAttributes - switch: SVGAttributes - symbol: SVGAttributes - text: SVGAttributes - textPath: SVGAttributes - tspan: SVGAttributes - use: SVGAttributes - view: SVGAttributes +export interface IntrinsicElementAttributes { + a: AnchorHTMLAttributes; + abbr: HTMLAttributes; + address: HTMLAttributes; + area: AreaHTMLAttributes; + article: HTMLAttributes; + aside: HTMLAttributes; + audio: AudioHTMLAttributes; + b: HTMLAttributes; + base: BaseHTMLAttributes; + bdi: HTMLAttributes; + bdo: HTMLAttributes; + blockquote: BlockquoteHTMLAttributes; + body: HTMLAttributes; + br: HTMLAttributes; + button: ButtonHTMLAttributes; + canvas: CanvasHTMLAttributes; + caption: HTMLAttributes; + cite: HTMLAttributes; + code: HTMLAttributes; + col: ColHTMLAttributes; + colgroup: ColgroupHTMLAttributes; + data: DataHTMLAttributes; + datalist: HTMLAttributes; + dd: HTMLAttributes; + del: DelHTMLAttributes; + details: DetailsHTMLAttributes; + dfn: HTMLAttributes; + dialog: DialogHTMLAttributes; + div: HTMLAttributes; + dl: HTMLAttributes; + dt: HTMLAttributes; + em: HTMLAttributes; + embed: EmbedHTMLAttributes; + fieldset: FieldsetHTMLAttributes; + figcaption: HTMLAttributes; + figure: HTMLAttributes; + footer: HTMLAttributes; + form: FormHTMLAttributes; + h1: HTMLAttributes; + h2: HTMLAttributes; + h3: HTMLAttributes; + h4: HTMLAttributes; + h5: HTMLAttributes; + h6: HTMLAttributes; + head: HTMLAttributes; + header: HTMLAttributes; + hgroup: HTMLAttributes; + hr: HTMLAttributes; + html: HtmlHTMLAttributes; + i: HTMLAttributes; + iframe: IframeHTMLAttributes; + img: ImgHTMLAttributes; + input: InputHTMLAttributes; + ins: InsHTMLAttributes; + kbd: HTMLAttributes; + keygen: KeygenHTMLAttributes; + label: LabelHTMLAttributes; + legend: HTMLAttributes; + li: LiHTMLAttributes; + link: LinkHTMLAttributes; + main: HTMLAttributes; + map: MapHTMLAttributes; + mark: HTMLAttributes; + menu: MenuHTMLAttributes; + meta: MetaHTMLAttributes; + meter: MeterHTMLAttributes; + nav: HTMLAttributes; + noindex: HTMLAttributes; + noscript: HTMLAttributes; + object: ObjectHTMLAttributes; + ol: OlHTMLAttributes; + optgroup: OptgroupHTMLAttributes; + option: OptionHTMLAttributes; + output: OutputHTMLAttributes; + p: HTMLAttributes; + param: ParamHTMLAttributes; + picture: HTMLAttributes; + pre: HTMLAttributes; + progress: ProgressHTMLAttributes; + q: QuoteHTMLAttributes; + rp: HTMLAttributes; + rt: HTMLAttributes; + ruby: HTMLAttributes; + s: HTMLAttributes; + samp: HTMLAttributes; + script: ScriptHTMLAttributes; + section: HTMLAttributes; + select: SelectHTMLAttributes; + small: HTMLAttributes; + source: SourceHTMLAttributes; + span: HTMLAttributes; + strong: HTMLAttributes; + style: StyleHTMLAttributes; + sub: HTMLAttributes; + summary: HTMLAttributes; + sup: HTMLAttributes; + table: TableHTMLAttributes; + template: HTMLAttributes; + tbody: HTMLAttributes; + td: TdHTMLAttributes; + textarea: TextareaHTMLAttributes; + tfoot: HTMLAttributes; + th: ThHTMLAttributes; + thead: HTMLAttributes; + time: TimeHTMLAttributes; + title: HTMLAttributes; + tr: HTMLAttributes; + track: TrackHTMLAttributes; + u: HTMLAttributes; + ul: HTMLAttributes; + var: HTMLAttributes; + video: VideoHTMLAttributes; + wbr: HTMLAttributes; + webview: WebViewHTMLAttributes; + svg: SVGAttributes; + animate: SVGAttributes; + animateMotion: SVGAttributes; + animateTransform: SVGAttributes; + circle: SVGAttributes; + clipPath: SVGAttributes; + defs: SVGAttributes; + desc: SVGAttributes; + ellipse: SVGAttributes; + feBlend: SVGAttributes; + feColorMatrix: SVGAttributes; + feComponentTransfer: SVGAttributes; + feComposite: SVGAttributes; + feConvolveMatrix: SVGAttributes; + feDiffuseLighting: SVGAttributes; + feDisplacementMap: SVGAttributes; + feDistantLight: SVGAttributes; + feDropShadow: SVGAttributes; + feFlood: SVGAttributes; + feFuncA: SVGAttributes; + feFuncB: SVGAttributes; + feFuncG: SVGAttributes; + feFuncR: SVGAttributes; + feGaussianBlur: SVGAttributes; + feImage: SVGAttributes; + feMerge: SVGAttributes; + feMergeNode: SVGAttributes; + feMorphology: SVGAttributes; + feOffset: SVGAttributes; + fePointLight: SVGAttributes; + feSpecularLighting: SVGAttributes; + feSpotLight: SVGAttributes; + feTile: SVGAttributes; + feTurbulence: SVGAttributes; + filter: SVGAttributes; + foreignObject: SVGAttributes; + g: SVGAttributes; + image: SVGAttributes; + line: SVGAttributes; + linearGradient: SVGAttributes; + marker: SVGAttributes; + mask: SVGAttributes; + metadata: SVGAttributes; + mpath: SVGAttributes; + path: SVGAttributes; + pattern: SVGAttributes; + polygon: SVGAttributes; + polyline: SVGAttributes; + radialGradient: SVGAttributes; + rect: SVGAttributes; + stop: SVGAttributes; + switch: SVGAttributes; + symbol: SVGAttributes; + text: SVGAttributes; + textPath: SVGAttributes; + tspan: SVGAttributes; + use: SVGAttributes; + view: SVGAttributes; } - export interface Events { - // clipboard events - onCopy: ClipboardEvent - onCut: ClipboardEvent - onPaste: ClipboardEvent - - // composition events - onCompositionend: CompositionEvent - onCompositionstart: CompositionEvent - onCompositionupdate: CompositionEvent - - // drag drop events - onDrag: DragEvent - onDragend: DragEvent - onDragenter: DragEvent - onDragexit: DragEvent - onDragleave: DragEvent - onDragover: DragEvent - onDragstart: DragEvent - onDrop: DragEvent - - // focus events - onFocus: FocusEvent - onFocusin: FocusEvent - onFocusout: FocusEvent - onBlur: FocusEvent - - // form events - onChange: Event - onBeforeinput: Event - onInput: Event - onReset: Event - onSubmit: Event - onInvalid: Event - - // image events - onLoad: Event - onError: Event - - // keyboard events - onKeydown: KeyboardEvent - onKeypress: KeyboardEvent - onKeyup: KeyboardEvent - - // mouse events - onAuxclick: MouseEvent - onClick: MouseEvent - onContextmenu: MouseEvent - onDblclick: MouseEvent - onMousedown: MouseEvent - onMouseenter: MouseEvent - onMouseleave: MouseEvent - onMousemove: MouseEvent - onMouseout: MouseEvent - onMouseover: MouseEvent - onMouseup: MouseEvent - - // media events - onAbort: Event - onCanplay: Event - onCanplaythrough: Event - onDurationchange: Event - onEmptied: Event - onEncrypted: Event - onEnded: Event - onLoadeddata: Event - onLoadedmetadata: Event - onLoadstart: Event - onPause: Event - onPlay: Event - onPlaying: Event - onProgress: Event - onRatechange: Event - onSeeked: Event - onSeeking: Event - onStalled: Event - onSuspend: Event - onTimeupdate: Event - onVolumechange: Event - onWaiting: Event - - // selection events - onSelect: Event - - // UI events - onScroll: UIEvent - - // touch events - onTouchcancel: TouchEvent - onTouchend: TouchEvent - onTouchmove: TouchEvent - onTouchstart: TouchEvent - - // pointer events - onPointerdown: PointerEvent - onPointermove: PointerEvent - onPointerup: PointerEvent - onPointercancel: PointerEvent - onPointerenter: PointerEvent - onPointerleave: PointerEvent - onPointerover: PointerEvent - onPointerout: PointerEvent - - // wheel events - onWheel: WheelEvent - - // animation events - onAnimationstart: AnimationEvent - onAnimationend: AnimationEvent - onAnimationiteration: AnimationEvent - - // transition events - onTransitionend: TransitionEvent - onTransitionstart: TransitionEvent + onCopy: ClipboardEvent; + onCut: ClipboardEvent; + onPaste: ClipboardEvent; + onCompositionend: CompositionEvent; + onCompositionstart: CompositionEvent; + onCompositionupdate: CompositionEvent; + onDrag: DragEvent; + onDragend: DragEvent; + onDragenter: DragEvent; + onDragexit: DragEvent; + onDragleave: DragEvent; + onDragover: DragEvent; + onDragstart: DragEvent; + onDrop: DragEvent; + onFocus: FocusEvent; + onFocusin: FocusEvent; + onFocusout: FocusEvent; + onBlur: FocusEvent; + onChange: Event; + onBeforeinput: Event; + onInput: Event; + onReset: Event; + onSubmit: Event; + onInvalid: Event; + onLoad: Event; + onError: Event; + onKeydown: KeyboardEvent; + onKeypress: KeyboardEvent; + onKeyup: KeyboardEvent; + onAuxclick: MouseEvent; + onClick: MouseEvent; + onContextmenu: MouseEvent; + onDblclick: MouseEvent; + onMousedown: MouseEvent; + onMouseenter: MouseEvent; + onMouseleave: MouseEvent; + onMousemove: MouseEvent; + onMouseout: MouseEvent; + onMouseover: MouseEvent; + onMouseup: MouseEvent; + onAbort: Event; + onCanplay: Event; + onCanplaythrough: Event; + onDurationchange: Event; + onEmptied: Event; + onEncrypted: Event; + onEnded: Event; + onLoadeddata: Event; + onLoadedmetadata: Event; + onLoadstart: Event; + onPause: Event; + onPlay: Event; + onPlaying: Event; + onProgress: Event; + onRatechange: Event; + onSeeked: Event; + onSeeking: Event; + onStalled: Event; + onSuspend: Event; + onTimeupdate: Event; + onVolumechange: Event; + onWaiting: Event; + onSelect: Event; + onScroll: UIEvent; + onTouchcancel: TouchEvent; + onTouchend: TouchEvent; + onTouchmove: TouchEvent; + onTouchstart: TouchEvent; + onPointerdown: PointerEvent; + onPointermove: PointerEvent; + onPointerup: PointerEvent; + onPointercancel: PointerEvent; + onPointerenter: PointerEvent; + onPointerleave: PointerEvent; + onPointerover: PointerEvent; + onPointerout: PointerEvent; + onWheel: WheelEvent; + onAnimationstart: AnimationEvent; + onAnimationend: AnimationEvent; + onAnimationiteration: AnimationEvent; + onTransitionend: TransitionEvent; + onTransitionstart: TransitionEvent; } - type EventHandlers<E> = { - [K in keyof E]?: E[K] extends Function ? E[K] : (payload: E[K]) => void -} + [K in keyof E]?: E[K] extends (...args: any) => any ? E[K] : (payload: E[K]) => void; +}; -// use namespace import to avoid collision with generated types which use -// named imports. -import * as RuntimeCore from '@vue/runtime-core' - -type ReservedProps = { - key?: string | number | symbol - ref?: RuntimeCore.VNodeRef - ref_for?: boolean - ref_key?: string -} - -type ElementAttrs<T> = T & ReservedProps - -type NativeElements = { - [K in keyof IntrinsicElementAttributes]: ElementAttrs< - IntrinsicElementAttributes[K] - > -} - -declare global { - namespace JSX { - interface Element extends VNode {} - interface ElementClass { - $props: {} - } - interface ElementAttributesProperty { - $props: {} - } - interface IntrinsicElements extends NativeElements { - // allow arbitrary elements - // @ts-ignore suppress ts:2374 = Duplicate string index signature. - [name: string]: any - } - interface IntrinsicAttributes extends ReservedProps {} - } -} - -// suppress ts:2669 -export {} - -// Note: this file is auto concatenated to the end of the bundled d.ts during -// build. +export type ReservedProps = { + key?: string | number | symbol; + ref?: VNodeRef; + ref_for?: boolean; + ref_key?: string; +}; +export type NativeElements = { + [K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] & ReservedProps; +}; declare module '@vue/reactivity' { - export interface RefUnwrapBailTypes { - runtimeDOMBailTypes: Node | Window - } + interface RefUnwrapBailTypes { + runtimeDOMBailTypes: Node | Window; + } } +export declare const render: RootRenderFunction<Element | ShadowRoot>; +export declare const hydrate: RootHydrateFunction; +export declare const createApp: CreateAppFunction<Element>; +export declare const createSSRApp: CreateAppFunction<Element>; + diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js index cb30ee6e..fd084d54 100644 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js +++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js @@ -1,10839 +1,11058 @@ /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ +* @vue/runtime-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } -const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; -const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - -/** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); -/** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ -function includeBooleanAttr(value) { - return !!value || value === ''; -} - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -// These tag configs are shared between compiler-dom and runtime-dom, so they -// https://developer.mozilla.org/en-US/docs/Web/HTML/Element -const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; -// https://developer.mozilla.org/en-US/docs/Web/SVG/Element -const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); - -function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); -} - -/** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ -const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); -}; -const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; - -const EMPTY_OBJ = Object.freeze({}) - ; +const EMPTY_OBJ = Object.freeze({}) ; const EMPTY_ARR = Object.freeze([]) ; -const NOOP = () => { }; -/** - * Always return false. - */ +const NOOP = () => { +}; const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const isModelListener = (key) => key.startsWith('onUpdate:'); +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === '[object Map]'; -const isSet = (val) => toTypeString(val) === '[object Set]'; -const isDate = (val) => toTypeString(val) === '[object Date]'; -const isFunction = (val) => typeof val === 'function'; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; -const isPlainObject = (val) => toTypeString(val) === '[object Object]'; -const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; -const isReservedProp = /*#__PURE__*/ makeMap( -// the leading comma is intentional so empty string "" is also included -',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); -const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; -/** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -/** - * @private - */ -const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); -// compare whether a value has changed, accounting for NaN. +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; -function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; +}; + +function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } -const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -const wasTracked = (dep) => (dep.w & trackOpBit) > 0; -const newTracked = (dep) => (dep.n & trackOpBit) > 0; -const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } -}; -const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } -}; - -const targetMap = new WeakMap(); -// The number of effects currently being tracked recursively. -let effectTrackDepth = 0; -let trackOpBit = 1; -/** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ -const maxMarkerBits = 30; let activeEffect; -const ITERATE_KEY = Symbol('iterate' ); -const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } -function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; +function triggerComputed(computed) { + return computed.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; +let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } +function pauseScheduling() { + pauseScheduleStack++; } -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } +} +const queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } -function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } -} -function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } +function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } -const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); +const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; +}; + +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol("iterate" ); +const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( -/*#__PURE__*/ -Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); -const get = /*#__PURE__*/ createGetter(); -const shallowGet = /*#__PURE__*/ createGetter(false, true); -const readonlyGet = /*#__PURE__*/ createGetter(true); -const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); -const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; -} -const set = /*#__PURE__*/ createSetter(); -const shallowSet = /*#__PURE__*/ createSetter(true); -function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } -function deleteProperty(target, key) { +function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; -} -function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; -} -function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } -const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys -}; -const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } -}; -const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet -}); -// Props handlers are special in the sense that it should not unwrap top-level -// refs (in order to allow refs to be explicitly passed down), but should -// retain the reactivity of the normal readonly object. -const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet -}); + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true +); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); -function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); +function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } -function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); +function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } -function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } -const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } -const reactiveMap = new WeakMap(); -const shallowReactiveMap = new WeakMap(); -const readonlyMap = new WeakMap(); -const shallowReadonlyMap = new WeakMap(); +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } -/** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } -/** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } -/** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } -function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; -function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } +class ComputedRefImpl { + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); + } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } -function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } -} -function isRef(r) { - return !!(r && r.__v_isRef === true); -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } -} -function triggerRef(ref) { - triggerRefValue(ref, ref.value ); -} -function unref(ref) { - return isRef(ref) ? ref.value : ref; -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } -} -function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; } -class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; - } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); - } +function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } } -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; +function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } } +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); + } + } +} +function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; const stack = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack.push(vnode); } function popWarningContext() { - stack.pop(); + stack.pop(); } function warn$1(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } -/* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } -/* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } -/* istanbul ignore next */ function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } } -const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; -const pendingPreFlushCbs = []; -let activePreFlushCbs = null; -let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; -const resolvedPromise = /*#__PURE__*/ Promise.resolve(); +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; -let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } -// #2768 -// Use binary-search to find a suitable position in the queue, -// so that the queue maintains the increasing order of job's id, -// which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } -} -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} -function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } -function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); -} -function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - { - seen = seen || new Map(); - } - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) { - continue; - } - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; +const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; +}; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - { - seen = seen || new Map(); - } - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = (job) => checkRecursiveUpdates(seen, job) - ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (true && check(job)) { - continue; - } - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; } + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); } + } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } - else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`); - return true; - } - else { - seen.set(fn, count + 1); - } + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); } + } } -/* eslint-disable no-restricted-globals */ let isHmrUpdating = false; -const hmrDirtyComponents = new Set(); -// Expose the HMR runtime on the global object -// This makes it entirely tree-shakable without polluting the exports and makes -// it easier to be used in toolings like vue-loader -// Note: for a component to be eligible for HMR it also needs the __hmrId option -// to be set so that its instances can be registered / removed. +const hmrDirtyComponents = /* @__PURE__ */ new Set(); { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; } -const map = new Map(); +const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); } function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); + map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: new Set() - }); - return true; + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; } function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; + return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; } - // update initial record (for not-yet-rendered component) - record.initialDef.render = newRender; - [...record.instances].forEach(instance => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - // this flag forces child components with slot content to update - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); } function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - // update initial def (for not-yet-rendered components) - updateComponentDef(record.initialDef, newComp); - // create a snapshot which avoids the set being mutated during updates - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - // 1. Update existing comp definition to match new one - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - // 2. mark definition dirty. This forces the renderer to replace the - // component on patch. - hmrDirtyComponents.add(oldComp); - } - // 3. invalidate options resolution cache - instance.appContext.optionsCache.delete(instance.type); - // 4. actually update - if (instance.ceReload) { - // custom element - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } - else if (instance.parent) { - // 4. Force the parent instance to re-render. This will cause all updated - // components to be unmounted and re-mounted. Queue the update so that we - // don't end up forcing the same parent to re-render multiple times. - queueJob(instance.parent.update); - // instance is the inner component of an async custom element - // invoke to reset styles - if (instance.parent.type.__asyncLoader && - instance.parent.ceReload) { - instance.parent.ceReload(newComp.styles); - } - } - else if (instance.appContext.reload) { - // root instance mounted via createApp() has a reload method - instance.appContext.reload(); - } - else if (typeof window !== 'undefined') { - // root instance inside tree created via raw render(). Force reload. - window.location.reload(); - } - else { - console.warn('[HMR] Root or manually mounted instance modified. Full reload required.'); - } + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); } - // 5. make sure to cleanup dirty hmr components after update - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); - } - }); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); } function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== '__file' && !(key in newComp)) { - delete oldComp[key]; - } + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; } + } } function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } - catch (e) { - console.error(e); - console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` + - `Full reload required.`); - } - }; + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; } -let devtools; +let devtools$1; let buffer = []; let devtoolsNotInstalled = false; -function emit(event, ...args) { - if (devtools) { - devtools.emit(event, ...args); - } - else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } } -function setDevtoolsHook(hook, target) { - var _a, _b; - devtools = hook; - if (devtools) { - devtools.enabled = true; - buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); - buffer = []; - } - else if ( +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( // handle late devtools injection - only do this if we are in an actual // browser environment to avoid the timer handle stalling test runner exit // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3000); - } - else { - // non-browser env, assume not installed + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; - } + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } } function devtoolsInitApp(app, version) { - emit("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); } function devtoolsUnmountApp(app) { - emit("app:unmount" /* APP_UNMOUNT */, app); + emit$1("app:unmount" /* APP_UNMOUNT */, app); } -const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = -/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const devtoolsComponentRemoved = -/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */); +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ +); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; function createDevtoolsComponentHook(hook) { - return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component); - }; + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; } -const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ +); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ +); function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); - }; + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params); + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); } -function emit$1(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { emitsOptions, propsOptions: [propsOptions] } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && - !(false )) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1(`Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "${toHandlerKey(event)}" prop.`); - } - } - else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1(`Invalid event arguments: event validation failed for event "${event}".`); - } - } - } +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); } - } - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(toNumber); + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } } + } } - { - devtoolsComponentEmit(instance, event, args); + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1(`Event "${lowerCaseEvent}" is emitted in component ` + - `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` + - `Note that HTML attributes are case-insensitive and you cannot use ` + - `v-on to listen to camelCase events when using in-DOM templates. ` + - `You should probably use "${hyphenate(event)}" instead of "${event}".`); - } + if (number) { + args = rawArgs.map(looseToNumber); } - let handlerName; - let handler = props[(handlerName = toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = toHandlerKey(camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = toHandlerKey(hyphenate(event)))]; + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } -// Check if an incoming prop key is a declared emit event listener. -// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are -// both considered matched listeners. function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - hasOwn(options, hyphenate(key)) || - hasOwn(options, key)); + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } -/** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; -/** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } -/** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } -/** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } -/** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; -/** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only -) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } -/** - * dev only flag to track whether $attrs was used during render. - * If $attrs was used during render then the warning for failed attrs - * fallthrough can be suppressed. - */ let accessedAttrs = false; function markAttrsAccessed() { - accessedAttrs = true; + accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if (true && attrs === props) { - markAttrsAccessed(); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } - result = normalizeVNode(render.length > 1 - ? render(props, true - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + } else { + extraAttrs.push(key); + } } - } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - let setRoot = undefined; - if (result.patchFlag > 0 && - result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - // ignore v-model handlers when they fail to fallthrough - if (!isModelListener(key)) { - // remove `on`, lowercase first letter to reflect event casing - // accurately - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } - else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1(`Extraneous non-props attributes (` + - `${extraAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes.`); - } - if (eventAttrs.length) { - warn$1(`Extraneous non-emits event listeners (` + - `${eventAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes. ` + - `If the listener is intended to be a component custom event listener only, ` + - `declare it using the "emits" option.`); - } - } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); } - } - // inherit directives - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1(`Runtime directive used on component with non-element root node. ` + - `The directives will not function as intended.`); + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); } - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } } - // inherit transition data - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1(`Component inside <Transition> renders non-element root node ` + - `that cannot be animated.`); - } - root.transition = vnode.transition; + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); } - if (setRoot) { - setRoot(root); + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); } - else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } -/** - * dev only - * In dev mode, template root level comments are rendered, which turns the - * template into a fragment root, but we need to locate the single element - * root for attrs and scope id processing. - */ const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, undefined]; + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } - else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; + }; + return [normalizeVNode(childRoot), setRoot]; }; -function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; const isElementRoot = (vnode) => { - return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) || - vnode.type === Comment // potential v-if branch switch - ); + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // Parent component's render function was hot-updated. Since this may have - // caused the child component's slots content to have changed, we need to - // force the child to update as well. - if ((prevChildren || nextChildren) && isHmrUpdating) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { - return true; + if (prevProps === nextProps) { + return false; } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (!prevProps) { + return !!nextProps; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!nextProps) { + return true; } - return false; + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } -function updateHOCHostEl({ vnode, parent }, el // HostNode -) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } const isSuspense = (type) => type.__isSuspense; -// Suspense exposes a component-like API, and is treated like a component -// in the compiler, but internally it's a special built-in type that hooks -// directly into the renderer. +let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren }; -// Force-casted public typing for h and TSX props inference -const Suspense = (SuspenseImpl ); +const Suspense = SuspenseImpl ; function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } } -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); } + } } + } } let hasWarned = false; -function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - /* istanbul ignore if */ - if (!hasWarned) { - hasWarned = true; - // @ts-ignore `console.info` cannot be null error - console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`); +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; } - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error(`suspense.resolve() is called without a pending branch.`); - } - if (suspense.isUnmounted) { - throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`); - } - } - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - { - pushWarningContext(vnode); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - { - popWarningContext(); - } - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } } - return result; - /* eslint-enable no-restricted-globals */ + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); } - return s; + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } -function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); } - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else { - warn$1(`injection "${String(key)}" not found.`); - } - } - else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } -} + return ctx; + } +}; -// Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); } -// initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; -// implementation function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` + - `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` + - `supports \`watch(source, cb, options?) signature.`); - } - return doWatch(source, cb, options); + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); } -function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - if (!cb) { - if (immediate !== undefined) { - warn$1(`watch() "immediate" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - if (deep !== undefined) { - warn$1(`watch() "deep" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - } - const warnInvalidSource = (s) => { - warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.`); +function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger +} = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isReactive(source)) { - getter = () => source; - deep = true; + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => isReactive(s) || isShallow(s)); - getter = () => source.map(s => { - if (isRef(s)) { - return s.value; - } - else if (isReactive(s)) { - return traverse(s); - } - else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else { - warnInvalidSource(s); - } - }); + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; - }; - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => hasChanged(v, oldValue[i])) - : hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new ReactiveEffect(getter, scheduler); - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - // initial run + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect); - } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + return unwatch; } -// this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } -function traverse(value, seen) { - if (!isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } +function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey$1 = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - // warn more than one non-comment child - warn$1('<transition> can only be used on a single element or component. ' + - 'Use <transition-group> for lists.'); - break; - } - child = c; - hasFound = true; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = toRaw(props); - const { mode } = rawProps; - // check mode - if (mode && - mode !== 'in-out' && - mode !== 'out-in' && - mode !== 'default') { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } -// The transition hooks are attached to the vnode as vnode.transition -// and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; -} -// the placeholder really only handles one special case: KeepAlive -// in the case of a KeepAlive in a leave phase we need to return a KeepAlive -// placeholder with empty content to avoid the KeepAlive instance from being -// unmounted. -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } -// implementation, close to no-op -function defineComponent(options) { - return isFunction(options) ? { setup: options, name: options.name } : options; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1(`Async component loader resolved to undefined. ` + - `If you are using retry(), make sure to return its return value.`); - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (false )) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } -function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - const cache = new Map(); - const keys = new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; - } - else { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')); - warn$1(`${apiName} is called when there is no active component instance to be ` + - `associated with. ` + - `Lifecycle injection APIs can only be used during execution of setup().` + - (` If you are using async setup(), make sure to register lifecycle ` + - `hooks before the first await statement.` - )); + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } } -const createHook = (lifecycle) => (hook, target = currentInstance) => -// post-create lifecycle registrations are noops during SSR (except for serverPrefetch) -(!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); -const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); -const onMounted = createHook("m" /* MOUNTED */); -const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); -const onUpdated = createHook("u" /* UPDATED */); -const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); -const onUnmounted = createHook("um" /* UNMOUNTED */); -const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); -const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); -const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); +const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) +); +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook("bu"); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook("bum"); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook("sp"); +const onRenderTriggered = createHook( + "rtg" +); +const onRenderTracked = createHook( + "rtc" +); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } -/** -Runtime helper for applying directives to a vnode. Example usage: - -const comp = resolveComponent('comp') -const foo = resolveDirective('foo') -const bar = resolveDirective('bar') - -return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] -]) -*/ -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1('Do not use built-in directive ids as custom directive id: ' + name); - } -} -/** - * Adds directives to a VNode. - */ -function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} - -const COMPONENTS = 'components'; -const DIRECTIVES = 'directives'; -/** - * @private - */ -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol(); -/** - * @private - */ -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } -} -/** - * @private - */ -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -// implementation -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === camelize(name) || - selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS - ? `\nIf this is a native custom element, make sure to exclude it from ` + - `component resolution via compilerOptions.isCustomElement.` - : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } - else { - warn$1(`resolve${capitalize(type.slice(0, -1))} ` + - `can only be used in render() or setup().`); - } -} -function resolve(registry, name) { - return (registry && - (registry[name] || - registry[camelize(name)] || - registry[capitalize(camelize(name))])); -} - -/** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); } - else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else { - ret = []; + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } -/** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } -/** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ -function renderSlot(slots, name, props = {}, -// this is not a user-facing function, so the fallback is always generated by -// the compiler and guaranteed to be a function returning an array -fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` + - `function. You need to mark this component with $dynamic-slots in the ` + - `parent template.`); - slot = () => []; - } - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } -/** - * For prefixing keys in v-on="obj" with "on" - * @private - */ -function toHandlers(obj) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[toHandlerKey(key)] = obj[key]; - } +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; } -/** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; -const publicPropertiesMap = -// Move PURE marker to new line to workaround compiler discarding it -// due to type annotation -/*#__PURE__*/ extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => (shallowReadonly(i.props) ), - $attrs: i => (shallowReadonly(i.attrs) ), - $slots: i => (shallowReadonly(i.slots) ), - $refs: i => (shallowReadonly(i.refs) ), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (resolveMergedOptions(i) ), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (instanceWatch.bind(i) ) -}); -const isReservedPrefix = (key) => key === '_' || key === '$'; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // for internal formatters to know that this is a Vue instance - if (key === '__isVue') { - return true; - } - // prioritize <script setup> bindings during dev. - // this allows even properties that start with _ or $ to be used - so that - // it aligns with the production behavior where the render fn is inlined and - // indeed has access to all declared variables. - if (setupState !== EMPTY_OBJ && - setupState.__isScriptSetup && - hasOwn(setupState, key)) { - return setupState[key]; - } - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - track(instance, "get" /* GET */, key); - markAttrsAccessed(); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else if (currentRenderingInstance && - (!isString(key) || - // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf('__v') !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` + - `character ("$" or "_") and is not proxied on the render context.`); - } - else if (instance === currentRenderingInstance) { - warn$1(`Property ${JSON.stringify(key)} was accessed during render ` + - `but is not defined on instance.`); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance); - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - warn$1(`Attempting to mutate public property "${key}". ` + - `Properties starting with $ are reserved and readonly.`, instance); - return false; - } - else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } - else { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== EMPTY_OBJ && hasOwn(data, key)) || - (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) || - hasOwn(ctx, key) || - hasOwn(publicPropertiesMap, key) || - hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } }; { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` + - `The keys will be empty in production mode to avoid performance overhead.`); - return Reflect.ownKeys(target); - }; + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; } -const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, PublicInstanceProxyHandlers, { +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend( + {}, + PublicInstanceProxyHandlers, + { get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !isGloballyWhitelisted(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`); - } - return has; + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } -}); -// dev only -// In dev mode, the proxy target exposes the same properties as seen on `this` -// for easier console inspection. In prod mode it will be an empty object so -// these properties definitions can be skipped. + } +); function createDevRenderContext(instance) { - const target = {}; - // expose internal instance for proxy handlers - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP }); - // expose public properties - Object.keys(publicPropertiesMap).forEach(key => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; + }); + return target; } -// dev only function exposePropsOnRenderContext(instance) { - const { ctx, propsOptions: [propsOptions] } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach(key => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } -} -// dev only -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach(key => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` + - `which are reserved prefixes for Vue internals.`); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (isArray(a) && isArray(b)) + return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; } function createDuplicateChecker() { - const cache = Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } - else { - cache[key] = type; - } - }; + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; } let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } } - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } - else { - warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` + - `Did you reference the function correctly?`); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1(`The data option must be a function. ` + - `Plain object usage is no longer supported.`); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1(`data() returned a Promise - note data() cannot be async; If you ` + - `intend to perform data fetching before component renders, use ` + - `async setup() + <Suspense>.`); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } - else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - // expose data on ctx during dev - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) - ? opt.bind(publicThis, publicThis) - : isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) - ? opt.set.bind(publicThis) - : () => { - warn$1(`Write operation failed: computed property "${key}" is readonly.`); - } - ; - const c = computed$1({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - { - warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` + - `and no longer needs \`.value\` in the next minor release. ` + - `To opt-in to the new behavior now, ` + - `set \`app.config.unwrapInjectedRef = true\` (this config is ` + - `temporary and will not be needed in the future.)`); - } - ctx[key] = injected; - } - } - else { - ctx[key] = injected; + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); } { - checkDuplicateProperties("Inject" /* INJECT */, key); + checkDuplicateProperties("Methods" /* METHODS */, key); } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; } -function callHook(hook, instance, type) { - callWithAsyncErrorHandling(isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - watch(getter, handler); - } - else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + watch(getter, handler); + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } - else if (isFunction(raw)) { - watch(getter, raw.bind(publicThis)); - } - else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } - else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } - else { - warn$1(`Invalid watch option: "${key}"`, raw); + } else if (isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } } -/** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') { - warn$1(`"expose" option is ignored when declared in mixins or extends. ` + - `It should only be declared in the base component itself.`); - } - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend(extend(Object.create(null), to), from) : from; + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; } -function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison -isSSR = false) { - const props = {}; - const attrs = {}; - def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; - } +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); } - // validation + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { { - validateProps(rawProps || {}, props, instance); + warn$1(`provide() can only be used inside setup().`); } - if (isStateful) { - // stateful - instance.props = isSSR ? props : shallowReactive(props); + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; - } - else { - // functional w/ declared props - instance.props = props; - } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); } - instance.attrs = attrs; + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !((instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId))) && - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - trigger(instance, "set" /* SET */, '$attrs'); - } - { - validateProps(rawProps || {}, props, instance); - } + } + if (hasAttrsChanged) { + trigger(instance, "set", "$attrs"); + } + { + validateProps(rawProps || {}, props, instance); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && hasOwn(options, (camelKey = camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, EMPTY_ARR); - return EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); } - else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - isArray(opt) || isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } } - const res = [normalized, needCastKeys]; + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; + if (key[0] !== "$") { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; } -// use function string name to check type constructors -// so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } -/** - * dev only - */ function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - for (const key in options) { - let opt = options[key]; - if (opt == null) - continue; - validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))); - } + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)) + ); + } } -/** - * dev only - */ -function validateProp(name, value, prop, isAbsent) { - const { type, required, validator } = prop; - // required! - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; } - // missing but optional - if (value == null && !prop.required) { - return; - } - // type check - if (type != null && type !== true) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - // value is valid as long as one of the specified types match - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ''); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - // custom validator - if (validator && !validator(value)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } } -const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt'); -/** - * dev only - */ +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; } - else if (expectedType === 'Object') { - valid = isObject(value); - } - else if (expectedType === 'Array') { - valid = isArray(value); - } - else if (expectedType === 'null') { - valid = value === null; - } - else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; } -/** - * dev only - */ function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid prop: type check failed for prop "${name}".` + - ` Expected ${expectedTypes.map(capitalize).join(' | ')}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; } -/** - * dev only - */ function styleValue(value, type) { - if (type === 'String') { - return `"${value}"`; - } - else if (type === 'Number') { - return `${Number(value)}`; - } - else { - return `${value}`; - } + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } } -/** - * dev only - */ function isExplicable(type) { - const explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(elem => type.toLowerCase() === elem); + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); } -/** - * dev only - */ function isBoolean(...args) { - return args.some(elem => elem.toLowerCase() === 'boolean'); + return args.some((elem) => elem.toLowerCase() === "boolean"); } -const isInternalKey = (key) => key[0] === '_' || key === '$stable'; -const normalizeSlotValue = (value) => isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); } - const normalized = withCtx((...args) => { - if (currentInstance) { - warn$1(`Slot "${key}" invoked outside of the render function: ` + - `this will not track dependencies used in the slot. ` + - `Invoke the slot function inside the render function instead.`); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - { - warn$1(`Non-function value encountered for slot "${key}". ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && - !(false )) { - warn$1(`Non-function value encountered for default slot. ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = toRaw(children); - // make compiler marker non-enumerable - def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = toRaw(children); + def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - def(instance.slots, InternalObjectKey, 1); + } + def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if (isHmrUpdating) { - // Parent was HMR updated so slot content may have changed. - // force update slots and mark instance for hmr as well - extend(slots, children); - } - else if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + extend(slots, children); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; -function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; -} -let uid = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = Object.assign({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1(`app.config cannot be replaced. Modify individual options instead.`); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } - else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else { - warn$1(`A plugin must either be a function or an object with an "install" ` + - `function.`); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - else { - warn$1('Mixin has already been applied to target app' + - (mixin.name ? `: ${mixin.name}` : '')); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - // #5571 - if (rootContainer.__vue_app__) { - warn$1(`There is already an app instance mounted on the host container.\n` + - ` If you want to mount another app on the same host container,` + - ` you need to unmount the previous app by calling \`app.unmount()\` first.`); - } - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - // HMR root reload - { - context.reload = () => { - render(cloneVNode(vnode), rootContainer, isSVG); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - else { - warn$1(`App has already been mounted.\n` + - `If you want to remount the same app, move your app creation logic ` + - `into a factory function and create fresh app instances for each ` + - `mount - e.g. \`const createMyApp = () => createApp(App)\``); - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } - else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1(`App already provides property with key "${String(key)}". ` + - `It will be overwritten with the new value.`); - } - context.provides[key] = value; - return app; - } - }); - return app; - }; -} - -/** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + - `A vnode with ref must be created inside the render function.`); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } + } + } else if (_isString) { + refs[ref] = value; + if (hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } - else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } - else if (_isString) { - refs[ref] = value; - if (hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } - else { - doSet(); - } - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } + } } let hasMismatch = false; -const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; +}; const isComment = (node) => node.nodeType === 8 /* COMMENT */; -// Note: hydration is DOM-specific -// But we have to place it in core due to tight coupling with core - splitting -// it out creates a ton of unnecessary complexity. -// Hydration also depends on some renderer internal logic which needs to be -// passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1(`Attempting to hydrate existing markup but container is empty. ` + - `Performing full mount instead.`); - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text mismatch:` + - `\n- Client: ${JSON.stringify(node.data)}` + - `\n- Server: ${JSON.stringify(vnode.children)}`); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else { - warn$1('Invalid HostVNode type:', type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (isOn(key) && !isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + if (!("__vnode" in node)) { + Object.defineProperty(node, "__vnode", { + value: vnode, + enumerable: false + }); + } + if (!("__vueParentComponent" in node)) { + Object.defineProperty(node, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + hasMismatch = true; + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + el.textContent = vnode.children; + } + } + if (props) { + { + for (const key in props) { + if (propHasMismatch(el, key, props[key], vnode)) { + hasMismatch = true; + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - return node; - }; - return [hydrate, hydrateNode]; + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style"); + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = `attribute`; + mismatchKey = key; + } + } + if (mismatchType) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${mismatchType} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key == null ? void 0 : key.trim(); + value = value == null ? void 0 : value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; } -/* eslint-disable no-restricted-globals */ let supported; let perf; function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } } function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } } function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } + if (supported !== void 0) { return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; } -const queuePostRenderEffect = queueEffectWithSuspense - ; -/** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ +const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } -// Separate API for creating hydration-enabled renderer. -// Hydration logic is only used when calling this function, making it -// tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } -// implementation function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else { - warn$1('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); } + } } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); } - else { - // there's no support for dynamic comments - n2.el = n1.el; + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); + } + for (const key in newProps) { + if (isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); } - { - Object.defineProperty(el, '__vnode', { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, '__vueParentComponent', { - value: parentComponent, - enumerable: false - }); + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && - subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - subTree = - filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - // HMR updated, force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (// #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) { - // HMR updated / Dev root fragment (w/ comments), force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { { - startMeasure(instance, `init`); + startMeasure(instance, `render`); } - setupComponent(instance); + instance.subTree = renderComponentRoot(instance); { - endMeasure(instance, `init`); + endMeasure(instance, `render`); } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); return; + } } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); + let originNext = next; + let vnodeHook; { - popWarningContext(); - endMeasure(instance, `mount`); + pushWarningContext(next || instance.vnode); } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - // async & still pending - just update props and slots - // since the component's reactive effect for render isn't set-up yet - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - { - startMeasure(instance, `render`); - } - const subTree = (instance.subTree = renderComponentRoot(instance)); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - // render - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates toggleRecurse(instance, true); { - effect.onTrack = instance.rtc - ? e => invokeArrayFns(instance.rtc, e) - : void 0; - effect.onTrigger = instance.rtg - ? e => invokeArrayFns(instance.rtg, e) - : void 0; - update.ownerInstance = instance; + startMeasure(instance, `render`); } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); + if (u) { + queuePostRenderEffect(u, parentSuspense); } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); - } - }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && - vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ && - transition && - !transition.persisted) { - vnode.children.forEach(child => { - if (child.type === Comment) { - hostRemove(child.el); - } - else { - remove(child); - } - }); - } - else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); } { - devtoolsComponentRemoved(instance); + devtoolsComponentUpdated(instance); } + { + popWarningContext(); + } + } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } + const effect = instance.effect = new ReactiveEffect( + componentUpdateFn, + NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + update.id = instance.uid; + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } -/** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } - // also inherit for comment nodes, but not placeholders (e.g. v-if which - // would have received .el during block patch) - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } } + } } -// https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); -const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1(`Current renderer does not support string target for Teleports. ` + - `(missing querySelector renderer option)`); - return null; - } - else { - const target = select(targetSelector); - if (!target) { - warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` + - `Note the target element must exist before the component is mounted - ` + - `i.e. the target cannot be rendered by the component itself, and ` + - `ideally should be outside of the entire Vue component tree.`); - } - return target; - } + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; } - else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); } + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - // #3302 - // HMR updated, force full diff - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = createComment('teleport start') - ); - const mainAnchor = (n2.anchor = createComment('teleport end') - ); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - else if (!disabled) { - warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } - } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - else { - warn$1('Invalid Teleport target on update:', target, `(${typeof target})`); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } - } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } + } else if (!disabled) { + warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } -// Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; +function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} -const Fragment = Symbol('Fragment' ); -const Text = Symbol('Text' ); -const Comment = Symbol('Comment' ); -const Static = Symbol('Static' ); -// Since v-if and v-for are the two possible ways node structure can dynamically -// change, once we consider v-if branches and each v-for fragment a block, we -// can divide a template into nested blocks, and within each block the node -// structure would be stable. This allows us to skip most children diffing -// and only worry about the dynamic nodes (indicated by patch flags). +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; -/** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } -// Whether we should be tracking dynamic child nodes inside a block. -// Only tracks when this value is > 0 -// We are not using a simple boolean because this value may need to be -// incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; -/** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } -/** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } -/** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 /* COMPONENT */ && - hmrDirtyComponents.has(n2.type)) { - // HMR only: if the component has been hot-updated, force a reload. - return false; - } - return n1.type === n2.type && n1.key === n2.key; + if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; } let vnodeArgsTransformer; -/** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; + vnodeArgsTransformer = transformer; } const createVNodeWithArgsTransform = (...args) => { - return _createVNode(...(vnodeArgsTransformer - ? vnodeArgsTransformer(args, currentRenderingInstance) - : args)); + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); }; const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? isString(ref) || isRef(ref) || isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // validate key - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } -const createVNode = (createVNodeWithArgsTransform ); +const createVNode = createVNodeWithArgsTransform ; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); } - // encode the vnode type information into a bitmap - const shapeFlag = isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) { - type = toRaw(type); - warn$1(`Vue received a Component which was made a reactive object. This can ` + - `lead to unnecessary performance overhead, and should be avoided by ` + - `marking the component with \`markRaw\` or using \`shallowRef\` ` + - `instead of \`ref\`.`, `\nComponent that was made reactive: `, type); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); } - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return isProxy(props) || InternalObjectKey in props - ? extend({}, props) - : props; + if (!props) + return null; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 /* HOISTED */ && isArray(children) - ? children.map(deepCloneVNode) - : children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } -/** - * Dev only, for HMR of hoisted vnodes reused in v-for - * https://github.com/vitejs/vite/issues/2022 - */ function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; } -/** - * @private - */ -function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } -/** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } -/** - * @private - */ -function createCommentVNode(text = '', -// when used as the v-else branch, the comment node must be created as a -// block to ensure correct updates. -asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } -// optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } - else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); -let uid$1 = 0; +let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; +} const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; -const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component'); +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); function validateComponentName(name, config) { - const appIsNativeTag = config.isNativeTag || NO; - if (isBuiltInTag(name) || appIsNativeTag(name)) { - warn$1('Do not use built-in or reserved HTML elements as component id: ' + name); - } + const appIsNativeTag = config.isNativeTag || NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } } function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1(`"compilerOptions" is only supported when using a build of Vue that ` + - `includes the runtime compiler. Since you are using a runtime-only ` + - `build, the options should be passed via your build tool config instead.`); - } + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); } - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - { - exposePropsOnRenderContext(instance); + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } } - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]); - resetTracking(); - unsetCurrentInstance(); - if (isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous'; - warn$1(`Component <${name}>: setup function returned a promise, but no ` + - `<Suspense> boundary was found in the parent component tree. ` + - `A component with async setup() must be nested in a <Suspense> ` + - `in order to be rendered.`); - } - } - } - else { - handleSetupResult(instance, setupResult, isSSR); + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + resetTracking(); + reset(); + if (isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); } + } + } else { + handleSetupResult(instance, setupResult, isSSR); } - else { - finishComponentSetup(instance, isSSR); - } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - // setup returned an inline render function - { - instance.render = setupResult; - } + if (isFunction(setupResult)) { + { + instance.render = setupResult; } - else if (isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1(`setup() should not return VNodes directly - ` + - `return a render function instead.`); - } - // setup returned bindings. - // assuming a render function compiled from template is present. - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); } - else if (setupResult !== undefined) { - warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`); + { + instance.devtoolsRawSetupState = setupResult; } - finishComponentSetup(instance, isSSR); + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); } let compile; let installWithProxy; -/** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; } -// dev only const isRuntimeOnly = () => !compile; function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend(extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); } - instance.render = (Component.render || NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); - } - } - // support for 2.x options - { - setCurrentInstance(instance); - pauseTracking(); - applyOptions(instance); - resetTracking(); - unsetCurrentInstance(); - } - // warn missing template/render - // the runtime compilation of template in SSR is done by server-render - if (!Component.render && instance.render === NOOP && !isSSR) { - /* istanbul ignore if */ - if (!compile && Component.template) { - warn$1(`Component provided template option but ` + - `runtime compilation is not supported in this build of Vue.` + - (` Use "vue.esm-browser.js" instead.` - ) /* should not happen */); - } - else { - warn$1(`Component is missing template or render function.`); - } - } -} -function createAttrsProxy(instance) { - return new Proxy(instance.attrs, { - get(target, key) { - markAttrsAccessed(); - track(instance, "get" /* GET */, '$attrs'); - return target[key]; + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } - } + compilerOptions + ), + componentCompilerOptions ); + Component.render = compile(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } +} +function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + markAttrsAccessed(); + track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } + )); +} +function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + })); } function createSetupContext(instance) { - const expose = exposed => { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - instance.exposed = exposed || {}; - }; - let attrs; + const expose = (exposed) => { { - // We use getters in dev in case libs like test-utils overwrite instance - // properties (overwrites should not be done in prod) - return Object.freeze({ - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - get slots() { - return shallowReadonly(instance.slots); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } } + instance.exposed = exposed || {}; + }; + { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } } const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); -function getComponentName(Component) { - return isFunction(Component) - ? Component.displayName || Component.name - : Component.name; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } -/* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { - return isFunction(value) && '__vccOpts' in value; + return isFunction(value) && "__vccOpts" in value; } -const computed$1 = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return computed(getterOrOptions, debugOptions, isInSSRComponentSetup); -}); - -// dev only -const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` + - `<script setup> of a single file component. Its arguments should be ` + - `compiled away and passing it at runtime has no effect.`); -// implementation -function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; -} -// implementation -function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; -} -/** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } -} -/** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ -function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -/** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ -function mergeDefaults(raw, defaults) { - const props = isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - } - return props; -} -/** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -/** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1(`withAsyncContext called without active current instance. ` + - `This is likely a bug.`); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -// Actual implementation -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -const ssrContextKey = Symbol(`ssrContext` ); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn$1(`Server rendering context not provided. Make sure to only call ` + - `useSSRContext() conditionally in the server build.`); - } - return ctx; - } +const computed = (getterOrOptions, debugOptions) => { + return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); }; -function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - if (typeof window === 'undefined') { - return; - } - const vueStyle = { style: 'color:#3ba776' }; - const numberStyle = { style: 'color:#0b1bc9' }; - const stringStyle = { style: 'color:#b62e24' }; - const keywordStyle = { style: 'color:#9d288c' }; - // custom formatter for Chrome - // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html - const formatter = { - header(obj) { - // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ['div', vueStyle, `VueInstance`]; - } - else if (isRef(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, genRefFlag(obj)], - '<', - formatValue(obj.value), - `>` - ]; - } - else if (isReactive(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'], - '<', - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } - else if (isReadonly(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'], - '<', - formatValue(obj), - '>' - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - 'div', - {}, - ...formatInstance(obj.$) - ]; - } +function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + if (!i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const camelizedName = camelize(name); + const hyphenatedName = hyphenate(name); + const res = customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) { + localValue = value; + trigger(); } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock('props', toRaw(instance.props))); + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('setup', instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('data', toRaw(instance.data))); - } - const computed = extractKeys(instance, 'computed'); - if (computed) { - blocks.push(createInstanceBlock('computed', computed)); - } - const injected = extractKeys(instance, 'inject'); - if (injected) { - blocks.push(createInstanceBlock('injected', injected)); - } - blocks.push([ - 'div', - {}, - [ - 'span', - { - style: keywordStyle.style + ';opacity:0.66' - }, - '$ (internal): ' - ], - ['object', { object: instance }] - ]); - return blocks; + } + }; + }; + return res; +} + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ['span', {}]; - } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { return [ - 'div', - { style: 'line-height:1.25em;margin-bottom:0.6em' }, - [ - 'div', - { - style: 'color:#476582' - }, - type - ], - [ - 'div', - { - style: 'padding-left:1.25em' - }, - ...Object.keys(target).map(key => { - return [ - 'div', - {}, - ['span', keywordStyle, key + ': '], - formatValue(target[key], false) - ]; - }) - ] + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + formatValue(obj.value), + `>` ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } } - function formatValue(v, asRaw = true) { - if (typeof v === 'number') { - return ['span', numberStyle, v]; - } - else if (typeof v === 'string') { - return ['span', stringStyle, JSON.stringify(v)]; - } - else if (typeof v === 'boolean') { - return ['span', keywordStyle, v]; - } - else if (isObject(v)) { - return ['object', { object: asRaw ? toRaw(v) : v }]; - } - else { - return ['span', stringStyle, String(v)]; - } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if ((isArray(opts) && opts.includes(key)) || - (isObject(opts) && key in opts)) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) { - return true; - } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); } - else { - window.devtoolsFormatters = [formatter]; + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } -// Core API ------------------------------------------------------------------ -const version = "3.2.36"; -/** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ -const ssrUtils = (null); -/** - * @internal only exposed in compat builds - */ +const version = "3.4.15"; +const warn = warn$1 ; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = devtools$1 ; +const setDevtoolsHook = setDevtoolsHook$1 ; +const ssrUtils = null; const resolveFilter = null; -/** - * @internal only exposed in compat builds. - */ -const compatUtils = (null); +const compatUtils = null; +const DeprecationTypes = null; -const svgNS = 'http://www.w3.org/2000/svg'; -const doc = (typeof document !== 'undefined' ? document : null); -const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; -// compiler should normalize class + :class bindings on the same element -// into a single binding ['staticClass', dynamic] -function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } -} - -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } -} -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } -} -const prefixes = ['Webkit', 'Moz', 'ms']; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; -} - -const xlinkNS = 'http://www.w3.org/1999/xlink'; -function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } -} - -// __UNSAFE__ -// functions. The user is responsible for using them with only trusted content. -function patchDOMProp(el, key, value, -// the following args are passed only due to potential innerHTML/textContent -// overriding existing VNodes, in which case the old tree must be properly -// unmounted. -prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - { - warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` + - `value ${value} is invalid.`, e); - } - } - needRemove && el.removeAttribute(key); -} - -// Async edge case fix requires storing an event listener's attach timestamp. -const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; -})(); -// To avoid the overhead of repeatedly calling performance.now(), we cache -// and use the same timestamp for all event listeners attached in the same tick. -let cachedNow = 0; -const p = /*#__PURE__*/ Promise.resolve(); -const reset = () => { - cachedNow = 0; -}; -const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [hyphenate(name.slice(2)), options]; -} -function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } -} - -const nativeOnRE = /^on[a-z]/; -const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (isOn(key)) { - // ignore v-model listeners - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && isString(value)) { - return false; - } - return key in el; -} - -function defineCustomElement(options, hydrate) { - const Comp = defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); -}); -const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { -}); -class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - if (this.shadowRoot) { - warn$1(`Custom element has pre-rendered declarative shadow root but is not ` + - `defined as hydratable. Use \`defineSSRCustomElement\`.`); - } - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = toNumber(value); - } - this._setProp(camelize(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = createVNode(this._def, extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // HMR - { - instance.ceReload = newStyles => { - // always reset styles - if (this._styles) { - this._styles.forEach(s => this.shadowRoot.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - // if this is an async component, ceReload is called from the inner - // component so no need to reload the async wrapper - if (!this._def.__asyncLoader) { - // reload - this._instance = null; - this._update(); - } - }; - } - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - // record for HMR - { - (this._styles || (this._styles = [])).push(s); - } - }); - } - } -} - -function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - const instance = getCurrentInstance(); - if (!instance) { - warn$1(`useCssModule must be called inside setup()`); - return EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - warn$1(`Current instance does not have CSS modules injected.`); - return EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - warn$1(`Current instance does not have CSS module named "${name}".`); - return EMPTY_OBJ; - } - return mod; - } -} - -/** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ -function useCssVars(getter) { - const instance = getCurrentInstance(); - /* istanbul ignore next */ - if (!instance) { - warn$1(`useCssVars is called without current active component instance.`); - return; - } - const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy)); - watchPostEffect(setVars); - onMounted(() => { - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); -} -function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - // drill down HOCs until it's a non-component vnode - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) { - setVarsOnNode(vnode.el, vars); - } - else if (vnode.type === Fragment) { - vnode.children.forEach(c => setVarsOnVNode(c, vars)); - } - else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) - break; - el = el.nextSibling; - } - } -} -function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - } - } -} - -const TRANSITION = 'transition'; -const ANIMATION = 'animation'; -// DOM Transition is a higher-order-component based on the platform-agnostic -// base Transition component, with DOM-specific logic. +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots); -Transition.displayName = 'Transition'; +Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; -const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ extend({}, BaseTransition.props, DOMTransitionPropsValidators)); -/** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ -const callHook$1 = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } +const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; -/** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook$1(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook$1(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook$1(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook$1(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook$1(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook$1(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook$1(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = toNumber(val); - validateDuration(res); - return res; -} -function validateDuration(val) { - if (typeof val !== 'number') { - warn$1(`<transition> explicit duration is not a valid number - ` + - `got ${JSON.stringify(val)}.`); - } - else if (isNaN(val)) { - warn$1(`<transition> explicit duration is NaN - ` + - 'the duration expression might be incorrect.'); - } + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } -// Old versions of Chromium (below 61.0.3163.100) formats floating pointer -// numbers in a locale-dependent way, using a comma instead of a dot. -// If comma is not replaced with a dot, the input will be rounded down -// (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } -// synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } -const positionMap = new WeakMap(); -const newPositionMap = new WeakMap(); -const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = children; - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - else { - warn$1(`<TransitionGroup> children must be keyed.`); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return createVNode(tag, null, children); - }; +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOldKey = Symbol("_vod"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); +function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + const setVars = () => { + const vars = getter(instance.proxy); + setVarsOnVNode(instance.subTree, vars); + updateTeleports(vars); + }; + watchPostEffect(setVars); + onMounted(() => { + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); +} +function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) + break; + el = el.nextSibling; + } + } +} +function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } +} + +function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = isString(next); + if (next && !isCssString) { + if (prev && !isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = isSpecialBooleanAttr(key); + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } +} + +function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, hydrate2) { + const Comp = defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = camelize(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = createVNode(this._def, extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + { + (this._styles || (this._styles = [])).push(s); + } + }); + } + } +} + +function useCssModule(name = "$style") { + { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssModule must be called inside setup()`); + return EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + warn(`Current instance does not have CSS modules injected.`); + return EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + warn(`Current instance does not have CSS module named "${name}".`); + return EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = children; + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else { + warn(`<TransitionGroup> children must be keyed.`); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return createVNode(tag, null, children); + }; + } +}; +const removeMode = (props) => delete props.mode; +/* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return isArray(fn) ? value => invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } -// We are exporting the v-model runtime directly as vnode hooks so that it can -// be tree-shaken in case v-model is never used. +const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (isArray(value)) { - el.checked = looseIndexOf(value, vnode.props.value) > -1; - } - else if (isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (isArray(value)) { + el.checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; -function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !isArray(value) && !isSet(value)) { - warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` + - `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`); +function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + if (isArrayValue && looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArray(value)) { - option.selected = looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } -// retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } -// retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } -const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) }; -/** - * @private - */ const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; -}; -// Kept for 2.x compat. -// Note: IE11 compat for `spacebar` and `del` is removed for now. -const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' -}; -/** - * @private - */ -const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; -}; - -const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); }; -function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; -} -const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps); -// lazy create the renderer - this makes core renderer logic tree-shakable -// in case the user only imports reactivity utilities from Vue. +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = createRenderer(rendererOptions))); + return renderer || (renderer = createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } -// use explicit type casts here to avoid import() calls in rolled-up d.ts -const render = ((...args) => { - ensureRenderer().render(...args); -}); -const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); -}); -const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; -}); -const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; -}); + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} function injectNativeTagCheck(app) { - // Inject `isNativeTag` - // this is used for component name validation (dev only) - Object.defineProperty(app.config, 'isNativeTag', { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag), - writable: false - }); + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); } -// dev only function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, 'isCustomElement', { - get() { - return isCustomElement; - }, - set() { - warn$1(`The \`isCustomElement\` config option is deprecated. Use ` + - `\`compilerOptions.isCustomElement\` instead.`); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using ` + - `a build of Vue.js that includes the runtime compiler (aka "full build"). ` + - `Since you are using the runtime-only build, \`compilerOptions\` ` + - `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` + - `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` + - `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` + - `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`; - Object.defineProperty(app.config, 'compilerOptions', { - get() { - warn$1(msg); - return compilerOptions; - }, - set() { - warn$1(msg); - } - }); - } + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } } function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn$1(`Failed to mount app: mount target selector "${container}" returned null.`); - } - return res; + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); } - if (window.ShadowRoot && - container instanceof window.ShadowRoot && - container.mode === 'closed') { - warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`); - } - return container; + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; } -/** - * @internal - */ const initDirectivesForSSR = NOOP; -export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed$1 as computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; +export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js index a54e8525..61823979 100644 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js +++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js @@ -1 +1,11 @@ -function e(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){return!!e||""===e}function r(e){if(k(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=O(o)?i(o):r(o);if(s)for(const e in s)t[e]=s[e]}return t}return O(e)||L(e)?e:void 0}const s=/;(?![^(]*\))/g,l=/:(.+)/;function i(e){const t={};return e.split(s).forEach((e=>{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function c(e){let t="";if(O(e))t=e;else if(k(e))for(let n=0;n<e.length;n++){const o=c(e[n]);o&&(t+=o+" ")}else if(L(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function a(e){if(!e)return null;let{class:t,style:n}=e;return t&&!O(t)&&(e.class=c(t)),n&&(e.style=r(n)),e}function u(e,t){if(e===t)return!0;let n=F(e),o=F(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=P(e),o=P(t),n||o)return e===t;if(n=k(e),o=k(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=u(e[o],t[o]);return n}(e,t);if(n=L(e),o=L(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!u(e[n],t[n]))return!1}}return String(e)===String(t)}function f(e,t){return e.findIndex((e=>u(e,t)))}const p=e=>O(e)?e:null==e?"":k(e)||L(e)&&(e.toString===R||!T(e.toString))?JSON.stringify(e,d,2):String(e),d=(e,t)=>t&&t.__v_isRef?d(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:A(t)?{[`Set(${t.size})`]:[...t.values()]}:!L(t)||k(t)||I(t)?t:String(t),h={},g=[],v=()=>{},m=()=>!1,_=/^on[^a-z]/,y=e=>_.test(e),b=e=>e.startsWith("onUpdate:"),C=Object.assign,x=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},w=Object.prototype.hasOwnProperty,S=(e,t)=>w.call(e,t),k=Array.isArray,E=e=>"[object Map]"===M(e),A=e=>"[object Set]"===M(e),F=e=>"[object Date]"===M(e),T=e=>"function"==typeof e,O=e=>"string"==typeof e,P=e=>"symbol"==typeof e,L=e=>null!==e&&"object"==typeof e,N=e=>L(e)&&T(e.then)&&T(e.catch),R=Object.prototype.toString,M=e=>R.call(e),I=e=>"[object Object]"===M(e),B=e=>O(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,V=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},j=/-(\w)/g,U=$((e=>e.replace(j,((e,t)=>t?t.toUpperCase():"")))),D=/\B([A-Z])/g,H=$((e=>e.replace(D,"-$1").toLowerCase())),W=$((e=>e.charAt(0).toUpperCase()+e.slice(1))),z=$((e=>e?`on${W(e)}`:"")),K=(e,t)=>!Object.is(e,t),G=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},q=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},J=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Y;let X;class Z{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&X&&(this.parent=X,this.index=(X.scopes||(X.scopes=[])).push(this)-1)}run(e){if(this.active){const t=X;try{return X=this,e()}finally{X=t}}}on(){X=this}off(){X=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function Q(e){return new Z(e)}function ee(e,t=X){t&&t.active&&t.effects.push(e)}function te(){return X}function ne(e){X&&X.cleanups.push(e)}const oe=e=>{const t=new Set(e);return t.w=0,t.n=0,t},re=e=>(e.w&ce)>0,se=e=>(e.n&ce)>0,le=new WeakMap;let ie=0,ce=1;let ae;const ue=Symbol(""),fe=Symbol("");class pe{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,ee(this,n)}run(){if(!this.active)return this.fn();let e=ae,t=ve;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=ae,ae=this,ve=!0,ce=1<<++ie,ie<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=ce})(this):de(this),this.fn()}finally{ie<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const r=t[o];re(r)&&!se(r)?r.delete(e):t[n++]=r,r.w&=~ce,r.n&=~ce}t.length=n}})(this),ce=1<<--ie,ae=this.parent,ve=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){ae===this?this.deferStop=!0:this.active&&(de(this),this.onStop&&this.onStop(),this.active=!1)}}function de(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}function he(e,t){e.effect&&(e=e.effect.fn);const n=new pe(e);t&&(C(n,t),t.scope&&ee(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o}function ge(e){e.effect.stop()}let ve=!0;const me=[];function _e(){me.push(ve),ve=!1}function ye(){const e=me.pop();ve=void 0===e||e}function be(e,t,n){if(ve&&ae){let t=le.get(e);t||le.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=oe()),Ce(o)}}function Ce(e,t){let n=!1;ie<=30?se(e)||(e.n|=ce,n=!re(e)):n=!e.has(ae),n&&(e.add(ae),ae.deps.push(e))}function xe(e,t,n,o,r,s){const l=le.get(e);if(!l)return;let i=[];if("clear"===t)i=[...l.values()];else if("length"===n&&k(e))l.forEach(((e,t)=>{("length"===t||t>=o)&&i.push(e)}));else switch(void 0!==n&&i.push(l.get(n)),t){case"add":k(e)?B(n)&&i.push(l.get("length")):(i.push(l.get(ue)),E(e)&&i.push(l.get(fe)));break;case"delete":k(e)||(i.push(l.get(ue)),E(e)&&i.push(l.get(fe)));break;case"set":E(e)&&i.push(l.get(ue))}if(1===i.length)i[0]&&we(i[0]);else{const e=[];for(const t of i)t&&e.push(...t);we(oe(e))}}function we(e,t){const n=k(e)?e:[...e];for(const o of n)o.computed&&Se(o);for(const o of n)o.computed||Se(o)}function Se(e,t){(e!==ae||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const ke=e("__proto__,__v_isRef,__isVue"),Ee=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(P)),Ae=Ne(),Fe=Ne(!1,!0),Te=Ne(!0),Oe=Ne(!0,!0),Pe=Le();function Le(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Ct(this);for(let t=0,r=this.length;t<r;t++)be(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(Ct)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){_e();const n=Ct(this)[t].apply(this,e);return ye(),n}})),e}function Ne(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?ut:at:t?ct:it).get(n))return n;const s=k(n);if(!e&&s&&S(Pe,o))return Reflect.get(Pe,o,r);const l=Reflect.get(n,o,r);return(P(o)?Ee.has(o):ke(o))?l:(e||be(n,0,o),t?l:At(l)?s&&B(o)?l:l.value:L(l)?e?ht(l):pt(l):l)}}function Re(e=!1){return function(t,n,o,r){let s=t[n];if(_t(s)&&At(s)&&!At(o))return!1;if(!e&&!_t(o)&&(yt(o)||(o=Ct(o),s=Ct(s)),!k(t)&&At(s)&&!At(o)))return s.value=o,!0;const l=k(t)&&B(n)?Number(n)<t.length:S(t,n),i=Reflect.set(t,n,o,r);return t===Ct(r)&&(l?K(o,s)&&xe(t,"set",n,o):xe(t,"add",n,o)),i}}const Me={get:Ae,set:Re(),deleteProperty:function(e,t){const n=S(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&xe(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return P(t)&&Ee.has(t)||be(e,0,t),n},ownKeys:function(e){return be(e,0,k(e)?"length":ue),Reflect.ownKeys(e)}},Ie={get:Te,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Be=C({},Me,{get:Fe,set:Re(!0)}),Ve=C({},Ie,{get:Oe}),$e=e=>e,je=e=>Reflect.getPrototypeOf(e);function Ue(e,t,n=!1,o=!1){const r=Ct(e=e.__v_raw),s=Ct(t);n||(t!==s&&be(r,0,t),be(r,0,s));const{has:l}=je(r),i=o?$e:n?St:wt;return l.call(r,t)?i(e.get(t)):l.call(r,s)?i(e.get(s)):void(e!==r&&e.get(t))}function De(e,t=!1){const n=this.__v_raw,o=Ct(n),r=Ct(e);return t||(e!==r&&be(o,0,e),be(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function He(e,t=!1){return e=e.__v_raw,!t&&be(Ct(e),0,ue),Reflect.get(e,"size",e)}function We(e){e=Ct(e);const t=Ct(this);return je(t).has.call(t,e)||(t.add(e),xe(t,"add",e,e)),this}function ze(e,t){t=Ct(t);const n=Ct(this),{has:o,get:r}=je(n);let s=o.call(n,e);s||(e=Ct(e),s=o.call(n,e));const l=r.call(n,e);return n.set(e,t),s?K(t,l)&&xe(n,"set",e,t):xe(n,"add",e,t),this}function Ke(e){const t=Ct(this),{has:n,get:o}=je(t);let r=n.call(t,e);r||(e=Ct(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&xe(t,"delete",e,void 0),s}function Ge(){const e=Ct(this),t=0!==e.size,n=e.clear();return t&&xe(e,"clear",void 0,void 0),n}function qe(e,t){return function(n,o){const r=this,s=r.__v_raw,l=Ct(s),i=t?$e:e?St:wt;return!e&&be(l,0,ue),s.forEach(((e,t)=>n.call(o,i(e),i(t),r)))}}function Je(e,t,n){return function(...o){const r=this.__v_raw,s=Ct(r),l=E(s),i="entries"===e||e===Symbol.iterator&&l,c="keys"===e&&l,a=r[e](...o),u=n?$e:t?St:wt;return!t&&be(s,0,c?fe:ue),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:i?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Ye(e){return function(...t){return"delete"!==e&&this}}function Xe(){const e={get(e){return Ue(this,e)},get size(){return He(this)},has:De,add:We,set:ze,delete:Ke,clear:Ge,forEach:qe(!1,!1)},t={get(e){return Ue(this,e,!1,!0)},get size(){return He(this)},has:De,add:We,set:ze,delete:Ke,clear:Ge,forEach:qe(!1,!0)},n={get(e){return Ue(this,e,!0)},get size(){return He(this,!0)},has(e){return De.call(this,e,!0)},add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear"),forEach:qe(!0,!1)},o={get(e){return Ue(this,e,!0,!0)},get size(){return He(this,!0)},has(e){return De.call(this,e,!0)},add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear"),forEach:qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Je(r,!1,!1),n[r]=Je(r,!0,!1),t[r]=Je(r,!1,!0),o[r]=Je(r,!0,!0)})),[e,n,t,o]}const[Ze,Qe,et,tt]=Xe();function nt(e,t){const n=t?e?tt:et:e?Qe:Ze;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(S(n,o)&&o in t?n:t,o,r)}const ot={get:nt(!1,!1)},rt={get:nt(!1,!0)},st={get:nt(!0,!1)},lt={get:nt(!0,!0)},it=new WeakMap,ct=new WeakMap,at=new WeakMap,ut=new WeakMap;function ft(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>M(e).slice(8,-1))(e))}function pt(e){return _t(e)?e:vt(e,!1,Me,ot,it)}function dt(e){return vt(e,!1,Be,rt,ct)}function ht(e){return vt(e,!0,Ie,st,at)}function gt(e){return vt(e,!0,Ve,lt,ut)}function vt(e,t,n,o,r){if(!L(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const l=ft(e);if(0===l)return e;const i=new Proxy(e,2===l?o:n);return r.set(e,i),i}function mt(e){return _t(e)?mt(e.__v_raw):!(!e||!e.__v_isReactive)}function _t(e){return!(!e||!e.__v_isReadonly)}function yt(e){return!(!e||!e.__v_isShallow)}function bt(e){return mt(e)||_t(e)}function Ct(e){const t=e&&e.__v_raw;return t?Ct(t):e}function xt(e){return q(e,"__v_skip",!0),e}const wt=e=>L(e)?pt(e):e,St=e=>L(e)?ht(e):e;function kt(e){ve&&ae&&Ce((e=Ct(e)).dep||(e.dep=oe()))}function Et(e,t){(e=Ct(e)).dep&&we(e.dep)}function At(e){return!(!e||!0!==e.__v_isRef)}function Ft(e){return Ot(e,!1)}function Tt(e){return Ot(e,!0)}function Ot(e,t){return At(e)?e:new Pt(e,t)}class Pt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Ct(e),this._value=t?e:wt(e)}get value(){return kt(this),this._value}set value(e){e=this.__v_isShallow?e:Ct(e),K(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:wt(e),Et(this))}}function Lt(e){Et(e)}function Nt(e){return At(e)?e.value:e}const Rt={get:(e,t,n)=>Nt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return At(r)&&!At(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Mt(e){return mt(e)?e:new Proxy(e,Rt)}class It{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>kt(this)),(()=>Et(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Bt(e){return new It(e)}function Vt(e){const t=k(e)?new Array(e.length):{};for(const n in e)t[n]=jt(e,n);return t}class $t{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function jt(e,t,n){const o=e[t];return At(o)?o:new $t(e,t,n)}class Ut{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new pe(e,(()=>{this._dirty||(this._dirty=!0,Et(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=Ct(this);return kt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const Dt=[];function Ht(e,...t){_e();const n=Dt.length?Dt[Dt.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=function(){let e=Dt[Dt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}();if(o)Kt(o,n,11,[e+t.join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${Ms(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=` at <${Ms(e.component,e.type,!!e.component&&null==e.component.parent)}`,r=">"+n;return e.props?[o,...Wt(e.props),r]:[o+r]}(e))})),t}(r)),console.warn(...n)}ye()}function Wt(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...zt(n,e[n]))})),n.length>3&&t.push(" ..."),t}function zt(e,t,n){return O(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:At(t)?(t=zt(e,Ct(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):T(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Ct(t),n?t:[`${e}=`,t])}function Kt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){qt(s,t,n)}return r}function Gt(e,t,n,o){if(T(e)){const r=Kt(e,t,n,o);return r&&N(r)&&r.catch((e=>{qt(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Gt(e[s],t,n,o));return r}function qt(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const l=t.appContext.config.errorHandler;if(l)return void Kt(l,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let Jt=!1,Yt=!1;const Xt=[];let Zt=0;const Qt=[];let en=null,tn=0;const nn=[];let on=null,rn=0;const sn=Promise.resolve();let ln=null,cn=null;function an(e){const t=ln||sn;return e?t.then(this?e.bind(this):e):t}function un(e){Xt.length&&Xt.includes(e,Jt&&e.allowRecurse?Zt+1:Zt)||e===cn||(null==e.id?Xt.push(e):Xt.splice(function(e){let t=Zt+1,n=Xt.length;for(;t<n;){const o=t+n>>>1;vn(Xt[o])<e?t=o+1:n=o}return t}(e.id),0,e),fn())}function fn(){Jt||Yt||(Yt=!0,ln=sn.then(mn))}function pn(e,t,n,o){k(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),fn()}function dn(e){pn(e,on,nn,rn)}function hn(e,t=null){if(Qt.length){for(cn=t,en=[...new Set(Qt)],Qt.length=0,tn=0;tn<en.length;tn++)en[tn]();en=null,tn=0,cn=null,hn(e,t)}}function gn(e){if(hn(),nn.length){const e=[...new Set(nn)];if(nn.length=0,on)return void on.push(...e);for(on=e,on.sort(((e,t)=>vn(e)-vn(t))),rn=0;rn<on.length;rn++)on[rn]();on=null,rn=0}}const vn=e=>null==e.id?1/0:e.id;function mn(e){Yt=!1,Jt=!0,hn(e),Xt.sort(((e,t)=>vn(e)-vn(t)));try{for(Zt=0;Zt<Xt.length;Zt++){const e=Xt[Zt];e&&!1!==e.active&&Kt(e,null,14)}}finally{Zt=0,Xt.length=0,gn(),Jt=!1,ln=null,(Xt.length||Qt.length||nn.length)&&mn(e)}}let _n,yn=[];function bn(e,t){var n,o;if(_n=e,_n)_n.enabled=!0,yn.forEach((({event:e,args:t})=>_n.emit(e,...t))),yn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(o=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===o?void 0:o.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{bn(e,t)})),setTimeout((()=>{_n||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,yn=[])}),3e3)}else yn=[]}function Cn(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||h;let r=n;const s=t.startsWith("update:"),l=s&&t.slice(7);if(l&&l in o){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:t,trim:s}=o[e]||h;s&&(r=n.map((e=>e.trim()))),t&&(r=n.map(J))}let i,c=o[i=z(t)]||o[i=z(U(t))];!c&&s&&(c=o[i=z(H(t))]),c&&Gt(c,e,6,r);const a=o[i+"Once"];if(a){if(e.emitted){if(e.emitted[i])return}else e.emitted={};e.emitted[i]=!0,Gt(a,e,6,r)}}function xn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let l={},i=!1;if(!T(e)){const o=e=>{const n=xn(e,t,!0);n&&(i=!0,C(l,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||i?(k(s)?s.forEach((e=>l[e]=null)):C(l,s),o.set(e,l),l):(o.set(e,null),null)}function wn(e,t){return!(!e||!y(t))&&(t=t.slice(2).replace(/Once$/,""),S(e,t[0].toLowerCase()+t.slice(1))||S(e,H(t))||S(e,t))}let Sn=null,kn=null;function En(e){const t=Sn;return Sn=e,kn=e&&e.type.__scopeId||null,t}function An(e){kn=e}function Fn(){kn=null}const Tn=e=>On;function On(e,t=Sn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Jr(-1);const r=En(t),s=e(...n);return En(r),o._d&&Jr(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function Pn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:i,attrs:c,emit:a,render:u,renderCache:f,data:p,setupState:d,ctx:h,inheritAttrs:g}=e;let v,m;const _=En(e);try{if(4&n.shapeFlag){const e=r||o;v=ps(u.call(e,e,f,s,d,p,h)),m=c}else{const e=t;0,v=ps(e(s,e.length>1?{attrs:c,slots:i,emit:a}:null)),m=t.props?c:Ln(c)}}catch(C){Wr.length=0,qt(C,e,1),v=ls(Dr)}let y=v;if(m&&!1!==g){const e=Object.keys(m),{shapeFlag:t}=y;e.length&&7&t&&(l&&e.some(b)&&(m=Nn(m,l)),y=cs(y,m))}return n.dirs&&(y=cs(y),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),v=y,En(_),v}const Ln=e=>{let t;for(const n in e)("class"===n||"style"===n||y(n))&&((t||(t={}))[n]=e[n]);return t},Nn=(e,t)=>{const n={};for(const o in e)b(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Rn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!wn(n,s))return!0}return!1}function Mn({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const In=e=>e.__isSuspense,Bn={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,l,i,c,a){null==e?function(e,t,n,o,r,s,l,i,c){const{p:a,o:{createElement:u}}=c,f=u("div"),p=e.suspense=$n(e,r,o,t,f,n,s,l,i,c);a(null,p.pendingBranch=e.ssContent,f,null,o,p,s,l),p.deps>0?(Vn(e,"onPending"),Vn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,l),Dn(p,e.ssFallback)):p.resolve()}(t,n,o,r,s,l,i,c,a):function(e,t,n,o,r,s,l,i,{p:c,um:a,o:{createElement:u}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:g,isInFallback:v,isHydrating:m}=f;if(g)f.pendingBranch=p,es(p,g)?(c(g,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0?f.resolve():v&&(c(h,d,n,o,r,null,s,l,i),Dn(f,d))):(f.pendingId++,m?(f.isHydrating=!1,f.activeBranch=g):a(g,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),v?(c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0?f.resolve():(c(h,d,n,o,r,null,s,l,i),Dn(f,d))):h&&es(p,h)?(c(h,p,n,o,r,f,s,l,i),f.resolve(!0)):(c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0&&f.resolve()));else if(h&&es(p,h))c(h,p,n,o,r,f,s,l,i),Dn(f,p);else if(Vn(t,"onPending"),f.pendingBranch=p,f.pendingId++,c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,o,r,l,i,c,a)},hydrate:function(e,t,n,o,r,s,l,i,c){const a=t.suspense=$n(t,o,n,e.parentNode,document.createElement("div"),null,r,s,l,i,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,l);0===a.deps&&a.resolve();return u},create:$n,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=jn(o?n.default:n),e.ssFallback=o?jn(n.fallback):ls(Dr)}};function Vn(e,t){const n=e.props&&e.props[t];T(n)&&n()}function $n(e,t,n,o,r,s,l,i,c,a,u=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:g,remove:v}}=a,m=J(e.props&&e.props.timeout),_={vnode:e,parent:t,parentComponent:n,isSVG:l,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof m?m:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:l,container:i}=_;if(_.isHydrating)_.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===_.pendingId&&p(o,i,t,0)});let{anchor:t}=_;n&&(t=h(n),d(n,l,_,!0)),e||p(o,i,t,0)}Dn(_,o),_.pendingBranch=null,_.isInFallback=!1;let c=_.parent,a=!1;for(;c;){if(c.pendingBranch){c.effects.push(...s),a=!0;break}c=c.parent}a||dn(s),_.effects=[],Vn(t,"onResolve")},fallback(e){if(!_.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=_;Vn(t,"onFallback");const l=h(n),a=()=>{_.isInFallback&&(f(null,e,r,l,o,null,s,i,c),Dn(_,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),_.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){_.activeBranch&&p(_.activeBranch,e,t,n),_.container=e},next:()=>_.activeBranch&&h(_.activeBranch),registerDep(e,t){const n=!!_.pendingBranch;n&&_.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{qt(t,e,0)})).then((r=>{if(e.isUnmounted||_.isUnmounted||_.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;As(e,r,!1),o&&(s.el=o);const i=!o&&e.subTree.el;t(e,s,g(o||e.subTree.el),o?null:h(e.subTree),_,l,c),i&&v(i),Mn(e,s.el),n&&0==--_.deps&&_.resolve()}))},unmount(e,t){_.isUnmounted=!0,_.activeBranch&&d(_.activeBranch,n,e,t),_.pendingBranch&&d(_.pendingBranch,n,e,t)}};return _}function jn(e){let t;if(T(e)){const n=qr&&e._c;n&&(e._d=!1,Kr()),e=e(),n&&(e._d=!0,t=zr,Gr())}if(k(e)){const t=function(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!Qr(o))return;if(o.type!==Dr||"v-if"===o.children){if(t)return;t=o}}return t}(e);e=t}return e=ps(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Un(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):dn(e)}function Dn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,Mn(o,r))}function Hn(e,t){if(ys){let n=ys.provides;const o=ys.parent&&ys.parent.provides;o===n&&(n=ys.provides=Object.create(o)),n[e]=t}else;}function Wn(e,t,n=!1){const o=ys||Sn;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&T(t)?t.call(o.proxy):t}}function zn(e,t){return Yn(e,null,t)}function Kn(e,t){return Yn(e,null,{flush:"post"})}function Gn(e,t){return Yn(e,null,{flush:"sync"})}const qn={};function Jn(e,t,n){return Yn(e,t,n)}function Yn(e,t,{immediate:n,deep:o,flush:r}=h){const s=ys;let l,i,c=!1,a=!1;if(At(e)?(l=()=>e.value,c=yt(e)):mt(e)?(l=()=>e,o=!0):k(e)?(a=!0,c=e.some((e=>mt(e)||yt(e))),l=()=>e.map((e=>At(e)?e.value:mt(e)?Qn(e):T(e)?Kt(e,s,2):void 0))):l=T(e)?t?()=>Kt(e,s,2):()=>{if(!s||!s.isUnmounted)return i&&i(),Gt(e,s,3,[u])}:v,t&&o){const e=l;l=()=>Qn(e())}let u=e=>{i=g.onStop=()=>{Kt(e,s,4)}},f=a?[]:qn;const p=()=>{if(g.active)if(t){const e=g.run();(o||c||(a?e.some(((e,t)=>K(e,f[t]))):K(e,f)))&&(i&&i(),Gt(t,s,3,[e,f===qn?void 0:f,u]),f=e)}else g.run()};let d;p.allowRecurse=!!t,d="sync"===r?p:"post"===r?()=>Tr(p,s&&s.suspense):()=>function(e){pn(e,en,Qt,tn)}(p);const g=new pe(l,d);return t?n?p():f=g.run():"post"===r?Tr(g.run.bind(g),s&&s.suspense):g.run(),()=>{g.stop(),s&&s.scope&&x(s.scope.effects,g)}}function Xn(e,t,n){const o=this.proxy,r=O(e)?e.includes(".")?Zn(o,e):()=>o[e]:e.bind(o,o);let s;T(t)?s=t:(s=t.handler,n=t);const l=ys;Cs(this);const i=Yn(r,s.bind(o),n);return l?Cs(l):xs(),i}function Zn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Qn(e,t){if(!L(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),At(e))Qn(e.value,t);else if(k(e))for(let n=0;n<e.length;n++)Qn(e[n],t);else if(A(e)||E(e))e.forEach((e=>{Qn(e,t)}));else if(I(e))for(const n in e)Qn(e[n],t);return e}function eo(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Eo((()=>{e.isMounted=!0})),To((()=>{e.isUnmounting=!0})),e}const to=[Function,Array],no={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:to,onEnter:to,onAfterEnter:to,onEnterCancelled:to,onBeforeLeave:to,onLeave:to,onAfterLeave:to,onLeaveCancelled:to,onBeforeAppear:to,onAppear:to,onAfterAppear:to,onAppearCancelled:to},setup(e,{slots:t}){const n=bs(),o=eo();let r;return()=>{const s=t.default&&co(t.default(),!0);if(!s||!s.length)return;let l=s[0];if(s.length>1)for(const e of s)if(e.type!==Dr){l=e;break}const i=Ct(e),{mode:c}=i;if(o.isLeaving)return so(l);const a=lo(l);if(!a)return so(l);const u=ro(a,i,o,n);io(a,u);const f=n.subTree,p=f&&lo(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==Dr&&(!es(a,p)||d)){const e=ro(p,i,o,n);if(io(p,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},so(l);"in-out"===c&&a.type!==Dr&&(e.delayLeave=(e,t,n)=>{oo(o,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return l}}};function oo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ro(e,t,n,o){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:i,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:g,onAppear:v,onAfterAppear:m,onAppearCancelled:_}=t,y=String(e.key),b=oo(n,e),C=(e,t)=>{e&&Gt(e,o,9,t)},x=(e,t)=>{const n=t[1];C(e,t),k(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},w={mode:s,persisted:l,beforeEnter(t){let o=i;if(!n.isMounted){if(!r)return;o=g||i}t._leaveCb&&t._leaveCb(!0);const s=b[y];s&&es(e,s)&&s.el._leaveCb&&s.el._leaveCb(),C(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=v||c,o=m||a,s=_||u}let l=!1;const i=e._enterCb=t=>{l||(l=!0,C(t?s:o,[e]),w.delayedLeave&&w.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,i]):i()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();C(f,[t]);let s=!1;const l=t._leaveCb=n=>{s||(s=!0,o(),C(n?h:d,[t]),t._leaveCb=void 0,b[r]===e&&delete b[r])};b[r]=e,p?x(p,[t,l]):l()},clone:e=>ro(e,t,n,o)};return w}function so(e){if(ho(e))return(e=cs(e)).children=null,e}function lo(e){return ho(e)?e.children?e.children[0]:void 0:e}function io(e,t){6&e.shapeFlag&&e.component?io(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function co(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let l=e[s];const i=null==n?l.key:String(n)+String(null!=l.key?l.key:s);l.type===jr?(128&l.patchFlag&&r++,o=o.concat(co(l.children,t,i))):(t||l.type!==Dr)&&o.push(null!=i?cs(l,{key:i}):l)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}function ao(e){return T(e)?{setup:e,name:e.name}:e}const uo=e=>!!e.type.__asyncLoader;function fo(e){T(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:l=!0,onError:i}=e;let c,a=null,u=0;const f=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),i)return new Promise(((t,n)=>{i(e,(()=>t((u++,a=null,f()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return ao({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return c},setup(){const e=ys;if(c)return()=>po(c,e);const t=t=>{a=null,qt(t,e,13,!o)};if(l&&e.suspense)return f().then((t=>()=>po(t,e))).catch((e=>(t(e),()=>o?ls(o,{error:e}):null)));const i=Ft(!1),u=Ft(),p=Ft(!!r);return r&&setTimeout((()=>{p.value=!1}),r),null!=s&&setTimeout((()=>{if(!i.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),f().then((()=>{i.value=!0,e.parent&&ho(e.parent.vnode)&&un(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>i.value&&c?po(c,e):u.value&&o?ls(o,{error:u.value}):n&&!p.value?ls(n):void 0}})}function po(e,{vnode:{ref:t,props:n,children:o}}){const r=ls(e,n,o);return r.ref=t,r}const ho=e=>e.type.__isKeepAlive,go={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=bs(),o=n.ctx,r=new Map,s=new Set;let l=null;const i=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:f}}}=o,p=f("div");function d(e){Co(e),u(e,n,i,!0)}function h(e){r.forEach(((t,n)=>{const o=Rs(t.type);!o||e&&e(o)||g(n)}))}function g(e){const t=r.get(e);l&&t.type===l.type?l&&Co(l):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,i),c(s.vnode,e,t,n,s,i,o,e.slotScopeIds,r),Tr((()=>{s.isDeactivated=!1,s.a&&G(s.a);const t=e.props&&e.props.onVnodeMounted;t&&vs(t,s.parent,e)}),i)},o.deactivate=e=>{const t=e.component;a(e,p,null,1,i),Tr((()=>{t.da&&G(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&vs(n,t.parent,e),t.isDeactivated=!0}),i)},Jn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>vo(e,t))),t&&h((e=>!vo(t,e)))}),{flush:"post",deep:!0});let v=null;const m=()=>{null!=v&&r.set(v,xo(n.subTree))};return Eo(m),Fo(m),To((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=xo(t);if(e.type!==r.type)d(e);else{Co(r);const e=r.component.da;e&&Tr(e,o)}}))})),()=>{if(v=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return l=null,n;if(!(Qr(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return l=null,o;let i=xo(o);const c=i.type,a=Rs(uo(i)?i.type.__asyncResolved||{}:c),{include:u,exclude:f,max:p}=e;if(u&&(!a||!vo(u,a))||f&&a&&vo(f,a))return l=i,o;const d=null==i.key?c:i.key,h=r.get(d);return i.el&&(i=cs(i),128&o.shapeFlag&&(o.ssContent=i)),v=d,h?(i.el=h.el,i.component=h.component,i.transition&&io(i,i.transition),i.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&g(s.values().next().value)),i.shapeFlag|=256,l=i,In(o.type)?o:i}}};function vo(e,t){return k(e)?e.some((e=>vo(e,t))):O(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function mo(e,t){yo(e,"a",t)}function _o(e,t){yo(e,"da",t)}function yo(e,t,n=ys){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(wo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)ho(e.parent.vnode)&&bo(o,t,n,e),e=e.parent}}function bo(e,t,n,o){const r=wo(t,e,o,!0);Oo((()=>{x(o[t],r)}),n)}function Co(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function xo(e){return 128&e.shapeFlag?e.ssContent:e}function wo(e,t,n=ys,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;_e(),Cs(n);const r=Gt(t,n,e,o);return xs(),ye(),r});return o?r.unshift(s):r.push(s),s}}const So=e=>(t,n=ys)=>(!Es||"sp"===e)&&wo(e,t,n),ko=So("bm"),Eo=So("m"),Ao=So("bu"),Fo=So("u"),To=So("bum"),Oo=So("um"),Po=So("sp"),Lo=So("rtg"),No=So("rtc");function Ro(e,t=ys){wo("ec",e,t)}function Mo(e,t){const n=Sn;if(null===n)return e;const o=Ls(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,n,l,i=h]=t[s];T(e)&&(e={mounted:e,updated:e}),e.deep&&Qn(n),r.push({dir:e,instance:o,value:n,oldValue:void 0,arg:l,modifiers:i})}return e}function Io(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let l=0;l<r.length;l++){const i=r[l];s&&(i.oldValue=s[l].value);let c=i.dir[o];c&&(_e(),Gt(c,n,8,[e.el,i,e,t]),ye())}}function Bo(e,t){return Uo("components",e,!0,t)||e}const Vo=Symbol();function $o(e){return O(e)?Uo("components",e,!1)||e:e||Vo}function jo(e){return Uo("directives",e)}function Uo(e,t,n=!0,o=!1){const r=Sn||ys;if(r){const n=r.type;if("components"===e){const e=Rs(n);if(e&&(e===t||e===U(t)||e===W(U(t))))return n}const s=Do(r[e]||n[e],t)||Do(r.appContext[e],t);return!s&&o?n:s}}function Do(e,t){return e&&(e[t]||e[U(t)]||e[W(U(t))])}function Ho(e,t,n,o){let r;const s=n&&n[o];if(k(e)||O(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(L(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,l=n.length;o<l;o++){const l=n[o];r[o]=t(e[l],l,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r}function Wo(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(k(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.fn)}return e}function zo(e,t,n={},o,r){if(Sn.isCE||Sn.parent&&uo(Sn.parent)&&Sn.parent.isCE)return ls("slot","default"===t?null:{name:t},o&&o());let s=e[t];s&&s._c&&(s._d=!1),Kr();const l=s&&Ko(s(n)),i=Zr(jr,{key:n.key||`_${t}`},l||(o?o():[]),l&&1===e._?64:-2);return!r&&i.scopeId&&(i.slotScopeIds=[i.scopeId+"-s"]),s&&s._c&&(s._d=!0),i}function Ko(e){return e.some((e=>!Qr(e)||e.type!==Dr&&!(e.type===jr&&!Ko(e.children))))?e:null}function Go(e){const t={};for(const n in e)t[z(n)]=e[n];return t}const qo=e=>e?ws(e)?Ls(e)||e.proxy:qo(e.parent):null,Jo=C(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>qo(e.parent),$root:e=>qo(e.root),$emit:e=>e.emit,$options:e=>nr(e),$forceUpdate:e=>e.f||(e.f=()=>un(e.update)),$nextTick:e=>e.n||(e.n=an.bind(e.proxy)),$watch:e=>Xn.bind(e)}),Yo={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:l,type:i,appContext:c}=e;let a;if("$"!==t[0]){const i=l[t];if(void 0!==i)switch(i){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(o!==h&&S(o,t))return l[t]=1,o[t];if(r!==h&&S(r,t))return l[t]=2,r[t];if((a=e.propsOptions[0])&&S(a,t))return l[t]=3,s[t];if(n!==h&&S(n,t))return l[t]=4,n[t];Zo&&(l[t]=0)}}const u=Jo[t];let f,p;return u?("$attrs"===t&&be(e,0,t),u(e)):(f=i.__cssModules)&&(f=f[t])?f:n!==h&&S(n,t)?(l[t]=4,n[t]):(p=c.config.globalProperties,S(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return r!==h&&S(r,t)?(r[t]=n,!0):o!==h&&S(o,t)?(o[t]=n,!0):!S(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},l){let i;return!!n[l]||e!==h&&S(e,l)||t!==h&&S(t,l)||(i=s[0])&&S(i,l)||S(o,l)||S(Jo,l)||S(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:S(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Xo=C({},Yo,{get(e,t){if(t!==Symbol.unscopables)return Yo.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)});let Zo=!0;function Qo(e){const t=nr(e),n=e.proxy,o=e.ctx;Zo=!1,t.beforeCreate&&er(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:l,watch:i,provide:c,inject:a,created:u,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:g,deactivated:m,beforeUnmount:_,unmounted:y,render:b,renderTracked:C,renderTriggered:x,errorCaptured:w,serverPrefetch:S,expose:E,inheritAttrs:A,components:F,directives:O}=t;if(a&&function(e,t,n=v,o=!1){k(e)&&(e=lr(e));for(const r in e){const n=e[r];let s;s=L(n)?"default"in n?Wn(n.from||r,n.default,!0):Wn(n.from||r):Wn(n),At(s)&&o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}(a,o,null,e.appContext.config.unwrapInjectedRef),l)for(const v in l){const e=l[v];T(e)&&(o[v]=e.bind(n))}if(r){const t=r.call(n,n);L(t)&&(e.data=pt(t))}if(Zo=!0,s)for(const k in s){const e=s[k],t=T(e)?e.bind(n,n):T(e.get)?e.get.bind(n,n):v,r=!T(e)&&T(e.set)?e.set.bind(n):v,l=Is({get:t,set:r});Object.defineProperty(o,k,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(i)for(const v in i)tr(i[v],o,n,v);if(c){const e=T(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{Hn(t,e[t])}))}function P(e,t){k(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&er(u,e,"c"),P(ko,f),P(Eo,p),P(Ao,d),P(Fo,h),P(mo,g),P(_o,m),P(Ro,w),P(No,C),P(Lo,x),P(To,_),P(Oo,y),P(Po,S),k(E))if(E.length){const t=e.exposed||(e.exposed={});E.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});b&&e.render===v&&(e.render=b),null!=A&&(e.inheritAttrs=A),F&&(e.components=F),O&&(e.directives=O)}function er(e,t,n){Gt(k(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function tr(e,t,n,o){const r=o.includes(".")?Zn(n,o):()=>n[o];if(O(e)){const n=t[e];T(n)&&Jn(r,n)}else if(T(e))Jn(r,e.bind(n));else if(L(e))if(k(e))e.forEach((e=>tr(e,t,n,o)));else{const o=T(e.handler)?e.handler.bind(n):t[e.handler];T(o)&&Jn(r,o,e)}}function nr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:l}}=e.appContext,i=s.get(t);let c;return i?c=i:r.length||n||o?(c={},r.length&&r.forEach((e=>or(c,e,l,!0))),or(c,t,l)):c=t,s.set(t,c),c}function or(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&or(e,s,n,!0),r&&r.forEach((t=>or(e,t,n,!0)));for(const l in t)if(o&&"expose"===l);else{const o=rr[l]||n&&n[l];e[l]=o?o(e[l],t[l]):t[l]}return e}const rr={data:sr,props:cr,emits:cr,methods:cr,computed:cr,beforeCreate:ir,created:ir,beforeMount:ir,mounted:ir,beforeUpdate:ir,updated:ir,beforeDestroy:ir,beforeUnmount:ir,destroyed:ir,unmounted:ir,activated:ir,deactivated:ir,errorCaptured:ir,serverPrefetch:ir,components:cr,directives:cr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=C(Object.create(null),e);for(const o in t)n[o]=ir(e[o],t[o]);return n},provide:sr,inject:function(e,t){return cr(lr(e),lr(t))}};function sr(e,t){return t?e?function(){return C(T(e)?e.call(this,this):e,T(t)?t.call(this,this):t)}:t:e}function lr(e){if(k(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ir(e,t){return e?[...new Set([].concat(e,t))]:t}function cr(e,t){return e?C(C(Object.create(null),e),t):t}function ar(e,t,n,o){const[r,s]=e.propsOptions;let l,i=!1;if(t)for(let c in t){if(V(c))continue;const a=t[c];let u;r&&S(r,u=U(c))?s&&s.includes(u)?(l||(l={}))[u]=a:n[u]=a:wn(e.emitsOptions,c)||c in o&&a===o[c]||(o[c]=a,i=!0)}if(s){const t=Ct(n),o=l||h;for(let l=0;l<s.length;l++){const i=s[l];n[i]=ur(r,t,i,o[i],e,!S(o,i))}}return i}function ur(e,t,n,o,r,s){const l=e[n];if(null!=l){const e=S(l,"default");if(e&&void 0===o){const e=l.default;if(l.type!==Function&&T(e)){const{propsDefaults:s}=r;n in s?o=s[n]:(Cs(r),o=s[n]=e.call(null,t),xs())}else o=e}l[0]&&(s&&!e?o=!1:!l[1]||""!==o&&o!==H(n)||(o=!0))}return o}function fr(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,l={},i=[];let c=!1;if(!T(e)){const o=e=>{c=!0;const[n,o]=fr(e,t,!0);C(l,n),o&&i.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return o.set(e,g),g;if(k(s))for(let u=0;u<s.length;u++){const e=U(s[u]);pr(e)&&(l[e]=h)}else if(s)for(const u in s){const e=U(u);if(pr(e)){const t=s[u],n=l[e]=k(t)||T(t)?{type:t}:t;if(n){const t=gr(Boolean,n.type),o=gr(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||S(n,"default"))&&i.push(e)}}}const a=[l,i];return o.set(e,a),a}function pr(e){return"$"!==e[0]}function dr(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function hr(e,t){return dr(e)===dr(t)}function gr(e,t){return k(t)?t.findIndex((t=>hr(t,e))):T(t)&&hr(t,e)?0:-1}const vr=e=>"_"===e[0]||"$stable"===e,mr=e=>k(e)?e.map(ps):[ps(e)],_r=(e,t,n)=>{if(t._n)return t;const o=On(((...e)=>mr(t(...e))),n);return o._c=!1,o},yr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(vr(r))continue;const n=e[r];if(T(n))t[r]=_r(0,n,o);else if(null!=n){const e=mr(n);t[r]=()=>e}}},br=(e,t)=>{const n=mr(t);e.slots.default=()=>n};function Cr(){return{app:null,config:{isNativeTag:m,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let xr=0;function wr(e,t){return function(n,o=null){T(n)||(n=Object.assign({},n)),null==o||L(o)||(o=null);const r=Cr(),s=new Set;let l=!1;const i=r.app={_uid:xr++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Qs,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&T(e.install)?(s.add(e),e.install(i,...t)):T(e)&&(s.add(e),e(i,...t))),i),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),i),component:(e,t)=>t?(r.components[e]=t,i):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,i):r.directives[e],mount(s,c,a){if(!l){const u=ls(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),l=!0,i._container=s,s.__vue_app__=i,Ls(u.component)||u.component.proxy}},unmount(){l&&(e(null,i._container),delete i._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,i)};return i}}function Sr(e,t,n,o,r=!1){if(k(e))return void e.forEach(((e,s)=>Sr(e,t&&(k(t)?t[s]:t),n,o,r)));if(uo(o)&&!r)return;const s=4&o.shapeFlag?Ls(o.component)||o.component.proxy:o.el,l=r?null:s,{i:i,r:c}=e,a=t&&t.r,u=i.refs===h?i.refs={}:i.refs,f=i.setupState;if(null!=a&&a!==c&&(O(a)?(u[a]=null,S(f,a)&&(f[a]=null)):At(a)&&(a.value=null)),T(c))Kt(c,i,12,[l,u]);else{const t=O(c),o=At(c);if(t||o){const o=()=>{if(e.f){const n=t?u[c]:c.value;r?k(n)&&x(n,s):k(n)?n.includes(s)||n.push(s):t?(u[c]=[s],S(f,c)&&(f[c]=u[c])):(c.value=[s],e.k&&(u[e.k]=c.value))}else t?(u[c]=l,S(f,c)&&(f[c]=l)):At(c)&&(c.value=l,e.k&&(u[e.k]=l))};l?(o.id=-1,Tr(o,n)):o()}}}let kr=!1;const Er=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,Ar=e=>8===e.nodeType;function Fr(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:l,remove:i,insert:c,createComment:a}}=e,u=(n,o,i,a,v,m=!1)=>{const _=Ar(n)&&"["===n.data,y=()=>h(n,o,i,a,v,_),{type:b,ref:C,shapeFlag:x,patchFlag:w}=o,S=n.nodeType;o.el=n,-2===w&&(m=!1,o.dynamicChildren=null);let k=null;switch(b){case Ur:3!==S?""===o.children?(c(o.el=r(""),l(n),n),k=n):k=y():(n.data!==o.children&&(kr=!0,n.data=o.children),k=s(n));break;case Dr:k=8!==S||_?y():s(n);break;case Hr:if(1===S){k=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=k.outerHTML),t===o.staticCount-1&&(o.anchor=k),k=s(k);return k}k=y();break;case jr:k=_?d(n,o,i,a,v,m):y();break;default:if(1&x)k=1!==S||o.type.toLowerCase()!==n.tagName.toLowerCase()?y():f(n,o,i,a,v,m);else if(6&x){o.slotScopeIds=v;const e=l(n);if(t(o,e,null,i,a,Er(e),m),k=_?g(n):s(n),k&&Ar(k)&&"teleport end"===k.data&&(k=s(k)),uo(o)){let t;_?(t=ls(jr),t.anchor=k?k.previousSibling:e.lastChild):t=3===n.nodeType?as(""):ls("div"),t.el=n,o.component.subTree=t}}else 64&x?k=8!==S?y():o.type.hydrate(n,o,i,a,v,m,e,p):128&x&&(k=o.type.hydrate(n,o,i,a,Er(l(n)),v,m,e,u))}return null!=C&&Sr(C,null,a,o),k},f=(e,t,n,r,s,l)=>{l=l||!!t.dynamicChildren;const{type:c,props:a,patchFlag:u,shapeFlag:f,dirs:d}=t,h="input"===c&&d||"option"===c;if(h||-1!==u){if(d&&Io(t,null,n,"created"),a)if(h||!l||48&u)for(const t in a)(h&&t.endsWith("value")||y(t)&&!V(t))&&o(e,t,null,a[t],!1,void 0,n);else a.onClick&&o(e,"onClick",null,a.onClick,!1,void 0,n);let c;if((c=a&&a.onVnodeBeforeMount)&&vs(c,n,t),d&&Io(t,null,n,"beforeMount"),((c=a&&a.onVnodeMounted)||d)&&Un((()=>{c&&vs(c,n,t),d&&Io(t,null,n,"mounted")}),r),16&f&&(!a||!a.innerHTML&&!a.textContent)){let o=p(e.firstChild,t,e,n,r,s,l);for(;o;){kr=!0;const e=o;o=o.nextSibling,i(e)}}else 8&f&&e.textContent!==t.children&&(kr=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,o,r,s,l,i)=>{i=i||!!t.dynamicChildren;const c=t.children,a=c.length;for(let f=0;f<a;f++){const t=i?c[f]:c[f]=ps(c[f]);if(e)e=u(e,t,r,s,l,i);else{if(t.type===Ur&&!t.children)continue;kr=!0,n(null,t,o,null,r,s,Er(o),l)}}return e},d=(e,t,n,o,r,i)=>{const{slotScopeIds:u}=t;u&&(r=r?r.concat(u):u);const f=l(e),d=p(s(e),t,f,n,o,r,i);return d&&Ar(d)&&"]"===d.data?s(t.anchor=d):(kr=!0,c(t.anchor=a("]"),f,d),d)},h=(e,t,o,r,c,a)=>{if(kr=!0,t.el=null,a){const t=g(e);for(;;){const n=s(e);if(!n||n===t)break;i(n)}}const u=s(e),f=l(e);return i(e),n(null,t,f,u,o,r,Er(f),c),u},g=e=>{let t=0;for(;e;)if((e=s(e))&&Ar(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),void gn();kr=!1,u(t.firstChild,e,null,null,null),gn(),kr&&console.error("Hydration completed but contains mismatches.")},u]}const Tr=Un;function Or(e){return Lr(e)}function Pr(e){return Lr(e,Fr)}function Lr(e,t){(Y||(Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})).__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:s,createText:l,createComment:i,setText:c,setElementText:a,parentNode:u,nextSibling:f,setScopeId:p=v,cloneNode:d,insertStaticContent:m}=e,_=(e,t,n,o=null,r=null,s=null,l=!1,i=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!es(e,t)&&(o=ee(e),z(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:f}=t;switch(a){case Ur:y(e,t,n,o);break;case Dr:b(e,t,n,o);break;case Hr:null==e&&x(t,n,o,l);break;case jr:P(e,t,n,o,r,s,l,i,c);break;default:1&f?w(e,t,n,o,r,s,l,i,c):6&f?L(e,t,n,o,r,s,l,i,c):(64&f||128&f)&&a.process(e,t,n,o,r,s,l,i,c,ne)}null!=u&&r&&Sr(u,e&&e.ref,s,t||e,!t)},y=(e,t,o,r)=>{if(null==e)n(t.el=l(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},b=(e,t,o,r)=>{null==e?n(t.el=i(t.children||""),o,r):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=m(e.children,t,n,o,e.el,e.anchor)},w=(e,t,n,o,r,s,l,i,c)=>{l=l||"svg"===t.type,null==e?k(t,n,o,r,s,l,i,c):F(e,t,r,s,l,i,c)},k=(e,t,o,l,i,c,u,f)=>{let p,h;const{type:g,props:v,shapeFlag:m,transition:_,patchFlag:y,dirs:b}=e;if(e.el&&void 0!==d&&-1===y)p=e.el=d(e.el);else{if(p=e.el=s(e.type,c,v&&v.is,v),8&m?a(p,e.children):16&m&&A(e.children,p,null,l,i,c&&"foreignObject"!==g,u,f),b&&Io(e,null,l,"created"),v){for(const t in v)"value"===t||V(t)||r(p,t,null,v[t],c,e.children,l,i,Q);"value"in v&&r(p,"value",null,v.value),(h=v.onVnodeBeforeMount)&&vs(h,l,e)}E(p,e,e.scopeId,u,l)}b&&Io(e,null,l,"beforeMount");const C=(!i||i&&!i.pendingBranch)&&_&&!_.persisted;C&&_.beforeEnter(p),n(p,t,o),((h=v&&v.onVnodeMounted)||C||b)&&Tr((()=>{h&&vs(h,l,e),C&&_.enter(p),b&&Io(e,null,l,"mounted")}),i)},E=(e,t,n,o,r)=>{if(n&&p(e,n),o)for(let s=0;s<o.length;s++)p(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;E(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},A=(e,t,n,o,r,s,l,i,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=i?ds(e[a]):ps(e[a]);_(null,c,t,n,o,r,s,l,i)}},F=(e,t,n,o,s,l,i)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=t;u|=16&e.patchFlag;const d=e.props||h,g=t.props||h;let v;n&&Nr(n,!1),(v=g.onVnodeBeforeUpdate)&&vs(v,n,t,e),p&&Io(t,e,n,"beforeUpdate"),n&&Nr(n,!0);const m=s&&"foreignObject"!==t.type;if(f?T(e.dynamicChildren,f,c,n,o,m,l):i||$(e,t,c,null,n,o,m,l,!1),u>0){if(16&u)O(c,t,d,g,n,o,s);else if(2&u&&d.class!==g.class&&r(c,"class",null,g.class,s),4&u&&r(c,"style",d.style,g.style,s),8&u){const l=t.dynamicProps;for(let t=0;t<l.length;t++){const i=l[t],a=d[i],u=g[i];u===a&&"value"!==i||r(c,i,a,u,s,e.children,n,o,Q)}}1&u&&e.children!==t.children&&a(c,t.children)}else i||null!=f||O(c,t,d,g,n,o,s);((v=g.onVnodeUpdated)||p)&&Tr((()=>{v&&vs(v,n,t,e),p&&Io(t,e,n,"updated")}),o)},T=(e,t,n,o,r,s,l)=>{for(let i=0;i<t.length;i++){const c=e[i],a=t[i],f=c.el&&(c.type===jr||!es(c,a)||70&c.shapeFlag)?u(c.el):n;_(c,a,f,null,o,r,s,l,!0)}},O=(e,t,n,o,s,l,i)=>{if(n!==o){for(const c in o){if(V(c))continue;const a=o[c],u=n[c];a!==u&&"value"!==c&&r(e,c,u,a,i,t.children,s,l,Q)}if(n!==h)for(const c in n)V(c)||c in o||r(e,c,n[c],null,i,t.children,s,l,Q);"value"in o&&r(e,"value",n.value,o.value)}},P=(e,t,o,r,s,i,c,a,u)=>{const f=t.el=e?e.el:l(""),p=t.anchor=e?e.anchor:l("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(a=a?a.concat(g):g),null==e?(n(f,o,r),n(p,o,r),A(t.children,o,p,s,i,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(T(e.dynamicChildren,h,o,s,i,c,a),(null!=t.key||s&&t===s.subTree)&&Rr(e,t,!0)):$(e,t,o,p,s,i,c,a,u)},L=(e,t,n,o,r,s,l,i,c)=>{t.slotScopeIds=i,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,l,c):R(t,n,o,r,s,l,c):M(e,t,c)},R=(e,t,n,o,r,s,l)=>{const i=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||ms,s={uid:_s++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Z(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:fr(o,r),emitsOptions:xn(o,r),emit:null,emitted:null,propsDefaults:h,inheritAttrs:o.inheritAttrs,ctx:h,data:h,props:h,attrs:h,slots:h,refs:h,setupState:h,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=Cn.bind(null,s),e.ce&&e.ce(s);return s}(e,o,r);if(ho(e)&&(i.ctx.renderer=ne),function(e,t=!1){Es=t;const{props:n,children:o}=e.vnode,r=ws(e);(function(e,t,n,o=!1){const r={},s={};q(s,ns,1),e.propsDefaults=Object.create(null),ar(e,t,r,s);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);e.props=n?o?r:dt(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Ct(t),q(t,"_",n)):yr(t,e.slots={})}else e.slots={},t&&br(e,t);q(e.slots,ns,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=xt(new Proxy(e.ctx,Yo));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?Ps(e):null;Cs(e),_e();const r=Kt(o,e,0,[e.props,n]);if(ye(),xs(),N(r)){if(r.then(xs,xs),t)return r.then((n=>{As(e,n,t)})).catch((t=>{qt(t,e,0)}));e.asyncDep=r}else As(e,r,t)}else Os(e,t)}(e,t):void 0;Es=!1}(i),i.asyncDep){if(r&&r.registerDep(i,I),!e.el){const e=i.subTree=ls(Dr);b(null,e,t,n)}}else I(i,e,t,n,r,s,l)},M=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:l,children:i,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!i||i&&i.$stable)||o!==l&&(o?!l||Rn(o,l,a):!!l);if(1024&c)return!0;if(16&c)return o?Rn(o,l,a):!!l;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(l[n]!==o[n]&&!wn(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void B(o,t,n);o.next=t,function(e){const t=Xt.indexOf(e);t>Zt&&Xt.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},I=(e,t,n,o,r,s,l)=>{const i=e.effect=new pe((()=>{if(e.isMounted){let t,{next:n,bu:o,u:i,parent:c,vnode:a}=e,f=n;Nr(e,!1),n?(n.el=a.el,B(e,n,l)):n=a,o&&G(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&vs(t,c,n,a),Nr(e,!0);const p=Pn(e),d=e.subTree;e.subTree=p,_(d,p,u(d.el),ee(d),e,r,s),n.el=p.el,null===f&&Mn(e,p.el),i&&Tr(i,r),(t=n.props&&n.props.onVnodeUpdated)&&Tr((()=>vs(t,c,n,a)),r)}else{let l;const{el:i,props:c}=t,{bm:a,m:u,parent:f}=e,p=uo(t);if(Nr(e,!1),a&&G(a),!p&&(l=c&&c.onVnodeBeforeMount)&&vs(l,f,t),Nr(e,!0),i&&re){const n=()=>{e.subTree=Pn(e),re(i,e.subTree,e,r,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const l=e.subTree=Pn(e);_(null,l,n,o,e,r,s),t.el=l.el}if(u&&Tr(u,r),!p&&(l=c&&c.onVnodeMounted)){const e=t;Tr((()=>vs(l,f,e)),r)}(256&t.shapeFlag||f&&uo(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&Tr(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>un(c)),e.scope),c=e.update=()=>i.run();c.id=e.uid,Nr(e,!0),c()},B=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:l}}=e,i=Ct(r),[c]=e.propsOptions;let a=!1;if(!(o||l>0)||16&l){let o;ar(e,t,r,s)&&(a=!0);for(const s in i)t&&(S(t,s)||(o=H(s))!==s&&S(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=ur(c,i,s,void 0,e,!0)):delete r[s]);if(s!==i)for(const e in s)t&&S(t,e)||(delete s[e],a=!0)}else if(8&l){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let l=n[o];if(wn(e.emitsOptions,l))continue;const u=t[l];if(c)if(S(s,l))u!==s[l]&&(s[l]=u,a=!0);else{const t=U(l);r[t]=ur(c,i,t,u,e,!1)}else u!==s[l]&&(s[l]=u,a=!0)}}a&&xe(e,"set","$attrs")}(e,t.props,o,n),((e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,l=h;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(C(r,t),n||1!==e||delete r._):(s=!t.$stable,yr(t,r)),l=t}else t&&(br(e,t),l={default:1});if(s)for(const i in r)vr(i)||i in l||delete r[i]})(e,t.children,n),_e(),hn(void 0,e.update),ye()},$=(e,t,n,o,r,s,l,i,c=!1)=>{const u=e&&e.children,f=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void D(u,p,n,o,r,s,l,i,c);if(256&d)return void j(u,p,n,o,r,s,l,i,c)}8&h?(16&f&&Q(u,r,s),p!==u&&a(n,p)):16&f?16&h?D(u,p,n,o,r,s,l,i,c):Q(u,r,s,!0):(8&f&&a(n,""),16&h&&A(p,n,o,r,s,l,i,c))},j=(e,t,n,o,r,s,l,i,c)=>{const a=(e=e||g).length,u=(t=t||g).length,f=Math.min(a,u);let p;for(p=0;p<f;p++){const o=t[p]=c?ds(t[p]):ps(t[p]);_(e[p],o,n,null,r,s,l,i,c)}a>u?Q(e,r,s,!0,!1,f):A(t,n,o,r,s,l,i,c,f)},D=(e,t,n,o,r,s,l,i,c)=>{let a=0;const u=t.length;let f=e.length-1,p=u-1;for(;a<=f&&a<=p;){const o=e[a],u=t[a]=c?ds(t[a]):ps(t[a]);if(!es(o,u))break;_(o,u,n,null,r,s,l,i,c),a++}for(;a<=f&&a<=p;){const o=e[f],a=t[p]=c?ds(t[p]):ps(t[p]);if(!es(o,a))break;_(o,a,n,null,r,s,l,i,c),f--,p--}if(a>f){if(a<=p){const e=p+1,f=e<u?t[e].el:o;for(;a<=p;)_(null,t[a]=c?ds(t[a]):ps(t[a]),n,f,r,s,l,i,c),a++}}else if(a>p)for(;a<=f;)z(e[a],r,s,!0),a++;else{const d=a,h=a,v=new Map;for(a=h;a<=p;a++){const e=t[a]=c?ds(t[a]):ps(t[a]);null!=e.key&&v.set(e.key,a)}let m,y=0;const b=p-h+1;let C=!1,x=0;const w=new Array(b);for(a=0;a<b;a++)w[a]=0;for(a=d;a<=f;a++){const o=e[a];if(y>=b){z(o,r,s,!0);continue}let u;if(null!=o.key)u=v.get(o.key);else for(m=h;m<=p;m++)if(0===w[m-h]&&es(o,t[m])){u=m;break}void 0===u?z(o,r,s,!0):(w[u-h]=a+1,u>=x?x=u:C=!0,_(o,t[u],n,null,r,s,l,i,c),y++)}const S=C?function(e){const t=e.slice(),n=[0];let o,r,s,l,i;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,l=n.length-1;s<l;)i=s+l>>1,e[n[i]]<c?s=i+1:l=i;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,l=n[s-1];for(;s-- >0;)n[s]=l,l=t[l];return n}(w):g;for(m=S.length-1,a=b-1;a>=0;a--){const e=h+a,f=t[e],p=e+1<u?t[e+1].el:o;0===w[a]?_(null,f,n,p,r,s,l,i,c):C&&(m<0||a!==S[m]?W(f,n,p,2):m--)}}},W=(e,t,o,r,s=null)=>{const{el:l,type:i,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void W(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void i.move(e,t,o,ne);if(i===jr){n(l,t,o);for(let e=0;e<a.length;e++)W(a[e],t,o,r);return void n(e.anchor,t,o)}if(i===Hr)return void(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=f(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(l),n(l,t,o),Tr((()=>c.enter(l)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,i=()=>n(l,t,o),a=()=>{e(l,(()=>{i(),s&&s()}))};r?r(l,i,a):a()}else n(l,t,o)},z=(e,t,n,o=!1,r=!1)=>{const{type:s,props:l,ref:i,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:f,dirs:p}=e;if(null!=i&&Sr(i,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&p,h=!uo(e);let g;if(h&&(g=l&&l.onVnodeBeforeUnmount)&&vs(g,t,e),6&u)X(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&Io(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ne,o):a&&(s!==jr||f>0&&64&f)?Q(a,t,n,!1,!0):(s===jr&&384&f||!r&&16&u)&&Q(c,t,n),o&&K(e)}(h&&(g=l&&l.onVnodeUnmounted)||d)&&Tr((()=>{g&&vs(g,t,e),d&&Io(e,null,t,"unmounted")}),n)},K=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===jr)return void J(n,r);if(t===Hr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),o(e),e=n;o(t)})(e);const l=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,l);o?o(e.el,l,r):r()}else l()},J=(e,t)=>{let n;for(;e!==t;)n=f(e),o(e),e=n;o(t)},X=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:l,um:i}=e;o&&G(o),r.stop(),s&&(s.active=!1,z(l,e,t,n)),i&&Tr(i,t),Tr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,n,o=!1,r=!1,s=0)=>{for(let l=s;l<e.length;l++)z(e[l],t,n,o,r)},ee=e=>6&e.shapeFlag?ee(e.component.subTree):128&e.shapeFlag?e.suspense.next():f(e.anchor||e.el),te=(e,t,n)=>{null==e?t._vnode&&z(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),gn(),t._vnode=e},ne={p:_,um:z,m:W,r:K,mt:R,mc:A,pc:$,pbc:T,n:ee,o:e};let oe,re;return t&&([oe,re]=t(ne)),{render:te,hydrate:oe,createApp:wr(te,oe)}}function Nr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Rr(e,t,n=!1){const o=e.children,r=t.children;if(k(o)&&k(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=ds(r[s]),t.el=e.el),n||Rr(e,t))}}const Mr=e=>e&&(e.disabled||""===e.disabled),Ir=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Br=(e,t)=>{const n=e&&e.to;if(O(n)){if(t){return t(n)}return null}return n};function Vr(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:l,anchor:i,shapeFlag:c,children:a,props:u}=e,f=2===s;if(f&&o(l,t,n),(!f||Mr(u))&&16&c)for(let p=0;p<a.length;p++)r(a[p],t,n,2);f&&o(i,t,n)}const $r={__isTeleport:!0,process(e,t,n,o,r,s,l,i,c,a){const{mc:u,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:g}}=a,v=Mr(t.props);let{shapeFlag:m,children:_,dynamicChildren:y}=t;if(null==e){const e=t.el=g(""),a=t.anchor=g("");d(e,n,o),d(a,n,o);const f=t.target=Br(t.props,h),p=t.targetAnchor=g("");f&&(d(p,f),l=l||Ir(f));const y=(e,t)=>{16&m&&u(_,e,t,r,s,l,i,c)};v?y(n,a):f&&y(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,g=Mr(e.props),m=g?n:u,_=g?o:d;if(l=l||Ir(u),y?(p(e.dynamicChildren,y,m,r,s,l,i),Rr(e,t,!0)):c||f(e,t,m,_,r,s,l,i,!1),v)g||Vr(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Br(t.props,h);e&&Vr(t,e,null,a,0)}else g&&Vr(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},l){const{shapeFlag:i,children:c,anchor:a,targetAnchor:u,target:f,props:p}=e;if(f&&s(u),(l||!Mr(p))&&(s(a),16&i))for(let d=0;d<c.length;d++){const e=c[d];r(e,t,n,!0,!!e.dynamicChildren)}},move:Vr,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:l,parentNode:i,querySelector:c}},a){const u=t.target=Br(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(Mr(t.props))t.anchor=a(l(e),t,i(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=l(e);let i=c;for(;i;)if(i=l(i),i&&8===i.nodeType&&"teleport anchor"===i.data){t.targetAnchor=i,u._lpa=t.targetAnchor&&l(t.targetAnchor);break}a(c,t,u,n,o,r,s)}}return t.anchor&&l(t.anchor)}},jr=Symbol(void 0),Ur=Symbol(void 0),Dr=Symbol(void 0),Hr=Symbol(void 0),Wr=[];let zr=null;function Kr(e=!1){Wr.push(zr=e?null:[])}function Gr(){Wr.pop(),zr=Wr[Wr.length-1]||null}let qr=1;function Jr(e){qr+=e}function Yr(e){return e.dynamicChildren=qr>0?zr||g:null,Gr(),qr>0&&zr&&zr.push(e),e}function Xr(e,t,n,o,r,s){return Yr(ss(e,t,n,o,r,s,!0))}function Zr(e,t,n,o,r){return Yr(ls(e,t,n,o,r,!0))}function Qr(e){return!!e&&!0===e.__v_isVNode}function es(e,t){return e.type===t.type&&e.key===t.key}function ts(e){}const ns="__vInternal",os=({key:e})=>null!=e?e:null,rs=({ref:e,ref_key:t,ref_for:n})=>null!=e?O(e)||At(e)||T(e)?{i:Sn,r:e,k:t,f:!!n}:e:null;function ss(e,t=null,n=null,o=0,r=null,s=(e===jr?0:1),l=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&os(t),ref:t&&rs(t),scopeId:kn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return i?(hs(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=O(n)?8:16),qr>0&&!l&&zr&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&zr.push(c),c}const ls=function(e,t=null,n=null,o=0,s=null,l=!1){e&&e!==Vo||(e=Dr);if(Qr(e)){const o=cs(e,t,!0);return n&&hs(o,n),qr>0&&!l&&zr&&(6&o.shapeFlag?zr[zr.indexOf(e)]=o:zr.push(o)),o.patchFlag|=-2,o}i=e,T(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=is(t);let{class:e,style:n}=t;e&&!O(e)&&(t.class=c(e)),L(n)&&(bt(n)&&!k(n)&&(n=C({},n)),t.style=r(n))}const a=O(e)?1:In(e)?128:(e=>e.__isTeleport)(e)?64:L(e)?4:T(e)?2:0;return ss(e,t,n,o,s,a,l,!0)};function is(e){return e?bt(e)||ns in e?C({},e):e:null}function cs(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:l}=e,i=t?gs(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:i,key:i&&os(i),ref:t&&t.ref?n&&r?k(r)?r.concat(rs(t)):[r,rs(t)]:rs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==jr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cs(e.ssContent),ssFallback:e.ssFallback&&cs(e.ssFallback),el:e.el,anchor:e.anchor}}function as(e=" ",t=0){return ls(Ur,null,e,t)}function us(e,t){const n=ls(Hr,null,e);return n.staticCount=t,n}function fs(e="",t=!1){return t?(Kr(),Zr(Dr,null,e)):ls(Dr,null,e)}function ps(e){return null==e||"boolean"==typeof e?ls(Dr):k(e)?ls(jr,null,e.slice()):"object"==typeof e?ds(e):ls(Ur,null,String(e))}function ds(e){return null===e.el||e.memo?e:cs(e)}function hs(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),hs(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||ns in t?3===o&&Sn&&(1===Sn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Sn}}else T(t)?(t={default:t,_ctx:Sn},n=32):(t=String(t),64&o?(n=16,t=[as(t)]):n=8);e.children=t,e.shapeFlag|=n}function gs(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=c([t.class,o.class]));else if("style"===e)t.style=r([t.style,o.style]);else if(y(e)){const n=t[e],r=o[e];!r||n===r||k(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function vs(e,t,n,o=null){Gt(e,t,7,[n,o])}const ms=Cr();let _s=0;let ys=null;const bs=()=>ys||Sn,Cs=e=>{ys=e,e.scope.on()},xs=()=>{ys&&ys.scope.off(),ys=null};function ws(e){return 4&e.vnode.shapeFlag}let Ss,ks,Es=!1;function As(e,t,n){T(t)?e.render=t:L(t)&&(e.setupState=Mt(t)),Os(e,n)}function Fs(e){Ss=e,ks=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Xo))}}const Ts=()=>!Ss;function Os(e,t,n){const o=e.type;if(!e.render){if(!t&&Ss&&!o.render){const t=o.template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:l}=o,i=C(C({isCustomElement:n,delimiters:s},r),l);o.render=Ss(t,i)}}e.render=o.render||v,ks&&ks(e)}Cs(e),_e(),Qo(e),ye(),xs()}function Ps(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(be(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}function Ls(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Mt(xt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Jo?Jo[n](e):void 0}))}const Ns=/(?:^|[-_])(\w)/g;function Rs(e){return T(e)&&e.displayName||e.name}function Ms(e,t,n=!1){let o=Rs(t);if(!o&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(o=e[1])}if(!o&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};o=n(e.components||e.parent.type.components)||n(e.appContext.components)}return o?o.replace(Ns,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}const Is=(e,t)=>function(e,t,n=!1){let o,r;const s=T(e);return s?(o=e,r=v):(o=e.get,r=e.set),new Ut(o,r,s||!r,n)}(e,0,Es);function Bs(){return null}function Vs(){return null}function $s(e){}function js(e,t){return null}function Us(){return Hs().slots}function Ds(){return Hs().attrs}function Hs(){const e=bs();return e.setupContext||(e.setupContext=Ps(e))}function Ws(e,t){const n=k(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const o in t){const e=n[o];e?k(e)||T(e)?n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(n[o]={default:t[o]})}return n}function zs(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Ks(e){const t=bs();let n=e();return xs(),N(n)&&(n=n.catch((e=>{throw Cs(t),e}))),[n,()=>Cs(t)]}function Gs(e,t,n){const o=arguments.length;return 2===o?L(t)&&!k(t)?Qr(t)?ls(e,null,[t]):ls(e,t):ls(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Qr(n)&&(n=[n]),ls(e,t,n))}const qs=Symbol(""),Js=()=>{{const e=Wn(qs);return e||Ht("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Ys(){}function Xs(e,t,n,o){const r=n[o];if(r&&Zs(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function Zs(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(K(n[o],t[o]))return!1;return qr>0&&zr&&zr.push(e),!0}const Qs="3.2.36",el=null,tl=null,nl=null,ol="undefined"!=typeof document?document:null,rl=ol&&ol.createElement("template"),sl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?ol.createElementNS("http://www.w3.org/2000/svg",e):ol.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>ol.createTextNode(e),createComment:e=>ol.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ol.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o,r,s){const l=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{rl.innerHTML=o?`<svg>${e}</svg>`:e;const r=rl.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const ll=/\s*!important$/;function il(e,t,n){if(k(n))n.forEach((n=>il(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=al[t];if(n)return n;let o=U(t);if("filter"!==o&&o in e)return al[t]=o;o=W(o);for(let r=0;r<cl.length;r++){const n=cl[r]+o;if(n in e)return al[t]=n}return t}(e,t);ll.test(n)?e.setProperty(H(o),n.replace(ll,""),"important"):e[o]=n}}const cl=["Webkit","Moz","ms"],al={};const ul="http://www.w3.org/1999/xlink";const[fl,pl]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let dl=0;const hl=Promise.resolve(),gl=()=>{dl=0};function vl(e,t,n,o){e.addEventListener(t,n,o)}function ml(e,t,n,o,r=null){const s=e._vei||(e._vei={}),l=s[t];if(o&&l)l.value=o;else{const[n,i]=function(e){let t;if(_l.test(e)){let n;for(t={};n=e.match(_l);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[H(e.slice(2)),t]}(t);if(o){const l=s[t]=function(e,t){const n=e=>{const o=e.timeStamp||fl();(pl||o>=n.attached-1)&&Gt(function(e,t){if(k(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>dl||(hl.then(gl),dl=fl()))(),n}(o,r);vl(e,n,l,i)}else l&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,l,i),s[t]=void 0)}}const _l=/(?:Once|Passive|Capture)$/;const yl=/^on[a-z]/;function bl(e,t){const n=ao(e);class o extends wl{constructor(e){super(n,e,t)}}return o.def=n,o}const Cl=e=>bl(e,xi),xl="undefined"!=typeof HTMLElement?HTMLElement:class{};class wl extends xl{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,an((()=>{this._connected||(Ci(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=e=>{const{props:t,styles:n}=e,o=!k(t),r=t?o?Object.keys(t):t:[];let s;if(o)for(const l in this._props){const e=t[l];(e===Number||e&&e.type===Number)&&(this._props[l]=J(this._props[l]),(s||(s=Object.create(null)))[l]=!0)}this._numberProps=s;for(const l of Object.keys(this))"_"!==l[0]&&this._setProp(l,this[l],!0,!1);for(const l of r.map(U))Object.defineProperty(this,l,{get(){return this._getProp(l)},set(e){this._setProp(l,e)}});this._applyStyles(n),this._update()},t=this._def.__asyncLoader;t?t().then(e):e(this._def)}_setAttr(e){let t=this.getAttribute(e);this._numberProps&&this._numberProps[e]&&(t=J(t)),this._setProp(U(e),t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(H(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(H(e),t+""):t||this.removeAttribute(H(e))))}_update(){Ci(this._createVNode(),this.shadowRoot)}_createVNode(){const e=ls(this._def,C({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0,e.emit=(e,...t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof wl){e.parent=t._instance;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Sl(e="$style"){{const t=bs();if(!t)return h;const n=t.type.__cssModules;if(!n)return h;const o=n[e];return o||h}}function kl(e){const t=bs();if(!t)return;const n=()=>El(t.subTree,e(t.proxy));Kn(n),Eo((()=>{const e=new MutationObserver(n);e.observe(t.subTree.el.parentNode,{childList:!0}),Oo((()=>e.disconnect()))}))}function El(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{El(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Al(e.el,t);else if(e.type===jr)e.children.forEach((e=>El(e,t)));else if(e.type===Hr){let{el:n,anchor:o}=e;for(;n&&(Al(n,t),n!==o);)n=n.nextSibling}}function Al(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Fl=(e,{slots:t})=>Gs(no,Nl(e),t);Fl.displayName="Transition";const Tl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ol=Fl.props=C({},no.props,Tl),Pl=(e,t=[])=>{k(e)?e.forEach((e=>e(...t))):e&&e(...t)},Ll=e=>!!e&&(k(e)?e.some((e=>e.length>1)):e.length>1);function Nl(e){const t={};for(const C in e)C in Tl||(t[C]=e[C]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=l,appearToClass:u=i,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(L(e))return[Rl(e.enter),Rl(e.leave)];{const t=Rl(e);return[t,t]}}(r),g=h&&h[0],v=h&&h[1],{onBeforeEnter:m,onEnter:_,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:w=m,onAppear:S=_,onAppearCancelled:k=y}=t,E=(e,t,n)=>{Il(e,t?u:i),Il(e,t?a:l),n&&n()},A=(e,t)=>{e._isLeaving=!1,Il(e,f),Il(e,d),Il(e,p),t&&t()},F=e=>(t,n)=>{const r=e?S:_,l=()=>E(t,e,n);Pl(r,[t,l]),Bl((()=>{Il(t,e?c:s),Ml(t,e?u:i),Ll(r)||$l(t,o,g,l)}))};return C(t,{onBeforeEnter(e){Pl(m,[e]),Ml(e,s),Ml(e,l)},onBeforeAppear(e){Pl(w,[e]),Ml(e,c),Ml(e,a)},onEnter:F(!1),onAppear:F(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>A(e,t);Ml(e,f),Hl(),Ml(e,p),Bl((()=>{e._isLeaving&&(Il(e,f),Ml(e,d),Ll(b)||$l(e,o,v,n))})),Pl(b,[e,n])},onEnterCancelled(e){E(e,!1),Pl(y,[e])},onAppearCancelled(e){E(e,!0),Pl(k,[e])},onLeaveCancelled(e){A(e),Pl(x,[e])}})}function Rl(e){return J(e)}function Ml(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function Il(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Bl(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Vl=0;function $l(e,t,n,o){const r=e._endId=++Vl,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:l,timeout:i,propCount:c}=jl(e,t);if(!l)return o();const a=l+"end";let u=0;const f=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&f()};setTimeout((()=>{u<c&&f()}),i+1),e.addEventListener(a,p)}function jl(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),l=Ul(r,s),i=o("animationDelay"),c=o("animationDuration"),a=Ul(i,c);let u=null,f=0,p=0;"transition"===t?l>0&&(u="transition",f=l,p=s.length):"animation"===t?a>0&&(u="animation",f=a,p=c.length):(f=Math.max(l,a),u=f>0?l>a?"transition":"animation":null,p=u?"transition"===u?s.length:c.length:0);return{type:u,timeout:f,propCount:p,hasTransform:"transition"===u&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}function Ul(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Dl(t)+Dl(e[n]))))}function Dl(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Hl(){return document.body.offsetHeight}const Wl=new WeakMap,zl=new WeakMap,Kl={name:"TransitionGroup",props:C({},Ol,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=bs(),o=eo();let r,s;return Fo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=jl(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(Gl),r.forEach(ql);const o=r.filter(Jl);Hl(),o.forEach((e=>{const n=e.el,o=n.style;Ml(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,Il(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const l=Ct(e),i=Nl(l);let c=l.tag||jr;r=s,s=t.default?co(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&io(t,ro(t,i,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];io(t,ro(t,i,o,n)),Wl.set(t,t.el.getBoundingClientRect())}return ls(c,null,s)}}};function Gl(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function ql(e){zl.set(e,e.el.getBoundingClientRect())}function Jl(e){const t=Wl.get(e),n=zl.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const Yl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>G(t,e):t};function Xl(e){e.target.composing=!0}function Zl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ql={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=Yl(r);const s=o||r.props&&"number"===r.props.type;vl(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=J(o)),e._assign(o)})),n&&vl(e,"change",(()=>{e.value=e.value.trim()})),t||(vl(e,"compositionstart",Xl),vl(e,"compositionend",Zl),vl(e,"change",Zl))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=Yl(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&J(e.value)===t)return}const l=null==t?"":t;e.value!==l&&(e.value=l)}},ei={deep:!0,created(e,t,n){e._assign=Yl(n),vl(e,"change",(()=>{const t=e._modelValue,n=si(e),o=e.checked,r=e._assign;if(k(t)){const e=f(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(A(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(li(e,o))}))},mounted:ti,beforeUpdate(e,t,n){e._assign=Yl(n),ti(e,t,n)}};function ti(e,{value:t,oldValue:n},o){e._modelValue=t,k(t)?e.checked=f(t,o.props.value)>-1:A(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=u(t,li(e,!0)))}const ni={created(e,{value:t},n){e.checked=u(t,n.props.value),e._assign=Yl(n),vl(e,"change",(()=>{e._assign(si(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=Yl(o),t!==n&&(e.checked=u(t,o.props.value))}},oi={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=A(t);vl(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?J(si(e)):si(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=Yl(o)},mounted(e,{value:t}){ri(e,t)},beforeUpdate(e,t,n){e._assign=Yl(n)},updated(e,{value:t}){ri(e,t)}};function ri(e,t){const n=e.multiple;if(!n||k(t)||A(t)){for(let o=0,r=e.options.length;o<r;o++){const r=e.options[o],s=si(r);if(n)r.selected=k(t)?f(t,s)>-1:t.has(s);else if(u(si(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function si(e){return"_value"in e?e._value:e.value}function li(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ii={created(e,t,n){ci(e,t,n,null,"created")},mounted(e,t,n){ci(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){ci(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){ci(e,t,n,o,"updated")}};function ci(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return oi;case"TEXTAREA":return Ql;default:switch(t){case"checkbox":return ei;case"radio":return ni;default:return Ql}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const ai=["ctrl","shift","alt","meta"],ui={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>ai.some((n=>e[`${n}Key`]&&!t.includes(n)))},fi=(e,t)=>(n,...o)=>{for(let e=0;e<t.length;e++){const o=ui[t[e]];if(o&&o(n,t))return}return e(n,...o)},pi={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},di=(e,t)=>n=>{if(!("key"in n))return;const o=H(n.key);return t.some((e=>e===o||pi[e]===o))?e(n):void 0},hi={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):gi(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),gi(e,!0),o.enter(e)):o.leave(e,(()=>{gi(e,!1)})):gi(e,t))},beforeUnmount(e,{value:t}){gi(e,t)}};function gi(e,t){e.style.display=t?e._vod:"none"}const vi=C({patchProp:(e,t,r,s,l=!1,i,c,a,u)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,l):"style"===t?function(e,t,n){const o=e.style,r=O(n);if(n&&!r){for(const e in n)il(o,e,n[e]);if(t&&!O(t))for(const e in t)null==n[e]&&il(o,e,"")}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,r,s):y(t)?b(t)||ml(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&yl.test(t)&&T(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(yl.test(t)&&O(n))return!1;return t in e}(e,t,s,l))?function(e,t,n,r,s,l,i){if("innerHTML"===t||"textContent"===t)return r&&i(r,s,l),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const o=null==n?"":n;return e.value===o&&"OPTION"!==e.tagName||(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=o(n):null==n&&"string"===r?(n="",c=!0):"number"===r&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,i,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,r,s,l){if(s&&t.startsWith("xlink:"))null==r?e.removeAttributeNS(ul,t.slice(6,t.length)):e.setAttributeNS(ul,t,r);else{const s=n(t);null==r||s&&!o(r)?e.removeAttribute(t):e.setAttribute(t,s?"":r)}}(e,t,s,l))}},sl);let mi,_i=!1;function yi(){return mi||(mi=Or(vi))}function bi(){return mi=_i?mi:Pr(vi),_i=!0,mi}const Ci=(...e)=>{yi().render(...e)},xi=(...e)=>{bi().hydrate(...e)},wi=(...e)=>{const t=yi().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=ki(e);if(!o)return;const r=t._component;T(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},Si=(...e)=>{const t=bi().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=ki(e);if(t)return n(t,!0,t instanceof SVGElement)},t};function ki(e){if(O(e)){return document.querySelector(e)}return e}const Ei=v;export{no as BaseTransition,Dr as Comment,Z as EffectScope,jr as Fragment,go as KeepAlive,pe as ReactiveEffect,Hr as Static,Bn as Suspense,$r as Teleport,Ur as Text,Fl as Transition,Kl as TransitionGroup,wl as VueElement,Gt as callWithAsyncErrorHandling,Kt as callWithErrorHandling,U as camelize,W as capitalize,cs as cloneVNode,nl as compatUtils,Is as computed,wi as createApp,Zr as createBlock,fs as createCommentVNode,Xr as createElementBlock,ss as createElementVNode,Pr as createHydrationRenderer,zs as createPropsRestProxy,Or as createRenderer,Si as createSSRApp,Wo as createSlots,us as createStaticVNode,as as createTextVNode,ls as createVNode,Bt as customRef,fo as defineAsyncComponent,ao as defineComponent,bl as defineCustomElement,Vs as defineEmits,$s as defineExpose,Bs as defineProps,Cl as defineSSRCustomElement,_n as devtools,he as effect,Q as effectScope,bs as getCurrentInstance,te as getCurrentScope,co as getTransitionRawChildren,is as guardReactiveProps,Gs as h,qt as handleError,xi as hydrate,Ys as initCustomFormatter,Ei as initDirectivesForSSR,Wn as inject,Zs as isMemoSame,bt as isProxy,mt as isReactive,_t as isReadonly,At as isRef,Ts as isRuntimeOnly,yt as isShallow,Qr as isVNode,xt as markRaw,Ws as mergeDefaults,gs as mergeProps,an as nextTick,c as normalizeClass,a as normalizeProps,r as normalizeStyle,mo as onActivated,ko as onBeforeMount,To as onBeforeUnmount,Ao as onBeforeUpdate,_o as onDeactivated,Ro as onErrorCaptured,Eo as onMounted,No as onRenderTracked,Lo as onRenderTriggered,ne as onScopeDispose,Po as onServerPrefetch,Oo as onUnmounted,Fo as onUpdated,Kr as openBlock,Fn as popScopeId,Hn as provide,Mt as proxyRefs,An as pushScopeId,dn as queuePostFlushCb,pt as reactive,ht as readonly,Ft as ref,Fs as registerRuntimeCompiler,Ci as render,Ho as renderList,zo as renderSlot,Bo as resolveComponent,jo as resolveDirective,$o as resolveDynamicComponent,tl as resolveFilter,ro as resolveTransitionHooks,Jr as setBlockTracking,bn as setDevtoolsHook,io as setTransitionHooks,dt as shallowReactive,gt as shallowReadonly,Tt as shallowRef,qs as ssrContextKey,el as ssrUtils,ge as stop,p as toDisplayString,z as toHandlerKey,Go as toHandlers,Ct as toRaw,jt as toRef,Vt as toRefs,ts as transformVNodeArgs,Lt as triggerRef,Nt as unref,Ds as useAttrs,Sl as useCssModule,kl as useCssVars,Js as useSSRContext,Us as useSlots,eo as useTransitionState,ei as vModelCheckbox,ii as vModelDynamic,ni as vModelRadio,oi as vModelSelect,Ql as vModelText,hi as vShow,Qs as version,Ht as warn,Jn as watch,zn as watchEffect,Kn as watchPostEffect,Gn as watchSyncEffect,Ks as withAsyncContext,On as withCtx,js as withDefaults,Mo as withDirectives,di as withKeys,Xs as withMemo,fi as withModifiers,Tn as withScopeId}; +/** +* @vue/runtime-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],o=()=>{},r=()=>!1,s=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),i=e=>e.startsWith("onUpdate:"),l=Object.assign,c=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},a=Object.prototype.hasOwnProperty,u=(e,t)=>a.call(e,t),f=Array.isArray,p=e=>"[object Map]"===C(e),d=e=>"[object Set]"===C(e),h=e=>"[object Date]"===C(e),v=e=>"function"==typeof e,g=e=>"string"==typeof e,m=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,y=e=>(_(e)||v(e))&&v(e.then)&&v(e.catch),b=Object.prototype.toString,C=e=>b.call(e),x=e=>C(e).slice(8,-1),E=e=>"[object Object]"===C(e),S=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},k=/-(\w)/g,T=A((e=>e.replace(k,((e,t)=>t?t.toUpperCase():"")))),N=/\B([A-Z])/g,O=A((e=>e.replace(N,"-$1").toLowerCase())),L=A((e=>e.charAt(0).toUpperCase()+e.slice(1))),F=A((e=>e?`on${L(e)}`:"")),R=(e,t)=>!Object.is(e,t),P=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},I=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},M=e=>{const t=parseFloat(e);return isNaN(t)?e:t},B=e=>{const t=g(e)?Number(e):NaN;return isNaN(t)?e:t};let V;const U=()=>V||(V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),$=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");function j(e){if(f(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=g(o)?K(o):j(o);if(r)for(const e in r)t[e]=r[e]}return t}if(g(e)||_(e))return e}const D=/;(?![^(]*\))/g,H=/:([^]+)/,W=/\/\*[^]*?\*\//g;function K(e){const t={};return e.replace(W,"").split(D).forEach((e=>{if(e){const n=e.split(H);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function z(e){let t="";if(g(e))t=e;else if(f(e))for(let n=0;n<e.length;n++){const o=z(e[n]);o&&(t+=o+" ")}else if(_(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function G(e){if(!e)return null;let{class:t,style:n}=e;return t&&!g(t)&&(e.class=z(t)),n&&(e.style=j(n)),e}const q=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function J(e){return!!e||""===e}function X(e,t){if(e===t)return!0;let n=h(e),o=h(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=m(e),o=m(t),n||o)return e===t;if(n=f(e),o=f(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=X(e[o],t[o]);return n}(e,t);if(n=_(e),o=_(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!X(e[n],t[n]))return!1}}return String(e)===String(t)}function Y(e,t){return e.findIndex((e=>X(e,t)))}const Z=e=>g(e)?e:null==e?"":f(e)||_(e)&&(e.toString===b||!v(e.toString))?JSON.stringify(e,Q,2):String(e),Q=(e,t)=>t&&t.__v_isRef?Q(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[ee(t,o)+" =>"]=n,e)),{})}:d(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ee(e)))}:m(t)?ee(t):!_(t)||f(t)||E(t)?t:String(t),ee=(e,t="")=>{var n;return m(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let te,ne;class oe{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=te,!e&&te&&(this.index=(te.scopes||(te.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=te;try{return te=this,e()}finally{te=t}}}on(){te=this}off(){te=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function re(e){return new oe(e)}function se(e,t=te){t&&t.active&&t.effects.push(e)}function ie(){return te}function le(e){te&&te.cleanups.push(e)}class ce{constructor(e,t,n,o){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,se(this,o)}get dirty(){if(1===this._dirtyLevel){_e();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(ae(t.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),ye()}return this._dirtyLevel>=2}set dirty(e){this._dirtyLevel=e?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=ve,t=ne;try{return ve=!0,ne=this,this._runnings++,ue(this),this.fn()}finally{fe(this),this._runnings--,ne=t,ve=e}}stop(){var e;this.active&&(ue(this),fe(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function ae(e){return e.value}function ue(e){e._trackId++,e._depsLength=0}function fe(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)pe(e.deps[t],e);e.deps.length=e._depsLength}}function pe(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function de(e,t){e.effect instanceof ce&&(e=e.effect.fn);const n=new ce(e,o,(()=>{n.dirty&&n.run()}));t&&(l(n,t),t.scope&&se(n,t.scope)),t&&t.lazy||n.run();const r=n.run.bind(n);return r.effect=n,r}function he(e){e.effect.stop()}let ve=!0,ge=0;const me=[];function _e(){me.push(ve),ve=!1}function ye(){const e=me.pop();ve=void 0===e||e}function be(){ge++}function Ce(){for(ge--;!ge&&Ee.length;)Ee.shift()()}function xe(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&pe(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Ee=[];function Se(e,t,n){be();for(const o of e.keys())if(o._dirtyLevel<t&&e.get(o)===o._trackId){const e=o._dirtyLevel;o._dirtyLevel=t,0===e&&(o._shouldSchedule=!0,o.trigger())}we(e),Ce()}function we(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,Ee.push(t.scheduler))}const Ae=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},ke=new WeakMap,Te=Symbol(""),Ne=Symbol("");function Oe(e,t,n){if(ve&&ne){let t=ke.get(e);t||ke.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Ae((()=>t.delete(n)))),xe(ne,o)}}function Le(e,t,n,o,r,s){const i=ke.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&f(e)){const e=Number(o);i.forEach(((t,n)=>{("length"===n||!m(n)&&n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":f(e)?S(n)&&l.push(i.get("length")):(l.push(i.get(Te)),p(e)&&l.push(i.get(Ne)));break;case"delete":f(e)||(l.push(i.get(Te)),p(e)&&l.push(i.get(Ne)));break;case"set":p(e)&&l.push(i.get(Te))}be();for(const c of l)c&&Se(c,2);Ce()}const Fe=e("__proto__,__v_isRef,__isVue"),Re=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(m)),Pe=Ie();function Ie(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=wt(this);for(let t=0,r=this.length;t<r;t++)Oe(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(wt)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){_e(),be();const n=wt(this)[t].apply(this,e);return Ce(),ye(),n}})),e}function Me(e){const t=wt(this);return Oe(t,0,e),t.hasOwnProperty(e)}class Be{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const o=this._isReadonly,r=this._shallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?vt:ht:r?dt:pt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=f(e);if(!o){if(s&&u(Pe,t))return Reflect.get(Pe,t,n);if("hasOwnProperty"===t)return Me}const i=Reflect.get(e,t,n);return(m(t)?Re.has(t):Fe(t))?i:(o||Oe(e,0,t),r?i:Ft(i)?s&&S(t)?i:i.value:_(i)?o?_t(i):gt(i):i)}}class Ve extends Be{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._shallow){const t=xt(r);if(Et(n)||xt(n)||(r=wt(r),n=wt(n)),!f(e)&&Ft(r)&&!Ft(n))return!t&&(r.value=n,!0)}const s=f(e)&&S(t)?Number(t)<e.length:u(e,t),i=Reflect.set(e,t,n,o);return e===wt(o)&&(s?R(n,r)&&Le(e,"set",t,n):Le(e,"add",t,n)),i}deleteProperty(e,t){const n=u(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&Le(e,"delete",t,void 0),o}has(e,t){const n=Reflect.has(e,t);return m(t)&&Re.has(t)||Oe(e,0,t),n}ownKeys(e){return Oe(e,0,f(e)?"length":Te),Reflect.ownKeys(e)}}class Ue extends Be{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const $e=new Ve,je=new Ue,De=new Ve(!0),He=new Ue(!0),We=e=>e,Ke=e=>Reflect.getPrototypeOf(e);function ze(e,t,n=!1,o=!1){const r=wt(e=e.__v_raw),s=wt(t);n||(R(t,s)&&Oe(r,0,t),Oe(r,0,s));const{has:i}=Ke(r),l=o?We:n?Tt:kt;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function Ge(e,t=!1){const n=this.__v_raw,o=wt(n),r=wt(e);return t||(R(e,r)&&Oe(o,0,e),Oe(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function qe(e,t=!1){return e=e.__v_raw,!t&&Oe(wt(e),0,Te),Reflect.get(e,"size",e)}function Je(e){e=wt(e);const t=wt(this);return Ke(t).has.call(t,e)||(t.add(e),Le(t,"add",e,e)),this}function Xe(e,t){t=wt(t);const n=wt(this),{has:o,get:r}=Ke(n);let s=o.call(n,e);s||(e=wt(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?R(t,i)&&Le(n,"set",e,t):Le(n,"add",e,t),this}function Ye(e){const t=wt(this),{has:n,get:o}=Ke(t);let r=n.call(t,e);r||(e=wt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&Le(t,"delete",e,void 0),s}function Ze(){const e=wt(this),t=0!==e.size,n=e.clear();return t&&Le(e,"clear",void 0,void 0),n}function Qe(e,t){return function(n,o){const r=this,s=r.__v_raw,i=wt(s),l=t?We:e?Tt:kt;return!e&&Oe(i,0,Te),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function et(e,t,n){return function(...o){const r=this.__v_raw,s=wt(r),i=p(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?We:t?Tt:kt;return!t&&Oe(s,0,c?Ne:Te),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function tt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function nt(){const e={get(e){return ze(this,e)},get size(){return qe(this)},has:Ge,add:Je,set:Xe,delete:Ye,clear:Ze,forEach:Qe(!1,!1)},t={get(e){return ze(this,e,!1,!0)},get size(){return qe(this)},has:Ge,add:Je,set:Xe,delete:Ye,clear:Ze,forEach:Qe(!1,!0)},n={get(e){return ze(this,e,!0)},get size(){return qe(this,!0)},has(e){return Ge.call(this,e,!0)},add:tt("add"),set:tt("set"),delete:tt("delete"),clear:tt("clear"),forEach:Qe(!0,!1)},o={get(e){return ze(this,e,!0,!0)},get size(){return qe(this,!0)},has(e){return Ge.call(this,e,!0)},add:tt("add"),set:tt("set"),delete:tt("delete"),clear:tt("clear"),forEach:Qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=et(r,!1,!1),n[r]=et(r,!0,!1),t[r]=et(r,!1,!0),o[r]=et(r,!0,!0)})),[e,n,t,o]}const[ot,rt,st,it]=nt();function lt(e,t){const n=t?e?it:st:e?rt:ot;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(u(n,o)&&o in t?n:t,o,r)}const ct={get:lt(!1,!1)},at={get:lt(!1,!0)},ut={get:lt(!0,!1)},ft={get:lt(!0,!0)},pt=new WeakMap,dt=new WeakMap,ht=new WeakMap,vt=new WeakMap;function gt(e){return xt(e)?e:bt(e,!1,$e,ct,pt)}function mt(e){return bt(e,!1,De,at,dt)}function _t(e){return bt(e,!0,je,ut,ht)}function yt(e){return bt(e,!0,He,ft,vt)}function bt(e,t,n,o,r){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(x(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function Ct(e){return xt(e)?Ct(e.__v_raw):!(!e||!e.__v_isReactive)}function xt(e){return!(!e||!e.__v_isReadonly)}function Et(e){return!(!e||!e.__v_isShallow)}function St(e){return Ct(e)||xt(e)}function wt(e){const t=e&&e.__v_raw;return t?wt(t):e}function At(e){return I(e,"__v_skip",!0),e}const kt=e=>_(e)?gt(e):e,Tt=e=>_(e)?_t(e):e;class Nt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ce((()=>e(this._value)),(()=>Lt(this,1)),(()=>this.dep&&we(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=wt(this);return e._cacheable&&!e.effect.dirty||R(e._value,e._value=e.effect.run())&&Lt(e,2),Ot(e),e.effect._dirtyLevel>=1&&Lt(e,1),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Ot(e){ve&&ne&&(e=wt(e),xe(ne,e.dep||(e.dep=Ae((()=>e.dep=void 0),e instanceof Nt?e:void 0))))}function Lt(e,t=2,n){const o=(e=wt(e)).dep;o&&Se(o,t)}function Ft(e){return!(!e||!0!==e.__v_isRef)}function Rt(e){return It(e,!1)}function Pt(e){return It(e,!0)}function It(e,t){return Ft(e)?e:new Mt(e,t)}class Mt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:wt(e),this._value=t?e:kt(e)}get value(){return Ot(this),this._value}set value(e){const t=this.__v_isShallow||Et(e)||xt(e);e=t?e:wt(e),R(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:kt(e),Lt(this,2))}}function Bt(e){Lt(e,2)}function Vt(e){return Ft(e)?e.value:e}function Ut(e){return v(e)?e():Vt(e)}const $t={get:(e,t,n)=>Vt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Ft(r)&&!Ft(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function jt(e){return Ct(e)?e:new Proxy(e,$t)}class Dt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>Ot(this)),(()=>Lt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Ht(e){return new Dt(e)}function Wt(e){const t=f(e)?new Array(e.length):{};for(const n in e)t[n]=qt(e,n);return t}class Kt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=wt(this._object),t=this._key,null==(n=ke.get(e))?void 0:n.get(t);var e,t,n}}class zt{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Gt(e,t,n){return Ft(e)?e:v(e)?new zt(e):_(e)&&arguments.length>1?qt(e,t,n):Rt(e)}function qt(e,t,n){const o=e[t];return Ft(o)?o:new Kt(e,t,n)}const Jt={GET:"get",HAS:"has",ITERATE:"iterate"},Xt={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};function Yt(e,t){}const Zt={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"};function Qt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){tn(s,t,n)}return r}function en(e,t,n,o){if(v(e)){const r=Qt(e,t,n,o);return r&&y(r)&&r.catch((e=>{tn(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(en(e[s],t,n,o));return r}function tn(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const i=t.appContext.config.errorHandler;if(i)return void Qt(i,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let nn=!1,on=!1;const rn=[];let sn=0;const ln=[];let cn=null,an=0;const un=Promise.resolve();let fn=null;function pn(e){const t=fn||un;return e?t.then(this?e.bind(this):e):t}function dn(e){rn.length&&rn.includes(e,nn&&e.allowRecurse?sn+1:sn)||(null==e.id?rn.push(e):rn.splice(function(e){let t=sn+1,n=rn.length;for(;t<n;){const o=t+n>>>1,r=rn[o],s=_n(r);s<e||s===e&&r.pre?t=o+1:n=o}return t}(e.id),0,e),hn())}function hn(){nn||on||(on=!0,fn=un.then(bn))}function vn(e){f(e)?ln.push(...e):cn&&cn.includes(e,e.allowRecurse?an+1:an)||ln.push(e),hn()}function gn(e,t,n=(nn?sn+1:0)){for(;n<rn.length;n++){const t=rn[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;rn.splice(n,1),n--,t()}}}function mn(e){if(ln.length){const e=[...new Set(ln)].sort(((e,t)=>_n(e)-_n(t)));if(ln.length=0,cn)return void cn.push(...e);for(cn=e,an=0;an<cn.length;an++)cn[an]();cn=null,an=0}}const _n=e=>null==e.id?1/0:e.id,yn=(e,t)=>{const n=_n(e)-_n(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function bn(e){on=!1,nn=!0,rn.sort(yn);try{for(sn=0;sn<rn.length;sn++){const e=rn[sn];e&&!1!==e.active&&Qt(e,null,14)}}finally{sn=0,rn.length=0,mn(),nn=!1,fn=null,(rn.length||ln.length)&&bn()}}function Cn(e,n,...o){if(e.isUnmounted)return;const r=e.vnode.props||t;let s=o;const i=n.startsWith("update:"),l=i&&n.slice(7);if(l&&l in r){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:n,trim:i}=r[e]||t;i&&(s=o.map((e=>g(e)?e.trim():e))),n&&(s=o.map(M))}let c,a=r[c=F(n)]||r[c=F(T(n))];!a&&i&&(a=r[c=F(O(n))]),a&&en(a,e,6,s);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,en(u,e,6,s)}}function xn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},c=!1;if(!v(e)){const o=e=>{const n=xn(e,t,!0);n&&(c=!0,l(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||c?(f(s)?s.forEach((e=>i[e]=null)):l(i,s),_(e)&&o.set(e,i),i):(_(e)&&o.set(e,null),null)}function En(e,t){return!(!e||!s(t))&&(t=t.slice(2).replace(/Once$/,""),u(e,t[0].toLowerCase()+t.slice(1))||u(e,O(t))||u(e,t))}let Sn=null,wn=null;function An(e){const t=Sn;return Sn=e,wn=e&&e.type.__scopeId||null,t}function kn(e){wn=e}function Tn(){wn=null}const Nn=e=>On;function On(e,t=Sn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Ts(-1);const r=An(t);let s;try{s=e(...n)}finally{An(r),o._d&&Ts(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Ln(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:c,attrs:a,emit:u,render:f,renderCache:p,data:d,setupState:h,ctx:v,inheritAttrs:g}=e;let m,_;const y=An(e);try{if(4&n.shapeFlag){const e=r||o;m=Ks(f.call(e,e,p,s,h,d,v)),_=a}else{const e=t;0,m=Ks(e(s,e.length>1?{attrs:a,slots:c,emit:u}:null)),_=t.props?a:Fn(a)}}catch(C){Es.length=0,tn(C,e,1),m=Us(Cs)}let b=m;if(_&&!1!==g){const e=Object.keys(_),{shapeFlag:t}=b;e.length&&7&t&&(l&&e.some(i)&&(_=Rn(_,l)),b=js(b,_))}return n.dirs&&(b=js(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),m=b,An(y),m}const Fn=e=>{let t;for(const n in e)("class"===n||"style"===n||s(n))&&((t||(t={}))[n]=e[n]);return t},Rn=(e,t)=>{const n={};for(const o in e)i(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Pn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!En(n,s))return!0}return!1}function In({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}const Mn="components";function Bn(e,t){return jn(Mn,e,!0,t)||e}const Vn=Symbol.for("v-ndc");function Un(e){return g(e)?jn(Mn,e,!1)||e:e||Vn}function $n(e){return jn("directives",e)}function jn(e,t,n=!0,o=!1){const r=Sn||Zs;if(r){const n=r.type;if(e===Mn){const e=hi(n,!1);if(e&&(e===t||e===T(t)||e===L(T(t))))return n}const s=Dn(r[e]||n[e],t)||Dn(r.appContext[e],t);return!s&&o?n:s}}function Dn(e,t){return e&&(e[t]||e[T(t)]||e[L(T(t))])}const Hn=e=>e.__isSuspense;let Wn=0;const Kn={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){if(null==e)!function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,f=u("div"),p=e.suspense=Gn(e,r,o,t,f,n,s,i,l,c);a(null,p.pendingBranch=e.ssContent,f,null,o,p,s,i),p.deps>0?(zn(e,"onPending"),zn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),Xn(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a);else{if(s&&s.deps>0)return void(t.suspense=e.suspense);!function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:v,isInFallback:g,isHydrating:m}=f;if(v)f.pendingBranch=p,Rs(p,v)?(c(v,p,f.hiddenContainer,null,r,f,s,i,l),f.deps<=0?f.resolve():g&&(m||(c(h,d,n,o,r,null,s,i,l),Xn(f,d)))):(f.pendingId=Wn++,m?(f.isHydrating=!1,f.activeBranch=v):a(v,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),g?(c(null,p,f.hiddenContainer,null,r,f,s,i,l),f.deps<=0?f.resolve():(c(h,d,n,o,r,null,s,i,l),Xn(f,d))):h&&Rs(p,h)?(c(h,p,n,o,r,f,s,i,l),f.resolve(!0)):(c(null,p,f.hiddenContainer,null,r,f,s,i,l),f.deps<=0&&f.resolve()));else if(h&&Rs(p,h))c(h,p,n,o,r,f,s,i,l),Xn(f,p);else if(zn(t,"onPending"),f.pendingBranch=p,f.pendingId=512&p.shapeFlag?p.component.suspenseId:Wn++,c(null,p,f.hiddenContainer,null,r,f,s,i,l),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,o,r,i,l,c,a)}},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=Gn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve(!1,!0);return u},create:Gn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=qn(o?n.default:n),e.ssFallback=o?qn(n.fallback):Us(Cs)}};function zn(e,t){const n=e.props&&e.props[t];v(n)&&n()}function Gn(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:v,remove:g}}=a;let m;const _=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);_&&(null==t?void 0:t.pendingBranch)&&(m=t.pendingId,t.deps++);const y=e.props?B(e.props.timeout):void 0,b=s,C={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:Wn++,timeout:"number"==typeof y?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=C;let f=!1;C.isHydrating?C.isHydrating=!1:e||(f=r&&i.transition&&"out-in"===i.transition.mode,f&&(r.transition.afterLeave=()=>{l===C.pendingId&&(p(i,u,s===b?h(r):s,0),vn(c))}),r&&(v(r.el)!==C.hiddenContainer&&(s=h(r)),d(r,a,C,!0)),f||p(i,u,s,0)),Xn(C,i),C.pendingBranch=null,C.isInFallback=!1;let g=C.parent,y=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),y=!0;break}g=g.parent}y||f||vn(c),C.effects=[],_&&t&&t.pendingBranch&&m===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),zn(o,"onResolve")},fallback(e){if(!C.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,namespace:s}=C;zn(t,"onFallback");const i=h(n),a=()=>{C.isInFallback&&(f(null,e,r,i,o,null,s,l,c),Xn(C,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),C.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){C.activeBranch&&p(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&h(C.activeBranch),registerDep(e,t){const n=!!C.pendingBranch;n&&C.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{tn(t,e,0)})).then((r=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;ci(e,r,!1),o&&(s.el=o);const l=!o&&e.subTree.el;t(e,s,v(o||e.subTree.el),o?null:h(e.subTree),C,i,c),l&&g(l),In(e,s.el),n&&0==--C.deps&&C.resolve()}))},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&d(C.activeBranch,n,e,t),C.pendingBranch&&d(C.pendingBranch,n,e,t)}};return C}function qn(e){let t;if(v(e)){const n=ks&&e._c;n&&(e._d=!1,ws()),e=e(),n&&(e._d=!0,t=Ss,As())}if(f(e)){const t=function(e,t=!0){let n;for(let o=0;o<e.length;o++){const t=e[o];if(!Fs(t))return;if(t.type!==Cs||"v-if"===t.children){if(n)return;n=t}}return n}(e);e=t}return e=Ks(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Jn(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):vn(e)}function Xn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,In(o,r))}const Yn=Symbol.for("v-scx"),Zn=()=>Mr(Yn);function Qn(e,t){return ro(e,null,t)}function eo(e,t){return ro(e,null,{flush:"post"})}function to(e,t){return ro(e,null,{flush:"sync"})}const no={};function oo(e,t,n){return ro(e,t,n)}function ro(e,n,{immediate:r,deep:s,flush:i,once:l}=t){if(n&&l){const e=n;n=(...t)=>{e(...t),E()}}const a=Zs,u=e=>!0===s?e:lo(e,!1===s?1:void 0);let p,d,h=!1,g=!1;if(Ft(e)?(p=()=>e.value,h=Et(e)):Ct(e)?(p=()=>u(e),h=!0):f(e)?(g=!0,h=e.some((e=>Ct(e)||Et(e))),p=()=>e.map((e=>Ft(e)?e.value:Ct(e)?u(e):v(e)?Qt(e,a,2):void 0))):p=v(e)?n?()=>Qt(e,a,2):()=>(d&&d(),en(e,a,3,[m])):o,n&&s){const e=p;p=()=>lo(e())}let m=e=>{d=C.onStop=()=>{Qt(e,a,4),d=C.onStop=void 0}},_=g?new Array(e.length).fill(no):no;const y=()=>{if(C.active&&C.dirty)if(n){const e=C.run();(s||h||(g?e.some(((e,t)=>R(e,_[t]))):R(e,_)))&&(d&&d(),en(n,a,3,[e,_===no?void 0:g&&_[0]===no?[]:_,m]),_=e)}else C.run()};let b;y.allowRecurse=!!n,"sync"===i?b=y:"post"===i?b=()=>os(y,a&&a.suspense):(y.pre=!0,a&&(y.id=a.uid),b=()=>dn(y));const C=new ce(p,o,b),x=ie(),E=()=>{C.stop(),x&&c(x.effects,C)};return n?r?y():_=C.run():"post"===i?os(C.run.bind(C),a&&a.suspense):C.run(),E}function so(e,t,n){const o=this.proxy,r=g(e)?e.includes(".")?io(o,e):()=>o[e]:e.bind(o,o);let s;v(t)?s=t:(s=t.handler,n=t);const i=ni(this),l=ro(r,s.bind(o),n);return i(),l}function io(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function lo(e,t,n=0,o){if(!_(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),Ft(e))lo(e.value,t,n,o);else if(f(e))for(let r=0;r<e.length;r++)lo(e[r],t,n,o);else if(d(e)||p(e))e.forEach((e=>{lo(e,t,n,o)}));else if(E(e))for(const r in e)lo(e[r],t,n,o);return e}function co(e,n){if(null===Sn)return e;const o=di(Sn)||Sn.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<n.length;s++){let[e,i,l,c=t]=n[s];e&&(v(e)&&(e={mounted:e,updated:e}),e.deep&&lo(i),r.push({dir:e,instance:o,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e}function ao(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let c=l.dir[o];c&&(_e(),en(c,n,8,[e.el,l,e,t]),ye())}}const uo=Symbol("_leaveCb"),fo=Symbol("_enterCb");function po(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Uo((()=>{e.isMounted=!0})),Do((()=>{e.isUnmounting=!0})),e}const ho=[Function,Array],vo={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ho,onEnter:ho,onAfterEnter:ho,onEnterCancelled:ho,onBeforeLeave:ho,onLeave:ho,onAfterLeave:ho,onLeaveCancelled:ho,onBeforeAppear:ho,onAppear:ho,onAfterAppear:ho,onAppearCancelled:ho},go={name:"BaseTransition",props:vo,setup(e,{slots:t}){const n=Qs(),o=po();let r;return()=>{const s=t.default&&xo(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1)for(const e of s)if(e.type!==Cs){i=e;break}const l=wt(e),{mode:c}=l;if(o.isLeaving)return yo(i);const a=bo(i);if(!a)return yo(i);const u=_o(a,l,o,n);Co(a,u);const f=n.subTree,p=f&&bo(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==Cs&&(!Rs(a,p)||d)){const e=_o(p,l,o,n);if(Co(p,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},yo(i);"in-out"===c&&a.type!==Cs&&(e.delayLeave=(e,t,n)=>{mo(o,p)[String(p.key)]=p,e[uo]=()=>{t(),e[uo]=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function mo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function _o(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:v,onBeforeAppear:g,onAppear:m,onAfterAppear:_,onAppearCancelled:y}=t,b=String(e.key),C=mo(n,e),x=(e,t)=>{e&&en(e,o,9,t)},E=(e,t)=>{const n=t[1];x(e,t),f(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},S={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=g||l}t[uo]&&t[uo](!0);const s=C[b];s&&Rs(e,s)&&s.el[uo]&&s.el[uo](),x(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=m||c,o=_||a,s=y||u}let i=!1;const l=e[fo]=t=>{i||(i=!0,x(t?s:o,[e]),S.delayedLeave&&S.delayedLeave(),e[fo]=void 0)};t?E(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t[fo]&&t[fo](!0),n.isUnmounting)return o();x(p,[t]);let s=!1;const i=t[uo]=n=>{s||(s=!0,o(),x(n?v:h,[t]),t[uo]=void 0,C[r]===e&&delete C[r])};C[r]=e,d?E(d,[t,i]):i()},clone:e=>_o(e,t,n,o)};return S}function yo(e){if(ko(e))return(e=js(e)).children=null,e}function bo(e){return ko(e)?e.children?e.children[0]:void 0:e}function Co(e,t){6&e.shapeFlag&&e.component?Co(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function xo(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let i=e[s];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:s);i.type===ys?(128&i.patchFlag&&r++,o=o.concat(xo(i.children,t,l))):(t||i.type!==Cs)&&o.push(null!=l?js(i,{key:l}):i)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o} +/*! #__NO_SIDE_EFFECTS__ */function Eo(e,t){return v(e)?(()=>l({name:e.name},t,{setup:e}))():e}const So=e=>!!e.type.__asyncLoader +/*! #__NO_SIDE_EFFECTS__ */;function wo(e){v(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const f=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,f()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return Eo({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return c},setup(){const e=Zs;if(c)return()=>Ao(c,e);const t=t=>{a=null,tn(t,e,13,!o)};if(i&&e.suspense)return f().then((t=>()=>Ao(t,e))).catch((e=>(t(e),()=>o?Us(o,{error:e}):null)));const l=Rt(!1),u=Rt(),p=Rt(!!r);return r&&setTimeout((()=>{p.value=!1}),r),null!=s&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),f().then((()=>{l.value=!0,e.parent&&ko(e.parent.vnode)&&(e.parent.effect.dirty=!0,dn(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?Ao(c,e):u.value&&o?Us(o,{error:u.value}):n&&!p.value?Us(n):void 0}})}function Ao(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=Us(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const ko=e=>e.type.__isKeepAlive,To={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Qs(),o=n.ctx,r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:f}}}=o,p=f("div");function d(e){Po(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=hi(t.type);!o||e&&e(o)||v(n)}))}function v(e){const t=r.get(e);i&&Rs(t,i)?i&&Po(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),os((()=>{s.isDeactivated=!1,s.a&&P(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Js(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;a(e,p,null,1,l),os((()=>{t.da&&P(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Js(n,t.parent,e),t.isDeactivated=!0}),l)},oo((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>No(e,t))),t&&h((e=>!No(t,e)))}),{flush:"post",deep:!0});let g=null;const m=()=>{null!=g&&r.set(g,Io(n.subTree))};return Uo(m),jo(m),Do((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=Io(t);if(e.type!==r.type||e.key!==r.key)d(e);else{Po(r);const e=r.component.da;e&&os(e,o)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!(Fs(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let l=Io(o);const c=l.type,a=hi(So(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:f,max:p}=e;if(u&&(!a||!No(u,a))||f&&a&&No(f,a))return i=l,o;const d=null==l.key?c:l.key,h=r.get(d);return l.el&&(l=js(l),128&o.shapeFlag&&(o.ssContent=l)),g=d,h?(l.el=h.el,l.component=h.component,l.transition&&Co(l,l.transition),l.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&v(s.values().next().value)),l.shapeFlag|=256,i=l,Hn(o.type)?o:l}}};function No(e,t){return f(e)?e.some((e=>No(e,t))):g(e)?e.split(",").includes(t):"[object RegExp]"===C(e)&&e.test(t)}function Oo(e,t){Fo(e,"a",t)}function Lo(e,t){Fo(e,"da",t)}function Fo(e,t,n=Zs){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Mo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)ko(e.parent.vnode)&&Ro(o,t,n,e),e=e.parent}}function Ro(e,t,n,o){const r=Mo(t,e,o,!0);Ho((()=>{c(o[t],r)}),n)}function Po(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Io(e){return 128&e.shapeFlag?e.ssContent:e}function Mo(e,t,n=Zs,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;_e();const r=ni(n),s=en(t,n,e,o);return r(),ye(),s});return o?r.unshift(s):r.push(s),s}}const Bo=e=>(t,n=Zs)=>(!li||"sp"===e)&&Mo(e,((...e)=>t(...e)),n),Vo=Bo("bm"),Uo=Bo("m"),$o=Bo("bu"),jo=Bo("u"),Do=Bo("bum"),Ho=Bo("um"),Wo=Bo("sp"),Ko=Bo("rtg"),zo=Bo("rtc");function Go(e,t=Zs){Mo("ec",e,t)}function qo(e,t,n,o){let r;const s=n&&n[o];if(f(e)||g(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(_(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[o]=t(e[i],i,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r}function Jo(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(f(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.key?(...e)=>{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function Xo(e,t,n={},o,r){if(Sn.isCE||Sn.parent&&So(Sn.parent)&&Sn.parent.isCE)return"default"!==t&&(n.name=t),Us("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),ws();const i=s&&Yo(s(n)),l=Ls(ys,{key:n.key||i&&i.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Yo(e){return e.some((e=>!Fs(e)||e.type!==Cs&&!(e.type===ys&&!Yo(e.children))))?e:null}function Zo(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:F(o)]=e[o];return n}const Qo=e=>e?ri(e)?di(e)||e.proxy:Qo(e.parent):null,er=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qo(e.parent),$root:e=>Qo(e.root),$emit:e=>e.emit,$options:e=>Er(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,dn(e.update)}),$nextTick:e=>e.n||(e.n=pn.bind(e.proxy)),$watch:e=>so.bind(e)}),tr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),nr={get({_:e},n){const{ctx:o,setupState:r,data:s,props:i,accessCache:l,type:c,appContext:a}=e;let f;if("$"!==n[0]){const c=l[n];if(void 0!==c)switch(c){case 1:return r[n];case 2:return s[n];case 4:return o[n];case 3:return i[n]}else{if(tr(r,n))return l[n]=1,r[n];if(s!==t&&u(s,n))return l[n]=2,s[n];if((f=e.propsOptions[0])&&u(f,n))return l[n]=3,i[n];if(o!==t&&u(o,n))return l[n]=4,o[n];yr&&(l[n]=0)}}const p=er[n];let d,h;return p?("$attrs"===n&&Oe(e,0,n),p(e)):(d=c.__cssModules)&&(d=d[n])?d:o!==t&&u(o,n)?(l[n]=4,o[n]):(h=a.config.globalProperties,u(h,n)?h[n]:void 0)},set({_:e},n,o){const{data:r,setupState:s,ctx:i}=e;return tr(s,n)?(s[n]=o,!0):r!==t&&u(r,n)?(r[n]=o,!0):!u(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(i[n]=o,!0))},has({_:{data:e,setupState:n,accessCache:o,ctx:r,appContext:s,propsOptions:i}},l){let c;return!!o[l]||e!==t&&u(e,l)||tr(n,l)||(c=i[0])&&u(c,l)||u(r,l)||u(er,l)||u(s.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:u(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},or=l({},nr,{get(e,t){if(t!==Symbol.unscopables)return nr.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!$(t)});function rr(){return null}function sr(){return null}function ir(e){}function lr(e){}function cr(){return null}function ar(){}function ur(e,t){return null}function fr(){return dr().slots}function pr(){return dr().attrs}function dr(){const e=Qs();return e.setupContext||(e.setupContext=pi(e))}function hr(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function vr(e,t){const n=hr(e);for(const o in t){if(o.startsWith("__skip"))continue;let e=n[o];e?f(e)||v(e)?e=n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(e=n[o]={default:t[o]}),e&&t[`__skip_${o}`]&&(e.skipFactory=!0)}return n}function gr(e,t){return e&&t?f(e)&&f(t)?e.concat(t):l({},hr(e),hr(t)):e||t}function mr(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function _r(e){const t=Qs();let n=e();return oi(),y(n)&&(n=n.catch((e=>{throw ni(t),e}))),[n,()=>ni(t)]}let yr=!0;function br(e){const t=Er(e),n=e.proxy,r=e.ctx;yr=!1,t.beforeCreate&&Cr(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:c,provide:a,inject:u,created:p,beforeMount:d,mounted:h,beforeUpdate:g,updated:m,activated:y,deactivated:b,beforeUnmount:C,unmounted:x,render:E,renderTracked:S,renderTriggered:w,errorCaptured:A,serverPrefetch:k,expose:T,inheritAttrs:N,components:O,directives:L}=t;if(u&&function(e,t,n=o){f(e)&&(e=kr(e));for(const o in e){const n=e[o];let r;r=_(n)?"default"in n?Mr(n.from||o,n.default,!0):Mr(n.from||o):Mr(n),Ft(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(u,r,null),l)for(const o in l){const e=l[o];v(e)&&(r[o]=e.bind(n))}if(s){const t=s.call(n,n);_(t)&&(e.data=gt(t))}if(yr=!0,i)for(const f in i){const e=i[f],t=v(e)?e.bind(n,n):v(e.get)?e.get.bind(n,n):o,s=!v(e)&&v(e.set)?e.set.bind(n):o,l=vi({get:t,set:s});Object.defineProperty(r,f,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const o in c)xr(c[o],r,n,o);if(a){const e=v(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Ir(t,e[t])}))}function F(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&Cr(p,e,"c"),F(Vo,d),F(Uo,h),F($o,g),F(jo,m),F(Oo,y),F(Lo,b),F(Go,A),F(zo,S),F(Ko,w),F(Do,C),F(Ho,x),F(Wo,k),f(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});E&&e.render===o&&(e.render=E),null!=N&&(e.inheritAttrs=N),O&&(e.components=O),L&&(e.directives=L)}function Cr(e,t,n){en(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function xr(e,t,n,o){const r=o.includes(".")?io(n,o):()=>n[o];if(g(e)){const n=t[e];v(n)&&oo(r,n)}else if(v(e))oo(r,e.bind(n));else if(_(e))if(f(e))e.forEach((e=>xr(e,t,n,o)));else{const o=v(e.handler)?e.handler.bind(n):t[e.handler];v(o)&&oo(r,o,e)}}function Er(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>Sr(c,e,i,!0))),Sr(c,t,i)):c=t,_(t)&&s.set(t,c),c}function Sr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Sr(e,s,n,!0),r&&r.forEach((t=>Sr(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=wr[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const wr={data:Ar,props:Or,emits:Or,methods:Nr,computed:Nr,beforeCreate:Tr,created:Tr,beforeMount:Tr,mounted:Tr,beforeUpdate:Tr,updated:Tr,beforeDestroy:Tr,beforeUnmount:Tr,destroyed:Tr,unmounted:Tr,activated:Tr,deactivated:Tr,errorCaptured:Tr,serverPrefetch:Tr,components:Nr,directives:Nr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=l(Object.create(null),e);for(const o in t)n[o]=Tr(e[o],t[o]);return n},provide:Ar,inject:function(e,t){return Nr(kr(e),kr(t))}};function Ar(e,t){return t?e?function(){return l(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function kr(e){if(f(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Tr(e,t){return e?[...new Set([].concat(e,t))]:t}function Nr(e,t){return e?l(Object.create(null),e,t):t}function Or(e,t){return e?f(e)&&f(t)?[...new Set([...e,...t])]:l(Object.create(null),hr(e),hr(null!=t?t:{})):t}function Lr(){return{app:null,config:{isNativeTag:r,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Fr=0;function Rr(e,t){return function(n,o=null){v(n)||(n=l({},n)),null==o||_(o)||(o=null);const r=Lr(),s=new WeakSet;let i=!1;const c=r.app={_uid:Fr++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Ci,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&v(e.install)?(s.add(e),e.install(c,...t)):v(e)&&(s.add(e),e(c,...t))),c),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),c),component:(e,t)=>t?(r.components[e]=t,c):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,c):r.directives[e],mount(s,l,a){if(!i){const u=Us(n,o);return u.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),l&&t?t(u,s):e(u,s,a),i=!0,c._container=s,s.__vue_app__=c,di(u.component)||u.component.proxy}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,c),runWithContext(e){Pr=c;try{return e()}finally{Pr=null}}};return c}}let Pr=null;function Ir(e,t){if(Zs){let n=Zs.provides;const o=Zs.parent&&Zs.parent.provides;o===n&&(n=Zs.provides=Object.create(o)),n[e]=t}else;}function Mr(e,t,n=!1){const o=Zs||Sn;if(o||Pr){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:Pr._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&v(t)?t.call(o&&o.proxy):t}}function Br(){return!!(Zs||Sn||Pr)}function Vr(e,n,o,r){const[s,i]=e.propsOptions;let l,c=!1;if(n)for(let t in n){if(w(t))continue;const a=n[t];let f;s&&u(s,f=T(t))?i&&i.includes(f)?(l||(l={}))[f]=a:o[f]=a:En(e.emitsOptions,t)||t in r&&a===r[t]||(r[t]=a,c=!0)}if(i){const n=wt(o),r=l||t;for(let t=0;t<i.length;t++){const l=i[t];o[l]=Ur(s,n,l,r[l],e,!u(r,l))}}return c}function Ur(e,t,n,o,r,s){const i=e[n];if(null!=i){const e=u(i,"default");if(e&&void 0===o){const e=i.default;if(i.type!==Function&&!i.skipFactory&&v(e)){const{propsDefaults:s}=r;if(n in s)o=s[n];else{const i=ni(r);o=s[n]=e.call(null,t),i()}}else o=e}i[0]&&(s&&!e?o=!1:!i[1]||""!==o&&o!==O(n)||(o=!0))}return o}function $r(e,o,r=!1){const s=o.propsCache,i=s.get(e);if(i)return i;const c=e.props,a={},p=[];let d=!1;if(!v(e)){const t=e=>{d=!0;const[t,n]=$r(e,o,!0);l(a,t),n&&p.push(...n)};!r&&o.mixins.length&&o.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!d)return _(e)&&s.set(e,n),n;if(f(c))for(let n=0;n<c.length;n++){const e=T(c[n]);jr(e)&&(a[e]=t)}else if(c)for(const t in c){const e=T(t);if(jr(e)){const n=c[t],o=a[e]=f(n)||v(n)?{type:n}:l({},n);if(o){const t=Wr(Boolean,o.type),n=Wr(String,o.type);o[0]=t>-1,o[1]=n<0||t<n,(t>-1||u(o,"default"))&&p.push(e)}}}const h=[a,p];return _(e)&&s.set(e,h),h}function jr(e){return"$"!==e[0]}function Dr(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function Hr(e,t){return Dr(e)===Dr(t)}function Wr(e,t){return f(t)?t.findIndex((t=>Hr(t,e))):v(t)&&Hr(t,e)?0:-1}const Kr=e=>"_"===e[0]||"$stable"===e,zr=e=>f(e)?e.map(Ks):[Ks(e)],Gr=(e,t,n)=>{if(t._n)return t;const o=On(((...e)=>zr(t(...e))),n);return o._c=!1,o},qr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Kr(r))continue;const n=e[r];if(v(n))t[r]=Gr(0,n,o);else if(null!=n){const e=zr(n);t[r]=()=>e}}},Jr=(e,t)=>{const n=zr(t);e.slots.default=()=>n},Xr=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=wt(t),I(t,"_",n)):qr(t,e.slots={})}else e.slots={},t&&Jr(e,t);I(e.slots,Is,1)},Yr=(e,n,o)=>{const{vnode:r,slots:s}=e;let i=!0,c=t;if(32&r.shapeFlag){const e=n._;e?o&&1===e?i=!1:(l(s,n),o||1!==e||delete s._):(i=!n.$stable,qr(n,s)),c=n}else n&&(Jr(e,n),c={default:1});if(i)for(const t in s)Kr(t)||null!=c[t]||delete s[t]};function Zr(e,n,o,r,s=!1){if(f(e))return void e.forEach(((e,t)=>Zr(e,n&&(f(n)?n[t]:n),o,r,s)));if(So(r)&&!s)return;const i=4&r.shapeFlag?di(r.component)||r.component.proxy:r.el,l=s?null:i,{i:a,r:p}=e,d=n&&n.r,h=a.refs===t?a.refs={}:a.refs,m=a.setupState;if(null!=d&&d!==p&&(g(d)?(h[d]=null,u(m,d)&&(m[d]=null)):Ft(d)&&(d.value=null)),v(p))Qt(p,a,12,[l,h]);else{const t=g(p),n=Ft(p),r=e.f;if(t||n){const a=()=>{if(r){const n=t?u(m,p)?m[p]:h[p]:p.value;s?f(n)&&c(n,i):f(n)?n.includes(i)||n.push(i):t?(h[p]=[i],u(m,p)&&(m[p]=h[p])):(p.value=[i],e.k&&(h[e.k]=p.value))}else t?(h[p]=l,u(m,p)&&(m[p]=l)):n&&(p.value=l,e.k&&(h[e.k]=l))};s||r?a():(a.id=-1,os(a,o))}}}let Qr=!1;const es=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,ts=e=>8===e.nodeType;function ns(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:i,parentNode:l,remove:c,insert:a,createComment:u}}=e,f=(n,o,s,c,u,y=!1)=>{const b=ts(n)&&"["===n.data,C=()=>v(n,o,s,c,u,b),{type:x,ref:E,shapeFlag:S,patchFlag:w}=o;let A=n.nodeType;o.el=n,-2===w&&(y=!1,o.dynamicChildren=null);let k=null;switch(x){case bs:3!==A?""===o.children?(a(o.el=r(""),l(n),n),k=n):k=C():(n.data!==o.children&&(Qr=!0,n.data=o.children),k=i(n));break;case Cs:_(n)?(k=i(n),m(o.el=n.content.firstChild,n,s)):k=8!==A||b?C():i(n);break;case xs:if(b&&(A=(n=i(n)).nodeType),1===A||3===A){k=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=1===k.nodeType?k.outerHTML:k.data),t===o.staticCount-1&&(o.anchor=k),k=i(k);return b?i(k):k}C();break;case ys:k=b?h(n,o,s,c,u,y):C();break;default:if(1&S)k=1===A&&o.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?p(n,o,s,c,u,y):C();else if(6&S){o.slotScopeIds=u;const e=l(n);if(k=b?g(n):ts(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(o,e,null,s,c,es(e),y),So(o)){let t;b?(t=Us(ys),t.anchor=k?k.previousSibling:e.lastChild):t=3===n.nodeType?Ds(""):Us("div"),t.el=n,o.component.subTree=t}}else 64&S?k=8!==A?C():o.type.hydrate(n,o,s,c,u,y,e,d):128&S&&(k=o.type.hydrate(n,o,s,c,es(l(n)),u,y,e,f))}return null!=E&&Zr(E,null,c,o),k},p=(e,t,n,r,i,l)=>{l=l||!!t.dynamicChildren;const{type:a,props:u,patchFlag:f,shapeFlag:p,dirs:h,transition:v}=t,g="input"===a||"option"===a;if(g||-1!==f){h&&ao(t,null,n,"created");let a,y=!1;if(_(e)){y=as(r,v)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;y&&v.beforeEnter(o),m(o,e,n),t.el=e=o}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let o=d(e.firstChild,t,e,n,r,i,l);for(;o;){Qr=!0;const e=o;o=o.nextSibling,c(e)}}else 8&p&&e.textContent!==t.children&&(Qr=!0,e.textContent=t.children);if(u)if(g||!l||48&f)for(const t in u)(g&&(t.endsWith("value")||"indeterminate"===t)||s(t)&&!w(t)||"."===t[0])&&o(e,t,null,u[t],void 0,void 0,n);else u.onClick&&o(e,"onClick",null,u.onClick,void 0,void 0,n);(a=u&&u.onVnodeBeforeMount)&&Js(a,n,t),h&&ao(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||h||y)&&Jn((()=>{a&&Js(a,n,t),y&&v.enter(e),h&&ao(t,null,n,"mounted")}),r)}return e.nextSibling},d=(e,t,o,r,s,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let u=0;u<a;u++){const t=l?c[u]:c[u]=Ks(c[u]);if(e)e=f(e,t,r,s,i,l);else{if(t.type===bs&&!t.children)continue;Qr=!0,n(null,t,o,null,r,s,es(o),i)}}return e},h=(e,t,n,o,r,s)=>{const{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);const f=l(e),p=d(i(e),t,f,n,o,r,s);return p&&ts(p)&&"]"===p.data?i(t.anchor=p):(Qr=!0,a(t.anchor=u("]"),f,p),p)},v=(e,t,o,r,s,a)=>{if(Qr=!0,t.el=null,a){const t=g(e);for(;;){const n=i(e);if(!n||n===t)break;c(n)}}const u=i(e),f=l(e);return c(e),n(null,t,f,u,o,r,es(f),s),u},g=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=i(e))&&ts(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return i(e);o--}return e},m=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),mn(),void(t._vnode=e);Qr=!1,f(t.firstChild,e,null,null,null),mn(),t._vnode=e,Qr&&console.error("Hydration completed but contains mismatches.")},f]}const os=Jn;function rs(e){return is(e)}function ss(e){return is(e,ns)}function is(e,r){U().__VUE__=!0;const{insert:s,remove:i,patchProp:l,createElement:c,createText:a,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:v,setScopeId:g=o,insertStaticContent:m}=e,_=(e,t,n,o=null,r=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Rs(e,t)&&(o=Y(e),z(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:f}=t;switch(a){case bs:b(e,t,n,o);break;case Cs:C(e,t,n,o);break;case xs:null==e&&x(t,n,o,i);break;case ys:R(e,t,n,o,r,s,i,l,c);break;default:1&f?E(e,t,n,o,r,s,i,l,c):6&f?M(e,t,n,o,r,s,i,l,c):(64&f||128&f)&&a.process(e,t,n,o,r,s,i,l,c,ee)}null!=u&&r&&Zr(u,e&&e.ref,s,t||e,!t)},b=(e,t,n,o)=>{if(null==e)s(t.el=a(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},C=(e,t,n,o)=>{null==e?s(t.el=f(t.children||""),n,o):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=m(e.children,t,n,o,e.el,e.anchor)},E=(e,t,n,o,r,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?S(t,n,o,r,s,i,l,c):N(e,t,r,s,i,l,c)},S=(e,t,n,o,r,i,a,u)=>{let f,p;const{props:h,shapeFlag:v,transition:g,dirs:m}=e;if(f=e.el=c(e.type,i,h&&h.is,h),8&v?d(f,e.children):16&v&&k(e.children,f,null,o,r,ls(e,i),a,u),m&&ao(e,null,o,"created"),A(f,e,e.scopeId,a,o),h){for(const t in h)"value"===t||w(t)||l(f,t,null,h[t],i,e.children,o,r,X);"value"in h&&l(f,"value",null,h.value,i),(p=h.onVnodeBeforeMount)&&Js(p,o,e)}m&&ao(e,null,o,"beforeMount");const _=as(r,g);_&&g.beforeEnter(f),s(f,t,n),((p=h&&h.onVnodeMounted)||_||m)&&os((()=>{p&&Js(p,o,e),_&&g.enter(f),m&&ao(e,null,o,"mounted")}),r)},A=(e,t,n,o,r)=>{if(n&&g(e,n),o)for(let s=0;s<o.length;s++)g(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;A(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},k=(e,t,n,o,r,s,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?zs(e[a]):Ks(e[a]);_(null,c,t,n,o,r,s,i,l)}},N=(e,n,o,r,s,i,c)=>{const a=n.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=n;u|=16&e.patchFlag;const h=e.props||t,v=n.props||t;let g;if(o&&cs(o,!1),(g=v.onVnodeBeforeUpdate)&&Js(g,o,n,e),p&&ao(n,e,o,"beforeUpdate"),o&&cs(o,!0),f?L(e.dynamicChildren,f,a,o,r,ls(n,s),i):c||D(e,n,a,null,o,r,ls(n,s),i,!1),u>0){if(16&u)F(a,n,h,v,o,r,s);else if(2&u&&h.class!==v.class&&l(a,"class",null,v.class,s),4&u&&l(a,"style",h.style,v.style,s),8&u){const t=n.dynamicProps;for(let n=0;n<t.length;n++){const i=t[n],c=h[i],u=v[i];u===c&&"value"!==i||l(a,i,c,u,s,e.children,o,r,X)}}1&u&&e.children!==n.children&&d(a,n.children)}else c||null!=f||F(a,n,h,v,o,r,s);((g=v.onVnodeUpdated)||p)&&os((()=>{g&&Js(g,o,n,e),p&&ao(n,e,o,"updated")}),r)},L=(e,t,n,o,r,s,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],u=c.el&&(c.type===ys||!Rs(c,a)||70&c.shapeFlag)?h(c.el):n;_(c,a,u,null,o,r,s,i,!0)}},F=(e,n,o,r,s,i,c)=>{if(o!==r){if(o!==t)for(const t in o)w(t)||t in r||l(e,t,o[t],null,c,n.children,s,i,X);for(const t in r){if(w(t))continue;const a=r[t],u=o[t];a!==u&&"value"!==t&&l(e,t,u,a,c,n.children,s,i,X)}"value"in r&&l(e,"value",o.value,r.value,c)}},R=(e,t,n,o,r,i,l,c,u)=>{const f=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:v}=t;v&&(c=c?c.concat(v):v),null==e?(s(f,n,o),s(p,n,o),k(t.children||[],n,p,r,i,l,c,u)):d>0&&64&d&&h&&e.dynamicChildren?(L(e.dynamicChildren,h,n,r,i,l,c),(null!=t.key||r&&t===r.subTree)&&us(e,t,!0)):D(e,t,n,p,r,i,l,c,u)},M=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):B(t,n,o,r,s,i,c):V(e,t,c)},B=(e,n,o,r,s,i,l)=>{const c=e.component=function(e,n,o){const r=e.type,s=(n?n.appContext:e.appContext)||Xs,i={uid:Ys++,vnode:e,type:r,parent:n,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new oe(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:$r(r,s),emitsOptions:xn(r,s),emit:null,emitted:null,propsDefaults:t,inheritAttrs:r.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=n?n.root:i,i.emit=Cn.bind(null,i),e.ce&&e.ce(i);return i}(e,r,s);if(ko(e)&&(c.ctx.renderer=ee),function(e,t=!1){t&&ti(t);const{props:n,children:o}=e.vnode,r=ri(e);(function(e,t,n,o=!1){const r={},s={};I(s,Is,1),e.propsDefaults=Object.create(null),Vr(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);e.props=n?o?r:mt(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),Xr(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=At(new Proxy(e.ctx,nr));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?pi(e):null,r=ni(e);_e();const s=Qt(o,e,0,[e.props,n]);if(ye(),r(),y(s)){if(s.then(oi,oi),t)return s.then((n=>{ci(e,n,t)})).catch((t=>{tn(t,e,0)}));e.asyncDep=s}else ci(e,s,t)}else fi(e,t)}(e,t):void 0;t&&ti(!1)}(c),c.asyncDep){if(s&&s.registerDep(c,$),!e.el){const e=c.subTree=Us(Cs);C(null,e,n,o)}}else $(c,e,n,o,s,i,l)},V=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||Pn(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?Pn(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==o[n]&&!En(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void j(o,t,n);o.next=t,function(e){const t=rn.indexOf(e);t>sn&&rn.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},$=(e,t,n,r,s,i,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:r,vnode:a}=e;{const n=fs(e);if(n)return t&&(t.el=a.el,j(e,t,l)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,f=t;cs(e,!1),t?(t.el=a.el,j(e,t,l)):t=a,n&&P(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Js(u,r,t,a),cs(e,!0);const p=Ln(e),d=e.subTree;e.subTree=p,_(d,p,h(d.el),Y(d),e,s,i),t.el=p.el,null===f&&In(e,p.el),o&&os(o,s),(u=t.props&&t.props.onVnodeUpdated)&&os((()=>Js(u,r,t,a)),s)}else{let o;const{el:l,props:c}=t,{bm:a,m:u,parent:f}=e,p=So(t);if(cs(e,!1),a&&P(a),!p&&(o=c&&c.onVnodeBeforeMount)&&Js(o,f,t),cs(e,!0),l&&ne){const n=()=>{e.subTree=Ln(e),ne(l,e.subTree,e,s,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const o=e.subTree=Ln(e);_(null,o,n,r,e,s,i),t.el=o.el}if(u&&os(u,s),!p&&(o=c&&c.onVnodeMounted)){const e=t;os((()=>Js(o,f,e)),s)}(256&t.shapeFlag||f&&So(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&os(e.a,s),e.isMounted=!0,t=n=r=null}},a=e.effect=new ce(c,o,(()=>dn(u)),e.scope),u=e.update=()=>{a.dirty&&a.run()};u.id=e.uid,cs(e,!0),u()},j=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=wt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;Vr(e,t,r,s)&&(a=!0);for(const s in l)t&&(u(t,s)||(o=O(s))!==s&&u(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Ur(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&u(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let i=n[o];if(En(e.emitsOptions,i))continue;const f=t[i];if(c)if(u(s,i))f!==s[i]&&(s[i]=f,a=!0);else{const t=T(i);r[t]=Ur(c,l,t,f,e,!1)}else f!==s[i]&&(s[i]=f,a=!0)}}a&&Le(e,"set","$attrs")}(e,t.props,o,n),Yr(e,t.children,n),_e(),gn(e),ye()},D=(e,t,n,o,r,s,i,l,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void W(a,f,n,o,r,s,i,l,c);if(256&p)return void H(a,f,n,o,r,s,i,l,c)}8&h?(16&u&&X(a,r,s),f!==a&&d(n,f)):16&u?16&h?W(a,f,n,o,r,s,i,l,c):X(a,r,s,!0):(8&u&&d(n,""),16&h&&k(f,n,o,r,s,i,l,c))},H=(e,t,o,r,s,i,l,c,a)=>{const u=(e=e||n).length,f=(t=t||n).length,p=Math.min(u,f);let d;for(d=0;d<p;d++){const n=t[d]=a?zs(t[d]):Ks(t[d]);_(e[d],n,o,null,s,i,l,c,a)}u>f?X(e,s,i,!0,!1,p):k(t,o,r,s,i,l,c,a,p)},W=(e,t,o,r,s,i,l,c,a)=>{let u=0;const f=t.length;let p=e.length-1,d=f-1;for(;u<=p&&u<=d;){const n=e[u],r=t[u]=a?zs(t[u]):Ks(t[u]);if(!Rs(n,r))break;_(n,r,o,null,s,i,l,c,a),u++}for(;u<=p&&u<=d;){const n=e[p],r=t[d]=a?zs(t[d]):Ks(t[d]);if(!Rs(n,r))break;_(n,r,o,null,s,i,l,c,a),p--,d--}if(u>p){if(u<=d){const e=d+1,n=e<f?t[e].el:r;for(;u<=d;)_(null,t[u]=a?zs(t[u]):Ks(t[u]),o,n,s,i,l,c,a),u++}}else if(u>d)for(;u<=p;)z(e[u],s,i,!0),u++;else{const h=u,v=u,g=new Map;for(u=v;u<=d;u++){const e=t[u]=a?zs(t[u]):Ks(t[u]);null!=e.key&&g.set(e.key,u)}let m,y=0;const b=d-v+1;let C=!1,x=0;const E=new Array(b);for(u=0;u<b;u++)E[u]=0;for(u=h;u<=p;u++){const n=e[u];if(y>=b){z(n,s,i,!0);continue}let r;if(null!=n.key)r=g.get(n.key);else for(m=v;m<=d;m++)if(0===E[m-v]&&Rs(n,t[m])){r=m;break}void 0===r?z(n,s,i,!0):(E[r-v]=u+1,r>=x?x=r:C=!0,_(n,t[r],o,null,s,i,l,c,a),y++)}const S=C?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(E):n;for(m=S.length-1,u=b-1;u>=0;u--){const e=v+u,n=t[e],p=e+1<f?t[e+1].el:r;0===E[u]?_(null,n,o,p,s,i,l,c,a):C&&(m<0||u!==S[m]?K(n,o,p,2):m--)}}},K=(e,t,n,o,r=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void K(e.component.subTree,t,n,o);if(128&u)return void e.suspense.move(t,n,o);if(64&u)return void l.move(e,t,n,ee);if(l===ys){s(i,t,n);for(let e=0;e<a.length;e++)K(a[e],t,n,o);return void s(e.anchor,t,n)}if(l===xs)return void(({el:e,anchor:t},n,o)=>{let r;for(;e&&e!==t;)r=v(e),s(e,n,o),e=r;s(t,n,o)})(e,t,n);if(2!==o&&1&u&&c)if(0===o)c.beforeEnter(i),s(i,t,n),os((()=>c.enter(i)),r);else{const{leave:e,delayLeave:o,afterLeave:r}=c,l=()=>s(i,t,n),a=()=>{e(i,(()=>{l(),r&&r()}))};o?o(i,l,a):a()}else s(i,t,n)},z=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:f,dirs:p}=e;if(null!=l&&Zr(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&p,h=!So(e);let v;if(h&&(v=i&&i.onVnodeBeforeUnmount)&&Js(v,t,e),6&u)J(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&ao(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ee,o):a&&(s!==ys||f>0&&64&f)?X(a,t,n,!1,!0):(s===ys&&384&f||!r&&16&u)&&X(c,t,n),o&&G(e)}(h&&(v=i&&i.onVnodeUnmounted)||d)&&os((()=>{v&&Js(v,t,e),d&&ao(e,null,t,"unmounted")}),n)},G=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===ys)return void q(n,o);if(t===xs)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=v(e),i(e),e=n;i(t)})(e);const s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,i=()=>t(n,s);o?o(e.el,s,i):i()}else s()},q=(e,t)=>{let n;for(;e!==t;)n=v(e),i(e),e=n;i(t)},J=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&P(o),r.stop(),s&&(s.active=!1,z(i,e,t,n)),l&&os(l,t),os((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i<e.length;i++)z(e[i],t,n,o,r)},Y=e=>6&e.shapeFlag?Y(e.component.subTree):128&e.shapeFlag?e.suspense.next():v(e.anchor||e.el);let Z=!1;const Q=(e,t,n)=>{null==e?t._vnode&&z(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,gn(),mn(),Z=!1),t._vnode=e},ee={p:_,um:z,m:K,r:G,mt:B,mc:k,pc:D,pbc:L,n:Y,o:e};let te,ne;return r&&([te,ne]=r(ee)),{render:Q,hydrate:te,createApp:Rr(Q,te)}}function ls({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function cs({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function as(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function us(e,t,n=!1){const o=e.children,r=t.children;if(f(o)&&f(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=zs(r[s]),t.el=e.el),n||us(e,t)),t.type===bs&&(t.el=e.el)}}function fs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fs(t)}const ps=e=>e&&(e.disabled||""===e.disabled),ds=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,hs=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,vs=(e,t)=>{const n=e&&e.to;if(g(n)){if(t){return t(n)}return null}return n};function gs(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,f=2===s;if(f&&o(i,t,n),(!f||ps(u))&&16&c)for(let p=0;p<a.length;p++)r(a[p],t,n,2);f&&o(l,t,n)}const ms={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,s,i,l,c,a){const{mc:u,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:v}}=a,g=ps(t.props);let{shapeFlag:m,children:_,dynamicChildren:y}=t;if(null==e){const e=t.el=v(""),a=t.anchor=v("");d(e,n,o),d(a,n,o);const f=t.target=vs(t.props,h),p=t.targetAnchor=v("");f&&(d(p,f),"svg"===i||ds(f)?i="svg":("mathml"===i||hs(f))&&(i="mathml"));const y=(e,t)=>{16&m&&u(_,e,t,r,s,i,l,c)};g?y(n,a):f&&y(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,v=ps(e.props),m=v?n:u,_=v?o:d;if("svg"===i||ds(u)?i="svg":("mathml"===i||hs(u))&&(i="mathml"),y?(p(e.dynamicChildren,y,m,r,s,i,l),us(e,t,!0)):c||f(e,t,m,_,r,s,i,l,!1),g)v?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):gs(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=vs(t.props,h);e&&gs(t,e,null,a,0)}else v&&gs(t,u,d,a,1)}_s(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:f,props:p}=e;if(f&&s(u),i&&s(a),16&l){const e=i||!ps(p);for(let o=0;o<c.length;o++){const s=c[o];r(s,t,n,e,!!s.dynamicChildren)}}},move:gs,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=vs(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(ps(t.props))t.anchor=a(i(e),t,l(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=i(e);let l=c;for(;l;)if(l=i(l),l&&8===l.nodeType&&"teleport anchor"===l.data){t.targetAnchor=l,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(c,t,u,n,o,r,s)}_s(t)}return t.anchor&&i(t.anchor)}};function _s(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const ys=Symbol.for("v-fgt"),bs=Symbol.for("v-txt"),Cs=Symbol.for("v-cmt"),xs=Symbol.for("v-stc"),Es=[];let Ss=null;function ws(e=!1){Es.push(Ss=e?null:[])}function As(){Es.pop(),Ss=Es[Es.length-1]||null}let ks=1;function Ts(e){ks+=e}function Ns(e){return e.dynamicChildren=ks>0?Ss||n:null,As(),ks>0&&Ss&&Ss.push(e),e}function Os(e,t,n,o,r,s){return Ns(Vs(e,t,n,o,r,s,!0))}function Ls(e,t,n,o,r){return Ns(Us(e,t,n,o,r,!0))}function Fs(e){return!!e&&!0===e.__v_isVNode}function Rs(e,t){return e.type===t.type&&e.key===t.key}function Ps(e){}const Is="__vInternal",Ms=({key:e})=>null!=e?e:null,Bs=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?g(e)||Ft(e)||v(e)?{i:Sn,r:e,k:t,f:!!n}:e:null);function Vs(e,t=null,n=null,o=0,r=null,s=(e===ys?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ms(t),ref:t&&Bs(t),scopeId:wn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Sn};return l?(Gs(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),ks>0&&!i&&Ss&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Ss.push(c),c}const Us=function(e,t=null,n=null,o=0,r=null,s=!1){e&&e!==Vn||(e=Cs);if(Fs(e)){const o=js(e,t,!0);return n&&Gs(o,n),ks>0&&!s&&Ss&&(6&o.shapeFlag?Ss[Ss.indexOf(e)]=o:Ss.push(o)),o.patchFlag|=-2,o}i=e,v(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=$s(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=z(e)),_(n)&&(St(n)&&!f(n)&&(n=l({},n)),t.style=j(n))}const c=g(e)?1:Hn(e)?128:(e=>e.__isTeleport)(e)?64:_(e)?4:v(e)?2:0;return Vs(e,t,n,o,r,c,s,!0)};function $s(e){return e?St(e)||Is in e?l({},e):e:null}function js(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?qs(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ms(l),ref:t&&t.ref?n&&r?f(r)?r.concat(Bs(t)):[r,Bs(t)]:Bs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ys?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&js(e.ssContent),ssFallback:e.ssFallback&&js(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Ds(e=" ",t=0){return Us(bs,null,e,t)}function Hs(e,t){const n=Us(xs,null,e);return n.staticCount=t,n}function Ws(e="",t=!1){return t?(ws(),Ls(Cs,null,e)):Us(Cs,null,e)}function Ks(e){return null==e||"boolean"==typeof e?Us(Cs):f(e)?Us(ys,null,e.slice()):"object"==typeof e?zs(e):Us(bs,null,String(e))}function zs(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:js(e)}function Gs(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Gs(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Is in t?3===o&&Sn&&(1===Sn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Sn}}else v(t)?(t={default:t,_ctx:Sn},n=32):(t=String(t),64&o?(n=16,t=[Ds(t)]):n=8);e.children=t,e.shapeFlag|=n}function qs(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=z([t.class,o.class]));else if("style"===e)t.style=j([t.style,o.style]);else if(s(e)){const n=t[e],r=o[e];!r||n===r||f(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function Js(e,t,n,o=null){en(e,t,7,[n,o])}const Xs=Lr();let Ys=0;let Zs=null;const Qs=()=>Zs||Sn;let ei,ti;ei=e=>{Zs=e},ti=e=>{li=e};const ni=e=>{const t=Zs;return ei(e),e.scope.on(),()=>{e.scope.off(),ei(t)}},oi=()=>{Zs&&Zs.scope.off(),ei(null)};function ri(e){return 4&e.vnode.shapeFlag}let si,ii,li=!1;function ci(e,t,n){v(t)?e.render=t:_(t)&&(e.setupState=jt(t)),fi(e,n)}function ai(e){si=e,ii=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,or))}}const ui=()=>!si;function fi(e,t,n){const r=e.type;if(!e.render){if(!t&&si&&!r.render){const t=r.template||Er(e).template;if(t){const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:i}=r,c=l(l({isCustomElement:n,delimiters:s},o),i);r.render=si(t,c)}}e.render=r.render||o,ii&&ii(e)}{const t=ni(e);_e();try{br(e)}finally{ye(),t()}}}function pi(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(Oe(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function di(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(jt(At(e.exposed)),{get:(t,n)=>n in t?t[n]:n in er?er[n](e):void 0,has:(e,t)=>t in e||t in er}))}function hi(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}const vi=(e,t)=>function(e,t,n=!1){let r,s;const i=v(e);return i?(r=e,s=o):(r=e.get,s=e.set),new Nt(r,s,i||!s,n)}(e,0,li);function gi(e,n,o=t){const r=Qs(),s=T(n),i=O(n),l=Ht(((t,l)=>{let c;return to((()=>{const t=e[n];R(c,t)&&(c=t,l())})),{get:()=>(t(),o.get?o.get(c):c),set(e){const t=r.vnode.props;t&&(n in t||s in t||i in t)&&(`onUpdate:${n}`in t||`onUpdate:${s}`in t||`onUpdate:${i}`in t)||!R(e,c)||(c=e,l()),r.emit(`update:${n}`,o.set?o.set(e):e)}}})),c="modelValue"===n?"modelModifiers":`${n}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l}function mi(e,t,n){const o=arguments.length;return 2===o?_(t)&&!f(t)?Fs(t)?Us(e,null,[t]):Us(e,t):Us(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Fs(n)&&(n=[n]),Us(e,t,n))}function _i(){}function yi(e,t,n,o){const r=n[o];if(r&&bi(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function bi(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(R(n[o],t[o]))return!1;return ks>0&&Ss&&Ss.push(e),!0}const Ci="3.4.15",xi=o,Ei=null,Si=void 0,wi=o,Ai=null,ki=null,Ti=null,Ni=null,Oi="undefined"!=typeof document?document:null,Li=Oi&&Oi.createElement("template"),Fi={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?Oi.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Oi.createElementNS("http://www.w3.org/1998/Math/MathML",e):Oi.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>Oi.createTextNode(e),createComment:e=>Oi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{Li.innerHTML="svg"===o?`<svg>${e}</svg>`:"mathml"===o?`<math>${e}</math>`:e;const r=Li.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ri="transition",Pi="animation",Ii=Symbol("_vtc"),Mi=(e,{slots:t})=>mi(go,ji(e),t);Mi.displayName="Transition";const Bi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Vi=Mi.props=l({},vo,Bi),Ui=(e,t=[])=>{f(e)?e.forEach((e=>e(...t))):e&&e(...t)},$i=e=>!!e&&(f(e)?e.some((e=>e.length>1)):e.length>1);function ji(e){const t={};for(const l in e)l in Bi||(t[l]=e[l]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=i,appearToClass:f=c,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,v=function(e){if(null==e)return null;if(_(e))return[Di(e.enter),Di(e.leave)];{const t=Di(e);return[t,t]}}(r),g=v&&v[0],m=v&&v[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:C,onLeave:x,onLeaveCancelled:E,onBeforeAppear:S=y,onAppear:w=b,onAppearCancelled:A=C}=t,k=(e,t,n)=>{Wi(e,t?f:c),Wi(e,t?u:i),n&&n()},T=(e,t)=>{e._isLeaving=!1,Wi(e,p),Wi(e,h),Wi(e,d),t&&t()},N=e=>(t,n)=>{const r=e?w:b,i=()=>k(t,e,n);Ui(r,[t,i]),Ki((()=>{Wi(t,e?a:s),Hi(t,e?f:c),$i(r)||Gi(t,o,g,i)}))};return l(t,{onBeforeEnter(e){Ui(y,[e]),Hi(e,s),Hi(e,i)},onBeforeAppear(e){Ui(S,[e]),Hi(e,a),Hi(e,u)},onEnter:N(!1),onAppear:N(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>T(e,t);Hi(e,p),Yi(),Hi(e,d),Ki((()=>{e._isLeaving&&(Wi(e,p),Hi(e,h),$i(x)||Gi(e,o,m,n))})),Ui(x,[e,n])},onEnterCancelled(e){k(e,!1),Ui(C,[e])},onAppearCancelled(e){k(e,!0),Ui(A,[e])},onLeaveCancelled(e){T(e),Ui(E,[e])}})}function Di(e){return B(e)}function Hi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Ii]||(e[Ii]=new Set)).add(t)}function Wi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Ii];n&&(n.delete(t),n.size||(e[Ii]=void 0))}function Ki(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let zi=0;function Gi(e,t,n,o){const r=e._endId=++zi,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=qi(e,t);if(!i)return o();const a=i+"end";let u=0;const f=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&f()};setTimeout((()=>{u<c&&f()}),l+1),e.addEventListener(a,p)}function qi(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o(`${Ri}Delay`),s=o(`${Ri}Duration`),i=Ji(r,s),l=o(`${Pi}Delay`),c=o(`${Pi}Duration`),a=Ji(l,c);let u=null,f=0,p=0;t===Ri?i>0&&(u=Ri,f=i,p=s.length):t===Pi?a>0&&(u=Pi,f=a,p=c.length):(f=Math.max(i,a),u=f>0?i>a?Ri:Pi:null,p=u?u===Ri?s.length:c.length:0);return{type:u,timeout:f,propCount:p,hasTransform:u===Ri&&/\b(transform|all)(,|$)/.test(o(`${Ri}Property`).toString())}}function Ji(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Xi(t)+Xi(e[n]))))}function Xi(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Yi(){return document.body.offsetHeight}const Zi=Symbol("_vod"),Qi={beforeMount(e,{value:t},{transition:n}){e[Zi]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):el(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),el(e,!0),o.enter(e)):o.leave(e,(()=>{el(e,!1)})):el(e,t))},beforeUnmount(e,{value:t}){el(e,t)}};function el(e,t){e.style.display=t?e[Zi]:"none"}const tl=Symbol("");function nl(e){const t=Qs();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>rl(e,n)))},o=()=>{const o=e(t.proxy);ol(t.subTree,o),n(o)};eo(o),Uo((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),Ho((()=>e.disconnect()))}))}function ol(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{ol(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)rl(e.el,t);else if(e.type===ys)e.children.forEach((e=>ol(e,t)));else if(e.type===xs){let{el:n,anchor:o}=e;for(;n&&(rl(n,t),n!==o);)n=n.nextSibling}}function rl(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t)n.setProperty(`--${e}`,t[e]),o+=`--${e}: ${t[e]};`;n[tl]=o}}const sl=/\s*!important$/;function il(e,t,n){if(f(n))n.forEach((n=>il(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=cl[t];if(n)return n;let o=T(t);if("filter"!==o&&o in e)return cl[t]=o;o=L(o);for(let r=0;r<ll.length;r++){const n=ll[r]+o;if(n in e)return cl[t]=n}return t}(e,t);sl.test(n)?e.setProperty(O(o),n.replace(sl,""),"important"):e[o]=n}}const ll=["Webkit","Moz","ms"],cl={};const al="http://www.w3.org/1999/xlink";function ul(e,t,n,o){e.addEventListener(t,n,o)}const fl=Symbol("_vei");function pl(e,t,n,o,r=null){const s=e[fl]||(e[fl]={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(dl.test(e)){let n;for(t={};n=e.match(dl);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):O(e.slice(2));return[n,t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();en(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=gl(),n}(o,r);ul(e,n,i,l)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}const dl=/(?:Once|Passive|Capture)$/;let hl=0;const vl=Promise.resolve(),gl=()=>hl||(vl.then((()=>hl=0)),hl=Date.now());const ml=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123; +/*! #__NO_SIDE_EFFECTS__ */ +function _l(e,t){const n=Eo(e);class o extends Cl{constructor(e){super(n,e,t)}}return o.def=n,o} +/*! #__NO_SIDE_EFFECTS__ */const yl=e=>_l(e,oc),bl="undefined"!=typeof HTMLElement?HTMLElement:class{};class Cl extends bl{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),pn((()=>{this._connected||(nc(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:o}=e;let r;if(n&&!f(n))for(const s in n){const e=n[s];(e===Number||e&&e.type===Number)&&(s in this._props&&(this._props[s]=B(this._props[s])),(r||(r=Object.create(null)))[T(s)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=f(t)?t:Object.keys(t||{});for(const o of Object.keys(this))"_"!==o[0]&&n.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of n.map(T))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(e){this._setProp(o,e)}})}_setAttr(e){let t=this.getAttribute(e);const n=T(e);this._numberProps&&this._numberProps[n]&&(t=B(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(O(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(O(e),t+""):t||this.removeAttribute(O(e))))}_update(){nc(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Us(this._def,l({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),O(e)!==e&&t(O(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof Cl){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function xl(e="$style"){{const n=Qs();if(!n)return t;const o=n.type.__cssModules;if(!o)return t;const r=o[e];return r||t}}const El=new WeakMap,Sl=new WeakMap,wl=Symbol("_moveCb"),Al=Symbol("_enterCb"),kl={name:"TransitionGroup",props:l({},Vi,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Qs(),o=po();let r,s;return jo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),r=e[Ii];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=qi(o);return s.removeChild(o),i}(r[0].el,n.vnode.el,t))return;r.forEach(Nl),r.forEach(Ol);const o=r.filter(Ll);Yi(),o.forEach((e=>{const n=e.el,o=n.style;Hi(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n[wl]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[wl]=null,Wi(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=wt(e),l=ji(i);let c=i.tag||ys;r=s,s=t.default?xo(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&Co(t,_o(t,l,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];Co(t,_o(t,l,o,n)),El.set(t,t.el.getBoundingClientRect())}return Us(c,null,s)}}},Tl=kl;function Nl(e){const t=e.el;t[wl]&&t[wl](),t[Al]&&t[Al]()}function Ol(e){Sl.set(e,e.el.getBoundingClientRect())}function Ll(e){const t=El.get(e),n=Sl.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const Fl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>P(t,e):t};function Rl(e){e.target.composing=!0}function Pl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Il=Symbol("_assign"),Ml={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Il]=Fl(r);const s=o||r.props&&"number"===r.props.type;ul(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=M(o)),e[Il](o)})),n&&ul(e,"change",(()=>{e.value=e.value.trim()})),t||(ul(e,"compositionstart",Rl),ul(e,"compositionend",Pl),ul(e,"change",Pl))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e[Il]=Fl(s),e.composing)return;const i=null==t?"":t;if((r||"number"===e.type?M(e.value):e.value)!==i){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===i)return}e.value=i}}},Bl={deep:!0,created(e,t,n){e[Il]=Fl(n),ul(e,"change",(()=>{const t=e._modelValue,n=Dl(e),o=e.checked,r=e[Il];if(f(t)){const e=Y(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(d(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Hl(e,o))}))},mounted:Vl,beforeUpdate(e,t,n){e[Il]=Fl(n),Vl(e,t,n)}};function Vl(e,{value:t,oldValue:n},o){e._modelValue=t,f(t)?e.checked=Y(t,o.props.value)>-1:d(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=X(t,Hl(e,!0)))}const Ul={created(e,{value:t},n){e.checked=X(t,n.props.value),e[Il]=Fl(n),ul(e,"change",(()=>{e[Il](Dl(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[Il]=Fl(o),t!==n&&(e.checked=X(t,o.props.value))}},$l={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=d(t);ul(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?M(Dl(e)):Dl(e)));e[Il](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,pn((()=>{e._assigning=!1}))})),e[Il]=Fl(o)},mounted(e,{value:t,oldValue:n,modifiers:{number:o}}){jl(e,t,n,o)},beforeUpdate(e,t,n){e[Il]=Fl(n)},updated(e,{value:t,oldValue:n,modifiers:{number:o}}){e._assigning||jl(e,t,n,o)}};function jl(e,t,n,o){const r=e.multiple,s=f(t);if((!r||s||d(t))&&(!s||!X(t,n))){for(let n=0,i=e.options.length;n<i;n++){const i=e.options[n],l=Dl(i);if(r)if(s){const e=typeof l;i.selected="string"===e||"number"===e?t.includes(o?M(l):l):Y(t,l)>-1}else i.selected=t.has(l);else if(X(Dl(i),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}r||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Dl(e){return"_value"in e?e._value:e.value}function Hl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Wl={created(e,t,n){Kl(e,t,n,null,"created")},mounted(e,t,n){Kl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Kl(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Kl(e,t,n,o,"updated")}};function Kl(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return $l;case"TEXTAREA":return Ml;default:switch(t){case"checkbox":return Bl;case"radio":return Ul;default:return Ml}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const zl=["ctrl","shift","alt","meta"],Gl={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>zl.some((n=>e[`${n}Key`]&&!t.includes(n)))},ql=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e<t.length;e++){const o=Gl[t[e]];if(o&&o(n,t))return}return e(n,...o)})},Jl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Xl=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=O(n.key);return t.some((e=>e===o||Jl[e]===o))?e(n):void 0})},Yl=l({patchProp:(e,t,n,o,r,l,c,a,u)=>{const f="svg"===r;"class"===t?function(e,t,n){const o=e[Ii];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,f):"style"===t?function(e,t,n){const o=e.style,r=o.display,s=g(n);if(n&&!s){if(t&&!g(t))for(const e in t)null==n[e]&&il(o,e,"");for(const e in n)il(o,e,n[e])}else if(s){if(t!==n){const e=o[tl];e&&(n+=";"+e),o.cssText=n}}else t&&e.removeAttribute("style");Zi in e&&(o.display=r)}(e,n,o):s(t)?i(t)||pl(e,t,0,o,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&ml(t)&&v(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(ml(t)&&g(n))return!1;return t in e}(e,t,o,f))?function(e,t,n,o,r,s,i){if("innerHTML"===t||"textContent"===t)return o&&i(o,r,s),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=n;const o=null==n?"":n;return("OPTION"===l?e.getAttribute("value"):e.value)!==o&&(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=J(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,o,l,c,a,u):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o,r){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(al,t.slice(6,t.length)):e.setAttributeNS(al,t,n);else{const o=q(t);null==n||o&&!J(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,f))}},Fi);let Zl,Ql=!1;function ec(){return Zl||(Zl=rs(Yl))}function tc(){return Zl=Ql?Zl:ss(Yl),Ql=!0,Zl}const nc=(...e)=>{ec().render(...e)},oc=(...e)=>{tc().hydrate(...e)},rc=(...e)=>{const t=ec().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=lc(e);if(!o)return;const r=t._component;v(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,ic(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},sc=(...e)=>{const t=tc().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=lc(e);if(t)return n(t,!0,ic(t))},t};function ic(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function lc(e){if(g(e)){return document.querySelector(e)}return e}const cc=o;export{go as BaseTransition,vo as BaseTransitionPropsValidators,Cs as Comment,Ni as DeprecationTypes,oe as EffectScope,Zt as ErrorCodes,Ei as ErrorTypeStrings,ys as Fragment,To as KeepAlive,ce as ReactiveEffect,xs as Static,Kn as Suspense,ms as Teleport,bs as Text,Jt as TrackOpTypes,Mi as Transition,Tl as TransitionGroup,Xt as TriggerOpTypes,Cl as VueElement,Yt as assertNumber,en as callWithAsyncErrorHandling,Qt as callWithErrorHandling,T as camelize,L as capitalize,js as cloneVNode,Ti as compatUtils,vi as computed,rc as createApp,Ls as createBlock,Ws as createCommentVNode,Os as createElementBlock,Vs as createElementVNode,ss as createHydrationRenderer,mr as createPropsRestProxy,rs as createRenderer,sc as createSSRApp,Jo as createSlots,Hs as createStaticVNode,Ds as createTextVNode,Us as createVNode,Ht as customRef,wo as defineAsyncComponent,Eo as defineComponent,_l as defineCustomElement,sr as defineEmits,ir as defineExpose,ar as defineModel,lr as defineOptions,rr as defineProps,yl as defineSSRCustomElement,cr as defineSlots,Si as devtools,de as effect,re as effectScope,Qs as getCurrentInstance,ie as getCurrentScope,xo as getTransitionRawChildren,$s as guardReactiveProps,mi as h,tn as handleError,Br as hasInjectionContext,oc as hydrate,_i as initCustomFormatter,cc as initDirectivesForSSR,Mr as inject,bi as isMemoSame,St as isProxy,Ct as isReactive,xt as isReadonly,Ft as isRef,ui as isRuntimeOnly,Et as isShallow,Fs as isVNode,At as markRaw,vr as mergeDefaults,gr as mergeModels,qs as mergeProps,pn as nextTick,z as normalizeClass,G as normalizeProps,j as normalizeStyle,Oo as onActivated,Vo as onBeforeMount,Do as onBeforeUnmount,$o as onBeforeUpdate,Lo as onDeactivated,Go as onErrorCaptured,Uo as onMounted,zo as onRenderTracked,Ko as onRenderTriggered,le as onScopeDispose,Wo as onServerPrefetch,Ho as onUnmounted,jo as onUpdated,ws as openBlock,Tn as popScopeId,Ir as provide,jt as proxyRefs,kn as pushScopeId,vn as queuePostFlushCb,gt as reactive,_t as readonly,Rt as ref,ai as registerRuntimeCompiler,nc as render,qo as renderList,Xo as renderSlot,Bn as resolveComponent,$n as resolveDirective,Un as resolveDynamicComponent,ki as resolveFilter,_o as resolveTransitionHooks,Ts as setBlockTracking,wi as setDevtoolsHook,Co as setTransitionHooks,mt as shallowReactive,yt as shallowReadonly,Pt as shallowRef,Yn as ssrContextKey,Ai as ssrUtils,he as stop,Z as toDisplayString,F as toHandlerKey,Zo as toHandlers,wt as toRaw,Gt as toRef,Wt as toRefs,Ut as toValue,Ps as transformVNodeArgs,Bt as triggerRef,Vt as unref,pr as useAttrs,xl as useCssModule,nl as useCssVars,gi as useModel,Zn as useSSRContext,fr as useSlots,po as useTransitionState,Bl as vModelCheckbox,Wl as vModelDynamic,Ul as vModelRadio,$l as vModelSelect,Ml as vModelText,Qi as vShow,Ci as version,xi as warn,oo as watch,Qn as watchEffect,eo as watchPostEffect,to as watchSyncEffect,_r as withAsyncContext,On as withCtx,ur as withDefaults,co as withDirectives,Xl as withKeys,yi as withMemo,ql as withModifiers,Nn as withScopeId}; diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js index a399ac53..88e18c2d 100644 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js @@ -1,1698 +1,1587 @@ -import { camelize, warn, callWithAsyncErrorHandling, defineComponent, nextTick, createVNode, getCurrentInstance, watchPostEffect, onMounted, onUnmounted, Fragment, Static, h, BaseTransition, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, createRenderer, isRuntimeOnly, createHydrationRenderer } from '@vue/runtime-core'; +/** +* @vue/runtime-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, getCurrentInstance, warn, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core'; export * from '@vue/runtime-core'; -import { isString, isArray, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isOn, isModelListener, isFunction, toNumber, camelize as camelize$1, extend, EMPTY_OBJ, isObject, invokeArrayFns, looseIndexOf, isSet, looseEqual, isHTMLTag, isSVGTag } from '@vue/shared'; +import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isOn, isModelListener, isFunction, camelize as camelize$1, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared'; -const svgNS = 'http://www.w3.org/2000/svg'; -const doc = (typeof document !== 'undefined' ? document : null); -const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; -// compiler should normalize class + :class bindings on the same element -// into a single binding ['staticClass', dynamic] -function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } -} - -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } -} -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } -} -const prefixes = ['Webkit', 'Moz', 'ms']; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; -} - -const xlinkNS = 'http://www.w3.org/1999/xlink'; -function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } -} - -// __UNSAFE__ -// functions. The user is responsible for using them with only trusted content. -function patchDOMProp(el, key, value, -// the following args are passed only due to potential innerHTML/textContent -// overriding existing VNodes, in which case the old tree must be properly -// unmounted. -prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - if ((process.env.NODE_ENV !== 'production')) { - warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` + - `value ${value} is invalid.`, e); - } - } - needRemove && el.removeAttribute(key); -} - -// Async edge case fix requires storing an event listener's attach timestamp. -const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; -})(); -// To avoid the overhead of repeatedly calling performance.now(), we cache -// and use the same timestamp for all event listeners attached in the same tick. -let cachedNow = 0; -const p = /*#__PURE__*/ Promise.resolve(); -const reset = () => { - cachedNow = 0; -}; -const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [hyphenate(name.slice(2)), options]; -} -function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } -} - -const nativeOnRE = /^on[a-z]/; -const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (isOn(key)) { - // ignore v-model listeners - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && isString(value)) { - return false; - } - return key in el; -} - -function defineCustomElement(options, hydrate) { - const Comp = defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); -}); -const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { -}); -class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - if ((process.env.NODE_ENV !== 'production') && this.shadowRoot) { - warn(`Custom element has pre-rendered declarative shadow root but is not ` + - `defined as hydratable. Use \`defineSSRCustomElement\`.`); - } - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(camelize$1)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = toNumber(value); - } - this._setProp(camelize$1(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = createVNode(this._def, extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // HMR - if ((process.env.NODE_ENV !== 'production')) { - instance.ceReload = newStyles => { - // always reset styles - if (this._styles) { - this._styles.forEach(s => this.shadowRoot.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - // if this is an async component, ceReload is called from the inner - // component so no need to reload the async wrapper - if (!this._def.__asyncLoader) { - // reload - this._instance = null; - this._update(); - } - }; - } - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - // record for HMR - if ((process.env.NODE_ENV !== 'production')) { - (this._styles || (this._styles = [])).push(s); - } - }); - } - } -} - -function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - const instance = getCurrentInstance(); - if (!instance) { - (process.env.NODE_ENV !== 'production') && warn(`useCssModule must be called inside setup()`); - return EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - (process.env.NODE_ENV !== 'production') && warn(`Current instance does not have CSS modules injected.`); - return EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - (process.env.NODE_ENV !== 'production') && - warn(`Current instance does not have CSS module named "${name}".`); - return EMPTY_OBJ; - } - return mod; - } -} - -/** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ -function useCssVars(getter) { - const instance = getCurrentInstance(); - /* istanbul ignore next */ - if (!instance) { - (process.env.NODE_ENV !== 'production') && - warn(`useCssVars is called without current active component instance.`); - return; - } - const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy)); - watchPostEffect(setVars); - onMounted(() => { - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); -} -function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - // drill down HOCs until it's a non-component vnode - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) { - setVarsOnNode(vnode.el, vars); - } - else if (vnode.type === Fragment) { - vnode.children.forEach(c => setVarsOnVNode(c, vars)); - } - else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) - break; - el = el.nextSibling; - } - } -} -function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - } - } -} - -const TRANSITION = 'transition'; -const ANIMATION = 'animation'; -// DOM Transition is a higher-order-component based on the platform-agnostic -// base Transition component, with DOM-specific logic. +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots); -Transition.displayName = 'Transition'; +Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; -const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ extend({}, BaseTransition.props, DOMTransitionPropsValidators)); -/** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ +const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); const callHook = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; -/** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = toNumber(val); - if ((process.env.NODE_ENV !== 'production')) - validateDuration(res); - return res; -} -function validateDuration(val) { - if (typeof val !== 'number') { - warn(`<transition> explicit duration is not a valid number - ` + - `got ${JSON.stringify(val)}.`); - } - else if (isNaN(val)) { - warn(`<transition> explicit duration is NaN - ` + - 'the duration expression might be incorrect.'); - } + const res = toNumber(val); + if (!!(process.env.NODE_ENV !== "production")) { + assertNumber(res, "<transition> explicit duration"); + } + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } -// Old versions of Chromium (below 61.0.3163.100) formats floating pointer -// numbers in a locale-dependent way, using a comma instead of a dot. -// If comma is not replaced with a dot, the input will be rounded down -// (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } -// synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } -const positionMap = new WeakMap(); -const newPositionMap = new WeakMap(); -const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = children; - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - else if ((process.env.NODE_ENV !== 'production')) { - warn(`<TransitionGroup> children must be keyed.`); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return createVNode(tag, null, children); - }; +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOldKey = Symbol("_vod"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; +if (!!(process.env.NODE_ENV !== "production")) { + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? "CSS_VAR_TEXT" : ""); +function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + !!(process.env.NODE_ENV !== "production") && warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + const setVars = () => { + const vars = getter(instance.proxy); + setVarsOnVNode(instance.subTree, vars); + updateTeleports(vars); + }; + watchPostEffect(setVars); + onMounted(() => { + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); +} +function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) + break; + el = el.nextSibling; + } + } +} +function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } +} + +function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = isString(next); + if (next && !isCssString) { + if (prev && !isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + if (!!(process.env.NODE_ENV !== "production")) { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = isSpecialBooleanAttr(key); + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } +} + +function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!!(process.env.NODE_ENV !== "production") && !needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, hydrate2) { + const Comp = defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + if (!!(process.env.NODE_ENV !== "production") && this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize$1(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(camelize$1)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = camelize$1(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = createVNode(this._def, extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + if (!!(process.env.NODE_ENV !== "production")) { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + if (!!(process.env.NODE_ENV !== "production")) { + (this._styles || (this._styles = [])).push(s); + } + }); + } + } +} + +function useCssModule(name = "$style") { + { + const instance = getCurrentInstance(); + if (!instance) { + !!(process.env.NODE_ENV !== "production") && warn(`useCssModule must be called inside setup()`); + return EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS modules injected.`); + return EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + !!(process.env.NODE_ENV !== "production") && warn(`Current instance does not have CSS module named "${name}".`); + return EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = children; + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else if (!!(process.env.NODE_ENV !== "production")) { + warn(`<TransitionGroup> children must be keyed.`); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return createVNode(tag, null, children); + }; + } +}; +const removeMode = (props) => delete props.mode; +/* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return isArray(fn) ? value => invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } -// We are exporting the v-model runtime directly as vnode hooks so that it can -// be tree-shaken in case v-model is never used. +const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (isArray(value)) { - el.checked = looseIndexOf(value, vnode.props.value) > -1; - } - else if (isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (isArray(value)) { + el.checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; -function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !isArray(value) && !isSet(value)) { - (process.env.NODE_ENV !== 'production') && - warn(`<select multiple v-model> expects an Array or Set value for its binding, ` + - `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`); +function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + !!(process.env.NODE_ENV !== "production") && warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + if (isArrayValue && looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArray(value)) { - option.selected = looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } -// retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } -// retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } -// SSR vnode transforms, only used when user includes client-oriented render -// function in SSR function initVModelForSSR() { - vModelText.getSSRProps = ({ value }) => ({ value }); - vModelRadio.getSSRProps = ({ value }, vnode) => { - if (vnode.props && looseEqual(vnode.props.value, value)) { - return { checked: true }; - } - }; - vModelCheckbox.getSSRProps = ({ value }, vnode) => { - if (isArray(value)) { - if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { - return { checked: true }; - } - } - else if (isSet(value)) { - if (vnode.props && value.has(vnode.props.value)) { - return { checked: true }; - } - } - else if (value) { - return { checked: true }; - } - }; - vModelDynamic.getSSRProps = (binding, vnode) => { - if (typeof vnode.type !== 'string') { - return; - } - const modelToUse = resolveDynamicModel( - // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase - vnode.type.toUpperCase(), vnode.props && vnode.props.type); - if (modelToUse.getSSRProps) { - return modelToUse.getSSRProps(binding, vnode); - } - }; -} - -const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; -const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) -}; -/** - * @private - */ -const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; -}; -// Kept for 2.x compat. -// Note: IE11 compat for `spacebar` and `del` is removed for now. -const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' -}; -/** - * @private - */ -const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; -}; - -const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + vModelText.getSSRProps = ({ value }) => ({ value }); + vModelRadio.getSSRProps = ({ value }, vnode) => { + if (vnode.props && looseEqual(vnode.props.value, value)) { + return { checked: true }; } -}; -function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; -} -// SSR vnode transforms, only used when user includes client-oriented render -// function in SSR -function initVShowForSSR() { - vShow.getSSRProps = ({ value }) => { - if (!value) { - return { style: { display: 'none' } }; - } - }; + }; + vModelCheckbox.getSSRProps = ({ value }, vnode) => { + if (isArray(value)) { + if (vnode.props && looseIndexOf(value, vnode.props.value) > -1) { + return { checked: true }; + } + } else if (isSet(value)) { + if (vnode.props && value.has(vnode.props.value)) { + return { checked: true }; + } + } else if (value) { + return { checked: true }; + } + }; + vModelDynamic.getSSRProps = (binding, vnode) => { + if (typeof vnode.type !== "string") { + return; + } + const modelToUse = resolveDynamicModel( + // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase + vnode.type.toUpperCase(), + vnode.props && vnode.props.type + ); + if (modelToUse.getSSRProps) { + return modelToUse.getSSRProps(binding, vnode); + } + }; } -const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps); -// lazy create the renderer - this makes core renderer logic tree-shakable -// in case the user only imports reactivity utilities from Vue. +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; +const modifierGuards = { + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) +}; +const withModifiers = (fn, modifiers) => { + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; + } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); +}; + +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = createRenderer(rendererOptions))); + return renderer || (renderer = createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } -// use explicit type casts here to avoid import() calls in rolled-up d.ts -const render = ((...args) => { - ensureRenderer().render(...args); -}); -const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); -}); -const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - if ((process.env.NODE_ENV !== 'production')) { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + if (!!(process.env.NODE_ENV !== "production")) { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; -}); -const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - if ((process.env.NODE_ENV !== 'production')) { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; -}); + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + if (!!(process.env.NODE_ENV !== "production")) { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} function injectNativeTagCheck(app) { - // Inject `isNativeTag` - // this is used for component name validation (dev only) - Object.defineProperty(app.config, 'isNativeTag', { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag), - writable: false - }); + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); } -// dev only function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, 'isCustomElement', { - get() { - return isCustomElement; - }, - set() { - warn(`The \`isCustomElement\` config option is deprecated. Use ` + - `\`compilerOptions.isCustomElement\` instead.`); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using ` + - `a build of Vue.js that includes the runtime compiler (aka "full build"). ` + - `Since you are using the runtime-only build, \`compilerOptions\` ` + - `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` + - `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` + - `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` + - `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`; - Object.defineProperty(app.config, 'compilerOptions', { - get() { - warn(msg); - return compilerOptions; - }, - set() { - warn(msg); - } - }); - } + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } } function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if ((process.env.NODE_ENV !== 'production') && !res) { - warn(`Failed to mount app: mount target selector "${container}" returned null.`); - } - return res; + if (isString(container)) { + const res = document.querySelector(container); + if (!!(process.env.NODE_ENV !== "production") && !res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); } - if ((process.env.NODE_ENV !== 'production') && - window.ShadowRoot && - container instanceof window.ShadowRoot && - container.mode === 'closed') { - warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`); - } - return container; + return res; + } + if (!!(process.env.NODE_ENV !== "production") && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; } let ssrDirectiveInitialized = false; -/** - * @internal - */ const initDirectivesForSSR = () => { - if (!ssrDirectiveInitialized) { - ssrDirectiveInitialized = true; - initVModelForSSR(); - initVShowForSSR(); - } - } - ; + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; export { Transition, TransitionGroup, VueElement, createApp, createSSRApp, defineCustomElement, defineSSRCustomElement, hydrate, initDirectivesForSSR, render, useCssModule, useCssVars, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, withKeys, withModifiers }; diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js index b3ac035d..6849169d 100644 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js +++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js @@ -1,10829 +1,11052 @@ +/** +* @vue/runtime-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ var VueRuntimeDOM = (function (exports) { 'use strict'; - /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } - const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; - const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - - /** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ - const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; - const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); - /** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ - function includeBooleanAttr(value) { - return !!value || value === ''; - } - - function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } - } - const listDelimiterRE = /;(?![^(]*\))/g; - const propertyDelimiterRE = /:(.+)/; - function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; - } - function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); - } - function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; - } - - // These tag configs are shared between compiler-dom and runtime-dom, so they - // https://developer.mozilla.org/en-US/docs/Web/HTML/Element - const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; - // https://developer.mozilla.org/en-US/docs/Web/SVG/Element - const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); - - function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; - } - function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); - } - function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); - } - - /** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ - const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); - }; - const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; - }; - - const EMPTY_OBJ = Object.freeze({}) - ; + const EMPTY_OBJ = Object.freeze({}) ; const EMPTY_ARR = Object.freeze([]) ; - const NOOP = () => { }; - /** - * Always return false. - */ + const NOOP = () => { + }; const NO = () => false; - const onRE = /^on[^a-z]/; - const isOn = (key) => onRE.test(key); - const isModelListener = (key) => key.startsWith('onUpdate:'); + const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter + (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); + const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; - const hasOwnProperty = Object.prototype.hasOwnProperty; - const hasOwn = (val, key) => hasOwnProperty.call(val, key); + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; + const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; - const isMap = (val) => toTypeString(val) === '[object Map]'; - const isSet = (val) => toTypeString(val) === '[object Set]'; - const isDate = (val) => toTypeString(val) === '[object Date]'; - const isFunction = (val) => typeof val === 'function'; - const isString = (val) => typeof val === 'string'; - const isSymbol = (val) => typeof val === 'symbol'; - const isObject = (val) => val !== null && typeof val === 'object'; + const isMap = (val) => toTypeString(val) === "[object Map]"; + const isSet = (val) => toTypeString(val) === "[object Set]"; + const isDate = (val) => toTypeString(val) === "[object Date]"; + const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; + const isFunction = (val) => typeof val === "function"; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; - const isPlainObject = (val) => toTypeString(val) === '[object Object]'; - const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; - const isReservedProp = /*#__PURE__*/ makeMap( - // the leading comma is intentional so empty string "" is also included - ',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); - const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); + const isPlainObject = (val) => toTypeString(val) === "[object Object]"; + const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; + const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" + ); + const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" + ); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; - /** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; - /** - * @private - */ - const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); - /** - * @private - */ - const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); - /** - * @private - */ - const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); - // compare whether a value has changed, accounting for NaN. + const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() + ); + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + }); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); + }; + const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; - function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); + const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; + const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + + function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } + } + const listDelimiterRE = /;(?![^(]*\))/g; + const propertyDelimiterRE = /:([^]+)/; + const styleCommentRE = /\/\*[^]*?\*\//g; + function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; + } + function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; + } + function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); + } + function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; + } + + const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; + const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + + const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; + const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); + const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` + ); + function includeBooleanAttr(value) { + return !!value || value === ""; + } + const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` + ); + const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` + ); + function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; + } + + function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; + } + function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); + } + function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); + } + + const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); + }; + const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; + }; + const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; + }; + + function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } - const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; - }; - const wasTracked = (dep) => (dep.w & trackOpBit) > 0; - const newTracked = (dep) => (dep.n & trackOpBit) > 0; - const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } - }; - const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } - }; - - const targetMap = new WeakMap(); - // The number of effects currently being tracked recursively. - let effectTrackDepth = 0; - let trackOpBit = 1; - /** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ - const maxMarkerBits = 30; let activeEffect; - const ITERATE_KEY = Symbol('iterate' ); - const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } - function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; + function triggerComputed(computed) { + return computed.value; + } + function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; + } + function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } + } + function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; + let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } - function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } + function pauseScheduling() { + pauseScheduleStack++; } - function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } + function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } - function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; + function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } + } + const queueEffectSchedulers = []; + function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } - function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - } - function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } + function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } - const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); + const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; + }; + + const targetMap = /* @__PURE__ */ new WeakMap(); + const ITERATE_KEY = Symbol("iterate" ); + const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); + function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } + } + function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); + } + function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); + } + + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( - /*#__PURE__*/ - Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); - const get = /*#__PURE__*/ createGetter(); - const shallowGet = /*#__PURE__*/ createGetter(false, true); - const readonlyGet = /*#__PURE__*/ createGetter(true); - const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); - const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) + ); + const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; - } - function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; - } - const set = /*#__PURE__*/ createSetter(); - const shallowSet = /*#__PURE__*/ createSetter(true); - function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } - function deleteProperty(target, key) { + function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); + } + class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + } + class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; - } - function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; - } - function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } - const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys - }; - const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; + class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } - }; - const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet - }); - // Props handlers are special in the sense that it should not unwrap top-level - // refs (in order to allow refs to be explicitly passed down), but should - // retain the reactivity of the normal readonly object. - const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet - }); + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + } + const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); + const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true + ); + const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); - function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); + function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } - function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); + function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } - function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; + function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } - const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); + const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations + ] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; - function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } + function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } - const reactiveMap = new WeakMap(); - const shallowReactiveMap = new WeakMap(); - const readonlyMap = new WeakMap(); - const shallowReadonlyMap = new WeakMap(); + const reactiveMap = /* @__PURE__ */ new WeakMap(); + const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + const readonlyMap = /* @__PURE__ */ new WeakMap(); + const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } - /** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } - /** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } - /** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } - function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; - function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } + class ComputedRefImpl { + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); + } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } - function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } - } - function isRef(r) { - return !!(r && r.__v_isRef === true); - } - function ref(value) { - return createRef(value, false); - } - function shallowRef(value) { - return createRef(value, true); - } - function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); - } - class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } - } - function triggerRef(ref) { - triggerRefValue(ref, ref.value ); - } - function unref(ref) { - return isRef(ref) ? ref.value : ref; - } - const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } - }; - function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); - } - class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } - } - function customRef(factory) { - return new CustomRefImpl(factory); - } - function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; - } - class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - } - function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); + function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; } - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; - } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); - } + function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } } - function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; + function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } } + function isRef(r) { + return !!(r && r.__v_isRef === true); + } + function ref(value) { + return createRef(value, false); + } + function shallowRef(value) { + return createRef(value, true); + } + function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); + } + class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); + } + } + } + function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); + } + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + function toValue(source) { + return isFunction(source) ? source() : unref(source); + } + const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } + }; + function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); + } + class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } + } + function customRef(factory) { + return new CustomRefImpl(factory); + } + function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; + } + class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } + } + class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } + } + function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } + } + function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); + } + + const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" + }; + const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" + }; const stack = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack.push(vnode); } function popWarningContext() { - stack.pop(); + stack.pop(); } function warn$1(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } - /* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } - /* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } - /* istanbul ignore next */ function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } + } + function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } } - const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' + const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" + }; + const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; - const pendingPreFlushCbs = []; - let activePreFlushCbs = null; - let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; - const resolvedPromise = /*#__PURE__*/ Promise.resolve(); + const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; - let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } - // #2768 - // Use binary-search to find a suitable position in the queue, - // so that the queue maintains the increasing order of job's id, - // which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } - } - function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } - } - function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } - } - function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } - function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); + function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } + } + function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); - } - function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - { - seen = seen || new Map(); - } - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) { - continue; - } - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); + } + function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; + const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; + }; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - { - seen = seen || new Map(); - } - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = (job) => checkRecursiveUpdates(seen, job) - ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (true && check(job)) { - continue; - } - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; } + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); } + } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } - else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`); - return true; - } - else { - seen.set(fn, count + 1); - } + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); } + } } - /* eslint-disable no-restricted-globals */ let isHmrUpdating = false; - const hmrDirtyComponents = new Set(); - // Expose the HMR runtime on the global object - // This makes it entirely tree-shakable without polluting the exports and makes - // it easier to be used in toolings like vue-loader - // Note: for a component to be eligible for HMR it also needs the __hmrId option - // to be set so that its instances can be registered / removed. + const hmrDirtyComponents = /* @__PURE__ */ new Set(); { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; } - const map = new Map(); + const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); } function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); + map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: new Set() - }); - return true; + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; } function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; + return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; } - // update initial record (for not-yet-rendered component) - record.initialDef.render = newRender; - [...record.instances].forEach(instance => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - // this flag forces child components with slot content to update - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); } function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - // update initial def (for not-yet-rendered components) - updateComponentDef(record.initialDef, newComp); - // create a snapshot which avoids the set being mutated during updates - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - // 1. Update existing comp definition to match new one - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - // 2. mark definition dirty. This forces the renderer to replace the - // component on patch. - hmrDirtyComponents.add(oldComp); - } - // 3. invalidate options resolution cache - instance.appContext.optionsCache.delete(instance.type); - // 4. actually update - if (instance.ceReload) { - // custom element - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } - else if (instance.parent) { - // 4. Force the parent instance to re-render. This will cause all updated - // components to be unmounted and re-mounted. Queue the update so that we - // don't end up forcing the same parent to re-render multiple times. - queueJob(instance.parent.update); - // instance is the inner component of an async custom element - // invoke to reset styles - if (instance.parent.type.__asyncLoader && - instance.parent.ceReload) { - instance.parent.ceReload(newComp.styles); - } - } - else if (instance.appContext.reload) { - // root instance mounted via createApp() has a reload method - instance.appContext.reload(); - } - else if (typeof window !== 'undefined') { - // root instance inside tree created via raw render(). Force reload. - window.location.reload(); - } - else { - console.warn('[HMR] Root or manually mounted instance modified. Full reload required.'); - } + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); } - // 5. make sure to cleanup dirty hmr components after update - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); - } - }); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); } function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== '__file' && !(key in newComp)) { - delete oldComp[key]; - } + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; } + } } function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } - catch (e) { - console.error(e); - console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` + - `Full reload required.`); - } - }; + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; } + let devtools$1; let buffer = []; let devtoolsNotInstalled = false; - function emit(event, ...args) { - if (exports.devtools) { - exports.devtools.emit(event, ...args); - } - else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } + function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } } - function setDevtoolsHook(hook, target) { - var _a, _b; - exports.devtools = hook; - if (exports.devtools) { - exports.devtools.enabled = true; - buffer.forEach(({ event, args }) => exports.devtools.emit(event, ...args)); - buffer = []; - } - else if ( + function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( // handle late devtools injection - only do this if we are in an actual // browser environment to avoid the timer handle stalling test runner exit // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!exports.devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3000); - } - else { - // non-browser env, assume not installed + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; - } + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } } function devtoolsInitApp(app, version) { - emit("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); } function devtoolsUnmountApp(app) { - emit("app:unmount" /* APP_UNMOUNT */, app); + emit$1("app:unmount" /* APP_UNMOUNT */, app); } - const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); - const devtoolsComponentUpdated = - /*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); - const devtoolsComponentRemoved = - /*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */); + const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ + ); + const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); + const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ + ); + const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } + }; function createDevtoolsComponentHook(hook) { - return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component); - }; + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; } - const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); - const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); + const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ + ); + const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ + ); function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); - }; + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params); + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); } - function emit$1(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { emitsOptions, propsOptions: [propsOptions] } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && - !(false )) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1(`Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "${toHandlerKey(event)}" prop.`); - } - } - else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1(`Invalid event arguments: event validation failed for event "${event}".`); - } - } - } + function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); } - } - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(toNumber); + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } } + } } - { - devtoolsComponentEmit(instance, event, args); + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1(`Event "${lowerCaseEvent}" is emitted in component ` + - `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` + - `Note that HTML attributes are case-insensitive and you cannot use ` + - `v-on to listen to camelCase events when using in-DOM templates. ` + - `You should probably use "${hyphenate(event)}" instead of "${event}".`); - } + if (number) { + args = rawArgs.map(looseToNumber); } - let handlerName; - let handler = props[(handlerName = toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = toHandlerKey(camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = toHandlerKey(hyphenate(event)))]; + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } - // Check if an incoming prop key is a declared emit event listener. - // e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are - // both considered matched listeners. function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - hasOwn(options, hyphenate(key)) || - hasOwn(options, key)); + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } - /** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; - /** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } - /** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } - /** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } - /** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; - /** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ - function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only - ) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; + function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } - /** - * dev only flag to track whether $attrs was used during render. - * If $attrs was used during render then the warning for failed attrs - * fallthrough can be suppressed. - */ let accessedAttrs = false; function markAttrsAccessed() { - accessedAttrs = true; + accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if (true && attrs === props) { - markAttrsAccessed(); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } - result = normalizeVNode(render.length > 1 - ? render(props, true - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + } else { + extraAttrs.push(key); + } } - } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - let setRoot = undefined; - if (result.patchFlag > 0 && - result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - // ignore v-model handlers when they fail to fallthrough - if (!isModelListener(key)) { - // remove `on`, lowercase first letter to reflect event casing - // accurately - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } - else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1(`Extraneous non-props attributes (` + - `${extraAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes.`); - } - if (eventAttrs.length) { - warn$1(`Extraneous non-emits event listeners (` + - `${eventAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes. ` + - `If the listener is intended to be a component custom event listener only, ` + - `declare it using the "emits" option.`); - } - } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); } - } - // inherit directives - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1(`Runtime directive used on component with non-element root node. ` + - `The directives will not function as intended.`); + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); } - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } } - // inherit transition data - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1(`Component inside <Transition> renders non-element root node ` + - `that cannot be animated.`); - } - root.transition = vnode.transition; + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); } - if (setRoot) { - setRoot(root); + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); } - else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } - /** - * dev only - * In dev mode, template root level comments are rendered, which turns the - * template into a fragment root, but we need to locate the single element - * root for attrs and scope id processing. - */ const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, undefined]; + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } - else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; + }; + return [normalizeVNode(childRoot), setRoot]; }; - function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; + function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; const isElementRoot = (vnode) => { - return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) || - vnode.type === Comment // potential v-if branch switch - ); + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // Parent component's render function was hot-updated. Since this may have - // caused the child component's slots content to have changed, we need to - // force the child to update as well. - if ((prevChildren || nextChildren) && isHmrUpdating) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { - return true; + if (prevProps === nextProps) { + return false; } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (!prevProps) { + return !!nextProps; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!nextProps) { + return true; } - return false; + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } - function updateHOCHostEl({ vnode, parent }, el // HostNode - ) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; + function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } + } + + const COMPONENTS = "components"; + const DIRECTIVES = "directives"; + function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; + } + const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } + } + function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); + } + function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } + } + function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } const isSuspense = (type) => type.__isSuspense; - // Suspense exposes a component-like API, and is treated like a component - // in the compiler, but internally it's a special built-in type that hooks - // directly into the renderer. + let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren }; - // Force-casted public typing for h and TSX props inference - const Suspense = (SuspenseImpl ); + const Suspense = SuspenseImpl ; function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } } - function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. + function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } + } + function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } } - } - function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); } + } } + } } let hasWarned = false; - function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - /* istanbul ignore if */ - if (!hasWarned) { - hasWarned = true; - // @ts-ignore `console.info` cannot be null error - console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`); + function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; } - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error(`suspense.resolve() is called without a pending branch.`); - } - if (suspense.isUnmounted) { - throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`); - } - } - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - { - pushWarningContext(vnode); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - { - popWarningContext(); - } - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); } - }; - return suspense; - } - function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } } - return result; - /* eslint-enable no-restricted-globals */ + }; + return suspense; + } + function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); } - return s; + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } + } + function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } - function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } - } - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } - } - function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else { - warn$1(`injection "${String(key)}" not found.`); - } - } - else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } - } + const ssrContextKey = Symbol.for("v-scx"); + const useSSRContext = () => { + { + warn$1(`useSSRContext() is not supported in the global build.`); + } + }; - // Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); } - // initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; - // implementation function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` + - `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` + - `supports \`watch(source, cb, options?) signature.`); - } - return doWatch(source, cb, options); + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); } - function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - if (!cb) { - if (immediate !== undefined) { - warn$1(`watch() "immediate" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - if (deep !== undefined) { - warn$1(`watch() "deep" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - } - const warnInvalidSource = (s) => { - warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.`); + function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger + } = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isReactive(source)) { - getter = () => source; - deep = true; + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => isReactive(s) || isShallow(s)); - getter = () => source.map(s => { - if (isRef(s)) { - return s.value; - } - else if (isReactive(s)) { - return traverse(s); - } - else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else { - warnInvalidSource(s); - } - }); + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; - }; - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => hasChanged(v, oldValue[i])) - : hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new ReactiveEffect(getter, scheduler); - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - // initial run + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect); - } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + return unwatch; } - // this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } - function traverse(value, seen) { - if (!isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } + function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } + function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } + } + function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; + } + function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } + } + + const leaveCbKey = Symbol("_leaveCb"); + const enterCbKey$1 = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; - const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - // warn more than one non-comment child - warn$1('<transition> can only be used on a single element or component. ' + - 'Use <transition-group> for lists.'); - break; - } - child = c; - hasFound = true; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = toRaw(props); - const { mode } = rawProps; - // check mode - if (mode && - mode !== 'in-out' && - mode !== 'out-in' && - mode !== 'default') { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } + const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator + }; + const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; - // export the public type for h/tsx inference - // also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } - // The transition hooks are attached to the vnode as vnode.transition - // and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; - } - // the placeholder really only handles one special case: KeepAlive - // in the case of a KeepAlive in a leave phase we need to return a KeepAlive - // placeholder with empty content to avoid the KeepAlive instance from being - // unmounted. - function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; + } + function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } - // implementation, close to no-op - function defineComponent(options) { - return isFunction(options) ? { setup: options, name: options.name } : options; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1(`Async component loader resolved to undefined. ` + - `If you are using retry(), make sure to return its return value.`); - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (false )) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } - function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; + function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - const cache = new Map(); - const keys = new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; - // export the public type for h/tsx inference - // also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; - } - else { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')); - warn$1(`${apiName} is called when there is no active component instance to be ` + - `associated with. ` + - `Lifecycle injection APIs can only be used during execution of setup().` + - (` If you are using async setup(), make sure to register lifecycle ` + - `hooks before the first await statement.` - )); + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } } - const createHook = (lifecycle) => (hook, target = currentInstance) => - // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) - (!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); - const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); - const onMounted = createHook("m" /* MOUNTED */); - const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); - const onUpdated = createHook("u" /* UPDATED */); - const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); - const onUnmounted = createHook("um" /* UNMOUNTED */); - const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); - const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); - const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); + const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) + ); + const onBeforeMount = createHook("bm"); + const onMounted = createHook("m"); + const onBeforeUpdate = createHook("bu"); + const onUpdated = createHook("u"); + const onBeforeUnmount = createHook("bum"); + const onUnmounted = createHook("um"); + const onServerPrefetch = createHook("sp"); + const onRenderTriggered = createHook( + "rtg" + ); + const onRenderTracked = createHook( + "rtc" + ); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } - /** - Runtime helper for applying directives to a vnode. Example usage: - - const comp = resolveComponent('comp') - const foo = resolveDirective('foo') - const bar = resolveDirective('bar') - - return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] - ]) - */ - function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1('Do not use built-in directive ids as custom directive id: ' + name); - } - } - /** - * Adds directives to a VNode. - */ - function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; - } - function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } - } - - const COMPONENTS = 'components'; - const DIRECTIVES = 'directives'; - /** - * @private - */ - function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; - } - const NULL_DYNAMIC_COMPONENT = Symbol(); - /** - * @private - */ - function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } - } - /** - * @private - */ - function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); - } - // implementation - function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === camelize(name) || - selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS - ? `\nIf this is a native custom element, make sure to exclude it from ` + - `component resolution via compilerOptions.isCustomElement.` - : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } - else { - warn$1(`resolve${capitalize(type.slice(0, -1))} ` + - `can only be used in render() or setup().`); - } - } - function resolve(registry, name) { - return (registry && - (registry[name] || - registry[camelize(name)] || - registry[capitalize(camelize(name))])); - } - - /** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); } - else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else { - ret = []; + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } - /** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } - /** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ - function renderSlot(slots, name, props = {}, - // this is not a user-facing function, so the fallback is always generated by - // the compiler and guaranteed to be a function returning an array - fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` + - `function. You need to mark this component with $dynamic-slots in the ` + - `parent template.`); - slot = () => []; - } - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; + function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } - /** - * For prefixing keys in v-on="obj" with "on" - * @private - */ - function toHandlers(obj) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[toHandlerKey(key)] = obj[key]; - } + function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; } - /** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; - const publicPropertiesMap = - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /*#__PURE__*/ extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => (shallowReadonly(i.props) ), - $attrs: i => (shallowReadonly(i.attrs) ), - $slots: i => (shallowReadonly(i.slots) ), - $refs: i => (shallowReadonly(i.refs) ), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (resolveMergedOptions(i) ), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (instanceWatch.bind(i) ) - }); - const isReservedPrefix = (key) => key === '_' || key === '$'; + const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) + ); + const isReservedPrefix = (key) => key === "_" || key === "$"; + const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // for internal formatters to know that this is a Vue instance - if (key === '__isVue') { - return true; - } - // prioritize <script setup> bindings during dev. - // this allows even properties that start with _ or $ to be used - so that - // it aligns with the production behavior where the render fn is inlined and - // indeed has access to all declared variables. - if (setupState !== EMPTY_OBJ && - setupState.__isScriptSetup && - hasOwn(setupState, key)) { - return setupState[key]; - } - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - track(instance, "get" /* GET */, key); - markAttrsAccessed(); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else if (currentRenderingInstance && - (!isString(key) || - // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf('__v') !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` + - `character ("$" or "_") and is not proxied on the render context.`); - } - else if (instance === currentRenderingInstance) { - warn$1(`Property ${JSON.stringify(key)} was accessed during render ` + - `but is not defined on instance.`); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance); - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - warn$1(`Attempting to mutate public property "${key}". ` + - `Properties starting with $ are reserved and readonly.`, instance); - return false; - } - else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } - else { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== EMPTY_OBJ && hasOwn(data, key)) || - (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) || - hasOwn(ctx, key) || - hasOwn(publicPropertiesMap, key) || - hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } }; { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` + - `The keys will be empty in production mode to avoid performance overhead.`); - return Reflect.ownKeys(target); - }; + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; } - const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, PublicInstanceProxyHandlers, { + const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend( + {}, + PublicInstanceProxyHandlers, + { get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !isGloballyWhitelisted(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`); - } - return has; + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } - }); - // dev only - // In dev mode, the proxy target exposes the same properties as seen on `this` - // for easier console inspection. In prod mode it will be an empty object so - // these properties definitions can be skipped. + } + ); function createDevRenderContext(instance) { - const target = {}; - // expose internal instance for proxy handlers - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP }); - // expose public properties - Object.keys(publicPropertiesMap).forEach(key => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; + }); + return target; } - // dev only function exposePropsOnRenderContext(instance) { - const { ctx, propsOptions: [propsOptions] } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach(key => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } - } - // dev only - function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach(key => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` + - `which are reserved prefixes for Vue internals.`); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); }); + } + } + function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); + } + + const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` + ); + function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; + } + function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; + } + function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } + } + function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } + } + function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; + } + function defineModel() { + { + warnRuntimeUsage("defineModel"); + } + } + function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; + } + function useSlots() { + return getContext().slots; + } + function useAttrs() { + return getContext().attrs; + } + function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); + } + function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; + } + function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; + } + function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (isArray(a) && isArray(b)) + return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); + } + function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; + } + function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; } function createDuplicateChecker() { - const cache = Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } - else { - cache[key] = type; - } - }; + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; } let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } } - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } - else { - warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` + - `Did you reference the function correctly?`); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1(`The data option must be a function. ` + - `Plain object usage is no longer supported.`); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1(`data() returned a Promise - note data() cannot be async; If you ` + - `intend to perform data fetching before component renders, use ` + - `async setup() + <Suspense>.`); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } - else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - // expose data on ctx during dev - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) - ? opt.bind(publicThis, publicThis) - : isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) - ? opt.set.bind(publicThis) - : () => { - warn$1(`Write operation failed: computed property "${key}" is readonly.`); - } - ; - const c = computed$1({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; - } - function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - { - warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` + - `and no longer needs \`.value\` in the next minor release. ` + - `To opt-in to the new behavior now, ` + - `set \`app.config.unwrapInjectedRef = true\` (this config is ` + - `temporary and will not be needed in the future.)`); - } - ctx[key] = injected; - } - } - else { - ctx[key] = injected; + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); } { - checkDuplicateProperties("Inject" /* INJECT */, key); + checkDuplicateProperties("Methods" /* METHODS */, key); } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; } - function callHook(hook, instance, type) { - callWithAsyncErrorHandling(isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); + function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } + } + function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - watch(getter, handler); - } - else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + watch(getter, handler); + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } - else if (isFunction(raw)) { - watch(getter, raw.bind(publicThis)); - } - else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } - else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } - else { - warn$1(`Invalid watch option: "${key}"`, raw); + } else if (isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } } - /** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') { - warn$1(`"expose" option is ignored when declared in mixins or extends. ` + - `It should only be declared in the base component itself.`); - } - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend(extend(Object.create(null), to), from) : from; + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; + } + function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; } - function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison - isSSR = false) { - const props = {}; - const attrs = {}; - def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; - } + function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; + } + let uid$1 = 0; + function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); } - // validation + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; + } + let currentApp = null; + + function provide(key, value) { + if (!currentInstance) { { - validateProps(rawProps || {}, props, instance); + warn$1(`provide() can only be used inside setup().`); } - if (isStateful) { - // stateful - instance.props = isSSR ? props : shallowReactive(props); + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; - } - else { - // functional w/ declared props - instance.props = props; - } + provides[key] = value; + } + } + function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); } - instance.attrs = attrs; + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } + } + function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); + } + + function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; + } + function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !((instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId))) && - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - trigger(instance, "set" /* SET */, '$attrs'); - } - { - validateProps(rawProps || {}, props, instance); - } + } + if (hasAttrsChanged) { + trigger(instance, "set", "$attrs"); + } + { + validateProps(rawProps || {}, props, instance); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && hasOwn(options, (camelKey = camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, EMPTY_ARR); - return EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); } - else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - isArray(opt) || isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } } - const res = [normalized, needCastKeys]; + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; + if (key[0] !== "$") { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; } - // use function string name to check type constructors - // so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } - /** - * dev only - */ function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - for (const key in options) { - let opt = options[key]; - if (opt == null) - continue; - validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))); - } + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)) + ); + } } - /** - * dev only - */ - function validateProp(name, value, prop, isAbsent) { - const { type, required, validator } = prop; - // required! - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; + function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; } - // missing but optional - if (value == null && !prop.required) { - return; - } - // type check - if (type != null && type !== true) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - // value is valid as long as one of the specified types match - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ''); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - // custom validator - if (validator && !validator(value)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } } - const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt'); - /** - * dev only - */ + const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" + ); function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; } - else if (expectedType === 'Object') { - valid = isObject(value); - } - else if (expectedType === 'Array') { - valid = isArray(value); - } - else if (expectedType === 'null') { - valid = value === null; - } - else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; } - /** - * dev only - */ function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid prop: type check failed for prop "${name}".` + - ` Expected ${expectedTypes.map(capitalize).join(' | ')}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; } - /** - * dev only - */ function styleValue(value, type) { - if (type === 'String') { - return `"${value}"`; - } - else if (type === 'Number') { - return `${Number(value)}`; - } - else { - return `${value}`; - } + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } } - /** - * dev only - */ function isExplicable(type) { - const explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(elem => type.toLowerCase() === elem); + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); } - /** - * dev only - */ function isBoolean(...args) { - return args.some(elem => elem.toLowerCase() === 'boolean'); + return args.some((elem) => elem.toLowerCase() === "boolean"); } - const isInternalKey = (key) => key[0] === '_' || key === '$stable'; - const normalizeSlotValue = (value) => isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; + const isInternalKey = (key) => key[0] === "_" || key === "$stable"; + const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); } - const normalized = withCtx((...args) => { - if (currentInstance) { - warn$1(`Slot "${key}" invoked outside of the render function: ` + - `this will not track dependencies used in the slot. ` + - `Invoke the slot function inside the render function instead.`); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - { - warn$1(`Non-function value encountered for slot "${key}". ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && - !(false )) { - warn$1(`Non-function value encountered for default slot. ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = toRaw(children); - // make compiler marker non-enumerable - def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = toRaw(children); + def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - def(instance.slots, InternalObjectKey, 1); + } + def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if (isHmrUpdating) { - // Parent was HMR updated so slot content may have changed. - // force update slots and mark instance for hmr as well - extend(slots, children); - } - else if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + extend(slots, children); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; - function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; - } - let uid = 0; - function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = Object.assign({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1(`app.config cannot be replaced. Modify individual options instead.`); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } - else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else { - warn$1(`A plugin must either be a function or an object with an "install" ` + - `function.`); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - else { - warn$1('Mixin has already been applied to target app' + - (mixin.name ? `: ${mixin.name}` : '')); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - // #5571 - if (rootContainer.__vue_app__) { - warn$1(`There is already an app instance mounted on the host container.\n` + - ` If you want to mount another app on the same host container,` + - ` you need to unmount the previous app by calling \`app.unmount()\` first.`); - } - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - // HMR root reload - { - context.reload = () => { - render(cloneVNode(vnode), rootContainer, isSVG); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - else { - warn$1(`App has already been mounted.\n` + - `If you want to remount the same app, move your app creation logic ` + - `into a factory function and create fresh app instances for each ` + - `mount - e.g. \`const createMyApp = () => createApp(App)\``); - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } - else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1(`App already provides property with key "${String(key)}". ` + - `It will be overwritten with the new value.`); - } - context.provides[key] = value; - return app; - } - }); - return app; - }; - } - - /** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + - `A vnode with ref must be created inside the render function.`); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } + } + } else if (_isString) { + refs[ref] = value; + if (hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } - else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } - else if (_isString) { - refs[ref] = value; - if (hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } - else { - doSet(); - } - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } + } } let hasMismatch = false; - const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; + const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; + const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); + const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; + }; const isComment = (node) => node.nodeType === 8 /* COMMENT */; - // Note: hydration is DOM-specific - // But we have to place it in core due to tight coupling with core - splitting - // it out creates a ton of unnecessary complexity. - // Hydration also depends on some renderer internal logic which needs to be - // passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1(`Attempting to hydrate existing markup but container is empty. ` + - `Performing full mount instead.`); - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text mismatch:` + - `\n- Client: ${JSON.stringify(node.data)}` + - `\n- Server: ${JSON.stringify(vnode.children)}`); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else { - warn$1('Invalid HostVNode type:', type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (isOn(key) && !isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + if (!("__vnode" in node)) { + Object.defineProperty(node, "__vnode", { + value: vnode, + enumerable: false + }); + } + if (!("__vueParentComponent" in node)) { + Object.defineProperty(node, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + hasMismatch = true; + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + el.textContent = vnode.children; + } + } + if (props) { + { + for (const key in props) { + if (propHasMismatch(el, key, props[key], vnode)) { + hasMismatch = true; + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - return node; - }; - return [hydrate, hydrateNode]; + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; + } + function propHasMismatch(el, key, clientValue, vnode) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style"); + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = `attribute`; + mismatchKey = key; + } + } + if (mismatchType) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${mismatchType} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; + } + function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); + } + function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; + } + function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key == null ? void 0 : key.trim(); + value = value == null ? void 0 : value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; + } + function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; } - /* eslint-disable no-restricted-globals */ let supported; let perf; function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } } function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } } function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } + if (supported !== void 0) { return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; } - const queuePostRenderEffect = queueEffectWithSuspense - ; - /** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ + const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } - // Separate API for creating hydration-enabled renderer. - // Hydration logic is only used when calling this function, making it - // tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } - // implementation function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else { - warn$1('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); } + } } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); } - else { - // there's no support for dynamic comments - n2.el = n1.el; + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); + } + for (const key in newProps) { + if (isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); } - { - Object.defineProperty(el, '__vnode', { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, '__vueParentComponent', { - value: parentComponent, - enumerable: false - }); + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && - subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - subTree = - filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - // HMR updated, force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (// #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) { - // HMR updated / Dev root fragment (w/ comments), force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { { - startMeasure(instance, `init`); + startMeasure(instance, `render`); } - setupComponent(instance); + instance.subTree = renderComponentRoot(instance); { - endMeasure(instance, `init`); + endMeasure(instance, `render`); } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); return; + } } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); + let originNext = next; + let vnodeHook; { - popWarningContext(); - endMeasure(instance, `mount`); + pushWarningContext(next || instance.vnode); } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - // async & still pending - just update props and slots - // since the component's reactive effect for render isn't set-up yet - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - { - startMeasure(instance, `render`); - } - const subTree = (instance.subTree = renderComponentRoot(instance)); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - // render - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates toggleRecurse(instance, true); { - effect.onTrack = instance.rtc - ? e => invokeArrayFns(instance.rtc, e) - : void 0; - effect.onTrigger = instance.rtg - ? e => invokeArrayFns(instance.rtg, e) - : void 0; - update.ownerInstance = instance; + startMeasure(instance, `render`); } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); + if (u) { + queuePostRenderEffect(u, parentSuspense); } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); - } - }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && - vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ && - transition && - !transition.persisted) { - vnode.children.forEach(child => { - if (child.type === Comment) { - hostRemove(child.el); - } - else { - remove(child); - } - }); - } - else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); } { - devtoolsComponentRemoved(instance); + devtoolsComponentUpdated(instance); } + { + popWarningContext(); + } + } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } + const effect = instance.effect = new ReactiveEffect( + componentUpdateFn, + NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + update.id = instance.uid; + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; + } + function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; + } + function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } - /** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } - // also inherit for comment nodes, but not placeholders (e.g. v-if which - // would have received .el during block patch) - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } } + } } - // https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; + } + function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; - const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); - const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; + const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); + const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; + const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1(`Current renderer does not support string target for Teleports. ` + - `(missing querySelector renderer option)`); - return null; - } - else { - const target = select(targetSelector); - if (!target) { - warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` + - `Note the target element must exist before the component is mounted - ` + - `i.e. the target cannot be rendered by the component itself, and ` + - `ideally should be outside of the entire Vue component tree.`); - } - return target; - } + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; } - else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); } + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - // #3302 - // HMR updated, force full diff - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = createComment('teleport start') - ); - const mainAnchor = (n2.anchor = createComment('teleport end') - ); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - else if (!disabled) { - warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } - } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - else { - warn$1('Invalid Teleport target on update:', target, `(${typeof target})`); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } - } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport - }; - function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } + } else if (!disabled) { + warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } - } - function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport + }; + function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } + } + function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } + }, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } - // Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; + function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } + } - const Fragment = Symbol('Fragment' ); - const Text = Symbol('Text' ); - const Comment = Symbol('Comment' ); - const Static = Symbol('Static' ); - // Since v-if and v-for are the two possible ways node structure can dynamically - // change, once we consider v-if branches and each v-for fragment a block, we - // can divide a template into nested blocks, and within each block the node - // structure would be stable. This allows us to skip most children diffing - // and only worry about the dynamic nodes (indicated by patch flags). + const Fragment = Symbol.for("v-fgt"); + const Text = Symbol.for("v-txt"); + const Comment = Symbol.for("v-cmt"); + const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; - /** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } - // Whether we should be tracking dynamic child nodes inside a block. - // Only tracks when this value is > 0 - // We are not using a simple boolean because this value may need to be - // incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; - /** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } - /** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } - /** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 /* COMPONENT */ && - hmrDirtyComponents.has(n2.type)) { - // HMR only: if the component has been hot-updated, force a reload. - return false; - } - return n1.type === n2.type && n1.key === n2.key; + if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; } let vnodeArgsTransformer; - /** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; + vnodeArgsTransformer = transformer; } const createVNodeWithArgsTransform = (...args) => { - return _createVNode(...(vnodeArgsTransformer - ? vnodeArgsTransformer(args, currentRenderingInstance) - : args)); + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); }; const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; - const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? isString(ref) || isRef(ref) || isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); + const normalizeRef = ({ + ref, + ref_key, + ref_for + }) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; - function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } + function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // validate key - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } - const createVNode = (createVNodeWithArgsTransform ); + const createVNode = createVNodeWithArgsTransform ; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); } - // encode the vnode type information into a bitmap - const shapeFlag = isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) { - type = toRaw(type); - warn$1(`Vue received a Component which was made a reactive object. This can ` + - `lead to unnecessary performance overhead, and should be avoided by ` + - `marking the component with \`markRaw\` or using \`shallowRef\` ` + - `instead of \`ref\`.`, `\nComponent that was made reactive: `, type); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); } - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return isProxy(props) || InternalObjectKey in props - ? extend({}, props) - : props; + if (!props) + return null; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 /* HOISTED */ && isArray(children) - ? children.map(deepCloneVNode) - : children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } - /** - * Dev only, for HMR of hoisted vnodes reused in v-for - * https://github.com/vitejs/vite/issues/2022 - */ function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; } - /** - * @private - */ - function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); + function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } - /** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } - /** - * @private - */ - function createCommentVNode(text = '', - // when used as the v-else branch, the comment node must be created as a - // block to ensure correct updates. - asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); + function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } - // optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } - else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); - let uid$1 = 0; + let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; + let internalSetCurrentInstance; + let setInSSRSetupState; + { + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; + } const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; - const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component'); + const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); function validateComponentName(name, config) { - const appIsNativeTag = config.isNativeTag || NO; - if (isBuiltInTag(name) || appIsNativeTag(name)) { - warn$1('Do not use built-in or reserved HTML elements as component id: ' + name); - } + const appIsNativeTag = config.isNativeTag || NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } } function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1(`"compilerOptions" is only supported when using a build of Vue that ` + - `includes the runtime compiler. Since you are using a runtime-only ` + - `build, the options should be passed via your build tool config instead.`); - } + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); } - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - { - exposePropsOnRenderContext(instance); + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } } - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]); - resetTracking(); - unsetCurrentInstance(); - if (isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous'; - warn$1(`Component <${name}>: setup function returned a promise, but no ` + - `<Suspense> boundary was found in the parent component tree. ` + - `A component with async setup() must be nested in a <Suspense> ` + - `in order to be rendered.`); - } - } - } - else { - handleSetupResult(instance, setupResult, isSSR); + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + resetTracking(); + reset(); + if (isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); } + } + } else { + handleSetupResult(instance, setupResult, isSSR); } - else { - finishComponentSetup(instance, isSSR); - } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - // setup returned an inline render function - { - instance.render = setupResult; - } + if (isFunction(setupResult)) { + { + instance.render = setupResult; } - else if (isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1(`setup() should not return VNodes directly - ` + - `return a render function instead.`); - } - // setup returned bindings. - // assuming a render function compiled from template is present. - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); } - else if (setupResult !== undefined) { - warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`); + { + instance.devtoolsRawSetupState = setupResult; } - finishComponentSetup(instance, isSSR); + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); } let compile; let installWithProxy; - /** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; + compile = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; } - // dev only const isRuntimeOnly = () => !compile; function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend(extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); } - instance.render = (Component.render || NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); - } - } - // support for 2.x options - { - setCurrentInstance(instance); - pauseTracking(); - applyOptions(instance); - resetTracking(); - unsetCurrentInstance(); - } - // warn missing template/render - // the runtime compilation of template in SSR is done by server-render - if (!Component.render && instance.render === NOOP && !isSSR) { - /* istanbul ignore if */ - if (!compile && Component.template) { - warn$1(`Component provided template option but ` + - `runtime compilation is not supported in this build of Vue.` + - (` Use "vue.global.js" instead.` - ) /* should not happen */); - } - else { - warn$1(`Component is missing template or render function.`); - } - } - } - function createAttrsProxy(instance) { - return new Proxy(instance.attrs, { - get(target, key) { - markAttrsAccessed(); - track(instance, "get" /* GET */, '$attrs'); - return target[key]; + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } - } + compilerOptions + ), + componentCompilerOptions ); + Component.render = compile(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } + } + function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + markAttrsAccessed(); + track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } + )); + } + function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + })); } function createSetupContext(instance) { - const expose = exposed => { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - instance.exposed = exposed || {}; - }; - let attrs; + const expose = (exposed) => { { - // We use getters in dev in case libs like test-utils overwrite instance - // properties (overwrites should not be done in prod) - return Object.freeze({ - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - get slots() { - return shallowReadonly(instance.slots); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } } + instance.exposed = exposed || {}; + }; + { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } } const classifyRE = /(?:^|[-_])(\w)/g; - const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); - function getComponentName(Component) { - return isFunction(Component) - ? Component.displayName || Component.name - : Component.name; + const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); + function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } - /* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { - return isFunction(value) && '__vccOpts' in value; + return isFunction(value) && "__vccOpts" in value; } - const computed$1 = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return computed(getterOrOptions, debugOptions, isInSSRComponentSetup); - }); - - // dev only - const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` + - `<script setup> of a single file component. Its arguments should be ` + - `compiled away and passing it at runtime has no effect.`); - // implementation - function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; - } - // implementation - function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; - } - /** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ - function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } - } - /** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ - function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; - } - function useSlots() { - return getContext().slots; - } - function useAttrs() { - return getContext().attrs; - } - function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); - } - /** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ - function mergeDefaults(raw, defaults) { - const props = isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - } - return props; - } - /** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ - function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; - } - /** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ - function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1(`withAsyncContext called without active current instance. ` + - `This is likely a bug.`); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; - } - - // Actual implementation - function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } - } - - const ssrContextKey = Symbol(`ssrContext` ); - const useSSRContext = () => { - { - warn$1(`useSSRContext() is not supported in the global build.`); - } + const computed = (getterOrOptions, debugOptions) => { + return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); }; - function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - if (typeof window === 'undefined') { - return; - } - const vueStyle = { style: 'color:#3ba776' }; - const numberStyle = { style: 'color:#0b1bc9' }; - const stringStyle = { style: 'color:#b62e24' }; - const keywordStyle = { style: 'color:#9d288c' }; - // custom formatter for Chrome - // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html - const formatter = { - header(obj) { - // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ['div', vueStyle, `VueInstance`]; - } - else if (isRef(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, genRefFlag(obj)], - '<', - formatValue(obj.value), - `>` - ]; - } - else if (isReactive(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'], - '<', - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } - else if (isReadonly(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'], - '<', - formatValue(obj), - '>' - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - 'div', - {}, - ...formatInstance(obj.$) - ]; - } + function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + if (!i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const camelizedName = camelize(name); + const hyphenatedName = hyphenate(name); + const res = customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) { + localValue = value; + trigger(); } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock('props', toRaw(instance.props))); + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('setup', instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('data', toRaw(instance.data))); - } - const computed = extractKeys(instance, 'computed'); - if (computed) { - blocks.push(createInstanceBlock('computed', computed)); - } - const injected = extractKeys(instance, 'inject'); - if (injected) { - blocks.push(createInstanceBlock('injected', injected)); - } - blocks.push([ - 'div', - {}, - [ - 'span', - { - style: keywordStyle.style + ';opacity:0.66' - }, - '$ (internal): ' - ], - ['object', { object: instance }] - ]); - return blocks; + } + }; + }; + return res; + } + + function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ['span', {}]; - } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } + } + + function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { return [ - 'div', - { style: 'line-height:1.25em;margin-bottom:0.6em' }, - [ - 'div', - { - style: 'color:#476582' - }, - type - ], - [ - 'div', - { - style: 'padding-left:1.25em' - }, - ...Object.keys(target).map(key => { - return [ - 'div', - {}, - ['span', keywordStyle, key + ': '], - formatValue(target[key], false) - ]; - }) - ] + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + formatValue(obj.value), + `>` ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } } - function formatValue(v, asRaw = true) { - if (typeof v === 'number') { - return ['span', numberStyle, v]; - } - else if (typeof v === 'string') { - return ['span', stringStyle, JSON.stringify(v)]; - } - else if (typeof v === 'boolean') { - return ['span', keywordStyle, v]; - } - else if (isObject(v)) { - return ['object', { object: asRaw ? toRaw(v) : v }]; - } - else { - return ['span', stringStyle, String(v)]; - } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if ((isArray(opts) && opts.includes(key)) || - (isObject(opts) && key in opts)) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) { - return true; - } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); } - else { - window.devtoolsFormatters = [formatter]; + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } - // Core API ------------------------------------------------------------------ - const version = "3.2.36"; - /** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ - const ssrUtils = (null); - /** - * @internal only exposed in compat builds - */ + const version = "3.4.15"; + const warn = warn$1 ; + const ErrorTypeStrings = ErrorTypeStrings$1 ; + const devtools = devtools$1 ; + const setDevtoolsHook = setDevtoolsHook$1 ; + const ssrUtils = null; const resolveFilter = null; - /** - * @internal only exposed in compat builds. - */ - const compatUtils = (null); + const compatUtils = null; + const DeprecationTypes = null; - const svgNS = 'http://www.w3.org/2000/svg'; - const doc = (typeof document !== 'undefined' ? document : null); - const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); + const svgNS = "http://www.w3.org/2000/svg"; + const mathmlNS = "http://www.w3.org/1998/Math/MathML"; + const doc = typeof document !== "undefined" ? document : null; + const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; - // compiler should normalize class + :class bindings on the same element - // into a single binding ['staticClass', dynamic] - function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } - } - - function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } - } - const importantRE = /\s*!important$/; - function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } - } - const prefixes = ['Webkit', 'Moz', 'ms']; - const prefixCache = {}; - function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; - } - - const xlinkNS = 'http://www.w3.org/1999/xlink'; - function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } - } - - // __UNSAFE__ - // functions. The user is responsible for using them with only trusted content. - function patchDOMProp(el, key, value, - // the following args are passed only due to potential innerHTML/textContent - // overriding existing VNodes, in which case the old tree must be properly - // unmounted. - prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - { - warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` + - `value ${value} is invalid.`, e); - } - } - needRemove && el.removeAttribute(key); - } - - // Async edge case fix requires storing an event listener's attach timestamp. - const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; - })(); - // To avoid the overhead of repeatedly calling performance.now(), we cache - // and use the same timestamp for all event listeners attached in the same tick. - let cachedNow = 0; - const p = /*#__PURE__*/ Promise.resolve(); - const reset = () => { - cachedNow = 0; - }; - const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); - function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); - } - function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); - } - function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } - } - const optionsModifierRE = /(?:Once|Passive|Capture)$/; - function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [hyphenate(name.slice(2)), options]; - } - function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; - } - function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } - } - - const nativeOnRE = /^on[a-z]/; - const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (isOn(key)) { - // ignore v-model listeners - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } - }; - function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && isString(value)) { - return false; - } - return key in el; - } - - function defineCustomElement(options, hydrate) { - const Comp = defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; - } - const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); - }); - const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { - }); - class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - if (this.shadowRoot) { - warn$1(`Custom element has pre-rendered declarative shadow root but is not ` + - `defined as hydratable. Use \`defineSSRCustomElement\`.`); - } - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = toNumber(value); - } - this._setProp(camelize(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = createVNode(this._def, extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // HMR - { - instance.ceReload = newStyles => { - // always reset styles - if (this._styles) { - this._styles.forEach(s => this.shadowRoot.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - // if this is an async component, ceReload is called from the inner - // component so no need to reload the async wrapper - if (!this._def.__asyncLoader) { - // reload - this._instance = null; - this._update(); - } - }; - } - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - // record for HMR - { - (this._styles || (this._styles = [])).push(s); - } - }); - } - } - } - - function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - { - warn$1(`useCssModule() is not supported in the global build.`); - } - return EMPTY_OBJ; - } - } - - /** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ - function useCssVars(getter) { - const instance = getCurrentInstance(); - /* istanbul ignore next */ - if (!instance) { - warn$1(`useCssVars is called without current active component instance.`); - return; - } - const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy)); - watchPostEffect(setVars); - onMounted(() => { - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); - } - function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - // drill down HOCs until it's a non-component vnode - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) { - setVarsOnNode(vnode.el, vars); - } - else if (vnode.type === Fragment) { - vnode.children.forEach(c => setVarsOnVNode(c, vars)); - } - else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) - break; - el = el.nextSibling; - } - } - } - function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - } - } - } - - const TRANSITION = 'transition'; - const ANIMATION = 'animation'; - // DOM Transition is a higher-order-component based on the platform-agnostic - // base Transition component, with DOM-specific logic. + const TRANSITION = "transition"; + const ANIMATION = "animation"; + const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots); - Transition.displayName = 'Transition'; + Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; - const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ extend({}, BaseTransition.props, DOMTransitionPropsValidators)); - /** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ - const callHook$1 = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } + const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators + ); + const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; - /** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook$1(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook$1(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook$1(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook$1(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook$1(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook$1(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook$1(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = toNumber(val); - validateDuration(res); - return res; - } - function validateDuration(val) { - if (typeof val !== 'number') { - warn$1(`<transition> explicit duration is not a valid number - ` + - `got ${JSON.stringify(val)}.`); - } - else if (isNaN(val)) { - warn$1(`<transition> explicit duration is NaN - ` + - 'the duration expression might be incorrect.'); - } + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } - // Old versions of Chromium (below 61.0.3163.100) formats floating pointer - // numbers in a locale-dependent way, using a comma instead of a dot. - // If comma is not replaced with a dot, the input will be rounded down - // (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } - // synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } - const positionMap = new WeakMap(); - const newPositionMap = new WeakMap(); - const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = children; - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - else { - warn$1(`<TransitionGroup> children must be keyed.`); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return createVNode(tag, null, children); - }; + function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } + } + + const vShowOldKey = Symbol("_vod"); + const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; + { + vShow.name = "show"; + } + function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; + } + + const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); + function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + const setVars = () => { + const vars = getter(instance.proxy); + setVarsOnVNode(instance.subTree, vars); + updateTeleports(vars); + }; + watchPostEffect(setVars); + onMounted(() => { + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); + } + function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) + break; + el = el.nextSibling; + } + } + } + function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } + } + + function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = isString(next); + if (next && !isCssString) { + if (prev && !isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } + } + const semicolonRE = /[^\\];\s*$/; + const importantRE = /\s*!important$/; + function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } + } + const prefixes = ["Webkit", "Moz", "ms"]; + const prefixCache = {}; + function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; + } + + const xlinkNS = "http://www.w3.org/1999/xlink"; + function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = isSpecialBooleanAttr(key); + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } + } + + function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); + } + + function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); + } + function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); + } + const veiKey = Symbol("_vei"); + function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } + } + const optionsModifierRE = /(?:Once|Passive|Capture)$/; + function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; + } + let cachedNow = 0; + const p = /* @__PURE__ */ Promise.resolve(); + const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); + function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; + } + function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } + } + + const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter + key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; + const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } + }; + function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; + } + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineCustomElement(options, hydrate2) { + const Comp = defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; + } + /*! #__NO_SIDE_EFFECTS__ */ + const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); + }; + const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { + }; + class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = camelize(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = createVNode(this._def, extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + { + (this._styles || (this._styles = [])).push(s); + } + }); + } + } + } + + function useCssModule(name = "$style") { + { + { + warn(`useCssModule() is not supported in the global build.`); + } + return EMPTY_OBJ; + } + } + + const positionMap = /* @__PURE__ */ new WeakMap(); + const newPositionMap = /* @__PURE__ */ new WeakMap(); + const moveCbKey = Symbol("_moveCb"); + const enterCbKey = Symbol("_enterCb"); + const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = children; + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else { + warn(`<TransitionGroup> children must be keyed.`); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return createVNode(tag, null, children); + }; + } + }; + const removeMode = (props) => delete props.mode; + /* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return isArray(fn) ? value => invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } - // We are exporting the v-model runtime directly as vnode hooks so that it can - // be tree-shaken in case v-model is never used. + const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (isArray(value)) { - el.checked = looseIndexOf(value, vnode.props.value) > -1; - } - else if (isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (isArray(value)) { + el.checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; - function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !isArray(value) && !isSet(value)) { - warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` + - `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`); + function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + if (isArrayValue && looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArray(value)) { - option.selected = looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } - // retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } - // retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } - const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; + const systemModifiers = ["ctrl", "shift", "alt", "meta"]; const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) }; - /** - * @private - */ const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; - }; - // Kept for 2.x compat. - // Note: IE11 compat for `spacebar` and `del` is removed for now. - const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' - }; - /** - * @private - */ - const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; - }; - - const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; } + return fn(event, ...args); + }); + }; + const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" + }; + const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); }; - function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; - } - const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps); - // lazy create the renderer - this makes core renderer logic tree-shakable - // in case the user only imports reactivity utilities from Vue. + const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = createRenderer(rendererOptions))); + return renderer || (renderer = createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } - // use explicit type casts here to avoid import() calls in rolled-up d.ts - const render = ((...args) => { - ensureRenderer().render(...args); - }); - const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); - }); - const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + const render = (...args) => { + ensureRenderer().render(...args); + }; + const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); + }; + const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; - }); - const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; - }); + return proxy; + }; + return app; + }; + const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; + }; + function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } + } function injectNativeTagCheck(app) { - // Inject `isNativeTag` - // this is used for component name validation (dev only) - Object.defineProperty(app.config, 'isNativeTag', { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag), - writable: false - }); + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); } - // dev only function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, 'isCustomElement', { - get() { - return isCustomElement; - }, - set() { - warn$1(`The \`isCustomElement\` config option is deprecated. Use ` + - `\`compilerOptions.isCustomElement\` instead.`); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using ` + - `a build of Vue.js that includes the runtime compiler (aka "full build"). ` + - `Since you are using the runtime-only build, \`compilerOptions\` ` + - `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` + - `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` + - `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` + - `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`; - Object.defineProperty(app.config, 'compilerOptions', { - get() { - warn$1(msg); - return compilerOptions; - }, - set() { - warn$1(msg); - } - }); - } + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } } function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn$1(`Failed to mount app: mount target selector "${container}" returned null.`); - } - return res; + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); } - if (window.ShadowRoot && - container instanceof window.ShadowRoot && - container.mode === 'closed') { - warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`); - } - return container; + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; } - /** - * @internal - */ const initDirectivesForSSR = NOOP; exports.BaseTransition = BaseTransition; + exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; exports.Comment = Comment; + exports.DeprecationTypes = DeprecationTypes; exports.EffectScope = EffectScope; + exports.ErrorCodes = ErrorCodes; + exports.ErrorTypeStrings = ErrorTypeStrings; exports.Fragment = Fragment; exports.KeepAlive = KeepAlive; exports.ReactiveEffect = ReactiveEffect; @@ -10831,16 +11054,19 @@ var VueRuntimeDOM = (function (exports) { exports.Suspense = Suspense; exports.Teleport = Teleport; exports.Text = Text; + exports.TrackOpTypes = TrackOpTypes; exports.Transition = Transition; exports.TransitionGroup = TransitionGroup; + exports.TriggerOpTypes = TriggerOpTypes; exports.VueElement = VueElement; + exports.assertNumber = assertNumber; exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; exports.callWithErrorHandling = callWithErrorHandling; exports.camelize = camelize; exports.capitalize = capitalize; exports.cloneVNode = cloneVNode; exports.compatUtils = compatUtils; - exports.computed = computed$1; + exports.computed = computed; exports.createApp = createApp; exports.createBlock = createBlock; exports.createCommentVNode = createCommentVNode; @@ -10860,8 +11086,12 @@ var VueRuntimeDOM = (function (exports) { exports.defineCustomElement = defineCustomElement; exports.defineEmits = defineEmits; exports.defineExpose = defineExpose; + exports.defineModel = defineModel; + exports.defineOptions = defineOptions; exports.defineProps = defineProps; exports.defineSSRCustomElement = defineSSRCustomElement; + exports.defineSlots = defineSlots; + exports.devtools = devtools; exports.effect = effect; exports.effectScope = effectScope; exports.getCurrentInstance = getCurrentInstance; @@ -10870,6 +11100,7 @@ var VueRuntimeDOM = (function (exports) { exports.guardReactiveProps = guardReactiveProps; exports.h = h; exports.handleError = handleError; + exports.hasInjectionContext = hasInjectionContext; exports.hydrate = hydrate; exports.initCustomFormatter = initCustomFormatter; exports.initDirectivesForSSR = initDirectivesForSSR; @@ -10884,6 +11115,7 @@ var VueRuntimeDOM = (function (exports) { exports.isVNode = isVNode; exports.markRaw = markRaw; exports.mergeDefaults = mergeDefaults; + exports.mergeModels = mergeModels; exports.mergeProps = mergeProps; exports.nextTick = nextTick; exports.normalizeClass = normalizeClass; @@ -10935,12 +11167,14 @@ var VueRuntimeDOM = (function (exports) { exports.toRaw = toRaw; exports.toRef = toRef; exports.toRefs = toRefs; + exports.toValue = toValue; exports.transformVNodeArgs = transformVNodeArgs; exports.triggerRef = triggerRef; exports.unref = unref; exports.useAttrs = useAttrs; exports.useCssModule = useCssModule; exports.useCssVars = useCssVars; + exports.useModel = useModel; exports.useSSRContext = useSSRContext; exports.useSlots = useSlots; exports.useTransitionState = useTransitionState; @@ -10951,7 +11185,7 @@ var VueRuntimeDOM = (function (exports) { exports.vModelText = vModelText; exports.vShow = vShow; exports.version = version; - exports.warn = warn$1; + exports.warn = warn; exports.watch = watch; exports.watchEffect = watchEffect; exports.watchPostEffect = watchPostEffect; @@ -10965,8 +11199,6 @@ var VueRuntimeDOM = (function (exports) { exports.withModifiers = withModifiers; exports.withScopeId = withScopeId; - Object.defineProperty(exports, '__esModule', { value: true }); - return exports; -}({})); +})({}); diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js b/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js index 57c10f83..350181cd 100644 --- a/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js +++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js @@ -1 +1,11 @@ -var VueRuntimeDOM=function(e){"use strict";function t(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),o=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function r(e){return!!e||""===e}function s(e){if(S(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=F(o)?c(o):s(o);if(r)for(const e in r)t[e]=r[e]}return t}return F(e)||O(e)?e:void 0}const l=/;(?![^(]*\))/g,i=/:(.+)/;function c(e){const t={};return e.split(l).forEach((e=>{if(e){const n=e.split(i);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function a(e){let t="";if(F(e))t=e;else if(S(e))for(let n=0;n<e.length;n++){const o=a(e[n]);o&&(t+=o+" ")}else if(O(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function u(e,t){if(e===t)return!0;let n=A(e),o=A(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=R(e),o=R(t),n||o)return e===t;if(n=S(e),o=S(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=u(e[o],t[o]);return n}(e,t);if(n=O(e),o=O(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!u(e[n],t[n]))return!1}}return String(e)===String(t)}function f(e,t){return e.findIndex((e=>u(e,t)))}const p=(e,t)=>t&&t.__v_isRef?p(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:k(t)?{[`Set(${t.size})`]:[...t.values()]}:!O(t)||S(t)||V(t)?t:String(t),d={},h=[],m=()=>{},v=()=>!1,g=/^on[^a-z]/,_=e=>g.test(e),y=e=>e.startsWith("onUpdate:"),b=Object.assign,C=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},x=Object.prototype.hasOwnProperty,w=(e,t)=>x.call(e,t),S=Array.isArray,E=e=>"[object Map]"===N(e),k=e=>"[object Set]"===N(e),A=e=>"[object Date]"===N(e),T=e=>"function"==typeof e,F=e=>"string"==typeof e,R=e=>"symbol"==typeof e,O=e=>null!==e&&"object"==typeof e,P=e=>O(e)&&T(e.then)&&T(e.catch),M=Object.prototype.toString,N=e=>M.call(e),V=e=>"[object Object]"===N(e),B=e=>F(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,L=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),I=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},$=/-(\w)/g,j=I((e=>e.replace($,((e,t)=>t?t.toUpperCase():"")))),U=/\B([A-Z])/g,D=I((e=>e.replace(U,"-$1").toLowerCase())),H=I((e=>e.charAt(0).toUpperCase()+e.slice(1))),z=I((e=>e?`on${H(e)}`:"")),W=(e,t)=>!Object.is(e,t),K=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},G=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},q=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let J;let Y;class X{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&Y&&(this.parent=Y,this.index=(Y.scopes||(Y.scopes=[])).push(this)-1)}run(e){if(this.active){const t=Y;try{return Y=this,e()}finally{Y=t}}}on(){Y=this}off(){Y=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function Z(e,t=Y){t&&t.active&&t.effects.push(e)}const Q=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ee=e=>(e.w&re)>0,te=e=>(e.n&re)>0,ne=new WeakMap;let oe=0,re=1;let se;const le=Symbol(""),ie=Symbol("");class ce{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,Z(this,n)}run(){if(!this.active)return this.fn();let e=se,t=ue;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=se,se=this,ue=!0,re=1<<++oe,oe<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=re})(this):ae(this),this.fn()}finally{oe<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const r=t[o];ee(r)&&!te(r)?r.delete(e):t[n++]=r,r.w&=~re,r.n&=~re}t.length=n}})(this),re=1<<--oe,se=this.parent,ue=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){se===this?this.deferStop=!0:this.active&&(ae(this),this.onStop&&this.onStop(),this.active=!1)}}function ae(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let ue=!0;const fe=[];function pe(){fe.push(ue),ue=!1}function de(){const e=fe.pop();ue=void 0===e||e}function he(e,t,n){if(ue&&se){let t=ne.get(e);t||ne.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Q()),me(o)}}function me(e,t){let n=!1;oe<=30?te(e)||(e.n|=re,n=!ee(e)):n=!e.has(se),n&&(e.add(se),se.deps.push(e))}function ve(e,t,n,o,r,s){const l=ne.get(e);if(!l)return;let i=[];if("clear"===t)i=[...l.values()];else if("length"===n&&S(e))l.forEach(((e,t)=>{("length"===t||t>=o)&&i.push(e)}));else switch(void 0!==n&&i.push(l.get(n)),t){case"add":S(e)?B(n)&&i.push(l.get("length")):(i.push(l.get(le)),E(e)&&i.push(l.get(ie)));break;case"delete":S(e)||(i.push(l.get(le)),E(e)&&i.push(l.get(ie)));break;case"set":E(e)&&i.push(l.get(le))}if(1===i.length)i[0]&&ge(i[0]);else{const e=[];for(const t of i)t&&e.push(...t);ge(Q(e))}}function ge(e,t){const n=S(e)?e:[...e];for(const o of n)o.computed&&_e(o);for(const o of n)o.computed||_e(o)}function _e(e,t){(e!==se||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const ye=t("__proto__,__v_isRef,__isVue"),be=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(R)),Ce=Ae(),xe=Ae(!1,!0),we=Ae(!0),Se=Ae(!0,!0),Ee=ke();function ke(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=ht(this);for(let t=0,r=this.length;t<r;t++)he(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(ht)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){pe();const n=ht(this)[t].apply(this,e);return de(),n}})),e}function Ae(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?rt:ot:t?nt:tt).get(n))return n;const s=S(n);if(!e&&s&&w(Ee,o))return Reflect.get(Ee,o,r);const l=Reflect.get(n,o,r);return(R(o)?be.has(o):ye(o))?l:(e||he(n,0,o),t?l:bt(l)?s&&B(o)?l:l.value:O(l)?e?ct(l):lt(l):l)}}function Te(e=!1){return function(t,n,o,r){let s=t[n];if(ft(s)&&bt(s)&&!bt(o))return!1;if(!e&&!ft(o)&&(pt(o)||(o=ht(o),s=ht(s)),!S(t)&&bt(s)&&!bt(o)))return s.value=o,!0;const l=S(t)&&B(n)?Number(n)<t.length:w(t,n),i=Reflect.set(t,n,o,r);return t===ht(r)&&(l?W(o,s)&&ve(t,"set",n,o):ve(t,"add",n,o)),i}}const Fe={get:Ce,set:Te(),deleteProperty:function(e,t){const n=w(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&ve(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return R(t)&&be.has(t)||he(e,0,t),n},ownKeys:function(e){return he(e,0,S(e)?"length":le),Reflect.ownKeys(e)}},Re={get:we,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Oe=b({},Fe,{get:xe,set:Te(!0)}),Pe=b({},Re,{get:Se}),Me=e=>e,Ne=e=>Reflect.getPrototypeOf(e);function Ve(e,t,n=!1,o=!1){const r=ht(e=e.__v_raw),s=ht(t);n||(t!==s&&he(r,0,t),he(r,0,s));const{has:l}=Ne(r),i=o?Me:n?gt:vt;return l.call(r,t)?i(e.get(t)):l.call(r,s)?i(e.get(s)):void(e!==r&&e.get(t))}function Be(e,t=!1){const n=this.__v_raw,o=ht(n),r=ht(e);return t||(e!==r&&he(o,0,e),he(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function Le(e,t=!1){return e=e.__v_raw,!t&&he(ht(e),0,le),Reflect.get(e,"size",e)}function Ie(e){e=ht(e);const t=ht(this);return Ne(t).has.call(t,e)||(t.add(e),ve(t,"add",e,e)),this}function $e(e,t){t=ht(t);const n=ht(this),{has:o,get:r}=Ne(n);let s=o.call(n,e);s||(e=ht(e),s=o.call(n,e));const l=r.call(n,e);return n.set(e,t),s?W(t,l)&&ve(n,"set",e,t):ve(n,"add",e,t),this}function je(e){const t=ht(this),{has:n,get:o}=Ne(t);let r=n.call(t,e);r||(e=ht(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&ve(t,"delete",e,void 0),s}function Ue(){const e=ht(this),t=0!==e.size,n=e.clear();return t&&ve(e,"clear",void 0,void 0),n}function De(e,t){return function(n,o){const r=this,s=r.__v_raw,l=ht(s),i=t?Me:e?gt:vt;return!e&&he(l,0,le),s.forEach(((e,t)=>n.call(o,i(e),i(t),r)))}}function He(e,t,n){return function(...o){const r=this.__v_raw,s=ht(r),l=E(s),i="entries"===e||e===Symbol.iterator&&l,c="keys"===e&&l,a=r[e](...o),u=n?Me:t?gt:vt;return!t&&he(s,0,c?ie:le),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:i?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function ze(e){return function(...t){return"delete"!==e&&this}}function We(){const e={get(e){return Ve(this,e)},get size(){return Le(this)},has:Be,add:Ie,set:$e,delete:je,clear:Ue,forEach:De(!1,!1)},t={get(e){return Ve(this,e,!1,!0)},get size(){return Le(this)},has:Be,add:Ie,set:$e,delete:je,clear:Ue,forEach:De(!1,!0)},n={get(e){return Ve(this,e,!0)},get size(){return Le(this,!0)},has(e){return Be.call(this,e,!0)},add:ze("add"),set:ze("set"),delete:ze("delete"),clear:ze("clear"),forEach:De(!0,!1)},o={get(e){return Ve(this,e,!0,!0)},get size(){return Le(this,!0)},has(e){return Be.call(this,e,!0)},add:ze("add"),set:ze("set"),delete:ze("delete"),clear:ze("clear"),forEach:De(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=He(r,!1,!1),n[r]=He(r,!0,!1),t[r]=He(r,!1,!0),o[r]=He(r,!0,!0)})),[e,n,t,o]}const[Ke,Ge,qe,Je]=We();function Ye(e,t){const n=t?e?Je:qe:e?Ge:Ke;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(w(n,o)&&o in t?n:t,o,r)}const Xe={get:Ye(!1,!1)},Ze={get:Ye(!1,!0)},Qe={get:Ye(!0,!1)},et={get:Ye(!0,!0)},tt=new WeakMap,nt=new WeakMap,ot=new WeakMap,rt=new WeakMap;function st(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>N(e).slice(8,-1))(e))}function lt(e){return ft(e)?e:at(e,!1,Fe,Xe,tt)}function it(e){return at(e,!1,Oe,Ze,nt)}function ct(e){return at(e,!0,Re,Qe,ot)}function at(e,t,n,o,r){if(!O(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const l=st(e);if(0===l)return e;const i=new Proxy(e,2===l?o:n);return r.set(e,i),i}function ut(e){return ft(e)?ut(e.__v_raw):!(!e||!e.__v_isReactive)}function ft(e){return!(!e||!e.__v_isReadonly)}function pt(e){return!(!e||!e.__v_isShallow)}function dt(e){return ut(e)||ft(e)}function ht(e){const t=e&&e.__v_raw;return t?ht(t):e}function mt(e){return G(e,"__v_skip",!0),e}const vt=e=>O(e)?lt(e):e,gt=e=>O(e)?ct(e):e;function _t(e){ue&&se&&me((e=ht(e)).dep||(e.dep=Q()))}function yt(e,t){(e=ht(e)).dep&&ge(e.dep)}function bt(e){return!(!e||!0!==e.__v_isRef)}function Ct(e){return xt(e,!1)}function xt(e,t){return bt(e)?e:new wt(e,t)}class wt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:ht(e),this._value=t?e:vt(e)}get value(){return _t(this),this._value}set value(e){e=this.__v_isShallow?e:ht(e),W(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:vt(e),yt(this))}}function St(e){return bt(e)?e.value:e}const Et={get:(e,t,n)=>St(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return bt(r)&&!bt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function kt(e){return ut(e)?e:new Proxy(e,Et)}class At{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>_t(this)),(()=>yt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}class Tt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function Ft(e,t,n){const o=e[t];return bt(o)?o:new Tt(e,t,n)}class Rt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ce(e,(()=>{this._dirty||(this._dirty=!0,yt(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=ht(this);return _t(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const Ot=[];function Pt(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...Mt(n,e[n]))})),n.length>3&&t.push(" ..."),t}function Mt(e,t,n){return F(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:bt(t)?(t=Mt(e,ht(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):T(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ht(t),n?t:[`${e}=`,t])}function Nt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){Bt(s,t,n)}return r}function Vt(e,t,n,o){if(T(e)){const r=Nt(e,t,n,o);return r&&P(r)&&r.catch((e=>{Bt(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Vt(e[s],t,n,o));return r}function Bt(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const l=t.appContext.config.errorHandler;if(l)return void Nt(l,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let Lt=!1,It=!1;const $t=[];let jt=0;const Ut=[];let Dt=null,Ht=0;const zt=[];let Wt=null,Kt=0;const Gt=Promise.resolve();let qt=null,Jt=null;function Yt(e){const t=qt||Gt;return e?t.then(this?e.bind(this):e):t}function Xt(e){$t.length&&$t.includes(e,Lt&&e.allowRecurse?jt+1:jt)||e===Jt||(null==e.id?$t.push(e):$t.splice(function(e){let t=jt+1,n=$t.length;for(;t<n;){const o=t+n>>>1;on($t[o])<e?t=o+1:n=o}return t}(e.id),0,e),Zt())}function Zt(){Lt||It||(It=!0,qt=Gt.then(rn))}function Qt(e,t,n,o){S(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),Zt()}function en(e){Qt(e,Wt,zt,Kt)}function tn(e,t=null){if(Ut.length){for(Jt=t,Dt=[...new Set(Ut)],Ut.length=0,Ht=0;Ht<Dt.length;Ht++)Dt[Ht]();Dt=null,Ht=0,Jt=null,tn(e,t)}}function nn(e){if(tn(),zt.length){const e=[...new Set(zt)];if(zt.length=0,Wt)return void Wt.push(...e);for(Wt=e,Wt.sort(((e,t)=>on(e)-on(t))),Kt=0;Kt<Wt.length;Kt++)Wt[Kt]();Wt=null,Kt=0}}const on=e=>null==e.id?1/0:e.id;function rn(e){It=!1,Lt=!0,tn(e),$t.sort(((e,t)=>on(e)-on(t)));try{for(jt=0;jt<$t.length;jt++){const e=$t[jt];e&&!1!==e.active&&Nt(e,null,14)}}finally{jt=0,$t.length=0,nn(),Lt=!1,qt=null,($t.length||Ut.length||zt.length)&&rn(e)}}let sn=[];function ln(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||d;let r=n;const s=t.startsWith("update:"),l=s&&t.slice(7);if(l&&l in o){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:t,trim:s}=o[e]||d;s&&(r=n.map((e=>e.trim()))),t&&(r=n.map(q))}let i,c=o[i=z(t)]||o[i=z(j(t))];!c&&s&&(c=o[i=z(D(t))]),c&&Vt(c,e,6,r);const a=o[i+"Once"];if(a){if(e.emitted){if(e.emitted[i])return}else e.emitted={};e.emitted[i]=!0,Vt(a,e,6,r)}}function cn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let l={},i=!1;if(!T(e)){const o=e=>{const n=cn(e,t,!0);n&&(i=!0,b(l,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||i?(S(s)?s.forEach((e=>l[e]=null)):b(l,s),o.set(e,l),l):(o.set(e,null),null)}function an(e,t){return!(!e||!_(t))&&(t=t.slice(2).replace(/Once$/,""),w(e,t[0].toLowerCase()+t.slice(1))||w(e,D(t))||w(e,t))}let un=null,fn=null;function pn(e){const t=un;return un=e,fn=e&&e.type.__scopeId||null,t}function dn(e,t=un,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&xr(-1);const r=pn(t),s=e(...n);return pn(r),o._d&&xr(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function hn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:i,attrs:c,emit:a,render:u,renderCache:f,data:p,setupState:d,ctx:h,inheritAttrs:m}=e;let v,g;const _=pn(e);try{if(4&n.shapeFlag){const e=r||o;v=Vr(u.call(e,e,f,s,d,p,h)),g=c}else{const e=t;0,v=Vr(e(s,e.length>1?{attrs:c,slots:i,emit:a}:null)),g=t.props?c:mn(c)}}catch(C){gr.length=0,Bt(C,e,1),v=Or(mr)}let b=v;if(g&&!1!==m){const e=Object.keys(g),{shapeFlag:t}=b;e.length&&7&t&&(l&&e.some(y)&&(g=vn(g,l)),b=Mr(b,g))}return n.dirs&&(b=Mr(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),v=b,pn(_),v}const mn=e=>{let t;for(const n in e)("class"===n||"style"===n||_(n))&&((t||(t={}))[n]=e[n]);return t},vn=(e,t)=>{const n={};for(const o in e)y(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function gn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!an(n,s))return!0}return!1}function _n({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const yn=e=>e.__isSuspense,bn={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,l,i,c,a){null==e?function(e,t,n,o,r,s,l,i,c){const{p:a,o:{createElement:u}}=c,f=u("div"),p=e.suspense=xn(e,r,o,t,f,n,s,l,i,c);a(null,p.pendingBranch=e.ssContent,f,null,o,p,s,l),p.deps>0?(Cn(e,"onPending"),Cn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,l),En(p,e.ssFallback)):p.resolve()}(t,n,o,r,s,l,i,c,a):function(e,t,n,o,r,s,l,i,{p:c,um:a,o:{createElement:u}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:v,isHydrating:g}=f;if(m)f.pendingBranch=p,kr(p,m)?(c(m,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0?f.resolve():v&&(c(h,d,n,o,r,null,s,l,i),En(f,d))):(f.pendingId++,g?(f.isHydrating=!1,f.activeBranch=m):a(m,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),v?(c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0?f.resolve():(c(h,d,n,o,r,null,s,l,i),En(f,d))):h&&kr(p,h)?(c(h,p,n,o,r,f,s,l,i),f.resolve(!0)):(c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0&&f.resolve()));else if(h&&kr(p,h))c(h,p,n,o,r,f,s,l,i),En(f,p);else if(Cn(t,"onPending"),f.pendingBranch=p,f.pendingId++,c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,o,r,l,i,c,a)},hydrate:function(e,t,n,o,r,s,l,i,c){const a=t.suspense=xn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,l,i,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,l);0===a.deps&&a.resolve();return u},create:xn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=wn(o?n.default:n),e.ssFallback=o?wn(n.fallback):Or(mr)}};function Cn(e,t){const n=e.props&&e.props[t];T(n)&&n()}function xn(e,t,n,o,r,s,l,i,c,a,u=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:m,remove:v}}=a,g=q(e.props&&e.props.timeout),_={vnode:e,parent:t,parentComponent:n,isSVG:l,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof g?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:l,container:i}=_;if(_.isHydrating)_.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===_.pendingId&&p(o,i,t,0)});let{anchor:t}=_;n&&(t=h(n),d(n,l,_,!0)),e||p(o,i,t,0)}En(_,o),_.pendingBranch=null,_.isInFallback=!1;let c=_.parent,a=!1;for(;c;){if(c.pendingBranch){c.effects.push(...s),a=!0;break}c=c.parent}a||en(s),_.effects=[],Cn(t,"onResolve")},fallback(e){if(!_.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=_;Cn(t,"onFallback");const l=h(n),a=()=>{_.isInFallback&&(f(null,e,r,l,o,null,s,i,c),En(_,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),_.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){_.activeBranch&&p(_.activeBranch,e,t,n),_.container=e},next:()=>_.activeBranch&&h(_.activeBranch),registerDep(e,t){const n=!!_.pendingBranch;n&&_.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{Bt(t,e,0)})).then((r=>{if(e.isUnmounted||_.isUnmounted||_.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;Yr(e,r,!1),o&&(s.el=o);const i=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),_,l,c),i&&v(i),_n(e,s.el),n&&0==--_.deps&&_.resolve()}))},unmount(e,t){_.isUnmounted=!0,_.activeBranch&&d(_.activeBranch,n,e,t),_.pendingBranch&&d(_.pendingBranch,n,e,t)}};return _}function wn(e){let t;if(T(e)){const n=Cr&&e._c;n&&(e._d=!1,yr()),e=e(),n&&(e._d=!0,t=_r,br())}if(S(e)){const t=function(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!Er(o))return;if(o.type!==mr||"v-if"===o.children){if(t)return;t=o}}return t}(e);e=t}return e=Vr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Sn(e,t){t&&t.pendingBranch?S(e)?t.effects.push(...e):t.effects.push(e):en(e)}function En(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,_n(o,r))}function kn(e,t){if(Dr){let n=Dr.provides;const o=Dr.parent&&Dr.parent.provides;o===n&&(n=Dr.provides=Object.create(o)),n[e]=t}else;}function An(e,t,n=!1){const o=Dr||un;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&T(t)?t.call(o.proxy):t}}function Tn(e,t){return On(e,null,{flush:"post"})}const Fn={};function Rn(e,t,n){return On(e,t,n)}function On(e,t,{immediate:n,deep:o,flush:r}=d){const s=Dr;let l,i,c=!1,a=!1;if(bt(e)?(l=()=>e.value,c=pt(e)):ut(e)?(l=()=>e,o=!0):S(e)?(a=!0,c=e.some((e=>ut(e)||pt(e))),l=()=>e.map((e=>bt(e)?e.value:ut(e)?Nn(e):T(e)?Nt(e,s,2):void 0))):l=T(e)?t?()=>Nt(e,s,2):()=>{if(!s||!s.isUnmounted)return i&&i(),Vt(e,s,3,[u])}:m,t&&o){const e=l;l=()=>Nn(e())}let u=e=>{i=v.onStop=()=>{Nt(e,s,4)}},f=a?[]:Fn;const p=()=>{if(v.active)if(t){const e=v.run();(o||c||(a?e.some(((e,t)=>W(e,f[t]))):W(e,f)))&&(i&&i(),Vt(t,s,3,[e,f===Fn?void 0:f,u]),f=e)}else v.run()};let h;p.allowRecurse=!!t,h="sync"===r?p:"post"===r?()=>nr(p,s&&s.suspense):()=>function(e){Qt(e,Dt,Ut,Ht)}(p);const v=new ce(l,h);return t?n?p():f=v.run():"post"===r?nr(v.run.bind(v),s&&s.suspense):v.run(),()=>{v.stop(),s&&s.scope&&C(s.scope.effects,v)}}function Pn(e,t,n){const o=this.proxy,r=F(e)?e.includes(".")?Mn(o,e):()=>o[e]:e.bind(o,o);let s;T(t)?s=t:(s=t.handler,n=t);const l=Dr;zr(this);const i=On(r,s.bind(o),n);return l?zr(l):Wr(),i}function Mn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Nn(e,t){if(!O(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),bt(e))Nn(e.value,t);else if(S(e))for(let n=0;n<e.length;n++)Nn(e[n],t);else if(k(e)||E(e))e.forEach((e=>{Nn(e,t)}));else if(V(e))for(const n in e)Nn(e[n],t);return e}function Vn(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return so((()=>{e.isMounted=!0})),co((()=>{e.isUnmounting=!0})),e}const Bn=[Function,Array],Ln={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Bn,onEnter:Bn,onAfterEnter:Bn,onEnterCancelled:Bn,onBeforeLeave:Bn,onLeave:Bn,onAfterLeave:Bn,onLeaveCancelled:Bn,onBeforeAppear:Bn,onAppear:Bn,onAfterAppear:Bn,onAppearCancelled:Bn},setup(e,{slots:t}){const n=Hr(),o=Vn();let r;return()=>{const s=t.default&&Hn(t.default(),!0);if(!s||!s.length)return;let l=s[0];if(s.length>1)for(const e of s)if(e.type!==mr){l=e;break}const i=ht(e),{mode:c}=i;if(o.isLeaving)return jn(l);const a=Un(l);if(!a)return jn(l);const u=$n(a,i,o,n);Dn(a,u);const f=n.subTree,p=f&&Un(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==mr&&(!kr(a,p)||d)){const e=$n(p,i,o,n);if(Dn(p,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},jn(l);"in-out"===c&&a.type!==mr&&(e.delayLeave=(e,t,n)=>{In(o,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return l}}};function In(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function $n(e,t,n,o){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:i,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:v,onAfterAppear:g,onAppearCancelled:_}=t,y=String(e.key),b=In(n,e),C=(e,t)=>{e&&Vt(e,o,9,t)},x=(e,t)=>{const n=t[1];C(e,t),S(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},w={mode:s,persisted:l,beforeEnter(t){let o=i;if(!n.isMounted){if(!r)return;o=m||i}t._leaveCb&&t._leaveCb(!0);const s=b[y];s&&kr(e,s)&&s.el._leaveCb&&s.el._leaveCb(),C(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=v||c,o=g||a,s=_||u}let l=!1;const i=e._enterCb=t=>{l||(l=!0,C(t?s:o,[e]),w.delayedLeave&&w.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,i]):i()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();C(f,[t]);let s=!1;const l=t._leaveCb=n=>{s||(s=!0,o(),C(n?h:d,[t]),t._leaveCb=void 0,b[r]===e&&delete b[r])};b[r]=e,p?x(p,[t,l]):l()},clone:e=>$n(e,t,n,o)};return w}function jn(e){if(Gn(e))return(e=Mr(e)).children=null,e}function Un(e){return Gn(e)?e.children?e.children[0]:void 0:e}function Dn(e,t){6&e.shapeFlag&&e.component?Dn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Hn(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let l=e[s];const i=null==n?l.key:String(n)+String(null!=l.key?l.key:s);l.type===dr?(128&l.patchFlag&&r++,o=o.concat(Hn(l.children,t,i))):(t||l.type!==mr)&&o.push(null!=i?Mr(l,{key:i}):l)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}function zn(e){return T(e)?{setup:e,name:e.name}:e}const Wn=e=>!!e.type.__asyncLoader;function Kn(e,{vnode:{ref:t,props:n,children:o}}){const r=Or(e,n,o);return r.ref=t,r}const Gn=e=>e.type.__isKeepAlive,qn={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Hr(),o=n.ctx,r=new Map,s=new Set;let l=null;const i=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:f}}}=o,p=f("div");function d(e){eo(e),u(e,n,i,!0)}function h(e){r.forEach(((t,n)=>{const o=ts(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);l&&t.type===l.type?l&&eo(l):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,i),c(s.vnode,e,t,n,s,i,o,e.slotScopeIds,r),nr((()=>{s.isDeactivated=!1,s.a&&K(s.a);const t=e.props&&e.props.onVnodeMounted;t&&$r(t,s.parent,e)}),i)},o.deactivate=e=>{const t=e.component;a(e,p,null,1,i),nr((()=>{t.da&&K(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&$r(n,t.parent,e),t.isDeactivated=!0}),i)},Rn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Jn(e,t))),t&&h((e=>!Jn(t,e)))}),{flush:"post",deep:!0});let v=null;const g=()=>{null!=v&&r.set(v,to(n.subTree))};return so(g),io(g),co((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=to(t);if(e.type!==r.type)d(e);else{eo(r);const e=r.component.da;e&&nr(e,o)}}))})),()=>{if(v=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return l=null,n;if(!(Er(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return l=null,o;let i=to(o);const c=i.type,a=ts(Wn(i)?i.type.__asyncResolved||{}:c),{include:u,exclude:f,max:p}=e;if(u&&(!a||!Jn(u,a))||f&&a&&Jn(f,a))return l=i,o;const d=null==i.key?c:i.key,h=r.get(d);return i.el&&(i=Mr(i),128&o.shapeFlag&&(o.ssContent=i)),v=d,h?(i.el=h.el,i.component=h.component,i.transition&&Dn(i,i.transition),i.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),i.shapeFlag|=256,l=i,yn(o.type)?o:i}}};function Jn(e,t){return S(e)?e.some((e=>Jn(e,t))):F(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function Yn(e,t){Zn(e,"a",t)}function Xn(e,t){Zn(e,"da",t)}function Zn(e,t,n=Dr){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(no(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Gn(e.parent.vnode)&&Qn(o,t,n,e),e=e.parent}}function Qn(e,t,n,o){const r=no(t,e,o,!0);ao((()=>{C(o[t],r)}),n)}function eo(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function to(e){return 128&e.shapeFlag?e.ssContent:e}function no(e,t,n=Dr,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;pe(),zr(n);const r=Vt(t,n,e,o);return Wr(),de(),r});return o?r.unshift(s):r.push(s),s}}const oo=e=>(t,n=Dr)=>(!Jr||"sp"===e)&&no(e,t,n),ro=oo("bm"),so=oo("m"),lo=oo("bu"),io=oo("u"),co=oo("bum"),ao=oo("um"),uo=oo("sp"),fo=oo("rtg"),po=oo("rtc");function ho(e,t=Dr){no("ec",e,t)}function mo(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let l=0;l<r.length;l++){const i=r[l];s&&(i.oldValue=s[l].value);let c=i.dir[o];c&&(pe(),Vt(c,n,8,[e.el,i,e,t]),de())}}const vo="components";const go=Symbol();function _o(e,t,n=!0,o=!1){const r=un||Dr;if(r){const n=r.type;if(e===vo){const e=ts(n);if(e&&(e===t||e===j(t)||e===H(j(t))))return n}const s=yo(r[e]||n[e],t)||yo(r.appContext[e],t);return!s&&o?n:s}}function yo(e,t){return e&&(e[t]||e[j(t)]||e[H(j(t))])}function bo(e){return e.some((e=>!Er(e)||e.type!==mr&&!(e.type===dr&&!bo(e.children))))?e:null}const Co=e=>e?Kr(e)?Qr(e)||e.proxy:Co(e.parent):null,xo=b(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Co(e.parent),$root:e=>Co(e.root),$emit:e=>e.emit,$options:e=>Fo(e),$forceUpdate:e=>e.f||(e.f=()=>Xt(e.update)),$nextTick:e=>e.n||(e.n=Yt.bind(e.proxy)),$watch:e=>Pn.bind(e)}),wo={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:l,type:i,appContext:c}=e;let a;if("$"!==t[0]){const i=l[t];if(void 0!==i)switch(i){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(o!==d&&w(o,t))return l[t]=1,o[t];if(r!==d&&w(r,t))return l[t]=2,r[t];if((a=e.propsOptions[0])&&w(a,t))return l[t]=3,s[t];if(n!==d&&w(n,t))return l[t]=4,n[t];Eo&&(l[t]=0)}}const u=xo[t];let f,p;return u?("$attrs"===t&&he(e,0,t),u(e)):(f=i.__cssModules)&&(f=f[t])?f:n!==d&&w(n,t)?(l[t]=4,n[t]):(p=c.config.globalProperties,w(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return r!==d&&w(r,t)?(r[t]=n,!0):o!==d&&w(o,t)?(o[t]=n,!0):!w(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},l){let i;return!!n[l]||e!==d&&w(e,l)||t!==d&&w(t,l)||(i=s[0])&&w(i,l)||w(o,l)||w(xo,l)||w(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:w(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},So=b({},wo,{get(e,t){if(t!==Symbol.unscopables)return wo.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!n(t)});let Eo=!0;function ko(e){const t=Fo(e),n=e.proxy,o=e.ctx;Eo=!1,t.beforeCreate&&Ao(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:l,watch:i,provide:c,inject:a,created:u,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:v,deactivated:g,beforeUnmount:_,unmounted:y,render:b,renderTracked:C,renderTriggered:x,errorCaptured:w,serverPrefetch:E,expose:k,inheritAttrs:A,components:F,directives:R}=t;if(a&&function(e,t,n=m,o=!1){S(e)&&(e=Mo(e));for(const r in e){const n=e[r];let s;s=O(n)?"default"in n?An(n.from||r,n.default,!0):An(n.from||r):An(n),bt(s)&&o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}(a,o,null,e.appContext.config.unwrapInjectedRef),l)for(const m in l){const e=l[m];T(e)&&(o[m]=e.bind(n))}if(r){const t=r.call(n,n);O(t)&&(e.data=lt(t))}if(Eo=!0,s)for(const S in s){const e=s[S],t=T(e)?e.bind(n,n):T(e.get)?e.get.bind(n,n):m,r=!T(e)&&T(e.set)?e.set.bind(n):m,l=os({get:t,set:r});Object.defineProperty(o,S,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(i)for(const m in i)To(i[m],o,n,m);if(c){const e=T(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{kn(t,e[t])}))}function P(e,t){S(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&Ao(u,e,"c"),P(ro,f),P(so,p),P(lo,d),P(io,h),P(Yn,v),P(Xn,g),P(ho,w),P(po,C),P(fo,x),P(co,_),P(ao,y),P(uo,E),S(k))if(k.length){const t=e.exposed||(e.exposed={});k.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});b&&e.render===m&&(e.render=b),null!=A&&(e.inheritAttrs=A),F&&(e.components=F),R&&(e.directives=R)}function Ao(e,t,n){Vt(S(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function To(e,t,n,o){const r=o.includes(".")?Mn(n,o):()=>n[o];if(F(e)){const n=t[e];T(n)&&Rn(r,n)}else if(T(e))Rn(r,e.bind(n));else if(O(e))if(S(e))e.forEach((e=>To(e,t,n,o)));else{const o=T(e.handler)?e.handler.bind(n):t[e.handler];T(o)&&Rn(r,o,e)}}function Fo(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:l}}=e.appContext,i=s.get(t);let c;return i?c=i:r.length||n||o?(c={},r.length&&r.forEach((e=>Ro(c,e,l,!0))),Ro(c,t,l)):c=t,s.set(t,c),c}function Ro(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Ro(e,s,n,!0),r&&r.forEach((t=>Ro(e,t,n,!0)));for(const l in t)if(o&&"expose"===l);else{const o=Oo[l]||n&&n[l];e[l]=o?o(e[l],t[l]):t[l]}return e}const Oo={data:Po,props:Vo,emits:Vo,methods:Vo,computed:Vo,beforeCreate:No,created:No,beforeMount:No,mounted:No,beforeUpdate:No,updated:No,beforeDestroy:No,beforeUnmount:No,destroyed:No,unmounted:No,activated:No,deactivated:No,errorCaptured:No,serverPrefetch:No,components:Vo,directives:Vo,watch:function(e,t){if(!e)return t;if(!t)return e;const n=b(Object.create(null),e);for(const o in t)n[o]=No(e[o],t[o]);return n},provide:Po,inject:function(e,t){return Vo(Mo(e),Mo(t))}};function Po(e,t){return t?e?function(){return b(T(e)?e.call(this,this):e,T(t)?t.call(this,this):t)}:t:e}function Mo(e){if(S(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function No(e,t){return e?[...new Set([].concat(e,t))]:t}function Vo(e,t){return e?b(b(Object.create(null),e),t):t}function Bo(e,t,n,o){const[r,s]=e.propsOptions;let l,i=!1;if(t)for(let c in t){if(L(c))continue;const a=t[c];let u;r&&w(r,u=j(c))?s&&s.includes(u)?(l||(l={}))[u]=a:n[u]=a:an(e.emitsOptions,c)||c in o&&a===o[c]||(o[c]=a,i=!0)}if(s){const t=ht(n),o=l||d;for(let l=0;l<s.length;l++){const i=s[l];n[i]=Lo(r,t,i,o[i],e,!w(o,i))}}return i}function Lo(e,t,n,o,r,s){const l=e[n];if(null!=l){const e=w(l,"default");if(e&&void 0===o){const e=l.default;if(l.type!==Function&&T(e)){const{propsDefaults:s}=r;n in s?o=s[n]:(zr(r),o=s[n]=e.call(null,t),Wr())}else o=e}l[0]&&(s&&!e?o=!1:!l[1]||""!==o&&o!==D(n)||(o=!0))}return o}function Io(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,l={},i=[];let c=!1;if(!T(e)){const o=e=>{c=!0;const[n,o]=Io(e,t,!0);b(l,n),o&&i.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return o.set(e,h),h;if(S(s))for(let u=0;u<s.length;u++){const e=j(s[u]);$o(e)&&(l[e]=d)}else if(s)for(const u in s){const e=j(u);if($o(e)){const t=s[u],n=l[e]=S(t)||T(t)?{type:t}:t;if(n){const t=Do(Boolean,n.type),o=Do(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||w(n,"default"))&&i.push(e)}}}const a=[l,i];return o.set(e,a),a}function $o(e){return"$"!==e[0]}function jo(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function Uo(e,t){return jo(e)===jo(t)}function Do(e,t){return S(t)?t.findIndex((t=>Uo(t,e))):T(t)&&Uo(t,e)?0:-1}const Ho=e=>"_"===e[0]||"$stable"===e,zo=e=>S(e)?e.map(Vr):[Vr(e)],Wo=(e,t,n)=>{if(t._n)return t;const o=dn(((...e)=>zo(t(...e))),n);return o._c=!1,o},Ko=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Ho(r))continue;const n=e[r];if(T(n))t[r]=Wo(0,n,o);else if(null!=n){const e=zo(n);t[r]=()=>e}}},Go=(e,t)=>{const n=zo(t);e.slots.default=()=>n};function qo(){return{app:null,config:{isNativeTag:v,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Jo=0;function Yo(e,t){return function(n,o=null){T(n)||(n=Object.assign({},n)),null==o||O(o)||(o=null);const r=qo(),s=new Set;let l=!1;const i=r.app={_uid:Jo++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:cs,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&T(e.install)?(s.add(e),e.install(i,...t)):T(e)&&(s.add(e),e(i,...t))),i),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),i),component:(e,t)=>t?(r.components[e]=t,i):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,i):r.directives[e],mount(s,c,a){if(!l){const u=Or(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),l=!0,i._container=s,s.__vue_app__=i,Qr(u.component)||u.component.proxy}},unmount(){l&&(e(null,i._container),delete i._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,i)};return i}}function Xo(e,t,n,o,r=!1){if(S(e))return void e.forEach(((e,s)=>Xo(e,t&&(S(t)?t[s]:t),n,o,r)));if(Wn(o)&&!r)return;const s=4&o.shapeFlag?Qr(o.component)||o.component.proxy:o.el,l=r?null:s,{i:i,r:c}=e,a=t&&t.r,u=i.refs===d?i.refs={}:i.refs,f=i.setupState;if(null!=a&&a!==c&&(F(a)?(u[a]=null,w(f,a)&&(f[a]=null)):bt(a)&&(a.value=null)),T(c))Nt(c,i,12,[l,u]);else{const t=F(c),o=bt(c);if(t||o){const o=()=>{if(e.f){const n=t?u[c]:c.value;r?S(n)&&C(n,s):S(n)?n.includes(s)||n.push(s):t?(u[c]=[s],w(f,c)&&(f[c]=u[c])):(c.value=[s],e.k&&(u[e.k]=c.value))}else t?(u[c]=l,w(f,c)&&(f[c]=l)):bt(c)&&(c.value=l,e.k&&(u[e.k]=l))};l?(o.id=-1,nr(o,n)):o()}}}let Zo=!1;const Qo=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,er=e=>8===e.nodeType;function tr(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:l,remove:i,insert:c,createComment:a}}=e,u=(n,o,i,a,v,g=!1)=>{const _=er(n)&&"["===n.data,y=()=>h(n,o,i,a,v,_),{type:b,ref:C,shapeFlag:x,patchFlag:w}=o,S=n.nodeType;o.el=n,-2===w&&(g=!1,o.dynamicChildren=null);let E=null;switch(b){case hr:3!==S?""===o.children?(c(o.el=r(""),l(n),n),E=n):E=y():(n.data!==o.children&&(Zo=!0,n.data=o.children),E=s(n));break;case mr:E=8!==S||_?y():s(n);break;case vr:if(1===S){E=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=E.outerHTML),t===o.staticCount-1&&(o.anchor=E),E=s(E);return E}E=y();break;case dr:E=_?d(n,o,i,a,v,g):y();break;default:if(1&x)E=1!==S||o.type.toLowerCase()!==n.tagName.toLowerCase()?y():f(n,o,i,a,v,g);else if(6&x){o.slotScopeIds=v;const e=l(n);if(t(o,e,null,i,a,Qo(e),g),E=_?m(n):s(n),E&&er(E)&&"teleport end"===E.data&&(E=s(E)),Wn(o)){let t;_?(t=Or(dr),t.anchor=E?E.previousSibling:e.lastChild):t=3===n.nodeType?Nr(""):Or("div"),t.el=n,o.component.subTree=t}}else 64&x?E=8!==S?y():o.type.hydrate(n,o,i,a,v,g,e,p):128&x&&(E=o.type.hydrate(n,o,i,a,Qo(l(n)),v,g,e,u))}return null!=C&&Xo(C,null,a,o),E},f=(e,t,n,r,s,l)=>{l=l||!!t.dynamicChildren;const{type:c,props:a,patchFlag:u,shapeFlag:f,dirs:d}=t,h="input"===c&&d||"option"===c;if(h||-1!==u){if(d&&mo(t,null,n,"created"),a)if(h||!l||48&u)for(const t in a)(h&&t.endsWith("value")||_(t)&&!L(t))&&o(e,t,null,a[t],!1,void 0,n);else a.onClick&&o(e,"onClick",null,a.onClick,!1,void 0,n);let c;if((c=a&&a.onVnodeBeforeMount)&&$r(c,n,t),d&&mo(t,null,n,"beforeMount"),((c=a&&a.onVnodeMounted)||d)&&Sn((()=>{c&&$r(c,n,t),d&&mo(t,null,n,"mounted")}),r),16&f&&(!a||!a.innerHTML&&!a.textContent)){let o=p(e.firstChild,t,e,n,r,s,l);for(;o;){Zo=!0;const e=o;o=o.nextSibling,i(e)}}else 8&f&&e.textContent!==t.children&&(Zo=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,o,r,s,l,i)=>{i=i||!!t.dynamicChildren;const c=t.children,a=c.length;for(let f=0;f<a;f++){const t=i?c[f]:c[f]=Vr(c[f]);if(e)e=u(e,t,r,s,l,i);else{if(t.type===hr&&!t.children)continue;Zo=!0,n(null,t,o,null,r,s,Qo(o),l)}}return e},d=(e,t,n,o,r,i)=>{const{slotScopeIds:u}=t;u&&(r=r?r.concat(u):u);const f=l(e),d=p(s(e),t,f,n,o,r,i);return d&&er(d)&&"]"===d.data?s(t.anchor=d):(Zo=!0,c(t.anchor=a("]"),f,d),d)},h=(e,t,o,r,c,a)=>{if(Zo=!0,t.el=null,a){const t=m(e);for(;;){const n=s(e);if(!n||n===t)break;i(n)}}const u=s(e),f=l(e);return i(e),n(null,t,f,u,o,r,Qo(f),c),u},m=e=>{let t=0;for(;e;)if((e=s(e))&&er(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),void nn();Zo=!1,u(t.firstChild,e,null,null,null),nn(),Zo&&console.error("Hydration completed but contains mismatches.")},u]}const nr=Sn;function or(e){return sr(e)}function rr(e){return sr(e,tr)}function sr(e,t){(J||(J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})).__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:s,createText:l,createComment:i,setText:c,setElementText:a,parentNode:u,nextSibling:f,setScopeId:p=m,cloneNode:v,insertStaticContent:g}=e,_=(e,t,n,o=null,r=null,s=null,l=!1,i=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!kr(e,t)&&(o=ee(e),W(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:f}=t;switch(a){case hr:y(e,t,n,o);break;case mr:C(e,t,n,o);break;case vr:null==e&&x(t,n,o,l);break;case dr:O(e,t,n,o,r,s,l,i,c);break;default:1&f?S(e,t,n,o,r,s,l,i,c):6&f?M(e,t,n,o,r,s,l,i,c):(64&f||128&f)&&a.process(e,t,n,o,r,s,l,i,c,ne)}null!=u&&r&&Xo(u,e&&e.ref,s,t||e,!t)},y=(e,t,o,r)=>{if(null==e)n(t.el=l(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},C=(e,t,o,r)=>{null==e?n(t.el=i(t.children||""),o,r):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=g(e.children,t,n,o,e.el,e.anchor)},S=(e,t,n,o,r,s,l,i,c)=>{l=l||"svg"===t.type,null==e?E(t,n,o,r,s,l,i,c):T(e,t,r,s,l,i,c)},E=(e,t,o,l,i,c,u,f)=>{let p,d;const{type:h,props:m,shapeFlag:g,transition:_,patchFlag:y,dirs:b}=e;if(e.el&&void 0!==v&&-1===y)p=e.el=v(e.el);else{if(p=e.el=s(e.type,c,m&&m.is,m),8&g?a(p,e.children):16&g&&A(e.children,p,null,l,i,c&&"foreignObject"!==h,u,f),b&&mo(e,null,l,"created"),m){for(const t in m)"value"===t||L(t)||r(p,t,null,m[t],c,e.children,l,i,Q);"value"in m&&r(p,"value",null,m.value),(d=m.onVnodeBeforeMount)&&$r(d,l,e)}k(p,e,e.scopeId,u,l)}b&&mo(e,null,l,"beforeMount");const C=(!i||i&&!i.pendingBranch)&&_&&!_.persisted;C&&_.beforeEnter(p),n(p,t,o),((d=m&&m.onVnodeMounted)||C||b)&&nr((()=>{d&&$r(d,l,e),C&&_.enter(p),b&&mo(e,null,l,"mounted")}),i)},k=(e,t,n,o,r)=>{if(n&&p(e,n),o)for(let s=0;s<o.length;s++)p(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;k(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},A=(e,t,n,o,r,s,l,i,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=i?Br(e[a]):Vr(e[a]);_(null,c,t,n,o,r,s,l,i)}},T=(e,t,n,o,s,l,i)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=t;u|=16&e.patchFlag;const h=e.props||d,m=t.props||d;let v;n&&lr(n,!1),(v=m.onVnodeBeforeUpdate)&&$r(v,n,t,e),p&&mo(t,e,n,"beforeUpdate"),n&&lr(n,!0);const g=s&&"foreignObject"!==t.type;if(f?F(e.dynamicChildren,f,c,n,o,g,l):i||$(e,t,c,null,n,o,g,l,!1),u>0){if(16&u)R(c,t,h,m,n,o,s);else if(2&u&&h.class!==m.class&&r(c,"class",null,m.class,s),4&u&&r(c,"style",h.style,m.style,s),8&u){const l=t.dynamicProps;for(let t=0;t<l.length;t++){const i=l[t],a=h[i],u=m[i];u===a&&"value"!==i||r(c,i,a,u,s,e.children,n,o,Q)}}1&u&&e.children!==t.children&&a(c,t.children)}else i||null!=f||R(c,t,h,m,n,o,s);((v=m.onVnodeUpdated)||p)&&nr((()=>{v&&$r(v,n,t,e),p&&mo(t,e,n,"updated")}),o)},F=(e,t,n,o,r,s,l)=>{for(let i=0;i<t.length;i++){const c=e[i],a=t[i],f=c.el&&(c.type===dr||!kr(c,a)||70&c.shapeFlag)?u(c.el):n;_(c,a,f,null,o,r,s,l,!0)}},R=(e,t,n,o,s,l,i)=>{if(n!==o){for(const c in o){if(L(c))continue;const a=o[c],u=n[c];a!==u&&"value"!==c&&r(e,c,u,a,i,t.children,s,l,Q)}if(n!==d)for(const c in n)L(c)||c in o||r(e,c,n[c],null,i,t.children,s,l,Q);"value"in o&&r(e,"value",n.value,o.value)}},O=(e,t,o,r,s,i,c,a,u)=>{const f=t.el=e?e.el:l(""),p=t.anchor=e?e.anchor:l("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(n(f,o,r),n(p,o,r),A(t.children,o,p,s,i,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(F(e.dynamicChildren,h,o,s,i,c,a),(null!=t.key||s&&t===s.subTree)&&ir(e,t,!0)):$(e,t,o,p,s,i,c,a,u)},M=(e,t,n,o,r,s,l,i,c)=>{t.slotScopeIds=i,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,l,c):N(t,n,o,r,s,l,c):V(e,t,c)},N=(e,t,n,o,r,s,l)=>{const i=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||jr,s={uid:Ur++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new X(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Io(o,r),emitsOptions:cn(o,r),emit:null,emitted:null,propsDefaults:d,inheritAttrs:o.inheritAttrs,ctx:d,data:d,props:d,attrs:d,slots:d,refs:d,setupState:d,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=ln.bind(null,s),e.ce&&e.ce(s);return s}(e,o,r);if(Gn(e)&&(i.ctx.renderer=ne),function(e,t=!1){Jr=t;const{props:n,children:o}=e.vnode,r=Kr(e);(function(e,t,n,o=!1){const r={},s={};G(s,Ar,1),e.propsDefaults=Object.create(null),Bo(e,t,r,s);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);e.props=n?o?r:it(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=ht(t),G(t,"_",n)):Ko(t,e.slots={})}else e.slots={},t&&Go(e,t);G(e.slots,Ar,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=mt(new Proxy(e.ctx,wo));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?Zr(e):null;zr(e),pe();const r=Nt(o,e,0,[e.props,n]);if(de(),Wr(),P(r)){if(r.then(Wr,Wr),t)return r.then((n=>{Yr(e,n,t)})).catch((t=>{Bt(t,e,0)}));e.asyncDep=r}else Yr(e,r,t)}else Xr(e,t)}(e,t):void 0;Jr=!1}(i),i.asyncDep){if(r&&r.registerDep(i,B),!e.el){const e=i.subTree=Or(mr);C(null,e,t,n)}}else B(i,e,t,n,r,s,l)},V=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:l,children:i,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!i||i&&i.$stable)||o!==l&&(o?!l||gn(o,l,a):!!l);if(1024&c)return!0;if(16&c)return o?gn(o,l,a):!!l;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(l[n]!==o[n]&&!an(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void I(o,t,n);o.next=t,function(e){const t=$t.indexOf(e);t>jt&&$t.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},B=(e,t,n,o,r,s,l)=>{const i=e.effect=new ce((()=>{if(e.isMounted){let t,{next:n,bu:o,u:i,parent:c,vnode:a}=e,f=n;lr(e,!1),n?(n.el=a.el,I(e,n,l)):n=a,o&&K(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&$r(t,c,n,a),lr(e,!0);const p=hn(e),d=e.subTree;e.subTree=p,_(d,p,u(d.el),ee(d),e,r,s),n.el=p.el,null===f&&_n(e,p.el),i&&nr(i,r),(t=n.props&&n.props.onVnodeUpdated)&&nr((()=>$r(t,c,n,a)),r)}else{let l;const{el:i,props:c}=t,{bm:a,m:u,parent:f}=e,p=Wn(t);if(lr(e,!1),a&&K(a),!p&&(l=c&&c.onVnodeBeforeMount)&&$r(l,f,t),lr(e,!0),i&&re){const n=()=>{e.subTree=hn(e),re(i,e.subTree,e,r,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const l=e.subTree=hn(e);_(null,l,n,o,e,r,s),t.el=l.el}if(u&&nr(u,r),!p&&(l=c&&c.onVnodeMounted)){const e=t;nr((()=>$r(l,f,e)),r)}(256&t.shapeFlag||f&&Wn(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&nr(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>Xt(c)),e.scope),c=e.update=()=>i.run();c.id=e.uid,lr(e,!0),c()},I=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:l}}=e,i=ht(r),[c]=e.propsOptions;let a=!1;if(!(o||l>0)||16&l){let o;Bo(e,t,r,s)&&(a=!0);for(const s in i)t&&(w(t,s)||(o=D(s))!==s&&w(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Lo(c,i,s,void 0,e,!0)):delete r[s]);if(s!==i)for(const e in s)t&&w(t,e)||(delete s[e],a=!0)}else if(8&l){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let l=n[o];if(an(e.emitsOptions,l))continue;const u=t[l];if(c)if(w(s,l))u!==s[l]&&(s[l]=u,a=!0);else{const t=j(l);r[t]=Lo(c,i,t,u,e,!1)}else u!==s[l]&&(s[l]=u,a=!0)}}a&&ve(e,"set","$attrs")}(e,t.props,o,n),((e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,l=d;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(b(r,t),n||1!==e||delete r._):(s=!t.$stable,Ko(t,r)),l=t}else t&&(Go(e,t),l={default:1});if(s)for(const i in r)Ho(i)||i in l||delete r[i]})(e,t.children,n),pe(),tn(void 0,e.update),de()},$=(e,t,n,o,r,s,l,i,c=!1)=>{const u=e&&e.children,f=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void H(u,p,n,o,r,s,l,i,c);if(256&d)return void U(u,p,n,o,r,s,l,i,c)}8&h?(16&f&&Q(u,r,s),p!==u&&a(n,p)):16&f?16&h?H(u,p,n,o,r,s,l,i,c):Q(u,r,s,!0):(8&f&&a(n,""),16&h&&A(p,n,o,r,s,l,i,c))},U=(e,t,n,o,r,s,l,i,c)=>{const a=(e=e||h).length,u=(t=t||h).length,f=Math.min(a,u);let p;for(p=0;p<f;p++){const o=t[p]=c?Br(t[p]):Vr(t[p]);_(e[p],o,n,null,r,s,l,i,c)}a>u?Q(e,r,s,!0,!1,f):A(t,n,o,r,s,l,i,c,f)},H=(e,t,n,o,r,s,l,i,c)=>{let a=0;const u=t.length;let f=e.length-1,p=u-1;for(;a<=f&&a<=p;){const o=e[a],u=t[a]=c?Br(t[a]):Vr(t[a]);if(!kr(o,u))break;_(o,u,n,null,r,s,l,i,c),a++}for(;a<=f&&a<=p;){const o=e[f],a=t[p]=c?Br(t[p]):Vr(t[p]);if(!kr(o,a))break;_(o,a,n,null,r,s,l,i,c),f--,p--}if(a>f){if(a<=p){const e=p+1,f=e<u?t[e].el:o;for(;a<=p;)_(null,t[a]=c?Br(t[a]):Vr(t[a]),n,f,r,s,l,i,c),a++}}else if(a>p)for(;a<=f;)W(e[a],r,s,!0),a++;else{const d=a,m=a,v=new Map;for(a=m;a<=p;a++){const e=t[a]=c?Br(t[a]):Vr(t[a]);null!=e.key&&v.set(e.key,a)}let g,y=0;const b=p-m+1;let C=!1,x=0;const w=new Array(b);for(a=0;a<b;a++)w[a]=0;for(a=d;a<=f;a++){const o=e[a];if(y>=b){W(o,r,s,!0);continue}let u;if(null!=o.key)u=v.get(o.key);else for(g=m;g<=p;g++)if(0===w[g-m]&&kr(o,t[g])){u=g;break}void 0===u?W(o,r,s,!0):(w[u-m]=a+1,u>=x?x=u:C=!0,_(o,t[u],n,null,r,s,l,i,c),y++)}const S=C?function(e){const t=e.slice(),n=[0];let o,r,s,l,i;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,l=n.length-1;s<l;)i=s+l>>1,e[n[i]]<c?s=i+1:l=i;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,l=n[s-1];for(;s-- >0;)n[s]=l,l=t[l];return n}(w):h;for(g=S.length-1,a=b-1;a>=0;a--){const e=m+a,f=t[e],p=e+1<u?t[e+1].el:o;0===w[a]?_(null,f,n,p,r,s,l,i,c):C&&(g<0||a!==S[g]?z(f,n,p,2):g--)}}},z=(e,t,o,r,s=null)=>{const{el:l,type:i,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void z(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void i.move(e,t,o,ne);if(i===dr){n(l,t,o);for(let e=0;e<a.length;e++)z(a[e],t,o,r);return void n(e.anchor,t,o)}if(i===vr)return void(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=f(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(l),n(l,t,o),nr((()=>c.enter(l)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,i=()=>n(l,t,o),a=()=>{e(l,(()=>{i(),s&&s()}))};r?r(l,i,a):a()}else n(l,t,o)},W=(e,t,n,o=!1,r=!1)=>{const{type:s,props:l,ref:i,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:f,dirs:p}=e;if(null!=i&&Xo(i,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&p,h=!Wn(e);let m;if(h&&(m=l&&l.onVnodeBeforeUnmount)&&$r(m,t,e),6&u)Z(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&mo(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ne,o):a&&(s!==dr||f>0&&64&f)?Q(a,t,n,!1,!0):(s===dr&&384&f||!r&&16&u)&&Q(c,t,n),o&&q(e)}(h&&(m=l&&l.onVnodeUnmounted)||d)&&nr((()=>{m&&$r(m,t,e),d&&mo(e,null,t,"unmounted")}),n)},q=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===dr)return void Y(n,r);if(t===vr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),o(e),e=n;o(t)})(e);const l=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,l);o?o(e.el,l,r):r()}else l()},Y=(e,t)=>{let n;for(;e!==t;)n=f(e),o(e),e=n;o(t)},Z=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:l,um:i}=e;o&&K(o),r.stop(),s&&(s.active=!1,W(l,e,t,n)),i&&nr(i,t),nr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,n,o=!1,r=!1,s=0)=>{for(let l=s;l<e.length;l++)W(e[l],t,n,o,r)},ee=e=>6&e.shapeFlag?ee(e.component.subTree):128&e.shapeFlag?e.suspense.next():f(e.anchor||e.el),te=(e,t,n)=>{null==e?t._vnode&&W(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),nn(),t._vnode=e},ne={p:_,um:W,m:z,r:q,mt:N,mc:A,pc:$,pbc:F,n:ee,o:e};let oe,re;return t&&([oe,re]=t(ne)),{render:te,hydrate:oe,createApp:Yo(te,oe)}}function lr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ir(e,t,n=!1){const o=e.children,r=t.children;if(S(o)&&S(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=Br(r[s]),t.el=e.el),n||ir(e,t))}}const cr=e=>e&&(e.disabled||""===e.disabled),ar=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ur=(e,t)=>{const n=e&&e.to;if(F(n)){if(t){return t(n)}return null}return n};function fr(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:l,anchor:i,shapeFlag:c,children:a,props:u}=e,f=2===s;if(f&&o(l,t,n),(!f||cr(u))&&16&c)for(let p=0;p<a.length;p++)r(a[p],t,n,2);f&&o(i,t,n)}const pr={__isTeleport:!0,process(e,t,n,o,r,s,l,i,c,a){const{mc:u,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:m}}=a,v=cr(t.props);let{shapeFlag:g,children:_,dynamicChildren:y}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");d(e,n,o),d(a,n,o);const f=t.target=ur(t.props,h),p=t.targetAnchor=m("");f&&(d(p,f),l=l||ar(f));const y=(e,t)=>{16&g&&u(_,e,t,r,s,l,i,c)};v?y(n,a):f&&y(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=cr(e.props),g=m?n:u,_=m?o:d;if(l=l||ar(u),y?(p(e.dynamicChildren,y,g,r,s,l,i),ir(e,t,!0)):c||f(e,t,g,_,r,s,l,i,!1),v)m||fr(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=ur(t.props,h);e&&fr(t,e,null,a,0)}else m&&fr(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},l){const{shapeFlag:i,children:c,anchor:a,targetAnchor:u,target:f,props:p}=e;if(f&&s(u),(l||!cr(p))&&(s(a),16&i))for(let d=0;d<c.length;d++){const e=c[d];r(e,t,n,!0,!!e.dynamicChildren)}},move:fr,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:l,parentNode:i,querySelector:c}},a){const u=t.target=ur(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(cr(t.props))t.anchor=a(l(e),t,i(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=l(e);let i=c;for(;i;)if(i=l(i),i&&8===i.nodeType&&"teleport anchor"===i.data){t.targetAnchor=i,u._lpa=t.targetAnchor&&l(t.targetAnchor);break}a(c,t,u,n,o,r,s)}}return t.anchor&&l(t.anchor)}},dr=Symbol(void 0),hr=Symbol(void 0),mr=Symbol(void 0),vr=Symbol(void 0),gr=[];let _r=null;function yr(e=!1){gr.push(_r=e?null:[])}function br(){gr.pop(),_r=gr[gr.length-1]||null}let Cr=1;function xr(e){Cr+=e}function wr(e){return e.dynamicChildren=Cr>0?_r||h:null,br(),Cr>0&&_r&&_r.push(e),e}function Sr(e,t,n,o,r){return wr(Or(e,t,n,o,r,!0))}function Er(e){return!!e&&!0===e.__v_isVNode}function kr(e,t){return e.type===t.type&&e.key===t.key}const Ar="__vInternal",Tr=({key:e})=>null!=e?e:null,Fr=({ref:e,ref_key:t,ref_for:n})=>null!=e?F(e)||bt(e)||T(e)?{i:un,r:e,k:t,f:!!n}:e:null;function Rr(e,t=null,n=null,o=0,r=null,s=(e===dr?0:1),l=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Tr(t),ref:t&&Fr(t),scopeId:fn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return i?(Lr(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=F(n)?8:16),Cr>0&&!l&&_r&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&_r.push(c),c}const Or=function(e,t=null,n=null,o=0,r=null,l=!1){e&&e!==go||(e=mr);if(Er(e)){const o=Mr(e,t,!0);return n&&Lr(o,n),Cr>0&&!l&&_r&&(6&o.shapeFlag?_r[_r.indexOf(e)]=o:_r.push(o)),o.patchFlag|=-2,o}i=e,T(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=Pr(t);let{class:e,style:n}=t;e&&!F(e)&&(t.class=a(e)),O(n)&&(dt(n)&&!S(n)&&(n=b({},n)),t.style=s(n))}const c=F(e)?1:yn(e)?128:(e=>e.__isTeleport)(e)?64:O(e)?4:T(e)?2:0;return Rr(e,t,n,o,r,c,l,!0)};function Pr(e){return e?dt(e)||Ar in e?b({},e):e:null}function Mr(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:l}=e,i=t?Ir(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:i,key:i&&Tr(i),ref:t&&t.ref?n&&r?S(r)?r.concat(Fr(t)):[r,Fr(t)]:Fr(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==dr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Mr(e.ssContent),ssFallback:e.ssFallback&&Mr(e.ssFallback),el:e.el,anchor:e.anchor}}function Nr(e=" ",t=0){return Or(hr,null,e,t)}function Vr(e){return null==e||"boolean"==typeof e?Or(mr):S(e)?Or(dr,null,e.slice()):"object"==typeof e?Br(e):Or(hr,null,String(e))}function Br(e){return null===e.el||e.memo?e:Mr(e)}function Lr(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(S(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Lr(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Ar in t?3===o&&un&&(1===un.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=un}}else T(t)?(t={default:t,_ctx:un},n=32):(t=String(t),64&o?(n=16,t=[Nr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ir(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=a([t.class,o.class]));else if("style"===e)t.style=s([t.style,o.style]);else if(_(e)){const n=t[e],r=o[e];!r||n===r||S(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function $r(e,t,n,o=null){Vt(e,t,7,[n,o])}const jr=qo();let Ur=0;let Dr=null;const Hr=()=>Dr||un,zr=e=>{Dr=e,e.scope.on()},Wr=()=>{Dr&&Dr.scope.off(),Dr=null};function Kr(e){return 4&e.vnode.shapeFlag}let Gr,qr,Jr=!1;function Yr(e,t,n){T(t)?e.render=t:O(t)&&(e.setupState=kt(t)),Xr(e,n)}function Xr(e,t,n){const o=e.type;if(!e.render){if(!t&&Gr&&!o.render){const t=o.template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:l}=o,i=b(b({isCustomElement:n,delimiters:s},r),l);o.render=Gr(t,i)}}e.render=o.render||m,qr&&qr(e)}zr(e),pe(),ko(e),de(),Wr()}function Zr(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(he(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}function Qr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(kt(mt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in xo?xo[n](e):void 0}))}const es=/(?:^|[-_])(\w)/g;function ts(e){return T(e)&&e.displayName||e.name}function ns(e,t,n=!1){let o=ts(t);if(!o&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(o=e[1])}if(!o&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};o=n(e.components||e.parent.type.components)||n(e.appContext.components)}return o?o.replace(es,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}const os=(e,t)=>function(e,t,n=!1){let o,r;const s=T(e);return s?(o=e,r=m):(o=e.get,r=e.set),new Rt(o,r,s||!r,n)}(e,0,Jr);function rs(){const e=Hr();return e.setupContext||(e.setupContext=Zr(e))}function ss(e,t,n){const o=arguments.length;return 2===o?O(t)&&!S(t)?Er(t)?Or(e,null,[t]):Or(e,t):Or(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Er(n)&&(n=[n]),Or(e,t,n))}const ls=Symbol("");function is(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(W(n[o],t[o]))return!1;return Cr>0&&_r&&_r.push(e),!0}const cs="3.2.36",as="undefined"!=typeof document?document:null,us=as&&as.createElement("template"),fs={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?as.createElementNS("http://www.w3.org/2000/svg",e):as.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>as.createTextNode(e),createComment:e=>as.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>as.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o,r,s){const l=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{us.innerHTML=o?`<svg>${e}</svg>`:e;const r=us.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const ps=/\s*!important$/;function ds(e,t,n){if(S(n))n.forEach((n=>ds(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=ms[t];if(n)return n;let o=j(t);if("filter"!==o&&o in e)return ms[t]=o;o=H(o);for(let r=0;r<hs.length;r++){const n=hs[r]+o;if(n in e)return ms[t]=n}return t}(e,t);ps.test(n)?e.setProperty(D(o),n.replace(ps,""),"important"):e[o]=n}}const hs=["Webkit","Moz","ms"],ms={};const vs="http://www.w3.org/1999/xlink";const[gs,_s]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let ys=0;const bs=Promise.resolve(),Cs=()=>{ys=0};function xs(e,t,n,o){e.addEventListener(t,n,o)}function ws(e,t,n,o,r=null){const s=e._vei||(e._vei={}),l=s[t];if(o&&l)l.value=o;else{const[n,i]=function(e){let t;if(Ss.test(e)){let n;for(t={};n=e.match(Ss);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[D(e.slice(2)),t]}(t);if(o){const l=s[t]=function(e,t){const n=e=>{const o=e.timeStamp||gs();(_s||o>=n.attached-1)&&Vt(function(e,t){if(S(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>ys||(bs.then(Cs),ys=gs()))(),n}(o,r);xs(e,n,l,i)}else l&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,l,i),s[t]=void 0)}}const Ss=/(?:Once|Passive|Capture)$/;const Es=/^on[a-z]/;function ks(e,t){const n=zn(e);class o extends Ts{constructor(e){super(n,e,t)}}return o.def=n,o}const As="undefined"!=typeof HTMLElement?HTMLElement:class{};class Ts extends As{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,Yt((()=>{this._connected||(Sl(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=e=>{const{props:t,styles:n}=e,o=!S(t),r=t?o?Object.keys(t):t:[];let s;if(o)for(const l in this._props){const e=t[l];(e===Number||e&&e.type===Number)&&(this._props[l]=q(this._props[l]),(s||(s=Object.create(null)))[l]=!0)}this._numberProps=s;for(const l of Object.keys(this))"_"!==l[0]&&this._setProp(l,this[l],!0,!1);for(const l of r.map(j))Object.defineProperty(this,l,{get(){return this._getProp(l)},set(e){this._setProp(l,e)}});this._applyStyles(n),this._update()},t=this._def.__asyncLoader;t?t().then(e):e(this._def)}_setAttr(e){let t=this.getAttribute(e);this._numberProps&&this._numberProps[e]&&(t=q(t)),this._setProp(j(e),t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(D(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(D(e),t+""):t||this.removeAttribute(D(e))))}_update(){Sl(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Or(this._def,b({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0,e.emit=(e,...t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Ts){e.parent=t._instance;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Fs(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Fs(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Rs(e.el,t);else if(e.type===dr)e.children.forEach((e=>Fs(e,t)));else if(e.type===vr){let{el:n,anchor:o}=e;for(;n&&(Rs(n,t),n!==o);)n=n.nextSibling}}function Rs(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Os="transition",Ps="animation",Ms=(e,{slots:t})=>ss(Ln,Is(e),t);Ms.displayName="Transition";const Ns={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Vs=Ms.props=b({},Ln.props,Ns),Bs=(e,t=[])=>{S(e)?e.forEach((e=>e(...t))):e&&e(...t)},Ls=e=>!!e&&(S(e)?e.some((e=>e.length>1)):e.length>1);function Is(e){const t={};for(const b in e)b in Ns||(t[b]=e[b]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=l,appearToClass:u=i,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(O(e))return[$s(e.enter),$s(e.leave)];{const t=$s(e);return[t,t]}}(r),m=h&&h[0],v=h&&h[1],{onBeforeEnter:g,onEnter:_,onEnterCancelled:y,onLeave:C,onLeaveCancelled:x,onBeforeAppear:w=g,onAppear:S=_,onAppearCancelled:E=y}=t,k=(e,t,n)=>{Us(e,t?u:i),Us(e,t?a:l),n&&n()},A=(e,t)=>{e._isLeaving=!1,Us(e,f),Us(e,d),Us(e,p),t&&t()},T=e=>(t,n)=>{const r=e?S:_,l=()=>k(t,e,n);Bs(r,[t,l]),Ds((()=>{Us(t,e?c:s),js(t,e?u:i),Ls(r)||zs(t,o,m,l)}))};return b(t,{onBeforeEnter(e){Bs(g,[e]),js(e,s),js(e,l)},onBeforeAppear(e){Bs(w,[e]),js(e,c),js(e,a)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>A(e,t);js(e,f),qs(),js(e,p),Ds((()=>{e._isLeaving&&(Us(e,f),js(e,d),Ls(C)||zs(e,o,v,n))})),Bs(C,[e,n])},onEnterCancelled(e){k(e,!1),Bs(y,[e])},onAppearCancelled(e){k(e,!0),Bs(E,[e])},onLeaveCancelled(e){A(e),Bs(x,[e])}})}function $s(e){return q(e)}function js(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function Us(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Ds(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Hs=0;function zs(e,t,n,o){const r=e._endId=++Hs,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:l,timeout:i,propCount:c}=Ws(e,t);if(!l)return o();const a=l+"end";let u=0;const f=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&f()};setTimeout((()=>{u<c&&f()}),i+1),e.addEventListener(a,p)}function Ws(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),l=Ks(r,s),i=o("animationDelay"),c=o("animationDuration"),a=Ks(i,c);let u=null,f=0,p=0;t===Os?l>0&&(u=Os,f=l,p=s.length):t===Ps?a>0&&(u=Ps,f=a,p=c.length):(f=Math.max(l,a),u=f>0?l>a?Os:Ps:null,p=u?u===Os?s.length:c.length:0);return{type:u,timeout:f,propCount:p,hasTransform:u===Os&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}function Ks(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Gs(t)+Gs(e[n]))))}function Gs(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function qs(){return document.body.offsetHeight}const Js=new WeakMap,Ys=new WeakMap,Xs={name:"TransitionGroup",props:b({},Vs,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Hr(),o=Vn();let r,s;return io((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=Ws(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(Zs),r.forEach(Qs);const o=r.filter(el);qs(),o.forEach((e=>{const n=e.el,o=n.style;js(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,Us(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const l=ht(e),i=Is(l);let c=l.tag||dr;r=s,s=t.default?Hn(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&Dn(t,$n(t,i,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];Dn(t,$n(t,i,o,n)),Js.set(t,t.el.getBoundingClientRect())}return Or(c,null,s)}}};function Zs(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function Qs(e){Ys.set(e,e.el.getBoundingClientRect())}function el(e){const t=Js.get(e),n=Ys.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const tl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return S(t)?e=>K(t,e):t};function nl(e){e.target.composing=!0}function ol(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const rl={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=tl(r);const s=o||r.props&&"number"===r.props.type;xs(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=q(o)),e._assign(o)})),n&&xs(e,"change",(()=>{e.value=e.value.trim()})),t||(xs(e,"compositionstart",nl),xs(e,"compositionend",ol),xs(e,"change",ol))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=tl(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&q(e.value)===t)return}const l=null==t?"":t;e.value!==l&&(e.value=l)}},sl={deep:!0,created(e,t,n){e._assign=tl(n),xs(e,"change",(()=>{const t=e._modelValue,n=ul(e),o=e.checked,r=e._assign;if(S(t)){const e=f(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(k(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(fl(e,o))}))},mounted:ll,beforeUpdate(e,t,n){e._assign=tl(n),ll(e,t,n)}};function ll(e,{value:t,oldValue:n},o){e._modelValue=t,S(t)?e.checked=f(t,o.props.value)>-1:k(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=u(t,fl(e,!0)))}const il={created(e,{value:t},n){e.checked=u(t,n.props.value),e._assign=tl(n),xs(e,"change",(()=>{e._assign(ul(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=tl(o),t!==n&&(e.checked=u(t,o.props.value))}},cl={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=k(t);xs(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?q(ul(e)):ul(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=tl(o)},mounted(e,{value:t}){al(e,t)},beforeUpdate(e,t,n){e._assign=tl(n)},updated(e,{value:t}){al(e,t)}};function al(e,t){const n=e.multiple;if(!n||S(t)||k(t)){for(let o=0,r=e.options.length;o<r;o++){const r=e.options[o],s=ul(r);if(n)r.selected=S(t)?f(t,s)>-1:t.has(s);else if(u(ul(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function ul(e){return"_value"in e?e._value:e.value}function fl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const pl={created(e,t,n){dl(e,t,n,null,"created")},mounted(e,t,n){dl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){dl(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){dl(e,t,n,o,"updated")}};function dl(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return cl;case"TEXTAREA":return rl;default:switch(t){case"checkbox":return sl;case"radio":return il;default:return rl}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const hl=["ctrl","shift","alt","meta"],ml={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>hl.some((n=>e[`${n}Key`]&&!t.includes(n)))},vl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},gl={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):_l(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),_l(e,!0),o.enter(e)):o.leave(e,(()=>{_l(e,!1)})):_l(e,t))},beforeUnmount(e,{value:t}){_l(e,t)}};function _l(e,t){e.style.display=t?e._vod:"none"}const yl=b({patchProp:(e,t,n,s,l=!1,i,c,a,u)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,l):"style"===t?function(e,t,n){const o=e.style,r=F(n);if(n&&!r){for(const e in n)ds(o,e,n[e]);if(t&&!F(t))for(const e in t)null==n[e]&&ds(o,e,"")}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,n,s):_(t)?y(t)||ws(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&Es.test(t)&&T(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Es.test(t)&&F(n))return!1;return t in e}(e,t,s,l))?function(e,t,n,o,s,l,i){if("innerHTML"===t||"textContent"===t)return o&&i(o,s,l),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const o=null==n?"":n;return e.value===o&&"OPTION"!==e.tagName||(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=r(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,i,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,n,s,l){if(s&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(vs,t.slice(6,t.length)):e.setAttributeNS(vs,t,n);else{const s=o(t);null==n||s&&!r(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}(e,t,s,l))}},fs);let bl,Cl=!1;function xl(){return bl||(bl=or(yl))}function wl(){return bl=Cl?bl:rr(yl),Cl=!0,bl}const Sl=(...e)=>{xl().render(...e)},El=(...e)=>{wl().hydrate(...e)};function kl(e){if(F(e)){return document.querySelector(e)}return e}const Al=m;return e.BaseTransition=Ln,e.Comment=mr,e.EffectScope=X,e.Fragment=dr,e.KeepAlive=qn,e.ReactiveEffect=ce,e.Static=vr,e.Suspense=bn,e.Teleport=pr,e.Text=hr,e.Transition=Ms,e.TransitionGroup=Xs,e.VueElement=Ts,e.callWithAsyncErrorHandling=Vt,e.callWithErrorHandling=Nt,e.camelize=j,e.capitalize=H,e.cloneVNode=Mr,e.compatUtils=null,e.computed=os,e.createApp=(...e)=>{const t=xl().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=kl(e);if(!o)return;const r=t._component;T(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},e.createBlock=Sr,e.createCommentVNode=function(e="",t=!1){return t?(yr(),Sr(mr,null,e)):Or(mr,null,e)},e.createElementBlock=function(e,t,n,o,r,s){return wr(Rr(e,t,n,o,r,s,!0))},e.createElementVNode=Rr,e.createHydrationRenderer=rr,e.createPropsRestProxy=function(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n},e.createRenderer=or,e.createSSRApp=(...e)=>{const t=wl().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=kl(e);if(t)return n(t,!0,t instanceof SVGElement)},t},e.createSlots=function(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(S(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.fn)}return e},e.createStaticVNode=function(e,t){const n=Or(vr,null,e);return n.staticCount=t,n},e.createTextVNode=Nr,e.createVNode=Or,e.customRef=function(e){return new At(e)},e.defineAsyncComponent=function(e){T(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:l=!0,onError:i}=e;let c,a=null,u=0;const f=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),i)return new Promise(((t,n)=>{i(e,(()=>t((u++,a=null,f()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return zn({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return c},setup(){const e=Dr;if(c)return()=>Kn(c,e);const t=t=>{a=null,Bt(t,e,13,!o)};if(l&&e.suspense)return f().then((t=>()=>Kn(t,e))).catch((e=>(t(e),()=>o?Or(o,{error:e}):null)));const i=Ct(!1),u=Ct(),p=Ct(!!r);return r&&setTimeout((()=>{p.value=!1}),r),null!=s&&setTimeout((()=>{if(!i.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),f().then((()=>{i.value=!0,e.parent&&Gn(e.parent.vnode)&&Xt(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>i.value&&c?Kn(c,e):u.value&&o?Or(o,{error:u.value}):n&&!p.value?Or(n):void 0}})},e.defineComponent=zn,e.defineCustomElement=ks,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=e=>ks(e,El),e.effect=function(e,t){e.effect&&(e=e.effect.fn);const n=new ce(e);t&&(b(n,t),t.scope&&Z(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o},e.effectScope=function(e){return new X(e)},e.getCurrentInstance=Hr,e.getCurrentScope=function(){return Y},e.getTransitionRawChildren=Hn,e.guardReactiveProps=Pr,e.h=ss,e.handleError=Bt,e.hydrate=El,e.initCustomFormatter=function(){},e.initDirectivesForSSR=Al,e.inject=An,e.isMemoSame=is,e.isProxy=dt,e.isReactive=ut,e.isReadonly=ft,e.isRef=bt,e.isRuntimeOnly=()=>!Gr,e.isShallow=pt,e.isVNode=Er,e.markRaw=mt,e.mergeDefaults=function(e,t){const n=S(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const o in t){const e=n[o];e?S(e)||T(e)?n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(n[o]={default:t[o]})}return n},e.mergeProps=Ir,e.nextTick=Yt,e.normalizeClass=a,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!F(t)&&(e.class=a(t)),n&&(e.style=s(n)),e},e.normalizeStyle=s,e.onActivated=Yn,e.onBeforeMount=ro,e.onBeforeUnmount=co,e.onBeforeUpdate=lo,e.onDeactivated=Xn,e.onErrorCaptured=ho,e.onMounted=so,e.onRenderTracked=po,e.onRenderTriggered=fo,e.onScopeDispose=function(e){Y&&Y.cleanups.push(e)},e.onServerPrefetch=uo,e.onUnmounted=ao,e.onUpdated=io,e.openBlock=yr,e.popScopeId=function(){fn=null},e.provide=kn,e.proxyRefs=kt,e.pushScopeId=function(e){fn=e},e.queuePostFlushCb=en,e.reactive=lt,e.readonly=ct,e.ref=Ct,e.registerRuntimeCompiler=function(e){Gr=e,qr=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,So))}},e.render=Sl,e.renderList=function(e,t,n,o){let r;const s=n&&n[o];if(S(e)||F(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(O(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,l=n.length;o<l;o++){const l=n[o];r[o]=t(e[l],l,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r},e.renderSlot=function(e,t,n={},o,r){if(un.isCE||un.parent&&Wn(un.parent)&&un.parent.isCE)return Or("slot","default"===t?null:{name:t},o&&o());let s=e[t];s&&s._c&&(s._d=!1),yr();const l=s&&bo(s(n)),i=Sr(dr,{key:n.key||`_${t}`},l||(o?o():[]),l&&1===e._?64:-2);return!r&&i.scopeId&&(i.slotScopeIds=[i.scopeId+"-s"]),s&&s._c&&(s._d=!0),i},e.resolveComponent=function(e,t){return _o(vo,e,!0,t)||e},e.resolveDirective=function(e){return _o("directives",e)},e.resolveDynamicComponent=function(e){return F(e)?_o(vo,e,!1)||e:e||go},e.resolveFilter=null,e.resolveTransitionHooks=$n,e.setBlockTracking=xr,e.setDevtoolsHook=function t(n,o){var r,s;if(e.devtools=n,e.devtools)e.devtools.enabled=!0,sn.forEach((({event:t,args:n})=>e.devtools.emit(t,...n))),sn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(s=null===(r=window.navigator)||void 0===r?void 0:r.userAgent)||void 0===s?void 0:s.includes("jsdom"))){(o.__VUE_DEVTOOLS_HOOK_REPLAY__=o.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{t(e,o)})),setTimeout((()=>{e.devtools||(o.__VUE_DEVTOOLS_HOOK_REPLAY__=null,sn=[])}),3e3)}else sn=[]},e.setTransitionHooks=Dn,e.shallowReactive=it,e.shallowReadonly=function(e){return at(e,!0,Pe,et,rt)},e.shallowRef=function(e){return xt(e,!0)},e.ssrContextKey=ls,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=e=>F(e)?e:null==e?"":S(e)||O(e)&&(e.toString===M||!T(e.toString))?JSON.stringify(e,p,2):String(e),e.toHandlerKey=z,e.toHandlers=function(e){const t={};for(const n in e)t[z(n)]=e[n];return t},e.toRaw=ht,e.toRef=Ft,e.toRefs=function(e){const t=S(e)?new Array(e.length):{};for(const n in e)t[n]=Ft(e,n);return t},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){yt(e)},e.unref=St,e.useAttrs=function(){return rs().attrs},e.useCssModule=function(e="$style"){return d},e.useCssVars=function(e){const t=Hr();if(!t)return;const n=()=>Fs(t.subTree,e(t.proxy));Tn(n),so((()=>{const e=new MutationObserver(n);e.observe(t.subTree.el.parentNode,{childList:!0}),ao((()=>e.disconnect()))}))},e.useSSRContext=()=>{},e.useSlots=function(){return rs().slots},e.useTransitionState=Vn,e.vModelCheckbox=sl,e.vModelDynamic=pl,e.vModelRadio=il,e.vModelSelect=cl,e.vModelText=rl,e.vShow=gl,e.version=cs,e.warn=function(e,...t){pe();const n=Ot.length?Ot[Ot.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=function(){let e=Ot[Ot.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}();if(o)Nt(o,n,11,[e+t.join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${ns(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=` at <${ns(e.component,e.type,!!e.component&&null==e.component.parent)}`,r=">"+n;return e.props?[o,...Pt(e.props),r]:[o+r]}(e))})),t}(r)),console.warn(...n)}de()},e.watch=Rn,e.watchEffect=function(e,t){return On(e,null,t)},e.watchPostEffect=Tn,e.watchSyncEffect=function(e,t){return On(e,null,{flush:"sync"})},e.withAsyncContext=function(e){const t=Hr();let n=e();return Wr(),P(n)&&(n=n.catch((e=>{throw zr(t),e}))),[n,()=>zr(t)]},e.withCtx=dn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){const n=un;if(null===n)return e;const o=Qr(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,n,l,i=d]=t[s];T(e)&&(e={mounted:e,updated:e}),e.deep&&Nn(n),r.push({dir:e,instance:o,value:n,oldValue:void 0,arg:l,modifiers:i})}return e},e.withKeys=(e,t)=>n=>{if(!("key"in n))return;const o=D(n.key);return t.some((e=>e===o||vl[e]===o))?e(n):void 0},e.withMemo=function(e,t,n,o){const r=n[o];if(r&&is(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s},e.withModifiers=(e,t)=>(n,...o)=>{for(let e=0;e<t.length;e++){const o=ml[t[e]];if(o&&o(n,t))return}return e(n,...o)},e.withScopeId=e=>dn,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); +/** +* @vue/runtime-dom v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var VueRuntimeDOM=function(e){"use strict";function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},o=[],r=()=>{},s=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,p=(e,t)=>u.call(e,t),f=Array.isArray,d=e=>"[object Map]"===x(e),h=e=>"[object Set]"===x(e),m=e=>"[object Date]"===x(e),v=e=>"function"==typeof e,g=e=>"string"==typeof e,y=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,b=e=>(_(e)||v(e))&&v(e.then)&&v(e.catch),C=Object.prototype.toString,x=e=>C.call(e),S=e=>x(e).slice(8,-1),E=e=>"[object Object]"===x(e),w=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,k=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},T=/-(\w)/g,R=A((e=>e.replace(T,((e,t)=>t?t.toUpperCase():"")))),N=/\B([A-Z])/g,O=A((e=>e.replace(N,"-$1").toLowerCase())),F=A((e=>e.charAt(0).toUpperCase()+e.slice(1))),L=A((e=>e?`on${F(e)}`:"")),P=(e,t)=>!Object.is(e,t),M=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},I=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},V=e=>{const t=parseFloat(e);return isNaN(t)?e:t},B=e=>{const t=g(e)?Number(e):NaN;return isNaN(t)?e:t};let U;const D=()=>U||(U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),$=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");function j(e){if(f(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=g(o)?z(o):j(o);if(r)for(const e in r)t[e]=r[e]}return t}if(g(e)||_(e))return e}const H=/;(?![^(]*\))/g,W=/:([^]+)/,K=/\/\*[^]*?\*\//g;function z(e){const t={};return e.replace(K,"").split(H).forEach((e=>{if(e){const n=e.split(W);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function G(e){let t="";if(g(e))t=e;else if(f(e))for(let n=0;n<e.length;n++){const o=G(e[n]);o&&(t+=o+" ")}else if(_(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const q=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function J(e){return!!e||""===e}function X(e,t){if(e===t)return!0;let n=m(e),o=m(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=y(e),o=y(t),n||o)return e===t;if(n=f(e),o=f(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=X(e[o],t[o]);return n}(e,t);if(n=_(e),o=_(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!X(e[n],t[n]))return!1}}return String(e)===String(t)}function Y(e,t){return e.findIndex((e=>X(e,t)))}const Z=(e,t)=>t&&t.__v_isRef?Z(e,t.value):d(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[Q(t,o)+" =>"]=n,e)),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>Q(e)))}:y(t)?Q(t):!_(t)||f(t)||E(t)?t:String(t),Q=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let ee,te;class ne{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ee,!e&&ee&&(this.index=(ee.scopes||(ee.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=ee;try{return ee=this,e()}finally{ee=t}}}on(){ee=this}off(){ee=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function oe(e,t=ee){t&&t.active&&t.effects.push(e)}function re(){return ee}class se{constructor(e,t,n,o){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,oe(this,o)}get dirty(){if(1===this._dirtyLevel){de();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(ie(t.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),he()}return this._dirtyLevel>=2}set dirty(e){this._dirtyLevel=e?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=ue,t=te;try{return ue=!0,te=this,this._runnings++,le(this),this.fn()}finally{ce(this),this._runnings--,te=t,ue=e}}stop(){var e;this.active&&(le(this),ce(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function ie(e){return e.value}function le(e){e._trackId++,e._depsLength=0}function ce(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)ae(e.deps[t],e);e.deps.length=e._depsLength}}function ae(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}let ue=!0,pe=0;const fe=[];function de(){fe.push(ue),ue=!1}function he(){const e=fe.pop();ue=void 0===e||e}function me(){pe++}function ve(){for(pe--;!pe&&ye.length;)ye.shift()()}function ge(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&ae(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const ye=[];function _e(e,t,n){me();for(const o of e.keys())if(o._dirtyLevel<t&&e.get(o)===o._trackId){const e=o._dirtyLevel;o._dirtyLevel=t,0===e&&(o._shouldSchedule=!0,o.trigger())}be(e),ve()}function be(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,ye.push(t.scheduler))}const Ce=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},xe=new WeakMap,Se=Symbol(""),Ee=Symbol("");function we(e,t,n){if(ue&&te){let t=xe.get(e);t||xe.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Ce((()=>t.delete(n)))),ge(te,o)}}function ke(e,t,n,o,r,s){const i=xe.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&f(e)){const e=Number(o);i.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":f(e)?w(n)&&l.push(i.get("length")):(l.push(i.get(Se)),d(e)&&l.push(i.get(Ee)));break;case"delete":f(e)||(l.push(i.get(Se)),d(e)&&l.push(i.get(Ee)));break;case"set":d(e)&&l.push(i.get(Se))}me();for(const c of l)c&&_e(c,2);ve()}const Ae=t("__proto__,__v_isRef,__isVue"),Te=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),Re=Ne();function Ne(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=_t(this);for(let t=0,r=this.length;t<r;t++)we(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(_t)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){de(),me();const n=_t(this)[t].apply(this,e);return ve(),he(),n}})),e}function Oe(e){const t=_t(this);return we(t,0,e),t.hasOwnProperty(e)}class Fe{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const o=this._isReadonly,r=this._shallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?ut:at:r?ct:lt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=f(e);if(!o){if(s&&p(Re,t))return Reflect.get(Re,t,n);if("hasOwnProperty"===t)return Oe}const i=Reflect.get(e,t,n);return(y(t)?Te.has(t):Ae(t))?i:(o||we(e,0,t),r?i:kt(i)?s&&w(t)?i:i.value:_(i)?o?dt(i):pt(i):i)}}class Le extends Fe{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._shallow){const t=vt(r);if(gt(n)||vt(n)||(r=_t(r),n=_t(n)),!f(e)&&kt(r)&&!kt(n))return!t&&(r.value=n,!0)}const s=f(e)&&w(t)?Number(t)<e.length:p(e,t),i=Reflect.set(e,t,n,o);return e===_t(o)&&(s?P(n,r)&&ke(e,"set",t,n):ke(e,"add",t,n)),i}deleteProperty(e,t){const n=p(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&ke(e,"delete",t,void 0),o}has(e,t){const n=Reflect.has(e,t);return y(t)&&Te.has(t)||we(e,0,t),n}ownKeys(e){return we(e,0,f(e)?"length":Se),Reflect.ownKeys(e)}}class Pe extends Fe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Me=new Le,Ie=new Pe,Ve=new Le(!0),Be=new Pe(!0),Ue=e=>e,De=e=>Reflect.getPrototypeOf(e);function $e(e,t,n=!1,o=!1){const r=_t(e=e.__v_raw),s=_t(t);n||(P(t,s)&&we(r,0,t),we(r,0,s));const{has:i}=De(r),l=o?Ue:n?xt:Ct;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function je(e,t=!1){const n=this.__v_raw,o=_t(n),r=_t(e);return t||(P(e,r)&&we(o,0,e),we(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function He(e,t=!1){return e=e.__v_raw,!t&&we(_t(e),0,Se),Reflect.get(e,"size",e)}function We(e){e=_t(e);const t=_t(this);return De(t).has.call(t,e)||(t.add(e),ke(t,"add",e,e)),this}function Ke(e,t){t=_t(t);const n=_t(this),{has:o,get:r}=De(n);let s=o.call(n,e);s||(e=_t(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?P(t,i)&&ke(n,"set",e,t):ke(n,"add",e,t),this}function ze(e){const t=_t(this),{has:n,get:o}=De(t);let r=n.call(t,e);r||(e=_t(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&ke(t,"delete",e,void 0),s}function Ge(){const e=_t(this),t=0!==e.size,n=e.clear();return t&&ke(e,"clear",void 0,void 0),n}function qe(e,t){return function(n,o){const r=this,s=r.__v_raw,i=_t(s),l=t?Ue:e?xt:Ct;return!e&&we(i,0,Se),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function Je(e,t,n){return function(...o){const r=this.__v_raw,s=_t(r),i=d(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?Ue:t?xt:Ct;return!t&&we(s,0,c?Ee:Se),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Xe(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Ye(){const e={get(e){return $e(this,e)},get size(){return He(this)},has:je,add:We,set:Ke,delete:ze,clear:Ge,forEach:qe(!1,!1)},t={get(e){return $e(this,e,!1,!0)},get size(){return He(this)},has:je,add:We,set:Ke,delete:ze,clear:Ge,forEach:qe(!1,!0)},n={get(e){return $e(this,e,!0)},get size(){return He(this,!0)},has(e){return je.call(this,e,!0)},add:Xe("add"),set:Xe("set"),delete:Xe("delete"),clear:Xe("clear"),forEach:qe(!0,!1)},o={get(e){return $e(this,e,!0,!0)},get size(){return He(this,!0)},has(e){return je.call(this,e,!0)},add:Xe("add"),set:Xe("set"),delete:Xe("delete"),clear:Xe("clear"),forEach:qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Je(r,!1,!1),n[r]=Je(r,!0,!1),t[r]=Je(r,!1,!0),o[r]=Je(r,!0,!0)})),[e,n,t,o]}const[Ze,Qe,et,tt]=Ye();function nt(e,t){const n=t?e?tt:et:e?Qe:Ze;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(p(n,o)&&o in t?n:t,o,r)}const ot={get:nt(!1,!1)},rt={get:nt(!1,!0)},st={get:nt(!0,!1)},it={get:nt(!0,!0)},lt=new WeakMap,ct=new WeakMap,at=new WeakMap,ut=new WeakMap;function pt(e){return vt(e)?e:ht(e,!1,Me,ot,lt)}function ft(e){return ht(e,!1,Ve,rt,ct)}function dt(e){return ht(e,!0,Ie,st,at)}function ht(e,t,n,o,r){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(S(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function mt(e){return vt(e)?mt(e.__v_raw):!(!e||!e.__v_isReactive)}function vt(e){return!(!e||!e.__v_isReadonly)}function gt(e){return!(!e||!e.__v_isShallow)}function yt(e){return mt(e)||vt(e)}function _t(e){const t=e&&e.__v_raw;return t?_t(t):e}function bt(e){return I(e,"__v_skip",!0),e}const Ct=e=>_(e)?pt(e):e,xt=e=>_(e)?dt(e):e;class St{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new se((()=>e(this._value)),(()=>wt(this,1)),(()=>this.dep&&be(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=_t(this);return e._cacheable&&!e.effect.dirty||P(e._value,e._value=e.effect.run())&&wt(e,2),Et(e),e.effect._dirtyLevel>=1&&wt(e,1),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Et(e){ue&&te&&(e=_t(e),ge(te,e.dep||(e.dep=Ce((()=>e.dep=void 0),e instanceof St?e:void 0))))}function wt(e,t=2,n){const o=(e=_t(e)).dep;o&&_e(o,t)}function kt(e){return!(!e||!0!==e.__v_isRef)}function At(e){return Tt(e,!1)}function Tt(e,t){return kt(e)?e:new Rt(e,t)}class Rt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:_t(e),this._value=t?e:Ct(e)}get value(){return Et(this),this._value}set value(e){const t=this.__v_isShallow||gt(e)||vt(e);e=t?e:_t(e),P(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Ct(e),wt(this,2))}}function Nt(e){return kt(e)?e.value:e}const Ot={get:(e,t,n)=>Nt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return kt(r)&&!kt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Ft(e){return mt(e)?e:new Proxy(e,Ot)}class Lt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>Et(this)),(()=>wt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Pt(e){return new Lt(e)}class Mt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=_t(this._object),t=this._key,null==(n=xe.get(e))?void 0:n.get(t);var e,t,n}}class It{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Vt(e,t,n){const o=e[t];return kt(o)?o:new Mt(e,t,n)}function Bt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){Dt(s,t,n)}return r}function Ut(e,t,n,o){if(v(e)){const r=Bt(e,t,n,o);return r&&b(r)&&r.catch((e=>{Dt(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Ut(e[s],t,n,o));return r}function Dt(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const i=t.appContext.config.errorHandler;if(i)return void Bt(i,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let $t=!1,jt=!1;const Ht=[];let Wt=0;const Kt=[];let zt=null,Gt=0;const qt=Promise.resolve();let Jt=null;function Xt(e){const t=Jt||qt;return e?t.then(this?e.bind(this):e):t}function Yt(e){Ht.length&&Ht.includes(e,$t&&e.allowRecurse?Wt+1:Wt)||(null==e.id?Ht.push(e):Ht.splice(function(e){let t=Wt+1,n=Ht.length;for(;t<n;){const o=t+n>>>1,r=Ht[o],s=nn(r);s<e||s===e&&r.pre?t=o+1:n=o}return t}(e.id),0,e),Zt())}function Zt(){$t||jt||(jt=!0,Jt=qt.then(rn))}function Qt(e){f(e)?Kt.push(...e):zt&&zt.includes(e,e.allowRecurse?Gt+1:Gt)||Kt.push(e),Zt()}function en(e,t,n=($t?Wt+1:0)){for(;n<Ht.length;n++){const t=Ht[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;Ht.splice(n,1),n--,t()}}}function tn(e){if(Kt.length){const e=[...new Set(Kt)].sort(((e,t)=>nn(e)-nn(t)));if(Kt.length=0,zt)return void zt.push(...e);for(zt=e,Gt=0;Gt<zt.length;Gt++)zt[Gt]();zt=null,Gt=0}}const nn=e=>null==e.id?1/0:e.id,on=(e,t)=>{const n=nn(e)-nn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function rn(e){jt=!1,$t=!0,Ht.sort(on);try{for(Wt=0;Wt<Ht.length;Wt++){const e=Ht[Wt];e&&!1!==e.active&&Bt(e,null,14)}}finally{Wt=0,Ht.length=0,tn(),$t=!1,Jt=null,(Ht.length||Kt.length)&&rn()}}function sn(e,t,...o){if(e.isUnmounted)return;const r=e.vnode.props||n;let s=o;const i=t.startsWith("update:"),l=i&&t.slice(7);if(l&&l in r){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:t,trim:i}=r[e]||n;i&&(s=o.map((e=>g(e)?e.trim():e))),t&&(s=o.map(V))}let c,a=r[c=L(t)]||r[c=L(R(t))];!a&&i&&(a=r[c=L(O(t))]),a&&Ut(a,e,6,s);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Ut(u,e,6,s)}}function ln(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!v(e)){const o=e=>{const n=ln(e,t,!0);n&&(l=!0,c(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(f(s)?s.forEach((e=>i[e]=null)):c(i,s),_(e)&&o.set(e,i),i):(_(e)&&o.set(e,null),null)}function cn(e,t){return!(!e||!i(t))&&(t=t.slice(2).replace(/Once$/,""),p(e,t[0].toLowerCase()+t.slice(1))||p(e,O(t))||p(e,t))}let an=null,un=null;function pn(e){const t=an;return an=e,un=e&&e.type.__scopeId||null,t}function fn(e,t=an,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Ur(-1);const r=pn(t);let s;try{s=e(...n)}finally{pn(r),o._d&&Ur(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function dn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:c,attrs:a,emit:u,render:p,renderCache:f,data:d,setupState:h,ctx:m,inheritAttrs:v}=e;let g,y;const _=pn(e);try{if(4&n.shapeFlag){const e=r||o;g=Zr(p.call(e,e,f,s,h,d,m)),y=a}else{const e=t;0,g=Zr(e(s,e.length>1?{attrs:a,slots:c,emit:u}:null)),y=t.props?a:hn(a)}}catch(C){Pr.length=0,Dt(C,e,1),g=qr(Fr)}let b=g;if(y&&!1!==v){const e=Object.keys(y),{shapeFlag:t}=b;e.length&&7&t&&(i&&e.some(l)&&(y=mn(y,i)),b=Xr(b,y))}return n.dirs&&(b=Xr(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),g=b,pn(_),g}const hn=e=>{let t;for(const n in e)("class"===n||"style"===n||i(n))&&((t||(t={}))[n]=e[n]);return t},mn=(e,t)=>{const n={};for(const o in e)l(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function vn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!cn(n,s))return!0}return!1}function gn({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}const yn="components";const _n=Symbol.for("v-ndc");function bn(e,t,n=!0,o=!1){const r=an||ss;if(r){const n=r.type;if(e===yn){const e=_s(n,!1);if(e&&(e===t||e===R(t)||e===F(R(t))))return n}const s=Cn(r[e]||n[e],t)||Cn(r.appContext[e],t);return!s&&o?n:s}}function Cn(e,t){return e&&(e[t]||e[R(t)]||e[F(R(t))])}const xn=e=>e.__isSuspense;let Sn=0;const En={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){if(null==e)!function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,p=u("div"),f=e.suspense=kn(e,r,o,t,p,n,s,i,l,c);a(null,f.pendingBranch=e.ssContent,p,null,o,f,s,i),f.deps>0?(wn(e,"onPending"),wn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),Rn(f,e.ssFallback)):f.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a);else{if(s&&s.deps>0)return void(t.suspense=e.suspense);!function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const f=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:v,isHydrating:g}=p;if(m)p.pendingBranch=f,Hr(f,m)?(c(m,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():v&&(g||(c(h,d,n,o,r,null,s,i,l),Rn(p,d)))):(p.pendingId=Sn++,g?(p.isHydrating=!1,p.activeBranch=m):a(m,r,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),v?(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():(c(h,d,n,o,r,null,s,i,l),Rn(p,d))):h&&Hr(f,h)?(c(h,f,n,o,r,p,s,i,l),p.resolve(!0)):(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0&&p.resolve()));else if(h&&Hr(f,h))c(h,f,n,o,r,p,s,i,l),Rn(p,f);else if(wn(t,"onPending"),p.pendingBranch=f,p.pendingId=512&f.shapeFlag?f.component.suspenseId:Sn++,c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0)p.resolve();else{const{timeout:e,pendingId:t}=p;e>0?setTimeout((()=>{p.pendingId===t&&p.fallback(d)}),e):0===e&&p.fallback(d)}}(e,t,n,o,r,i,l,c,a)}},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=kn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve(!1,!0);return u},create:kn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=An(o?n.default:n),e.ssFallback=o?An(n.fallback):qr(Fr)}};function wn(e,t){const n=e.props&&e.props[t];v(n)&&n()}function kn(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:p,m:f,um:d,n:h,o:{parentNode:m,remove:v}}=a;let g;const y=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);y&&(null==t?void 0:t.pendingBranch)&&(g=t.pendingId,t.deps++);const _=e.props?B(e.props.timeout):void 0,b=s,C={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:Sn++,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=C;let p=!1;C.isHydrating?C.isHydrating=!1:e||(p=r&&i.transition&&"out-in"===i.transition.mode,p&&(r.transition.afterLeave=()=>{l===C.pendingId&&(f(i,u,s===b?h(r):s,0),Qt(c))}),r&&(m(r.el)!==C.hiddenContainer&&(s=h(r)),d(r,a,C,!0)),p||f(i,u,s,0)),Rn(C,i),C.pendingBranch=null,C.isInFallback=!1;let v=C.parent,_=!1;for(;v;){if(v.pendingBranch){v.effects.push(...c),_=!0;break}v=v.parent}_||p||Qt(c),C.effects=[],y&&t&&t.pendingBranch&&g===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),wn(o,"onResolve")},fallback(e){if(!C.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,namespace:s}=C;wn(t,"onFallback");const i=h(n),a=()=>{C.isInFallback&&(p(null,e,r,i,o,null,s,l,c),Rn(C,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),C.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){C.activeBranch&&f(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&h(C.activeBranch),registerDep(e,t){const n=!!C.pendingBranch;n&&C.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{Dt(t,e,0)})).then((r=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;ms(e,r,!1),o&&(s.el=o);const l=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),C,i,c),l&&v(l),gn(e,s.el),n&&0==--C.deps&&C.resolve()}))},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&d(C.activeBranch,n,e,t),C.pendingBranch&&d(C.pendingBranch,n,e,t)}};return C}function An(e){let t;if(v(e)){const n=Br&&e._c;n&&(e._d=!1,Ir()),e=e(),n&&(e._d=!0,t=Mr,Vr())}if(f(e)){const t=function(e,t=!0){let n;for(let o=0;o<e.length;o++){const t=e[o];if(!jr(t))return;if(t.type!==Fr||"v-if"===t.children){if(n)return;n=t}}return n}(e);e=t}return e=Zr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Tn(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):Qt(e)}function Rn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,gn(o,r))}const Nn=Symbol.for("v-scx");function On(e,t){return Mn(e,null,{flush:"post"})}function Fn(e,t){return Mn(e,null,{flush:"sync"})}const Ln={};function Pn(e,t,n){return Mn(e,t,n)}function Mn(e,t,{immediate:o,deep:s,flush:i,once:l}=n){if(t&&l){const e=t;t=(...t)=>{e(...t),S()}}const c=ss,u=e=>!0===s?e:Bn(e,!1===s?1:void 0);let p,d,h=!1,m=!1;if(kt(e)?(p=()=>e.value,h=gt(e)):mt(e)?(p=()=>u(e),h=!0):f(e)?(m=!0,h=e.some((e=>mt(e)||gt(e))),p=()=>e.map((e=>kt(e)?e.value:mt(e)?u(e):v(e)?Bt(e,c,2):void 0))):p=v(e)?t?()=>Bt(e,c,2):()=>(d&&d(),Ut(e,c,3,[g])):r,t&&s){const e=p;p=()=>Bn(e())}let g=e=>{d=C.onStop=()=>{Bt(e,c,4),d=C.onStop=void 0}},y=m?new Array(e.length).fill(Ln):Ln;const _=()=>{if(C.active&&C.dirty)if(t){const e=C.run();(s||h||(m?e.some(((e,t)=>P(e,y[t]))):P(e,y)))&&(d&&d(),Ut(t,c,3,[e,y===Ln?void 0:m&&y[0]===Ln?[]:y,g]),y=e)}else C.run()};let b;_.allowRecurse=!!t,"sync"===i?b=_:"post"===i?b=()=>hr(_,c&&c.suspense):(_.pre=!0,c&&(_.id=c.uid),b=()=>Yt(_));const C=new se(p,r,b),x=re(),S=()=>{C.stop(),x&&a(x.effects,C)};return t?o?_():y=C.run():"post"===i?hr(C.run.bind(C),c&&c.suspense):C.run(),S}function In(e,t,n){const o=this.proxy,r=g(e)?e.includes(".")?Vn(o,e):()=>o[e]:e.bind(o,o);let s;v(t)?s=t:(s=t.handler,n=t);const i=as(this),l=Mn(r,s.bind(o),n);return i(),l}function Vn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Bn(e,t,n=0,o){if(!_(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),kt(e))Bn(e.value,t,n,o);else if(f(e))for(let r=0;r<e.length;r++)Bn(e[r],t,n,o);else if(h(e)||d(e))e.forEach((e=>{Bn(e,t,n,o)}));else if(E(e))for(const r in e)Bn(e[r],t,n,o);return e}function Un(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let c=l.dir[o];c&&(de(),Ut(c,n,8,[e.el,l,e,t]),he())}}const Dn=Symbol("_leaveCb"),$n=Symbol("_enterCb");function jn(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ho((()=>{e.isMounted=!0})),go((()=>{e.isUnmounting=!0})),e}const Hn=[Function,Array],Wn={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Hn,onEnter:Hn,onAfterEnter:Hn,onEnterCancelled:Hn,onBeforeLeave:Hn,onLeave:Hn,onAfterLeave:Hn,onLeaveCancelled:Hn,onBeforeAppear:Hn,onAppear:Hn,onAfterAppear:Hn,onAppearCancelled:Hn},Kn={name:"BaseTransition",props:Wn,setup(e,{slots:t}){const n=is(),o=jn();let r;return()=>{const s=t.default&&Yn(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1)for(const e of s)if(e.type!==Fr){i=e;break}const l=_t(e),{mode:c}=l;if(o.isLeaving)return qn(i);const a=Jn(i);if(!a)return qn(i);const u=Gn(a,l,o,n);Xn(a,u);const p=n.subTree,f=p&&Jn(p);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(f&&f.type!==Fr&&(!Hr(a,f)||d)){const e=Gn(f,l,o,n);if(Xn(f,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},qn(i);"in-out"===c&&a.type!==Fr&&(e.delayLeave=(e,t,n)=>{zn(o,f)[String(f.key)]=f,e[Dn]=()=>{t(),e[Dn]=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function zn(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Gn(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:v,onAppear:g,onAfterAppear:y,onAppearCancelled:_}=t,b=String(e.key),C=zn(n,e),x=(e,t)=>{e&&Ut(e,o,9,t)},S=(e,t)=>{const n=t[1];x(e,t),f(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},E={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=v||l}t[Dn]&&t[Dn](!0);const s=C[b];s&&Hr(e,s)&&s.el[Dn]&&s.el[Dn](),x(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=g||c,o=y||a,s=_||u}let i=!1;const l=e[$n]=t=>{i||(i=!0,x(t?s:o,[e]),E.delayedLeave&&E.delayedLeave(),e[$n]=void 0)};t?S(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t[$n]&&t[$n](!0),n.isUnmounting)return o();x(p,[t]);let s=!1;const i=t[Dn]=n=>{s||(s=!0,o(),x(n?m:h,[t]),t[Dn]=void 0,C[r]===e&&delete C[r])};C[r]=e,d?S(d,[t,i]):i()},clone:e=>Gn(e,t,n,o)};return E}function qn(e){if(to(e))return(e=Xr(e)).children=null,e}function Jn(e){return to(e)?e.children?e.children[0]:void 0:e}function Xn(e,t){6&e.shapeFlag&&e.component?Xn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Yn(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let i=e[s];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:s);i.type===Nr?(128&i.patchFlag&&r++,o=o.concat(Yn(i.children,t,l))):(t||i.type!==Fr)&&o.push(null!=l?Xr(i,{key:l}):i)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o} +/*! #__NO_SIDE_EFFECTS__ */function Zn(e,t){return v(e)?(()=>c({name:e.name},t,{setup:e}))():e}const Qn=e=>!!e.type.__asyncLoader +/*! #__NO_SIDE_EFFECTS__ */;function eo(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=qr(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const to=e=>e.type.__isKeepAlive,no={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=is(),o=n.ctx,r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:p}}}=o,f=p("div");function d(e){co(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=_s(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);i&&Hr(t,i)?i&&co(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),hr((()=>{s.isDeactivated=!1,s.a&&M(s.a);const t=e.props&&e.props.onVnodeMounted;t&&ns(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;a(e,f,null,1,l),hr((()=>{t.da&&M(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&ns(n,t.parent,e),t.isDeactivated=!0}),l)},Pn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>oo(e,t))),t&&h((e=>!oo(t,e)))}),{flush:"post",deep:!0});let v=null;const g=()=>{null!=v&&r.set(v,ao(n.subTree))};return ho(g),vo(g),go((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=ao(t);if(e.type!==r.type||e.key!==r.key)d(e);else{co(r);const e=r.component.da;e&&hr(e,o)}}))})),()=>{if(v=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!(jr(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let l=ao(o);const c=l.type,a=_s(Qn(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:p,max:f}=e;if(u&&(!a||!oo(u,a))||p&&a&&oo(p,a))return i=l,o;const d=null==l.key?c:l.key,h=r.get(d);return l.el&&(l=Xr(l),128&o.shapeFlag&&(o.ssContent=l)),v=d,h?(l.el=h.el,l.component=h.component,l.transition&&Xn(l,l.transition),l.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),f&&s.size>parseInt(f,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,xn(o.type)?o:l}}};function oo(e,t){return f(e)?e.some((e=>oo(e,t))):g(e)?e.split(",").includes(t):"[object RegExp]"===x(e)&&e.test(t)}function ro(e,t){io(e,"a",t)}function so(e,t){io(e,"da",t)}function io(e,t,n=ss){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(uo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)to(e.parent.vnode)&&lo(o,t,n,e),e=e.parent}}function lo(e,t,n,o){const r=uo(t,e,o,!0);yo((()=>{a(o[t],r)}),n)}function co(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ao(e){return 128&e.shapeFlag?e.ssContent:e}function uo(e,t,n=ss,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;de();const r=as(n),s=Ut(t,n,e,o);return r(),he(),s});return o?r.unshift(s):r.push(s),s}}const po=e=>(t,n=ss)=>(!hs||"sp"===e)&&uo(e,((...e)=>t(...e)),n),fo=po("bm"),ho=po("m"),mo=po("bu"),vo=po("u"),go=po("bum"),yo=po("um"),_o=po("sp"),bo=po("rtg"),Co=po("rtc");function xo(e,t=ss){uo("ec",e,t)}function So(e){return e.some((e=>!jr(e)||e.type!==Fr&&!(e.type===Nr&&!So(e.children))))?e:null}const Eo=e=>e?ps(e)?ys(e)||e.proxy:Eo(e.parent):null,wo=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Eo(e.parent),$root:e=>Eo(e.root),$emit:e=>e.emit,$options:e=>Mo(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Yt(e.update)}),$nextTick:e=>e.n||(e.n=Xt.bind(e.proxy)),$watch:e=>In.bind(e)}),ko=(e,t)=>e!==n&&!e.__isScriptSetup&&p(e,t),Ao={get({_:e},t){const{ctx:o,setupState:r,data:s,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==t[0]){const c=l[t];if(void 0!==c)switch(c){case 1:return r[t];case 2:return s[t];case 4:return o[t];case 3:return i[t]}else{if(ko(r,t))return l[t]=1,r[t];if(s!==n&&p(s,t))return l[t]=2,s[t];if((u=e.propsOptions[0])&&p(u,t))return l[t]=3,i[t];if(o!==n&&p(o,t))return l[t]=4,o[t];Oo&&(l[t]=0)}}const f=wo[t];let d,h;return f?("$attrs"===t&&we(e,0,t),f(e)):(d=c.__cssModules)&&(d=d[t])?d:o!==n&&p(o,t)?(l[t]=4,o[t]):(h=a.config.globalProperties,p(h,t)?h[t]:void 0)},set({_:e},t,o){const{data:r,setupState:s,ctx:i}=e;return ko(s,t)?(s[t]=o,!0):r!==n&&p(r,t)?(r[t]=o,!0):!p(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=o,!0))},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:s,propsOptions:i}},l){let c;return!!o[l]||e!==n&&p(e,l)||ko(t,l)||(c=i[0])&&p(c,l)||p(r,l)||p(wo,l)||p(s.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:p(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},To=c({},Ao,{get(e,t){if(t!==Symbol.unscopables)return Ao.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!$(t)});function Ro(){const e=is();return e.setupContext||(e.setupContext=gs(e))}function No(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Oo=!0;function Fo(e){const t=Mo(e),n=e.proxy,o=e.ctx;Oo=!1,t.beforeCreate&&Lo(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:c,provide:a,inject:u,created:p,beforeMount:d,mounted:h,beforeUpdate:m,updated:g,activated:y,deactivated:b,beforeUnmount:C,unmounted:x,render:S,renderTracked:E,renderTriggered:w,errorCaptured:k,serverPrefetch:A,expose:T,inheritAttrs:R,components:N,directives:O}=t;if(u&&function(e,t,n=r){f(e)&&(e=Uo(e));for(const o in e){const n=e[o];let r;r=_(n)?"default"in n?qo(n.from||o,n.default,!0):qo(n.from||o):qo(n),kt(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(u,o,null),l)for(const r in l){const e=l[r];v(e)&&(o[r]=e.bind(n))}if(s){const t=s.call(n,n);_(t)&&(e.data=pt(t))}if(Oo=!0,i)for(const f in i){const e=i[f],t=v(e)?e.bind(n,n):v(e.get)?e.get.bind(n,n):r,s=!v(e)&&v(e.set)?e.set.bind(n):r,l=bs({get:t,set:s});Object.defineProperty(o,f,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const r in c)Po(c[r],o,n,r);if(a){const e=v(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Go(t,e[t])}))}function F(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&Lo(p,e,"c"),F(fo,d),F(ho,h),F(mo,m),F(vo,g),F(ro,y),F(so,b),F(xo,k),F(Co,E),F(bo,w),F(go,C),F(yo,x),F(_o,A),f(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===r&&(e.render=S),null!=R&&(e.inheritAttrs=R),N&&(e.components=N),O&&(e.directives=O)}function Lo(e,t,n){Ut(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Po(e,t,n,o){const r=o.includes(".")?Vn(n,o):()=>n[o];if(g(e)){const n=t[e];v(n)&&Pn(r,n)}else if(v(e))Pn(r,e.bind(n));else if(_(e))if(f(e))e.forEach((e=>Po(e,t,n,o)));else{const o=v(e.handler)?e.handler.bind(n):t[e.handler];v(o)&&Pn(r,o,e)}}function Mo(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>Io(c,e,i,!0))),Io(c,t,i)):c=t,_(t)&&s.set(t,c),c}function Io(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Io(e,s,n,!0),r&&r.forEach((t=>Io(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=Vo[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const Vo={data:Bo,props:jo,emits:jo,methods:$o,computed:$o,beforeCreate:Do,created:Do,beforeMount:Do,mounted:Do,beforeUpdate:Do,updated:Do,beforeDestroy:Do,beforeUnmount:Do,destroyed:Do,unmounted:Do,activated:Do,deactivated:Do,errorCaptured:Do,serverPrefetch:Do,components:$o,directives:$o,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const o in t)n[o]=Do(e[o],t[o]);return n},provide:Bo,inject:function(e,t){return $o(Uo(e),Uo(t))}};function Bo(e,t){return t?e?function(){return c(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Uo(e){if(f(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Do(e,t){return e?[...new Set([].concat(e,t))]:t}function $o(e,t){return e?c(Object.create(null),e,t):t}function jo(e,t){return e?f(e)&&f(t)?[...new Set([...e,...t])]:c(Object.create(null),No(e),No(null!=t?t:{})):t}function Ho(){return{app:null,config:{isNativeTag:s,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Wo=0;function Ko(e,t){return function(n,o=null){v(n)||(n=c({},n)),null==o||_(o)||(o=null);const r=Ho(),s=new WeakSet;let i=!1;const l=r.app={_uid:Wo++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Ss,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&v(e.install)?(s.add(e),e.install(l,...t)):v(e)&&(s.add(e),e(l,...t))),l),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),l),component:(e,t)=>t?(r.components[e]=t,l):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,l):r.directives[e],mount(s,c,a){if(!i){const u=qr(n,o);return u.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),c&&t?t(u,s):e(u,s,a),i=!0,l._container=s,s.__vue_app__=l,ys(u.component)||u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,l),runWithContext(e){zo=l;try{return e()}finally{zo=null}}};return l}}let zo=null;function Go(e,t){if(ss){let n=ss.provides;const o=ss.parent&&ss.parent.provides;o===n&&(n=ss.provides=Object.create(o)),n[e]=t}else;}function qo(e,t,n=!1){const o=ss||an;if(o||zo){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:zo._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&v(t)?t.call(o&&o.proxy):t}}function Jo(e,t,o,r){const[s,i]=e.propsOptions;let l,c=!1;if(t)for(let n in t){if(k(n))continue;const a=t[n];let u;s&&p(s,u=R(n))?i&&i.includes(u)?(l||(l={}))[u]=a:o[u]=a:cn(e.emitsOptions,n)||n in r&&a===r[n]||(r[n]=a,c=!0)}if(i){const t=_t(o),r=l||n;for(let n=0;n<i.length;n++){const l=i[n];o[l]=Xo(s,t,l,r[l],e,!p(r,l))}}return c}function Xo(e,t,n,o,r,s){const i=e[n];if(null!=i){const e=p(i,"default");if(e&&void 0===o){const e=i.default;if(i.type!==Function&&!i.skipFactory&&v(e)){const{propsDefaults:s}=r;if(n in s)o=s[n];else{const i=as(r);o=s[n]=e.call(null,t),i()}}else o=e}i[0]&&(s&&!e?o=!1:!i[1]||""!==o&&o!==O(n)||(o=!0))}return o}function Yo(e,t,r=!1){const s=t.propsCache,i=s.get(e);if(i)return i;const l=e.props,a={},u=[];let d=!1;if(!v(e)){const n=e=>{d=!0;const[n,o]=Yo(e,t,!0);c(a,n),o&&u.push(...o)};!r&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!l&&!d)return _(e)&&s.set(e,o),o;if(f(l))for(let o=0;o<l.length;o++){const e=R(l[o]);Zo(e)&&(a[e]=n)}else if(l)for(const n in l){const e=R(n);if(Zo(e)){const t=l[n],o=a[e]=f(t)||v(t)?{type:t}:c({},t);if(o){const t=tr(Boolean,o.type),n=tr(String,o.type);o[0]=t>-1,o[1]=n<0||t<n,(t>-1||p(o,"default"))&&u.push(e)}}}const h=[a,u];return _(e)&&s.set(e,h),h}function Zo(e){return"$"!==e[0]}function Qo(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function er(e,t){return Qo(e)===Qo(t)}function tr(e,t){return f(t)?t.findIndex((t=>er(t,e))):v(t)&&er(t,e)?0:-1}const nr=e=>"_"===e[0]||"$stable"===e,or=e=>f(e)?e.map(Zr):[Zr(e)],rr=(e,t,n)=>{if(t._n)return t;const o=fn(((...e)=>or(t(...e))),n);return o._c=!1,o},sr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(nr(r))continue;const n=e[r];if(v(n))t[r]=rr(0,n,o);else if(null!=n){const e=or(n);t[r]=()=>e}}},ir=(e,t)=>{const n=or(t);e.slots.default=()=>n},lr=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=_t(t),I(t,"_",n)):sr(t,e.slots={})}else e.slots={},t&&ir(e,t);I(e.slots,Wr,1)},cr=(e,t,o)=>{const{vnode:r,slots:s}=e;let i=!0,l=n;if(32&r.shapeFlag){const e=t._;e?o&&1===e?i=!1:(c(s,t),o||1!==e||delete s._):(i=!t.$stable,sr(t,s)),l=t}else t&&(ir(e,t),l={default:1});if(i)for(const n in s)nr(n)||null!=l[n]||delete s[n]};function ar(e,t,o,r,s=!1){if(f(e))return void e.forEach(((e,n)=>ar(e,t&&(f(t)?t[n]:t),o,r,s)));if(Qn(r)&&!s)return;const i=4&r.shapeFlag?ys(r.component)||r.component.proxy:r.el,l=s?null:i,{i:c,r:u}=e,d=t&&t.r,h=c.refs===n?c.refs={}:c.refs,m=c.setupState;if(null!=d&&d!==u&&(g(d)?(h[d]=null,p(m,d)&&(m[d]=null)):kt(d)&&(d.value=null)),v(u))Bt(u,c,12,[l,h]);else{const t=g(u),n=kt(u),r=e.f;if(t||n){const c=()=>{if(r){const n=t?p(m,u)?m[u]:h[u]:u.value;s?f(n)&&a(n,i):f(n)?n.includes(i)||n.push(i):t?(h[u]=[i],p(m,u)&&(m[u]=h[u])):(u.value=[i],e.k&&(h[e.k]=u.value))}else t?(h[u]=l,p(m,u)&&(m[u]=l)):n&&(u.value=l,e.k&&(h[e.k]=l))};s||r?c():(c.id=-1,hr(c,o))}}}let ur=!1;const pr=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,fr=e=>8===e.nodeType;function dr(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:l,remove:c,insert:a,createComment:u}}=e,p=(n,o,i,c,u,_=!1)=>{const b=fr(n)&&"["===n.data,C=()=>m(n,o,i,c,u,b),{type:x,ref:S,shapeFlag:E,patchFlag:w}=o;let k=n.nodeType;o.el=n,-2===w&&(_=!1,o.dynamicChildren=null);let A=null;switch(x){case Or:3!==k?""===o.children?(a(o.el=r(""),l(n),n),A=n):A=C():(n.data!==o.children&&(ur=!0,n.data=o.children),A=s(n));break;case Fr:y(n)?(A=s(n),g(o.el=n.content.firstChild,n,i)):A=8!==k||b?C():s(n);break;case Lr:if(b&&(k=(n=s(n)).nodeType),1===k||3===k){A=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=1===A.nodeType?A.outerHTML:A.data),t===o.staticCount-1&&(o.anchor=A),A=s(A);return b?s(A):A}C();break;case Nr:A=b?h(n,o,i,c,u,_):C();break;default:if(1&E)A=1===k&&o.type.toLowerCase()===n.tagName.toLowerCase()||y(n)?f(n,o,i,c,u,_):C();else if(6&E){o.slotScopeIds=u;const e=l(n);if(A=b?v(n):fr(n)&&"teleport start"===n.data?v(n,n.data,"teleport end"):s(n),t(o,e,null,i,c,pr(e),_),Qn(o)){let t;b?(t=qr(Nr),t.anchor=A?A.previousSibling:e.lastChild):t=3===n.nodeType?Yr(""):qr("div"),t.el=n,o.component.subTree=t}}else 64&E?A=8!==k?C():o.type.hydrate(n,o,i,c,u,_,e,d):128&E&&(A=o.type.hydrate(n,o,i,c,pr(l(n)),u,_,e,p))}return null!=S&&ar(S,null,c,o),A},f=(e,t,n,r,s,l)=>{l=l||!!t.dynamicChildren;const{type:a,props:u,patchFlag:p,shapeFlag:f,dirs:h,transition:m}=t,v="input"===a||"option"===a;if(v||-1!==p){h&&Un(t,null,n,"created");let a,_=!1;if(y(e)){_=br(r,m)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;_&&m.beforeEnter(o),g(o,e,n),t.el=e=o}if(16&f&&(!u||!u.innerHTML&&!u.textContent)){let o=d(e.firstChild,t,e,n,r,s,l);for(;o;){ur=!0;const e=o;o=o.nextSibling,c(e)}}else 8&f&&e.textContent!==t.children&&(ur=!0,e.textContent=t.children);if(u)if(v||!l||48&p)for(const t in u)(v&&(t.endsWith("value")||"indeterminate"===t)||i(t)&&!k(t)||"."===t[0])&&o(e,t,null,u[t],void 0,void 0,n);else u.onClick&&o(e,"onClick",null,u.onClick,void 0,void 0,n);(a=u&&u.onVnodeBeforeMount)&&ns(a,n,t),h&&Un(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||h||_)&&Tn((()=>{a&&ns(a,n,t),_&&m.enter(e),h&&Un(t,null,n,"mounted")}),r)}return e.nextSibling},d=(e,t,o,r,s,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let u=0;u<a;u++){const t=l?c[u]:c[u]=Zr(c[u]);if(e)e=p(e,t,r,s,i,l);else{if(t.type===Or&&!t.children)continue;ur=!0,n(null,t,o,null,r,s,pr(o),i)}}return e},h=(e,t,n,o,r,i)=>{const{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);const p=l(e),f=d(s(e),t,p,n,o,r,i);return f&&fr(f)&&"]"===f.data?s(t.anchor=f):(ur=!0,a(t.anchor=u("]"),p,f),f)},m=(e,t,o,r,i,a)=>{if(ur=!0,t.el=null,a){const t=v(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const u=s(e),p=l(e);return c(e),n(null,t,p,u,o,r,pr(p),i),u},v=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=s(e))&&fr(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return s(e);o--}return e},g=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},y=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),tn(),void(t._vnode=e);ur=!1,p(t.firstChild,e,null,null,null),tn(),t._vnode=e,ur&&console.error("Hydration completed but contains mismatches.")},p]}const hr=Tn;function mr(e){return gr(e)}function vr(e){return gr(e,dr)}function gr(e,t){D().__VUE__=!0;const{insert:s,remove:i,patchProp:l,createElement:c,createText:a,createComment:u,setText:f,setElementText:d,parentNode:h,nextSibling:m,setScopeId:v=r,insertStaticContent:g}=e,y=(e,t,n,o=null,r=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Hr(e,t)&&(o=Y(e),z(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:p}=t;switch(a){case Or:_(e,t,n,o);break;case Fr:C(e,t,n,o);break;case Lr:null==e&&x(t,n,o,i);break;case Nr:L(e,t,n,o,r,s,i,l,c);break;default:1&p?S(e,t,n,o,r,s,i,l,c):6&p?P(e,t,n,o,r,s,i,l,c):(64&p||128&p)&&a.process(e,t,n,o,r,s,i,l,c,ee)}null!=u&&r&&ar(u,e&&e.ref,s,t||e,!t)},_=(e,t,n,o)=>{if(null==e)s(t.el=a(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},C=(e,t,n,o)=>{null==e?s(t.el=u(t.children||""),n,o):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=g(e.children,t,n,o,e.el,e.anchor)},S=(e,t,n,o,r,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?E(t,n,o,r,s,i,l,c):T(e,t,r,s,i,l,c)},E=(e,t,n,o,r,i,a,u)=>{let p,f;const{props:h,shapeFlag:m,transition:v,dirs:g}=e;if(p=e.el=c(e.type,i,h&&h.is,h),8&m?d(p,e.children):16&m&&A(e.children,p,null,o,r,yr(e,i),a,u),g&&Un(e,null,o,"created"),w(p,e,e.scopeId,a,o),h){for(const t in h)"value"===t||k(t)||l(p,t,null,h[t],i,e.children,o,r,X);"value"in h&&l(p,"value",null,h.value,i),(f=h.onVnodeBeforeMount)&&ns(f,o,e)}g&&Un(e,null,o,"beforeMount");const y=br(r,v);y&&v.beforeEnter(p),s(p,t,n),((f=h&&h.onVnodeMounted)||y||g)&&hr((()=>{f&&ns(f,o,e),y&&v.enter(p),g&&Un(e,null,o,"mounted")}),r)},w=(e,t,n,o,r)=>{if(n&&v(e,n),o)for(let s=0;s<o.length;s++)v(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;w(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},A=(e,t,n,o,r,s,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?Qr(e[a]):Zr(e[a]);y(null,c,t,n,o,r,s,i,l)}},T=(e,t,o,r,s,i,c)=>{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:p,dirs:f}=t;u|=16&e.patchFlag;const h=e.props||n,m=t.props||n;let v;if(o&&_r(o,!1),(v=m.onVnodeBeforeUpdate)&&ns(v,o,t,e),f&&Un(t,e,o,"beforeUpdate"),o&&_r(o,!0),p?N(e.dynamicChildren,p,a,o,r,yr(t,s),i):c||j(e,t,a,null,o,r,yr(t,s),i,!1),u>0){if(16&u)F(a,t,h,m,o,r,s);else if(2&u&&h.class!==m.class&&l(a,"class",null,m.class,s),4&u&&l(a,"style",h.style,m.style,s),8&u){const n=t.dynamicProps;for(let t=0;t<n.length;t++){const i=n[t],c=h[i],u=m[i];u===c&&"value"!==i||l(a,i,c,u,s,e.children,o,r,X)}}1&u&&e.children!==t.children&&d(a,t.children)}else c||null!=p||F(a,t,h,m,o,r,s);((v=m.onVnodeUpdated)||f)&&hr((()=>{v&&ns(v,o,t,e),f&&Un(t,e,o,"updated")}),r)},N=(e,t,n,o,r,s,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],u=c.el&&(c.type===Nr||!Hr(c,a)||70&c.shapeFlag)?h(c.el):n;y(c,a,u,null,o,r,s,i,!0)}},F=(e,t,o,r,s,i,c)=>{if(o!==r){if(o!==n)for(const n in o)k(n)||n in r||l(e,n,o[n],null,c,t.children,s,i,X);for(const n in r){if(k(n))continue;const a=r[n],u=o[n];a!==u&&"value"!==n&&l(e,n,u,a,c,t.children,s,i,X)}"value"in r&&l(e,"value",o.value,r.value,c)}},L=(e,t,n,o,r,i,l,c,u)=>{const p=t.el=e?e.el:a(""),f=t.anchor=e?e.anchor:a("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(s(p,n,o),s(f,n,o),A(t.children||[],n,f,r,i,l,c,u)):d>0&&64&d&&h&&e.dynamicChildren?(N(e.dynamicChildren,h,n,r,i,l,c),(null!=t.key||r&&t===r.subTree)&&Cr(e,t,!0)):j(e,t,n,f,r,i,l,c,u)},P=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):V(t,n,o,r,s,i,c):B(e,t,c)},V=(e,t,o,r,s,i,l)=>{const c=e.component=function(e,t,o){const r=e.type,s=(t?t.appContext:e.appContext)||os,i={uid:rs++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new ne(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Yo(r,s),emitsOptions:ln(r,s),emit:null,emitted:null,propsDefaults:n,inheritAttrs:r.inheritAttrs,ctx:n,data:n,props:n,attrs:n,slots:n,refs:n,setupState:n,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=t?t.root:i,i.emit=sn.bind(null,i),e.ce&&e.ce(i);return i}(e,r,s);if(to(e)&&(c.ctx.renderer=ee),function(e,t=!1){t&&cs(t);const{props:n,children:o}=e.vnode,r=ps(e);(function(e,t,n,o=!1){const r={},s={};I(s,Wr,1),e.propsDefaults=Object.create(null),Jo(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);e.props=n?o?r:ft(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),lr(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=bt(new Proxy(e.ctx,Ao));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?gs(e):null,r=as(e);de();const s=Bt(o,e,0,[e.props,n]);if(he(),r(),b(s)){if(s.then(us,us),t)return s.then((n=>{ms(e,n,t)})).catch((t=>{Dt(t,e,0)}));e.asyncDep=s}else ms(e,s,t)}else vs(e,t)}(e,t):void 0;t&&cs(!1)}(c),c.asyncDep){if(s&&s.registerDep(c,U),!e.el){const e=c.subTree=qr(Fr);C(null,e,t,o)}}else U(c,e,t,o,s,i,l)},B=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||vn(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?vn(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==o[n]&&!cn(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void $(o,t,n);o.next=t,function(e){const t=Ht.indexOf(e);t>Wt&&Ht.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},U=(e,t,n,o,s,i,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:r,vnode:a}=e;{const n=xr(e);if(n)return t&&(t.el=a.el,$(e,t,l)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,p=t;_r(e,!1),t?(t.el=a.el,$(e,t,l)):t=a,n&&M(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&ns(u,r,t,a),_r(e,!0);const f=dn(e),d=e.subTree;e.subTree=f,y(d,f,h(d.el),Y(d),e,s,i),t.el=f.el,null===p&&gn(e,f.el),o&&hr(o,s),(u=t.props&&t.props.onVnodeUpdated)&&hr((()=>ns(u,r,t,a)),s)}else{let r;const{el:l,props:c}=t,{bm:a,m:u,parent:p}=e,f=Qn(t);if(_r(e,!1),a&&M(a),!f&&(r=c&&c.onVnodeBeforeMount)&&ns(r,p,t),_r(e,!0),l&&oe){const n=()=>{e.subTree=dn(e),oe(l,e.subTree,e,s,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const r=e.subTree=dn(e);y(null,r,n,o,e,s,i),t.el=r.el}if(u&&hr(u,s),!f&&(r=c&&c.onVnodeMounted)){const e=t;hr((()=>ns(r,p,e)),s)}(256&t.shapeFlag||p&&Qn(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&hr(e.a,s),e.isMounted=!0,t=n=o=null}},a=e.effect=new se(c,r,(()=>Yt(u)),e.scope),u=e.update=()=>{a.dirty&&a.run()};u.id=e.uid,_r(e,!0),u()},$=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=_t(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;Jo(e,t,r,s)&&(a=!0);for(const s in l)t&&(p(t,s)||(o=O(s))!==s&&p(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Xo(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&p(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let i=n[o];if(cn(e.emitsOptions,i))continue;const u=t[i];if(c)if(p(s,i))u!==s[i]&&(s[i]=u,a=!0);else{const t=R(i);r[t]=Xo(c,l,t,u,e,!1)}else u!==s[i]&&(s[i]=u,a=!0)}}a&&ke(e,"set","$attrs")}(e,t.props,o,n),cr(e,t.children,n),de(),en(e),he()},j=(e,t,n,o,r,s,i,l,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,p=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f)return void W(a,p,n,o,r,s,i,l,c);if(256&f)return void H(a,p,n,o,r,s,i,l,c)}8&h?(16&u&&X(a,r,s),p!==a&&d(n,p)):16&u?16&h?W(a,p,n,o,r,s,i,l,c):X(a,r,s,!0):(8&u&&d(n,""),16&h&&A(p,n,o,r,s,i,l,c))},H=(e,t,n,r,s,i,l,c,a)=>{const u=(e=e||o).length,p=(t=t||o).length,f=Math.min(u,p);let d;for(d=0;d<f;d++){const o=t[d]=a?Qr(t[d]):Zr(t[d]);y(e[d],o,n,null,s,i,l,c,a)}u>p?X(e,s,i,!0,!1,f):A(t,n,r,s,i,l,c,a,f)},W=(e,t,n,r,s,i,l,c,a)=>{let u=0;const p=t.length;let f=e.length-1,d=p-1;for(;u<=f&&u<=d;){const o=e[u],r=t[u]=a?Qr(t[u]):Zr(t[u]);if(!Hr(o,r))break;y(o,r,n,null,s,i,l,c,a),u++}for(;u<=f&&u<=d;){const o=e[f],r=t[d]=a?Qr(t[d]):Zr(t[d]);if(!Hr(o,r))break;y(o,r,n,null,s,i,l,c,a),f--,d--}if(u>f){if(u<=d){const e=d+1,o=e<p?t[e].el:r;for(;u<=d;)y(null,t[u]=a?Qr(t[u]):Zr(t[u]),n,o,s,i,l,c,a),u++}}else if(u>d)for(;u<=f;)z(e[u],s,i,!0),u++;else{const h=u,m=u,v=new Map;for(u=m;u<=d;u++){const e=t[u]=a?Qr(t[u]):Zr(t[u]);null!=e.key&&v.set(e.key,u)}let g,_=0;const b=d-m+1;let C=!1,x=0;const S=new Array(b);for(u=0;u<b;u++)S[u]=0;for(u=h;u<=f;u++){const o=e[u];if(_>=b){z(o,s,i,!0);continue}let r;if(null!=o.key)r=v.get(o.key);else for(g=m;g<=d;g++)if(0===S[g-m]&&Hr(o,t[g])){r=g;break}void 0===r?z(o,s,i,!0):(S[r-m]=u+1,r>=x?x=r:C=!0,y(o,t[r],n,null,s,i,l,c,a),_++)}const E=C?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(S):o;for(g=E.length-1,u=b-1;u>=0;u--){const e=m+u,o=t[e],f=e+1<p?t[e+1].el:r;0===S[u]?y(null,o,n,f,s,i,l,c,a):C&&(g<0||u!==E[g]?K(o,n,f,2):g--)}}},K=(e,t,n,o,r=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void K(e.component.subTree,t,n,o);if(128&u)return void e.suspense.move(t,n,o);if(64&u)return void l.move(e,t,n,ee);if(l===Nr){s(i,t,n);for(let e=0;e<a.length;e++)K(a[e],t,n,o);return void s(e.anchor,t,n)}if(l===Lr)return void(({el:e,anchor:t},n,o)=>{let r;for(;e&&e!==t;)r=m(e),s(e,n,o),e=r;s(t,n,o)})(e,t,n);if(2!==o&&1&u&&c)if(0===o)c.beforeEnter(i),s(i,t,n),hr((()=>c.enter(i)),r);else{const{leave:e,delayLeave:o,afterLeave:r}=c,l=()=>s(i,t,n),a=()=>{e(i,(()=>{l(),r&&r()}))};o?o(i,l,a):a()}else s(i,t,n)},z=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:p,dirs:f}=e;if(null!=l&&ar(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&f,h=!Qn(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&ns(m,t,e),6&u)J(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&Un(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ee,o):a&&(s!==Nr||p>0&&64&p)?X(a,t,n,!1,!0):(s===Nr&&384&p||!r&&16&u)&&X(c,t,n),o&&G(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&hr((()=>{m&&ns(m,t,e),d&&Un(e,null,t,"unmounted")}),n)},G=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===Nr)return void q(n,o);if(t===Lr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)})(e);const s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,i=()=>t(n,s);o?o(e.el,s,i):i()}else s()},q=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},J=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&M(o),r.stop(),s&&(s.active=!1,z(i,e,t,n)),l&&hr(l,t),hr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i<e.length;i++)z(e[i],t,n,o,r)},Y=e=>6&e.shapeFlag?Y(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el);let Z=!1;const Q=(e,t,n)=>{null==e?t._vnode&&z(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,en(),tn(),Z=!1),t._vnode=e},ee={p:y,um:z,m:K,r:G,mt:V,mc:A,pc:j,pbc:N,n:Y,o:e};let te,oe;return t&&([te,oe]=t(ee)),{render:Q,hydrate:te,createApp:Ko(Q,te)}}function yr({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function _r({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function br(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cr(e,t,n=!1){const o=e.children,r=t.children;if(f(o)&&f(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=Qr(r[s]),t.el=e.el),n||Cr(e,t)),t.type===Or&&(t.el=e.el)}}function xr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:xr(t)}const Sr=e=>e&&(e.disabled||""===e.disabled),Er=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,wr=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,kr=(e,t)=>{const n=e&&e.to;if(g(n)){if(t){return t(n)}return null}return n};function Ar(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,p=2===s;if(p&&o(i,t,n),(!p||Sr(u))&&16&c)for(let f=0;f<a.length;f++)r(a[f],t,n,2);p&&o(l,t,n)}const Tr={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,s,i,l,c,a){const{mc:u,pc:p,pbc:f,o:{insert:d,querySelector:h,createText:m}}=a,v=Sr(t.props);let{shapeFlag:g,children:y,dynamicChildren:_}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");d(e,n,o),d(a,n,o);const p=t.target=kr(t.props,h),f=t.targetAnchor=m("");p&&(d(f,p),"svg"===i||Er(p)?i="svg":("mathml"===i||wr(p))&&(i="mathml"));const _=(e,t)=>{16&g&&u(y,e,t,r,s,i,l,c)};v?_(n,a):p&&_(p,f)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=Sr(e.props),g=m?n:u,y=m?o:d;if("svg"===i||Er(u)?i="svg":("mathml"===i||wr(u))&&(i="mathml"),_?(f(e.dynamicChildren,_,g,r,s,i,l),Cr(e,t,!0)):c||p(e,t,g,y,r,s,i,l,!1),v)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ar(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=kr(t.props,h);e&&Ar(t,e,null,a,0)}else m&&Ar(t,u,d,a,1)}Rr(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:p,props:f}=e;if(p&&s(u),i&&s(a),16&l){const e=i||!Sr(f);for(let o=0;o<c.length;o++){const s=c[o];r(s,t,n,e,!!s.dynamicChildren)}}},move:Ar,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=kr(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(Sr(t.props))t.anchor=a(i(e),t,l(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=i(e);let l=c;for(;l;)if(l=i(l),l&&8===l.nodeType&&"teleport anchor"===l.data){t.targetAnchor=l,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(c,t,u,n,o,r,s)}Rr(t)}return t.anchor&&i(t.anchor)}};function Rr(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const Nr=Symbol.for("v-fgt"),Or=Symbol.for("v-txt"),Fr=Symbol.for("v-cmt"),Lr=Symbol.for("v-stc"),Pr=[];let Mr=null;function Ir(e=!1){Pr.push(Mr=e?null:[])}function Vr(){Pr.pop(),Mr=Pr[Pr.length-1]||null}let Br=1;function Ur(e){Br+=e}function Dr(e){return e.dynamicChildren=Br>0?Mr||o:null,Vr(),Br>0&&Mr&&Mr.push(e),e}function $r(e,t,n,o,r){return Dr(qr(e,t,n,o,r,!0))}function jr(e){return!!e&&!0===e.__v_isVNode}function Hr(e,t){return e.type===t.type&&e.key===t.key}const Wr="__vInternal",Kr=({key:e})=>null!=e?e:null,zr=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?g(e)||kt(e)||v(e)?{i:an,r:e,k:t,f:!!n}:e:null);function Gr(e,t=null,n=null,o=0,r=null,s=(e===Nr?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Kr(t),ref:t&&zr(t),scopeId:un,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:an};return l?(es(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Br>0&&!i&&Mr&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Mr.push(c),c}const qr=function(e,t=null,n=null,o=0,r=null,s=!1){e&&e!==_n||(e=Fr);if(jr(e)){const o=Xr(e,t,!0);return n&&es(o,n),Br>0&&!s&&Mr&&(6&o.shapeFlag?Mr[Mr.indexOf(e)]=o:Mr.push(o)),o.patchFlag|=-2,o}i=e,v(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=Jr(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=G(e)),_(n)&&(yt(n)&&!f(n)&&(n=c({},n)),t.style=j(n))}const l=g(e)?1:xn(e)?128:(e=>e.__isTeleport)(e)?64:_(e)?4:v(e)?2:0;return Gr(e,t,n,o,r,l,s,!0)};function Jr(e){return e?yt(e)||Wr in e?c({},e):e:null}function Xr(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?ts(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Kr(l),ref:t&&t.ref?n&&r?f(r)?r.concat(zr(t)):[r,zr(t)]:zr(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Nr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Xr(e.ssContent),ssFallback:e.ssFallback&&Xr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Yr(e=" ",t=0){return qr(Or,null,e,t)}function Zr(e){return null==e||"boolean"==typeof e?qr(Fr):f(e)?qr(Nr,null,e.slice()):"object"==typeof e?Qr(e):qr(Or,null,String(e))}function Qr(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Xr(e)}function es(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),es(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Wr in t?3===o&&an&&(1===an.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=an}}else v(t)?(t={default:t,_ctx:an},n=32):(t=String(t),64&o?(n=16,t=[Yr(t)]):n=8);e.children=t,e.shapeFlag|=n}function ts(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=G([t.class,o.class]));else if("style"===e)t.style=j([t.style,o.style]);else if(i(e)){const n=t[e],r=o[e];!r||n===r||f(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function ns(e,t,n,o=null){Ut(e,t,7,[n,o])}const os=Ho();let rs=0;let ss=null;const is=()=>ss||an;let ls,cs;ls=e=>{ss=e},cs=e=>{hs=e};const as=e=>{const t=ss;return ls(e),e.scope.on(),()=>{e.scope.off(),ls(t)}},us=()=>{ss&&ss.scope.off(),ls(null)};function ps(e){return 4&e.vnode.shapeFlag}let fs,ds,hs=!1;function ms(e,t,n){v(t)?e.render=t:_(t)&&(e.setupState=Ft(t)),vs(e,n)}function vs(e,t,n){const o=e.type;if(!e.render){if(!t&&fs&&!o.render){const t=o.template||Mo(e).template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=c(c({isCustomElement:n,delimiters:s},r),i);o.render=fs(t,l)}}e.render=o.render||r,ds&&ds(e)}{const t=as(e);de();try{Fo(e)}finally{he(),t()}}}function gs(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(we(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function ys(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Ft(bt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in wo?wo[n](e):void 0,has:(e,t)=>t in e||t in wo}))}function _s(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}const bs=(e,t)=>function(e,t,n=!1){let o,s;const i=v(e);return i?(o=e,s=r):(o=e.get,s=e.set),new St(o,s,i||!s,n)}(e,0,hs);function Cs(e,t,n){const o=arguments.length;return 2===o?_(t)&&!f(t)?jr(t)?qr(e,null,[t]):qr(e,t):qr(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&jr(n)&&(n=[n]),qr(e,t,n))}function xs(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(P(n[o],t[o]))return!1;return Br>0&&Mr&&Mr.push(e),!0}const Ss="3.4.15",Es=r,ws=r,ks="undefined"!=typeof document?document:null,As=ks&&ks.createElement("template"),Ts={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?ks.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?ks.createElementNS("http://www.w3.org/1998/Math/MathML",e):ks.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>ks.createTextNode(e),createComment:e=>ks.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ks.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{As.innerHTML="svg"===o?`<svg>${e}</svg>`:"mathml"===o?`<math>${e}</math>`:e;const r=As.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Rs="transition",Ns="animation",Os=Symbol("_vtc"),Fs=(e,{slots:t})=>Cs(Kn,Vs(e),t);Fs.displayName="Transition";const Ls={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ps=Fs.props=c({},Wn,Ls),Ms=(e,t=[])=>{f(e)?e.forEach((e=>e(...t))):e&&e(...t)},Is=e=>!!e&&(f(e)?e.some((e=>e.length>1)):e.length>1);function Vs(e){const t={};for(const c in e)c in Ls||(t[c]=e[c]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=i,appearToClass:p=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(_(e))return[Bs(e.enter),Bs(e.leave)];{const t=Bs(e);return[t,t]}}(r),v=m&&m[0],g=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:C,onLeave:x,onLeaveCancelled:S,onBeforeAppear:E=y,onAppear:w=b,onAppearCancelled:k=C}=t,A=(e,t,n)=>{Ds(e,t?p:l),Ds(e,t?u:i),n&&n()},T=(e,t)=>{e._isLeaving=!1,Ds(e,f),Ds(e,h),Ds(e,d),t&&t()},R=e=>(t,n)=>{const r=e?w:b,i=()=>A(t,e,n);Ms(r,[t,i]),$s((()=>{Ds(t,e?a:s),Us(t,e?p:l),Is(r)||Hs(t,o,v,i)}))};return c(t,{onBeforeEnter(e){Ms(y,[e]),Us(e,s),Us(e,i)},onBeforeAppear(e){Ms(E,[e]),Us(e,a),Us(e,u)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>T(e,t);Us(e,f),Gs(),Us(e,d),$s((()=>{e._isLeaving&&(Ds(e,f),Us(e,h),Is(x)||Hs(e,o,g,n))})),Ms(x,[e,n])},onEnterCancelled(e){A(e,!1),Ms(C,[e])},onAppearCancelled(e){A(e,!0),Ms(k,[e])},onLeaveCancelled(e){T(e),Ms(S,[e])}})}function Bs(e){return B(e)}function Us(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Os]||(e[Os]=new Set)).add(t)}function Ds(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Os];n&&(n.delete(t),n.size||(e[Os]=void 0))}function $s(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let js=0;function Hs(e,t,n,o){const r=e._endId=++js,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=Ws(e,t);if(!i)return o();const a=i+"end";let u=0;const p=()=>{e.removeEventListener(a,f),s()},f=t=>{t.target===e&&++u>=c&&p()};setTimeout((()=>{u<c&&p()}),l+1),e.addEventListener(a,f)}function Ws(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o(`${Rs}Delay`),s=o(`${Rs}Duration`),i=Ks(r,s),l=o(`${Ns}Delay`),c=o(`${Ns}Duration`),a=Ks(l,c);let u=null,p=0,f=0;t===Rs?i>0&&(u=Rs,p=i,f=s.length):t===Ns?a>0&&(u=Ns,p=a,f=c.length):(p=Math.max(i,a),u=p>0?i>a?Rs:Ns:null,f=u?u===Rs?s.length:c.length:0);return{type:u,timeout:p,propCount:f,hasTransform:u===Rs&&/\b(transform|all)(,|$)/.test(o(`${Rs}Property`).toString())}}function Ks(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>zs(t)+zs(e[n]))))}function zs(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Gs(){return document.body.offsetHeight}const qs=Symbol("_vod"),Js={beforeMount(e,{value:t},{transition:n}){e[qs]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Xs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Xs(e,!0),o.enter(e)):o.leave(e,(()=>{Xs(e,!1)})):Xs(e,t))},beforeUnmount(e,{value:t}){Xs(e,t)}};function Xs(e,t){e.style.display=t?e[qs]:"none"}const Ys=Symbol("");function Zs(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Zs(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Qs(e.el,t);else if(e.type===Nr)e.children.forEach((e=>Zs(e,t)));else if(e.type===Lr){let{el:n,anchor:o}=e;for(;n&&(Qs(n,t),n!==o);)n=n.nextSibling}}function Qs(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t)n.setProperty(`--${e}`,t[e]),o+=`--${e}: ${t[e]};`;n[Ys]=o}}const ei=/\s*!important$/;function ti(e,t,n){if(f(n))n.forEach((n=>ti(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=oi[t];if(n)return n;let o=R(t);if("filter"!==o&&o in e)return oi[t]=o;o=F(o);for(let r=0;r<ni.length;r++){const n=ni[r]+o;if(n in e)return oi[t]=n}return t}(e,t);ei.test(n)?e.setProperty(O(o),n.replace(ei,""),"important"):e[o]=n}}const ni=["Webkit","Moz","ms"],oi={};const ri="http://www.w3.org/1999/xlink";function si(e,t,n,o){e.addEventListener(t,n,o)}const ii=Symbol("_vei");function li(e,t,n,o,r=null){const s=e[ii]||(e[ii]={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(ci.test(e)){let n;for(t={};n=e.match(ci);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):O(e.slice(2));return[n,t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Ut(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=pi(),n}(o,r);si(e,n,i,l)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}const ci=/(?:Once|Passive|Capture)$/;let ai=0;const ui=Promise.resolve(),pi=()=>ai||(ui.then((()=>ai=0)),ai=Date.now());const fi=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123; +/*! #__NO_SIDE_EFFECTS__ */ +function di(e,t){const n=Zn(e);class o extends mi{constructor(e){super(n,e,t)}}return o.def=n,o} +/*! #__NO_SIDE_EFFECTS__ */const hi="undefined"!=typeof HTMLElement?HTMLElement:class{};class mi extends hi{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),Xt((()=>{this._connected||(Gi(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:o}=e;let r;if(n&&!f(n))for(const s in n){const e=n[s];(e===Number||e&&e.type===Number)&&(s in this._props&&(this._props[s]=B(this._props[s])),(r||(r=Object.create(null)))[R(s)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=f(t)?t:Object.keys(t||{});for(const o of Object.keys(this))"_"!==o[0]&&n.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of n.map(R))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(e){this._setProp(o,e)}})}_setAttr(e){let t=this.getAttribute(e);const n=R(e);this._numberProps&&this._numberProps[n]&&(t=B(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(O(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(O(e),t+""):t||this.removeAttribute(O(e))))}_update(){Gi(this._createVNode(),this.shadowRoot)}_createVNode(){const e=qr(this._def,c({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),O(e)!==e&&t(O(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof mi){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}const vi=new WeakMap,gi=new WeakMap,yi=Symbol("_moveCb"),_i=Symbol("_enterCb"),bi={name:"TransitionGroup",props:c({},Ps,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=is(),o=jn();let r,s;return vo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),r=e[Os];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=Ws(o);return s.removeChild(o),i}(r[0].el,n.vnode.el,t))return;r.forEach(xi),r.forEach(Si);const o=r.filter(Ei);Gs(),o.forEach((e=>{const n=e.el,o=n.style;Us(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n[yi]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[yi]=null,Ds(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=_t(e),l=Vs(i);let c=i.tag||Nr;r=s,s=t.default?Yn(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&Xn(t,Gn(t,l,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];Xn(t,Gn(t,l,o,n)),vi.set(t,t.el.getBoundingClientRect())}return qr(c,null,s)}}},Ci=bi;function xi(e){const t=e.el;t[yi]&&t[yi](),t[_i]&&t[_i]()}function Si(e){gi.set(e,e.el.getBoundingClientRect())}function Ei(e){const t=vi.get(e),n=gi.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const wi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>M(t,e):t};function ki(e){e.target.composing=!0}function Ai(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ti=Symbol("_assign"),Ri={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Ti]=wi(r);const s=o||r.props&&"number"===r.props.type;si(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=V(o)),e[Ti](o)})),n&&si(e,"change",(()=>{e.value=e.value.trim()})),t||(si(e,"compositionstart",ki),si(e,"compositionend",Ai),si(e,"change",Ai))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e[Ti]=wi(s),e.composing)return;const i=null==t?"":t;if((r||"number"===e.type?V(e.value):e.value)!==i){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===i)return}e.value=i}}},Ni={deep:!0,created(e,t,n){e[Ti]=wi(n),si(e,"change",(()=>{const t=e._modelValue,n=Mi(e),o=e.checked,r=e[Ti];if(f(t)){const e=Y(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(h(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Ii(e,o))}))},mounted:Oi,beforeUpdate(e,t,n){e[Ti]=wi(n),Oi(e,t,n)}};function Oi(e,{value:t,oldValue:n},o){e._modelValue=t,f(t)?e.checked=Y(t,o.props.value)>-1:h(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=X(t,Ii(e,!0)))}const Fi={created(e,{value:t},n){e.checked=X(t,n.props.value),e[Ti]=wi(n),si(e,"change",(()=>{e[Ti](Mi(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[Ti]=wi(o),t!==n&&(e.checked=X(t,o.props.value))}},Li={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=h(t);si(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?V(Mi(e)):Mi(e)));e[Ti](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,Xt((()=>{e._assigning=!1}))})),e[Ti]=wi(o)},mounted(e,{value:t,oldValue:n,modifiers:{number:o}}){Pi(e,t,n,o)},beforeUpdate(e,t,n){e[Ti]=wi(n)},updated(e,{value:t,oldValue:n,modifiers:{number:o}}){e._assigning||Pi(e,t,n,o)}};function Pi(e,t,n,o){const r=e.multiple,s=f(t);if((!r||s||h(t))&&(!s||!X(t,n))){for(let n=0,i=e.options.length;n<i;n++){const i=e.options[n],l=Mi(i);if(r)if(s){const e=typeof l;i.selected="string"===e||"number"===e?t.includes(o?V(l):l):Y(t,l)>-1}else i.selected=t.has(l);else if(X(Mi(i),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}r||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Mi(e){return"_value"in e?e._value:e.value}function Ii(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Vi={created(e,t,n){Bi(e,t,n,null,"created")},mounted(e,t,n){Bi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Bi(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Bi(e,t,n,o,"updated")}};function Bi(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return Li;case"TEXTAREA":return Ri;default:switch(t){case"checkbox":return Ni;case"radio":return Fi;default:return Ri}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const Ui=["ctrl","shift","alt","meta"],Di={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ui.some((n=>e[`${n}Key`]&&!t.includes(n)))},$i={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ji=c({patchProp:(e,t,n,o,r,s,c,a,u)=>{const p="svg"===r;"class"===t?function(e,t,n){const o=e[Os];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,p):"style"===t?function(e,t,n){const o=e.style,r=o.display,s=g(n);if(n&&!s){if(t&&!g(t))for(const e in t)null==n[e]&&ti(o,e,"");for(const e in n)ti(o,e,n[e])}else if(s){if(t!==n){const e=o[Ys];e&&(n+=";"+e),o.cssText=n}}else t&&e.removeAttribute("style");qs in e&&(o.display=r)}(e,n,o):i(t)?l(t)||li(e,t,0,o,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&fi(t)&&v(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(fi(t)&&g(n))return!1;return t in e}(e,t,o,p))?function(e,t,n,o,r,s,i){if("innerHTML"===t||"textContent"===t)return o&&i(o,r,s),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=n;const o=null==n?"":n;return("OPTION"===l?e.getAttribute("value"):e.value)!==o&&(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=J(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,o,s,c,a,u):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o,r){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(ri,t.slice(6,t.length)):e.setAttributeNS(ri,t,n);else{const o=q(t);null==n||o&&!J(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,p))}},Ts);let Hi,Wi=!1;function Ki(){return Hi||(Hi=mr(ji))}function zi(){return Hi=Wi?Hi:vr(ji),Wi=!0,Hi}const Gi=(...e)=>{Ki().render(...e)},qi=(...e)=>{zi().hydrate(...e)};function Ji(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Xi(e){if(g(e)){return document.querySelector(e)}return e}const Yi=r;return e.BaseTransition=Kn,e.BaseTransitionPropsValidators=Wn,e.Comment=Fr,e.DeprecationTypes=null,e.EffectScope=ne,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},e.ErrorTypeStrings=null,e.Fragment=Nr,e.KeepAlive=no,e.ReactiveEffect=se,e.Static=Lr,e.Suspense=En,e.Teleport=Tr,e.Text=Or,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=Fs,e.TransitionGroup=Ci,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=mi,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=Ut,e.callWithErrorHandling=Bt,e.camelize=R,e.capitalize=F,e.cloneVNode=Xr,e.compatUtils=null,e.computed=bs,e.createApp=(...e)=>{const t=Ki().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Xi(e);if(!o)return;const r=t._component;v(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,Ji(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},e.createBlock=$r,e.createCommentVNode=function(e="",t=!1){return t?(Ir(),$r(Fr,null,e)):qr(Fr,null,e)},e.createElementBlock=function(e,t,n,o,r,s){return Dr(Gr(e,t,n,o,r,s,!0))},e.createElementVNode=Gr,e.createHydrationRenderer=vr,e.createPropsRestProxy=function(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n},e.createRenderer=mr,e.createSSRApp=(...e)=>{const t=zi().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Xi(e);if(t)return n(t,!0,Ji(t))},t},e.createSlots=function(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(f(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.key?(...e)=>{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e},e.createStaticVNode=function(e,t){const n=qr(Lr,null,e);return n.staticCount=t,n},e.createTextVNode=Yr,e.createVNode=qr,e.customRef=Pt,e.defineAsyncComponent=function(e){v(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const p=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,p()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return Zn({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return c},setup(){const e=ss;if(c)return()=>eo(c,e);const t=t=>{a=null,Dt(t,e,13,!o)};if(i&&e.suspense)return p().then((t=>()=>eo(t,e))).catch((e=>(t(e),()=>o?qr(o,{error:e}):null)));const l=At(!1),u=At(),f=At(!!r);return r&&setTimeout((()=>{f.value=!1}),r),null!=s&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),p().then((()=>{l.value=!0,e.parent&&to(e.parent.vnode)&&(e.parent.effect.dirty=!0,Yt(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?eo(c,e):u.value&&o?qr(o,{error:u.value}):n&&!f.value?qr(n):void 0}})},e.defineComponent=Zn,e.defineCustomElement=di,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=e=>di(e,qi),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof se&&(e=e.effect.fn);const n=new se(e,r,(()=>{n.dirty&&n.run()}));t&&(c(n,t),t.scope&&oe(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o},e.effectScope=function(e){return new ne(e)},e.getCurrentInstance=is,e.getCurrentScope=re,e.getTransitionRawChildren=Yn,e.guardReactiveProps=Jr,e.h=Cs,e.handleError=Dt,e.hasInjectionContext=function(){return!!(ss||an||zo)},e.hydrate=qi,e.initCustomFormatter=function(){},e.initDirectivesForSSR=Yi,e.inject=qo,e.isMemoSame=xs,e.isProxy=yt,e.isReactive=mt,e.isReadonly=vt,e.isRef=kt,e.isRuntimeOnly=()=>!fs,e.isShallow=gt,e.isVNode=jr,e.markRaw=bt,e.mergeDefaults=function(e,t){const n=No(e);for(const o in t){if(o.startsWith("__skip"))continue;let e=n[o];e?f(e)||v(e)?e=n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(e=n[o]={default:t[o]}),e&&t[`__skip_${o}`]&&(e.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?f(e)&&f(t)?e.concat(t):c({},No(e),No(t)):e||t},e.mergeProps=ts,e.nextTick=Xt,e.normalizeClass=G,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!g(t)&&(e.class=G(t)),n&&(e.style=j(n)),e},e.normalizeStyle=j,e.onActivated=ro,e.onBeforeMount=fo,e.onBeforeUnmount=go,e.onBeforeUpdate=mo,e.onDeactivated=so,e.onErrorCaptured=xo,e.onMounted=ho,e.onRenderTracked=Co,e.onRenderTriggered=bo,e.onScopeDispose=function(e){ee&&ee.cleanups.push(e)},e.onServerPrefetch=_o,e.onUnmounted=yo,e.onUpdated=vo,e.openBlock=Ir,e.popScopeId=function(){un=null},e.provide=Go,e.proxyRefs=Ft,e.pushScopeId=function(e){un=e},e.queuePostFlushCb=Qt,e.reactive=pt,e.readonly=dt,e.ref=At,e.registerRuntimeCompiler=function(e){fs=e,ds=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,To))}},e.render=Gi,e.renderList=function(e,t,n,o){let r;const s=n&&n[o];if(f(e)||g(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(_(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[o]=t(e[i],i,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r},e.renderSlot=function(e,t,n={},o,r){if(an.isCE||an.parent&&Qn(an.parent)&&an.parent.isCE)return"default"!==t&&(n.name=t),qr("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),Ir();const i=s&&So(s(n)),l=$r(Nr,{key:n.key||i&&i.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l},e.resolveComponent=function(e,t){return bn(yn,e,!0,t)||e},e.resolveDirective=function(e){return bn("directives",e)},e.resolveDynamicComponent=function(e){return g(e)?bn(yn,e,!1)||e:e||_n},e.resolveFilter=null,e.resolveTransitionHooks=Gn,e.setBlockTracking=Ur,e.setDevtoolsHook=ws,e.setTransitionHooks=Xn,e.shallowReactive=ft,e.shallowReadonly=function(e){return ht(e,!0,Be,it,ut)},e.shallowRef=function(e){return Tt(e,!0)},e.ssrContextKey=Nn,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=e=>g(e)?e:null==e?"":f(e)||_(e)&&(e.toString===C||!v(e.toString))?JSON.stringify(e,Z,2):String(e),e.toHandlerKey=L,e.toHandlers=function(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:L(o)]=e[o];return n},e.toRaw=_t,e.toRef=function(e,t,n){return kt(e)?e:v(e)?new It(e):_(e)&&arguments.length>1?Vt(e,t,n):At(e)},e.toRefs=function(e){const t=f(e)?new Array(e.length):{};for(const n in e)t[n]=Vt(e,n);return t},e.toValue=function(e){return v(e)?e():Nt(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){wt(e,2)},e.unref=Nt,e.useAttrs=function(){return Ro().attrs},e.useCssModule=function(e="$style"){return n},e.useCssVars=function(e){const t=is();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>Qs(e,n)))},o=()=>{const o=e(t.proxy);Zs(t.subTree,o),n(o)};On(o),ho((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),yo((()=>e.disconnect()))}))},e.useModel=function(e,t,o=n){const r=is(),s=R(t),i=O(t),l=Pt(((n,l)=>{let c;return Fn((()=>{const n=e[t];P(c,n)&&(c=n,l())})),{get:()=>(n(),o.get?o.get(c):c),set(e){const n=r.vnode.props;n&&(t in n||s in n||i in n)&&(`onUpdate:${t}`in n||`onUpdate:${s}`in n||`onUpdate:${i}`in n)||!P(e,c)||(c=e,l()),r.emit(`update:${t}`,o.set?o.set(e):e)}}})),c="modelValue"===t?"modelModifiers":`${t}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l},e.useSSRContext=()=>{},e.useSlots=function(){return Ro().slots},e.useTransitionState=jn,e.vModelCheckbox=Ni,e.vModelDynamic=Vi,e.vModelRadio=Fi,e.vModelSelect=Li,e.vModelText=Ri,e.vShow=Js,e.version=Ss,e.warn=Es,e.watch=Pn,e.watchEffect=function(e,t){return Mn(e,null,t)},e.watchPostEffect=On,e.watchSyncEffect=Fn,e.withAsyncContext=function(e){const t=is();let n=e();return us(),b(n)&&(n=n.catch((e=>{throw as(t),e}))),[n,()=>as(t)]},e.withCtx=fn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===an)return e;const o=ys(an)||an.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,i,l,c=n]=t[s];e&&(v(e)&&(e={mounted:e,updated:e}),e.deep&&Bn(i),r.push({dir:e,instance:o,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e},e.withKeys=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=O(n.key);return t.some((e=>e===o||$i[e]===o))?e(n):void 0})},e.withMemo=function(e,t,n,o){const r=n[o];if(r&&xs(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s},e.withModifiers=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e<t.length;e++){const o=Di[t[e]];if(o&&o(n,t))return}return e(n,...o)})},e.withScopeId=e=>fn,e}({}); diff --git a/node_modules/@vue/runtime-dom/package.json b/node_modules/@vue/runtime-dom/package.json index 15d6eed9..7175b058 100644 --- a/node_modules/@vue/runtime-dom/package.json +++ b/node_modules/@vue/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.2.36", + "version": "3.4.15", "description": "@vue/runtime-dom", "main": "index.js", "module": "dist/runtime-dom.esm-bundler.js", @@ -10,6 +10,20 @@ "index.js", "dist" ], + "exports": { + ".": { + "types": "./dist/runtime-dom.d.ts", + "node": { + "production": "./dist/runtime-dom.cjs.prod.js", + "development": "./dist/runtime-dom.cjs.js", + "default": "./index.js" + }, + "module": "./dist/runtime-dom.esm-bundler.js", + "import": "./dist/runtime-dom.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, "sideEffects": false, "buildOptions": { "name": "VueRuntimeDOM", @@ -35,8 +49,8 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme", "dependencies": { - "@vue/shared": "3.2.36", - "@vue/runtime-core": "3.2.36", - "csstype": "^2.6.8" + "csstype": "^3.1.3", + "@vue/shared": "3.4.15", + "@vue/runtime-core": "3.4.15" } -} +} \ No newline at end of file diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js b/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js index 9855af53..83ec15d2 100644 --- a/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js +++ b/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js @@ -1,999 +1,1086 @@ +/** +* @vue/server-renderer v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -var vue = require('vue'); +var Vue = require('vue'); var shared = require('@vue/shared'); var compilerSsr = require('@vue/compiler-ssr'); -// leading comma for empty string "" -const shouldIgnoreProp = shared.makeMap(`,key,ref,innerHTML,textContent,ref_key,ref_for`); +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + for (var k in e) { + n[k] = e[k]; + } + } + n.default = e; + return Object.freeze(n); +} + +var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue); + +const shouldIgnoreProp = shared.makeMap( + `,key,ref,innerHTML,textContent,ref_key,ref_for` +); function ssrRenderAttrs(props, tag) { - let ret = ''; - for (const key in props) { - if (shouldIgnoreProp(key) || - shared.isOn(key) || - (tag === 'textarea' && key === 'value')) { - continue; - } - const value = props[key]; - if (key === 'class') { - ret += ` class="${ssrRenderClass(value)}"`; - } - else if (key === 'style') { - ret += ` style="${ssrRenderStyle(value)}"`; - } - else { - ret += ssrRenderDynamicAttr(key, value, tag); - } + let ret = ""; + for (const key in props) { + if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value") { + continue; } - return ret; + const value = props[key]; + if (key === "class") { + ret += ` class="${ssrRenderClass(value)}"`; + } else if (key === "style") { + ret += ` style="${ssrRenderStyle(value)}"`; + } else { + ret += ssrRenderDynamicAttr(key, value, tag); + } + } + return ret; } -// render an attr with dynamic (unknown) key. function ssrRenderDynamicAttr(key, value, tag) { - if (!isRenderableValue(value)) { - return ``; - } - const attrKey = tag && tag.indexOf('-') > 0 - ? key // preserve raw name on custom elements - : shared.propsToAttrMap[key] || key.toLowerCase(); - if (shared.isBooleanAttr(attrKey)) { - return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``; - } - else if (shared.isSSRSafeAttrName(attrKey)) { - return value === '' ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`; - } - else { - console.warn(`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}`); - return ``; - } + if (!shared.isRenderableAttrValue(value)) { + return ``; + } + const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase(); + if (shared.isBooleanAttr(attrKey)) { + return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``; + } else if (shared.isSSRSafeAttrName(attrKey)) { + return value === "" ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`; + } else { + console.warn( + `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` + ); + return ``; + } } -// Render a v-bind attr with static key. The key is pre-processed at compile -// time and we only need to check and escape value. function ssrRenderAttr(key, value) { - if (!isRenderableValue(value)) { - return ``; - } - return ` ${key}="${shared.escapeHtml(value)}"`; -} -function isRenderableValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === 'string' || type === 'number' || type === 'boolean'; + if (!shared.isRenderableAttrValue(value)) { + return ``; + } + return ` ${key}="${shared.escapeHtml(value)}"`; } function ssrRenderClass(raw) { - return shared.escapeHtml(shared.normalizeClass(raw)); + return shared.escapeHtml(shared.normalizeClass(raw)); } function ssrRenderStyle(raw) { - if (!raw) { - return ''; - } - if (shared.isString(raw)) { - return shared.escapeHtml(raw); - } - const styles = shared.normalizeStyle(raw); - return shared.escapeHtml(shared.stringifyStyle(styles)); -} - -const compileCache = Object.create(null); -function ssrCompile(template, instance) { - // TODO: This is copied from runtime-core/src/component.ts and should probably be refactored - const Component = instance.type; - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = shared.extend(shared.extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - finalCompilerOptions.isCustomElement = - finalCompilerOptions.isCustomElement || shared.NO; - finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO; - const cacheKey = JSON.stringify({ - template, - compilerOptions: finalCompilerOptions - }, (key, value) => { - return shared.isFunction(value) ? value.toString() : value; - }); - const cached = compileCache[cacheKey]; - if (cached) { - return cached; - } - finalCompilerOptions.onError = (err) => { - { - const message = `[@vue/server-renderer] Template compilation error: ${err.message}`; - const codeFrame = err.loc && - shared.generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset); - vue.warn(codeFrame ? `${message}\n${codeFrame}` : message); - } - }; - const { code } = compilerSsr.compile(template, finalCompilerOptions); - return (compileCache[cacheKey] = Function('require', code)(require)); -} - -function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { - parentPush('<!--teleport start-->'); - const context = parentComponent.appContext.provides[vue.ssrContextKey]; - const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); - const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); - // record current index of the target buffer to handle nested teleports - // since the parent needs to be rendered before the child - const bufferIndex = targetBuffer.length; - let teleportContent; - if (disabled) { - contentRenderFn(parentPush); - teleportContent = `<!--teleport anchor-->`; - } - else { - const { getBuffer, push } = createBuffer(); - contentRenderFn(push); - push(`<!--teleport anchor-->`); - teleportContent = getBuffer(); - } - targetBuffer.splice(bufferIndex, 0, teleportContent); - parentPush('<!--teleport end-->'); -} - -const { createComponentInstance, setCurrentRenderingInstance, setupComponent, renderComponentRoot, normalizeVNode } = vue.ssrUtils; -// Each component has a buffer array. -// A buffer array can contain one of the following: -// - plain string -// - A resolved buffer (recursive arrays of strings that can be unrolled -// synchronously) -// - An async buffer (a Promise that resolves to a resolved buffer) -function createBuffer() { - let appendable = false; - const buffer = []; - return { - getBuffer() { - // Return static buffer and await on items during unroll stage - return buffer; - }, - push(item) { - const isStringItem = shared.isString(item); - if (appendable && isStringItem) { - buffer[buffer.length - 1] += item; - } - else { - buffer.push(item); - } - appendable = isStringItem; - if (shared.isPromise(item) || (shared.isArray(item) && item.hasAsync)) { - // promise, or child buffer with async, mark as async. - // this allows skipping unnecessary await ticks during unroll stage - buffer.hasAsync = true; - } - } - }; -} -function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { - const instance = createComponentInstance(vnode, parentComponent, null); - const res = setupComponent(instance, true /* isSSR */); - const hasAsyncSetup = shared.isPromise(res); - const prefetches = instance.sp; /* LifecycleHooks.SERVER_PREFETCH */ - if (hasAsyncSetup || prefetches) { - let p = hasAsyncSetup - ? res - : Promise.resolve(); - if (prefetches) { - p = p - .then(() => Promise.all(prefetches.map(prefetch => prefetch.call(instance.proxy)))) - // Note: error display is already done by the wrapped lifecycle hook function. - .catch(() => { }); - } - return p.then(() => renderComponentSubTree(instance, slotScopeId)); - } - else { - return renderComponentSubTree(instance, slotScopeId); - } -} -function renderComponentSubTree(instance, slotScopeId) { - const comp = instance.type; - const { getBuffer, push } = createBuffer(); - if (shared.isFunction(comp)) { - let root = renderComponentRoot(instance); - // #5817 scope ID attrs not falling through if functional component doesn't - // have props - if (!comp.props) { - for (const key in instance.attrs) { - if (key.startsWith(`data-v-`)) { - (root.props || (root.props = {}))[key] = ``; - } - } - } - renderVNode(push, (instance.subTree = root), instance, slotScopeId); - } - else { - if ((!instance.render || instance.render === shared.NOOP) && - !instance.ssrRender && - !comp.ssrRender && - shared.isString(comp.template)) { - comp.ssrRender = ssrCompile(comp.template, instance); - } - // perf: enable caching of computed getters during render - // since there cannot be state mutations during render. - for (const e of instance.scope.effects) { - if (e.computed) - e.computed._cacheable = true; - } - const ssrRender = instance.ssrRender || comp.ssrRender; - if (ssrRender) { - // optimized - // resolve fallthrough attrs - let attrs = instance.inheritAttrs !== false ? instance.attrs : undefined; - let hasCloned = false; - let cur = instance; - while (true) { - const scopeId = cur.vnode.scopeId; - if (scopeId) { - if (!hasCloned) { - attrs = { ...attrs }; - hasCloned = true; - } - attrs[scopeId] = ''; - } - const parent = cur.parent; - if (parent && parent.subTree && parent.subTree === cur.vnode) { - // parent is a non-SSR compiled component and is rendering this - // component as root. inherit its scopeId if present. - cur = parent; - } - else { - break; - } - } - if (slotScopeId) { - if (!hasCloned) - attrs = { ...attrs }; - attrs[slotScopeId.trim()] = ''; - } - // set current rendering instance for asset resolution - const prev = setCurrentRenderingInstance(instance); - ssrRender(instance.proxy, push, instance, attrs, - // compiler-optimized bindings - instance.props, instance.setupState, instance.data, instance.ctx); - setCurrentRenderingInstance(prev); - } - else if (instance.render && instance.render !== shared.NOOP) { - renderVNode(push, (instance.subTree = renderComponentRoot(instance)), instance, slotScopeId); - } - else { - const componentName = comp.name || comp.__file || `<Anonymous>`; - vue.warn(`Component ${componentName} is missing template or render function.`); - push(`<!---->`); - } - } - return getBuffer(); -} -function renderVNode(push, vnode, parentComponent, slotScopeId) { - const { type, shapeFlag, children } = vnode; - switch (type) { - case vue.Text: - push(shared.escapeHtml(children)); - break; - case vue.Comment: - push(children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->`); - break; - case vue.Static: - push(children); - break; - case vue.Fragment: - if (vnode.slotScopeIds) { - slotScopeId = - (slotScopeId ? slotScopeId + ' ' : '') + vnode.slotScopeIds.join(' '); - } - push(`<!--[-->`); // open - renderVNodeChildren(push, children, parentComponent, slotScopeId); - push(`<!--]-->`); // close - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - renderElementVNode(push, vnode, parentComponent, slotScopeId); - } - else if (shapeFlag & 6 /* COMPONENT */) { - push(renderComponentVNode(vnode, parentComponent, slotScopeId)); - } - else if (shapeFlag & 64 /* TELEPORT */) { - renderTeleportVNode(push, vnode, parentComponent, slotScopeId); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); - } - else { - vue.warn('[@vue/server-renderer] Invalid VNode type:', type, `(${typeof type})`); - } - } -} -function renderVNodeChildren(push, children, parentComponent, slotScopeId) { - for (let i = 0; i < children.length; i++) { - renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); - } -} -function renderElementVNode(push, vnode, parentComponent, slotScopeId) { - const tag = vnode.type; - let { props, children, shapeFlag, scopeId, dirs } = vnode; - let openTag = `<${tag}`; - if (dirs) { - props = applySSRDirectives(vnode, props, dirs); - } - if (props) { - openTag += ssrRenderAttrs(props, tag); - } - if (scopeId) { - openTag += ` ${scopeId}`; - } - // inherit parent chain scope id if this is the root node - let curParent = parentComponent; - let curVnode = vnode; - while (curParent && curVnode === curParent.subTree) { - curVnode = curParent.vnode; - if (curVnode.scopeId) { - openTag += ` ${curVnode.scopeId}`; - } - curParent = curParent.parent; - } - if (slotScopeId) { - openTag += ` ${slotScopeId}`; - } - push(openTag + `>`); - if (!shared.isVoidTag(tag)) { - let hasChildrenOverride = false; - if (props) { - if (props.innerHTML) { - hasChildrenOverride = true; - push(props.innerHTML); - } - else if (props.textContent) { - hasChildrenOverride = true; - push(shared.escapeHtml(props.textContent)); - } - else if (tag === 'textarea' && props.value) { - hasChildrenOverride = true; - push(shared.escapeHtml(props.value)); - } - } - if (!hasChildrenOverride) { - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - push(shared.escapeHtml(children)); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - renderVNodeChildren(push, children, parentComponent, slotScopeId); - } - } - push(`</${tag}>`); - } -} -function applySSRDirectives(vnode, rawProps, dirs) { - const toMerge = []; - for (let i = 0; i < dirs.length; i++) { - const binding = dirs[i]; - const { dir: { getSSRProps } } = binding; - if (getSSRProps) { - const props = getSSRProps(binding, vnode); - if (props) - toMerge.push(props); - } - } - return vue.mergeProps(rawProps || {}, ...toMerge); -} -function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { - const target = vnode.props && vnode.props.to; - const disabled = vnode.props && vnode.props.disabled; - if (!target) { - if (!disabled) { - vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`); - } - return []; - } - if (!shared.isString(target)) { - vue.warn(`[@vue/server-renderer] Teleport target must be a query selector string.`); - return []; - } - ssrRenderTeleport(push, push => { - renderVNodeChildren(push, vnode.children, parentComponent, slotScopeId); - }, target, disabled || disabled === '', parentComponent); -} - -const { isVNode } = vue.ssrUtils; -async function unrollBuffer(buffer) { - if (buffer.hasAsync) { - let ret = ''; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isPromise(item)) { - item = await item; - } - if (shared.isString(item)) { - ret += item; - } - else { - ret += await unrollBuffer(item); - } - } - return ret; - } - else { - // sync buffer can be more efficiently unrolled without unnecessary await - // ticks - return unrollBufferSync(buffer); - } -} -function unrollBufferSync(buffer) { - let ret = ''; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isString(item)) { - ret += item; - } - else { - // since this is a sync buffer, child buffers are never promises - ret += unrollBufferSync(item); - } - } - return ret; -} -async function renderToString(input, context = {}) { - if (isVNode(input)) { - // raw vnode, wrap with app (for context) - return renderToString(vue.createApp({ render: () => input }), context); - } - // rendering an app - const vnode = vue.createVNode(input._component, input._props); - vnode.appContext = input._context; - // provide the ssr context to the tree - input.provide(vue.ssrContextKey, context); - const buffer = await renderComponentVNode(vnode); - const result = await unrollBuffer(buffer); - await resolveTeleports(context); - return result; -} -async function resolveTeleports(context) { - if (context.__teleportBuffers) { - context.teleports = context.teleports || {}; - for (const key in context.__teleportBuffers) { - // note: it's OK to await sequentially here because the Promises were - // created eagerly in parallel. - context.teleports[key] = await unrollBuffer((await Promise.all(context.__teleportBuffers[key]))); - } - } -} - -const { isVNode: isVNode$1 } = vue.ssrUtils; -async function unrollBuffer$1(buffer, stream) { - if (buffer.hasAsync) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isPromise(item)) { - item = await item; - } - if (shared.isString(item)) { - stream.push(item); - } - else { - await unrollBuffer$1(item, stream); - } - } - } - else { - // sync buffer can be more efficiently unrolled without unnecessary await - // ticks - unrollBufferSync$1(buffer, stream); - } -} -function unrollBufferSync$1(buffer, stream) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isString(item)) { - stream.push(item); - } - else { - // since this is a sync buffer, child buffers are never promises - unrollBufferSync$1(item, stream); - } - } -} -function renderToSimpleStream(input, context, stream) { - if (isVNode$1(input)) { - // raw vnode, wrap with app (for context) - return renderToSimpleStream(vue.createApp({ render: () => input }), context, stream); - } - // rendering an app - const vnode = vue.createVNode(input._component, input._props); - vnode.appContext = input._context; - // provide the ssr context to the tree - input.provide(vue.ssrContextKey, context); - Promise.resolve(renderComponentVNode(vnode)) - .then(buffer => unrollBuffer$1(buffer, stream)) - .then(() => resolveTeleports(context)) - .then(() => stream.push(null)) - .catch(error => { - stream.destroy(error); - }); - return stream; -} -/** - * @deprecated - */ -function renderToStream(input, context = {}) { - console.warn(`[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.`); - return renderToNodeStream(input, context); -} -function renderToNodeStream(input, context = {}) { - const stream = new (require('stream').Readable)({ read() { } }) - ; - if (!stream) { - throw new Error(`ESM build of renderToStream() does not support renderToNodeStream(). ` + - `Use pipeToNodeWritable() with an existing Node.js Writable stream ` + - `instance instead.`); - } - return renderToSimpleStream(input, context, stream); -} -function pipeToNodeWritable(input, context = {}, writable) { - renderToSimpleStream(input, context, { - push(content) { - if (content != null) { - writable.write(content); - } - else { - writable.end(); - } - }, - destroy(err) { - writable.destroy(err); - } - }); -} -function renderToWebStream(input, context = {}) { - if (typeof ReadableStream !== 'function') { - throw new Error(`ReadableStream constructor is not available in the global scope. ` + - `If the target environment does support web streams, consider using ` + - `pipeToWebWritable() with an existing WritableStream instance instead.`); - } - const encoder = new TextEncoder(); - let cancelled = false; - return new ReadableStream({ - start(controller) { - renderToSimpleStream(input, context, { - push(content) { - if (cancelled) - return; - if (content != null) { - controller.enqueue(encoder.encode(content)); - } - else { - controller.close(); - } - }, - destroy(err) { - controller.error(err); - } - }); - }, - cancel() { - cancelled = true; - } - }); -} -function pipeToWebWritable(input, context = {}, writable) { - const writer = writable.getWriter(); - const encoder = new TextEncoder(); - // #4287 CloudFlare workers do not implement `ready` property - let hasReady = false; - try { - hasReady = shared.isPromise(writer.ready); - } - catch (e) { } - renderToSimpleStream(input, context, { - async push(content) { - if (hasReady) { - await writer.ready; - } - if (content != null) { - return writer.write(encoder.encode(content)); - } - else { - return writer.close(); - } - }, - destroy(err) { - // TODO better error handling? - console.log(err); - writer.close(); - } - }); + if (!raw) { + return ""; + } + if (shared.isString(raw)) { + return shared.escapeHtml(raw); + } + const styles = shared.normalizeStyle(raw); + return shared.escapeHtml(shared.stringifyStyle(styles)); } function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { - return renderComponentVNode(vue.createVNode(comp, props, children), parentComponent, slotScopeId); + return renderComponentVNode( + Vue.createVNode(comp, props, children), + parentComponent, + slotScopeId + ); } function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - // template-compiled slots are always rendered as fragments - push(`<!--[-->`); - ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId); - push(`<!--]-->`); + push(`<!--[-->`); + ssrRenderSlotInner( + slots, + slotName, + slotProps, + fallbackRenderFn, + push, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); } -function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - const slotFn = slots[slotName]; - if (slotFn) { - const slotBuffer = []; - const bufferedPush = (item) => { - slotBuffer.push(item); - }; - const ret = slotFn(slotProps, bufferedPush, parentComponent, slotScopeId ? ' ' + slotScopeId : ''); - if (shared.isArray(ret)) { - // normal slot - renderVNodeChildren(push, ret, parentComponent, slotScopeId); +function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { + const slotFn = slots[slotName]; + if (slotFn) { + const slotBuffer = []; + const bufferedPush = (item) => { + slotBuffer.push(item); + }; + const ret = slotFn( + slotProps, + bufferedPush, + parentComponent, + slotScopeId ? " " + slotScopeId : "" + ); + if (shared.isArray(ret)) { + renderVNodeChildren(push, ret, parentComponent, slotScopeId); + } else { + let isEmptySlot = true; + if (transition) { + isEmptySlot = false; + } else { + for (let i = 0; i < slotBuffer.length; i++) { + if (!isComment(slotBuffer[i])) { + isEmptySlot = false; + break; + } } - else { - // ssr slot. - // check if the slot renders all comments, in which case use the fallback - let isEmptySlot = true; - for (let i = 0; i < slotBuffer.length; i++) { - if (!isComment(slotBuffer[i])) { - isEmptySlot = false; - break; - } - } - if (isEmptySlot) { - if (fallbackRenderFn) { - fallbackRenderFn(); - } - } - else { - for (let i = 0; i < slotBuffer.length; i++) { - push(slotBuffer[i]); - } - } + } + if (isEmptySlot) { + if (fallbackRenderFn) { + fallbackRenderFn(); } + } else { + let start = 0; + let end = slotBuffer.length; + if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { + start++; + end--; + } + for (let i = start; i < end; i++) { + push(slotBuffer[i]); + } + } } - else if (fallbackRenderFn) { - fallbackRenderFn(); - } + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } } +const commentTestRE = /^<!--.*-->$/s; const commentRE = /<!--[^]*?-->/gm; function isComment(item) { - return (typeof item === 'string' && - commentRE.test(item) && - !item.replace(commentRE, '').trim()); + if (typeof item !== "string" || !commentTestRE.test(item)) + return false; + if (item.length <= 8) + return true; + return !item.replace(commentRE, "").trim(); +} + +function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { + parentPush("<!--teleport start-->"); + const context = parentComponent.appContext.provides[Vue.ssrContextKey]; + const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); + const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); + const bufferIndex = targetBuffer.length; + let teleportContent; + if (disabled) { + contentRenderFn(parentPush); + teleportContent = `<!--teleport anchor-->`; + } else { + const { getBuffer, push } = createBuffer(); + contentRenderFn(push); + push(`<!--teleport anchor-->`); + teleportContent = getBuffer(); + } + targetBuffer.splice(bufferIndex, 0, teleportContent); + parentPush("<!--teleport end-->"); } function ssrInterpolate(value) { - return shared.escapeHtml(shared.toDisplayString(value)); + return shared.escapeHtml(shared.toDisplayString(value)); +} + +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function isRef(r) { - return !!(r && r.__v_isRef === true); + return !!(r && r.__v_isRef === true); } const stack = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack.push(vnode); } function popWarningContext() { - stack.pop(); + stack.pop(); } -function warn(msg, ...args) { - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); - } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); +function warn$1(msg, ...args) { + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } -/* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } -/* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } -/* istanbul ignore next */ function formatProp(key, value, raw) { - if (shared.isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (shared.isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (shared.isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (shared.isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } } const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + { + const info = ErrorTypeStrings[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } } +{ + const g = shared.getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) + setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) + setters.forEach((set) => set(v)); + else + setters[0](v); + }; + }; + registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => v + ); + registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => v + ); +} const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); -function getComponentName(Component) { - return shared.isFunction(Component) - ? Component.displayName || Component.name - : Component.name; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return shared.isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } -/* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } +const warn = warn$1 ; + function ssrRenderList(source, renderItem) { - if (shared.isArray(source) || shared.isString(source)) { - for (let i = 0, l = source.length; i < l; i++) { - renderItem(source[i], i); - } + if (shared.isArray(source) || shared.isString(source)) { + for (let i = 0, l = source.length; i < l; i++) { + renderItem(source[i], i); } - else if (typeof source === 'number') { - if (!Number.isInteger(source)) { - warn(`The v-for range expect an integer value but got ${source}.`); - return; - } - for (let i = 0; i < source; i++) { - renderItem(i + 1, i); - } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn(`The v-for range expect an integer value but got ${source}.`); + return; } - else if (shared.isObject(source)) { - if (source[Symbol.iterator]) { - const arr = Array.from(source); - for (let i = 0, l = arr.length; i < l; i++) { - renderItem(arr[i], i); - } - } - else { - const keys = Object.keys(source); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - renderItem(source[key], key, i); - } - } + for (let i = 0; i < source; i++) { + renderItem(i + 1, i); } + } else if (shared.isObject(source)) { + if (source[Symbol.iterator]) { + const arr = Array.from(source); + for (let i = 0, l = arr.length; i < l; i++) { + renderItem(arr[i], i); + } + } else { + const keys = Object.keys(source); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + renderItem(source[key], key, i); + } + } + } } async function ssrRenderSuspense(push, { default: renderContent }) { - if (renderContent) { - renderContent(); - } - else { - push(`<!---->`); - } + if (renderContent) { + renderContent(); + } else { + push(`<!---->`); + } } function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { - if (typeof dir !== 'function' && dir.getSSRProps) { - return (dir.getSSRProps({ - dir, - instance, - value, - oldValue: undefined, - arg, - modifiers - }, null) || {}); - } - return {}; + if (typeof dir !== "function" && dir.getSSRProps) { + return dir.getSSRProps( + { + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }, + null + ) || {}; + } + return {}; } const ssrLooseEqual = shared.looseEqual; function ssrLooseContain(arr, value) { - return shared.looseIndexOf(arr, value) > -1; + return shared.looseIndexOf(arr, value) > -1; } -// for <input :type="type" v-model="model" value="value"> function ssrRenderDynamicModel(type, model, value) { - switch (type) { - case 'radio': - return shared.looseEqual(model, value) ? ' checked' : ''; - case 'checkbox': - return (shared.isArray(model) ? ssrLooseContain(model, value) : model) - ? ' checked' - : ''; - default: - // text types - return ssrRenderAttr('value', model); - } + switch (type) { + case "radio": + return shared.looseEqual(model, value) ? " checked" : ""; + case "checkbox": + return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; + default: + return ssrRenderAttr("value", model); + } } -// for <input v-bind="obj" v-model="model"> function ssrGetDynamicModelProps(existingProps = {}, model) { - const { type, value } = existingProps; - switch (type) { - case 'radio': - return shared.looseEqual(model, value) ? { checked: true } : null; - case 'checkbox': - return (shared.isArray(model) ? ssrLooseContain(model, value) : model) - ? { checked: true } - : null; - default: - // text types - return { value: model }; - } + const { type, value } = existingProps; + switch (type) { + case "radio": + return shared.looseEqual(model, value) ? { checked: true } : null; + case "checkbox": + return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; + default: + return { value: model }; + } } -vue.initDirectivesForSSR(); +var helpers = /*#__PURE__*/Object.freeze({ + __proto__: null, + ssrGetDirectiveProps: ssrGetDirectiveProps, + ssrGetDynamicModelProps: ssrGetDynamicModelProps, + ssrIncludeBooleanAttr: shared.includeBooleanAttr, + ssrInterpolate: ssrInterpolate, + ssrLooseContain: ssrLooseContain, + ssrLooseEqual: ssrLooseEqual, + ssrRenderAttr: ssrRenderAttr, + ssrRenderAttrs: ssrRenderAttrs, + ssrRenderClass: ssrRenderClass, + ssrRenderComponent: ssrRenderComponent, + ssrRenderDynamicAttr: ssrRenderDynamicAttr, + ssrRenderDynamicModel: ssrRenderDynamicModel, + ssrRenderList: ssrRenderList, + ssrRenderSlot: ssrRenderSlot, + ssrRenderSlotInner: ssrRenderSlotInner, + ssrRenderStyle: ssrRenderStyle, + ssrRenderSuspense: ssrRenderSuspense, + ssrRenderTeleport: ssrRenderTeleport, + ssrRenderVNode: renderVNode +}); + +const compileCache = /* @__PURE__ */ Object.create(null); +function ssrCompile(template, instance) { + const Component = instance.type; + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = shared.extend( + shared.extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + finalCompilerOptions.isCustomElement = finalCompilerOptions.isCustomElement || shared.NO; + finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO; + const cacheKey = JSON.stringify( + { + template, + compilerOptions: finalCompilerOptions + }, + (key, value) => { + return shared.isFunction(value) ? value.toString() : value; + } + ); + const cached = compileCache[cacheKey]; + if (cached) { + return cached; + } + finalCompilerOptions.onError = (err) => { + { + const message = `[@vue/server-renderer] Template compilation error: ${err.message}`; + const codeFrame = err.loc && shared.generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + Vue.warn(codeFrame ? `${message} +${codeFrame}` : message); + } + }; + const { code } = compilerSsr.compile(template, finalCompilerOptions); + const requireMap = { + vue: Vue__namespace, + "vue/server-renderer": helpers + }; + const fakeRequire = (id) => requireMap[id]; + return compileCache[cacheKey] = Function("require", code)(fakeRequire); +} + +const { + createComponentInstance, + setCurrentRenderingInstance, + setupComponent, + renderComponentRoot, + normalizeVNode +} = Vue.ssrUtils; +function createBuffer() { + let appendable = false; + const buffer = []; + return { + getBuffer() { + return buffer; + }, + push(item) { + const isStringItem = shared.isString(item); + if (appendable && isStringItem) { + buffer[buffer.length - 1] += item; + } else { + buffer.push(item); + } + appendable = isStringItem; + if (shared.isPromise(item) || shared.isArray(item) && item.hasAsync) { + buffer.hasAsync = true; + } + } + }; +} +function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { + const instance = createComponentInstance(vnode, parentComponent, null); + const res = setupComponent( + instance, + true + /* isSSR */ + ); + const hasAsyncSetup = shared.isPromise(res); + const prefetches = instance.sp; + if (hasAsyncSetup || prefetches) { + let p = hasAsyncSetup ? res : Promise.resolve(); + if (prefetches) { + p = p.then( + () => Promise.all( + prefetches.map((prefetch) => prefetch.call(instance.proxy)) + ) + ).catch(shared.NOOP); + } + return p.then(() => renderComponentSubTree(instance, slotScopeId)); + } else { + return renderComponentSubTree(instance, slotScopeId); + } +} +function renderComponentSubTree(instance, slotScopeId) { + const comp = instance.type; + const { getBuffer, push } = createBuffer(); + if (shared.isFunction(comp)) { + let root = renderComponentRoot(instance); + if (!comp.props) { + for (const key in instance.attrs) { + if (key.startsWith(`data-v-`)) { + (root.props || (root.props = {}))[key] = ``; + } + } + } + renderVNode(push, instance.subTree = root, instance, slotScopeId); + } else { + if ((!instance.render || instance.render === shared.NOOP) && !instance.ssrRender && !comp.ssrRender && shared.isString(comp.template)) { + comp.ssrRender = ssrCompile(comp.template, instance); + } + for (const e of instance.scope.effects) { + if (e.computed) { + e.computed._dirty = true; + e.computed._cacheable = true; + } + } + const ssrRender = instance.ssrRender || comp.ssrRender; + if (ssrRender) { + let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; + let hasCloned = false; + let cur = instance; + while (true) { + const scopeId = cur.vnode.scopeId; + if (scopeId) { + if (!hasCloned) { + attrs = { ...attrs }; + hasCloned = true; + } + attrs[scopeId] = ""; + } + const parent = cur.parent; + if (parent && parent.subTree && parent.subTree === cur.vnode) { + cur = parent; + } else { + break; + } + } + if (slotScopeId) { + if (!hasCloned) + attrs = { ...attrs }; + attrs[slotScopeId.trim()] = ""; + } + const prev = setCurrentRenderingInstance(instance); + try { + ssrRender( + instance.proxy, + push, + instance, + attrs, + // compiler-optimized bindings + instance.props, + instance.setupState, + instance.data, + instance.ctx + ); + } finally { + setCurrentRenderingInstance(prev); + } + } else if (instance.render && instance.render !== shared.NOOP) { + renderVNode( + push, + instance.subTree = renderComponentRoot(instance), + instance, + slotScopeId + ); + } else { + const componentName = comp.name || comp.__file || `<Anonymous>`; + Vue.warn(`Component ${componentName} is missing template or render function.`); + push(`<!---->`); + } + } + return getBuffer(); +} +function renderVNode(push, vnode, parentComponent, slotScopeId) { + const { type, shapeFlag, children } = vnode; + switch (type) { + case Vue.Text: + push(shared.escapeHtml(children)); + break; + case Vue.Comment: + push( + children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->` + ); + break; + case Vue.Static: + push(children); + break; + case Vue.Fragment: + if (vnode.slotScopeIds) { + slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); + } + push(`<!--[-->`); + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); + break; + default: + if (shapeFlag & 1) { + renderElementVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 6) { + push(renderComponentVNode(vnode, parentComponent, slotScopeId)); + } else if (shapeFlag & 64) { + renderTeleportVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 128) { + renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); + } else { + Vue.warn( + "[@vue/server-renderer] Invalid VNode type:", + type, + `(${typeof type})` + ); + } + } +} +function renderVNodeChildren(push, children, parentComponent, slotScopeId) { + for (let i = 0; i < children.length; i++) { + renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); + } +} +function renderElementVNode(push, vnode, parentComponent, slotScopeId) { + const tag = vnode.type; + let { props, children, shapeFlag, scopeId, dirs } = vnode; + let openTag = `<${tag}`; + if (dirs) { + props = applySSRDirectives(vnode, props, dirs); + } + if (props) { + openTag += ssrRenderAttrs(props, tag); + } + if (scopeId) { + openTag += ` ${scopeId}`; + } + let curParent = parentComponent; + let curVnode = vnode; + while (curParent && curVnode === curParent.subTree) { + curVnode = curParent.vnode; + if (curVnode.scopeId) { + openTag += ` ${curVnode.scopeId}`; + } + curParent = curParent.parent; + } + if (slotScopeId) { + openTag += ` ${slotScopeId}`; + } + push(openTag + `>`); + if (!shared.isVoidTag(tag)) { + let hasChildrenOverride = false; + if (props) { + if (props.innerHTML) { + hasChildrenOverride = true; + push(props.innerHTML); + } else if (props.textContent) { + hasChildrenOverride = true; + push(shared.escapeHtml(props.textContent)); + } else if (tag === "textarea" && props.value) { + hasChildrenOverride = true; + push(shared.escapeHtml(props.value)); + } + } + if (!hasChildrenOverride) { + if (shapeFlag & 8) { + push(shared.escapeHtml(children)); + } else if (shapeFlag & 16) { + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + } + } + push(`</${tag}>`); + } +} +function applySSRDirectives(vnode, rawProps, dirs) { + const toMerge = []; + for (let i = 0; i < dirs.length; i++) { + const binding = dirs[i]; + const { + dir: { getSSRProps } + } = binding; + if (getSSRProps) { + const props = getSSRProps(binding, vnode); + if (props) + toMerge.push(props); + } + } + return Vue.mergeProps(rawProps || {}, ...toMerge); +} +function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { + const target = vnode.props && vnode.props.to; + const disabled = vnode.props && vnode.props.disabled; + if (!target) { + if (!disabled) { + Vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`); + } + return []; + } + if (!shared.isString(target)) { + Vue.warn( + `[@vue/server-renderer] Teleport target must be a query selector string.` + ); + return []; + } + ssrRenderTeleport( + push, + (push2) => { + renderVNodeChildren( + push2, + vnode.children, + parentComponent, + slotScopeId + ); + }, + target, + disabled || disabled === "", + parentComponent + ); +} + +const { isVNode: isVNode$1 } = Vue.ssrUtils; +async function unrollBuffer$1(buffer) { + if (buffer.hasAsync) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isPromise(item)) { + item = await item; + } + if (shared.isString(item)) { + ret += item; + } else { + ret += await unrollBuffer$1(item); + } + } + return ret; + } else { + return unrollBufferSync$1(buffer); + } +} +function unrollBufferSync$1(buffer) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isString(item)) { + ret += item; + } else { + ret += unrollBufferSync$1(item); + } + } + return ret; +} +async function renderToString(input, context = {}) { + if (isVNode$1(input)) { + return renderToString(Vue.createApp({ render: () => input }), context); + } + const vnode = Vue.createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(Vue.ssrContextKey, context); + const buffer = await renderComponentVNode(vnode); + const result = await unrollBuffer$1(buffer); + await resolveTeleports(context); + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + return result; +} +async function resolveTeleports(context) { + if (context.__teleportBuffers) { + context.teleports = context.teleports || {}; + for (const key in context.__teleportBuffers) { + context.teleports[key] = await unrollBuffer$1( + await Promise.all([context.__teleportBuffers[key]]) + ); + } + } +} + +const { isVNode } = Vue.ssrUtils; +async function unrollBuffer(buffer, stream) { + if (buffer.hasAsync) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isPromise(item)) { + item = await item; + } + if (shared.isString(item)) { + stream.push(item); + } else { + await unrollBuffer(item, stream); + } + } + } else { + unrollBufferSync(buffer, stream); + } +} +function unrollBufferSync(buffer, stream) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isString(item)) { + stream.push(item); + } else { + unrollBufferSync(item, stream); + } + } +} +function renderToSimpleStream(input, context, stream) { + if (isVNode(input)) { + return renderToSimpleStream( + Vue.createApp({ render: () => input }), + context, + stream + ); + } + const vnode = Vue.createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(Vue.ssrContextKey, context); + Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + }).then(() => stream.push(null)).catch((error) => { + stream.destroy(error); + }); + return stream; +} +function renderToStream(input, context = {}) { + console.warn( + `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` + ); + return renderToNodeStream(input, context); +} +function renderToNodeStream(input, context = {}) { + const stream = new (require("node:stream")).Readable({ read() { + } }) ; + if (!stream) { + throw new Error( + `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` + ); + } + return renderToSimpleStream(input, context, stream); +} +function pipeToNodeWritable(input, context = {}, writable) { + renderToSimpleStream(input, context, { + push(content) { + if (content != null) { + writable.write(content); + } else { + writable.end(); + } + }, + destroy(err) { + writable.destroy(err); + } + }); +} +function renderToWebStream(input, context = {}) { + if (typeof ReadableStream !== "function") { + throw new Error( + `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` + ); + } + const encoder = new TextEncoder(); + let cancelled = false; + return new ReadableStream({ + start(controller) { + renderToSimpleStream(input, context, { + push(content) { + if (cancelled) + return; + if (content != null) { + controller.enqueue(encoder.encode(content)); + } else { + controller.close(); + } + }, + destroy(err) { + controller.error(err); + } + }); + }, + cancel() { + cancelled = true; + } + }); +} +function pipeToWebWritable(input, context = {}, writable) { + const writer = writable.getWriter(); + const encoder = new TextEncoder(); + let hasReady = false; + try { + hasReady = shared.isPromise(writer.ready); + } catch (e) { + } + renderToSimpleStream(input, context, { + async push(content) { + if (hasReady) { + await writer.ready; + } + if (content != null) { + return writer.write(encoder.encode(content)); + } else { + return writer.close(); + } + }, + destroy(err) { + console.log(err); + writer.close(); + } + }); +} + +Vue.initDirectivesForSSR(); exports.ssrIncludeBooleanAttr = shared.includeBooleanAttr; exports.pipeToNodeWritable = pipeToNodeWritable; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js b/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js index cde3cbb3..d4654b82 100644 --- a/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +++ b/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js @@ -1,751 +1,809 @@ +/** +* @vue/server-renderer v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -var vue = require('vue'); +var Vue = require('vue'); var shared = require('@vue/shared'); var compilerSsr = require('@vue/compiler-ssr'); -// leading comma for empty string "" -const shouldIgnoreProp = shared.makeMap(`,key,ref,innerHTML,textContent,ref_key,ref_for`); +function _interopNamespaceDefault(e) { + var n = Object.create(null); + if (e) { + for (var k in e) { + n[k] = e[k]; + } + } + n.default = e; + return Object.freeze(n); +} + +var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue); + +const shouldIgnoreProp = shared.makeMap( + `,key,ref,innerHTML,textContent,ref_key,ref_for` +); function ssrRenderAttrs(props, tag) { - let ret = ''; - for (const key in props) { - if (shouldIgnoreProp(key) || - shared.isOn(key) || - (tag === 'textarea' && key === 'value')) { - continue; - } - const value = props[key]; - if (key === 'class') { - ret += ` class="${ssrRenderClass(value)}"`; - } - else if (key === 'style') { - ret += ` style="${ssrRenderStyle(value)}"`; - } - else { - ret += ssrRenderDynamicAttr(key, value, tag); - } + let ret = ""; + for (const key in props) { + if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value") { + continue; } - return ret; + const value = props[key]; + if (key === "class") { + ret += ` class="${ssrRenderClass(value)}"`; + } else if (key === "style") { + ret += ` style="${ssrRenderStyle(value)}"`; + } else { + ret += ssrRenderDynamicAttr(key, value, tag); + } + } + return ret; } -// render an attr with dynamic (unknown) key. function ssrRenderDynamicAttr(key, value, tag) { - if (!isRenderableValue(value)) { - return ``; - } - const attrKey = tag && tag.indexOf('-') > 0 - ? key // preserve raw name on custom elements - : shared.propsToAttrMap[key] || key.toLowerCase(); - if (shared.isBooleanAttr(attrKey)) { - return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``; - } - else if (shared.isSSRSafeAttrName(attrKey)) { - return value === '' ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`; - } - else { - console.warn(`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}`); - return ``; - } + if (!shared.isRenderableAttrValue(value)) { + return ``; + } + const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase(); + if (shared.isBooleanAttr(attrKey)) { + return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``; + } else if (shared.isSSRSafeAttrName(attrKey)) { + return value === "" ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`; + } else { + console.warn( + `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` + ); + return ``; + } } -// Render a v-bind attr with static key. The key is pre-processed at compile -// time and we only need to check and escape value. function ssrRenderAttr(key, value) { - if (!isRenderableValue(value)) { - return ``; - } - return ` ${key}="${shared.escapeHtml(value)}"`; -} -function isRenderableValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === 'string' || type === 'number' || type === 'boolean'; + if (!shared.isRenderableAttrValue(value)) { + return ``; + } + return ` ${key}="${shared.escapeHtml(value)}"`; } function ssrRenderClass(raw) { - return shared.escapeHtml(shared.normalizeClass(raw)); + return shared.escapeHtml(shared.normalizeClass(raw)); } function ssrRenderStyle(raw) { - if (!raw) { - return ''; - } - if (shared.isString(raw)) { - return shared.escapeHtml(raw); - } - const styles = shared.normalizeStyle(raw); - return shared.escapeHtml(shared.stringifyStyle(styles)); -} - -const compileCache = Object.create(null); -function ssrCompile(template, instance) { - // TODO: This is copied from runtime-core/src/component.ts and should probably be refactored - const Component = instance.type; - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = shared.extend(shared.extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - finalCompilerOptions.isCustomElement = - finalCompilerOptions.isCustomElement || shared.NO; - finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO; - const cacheKey = JSON.stringify({ - template, - compilerOptions: finalCompilerOptions - }, (key, value) => { - return shared.isFunction(value) ? value.toString() : value; - }); - const cached = compileCache[cacheKey]; - if (cached) { - return cached; - } - finalCompilerOptions.onError = (err) => { - { - throw err; - } - }; - const { code } = compilerSsr.compile(template, finalCompilerOptions); - return (compileCache[cacheKey] = Function('require', code)(require)); -} - -function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { - parentPush('<!--teleport start-->'); - const context = parentComponent.appContext.provides[vue.ssrContextKey]; - const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); - const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); - // record current index of the target buffer to handle nested teleports - // since the parent needs to be rendered before the child - const bufferIndex = targetBuffer.length; - let teleportContent; - if (disabled) { - contentRenderFn(parentPush); - teleportContent = `<!--teleport anchor-->`; - } - else { - const { getBuffer, push } = createBuffer(); - contentRenderFn(push); - push(`<!--teleport anchor-->`); - teleportContent = getBuffer(); - } - targetBuffer.splice(bufferIndex, 0, teleportContent); - parentPush('<!--teleport end-->'); -} - -const { createComponentInstance, setCurrentRenderingInstance, setupComponent, renderComponentRoot, normalizeVNode } = vue.ssrUtils; -// Each component has a buffer array. -// A buffer array can contain one of the following: -// - plain string -// - A resolved buffer (recursive arrays of strings that can be unrolled -// synchronously) -// - An async buffer (a Promise that resolves to a resolved buffer) -function createBuffer() { - let appendable = false; - const buffer = []; - return { - getBuffer() { - // Return static buffer and await on items during unroll stage - return buffer; - }, - push(item) { - const isStringItem = shared.isString(item); - if (appendable && isStringItem) { - buffer[buffer.length - 1] += item; - } - else { - buffer.push(item); - } - appendable = isStringItem; - if (shared.isPromise(item) || (shared.isArray(item) && item.hasAsync)) { - // promise, or child buffer with async, mark as async. - // this allows skipping unnecessary await ticks during unroll stage - buffer.hasAsync = true; - } - } - }; -} -function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { - const instance = createComponentInstance(vnode, parentComponent, null); - const res = setupComponent(instance, true /* isSSR */); - const hasAsyncSetup = shared.isPromise(res); - const prefetches = instance.sp; /* LifecycleHooks.SERVER_PREFETCH */ - if (hasAsyncSetup || prefetches) { - let p = hasAsyncSetup - ? res - : Promise.resolve(); - if (prefetches) { - p = p - .then(() => Promise.all(prefetches.map(prefetch => prefetch.call(instance.proxy)))) - // Note: error display is already done by the wrapped lifecycle hook function. - .catch(() => { }); - } - return p.then(() => renderComponentSubTree(instance, slotScopeId)); - } - else { - return renderComponentSubTree(instance, slotScopeId); - } -} -function renderComponentSubTree(instance, slotScopeId) { - const comp = instance.type; - const { getBuffer, push } = createBuffer(); - if (shared.isFunction(comp)) { - let root = renderComponentRoot(instance); - // #5817 scope ID attrs not falling through if functional component doesn't - // have props - if (!comp.props) { - for (const key in instance.attrs) { - if (key.startsWith(`data-v-`)) { - (root.props || (root.props = {}))[key] = ``; - } - } - } - renderVNode(push, (instance.subTree = root), instance, slotScopeId); - } - else { - if ((!instance.render || instance.render === shared.NOOP) && - !instance.ssrRender && - !comp.ssrRender && - shared.isString(comp.template)) { - comp.ssrRender = ssrCompile(comp.template, instance); - } - // perf: enable caching of computed getters during render - // since there cannot be state mutations during render. - for (const e of instance.scope.effects) { - if (e.computed) - e.computed._cacheable = true; - } - const ssrRender = instance.ssrRender || comp.ssrRender; - if (ssrRender) { - // optimized - // resolve fallthrough attrs - let attrs = instance.inheritAttrs !== false ? instance.attrs : undefined; - let hasCloned = false; - let cur = instance; - while (true) { - const scopeId = cur.vnode.scopeId; - if (scopeId) { - if (!hasCloned) { - attrs = { ...attrs }; - hasCloned = true; - } - attrs[scopeId] = ''; - } - const parent = cur.parent; - if (parent && parent.subTree && parent.subTree === cur.vnode) { - // parent is a non-SSR compiled component and is rendering this - // component as root. inherit its scopeId if present. - cur = parent; - } - else { - break; - } - } - if (slotScopeId) { - if (!hasCloned) - attrs = { ...attrs }; - attrs[slotScopeId.trim()] = ''; - } - // set current rendering instance for asset resolution - const prev = setCurrentRenderingInstance(instance); - ssrRender(instance.proxy, push, instance, attrs, - // compiler-optimized bindings - instance.props, instance.setupState, instance.data, instance.ctx); - setCurrentRenderingInstance(prev); - } - else if (instance.render && instance.render !== shared.NOOP) { - renderVNode(push, (instance.subTree = renderComponentRoot(instance)), instance, slotScopeId); - } - else { - const componentName = comp.name || comp.__file || `<Anonymous>`; - vue.warn(`Component ${componentName} is missing template or render function.`); - push(`<!---->`); - } - } - return getBuffer(); -} -function renderVNode(push, vnode, parentComponent, slotScopeId) { - const { type, shapeFlag, children } = vnode; - switch (type) { - case vue.Text: - push(shared.escapeHtml(children)); - break; - case vue.Comment: - push(children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->`); - break; - case vue.Static: - push(children); - break; - case vue.Fragment: - if (vnode.slotScopeIds) { - slotScopeId = - (slotScopeId ? slotScopeId + ' ' : '') + vnode.slotScopeIds.join(' '); - } - push(`<!--[-->`); // open - renderVNodeChildren(push, children, parentComponent, slotScopeId); - push(`<!--]-->`); // close - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - renderElementVNode(push, vnode, parentComponent, slotScopeId); - } - else if (shapeFlag & 6 /* COMPONENT */) { - push(renderComponentVNode(vnode, parentComponent, slotScopeId)); - } - else if (shapeFlag & 64 /* TELEPORT */) { - renderTeleportVNode(push, vnode, parentComponent, slotScopeId); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); - } - else { - vue.warn('[@vue/server-renderer] Invalid VNode type:', type, `(${typeof type})`); - } - } -} -function renderVNodeChildren(push, children, parentComponent, slotScopeId) { - for (let i = 0; i < children.length; i++) { - renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); - } -} -function renderElementVNode(push, vnode, parentComponent, slotScopeId) { - const tag = vnode.type; - let { props, children, shapeFlag, scopeId, dirs } = vnode; - let openTag = `<${tag}`; - if (dirs) { - props = applySSRDirectives(vnode, props, dirs); - } - if (props) { - openTag += ssrRenderAttrs(props, tag); - } - if (scopeId) { - openTag += ` ${scopeId}`; - } - // inherit parent chain scope id if this is the root node - let curParent = parentComponent; - let curVnode = vnode; - while (curParent && curVnode === curParent.subTree) { - curVnode = curParent.vnode; - if (curVnode.scopeId) { - openTag += ` ${curVnode.scopeId}`; - } - curParent = curParent.parent; - } - if (slotScopeId) { - openTag += ` ${slotScopeId}`; - } - push(openTag + `>`); - if (!shared.isVoidTag(tag)) { - let hasChildrenOverride = false; - if (props) { - if (props.innerHTML) { - hasChildrenOverride = true; - push(props.innerHTML); - } - else if (props.textContent) { - hasChildrenOverride = true; - push(shared.escapeHtml(props.textContent)); - } - else if (tag === 'textarea' && props.value) { - hasChildrenOverride = true; - push(shared.escapeHtml(props.value)); - } - } - if (!hasChildrenOverride) { - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - push(shared.escapeHtml(children)); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - renderVNodeChildren(push, children, parentComponent, slotScopeId); - } - } - push(`</${tag}>`); - } -} -function applySSRDirectives(vnode, rawProps, dirs) { - const toMerge = []; - for (let i = 0; i < dirs.length; i++) { - const binding = dirs[i]; - const { dir: { getSSRProps } } = binding; - if (getSSRProps) { - const props = getSSRProps(binding, vnode); - if (props) - toMerge.push(props); - } - } - return vue.mergeProps(rawProps || {}, ...toMerge); -} -function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { - const target = vnode.props && vnode.props.to; - const disabled = vnode.props && vnode.props.disabled; - if (!target) { - if (!disabled) { - vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`); - } - return []; - } - if (!shared.isString(target)) { - vue.warn(`[@vue/server-renderer] Teleport target must be a query selector string.`); - return []; - } - ssrRenderTeleport(push, push => { - renderVNodeChildren(push, vnode.children, parentComponent, slotScopeId); - }, target, disabled || disabled === '', parentComponent); -} - -const { isVNode } = vue.ssrUtils; -async function unrollBuffer(buffer) { - if (buffer.hasAsync) { - let ret = ''; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isPromise(item)) { - item = await item; - } - if (shared.isString(item)) { - ret += item; - } - else { - ret += await unrollBuffer(item); - } - } - return ret; - } - else { - // sync buffer can be more efficiently unrolled without unnecessary await - // ticks - return unrollBufferSync(buffer); - } -} -function unrollBufferSync(buffer) { - let ret = ''; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isString(item)) { - ret += item; - } - else { - // since this is a sync buffer, child buffers are never promises - ret += unrollBufferSync(item); - } - } - return ret; -} -async function renderToString(input, context = {}) { - if (isVNode(input)) { - // raw vnode, wrap with app (for context) - return renderToString(vue.createApp({ render: () => input }), context); - } - // rendering an app - const vnode = vue.createVNode(input._component, input._props); - vnode.appContext = input._context; - // provide the ssr context to the tree - input.provide(vue.ssrContextKey, context); - const buffer = await renderComponentVNode(vnode); - const result = await unrollBuffer(buffer); - await resolveTeleports(context); - return result; -} -async function resolveTeleports(context) { - if (context.__teleportBuffers) { - context.teleports = context.teleports || {}; - for (const key in context.__teleportBuffers) { - // note: it's OK to await sequentially here because the Promises were - // created eagerly in parallel. - context.teleports[key] = await unrollBuffer((await Promise.all(context.__teleportBuffers[key]))); - } - } -} - -const { isVNode: isVNode$1 } = vue.ssrUtils; -async function unrollBuffer$1(buffer, stream) { - if (buffer.hasAsync) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isPromise(item)) { - item = await item; - } - if (shared.isString(item)) { - stream.push(item); - } - else { - await unrollBuffer$1(item, stream); - } - } - } - else { - // sync buffer can be more efficiently unrolled without unnecessary await - // ticks - unrollBufferSync$1(buffer, stream); - } -} -function unrollBufferSync$1(buffer, stream) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (shared.isString(item)) { - stream.push(item); - } - else { - // since this is a sync buffer, child buffers are never promises - unrollBufferSync$1(item, stream); - } - } -} -function renderToSimpleStream(input, context, stream) { - if (isVNode$1(input)) { - // raw vnode, wrap with app (for context) - return renderToSimpleStream(vue.createApp({ render: () => input }), context, stream); - } - // rendering an app - const vnode = vue.createVNode(input._component, input._props); - vnode.appContext = input._context; - // provide the ssr context to the tree - input.provide(vue.ssrContextKey, context); - Promise.resolve(renderComponentVNode(vnode)) - .then(buffer => unrollBuffer$1(buffer, stream)) - .then(() => resolveTeleports(context)) - .then(() => stream.push(null)) - .catch(error => { - stream.destroy(error); - }); - return stream; -} -/** - * @deprecated - */ -function renderToStream(input, context = {}) { - console.warn(`[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.`); - return renderToNodeStream(input, context); -} -function renderToNodeStream(input, context = {}) { - const stream = new (require('stream').Readable)({ read() { } }) - ; - if (!stream) { - throw new Error(`ESM build of renderToStream() does not support renderToNodeStream(). ` + - `Use pipeToNodeWritable() with an existing Node.js Writable stream ` + - `instance instead.`); - } - return renderToSimpleStream(input, context, stream); -} -function pipeToNodeWritable(input, context = {}, writable) { - renderToSimpleStream(input, context, { - push(content) { - if (content != null) { - writable.write(content); - } - else { - writable.end(); - } - }, - destroy(err) { - writable.destroy(err); - } - }); -} -function renderToWebStream(input, context = {}) { - if (typeof ReadableStream !== 'function') { - throw new Error(`ReadableStream constructor is not available in the global scope. ` + - `If the target environment does support web streams, consider using ` + - `pipeToWebWritable() with an existing WritableStream instance instead.`); - } - const encoder = new TextEncoder(); - let cancelled = false; - return new ReadableStream({ - start(controller) { - renderToSimpleStream(input, context, { - push(content) { - if (cancelled) - return; - if (content != null) { - controller.enqueue(encoder.encode(content)); - } - else { - controller.close(); - } - }, - destroy(err) { - controller.error(err); - } - }); - }, - cancel() { - cancelled = true; - } - }); -} -function pipeToWebWritable(input, context = {}, writable) { - const writer = writable.getWriter(); - const encoder = new TextEncoder(); - // #4287 CloudFlare workers do not implement `ready` property - let hasReady = false; - try { - hasReady = shared.isPromise(writer.ready); - } - catch (e) { } - renderToSimpleStream(input, context, { - async push(content) { - if (hasReady) { - await writer.ready; - } - if (content != null) { - return writer.write(encoder.encode(content)); - } - else { - return writer.close(); - } - }, - destroy(err) { - // TODO better error handling? - console.log(err); - writer.close(); - } - }); + if (!raw) { + return ""; + } + if (shared.isString(raw)) { + return shared.escapeHtml(raw); + } + const styles = shared.normalizeStyle(raw); + return shared.escapeHtml(shared.stringifyStyle(styles)); } function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { - return renderComponentVNode(vue.createVNode(comp, props, children), parentComponent, slotScopeId); + return renderComponentVNode( + Vue.createVNode(comp, props, children), + parentComponent, + slotScopeId + ); } function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - // template-compiled slots are always rendered as fragments - push(`<!--[-->`); - ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId); - push(`<!--]-->`); + push(`<!--[-->`); + ssrRenderSlotInner( + slots, + slotName, + slotProps, + fallbackRenderFn, + push, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); } -function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - const slotFn = slots[slotName]; - if (slotFn) { - const slotBuffer = []; - const bufferedPush = (item) => { - slotBuffer.push(item); - }; - const ret = slotFn(slotProps, bufferedPush, parentComponent, slotScopeId ? ' ' + slotScopeId : ''); - if (shared.isArray(ret)) { - // normal slot - renderVNodeChildren(push, ret, parentComponent, slotScopeId); +function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { + const slotFn = slots[slotName]; + if (slotFn) { + const slotBuffer = []; + const bufferedPush = (item) => { + slotBuffer.push(item); + }; + const ret = slotFn( + slotProps, + bufferedPush, + parentComponent, + slotScopeId ? " " + slotScopeId : "" + ); + if (shared.isArray(ret)) { + renderVNodeChildren(push, ret, parentComponent, slotScopeId); + } else { + let isEmptySlot = true; + if (transition) { + isEmptySlot = false; + } else { + for (let i = 0; i < slotBuffer.length; i++) { + if (!isComment(slotBuffer[i])) { + isEmptySlot = false; + break; + } } - else { - // ssr slot. - // check if the slot renders all comments, in which case use the fallback - let isEmptySlot = true; - for (let i = 0; i < slotBuffer.length; i++) { - if (!isComment(slotBuffer[i])) { - isEmptySlot = false; - break; - } - } - if (isEmptySlot) { - if (fallbackRenderFn) { - fallbackRenderFn(); - } - } - else { - for (let i = 0; i < slotBuffer.length; i++) { - push(slotBuffer[i]); - } - } + } + if (isEmptySlot) { + if (fallbackRenderFn) { + fallbackRenderFn(); } + } else { + let start = 0; + let end = slotBuffer.length; + if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { + start++; + end--; + } + for (let i = start; i < end; i++) { + push(slotBuffer[i]); + } + } } - else if (fallbackRenderFn) { - fallbackRenderFn(); - } + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } } +const commentTestRE = /^<!--.*-->$/s; const commentRE = /<!--[^]*?-->/gm; function isComment(item) { - return (typeof item === 'string' && - commentRE.test(item) && - !item.replace(commentRE, '').trim()); + if (typeof item !== "string" || !commentTestRE.test(item)) + return false; + if (item.length <= 8) + return true; + return !item.replace(commentRE, "").trim(); +} + +function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { + parentPush("<!--teleport start-->"); + const context = parentComponent.appContext.provides[Vue.ssrContextKey]; + const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); + const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); + const bufferIndex = targetBuffer.length; + let teleportContent; + if (disabled) { + contentRenderFn(parentPush); + teleportContent = `<!--teleport anchor-->`; + } else { + const { getBuffer, push } = createBuffer(); + contentRenderFn(push); + push(`<!--teleport anchor-->`); + teleportContent = getBuffer(); + } + targetBuffer.splice(bufferIndex, 0, teleportContent); + parentPush("<!--teleport end-->"); } function ssrInterpolate(value) { - return shared.escapeHtml(shared.toDisplayString(value)); + return shared.escapeHtml(shared.toDisplayString(value)); } function ssrRenderList(source, renderItem) { - if (shared.isArray(source) || shared.isString(source)) { - for (let i = 0, l = source.length; i < l; i++) { - renderItem(source[i], i); - } + if (shared.isArray(source) || shared.isString(source)) { + for (let i = 0, l = source.length; i < l; i++) { + renderItem(source[i], i); } - else if (typeof source === 'number') { - for (let i = 0; i < source; i++) { - renderItem(i + 1, i); - } + } else if (typeof source === "number") { + for (let i = 0; i < source; i++) { + renderItem(i + 1, i); } - else if (shared.isObject(source)) { - if (source[Symbol.iterator]) { - const arr = Array.from(source); - for (let i = 0, l = arr.length; i < l; i++) { - renderItem(arr[i], i); - } - } - else { - const keys = Object.keys(source); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - renderItem(source[key], key, i); - } - } + } else if (shared.isObject(source)) { + if (source[Symbol.iterator]) { + const arr = Array.from(source); + for (let i = 0, l = arr.length; i < l; i++) { + renderItem(arr[i], i); + } + } else { + const keys = Object.keys(source); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + renderItem(source[key], key, i); + } } + } } async function ssrRenderSuspense(push, { default: renderContent }) { - if (renderContent) { - renderContent(); - } - else { - push(`<!---->`); - } + if (renderContent) { + renderContent(); + } else { + push(`<!---->`); + } } function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { - if (typeof dir !== 'function' && dir.getSSRProps) { - return (dir.getSSRProps({ - dir, - instance, - value, - oldValue: undefined, - arg, - modifiers - }, null) || {}); - } - return {}; + if (typeof dir !== "function" && dir.getSSRProps) { + return dir.getSSRProps( + { + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }, + null + ) || {}; + } + return {}; } const ssrLooseEqual = shared.looseEqual; function ssrLooseContain(arr, value) { - return shared.looseIndexOf(arr, value) > -1; + return shared.looseIndexOf(arr, value) > -1; } -// for <input :type="type" v-model="model" value="value"> function ssrRenderDynamicModel(type, model, value) { - switch (type) { - case 'radio': - return shared.looseEqual(model, value) ? ' checked' : ''; - case 'checkbox': - return (shared.isArray(model) ? ssrLooseContain(model, value) : model) - ? ' checked' - : ''; - default: - // text types - return ssrRenderAttr('value', model); - } + switch (type) { + case "radio": + return shared.looseEqual(model, value) ? " checked" : ""; + case "checkbox": + return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; + default: + return ssrRenderAttr("value", model); + } } -// for <input v-bind="obj" v-model="model"> function ssrGetDynamicModelProps(existingProps = {}, model) { - const { type, value } = existingProps; - switch (type) { - case 'radio': - return shared.looseEqual(model, value) ? { checked: true } : null; - case 'checkbox': - return (shared.isArray(model) ? ssrLooseContain(model, value) : model) - ? { checked: true } - : null; - default: - // text types - return { value: model }; - } + const { type, value } = existingProps; + switch (type) { + case "radio": + return shared.looseEqual(model, value) ? { checked: true } : null; + case "checkbox": + return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; + default: + return { value: model }; + } } -vue.initDirectivesForSSR(); +var helpers = /*#__PURE__*/Object.freeze({ + __proto__: null, + ssrGetDirectiveProps: ssrGetDirectiveProps, + ssrGetDynamicModelProps: ssrGetDynamicModelProps, + ssrIncludeBooleanAttr: shared.includeBooleanAttr, + ssrInterpolate: ssrInterpolate, + ssrLooseContain: ssrLooseContain, + ssrLooseEqual: ssrLooseEqual, + ssrRenderAttr: ssrRenderAttr, + ssrRenderAttrs: ssrRenderAttrs, + ssrRenderClass: ssrRenderClass, + ssrRenderComponent: ssrRenderComponent, + ssrRenderDynamicAttr: ssrRenderDynamicAttr, + ssrRenderDynamicModel: ssrRenderDynamicModel, + ssrRenderList: ssrRenderList, + ssrRenderSlot: ssrRenderSlot, + ssrRenderSlotInner: ssrRenderSlotInner, + ssrRenderStyle: ssrRenderStyle, + ssrRenderSuspense: ssrRenderSuspense, + ssrRenderTeleport: ssrRenderTeleport, + ssrRenderVNode: renderVNode +}); + +const compileCache = /* @__PURE__ */ Object.create(null); +function ssrCompile(template, instance) { + const Component = instance.type; + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = shared.extend( + shared.extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + finalCompilerOptions.isCustomElement = finalCompilerOptions.isCustomElement || shared.NO; + finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO; + const cacheKey = JSON.stringify( + { + template, + compilerOptions: finalCompilerOptions + }, + (key, value) => { + return shared.isFunction(value) ? value.toString() : value; + } + ); + const cached = compileCache[cacheKey]; + if (cached) { + return cached; + } + finalCompilerOptions.onError = (err) => { + { + throw err; + } + }; + const { code } = compilerSsr.compile(template, finalCompilerOptions); + const requireMap = { + vue: Vue__namespace, + "vue/server-renderer": helpers + }; + const fakeRequire = (id) => requireMap[id]; + return compileCache[cacheKey] = Function("require", code)(fakeRequire); +} + +const { + createComponentInstance, + setCurrentRenderingInstance, + setupComponent, + renderComponentRoot, + normalizeVNode +} = Vue.ssrUtils; +function createBuffer() { + let appendable = false; + const buffer = []; + return { + getBuffer() { + return buffer; + }, + push(item) { + const isStringItem = shared.isString(item); + if (appendable && isStringItem) { + buffer[buffer.length - 1] += item; + } else { + buffer.push(item); + } + appendable = isStringItem; + if (shared.isPromise(item) || shared.isArray(item) && item.hasAsync) { + buffer.hasAsync = true; + } + } + }; +} +function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { + const instance = createComponentInstance(vnode, parentComponent, null); + const res = setupComponent( + instance, + true + /* isSSR */ + ); + const hasAsyncSetup = shared.isPromise(res); + const prefetches = instance.sp; + if (hasAsyncSetup || prefetches) { + let p = hasAsyncSetup ? res : Promise.resolve(); + if (prefetches) { + p = p.then( + () => Promise.all( + prefetches.map((prefetch) => prefetch.call(instance.proxy)) + ) + ).catch(shared.NOOP); + } + return p.then(() => renderComponentSubTree(instance, slotScopeId)); + } else { + return renderComponentSubTree(instance, slotScopeId); + } +} +function renderComponentSubTree(instance, slotScopeId) { + const comp = instance.type; + const { getBuffer, push } = createBuffer(); + if (shared.isFunction(comp)) { + let root = renderComponentRoot(instance); + if (!comp.props) { + for (const key in instance.attrs) { + if (key.startsWith(`data-v-`)) { + (root.props || (root.props = {}))[key] = ``; + } + } + } + renderVNode(push, instance.subTree = root, instance, slotScopeId); + } else { + if ((!instance.render || instance.render === shared.NOOP) && !instance.ssrRender && !comp.ssrRender && shared.isString(comp.template)) { + comp.ssrRender = ssrCompile(comp.template, instance); + } + for (const e of instance.scope.effects) { + if (e.computed) { + e.computed._dirty = true; + e.computed._cacheable = true; + } + } + const ssrRender = instance.ssrRender || comp.ssrRender; + if (ssrRender) { + let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; + let hasCloned = false; + let cur = instance; + while (true) { + const scopeId = cur.vnode.scopeId; + if (scopeId) { + if (!hasCloned) { + attrs = { ...attrs }; + hasCloned = true; + } + attrs[scopeId] = ""; + } + const parent = cur.parent; + if (parent && parent.subTree && parent.subTree === cur.vnode) { + cur = parent; + } else { + break; + } + } + if (slotScopeId) { + if (!hasCloned) + attrs = { ...attrs }; + attrs[slotScopeId.trim()] = ""; + } + const prev = setCurrentRenderingInstance(instance); + try { + ssrRender( + instance.proxy, + push, + instance, + attrs, + // compiler-optimized bindings + instance.props, + instance.setupState, + instance.data, + instance.ctx + ); + } finally { + setCurrentRenderingInstance(prev); + } + } else if (instance.render && instance.render !== shared.NOOP) { + renderVNode( + push, + instance.subTree = renderComponentRoot(instance), + instance, + slotScopeId + ); + } else { + const componentName = comp.name || comp.__file || `<Anonymous>`; + Vue.warn(`Component ${componentName} is missing template or render function.`); + push(`<!---->`); + } + } + return getBuffer(); +} +function renderVNode(push, vnode, parentComponent, slotScopeId) { + const { type, shapeFlag, children } = vnode; + switch (type) { + case Vue.Text: + push(shared.escapeHtml(children)); + break; + case Vue.Comment: + push( + children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->` + ); + break; + case Vue.Static: + push(children); + break; + case Vue.Fragment: + if (vnode.slotScopeIds) { + slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); + } + push(`<!--[-->`); + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); + break; + default: + if (shapeFlag & 1) { + renderElementVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 6) { + push(renderComponentVNode(vnode, parentComponent, slotScopeId)); + } else if (shapeFlag & 64) { + renderTeleportVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 128) { + renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); + } else { + Vue.warn( + "[@vue/server-renderer] Invalid VNode type:", + type, + `(${typeof type})` + ); + } + } +} +function renderVNodeChildren(push, children, parentComponent, slotScopeId) { + for (let i = 0; i < children.length; i++) { + renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); + } +} +function renderElementVNode(push, vnode, parentComponent, slotScopeId) { + const tag = vnode.type; + let { props, children, shapeFlag, scopeId, dirs } = vnode; + let openTag = `<${tag}`; + if (dirs) { + props = applySSRDirectives(vnode, props, dirs); + } + if (props) { + openTag += ssrRenderAttrs(props, tag); + } + if (scopeId) { + openTag += ` ${scopeId}`; + } + let curParent = parentComponent; + let curVnode = vnode; + while (curParent && curVnode === curParent.subTree) { + curVnode = curParent.vnode; + if (curVnode.scopeId) { + openTag += ` ${curVnode.scopeId}`; + } + curParent = curParent.parent; + } + if (slotScopeId) { + openTag += ` ${slotScopeId}`; + } + push(openTag + `>`); + if (!shared.isVoidTag(tag)) { + let hasChildrenOverride = false; + if (props) { + if (props.innerHTML) { + hasChildrenOverride = true; + push(props.innerHTML); + } else if (props.textContent) { + hasChildrenOverride = true; + push(shared.escapeHtml(props.textContent)); + } else if (tag === "textarea" && props.value) { + hasChildrenOverride = true; + push(shared.escapeHtml(props.value)); + } + } + if (!hasChildrenOverride) { + if (shapeFlag & 8) { + push(shared.escapeHtml(children)); + } else if (shapeFlag & 16) { + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + } + } + push(`</${tag}>`); + } +} +function applySSRDirectives(vnode, rawProps, dirs) { + const toMerge = []; + for (let i = 0; i < dirs.length; i++) { + const binding = dirs[i]; + const { + dir: { getSSRProps } + } = binding; + if (getSSRProps) { + const props = getSSRProps(binding, vnode); + if (props) + toMerge.push(props); + } + } + return Vue.mergeProps(rawProps || {}, ...toMerge); +} +function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { + const target = vnode.props && vnode.props.to; + const disabled = vnode.props && vnode.props.disabled; + if (!target) { + if (!disabled) { + Vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`); + } + return []; + } + if (!shared.isString(target)) { + Vue.warn( + `[@vue/server-renderer] Teleport target must be a query selector string.` + ); + return []; + } + ssrRenderTeleport( + push, + (push2) => { + renderVNodeChildren( + push2, + vnode.children, + parentComponent, + slotScopeId + ); + }, + target, + disabled || disabled === "", + parentComponent + ); +} + +const { isVNode: isVNode$1 } = Vue.ssrUtils; +async function unrollBuffer$1(buffer) { + if (buffer.hasAsync) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isPromise(item)) { + item = await item; + } + if (shared.isString(item)) { + ret += item; + } else { + ret += await unrollBuffer$1(item); + } + } + return ret; + } else { + return unrollBufferSync$1(buffer); + } +} +function unrollBufferSync$1(buffer) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isString(item)) { + ret += item; + } else { + ret += unrollBufferSync$1(item); + } + } + return ret; +} +async function renderToString(input, context = {}) { + if (isVNode$1(input)) { + return renderToString(Vue.createApp({ render: () => input }), context); + } + const vnode = Vue.createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(Vue.ssrContextKey, context); + const buffer = await renderComponentVNode(vnode); + const result = await unrollBuffer$1(buffer); + await resolveTeleports(context); + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + return result; +} +async function resolveTeleports(context) { + if (context.__teleportBuffers) { + context.teleports = context.teleports || {}; + for (const key in context.__teleportBuffers) { + context.teleports[key] = await unrollBuffer$1( + await Promise.all([context.__teleportBuffers[key]]) + ); + } + } +} + +const { isVNode } = Vue.ssrUtils; +async function unrollBuffer(buffer, stream) { + if (buffer.hasAsync) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isPromise(item)) { + item = await item; + } + if (shared.isString(item)) { + stream.push(item); + } else { + await unrollBuffer(item, stream); + } + } + } else { + unrollBufferSync(buffer, stream); + } +} +function unrollBufferSync(buffer, stream) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (shared.isString(item)) { + stream.push(item); + } else { + unrollBufferSync(item, stream); + } + } +} +function renderToSimpleStream(input, context, stream) { + if (isVNode(input)) { + return renderToSimpleStream( + Vue.createApp({ render: () => input }), + context, + stream + ); + } + const vnode = Vue.createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(Vue.ssrContextKey, context); + Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + }).then(() => stream.push(null)).catch((error) => { + stream.destroy(error); + }); + return stream; +} +function renderToStream(input, context = {}) { + console.warn( + `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` + ); + return renderToNodeStream(input, context); +} +function renderToNodeStream(input, context = {}) { + const stream = new (require("node:stream")).Readable({ read() { + } }) ; + if (!stream) { + throw new Error( + `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` + ); + } + return renderToSimpleStream(input, context, stream); +} +function pipeToNodeWritable(input, context = {}, writable) { + renderToSimpleStream(input, context, { + push(content) { + if (content != null) { + writable.write(content); + } else { + writable.end(); + } + }, + destroy(err) { + writable.destroy(err); + } + }); +} +function renderToWebStream(input, context = {}) { + if (typeof ReadableStream !== "function") { + throw new Error( + `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` + ); + } + const encoder = new TextEncoder(); + let cancelled = false; + return new ReadableStream({ + start(controller) { + renderToSimpleStream(input, context, { + push(content) { + if (cancelled) + return; + if (content != null) { + controller.enqueue(encoder.encode(content)); + } else { + controller.close(); + } + }, + destroy(err) { + controller.error(err); + } + }); + }, + cancel() { + cancelled = true; + } + }); +} +function pipeToWebWritable(input, context = {}, writable) { + const writer = writable.getWriter(); + const encoder = new TextEncoder(); + let hasReady = false; + try { + hasReady = shared.isPromise(writer.ready); + } catch (e) { + } + renderToSimpleStream(input, context, { + async push(content) { + if (hasReady) { + await writer.ready; + } + if (content != null) { + return writer.write(encoder.encode(content)); + } else { + return writer.close(); + } + }, + destroy(err) { + console.log(err); + writer.close(); + } + }); +} + +Vue.initDirectivesForSSR(); exports.ssrIncludeBooleanAttr = shared.includeBooleanAttr; exports.pipeToNodeWritable = pipeToNodeWritable; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.d.ts b/node_modules/@vue/server-renderer/dist/server-renderer.d.ts index d19e75f8..e3397707 100644 --- a/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +++ b/node_modules/@vue/server-renderer/dist/server-renderer.d.ts @@ -1,56 +1,63 @@ /// <reference types="node" /> +import { VNode, ComponentInternalInstance, App, Slots, Component } from 'vue'; +import { Readable, Writable } from 'node:stream'; +import { ComponentPublicInstance, Directive } from '@vue/runtime-core'; +export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared'; -import { App } from 'vue'; -import { Component } from 'vue'; -import { ComponentInternalInstance } from 'vue'; -import { ComponentPublicInstance } from '@vue/runtime-core'; -import { Directive } from '@vue/runtime-core'; -import { Readable } from 'stream'; -import { Slots } from 'vue'; -import { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared'; -import { VNode } from 'vue'; -import { Writable } from 'stream'; +type SSRBuffer = SSRBufferItem[] & { + hasAsync?: boolean; +}; +type SSRBufferItem = string | SSRBuffer | Promise<SSRBuffer>; +type PushFn = (item: SSRBufferItem) => void; +type Props = Record<string, unknown>; +export type SSRContext = { + [key: string]: any; + teleports?: Record<string, string>; +}; +export declare function renderVNode(push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; -export declare function pipeToNodeWritable(input: App | VNode, context: SSRContext | undefined, writable: Writable): void; - -export declare function pipeToWebWritable(input: App | VNode, context: SSRContext | undefined, writable: WritableStream): void; - -declare type Props = Record<string, unknown>; - -declare type PushFn = (item: SSRBufferItem) => void; - -export declare function renderToNodeStream(input: App | VNode, context?: SSRContext): Readable; +export declare function renderToString(input: App | VNode, context?: SSRContext): Promise<string>; +export interface SimpleReadable { + push(chunk: string | null): void; + destroy(err: any): void; +} export declare function renderToSimpleStream<T extends SimpleReadable>(input: App | VNode, context: SSRContext, stream: T): T; - /** * @deprecated */ export declare function renderToStream(input: App | VNode, context?: SSRContext): Readable; - -export declare function renderToString(input: App | VNode, context?: SSRContext): Promise<string>; - +export declare function renderToNodeStream(input: App | VNode, context?: SSRContext): Readable; +export declare function pipeToNodeWritable(input: App | VNode, context: SSRContext | undefined, writable: Writable): void; export declare function renderToWebStream(input: App | VNode, context?: SSRContext): ReadableStream; +export declare function pipeToWebWritable(input: App | VNode, context: SSRContext | undefined, writable: WritableStream): void; -export declare interface SimpleReadable { - push(chunk: string | null): void; - destroy(err: any): void; -} +type SSRSlots = Record<string, SSRSlot>; +type SSRSlot = (props: Props, push: PushFn, parentComponent: ComponentInternalInstance | null, scopeId: string | null) => void; +export declare function ssrRenderSlot(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; +export declare function ssrRenderSlotInner(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string, transition?: boolean): void; -declare type SSRBuffer = SSRBufferItem[] & { - hasAsync?: boolean; -}; +export declare function ssrRenderComponent(comp: Component, props?: Props | null, children?: Slots | SSRSlots | null, parentComponent?: ComponentInternalInstance | null, slotScopeId?: string): SSRBuffer | Promise<SSRBuffer>; -declare type SSRBufferItem = string | SSRBuffer | Promise<SSRBuffer>; +export declare function ssrRenderTeleport(parentPush: PushFn, contentRenderFn: (push: PushFn) => void, target: string, disabled: boolean, parentComponent: ComponentInternalInstance): void; -export declare type SSRContext = { - [key: string]: any; - teleports?: Record<string, string>; - __teleportBuffers?: Record<string, SSRBuffer>; -}; +export declare function ssrRenderAttrs(props: Record<string, unknown>, tag?: string): string; +export declare function ssrRenderDynamicAttr(key: string, value: unknown, tag?: string): string; +export declare function ssrRenderAttr(key: string, value: unknown): string; +export declare function ssrRenderClass(raw: unknown): string; +export declare function ssrRenderStyle(raw: unknown): string; + +export declare function ssrInterpolate(value: unknown): string; + +export declare function ssrRenderList(source: unknown, renderItem: (value: unknown, key: string | number, index?: number) => void): void; + +export declare function ssrRenderSuspense(push: PushFn, { default: renderContent }: Record<string, (() => void) | undefined>): Promise<void>; export declare function ssrGetDirectiveProps(instance: ComponentPublicInstance, dir: Directive, value?: any, arg?: string, modifiers?: Record<string, boolean>): Record<string, any>; +export declare const ssrLooseEqual: (a: unknown, b: unknown) => boolean; +export declare function ssrLooseContain(arr: unknown[], value: unknown): boolean; +export declare function ssrRenderDynamicModel(type: unknown, model: unknown, value: unknown): string; export declare function ssrGetDynamicModelProps(existingProps: any, model: unknown): { checked: boolean; value?: undefined; @@ -59,42 +66,4 @@ export declare function ssrGetDynamicModelProps(existingProps: any, model: unkno checked?: undefined; } | null; -export { ssrIncludeBooleanAttr } - -export declare function ssrInterpolate(value: unknown): string; - -export declare function ssrLooseContain(arr: unknown[], value: unknown): boolean; - -export declare const ssrLooseEqual: (a: unknown, b: unknown) => boolean; - -export declare function ssrRenderAttr(key: string, value: unknown): string; - -export declare function ssrRenderAttrs(props: Record<string, unknown>, tag?: string): string; - -export declare function ssrRenderClass(raw: unknown): string; - -export declare function ssrRenderComponent(comp: Component, props?: Props | null, children?: Slots | SSRSlots | null, parentComponent?: ComponentInternalInstance | null, slotScopeId?: string): SSRBuffer | Promise<SSRBuffer>; - -export declare function ssrRenderDynamicAttr(key: string, value: unknown, tag?: string): string; - -export declare function ssrRenderDynamicModel(type: unknown, model: unknown, value: unknown): string; - -export declare function ssrRenderList(source: unknown, renderItem: (value: unknown, key: string | number, index?: number) => void): void; - -export declare function ssrRenderSlot(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; - -export declare function ssrRenderSlotInner(slots: Slots | SSRSlots, slotName: string, slotProps: Props, fallbackRenderFn: (() => void) | null, push: PushFn, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; - -export declare function ssrRenderStyle(raw: unknown): string; - -export declare function ssrRenderSuspense(push: PushFn, { default: renderContent }: Record<string, (() => void) | undefined>): Promise<void>; - -export declare function ssrRenderTeleport(parentPush: PushFn, contentRenderFn: (push: PushFn) => void, target: string, disabled: boolean, parentComponent: ComponentInternalInstance): void; - -export declare function ssrRenderVNode(push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, slotScopeId?: string): void; - -declare type SSRSlot = (props: Props, push: PushFn, parentComponent: ComponentInternalInstance | null, scopeId: string | null) => void; - -declare type SSRSlots = Record<string, SSRSlot>; - -export { } +export { renderVNode as ssrRenderVNode }; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js b/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js new file mode 100644 index 00000000..b2c8b0bb --- /dev/null +++ b/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js @@ -0,0 +1,7906 @@ +/** +* @vue/server-renderer v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +function makeMap(str, expectsLowerCase) { + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); +} + +const EMPTY_OBJ = Object.freeze({}) ; +const EMPTY_ARR = Object.freeze([]) ; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); +}); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } +}; +const def = (obj, key, value) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; +function escapeHtmlComment(src) { + return src.replace(commentStripRE, ""); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; +}; + +function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} + +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + /** + * @internal + */ + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; + } + } +} +function recordEffectScope(effect, scope = activeEffectScope) { + if (scope && scope.active) { + scope.effects.push(effect); + } +} +function getCurrentScope() { + return activeEffectScope; +} + +let activeEffect; +class ReactiveEffect { + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); + } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); + } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; + } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } +} +function triggerComputed(computed) { + return computed.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); + } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } +} +let shouldTrack = true; +let pauseScheduleStack = 0; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function pauseScheduling() { + pauseScheduleStack++; +} +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } +} +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; + } + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); + } + } +} +const queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; + { + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); + } + effect2.trigger(); + } + } + } + scheduleEffects(dep); + resetScheduling(); +} +function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); + } + } +} + +const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; +}; + +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol("iterate" ); +const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); +function createArrayInstrumentations() { + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { + return res; + } + }; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; + }; + }); + return instrumentations; +} +function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true +); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); + +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } +} +function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); +} +function size(target, isReadonly = false) { + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); +} +function add(value) { + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; +} +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; +} +function deleteEntry(key) { + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; +} +function clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; +} +function createForEach(isReadonly, isShallow) { + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; +} +function createIterableMethod(method, isReadonly, isShallow) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations() { + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; +} +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); +function createInstrumentationGetter(isReadonly, shallow) { + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} + +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return isReactive(value) || isReadonly(value); +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + def(value, "__v_skip", true); + return value; +} +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; + +class ComputedRefImpl { + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } + } + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); + } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion +} +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; +} + +function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } +} +function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } +} +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} + +const stack = []; +function pushWarningContext(vnode) { + stack.push(vnode); +} +function popWarningContext() { + stack.pop(); +} +function warn$1(msg, ...args) { + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} + +const ErrorTypeStrings = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." +}; +function callWithErrorHandling(fn, instance, type, args) { + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); +} +function logError(err, type, contextVNode, throwInDev = true) { + { + const info = ErrorTypeStrings[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } +} + +let isFlushing = false; +let isFlushPending = false; +const queue = []; +let flushIndex = 0; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +const RECURSION_LIMIT = 100; +function nextTick(fn) { + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); + } + queueFlush(); + } +} +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? Infinity : job.id; +const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; +}; +function flushJobs(seen) { + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; + } + callWithErrorHandling(job, null, 14); + } + } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); + } + } +} + +let isHmrUpdating = false; +const hmrDirtyComponents = /* @__PURE__ */ new Set(); +{ + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +const map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); + } + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); +} +function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} + +let devtools; +let buffer = []; +let devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools) { + devtools.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook(hook, target) { + var _a, _b; + devtools = hook; + if (devtools) { + devtools.enabled = true; + buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook(newHook, target); + }); + setTimeout(() => { + if (!devtools) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version) { + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount" /* APP_UNMOUNT */, app); +} +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ +); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ +); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ +); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); +} + +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (number) { + args = rawArgs.map(looseToNumber); + } + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +} + +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance$1(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance$1(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance$1(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +let accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot$1(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance$1(instance); + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode$1( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode$1( + render2.length > 1 ? render2( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); + } + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance$1(prev); + return result; +} +const getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode$1(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode$2(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +const getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +const filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +const isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + +const isSuspense = (type) => type.__isSuspense; +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} + +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); + } + return ctx; + } +}; + +const INITIAL_WATCHER_VALUE = {}; +function watch(source, cb, options) { + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); +} +function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger +} = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); + }; + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); + } + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); + } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; + }; + }; + let ssrCleanup; + if (isInSSRComponentSetup) { + onCleanup = NOOP; + if (!cb) { + getter(); + } else if (immediate) { + callWithAsyncErrorHandling(cb, instance, 3, [ + getter(), + isMultiSource ? [] : void 0, + onCleanup + ]); + } + if (flush === "sync") { + const ctx = useSSRContext(); + ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []); + } else { + return NOOP; + } + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + if (ssrCleanup) + ssrCleanup.push(unwatch); + return unwatch; +} +function instanceWatch(source, value, options) { + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; +} +function createPathGetter(ctx, path) { + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; +} +function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { + return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; +} + +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} + +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) +); +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook("bu"); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook("bum"); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook("sp"); +const onRenderTriggered = createHook( + "rtg" +); +const onRenderTracked = createHook( + "rtc" +); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} + +const getPublicInstance = (i) => { + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +{ + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; +} +function createDevRenderContext(instance) { + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP + }); + }); + return target; +} +function exposePropsOnRenderContext(instance) { + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); + }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} + +function createDuplicateChecker() { + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; +} +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } + } + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); + } + { + checkDuplicateProperties("Methods" /* METHODS */, key); + } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } + } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + watch(getter, handler); + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); + } + } else if (isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } + } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) + return from; + if (!from) + return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; +} + +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { + { + warn$1(`provide() can only be used inside setup().`); + } + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); + } + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance, "set", "$attrs"); + } + { + validateProps(rawProps || {}, props, instance); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + } + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; +} +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$") { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; +} +function getType(ctor) { + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; +} +function isSameType(a, b) { + return getType(a) === getType(b); +} +function getTypeIndex(type, expectedTypes) { + if (isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; +} +function validateProps(rawProps, props, instance) { + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)) + ); + } +} +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; + } + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; + } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } +} +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); +function assertType(value, type) { + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; + } + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; +} +function getInvalidTypeMessage(name, value, expectedTypes) { + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; +} +function styleValue(value, type) { + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } +} +function isExplicable(type) { + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); +} +function isBoolean(...args) { + return args.some((elem) => elem.toLowerCase() === "boolean"); +} + +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode$1) : [normalizeVNode$1(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); + } + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const initSlots = (instance, children) => { + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = toRaw(children); + def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); + } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); + } + } + def(instance.slots, InternalObjectKey, 1); +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + extend(slots, children); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + extend(slots, children); + if (!optimized && type === 1) { + delete slots._; + } + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref] = value; + if (hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); + } + } +} + +let supported; +let perf; +function startMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function endMeasure(instance, type) { + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } +} +function isSupported() { + if (supported !== void 0) { + return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; +} + +const queuePostRenderEffect = queueEffectWithSuspense ; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode$1(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance$1( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent$1(instance); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); + } + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); + } + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { + let vnodeHook; + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); + } + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { + { + startMeasure(instance, `render`); + } + instance.subTree = renderComponentRoot$1(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot$1(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; + } + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); + return; + } + } + let originNext = next; + let vnodeHook; + { + pushWarningContext(next || instance.vnode); + } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; + } + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); + } + toggleRecurse(instance, true); + { + startMeasure(instance, `render`); + } + const nextTree = renderComponentRoot$1(instance); + { + endMeasure(instance, `render`); + } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); + } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); + } + if (u) { + queuePostRenderEffect(u, parentSuspense); + } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); + } + { + devtoolsComponentUpdated(instance); + } + { + popWarningContext(); + } + } + }; + const effect = instance.effect = new ReactiveEffect( + componentUpdateFn, + NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } + }; + update.id = instance.uid; + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; + } + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode$1(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode$1(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } + }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; +} +function toggleRecurse({ effect, update }, allowed) { + effect.allowRecurse = update.allowRecurse = allowed; +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; +} +function traverseStaticChildren(n1, n2, shallow = false) { + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; + } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } + } + } +} +function getSequence(arr) { + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; + } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } + } + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); + } + } +} + +const isTeleport = (type) => type.__isTeleport; + +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); +let currentBlock = null; +let isBlockTreeEnabled = 1; +function setBlockTracking(value) { + isBlockTreeEnabled += value; +} +function isVNode$2(value) { + return value ? value.__v_isVNode === true : false; +} +function isSameVNodeType(n1, n2) { + if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; +} +const createVNodeWithArgsTransform = (...args) => { + return _createVNode( + ...args + ); +}; +const InternalObjectKey = `__vInternal`; +const normalizeKey = ({ key }) => key != null ? key : null; +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; +}; +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); + } + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; +} +const createVNode = createVNodeWithArgsTransform ; +function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); + } + type = Comment; + } + if (isVNode$2(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); + } + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } + } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); + } + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); +} +function guardReactiveProps(props) { + if (!props) + return null; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; +} +function cloneVNode(vnode, extraProps, mergeRef = false) { + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; +} +function deepCloneVNode(vnode) { + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; +} +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); +} +function normalizeVNode$1(child) { + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } +} +function cloneIfMounted(child) { + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); +} +function normalizeChildren(vnode, children) { + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; + } + } + } + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; + } + } + vnode.children = children; + vnode.shapeFlag |= type; +} +function mergeProps(...args) { + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); + } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } + } + } + return ret; +} +function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); +} + +const emptyAppContext = createAppContext(); +let uid = 0; +function createComponentInstance$1(vnode, parent, suspense) { + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; +} +let currentInstance = null; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) + setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) + setters.forEach((set) => set(v)); + else + setters[0](v); + }; + }; + internalSetCurrentInstance = registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => currentInstance = v + ); + setInSSRSetupState = registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => isInSSRComponentSetup = v + ); +} +const setCurrentInstance = (instance) => { + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; +}; +const unsetCurrentInstance = () => { + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); +}; +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); +function validateComponentName(name, config) { + const appIsNativeTag = config.isNativeTag || NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } +} +function isStatefulComponent(instance) { + return instance.vnode.shapeFlag & 4; +} +let isInSSRComponentSetup = false; +function setupComponent$1(instance, isSSR = false) { + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; +} +function setupStatefulComponent(instance, isSSR) { + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); + } + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } + } + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + resetTracking(); + reset(); + if (isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); + } + } + } else { + handleSetupResult(instance, setupResult, isSSR); + } + } else { + finishComponentSetup(instance, isSSR); + } +} +function handleSetupResult(instance, setupResult, isSSR) { + if (isFunction(setupResult)) { + if (instance.type.__ssrInlineRender) { + instance.ssrRender = setupResult; + } else { + instance.render = setupResult; + } + } else if (isObject(setupResult)) { + if (isVNode$2(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); + } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); +} +let compile; +const isRuntimeOnly = () => !compile; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); + } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions + ); + Component.render = compile(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } +} +function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + markAttrsAccessed(); + track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } + )); +} +function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + })); +} +function createSetupContext(instance) { + const expose = (exposed) => { + { + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } + } + instance.exposed = exposed || {}; + }; + { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } +} +function getExposeProxy(instance) { + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } +} +const classifyRE = /(?:^|[-_])(\w)/g; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; +} +function formatComponentName(instance, Component, isRoot = false) { + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; + } + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; +} +function isClassComponent(value) { + return isFunction(value) && "__vccOpts" in value; +} + +const computed = (getterOrOptions, debugOptions) => { + return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); +}; + +const version = "3.4.15"; +const warn = warn$1 ; +const _ssrUtils = { + createComponentInstance: createComponentInstance$1, + setupComponent: setupComponent$1, + renderComponentRoot: renderComponentRoot$1, + setCurrentRenderingInstance: setCurrentRenderingInstance$1, + isVNode: isVNode$2, + normalizeVNode: normalizeVNode$1 +}; +const ssrUtils = _ssrUtils ; + +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); +const nodeOps = { + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); + } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } +}; + +const vtcKey = Symbol("_vtc"); + +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOldKey = Symbol("_vod"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); + } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } +}; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; +} +function initVShowForSSR() { + vShow.getSSRProps = ({ value }) => { + if (!value) { + return { style: { display: "none" } }; + } + }; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); + +function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = isString(next); + if (next && !isCssString) { + if (prev && !isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = isSpecialBooleanAttr(key); + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } +} + +function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +const getModelAssigner = (vnode) => { + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; +}; +function onCompositionStart(e) { + e.target.composing = true; +} +function onCompositionEnd(e) { + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } +} +const assignKey = Symbol("_assign"); +const vModelText = { + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); + } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } +}; +function initVModelForSSR() { + vModelText.getSSRProps = ({ value }) => ({ value }); +} + +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); +let renderer; +function ensureRenderer() { + return renderer || (renderer = createRenderer(rendererOptions)); +} +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; + } + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); + } + return proxy; + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} +function injectNativeTagCheck(app) { + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); +} +function injectCompilerOptionsCheck(app) { + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } +} +function normalizeContainer(container) { + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); + } + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; +} +let ssrDirectiveInitialized = false; +const initDirectivesForSSR = () => { + if (!ssrDirectiveInitialized) { + ssrDirectiveInitialized = true; + initVModelForSSR(); + initVShowForSSR(); + } +} ; + +const shouldIgnoreProp = makeMap( + `,key,ref,innerHTML,textContent,ref_key,ref_for` +); +function ssrRenderAttrs(props, tag) { + let ret = ""; + for (const key in props) { + if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") { + continue; + } + const value = props[key]; + if (key === "class") { + ret += ` class="${ssrRenderClass(value)}"`; + } else if (key === "style") { + ret += ` style="${ssrRenderStyle(value)}"`; + } else { + ret += ssrRenderDynamicAttr(key, value, tag); + } + } + return ret; +} +function ssrRenderDynamicAttr(key, value, tag) { + if (!isRenderableAttrValue(value)) { + return ``; + } + const attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase(); + if (isBooleanAttr(attrKey)) { + return includeBooleanAttr(value) ? ` ${attrKey}` : ``; + } else if (isSSRSafeAttrName(attrKey)) { + return value === "" ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`; + } else { + console.warn( + `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` + ); + return ``; + } +} +function ssrRenderAttr(key, value) { + if (!isRenderableAttrValue(value)) { + return ``; + } + return ` ${key}="${escapeHtml(value)}"`; +} +function ssrRenderClass(raw) { + return escapeHtml(normalizeClass(raw)); +} +function ssrRenderStyle(raw) { + if (!raw) { + return ""; + } + if (isString(raw)) { + return escapeHtml(raw); + } + const styles = normalizeStyle(raw); + return escapeHtml(stringifyStyle(styles)); +} + +function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { + return renderComponentVNode( + createVNode(comp, props, children), + parentComponent, + slotScopeId + ); +} + +function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { + push(`<!--[-->`); + ssrRenderSlotInner( + slots, + slotName, + slotProps, + fallbackRenderFn, + push, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); +} +function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { + const slotFn = slots[slotName]; + if (slotFn) { + const slotBuffer = []; + const bufferedPush = (item) => { + slotBuffer.push(item); + }; + const ret = slotFn( + slotProps, + bufferedPush, + parentComponent, + slotScopeId ? " " + slotScopeId : "" + ); + if (isArray(ret)) { + renderVNodeChildren(push, ret, parentComponent, slotScopeId); + } else { + let isEmptySlot = true; + if (transition) { + isEmptySlot = false; + } else { + for (let i = 0; i < slotBuffer.length; i++) { + if (!isComment(slotBuffer[i])) { + isEmptySlot = false; + break; + } + } + } + if (isEmptySlot) { + if (fallbackRenderFn) { + fallbackRenderFn(); + } + } else { + let start = 0; + let end = slotBuffer.length; + if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { + start++; + end--; + } + for (let i = start; i < end; i++) { + push(slotBuffer[i]); + } + } + } + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } +} +const commentTestRE = /^<!--.*-->$/s; +const commentRE = /<!--[^]*?-->/gm; +function isComment(item) { + if (typeof item !== "string" || !commentTestRE.test(item)) + return false; + if (item.length <= 8) + return true; + return !item.replace(commentRE, "").trim(); +} + +function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { + parentPush("<!--teleport start-->"); + const context = parentComponent.appContext.provides[ssrContextKey]; + const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); + const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); + const bufferIndex = targetBuffer.length; + let teleportContent; + if (disabled) { + contentRenderFn(parentPush); + teleportContent = `<!--teleport anchor-->`; + } else { + const { getBuffer, push } = createBuffer(); + contentRenderFn(push); + push(`<!--teleport anchor-->`); + teleportContent = getBuffer(); + } + targetBuffer.splice(bufferIndex, 0, teleportContent); + parentPush("<!--teleport end-->"); +} + +function ssrInterpolate(value) { + return escapeHtml(toDisplayString(value)); +} + +function ssrRenderList(source, renderItem) { + if (isArray(source) || isString(source)) { + for (let i = 0, l = source.length; i < l; i++) { + renderItem(source[i], i); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn(`The v-for range expect an integer value but got ${source}.`); + return; + } + for (let i = 0; i < source; i++) { + renderItem(i + 1, i); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + const arr = Array.from(source); + for (let i = 0, l = arr.length; i < l; i++) { + renderItem(arr[i], i); + } + } else { + const keys = Object.keys(source); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + renderItem(source[key], key, i); + } + } + } +} + +async function ssrRenderSuspense(push, { default: renderContent }) { + if (renderContent) { + renderContent(); + } else { + push(`<!---->`); + } +} + +function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { + if (typeof dir !== "function" && dir.getSSRProps) { + return dir.getSSRProps( + { + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }, + null + ) || {}; + } + return {}; +} + +const ssrLooseEqual = looseEqual; +function ssrLooseContain(arr, value) { + return looseIndexOf(arr, value) > -1; +} +function ssrRenderDynamicModel(type, model, value) { + switch (type) { + case "radio": + return looseEqual(model, value) ? " checked" : ""; + case "checkbox": + return (isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; + default: + return ssrRenderAttr("value", model); + } +} +function ssrGetDynamicModelProps(existingProps = {}, model) { + const { type, value } = existingProps; + switch (type) { + case "radio": + return looseEqual(model, value) ? { checked: true } : null; + case "checkbox": + return (isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; + default: + return { value: model }; + } +} + +function ssrCompile(template, instance) { + { + throw new Error( + `On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.` + ); + } +} + +const { + createComponentInstance, + setCurrentRenderingInstance, + setupComponent, + renderComponentRoot, + normalizeVNode +} = ssrUtils; +function createBuffer() { + let appendable = false; + const buffer = []; + return { + getBuffer() { + return buffer; + }, + push(item) { + const isStringItem = isString(item); + if (appendable && isStringItem) { + buffer[buffer.length - 1] += item; + } else { + buffer.push(item); + } + appendable = isStringItem; + if (isPromise(item) || isArray(item) && item.hasAsync) { + buffer.hasAsync = true; + } + } + }; +} +function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { + const instance = createComponentInstance(vnode, parentComponent, null); + const res = setupComponent( + instance, + true + /* isSSR */ + ); + const hasAsyncSetup = isPromise(res); + const prefetches = instance.sp; + if (hasAsyncSetup || prefetches) { + let p = hasAsyncSetup ? res : Promise.resolve(); + if (prefetches) { + p = p.then( + () => Promise.all( + prefetches.map((prefetch) => prefetch.call(instance.proxy)) + ) + ).catch(NOOP); + } + return p.then(() => renderComponentSubTree(instance, slotScopeId)); + } else { + return renderComponentSubTree(instance, slotScopeId); + } +} +function renderComponentSubTree(instance, slotScopeId) { + const comp = instance.type; + const { getBuffer, push } = createBuffer(); + if (isFunction(comp)) { + let root = renderComponentRoot(instance); + if (!comp.props) { + for (const key in instance.attrs) { + if (key.startsWith(`data-v-`)) { + (root.props || (root.props = {}))[key] = ``; + } + } + } + renderVNode(push, instance.subTree = root, instance, slotScopeId); + } else { + if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) { + comp.ssrRender = ssrCompile(comp.template); + } + for (const e of instance.scope.effects) { + if (e.computed) { + e.computed._dirty = true; + e.computed._cacheable = true; + } + } + const ssrRender = instance.ssrRender || comp.ssrRender; + if (ssrRender) { + let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; + let hasCloned = false; + let cur = instance; + while (true) { + const scopeId = cur.vnode.scopeId; + if (scopeId) { + if (!hasCloned) { + attrs = { ...attrs }; + hasCloned = true; + } + attrs[scopeId] = ""; + } + const parent = cur.parent; + if (parent && parent.subTree && parent.subTree === cur.vnode) { + cur = parent; + } else { + break; + } + } + if (slotScopeId) { + if (!hasCloned) + attrs = { ...attrs }; + attrs[slotScopeId.trim()] = ""; + } + const prev = setCurrentRenderingInstance(instance); + try { + ssrRender( + instance.proxy, + push, + instance, + attrs, + // compiler-optimized bindings + instance.props, + instance.setupState, + instance.data, + instance.ctx + ); + } finally { + setCurrentRenderingInstance(prev); + } + } else if (instance.render && instance.render !== NOOP) { + renderVNode( + push, + instance.subTree = renderComponentRoot(instance), + instance, + slotScopeId + ); + } else { + const componentName = comp.name || comp.__file || `<Anonymous>`; + warn(`Component ${componentName} is missing template or render function.`); + push(`<!---->`); + } + } + return getBuffer(); +} +function renderVNode(push, vnode, parentComponent, slotScopeId) { + const { type, shapeFlag, children } = vnode; + switch (type) { + case Text: + push(escapeHtml(children)); + break; + case Comment: + push( + children ? `<!--${escapeHtmlComment(children)}-->` : `<!---->` + ); + break; + case Static: + push(children); + break; + case Fragment: + if (vnode.slotScopeIds) { + slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); + } + push(`<!--[-->`); + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); + break; + default: + if (shapeFlag & 1) { + renderElementVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 6) { + push(renderComponentVNode(vnode, parentComponent, slotScopeId)); + } else if (shapeFlag & 64) { + renderTeleportVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 128) { + renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); + } else { + warn( + "[@vue/server-renderer] Invalid VNode type:", + type, + `(${typeof type})` + ); + } + } +} +function renderVNodeChildren(push, children, parentComponent, slotScopeId) { + for (let i = 0; i < children.length; i++) { + renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); + } +} +function renderElementVNode(push, vnode, parentComponent, slotScopeId) { + const tag = vnode.type; + let { props, children, shapeFlag, scopeId, dirs } = vnode; + let openTag = `<${tag}`; + if (dirs) { + props = applySSRDirectives(vnode, props, dirs); + } + if (props) { + openTag += ssrRenderAttrs(props, tag); + } + if (scopeId) { + openTag += ` ${scopeId}`; + } + let curParent = parentComponent; + let curVnode = vnode; + while (curParent && curVnode === curParent.subTree) { + curVnode = curParent.vnode; + if (curVnode.scopeId) { + openTag += ` ${curVnode.scopeId}`; + } + curParent = curParent.parent; + } + if (slotScopeId) { + openTag += ` ${slotScopeId}`; + } + push(openTag + `>`); + if (!isVoidTag(tag)) { + let hasChildrenOverride = false; + if (props) { + if (props.innerHTML) { + hasChildrenOverride = true; + push(props.innerHTML); + } else if (props.textContent) { + hasChildrenOverride = true; + push(escapeHtml(props.textContent)); + } else if (tag === "textarea" && props.value) { + hasChildrenOverride = true; + push(escapeHtml(props.value)); + } + } + if (!hasChildrenOverride) { + if (shapeFlag & 8) { + push(escapeHtml(children)); + } else if (shapeFlag & 16) { + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + } + } + push(`</${tag}>`); + } +} +function applySSRDirectives(vnode, rawProps, dirs) { + const toMerge = []; + for (let i = 0; i < dirs.length; i++) { + const binding = dirs[i]; + const { + dir: { getSSRProps } + } = binding; + if (getSSRProps) { + const props = getSSRProps(binding, vnode); + if (props) + toMerge.push(props); + } + } + return mergeProps(rawProps || {}, ...toMerge); +} +function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { + const target = vnode.props && vnode.props.to; + const disabled = vnode.props && vnode.props.disabled; + if (!target) { + if (!disabled) { + warn(`[@vue/server-renderer] Teleport is missing target prop.`); + } + return []; + } + if (!isString(target)) { + warn( + `[@vue/server-renderer] Teleport target must be a query selector string.` + ); + return []; + } + ssrRenderTeleport( + push, + (push2) => { + renderVNodeChildren( + push2, + vnode.children, + parentComponent, + slotScopeId + ); + }, + target, + disabled || disabled === "", + parentComponent + ); +} + +const { isVNode: isVNode$1 } = ssrUtils; +async function unrollBuffer$1(buffer) { + if (buffer.hasAsync) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isPromise(item)) { + item = await item; + } + if (isString(item)) { + ret += item; + } else { + ret += await unrollBuffer$1(item); + } + } + return ret; + } else { + return unrollBufferSync$1(buffer); + } +} +function unrollBufferSync$1(buffer) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isString(item)) { + ret += item; + } else { + ret += unrollBufferSync$1(item); + } + } + return ret; +} +async function renderToString(input, context = {}) { + if (isVNode$1(input)) { + return renderToString(createApp({ render: () => input }), context); + } + const vnode = createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(ssrContextKey, context); + const buffer = await renderComponentVNode(vnode); + const result = await unrollBuffer$1(buffer); + await resolveTeleports(context); + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + return result; +} +async function resolveTeleports(context) { + if (context.__teleportBuffers) { + context.teleports = context.teleports || {}; + for (const key in context.__teleportBuffers) { + context.teleports[key] = await unrollBuffer$1( + await Promise.all([context.__teleportBuffers[key]]) + ); + } + } +} + +const { isVNode } = ssrUtils; +async function unrollBuffer(buffer, stream) { + if (buffer.hasAsync) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isPromise(item)) { + item = await item; + } + if (isString(item)) { + stream.push(item); + } else { + await unrollBuffer(item, stream); + } + } + } else { + unrollBufferSync(buffer, stream); + } +} +function unrollBufferSync(buffer, stream) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isString(item)) { + stream.push(item); + } else { + unrollBufferSync(item, stream); + } + } +} +function renderToSimpleStream(input, context, stream) { + if (isVNode(input)) { + return renderToSimpleStream( + createApp({ render: () => input }), + context, + stream + ); + } + const vnode = createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(ssrContextKey, context); + Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + }).then(() => stream.push(null)).catch((error) => { + stream.destroy(error); + }); + return stream; +} +function renderToStream(input, context = {}) { + console.warn( + `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` + ); + return renderToNodeStream(input, context); +} +function renderToNodeStream(input, context = {}) { + { + throw new Error( + `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` + ); + } +} +function pipeToNodeWritable(input, context = {}, writable) { + renderToSimpleStream(input, context, { + push(content) { + if (content != null) { + writable.write(content); + } else { + writable.end(); + } + }, + destroy(err) { + writable.destroy(err); + } + }); +} +function renderToWebStream(input, context = {}) { + if (typeof ReadableStream !== "function") { + throw new Error( + `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` + ); + } + const encoder = new TextEncoder(); + let cancelled = false; + return new ReadableStream({ + start(controller) { + renderToSimpleStream(input, context, { + push(content) { + if (cancelled) + return; + if (content != null) { + controller.enqueue(encoder.encode(content)); + } else { + controller.close(); + } + }, + destroy(err) { + controller.error(err); + } + }); + }, + cancel() { + cancelled = true; + } + }); +} +function pipeToWebWritable(input, context = {}, writable) { + const writer = writable.getWriter(); + const encoder = new TextEncoder(); + let hasReady = false; + try { + hasReady = isPromise(writer.ready); + } catch (e) { + } + renderToSimpleStream(input, context, { + async push(content) { + if (hasReady) { + await writer.ready; + } + if (content != null) { + return writer.write(encoder.encode(content)); + } else { + return writer.close(); + } + }, + destroy(err) { + console.log(err); + writer.close(); + } + }); +} + +initDirectivesForSSR(); + +export { pipeToNodeWritable, pipeToWebWritable, renderToNodeStream, renderToSimpleStream, renderToStream, renderToString, renderToWebStream, ssrGetDirectiveProps, ssrGetDynamicModelProps, includeBooleanAttr as ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrLooseEqual, ssrRenderAttr, ssrRenderAttrs, ssrRenderClass, ssrRenderComponent, ssrRenderDynamicAttr, ssrRenderDynamicModel, ssrRenderList, ssrRenderSlot, ssrRenderSlotInner, ssrRenderStyle, ssrRenderSuspense, ssrRenderTeleport, renderVNode as ssrRenderVNode }; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js b/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js new file mode 100644 index 00000000..c28f550b --- /dev/null +++ b/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js @@ -0,0 +1,6 @@ +/** +* @vue/server-renderer v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],r=()=>{},o=()=>!1,s=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),i=e=>e.startsWith("onUpdate:"),l=Object.assign,c=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,a=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>"[object Map]"===x(e),d=e=>"[object Set]"===x(e),h=e=>"[object Date]"===x(e),m=e=>"function"==typeof e,g=e=>"string"==typeof e,v=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,_=e=>(y(e)||m(e))&&m(e.then)&&m(e.catch),b=Object.prototype.toString,x=e=>b.call(e),w=e=>x(e).slice(8,-1),S=e=>"[object Object]"===x(e),C=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,k=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),O=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},E=/-(\w)/g,P=O((e=>e.replace(E,((e,t)=>t?t.toUpperCase():"")))),R=/\B([A-Z])/g,T=O((e=>e.replace(R,"-$1").toLowerCase())),F=O((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=O((e=>e?`on${F(e)}`:"")),A=(e,t)=>!Object.is(e,t),$=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},I=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},L=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let j;const N=()=>j||(j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function V(e){if(f(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=g(r)?D(r):V(r);if(o)for(const e in o)t[e]=o[e]}return t}if(g(e)||y(e))return e}const U=/;(?![^(]*\))/g,B=/:([^]+)/,W=/\/\*[^]*?\*\//g;function D(e){const t={};return e.replace(W,"").split(U).forEach((e=>{if(e){const n=e.split(B);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function H(e){let t="";if(g(e))t=e;else if(f(e))for(let n=0;n<e.length;n++){const r=H(e[n]);r&&(t+=r+" ")}else if(y(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const z=e("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),q=e("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),G="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",K=e(G),J=e(G+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function X(e){return!!e||""===e}const Z=/[>/="'\u0009\u000a\u000c\u0020]/,Q={};const Y={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"};function ee(e){if(null==e)return!1;const t=typeof e;return"string"===t||"number"===t||"boolean"===t}const te=/["'&<>]/;function ne(e){const t=""+e,n=te.exec(t);if(!n)return t;let r,o,s="",i=0;for(o=n.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:r=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";break;default:continue}i!==o&&(s+=t.slice(i,o)),i=o+1,s+=r}return i!==o?s+t.slice(i,o):s}const re=/^-?>|<!--|-->|--!>|<!-$/g;function oe(e,t){if(e===t)return!0;let n=h(e),r=h(t);if(n||r)return!(!n||!r)&&e.getTime()===t.getTime();if(n=v(e),r=v(t),n||r)return e===t;if(n=f(e),r=f(t),n||r)return!(!n||!r)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=oe(e[r],t[r]);return n}(e,t);if(n=y(e),r=y(t),n||r){if(!n||!r)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const r=e.hasOwnProperty(n),o=t.hasOwnProperty(n);if(r&&!o||!r&&o||!oe(e[n],t[n]))return!1}}return String(e)===String(t)}const se=(e,t)=>t&&t.__v_isRef?se(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],r)=>(e[ie(t,r)+" =>"]=n,e)),{})}:d(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ie(e)))}:v(t)?ie(t):!y(t)||f(t)||S(t)?t:String(t),ie=(e,t="")=>{var n;return v(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let le,ce;class ue{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=le,!e&&le&&(this.index=(le.scopes||(le.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=le;try{return le=this,e()}finally{le=t}}}on(){le=this}off(){le=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}class ae{constructor(e,t,n,r){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,function(e,t=le){t&&t.active&&t.effects.push(e)}(this,r)}get dirty(){if(1===this._dirtyLevel){ye();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(fe(t.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),_e()}return this._dirtyLevel>=2}set dirty(e){this._dirtyLevel=e?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=me,t=ce;try{return me=!0,ce=this,this._runnings++,pe(this),this.fn()}finally{de(this),this._runnings--,ce=t,me=e}}stop(){var e;this.active&&(pe(this),de(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function fe(e){return e.value}function pe(e){e._trackId++,e._depsLength=0}function de(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)he(e.deps[t],e);e.deps.length=e._depsLength}}function he(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}let me=!0,ge=0;const ve=[];function ye(){ve.push(me),me=!1}function _e(){const e=ve.pop();me=void 0===e||e}function be(){ge++}function xe(){for(ge--;!ge&&Se.length;)Se.shift()()}function we(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&he(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Se=[];function Ce(e,t,n){be();for(const r of e.keys())if(r._dirtyLevel<t&&e.get(r)===r._trackId){const e=r._dirtyLevel;r._dirtyLevel=t,0===e&&(r._shouldSchedule=!0,r.trigger())}ke(e),xe()}function ke(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,Se.push(t.scheduler))}const Oe=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Ee=new WeakMap,Pe=Symbol(""),Re=Symbol("");function Te(e,t,n){if(me&&ce){let t=Ee.get(e);t||Ee.set(e,t=new Map);let r=t.get(n);r||t.set(n,r=Oe((()=>t.delete(n)))),we(ce,r)}}function Fe(e,t,n,r,o,s){const i=Ee.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&f(e)){const e=Number(r);i.forEach(((t,n)=>{("length"===n||!v(n)&&n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":f(e)?C(n)&&l.push(i.get("length")):(l.push(i.get(Pe)),p(e)&&l.push(i.get(Re)));break;case"delete":f(e)||(l.push(i.get(Pe)),p(e)&&l.push(i.get(Re)));break;case"set":p(e)&&l.push(i.get(Pe))}be();for(const c of l)c&&Ce(c,2);xe()}const Me=e("__proto__,__v_isRef,__isVue"),Ae=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(v)),$e=Ie();function Ie(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=xt(this);for(let t=0,o=this.length;t<o;t++)Te(n,0,t+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(xt)):r}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){ye(),be();const n=xt(this)[t].apply(this,e);return xe(),_e(),n}})),e}function Le(e){const t=xt(this);return Te(t,0,e),t.hasOwnProperty(e)}class je{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const r=this._isReadonly,o=this._shallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(r?o?dt:pt:o?ft:at).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=f(e);if(!r){if(s&&a($e,t))return Reflect.get($e,t,n);if("hasOwnProperty"===t)return Le}const i=Reflect.get(e,t,n);return(v(t)?Ae.has(t):Me(t))?i:(r||Te(e,0,t),o?i:Et(i)?s&&C(t)?i:i.value:y(i)?r?mt(i):ht(i):i)}}class Ne extends je{constructor(e=!1){super(!1,e)}set(e,t,n,r){let o=e[t];if(!this._shallow){const t=yt(o);if(_t(n)||yt(n)||(o=xt(o),n=xt(n)),!f(e)&&Et(o)&&!Et(n))return!t&&(o.value=n,!0)}const s=f(e)&&C(t)?Number(t)<e.length:a(e,t),i=Reflect.set(e,t,n,r);return e===xt(r)&&(s?A(n,o)&&Fe(e,"set",t,n):Fe(e,"add",t,n)),i}deleteProperty(e,t){const n=a(e,t),r=Reflect.deleteProperty(e,t);return r&&n&&Fe(e,"delete",t,void 0),r}has(e,t){const n=Reflect.has(e,t);return v(t)&&Ae.has(t)||Te(e,0,t),n}ownKeys(e){return Te(e,0,f(e)?"length":Pe),Reflect.ownKeys(e)}}class Ve extends je{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Ue=new Ne,Be=new Ve,We=new Ne(!0),De=e=>e,He=e=>Reflect.getPrototypeOf(e);function ze(e,t,n=!1,r=!1){const o=xt(e=e.__v_raw),s=xt(t);n||(A(t,s)&&Te(o,0,t),Te(o,0,s));const{has:i}=He(o),l=r?De:n?Ct:St;return i.call(o,t)?l(e.get(t)):i.call(o,s)?l(e.get(s)):void(e!==o&&e.get(t))}function qe(e,t=!1){const n=this.__v_raw,r=xt(n),o=xt(e);return t||(A(e,o)&&Te(r,0,e),Te(r,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function Ge(e,t=!1){return e=e.__v_raw,!t&&Te(xt(e),0,Pe),Reflect.get(e,"size",e)}function Ke(e){e=xt(e);const t=xt(this);return He(t).has.call(t,e)||(t.add(e),Fe(t,"add",e,e)),this}function Je(e,t){t=xt(t);const n=xt(this),{has:r,get:o}=He(n);let s=r.call(n,e);s||(e=xt(e),s=r.call(n,e));const i=o.call(n,e);return n.set(e,t),s?A(t,i)&&Fe(n,"set",e,t):Fe(n,"add",e,t),this}function Xe(e){const t=xt(this),{has:n,get:r}=He(t);let o=n.call(t,e);o||(e=xt(e),o=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return o&&Fe(t,"delete",e,void 0),s}function Ze(){const e=xt(this),t=0!==e.size,n=e.clear();return t&&Fe(e,"clear",void 0,void 0),n}function Qe(e,t){return function(n,r){const o=this,s=o.__v_raw,i=xt(s),l=t?De:e?Ct:St;return!e&&Te(i,0,Pe),s.forEach(((e,t)=>n.call(r,l(e),l(t),o)))}}function Ye(e,t,n){return function(...r){const o=this.__v_raw,s=xt(o),i=p(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,u=o[e](...r),a=n?De:t?Ct:St;return!t&&Te(s,0,c?Re:Pe),{next(){const{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:l?[a(e[0]),a(e[1])]:a(e),done:t}},[Symbol.iterator](){return this}}}}function et(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function tt(){const e={get(e){return ze(this,e)},get size(){return Ge(this)},has:qe,add:Ke,set:Je,delete:Xe,clear:Ze,forEach:Qe(!1,!1)},t={get(e){return ze(this,e,!1,!0)},get size(){return Ge(this)},has:qe,add:Ke,set:Je,delete:Xe,clear:Ze,forEach:Qe(!1,!0)},n={get(e){return ze(this,e,!0)},get size(){return Ge(this,!0)},has(e){return qe.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Qe(!0,!1)},r={get(e){return ze(this,e,!0,!0)},get size(){return Ge(this,!0)},has(e){return qe.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=Ye(o,!1,!1),n[o]=Ye(o,!0,!1),t[o]=Ye(o,!1,!0),r[o]=Ye(o,!0,!0)})),[e,n,t,r]}const[nt,rt,ot,st]=tt();function it(e,t){const n=t?e?st:ot:e?rt:nt;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(a(n,r)&&r in t?n:t,r,o)}const lt={get:it(!1,!1)},ct={get:it(!1,!0)},ut={get:it(!0,!1)},at=new WeakMap,ft=new WeakMap,pt=new WeakMap,dt=new WeakMap;function ht(e){return yt(e)?e:gt(e,!1,Ue,lt,at)}function mt(e){return gt(e,!0,Be,ut,pt)}function gt(e,t,n,r,o){if(!y(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=o.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(w(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?r:n);return o.set(e,c),c}function vt(e){return yt(e)?vt(e.__v_raw):!(!e||!e.__v_isReactive)}function yt(e){return!(!e||!e.__v_isReadonly)}function _t(e){return!(!e||!e.__v_isShallow)}function bt(e){return vt(e)||yt(e)}function xt(e){const t=e&&e.__v_raw;return t?xt(t):e}function wt(e){return I(e,"__v_skip",!0),e}const St=e=>y(e)?ht(e):e,Ct=e=>y(e)?mt(e):e;class kt{constructor(e,t,n,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ae((()=>e(this._value)),(()=>Ot(this,1)),(()=>this.dep&&ke(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=n}get value(){const e=xt(this);var t;return e._cacheable&&!e.effect.dirty||A(e._value,e._value=e.effect.run())&&Ot(e,2),t=e,me&&ce&&(t=xt(t),we(ce,t.dep||(t.dep=Oe((()=>t.dep=void 0),t instanceof kt?t:void 0)))),e.effect._dirtyLevel>=1&&Ot(e,1),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Ot(e,t=2,n){const r=(e=xt(e)).dep;r&&Ce(r,t)}function Et(e){return!(!e||!0!==e.__v_isRef)}const Pt={get:(e,t,n)=>{return Et(r=Reflect.get(e,t,n))?r.value:r;var r},set:(e,t,n,r)=>{const o=e[t];return Et(o)&&!Et(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function Rt(e){return vt(e)?e:new Proxy(e,Pt)}function Tt(e,t,n,r){let o;try{o=r?e(...r):e()}catch(s){Mt(s,t,n)}return o}function Ft(e,t,n,r){if(m(e)){const o=Tt(e,t,n,r);return o&&_(o)&&o.catch((e=>{Mt(e,t,n)})),o}const o=[];for(let s=0;s<e.length;s++)o.push(Ft(e[s],t,n,r));return o}function Mt(e,t,n,r=!0){if(t){let r=t.parent;const o=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,o,s))return;r=r.parent}const i=t.appContext.config.errorHandler;if(i)return void Tt(i,null,10,[e,o,s])}!function(e,t,n,r=!0){console.error(e)}(e,0,0,r)}let At=!1,$t=!1;const It=[];let Lt=0;const jt=[];let Nt=null,Vt=0;const Ut=Promise.resolve();let Bt=null;function Wt(e){const t=Bt||Ut;return e?t.then(this?e.bind(this):e):t}function Dt(e){It.length&&It.includes(e,At&&e.allowRecurse?Lt+1:Lt)||(null==e.id?It.push(e):It.splice(function(e){let t=Lt+1,n=It.length;for(;t<n;){const r=t+n>>>1,o=It[r],s=Gt(o);s<e||s===e&&o.pre?t=r+1:n=r}return t}(e.id),0,e),Ht())}function Ht(){At||$t||($t=!0,Bt=Ut.then(Jt))}function zt(e,t,n=(At?Lt+1:0)){for(;n<It.length;n++){const t=It[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;It.splice(n,1),n--,t()}}}function qt(e){if(jt.length){const e=[...new Set(jt)].sort(((e,t)=>Gt(e)-Gt(t)));if(jt.length=0,Nt)return void Nt.push(...e);for(Nt=e,Vt=0;Vt<Nt.length;Vt++)Nt[Vt]();Nt=null,Vt=0}}const Gt=e=>null==e.id?1/0:e.id,Kt=(e,t)=>{const n=Gt(e)-Gt(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Jt(e){$t=!1,At=!0,It.sort(Kt);try{for(Lt=0;Lt<It.length;Lt++){const e=It[Lt];e&&!1!==e.active&&Tt(e,null,14)}}finally{Lt=0,It.length=0,qt(),At=!1,Bt=null,(It.length||jt.length)&&Jt()}}function Xt(e,n,...r){if(e.isUnmounted)return;const o=e.vnode.props||t;let s=r;const i=n.startsWith("update:"),l=i&&n.slice(7);if(l&&l in o){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:n,trim:i}=o[e]||t;i&&(s=r.map((e=>g(e)?e.trim():e))),n&&(s=r.map(L))}let c,u=o[c=M(n)]||o[c=M(P(n))];!u&&i&&(u=o[c=M(T(n))]),u&&Ft(u,e,6,s);const a=o[c+"Once"];if(a){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Ft(a,e,6,s)}}function Zt(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(void 0!==o)return o;const s=e.emits;let i={},c=!1;if(!m(e)){const r=e=>{const n=Zt(e,t,!0);n&&(c=!0,l(i,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return s||c?(f(s)?s.forEach((e=>i[e]=null)):l(i,s),y(e)&&r.set(e,i),i):(y(e)&&r.set(e,null),null)}function Qt(e,t){return!(!e||!s(t))&&(t=t.slice(2).replace(/Once$/,""),a(e,t[0].toLowerCase()+t.slice(1))||a(e,T(t))||a(e,t))}let Yt=null,en=null;function tn(e){const t=Yt;return Yt=e,en=e&&e.type.__scopeId||null,t}function nn(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:s,propsOptions:[l],slots:c,attrs:u,emit:a,render:f,renderCache:p,data:d,setupState:h,ctx:m,inheritAttrs:g}=e;let v,y;const _=tn(e);try{if(4&n.shapeFlag){const e=o||r;v=Ur(f.call(e,e,p,s,h,d,m)),y=u}else{const e=t;0,v=Ur(e(s,e.length>1?{attrs:u,slots:c,emit:a}:null)),y=t.props?u:rn(u)}}catch(x){Mt(x,e,1),v=jr(Er)}let b=v;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=b;e.length&&7&t&&(l&&e.some(i)&&(y=on(y,l)),b=Nr(b,y))}return n.dirs&&(b=Nr(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),v=b,tn(_),v}const rn=e=>{let t;for(const n in e)("class"===n||"style"===n||s(n))&&((t||(t={}))[n]=e[n]);return t},on=(e,t)=>{const n={};for(const r in e)i(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function sn(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const s=r[o];if(t[s]!==e[s]&&!Qt(n,s))return!0}return!1}const ln=Symbol.for("v-ndc");const cn=Symbol.for("v-scx"),un=()=>nr(cn),an={};function fn(e,t,n){return pn(e,t,n)}function pn(e,n,{immediate:o,deep:s,flush:i,once:l}=t){if(n&&l){const e=n;n=(...t)=>{e(...t),C()}}const u=Xr,a=e=>!0===s?e:mn(e,!1===s?1:void 0);let p,d,h=!1,g=!1;if(Et(e)?(p=()=>e.value,h=_t(e)):vt(e)?(p=()=>a(e),h=!0):f(e)?(g=!0,h=e.some((e=>vt(e)||_t(e))),p=()=>e.map((e=>Et(e)?e.value:vt(e)?a(e):m(e)?Tt(e,u,2):void 0))):p=m(e)?n?()=>Tt(e,u,2):()=>(d&&d(),Ft(e,u,3,[y])):r,n&&s){const e=p;p=()=>mn(e())}let v,y=e=>{d=w.onStop=()=>{Tt(e,u,4),d=w.onStop=void 0}};if(to){if(y=r,n?o&&Ft(n,u,3,[p(),g?[]:void 0,y]):p(),"sync"!==i)return r;{const e=un();v=e.__watcherHandles||(e.__watcherHandles=[])}}let _=g?new Array(e.length).fill(an):an;const b=()=>{if(w.active&&w.dirty)if(n){const e=w.run();(s||h||(g?e.some(((e,t)=>A(e,_[t]))):A(e,_)))&&(d&&d(),Ft(n,u,3,[e,_===an?void 0:g&&_[0]===an?[]:_,y]),_=e)}else w.run()};let x;b.allowRecurse=!!n,"sync"===i?x=b:"post"===i?x=()=>_r(b,u&&u.suspense):(b.pre=!0,u&&(b.id=u.uid),x=()=>Dt(b));const w=new ae(p,r,x),S=le,C=()=>{w.stop(),S&&c(S.effects,w)};return n?o?b():_=w.run():"post"===i?_r(w.run.bind(w),u&&u.suspense):w.run(),v&&v.push(C),C}function dn(e,t,n){const r=this.proxy,o=g(e)?e.includes(".")?hn(r,e):()=>r[e]:e.bind(r,r);let s;m(t)?s=t:(s=t.handler,n=t);const i=Zr(this),l=pn(o,s.bind(r),n);return i(),l}function hn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function mn(e,t,n=0,r){if(!y(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((r=r||new Set).has(e))return e;if(r.add(e),Et(e))mn(e.value,t,n,r);else if(f(e))for(let o=0;o<e.length;o++)mn(e[o],t,n,r);else if(d(e)||p(e))e.forEach((e=>{mn(e,t,n,r)}));else if(S(e))for(const o in e)mn(e[o],t,n,r);return e}function gn(e,t,n,r){const o=e.dirs,s=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];s&&(l.oldValue=s[i].value);let c=l.dir[r];c&&(ye(),Ft(c,n,8,[e.el,l,e,t]),_e())}}const vn=e=>!!e.type.__asyncLoader,yn=e=>e.type.__isKeepAlive;function _n(e,t){xn(e,"a",t)}function bn(e,t){xn(e,"da",t)}function xn(e,t,n=Xr){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Sn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)yn(e.parent.vnode)&&wn(r,t,n,e),e=e.parent}}function wn(e,t,n,r){const o=Sn(t,e,r,!0);Tn((()=>{c(r[t],o)}),n)}function Sn(e,t,n=Xr,r=!1){if(n){const o=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;ye();const o=Zr(n),s=Ft(t,n,e,r);return o(),_e(),s});return r?o.unshift(s):o.push(s),s}}const Cn=e=>(t,n=Xr)=>(!to||"sp"===e)&&Sn(e,((...e)=>t(...e)),n),kn=Cn("bm"),On=Cn("m"),En=Cn("bu"),Pn=Cn("u"),Rn=Cn("bum"),Tn=Cn("um"),Fn=Cn("sp"),Mn=Cn("rtg"),An=Cn("rtc");function $n(e,t=Xr){Sn("ec",e,t)}const In=e=>e?Yr(e)?so(e)||e.proxy:In(e.parent):null,Ln=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>In(e.parent),$root:e=>In(e.root),$emit:e=>e.emit,$options:e=>Hn(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Dt(e.update)}),$nextTick:e=>e.n||(e.n=Wt.bind(e.proxy)),$watch:e=>dn.bind(e)}),jn=(e,n)=>e!==t&&!e.__isScriptSetup&&a(e,n),Nn={get({_:e},n){const{ctx:r,setupState:o,data:s,props:i,accessCache:l,type:c,appContext:u}=e;let f;if("$"!==n[0]){const c=l[n];if(void 0!==c)switch(c){case 1:return o[n];case 2:return s[n];case 4:return r[n];case 3:return i[n]}else{if(jn(o,n))return l[n]=1,o[n];if(s!==t&&a(s,n))return l[n]=2,s[n];if((f=e.propsOptions[0])&&a(f,n))return l[n]=3,i[n];if(r!==t&&a(r,n))return l[n]=4,r[n];Un&&(l[n]=0)}}const p=Ln[n];let d,h;return p?("$attrs"===n&&Te(e,0,n),p(e)):(d=c.__cssModules)&&(d=d[n])?d:r!==t&&a(r,n)?(l[n]=4,r[n]):(h=u.config.globalProperties,a(h,n)?h[n]:void 0)},set({_:e},n,r){const{data:o,setupState:s,ctx:i}=e;return jn(s,n)?(s[n]=r,!0):o!==t&&a(o,n)?(o[n]=r,!0):!a(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(i[n]=r,!0))},has({_:{data:e,setupState:n,accessCache:r,ctx:o,appContext:s,propsOptions:i}},l){let c;return!!r[l]||e!==t&&a(e,l)||jn(n,l)||(c=i[0])&&a(c,l)||a(o,l)||a(Ln,l)||a(s.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:a(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Vn(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Un=!0;function Bn(e){const t=Hn(e),n=e.proxy,o=e.ctx;Un=!1,t.beforeCreate&&Wn(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:c,provide:u,inject:a,created:p,beforeMount:d,mounted:h,beforeUpdate:g,updated:v,activated:_,deactivated:b,beforeUnmount:x,unmounted:w,render:S,renderTracked:C,renderTriggered:k,errorCaptured:O,serverPrefetch:E,expose:P,inheritAttrs:R,components:T,directives:F}=t;if(a&&function(e,t,n=r){f(e)&&(e=Kn(e));for(const r in e){const n=e[r];let o;o=y(n)?"default"in n?nr(n.from||r,n.default,!0):nr(n.from||r):nr(n),Et(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[r]=o}}(a,o,null),l)for(const r in l){const e=l[r];m(e)&&(o[r]=e.bind(n))}if(s){const t=s.call(n,n);y(t)&&(e.data=ht(t))}if(Un=!0,i)for(const f in i){const e=i[f],t=m(e)?e.bind(n,n):m(e.get)?e.get.bind(n,n):r,s=!m(e)&&m(e.set)?e.set.bind(n):r,l=io({get:t,set:s});Object.defineProperty(o,f,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const r in c)Dn(c[r],o,n,r);if(u){const e=m(u)?u.call(n):u;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(Xr){let n=Xr.provides;const r=Xr.parent&&Xr.parent.provides;r===n&&(n=Xr.provides=Object.create(r)),n[e]=t}else;}(t,e[t])}))}function M(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&Wn(p,e,"c"),M(kn,d),M(On,h),M(En,g),M(Pn,v),M(_n,_),M(bn,b),M($n,O),M(An,C),M(Mn,k),M(Rn,x),M(Tn,w),M(Fn,E),f(P))if(P.length){const t=e.exposed||(e.exposed={});P.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===r&&(e.render=S),null!=R&&(e.inheritAttrs=R),T&&(e.components=T),F&&(e.directives=F)}function Wn(e,t,n){Ft(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Dn(e,t,n,r){const o=r.includes(".")?hn(n,r):()=>n[r];if(g(e)){const n=t[e];m(n)&&fn(o,n)}else if(m(e))fn(o,e.bind(n));else if(y(e))if(f(e))e.forEach((e=>Dn(e,t,n,r)));else{const r=m(e.handler)?e.handler.bind(n):t[e.handler];m(r)&&fn(o,r,e)}}function Hn(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:o.length||n||r?(c={},o.length&&o.forEach((e=>zn(c,e,i,!0))),zn(c,t,i)):c=t,y(t)&&s.set(t,c),c}function zn(e,t,n,r=!1){const{mixins:o,extends:s}=t;s&&zn(e,s,n,!0),o&&o.forEach((t=>zn(e,t,n,!0)));for(const i in t)if(r&&"expose"===i);else{const r=qn[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}const qn={data:Gn,props:Zn,emits:Zn,methods:Xn,computed:Xn,beforeCreate:Jn,created:Jn,beforeMount:Jn,mounted:Jn,beforeUpdate:Jn,updated:Jn,beforeDestroy:Jn,beforeUnmount:Jn,destroyed:Jn,unmounted:Jn,activated:Jn,deactivated:Jn,errorCaptured:Jn,serverPrefetch:Jn,components:Xn,directives:Xn,watch:function(e,t){if(!e)return t;if(!t)return e;const n=l(Object.create(null),e);for(const r in t)n[r]=Jn(e[r],t[r]);return n},provide:Gn,inject:function(e,t){return Xn(Kn(e),Kn(t))}};function Gn(e,t){return t?e?function(){return l(m(e)?e.call(this,this):e,m(t)?t.call(this,this):t)}:t:e}function Kn(e){if(f(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Jn(e,t){return e?[...new Set([].concat(e,t))]:t}function Xn(e,t){return e?l(Object.create(null),e,t):t}function Zn(e,t){return e?f(e)&&f(t)?[...new Set([...e,...t])]:l(Object.create(null),Vn(e),Vn(null!=t?t:{})):t}function Qn(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Yn=0;function er(e,t){return function(n,r=null){m(n)||(n=l({},n)),null==r||y(r)||(r=null);const o=Qn(),s=new WeakSet;let i=!1;const c=o.app={_uid:Yn++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:lo,get config(){return o.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&m(e.install)?(s.add(e),e.install(c,...t)):m(e)&&(s.add(e),e(c,...t))),c),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),c),component:(e,t)=>t?(o.components[e]=t,c):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,c):o.directives[e],mount(s,l,u){if(!i){const a=jr(n,r);return a.appContext=o,!0===u?u="svg":!1===u&&(u=void 0),l&&t?t(a,s):e(a,s,u),i=!0,c._container=s,s.__vue_app__=c,so(a.component)||a.component.proxy}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,c),runWithContext(e){tr=c;try{return e()}finally{tr=null}}};return c}}let tr=null;function nr(e,t,n=!1){const r=Xr||Yt;if(r||tr){const o=r?null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:tr._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&m(t)?t.call(r&&r.proxy):t}}function rr(e,t,n,r=!1){const o={},s={};I(s,$r,1),e.propsDefaults=Object.create(null),or(e,t,o,s);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);e.props=n?r?o:gt(o,!1,We,ct,ft):e.type.props?o:s,e.attrs=s}function or(e,n,r,o){const[s,i]=e.propsOptions;let l,c=!1;if(n)for(let t in n){if(k(t))continue;const u=n[t];let f;s&&a(s,f=P(t))?i&&i.includes(f)?(l||(l={}))[f]=u:r[f]=u:Qt(e.emitsOptions,t)||t in o&&u===o[t]||(o[t]=u,c=!0)}if(i){const n=xt(r),o=l||t;for(let t=0;t<i.length;t++){const l=i[t];r[l]=sr(s,n,l,o[l],e,!a(o,l))}}return c}function sr(e,t,n,r,o,s){const i=e[n];if(null!=i){const e=a(i,"default");if(e&&void 0===r){const e=i.default;if(i.type!==Function&&!i.skipFactory&&m(e)){const{propsDefaults:s}=o;if(n in s)r=s[n];else{const i=Zr(o);r=s[n]=e.call(null,t),i()}}else r=e}i[0]&&(s&&!e?r=!1:!i[1]||""!==r&&r!==T(n)||(r=!0))}return r}function ir(e,r,o=!1){const s=r.propsCache,i=s.get(e);if(i)return i;const c=e.props,u={},p=[];let d=!1;if(!m(e)){const t=e=>{d=!0;const[t,n]=ir(e,r,!0);l(u,t),n&&p.push(...n)};!o&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!d)return y(e)&&s.set(e,n),n;if(f(c))for(let n=0;n<c.length;n++){const e=P(c[n]);lr(e)&&(u[e]=t)}else if(c)for(const t in c){const e=P(t);if(lr(e)){const n=c[t],r=u[e]=f(n)||m(n)?{type:n}:l({},n);if(r){const t=ar(Boolean,r.type),n=ar(String,r.type);r[0]=t>-1,r[1]=n<0||t<n,(t>-1||a(r,"default"))&&p.push(e)}}}const h=[u,p];return y(e)&&s.set(e,h),h}function lr(e){return"$"!==e[0]}function cr(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function ur(e,t){return cr(e)===cr(t)}function ar(e,t){return f(t)?t.findIndex((t=>ur(t,e))):m(t)&&ur(t,e)?0:-1}const fr=e=>"_"===e[0]||"$stable"===e,pr=e=>f(e)?e.map(Ur):[Ur(e)],dr=(e,t,n)=>{if(t._n)return t;const r=function(e,t=Yt,n){if(!t)return e;if(e._n)return e;const r=(...n)=>{r._d&&Fr(-1);const o=tn(t);let s;try{s=e(...n)}finally{tn(o),r._d&&Fr(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}(((...e)=>pr(t(...e))),n);return r._c=!1,r},hr=(e,t,n)=>{const r=e._ctx;for(const o in e){if(fr(o))continue;const n=e[o];if(m(n))t[o]=dr(0,n,r);else if(null!=n){const e=pr(n);t[o]=()=>e}}},mr=(e,t)=>{const n=pr(t);e.slots.default=()=>n},gr=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=xt(t),I(t,"_",n)):hr(t,e.slots={})}else e.slots={},t&&mr(e,t);I(e.slots,$r,1)},vr=(e,n,r)=>{const{vnode:o,slots:s}=e;let i=!0,c=t;if(32&o.shapeFlag){const e=n._;e?r&&1===e?i=!1:(l(s,n),r||1!==e||delete s._):(i=!n.$stable,hr(n,s)),c=n}else n&&(mr(e,n),c={default:1});if(i)for(const t in s)fr(t)||null!=c[t]||delete s[t]};function yr(e,n,r,o,s=!1){if(f(e))return void e.forEach(((e,t)=>yr(e,n&&(f(n)?n[t]:n),r,o,s)));if(vn(o)&&!s)return;const i=4&o.shapeFlag?so(o.component)||o.component.proxy:o.el,l=s?null:i,{i:u,r:p}=e,d=n&&n.r,h=u.refs===t?u.refs={}:u.refs,v=u.setupState;if(null!=d&&d!==p&&(g(d)?(h[d]=null,a(v,d)&&(v[d]=null)):Et(d)&&(d.value=null)),m(p))Tt(p,u,12,[l,h]);else{const t=g(p),n=Et(p),o=e.f;if(t||n){const u=()=>{if(o){const n=t?a(v,p)?v[p]:h[p]:p.value;s?f(n)&&c(n,i):f(n)?n.includes(i)||n.push(i):t?(h[p]=[i],a(v,p)&&(v[p]=h[p])):(p.value=[i],e.k&&(h[e.k]=p.value))}else t?(h[p]=l,a(v,p)&&(v[p]=l)):n&&(p.value=l,e.k&&(h[e.k]=l))};s||o?u():(u.id=-1,_r(u,r))}}}const _r=function(e,t){var n;t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):(f(n=e)?jt.push(...n):Nt&&Nt.includes(n,n.allowRecurse?Vt+1:Vt)||jt.push(n),Ht())};function br(e){return function(e,o){N().__VUE__=!0;const{insert:s,remove:i,patchProp:l,createElement:c,createText:u,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:m,setScopeId:g=r,insertStaticContent:v}=e,y=(e,t,n,r=null,o=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ar(e,t)&&(r=Z(e),q(e,o,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:u,ref:a,shapeFlag:f}=t;switch(u){case Or:_(e,t,n,r);break;case Er:b(e,t,n,r);break;case Pr:null==e&&x(t,n,r,i);break;case kr:I(e,t,n,r,o,s,i,l,c);break;default:1&f?C(e,t,n,r,o,s,i,l,c):6&f?L(e,t,n,r,o,s,i,l,c):(64&f||128&f)&&u.process(e,t,n,r,o,s,i,l,c,ee)}null!=a&&o&&yr(a,e&&e.ref,s,t||e,!t)},_=(e,t,n,r)=>{if(null==e)s(t.el=u(t.children),n,r);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},b=(e,t,n,r)=>{null==e?s(t.el=f(t.children||""),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=v(e.children,t,n,r,e.el,e.anchor)},w=({el:e,anchor:t},n,r)=>{let o;for(;e&&e!==t;)o=m(e),s(e,n,r),e=o;s(t,n,r)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)},C=(e,t,n,r,o,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?O(t,n,r,o,s,i,l,c):F(e,t,o,s,i,l,c)},O=(e,t,n,r,o,i,u,a)=>{let f,p;const{props:h,shapeFlag:m,transition:g,dirs:v}=e;if(f=e.el=c(e.type,i,h&&h.is,h),8&m?d(f,e.children):16&m&&R(e.children,f,null,r,o,xr(e,i),u,a),v&&gn(e,null,r,"created"),E(f,e,e.scopeId,u,r),h){for(const t in h)"value"===t||k(t)||l(f,t,null,h[t],i,e.children,r,o,X);"value"in h&&l(f,"value",null,h.value,i),(p=h.onVnodeBeforeMount)&&Hr(p,r,e)}v&&gn(e,null,r,"beforeMount");const y=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(o,g);y&&g.beforeEnter(f),s(f,t,n),((p=h&&h.onVnodeMounted)||y||v)&&_r((()=>{p&&Hr(p,r,e),y&&g.enter(f),v&&gn(e,null,r,"mounted")}),o)},E=(e,t,n,r,o)=>{if(n&&g(e,n),r)for(let s=0;s<r.length;s++)g(e,r[s]);if(o){if(t===o.subTree){const t=o.vnode;E(e,t,t.scopeId,t.slotScopeIds,o.parent)}}},R=(e,t,n,r,o,s,i,l,c=0)=>{for(let u=c;u<e.length;u++){const c=e[u]=l?Br(e[u]):Ur(e[u]);y(null,c,t,n,r,o,s,i,l)}},F=(e,n,r,o,s,i,c)=>{const u=n.el=e.el;let{patchFlag:a,dynamicChildren:f,dirs:p}=n;a|=16&e.patchFlag;const h=e.props||t,m=n.props||t;let g;if(r&&wr(r,!1),(g=m.onVnodeBeforeUpdate)&&Hr(g,r,n,e),p&&gn(n,e,r,"beforeUpdate"),r&&wr(r,!0),f?M(e.dynamicChildren,f,u,r,o,xr(n,s),i):c||W(e,n,u,null,r,o,xr(n,s),i,!1),a>0){if(16&a)A(u,n,h,m,r,o,s);else if(2&a&&h.class!==m.class&&l(u,"class",null,m.class,s),4&a&&l(u,"style",h.style,m.style,s),8&a){const t=n.dynamicProps;for(let n=0;n<t.length;n++){const i=t[n],c=h[i],a=m[i];a===c&&"value"!==i||l(u,i,c,a,s,e.children,r,o,X)}}1&a&&e.children!==n.children&&d(u,n.children)}else c||null!=f||A(u,n,h,m,r,o,s);((g=m.onVnodeUpdated)||p)&&_r((()=>{g&&Hr(g,r,n,e),p&&gn(n,e,r,"updated")}),o)},M=(e,t,n,r,o,s,i)=>{for(let l=0;l<t.length;l++){const c=e[l],u=t[l],a=c.el&&(c.type===kr||!Ar(c,u)||70&c.shapeFlag)?h(c.el):n;y(c,u,a,null,r,o,s,i,!0)}},A=(e,n,r,o,s,i,c)=>{if(r!==o){if(r!==t)for(const t in r)k(t)||t in o||l(e,t,r[t],null,c,n.children,s,i,X);for(const t in o){if(k(t))continue;const u=o[t],a=r[t];u!==a&&"value"!==t&&l(e,t,a,u,c,n.children,s,i,X)}"value"in o&&l(e,"value",r.value,o.value,c)}},I=(e,t,n,r,o,i,l,c,a)=>{const f=t.el=e?e.el:u(""),p=t.anchor=e?e.anchor:u("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(s(f,n,r),s(p,n,r),R(t.children||[],n,p,o,i,l,c,a)):d>0&&64&d&&h&&e.dynamicChildren?(M(e.dynamicChildren,h,n,o,i,l,c),(null!=t.key||o&&t===o.subTree)&&Sr(e,t,!0)):W(e,t,n,p,o,i,l,c,a)},L=(e,t,n,r,o,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?o.ctx.activate(t,n,r,i,c):j(t,n,r,o,s,i,c):V(e,t,c)},j=(e,t,n,r,o,s,i)=>{const l=e.component=Gr(e,r,o);if(yn(e)&&(l.ctx.renderer=ee),no(l),l.asyncDep){if(o&&o.registerDep(l,U),!e.el){const e=l.subTree=jr(Er);b(null,e,t,n)}}else U(l,e,t,n,o,s,i)},V=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:o,component:s}=e,{props:i,children:l,patchFlag:c}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!o&&!l||l&&l.$stable)||r!==i&&(r?!i||sn(r,i,u):!!i);if(1024&c)return!0;if(16&c)return r?sn(r,i,u):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==r[n]&&!Qt(u,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void B(r,t,n);r.next=t,function(e){const t=It.indexOf(e);t>Lt&&It.splice(t,1)}(r.update),r.effect.dirty=!0,r.update()}else t.el=e.el,r.vnode=t},U=(e,t,n,o,s,i,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:o,vnode:u}=e;{const n=Cr(e);if(n)return t&&(t.el=u.el,B(e,t,l)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let a,f=t;wr(e,!1),t?(t.el=u.el,B(e,t,l)):t=u,n&&$(n),(a=t.props&&t.props.onVnodeBeforeUpdate)&&Hr(a,o,t,u),wr(e,!0);const p=nn(e),d=e.subTree;e.subTree=p,y(d,p,h(d.el),Z(d),e,s,i),t.el=p.el,null===f&&function({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r!==e)break;(e=t.vnode).el=n,t=t.parent}}(e,p.el),r&&_r(r,s),(a=t.props&&t.props.onVnodeUpdated)&&_r((()=>Hr(a,o,t,u)),s)}else{let r;const{el:l,props:c}=t,{bm:u,m:a,parent:f}=e,p=vn(t);if(wr(e,!1),u&&$(u),!p&&(r=c&&c.onVnodeBeforeMount)&&Hr(r,f,t),wr(e,!0),l&&ne){const n=()=>{e.subTree=nn(e),ne(l,e.subTree,e,s,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const r=e.subTree=nn(e);y(null,r,n,o,e,s,i),t.el=r.el}if(a&&_r(a,s),!p&&(r=c&&c.onVnodeMounted)){const e=t;_r((()=>Hr(r,f,e)),s)}(256&t.shapeFlag||f&&vn(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&_r(e.a,s),e.isMounted=!0,t=n=o=null}},u=e.effect=new ae(c,r,(()=>Dt(a)),e.scope),a=e.update=()=>{u.dirty&&u.run()};a.id=e.uid,wr(e,!0),a()},B=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:o,attrs:s,vnode:{patchFlag:i}}=e,l=xt(o),[c]=e.propsOptions;let u=!1;if(!(r||i>0)||16&i){let r;or(e,t,o,s)&&(u=!0);for(const s in l)t&&(a(t,s)||(r=T(s))!==s&&a(t,r))||(c?!n||void 0===n[s]&&void 0===n[r]||(o[s]=sr(c,l,s,void 0,e,!0)):delete o[s]);if(s!==l)for(const e in s)t&&a(t,e)||(delete s[e],u=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let i=n[r];if(Qt(e.emitsOptions,i))continue;const f=t[i];if(c)if(a(s,i))f!==s[i]&&(s[i]=f,u=!0);else{const t=P(i);o[t]=sr(c,l,t,f,e,!1)}else f!==s[i]&&(s[i]=f,u=!0)}}u&&Fe(e,"set","$attrs")}(e,t.props,r,n),vr(e,t.children,n),ye(),zt(e),_e()},W=(e,t,n,r,o,s,i,l,c=!1)=>{const u=e&&e.children,a=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void H(u,f,n,r,o,s,i,l,c);if(256&p)return void D(u,f,n,r,o,s,i,l,c)}8&h?(16&a&&X(u,o,s),f!==u&&d(n,f)):16&a?16&h?H(u,f,n,r,o,s,i,l,c):X(u,o,s,!0):(8&a&&d(n,""),16&h&&R(f,n,r,o,s,i,l,c))},D=(e,t,r,o,s,i,l,c,u)=>{const a=(e=e||n).length,f=(t=t||n).length,p=Math.min(a,f);let d;for(d=0;d<p;d++){const n=t[d]=u?Br(t[d]):Ur(t[d]);y(e[d],n,r,null,s,i,l,c,u)}a>f?X(e,s,i,!0,!1,p):R(t,r,o,s,i,l,c,u,p)},H=(e,t,r,o,s,i,l,c,u)=>{let a=0;const f=t.length;let p=e.length-1,d=f-1;for(;a<=p&&a<=d;){const n=e[a],o=t[a]=u?Br(t[a]):Ur(t[a]);if(!Ar(n,o))break;y(n,o,r,null,s,i,l,c,u),a++}for(;a<=p&&a<=d;){const n=e[p],o=t[d]=u?Br(t[d]):Ur(t[d]);if(!Ar(n,o))break;y(n,o,r,null,s,i,l,c,u),p--,d--}if(a>p){if(a<=d){const e=d+1,n=e<f?t[e].el:o;for(;a<=d;)y(null,t[a]=u?Br(t[a]):Ur(t[a]),r,n,s,i,l,c,u),a++}}else if(a>d)for(;a<=p;)q(e[a],s,i,!0),a++;else{const h=a,m=a,g=new Map;for(a=m;a<=d;a++){const e=t[a]=u?Br(t[a]):Ur(t[a]);null!=e.key&&g.set(e.key,a)}let v,_=0;const b=d-m+1;let x=!1,w=0;const S=new Array(b);for(a=0;a<b;a++)S[a]=0;for(a=h;a<=p;a++){const n=e[a];if(_>=b){q(n,s,i,!0);continue}let o;if(null!=n.key)o=g.get(n.key);else for(v=m;v<=d;v++)if(0===S[v-m]&&Ar(n,t[v])){o=v;break}void 0===o?q(n,s,i,!0):(S[o-m]=a+1,o>=w?w=o:x=!0,y(n,t[o],r,null,s,i,l,c,u),_++)}const C=x?function(e){const t=e.slice(),n=[0];let r,o,s,i,l;const c=e.length;for(r=0;r<c;r++){const c=e[r];if(0!==c){if(o=n[n.length-1],e[o]<c){t[r]=o,n.push(r);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<e[n[s]]&&(s>0&&(t[r]=n[s-1]),n[s]=r)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(S):n;for(v=C.length-1,a=b-1;a>=0;a--){const e=m+a,n=t[e],p=e+1<f?t[e+1].el:o;0===S[a]?y(null,n,r,p,s,i,l,c,u):x&&(v<0||a!==C[v]?z(n,r,p,2):v--)}}},z=(e,t,n,r,o=null)=>{const{el:i,type:l,transition:c,children:u,shapeFlag:a}=e;if(6&a)return void z(e.component.subTree,t,n,r);if(128&a)return void e.suspense.move(t,n,r);if(64&a)return void l.move(e,t,n,ee);if(l===kr){s(i,t,n);for(let e=0;e<u.length;e++)z(u[e],t,n,r);return void s(e.anchor,t,n)}if(l===Pr)return void w(e,t,n);if(2!==r&&1&a&&c)if(0===r)c.beforeEnter(i),s(i,t,n),_r((()=>c.enter(i)),o);else{const{leave:e,delayLeave:r,afterLeave:o}=c,l=()=>s(i,t,n),u=()=>{e(i,(()=>{l(),o&&o()}))};r?r(i,l,u):u()}else s(i,t,n)},q=(e,t,n,r=!1,o=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:u,shapeFlag:a,patchFlag:f,dirs:p}=e;if(null!=l&&yr(l,null,n,e,!0),256&a)return void t.ctx.deactivate(e);const d=1&a&&p,h=!vn(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&Hr(m,t,e),6&a)J(e.component,n,r);else{if(128&a)return void e.suspense.unmount(n,r);d&&gn(e,null,t,"beforeUnmount"),64&a?e.type.remove(e,t,n,o,ee,r):u&&(s!==kr||f>0&&64&f)?X(u,t,n,!1,!0):(s===kr&&384&f||!o&&16&a)&&X(c,t,n),r&&G(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&_r((()=>{m&&Hr(m,t,e),d&&gn(e,null,t,"unmounted")}),n)},G=e=>{const{type:t,el:n,anchor:r,transition:o}=e;if(t===kr)return void K(n,r);if(t===Pr)return void S(e);const s=()=>{i(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:r}=o,i=()=>t(n,s);r?r(e.el,s,i):i()}else s()},K=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},J=(e,t,n)=>{const{bum:r,scope:o,update:s,subTree:i,um:l}=e;r&&$(r),o.stop(),s&&(s.active=!1,q(i,e,t,n)),l&&_r(l,t),_r((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,r=!1,o=!1,s=0)=>{for(let i=s;i<e.length;i++)q(e[i],t,n,r,o)},Z=e=>6&e.shapeFlag?Z(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el);let Q=!1;const Y=(e,t,n)=>{null==e?t._vnode&&q(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),Q||(Q=!0,zt(),qt(),Q=!1),t._vnode=e},ee={p:y,um:q,m:z,r:G,mt:j,mc:R,pc:W,pbc:M,n:Z,o:e};let te,ne;o&&([te,ne]=o(ee));return{render:Y,hydrate:te,createApp:er(Y,te)}}(e)}function xr({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function wr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Sr(e,t,n=!1){const r=e.children,o=t.children;if(f(r)&&f(o))for(let s=0;s<r.length;s++){const e=r[s];let t=o[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=o[s]=Br(o[s]),t.el=e.el),n||Sr(e,t)),t.type===Or&&(t.el=e.el)}}function Cr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Cr(t)}const kr=Symbol.for("v-fgt"),Or=Symbol.for("v-txt"),Er=Symbol.for("v-cmt"),Pr=Symbol.for("v-stc");let Rr=null,Tr=1;function Fr(e){Tr+=e}function Mr(e){return!!e&&!0===e.__v_isVNode}function Ar(e,t){return e.type===t.type&&e.key===t.key}const $r="__vInternal",Ir=({key:e})=>null!=e?e:null,Lr=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?g(e)||Et(e)||m(e)?{i:Yt,r:e,k:t,f:!!n}:e:null);const jr=function(e,t=null,n=null,r=0,o=null,s=!1){e&&e!==ln||(e=Er);if(Mr(e)){const r=Nr(e,t,!0);return n&&Wr(r,n),Tr>0&&!s&&Rr&&(6&r.shapeFlag?Rr[Rr.indexOf(e)]=r:Rr.push(r)),r.patchFlag|=-2,r}i=e,m(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=function(e){return e?bt(e)||$r in e?l({},e):e:null}(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=H(e)),y(n)&&(bt(n)&&!f(n)&&(n=l({},n)),t.style=V(n))}const c=g(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:y(e)?4:m(e)?2:0;return function(e,t=null,n=null,r=0,o=null,s=(e===kr?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ir(t),ref:t&&Lr(t),scopeId:en,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Yt};return l?(Wr(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Tr>0&&!i&&Rr&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Rr.push(c),c}(e,t,n,r,o,c,s,!0)};function Nr(e,t,n=!1){const{props:r,ref:o,patchFlag:s,children:i}=e,l=t?Dr(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ir(l),ref:t&&t.ref?n&&o?f(o)?o.concat(Lr(t)):[o,Lr(t)]:Lr(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==kr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Nr(e.ssContent),ssFallback:e.ssFallback&&Nr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Vr(e=" ",t=0){return jr(Or,null,e,t)}function Ur(e){return null==e||"boolean"==typeof e?jr(Er):f(e)?jr(kr,null,e.slice()):"object"==typeof e?Br(e):jr(Or,null,String(e))}function Br(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Nr(e)}function Wr(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),Wr(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||$r in t?3===r&&Yt&&(1===Yt.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Yt}}else m(t)?(t={default:t,_ctx:Yt},n=32):(t=String(t),64&r?(n=16,t=[Vr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Dr(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=H([t.class,r.class]));else if("style"===e)t.style=V([t.style,r.style]);else if(s(e)){const n=t[e],o=r[e];!o||n===o||f(n)&&n.includes(o)||(t[e]=n?[].concat(n,o):o)}else""!==e&&(t[e]=r[e])}return t}function Hr(e,t,n,r=null){Ft(e,t,7,[n,r])}const zr=Qn();let qr=0;function Gr(e,n,r){const o=e.type,s=(n?n.appContext:e.appContext)||zr,i={uid:qr++,vnode:e,type:o,parent:n,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new ue(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ir(o,s),emitsOptions:Zt(o,s),emit:null,emitted:null,propsDefaults:t,inheritAttrs:o.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=n?n.root:i,i.emit=Xt.bind(null,i),e.ce&&e.ce(i),i}let Kr,Jr,Xr=null;{const e=N(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach((t=>t(e))):r[0](e)}};Kr=t("__VUE_INSTANCE_SETTERS__",(e=>Xr=e)),Jr=t("__VUE_SSR_SETTERS__",(e=>to=e))}const Zr=e=>{const t=Xr;return Kr(e),e.scope.on(),()=>{e.scope.off(),Kr(t)}},Qr=()=>{Xr&&Xr.scope.off(),Kr(null)};function Yr(e){return 4&e.vnode.shapeFlag}let eo,to=!1;function no(e,t=!1){t&&Jr(t);const{props:n,children:r}=e.vnode,o=Yr(e);rr(e,n,o,t),gr(e,r);const s=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=wt(new Proxy(e.ctx,Nn));const{setup:r}=n;if(r){const n=e.setupContext=r.length>1?function(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(Te(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}(e):null,o=Zr(e);ye();const s=Tt(r,e,0,[e.props,n]);if(_e(),o(),_(s)){if(s.then(Qr,Qr),t)return s.then((n=>{ro(e,n,t)})).catch((t=>{Mt(t,e,0)}));e.asyncDep=s}else ro(e,s,t)}else oo(e,t)}(e,t):void 0;return t&&Jr(!1),s}function ro(e,t,n){m(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:y(t)&&(e.setupState=Rt(t)),oo(e,n)}function oo(e,t,n){const o=e.type;if(!e.render){if(!t&&eo&&!o.render){const t=o.template||Hn(e).template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,c=l(l({isCustomElement:n,delimiters:s},r),i);o.render=eo(t,c)}}e.render=o.render||r}{const t=Zr(e);ye();try{Bn(e)}finally{_e(),t()}}}function so(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Rt(wt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Ln?Ln[n](e):void 0,has:(e,t)=>t in e||t in Ln}))}const io=(e,t)=>function(e,t,n=!1){let o,s;const i=m(e);return i?(o=e,s=r):(o=e.get,s=e.set),new kt(o,s,i||!s,n)}(e,0,to),lo="3.4.15",co={createComponentInstance:Gr,setupComponent:no,renderComponentRoot:nn,setCurrentRenderingInstance:tn,isVNode:Mr,normalizeVNode:Ur},uo="undefined"!=typeof document?document:null,ao=uo&&uo.createElement("template"),fo={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o="svg"===t?uo.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?uo.createElementNS("http://www.w3.org/1998/Math/MathML",e):uo.createElement(e,n?{is:n}:void 0);return"select"===e&&r&&null!=r.multiple&&o.setAttribute("multiple",r.multiple),o},createText:e=>uo.createTextNode(e),createComment:e=>uo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>uo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,s){const i=n?n.previousSibling:t.lastChild;if(o&&(o===s||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==s&&(o=o.nextSibling););else{ao.innerHTML="svg"===r?`<svg>${e}</svg>`:"mathml"===r?`<math>${e}</math>`:e;const o=ao.content;if("svg"===r||"mathml"===r){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},po=Symbol("_vtc");const ho=Symbol("_vod"),mo={beforeMount(e,{value:t},{transition:n}){e[ho]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):go(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),go(e,!0),r.enter(e)):r.leave(e,(()=>{go(e,!1)})):go(e,t))},beforeUnmount(e,{value:t}){go(e,t)}};function go(e,t){e.style.display=t?e[ho]:"none"}const vo=Symbol("");const yo=/\s*!important$/;function _o(e,t,n){if(f(n))n.forEach((n=>_o(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=xo[t];if(n)return n;let r=P(t);if("filter"!==r&&r in e)return xo[t]=r;r=F(r);for(let o=0;o<bo.length;o++){const n=bo[o]+r;if(n in e)return xo[t]=n}return t}(e,t);yo.test(n)?e.setProperty(T(r),n.replace(yo,""),"important"):e[r]=n}}const bo=["Webkit","Moz","ms"],xo={};const wo="http://www.w3.org/1999/xlink";function So(e,t,n,r){e.addEventListener(t,n,r)}const Co=Symbol("_vei");function ko(e,t,n,r,o=null){const s=e[Co]||(e[Co]={}),i=s[t];if(r&&i)i.value=r;else{const[n,l]=function(e){let t;if(Oo.test(e)){let n;for(t={};n=e.match(Oo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):T(e.slice(2));return[n,t]}(t);if(r){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Ft(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Ro(),n}(r,o);So(e,n,i,l)}else i&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,i,l),s[t]=void 0)}}const Oo=/(?:Once|Passive|Capture)$/;let Eo=0;const Po=Promise.resolve(),Ro=()=>Eo||(Po.then((()=>Eo=0)),Eo=Date.now());const To=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const Fo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>$(t,e):t};function Mo(e){e.target.composing=!0}function Ao(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $o=Symbol("_assign"),Io={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[$o]=Fo(o);const s=r||o.props&&"number"===o.props.type;So(e,t?"change":"input",(t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),s&&(r=L(r)),e[$o](r)})),n&&So(e,"change",(()=>{e.value=e.value.trim()})),t||(So(e,"compositionstart",Mo),So(e,"compositionend",Ao),So(e,"change",Ao))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:o}},s){if(e[$o]=Fo(s),e.composing)return;const i=null==t?"":t;if((o||"number"===e.type?L(e.value):e.value)!==i){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(r&&e.value.trim()===i)return}e.value=i}}};const Lo=l({patchProp:(e,t,n,r,o,l,c,u,a)=>{const f="svg"===o;"class"===t?function(e,t,n){const r=e[po];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,f):"style"===t?function(e,t,n){const r=e.style,o=r.display,s=g(n);if(n&&!s){if(t&&!g(t))for(const e in t)null==n[e]&&_o(r,e,"");for(const e in n)_o(r,e,n[e])}else if(s){if(t!==n){const e=r[vo];e&&(n+=";"+e),r.cssText=n}}else t&&e.removeAttribute("style");ho in e&&(r.display=o)}(e,n,r):s(t)?i(t)||ko(e,t,0,r,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||!!(t in e&&To(t)&&m(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(To(t)&&g(n))return!1;return t in e}(e,t,r,f))?function(e,t,n,r,o,s,i){if("innerHTML"===t||"textContent"===t)return r&&i(r,o,s),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=n;const r=null==n?"":n;return("OPTION"===l?e.getAttribute("value"):e.value)!==r&&(e.value=r),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=X(n):null==n&&"string"===r?(n="",c=!0):"number"===r&&(n=0,c=!0)}try{e[t]=n}catch(u){}c&&e.removeAttribute(t)}(e,t,r,l,c,u,a):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r,o){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(wo,t.slice(6,t.length)):e.setAttributeNS(wo,t,n);else{const r=K(t);null==n||r&&!X(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,f))}},fo);let jo;const No=(...e)=>{const t=(jo||(jo=br(Lo))).createApp(...e),{mount:n}=t;return t.mount=e=>{const r=function(e){if(g(e)){return document.querySelector(e)}return e}(e);if(!r)return;const o=t._component;m(o)||o.render||o.template||(o.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t};let Vo=!1;const Uo=e(",key,ref,innerHTML,textContent,ref_key,ref_for");function Bo(e,t){let n="";for(const r in e){if(Uo(r)||s(r)||"textarea"===t&&"value"===r)continue;const o=e[r];n+="class"===r?` class="${Ho(o)}"`:"style"===r?` style="${zo(o)}"`:Wo(r,o,t)}return n}function Wo(e,t,n){if(!ee(t))return"";const r=n&&(n.indexOf("-")>0||z(n))?e:Y[e]||e.toLowerCase();return J(r)?X(t)?` ${r}`:"":function(e){if(Q.hasOwnProperty(e))return Q[e];const t=Z.test(e);return t&&console.error(`unsafe attribute name: ${e}`),Q[e]=!t}(r)?""===t?` ${r}`:` ${r}="${ne(t)}"`:(console.warn(`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${r}`),"")}function Do(e,t){return ee(t)?` ${e}="${ne(t)}"`:""}function Ho(e){return ne(H(e))}function zo(e){if(!e)return"";if(g(e))return ne(e);return ne(function(e){let t="";if(!e||g(e))return t;for(const n in e){const r=e[n],o=n.startsWith("--")?n:T(n);(g(r)||"number"==typeof r)&&(t+=`${o}:${r};`)}return t}(V(e)))}function qo(e,t=null,n=null,r=null,o){return ds(jr(e,t,n),r,o)}function Go(e,t,n,r,o,s,i){o("\x3c!--[--\x3e"),Ko(e,t,n,r,o,s,i),o("\x3c!--]--\x3e")}function Ko(e,t,n,r,o,s,i,l){const c=e[t];if(c){const e=[],t=c(n,(t=>{e.push(t)}),s,i?" "+i:"");if(f(t))gs(o,t,s,i);else{let t=!0;if(l)t=!1;else for(let n=0;n<e.length;n++)if(!Zo(e[n])){t=!1;break}if(t)r&&r();else{let t=0,n=e.length;l&&"\x3c!--[--\x3e"===e[0]&&"\x3c!--]--\x3e"===e[n-1]&&(t++,n--);for(let r=t;r<n;r++)o(e[r])}}}else r&&r()}const Jo=/^<!--.*-->$/s,Xo=/<!--[^]*?-->/gm;function Zo(e){return!("string"!=typeof e||!Jo.test(e))&&(e.length<=8||!e.replace(Xo,"").trim())}function Qo(e,t,n,r,o){e("\x3c!--teleport start--\x3e");const s=o.appContext.provides[cn],i=s.__teleportBuffers||(s.__teleportBuffers={}),l=i[n]||(i[n]=[]),c=l.length;let u;if(r)t(e),u="\x3c!--teleport anchor--\x3e";else{const{getBuffer:e,push:n}=ps();t(n),n("\x3c!--teleport anchor--\x3e"),u=e()}l.splice(c,0,u),e("\x3c!--teleport end--\x3e")}function Yo(e){return ne(g(t=e)?t:null==t?"":f(t)||y(t)&&(t.toString===b||!m(t.toString))?JSON.stringify(t,se,2):String(t));var t}function es(e,t){if(f(e)||g(e))for(let n=0,r=e.length;n<r;n++)t(e[n],n);else if("number"==typeof e)for(let n=0;n<e;n++)t(n+1,n);else if(y(e))if(e[Symbol.iterator]){const n=Array.from(e);for(let e=0,r=n.length;e<r;e++)t(n[e],e)}else{const n=Object.keys(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o,r)}}}async function ts(e,{default:t}){t?t():e("\x3c!----\x3e")}function ns(e,t,n,r,o={}){return"function"!=typeof t&&t.getSSRProps&&t.getSSRProps({dir:t,instance:e,value:n,oldValue:void 0,arg:r,modifiers:o},null)||{}}const rs=oe;function os(e,t){return function(e,t){return e.findIndex((e=>oe(e,t)))}(e,t)>-1}function ss(e,t,n){switch(e){case"radio":return oe(t,n)?" checked":"";case"checkbox":return(f(t)?os(t,n):t)?" checked":"";default:return Do("value",t)}}function is(e={},t){const{type:n,value:r}=e;switch(n){case"radio":return oe(t,r)?{checked:!0}:null;case"checkbox":return(f(t)?os(t,r):t)?{checked:!0}:null;default:return{value:t}}}const{createComponentInstance:ls,setCurrentRenderingInstance:cs,setupComponent:us,renderComponentRoot:as,normalizeVNode:fs}=co;function ps(){let e=!1;const t=[];return{getBuffer:()=>t,push(n){const r=g(n);e&&r?t[t.length-1]+=n:t.push(n),e=r,(_(n)||f(n)&&n.hasAsync)&&(t.hasAsync=!0)}}}function ds(e,t=null,n){const o=ls(e,t,null),s=us(o,!0),i=_(s),l=o.sp;if(i||l){let e=i?s:Promise.resolve();return l&&(e=e.then((()=>Promise.all(l.map((e=>e.call(o.proxy)))))).catch(r)),e.then((()=>hs(o,n)))}return hs(o,n)}function hs(e,t){const n=e.type,{getBuffer:o,push:s}=ps();if(m(n)){let r=as(e);if(!n.props)for(const t in e.attrs)t.startsWith("data-v-")&&((r.props||(r.props={}))[t]="");ms(s,e.subTree=r,e,t)}else{e.render&&e.render!==r||e.ssrRender||n.ssrRender||!g(n.template)||(n.ssrRender=function(e,t){throw new Error("On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.")}());for(const t of e.scope.effects)t.computed&&(t.computed._dirty=!0,t.computed._cacheable=!0);const o=e.ssrRender||n.ssrRender;if(o){let n=!1!==e.inheritAttrs?e.attrs:void 0,r=!1,i=e;for(;;){const e=i.vnode.scopeId;e&&(r||(n={...n},r=!0),n[e]="");const t=i.parent;if(!t||!t.subTree||t.subTree!==i.vnode)break;i=t}t&&(r||(n={...n}),n[t.trim()]="");const l=cs(e);try{o(e.proxy,s,e,n,e.props,e.setupState,e.data,e.ctx)}finally{cs(l)}}else e.render&&e.render!==r?ms(s,e.subTree=as(e),e,t):s("\x3c!----\x3e")}return o()}function ms(e,t,n,r){const{type:o,shapeFlag:s,children:i}=t;switch(o){case Or:e(ne(i));break;case Er:e(i?`\x3c!--${l=i,l.replace(re,"")}--\x3e`:"\x3c!----\x3e");break;case Pr:e(i);break;case kr:t.slotScopeIds&&(r=(r?r+" ":"")+t.slotScopeIds.join(" ")),e("\x3c!--[--\x3e"),gs(e,i,n,r),e("\x3c!--]--\x3e");break;default:1&s?function(e,t,n,r){const o=t.type;let{props:s,children:i,shapeFlag:l,scopeId:c,dirs:u}=t,a=`<${o}`;u&&(s=function(e,t,n){const r=[];for(let o=0;o<n.length;o++){const t=n[o],{dir:{getSSRProps:s}}=t;if(s){const n=s(t,e);n&&r.push(n)}}return Dr(t||{},...r)}(t,s,u));s&&(a+=Bo(s,o));c&&(a+=` ${c}`);let f=n,p=t;for(;f&&p===f.subTree;)p=f.vnode,p.scopeId&&(a+=` ${p.scopeId}`),f=f.parent;r&&(a+=` ${r}`);if(e(a+">"),!q(o)){let t=!1;s&&(s.innerHTML?(t=!0,e(s.innerHTML)):s.textContent?(t=!0,e(ne(s.textContent))):"textarea"===o&&s.value&&(t=!0,e(ne(s.value)))),t||(8&l?e(ne(i)):16&l&&gs(e,i,n,r)),e(`</${o}>`)}}(e,t,n,r):6&s?e(ds(t,n,r)):64&s?function(e,t,n,r){const o=t.props&&t.props.to,s=t.props&&t.props.disabled;if(!o)return[];if(!g(o))return[];Qo(e,(e=>{gs(e,t.children,n,r)}),o,s||""===s,n)}(e,t,n,r):128&s&&ms(e,t.ssContent,n,r)}var l}function gs(e,t,n,r){for(let o=0;o<t.length;o++)ms(e,fs(t[o]),n,r)}const{isVNode:vs}=co;async function ys(e){if(e.hasAsync){let t="";for(let n=0;n<e.length;n++){let r=e[n];_(r)&&(r=await r),g(r)?t+=r:t+=await ys(r)}return t}return _s(e)}function _s(e){let t="";for(let n=0;n<e.length;n++){let r=e[n];g(r)?t+=r:t+=_s(r)}return t}async function bs(e,t={}){if(vs(e))return bs(No({render:()=>e}),t);const n=jr(e._component,e._props);n.appContext=e._context,e.provide(cn,t);const r=await ds(n),o=await ys(r);if(await xs(t),t.__watcherHandles)for(const s of t.__watcherHandles)s();return o}async function xs(e){if(e.__teleportBuffers){e.teleports=e.teleports||{};for(const t in e.__teleportBuffers)e.teleports[t]=await ys(await Promise.all([e.__teleportBuffers[t]]))}}const{isVNode:ws}=co;async function Ss(e,t){if(e.hasAsync)for(let n=0;n<e.length;n++){let r=e[n];_(r)&&(r=await r),g(r)?t.push(r):await Ss(r,t)}else Cs(e,t)}function Cs(e,t){for(let n=0;n<e.length;n++){let r=e[n];g(r)?t.push(r):Cs(r,t)}}function ks(e,t,n){if(ws(e))return ks(No({render:()=>e}),t,n);const r=jr(e._component,e._props);return r.appContext=e._context,e.provide(cn,t),Promise.resolve(ds(r)).then((e=>Ss(e,n))).then((()=>xs(t))).then((()=>{if(t.__watcherHandles)for(const e of t.__watcherHandles)e()})).then((()=>n.push(null))).catch((e=>{n.destroy(e)})),n}function Os(e,t={}){return console.warn("[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead."),Es(e,t)}function Es(e,t={}){throw new Error("ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.")}function Ps(e,t={},n){ks(e,t,{push(e){null!=e?n.write(e):n.end()},destroy(e){n.destroy(e)}})}function Rs(e,t={}){if("function"!=typeof ReadableStream)throw new Error("ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.");const n=new TextEncoder;let r=!1;return new ReadableStream({start(o){ks(e,t,{push(e){r||(null!=e?o.enqueue(n.encode(e)):o.close())},destroy(e){o.error(e)}})},cancel(){r=!0}})}function Ts(e,t={},n){const r=n.getWriter(),o=new TextEncoder;let s=!1;try{s=_(r.ready)}catch(i){}ks(e,t,{push:async e=>(s&&await r.ready,null!=e?r.write(o.encode(e)):r.close()),destroy(e){console.log(e),r.close()}})}Vo||(Vo=!0,Io.getSSRProps=({value:e})=>({value:e}),mo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}});export{Ps as pipeToNodeWritable,Ts as pipeToWebWritable,Es as renderToNodeStream,ks as renderToSimpleStream,Os as renderToStream,bs as renderToString,Rs as renderToWebStream,ns as ssrGetDirectiveProps,is as ssrGetDynamicModelProps,X as ssrIncludeBooleanAttr,Yo as ssrInterpolate,os as ssrLooseContain,rs as ssrLooseEqual,Do as ssrRenderAttr,Bo as ssrRenderAttrs,Ho as ssrRenderClass,qo as ssrRenderComponent,Wo as ssrRenderDynamicAttr,ss as ssrRenderDynamicModel,es as ssrRenderList,Go as ssrRenderSlot,Ko as ssrRenderSlotInner,zo as ssrRenderStyle,ts as ssrRenderSuspense,Qo as ssrRenderTeleport,ms as ssrRenderVNode}; diff --git a/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js b/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js index fb65bcca..e0c3e365 100644 --- a/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +++ b/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js @@ -1,967 +1,1033 @@ -import { ssrContextKey, warn as warn$1, Fragment, Static, Comment, Text, mergeProps, ssrUtils, createApp, createVNode, initDirectivesForSSR } from 'vue'; -import { makeMap, isOn, escapeHtml, normalizeClass, propsToAttrMap, isBooleanAttr, includeBooleanAttr, isSSRSafeAttrName, isString, normalizeStyle, stringifyStyle, escapeHtmlComment, isVoidTag, isPromise, isArray, isFunction, NOOP, toDisplayString, isObject, looseEqual, looseIndexOf } from '@vue/shared'; +/** +* @vue/server-renderer v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +import { createVNode, ssrContextKey, warn as warn$2, Fragment, Static, Comment, Text, mergeProps, ssrUtils, createApp, initDirectivesForSSR } from 'vue'; +import { makeMap, isOn, isRenderableAttrValue, isSVGTag, propsToAttrMap, isBooleanAttr, includeBooleanAttr, isSSRSafeAttrName, escapeHtml, normalizeClass, isString, normalizeStyle, stringifyStyle, isArray, toDisplayString, isFunction, getGlobalThis, NOOP, isObject, looseEqual, looseIndexOf, isPromise, escapeHtmlComment, isVoidTag } from '@vue/shared'; export { includeBooleanAttr as ssrIncludeBooleanAttr } from '@vue/shared'; -// leading comma for empty string "" -const shouldIgnoreProp = makeMap(`,key,ref,innerHTML,textContent,ref_key,ref_for`); +const shouldIgnoreProp = makeMap( + `,key,ref,innerHTML,textContent,ref_key,ref_for` +); function ssrRenderAttrs(props, tag) { - let ret = ''; - for (const key in props) { - if (shouldIgnoreProp(key) || - isOn(key) || - (tag === 'textarea' && key === 'value')) { - continue; - } - const value = props[key]; - if (key === 'class') { - ret += ` class="${ssrRenderClass(value)}"`; - } - else if (key === 'style') { - ret += ` style="${ssrRenderStyle(value)}"`; - } - else { - ret += ssrRenderDynamicAttr(key, value, tag); - } + let ret = ""; + for (const key in props) { + if (shouldIgnoreProp(key) || isOn(key) || tag === "textarea" && key === "value") { + continue; } - return ret; + const value = props[key]; + if (key === "class") { + ret += ` class="${ssrRenderClass(value)}"`; + } else if (key === "style") { + ret += ` style="${ssrRenderStyle(value)}"`; + } else { + ret += ssrRenderDynamicAttr(key, value, tag); + } + } + return ret; } -// render an attr with dynamic (unknown) key. function ssrRenderDynamicAttr(key, value, tag) { - if (!isRenderableValue(value)) { - return ``; - } - const attrKey = tag && tag.indexOf('-') > 0 - ? key // preserve raw name on custom elements - : propsToAttrMap[key] || key.toLowerCase(); - if (isBooleanAttr(attrKey)) { - return includeBooleanAttr(value) ? ` ${attrKey}` : ``; - } - else if (isSSRSafeAttrName(attrKey)) { - return value === '' ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`; - } - else { - console.warn(`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}`); - return ``; - } + if (!isRenderableAttrValue(value)) { + return ``; + } + const attrKey = tag && (tag.indexOf("-") > 0 || isSVGTag(tag)) ? key : propsToAttrMap[key] || key.toLowerCase(); + if (isBooleanAttr(attrKey)) { + return includeBooleanAttr(value) ? ` ${attrKey}` : ``; + } else if (isSSRSafeAttrName(attrKey)) { + return value === "" ? ` ${attrKey}` : ` ${attrKey}="${escapeHtml(value)}"`; + } else { + console.warn( + `[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}` + ); + return ``; + } } -// Render a v-bind attr with static key. The key is pre-processed at compile -// time and we only need to check and escape value. function ssrRenderAttr(key, value) { - if (!isRenderableValue(value)) { - return ``; - } - return ` ${key}="${escapeHtml(value)}"`; -} -function isRenderableValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === 'string' || type === 'number' || type === 'boolean'; + if (!isRenderableAttrValue(value)) { + return ``; + } + return ` ${key}="${escapeHtml(value)}"`; } function ssrRenderClass(raw) { - return escapeHtml(normalizeClass(raw)); + return escapeHtml(normalizeClass(raw)); } function ssrRenderStyle(raw) { - if (!raw) { - return ''; - } - if (isString(raw)) { - return escapeHtml(raw); - } - const styles = normalizeStyle(raw); - return escapeHtml(stringifyStyle(styles)); -} - -function ssrCompile(template, instance) { - { - throw new Error(`On-the-fly template compilation is not supported in the ESM build of ` + - `@vue/server-renderer. All templates must be pre-compiled into ` + - `render functions.`); - } -} - -function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { - parentPush('<!--teleport start-->'); - const context = parentComponent.appContext.provides[ssrContextKey]; - const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); - const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); - // record current index of the target buffer to handle nested teleports - // since the parent needs to be rendered before the child - const bufferIndex = targetBuffer.length; - let teleportContent; - if (disabled) { - contentRenderFn(parentPush); - teleportContent = `<!--teleport anchor-->`; - } - else { - const { getBuffer, push } = createBuffer(); - contentRenderFn(push); - push(`<!--teleport anchor-->`); - teleportContent = getBuffer(); - } - targetBuffer.splice(bufferIndex, 0, teleportContent); - parentPush('<!--teleport end-->'); -} - -const { createComponentInstance, setCurrentRenderingInstance, setupComponent, renderComponentRoot, normalizeVNode } = ssrUtils; -// Each component has a buffer array. -// A buffer array can contain one of the following: -// - plain string -// - A resolved buffer (recursive arrays of strings that can be unrolled -// synchronously) -// - An async buffer (a Promise that resolves to a resolved buffer) -function createBuffer() { - let appendable = false; - const buffer = []; - return { - getBuffer() { - // Return static buffer and await on items during unroll stage - return buffer; - }, - push(item) { - const isStringItem = isString(item); - if (appendable && isStringItem) { - buffer[buffer.length - 1] += item; - } - else { - buffer.push(item); - } - appendable = isStringItem; - if (isPromise(item) || (isArray(item) && item.hasAsync)) { - // promise, or child buffer with async, mark as async. - // this allows skipping unnecessary await ticks during unroll stage - buffer.hasAsync = true; - } - } - }; -} -function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { - const instance = createComponentInstance(vnode, parentComponent, null); - const res = setupComponent(instance, true /* isSSR */); - const hasAsyncSetup = isPromise(res); - const prefetches = instance.sp; /* LifecycleHooks.SERVER_PREFETCH */ - if (hasAsyncSetup || prefetches) { - let p = hasAsyncSetup - ? res - : Promise.resolve(); - if (prefetches) { - p = p - .then(() => Promise.all(prefetches.map(prefetch => prefetch.call(instance.proxy)))) - // Note: error display is already done by the wrapped lifecycle hook function. - .catch(() => { }); - } - return p.then(() => renderComponentSubTree(instance, slotScopeId)); - } - else { - return renderComponentSubTree(instance, slotScopeId); - } -} -function renderComponentSubTree(instance, slotScopeId) { - const comp = instance.type; - const { getBuffer, push } = createBuffer(); - if (isFunction(comp)) { - let root = renderComponentRoot(instance); - // #5817 scope ID attrs not falling through if functional component doesn't - // have props - if (!comp.props) { - for (const key in instance.attrs) { - if (key.startsWith(`data-v-`)) { - (root.props || (root.props = {}))[key] = ``; - } - } - } - renderVNode(push, (instance.subTree = root), instance, slotScopeId); - } - else { - if ((!instance.render || instance.render === NOOP) && - !instance.ssrRender && - !comp.ssrRender && - isString(comp.template)) { - comp.ssrRender = ssrCompile(comp.template); - } - // perf: enable caching of computed getters during render - // since there cannot be state mutations during render. - for (const e of instance.scope.effects) { - if (e.computed) - e.computed._cacheable = true; - } - const ssrRender = instance.ssrRender || comp.ssrRender; - if (ssrRender) { - // optimized - // resolve fallthrough attrs - let attrs = instance.inheritAttrs !== false ? instance.attrs : undefined; - let hasCloned = false; - let cur = instance; - while (true) { - const scopeId = cur.vnode.scopeId; - if (scopeId) { - if (!hasCloned) { - attrs = { ...attrs }; - hasCloned = true; - } - attrs[scopeId] = ''; - } - const parent = cur.parent; - if (parent && parent.subTree && parent.subTree === cur.vnode) { - // parent is a non-SSR compiled component and is rendering this - // component as root. inherit its scopeId if present. - cur = parent; - } - else { - break; - } - } - if (slotScopeId) { - if (!hasCloned) - attrs = { ...attrs }; - attrs[slotScopeId.trim()] = ''; - } - // set current rendering instance for asset resolution - const prev = setCurrentRenderingInstance(instance); - ssrRender(instance.proxy, push, instance, attrs, - // compiler-optimized bindings - instance.props, instance.setupState, instance.data, instance.ctx); - setCurrentRenderingInstance(prev); - } - else if (instance.render && instance.render !== NOOP) { - renderVNode(push, (instance.subTree = renderComponentRoot(instance)), instance, slotScopeId); - } - else { - const componentName = comp.name || comp.__file || `<Anonymous>`; - warn$1(`Component ${componentName} is missing template or render function.`); - push(`<!---->`); - } - } - return getBuffer(); -} -function renderVNode(push, vnode, parentComponent, slotScopeId) { - const { type, shapeFlag, children } = vnode; - switch (type) { - case Text: - push(escapeHtml(children)); - break; - case Comment: - push(children ? `<!--${escapeHtmlComment(children)}-->` : `<!---->`); - break; - case Static: - push(children); - break; - case Fragment: - if (vnode.slotScopeIds) { - slotScopeId = - (slotScopeId ? slotScopeId + ' ' : '') + vnode.slotScopeIds.join(' '); - } - push(`<!--[-->`); // open - renderVNodeChildren(push, children, parentComponent, slotScopeId); - push(`<!--]-->`); // close - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - renderElementVNode(push, vnode, parentComponent, slotScopeId); - } - else if (shapeFlag & 6 /* COMPONENT */) { - push(renderComponentVNode(vnode, parentComponent, slotScopeId)); - } - else if (shapeFlag & 64 /* TELEPORT */) { - renderTeleportVNode(push, vnode, parentComponent, slotScopeId); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); - } - else { - warn$1('[@vue/server-renderer] Invalid VNode type:', type, `(${typeof type})`); - } - } -} -function renderVNodeChildren(push, children, parentComponent, slotScopeId) { - for (let i = 0; i < children.length; i++) { - renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); - } -} -function renderElementVNode(push, vnode, parentComponent, slotScopeId) { - const tag = vnode.type; - let { props, children, shapeFlag, scopeId, dirs } = vnode; - let openTag = `<${tag}`; - if (dirs) { - props = applySSRDirectives(vnode, props, dirs); - } - if (props) { - openTag += ssrRenderAttrs(props, tag); - } - if (scopeId) { - openTag += ` ${scopeId}`; - } - // inherit parent chain scope id if this is the root node - let curParent = parentComponent; - let curVnode = vnode; - while (curParent && curVnode === curParent.subTree) { - curVnode = curParent.vnode; - if (curVnode.scopeId) { - openTag += ` ${curVnode.scopeId}`; - } - curParent = curParent.parent; - } - if (slotScopeId) { - openTag += ` ${slotScopeId}`; - } - push(openTag + `>`); - if (!isVoidTag(tag)) { - let hasChildrenOverride = false; - if (props) { - if (props.innerHTML) { - hasChildrenOverride = true; - push(props.innerHTML); - } - else if (props.textContent) { - hasChildrenOverride = true; - push(escapeHtml(props.textContent)); - } - else if (tag === 'textarea' && props.value) { - hasChildrenOverride = true; - push(escapeHtml(props.value)); - } - } - if (!hasChildrenOverride) { - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - push(escapeHtml(children)); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - renderVNodeChildren(push, children, parentComponent, slotScopeId); - } - } - push(`</${tag}>`); - } -} -function applySSRDirectives(vnode, rawProps, dirs) { - const toMerge = []; - for (let i = 0; i < dirs.length; i++) { - const binding = dirs[i]; - const { dir: { getSSRProps } } = binding; - if (getSSRProps) { - const props = getSSRProps(binding, vnode); - if (props) - toMerge.push(props); - } - } - return mergeProps(rawProps || {}, ...toMerge); -} -function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { - const target = vnode.props && vnode.props.to; - const disabled = vnode.props && vnode.props.disabled; - if (!target) { - if (!disabled) { - warn$1(`[@vue/server-renderer] Teleport is missing target prop.`); - } - return []; - } - if (!isString(target)) { - warn$1(`[@vue/server-renderer] Teleport target must be a query selector string.`); - return []; - } - ssrRenderTeleport(push, push => { - renderVNodeChildren(push, vnode.children, parentComponent, slotScopeId); - }, target, disabled || disabled === '', parentComponent); -} - -const { isVNode } = ssrUtils; -async function unrollBuffer(buffer) { - if (buffer.hasAsync) { - let ret = ''; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isPromise(item)) { - item = await item; - } - if (isString(item)) { - ret += item; - } - else { - ret += await unrollBuffer(item); - } - } - return ret; - } - else { - // sync buffer can be more efficiently unrolled without unnecessary await - // ticks - return unrollBufferSync(buffer); - } -} -function unrollBufferSync(buffer) { - let ret = ''; - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isString(item)) { - ret += item; - } - else { - // since this is a sync buffer, child buffers are never promises - ret += unrollBufferSync(item); - } - } - return ret; -} -async function renderToString(input, context = {}) { - if (isVNode(input)) { - // raw vnode, wrap with app (for context) - return renderToString(createApp({ render: () => input }), context); - } - // rendering an app - const vnode = createVNode(input._component, input._props); - vnode.appContext = input._context; - // provide the ssr context to the tree - input.provide(ssrContextKey, context); - const buffer = await renderComponentVNode(vnode); - const result = await unrollBuffer(buffer); - await resolveTeleports(context); - return result; -} -async function resolveTeleports(context) { - if (context.__teleportBuffers) { - context.teleports = context.teleports || {}; - for (const key in context.__teleportBuffers) { - // note: it's OK to await sequentially here because the Promises were - // created eagerly in parallel. - context.teleports[key] = await unrollBuffer((await Promise.all(context.__teleportBuffers[key]))); - } - } -} - -const { isVNode: isVNode$1 } = ssrUtils; -async function unrollBuffer$1(buffer, stream) { - if (buffer.hasAsync) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isPromise(item)) { - item = await item; - } - if (isString(item)) { - stream.push(item); - } - else { - await unrollBuffer$1(item, stream); - } - } - } - else { - // sync buffer can be more efficiently unrolled without unnecessary await - // ticks - unrollBufferSync$1(buffer, stream); - } -} -function unrollBufferSync$1(buffer, stream) { - for (let i = 0; i < buffer.length; i++) { - let item = buffer[i]; - if (isString(item)) { - stream.push(item); - } - else { - // since this is a sync buffer, child buffers are never promises - unrollBufferSync$1(item, stream); - } - } -} -function renderToSimpleStream(input, context, stream) { - if (isVNode$1(input)) { - // raw vnode, wrap with app (for context) - return renderToSimpleStream(createApp({ render: () => input }), context, stream); - } - // rendering an app - const vnode = createVNode(input._component, input._props); - vnode.appContext = input._context; - // provide the ssr context to the tree - input.provide(ssrContextKey, context); - Promise.resolve(renderComponentVNode(vnode)) - .then(buffer => unrollBuffer$1(buffer, stream)) - .then(() => resolveTeleports(context)) - .then(() => stream.push(null)) - .catch(error => { - stream.destroy(error); - }); - return stream; -} -/** - * @deprecated - */ -function renderToStream(input, context = {}) { - console.warn(`[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.`); - return renderToNodeStream(input, context); -} -function renderToNodeStream(input, context = {}) { - const stream = null; - { - throw new Error(`ESM build of renderToStream() does not support renderToNodeStream(). ` + - `Use pipeToNodeWritable() with an existing Node.js Writable stream ` + - `instance instead.`); - } -} -function pipeToNodeWritable(input, context = {}, writable) { - renderToSimpleStream(input, context, { - push(content) { - if (content != null) { - writable.write(content); - } - else { - writable.end(); - } - }, - destroy(err) { - writable.destroy(err); - } - }); -} -function renderToWebStream(input, context = {}) { - if (typeof ReadableStream !== 'function') { - throw new Error(`ReadableStream constructor is not available in the global scope. ` + - `If the target environment does support web streams, consider using ` + - `pipeToWebWritable() with an existing WritableStream instance instead.`); - } - const encoder = new TextEncoder(); - let cancelled = false; - return new ReadableStream({ - start(controller) { - renderToSimpleStream(input, context, { - push(content) { - if (cancelled) - return; - if (content != null) { - controller.enqueue(encoder.encode(content)); - } - else { - controller.close(); - } - }, - destroy(err) { - controller.error(err); - } - }); - }, - cancel() { - cancelled = true; - } - }); -} -function pipeToWebWritable(input, context = {}, writable) { - const writer = writable.getWriter(); - const encoder = new TextEncoder(); - // #4287 CloudFlare workers do not implement `ready` property - let hasReady = false; - try { - hasReady = isPromise(writer.ready); - } - catch (e) { } - renderToSimpleStream(input, context, { - async push(content) { - if (hasReady) { - await writer.ready; - } - if (content != null) { - return writer.write(encoder.encode(content)); - } - else { - return writer.close(); - } - }, - destroy(err) { - // TODO better error handling? - console.log(err); - writer.close(); - } - }); + if (!raw) { + return ""; + } + if (isString(raw)) { + return escapeHtml(raw); + } + const styles = normalizeStyle(raw); + return escapeHtml(stringifyStyle(styles)); } function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) { - return renderComponentVNode(createVNode(comp, props, children), parentComponent, slotScopeId); + return renderComponentVNode( + createVNode(comp, props, children), + parentComponent, + slotScopeId + ); } function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - // template-compiled slots are always rendered as fragments - push(`<!--[-->`); - ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId); - push(`<!--]-->`); + push(`<!--[-->`); + ssrRenderSlotInner( + slots, + slotName, + slotProps, + fallbackRenderFn, + push, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); } -function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) { - const slotFn = slots[slotName]; - if (slotFn) { - const slotBuffer = []; - const bufferedPush = (item) => { - slotBuffer.push(item); - }; - const ret = slotFn(slotProps, bufferedPush, parentComponent, slotScopeId ? ' ' + slotScopeId : ''); - if (isArray(ret)) { - // normal slot - renderVNodeChildren(push, ret, parentComponent, slotScopeId); +function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) { + const slotFn = slots[slotName]; + if (slotFn) { + const slotBuffer = []; + const bufferedPush = (item) => { + slotBuffer.push(item); + }; + const ret = slotFn( + slotProps, + bufferedPush, + parentComponent, + slotScopeId ? " " + slotScopeId : "" + ); + if (isArray(ret)) { + renderVNodeChildren(push, ret, parentComponent, slotScopeId); + } else { + let isEmptySlot = true; + if (transition) { + isEmptySlot = false; + } else { + for (let i = 0; i < slotBuffer.length; i++) { + if (!isComment(slotBuffer[i])) { + isEmptySlot = false; + break; + } } - else { - // ssr slot. - // check if the slot renders all comments, in which case use the fallback - let isEmptySlot = true; - for (let i = 0; i < slotBuffer.length; i++) { - if (!isComment(slotBuffer[i])) { - isEmptySlot = false; - break; - } - } - if (isEmptySlot) { - if (fallbackRenderFn) { - fallbackRenderFn(); - } - } - else { - for (let i = 0; i < slotBuffer.length; i++) { - push(slotBuffer[i]); - } - } + } + if (isEmptySlot) { + if (fallbackRenderFn) { + fallbackRenderFn(); } + } else { + let start = 0; + let end = slotBuffer.length; + if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") { + start++; + end--; + } + for (let i = start; i < end; i++) { + push(slotBuffer[i]); + } + } } - else if (fallbackRenderFn) { - fallbackRenderFn(); - } + } else if (fallbackRenderFn) { + fallbackRenderFn(); + } } +const commentTestRE = /^<!--.*-->$/s; const commentRE = /<!--[^]*?-->/gm; function isComment(item) { - return (typeof item === 'string' && - commentRE.test(item) && - !item.replace(commentRE, '').trim()); + if (typeof item !== "string" || !commentTestRE.test(item)) + return false; + if (item.length <= 8) + return true; + return !item.replace(commentRE, "").trim(); +} + +function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) { + parentPush("<!--teleport start-->"); + const context = parentComponent.appContext.provides[ssrContextKey]; + const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {}); + const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []); + const bufferIndex = targetBuffer.length; + let teleportContent; + if (disabled) { + contentRenderFn(parentPush); + teleportContent = `<!--teleport anchor-->`; + } else { + const { getBuffer, push } = createBuffer(); + contentRenderFn(push); + push(`<!--teleport anchor-->`); + teleportContent = getBuffer(); + } + targetBuffer.splice(bufferIndex, 0, teleportContent); + parentPush("<!--teleport end-->"); } function ssrInterpolate(value) { - return escapeHtml(toDisplayString(value)); + return escapeHtml(toDisplayString(value)); +} + +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function isRef(r) { - return !!(r && r.__v_isRef === true); + return !!(r && r.__v_isRef === true); } const stack = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack.push(vnode); } function popWarningContext() { - stack.pop(); + stack.pop(); } -function warn(msg, ...args) { - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); - } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); +function warn$1(msg, ...args) { + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } -/* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } -/* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } -/* istanbul ignore next */ function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } } const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = (process.env.NODE_ENV !== 'production') ? ErrorTypeStrings[type] : type; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings[type] : `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - if ((process.env.NODE_ENV !== 'production')) { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + if (!!(process.env.NODE_ENV !== "production")) { + const info = ErrorTypeStrings[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } - else { - // recover in prod to reduce the impact on end-user - console.error(err); + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } else { + console.error(err); + } } +let devtools; +let buffer = []; +function setDevtoolsHook(hook, target) { + var _a, _b; + devtools = hook; + if (devtools) { + devtools.enabled = true; + buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook(newHook, target); + }); + setTimeout(() => { + if (!devtools) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + buffer = []; + } + }, 3e3); + } else { + buffer = []; + } +} + +{ + const g = getGlobalThis(); + const registerGlobalSetter = (key, setter) => { + let setters; + if (!(setters = g[key])) + setters = g[key] = []; + setters.push(setter); + return (v) => { + if (setters.length > 1) + setters.forEach((set) => set(v)); + else + setters[0](v); + }; + }; + registerGlobalSetter( + `__VUE_INSTANCE_SETTERS__`, + (v) => v + ); + registerGlobalSetter( + `__VUE_SSR_SETTERS__`, + (v) => v + ); +} const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); -function getComponentName(Component) { - return isFunction(Component) - ? Component.displayName || Component.name - : Component.name; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } -/* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } +const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP; +!!(process.env.NODE_ENV !== "production") || true ? devtools : void 0; +!!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook : NOOP; + function ssrRenderList(source, renderItem) { - if (isArray(source) || isString(source)) { - for (let i = 0, l = source.length; i < l; i++) { - renderItem(source[i], i); - } + if (isArray(source) || isString(source)) { + for (let i = 0, l = source.length; i < l; i++) { + renderItem(source[i], i); } - else if (typeof source === 'number') { - if ((process.env.NODE_ENV !== 'production') && !Number.isInteger(source)) { - warn(`The v-for range expect an integer value but got ${source}.`); - return; - } - for (let i = 0; i < source; i++) { - renderItem(i + 1, i); - } + } else if (typeof source === "number") { + if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) { + warn(`The v-for range expect an integer value but got ${source}.`); + return; } - else if (isObject(source)) { - if (source[Symbol.iterator]) { - const arr = Array.from(source); - for (let i = 0, l = arr.length; i < l; i++) { - renderItem(arr[i], i); - } - } - else { - const keys = Object.keys(source); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - renderItem(source[key], key, i); - } - } + for (let i = 0; i < source; i++) { + renderItem(i + 1, i); } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + const arr = Array.from(source); + for (let i = 0, l = arr.length; i < l; i++) { + renderItem(arr[i], i); + } + } else { + const keys = Object.keys(source); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + renderItem(source[key], key, i); + } + } + } } async function ssrRenderSuspense(push, { default: renderContent }) { - if (renderContent) { - renderContent(); - } - else { - push(`<!---->`); - } + if (renderContent) { + renderContent(); + } else { + push(`<!---->`); + } } function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) { - if (typeof dir !== 'function' && dir.getSSRProps) { - return (dir.getSSRProps({ - dir, - instance, - value, - oldValue: undefined, - arg, - modifiers - }, null) || {}); - } - return {}; + if (typeof dir !== "function" && dir.getSSRProps) { + return dir.getSSRProps( + { + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }, + null + ) || {}; + } + return {}; } const ssrLooseEqual = looseEqual; function ssrLooseContain(arr, value) { - return looseIndexOf(arr, value) > -1; + return looseIndexOf(arr, value) > -1; } -// for <input :type="type" v-model="model" value="value"> function ssrRenderDynamicModel(type, model, value) { - switch (type) { - case 'radio': - return looseEqual(model, value) ? ' checked' : ''; - case 'checkbox': - return (isArray(model) ? ssrLooseContain(model, value) : model) - ? ' checked' - : ''; - default: - // text types - return ssrRenderAttr('value', model); - } + switch (type) { + case "radio": + return looseEqual(model, value) ? " checked" : ""; + case "checkbox": + return (isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : ""; + default: + return ssrRenderAttr("value", model); + } } -// for <input v-bind="obj" v-model="model"> function ssrGetDynamicModelProps(existingProps = {}, model) { - const { type, value } = existingProps; - switch (type) { - case 'radio': - return looseEqual(model, value) ? { checked: true } : null; - case 'checkbox': - return (isArray(model) ? ssrLooseContain(model, value) : model) - ? { checked: true } - : null; - default: - // text types - return { value: model }; + const { type, value } = existingProps; + switch (type) { + case "radio": + return looseEqual(model, value) ? { checked: true } : null; + case "checkbox": + return (isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null; + default: + return { value: model }; + } +} + +function ssrCompile(template, instance) { + { + throw new Error( + `On-the-fly template compilation is not supported in the ESM build of @vue/server-renderer. All templates must be pre-compiled into render functions.` + ); + } +} + +const { + createComponentInstance, + setCurrentRenderingInstance, + setupComponent, + renderComponentRoot, + normalizeVNode +} = ssrUtils; +function createBuffer() { + let appendable = false; + const buffer = []; + return { + getBuffer() { + return buffer; + }, + push(item) { + const isStringItem = isString(item); + if (appendable && isStringItem) { + buffer[buffer.length - 1] += item; + } else { + buffer.push(item); + } + appendable = isStringItem; + if (isPromise(item) || isArray(item) && item.hasAsync) { + buffer.hasAsync = true; + } } + }; +} +function renderComponentVNode(vnode, parentComponent = null, slotScopeId) { + const instance = createComponentInstance(vnode, parentComponent, null); + const res = setupComponent( + instance, + true + /* isSSR */ + ); + const hasAsyncSetup = isPromise(res); + const prefetches = instance.sp; + if (hasAsyncSetup || prefetches) { + let p = hasAsyncSetup ? res : Promise.resolve(); + if (prefetches) { + p = p.then( + () => Promise.all( + prefetches.map((prefetch) => prefetch.call(instance.proxy)) + ) + ).catch(NOOP); + } + return p.then(() => renderComponentSubTree(instance, slotScopeId)); + } else { + return renderComponentSubTree(instance, slotScopeId); + } +} +function renderComponentSubTree(instance, slotScopeId) { + const comp = instance.type; + const { getBuffer, push } = createBuffer(); + if (isFunction(comp)) { + let root = renderComponentRoot(instance); + if (!comp.props) { + for (const key in instance.attrs) { + if (key.startsWith(`data-v-`)) { + (root.props || (root.props = {}))[key] = ``; + } + } + } + renderVNode(push, instance.subTree = root, instance, slotScopeId); + } else { + if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) { + comp.ssrRender = ssrCompile(comp.template); + } + for (const e of instance.scope.effects) { + if (e.computed) { + e.computed._dirty = true; + e.computed._cacheable = true; + } + } + const ssrRender = instance.ssrRender || comp.ssrRender; + if (ssrRender) { + let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0; + let hasCloned = false; + let cur = instance; + while (true) { + const scopeId = cur.vnode.scopeId; + if (scopeId) { + if (!hasCloned) { + attrs = { ...attrs }; + hasCloned = true; + } + attrs[scopeId] = ""; + } + const parent = cur.parent; + if (parent && parent.subTree && parent.subTree === cur.vnode) { + cur = parent; + } else { + break; + } + } + if (slotScopeId) { + if (!hasCloned) + attrs = { ...attrs }; + attrs[slotScopeId.trim()] = ""; + } + const prev = setCurrentRenderingInstance(instance); + try { + ssrRender( + instance.proxy, + push, + instance, + attrs, + // compiler-optimized bindings + instance.props, + instance.setupState, + instance.data, + instance.ctx + ); + } finally { + setCurrentRenderingInstance(prev); + } + } else if (instance.render && instance.render !== NOOP) { + renderVNode( + push, + instance.subTree = renderComponentRoot(instance), + instance, + slotScopeId + ); + } else { + const componentName = comp.name || comp.__file || `<Anonymous>`; + warn$2(`Component ${componentName} is missing template or render function.`); + push(`<!---->`); + } + } + return getBuffer(); +} +function renderVNode(push, vnode, parentComponent, slotScopeId) { + const { type, shapeFlag, children } = vnode; + switch (type) { + case Text: + push(escapeHtml(children)); + break; + case Comment: + push( + children ? `<!--${escapeHtmlComment(children)}-->` : `<!---->` + ); + break; + case Static: + push(children); + break; + case Fragment: + if (vnode.slotScopeIds) { + slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" "); + } + push(`<!--[-->`); + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + push(`<!--]-->`); + break; + default: + if (shapeFlag & 1) { + renderElementVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 6) { + push(renderComponentVNode(vnode, parentComponent, slotScopeId)); + } else if (shapeFlag & 64) { + renderTeleportVNode(push, vnode, parentComponent, slotScopeId); + } else if (shapeFlag & 128) { + renderVNode(push, vnode.ssContent, parentComponent, slotScopeId); + } else { + warn$2( + "[@vue/server-renderer] Invalid VNode type:", + type, + `(${typeof type})` + ); + } + } +} +function renderVNodeChildren(push, children, parentComponent, slotScopeId) { + for (let i = 0; i < children.length; i++) { + renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId); + } +} +function renderElementVNode(push, vnode, parentComponent, slotScopeId) { + const tag = vnode.type; + let { props, children, shapeFlag, scopeId, dirs } = vnode; + let openTag = `<${tag}`; + if (dirs) { + props = applySSRDirectives(vnode, props, dirs); + } + if (props) { + openTag += ssrRenderAttrs(props, tag); + } + if (scopeId) { + openTag += ` ${scopeId}`; + } + let curParent = parentComponent; + let curVnode = vnode; + while (curParent && curVnode === curParent.subTree) { + curVnode = curParent.vnode; + if (curVnode.scopeId) { + openTag += ` ${curVnode.scopeId}`; + } + curParent = curParent.parent; + } + if (slotScopeId) { + openTag += ` ${slotScopeId}`; + } + push(openTag + `>`); + if (!isVoidTag(tag)) { + let hasChildrenOverride = false; + if (props) { + if (props.innerHTML) { + hasChildrenOverride = true; + push(props.innerHTML); + } else if (props.textContent) { + hasChildrenOverride = true; + push(escapeHtml(props.textContent)); + } else if (tag === "textarea" && props.value) { + hasChildrenOverride = true; + push(escapeHtml(props.value)); + } + } + if (!hasChildrenOverride) { + if (shapeFlag & 8) { + push(escapeHtml(children)); + } else if (shapeFlag & 16) { + renderVNodeChildren( + push, + children, + parentComponent, + slotScopeId + ); + } + } + push(`</${tag}>`); + } +} +function applySSRDirectives(vnode, rawProps, dirs) { + const toMerge = []; + for (let i = 0; i < dirs.length; i++) { + const binding = dirs[i]; + const { + dir: { getSSRProps } + } = binding; + if (getSSRProps) { + const props = getSSRProps(binding, vnode); + if (props) + toMerge.push(props); + } + } + return mergeProps(rawProps || {}, ...toMerge); +} +function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) { + const target = vnode.props && vnode.props.to; + const disabled = vnode.props && vnode.props.disabled; + if (!target) { + if (!disabled) { + warn$2(`[@vue/server-renderer] Teleport is missing target prop.`); + } + return []; + } + if (!isString(target)) { + warn$2( + `[@vue/server-renderer] Teleport target must be a query selector string.` + ); + return []; + } + ssrRenderTeleport( + push, + (push2) => { + renderVNodeChildren( + push2, + vnode.children, + parentComponent, + slotScopeId + ); + }, + target, + disabled || disabled === "", + parentComponent + ); +} + +const { isVNode: isVNode$1 } = ssrUtils; +async function unrollBuffer$1(buffer) { + if (buffer.hasAsync) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isPromise(item)) { + item = await item; + } + if (isString(item)) { + ret += item; + } else { + ret += await unrollBuffer$1(item); + } + } + return ret; + } else { + return unrollBufferSync$1(buffer); + } +} +function unrollBufferSync$1(buffer) { + let ret = ""; + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isString(item)) { + ret += item; + } else { + ret += unrollBufferSync$1(item); + } + } + return ret; +} +async function renderToString(input, context = {}) { + if (isVNode$1(input)) { + return renderToString(createApp({ render: () => input }), context); + } + const vnode = createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(ssrContextKey, context); + const buffer = await renderComponentVNode(vnode); + const result = await unrollBuffer$1(buffer); + await resolveTeleports(context); + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + return result; +} +async function resolveTeleports(context) { + if (context.__teleportBuffers) { + context.teleports = context.teleports || {}; + for (const key in context.__teleportBuffers) { + context.teleports[key] = await unrollBuffer$1( + await Promise.all([context.__teleportBuffers[key]]) + ); + } + } +} + +const { isVNode } = ssrUtils; +async function unrollBuffer(buffer, stream) { + if (buffer.hasAsync) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isPromise(item)) { + item = await item; + } + if (isString(item)) { + stream.push(item); + } else { + await unrollBuffer(item, stream); + } + } + } else { + unrollBufferSync(buffer, stream); + } +} +function unrollBufferSync(buffer, stream) { + for (let i = 0; i < buffer.length; i++) { + let item = buffer[i]; + if (isString(item)) { + stream.push(item); + } else { + unrollBufferSync(item, stream); + } + } +} +function renderToSimpleStream(input, context, stream) { + if (isVNode(input)) { + return renderToSimpleStream( + createApp({ render: () => input }), + context, + stream + ); + } + const vnode = createVNode(input._component, input._props); + vnode.appContext = input._context; + input.provide(ssrContextKey, context); + Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => { + if (context.__watcherHandles) { + for (const unwatch of context.__watcherHandles) { + unwatch(); + } + } + }).then(() => stream.push(null)).catch((error) => { + stream.destroy(error); + }); + return stream; +} +function renderToStream(input, context = {}) { + console.warn( + `[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.` + ); + return renderToNodeStream(input, context); +} +function renderToNodeStream(input, context = {}) { + { + throw new Error( + `ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.` + ); + } +} +function pipeToNodeWritable(input, context = {}, writable) { + renderToSimpleStream(input, context, { + push(content) { + if (content != null) { + writable.write(content); + } else { + writable.end(); + } + }, + destroy(err) { + writable.destroy(err); + } + }); +} +function renderToWebStream(input, context = {}) { + if (typeof ReadableStream !== "function") { + throw new Error( + `ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.` + ); + } + const encoder = new TextEncoder(); + let cancelled = false; + return new ReadableStream({ + start(controller) { + renderToSimpleStream(input, context, { + push(content) { + if (cancelled) + return; + if (content != null) { + controller.enqueue(encoder.encode(content)); + } else { + controller.close(); + } + }, + destroy(err) { + controller.error(err); + } + }); + }, + cancel() { + cancelled = true; + } + }); +} +function pipeToWebWritable(input, context = {}, writable) { + const writer = writable.getWriter(); + const encoder = new TextEncoder(); + let hasReady = false; + try { + hasReady = isPromise(writer.ready); + } catch (e) { + } + renderToSimpleStream(input, context, { + async push(content) { + if (hasReady) { + await writer.ready; + } + if (content != null) { + return writer.write(encoder.encode(content)); + } else { + return writer.close(); + } + }, + destroy(err) { + console.log(err); + writer.close(); + } + }); } initDirectivesForSSR(); diff --git a/node_modules/@vue/server-renderer/package.json b/node_modules/@vue/server-renderer/package.json index 8b6ceb4b..f60f4e8f 100644 --- a/node_modules/@vue/server-renderer/package.json +++ b/node_modules/@vue/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.2.36", + "version": "3.4.15", "description": "@vue/server-renderer", "main": "index.js", "module": "dist/server-renderer.esm-bundler.js", @@ -9,10 +9,25 @@ "index.js", "dist" ], + "exports": { + ".": { + "types": "./dist/server-renderer.d.ts", + "node": { + "production": "./dist/server-renderer.cjs.prod.js", + "development": "./dist/server-renderer.cjs.js", + "default": "./index.js" + }, + "module": "./dist/server-renderer.esm-bundler.js", + "import": "./dist/server-renderer.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, "buildOptions": { "name": "VueServerRenderer", "formats": [ "esm-bundler", + "esm-browser", "cjs" ] }, @@ -31,10 +46,10 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme", "peerDependencies": { - "vue": "3.2.36" + "vue": "3.4.15" }, "dependencies": { - "@vue/shared": "3.2.36", - "@vue/compiler-ssr": "3.2.36" + "@vue/compiler-ssr": "3.4.15", + "@vue/shared": "3.4.15" } -} +} \ No newline at end of file diff --git a/node_modules/@vue/shared/dist/shared.cjs.js b/node_modules/@vue/shared/dist/shared.cjs.js index 208f5454..f19f92d1 100644 --- a/node_modules/@vue/shared/dist/shared.cjs.js +++ b/node_modules/@vue/shared/dist/shared.cjs.js @@ -1,606 +1,504 @@ +/** +* @vue/shared v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -/** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } -/** - * dev only flag -> name mapping - */ -const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` -}; - -/** - * Dev only - */ -const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' -}; - -const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; -const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join('\n'); -} - -/** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); -/** - * The full list is needed during SSR to produce the correct initial markup. - */ -const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs + - `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` + - `loop,open,required,reversed,scoped,seamless,` + - `checked,muted,multiple,selected`); -/** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ -function includeBooleanAttr(value) { - return !!value || value === ''; -} -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return (attrValidationCache[name] = !isUnsafe); -} -const propsToAttrMap = { - acceptCharset: 'accept-charset', - className: 'class', - htmlFor: 'for', - httpEquiv: 'http-equiv' -}; -/** - * CSS properties that accept plain numbers - */ -const isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,` + - `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` + - `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` + - `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` + - `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` + - `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` + - // SVG - `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` + - `stroke-miterlimit,stroke-opacity,stroke-width`); -/** - * Known attributes, this is used for stringification of runtime static nodes - * so that we don't stringify bindings that cannot be set from HTML. - * Don't also forget to allow `data-*` and `aria-*`! - * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes - */ -const isKnownHtmlAttr = /*#__PURE__*/ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,` + - `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` + - `border,buffered,capture,challenge,charset,checked,cite,class,code,` + - `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` + - `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` + - `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` + - `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` + - `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` + - `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` + - `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` + - `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` + - `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` + - `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` + - `start,step,style,summary,tabindex,target,title,translate,type,usemap,` + - `value,width,wrap`); -/** - * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute - */ -const isKnownSvgAttr = /*#__PURE__*/ makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,` + - `arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,` + - `baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,` + - `clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,` + - `color-interpolation-filters,color-profile,color-rendering,` + - `contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,` + - `descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,` + - `dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,` + - `fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,` + - `font-family,font-size,font-size-adjust,font-stretch,font-style,` + - `font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,` + - `glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,` + - `gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,` + - `horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,` + - `k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,` + - `lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,` + - `marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,` + - `mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,` + - `name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,` + - `overflow,overline-position,overline-thickness,panose-1,paint-order,path,` + - `pathLength,patternContentUnits,patternTransform,patternUnits,ping,` + - `pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,` + - `preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,` + - `rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,` + - `restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,` + - `specularConstant,specularExponent,speed,spreadMethod,startOffset,` + - `stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,` + - `strikethrough-position,strikethrough-thickness,string,stroke,` + - `stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,` + - `stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,` + - `systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,` + - `text-decoration,text-rendering,textLength,to,transform,transform-origin,` + - `type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,` + - `unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,` + - `v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,` + - `vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,` + - `writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,` + - `xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,` + - `xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`); - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - let ret = ''; - if (!styles || isString(styles)) { - return ret; - } - for (const key in styles) { - const value = styles[key]; - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - if (isString(value) || - (typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) { - // only render valid values - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -// These tag configs are shared between compiler-dom and runtime-dom, so they -// https://developer.mozilla.org/en-US/docs/Web/HTML/Element -const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; -// https://developer.mozilla.org/en-US/docs/Web/SVG/Element -const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; -const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS); - -const escapeRE = /["'&<>]/; -function escapeHtml(string) { - const str = '' + string; - const match = escapeRE.exec(str); - if (!match) { - return str; - } - let html = ''; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: // " - escaped = '"'; - break; - case 38: // & - escaped = '&'; - break; - case 39: // ' - escaped = '''; - break; - case 60: // < - escaped = '<'; - break; - case 62: // > - escaped = '>'; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; - } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; -} -// https://www.w3.org/TR/html52/syntax.html#comments -const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; -function escapeHtmlComment(src) { - return src.replace(commentStripRE, ''); -} - -function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); -} - -/** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ -const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); -}; -const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; - -const EMPTY_OBJ = Object.freeze({}) - ; +const EMPTY_OBJ = Object.freeze({}) ; const EMPTY_ARR = Object.freeze([]) ; -const NOOP = () => { }; -/** - * Always return false. - */ +const NOOP = () => { +}; const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const isModelListener = (key) => key.startsWith('onUpdate:'); +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty.call(val, key); const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === '[object Map]'; -const isSet = (val) => toTypeString(val) === '[object Set]'; -const isDate = (val) => toTypeString(val) === '[object Date]'; -const isFunction = (val) => typeof val === 'function'; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; -const isPlainObject = (val) => toTypeString(val) === '[object Object]'; -const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; -const isReservedProp = /*#__PURE__*/ makeMap( -// the leading comma is intentional so empty string "" is also included -',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); -const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; -/** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -/** - * @private - */ -const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); -// compare whether a value has changed, accounting for NaN. +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; function genPropsAccessExp(name) { - return identRE.test(name) - ? `__props.${name}` - : `__props[${JSON.stringify(name)}]`; + return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; } +const PatchFlags = { + "TEXT": 1, + "1": "TEXT", + "CLASS": 2, + "2": "CLASS", + "STYLE": 4, + "4": "STYLE", + "PROPS": 8, + "8": "PROPS", + "FULL_PROPS": 16, + "16": "FULL_PROPS", + "NEED_HYDRATION": 32, + "32": "NEED_HYDRATION", + "STABLE_FRAGMENT": 64, + "64": "STABLE_FRAGMENT", + "KEYED_FRAGMENT": 128, + "128": "KEYED_FRAGMENT", + "UNKEYED_FRAGMENT": 256, + "256": "UNKEYED_FRAGMENT", + "NEED_PATCH": 512, + "512": "NEED_PATCH", + "DYNAMIC_SLOTS": 1024, + "1024": "DYNAMIC_SLOTS", + "DEV_ROOT_FRAGMENT": 2048, + "2048": "DEV_ROOT_FRAGMENT", + "HOISTED": -1, + "-1": "HOISTED", + "BAIL": -2, + "-2": "BAIL" +}; +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const ShapeFlags = { + "ELEMENT": 1, + "1": "ELEMENT", + "FUNCTIONAL_COMPONENT": 2, + "2": "FUNCTIONAL_COMPONENT", + "STATEFUL_COMPONENT": 4, + "4": "STATEFUL_COMPONENT", + "TEXT_CHILDREN": 8, + "8": "TEXT_CHILDREN", + "ARRAY_CHILDREN": 16, + "16": "ARRAY_CHILDREN", + "SLOTS_CHILDREN": 32, + "32": "SLOTS_CHILDREN", + "TELEPORT": 64, + "64": "TELEPORT", + "SUSPENSE": 128, + "128": "SUSPENSE", + "COMPONENT_SHOULD_KEEP_ALIVE": 256, + "256": "COMPONENT_SHOULD_KEEP_ALIVE", + "COMPONENT_KEPT_ALIVE": 512, + "512": "COMPONENT_KEPT_ALIVE", + "COMPONENT": 6, + "6": "COMPONENT" +}; + +const SlotFlags = { + "STABLE": 1, + "1": "STABLE", + "DYNAMIC": 2, + "2": "DYNAMIC", + "FORWARDED": 3, + "3": "FORWARDED" +}; +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); +const isGloballyWhitelisted = isGloballyAllowed; + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; +function escapeHtmlComment(src) { + return src.replace(commentStripRE, ""); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; +}; + exports.EMPTY_ARR = EMPTY_ARR; exports.EMPTY_OBJ = EMPTY_OBJ; exports.NO = NO; exports.NOOP = NOOP; exports.PatchFlagNames = PatchFlagNames; +exports.PatchFlags = PatchFlags; +exports.ShapeFlags = ShapeFlags; +exports.SlotFlags = SlotFlags; exports.camelize = camelize; exports.capitalize = capitalize; exports.def = def; @@ -620,18 +518,21 @@ exports.isBooleanAttr = isBooleanAttr; exports.isBuiltInDirective = isBuiltInDirective; exports.isDate = isDate; exports.isFunction = isFunction; +exports.isGloballyAllowed = isGloballyAllowed; exports.isGloballyWhitelisted = isGloballyWhitelisted; exports.isHTMLTag = isHTMLTag; exports.isIntegerKey = isIntegerKey; exports.isKnownHtmlAttr = isKnownHtmlAttr; exports.isKnownSvgAttr = isKnownSvgAttr; exports.isMap = isMap; +exports.isMathMLTag = isMathMLTag; exports.isModelListener = isModelListener; -exports.isNoUnitNumericStyleProp = isNoUnitNumericStyleProp; exports.isObject = isObject; exports.isOn = isOn; exports.isPlainObject = isPlainObject; exports.isPromise = isPromise; +exports.isRegExp = isRegExp; +exports.isRenderableAttrValue = isRenderableAttrValue; exports.isReservedProp = isReservedProp; exports.isSSRSafeAttrName = isSSRSafeAttrName; exports.isSVGTag = isSVGTag; @@ -642,6 +543,7 @@ exports.isSymbol = isSymbol; exports.isVoidTag = isVoidTag; exports.looseEqual = looseEqual; exports.looseIndexOf = looseIndexOf; +exports.looseToNumber = looseToNumber; exports.makeMap = makeMap; exports.normalizeClass = normalizeClass; exports.normalizeProps = normalizeProps; diff --git a/node_modules/@vue/shared/dist/shared.cjs.prod.js b/node_modules/@vue/shared/dist/shared.cjs.prod.js index c241f5ec..4ee2b549 100644 --- a/node_modules/@vue/shared/dist/shared.cjs.prod.js +++ b/node_modules/@vue/shared/dist/shared.cjs.prod.js @@ -1,605 +1,504 @@ +/** +* @vue/shared v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -/** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } -/** - * dev only flag -> name mapping - */ -const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` -}; - -/** - * Dev only - */ -const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' -}; - -const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; -const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join('\n'); -} - -/** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); -/** - * The full list is needed during SSR to produce the correct initial markup. - */ -const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs + - `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` + - `loop,open,required,reversed,scoped,seamless,` + - `checked,muted,multiple,selected`); -/** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ -function includeBooleanAttr(value) { - return !!value || value === ''; -} -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return (attrValidationCache[name] = !isUnsafe); -} -const propsToAttrMap = { - acceptCharset: 'accept-charset', - className: 'class', - htmlFor: 'for', - httpEquiv: 'http-equiv' -}; -/** - * CSS properties that accept plain numbers - */ -const isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,` + - `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` + - `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` + - `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` + - `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` + - `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` + - // SVG - `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` + - `stroke-miterlimit,stroke-opacity,stroke-width`); -/** - * Known attributes, this is used for stringification of runtime static nodes - * so that we don't stringify bindings that cannot be set from HTML. - * Don't also forget to allow `data-*` and `aria-*`! - * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes - */ -const isKnownHtmlAttr = /*#__PURE__*/ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,` + - `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` + - `border,buffered,capture,challenge,charset,checked,cite,class,code,` + - `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` + - `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` + - `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` + - `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` + - `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` + - `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` + - `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` + - `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` + - `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` + - `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` + - `start,step,style,summary,tabindex,target,title,translate,type,usemap,` + - `value,width,wrap`); -/** - * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute - */ -const isKnownSvgAttr = /*#__PURE__*/ makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,` + - `arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,` + - `baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,` + - `clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,` + - `color-interpolation-filters,color-profile,color-rendering,` + - `contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,` + - `descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,` + - `dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,` + - `fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,` + - `font-family,font-size,font-size-adjust,font-stretch,font-style,` + - `font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,` + - `glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,` + - `gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,` + - `horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,` + - `k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,` + - `lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,` + - `marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,` + - `mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,` + - `name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,` + - `overflow,overline-position,overline-thickness,panose-1,paint-order,path,` + - `pathLength,patternContentUnits,patternTransform,patternUnits,ping,` + - `pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,` + - `preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,` + - `rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,` + - `restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,` + - `specularConstant,specularExponent,speed,spreadMethod,startOffset,` + - `stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,` + - `strikethrough-position,strikethrough-thickness,string,stroke,` + - `stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,` + - `stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,` + - `systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,` + - `text-decoration,text-rendering,textLength,to,transform,transform-origin,` + - `type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,` + - `unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,` + - `v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,` + - `vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,` + - `writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,` + - `xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,` + - `xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`); - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - let ret = ''; - if (!styles || isString(styles)) { - return ret; - } - for (const key in styles) { - const value = styles[key]; - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - if (isString(value) || - (typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) { - // only render valid values - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -// These tag configs are shared between compiler-dom and runtime-dom, so they -// https://developer.mozilla.org/en-US/docs/Web/HTML/Element -const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; -// https://developer.mozilla.org/en-US/docs/Web/SVG/Element -const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; -const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `false` flag. - */ -const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `false` flag. - */ -const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `false` flag. - */ -const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS); - -const escapeRE = /["'&<>]/; -function escapeHtml(string) { - const str = '' + string; - const match = escapeRE.exec(str); - if (!match) { - return str; - } - let html = ''; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: // " - escaped = '"'; - break; - case 38: // & - escaped = '&'; - break; - case 39: // ' - escaped = '''; - break; - case 60: // < - escaped = '<'; - break; - case 62: // > - escaped = '>'; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; - } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; -} -// https://www.w3.org/TR/html52/syntax.html#comments -const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; -function escapeHtmlComment(src) { - return src.replace(commentStripRE, ''); -} - -function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); -} - -/** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ -const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); -}; -const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; - const EMPTY_OBJ = {}; const EMPTY_ARR = []; -const NOOP = () => { }; -/** - * Always return false. - */ +const NOOP = () => { +}; const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const isModelListener = (key) => key.startsWith('onUpdate:'); +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty.call(val, key); const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === '[object Map]'; -const isSet = (val) => toTypeString(val) === '[object Set]'; -const isDate = (val) => toTypeString(val) === '[object Date]'; -const isFunction = (val) => typeof val === 'function'; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; -const isPlainObject = (val) => toTypeString(val) === '[object Object]'; -const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; -const isReservedProp = /*#__PURE__*/ makeMap( -// the leading comma is intentional so empty string "" is also included -',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); -const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; -/** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -/** - * @private - */ -const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); -// compare whether a value has changed, accounting for NaN. +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; function genPropsAccessExp(name) { - return identRE.test(name) - ? `__props.${name}` - : `__props[${JSON.stringify(name)}]`; + return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; } +const PatchFlags = { + "TEXT": 1, + "1": "TEXT", + "CLASS": 2, + "2": "CLASS", + "STYLE": 4, + "4": "STYLE", + "PROPS": 8, + "8": "PROPS", + "FULL_PROPS": 16, + "16": "FULL_PROPS", + "NEED_HYDRATION": 32, + "32": "NEED_HYDRATION", + "STABLE_FRAGMENT": 64, + "64": "STABLE_FRAGMENT", + "KEYED_FRAGMENT": 128, + "128": "KEYED_FRAGMENT", + "UNKEYED_FRAGMENT": 256, + "256": "UNKEYED_FRAGMENT", + "NEED_PATCH": 512, + "512": "NEED_PATCH", + "DYNAMIC_SLOTS": 1024, + "1024": "DYNAMIC_SLOTS", + "DEV_ROOT_FRAGMENT": 2048, + "2048": "DEV_ROOT_FRAGMENT", + "HOISTED": -1, + "-1": "HOISTED", + "BAIL": -2, + "-2": "BAIL" +}; +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const ShapeFlags = { + "ELEMENT": 1, + "1": "ELEMENT", + "FUNCTIONAL_COMPONENT": 2, + "2": "FUNCTIONAL_COMPONENT", + "STATEFUL_COMPONENT": 4, + "4": "STATEFUL_COMPONENT", + "TEXT_CHILDREN": 8, + "8": "TEXT_CHILDREN", + "ARRAY_CHILDREN": 16, + "16": "ARRAY_CHILDREN", + "SLOTS_CHILDREN": 32, + "32": "SLOTS_CHILDREN", + "TELEPORT": 64, + "64": "TELEPORT", + "SUSPENSE": 128, + "128": "SUSPENSE", + "COMPONENT_SHOULD_KEEP_ALIVE": 256, + "256": "COMPONENT_SHOULD_KEEP_ALIVE", + "COMPONENT_KEPT_ALIVE": 512, + "512": "COMPONENT_KEPT_ALIVE", + "COMPONENT": 6, + "6": "COMPONENT" +}; + +const SlotFlags = { + "STABLE": 1, + "1": "STABLE", + "DYNAMIC": 2, + "2": "DYNAMIC", + "FORWARDED": 3, + "3": "FORWARDED" +}; +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); +const isGloballyWhitelisted = isGloballyAllowed; + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; +function escapeHtmlComment(src) { + return src.replace(commentStripRE, ""); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; +}; + exports.EMPTY_ARR = EMPTY_ARR; exports.EMPTY_OBJ = EMPTY_OBJ; exports.NO = NO; exports.NOOP = NOOP; exports.PatchFlagNames = PatchFlagNames; +exports.PatchFlags = PatchFlags; +exports.ShapeFlags = ShapeFlags; +exports.SlotFlags = SlotFlags; exports.camelize = camelize; exports.capitalize = capitalize; exports.def = def; @@ -619,18 +518,21 @@ exports.isBooleanAttr = isBooleanAttr; exports.isBuiltInDirective = isBuiltInDirective; exports.isDate = isDate; exports.isFunction = isFunction; +exports.isGloballyAllowed = isGloballyAllowed; exports.isGloballyWhitelisted = isGloballyWhitelisted; exports.isHTMLTag = isHTMLTag; exports.isIntegerKey = isIntegerKey; exports.isKnownHtmlAttr = isKnownHtmlAttr; exports.isKnownSvgAttr = isKnownSvgAttr; exports.isMap = isMap; +exports.isMathMLTag = isMathMLTag; exports.isModelListener = isModelListener; -exports.isNoUnitNumericStyleProp = isNoUnitNumericStyleProp; exports.isObject = isObject; exports.isOn = isOn; exports.isPlainObject = isPlainObject; exports.isPromise = isPromise; +exports.isRegExp = isRegExp; +exports.isRenderableAttrValue = isRenderableAttrValue; exports.isReservedProp = isReservedProp; exports.isSSRSafeAttrName = isSSRSafeAttrName; exports.isSVGTag = isSVGTag; @@ -641,6 +543,7 @@ exports.isSymbol = isSymbol; exports.isVoidTag = isVoidTag; exports.looseEqual = looseEqual; exports.looseIndexOf = looseIndexOf; +exports.looseToNumber = looseToNumber; exports.makeMap = makeMap; exports.normalizeClass = normalizeClass; exports.normalizeProps = normalizeProps; diff --git a/node_modules/@vue/shared/dist/shared.d.ts b/node_modules/@vue/shared/dist/shared.d.ts index 9eaa1d43..98bacc13 100644 --- a/node_modules/@vue/shared/dist/shared.d.ts +++ b/node_modules/@vue/shared/dist/shared.d.ts @@ -1,142 +1,3 @@ -/** - * @private - */ -export declare const camelize: (str: string) => string; - -/** - * @private - */ -export declare const capitalize: (str: string) => string; - -export declare const def: (obj: object, key: string | symbol, value: any) => void; - -export declare const EMPTY_ARR: readonly never[]; - -export declare const EMPTY_OBJ: { - readonly [key: string]: any; -}; - -export declare function escapeHtml(string: unknown): string; - -export declare function escapeHtmlComment(src: string): string; - -export declare const extend: { - <T, U>(target: T, source: U): T & U; - <T_1, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; - <T_2, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; - (target: object, ...sources: any[]): any; -}; - -export declare function generateCodeFrame(source: string, start?: number, end?: number): string; - -export declare function genPropsAccessExp(name: string): string; - -export declare const getGlobalThis: () => any; - -export declare const hasChanged: (value: any, oldValue: any) => boolean; - -export declare const hasOwn: (val: object, key: string | symbol) => key is never; - -/** - * @private - */ -export declare const hyphenate: (str: string) => string; - -export declare type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N; - -/** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ -export declare function includeBooleanAttr(value: unknown): boolean; - -export declare const invokeArrayFns: (fns: Function[], arg?: any) => void; - -export declare const isArray: (arg: any) => arg is any[]; - -/** - * The full list is needed during SSR to produce the correct initial markup. - */ -export declare const isBooleanAttr: (key: string) => boolean; - -export declare const isBuiltInDirective: (key: string) => boolean; - -export declare const isDate: (val: unknown) => val is Date; - -export declare const isFunction: (val: unknown) => val is Function; - -export declare const isGloballyWhitelisted: (key: string) => boolean; - -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `__DEV__` flag. - */ -export declare const isHTMLTag: (key: string) => boolean; - -export declare const isIntegerKey: (key: unknown) => boolean; - -/** - * Known attributes, this is used for stringification of runtime static nodes - * so that we don't stringify bindings that cannot be set from HTML. - * Don't also forget to allow `data-*` and `aria-*`! - * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes - */ -export declare const isKnownHtmlAttr: (key: string) => boolean; - -/** - * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute - */ -export declare const isKnownSvgAttr: (key: string) => boolean; - -export declare const isMap: (val: unknown) => val is Map<any, any>; - -export declare const isModelListener: (key: string) => boolean; - -/** - * CSS properties that accept plain numbers - */ -export declare const isNoUnitNumericStyleProp: (key: string) => boolean; - -export declare const isObject: (val: unknown) => val is Record<any, any>; - -export declare const isOn: (key: string) => boolean; - -export declare const isPlainObject: (val: unknown) => val is object; - -export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>; - -export declare const isReservedProp: (key: string) => boolean; - -export declare const isSet: (val: unknown) => val is Set<any>; - -export declare const isSpecialBooleanAttr: (key: string) => boolean; - -export declare function isSSRSafeAttrName(name: string): boolean; - -export declare const isString: (val: unknown) => val is string; - -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `__DEV__` flag. - */ -export declare const isSVGTag: (key: string) => boolean; - -export declare const isSymbol: (val: unknown) => val is symbol; - -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `__DEV__` flag. - */ -export declare const isVoidTag: (key: string) => boolean; - -export declare function looseEqual(a: any, b: any): boolean; - -export declare function looseIndexOf(arr: any[], val: any): number; - -export declare type LooseRequired<T> = { - [P in string & keyof T]: T[P]; -}; - /** * Make a map and return a function for checking if a key * is in that map. @@ -146,31 +7,73 @@ export declare type LooseRequired<T> = { */ export declare function makeMap(str: string, expectsLowerCase?: boolean): (key: string) => boolean; +export declare const EMPTY_OBJ: { + readonly [key: string]: any; +}; +export declare const EMPTY_ARR: readonly never[]; +export declare const NOOP: () => void; /** * Always return false. */ export declare const NO: () => boolean; - -export declare const NOOP: () => void; - -export declare function normalizeClass(value: unknown): string; - -export declare type NormalizedStyle = Record<string, string | number>; - -export declare function normalizeProps(props: Record<string, any> | null): Record<string, any> | null; - -export declare function normalizeStyle(value: unknown): NormalizedStyle | string | undefined; - -export declare const objectToString: () => string; - -export declare function parseStringStyle(cssText: string): NormalizedStyle; - -/** - * dev only flag -> name mapping - */ -export declare const PatchFlagNames: { - [x: number]: string; +export declare const isOn: (key: string) => boolean; +export declare const isModelListener: (key: string) => boolean; +export declare const extend: { + <T extends {}, U>(target: T, source: U): T & U; + <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V; + <T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W; + (target: object, ...sources: any[]): any; }; +export declare const remove: <T>(arr: T[], el: T) => void; +export declare const hasOwn: (val: object, key: string | symbol) => key is never; +export declare const isArray: (arg: any) => arg is any[]; +export declare const isMap: (val: unknown) => val is Map<any, any>; +export declare const isSet: (val: unknown) => val is Set<any>; +export declare const isDate: (val: unknown) => val is Date; +export declare const isRegExp: (val: unknown) => val is RegExp; +export declare const isFunction: (val: unknown) => val is Function; +export declare const isString: (val: unknown) => val is string; +export declare const isSymbol: (val: unknown) => val is symbol; +export declare const isObject: (val: unknown) => val is Record<any, any>; +export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>; +export declare const objectToString: () => string; +export declare const toTypeString: (value: unknown) => string; +export declare const toRawType: (value: unknown) => string; +export declare const isPlainObject: (val: unknown) => val is object; +export declare const isIntegerKey: (key: unknown) => boolean; +export declare const isReservedProp: (key: string) => boolean; +export declare const isBuiltInDirective: (key: string) => boolean; +/** + * @private + */ +export declare const camelize: (str: string) => string; +/** + * @private + */ +export declare const hyphenate: (str: string) => string; +/** + * @private + */ +export declare const capitalize: <T extends string>(str: T) => Capitalize<T>; +/** + * @private + */ +export declare const toHandlerKey: <T extends string>(str: T) => T extends "" ? "" : `on${Capitalize<T>}`; +export declare const hasChanged: (value: any, oldValue: any) => boolean; +export declare const invokeArrayFns: (fns: Function[], arg?: any) => void; +export declare const def: (obj: object, key: string | symbol, value: any) => void; +/** + * "123-foo" will be parsed to 123 + * This is used for the .number modifier in v-model + */ +export declare const looseToNumber: (val: any) => any; +/** + * Only concerns number-like strings + * "123-foo" will be returned as-is + */ +export declare const toNumber: (val: any) => any; +export declare const getGlobalThis: () => any; +export declare function genPropsAccessExp(name: string): string; /** * Patch flags are optimization hints generated by the compiler. @@ -190,7 +93,7 @@ export declare const PatchFlagNames: { * Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the * flags are handled during diff. */ -export declare const enum PatchFlags { +export declare enum PatchFlags { /** * Indicates an element with dynamic textContent (children fast path) */ @@ -226,10 +129,11 @@ export declare const enum PatchFlags { */ FULL_PROPS = 16, /** - * Indicates an element with event listeners (which need to be attached - * during hydration) + * Indicates an element that requires props hydration + * (but not necessarily patching) + * e.g. event listeners & v-bind with prop modifier */ - HYDRATE_EVENTS = 32, + NEED_HYDRATION = 32, /** * Indicates a fragment whose children order doesn't change. */ @@ -282,12 +186,12 @@ export declare const enum PatchFlags { */ BAIL = -2 } +/** + * dev only flag -> name mapping + */ +export declare const PatchFlagNames: Record<PatchFlags, string>; -export declare const propsToAttrMap: Record<string, string | undefined>; - -export declare const remove: <T>(arr: T[], el: T) => void; - -export declare const enum ShapeFlags { +export declare enum ShapeFlags { ELEMENT = 1, FUNCTIONAL_COMPONENT = 2, STATEFUL_COMPONENT = 4, @@ -301,7 +205,7 @@ export declare const enum ShapeFlags { COMPONENT = 6 } -export declare const enum SlotFlags { +export declare enum SlotFlags { /** * Stable slots that only reference slot props or context state. The slot * can fully capture its own dependencies so when passed down the parent won't @@ -322,7 +226,6 @@ export declare const enum SlotFlags { */ FORWARDED = 3 } - /** * Dev only */ @@ -332,7 +235,73 @@ export declare const slotFlagsText: { 3: string; }; +export declare const isGloballyAllowed: (key: string) => boolean; +/** @deprecated use `isGloballyAllowed` instead */ +export declare const isGloballyWhitelisted: (key: string) => boolean; + +export declare function generateCodeFrame(source: string, start?: number, end?: number): string; + +export type NormalizedStyle = Record<string, string | number>; +export declare function normalizeStyle(value: unknown): NormalizedStyle | string | undefined; +export declare function parseStringStyle(cssText: string): NormalizedStyle; export declare function stringifyStyle(styles: NormalizedStyle | string | undefined): string; +export declare function normalizeClass(value: unknown): string; +export declare function normalizeProps(props: Record<string, any> | null): Record<string, any> | null; + +/** + * Compiler only. + * Do NOT use in runtime code paths unless behind `__DEV__` flag. + */ +export declare const isHTMLTag: (key: string) => boolean; +/** + * Compiler only. + * Do NOT use in runtime code paths unless behind `__DEV__` flag. + */ +export declare const isSVGTag: (key: string) => boolean; +/** + * Compiler only. + * Do NOT use in runtime code paths unless behind `__DEV__` flag. + */ +export declare const isMathMLTag: (key: string) => boolean; +/** + * Compiler only. + * Do NOT use in runtime code paths unless behind `__DEV__` flag. + */ +export declare const isVoidTag: (key: string) => boolean; + +export declare const isSpecialBooleanAttr: (key: string) => boolean; +/** + * The full list is needed during SSR to produce the correct initial markup. + */ +export declare const isBooleanAttr: (key: string) => boolean; +/** + * Boolean attributes should be included if the value is truthy or ''. + * e.g. `<select multiple>` compiles to `{ multiple: '' }` + */ +export declare function includeBooleanAttr(value: unknown): boolean; +export declare function isSSRSafeAttrName(name: string): boolean; +export declare const propsToAttrMap: Record<string, string | undefined>; +/** + * Known attributes, this is used for stringification of runtime static nodes + * so that we don't stringify bindings that cannot be set from HTML. + * Don't also forget to allow `data-*` and `aria-*`! + * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes + */ +export declare const isKnownHtmlAttr: (key: string) => boolean; +/** + * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute + */ +export declare const isKnownSvgAttr: (key: string) => boolean; +/** + * Shared between server-renderer and runtime-core hydration logic + */ +export declare function isRenderableAttrValue(value: unknown): boolean; + +export declare function escapeHtml(string: unknown): string; +export declare function escapeHtmlComment(src: string): string; + +export declare function looseEqual(a: any, b: any): boolean; +export declare function looseIndexOf(arr: any[], val: any): number; /** * For converting {{ interpolation }} values to displayed strings. @@ -340,17 +309,15 @@ export declare function stringifyStyle(styles: NormalizedStyle | string | undefi */ export declare const toDisplayString: (val: unknown) => string; -/** - * @private - */ -export declare const toHandlerKey: (str: string) => string; +export type Prettify<T> = { + [K in keyof T]: T[K]; +} & {}; +export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +export type LooseRequired<T> = { + [P in keyof (T & Required<T>)]: T[P]; +}; +export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N; +export type Awaited<T> = T extends null | undefined ? T : T extends object & { + then(onfulfilled: infer F, ...args: infer _): any; +} ? F extends (value: infer V, ...args: infer _) => any ? Awaited<V> : never : T; -export declare const toNumber: (val: any) => any; - -export declare const toRawType: (value: unknown) => string; - -export declare const toTypeString: (value: unknown) => string; - -export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; - -export { } diff --git a/node_modules/@vue/shared/dist/shared.esm-bundler.js b/node_modules/@vue/shared/dist/shared.esm-bundler.js index 1e464319..6db52ab5 100644 --- a/node_modules/@vue/shared/dist/shared.esm-bundler.js +++ b/node_modules/@vue/shared/dist/shared.esm-bundler.js @@ -1,596 +1,490 @@ /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ +* @vue/shared v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } -/** - * dev only flag -> name mapping - */ -const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` +const EMPTY_OBJ = !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {}; +const EMPTY_ARR = !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : []; +const NOOP = () => { }; - -/** - * Dev only - */ -const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' -}; - -const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; -const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join('\n'); -} - -/** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); -/** - * The full list is needed during SSR to produce the correct initial markup. - */ -const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs + - `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` + - `loop,open,required,reversed,scoped,seamless,` + - `checked,muted,multiple,selected`); -/** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ -function includeBooleanAttr(value) { - return !!value || value === ''; -} -const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; -const attrValidationCache = {}; -function isSSRSafeAttrName(name) { - if (attrValidationCache.hasOwnProperty(name)) { - return attrValidationCache[name]; - } - const isUnsafe = unsafeAttrCharRE.test(name); - if (isUnsafe) { - console.error(`unsafe attribute name: ${name}`); - } - return (attrValidationCache[name] = !isUnsafe); -} -const propsToAttrMap = { - acceptCharset: 'accept-charset', - className: 'class', - htmlFor: 'for', - httpEquiv: 'http-equiv' -}; -/** - * CSS properties that accept plain numbers - */ -const isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,` + - `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` + - `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` + - `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` + - `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` + - `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` + - // SVG - `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` + - `stroke-miterlimit,stroke-opacity,stroke-width`); -/** - * Known attributes, this is used for stringification of runtime static nodes - * so that we don't stringify bindings that cannot be set from HTML. - * Don't also forget to allow `data-*` and `aria-*`! - * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes - */ -const isKnownHtmlAttr = /*#__PURE__*/ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,` + - `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` + - `border,buffered,capture,challenge,charset,checked,cite,class,code,` + - `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` + - `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` + - `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` + - `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` + - `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` + - `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` + - `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` + - `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` + - `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` + - `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` + - `start,step,style,summary,tabindex,target,title,translate,type,usemap,` + - `value,width,wrap`); -/** - * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute - */ -const isKnownSvgAttr = /*#__PURE__*/ makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,` + - `arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,` + - `baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,` + - `clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,` + - `color-interpolation-filters,color-profile,color-rendering,` + - `contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,` + - `descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,` + - `dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,` + - `fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,` + - `font-family,font-size,font-size-adjust,font-stretch,font-style,` + - `font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,` + - `glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,` + - `gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,` + - `horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,` + - `k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,` + - `lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,` + - `marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,` + - `mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,` + - `name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,` + - `overflow,overline-position,overline-thickness,panose-1,paint-order,path,` + - `pathLength,patternContentUnits,patternTransform,patternUnits,ping,` + - `pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,` + - `preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,` + - `rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,` + - `restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,` + - `specularConstant,specularExponent,speed,spreadMethod,startOffset,` + - `stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,` + - `strikethrough-position,strikethrough-thickness,string,stroke,` + - `stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,` + - `stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,` + - `systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,` + - `text-decoration,text-rendering,textLength,to,transform,transform-origin,` + - `type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,` + - `unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,` + - `v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,` + - `vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,` + - `writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,` + - `xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,` + - `xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`); - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - let ret = ''; - if (!styles || isString(styles)) { - return ret; - } - for (const key in styles) { - const value = styles[key]; - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - if (isString(value) || - (typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) { - // only render valid values - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -// These tag configs are shared between compiler-dom and runtime-dom, so they -// https://developer.mozilla.org/en-US/docs/Web/HTML/Element -const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; -// https://developer.mozilla.org/en-US/docs/Web/SVG/Element -const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; -const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag. - */ -const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag. - */ -const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag. - */ -const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS); - -const escapeRE = /["'&<>]/; -function escapeHtml(string) { - const str = '' + string; - const match = escapeRE.exec(str); - if (!match) { - return str; - } - let html = ''; - let escaped; - let index; - let lastIndex = 0; - for (index = match.index; index < str.length; index++) { - switch (str.charCodeAt(index)) { - case 34: // " - escaped = '"'; - break; - case 38: // & - escaped = '&'; - break; - case 39: // ' - escaped = '''; - break; - case 60: // < - escaped = '<'; - break; - case 62: // > - escaped = '>'; - break; - default: - continue; - } - if (lastIndex !== index) { - html += str.slice(lastIndex, index); - } - lastIndex = index + 1; - html += escaped; - } - return lastIndex !== index ? html + str.slice(lastIndex, index) : html; -} -// https://www.w3.org/TR/html52/syntax.html#comments -const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; -function escapeHtmlComment(src) { - return src.replace(commentStripRE, ''); -} - -function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); -} - -/** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ -const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); -}; -const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; - -const EMPTY_OBJ = (process.env.NODE_ENV !== 'production') - ? Object.freeze({}) - : {}; -const EMPTY_ARR = (process.env.NODE_ENV !== 'production') ? Object.freeze([]) : []; -const NOOP = () => { }; -/** - * Always return false. - */ const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const isModelListener = (key) => key.startsWith('onUpdate:'); +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty.call(val, key); const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === '[object Map]'; -const isSet = (val) => toTypeString(val) === '[object Set]'; -const isDate = (val) => toTypeString(val) === '[object Date]'; -const isFunction = (val) => typeof val === 'function'; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; -const isPlainObject = (val) => toTypeString(val) === '[object Object]'; -const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; -const isReservedProp = /*#__PURE__*/ makeMap( -// the leading comma is intentional so empty string "" is also included -',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); -const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; -/** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -/** - * @private - */ -const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); -// compare whether a value has changed, accounting for NaN. +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/; function genPropsAccessExp(name) { - return identRE.test(name) - ? `__props.${name}` - : `__props[${JSON.stringify(name)}]`; + return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`; } -export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isNoUnitNumericStyleProp, isObject, isOn, isPlainObject, isPromise, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString }; +const PatchFlags = { + "TEXT": 1, + "1": "TEXT", + "CLASS": 2, + "2": "CLASS", + "STYLE": 4, + "4": "STYLE", + "PROPS": 8, + "8": "PROPS", + "FULL_PROPS": 16, + "16": "FULL_PROPS", + "NEED_HYDRATION": 32, + "32": "NEED_HYDRATION", + "STABLE_FRAGMENT": 64, + "64": "STABLE_FRAGMENT", + "KEYED_FRAGMENT": 128, + "128": "KEYED_FRAGMENT", + "UNKEYED_FRAGMENT": 256, + "256": "UNKEYED_FRAGMENT", + "NEED_PATCH": 512, + "512": "NEED_PATCH", + "DYNAMIC_SLOTS": 1024, + "1024": "DYNAMIC_SLOTS", + "DEV_ROOT_FRAGMENT": 2048, + "2048": "DEV_ROOT_FRAGMENT", + "HOISTED": -1, + "-1": "HOISTED", + "BAIL": -2, + "-2": "BAIL" +}; +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const ShapeFlags = { + "ELEMENT": 1, + "1": "ELEMENT", + "FUNCTIONAL_COMPONENT": 2, + "2": "FUNCTIONAL_COMPONENT", + "STATEFUL_COMPONENT": 4, + "4": "STATEFUL_COMPONENT", + "TEXT_CHILDREN": 8, + "8": "TEXT_CHILDREN", + "ARRAY_CHILDREN": 16, + "16": "ARRAY_CHILDREN", + "SLOTS_CHILDREN": 32, + "32": "SLOTS_CHILDREN", + "TELEPORT": 64, + "64": "TELEPORT", + "SUSPENSE": 128, + "128": "SUSPENSE", + "COMPONENT_SHOULD_KEEP_ALIVE": 256, + "256": "COMPONENT_SHOULD_KEEP_ALIVE", + "COMPONENT_KEPT_ALIVE": 512, + "512": "COMPONENT_KEPT_ALIVE", + "COMPONENT": 6, + "6": "COMPONENT" +}; + +const SlotFlags = { + "STABLE": 1, + "1": "STABLE", + "DYNAMIC": 2, + "2": "DYNAMIC", + "FORWARDED": 3, + "3": "FORWARDED" +}; +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); +const isGloballyWhitelisted = isGloballyAllowed; + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/; +const attrValidationCache = {}; +function isSSRSafeAttrName(name) { + if (attrValidationCache.hasOwnProperty(name)) { + return attrValidationCache[name]; + } + const isUnsafe = unsafeAttrCharRE.test(name); + if (isUnsafe) { + console.error(`unsafe attribute name: ${name}`); + } + return attrValidationCache[name] = !isUnsafe; +} +const propsToAttrMap = { + acceptCharset: "accept-charset", + className: "class", + htmlFor: "for", + httpEquiv: "http-equiv" +}; +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const escapeRE = /["'&<>]/; +function escapeHtml(string) { + const str = "" + string; + const match = escapeRE.exec(str); + if (!match) { + return str; + } + let html = ""; + let escaped; + let index; + let lastIndex = 0; + for (index = match.index; index < str.length; index++) { + switch (str.charCodeAt(index)) { + case 34: + escaped = """; + break; + case 38: + escaped = "&"; + break; + case 39: + escaped = "'"; + break; + case 60: + escaped = "<"; + break; + case 62: + escaped = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str.slice(lastIndex, index); + } + lastIndex = index + 1; + html += escaped; + } + return lastIndex !== index ? html + str.slice(lastIndex, index) : html; +} +const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g; +function escapeHtmlComment(src) { + return src.replace(commentStripRE, ""); +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; +}; + +export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString }; diff --git a/node_modules/@vue/shared/package.json b/node_modules/@vue/shared/package.json index d36e34d0..ecda82ef 100644 --- a/node_modules/@vue/shared/package.json +++ b/node_modules/@vue/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.2.36", + "version": "3.4.15", "description": "internal utils shared across @vue packages", "main": "index.js", "module": "dist/shared.esm-bundler.js", @@ -9,6 +9,20 @@ "index.js", "dist" ], + "exports": { + ".": { + "types": "./dist/shared.d.ts", + "node": { + "production": "./dist/shared.cjs.prod.js", + "development": "./dist/shared.cjs.js", + "default": "./index.js" + }, + "module": "./dist/shared.esm-bundler.js", + "import": "./dist/shared.esm-bundler.js", + "require": "./index.js" + }, + "./*": "./*" + }, "sideEffects": false, "buildOptions": { "formats": [ @@ -30,4 +44,4 @@ "url": "https://github.com/vuejs/core/issues" }, "homepage": "https://github.com/vuejs/core/tree/main/packages/shared#readme" -} +} \ No newline at end of file diff --git a/node_modules/axios/CHANGELOG.md b/node_modules/axios/CHANGELOG.md index 1e6b854b..d3269503 100644 --- a/node_modules/axios/CHANGELOG.md +++ b/node_modules/axios/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [1.6.5](https://github.com/axios/axios/compare/v1.6.4...v1.6.5) (2024-01-05) + + +### Bug Fixes + +* **ci:** refactor notify action as a job of publish action; ([#6176](https://github.com/axios/axios/issues/6176)) ([0736f95](https://github.com/axios/axios/commit/0736f95ce8776366dc9ca569f49ba505feb6373c)) +* **dns:** fixed lookup error handling; ([#6175](https://github.com/axios/axios/issues/6175)) ([f4f2b03](https://github.com/axios/axios/commit/f4f2b039dd38eb4829e8583caede4ed6d2dd59be)) + +### Contributors to this release + +- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+41/-6 (#6176 #6175 )") +- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+6/-1 ()") + +## [1.6.4](https://github.com/axios/axios/compare/v1.6.3...v1.6.4) (2024-01-03) + + +### Bug Fixes + +* **security:** fixed formToJSON prototype pollution vulnerability; ([#6167](https://github.com/axios/axios/issues/6167)) ([3c0c11c](https://github.com/axios/axios/commit/3c0c11cade045c4412c242b5727308cff9897a0e)) +* **security:** fixed security vulnerability in follow-redirects ([#6163](https://github.com/axios/axios/issues/6163)) ([75af1cd](https://github.com/axios/axios/commit/75af1cdff5b3a6ca3766d3d3afbc3115bb0811b8)) + +### Contributors to this release + +- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+34/-6 ()") +- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+34/-3 (#6172 #6167 )") +- <img src="https://avatars.githubusercontent.com/u/1402060?v=4&s=18" alt="avatar" width="18"/> [Guy Nesher](https://github.com/gnesher "+10/-10 (#6163 )") + ## [1.6.3](https://github.com/axios/axios/compare/v1.6.2...v1.6.3) (2023-12-26) diff --git a/node_modules/axios/README.md b/node_modules/axios/README.md index 91807720..f012e446 100644 --- a/node_modules/axios/README.md +++ b/node_modules/axios/README.md @@ -1,17 +1,50 @@ +<h3 align="center"> + Platinum sponsors + <br> +</h3> + <div align="center"> - <a href="https://axios-http.com"><img src="https://axios-http.com/assets/logo.svg" /></a><br> + <a href="https://runalloy.com?utm_source=github&utm_medium=referral&utm_campaign=121423_axios"> + <picture> + <source width="400px" media="(prefers-color-scheme: dark)" srcset="https://github.com/axios/axios/assets/4814473/f6067247-7eba-4069-852a-ab1bb85b1780"> + <source width="400px" media="(prefers-color-scheme: light)" srcset="https://github.com/axios/axios/assets/4814473/75c37f4d-36e6-44f5-a068-3edd77c00a10"> + <img width="400px" src="https://github.com/axios/axios/assets/4814473/75c37f4d-36e6-44f5-a068-3edd77c00a10" /> + </picture> + </a> + + <p align="center">Alloy is the integration development platform that makes it simple and <br>fast for SaaS companies to launch critical user-facing integrations.</p> + <p align="center"> + <a href="https://runalloy.com/signup?utm_source=github&utm_medium=referral&utm_campaign=11823_axios"><b>Sign up free</b></a> • + <a href="https://docs.runalloy.com/docs?utm_source=github&utm_medium=referral&utm_campaign=11823_axios"><b>Documentation</b></a> + </p> + <br><br> </div> <h3 align="center"> - A special thanks to your headline sponsors + Gold sponsors <br><br> </h3> <div align="center"> - <a href="https://runalloy.com?utm_source=github&utm_medium=referral&utm_campaign=121423_axios"><img style="width:20rem" src="https://github.com/axios/axios/assets/4814473/d50a6cbb-bbe7-4e70-9e1a-f698c6cdc437" /></a> - <br><br> + <a href="https://stytch.com?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=logo&utm_campaign=axios-http"> + <picture> + <source width="200px" media="(prefers-color-scheme: dark)" srcset="https://github.com/axios/axios/assets/4814473/538d715a-13c7-4668-ae7d-37a4548423f4"> + <source width="200px" media="(prefers-color-scheme: light)" srcset="https://github.com/axios/axios/assets/4814473/b6a9a7bc-9fb1-4b9b-909f-1b4bee1fd142"> + <img width="200px" src="https://github.com/axios/axios/assets/4814473/b6a9a7bc-9fb1-4b9b-909f-1b4bee1fd142" /> + </picture> + </a> + <p align="center">API-first authentication, authorization, and fraud prevention</p> + <p align="center"> + <a href="https://stytch.com?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=website-link&utm_campaign=axios-http"><b>Website</b></a> • + <a href="https://stytch.com/docs?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=docs-link&utm_campaign=axios-http"><b>Documentation</b></a> • <a href="https://github.com/stytchauth/stytch-node?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_content=node-sdk&utm_campaign=axios-http"><b>Node.js Backend SDK</b></a> + </p> </div> + +<br><br> +<div align="center"> + <a href="https://axios-http.com"><img src="https://axios-http.com/assets/logo.svg" /></a><br> +</div> <p align="center">Promise based HTTP client for the browser and node.js</p> diff --git a/node_modules/axios/dist/axios.js b/node_modules/axios/dist/axios.js index 9bf64c35..12d4a38c 100644 --- a/node_modules/axios/dist/axios.js +++ b/node_modules/axios/dist/axios.js @@ -1,4 +1,4 @@ -// Axios v1.6.3 Copyright (c) 2023 Matt Zabriskie and contributors +// Axios v1.6.5 Copyright (c) 2024 Matt Zabriskie and contributors (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : @@ -1387,6 +1387,7 @@ function formDataToJSON(formData) { function buildPath(path, value, target, index) { var name = path[index++]; + if (name === '__proto__') return true; var isNumericKey = Number.isFinite(+name); var isLast = index >= path.length; name = !name && utils$1.isArray(target) ? target.length : name; @@ -2519,7 +2520,7 @@ return config; } - var VERSION = "1.6.3"; + var VERSION = "1.6.5"; var validators$1 = {}; diff --git a/node_modules/axios/dist/axios.js.map b/node_modules/axios/dist/axios.js.map index af81d66c..48b83fd9 100644 --- a/node_modules/axios/dist/axios.js.map +++ b/node_modules/axios/dist/axios.js.map @@ -1 +1 @@ -{"version":3,"file":"axios.js","sources":["../lib/helpers/bind.js","../lib/utils.js","../lib/core/AxiosError.js","../lib/helpers/null.js","../lib/helpers/toFormData.js","../lib/helpers/AxiosURLSearchParams.js","../lib/helpers/buildURL.js","../lib/core/InterceptorManager.js","../lib/defaults/transitional.js","../lib/platform/browser/classes/URLSearchParams.js","../lib/platform/browser/classes/FormData.js","../lib/platform/browser/classes/Blob.js","../lib/platform/browser/index.js","../lib/platform/common/utils.js","../lib/platform/index.js","../lib/helpers/toURLEncodedForm.js","../lib/helpers/formDataToJSON.js","../lib/defaults/index.js","../lib/helpers/parseHeaders.js","../lib/core/AxiosHeaders.js","../lib/core/transformData.js","../lib/cancel/isCancel.js","../lib/cancel/CanceledError.js","../lib/core/settle.js","../lib/helpers/cookies.js","../lib/helpers/isAbsoluteURL.js","../lib/helpers/combineURLs.js","../lib/core/buildFullPath.js","../lib/helpers/isURLSameOrigin.js","../lib/helpers/parseProtocol.js","../lib/helpers/speedometer.js","../lib/adapters/xhr.js","../lib/adapters/adapters.js","../lib/core/dispatchRequest.js","../lib/core/mergeConfig.js","../lib/env/data.js","../lib/helpers/validator.js","../lib/core/Axios.js","../lib/cancel/CancelToken.js","../lib/helpers/spread.js","../lib/helpers/isAxiosError.js","../lib/helpers/HttpStatusCode.js","../lib/axios.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.3\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n"],"names":["bind","fn","thisArg","wrap","apply","arguments","toString","Object","prototype","getPrototypeOf","kindOf","cache","thing","str","call","slice","toLowerCase","create","kindOfTest","type","typeOfTest","isArray","Array","isUndefined","isBuffer","val","constructor","isFunction","isArrayBuffer","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isObject","isBoolean","isPlainObject","Symbol","toStringTag","iterator","isDate","isFile","isBlob","isFileList","isStream","pipe","isFormData","kind","FormData","append","isURLSearchParams","trim","replace","forEach","obj","allOwnKeys","i","l","length","keys","getOwnPropertyNames","len","key","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","merge","caseless","assignValue","targetKey","extend","a","b","stripBOM","content","charCodeAt","inherits","superConstructor","props","descriptors","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","prop","merged","endsWith","searchString","position","String","undefined","lastIndex","indexOf","toArray","arr","isTypedArray","TypedArray","Uint8Array","forEachEntry","generator","next","done","pair","matchAll","regExp","matches","exec","push","isHTMLForm","toCamelCase","replacer","m","p1","p2","toUpperCase","hasOwnProperty","isRegExp","reduceDescriptors","reducer","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","noop","toFiniteNumber","defaultValue","Number","isFinite","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","generateString","size","alphabet","Math","random","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isAsyncFn","isThenable","then","hasOwnProp","AxiosError","message","code","config","request","response","captureStackTrace","utils","toJSON","description","number","fileName","lineNumber","columnNumber","status","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","map","each","token","join","isFlatArray","some","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","defined","option","visitor","defaultVisitor","_Blob","Blob","useBlob","convertValue","toISOString","Buffer","JSON","stringify","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","encoder","_encode","buildURL","url","serializeFn","serialize","serializedParams","hashmarkIndex","InterceptorManager","handlers","fulfilled","rejected","synchronous","runWhen","id","forEachHandler","h","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","URLSearchParams","isBrowser","classes","protocols","hasBrowserEnv","document","hasStandardBrowserEnv","product","navigator","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","toURLEncodedForm","data","helpers","isNode","parsePropPath","arrayToObject","formDataToJSON","buildPath","isNumericKey","isLast","entries","stringifySafely","rawValue","parser","parse","e","defaults","transitional","transitionalDefaults","adapter","transformRequest","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","formSerializer","_FormData","env","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","method","ignoreDuplicateOf","rawHeaders","parsed","line","substring","$internals","normalizeHeader","header","normalizeValue","parseTokens","tokens","tokensRE","isValidHeaderName","matchHeaderValue","isHeaderNameFilter","formatHeader","w","char","buildAccessors","accessorName","methodName","arg1","arg2","arg3","configurable","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","parseHeaders","matcher","deleted","deleteHeader","format","normalized","targets","asStrings","first","computed","internals","accessors","defineAccessor","accessor","mapped","get","headerValue","transformData","fns","transform","normalize","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","settle","resolve","reject","ERR_BAD_REQUEST","floor","write","expires","domain","secure","cookie","Date","toGMTString","read","RegExp","decodeURIComponent","remove","now","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","standardBrowserEnv","msie","userAgent","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","isURLSameOrigin","requestURL","nonStandardBrowserEnv","parseProtocol","speedometer","samplesCount","min","bytes","timestamps","head","tail","firstSampleTS","chunkLength","startedAt","bytesCount","passed","round","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","loaded","total","lengthComputable","progressBytes","rate","inRange","progress","estimated","event","isXHRAdapterSupported","XMLHttpRequest","Promise","dispatchXhrRequest","requestData","requestHeaders","withXSRFToken","onCanceled","cancelToken","unsubscribe","signal","removeEventListener","Boolean","auth","username","password","unescape","btoa","fullPath","open","paramsSerializer","onloadend","responseHeaders","getAllResponseHeaders","responseData","responseText","statusText","_resolve","_reject","err","onreadystatechange","handleLoad","readyState","responseURL","setTimeout","onabort","handleAbort","ECONNABORTED","onerror","handleError","ERR_NETWORK","ontimeout","handleTimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","cookies","setRequestHeader","withCredentials","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","send","knownAdapters","http","httpAdapter","xhr","xhrAdapter","renderReason","reason","isResolvedHandle","getAdapter","adapters","nameOrAdapter","rejectedReasons","reasons","state","s","throwIfCancellationRequested","throwIfRequested","dispatchRequest","onAdapterResolution","onAdapterRejection","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","computeConfigValue","configValue","VERSION","validators","validator","deprecatedWarnings","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","configOrUrl","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","promise","chain","newConfig","onFulfilled","onRejected","forEachMethodNoData","forEachMethodWithData","generateHTTPMethod","isForm","httpMethod","CancelToken","executor","resolvePromise","promiseExecutor","_listeners","onfulfilled","splice","c","spread","callback","isAxiosError","payload","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","createInstance","defaultConfig","instance","axios","Cancel","all","promises","formToJSON"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEe,SAASA,IAAI,CAACC,EAAE,EAAEC,OAAO,EAAE;IACxC,OAAO,SAASC,IAAI,GAAG;EACrB,IAAA,OAAOF,EAAE,CAACG,KAAK,CAACF,OAAO,EAAEG,SAAS,CAAC,CAAA;KACpC,CAAA;EACH;;ECFA;;EAEA,IAAOC,QAAQ,GAAIC,MAAM,CAACC,SAAS,CAA5BF,QAAQ,CAAA;EACf,IAAOG,cAAc,GAAIF,MAAM,CAAxBE,cAAc,CAAA;EAErB,IAAMC,MAAM,GAAI,UAAAC,KAAK,EAAA;IAAA,OAAI,UAAAC,KAAK,EAAI;EAC9B,IAAA,IAAMC,GAAG,GAAGP,QAAQ,CAACQ,IAAI,CAACF,KAAK,CAAC,CAAA;MAChC,OAAOD,KAAK,CAACE,GAAG,CAAC,KAAKF,KAAK,CAACE,GAAG,CAAC,GAAGA,GAAG,CAACE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,C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E,KAAK,CAAA,SAAA,CAAQ,GAAGA,KAAK;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"axios.js","sources":["../lib/helpers/bind.js","../lib/utils.js","../lib/core/AxiosError.js","../lib/helpers/null.js","../lib/helpers/toFormData.js","../lib/helpers/AxiosURLSearchParams.js","../lib/helpers/buildURL.js","../lib/core/InterceptorManager.js","../lib/defaults/transitional.js","../lib/platform/browser/classes/URLSearchParams.js","../lib/platform/browser/classes/FormData.js","../lib/platform/browser/classes/Blob.js","../lib/platform/browser/index.js","../lib/platform/common/utils.js","../lib/platform/index.js","../lib/helpers/toURLEncodedForm.js","../lib/helpers/formDataToJSON.js","../lib/defaults/index.js","../lib/helpers/parseHeaders.js","../lib/core/AxiosHeaders.js","../lib/core/transformData.js","../lib/cancel/isCancel.js","../lib/cancel/CanceledError.js","../lib/core/settle.js","../lib/helpers/cookies.js","../lib/helpers/isAbsoluteURL.js","../lib/helpers/combineURLs.js","../lib/core/buildFullPath.js","../lib/helpers/isURLSameOrigin.js","../lib/helpers/parseProtocol.js","../lib/helpers/speedometer.js","../lib/adapters/xhr.js","../lib/adapters/adapters.js","../lib/core/dispatchRequest.js","../lib/core/mergeConfig.js","../lib/env/data.js","../lib/helpers/validator.js","../lib/core/Axios.js","../lib/cancel/CancelToken.js","../lib/helpers/spread.js","../lib/helpers/isAxiosError.js","../lib/helpers/HttpStatusCode.js","../lib/axios.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.5\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n"],"names":["bind","fn","thisArg","wrap","apply","arguments","toString","Object","prototype","getPrototypeOf","kindOf","cache","thing","str","call","slice","toLowerCase","create","kindOfTest","type","typeOfTest","isArray","Array","isUndefined","isBuffer","val","constructor","isFunction","isArrayBuffer","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isObject","isBoolean","isPlainObject","Symbol","toStringTag","iterator","isDate","isFile","isBlob","isFileList","isStream","pipe","isFormData","kind","FormData","append","isURLSearchParams","trim","replace","forEach","obj","allOwnKeys","i","l","length","keys","getOwnPropertyNames","len","key","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","merge","caseless","assignValue","targetKey","extend","a","b","stripBOM","content","charCodeAt","inherits","superConstructor","props","descriptors","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","prop","merged","endsWith","searchString","position","String","undefined","lastIndex","indexOf","toArray","arr","isTypedArray","TypedArray","Uint8Array","forEachEntry","generator","next","done","pair","matchAll","regExp","matches","exec","push","isHTMLForm","toCamelCase","replacer","m","p1","p2","toUpperCase","hasOwnProperty","isRegExp","reduceDescriptors","reducer","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","noop","toFiniteNumber","defaultValue","Number","isFinite","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","generateString","size","alphabet","Math","random","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isAsyncFn","isThenable","then","hasOwnProp","AxiosError","message","code","config","request","response","captureStackTrace","utils","toJSON","description","number","fileName","lineNumber","columnNumber","status","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","map","each","token","join","isFlatArray","some","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","defined","option","visitor","defaultVisitor","_Blob","Blob","useBlob","convertValue","toISOString","Buffer","JSON","stringify","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","encoder","_encode","buildURL","url","serializeFn","serialize","serializedParams","hashmarkIndex","InterceptorManager","handlers","fulfilled","rejected","synchronous","runWhen","id","forEachHandler","h","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","URLSearchParams","isBrowser","classes","protocols","hasBrowserEnv","document","hasStandardBrowserEnv","product","navigator","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","toURLEncodedForm","data","helpers","isNode","parsePropPath","arrayToObject","formDataToJSON","buildPath","isNumericKey","isLast","entries","stringifySafely","rawValue","parser","parse","e","defaults","transitional","transitionalDefaults","adapter","transformRequest","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","formSerializer","_FormData","env","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","method","ignoreDuplicateOf","rawHeaders","parsed","line","substring","$internals","normalizeHeader","header","normalizeValue","parseTokens","tokens","tokensRE","isValidHeaderName","matchHeaderValue","isHeaderNameFilter","formatHeader","w","char","buildAccessors","accessorName","methodName","arg1","arg2","arg3","configurable","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","parseHeaders","matcher","deleted","deleteHeader","format","normalized","targets","asStrings","first","computed","internals","accessors","defineAccessor","accessor","mapped","get","headerValue","transformData","fns","transform","normalize","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","settle","resolve","reject","ERR_BAD_REQUEST","floor","write","expires","domain","secure","cookie","Date","toGMTString","read","RegExp","decodeURIComponent","remove","now","isAbsoluteURL","combineURLs","baseURL","relativeURL","buildFullPath","requestedURL","standardBrowserEnv","msie","userAgent","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","isURLSameOrigin","requestURL","nonStandardBrowserEnv","parseProtocol","speedometer","samplesCount","min","bytes","timestamps","head","tail","firstSampleTS","chunkLength","startedAt","bytesCount","passed","round","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","loaded","total","lengthComputable","progressBytes","rate","inRange","progress","estimated","event","isXHRAdapterSupported","XMLHttpRequest","Promise","dispatchXhrRequest","requestData","requestHeaders","withXSRFToken","onCanceled","cancelToken","unsubscribe","signal","removeEventListener","Boolean","auth","username","password","unescape","btoa","fullPath","open","paramsSerializer","onloadend","responseHeaders","getAllResponseHeaders","responseData","responseText","statusText","_resolve","_reject","err","onreadystatechange","handleLoad","readyState","responseURL","setTimeout","onabort","handleAbort","ECONNABORTED","onerror","handleError","ERR_NETWORK","ontimeout","handleTimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","cookies","setRequestHeader","withCredentials","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","send","knownAdapters","http","httpAdapter","xhr","xhrAdapter","renderReason","reason","isResolvedHandle","getAdapter","adapters","nameOrAdapter","rejectedReasons","reasons","state","s","throwIfCancellationRequested","throwIfRequested","dispatchRequest","onAdapterResolution","onAdapterRejection","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","computeConfigValue","configValue","VERSION","validators","validator","deprecatedWarnings","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","configOrUrl","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","unshiftRequestInterceptors","interceptor","unshift","responseInterceptorChain","pushResponseInterceptors","promise","chain","newConfig","onFulfilled","onRejected","forEachMethodNoData","forEachMethodWithData","generateHTTPMethod","isForm","httpMethod","CancelToken","executor","resolvePromise","promiseExecutor","_listeners","onfulfilled","splice","c","spread","callback","isAxiosError","payload","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","createInstance","defaultConfig","instance","axios","Cancel","all","promises","formToJSON"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEe,SAASA,IAAI,CAACC,EAAE,EAAEC,OAAO,EAAE;IACxC,OAAO,SAASC,IAAI,GAAG;EACrB,IAAA,OAAOF,EAAE,CAACG,KAAK,CAACF,OAAO,EAAEG,SAAS,CAAC,CAAA;KACpC,CAAA;EACH;;ECFA;;EAEA,IAAOC,QAAQ,GAAIC,MA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GA,YAAY,CAAA;;EAEjC;EACAqE,KAAK,CAACzI,WAAW,GAAGA,WAAW,CAAA;EAE/ByI,KAAK,CAAClU,YAAY,GAAGA,cAAY,CAAA;EAEjCkU,KAAK,CAACI,UAAU,GAAG,UAAA3oB,KAAK,EAAA;EAAA,EAAA,OAAIuQ,cAAc,CAAChG,OAAK,CAAC3D,UAAU,CAAC5G,KAAK,CAAC,GAAG,IAAIsC,QAAQ,CAACtC,KAAK,CAAC,GAAGA,KAAK,CAAC,CAAA;EAAA,CAAA,CAAA;EAEjGuoB,KAAK,CAACtJ,UAAU,GAAGC,QAAQ,CAACD,UAAU,CAAA;EAEtCsJ,KAAK,CAACnE,cAAc,GAAGA,gBAAc,CAAA;EAErCmE,KAAK,CAAA,SAAA,CAAQ,GAAGA,KAAK;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/axios/dist/axios.min.js b/node_modules/axios/dist/axios.min.js index de8fdb9e..cba518c2 100644 --- a/node_modules/axios/dist/axios.min.js +++ b/node_modules/axios/dist/axios.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).axios=t()}(this,(function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return c(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||l(e,t)||p()}function u(e){return function(e){if(Array.isArray(e))return d(e)}(e)||f(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){if(Array.isArray(e))return e}function f(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){return function(){return e.apply(t,arguments)}}var m,y=Object.prototype.toString,v=Object.getPrototypeOf,b=(m=Object.create(null),function(e){var t=y.call(e);return m[t]||(m[t]=t.slice(8,-1).toLowerCase())}),g=function(e){return e=e.toLowerCase(),function(t){return b(t)===e}},w=function(e){return function(t){return n(t)===e}},O=Array.isArray,E=w("undefined");var S=g("ArrayBuffer");var R=w("string"),A=w("function"),j=w("number"),T=function(e){return null!==e&&"object"===n(e)},P=function(e){if("object"!==b(e))return!1;var t=v(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},N=g("Date"),x=g("File"),C=g("Blob"),k=g("FileList"),_=g("URLSearchParams");function F(e,t){var r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.allOwnKeys,s=void 0!==a&&a;if(null!=e)if("object"!==n(e)&&(e=[e]),O(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{var u,c=s?Object.getOwnPropertyNames(e):Object.keys(e),f=c.length;for(r=0;r<f;r++)u=c[r],t.call(null,e[u],u,e)}}function U(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),o=r.length;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}var D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,B=function(e){return!E(e)&&e!==D};var L,I=(L="undefined"!=typeof Uint8Array&&v(Uint8Array),function(e){return L&&e instanceof L}),q=g("HTMLFormElement"),z=function(e){var t=Object.prototype.hasOwnProperty;return function(e,n){return t.call(e,n)}}(),M=g("RegExp"),H=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};F(n,(function(n,o){var i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},J="abcdefghijklmnopqrstuvwxyz",W="0123456789",K={DIGIT:W,ALPHA:J,ALPHA_DIGIT:J+J.toUpperCase()+W};var V=g("AsyncFunction"),G={isArray:O,isArrayBuffer:S,isBuffer:function(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||A(e.append)&&("formdata"===(t=b(e))||"object"===t&&A(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&S(e.buffer)},isString:R,isNumber:j,isBoolean:function(e){return!0===e||!1===e},isObject:T,isPlainObject:P,isUndefined:E,isDate:N,isFile:x,isBlob:C,isRegExp:M,isFunction:A,isStream:function(e){return T(e)&&A(e.pipe)},isURLSearchParams:_,isTypedArray:I,isFileList:k,forEach:F,merge:function e(){for(var t=B(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&U(r,o)||o;P(r[i])&&P(t)?r[i]=e(r[i],t):P(t)?r[i]=e({},t):O(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&F(arguments[i],o);return r},extend:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.allOwnKeys;return F(t,(function(t,r){n&&A(t)?e[r]=h(t,n):e[r]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&v(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:b,kindOfTest:g,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(O(e))return e;var t=e.length;if(!j(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:q,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:H,freezeMethods:function(e){H(e,(function(t,n){if(A(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];A(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return O(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:U,global:D,isContextDefined:B,ALPHABET:K,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&A(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(T(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=O(n)?[]:{};return F(n,(function(t,n){var i=e(t,r+1);!E(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:V,isThenable:function(e){return e&&(T(e)||A(e))&&A(e.then)&&A(e.catch)}};function X(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}G.inherits(X,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var $=X.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){Q[e]={value:e}})),Object.defineProperties(X,Q),Object.defineProperty($,"isAxiosError",{value:!0}),X.from=function(e,t,n,r,o,i){var a=Object.create($);return G.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),X.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function Z(e){return G.isPlainObject(e)||G.isArray(e)}function Y(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,n){return e?e.concat(t).map((function(e,t){return e=Y(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var te=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ne(e,t,r){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var o=(r=G.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,i=r.visitor||f,a=r.dots,s=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!u&&G.isBlob(e))throw new X("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function f(e,r,i){var u=e;if(e&&!i&&"object"===n(e))if(G.endsWith(r,"{}"))r=o?r:r.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Z)}(e)||(G.isFileList(e)||G.endsWith(r,"[]"))&&(u=G.toArray(e)))return r=Y(r),u.forEach((function(e,n){!G.isUndefined(e)&&null!==e&&t.append(!0===s?ee([r],n,a):null===s?r:r+"[]",c(e))})),!1;return!!Z(e)||(t.append(ee(i,r,a),c(e)),!1)}var l=[],d=Object.assign(te,{defaultVisitor:f,convertValue:c,isVisitable:Z});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),G.forEach(n,(function(n,o){!0===(!(G.isUndefined(n)||null===n)&&i.call(t,n,G.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),l.pop()}}(e),t}function re(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function oe(e,t){this._pairs=[],e&&ne(e,this,t)}var ie=oe.prototype;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function se(e,t,n){if(!t)return e;var r,o=n&&n.encode||ae,i=n&&n.serialize;if(r=i?i(t,n):G.isURLSearchParams(t)?t.toString():new oe(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){var t=e?function(t){return e.call(this,t,re)}:re;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ue,ce=function(){function e(){r(this,e),this.handlers=[]}return i(e,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},de="undefined"!=typeof window&&"undefined"!=typeof document,pe=(ue="undefined"!=typeof navigator&&navigator.product,de&&["ReactNative","NativeScript","NS"].indexOf(ue)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me=t(t({},Object.freeze({__proto__:null,hasBrowserEnv:de,hasStandardBrowserWebWorkerEnv:he,hasStandardBrowserEnv:pe})),le);function ye(e){function t(e,n,r,o){var i=e[o++],a=Number.isFinite(+i),s=o>=e.length;return i=!i&&G.isArray(r)?r.length:i,s?(G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&G.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)r[n=o[t]]=e[n];return r}(r[i])),!a)}if(G.isFormData(e)&&G.isFunction(e.entries)){var n={};return G.forEachEntry(e,(function(e,r){t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null}var ve={transitional:fe,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=G.isObject(e);if(i&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return o&&o?JSON.stringify(ye(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new me.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return me.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=G.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return ne(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||ve.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&G.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw X.from(e,X.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(function(e){ve.headers[e]={}}));var be=ve,ge=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),we=Symbol("internals");function Oe(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return!1===e||null==e?e:G.isArray(e)?e.map(Ee):String(e)}function Se(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}var Re=function(e,t){function n(e){r(this,n),e&&this.set(e)}return i(n,[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=Oe(t);if(!o)throw new Error("header name must be a non-empty string");var i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ee(e))}var i,a,s,u,c,f=function(e,t){return G.forEach(e,(function(e,n){return o(e,n,t)}))};return G.isPlainObject(e)||e instanceof this.constructor?f(e,t):G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?f((c={},(i=e)&&i.split("\n").forEach((function(e){u=e.indexOf(":"),a=e.substring(0,u).trim().toLowerCase(),s=e.substring(u+1).trim(),!a||c[a]&&ge[a]||("set-cookie"===a?c[a]?c[a].push(s):c[a]=[s]:c[a]=c[a]?c[a]+", "+s:s)})),c),t):null!=e&&o(t,e,n),this}},{key:"get",value:function(e,t){if(e=Oe(e)){var n=G.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(G.isFunction(t))return t.call(this,r,n);if(G.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Oe(e)){var n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!Se(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=Oe(e)){var o=G.findKey(n,e);!o||t&&!Se(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!Se(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return G.forEach(this,(function(r,o){var i=G.findKey(n,o);if(i)return t[i]=Ee(r),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Ee(r),n[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return G.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=s(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[we]=this[we]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=Oe(e);t[r]||(!function(e,t){var n=G.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}]),n}();Re.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Re.prototype,(function(e,t){var n=e.value,r=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[r]=e}}})),G.freezeMethods(Re);var Ae=Re;function je(e,t){var n=this||be,r=t||n,o=Ae.from(r.headers),i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Te(e){return!(!e||!e.__CANCEL__)}function Pe(e,t,n){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Pe,X,{__CANCEL__:!0});var Ne=me.hasStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),G.isString(r)&&a.push("path="+r),G.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function xe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Ce=me.hasStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=G.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};function ke(e,t){var n=0,r=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),c=o[a];n||(n=u),r[i]=s,o[i]=u;for(var f=a,l=0;f!==i;)l+=r[f++],f%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(u-n<t)){var d=c&&u-c;return d?Math.round(1e3*l/d):void 0}}}(50,250);return function(o){var i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;var c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}var _e={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o,i,a=e.data,s=Ae.from(e.headers).normalize(),d=e.responseType,h=e.withXSRFToken;function m(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}if(G.isFormData(a))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if(!1!==(o=s.getContentType())){var y=o?o.split(";").map((function(e){return e.trim()})).filter(Boolean):[],v=c(i=y)||f(i)||l(i)||p(),b=v[0],g=v.slice(1);s.setContentType([b||"multipart/form-data"].concat(u(g)).join("; "))}var w=new XMLHttpRequest;if(e.auth){var O=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(O+":"+E))}var S=xe(e.baseURL,e.url);function R(){if(w){var r=Ae.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),m()}),(function(e){n(e),m()}),{data:d&&"text"!==d&&"json"!==d?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:r,config:e,request:w}),w=null}}if(w.open(e.method.toUpperCase(),se(S,e.params,e.paramsSerializer),!0),w.timeout=e.timeout,"onloadend"in w?w.onloadend=R:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(R)},w.onabort=function(){w&&(n(new X("Request aborted",X.ECONNABORTED,e,w)),w=null)},w.onerror=function(){n(new X("Network Error",X.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||fe;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new X(t,r.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,w)),w=null},me.hasStandardBrowserEnv&&(h&&G.isFunction(h)&&(h=h(e)),h||!1!==h&&Ce(S))){var A=e.xsrfHeaderName&&e.xsrfCookieName&&Ne.read(e.xsrfCookieName);A&&s.set(e.xsrfHeaderName,A)}void 0===a&&s.setContentType(null),"setRequestHeader"in w&&G.forEach(s.toJSON(),(function(e,t){w.setRequestHeader(t,e)})),G.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),d&&"json"!==d&&(w.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&w.addEventListener("progress",ke(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",ke(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){w&&(n(!t||t.type?new Pe(null,e,w):t),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));var j,T=(j=/^([-+\w]{1,25})(:?\/\/|:)/.exec(S))&&j[1]||"";T&&-1===me.protocols.indexOf(T)?n(new X("Unsupported protocol "+T+":",X.ERR_BAD_REQUEST,e)):w.send(a||null)}))}};G.forEach(_e,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Fe=function(e){return"- ".concat(e)},Ue=function(e){return G.isFunction(e)||null===e||!1===e},De=function(e){for(var t,n,r=(e=G.isArray(e)?e:[e]).length,o={},i=0;i<r;i++){var a=void 0;if(n=t=e[i],!Ue(t)&&void 0===(n=_e[(a=String(t)).toLowerCase()]))throw new X("Unknown adapter '".concat(a,"'"));if(n)break;o[a||"#"+i]=n}if(!n){var u=Object.entries(o).map((function(e){var t=s(e,2),n=t[0],r=t[1];return"adapter ".concat(n," ")+(!1===r?"is not supported by the environment":"is not available in the build")}));throw new X("There is no suitable adapter to dispatch the request "+(r?u.length>1?"since :\n"+u.map(Fe).join("\n"):" "+Fe(u[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Be(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pe(null,e)}function Le(e){return Be(e),e.headers=Ae.from(e.headers),e.data=je.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),De(e.adapter||be.adapter)(e).then((function(t){return Be(e),t.data=je.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t}),(function(t){return Te(t)||(Be(e),t&&t.response&&(t.response.data=je.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)}))}var Ie=function(e){return e instanceof Ae?e.toJSON():e};function qe(e,t){t=t||{};var n={};function r(e,t,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function a(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}var u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return o(Ie(e),Ie(t),!0)}};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=u[r]||o,a=i(e[r],t[r],r);G.isUndefined(a)&&i!==s||(n[r]=a)})),n}var ze="1.6.3",Me={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Me[e]=function(r){return n(r)===e||"a"+(t<1?"n ":" ")+e}}));var He={};Me.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.3] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new X(r(o," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!He[o]&&(He[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Je={assertOptions:function(e,t,r){if("object"!==n(e))throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(e),i=o.length;i-- >0;){var a=o[i],s=t[a];if(s){var u=e[a],c=void 0===u||s(u,a,e);if(!0!==c)throw new X("option "+a+" must be "+c,X.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new X("Unknown option "+a,X.ERR_BAD_OPTION)}},validators:Me},We=Je.validators,Ke=function(){function e(t){r(this,e),this.defaults=t,this.interceptors={request:new ce,response:new ce}}return i(e,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=qe(this.defaults,t),r=n.transitional,o=n.paramsSerializer,i=n.headers;void 0!==r&&Je.assertOptions(r,{silentJSONParsing:We.transitional(We.boolean),forcedJSONParsing:We.transitional(We.boolean),clarifyTimeoutError:We.transitional(We.boolean)},!1),null!=o&&(G.isFunction(o)?t.paramsSerializer={serialize:o}:Je.assertOptions(o,{encode:We.function,serialize:We.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&G.merge(i.common,i[t.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]})),t.headers=Ae.concat(a,i);var s=[],u=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var c,f=[];this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)}));var l,d=0;if(!u){var p=[Le.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,f),l=p.length,c=Promise.resolve(t);d<l;)c=c.then(p[d++],p[d++]);return c}l=s.length;var h=t;for(d=0;d<l;){var m=s[d++],y=s[d++];try{h=m(h)}catch(e){y.call(this,e);break}}try{c=Le.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,l=f.length;d<l;)c=c.then(f[d++],f[d++]);return c}},{key:"getUri",value:function(e){return se(xe((e=qe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),e}();G.forEach(["delete","get","head","options"],(function(e){Ke.prototype[e]=function(t,n){return this.request(qe(n||{},{method:e,url:t,data:(n||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(qe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ke.prototype[e]=t(),Ke.prototype[e+"Form"]=t(!0)}));var Ve=Ke,Ge=function(){function e(t){if(r(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var o=this;this.promise.then((function(e){if(o._listeners){for(var t=o._listeners.length;t-- >0;)o._listeners[t](e);o._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){o.subscribe(e),t=e})).then(e);return n.cancel=function(){o.unsubscribe(t)},n},t((function(e,t,r){o.reason||(o.reason=new Pe(e,t,r),n(o.reason))}))}return i(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}();var Xe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xe).forEach((function(e){var t=s(e,2),n=t[0],r=t[1];Xe[r]=n}));var $e=Xe;var Qe=function e(t){var n=new Ve(t),r=h(Ve.prototype.request,n);return G.extend(r,Ve.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(qe(t,n))},r}(be);return Qe.Axios=Ve,Qe.CanceledError=Pe,Qe.CancelToken=Ge,Qe.isCancel=Te,Qe.VERSION=ze,Qe.toFormData=ne,Qe.AxiosError=X,Qe.Cancel=Qe.CanceledError,Qe.all=function(e){return Promise.all(e)},Qe.spread=function(e){return function(t){return e.apply(null,t)}},Qe.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},Qe.mergeConfig=qe,Qe.AxiosHeaders=Ae,Qe.formToJSON=function(e){return ye(G.isHTMLForm(e)?new FormData(e):e)},Qe.getAdapter=De,Qe.HttpStatusCode=$e,Qe.default=Qe,Qe})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).axios=t()}(this,(function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return c(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||l(e,t)||p()}function u(e){return function(e){if(Array.isArray(e))return d(e)}(e)||f(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){if(Array.isArray(e))return e}function f(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e,t){return function(){return e.apply(t,arguments)}}var m,y=Object.prototype.toString,v=Object.getPrototypeOf,b=(m=Object.create(null),function(e){var t=y.call(e);return m[t]||(m[t]=t.slice(8,-1).toLowerCase())}),g=function(e){return e=e.toLowerCase(),function(t){return b(t)===e}},w=function(e){return function(t){return n(t)===e}},O=Array.isArray,E=w("undefined");var S=g("ArrayBuffer");var R=w("string"),A=w("function"),j=w("number"),T=function(e){return null!==e&&"object"===n(e)},P=function(e){if("object"!==b(e))return!1;var t=v(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},N=g("Date"),x=g("File"),C=g("Blob"),k=g("FileList"),_=g("URLSearchParams");function F(e,t){var r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.allOwnKeys,s=void 0!==a&&a;if(null!=e)if("object"!==n(e)&&(e=[e]),O(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{var u,c=s?Object.getOwnPropertyNames(e):Object.keys(e),f=c.length;for(r=0;r<f;r++)u=c[r],t.call(null,e[u],u,e)}}function U(e,t){t=t.toLowerCase();for(var n,r=Object.keys(e),o=r.length;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null}var D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,B=function(e){return!E(e)&&e!==D};var L,I=(L="undefined"!=typeof Uint8Array&&v(Uint8Array),function(e){return L&&e instanceof L}),q=g("HTMLFormElement"),z=function(e){var t=Object.prototype.hasOwnProperty;return function(e,n){return t.call(e,n)}}(),M=g("RegExp"),H=function(e,t){var n=Object.getOwnPropertyDescriptors(e),r={};F(n,(function(n,o){var i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},J="abcdefghijklmnopqrstuvwxyz",W="0123456789",K={DIGIT:W,ALPHA:J,ALPHA_DIGIT:J+J.toUpperCase()+W};var V=g("AsyncFunction"),G={isArray:O,isArrayBuffer:S,isBuffer:function(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||A(e.append)&&("formdata"===(t=b(e))||"object"===t&&A(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&S(e.buffer)},isString:R,isNumber:j,isBoolean:function(e){return!0===e||!1===e},isObject:T,isPlainObject:P,isUndefined:E,isDate:N,isFile:x,isBlob:C,isRegExp:M,isFunction:A,isStream:function(e){return T(e)&&A(e.pipe)},isURLSearchParams:_,isTypedArray:I,isFileList:k,forEach:F,merge:function e(){for(var t=B(this)&&this||{},n=t.caseless,r={},o=function(t,o){var i=n&&U(r,o)||o;P(r[i])&&P(t)?r[i]=e(r[i],t):P(t)?r[i]=e({},t):O(t)?r[i]=t.slice():r[i]=t},i=0,a=arguments.length;i<a;i++)arguments[i]&&F(arguments[i],o);return r},extend:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.allOwnKeys;return F(t,(function(t,r){n&&A(t)?e[r]=h(t,n):e[r]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,s={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&v(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:b,kindOfTest:g,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(O(e))return e;var t=e.length;if(!j(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},forEachEntry:function(e,t){for(var n,r=(e&&e[Symbol.iterator]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:q,hasOwnProperty:z,hasOwnProp:z,reduceDescriptors:H,freezeMethods:function(e){H(e,(function(t,n){if(A(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];A(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:function(e,t){var n={},r=function(e){e.forEach((function(e){n[e]=!0}))};return O(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t},findKey:U,global:D,isContextDefined:B,ALPHABET:K,generateString:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K.ALPHA_DIGIT,n="",r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&A(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:function(e){var t=new Array(10);return function e(n,r){if(T(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[r]=n;var o=O(n)?[]:{};return F(n,(function(t,n){var i=e(t,r+1);!E(i)&&(o[n]=i)})),t[r]=void 0,o}}return n}(e,0)},isAsyncFn:V,isThenable:function(e){return e&&(T(e)||A(e))&&A(e.then)&&A(e.catch)}};function X(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}G.inherits(X,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var $=X.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){Q[e]={value:e}})),Object.defineProperties(X,Q),Object.defineProperty($,"isAxiosError",{value:!0}),X.from=function(e,t,n,r,o,i){var a=Object.create($);return G.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),X.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function Z(e){return G.isPlainObject(e)||G.isArray(e)}function Y(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ee(e,t,n){return e?e.concat(t).map((function(e,t){return e=Y(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}var te=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ne(e,t,r){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var o=(r=G.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,i=r.visitor||f,a=r.dots,s=r.indexes,u=(r.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!u&&G.isBlob(e))throw new X("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?u&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function f(e,r,i){var u=e;if(e&&!i&&"object"===n(e))if(G.endsWith(r,"{}"))r=o?r:r.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Z)}(e)||(G.isFileList(e)||G.endsWith(r,"[]"))&&(u=G.toArray(e)))return r=Y(r),u.forEach((function(e,n){!G.isUndefined(e)&&null!==e&&t.append(!0===s?ee([r],n,a):null===s?r:r+"[]",c(e))})),!1;return!!Z(e)||(t.append(ee(i,r,a),c(e)),!1)}var l=[],d=Object.assign(te,{defaultVisitor:f,convertValue:c,isVisitable:Z});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),G.forEach(n,(function(n,o){!0===(!(G.isUndefined(n)||null===n)&&i.call(t,n,G.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),l.pop()}}(e),t}function re(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function oe(e,t){this._pairs=[],e&&ne(e,this,t)}var ie=oe.prototype;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function se(e,t,n){if(!t)return e;var r,o=n&&n.encode||ae,i=n&&n.serialize;if(r=i?i(t,n):G.isURLSearchParams(t)?t.toString():new oe(t,n).toString(o)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){var t=e?function(t){return e.call(this,t,re)}:re;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var ue,ce=function(){function e(){r(this,e),this.handlers=[]}return i(e,[{key:"use",value:function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},de="undefined"!=typeof window&&"undefined"!=typeof document,pe=(ue="undefined"!=typeof navigator&&navigator.product,de&&["ReactNative","NativeScript","NS"].indexOf(ue)<0),he="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me=t(t({},Object.freeze({__proto__:null,hasBrowserEnv:de,hasStandardBrowserWebWorkerEnv:he,hasStandardBrowserEnv:pe})),le);function ye(e){function t(e,n,r,o){var i=e[o++];if("__proto__"===i)return!0;var a=Number.isFinite(+i),s=o>=e.length;return i=!i&&G.isArray(r)?r.length:i,s?(G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a):(r[i]&&G.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)r[n=o[t]]=e[n];return r}(r[i])),!a)}if(G.isFormData(e)&&G.isFunction(e.entries)){var n={};return G.forEachEntry(e,(function(e,r){t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),r,n,0)})),n}return null}var ve={transitional:fe,adapter:["xhr","http"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=G.isObject(e);if(i&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return o&&o?JSON.stringify(ye(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ne(e,new me.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return me.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((n=G.isFileList(e))||r.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return ne(n?{"files[]":e}:e,a&&new a,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||ve.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&G.isString(e)&&(n&&!this.responseType||r)){var o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw X.from(e,X.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(function(e){ve.headers[e]={}}));var be=ve,ge=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),we=Symbol("internals");function Oe(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return!1===e||null==e?e:G.isArray(e)?e.map(Ee):String(e)}function Se(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}var Re=function(e,t){function n(e){r(this,n),e&&this.set(e)}return i(n,[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=Oe(t);if(!o)throw new Error("header name must be a non-empty string");var i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ee(e))}var i,a,s,u,c,f=function(e,t){return G.forEach(e,(function(e,n){return o(e,n,t)}))};return G.isPlainObject(e)||e instanceof this.constructor?f(e,t):G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?f((c={},(i=e)&&i.split("\n").forEach((function(e){u=e.indexOf(":"),a=e.substring(0,u).trim().toLowerCase(),s=e.substring(u+1).trim(),!a||c[a]&&ge[a]||("set-cookie"===a?c[a]?c[a].push(s):c[a]=[s]:c[a]=c[a]?c[a]+", "+s:s)})),c),t):null!=e&&o(t,e,n),this}},{key:"get",value:function(e,t){if(e=Oe(e)){var n=G.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(G.isFunction(t))return t.call(this,r,n);if(G.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Oe(e)){var n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!Se(0,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=Oe(e)){var o=G.findKey(n,e);!o||t&&!Se(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!Se(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n={};return G.forEach(this,(function(r,o){var i=G.findKey(n,o);if(i)return t[i]=Ee(r),void delete t[o];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n}))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Ee(r),n[a]=!0})),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=this.constructor).concat.apply(e,[this].concat(n))}},{key:"toJSON",value:function(e){var t=Object.create(null);return G.forEach(this,(function(n,r){null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map((function(e){var t=s(e,2);return t[0]+": "+t[1]})).join("\n")}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach((function(e){return t.set(e)})),t}},{key:"accessor",value:function(e){var t=(this[we]=this[we]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=Oe(e);t[r]||(!function(e,t){var n=G.toCamelCase(" "+t);["get","set","has"].forEach((function(r){Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}]),n}();Re.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Re.prototype,(function(e,t){var n=e.value,r=t[0].toUpperCase()+t.slice(1);return{get:function(){return n},set:function(e){this[r]=e}}})),G.freezeMethods(Re);var Ae=Re;function je(e,t){var n=this||be,r=t||n,o=Ae.from(r.headers),i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Te(e){return!(!e||!e.__CANCEL__)}function Pe(e,t,n){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Pe,X,{__CANCEL__:!0});var Ne=me.hasStandardBrowserEnv?{write:function(e,t,n,r,o,i){var a=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),G.isString(r)&&a.push("path="+r),G.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function xe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var Ce=me.hasStandardBrowserEnv?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=G.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0};function ke(e,t){var n=0,r=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),c=o[a];n||(n=u),r[i]=s,o[i]=u;for(var f=a,l=0;f!==i;)l+=r[f++],f%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(u-n<t)){var d=c&&u-c;return d?Math.round(1e3*l/d):void 0}}}(50,250);return function(o){var i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-n,u=r(s);n=i;var c={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&i<=a?(a-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}var _e={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){var r,o,i,a=e.data,s=Ae.from(e.headers).normalize(),d=e.responseType,h=e.withXSRFToken;function m(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}if(G.isFormData(a))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if(!1!==(o=s.getContentType())){var y=o?o.split(";").map((function(e){return e.trim()})).filter(Boolean):[],v=c(i=y)||f(i)||l(i)||p(),b=v[0],g=v.slice(1);s.setContentType([b||"multipart/form-data"].concat(u(g)).join("; "))}var w=new XMLHttpRequest;if(e.auth){var O=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(O+":"+E))}var S=xe(e.baseURL,e.url);function R(){if(w){var r=Ae.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());!function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),m()}),(function(e){n(e),m()}),{data:d&&"text"!==d&&"json"!==d?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:r,config:e,request:w}),w=null}}if(w.open(e.method.toUpperCase(),se(S,e.params,e.paramsSerializer),!0),w.timeout=e.timeout,"onloadend"in w?w.onloadend=R:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&0===w.responseURL.indexOf("file:"))&&setTimeout(R)},w.onabort=function(){w&&(n(new X("Request aborted",X.ECONNABORTED,e,w)),w=null)},w.onerror=function(){n(new X("Network Error",X.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||fe;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new X(t,r.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,w)),w=null},me.hasStandardBrowserEnv&&(h&&G.isFunction(h)&&(h=h(e)),h||!1!==h&&Ce(S))){var A=e.xsrfHeaderName&&e.xsrfCookieName&&Ne.read(e.xsrfCookieName);A&&s.set(e.xsrfHeaderName,A)}void 0===a&&s.setContentType(null),"setRequestHeader"in w&&G.forEach(s.toJSON(),(function(e,t){w.setRequestHeader(t,e)})),G.isUndefined(e.withCredentials)||(w.withCredentials=!!e.withCredentials),d&&"json"!==d&&(w.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&w.addEventListener("progress",ke(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&w.upload&&w.upload.addEventListener("progress",ke(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=function(t){w&&(n(!t||t.type?new Pe(null,e,w):t),w.abort(),w=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));var j,T=(j=/^([-+\w]{1,25})(:?\/\/|:)/.exec(S))&&j[1]||"";T&&-1===me.protocols.indexOf(T)?n(new X("Unsupported protocol "+T+":",X.ERR_BAD_REQUEST,e)):w.send(a||null)}))}};G.forEach(_e,(function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Fe=function(e){return"- ".concat(e)},Ue=function(e){return G.isFunction(e)||null===e||!1===e},De=function(e){for(var t,n,r=(e=G.isArray(e)?e:[e]).length,o={},i=0;i<r;i++){var a=void 0;if(n=t=e[i],!Ue(t)&&void 0===(n=_e[(a=String(t)).toLowerCase()]))throw new X("Unknown adapter '".concat(a,"'"));if(n)break;o[a||"#"+i]=n}if(!n){var u=Object.entries(o).map((function(e){var t=s(e,2),n=t[0],r=t[1];return"adapter ".concat(n," ")+(!1===r?"is not supported by the environment":"is not available in the build")}));throw new X("There is no suitable adapter to dispatch the request "+(r?u.length>1?"since :\n"+u.map(Fe).join("\n"):" "+Fe(u[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Be(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pe(null,e)}function Le(e){return Be(e),e.headers=Ae.from(e.headers),e.data=je.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),De(e.adapter||be.adapter)(e).then((function(t){return Be(e),t.data=je.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t}),(function(t){return Te(t)||(Be(e),t&&t.response&&(t.response.data=je.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)}))}var Ie=function(e){return e instanceof Ae?e.toJSON():e};function qe(e,t){t=t||{};var n={};function r(e,t,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function a(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}var u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t){return o(Ie(e),Ie(t),!0)}};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){var i=u[r]||o,a=i(e[r],t[r],r);G.isUndefined(a)&&i!==s||(n[r]=a)})),n}var ze="1.6.5",Me={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Me[e]=function(r){return n(r)===e||"a"+(t<1?"n ":" ")+e}}));var He={};Me.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new X(r(o," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!He[o]&&(He[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};var Je={assertOptions:function(e,t,r){if("object"!==n(e))throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(e),i=o.length;i-- >0;){var a=o[i],s=t[a];if(s){var u=e[a],c=void 0===u||s(u,a,e);if(!0!==c)throw new X("option "+a+" must be "+c,X.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new X("Unknown option "+a,X.ERR_BAD_OPTION)}},validators:Me},We=Je.validators,Ke=function(){function e(t){r(this,e),this.defaults=t,this.interceptors={request:new ce,response:new ce}}return i(e,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var n=t=qe(this.defaults,t),r=n.transitional,o=n.paramsSerializer,i=n.headers;void 0!==r&&Je.assertOptions(r,{silentJSONParsing:We.transitional(We.boolean),forcedJSONParsing:We.transitional(We.boolean),clarifyTimeoutError:We.transitional(We.boolean)},!1),null!=o&&(G.isFunction(o)?t.paramsSerializer={serialize:o}:Je.assertOptions(o,{encode:We.function,serialize:We.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=i&&G.merge(i.common,i[t.method]);i&&G.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete i[e]})),t.headers=Ae.concat(a,i);var s=[],u=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var c,f=[];this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)}));var l,d=0;if(!u){var p=[Le.bind(this),void 0];for(p.unshift.apply(p,s),p.push.apply(p,f),l=p.length,c=Promise.resolve(t);d<l;)c=c.then(p[d++],p[d++]);return c}l=s.length;var h=t;for(d=0;d<l;){var m=s[d++],y=s[d++];try{h=m(h)}catch(e){y.call(this,e);break}}try{c=Le.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,l=f.length;d<l;)c=c.then(f[d++],f[d++]);return c}},{key:"getUri",value:function(e){return se(xe((e=qe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}]),e}();G.forEach(["delete","get","head","options"],(function(e){Ke.prototype[e]=function(t,n){return this.request(qe(n||{},{method:e,url:t,data:(n||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(qe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ke.prototype[e]=t(),Ke.prototype[e+"Form"]=t(!0)}));var Ve=Ke,Ge=function(){function e(t){if(r(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var o=this;this.promise.then((function(e){if(o._listeners){for(var t=o._listeners.length;t-- >0;)o._listeners[t](e);o._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){o.subscribe(e),t=e})).then(e);return n.cancel=function(){o.unsubscribe(t)},n},t((function(e,t,r){o.reason||(o.reason=new Pe(e,t,r),n(o.reason))}))}return i(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}();var Xe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xe).forEach((function(e){var t=s(e,2),n=t[0],r=t[1];Xe[r]=n}));var $e=Xe;var Qe=function e(t){var n=new Ve(t),r=h(Ve.prototype.request,n);return G.extend(r,Ve.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(qe(t,n))},r}(be);return Qe.Axios=Ve,Qe.CanceledError=Pe,Qe.CancelToken=Ge,Qe.isCancel=Te,Qe.VERSION=ze,Qe.toFormData=ne,Qe.AxiosError=X,Qe.Cancel=Qe.CanceledError,Qe.all=function(e){return Promise.all(e)},Qe.spread=function(e){return function(t){return e.apply(null,t)}},Qe.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},Qe.mergeConfig=qe,Qe.AxiosHeaders=Ae,Qe.formToJSON=function(e){return ye(G.isHTMLForm(e)?new FormData(e):e)},Qe.getAdapter=De,Qe.HttpStatusCode=$e,Qe.default=Qe,Qe})); //# sourceMappingURL=axios.min.js.map diff --git a/node_modules/axios/dist/axios.min.js.map b/node_modules/axios/dist/axios.min.js.map index d642d99c..245f801b 100644 --- a/node_modules/axios/dist/axios.min.js.map +++ b/node_modules/axios/dist/axios.min.js.map @@ -1 +1 @@ -{"version":3,"file":"axios.min.js","sources":["../lib/helpers/bind.js","../lib/utils.js","../lib/core/AxiosError.js","../lib/helpers/toFormData.js","../lib/helpers/AxiosURLSearchParams.js","../lib/helpers/buildURL.js","../lib/core/InterceptorManager.js","../lib/platform/common/utils.js","../lib/defaults/transitional.js","../lib/platform/browser/index.js","../lib/platform/browser/classes/URLSearchParams.js","../lib/platform/browser/classes/FormData.js","../lib/platform/browser/classes/Blob.js","../lib/platform/index.js","../lib/helpers/formDataToJSON.js","../lib/defaults/index.js","../lib/helpers/toURLEncodedForm.js","../lib/helpers/parseHeaders.js","../lib/core/AxiosHeaders.js","../lib/core/transformData.js","../lib/cancel/isCancel.js","../lib/cancel/CanceledError.js","../lib/helpers/cookies.js","../lib/core/buildFullPath.js","../lib/helpers/isAbsoluteURL.js","../lib/helpers/combineURLs.js","../lib/helpers/isURLSameOrigin.js","../lib/adapters/xhr.js","../lib/helpers/speedometer.js","../lib/adapters/adapters.js","../lib/helpers/null.js","../lib/core/settle.js","../lib/helpers/parseProtocol.js","../lib/core/dispatchRequest.js","../lib/core/mergeConfig.js","../lib/env/data.js","../lib/helpers/validator.js","../lib/core/Axios.js","../lib/cancel/CancelToken.js","../lib/helpers/HttpStatusCode.js","../lib/axios.js","../lib/helpers/spread.js","../lib/helpers/isAxiosError.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.3\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n"],"names":["bind","fn","thisArg","apply","arguments","cache","toString","Object","prototype","getPrototypeOf","kindOf","create","thing","str","call","slice","toLowerCase","kindOfTest","type","typeOfTest","_typeof","isArray","Array","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","Symbol","toStringTag","iterator","isDate","isFile","isBlob","isFileList","isURLSearchParams","forEach","obj","i","l","_ref","length","undefined","_ref$allOwnKeys","allOwnKeys","key","keys","getOwnPropertyNames","len","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","TypedArray","isTypedArray","Uint8Array","isHTMLForm","hasOwnProperty","_ref4","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","toUpperCase","isAsyncFn","utils$1","isBuffer","constructor","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","this","caseless","result","assignValue","targetKey","extend","a","b","_ref3","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","String","lastIndex","indexOf","toArray","arr","forEachEntry","next","done","pair","matchAll","regExp","matches","exec","push","hasOwnProp","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","toCamelCase","m","p1","p2","noop","toFiniteNumber","defaultValue","Number","isFinite","generateString","size","alphabet","Math","random","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isThenable","then","AxiosError","message","code","config","request","response","captureStackTrace","utils","toJSON","description","number","fileName","lineNumber","columnNumber","status","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","map","token","join","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","JSON","stringify","some","isFlatArray","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","buildURL","url","serializedParams","_encode","serializeFn","serialize","hashmarkIndex","encoder","product","InterceptorManager$1","InterceptorManager","_classCallCheck","handlers","_createClass","fulfilled","rejected","synchronous","runWhen","id","h","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","document","hasStandardBrowserEnv","navigator","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","adapter","transformRequest","data","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","e","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","Accept","method","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","_Symbol$iterator","_Symbol$toStringTag","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","rawHeaders","parsed","setHeaders","line","substring","tokens","tokensRE","parseTokens","matcher","deleted","deleteHeader","format","normalized","w","char","formatHeader","_this$constructor","_len","targets","asStrings","_ref2","_slicedToArray","get","first","computed","_len2","_key2","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","configurable","buildAccessors","accessor","mapped","headerValue","AxiosHeaders$1","transformData","fns","normalize","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","write","expires","domain","secure","cookie","Date","toGMTString","read","RegExp","decodeURIComponent","remove","now","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","originURL","msie","userAgent","urlParsingNode","createElement","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","firstSampleTS","bytes","timestamps","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","Promise","resolve","reject","onCanceled","requestData","requestHeaders","withXSRFToken","cancelToken","unsubscribe","signal","removeEventListener","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","floor","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","setTimeout","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","isURLSameOrigin","xsrfValue","cookies","setRequestHeader","withCredentials","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","configValue","VERSION","validators","deprecatedWarnings","validators$1","validator","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","configOrUrl","_config","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","promise","responseInterceptorChain","chain","newConfig","onFulfilled","onRejected","generateHTTPMethod","isForm","Axios$1","CancelToken$1","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","c","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","instance","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter"],"mappings":"6yFAEe,SAASA,EAAKC,EAAIC,GAC/B,OAAO,WACL,OAAOD,EAAGE,MAAMD,EAASE,WAE7B,CCAA,IAGgBC,EAHTC,EAAYC,OAAOC,UAAnBF,SACAG,EAAkBF,OAAlBE,eAEDC,GAAUL,EAGbE,OAAOI,OAAO,MAHQ,SAAAC,GACrB,IAAMC,EAAMP,EAASQ,KAAKF,GAC1B,OAAOP,EAAMQ,KAASR,EAAMQ,GAAOA,EAAIE,MAAM,GAAI,GAAGC,iBAGlDC,EAAa,SAACC,GAElB,OADAA,EAAOA,EAAKF,cACL,SAAC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YAC7C,EF8DAT,GAAMjI,YAAcA,GAEpBiI,GAAM7T,aAAeA,GAErB6T,GAAMW,WAAa,SAAAjoB,GAAK,OAAIsQ,GAAe3F,EAAMvH,WAAWpD,GAAS,IAAI6E,SAAS7E,GAASA,EAAM,EAEjGsnB,GAAMY,WAAatJ,GAEnB0I,GAAMjE,eAAiBA,GAEvBiE,GAAK,QAAWA"} \ No newline at end of file +{"version":3,"file":"axios.min.js","sources":["../lib/helpers/bind.js","../lib/utils.js","../lib/core/AxiosError.js","../lib/helpers/toFormData.js","../lib/helpers/AxiosURLSearchParams.js","../lib/helpers/buildURL.js","../lib/core/InterceptorManager.js","../lib/platform/common/utils.js","../lib/defaults/transitional.js","../lib/platform/browser/index.js","../lib/platform/browser/classes/URLSearchParams.js","../lib/platform/browser/classes/FormData.js","../lib/platform/browser/classes/Blob.js","../lib/platform/index.js","../lib/helpers/formDataToJSON.js","../lib/defaults/index.js","../lib/helpers/toURLEncodedForm.js","../lib/helpers/parseHeaders.js","../lib/core/AxiosHeaders.js","../lib/core/transformData.js","../lib/cancel/isCancel.js","../lib/cancel/CanceledError.js","../lib/helpers/cookies.js","../lib/core/buildFullPath.js","../lib/helpers/isAbsoluteURL.js","../lib/helpers/combineURLs.js","../lib/helpers/isURLSameOrigin.js","../lib/adapters/xhr.js","../lib/helpers/speedometer.js","../lib/adapters/adapters.js","../lib/helpers/null.js","../lib/core/settle.js","../lib/helpers/parseProtocol.js","../lib/core/dispatchRequest.js","../lib/core/mergeConfig.js","../lib/env/data.js","../lib/helpers/validator.js","../lib/core/Axios.js","../lib/cancel/CancelToken.js","../lib/helpers/HttpStatusCode.js","../lib/axios.js","../lib/helpers/spread.js","../lib/helpers/isAxiosError.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.5\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n"],"names":["bind","fn","thisArg","apply","arguments","cache","toString","Object","prototype","getPrototypeOf","kindOf","create","thing","str","call","slice","toLowerCase","kindOfTest","type","typeOfTest","_typeof","isArray","Array","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","Symbol","toStringTag","iterator","isDate","isFile","isBlob","isFileList","isURLSearchParams","forEach","obj","i","l","_ref","length","undefined","_ref$allOwnKeys","allOwnKeys","key","keys","getOwnPropertyNames","len","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","TypedArray","isTypedArray","Uint8Array","isHTMLForm","hasOwnProperty","_ref4","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","toUpperCase","isAsyncFn","utils$1","isBuffer","constructor","isFormData","kind","FormData","append","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","this","caseless","result","assignValue","targetKey","extend","a","b","_ref3","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","String","lastIndex","indexOf","toArray","arr","forEachEntry","next","done","pair","matchAll","regExp","matches","exec","push","hasOwnProp","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","toCamelCase","m","p1","p2","noop","toFiniteNumber","defaultValue","Number","isFinite","generateString","size","alphabet","Math","random","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isThenable","then","AxiosError","message","code","config","request","response","captureStackTrace","utils","toJSON","description","number","fileName","lineNumber","columnNumber","status","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","map","token","join","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","JSON","stringify","some","isFlatArray","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","buildURL","url","serializedParams","_encode","serializeFn","serialize","hashmarkIndex","encoder","product","InterceptorManager$1","InterceptorManager","_classCallCheck","handlers","_createClass","fulfilled","rejected","synchronous","runWhen","id","h","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","document","hasStandardBrowserEnv","navigator","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","adapter","transformRequest","data","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","e","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","Accept","method","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","_Symbol$iterator","_Symbol$toStringTag","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","rawHeaders","parsed","setHeaders","line","substring","tokens","tokensRE","parseTokens","matcher","deleted","deleteHeader","format","normalized","w","char","formatHeader","_this$constructor","_len","targets","asStrings","_ref2","_slicedToArray","get","first","computed","_len2","_key2","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","configurable","buildAccessors","accessor","mapped","headerValue","AxiosHeaders$1","transformData","fns","normalize","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","write","expires","domain","secure","cookie","Date","toGMTString","read","RegExp","decodeURIComponent","remove","now","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","originURL","msie","userAgent","urlParsingNode","createElement","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","firstSampleTS","bytes","timestamps","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","Promise","resolve","reject","onCanceled","requestData","requestHeaders","withXSRFToken","cancelToken","unsubscribe","signal","removeEventListener","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","floor","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","setTimeout","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","isURLSameOrigin","xsrfValue","cookies","setRequestHeader","withCredentials","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","configValue","VERSION","validators","deprecatedWarnings","validators$1","validator","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","configOrUrl","_config","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","promise","responseInterceptorChain","chain","newConfig","onFulfilled","onRejected","generateHTTPMethod","isForm","Axios$1","CancelToken$1","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","c","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","instance","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter"],"mappings":"6yFAEe,SAASA,EAAKC,EAAIC,GAC/B,OAAO,WACL,OAAOD,EAAGE,MAAMD,EAASE,WAE7B,CCAA,IAGgBC,EAHTC,EAAYC,OAAOC,UAAnBF,SACAG,EAAkBF,OAAlBE,eAEDC,GAAUL,EAGbE,OAAOI,OAAO,MAHQ,SAAAC,GACrB,IAAMC,EAAMP,EAASQ,KAAKF,GAC1B,OAAOP,EAAMQ,KAASR,EAAMQ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B,GACnB,OAAOsgB,EAASvoB,MAAM,KAAMiI,GAEhC,ED6CA8f,GAAMS,aE7DS,SAAsBC,GACnC,OAAOrd,EAAM3J,SAASgnB,KAAsC,IAAzBA,EAAQD,YAC7C,EF8DAT,GAAMjI,YAAcA,GAEpBiI,GAAM7T,aAAeA,GAErB6T,GAAMW,WAAa,SAAAjoB,GAAK,OAAIsQ,GAAe3F,EAAMvH,WAAWpD,GAAS,IAAI6E,SAAS7E,GAASA,EAAM,EAEjGsnB,GAAMY,WAAatJ,GAEnB0I,GAAMjE,eAAiBA,GAEvBiE,GAAK,QAAWA"} \ No newline at end of file diff --git a/node_modules/axios/dist/browser/axios.cjs b/node_modules/axios/dist/browser/axios.cjs index e59dadac..d06a4724 100644 --- a/node_modules/axios/dist/browser/axios.cjs +++ b/node_modules/axios/dist/browser/axios.cjs @@ -1,4 +1,4 @@ -// Axios v1.6.3 Copyright (c) 2023 Matt Zabriskie and contributors +// Axios v1.6.5 Copyright (c) 2024 Matt Zabriskie and contributors 'use strict'; function bind(fn, thisArg) { @@ -1352,6 +1352,9 @@ function arrayToObject(arr) { function formDataToJSON(formData) { function buildPath(path, value, target, index) { let name = path[index++]; + + if (name === '__proto__') return true; + const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils$1.isArray(target) ? target.length : name; @@ -2655,7 +2658,7 @@ function mergeConfig(config1, config2) { return config; } -const VERSION = "1.6.3"; +const VERSION = "1.6.5"; const validators$1 = {}; diff --git a/node_modules/axios/dist/browser/axios.cjs.map b/node_modules/axios/dist/browser/axios.cjs.map index 19231428..2d7f2463 100644 --- a/node_modules/axios/dist/browser/axios.cjs.map +++ b/node_modules/axios/dist/browser/axios.cjs.map @@ -1 +1 @@ -{"version":3,"file":"axios.cjs","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/null.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/browser/index.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/cookies.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/buildFullPath.js","../../lib/helpers/isURLSameOrigin.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/speedometer.js","../../lib/adapters/xhr.js","../../lib/adapters/adapters.js","../../lib/core/dispatchRequest.js","../../lib/core/mergeConfig.js","../../lib/env/data.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.3\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n"],"names":["utils","prototype","encode","URLSearchParams","FormData","Blob","platform","defaults","AxiosHeaders","validators","InterceptorManager","Axios","CancelToken","HttpStatusCode"],"mappings":";;;AAEe,SAAS,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE;AAC1C,EAAE,OAAO,SAAS,IAAI,GAAG;AACzB,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACxC,GAAG,CAAC;AACJ;;ACFA;AACA;AACA,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC;AAChC;AACA,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,KAAK,IAAI;AAClC,IAAI,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrC,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACvE,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB;AACA,MAAM,UAAU,GAAG,CAAC,IAAI,KAAK;AAC7B,EAAE,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,EAAE,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI;AAC1C,EAAC;AACD;AACA,MAAM,UAAU,GAAG,IAAI,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,IAAI,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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;AACA,KAAK,CAAC,KAAK,GAAGI,OAAK,CAAC;AACpB;AACA;AACA,KAAK,CAAC,aAAa,GAAG,aAAa,CAAC;AACpC,KAAK,CAAC,WAAW,GAAGC,aAAW,CAAC;AAChC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC1B,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AACxB,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;AAC9B;AACA;AACA,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;AAC9B;AACA;AACA,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;AACnC;AACA;AACA,KAAK,CAAC,GAAG,GAAG,SAAS,GAAG,CAAC,QAAQ,EAAE;AACnC,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACA,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AACtB;AACA;AACA,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;AAClC;AACA;AACA,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;AAChC;AACA,KAAK,CAAC,YAAY,GAAGJ,cAAY,CAAC;AAClC;AACA,KAAK,CAAC,UAAU,GAAG,KAAK,IAAI,cAAc,CAACR,OAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAClG;AACA,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AACvC;AACA,KAAK,CAAC,cAAc,GAAGa,gBAAc,CAAC;AACtC;AACA,KAAK,CAAC,OAAO,GAAG,KAAK;;;;"} \ No newline at end of file +{"version":3,"file":"axios.cjs","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/null.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/browser/index.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/cookies.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/buildFullPath.js","../../lib/helpers/isURLSameOrigin.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/speedometer.js","../../lib/adapters/xhr.js","../../lib/adapters/adapters.js","../../lib/core/dispatchRequest.js","../../lib/core/mergeConfig.js","../../lib/env/data.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.5\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n"],"names":["utils","prototype","encode","URLSearchParams","FormData","Blob","platform","defaults","AxiosHeaders","validators","InterceptorManager","Axios","CancelToken","HttpStatusCode"],"mappings":";;;AAEe,SAAS,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE;AAC1C,EAAE,OAAO,SAAS,IAAI,GAAG;AACzB,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACxC,GAAG,CAAC;AACJ;;ACFA;AACA;AACA,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC;AAChC;AACA,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,KAAK,IAAI;AAClC,IAAI,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrC,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACvE,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB;AACA,MAAM,UAAU,GAAG,CAAC,IAAI,KAAK;AAC7B,EAAE,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,EAAE,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI;AAC1C,EAAC;AACD;AACA,MAAM,UAAU,GAAG,IAAI,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,IAAI,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;AACxB;AACA;AACA;AACA;AACA;AACA;AAC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C;AAClB,CAAC;AACD;AACA;AACK,MAAC,KAAK,GAAG,cAAc,CAACO,UAAQ,EAAE;AACvC;AACA;AACA,KAAK,CAAC,KAAK,GAAGI,OAAK,CAAC;AACpB;AACA;AACA,KAAK,CAAC,aAAa,GAAG,aAAa,CAAC;AACpC,KAAK,CAAC,WAAW,GAAGC,aAAW,CAAC;AAChC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC1B,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AACxB,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;AAC9B;AACA;AACA,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;AAC9B;AACA;AACA,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;AACnC;AACA;AACA,KAAK,CAAC,GAAG,GAAG,SAAS,GAAG,CAAC,QAAQ,EAAE;AACnC,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACA,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AACtB;AACA;AACA,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;AAClC;AACA;AACA,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;AAChC;AACA,KAAK,CAAC,YAAY,GAAGJ,cAAY,CAAC;AAClC;AACA,KAAK,CAAC,UAAU,GAAG,KAAK,IAAI,cAAc,CAACR,OAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAClG;AACA,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AACvC;AACA,KAAK,CAAC,cAAc,GAAGa,gBAAc,CAAC;AACtC;AACA,KAAK,CAAC,OAAO,GAAG,KAAK;;;;"} \ No newline at end of file diff --git a/node_modules/axios/dist/esm/axios.js b/node_modules/axios/dist/esm/axios.js index 334ed51e..13b7c620 100644 --- a/node_modules/axios/dist/esm/axios.js +++ b/node_modules/axios/dist/esm/axios.js @@ -1,4 +1,4 @@ -// Axios v1.6.3 Copyright (c) 2023 Matt Zabriskie and contributors +// Axios v1.6.5 Copyright (c) 2024 Matt Zabriskie and contributors function bind(fn, thisArg) { return function wrap() { return fn.apply(thisArg, arguments); @@ -1350,6 +1350,9 @@ function arrayToObject(arr) { function formDataToJSON(formData) { function buildPath(path, value, target, index) { let name = path[index++]; + + if (name === '__proto__') return true; + const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils$1.isArray(target) ? target.length : name; @@ -2653,7 +2656,7 @@ function mergeConfig$1(config1, config2) { return config; } -const VERSION$1 = "1.6.3"; +const VERSION$1 = "1.6.5"; const validators$1 = {}; diff --git a/node_modules/axios/dist/esm/axios.js.map b/node_modules/axios/dist/esm/axios.js.map index 57cf01b4..4bbfc1f8 100644 --- a/node_modules/axios/dist/esm/axios.js.map +++ b/node_modules/axios/dist/esm/axios.js.map @@ -1 +1 @@ -{"version":3,"file":"axios.js","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/null.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/browser/index.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/cookies.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/buildFullPath.js","../../lib/helpers/isURLSameOrigin.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/speedometer.js","../../lib/adapters/xhr.js","../../lib/adapters/adapters.js","../../lib/core/dispatchRequest.js","../../lib/core/mergeConfig.js","../../lib/env/data.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js","../../index.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.3\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n"],"names":["AxiosError","utils","prototype","toFormData","encode","URLSearchParams","FormData","Blob","platform","AxiosHeaders","defaults","isCancel","CanceledError","mergeConfig","VERSION","validators","Axios","InterceptorManager","CancelToken","spread","isAxiosError","HttpStatusCode","axios"],"mappings":";AAEe,SAAS,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE;AAC1C,EAAE,OAAO,SAAS,IAAI,GAAG;AACzB,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACxC,GAAG,CAAC;AACJ;;ACFA;AACA;AACA,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC;AAChC;AACA,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,KAAK,IAAI;AAClC,IAAI,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrC,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACvE,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB;AACA,MAAM,UAAU,GAAG,CAAC,IAAI,KAAK;AAC7B,EAAE,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAC5B,EAAE,OAAO,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI;AAC1C,EAAC;AACD;AACA,MAAM,UAAU,GAAG,IAAI,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,IAAI,CAAC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;AACxB;AACA;AACA;AACA;AACA;AACA;A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;AACP,EAAE,UAAU;AACZ,EAAE,aAAa;AACf,EAAE,QAAQ;AACV,EAAE,WAAW;AACb,EAAE,OAAO;AACT,EAAE,GAAG;AACL,EAAE,MAAM;AACR,EAAE,YAAY;AACd,EAAE,MAAM;AACR,EAAE,UAAU;AACZ,EAAE,YAAY;AACd,EAAE,cAAc;AAChB,EAAE,UAAU;AACZ,EAAE,UAAU;AACZ,EAAE,WAAW;AACb,CAAC,GAAGC;;;;"} \ No newline at end of file +{"version":3,"file":"axios.js","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/null.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/browser/index.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/cookies.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/buildFullPath.js","../../lib/helpers/isURLSameOrigin.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/speedometer.js","../../lib/adapters/xhr.js","../../lib/adapters/adapters.js","../../lib/core/dispatchRequest.js","../../lib/core/mergeConfig.js","../../lib/env/data.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js","../../index.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.5\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n"],"names":["AxiosError","utils","prototype","toFormData","encode","URLSearchParams","FormData","Blob","platform","AxiosHeaders","defaults","isCancel","CanceledError","mergeConfig","VERSION","validators","Axios","InterceptorManager","CancelToken","spread","isAxiosError","HttpStatusCode","axios"],"mappings":";AAEe,SAAS,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE;AAC1C,EAAE,OAAO,SAAS,IAAI,GAAG;AACzB,IAAI,OAAO,EAAE,CAA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U;AACZ,EAAE,UAAU;AACZ,EAAE,WAAW;AACb,CAAC,GAAGC;;;;"} \ No newline at end of file diff --git a/node_modules/axios/dist/esm/axios.min.js b/node_modules/axios/dist/esm/axios.min.js index 98e352ba..58025433 100644 --- a/node_modules/axios/dist/esm/axios.min.js +++ b/node_modules/axios/dist/esm/axios.min.js @@ -1,2 +1,2 @@ -function e(e,t){return function(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:n}=Object,r=(o=Object.create(null),e=>{const n=t.call(e);return o[n]||(o[n]=n.slice(8,-1).toLowerCase())});var o;const s=e=>(e=e.toLowerCase(),t=>r(t)===e),i=e=>t=>typeof t===e,{isArray:a}=Array,c=i("undefined");const u=s("ArrayBuffer");const l=i("string"),f=i("function"),d=i("number"),p=e=>null!==e&&"object"==typeof e,h=e=>{if("object"!==r(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},m=s("Date"),y=s("File"),g=s("Blob"),b=s("FileList"),E=s("URLSearchParams");function w(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),a(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function O(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,R=e=>!c(e)&&e!==S;const A=(T="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>T&&e instanceof T);var T;const j=s("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),N=s("RegExp"),v=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};w(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},x="abcdefghijklmnopqrstuvwxyz",P={DIGIT:"0123456789",ALPHA:x,ALPHA_DIGIT:x+x.toUpperCase()+"0123456789"};const _=s("AsyncFunction"),F={isArray:a,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=r(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:p,isPlainObject:h,isUndefined:c,isDate:m,isFile:y,isBlob:g,isRegExp:N,isFunction:f,isStream:e=>p(e)&&f(e.pipe),isURLSearchParams:E,isTypedArray:A,isFileList:b,forEach:w,merge:function e(){const{caseless:t}=R(this)&&this||{},n={},r=(r,o)=>{const s=t&&O(n,o)||o;h(n[s])&&h(r)?n[s]=e(n[s],r):h(r)?n[s]=e({},r):a(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&w(arguments[e],r);return n},extend:(t,n,r,{allOwnKeys:o}={})=>(w(n,((n,o)=>{r&&f(n)?t[o]=e(n,r):t[o]=n}),{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:r,kindOfTest:s,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(a(e))return e;let t=e.length;if(!d(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:v,freezeMethods:e=>{v(e,((t,n)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];f(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return a(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:O,global:S,isContextDefined:R,ALPHABET:P,generateString:(e=16,t=P.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(p(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=a(e)?[]:{};return w(e,((e,t)=>{const s=n(e,r+1);!c(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:_,isThenable:e=>e&&(p(e)||f(e))&&f(e.then)&&f(e.catch)};function U(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}F.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const B=U.prototype,D={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{D[e]={value:e}})),Object.defineProperties(U,D),Object.defineProperty(B,"isAxiosError",{value:!0}),U.from=(e,t,n,r,o,s)=>{const i=Object.create(B);return F.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),U.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function L(e){return F.isPlainObject(e)||F.isArray(e)}function k(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function q(e,t,n){return e?e.concat(t).map((function(e,t){return e=k(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const I=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)}));function z(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!a&&F.isBlob(e))throw new U("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(F.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(L)}(e)||(F.isFileList(e)||F.endsWith(n,"[]"))&&(a=F.toArray(e)))return n=k(n),a.forEach((function(e,r){!F.isUndefined(e)&&null!==e&&t.append(!0===i?q([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!L(e)||(t.append(q(o,n,s),c(e)),!1)}const l=[],f=Object.assign(I,{defaultVisitor:u,convertValue:c,isVisitable:L});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!F.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),F.forEach(n,(function(n,s){!0===(!(F.isUndefined(n)||null===n)&&o.call(t,n,F.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t}function M(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function H(e,t){this._pairs=[],e&&z(e,this,t)}const J=H.prototype;function V(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function W(e,t,n){if(!t)return e;const r=n&&n.encode||V,o=n&&n.serialize;let s;if(s=o?o(t,n):F.isURLSearchParams(t)?t.toString():new H(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}J.append=function(e,t){this._pairs.push([e,t])},J.toString=function(e){const t=e?function(t){return e.call(this,t,M)}:M;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const K=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},G={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:H,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},X="undefined"!=typeof window&&"undefined"!=typeof document,Q=(Z="undefined"!=typeof navigator&&navigator.product,X&&["ReactNative","NativeScript","NS"].indexOf(Z)<0);var Z;const Y="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ee={...Object.freeze({__proto__:null,hasBrowserEnv:X,hasStandardBrowserWebWorkerEnv:Y,hasStandardBrowserEnv:Q}),...$};function te(e){function t(e,n,r,o){let s=e[o++];const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&F.isArray(r)?r.length:s,a)return F.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&F.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&F.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(F.isFormData(e)&&F.isFunction(e.entries)){const n={};return F.forEachEntry(e,((e,r)=>{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const ne={transitional:G,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=F.isObject(e);o&&F.isHTMLForm(e)&&(e=new FormData(e));if(F.isFormData(e))return r&&r?JSON.stringify(te(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return z(e,new ee.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ee.isNode&&F.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=F.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return z(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ne.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&F.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw U.from(e,U.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ee.classes.FormData,Blob:ee.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(e=>{ne.headers[e]={}}));const re=ne,oe=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),se=Symbol("internals");function ie(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:F.isArray(e)?e.map(ae):String(e)}function ce(e,t,n,r,o){return F.isFunction(r)?r.call(this,t,n):(o&&(t=n),F.isString(t)?F.isString(r)?-1!==t.indexOf(r):F.isRegExp(r)?r.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ie(t);if(!o)throw new Error("header name must be a non-empty string");const s=F.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ae(e))}const s=(e,t)=>F.forEach(e,((e,n)=>o(e,n,t)));return F.isPlainObject(e)||e instanceof this.constructor?s(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&oe[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ie(e)){const n=F.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(F.isFunction(t))return t.call(this,e,n);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ie(e)){const n=F.findKey(this,e);return!(!n||void 0===this[n]||t&&!ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ie(e)){const o=F.findKey(n,e);!o||t&&!ce(0,n[o],o,t)||(delete n[o],r=!0)}}return F.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return F.forEach(this,((r,o)=>{const s=F.findKey(n,o);if(s)return t[s]=ae(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ae(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&F.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[se]=this[se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ie(e);t[r]||(!function(e,t){const n=F.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return F.isArray(e)?e.forEach(r):r(e),this}}ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(ue.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),F.freezeMethods(ue);const le=ue;function fe(e,t){const n=this||re,r=t||n,o=le.from(r.headers);let s=r.data;return F.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function de(e){return!(!e||!e.__CANCEL__)}function pe(e,t,n){U.call(this,null==e?"canceled":e,U.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(pe,U,{__CANCEL__:!0});const he=ee.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];F.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),F.isString(r)&&i.push("path="+r),F.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function me(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ye=ee.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=F.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function ge(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-n,c=r(a);n=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const be={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=le.from(e.headers).normalize();let s,i,{responseType:a,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(F.isFormData(r))if(ee.hasStandardBrowserEnv||ee.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const f=me(e.baseURL,e.url);function d(){if(!l)return;const r=le.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),W(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new U("Request aborted",U.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new U("Network Error",U.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||G;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new U(t,r.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,l)),l=null},ee.hasStandardBrowserEnv&&(c&&F.isFunction(c)&&(c=c(e)),c||!1!==c&&ye(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&he.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&F.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",ge(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",ge(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(n(!t||t.type?new pe(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);p&&-1===ee.protocols.indexOf(p)?n(new U("Unsupported protocol "+p+":",U.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};F.forEach(be,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ee=e=>`- ${e}`,we=e=>F.isFunction(e)||null===e||!1===e,Oe=e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!we(n)&&(r=be[(t=String(n)).toLowerCase()],void 0===r))throw new U(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new U("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ee).join("\n"):" "+Ee(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Se(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function Re(e){Se(e),e.headers=le.from(e.headers),e.data=fe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Oe(e.adapter||re.adapter)(e).then((function(t){return Se(e),t.data=fe.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t}),(function(t){return de(t)||(Se(e),t&&t.response&&(t.response.data=fe.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)}))}const Ae=e=>e instanceof le?e.toJSON():e;function Te(e,t){t=t||{};const n={};function r(e,t,n){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:n},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function o(e,t,n){return F.isUndefined(t)?F.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!F.isUndefined(t))return r(void 0,t)}function i(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o(Ae(e),Ae(t),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);F.isUndefined(i)&&s!==a||(n[r]=i)})),n}const je={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{je[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ce={};je.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.3] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new U(r(o," has been removed"+(t?" in "+t:"")),U.ERR_DEPRECATED);return t&&!Ce[o]&&(Ce[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};const Ne={assertOptions:function(e,t,n){if("object"!=typeof e)throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new U("option "+s+" must be "+n,U.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new U("Unknown option "+s,U.ERR_BAD_OPTION)}},validators:je},ve=Ne.validators;class xe{constructor(e){this.defaults=e,this.interceptors={request:new K,response:new K}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Te(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Ne.assertOptions(n,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),null!=r&&(F.isFunction(r)?t.paramsSerializer={serialize:r}:Ne.assertOptions(r,{encode:ve.function,serialize:ve.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&F.merge(o.common,o[t.method]);o&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=le.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[Re.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=i.length;let d=t;for(f=0;f<l;){const e=i[f++],t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Re.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return W(me((e=Te(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],(function(e){xe.prototype[e]=function(t,n){return this.request(Te(n||{},{method:e,url:t,data:(n||{}).data}))}})),F.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Te(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}xe.prototype[e]=t(),xe.prototype[e+"Form"]=t(!0)}));const Pe=xe;class _e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new pe(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new _e((function(t){e=t})),cancel:e}}}const Fe=_e;const Ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ue).forEach((([e,t])=>{Ue[t]=e}));const Be=Ue;const De=function t(n){const r=new Pe(n),o=e(Pe.prototype.request,r);return F.extend(o,Pe.prototype,r,{allOwnKeys:!0}),F.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(Te(n,e))},o}(re);De.Axios=Pe,De.CanceledError=pe,De.CancelToken=Fe,De.isCancel=de,De.VERSION="1.6.3",De.toFormData=z,De.AxiosError=U,De.Cancel=De.CanceledError,De.all=function(e){return Promise.all(e)},De.spread=function(e){return function(t){return e.apply(null,t)}},De.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},De.mergeConfig=Te,De.AxiosHeaders=le,De.formToJSON=e=>te(F.isHTMLForm(e)?new FormData(e):e),De.getAdapter=Oe,De.HttpStatusCode=Be,De.default=De;const Le=De,{Axios:ke,AxiosError:qe,CanceledError:Ie,isCancel:ze,CancelToken:Me,VERSION:He,all:Je,Cancel:Ve,isAxiosError:We,spread:Ke,toFormData:Ge,AxiosHeaders:$e,HttpStatusCode:Xe,formToJSON:Qe,getAdapter:Ze,mergeConfig:Ye}=Le;export{ke as Axios,qe as AxiosError,$e as AxiosHeaders,Ve as Cancel,Me as CancelToken,Ie as CanceledError,Xe as HttpStatusCode,He as VERSION,Je as all,Le as default,Qe as formToJSON,Ze as getAdapter,We as isAxiosError,ze as isCancel,Ye as mergeConfig,Ke as spread,Ge as toFormData}; +function e(e,t){return function(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:n}=Object,r=(o=Object.create(null),e=>{const n=t.call(e);return o[n]||(o[n]=n.slice(8,-1).toLowerCase())});var o;const s=e=>(e=e.toLowerCase(),t=>r(t)===e),i=e=>t=>typeof t===e,{isArray:a}=Array,c=i("undefined");const u=s("ArrayBuffer");const l=i("string"),f=i("function"),d=i("number"),p=e=>null!==e&&"object"==typeof e,h=e=>{if("object"!==r(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},m=s("Date"),y=s("File"),g=s("Blob"),b=s("FileList"),E=s("URLSearchParams");function w(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),a(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function O(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,R=e=>!c(e)&&e!==S;const A=(T="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>T&&e instanceof T);var T;const j=s("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),N=s("RegExp"),v=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};w(n,((n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)})),Object.defineProperties(e,r)},x="abcdefghijklmnopqrstuvwxyz",P={DIGIT:"0123456789",ALPHA:x,ALPHA_DIGIT:x+x.toUpperCase()+"0123456789"};const _=s("AsyncFunction"),F={isArray:a,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=r(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:p,isPlainObject:h,isUndefined:c,isDate:m,isFile:y,isBlob:g,isRegExp:N,isFunction:f,isStream:e=>p(e)&&f(e.pipe),isURLSearchParams:E,isTypedArray:A,isFileList:b,forEach:w,merge:function e(){const{caseless:t}=R(this)&&this||{},n={},r=(r,o)=>{const s=t&&O(n,o)||o;h(n[s])&&h(r)?n[s]=e(n[s],r):h(r)?n[s]=e({},r):a(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&w(arguments[e],r);return n},extend:(t,n,r,{allOwnKeys:o}={})=>(w(n,((n,o)=>{r&&f(n)?t[o]=e(n,r):t[o]=n}),{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:r,kindOfTest:s,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(a(e))return e;let t=e.length;if(!d(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:j,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:v,freezeMethods:e=>{v(e,((t,n)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];f(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return a(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:O,global:S,isContextDefined:R,ALPHABET:P,generateString:(e=16,t=P.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(p(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=a(e)?[]:{};return w(e,((e,t)=>{const s=n(e,r+1);!c(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:_,isThenable:e=>e&&(p(e)||f(e))&&f(e.then)&&f(e.catch)};function U(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}F.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const B=U.prototype,D={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{D[e]={value:e}})),Object.defineProperties(U,D),Object.defineProperty(B,"isAxiosError",{value:!0}),U.from=(e,t,n,r,o,s)=>{const i=Object.create(B);return F.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),U.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function L(e){return F.isPlainObject(e)||F.isArray(e)}function k(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function q(e,t,n){return e?e.concat(t).map((function(e,t){return e=k(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const I=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)}));function z(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!a&&F.isBlob(e))throw new U("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(F.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(L)}(e)||(F.isFileList(e)||F.endsWith(n,"[]"))&&(a=F.toArray(e)))return n=k(n),a.forEach((function(e,r){!F.isUndefined(e)&&null!==e&&t.append(!0===i?q([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!L(e)||(t.append(q(o,n,s),c(e)),!1)}const l=[],f=Object.assign(I,{defaultVisitor:u,convertValue:c,isVisitable:L});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!F.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),F.forEach(n,(function(n,s){!0===(!(F.isUndefined(n)||null===n)&&o.call(t,n,F.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t}function M(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function H(e,t){this._pairs=[],e&&z(e,this,t)}const J=H.prototype;function V(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function W(e,t,n){if(!t)return e;const r=n&&n.encode||V,o=n&&n.serialize;let s;if(s=o?o(t,n):F.isURLSearchParams(t)?t.toString():new H(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}J.append=function(e,t){this._pairs.push([e,t])},J.toString=function(e){const t=e?function(t){return e.call(this,t,M)}:M;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const K=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},G={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:H,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},X="undefined"!=typeof window&&"undefined"!=typeof document,Q=(Z="undefined"!=typeof navigator&&navigator.product,X&&["ReactNative","NativeScript","NS"].indexOf(Z)<0);var Z;const Y="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ee={...Object.freeze({__proto__:null,hasBrowserEnv:X,hasStandardBrowserWebWorkerEnv:Y,hasStandardBrowserEnv:Q}),...$};function te(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&F.isArray(r)?r.length:s,a)return F.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&F.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&F.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(F.isFormData(e)&&F.isFunction(e.entries)){const n={};return F.forEachEntry(e,((e,r)=>{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const ne={transitional:G,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=F.isObject(e);o&&F.isHTMLForm(e)&&(e=new FormData(e));if(F.isFormData(e))return r&&r?JSON.stringify(te(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return z(e,new ee.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return ee.isNode&&F.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=F.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return z(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ne.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&F.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw U.from(e,U.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ee.classes.FormData,Blob:ee.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(e=>{ne.headers[e]={}}));const re=ne,oe=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),se=Symbol("internals");function ie(e){return e&&String(e).trim().toLowerCase()}function ae(e){return!1===e||null==e?e:F.isArray(e)?e.map(ae):String(e)}function ce(e,t,n,r,o){return F.isFunction(r)?r.call(this,t,n):(o&&(t=n),F.isString(t)?F.isString(r)?-1!==t.indexOf(r):F.isRegExp(r)?r.test(t):void 0:void 0)}class ue{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ie(t);if(!o)throw new Error("header name must be a non-empty string");const s=F.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ae(e))}const s=(e,t)=>F.forEach(e,((e,n)=>o(e,n,t)));return F.isPlainObject(e)||e instanceof this.constructor?s(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&oe[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ie(e)){const n=F.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(F.isFunction(t))return t.call(this,e,n);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ie(e)){const n=F.findKey(this,e);return!(!n||void 0===this[n]||t&&!ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ie(e)){const o=F.findKey(n,e);!o||t&&!ce(0,n[o],o,t)||(delete n[o],r=!0)}}return F.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return F.forEach(this,((r,o)=>{const s=F.findKey(n,o);if(s)return t[s]=ae(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ae(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&F.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[se]=this[se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ie(e);t[r]||(!function(e,t){const n=F.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return F.isArray(e)?e.forEach(r):r(e),this}}ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(ue.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),F.freezeMethods(ue);const le=ue;function fe(e,t){const n=this||re,r=t||n,o=le.from(r.headers);let s=r.data;return F.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function de(e){return!(!e||!e.__CANCEL__)}function pe(e,t,n){U.call(this,null==e?"canceled":e,U.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(pe,U,{__CANCEL__:!0});const he=ee.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];F.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),F.isString(r)&&i.push("path="+r),F.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function me(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ye=ee.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=F.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function ge(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-n,c=r(a);n=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const be={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=le.from(e.headers).normalize();let s,i,{responseType:a,withXSRFToken:c}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(F.isFormData(r))if(ee.hasStandardBrowserEnv||ee.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const f=me(e.baseURL,e.url);function d(){if(!l)return;const r=le.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),W(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new U("Request aborted",U.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new U("Network Error",U.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||G;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new U(t,r.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,l)),l=null},ee.hasStandardBrowserEnv&&(c&&F.isFunction(c)&&(c=c(e)),c||!1!==c&&ye(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&he.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&F.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",ge(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",ge(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(n(!t||t.type?new pe(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);p&&-1===ee.protocols.indexOf(p)?n(new U("Unsupported protocol "+p+":",U.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};F.forEach(be,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ee=e=>`- ${e}`,we=e=>F.isFunction(e)||null===e||!1===e,Oe=e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){let t;if(n=e[s],r=n,!we(n)&&(r=be[(t=String(n)).toLowerCase()],void 0===r))throw new U(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new U("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ee).join("\n"):" "+Ee(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Se(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function Re(e){Se(e),e.headers=le.from(e.headers),e.data=fe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Oe(e.adapter||re.adapter)(e).then((function(t){return Se(e),t.data=fe.call(e,e.transformResponse,t),t.headers=le.from(t.headers),t}),(function(t){return de(t)||(Se(e),t&&t.response&&(t.response.data=fe.call(e,e.transformResponse,t.response),t.response.headers=le.from(t.response.headers))),Promise.reject(t)}))}const Ae=e=>e instanceof le?e.toJSON():e;function Te(e,t){t=t||{};const n={};function r(e,t,n){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:n},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function o(e,t,n){return F.isUndefined(t)?F.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!F.isUndefined(t))return r(void 0,t)}function i(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o(Ae(e),Ae(t),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);F.isUndefined(i)&&s!==a||(n[r]=i)})),n}const je={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{je[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ce={};je.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new U(r(o," has been removed"+(t?" in "+t:"")),U.ERR_DEPRECATED);return t&&!Ce[o]&&(Ce[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};const Ne={assertOptions:function(e,t,n){if("object"!=typeof e)throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new U("option "+s+" must be "+n,U.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new U("Unknown option "+s,U.ERR_BAD_OPTION)}},validators:je},ve=Ne.validators;class xe{constructor(e){this.defaults=e,this.interceptors={request:new K,response:new K}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Te(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Ne.assertOptions(n,{silentJSONParsing:ve.transitional(ve.boolean),forcedJSONParsing:ve.transitional(ve.boolean),clarifyTimeoutError:ve.transitional(ve.boolean)},!1),null!=r&&(F.isFunction(r)?t.paramsSerializer={serialize:r}:Ne.assertOptions(r,{encode:ve.function,serialize:ve.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&F.merge(o.common,o[t.method]);o&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=le.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[Re.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=i.length;let d=t;for(f=0;f<l;){const e=i[f++],t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Re.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return W(me((e=Te(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],(function(e){xe.prototype[e]=function(t,n){return this.request(Te(n||{},{method:e,url:t,data:(n||{}).data}))}})),F.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Te(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}xe.prototype[e]=t(),xe.prototype[e+"Form"]=t(!0)}));const Pe=xe;class _e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new pe(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new _e((function(t){e=t})),cancel:e}}}const Fe=_e;const Ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ue).forEach((([e,t])=>{Ue[t]=e}));const Be=Ue;const De=function t(n){const r=new Pe(n),o=e(Pe.prototype.request,r);return F.extend(o,Pe.prototype,r,{allOwnKeys:!0}),F.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(Te(n,e))},o}(re);De.Axios=Pe,De.CanceledError=pe,De.CancelToken=Fe,De.isCancel=de,De.VERSION="1.6.5",De.toFormData=z,De.AxiosError=U,De.Cancel=De.CanceledError,De.all=function(e){return Promise.all(e)},De.spread=function(e){return function(t){return e.apply(null,t)}},De.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},De.mergeConfig=Te,De.AxiosHeaders=le,De.formToJSON=e=>te(F.isHTMLForm(e)?new FormData(e):e),De.getAdapter=Oe,De.HttpStatusCode=Be,De.default=De;const Le=De,{Axios:ke,AxiosError:qe,CanceledError:Ie,isCancel:ze,CancelToken:Me,VERSION:He,all:Je,Cancel:Ve,isAxiosError:We,spread:Ke,toFormData:Ge,AxiosHeaders:$e,HttpStatusCode:Xe,formToJSON:Qe,getAdapter:Ze,mergeConfig:Ye}=Le;export{ke as Axios,qe as AxiosError,$e as AxiosHeaders,Ve as Cancel,Me as CancelToken,Ie as CanceledError,Xe as HttpStatusCode,He as VERSION,Je as all,Le as default,Qe as formToJSON,Ze as getAdapter,We as isAxiosError,ze as isCancel,Ye as mergeConfig,Ke as spread,Ge as toFormData}; //# sourceMappingURL=axios.min.js.map diff --git a/node_modules/axios/dist/esm/axios.min.js.map b/node_modules/axios/dist/esm/axios.min.js.map index 9a641bca..0eb096c8 100644 --- a/node_modules/axios/dist/esm/axios.min.js.map +++ b/node_modules/axios/dist/esm/axios.min.js.map @@ -1 +1 @@ -{"version":3,"file":"axios.min.js","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/index.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/helpers/cookies.js","../../lib/core/buildFullPath.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/helpers/isURLSameOrigin.js","../../lib/adapters/xhr.js","../../lib/helpers/speedometer.js","../../lib/adapters/adapters.js","../../lib/helpers/null.js","../../lib/core/settle.js","../../lib/helpers/parseProtocol.js","../../lib/core/dispatchRequest.js","../../lib/core/mergeConfig.js","../../lib/env/data.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../index.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.3\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n"],"names":["bind","fn","thisArg","apply","arguments","toString","Object","prototype","getPrototypeOf","kindOf","cache","create","thing","str","call","slice","toLowerCase","kindOfTest","type","typeOfTest","isArray","Array","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","Symbol","toStringTag","iterator","isDate","isFile","isBlob","isFileList","isURLSearchParams","forEach","obj","allOwnKeys","i","l","length","keys","getOwnPropertyNames","len","key","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","hasOwnProperty","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","ALPHA","ALPHABET","DIGIT","ALPHA_DIGIT","toUpperCase","isAsyncFn","utils$1","isBuffer","constructor","isFormData","kind","FormData","append","isArrayBufferView","result","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","this","assignValue","targetKey","extend","a","b","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","String","undefined","lastIndex","indexOf","toArray","arr","forEachEntry","next","done","pair","matchAll","regExp","matches","exec","push","hasOwnProp","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","toCamelCase","m","p1","p2","noop","toFiniteNumber","defaultValue","Number","isFinite","generateString","size","alphabet","Math","random","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isThenable","then","catch","AxiosError","message","code","config","request","response","captureStackTrace","utils","toJSON","description","number","fileName","lineNumber","columnNumber","status","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","map","token","join","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","JSON","stringify","some","isFlatArray","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","buildURL","url","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","fulfilled","rejected","synchronous","runWhen","eject","id","clear","h","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","document","hasStandardBrowserEnv","product","navigator","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","adapter","transformRequest","data","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","e","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","Accept","method","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","get","tokens","tokensRE","parseTokens","has","matcher","delete","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","static","first","computed","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","configurable","buildAccessors","accessor","mapped","headerValue","AxiosHeaders$2","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","write","expires","domain","secure","cookie","Date","toGMTString","read","RegExp","decodeURIComponent","remove","now","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","userAgent","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","Promise","resolve","reject","requestData","requestHeaders","onCanceled","withXSRFToken","cancelToken","unsubscribe","signal","removeEventListener","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","floor","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","setTimeout","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","configValue","validators","deprecatedWarnings","validator","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","InterceptorManager","configOrUrl","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$2","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","c","CancelToken$2","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$2","axios","createInstance","defaultConfig","instance","VERSION","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","default","axios$1"],"mappings":"AAEe,SAASA,EAAKC,EAAIC,GAC/B,OAAO,WACL,OAAOD,EAAGE,MAAMD,EAASE,UAC7B,CACA,CCAA,MAAMC,SAACA,GAAYC,OAAOC,WACpBC,eAACA,GAAkBF,OAEnBG,GAAUC,EAGbJ,OAAOK,OAAO,MAHQC,IACrB,MAAMC,EAAMR,EAASS,KAAKF,GAC1B,OAAOF,EAAMG,KAASH,EAAMG,GAAOA,EAAIE,MAAM,GAAI,GAAGC,cAAc,GAFvD,IAACN,EAKhB,MAAMO,EAAcC,IAClBA,EAAOA,EAAKF,cACJJ,GAAUH,EAAOG,KAAWM,GAGhCC,EAAaD,GAAQN,UAAgBA,IAAUM,GAS/CE,QAACA,GAAWC,MASZC,EAAcH,EAAW,aAqB/B,MAAMI,EAAgBN,EAAW,eA2BjC,MAAMO,EAAWL,EAAW,UAQtBM,EAAaN,EAAW,YASxBO,EAAWP,EAAW,UAStBQ,EAAYf,GAAoB,OAAVA,GAAmC,iBAAVA,EAiB/CgB,EAAiBC,IACrB,GAAoB,WAAhBpB,EAAOoB,GACT,OAAO,EAGT,MAAMtB,EAAYC,EAAeqB,GACjC,QAAsB,OAAdtB,GAAsBA,IAAcD,OAAOC,WAAkD,OAArCD,OAAOE,eAAeD,IAA0BuB,OAAOC,eAAeF,GAAUC,OAAOE,YAAYH,EAAI,EAUnKI,EAAShB,EAAW,QASpBiB,EAASjB,EAAW,QASpBkB,EAASlB,EAAW,QASpBmB,EAAanB,EAAW,YAsCxBoB,EAAoBpB,EAAW,mBA2BrC,SAASqB,EAAQC,EAAKtC,GAAIuC,WAACA,GAAa,GAAS,IAE/C,GAAID,QACF,OAGF,IAAIE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khB,GAChC,OAAOgG,EAAenI,GAAYoI,EAAejG,GACrD,EAESkG,CACT,CAGcF,CAAexW,IAG7BuW,GAAMhG,MAAQA,GAGdgG,GAAMxQ,cAAgBA,GACtBwQ,GAAM1E,YAAcA,GACpB0E,GAAM1Q,SAAWA,GACjB0Q,GAAMI,QLvDiB,QKwDvBJ,GAAMjb,WAAaA,EAGnBib,GAAMhd,WAAaA,EAGnBgd,GAAMK,OAASL,GAAMxQ,cAGrBwQ,GAAMM,IAAM,SAAaC,GACvB,OAAO1M,QAAQyM,IAAIC,EACrB,EAEAP,GAAMQ,OC9CS,SAAgBC,GAC7B,OAAO,SAActgB,GACnB,OAAOsgB,EAASloB,MAAM,KAAM4H,EAChC,CACA,ED6CA6f,GAAMU,aE7DS,SAAsBC,GACnC,OAAOpd,EAAMxJ,SAAS4mB,KAAsC,IAAzBA,EAAQD,YAC7C,EF8DAV,GAAMlI,YAAcA,GAEpBkI,GAAM3T,aAAeA,GAErB2T,GAAMY,WAAa5nB,GAASkQ,GAAe3F,EAAMvH,WAAWhD,GAAS,IAAIwE,SAASxE,GAASA,GAE3FgnB,GAAMa,WAAaxJ,GAEnB2I,GAAMjE,eAAiBA,GAEvBiE,GAAMc,QAAUd,GAGhB,MAAee,GAAAf,IGnFThG,MACJA,GAAKhX,WACLA,GAAUwM,cACVA,GAAaF,SACbA,GAAQgM,YACRA,GAAW8E,QACXA,GAAOE,IACPA,GAAGD,OACHA,GAAMK,aACNA,GAAYF,OACZA,GAAMzb,WACNA,GAAUsH,aACVA,GAAY0P,eACZA,GAAc6E,WACdA,GAAUC,WACVA,GAAU/I,YACVA,IACEkI"} \ No newline at end of file +{"version":3,"file":"axios.min.js","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/index.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/helpers/cookies.js","../../lib/core/buildFullPath.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/helpers/isURLSameOrigin.js","../../lib/adapters/xhr.js","../../lib/helpers/speedometer.js","../../lib/adapters/adapters.js","../../lib/helpers/null.js","../../lib/core/settle.js","../../lib/helpers/parseProtocol.js","../../lib/core/dispatchRequest.js","../../lib/core/mergeConfig.js","../../lib/env/data.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../index.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.5\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n"],"names":["bind","fn","thisArg","apply","arguments","toString","Object","prototype","getPrototypeOf","kindOf","cache","create","thing","str","call","slice","toLowerCase","kindOfTest","type","typeOfTest","isArray","Array","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","Symbol","toStringTag","iterator","isDate","isFile","isBlob","isFileList","isURLSearchParams","forEach","obj","allOwnKeys","i","l","length","keys","getOwnPropertyNames","len","key","findKey","_key","_global","globalThis","self","window","global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","hasOwnProperty","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","ALPHA","ALPHABET","DIGIT","ALPHA_DIGIT","toUpperCase","isAsyncFn","utils$1","isBuffer","constructor","isFormData","kind","FormData","append","isArrayBufferView","result","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","this","assignValue","targetKey","extend","a","b","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","defineProperty","value","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","String","undefined","lastIndex","indexOf","toArray","arr","forEachEntry","next","done","pair","matchAll","regExp","matches","exec","push","hasOwnProp","freezeMethods","enumerable","writable","set","Error","toObjectSet","arrayOrString","delimiter","define","split","toCamelCase","m","p1","p2","noop","toFiniteNumber","defaultValue","Number","isFinite","generateString","size","alphabet","Math","random","isSpecCompliantForm","toJSONObject","stack","visit","source","target","reducedValue","isThenable","then","catch","AxiosError","message","code","config","request","response","captureStackTrace","utils","toJSON","description","number","fileName","lineNumber","columnNumber","status","from","error","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","map","token","join","predicates","test","toFormData","formData","options","TypeError","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","JSON","stringify","some","isFlatArray","el","index","exposedHelpers","build","pop","encode","charMap","encodeURIComponent","match","AxiosURLSearchParams","params","_pairs","buildURL","url","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","fulfilled","rejected","synchronous","runWhen","eject","id","clear","h","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","document","hasStandardBrowserEnv","product","navigator","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","adapter","transformRequest","data","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","e","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","Accept","method","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","get","tokens","tokensRE","parseTokens","has","matcher","delete","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","static","first","computed","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","configurable","buildAccessors","accessor","mapped","headerValue","AxiosHeaders$2","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","write","expires","domain","secure","cookie","Date","toGMTString","read","RegExp","decodeURIComponent","remove","now","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","userAgent","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","location","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","Promise","resolve","reject","requestData","requestHeaders","onCanceled","withXSRFToken","cancelToken","unsubscribe","signal","removeEventListener","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","floor","settle","err","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","setTimeout","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","configValue","validators","deprecatedWarnings","validator","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","console","warn","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","InterceptorManager","configOrUrl","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$2","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","c","CancelToken$2","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$2","axios","createInstance","defaultConfig","instance","VERSION","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","default","axios$1"],"mappings":"AAEe,SAASA,EAAKC,EAAIC,GAC/B,OAAO,WACL,OAAOD,EAAGE,MAAMD,EAASE,UAC7B,CACA,CCAA,MAAMC,SAACA,GAAYC,OAAOC,WACpBC,eAACA,GAAkBF,OAEnBG,GAAUC,EAGbJ,OAAOK,OAAO,MAHQC,IACrB,MAAMC,EAAMR,EAASS,KAAKF,GAC1B,OAAOF,EAAMG,KAASH,EAAMG,GAAOA,EAAIE,MAAM,GAAI,GAAGC,cAAc,GAFvD,IAACN,EAKhB,MAAMO,E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Opd,EAAMxJ,SAAS4mB,KAAsC,IAAzBA,EAAQD,YAC7C,EF8DAV,GAAMlI,YAAcA,GAEpBkI,GAAM3T,aAAeA,GAErB2T,GAAMY,WAAa5nB,GAASkQ,GAAe3F,EAAMvH,WAAWhD,GAAS,IAAIwE,SAASxE,GAASA,GAE3FgnB,GAAMa,WAAaxJ,GAEnB2I,GAAMjE,eAAiBA,GAEvBiE,GAAMc,QAAUd,GAGhB,MAAee,GAAAf,IGnFThG,MACJA,GAAKhX,WACLA,GAAUwM,cACVA,GAAaF,SACbA,GAAQgM,YACRA,GAAW8E,QACXA,GAAOE,IACPA,GAAGD,OACHA,GAAMK,aACNA,GAAYF,OACZA,GAAMzb,WACNA,GAAUsH,aACVA,GAAY0P,eACZA,GAAc6E,WACdA,GAAUC,WACVA,GAAU/I,YACVA,IACEkI"} \ No newline at end of file diff --git a/node_modules/axios/dist/node/axios.cjs b/node_modules/axios/dist/node/axios.cjs index cd76ae80..50b47a0e 100644 --- a/node_modules/axios/dist/node/axios.cjs +++ b/node_modules/axios/dist/node/axios.cjs @@ -1,4 +1,4 @@ -// Axios v1.6.3 Copyright (c) 2023 Matt Zabriskie and contributors +// Axios v1.6.5 Copyright (c) 2024 Matt Zabriskie and contributors 'use strict'; const FormData$1 = require('form-data'); @@ -1368,6 +1368,9 @@ function arrayToObject(arr) { function formDataToJSON(formData) { function buildPath(path, value, target, index) { let name = path[index++]; + + if (name === '__proto__') return true; + const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils$1.isArray(target) ? target.length : name; @@ -2019,7 +2022,7 @@ function buildFullPath(baseURL, requestedURL) { return requestedURL; } -const VERSION = "1.6.3"; +const VERSION = "1.6.5"; function parseProtocol(url) { const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); @@ -2650,6 +2653,10 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) { // hotfix to support opt.all option which is required for node 20.x lookup = (hostname, opt, cb) => { _lookup(hostname, opt, (err, arg0, arg1) => { + if (err) { + return cb(err); + } + const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); diff --git a/node_modules/axios/dist/node/axios.cjs.map b/node_modules/axios/dist/node/axios.cjs.map index e37b1d61..4141dc36 100644 --- a/node_modules/axios/dist/node/axios.cjs.map +++ b/node_modules/axios/dist/node/axios.cjs.map @@ -1 +1 @@ -{"version":3,"file":"axios.cjs","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/node/classes/URLSearchParams.js","../../lib/platform/node/index.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/buildFullPath.js","../../lib/env/data.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/fromDataURI.js","../../lib/helpers/throttle.js","../../lib/helpers/speedometer.js","../../lib/helpers/AxiosTransformStream.js","../../lib/helpers/readBlob.js","../../lib/helpers/formDataToStream.js","../../lib/helpers/ZlibHeaderTransformStream.js","../../lib/helpers/callbackify.js","../../lib/adapters/http.js","../../lib/helpers/cookies.js","../../lib/helpers/isURLSameOrigin.js","../../lib/adapters/xhr.js","../../lib/adapters/adapters.js","../../lib/core/dispatchRequest.js","../../lib/core/mergeConfig.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport url from 'url';\nexport default url.URLSearchParams;\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\n\nexport default {\n isNode: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob: typeof Blob !== 'undefined' && Blob || null\n },\n protocols: [ 'http', 'https', 'file', 'data' ]\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","export const VERSION = \"1.6.3\";","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport parseProtocol from './parseProtocol.js';\nimport platform from '../platform/index.js';\n\nconst DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n * Parse data uri to a Buffer or Blob\n *\n * @param {String} uri\n * @param {?Boolean} asBlob\n * @param {?Object} options\n * @param {?Function} options.Blob\n *\n * @returns {Buffer|Blob}\n */\nexport default function fromDataURI(uri, asBlob, options) {\n const _Blob = options && options.Blob || platform.classes.Blob;\n const protocol = parseProtocol(uri);\n\n if (asBlob === undefined && _Blob) {\n asBlob = true;\n }\n\n if (protocol === 'data') {\n uri = protocol.length ? uri.slice(protocol.length + 1) : uri;\n\n const match = DATA_URL_PATTERN.exec(uri);\n\n if (!match) {\n throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);\n }\n\n const mime = match[1];\n const isBase64 = match[2];\n const body = match[3];\n const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');\n\n if (asBlob) {\n if (!_Blob) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n return new _Blob([buffer], {type: mime});\n }\n\n return buffer;\n }\n\n throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);\n}\n","'use strict';\n\n/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n const threshold = 1000 / freq;\n let timer = null;\n return function throttled(force, args) {\n const now = Date.now();\n if (force || now - timestamp > threshold) {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n timestamp = now;\n return fn.apply(null, args);\n }\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n timestamp = Date.now();\n return fn.apply(null, args);\n }, threshold - (now - timestamp));\n }\n };\n}\n\nexport default throttle;\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport stream from 'stream';\nimport utils from '../utils.js';\nimport throttle from './throttle.js';\nimport speedometer from './speedometer.js';\n\nconst kInternals = Symbol('internals');\n\nclass AxiosTransformStream extends stream.Transform{\n constructor(options) {\n options = utils.toFlatObject(options, {\n maxRate: 0,\n chunkSize: 64 * 1024,\n minChunkSize: 100,\n timeWindow: 500,\n ticksRate: 2,\n samplesCount: 15\n }, null, (prop, source) => {\n return !utils.isUndefined(source[prop]);\n });\n\n super({\n readableHighWaterMark: options.chunkSize\n });\n\n const self = this;\n\n const internals = this[kInternals] = {\n length: options.length,\n timeWindow: options.timeWindow,\n ticksRate: options.ticksRate,\n chunkSize: options.chunkSize,\n maxRate: options.maxRate,\n minChunkSize: options.minChunkSize,\n bytesSeen: 0,\n isCaptured: false,\n notifiedBytesLoaded: 0,\n ts: Date.now(),\n bytes: 0,\n onReadCallback: null\n };\n\n const _speedometer = speedometer(internals.ticksRate * options.samplesCount, internals.timeWindow);\n\n this.on('newListener', event => {\n if (event === 'progress') {\n if (!internals.isCaptured) {\n internals.isCaptured = true;\n }\n }\n });\n\n let bytesNotified = 0;\n\n internals.updateProgress = throttle(function throttledHandler() {\n const totalBytes = internals.length;\n const bytesTransferred = internals.bytesSeen;\n const progressBytes = bytesTransferred - bytesNotified;\n if (!progressBytes || self.destroyed) return;\n\n const rate = _speedometer(progressBytes);\n\n bytesNotified = bytesTransferred;\n\n process.nextTick(() => {\n self.emit('progress', {\n 'loaded': bytesTransferred,\n 'total': totalBytes,\n 'progress': totalBytes ? (bytesTransferred / totalBytes) : undefined,\n 'bytes': progressBytes,\n 'rate': rate ? rate : undefined,\n 'estimated': rate && totalBytes && bytesTransferred <= totalBytes ?\n (totalBytes - bytesTransferred) / rate : undefined\n });\n });\n }, internals.ticksRate);\n\n const onFinish = () => {\n internals.updateProgress(true);\n };\n\n this.once('end', onFinish);\n this.once('error', onFinish);\n }\n\n _read(size) {\n const internals = this[kInternals];\n\n if (internals.onReadCallback) {\n internals.onReadCallback();\n }\n\n return super._read(size);\n }\n\n _transform(chunk, encoding, callback) {\n const self = this;\n const internals = this[kInternals];\n const maxRate = internals.maxRate;\n\n const readableHighWaterMark = this.readableHighWaterMark;\n\n const timeWindow = internals.timeWindow;\n\n const divider = 1000 / timeWindow;\n const bytesThreshold = (maxRate / divider);\n const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;\n\n function pushChunk(_chunk, _callback) {\n const bytes = Buffer.byteLength(_chunk);\n internals.bytesSeen += bytes;\n internals.bytes += bytes;\n\n if (internals.isCaptured) {\n internals.updateProgress();\n }\n\n if (self.push(_chunk)) {\n process.nextTick(_callback);\n } else {\n internals.onReadCallback = () => {\n internals.onReadCallback = null;\n process.nextTick(_callback);\n };\n }\n }\n\n const transformChunk = (_chunk, _callback) => {\n const chunkSize = Buffer.byteLength(_chunk);\n let chunkRemainder = null;\n let maxChunkSize = readableHighWaterMark;\n let bytesLeft;\n let passed = 0;\n\n if (maxRate) {\n const now = Date.now();\n\n if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {\n internals.ts = now;\n bytesLeft = bytesThreshold - internals.bytes;\n internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;\n passed = 0;\n }\n\n bytesLeft = bytesThreshold - internals.bytes;\n }\n\n if (maxRate) {\n if (bytesLeft <= 0) {\n // next time window\n return setTimeout(() => {\n _callback(null, _chunk);\n }, timeWindow - passed);\n }\n\n if (bytesLeft < maxChunkSize) {\n maxChunkSize = bytesLeft;\n }\n }\n\n if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {\n chunkRemainder = _chunk.subarray(maxChunkSize);\n _chunk = _chunk.subarray(0, maxChunkSize);\n }\n\n pushChunk(_chunk, chunkRemainder ? () => {\n process.nextTick(_callback, null, chunkRemainder);\n } : _callback);\n };\n\n transformChunk(chunk, function transformNextChunk(err, _chunk) {\n if (err) {\n return callback(err);\n }\n\n if (_chunk) {\n transformChunk(_chunk, transformNextChunk);\n } else {\n callback(null);\n }\n });\n }\n\n setLength(length) {\n this[kInternals].length = +length;\n return this;\n }\n}\n\nexport default AxiosTransformStream;\n","const {asyncIterator} = Symbol;\n\nconst readBlob = async function* (blob) {\n if (blob.stream) {\n yield* blob.stream()\n } else if (blob.arrayBuffer) {\n yield await blob.arrayBuffer()\n } else if (blob[asyncIterator]) {\n yield* blob[asyncIterator]();\n } else {\n yield blob;\n }\n}\n\nexport default readBlob;\n","import {TextEncoder} from 'util';\nimport {Readable} from 'stream';\nimport utils from \"../utils.js\";\nimport readBlob from \"./readBlob.js\";\n\nconst BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';\n\nconst textEncoder = new TextEncoder();\n\nconst CRLF = '\\r\\n';\nconst CRLF_BYTES = textEncoder.encode(CRLF);\nconst CRLF_BYTES_COUNT = 2;\n\nclass FormDataPart {\n constructor(name, value) {\n const {escapeName} = this.constructor;\n const isStringValue = utils.isString(value);\n\n let headers = `Content-Disposition: form-data; name=\"${escapeName(name)}\"${\n !isStringValue && value.name ? `; filename=\"${escapeName(value.name)}\"` : ''\n }${CRLF}`;\n\n if (isStringValue) {\n value = textEncoder.encode(String(value).replace(/\\r?\\n|\\r\\n?/g, CRLF));\n } else {\n headers += `Content-Type: ${value.type || \"application/octet-stream\"}${CRLF}`\n }\n\n this.headers = textEncoder.encode(headers + CRLF);\n\n this.contentLength = isStringValue ? value.byteLength : value.size;\n\n this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;\n\n this.name = name;\n this.value = value;\n }\n\n async *encode(){\n yield this.headers;\n\n const {value} = this;\n\n if(utils.isTypedArray(value)) {\n yield value;\n } else {\n yield* readBlob(value);\n }\n\n yield CRLF_BYTES;\n }\n\n static escapeName(name) {\n return String(name).replace(/[\\r\\n\"]/g, (match) => ({\n '\\r' : '%0D',\n '\\n' : '%0A',\n '\"' : '%22',\n }[match]));\n }\n}\n\nconst formDataToStream = (form, headersHandler, options) => {\n const {\n tag = 'form-data-boundary',\n size = 25,\n boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)\n } = options || {};\n\n if(!utils.isFormData(form)) {\n throw TypeError('FormData instance required');\n }\n\n if (boundary.length < 1 || boundary.length > 70) {\n throw Error('boundary must be 10-70 characters long')\n }\n\n const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);\n const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);\n let contentLength = footerBytes.byteLength;\n\n const parts = Array.from(form.entries()).map(([name, value]) => {\n const part = new FormDataPart(name, value);\n contentLength += part.size;\n return part;\n });\n\n contentLength += boundaryBytes.byteLength * parts.length;\n\n contentLength = utils.toFiniteNumber(contentLength);\n\n const computedHeaders = {\n 'Content-Type': `multipart/form-data; boundary=${boundary}`\n }\n\n if (Number.isFinite(contentLength)) {\n computedHeaders['Content-Length'] = contentLength;\n }\n\n headersHandler && headersHandler(computedHeaders);\n\n return Readable.from((async function *() {\n for(const part of parts) {\n yield boundaryBytes;\n yield* part.encode();\n }\n\n yield footerBytes;\n })());\n};\n\nexport default formDataToStream;\n","\"use strict\";\n\nimport stream from \"stream\";\n\nclass ZlibHeaderTransformStream extends stream.Transform {\n __transform(chunk, encoding, callback) {\n this.push(chunk);\n callback();\n }\n\n _transform(chunk, encoding, callback) {\n if (chunk.length !== 0) {\n this._transform = this.__transform;\n\n // Add Default Compression headers if no zlib headers are present\n if (chunk[0] !== 120) { // Hex: 78\n const header = Buffer.alloc(2);\n header[0] = 120; // Hex: 78\n header[1] = 156; // Hex: 9C \n this.push(header, encoding);\n }\n }\n\n this.__transform(chunk, encoding, callback);\n }\n}\n\nexport default ZlibHeaderTransformStream;\n","import utils from \"../utils.js\";\n\nconst callbackify = (fn, reducer) => {\n return utils.isAsyncFn(fn) ? function (...args) {\n const cb = args.pop();\n fn.apply(this, args).then((value) => {\n try {\n reducer ? cb(null, ...reducer(value)) : cb(null, value);\n } catch (err) {\n cb(err);\n }\n }, cb);\n } : fn;\n}\n\nexport default callbackify;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport buildURL from './../helpers/buildURL.js';\nimport {getProxyForUrl} from 'proxy-from-env';\nimport http from 'http';\nimport https from 'https';\nimport util from 'util';\nimport followRedirects from 'follow-redirects';\nimport zlib from 'zlib';\nimport {VERSION} from '../env/data.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport platform from '../platform/index.js';\nimport fromDataURI from '../helpers/fromDataURI.js';\nimport stream from 'stream';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport AxiosTransformStream from '../helpers/AxiosTransformStream.js';\nimport EventEmitter from 'events';\nimport formDataToStream from \"../helpers/formDataToStream.js\";\nimport readBlob from \"../helpers/readBlob.js\";\nimport ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';\nimport callbackify from \"../helpers/callbackify.js\";\n\nconst zlibOptions = {\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n};\n\nconst brotliOptions = {\n flush: zlib.constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH\n}\n\nconst isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);\n\nconst {http: httpFollow, https: httpsFollow} = followRedirects;\n\nconst isHttps = /https:?/;\n\nconst supportedProtocols = platform.protocols.map(protocol => {\n return protocol + ':';\n});\n\n/**\n * If the proxy or config beforeRedirects functions are defined, call them with the options\n * object.\n *\n * @param {Object<string, any>} options - The options object that was passed to the request.\n *\n * @returns {Object<string, any>}\n */\nfunction dispatchBeforeRedirect(options) {\n if (options.beforeRedirects.proxy) {\n options.beforeRedirects.proxy(options);\n }\n if (options.beforeRedirects.config) {\n options.beforeRedirects.config(options);\n }\n}\n\n/**\n * If the proxy or config afterRedirects functions are defined, call them with the options\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} configProxy configuration from Axios options object\n * @param {string} location\n *\n * @returns {http.ClientRequestArgs}\n */\nfunction setProxy(options, configProxy, location) {\n let proxy = configProxy;\n if (!proxy && proxy !== false) {\n const proxyUrl = getProxyForUrl(location);\n if (proxyUrl) {\n proxy = new URL(proxyUrl);\n }\n }\n if (proxy) {\n // Basic proxy authorization\n if (proxy.username) {\n proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');\n }\n\n if (proxy.auth) {\n // Support proxy auth object form\n if (proxy.auth.username || proxy.auth.password) {\n proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');\n }\n const base64 = Buffer\n .from(proxy.auth, 'utf8')\n .toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n\n options.headers.host = options.hostname + (options.port ? ':' + options.port : '');\n const proxyHost = proxy.hostname || proxy.host;\n options.hostname = proxyHost;\n // Replace 'host' since options is not a URL object\n options.host = proxyHost;\n options.port = proxy.port;\n options.path = location;\n if (proxy.protocol) {\n options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;\n }\n }\n\n options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {\n // Configure proxy for redirected request, passing the original config proxy to apply\n // the exact same logic as if the redirected request was performed by axios directly.\n setProxy(redirectOptions, configProxy, redirectOptions.href);\n };\n}\n\nconst isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';\n\n// temporary hotfix\n\nconst wrapAsync = (asyncExecutor) => {\n return new Promise((resolve, reject) => {\n let onDone;\n let isDone;\n\n const done = (value, isRejected) => {\n if (isDone) return;\n isDone = true;\n onDone && onDone(value, isRejected);\n }\n\n const _resolve = (value) => {\n done(value);\n resolve(value);\n };\n\n const _reject = (reason) => {\n done(reason, true);\n reject(reason);\n }\n\n asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);\n })\n};\n\nconst resolveFamily = ({address, family}) => {\n if (!utils.isString(address)) {\n throw TypeError('address must be a string');\n }\n return ({\n address,\n family: family || (address.indexOf('.') < 0 ? 6 : 4)\n });\n}\n\nconst buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});\n\n/*eslint consistent-return:0*/\nexport default isHttpAdapterSupported && function httpAdapter(config) {\n return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {\n let {data, lookup, family} = config;\n const {responseType, responseEncoding} = config;\n const method = config.method.toUpperCase();\n let isDone;\n let rejected = false;\n let req;\n\n if (lookup) {\n const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]);\n // hotfix to support opt.all option which is required for node 20.x\n lookup = (hostname, opt, cb) => {\n _lookup(hostname, opt, (err, arg0, arg1) => {\n const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];\n\n opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);\n });\n }\n }\n\n // temporary internal emitter until the AxiosRequest class will be implemented\n const emitter = new EventEmitter();\n\n const onFinished = () => {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(abort);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', abort);\n }\n\n emitter.removeAllListeners();\n }\n\n onDone((value, isRejected) => {\n isDone = true;\n if (isRejected) {\n rejected = true;\n onFinished();\n }\n });\n\n function abort(reason) {\n emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);\n }\n\n emitter.once('abort', reject);\n\n if (config.cancelToken || config.signal) {\n config.cancelToken && config.cancelToken.subscribe(abort);\n if (config.signal) {\n config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);\n }\n }\n\n // Parse url\n const fullPath = buildFullPath(config.baseURL, config.url);\n const parsed = new URL(fullPath, 'http://localhost');\n const protocol = parsed.protocol || supportedProtocols[0];\n\n if (protocol === 'data:') {\n let convertedData;\n\n if (method !== 'GET') {\n return settle(resolve, reject, {\n status: 405,\n statusText: 'method not allowed',\n headers: {},\n config\n });\n }\n\n try {\n convertedData = fromDataURI(config.url, responseType === 'blob', {\n Blob: config.env && config.env.Blob\n });\n } catch (err) {\n throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);\n }\n\n if (responseType === 'text') {\n convertedData = convertedData.toString(responseEncoding);\n\n if (!responseEncoding || responseEncoding === 'utf8') {\n convertedData = utils.stripBOM(convertedData);\n }\n } else if (responseType === 'stream') {\n convertedData = stream.Readable.from(convertedData);\n }\n\n return settle(resolve, reject, {\n data: convertedData,\n status: 200,\n statusText: 'OK',\n headers: new AxiosHeaders(),\n config\n });\n }\n\n if (supportedProtocols.indexOf(protocol) === -1) {\n return reject(new AxiosError(\n 'Unsupported protocol ' + protocol,\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n const headers = AxiosHeaders.from(config.headers).normalize();\n\n // Set User-Agent (required by some servers)\n // See https://github.com/axios/axios/issues/69\n // User-Agent is specified; handle case where no UA header is desired\n // Only set header if it hasn't been set in config\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const onDownloadProgress = config.onDownloadProgress;\n const onUploadProgress = config.onUploadProgress;\n const maxRate = config.maxRate;\n let maxUploadRate = undefined;\n let maxDownloadRate = undefined;\n\n // support for spec compliant FormData objects\n if (utils.isSpecCompliantForm(data)) {\n const userBoundary = headers.getContentType(/boundary=([-_\\w\\d]{10,70})/i);\n\n data = formDataToStream(data, (formHeaders) => {\n headers.set(formHeaders);\n }, {\n tag: `axios-${VERSION}-boundary`,\n boundary: userBoundary && userBoundary[1] || undefined\n });\n // support for https://www.npmjs.com/package/form-data api\n } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {\n headers.set(data.getHeaders());\n\n if (!headers.hasContentLength()) {\n try {\n const knownLength = await util.promisify(data.getLength).call(data);\n Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);\n /*eslint no-empty:0*/\n } catch (e) {\n }\n }\n } else if (utils.isBlob(data)) {\n data.size && headers.setContentType(data.type || 'application/octet-stream');\n headers.setContentLength(data.size || 0);\n data = stream.Readable.from(readBlob(data));\n } else if (data && !utils.isStream(data)) {\n if (Buffer.isBuffer(data)) {\n // Nothing to do...\n } else if (utils.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(new AxiosError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers.setContentLength(data.length, false);\n\n if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {\n return reject(new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n }\n\n const contentLength = utils.toFiniteNumber(headers.getContentLength());\n\n if (utils.isArray(maxRate)) {\n maxUploadRate = maxRate[0];\n maxDownloadRate = maxRate[1];\n } else {\n maxUploadRate = maxDownloadRate = maxRate;\n }\n\n if (data && (onUploadProgress || maxUploadRate)) {\n if (!utils.isStream(data)) {\n data = stream.Readable.from(data, {objectMode: false});\n }\n\n data = stream.pipeline([data, new AxiosTransformStream({\n length: contentLength,\n maxRate: utils.toFiniteNumber(maxUploadRate)\n })], utils.noop);\n\n onUploadProgress && data.on('progress', progress => {\n onUploadProgress(Object.assign(progress, {\n upload: true\n }));\n });\n }\n\n // HTTP basic authentication\n let auth = undefined;\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n if (!auth && parsed.username) {\n const urlUsername = parsed.username;\n const urlPassword = parsed.password;\n auth = urlUsername + ':' + urlPassword;\n }\n\n auth && headers.delete('authorization');\n\n let path;\n\n try {\n path = buildURL(\n parsed.pathname + parsed.search,\n config.params,\n config.paramsSerializer\n ).replace(/^\\?/, '');\n } catch (err) {\n const customErr = new Error(err.message);\n customErr.config = config;\n customErr.url = config.url;\n customErr.exists = true;\n return reject(customErr);\n }\n\n headers.set(\n 'Accept-Encoding',\n 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false\n );\n\n const options = {\n path,\n method: method,\n headers: headers.toJSON(),\n agents: { http: config.httpAgent, https: config.httpsAgent },\n auth,\n protocol,\n family,\n beforeRedirect: dispatchBeforeRedirect,\n beforeRedirects: {}\n };\n\n // cacheable-lookup integration hotfix\n !utils.isUndefined(lookup) && (options.lookup = lookup);\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname;\n options.port = parsed.port;\n setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n }\n\n let transport;\n const isHttpsRequest = isHttps.test(options.protocol);\n options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsRequest ? https : http;\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n if (config.beforeRedirect) {\n options.beforeRedirects.config = config.beforeRedirect;\n }\n transport = isHttpsRequest ? httpsFollow : httpFollow;\n }\n\n if (config.maxBodyLength > -1) {\n options.maxBodyLength = config.maxBodyLength;\n } else {\n // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited\n options.maxBodyLength = Infinity;\n }\n\n if (config.insecureHTTPParser) {\n options.insecureHTTPParser = config.insecureHTTPParser;\n }\n\n // Create the request\n req = transport.request(options, function handleResponse(res) {\n if (req.destroyed) return;\n\n const streams = [res];\n\n const responseLength = +res.headers['content-length'];\n\n if (onDownloadProgress) {\n const transformStream = new AxiosTransformStream({\n length: utils.toFiniteNumber(responseLength),\n maxRate: utils.toFiniteNumber(maxDownloadRate)\n });\n\n onDownloadProgress && transformStream.on('progress', progress => {\n onDownloadProgress(Object.assign(progress, {\n download: true\n }));\n });\n\n streams.push(transformStream);\n }\n\n // decompress the response body transparently if required\n let responseStream = res;\n\n // return the last request in case of redirects\n const lastRequest = res.req || req;\n\n // if decompress disabled we should not decompress\n if (config.decompress !== false && res.headers['content-encoding']) {\n // if no content, but headers still say that it is encoded,\n // remove the header not confuse downstream operations\n if (method === 'HEAD' || res.statusCode === 204) {\n delete res.headers['content-encoding'];\n }\n\n switch ((res.headers['content-encoding'] || '').toLowerCase()) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'x-gzip':\n case 'compress':\n case 'x-compress':\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib.createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'deflate':\n streams.push(new ZlibHeaderTransformStream());\n\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib.createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'br':\n if (isBrotliSupported) {\n streams.push(zlib.createBrotliDecompress(brotliOptions));\n delete res.headers['content-encoding'];\n }\n }\n }\n\n responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];\n\n const offListeners = stream.finished(responseStream, () => {\n offListeners();\n onFinished();\n });\n\n const response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: new AxiosHeaders(res.headers),\n config,\n request: lastRequest\n };\n\n if (responseType === 'stream') {\n response.data = responseStream;\n settle(resolve, reject, response);\n } else {\n const responseBuffer = [];\n let totalResponseBytes = 0;\n\n responseStream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n totalResponseBytes += chunk.length;\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n // stream.destroy() emit aborted event before calling reject() on Node.js v16\n rejected = true;\n responseStream.destroy();\n reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE, config, lastRequest));\n }\n });\n\n responseStream.on('aborted', function handlerStreamAborted() {\n if (rejected) {\n return;\n }\n\n const err = new AxiosError(\n 'maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n lastRequest\n );\n responseStream.destroy(err);\n reject(err);\n });\n\n responseStream.on('error', function handleStreamError(err) {\n if (req.destroyed) return;\n reject(AxiosError.from(err, null, config, lastRequest));\n });\n\n responseStream.on('end', function handleStreamEnd() {\n try {\n let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);\n if (responseType !== 'arraybuffer') {\n responseData = responseData.toString(responseEncoding);\n if (!responseEncoding || responseEncoding === 'utf8') {\n responseData = utils.stripBOM(responseData);\n }\n }\n response.data = responseData;\n } catch (err) {\n return reject(AxiosError.from(err, null, config, response.request, response));\n }\n settle(resolve, reject, response);\n });\n }\n\n emitter.once('abort', err => {\n if (!responseStream.destroyed) {\n responseStream.emit('error', err);\n responseStream.destroy();\n }\n });\n });\n\n emitter.once('abort', err => {\n reject(err);\n req.destroy(err);\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n // @todo remove\n // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;\n reject(AxiosError.from(err, null, config, req));\n });\n\n // set tcp keep alive to prevent drop connection by peer\n req.on('socket', function handleRequestSocket(socket) {\n // default interval of sending ack packet is 1 minute\n socket.setKeepAlive(true, 1000 * 60);\n });\n\n // Handle request timeout\n if (config.timeout) {\n // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n const timeout = parseInt(config.timeout, 10);\n\n if (Number.isNaN(timeout)) {\n reject(new AxiosError(\n 'error trying to parse `config.timeout` to int',\n AxiosError.ERR_BAD_OPTION_VALUE,\n config,\n req\n ));\n\n return;\n }\n\n // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n // And then these socket which be hang up will devouring CPU little by little.\n // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n req.setTimeout(timeout, function handleRequestTimeout() {\n if (isDone) return;\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n req\n ));\n abort();\n });\n }\n\n\n // Send the request\n if (utils.isStream(data)) {\n let ended = false;\n let errored = false;\n\n data.on('end', () => {\n ended = true;\n });\n\n data.once('error', err => {\n errored = true;\n req.destroy(err);\n });\n\n data.on('close', () => {\n if (!ended && !errored) {\n abort(new CanceledError('Request stream has been aborted', config, req));\n }\n });\n\n data.pipe(req);\n } else {\n req.end(data);\n }\n });\n}\n\nexport const __setProxy = setProxy;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n"],"names":["utils","prototype","PlatformFormData","encode","url","FormData","platform","defaults","AxiosHeaders","stream","TextEncoder","readBlob","Readable","zlib","followRedirects","getProxyForUrl","callbackify","EventEmitter","formDataToStream","util","AxiosTransformStream","https","http","ZlibHeaderTransformStream","validators","InterceptorManager","Axios","CancelToken","HttpStatusCode"],"mappings":";;;;;;;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AAG,QAAQ,CAAC,UAAU,CAAC;AACvC;AACA,KAAK,CAAC,cAAc,GAAG4B,gBAAc,CAAC;AACtC;AACA,KAAK,CAAC,OAAO,GAAG,KAAK;;;;"} \ No newline at end of file +{"version":3,"file":"axios.cjs","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/core/AxiosError.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/node/classes/URLSearchParams.js","../../lib/platform/node/index.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/helpers/formDataToJSON.js","../../lib/defaults/index.js","../../lib/helpers/parseHeaders.js","../../lib/core/AxiosHeaders.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/buildFullPath.js","../../lib/env/data.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/fromDataURI.js","../../lib/helpers/throttle.js","../../lib/helpers/speedometer.js","../../lib/helpers/AxiosTransformStream.js","../../lib/helpers/readBlob.js","../../lib/helpers/formDataToStream.js","../../lib/helpers/ZlibHeaderTransformStream.js","../../lib/helpers/callbackify.js","../../lib/adapters/http.js","../../lib/helpers/cookies.js","../../lib/helpers/isURLSameOrigin.js","../../lib/adapters/xhr.js","../../lib/adapters/adapters.js","../../lib/core/dispatchRequest.js","../../lib/core/mergeConfig.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js"],"sourcesContent":["'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport url from 'url';\nexport default url.URLSearchParams;\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\n\nexport default {\n isNode: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob: typeof Blob !== 'undefined' && Blob || null\n },\n protocols: [ 'http', 'https', 'file', 'data' ]\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","export const VERSION = \"1.6.5\";","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport parseProtocol from './parseProtocol.js';\nimport platform from '../platform/index.js';\n\nconst DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\\s\\S]*)$/;\n\n/**\n * Parse data uri to a Buffer or Blob\n *\n * @param {String} uri\n * @param {?Boolean} asBlob\n * @param {?Object} options\n * @param {?Function} options.Blob\n *\n * @returns {Buffer|Blob}\n */\nexport default function fromDataURI(uri, asBlob, options) {\n const _Blob = options && options.Blob || platform.classes.Blob;\n const protocol = parseProtocol(uri);\n\n if (asBlob === undefined && _Blob) {\n asBlob = true;\n }\n\n if (protocol === 'data') {\n uri = protocol.length ? uri.slice(protocol.length + 1) : uri;\n\n const match = DATA_URL_PATTERN.exec(uri);\n\n if (!match) {\n throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);\n }\n\n const mime = match[1];\n const isBase64 = match[2];\n const body = match[3];\n const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');\n\n if (asBlob) {\n if (!_Blob) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n return new _Blob([buffer], {type: mime});\n }\n\n return buffer;\n }\n\n throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);\n}\n","'use strict';\n\n/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n const threshold = 1000 / freq;\n let timer = null;\n return function throttled(force, args) {\n const now = Date.now();\n if (force || now - timestamp > threshold) {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n timestamp = now;\n return fn.apply(null, args);\n }\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n timestamp = Date.now();\n return fn.apply(null, args);\n }, threshold - (now - timestamp));\n }\n };\n}\n\nexport default throttle;\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\nimport stream from 'stream';\nimport utils from '../utils.js';\nimport throttle from './throttle.js';\nimport speedometer from './speedometer.js';\n\nconst kInternals = Symbol('internals');\n\nclass AxiosTransformStream extends stream.Transform{\n constructor(options) {\n options = utils.toFlatObject(options, {\n maxRate: 0,\n chunkSize: 64 * 1024,\n minChunkSize: 100,\n timeWindow: 500,\n ticksRate: 2,\n samplesCount: 15\n }, null, (prop, source) => {\n return !utils.isUndefined(source[prop]);\n });\n\n super({\n readableHighWaterMark: options.chunkSize\n });\n\n const self = this;\n\n const internals = this[kInternals] = {\n length: options.length,\n timeWindow: options.timeWindow,\n ticksRate: options.ticksRate,\n chunkSize: options.chunkSize,\n maxRate: options.maxRate,\n minChunkSize: options.minChunkSize,\n bytesSeen: 0,\n isCaptured: false,\n notifiedBytesLoaded: 0,\n ts: Date.now(),\n bytes: 0,\n onReadCallback: null\n };\n\n const _speedometer = speedometer(internals.ticksRate * options.samplesCount, internals.timeWindow);\n\n this.on('newListener', event => {\n if (event === 'progress') {\n if (!internals.isCaptured) {\n internals.isCaptured = true;\n }\n }\n });\n\n let bytesNotified = 0;\n\n internals.updateProgress = throttle(function throttledHandler() {\n const totalBytes = internals.length;\n const bytesTransferred = internals.bytesSeen;\n const progressBytes = bytesTransferred - bytesNotified;\n if (!progressBytes || self.destroyed) return;\n\n const rate = _speedometer(progressBytes);\n\n bytesNotified = bytesTransferred;\n\n process.nextTick(() => {\n self.emit('progress', {\n 'loaded': bytesTransferred,\n 'total': totalBytes,\n 'progress': totalBytes ? (bytesTransferred / totalBytes) : undefined,\n 'bytes': progressBytes,\n 'rate': rate ? rate : undefined,\n 'estimated': rate && totalBytes && bytesTransferred <= totalBytes ?\n (totalBytes - bytesTransferred) / rate : undefined\n });\n });\n }, internals.ticksRate);\n\n const onFinish = () => {\n internals.updateProgress(true);\n };\n\n this.once('end', onFinish);\n this.once('error', onFinish);\n }\n\n _read(size) {\n const internals = this[kInternals];\n\n if (internals.onReadCallback) {\n internals.onReadCallback();\n }\n\n return super._read(size);\n }\n\n _transform(chunk, encoding, callback) {\n const self = this;\n const internals = this[kInternals];\n const maxRate = internals.maxRate;\n\n const readableHighWaterMark = this.readableHighWaterMark;\n\n const timeWindow = internals.timeWindow;\n\n const divider = 1000 / timeWindow;\n const bytesThreshold = (maxRate / divider);\n const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0;\n\n function pushChunk(_chunk, _callback) {\n const bytes = Buffer.byteLength(_chunk);\n internals.bytesSeen += bytes;\n internals.bytes += bytes;\n\n if (internals.isCaptured) {\n internals.updateProgress();\n }\n\n if (self.push(_chunk)) {\n process.nextTick(_callback);\n } else {\n internals.onReadCallback = () => {\n internals.onReadCallback = null;\n process.nextTick(_callback);\n };\n }\n }\n\n const transformChunk = (_chunk, _callback) => {\n const chunkSize = Buffer.byteLength(_chunk);\n let chunkRemainder = null;\n let maxChunkSize = readableHighWaterMark;\n let bytesLeft;\n let passed = 0;\n\n if (maxRate) {\n const now = Date.now();\n\n if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) {\n internals.ts = now;\n bytesLeft = bytesThreshold - internals.bytes;\n internals.bytes = bytesLeft < 0 ? -bytesLeft : 0;\n passed = 0;\n }\n\n bytesLeft = bytesThreshold - internals.bytes;\n }\n\n if (maxRate) {\n if (bytesLeft <= 0) {\n // next time window\n return setTimeout(() => {\n _callback(null, _chunk);\n }, timeWindow - passed);\n }\n\n if (bytesLeft < maxChunkSize) {\n maxChunkSize = bytesLeft;\n }\n }\n\n if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) {\n chunkRemainder = _chunk.subarray(maxChunkSize);\n _chunk = _chunk.subarray(0, maxChunkSize);\n }\n\n pushChunk(_chunk, chunkRemainder ? () => {\n process.nextTick(_callback, null, chunkRemainder);\n } : _callback);\n };\n\n transformChunk(chunk, function transformNextChunk(err, _chunk) {\n if (err) {\n return callback(err);\n }\n\n if (_chunk) {\n transformChunk(_chunk, transformNextChunk);\n } else {\n callback(null);\n }\n });\n }\n\n setLength(length) {\n this[kInternals].length = +length;\n return this;\n }\n}\n\nexport default AxiosTransformStream;\n","const {asyncIterator} = Symbol;\n\nconst readBlob = async function* (blob) {\n if (blob.stream) {\n yield* blob.stream()\n } else if (blob.arrayBuffer) {\n yield await blob.arrayBuffer()\n } else if (blob[asyncIterator]) {\n yield* blob[asyncIterator]();\n } else {\n yield blob;\n }\n}\n\nexport default readBlob;\n","import {TextEncoder} from 'util';\nimport {Readable} from 'stream';\nimport utils from \"../utils.js\";\nimport readBlob from \"./readBlob.js\";\n\nconst BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';\n\nconst textEncoder = new TextEncoder();\n\nconst CRLF = '\\r\\n';\nconst CRLF_BYTES = textEncoder.encode(CRLF);\nconst CRLF_BYTES_COUNT = 2;\n\nclass FormDataPart {\n constructor(name, value) {\n const {escapeName} = this.constructor;\n const isStringValue = utils.isString(value);\n\n let headers = `Content-Disposition: form-data; name=\"${escapeName(name)}\"${\n !isStringValue && value.name ? `; filename=\"${escapeName(value.name)}\"` : ''\n }${CRLF}`;\n\n if (isStringValue) {\n value = textEncoder.encode(String(value).replace(/\\r?\\n|\\r\\n?/g, CRLF));\n } else {\n headers += `Content-Type: ${value.type || \"application/octet-stream\"}${CRLF}`\n }\n\n this.headers = textEncoder.encode(headers + CRLF);\n\n this.contentLength = isStringValue ? value.byteLength : value.size;\n\n this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;\n\n this.name = name;\n this.value = value;\n }\n\n async *encode(){\n yield this.headers;\n\n const {value} = this;\n\n if(utils.isTypedArray(value)) {\n yield value;\n } else {\n yield* readBlob(value);\n }\n\n yield CRLF_BYTES;\n }\n\n static escapeName(name) {\n return String(name).replace(/[\\r\\n\"]/g, (match) => ({\n '\\r' : '%0D',\n '\\n' : '%0A',\n '\"' : '%22',\n }[match]));\n }\n}\n\nconst formDataToStream = (form, headersHandler, options) => {\n const {\n tag = 'form-data-boundary',\n size = 25,\n boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)\n } = options || {};\n\n if(!utils.isFormData(form)) {\n throw TypeError('FormData instance required');\n }\n\n if (boundary.length < 1 || boundary.length > 70) {\n throw Error('boundary must be 10-70 characters long')\n }\n\n const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);\n const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);\n let contentLength = footerBytes.byteLength;\n\n const parts = Array.from(form.entries()).map(([name, value]) => {\n const part = new FormDataPart(name, value);\n contentLength += part.size;\n return part;\n });\n\n contentLength += boundaryBytes.byteLength * parts.length;\n\n contentLength = utils.toFiniteNumber(contentLength);\n\n const computedHeaders = {\n 'Content-Type': `multipart/form-data; boundary=${boundary}`\n }\n\n if (Number.isFinite(contentLength)) {\n computedHeaders['Content-Length'] = contentLength;\n }\n\n headersHandler && headersHandler(computedHeaders);\n\n return Readable.from((async function *() {\n for(const part of parts) {\n yield boundaryBytes;\n yield* part.encode();\n }\n\n yield footerBytes;\n })());\n};\n\nexport default formDataToStream;\n","\"use strict\";\n\nimport stream from \"stream\";\n\nclass ZlibHeaderTransformStream extends stream.Transform {\n __transform(chunk, encoding, callback) {\n this.push(chunk);\n callback();\n }\n\n _transform(chunk, encoding, callback) {\n if (chunk.length !== 0) {\n this._transform = this.__transform;\n\n // Add Default Compression headers if no zlib headers are present\n if (chunk[0] !== 120) { // Hex: 78\n const header = Buffer.alloc(2);\n header[0] = 120; // Hex: 78\n header[1] = 156; // Hex: 9C \n this.push(header, encoding);\n }\n }\n\n this.__transform(chunk, encoding, callback);\n }\n}\n\nexport default ZlibHeaderTransformStream;\n","import utils from \"../utils.js\";\n\nconst callbackify = (fn, reducer) => {\n return utils.isAsyncFn(fn) ? function (...args) {\n const cb = args.pop();\n fn.apply(this, args).then((value) => {\n try {\n reducer ? cb(null, ...reducer(value)) : cb(null, value);\n } catch (err) {\n cb(err);\n }\n }, cb);\n } : fn;\n}\n\nexport default callbackify;\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport buildURL from './../helpers/buildURL.js';\nimport {getProxyForUrl} from 'proxy-from-env';\nimport http from 'http';\nimport https from 'https';\nimport util from 'util';\nimport followRedirects from 'follow-redirects';\nimport zlib from 'zlib';\nimport {VERSION} from '../env/data.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport platform from '../platform/index.js';\nimport fromDataURI from '../helpers/fromDataURI.js';\nimport stream from 'stream';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport AxiosTransformStream from '../helpers/AxiosTransformStream.js';\nimport EventEmitter from 'events';\nimport formDataToStream from \"../helpers/formDataToStream.js\";\nimport readBlob from \"../helpers/readBlob.js\";\nimport ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';\nimport callbackify from \"../helpers/callbackify.js\";\n\nconst zlibOptions = {\n flush: zlib.constants.Z_SYNC_FLUSH,\n finishFlush: zlib.constants.Z_SYNC_FLUSH\n};\n\nconst brotliOptions = {\n flush: zlib.constants.BROTLI_OPERATION_FLUSH,\n finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH\n}\n\nconst isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);\n\nconst {http: httpFollow, https: httpsFollow} = followRedirects;\n\nconst isHttps = /https:?/;\n\nconst supportedProtocols = platform.protocols.map(protocol => {\n return protocol + ':';\n});\n\n/**\n * If the proxy or config beforeRedirects functions are defined, call them with the options\n * object.\n *\n * @param {Object<string, any>} options - The options object that was passed to the request.\n *\n * @returns {Object<string, any>}\n */\nfunction dispatchBeforeRedirect(options) {\n if (options.beforeRedirects.proxy) {\n options.beforeRedirects.proxy(options);\n }\n if (options.beforeRedirects.config) {\n options.beforeRedirects.config(options);\n }\n}\n\n/**\n * If the proxy or config afterRedirects functions are defined, call them with the options\n *\n * @param {http.ClientRequestArgs} options\n * @param {AxiosProxyConfig} configProxy configuration from Axios options object\n * @param {string} location\n *\n * @returns {http.ClientRequestArgs}\n */\nfunction setProxy(options, configProxy, location) {\n let proxy = configProxy;\n if (!proxy && proxy !== false) {\n const proxyUrl = getProxyForUrl(location);\n if (proxyUrl) {\n proxy = new URL(proxyUrl);\n }\n }\n if (proxy) {\n // Basic proxy authorization\n if (proxy.username) {\n proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');\n }\n\n if (proxy.auth) {\n // Support proxy auth object form\n if (proxy.auth.username || proxy.auth.password) {\n proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');\n }\n const base64 = Buffer\n .from(proxy.auth, 'utf8')\n .toString('base64');\n options.headers['Proxy-Authorization'] = 'Basic ' + base64;\n }\n\n options.headers.host = options.hostname + (options.port ? ':' + options.port : '');\n const proxyHost = proxy.hostname || proxy.host;\n options.hostname = proxyHost;\n // Replace 'host' since options is not a URL object\n options.host = proxyHost;\n options.port = proxy.port;\n options.path = location;\n if (proxy.protocol) {\n options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;\n }\n }\n\n options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {\n // Configure proxy for redirected request, passing the original config proxy to apply\n // the exact same logic as if the redirected request was performed by axios directly.\n setProxy(redirectOptions, configProxy, redirectOptions.href);\n };\n}\n\nconst isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';\n\n// temporary hotfix\n\nconst wrapAsync = (asyncExecutor) => {\n return new Promise((resolve, reject) => {\n let onDone;\n let isDone;\n\n const done = (value, isRejected) => {\n if (isDone) return;\n isDone = true;\n onDone && onDone(value, isRejected);\n }\n\n const _resolve = (value) => {\n done(value);\n resolve(value);\n };\n\n const _reject = (reason) => {\n done(reason, true);\n reject(reason);\n }\n\n asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);\n })\n};\n\nconst resolveFamily = ({address, family}) => {\n if (!utils.isString(address)) {\n throw TypeError('address must be a string');\n }\n return ({\n address,\n family: family || (address.indexOf('.') < 0 ? 6 : 4)\n });\n}\n\nconst buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family});\n\n/*eslint consistent-return:0*/\nexport default isHttpAdapterSupported && function httpAdapter(config) {\n return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {\n let {data, lookup, family} = config;\n const {responseType, responseEncoding} = config;\n const method = config.method.toUpperCase();\n let isDone;\n let rejected = false;\n let req;\n\n if (lookup) {\n const _lookup = callbackify(lookup, (value) => utils.isArray(value) ? value : [value]);\n // hotfix to support opt.all option which is required for node 20.x\n lookup = (hostname, opt, cb) => {\n _lookup(hostname, opt, (err, arg0, arg1) => {\n if (err) {\n return cb(err);\n }\n\n const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];\n\n opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);\n });\n }\n }\n\n // temporary internal emitter until the AxiosRequest class will be implemented\n const emitter = new EventEmitter();\n\n const onFinished = () => {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(abort);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', abort);\n }\n\n emitter.removeAllListeners();\n }\n\n onDone((value, isRejected) => {\n isDone = true;\n if (isRejected) {\n rejected = true;\n onFinished();\n }\n });\n\n function abort(reason) {\n emitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);\n }\n\n emitter.once('abort', reject);\n\n if (config.cancelToken || config.signal) {\n config.cancelToken && config.cancelToken.subscribe(abort);\n if (config.signal) {\n config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);\n }\n }\n\n // Parse url\n const fullPath = buildFullPath(config.baseURL, config.url);\n const parsed = new URL(fullPath, 'http://localhost');\n const protocol = parsed.protocol || supportedProtocols[0];\n\n if (protocol === 'data:') {\n let convertedData;\n\n if (method !== 'GET') {\n return settle(resolve, reject, {\n status: 405,\n statusText: 'method not allowed',\n headers: {},\n config\n });\n }\n\n try {\n convertedData = fromDataURI(config.url, responseType === 'blob', {\n Blob: config.env && config.env.Blob\n });\n } catch (err) {\n throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);\n }\n\n if (responseType === 'text') {\n convertedData = convertedData.toString(responseEncoding);\n\n if (!responseEncoding || responseEncoding === 'utf8') {\n convertedData = utils.stripBOM(convertedData);\n }\n } else if (responseType === 'stream') {\n convertedData = stream.Readable.from(convertedData);\n }\n\n return settle(resolve, reject, {\n data: convertedData,\n status: 200,\n statusText: 'OK',\n headers: new AxiosHeaders(),\n config\n });\n }\n\n if (supportedProtocols.indexOf(protocol) === -1) {\n return reject(new AxiosError(\n 'Unsupported protocol ' + protocol,\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n const headers = AxiosHeaders.from(config.headers).normalize();\n\n // Set User-Agent (required by some servers)\n // See https://github.com/axios/axios/issues/69\n // User-Agent is specified; handle case where no UA header is desired\n // Only set header if it hasn't been set in config\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const onDownloadProgress = config.onDownloadProgress;\n const onUploadProgress = config.onUploadProgress;\n const maxRate = config.maxRate;\n let maxUploadRate = undefined;\n let maxDownloadRate = undefined;\n\n // support for spec compliant FormData objects\n if (utils.isSpecCompliantForm(data)) {\n const userBoundary = headers.getContentType(/boundary=([-_\\w\\d]{10,70})/i);\n\n data = formDataToStream(data, (formHeaders) => {\n headers.set(formHeaders);\n }, {\n tag: `axios-${VERSION}-boundary`,\n boundary: userBoundary && userBoundary[1] || undefined\n });\n // support for https://www.npmjs.com/package/form-data api\n } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {\n headers.set(data.getHeaders());\n\n if (!headers.hasContentLength()) {\n try {\n const knownLength = await util.promisify(data.getLength).call(data);\n Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);\n /*eslint no-empty:0*/\n } catch (e) {\n }\n }\n } else if (utils.isBlob(data)) {\n data.size && headers.setContentType(data.type || 'application/octet-stream');\n headers.setContentLength(data.size || 0);\n data = stream.Readable.from(readBlob(data));\n } else if (data && !utils.isStream(data)) {\n if (Buffer.isBuffer(data)) {\n // Nothing to do...\n } else if (utils.isArrayBuffer(data)) {\n data = Buffer.from(new Uint8Array(data));\n } else if (utils.isString(data)) {\n data = Buffer.from(data, 'utf-8');\n } else {\n return reject(new AxiosError(\n 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n\n // Add Content-Length header if data exists\n headers.setContentLength(data.length, false);\n\n if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {\n return reject(new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config\n ));\n }\n }\n\n const contentLength = utils.toFiniteNumber(headers.getContentLength());\n\n if (utils.isArray(maxRate)) {\n maxUploadRate = maxRate[0];\n maxDownloadRate = maxRate[1];\n } else {\n maxUploadRate = maxDownloadRate = maxRate;\n }\n\n if (data && (onUploadProgress || maxUploadRate)) {\n if (!utils.isStream(data)) {\n data = stream.Readable.from(data, {objectMode: false});\n }\n\n data = stream.pipeline([data, new AxiosTransformStream({\n length: contentLength,\n maxRate: utils.toFiniteNumber(maxUploadRate)\n })], utils.noop);\n\n onUploadProgress && data.on('progress', progress => {\n onUploadProgress(Object.assign(progress, {\n upload: true\n }));\n });\n }\n\n // HTTP basic authentication\n let auth = undefined;\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password || '';\n auth = username + ':' + password;\n }\n\n if (!auth && parsed.username) {\n const urlUsername = parsed.username;\n const urlPassword = parsed.password;\n auth = urlUsername + ':' + urlPassword;\n }\n\n auth && headers.delete('authorization');\n\n let path;\n\n try {\n path = buildURL(\n parsed.pathname + parsed.search,\n config.params,\n config.paramsSerializer\n ).replace(/^\\?/, '');\n } catch (err) {\n const customErr = new Error(err.message);\n customErr.config = config;\n customErr.url = config.url;\n customErr.exists = true;\n return reject(customErr);\n }\n\n headers.set(\n 'Accept-Encoding',\n 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false\n );\n\n const options = {\n path,\n method: method,\n headers: headers.toJSON(),\n agents: { http: config.httpAgent, https: config.httpsAgent },\n auth,\n protocol,\n family,\n beforeRedirect: dispatchBeforeRedirect,\n beforeRedirects: {}\n };\n\n // cacheable-lookup integration hotfix\n !utils.isUndefined(lookup) && (options.lookup = lookup);\n\n if (config.socketPath) {\n options.socketPath = config.socketPath;\n } else {\n options.hostname = parsed.hostname;\n options.port = parsed.port;\n setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);\n }\n\n let transport;\n const isHttpsRequest = isHttps.test(options.protocol);\n options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;\n if (config.transport) {\n transport = config.transport;\n } else if (config.maxRedirects === 0) {\n transport = isHttpsRequest ? https : http;\n } else {\n if (config.maxRedirects) {\n options.maxRedirects = config.maxRedirects;\n }\n if (config.beforeRedirect) {\n options.beforeRedirects.config = config.beforeRedirect;\n }\n transport = isHttpsRequest ? httpsFollow : httpFollow;\n }\n\n if (config.maxBodyLength > -1) {\n options.maxBodyLength = config.maxBodyLength;\n } else {\n // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited\n options.maxBodyLength = Infinity;\n }\n\n if (config.insecureHTTPParser) {\n options.insecureHTTPParser = config.insecureHTTPParser;\n }\n\n // Create the request\n req = transport.request(options, function handleResponse(res) {\n if (req.destroyed) return;\n\n const streams = [res];\n\n const responseLength = +res.headers['content-length'];\n\n if (onDownloadProgress) {\n const transformStream = new AxiosTransformStream({\n length: utils.toFiniteNumber(responseLength),\n maxRate: utils.toFiniteNumber(maxDownloadRate)\n });\n\n onDownloadProgress && transformStream.on('progress', progress => {\n onDownloadProgress(Object.assign(progress, {\n download: true\n }));\n });\n\n streams.push(transformStream);\n }\n\n // decompress the response body transparently if required\n let responseStream = res;\n\n // return the last request in case of redirects\n const lastRequest = res.req || req;\n\n // if decompress disabled we should not decompress\n if (config.decompress !== false && res.headers['content-encoding']) {\n // if no content, but headers still say that it is encoded,\n // remove the header not confuse downstream operations\n if (method === 'HEAD' || res.statusCode === 204) {\n delete res.headers['content-encoding'];\n }\n\n switch ((res.headers['content-encoding'] || '').toLowerCase()) {\n /*eslint default-case:0*/\n case 'gzip':\n case 'x-gzip':\n case 'compress':\n case 'x-compress':\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib.createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'deflate':\n streams.push(new ZlibHeaderTransformStream());\n\n // add the unzipper to the body stream processing pipeline\n streams.push(zlib.createUnzip(zlibOptions));\n\n // remove the content-encoding in order to not confuse downstream operations\n delete res.headers['content-encoding'];\n break;\n case 'br':\n if (isBrotliSupported) {\n streams.push(zlib.createBrotliDecompress(brotliOptions));\n delete res.headers['content-encoding'];\n }\n }\n }\n\n responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];\n\n const offListeners = stream.finished(responseStream, () => {\n offListeners();\n onFinished();\n });\n\n const response = {\n status: res.statusCode,\n statusText: res.statusMessage,\n headers: new AxiosHeaders(res.headers),\n config,\n request: lastRequest\n };\n\n if (responseType === 'stream') {\n response.data = responseStream;\n settle(resolve, reject, response);\n } else {\n const responseBuffer = [];\n let totalResponseBytes = 0;\n\n responseStream.on('data', function handleStreamData(chunk) {\n responseBuffer.push(chunk);\n totalResponseBytes += chunk.length;\n\n // make sure the content length is not over the maxContentLength if specified\n if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {\n // stream.destroy() emit aborted event before calling reject() on Node.js v16\n rejected = true;\n responseStream.destroy();\n reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE, config, lastRequest));\n }\n });\n\n responseStream.on('aborted', function handlerStreamAborted() {\n if (rejected) {\n return;\n }\n\n const err = new AxiosError(\n 'maxContentLength size of ' + config.maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n lastRequest\n );\n responseStream.destroy(err);\n reject(err);\n });\n\n responseStream.on('error', function handleStreamError(err) {\n if (req.destroyed) return;\n reject(AxiosError.from(err, null, config, lastRequest));\n });\n\n responseStream.on('end', function handleStreamEnd() {\n try {\n let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);\n if (responseType !== 'arraybuffer') {\n responseData = responseData.toString(responseEncoding);\n if (!responseEncoding || responseEncoding === 'utf8') {\n responseData = utils.stripBOM(responseData);\n }\n }\n response.data = responseData;\n } catch (err) {\n return reject(AxiosError.from(err, null, config, response.request, response));\n }\n settle(resolve, reject, response);\n });\n }\n\n emitter.once('abort', err => {\n if (!responseStream.destroyed) {\n responseStream.emit('error', err);\n responseStream.destroy();\n }\n });\n });\n\n emitter.once('abort', err => {\n reject(err);\n req.destroy(err);\n });\n\n // Handle errors\n req.on('error', function handleRequestError(err) {\n // @todo remove\n // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return;\n reject(AxiosError.from(err, null, config, req));\n });\n\n // set tcp keep alive to prevent drop connection by peer\n req.on('socket', function handleRequestSocket(socket) {\n // default interval of sending ack packet is 1 minute\n socket.setKeepAlive(true, 1000 * 60);\n });\n\n // Handle request timeout\n if (config.timeout) {\n // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.\n const timeout = parseInt(config.timeout, 10);\n\n if (Number.isNaN(timeout)) {\n reject(new AxiosError(\n 'error trying to parse `config.timeout` to int',\n AxiosError.ERR_BAD_OPTION_VALUE,\n config,\n req\n ));\n\n return;\n }\n\n // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.\n // And timer callback will be fired, and abort() will be invoked before connection, then get \"socket hang up\" and code ECONNRESET.\n // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.\n // And then these socket which be hang up will devouring CPU little by little.\n // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.\n req.setTimeout(timeout, function handleRequestTimeout() {\n if (isDone) return;\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n req\n ));\n abort();\n });\n }\n\n\n // Send the request\n if (utils.isStream(data)) {\n let ended = false;\n let errored = false;\n\n data.on('end', () => {\n ended = true;\n });\n\n data.once('error', err => {\n errored = true;\n req.destroy(err);\n });\n\n data.on('close', () => {\n if (!ended && !errored) {\n abort(new CanceledError('Request stream has been aborted', config, req));\n }\n });\n\n data.pipe(req);\n } else {\n req.end(data);\n }\n });\n}\n\nexport const __setProxy = setProxy;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n"],"names":["utils","prototype","PlatformFormData","encode","url","FormData","platform","defaults","AxiosHeaders","stream","TextEncoder","readBlob","Readable","zlib","followRedirects","getProxyForUrl","callbackify","EventEmitter","formDataToStream","util","AxiosTransformStream","https","http","ZlibHeaderTransformStream","validators","InterceptorManager","Axios","CancelToken","HttpStatusCode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEe,SAAS,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE;AAC1C,EAAE,OAAO,SAAS,IAAI,GAAG;AACzB,IAAI,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;AACxC,GAAG,CAAC;AACJ;;ACFA;AACA;AACA,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC;AACpC,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC;AAChC;AACA,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,KAAK,IAAI;AAClC,IAAI,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrC,IAAI,OAAO,KAAK,CAAC,GAAG,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AK,GAAGmB,OAAK,CAAC;AACpB;AACA;AACA,KAAK,CAAC,aAAa,GAAG,aAAa,CAAC;AACpC,KAAK,CAAC,WAAW,GAAGC,aAAW,CAAC;AAChC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC1B,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AACxB,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;AAC9B;AACA;AACA,KAAK,CAAC,UAAU,GAAG,UAAU,CAAC;AAC9B;AACA;AACA,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;AACnC;AACA;AACA,KAAK,CAAC,GAAG,GAAG,SAAS,GAAG,CAAC,QAAQ,EAAE;AACnC,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC,CAAC;AACF;AACA,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AACtB;AACA;AACA,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;AAClC;AACA;AACA,KAAK,CAAC,WAAW,GAAG,WAAW,CAAC;AAChC;AACA,KAAK,CAAC,YAAY,GAAGnB,cAAY,CAAC;AAClC;AACA,KAAK,CAAC,UAAU,GAAG,KAAK,IAAI,cAAc,CAACR,OAAK,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC;AAClG;AACA,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;AACvC;AACA,KAAK,CAAC,cAAc,GAAG4B,gBAAc,CAAC;AACtC;AACA,KAAK,CAAC,OAAO,GAAG,KAAK;;;;"} \ No newline at end of file diff --git a/node_modules/axios/lib/adapters/http.js b/node_modules/axios/lib/adapters/http.js index 03f0f96e..78255d24 100644 --- a/node_modules/axios/lib/adapters/http.js +++ b/node_modules/axios/lib/adapters/http.js @@ -171,6 +171,10 @@ export default isHttpAdapterSupported && function httpAdapter(config) { // hotfix to support opt.all option which is required for node 20.x lookup = (hostname, opt, cb) => { _lookup(hostname, opt, (err, arg0, arg1) => { + if (err) { + return cb(err); + } + const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); diff --git a/node_modules/axios/lib/env/data.js b/node_modules/axios/lib/env/data.js index 23d2dab6..ea9c0467 100644 --- a/node_modules/axios/lib/env/data.js +++ b/node_modules/axios/lib/env/data.js @@ -1 +1 @@ -export const VERSION = "1.6.3"; \ No newline at end of file +export const VERSION = "1.6.5"; \ No newline at end of file diff --git a/node_modules/axios/lib/helpers/formDataToJSON.js b/node_modules/axios/lib/helpers/formDataToJSON.js index f4581df4..906ce602 100644 --- a/node_modules/axios/lib/helpers/formDataToJSON.js +++ b/node_modules/axios/lib/helpers/formDataToJSON.js @@ -49,6 +49,9 @@ function arrayToObject(arr) { function formDataToJSON(formData) { function buildPath(path, value, target, index) { let name = path[index++]; + + if (name === '__proto__') return true; + const isNumericKey = Number.isFinite(+name); const isLast = index >= path.length; name = !name && utils.isArray(target) ? target.length : name; diff --git a/node_modules/axios/package.json b/node_modules/axios/package.json index cd9156c5..02c2bfd1 100644 --- a/node_modules/axios/package.json +++ b/node_modules/axios/package.json @@ -1,6 +1,6 @@ { "name": "axios", - "version": "1.6.3", + "version": "1.6.5", "description": "Promise based HTTP client for the browser and node.js", "main": "index.js", "exports": { @@ -146,7 +146,7 @@ "unpkg": "dist/axios.min.js", "typings": "./index.d.ts", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" }, diff --git a/node_modules/csstype/README.md b/node_modules/csstype/README.md index c17d7c75..75947e1b 100644 --- a/node_modules/csstype/README.md +++ b/node_modules/csstype/README.md @@ -4,8 +4,10 @@ TypeScript and Flow definitions for CSS, generated by [data from MDN](https://github.com/mdn/data). It provides autocompletion and type checking for CSS properties and values. +**TypeScript** + ```ts -import * as CSS from 'csstype'; +import type * as CSS from 'csstype'; const style: CSS.Properties = { colour: 'white', // Type error on property @@ -13,12 +15,24 @@ const style: CSS.Properties = { }; ``` +**Flow** + +```js +// @flow strict +import * as CSS from 'csstype'; + +const style: CSS.Properties<> = { + colour: 'white', // Type error on property + textAlign: 'middle', // Type error on value +}; +``` + +_Further examples below will be in TypeScript!_ + ## Getting started ```sh $ npm install csstype -$ # or -$ yarn add csstype ``` ## Table of content @@ -26,18 +40,16 @@ $ yarn add csstype - [Style types](#style-types) - [At-rule types](#at-rule-types) - [Pseudo types](#pseudo-types) +- [Generics](#generics) - [Usage](#usage) - [What should I do when I get type errors?](#what-should-i-do-when-i-get-type-errors) -- [Version 2.0](#version-20) +- [Version 3.0](#version-30) - [Contributing](#contributing) - - [Commands](#commands) ## Style types Properties are categorized in different uses and in several technical variations to provide typings that suits as many as possible. -All interfaces has one optional generic argument to define length. It defaults to `string | 0` because `0` is the only [length where the unit identifier is optional](https://drafts.csswg.org/css-values-3/#lengths). You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit. - | | Default | `Hyphen` | `Fallback` | `HyphenFallback` | | -------------- | -------------------- | -------------------------- | ---------------------------- | ---------------------------------- | | **All** | `Properties` | `PropertiesHyphen` | `PropertiesFallback` | `PropertiesHyphenFallback` | @@ -64,11 +76,13 @@ Variations: At-rule interfaces with descriptors. +**TypeScript**: These will be found in the `AtRule` namespace, e.g. `AtRule.Viewport`. +**Flow**: These will be prefixed with `AtRule$`, e.g. `AtRule$Viewport`. + | | Default | `Hyphen` | `Fallback` | `HyphenFallback` | | -------------------- | -------------- | -------------------- | ---------------------- | ---------------------------- | | **`@counter-style`** | `CounterStyle` | `CounterStyleHyphen` | `CounterStyleFallback` | `CounterStyleHyphenFallback` | | **`@font-face`** | `FontFace` | `FontFaceHyphen` | `FontFaceFallback` | `FontFaceHyphenFallback` | -| **`@page`** | `Page` | `PageHyphen` | `PageFallback` | `PageHyphenFallback` | | **`@viewport`** | `Viewport` | `ViewportHyphen` | `ViewportFallback` | `ViewportHyphenFallback` | ## Pseudo types @@ -87,23 +101,38 @@ String literals of pseudo classes and pseudo elements Plain pseudos e.g. `:hover` that can only be **one** variation. +## Generics + +All interfaces has two optional generic argument to define length and time: `CSS.Properties<TLength = string | 0, TTime = string>` + +- **Length** is the first generic parameter and defaults to `string | 0` because `0` is the only [length where the unit identifier is optional](https://drafts.csswg.org/css-values-3/#lengths). You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit. + ```tsx + const style: CSS.Properties<string | number> = { + width: 100, + }; + ``` +- **Time** is the second generic argument and defaults to `string`. You can specify this, e.g. `string | number`, for platforms and libraries that accepts any numeric value as length with a specific unit. + ```tsx + const style: CSS.Properties<string | number, number> = { + transitionDuration: 1000, + }; + ``` + ## Usage -Length defaults to `string | 0`. But it's possible to override it using generics. - ```ts -import * as CSS from 'csstype'; +import type * as CSS from 'csstype'; -const style: CSS.Properties<string | number> = { - padding: 10, - margin: '1rem', +const style: CSS.Properties = { + width: '10px', + margin: '1em', }; ``` In some cases, like for CSS-in-JS libraries, an array of values is a way to provide fallback values in CSS. Using `CSS.PropertiesFallback` instead of `CSS.Properties` will add the possibility to use any property value as an array of values. ```ts -import * as CSS from 'csstype'; +import type * as CSS from 'csstype'; const style: CSS.PropertiesFallback = { display: ['-webkit-flex', 'flex'], @@ -114,7 +143,7 @@ const style: CSS.PropertiesFallback = { There's even string literals for pseudo selectors and elements. ```ts -import * as CSS from 'csstype'; +import type * as CSS from 'csstype'; const pseudos: { [P in CSS.SimplePseudos]?: CSS.Properties } = { ':hover': { @@ -126,7 +155,7 @@ const pseudos: { [P in CSS.SimplePseudos]?: CSS.Properties } = { Hyphen cased (kebab cased) properties are provided in `CSS.PropertiesHyphen` and `CSS.PropertiesHyphenFallback`. It's not **not** added by default in `CSS.Properties`. To allow both of them, you can simply extend with `CSS.PropertiesHyphen` or/and `CSS.PropertiesHyphenFallback`. ```ts -import * as CSS from 'csstype'; +import type * as CSS from 'csstype'; interface Style extends CSS.Properties, CSS.PropertiesHyphen {} @@ -138,6 +167,21 @@ const style: Style = { }; ``` +Adding type checked CSS properties to a `HTMLElement`. + +```ts +import type * as CSS from 'csstype'; + +const style: CSS.Properties = { + color: 'red', + margin: '1em', +}; + +let button = document.createElement('button'); + +Object.assign(button.style, style); +``` + ## What should I do when I get type errors? The goal is to have as perfect types as possible and we're trying to do our best. But with CSS Custom Properties, the CSS specification changing frequently and vendors implementing their own specifications with new releases sometimes causes type errors even if it should work. Here's some steps you could take to get it fixed: @@ -147,7 +191,7 @@ _If you're using CSS Custom Properties you can step directly to step 3._ 1. **First of all, make sure you're doing it right.** A type error could also indicate that you're not :wink: - Some CSS specs that some vendors has implemented could have been officially rejected or haven't yet received any official acceptance and are therefor not included - - If you're using TypeScript, [type widening](https://blog.mariusschulz.com/2017/02/04/typescript-2-1-literal-type-widening) could be the reason you get `Type 'string' is not assignable to...` errors + - If you're using TypeScript, [type widening](https://blog.mariusschulz.com/2017/02/04/TypeScript-2-1-literal-type-widening) could be the reason you get `Type 'string' is not assignable to...` errors 2. **Have a look in [issues](https://github.com/frenic/csstype/issues) to see if an issue already has been filed. If not, create a new one.** To help us out, please refer to any information you have found. 3. Fix the issue locally with **TypeScript** (Flow further down): @@ -156,7 +200,7 @@ _If you're using CSS Custom Properties you can step directly to step 3._ ```ts // My css.d.ts file - import * as CSS from 'csstype'; + import type * as CSS from 'csstype'; declare module 'csstype' { interface Properties { @@ -166,6 +210,12 @@ _If you're using CSS Custom Properties you can step directly to step 3._ // Add a CSS Custom Property '--theme-color'?: 'black' | 'white'; + // Allow namespaced CSS Custom Properties + [index: `--theme-${string}`]: any; + + // Allow any CSS Custom Properties + [index: `--${string}`]: any; + // ...or allow any other property [index: string]: any; } @@ -198,15 +248,22 @@ _If you're using CSS Custom Properties you can step directly to step 3._ }; ``` -## Version 2.0 +## Version 3.0 -The casing of CSS vendor properties are changed matching the casing of prefixes in Javascript. So all of them are capitalized except for `ms`. - -- `msOverflowStyle` is still `msOverflowStyle` -- `mozAppearance` is now `MozAppearance` -- `webkitOverflowScrolling` is now `WebkitOverflowScrolling` - -More info: https://www.andismith.com/blogs/2012/02/modernizr-prefixed/ +- **All property types are exposed with namespace** + TypeScript: `Property.AlignContent` (was `AlignContentProperty` before) + Flow: `Property$AlignContent` +- **All at-rules are exposed with namespace** + TypeScript: `AtRule.FontFace` (was `FontFace` before) + Flow: `AtRule$FontFace` +- **Data types are NOT exposed** + E.g. `Color` and `Box`. Because the generation of data types may suddenly be removed or renamed. +- **TypeScript hack for autocompletion** + Uses `(string & {})` for literal string unions and `(number & {})` for literal number unions ([related issue](https://github.com/microsoft/TypeScript/issues/29729)). Utilize `PropertyValue<T>` to unpack types from e.g. `(string & {})` to `string`. +- **New generic for time** + Read more on the ["Generics"](#generics) section. +- **Flow types improvements** + Flow Strict enabled and exact types are used. ## Contributing diff --git a/node_modules/csstype/index.d.ts b/node_modules/csstype/index.d.ts index d30e8786..b466d21a 100644 --- a/node_modules/csstype/index.d.ts +++ b/node_modules/csstype/index.d.ts @@ -1,6 +1,16 @@ -export interface StandardLonghandProperties<TLength = string | 0> { +export {}; + +export type PropertyValue<TValue> = TValue extends Array<infer AValue> + ? Array<AValue extends infer TUnpacked & {} ? TUnpacked : AValue> + : TValue extends infer TUnpacked & {} + ? TUnpacked + : TValue; + +export type Fallback<T> = { [P in keyof T]: T[P] | readonly NonNullable<T[P]>[] }; + +export interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> { /** - * The **`accent-color`** CSS property sets the color of the elements accent. An accent appears in elements such as `<input>` of `type="checkbox"`, or `type="radio"`. + * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements. * * **Syntax**: `auto | <color>` * @@ -12,9 +22,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/accent-color */ - accentColor?: AccentColorProperty; + accentColor?: Property.AccentColor | undefined; /** - * The CSS **`align-content`** property sets how the browser distributes space between and around content items along the cross-axis of a flexbox container, and the main-axis of a grid container. + * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. * * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` * @@ -27,9 +37,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/align-content */ - alignContent?: AlignContentProperty; + alignContent?: Property.AlignContent | undefined; /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. The align-self property sets the alignment of an item within its containing block. In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment of items on the Block Axis within their grid area. + * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. * * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` * @@ -42,9 +52,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/align-items */ - alignItems?: AlignItemsProperty; + alignItems?: Property.AlignItems | undefined; /** - * The **`align-self`** CSS property aligns flex items of the current flex line overriding the `align-items` value. If any of the item's cross-axis margin is set to `auto`, then `align-self` is ignored. In Grid layout `align-self` aligns the item inside the grid area. + * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. * * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` * @@ -57,9 +67,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/align-self */ - alignSelf?: AlignSelfProperty; + alignSelf?: Property.AlignSelf | undefined; /** - * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. + * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. * * **Syntax**: `[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#` * @@ -71,7 +81,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks */ - alignTracks?: AlignTracksProperty; + alignTracks?: Property.AlignTracks | undefined; /** * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. * @@ -79,15 +89,15 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `replace` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **112** | **115** | **16** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition */ - animationComposition?: GlobalsString; + animationComposition?: Property.AnimationComposition | undefined; /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. * * **Syntax**: `<time>#` * @@ -100,9 +110,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-delay */ - animationDelay?: GlobalsString; + animationDelay?: Property.AnimationDelay<TTime> | undefined; /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. * * **Syntax**: `<single-animation-direction>#` * @@ -115,7 +125,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-direction */ - animationDirection?: AnimationDirectionProperty; + animationDirection?: Property.AnimationDirection | undefined; /** * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. * @@ -130,7 +140,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-duration */ - animationDuration?: GlobalsString; + animationDuration?: Property.AnimationDuration<TTime> | undefined; /** * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. * @@ -145,9 +155,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode */ - animationFillMode?: AnimationFillModeProperty; + animationFillMode?: Property.AnimationFillMode | undefined; /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. * * **Syntax**: `<single-animation-iteration-count>#` * @@ -160,9 +170,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count */ - animationIterationCount?: AnimationIterationCountProperty; + animationIterationCount?: Property.AnimationIterationCount | undefined; /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. * * **Syntax**: `[ none | <keyframes-name> ]#` * @@ -175,7 +185,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-name */ - animationName?: AnimationNameProperty; + animationName?: Property.AnimationName | undefined; /** * The **`animation-play-state`** CSS property sets whether an animation is running or paused. * @@ -190,23 +200,51 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-play-state */ - animationPlayState?: AnimationPlayStateProperty; + animationPlayState?: Property.AnimationPlayState | undefined; /** - * The **`animation-timeline`** CSS property specifies the names of one or more `@scroll-timeline` at-rules describing the scroll animations to apply to the element. + * The **`animation-range-end`** CSS property is used to set the end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will end. + * + * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-end + */ + animationRangeEnd?: Property.AnimationRangeEnd<TLength> | undefined; + /** + * The **`animation-range-start`** CSS property is used to set the start of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start. + * + * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-start + */ + animationRangeStart?: Property.AnimationRangeStart<TLength> | undefined; + /** + * The **`animation-timeline`** CSS property specifies the timeline that is used to control the progress of an animation. * * **Syntax**: `<single-animation-timeline>#` * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/animation-timeline */ - animationTimeline?: AnimationTimelineProperty; + animationTimeline?: Property.AnimationTimeline | undefined; /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. * * **Syntax**: `<easing-function>#` * @@ -219,9 +257,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-timing-function */ - animationTimingFunction?: AnimationTimingFunctionProperty; + animationTimingFunction?: Property.AnimationTimingFunction | undefined; /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. * * **Syntax**: `none | auto | textfield | menulist-button | <compat-auto>` * @@ -234,9 +272,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/appearance */ - appearance?: AppearanceProperty; + appearance?: Property.Appearance | undefined; /** - * The **`aspect-ratio`**   CSS property sets a _**preferred aspect ratio**_ for the box, which will be used in the calculation of auto sizes and some other layout functions. + * The **`aspect-ratio`** CSS property sets a **preferred aspect ratio** for the box, which will be used in the calculation of auto sizes and some other layout functions. * * **Syntax**: `auto | <ratio>` * @@ -248,7 +286,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/aspect-ratio */ - aspectRatio?: AspectRatioProperty; + aspectRatio?: Property.AspectRatio | undefined; /** * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. * @@ -262,7 +300,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/backdrop-filter */ - backdropFilter?: BackdropFilterProperty; + backdropFilter?: Property.BackdropFilter | undefined; /** * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. * @@ -270,14 +308,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `visible` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-------: | :----: | :----: | - * | **36** | **16** | **15.4** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 5.1 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :----: | :----: | + * | **36** | **16** | **15.4** | **12** | **10** | + * | 12 _-x-_ | | 5.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/backface-visibility */ - backfaceVisibility?: BackfaceVisibilityProperty; + backfaceVisibility?: Property.BackfaceVisibility | undefined; /** * The **`background-attachment`** CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. * @@ -291,7 +329,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-attachment */ - backgroundAttachment?: BackgroundAttachmentProperty; + backgroundAttachment?: Property.BackgroundAttachment | undefined; /** * The **`background-blend-mode`** CSS property sets how an element's background images should blend with each other and with the element's background color. * @@ -305,9 +343,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-blend-mode */ - backgroundBlendMode?: BackgroundBlendModeProperty; + backgroundBlendMode?: Property.BackgroundBlendMode | undefined; /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. * * **Syntax**: `<box>#` * @@ -315,12 +353,12 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **4** | **14** | **12** | **9** | + * | **1** | **4** | **5** | **12** | **9** | * | | | 3 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/background-clip */ - backgroundClip?: BackgroundClipProperty; + backgroundClip?: Property.BackgroundClip | undefined; /** * The **`background-color`** CSS property sets the background color of an element. * @@ -334,9 +372,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-color */ - backgroundColor?: BackgroundColorProperty; + backgroundColor?: Property.BackgroundColor | undefined; /** - * The **`background-image`** CSS property sets one or more background images on an element. + * The **`background-image`** CSS property sets one or more background images on an element. * * **Syntax**: `<bg-image>#` * @@ -348,9 +386,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-image */ - backgroundImage?: BackgroundImageProperty; + backgroundImage?: Property.BackgroundImage | undefined; /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. * * **Syntax**: `<box>#` * @@ -362,7 +400,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-origin */ - backgroundOrigin?: BackgroundOriginProperty; + backgroundOrigin?: Property.BackgroundOrigin | undefined; /** * The **`background-position-x`** CSS property sets the initial horizontal position for each background image. The position is relative to the position layer set by `background-origin`. * @@ -376,9 +414,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-position-x */ - backgroundPositionX?: BackgroundPositionXProperty<TLength>; + backgroundPositionX?: Property.BackgroundPositionX<TLength> | undefined; /** - * The **`background-position-y`** CSS property sets the initial vertical position, relative to the background position layer defined by `background-origin`, for each defined background image. + * The **`background-position-y`** CSS property sets the initial vertical position for each background image. The position is relative to the position layer set by `background-origin`. * * **Syntax**: `[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#` * @@ -390,7 +428,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-position-y */ - backgroundPositionY?: BackgroundPositionYProperty<TLength>; + backgroundPositionY?: Property.BackgroundPositionY<TLength> | undefined; /** * The **`background-repeat`** CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all. * @@ -404,7 +442,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-repeat */ - backgroundRepeat?: BackgroundRepeatProperty; + backgroundRepeat?: Property.BackgroundRepeat | undefined; /** * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. * @@ -419,13 +457,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-size */ - backgroundSize?: BackgroundSizeProperty<TLength>; + backgroundSize?: Property.BackgroundSize<TLength> | undefined; /** * **Syntax**: `clip | ellipsis | <string>` * * **Initial value**: `clip` */ - blockOverflow?: BlockOverflowProperty; + blockOverflow?: Property.BlockOverflow | undefined; /** * The **`block-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. * @@ -439,9 +477,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/block-size */ - blockSize?: BlockSizeProperty<TLength>; + blockSize?: Property.BlockSize<TLength> | undefined; /** - * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>{1,2}` * @@ -453,9 +491,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-color */ - borderBlockColor?: BorderBlockColorProperty; + borderBlockColor?: Property.BorderBlockColor | undefined; /** - * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * @@ -467,9 +505,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-color */ - borderBlockEndColor?: BorderBlockEndColorProperty; + borderBlockEndColor?: Property.BorderBlockEndColor | undefined; /** - * The **`border-block-end-style`** CSS property defines the style of the logical block end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-end-style`** CSS property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -481,9 +519,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-style */ - borderBlockEndStyle?: BorderBlockEndStyleProperty; + borderBlockEndStyle?: Property.BorderBlockEndStyle | undefined; /** - * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -495,9 +533,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width */ - borderBlockEndWidth?: BorderBlockEndWidthProperty<TLength>; + borderBlockEndWidth?: Property.BorderBlockEndWidth<TLength> | undefined; /** - * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * @@ -509,9 +547,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-color */ - borderBlockStartColor?: BorderBlockStartColorProperty; + borderBlockStartColor?: Property.BorderBlockStartColor | undefined; /** - * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -523,9 +561,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-style */ - borderBlockStartStyle?: BorderBlockStartStyleProperty; + borderBlockStartStyle?: Property.BorderBlockStartStyle | undefined; /** - * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -537,9 +575,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width */ - borderBlockStartWidth?: BorderBlockStartWidthProperty<TLength>; + borderBlockStartWidth?: Property.BorderBlockStartWidth<TLength> | undefined; /** - * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -551,9 +589,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-style */ - borderBlockStyle?: BorderBlockStyleProperty; + borderBlockStyle?: Property.BorderBlockStyle | undefined; /** - * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -565,7 +603,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-width */ - borderBlockWidth?: BorderBlockWidthProperty<TLength>; + borderBlockWidth?: Property.BorderBlockWidth<TLength> | undefined; /** * The **`border-bottom-color`** CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties `border-color` or `border-bottom`. * @@ -579,9 +617,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-color */ - borderBottomColor?: BorderBottomColorProperty; + borderBottomColor?: Property.BorderBottomColor | undefined; /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -594,9 +632,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius */ - borderBottomLeftRadius?: BorderBottomLeftRadiusProperty<TLength>; + borderBottomLeftRadius?: Property.BorderBottomLeftRadius<TLength> | undefined; /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -609,7 +647,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius */ - borderBottomRightRadius?: BorderBottomRightRadiusProperty<TLength>; + borderBottomRightRadius?: Property.BorderBottomRightRadius<TLength> | undefined; /** * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`. * @@ -623,9 +661,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-style */ - borderBottomStyle?: BorderBottomStyleProperty; + borderBottomStyle?: Property.BorderBottomStyle | undefined; /** - * The **`border-bottom-width`** CSS property sets the width of the bottom border of a box. + * The **`border-bottom-width`** CSS property sets the width of the bottom border of an element. * * **Syntax**: `<line-width>` * @@ -637,7 +675,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width */ - borderBottomWidth?: BorderBottomWidthProperty<TLength>; + borderBottomWidth?: Property.BorderBottomWidth<TLength> | undefined; /** * The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders. * @@ -651,9 +689,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-collapse */ - borderCollapse?: BorderCollapseProperty; + borderCollapse?: Property.BorderCollapse | undefined; /** - * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's `writing-mode`, `direction`, and `text-orientation`. + * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. * * **Syntax**: `<length-percentage>{1,2}` * @@ -665,9 +703,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius */ - borderEndEndRadius?: BorderEndEndRadiusProperty<TLength>; + borderEndEndRadius?: Property.BorderEndEndRadius<TLength> | undefined; /** - * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. + * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. * * **Syntax**: `<length-percentage>{1,2}` * @@ -679,7 +717,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius */ - borderEndStartRadius?: BorderEndStartRadiusProperty<TLength>; + borderEndStartRadius?: Property.BorderEndStartRadius<TLength> | undefined; /** * The **`border-image-outset`** CSS property sets the distance by which an element's border image is set out from its border box. * @@ -693,9 +731,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-outset */ - borderImageOutset?: BorderImageOutsetProperty<TLength>; + borderImageOutset?: Property.BorderImageOutset<TLength> | undefined; /** - * The **`border-image-repeat`** CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's border image. + * The **`border-image-repeat`** CSS property defines how the edge regions and middle region of a source image are adjusted to fit the dimensions of an element's border image. The middle region can be displayed by using the keyword "fill" in the border-image-slice property. * * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` * @@ -707,7 +745,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-repeat */ - borderImageRepeat?: BorderImageRepeatProperty; + borderImageRepeat?: Property.BorderImageRepeat | undefined; /** * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. * @@ -721,7 +759,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-slice */ - borderImageSlice?: BorderImageSliceProperty; + borderImageSlice?: Property.BorderImageSlice | undefined; /** * The **`border-image-source`** CSS property sets the source image used to create an element's border image. * @@ -735,7 +773,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-source */ - borderImageSource?: BorderImageSourceProperty; + borderImageSource?: Property.BorderImageSource | undefined; /** * The **`border-image-width`** CSS property sets the width of an element's border image. * @@ -749,9 +787,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-width */ - borderImageWidth?: BorderImageWidthProperty<TLength>; + borderImageWidth?: Property.BorderImageWidth<TLength> | undefined; /** - * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>{1,2}` * @@ -763,9 +801,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-color */ - borderInlineColor?: BorderInlineColorProperty; + borderInlineColor?: Property.BorderInlineColor | undefined; /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * @@ -778,9 +816,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color */ - borderInlineEndColor?: BorderInlineEndColorProperty; + borderInlineEndColor?: Property.BorderInlineEndColor | undefined; /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -793,9 +831,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style */ - borderInlineEndStyle?: BorderInlineEndStyleProperty; + borderInlineEndStyle?: Property.BorderInlineEndStyle | undefined; /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -808,9 +846,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width */ - borderInlineEndWidth?: BorderInlineEndWidthProperty<TLength>; + borderInlineEndWidth?: Property.BorderInlineEndWidth<TLength> | undefined; /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * @@ -823,9 +861,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color */ - borderInlineStartColor?: BorderInlineStartColorProperty; + borderInlineStartColor?: Property.BorderInlineStartColor | undefined; /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -838,9 +876,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style */ - borderInlineStartStyle?: BorderInlineStartStyleProperty; + borderInlineStartStyle?: Property.BorderInlineStartStyle | undefined; /** - * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -852,9 +890,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width */ - borderInlineStartWidth?: BorderInlineStartWidthProperty<TLength>; + borderInlineStartWidth?: Property.BorderInlineStartWidth<TLength> | undefined; /** - * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -866,9 +904,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-style */ - borderInlineStyle?: BorderInlineStyleProperty; + borderInlineStyle?: Property.BorderInlineStyle | undefined; /** - * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -880,7 +918,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width */ - borderInlineWidth?: BorderInlineWidthProperty<TLength>; + borderInlineWidth?: Property.BorderInlineWidth<TLength> | undefined; /** * The **`border-left-color`** CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties `border-color` or `border-left`. * @@ -894,7 +932,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-left-color */ - borderLeftColor?: BorderLeftColorProperty; + borderLeftColor?: Property.BorderLeftColor | undefined; /** * The **`border-left-style`** CSS property sets the line style of an element's left `border`. * @@ -908,7 +946,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-left-style */ - borderLeftStyle?: BorderLeftStyleProperty; + borderLeftStyle?: Property.BorderLeftStyle | undefined; /** * The **`border-left-width`** CSS property sets the width of the left border of an element. * @@ -922,7 +960,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-left-width */ - borderLeftWidth?: BorderLeftWidthProperty<TLength>; + borderLeftWidth?: Property.BorderLeftWidth<TLength> | undefined; /** * The **`border-right-color`** CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties `border-color` or `border-right`. * @@ -936,7 +974,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-right-color */ - borderRightColor?: BorderRightColorProperty; + borderRightColor?: Property.BorderRightColor | undefined; /** * The **`border-right-style`** CSS property sets the line style of an element's right `border`. * @@ -950,7 +988,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-right-style */ - borderRightStyle?: BorderRightStyleProperty; + borderRightStyle?: Property.BorderRightStyle | undefined; /** * The **`border-right-width`** CSS property sets the width of the right border of an element. * @@ -964,9 +1002,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-right-width */ - borderRightWidth?: BorderRightWidthProperty<TLength>; + borderRightWidth?: Property.BorderRightWidth<TLength> | undefined; /** - * The **`border-spacing`** CSS property sets the distance between the borders of adjacent `<table>` cells. This property applies only when `border-collapse` is `separate`. + * The **`border-spacing`** CSS property sets the distance between the borders of adjacent cells in a `<table>`. This property applies only when `border-collapse` is `separate`. * * **Syntax**: `<length> <length>?` * @@ -978,9 +1016,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-spacing */ - borderSpacing?: BorderSpacingProperty<TLength>; + borderSpacing?: Property.BorderSpacing<TLength> | undefined; /** - * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. + * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. * * **Syntax**: `<length-percentage>{1,2}` * @@ -992,9 +1030,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius */ - borderStartEndRadius?: BorderStartEndRadiusProperty<TLength>; + borderStartEndRadius?: Property.BorderStartEndRadius<TLength> | undefined; /** - * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. + * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. * * **Syntax**: `<length-percentage>{1,2}` * @@ -1006,7 +1044,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius */ - borderStartStartRadius?: BorderStartStartRadiusProperty<TLength>; + borderStartStartRadius?: Property.BorderStartStartRadius<TLength> | undefined; /** * The **`border-top-color`** CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties `border-color` or `border-top`. * @@ -1020,9 +1058,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-color */ - borderTopColor?: BorderTopColorProperty; + borderTopColor?: Property.BorderTopColor | undefined; /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -1035,9 +1073,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius */ - borderTopLeftRadius?: BorderTopLeftRadiusProperty<TLength>; + borderTopLeftRadius?: Property.BorderTopLeftRadius<TLength> | undefined; /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -1050,7 +1088,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius */ - borderTopRightRadius?: BorderTopRightRadiusProperty<TLength>; + borderTopRightRadius?: Property.BorderTopRightRadius<TLength> | undefined; /** * The **`border-top-style`** CSS property sets the line style of an element's top `border`. * @@ -1064,7 +1102,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-style */ - borderTopStyle?: BorderTopStyleProperty; + borderTopStyle?: Property.BorderTopStyle | undefined; /** * The **`border-top-width`** CSS property sets the width of the top border of an element. * @@ -1078,9 +1116,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-width */ - borderTopWidth?: BorderTopWidthProperty<TLength>; + borderTopWidth?: Property.BorderTopWidth<TLength> | undefined; /** - * The **`bottom`** CSS property participates in specifying the vertical position of a _positioned element_. It has no effect on non-positioned elements. + * The **`bottom`** CSS property participates in setting the vertical position of a positioned element. It has no effect on non-positioned elements. * * **Syntax**: `<length> | <percentage> | auto` * @@ -1092,7 +1130,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/bottom */ - bottom?: BottomProperty<TLength>; + bottom?: Property.Bottom<TLength> | undefined; /** * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. * @@ -1106,9 +1144,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/box-decoration-break */ - boxDecorationBreak?: BoxDecorationBreakProperty; + boxDecorationBreak?: Property.BoxDecorationBreak | undefined; /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. * * **Syntax**: `none | <shadow>#` * @@ -1121,9 +1159,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/box-shadow */ - boxShadow?: BoxShadowProperty; + boxShadow?: Property.BoxShadow | undefined; /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. * * **Syntax**: `content-box | border-box` * @@ -1136,9 +1174,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/box-sizing */ - boxSizing?: BoxSizingProperty; + boxSizing?: Property.BoxSizing | undefined; /** - * The **`break-after`** CSS property defines how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. + * The **`break-after`** CSS property sets how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. * * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` * @@ -1150,7 +1188,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/break-after */ - breakAfter?: BreakAfterProperty; + breakAfter?: Property.BreakAfter | undefined; /** * The **`break-before`** CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. * @@ -1164,9 +1202,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/break-before */ - breakBefore?: BreakBeforeProperty; + breakBefore?: Property.BreakBefore | undefined; /** - * The **`break-inside`** CSS property defines how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. + * The **`break-inside`** CSS property sets how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. * * **Syntax**: `auto | avoid | avoid-page | avoid-column | avoid-region` * @@ -1178,7 +1216,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/break-inside */ - breakInside?: BreakInsideProperty; + breakInside?: Property.BreakInside | undefined; /** * The **`caption-side`** CSS property puts the content of a table's `<caption>` on the specified side. The values are relative to the `writing-mode` of the table. * @@ -1192,9 +1230,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/caption-side */ - captionSide?: CaptionSideProperty; + captionSide?: Property.CaptionSide | undefined; /** - * The **`caret-color`** CSS property sets the color of the insertion caret, the visible marker where the next character typed will be inserted. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. + * The **`caret-color`** CSS property sets the color of the **insertion caret**, the visible marker where the next character typed will be inserted. This is sometimes referred to as the **text input cursor**. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. * * **Syntax**: `auto | <color>` * @@ -1206,7 +1244,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/caret-color */ - caretColor?: CaretColorProperty; + caretColor?: Property.CaretColor | undefined; + /** + * **Syntax**: `auto | bar | block | underscore` + * + * **Initial value**: `auto` + */ + caretShape?: Property.CaretShape | undefined; /** * The **`clear`** CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The `clear` property applies to floating and non-floating elements. * @@ -1220,9 +1264,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/clear */ - clear?: ClearProperty; + clear?: Property.Clear | undefined; /** - * The `**clip-path**` CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. + * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. * * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` * @@ -1235,7 +1279,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/clip-path */ - clipPath?: ClipPathProperty; + clipPath?: Property.ClipPath | undefined; /** * The **`color`** CSS property sets the foreground color value of an element's text and text decorations, and sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`. * @@ -1249,7 +1293,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/color */ - color?: ColorProperty; + color?: Property.Color | undefined; /** * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. * @@ -1264,7 +1308,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust */ - colorAdjust?: PrintColorAdjustProperty; + colorAdjust?: Property.PrintColorAdjust | undefined; /** * The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in. * @@ -1278,7 +1322,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/color-scheme */ - colorScheme?: ColorSchemeProperty; + colorScheme?: Property.ColorScheme | undefined; /** * The **`column-count`** CSS property breaks an element's content into the specified number of columns. * @@ -1293,7 +1337,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-count */ - columnCount?: ColumnCountProperty; + columnCount?: Property.ColumnCount | undefined; /** * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. * @@ -1308,7 +1352,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-fill */ - columnFill?: ColumnFillProperty; + columnFill?: Property.ColumnFill | undefined; /** * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. * @@ -1322,9 +1366,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-gap */ - columnGap?: ColumnGapProperty<TLength>; + columnGap?: Property.ColumnGap<TLength> | undefined; /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<color>` * @@ -1337,7 +1381,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-color */ - columnRuleColor?: ColumnRuleColorProperty; + columnRuleColor?: Property.ColumnRuleColor | undefined; /** * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. * @@ -1352,9 +1396,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-style */ - columnRuleStyle?: ColumnRuleStyleProperty; + columnRuleStyle?: Property.ColumnRuleStyle | undefined; /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'border-width'>` * @@ -1367,7 +1411,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-width */ - columnRuleWidth?: ColumnRuleWidthProperty<TLength>; + columnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; /** * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. * @@ -1382,9 +1426,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-span */ - columnSpan?: ColumnSpanProperty; + columnSpan?: Property.ColumnSpan | undefined; /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. * * **Syntax**: `<length> | auto` * @@ -1397,9 +1441,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-width */ - columnWidth?: ColumnWidthProperty<TLength>; + columnWidth?: Property.ColumnWidth<TLength> | undefined; /** - * The **`contain`** CSS property allows an author to indicate that an element and its contents are, as much as possible, _independent_ of the rest of the document tree. This allows the browser to recalculate layout, style, paint, size, or any combination of them for a limited area of the DOM and not the entire page. + * The **`contain`** CSS property indicates that an element and its contents are, as much as possible, independent from the rest of the document tree. Containment enables isolating a subsection of the DOM, providing performance benefits by limiting calculations of layout, style, paint, size, or any combination to a DOM subtree rather than the entire page. Containment can also be used to scope CSS counters and quotes. * * **Syntax**: `none | strict | content | [ [ size || inline-size ] || layout || style || paint ]` * @@ -1411,9 +1455,93 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/contain */ - contain?: ContainProperty; + contain?: Property.Contain | undefined; /** - * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are _anonymous replaced elements._ + * The **`contain-intrinsic-block-size`** CSS logical property defines the block size of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-block-size + */ + containIntrinsicBlockSize?: Property.ContainIntrinsicBlockSize<TLength> | undefined; + /** + * The **`contain-intrinsic-length`** CSS property sets the height of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height + */ + containIntrinsicHeight?: Property.ContainIntrinsicHeight<TLength> | undefined; + /** + * The **`contain-intrinsic-inline-size`** CSS logical property defines the inline-size of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-inline-size + */ + containIntrinsicInlineSize?: Property.ContainIntrinsicInlineSize<TLength> | undefined; + /** + * The **`contain-intrinsic-width`** CSS property sets the width of an element that a browser will use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width + */ + containIntrinsicWidth?: Property.ContainIntrinsicWidth<TLength> | undefined; + /** + * The **container-name** CSS property specifies a list of query container names used by the @container at-rule in a container query. A container query will apply styles to elements based on the size of the nearest ancestor with a containment context. When a containment context is given a name, it can be specifically targeted using the `@container` at-rule instead of the nearest ancestor with containment. + * + * **Syntax**: `none | <custom-ident>+` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container-name + */ + containerName?: Property.ContainerName | undefined; + /** + * The **container-type** CSS property is used to define the type of containment used in a container query. + * + * **Syntax**: `normal | size | inline-size` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container-type + */ + containerType?: Property.ContainerType | undefined; + /** + * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are **anonymous replaced elements**. * * **Syntax**: `normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?` * @@ -1425,21 +1553,21 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/content */ - content?: ContentProperty; + content?: Property.Content | undefined; /** - * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. Basically it enables the user agent to skip an element's rendering work, including layout and painting, until it is needed, makes the initial page load much faster. + * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. It enables the user agent to skip an element's rendering work (including layout and painting) until it is needed — which makes the initial page load much faster. * * **Syntax**: `visible | auto | hidden` * * **Initial value**: `visible` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **85** | No | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :---------: | :----: | :--: | :-: | + * | **85** | **preview** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/content-visibility */ - contentVisibility?: ContentVisibilityProperty; + contentVisibility?: Property.ContentVisibility | undefined; /** * The **`counter-increment`** CSS property increases or decreases the value of a CSS counter by a given value. * @@ -1453,9 +1581,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment */ - counterIncrement?: CounterIncrementProperty; + counterIncrement?: Property.CounterIncrement | undefined; /** - * The **`counter-reset`** CSS property resets a CSS counter to a given value. + * The **`counter-reset`** CSS property resets a CSS counter to a given value. This property will create a new counter or reversed counter with the given name on the specified element. * * **Syntax**: `[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none` * @@ -1467,23 +1595,23 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/counter-reset */ - counterReset?: CounterResetProperty; + counterReset?: Property.CounterReset | undefined; /** - * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. + * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. * * **Syntax**: `[ <counter-name> <integer>? ]+ | none` * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **85** | **68** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **85** | **68** | **17.2** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/counter-set */ - counterSet?: CounterSetProperty; + counterSet?: Property.CounterSet | undefined; /** - * The **`cursor`** CSS property sets mouse cursor to display when the mouse pointer is over an element. + * The **`cursor`** CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element. * * **Syntax**: `[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]` * @@ -1495,7 +1623,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/cursor */ - cursor?: CursorProperty; + cursor?: Property.Cursor | undefined; /** * The **`direction`** CSS property sets the direction of text, table columns, and horizontal overflow. Use `rtl` for languages written from right to left (like Hebrew or Arabic), and `ltr` for those written from left to right (like English and most other languages). * @@ -1509,9 +1637,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/direction */ - direction?: DirectionProperty; + direction?: Property.Direction | undefined; /** - * The **`display`** CSS property defines the _display type_ of an element, which consists of the two basic qualities of how an element generates boxes — the **outer display type** defining how the box participates in flow layout, and the **inner display type** defining how the children of the box are laid out. + * The **`display`** CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex. * * **Syntax**: `[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>` * @@ -1523,7 +1651,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/display */ - display?: DisplayProperty; + display?: Property.Display | undefined; /** * The **`empty-cells`** CSS property sets whether borders and backgrounds appear around `<table>` cells that have no visible content. * @@ -1537,7 +1665,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/empty-cells */ - emptyCells?: EmptyCellsProperty; + emptyCells?: Property.EmptyCells | undefined; /** * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. * @@ -1552,7 +1680,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/filter */ - filter?: FilterProperty; + filter?: Property.Filter | undefined; /** * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. * @@ -1567,7 +1695,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-basis */ - flexBasis?: FlexBasisProperty<TLength>; + flexBasis?: Property.FlexBasis<TLength> | undefined; /** * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). * @@ -1582,9 +1710,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-direction */ - flexDirection?: FlexDirectionProperty; + flexDirection?: Property.FlexDirection | undefined; /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. * * **Syntax**: `<number>` * @@ -1597,9 +1725,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-grow */ - flexGrow?: GlobalsNumber; + flexGrow?: Property.FlexGrow | undefined; /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. + * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. * * **Syntax**: `<number>` * @@ -1612,7 +1740,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-shrink */ - flexShrink?: GlobalsNumber; + flexShrink?: Property.FlexShrink | undefined; /** * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. * @@ -1627,7 +1755,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-wrap */ - flexWrap?: FlexWrapProperty; + flexWrap?: Property.FlexWrap | undefined; /** * The **`float`** CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). * @@ -1641,7 +1769,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/float */ - float?: FloatProperty; + float?: Property.Float | undefined; /** * The **`font-family`** CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element. * @@ -1655,7 +1783,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-family */ - fontFamily?: FontFamilyProperty; + fontFamily?: Property.FontFamily | undefined; /** * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. * @@ -1670,7 +1798,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-feature-settings */ - fontFeatureSettings?: FontFeatureSettingsProperty; + fontFeatureSettings?: Property.FontFeatureSettings | undefined; /** * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. * @@ -1685,7 +1813,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-kerning */ - fontKerning?: FontKerningProperty; + fontKerning?: Property.FontKerning | undefined; /** * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. * @@ -1700,9 +1828,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-language-override */ - fontLanguageOverride?: FontLanguageOverrideProperty; + fontLanguageOverride?: Property.FontLanguageOverride | undefined; /** - * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. This only works for fonts that have an optical size variation axis. + * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. * * **Syntax**: `auto | none` * @@ -1714,9 +1842,21 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing */ - fontOpticalSizing?: FontOpticalSizingProperty; + fontOpticalSizing?: Property.FontOpticalSizing | undefined; /** - * The **`font-size`** CSS property sets the size of the font. This property is also used to compute the size of `em`, `ex`, and other relative `<length>` units. + * **Syntax**: `normal | light | dark | <palette-identifier>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **101** | **107** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-palette + */ + fontPalette?: Property.FontPalette | undefined; + /** + * The **`font-size`** CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative `<length>` units, such as `em`, `ex`, and so forth. * * **Syntax**: `<absolute-size> | <relative-size> | <length-percentage>` * @@ -1728,21 +1868,21 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-size */ - fontSize?: FontSizeProperty<TLength>; + fontSize?: Property.FontSize<TLength> | undefined; /** - * The **`font-size-adjust`** CSS property sets how the font size should be chosen based on the height of lowercase rather than capital letters. + * The **`font-size-adjust`** CSS property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters). * * **Syntax**: `none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]` * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **3** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | No | **3** | **16.4** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/font-size-adjust */ - fontSizeAdjust?: FontSizeAdjustProperty; + fontSizeAdjust?: Property.FontSizeAdjust | undefined; /** * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. * @@ -1756,7 +1896,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-smooth */ - fontSmooth?: FontSmoothProperty<TLength>; + fontSmooth?: Property.FontSmooth<TLength> | undefined; /** * The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font. * @@ -1770,7 +1910,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-stretch */ - fontStretch?: FontStretchProperty; + fontStretch?: Property.FontStretch | undefined; /** * The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`. * @@ -1784,13 +1924,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-style */ - fontStyle?: FontStyleProperty; + fontStyle?: Property.FontStyle | undefined; /** - * The **`font-synthesis`** CSS property controls which missing typefaces, bold or italic, may be synthesized by the browser. + * The **`font-synthesis`** CSS property controls which missing typefaces, bold, italic, or small-caps, may be synthesized by the browser. * - * **Syntax**: `none | [ weight || style || small-caps ]` + * **Syntax**: `none | [ weight || style || small-caps || position]` * - * **Initial value**: `weight style` + * **Initial value**: `weight style small-caps position ` * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :----: | :--: | :-: | @@ -1798,9 +1938,65 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis */ - fontSynthesis?: FontSynthesisProperty; + fontSynthesis?: Property.FontSynthesis | undefined; /** - * The **font-variant** CSS property is a shorthand for the longhand properties `font-variant-caps`, `font-variant-numeric`, `font-variant-alternates`, `font-variant-ligatures`, and `font-variant-east-asian`. You can also set the CSS Level 2 (Revision 1) values of `font-variant`, (that is, `normal` or `small-caps`), by using the `font` shorthand. + * The **`font-synthesis-position`** CSS property lets you specify whether or not a browser may synthesize the subscript and superscript "position" typefaces when they are missing in a font family, while using `font-variant-position` to set the positions. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **118** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position + */ + fontSynthesisPosition?: Property.FontSynthesisPosition | undefined; + /** + * The **`font-synthesis-small-caps`** CSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps + */ + fontSynthesisSmallCaps?: Property.FontSynthesisSmallCaps | undefined; + /** + * The **`font-synthesis-style`** CSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style + */ + fontSynthesisStyle?: Property.FontSynthesisStyle | undefined; + /** + * The **`font-synthesis-weight`** CSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight + */ + fontSynthesisWeight?: Property.FontSynthesisWeight | undefined; + /** + * The **`font-variant`** CSS shorthand property allows you to set all the font variants for a font. * * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]` * @@ -1812,7 +2008,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant */ - fontVariant?: FontVariantProperty; + fontVariant?: Property.FontVariant | undefined; /** * The **`font-variant-alternates`** CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in `@font-feature-values`. * @@ -1820,13 +2016,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | No | **34** | **9.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :--: | :-: | + * | **111** | **34** | **9.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates */ - fontVariantAlternates?: FontVariantAlternatesProperty; + fontVariantAlternates?: Property.FontVariantAlternates | undefined; /** * The **`font-variant-caps`** CSS property controls the use of alternate glyphs for capital letters. * @@ -1840,7 +2036,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-caps */ - fontVariantCaps?: FontVariantCapsProperty; + fontVariantCaps?: Property.FontVariantCaps | undefined; /** * The **`font-variant-east-asian`** CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese. * @@ -1854,7 +2050,19 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian */ - fontVariantEastAsian?: FontVariantEastAsianProperty; + fontVariantEastAsian?: Property.FontVariantEastAsian | undefined; + /** + * **Syntax**: `normal | text | emoji | unicode` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-emoji + */ + fontVariantEmoji?: Property.FontVariantEmoji | undefined; /** * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. * @@ -1869,7 +2077,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures */ - fontVariantLigatures?: FontVariantLigaturesProperty; + fontVariantLigatures?: Property.FontVariantLigatures | undefined; /** * The **`font-variant-numeric`** CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. * @@ -1883,7 +2091,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric */ - fontVariantNumeric?: FontVariantNumericProperty; + fontVariantNumeric?: Property.FontVariantNumeric | undefined; /** * The **`font-variant-position`** CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript. * @@ -1891,13 +2099,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | No | **34** | **9.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :--: | :-: | + * | **117** | **34** | **9.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-position */ - fontVariantPosition?: FontVariantPositionProperty; + fontVariantPosition?: Property.FontVariantPosition | undefined; /** * The **`font-variation-settings`** CSS property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. * @@ -1911,9 +2119,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variation-settings */ - fontVariationSettings?: FontVariationSettingsProperty; + fontVariationSettings?: Property.FontVariationSettings | undefined; /** - * The **`font-weight`** CSS property specifies the weight (or boldness) of the font. The font weights available to you will depend on the `font-family` you are using. Some fonts are only available in `normal` and `bold`. + * The **`font-weight`** CSS property sets the weight (or boldness) of the font. The weights available depend on the `font-family` that is currently set. * * **Syntax**: `<font-weight-absolute> | bolder | lighter` * @@ -1925,7 +2133,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-weight */ - fontWeight?: FontWeightProperty; + fontWeight?: Property.FontWeight | undefined; /** * The **`forced-color-adjust`** CSS property allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS. * @@ -1935,14 +2143,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :----: | :-----------------------------: | :---------------------------------: | - * | **89** | No | No | **79** | **10** _(-ms-high-contrast-adjust)_ | + * | **89** | **113** | No | **79** | **10** _(-ms-high-contrast-adjust)_ | * | | | | 12 _(-ms-high-contrast-adjust)_ | | * * @see https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust */ - forcedColorAdjust?: ForcedColorAdjustProperty; + forcedColorAdjust?: Property.ForcedColorAdjust | undefined; /** - * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track. + * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track or pattern of tracks. * * **Syntax**: `<track-size>+` * @@ -1954,7 +2162,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns */ - gridAutoColumns?: GridAutoColumnsProperty<TLength>; + gridAutoColumns?: Property.GridAutoColumns<TLength> | undefined; /** * The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. * @@ -1968,9 +2176,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow */ - gridAutoFlow?: GridAutoFlowProperty; + gridAutoFlow?: Property.GridAutoFlow | undefined; /** - * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track. + * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track or pattern of tracks. * * **Syntax**: `<track-size>+` * @@ -1982,9 +2190,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows */ - gridAutoRows?: GridAutoRowsProperty<TLength>; + gridAutoRows?: Property.GridAutoRows<TLength> | undefined; /** - * The **`grid-column-end`** CSS property specifies a grid item’s end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. + * The **`grid-column-end`** CSS property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. * * **Syntax**: `<grid-line>` * @@ -1996,9 +2204,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-end */ - gridColumnEnd?: GridColumnEndProperty; + gridColumnEnd?: Property.GridColumnEnd | undefined; /** - * The **`grid-column-start`** CSS property specifies a grid item’s start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. + * The **`grid-column-start`** CSS property specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. * * **Syntax**: `<grid-line>` * @@ -2010,9 +2218,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-start */ - gridColumnStart?: GridColumnStartProperty; + gridColumnStart?: Property.GridColumnStart | undefined; /** - * The **`grid-row-end`** CSS property specifies a grid item’s end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. + * The **`grid-row-end`** CSS property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. * * **Syntax**: `<grid-line>` * @@ -2024,9 +2232,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-end */ - gridRowEnd?: GridRowEndProperty; + gridRowEnd?: Property.GridRowEnd | undefined; /** - * The **`grid-row-start`** CSS property specifies a grid item’s start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. + * The **`grid-row-start`** CSS property specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. * * **Syntax**: `<grid-line>` * @@ -2038,9 +2246,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-start */ - gridRowStart?: GridRowStartProperty; + gridRowStart?: Property.GridRowStart | undefined; /** - * The **`grid-template-areas`** CSS property specifies named grid areas. + * The **`grid-template-areas`** CSS property specifies named grid areas, establishing the cells in the grid and assigning them names. * * **Syntax**: `none | <string>+` * @@ -2052,7 +2260,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-areas */ - gridTemplateAreas?: GridTemplateAreasProperty; + gridTemplateAreas?: Property.GridTemplateAreas | undefined; /** * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. * @@ -2066,7 +2274,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-columns */ - gridTemplateColumns?: GridTemplateColumnsProperty<TLength>; + gridTemplateColumns?: Property.GridTemplateColumns<TLength> | undefined; /** * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. * @@ -2080,7 +2288,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-rows */ - gridTemplateRows?: GridTemplateRowsProperty<TLength>; + gridTemplateRows?: Property.GridTemplateRows<TLength> | undefined; /** * The **`hanging-punctuation`** CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box. * @@ -2094,7 +2302,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation */ - hangingPunctuation?: HangingPunctuationProperty; + hangingPunctuation?: Property.HangingPunctuation | undefined; /** * The **`height`** CSS property specifies the height of an element. By default, the property defines the height of the content area. If `box-sizing` is set to `border-box`, however, it instead determines the height of the border area. * @@ -2108,7 +2316,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/height */ - height?: HeightProperty<TLength>; + height?: Property.Height<TLength> | undefined; /** * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. * @@ -2116,30 +2324,43 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-----------: | :--: | :-: | - * | **6** _-x-_ | **98** | **5.1** _-x-_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :--: | :-: | + * | **106** | **98** | **17** | n/a | No | + * | 6 _-x-_ | | 5.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/hyphenate-character */ - hyphenateCharacter?: HyphenateCharacterProperty; + hyphenateCharacter?: Property.HyphenateCharacter | undefined; /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * The **`hyphenate-limit-chars`** CSS property specifies the minimum word length to allow hyphenation of words as well as the the minimum number of characters before and after the hyphen. + * + * **Syntax**: `[ auto | <integer> ]{1,3}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | No | No | n/a | No | + */ + hyphenateLimitChars?: Property.HyphenateLimitChars | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. * * **Syntax**: `none | manual | auto` * * **Initial value**: `manual` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----------: | :----: | :----------: | - * | **55** | **43** | **5.1** _-x-_ | **79** | **10** _-x-_ | - * | 13 _-x-_ | 6 _-x-_ | | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :----: | :----------: | + * | **55** | **43** | **17** | **79** | **10** _-x-_ | + * | 13 _-x-_ | 6 _-x-_ | 5.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/hyphens */ - hyphens?: HyphensProperty; + hyphens?: Property.Hyphens | undefined; /** - * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. It should _not_ be used for any other orientation adjustments; instead, the `transform` property should be used with the `rotate` `<transform-function>`. + * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. * * **Syntax**: `from-image | <angle> | [ <angle>? flip ]` * @@ -2151,7 +2372,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/image-orientation */ - imageOrientation?: ImageOrientationProperty; + imageOrientation?: Property.ImageOrientation | undefined; /** * The **`image-rendering`** CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants. * @@ -2165,13 +2386,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/image-rendering */ - imageRendering?: ImageRenderingProperty; + imageRendering?: Property.ImageRendering | undefined; /** * **Syntax**: `[ from-image || <resolution> ] && snap?` * * **Initial value**: `1dppx` */ - imageResolution?: ImageResolutionProperty; + imageResolution?: Property.ImageResolution | undefined; /** * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. * @@ -2179,13 +2400,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :--: | :-: | - * | No | No | **9** _-x-_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :---------: | :--: | :-: | + * | **110** | No | **9** _-x-_ | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/initial-letter */ - initialLetter?: InitialLetterProperty; + initialLetter?: Property.InitialLetter | undefined; /** * The **`inline-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. * @@ -2199,41 +2420,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inline-size */ - inlineSize?: InlineSizeProperty<TLength>; + inlineSize?: Property.InlineSize<TLength> | undefined; /** * **Syntax**: `auto | none` * * **Initial value**: `auto` */ - inputSecurity?: InputSecurityProperty; - /** - * The **`inset`** CSS property defines the logical block and inline start and end offsets of an element, which map to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset - */ - inset?: InsetProperty<TLength>; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block - */ - insetBlock?: InsetBlockProperty<TLength>; + inputSecurity?: Property.InputSecurity | undefined; /** * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -2247,7 +2440,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-end */ - insetBlockEnd?: InsetBlockEndProperty<TLength>; + insetBlockEnd?: Property.InsetBlockEnd<TLength> | undefined; /** * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -2261,23 +2454,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-start */ - insetBlockStart?: InsetBlockStartProperty<TLength>; + insetBlockStart?: Property.InsetBlockStart<TLength> | undefined; /** - * The **`inset-inline`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline - */ - insetInline?: InsetInlineProperty<TLength>; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'top'>` * @@ -2289,7 +2468,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-end */ - insetInlineEnd?: InsetInlineEndProperty<TLength>; + insetInlineEnd?: Property.InsetInlineEnd<TLength> | undefined; /** * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -2303,7 +2482,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-start */ - insetInlineStart?: InsetInlineStartProperty<TLength>; + insetInlineStart?: Property.InsetInlineStart<TLength> | undefined; /** * The **`isolation`** CSS property determines whether an element must create a new stacking context. * @@ -2317,7 +2496,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/isolation */ - isolation?: IsolationProperty; + isolation?: Property.Isolation | undefined; /** * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. * @@ -2332,7 +2511,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/justify-content */ - justifyContent?: JustifyContentProperty; + justifyContent?: Property.JustifyContent | undefined; /** * The CSS **`justify-items`** property defines the default `justify-self` for all items of the box, giving them all a default way of justifying each box along the appropriate axis. * @@ -2346,9 +2525,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/justify-items */ - justifyItems?: JustifyItemsProperty; + justifyItems?: Property.JustifyItems | undefined; /** - * The CSS **`justify-self`** property set the way a box is justified inside its alignment container along the appropriate axis. + * The CSS **`justify-self`** property sets the way a box is justified inside its alignment container along the appropriate axis. * * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]` * @@ -2360,9 +2539,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/justify-self */ - justifySelf?: JustifySelfProperty; + justifySelf?: Property.JustifySelf | undefined; /** - * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. + * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. * * **Syntax**: `[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#` * @@ -2374,9 +2553,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/justify-tracks */ - justifyTracks?: JustifyTracksProperty; + justifyTracks?: Property.JustifyTracks | undefined; /** - * The **`left`** CSS property participates in specifying the horizontal position of a _positioned element_. It has no effect on non-positioned elements. + * The **`left`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. * * **Syntax**: `<length> | <percentage> | auto` * @@ -2388,9 +2567,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/left */ - left?: LeftProperty<TLength>; + left?: Property.Left<TLength> | undefined; /** - * The **`letter-spacing`** CSS property sets the spacing behavior between text characters. + * The **`letter-spacing`** CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of `letter-spacing` causes characters to spread farther apart, while negative values of `letter-spacing` bring characters closer together. * * **Syntax**: `normal | <length>` * @@ -2402,7 +2581,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/letter-spacing */ - letterSpacing?: LetterSpacingProperty<TLength>; + letterSpacing?: Property.LetterSpacing<TLength> | undefined; /** * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. * @@ -2417,9 +2596,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/line-break */ - lineBreak?: LineBreakProperty; + lineBreak?: Property.LineBreak | undefined; /** - * The **`line-height`** CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. + * The **`line-height`** CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. * * **Syntax**: `normal | <number> | <length> | <percentage>` * @@ -2431,7 +2610,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/line-height */ - lineHeight?: LineHeightProperty<TLength>; + lineHeight?: Property.LineHeight<TLength> | undefined; /** * The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. * @@ -2445,7 +2624,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/line-height-step */ - lineHeightStep?: LineHeightStepProperty<TLength>; + lineHeightStep?: Property.LineHeightStep<TLength> | undefined; /** * The **`list-style-image`** CSS property sets an image to be used as the list item marker. * @@ -2459,7 +2638,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/list-style-image */ - listStyleImage?: ListStyleImageProperty; + listStyleImage?: Property.ListStyleImage | undefined; /** * The **`list-style-position`** CSS property sets the position of the `::marker` relative to a list item. * @@ -2473,7 +2652,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/list-style-position */ - listStylePosition?: ListStylePositionProperty; + listStylePosition?: Property.ListStylePosition | undefined; /** * The **`list-style-type`** CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. * @@ -2487,21 +2666,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type */ - listStyleType?: ListStyleTypeProperty; - /** - * The **`margin-block`** CSS property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block - */ - marginBlock?: MarginBlockProperty<TLength>; + listStyleType?: Property.ListStyleType | undefined; /** * The **`margin-block-end`** CSS property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. * @@ -2511,11 +2676,11 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-end */ - marginBlockEnd?: MarginBlockEndProperty<TLength>; + marginBlockEnd?: Property.MarginBlockEnd<TLength> | undefined; /** * The **`margin-block-start`** CSS property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. * @@ -2525,11 +2690,11 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-start */ - marginBlockStart?: MarginBlockStartProperty<TLength>; + marginBlockStart?: Property.MarginBlockStart<TLength> | undefined; /** * The **`margin-bottom`** CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. * @@ -2543,23 +2708,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin-bottom */ - marginBottom?: MarginBottomProperty<TLength>; + marginBottom?: Property.MarginBottom<TLength> | undefined; /** - * The **`margin-inline`** CSS property defines the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline - */ - marginInline?: MarginInlineProperty<TLength>; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * @@ -2567,14 +2718,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----------------------: | :-------------------: | :----------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * | 2 _(-webkit-margin-end)_ | 3 _(-moz-margin-end)_ | 3 _(-webkit-margin-end)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-end */ - marginInlineEnd?: MarginInlineEndProperty<TLength>; + marginInlineEnd?: Property.MarginInlineEnd<TLength> | undefined; /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * @@ -2582,12 +2733,12 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :------------------------: | :---------------------: | :------------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * | 2 _(-webkit-margin-start)_ | 3 _(-moz-margin-start)_ | 3 _(-webkit-margin-start)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-start */ - marginInlineStart?: MarginInlineStartProperty<TLength>; + marginInlineStart?: Property.MarginInlineStart<TLength> | undefined; /** * The **`margin-left`** CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. * @@ -2601,7 +2752,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin-left */ - marginLeft?: MarginLeftProperty<TLength>; + marginLeft?: Property.MarginLeft<TLength> | undefined; /** * The **`margin-right`** CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. * @@ -2615,7 +2766,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin-right */ - marginRight?: MarginRightProperty<TLength>; + marginRight?: Property.MarginRight<TLength> | undefined; /** * The **`margin-top`** CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. * @@ -2629,7 +2780,21 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin-top */ - marginTop?: MarginTopProperty<TLength>; + marginTop?: Property.MarginTop<TLength> | undefined; + /** + * The `margin-trim` property allows the container to trim the margins of its children where they adjoin the container's edges. + * + * **Syntax**: `none | in-flow | all` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | No | No | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-trim + */ + marginTrim?: Property.MarginTrim | undefined; /** * The **`mask-border-mode`** CSS property specifies the blending mode used in a mask border. * @@ -2637,7 +2802,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `alpha` */ - maskBorderMode?: MaskBorderModeProperty; + maskBorderMode?: Property.MaskBorderMode | undefined; /** * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. * @@ -2645,13 +2810,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-outset)_ | No | **3.1** _(-webkit-mask-box-image-outset)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-outset)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-outset)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-outset */ - maskBorderOutset?: MaskBorderOutsetProperty<TLength>; + maskBorderOutset?: Property.MaskBorderOutset<TLength> | undefined; /** * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. * @@ -2659,13 +2825,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `stretch` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-repeat)_ | No | **3.1** _(-webkit-mask-box-image-repeat)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-repeat)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-repeat)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat */ - maskBorderRepeat?: MaskBorderRepeatProperty; + maskBorderRepeat?: Property.MaskBorderRepeat | undefined; /** * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. * @@ -2673,13 +2840,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :--------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-slice)_ | No | **3.1** _(-webkit-mask-box-image-slice)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-slice)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-slice)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-slice */ - maskBorderSlice?: MaskBorderSliceProperty; + maskBorderSlice?: Property.MaskBorderSlice | undefined; /** * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. * @@ -2687,13 +2855,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-source)_ | No | **3.1** _(-webkit-mask-box-image-source)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-source)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-source)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-source */ - maskBorderSource?: MaskBorderSourceProperty; + maskBorderSource?: Property.MaskBorderSource | undefined; /** * The **`mask-border-width`** CSS property sets the width of an element's mask border. * @@ -2701,28 +2870,29 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :--------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-width)_ | No | **3.1** _(-webkit-mask-box-image-width)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-width)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-width)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-width */ - maskBorderWidth?: MaskBorderWidthProperty<TLength>; + maskBorderWidth?: Property.MaskBorderWidth<TLength> | undefined; /** - * The **`mask-clip`** CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area. + * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. * * **Syntax**: `[ <geometry-box> | no-clip ]#` * * **Initial value**: `border-box` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :--: | :-: | - * | **1** _-x-_ | **53** | **15.4** | n/a | No | - * | | | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * | 1 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-clip */ - maskClip?: MaskClipProperty; + maskClip?: Property.MaskClip | undefined; /** * The **`mask-composite`** CSS property represents a compositing operation used on the current mask layer with the mask layers below it. * @@ -2730,28 +2900,28 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `add` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :---: | :-: | - * | No | **53** | **15.4** | 18-79 | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-composite */ - maskComposite?: MaskCompositeProperty; + maskComposite?: Property.MaskComposite | undefined; /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. + * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. * * **Syntax**: `<mask-reference>#` * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 16-79 | No | - * | | | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 16-79 | No | + * | 1 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-image */ - maskImage?: MaskImageProperty; + maskImage?: Property.MaskImage | undefined; /** * The **`mask-mode`** CSS property sets whether the mask reference defined by `mask-image` is treated as a luminance or alpha mask. * @@ -2759,13 +2929,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `match-source` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | No | **53** | **15.4** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-mode */ - maskMode?: MaskModeProperty; + maskMode?: Property.MaskMode | undefined; /** * The **`mask-origin`** CSS property sets the origin of a mask. * @@ -2773,14 +2943,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `border-box` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :--: | :-: | - * | **1** _-x-_ | **53** | **15.4** | n/a | No | - * | | | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * | 1 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-origin */ - maskOrigin?: MaskOriginProperty; + maskOrigin?: Property.MaskOrigin | undefined; /** * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. * @@ -2788,29 +2958,29 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `center` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 3.1 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-position */ - maskPosition?: MaskPositionProperty<TLength>; + maskPosition?: Property.MaskPosition<TLength> | undefined; /** * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. * * **Syntax**: `<repeat-style>#` * - * **Initial value**: `no-repeat` + * **Initial value**: `repeat` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 3.1 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-repeat */ - maskRepeat?: MaskRepeatProperty; + maskRepeat?: Property.MaskRepeat | undefined; /** * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. * @@ -2818,14 +2988,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :---: | :-: | - * | **4** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 4 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-size */ - maskSize?: MaskSizeProperty<TLength>; + maskSize?: Property.MaskSize<TLength> | undefined; /** * The **`mask-type`** CSS property sets whether an SVG `<mask>` element is used as a _luminance_ or an _alpha_ mask. It applies to the `<mask>` element itself. * @@ -2839,7 +3009,21 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/mask-type */ - maskType?: MaskTypeProperty; + maskType?: Property.MaskType | undefined; + /** + * This feature is not Baseline because it does not work in some of the most widely-used browsers. + * + * **Syntax**: `[ pack | next ] || [ definite-first | ordered ]` + * + * **Initial value**: `pack` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------: | :--: | :-: | + * | No | No | **preview** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow + */ + masonryAutoFlow?: Property.MasonryAutoFlow | undefined; /** * The **`math-depth`** property describes a notion of _depth_ for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is `math`. * @@ -2847,13 +3031,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | n/a | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | **117** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/math-depth */ - mathDepth?: MathDepthProperty; + mathDepth?: Property.MathDepth | undefined; /** * The `math-shift` property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift. * @@ -2861,29 +3045,29 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | No | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | No | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/math-shift */ - mathShift?: MathShiftProperty; + mathShift?: Property.MathShift | undefined; /** - * The `math-style` property indicates whether MathML equations should render with normal or compact height. + * The `math-style` property indicates whether MathML equations should render with normal or compact height. * * **Syntax**: `normal | compact` * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | n/a | n/a | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **109** | **117** | **14.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/math-style */ - mathStyle?: MathStyleProperty; + mathStyle?: Property.MathStyle | undefined; /** - * The `**max-block-size**` CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. + * The **`max-block-size`** CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. * * **Syntax**: `<'max-width'>` * @@ -2895,7 +3079,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/max-block-size */ - maxBlockSize?: MaxBlockSizeProperty<TLength>; + maxBlockSize?: Property.MaxBlockSize<TLength> | undefined; /** * The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. * @@ -2909,9 +3093,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/max-height */ - maxHeight?: MaxHeightProperty<TLength>; + maxHeight?: Property.MaxHeight<TLength> | undefined; /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block depending on its writing mode. It corresponds to the `max-width` or the `max-height` property depending on the value defined for `writing-mode`. If the writing mode is vertically oriented, the value of `max-inline-size` relates to the maximal height of the element, otherwise it relates to the maximal width of the element. It relates to `max-block-size`, which defines the other dimension of the element. + * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. * * **Syntax**: `<'max-width'>` * @@ -2924,13 +3108,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/max-inline-size */ - maxInlineSize?: MaxInlineSizeProperty<TLength>; + maxInlineSize?: Property.MaxInlineSize<TLength> | undefined; /** * **Syntax**: `none | <integer>` * * **Initial value**: `none` */ - maxLines?: MaxLinesProperty; + maxLines?: Property.MaxLines | undefined; /** * The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. * @@ -2944,7 +3128,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/max-width */ - maxWidth?: MaxWidthProperty<TLength>; + maxWidth?: Property.MaxWidth<TLength> | undefined; /** * The **`min-block-size`** CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. * @@ -2958,7 +3142,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/min-block-size */ - minBlockSize?: MinBlockSizeProperty<TLength>; + minBlockSize?: Property.MinBlockSize<TLength> | undefined; /** * The **`min-height`** CSS property sets the minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `min-height`. * @@ -2972,7 +3156,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/min-height */ - minHeight?: MinHeightProperty<TLength>; + minHeight?: Property.MinHeight<TLength> | undefined; /** * The **`min-inline-size`** CSS property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. * @@ -2986,7 +3170,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/min-inline-size */ - minInlineSize?: MinInlineSizeProperty<TLength>; + minInlineSize?: Property.MinInlineSize<TLength> | undefined; /** * The **`min-width`** CSS property sets the minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `min-width`. * @@ -3000,7 +3184,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/min-width */ - minWidth?: MinWidthProperty<TLength>; + minWidth?: Property.MinWidth<TLength> | undefined; /** * The **`mix-blend-mode`** CSS property sets how an element's content should blend with the content of the element's parent and the element's background. * @@ -3014,9 +3198,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode */ - mixBlendMode?: MixBlendModeProperty; + mixBlendMode?: Property.MixBlendMode | undefined; /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path`. + * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. * * **Syntax**: `<length-percentage>` * @@ -3024,16 +3208,16 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | No | n/a | No | + * | **55** | **72** | **16** | n/a | No | * | 46 _(motion-distance)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance */ - motionDistance?: OffsetDistanceProperty<TLength>; + motionDistance?: Property.OffsetDistance<TLength> | undefined; /** * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. * - * **Syntax**: `none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]` + * **Syntax**: `none | <offset-path> || <coord-box>` * * **Initial value**: `none` * @@ -3044,9 +3228,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/offset-path */ - motionPath?: OffsetPathProperty; + motionPath?: Property.OffsetPath | undefined; /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. * * **Syntax**: `[ auto | reverse ] || <angle>` * @@ -3054,12 +3238,12 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | + * | **56** | **72** | **16** | n/a | No | * | 46 _(motion-rotation)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate */ - motionRotation?: OffsetRotateProperty; + motionRotation?: Property.OffsetRotate | undefined; /** * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. * @@ -3073,7 +3257,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/object-fit */ - objectFit?: ObjectFitProperty; + objectFit?: Property.ObjectFit | undefined; /** * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. * @@ -3087,21 +3271,21 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/object-position */ - objectPosition?: ObjectPositionProperty<TLength>; + objectPosition?: Property.ObjectPosition<TLength> | undefined; /** * **Syntax**: `auto | <position>` * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **72** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | **72** | **16** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-anchor */ - offsetAnchor?: OffsetAnchorProperty<TLength>; + offsetAnchor?: Property.OffsetAnchor<TLength> | undefined; /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path`. + * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. * * **Syntax**: `<length-percentage>` * @@ -3109,16 +3293,16 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | No | n/a | No | + * | **55** | **72** | **16** | n/a | No | * | 46 _(motion-distance)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance */ - offsetDistance?: OffsetDistanceProperty<TLength>; + offsetDistance?: Property.OffsetDistance<TLength> | undefined; /** * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. * - * **Syntax**: `none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]` + * **Syntax**: `none | <offset-path> || <coord-box>` * * **Initial value**: `none` * @@ -3129,9 +3313,21 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/offset-path */ - offsetPath?: OffsetPathProperty; + offsetPath?: Property.OffsetPath | undefined; /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. + * **Syntax**: `normal | auto | <position>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | n/a | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-position + */ + offsetPosition?: Property.OffsetPosition<TLength> | undefined; + /** + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. * * **Syntax**: `[ auto | reverse ] || <angle>` * @@ -3139,14 +3335,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | + * | **56** | **72** | **16** | n/a | No | * | 46 _(motion-rotation)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate */ - offsetRotate?: OffsetRotateProperty; + offsetRotate?: Property.OffsetRotate | undefined; /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. * * **Syntax**: `[ auto | reverse ] || <angle>` * @@ -3154,14 +3350,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | + * | **56** | **72** | **16** | n/a | No | * | 46 _(motion-rotation)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate */ - offsetRotation?: OffsetRotateProperty; + offsetRotation?: Property.OffsetRotate | undefined; /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. * * **Syntax**: `<alpha-value>` * @@ -3173,7 +3369,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/opacity */ - opacity?: OpacityProperty; + opacity?: Property.Opacity | undefined; /** * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. * @@ -3188,7 +3384,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/order */ - order?: GlobalsNumber; + order?: Property.Order | undefined; /** * The **`orphans`** CSS property sets the minimum number of lines in a block container that must be shown at the _bottom_ of a page, region, or column. * @@ -3202,7 +3398,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/orphans */ - orphans?: GlobalsNumber; + orphans?: Property.Orphans | undefined; /** * The **`outline-color`** CSS property sets the color of an element's outline. * @@ -3216,7 +3412,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/outline-color */ - outlineColor?: OutlineColorProperty; + outlineColor?: Property.OutlineColor | undefined; /** * The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element. * @@ -3230,7 +3426,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/outline-offset */ - outlineOffset?: OutlineOffsetProperty<TLength>; + outlineOffset?: Property.OutlineOffset<TLength> | undefined; /** * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. * @@ -3244,9 +3440,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/outline-style */ - outlineStyle?: OutlineStyleProperty; + outlineStyle?: Property.OutlineStyle | undefined; /** - * The **`outline-width`** CSS property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. * * **Syntax**: `<line-width>` * @@ -3258,7 +3454,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/outline-width */ - outlineWidth?: OutlineWidthProperty<TLength>; + outlineWidth?: Property.OutlineWidth<TLength> | undefined; /** * **Syntax**: `auto | none` * @@ -3270,7 +3466,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-anchor */ - overflowAnchor?: OverflowAnchorProperty; + overflowAnchor?: Property.OverflowAnchor | undefined; /** * **Syntax**: `visible | hidden | clip | scroll | auto` * @@ -3282,21 +3478,15 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-block */ - overflowBlock?: OverflowBlockProperty; + overflowBlock?: Property.OverflowBlock | undefined; /** * The **`overflow-clip-box`** CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the `overflow-clip-box-inline` and `overflow-clip-box-block` properties. * * **Syntax**: `padding-box | content-box` * * **Initial value**: `padding-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **29** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Mozilla/Gecko/Chrome/CSS/overflow-clip-box */ - overflowClipBox?: OverflowClipBoxProperty; + overflowClipBox?: Property.OverflowClipBox | undefined; /** * **Syntax**: `<visual-box> || <length [0,∞]>` * @@ -3304,11 +3494,11 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :----: | :--: | :-: | - * | **90** | No | No | n/a | No | + * | **90** | **102** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin */ - overflowClipMargin?: OverflowClipMarginProperty<TLength>; + overflowClipMargin?: Property.OverflowClipMargin<TLength> | undefined; /** * **Syntax**: `visible | hidden | clip | scroll | auto` * @@ -3320,9 +3510,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-inline */ - overflowInline?: OverflowInlineProperty; + overflowInline?: Property.OverflowInline | undefined; /** - * The `**overflow-wrap**` CSS property sets whether the browser should insert line breaks within words to prevent text from overflowing its content box. + * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. * * **Syntax**: `normal | break-word | anywhere` * @@ -3335,7 +3525,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-wrap */ - overflowWrap?: OverflowWrapProperty; + overflowWrap?: Property.OverflowWrap | undefined; /** * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. * @@ -3349,7 +3539,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-x */ - overflowX?: OverflowXProperty; + overflowX?: Property.OverflowX | undefined; /** * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. * @@ -3363,9 +3553,23 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-y */ - overflowY?: OverflowYProperty; + overflowY?: Property.OverflowY | undefined; /** - * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. + * The **`overlay`** CSS property specifies whether an element appearing in the top layer (for example, a shown popover or modal `<dialog>` element) is actually rendered in the top layer. This property is only relevant within a list of `transition-property` values, and only if `allow-discrete` is set as the `transition-behavior`. + * + * **Syntax**: `none | auto` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **117** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overlay + */ + overlay?: Property.Overlay | undefined; + /** + * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. * * **Syntax**: `contain | none | auto` * @@ -3377,9 +3581,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block */ - overscrollBehaviorBlock?: OverscrollBehaviorBlockProperty; + overscrollBehaviorBlock?: Property.OverscrollBehaviorBlock | undefined; /** - * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. + * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. * * **Syntax**: `contain | none | auto` * @@ -3391,7 +3595,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline */ - overscrollBehaviorInline?: OverscrollBehaviorInlineProperty; + overscrollBehaviorInline?: Property.OverscrollBehaviorInline | undefined; /** * The **`overscroll-behavior-x`** CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. * @@ -3405,7 +3609,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x */ - overscrollBehaviorX?: OverscrollBehaviorXProperty; + overscrollBehaviorX?: Property.OverscrollBehaviorX | undefined; /** * The **`overscroll-behavior-y`** CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. * @@ -3419,23 +3623,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y */ - overscrollBehaviorY?: OverscrollBehaviorYProperty; + overscrollBehaviorY?: Property.OverscrollBehaviorY | undefined; /** - * The **`padding-block`** CSS property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block - */ - paddingBlock?: PaddingBlockProperty<TLength>; - /** - * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * @@ -3443,13 +3633,13 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-end */ - paddingBlockEnd?: PaddingBlockEndProperty<TLength>; + paddingBlockEnd?: Property.PaddingBlockEnd<TLength> | undefined; /** - * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * @@ -3457,11 +3647,11 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-start */ - paddingBlockStart?: PaddingBlockStartProperty<TLength>; + paddingBlockStart?: Property.PaddingBlockStart<TLength> | undefined; /** * The **`padding-bottom`** CSS property sets the height of the padding area on the bottom of an element. * @@ -3475,23 +3665,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding-bottom */ - paddingBottom?: PaddingBottomProperty<TLength>; + paddingBottom?: Property.PaddingBottom<TLength> | undefined; /** - * The **`padding-inline`** CSS property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline - */ - paddingInline?: PaddingInlineProperty<TLength>; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * @@ -3499,14 +3675,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :-----------------------: | :--------------------: | :-----------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * | 2 _(-webkit-padding-end)_ | 3 _(-moz-padding-end)_ | 3 _(-webkit-padding-end)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-end */ - paddingInlineEnd?: PaddingInlineEndProperty<TLength>; + paddingInlineEnd?: Property.PaddingInlineEnd<TLength> | undefined; /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * @@ -3514,14 +3690,14 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :-------------------------: | :----------------------: | :-------------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * | 2 _(-webkit-padding-start)_ | 3 _(-moz-padding-start)_ | 3 _(-webkit-padding-start)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-start */ - paddingInlineStart?: PaddingInlineStartProperty<TLength>; + paddingInlineStart?: Property.PaddingInlineStart<TLength> | undefined; /** - * The **`padding-left`** CSS property sets the width of the padding area on the left side of an element. + * The **`padding-left`** CSS property sets the width of the padding area to the left of an element. * * **Syntax**: `<length> | <percentage>` * @@ -3533,9 +3709,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding-left */ - paddingLeft?: PaddingLeftProperty<TLength>; + paddingLeft?: Property.PaddingLeft<TLength> | undefined; /** - * The **`padding-right`** CSS property sets the width of the padding area on the right side of an element. + * The **`padding-right`** CSS property sets the width of the padding area on the right of an element. * * **Syntax**: `<length> | <percentage>` * @@ -3547,9 +3723,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding-right */ - paddingRight?: PaddingRightProperty<TLength>; + paddingRight?: Property.PaddingRight<TLength> | undefined; /** - * The **`padding-top`** padding area on the top of an element. + * The **`padding-top`** CSS property sets the height of the padding area on the top of an element. * * **Syntax**: `<length> | <percentage>` * @@ -3561,7 +3737,21 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding-top */ - paddingTop?: PaddingTopProperty<TLength>; + paddingTop?: Property.PaddingTop<TLength> | undefined; + /** + * The **`page`** CSS property is used to specify the named page, a specific type of page defined by the `@page` at-rule. + * + * **Syntax**: `auto | <custom-ident>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-------: | :--: | :-: | + * | **85** | **110** | **≤13.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page + */ + page?: Property.Page | undefined; /** * The **`page-break-after`** CSS property adjusts page breaks _after_ the current element. * @@ -3575,7 +3765,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/page-break-after */ - pageBreakAfter?: PageBreakAfterProperty; + pageBreakAfter?: Property.PageBreakAfter | undefined; /** * The **`page-break-before`** CSS property adjusts page breaks _before_ the current element. * @@ -3589,7 +3779,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/page-break-before */ - pageBreakBefore?: PageBreakBeforeProperty; + pageBreakBefore?: Property.PageBreakBefore | undefined; /** * The **`page-break-inside`** CSS property adjusts page breaks _inside_ the current element. * @@ -3603,7 +3793,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/page-break-inside */ - pageBreakInside?: PageBreakInsideProperty; + pageBreakInside?: Property.PageBreakInside | undefined; /** * The **`paint-order`** CSS property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn. * @@ -3617,22 +3807,22 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/paint-order */ - paintOrder?: PaintOrderProperty; + paintOrder?: Property.PaintOrder | undefined; /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. * * **Syntax**: `none | <length>` * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 12 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/perspective */ - perspective?: PerspectiveProperty<TLength>; + perspective?: Property.Perspective<TLength> | undefined; /** * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. * @@ -3640,30 +3830,16 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * **Initial value**: `50% 50%` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 12 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/perspective-origin */ - perspectiveOrigin?: PerspectiveOriginProperty<TLength>; + perspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; /** - * The `**place-content**` CSS property is a shorthand for `align-content` and `justify-content`. It can be used in any layout method which utilizes both of these alignment values. - * - * **Syntax**: `<'align-content'> <'justify-content'>?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-content - */ - placeContent?: PlaceContentProperty; - /** - * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of mouse events. + * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. * * **Syntax**: `auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit` * @@ -3675,7 +3851,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/pointer-events */ - pointerEvents?: PointerEventsProperty; + pointerEvents?: Property.PointerEvents | undefined; /** * The **`position`** CSS property sets how an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements. * @@ -3689,7 +3865,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/position */ - position?: PositionProperty; + position?: Property.Position | undefined; /** * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. * @@ -3704,9 +3880,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust */ - printColorAdjust?: PrintColorAdjustProperty; + printColorAdjust?: Property.PrintColorAdjust | undefined; /** - * The **`quotes`** CSS property sets how quotation marks appear. + * The **`quotes`** CSS property sets how the browser should render quotation marks that are added using the `open-quotes` or `close-quotes` values of the CSS `content` property. * * **Syntax**: `none | auto | [ <string> <string> ]+` * @@ -3718,7 +3894,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/quotes */ - quotes?: QuotesProperty; + quotes?: Property.Quotes | undefined; /** * The **`resize`** CSS property sets whether an element is resizable, and if so, in which directions. * @@ -3732,9 +3908,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/resize */ - resize?: ResizeProperty; + resize?: Property.Resize | undefined; /** - * The **`right`** CSS property participates in specifying the horizontal position of a _positioned element_. It has no effect on non-positioned elements. + * The **`right`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. * * **Syntax**: `<length> | <percentage> | auto` * @@ -3746,9 +3922,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/right */ - right?: RightProperty<TLength>; + right?: Property.Right<TLength> | undefined; /** - * The **`rotate`** CSS property allows you to specify rotation transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * The **`rotate`** CSS property allows you to specify rotation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` property. * * **Syntax**: `none | <angle> | [ x | y | z | <number>{3} ] && <angle>` * @@ -3760,9 +3936,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/rotate */ - rotate?: RotateProperty; + rotate?: Property.Rotate | undefined; /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's grid rows. + * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. * * **Syntax**: `normal | <length-percentage>` * @@ -3774,9 +3950,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/row-gap */ - rowGap?: RowGapProperty<TLength>; + rowGap?: Property.RowGap<TLength> | undefined; /** - * The `**ruby-align**` CSS property defines the distribution of the different ruby elements over the base. + * The **`ruby-align`** CSS property defines the distribution of the different ruby elements over the base. * * **Syntax**: `start | center | space-between | space-around` * @@ -3788,15 +3964,15 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/ruby-align */ - rubyAlign?: RubyAlignProperty; + rubyAlign?: Property.RubyAlign | undefined; /** * **Syntax**: `separate | collapse | auto` * * **Initial value**: `separate` */ - rubyMerge?: RubyMergeProperty; + rubyMerge?: Property.RubyMerge | undefined; /** - * The `**ruby-position**` CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (`over`), under it (`under`), or between the characters, on their right side (`inter-character`). + * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). * * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` * @@ -3809,9 +3985,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/ruby-position */ - rubyPosition?: RubyPositionProperty; + rubyPosition?: Property.RubyPosition | undefined; /** - * The **`scale`** CSS property allows you to specify scale transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * The **`scale`** CSS property allows you to specify scale transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. * * **Syntax**: `none | <number>{1,3}` * @@ -3823,7 +3999,7 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scale */ - scale?: ScaleProperty; + scale?: Property.Scale | undefined; /** * The **`scroll-behavior`** CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. * @@ -3837,66 +4013,37 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-behavior */ - scrollBehavior?: ScrollBehaviorProperty; + scrollBehavior?: Property.ScrollBehavior | undefined; /** - * The **`scroll-margin`** property is a shorthand property which sets all of the `scroll-margin` longhands, assigning values much like the `margin` property does for the `margin-*` longhands. - * - * **Syntax**: `<length>{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | **90** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - scrollMargin?: ScrollMarginProperty<TLength>; - /** - * The `scroll-margin-block` property is a shorthand property which sets the scroll-margin longhands in the block dimension. - * - * **Syntax**: `<length>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block - */ - scrollMarginBlock?: ScrollMarginBlockProperty<TLength>; - /** - * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end */ - scrollMarginBlockEnd?: ScrollMarginBlockEndProperty<TLength>; + scrollMarginBlockEnd?: Property.ScrollMarginBlockEnd<TLength> | undefined; /** - * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start */ - scrollMarginBlockStart?: ScrollMarginBlockStartProperty<TLength>; + scrollMarginBlockStart?: Property.ScrollMarginBlockStart<TLength> | undefined; /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -3909,51 +4056,37 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom */ - scrollMarginBottom?: ScrollMarginBottomProperty<TLength>; + scrollMarginBottom?: Property.ScrollMarginBottom<TLength> | undefined; /** - * The `scroll-margin-inline` property is a shorthand property which sets the scroll-margin longhands in the inline dimension. - * - * **Syntax**: `<length>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline - */ - scrollMarginInline?: ScrollMarginInlineProperty<TLength>; - /** - * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end */ - scrollMarginInlineEnd?: ScrollMarginInlineEndProperty<TLength>; + scrollMarginInlineEnd?: Property.ScrollMarginInlineEnd<TLength> | undefined; /** - * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start */ - scrollMarginInlineStart?: ScrollMarginInlineStartProperty<TLength>; + scrollMarginInlineStart?: Property.ScrollMarginInlineStart<TLength> | undefined; /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -3966,9 +4099,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left */ - scrollMarginLeft?: ScrollMarginLeftProperty<TLength>; + scrollMarginLeft?: Property.ScrollMarginLeft<TLength> | undefined; /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -3981,9 +4114,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right */ - scrollMarginRight?: ScrollMarginRightProperty<TLength>; + scrollMarginRight?: Property.ScrollMarginRight<TLength> | undefined; /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -3996,41 +4129,9 @@ export interface StandardLonghandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top */ - scrollMarginTop?: ScrollMarginTopProperty<TLength>; + scrollMarginTop?: Property.ScrollMarginTop<TLength> | undefined; /** - * The scroll-padding property is a shorthand property which sets all of the scroll-padding longhands, assigning values much like the padding property does for the padding-\* longhands. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding - */ - scrollPadding?: ScrollPaddingProperty<TLength>; - /** - * The `scroll-padding-block` property is a shorthand property which sets the scroll-padding longhands for the block dimension. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block - */ - scrollPaddingBlock?: ScrollPaddingBlockProperty<TLength>; - /** - * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -4042,9 +4143,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end */ - scrollPaddingBlockEnd?: ScrollPaddingBlockEndProperty<TLength>; + scrollPaddingBlockEnd?: Property.ScrollPaddingBlockEnd<TLength> | undefined; /** - * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -4056,9 +4157,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start */ - scrollPaddingBlockStart?: ScrollPaddingBlockStartProperty<TLength>; + scrollPaddingBlockStart?: Property.ScrollPaddingBlockStart<TLength> | undefined; /** - * The `scroll-padding-bottom` property defines offsets for the bottom of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-bottom` property defines offsets for the bottom of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -4070,25 +4171,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom */ - scrollPaddingBottom?: ScrollPaddingBottomProperty<TLength>; + scrollPaddingBottom?: Property.ScrollPaddingBottom<TLength> | undefined; /** - * The `scroll-padding-inline` property is a shorthand property which sets the scroll-padding longhands for the inline dimension. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline - */ - scrollPaddingInline?: ScrollPaddingInlineProperty<TLength>; - /** - * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -4100,9 +4185,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end */ - scrollPaddingInlineEnd?: ScrollPaddingInlineEndProperty<TLength>; + scrollPaddingInlineEnd?: Property.ScrollPaddingInlineEnd<TLength> | undefined; /** - * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -4114,9 +4199,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start */ - scrollPaddingInlineStart?: ScrollPaddingInlineStartProperty<TLength>; + scrollPaddingInlineStart?: Property.ScrollPaddingInlineStart<TLength> | undefined; /** - * The `scroll-padding-left` property defines offsets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-left` property defines offsets for the left of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -4128,9 +4213,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left */ - scrollPaddingLeft?: ScrollPaddingLeftProperty<TLength>; + scrollPaddingLeft?: Property.ScrollPaddingLeft<TLength> | undefined; /** - * The `scroll-padding-right` property defines offsets for the right of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-right` property defines offsets for the right of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -4142,9 +4227,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right */ - scrollPaddingRight?: ScrollPaddingRightProperty<TLength>; + scrollPaddingRight?: Property.ScrollPaddingRight<TLength> | undefined; /** - * The `scroll-padding-top` property defines offsets for the top of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The **`scroll-padding-top`** property defines offsets for the top of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -4156,9 +4241,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top */ - scrollPaddingTop?: ScrollPaddingTopProperty<TLength>; + scrollPaddingTop?: Property.ScrollPaddingTop<TLength> | undefined; /** - * The `scroll-snap-align` property specifies the box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. + * The `scroll-snap-align` property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. * * **Syntax**: `[ none | start | end | center ]{1,2}` * @@ -4170,24 +4255,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align */ - scrollSnapAlign?: ScrollSnapAlignProperty; + scrollSnapAlign?: Property.ScrollSnapAlign | undefined; /** - * The **`scroll-margin`** property is a shorthand property which sets all of the `scroll-margin` longhands, assigning values much like the `margin` property does for the `margin-*` longhands. - * - * **Syntax**: `<length>{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | 68-90 | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - scrollSnapMargin?: ScrollMarginProperty<TLength>; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -4200,9 +4270,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom */ - scrollSnapMarginBottom?: ScrollMarginBottomProperty<TLength>; + scrollSnapMarginBottom?: Property.ScrollMarginBottom<TLength> | undefined; /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -4215,9 +4285,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left */ - scrollSnapMarginLeft?: ScrollMarginLeftProperty<TLength>; + scrollSnapMarginLeft?: Property.ScrollMarginLeft<TLength> | undefined; /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -4230,9 +4300,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right */ - scrollSnapMarginRight?: ScrollMarginRightProperty<TLength>; + scrollSnapMarginRight?: Property.ScrollMarginRight<TLength> | undefined; /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -4245,9 +4315,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top */ - scrollSnapMarginTop?: ScrollMarginTopProperty<TLength>; + scrollSnapMarginTop?: Property.ScrollMarginTop<TLength> | undefined; /** - * The **`scroll-snap-stop`** CSS property defines whether the scroll container is allowed to "pass over" possible snap positions. + * The **`scroll-snap-stop`** CSS property defines whether or not the scroll container is allowed to "pass over" possible snap positions. * * **Syntax**: `normal | always` * @@ -4259,7 +4329,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop */ - scrollSnapStop?: ScrollSnapStopProperty; + scrollSnapStop?: Property.ScrollSnapStop | undefined; /** * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. * @@ -4274,7 +4344,35 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type */ - scrollSnapType?: ScrollSnapTypeProperty; + scrollSnapType?: Property.ScrollSnapType | undefined; + /** + * The **`scroll-timeline-axis`** CSS property can be used to specify the scrollbar that will be used to provide the timeline for a scroll-timeline animation. + * + * **Syntax**: `[ block | inline | x | y ]#` + * + * **Initial value**: `block` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis + */ + scrollTimelineAxis?: Property.ScrollTimelineAxis | undefined; + /** + * The **`scroll-timeline-name`** CSS property defines a name that can be used to identify an element as the source of a scroll timeline for an animation. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name + */ + scrollTimelineName?: Property.ScrollTimelineName | undefined; /** * The **`scrollbar-color`** CSS property sets the color of the scrollbar track and thumb. * @@ -4282,13 +4380,13 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **64** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **121** | **64** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-color */ - scrollbarColor?: ScrollbarColorProperty; + scrollbarColor?: Property.ScrollbarColor | undefined; /** * The **`scrollbar-gutter`** CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed. * @@ -4302,21 +4400,21 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter */ - scrollbarGutter?: ScrollbarGutterProperty; + scrollbarGutter?: Property.ScrollbarGutter | undefined; /** - * The `scrollbar-width` property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. + * The **`scrollbar-width`** property allows the author to set the maximum thickness of an element's scrollbars when they are shown. * * **Syntax**: `auto | thin | none` * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **64** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **121** | **64** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-width */ - scrollbarWidth?: ScrollbarWidthProperty; + scrollbarWidth?: Property.ScrollbarWidth | undefined; /** * The **`shape-image-threshold`** CSS property sets the alpha channel threshold used to extract the shape using an image as the value for `shape-outside`. * @@ -4330,7 +4428,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold */ - shapeImageThreshold?: ShapeImageThresholdProperty; + shapeImageThreshold?: Property.ShapeImageThreshold | undefined; /** * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. * @@ -4344,7 +4442,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/shape-margin */ - shapeMargin?: ShapeMarginProperty<TLength>; + shapeMargin?: Property.ShapeMargin<TLength> | undefined; /** * The **`shape-outside`** CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap. By default, inline content wraps around its margin box; `shape-outside` provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. * @@ -4358,9 +4456,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/shape-outside */ - shapeOutside?: ShapeOutsideProperty; + shapeOutside?: Property.ShapeOutside | undefined; /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). * * **Syntax**: `<integer> | <length>` * @@ -4373,7 +4471,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/tab-size */ - tabSize?: TabSizeProperty<TLength>; + tabSize?: Property.TabSize<TLength> | undefined; /** * The **`table-layout`** CSS property sets the algorithm used to lay out `<table>` cells, rows, and columns. * @@ -4387,9 +4485,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/table-layout */ - tableLayout?: TableLayoutProperty; + tableLayout?: Property.TableLayout | undefined; /** - * The **`text-align`** CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like `vertical-align` but in the horizontal direction. + * The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like `vertical-align` but in the horizontal direction. * * **Syntax**: `start | end | left | right | center | justify | match-parent` * @@ -4401,7 +4499,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-align */ - textAlign?: TextAlignProperty; + textAlign?: Property.TextAlign | undefined; /** * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. * @@ -4415,7 +4513,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-align-last */ - textAlignLast?: TextAlignLastProperty; + textAlignLast?: Property.TextAlignLast | undefined; /** * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. * @@ -4423,14 +4521,14 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :-----: | :------------------------------: | :---: | :------------------------------------: | - * | **48** | **48** | **5.1** _(-webkit-text-combine)_ | 15-79 | **11** _(-ms-text-combine-horizontal)_ | - * | 9 _(-webkit-text-combine)_ | | | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------: | :-----: | :--------------------------: | :----: | :------------------------------------: | + * | **48** | **48** | **15.4** | **79** | **11** _(-ms-text-combine-horizontal)_ | + * | 9 _(-webkit-text-combine)_ | | 5.1 _(-webkit-text-combine)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/text-combine-upright */ - textCombineUpright?: TextCombineUprightProperty; + textCombineUpright?: Property.TextCombineUpright | undefined; /** * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. * @@ -4445,7 +4543,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-color */ - textDecorationColor?: TextDecorationColorProperty; + textDecorationColor?: Property.TextDecorationColor | undefined; /** * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. * @@ -4460,9 +4558,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-line */ - textDecorationLine?: TextDecorationLineProperty; + textDecorationLine?: Property.TextDecorationLine | undefined; /** - * The **`text-decoration-skip`** CSS property sets what parts of an element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. + * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. * * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` * @@ -4475,7 +4573,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip */ - textDecorationSkip?: TextDecorationSkipProperty; + textDecorationSkip?: Property.TextDecorationSkip | undefined; /** * The **`text-decoration-skip-ink`** CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. * @@ -4489,7 +4587,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink */ - textDecorationSkipInk?: TextDecorationSkipInkProperty; + textDecorationSkipInk?: Property.TextDecorationSkipInk | undefined; /** * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. * @@ -4504,9 +4602,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-style */ - textDecorationStyle?: TextDecorationStyleProperty; + textDecorationStyle?: Property.TextDecorationStyle | undefined; /** - * The **`text-decoration-thickness`** CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline. + * The **`text-decoration-thickness`** CSS property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline. * * **Syntax**: `auto | from-font | <length> | <percentage> ` * @@ -4518,7 +4616,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness */ - textDecorationThickness?: TextDecorationThicknessProperty<TLength>; + textDecorationThickness?: Property.TextDecorationThickness<TLength> | undefined; /** * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. * @@ -4533,7 +4631,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color */ - textEmphasisColor?: TextEmphasisColorProperty; + textEmphasisColor?: Property.TextEmphasisColor | undefined; /** * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. * @@ -4548,7 +4646,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position */ - textEmphasisPosition?: GlobalsString; + textEmphasisPosition?: Property.TextEmphasisPosition | undefined; /** * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. * @@ -4563,7 +4661,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style */ - textEmphasisStyle?: TextEmphasisStyleProperty; + textEmphasisStyle?: Property.TextEmphasisStyle | undefined; /** * The **`text-indent`** CSS property sets the length of empty space (indentation) that is put before lines of text in a block. * @@ -4577,7 +4675,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-indent */ - textIndent?: TextIndentProperty<TLength>; + textIndent?: Property.TextIndent<TLength> | undefined; /** * The **`text-justify`** CSS property sets what type of justification should be applied to text when `text-align``: justify;` is set on an element. * @@ -4585,13 +4683,13 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | n/a | **55** | No | **12** | **11** | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :---: | :----: | + * | n/a | **55** | No | 12-79 | **11** | * * @see https://developer.mozilla.org/docs/Web/CSS/text-justify */ - textJustify?: TextJustifyProperty; + textJustify?: Property.TextJustify | undefined; /** * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. * @@ -4606,7 +4704,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-orientation */ - textOrientation?: TextOrientationProperty; + textOrientation?: Property.TextOrientation | undefined; /** * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. * @@ -4620,7 +4718,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-overflow */ - textOverflow?: TextOverflowProperty; + textOverflow?: Property.TextOverflow | undefined; /** * The **`text-rendering`** CSS property provides information to the rendering engine about what to optimize for when rendering text. * @@ -4634,7 +4732,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-rendering */ - textRendering?: TextRenderingProperty; + textRendering?: Property.TextRendering | undefined; /** * The **`text-shadow`** CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color. * @@ -4648,7 +4746,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-shadow */ - textShadow?: TextShadowProperty; + textShadow?: Property.TextShadow | undefined; /** * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. * @@ -4662,9 +4760,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-size-adjust */ - textSizeAdjust?: TextSizeAdjustProperty; + textSizeAdjust?: Property.TextSizeAdjust | undefined; /** - * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby + * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby. * * **Syntax**: `none | capitalize | uppercase | lowercase | full-width | full-size-kana` * @@ -4676,7 +4774,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-transform */ - textTransform?: TextTransformProperty; + textTransform?: Property.TextTransform | undefined; /** * The **`text-underline-offset`** CSS property sets the offset distance of an underline text decoration line (applied using `text-decoration`) from its original position. * @@ -4690,7 +4788,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-offset */ - textUnderlineOffset?: TextUnderlineOffsetProperty<TLength>; + textUnderlineOffset?: Property.TextUnderlineOffset<TLength> | undefined; /** * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. * @@ -4705,9 +4803,37 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-position */ - textUnderlinePosition?: TextUnderlinePositionProperty; + textUnderlinePosition?: Property.TextUnderlinePosition | undefined; /** - * The **`top`** CSS property participates in specifying the vertical position of a _positioned element_. It has no effect on non-positioned elements. + * The **`text-wrap`** CSS property controls how text inside an element is wrapped. The different values provide: + * + * **Syntax**: `wrap | nowrap | balance | stable | pretty` + * + * **Initial value**: `wrap` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **114** | **121** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-wrap + */ + textWrap?: Property.TextWrap | undefined; + /** + * The **`timeline-scope`** CSS property modifies the scope of a named animation timeline. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/timeline-scope + */ + timelineScope?: Property.TimelineScope | undefined; + /** + * The **`top`** CSS property participates in specifying the vertical position of a positioned element. It has no effect on non-positioned elements. * * **Syntax**: `<length> | <percentage> | auto` * @@ -4719,9 +4845,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/top */ - top?: TopProperty<TLength>; + top?: Property.Top<TLength> | undefined; /** - * The **`touch-action`** CSS property sets how a region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). + * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). * * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` * @@ -4734,7 +4860,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/touch-action */ - touchAction?: TouchActionProperty; + touchAction?: Property.TouchAction | undefined; /** * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. * @@ -4749,9 +4875,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/transform */ - transform?: TransformProperty; + transform?: Property.Transform | undefined; /** - * The **`transform-box`** CSS property defines the layout box to which the `transform` and `transform-origin` properties relate. + * The **`transform-box`** CSS property defines the layout box to which the `transform`, individual transform properties `translate`,`scale`, and `rotate`, and `transform-origin` properties relate. * * **Syntax**: `content-box | border-box | fill-box | stroke-box | view-box` * @@ -4763,7 +4889,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/transform-box */ - transformBox?: TransformBoxProperty; + transformBox?: Property.TransformBox | undefined; /** * The **`transform-origin`** CSS property sets the origin for an element's transformations. * @@ -4771,14 +4897,14 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `50% 50% 0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-------: | :-----: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 3.5 _-x-_ | 2 _-x-_ | | 9 _-x-_ | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :-----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 2 _-x-_ | | 9 _-x-_ | * * @see https://developer.mozilla.org/docs/Web/CSS/transform-origin */ - transformOrigin?: TransformOriginProperty<TLength>; + transformOrigin?: Property.TransformOrigin<TLength> | undefined; /** * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. * @@ -4786,14 +4912,28 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `flat` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :-: | - * | **36** | **16** | **9** | **12** | No | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :-: | + * | **36** | **16** | **9** | **12** | No | + * | 12 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transform-style */ - transformStyle?: TransformStyleProperty; + transformStyle?: Property.TransformStyle | undefined; + /** + * The **`transition-behavior`** CSS property specifies whether transitions will be started for properties whose animation behavior is discrete. + * + * **Syntax**: `<transition-behavior-value>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **117** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-behavior + */ + transitionBehavior?: Property.TransitionBehavior | undefined; /** * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. * @@ -4804,11 +4944,11 @@ The scroll-padding properties define offsets for the optimal viewing region of * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-----: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 4 _-x-_ | | | + * | 1 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition-delay */ - transitionDelay?: GlobalsString; + transitionDelay?: Property.TransitionDelay<TTime> | undefined; /** * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. * @@ -4819,11 +4959,11 @@ The scroll-padding properties define offsets for the optimal viewing region of * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-------: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition-duration */ - transitionDuration?: GlobalsString; + transitionDuration?: Property.TransitionDuration<TTime> | undefined; /** * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. * @@ -4834,11 +4974,11 @@ The scroll-padding properties define offsets for the optimal viewing region of * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-------: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition-property */ - transitionProperty?: TransitionPropertyProperty; + transitionProperty?: Property.TransitionProperty | undefined; /** * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. * @@ -4849,13 +4989,13 @@ The scroll-padding properties define offsets for the optimal viewing region of * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-------: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition-timing-function */ - transitionTimingFunction?: TransitionTimingFunctionProperty; + transitionTimingFunction?: Property.TransitionTimingFunction | undefined; /** - * The **`translate`** CSS property allows you to specify translation transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * The **`translate`** CSS property allows you to specify translation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. * * **Syntax**: `none | <length-percentage> [ <length-percentage> <length>? ]?` * @@ -4867,7 +5007,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/translate */ - translate?: TranslateProperty<TLength>; + translate?: Property.Translate<TLength> | undefined; /** * The **`unicode-bidi`** CSS property, together with the `direction` property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The `unicode-bidi` property overrides this algorithm and allows the developer to control the text embedding. * @@ -4881,9 +5021,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/unicode-bidi */ - unicodeBidi?: UnicodeBidiProperty; + unicodeBidi?: Property.UnicodeBidi | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `auto | text | none | contain | all` * @@ -4896,9 +5036,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/user-select */ - userSelect?: UserSelectProperty; + userSelect?: Property.UserSelect | undefined; /** - * The **`vertical-align`** CSS property sets vertical alignment of an inline or table-cell box. + * The **`vertical-align`** CSS property sets vertical alignment of an inline, inline-block or table-cell box. * * **Syntax**: `baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>` * @@ -4910,7 +5050,63 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/vertical-align */ - verticalAlign?: VerticalAlignProperty<TLength>; + verticalAlign?: Property.VerticalAlign<TLength> | undefined; + /** + * The **`view-timeline-axis`** CSS property is used to specify the scrollbar direction that will be used to provide the timeline for a _named view progress timeline_ animation, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline-axis` is set on the subject. See CSS scroll-driven animations for more details. + * + * **Syntax**: `[ block | inline | x | y ]#` + * + * **Initial value**: `block` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis + */ + viewTimelineAxis?: Property.ViewTimelineAxis | undefined; + /** + * The **`view-timeline-inset`** CSS property is used to specify one or two values representing an adjustment to the position of the scrollport (see Scroll container for more details) in which the subject element of a _named view progress timeline_ animation is deemed to be visible. Put another way, this allows you to specify start and/or end inset (or outset) values that offset the position of the timeline. + * + * **Syntax**: `[ [ auto | <length-percentage> ]{1,2} ]#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset + */ + viewTimelineInset?: Property.ViewTimelineInset<TLength> | undefined; + /** + * The **`view-timeline-name`** CSS property is used to define the name of a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-name + */ + viewTimelineName?: Property.ViewTimelineName | undefined; + /** + * The **`view-transition-name`** CSS property provides the selected element with a distinct identifying name (a `<custom-ident>`) and causes it to participate in a separate view transition from the root view transition — or no view transition if the `none` value is specified. + * + * **Syntax**: `none | <custom-ident>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **111** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-transition-name + */ + viewTransitionName?: Property.ViewTransitionName | undefined; /** * The **`visibility`** CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`. * @@ -4924,11 +5120,11 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/visibility */ - visibility?: VisibilityProperty; + visibility?: Property.Visibility | undefined; /** * The **`white-space`** CSS property sets how white space inside an element is handled. * - * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces` + * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces | [ <'white-space-collapse'> || <'text-wrap'> || <'white-space-trim'> ]` * * **Initial value**: `normal` * @@ -4938,7 +5134,27 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/white-space */ - whiteSpace?: WhiteSpaceProperty; + whiteSpace?: Property.WhiteSpace | undefined; + /** + * The **`white-space-collapse`** CSS property controls how white space inside an element is collapsed. + * + * **Syntax**: `collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces` + * + * **Initial value**: `collapse` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **114** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/white-space-collapse + */ + whiteSpaceCollapse?: Property.WhiteSpaceCollapse | undefined; + /** + * **Syntax**: `none | discard-before || discard-after || discard-inner` + * + * **Initial value**: `none` + */ + whiteSpaceTrim?: Property.WhiteSpaceTrim | undefined; /** * The **`widows`** CSS property sets the minimum number of lines in a block container that must be shown at the _top_ of a page, region, or column. * @@ -4952,9 +5168,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/widows */ - widows?: GlobalsNumber; + widows?: Property.Widows | undefined; /** - * The **`width`** CSS property sets an element's width. By default it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. + * The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. * * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` * @@ -4966,7 +5182,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/width */ - width?: WidthProperty<TLength>; + width?: Property.Width<TLength> | undefined; /** * The **`will-change`** CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is actually changed. These kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required. * @@ -4980,7 +5196,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/will-change */ - willChange?: WillChangeProperty; + willChange?: Property.WillChange | undefined; /** * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. * @@ -4994,7 +5210,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/word-break */ - wordBreak?: WordBreakProperty; + wordBreak?: Property.WordBreak | undefined; /** * The **`word-spacing`** CSS property sets the length of space between words and between tags. * @@ -5008,17 +5224,21 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/word-spacing */ - wordSpacing?: WordSpacingProperty<TLength>; + wordSpacing?: Property.WordSpacing<TLength> | undefined; /** - * The `**overflow-wrap**` CSS property sets whether the browser should insert line breaks within words to prevent text from overflowing its content box. + * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. * * **Syntax**: `normal | break-word` * * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :-----: | :-: | + * | **≤80** | **≤72** | **≤13.1** | **≤80** | No | */ - wordWrap?: WordWrapProperty; + wordWrap?: Property.WordWrap | undefined; /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). * * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` * @@ -5031,7 +5251,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/writing-mode */ - writingMode?: WritingModeProperty; + writingMode?: Property.WritingMode | undefined; /** * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one. * @@ -5045,7 +5265,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/z-index */ - zIndex?: ZIndexProperty; + zIndex?: Property.ZIndex | undefined; /** * The non-standard **`zoom`** CSS property can be used to control the magnification level of an element. `transform: scale()` should be used instead of this property, if possible. However, unlike CSS Transforms, `zoom` affects the layout size of the element. * @@ -5055,16 +5275,16 @@ The scroll-padding properties define offsets for the optimal viewing region of * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :-----: | :----: | :-----: | - * | **1** | No | **3.1** | **12** | **5.5** | + * | **1** | n/a | **3.1** | **12** | **5.5** | * * @see https://developer.mozilla.org/docs/Web/CSS/zoom */ - zoom?: ZoomProperty; + zoom?: Property.Zoom | undefined; } -export interface StandardShorthandProperties<TLength = string | 0> { +export interface StandardShorthandProperties<TLength = (string & {}) | 0, TTime = string & {}> { /** - * The `**all**` CSS shorthand property sets all of an element's properties (other than `unicode-bidi` and `direction`) to their initial or inherited values, or to the values specified in another stylesheet origin. + * The **`all`** shorthand CSS property resets all of an element's properties except `unicode-bidi`, `direction`, and CSS Custom Properties. It can set properties to their initial or inherited values, or to the values specified in another cascade layer or stylesheet origin. * * **Syntax**: `initial | inherit | unset | revert | revert-layer` * @@ -5076,9 +5296,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/all */ - all?: Globals; + all?: Property.All | undefined; /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. * * **Syntax**: `<single-animation>#` * @@ -5089,7 +5309,19 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation */ - animation?: AnimationProperty; + animation?: Property.Animation<TTime> | undefined; + /** + * The **`animation-range`** CSS shorthand property is used to set the start and end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start and end. + * + * **Syntax**: `[ <'animation-range-start'> <'animation-range-end'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range + */ + animationRange?: Property.AnimationRange<TLength> | undefined; /** * The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. * @@ -5101,7 +5333,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background */ - background?: BackgroundProperty<TLength>; + background?: Property.Background<TLength> | undefined; /** * The **`background-position`** CSS property sets the initial position for each background image. The position is relative to the position layer set by `background-origin`. * @@ -5115,9 +5347,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-position */ - backgroundPosition?: BackgroundPositionProperty<TLength>; + backgroundPosition?: Property.BackgroundPosition<TLength> | undefined; /** - * The **`border`** CSS property sets an element's border. It's a shorthand for `border-width`, `border-style`, and `border-color`. + * The **`border`** shorthand CSS property sets an element's border. It sets the values of `border-width`, `border-style`, and `border-color`. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -5127,9 +5359,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border */ - border?: BorderProperty<TLength>; + border?: Property.Border<TLength> | undefined; /** - * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. + * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. * * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` * @@ -5139,7 +5371,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block */ - borderBlock?: BorderBlockProperty<TLength>; + borderBlock?: Property.BorderBlock<TLength> | undefined; /** * The **`border-block-end`** CSS property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. * @@ -5151,7 +5383,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end */ - borderBlockEnd?: BorderBlockEndProperty<TLength>; + borderBlockEnd?: Property.BorderBlockEnd<TLength> | undefined; /** * The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. * @@ -5163,9 +5395,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start */ - borderBlockStart?: BorderBlockStartProperty<TLength>; + borderBlockStart?: Property.BorderBlockStart<TLength> | undefined; /** - * The **`border-bottom`** CSS property is a shorthand that sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. These properties set an element's bottom border. + * The **`border-bottom`** shorthand CSS property sets an element's bottom border. It sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -5175,9 +5407,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom */ - borderBottom?: BorderBottomProperty<TLength>; + borderBottom?: Property.BorderBottom<TLength> | undefined; /** - * The **`border-color`** shorthand CSS property sets the color of all sides of an element's border. + * The **`border-color`** shorthand CSS property sets the color of an element's border. * * **Syntax**: `<color>{1,4}` * @@ -5187,9 +5419,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-color */ - borderColor?: BorderColorProperty; + borderColor?: Property.BorderColor | undefined; /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. * * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` * @@ -5200,9 +5432,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image */ - borderImage?: BorderImageProperty; + borderImage?: Property.BorderImage | undefined; /** - * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. + * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. * * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` * @@ -5212,7 +5444,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline */ - borderInline?: BorderInlineProperty<TLength>; + borderInline?: Property.BorderInline<TLength> | undefined; /** * The **`border-inline-end`** CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. * @@ -5224,7 +5456,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end */ - borderInlineEnd?: BorderInlineEndProperty<TLength>; + borderInlineEnd?: Property.BorderInlineEnd<TLength> | undefined; /** * The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. * @@ -5236,9 +5468,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start */ - borderInlineStart?: BorderInlineStartProperty<TLength>; + borderInlineStart?: Property.BorderInlineStart<TLength> | undefined; /** - * The **`border-left`** CSS property is a shorthand that sets the values of `border-left-width`, `border-left-style` and `border-left-color`. These properties set an element's left border. + * The **`border-left`** shorthand CSS property sets all the properties of an element's left border. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -5248,7 +5480,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-left */ - borderLeft?: BorderLeftProperty<TLength>; + borderLeft?: Property.BorderLeft<TLength> | undefined; /** * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. * @@ -5261,9 +5493,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-radius */ - borderRadius?: BorderRadiusProperty<TLength>; + borderRadius?: Property.BorderRadius<TLength> | undefined; /** - * The **`border-right`** CSS property is a shorthand that sets the values of `border-right-width`, `border-right-style` and `border-right-color`. These properties set an element's right border. + * The **`border-right`** shorthand CSS property sets all the properties of an element's right border. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -5273,9 +5505,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-right */ - borderRight?: BorderRightProperty<TLength>; + borderRight?: Property.BorderRight<TLength> | undefined; /** - * The **`border-style`** CSS property is a shorthand property that sets the line style for all four sides of an element's border. + * The **`border-style`** shorthand CSS property sets the line style for all four sides of an element's border. * * **Syntax**: `<line-style>{1,4}` * @@ -5285,9 +5517,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-style */ - borderStyle?: BorderStyleProperty; + borderStyle?: Property.BorderStyle | undefined; /** - * The **`border-top`** CSS property is a shorthand that sets the values of `border-top-width`, `border-top-style` and `border-top-color`. These properties set an element's top border. + * The **`border-top`** shorthand CSS property sets all the properties of an element's top border. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -5297,9 +5529,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top */ - borderTop?: BorderTopProperty<TLength>; + borderTop?: Property.BorderTop<TLength> | undefined; /** - * The **`border-width`** shorthand CSS property sets the widths of all four sides of an element's border. + * The **`border-width`** shorthand CSS property sets the width of an element's border. * * **Syntax**: `<line-width>{1,4}` * @@ -5309,9 +5541,11 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-width */ - borderWidth?: BorderWidthProperty<TLength>; + borderWidth?: Property.BorderWidth<TLength> | undefined; + /** **Syntax**: `<'caret-color'> || <'caret-shape'>` */ + caret?: Property.Caret | undefined; /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` * @@ -5322,9 +5556,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-rule */ - columnRule?: ColumnRuleProperty<TLength>; + columnRule?: Property.ColumnRule<TLength> | undefined; /** - * The **`columns`** CSS property sets the column width and column count of an element. + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. * * **Syntax**: `<'column-width'> || <'column-count'>` * @@ -5335,9 +5569,33 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/columns */ - columns?: ColumnsProperty<TLength>; + columns?: Property.Columns<TLength> | undefined; /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. + * The **`contain-intrinsic-size`** CSS shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment. + * + * **Syntax**: `[ auto? [ none | <length> ] ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **83** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size + */ + containIntrinsicSize?: Property.ContainIntrinsicSize<TLength> | undefined; + /** + * The **container** shorthand CSS property establishes the element as a query container and specifies the name or name for the containment context used in a container query. + * + * **Syntax**: `<'container-name'> [ / <'container-type'> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container + */ + container?: Property.Container | undefined; + /** + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. * * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` * @@ -5348,9 +5606,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex */ - flex?: FlexProperty<TLength>; + flex?: Property.Flex<TLength> | undefined; /** - * The **`flex-flow`** CSS property is a shorthand property for `flex-direction` and `flex-wrap` properties. + * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. * * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` * @@ -5361,9 +5619,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-flow */ - flexFlow?: FlexFlowProperty; + flexFlow?: Property.FlexFlow | undefined; /** - * The **`font`** CSS property is a shorthand for `font-style`, `font-variant`, `font-weight`, `font-size`, `line-height`, and `font-family`. Alternatively, it sets an element's font to a system font. + * The **`font`** CSS shorthand property sets all the different properties of an element's font. Alternatively, it sets an element's font to a system font. * * **Syntax**: `[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar` * @@ -5373,7 +5631,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font */ - font?: FontProperty; + font?: Property.Font | undefined; /** * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. * @@ -5385,9 +5643,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/gap */ - gap?: GapProperty<TLength>; + gap?: Property.Gap<TLength> | undefined; /** - * The **`grid`** CSS property is a shorthand property that sets all of the explicit grid properties (`grid-template-rows`, `grid-template-columns`, and `grid-template-areas`), and all the implicit grid properties (`grid-auto-rows`, `grid-auto-columns`, and `grid-auto-flow`), in a single declaration. + * The **`grid`** CSS property is a shorthand property that sets all of the explicit and implicit grid properties in a single declaration. * * **Syntax**: `<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>` * @@ -5397,9 +5655,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid */ - grid?: GridProperty; + grid?: Property.Grid | undefined; /** - * The **`grid-area`** CSS property is a shorthand property for `grid-row-start`, `grid-column-start`, `grid-row-end` and `grid-column-end`, specifying a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. + * The **`grid-area`** CSS shorthand property specifies a grid item's size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. * * **Syntax**: `<grid-line> [ / <grid-line> ]{0,3}` * @@ -5409,9 +5667,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-area */ - gridArea?: GridAreaProperty; + gridArea?: Property.GridArea | undefined; /** - * The **`grid-column`** CSS property is a shorthand property for `grid-column-start` and `grid-column-end` specifying a grid item's size and location within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. + * The **`grid-column`** CSS shorthand property specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. * * **Syntax**: `<grid-line> [ / <grid-line> ]?` * @@ -5421,9 +5679,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-column */ - gridColumn?: GridColumnProperty; + gridColumn?: Property.GridColumn | undefined; /** - * The **`grid-row`** CSS property is a shorthand property for `grid-row-start` and `grid-row-end` specifying a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. + * The **`grid-row`** CSS shorthand property specifies a grid item's size and location within a grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. * * **Syntax**: `<grid-line> [ / <grid-line> ]?` * @@ -5433,9 +5691,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-row */ - gridRow?: GridRowProperty; + gridRow?: Property.GridRow | undefined; /** - * The **`grid-template`** CSS property is a shorthand property for defining grid columns, rows, and areas. + * The **`grid-template`** CSS property is a shorthand property for defining grid columns, grid rows, and grid areas. * * **Syntax**: `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?` * @@ -5445,15 +5703,51 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-template */ - gridTemplate?: GridTemplateProperty; + gridTemplate?: Property.GridTemplate | undefined; + /** + * The **`inset`** CSS property is a shorthand that corresponds to the `top`, `right`, `bottom`, and/or `left` properties. It has the same multi-value syntax of the `margin` shorthand. + * + * **Syntax**: `<'top'>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset + */ + inset?: Property.Inset<TLength> | undefined; + /** + * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-block + */ + insetBlock?: Property.InsetBlock<TLength> | undefined; + /** + * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline + */ + insetInline?: Property.InsetInline<TLength> | undefined; /** * **Syntax**: `none | <integer>` * * **Initial value**: `none` */ - lineClamp?: LineClampProperty; + lineClamp?: Property.LineClamp | undefined; /** - * The **`list-style`** CSS property is a shorthand to set list style properties `list-style-type`, `list-style-image`, and `list-style-position`. + * The **`list-style`** CSS shorthand property allows you to set all the list style properties at once. * * **Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>` * @@ -5463,9 +5757,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/list-style */ - listStyle?: ListStyleProperty; + listStyle?: Property.ListStyle | undefined; /** - * The **`margin`** CSS property sets the margin area on all four sides of an element. It is a shorthand for `margin-top`, `margin-right`, `margin-bottom`, and `margin-left`. + * The **`margin`** CSS shorthand property sets the margin area on all four sides of an element. * * **Syntax**: `[ <length> | <percentage> | auto ]{1,4}` * @@ -5475,33 +5769,59 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin */ - margin?: MarginProperty<TLength>; + margin?: Property.Margin<TLength> | undefined; /** - * The **`mask`** CSS property hides an element (partially or fully) by masking or clipping the image at specific points. + * The **`margin-block`** CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-block + */ + marginBlock?: Property.MarginBlock<TLength> | undefined; + /** + * The **`margin-inline`** CSS shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline + */ + marginInline?: Property.MarginInline<TLength> | undefined; + /** + * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. * * **Syntax**: `<mask-layer>#` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :---: | :-: | - * | **1** | **2** | **3.1** | 12-79 | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-------: | :---: | :-: | + * | **1** | **53** | **15.4** | 12-79 | No | + * | | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask */ - mask?: MaskProperty<TLength>; + mask?: Property.Mask<TLength> | undefined; /** - * The **`mask-border`** CSS property lets you create a mask along the edge of an element's border. + * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. * * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :-----: | :--------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image)_ | No | **3.1** _(-webkit-mask-box-image)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------: | :-----: | :----------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border */ - maskBorder?: MaskBorderProperty; + maskBorder?: Property.MaskBorder | undefined; /** - * The **`offset`** CSS property is a shorthand property for animating an element along a defined path. + * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. * * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` * @@ -5512,9 +5832,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/offset */ - motion?: OffsetProperty<TLength>; + motion?: Property.Offset<TLength> | undefined; /** - * The **`offset`** CSS property is a shorthand property for animating an element along a defined path. + * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. * * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` * @@ -5525,21 +5845,21 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/offset */ - offset?: OffsetProperty<TLength>; + offset?: Property.Offset<TLength> | undefined; /** - * The **`outline`** CSS property is a shorthand to set various outline properties in a single declaration: `outline-style`, `outline-width`, and `outline-color`. + * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. * * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :---: | + * | **94** | **88** | **16.4** | **94** | **8** | * * @see https://developer.mozilla.org/docs/Web/CSS/outline */ - outline?: OutlineProperty<TLength>; + outline?: Property.Outline<TLength> | undefined; /** - * The **`overflow`** CSS property sets what to do when an element's content is too big to fit in its block formatting context. It is a shorthand for `overflow-x` and `overflow-y`. + * The **`overflow`** CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to fit in its block formatting context — in both directions. * * **Syntax**: `[ visible | hidden | clip | scroll | auto ]{1,2}` * @@ -5551,7 +5871,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow */ - overflow?: OverflowProperty; + overflow?: Property.Overflow | undefined; /** * The **`overscroll-behavior`** CSS property sets what a browser does when reaching the boundary of a scrolling area. It's a shorthand for `overscroll-behavior-x` and `overscroll-behavior-y`. * @@ -5565,9 +5885,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior */ - overscrollBehavior?: OverscrollBehaviorProperty; + overscrollBehavior?: Property.OverscrollBehavior | undefined; /** - * The **`padding`** CSS property sets the padding area on all four sides of an element. It is a shorthand for `padding-top`, `padding-right`, `padding-bottom`, and `padding-left`. + * The **`padding`** CSS shorthand property sets the padding area on all four sides of an element at once. * * **Syntax**: `[ <length> | <percentage> ]{1,4}` * @@ -5577,9 +5897,45 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding */ - padding?: PaddingProperty<TLength>; + padding?: Property.Padding<TLength> | undefined; /** - * The CSS **`place-items`** shorthand property sets the `align-items` and `justify-items` properties, respectively. If the second value is not set, the first value is also used for it. + * The **`padding-block`** CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-block + */ + paddingBlock?: Property.PaddingBlock<TLength> | undefined; + /** + * The **`padding-inline`** CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline + */ + paddingInline?: Property.PaddingInline<TLength> | undefined; + /** + * The **`place-content`** CSS shorthand property allows you to align content along both the block and inline directions at once (i.e. the `align-content` and `justify-content` properties) in a relevant layout system such as Grid or Flexbox. + * + * **Syntax**: `<'align-content'> <'justify-content'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **59** | **45** | **9** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/place-content + */ + placeContent?: Property.PlaceContent | undefined; + /** + * The CSS **`place-items`** shorthand property allows you to align items along both the block and inline directions at once (i.e. the `align-items` and `justify-items` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not set, the first value is also used for it. * * **Syntax**: `<'align-items'> <'justify-items'>?` * @@ -5589,9 +5945,9 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/place-items */ - placeItems?: PlaceItemsProperty; + placeItems?: Property.PlaceItems | undefined; /** - * The **`place-self`** CSS property is a shorthand property sets both the `align-self` and `justify-self` properties. The first value is the `align-self` property value, the second the `justify-self` one. If the second value is not present, the first value is also used for it. + * The **`place-self`** CSS shorthand property allows you to align an individual item in both the block and inline directions at once (i.e. the `align-self` and `justify-self` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not present, the first value is also used for it. * * **Syntax**: `<'align-self'> <'justify-self'>?` * @@ -5601,9 +5957,107 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/place-self */ - placeSelf?: PlaceSelfProperty; + placeSelf?: Property.PlaceSelf | undefined; /** - * The **`text-decoration`** CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, and `text-decoration-style`. + * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. + * + * **Syntax**: `<length>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------: | :--: | :-: | + * | **69** | **90** | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin + */ + scrollMargin?: Property.ScrollMargin<TLength> | undefined; + /** + * The `scroll-margin-block` shorthand property sets the scroll margins of an element in the block dimension. + * + * **Syntax**: `<length>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block + */ + scrollMarginBlock?: Property.ScrollMarginBlock<TLength> | undefined; + /** + * The `scroll-margin-inline` shorthand property sets the scroll margins of an element in the inline dimension. + * + * **Syntax**: `<length>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline + */ + scrollMarginInline?: Property.ScrollMarginInline<TLength> | undefined; + /** + * The **`scroll-padding`** shorthand property sets scroll padding on all sides of an element at once, much like the `padding` property does for padding on an element. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **69** | **68** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding + */ + scrollPadding?: Property.ScrollPadding<TLength> | undefined; + /** + * The `scroll-padding-block` shorthand property sets the scroll padding of an element in the block dimension. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block + */ + scrollPaddingBlock?: Property.ScrollPaddingBlock<TLength> | undefined; + /** + * The `scroll-padding-inline` shorthand property sets the scroll padding of an element in the inline dimension. + * + * **Syntax**: `[ auto | <length-percentage> ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline + */ + scrollPaddingInline?: Property.ScrollPaddingInline<TLength> | undefined; + /** + * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. + * + * **Syntax**: `<length>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-----------------------: | :--: | :-: | + * | **69** | 68-90 | **14.1** | n/a | No | + * | | | 11 _(scroll-snap-margin)_ | | | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin + */ + scrollSnapMargin?: Property.ScrollMargin<TLength> | undefined; + /** + * The **`scroll-timeline`** CSS shorthand property defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline. + * + * **Syntax**: `[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline + */ + scrollTimeline?: Property.ScrollTimeline | undefined; + /** + * The **`text-decoration`** shorthand CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, `text-decoration-style`, and the newer `text-decoration-thickness` property. * * **Syntax**: `<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>` * @@ -5613,7 +6067,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration */ - textDecoration?: TextDecorationProperty<TLength>; + textDecoration?: Property.TextDecoration<TLength> | undefined; /** * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. * @@ -5626,7 +6080,7 @@ export interface StandardShorthandProperties<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis */ - textEmphasis?: TextEmphasisProperty; + textEmphasis?: Property.TextEmphasis | undefined; /** * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. * @@ -5635,32 +6089,46 @@ export interface StandardShorthandProperties<TLength = string | 0> { * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-------: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition */ - transition?: TransitionProperty; + transition?: Property.Transition<TTime> | undefined; + /** + * The **`view-timeline`** CSS shorthand property is used to define a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. + * + * **Syntax**: `[ <'view-timeline-name'> <'view-timeline-axis'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline + */ + viewTimeline?: Property.ViewTimeline | undefined; } -export interface StandardProperties<TLength = string | 0> extends StandardLonghandProperties<TLength>, StandardShorthandProperties<TLength> {} +export interface StandardProperties<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardLonghandProperties<TLength, TTime>, + StandardShorthandProperties<TLength, TTime> {} -export interface VendorLonghandProperties<TLength = string | 0> { +export interface VendorLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> { /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. * * **Syntax**: `<time>#` * * **Initial value**: `0s` */ - MozAnimationDelay?: GlobalsString; + MozAnimationDelay?: Property.AnimationDelay<TTime> | undefined; /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. * * **Syntax**: `<single-animation-direction>#` * * **Initial value**: `normal` */ - MozAnimationDirection?: AnimationDirectionProperty; + MozAnimationDirection?: Property.AnimationDirection | undefined; /** * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. * @@ -5668,7 +6136,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0s` */ - MozAnimationDuration?: GlobalsString; + MozAnimationDuration?: Property.AnimationDuration<TTime> | undefined; /** * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. * @@ -5676,23 +6144,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - MozAnimationFillMode?: AnimationFillModeProperty; + MozAnimationFillMode?: Property.AnimationFillMode | undefined; /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. * * **Syntax**: `<single-animation-iteration-count>#` * * **Initial value**: `1` */ - MozAnimationIterationCount?: AnimationIterationCountProperty; + MozAnimationIterationCount?: Property.AnimationIterationCount | undefined; /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. * * **Syntax**: `[ none | <keyframes-name> ]#` * * **Initial value**: `none` */ - MozAnimationName?: AnimationNameProperty; + MozAnimationName?: Property.AnimationName | undefined; /** * The **`animation-play-state`** CSS property sets whether an animation is running or paused. * @@ -5700,31 +6168,31 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `running` */ - MozAnimationPlayState?: AnimationPlayStateProperty; + MozAnimationPlayState?: Property.AnimationPlayState | undefined; /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. * * **Syntax**: `<easing-function>#` * * **Initial value**: `ease` */ - MozAnimationTimingFunction?: AnimationTimingFunctionProperty; + MozAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. * * **Syntax**: `none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized` * * **Initial value**: `none` (but this value is overridden in the user agent CSS) */ - MozAppearance?: MozAppearanceProperty; + MozAppearance?: Property.MozAppearance | undefined; /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. * - * **Syntax**: `visible | hidden` + * **Syntax**: `<url> | none` * - * **Initial value**: `visible` + * **Initial value**: `none` */ - MozBackfaceVisibility?: BackfaceVisibilityProperty; + MozBinding?: Property.MozBinding | undefined; /** * In Mozilla applications like Firefox, the **`-moz-border-bottom-colors`** CSS property sets a list of colors for the bottom border. * @@ -5732,31 +6200,31 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - MozBorderBottomColors?: MozBorderBottomColorsProperty; + MozBorderBottomColors?: Property.MozBorderBottomColors | undefined; /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * * **Initial value**: `currentcolor` */ - MozBorderEndColor?: BorderInlineEndColorProperty; + MozBorderEndColor?: Property.BorderInlineEndColor | undefined; /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * * **Initial value**: `none` */ - MozBorderEndStyle?: BorderInlineEndStyleProperty; + MozBorderEndStyle?: Property.BorderInlineEndStyle | undefined; /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * * **Initial value**: `medium` */ - MozBorderEndWidth?: BorderInlineEndWidthProperty<TLength>; + MozBorderEndWidth?: Property.BorderInlineEndWidth<TLength> | undefined; /** * In Mozilla applications like Firefox, the **`-moz-border-left-colors`** CSS property sets a list of colors for the left border. * @@ -5764,7 +6232,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - MozBorderLeftColors?: MozBorderLeftColorsProperty; + MozBorderLeftColors?: Property.MozBorderLeftColors | undefined; /** * In Mozilla applications like Firefox, the **`-moz-border-right-colors`** CSS property sets a list of colors for the right border. * @@ -5772,23 +6240,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - MozBorderRightColors?: MozBorderRightColorsProperty; + MozBorderRightColors?: Property.MozBorderRightColors | undefined; /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * * **Initial value**: `currentcolor` */ - MozBorderStartColor?: BorderInlineStartColorProperty; + MozBorderStartColor?: Property.BorderInlineStartColor | undefined; /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * * **Initial value**: `none` */ - MozBorderStartStyle?: BorderInlineStartStyleProperty; + MozBorderStartStyle?: Property.BorderInlineStartStyle | undefined; /** * In Mozilla applications like Firefox, the **`-moz-border-top-colors`** CSS property sets a list of colors for the top border. * @@ -5796,15 +6264,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - MozBorderTopColors?: MozBorderTopColorsProperty; + MozBorderTopColors?: Property.MozBorderTopColors | undefined; /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. * * **Syntax**: `content-box | border-box` * * **Initial value**: `content-box` */ - MozBoxSizing?: BoxSizingProperty; + MozBoxSizing?: Property.BoxSizing | undefined; /** * The **`column-count`** CSS property breaks an element's content into the specified number of columns. * @@ -5812,7 +6280,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - MozColumnCount?: ColumnCountProperty; + MozColumnCount?: Property.ColumnCount | undefined; /** * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. * @@ -5820,15 +6288,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `balance` */ - MozColumnFill?: ColumnFillProperty; + MozColumnFill?: Property.ColumnFill | undefined; /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<color>` * * **Initial value**: `currentcolor` */ - MozColumnRuleColor?: ColumnRuleColorProperty; + MozColumnRuleColor?: Property.ColumnRuleColor | undefined; /** * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. * @@ -5836,31 +6304,31 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - MozColumnRuleStyle?: ColumnRuleStyleProperty; + MozColumnRuleStyle?: Property.ColumnRuleStyle | undefined; /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'border-width'>` * * **Initial value**: `medium` */ - MozColumnRuleWidth?: ColumnRuleWidthProperty<TLength>; + MozColumnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. * * **Syntax**: `<length> | auto` * * **Initial value**: `auto` */ - MozColumnWidth?: ColumnWidthProperty<TLength>; + MozColumnWidth?: Property.ColumnWidth<TLength> | undefined; /** - * If you reference an SVG image in a webpage (such as with the `<img>` element or as a background image), the SVG image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element. To do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the **`-moz-context-properties`** property, and the image needs to opt in to using those properties by using values such as the `context-fill` value. + * The **`-moz-context-properties`** property can be used within privileged contexts in Firefox to share the values of specified properties of the element with a child SVG image. * * **Syntax**: `none | [ fill | fill-opacity | stroke | stroke-opacity ]#` * * **Initial value**: `none` */ - MozContextProperties?: MozContextPropertiesProperty; + MozContextProperties?: Property.MozContextProperties | undefined; /** * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. * @@ -5868,7 +6336,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` */ - MozFontFeatureSettings?: FontFeatureSettingsProperty; + MozFontFeatureSettings?: Property.FontFeatureSettings | undefined; /** * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. * @@ -5876,15 +6344,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` */ - MozFontLanguageOverride?: FontLanguageOverrideProperty; + MozFontLanguageOverride?: Property.FontLanguageOverride | undefined; /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. * * **Syntax**: `none | manual | auto` * * **Initial value**: `manual` */ - MozHyphens?: HyphensProperty; + MozHyphens?: Property.Hyphens | undefined; /** * For certain XUL elements and pseudo-elements that use an image from the `list-style-image` property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. * @@ -5892,23 +6360,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - MozImageRegion?: MozImageRegionProperty; + MozImageRegion?: Property.MozImageRegion | undefined; /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * * **Initial value**: `0` */ - MozMarginEnd?: MarginInlineEndProperty<TLength>; + MozMarginEnd?: Property.MarginInlineEnd<TLength> | undefined; /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * * **Initial value**: `0` */ - MozMarginStart?: MarginInlineStartProperty<TLength>; + MozMarginStart?: Property.MarginInlineStart<TLength> | undefined; /** * The **`-moz-orient`** CSS property specifies the orientation of the element to which it's applied. * @@ -5916,7 +6384,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `inline` */ - MozOrient?: MozOrientProperty; + MozOrient?: Property.MozOrient | undefined; /** * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. * @@ -5924,55 +6392,71 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - MozOsxFontSmoothing?: FontSmoothProperty<TLength>; + MozOsxFontSmoothing?: Property.FontSmooth<TLength> | undefined; /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + MozOutlineRadiusBottomleft?: Property.MozOutlineRadiusBottomleft<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + MozOutlineRadiusBottomright?: Property.MozOutlineRadiusBottomright<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + MozOutlineRadiusTopleft?: Property.MozOutlineRadiusTopleft<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + MozOutlineRadiusTopright?: Property.MozOutlineRadiusTopright<TLength> | undefined; + /** + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * * **Initial value**: `0` */ - MozPaddingEnd?: PaddingInlineEndProperty<TLength>; + MozPaddingEnd?: Property.PaddingInlineEnd<TLength> | undefined; /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * * **Initial value**: `0` */ - MozPaddingStart?: PaddingInlineStartProperty<TLength>; + MozPaddingStart?: Property.PaddingInlineStart<TLength> | undefined; /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - */ - MozPerspective?: PerspectiveProperty<TLength>; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - */ - MozPerspectiveOrigin?: PerspectiveOriginProperty<TLength>; - /** - * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `stack` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. + * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `<xul:stack>` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. * * **Syntax**: `ignore | stretch-to-fit` * * **Initial value**: `stretch-to-fit` */ - MozStackSizing?: MozStackSizingProperty; + MozStackSizing?: Property.MozStackSizing | undefined; /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). * * **Syntax**: `<integer> | <length>` * * **Initial value**: `8` */ - MozTabSize?: TabSizeProperty<TLength>; + MozTabSize?: Property.TabSize<TLength> | undefined; /** * The **`-moz-text-blink`** non-standard Mozilla CSS extension specifies the blink mode. * @@ -5980,7 +6464,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - MozTextBlink?: MozTextBlinkProperty; + MozTextBlink?: Property.MozTextBlink | undefined; /** * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. * @@ -5988,55 +6472,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). */ - MozTextSizeAdjust?: TextSizeAdjustProperty; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - MozTransformOrigin?: TransformOriginProperty<TLength>; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - */ - MozTransformStyle?: TransformStyleProperty; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - MozTransitionDelay?: GlobalsString; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - MozTransitionDuration?: GlobalsString; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - MozTransitionProperty?: TransitionPropertyProperty; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - MozTransitionTimingFunction?: TransitionTimingFunctionProperty; + MozTextSizeAdjust?: Property.TextSizeAdjust | undefined; /** * The **`-moz-user-focus`** CSS property is used to indicate whether an element can have the focus. * @@ -6044,23 +6480,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - MozUserFocus?: MozUserFocusProperty; + MozUserFocus?: Property.MozUserFocus | undefined; /** - * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. + * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. * * **Syntax**: `read-only | read-write | write-only` * * **Initial value**: `read-only` */ - MozUserModify?: MozUserModifyProperty; + MozUserModify?: Property.MozUserModify | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `auto | text | none | contain | all` * * **Initial value**: `auto` */ - MozUserSelect?: UserSelectProperty; + MozUserSelect?: Property.UserSelect | undefined; /** * The **`-moz-window-dragging`** CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X. * @@ -6068,7 +6504,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `drag` */ - MozWindowDragging?: MozWindowDraggingProperty; + MozWindowDragging?: Property.MozWindowDragging | undefined; /** * The **`-moz-window-shadow`** CSS property specifies whether a window will have a shadow. It only works on Mac OS X. * @@ -6076,7 +6512,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `default` */ - MozWindowShadow?: MozWindowShadowProperty; + MozWindowShadow?: Property.MozWindowShadow | undefined; /** * The **`-ms-accelerator`** CSS property is a Microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut. * @@ -6084,7 +6520,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `false` */ - msAccelerator?: MsAcceleratorProperty; + msAccelerator?: Property.MsAccelerator | undefined; /** * The **`-ms-block-progression`** CSS property is a Microsoft extension that specifies the block progression and layout orientation. * @@ -6092,7 +6528,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `tb` */ - msBlockProgression?: MsBlockProgressionProperty; + msBlockProgression?: Property.MsBlockProgression | undefined; /** * The **`-ms-content-zoom-chaining`** CSS property is a Microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation. * @@ -6100,7 +6536,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msContentZoomChaining?: MsContentZoomChainingProperty; + msContentZoomChaining?: Property.MsContentZoomChaining | undefined; /** * The **`-ms-content-zoom-limit-max`** CSS property is a Microsoft extension that specifies the selected elements' maximum zoom factor. * @@ -6108,7 +6544,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `400%` */ - msContentZoomLimitMax?: GlobalsString; + msContentZoomLimitMax?: Property.MsContentZoomLimitMax | undefined; /** * The **`-ms-content-zoom-limit-min`** CSS property is a Microsoft extension that specifies the minimum zoom factor. * @@ -6116,7 +6552,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `100%` */ - msContentZoomLimitMin?: GlobalsString; + msContentZoomLimitMin?: Property.MsContentZoomLimitMin | undefined; /** * The **`-ms-content-zoom-snap-points`** CSS property is a Microsoft extension that specifies where zoom snap-points are located. * @@ -6124,7 +6560,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `snapInterval(0%, 100%)` */ - msContentZoomSnapPoints?: GlobalsString; + msContentZoomSnapPoints?: Property.MsContentZoomSnapPoints | undefined; /** * The **`-ms-content-zoom-snap-type`** CSS property is a Microsoft extension that specifies how zooming is affected by defined snap-points. * @@ -6132,7 +6568,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msContentZoomSnapType?: MsContentZoomSnapTypeProperty; + msContentZoomSnapType?: Property.MsContentZoomSnapType | undefined; /** * The **`-ms-content-zooming`** CSS property is a Microsoft extension that specifies whether zooming is enabled. * @@ -6140,7 +6576,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: zoom for the top level element, none for all other elements */ - msContentZooming?: MsContentZoomingProperty; + msContentZooming?: Property.MsContentZooming | undefined; /** * The `-ms-filter` CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. * @@ -6148,7 +6584,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: "" (the empty string) */ - msFilter?: GlobalsString; + msFilter?: Property.MsFilter | undefined; /** * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). * @@ -6156,15 +6592,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `row` */ - msFlexDirection?: FlexDirectionProperty; + msFlexDirection?: Property.FlexDirection | undefined; /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. * * **Syntax**: `<number>` * * **Initial value**: `0` */ - msFlexPositive?: GlobalsNumber; + msFlexPositive?: Property.FlexGrow | undefined; /** * The **`-ms-flow-from`** CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. * @@ -6172,7 +6608,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msFlowFrom?: MsFlowFromProperty; + msFlowFrom?: Property.MsFlowFrom | undefined; /** * The **`-ms-flow-into`** CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. * @@ -6180,7 +6616,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msFlowInto?: MsFlowIntoProperty; + msFlowInto?: Property.MsFlowInto | undefined; /** * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. * @@ -6188,7 +6624,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msGridColumns?: MsGridColumnsProperty<TLength>; + msGridColumns?: Property.MsGridColumns<TLength> | undefined; /** * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. * @@ -6196,7 +6632,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msGridRows?: MsGridRowsProperty<TLength>; + msGridRows?: Property.MsGridRows<TLength> | undefined; /** * The **`-ms-high-contrast-adjust`** CSS property is a Microsoft extension that gets or sets a value indicating whether to override any CSS properties that would have been set in high contrast mode. * @@ -6204,7 +6640,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - msHighContrastAdjust?: MsHighContrastAdjustProperty; + msHighContrastAdjust?: Property.MsHighContrastAdjust | undefined; /** * The **`-ms-hyphenate-limit-chars`** CSS property is a Microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word. If the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated. * @@ -6212,7 +6648,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - msHyphenateLimitChars?: MsHyphenateLimitCharsProperty; + msHyphenateLimitChars?: Property.MsHyphenateLimitChars | undefined; /** * The **`-ms-hyphenate-limit-lines`** CSS property is a Microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word. * @@ -6220,7 +6656,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `no-limit` */ - msHyphenateLimitLines?: MsHyphenateLimitLinesProperty; + msHyphenateLimitLines?: Property.MsHyphenateLimitLines | undefined; /** * The `**-ms-hyphenate-limit-zone**` CSS property is a Microsoft extension specifying the width of the hyphenation zone. * @@ -6228,15 +6664,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - msHyphenateLimitZone?: MsHyphenateLimitZoneProperty<TLength>; + msHyphenateLimitZone?: Property.MsHyphenateLimitZone<TLength> | undefined; /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. * * **Syntax**: `none | manual | auto` * * **Initial value**: `manual` */ - msHyphens?: HyphensProperty; + msHyphens?: Property.Hyphens | undefined; /** * The **`-ms-ime-align`** CSS property is a Microsoft extension aligning the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active. The extension is implemented in Microsoft Edge and Internet Explorer 11. * @@ -6244,7 +6680,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - msImeAlign?: MsImeAlignProperty; + msImeAlign?: Property.MsImeAlign | undefined; /** * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. * @@ -6252,7 +6688,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - msLineBreak?: LineBreakProperty; + msLineBreak?: Property.LineBreak | undefined; /** * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. * @@ -6260,7 +6696,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - msOrder?: GlobalsNumber; + msOrder?: Property.Order | undefined; /** * The **`-ms-overflow-style`** CSS property is a Microsoft extension controlling the behavior of scrollbars when the content of an element overflows. * @@ -6268,7 +6704,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - msOverflowStyle?: MsOverflowStyleProperty; + msOverflowStyle?: Property.MsOverflowStyle | undefined; /** * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. * @@ -6276,7 +6712,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `visible` */ - msOverflowX?: OverflowXProperty; + msOverflowX?: Property.OverflowX | undefined; /** * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. * @@ -6284,7 +6720,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `visible` */ - msOverflowY?: OverflowYProperty; + msOverflowY?: Property.OverflowY | undefined; /** * The `**-ms-scroll-chaining**` CSS property is a Microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation. * @@ -6292,7 +6728,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `chained` */ - msScrollChaining?: MsScrollChainingProperty; + msScrollChaining?: Property.MsScrollChaining | undefined; /** * The `**-ms-scroll-limit-x-max**` CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollLeft` property. * @@ -6300,7 +6736,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - msScrollLimitXMax?: MsScrollLimitXMaxProperty<TLength>; + msScrollLimitXMax?: Property.MsScrollLimitXMax<TLength> | undefined; /** * The **`-ms-scroll-limit-x-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollLeft` property. * @@ -6308,7 +6744,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - msScrollLimitXMin?: MsScrollLimitXMinProperty<TLength>; + msScrollLimitXMin?: Property.MsScrollLimitXMin<TLength> | undefined; /** * The **`-ms-scroll-limit-y-max`** CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollTop` property. * @@ -6316,7 +6752,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - msScrollLimitYMax?: MsScrollLimitYMaxProperty<TLength>; + msScrollLimitYMax?: Property.MsScrollLimitYMax<TLength> | undefined; /** * The **`-ms-scroll-limit-y-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollTop` property. * @@ -6324,7 +6760,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - msScrollLimitYMin?: MsScrollLimitYMinProperty<TLength>; + msScrollLimitYMin?: Property.MsScrollLimitYMin<TLength> | undefined; /** * The **`-ms-scroll-rails`** CSS property is a Microsoft extension that specifies whether scrolling locks to the primary axis of motion. * @@ -6332,7 +6768,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `railed` */ - msScrollRails?: MsScrollRailsProperty; + msScrollRails?: Property.MsScrollRails | undefined; /** * The **`-ms-scroll-snap-points-x`** CSS property is a Microsoft extension that specifies where snap-points will be located along the x-axis. * @@ -6340,7 +6776,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `snapInterval(0px, 100%)` */ - msScrollSnapPointsX?: GlobalsString; + msScrollSnapPointsX?: Property.MsScrollSnapPointsX | undefined; /** * The **`-ms-scroll-snap-points-y`** CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis. * @@ -6348,7 +6784,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `snapInterval(0px, 100%)` */ - msScrollSnapPointsY?: GlobalsString; + msScrollSnapPointsY?: Property.MsScrollSnapPointsY | undefined; /** * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. * @@ -6356,7 +6792,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msScrollSnapType?: MsScrollSnapTypeProperty; + msScrollSnapType?: Property.MsScrollSnapType | undefined; /** * The **`-ms-scroll-translation`** CSS property is a Microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element. * @@ -6364,7 +6800,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msScrollTranslation?: MsScrollTranslationProperty; + msScrollTranslation?: Property.MsScrollTranslation | undefined; /** * The **`-ms-scrollbar-3dlight-color`** CSS property is a Microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar. * @@ -6372,7 +6808,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: depends on user agent */ - msScrollbar3dlightColor?: MsScrollbar3dlightColorProperty; + msScrollbar3dlightColor?: Property.MsScrollbar3dlightColor | undefined; /** * The **`-ms-scrollbar-arrow-color`** CSS property is a Microsoft extension that specifies the color of the arrow elements of a scroll arrow. * @@ -6380,7 +6816,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `ButtonText` */ - msScrollbarArrowColor?: MsScrollbarArrowColorProperty; + msScrollbarArrowColor?: Property.MsScrollbarArrowColor | undefined; /** * The `**-ms-scrollbar-base-color**` CSS property is a Microsoft extension that specifies the base color of the main elements of a scroll bar. * @@ -6388,7 +6824,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: depends on user agent */ - msScrollbarBaseColor?: MsScrollbarBaseColorProperty; + msScrollbarBaseColor?: Property.MsScrollbarBaseColor | undefined; /** * The **`-ms-scrollbar-darkshadow-color`** CSS property is a Microsoft extension that specifies the color of a scroll bar's gutter. * @@ -6396,7 +6832,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `ThreeDDarkShadow` */ - msScrollbarDarkshadowColor?: MsScrollbarDarkshadowColorProperty; + msScrollbarDarkshadowColor?: Property.MsScrollbarDarkshadowColor | undefined; /** * The `**-ms-scrollbar-face-color**` CSS property is a Microsoft extension that specifies the color of the scroll box and scroll arrows of a scroll bar. * @@ -6404,7 +6840,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `ThreeDFace` */ - msScrollbarFaceColor?: MsScrollbarFaceColorProperty; + msScrollbarFaceColor?: Property.MsScrollbarFaceColor | undefined; /** * The `**-ms-scrollbar-highlight-color**` CSS property is a Microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar. * @@ -6412,7 +6848,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `ThreeDHighlight` */ - msScrollbarHighlightColor?: MsScrollbarHighlightColorProperty; + msScrollbarHighlightColor?: Property.MsScrollbarHighlightColor | undefined; /** * The **`-ms-scrollbar-shadow-color`** CSS property is a Microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar. * @@ -6420,7 +6856,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `ThreeDDarkShadow` */ - msScrollbarShadowColor?: MsScrollbarShadowColorProperty; + msScrollbarShadowColor?: Property.MsScrollbarShadowColor | undefined; /** * The **`-ms-scrollbar-track-color`** CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar. * @@ -6428,7 +6864,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `Scrollbar` */ - msScrollbarTrackColor?: MsScrollbarTrackColorProperty; + msScrollbarTrackColor?: Property.MsScrollbarTrackColor | undefined; /** * The **`-ms-text-autospace`** CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text. * @@ -6436,7 +6872,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msTextAutospace?: MsTextAutospaceProperty; + msTextAutospace?: Property.MsTextAutospace | undefined; /** * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. * @@ -6444,7 +6880,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msTextCombineHorizontal?: TextCombineUprightProperty; + msTextCombineHorizontal?: Property.TextCombineUpright | undefined; /** * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. * @@ -6452,15 +6888,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `clip` */ - msTextOverflow?: TextOverflowProperty; + msTextOverflow?: Property.TextOverflow | undefined; /** - * The **`touch-action`** CSS property sets how a region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). + * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). * * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` * * **Initial value**: `auto` */ - msTouchAction?: TouchActionProperty; + msTouchAction?: Property.TouchAction | undefined; /** * The **`-ms-touch-select`** CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. * @@ -6468,7 +6904,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `grippers` */ - msTouchSelect?: MsTouchSelectProperty; + msTouchSelect?: Property.MsTouchSelect | undefined; /** * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. * @@ -6476,7 +6912,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - msTransform?: TransformProperty; + msTransform?: Property.Transform | undefined; /** * The **`transform-origin`** CSS property sets the origin for an element's transformations. * @@ -6484,7 +6920,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `50% 50% 0` */ - msTransformOrigin?: TransformOriginProperty<TLength>; + msTransformOrigin?: Property.TransformOrigin<TLength> | undefined; /** * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. * @@ -6492,7 +6928,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0s` */ - msTransitionDelay?: GlobalsString; + msTransitionDelay?: Property.TransitionDelay<TTime> | undefined; /** * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. * @@ -6500,7 +6936,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0s` */ - msTransitionDuration?: GlobalsString; + msTransitionDuration?: Property.TransitionDuration<TTime> | undefined; /** * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. * @@ -6508,7 +6944,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: all */ - msTransitionProperty?: TransitionPropertyProperty; + msTransitionProperty?: Property.TransitionProperty | undefined; /** * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. * @@ -6516,15 +6952,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `ease` */ - msTransitionTimingFunction?: TransitionTimingFunctionProperty; + msTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `none | element | text` * * **Initial value**: `text` */ - msUserSelect?: MsUserSelectProperty; + msUserSelect?: Property.MsUserSelect | undefined; /** * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. * @@ -6532,7 +6968,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` */ - msWordBreak?: WordBreakProperty; + msWordBreak?: Property.WordBreak | undefined; /** * The **`-ms-wrap-flow`** CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements. * @@ -6540,7 +6976,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - msWrapFlow?: MsWrapFlowProperty; + msWrapFlow?: Property.MsWrapFlow | undefined; /** * The **`-ms-wrap-margin`** CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes. * @@ -6548,7 +6984,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - msWrapMargin?: MsWrapMarginProperty<TLength>; + msWrapMargin?: Property.MsWrapMargin<TLength> | undefined; /** * The **`-ms-wrap-through`** CSS property is a Microsoft extension that specifies how content should wrap around an exclusion element. * @@ -6556,55 +6992,55 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `wrap` */ - msWrapThrough?: MsWrapThroughProperty; + msWrapThrough?: Property.MsWrapThrough | undefined; /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). * * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` * * **Initial value**: `horizontal-tb` */ - msWritingMode?: WritingModeProperty; + msWritingMode?: Property.WritingMode | undefined; /** - * The CSS **`align-content`** property sets how the browser distributes space between and around content items along the cross-axis of a flexbox container, and the main-axis of a grid container. + * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. * * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` * * **Initial value**: `normal` */ - WebkitAlignContent?: AlignContentProperty; + WebkitAlignContent?: Property.AlignContent | undefined; /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. The align-self property sets the alignment of an item within its containing block. In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment of items on the Block Axis within their grid area. + * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. * * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` * * **Initial value**: `normal` */ - WebkitAlignItems?: AlignItemsProperty; + WebkitAlignItems?: Property.AlignItems | undefined; /** - * The **`align-self`** CSS property aligns flex items of the current flex line overriding the `align-items` value. If any of the item's cross-axis margin is set to `auto`, then `align-self` is ignored. In Grid layout `align-self` aligns the item inside the grid area. + * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. * * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` * * **Initial value**: `auto` */ - WebkitAlignSelf?: AlignSelfProperty; + WebkitAlignSelf?: Property.AlignSelf | undefined; /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. * * **Syntax**: `<time>#` * * **Initial value**: `0s` */ - WebkitAnimationDelay?: GlobalsString; + WebkitAnimationDelay?: Property.AnimationDelay<TTime> | undefined; /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. * * **Syntax**: `<single-animation-direction>#` * * **Initial value**: `normal` */ - WebkitAnimationDirection?: AnimationDirectionProperty; + WebkitAnimationDirection?: Property.AnimationDirection | undefined; /** * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. * @@ -6612,7 +7048,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0s` */ - WebkitAnimationDuration?: GlobalsString; + WebkitAnimationDuration?: Property.AnimationDuration<TTime> | undefined; /** * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. * @@ -6620,23 +7056,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitAnimationFillMode?: AnimationFillModeProperty; + WebkitAnimationFillMode?: Property.AnimationFillMode | undefined; /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. * * **Syntax**: `<single-animation-iteration-count>#` * * **Initial value**: `1` */ - WebkitAnimationIterationCount?: AnimationIterationCountProperty; + WebkitAnimationIterationCount?: Property.AnimationIterationCount | undefined; /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. * * **Syntax**: `[ none | <keyframes-name> ]#` * * **Initial value**: `none` */ - WebkitAnimationName?: AnimationNameProperty; + WebkitAnimationName?: Property.AnimationName | undefined; /** * The **`animation-play-state`** CSS property sets whether an animation is running or paused. * @@ -6644,23 +7080,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `running` */ - WebkitAnimationPlayState?: AnimationPlayStateProperty; + WebkitAnimationPlayState?: Property.AnimationPlayState | undefined; /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. * * **Syntax**: `<easing-function>#` * * **Initial value**: `ease` */ - WebkitAnimationTimingFunction?: AnimationTimingFunctionProperty; + WebkitAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. * * **Syntax**: `none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button` * * **Initial value**: `none` (but this value is overridden in the user agent CSS) */ - WebkitAppearance?: WebkitAppearanceProperty; + WebkitAppearance?: Property.WebkitAppearance | undefined; /** * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. * @@ -6668,7 +7104,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitBackdropFilter?: BackdropFilterProperty; + WebkitBackdropFilter?: Property.BackdropFilter | undefined; /** * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. * @@ -6676,23 +7112,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `visible` */ - WebkitBackfaceVisibility?: BackfaceVisibilityProperty; + WebkitBackfaceVisibility?: Property.BackfaceVisibility | undefined; /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. * * **Syntax**: `<box>#` * * **Initial value**: `border-box` */ - WebkitBackgroundClip?: BackgroundClipProperty; + WebkitBackgroundClip?: Property.BackgroundClip | undefined; /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. * * **Syntax**: `<box>#` * * **Initial value**: `padding-box` */ - WebkitBackgroundOrigin?: BackgroundOriginProperty; + WebkitBackgroundOrigin?: Property.BackgroundOrigin | undefined; /** * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. * @@ -6700,41 +7136,41 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto auto` */ - WebkitBackgroundSize?: BackgroundSizeProperty<TLength>; + WebkitBackgroundSize?: Property.BackgroundSize<TLength> | undefined; /** * **Syntax**: `<color>` * * **Initial value**: `currentcolor` */ - WebkitBorderBeforeColor?: WebkitBorderBeforeColorProperty; + WebkitBorderBeforeColor?: Property.WebkitBorderBeforeColor | undefined; /** * **Syntax**: `<'border-style'>` * * **Initial value**: `none` */ - WebkitBorderBeforeStyle?: WebkitBorderBeforeStyleProperty; + WebkitBorderBeforeStyle?: Property.WebkitBorderBeforeStyle | undefined; /** * **Syntax**: `<'border-width'>` * * **Initial value**: `medium` */ - WebkitBorderBeforeWidth?: WebkitBorderBeforeWidthProperty<TLength>; + WebkitBorderBeforeWidth?: Property.WebkitBorderBeforeWidth<TLength> | undefined; /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * * **Initial value**: `0` */ - WebkitBorderBottomLeftRadius?: BorderBottomLeftRadiusProperty<TLength>; + WebkitBorderBottomLeftRadius?: Property.BorderBottomLeftRadius<TLength> | undefined; /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * * **Initial value**: `0` */ - WebkitBorderBottomRightRadius?: BorderBottomRightRadiusProperty<TLength>; + WebkitBorderBottomRightRadius?: Property.BorderBottomRightRadius<TLength> | undefined; /** * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. * @@ -6742,23 +7178,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `100%` */ - WebkitBorderImageSlice?: BorderImageSliceProperty; + WebkitBorderImageSlice?: Property.BorderImageSlice | undefined; /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * * **Initial value**: `0` */ - WebkitBorderTopLeftRadius?: BorderTopLeftRadiusProperty<TLength>; + WebkitBorderTopLeftRadius?: Property.BorderTopLeftRadius<TLength> | undefined; /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * * **Initial value**: `0` */ - WebkitBorderTopRightRadius?: BorderTopRightRadiusProperty<TLength>; + WebkitBorderTopRightRadius?: Property.BorderTopRightRadius<TLength> | undefined; /** * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. * @@ -6766,7 +7202,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `slice` */ - WebkitBoxDecorationBreak?: BoxDecorationBreakProperty; + WebkitBoxDecorationBreak?: Property.BoxDecorationBreak | undefined; /** * The **`-webkit-box-reflect`** CSS property lets you reflect the content of an element in one specific direction. * @@ -6774,31 +7210,31 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitBoxReflect?: WebkitBoxReflectProperty<TLength>; + WebkitBoxReflect?: Property.WebkitBoxReflect<TLength> | undefined; /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. * * **Syntax**: `none | <shadow>#` * * **Initial value**: `none` */ - WebkitBoxShadow?: BoxShadowProperty; + WebkitBoxShadow?: Property.BoxShadow | undefined; /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. * * **Syntax**: `content-box | border-box` * * **Initial value**: `content-box` */ - WebkitBoxSizing?: BoxSizingProperty; + WebkitBoxSizing?: Property.BoxSizing | undefined; /** - * The `**clip-path**` CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. + * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. * * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` * * **Initial value**: `none` */ - WebkitClipPath?: ClipPathProperty; + WebkitClipPath?: Property.ClipPath | undefined; /** * The **`column-count`** CSS property breaks an element's content into the specified number of columns. * @@ -6806,7 +7242,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitColumnCount?: ColumnCountProperty; + WebkitColumnCount?: Property.ColumnCount | undefined; /** * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. * @@ -6814,15 +7250,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `balance` */ - WebkitColumnFill?: ColumnFillProperty; + WebkitColumnFill?: Property.ColumnFill | undefined; /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<color>` * * **Initial value**: `currentcolor` */ - WebkitColumnRuleColor?: ColumnRuleColorProperty; + WebkitColumnRuleColor?: Property.ColumnRuleColor | undefined; /** * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. * @@ -6830,15 +7266,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitColumnRuleStyle?: ColumnRuleStyleProperty; + WebkitColumnRuleStyle?: Property.ColumnRuleStyle | undefined; /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'border-width'>` * * **Initial value**: `medium` */ - WebkitColumnRuleWidth?: ColumnRuleWidthProperty<TLength>; + WebkitColumnRuleWidth?: Property.ColumnRuleWidth<TLength> | undefined; /** * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. * @@ -6846,15 +7282,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitColumnSpan?: ColumnSpanProperty; + WebkitColumnSpan?: Property.ColumnSpan | undefined; /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. * * **Syntax**: `<length> | auto` * * **Initial value**: `auto` */ - WebkitColumnWidth?: ColumnWidthProperty<TLength>; + WebkitColumnWidth?: Property.ColumnWidth<TLength> | undefined; /** * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. * @@ -6862,7 +7298,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitFilter?: FilterProperty; + WebkitFilter?: Property.Filter | undefined; /** * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. * @@ -6870,7 +7306,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitFlexBasis?: FlexBasisProperty<TLength>; + WebkitFlexBasis?: Property.FlexBasis<TLength> | undefined; /** * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). * @@ -6878,23 +7314,23 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `row` */ - WebkitFlexDirection?: FlexDirectionProperty; + WebkitFlexDirection?: Property.FlexDirection | undefined; /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. * * **Syntax**: `<number>` * * **Initial value**: `0` */ - WebkitFlexGrow?: GlobalsNumber; + WebkitFlexGrow?: Property.FlexGrow | undefined; /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. + * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. * * **Syntax**: `<number>` * * **Initial value**: `1` */ - WebkitFlexShrink?: GlobalsNumber; + WebkitFlexShrink?: Property.FlexShrink | undefined; /** * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. * @@ -6902,7 +7338,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `nowrap` */ - WebkitFlexWrap?: FlexWrapProperty; + WebkitFlexWrap?: Property.FlexWrap | undefined; /** * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. * @@ -6910,7 +7346,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` */ - WebkitFontFeatureSettings?: FontFeatureSettingsProperty; + WebkitFontFeatureSettings?: Property.FontFeatureSettings | undefined; /** * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. * @@ -6918,7 +7354,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitFontKerning?: FontKerningProperty; + WebkitFontKerning?: Property.FontKerning | undefined; /** * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. * @@ -6926,7 +7362,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitFontSmoothing?: FontSmoothProperty<TLength>; + WebkitFontSmoothing?: Property.FontSmooth<TLength> | undefined; /** * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. * @@ -6934,7 +7370,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` */ - WebkitFontVariantLigatures?: FontVariantLigaturesProperty; + WebkitFontVariantLigatures?: Property.FontVariantLigatures | undefined; /** * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. * @@ -6942,15 +7378,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitHyphenateCharacter?: HyphenateCharacterProperty; + WebkitHyphenateCharacter?: Property.HyphenateCharacter | undefined; /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. * * **Syntax**: `none | manual | auto` * * **Initial value**: `manual` */ - WebkitHyphens?: HyphensProperty; + WebkitHyphens?: Property.Hyphens | undefined; /** * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. * @@ -6958,7 +7394,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` */ - WebkitInitialLetter?: InitialLetterProperty; + WebkitInitialLetter?: Property.InitialLetter | undefined; /** * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. * @@ -6966,7 +7402,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `normal` */ - WebkitJustifyContent?: JustifyContentProperty; + WebkitJustifyContent?: Property.JustifyContent | undefined; /** * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. * @@ -6974,39 +7410,39 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitLineBreak?: LineBreakProperty; + WebkitLineBreak?: Property.LineBreak | undefined; /** - * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block container to the specified number of lines. + * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block to the specified number of lines. * * **Syntax**: `none | <integer>` * * **Initial value**: `none` */ - WebkitLineClamp?: WebkitLineClampProperty; + WebkitLineClamp?: Property.WebkitLineClamp | undefined; /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * * **Initial value**: `0` */ - WebkitMarginEnd?: MarginInlineEndProperty<TLength>; + WebkitMarginEnd?: Property.MarginInlineEnd<TLength> | undefined; /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * * **Initial value**: `0` */ - WebkitMarginStart?: MarginInlineStartProperty<TLength>; + WebkitMarginStart?: Property.MarginInlineStart<TLength> | undefined; /** - * If a `-webkit-mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. + * If a `mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. * * **Syntax**: `<attachment>#` * * **Initial value**: `scroll` */ - WebkitMaskAttachment?: WebkitMaskAttachmentProperty; + WebkitMaskAttachment?: Property.WebkitMaskAttachment | undefined; /** * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. * @@ -7014,7 +7450,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - WebkitMaskBoxImageOutset?: MaskBorderOutsetProperty<TLength>; + WebkitMaskBoxImageOutset?: Property.MaskBorderOutset<TLength> | undefined; /** * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. * @@ -7022,7 +7458,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `stretch` */ - WebkitMaskBoxImageRepeat?: MaskBorderRepeatProperty; + WebkitMaskBoxImageRepeat?: Property.MaskBorderRepeat | undefined; /** * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. * @@ -7030,7 +7466,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - WebkitMaskBoxImageSlice?: MaskBorderSliceProperty; + WebkitMaskBoxImageSlice?: Property.MaskBorderSlice | undefined; /** * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. * @@ -7038,7 +7474,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitMaskBoxImageSource?: MaskBorderSourceProperty; + WebkitMaskBoxImageSource?: Property.MaskBorderSource | undefined; /** * The **`mask-border-width`** CSS property sets the width of an element's mask border. * @@ -7046,15 +7482,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitMaskBoxImageWidth?: MaskBorderWidthProperty<TLength>; + WebkitMaskBoxImageWidth?: Property.MaskBorderWidth<TLength> | undefined; /** - * The **`mask-clip`** CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area. + * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. * * **Syntax**: `[ <box> | border | padding | content | text ]#` * * **Initial value**: `border` */ - WebkitMaskClip?: WebkitMaskClipProperty; + WebkitMaskClip?: Property.WebkitMaskClip | undefined; /** * The **`-webkit-mask-composite`** property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the `-webkit-mask-image` property. * @@ -7062,15 +7498,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `source-over` */ - WebkitMaskComposite?: WebkitMaskCompositeProperty; + WebkitMaskComposite?: Property.WebkitMaskComposite | undefined; /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. + * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. * * **Syntax**: `<mask-reference>#` * * **Initial value**: `none` */ - WebkitMaskImage?: WebkitMaskImageProperty; + WebkitMaskImage?: Property.WebkitMaskImage | undefined; /** * The **`mask-origin`** CSS property sets the origin of a mask. * @@ -7078,7 +7514,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `padding` */ - WebkitMaskOrigin?: WebkitMaskOriginProperty; + WebkitMaskOrigin?: Property.WebkitMaskOrigin | undefined; /** * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. * @@ -7086,7 +7522,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0% 0%` */ - WebkitMaskPosition?: WebkitMaskPositionProperty<TLength>; + WebkitMaskPosition?: Property.WebkitMaskPosition<TLength> | undefined; /** * The `-webkit-mask-position-x` CSS property sets the initial horizontal position of a mask image. * @@ -7094,7 +7530,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0%` */ - WebkitMaskPositionX?: WebkitMaskPositionXProperty<TLength>; + WebkitMaskPositionX?: Property.WebkitMaskPositionX<TLength> | undefined; /** * The `-webkit-mask-position-y` CSS property sets the initial vertical position of a mask image. * @@ -7102,7 +7538,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0%` */ - WebkitMaskPositionY?: WebkitMaskPositionYProperty<TLength>; + WebkitMaskPositionY?: Property.WebkitMaskPositionY<TLength> | undefined; /** * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. * @@ -7110,7 +7546,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `repeat` */ - WebkitMaskRepeat?: WebkitMaskRepeatProperty; + WebkitMaskRepeat?: Property.WebkitMaskRepeat | undefined; /** * The `-webkit-mask-repeat-x` property specifies whether and how a mask image is repeated (tiled) horizontally. * @@ -7118,7 +7554,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `repeat` */ - WebkitMaskRepeatX?: WebkitMaskRepeatXProperty; + WebkitMaskRepeatX?: Property.WebkitMaskRepeatX | undefined; /** * The `-webkit-mask-repeat-y` property sets whether and how a mask image is repeated (tiled) vertically. * @@ -7126,7 +7562,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `repeat` */ - WebkitMaskRepeatY?: WebkitMaskRepeatYProperty; + WebkitMaskRepeatY?: Property.WebkitMaskRepeatY | undefined; /** * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. * @@ -7134,15 +7570,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto auto` */ - WebkitMaskSize?: WebkitMaskSizeProperty<TLength>; + WebkitMaskSize?: Property.WebkitMaskSize<TLength> | undefined; /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block depending on its writing mode. It corresponds to the `max-width` or the `max-height` property depending on the value defined for `writing-mode`. If the writing mode is vertically oriented, the value of `max-inline-size` relates to the maximal height of the element, otherwise it relates to the maximal width of the element. It relates to `max-block-size`, which defines the other dimension of the element. + * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. * * **Syntax**: `<'max-width'>` * * **Initial value**: `none` */ - WebkitMaxInlineSize?: MaxInlineSizeProperty<TLength>; + WebkitMaxInlineSize?: Property.MaxInlineSize<TLength> | undefined; /** * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. * @@ -7150,7 +7586,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - WebkitOrder?: GlobalsNumber; + WebkitOrder?: Property.Order | undefined; /** * The `-webkit-overflow-scrolling` CSS property controls whether or not touch devices use momentum-based scrolling for a given element. * @@ -7158,31 +7594,31 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitOverflowScrolling?: WebkitOverflowScrollingProperty; + WebkitOverflowScrolling?: Property.WebkitOverflowScrolling | undefined; /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * * **Initial value**: `0` */ - WebkitPaddingEnd?: PaddingInlineEndProperty<TLength>; + WebkitPaddingEnd?: Property.PaddingInlineEnd<TLength> | undefined; /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * * **Initial value**: `0` */ - WebkitPaddingStart?: PaddingInlineStartProperty<TLength>; + WebkitPaddingStart?: Property.PaddingInlineStart<TLength> | undefined; /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. * * **Syntax**: `none | <length>` * * **Initial value**: `none` */ - WebkitPerspective?: PerspectiveProperty<TLength>; + WebkitPerspective?: Property.Perspective<TLength> | undefined; /** * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. * @@ -7190,7 +7626,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `50% 50%` */ - WebkitPerspectiveOrigin?: PerspectiveOriginProperty<TLength>; + WebkitPerspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; /** * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. * @@ -7198,15 +7634,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `economy` */ - WebkitPrintColorAdjust?: PrintColorAdjustProperty; + WebkitPrintColorAdjust?: Property.PrintColorAdjust | undefined; /** - * The `**ruby-position**` CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (`over`), under it (`under`), or between the characters, on their right side (`inter-character`). + * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). * * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` * * **Initial value**: `alternate` */ - WebkitRubyPosition?: RubyPositionProperty; + WebkitRubyPosition?: Property.RubyPosition | undefined; /** * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. * @@ -7214,7 +7650,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitScrollSnapType?: ScrollSnapTypeProperty; + WebkitScrollSnapType?: Property.ScrollSnapType | undefined; /** * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. * @@ -7222,15 +7658,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - WebkitShapeMargin?: ShapeMarginProperty<TLength>; + WebkitShapeMargin?: Property.ShapeMargin<TLength> | undefined; /** - * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. + * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. * * **Syntax**: `<color>` * * **Initial value**: `black` */ - WebkitTapHighlightColor?: WebkitTapHighlightColorProperty; + WebkitTapHighlightColor?: Property.WebkitTapHighlightColor | undefined; /** * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. * @@ -7238,7 +7674,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitTextCombine?: TextCombineUprightProperty; + WebkitTextCombine?: Property.TextCombineUpright | undefined; /** * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. * @@ -7246,7 +7682,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `currentcolor` */ - WebkitTextDecorationColor?: TextDecorationColorProperty; + WebkitTextDecorationColor?: Property.TextDecorationColor | undefined; /** * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. * @@ -7254,15 +7690,15 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitTextDecorationLine?: TextDecorationLineProperty; + WebkitTextDecorationLine?: Property.TextDecorationLine | undefined; /** - * The **`text-decoration-skip`** CSS property sets what parts of an element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. + * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. * * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` * * **Initial value**: `objects` */ - WebkitTextDecorationSkip?: TextDecorationSkipProperty; + WebkitTextDecorationSkip?: Property.TextDecorationSkip | undefined; /** * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. * @@ -7270,7 +7706,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `solid` */ - WebkitTextDecorationStyle?: TextDecorationStyleProperty; + WebkitTextDecorationStyle?: Property.TextDecorationStyle | undefined; /** * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. * @@ -7278,7 +7714,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `currentcolor` */ - WebkitTextEmphasisColor?: TextEmphasisColorProperty; + WebkitTextEmphasisColor?: Property.TextEmphasisColor | undefined; /** * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. * @@ -7286,7 +7722,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `over right` */ - WebkitTextEmphasisPosition?: GlobalsString; + WebkitTextEmphasisPosition?: Property.TextEmphasisPosition | undefined; /** * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. * @@ -7294,7 +7730,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitTextEmphasisStyle?: TextEmphasisStyleProperty; + WebkitTextEmphasisStyle?: Property.TextEmphasisStyle | undefined; /** * The **`-webkit-text-fill-color`** CSS property specifies the fill color of characters of text. If this property is not set, the value of the `color` property is used. * @@ -7302,7 +7738,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `currentcolor` */ - WebkitTextFillColor?: WebkitTextFillColorProperty; + WebkitTextFillColor?: Property.WebkitTextFillColor | undefined; /** * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. * @@ -7310,7 +7746,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `mixed` */ - WebkitTextOrientation?: TextOrientationProperty; + WebkitTextOrientation?: Property.TextOrientation | undefined; /** * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. * @@ -7318,7 +7754,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). */ - WebkitTextSizeAdjust?: TextSizeAdjustProperty; + WebkitTextSizeAdjust?: Property.TextSizeAdjust | undefined; /** * The **`-webkit-text-stroke-color`** CSS property specifies the stroke color of characters of text. If this property is not set, the value of the `color` property is used. * @@ -7326,7 +7762,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `currentcolor` */ - WebkitTextStrokeColor?: WebkitTextStrokeColorProperty; + WebkitTextStrokeColor?: Property.WebkitTextStrokeColor | undefined; /** * The **`-webkit-text-stroke-width`** CSS property specifies the width of the stroke for text. * @@ -7334,7 +7770,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0` */ - WebkitTextStrokeWidth?: WebkitTextStrokeWidthProperty<TLength>; + WebkitTextStrokeWidth?: Property.WebkitTextStrokeWidth<TLength> | undefined; /** * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. * @@ -7342,7 +7778,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `auto` */ - WebkitTextUnderlinePosition?: TextUnderlinePositionProperty; + WebkitTextUnderlinePosition?: Property.TextUnderlinePosition | undefined; /** * The `-webkit-touch-callout` CSS property controls the display of the default callout shown when you touch and hold a touch target. * @@ -7350,7 +7786,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `default` */ - WebkitTouchCallout?: WebkitTouchCalloutProperty; + WebkitTouchCallout?: Property.WebkitTouchCallout | undefined; /** * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. * @@ -7358,7 +7794,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `none` */ - WebkitTransform?: TransformProperty; + WebkitTransform?: Property.Transform | undefined; /** * The **`transform-origin`** CSS property sets the origin for an element's transformations. * @@ -7366,7 +7802,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `50% 50% 0` */ - WebkitTransformOrigin?: TransformOriginProperty<TLength>; + WebkitTransformOrigin?: Property.TransformOrigin<TLength> | undefined; /** * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. * @@ -7374,7 +7810,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `flat` */ - WebkitTransformStyle?: TransformStyleProperty; + WebkitTransformStyle?: Property.TransformStyle | undefined; /** * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. * @@ -7382,7 +7818,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0s` */ - WebkitTransitionDelay?: GlobalsString; + WebkitTransitionDelay?: Property.TransitionDelay<TTime> | undefined; /** * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. * @@ -7390,7 +7826,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `0s` */ - WebkitTransitionDuration?: GlobalsString; + WebkitTransitionDuration?: Property.TransitionDuration<TTime> | undefined; /** * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. * @@ -7398,7 +7834,7 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: all */ - WebkitTransitionProperty?: TransitionPropertyProperty; + WebkitTransitionProperty?: Property.TransitionProperty | undefined; /** * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. * @@ -7406,187 +7842,187 @@ export interface VendorLonghandProperties<TLength = string | 0> { * * **Initial value**: `ease` */ - WebkitTransitionTimingFunction?: TransitionTimingFunctionProperty; + WebkitTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; /** * **Syntax**: `read-only | read-write | read-write-plaintext-only` * * **Initial value**: `read-only` */ - WebkitUserModify?: WebkitUserModifyProperty; + WebkitUserModify?: Property.WebkitUserModify | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `auto | text | none | contain | all` * * **Initial value**: `auto` */ - WebkitUserSelect?: UserSelectProperty; + WebkitUserSelect?: Property.UserSelect | undefined; /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). * * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` * * **Initial value**: `horizontal-tb` */ - WebkitWritingMode?: WritingModeProperty; + WebkitWritingMode?: Property.WritingMode | undefined; } -export interface VendorShorthandProperties<TLength = string | 0> { +export interface VendorShorthandProperties<TLength = (string & {}) | 0, TTime = string & {}> { /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. * * **Syntax**: `<single-animation>#` */ - MozAnimation?: AnimationProperty; + MozAnimation?: Property.Animation<TTime> | undefined; /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. * * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` */ - MozBorderImage?: BorderImageProperty; + MozBorderImage?: Property.BorderImage | undefined; /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` */ - MozColumnRule?: ColumnRuleProperty<TLength>; + MozColumnRule?: Property.ColumnRule<TLength> | undefined; /** - * The **`columns`** CSS property sets the column width and column count of an element. + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. * * **Syntax**: `<'column-width'> || <'column-count'>` */ - MozColumns?: ColumnsProperty<TLength>; + MozColumns?: Property.Columns<TLength> | undefined; /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS shorthand property can be used to give an element's `outline` rounded corners. * - * **Syntax**: `<single-transition>#` + * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` */ - MozTransition?: TransitionProperty; + MozOutlineRadius?: Property.MozOutlineRadius<TLength> | undefined; /** * The **`-ms-content-zoom-limit`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-limit-min` and `-ms-content-zoom-limit-max` properties. * * **Syntax**: `<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>` */ - msContentZoomLimit?: GlobalsString; + msContentZoomLimit?: Property.MsContentZoomLimit | undefined; /** * The **`-ms-content-zoom-snap`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-snap-type` and `-ms-content-zoom-snap-points` properties. * * **Syntax**: `<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>` */ - msContentZoomSnap?: MsContentZoomSnapProperty; + msContentZoomSnap?: Property.MsContentZoomSnap | undefined; /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. * * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` */ - msFlex?: FlexProperty<TLength>; + msFlex?: Property.Flex<TLength> | undefined; /** * The **\-ms-scroll-limit** CSS property is a Microsoft extension that specifies values for the `-ms-scroll-limit-x-min`, `-ms-scroll-limit-y-min`, `-ms-scroll-limit-x-max`, and `-ms-scroll-limit-y-max` properties. * * **Syntax**: `<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>` */ - msScrollLimit?: GlobalsString; + msScrollLimit?: Property.MsScrollLimit | undefined; /** * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-x` properties. * * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>` */ - msScrollSnapX?: GlobalsString; + msScrollSnapX?: Property.MsScrollSnapX | undefined; /** * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-y` properties. * * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>` */ - msScrollSnapY?: GlobalsString; + msScrollSnapY?: Property.MsScrollSnapY | undefined; /** * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. * * **Syntax**: `<single-transition>#` */ - msTransition?: TransitionProperty; + msTransition?: Property.Transition<TTime> | undefined; /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. * * **Syntax**: `<single-animation>#` */ - WebkitAnimation?: AnimationProperty; + WebkitAnimation?: Property.Animation<TTime> | undefined; /** * The **`-webkit-border-before`** CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet. * * **Syntax**: `<'border-width'> || <'border-style'> || <color>` */ - WebkitBorderBefore?: WebkitBorderBeforeProperty<TLength>; + WebkitBorderBefore?: Property.WebkitBorderBefore<TLength> | undefined; /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. * * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` */ - WebkitBorderImage?: BorderImageProperty; + WebkitBorderImage?: Property.BorderImage | undefined; /** * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. * * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` */ - WebkitBorderRadius?: BorderRadiusProperty<TLength>; + WebkitBorderRadius?: Property.BorderRadius<TLength> | undefined; /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` */ - WebkitColumnRule?: ColumnRuleProperty<TLength>; + WebkitColumnRule?: Property.ColumnRule<TLength> | undefined; /** - * The **`columns`** CSS property sets the column width and column count of an element. + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. * * **Syntax**: `<'column-width'> || <'column-count'>` */ - WebkitColumns?: ColumnsProperty<TLength>; + WebkitColumns?: Property.Columns<TLength> | undefined; /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. * * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` */ - WebkitFlex?: FlexProperty<TLength>; + WebkitFlex?: Property.Flex<TLength> | undefined; /** - * The **`flex-flow`** CSS property is a shorthand property for `flex-direction` and `flex-wrap` properties. + * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. * * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` */ - WebkitFlexFlow?: FlexFlowProperty; + WebkitFlexFlow?: Property.FlexFlow | undefined; /** - * The **`mask`** CSS property hides an element (partially or fully) by masking or clipping the image at specific points. + * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. * * **Syntax**: `[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#` */ - WebkitMask?: WebkitMaskProperty<TLength>; + WebkitMask?: Property.WebkitMask<TLength> | undefined; /** - * The **`mask-border`** CSS property lets you create a mask along the edge of an element's border. + * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. * * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` */ - WebkitMaskBoxImage?: MaskBorderProperty; + WebkitMaskBoxImage?: Property.MaskBorder | undefined; /** * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. * * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` */ - WebkitTextEmphasis?: TextEmphasisProperty; + WebkitTextEmphasis?: Property.TextEmphasis | undefined; /** * The **`-webkit-text-stroke`** CSS property specifies the width and color of strokes for text characters. This is a shorthand property for the longhand properties `-webkit-text-stroke-width` and `-webkit-text-stroke-color`. * * **Syntax**: `<length> || <color>` */ - WebkitTextStroke?: WebkitTextStrokeProperty<TLength>; + WebkitTextStroke?: Property.WebkitTextStroke<TLength> | undefined; /** * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. * * **Syntax**: `<single-transition>#` */ - WebkitTransition?: TransitionProperty; + WebkitTransition?: Property.Transition<TTime> | undefined; } -export interface VendorProperties<TLength = string | 0> extends VendorLonghandProperties<TLength>, VendorShorthandProperties<TLength> {} +export interface VendorProperties<TLength = (string & {}) | 0, TTime = string & {}> extends VendorLonghandProperties<TLength, TTime>, VendorShorthandProperties<TLength, TTime> {} -export interface ObsoleteProperties<TLength = string | 0> { +export interface ObsoleteProperties<TLength = (string & {}) | 0, TTime = string & {}> { /** * In combination with `elevation`, the **`azimuth`** CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage. * @@ -7596,7 +8032,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - azimuth?: AzimuthProperty; + azimuth?: Property.Azimuth | undefined; /** * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. * @@ -7606,7 +8042,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - boxAlign?: BoxAlignProperty; + boxAlign?: Property.BoxAlign | undefined; /** * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). * @@ -7616,7 +8052,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - boxDirection?: BoxDirectionProperty; + boxDirection?: Property.BoxDirection | undefined; /** * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. * @@ -7626,7 +8062,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - boxFlex?: GlobalsNumber; + boxFlex?: Property.BoxFlex | undefined; /** * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. * @@ -7636,7 +8072,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - boxFlexGroup?: GlobalsNumber; + boxFlexGroup?: Property.BoxFlexGroup | undefined; /** * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). * @@ -7646,7 +8082,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - boxLines?: BoxLinesProperty; + boxLines?: Property.BoxLines | undefined; /** * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. * @@ -7656,9 +8092,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - boxOrdinalGroup?: GlobalsNumber; + boxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. * * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` * @@ -7666,7 +8102,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - boxOrient?: BoxOrientProperty; + boxOrient?: Property.BoxOrient | undefined; /** * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. * @@ -7676,9 +8112,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - boxPack?: BoxPackProperty; + boxPack?: Property.BoxPack | undefined; /** - * The **`clip`** CSS property defines what portion of an element is visible. The `clip` property applies only to absolutely positioned elements, that is elements with `position:absolute` or `position:fixed`. + * The **`clip`** CSS property defines a visible portion of an element. The `clip` property applies only to absolutely positioned elements — that is, elements with `position:absolute` or `position:fixed`. * * **Syntax**: `<shape> | auto` * @@ -7686,7 +8122,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - clip?: ClipProperty; + clip?: Property.Clip | undefined; /** * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. * @@ -7696,7 +8132,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - gridColumnGap?: GridColumnGapProperty<TLength>; + gridColumnGap?: Property.GridColumnGap<TLength> | undefined; /** * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. * @@ -7704,9 +8140,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - gridGap?: GridGapProperty<TLength>; + gridGap?: Property.GridGap<TLength> | undefined; /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's grid rows. + * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. * * **Syntax**: `<length-percentage>` * @@ -7714,7 +8150,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - gridRowGap?: GridRowGapProperty<TLength>; + gridRowGap?: Property.GridRowGap<TLength> | undefined; /** * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. * @@ -7724,17 +8160,15 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - imeMode?: ImeModeProperty; + imeMode?: Property.ImeMode | undefined; /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'top'>{1,2}` * - * **Initial value**: `auto` - * * @deprecated */ - offsetBlock?: InsetBlockProperty<TLength>; + offsetBlock?: Property.InsetBlock<TLength> | undefined; /** * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -7744,7 +8178,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - offsetBlockEnd?: InsetBlockEndProperty<TLength>; + offsetBlockEnd?: Property.InsetBlockEnd<TLength> | undefined; /** * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -7754,19 +8188,17 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - offsetBlockStart?: InsetBlockStartProperty<TLength>; + offsetBlockStart?: Property.InsetBlockStart<TLength> | undefined; /** - * The **`inset-inline`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'top'>{1,2}` * - * **Initial value**: `auto` - * * @deprecated */ - offsetInline?: InsetInlineProperty<TLength>; + offsetInline?: Property.InsetInline<TLength> | undefined; /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'top'>` * @@ -7774,7 +8206,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - offsetInlineEnd?: InsetInlineEndProperty<TLength>; + offsetInlineEnd?: Property.InsetInlineEnd<TLength> | undefined; /** * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -7784,7 +8216,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - offsetInlineStart?: InsetInlineStartProperty<TLength>; + offsetInlineStart?: Property.InsetInlineStart<TLength> | undefined; /** * The **`scroll-snap-coordinate`** CSS property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's `scroll-snap-destination` for each respective axis. * @@ -7794,7 +8226,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - scrollSnapCoordinate?: ScrollSnapCoordinateProperty<TLength>; + scrollSnapCoordinate?: Property.ScrollSnapCoordinate<TLength> | undefined; /** * The **`scroll-snap-destination`** CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. * @@ -7804,7 +8236,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - scrollSnapDestination?: ScrollSnapDestinationProperty<TLength>; + scrollSnapDestination?: Property.ScrollSnapDestination<TLength> | undefined; /** * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. * @@ -7814,7 +8246,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - scrollSnapPointsX?: ScrollSnapPointsXProperty; + scrollSnapPointsX?: Property.ScrollSnapPointsX | undefined; /** * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. * @@ -7824,7 +8256,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - scrollSnapPointsY?: ScrollSnapPointsYProperty; + scrollSnapPointsY?: Property.ScrollSnapPointsY | undefined; /** * The **`scroll-snap-type-x`** CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one. * @@ -7834,7 +8266,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - scrollSnapTypeX?: ScrollSnapTypeXProperty; + scrollSnapTypeX?: Property.ScrollSnapTypeX | undefined; /** * The **`scroll-snap-type-y`** CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one. * @@ -7844,7 +8276,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - scrollSnapTypeY?: ScrollSnapTypeYProperty; + scrollSnapTypeY?: Property.ScrollSnapTypeY | undefined; /** * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. * @@ -7854,7 +8286,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlBoxAlign?: BoxAlignProperty; + KhtmlBoxAlign?: Property.BoxAlign | undefined; /** * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). * @@ -7864,7 +8296,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlBoxDirection?: BoxDirectionProperty; + KhtmlBoxDirection?: Property.BoxDirection | undefined; /** * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. * @@ -7874,7 +8306,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlBoxFlex?: GlobalsNumber; + KhtmlBoxFlex?: Property.BoxFlex | undefined; /** * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. * @@ -7884,7 +8316,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlBoxFlexGroup?: GlobalsNumber; + KhtmlBoxFlexGroup?: Property.BoxFlexGroup | undefined; /** * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). * @@ -7894,7 +8326,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlBoxLines?: BoxLinesProperty; + KhtmlBoxLines?: Property.BoxLines | undefined; /** * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. * @@ -7904,9 +8336,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlBoxOrdinalGroup?: GlobalsNumber; + KhtmlBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. * * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` * @@ -7914,7 +8346,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlBoxOrient?: BoxOrientProperty; + KhtmlBoxOrient?: Property.BoxOrient | undefined; /** * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. * @@ -7924,7 +8356,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlBoxPack?: BoxPackProperty; + KhtmlBoxPack?: Property.BoxPack | undefined; /** * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. * @@ -7934,9 +8366,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlLineBreak?: LineBreakProperty; + KhtmlLineBreak?: Property.LineBreak | undefined; /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. * * **Syntax**: `<alpha-value>` * @@ -7944,9 +8376,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlOpacity?: OpacityProperty; + KhtmlOpacity?: Property.Opacity | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `auto | text | none | contain | all` * @@ -7954,9 +8386,19 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - KhtmlUserSelect?: UserSelectProperty; + KhtmlUserSelect?: Property.UserSelect | undefined; /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. + * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * + * **Syntax**: `visible | hidden` + * + * **Initial value**: `visible` + * + * @deprecated + */ + MozBackfaceVisibility?: Property.BackfaceVisibility | undefined; + /** + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. * * **Syntax**: `<box>#` * @@ -7964,7 +8406,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBackgroundClip?: BackgroundClipProperty; + MozBackgroundClip?: Property.BackgroundClip | undefined; /** * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. * @@ -7974,9 +8416,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBackgroundInlinePolicy?: BoxDecorationBreakProperty; + MozBackgroundInlinePolicy?: Property.BoxDecorationBreak | undefined; /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. * * **Syntax**: `<box>#` * @@ -7984,7 +8426,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBackgroundOrigin?: BackgroundOriginProperty; + MozBackgroundOrigin?: Property.BackgroundOrigin | undefined; /** * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. * @@ -7994,17 +8436,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBackgroundSize?: BackgroundSizeProperty<TLength>; - /** - * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. - * - * **Syntax**: `<url> | none` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozBinding?: MozBindingProperty; + MozBackgroundSize?: Property.BackgroundSize<TLength> | undefined; /** * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. * @@ -8012,9 +8444,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBorderRadius?: BorderRadiusProperty<TLength>; + MozBorderRadius?: Property.BorderRadius<TLength> | undefined; /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -8022,9 +8454,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBorderRadiusBottomleft?: BorderBottomLeftRadiusProperty<TLength>; + MozBorderRadiusBottomleft?: Property.BorderBottomLeftRadius<TLength> | undefined; /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -8032,9 +8464,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBorderRadiusBottomright?: BorderBottomRightRadiusProperty<TLength>; + MozBorderRadiusBottomright?: Property.BorderBottomRightRadius<TLength> | undefined; /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -8042,9 +8474,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBorderRadiusTopleft?: BorderTopLeftRadiusProperty<TLength>; + MozBorderRadiusTopleft?: Property.BorderTopLeftRadius<TLength> | undefined; /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -8052,7 +8484,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBorderRadiusTopright?: BorderTopRightRadiusProperty<TLength>; + MozBorderRadiusTopright?: Property.BorderTopRightRadius<TLength> | undefined; /** * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. * @@ -8062,7 +8494,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBoxAlign?: BoxAlignProperty; + MozBoxAlign?: Property.BoxAlign | undefined; /** * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). * @@ -8072,7 +8504,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBoxDirection?: BoxDirectionProperty; + MozBoxDirection?: Property.BoxDirection | undefined; /** * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. * @@ -8082,7 +8514,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBoxFlex?: GlobalsNumber; + MozBoxFlex?: Property.BoxFlex | undefined; /** * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. * @@ -8092,9 +8524,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBoxOrdinalGroup?: GlobalsNumber; + MozBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. * * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` * @@ -8102,7 +8534,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBoxOrient?: BoxOrientProperty; + MozBoxOrient?: Property.BoxOrient | undefined; /** * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. * @@ -8112,9 +8544,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBoxPack?: BoxPackProperty; + MozBoxPack?: Property.BoxPack | undefined; /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. * * **Syntax**: `none | <shadow>#` * @@ -8122,7 +8554,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozBoxShadow?: BoxShadowProperty; + MozBoxShadow?: Property.BoxShadow | undefined; /** * The non-standard **`-moz-float-edge`** CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness. * @@ -8132,7 +8564,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozFloatEdge?: MozFloatEdgeProperty; + MozFloatEdge?: Property.MozFloatEdge | undefined; /** * The **`-moz-force-broken-image-icon`** extended CSS property can be used to force the broken image icon to be shown even when a broken image has an `alt` attribute. * @@ -8142,9 +8574,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozForceBrokenImageIcon?: MozForceBrokenImageIconProperty; + MozForceBrokenImageIcon?: Property.MozForceBrokenImageIcon | undefined; /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. * * **Syntax**: `<alpha-value>` * @@ -8152,15 +8584,15 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozOpacity?: OpacityProperty; + MozOpacity?: Property.Opacity | undefined; /** - * The **`outline`** CSS property is a shorthand to set various outline properties in a single declaration: `outline-style`, `outline-width`, and `outline-color`. + * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. * * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` * * @deprecated */ - MozOutline?: OutlineProperty<TLength>; + MozOutline?: Property.Outline<TLength> | undefined; /** * The **`outline-color`** CSS property sets the color of an element's outline. * @@ -8170,55 +8602,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozOutlineColor?: OutlineColorProperty; - /** - * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS property can be used to give an element's `outline` rounded corners. - * - * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` - * - * @deprecated - */ - MozOutlineRadius?: MozOutlineRadiusProperty<TLength>; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozOutlineRadiusBottomleft?: MozOutlineRadiusBottomleftProperty<TLength>; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozOutlineRadiusBottomright?: MozOutlineRadiusBottomrightProperty<TLength>; - /** - * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozOutlineRadiusTopleft?: MozOutlineRadiusTopleftProperty<TLength>; - /** - * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozOutlineRadiusTopright?: MozOutlineRadiusToprightProperty<TLength>; + MozOutlineColor?: Property.OutlineColor | undefined; /** * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. * @@ -8228,9 +8612,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozOutlineStyle?: OutlineStyleProperty; + MozOutlineStyle?: Property.OutlineStyle | undefined; /** - * The **`outline-width`** CSS property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. * * **Syntax**: `<line-width>` * @@ -8238,7 +8622,27 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozOutlineWidth?: OutlineWidthProperty<TLength>; + MozOutlineWidth?: Property.OutlineWidth<TLength> | undefined; + /** + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. + * + * **Syntax**: `none | <length>` + * + * **Initial value**: `none` + * + * @deprecated + */ + MozPerspective?: Property.Perspective<TLength> | undefined; + /** + * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * @deprecated + */ + MozPerspectiveOrigin?: Property.PerspectiveOrigin<TLength> | undefined; /** * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. * @@ -8248,7 +8652,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozTextAlignLast?: TextAlignLastProperty; + MozTextAlignLast?: Property.TextAlignLast | undefined; /** * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. * @@ -8258,7 +8662,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozTextDecorationColor?: TextDecorationColorProperty; + MozTextDecorationColor?: Property.TextDecorationColor | undefined; /** * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. * @@ -8268,7 +8672,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozTextDecorationLine?: TextDecorationLineProperty; + MozTextDecorationLine?: Property.TextDecorationLine | undefined; /** * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. * @@ -8278,173 +8682,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - MozTextDecorationStyle?: TextDecorationStyleProperty; - /** - * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. - * - * **Syntax**: `auto | none | enabled | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - MozUserInput?: MozUserInputProperty; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - msImeMode?: ImeModeProperty; - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * @deprecated - */ - OAnimation?: AnimationProperty; - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OAnimationDelay?: GlobalsString; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * @deprecated - */ - OAnimationDirection?: AnimationDirectionProperty; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OAnimationDuration?: GlobalsString; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - OAnimationFillMode?: AnimationFillModeProperty; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * @deprecated - */ - OAnimationIterationCount?: AnimationIterationCountProperty; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * @deprecated - */ - OAnimationName?: AnimationNameProperty; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * @deprecated - */ - OAnimationPlayState?: AnimationPlayStateProperty; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - OAnimationTimingFunction?: AnimationTimingFunctionProperty; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - OBackgroundSize?: BackgroundSizeProperty<TLength>; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * @deprecated - */ - OBorderImage?: BorderImageProperty; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * @deprecated - */ - OObjectFit?: ObjectFitProperty; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * @deprecated - */ - OObjectPosition?: ObjectPositionProperty<TLength>; - /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * @deprecated - */ - OTabSize?: TabSizeProperty<TLength>; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * @deprecated - */ - OTextOverflow?: TextOverflowProperty; + MozTextDecorationStyle?: Property.TextDecorationStyle | undefined; /** * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. * @@ -8454,7 +8692,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - OTransform?: TransformProperty; + MozTransform?: Property.Transform | undefined; /** * The **`transform-origin`** CSS property sets the origin for an element's transformations. * @@ -8464,7 +8702,17 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - OTransformOrigin?: TransformOriginProperty<TLength>; + MozTransformOrigin?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. + * + * **Syntax**: `flat | preserve-3d` + * + * **Initial value**: `flat` + * + * @deprecated + */ + MozTransformStyle?: Property.TransformStyle | undefined; /** * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. * @@ -8472,7 +8720,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - OTransition?: TransitionProperty; + MozTransition?: Property.Transition<TTime> | undefined; /** * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. * @@ -8482,7 +8730,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - OTransitionDelay?: GlobalsString; + MozTransitionDelay?: Property.TransitionDelay<TTime> | undefined; /** * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. * @@ -8492,7 +8740,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - OTransitionDuration?: GlobalsString; + MozTransitionDuration?: Property.TransitionDuration<TTime> | undefined; /** * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. * @@ -8502,7 +8750,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - OTransitionProperty?: TransitionPropertyProperty; + MozTransitionProperty?: Property.TransitionProperty | undefined; /** * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. * @@ -8512,7 +8760,241 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - OTransitionTimingFunction?: TransitionTimingFunctionProperty; + MozTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; + /** + * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. + * + * **Syntax**: `auto | none | enabled | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + MozUserInput?: Property.MozUserInput | undefined; + /** + * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. + * + * **Syntax**: `auto | normal | active | inactive | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + msImeMode?: Property.ImeMode | undefined; + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + * + * @deprecated + */ + OAnimation?: Property.Animation<TTime> | undefined; + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + OAnimationDelay?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + * + * @deprecated + */ + OAnimationDirection?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + OAnimationDuration?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + * + * @deprecated + */ + OAnimationFillMode?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + * + * @deprecated + */ + OAnimationIterationCount?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + * + * @deprecated + */ + OAnimationName?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + * + * @deprecated + */ + OAnimationPlayState?: Property.AnimationPlayState | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + OAnimationTimingFunction?: Property.AnimationTimingFunction | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + * + * @deprecated + */ + OBackgroundSize?: Property.BackgroundSize<TLength> | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + * + * @deprecated + */ + OBorderImage?: Property.BorderImage | undefined; + /** + * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. + * + * **Syntax**: `fill | contain | cover | none | scale-down` + * + * **Initial value**: `fill` + * + * @deprecated + */ + OObjectFit?: Property.ObjectFit | undefined; + /** + * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * @deprecated + */ + OObjectPosition?: Property.ObjectPosition<TLength> | undefined; + /** + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). + * + * **Syntax**: `<integer> | <length>` + * + * **Initial value**: `8` + * + * @deprecated + */ + OTabSize?: Property.TabSize<TLength> | undefined; + /** + * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. + * + * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` + * + * **Initial value**: `clip` + * + * @deprecated + */ + OTextOverflow?: Property.TextOverflow | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + * + * @deprecated + */ + OTransform?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + * + * @deprecated + */ + OTransformOrigin?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + * + * @deprecated + */ + OTransition?: Property.Transition<TTime> | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + OTransitionDelay?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + OTransitionDuration?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + * + * @deprecated + */ + OTransitionProperty?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + OTransitionTimingFunction?: Property.TransitionTimingFunction | undefined; /** * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. * @@ -8522,7 +9004,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - WebkitBoxAlign?: BoxAlignProperty; + WebkitBoxAlign?: Property.BoxAlign | undefined; /** * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). * @@ -8532,7 +9014,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - WebkitBoxDirection?: BoxDirectionProperty; + WebkitBoxDirection?: Property.BoxDirection | undefined; /** * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. * @@ -8542,7 +9024,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - WebkitBoxFlex?: GlobalsNumber; + WebkitBoxFlex?: Property.BoxFlex | undefined; /** * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. * @@ -8552,7 +9034,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - WebkitBoxFlexGroup?: GlobalsNumber; + WebkitBoxFlexGroup?: Property.BoxFlexGroup | undefined; /** * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). * @@ -8562,7 +9044,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - WebkitBoxLines?: BoxLinesProperty; + WebkitBoxLines?: Property.BoxLines | undefined; /** * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. * @@ -8572,9 +9054,9 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - WebkitBoxOrdinalGroup?: GlobalsNumber; + WebkitBoxOrdinalGroup?: Property.BoxOrdinalGroup | undefined; /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. * * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` * @@ -8582,7 +9064,7 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - WebkitBoxOrient?: BoxOrientProperty; + WebkitBoxOrient?: Property.BoxOrient | undefined; /** * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. * @@ -8592,97 +9074,81 @@ export interface ObsoleteProperties<TLength = string | 0> { * * @deprecated */ - WebkitBoxPack?: BoxPackProperty; - /** - * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - WebkitScrollSnapPointsX?: ScrollSnapPointsXProperty; - /** - * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - WebkitScrollSnapPointsY?: ScrollSnapPointsYProperty; + WebkitBoxPack?: Property.BoxPack | undefined; } -export interface SvgProperties<TLength = string | 0> { - alignmentBaseline?: AlignmentBaselineProperty; - baselineShift?: BaselineShiftProperty<TLength>; - clip?: ClipProperty; - clipPath?: ClipPathProperty; - clipRule?: ClipRuleProperty; - color?: ColorProperty; - colorInterpolation?: ColorInterpolationProperty; - colorRendering?: ColorRenderingProperty; - cursor?: CursorProperty; - direction?: DirectionProperty; - display?: DisplayProperty; - dominantBaseline?: DominantBaselineProperty; - fill?: FillProperty; - fillOpacity?: GlobalsNumber; - fillRule?: FillRuleProperty; - filter?: FilterProperty; - floodColor?: FloodColorProperty; - floodOpacity?: GlobalsNumber; - font?: FontProperty; - fontFamily?: FontFamilyProperty; - fontSize?: FontSizeProperty<TLength>; - fontSizeAdjust?: FontSizeAdjustProperty; - fontStretch?: FontStretchProperty; - fontStyle?: FontStyleProperty; - fontVariant?: FontVariantProperty; - fontWeight?: FontWeightProperty; - glyphOrientationVertical?: GlyphOrientationVerticalProperty; - imageRendering?: ImageRenderingProperty; - letterSpacing?: LetterSpacingProperty<TLength>; - lightingColor?: LightingColorProperty; - lineHeight?: LineHeightProperty<TLength>; - marker?: MarkerProperty; - markerEnd?: MarkerEndProperty; - markerMid?: MarkerMidProperty; - markerStart?: MarkerStartProperty; - mask?: MaskProperty<TLength>; - opacity?: OpacityProperty; - overflow?: OverflowProperty; - paintOrder?: PaintOrderProperty; - pointerEvents?: PointerEventsProperty; - shapeRendering?: ShapeRenderingProperty; - stopColor?: StopColorProperty; - stopOpacity?: GlobalsNumber; - stroke?: StrokeProperty; - strokeDasharray?: StrokeDasharrayProperty<TLength>; - strokeDashoffset?: StrokeDashoffsetProperty<TLength>; - strokeLinecap?: StrokeLinecapProperty; - strokeLinejoin?: StrokeLinejoinProperty; - strokeMiterlimit?: GlobalsNumber; - strokeOpacity?: GlobalsNumber; - strokeWidth?: StrokeWidthProperty<TLength>; - textAnchor?: TextAnchorProperty; - textDecoration?: TextDecorationProperty<TLength>; - textRendering?: TextRenderingProperty; - unicodeBidi?: UnicodeBidiProperty; - vectorEffect?: VectorEffectProperty; - visibility?: VisibilityProperty; - whiteSpace?: WhiteSpaceProperty; - wordSpacing?: WordSpacingProperty<TLength>; - writingMode?: WritingModeProperty; +export interface SvgProperties<TLength = (string & {}) | 0, TTime = string & {}> { + alignmentBaseline?: Property.AlignmentBaseline | undefined; + baselineShift?: Property.BaselineShift<TLength> | undefined; + clip?: Property.Clip | undefined; + clipPath?: Property.ClipPath | undefined; + clipRule?: Property.ClipRule | undefined; + color?: Property.Color | undefined; + colorInterpolation?: Property.ColorInterpolation | undefined; + colorRendering?: Property.ColorRendering | undefined; + cursor?: Property.Cursor | undefined; + direction?: Property.Direction | undefined; + display?: Property.Display | undefined; + dominantBaseline?: Property.DominantBaseline | undefined; + fill?: Property.Fill | undefined; + fillOpacity?: Property.FillOpacity | undefined; + fillRule?: Property.FillRule | undefined; + filter?: Property.Filter | undefined; + floodColor?: Property.FloodColor | undefined; + floodOpacity?: Property.FloodOpacity | undefined; + font?: Property.Font | undefined; + fontFamily?: Property.FontFamily | undefined; + fontSize?: Property.FontSize<TLength> | undefined; + fontSizeAdjust?: Property.FontSizeAdjust | undefined; + fontStretch?: Property.FontStretch | undefined; + fontStyle?: Property.FontStyle | undefined; + fontVariant?: Property.FontVariant | undefined; + fontWeight?: Property.FontWeight | undefined; + glyphOrientationVertical?: Property.GlyphOrientationVertical | undefined; + imageRendering?: Property.ImageRendering | undefined; + letterSpacing?: Property.LetterSpacing<TLength> | undefined; + lightingColor?: Property.LightingColor | undefined; + lineHeight?: Property.LineHeight<TLength> | undefined; + marker?: Property.Marker | undefined; + markerEnd?: Property.MarkerEnd | undefined; + markerMid?: Property.MarkerMid | undefined; + markerStart?: Property.MarkerStart | undefined; + mask?: Property.Mask<TLength> | undefined; + opacity?: Property.Opacity | undefined; + overflow?: Property.Overflow | undefined; + paintOrder?: Property.PaintOrder | undefined; + pointerEvents?: Property.PointerEvents | undefined; + shapeRendering?: Property.ShapeRendering | undefined; + stopColor?: Property.StopColor | undefined; + stopOpacity?: Property.StopOpacity | undefined; + stroke?: Property.Stroke | undefined; + strokeDasharray?: Property.StrokeDasharray<TLength> | undefined; + strokeDashoffset?: Property.StrokeDashoffset<TLength> | undefined; + strokeLinecap?: Property.StrokeLinecap | undefined; + strokeLinejoin?: Property.StrokeLinejoin | undefined; + strokeMiterlimit?: Property.StrokeMiterlimit | undefined; + strokeOpacity?: Property.StrokeOpacity | undefined; + strokeWidth?: Property.StrokeWidth<TLength> | undefined; + textAnchor?: Property.TextAnchor | undefined; + textDecoration?: Property.TextDecoration<TLength> | undefined; + textRendering?: Property.TextRendering | undefined; + unicodeBidi?: Property.UnicodeBidi | undefined; + vectorEffect?: Property.VectorEffect | undefined; + visibility?: Property.Visibility | undefined; + whiteSpace?: Property.WhiteSpace | undefined; + wordSpacing?: Property.WordSpacing<TLength> | undefined; + writingMode?: Property.WritingMode | undefined; } -export interface Properties<TLength = string | 0> extends StandardProperties<TLength>, VendorProperties<TLength>, ObsoleteProperties<TLength>, SvgProperties<TLength> {} +export interface Properties<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardProperties<TLength, TTime>, + VendorProperties<TLength, TTime>, + ObsoleteProperties<TLength, TTime>, + SvgProperties<TLength, TTime> {} -export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { +export interface StandardLonghandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { /** - * The **`accent-color`** CSS property sets the color of the elements accent. An accent appears in elements such as `<input>` of `type="checkbox"`, or `type="radio"`. + * The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements. * * **Syntax**: `auto | <color>` * @@ -8694,9 +9160,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/accent-color */ - "accent-color"?: AccentColorProperty; + "accent-color"?: Property.AccentColor | undefined; /** - * The CSS **`align-content`** property sets how the browser distributes space between and around content items along the cross-axis of a flexbox container, and the main-axis of a grid container. + * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. * * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` * @@ -8709,9 +9175,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/align-content */ - "align-content"?: AlignContentProperty; + "align-content"?: Property.AlignContent | undefined; /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. The align-self property sets the alignment of an item within its containing block. In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment of items on the Block Axis within their grid area. + * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. * * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` * @@ -8724,9 +9190,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/align-items */ - "align-items"?: AlignItemsProperty; + "align-items"?: Property.AlignItems | undefined; /** - * The **`align-self`** CSS property aligns flex items of the current flex line overriding the `align-items` value. If any of the item's cross-axis margin is set to `auto`, then `align-self` is ignored. In Grid layout `align-self` aligns the item inside the grid area. + * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. * * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` * @@ -8739,9 +9205,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/align-self */ - "align-self"?: AlignSelfProperty; + "align-self"?: Property.AlignSelf | undefined; /** - * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. + * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. * * **Syntax**: `[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#` * @@ -8753,7 +9219,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks */ - "align-tracks"?: AlignTracksProperty; + "align-tracks"?: Property.AlignTracks | undefined; /** * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. * @@ -8761,15 +9227,15 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `replace` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **112** | **115** | **16** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition */ - "animation-composition"?: GlobalsString; + "animation-composition"?: Property.AnimationComposition | undefined; /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. * * **Syntax**: `<time>#` * @@ -8782,9 +9248,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-delay */ - "animation-delay"?: GlobalsString; + "animation-delay"?: Property.AnimationDelay<TTime> | undefined; /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. * * **Syntax**: `<single-animation-direction>#` * @@ -8797,7 +9263,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-direction */ - "animation-direction"?: AnimationDirectionProperty; + "animation-direction"?: Property.AnimationDirection | undefined; /** * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. * @@ -8812,7 +9278,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-duration */ - "animation-duration"?: GlobalsString; + "animation-duration"?: Property.AnimationDuration<TTime> | undefined; /** * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. * @@ -8827,9 +9293,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode */ - "animation-fill-mode"?: AnimationFillModeProperty; + "animation-fill-mode"?: Property.AnimationFillMode | undefined; /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. * * **Syntax**: `<single-animation-iteration-count>#` * @@ -8842,9 +9308,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count */ - "animation-iteration-count"?: AnimationIterationCountProperty; + "animation-iteration-count"?: Property.AnimationIterationCount | undefined; /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. * * **Syntax**: `[ none | <keyframes-name> ]#` * @@ -8857,7 +9323,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-name */ - "animation-name"?: AnimationNameProperty; + "animation-name"?: Property.AnimationName | undefined; /** * The **`animation-play-state`** CSS property sets whether an animation is running or paused. * @@ -8872,23 +9338,51 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-play-state */ - "animation-play-state"?: AnimationPlayStateProperty; + "animation-play-state"?: Property.AnimationPlayState | undefined; /** - * The **`animation-timeline`** CSS property specifies the names of one or more `@scroll-timeline` at-rules describing the scroll animations to apply to the element. + * The **`animation-range-end`** CSS property is used to set the end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will end. + * + * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-end + */ + "animation-range-end"?: Property.AnimationRangeEnd<TLength> | undefined; + /** + * The **`animation-range-start`** CSS property is used to set the start of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start. + * + * **Syntax**: `[ normal | <length-percentage> | <timeline-range-name> <length-percentage>? ]#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range-start + */ + "animation-range-start"?: Property.AnimationRangeStart<TLength> | undefined; + /** + * The **`animation-timeline`** CSS property specifies the timeline that is used to control the progress of an animation. * * **Syntax**: `<single-animation-timeline>#` * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/animation-timeline */ - "animation-timeline"?: AnimationTimelineProperty; + "animation-timeline"?: Property.AnimationTimeline | undefined; /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. * * **Syntax**: `<easing-function>#` * @@ -8901,9 +9395,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation-timing-function */ - "animation-timing-function"?: AnimationTimingFunctionProperty; + "animation-timing-function"?: Property.AnimationTimingFunction | undefined; /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. * * **Syntax**: `none | auto | textfield | menulist-button | <compat-auto>` * @@ -8916,9 +9410,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/appearance */ - appearance?: AppearanceProperty; + appearance?: Property.Appearance | undefined; /** - * The **`aspect-ratio`**   CSS property sets a _**preferred aspect ratio**_ for the box, which will be used in the calculation of auto sizes and some other layout functions. + * The **`aspect-ratio`** CSS property sets a **preferred aspect ratio** for the box, which will be used in the calculation of auto sizes and some other layout functions. * * **Syntax**: `auto | <ratio>` * @@ -8930,7 +9424,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/aspect-ratio */ - "aspect-ratio"?: AspectRatioProperty; + "aspect-ratio"?: Property.AspectRatio | undefined; /** * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. * @@ -8944,7 +9438,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/backdrop-filter */ - "backdrop-filter"?: BackdropFilterProperty; + "backdrop-filter"?: Property.BackdropFilter | undefined; /** * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. * @@ -8952,14 +9446,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `visible` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-------: | :----: | :----: | - * | **36** | **16** | **15.4** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 5.1 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :----: | :----: | + * | **36** | **16** | **15.4** | **12** | **10** | + * | 12 _-x-_ | | 5.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/backface-visibility */ - "backface-visibility"?: BackfaceVisibilityProperty; + "backface-visibility"?: Property.BackfaceVisibility | undefined; /** * The **`background-attachment`** CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. * @@ -8973,7 +9467,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-attachment */ - "background-attachment"?: BackgroundAttachmentProperty; + "background-attachment"?: Property.BackgroundAttachment | undefined; /** * The **`background-blend-mode`** CSS property sets how an element's background images should blend with each other and with the element's background color. * @@ -8987,9 +9481,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-blend-mode */ - "background-blend-mode"?: BackgroundBlendModeProperty; + "background-blend-mode"?: Property.BackgroundBlendMode | undefined; /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. * * **Syntax**: `<box>#` * @@ -8997,12 +9491,12 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **4** | **14** | **12** | **9** | + * | **1** | **4** | **5** | **12** | **9** | * | | | 3 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/background-clip */ - "background-clip"?: BackgroundClipProperty; + "background-clip"?: Property.BackgroundClip | undefined; /** * The **`background-color`** CSS property sets the background color of an element. * @@ -9016,9 +9510,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-color */ - "background-color"?: BackgroundColorProperty; + "background-color"?: Property.BackgroundColor | undefined; /** - * The **`background-image`** CSS property sets one or more background images on an element. + * The **`background-image`** CSS property sets one or more background images on an element. * * **Syntax**: `<bg-image>#` * @@ -9030,9 +9524,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-image */ - "background-image"?: BackgroundImageProperty; + "background-image"?: Property.BackgroundImage | undefined; /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. * * **Syntax**: `<box>#` * @@ -9044,7 +9538,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-origin */ - "background-origin"?: BackgroundOriginProperty; + "background-origin"?: Property.BackgroundOrigin | undefined; /** * The **`background-position-x`** CSS property sets the initial horizontal position for each background image. The position is relative to the position layer set by `background-origin`. * @@ -9058,9 +9552,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-position-x */ - "background-position-x"?: BackgroundPositionXProperty<TLength>; + "background-position-x"?: Property.BackgroundPositionX<TLength> | undefined; /** - * The **`background-position-y`** CSS property sets the initial vertical position, relative to the background position layer defined by `background-origin`, for each defined background image. + * The **`background-position-y`** CSS property sets the initial vertical position for each background image. The position is relative to the position layer set by `background-origin`. * * **Syntax**: `[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#` * @@ -9072,7 +9566,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-position-y */ - "background-position-y"?: BackgroundPositionYProperty<TLength>; + "background-position-y"?: Property.BackgroundPositionY<TLength> | undefined; /** * The **`background-repeat`** CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all. * @@ -9086,7 +9580,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-repeat */ - "background-repeat"?: BackgroundRepeatProperty; + "background-repeat"?: Property.BackgroundRepeat | undefined; /** * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. * @@ -9101,13 +9595,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-size */ - "background-size"?: BackgroundSizeProperty<TLength>; + "background-size"?: Property.BackgroundSize<TLength> | undefined; /** * **Syntax**: `clip | ellipsis | <string>` * * **Initial value**: `clip` */ - "block-overflow"?: BlockOverflowProperty; + "block-overflow"?: Property.BlockOverflow | undefined; /** * The **`block-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. * @@ -9121,9 +9615,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/block-size */ - "block-size"?: BlockSizeProperty<TLength>; + "block-size"?: Property.BlockSize<TLength> | undefined; /** - * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>{1,2}` * @@ -9135,9 +9629,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-color */ - "border-block-color"?: BorderBlockColorProperty; + "border-block-color"?: Property.BorderBlockColor | undefined; /** - * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * @@ -9149,9 +9643,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-color */ - "border-block-end-color"?: BorderBlockEndColorProperty; + "border-block-end-color"?: Property.BorderBlockEndColor | undefined; /** - * The **`border-block-end-style`** CSS property defines the style of the logical block end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-end-style`** CSS property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -9163,9 +9657,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-style */ - "border-block-end-style"?: BorderBlockEndStyleProperty; + "border-block-end-style"?: Property.BorderBlockEndStyle | undefined; /** - * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -9177,9 +9671,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width */ - "border-block-end-width"?: BorderBlockEndWidthProperty<TLength>; + "border-block-end-width"?: Property.BorderBlockEndWidth<TLength> | undefined; /** - * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * @@ -9191,9 +9685,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-color */ - "border-block-start-color"?: BorderBlockStartColorProperty; + "border-block-start-color"?: Property.BorderBlockStartColor | undefined; /** - * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -9205,9 +9699,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-style */ - "border-block-start-style"?: BorderBlockStartStyleProperty; + "border-block-start-style"?: Property.BorderBlockStartStyle | undefined; /** - * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -9219,9 +9713,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width */ - "border-block-start-width"?: BorderBlockStartWidthProperty<TLength>; + "border-block-start-width"?: Property.BorderBlockStartWidth<TLength> | undefined; /** - * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -9233,9 +9727,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-style */ - "border-block-style"?: BorderBlockStyleProperty; + "border-block-style"?: Property.BorderBlockStyle | undefined; /** - * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -9247,7 +9741,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-width */ - "border-block-width"?: BorderBlockWidthProperty<TLength>; + "border-block-width"?: Property.BorderBlockWidth<TLength> | undefined; /** * The **`border-bottom-color`** CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties `border-color` or `border-bottom`. * @@ -9261,9 +9755,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-color */ - "border-bottom-color"?: BorderBottomColorProperty; + "border-bottom-color"?: Property.BorderBottomColor | undefined; /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -9276,9 +9770,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius */ - "border-bottom-left-radius"?: BorderBottomLeftRadiusProperty<TLength>; + "border-bottom-left-radius"?: Property.BorderBottomLeftRadius<TLength> | undefined; /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -9291,7 +9785,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius */ - "border-bottom-right-radius"?: BorderBottomRightRadiusProperty<TLength>; + "border-bottom-right-radius"?: Property.BorderBottomRightRadius<TLength> | undefined; /** * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`. * @@ -9305,9 +9799,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-style */ - "border-bottom-style"?: BorderBottomStyleProperty; + "border-bottom-style"?: Property.BorderBottomStyle | undefined; /** - * The **`border-bottom-width`** CSS property sets the width of the bottom border of a box. + * The **`border-bottom-width`** CSS property sets the width of the bottom border of an element. * * **Syntax**: `<line-width>` * @@ -9319,7 +9813,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width */ - "border-bottom-width"?: BorderBottomWidthProperty<TLength>; + "border-bottom-width"?: Property.BorderBottomWidth<TLength> | undefined; /** * The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders. * @@ -9333,9 +9827,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-collapse */ - "border-collapse"?: BorderCollapseProperty; + "border-collapse"?: Property.BorderCollapse | undefined; /** - * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's `writing-mode`, `direction`, and `text-orientation`. + * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. * * **Syntax**: `<length-percentage>{1,2}` * @@ -9347,9 +9841,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius */ - "border-end-end-radius"?: BorderEndEndRadiusProperty<TLength>; + "border-end-end-radius"?: Property.BorderEndEndRadius<TLength> | undefined; /** - * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. + * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. * * **Syntax**: `<length-percentage>{1,2}` * @@ -9361,7 +9855,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius */ - "border-end-start-radius"?: BorderEndStartRadiusProperty<TLength>; + "border-end-start-radius"?: Property.BorderEndStartRadius<TLength> | undefined; /** * The **`border-image-outset`** CSS property sets the distance by which an element's border image is set out from its border box. * @@ -9375,9 +9869,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-outset */ - "border-image-outset"?: BorderImageOutsetProperty<TLength>; + "border-image-outset"?: Property.BorderImageOutset<TLength> | undefined; /** - * The **`border-image-repeat`** CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's border image. + * The **`border-image-repeat`** CSS property defines how the edge regions and middle region of a source image are adjusted to fit the dimensions of an element's border image. The middle region can be displayed by using the keyword "fill" in the border-image-slice property. * * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` * @@ -9389,7 +9883,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-repeat */ - "border-image-repeat"?: BorderImageRepeatProperty; + "border-image-repeat"?: Property.BorderImageRepeat | undefined; /** * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. * @@ -9403,7 +9897,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-slice */ - "border-image-slice"?: BorderImageSliceProperty; + "border-image-slice"?: Property.BorderImageSlice | undefined; /** * The **`border-image-source`** CSS property sets the source image used to create an element's border image. * @@ -9417,7 +9911,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-source */ - "border-image-source"?: BorderImageSourceProperty; + "border-image-source"?: Property.BorderImageSource | undefined; /** * The **`border-image-width`** CSS property sets the width of an element's border image. * @@ -9431,9 +9925,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image-width */ - "border-image-width"?: BorderImageWidthProperty<TLength>; + "border-image-width"?: Property.BorderImageWidth<TLength> | undefined; /** - * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>{1,2}` * @@ -9445,9 +9939,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-color */ - "border-inline-color"?: BorderInlineColorProperty; + "border-inline-color"?: Property.BorderInlineColor | undefined; /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * @@ -9460,9 +9954,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color */ - "border-inline-end-color"?: BorderInlineEndColorProperty; + "border-inline-end-color"?: Property.BorderInlineEndColor | undefined; /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -9475,9 +9969,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style */ - "border-inline-end-style"?: BorderInlineEndStyleProperty; + "border-inline-end-style"?: Property.BorderInlineEndStyle | undefined; /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -9490,9 +9984,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width */ - "border-inline-end-width"?: BorderInlineEndWidthProperty<TLength>; + "border-inline-end-width"?: Property.BorderInlineEndWidth<TLength> | undefined; /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * @@ -9505,9 +9999,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color */ - "border-inline-start-color"?: BorderInlineStartColorProperty; + "border-inline-start-color"?: Property.BorderInlineStartColor | undefined; /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -9520,9 +10014,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style */ - "border-inline-start-style"?: BorderInlineStartStyleProperty; + "border-inline-start-style"?: Property.BorderInlineStartStyle | undefined; /** - * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -9534,9 +10028,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width */ - "border-inline-start-width"?: BorderInlineStartWidthProperty<TLength>; + "border-inline-start-width"?: Property.BorderInlineStartWidth<TLength> | undefined; /** - * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * @@ -9548,9 +10042,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-style */ - "border-inline-style"?: BorderInlineStyleProperty; + "border-inline-style"?: Property.BorderInlineStyle | undefined; /** - * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * @@ -9562,7 +10056,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width */ - "border-inline-width"?: BorderInlineWidthProperty<TLength>; + "border-inline-width"?: Property.BorderInlineWidth<TLength> | undefined; /** * The **`border-left-color`** CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties `border-color` or `border-left`. * @@ -9576,7 +10070,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-left-color */ - "border-left-color"?: BorderLeftColorProperty; + "border-left-color"?: Property.BorderLeftColor | undefined; /** * The **`border-left-style`** CSS property sets the line style of an element's left `border`. * @@ -9590,7 +10084,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-left-style */ - "border-left-style"?: BorderLeftStyleProperty; + "border-left-style"?: Property.BorderLeftStyle | undefined; /** * The **`border-left-width`** CSS property sets the width of the left border of an element. * @@ -9604,7 +10098,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-left-width */ - "border-left-width"?: BorderLeftWidthProperty<TLength>; + "border-left-width"?: Property.BorderLeftWidth<TLength> | undefined; /** * The **`border-right-color`** CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties `border-color` or `border-right`. * @@ -9618,7 +10112,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-right-color */ - "border-right-color"?: BorderRightColorProperty; + "border-right-color"?: Property.BorderRightColor | undefined; /** * The **`border-right-style`** CSS property sets the line style of an element's right `border`. * @@ -9632,7 +10126,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-right-style */ - "border-right-style"?: BorderRightStyleProperty; + "border-right-style"?: Property.BorderRightStyle | undefined; /** * The **`border-right-width`** CSS property sets the width of the right border of an element. * @@ -9646,9 +10140,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-right-width */ - "border-right-width"?: BorderRightWidthProperty<TLength>; + "border-right-width"?: Property.BorderRightWidth<TLength> | undefined; /** - * The **`border-spacing`** CSS property sets the distance between the borders of adjacent `<table>` cells. This property applies only when `border-collapse` is `separate`. + * The **`border-spacing`** CSS property sets the distance between the borders of adjacent cells in a `<table>`. This property applies only when `border-collapse` is `separate`. * * **Syntax**: `<length> <length>?` * @@ -9660,9 +10154,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-spacing */ - "border-spacing"?: BorderSpacingProperty<TLength>; + "border-spacing"?: Property.BorderSpacing<TLength> | undefined; /** - * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. + * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. * * **Syntax**: `<length-percentage>{1,2}` * @@ -9674,9 +10168,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius */ - "border-start-end-radius"?: BorderStartEndRadiusProperty<TLength>; + "border-start-end-radius"?: Property.BorderStartEndRadius<TLength> | undefined; /** - * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. + * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. This is useful when building styles to work regardless of the text orientation and writing mode. * * **Syntax**: `<length-percentage>{1,2}` * @@ -9688,7 +10182,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius */ - "border-start-start-radius"?: BorderStartStartRadiusProperty<TLength>; + "border-start-start-radius"?: Property.BorderStartStartRadius<TLength> | undefined; /** * The **`border-top-color`** CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties `border-color` or `border-top`. * @@ -9702,9 +10196,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-color */ - "border-top-color"?: BorderTopColorProperty; + "border-top-color"?: Property.BorderTopColor | undefined; /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -9717,9 +10211,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius */ - "border-top-left-radius"?: BorderTopLeftRadiusProperty<TLength>; + "border-top-left-radius"?: Property.BorderTopLeftRadius<TLength> | undefined; /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -9732,7 +10226,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius */ - "border-top-right-radius"?: BorderTopRightRadiusProperty<TLength>; + "border-top-right-radius"?: Property.BorderTopRightRadius<TLength> | undefined; /** * The **`border-top-style`** CSS property sets the line style of an element's top `border`. * @@ -9746,7 +10240,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-style */ - "border-top-style"?: BorderTopStyleProperty; + "border-top-style"?: Property.BorderTopStyle | undefined; /** * The **`border-top-width`** CSS property sets the width of the top border of an element. * @@ -9760,9 +10254,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top-width */ - "border-top-width"?: BorderTopWidthProperty<TLength>; + "border-top-width"?: Property.BorderTopWidth<TLength> | undefined; /** - * The **`bottom`** CSS property participates in specifying the vertical position of a _positioned element_. It has no effect on non-positioned elements. + * The **`bottom`** CSS property participates in setting the vertical position of a positioned element. It has no effect on non-positioned elements. * * **Syntax**: `<length> | <percentage> | auto` * @@ -9774,7 +10268,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/bottom */ - bottom?: BottomProperty<TLength>; + bottom?: Property.Bottom<TLength> | undefined; /** * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. * @@ -9788,9 +10282,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/box-decoration-break */ - "box-decoration-break"?: BoxDecorationBreakProperty; + "box-decoration-break"?: Property.BoxDecorationBreak | undefined; /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. * * **Syntax**: `none | <shadow>#` * @@ -9803,9 +10297,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/box-shadow */ - "box-shadow"?: BoxShadowProperty; + "box-shadow"?: Property.BoxShadow | undefined; /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. * * **Syntax**: `content-box | border-box` * @@ -9818,9 +10312,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/box-sizing */ - "box-sizing"?: BoxSizingProperty; + "box-sizing"?: Property.BoxSizing | undefined; /** - * The **`break-after`** CSS property defines how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. + * The **`break-after`** CSS property sets how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. * * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` * @@ -9832,7 +10326,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/break-after */ - "break-after"?: BreakAfterProperty; + "break-after"?: Property.BreakAfter | undefined; /** * The **`break-before`** CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. * @@ -9846,9 +10340,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/break-before */ - "break-before"?: BreakBeforeProperty; + "break-before"?: Property.BreakBefore | undefined; /** - * The **`break-inside`** CSS property defines how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. + * The **`break-inside`** CSS property sets how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. * * **Syntax**: `auto | avoid | avoid-page | avoid-column | avoid-region` * @@ -9860,7 +10354,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/break-inside */ - "break-inside"?: BreakInsideProperty; + "break-inside"?: Property.BreakInside | undefined; /** * The **`caption-side`** CSS property puts the content of a table's `<caption>` on the specified side. The values are relative to the `writing-mode` of the table. * @@ -9874,9 +10368,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/caption-side */ - "caption-side"?: CaptionSideProperty; + "caption-side"?: Property.CaptionSide | undefined; /** - * The **`caret-color`** CSS property sets the color of the insertion caret, the visible marker where the next character typed will be inserted. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. + * The **`caret-color`** CSS property sets the color of the **insertion caret**, the visible marker where the next character typed will be inserted. This is sometimes referred to as the **text input cursor**. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. * * **Syntax**: `auto | <color>` * @@ -9888,7 +10382,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/caret-color */ - "caret-color"?: CaretColorProperty; + "caret-color"?: Property.CaretColor | undefined; + /** + * **Syntax**: `auto | bar | block | underscore` + * + * **Initial value**: `auto` + */ + "caret-shape"?: Property.CaretShape | undefined; /** * The **`clear`** CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The `clear` property applies to floating and non-floating elements. * @@ -9902,9 +10402,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/clear */ - clear?: ClearProperty; + clear?: Property.Clear | undefined; /** - * The `**clip-path**` CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. + * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. * * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` * @@ -9917,7 +10417,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/clip-path */ - "clip-path"?: ClipPathProperty; + "clip-path"?: Property.ClipPath | undefined; /** * The **`color`** CSS property sets the foreground color value of an element's text and text decorations, and sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`. * @@ -9931,7 +10431,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/color */ - color?: ColorProperty; + color?: Property.Color | undefined; /** * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. * @@ -9946,7 +10446,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust */ - "color-adjust"?: PrintColorAdjustProperty; + "color-adjust"?: Property.PrintColorAdjust | undefined; /** * The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in. * @@ -9960,7 +10460,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/color-scheme */ - "color-scheme"?: ColorSchemeProperty; + "color-scheme"?: Property.ColorScheme | undefined; /** * The **`column-count`** CSS property breaks an element's content into the specified number of columns. * @@ -9975,7 +10475,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-count */ - "column-count"?: ColumnCountProperty; + "column-count"?: Property.ColumnCount | undefined; /** * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. * @@ -9990,7 +10490,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-fill */ - "column-fill"?: ColumnFillProperty; + "column-fill"?: Property.ColumnFill | undefined; /** * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. * @@ -10004,9 +10504,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-gap */ - "column-gap"?: ColumnGapProperty<TLength>; + "column-gap"?: Property.ColumnGap<TLength> | undefined; /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<color>` * @@ -10019,7 +10519,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-color */ - "column-rule-color"?: ColumnRuleColorProperty; + "column-rule-color"?: Property.ColumnRuleColor | undefined; /** * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. * @@ -10034,9 +10534,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-style */ - "column-rule-style"?: ColumnRuleStyleProperty; + "column-rule-style"?: Property.ColumnRuleStyle | undefined; /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'border-width'>` * @@ -10049,7 +10549,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-width */ - "column-rule-width"?: ColumnRuleWidthProperty<TLength>; + "column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; /** * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. * @@ -10064,9 +10564,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-span */ - "column-span"?: ColumnSpanProperty; + "column-span"?: Property.ColumnSpan | undefined; /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. * * **Syntax**: `<length> | auto` * @@ -10079,9 +10579,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-width */ - "column-width"?: ColumnWidthProperty<TLength>; + "column-width"?: Property.ColumnWidth<TLength> | undefined; /** - * The **`contain`** CSS property allows an author to indicate that an element and its contents are, as much as possible, _independent_ of the rest of the document tree. This allows the browser to recalculate layout, style, paint, size, or any combination of them for a limited area of the DOM and not the entire page. + * The **`contain`** CSS property indicates that an element and its contents are, as much as possible, independent from the rest of the document tree. Containment enables isolating a subsection of the DOM, providing performance benefits by limiting calculations of layout, style, paint, size, or any combination to a DOM subtree rather than the entire page. Containment can also be used to scope CSS counters and quotes. * * **Syntax**: `none | strict | content | [ [ size || inline-size ] || layout || style || paint ]` * @@ -10093,9 +10593,93 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/contain */ - contain?: ContainProperty; + contain?: Property.Contain | undefined; /** - * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are _anonymous replaced elements._ + * The **`contain-intrinsic-block-size`** CSS logical property defines the block size of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-block-size + */ + "contain-intrinsic-block-size"?: Property.ContainIntrinsicBlockSize<TLength> | undefined; + /** + * The **`contain-intrinsic-length`** CSS property sets the height of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-height + */ + "contain-intrinsic-height"?: Property.ContainIntrinsicHeight<TLength> | undefined; + /** + * The **`contain-intrinsic-inline-size`** CSS logical property defines the inline-size of an element that a browser can use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-contain-intrinsic-inline-size + */ + "contain-intrinsic-inline-size"?: Property.ContainIntrinsicInlineSize<TLength> | undefined; + /** + * The **`contain-intrinsic-width`** CSS property sets the width of an element that a browser will use for layout when the element is subject to size containment. + * + * **Syntax**: `auto? [ none | <length> ]` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **95** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-width + */ + "contain-intrinsic-width"?: Property.ContainIntrinsicWidth<TLength> | undefined; + /** + * The **container-name** CSS property specifies a list of query container names used by the @container at-rule in a container query. A container query will apply styles to elements based on the size of the nearest ancestor with a containment context. When a containment context is given a name, it can be specifically targeted using the `@container` at-rule instead of the nearest ancestor with containment. + * + * **Syntax**: `none | <custom-ident>+` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container-name + */ + "container-name"?: Property.ContainerName | undefined; + /** + * The **container-type** CSS property is used to define the type of containment used in a container query. + * + * **Syntax**: `normal | size | inline-size` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container-type + */ + "container-type"?: Property.ContainerType | undefined; + /** + * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are **anonymous replaced elements**. * * **Syntax**: `normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?` * @@ -10107,21 +10691,21 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/content */ - content?: ContentProperty; + content?: Property.Content | undefined; /** - * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. Basically it enables the user agent to skip an element's rendering work, including layout and painting, until it is needed, makes the initial page load much faster. + * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. It enables the user agent to skip an element's rendering work (including layout and painting) until it is needed — which makes the initial page load much faster. * * **Syntax**: `visible | auto | hidden` * * **Initial value**: `visible` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **85** | No | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :---------: | :----: | :--: | :-: | + * | **85** | **preview** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/content-visibility */ - "content-visibility"?: ContentVisibilityProperty; + "content-visibility"?: Property.ContentVisibility | undefined; /** * The **`counter-increment`** CSS property increases or decreases the value of a CSS counter by a given value. * @@ -10135,9 +10719,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment */ - "counter-increment"?: CounterIncrementProperty; + "counter-increment"?: Property.CounterIncrement | undefined; /** - * The **`counter-reset`** CSS property resets a CSS counter to a given value. + * The **`counter-reset`** CSS property resets a CSS counter to a given value. This property will create a new counter or reversed counter with the given name on the specified element. * * **Syntax**: `[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none` * @@ -10149,23 +10733,23 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/counter-reset */ - "counter-reset"?: CounterResetProperty; + "counter-reset"?: Property.CounterReset | undefined; /** - * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. + * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. * * **Syntax**: `[ <counter-name> <integer>? ]+ | none` * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **85** | **68** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **85** | **68** | **17.2** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/counter-set */ - "counter-set"?: CounterSetProperty; + "counter-set"?: Property.CounterSet | undefined; /** - * The **`cursor`** CSS property sets mouse cursor to display when the mouse pointer is over an element. + * The **`cursor`** CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element. * * **Syntax**: `[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]` * @@ -10177,7 +10761,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/cursor */ - cursor?: CursorProperty; + cursor?: Property.Cursor | undefined; /** * The **`direction`** CSS property sets the direction of text, table columns, and horizontal overflow. Use `rtl` for languages written from right to left (like Hebrew or Arabic), and `ltr` for those written from left to right (like English and most other languages). * @@ -10191,9 +10775,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/direction */ - direction?: DirectionProperty; + direction?: Property.Direction | undefined; /** - * The **`display`** CSS property defines the _display type_ of an element, which consists of the two basic qualities of how an element generates boxes — the **outer display type** defining how the box participates in flow layout, and the **inner display type** defining how the children of the box are laid out. + * The **`display`** CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex. * * **Syntax**: `[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>` * @@ -10205,7 +10789,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/display */ - display?: DisplayProperty; + display?: Property.Display | undefined; /** * The **`empty-cells`** CSS property sets whether borders and backgrounds appear around `<table>` cells that have no visible content. * @@ -10219,7 +10803,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/empty-cells */ - "empty-cells"?: EmptyCellsProperty; + "empty-cells"?: Property.EmptyCells | undefined; /** * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. * @@ -10234,7 +10818,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/filter */ - filter?: FilterProperty; + filter?: Property.Filter | undefined; /** * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. * @@ -10249,7 +10833,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-basis */ - "flex-basis"?: FlexBasisProperty<TLength>; + "flex-basis"?: Property.FlexBasis<TLength> | undefined; /** * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). * @@ -10264,9 +10848,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-direction */ - "flex-direction"?: FlexDirectionProperty; + "flex-direction"?: Property.FlexDirection | undefined; /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. * * **Syntax**: `<number>` * @@ -10279,9 +10863,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-grow */ - "flex-grow"?: GlobalsNumber; + "flex-grow"?: Property.FlexGrow | undefined; /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. + * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. * * **Syntax**: `<number>` * @@ -10294,7 +10878,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-shrink */ - "flex-shrink"?: GlobalsNumber; + "flex-shrink"?: Property.FlexShrink | undefined; /** * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. * @@ -10309,7 +10893,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-wrap */ - "flex-wrap"?: FlexWrapProperty; + "flex-wrap"?: Property.FlexWrap | undefined; /** * The **`float`** CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). * @@ -10323,7 +10907,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/float */ - float?: FloatProperty; + float?: Property.Float | undefined; /** * The **`font-family`** CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element. * @@ -10337,7 +10921,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-family */ - "font-family"?: FontFamilyProperty; + "font-family"?: Property.FontFamily | undefined; /** * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. * @@ -10352,7 +10936,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-feature-settings */ - "font-feature-settings"?: FontFeatureSettingsProperty; + "font-feature-settings"?: Property.FontFeatureSettings | undefined; /** * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. * @@ -10367,7 +10951,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-kerning */ - "font-kerning"?: FontKerningProperty; + "font-kerning"?: Property.FontKerning | undefined; /** * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. * @@ -10382,9 +10966,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-language-override */ - "font-language-override"?: FontLanguageOverrideProperty; + "font-language-override"?: Property.FontLanguageOverride | undefined; /** - * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. This only works for fonts that have an optical size variation axis. + * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. * * **Syntax**: `auto | none` * @@ -10396,9 +10980,21 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing */ - "font-optical-sizing"?: FontOpticalSizingProperty; + "font-optical-sizing"?: Property.FontOpticalSizing | undefined; /** - * The **`font-size`** CSS property sets the size of the font. This property is also used to compute the size of `em`, `ex`, and other relative `<length>` units. + * **Syntax**: `normal | light | dark | <palette-identifier>` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **101** | **107** | **15.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-palette + */ + "font-palette"?: Property.FontPalette | undefined; + /** + * The **`font-size`** CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative `<length>` units, such as `em`, `ex`, and so forth. * * **Syntax**: `<absolute-size> | <relative-size> | <length-percentage>` * @@ -10410,21 +11006,21 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-size */ - "font-size"?: FontSizeProperty<TLength>; + "font-size"?: Property.FontSize<TLength> | undefined; /** - * The **`font-size-adjust`** CSS property sets how the font size should be chosen based on the height of lowercase rather than capital letters. + * The **`font-size-adjust`** CSS property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters). * * **Syntax**: `none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]` * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **3** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | No | **3** | **16.4** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/font-size-adjust */ - "font-size-adjust"?: FontSizeAdjustProperty; + "font-size-adjust"?: Property.FontSizeAdjust | undefined; /** * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. * @@ -10438,7 +11034,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-smooth */ - "font-smooth"?: FontSmoothProperty<TLength>; + "font-smooth"?: Property.FontSmooth<TLength> | undefined; /** * The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font. * @@ -10452,7 +11048,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-stretch */ - "font-stretch"?: FontStretchProperty; + "font-stretch"?: Property.FontStretch | undefined; /** * The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`. * @@ -10466,13 +11062,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-style */ - "font-style"?: FontStyleProperty; + "font-style"?: Property.FontStyle | undefined; /** - * The **`font-synthesis`** CSS property controls which missing typefaces, bold or italic, may be synthesized by the browser. + * The **`font-synthesis`** CSS property controls which missing typefaces, bold, italic, or small-caps, may be synthesized by the browser. * - * **Syntax**: `none | [ weight || style || small-caps ]` + * **Syntax**: `none | [ weight || style || small-caps || position]` * - * **Initial value**: `weight style` + * **Initial value**: `weight style small-caps position ` * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :----: | :--: | :-: | @@ -10480,9 +11076,65 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis */ - "font-synthesis"?: FontSynthesisProperty; + "font-synthesis"?: Property.FontSynthesis | undefined; /** - * The **font-variant** CSS property is a shorthand for the longhand properties `font-variant-caps`, `font-variant-numeric`, `font-variant-alternates`, `font-variant-ligatures`, and `font-variant-east-asian`. You can also set the CSS Level 2 (Revision 1) values of `font-variant`, (that is, `normal` or `small-caps`), by using the `font` shorthand. + * The **`font-synthesis-position`** CSS property lets you specify whether or not a browser may synthesize the subscript and superscript "position" typefaces when they are missing in a font family, while using `font-variant-position` to set the positions. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | **118** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-position + */ + "font-synthesis-position"?: Property.FontSynthesisPosition | undefined; + /** + * The **`font-synthesis-small-caps`** CSS property lets you specify whether or not the browser may synthesize small-caps typeface when it is missing in a font family. Small-caps glyphs typically use the form of uppercase letters but are reduced to the size of lowercase letters. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-small-caps + */ + "font-synthesis-small-caps"?: Property.FontSynthesisSmallCaps | undefined; + /** + * The **`font-synthesis-style`** CSS property lets you specify whether or not the browser may synthesize the oblique typeface when it is missing in a font family. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-style + */ + "font-synthesis-style"?: Property.FontSynthesisStyle | undefined; + /** + * The **`font-synthesis-weight`** CSS property lets you specify whether or not the browser may synthesize the bold typeface when it is missing in a font family. + * + * **Syntax**: `auto | none` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **97** | **111** | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis-weight + */ + "font-synthesis-weight"?: Property.FontSynthesisWeight | undefined; + /** + * The **`font-variant`** CSS shorthand property allows you to set all the font variants for a font. * * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]` * @@ -10494,7 +11146,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant */ - "font-variant"?: FontVariantProperty; + "font-variant"?: Property.FontVariant | undefined; /** * The **`font-variant-alternates`** CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in `@font-feature-values`. * @@ -10502,13 +11154,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | No | **34** | **9.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :--: | :-: | + * | **111** | **34** | **9.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates */ - "font-variant-alternates"?: FontVariantAlternatesProperty; + "font-variant-alternates"?: Property.FontVariantAlternates | undefined; /** * The **`font-variant-caps`** CSS property controls the use of alternate glyphs for capital letters. * @@ -10522,7 +11174,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-caps */ - "font-variant-caps"?: FontVariantCapsProperty; + "font-variant-caps"?: Property.FontVariantCaps | undefined; /** * The **`font-variant-east-asian`** CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese. * @@ -10536,7 +11188,19 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian */ - "font-variant-east-asian"?: FontVariantEastAsianProperty; + "font-variant-east-asian"?: Property.FontVariantEastAsian | undefined; + /** + * **Syntax**: `normal | text | emoji | unicode` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | No | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-emoji + */ + "font-variant-emoji"?: Property.FontVariantEmoji | undefined; /** * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. * @@ -10551,7 +11215,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures */ - "font-variant-ligatures"?: FontVariantLigaturesProperty; + "font-variant-ligatures"?: Property.FontVariantLigatures | undefined; /** * The **`font-variant-numeric`** CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. * @@ -10565,7 +11229,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric */ - "font-variant-numeric"?: FontVariantNumericProperty; + "font-variant-numeric"?: Property.FontVariantNumeric | undefined; /** * The **`font-variant-position`** CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript. * @@ -10573,13 +11237,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | No | **34** | **9.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :--: | :-: | + * | **117** | **34** | **9.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-position */ - "font-variant-position"?: FontVariantPositionProperty; + "font-variant-position"?: Property.FontVariantPosition | undefined; /** * The **`font-variation-settings`** CSS property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. * @@ -10593,9 +11257,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-variation-settings */ - "font-variation-settings"?: FontVariationSettingsProperty; + "font-variation-settings"?: Property.FontVariationSettings | undefined; /** - * The **`font-weight`** CSS property specifies the weight (or boldness) of the font. The font weights available to you will depend on the `font-family` you are using. Some fonts are only available in `normal` and `bold`. + * The **`font-weight`** CSS property sets the weight (or boldness) of the font. The weights available depend on the `font-family` that is currently set. * * **Syntax**: `<font-weight-absolute> | bolder | lighter` * @@ -10607,7 +11271,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font-weight */ - "font-weight"?: FontWeightProperty; + "font-weight"?: Property.FontWeight | undefined; /** * The **`forced-color-adjust`** CSS property allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS. * @@ -10617,14 +11281,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :----: | :-----------------------------: | :---------------------------------: | - * | **89** | No | No | **79** | **10** _(-ms-high-contrast-adjust)_ | + * | **89** | **113** | No | **79** | **10** _(-ms-high-contrast-adjust)_ | * | | | | 12 _(-ms-high-contrast-adjust)_ | | * * @see https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust */ - "forced-color-adjust"?: ForcedColorAdjustProperty; + "forced-color-adjust"?: Property.ForcedColorAdjust | undefined; /** - * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track. + * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track or pattern of tracks. * * **Syntax**: `<track-size>+` * @@ -10636,7 +11300,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns */ - "grid-auto-columns"?: GridAutoColumnsProperty<TLength>; + "grid-auto-columns"?: Property.GridAutoColumns<TLength> | undefined; /** * The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. * @@ -10650,9 +11314,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow */ - "grid-auto-flow"?: GridAutoFlowProperty; + "grid-auto-flow"?: Property.GridAutoFlow | undefined; /** - * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track. + * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track or pattern of tracks. * * **Syntax**: `<track-size>+` * @@ -10664,9 +11328,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows */ - "grid-auto-rows"?: GridAutoRowsProperty<TLength>; + "grid-auto-rows"?: Property.GridAutoRows<TLength> | undefined; /** - * The **`grid-column-end`** CSS property specifies a grid item’s end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. + * The **`grid-column-end`** CSS property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. * * **Syntax**: `<grid-line>` * @@ -10678,9 +11342,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-end */ - "grid-column-end"?: GridColumnEndProperty; + "grid-column-end"?: Property.GridColumnEnd | undefined; /** - * The **`grid-column-start`** CSS property specifies a grid item’s start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. + * The **`grid-column-start`** CSS property specifies a grid item's start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. * * **Syntax**: `<grid-line>` * @@ -10692,9 +11356,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-start */ - "grid-column-start"?: GridColumnStartProperty; + "grid-column-start"?: Property.GridColumnStart | undefined; /** - * The **`grid-row-end`** CSS property specifies a grid item’s end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. + * The **`grid-row-end`** CSS property specifies a grid item's end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. * * **Syntax**: `<grid-line>` * @@ -10706,9 +11370,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-end */ - "grid-row-end"?: GridRowEndProperty; + "grid-row-end"?: Property.GridRowEnd | undefined; /** - * The **`grid-row-start`** CSS property specifies a grid item’s start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. + * The **`grid-row-start`** CSS property specifies a grid item's start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. * * **Syntax**: `<grid-line>` * @@ -10720,9 +11384,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-start */ - "grid-row-start"?: GridRowStartProperty; + "grid-row-start"?: Property.GridRowStart | undefined; /** - * The **`grid-template-areas`** CSS property specifies named grid areas. + * The **`grid-template-areas`** CSS property specifies named grid areas, establishing the cells in the grid and assigning them names. * * **Syntax**: `none | <string>+` * @@ -10734,7 +11398,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-areas */ - "grid-template-areas"?: GridTemplateAreasProperty; + "grid-template-areas"?: Property.GridTemplateAreas | undefined; /** * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. * @@ -10748,7 +11412,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-columns */ - "grid-template-columns"?: GridTemplateColumnsProperty<TLength>; + "grid-template-columns"?: Property.GridTemplateColumns<TLength> | undefined; /** * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. * @@ -10762,7 +11426,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-rows */ - "grid-template-rows"?: GridTemplateRowsProperty<TLength>; + "grid-template-rows"?: Property.GridTemplateRows<TLength> | undefined; /** * The **`hanging-punctuation`** CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box. * @@ -10776,7 +11440,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation */ - "hanging-punctuation"?: HangingPunctuationProperty; + "hanging-punctuation"?: Property.HangingPunctuation | undefined; /** * The **`height`** CSS property specifies the height of an element. By default, the property defines the height of the content area. If `box-sizing` is set to `border-box`, however, it instead determines the height of the border area. * @@ -10790,7 +11454,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/height */ - height?: HeightProperty<TLength>; + height?: Property.Height<TLength> | undefined; /** * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. * @@ -10798,30 +11462,43 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-----------: | :--: | :-: | - * | **6** _-x-_ | **98** | **5.1** _-x-_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :--: | :-: | + * | **106** | **98** | **17** | n/a | No | + * | 6 _-x-_ | | 5.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/hyphenate-character */ - "hyphenate-character"?: HyphenateCharacterProperty; + "hyphenate-character"?: Property.HyphenateCharacter | undefined; /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * The **`hyphenate-limit-chars`** CSS property specifies the minimum word length to allow hyphenation of words as well as the the minimum number of characters before and after the hyphen. + * + * **Syntax**: `[ auto | <integer> ]{1,3}` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | No | No | n/a | No | + */ + "hyphenate-limit-chars"?: Property.HyphenateLimitChars | undefined; + /** + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. * * **Syntax**: `none | manual | auto` * * **Initial value**: `manual` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----------: | :----: | :----------: | - * | **55** | **43** | **5.1** _-x-_ | **79** | **10** _-x-_ | - * | 13 _-x-_ | 6 _-x-_ | | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-------: | :----: | :----------: | + * | **55** | **43** | **17** | **79** | **10** _-x-_ | + * | 13 _-x-_ | 6 _-x-_ | 5.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/hyphens */ - hyphens?: HyphensProperty; + hyphens?: Property.Hyphens | undefined; /** - * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. It should _not_ be used for any other orientation adjustments; instead, the `transform` property should be used with the `rotate` `<transform-function>`. + * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. * * **Syntax**: `from-image | <angle> | [ <angle>? flip ]` * @@ -10833,7 +11510,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/image-orientation */ - "image-orientation"?: ImageOrientationProperty; + "image-orientation"?: Property.ImageOrientation | undefined; /** * The **`image-rendering`** CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants. * @@ -10847,13 +11524,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/image-rendering */ - "image-rendering"?: ImageRenderingProperty; + "image-rendering"?: Property.ImageRendering | undefined; /** * **Syntax**: `[ from-image || <resolution> ] && snap?` * * **Initial value**: `1dppx` */ - "image-resolution"?: ImageResolutionProperty; + "image-resolution"?: Property.ImageResolution | undefined; /** * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. * @@ -10861,13 +11538,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :--: | :-: | - * | No | No | **9** _-x-_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :---------: | :--: | :-: | + * | **110** | No | **9** _-x-_ | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/initial-letter */ - "initial-letter"?: InitialLetterProperty; + "initial-letter"?: Property.InitialLetter | undefined; /** * The **`inline-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. * @@ -10881,41 +11558,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inline-size */ - "inline-size"?: InlineSizeProperty<TLength>; + "inline-size"?: Property.InlineSize<TLength> | undefined; /** * **Syntax**: `auto | none` * * **Initial value**: `auto` */ - "input-security"?: InputSecurityProperty; - /** - * The **`inset`** CSS property defines the logical block and inline start and end offsets of an element, which map to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset - */ - inset?: InsetProperty<TLength>; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block - */ - "inset-block"?: InsetBlockProperty<TLength>; + "input-security"?: Property.InputSecurity | undefined; /** * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -10929,7 +11578,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-end */ - "inset-block-end"?: InsetBlockEndProperty<TLength>; + "inset-block-end"?: Property.InsetBlockEnd<TLength> | undefined; /** * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -10943,23 +11592,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-start */ - "inset-block-start"?: InsetBlockStartProperty<TLength>; + "inset-block-start"?: Property.InsetBlockStart<TLength> | undefined; /** - * The **`inset-inline`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline - */ - "inset-inline"?: InsetInlineProperty<TLength>; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'top'>` * @@ -10971,7 +11606,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-end */ - "inset-inline-end"?: InsetInlineEndProperty<TLength>; + "inset-inline-end"?: Property.InsetInlineEnd<TLength> | undefined; /** * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -10985,7 +11620,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-start */ - "inset-inline-start"?: InsetInlineStartProperty<TLength>; + "inset-inline-start"?: Property.InsetInlineStart<TLength> | undefined; /** * The **`isolation`** CSS property determines whether an element must create a new stacking context. * @@ -10999,7 +11634,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/isolation */ - isolation?: IsolationProperty; + isolation?: Property.Isolation | undefined; /** * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. * @@ -11014,7 +11649,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/justify-content */ - "justify-content"?: JustifyContentProperty; + "justify-content"?: Property.JustifyContent | undefined; /** * The CSS **`justify-items`** property defines the default `justify-self` for all items of the box, giving them all a default way of justifying each box along the appropriate axis. * @@ -11028,9 +11663,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/justify-items */ - "justify-items"?: JustifyItemsProperty; + "justify-items"?: Property.JustifyItems | undefined; /** - * The CSS **`justify-self`** property set the way a box is justified inside its alignment container along the appropriate axis. + * The CSS **`justify-self`** property sets the way a box is justified inside its alignment container along the appropriate axis. * * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]` * @@ -11042,9 +11677,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/justify-self */ - "justify-self"?: JustifySelfProperty; + "justify-self"?: Property.JustifySelf | undefined; /** - * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. + * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. * * **Syntax**: `[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#` * @@ -11056,9 +11691,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/justify-tracks */ - "justify-tracks"?: JustifyTracksProperty; + "justify-tracks"?: Property.JustifyTracks | undefined; /** - * The **`left`** CSS property participates in specifying the horizontal position of a _positioned element_. It has no effect on non-positioned elements. + * The **`left`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. * * **Syntax**: `<length> | <percentage> | auto` * @@ -11070,9 +11705,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/left */ - left?: LeftProperty<TLength>; + left?: Property.Left<TLength> | undefined; /** - * The **`letter-spacing`** CSS property sets the spacing behavior between text characters. + * The **`letter-spacing`** CSS property sets the horizontal spacing behavior between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of `letter-spacing` causes characters to spread farther apart, while negative values of `letter-spacing` bring characters closer together. * * **Syntax**: `normal | <length>` * @@ -11084,7 +11719,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/letter-spacing */ - "letter-spacing"?: LetterSpacingProperty<TLength>; + "letter-spacing"?: Property.LetterSpacing<TLength> | undefined; /** * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. * @@ -11099,9 +11734,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/line-break */ - "line-break"?: LineBreakProperty; + "line-break"?: Property.LineBreak | undefined; /** - * The **`line-height`** CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. + * The **`line-height`** CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. * * **Syntax**: `normal | <number> | <length> | <percentage>` * @@ -11113,7 +11748,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/line-height */ - "line-height"?: LineHeightProperty<TLength>; + "line-height"?: Property.LineHeight<TLength> | undefined; /** * The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. * @@ -11127,7 +11762,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/line-height-step */ - "line-height-step"?: LineHeightStepProperty<TLength>; + "line-height-step"?: Property.LineHeightStep<TLength> | undefined; /** * The **`list-style-image`** CSS property sets an image to be used as the list item marker. * @@ -11141,7 +11776,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/list-style-image */ - "list-style-image"?: ListStyleImageProperty; + "list-style-image"?: Property.ListStyleImage | undefined; /** * The **`list-style-position`** CSS property sets the position of the `::marker` relative to a list item. * @@ -11155,7 +11790,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/list-style-position */ - "list-style-position"?: ListStylePositionProperty; + "list-style-position"?: Property.ListStylePosition | undefined; /** * The **`list-style-type`** CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. * @@ -11169,21 +11804,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type */ - "list-style-type"?: ListStyleTypeProperty; - /** - * The **`margin-block`** CSS property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block - */ - "margin-block"?: MarginBlockProperty<TLength>; + "list-style-type"?: Property.ListStyleType | undefined; /** * The **`margin-block-end`** CSS property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. * @@ -11193,11 +11814,11 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-end */ - "margin-block-end"?: MarginBlockEndProperty<TLength>; + "margin-block-end"?: Property.MarginBlockEnd<TLength> | undefined; /** * The **`margin-block-start`** CSS property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. * @@ -11207,11 +11828,11 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-start */ - "margin-block-start"?: MarginBlockStartProperty<TLength>; + "margin-block-start"?: Property.MarginBlockStart<TLength> | undefined; /** * The **`margin-bottom`** CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. * @@ -11225,23 +11846,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin-bottom */ - "margin-bottom"?: MarginBottomProperty<TLength>; + "margin-bottom"?: Property.MarginBottom<TLength> | undefined; /** - * The **`margin-inline`** CSS property defines the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline - */ - "margin-inline"?: MarginInlineProperty<TLength>; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * @@ -11249,14 +11856,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----------------------: | :-------------------: | :----------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * | 2 _(-webkit-margin-end)_ | 3 _(-moz-margin-end)_ | 3 _(-webkit-margin-end)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-end */ - "margin-inline-end"?: MarginInlineEndProperty<TLength>; + "margin-inline-end"?: Property.MarginInlineEnd<TLength> | undefined; /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * @@ -11264,12 +11871,12 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :------------------------: | :---------------------: | :------------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * | 2 _(-webkit-margin-start)_ | 3 _(-moz-margin-start)_ | 3 _(-webkit-margin-start)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-start */ - "margin-inline-start"?: MarginInlineStartProperty<TLength>; + "margin-inline-start"?: Property.MarginInlineStart<TLength> | undefined; /** * The **`margin-left`** CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. * @@ -11283,7 +11890,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin-left */ - "margin-left"?: MarginLeftProperty<TLength>; + "margin-left"?: Property.MarginLeft<TLength> | undefined; /** * The **`margin-right`** CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. * @@ -11297,7 +11904,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin-right */ - "margin-right"?: MarginRightProperty<TLength>; + "margin-right"?: Property.MarginRight<TLength> | undefined; /** * The **`margin-top`** CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. * @@ -11311,7 +11918,21 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin-top */ - "margin-top"?: MarginTopProperty<TLength>; + "margin-top"?: Property.MarginTop<TLength> | undefined; + /** + * The `margin-trim` property allows the container to trim the margins of its children where they adjoin the container's edges. + * + * **Syntax**: `none | in-flow | all` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | No | No | **16.4** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-trim + */ + "margin-trim"?: Property.MarginTrim | undefined; /** * The **`mask-border-mode`** CSS property specifies the blending mode used in a mask border. * @@ -11319,7 +11940,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `alpha` */ - "mask-border-mode"?: MaskBorderModeProperty; + "mask-border-mode"?: Property.MaskBorderMode | undefined; /** * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. * @@ -11327,13 +11948,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-outset)_ | No | **3.1** _(-webkit-mask-box-image-outset)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-outset)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-outset)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-outset */ - "mask-border-outset"?: MaskBorderOutsetProperty<TLength>; + "mask-border-outset"?: Property.MaskBorderOutset<TLength> | undefined; /** * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. * @@ -11341,13 +11963,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `stretch` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-repeat)_ | No | **3.1** _(-webkit-mask-box-image-repeat)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-repeat)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-repeat)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat */ - "mask-border-repeat"?: MaskBorderRepeatProperty; + "mask-border-repeat"?: Property.MaskBorderRepeat | undefined; /** * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. * @@ -11355,13 +11978,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :--------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-slice)_ | No | **3.1** _(-webkit-mask-box-image-slice)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-slice)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-slice)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-slice */ - "mask-border-slice"?: MaskBorderSliceProperty; + "mask-border-slice"?: Property.MaskBorderSlice | undefined; /** * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. * @@ -11369,13 +11993,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-source)_ | No | **3.1** _(-webkit-mask-box-image-source)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-------------------------------------: | :-----: | :-----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-source)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-source)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-source */ - "mask-border-source"?: MaskBorderSourceProperty; + "mask-border-source"?: Property.MaskBorderSource | undefined; /** * The **`mask-border-width`** CSS property sets the width of an element's mask border. * @@ -11383,28 +12008,29 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :--------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-width)_ | No | **3.1** _(-webkit-mask-box-image-width)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------------: | :-----: | :----------------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image-width)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image-width)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-width */ - "mask-border-width"?: MaskBorderWidthProperty<TLength>; + "mask-border-width"?: Property.MaskBorderWidth<TLength> | undefined; /** - * The **`mask-clip`** CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area. + * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. * * **Syntax**: `[ <geometry-box> | no-clip ]#` * * **Initial value**: `border-box` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :--: | :-: | - * | **1** _-x-_ | **53** | **15.4** | n/a | No | - * | | | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * | 1 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-clip */ - "mask-clip"?: MaskClipProperty; + "mask-clip"?: Property.MaskClip | undefined; /** * The **`mask-composite`** CSS property represents a compositing operation used on the current mask layer with the mask layers below it. * @@ -11412,28 +12038,28 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `add` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :---: | :-: | - * | No | **53** | **15.4** | 18-79 | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-composite */ - "mask-composite"?: MaskCompositeProperty; + "mask-composite"?: Property.MaskComposite | undefined; /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. + * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. * * **Syntax**: `<mask-reference>#` * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 16-79 | No | - * | | | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 16-79 | No | + * | 1 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-image */ - "mask-image"?: MaskImageProperty; + "mask-image"?: Property.MaskImage | undefined; /** * The **`mask-mode`** CSS property sets whether the mask reference defined by `mask-image` is treated as a luminance or alpha mask. * @@ -11441,13 +12067,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `match-source` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | No | **53** | **15.4** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-mode */ - "mask-mode"?: MaskModeProperty; + "mask-mode"?: Property.MaskMode | undefined; /** * The **`mask-origin`** CSS property sets the origin of a mask. * @@ -11455,14 +12081,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `border-box` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :--: | :-: | - * | **1** _-x-_ | **53** | **15.4** | n/a | No | - * | | | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **120** | **53** | **15.4** | n/a | No | + * | 1 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-origin */ - "mask-origin"?: MaskOriginProperty; + "mask-origin"?: Property.MaskOrigin | undefined; /** * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. * @@ -11470,29 +12096,29 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `center` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 3.1 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-position */ - "mask-position"?: MaskPositionProperty<TLength>; + "mask-position"?: Property.MaskPosition<TLength> | undefined; /** * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. * * **Syntax**: `<repeat-style>#` * - * **Initial value**: `no-repeat` + * **Initial value**: `repeat` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 3.1 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-repeat */ - "mask-repeat"?: MaskRepeatProperty; + "mask-repeat"?: Property.MaskRepeat | undefined; /** * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. * @@ -11500,14 +12126,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :---: | :-: | - * | **4** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :---: | :-: | + * | **120** | **53** | **15.4** | 18-79 | No | + * | 4 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-size */ - "mask-size"?: MaskSizeProperty<TLength>; + "mask-size"?: Property.MaskSize<TLength> | undefined; /** * The **`mask-type`** CSS property sets whether an SVG `<mask>` element is used as a _luminance_ or an _alpha_ mask. It applies to the `<mask>` element itself. * @@ -11521,7 +12147,21 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/mask-type */ - "mask-type"?: MaskTypeProperty; + "mask-type"?: Property.MaskType | undefined; + /** + * This feature is not Baseline because it does not work in some of the most widely-used browsers. + * + * **Syntax**: `[ pack | next ] || [ definite-first | ordered ]` + * + * **Initial value**: `pack` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :---------: | :--: | :-: | + * | No | No | **preview** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/masonry-auto-flow + */ + "masonry-auto-flow"?: Property.MasonryAutoFlow | undefined; /** * The **`math-depth`** property describes a notion of _depth_ for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is `math`. * @@ -11529,13 +12169,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | n/a | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | **117** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/math-depth */ - "math-depth"?: MathDepthProperty; + "math-depth"?: Property.MathDepth | undefined; /** * The `math-shift` property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift. * @@ -11543,29 +12183,29 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | No | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **109** | No | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/math-shift */ - "math-shift"?: MathShiftProperty; + "math-shift"?: Property.MathShift | undefined; /** - * The `math-style` property indicates whether MathML equations should render with normal or compact height. + * The `math-style` property indicates whether MathML equations should render with normal or compact height. * * **Syntax**: `normal | compact` * * **Initial value**: `normal` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | n/a | n/a | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :------: | :--: | :-: | + * | **109** | **117** | **14.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/math-style */ - "math-style"?: MathStyleProperty; + "math-style"?: Property.MathStyle | undefined; /** - * The `**max-block-size**` CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. + * The **`max-block-size`** CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. * * **Syntax**: `<'max-width'>` * @@ -11577,7 +12217,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/max-block-size */ - "max-block-size"?: MaxBlockSizeProperty<TLength>; + "max-block-size"?: Property.MaxBlockSize<TLength> | undefined; /** * The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. * @@ -11591,9 +12231,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/max-height */ - "max-height"?: MaxHeightProperty<TLength>; + "max-height"?: Property.MaxHeight<TLength> | undefined; /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block depending on its writing mode. It corresponds to the `max-width` or the `max-height` property depending on the value defined for `writing-mode`. If the writing mode is vertically oriented, the value of `max-inline-size` relates to the maximal height of the element, otherwise it relates to the maximal width of the element. It relates to `max-block-size`, which defines the other dimension of the element. + * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. * * **Syntax**: `<'max-width'>` * @@ -11606,13 +12246,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/max-inline-size */ - "max-inline-size"?: MaxInlineSizeProperty<TLength>; + "max-inline-size"?: Property.MaxInlineSize<TLength> | undefined; /** * **Syntax**: `none | <integer>` * * **Initial value**: `none` */ - "max-lines"?: MaxLinesProperty; + "max-lines"?: Property.MaxLines | undefined; /** * The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. * @@ -11626,7 +12266,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/max-width */ - "max-width"?: MaxWidthProperty<TLength>; + "max-width"?: Property.MaxWidth<TLength> | undefined; /** * The **`min-block-size`** CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. * @@ -11640,7 +12280,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/min-block-size */ - "min-block-size"?: MinBlockSizeProperty<TLength>; + "min-block-size"?: Property.MinBlockSize<TLength> | undefined; /** * The **`min-height`** CSS property sets the minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `min-height`. * @@ -11654,7 +12294,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/min-height */ - "min-height"?: MinHeightProperty<TLength>; + "min-height"?: Property.MinHeight<TLength> | undefined; /** * The **`min-inline-size`** CSS property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. * @@ -11668,7 +12308,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/min-inline-size */ - "min-inline-size"?: MinInlineSizeProperty<TLength>; + "min-inline-size"?: Property.MinInlineSize<TLength> | undefined; /** * The **`min-width`** CSS property sets the minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `min-width`. * @@ -11682,7 +12322,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/min-width */ - "min-width"?: MinWidthProperty<TLength>; + "min-width"?: Property.MinWidth<TLength> | undefined; /** * The **`mix-blend-mode`** CSS property sets how an element's content should blend with the content of the element's parent and the element's background. * @@ -11696,9 +12336,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode */ - "mix-blend-mode"?: MixBlendModeProperty; + "mix-blend-mode"?: Property.MixBlendMode | undefined; /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path`. + * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. * * **Syntax**: `<length-percentage>` * @@ -11706,16 +12346,16 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | No | n/a | No | + * | **55** | **72** | **16** | n/a | No | * | 46 _(motion-distance)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance */ - "motion-distance"?: OffsetDistanceProperty<TLength>; + "motion-distance"?: Property.OffsetDistance<TLength> | undefined; /** * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. * - * **Syntax**: `none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]` + * **Syntax**: `none | <offset-path> || <coord-box>` * * **Initial value**: `none` * @@ -11726,9 +12366,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/offset-path */ - "motion-path"?: OffsetPathProperty; + "motion-path"?: Property.OffsetPath | undefined; /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. * * **Syntax**: `[ auto | reverse ] || <angle>` * @@ -11736,12 +12376,12 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | + * | **56** | **72** | **16** | n/a | No | * | 46 _(motion-rotation)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate */ - "motion-rotation"?: OffsetRotateProperty; + "motion-rotation"?: Property.OffsetRotate | undefined; /** * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. * @@ -11755,7 +12395,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/object-fit */ - "object-fit"?: ObjectFitProperty; + "object-fit"?: Property.ObjectFit | undefined; /** * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. * @@ -11769,21 +12409,21 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/object-position */ - "object-position"?: ObjectPositionProperty<TLength>; + "object-position"?: Property.ObjectPosition<TLength> | undefined; /** * **Syntax**: `auto | <position>` * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **72** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | **72** | **16** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-anchor */ - "offset-anchor"?: OffsetAnchorProperty<TLength>; + "offset-anchor"?: Property.OffsetAnchor<TLength> | undefined; /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path`. + * The **`offset-distance`** CSS property specifies a position along an `offset-path` for an element to be placed. * * **Syntax**: `<length-percentage>` * @@ -11791,16 +12431,16 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | No | n/a | No | + * | **55** | **72** | **16** | n/a | No | * | 46 _(motion-distance)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance */ - "offset-distance"?: OffsetDistanceProperty<TLength>; + "offset-distance"?: Property.OffsetDistance<TLength> | undefined; /** * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. * - * **Syntax**: `none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]` + * **Syntax**: `none | <offset-path> || <coord-box>` * * **Initial value**: `none` * @@ -11811,9 +12451,21 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/offset-path */ - "offset-path"?: OffsetPathProperty; + "offset-path"?: Property.OffsetPath | undefined; /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. + * **Syntax**: `normal | auto | <position>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | n/a | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/offset-position + */ + "offset-position"?: Property.OffsetPosition<TLength> | undefined; + /** + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. * * **Syntax**: `[ auto | reverse ] || <angle>` * @@ -11821,14 +12473,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | + * | **56** | **72** | **16** | n/a | No | * | 46 _(motion-rotation)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate */ - "offset-rotate"?: OffsetRotateProperty; + "offset-rotate"?: Property.OffsetRotate | undefined; /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. + * The **`offset-rotate`** CSS property defines the orientation/direction of the element as it is positioned along the `offset-path`. * * **Syntax**: `[ auto | reverse ] || <angle>` * @@ -11836,14 +12488,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | + * | **56** | **72** | **16** | n/a | No | * | 46 _(motion-rotation)_ | | | | | * * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate */ - "offset-rotation"?: OffsetRotateProperty; + "offset-rotation"?: Property.OffsetRotate | undefined; /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. * * **Syntax**: `<alpha-value>` * @@ -11855,7 +12507,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/opacity */ - opacity?: OpacityProperty; + opacity?: Property.Opacity | undefined; /** * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. * @@ -11870,7 +12522,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/order */ - order?: GlobalsNumber; + order?: Property.Order | undefined; /** * The **`orphans`** CSS property sets the minimum number of lines in a block container that must be shown at the _bottom_ of a page, region, or column. * @@ -11884,7 +12536,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/orphans */ - orphans?: GlobalsNumber; + orphans?: Property.Orphans | undefined; /** * The **`outline-color`** CSS property sets the color of an element's outline. * @@ -11898,7 +12550,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/outline-color */ - "outline-color"?: OutlineColorProperty; + "outline-color"?: Property.OutlineColor | undefined; /** * The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element. * @@ -11912,7 +12564,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/outline-offset */ - "outline-offset"?: OutlineOffsetProperty<TLength>; + "outline-offset"?: Property.OutlineOffset<TLength> | undefined; /** * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. * @@ -11926,9 +12578,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/outline-style */ - "outline-style"?: OutlineStyleProperty; + "outline-style"?: Property.OutlineStyle | undefined; /** - * The **`outline-width`** CSS property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. * * **Syntax**: `<line-width>` * @@ -11940,7 +12592,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/outline-width */ - "outline-width"?: OutlineWidthProperty<TLength>; + "outline-width"?: Property.OutlineWidth<TLength> | undefined; /** * **Syntax**: `auto | none` * @@ -11952,7 +12604,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-anchor */ - "overflow-anchor"?: OverflowAnchorProperty; + "overflow-anchor"?: Property.OverflowAnchor | undefined; /** * **Syntax**: `visible | hidden | clip | scroll | auto` * @@ -11964,21 +12616,15 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-block */ - "overflow-block"?: OverflowBlockProperty; + "overflow-block"?: Property.OverflowBlock | undefined; /** * The **`overflow-clip-box`** CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the `overflow-clip-box-inline` and `overflow-clip-box-block` properties. * * **Syntax**: `padding-box | content-box` * * **Initial value**: `padding-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **29** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Mozilla/Gecko/Chrome/CSS/overflow-clip-box */ - "overflow-clip-box"?: OverflowClipBoxProperty; + "overflow-clip-box"?: Property.OverflowClipBox | undefined; /** * **Syntax**: `<visual-box> || <length [0,∞]>` * @@ -11986,11 +12632,11 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :----: | :--: | :-: | - * | **90** | No | No | n/a | No | + * | **90** | **102** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin */ - "overflow-clip-margin"?: OverflowClipMarginProperty<TLength>; + "overflow-clip-margin"?: Property.OverflowClipMargin<TLength> | undefined; /** * **Syntax**: `visible | hidden | clip | scroll | auto` * @@ -12002,9 +12648,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-inline */ - "overflow-inline"?: OverflowInlineProperty; + "overflow-inline"?: Property.OverflowInline | undefined; /** - * The `**overflow-wrap**` CSS property sets whether the browser should insert line breaks within words to prevent text from overflowing its content box. + * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. * * **Syntax**: `normal | break-word | anywhere` * @@ -12017,7 +12663,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-wrap */ - "overflow-wrap"?: OverflowWrapProperty; + "overflow-wrap"?: Property.OverflowWrap | undefined; /** * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. * @@ -12031,7 +12677,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-x */ - "overflow-x"?: OverflowXProperty; + "overflow-x"?: Property.OverflowX | undefined; /** * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. * @@ -12045,9 +12691,23 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow-y */ - "overflow-y"?: OverflowYProperty; + "overflow-y"?: Property.OverflowY | undefined; /** - * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. + * The **`overlay`** CSS property specifies whether an element appearing in the top layer (for example, a shown popover or modal `<dialog>` element) is actually rendered in the top layer. This property is only relevant within a list of `transition-property` values, and only if `allow-discrete` is set as the `transition-behavior`. + * + * **Syntax**: `none | auto` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **117** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/overlay + */ + overlay?: Property.Overlay | undefined; + /** + * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. * * **Syntax**: `contain | none | auto` * @@ -12059,9 +12719,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block */ - "overscroll-behavior-block"?: OverscrollBehaviorBlockProperty; + "overscroll-behavior-block"?: Property.OverscrollBehaviorBlock | undefined; /** - * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. + * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. * * **Syntax**: `contain | none | auto` * @@ -12073,7 +12733,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline */ - "overscroll-behavior-inline"?: OverscrollBehaviorInlineProperty; + "overscroll-behavior-inline"?: Property.OverscrollBehaviorInline | undefined; /** * The **`overscroll-behavior-x`** CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. * @@ -12087,7 +12747,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x */ - "overscroll-behavior-x"?: OverscrollBehaviorXProperty; + "overscroll-behavior-x"?: Property.OverscrollBehaviorX | undefined; /** * The **`overscroll-behavior-y`** CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. * @@ -12101,23 +12761,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y */ - "overscroll-behavior-y"?: OverscrollBehaviorYProperty; + "overscroll-behavior-y"?: Property.OverscrollBehaviorY | undefined; /** - * The **`padding-block`** CSS property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block - */ - "padding-block"?: PaddingBlockProperty<TLength>; - /** - * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * @@ -12125,13 +12771,13 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-end */ - "padding-block-end"?: PaddingBlockEndProperty<TLength>; + "padding-block-end"?: Property.PaddingBlockEnd<TLength> | undefined; /** - * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * @@ -12139,11 +12785,11 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-start */ - "padding-block-start"?: PaddingBlockStartProperty<TLength>; + "padding-block-start"?: Property.PaddingBlockStart<TLength> | undefined; /** * The **`padding-bottom`** CSS property sets the height of the padding area on the bottom of an element. * @@ -12157,23 +12803,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding-bottom */ - "padding-bottom"?: PaddingBottomProperty<TLength>; + "padding-bottom"?: Property.PaddingBottom<TLength> | undefined; /** - * The **`padding-inline`** CSS property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline - */ - "padding-inline"?: PaddingInlineProperty<TLength>; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * @@ -12181,14 +12813,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :-----------------------: | :--------------------: | :-----------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * | 2 _(-webkit-padding-end)_ | 3 _(-moz-padding-end)_ | 3 _(-webkit-padding-end)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-end */ - "padding-inline-end"?: PaddingInlineEndProperty<TLength>; + "padding-inline-end"?: Property.PaddingInlineEnd<TLength> | undefined; /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * @@ -12196,14 +12828,14 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * | Chrome | Firefox | Safari | Edge | IE | * | :-------------------------: | :----------------------: | :-------------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | + * | **69** | **41** | **12.1** | n/a | No | * | 2 _(-webkit-padding-start)_ | 3 _(-moz-padding-start)_ | 3 _(-webkit-padding-start)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-start */ - "padding-inline-start"?: PaddingInlineStartProperty<TLength>; + "padding-inline-start"?: Property.PaddingInlineStart<TLength> | undefined; /** - * The **`padding-left`** CSS property sets the width of the padding area on the left side of an element. + * The **`padding-left`** CSS property sets the width of the padding area to the left of an element. * * **Syntax**: `<length> | <percentage>` * @@ -12215,9 +12847,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding-left */ - "padding-left"?: PaddingLeftProperty<TLength>; + "padding-left"?: Property.PaddingLeft<TLength> | undefined; /** - * The **`padding-right`** CSS property sets the width of the padding area on the right side of an element. + * The **`padding-right`** CSS property sets the width of the padding area on the right of an element. * * **Syntax**: `<length> | <percentage>` * @@ -12229,9 +12861,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding-right */ - "padding-right"?: PaddingRightProperty<TLength>; + "padding-right"?: Property.PaddingRight<TLength> | undefined; /** - * The **`padding-top`** padding area on the top of an element. + * The **`padding-top`** CSS property sets the height of the padding area on the top of an element. * * **Syntax**: `<length> | <percentage>` * @@ -12243,7 +12875,21 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding-top */ - "padding-top"?: PaddingTopProperty<TLength>; + "padding-top"?: Property.PaddingTop<TLength> | undefined; + /** + * The **`page`** CSS property is used to specify the named page, a specific type of page defined by the `@page` at-rule. + * + * **Syntax**: `auto | <custom-ident>` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-------: | :--: | :-: | + * | **85** | **110** | **≤13.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/page + */ + page?: Property.Page | undefined; /** * The **`page-break-after`** CSS property adjusts page breaks _after_ the current element. * @@ -12257,7 +12903,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/page-break-after */ - "page-break-after"?: PageBreakAfterProperty; + "page-break-after"?: Property.PageBreakAfter | undefined; /** * The **`page-break-before`** CSS property adjusts page breaks _before_ the current element. * @@ -12271,7 +12917,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/page-break-before */ - "page-break-before"?: PageBreakBeforeProperty; + "page-break-before"?: Property.PageBreakBefore | undefined; /** * The **`page-break-inside`** CSS property adjusts page breaks _inside_ the current element. * @@ -12285,7 +12931,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/page-break-inside */ - "page-break-inside"?: PageBreakInsideProperty; + "page-break-inside"?: Property.PageBreakInside | undefined; /** * The **`paint-order`** CSS property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn. * @@ -12299,22 +12945,22 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/paint-order */ - "paint-order"?: PaintOrderProperty; + "paint-order"?: Property.PaintOrder | undefined; /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. * * **Syntax**: `none | <length>` * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 12 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/perspective */ - perspective?: PerspectiveProperty<TLength>; + perspective?: Property.Perspective<TLength> | undefined; /** * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. * @@ -12322,30 +12968,16 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * **Initial value**: `50% 50%` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------: | :-----: | :-----: | :----: | :----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 12 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/perspective-origin */ - "perspective-origin"?: PerspectiveOriginProperty<TLength>; + "perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; /** - * The `**place-content**` CSS property is a shorthand for `align-content` and `justify-content`. It can be used in any layout method which utilizes both of these alignment values. - * - * **Syntax**: `<'align-content'> <'justify-content'>?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-content - */ - "place-content"?: PlaceContentProperty; - /** - * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of mouse events. + * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events. * * **Syntax**: `auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit` * @@ -12357,7 +12989,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/pointer-events */ - "pointer-events"?: PointerEventsProperty; + "pointer-events"?: Property.PointerEvents | undefined; /** * The **`position`** CSS property sets how an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements. * @@ -12371,7 +13003,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/position */ - position?: PositionProperty; + position?: Property.Position | undefined; /** * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. * @@ -12386,9 +13018,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust */ - "print-color-adjust"?: PrintColorAdjustProperty; + "print-color-adjust"?: Property.PrintColorAdjust | undefined; /** - * The **`quotes`** CSS property sets how quotation marks appear. + * The **`quotes`** CSS property sets how the browser should render quotation marks that are added using the `open-quotes` or `close-quotes` values of the CSS `content` property. * * **Syntax**: `none | auto | [ <string> <string> ]+` * @@ -12400,7 +13032,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/quotes */ - quotes?: QuotesProperty; + quotes?: Property.Quotes | undefined; /** * The **`resize`** CSS property sets whether an element is resizable, and if so, in which directions. * @@ -12414,9 +13046,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/resize */ - resize?: ResizeProperty; + resize?: Property.Resize | undefined; /** - * The **`right`** CSS property participates in specifying the horizontal position of a _positioned element_. It has no effect on non-positioned elements. + * The **`right`** CSS property participates in specifying the horizontal position of a positioned element. It has no effect on non-positioned elements. * * **Syntax**: `<length> | <percentage> | auto` * @@ -12428,9 +13060,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/right */ - right?: RightProperty<TLength>; + right?: Property.Right<TLength> | undefined; /** - * The **`rotate`** CSS property allows you to specify rotation transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * The **`rotate`** CSS property allows you to specify rotation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` property. * * **Syntax**: `none | <angle> | [ x | y | z | <number>{3} ] && <angle>` * @@ -12442,9 +13074,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/rotate */ - rotate?: RotateProperty; + rotate?: Property.Rotate | undefined; /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's grid rows. + * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. * * **Syntax**: `normal | <length-percentage>` * @@ -12456,9 +13088,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/row-gap */ - "row-gap"?: RowGapProperty<TLength>; + "row-gap"?: Property.RowGap<TLength> | undefined; /** - * The `**ruby-align**` CSS property defines the distribution of the different ruby elements over the base. + * The **`ruby-align`** CSS property defines the distribution of the different ruby elements over the base. * * **Syntax**: `start | center | space-between | space-around` * @@ -12470,15 +13102,15 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/ruby-align */ - "ruby-align"?: RubyAlignProperty; + "ruby-align"?: Property.RubyAlign | undefined; /** * **Syntax**: `separate | collapse | auto` * * **Initial value**: `separate` */ - "ruby-merge"?: RubyMergeProperty; + "ruby-merge"?: Property.RubyMerge | undefined; /** - * The `**ruby-position**` CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (`over`), under it (`under`), or between the characters, on their right side (`inter-character`). + * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). * * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` * @@ -12491,9 +13123,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/ruby-position */ - "ruby-position"?: RubyPositionProperty; + "ruby-position"?: Property.RubyPosition | undefined; /** - * The **`scale`** CSS property allows you to specify scale transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * The **`scale`** CSS property allows you to specify scale transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. * * **Syntax**: `none | <number>{1,3}` * @@ -12505,7 +13137,7 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scale */ - scale?: ScaleProperty; + scale?: Property.Scale | undefined; /** * The **`scroll-behavior`** CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. * @@ -12519,66 +13151,37 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-behavior */ - "scroll-behavior"?: ScrollBehaviorProperty; + "scroll-behavior"?: Property.ScrollBehavior | undefined; /** - * The **`scroll-margin`** property is a shorthand property which sets all of the `scroll-margin` longhands, assigning values much like the `margin` property does for the `margin-*` longhands. - * - * **Syntax**: `<length>{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | **90** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - "scroll-margin"?: ScrollMarginProperty<TLength>; - /** - * The `scroll-margin-block` property is a shorthand property which sets the scroll-margin longhands in the block dimension. - * - * **Syntax**: `<length>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block - */ - "scroll-margin-block"?: ScrollMarginBlockProperty<TLength>; - /** - * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end */ - "scroll-margin-block-end"?: ScrollMarginBlockEndProperty<TLength>; + "scroll-margin-block-end"?: Property.ScrollMarginBlockEnd<TLength> | undefined; /** - * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start */ - "scroll-margin-block-start"?: ScrollMarginBlockStartProperty<TLength>; + "scroll-margin-block-start"?: Property.ScrollMarginBlockStart<TLength> | undefined; /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -12591,51 +13194,37 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom */ - "scroll-margin-bottom"?: ScrollMarginBottomProperty<TLength>; + "scroll-margin-bottom"?: Property.ScrollMarginBottom<TLength> | undefined; /** - * The `scroll-margin-inline` property is a shorthand property which sets the scroll-margin longhands in the inline dimension. - * - * **Syntax**: `<length>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline - */ - "scroll-margin-inline"?: ScrollMarginInlineProperty<TLength>; - /** - * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end */ - "scroll-margin-inline-end"?: ScrollMarginInlineEndProperty<TLength>; + "scroll-margin-inline-end"?: Property.ScrollMarginInlineEnd<TLength> | undefined; /** - * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * * **Initial value**: `0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start */ - "scroll-margin-inline-start"?: ScrollMarginInlineStartProperty<TLength>; + "scroll-margin-inline-start"?: Property.ScrollMarginInlineStart<TLength> | undefined; /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -12648,9 +13237,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left */ - "scroll-margin-left"?: ScrollMarginLeftProperty<TLength>; + "scroll-margin-left"?: Property.ScrollMarginLeft<TLength> | undefined; /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -12663,9 +13252,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right */ - "scroll-margin-right"?: ScrollMarginRightProperty<TLength>; + "scroll-margin-right"?: Property.ScrollMarginRight<TLength> | undefined; /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -12678,41 +13267,9 @@ export interface StandardLonghandPropertiesHyphen<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top */ - "scroll-margin-top"?: ScrollMarginTopProperty<TLength>; + "scroll-margin-top"?: Property.ScrollMarginTop<TLength> | undefined; /** - * The scroll-padding property is a shorthand property which sets all of the scroll-padding longhands, assigning values much like the padding property does for the padding-\* longhands. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding - */ - "scroll-padding"?: ScrollPaddingProperty<TLength>; - /** - * The `scroll-padding-block` property is a shorthand property which sets the scroll-padding longhands for the block dimension. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block - */ - "scroll-padding-block"?: ScrollPaddingBlockProperty<TLength>; - /** - * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -12724,9 +13281,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end */ - "scroll-padding-block-end"?: ScrollPaddingBlockEndProperty<TLength>; + "scroll-padding-block-end"?: Property.ScrollPaddingBlockEnd<TLength> | undefined; /** - * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -12738,9 +13295,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start */ - "scroll-padding-block-start"?: ScrollPaddingBlockStartProperty<TLength>; + "scroll-padding-block-start"?: Property.ScrollPaddingBlockStart<TLength> | undefined; /** - * The `scroll-padding-bottom` property defines offsets for the bottom of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-bottom` property defines offsets for the bottom of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -12752,25 +13309,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom */ - "scroll-padding-bottom"?: ScrollPaddingBottomProperty<TLength>; + "scroll-padding-bottom"?: Property.ScrollPaddingBottom<TLength> | undefined; /** - * The `scroll-padding-inline` property is a shorthand property which sets the scroll-padding longhands for the inline dimension. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline - */ - "scroll-padding-inline"?: ScrollPaddingInlineProperty<TLength>; - /** - * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -12782,9 +13323,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end */ - "scroll-padding-inline-end"?: ScrollPaddingInlineEndProperty<TLength>; + "scroll-padding-inline-end"?: Property.ScrollPaddingInlineEnd<TLength> | undefined; /** - * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -12796,9 +13337,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start */ - "scroll-padding-inline-start"?: ScrollPaddingInlineStartProperty<TLength>; + "scroll-padding-inline-start"?: Property.ScrollPaddingInlineStart<TLength> | undefined; /** - * The `scroll-padding-left` property defines offsets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-left` property defines offsets for the left of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -12810,9 +13351,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left */ - "scroll-padding-left"?: ScrollPaddingLeftProperty<TLength>; + "scroll-padding-left"?: Property.ScrollPaddingLeft<TLength> | undefined; /** - * The `scroll-padding-right` property defines offsets for the right of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-right` property defines offsets for the right of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -12824,9 +13365,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right */ - "scroll-padding-right"?: ScrollPaddingRightProperty<TLength>; + "scroll-padding-right"?: Property.ScrollPaddingRight<TLength> | undefined; /** - * The `scroll-padding-top` property defines offsets for the top of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The **`scroll-padding-top`** property defines offsets for the top of the _optimal viewing region_ of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or to put more breathing room between a targeted element and the edges of the scrollport. * * **Syntax**: `auto | <length-percentage>` * @@ -12838,9 +13379,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top */ - "scroll-padding-top"?: ScrollPaddingTopProperty<TLength>; + "scroll-padding-top"?: Property.ScrollPaddingTop<TLength> | undefined; /** - * The `scroll-snap-align` property specifies the box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. + * The `scroll-snap-align` property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. * * **Syntax**: `[ none | start | end | center ]{1,2}` * @@ -12852,24 +13393,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align */ - "scroll-snap-align"?: ScrollSnapAlignProperty; + "scroll-snap-align"?: Property.ScrollSnapAlign | undefined; /** - * The **`scroll-margin`** property is a shorthand property which sets all of the `scroll-margin` longhands, assigning values much like the `margin` property does for the `margin-*` longhands. - * - * **Syntax**: `<length>{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | 68-90 | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - "scroll-snap-margin"?: ScrollMarginProperty<TLength>; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -12882,9 +13408,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom */ - "scroll-snap-margin-bottom"?: ScrollMarginBottomProperty<TLength>; + "scroll-snap-margin-bottom"?: Property.ScrollMarginBottom<TLength> | undefined; /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -12897,9 +13423,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left */ - "scroll-snap-margin-left"?: ScrollMarginLeftProperty<TLength>; + "scroll-snap-margin-left"?: Property.ScrollMarginLeft<TLength> | undefined; /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -12912,9 +13438,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right */ - "scroll-snap-margin-right"?: ScrollMarginRightProperty<TLength>; + "scroll-snap-margin-right"?: Property.ScrollMarginRight<TLength> | undefined; /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets. * * **Syntax**: `<length>` * @@ -12927,9 +13453,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top */ - "scroll-snap-margin-top"?: ScrollMarginTopProperty<TLength>; + "scroll-snap-margin-top"?: Property.ScrollMarginTop<TLength> | undefined; /** - * The **`scroll-snap-stop`** CSS property defines whether the scroll container is allowed to "pass over" possible snap positions. + * The **`scroll-snap-stop`** CSS property defines whether or not the scroll container is allowed to "pass over" possible snap positions. * * **Syntax**: `normal | always` * @@ -12941,7 +13467,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop */ - "scroll-snap-stop"?: ScrollSnapStopProperty; + "scroll-snap-stop"?: Property.ScrollSnapStop | undefined; /** * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. * @@ -12956,7 +13482,35 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type */ - "scroll-snap-type"?: ScrollSnapTypeProperty; + "scroll-snap-type"?: Property.ScrollSnapType | undefined; + /** + * The **`scroll-timeline-axis`** CSS property can be used to specify the scrollbar that will be used to provide the timeline for a scroll-timeline animation. + * + * **Syntax**: `[ block | inline | x | y ]#` + * + * **Initial value**: `block` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-axis + */ + "scroll-timeline-axis"?: Property.ScrollTimelineAxis | undefined; + /** + * The **`scroll-timeline-name`** CSS property defines a name that can be used to identify an element as the source of a scroll timeline for an animation. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline-name + */ + "scroll-timeline-name"?: Property.ScrollTimelineName | undefined; /** * The **`scrollbar-color`** CSS property sets the color of the scrollbar track and thumb. * @@ -12964,13 +13518,13 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **64** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **121** | **64** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-color */ - "scrollbar-color"?: ScrollbarColorProperty; + "scrollbar-color"?: Property.ScrollbarColor | undefined; /** * The **`scrollbar-gutter`** CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed. * @@ -12984,21 +13538,21 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter */ - "scrollbar-gutter"?: ScrollbarGutterProperty; + "scrollbar-gutter"?: Property.ScrollbarGutter | undefined; /** - * The `scrollbar-width` property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. + * The **`scrollbar-width`** property allows the author to set the maximum thickness of an element's scrollbars when they are shown. * * **Syntax**: `auto | thin | none` * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **64** | No | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **121** | **64** | No | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-width */ - "scrollbar-width"?: ScrollbarWidthProperty; + "scrollbar-width"?: Property.ScrollbarWidth | undefined; /** * The **`shape-image-threshold`** CSS property sets the alpha channel threshold used to extract the shape using an image as the value for `shape-outside`. * @@ -13012,7 +13566,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold */ - "shape-image-threshold"?: ShapeImageThresholdProperty; + "shape-image-threshold"?: Property.ShapeImageThreshold | undefined; /** * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. * @@ -13026,7 +13580,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/shape-margin */ - "shape-margin"?: ShapeMarginProperty<TLength>; + "shape-margin"?: Property.ShapeMargin<TLength> | undefined; /** * The **`shape-outside`** CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap. By default, inline content wraps around its margin box; `shape-outside` provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. * @@ -13040,9 +13594,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/shape-outside */ - "shape-outside"?: ShapeOutsideProperty; + "shape-outside"?: Property.ShapeOutside | undefined; /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). * * **Syntax**: `<integer> | <length>` * @@ -13055,7 +13609,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/tab-size */ - "tab-size"?: TabSizeProperty<TLength>; + "tab-size"?: Property.TabSize<TLength> | undefined; /** * The **`table-layout`** CSS property sets the algorithm used to lay out `<table>` cells, rows, and columns. * @@ -13069,9 +13623,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/table-layout */ - "table-layout"?: TableLayoutProperty; + "table-layout"?: Property.TableLayout | undefined; /** - * The **`text-align`** CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like `vertical-align` but in the horizontal direction. + * The **`text-align`** CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like `vertical-align` but in the horizontal direction. * * **Syntax**: `start | end | left | right | center | justify | match-parent` * @@ -13083,7 +13637,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-align */ - "text-align"?: TextAlignProperty; + "text-align"?: Property.TextAlign | undefined; /** * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. * @@ -13097,7 +13651,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-align-last */ - "text-align-last"?: TextAlignLastProperty; + "text-align-last"?: Property.TextAlignLast | undefined; /** * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. * @@ -13105,14 +13659,14 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `none` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :-----: | :------------------------------: | :---: | :------------------------------------: | - * | **48** | **48** | **5.1** _(-webkit-text-combine)_ | 15-79 | **11** _(-ms-text-combine-horizontal)_ | - * | 9 _(-webkit-text-combine)_ | | | | | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------: | :-----: | :--------------------------: | :----: | :------------------------------------: | + * | **48** | **48** | **15.4** | **79** | **11** _(-ms-text-combine-horizontal)_ | + * | 9 _(-webkit-text-combine)_ | | 5.1 _(-webkit-text-combine)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/text-combine-upright */ - "text-combine-upright"?: TextCombineUprightProperty; + "text-combine-upright"?: Property.TextCombineUpright | undefined; /** * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. * @@ -13127,7 +13681,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-color */ - "text-decoration-color"?: TextDecorationColorProperty; + "text-decoration-color"?: Property.TextDecorationColor | undefined; /** * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. * @@ -13142,9 +13696,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-line */ - "text-decoration-line"?: TextDecorationLineProperty; + "text-decoration-line"?: Property.TextDecorationLine | undefined; /** - * The **`text-decoration-skip`** CSS property sets what parts of an element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. + * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. * * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` * @@ -13157,7 +13711,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip */ - "text-decoration-skip"?: TextDecorationSkipProperty; + "text-decoration-skip"?: Property.TextDecorationSkip | undefined; /** * The **`text-decoration-skip-ink`** CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. * @@ -13171,7 +13725,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink */ - "text-decoration-skip-ink"?: TextDecorationSkipInkProperty; + "text-decoration-skip-ink"?: Property.TextDecorationSkipInk | undefined; /** * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. * @@ -13186,9 +13740,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-style */ - "text-decoration-style"?: TextDecorationStyleProperty; + "text-decoration-style"?: Property.TextDecorationStyle | undefined; /** - * The **`text-decoration-thickness`** CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline. + * The **`text-decoration-thickness`** CSS property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline. * * **Syntax**: `auto | from-font | <length> | <percentage> ` * @@ -13200,7 +13754,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness */ - "text-decoration-thickness"?: TextDecorationThicknessProperty<TLength>; + "text-decoration-thickness"?: Property.TextDecorationThickness<TLength> | undefined; /** * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. * @@ -13215,7 +13769,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color */ - "text-emphasis-color"?: TextEmphasisColorProperty; + "text-emphasis-color"?: Property.TextEmphasisColor | undefined; /** * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. * @@ -13230,7 +13784,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position */ - "text-emphasis-position"?: GlobalsString; + "text-emphasis-position"?: Property.TextEmphasisPosition | undefined; /** * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. * @@ -13245,7 +13799,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style */ - "text-emphasis-style"?: TextEmphasisStyleProperty; + "text-emphasis-style"?: Property.TextEmphasisStyle | undefined; /** * The **`text-indent`** CSS property sets the length of empty space (indentation) that is put before lines of text in a block. * @@ -13259,7 +13813,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-indent */ - "text-indent"?: TextIndentProperty<TLength>; + "text-indent"?: Property.TextIndent<TLength> | undefined; /** * The **`text-justify`** CSS property sets what type of justification should be applied to text when `text-align``: justify;` is set on an element. * @@ -13267,13 +13821,13 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `auto` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | n/a | **55** | No | **12** | **11** | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :---: | :----: | + * | n/a | **55** | No | 12-79 | **11** | * * @see https://developer.mozilla.org/docs/Web/CSS/text-justify */ - "text-justify"?: TextJustifyProperty; + "text-justify"?: Property.TextJustify | undefined; /** * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. * @@ -13288,7 +13842,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-orientation */ - "text-orientation"?: TextOrientationProperty; + "text-orientation"?: Property.TextOrientation | undefined; /** * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. * @@ -13302,7 +13856,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-overflow */ - "text-overflow"?: TextOverflowProperty; + "text-overflow"?: Property.TextOverflow | undefined; /** * The **`text-rendering`** CSS property provides information to the rendering engine about what to optimize for when rendering text. * @@ -13316,7 +13870,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-rendering */ - "text-rendering"?: TextRenderingProperty; + "text-rendering"?: Property.TextRendering | undefined; /** * The **`text-shadow`** CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color. * @@ -13330,7 +13884,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-shadow */ - "text-shadow"?: TextShadowProperty; + "text-shadow"?: Property.TextShadow | undefined; /** * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. * @@ -13344,9 +13898,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-size-adjust */ - "text-size-adjust"?: TextSizeAdjustProperty; + "text-size-adjust"?: Property.TextSizeAdjust | undefined; /** - * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby + * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby. * * **Syntax**: `none | capitalize | uppercase | lowercase | full-width | full-size-kana` * @@ -13358,7 +13912,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-transform */ - "text-transform"?: TextTransformProperty; + "text-transform"?: Property.TextTransform | undefined; /** * The **`text-underline-offset`** CSS property sets the offset distance of an underline text decoration line (applied using `text-decoration`) from its original position. * @@ -13372,7 +13926,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-offset */ - "text-underline-offset"?: TextUnderlineOffsetProperty<TLength>; + "text-underline-offset"?: Property.TextUnderlineOffset<TLength> | undefined; /** * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. * @@ -13387,9 +13941,37 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-position */ - "text-underline-position"?: TextUnderlinePositionProperty; + "text-underline-position"?: Property.TextUnderlinePosition | undefined; /** - * The **`top`** CSS property participates in specifying the vertical position of a _positioned element_. It has no effect on non-positioned elements. + * The **`text-wrap`** CSS property controls how text inside an element is wrapped. The different values provide: + * + * **Syntax**: `wrap | nowrap | balance | stable | pretty` + * + * **Initial value**: `wrap` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **114** | **121** | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/text-wrap + */ + "text-wrap"?: Property.TextWrap | undefined; + /** + * The **`timeline-scope`** CSS property modifies the scope of a named animation timeline. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **116** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/timeline-scope + */ + "timeline-scope"?: Property.TimelineScope | undefined; + /** + * The **`top`** CSS property participates in specifying the vertical position of a positioned element. It has no effect on non-positioned elements. * * **Syntax**: `<length> | <percentage> | auto` * @@ -13401,9 +13983,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/top */ - top?: TopProperty<TLength>; + top?: Property.Top<TLength> | undefined; /** - * The **`touch-action`** CSS property sets how a region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). + * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). * * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` * @@ -13416,7 +13998,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/touch-action */ - "touch-action"?: TouchActionProperty; + "touch-action"?: Property.TouchAction | undefined; /** * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. * @@ -13431,9 +14013,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/transform */ - transform?: TransformProperty; + transform?: Property.Transform | undefined; /** - * The **`transform-box`** CSS property defines the layout box to which the `transform` and `transform-origin` properties relate. + * The **`transform-box`** CSS property defines the layout box to which the `transform`, individual transform properties `translate`,`scale`, and `rotate`, and `transform-origin` properties relate. * * **Syntax**: `content-box | border-box | fill-box | stroke-box | view-box` * @@ -13445,7 +14027,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/transform-box */ - "transform-box"?: TransformBoxProperty; + "transform-box"?: Property.TransformBox | undefined; /** * The **`transform-origin`** CSS property sets the origin for an element's transformations. * @@ -13453,14 +14035,14 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `50% 50% 0` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-------: | :-----: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 3.5 _-x-_ | 2 _-x-_ | | 9 _-x-_ | + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-----: | :----: | :-----: | + * | **36** | **16** | **9** | **12** | **10** | + * | 1 _-x-_ | | 2 _-x-_ | | 9 _-x-_ | * * @see https://developer.mozilla.org/docs/Web/CSS/transform-origin */ - "transform-origin"?: TransformOriginProperty<TLength>; + "transform-origin"?: Property.TransformOrigin<TLength> | undefined; /** * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. * @@ -13468,8700 +14050,28 @@ The scroll-padding properties define offsets for the optimal viewing region of * * **Initial value**: `flat` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :-: | - * | **36** | **16** | **9** | **12** | No | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-style - */ - "transform-style"?: TransformStyleProperty; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-delay - */ - "transition-delay"?: GlobalsString; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-duration - */ - "transition-duration"?: GlobalsString; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-property - */ - "transition-property"?: TransitionPropertyProperty; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-timing-function - */ - "transition-timing-function"?: TransitionTimingFunctionProperty; - /** - * The **`translate`** CSS property allows you to specify translation transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <length-percentage> [ <length-percentage> <length>? ]?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/translate - */ - translate?: TranslateProperty<TLength>; - /** - * The **`unicode-bidi`** CSS property, together with the `direction` property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The `unicode-bidi` property overrides this algorithm and allows the developer to control the text embedding. - * - * **Syntax**: `normal | embed | isolate | bidi-override | isolate-override | plaintext` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-----: | - * | **2** | **1** | **1.3** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/unicode-bidi - */ - "unicode-bidi"?: UnicodeBidiProperty; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :------: | :----------: | - * | **54** | **69** | **3** _-x-_ | **79** | **10** _-x-_ | - * | 1 _-x-_ | 1 _-x-_ | | 12 _-x-_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/user-select - */ - "user-select"?: UserSelectProperty; - /** - * The **`vertical-align`** CSS property sets vertical alignment of an inline or table-cell box. - * - * **Syntax**: `baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>` - * - * **Initial value**: `baseline` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/vertical-align - */ - "vertical-align"?: VerticalAlignProperty<TLength>; - /** - * The **`visibility`** CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`. - * - * **Syntax**: `visible | hidden | collapse` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/visibility - */ - visibility?: VisibilityProperty; - /** - * The **`white-space`** CSS property sets how white space inside an element is handled. - * - * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/white-space - */ - "white-space"?: WhiteSpaceProperty; - /** - * The **`widows`** CSS property sets the minimum number of lines in a block container that must be shown at the _top_ of a page, region, or column. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `2` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **25** | No | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/widows - */ - widows?: GlobalsNumber; - /** - * The **`width`** CSS property sets an element's width. By default it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/width - */ - width?: WidthProperty<TLength>; - /** - * The **`will-change`** CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is actually changed. These kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required. - * - * **Syntax**: `auto | <animateable-feature>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **36** | **36** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/will-change - */ - "will-change"?: WillChangeProperty; - /** - * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. - * - * **Syntax**: `normal | break-all | keep-all | break-word` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **15** | **3** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/word-break - */ - "word-break"?: WordBreakProperty; - /** - * The **`word-spacing`** CSS property sets the length of space between words and between tags. - * - * **Syntax**: `normal | <length>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/word-spacing - */ - "word-spacing"?: WordSpacingProperty<TLength>; - /** - * The `**overflow-wrap**` CSS property sets whether the browser should insert line breaks within words to prevent text from overflowing its content box. - * - * **Syntax**: `normal | break-word` - * - * **Initial value**: `normal` - */ - "word-wrap"?: WordWrapProperty; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :---: | - * | **48** | **41** | **10.1** | **12** | **9** | - * | 8 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/writing-mode - */ - "writing-mode"?: WritingModeProperty; - /** - * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one. - * - * **Syntax**: `auto | <integer>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/z-index - */ - "z-index"?: ZIndexProperty; - /** - * The non-standard **`zoom`** CSS property can be used to control the magnification level of an element. `transform: scale()` should be used instead of this property, if possible. However, unlike CSS Transforms, `zoom` affects the layout size of the element. - * - * **Syntax**: `normal | reset | <number> | <percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-----: | - * | **1** | No | **3.1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/zoom - */ - zoom?: ZoomProperty; -} - -export interface StandardShorthandPropertiesHyphen<TLength = string | 0> { - /** - * The `**all**` CSS shorthand property sets all of an element's properties (other than `unicode-bidi` and `direction`) to their initial or inherited values, or to the values specified in another stylesheet origin. - * - * **Syntax**: `initial | inherit | unset | revert | revert-layer` - * - * **Initial value**: There is no practical initial value for it. - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **37** | **27** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/all - */ - all?: Globals; - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation - */ - animation?: AnimationProperty; - /** - * The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. - * - * **Syntax**: `[ <bg-layer> , ]* <final-bg-layer>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background - */ - background?: BackgroundProperty<TLength>; - /** - * The **`background-position`** CSS property sets the initial position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `<bg-position>#` - * - * **Initial value**: `0% 0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position - */ - "background-position"?: BackgroundPositionProperty<TLength>; - /** - * The **`border`** CSS property sets an element's border. It's a shorthand for `border-width`, `border-style`, and `border-color`. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border - */ - border?: BorderProperty<TLength>; - /** - * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block - */ - "border-block"?: BorderBlockProperty<TLength>; - /** - * The **`border-block-end`** CSS property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end - */ - "border-block-end"?: BorderBlockEndProperty<TLength>; - /** - * The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start - */ - "border-block-start"?: BorderBlockStartProperty<TLength>; - /** - * The **`border-bottom`** CSS property is a shorthand that sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. These properties set an element's bottom border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom - */ - "border-bottom"?: BorderBottomProperty<TLength>; - /** - * The **`border-color`** shorthand CSS property sets the color of all sides of an element's border. - * - * **Syntax**: `<color>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-color - */ - "border-color"?: BorderColorProperty; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-------: | :-----: | :----: | :----: | - * | **16** | **15** | **6** | **12** | **11** | - * | 7 _-x-_ | 3.5 _-x-_ | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image - */ - "border-image"?: BorderImageProperty; - /** - * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline - */ - "border-inline"?: BorderInlineProperty<TLength>; - /** - * The **`border-inline-end`** CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end - */ - "border-inline-end"?: BorderInlineEndProperty<TLength>; - /** - * The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start - */ - "border-inline-start"?: BorderInlineStartProperty<TLength>; - /** - * The **`border-left`** CSS property is a shorthand that sets the values of `border-left-width`, `border-left-style` and `border-left-color`. These properties set an element's left border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left - */ - "border-left"?: BorderLeftProperty<TLength>; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-radius - */ - "border-radius"?: BorderRadiusProperty<TLength>; - /** - * The **`border-right`** CSS property is a shorthand that sets the values of `border-right-width`, `border-right-style` and `border-right-color`. These properties set an element's right border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right - */ - "border-right"?: BorderRightProperty<TLength>; - /** - * The **`border-style`** CSS property is a shorthand property that sets the line style for all four sides of an element's border. - * - * **Syntax**: `<line-style>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-style - */ - "border-style"?: BorderStyleProperty; - /** - * The **`border-top`** CSS property is a shorthand that sets the values of `border-top-width`, `border-top-style` and `border-top-color`. These properties set an element's top border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top - */ - "border-top"?: BorderTopProperty<TLength>; - /** - * The **`border-width`** shorthand CSS property sets the widths of all four sides of an element's border. - * - * **Syntax**: `<line-width>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-width - */ - "border-width"?: BorderWidthProperty<TLength>; - /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule - */ - "column-rule"?: ColumnRuleProperty<TLength>; - /** - * The **`columns`** CSS property sets the column width and column count of an element. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/columns - */ - columns?: ColumnsProperty<TLength>; - /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex - */ - flex?: FlexProperty<TLength>; - /** - * The **`flex-flow`** CSS property is a shorthand property for `flex-direction` and `flex-wrap` properties. - * - * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-flow - */ - "flex-flow"?: FlexFlowProperty; - /** - * The **`font`** CSS property is a shorthand for `font-style`, `font-variant`, `font-weight`, `font-size`, `line-height`, and `font-family`. Alternatively, it sets an element's font to a system font. - * - * **Syntax**: `[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font - */ - font?: FontProperty; - /** - * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. - * - * **Syntax**: `<'row-gap'> <'column-gap'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/gap - */ - gap?: GapProperty<TLength>; - /** - * The **`grid`** CSS property is a shorthand property that sets all of the explicit grid properties (`grid-template-rows`, `grid-template-columns`, and `grid-template-areas`), and all the implicit grid properties (`grid-auto-rows`, `grid-auto-columns`, and `grid-auto-flow`), in a single declaration. - * - * **Syntax**: `<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid - */ - grid?: GridProperty; - /** - * The **`grid-area`** CSS property is a shorthand property for `grid-row-start`, `grid-column-start`, `grid-row-end` and `grid-column-end`, specifying a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]{0,3}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-area - */ - "grid-area"?: GridAreaProperty; - /** - * The **`grid-column`** CSS property is a shorthand property for `grid-column-start` and `grid-column-end` specifying a grid item's size and location within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column - */ - "grid-column"?: GridColumnProperty; - /** - * The **`grid-row`** CSS property is a shorthand property for `grid-row-start` and `grid-row-end` specifying a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row - */ - "grid-row"?: GridRowProperty; - /** - * The **`grid-template`** CSS property is a shorthand property for defining grid columns, rows, and areas. - * - * **Syntax**: `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template - */ - "grid-template"?: GridTemplateProperty; - /** - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - "line-clamp"?: LineClampProperty; - /** - * The **`list-style`** CSS property is a shorthand to set list style properties `list-style-type`, `list-style-image`, and `list-style-position`. - * - * **Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style - */ - "list-style"?: ListStyleProperty; - /** - * The **`margin`** CSS property sets the margin area on all four sides of an element. It is a shorthand for `margin-top`, `margin-right`, `margin-bottom`, and `margin-left`. - * - * **Syntax**: `[ <length> | <percentage> | auto ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin - */ - margin?: MarginProperty<TLength>; - /** - * The **`mask`** CSS property hides an element (partially or fully) by masking or clipping the image at specific points. - * - * **Syntax**: `<mask-layer>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :---: | :-: | - * | **1** | **2** | **3.1** | 12-79 | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask - */ - mask?: MaskProperty<TLength>; - /** - * The **`mask-border`** CSS property lets you create a mask along the edge of an element's border. - * - * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :-----: | :--------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image)_ | No | **3.1** _(-webkit-mask-box-image)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border - */ - "mask-border"?: MaskBorderProperty; - /** - * The **`offset`** CSS property is a shorthand property for animating an element along a defined path. - * - * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset - */ - motion?: OffsetProperty<TLength>; - /** - * The **`offset`** CSS property is a shorthand property for animating an element along a defined path. - * - * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset - */ - offset?: OffsetProperty<TLength>; - /** - * The **`outline`** CSS property is a shorthand to set various outline properties in a single declaration: `outline-style`, `outline-width`, and `outline-color`. - * - * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline - */ - outline?: OutlineProperty<TLength>; - /** - * The **`overflow`** CSS property sets what to do when an element's content is too big to fit in its block formatting context. It is a shorthand for `overflow-x` and `overflow-y`. - * - * **Syntax**: `[ visible | hidden | clip | scroll | auto ]{1,2}` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow - */ - overflow?: OverflowProperty; - /** - * The **`overscroll-behavior`** CSS property sets what a browser does when reaching the boundary of a scrolling area. It's a shorthand for `overscroll-behavior-x` and `overscroll-behavior-y`. - * - * **Syntax**: `[ contain | none | auto ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior - */ - "overscroll-behavior"?: OverscrollBehaviorProperty; - /** - * The **`padding`** CSS property sets the padding area on all four sides of an element. It is a shorthand for `padding-top`, `padding-right`, `padding-bottom`, and `padding-left`. - * - * **Syntax**: `[ <length> | <percentage> ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding - */ - padding?: PaddingProperty<TLength>; - /** - * The CSS **`place-items`** shorthand property sets the `align-items` and `justify-items` properties, respectively. If the second value is not set, the first value is also used for it. - * - * **Syntax**: `<'align-items'> <'justify-items'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-items - */ - "place-items"?: PlaceItemsProperty; - /** - * The **`place-self`** CSS property is a shorthand property sets both the `align-self` and `justify-self` properties. The first value is the `align-self` property value, the second the `justify-self` one. If the second value is not present, the first value is also used for it. - * - * **Syntax**: `<'align-self'> <'justify-self'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-self - */ - "place-self"?: PlaceSelfProperty; - /** - * The **`text-decoration`** CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, and `text-decoration-style`. - * - * **Syntax**: `<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration - */ - "text-decoration"?: TextDecorationProperty<TLength>; - /** - * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. - * - * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis - */ - "text-emphasis"?: TextEmphasisProperty; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition - */ - transition?: TransitionProperty; -} - -export interface StandardPropertiesHyphen<TLength = string | 0> extends StandardLonghandPropertiesHyphen<TLength>, StandardShorthandPropertiesHyphen<TLength> {} - -export interface VendorLonghandPropertiesHyphen<TLength = string | 0> { - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-moz-animation-delay"?: GlobalsString; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - */ - "-moz-animation-direction"?: AnimationDirectionProperty; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-moz-animation-duration"?: GlobalsString; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - */ - "-moz-animation-fill-mode"?: AnimationFillModeProperty; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - */ - "-moz-animation-iteration-count"?: AnimationIterationCountProperty; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - */ - "-moz-animation-name"?: AnimationNameProperty; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - */ - "-moz-animation-play-state"?: AnimationPlayStateProperty; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-moz-animation-timing-function"?: AnimationTimingFunctionProperty; - /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. - * - * **Syntax**: `none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized` - * - * **Initial value**: `none` (but this value is overridden in the user agent CSS) - */ - "-moz-appearance"?: MozAppearanceProperty; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - */ - "-moz-backface-visibility"?: BackfaceVisibilityProperty; - /** - * In Mozilla applications like Firefox, the **`-moz-border-bottom-colors`** CSS property sets a list of colors for the bottom border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - "-moz-border-bottom-colors"?: MozBorderBottomColorsProperty; - /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - */ - "-moz-border-end-color"?: BorderInlineEndColorProperty; - /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - */ - "-moz-border-end-style"?: BorderInlineEndStyleProperty; - /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - */ - "-moz-border-end-width"?: BorderInlineEndWidthProperty<TLength>; - /** - * In Mozilla applications like Firefox, the **`-moz-border-left-colors`** CSS property sets a list of colors for the left border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - "-moz-border-left-colors"?: MozBorderLeftColorsProperty; - /** - * In Mozilla applications like Firefox, the **`-moz-border-right-colors`** CSS property sets a list of colors for the right border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - "-moz-border-right-colors"?: MozBorderRightColorsProperty; - /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - */ - "-moz-border-start-color"?: BorderInlineStartColorProperty; - /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - */ - "-moz-border-start-style"?: BorderInlineStartStyleProperty; - /** - * In Mozilla applications like Firefox, the **`-moz-border-top-colors`** CSS property sets a list of colors for the top border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - "-moz-border-top-colors"?: MozBorderTopColorsProperty; - /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - */ - "-moz-box-sizing"?: BoxSizingProperty; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - */ - "-moz-column-count"?: ColumnCountProperty; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - */ - "-moz-column-fill"?: ColumnFillProperty; - /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-moz-column-rule-color"?: ColumnRuleColorProperty; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - "-moz-column-rule-style"?: ColumnRuleStyleProperty; - /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - "-moz-column-rule-width"?: ColumnRuleWidthProperty<TLength>; - /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - */ - "-moz-column-width"?: ColumnWidthProperty<TLength>; - /** - * If you reference an SVG image in a webpage (such as with the `<img>` element or as a background image), the SVG image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element. To do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the **`-moz-context-properties`** property, and the image needs to opt in to using those properties by using values such as the `context-fill` value. - * - * **Syntax**: `none | [ fill | fill-opacity | stroke | stroke-opacity ]#` - * - * **Initial value**: `none` - */ - "-moz-context-properties"?: MozContextPropertiesProperty; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - */ - "-moz-font-feature-settings"?: FontFeatureSettingsProperty; - /** - * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. - * - * **Syntax**: `normal | <string>` - * - * **Initial value**: `normal` - */ - "-moz-font-language-override"?: FontLanguageOverrideProperty; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - "-moz-hyphens"?: HyphensProperty; - /** - * For certain XUL elements and pseudo-elements that use an image from the `list-style-image` property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. - * - * **Syntax**: `<shape> | auto` - * - * **Initial value**: `auto` - */ - "-moz-image-region"?: MozImageRegionProperty; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - "-moz-margin-end"?: MarginInlineEndProperty<TLength>; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - "-moz-margin-start"?: MarginInlineStartProperty<TLength>; - /** - * The **`-moz-orient`** CSS property specifies the orientation of the element to which it's applied. - * - * **Syntax**: `inline | block | horizontal | vertical` - * - * **Initial value**: `inline` - */ - "-moz-orient"?: MozOrientProperty; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - */ - "-moz-osx-font-smoothing"?: FontSmoothProperty<TLength>; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - "-moz-padding-end"?: PaddingInlineEndProperty<TLength>; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - "-moz-padding-start"?: PaddingInlineStartProperty<TLength>; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - */ - "-moz-perspective"?: PerspectiveProperty<TLength>; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - */ - "-moz-perspective-origin"?: PerspectiveOriginProperty<TLength>; - /** - * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `stack` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. - * - * **Syntax**: `ignore | stretch-to-fit` - * - * **Initial value**: `stretch-to-fit` - */ - "-moz-stack-sizing"?: MozStackSizingProperty; - /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - */ - "-moz-tab-size"?: TabSizeProperty<TLength>; - /** - * The **`-moz-text-blink`** non-standard Mozilla CSS extension specifies the blink mode. - * - * **Syntax**: `none | blink` - * - * **Initial value**: `none` - */ - "-moz-text-blink"?: MozTextBlinkProperty; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - */ - "-moz-text-size-adjust"?: TextSizeAdjustProperty; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - "-moz-transform-origin"?: TransformOriginProperty<TLength>; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - */ - "-moz-transform-style"?: TransformStyleProperty; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-moz-transition-delay"?: GlobalsString; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-moz-transition-duration"?: GlobalsString; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - "-moz-transition-property"?: TransitionPropertyProperty; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-moz-transition-timing-function"?: TransitionTimingFunctionProperty; - /** - * The **`-moz-user-focus`** CSS property is used to indicate whether an element can have the focus. - * - * **Syntax**: `ignore | normal | select-after | select-before | select-menu | select-same | select-all | none` - * - * **Initial value**: `none` - */ - "-moz-user-focus"?: MozUserFocusProperty; - /** - * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. - * - * **Syntax**: `read-only | read-write | write-only` - * - * **Initial value**: `read-only` - */ - "-moz-user-modify"?: MozUserModifyProperty; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - */ - "-moz-user-select"?: UserSelectProperty; - /** - * The **`-moz-window-dragging`** CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X. - * - * **Syntax**: `drag | no-drag` - * - * **Initial value**: `drag` - */ - "-moz-window-dragging"?: MozWindowDraggingProperty; - /** - * The **`-moz-window-shadow`** CSS property specifies whether a window will have a shadow. It only works on Mac OS X. - * - * **Syntax**: `default | menu | tooltip | sheet | none` - * - * **Initial value**: `default` - */ - "-moz-window-shadow"?: MozWindowShadowProperty; - /** - * The **`-ms-accelerator`** CSS property is a Microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut. - * - * **Syntax**: `false | true` - * - * **Initial value**: `false` - */ - "-ms-accelerator"?: MsAcceleratorProperty; - /** - * The **`-ms-block-progression`** CSS property is a Microsoft extension that specifies the block progression and layout orientation. - * - * **Syntax**: `tb | rl | bt | lr` - * - * **Initial value**: `tb` - */ - "-ms-block-progression"?: MsBlockProgressionProperty; - /** - * The **`-ms-content-zoom-chaining`** CSS property is a Microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation. - * - * **Syntax**: `none | chained` - * - * **Initial value**: `none` - */ - "-ms-content-zoom-chaining"?: MsContentZoomChainingProperty; - /** - * The **`-ms-content-zoom-limit-max`** CSS property is a Microsoft extension that specifies the selected elements' maximum zoom factor. - * - * **Syntax**: `<percentage>` - * - * **Initial value**: `400%` - */ - "-ms-content-zoom-limit-max"?: GlobalsString; - /** - * The **`-ms-content-zoom-limit-min`** CSS property is a Microsoft extension that specifies the minimum zoom factor. - * - * **Syntax**: `<percentage>` - * - * **Initial value**: `100%` - */ - "-ms-content-zoom-limit-min"?: GlobalsString; - /** - * The **`-ms-content-zoom-snap-points`** CSS property is a Microsoft extension that specifies where zoom snap-points are located. - * - * **Syntax**: `snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )` - * - * **Initial value**: `snapInterval(0%, 100%)` - */ - "-ms-content-zoom-snap-points"?: GlobalsString; - /** - * The **`-ms-content-zoom-snap-type`** CSS property is a Microsoft extension that specifies how zooming is affected by defined snap-points. - * - * **Syntax**: `none | proximity | mandatory` - * - * **Initial value**: `none` - */ - "-ms-content-zoom-snap-type"?: MsContentZoomSnapTypeProperty; - /** - * The **`-ms-content-zooming`** CSS property is a Microsoft extension that specifies whether zooming is enabled. - * - * **Syntax**: `none | zoom` - * - * **Initial value**: zoom for the top level element, none for all other elements - */ - "-ms-content-zooming"?: MsContentZoomingProperty; - /** - * The `-ms-filter` CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. - * - * **Syntax**: `<string>` - * - * **Initial value**: "" (the empty string) - */ - "-ms-filter"?: GlobalsString; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - */ - "-ms-flex-direction"?: FlexDirectionProperty; - /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - */ - "-ms-flex-positive"?: GlobalsNumber; - /** - * The **`-ms-flow-from`** CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. - * - * **Syntax**: `[ none | <custom-ident> ]#` - * - * **Initial value**: `none` - */ - "-ms-flow-from"?: MsFlowFromProperty; - /** - * The **`-ms-flow-into`** CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. - * - * **Syntax**: `[ none | <custom-ident> ]#` - * - * **Initial value**: `none` - */ - "-ms-flow-into"?: MsFlowIntoProperty; - /** - * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. - * - * **Syntax**: `none | <track-list> | <auto-track-list>` - * - * **Initial value**: `none` - */ - "-ms-grid-columns"?: MsGridColumnsProperty<TLength>; - /** - * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. - * - * **Syntax**: `none | <track-list> | <auto-track-list>` - * - * **Initial value**: `none` - */ - "-ms-grid-rows"?: MsGridRowsProperty<TLength>; - /** - * The **`-ms-high-contrast-adjust`** CSS property is a Microsoft extension that gets or sets a value indicating whether to override any CSS properties that would have been set in high contrast mode. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - */ - "-ms-high-contrast-adjust"?: MsHighContrastAdjustProperty; - /** - * The **`-ms-hyphenate-limit-chars`** CSS property is a Microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word. If the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated. - * - * **Syntax**: `auto | <integer>{1,3}` - * - * **Initial value**: `auto` - */ - "-ms-hyphenate-limit-chars"?: MsHyphenateLimitCharsProperty; - /** - * The **`-ms-hyphenate-limit-lines`** CSS property is a Microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word. - * - * **Syntax**: `no-limit | <integer>` - * - * **Initial value**: `no-limit` - */ - "-ms-hyphenate-limit-lines"?: MsHyphenateLimitLinesProperty; - /** - * The `**-ms-hyphenate-limit-zone**` CSS property is a Microsoft extension specifying the width of the hyphenation zone. - * - * **Syntax**: `<percentage> | <length>` - * - * **Initial value**: `0` - */ - "-ms-hyphenate-limit-zone"?: MsHyphenateLimitZoneProperty<TLength>; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - "-ms-hyphens"?: HyphensProperty; - /** - * The **`-ms-ime-align`** CSS property is a Microsoft extension aligning the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active. The extension is implemented in Microsoft Edge and Internet Explorer 11. - * - * **Syntax**: `auto | after` - * - * **Initial value**: `auto` - */ - "-ms-ime-align"?: MsImeAlignProperty; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - */ - "-ms-line-break"?: LineBreakProperty; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - */ - "-ms-order"?: GlobalsNumber; - /** - * The **`-ms-overflow-style`** CSS property is a Microsoft extension controlling the behavior of scrollbars when the content of an element overflows. - * - * **Syntax**: `auto | none | scrollbar | -ms-autohiding-scrollbar` - * - * **Initial value**: `auto` - */ - "-ms-overflow-style"?: MsOverflowStyleProperty; - /** - * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - */ - "-ms-overflow-x"?: OverflowXProperty; - /** - * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - */ - "-ms-overflow-y"?: OverflowYProperty; - /** - * The `**-ms-scroll-chaining**` CSS property is a Microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation. - * - * **Syntax**: `chained | none` - * - * **Initial value**: `chained` - */ - "-ms-scroll-chaining"?: MsScrollChainingProperty; - /** - * The `**-ms-scroll-limit-x-max**` CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollLeft` property. - * - * **Syntax**: `auto | <length>` - * - * **Initial value**: `auto` - */ - "-ms-scroll-limit-x-max"?: MsScrollLimitXMaxProperty<TLength>; - /** - * The **`-ms-scroll-limit-x-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollLeft` property. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - "-ms-scroll-limit-x-min"?: MsScrollLimitXMinProperty<TLength>; - /** - * The **`-ms-scroll-limit-y-max`** CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollTop` property. - * - * **Syntax**: `auto | <length>` - * - * **Initial value**: `auto` - */ - "-ms-scroll-limit-y-max"?: MsScrollLimitYMaxProperty<TLength>; - /** - * The **`-ms-scroll-limit-y-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollTop` property. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - "-ms-scroll-limit-y-min"?: MsScrollLimitYMinProperty<TLength>; - /** - * The **`-ms-scroll-rails`** CSS property is a Microsoft extension that specifies whether scrolling locks to the primary axis of motion. - * - * **Syntax**: `none | railed` - * - * **Initial value**: `railed` - */ - "-ms-scroll-rails"?: MsScrollRailsProperty; - /** - * The **`-ms-scroll-snap-points-x`** CSS property is a Microsoft extension that specifies where snap-points will be located along the x-axis. - * - * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` - * - * **Initial value**: `snapInterval(0px, 100%)` - */ - "-ms-scroll-snap-points-x"?: GlobalsString; - /** - * The **`-ms-scroll-snap-points-y`** CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis. - * - * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` - * - * **Initial value**: `snapInterval(0px, 100%)` - */ - "-ms-scroll-snap-points-y"?: GlobalsString; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | proximity | mandatory` - * - * **Initial value**: `none` - */ - "-ms-scroll-snap-type"?: MsScrollSnapTypeProperty; - /** - * The **`-ms-scroll-translation`** CSS property is a Microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element. - * - * **Syntax**: `none | vertical-to-horizontal` - * - * **Initial value**: `none` - */ - "-ms-scroll-translation"?: MsScrollTranslationProperty; - /** - * The **`-ms-scrollbar-3dlight-color`** CSS property is a Microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: depends on user agent - */ - "-ms-scrollbar-3dlight-color"?: MsScrollbar3dlightColorProperty; - /** - * The **`-ms-scrollbar-arrow-color`** CSS property is a Microsoft extension that specifies the color of the arrow elements of a scroll arrow. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ButtonText` - */ - "-ms-scrollbar-arrow-color"?: MsScrollbarArrowColorProperty; - /** - * The `**-ms-scrollbar-base-color**` CSS property is a Microsoft extension that specifies the base color of the main elements of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: depends on user agent - */ - "-ms-scrollbar-base-color"?: MsScrollbarBaseColorProperty; - /** - * The **`-ms-scrollbar-darkshadow-color`** CSS property is a Microsoft extension that specifies the color of a scroll bar's gutter. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDDarkShadow` - */ - "-ms-scrollbar-darkshadow-color"?: MsScrollbarDarkshadowColorProperty; - /** - * The `**-ms-scrollbar-face-color**` CSS property is a Microsoft extension that specifies the color of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDFace` - */ - "-ms-scrollbar-face-color"?: MsScrollbarFaceColorProperty; - /** - * The `**-ms-scrollbar-highlight-color**` CSS property is a Microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDHighlight` - */ - "-ms-scrollbar-highlight-color"?: MsScrollbarHighlightColorProperty; - /** - * The **`-ms-scrollbar-shadow-color`** CSS property is a Microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDDarkShadow` - */ - "-ms-scrollbar-shadow-color"?: MsScrollbarShadowColorProperty; - /** - * The **`-ms-scrollbar-track-color`** CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `Scrollbar` - */ - "-ms-scrollbar-track-color"?: MsScrollbarTrackColorProperty; - /** - * The **`-ms-text-autospace`** CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text. - * - * **Syntax**: `none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space` - * - * **Initial value**: `none` - */ - "-ms-text-autospace"?: MsTextAutospaceProperty; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - */ - "-ms-text-combine-horizontal"?: TextCombineUprightProperty; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - */ - "-ms-text-overflow"?: TextOverflowProperty; - /** - * The **`touch-action`** CSS property sets how a region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). - * - * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` - * - * **Initial value**: `auto` - */ - "-ms-touch-action"?: TouchActionProperty; - /** - * The **`-ms-touch-select`** CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. - * - * **Syntax**: `grippers | none` - * - * **Initial value**: `grippers` - */ - "-ms-touch-select"?: MsTouchSelectProperty; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - */ - "-ms-transform"?: TransformProperty; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - "-ms-transform-origin"?: TransformOriginProperty<TLength>; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-ms-transition-delay"?: GlobalsString; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-ms-transition-duration"?: GlobalsString; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - "-ms-transition-property"?: TransitionPropertyProperty; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-ms-transition-timing-function"?: TransitionTimingFunctionProperty; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `none | element | text` - * - * **Initial value**: `text` - */ - "-ms-user-select"?: MsUserSelectProperty; - /** - * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. - * - * **Syntax**: `normal | break-all | keep-all | break-word` - * - * **Initial value**: `normal` - */ - "-ms-word-break"?: WordBreakProperty; - /** - * The **`-ms-wrap-flow`** CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements. - * - * **Syntax**: `auto | both | start | end | maximum | clear` - * - * **Initial value**: `auto` - */ - "-ms-wrap-flow"?: MsWrapFlowProperty; - /** - * The **`-ms-wrap-margin`** CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - "-ms-wrap-margin"?: MsWrapMarginProperty<TLength>; - /** - * The **`-ms-wrap-through`** CSS property is a Microsoft extension that specifies how content should wrap around an exclusion element. - * - * **Syntax**: `wrap | none` - * - * **Initial value**: `wrap` - */ - "-ms-wrap-through"?: MsWrapThroughProperty; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - */ - "-ms-writing-mode"?: WritingModeProperty; - /** - * The CSS **`align-content`** property sets how the browser distributes space between and around content items along the cross-axis of a flexbox container, and the main-axis of a grid container. - * - * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` - * - * **Initial value**: `normal` - */ - "-webkit-align-content"?: AlignContentProperty; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. The align-self property sets the alignment of an item within its containing block. In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` - * - * **Initial value**: `normal` - */ - "-webkit-align-items"?: AlignItemsProperty; - /** - * The **`align-self`** CSS property aligns flex items of the current flex line overriding the `align-items` value. If any of the item's cross-axis margin is set to `auto`, then `align-self` is ignored. In Grid layout `align-self` aligns the item inside the grid area. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` - * - * **Initial value**: `auto` - */ - "-webkit-align-self"?: AlignSelfProperty; - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-webkit-animation-delay"?: GlobalsString; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - */ - "-webkit-animation-direction"?: AnimationDirectionProperty; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-webkit-animation-duration"?: GlobalsString; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - */ - "-webkit-animation-fill-mode"?: AnimationFillModeProperty; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - */ - "-webkit-animation-iteration-count"?: AnimationIterationCountProperty; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - */ - "-webkit-animation-name"?: AnimationNameProperty; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - */ - "-webkit-animation-play-state"?: AnimationPlayStateProperty; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-webkit-animation-timing-function"?: AnimationTimingFunctionProperty; - /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. - * - * **Syntax**: `none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button` - * - * **Initial value**: `none` (but this value is overridden in the user agent CSS) - */ - "-webkit-appearance"?: WebkitAppearanceProperty; - /** - * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - */ - "-webkit-backdrop-filter"?: BackdropFilterProperty; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - */ - "-webkit-backface-visibility"?: BackfaceVisibilityProperty; - /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - */ - "-webkit-background-clip"?: BackgroundClipProperty; - /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - */ - "-webkit-background-origin"?: BackgroundOriginProperty; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - */ - "-webkit-background-size"?: BackgroundSizeProperty<TLength>; - /** - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-border-before-color"?: WebkitBorderBeforeColorProperty; - /** - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - "-webkit-border-before-style"?: WebkitBorderBeforeStyleProperty; - /** - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - "-webkit-border-before-width"?: WebkitBorderBeforeWidthProperty<TLength>; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - "-webkit-border-bottom-left-radius"?: BorderBottomLeftRadiusProperty<TLength>; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - "-webkit-border-bottom-right-radius"?: BorderBottomRightRadiusProperty<TLength>; - /** - * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. - * - * **Syntax**: `<number-percentage>{1,4} && fill?` - * - * **Initial value**: `100%` - */ - "-webkit-border-image-slice"?: BorderImageSliceProperty; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - "-webkit-border-top-left-radius"?: BorderTopLeftRadiusProperty<TLength>; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - "-webkit-border-top-right-radius"?: BorderTopRightRadiusProperty<TLength>; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - */ - "-webkit-box-decoration-break"?: BoxDecorationBreakProperty; - /** - * The **`-webkit-box-reflect`** CSS property lets you reflect the content of an element in one specific direction. - * - * **Syntax**: `[ above | below | right | left ]? <length>? <image>?` - * - * **Initial value**: `none` - */ - "-webkit-box-reflect"?: WebkitBoxReflectProperty<TLength>; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - */ - "-webkit-box-shadow"?: BoxShadowProperty; - /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - */ - "-webkit-box-sizing"?: BoxSizingProperty; - /** - * The `**clip-path**` CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. - * - * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` - * - * **Initial value**: `none` - */ - "-webkit-clip-path"?: ClipPathProperty; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - */ - "-webkit-column-count"?: ColumnCountProperty; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - */ - "-webkit-column-fill"?: ColumnFillProperty; - /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-column-rule-color"?: ColumnRuleColorProperty; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - "-webkit-column-rule-style"?: ColumnRuleStyleProperty; - /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - "-webkit-column-rule-width"?: ColumnRuleWidthProperty<TLength>; - /** - * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. - * - * **Syntax**: `none | all` - * - * **Initial value**: `none` - */ - "-webkit-column-span"?: ColumnSpanProperty; - /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - */ - "-webkit-column-width"?: ColumnWidthProperty<TLength>; - /** - * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - */ - "-webkit-filter"?: FilterProperty; - /** - * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. - * - * **Syntax**: `content | <'width'>` - * - * **Initial value**: `auto` - */ - "-webkit-flex-basis"?: FlexBasisProperty<TLength>; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - */ - "-webkit-flex-direction"?: FlexDirectionProperty; - /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - */ - "-webkit-flex-grow"?: GlobalsNumber; - /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. - * - * **Syntax**: `<number>` - * - * **Initial value**: `1` - */ - "-webkit-flex-shrink"?: GlobalsNumber; - /** - * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. - * - * **Syntax**: `nowrap | wrap | wrap-reverse` - * - * **Initial value**: `nowrap` - */ - "-webkit-flex-wrap"?: FlexWrapProperty; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - */ - "-webkit-font-feature-settings"?: FontFeatureSettingsProperty; - /** - * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. - * - * **Syntax**: `auto | normal | none` - * - * **Initial value**: `auto` - */ - "-webkit-font-kerning"?: FontKerningProperty; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - */ - "-webkit-font-smoothing"?: FontSmoothProperty<TLength>; - /** - * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` - * - * **Initial value**: `normal` - */ - "-webkit-font-variant-ligatures"?: FontVariantLigaturesProperty; - /** - * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. - * - * **Syntax**: `auto | <string>` - * - * **Initial value**: `auto` - */ - "-webkit-hyphenate-character"?: HyphenateCharacterProperty; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - "-webkit-hyphens"?: HyphensProperty; - /** - * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. - * - * **Syntax**: `normal | [ <number> <integer>? ]` - * - * **Initial value**: `normal` - */ - "-webkit-initial-letter"?: InitialLetterProperty; - /** - * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. - * - * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` - * - * **Initial value**: `normal` - */ - "-webkit-justify-content"?: JustifyContentProperty; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - */ - "-webkit-line-break"?: LineBreakProperty; - /** - * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block container to the specified number of lines. - * - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - "-webkit-line-clamp"?: WebkitLineClampProperty; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - "-webkit-margin-end"?: MarginInlineEndProperty<TLength>; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - "-webkit-margin-start"?: MarginInlineStartProperty<TLength>; - /** - * If a `-webkit-mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. - * - * **Syntax**: `<attachment>#` - * - * **Initial value**: `scroll` - */ - "-webkit-mask-attachment"?: WebkitMaskAttachmentProperty; - /** - * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - */ - "-webkit-mask-box-image-outset"?: MaskBorderOutsetProperty<TLength>; - /** - * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - */ - "-webkit-mask-box-image-repeat"?: MaskBorderRepeatProperty; - /** - * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. - * - * **Syntax**: `<number-percentage>{1,4} fill?` - * - * **Initial value**: `0` - */ - "-webkit-mask-box-image-slice"?: MaskBorderSliceProperty; - /** - * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - */ - "-webkit-mask-box-image-source"?: MaskBorderSourceProperty; - /** - * The **`mask-border-width`** CSS property sets the width of an element's mask border. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `auto` - */ - "-webkit-mask-box-image-width"?: MaskBorderWidthProperty<TLength>; - /** - * The **`mask-clip`** CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area. - * - * **Syntax**: `[ <box> | border | padding | content | text ]#` - * - * **Initial value**: `border` - */ - "-webkit-mask-clip"?: WebkitMaskClipProperty; - /** - * The **`-webkit-mask-composite`** property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the `-webkit-mask-image` property. - * - * **Syntax**: `<composite-style>#` - * - * **Initial value**: `source-over` - */ - "-webkit-mask-composite"?: WebkitMaskCompositeProperty; - /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. - * - * **Syntax**: `<mask-reference>#` - * - * **Initial value**: `none` - */ - "-webkit-mask-image"?: WebkitMaskImageProperty; - /** - * The **`mask-origin`** CSS property sets the origin of a mask. - * - * **Syntax**: `[ <box> | border | padding | content ]#` - * - * **Initial value**: `padding` - */ - "-webkit-mask-origin"?: WebkitMaskOriginProperty; - /** - * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. - * - * **Syntax**: `<position>#` - * - * **Initial value**: `0% 0%` - */ - "-webkit-mask-position"?: WebkitMaskPositionProperty<TLength>; - /** - * The `-webkit-mask-position-x` CSS property sets the initial horizontal position of a mask image. - * - * **Syntax**: `[ <length-percentage> | left | center | right ]#` - * - * **Initial value**: `0%` - */ - "-webkit-mask-position-x"?: WebkitMaskPositionXProperty<TLength>; - /** - * The `-webkit-mask-position-y` CSS property sets the initial vertical position of a mask image. - * - * **Syntax**: `[ <length-percentage> | top | center | bottom ]#` - * - * **Initial value**: `0%` - */ - "-webkit-mask-position-y"?: WebkitMaskPositionYProperty<TLength>; - /** - * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - */ - "-webkit-mask-repeat"?: WebkitMaskRepeatProperty; - /** - * The `-webkit-mask-repeat-x` property specifies whether and how a mask image is repeated (tiled) horizontally. - * - * **Syntax**: `repeat | no-repeat | space | round` - * - * **Initial value**: `repeat` - */ - "-webkit-mask-repeat-x"?: WebkitMaskRepeatXProperty; - /** - * The `-webkit-mask-repeat-y` property sets whether and how a mask image is repeated (tiled) vertically. - * - * **Syntax**: `repeat | no-repeat | space | round` - * - * **Initial value**: `repeat` - */ - "-webkit-mask-repeat-y"?: WebkitMaskRepeatYProperty; - /** - * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - */ - "-webkit-mask-size"?: WebkitMaskSizeProperty<TLength>; - /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block depending on its writing mode. It corresponds to the `max-width` or the `max-height` property depending on the value defined for `writing-mode`. If the writing mode is vertically oriented, the value of `max-inline-size` relates to the maximal height of the element, otherwise it relates to the maximal width of the element. It relates to `max-block-size`, which defines the other dimension of the element. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - */ - "-webkit-max-inline-size"?: MaxInlineSizeProperty<TLength>; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - */ - "-webkit-order"?: GlobalsNumber; - /** - * The `-webkit-overflow-scrolling` CSS property controls whether or not touch devices use momentum-based scrolling for a given element. - * - * **Syntax**: `auto | touch` - * - * **Initial value**: `auto` - */ - "-webkit-overflow-scrolling"?: WebkitOverflowScrollingProperty; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - "-webkit-padding-end"?: PaddingInlineEndProperty<TLength>; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - "-webkit-padding-start"?: PaddingInlineStartProperty<TLength>; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - */ - "-webkit-perspective"?: PerspectiveProperty<TLength>; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - */ - "-webkit-perspective-origin"?: PerspectiveOriginProperty<TLength>; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - */ - "-webkit-print-color-adjust"?: PrintColorAdjustProperty; - /** - * The `**ruby-position**` CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (`over`), under it (`under`), or between the characters, on their right side (`inter-character`). - * - * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` - * - * **Initial value**: `alternate` - */ - "-webkit-ruby-position"?: RubyPositionProperty; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` - * - * **Initial value**: `none` - */ - "-webkit-scroll-snap-type"?: ScrollSnapTypeProperty; - /** - * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - */ - "-webkit-shape-margin"?: ShapeMarginProperty<TLength>; - /** - * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. - * - * **Syntax**: `<color>` - * - * **Initial value**: `black` - */ - "-webkit-tap-highlight-color"?: WebkitTapHighlightColorProperty; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - */ - "-webkit-text-combine"?: TextCombineUprightProperty; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-text-decoration-color"?: TextDecorationColorProperty; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - */ - "-webkit-text-decoration-line"?: TextDecorationLineProperty; - /** - * The **`text-decoration-skip`** CSS property sets what parts of an element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. - * - * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` - * - * **Initial value**: `objects` - */ - "-webkit-text-decoration-skip"?: TextDecorationSkipProperty; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - */ - "-webkit-text-decoration-style"?: TextDecorationStyleProperty; - /** - * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-text-emphasis-color"?: TextEmphasisColorProperty; - /** - * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. - * - * **Syntax**: `[ over | under ] && [ right | left ]` - * - * **Initial value**: `over right` - */ - "-webkit-text-emphasis-position"?: GlobalsString; - /** - * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. - * - * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` - * - * **Initial value**: `none` - */ - "-webkit-text-emphasis-style"?: TextEmphasisStyleProperty; - /** - * The **`-webkit-text-fill-color`** CSS property specifies the fill color of characters of text. If this property is not set, the value of the `color` property is used. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-text-fill-color"?: WebkitTextFillColorProperty; - /** - * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. - * - * **Syntax**: `mixed | upright | sideways` - * - * **Initial value**: `mixed` - */ - "-webkit-text-orientation"?: TextOrientationProperty; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - */ - "-webkit-text-size-adjust"?: TextSizeAdjustProperty; - /** - * The **`-webkit-text-stroke-color`** CSS property specifies the stroke color of characters of text. If this property is not set, the value of the `color` property is used. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - "-webkit-text-stroke-color"?: WebkitTextStrokeColorProperty; - /** - * The **`-webkit-text-stroke-width`** CSS property specifies the width of the stroke for text. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - "-webkit-text-stroke-width"?: WebkitTextStrokeWidthProperty<TLength>; - /** - * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. - * - * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` - * - * **Initial value**: `auto` - */ - "-webkit-text-underline-position"?: TextUnderlinePositionProperty; - /** - * The `-webkit-touch-callout` CSS property controls the display of the default callout shown when you touch and hold a touch target. - * - * **Syntax**: `default | none` - * - * **Initial value**: `default` - */ - "-webkit-touch-callout"?: WebkitTouchCalloutProperty; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - */ - "-webkit-transform"?: TransformProperty; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - "-webkit-transform-origin"?: TransformOriginProperty<TLength>; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - */ - "-webkit-transform-style"?: TransformStyleProperty; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-webkit-transition-delay"?: GlobalsString; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-webkit-transition-duration"?: GlobalsString; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - "-webkit-transition-property"?: TransitionPropertyProperty; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-webkit-transition-timing-function"?: TransitionTimingFunctionProperty; - /** - * **Syntax**: `read-only | read-write | read-write-plaintext-only` - * - * **Initial value**: `read-only` - */ - "-webkit-user-modify"?: WebkitUserModifyProperty; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - */ - "-webkit-user-select"?: UserSelectProperty; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - */ - "-webkit-writing-mode"?: WritingModeProperty; -} - -export interface VendorShorthandPropertiesHyphen<TLength = string | 0> { - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - */ - "-moz-animation"?: AnimationProperty; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - */ - "-moz-border-image"?: BorderImageProperty; - /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - */ - "-moz-column-rule"?: ColumnRuleProperty<TLength>; - /** - * The **`columns`** CSS property sets the column width and column count of an element. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - */ - "-moz-columns"?: ColumnsProperty<TLength>; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - "-moz-transition"?: TransitionProperty; - /** - * The **`-ms-content-zoom-limit`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-limit-min` and `-ms-content-zoom-limit-max` properties. - * - * **Syntax**: `<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>` - */ - "-ms-content-zoom-limit"?: GlobalsString; - /** - * The **`-ms-content-zoom-snap`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-snap-type` and `-ms-content-zoom-snap-points` properties. - * - * **Syntax**: `<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>` - */ - "-ms-content-zoom-snap"?: MsContentZoomSnapProperty; - /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - */ - "-ms-flex"?: FlexProperty<TLength>; - /** - * The **\-ms-scroll-limit** CSS property is a Microsoft extension that specifies values for the `-ms-scroll-limit-x-min`, `-ms-scroll-limit-y-min`, `-ms-scroll-limit-x-max`, and `-ms-scroll-limit-y-max` properties. - * - * **Syntax**: `<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>` - */ - "-ms-scroll-limit"?: GlobalsString; - /** - * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-x` properties. - * - * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>` - */ - "-ms-scroll-snap-x"?: GlobalsString; - /** - * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-y` properties. - * - * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>` - */ - "-ms-scroll-snap-y"?: GlobalsString; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - "-ms-transition"?: TransitionProperty; - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - */ - "-webkit-animation"?: AnimationProperty; - /** - * The **`-webkit-border-before`** CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-width'> || <'border-style'> || <color>` - */ - "-webkit-border-before"?: WebkitBorderBeforeProperty<TLength>; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - */ - "-webkit-border-image"?: BorderImageProperty; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - */ - "-webkit-border-radius"?: BorderRadiusProperty<TLength>; - /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - */ - "-webkit-column-rule"?: ColumnRuleProperty<TLength>; - /** - * The **`columns`** CSS property sets the column width and column count of an element. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - */ - "-webkit-columns"?: ColumnsProperty<TLength>; - /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - */ - "-webkit-flex"?: FlexProperty<TLength>; - /** - * The **`flex-flow`** CSS property is a shorthand property for `flex-direction` and `flex-wrap` properties. - * - * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` - */ - "-webkit-flex-flow"?: FlexFlowProperty; - /** - * The **`mask`** CSS property hides an element (partially or fully) by masking or clipping the image at specific points. - * - * **Syntax**: `[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#` - */ - "-webkit-mask"?: WebkitMaskProperty<TLength>; - /** - * The **`mask-border`** CSS property lets you create a mask along the edge of an element's border. - * - * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` - */ - "-webkit-mask-box-image"?: MaskBorderProperty; - /** - * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. - * - * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` - */ - "-webkit-text-emphasis"?: TextEmphasisProperty; - /** - * The **`-webkit-text-stroke`** CSS property specifies the width and color of strokes for text characters. This is a shorthand property for the longhand properties `-webkit-text-stroke-width` and `-webkit-text-stroke-color`. - * - * **Syntax**: `<length> || <color>` - */ - "-webkit-text-stroke"?: WebkitTextStrokeProperty<TLength>; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - "-webkit-transition"?: TransitionProperty; -} - -export interface VendorPropertiesHyphen<TLength = string | 0> extends VendorLonghandPropertiesHyphen<TLength>, VendorShorthandPropertiesHyphen<TLength> {} - -export interface ObsoletePropertiesHyphen<TLength = string | 0> { - /** - * In combination with `elevation`, the **`azimuth`** CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage. - * - * **Syntax**: `<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards` - * - * **Initial value**: `center` - * - * @deprecated - */ - azimuth?: AzimuthProperty; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - "box-align"?: BoxAlignProperty; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "box-direction"?: BoxDirectionProperty; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "box-flex"?: GlobalsNumber; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "box-flex-group"?: GlobalsNumber; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - "box-lines"?: BoxLinesProperty; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "box-ordinal-group"?: GlobalsNumber; - /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - "box-orient"?: BoxOrientProperty; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - "box-pack"?: BoxPackProperty; - /** - * The **`clip`** CSS property defines what portion of an element is visible. The `clip` property applies only to absolutely positioned elements, that is elements with `position:absolute` or `position:fixed`. - * - * **Syntax**: `<shape> | auto` - * - * **Initial value**: `auto` - * - * @deprecated - */ - clip?: ClipProperty; - /** - * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "grid-column-gap"?: GridColumnGapProperty<TLength>; - /** - * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. - * - * **Syntax**: `<'grid-row-gap'> <'grid-column-gap'>?` - * - * @deprecated - */ - "grid-gap"?: GridGapProperty<TLength>; - /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's grid rows. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "grid-row-gap"?: GridRowGapProperty<TLength>; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "ime-mode"?: ImeModeProperty; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-block"?: InsetBlockProperty<TLength>; - /** - * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-block-end"?: InsetBlockEndProperty<TLength>; - /** - * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-block-start"?: InsetBlockStartProperty<TLength>; - /** - * The **`inset-inline`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-inline"?: InsetInlineProperty<TLength>; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-inline-end"?: InsetInlineEndProperty<TLength>; - /** - * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "offset-inline-start"?: InsetInlineStartProperty<TLength>; - /** - * The **`scroll-snap-coordinate`** CSS property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's `scroll-snap-destination` for each respective axis. - * - * **Syntax**: `none | <position>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-coordinate"?: ScrollSnapCoordinateProperty<TLength>; - /** - * The **`scroll-snap-destination`** CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. - * - * **Syntax**: `<position>` - * - * **Initial value**: `0px 0px` - * - * @deprecated - */ - "scroll-snap-destination"?: ScrollSnapDestinationProperty<TLength>; - /** - * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-points-x"?: ScrollSnapPointsXProperty; - /** - * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-points-y"?: ScrollSnapPointsYProperty; - /** - * The **`scroll-snap-type-x`** CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one. - * - * **Syntax**: `none | mandatory | proximity` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-type-x"?: ScrollSnapTypeXProperty; - /** - * The **`scroll-snap-type-y`** CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one. - * - * **Syntax**: `none | mandatory | proximity` - * - * **Initial value**: `none` - * - * @deprecated - */ - "scroll-snap-type-y"?: ScrollSnapTypeYProperty; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - "-khtml-box-align"?: BoxAlignProperty; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-khtml-box-direction"?: BoxDirectionProperty; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-khtml-box-flex"?: GlobalsNumber; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-khtml-box-flex-group"?: GlobalsNumber; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - "-khtml-box-lines"?: BoxLinesProperty; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-khtml-box-ordinal-group"?: GlobalsNumber; - /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - "-khtml-box-orient"?: BoxOrientProperty; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - "-khtml-box-pack"?: BoxPackProperty; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-khtml-line-break"?: LineBreakProperty; - /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-khtml-opacity"?: OpacityProperty; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-khtml-user-select"?: UserSelectProperty; - /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - * - * @deprecated - */ - "-moz-background-clip"?: BackgroundClipProperty; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - * - * @deprecated - */ - "-moz-background-inline-policy"?: BoxDecorationBreakProperty; - /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - * - * @deprecated - */ - "-moz-background-origin"?: BackgroundOriginProperty; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - "-moz-background-size"?: BackgroundSizeProperty<TLength>; - /** - * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. - * - * **Syntax**: `<url> | none` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-binding"?: MozBindingProperty; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - * - * @deprecated - */ - "-moz-border-radius"?: BorderRadiusProperty<TLength>; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-border-radius-bottomleft"?: BorderBottomLeftRadiusProperty<TLength>; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-border-radius-bottomright"?: BorderBottomRightRadiusProperty<TLength>; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-border-radius-topleft"?: BorderTopLeftRadiusProperty<TLength>; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-border-radius-topright"?: BorderTopRightRadiusProperty<TLength>; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - "-moz-box-align"?: BoxAlignProperty; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-moz-box-direction"?: BoxDirectionProperty; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-box-flex"?: GlobalsNumber; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-moz-box-ordinal-group"?: GlobalsNumber; - /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - "-moz-box-orient"?: BoxOrientProperty; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - "-moz-box-pack"?: BoxPackProperty; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-box-shadow"?: BoxShadowProperty; - /** - * The non-standard **`-moz-float-edge`** CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness. - * - * **Syntax**: `border-box | content-box | margin-box | padding-box` - * - * **Initial value**: `content-box` - * - * @deprecated - */ - "-moz-float-edge"?: MozFloatEdgeProperty; - /** - * The **`-moz-force-broken-image-icon`** extended CSS property can be used to force the broken image icon to be shown even when a broken image has an `alt` attribute. - * - * **Syntax**: `0 | 1` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-force-broken-image-icon"?: MozForceBrokenImageIconProperty; - /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-moz-opacity"?: OpacityProperty; - /** - * The **`outline`** CSS property is a shorthand to set various outline properties in a single declaration: `outline-style`, `outline-width`, and `outline-color`. - * - * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` - * - * @deprecated - */ - "-moz-outline"?: OutlineProperty<TLength>; - /** - * The **`outline-color`** CSS property sets the color of an element's outline. - * - * **Syntax**: `<color> | invert` - * - * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other - * - * @deprecated - */ - "-moz-outline-color"?: OutlineColorProperty; - /** - * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS property can be used to give an element's `outline` rounded corners. - * - * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` - * - * @deprecated - */ - "-moz-outline-radius"?: MozOutlineRadiusProperty<TLength>; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-outline-radius-bottomleft"?: MozOutlineRadiusBottomleftProperty<TLength>; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-outline-radius-bottomright"?: MozOutlineRadiusBottomrightProperty<TLength>; - /** - * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-outline-radius-topleft"?: MozOutlineRadiusTopleftProperty<TLength>; - /** - * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-outline-radius-topright"?: MozOutlineRadiusToprightProperty<TLength>; - /** - * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `auto | <'border-style'>` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-outline-style"?: OutlineStyleProperty; - /** - * The **`outline-width`** CSS property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * @deprecated - */ - "-moz-outline-width"?: OutlineWidthProperty<TLength>; - /** - * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. - * - * **Syntax**: `auto | start | end | left | right | center | justify` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-moz-text-align-last"?: TextAlignLastProperty; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * @deprecated - */ - "-moz-text-decoration-color"?: TextDecorationColorProperty; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-text-decoration-line"?: TextDecorationLineProperty; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - * - * @deprecated - */ - "-moz-text-decoration-style"?: TextDecorationStyleProperty; - /** - * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. - * - * **Syntax**: `auto | none | enabled | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-moz-user-input"?: MozUserInputProperty; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-ms-ime-mode"?: ImeModeProperty; - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * @deprecated - */ - "-o-animation"?: AnimationProperty; - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-animation-delay"?: GlobalsString; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-o-animation-direction"?: AnimationDirectionProperty; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-animation-duration"?: GlobalsString; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-o-animation-fill-mode"?: AnimationFillModeProperty; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-o-animation-iteration-count"?: AnimationIterationCountProperty; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-o-animation-name"?: AnimationNameProperty; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * @deprecated - */ - "-o-animation-play-state"?: AnimationPlayStateProperty; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - "-o-animation-timing-function"?: AnimationTimingFunctionProperty; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - "-o-background-size"?: BackgroundSizeProperty<TLength>; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * @deprecated - */ - "-o-border-image"?: BorderImageProperty; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * @deprecated - */ - "-o-object-fit"?: ObjectFitProperty; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * @deprecated - */ - "-o-object-position"?: ObjectPositionProperty<TLength>; - /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * @deprecated - */ - "-o-tab-size"?: TabSizeProperty<TLength>; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * @deprecated - */ - "-o-text-overflow"?: TextOverflowProperty; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-o-transform"?: TransformProperty; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * @deprecated - */ - "-o-transform-origin"?: TransformOriginProperty<TLength>; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * @deprecated - */ - "-o-transition"?: TransitionProperty; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-transition-delay"?: GlobalsString; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-transition-duration"?: GlobalsString; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * @deprecated - */ - "-o-transition-property"?: TransitionPropertyProperty; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - "-o-transition-timing-function"?: TransitionTimingFunctionProperty; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - "-webkit-box-align"?: BoxAlignProperty; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-webkit-box-direction"?: BoxDirectionProperty; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-webkit-box-flex"?: GlobalsNumber; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-webkit-box-flex-group"?: GlobalsNumber; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - "-webkit-box-lines"?: BoxLinesProperty; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-webkit-box-ordinal-group"?: GlobalsNumber; - /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - "-webkit-box-orient"?: BoxOrientProperty; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - "-webkit-box-pack"?: BoxPackProperty; - /** - * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-webkit-scroll-snap-points-x"?: ScrollSnapPointsXProperty; - /** - * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-webkit-scroll-snap-points-y"?: ScrollSnapPointsYProperty; -} - -export interface SvgPropertiesHyphen<TLength = string | 0> { - "alignment-baseline"?: AlignmentBaselineProperty; - "baseline-shift"?: BaselineShiftProperty<TLength>; - clip?: ClipProperty; - "clip-path"?: ClipPathProperty; - "clip-rule"?: ClipRuleProperty; - color?: ColorProperty; - "color-interpolation"?: ColorInterpolationProperty; - "color-rendering"?: ColorRenderingProperty; - cursor?: CursorProperty; - direction?: DirectionProperty; - display?: DisplayProperty; - "dominant-baseline"?: DominantBaselineProperty; - fill?: FillProperty; - "fill-opacity"?: GlobalsNumber; - "fill-rule"?: FillRuleProperty; - filter?: FilterProperty; - "flood-color"?: FloodColorProperty; - "flood-opacity"?: GlobalsNumber; - font?: FontProperty; - "font-family"?: FontFamilyProperty; - "font-size"?: FontSizeProperty<TLength>; - "font-size-adjust"?: FontSizeAdjustProperty; - "font-stretch"?: FontStretchProperty; - "font-style"?: FontStyleProperty; - "font-variant"?: FontVariantProperty; - "font-weight"?: FontWeightProperty; - "glyph-orientation-vertical"?: GlyphOrientationVerticalProperty; - "image-rendering"?: ImageRenderingProperty; - "letter-spacing"?: LetterSpacingProperty<TLength>; - "lighting-color"?: LightingColorProperty; - "line-height"?: LineHeightProperty<TLength>; - marker?: MarkerProperty; - "marker-end"?: MarkerEndProperty; - "marker-mid"?: MarkerMidProperty; - "marker-start"?: MarkerStartProperty; - mask?: MaskProperty<TLength>; - opacity?: OpacityProperty; - overflow?: OverflowProperty; - "paint-order"?: PaintOrderProperty; - "pointer-events"?: PointerEventsProperty; - "shape-rendering"?: ShapeRenderingProperty; - "stop-color"?: StopColorProperty; - "stop-opacity"?: GlobalsNumber; - stroke?: StrokeProperty; - "stroke-dasharray"?: StrokeDasharrayProperty<TLength>; - "stroke-dashoffset"?: StrokeDashoffsetProperty<TLength>; - "stroke-linecap"?: StrokeLinecapProperty; - "stroke-linejoin"?: StrokeLinejoinProperty; - "stroke-miterlimit"?: GlobalsNumber; - "stroke-opacity"?: GlobalsNumber; - "stroke-width"?: StrokeWidthProperty<TLength>; - "text-anchor"?: TextAnchorProperty; - "text-decoration"?: TextDecorationProperty<TLength>; - "text-rendering"?: TextRenderingProperty; - "unicode-bidi"?: UnicodeBidiProperty; - "vector-effect"?: VectorEffectProperty; - visibility?: VisibilityProperty; - "white-space"?: WhiteSpaceProperty; - "word-spacing"?: WordSpacingProperty<TLength>; - "writing-mode"?: WritingModeProperty; -} - -export interface PropertiesHyphen<TLength = string | 0> - extends StandardPropertiesHyphen<TLength>, - VendorPropertiesHyphen<TLength>, - ObsoletePropertiesHyphen<TLength>, - SvgPropertiesHyphen<TLength> {} - -export interface StandardLonghandPropertiesFallback<TLength = string | 0> { - /** - * The **`accent-color`** CSS property sets the color of the elements accent. An accent appears in elements such as `<input>` of `type="checkbox"`, or `type="radio"`. - * - * **Syntax**: `auto | <color>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **93** | **92** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/accent-color - */ - accentColor?: AccentColorProperty | AccentColorProperty[]; - /** - * The CSS **`align-content`** property sets how the browser distributes space between and around content items along the cross-axis of a flexbox container, and the main-axis of a grid container. - * - * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-content - */ - alignContent?: AlignContentProperty | AlignContentProperty[]; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. The align-self property sets the alignment of an item within its containing block. In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-items - */ - alignItems?: AlignItemsProperty | AlignItemsProperty[]; - /** - * The **`align-self`** CSS property aligns flex items of the current flex line overriding the `align-items` value. If any of the item's cross-axis margin is set to `auto`, then `align-self` is ignored. In Grid layout `align-self` aligns the item inside the grid area. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-self - */ - alignSelf?: AlignSelfProperty | AlignSelfProperty[]; - /** - * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. - * - * **Syntax**: `[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks - */ - alignTracks?: AlignTracksProperty | AlignTracksProperty[]; - /** - * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. - * - * **Syntax**: `<single-animation-composition>#` - * - * **Initial value**: `replace` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition - */ - animationComposition?: GlobalsString | GlobalsString[]; - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-delay - */ - animationDelay?: GlobalsString | GlobalsString[]; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-direction - */ - animationDirection?: AnimationDirectionProperty | AnimationDirectionProperty[]; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-duration - */ - animationDuration?: GlobalsString | GlobalsString[]; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 5 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode - */ - animationFillMode?: AnimationFillModeProperty | AnimationFillModeProperty[]; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count - */ - animationIterationCount?: AnimationIterationCountProperty | AnimationIterationCountProperty[]; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-name - */ - animationName?: AnimationNameProperty | AnimationNameProperty[]; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-play-state - */ - animationPlayState?: AnimationPlayStateProperty | AnimationPlayStateProperty[]; - /** - * The **`animation-timeline`** CSS property specifies the names of one or more `@scroll-timeline` at-rules describing the scroll animations to apply to the element. - * - * **Syntax**: `<single-animation-timeline>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-timeline - */ - animationTimeline?: AnimationTimelineProperty | AnimationTimelineProperty[]; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-timing-function - */ - animationTimingFunction?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[]; - /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. - * - * **Syntax**: `none | auto | textfield | menulist-button | <compat-auto>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :------: | :-: | - * | **84** | **80** | **15.4** | **84** | No | - * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | 12 _-x-_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/appearance - */ - appearance?: AppearanceProperty | AppearanceProperty[]; - /** - * The **`aspect-ratio`**   CSS property sets a _**preferred aspect ratio**_ for the box, which will be used in the calculation of auto sizes and some other layout functions. - * - * **Syntax**: `auto | <ratio>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **88** | **89** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/aspect-ratio - */ - aspectRatio?: AspectRatioProperty | AspectRatioProperty[]; - /** - * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :----: | :-: | - * | **76** | **103** | **9** _-x-_ | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/backdrop-filter - */ - backdropFilter?: BackdropFilterProperty | BackdropFilterProperty[]; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-------: | :----: | :----: | - * | **36** | **16** | **15.4** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/backface-visibility - */ - backfaceVisibility?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[]; - /** - * The **`background-attachment`** CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. - * - * **Syntax**: `<attachment>#` - * - * **Initial value**: `scroll` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-attachment - */ - backgroundAttachment?: BackgroundAttachmentProperty | BackgroundAttachmentProperty[]; - /** - * The **`background-blend-mode`** CSS property sets how an element's background images should blend with each other and with the element's background color. - * - * **Syntax**: `<blend-mode>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **35** | **30** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-blend-mode - */ - backgroundBlendMode?: BackgroundBlendModeProperty | BackgroundBlendModeProperty[]; - /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **4** | **14** | **12** | **9** | - * | | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-clip - */ - backgroundClip?: BackgroundClipProperty | BackgroundClipProperty[]; - /** - * The **`background-color`** CSS property sets the background color of an element. - * - * **Syntax**: `<color>` - * - * **Initial value**: `transparent` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-color - */ - backgroundColor?: BackgroundColorProperty | BackgroundColorProperty[]; - /** - * The **`background-image`** CSS property sets one or more background images on an element. - * - * **Syntax**: `<bg-image>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-image - */ - backgroundImage?: BackgroundImageProperty | BackgroundImageProperty[]; - /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **4** | **3** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-origin - */ - backgroundOrigin?: BackgroundOriginProperty | BackgroundOriginProperty[]; - /** - * The **`background-position-x`** CSS property sets the initial horizontal position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#` - * - * **Initial value**: `0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **49** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position-x - */ - backgroundPositionX?: BackgroundPositionXProperty<TLength> | BackgroundPositionXProperty<TLength>[]; - /** - * The **`background-position-y`** CSS property sets the initial vertical position, relative to the background position layer defined by `background-origin`, for each defined background image. - * - * **Syntax**: `[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#` - * - * **Initial value**: `0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **49** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position-y - */ - backgroundPositionY?: BackgroundPositionYProperty<TLength> | BackgroundPositionYProperty<TLength>[]; - /** - * The **`background-repeat`** CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-repeat - */ - backgroundRepeat?: BackgroundRepeatProperty | BackgroundRepeatProperty[]; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **3** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-size - */ - backgroundSize?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[]; - /** - * **Syntax**: `clip | ellipsis | <string>` - * - * **Initial value**: `clip` - */ - blockOverflow?: BlockOverflowProperty | BlockOverflowProperty[]; - /** - * The **`block-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/block-size - */ - blockSize?: BlockSizeProperty<TLength> | BlockSizeProperty<TLength>[]; - /** - * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>{1,2}` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-color - */ - borderBlockColor?: BorderBlockColorProperty | BorderBlockColorProperty[]; - /** - * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-color - */ - borderBlockEndColor?: BorderBlockEndColorProperty | BorderBlockEndColorProperty[]; - /** - * The **`border-block-end-style`** CSS property defines the style of the logical block end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-style - */ - borderBlockEndStyle?: BorderBlockEndStyleProperty | BorderBlockEndStyleProperty[]; - /** - * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width - */ - borderBlockEndWidth?: BorderBlockEndWidthProperty<TLength> | BorderBlockEndWidthProperty<TLength>[]; - /** - * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-color - */ - borderBlockStartColor?: BorderBlockStartColorProperty | BorderBlockStartColorProperty[]; - /** - * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-style - */ - borderBlockStartStyle?: BorderBlockStartStyleProperty | BorderBlockStartStyleProperty[]; - /** - * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width - */ - borderBlockStartWidth?: BorderBlockStartWidthProperty<TLength> | BorderBlockStartWidthProperty<TLength>[]; - /** - * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-style - */ - borderBlockStyle?: BorderBlockStyleProperty | BorderBlockStyleProperty[]; - /** - * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-width - */ - borderBlockWidth?: BorderBlockWidthProperty<TLength> | BorderBlockWidthProperty<TLength>[]; - /** - * The **`border-bottom-color`** CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties `border-color` or `border-bottom`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-color - */ - borderBottomColor?: BorderBottomColorProperty | BorderBottomColorProperty[]; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius - */ - borderBottomLeftRadius?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[]; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius - */ - borderBottomRightRadius?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[]; - /** - * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-style - */ - borderBottomStyle?: BorderBottomStyleProperty | BorderBottomStyleProperty[]; - /** - * The **`border-bottom-width`** CSS property sets the width of the bottom border of a box. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width - */ - borderBottomWidth?: BorderBottomWidthProperty<TLength> | BorderBottomWidthProperty<TLength>[]; - /** - * The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders. - * - * **Syntax**: `collapse | separate` - * - * **Initial value**: `separate` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-collapse - */ - borderCollapse?: BorderCollapseProperty | BorderCollapseProperty[]; - /** - * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius - */ - borderEndEndRadius?: BorderEndEndRadiusProperty<TLength> | BorderEndEndRadiusProperty<TLength>[]; - /** - * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius - */ - borderEndStartRadius?: BorderEndStartRadiusProperty<TLength> | BorderEndStartRadiusProperty<TLength>[]; - /** - * The **`border-image-outset`** CSS property sets the distance by which an element's border image is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-outset - */ - borderImageOutset?: BorderImageOutsetProperty<TLength> | BorderImageOutsetProperty<TLength>[]; - /** - * The **`border-image-repeat`** CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's border image. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-repeat - */ - borderImageRepeat?: BorderImageRepeatProperty | BorderImageRepeatProperty[]; - /** - * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. - * - * **Syntax**: `<number-percentage>{1,4} && fill?` - * - * **Initial value**: `100%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-slice - */ - borderImageSlice?: BorderImageSliceProperty | BorderImageSliceProperty[]; - /** - * The **`border-image-source`** CSS property sets the source image used to create an element's border image. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-source - */ - borderImageSource?: BorderImageSourceProperty | BorderImageSourceProperty[]; - /** - * The **`border-image-width`** CSS property sets the width of an element's border image. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **13** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-width - */ - borderImageWidth?: BorderImageWidthProperty<TLength> | BorderImageWidthProperty<TLength>[]; - /** - * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>{1,2}` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-color - */ - borderInlineColor?: BorderInlineColorProperty | BorderInlineColorProperty[]; - /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-color)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color - */ - borderInlineEndColor?: BorderInlineEndColorProperty | BorderInlineEndColorProperty[]; - /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-style)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style - */ - borderInlineEndStyle?: BorderInlineEndStyleProperty | BorderInlineEndStyleProperty[]; - /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-width)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width - */ - borderInlineEndWidth?: BorderInlineEndWidthProperty<TLength> | BorderInlineEndWidthProperty<TLength>[]; - /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-start-color)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color - */ - borderInlineStartColor?: BorderInlineStartColorProperty | BorderInlineStartColorProperty[]; - /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-start-style)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style - */ - borderInlineStartStyle?: BorderInlineStartStyleProperty | BorderInlineStartStyleProperty[]; - /** - * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width - */ - borderInlineStartWidth?: BorderInlineStartWidthProperty<TLength> | BorderInlineStartWidthProperty<TLength>[]; - /** - * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-style - */ - borderInlineStyle?: BorderInlineStyleProperty | BorderInlineStyleProperty[]; - /** - * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width - */ - borderInlineWidth?: BorderInlineWidthProperty<TLength> | BorderInlineWidthProperty<TLength>[]; - /** - * The **`border-left-color`** CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties `border-color` or `border-left`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-color - */ - borderLeftColor?: BorderLeftColorProperty | BorderLeftColorProperty[]; - /** - * The **`border-left-style`** CSS property sets the line style of an element's left `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-style - */ - borderLeftStyle?: BorderLeftStyleProperty | BorderLeftStyleProperty[]; - /** - * The **`border-left-width`** CSS property sets the width of the left border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-width - */ - borderLeftWidth?: BorderLeftWidthProperty<TLength> | BorderLeftWidthProperty<TLength>[]; - /** - * The **`border-right-color`** CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties `border-color` or `border-right`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-color - */ - borderRightColor?: BorderRightColorProperty | BorderRightColorProperty[]; - /** - * The **`border-right-style`** CSS property sets the line style of an element's right `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-style - */ - borderRightStyle?: BorderRightStyleProperty | BorderRightStyleProperty[]; - /** - * The **`border-right-width`** CSS property sets the width of the right border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-width - */ - borderRightWidth?: BorderRightWidthProperty<TLength> | BorderRightWidthProperty<TLength>[]; - /** - * The **`border-spacing`** CSS property sets the distance between the borders of adjacent `<table>` cells. This property applies only when `border-collapse` is `separate`. - * - * **Syntax**: `<length> <length>?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-spacing - */ - borderSpacing?: BorderSpacingProperty<TLength> | BorderSpacingProperty<TLength>[]; - /** - * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius - */ - borderStartEndRadius?: BorderStartEndRadiusProperty<TLength> | BorderStartEndRadiusProperty<TLength>[]; - /** - * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius - */ - borderStartStartRadius?: BorderStartStartRadiusProperty<TLength> | BorderStartStartRadiusProperty<TLength>[]; - /** - * The **`border-top-color`** CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties `border-color` or `border-top`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-color - */ - borderTopColor?: BorderTopColorProperty | BorderTopColorProperty[]; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius - */ - borderTopLeftRadius?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[]; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius - */ - borderTopRightRadius?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[]; - /** - * The **`border-top-style`** CSS property sets the line style of an element's top `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-style - */ - borderTopStyle?: BorderTopStyleProperty | BorderTopStyleProperty[]; - /** - * The **`border-top-width`** CSS property sets the width of the top border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-width - */ - borderTopWidth?: BorderTopWidthProperty<TLength> | BorderTopWidthProperty<TLength>[]; - /** - * The **`bottom`** CSS property participates in specifying the vertical position of a _positioned element_. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/bottom - */ - bottom?: BottomProperty<TLength> | BottomProperty<TLength>[]; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----: | :---------: | :--: | :-: | - * | **22** _-x-_ | **32** | **7** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-decoration-break - */ - boxDecorationBreak?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[]; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **10** | **4** | **5.1** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-shadow - */ - boxShadow?: BoxShadowProperty | BoxShadowProperty[]; - /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **10** | **29** | **5.1** | **12** | **8** | - * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-sizing - */ - boxSizing?: BoxSizingProperty | BoxSizingProperty[]; - /** - * The **`break-after`** CSS property defines how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-after - */ - breakAfter?: BreakAfterProperty | BreakAfterProperty[]; - /** - * The **`break-before`** CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-before - */ - breakBefore?: BreakBeforeProperty | BreakBeforeProperty[]; - /** - * The **`break-inside`** CSS property defines how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | avoid-page | avoid-column | avoid-region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-inside - */ - breakInside?: BreakInsideProperty | BreakInsideProperty[]; - /** - * The **`caption-side`** CSS property puts the content of a table's `<caption>` on the specified side. The values are relative to the `writing-mode` of the table. - * - * **Syntax**: `top | bottom | block-start | block-end | inline-start | inline-end` - * - * **Initial value**: `top` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/caption-side - */ - captionSide?: CaptionSideProperty | CaptionSideProperty[]; - /** - * The **`caret-color`** CSS property sets the color of the insertion caret, the visible marker where the next character typed will be inserted. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. - * - * **Syntax**: `auto | <color>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **53** | **11.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/caret-color - */ - caretColor?: CaretColorProperty | CaretColorProperty[]; - /** - * The **`clear`** CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The `clear` property applies to floating and non-floating elements. - * - * **Syntax**: `none | left | right | both | inline-start | inline-end` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/clear - */ - clear?: ClearProperty | ClearProperty[]; - /** - * The `**clip-path**` CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. - * - * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **55** | **3.5** | **9.1** | **79** | **10** | - * | 23 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/clip-path - */ - clipPath?: ClipPathProperty | ClipPathProperty[]; - /** - * The **`color`** CSS property sets the foreground color value of an element's text and text decorations, and sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `canvastext` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/color - */ - color?: ColorProperty | ColorProperty[]; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----------------: | :------: | :----------: | :-: | - * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | - * | | 48 _(color-adjust)_ | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust - */ - colorAdjust?: PrintColorAdjustProperty | PrintColorAdjustProperty[]; - /** - * The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in. - * - * **Syntax**: `normal | [ light | dark | <custom-ident> ]+ && only?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **81** | **96** | **13** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/color-scheme - */ - colorScheme?: ColorSchemeProperty | ColorSchemeProperty[]; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-count - */ - columnCount?: ColumnCountProperty | ColumnCountProperty[]; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-fill - */ - columnFill?: ColumnFillProperty | ColumnFillProperty[]; - /** - * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. - * - * **Syntax**: `normal | <length-percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **1** | **1.5** | **3** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-gap - */ - columnGap?: ColumnGapProperty<TLength> | ColumnGapProperty<TLength>[]; - /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-color - */ - columnRuleColor?: ColumnRuleColorProperty | ColumnRuleColorProperty[]; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-style - */ - columnRuleStyle?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[]; - /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-width - */ - columnRuleWidth?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[]; - /** - * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. - * - * **Syntax**: `none | all` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **50** | **71** | **9** | **12** | **10** | - * | 6 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-span - */ - columnSpan?: ColumnSpanProperty | ColumnSpanProperty[]; - /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **50** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-width - */ - columnWidth?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[]; - /** - * The **`contain`** CSS property allows an author to indicate that an element and its contents are, as much as possible, _independent_ of the rest of the document tree. This allows the browser to recalculate layout, style, paint, size, or any combination of them for a limited area of the DOM and not the entire page. - * - * **Syntax**: `none | strict | content | [ [ size || inline-size ] || layout || style || paint ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **52** | **69** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain - */ - contain?: ContainProperty | ContainProperty[]; - /** - * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are _anonymous replaced elements._ - * - * **Syntax**: `normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/content - */ - content?: ContentProperty | ContentProperty[]; - /** - * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. Basically it enables the user agent to skip an element's rendering work, including layout and painting, until it is needed, makes the initial page load much faster. - * - * **Syntax**: `visible | auto | hidden` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **85** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/content-visibility - */ - contentVisibility?: ContentVisibilityProperty | ContentVisibilityProperty[]; - /** - * The **`counter-increment`** CSS property increases or decreases the value of a CSS counter by a given value. - * - * **Syntax**: `[ <counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment - */ - counterIncrement?: CounterIncrementProperty | CounterIncrementProperty[]; - /** - * The **`counter-reset`** CSS property resets a CSS counter to a given value. - * - * **Syntax**: `[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-reset - */ - counterReset?: CounterResetProperty | CounterResetProperty[]; - /** - * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. - * - * **Syntax**: `[ <counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **85** | **68** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-set - */ - counterSet?: CounterSetProperty | CounterSetProperty[]; - /** - * The **`cursor`** CSS property sets mouse cursor to display when the mouse pointer is over an element. - * - * **Syntax**: `[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/cursor - */ - cursor?: CursorProperty | CursorProperty[]; - /** - * The **`direction`** CSS property sets the direction of text, table columns, and horizontal overflow. Use `rtl` for languages written from right to left (like Hebrew or Arabic), and `ltr` for those written from left to right (like English and most other languages). - * - * **Syntax**: `ltr | rtl` - * - * **Initial value**: `ltr` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **2** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/direction - */ - direction?: DirectionProperty | DirectionProperty[]; - /** - * The **`display`** CSS property defines the _display type_ of an element, which consists of the two basic qualities of how an element generates boxes — the **outer display type** defining how the box participates in flow layout, and the **inner display type** defining how the children of the box are laid out. - * - * **Syntax**: `[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>` - * - * **Initial value**: `inline` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/display - */ - display?: DisplayProperty | DisplayProperty[]; - /** - * The **`empty-cells`** CSS property sets whether borders and backgrounds appear around `<table>` cells that have no visible content. - * - * **Syntax**: `show | hide` - * - * **Initial value**: `show` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/empty-cells - */ - emptyCells?: EmptyCellsProperty | EmptyCellsProperty[]; - /** - * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - * * | Chrome | Firefox | Safari | Edge | IE | * | :------: | :-----: | :-----: | :----: | :-: | - * | **53** | **35** | **9.1** | **12** | No | - * | 18 _-x-_ | | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/filter - */ - filter?: FilterProperty | FilterProperty[]; - /** - * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. - * - * **Syntax**: `content | <'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **22** | **9** | **12** | **11** | - * | 22 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-basis - */ - flexBasis?: FlexBasisProperty<TLength> | FlexBasisProperty<TLength>[]; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :------: | - * | **29** | **81** | **9** | **12** | **11** | - * | 21 _-x-_ | 49 _-x-_ | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-direction - */ - flexDirection?: FlexDirectionProperty | FlexDirectionProperty[]; - /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----------------------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 22 _-x-_ | | 7 _-x-_ | | 10 _(-ms-flex-positive)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-grow - */ - flexGrow?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. - * - * **Syntax**: `<number>` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 22 _-x-_ | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-shrink - */ - flexShrink?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. - * - * **Syntax**: `nowrap | wrap | wrap-reverse` - * - * **Initial value**: `nowrap` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-wrap - */ - flexWrap?: FlexWrapProperty | FlexWrapProperty[]; - /** - * The **`float`** CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). - * - * **Syntax**: `left | right | none | inline-start | inline-end` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/float - */ - float?: FloatProperty | FloatProperty[]; - /** - * The **`font-family`** CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element. - * - * **Syntax**: `[ <family-name> | <generic-family> ]#` - * - * **Initial value**: depends on user agent - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-family - */ - fontFamily?: FontFamilyProperty | FontFamilyProperty[]; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **48** | **34** | **9.1** | **15** | **10** | - * | 16 _-x-_ | 15 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-feature-settings - */ - fontFeatureSettings?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[]; - /** - * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. - * - * **Syntax**: `auto | normal | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **33** | **32** | **9** | n/a | No | - * | | | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-kerning - */ - fontKerning?: FontKerningProperty | FontKerningProperty[]; - /** - * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. - * - * **Syntax**: `normal | <string>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **34** | No | n/a | No | - * | | 4 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-language-override - */ - fontLanguageOverride?: FontLanguageOverrideProperty | FontLanguageOverrideProperty[]; - /** - * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. This only works for fonts that have an optical size variation axis. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **79** | **62** | **11** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing - */ - fontOpticalSizing?: FontOpticalSizingProperty | FontOpticalSizingProperty[]; - /** - * The **`font-size`** CSS property sets the size of the font. This property is also used to compute the size of `em`, `ex`, and other relative `<length>` units. - * - * **Syntax**: `<absolute-size> | <relative-size> | <length-percentage>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-size - */ - fontSize?: FontSizeProperty<TLength> | FontSizeProperty<TLength>[]; - /** - * The **`font-size-adjust`** CSS property sets how the font size should be chosen based on the height of lowercase rather than capital letters. - * - * **Syntax**: `none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **3** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-size-adjust - */ - fontSizeAdjust?: FontSizeAdjustProperty | FontSizeAdjustProperty[]; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :--------------------------------: | :------------------------------: | :--: | :-: | - * | **5** _(-webkit-font-smoothing)_ | **25** _(-moz-osx-font-smoothing)_ | **4** _(-webkit-font-smoothing)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-smooth - */ - fontSmooth?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[]; - /** - * The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font. - * - * **Syntax**: `<font-stretch-absolute>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **60** | **9** | **11** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-stretch - */ - fontStretch?: FontStretchProperty | FontStretchProperty[]; - /** - * The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`. - * - * **Syntax**: `normal | italic | oblique <angle>?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-style - */ - fontStyle?: FontStyleProperty | FontStyleProperty[]; - /** - * The **`font-synthesis`** CSS property controls which missing typefaces, bold or italic, may be synthesized by the browser. - * - * **Syntax**: `none | [ weight || style || small-caps ]` - * - * **Initial value**: `weight style` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **97** | **34** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis - */ - fontSynthesis?: FontSynthesisProperty | FontSynthesisProperty[]; - /** - * The **font-variant** CSS property is a shorthand for the longhand properties `font-variant-caps`, `font-variant-numeric`, `font-variant-alternates`, `font-variant-ligatures`, and `font-variant-east-asian`. You can also set the CSS Level 2 (Revision 1) values of `font-variant`, (that is, `normal` or `small-caps`), by using the `font` shorthand. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant - */ - fontVariant?: FontVariantProperty | FontVariantProperty[]; - /** - * The **`font-variant-alternates`** CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in `@font-feature-values`. - * - * **Syntax**: `normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | No | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates - */ - fontVariantAlternates?: FontVariantAlternatesProperty | FontVariantAlternatesProperty[]; - /** - * The **`font-variant-caps`** CSS property controls the use of alternate glyphs for capital letters. - * - * **Syntax**: `normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **52** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-caps - */ - fontVariantCaps?: FontVariantCapsProperty | FontVariantCapsProperty[]; - /** - * The **`font-variant-east-asian`** CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese. - * - * **Syntax**: `normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **63** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian - */ - fontVariantEastAsian?: FontVariantEastAsianProperty | FontVariantEastAsianProperty[]; - /** - * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :--: | :-: | - * | **34** | **34** | **9.1** | n/a | No | - * | 31 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures - */ - fontVariantLigatures?: FontVariantLigaturesProperty | FontVariantLigaturesProperty[]; - /** - * The **`font-variant-numeric`** CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. - * - * **Syntax**: `normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **52** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric - */ - fontVariantNumeric?: FontVariantNumericProperty | FontVariantNumericProperty[]; - /** - * The **`font-variant-position`** CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript. - * - * **Syntax**: `normal | sub | super` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | No | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-position - */ - fontVariantPosition?: FontVariantPositionProperty | FontVariantPositionProperty[]; - /** - * The **`font-variation-settings`** CSS property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. - * - * **Syntax**: `normal | [ <string> <number> ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **62** | **62** | **11** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variation-settings - */ - fontVariationSettings?: FontVariationSettingsProperty | FontVariationSettingsProperty[]; - /** - * The **`font-weight`** CSS property specifies the weight (or boldness) of the font. The font weights available to you will depend on the `font-family` you are using. Some fonts are only available in `normal` and `bold`. - * - * **Syntax**: `<font-weight-absolute> | bolder | lighter` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-weight - */ - fontWeight?: FontWeightProperty | FontWeightProperty[]; - /** - * The **`forced-color-adjust`** CSS property allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :-----------------------------: | :---------------------------------: | - * | **89** | No | No | **79** | **10** _(-ms-high-contrast-adjust)_ | - * | | | | 12 _(-ms-high-contrast-adjust)_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust - */ - forcedColorAdjust?: ForcedColorAdjustProperty | ForcedColorAdjustProperty[]; - /** - * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track. - * - * **Syntax**: `<track-size>+` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-------------------------: | - * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns - */ - gridAutoColumns?: GridAutoColumnsProperty<TLength> | GridAutoColumnsProperty<TLength>[]; - /** - * The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. - * - * **Syntax**: `[ row | column ] || dense` - * - * **Initial value**: `row` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow - */ - gridAutoFlow?: GridAutoFlowProperty | GridAutoFlowProperty[]; - /** - * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track. - * - * **Syntax**: `<track-size>+` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----------------------: | - * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows - */ - gridAutoRows?: GridAutoRowsProperty<TLength> | GridAutoRowsProperty<TLength>[]; - /** - * The **`grid-column-end`** CSS property specifies a grid item’s end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-end - */ - gridColumnEnd?: GridColumnEndProperty | GridColumnEndProperty[]; - /** - * The **`grid-column-start`** CSS property specifies a grid item’s start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-start - */ - gridColumnStart?: GridColumnStartProperty | GridColumnStartProperty[]; - /** - * The **`grid-row-end`** CSS property specifies a grid item’s end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-end - */ - gridRowEnd?: GridRowEndProperty | GridRowEndProperty[]; - /** - * The **`grid-row-start`** CSS property specifies a grid item’s start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-start - */ - gridRowStart?: GridRowStartProperty | GridRowStartProperty[]; - /** - * The **`grid-template-areas`** CSS property specifies named grid areas. - * - * **Syntax**: `none | <string>+` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-areas - */ - gridTemplateAreas?: GridTemplateAreasProperty | GridTemplateAreasProperty[]; - /** - * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. - * - * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-------------------------: | - * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-columns - */ - gridTemplateColumns?: GridTemplateColumnsProperty<TLength> | GridTemplateColumnsProperty<TLength>[]; - /** - * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. - * - * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----------------------: | - * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-rows - */ - gridTemplateRows?: GridTemplateRowsProperty<TLength> | GridTemplateRowsProperty<TLength>[]; - /** - * The **`hanging-punctuation`** CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box. - * - * **Syntax**: `none | [ first || [ force-end | allow-end ] || last ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | No | **10** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation - */ - hangingPunctuation?: HangingPunctuationProperty | HangingPunctuationProperty[]; - /** - * The **`height`** CSS property specifies the height of an element. By default, the property defines the height of the content area. If `box-sizing` is set to `border-box`, however, it instead determines the height of the border area. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/height - */ - height?: HeightProperty<TLength> | HeightProperty<TLength>[]; - /** - * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. - * - * **Syntax**: `auto | <string>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-----------: | :--: | :-: | - * | **6** _-x-_ | **98** | **5.1** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hyphenate-character - */ - hyphenateCharacter?: HyphenateCharacterProperty | HyphenateCharacterProperty[]; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----------: | :----: | :----------: | - * | **55** | **43** | **5.1** _-x-_ | **79** | **10** _-x-_ | - * | 13 _-x-_ | 6 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hyphens - */ - hyphens?: HyphensProperty | HyphensProperty[]; - /** - * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. It should _not_ be used for any other orientation adjustments; instead, the `transform` property should be used with the `rotate` `<transform-function>`. - * - * **Syntax**: `from-image | <angle> | [ <angle>? flip ]` - * - * **Initial value**: `from-image` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **81** | **26** | **13.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/image-orientation - */ - imageOrientation?: ImageOrientationProperty | ImageOrientationProperty[]; - /** - * The **`image-rendering`** CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants. - * - * **Syntax**: `auto | crisp-edges | pixelated` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **13** | **3.6** | **6** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/image-rendering - */ - imageRendering?: ImageRenderingProperty | ImageRenderingProperty[]; - /** - * **Syntax**: `[ from-image || <resolution> ] && snap?` - * - * **Initial value**: `1dppx` - */ - imageResolution?: ImageResolutionProperty | ImageResolutionProperty[]; - /** - * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. - * - * **Syntax**: `normal | [ <number> <integer>? ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :--: | :-: | - * | No | No | **9** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/initial-letter - */ - initialLetter?: InitialLetterProperty | InitialLetterProperty[]; - /** - * The **`inline-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inline-size - */ - inlineSize?: InlineSizeProperty<TLength> | InlineSizeProperty<TLength>[]; - /** - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - */ - inputSecurity?: InputSecurityProperty | InputSecurityProperty[]; - /** - * The **`inset`** CSS property defines the logical block and inline start and end offsets of an element, which map to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset - */ - inset?: InsetProperty<TLength> | InsetProperty<TLength>[]; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block - */ - insetBlock?: InsetBlockProperty<TLength> | InsetBlockProperty<TLength>[]; - /** - * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-end - */ - insetBlockEnd?: InsetBlockEndProperty<TLength> | InsetBlockEndProperty<TLength>[]; - /** - * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-start - */ - insetBlockStart?: InsetBlockStartProperty<TLength> | InsetBlockStartProperty<TLength>[]; - /** - * The **`inset-inline`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline - */ - insetInline?: InsetInlineProperty<TLength> | InsetInlineProperty<TLength>[]; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-end - */ - insetInlineEnd?: InsetInlineEndProperty<TLength> | InsetInlineEndProperty<TLength>[]; - /** - * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-start - */ - insetInlineStart?: InsetInlineStartProperty<TLength> | InsetInlineStartProperty<TLength>[]; - /** - * The **`isolation`** CSS property determines whether an element must create a new stacking context. - * - * **Syntax**: `auto | isolate` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **41** | **36** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/isolation - */ - isolation?: IsolationProperty | IsolationProperty[]; - /** - * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. - * - * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-content - */ - justifyContent?: JustifyContentProperty | JustifyContentProperty[]; - /** - * The CSS **`justify-items`** property defines the default `justify-self` for all items of the box, giving them all a default way of justifying each box along the appropriate axis. - * - * **Syntax**: `normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]` - * - * **Initial value**: `legacy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **52** | **20** | **9** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-items - */ - justifyItems?: JustifyItemsProperty | JustifyItemsProperty[]; - /** - * The CSS **`justify-self`** property set the way a box is justified inside its alignment container along the appropriate axis. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----: | - * | **57** | **45** | **10.1** | **16** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-self - */ - justifySelf?: JustifySelfProperty | JustifySelfProperty[]; - /** - * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. - * - * **Syntax**: `[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-tracks - */ - justifyTracks?: JustifyTracksProperty | JustifyTracksProperty[]; - /** - * The **`left`** CSS property participates in specifying the horizontal position of a _positioned element_. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/left - */ - left?: LeftProperty<TLength> | LeftProperty<TLength>[]; - /** - * The **`letter-spacing`** CSS property sets the spacing behavior between text characters. - * - * **Syntax**: `normal | <length>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/letter-spacing - */ - letterSpacing?: LetterSpacingProperty<TLength> | LetterSpacingProperty<TLength>[]; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :-----: | - * | **58** | **69** | **11** | **14** | **5.5** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-break - */ - lineBreak?: LineBreakProperty | LineBreakProperty[]; - /** - * The **`line-height`** CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. - * - * **Syntax**: `normal | <number> | <length> | <percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-height - */ - lineHeight?: LineHeightProperty<TLength> | LineHeightProperty<TLength>[]; - /** - * The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-height-step - */ - lineHeightStep?: LineHeightStepProperty<TLength> | LineHeightStepProperty<TLength>[]; - /** - * The **`list-style-image`** CSS property sets an image to be used as the list item marker. - * - * **Syntax**: `<image> | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-image - */ - listStyleImage?: ListStyleImageProperty | ListStyleImageProperty[]; - /** - * The **`list-style-position`** CSS property sets the position of the `::marker` relative to a list item. - * - * **Syntax**: `inside | outside` - * - * **Initial value**: `outside` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-position - */ - listStylePosition?: ListStylePositionProperty | ListStylePositionProperty[]; - /** - * The **`list-style-type`** CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. - * - * **Syntax**: `<counter-style> | <string> | none` - * - * **Initial value**: `disc` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type - */ - listStyleType?: ListStyleTypeProperty | ListStyleTypeProperty[]; - /** - * The **`margin-block`** CSS property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block - */ - marginBlock?: MarginBlockProperty<TLength> | MarginBlockProperty<TLength>[]; - /** - * The **`margin-block-end`** CSS property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-end - */ - marginBlockEnd?: MarginBlockEndProperty<TLength> | MarginBlockEndProperty<TLength>[]; - /** - * The **`margin-block-start`** CSS property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-start - */ - marginBlockStart?: MarginBlockStartProperty<TLength> | MarginBlockStartProperty<TLength>[]; - /** - * The **`margin-bottom`** CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-bottom - */ - marginBottom?: MarginBottomProperty<TLength> | MarginBottomProperty<TLength>[]; - /** - * The **`margin-inline`** CSS property defines the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline - */ - marginInline?: MarginInlineProperty<TLength> | MarginInlineProperty<TLength>[]; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------------: | :-------------------: | :----------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-margin-end)_ | 3 _(-moz-margin-end)_ | 3 _(-webkit-margin-end)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-end - */ - marginInlineEnd?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[]; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :---------------------: | :------------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-margin-start)_ | 3 _(-moz-margin-start)_ | 3 _(-webkit-margin-start)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-start - */ - marginInlineStart?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[]; - /** - * The **`margin-left`** CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-left - */ - marginLeft?: MarginLeftProperty<TLength> | MarginLeftProperty<TLength>[]; - /** - * The **`margin-right`** CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-right - */ - marginRight?: MarginRightProperty<TLength> | MarginRightProperty<TLength>[]; - /** - * The **`margin-top`** CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-top - */ - marginTop?: MarginTopProperty<TLength> | MarginTopProperty<TLength>[]; - /** - * The **`mask-border-mode`** CSS property specifies the blending mode used in a mask border. - * - * **Syntax**: `luminance | alpha` - * - * **Initial value**: `alpha` - */ - maskBorderMode?: MaskBorderModeProperty | MaskBorderModeProperty[]; - /** - * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-outset)_ | No | **3.1** _(-webkit-mask-box-image-outset)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-outset - */ - maskBorderOutset?: MaskBorderOutsetProperty<TLength> | MaskBorderOutsetProperty<TLength>[]; - /** - * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-repeat)_ | No | **3.1** _(-webkit-mask-box-image-repeat)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat - */ - maskBorderRepeat?: MaskBorderRepeatProperty | MaskBorderRepeatProperty[]; - /** - * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. - * - * **Syntax**: `<number-percentage>{1,4} fill?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :--------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-slice)_ | No | **3.1** _(-webkit-mask-box-image-slice)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-slice - */ - maskBorderSlice?: MaskBorderSliceProperty | MaskBorderSliceProperty[]; - /** - * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-source)_ | No | **3.1** _(-webkit-mask-box-image-source)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-source - */ - maskBorderSource?: MaskBorderSourceProperty | MaskBorderSourceProperty[]; - /** - * The **`mask-border-width`** CSS property sets the width of an element's mask border. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :--------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-width)_ | No | **3.1** _(-webkit-mask-box-image-width)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-width - */ - maskBorderWidth?: MaskBorderWidthProperty<TLength> | MaskBorderWidthProperty<TLength>[]; - /** - * The **`mask-clip`** CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area. - * - * **Syntax**: `[ <geometry-box> | no-clip ]#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :--: | :-: | - * | **1** _-x-_ | **53** | **15.4** | n/a | No | - * | | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-clip - */ - maskClip?: MaskClipProperty | MaskClipProperty[]; - /** - * The **`mask-composite`** CSS property represents a compositing operation used on the current mask layer with the mask layers below it. - * - * **Syntax**: `<compositing-operator>#` - * - * **Initial value**: `add` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :---: | :-: | - * | No | **53** | **15.4** | 18-79 | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-composite - */ - maskComposite?: MaskCompositeProperty | MaskCompositeProperty[]; - /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. - * - * **Syntax**: `<mask-reference>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 16-79 | No | - * | | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-image - */ - maskImage?: MaskImageProperty | MaskImageProperty[]; - /** - * The **`mask-mode`** CSS property sets whether the mask reference defined by `mask-image` is treated as a luminance or alpha mask. - * - * **Syntax**: `<masking-mode>#` - * - * **Initial value**: `match-source` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | No | **53** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-mode - */ - maskMode?: MaskModeProperty | MaskModeProperty[]; - /** - * The **`mask-origin`** CSS property sets the origin of a mask. - * - * **Syntax**: `<geometry-box>#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :--: | :-: | - * | **1** _-x-_ | **53** | **15.4** | n/a | No | - * | | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-origin - */ - maskOrigin?: MaskOriginProperty | MaskOriginProperty[]; - /** - * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. - * - * **Syntax**: `<position>#` - * - * **Initial value**: `center` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-position - */ - maskPosition?: MaskPositionProperty<TLength> | MaskPositionProperty<TLength>[]; - /** - * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `no-repeat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-repeat - */ - maskRepeat?: MaskRepeatProperty | MaskRepeatProperty[]; - /** - * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :---: | :-: | - * | **4** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-size - */ - maskSize?: MaskSizeProperty<TLength> | MaskSizeProperty<TLength>[]; - /** - * The **`mask-type`** CSS property sets whether an SVG `<mask>` element is used as a _luminance_ or an _alpha_ mask. It applies to the `<mask>` element itself. - * - * **Syntax**: `luminance | alpha` - * - * **Initial value**: `luminance` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **24** | **35** | **7** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-type - */ - maskType?: MaskTypeProperty | MaskTypeProperty[]; - /** - * The **`math-depth`** property describes a notion of _depth_ for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is `math`. - * - * **Syntax**: `auto-add | add(<integer>) | <integer>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-depth - */ - mathDepth?: MathDepthProperty | MathDepthProperty[]; - /** - * The `math-shift` property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift. - * - * **Syntax**: `normal | compact` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-shift - */ - mathShift?: MathShiftProperty | MathShiftProperty[]; - /** - * The `math-style` property indicates whether MathML equations should render with normal or compact height. - * - * **Syntax**: `normal | compact` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | n/a | n/a | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-style - */ - mathStyle?: MathStyleProperty | MathStyleProperty[]; - /** - * The `**max-block-size**` CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-block-size - */ - maxBlockSize?: MaxBlockSizeProperty<TLength> | MaxBlockSizeProperty<TLength>[]; - /** - * The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. - * - * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **18** | **1** | **1.3** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-height - */ - maxHeight?: MaxHeightProperty<TLength> | MaxHeightProperty<TLength>[]; - /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block depending on its writing mode. It corresponds to the `max-width` or the `max-height` property depending on the value defined for `writing-mode`. If the writing mode is vertically oriented, the value of `max-inline-size` relates to the maximal height of the element, otherwise it relates to the maximal width of the element. It relates to `max-block-size`, which defines the other dimension of the element. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :--------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * | | | 10.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-inline-size - */ - maxInlineSize?: MaxInlineSizeProperty<TLength> | MaxInlineSizeProperty<TLength>[]; - /** - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - maxLines?: MaxLinesProperty | MaxLinesProperty[]; - /** - * The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. - * - * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-width - */ - maxWidth?: MaxWidthProperty<TLength> | MaxWidthProperty<TLength>[]; - /** - * The **`min-block-size`** CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'min-width'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-block-size - */ - minBlockSize?: MinBlockSizeProperty<TLength> | MinBlockSizeProperty<TLength>[]; - /** - * The **`min-height`** CSS property sets the minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `min-height`. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **3** | **1.3** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-height - */ - minHeight?: MinHeightProperty<TLength> | MinHeightProperty<TLength>[]; - /** - * The **`min-inline-size`** CSS property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'min-width'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-inline-size - */ - minInlineSize?: MinInlineSizeProperty<TLength> | MinInlineSizeProperty<TLength>[]; - /** - * The **`min-width`** CSS property sets the minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `min-width`. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-width - */ - minWidth?: MinWidthProperty<TLength> | MinWidthProperty<TLength>[]; - /** - * The **`mix-blend-mode`** CSS property sets how an element's content should blend with the content of the element's parent and the element's background. - * - * **Syntax**: `<blend-mode> | plus-lighter` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **41** | **32** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode - */ - mixBlendMode?: MixBlendModeProperty | MixBlendModeProperty[]; - /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | No | n/a | No | - * | 46 _(motion-distance)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance - */ - motionDistance?: OffsetDistanceProperty<TLength> | OffsetDistanceProperty<TLength>[]; - /** - * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. - * - * **Syntax**: `none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------: | :-----: | :------: | :--: | :-: | - * | **55** | **72** | **15.4** | n/a | No | - * | 46 _(motion-path)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-path - */ - motionPath?: OffsetPathProperty | OffsetPathProperty[]; - /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - motionRotation?: OffsetRotateProperty | OffsetRotateProperty[]; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **32** | **36** | **10** | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/object-fit - */ - objectFit?: ObjectFitProperty | ObjectFitProperty[]; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **32** | **36** | **10** | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/object-position - */ - objectPosition?: ObjectPositionProperty<TLength> | ObjectPositionProperty<TLength>[]; - /** - * **Syntax**: `auto | <position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **72** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-anchor - */ - offsetAnchor?: OffsetAnchorProperty<TLength> | OffsetAnchorProperty<TLength>[]; - /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | No | n/a | No | - * | 46 _(motion-distance)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance - */ - offsetDistance?: OffsetDistanceProperty<TLength> | OffsetDistanceProperty<TLength>[]; - /** - * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. - * - * **Syntax**: `none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------: | :-----: | :------: | :--: | :-: | - * | **55** | **72** | **15.4** | n/a | No | - * | 46 _(motion-path)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-path - */ - offsetPath?: OffsetPathProperty | OffsetPathProperty[]; - /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - offsetRotate?: OffsetRotateProperty | OffsetRotateProperty[]; - /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - offsetRotation?: OffsetRotateProperty | OffsetRotateProperty[]; - /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **2** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/opacity - */ - opacity?: OpacityProperty | OpacityProperty[]; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/order - */ - order?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`orphans`** CSS property sets the minimum number of lines in a block container that must be shown at the _bottom_ of a page, region, or column. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `2` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **25** | No | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/orphans - */ - orphans?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`outline-color`** CSS property sets the color of an element's outline. - * - * **Syntax**: `<color> | invert` - * - * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-color - */ - outlineColor?: OutlineColorProperty | OutlineColorProperty[]; - /** - * The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-: | - * | **1** | **1.5** | **1.2** | **15** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-offset - */ - outlineOffset?: OutlineOffsetProperty<TLength> | OutlineOffsetProperty<TLength>[]; - /** - * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `auto | <'border-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-style - */ - outlineStyle?: OutlineStyleProperty | OutlineStyleProperty[]; - /** - * The **`outline-width`** CSS property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-width - */ - outlineWidth?: OutlineWidthProperty<TLength> | OutlineWidthProperty<TLength>[]; - /** - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **56** | **66** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-anchor - */ - overflowAnchor?: OverflowAnchorProperty | OverflowAnchorProperty[]; - /** - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **69** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-block - */ - overflowBlock?: OverflowBlockProperty | OverflowBlockProperty[]; - /** - * The **`overflow-clip-box`** CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the `overflow-clip-box-inline` and `overflow-clip-box-block` properties. - * - * **Syntax**: `padding-box | content-box` - * - * **Initial value**: `padding-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **29** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Mozilla/Gecko/Chrome/CSS/overflow-clip-box - */ - overflowClipBox?: OverflowClipBoxProperty | OverflowClipBoxProperty[]; - /** - * **Syntax**: `<visual-box> || <length [0,∞]>` - * - * **Initial value**: `0px` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **90** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin - */ - overflowClipMargin?: OverflowClipMarginProperty<TLength> | OverflowClipMarginProperty<TLength>[]; - /** - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **69** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-inline - */ - overflowInline?: OverflowInlineProperty | OverflowInlineProperty[]; - /** - * The `**overflow-wrap**` CSS property sets whether the browser should insert line breaks within words to prevent text from overflowing its content box. - * - * **Syntax**: `normal | break-word | anywhere` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------: | :---------------: | :-------------: | :--------------: | :-------------------: | - * | **23** | **49** | **7** | **18** | **5.5** _(word-wrap)_ | - * | 1 _(word-wrap)_ | 3.5 _(word-wrap)_ | 1 _(word-wrap)_ | 12 _(word-wrap)_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-wrap - */ - overflowWrap?: OverflowWrapProperty | OverflowWrapProperty[]; - /** - * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **3.5** | **3** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-x - */ - overflowX?: OverflowXProperty | OverflowXProperty[]; - /** - * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **3.5** | **3** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-y - */ - overflowY?: OverflowYProperty | OverflowYProperty[]; - /** - * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **77** | **73** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block - */ - overscrollBehaviorBlock?: OverscrollBehaviorBlockProperty | OverscrollBehaviorBlockProperty[]; - /** - * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **77** | **73** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline - */ - overscrollBehaviorInline?: OverscrollBehaviorInlineProperty | OverscrollBehaviorInlineProperty[]; - /** - * The **`overscroll-behavior-x`** CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x - */ - overscrollBehaviorX?: OverscrollBehaviorXProperty | OverscrollBehaviorXProperty[]; - /** - * The **`overscroll-behavior-y`** CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y - */ - overscrollBehaviorY?: OverscrollBehaviorYProperty | OverscrollBehaviorYProperty[]; - /** - * The **`padding-block`** CSS property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block - */ - paddingBlock?: PaddingBlockProperty<TLength> | PaddingBlockProperty<TLength>[]; - /** - * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-end - */ - paddingBlockEnd?: PaddingBlockEndProperty<TLength> | PaddingBlockEndProperty<TLength>[]; - /** - * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-start - */ - paddingBlockStart?: PaddingBlockStartProperty<TLength> | PaddingBlockStartProperty<TLength>[]; - /** - * The **`padding-bottom`** CSS property sets the height of the padding area on the bottom of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-bottom - */ - paddingBottom?: PaddingBottomProperty<TLength> | PaddingBottomProperty<TLength>[]; - /** - * The **`padding-inline`** CSS property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline - */ - paddingInline?: PaddingInlineProperty<TLength> | PaddingInlineProperty<TLength>[]; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------------------: | :--------------------: | :-----------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-padding-end)_ | 3 _(-moz-padding-end)_ | 3 _(-webkit-padding-end)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-end - */ - paddingInlineEnd?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[]; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------: | :----------------------: | :-------------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-padding-start)_ | 3 _(-moz-padding-start)_ | 3 _(-webkit-padding-start)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-start - */ - paddingInlineStart?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[]; - /** - * The **`padding-left`** CSS property sets the width of the padding area on the left side of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-left - */ - paddingLeft?: PaddingLeftProperty<TLength> | PaddingLeftProperty<TLength>[]; - /** - * The **`padding-right`** CSS property sets the width of the padding area on the right side of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-right - */ - paddingRight?: PaddingRightProperty<TLength> | PaddingRightProperty<TLength>[]; - /** - * The **`padding-top`** padding area on the top of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-top - */ - paddingTop?: PaddingTopProperty<TLength> | PaddingTopProperty<TLength>[]; - /** - * The **`page-break-after`** CSS property adjusts page breaks _after_ the current element. - * - * **Syntax**: `auto | always | avoid | left | right | recto | verso` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-after - */ - pageBreakAfter?: PageBreakAfterProperty | PageBreakAfterProperty[]; - /** - * The **`page-break-before`** CSS property adjusts page breaks _before_ the current element. - * - * **Syntax**: `auto | always | avoid | left | right | recto | verso` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-before - */ - pageBreakBefore?: PageBreakBeforeProperty | PageBreakBeforeProperty[]; - /** - * The **`page-break-inside`** CSS property adjusts page breaks _inside_ the current element. - * - * **Syntax**: `auto | avoid` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **19** | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-inside - */ - pageBreakInside?: PageBreakInsideProperty | PageBreakInsideProperty[]; - /** - * The **`paint-order`** CSS property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn. - * - * **Syntax**: `normal | [ fill || stroke || markers ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **35** | **60** | **8** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/paint-order - */ - paintOrder?: PaintOrderProperty | PaintOrderProperty[]; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/perspective - */ - perspective?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[]; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/perspective-origin - */ - perspectiveOrigin?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[]; - /** - * The `**place-content**` CSS property is a shorthand for `align-content` and `justify-content`. It can be used in any layout method which utilizes both of these alignment values. - * - * **Syntax**: `<'align-content'> <'justify-content'>?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-content - */ - placeContent?: PlaceContentProperty | PlaceContentProperty[]; - /** - * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of mouse events. - * - * **Syntax**: `auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **1** | **1.5** | **4** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/pointer-events - */ - pointerEvents?: PointerEventsProperty | PointerEventsProperty[]; - /** - * The **`position`** CSS property sets how an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements. - * - * **Syntax**: `static | relative | absolute | sticky | fixed` - * - * **Initial value**: `static` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/position - */ - position?: PositionProperty | PositionProperty[]; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----------------: | :------: | :----------: | :-: | - * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | - * | | 48 _(color-adjust)_ | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust - */ - printColorAdjust?: PrintColorAdjustProperty | PrintColorAdjustProperty[]; - /** - * The **`quotes`** CSS property sets how quotation marks appear. - * - * **Syntax**: `none | auto | [ <string> <string> ]+` - * - * **Initial value**: depends on user agent - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **11** | **1.5** | **9** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/quotes - */ - quotes?: QuotesProperty | QuotesProperty[]; - /** - * The **`resize`** CSS property sets whether an element is resizable, and if so, in which directions. - * - * **Syntax**: `none | both | horizontal | vertical | block | inline` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **1** | **4** | **3** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/resize - */ - resize?: ResizeProperty | ResizeProperty[]; - /** - * The **`right`** CSS property participates in specifying the horizontal position of a _positioned element_. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/right - */ - right?: RightProperty<TLength> | RightProperty<TLength>[]; - /** - * The **`rotate`** CSS property allows you to specify rotation transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <angle> | [ x | y | z | <number>{3} ] && <angle>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/rotate - */ - rotate?: RotateProperty | RotateProperty[]; - /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's grid rows. - * - * **Syntax**: `normal | <length-percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **47** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/row-gap - */ - rowGap?: RowGapProperty<TLength> | RowGapProperty<TLength>[]; - /** - * The `**ruby-align**` CSS property defines the distribution of the different ruby elements over the base. - * - * **Syntax**: `start | center | space-between | space-around` - * - * **Initial value**: `space-around` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **38** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/ruby-align - */ - rubyAlign?: RubyAlignProperty | RubyAlignProperty[]; - /** - * **Syntax**: `separate | collapse | auto` - * - * **Initial value**: `separate` - */ - rubyMerge?: RubyMergeProperty | RubyMergeProperty[]; - /** - * The `**ruby-position**` CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (`over`), under it (`under`), or between the characters, on their right side (`inter-character`). - * - * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` - * - * **Initial value**: `alternate` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :---: | :-: | - * | **84** | **38** | **7** _-x-_ | 12-79 | No | - * | 1 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/ruby-position - */ - rubyPosition?: RubyPositionProperty | RubyPositionProperty[]; - /** - * The **`scale`** CSS property allows you to specify scale transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <number>{1,3}` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scale - */ - scale?: ScaleProperty | ScaleProperty[]; - /** - * The **`scroll-behavior`** CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. - * - * **Syntax**: `auto | smooth` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **61** | **36** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-behavior - */ - scrollBehavior?: ScrollBehaviorProperty | ScrollBehaviorProperty[]; - /** - * The **`scroll-margin`** property is a shorthand property which sets all of the `scroll-margin` longhands, assigning values much like the `margin` property does for the `margin-*` longhands. - * - * **Syntax**: `<length>{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | **90** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - scrollMargin?: ScrollMarginProperty<TLength> | ScrollMarginProperty<TLength>[]; - /** - * The `scroll-margin-block` property is a shorthand property which sets the scroll-margin longhands in the block dimension. - * - * **Syntax**: `<length>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block - */ - scrollMarginBlock?: ScrollMarginBlockProperty<TLength> | ScrollMarginBlockProperty<TLength>[]; - /** - * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end - */ - scrollMarginBlockEnd?: ScrollMarginBlockEndProperty<TLength> | ScrollMarginBlockEndProperty<TLength>[]; - /** - * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start - */ - scrollMarginBlockStart?: ScrollMarginBlockStartProperty<TLength> | ScrollMarginBlockStartProperty<TLength>[]; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-bottom)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom - */ - scrollMarginBottom?: ScrollMarginBottomProperty<TLength> | ScrollMarginBottomProperty<TLength>[]; - /** - * The `scroll-margin-inline` property is a shorthand property which sets the scroll-margin longhands in the inline dimension. - * - * **Syntax**: `<length>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline - */ - scrollMarginInline?: ScrollMarginInlineProperty<TLength> | ScrollMarginInlineProperty<TLength>[]; - /** - * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end - */ - scrollMarginInlineEnd?: ScrollMarginInlineEndProperty<TLength> | ScrollMarginInlineEndProperty<TLength>[]; - /** - * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start - */ - scrollMarginInlineStart?: ScrollMarginInlineStartProperty<TLength> | ScrollMarginInlineStartProperty<TLength>[]; - /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-left)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left - */ - scrollMarginLeft?: ScrollMarginLeftProperty<TLength> | ScrollMarginLeftProperty<TLength>[]; - /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-right)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right - */ - scrollMarginRight?: ScrollMarginRightProperty<TLength> | ScrollMarginRightProperty<TLength>[]; - /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-top)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top - */ - scrollMarginTop?: ScrollMarginTopProperty<TLength> | ScrollMarginTopProperty<TLength>[]; - /** - * The scroll-padding property is a shorthand property which sets all of the scroll-padding longhands, assigning values much like the padding property does for the padding-\* longhands. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding - */ - scrollPadding?: ScrollPaddingProperty<TLength> | ScrollPaddingProperty<TLength>[]; - /** - * The `scroll-padding-block` property is a shorthand property which sets the scroll-padding longhands for the block dimension. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block - */ - scrollPaddingBlock?: ScrollPaddingBlockProperty<TLength> | ScrollPaddingBlockProperty<TLength>[]; - /** - * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end - */ - scrollPaddingBlockEnd?: ScrollPaddingBlockEndProperty<TLength> | ScrollPaddingBlockEndProperty<TLength>[]; - /** - * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start - */ - scrollPaddingBlockStart?: ScrollPaddingBlockStartProperty<TLength> | ScrollPaddingBlockStartProperty<TLength>[]; - /** - * The `scroll-padding-bottom` property defines offsets for the bottom of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom - */ - scrollPaddingBottom?: ScrollPaddingBottomProperty<TLength> | ScrollPaddingBottomProperty<TLength>[]; - /** - * The `scroll-padding-inline` property is a shorthand property which sets the scroll-padding longhands for the inline dimension. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline - */ - scrollPaddingInline?: ScrollPaddingInlineProperty<TLength> | ScrollPaddingInlineProperty<TLength>[]; - /** - * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end - */ - scrollPaddingInlineEnd?: ScrollPaddingInlineEndProperty<TLength> | ScrollPaddingInlineEndProperty<TLength>[]; - /** - * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start - */ - scrollPaddingInlineStart?: ScrollPaddingInlineStartProperty<TLength> | ScrollPaddingInlineStartProperty<TLength>[]; - /** - * The `scroll-padding-left` property defines offsets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left - */ - scrollPaddingLeft?: ScrollPaddingLeftProperty<TLength> | ScrollPaddingLeftProperty<TLength>[]; - /** - * The `scroll-padding-right` property defines offsets for the right of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right - */ - scrollPaddingRight?: ScrollPaddingRightProperty<TLength> | ScrollPaddingRightProperty<TLength>[]; - /** - * The `scroll-padding-top` property defines offsets for the top of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top - */ - scrollPaddingTop?: ScrollPaddingTopProperty<TLength> | ScrollPaddingTopProperty<TLength>[]; - /** - * The `scroll-snap-align` property specifies the box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. - * - * **Syntax**: `[ none | start | end | center ]{1,2}` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align - */ - scrollSnapAlign?: ScrollSnapAlignProperty | ScrollSnapAlignProperty[]; - /** - * The **`scroll-margin`** property is a shorthand property which sets all of the `scroll-margin` longhands, assigning values much like the `margin` property does for the `margin-*` longhands. - * - * **Syntax**: `<length>{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------: | :--: | :-: | - * | **69** | 68-90 | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin - */ - scrollSnapMargin?: ScrollMarginProperty<TLength> | ScrollMarginProperty<TLength>[]; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-bottom)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom - */ - scrollSnapMarginBottom?: ScrollMarginBottomProperty<TLength> | ScrollMarginBottomProperty<TLength>[]; - /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-left)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left - */ - scrollSnapMarginLeft?: ScrollMarginLeftProperty<TLength> | ScrollMarginLeftProperty<TLength>[]; - /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-right)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right - */ - scrollSnapMarginRight?: ScrollMarginRightProperty<TLength> | ScrollMarginRightProperty<TLength>[]; - /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-top)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top - */ - scrollSnapMarginTop?: ScrollMarginTopProperty<TLength> | ScrollMarginTopProperty<TLength>[]; - /** - * The **`scroll-snap-stop`** CSS property defines whether the scroll container is allowed to "pass over" possible snap positions. - * - * **Syntax**: `normal | always` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **75** | **103** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop - */ - scrollSnapStop?: ScrollSnapStopProperty | ScrollSnapStopProperty[]; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----------: | - * | **69** | 39-68 | **11** | **79** | **10** _-x-_ | - * | | | 9 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type - */ - scrollSnapType?: ScrollSnapTypeProperty | ScrollSnapTypeProperty[]; - /** - * The **`scrollbar-color`** CSS property sets the color of the scrollbar track and thumb. - * - * **Syntax**: `auto | <color>{2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **64** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-color - */ - scrollbarColor?: ScrollbarColorProperty | ScrollbarColorProperty[]; - /** - * The **`scrollbar-gutter`** CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed. - * - * **Syntax**: `auto | stable && both-edges?` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **94** | **97** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter - */ - scrollbarGutter?: ScrollbarGutterProperty | ScrollbarGutterProperty[]; - /** - * The `scrollbar-width` property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. - * - * **Syntax**: `auto | thin | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **64** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-width - */ - scrollbarWidth?: ScrollbarWidthProperty | ScrollbarWidthProperty[]; - /** - * The **`shape-image-threshold`** CSS property sets the alpha channel threshold used to extract the shape using an image as the value for `shape-outside`. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `0.0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold - */ - shapeImageThreshold?: ShapeImageThresholdProperty | ShapeImageThresholdProperty[]; - /** - * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-margin - */ - shapeMargin?: ShapeMarginProperty<TLength> | ShapeMarginProperty<TLength>[]; - /** - * The **`shape-outside`** CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap. By default, inline content wraps around its margin box; `shape-outside` provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. - * - * **Syntax**: `none | [ <shape-box> || <basic-shape> ] | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-outside - */ - shapeOutside?: ShapeOutsideProperty | ShapeOutsideProperty[]; - /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **21** | **91** | **7** | n/a | No | - * | | 4 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/tab-size - */ - tabSize?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[]; - /** - * The **`table-layout`** CSS property sets the algorithm used to lay out `<table>` cells, rows, and columns. - * - * **Syntax**: `auto | fixed` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **14** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/table-layout - */ - tableLayout?: TableLayoutProperty | TableLayoutProperty[]; - /** - * The **`text-align`** CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like `vertical-align` but in the horizontal direction. - * - * **Syntax**: `start | end | left | right | center | justify | match-parent` - * - * **Initial value**: `start`, or a nameless value that acts as `left` if _direction_ is `ltr`, `right` if _direction_ is `rtl` if `start` is not supported by the browser. - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-align - */ - textAlign?: TextAlignProperty | TextAlignProperty[]; - /** - * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. - * - * **Syntax**: `auto | start | end | left | right | center | justify` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **47** | **49** | **16** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-align-last - */ - textAlignLast?: TextAlignLastProperty | TextAlignLastProperty[]; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :-----: | :------------------------------: | :---: | :------------------------------------: | - * | **48** | **48** | **5.1** _(-webkit-text-combine)_ | 15-79 | **11** _(-ms-text-combine-horizontal)_ | - * | 9 _(-webkit-text-combine)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-combine-upright - */ - textCombineUpright?: TextCombineUprightProperty | TextCombineUprightProperty[]; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-color - */ - textDecorationColor?: TextDecorationColorProperty | TextDecorationColorProperty[]; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-line - */ - textDecorationLine?: TextDecorationLineProperty | TextDecorationLineProperty[]; - /** - * The **`text-decoration-skip`** CSS property sets what parts of an element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. - * - * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` - * - * **Initial value**: `objects` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | 57-64 | No | **12.1** | n/a | No | - * | | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip - */ - textDecorationSkip?: TextDecorationSkipProperty | TextDecorationSkipProperty[]; - /** - * The **`text-decoration-skip-ink`** CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. - * - * **Syntax**: `auto | all | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **64** | **70** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink - */ - textDecorationSkipInk?: TextDecorationSkipInkProperty | TextDecorationSkipInkProperty[]; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-style - */ - textDecorationStyle?: TextDecorationStyleProperty | TextDecorationStyleProperty[]; - /** - * The **`text-decoration-thickness`** CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline. - * - * **Syntax**: `auto | from-font | <length> | <percentage> ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **89** | **70** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness - */ - textDecorationThickness?: TextDecorationThicknessProperty<TLength> | TextDecorationThicknessProperty<TLength>[]; - /** - * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color - */ - textEmphasisColor?: TextEmphasisColorProperty | TextEmphasisColorProperty[]; - /** - * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. - * - * **Syntax**: `[ over | under ] && [ right | left ]` - * - * **Initial value**: `over right` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position - */ - textEmphasisPosition?: GlobalsString | GlobalsString[]; - /** - * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. - * - * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style - */ - textEmphasisStyle?: TextEmphasisStyleProperty | TextEmphasisStyleProperty[]; - /** - * The **`text-indent`** CSS property sets the length of empty space (indentation) that is put before lines of text in a block. - * - * **Syntax**: `<length-percentage> && hanging? && each-line?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-indent - */ - textIndent?: TextIndentProperty<TLength> | TextIndentProperty<TLength>[]; - /** - * The **`text-justify`** CSS property sets what type of justification should be applied to text when `text-align``: justify;` is set on an element. - * - * **Syntax**: `auto | inter-character | inter-word | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | n/a | **55** | No | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-justify - */ - textJustify?: TextJustifyProperty | TextJustifyProperty[]; - /** - * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. - * - * **Syntax**: `mixed | upright | sideways` - * - * **Initial value**: `mixed` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-------: | :--: | :-: | - * | **48** | **41** | **14** | n/a | No | - * | 11 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-orientation - */ - textOrientation?: TextOrientationProperty | TextOrientationProperty[]; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **7** | **1.3** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-overflow - */ - textOverflow?: TextOverflowProperty | TextOverflowProperty[]; - /** - * The **`text-rendering`** CSS property provides information to the rendering engine about what to optimize for when rendering text. - * - * **Syntax**: `auto | optimizeSpeed | optimizeLegibility | geometricPrecision` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **4** | **1** | **5** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-rendering - */ - textRendering?: TextRenderingProperty | TextRenderingProperty[]; - /** - * The **`text-shadow`** CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color. - * - * **Syntax**: `none | <shadow-t>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **2** | **3.5** | **1.1** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-shadow - */ - textShadow?: TextShadowProperty | TextShadowProperty[]; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **54** | No | No | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-size-adjust - */ - textSizeAdjust?: TextSizeAdjustProperty | TextSizeAdjustProperty[]; - /** - * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby - * - * **Syntax**: `none | capitalize | uppercase | lowercase | full-width | full-size-kana` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-transform - */ - textTransform?: TextTransformProperty | TextTransformProperty[]; - /** - * The **`text-underline-offset`** CSS property sets the offset distance of an underline text decoration line (applied using `text-decoration`) from its original position. - * - * **Syntax**: `auto | <length> | <percentage> ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **70** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-offset - */ - textUnderlineOffset?: TextUnderlineOffsetProperty<TLength> | TextUnderlineOffsetProperty<TLength>[]; - /** - * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. - * - * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :---: | - * | **33** | **74** | **12.1** | **12** | **6** | - * | | | 9 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-position - */ - textUnderlinePosition?: TextUnderlinePositionProperty | TextUnderlinePositionProperty[]; - /** - * The **`top`** CSS property participates in specifying the vertical position of a _positioned element_. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/top - */ - top?: TopProperty<TLength> | TopProperty<TLength>[]; - /** - * The **`touch-action`** CSS property sets how a region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). - * - * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :------: | - * | **36** | **52** | **13** | **12** | **11** | - * | | | | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/touch-action - */ - touchAction?: TouchActionProperty | TouchActionProperty[]; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | 9 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform - */ - transform?: TransformProperty | TransformProperty[]; - /** - * The **`transform-box`** CSS property defines the layout box to which the `transform` and `transform-origin` properties relate. - * - * **Syntax**: `content-box | border-box | fill-box | stroke-box | view-box` - * - * **Initial value**: `view-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **64** | **55** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-box - */ - transformBox?: TransformBoxProperty | TransformBoxProperty[]; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-------: | :-----: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 3.5 _-x-_ | 2 _-x-_ | | 9 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-origin - */ - transformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :-: | - * | **36** | **16** | **9** | **12** | No | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | + * | **36** | **16** | **9** | **12** | No | + * | 12 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transform-style */ - transformStyle?: TransformStyleProperty | TransformStyleProperty[]; + "transform-style"?: Property.TransformStyle | undefined; + /** + * The **`transition-behavior`** CSS property specifies whether transitions will be started for properties whose animation behavior is discrete. + * + * **Syntax**: `<transition-behavior-value>#` + * + * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **117** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/transition-behavior + */ + "transition-behavior"?: Property.TransitionBehavior | undefined; /** * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. * @@ -22172,11 +14082,11 @@ The scroll-padding properties define offsets for the optimal viewing region of * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-----: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 4 _-x-_ | | | + * | 1 _-x-_ | | 4 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition-delay */ - transitionDelay?: GlobalsString | GlobalsString[]; + "transition-delay"?: Property.TransitionDelay<TTime> | undefined; /** * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. * @@ -22187,11 +14097,11 @@ The scroll-padding properties define offsets for the optimal viewing region of * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-------: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition-duration */ - transitionDuration?: GlobalsString | GlobalsString[]; + "transition-duration"?: Property.TransitionDuration<TTime> | undefined; /** * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. * @@ -22202,11 +14112,11 @@ The scroll-padding properties define offsets for the optimal viewing region of * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-------: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition-property */ - transitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[]; + "transition-property"?: Property.TransitionProperty | undefined; /** * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. * @@ -22217,13 +14127,13 @@ The scroll-padding properties define offsets for the optimal viewing region of * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-------: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition-timing-function */ - transitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; + "transition-timing-function"?: Property.TransitionTimingFunction | undefined; /** - * The **`translate`** CSS property allows you to specify translation transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. + * The **`translate`** CSS property allows you to specify translation transforms individually and independently of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. * * **Syntax**: `none | <length-percentage> [ <length-percentage> <length>? ]?` * @@ -22235,7 +14145,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/translate */ - translate?: TranslateProperty<TLength> | TranslateProperty<TLength>[]; + translate?: Property.Translate<TLength> | undefined; /** * The **`unicode-bidi`** CSS property, together with the `direction` property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The `unicode-bidi` property overrides this algorithm and allows the developer to control the text embedding. * @@ -22249,9 +14159,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/unicode-bidi */ - unicodeBidi?: UnicodeBidiProperty | UnicodeBidiProperty[]; + "unicode-bidi"?: Property.UnicodeBidi | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `auto | text | none | contain | all` * @@ -22264,9 +14174,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/user-select */ - userSelect?: UserSelectProperty | UserSelectProperty[]; + "user-select"?: Property.UserSelect | undefined; /** - * The **`vertical-align`** CSS property sets vertical alignment of an inline or table-cell box. + * The **`vertical-align`** CSS property sets vertical alignment of an inline, inline-block or table-cell box. * * **Syntax**: `baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>` * @@ -22278,7 +14188,63 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/vertical-align */ - verticalAlign?: VerticalAlignProperty<TLength> | VerticalAlignProperty<TLength>[]; + "vertical-align"?: Property.VerticalAlign<TLength> | undefined; + /** + * The **`view-timeline-axis`** CSS property is used to specify the scrollbar direction that will be used to provide the timeline for a _named view progress timeline_ animation, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline-axis` is set on the subject. See CSS scroll-driven animations for more details. + * + * **Syntax**: `[ block | inline | x | y ]#` + * + * **Initial value**: `block` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-axis + */ + "view-timeline-axis"?: Property.ViewTimelineAxis | undefined; + /** + * The **`view-timeline-inset`** CSS property is used to specify one or two values representing an adjustment to the position of the scrollport (see Scroll container for more details) in which the subject element of a _named view progress timeline_ animation is deemed to be visible. Put another way, this allows you to specify start and/or end inset (or outset) values that offset the position of the timeline. + * + * **Syntax**: `[ [ auto | <length-percentage> ]{1,2} ]#` + * + * **Initial value**: `auto` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-inset + */ + "view-timeline-inset"?: Property.ViewTimelineInset<TLength> | undefined; + /** + * The **`view-timeline-name`** CSS property is used to define the name of a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. + * + * **Syntax**: `none | <dashed-ident>#` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline-name + */ + "view-timeline-name"?: Property.ViewTimelineName | undefined; + /** + * The **`view-transition-name`** CSS property provides the selected element with a distinct identifying name (a `<custom-ident>`) and causes it to participate in a separate view transition from the root view transition — or no view transition if the `none` value is specified. + * + * **Syntax**: `none | <custom-ident>` + * + * **Initial value**: `none` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **111** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-transition-name + */ + "view-transition-name"?: Property.ViewTransitionName | undefined; /** * The **`visibility`** CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`. * @@ -22292,11 +14258,11 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/visibility */ - visibility?: VisibilityProperty | VisibilityProperty[]; + visibility?: Property.Visibility | undefined; /** * The **`white-space`** CSS property sets how white space inside an element is handled. * - * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces` + * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces | [ <'white-space-collapse'> || <'text-wrap'> || <'white-space-trim'> ]` * * **Initial value**: `normal` * @@ -22306,7 +14272,27 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/white-space */ - whiteSpace?: WhiteSpaceProperty | WhiteSpaceProperty[]; + "white-space"?: Property.WhiteSpace | undefined; + /** + * The **`white-space-collapse`** CSS property controls how white space inside an element is collapsed. + * + * **Syntax**: `collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces` + * + * **Initial value**: `collapse` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **114** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/white-space-collapse + */ + "white-space-collapse"?: Property.WhiteSpaceCollapse | undefined; + /** + * **Syntax**: `none | discard-before || discard-after || discard-inner` + * + * **Initial value**: `none` + */ + "white-space-trim"?: Property.WhiteSpaceTrim | undefined; /** * The **`widows`** CSS property sets the minimum number of lines in a block container that must be shown at the _top_ of a page, region, or column. * @@ -22320,9 +14306,9 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/widows */ - widows?: GlobalsNumber | GlobalsNumber[]; + widows?: Property.Widows | undefined; /** - * The **`width`** CSS property sets an element's width. By default it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. + * The **`width`** CSS property sets an element's width. By default, it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. * * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` * @@ -22334,7 +14320,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/width */ - width?: WidthProperty<TLength> | WidthProperty<TLength>[]; + width?: Property.Width<TLength> | undefined; /** * The **`will-change`** CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is actually changed. These kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required. * @@ -22348,7 +14334,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/will-change */ - willChange?: WillChangeProperty | WillChangeProperty[]; + "will-change"?: Property.WillChange | undefined; /** * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. * @@ -22362,7 +14348,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/word-break */ - wordBreak?: WordBreakProperty | WordBreakProperty[]; + "word-break"?: Property.WordBreak | undefined; /** * The **`word-spacing`** CSS property sets the length of space between words and between tags. * @@ -22376,17 +14362,21 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/word-spacing */ - wordSpacing?: WordSpacingProperty<TLength> | WordSpacingProperty<TLength>[]; + "word-spacing"?: Property.WordSpacing<TLength> | undefined; /** - * The `**overflow-wrap**` CSS property sets whether the browser should insert line breaks within words to prevent text from overflowing its content box. + * The **`overflow-wrap`** CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box. * * **Syntax**: `normal | break-word` * * **Initial value**: `normal` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :-------: | :-----: | :-: | + * | **≤80** | **≤72** | **≤13.1** | **≤80** | No | */ - wordWrap?: WordWrapProperty | WordWrapProperty[]; + "word-wrap"?: Property.WordWrap | undefined; /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). * * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` * @@ -22399,7 +14389,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/writing-mode */ - writingMode?: WritingModeProperty | WritingModeProperty[]; + "writing-mode"?: Property.WritingMode | undefined; /** * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one. * @@ -22413,7 +14403,7 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/z-index */ - zIndex?: ZIndexProperty | ZIndexProperty[]; + "z-index"?: Property.ZIndex | undefined; /** * The non-standard **`zoom`** CSS property can be used to control the magnification level of an element. `transform: scale()` should be used instead of this property, if possible. However, unlike CSS Transforms, `zoom` affects the layout size of the element. * @@ -22423,16 +14413,16 @@ The scroll-padding properties define offsets for the optimal viewing region of * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :-----: | :----: | :-----: | - * | **1** | No | **3.1** | **12** | **5.5** | + * | **1** | n/a | **3.1** | **12** | **5.5** | * * @see https://developer.mozilla.org/docs/Web/CSS/zoom */ - zoom?: ZoomProperty | ZoomProperty[]; + zoom?: Property.Zoom | undefined; } -export interface StandardShorthandPropertiesFallback<TLength = string | 0> { +export interface StandardShorthandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { /** - * The `**all**` CSS shorthand property sets all of an element's properties (other than `unicode-bidi` and `direction`) to their initial or inherited values, or to the values specified in another stylesheet origin. + * The **`all`** shorthand CSS property resets all of an element's properties except `unicode-bidi`, `direction`, and CSS Custom Properties. It can set properties to their initial or inherited values, or to the values specified in another cascade layer or stylesheet origin. * * **Syntax**: `initial | inherit | unset | revert | revert-layer` * @@ -22444,9 +14434,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/all */ - all?: Globals | Globals[]; + all?: Property.All | undefined; /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. * * **Syntax**: `<single-animation>#` * @@ -22457,7 +14447,19 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/animation */ - animation?: AnimationProperty | AnimationProperty[]; + animation?: Property.Animation<TTime> | undefined; + /** + * The **`animation-range`** CSS shorthand property is used to set the start and end of an animation's attachment range along its timeline, i.e. where along the timeline an animation will start and end. + * + * **Syntax**: `[ <'animation-range-start'> <'animation-range-end'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | No | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/animation-range + */ + "animation-range"?: Property.AnimationRange<TLength> | undefined; /** * The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. * @@ -22469,7 +14471,7 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background */ - background?: BackgroundProperty<TLength> | BackgroundProperty<TLength>[]; + background?: Property.Background<TLength> | undefined; /** * The **`background-position`** CSS property sets the initial position for each background image. The position is relative to the position layer set by `background-origin`. * @@ -22483,9 +14485,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/background-position */ - backgroundPosition?: BackgroundPositionProperty<TLength> | BackgroundPositionProperty<TLength>[]; + "background-position"?: Property.BackgroundPosition<TLength> | undefined; /** - * The **`border`** CSS property sets an element's border. It's a shorthand for `border-width`, `border-style`, and `border-color`. + * The **`border`** shorthand CSS property sets an element's border. It sets the values of `border-width`, `border-style`, and `border-color`. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -22495,9 +14497,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border */ - border?: BorderProperty<TLength> | BorderProperty<TLength>[]; + border?: Property.Border<TLength> | undefined; /** - * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. + * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. * * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` * @@ -22507,7 +14509,7 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block */ - borderBlock?: BorderBlockProperty<TLength> | BorderBlockProperty<TLength>[]; + "border-block"?: Property.BorderBlock<TLength> | undefined; /** * The **`border-block-end`** CSS property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. * @@ -22519,7 +14521,7 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end */ - borderBlockEnd?: BorderBlockEndProperty<TLength> | BorderBlockEndProperty<TLength>[]; + "border-block-end"?: Property.BorderBlockEnd<TLength> | undefined; /** * The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. * @@ -22531,9 +14533,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start */ - borderBlockStart?: BorderBlockStartProperty<TLength> | BorderBlockStartProperty<TLength>[]; + "border-block-start"?: Property.BorderBlockStart<TLength> | undefined; /** - * The **`border-bottom`** CSS property is a shorthand that sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. These properties set an element's bottom border. + * The **`border-bottom`** shorthand CSS property sets an element's bottom border. It sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -22543,9 +14545,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom */ - borderBottom?: BorderBottomProperty<TLength> | BorderBottomProperty<TLength>[]; + "border-bottom"?: Property.BorderBottom<TLength> | undefined; /** - * The **`border-color`** shorthand CSS property sets the color of all sides of an element's border. + * The **`border-color`** shorthand CSS property sets the color of an element's border. * * **Syntax**: `<color>{1,4}` * @@ -22555,9 +14557,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-color */ - borderColor?: BorderColorProperty | BorderColorProperty[]; + "border-color"?: Property.BorderColor | undefined; /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. * * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` * @@ -22568,9 +14570,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-image */ - borderImage?: BorderImageProperty | BorderImageProperty[]; + "border-image"?: Property.BorderImage | undefined; /** - * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. + * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. * * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` * @@ -22580,7 +14582,7 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline */ - borderInline?: BorderInlineProperty<TLength> | BorderInlineProperty<TLength>[]; + "border-inline"?: Property.BorderInline<TLength> | undefined; /** * The **`border-inline-end`** CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. * @@ -22592,7 +14594,7 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end */ - borderInlineEnd?: BorderInlineEndProperty<TLength> | BorderInlineEndProperty<TLength>[]; + "border-inline-end"?: Property.BorderInlineEnd<TLength> | undefined; /** * The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. * @@ -22604,9 +14606,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start */ - borderInlineStart?: BorderInlineStartProperty<TLength> | BorderInlineStartProperty<TLength>[]; + "border-inline-start"?: Property.BorderInlineStart<TLength> | undefined; /** - * The **`border-left`** CSS property is a shorthand that sets the values of `border-left-width`, `border-left-style` and `border-left-color`. These properties set an element's left border. + * The **`border-left`** shorthand CSS property sets all the properties of an element's left border. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -22616,7 +14618,7 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-left */ - borderLeft?: BorderLeftProperty<TLength> | BorderLeftProperty<TLength>[]; + "border-left"?: Property.BorderLeft<TLength> | undefined; /** * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. * @@ -22629,9 +14631,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-radius */ - borderRadius?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[]; + "border-radius"?: Property.BorderRadius<TLength> | undefined; /** - * The **`border-right`** CSS property is a shorthand that sets the values of `border-right-width`, `border-right-style` and `border-right-color`. These properties set an element's right border. + * The **`border-right`** shorthand CSS property sets all the properties of an element's right border. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -22641,9 +14643,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-right */ - borderRight?: BorderRightProperty<TLength> | BorderRightProperty<TLength>[]; + "border-right"?: Property.BorderRight<TLength> | undefined; /** - * The **`border-style`** CSS property is a shorthand property that sets the line style for all four sides of an element's border. + * The **`border-style`** shorthand CSS property sets the line style for all four sides of an element's border. * * **Syntax**: `<line-style>{1,4}` * @@ -22653,9 +14655,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-style */ - borderStyle?: BorderStyleProperty | BorderStyleProperty[]; + "border-style"?: Property.BorderStyle | undefined; /** - * The **`border-top`** CSS property is a shorthand that sets the values of `border-top-width`, `border-top-style` and `border-top-color`. These properties set an element's top border. + * The **`border-top`** shorthand CSS property sets all the properties of an element's top border. * * **Syntax**: `<line-width> || <line-style> || <color>` * @@ -22665,9 +14667,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-top */ - borderTop?: BorderTopProperty<TLength> | BorderTopProperty<TLength>[]; + "border-top"?: Property.BorderTop<TLength> | undefined; /** - * The **`border-width`** shorthand CSS property sets the widths of all four sides of an element's border. + * The **`border-width`** shorthand CSS property sets the width of an element's border. * * **Syntax**: `<line-width>{1,4}` * @@ -22677,9 +14679,11 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/border-width */ - borderWidth?: BorderWidthProperty<TLength> | BorderWidthProperty<TLength>[]; + "border-width"?: Property.BorderWidth<TLength> | undefined; + /** **Syntax**: `<'caret-color'> || <'caret-shape'>` */ + caret?: Property.Caret | undefined; /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` * @@ -22690,9 +14694,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/column-rule */ - columnRule?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[]; + "column-rule"?: Property.ColumnRule<TLength> | undefined; /** - * The **`columns`** CSS property sets the column width and column count of an element. + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. * * **Syntax**: `<'column-width'> || <'column-count'>` * @@ -22703,9 +14707,33 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/columns */ - columns?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[]; + columns?: Property.Columns<TLength> | undefined; /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. + * The **`contain-intrinsic-size`** CSS shorthand property sets the size of an element that a browser will use for layout when the element is subject to size containment. + * + * **Syntax**: `[ auto? [ none | <length> ] ]{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **83** | **107** | **17** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/contain-intrinsic-size + */ + "contain-intrinsic-size"?: Property.ContainIntrinsicSize<TLength> | undefined; + /** + * The **container** shorthand CSS property establishes the element as a query container and specifies the name or name for the containment context used in a container query. + * + * **Syntax**: `<'container-name'> [ / <'container-type'> ]?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **105** | **110** | **16** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/container + */ + container?: Property.Container | undefined; + /** + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. * * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` * @@ -22716,9 +14744,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex */ - flex?: FlexProperty<TLength> | FlexProperty<TLength>[]; + flex?: Property.Flex<TLength> | undefined; /** - * The **`flex-flow`** CSS property is a shorthand property for `flex-direction` and `flex-wrap` properties. + * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. * * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` * @@ -22729,9 +14757,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/flex-flow */ - flexFlow?: FlexFlowProperty | FlexFlowProperty[]; + "flex-flow"?: Property.FlexFlow | undefined; /** - * The **`font`** CSS property is a shorthand for `font-style`, `font-variant`, `font-weight`, `font-size`, `line-height`, and `font-family`. Alternatively, it sets an element's font to a system font. + * The **`font`** CSS shorthand property sets all the different properties of an element's font. Alternatively, it sets an element's font to a system font. * * **Syntax**: `[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar` * @@ -22741,7 +14769,7 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/font */ - font?: FontProperty | FontProperty[]; + font?: Property.Font | undefined; /** * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. * @@ -22753,9 +14781,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/gap */ - gap?: GapProperty<TLength> | GapProperty<TLength>[]; + gap?: Property.Gap<TLength> | undefined; /** - * The **`grid`** CSS property is a shorthand property that sets all of the explicit grid properties (`grid-template-rows`, `grid-template-columns`, and `grid-template-areas`), and all the implicit grid properties (`grid-auto-rows`, `grid-auto-columns`, and `grid-auto-flow`), in a single declaration. + * The **`grid`** CSS property is a shorthand property that sets all of the explicit and implicit grid properties in a single declaration. * * **Syntax**: `<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>` * @@ -22765,9 +14793,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid */ - grid?: GridProperty | GridProperty[]; + grid?: Property.Grid | undefined; /** - * The **`grid-area`** CSS property is a shorthand property for `grid-row-start`, `grid-column-start`, `grid-row-end` and `grid-column-end`, specifying a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. + * The **`grid-area`** CSS shorthand property specifies a grid item's size and location within a grid by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. * * **Syntax**: `<grid-line> [ / <grid-line> ]{0,3}` * @@ -22777,9 +14805,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-area */ - gridArea?: GridAreaProperty | GridAreaProperty[]; + "grid-area"?: Property.GridArea | undefined; /** - * The **`grid-column`** CSS property is a shorthand property for `grid-column-start` and `grid-column-end` specifying a grid item's size and location within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. + * The **`grid-column`** CSS shorthand property specifies a grid item's size and location within a grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. * * **Syntax**: `<grid-line> [ / <grid-line> ]?` * @@ -22789,9 +14817,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-column */ - gridColumn?: GridColumnProperty | GridColumnProperty[]; + "grid-column"?: Property.GridColumn | undefined; /** - * The **`grid-row`** CSS property is a shorthand property for `grid-row-start` and `grid-row-end` specifying a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. + * The **`grid-row`** CSS shorthand property specifies a grid item's size and location within a grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. * * **Syntax**: `<grid-line> [ / <grid-line> ]?` * @@ -22801,9 +14829,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-row */ - gridRow?: GridRowProperty | GridRowProperty[]; + "grid-row"?: Property.GridRow | undefined; /** - * The **`grid-template`** CSS property is a shorthand property for defining grid columns, rows, and areas. + * The **`grid-template`** CSS property is a shorthand property for defining grid columns, grid rows, and grid areas. * * **Syntax**: `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?` * @@ -22813,15 +14841,51 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/grid-template */ - gridTemplate?: GridTemplateProperty | GridTemplateProperty[]; + "grid-template"?: Property.GridTemplate | undefined; + /** + * The **`inset`** CSS property is a shorthand that corresponds to the `top`, `right`, `bottom`, and/or `left` properties. It has the same multi-value syntax of the `margin` shorthand. + * + * **Syntax**: `<'top'>{1,4}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset + */ + inset?: Property.Inset<TLength> | undefined; + /** + * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-block + */ + "inset-block"?: Property.InsetBlock<TLength> | undefined; + /** + * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * + * **Syntax**: `<'top'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **63** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline + */ + "inset-inline"?: Property.InsetInline<TLength> | undefined; /** * **Syntax**: `none | <integer>` * * **Initial value**: `none` */ - lineClamp?: LineClampProperty | LineClampProperty[]; + "line-clamp"?: Property.LineClamp | undefined; /** - * The **`list-style`** CSS property is a shorthand to set list style properties `list-style-type`, `list-style-image`, and `list-style-position`. + * The **`list-style`** CSS shorthand property allows you to set all the list style properties at once. * * **Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>` * @@ -22831,9 +14895,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/list-style */ - listStyle?: ListStyleProperty | ListStyleProperty[]; + "list-style"?: Property.ListStyle | undefined; /** - * The **`margin`** CSS property sets the margin area on all four sides of an element. It is a shorthand for `margin-top`, `margin-right`, `margin-bottom`, and `margin-left`. + * The **`margin`** CSS shorthand property sets the margin area on all four sides of an element. * * **Syntax**: `[ <length> | <percentage> | auto ]{1,4}` * @@ -22843,33 +14907,59 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/margin */ - margin?: MarginProperty<TLength> | MarginProperty<TLength>[]; + margin?: Property.Margin<TLength> | undefined; /** - * The **`mask`** CSS property hides an element (partially or fully) by masking or clipping the image at specific points. + * The **`margin-block`** CSS shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-block + */ + "margin-block"?: Property.MarginBlock<TLength> | undefined; + /** + * The **`margin-inline`** CSS shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'margin-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline + */ + "margin-inline"?: Property.MarginInline<TLength> | undefined; + /** + * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. * * **Syntax**: `<mask-layer>#` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :---: | :-: | - * | **1** | **2** | **3.1** | 12-79 | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :-------: | :---: | :-: | + * | **1** | **53** | **15.4** | 12-79 | No | + * | | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask */ - mask?: MaskProperty<TLength> | MaskProperty<TLength>[]; + mask?: Property.Mask<TLength> | undefined; /** - * The **`mask-border`** CSS property lets you create a mask along the edge of an element's border. + * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. * * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :-----: | :--------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image)_ | No | **3.1** _(-webkit-mask-box-image)_ | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :------------------------------: | :-----: | :----------------------------: | :--: | :-: | + * | **1** _(-webkit-mask-box-image)_ | No | **17.2** | n/a | No | + * | | | 3.1 _(-webkit-mask-box-image)_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/mask-border */ - maskBorder?: MaskBorderProperty | MaskBorderProperty[]; + "mask-border"?: Property.MaskBorder | undefined; /** - * The **`offset`** CSS property is a shorthand property for animating an element along a defined path. + * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. * * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` * @@ -22880,9 +14970,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/offset */ - motion?: OffsetProperty<TLength> | OffsetProperty<TLength>[]; + motion?: Property.Offset<TLength> | undefined; /** - * The **`offset`** CSS property is a shorthand property for animating an element along a defined path. + * The **`offset`** CSS shorthand property sets all the properties required for animating an element along a defined path. * * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` * @@ -22893,21 +14983,21 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/offset */ - offset?: OffsetProperty<TLength> | OffsetProperty<TLength>[]; + offset?: Property.Offset<TLength> | undefined; /** - * The **`outline`** CSS property is a shorthand to set various outline properties in a single declaration: `outline-style`, `outline-width`, and `outline-color`. + * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. * * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :----: | :---: | + * | **94** | **88** | **16.4** | **94** | **8** | * * @see https://developer.mozilla.org/docs/Web/CSS/outline */ - outline?: OutlineProperty<TLength> | OutlineProperty<TLength>[]; + outline?: Property.Outline<TLength> | undefined; /** - * The **`overflow`** CSS property sets what to do when an element's content is too big to fit in its block formatting context. It is a shorthand for `overflow-x` and `overflow-y`. + * The **`overflow`** CSS shorthand property sets the desired behavior for an element's overflow — i.e. when an element's content is too big to fit in its block formatting context — in both directions. * * **Syntax**: `[ visible | hidden | clip | scroll | auto ]{1,2}` * @@ -22919,7 +15009,7 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overflow */ - overflow?: OverflowProperty | OverflowProperty[]; + overflow?: Property.Overflow | undefined; /** * The **`overscroll-behavior`** CSS property sets what a browser does when reaching the boundary of a scrolling area. It's a shorthand for `overscroll-behavior-x` and `overscroll-behavior-y`. * @@ -22933,9 +15023,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior */ - overscrollBehavior?: OverscrollBehaviorProperty | OverscrollBehaviorProperty[]; + "overscroll-behavior"?: Property.OverscrollBehavior | undefined; /** - * The **`padding`** CSS property sets the padding area on all four sides of an element. It is a shorthand for `padding-top`, `padding-right`, `padding-bottom`, and `padding-left`. + * The **`padding`** CSS shorthand property sets the padding area on all four sides of an element at once. * * **Syntax**: `[ <length> | <percentage> ]{1,4}` * @@ -22945,9 +15035,45 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/padding */ - padding?: PaddingProperty<TLength> | PaddingProperty<TLength>[]; + padding?: Property.Padding<TLength> | undefined; /** - * The CSS **`place-items`** shorthand property sets the `align-items` and `justify-items` properties, respectively. If the second value is not set, the first value is also used for it. + * The **`padding-block`** CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-block + */ + "padding-block"?: Property.PaddingBlock<TLength> | undefined; + /** + * The **`padding-inline`** CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. + * + * **Syntax**: `<'padding-left'>{1,2}` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :------: | :--: | :-: | + * | **87** | **66** | **14.1** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline + */ + "padding-inline"?: Property.PaddingInline<TLength> | undefined; + /** + * The **`place-content`** CSS shorthand property allows you to align content along both the block and inline directions at once (i.e. the `align-content` and `justify-content` properties) in a relevant layout system such as Grid or Flexbox. + * + * **Syntax**: `<'align-content'> <'justify-content'>?` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **59** | **45** | **9** | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/place-content + */ + "place-content"?: Property.PlaceContent | undefined; + /** + * The CSS **`place-items`** shorthand property allows you to align items along both the block and inline directions at once (i.e. the `align-items` and `justify-items` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not set, the first value is also used for it. * * **Syntax**: `<'align-items'> <'justify-items'>?` * @@ -22957,9 +15083,9 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/place-items */ - placeItems?: PlaceItemsProperty | PlaceItemsProperty[]; + "place-items"?: Property.PlaceItems | undefined; /** - * The **`place-self`** CSS property is a shorthand property sets both the `align-self` and `justify-self` properties. The first value is the `align-self` property value, the second the `justify-self` one. If the second value is not present, the first value is also used for it. + * The **`place-self`** CSS shorthand property allows you to align an individual item in both the block and inline directions at once (i.e. the `align-self` and `justify-self` properties) in a relevant layout system such as Grid or Flexbox. If the second value is not present, the first value is also used for it. * * **Syntax**: `<'align-self'> <'justify-self'>?` * @@ -22969,6936 +15095,12 @@ export interface StandardShorthandPropertiesFallback<TLength = string | 0> { * * @see https://developer.mozilla.org/docs/Web/CSS/place-self */ - placeSelf?: PlaceSelfProperty | PlaceSelfProperty[]; + "place-self"?: Property.PlaceSelf | undefined; /** - * The **`text-decoration`** CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, and `text-decoration-style`. - * - * **Syntax**: `<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration - */ - textDecoration?: TextDecorationProperty<TLength> | TextDecorationProperty<TLength>[]; - /** - * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. - * - * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis - */ - textEmphasis?: TextEmphasisProperty | TextEmphasisProperty[]; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition - */ - transition?: TransitionProperty | TransitionProperty[]; -} - -export interface StandardPropertiesFallback<TLength = string | 0> extends StandardLonghandPropertiesFallback<TLength>, StandardShorthandPropertiesFallback<TLength> {} - -export interface VendorLonghandPropertiesFallback<TLength = string | 0> { - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - MozAnimationDelay?: GlobalsString | GlobalsString[]; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - */ - MozAnimationDirection?: AnimationDirectionProperty | AnimationDirectionProperty[]; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - MozAnimationDuration?: GlobalsString | GlobalsString[]; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - */ - MozAnimationFillMode?: AnimationFillModeProperty | AnimationFillModeProperty[]; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - */ - MozAnimationIterationCount?: AnimationIterationCountProperty | AnimationIterationCountProperty[]; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - */ - MozAnimationName?: AnimationNameProperty | AnimationNameProperty[]; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - */ - MozAnimationPlayState?: AnimationPlayStateProperty | AnimationPlayStateProperty[]; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - MozAnimationTimingFunction?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[]; - /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. - * - * **Syntax**: `none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized` - * - * **Initial value**: `none` (but this value is overridden in the user agent CSS) - */ - MozAppearance?: MozAppearanceProperty | MozAppearanceProperty[]; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - */ - MozBackfaceVisibility?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[]; - /** - * In Mozilla applications like Firefox, the **`-moz-border-bottom-colors`** CSS property sets a list of colors for the bottom border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - MozBorderBottomColors?: MozBorderBottomColorsProperty | MozBorderBottomColorsProperty[]; - /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - */ - MozBorderEndColor?: BorderInlineEndColorProperty | BorderInlineEndColorProperty[]; - /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - */ - MozBorderEndStyle?: BorderInlineEndStyleProperty | BorderInlineEndStyleProperty[]; - /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - */ - MozBorderEndWidth?: BorderInlineEndWidthProperty<TLength> | BorderInlineEndWidthProperty<TLength>[]; - /** - * In Mozilla applications like Firefox, the **`-moz-border-left-colors`** CSS property sets a list of colors for the left border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - MozBorderLeftColors?: MozBorderLeftColorsProperty | MozBorderLeftColorsProperty[]; - /** - * In Mozilla applications like Firefox, the **`-moz-border-right-colors`** CSS property sets a list of colors for the right border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - MozBorderRightColors?: MozBorderRightColorsProperty | MozBorderRightColorsProperty[]; - /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - */ - MozBorderStartColor?: BorderInlineStartColorProperty | BorderInlineStartColorProperty[]; - /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - */ - MozBorderStartStyle?: BorderInlineStartStyleProperty | BorderInlineStartStyleProperty[]; - /** - * In Mozilla applications like Firefox, the **`-moz-border-top-colors`** CSS property sets a list of colors for the top border. - * - * **Syntax**: `<color>+ | none` - * - * **Initial value**: `none` - */ - MozBorderTopColors?: MozBorderTopColorsProperty | MozBorderTopColorsProperty[]; - /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - */ - MozBoxSizing?: BoxSizingProperty | BoxSizingProperty[]; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - */ - MozColumnCount?: ColumnCountProperty | ColumnCountProperty[]; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - */ - MozColumnFill?: ColumnFillProperty | ColumnFillProperty[]; - /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - MozColumnRuleColor?: ColumnRuleColorProperty | ColumnRuleColorProperty[]; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - MozColumnRuleStyle?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[]; - /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - MozColumnRuleWidth?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[]; - /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - */ - MozColumnWidth?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[]; - /** - * If you reference an SVG image in a webpage (such as with the `<img>` element or as a background image), the SVG image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element. To do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the **`-moz-context-properties`** property, and the image needs to opt in to using those properties by using values such as the `context-fill` value. - * - * **Syntax**: `none | [ fill | fill-opacity | stroke | stroke-opacity ]#` - * - * **Initial value**: `none` - */ - MozContextProperties?: MozContextPropertiesProperty | MozContextPropertiesProperty[]; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - */ - MozFontFeatureSettings?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[]; - /** - * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. - * - * **Syntax**: `normal | <string>` - * - * **Initial value**: `normal` - */ - MozFontLanguageOverride?: FontLanguageOverrideProperty | FontLanguageOverrideProperty[]; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - MozHyphens?: HyphensProperty | HyphensProperty[]; - /** - * For certain XUL elements and pseudo-elements that use an image from the `list-style-image` property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. - * - * **Syntax**: `<shape> | auto` - * - * **Initial value**: `auto` - */ - MozImageRegion?: MozImageRegionProperty | MozImageRegionProperty[]; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - MozMarginEnd?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[]; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - MozMarginStart?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[]; - /** - * The **`-moz-orient`** CSS property specifies the orientation of the element to which it's applied. - * - * **Syntax**: `inline | block | horizontal | vertical` - * - * **Initial value**: `inline` - */ - MozOrient?: MozOrientProperty | MozOrientProperty[]; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - */ - MozOsxFontSmoothing?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[]; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - MozPaddingEnd?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[]; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - MozPaddingStart?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[]; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - */ - MozPerspective?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[]; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - */ - MozPerspectiveOrigin?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[]; - /** - * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `stack` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. - * - * **Syntax**: `ignore | stretch-to-fit` - * - * **Initial value**: `stretch-to-fit` - */ - MozStackSizing?: MozStackSizingProperty | MozStackSizingProperty[]; - /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - */ - MozTabSize?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[]; - /** - * The **`-moz-text-blink`** non-standard Mozilla CSS extension specifies the blink mode. - * - * **Syntax**: `none | blink` - * - * **Initial value**: `none` - */ - MozTextBlink?: MozTextBlinkProperty | MozTextBlinkProperty[]; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - */ - MozTextSizeAdjust?: TextSizeAdjustProperty | TextSizeAdjustProperty[]; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - MozTransformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - */ - MozTransformStyle?: TransformStyleProperty | TransformStyleProperty[]; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - MozTransitionDelay?: GlobalsString | GlobalsString[]; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - MozTransitionDuration?: GlobalsString | GlobalsString[]; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - MozTransitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[]; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - MozTransitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; - /** - * The **`-moz-user-focus`** CSS property is used to indicate whether an element can have the focus. - * - * **Syntax**: `ignore | normal | select-after | select-before | select-menu | select-same | select-all | none` - * - * **Initial value**: `none` - */ - MozUserFocus?: MozUserFocusProperty | MozUserFocusProperty[]; - /** - * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. - * - * **Syntax**: `read-only | read-write | write-only` - * - * **Initial value**: `read-only` - */ - MozUserModify?: MozUserModifyProperty | MozUserModifyProperty[]; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - */ - MozUserSelect?: UserSelectProperty | UserSelectProperty[]; - /** - * The **`-moz-window-dragging`** CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X. - * - * **Syntax**: `drag | no-drag` - * - * **Initial value**: `drag` - */ - MozWindowDragging?: MozWindowDraggingProperty | MozWindowDraggingProperty[]; - /** - * The **`-moz-window-shadow`** CSS property specifies whether a window will have a shadow. It only works on Mac OS X. - * - * **Syntax**: `default | menu | tooltip | sheet | none` - * - * **Initial value**: `default` - */ - MozWindowShadow?: MozWindowShadowProperty | MozWindowShadowProperty[]; - /** - * The **`-ms-accelerator`** CSS property is a Microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut. - * - * **Syntax**: `false | true` - * - * **Initial value**: `false` - */ - msAccelerator?: MsAcceleratorProperty | MsAcceleratorProperty[]; - /** - * The **`-ms-block-progression`** CSS property is a Microsoft extension that specifies the block progression and layout orientation. - * - * **Syntax**: `tb | rl | bt | lr` - * - * **Initial value**: `tb` - */ - msBlockProgression?: MsBlockProgressionProperty | MsBlockProgressionProperty[]; - /** - * The **`-ms-content-zoom-chaining`** CSS property is a Microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation. - * - * **Syntax**: `none | chained` - * - * **Initial value**: `none` - */ - msContentZoomChaining?: MsContentZoomChainingProperty | MsContentZoomChainingProperty[]; - /** - * The **`-ms-content-zoom-limit-max`** CSS property is a Microsoft extension that specifies the selected elements' maximum zoom factor. - * - * **Syntax**: `<percentage>` - * - * **Initial value**: `400%` - */ - msContentZoomLimitMax?: GlobalsString | GlobalsString[]; - /** - * The **`-ms-content-zoom-limit-min`** CSS property is a Microsoft extension that specifies the minimum zoom factor. - * - * **Syntax**: `<percentage>` - * - * **Initial value**: `100%` - */ - msContentZoomLimitMin?: GlobalsString | GlobalsString[]; - /** - * The **`-ms-content-zoom-snap-points`** CSS property is a Microsoft extension that specifies where zoom snap-points are located. - * - * **Syntax**: `snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )` - * - * **Initial value**: `snapInterval(0%, 100%)` - */ - msContentZoomSnapPoints?: GlobalsString | GlobalsString[]; - /** - * The **`-ms-content-zoom-snap-type`** CSS property is a Microsoft extension that specifies how zooming is affected by defined snap-points. - * - * **Syntax**: `none | proximity | mandatory` - * - * **Initial value**: `none` - */ - msContentZoomSnapType?: MsContentZoomSnapTypeProperty | MsContentZoomSnapTypeProperty[]; - /** - * The **`-ms-content-zooming`** CSS property is a Microsoft extension that specifies whether zooming is enabled. - * - * **Syntax**: `none | zoom` - * - * **Initial value**: zoom for the top level element, none for all other elements - */ - msContentZooming?: MsContentZoomingProperty | MsContentZoomingProperty[]; - /** - * The `-ms-filter` CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. - * - * **Syntax**: `<string>` - * - * **Initial value**: "" (the empty string) - */ - msFilter?: GlobalsString | GlobalsString[]; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - */ - msFlexDirection?: FlexDirectionProperty | FlexDirectionProperty[]; - /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - */ - msFlexPositive?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`-ms-flow-from`** CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. - * - * **Syntax**: `[ none | <custom-ident> ]#` - * - * **Initial value**: `none` - */ - msFlowFrom?: MsFlowFromProperty | MsFlowFromProperty[]; - /** - * The **`-ms-flow-into`** CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. - * - * **Syntax**: `[ none | <custom-ident> ]#` - * - * **Initial value**: `none` - */ - msFlowInto?: MsFlowIntoProperty | MsFlowIntoProperty[]; - /** - * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. - * - * **Syntax**: `none | <track-list> | <auto-track-list>` - * - * **Initial value**: `none` - */ - msGridColumns?: MsGridColumnsProperty<TLength> | MsGridColumnsProperty<TLength>[]; - /** - * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. - * - * **Syntax**: `none | <track-list> | <auto-track-list>` - * - * **Initial value**: `none` - */ - msGridRows?: MsGridRowsProperty<TLength> | MsGridRowsProperty<TLength>[]; - /** - * The **`-ms-high-contrast-adjust`** CSS property is a Microsoft extension that gets or sets a value indicating whether to override any CSS properties that would have been set in high contrast mode. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - */ - msHighContrastAdjust?: MsHighContrastAdjustProperty | MsHighContrastAdjustProperty[]; - /** - * The **`-ms-hyphenate-limit-chars`** CSS property is a Microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word. If the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated. - * - * **Syntax**: `auto | <integer>{1,3}` - * - * **Initial value**: `auto` - */ - msHyphenateLimitChars?: MsHyphenateLimitCharsProperty | MsHyphenateLimitCharsProperty[]; - /** - * The **`-ms-hyphenate-limit-lines`** CSS property is a Microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word. - * - * **Syntax**: `no-limit | <integer>` - * - * **Initial value**: `no-limit` - */ - msHyphenateLimitLines?: MsHyphenateLimitLinesProperty | MsHyphenateLimitLinesProperty[]; - /** - * The `**-ms-hyphenate-limit-zone**` CSS property is a Microsoft extension specifying the width of the hyphenation zone. - * - * **Syntax**: `<percentage> | <length>` - * - * **Initial value**: `0` - */ - msHyphenateLimitZone?: MsHyphenateLimitZoneProperty<TLength> | MsHyphenateLimitZoneProperty<TLength>[]; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - msHyphens?: HyphensProperty | HyphensProperty[]; - /** - * The **`-ms-ime-align`** CSS property is a Microsoft extension aligning the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active. The extension is implemented in Microsoft Edge and Internet Explorer 11. - * - * **Syntax**: `auto | after` - * - * **Initial value**: `auto` - */ - msImeAlign?: MsImeAlignProperty | MsImeAlignProperty[]; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - */ - msLineBreak?: LineBreakProperty | LineBreakProperty[]; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - */ - msOrder?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`-ms-overflow-style`** CSS property is a Microsoft extension controlling the behavior of scrollbars when the content of an element overflows. - * - * **Syntax**: `auto | none | scrollbar | -ms-autohiding-scrollbar` - * - * **Initial value**: `auto` - */ - msOverflowStyle?: MsOverflowStyleProperty | MsOverflowStyleProperty[]; - /** - * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - */ - msOverflowX?: OverflowXProperty | OverflowXProperty[]; - /** - * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - */ - msOverflowY?: OverflowYProperty | OverflowYProperty[]; - /** - * The `**-ms-scroll-chaining**` CSS property is a Microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation. - * - * **Syntax**: `chained | none` - * - * **Initial value**: `chained` - */ - msScrollChaining?: MsScrollChainingProperty | MsScrollChainingProperty[]; - /** - * The `**-ms-scroll-limit-x-max**` CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollLeft` property. - * - * **Syntax**: `auto | <length>` - * - * **Initial value**: `auto` - */ - msScrollLimitXMax?: MsScrollLimitXMaxProperty<TLength> | MsScrollLimitXMaxProperty<TLength>[]; - /** - * The **`-ms-scroll-limit-x-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollLeft` property. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - msScrollLimitXMin?: MsScrollLimitXMinProperty<TLength> | MsScrollLimitXMinProperty<TLength>[]; - /** - * The **`-ms-scroll-limit-y-max`** CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollTop` property. - * - * **Syntax**: `auto | <length>` - * - * **Initial value**: `auto` - */ - msScrollLimitYMax?: MsScrollLimitYMaxProperty<TLength> | MsScrollLimitYMaxProperty<TLength>[]; - /** - * The **`-ms-scroll-limit-y-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollTop` property. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - msScrollLimitYMin?: MsScrollLimitYMinProperty<TLength> | MsScrollLimitYMinProperty<TLength>[]; - /** - * The **`-ms-scroll-rails`** CSS property is a Microsoft extension that specifies whether scrolling locks to the primary axis of motion. - * - * **Syntax**: `none | railed` - * - * **Initial value**: `railed` - */ - msScrollRails?: MsScrollRailsProperty | MsScrollRailsProperty[]; - /** - * The **`-ms-scroll-snap-points-x`** CSS property is a Microsoft extension that specifies where snap-points will be located along the x-axis. - * - * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` - * - * **Initial value**: `snapInterval(0px, 100%)` - */ - msScrollSnapPointsX?: GlobalsString | GlobalsString[]; - /** - * The **`-ms-scroll-snap-points-y`** CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis. - * - * **Syntax**: `snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )` - * - * **Initial value**: `snapInterval(0px, 100%)` - */ - msScrollSnapPointsY?: GlobalsString | GlobalsString[]; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | proximity | mandatory` - * - * **Initial value**: `none` - */ - msScrollSnapType?: MsScrollSnapTypeProperty | MsScrollSnapTypeProperty[]; - /** - * The **`-ms-scroll-translation`** CSS property is a Microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element. - * - * **Syntax**: `none | vertical-to-horizontal` - * - * **Initial value**: `none` - */ - msScrollTranslation?: MsScrollTranslationProperty | MsScrollTranslationProperty[]; - /** - * The **`-ms-scrollbar-3dlight-color`** CSS property is a Microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: depends on user agent - */ - msScrollbar3dlightColor?: MsScrollbar3dlightColorProperty | MsScrollbar3dlightColorProperty[]; - /** - * The **`-ms-scrollbar-arrow-color`** CSS property is a Microsoft extension that specifies the color of the arrow elements of a scroll arrow. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ButtonText` - */ - msScrollbarArrowColor?: MsScrollbarArrowColorProperty | MsScrollbarArrowColorProperty[]; - /** - * The `**-ms-scrollbar-base-color**` CSS property is a Microsoft extension that specifies the base color of the main elements of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: depends on user agent - */ - msScrollbarBaseColor?: MsScrollbarBaseColorProperty | MsScrollbarBaseColorProperty[]; - /** - * The **`-ms-scrollbar-darkshadow-color`** CSS property is a Microsoft extension that specifies the color of a scroll bar's gutter. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDDarkShadow` - */ - msScrollbarDarkshadowColor?: MsScrollbarDarkshadowColorProperty | MsScrollbarDarkshadowColorProperty[]; - /** - * The `**-ms-scrollbar-face-color**` CSS property is a Microsoft extension that specifies the color of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDFace` - */ - msScrollbarFaceColor?: MsScrollbarFaceColorProperty | MsScrollbarFaceColorProperty[]; - /** - * The `**-ms-scrollbar-highlight-color**` CSS property is a Microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDHighlight` - */ - msScrollbarHighlightColor?: MsScrollbarHighlightColorProperty | MsScrollbarHighlightColorProperty[]; - /** - * The **`-ms-scrollbar-shadow-color`** CSS property is a Microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `ThreeDDarkShadow` - */ - msScrollbarShadowColor?: MsScrollbarShadowColorProperty | MsScrollbarShadowColorProperty[]; - /** - * The **`-ms-scrollbar-track-color`** CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar. - * - * **Syntax**: `<color>` - * - * **Initial value**: `Scrollbar` - */ - msScrollbarTrackColor?: MsScrollbarTrackColorProperty | MsScrollbarTrackColorProperty[]; - /** - * The **`-ms-text-autospace`** CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text. - * - * **Syntax**: `none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space` - * - * **Initial value**: `none` - */ - msTextAutospace?: MsTextAutospaceProperty | MsTextAutospaceProperty[]; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - */ - msTextCombineHorizontal?: TextCombineUprightProperty | TextCombineUprightProperty[]; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - */ - msTextOverflow?: TextOverflowProperty | TextOverflowProperty[]; - /** - * The **`touch-action`** CSS property sets how a region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). - * - * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` - * - * **Initial value**: `auto` - */ - msTouchAction?: TouchActionProperty | TouchActionProperty[]; - /** - * The **`-ms-touch-select`** CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. - * - * **Syntax**: `grippers | none` - * - * **Initial value**: `grippers` - */ - msTouchSelect?: MsTouchSelectProperty | MsTouchSelectProperty[]; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - */ - msTransform?: TransformProperty | TransformProperty[]; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - msTransformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - msTransitionDelay?: GlobalsString | GlobalsString[]; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - msTransitionDuration?: GlobalsString | GlobalsString[]; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - msTransitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[]; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - msTransitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `none | element | text` - * - * **Initial value**: `text` - */ - msUserSelect?: MsUserSelectProperty | MsUserSelectProperty[]; - /** - * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. - * - * **Syntax**: `normal | break-all | keep-all | break-word` - * - * **Initial value**: `normal` - */ - msWordBreak?: WordBreakProperty | WordBreakProperty[]; - /** - * The **`-ms-wrap-flow`** CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements. - * - * **Syntax**: `auto | both | start | end | maximum | clear` - * - * **Initial value**: `auto` - */ - msWrapFlow?: MsWrapFlowProperty | MsWrapFlowProperty[]; - /** - * The **`-ms-wrap-margin`** CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - msWrapMargin?: MsWrapMarginProperty<TLength> | MsWrapMarginProperty<TLength>[]; - /** - * The **`-ms-wrap-through`** CSS property is a Microsoft extension that specifies how content should wrap around an exclusion element. - * - * **Syntax**: `wrap | none` - * - * **Initial value**: `wrap` - */ - msWrapThrough?: MsWrapThroughProperty | MsWrapThroughProperty[]; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - */ - msWritingMode?: WritingModeProperty | WritingModeProperty[]; - /** - * The CSS **`align-content`** property sets how the browser distributes space between and around content items along the cross-axis of a flexbox container, and the main-axis of a grid container. - * - * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` - * - * **Initial value**: `normal` - */ - WebkitAlignContent?: AlignContentProperty | AlignContentProperty[]; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. The align-self property sets the alignment of an item within its containing block. In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` - * - * **Initial value**: `normal` - */ - WebkitAlignItems?: AlignItemsProperty | AlignItemsProperty[]; - /** - * The **`align-self`** CSS property aligns flex items of the current flex line overriding the `align-items` value. If any of the item's cross-axis margin is set to `auto`, then `align-self` is ignored. In Grid layout `align-self` aligns the item inside the grid area. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` - * - * **Initial value**: `auto` - */ - WebkitAlignSelf?: AlignSelfProperty | AlignSelfProperty[]; - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - WebkitAnimationDelay?: GlobalsString | GlobalsString[]; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - */ - WebkitAnimationDirection?: AnimationDirectionProperty | AnimationDirectionProperty[]; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - WebkitAnimationDuration?: GlobalsString | GlobalsString[]; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - */ - WebkitAnimationFillMode?: AnimationFillModeProperty | AnimationFillModeProperty[]; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - */ - WebkitAnimationIterationCount?: AnimationIterationCountProperty | AnimationIterationCountProperty[]; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - */ - WebkitAnimationName?: AnimationNameProperty | AnimationNameProperty[]; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - */ - WebkitAnimationPlayState?: AnimationPlayStateProperty | AnimationPlayStateProperty[]; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - WebkitAnimationTimingFunction?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[]; - /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. - * - * **Syntax**: `none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button` - * - * **Initial value**: `none` (but this value is overridden in the user agent CSS) - */ - WebkitAppearance?: WebkitAppearanceProperty | WebkitAppearanceProperty[]; - /** - * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - */ - WebkitBackdropFilter?: BackdropFilterProperty | BackdropFilterProperty[]; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - */ - WebkitBackfaceVisibility?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[]; - /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - */ - WebkitBackgroundClip?: BackgroundClipProperty | BackgroundClipProperty[]; - /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - */ - WebkitBackgroundOrigin?: BackgroundOriginProperty | BackgroundOriginProperty[]; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - */ - WebkitBackgroundSize?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[]; - /** - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitBorderBeforeColor?: WebkitBorderBeforeColorProperty | WebkitBorderBeforeColorProperty[]; - /** - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - WebkitBorderBeforeStyle?: WebkitBorderBeforeStyleProperty | WebkitBorderBeforeStyleProperty[]; - /** - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - WebkitBorderBeforeWidth?: WebkitBorderBeforeWidthProperty<TLength> | WebkitBorderBeforeWidthProperty<TLength>[]; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - WebkitBorderBottomLeftRadius?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[]; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - WebkitBorderBottomRightRadius?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[]; - /** - * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. - * - * **Syntax**: `<number-percentage>{1,4} && fill?` - * - * **Initial value**: `100%` - */ - WebkitBorderImageSlice?: BorderImageSliceProperty | BorderImageSliceProperty[]; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - WebkitBorderTopLeftRadius?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[]; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - */ - WebkitBorderTopRightRadius?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[]; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - */ - WebkitBoxDecorationBreak?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[]; - /** - * The **`-webkit-box-reflect`** CSS property lets you reflect the content of an element in one specific direction. - * - * **Syntax**: `[ above | below | right | left ]? <length>? <image>?` - * - * **Initial value**: `none` - */ - WebkitBoxReflect?: WebkitBoxReflectProperty<TLength> | WebkitBoxReflectProperty<TLength>[]; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - */ - WebkitBoxShadow?: BoxShadowProperty | BoxShadowProperty[]; - /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - */ - WebkitBoxSizing?: BoxSizingProperty | BoxSizingProperty[]; - /** - * The `**clip-path**` CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. - * - * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` - * - * **Initial value**: `none` - */ - WebkitClipPath?: ClipPathProperty | ClipPathProperty[]; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - */ - WebkitColumnCount?: ColumnCountProperty | ColumnCountProperty[]; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - */ - WebkitColumnFill?: ColumnFillProperty | ColumnFillProperty[]; - /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitColumnRuleColor?: ColumnRuleColorProperty | ColumnRuleColorProperty[]; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - */ - WebkitColumnRuleStyle?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[]; - /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - */ - WebkitColumnRuleWidth?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[]; - /** - * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. - * - * **Syntax**: `none | all` - * - * **Initial value**: `none` - */ - WebkitColumnSpan?: ColumnSpanProperty | ColumnSpanProperty[]; - /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - */ - WebkitColumnWidth?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[]; - /** - * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - */ - WebkitFilter?: FilterProperty | FilterProperty[]; - /** - * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. - * - * **Syntax**: `content | <'width'>` - * - * **Initial value**: `auto` - */ - WebkitFlexBasis?: FlexBasisProperty<TLength> | FlexBasisProperty<TLength>[]; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - */ - WebkitFlexDirection?: FlexDirectionProperty | FlexDirectionProperty[]; - /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - */ - WebkitFlexGrow?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. - * - * **Syntax**: `<number>` - * - * **Initial value**: `1` - */ - WebkitFlexShrink?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. - * - * **Syntax**: `nowrap | wrap | wrap-reverse` - * - * **Initial value**: `nowrap` - */ - WebkitFlexWrap?: FlexWrapProperty | FlexWrapProperty[]; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - */ - WebkitFontFeatureSettings?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[]; - /** - * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. - * - * **Syntax**: `auto | normal | none` - * - * **Initial value**: `auto` - */ - WebkitFontKerning?: FontKerningProperty | FontKerningProperty[]; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - */ - WebkitFontSmoothing?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[]; - /** - * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` - * - * **Initial value**: `normal` - */ - WebkitFontVariantLigatures?: FontVariantLigaturesProperty | FontVariantLigaturesProperty[]; - /** - * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. - * - * **Syntax**: `auto | <string>` - * - * **Initial value**: `auto` - */ - WebkitHyphenateCharacter?: HyphenateCharacterProperty | HyphenateCharacterProperty[]; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - */ - WebkitHyphens?: HyphensProperty | HyphensProperty[]; - /** - * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. - * - * **Syntax**: `normal | [ <number> <integer>? ]` - * - * **Initial value**: `normal` - */ - WebkitInitialLetter?: InitialLetterProperty | InitialLetterProperty[]; - /** - * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. - * - * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` - * - * **Initial value**: `normal` - */ - WebkitJustifyContent?: JustifyContentProperty | JustifyContentProperty[]; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - */ - WebkitLineBreak?: LineBreakProperty | LineBreakProperty[]; - /** - * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block container to the specified number of lines. - * - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - WebkitLineClamp?: WebkitLineClampProperty | WebkitLineClampProperty[]; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - WebkitMarginEnd?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[]; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - */ - WebkitMarginStart?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[]; - /** - * If a `-webkit-mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. - * - * **Syntax**: `<attachment>#` - * - * **Initial value**: `scroll` - */ - WebkitMaskAttachment?: WebkitMaskAttachmentProperty | WebkitMaskAttachmentProperty[]; - /** - * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - */ - WebkitMaskBoxImageOutset?: MaskBorderOutsetProperty<TLength> | MaskBorderOutsetProperty<TLength>[]; - /** - * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - */ - WebkitMaskBoxImageRepeat?: MaskBorderRepeatProperty | MaskBorderRepeatProperty[]; - /** - * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. - * - * **Syntax**: `<number-percentage>{1,4} fill?` - * - * **Initial value**: `0` - */ - WebkitMaskBoxImageSlice?: MaskBorderSliceProperty | MaskBorderSliceProperty[]; - /** - * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - */ - WebkitMaskBoxImageSource?: MaskBorderSourceProperty | MaskBorderSourceProperty[]; - /** - * The **`mask-border-width`** CSS property sets the width of an element's mask border. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `auto` - */ - WebkitMaskBoxImageWidth?: MaskBorderWidthProperty<TLength> | MaskBorderWidthProperty<TLength>[]; - /** - * The **`mask-clip`** CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area. - * - * **Syntax**: `[ <box> | border | padding | content | text ]#` - * - * **Initial value**: `border` - */ - WebkitMaskClip?: WebkitMaskClipProperty | WebkitMaskClipProperty[]; - /** - * The **`-webkit-mask-composite`** property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the `-webkit-mask-image` property. - * - * **Syntax**: `<composite-style>#` - * - * **Initial value**: `source-over` - */ - WebkitMaskComposite?: WebkitMaskCompositeProperty | WebkitMaskCompositeProperty[]; - /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. - * - * **Syntax**: `<mask-reference>#` - * - * **Initial value**: `none` - */ - WebkitMaskImage?: WebkitMaskImageProperty | WebkitMaskImageProperty[]; - /** - * The **`mask-origin`** CSS property sets the origin of a mask. - * - * **Syntax**: `[ <box> | border | padding | content ]#` - * - * **Initial value**: `padding` - */ - WebkitMaskOrigin?: WebkitMaskOriginProperty | WebkitMaskOriginProperty[]; - /** - * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. - * - * **Syntax**: `<position>#` - * - * **Initial value**: `0% 0%` - */ - WebkitMaskPosition?: WebkitMaskPositionProperty<TLength> | WebkitMaskPositionProperty<TLength>[]; - /** - * The `-webkit-mask-position-x` CSS property sets the initial horizontal position of a mask image. - * - * **Syntax**: `[ <length-percentage> | left | center | right ]#` - * - * **Initial value**: `0%` - */ - WebkitMaskPositionX?: WebkitMaskPositionXProperty<TLength> | WebkitMaskPositionXProperty<TLength>[]; - /** - * The `-webkit-mask-position-y` CSS property sets the initial vertical position of a mask image. - * - * **Syntax**: `[ <length-percentage> | top | center | bottom ]#` - * - * **Initial value**: `0%` - */ - WebkitMaskPositionY?: WebkitMaskPositionYProperty<TLength> | WebkitMaskPositionYProperty<TLength>[]; - /** - * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - */ - WebkitMaskRepeat?: WebkitMaskRepeatProperty | WebkitMaskRepeatProperty[]; - /** - * The `-webkit-mask-repeat-x` property specifies whether and how a mask image is repeated (tiled) horizontally. - * - * **Syntax**: `repeat | no-repeat | space | round` - * - * **Initial value**: `repeat` - */ - WebkitMaskRepeatX?: WebkitMaskRepeatXProperty | WebkitMaskRepeatXProperty[]; - /** - * The `-webkit-mask-repeat-y` property sets whether and how a mask image is repeated (tiled) vertically. - * - * **Syntax**: `repeat | no-repeat | space | round` - * - * **Initial value**: `repeat` - */ - WebkitMaskRepeatY?: WebkitMaskRepeatYProperty | WebkitMaskRepeatYProperty[]; - /** - * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - */ - WebkitMaskSize?: WebkitMaskSizeProperty<TLength> | WebkitMaskSizeProperty<TLength>[]; - /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block depending on its writing mode. It corresponds to the `max-width` or the `max-height` property depending on the value defined for `writing-mode`. If the writing mode is vertically oriented, the value of `max-inline-size` relates to the maximal height of the element, otherwise it relates to the maximal width of the element. It relates to `max-block-size`, which defines the other dimension of the element. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - */ - WebkitMaxInlineSize?: MaxInlineSizeProperty<TLength> | MaxInlineSizeProperty<TLength>[]; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - */ - WebkitOrder?: GlobalsNumber | GlobalsNumber[]; - /** - * The `-webkit-overflow-scrolling` CSS property controls whether or not touch devices use momentum-based scrolling for a given element. - * - * **Syntax**: `auto | touch` - * - * **Initial value**: `auto` - */ - WebkitOverflowScrolling?: WebkitOverflowScrollingProperty | WebkitOverflowScrollingProperty[]; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - WebkitPaddingEnd?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[]; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - */ - WebkitPaddingStart?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[]; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - */ - WebkitPerspective?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[]; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - */ - WebkitPerspectiveOrigin?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[]; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - */ - WebkitPrintColorAdjust?: PrintColorAdjustProperty | PrintColorAdjustProperty[]; - /** - * The `**ruby-position**` CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (`over`), under it (`under`), or between the characters, on their right side (`inter-character`). - * - * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` - * - * **Initial value**: `alternate` - */ - WebkitRubyPosition?: RubyPositionProperty | RubyPositionProperty[]; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` - * - * **Initial value**: `none` - */ - WebkitScrollSnapType?: ScrollSnapTypeProperty | ScrollSnapTypeProperty[]; - /** - * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - */ - WebkitShapeMargin?: ShapeMarginProperty<TLength> | ShapeMarginProperty<TLength>[]; - /** - * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. - * - * **Syntax**: `<color>` - * - * **Initial value**: `black` - */ - WebkitTapHighlightColor?: WebkitTapHighlightColorProperty | WebkitTapHighlightColorProperty[]; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - */ - WebkitTextCombine?: TextCombineUprightProperty | TextCombineUprightProperty[]; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitTextDecorationColor?: TextDecorationColorProperty | TextDecorationColorProperty[]; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - */ - WebkitTextDecorationLine?: TextDecorationLineProperty | TextDecorationLineProperty[]; - /** - * The **`text-decoration-skip`** CSS property sets what parts of an element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. - * - * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` - * - * **Initial value**: `objects` - */ - WebkitTextDecorationSkip?: TextDecorationSkipProperty | TextDecorationSkipProperty[]; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - */ - WebkitTextDecorationStyle?: TextDecorationStyleProperty | TextDecorationStyleProperty[]; - /** - * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitTextEmphasisColor?: TextEmphasisColorProperty | TextEmphasisColorProperty[]; - /** - * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. - * - * **Syntax**: `[ over | under ] && [ right | left ]` - * - * **Initial value**: `over right` - */ - WebkitTextEmphasisPosition?: GlobalsString | GlobalsString[]; - /** - * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. - * - * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` - * - * **Initial value**: `none` - */ - WebkitTextEmphasisStyle?: TextEmphasisStyleProperty | TextEmphasisStyleProperty[]; - /** - * The **`-webkit-text-fill-color`** CSS property specifies the fill color of characters of text. If this property is not set, the value of the `color` property is used. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitTextFillColor?: WebkitTextFillColorProperty | WebkitTextFillColorProperty[]; - /** - * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. - * - * **Syntax**: `mixed | upright | sideways` - * - * **Initial value**: `mixed` - */ - WebkitTextOrientation?: TextOrientationProperty | TextOrientationProperty[]; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - */ - WebkitTextSizeAdjust?: TextSizeAdjustProperty | TextSizeAdjustProperty[]; - /** - * The **`-webkit-text-stroke-color`** CSS property specifies the stroke color of characters of text. If this property is not set, the value of the `color` property is used. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - */ - WebkitTextStrokeColor?: WebkitTextStrokeColorProperty | WebkitTextStrokeColorProperty[]; - /** - * The **`-webkit-text-stroke-width`** CSS property specifies the width of the stroke for text. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - */ - WebkitTextStrokeWidth?: WebkitTextStrokeWidthProperty<TLength> | WebkitTextStrokeWidthProperty<TLength>[]; - /** - * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. - * - * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` - * - * **Initial value**: `auto` - */ - WebkitTextUnderlinePosition?: TextUnderlinePositionProperty | TextUnderlinePositionProperty[]; - /** - * The `-webkit-touch-callout` CSS property controls the display of the default callout shown when you touch and hold a touch target. - * - * **Syntax**: `default | none` - * - * **Initial value**: `default` - */ - WebkitTouchCallout?: WebkitTouchCalloutProperty | WebkitTouchCalloutProperty[]; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - */ - WebkitTransform?: TransformProperty | TransformProperty[]; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - WebkitTransformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - */ - WebkitTransformStyle?: TransformStyleProperty | TransformStyleProperty[]; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - WebkitTransitionDelay?: GlobalsString | GlobalsString[]; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - WebkitTransitionDuration?: GlobalsString | GlobalsString[]; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - WebkitTransitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[]; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - WebkitTransitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; - /** - * **Syntax**: `read-only | read-write | read-write-plaintext-only` - * - * **Initial value**: `read-only` - */ - WebkitUserModify?: WebkitUserModifyProperty | WebkitUserModifyProperty[]; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - */ - WebkitUserSelect?: UserSelectProperty | UserSelectProperty[]; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - */ - WebkitWritingMode?: WritingModeProperty | WritingModeProperty[]; -} - -export interface VendorShorthandPropertiesFallback<TLength = string | 0> { - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - */ - MozAnimation?: AnimationProperty | AnimationProperty[]; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - */ - MozBorderImage?: BorderImageProperty | BorderImageProperty[]; - /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - */ - MozColumnRule?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[]; - /** - * The **`columns`** CSS property sets the column width and column count of an element. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - */ - MozColumns?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[]; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - MozTransition?: TransitionProperty | TransitionProperty[]; - /** - * The **`-ms-content-zoom-limit`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-limit-min` and `-ms-content-zoom-limit-max` properties. - * - * **Syntax**: `<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>` - */ - msContentZoomLimit?: GlobalsString | GlobalsString[]; - /** - * The **`-ms-content-zoom-snap`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-snap-type` and `-ms-content-zoom-snap-points` properties. - * - * **Syntax**: `<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>` - */ - msContentZoomSnap?: MsContentZoomSnapProperty | MsContentZoomSnapProperty[]; - /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - */ - msFlex?: FlexProperty<TLength> | FlexProperty<TLength>[]; - /** - * The **\-ms-scroll-limit** CSS property is a Microsoft extension that specifies values for the `-ms-scroll-limit-x-min`, `-ms-scroll-limit-y-min`, `-ms-scroll-limit-x-max`, and `-ms-scroll-limit-y-max` properties. - * - * **Syntax**: `<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>` - */ - msScrollLimit?: GlobalsString | GlobalsString[]; - /** - * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-x` properties. - * - * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>` - */ - msScrollSnapX?: GlobalsString | GlobalsString[]; - /** - * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-y` properties. - * - * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>` - */ - msScrollSnapY?: GlobalsString | GlobalsString[]; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - msTransition?: TransitionProperty | TransitionProperty[]; - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - */ - WebkitAnimation?: AnimationProperty | AnimationProperty[]; - /** - * The **`-webkit-border-before`** CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-width'> || <'border-style'> || <color>` - */ - WebkitBorderBefore?: WebkitBorderBeforeProperty<TLength> | WebkitBorderBeforeProperty<TLength>[]; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - */ - WebkitBorderImage?: BorderImageProperty | BorderImageProperty[]; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - */ - WebkitBorderRadius?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[]; - /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - */ - WebkitColumnRule?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[]; - /** - * The **`columns`** CSS property sets the column width and column count of an element. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - */ - WebkitColumns?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[]; - /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - */ - WebkitFlex?: FlexProperty<TLength> | FlexProperty<TLength>[]; - /** - * The **`flex-flow`** CSS property is a shorthand property for `flex-direction` and `flex-wrap` properties. - * - * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` - */ - WebkitFlexFlow?: FlexFlowProperty | FlexFlowProperty[]; - /** - * The **`mask`** CSS property hides an element (partially or fully) by masking or clipping the image at specific points. - * - * **Syntax**: `[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#` - */ - WebkitMask?: WebkitMaskProperty<TLength> | WebkitMaskProperty<TLength>[]; - /** - * The **`mask-border`** CSS property lets you create a mask along the edge of an element's border. - * - * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` - */ - WebkitMaskBoxImage?: MaskBorderProperty | MaskBorderProperty[]; - /** - * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. - * - * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` - */ - WebkitTextEmphasis?: TextEmphasisProperty | TextEmphasisProperty[]; - /** - * The **`-webkit-text-stroke`** CSS property specifies the width and color of strokes for text characters. This is a shorthand property for the longhand properties `-webkit-text-stroke-width` and `-webkit-text-stroke-color`. - * - * **Syntax**: `<length> || <color>` - */ - WebkitTextStroke?: WebkitTextStrokeProperty<TLength> | WebkitTextStrokeProperty<TLength>[]; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - */ - WebkitTransition?: TransitionProperty | TransitionProperty[]; -} - -export interface VendorPropertiesFallback<TLength = string | 0> extends VendorLonghandPropertiesFallback<TLength>, VendorShorthandPropertiesFallback<TLength> {} - -export interface ObsoletePropertiesFallback<TLength = string | 0> { - /** - * In combination with `elevation`, the **`azimuth`** CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage. - * - * **Syntax**: `<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards` - * - * **Initial value**: `center` - * - * @deprecated - */ - azimuth?: AzimuthProperty | AzimuthProperty[]; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - boxAlign?: BoxAlignProperty | BoxAlignProperty[]; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - boxDirection?: BoxDirectionProperty | BoxDirectionProperty[]; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - boxFlex?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - boxFlexGroup?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - boxLines?: BoxLinesProperty | BoxLinesProperty[]; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - boxOrdinalGroup?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - boxOrient?: BoxOrientProperty | BoxOrientProperty[]; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - boxPack?: BoxPackProperty | BoxPackProperty[]; - /** - * The **`clip`** CSS property defines what portion of an element is visible. The `clip` property applies only to absolutely positioned elements, that is elements with `position:absolute` or `position:fixed`. - * - * **Syntax**: `<shape> | auto` - * - * **Initial value**: `auto` - * - * @deprecated - */ - clip?: ClipProperty | ClipProperty[]; - /** - * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * @deprecated - */ - gridColumnGap?: GridColumnGapProperty<TLength> | GridColumnGapProperty<TLength>[]; - /** - * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. - * - * **Syntax**: `<'grid-row-gap'> <'grid-column-gap'>?` - * - * @deprecated - */ - gridGap?: GridGapProperty<TLength> | GridGapProperty<TLength>[]; - /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's grid rows. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * @deprecated - */ - gridRowGap?: GridRowGapProperty<TLength> | GridRowGapProperty<TLength>[]; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - imeMode?: ImeModeProperty | ImeModeProperty[]; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetBlock?: InsetBlockProperty<TLength> | InsetBlockProperty<TLength>[]; - /** - * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetBlockEnd?: InsetBlockEndProperty<TLength> | InsetBlockEndProperty<TLength>[]; - /** - * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetBlockStart?: InsetBlockStartProperty<TLength> | InsetBlockStartProperty<TLength>[]; - /** - * The **`inset-inline`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetInline?: InsetInlineProperty<TLength> | InsetInlineProperty<TLength>[]; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetInlineEnd?: InsetInlineEndProperty<TLength> | InsetInlineEndProperty<TLength>[]; - /** - * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * @deprecated - */ - offsetInlineStart?: InsetInlineStartProperty<TLength> | InsetInlineStartProperty<TLength>[]; - /** - * The **`scroll-snap-coordinate`** CSS property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's `scroll-snap-destination` for each respective axis. - * - * **Syntax**: `none | <position>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapCoordinate?: ScrollSnapCoordinateProperty<TLength> | ScrollSnapCoordinateProperty<TLength>[]; - /** - * The **`scroll-snap-destination`** CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. - * - * **Syntax**: `<position>` - * - * **Initial value**: `0px 0px` - * - * @deprecated - */ - scrollSnapDestination?: ScrollSnapDestinationProperty<TLength> | ScrollSnapDestinationProperty<TLength>[]; - /** - * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapPointsX?: ScrollSnapPointsXProperty | ScrollSnapPointsXProperty[]; - /** - * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapPointsY?: ScrollSnapPointsYProperty | ScrollSnapPointsYProperty[]; - /** - * The **`scroll-snap-type-x`** CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one. - * - * **Syntax**: `none | mandatory | proximity` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapTypeX?: ScrollSnapTypeXProperty | ScrollSnapTypeXProperty[]; - /** - * The **`scroll-snap-type-y`** CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one. - * - * **Syntax**: `none | mandatory | proximity` - * - * **Initial value**: `none` - * - * @deprecated - */ - scrollSnapTypeY?: ScrollSnapTypeYProperty | ScrollSnapTypeYProperty[]; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - KhtmlBoxAlign?: BoxAlignProperty | BoxAlignProperty[]; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - KhtmlBoxDirection?: BoxDirectionProperty | BoxDirectionProperty[]; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - KhtmlBoxFlex?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - KhtmlBoxFlexGroup?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - KhtmlBoxLines?: BoxLinesProperty | BoxLinesProperty[]; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - KhtmlBoxOrdinalGroup?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - KhtmlBoxOrient?: BoxOrientProperty | BoxOrientProperty[]; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - KhtmlBoxPack?: BoxPackProperty | BoxPackProperty[]; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - * - * @deprecated - */ - KhtmlLineBreak?: LineBreakProperty | LineBreakProperty[]; - /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * @deprecated - */ - KhtmlOpacity?: OpacityProperty | OpacityProperty[]; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - * - * @deprecated - */ - KhtmlUserSelect?: UserSelectProperty | UserSelectProperty[]; - /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - * - * @deprecated - */ - MozBackgroundClip?: BackgroundClipProperty | BackgroundClipProperty[]; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - * - * @deprecated - */ - MozBackgroundInlinePolicy?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[]; - /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - * - * @deprecated - */ - MozBackgroundOrigin?: BackgroundOriginProperty | BackgroundOriginProperty[]; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - MozBackgroundSize?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[]; - /** - * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. - * - * **Syntax**: `<url> | none` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozBinding?: MozBindingProperty | MozBindingProperty[]; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - * - * @deprecated - */ - MozBorderRadius?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[]; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBorderRadiusBottomleft?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[]; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBorderRadiusBottomright?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[]; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBorderRadiusTopleft?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[]; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBorderRadiusTopright?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[]; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - MozBoxAlign?: BoxAlignProperty | BoxAlignProperty[]; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - MozBoxDirection?: BoxDirectionProperty | BoxDirectionProperty[]; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozBoxFlex?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - MozBoxOrdinalGroup?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - MozBoxOrient?: BoxOrientProperty | BoxOrientProperty[]; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - MozBoxPack?: BoxPackProperty | BoxPackProperty[]; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozBoxShadow?: BoxShadowProperty | BoxShadowProperty[]; - /** - * The non-standard **`-moz-float-edge`** CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness. - * - * **Syntax**: `border-box | content-box | margin-box | padding-box` - * - * **Initial value**: `content-box` - * - * @deprecated - */ - MozFloatEdge?: MozFloatEdgeProperty | MozFloatEdgeProperty[]; - /** - * The **`-moz-force-broken-image-icon`** extended CSS property can be used to force the broken image icon to be shown even when a broken image has an `alt` attribute. - * - * **Syntax**: `0 | 1` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozForceBrokenImageIcon?: MozForceBrokenImageIconProperty | MozForceBrokenImageIconProperty[]; - /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * @deprecated - */ - MozOpacity?: OpacityProperty | OpacityProperty[]; - /** - * The **`outline`** CSS property is a shorthand to set various outline properties in a single declaration: `outline-style`, `outline-width`, and `outline-color`. - * - * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` - * - * @deprecated - */ - MozOutline?: OutlineProperty<TLength> | OutlineProperty<TLength>[]; - /** - * The **`outline-color`** CSS property sets the color of an element's outline. - * - * **Syntax**: `<color> | invert` - * - * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other - * - * @deprecated - */ - MozOutlineColor?: OutlineColorProperty | OutlineColorProperty[]; - /** - * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS property can be used to give an element's `outline` rounded corners. - * - * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` - * - * @deprecated - */ - MozOutlineRadius?: MozOutlineRadiusProperty<TLength> | MozOutlineRadiusProperty<TLength>[]; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozOutlineRadiusBottomleft?: MozOutlineRadiusBottomleftProperty<TLength> | MozOutlineRadiusBottomleftProperty<TLength>[]; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozOutlineRadiusBottomright?: MozOutlineRadiusBottomrightProperty<TLength> | MozOutlineRadiusBottomrightProperty<TLength>[]; - /** - * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozOutlineRadiusTopleft?: MozOutlineRadiusTopleftProperty<TLength> | MozOutlineRadiusTopleftProperty<TLength>[]; - /** - * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - MozOutlineRadiusTopright?: MozOutlineRadiusToprightProperty<TLength> | MozOutlineRadiusToprightProperty<TLength>[]; - /** - * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `auto | <'border-style'>` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozOutlineStyle?: OutlineStyleProperty | OutlineStyleProperty[]; - /** - * The **`outline-width`** CSS property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * @deprecated - */ - MozOutlineWidth?: OutlineWidthProperty<TLength> | OutlineWidthProperty<TLength>[]; - /** - * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. - * - * **Syntax**: `auto | start | end | left | right | center | justify` - * - * **Initial value**: `auto` - * - * @deprecated - */ - MozTextAlignLast?: TextAlignLastProperty | TextAlignLastProperty[]; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * @deprecated - */ - MozTextDecorationColor?: TextDecorationColorProperty | TextDecorationColorProperty[]; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - * - * @deprecated - */ - MozTextDecorationLine?: TextDecorationLineProperty | TextDecorationLineProperty[]; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - * - * @deprecated - */ - MozTextDecorationStyle?: TextDecorationStyleProperty | TextDecorationStyleProperty[]; - /** - * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. - * - * **Syntax**: `auto | none | enabled | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - MozUserInput?: MozUserInputProperty | MozUserInputProperty[]; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - msImeMode?: ImeModeProperty | ImeModeProperty[]; - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * @deprecated - */ - OAnimation?: AnimationProperty | AnimationProperty[]; - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OAnimationDelay?: GlobalsString | GlobalsString[]; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * @deprecated - */ - OAnimationDirection?: AnimationDirectionProperty | AnimationDirectionProperty[]; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OAnimationDuration?: GlobalsString | GlobalsString[]; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - OAnimationFillMode?: AnimationFillModeProperty | AnimationFillModeProperty[]; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * @deprecated - */ - OAnimationIterationCount?: AnimationIterationCountProperty | AnimationIterationCountProperty[]; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * @deprecated - */ - OAnimationName?: AnimationNameProperty | AnimationNameProperty[]; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * @deprecated - */ - OAnimationPlayState?: AnimationPlayStateProperty | AnimationPlayStateProperty[]; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - OAnimationTimingFunction?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[]; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - OBackgroundSize?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[]; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * @deprecated - */ - OBorderImage?: BorderImageProperty | BorderImageProperty[]; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * @deprecated - */ - OObjectFit?: ObjectFitProperty | ObjectFitProperty[]; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * @deprecated - */ - OObjectPosition?: ObjectPositionProperty<TLength> | ObjectPositionProperty<TLength>[]; - /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * @deprecated - */ - OTabSize?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[]; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * @deprecated - */ - OTextOverflow?: TextOverflowProperty | TextOverflowProperty[]; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * @deprecated - */ - OTransform?: TransformProperty | TransformProperty[]; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * @deprecated - */ - OTransformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; - /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. - * - * **Syntax**: `<single-transition>#` - * - * @deprecated - */ - OTransition?: TransitionProperty | TransitionProperty[]; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OTransitionDelay?: GlobalsString | GlobalsString[]; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - OTransitionDuration?: GlobalsString | GlobalsString[]; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * @deprecated - */ - OTransitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[]; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - OTransitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; - /** - * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | baseline | stretch` - * - * **Initial value**: `stretch` - * - * @deprecated - */ - WebkitBoxAlign?: BoxAlignProperty | BoxAlignProperty[]; - /** - * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). - * - * **Syntax**: `normal | reverse | inherit` - * - * **Initial value**: `normal` - * - * @deprecated - */ - WebkitBoxDirection?: BoxDirectionProperty | BoxDirectionProperty[]; - /** - * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * @deprecated - */ - WebkitBoxFlex?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - WebkitBoxFlexGroup?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). - * - * **Syntax**: `single | multiple` - * - * **Initial value**: `single` - * - * @deprecated - */ - WebkitBoxLines?: BoxLinesProperty | BoxLinesProperty[]; - /** - * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `1` - * - * @deprecated - */ - WebkitBoxOrdinalGroup?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. - * - * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` - * - * **Initial value**: `inline-axis` (`horizontal` in XUL) - * - * @deprecated - */ - WebkitBoxOrient?: BoxOrientProperty | BoxOrientProperty[]; - /** - * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. - * - * **Syntax**: `start | center | end | justify` - * - * **Initial value**: `start` - * - * @deprecated - */ - WebkitBoxPack?: BoxPackProperty | BoxPackProperty[]; - /** - * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - WebkitScrollSnapPointsX?: ScrollSnapPointsXProperty | ScrollSnapPointsXProperty[]; - /** - * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - WebkitScrollSnapPointsY?: ScrollSnapPointsYProperty | ScrollSnapPointsYProperty[]; -} - -export interface SvgPropertiesFallback<TLength = string | 0> { - alignmentBaseline?: AlignmentBaselineProperty | AlignmentBaselineProperty[]; - baselineShift?: BaselineShiftProperty<TLength> | BaselineShiftProperty<TLength>[]; - clip?: ClipProperty | ClipProperty[]; - clipPath?: ClipPathProperty | ClipPathProperty[]; - clipRule?: ClipRuleProperty | ClipRuleProperty[]; - color?: ColorProperty | ColorProperty[]; - colorInterpolation?: ColorInterpolationProperty | ColorInterpolationProperty[]; - colorRendering?: ColorRenderingProperty | ColorRenderingProperty[]; - cursor?: CursorProperty | CursorProperty[]; - direction?: DirectionProperty | DirectionProperty[]; - display?: DisplayProperty | DisplayProperty[]; - dominantBaseline?: DominantBaselineProperty | DominantBaselineProperty[]; - fill?: FillProperty | FillProperty[]; - fillOpacity?: GlobalsNumber | GlobalsNumber[]; - fillRule?: FillRuleProperty | FillRuleProperty[]; - filter?: FilterProperty | FilterProperty[]; - floodColor?: FloodColorProperty | FloodColorProperty[]; - floodOpacity?: GlobalsNumber | GlobalsNumber[]; - font?: FontProperty | FontProperty[]; - fontFamily?: FontFamilyProperty | FontFamilyProperty[]; - fontSize?: FontSizeProperty<TLength> | FontSizeProperty<TLength>[]; - fontSizeAdjust?: FontSizeAdjustProperty | FontSizeAdjustProperty[]; - fontStretch?: FontStretchProperty | FontStretchProperty[]; - fontStyle?: FontStyleProperty | FontStyleProperty[]; - fontVariant?: FontVariantProperty | FontVariantProperty[]; - fontWeight?: FontWeightProperty | FontWeightProperty[]; - glyphOrientationVertical?: GlyphOrientationVerticalProperty | GlyphOrientationVerticalProperty[]; - imageRendering?: ImageRenderingProperty | ImageRenderingProperty[]; - letterSpacing?: LetterSpacingProperty<TLength> | LetterSpacingProperty<TLength>[]; - lightingColor?: LightingColorProperty | LightingColorProperty[]; - lineHeight?: LineHeightProperty<TLength> | LineHeightProperty<TLength>[]; - marker?: MarkerProperty | MarkerProperty[]; - markerEnd?: MarkerEndProperty | MarkerEndProperty[]; - markerMid?: MarkerMidProperty | MarkerMidProperty[]; - markerStart?: MarkerStartProperty | MarkerStartProperty[]; - mask?: MaskProperty<TLength> | MaskProperty<TLength>[]; - opacity?: OpacityProperty | OpacityProperty[]; - overflow?: OverflowProperty | OverflowProperty[]; - paintOrder?: PaintOrderProperty | PaintOrderProperty[]; - pointerEvents?: PointerEventsProperty | PointerEventsProperty[]; - shapeRendering?: ShapeRenderingProperty | ShapeRenderingProperty[]; - stopColor?: StopColorProperty | StopColorProperty[]; - stopOpacity?: GlobalsNumber | GlobalsNumber[]; - stroke?: StrokeProperty | StrokeProperty[]; - strokeDasharray?: StrokeDasharrayProperty<TLength> | StrokeDasharrayProperty<TLength>[]; - strokeDashoffset?: StrokeDashoffsetProperty<TLength> | StrokeDashoffsetProperty<TLength>[]; - strokeLinecap?: StrokeLinecapProperty | StrokeLinecapProperty[]; - strokeLinejoin?: StrokeLinejoinProperty | StrokeLinejoinProperty[]; - strokeMiterlimit?: GlobalsNumber | GlobalsNumber[]; - strokeOpacity?: GlobalsNumber | GlobalsNumber[]; - strokeWidth?: StrokeWidthProperty<TLength> | StrokeWidthProperty<TLength>[]; - textAnchor?: TextAnchorProperty | TextAnchorProperty[]; - textDecoration?: TextDecorationProperty<TLength> | TextDecorationProperty<TLength>[]; - textRendering?: TextRenderingProperty | TextRenderingProperty[]; - unicodeBidi?: UnicodeBidiProperty | UnicodeBidiProperty[]; - vectorEffect?: VectorEffectProperty | VectorEffectProperty[]; - visibility?: VisibilityProperty | VisibilityProperty[]; - whiteSpace?: WhiteSpaceProperty | WhiteSpaceProperty[]; - wordSpacing?: WordSpacingProperty<TLength> | WordSpacingProperty<TLength>[]; - writingMode?: WritingModeProperty | WritingModeProperty[]; -} - -export interface PropertiesFallback<TLength = string | 0> - extends StandardPropertiesFallback<TLength>, - VendorPropertiesFallback<TLength>, - ObsoletePropertiesFallback<TLength>, - SvgPropertiesFallback<TLength> {} - -export interface StandardLonghandPropertiesHyphenFallback<TLength = string | 0> { - /** - * The **`accent-color`** CSS property sets the color of the elements accent. An accent appears in elements such as `<input>` of `type="checkbox"`, or `type="radio"`. - * - * **Syntax**: `auto | <color>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **93** | **92** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/accent-color - */ - "accent-color"?: AccentColorProperty | AccentColorProperty[]; - /** - * The CSS **`align-content`** property sets how the browser distributes space between and around content items along the cross-axis of a flexbox container, and the main-axis of a grid container. - * - * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-content - */ - "align-content"?: AlignContentProperty | AlignContentProperty[]; - /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. The align-self property sets the alignment of an item within its containing block. In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment of items on the Block Axis within their grid area. - * - * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-items - */ - "align-items"?: AlignItemsProperty | AlignItemsProperty[]; - /** - * The **`align-self`** CSS property aligns flex items of the current flex line overriding the `align-items` value. If any of the item's cross-axis margin is set to `auto`, then `align-self` is ignored. In Grid layout `align-self` aligns the item inside the grid area. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-self - */ - "align-self"?: AlignSelfProperty | AlignSelfProperty[]; - /** - * The **`align-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their block axis. - * - * **Syntax**: `[ normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position> ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/align-tracks - */ - "align-tracks"?: AlignTracksProperty | AlignTracksProperty[]; - /** - * The **`animation-composition`** CSS property specifies the composite operation to use when multiple animations affect the same property simultaneously. - * - * **Syntax**: `<single-animation-composition>#` - * - * **Initial value**: `replace` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-composition - */ - "animation-composition"?: GlobalsString | GlobalsString[]; - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-delay - */ - "animation-delay"?: GlobalsString | GlobalsString[]; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-direction - */ - "animation-direction"?: AnimationDirectionProperty | AnimationDirectionProperty[]; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-duration - */ - "animation-duration"?: GlobalsString | GlobalsString[]; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 5 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode - */ - "animation-fill-mode"?: AnimationFillModeProperty | AnimationFillModeProperty[]; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count - */ - "animation-iteration-count"?: AnimationIterationCountProperty | AnimationIterationCountProperty[]; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-name - */ - "animation-name"?: AnimationNameProperty | AnimationNameProperty[]; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-play-state - */ - "animation-play-state"?: AnimationPlayStateProperty | AnimationPlayStateProperty[]; - /** - * The **`animation-timeline`** CSS property specifies the names of one or more `@scroll-timeline` at-rules describing the scroll animations to apply to the element. - * - * **Syntax**: `<single-animation-timeline>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-timeline - */ - "animation-timeline"?: AnimationTimelineProperty | AnimationTimelineProperty[]; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation-timing-function - */ - "animation-timing-function"?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[]; - /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. - * - * **Syntax**: `none | auto | textfield | menulist-button | <compat-auto>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :------: | :-: | - * | **84** | **80** | **15.4** | **84** | No | - * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | 12 _-x-_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/appearance - */ - appearance?: AppearanceProperty | AppearanceProperty[]; - /** - * The **`aspect-ratio`**   CSS property sets a _**preferred aspect ratio**_ for the box, which will be used in the calculation of auto sizes and some other layout functions. - * - * **Syntax**: `auto | <ratio>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **88** | **89** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/aspect-ratio - */ - "aspect-ratio"?: AspectRatioProperty | AspectRatioProperty[]; - /** - * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :----: | :-: | - * | **76** | **103** | **9** _-x-_ | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/backdrop-filter - */ - "backdrop-filter"?: BackdropFilterProperty | BackdropFilterProperty[]; - /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. - * - * **Syntax**: `visible | hidden` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-------: | :----: | :----: | - * | **36** | **16** | **15.4** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/backface-visibility - */ - "backface-visibility"?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[]; - /** - * The **`background-attachment`** CSS property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block. - * - * **Syntax**: `<attachment>#` - * - * **Initial value**: `scroll` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-attachment - */ - "background-attachment"?: BackgroundAttachmentProperty | BackgroundAttachmentProperty[]; - /** - * The **`background-blend-mode`** CSS property sets how an element's background images should blend with each other and with the element's background color. - * - * **Syntax**: `<blend-mode>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **35** | **30** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-blend-mode - */ - "background-blend-mode"?: BackgroundBlendModeProperty | BackgroundBlendModeProperty[]; - /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **4** | **14** | **12** | **9** | - * | | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-clip - */ - "background-clip"?: BackgroundClipProperty | BackgroundClipProperty[]; - /** - * The **`background-color`** CSS property sets the background color of an element. - * - * **Syntax**: `<color>` - * - * **Initial value**: `transparent` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-color - */ - "background-color"?: BackgroundColorProperty | BackgroundColorProperty[]; - /** - * The **`background-image`** CSS property sets one or more background images on an element. - * - * **Syntax**: `<bg-image>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-image - */ - "background-image"?: BackgroundImageProperty | BackgroundImageProperty[]; - /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. - * - * **Syntax**: `<box>#` - * - * **Initial value**: `padding-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **4** | **3** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-origin - */ - "background-origin"?: BackgroundOriginProperty | BackgroundOriginProperty[]; - /** - * The **`background-position-x`** CSS property sets the initial horizontal position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#` - * - * **Initial value**: `0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **49** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position-x - */ - "background-position-x"?: BackgroundPositionXProperty<TLength> | BackgroundPositionXProperty<TLength>[]; - /** - * The **`background-position-y`** CSS property sets the initial vertical position, relative to the background position layer defined by `background-origin`, for each defined background image. - * - * **Syntax**: `[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#` - * - * **Initial value**: `0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **49** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position-y - */ - "background-position-y"?: BackgroundPositionYProperty<TLength> | BackgroundPositionYProperty<TLength>[]; - /** - * The **`background-repeat`** CSS property sets how background images are repeated. A background image can be repeated along the horizontal and vertical axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `repeat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-repeat - */ - "background-repeat"?: BackgroundRepeatProperty | BackgroundRepeatProperty[]; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **3** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-size - */ - "background-size"?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[]; - /** - * **Syntax**: `clip | ellipsis | <string>` - * - * **Initial value**: `clip` - */ - "block-overflow"?: BlockOverflowProperty | BlockOverflowProperty[]; - /** - * The **`block-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/block-size - */ - "block-size"?: BlockSizeProperty<TLength> | BlockSizeProperty<TLength>[]; - /** - * The **`border-block-color`** CSS property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>{1,2}` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-color - */ - "border-block-color"?: BorderBlockColorProperty | BorderBlockColorProperty[]; - /** - * The **`border-block-end-color`** CSS property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-color - */ - "border-block-end-color"?: BorderBlockEndColorProperty | BorderBlockEndColorProperty[]; - /** - * The **`border-block-end-style`** CSS property defines the style of the logical block end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-style - */ - "border-block-end-style"?: BorderBlockEndStyleProperty | BorderBlockEndStyleProperty[]; - /** - * The **`border-block-end-width`** CSS property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end-width - */ - "border-block-end-width"?: BorderBlockEndWidthProperty<TLength> | BorderBlockEndWidthProperty<TLength>[]; - /** - * The **`border-block-start-color`** CSS property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-color - */ - "border-block-start-color"?: BorderBlockStartColorProperty | BorderBlockStartColorProperty[]; - /** - * The **`border-block-start-style`** CSS property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-style - */ - "border-block-start-style"?: BorderBlockStartStyleProperty | BorderBlockStartStyleProperty[]; - /** - * The **`border-block-start-width`** CSS property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start-width - */ - "border-block-start-width"?: BorderBlockStartWidthProperty<TLength> | BorderBlockStartWidthProperty<TLength>[]; - /** - * The **`border-block-style`** CSS property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-style - */ - "border-block-style"?: BorderBlockStyleProperty | BorderBlockStyleProperty[]; - /** - * The **`border-block-width`** CSS property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-width - */ - "border-block-width"?: BorderBlockWidthProperty<TLength> | BorderBlockWidthProperty<TLength>[]; - /** - * The **`border-bottom-color`** CSS property sets the color of an element's bottom border. It can also be set with the shorthand CSS properties `border-color` or `border-bottom`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-color - */ - "border-bottom-color"?: BorderBottomColorProperty | BorderBottomColorProperty[]; - /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius - */ - "border-bottom-left-radius"?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[]; - /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius - */ - "border-bottom-right-radius"?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[]; - /** - * The **`border-bottom-style`** CSS property sets the line style of an element's bottom `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-style - */ - "border-bottom-style"?: BorderBottomStyleProperty | BorderBottomStyleProperty[]; - /** - * The **`border-bottom-width`** CSS property sets the width of the bottom border of a box. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom-width - */ - "border-bottom-width"?: BorderBottomWidthProperty<TLength> | BorderBottomWidthProperty<TLength>[]; - /** - * The **`border-collapse`** CSS property sets whether cells inside a `<table>` have shared or separate borders. - * - * **Syntax**: `collapse | separate` - * - * **Initial value**: `separate` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-collapse - */ - "border-collapse"?: BorderCollapseProperty | BorderCollapseProperty[]; - /** - * The **`border-end-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius - */ - "border-end-end-radius"?: BorderEndEndRadiusProperty<TLength> | BorderEndEndRadiusProperty<TLength>[]; - /** - * The **`border-end-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius - */ - "border-end-start-radius"?: BorderEndStartRadiusProperty<TLength> | BorderEndStartRadiusProperty<TLength>[]; - /** - * The **`border-image-outset`** CSS property sets the distance by which an element's border image is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-outset - */ - "border-image-outset"?: BorderImageOutsetProperty<TLength> | BorderImageOutsetProperty<TLength>[]; - /** - * The **`border-image-repeat`** CSS property defines how the edge regions of a source image are adjusted to fit the dimensions of an element's border image. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-repeat - */ - "border-image-repeat"?: BorderImageRepeatProperty | BorderImageRepeatProperty[]; - /** - * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. - * - * **Syntax**: `<number-percentage>{1,4} && fill?` - * - * **Initial value**: `100%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-slice - */ - "border-image-slice"?: BorderImageSliceProperty | BorderImageSliceProperty[]; - /** - * The **`border-image-source`** CSS property sets the source image used to create an element's border image. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **15** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-source - */ - "border-image-source"?: BorderImageSourceProperty | BorderImageSourceProperty[]; - /** - * The **`border-image-width`** CSS property sets the width of an element's border image. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **15** | **13** | **6** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image-width - */ - "border-image-width"?: BorderImageWidthProperty<TLength> | BorderImageWidthProperty<TLength>[]; - /** - * The **`border-inline-color`** CSS property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color` and `border-bottom-color`, or `border-right-color` and `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>{1,2}` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-color - */ - "border-inline-color"?: BorderInlineColorProperty | BorderInlineColorProperty[]; - /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-color)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color - */ - "border-inline-end-color"?: BorderInlineEndColorProperty | BorderInlineEndColorProperty[]; - /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-style)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style - */ - "border-inline-end-style"?: BorderInlineEndStyleProperty | BorderInlineEndStyleProperty[]; - /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-end-width)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width - */ - "border-inline-end-width"?: BorderInlineEndWidthProperty<TLength> | BorderInlineEndWidthProperty<TLength>[]; - /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-color'>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-start-color)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color - */ - "border-inline-start-color"?: BorderInlineStartColorProperty | BorderInlineStartColorProperty[]; - /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :---------------------------: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * | | 3 _(-moz-border-start-style)_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style - */ - "border-inline-start-style"?: BorderInlineStartStyleProperty | BorderInlineStartStyleProperty[]; - /** - * The **`border-inline-start-width`** CSS property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width - */ - "border-inline-start-width"?: BorderInlineStartWidthProperty<TLength> | BorderInlineStartWidthProperty<TLength>[]; - /** - * The **`border-inline-style`** CSS property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style` and `border-bottom-style`, or `border-left-style` and `border-right-style` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-style - */ - "border-inline-style"?: BorderInlineStyleProperty | BorderInlineStyleProperty[]; - /** - * The **`border-inline-width`** CSS property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width` and `border-bottom-width`, or `border-left-width`, and `border-right-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'border-top-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-width - */ - "border-inline-width"?: BorderInlineWidthProperty<TLength> | BorderInlineWidthProperty<TLength>[]; - /** - * The **`border-left-color`** CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties `border-color` or `border-left`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-color - */ - "border-left-color"?: BorderLeftColorProperty | BorderLeftColorProperty[]; - /** - * The **`border-left-style`** CSS property sets the line style of an element's left `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-style - */ - "border-left-style"?: BorderLeftStyleProperty | BorderLeftStyleProperty[]; - /** - * The **`border-left-width`** CSS property sets the width of the left border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left-width - */ - "border-left-width"?: BorderLeftWidthProperty<TLength> | BorderLeftWidthProperty<TLength>[]; - /** - * The **`border-right-color`** CSS property sets the color of an element's right border. It can also be set with the shorthand CSS properties `border-color` or `border-right`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-color - */ - "border-right-color"?: BorderRightColorProperty | BorderRightColorProperty[]; - /** - * The **`border-right-style`** CSS property sets the line style of an element's right `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-style - */ - "border-right-style"?: BorderRightStyleProperty | BorderRightStyleProperty[]; - /** - * The **`border-right-width`** CSS property sets the width of the right border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right-width - */ - "border-right-width"?: BorderRightWidthProperty<TLength> | BorderRightWidthProperty<TLength>[]; - /** - * The **`border-spacing`** CSS property sets the distance between the borders of adjacent `<table>` cells. This property applies only when `border-collapse` is `separate`. - * - * **Syntax**: `<length> <length>?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-spacing - */ - "border-spacing"?: BorderSpacingProperty<TLength> | BorderSpacingProperty<TLength>[]; - /** - * The **`border-start-end-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius depending on the element's `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius - */ - "border-start-end-radius"?: BorderStartEndRadiusProperty<TLength> | BorderStartEndRadiusProperty<TLength>[]; - /** - * The **`border-start-start-radius`** CSS property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **89** | **66** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius - */ - "border-start-start-radius"?: BorderStartStartRadiusProperty<TLength> | BorderStartStartRadiusProperty<TLength>[]; - /** - * The **`border-top-color`** CSS property sets the color of an element's top border. It can also be set with the shorthand CSS properties `border-color` or `border-top`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-color - */ - "border-top-color"?: BorderTopColorProperty | BorderTopColorProperty[]; - /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius - */ - "border-top-left-radius"?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[]; - /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. - * - * **Syntax**: `<length-percentage>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius - */ - "border-top-right-radius"?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[]; - /** - * The **`border-top-style`** CSS property sets the line style of an element's top `border`. - * - * **Syntax**: `<line-style>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-style - */ - "border-top-style"?: BorderTopStyleProperty | BorderTopStyleProperty[]; - /** - * The **`border-top-width`** CSS property sets the width of the top border of an element. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top-width - */ - "border-top-width"?: BorderTopWidthProperty<TLength> | BorderTopWidthProperty<TLength>[]; - /** - * The **`bottom`** CSS property participates in specifying the vertical position of a _positioned element_. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/bottom - */ - bottom?: BottomProperty<TLength> | BottomProperty<TLength>[]; - /** - * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. - * - * **Syntax**: `slice | clone` - * - * **Initial value**: `slice` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----: | :---------: | :--: | :-: | - * | **22** _-x-_ | **32** | **7** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-decoration-break - */ - "box-decoration-break"?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[]; - /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. - * - * **Syntax**: `none | <shadow>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **10** | **4** | **5.1** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-shadow - */ - "box-shadow"?: BoxShadowProperty | BoxShadowProperty[]; - /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. - * - * **Syntax**: `content-box | border-box` - * - * **Initial value**: `content-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **10** | **29** | **5.1** | **12** | **8** | - * | 1 _-x-_ | 1 _-x-_ | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/box-sizing - */ - "box-sizing"?: BoxSizingProperty | BoxSizingProperty[]; - /** - * The **`break-after`** CSS property defines how page, column, or region breaks should behave after a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-after - */ - "break-after"?: BreakAfterProperty | BreakAfterProperty[]; - /** - * The **`break-before`** CSS property sets how page, column, or region breaks should behave before a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-before - */ - "break-before"?: BreakBeforeProperty | BreakBeforeProperty[]; - /** - * The **`break-inside`** CSS property defines how page, column, or region breaks should behave inside a generated box. If there is no generated box, the property is ignored. - * - * **Syntax**: `auto | avoid | avoid-page | avoid-column | avoid-region` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **50** | **65** | **10** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/break-inside - */ - "break-inside"?: BreakInsideProperty | BreakInsideProperty[]; - /** - * The **`caption-side`** CSS property puts the content of a table's `<caption>` on the specified side. The values are relative to the `writing-mode` of the table. - * - * **Syntax**: `top | bottom | block-start | block-end | inline-start | inline-end` - * - * **Initial value**: `top` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/caption-side - */ - "caption-side"?: CaptionSideProperty | CaptionSideProperty[]; - /** - * The **`caret-color`** CSS property sets the color of the insertion caret, the visible marker where the next character typed will be inserted. The caret appears in elements such as `<input>` or those with the `contenteditable` attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property. - * - * **Syntax**: `auto | <color>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **53** | **11.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/caret-color - */ - "caret-color"?: CaretColorProperty | CaretColorProperty[]; - /** - * The **`clear`** CSS property sets whether an element must be moved below (cleared) floating elements that precede it. The `clear` property applies to floating and non-floating elements. - * - * **Syntax**: `none | left | right | both | inline-start | inline-end` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/clear - */ - clear?: ClearProperty | ClearProperty[]; - /** - * The `**clip-path**` CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. - * - * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **55** | **3.5** | **9.1** | **79** | **10** | - * | 23 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/clip-path - */ - "clip-path"?: ClipPathProperty | ClipPathProperty[]; - /** - * The **`color`** CSS property sets the foreground color value of an element's text and text decorations, and sets the `currentcolor` value. `currentcolor` may be used as an indirect value on _other_ properties and is the default for other color properties, such as `border-color`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `canvastext` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/color - */ - color?: ColorProperty | ColorProperty[]; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----------------: | :------: | :----------: | :-: | - * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | - * | | 48 _(color-adjust)_ | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust - */ - "color-adjust"?: PrintColorAdjustProperty | PrintColorAdjustProperty[]; - /** - * The **`color-scheme`** CSS property allows an element to indicate which color schemes it can comfortably be rendered in. - * - * **Syntax**: `normal | [ light | dark | <custom-ident> ]+ && only?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **81** | **96** | **13** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/color-scheme - */ - "color-scheme"?: ColorSchemeProperty | ColorSchemeProperty[]; - /** - * The **`column-count`** CSS property breaks an element's content into the specified number of columns. - * - * **Syntax**: `<integer> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-count - */ - "column-count"?: ColumnCountProperty | ColumnCountProperty[]; - /** - * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. - * - * **Syntax**: `auto | balance | balance-all` - * - * **Initial value**: `balance` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-fill - */ - "column-fill"?: ColumnFillProperty | ColumnFillProperty[]; - /** - * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. - * - * **Syntax**: `normal | <length-percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **1** | **1.5** | **3** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-gap - */ - "column-gap"?: ColumnGapProperty<TLength> | ColumnGapProperty<TLength>[]; - /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-color - */ - "column-rule-color"?: ColumnRuleColorProperty | ColumnRuleColorProperty[]; - /** - * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-style - */ - "column-rule-style"?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[]; - /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'border-width'>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule-width - */ - "column-rule-width"?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[]; - /** - * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. - * - * **Syntax**: `none | all` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **50** | **71** | **9** | **12** | **10** | - * | 6 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-span - */ - "column-span"?: ColumnSpanProperty | ColumnSpanProperty[]; - /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. - * - * **Syntax**: `<length> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **50** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-width - */ - "column-width"?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[]; - /** - * The **`contain`** CSS property allows an author to indicate that an element and its contents are, as much as possible, _independent_ of the rest of the document tree. This allows the browser to recalculate layout, style, paint, size, or any combination of them for a limited area of the DOM and not the entire page. - * - * **Syntax**: `none | strict | content | [ [ size || inline-size ] || layout || style || paint ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **52** | **69** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/contain - */ - contain?: ContainProperty | ContainProperty[]; - /** - * The **`content`** CSS property replaces an element with a generated value. Objects inserted using the `content` property are _anonymous replaced elements._ - * - * **Syntax**: `normal | none | [ <content-replacement> | <content-list> ] [/ [ <string> | <counter> ]+ ]?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/content - */ - content?: ContentProperty | ContentProperty[]; - /** - * The **`content-visibility`** CSS property controls whether or not an element renders its contents at all, along with forcing a strong set of containments, allowing user agents to potentially omit large swathes of layout and rendering work until it becomes needed. Basically it enables the user agent to skip an element's rendering work, including layout and painting, until it is needed, makes the initial page load much faster. - * - * **Syntax**: `visible | auto | hidden` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **85** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/content-visibility - */ - "content-visibility"?: ContentVisibilityProperty | ContentVisibilityProperty[]; - /** - * The **`counter-increment`** CSS property increases or decreases the value of a CSS counter by a given value. - * - * **Syntax**: `[ <counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-increment - */ - "counter-increment"?: CounterIncrementProperty | CounterIncrementProperty[]; - /** - * The **`counter-reset`** CSS property resets a CSS counter to a given value. - * - * **Syntax**: `[ <counter-name> <integer>? | <reversed-counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-reset - */ - "counter-reset"?: CounterResetProperty | CounterResetProperty[]; - /** - * The **`counter-set`** CSS property sets a CSS counter to a given value. It manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element. - * - * **Syntax**: `[ <counter-name> <integer>? ]+ | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **85** | **68** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/counter-set - */ - "counter-set"?: CounterSetProperty | CounterSetProperty[]; - /** - * The **`cursor`** CSS property sets mouse cursor to display when the mouse pointer is over an element. - * - * **Syntax**: `[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/cursor - */ - cursor?: CursorProperty | CursorProperty[]; - /** - * The **`direction`** CSS property sets the direction of text, table columns, and horizontal overflow. Use `rtl` for languages written from right to left (like Hebrew or Arabic), and `ltr` for those written from left to right (like English and most other languages). - * - * **Syntax**: `ltr | rtl` - * - * **Initial value**: `ltr` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **2** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/direction - */ - direction?: DirectionProperty | DirectionProperty[]; - /** - * The **`display`** CSS property defines the _display type_ of an element, which consists of the two basic qualities of how an element generates boxes — the **outer display type** defining how the box participates in flow layout, and the **inner display type** defining how the children of the box are laid out. - * - * **Syntax**: `[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>` - * - * **Initial value**: `inline` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/display - */ - display?: DisplayProperty | DisplayProperty[]; - /** - * The **`empty-cells`** CSS property sets whether borders and backgrounds appear around `<table>` cells that have no visible content. - * - * **Syntax**: `show | hide` - * - * **Initial value**: `show` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/empty-cells - */ - "empty-cells"?: EmptyCellsProperty | EmptyCellsProperty[]; - /** - * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. - * - * **Syntax**: `none | <filter-function-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :-: | - * | **53** | **35** | **9.1** | **12** | No | - * | 18 _-x-_ | | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/filter - */ - filter?: FilterProperty | FilterProperty[]; - /** - * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. - * - * **Syntax**: `content | <'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **22** | **9** | **12** | **11** | - * | 22 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-basis - */ - "flex-basis"?: FlexBasisProperty<TLength> | FlexBasisProperty<TLength>[]; - /** - * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). - * - * **Syntax**: `row | row-reverse | column | column-reverse` - * - * **Initial value**: `row` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :------: | - * | **29** | **81** | **9** | **12** | **11** | - * | 21 _-x-_ | 49 _-x-_ | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-direction - */ - "flex-direction"?: FlexDirectionProperty | FlexDirectionProperty[]; - /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. - * - * **Syntax**: `<number>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----------------------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 22 _-x-_ | | 7 _-x-_ | | 10 _(-ms-flex-positive)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-grow - */ - "flex-grow"?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. - * - * **Syntax**: `<number>` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **10** | - * | 22 _-x-_ | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-shrink - */ - "flex-shrink"?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. - * - * **Syntax**: `nowrap | wrap | wrap-reverse` - * - * **Initial value**: `nowrap` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-wrap - */ - "flex-wrap"?: FlexWrapProperty | FlexWrapProperty[]; - /** - * The **`float`** CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow (in contrast to absolute positioning). - * - * **Syntax**: `left | right | none | inline-start | inline-end` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/float - */ - float?: FloatProperty | FloatProperty[]; - /** - * The **`font-family`** CSS property specifies a prioritized list of one or more font family names and/or generic family names for the selected element. - * - * **Syntax**: `[ <family-name> | <generic-family> ]#` - * - * **Initial value**: depends on user agent - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-family - */ - "font-family"?: FontFamilyProperty | FontFamilyProperty[]; - /** - * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. - * - * **Syntax**: `normal | <feature-tag-value>#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **48** | **34** | **9.1** | **15** | **10** | - * | 16 _-x-_ | 15 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-feature-settings - */ - "font-feature-settings"?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[]; - /** - * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. - * - * **Syntax**: `auto | normal | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **33** | **32** | **9** | n/a | No | - * | | | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-kerning - */ - "font-kerning"?: FontKerningProperty | FontKerningProperty[]; - /** - * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. - * - * **Syntax**: `normal | <string>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **34** | No | n/a | No | - * | | 4 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-language-override - */ - "font-language-override"?: FontLanguageOverrideProperty | FontLanguageOverrideProperty[]; - /** - * The **`font-optical-sizing`** CSS property sets whether text rendering is optimized for viewing at different sizes. This only works for fonts that have an optical size variation axis. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **79** | **62** | **11** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing - */ - "font-optical-sizing"?: FontOpticalSizingProperty | FontOpticalSizingProperty[]; - /** - * The **`font-size`** CSS property sets the size of the font. This property is also used to compute the size of `em`, `ex`, and other relative `<length>` units. - * - * **Syntax**: `<absolute-size> | <relative-size> | <length-percentage>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-size - */ - "font-size"?: FontSizeProperty<TLength> | FontSizeProperty<TLength>[]; - /** - * The **`font-size-adjust`** CSS property sets how the font size should be chosen based on the height of lowercase rather than capital letters. - * - * **Syntax**: `none | [ ex-height | cap-height | ch-width | ic-width | ic-height ]? [ from-font | <number> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **3** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-size-adjust - */ - "font-size-adjust"?: FontSizeAdjustProperty | FontSizeAdjustProperty[]; - /** - * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. - * - * **Syntax**: `auto | never | always | <absolute-size> | <length>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :--------------------------------: | :------------------------------: | :--: | :-: | - * | **5** _(-webkit-font-smoothing)_ | **25** _(-moz-osx-font-smoothing)_ | **4** _(-webkit-font-smoothing)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-smooth - */ - "font-smooth"?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[]; - /** - * The **`font-stretch`** CSS property selects a normal, condensed, or expanded face from a font. - * - * **Syntax**: `<font-stretch-absolute>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **60** | **9** | **11** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-stretch - */ - "font-stretch"?: FontStretchProperty | FontStretchProperty[]; - /** - * The **`font-style`** CSS property sets whether a font should be styled with a normal, italic, or oblique face from its `font-family`. - * - * **Syntax**: `normal | italic | oblique <angle>?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-style - */ - "font-style"?: FontStyleProperty | FontStyleProperty[]; - /** - * The **`font-synthesis`** CSS property controls which missing typefaces, bold or italic, may be synthesized by the browser. - * - * **Syntax**: `none | [ weight || style || small-caps ]` - * - * **Initial value**: `weight style` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **97** | **34** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-synthesis - */ - "font-synthesis"?: FontSynthesisProperty | FontSynthesisProperty[]; - /** - * The **font-variant** CSS property is a shorthand for the longhand properties `font-variant-caps`, `font-variant-numeric`, `font-variant-alternates`, `font-variant-ligatures`, and `font-variant-east-asian`. You can also set the CSS Level 2 (Revision 1) values of `font-variant`, (that is, `normal` or `small-caps`), by using the `font` shorthand. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant - */ - "font-variant"?: FontVariantProperty | FontVariantProperty[]; - /** - * The **`font-variant-alternates`** CSS property controls the usage of alternate glyphs. These alternate glyphs may be referenced by alternative names defined in `@font-feature-values`. - * - * **Syntax**: `normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | No | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates - */ - "font-variant-alternates"?: FontVariantAlternatesProperty | FontVariantAlternatesProperty[]; - /** - * The **`font-variant-caps`** CSS property controls the use of alternate glyphs for capital letters. - * - * **Syntax**: `normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **52** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-caps - */ - "font-variant-caps"?: FontVariantCapsProperty | FontVariantCapsProperty[]; - /** - * The **`font-variant-east-asian`** CSS property controls the use of alternate glyphs for East Asian scripts, like Japanese and Chinese. - * - * **Syntax**: `normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **63** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian - */ - "font-variant-east-asian"?: FontVariantEastAsianProperty | FontVariantEastAsianProperty[]; - /** - * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. - * - * **Syntax**: `normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :--: | :-: | - * | **34** | **34** | **9.1** | n/a | No | - * | 31 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures - */ - "font-variant-ligatures"?: FontVariantLigaturesProperty | FontVariantLigaturesProperty[]; - /** - * The **`font-variant-numeric`** CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers. - * - * **Syntax**: `normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **52** | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric - */ - "font-variant-numeric"?: FontVariantNumericProperty | FontVariantNumericProperty[]; - /** - * The **`font-variant-position`** CSS property controls the use of alternate, smaller glyphs that are positioned as superscript or subscript. - * - * **Syntax**: `normal | sub | super` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | No | **34** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variant-position - */ - "font-variant-position"?: FontVariantPositionProperty | FontVariantPositionProperty[]; - /** - * The **`font-variation-settings`** CSS property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values. - * - * **Syntax**: `normal | [ <string> <number> ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **62** | **62** | **11** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-variation-settings - */ - "font-variation-settings"?: FontVariationSettingsProperty | FontVariationSettingsProperty[]; - /** - * The **`font-weight`** CSS property specifies the weight (or boldness) of the font. The font weights available to you will depend on the `font-family` you are using. Some fonts are only available in `normal` and `bold`. - * - * **Syntax**: `<font-weight-absolute> | bolder | lighter` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **2** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font-weight - */ - "font-weight"?: FontWeightProperty | FontWeightProperty[]; - /** - * The **`forced-color-adjust`** CSS property allows authors to opt certain elements out of forced colors mode. This then restores the control of those values to CSS. - * - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :-----------------------------: | :---------------------------------: | - * | **89** | No | No | **79** | **10** _(-ms-high-contrast-adjust)_ | - * | | | | 12 _(-ms-high-contrast-adjust)_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/forced-color-adjust - */ - "forced-color-adjust"?: ForcedColorAdjustProperty | ForcedColorAdjustProperty[]; - /** - * The **`grid-auto-columns`** CSS property specifies the size of an implicitly-created grid column track. - * - * **Syntax**: `<track-size>+` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-------------------------: | - * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns - */ - "grid-auto-columns"?: GridAutoColumnsProperty<TLength> | GridAutoColumnsProperty<TLength>[]; - /** - * The **`grid-auto-flow`** CSS property controls how the auto-placement algorithm works, specifying exactly how auto-placed items get flowed into the grid. - * - * **Syntax**: `[ row | column ] || dense` - * - * **Initial value**: `row` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow - */ - "grid-auto-flow"?: GridAutoFlowProperty | GridAutoFlowProperty[]; - /** - * The **`grid-auto-rows`** CSS property specifies the size of an implicitly-created grid row track. - * - * **Syntax**: `<track-size>+` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----------------------: | - * | **57** | **70** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows - */ - "grid-auto-rows"?: GridAutoRowsProperty<TLength> | GridAutoRowsProperty<TLength>[]; - /** - * The **`grid-column-end`** CSS property specifies a grid item’s end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the block-end edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-end - */ - "grid-column-end"?: GridColumnEndProperty | GridColumnEndProperty[]; - /** - * The **`grid-column-start`** CSS property specifies a grid item’s start position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement. This start position defines the block-start edge of the grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column-start - */ - "grid-column-start"?: GridColumnStartProperty | GridColumnStartProperty[]; - /** - * The **`grid-row-end`** CSS property specifies a grid item’s end position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-end edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-end - */ - "grid-row-end"?: GridRowEndProperty | GridRowEndProperty[]; - /** - * The **`grid-row-start`** CSS property specifies a grid item’s start position within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start edge of its grid area. - * - * **Syntax**: `<grid-line>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row-start - */ - "grid-row-start"?: GridRowStartProperty | GridRowStartProperty[]; - /** - * The **`grid-template-areas`** CSS property specifies named grid areas. - * - * **Syntax**: `none | <string>+` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-areas - */ - "grid-template-areas"?: GridTemplateAreasProperty | GridTemplateAreasProperty[]; - /** - * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. - * - * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-------------------------: | - * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-columns)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-columns - */ - "grid-template-columns"?: GridTemplateColumnsProperty<TLength> | GridTemplateColumnsProperty<TLength>[]; - /** - * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. - * - * **Syntax**: `none | <track-list> | <auto-track-list> | subgrid <line-name-list>?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----------------------: | - * | **57** | **52** | **10.1** | **16** | **10** _(-ms-grid-rows)_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template-rows - */ - "grid-template-rows"?: GridTemplateRowsProperty<TLength> | GridTemplateRowsProperty<TLength>[]; - /** - * The **`hanging-punctuation`** CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box. - * - * **Syntax**: `none | [ first || [ force-end | allow-end ] || last ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | No | **10** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation - */ - "hanging-punctuation"?: HangingPunctuationProperty | HangingPunctuationProperty[]; - /** - * The **`height`** CSS property specifies the height of an element. By default, the property defines the height of the content area. If `box-sizing` is set to `border-box`, however, it instead determines the height of the border area. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/height - */ - height?: HeightProperty<TLength> | HeightProperty<TLength>[]; - /** - * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. - * - * **Syntax**: `auto | <string>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-----------: | :--: | :-: | - * | **6** _-x-_ | **98** | **5.1** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hyphenate-character - */ - "hyphenate-character"?: HyphenateCharacterProperty | HyphenateCharacterProperty[]; - /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. - * - * **Syntax**: `none | manual | auto` - * - * **Initial value**: `manual` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----------: | :----: | :----------: | - * | **55** | **43** | **5.1** _-x-_ | **79** | **10** _-x-_ | - * | 13 _-x-_ | 6 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/hyphens - */ - hyphens?: HyphensProperty | HyphensProperty[]; - /** - * The **`image-orientation`** CSS property specifies a layout-independent correction to the orientation of an image. It should _not_ be used for any other orientation adjustments; instead, the `transform` property should be used with the `rotate` `<transform-function>`. - * - * **Syntax**: `from-image | <angle> | [ <angle>? flip ]` - * - * **Initial value**: `from-image` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **81** | **26** | **13.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/image-orientation - */ - "image-orientation"?: ImageOrientationProperty | ImageOrientationProperty[]; - /** - * The **`image-rendering`** CSS property sets an image scaling algorithm. The property applies to an element itself, to any images set in its other properties, and to its descendants. - * - * **Syntax**: `auto | crisp-edges | pixelated` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **13** | **3.6** | **6** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/image-rendering - */ - "image-rendering"?: ImageRenderingProperty | ImageRenderingProperty[]; - /** - * **Syntax**: `[ from-image || <resolution> ] && snap?` - * - * **Initial value**: `1dppx` - */ - "image-resolution"?: ImageResolutionProperty | ImageResolutionProperty[]; - /** - * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. - * - * **Syntax**: `normal | [ <number> <integer>? ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------: | :--: | :-: | - * | No | No | **9** _-x-_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/initial-letter - */ - "initial-letter"?: InitialLetterProperty | InitialLetterProperty[]; - /** - * The **`inline-size`** CSS property defines the horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `width` or the `height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'width'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inline-size - */ - "inline-size"?: InlineSizeProperty<TLength> | InlineSizeProperty<TLength>[]; - /** - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - */ - "input-security"?: InputSecurityProperty | InputSecurityProperty[]; - /** - * The **`inset`** CSS property defines the logical block and inline start and end offsets of an element, which map to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset - */ - inset?: InsetProperty<TLength> | InsetProperty<TLength>[]; - /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block - */ - "inset-block"?: InsetBlockProperty<TLength> | InsetBlockProperty<TLength>[]; - /** - * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-end - */ - "inset-block-end"?: InsetBlockEndProperty<TLength> | InsetBlockEndProperty<TLength>[]; - /** - * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-block-start - */ - "inset-block-start"?: InsetBlockStartProperty<TLength> | InsetBlockStartProperty<TLength>[]; - /** - * The **`inset-inline`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline - */ - "inset-inline"?: InsetInlineProperty<TLength> | InsetInlineProperty<TLength>[]; - /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-end - */ - "inset-inline-end"?: InsetInlineEndProperty<TLength> | InsetInlineEndProperty<TLength>[]; - /** - * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'top'>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **63** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/inset-inline-start - */ - "inset-inline-start"?: InsetInlineStartProperty<TLength> | InsetInlineStartProperty<TLength>[]; - /** - * The **`isolation`** CSS property determines whether an element must create a new stacking context. - * - * **Syntax**: `auto | isolate` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **41** | **36** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/isolation - */ - isolation?: IsolationProperty | IsolationProperty[]; - /** - * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. - * - * **Syntax**: `normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-content - */ - "justify-content"?: JustifyContentProperty | JustifyContentProperty[]; - /** - * The CSS **`justify-items`** property defines the default `justify-self` for all items of the box, giving them all a default way of justifying each box along the appropriate axis. - * - * **Syntax**: `normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]` - * - * **Initial value**: `legacy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **52** | **20** | **9** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-items - */ - "justify-items"?: JustifyItemsProperty | JustifyItemsProperty[]; - /** - * The CSS **`justify-self`** property set the way a box is justified inside its alignment container along the appropriate axis. - * - * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :----: | - * | **57** | **45** | **10.1** | **16** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-self - */ - "justify-self"?: JustifySelfProperty | JustifySelfProperty[]; - /** - * The **`justify-tracks`** CSS property sets the alignment in the masonry axis for grid containers that have masonry in their inline axis. - * - * **Syntax**: `[ normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ] ]#` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/justify-tracks - */ - "justify-tracks"?: JustifyTracksProperty | JustifyTracksProperty[]; - /** - * The **`left`** CSS property participates in specifying the horizontal position of a _positioned element_. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/left - */ - left?: LeftProperty<TLength> | LeftProperty<TLength>[]; - /** - * The **`letter-spacing`** CSS property sets the spacing behavior between text characters. - * - * **Syntax**: `normal | <length>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/letter-spacing - */ - "letter-spacing"?: LetterSpacingProperty<TLength> | LetterSpacingProperty<TLength>[]; - /** - * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. - * - * **Syntax**: `auto | loose | normal | strict | anywhere` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :-----: | - * | **58** | **69** | **11** | **14** | **5.5** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-break - */ - "line-break"?: LineBreakProperty | LineBreakProperty[]; - /** - * The **`line-height`** CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height. - * - * **Syntax**: `normal | <number> | <length> | <percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-height - */ - "line-height"?: LineHeightProperty<TLength> | LineHeightProperty<TLength>[]; - /** - * The **`line-height-step`** CSS property sets the step unit for line box heights. When the property is set, line box heights are rounded up to the closest multiple of the unit. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/line-height-step - */ - "line-height-step"?: LineHeightStepProperty<TLength> | LineHeightStepProperty<TLength>[]; - /** - * The **`list-style-image`** CSS property sets an image to be used as the list item marker. - * - * **Syntax**: `<image> | none` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-image - */ - "list-style-image"?: ListStyleImageProperty | ListStyleImageProperty[]; - /** - * The **`list-style-position`** CSS property sets the position of the `::marker` relative to a list item. - * - * **Syntax**: `inside | outside` - * - * **Initial value**: `outside` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-position - */ - "list-style-position"?: ListStylePositionProperty | ListStylePositionProperty[]; - /** - * The **`list-style-type`** CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element. - * - * **Syntax**: `<counter-style> | <string> | none` - * - * **Initial value**: `disc` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style-type - */ - "list-style-type"?: ListStyleTypeProperty | ListStyleTypeProperty[]; - /** - * The **`margin-block`** CSS property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block - */ - "margin-block"?: MarginBlockProperty<TLength> | MarginBlockProperty<TLength>[]; - /** - * The **`margin-block-end`** CSS property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-end - */ - "margin-block-end"?: MarginBlockEndProperty<TLength> | MarginBlockEndProperty<TLength>[]; - /** - * The **`margin-block-start`** CSS property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-block-start - */ - "margin-block-start"?: MarginBlockStartProperty<TLength> | MarginBlockStartProperty<TLength>[]; - /** - * The **`margin-bottom`** CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-bottom - */ - "margin-bottom"?: MarginBottomProperty<TLength> | MarginBottomProperty<TLength>[]; - /** - * The **`margin-inline`** CSS property defines the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'margin-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline - */ - "margin-inline"?: MarginInlineProperty<TLength> | MarginInlineProperty<TLength>[]; - /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------------: | :-------------------: | :----------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-margin-end)_ | 3 _(-moz-margin-end)_ | 3 _(-webkit-margin-end)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-end - */ - "margin-inline-end"?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[]; - /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'margin-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :---------------------: | :------------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-margin-start)_ | 3 _(-moz-margin-start)_ | 3 _(-webkit-margin-start)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-inline-start - */ - "margin-inline-start"?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[]; - /** - * The **`margin-left`** CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-left - */ - "margin-left"?: MarginLeftProperty<TLength> | MarginLeftProperty<TLength>[]; - /** - * The **`margin-right`** CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-right - */ - "margin-right"?: MarginRightProperty<TLength> | MarginRightProperty<TLength>[]; - /** - * The **`margin-top`** CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin-top - */ - "margin-top"?: MarginTopProperty<TLength> | MarginTopProperty<TLength>[]; - /** - * The **`mask-border-mode`** CSS property specifies the blending mode used in a mask border. - * - * **Syntax**: `luminance | alpha` - * - * **Initial value**: `alpha` - */ - "mask-border-mode"?: MaskBorderModeProperty | MaskBorderModeProperty[]; - /** - * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. - * - * **Syntax**: `[ <length> | <number> ]{1,4}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-outset)_ | No | **3.1** _(-webkit-mask-box-image-outset)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-outset - */ - "mask-border-outset"?: MaskBorderOutsetProperty<TLength> | MaskBorderOutsetProperty<TLength>[]; - /** - * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. - * - * **Syntax**: `[ stretch | repeat | round | space ]{1,2}` - * - * **Initial value**: `stretch` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-repeat)_ | No | **3.1** _(-webkit-mask-box-image-repeat)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat - */ - "mask-border-repeat"?: MaskBorderRepeatProperty | MaskBorderRepeatProperty[]; - /** - * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. - * - * **Syntax**: `<number-percentage>{1,4} fill?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :--------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-slice)_ | No | **3.1** _(-webkit-mask-box-image-slice)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-slice - */ - "mask-border-slice"?: MaskBorderSliceProperty | MaskBorderSliceProperty[]; - /** - * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. - * - * **Syntax**: `none | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------------------: | :-----: | :---------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-source)_ | No | **3.1** _(-webkit-mask-box-image-source)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-source - */ - "mask-border-source"?: MaskBorderSourceProperty | MaskBorderSourceProperty[]; - /** - * The **`mask-border-width`** CSS property sets the width of an element's mask border. - * - * **Syntax**: `[ <length-percentage> | <number> | auto ]{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------------: | :-----: | :--------------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image-width)_ | No | **3.1** _(-webkit-mask-box-image-width)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border-width - */ - "mask-border-width"?: MaskBorderWidthProperty<TLength> | MaskBorderWidthProperty<TLength>[]; - /** - * The **`mask-clip`** CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area. - * - * **Syntax**: `[ <geometry-box> | no-clip ]#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :--: | :-: | - * | **1** _-x-_ | **53** | **15.4** | n/a | No | - * | | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-clip - */ - "mask-clip"?: MaskClipProperty | MaskClipProperty[]; - /** - * The **`mask-composite`** CSS property represents a compositing operation used on the current mask layer with the mask layers below it. - * - * **Syntax**: `<compositing-operator>#` - * - * **Initial value**: `add` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :---: | :-: | - * | No | **53** | **15.4** | 18-79 | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-composite - */ - "mask-composite"?: MaskCompositeProperty | MaskCompositeProperty[]; - /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. - * - * **Syntax**: `<mask-reference>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 16-79 | No | - * | | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-image - */ - "mask-image"?: MaskImageProperty | MaskImageProperty[]; - /** - * The **`mask-mode`** CSS property sets whether the mask reference defined by `mask-image` is treated as a luminance or alpha mask. - * - * **Syntax**: `<masking-mode>#` - * - * **Initial value**: `match-source` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | No | **53** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-mode - */ - "mask-mode"?: MaskModeProperty | MaskModeProperty[]; - /** - * The **`mask-origin`** CSS property sets the origin of a mask. - * - * **Syntax**: `<geometry-box>#` - * - * **Initial value**: `border-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :--: | :-: | - * | **1** _-x-_ | **53** | **15.4** | n/a | No | - * | | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-origin - */ - "mask-origin"?: MaskOriginProperty | MaskOriginProperty[]; - /** - * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. - * - * **Syntax**: `<position>#` - * - * **Initial value**: `center` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-position - */ - "mask-position"?: MaskPositionProperty<TLength> | MaskPositionProperty<TLength>[]; - /** - * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. - * - * **Syntax**: `<repeat-style>#` - * - * **Initial value**: `no-repeat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :-------: | :---: | :-: | - * | **1** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-repeat - */ - "mask-repeat"?: MaskRepeatProperty | MaskRepeatProperty[]; - /** - * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :---------: | :-----: | :------: | :---: | :-: | - * | **4** _-x-_ | **53** | **15.4** | 18-79 | No | - * | | | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-size - */ - "mask-size"?: MaskSizeProperty<TLength> | MaskSizeProperty<TLength>[]; - /** - * The **`mask-type`** CSS property sets whether an SVG `<mask>` element is used as a _luminance_ or an _alpha_ mask. It applies to the `<mask>` element itself. - * - * **Syntax**: `luminance | alpha` - * - * **Initial value**: `luminance` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **24** | **35** | **7** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-type - */ - "mask-type"?: MaskTypeProperty | MaskTypeProperty[]; - /** - * The **`math-depth`** property describes a notion of _depth_ for each element of a mathematical formula, with respect to the top-level container of that formula. Concretely, this is used to determine the computed value of the font-size property when its specified value is `math`. - * - * **Syntax**: `auto-add | add(<integer>) | <integer>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | n/a | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-depth - */ - "math-depth"?: MathDepthProperty | MathDepthProperty[]; - /** - * The `math-shift` property indicates whether superscripts inside MathML formulas should be raised by a normal or compact shift. - * - * **Syntax**: `normal | compact` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | n/a | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-shift - */ - "math-shift"?: MathShiftProperty | MathShiftProperty[]; - /** - * The `math-style` property indicates whether MathML equations should render with normal or compact height. - * - * **Syntax**: `normal | compact` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | n/a | n/a | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/math-style - */ - "math-style"?: MathStyleProperty | MathStyleProperty[]; - /** - * The `**max-block-size**` CSS property specifies the maximum size of an element in the direction opposite that of the writing direction as specified by `writing-mode`. That is, if the writing direction is horizontal, then `max-block-size` is equivalent to `max-height`; if the writing direction is vertical, `max-block-size` is the same as `max-width`. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-block-size - */ - "max-block-size"?: MaxBlockSizeProperty<TLength> | MaxBlockSizeProperty<TLength>[]; - /** - * The **`max-height`** CSS property sets the maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `max-height`. - * - * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **18** | **1** | **1.3** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-height - */ - "max-height"?: MaxHeightProperty<TLength> | MaxHeightProperty<TLength>[]; - /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block depending on its writing mode. It corresponds to the `max-width` or the `max-height` property depending on the value defined for `writing-mode`. If the writing mode is vertically oriented, the value of `max-inline-size` relates to the maximal height of the element, otherwise it relates to the maximal width of the element. It relates to `max-block-size`, which defines the other dimension of the element. - * - * **Syntax**: `<'max-width'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :--------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * | | | 10.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-inline-size - */ - "max-inline-size"?: MaxInlineSizeProperty<TLength> | MaxInlineSizeProperty<TLength>[]; - /** - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - "max-lines"?: MaxLinesProperty | MaxLinesProperty[]; - /** - * The **`max-width`** CSS property sets the maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified by `max-width`. - * - * **Syntax**: `none | <length-percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/max-width - */ - "max-width"?: MaxWidthProperty<TLength> | MaxWidthProperty<TLength>[]; - /** - * The **`min-block-size`** CSS property defines the minimum horizontal or vertical size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'min-width'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-block-size - */ - "min-block-size"?: MinBlockSizeProperty<TLength> | MinBlockSizeProperty<TLength>[]; - /** - * The **`min-height`** CSS property sets the minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `min-height`. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **3** | **1.3** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-height - */ - "min-height"?: MinHeightProperty<TLength> | MinHeightProperty<TLength>[]; - /** - * The **`min-inline-size`** CSS property defines the horizontal or vertical minimal size of an element's block, depending on its writing mode. It corresponds to either the `min-width` or the `min-height` property, depending on the value of `writing-mode`. - * - * **Syntax**: `<'min-width'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-inline-size - */ - "min-inline-size"?: MinInlineSizeProperty<TLength> | MinInlineSizeProperty<TLength>[]; - /** - * The **`min-width`** CSS property sets the minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `min-width`. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **7** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/min-width - */ - "min-width"?: MinWidthProperty<TLength> | MinWidthProperty<TLength>[]; - /** - * The **`mix-blend-mode`** CSS property sets how an element's content should blend with the content of the element's parent and the element's background. - * - * **Syntax**: `<blend-mode> | plus-lighter` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **41** | **32** | **8** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode - */ - "mix-blend-mode"?: MixBlendModeProperty | MixBlendModeProperty[]; - /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | No | n/a | No | - * | 46 _(motion-distance)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance - */ - "motion-distance"?: OffsetDistanceProperty<TLength> | OffsetDistanceProperty<TLength>[]; - /** - * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. - * - * **Syntax**: `none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------: | :-----: | :------: | :--: | :-: | - * | **55** | **72** | **15.4** | n/a | No | - * | 46 _(motion-path)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-path - */ - "motion-path"?: OffsetPathProperty | OffsetPathProperty[]; - /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - "motion-rotation"?: OffsetRotateProperty | OffsetRotateProperty[]; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **32** | **36** | **10** | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/object-fit - */ - "object-fit"?: ObjectFitProperty | ObjectFitProperty[]; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **32** | **36** | **10** | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/object-position - */ - "object-position"?: ObjectPositionProperty<TLength> | ObjectPositionProperty<TLength>[]; - /** - * **Syntax**: `auto | <position>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **72** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-anchor - */ - "offset-anchor"?: OffsetAnchorProperty<TLength> | OffsetAnchorProperty<TLength>[]; - /** - * The **`offset-distance`** CSS property specifies a position along an `offset-path`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | No | n/a | No | - * | 46 _(motion-distance)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-distance - */ - "offset-distance"?: OffsetDistanceProperty<TLength> | OffsetDistanceProperty<TLength>[]; - /** - * The **`offset-path`** CSS property specifies a motion path for an element to follow and defines the element's positioning within the parent container or SVG coordinate system. - * - * **Syntax**: `none | ray( [ <angle> && <size> && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------------: | :-----: | :------: | :--: | :-: | - * | **55** | **72** | **15.4** | n/a | No | - * | 46 _(motion-path)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-path - */ - "offset-path"?: OffsetPathProperty | OffsetPathProperty[]; - /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - "offset-rotate"?: OffsetRotateProperty | OffsetRotateProperty[]; - /** - * The **`offset-rotate`** CSS property defines the direction of the element while positioning along the offset path. - * - * **Syntax**: `[ auto | reverse ] || <angle>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :--------------------: | :-----: | :----: | :--: | :-: | - * | **56** | **72** | No | n/a | No | - * | 46 _(motion-rotation)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset-rotate - */ - "offset-rotation"?: OffsetRotateProperty | OffsetRotateProperty[]; - /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `1` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **2** | **12** | **9** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/opacity - */ - opacity?: OpacityProperty | OpacityProperty[]; - /** - * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/order - */ - order?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`orphans`** CSS property sets the minimum number of lines in a block container that must be shown at the _bottom_ of a page, region, or column. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `2` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **25** | No | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/orphans - */ - orphans?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`outline-color`** CSS property sets the color of an element's outline. - * - * **Syntax**: `<color> | invert` - * - * **Initial value**: `invert`, for browsers supporting it, `currentColor` for the other - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-color - */ - "outline-color"?: OutlineColorProperty | OutlineColorProperty[]; - /** - * The **`outline-offset`** CSS property sets the amount of space between an outline and the edge or border of an element. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-: | - * | **1** | **1.5** | **1.2** | **15** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-offset - */ - "outline-offset"?: OutlineOffsetProperty<TLength> | OutlineOffsetProperty<TLength>[]; - /** - * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `auto | <'border-style'>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-style - */ - "outline-style"?: OutlineStyleProperty | OutlineStyleProperty[]; - /** - * The **`outline-width`** CSS property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. - * - * **Syntax**: `<line-width>` - * - * **Initial value**: `medium` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline-width - */ - "outline-width"?: OutlineWidthProperty<TLength> | OutlineWidthProperty<TLength>[]; - /** - * **Syntax**: `auto | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **56** | **66** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-anchor - */ - "overflow-anchor"?: OverflowAnchorProperty | OverflowAnchorProperty[]; - /** - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **69** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-block - */ - "overflow-block"?: OverflowBlockProperty | OverflowBlockProperty[]; - /** - * The **`overflow-clip-box`** CSS property specifies relative to which box the clipping happens when there is an overflow. It is short hand for the `overflow-clip-box-inline` and `overflow-clip-box-block` properties. - * - * **Syntax**: `padding-box | content-box` - * - * **Initial value**: `padding-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **29** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Mozilla/Gecko/Chrome/CSS/overflow-clip-box - */ - "overflow-clip-box"?: OverflowClipBoxProperty | OverflowClipBoxProperty[]; - /** - * **Syntax**: `<visual-box> || <length [0,∞]>` - * - * **Initial value**: `0px` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **90** | No | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-clip-margin - */ - "overflow-clip-margin"?: OverflowClipMarginProperty<TLength> | OverflowClipMarginProperty<TLength>[]; - /** - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **69** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-inline - */ - "overflow-inline"?: OverflowInlineProperty | OverflowInlineProperty[]; - /** - * The `**overflow-wrap**` CSS property sets whether the browser should insert line breaks within words to prevent text from overflowing its content box. - * - * **Syntax**: `normal | break-word | anywhere` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------: | :---------------: | :-------------: | :--------------: | :-------------------: | - * | **23** | **49** | **7** | **18** | **5.5** _(word-wrap)_ | - * | 1 _(word-wrap)_ | 3.5 _(word-wrap)_ | 1 _(word-wrap)_ | 12 _(word-wrap)_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-wrap - */ - "overflow-wrap"?: OverflowWrapProperty | OverflowWrapProperty[]; - /** - * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **3.5** | **3** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-x - */ - "overflow-x"?: OverflowXProperty | OverflowXProperty[]; - /** - * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. - * - * **Syntax**: `visible | hidden | clip | scroll | auto` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **3.5** | **3** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow-y - */ - "overflow-y"?: OverflowYProperty | OverflowYProperty[]; - /** - * The **`overscroll-behavior-block`** CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **77** | **73** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block - */ - "overscroll-behavior-block"?: OverscrollBehaviorBlockProperty | OverscrollBehaviorBlockProperty[]; - /** - * The **`overscroll-behavior-inline`** CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **77** | **73** | **16** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline - */ - "overscroll-behavior-inline"?: OverscrollBehaviorInlineProperty | OverscrollBehaviorInlineProperty[]; - /** - * The **`overscroll-behavior-x`** CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x - */ - "overscroll-behavior-x"?: OverscrollBehaviorXProperty | OverscrollBehaviorXProperty[]; - /** - * The **`overscroll-behavior-y`** CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. - * - * **Syntax**: `contain | none | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y - */ - "overscroll-behavior-y"?: OverscrollBehaviorYProperty | OverscrollBehaviorYProperty[]; - /** - * The **`padding-block`** CSS property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block - */ - "padding-block"?: PaddingBlockProperty<TLength> | PaddingBlockProperty<TLength>[]; - /** - * The **`padding-block-end`** CSS property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-end - */ - "padding-block-end"?: PaddingBlockEndProperty<TLength> | PaddingBlockEndProperty<TLength>[]; - /** - * The **`padding-block-start`** CSS property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-block-start - */ - "padding-block-start"?: PaddingBlockStartProperty<TLength> | PaddingBlockStartProperty<TLength>[]; - /** - * The **`padding-bottom`** CSS property sets the height of the padding area on the bottom of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-bottom - */ - "padding-bottom"?: PaddingBottomProperty<TLength> | PaddingBottomProperty<TLength>[]; - /** - * The **`padding-inline`** CSS property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. - * - * **Syntax**: `<'padding-left'>{1,2}` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline - */ - "padding-inline"?: PaddingInlineProperty<TLength> | PaddingInlineProperty<TLength>[]; - /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------------------: | :--------------------: | :-----------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-padding-end)_ | 3 _(-moz-padding-end)_ | 3 _(-webkit-padding-end)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-end - */ - "padding-inline-end"?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[]; - /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. - * - * **Syntax**: `<'padding-left'>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-------------------------: | :----------------------: | :-------------------------: | :--: | :-: | - * | **87** | **41** | **12.1** | n/a | No | - * | 2 _(-webkit-padding-start)_ | 3 _(-moz-padding-start)_ | 3 _(-webkit-padding-start)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-inline-start - */ - "padding-inline-start"?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[]; - /** - * The **`padding-left`** CSS property sets the width of the padding area on the left side of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-left - */ - "padding-left"?: PaddingLeftProperty<TLength> | PaddingLeftProperty<TLength>[]; - /** - * The **`padding-right`** CSS property sets the width of the padding area on the right side of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-right - */ - "padding-right"?: PaddingRightProperty<TLength> | PaddingRightProperty<TLength>[]; - /** - * The **`padding-top`** padding area on the top of an element. - * - * **Syntax**: `<length> | <percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding-top - */ - "padding-top"?: PaddingTopProperty<TLength> | PaddingTopProperty<TLength>[]; - /** - * The **`page-break-after`** CSS property adjusts page breaks _after_ the current element. - * - * **Syntax**: `auto | always | avoid | left | right | recto | verso` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-after - */ - "page-break-after"?: PageBreakAfterProperty | PageBreakAfterProperty[]; - /** - * The **`page-break-before`** CSS property adjusts page breaks _before_ the current element. - * - * **Syntax**: `auto | always | avoid | left | right | recto | verso` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1** | **1.2** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-before - */ - "page-break-before"?: PageBreakBeforeProperty | PageBreakBeforeProperty[]; - /** - * The **`page-break-inside`** CSS property adjusts page breaks _inside_ the current element. - * - * **Syntax**: `auto | avoid` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **19** | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/page-break-inside - */ - "page-break-inside"?: PageBreakInsideProperty | PageBreakInsideProperty[]; - /** - * The **`paint-order`** CSS property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn. - * - * **Syntax**: `normal | [ fill || stroke || markers ]` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **35** | **60** | **8** | **17** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/paint-order - */ - "paint-order"?: PaintOrderProperty | PaintOrderProperty[]; - /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/perspective - */ - perspective?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[]; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/perspective-origin - */ - "perspective-origin"?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[]; - /** - * The `**place-content**` CSS property is a shorthand for `align-content` and `justify-content`. It can be used in any layout method which utilizes both of these alignment values. - * - * **Syntax**: `<'align-content'> <'justify-content'>?` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **9** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-content - */ - "place-content"?: PlaceContentProperty | PlaceContentProperty[]; - /** - * The **`pointer-events`** CSS property sets under what circumstances (if any) a particular graphic element can become the target of mouse events. - * - * **Syntax**: `auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | **1** | **1.5** | **4** | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/pointer-events - */ - "pointer-events"?: PointerEventsProperty | PointerEventsProperty[]; - /** - * The **`position`** CSS property sets how an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements. - * - * **Syntax**: `static | relative | absolute | sticky | fixed` - * - * **Initial value**: `static` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/position - */ - position?: PositionProperty | PositionProperty[]; - /** - * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. - * - * **Syntax**: `economy | exact` - * - * **Initial value**: `economy` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----------: | :-----------------: | :------: | :----------: | :-: | - * | **17** _-x-_ | **97** | **15.4** | **79** _-x-_ | No | - * | | 48 _(color-adjust)_ | 6 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/print-color-adjust - */ - "print-color-adjust"?: PrintColorAdjustProperty | PrintColorAdjustProperty[]; - /** - * The **`quotes`** CSS property sets how quotation marks appear. - * - * **Syntax**: `none | auto | [ <string> <string> ]+` - * - * **Initial value**: depends on user agent - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **11** | **1.5** | **9** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/quotes - */ - quotes?: QuotesProperty | QuotesProperty[]; - /** - * The **`resize`** CSS property sets whether an element is resizable, and if so, in which directions. - * - * **Syntax**: `none | both | horizontal | vertical | block | inline` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **1** | **4** | **3** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/resize - */ - resize?: ResizeProperty | ResizeProperty[]; - /** - * The **`right`** CSS property participates in specifying the horizontal position of a _positioned element_. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/right - */ - right?: RightProperty<TLength> | RightProperty<TLength>[]; - /** - * The **`rotate`** CSS property allows you to specify rotation transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <angle> | [ x | y | z | <number>{3} ] && <angle>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/rotate - */ - rotate?: RotateProperty | RotateProperty[]; - /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's grid rows. - * - * **Syntax**: `normal | <length-percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **47** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/row-gap - */ - "row-gap"?: RowGapProperty<TLength> | RowGapProperty<TLength>[]; - /** - * The `**ruby-align**` CSS property defines the distribution of the different ruby elements over the base. - * - * **Syntax**: `start | center | space-between | space-around` - * - * **Initial value**: `space-around` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **38** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/ruby-align - */ - "ruby-align"?: RubyAlignProperty | RubyAlignProperty[]; - /** - * **Syntax**: `separate | collapse | auto` - * - * **Initial value**: `separate` - */ - "ruby-merge"?: RubyMergeProperty | RubyMergeProperty[]; - /** - * The `**ruby-position**` CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (`over`), under it (`under`), or between the characters, on their right side (`inter-character`). - * - * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` - * - * **Initial value**: `alternate` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :---: | :-: | - * | **84** | **38** | **7** _-x-_ | 12-79 | No | - * | 1 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/ruby-position - */ - "ruby-position"?: RubyPositionProperty | RubyPositionProperty[]; - /** - * The **`scale`** CSS property allows you to specify scale transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <number>{1,3}` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scale - */ - scale?: ScaleProperty | ScaleProperty[]; - /** - * The **`scroll-behavior`** CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs. - * - * **Syntax**: `auto | smooth` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **61** | **36** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-behavior - */ - "scroll-behavior"?: ScrollBehaviorProperty | ScrollBehaviorProperty[]; - /** - * The **`scroll-margin`** property is a shorthand property which sets all of the `scroll-margin` longhands, assigning values much like the `margin` property does for the `margin-*` longhands. + * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. * * **Syntax**: `<length>{1,4}` * - * **Initial value**: `0` - * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :-----------------------: | :--: | :-: | * | **69** | **90** | **14.1** | n/a | No | @@ -29906,332 +15108,72 @@ export interface StandardLonghandPropertiesHyphenFallback<TLength = string | 0> * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin */ - "scroll-margin"?: ScrollMarginProperty<TLength> | ScrollMarginProperty<TLength>[]; + "scroll-margin"?: Property.ScrollMargin<TLength> | undefined; /** - * The `scroll-margin-block` property is a shorthand property which sets the scroll-margin longhands in the block dimension. + * The `scroll-margin-block` shorthand property sets the scroll margins of an element in the block dimension. * * **Syntax**: `<length>{1,2}` * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block */ - "scroll-margin-block"?: ScrollMarginBlockProperty<TLength> | ScrollMarginBlockProperty<TLength>[]; + "scroll-margin-block"?: Property.ScrollMarginBlock<TLength> | undefined; /** - * The `scroll-margin-block-end` property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end - */ - "scroll-margin-block-end"?: ScrollMarginBlockEndProperty<TLength> | ScrollMarginBlockEndProperty<TLength>[]; - /** - * The `scroll-margin-block-start` property defines the margin of the scroll snap area at the start of the block dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start - */ - "scroll-margin-block-start"?: ScrollMarginBlockStartProperty<TLength> | ScrollMarginBlockStartProperty<TLength>[]; - /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-bottom)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom - */ - "scroll-margin-bottom"?: ScrollMarginBottomProperty<TLength> | ScrollMarginBottomProperty<TLength>[]; - /** - * The `scroll-margin-inline` property is a shorthand property which sets the scroll-margin longhands in the inline dimension. + * The `scroll-margin-inline` shorthand property sets the scroll margins of an element in the inline dimension. * * **Syntax**: `<length>{1,2}` * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | + * | Chrome | Firefox | Safari | Edge | IE | + * | :----: | :-----: | :----: | :--: | :-: | + * | **69** | **68** | **15** | n/a | No | * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline */ - "scroll-margin-inline"?: ScrollMarginInlineProperty<TLength> | ScrollMarginInlineProperty<TLength>[]; + "scroll-margin-inline"?: Property.ScrollMarginInline<TLength> | undefined; /** - * The `scroll-margin-inline-end` property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The **`scroll-padding`** shorthand property sets scroll padding on all sides of an element at once, much like the `padding` property does for padding on an element. * - * **Syntax**: `<length>` - * - * **Initial value**: `0` + * **Syntax**: `[ auto | <length-percentage> ]{1,4}` * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :------: | :--: | :-: | * | **69** | **68** | **14.1** | n/a | No | * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding */ - "scroll-margin-inline-end"?: ScrollMarginInlineEndProperty<TLength> | ScrollMarginInlineEndProperty<TLength>[]; + "scroll-padding"?: Property.ScrollPadding<TLength> | undefined; /** - * The `scroll-margin-inline-start` property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The `scroll-padding-block` shorthand property sets the scroll padding of an element in the block dimension. * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start - */ - "scroll-margin-inline-start"?: ScrollMarginInlineStartProperty<TLength> | ScrollMarginInlineStartProperty<TLength>[]; - /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-left)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left - */ - "scroll-margin-left"?: ScrollMarginLeftProperty<TLength> | ScrollMarginLeftProperty<TLength>[]; - /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-right)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right - */ - "scroll-margin-right"?: ScrollMarginRightProperty<TLength> | ScrollMarginRightProperty<TLength>[]; - /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-top)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top - */ - "scroll-margin-top"?: ScrollMarginTopProperty<TLength> | ScrollMarginTopProperty<TLength>[]; - /** - * The scroll-padding property is a shorthand property which sets all of the scroll-padding longhands, assigning values much like the padding property does for the padding-\* longhands. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,4}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding - */ - "scroll-padding"?: ScrollPaddingProperty<TLength> | ScrollPaddingProperty<TLength>[]; - /** - * The `scroll-padding-block` property is a shorthand property which sets the scroll-padding longhands for the block dimension. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block - */ - "scroll-padding-block"?: ScrollPaddingBlockProperty<TLength> | ScrollPaddingBlockProperty<TLength>[]; - /** - * The `scroll-padding-block-end` property defines offsets for the end edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` + * **Syntax**: `[ auto | <length-percentage> ]{1,2}` * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :----: | :--: | :-: | * | **69** | **68** | **15** | n/a | No | * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block */ - "scroll-padding-block-end"?: ScrollPaddingBlockEndProperty<TLength> | ScrollPaddingBlockEndProperty<TLength>[]; + "scroll-padding-block"?: Property.ScrollPaddingBlock<TLength> | undefined; /** - * The `scroll-padding-block-start` property defines offsets for the start edge in the block dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. + * The `scroll-padding-inline` shorthand property sets the scroll padding of an element in the inline dimension. * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` + * **Syntax**: `[ auto | <length-percentage> ]{1,2}` * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :----: | :--: | :-: | * | **69** | **68** | **15** | n/a | No | * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline */ - "scroll-padding-block-start"?: ScrollPaddingBlockStartProperty<TLength> | ScrollPaddingBlockStartProperty<TLength>[]; + "scroll-padding-inline"?: Property.ScrollPaddingInline<TLength> | undefined; /** - * The `scroll-padding-bottom` property defines offsets for the bottom of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom - */ - "scroll-padding-bottom"?: ScrollPaddingBottomProperty<TLength> | ScrollPaddingBottomProperty<TLength>[]; - /** - * The `scroll-padding-inline` property is a shorthand property which sets the scroll-padding longhands for the inline dimension. - -The scroll-padding properties define offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `[ auto | <length-percentage> ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline - */ - "scroll-padding-inline"?: ScrollPaddingInlineProperty<TLength> | ScrollPaddingInlineProperty<TLength>[]; - /** - * The `scroll-padding-inline-end` property defines offsets for the end edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end - */ - "scroll-padding-inline-end"?: ScrollPaddingInlineEndProperty<TLength> | ScrollPaddingInlineEndProperty<TLength>[]; - /** - * The `scroll-padding-inline-start` property defines offsets for the start edge in the inline dimension of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start - */ - "scroll-padding-inline-start"?: ScrollPaddingInlineStartProperty<TLength> | ScrollPaddingInlineStartProperty<TLength>[]; - /** - * The `scroll-padding-left` property defines offsets for the left of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left - */ - "scroll-padding-left"?: ScrollPaddingLeftProperty<TLength> | ScrollPaddingLeftProperty<TLength>[]; - /** - * The `scroll-padding-right` property defines offsets for the right of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right - */ - "scroll-padding-right"?: ScrollPaddingRightProperty<TLength> | ScrollPaddingRightProperty<TLength>[]; - /** - * The `scroll-padding-top` property defines offsets for the top of the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user. This allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport. - * - * **Syntax**: `auto | <length-percentage>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top - */ - "scroll-padding-top"?: ScrollPaddingTopProperty<TLength> | ScrollPaddingTopProperty<TLength>[]; - /** - * The `scroll-snap-align` property specifies the box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value. - * - * **Syntax**: `[ none | start | end | center ]{1,2}` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **69** | **68** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align - */ - "scroll-snap-align"?: ScrollSnapAlignProperty | ScrollSnapAlignProperty[]; - /** - * The **`scroll-margin`** property is a shorthand property which sets all of the `scroll-margin` longhands, assigning values much like the `margin` property does for the `margin-*` longhands. + * The **`scroll-margin`** shorthand property sets all of the scroll margins of an element at once, assigning values much like the `margin` property does for margins of an element. * * **Syntax**: `<length>{1,4}` * - * **Initial value**: `0` - * * | Chrome | Firefox | Safari | Edge | IE | * | :----: | :-----: | :-----------------------: | :--: | :-: | * | **69** | 68-90 | **14.1** | n/a | No | @@ -30239,1425 +15181,21 @@ The scroll-padding properties define offsets for the optimal viewing region of * * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin */ - "scroll-snap-margin"?: ScrollMarginProperty<TLength> | ScrollMarginProperty<TLength>[]; + "scroll-snap-margin"?: Property.ScrollMargin<TLength> | undefined; /** - * The `scroll-margin-bottom` property defines the bottom margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. + * The **`scroll-timeline`** CSS shorthand property defines a name that can be used to identify the source element of a scroll timeline, along with the scrollbar axis that should provide the timeline. * - * **Syntax**: `<length>` + * **Syntax**: `[ <'scroll-timeline-name'> <'scroll-timeline-axis'>? ]#` * - * **Initial value**: `0` + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-bottom)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom - */ - "scroll-snap-margin-bottom"?: ScrollMarginBottomProperty<TLength> | ScrollMarginBottomProperty<TLength>[]; - /** - * The `scroll-margin-left` property defines the left margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-left)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left - */ - "scroll-snap-margin-left"?: ScrollMarginLeftProperty<TLength> | ScrollMarginLeftProperty<TLength>[]; - /** - * The `scroll-margin-right` property defines the right margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-right)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right - */ - "scroll-snap-margin-right"?: ScrollMarginRightProperty<TLength> | ScrollMarginRightProperty<TLength>[]; - /** - * The `scroll-margin-top` property defines the top margin of the scroll snap area that is used for snapping this box to the snapport. The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets. - * - * **Syntax**: `<length>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :---------------------------: | :--: | :-: | - * | **69** | **68** | **14.1** | n/a | No | - * | | | 11 _(scroll-snap-margin-top)_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top - */ - "scroll-snap-margin-top"?: ScrollMarginTopProperty<TLength> | ScrollMarginTopProperty<TLength>[]; - /** - * The **`scroll-snap-stop`** CSS property defines whether the scroll container is allowed to "pass over" possible snap positions. - * - * **Syntax**: `normal | always` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **75** | **103** | **15** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop - */ - "scroll-snap-stop"?: ScrollSnapStopProperty | ScrollSnapStopProperty[]; - /** - * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. - * - * **Syntax**: `none | [ x | y | block | inline | both ] [ mandatory | proximity ]?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----------: | - * | **69** | 39-68 | **11** | **79** | **10** _-x-_ | - * | | | 9 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type - */ - "scroll-snap-type"?: ScrollSnapTypeProperty | ScrollSnapTypeProperty[]; - /** - * The **`scrollbar-color`** CSS property sets the color of the scrollbar track and thumb. - * - * **Syntax**: `auto | <color>{2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **64** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-color - */ - "scrollbar-color"?: ScrollbarColorProperty | ScrollbarColorProperty[]; - /** - * The **`scrollbar-gutter`** CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn't needed. - * - * **Syntax**: `auto | stable && both-edges?` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **94** | **97** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-gutter - */ - "scrollbar-gutter"?: ScrollbarGutterProperty | ScrollbarGutterProperty[]; - /** - * The `scrollbar-width` property allows the author to set the maximum thickness of an element’s scrollbars when they are shown. - * - * **Syntax**: `auto | thin | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | No | **64** | No | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/scrollbar-width - */ - "scrollbar-width"?: ScrollbarWidthProperty | ScrollbarWidthProperty[]; - /** - * The **`shape-image-threshold`** CSS property sets the alpha channel threshold used to extract the shape using an image as the value for `shape-outside`. - * - * **Syntax**: `<alpha-value>` - * - * **Initial value**: `0.0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold - */ - "shape-image-threshold"?: ShapeImageThresholdProperty | ShapeImageThresholdProperty[]; - /** - * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. - * - * **Syntax**: `<length-percentage>` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-margin - */ - "shape-margin"?: ShapeMarginProperty<TLength> | ShapeMarginProperty<TLength>[]; - /** - * The **`shape-outside`** CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap. By default, inline content wraps around its margin box; `shape-outside` provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple boxes. - * - * **Syntax**: `none | [ <shape-box> || <basic-shape> ] | <image>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **37** | **62** | **10.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/shape-outside - */ - "shape-outside"?: ShapeOutsideProperty | ShapeOutsideProperty[]; - /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **21** | **91** | **7** | n/a | No | - * | | 4 _-x-_ | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/tab-size - */ - "tab-size"?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[]; - /** - * The **`table-layout`** CSS property sets the algorithm used to lay out `<table>` cells, rows, and columns. - * - * **Syntax**: `auto | fixed` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **14** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/table-layout - */ - "table-layout"?: TableLayoutProperty | TableLayoutProperty[]; - /** - * The **`text-align`** CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like `vertical-align` but in the horizontal direction. - * - * **Syntax**: `start | end | left | right | center | justify | match-parent` - * - * **Initial value**: `start`, or a nameless value that acts as `left` if _direction_ is `ltr`, `right` if _direction_ is `rtl` if `start` is not supported by the browser. - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-align - */ - "text-align"?: TextAlignProperty | TextAlignProperty[]; - /** - * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. - * - * **Syntax**: `auto | start | end | left | right | center | justify` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **47** | **49** | **16** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-align-last - */ - "text-align-last"?: TextAlignLastProperty | TextAlignLastProperty[]; - /** - * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. - * - * **Syntax**: `none | all | [ digits <integer>? ]` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------: | :-----: | :------------------------------: | :---: | :------------------------------------: | - * | **48** | **48** | **5.1** _(-webkit-text-combine)_ | 15-79 | **11** _(-ms-text-combine-horizontal)_ | - * | 9 _(-webkit-text-combine)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-combine-upright - */ - "text-combine-upright"?: TextCombineUprightProperty | TextCombineUprightProperty[]; - /** - * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-color - */ - "text-decoration-color"?: TextDecorationColorProperty | TextDecorationColorProperty[]; - /** - * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. - * - * **Syntax**: `none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-line - */ - "text-decoration-line"?: TextDecorationLineProperty | TextDecorationLineProperty[]; - /** - * The **`text-decoration-skip`** CSS property sets what parts of an element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. - * - * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` - * - * **Initial value**: `objects` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | 57-64 | No | **12.1** | n/a | No | - * | | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip - */ - "text-decoration-skip"?: TextDecorationSkipProperty | TextDecorationSkipProperty[]; - /** - * The **`text-decoration-skip-ink`** CSS property specifies how overlines and underlines are drawn when they pass over glyph ascenders and descenders. - * - * **Syntax**: `auto | all | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **64** | **70** | **15.4** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink - */ - "text-decoration-skip-ink"?: TextDecorationSkipInkProperty | TextDecorationSkipInkProperty[]; - /** - * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. - * - * **Syntax**: `solid | double | dotted | dashed | wavy` - * - * **Initial value**: `solid` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **57** | **36** | **12.1** | n/a | No | - * | | | 8 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-style - */ - "text-decoration-style"?: TextDecorationStyleProperty | TextDecorationStyleProperty[]; - /** - * The **`text-decoration-thickness`** CSS property sets the thickness, or width, of the decoration line that is used on text in an element, such as a line-through, underline, or overline. - * - * **Syntax**: `auto | from-font | <length> | <percentage> ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **89** | **70** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness - */ - "text-decoration-thickness"?: TextDecorationThicknessProperty<TLength> | TextDecorationThicknessProperty<TLength>[]; - /** - * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. - * - * **Syntax**: `<color>` - * - * **Initial value**: `currentcolor` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color - */ - "text-emphasis-color"?: TextEmphasisColorProperty | TextEmphasisColorProperty[]; - /** - * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. - * - * **Syntax**: `[ over | under ] && [ right | left ]` - * - * **Initial value**: `over right` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position - */ - "text-emphasis-position"?: GlobalsString | GlobalsString[]; - /** - * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. - * - * **Syntax**: `none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :----: | :--: | :-: | - * | **99** | **46** | **7** | n/a | No | - * | 25 _-x-_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style - */ - "text-emphasis-style"?: TextEmphasisStyleProperty | TextEmphasisStyleProperty[]; - /** - * The **`text-indent`** CSS property sets the length of empty space (indentation) that is put before lines of text in a block. - * - * **Syntax**: `<length-percentage> && hanging? && each-line?` - * - * **Initial value**: `0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-indent - */ - "text-indent"?: TextIndentProperty<TLength> | TextIndentProperty<TLength>[]; - /** - * The **`text-justify`** CSS property sets what type of justification should be applied to text when `text-align``: justify;` is set on an element. - * - * **Syntax**: `auto | inter-character | inter-word | none` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :----: | - * | n/a | **55** | No | **12** | **11** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-justify - */ - "text-justify"?: TextJustifyProperty | TextJustifyProperty[]; - /** - * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. - * - * **Syntax**: `mixed | upright | sideways` - * - * **Initial value**: `mixed` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-------: | :--: | :-: | - * | **48** | **41** | **14** | n/a | No | - * | 11 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-orientation - */ - "text-orientation"?: TextOrientationProperty | TextOrientationProperty[]; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **7** | **1.3** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-overflow - */ - "text-overflow"?: TextOverflowProperty | TextOverflowProperty[]; - /** - * The **`text-rendering`** CSS property provides information to the rendering engine about what to optimize for when rendering text. - * - * **Syntax**: `auto | optimizeSpeed | optimizeLegibility | geometricPrecision` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **4** | **1** | **5** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-rendering - */ - "text-rendering"?: TextRenderingProperty | TextRenderingProperty[]; - /** - * The **`text-shadow`** CSS property adds shadows to text. It accepts a comma-separated list of shadows to be applied to the text and any of its `decorations`. Each shadow is described by some combination of X and Y offsets from the element, blur radius, and color. - * - * **Syntax**: `none | <shadow-t>#` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **2** | **3.5** | **1.1** | **12** | **10** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-shadow - */ - "text-shadow"?: TextShadowProperty | TextShadowProperty[]; - /** - * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. - * - * **Syntax**: `none | auto | <percentage>` - * - * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **54** | No | No | **79** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-size-adjust - */ - "text-size-adjust"?: TextSizeAdjustProperty | TextSizeAdjustProperty[]; - /** - * The **`text-transform`** CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby - * - * **Syntax**: `none | capitalize | uppercase | lowercase | full-width | full-size-kana` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-transform - */ - "text-transform"?: TextTransformProperty | TextTransformProperty[]; - /** - * The **`text-underline-offset`** CSS property sets the offset distance of an underline text decoration line (applied using `text-decoration`) from its original position. - * - * **Syntax**: `auto | <length> | <percentage> ` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **70** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-offset - */ - "text-underline-offset"?: TextUnderlineOffsetProperty<TLength> | TextUnderlineOffsetProperty<TLength>[]; - /** - * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. - * - * **Syntax**: `auto | from-font | [ under || [ left | right ] ]` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :---: | - * | **33** | **74** | **12.1** | **12** | **6** | - * | | | 9 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/text-underline-position - */ - "text-underline-position"?: TextUnderlinePositionProperty | TextUnderlinePositionProperty[]; - /** - * The **`top`** CSS property participates in specifying the vertical position of a _positioned element_. It has no effect on non-positioned elements. - * - * **Syntax**: `<length> | <percentage> | auto` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/top - */ - top?: TopProperty<TLength> | TopProperty<TLength>[]; - /** - * The **`touch-action`** CSS property sets how a region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). - * - * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :------: | - * | **36** | **52** | **13** | **12** | **11** | - * | | | | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/touch-action - */ - "touch-action"?: TouchActionProperty | TouchActionProperty[]; - /** - * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. - * - * **Syntax**: `none | <transform-list>` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3.1 _-x-_ | | 9 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform - */ - transform?: TransformProperty | TransformProperty[]; - /** - * The **`transform-box`** CSS property defines the layout box to which the `transform` and `transform-origin` properties relate. - * - * **Syntax**: `content-box | border-box | fill-box | stroke-box | view-box` - * - * **Initial value**: `view-box` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **64** | **55** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-box - */ - "transform-box"?: TransformBoxProperty | TransformBoxProperty[]; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-------: | :-----: | :----: | :-----: | - * | **36** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 3.5 _-x-_ | 2 _-x-_ | | 9 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-origin - */ - "transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :------: | :-----: | :----: | :-: | - * | **36** | **16** | **9** | **12** | No | - * | 12 _-x-_ | 10 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transform-style - */ - "transform-style"?: TransformStyleProperty | TransformStyleProperty[]; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-delay - */ - "transition-delay"?: GlobalsString | GlobalsString[]; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-duration - */ - "transition-duration"?: GlobalsString | GlobalsString[]; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-property - */ - "transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[]; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :----: | - * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/transition-timing-function - */ - "transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; - /** - * The **`translate`** CSS property allows you to specify translation transforms individually and independantly of the `transform` property. This maps better to typical user interface usage, and saves having to remember the exact order of transform functions to specify in the `transform` value. - * - * **Syntax**: `none | <length-percentage> [ <length-percentage> <length>? ]?` - * - * **Initial value**: `none` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :------: | :--: | :-: | - * | **104** | **72** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/translate - */ - translate?: TranslateProperty<TLength> | TranslateProperty<TLength>[]; - /** - * The **`unicode-bidi`** CSS property, together with the `direction` property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The `unicode-bidi` property overrides this algorithm and allows the developer to control the text embedding. - * - * **Syntax**: `normal | embed | isolate | bidi-override | isolate-override | plaintext` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-----: | - * | **2** | **1** | **1.3** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/unicode-bidi - */ - "unicode-bidi"?: UnicodeBidiProperty | UnicodeBidiProperty[]; - /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. - * - * **Syntax**: `auto | text | none | contain | all` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :---------: | :------: | :----------: | - * | **54** | **69** | **3** _-x-_ | **79** | **10** _-x-_ | - * | 1 _-x-_ | 1 _-x-_ | | 12 _-x-_ | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/user-select - */ - "user-select"?: UserSelectProperty | UserSelectProperty[]; - /** - * The **`vertical-align`** CSS property sets vertical alignment of an inline or table-cell box. - * - * **Syntax**: `baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>` - * - * **Initial value**: `baseline` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/vertical-align - */ - "vertical-align"?: VerticalAlignProperty<TLength> | VerticalAlignProperty<TLength>[]; - /** - * The **`visibility`** CSS property shows or hides an element without changing the layout of a document. The property can also hide rows or columns in a `<table>`. - * - * **Syntax**: `visible | hidden | collapse` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/visibility - */ - visibility?: VisibilityProperty | VisibilityProperty[]; - /** - * The **`white-space`** CSS property sets how white space inside an element is handled. - * - * **Syntax**: `normal | pre | nowrap | pre-wrap | pre-line | break-spaces` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/white-space - */ - "white-space"?: WhiteSpaceProperty | WhiteSpaceProperty[]; - /** - * The **`widows`** CSS property sets the minimum number of lines in a block container that must be shown at the _top_ of a page, region, or column. - * - * **Syntax**: `<integer>` - * - * **Initial value**: `2` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **25** | No | **1.3** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/widows - */ - widows?: GlobalsNumber | GlobalsNumber[]; - /** - * The **`width`** CSS property sets an element's width. By default it sets the width of the content area, but if `box-sizing` is set to `border-box`, it sets the width of the border area. - * - * **Syntax**: `auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content(<length-percentage>)` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/width - */ - width?: WidthProperty<TLength> | WidthProperty<TLength>[]; - /** - * The **`will-change`** CSS property hints to browsers how an element is expected to change. Browsers may set up optimizations before an element is actually changed. These kinds of optimizations can increase the responsiveness of a page by doing potentially expensive work before they are actually required. - * - * **Syntax**: `auto | <animateable-feature>#` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **36** | **36** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/will-change - */ - "will-change"?: WillChangeProperty | WillChangeProperty[]; - /** - * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. - * - * **Syntax**: `normal | break-all | keep-all | break-word` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **15** | **3** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/word-break - */ - "word-break"?: WordBreakProperty | WordBreakProperty[]; - /** - * The **`word-spacing`** CSS property sets the length of space between words and between tags. - * - * **Syntax**: `normal | <length>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **6** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/word-spacing - */ - "word-spacing"?: WordSpacingProperty<TLength> | WordSpacingProperty<TLength>[]; - /** - * The `**overflow-wrap**` CSS property sets whether the browser should insert line breaks within words to prevent text from overflowing its content box. - * - * **Syntax**: `normal | break-word` - * - * **Initial value**: `normal` - */ - "word-wrap"?: WordWrapProperty | WordWrapProperty[]; - /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. - * - * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` - * - * **Initial value**: `horizontal-tb` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-------: | :----: | :---: | - * | **48** | **41** | **10.1** | **12** | **9** | - * | 8 _-x-_ | | 5.1 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/writing-mode - */ - "writing-mode"?: WritingModeProperty | WritingModeProperty[]; - /** - * The **`z-index`** CSS property sets the z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one. - * - * **Syntax**: `auto | <integer>` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/z-index - */ - "z-index"?: ZIndexProperty | ZIndexProperty[]; - /** - * The non-standard **`zoom`** CSS property can be used to control the magnification level of an element. `transform: scale()` should be used instead of this property, if possible. However, unlike CSS Transforms, `zoom` affects the layout size of the element. - * - * **Syntax**: `normal | reset | <number> | <percentage>` - * - * **Initial value**: `normal` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :-----: | - * | **1** | No | **3.1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/zoom - */ - zoom?: ZoomProperty | ZoomProperty[]; -} - -export interface StandardShorthandPropertiesHyphenFallback<TLength = string | 0> { - /** - * The `**all**` CSS shorthand property sets all of an element's properties (other than `unicode-bidi` and `direction`) to their initial or inherited values, or to the values specified in another stylesheet origin. - * - * **Syntax**: `initial | inherit | unset | revert | revert-layer` - * - * **Initial value**: There is no practical initial value for it. - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :--: | :-: | - * | **37** | **27** | **9.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/all - */ - all?: Globals | Globals[]; - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **43** | **16** | **9** | **12** | **10** | - * | 3 _-x-_ | 5 _-x-_ | 4 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/animation - */ - animation?: AnimationProperty | AnimationProperty[]; - /** - * The **`background`** shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method. - * - * **Syntax**: `[ <bg-layer> , ]* <final-bg-layer>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background - */ - background?: BackgroundProperty<TLength> | BackgroundProperty<TLength>[]; - /** - * The **`background-position`** CSS property sets the initial position for each background image. The position is relative to the position layer set by `background-origin`. - * - * **Syntax**: `<bg-position>#` - * - * **Initial value**: `0% 0%` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/background-position - */ - "background-position"?: BackgroundPositionProperty<TLength> | BackgroundPositionProperty<TLength>[]; - /** - * The **`border`** CSS property sets an element's border. It's a shorthand for `border-width`, `border-style`, and `border-color`. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border - */ - border?: BorderProperty<TLength> | BorderProperty<TLength>[]; - /** - * The **`border-block`** CSS property is a shorthand property for setting the individual logical block border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block - */ - "border-block"?: BorderBlockProperty<TLength> | BorderBlockProperty<TLength>[]; - /** - * The **`border-block-end`** CSS property is a shorthand property for setting the individual logical block-end border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-end - */ - "border-block-end"?: BorderBlockEndProperty<TLength> | BorderBlockEndProperty<TLength>[]; - /** - * The **`border-block-start`** CSS property is a shorthand property for setting the individual logical block-start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-block-start - */ - "border-block-start"?: BorderBlockStartProperty<TLength> | BorderBlockStartProperty<TLength>[]; - /** - * The **`border-bottom`** CSS property is a shorthand that sets the values of `border-bottom-width`, `border-bottom-style` and `border-bottom-color`. These properties set an element's bottom border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-bottom - */ - "border-bottom"?: BorderBottomProperty<TLength> | BorderBottomProperty<TLength>[]; - /** - * The **`border-color`** shorthand CSS property sets the color of all sides of an element's border. - * - * **Syntax**: `<color>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-color - */ - "border-color"?: BorderColorProperty | BorderColorProperty[]; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-------: | :-----: | :----: | :----: | - * | **16** | **15** | **6** | **12** | **11** | - * | 7 _-x-_ | 3.5 _-x-_ | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-image - */ - "border-image"?: BorderImageProperty | BorderImageProperty[]; - /** - * The **`border-inline`** CSS property is a shorthand property for setting the individual logical inline border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **87** | **66** | **14.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline - */ - "border-inline"?: BorderInlineProperty<TLength> | BorderInlineProperty<TLength>[]; - /** - * The **`border-inline-end`** CSS property is a shorthand property for setting the individual logical inline-end border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-end - */ - "border-inline-end"?: BorderInlineEndProperty<TLength> | BorderInlineEndProperty<TLength>[]; - /** - * The **`border-inline-start`** CSS property is a shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet. - * - * **Syntax**: `<'border-top-width'> || <'border-top-style'> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :--: | :-: | - * | **69** | **41** | **12.1** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-inline-start - */ - "border-inline-start"?: BorderInlineStartProperty<TLength> | BorderInlineStartProperty<TLength>[]; - /** - * The **`border-left`** CSS property is a shorthand that sets the values of `border-left-width`, `border-left-style` and `border-left-color`. These properties set an element's left border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-left - */ - "border-left"?: BorderLeftProperty<TLength> | BorderLeftProperty<TLength>[]; - /** - * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. - * - * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :---: | - * | **4** | **4** | **5** | **12** | **9** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-radius - */ - "border-radius"?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[]; - /** - * The **`border-right`** CSS property is a shorthand that sets the values of `border-right-width`, `border-right-style` and `border-right-color`. These properties set an element's right border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-----: | - * | **1** | **1** | **1** | **12** | **5.5** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-right - */ - "border-right"?: BorderRightProperty<TLength> | BorderRightProperty<TLength>[]; - /** - * The **`border-style`** CSS property is a shorthand property that sets the line style for all four sides of an element's border. - * - * **Syntax**: `<line-style>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-style - */ - "border-style"?: BorderStyleProperty | BorderStyleProperty[]; - /** - * The **`border-top`** CSS property is a shorthand that sets the values of `border-top-width`, `border-top-style` and `border-top-color`. These properties set an element's top border. - * - * **Syntax**: `<line-width> || <line-style> || <color>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-top - */ - "border-top"?: BorderTopProperty<TLength> | BorderTopProperty<TLength>[]; - /** - * The **`border-width`** shorthand CSS property sets the widths of all four sides of an element's border. - * - * **Syntax**: `<line-width>{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/border-width - */ - "border-width"?: BorderWidthProperty<TLength> | BorderWidthProperty<TLength>[]; - /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. - * - * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | 1 _-x-_ | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/column-rule - */ - "column-rule"?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[]; - /** - * The **`columns`** CSS property sets the column width and column count of an element. - * - * **Syntax**: `<'column-width'> || <'column-count'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :----: | - * | **50** | **52** | **9** | **12** | **10** | - * | | | 3 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/columns - */ - columns?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[]; - /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. - * - * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :------: | - * | **29** | **20** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | 10 _-x-_ | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex - */ - flex?: FlexProperty<TLength> | FlexProperty<TLength>[]; - /** - * The **`flex-flow`** CSS property is a shorthand property for `flex-direction` and `flex-wrap` properties. - * - * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------: | :-----: | :-----: | :----: | :----: | - * | **29** | **28** | **9** | **12** | **11** | - * | 21 _-x-_ | | 7 _-x-_ | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/flex-flow - */ - "flex-flow"?: FlexFlowProperty | FlexFlowProperty[]; - /** - * The **`font`** CSS property is a shorthand for `font-style`, `font-variant`, `font-weight`, `font-size`, `line-height`, and `font-family`. Alternatively, it sets an element's font to a system font. - * - * **Syntax**: `[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/font - */ - font?: FontProperty | FontProperty[]; - /** - * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. - * - * **Syntax**: `<'row-gap'> <'column-gap'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/gap - */ - gap?: GapProperty<TLength> | GapProperty<TLength>[]; - /** - * The **`grid`** CSS property is a shorthand property that sets all of the explicit grid properties (`grid-template-rows`, `grid-template-columns`, and `grid-template-areas`), and all the implicit grid properties (`grid-auto-rows`, `grid-auto-columns`, and `grid-auto-flow`), in a single declaration. - * - * **Syntax**: `<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid - */ - grid?: GridProperty | GridProperty[]; - /** - * The **`grid-area`** CSS property is a shorthand property for `grid-row-start`, `grid-column-start`, `grid-row-end` and `grid-column-end`, specifying a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the edges of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]{0,3}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-area - */ - "grid-area"?: GridAreaProperty | GridAreaProperty[]; - /** - * The **`grid-column`** CSS property is a shorthand property for `grid-column-start` and `grid-column-end` specifying a grid item's size and location within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-column - */ - "grid-column"?: GridColumnProperty | GridColumnProperty[]; - /** - * The **`grid-row`** CSS property is a shorthand property for `grid-row-start` and `grid-row-end` specifying a grid item’s size and location within the grid row by contributing a line, a span, or nothing (automatic) to its grid placement, thereby specifying the inline-start and inline-end edge of its grid area. - * - * **Syntax**: `<grid-line> [ / <grid-line> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-row - */ - "grid-row"?: GridRowProperty | GridRowProperty[]; - /** - * The **`grid-template`** CSS property is a shorthand property for defining grid columns, rows, and areas. - * - * **Syntax**: `none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :------: | :----: | :-: | - * | **57** | **52** | **10.1** | **16** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/grid-template - */ - "grid-template"?: GridTemplateProperty | GridTemplateProperty[]; - /** - * **Syntax**: `none | <integer>` - * - * **Initial value**: `none` - */ - "line-clamp"?: LineClampProperty | LineClampProperty[]; - /** - * The **`list-style`** CSS property is a shorthand to set list style properties `list-style-type`, `list-style-image`, and `list-style-position`. - * - * **Syntax**: `<'list-style-type'> || <'list-style-position'> || <'list-style-image'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/list-style - */ - "list-style"?: ListStyleProperty | ListStyleProperty[]; - /** - * The **`margin`** CSS property sets the margin area on all four sides of an element. It is a shorthand for `margin-top`, `margin-right`, `margin-bottom`, and `margin-left`. - * - * **Syntax**: `[ <length> | <percentage> | auto ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **3** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/margin - */ - margin?: MarginProperty<TLength> | MarginProperty<TLength>[]; - /** - * The **`mask`** CSS property hides an element (partially or fully) by masking or clipping the image at specific points. - * - * **Syntax**: `<mask-layer>#` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :---: | :-: | - * | **1** | **2** | **3.1** | 12-79 | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask - */ - mask?: MaskProperty<TLength> | MaskProperty<TLength>[]; - /** - * The **`mask-border`** CSS property lets you create a mask along the edge of an element's border. - * - * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :------------------------------: | :-----: | :--------------------------------: | :--: | :-: | - * | **1** _(-webkit-mask-box-image)_ | No | **3.1** _(-webkit-mask-box-image)_ | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/mask-border - */ - "mask-border"?: MaskBorderProperty | MaskBorderProperty[]; - /** - * The **`offset`** CSS property is a shorthand property for animating an element along a defined path. - * - * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset - */ - motion?: OffsetProperty<TLength> | OffsetProperty<TLength>[]; - /** - * The **`offset`** CSS property is a shorthand property for animating an element along a defined path. - * - * **Syntax**: `[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :-----------: | :-----: | :----: | :--: | :-: | - * | **55** | **72** | **16** | n/a | No | - * | 46 _(motion)_ | | | | | - * - * @see https://developer.mozilla.org/docs/Web/CSS/offset - */ - offset?: OffsetProperty<TLength> | OffsetProperty<TLength>[]; - /** - * The **`outline`** CSS property is a shorthand to set various outline properties in a single declaration: `outline-style`, `outline-width`, and `outline-color`. - * - * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :-----: | :----: | :---: | - * | **1** | **1.5** | **1.2** | **12** | **8** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/outline - */ - outline?: OutlineProperty<TLength> | OutlineProperty<TLength>[]; - /** - * The **`overflow`** CSS property sets what to do when an element's content is too big to fit in its block formatting context. It is a shorthand for `overflow-x` and `overflow-y`. - * - * **Syntax**: `[ visible | hidden | clip | scroll | auto ]{1,2}` - * - * **Initial value**: `visible` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overflow - */ - overflow?: OverflowProperty | OverflowProperty[]; - /** - * The **`overscroll-behavior`** CSS property sets what a browser does when reaching the boundary of a scrolling area. It's a shorthand for `overscroll-behavior-x` and `overscroll-behavior-y`. - * - * **Syntax**: `[ contain | none | auto ]{1,2}` - * - * **Initial value**: `auto` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :-: | - * | **63** | **59** | **16** | **18** | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior - */ - "overscroll-behavior"?: OverscrollBehaviorProperty | OverscrollBehaviorProperty[]; - /** - * The **`padding`** CSS property sets the padding area on all four sides of an element. It is a shorthand for `padding-top`, `padding-right`, `padding-bottom`, and `padding-left`. - * - * **Syntax**: `[ <length> | <percentage> ]{1,4}` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :----: | :---: | - * | **1** | **1** | **1** | **12** | **4** | - * - * @see https://developer.mozilla.org/docs/Web/CSS/padding - */ - padding?: PaddingProperty<TLength> | PaddingProperty<TLength>[]; - /** - * The CSS **`place-items`** shorthand property sets the `align-items` and `justify-items` properties, respectively. If the second value is not set, the first value is also used for it. - * - * **Syntax**: `<'align-items'> <'justify-items'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-items - */ - "place-items"?: PlaceItemsProperty | PlaceItemsProperty[]; - /** - * The **`place-self`** CSS property is a shorthand property sets both the `align-self` and `justify-self` properties. The first value is the `align-self` property value, the second the `justify-self` one. If the second value is not present, the first value is also used for it. - * - * **Syntax**: `<'align-self'> <'justify-self'>?` - * - * | Chrome | Firefox | Safari | Edge | IE | - * | :----: | :-----: | :----: | :--: | :-: | - * | **59** | **45** | **11** | n/a | No | - * - * @see https://developer.mozilla.org/docs/Web/CSS/place-self + * @see https://developer.mozilla.org/docs/Web/CSS/scroll-timeline */ - "place-self"?: PlaceSelfProperty | PlaceSelfProperty[]; + "scroll-timeline"?: Property.ScrollTimeline | undefined; /** - * The **`text-decoration`** CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, and `text-decoration-style`. + * The **`text-decoration`** shorthand CSS property sets the appearance of decorative lines on text. It is a shorthand for `text-decoration-line`, `text-decoration-color`, `text-decoration-style`, and the newer `text-decoration-thickness` property. * * **Syntax**: `<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>` * @@ -31667,7 +15205,7 @@ export interface StandardShorthandPropertiesHyphenFallback<TLength = string | 0> * * @see https://developer.mozilla.org/docs/Web/CSS/text-decoration */ - "text-decoration"?: TextDecorationProperty<TLength> | TextDecorationProperty<TLength>[]; + "text-decoration"?: Property.TextDecoration<TLength> | undefined; /** * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. * @@ -31680,7 +15218,7 @@ export interface StandardShorthandPropertiesHyphenFallback<TLength = string | 0> * * @see https://developer.mozilla.org/docs/Web/CSS/text-emphasis */ - "text-emphasis"?: TextEmphasisProperty | TextEmphasisProperty[]; + "text-emphasis"?: Property.TextEmphasis | undefined; /** * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. * @@ -31689,34 +15227,46 @@ export interface StandardShorthandPropertiesHyphenFallback<TLength = string | 0> * | Chrome | Firefox | Safari | Edge | IE | * | :-----: | :-----: | :-------: | :----: | :----: | * | **26** | **16** | **9** | **12** | **10** | - * | 1 _-x-_ | 4 _-x-_ | 3.1 _-x-_ | | | + * | 1 _-x-_ | | 3.1 _-x-_ | | | * * @see https://developer.mozilla.org/docs/Web/CSS/transition */ - transition?: TransitionProperty | TransitionProperty[]; + transition?: Property.Transition<TTime> | undefined; + /** + * The **`view-timeline`** CSS shorthand property is used to define a _named view progress timeline_, which is progressed through based on the change in visibility of an element (known as the _subject_) inside a scrollable element (_scroller_). `view-timeline` is set on the subject. + * + * **Syntax**: `[ <'view-timeline-name'> <'view-timeline-axis'>? ]#` + * + * | Chrome | Firefox | Safari | Edge | IE | + * | :-----: | :-----: | :----: | :--: | :-: | + * | **115** | n/a | No | n/a | No | + * + * @see https://developer.mozilla.org/docs/Web/CSS/view-timeline + */ + "view-timeline"?: Property.ViewTimeline | undefined; } -export interface StandardPropertiesHyphenFallback<TLength = string | 0> - extends StandardLonghandPropertiesHyphenFallback<TLength>, - StandardShorthandPropertiesHyphenFallback<TLength> {} +export interface StandardPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardLonghandPropertiesHyphen<TLength, TTime>, + StandardShorthandPropertiesHyphen<TLength, TTime> {} -export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { +export interface VendorLonghandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. * * **Syntax**: `<time>#` * * **Initial value**: `0s` */ - "-moz-animation-delay"?: GlobalsString | GlobalsString[]; + "-moz-animation-delay"?: Property.AnimationDelay<TTime> | undefined; /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. * * **Syntax**: `<single-animation-direction>#` * * **Initial value**: `normal` */ - "-moz-animation-direction"?: AnimationDirectionProperty | AnimationDirectionProperty[]; + "-moz-animation-direction"?: Property.AnimationDirection | undefined; /** * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. * @@ -31724,7 +15274,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0s` */ - "-moz-animation-duration"?: GlobalsString | GlobalsString[]; + "-moz-animation-duration"?: Property.AnimationDuration<TTime> | undefined; /** * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. * @@ -31732,23 +15282,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-moz-animation-fill-mode"?: AnimationFillModeProperty | AnimationFillModeProperty[]; + "-moz-animation-fill-mode"?: Property.AnimationFillMode | undefined; /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. * * **Syntax**: `<single-animation-iteration-count>#` * * **Initial value**: `1` */ - "-moz-animation-iteration-count"?: AnimationIterationCountProperty | AnimationIterationCountProperty[]; + "-moz-animation-iteration-count"?: Property.AnimationIterationCount | undefined; /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. * * **Syntax**: `[ none | <keyframes-name> ]#` * * **Initial value**: `none` */ - "-moz-animation-name"?: AnimationNameProperty | AnimationNameProperty[]; + "-moz-animation-name"?: Property.AnimationName | undefined; /** * The **`animation-play-state`** CSS property sets whether an animation is running or paused. * @@ -31756,31 +15306,31 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `running` */ - "-moz-animation-play-state"?: AnimationPlayStateProperty | AnimationPlayStateProperty[]; + "-moz-animation-play-state"?: Property.AnimationPlayState | undefined; /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. * * **Syntax**: `<easing-function>#` * * **Initial value**: `ease` */ - "-moz-animation-timing-function"?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[]; + "-moz-animation-timing-function"?: Property.AnimationTimingFunction | undefined; /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. * * **Syntax**: `none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized` * * **Initial value**: `none` (but this value is overridden in the user agent CSS) */ - "-moz-appearance"?: MozAppearanceProperty | MozAppearanceProperty[]; + "-moz-appearance"?: Property.MozAppearance | undefined; /** - * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. * - * **Syntax**: `visible | hidden` + * **Syntax**: `<url> | none` * - * **Initial value**: `visible` + * **Initial value**: `none` */ - "-moz-backface-visibility"?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[]; + "-moz-binding"?: Property.MozBinding | undefined; /** * In Mozilla applications like Firefox, the **`-moz-border-bottom-colors`** CSS property sets a list of colors for the bottom border. * @@ -31788,31 +15338,31 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-moz-border-bottom-colors"?: MozBorderBottomColorsProperty | MozBorderBottomColorsProperty[]; + "-moz-border-bottom-colors"?: Property.MozBorderBottomColors | undefined; /** - * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-color`** CSS property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * * **Initial value**: `currentcolor` */ - "-moz-border-end-color"?: BorderInlineEndColorProperty | BorderInlineEndColorProperty[]; + "-moz-border-end-color"?: Property.BorderInlineEndColor | undefined; /** - * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-style`** CSS property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * * **Initial value**: `none` */ - "-moz-border-end-style"?: BorderInlineEndStyleProperty | BorderInlineEndStyleProperty[]; + "-moz-border-end-style"?: Property.BorderInlineEndStyle | undefined; /** - * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-end-width`** CSS property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-width`, `border-right-width`, `border-bottom-width`, or `border-left-width` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-width'>` * * **Initial value**: `medium` */ - "-moz-border-end-width"?: BorderInlineEndWidthProperty<TLength> | BorderInlineEndWidthProperty<TLength>[]; + "-moz-border-end-width"?: Property.BorderInlineEndWidth<TLength> | undefined; /** * In Mozilla applications like Firefox, the **`-moz-border-left-colors`** CSS property sets a list of colors for the left border. * @@ -31820,7 +15370,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-moz-border-left-colors"?: MozBorderLeftColorsProperty | MozBorderLeftColorsProperty[]; + "-moz-border-left-colors"?: Property.MozBorderLeftColors | undefined; /** * In Mozilla applications like Firefox, the **`-moz-border-right-colors`** CSS property sets a list of colors for the right border. * @@ -31828,23 +15378,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-moz-border-right-colors"?: MozBorderRightColorsProperty | MozBorderRightColorsProperty[]; + "-moz-border-right-colors"?: Property.MozBorderRightColors | undefined; /** - * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-color`** CSS property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-color`, `border-right-color`, `border-bottom-color`, or `border-left-color` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-color'>` * * **Initial value**: `currentcolor` */ - "-moz-border-start-color"?: BorderInlineStartColorProperty | BorderInlineStartColorProperty[]; + "-moz-border-start-color"?: Property.BorderInlineStartColor | undefined; /** - * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`border-inline-start-style`** CSS property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation. It corresponds to the `border-top-style`, `border-right-style`, `border-bottom-style`, or `border-left-style` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'border-top-style'>` * * **Initial value**: `none` */ - "-moz-border-start-style"?: BorderInlineStartStyleProperty | BorderInlineStartStyleProperty[]; + "-moz-border-start-style"?: Property.BorderInlineStartStyle | undefined; /** * In Mozilla applications like Firefox, the **`-moz-border-top-colors`** CSS property sets a list of colors for the top border. * @@ -31852,15 +15402,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-moz-border-top-colors"?: MozBorderTopColorsProperty | MozBorderTopColorsProperty[]; + "-moz-border-top-colors"?: Property.MozBorderTopColors | undefined; /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. * * **Syntax**: `content-box | border-box` * * **Initial value**: `content-box` */ - "-moz-box-sizing"?: BoxSizingProperty | BoxSizingProperty[]; + "-moz-box-sizing"?: Property.BoxSizing | undefined; /** * The **`column-count`** CSS property breaks an element's content into the specified number of columns. * @@ -31868,7 +15418,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-moz-column-count"?: ColumnCountProperty | ColumnCountProperty[]; + "-moz-column-count"?: Property.ColumnCount | undefined; /** * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. * @@ -31876,15 +15426,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `balance` */ - "-moz-column-fill"?: ColumnFillProperty | ColumnFillProperty[]; + "-moz-column-fill"?: Property.ColumnFill | undefined; /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<color>` * * **Initial value**: `currentcolor` */ - "-moz-column-rule-color"?: ColumnRuleColorProperty | ColumnRuleColorProperty[]; + "-moz-column-rule-color"?: Property.ColumnRuleColor | undefined; /** * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. * @@ -31892,31 +15442,31 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-moz-column-rule-style"?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[]; + "-moz-column-rule-style"?: Property.ColumnRuleStyle | undefined; /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'border-width'>` * * **Initial value**: `medium` */ - "-moz-column-rule-width"?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[]; + "-moz-column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. * * **Syntax**: `<length> | auto` * * **Initial value**: `auto` */ - "-moz-column-width"?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[]; + "-moz-column-width"?: Property.ColumnWidth<TLength> | undefined; /** - * If you reference an SVG image in a webpage (such as with the `<img>` element or as a background image), the SVG image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element. To do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the **`-moz-context-properties`** property, and the image needs to opt in to using those properties by using values such as the `context-fill` value. + * The **`-moz-context-properties`** property can be used within privileged contexts in Firefox to share the values of specified properties of the element with a child SVG image. * * **Syntax**: `none | [ fill | fill-opacity | stroke | stroke-opacity ]#` * * **Initial value**: `none` */ - "-moz-context-properties"?: MozContextPropertiesProperty | MozContextPropertiesProperty[]; + "-moz-context-properties"?: Property.MozContextProperties | undefined; /** * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. * @@ -31924,7 +15474,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `normal` */ - "-moz-font-feature-settings"?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[]; + "-moz-font-feature-settings"?: Property.FontFeatureSettings | undefined; /** * The **`font-language-override`** CSS property controls the use of language-specific glyphs in a typeface. * @@ -31932,15 +15482,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `normal` */ - "-moz-font-language-override"?: FontLanguageOverrideProperty | FontLanguageOverrideProperty[]; + "-moz-font-language-override"?: Property.FontLanguageOverride | undefined; /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. * * **Syntax**: `none | manual | auto` * * **Initial value**: `manual` */ - "-moz-hyphens"?: HyphensProperty | HyphensProperty[]; + "-moz-hyphens"?: Property.Hyphens | undefined; /** * For certain XUL elements and pseudo-elements that use an image from the `list-style-image` property, this property specifies a region of the image that is used in place of the whole image. This allows elements to use different pieces of the same image to improve performance. * @@ -31948,23 +15498,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-moz-image-region"?: MozImageRegionProperty | MozImageRegionProperty[]; + "-moz-image-region"?: Property.MozImageRegion | undefined; /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * * **Initial value**: `0` */ - "-moz-margin-end"?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[]; + "-moz-margin-end"?: Property.MarginInlineEnd<TLength> | undefined; /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * * **Initial value**: `0` */ - "-moz-margin-start"?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[]; + "-moz-margin-start"?: Property.MarginInlineStart<TLength> | undefined; /** * The **`-moz-orient`** CSS property specifies the orientation of the element to which it's applied. * @@ -31972,7 +15522,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `inline` */ - "-moz-orient"?: MozOrientProperty | MozOrientProperty[]; + "-moz-orient"?: Property.MozOrient | undefined; /** * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. * @@ -31980,55 +15530,71 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-moz-osx-font-smoothing"?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[]; + "-moz-osx-font-smoothing"?: Property.FontSmooth<TLength> | undefined; /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + "-moz-outline-radius-bottomleft"?: Property.MozOutlineRadiusBottomleft<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + "-moz-outline-radius-bottomright"?: Property.MozOutlineRadiusBottomright<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + "-moz-outline-radius-topleft"?: Property.MozOutlineRadiusTopleft<TLength> | undefined; + /** + * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. + * + * **Syntax**: `<outline-radius>` + * + * **Initial value**: `0` + */ + "-moz-outline-radius-topright"?: Property.MozOutlineRadiusTopright<TLength> | undefined; + /** + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * * **Initial value**: `0` */ - "-moz-padding-end"?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[]; + "-moz-padding-end"?: Property.PaddingInlineEnd<TLength> | undefined; /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * * **Initial value**: `0` */ - "-moz-padding-start"?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[]; + "-moz-padding-start"?: Property.PaddingInlineStart<TLength> | undefined; /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. - * - * **Syntax**: `none | <length>` - * - * **Initial value**: `none` - */ - "-moz-perspective"?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[]; - /** - * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - */ - "-moz-perspective-origin"?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[]; - /** - * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `stack` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. + * **`-moz-stack-sizing`** is an extended CSS property. Normally, a `<xul:stack>` will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible. * * **Syntax**: `ignore | stretch-to-fit` * * **Initial value**: `stretch-to-fit` */ - "-moz-stack-sizing"?: MozStackSizingProperty | MozStackSizingProperty[]; + "-moz-stack-sizing"?: Property.MozStackSizing | undefined; /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). * * **Syntax**: `<integer> | <length>` * * **Initial value**: `8` */ - "-moz-tab-size"?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[]; + "-moz-tab-size"?: Property.TabSize<TLength> | undefined; /** * The **`-moz-text-blink`** non-standard Mozilla CSS extension specifies the blink mode. * @@ -32036,7 +15602,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-moz-text-blink"?: MozTextBlinkProperty | MozTextBlinkProperty[]; + "-moz-text-blink"?: Property.MozTextBlink | undefined; /** * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. * @@ -32044,55 +15610,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). */ - "-moz-text-size-adjust"?: TextSizeAdjustProperty | TextSizeAdjustProperty[]; - /** - * The **`transform-origin`** CSS property sets the origin for an element's transformations. - * - * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` - * - * **Initial value**: `50% 50% 0` - */ - "-moz-transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; - /** - * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. - * - * **Syntax**: `flat | preserve-3d` - * - * **Initial value**: `flat` - */ - "-moz-transform-style"?: TransformStyleProperty | TransformStyleProperty[]; - /** - * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-moz-transition-delay"?: GlobalsString | GlobalsString[]; - /** - * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - */ - "-moz-transition-duration"?: GlobalsString | GlobalsString[]; - /** - * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. - * - * **Syntax**: `none | <single-transition-property>#` - * - * **Initial value**: all - */ - "-moz-transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[]; - /** - * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - */ - "-moz-transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; + "-moz-text-size-adjust"?: Property.TextSizeAdjust | undefined; /** * The **`-moz-user-focus`** CSS property is used to indicate whether an element can have the focus. * @@ -32100,23 +15618,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-moz-user-focus"?: MozUserFocusProperty | MozUserFocusProperty[]; + "-moz-user-focus"?: Property.MozUserFocus | undefined; /** - * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. + * The **`user-modify`** property has no effect in Firefox. It was originally planned to determine whether or not the content of an element can be edited by a user. * * **Syntax**: `read-only | read-write | write-only` * * **Initial value**: `read-only` */ - "-moz-user-modify"?: MozUserModifyProperty | MozUserModifyProperty[]; + "-moz-user-modify"?: Property.MozUserModify | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `auto | text | none | contain | all` * * **Initial value**: `auto` */ - "-moz-user-select"?: UserSelectProperty | UserSelectProperty[]; + "-moz-user-select"?: Property.UserSelect | undefined; /** * The **`-moz-window-dragging`** CSS property specifies whether a window is draggable or not. It only works in Chrome code, and only on Mac OS X. * @@ -32124,7 +15642,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `drag` */ - "-moz-window-dragging"?: MozWindowDraggingProperty | MozWindowDraggingProperty[]; + "-moz-window-dragging"?: Property.MozWindowDragging | undefined; /** * The **`-moz-window-shadow`** CSS property specifies whether a window will have a shadow. It only works on Mac OS X. * @@ -32132,7 +15650,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `default` */ - "-moz-window-shadow"?: MozWindowShadowProperty | MozWindowShadowProperty[]; + "-moz-window-shadow"?: Property.MozWindowShadow | undefined; /** * The **`-ms-accelerator`** CSS property is a Microsoft extension that sets or retrieves a string indicating whether the object represents a keyboard shortcut. * @@ -32140,7 +15658,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `false` */ - "-ms-accelerator"?: MsAcceleratorProperty | MsAcceleratorProperty[]; + "-ms-accelerator"?: Property.MsAccelerator | undefined; /** * The **`-ms-block-progression`** CSS property is a Microsoft extension that specifies the block progression and layout orientation. * @@ -32148,7 +15666,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `tb` */ - "-ms-block-progression"?: MsBlockProgressionProperty | MsBlockProgressionProperty[]; + "-ms-block-progression"?: Property.MsBlockProgression | undefined; /** * The **`-ms-content-zoom-chaining`** CSS property is a Microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation. * @@ -32156,7 +15674,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-content-zoom-chaining"?: MsContentZoomChainingProperty | MsContentZoomChainingProperty[]; + "-ms-content-zoom-chaining"?: Property.MsContentZoomChaining | undefined; /** * The **`-ms-content-zoom-limit-max`** CSS property is a Microsoft extension that specifies the selected elements' maximum zoom factor. * @@ -32164,7 +15682,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `400%` */ - "-ms-content-zoom-limit-max"?: GlobalsString | GlobalsString[]; + "-ms-content-zoom-limit-max"?: Property.MsContentZoomLimitMax | undefined; /** * The **`-ms-content-zoom-limit-min`** CSS property is a Microsoft extension that specifies the minimum zoom factor. * @@ -32172,7 +15690,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `100%` */ - "-ms-content-zoom-limit-min"?: GlobalsString | GlobalsString[]; + "-ms-content-zoom-limit-min"?: Property.MsContentZoomLimitMin | undefined; /** * The **`-ms-content-zoom-snap-points`** CSS property is a Microsoft extension that specifies where zoom snap-points are located. * @@ -32180,7 +15698,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `snapInterval(0%, 100%)` */ - "-ms-content-zoom-snap-points"?: GlobalsString | GlobalsString[]; + "-ms-content-zoom-snap-points"?: Property.MsContentZoomSnapPoints | undefined; /** * The **`-ms-content-zoom-snap-type`** CSS property is a Microsoft extension that specifies how zooming is affected by defined snap-points. * @@ -32188,7 +15706,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-content-zoom-snap-type"?: MsContentZoomSnapTypeProperty | MsContentZoomSnapTypeProperty[]; + "-ms-content-zoom-snap-type"?: Property.MsContentZoomSnapType | undefined; /** * The **`-ms-content-zooming`** CSS property is a Microsoft extension that specifies whether zooming is enabled. * @@ -32196,7 +15714,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: zoom for the top level element, none for all other elements */ - "-ms-content-zooming"?: MsContentZoomingProperty | MsContentZoomingProperty[]; + "-ms-content-zooming"?: Property.MsContentZooming | undefined; /** * The `-ms-filter` CSS property is a Microsoft extension that sets or retrieves the filter or collection of filters applied to an object. * @@ -32204,7 +15722,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: "" (the empty string) */ - "-ms-filter"?: GlobalsString | GlobalsString[]; + "-ms-filter"?: Property.MsFilter | undefined; /** * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). * @@ -32212,15 +15730,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `row` */ - "-ms-flex-direction"?: FlexDirectionProperty | FlexDirectionProperty[]; + "-ms-flex-direction"?: Property.FlexDirection | undefined; /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. * * **Syntax**: `<number>` * * **Initial value**: `0` */ - "-ms-flex-positive"?: GlobalsNumber | GlobalsNumber[]; + "-ms-flex-positive"?: Property.FlexGrow | undefined; /** * The **`-ms-flow-from`** CSS property is a Microsoft extension that gets or sets a value identifying a region container in the document that accepts the content flow from the data source. * @@ -32228,7 +15746,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-flow-from"?: MsFlowFromProperty | MsFlowFromProperty[]; + "-ms-flow-from"?: Property.MsFlowFrom | undefined; /** * The **`-ms-flow-into`** CSS property is a Microsoft extension that gets or sets a value identifying an iframe container in the document that serves as the region's data source. * @@ -32236,7 +15754,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-flow-into"?: MsFlowIntoProperty | MsFlowIntoProperty[]; + "-ms-flow-into"?: Property.MsFlowInto | undefined; /** * The **`grid-template-columns`** CSS property defines the line names and track sizing functions of the grid columns. * @@ -32244,7 +15762,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-grid-columns"?: MsGridColumnsProperty<TLength> | MsGridColumnsProperty<TLength>[]; + "-ms-grid-columns"?: Property.MsGridColumns<TLength> | undefined; /** * The **`grid-template-rows`** CSS property defines the line names and track sizing functions of the grid rows. * @@ -32252,7 +15770,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-grid-rows"?: MsGridRowsProperty<TLength> | MsGridRowsProperty<TLength>[]; + "-ms-grid-rows"?: Property.MsGridRows<TLength> | undefined; /** * The **`-ms-high-contrast-adjust`** CSS property is a Microsoft extension that gets or sets a value indicating whether to override any CSS properties that would have been set in high contrast mode. * @@ -32260,7 +15778,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-ms-high-contrast-adjust"?: MsHighContrastAdjustProperty | MsHighContrastAdjustProperty[]; + "-ms-high-contrast-adjust"?: Property.MsHighContrastAdjust | undefined; /** * The **`-ms-hyphenate-limit-chars`** CSS property is a Microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word. If the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated. * @@ -32268,7 +15786,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-ms-hyphenate-limit-chars"?: MsHyphenateLimitCharsProperty | MsHyphenateLimitCharsProperty[]; + "-ms-hyphenate-limit-chars"?: Property.MsHyphenateLimitChars | undefined; /** * The **`-ms-hyphenate-limit-lines`** CSS property is a Microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word. * @@ -32276,7 +15794,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `no-limit` */ - "-ms-hyphenate-limit-lines"?: MsHyphenateLimitLinesProperty | MsHyphenateLimitLinesProperty[]; + "-ms-hyphenate-limit-lines"?: Property.MsHyphenateLimitLines | undefined; /** * The `**-ms-hyphenate-limit-zone**` CSS property is a Microsoft extension specifying the width of the hyphenation zone. * @@ -32284,15 +15802,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-ms-hyphenate-limit-zone"?: MsHyphenateLimitZoneProperty<TLength> | MsHyphenateLimitZoneProperty<TLength>[]; + "-ms-hyphenate-limit-zone"?: Property.MsHyphenateLimitZone<TLength> | undefined; /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. * * **Syntax**: `none | manual | auto` * * **Initial value**: `manual` */ - "-ms-hyphens"?: HyphensProperty | HyphensProperty[]; + "-ms-hyphens"?: Property.Hyphens | undefined; /** * The **`-ms-ime-align`** CSS property is a Microsoft extension aligning the Input Method Editor (IME) candidate window box relative to the element on which the IME composition is active. The extension is implemented in Microsoft Edge and Internet Explorer 11. * @@ -32300,7 +15818,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-ms-ime-align"?: MsImeAlignProperty | MsImeAlignProperty[]; + "-ms-ime-align"?: Property.MsImeAlign | undefined; /** * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. * @@ -32308,7 +15826,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-ms-line-break"?: LineBreakProperty | LineBreakProperty[]; + "-ms-line-break"?: Property.LineBreak | undefined; /** * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. * @@ -32316,7 +15834,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-ms-order"?: GlobalsNumber | GlobalsNumber[]; + "-ms-order"?: Property.Order | undefined; /** * The **`-ms-overflow-style`** CSS property is a Microsoft extension controlling the behavior of scrollbars when the content of an element overflows. * @@ -32324,7 +15842,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-ms-overflow-style"?: MsOverflowStyleProperty | MsOverflowStyleProperty[]; + "-ms-overflow-style"?: Property.MsOverflowStyle | undefined; /** * The **`overflow-x`** CSS property sets what shows when content overflows a block-level element's left and right edges. This may be nothing, a scroll bar, or the overflow content. * @@ -32332,7 +15850,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `visible` */ - "-ms-overflow-x"?: OverflowXProperty | OverflowXProperty[]; + "-ms-overflow-x"?: Property.OverflowX | undefined; /** * The **`overflow-y`** CSS property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content. * @@ -32340,7 +15858,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `visible` */ - "-ms-overflow-y"?: OverflowYProperty | OverflowYProperty[]; + "-ms-overflow-y"?: Property.OverflowY | undefined; /** * The `**-ms-scroll-chaining**` CSS property is a Microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation. * @@ -32348,7 +15866,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `chained` */ - "-ms-scroll-chaining"?: MsScrollChainingProperty | MsScrollChainingProperty[]; + "-ms-scroll-chaining"?: Property.MsScrollChaining | undefined; /** * The `**-ms-scroll-limit-x-max**` CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollLeft` property. * @@ -32356,7 +15874,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-ms-scroll-limit-x-max"?: MsScrollLimitXMaxProperty<TLength> | MsScrollLimitXMaxProperty<TLength>[]; + "-ms-scroll-limit-x-max"?: Property.MsScrollLimitXMax<TLength> | undefined; /** * The **`-ms-scroll-limit-x-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollLeft` property. * @@ -32364,7 +15882,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-ms-scroll-limit-x-min"?: MsScrollLimitXMinProperty<TLength> | MsScrollLimitXMinProperty<TLength>[]; + "-ms-scroll-limit-x-min"?: Property.MsScrollLimitXMin<TLength> | undefined; /** * The **`-ms-scroll-limit-y-max`** CSS property is a Microsoft extension that specifies the maximum value for the `Element.scrollTop` property. * @@ -32372,7 +15890,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-ms-scroll-limit-y-max"?: MsScrollLimitYMaxProperty<TLength> | MsScrollLimitYMaxProperty<TLength>[]; + "-ms-scroll-limit-y-max"?: Property.MsScrollLimitYMax<TLength> | undefined; /** * The **`-ms-scroll-limit-y-min`** CSS property is a Microsoft extension that specifies the minimum value for the `Element.scrollTop` property. * @@ -32380,7 +15898,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-ms-scroll-limit-y-min"?: MsScrollLimitYMinProperty<TLength> | MsScrollLimitYMinProperty<TLength>[]; + "-ms-scroll-limit-y-min"?: Property.MsScrollLimitYMin<TLength> | undefined; /** * The **`-ms-scroll-rails`** CSS property is a Microsoft extension that specifies whether scrolling locks to the primary axis of motion. * @@ -32388,7 +15906,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `railed` */ - "-ms-scroll-rails"?: MsScrollRailsProperty | MsScrollRailsProperty[]; + "-ms-scroll-rails"?: Property.MsScrollRails | undefined; /** * The **`-ms-scroll-snap-points-x`** CSS property is a Microsoft extension that specifies where snap-points will be located along the x-axis. * @@ -32396,7 +15914,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `snapInterval(0px, 100%)` */ - "-ms-scroll-snap-points-x"?: GlobalsString | GlobalsString[]; + "-ms-scroll-snap-points-x"?: Property.MsScrollSnapPointsX | undefined; /** * The **`-ms-scroll-snap-points-y`** CSS property is a Microsoft extension that specifies where snap-points will be located along the y-axis. * @@ -32404,7 +15922,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `snapInterval(0px, 100%)` */ - "-ms-scroll-snap-points-y"?: GlobalsString | GlobalsString[]; + "-ms-scroll-snap-points-y"?: Property.MsScrollSnapPointsY | undefined; /** * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. * @@ -32412,7 +15930,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-scroll-snap-type"?: MsScrollSnapTypeProperty | MsScrollSnapTypeProperty[]; + "-ms-scroll-snap-type"?: Property.MsScrollSnapType | undefined; /** * The **`-ms-scroll-translation`** CSS property is a Microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element. * @@ -32420,7 +15938,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-scroll-translation"?: MsScrollTranslationProperty | MsScrollTranslationProperty[]; + "-ms-scroll-translation"?: Property.MsScrollTranslation | undefined; /** * The **`-ms-scrollbar-3dlight-color`** CSS property is a Microsoft extension specifying the color of the top and left edges of the scroll box and scroll arrows of a scroll bar. * @@ -32428,7 +15946,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: depends on user agent */ - "-ms-scrollbar-3dlight-color"?: MsScrollbar3dlightColorProperty | MsScrollbar3dlightColorProperty[]; + "-ms-scrollbar-3dlight-color"?: Property.MsScrollbar3dlightColor | undefined; /** * The **`-ms-scrollbar-arrow-color`** CSS property is a Microsoft extension that specifies the color of the arrow elements of a scroll arrow. * @@ -32436,7 +15954,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `ButtonText` */ - "-ms-scrollbar-arrow-color"?: MsScrollbarArrowColorProperty | MsScrollbarArrowColorProperty[]; + "-ms-scrollbar-arrow-color"?: Property.MsScrollbarArrowColor | undefined; /** * The `**-ms-scrollbar-base-color**` CSS property is a Microsoft extension that specifies the base color of the main elements of a scroll bar. * @@ -32444,7 +15962,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: depends on user agent */ - "-ms-scrollbar-base-color"?: MsScrollbarBaseColorProperty | MsScrollbarBaseColorProperty[]; + "-ms-scrollbar-base-color"?: Property.MsScrollbarBaseColor | undefined; /** * The **`-ms-scrollbar-darkshadow-color`** CSS property is a Microsoft extension that specifies the color of a scroll bar's gutter. * @@ -32452,7 +15970,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `ThreeDDarkShadow` */ - "-ms-scrollbar-darkshadow-color"?: MsScrollbarDarkshadowColorProperty | MsScrollbarDarkshadowColorProperty[]; + "-ms-scrollbar-darkshadow-color"?: Property.MsScrollbarDarkshadowColor | undefined; /** * The `**-ms-scrollbar-face-color**` CSS property is a Microsoft extension that specifies the color of the scroll box and scroll arrows of a scroll bar. * @@ -32460,7 +15978,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `ThreeDFace` */ - "-ms-scrollbar-face-color"?: MsScrollbarFaceColorProperty | MsScrollbarFaceColorProperty[]; + "-ms-scrollbar-face-color"?: Property.MsScrollbarFaceColor | undefined; /** * The `**-ms-scrollbar-highlight-color**` CSS property is a Microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll box, and the scroll arrows of a scroll bar. * @@ -32468,7 +15986,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `ThreeDHighlight` */ - "-ms-scrollbar-highlight-color"?: MsScrollbarHighlightColorProperty | MsScrollbarHighlightColorProperty[]; + "-ms-scrollbar-highlight-color"?: Property.MsScrollbarHighlightColor | undefined; /** * The **`-ms-scrollbar-shadow-color`** CSS property is a Microsoft extension that specifies the color of the bottom and right edges of the scroll box and scroll arrows of a scroll bar. * @@ -32476,7 +15994,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `ThreeDDarkShadow` */ - "-ms-scrollbar-shadow-color"?: MsScrollbarShadowColorProperty | MsScrollbarShadowColorProperty[]; + "-ms-scrollbar-shadow-color"?: Property.MsScrollbarShadowColor | undefined; /** * The **`-ms-scrollbar-track-color`** CSS property is a Microsoft extension that specifies the color of the track element of a scrollbar. * @@ -32484,7 +16002,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `Scrollbar` */ - "-ms-scrollbar-track-color"?: MsScrollbarTrackColorProperty | MsScrollbarTrackColorProperty[]; + "-ms-scrollbar-track-color"?: Property.MsScrollbarTrackColor | undefined; /** * The **`-ms-text-autospace`** CSS property is a Microsoft extension that specifies the autospacing and narrow space width adjustment of text. * @@ -32492,7 +16010,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-text-autospace"?: MsTextAutospaceProperty | MsTextAutospaceProperty[]; + "-ms-text-autospace"?: Property.MsTextAutospace | undefined; /** * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. * @@ -32500,7 +16018,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-text-combine-horizontal"?: TextCombineUprightProperty | TextCombineUprightProperty[]; + "-ms-text-combine-horizontal"?: Property.TextCombineUpright | undefined; /** * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. * @@ -32508,15 +16026,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `clip` */ - "-ms-text-overflow"?: TextOverflowProperty | TextOverflowProperty[]; + "-ms-text-overflow"?: Property.TextOverflow | undefined; /** - * The **`touch-action`** CSS property sets how a region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). + * The **`touch-action`** CSS property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser). * * **Syntax**: `auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation` * * **Initial value**: `auto` */ - "-ms-touch-action"?: TouchActionProperty | TouchActionProperty[]; + "-ms-touch-action"?: Property.TouchAction | undefined; /** * The **`-ms-touch-select`** CSS property is a Microsoft extension that toggles the gripper visual elements that enable touch text selection. * @@ -32524,7 +16042,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `grippers` */ - "-ms-touch-select"?: MsTouchSelectProperty | MsTouchSelectProperty[]; + "-ms-touch-select"?: Property.MsTouchSelect | undefined; /** * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. * @@ -32532,7 +16050,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-ms-transform"?: TransformProperty | TransformProperty[]; + "-ms-transform"?: Property.Transform | undefined; /** * The **`transform-origin`** CSS property sets the origin for an element's transformations. * @@ -32540,7 +16058,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `50% 50% 0` */ - "-ms-transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; + "-ms-transform-origin"?: Property.TransformOrigin<TLength> | undefined; /** * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. * @@ -32548,7 +16066,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0s` */ - "-ms-transition-delay"?: GlobalsString | GlobalsString[]; + "-ms-transition-delay"?: Property.TransitionDelay<TTime> | undefined; /** * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. * @@ -32556,7 +16074,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0s` */ - "-ms-transition-duration"?: GlobalsString | GlobalsString[]; + "-ms-transition-duration"?: Property.TransitionDuration<TTime> | undefined; /** * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. * @@ -32564,7 +16082,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: all */ - "-ms-transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[]; + "-ms-transition-property"?: Property.TransitionProperty | undefined; /** * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. * @@ -32572,15 +16090,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `ease` */ - "-ms-transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; + "-ms-transition-timing-function"?: Property.TransitionTimingFunction | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `none | element | text` * * **Initial value**: `text` */ - "-ms-user-select"?: MsUserSelectProperty | MsUserSelectProperty[]; + "-ms-user-select"?: Property.MsUserSelect | undefined; /** * The **`word-break`** CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box. * @@ -32588,7 +16106,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `normal` */ - "-ms-word-break"?: WordBreakProperty | WordBreakProperty[]; + "-ms-word-break"?: Property.WordBreak | undefined; /** * The **`-ms-wrap-flow`** CSS property is a Microsoft extension that specifies how exclusions impact inline content within block-level elements. * @@ -32596,7 +16114,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-ms-wrap-flow"?: MsWrapFlowProperty | MsWrapFlowProperty[]; + "-ms-wrap-flow"?: Property.MsWrapFlow | undefined; /** * The **`-ms-wrap-margin`** CSS property is a Microsoft extension that specifies a margin that offsets the inner wrap shape from other shapes. * @@ -32604,7 +16122,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-ms-wrap-margin"?: MsWrapMarginProperty<TLength> | MsWrapMarginProperty<TLength>[]; + "-ms-wrap-margin"?: Property.MsWrapMargin<TLength> | undefined; /** * The **`-ms-wrap-through`** CSS property is a Microsoft extension that specifies how content should wrap around an exclusion element. * @@ -32612,55 +16130,55 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `wrap` */ - "-ms-wrap-through"?: MsWrapThroughProperty | MsWrapThroughProperty[]; + "-ms-wrap-through"?: Property.MsWrapThrough | undefined; /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). * * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` * * **Initial value**: `horizontal-tb` */ - "-ms-writing-mode"?: WritingModeProperty | WritingModeProperty[]; + "-ms-writing-mode"?: Property.WritingMode | undefined; /** - * The CSS **`align-content`** property sets how the browser distributes space between and around content items along the cross-axis of a flexbox container, and the main-axis of a grid container. + * The CSS **`align-content`** property sets the distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis. * * **Syntax**: `normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>` * * **Initial value**: `normal` */ - "-webkit-align-content"?: AlignContentProperty | AlignContentProperty[]; + "-webkit-align-content"?: Property.AlignContent | undefined; /** - * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. The align-self property sets the alignment of an item within its containing block. In Flexbox it controls the alignment of items on the Cross Axis, in Grid Layout it controls the alignment of items on the Block Axis within their grid area. + * The CSS **`align-items`** property sets the `align-self` value on all direct children as a group. In Flexbox, it controls the alignment of items on the Cross Axis. In Grid Layout, it controls the alignment of items on the Block Axis within their grid area. * * **Syntax**: `normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]` * * **Initial value**: `normal` */ - "-webkit-align-items"?: AlignItemsProperty | AlignItemsProperty[]; + "-webkit-align-items"?: Property.AlignItems | undefined; /** - * The **`align-self`** CSS property aligns flex items of the current flex line overriding the `align-items` value. If any of the item's cross-axis margin is set to `auto`, then `align-self` is ignored. In Grid layout `align-self` aligns the item inside the grid area. + * The **`align-self`** CSS property overrides a grid or flex item's `align-items` value. In Grid, it aligns the item inside the grid area. In Flexbox, it aligns the item on the cross axis. * * **Syntax**: `auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>` * * **Initial value**: `auto` */ - "-webkit-align-self"?: AlignSelfProperty | AlignSelfProperty[]; + "-webkit-align-self"?: Property.AlignSelf | undefined; /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. * * **Syntax**: `<time>#` * * **Initial value**: `0s` */ - "-webkit-animation-delay"?: GlobalsString | GlobalsString[]; + "-webkit-animation-delay"?: Property.AnimationDelay<TTime> | undefined; /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. * * **Syntax**: `<single-animation-direction>#` * * **Initial value**: `normal` */ - "-webkit-animation-direction"?: AnimationDirectionProperty | AnimationDirectionProperty[]; + "-webkit-animation-direction"?: Property.AnimationDirection | undefined; /** * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. * @@ -32668,7 +16186,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0s` */ - "-webkit-animation-duration"?: GlobalsString | GlobalsString[]; + "-webkit-animation-duration"?: Property.AnimationDuration<TTime> | undefined; /** * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. * @@ -32676,23 +16194,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-animation-fill-mode"?: AnimationFillModeProperty | AnimationFillModeProperty[]; + "-webkit-animation-fill-mode"?: Property.AnimationFillMode | undefined; /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. * * **Syntax**: `<single-animation-iteration-count>#` * * **Initial value**: `1` */ - "-webkit-animation-iteration-count"?: AnimationIterationCountProperty | AnimationIterationCountProperty[]; + "-webkit-animation-iteration-count"?: Property.AnimationIterationCount | undefined; /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. * * **Syntax**: `[ none | <keyframes-name> ]#` * * **Initial value**: `none` */ - "-webkit-animation-name"?: AnimationNameProperty | AnimationNameProperty[]; + "-webkit-animation-name"?: Property.AnimationName | undefined; /** * The **`animation-play-state`** CSS property sets whether an animation is running or paused. * @@ -32700,23 +16218,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `running` */ - "-webkit-animation-play-state"?: AnimationPlayStateProperty | AnimationPlayStateProperty[]; + "-webkit-animation-play-state"?: Property.AnimationPlayState | undefined; /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. * * **Syntax**: `<easing-function>#` * * **Initial value**: `ease` */ - "-webkit-animation-timing-function"?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[]; + "-webkit-animation-timing-function"?: Property.AnimationTimingFunction | undefined; /** - * The **`-moz-appearance`** CSS property is used in Gecko (Firefox) to display an element using platform-native styling based on the operating system's theme. + * The **`appearance`** CSS property is used to control native appearance of UI controls, that are based on operating system's theme. * * **Syntax**: `none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button` * * **Initial value**: `none` (but this value is overridden in the user agent CSS) */ - "-webkit-appearance"?: WebkitAppearanceProperty | WebkitAppearanceProperty[]; + "-webkit-appearance"?: Property.WebkitAppearance | undefined; /** * The **`backdrop-filter`** CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything _behind_ the element, to see the effect you must make the element or its background at least partially transparent. * @@ -32724,7 +16242,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-backdrop-filter"?: BackdropFilterProperty | BackdropFilterProperty[]; + "-webkit-backdrop-filter"?: Property.BackdropFilter | undefined; /** * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. * @@ -32732,23 +16250,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `visible` */ - "-webkit-backface-visibility"?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[]; + "-webkit-backface-visibility"?: Property.BackfaceVisibility | undefined; /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. * * **Syntax**: `<box>#` * * **Initial value**: `border-box` */ - "-webkit-background-clip"?: BackgroundClipProperty | BackgroundClipProperty[]; + "-webkit-background-clip"?: Property.BackgroundClip | undefined; /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. * * **Syntax**: `<box>#` * * **Initial value**: `padding-box` */ - "-webkit-background-origin"?: BackgroundOriginProperty | BackgroundOriginProperty[]; + "-webkit-background-origin"?: Property.BackgroundOrigin | undefined; /** * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. * @@ -32756,41 +16274,41 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto auto` */ - "-webkit-background-size"?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[]; + "-webkit-background-size"?: Property.BackgroundSize<TLength> | undefined; /** * **Syntax**: `<color>` * * **Initial value**: `currentcolor` */ - "-webkit-border-before-color"?: WebkitBorderBeforeColorProperty | WebkitBorderBeforeColorProperty[]; + "-webkit-border-before-color"?: Property.WebkitBorderBeforeColor | undefined; /** * **Syntax**: `<'border-style'>` * * **Initial value**: `none` */ - "-webkit-border-before-style"?: WebkitBorderBeforeStyleProperty | WebkitBorderBeforeStyleProperty[]; + "-webkit-border-before-style"?: Property.WebkitBorderBeforeStyle | undefined; /** * **Syntax**: `<'border-width'>` * * **Initial value**: `medium` */ - "-webkit-border-before-width"?: WebkitBorderBeforeWidthProperty<TLength> | WebkitBorderBeforeWidthProperty<TLength>[]; + "-webkit-border-before-width"?: Property.WebkitBorderBeforeWidth<TLength> | undefined; /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * * **Initial value**: `0` */ - "-webkit-border-bottom-left-radius"?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[]; + "-webkit-border-bottom-left-radius"?: Property.BorderBottomLeftRadius<TLength> | undefined; /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * * **Initial value**: `0` */ - "-webkit-border-bottom-right-radius"?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[]; + "-webkit-border-bottom-right-radius"?: Property.BorderBottomRightRadius<TLength> | undefined; /** * The **`border-image-slice`** CSS property divides the image specified by `border-image-source` into regions. These regions form the components of an element's border image. * @@ -32798,23 +16316,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `100%` */ - "-webkit-border-image-slice"?: BorderImageSliceProperty | BorderImageSliceProperty[]; + "-webkit-border-image-slice"?: Property.BorderImageSlice | undefined; /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * * **Initial value**: `0` */ - "-webkit-border-top-left-radius"?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[]; + "-webkit-border-top-left-radius"?: Property.BorderTopLeftRadius<TLength> | undefined; /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * * **Initial value**: `0` */ - "-webkit-border-top-right-radius"?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[]; + "-webkit-border-top-right-radius"?: Property.BorderTopRightRadius<TLength> | undefined; /** * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. * @@ -32822,7 +16340,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `slice` */ - "-webkit-box-decoration-break"?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[]; + "-webkit-box-decoration-break"?: Property.BoxDecorationBreak | undefined; /** * The **`-webkit-box-reflect`** CSS property lets you reflect the content of an element in one specific direction. * @@ -32830,31 +16348,31 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-box-reflect"?: WebkitBoxReflectProperty<TLength> | WebkitBoxReflectProperty<TLength>[]; + "-webkit-box-reflect"?: Property.WebkitBoxReflect<TLength> | undefined; /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. * * **Syntax**: `none | <shadow>#` * * **Initial value**: `none` */ - "-webkit-box-shadow"?: BoxShadowProperty | BoxShadowProperty[]; + "-webkit-box-shadow"?: Property.BoxShadow | undefined; /** - * The **`box-sizing`** CSS property defines how the user agent should calculate the total width and height of an element. + * The **`box-sizing`** CSS property sets how the total width and height of an element is calculated. * * **Syntax**: `content-box | border-box` * * **Initial value**: `content-box` */ - "-webkit-box-sizing"?: BoxSizingProperty | BoxSizingProperty[]; + "-webkit-box-sizing"?: Property.BoxSizing | undefined; /** - * The `**clip-path**` CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. + * The **`clip-path`** CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden. * * **Syntax**: `<clip-source> | [ <basic-shape> || <geometry-box> ] | none` * * **Initial value**: `none` */ - "-webkit-clip-path"?: ClipPathProperty | ClipPathProperty[]; + "-webkit-clip-path"?: Property.ClipPath | undefined; /** * The **`column-count`** CSS property breaks an element's content into the specified number of columns. * @@ -32862,7 +16380,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-column-count"?: ColumnCountProperty | ColumnCountProperty[]; + "-webkit-column-count"?: Property.ColumnCount | undefined; /** * The **`column-fill`** CSS property controls how an element's contents are balanced when broken into columns. * @@ -32870,15 +16388,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `balance` */ - "-webkit-column-fill"?: ColumnFillProperty | ColumnFillProperty[]; + "-webkit-column-fill"?: Property.ColumnFill | undefined; /** - * The **`column-rule-color`** CSS property sets the color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-color`** CSS property sets the color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<color>` * * **Initial value**: `currentcolor` */ - "-webkit-column-rule-color"?: ColumnRuleColorProperty | ColumnRuleColorProperty[]; + "-webkit-column-rule-color"?: Property.ColumnRuleColor | undefined; /** * The **`column-rule-style`** CSS property sets the style of the line drawn between columns in a multi-column layout. * @@ -32886,15 +16404,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-column-rule-style"?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[]; + "-webkit-column-rule-style"?: Property.ColumnRuleStyle | undefined; /** - * The **`column-rule-width`** CSS property sets the width of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule-width`** CSS property sets the width of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'border-width'>` * * **Initial value**: `medium` */ - "-webkit-column-rule-width"?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[]; + "-webkit-column-rule-width"?: Property.ColumnRuleWidth<TLength> | undefined; /** * The **`column-span`** CSS property makes it possible for an element to span across all columns when its value is set to `all`. * @@ -32902,15 +16420,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-column-span"?: ColumnSpanProperty | ColumnSpanProperty[]; + "-webkit-column-span"?: Property.ColumnSpan | undefined; /** - * The **`column-width`** CSS property specifies the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. + * The **`column-width`** CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit without any of them having a width less than the `column-width` value. If the width of the container is narrower than the specified value, the single column's width will be smaller than the declared column width. * * **Syntax**: `<length> | auto` * * **Initial value**: `auto` */ - "-webkit-column-width"?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[]; + "-webkit-column-width"?: Property.ColumnWidth<TLength> | undefined; /** * The **`filter`** CSS property applies graphical effects like blur or color shift to an element. Filters are commonly used to adjust the rendering of images, backgrounds, and borders. * @@ -32918,7 +16436,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-filter"?: FilterProperty | FilterProperty[]; + "-webkit-filter"?: Property.Filter | undefined; /** * The **`flex-basis`** CSS property sets the initial main size of a flex item. It sets the size of the content box unless otherwise set with `box-sizing`. * @@ -32926,7 +16444,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-flex-basis"?: FlexBasisProperty<TLength> | FlexBasisProperty<TLength>[]; + "-webkit-flex-basis"?: Property.FlexBasis<TLength> | undefined; /** * The **`flex-direction`** CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed). * @@ -32934,23 +16452,23 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `row` */ - "-webkit-flex-direction"?: FlexDirectionProperty | FlexDirectionProperty[]; + "-webkit-flex-direction"?: Property.FlexDirection | undefined; /** - * The **`flex-grow`** CSS property sets how much of the available space in the flex container should be assigned to that item (the flex grow factor). If all sibling items have the same flex grow factor, then all items will receive the same share of available space, otherwise it is distributed according to the ratio defined by the different flex grow factors. + * The **`flex-grow`** CSS property sets the flex grow factor of a flex item's main size. * * **Syntax**: `<number>` * * **Initial value**: `0` */ - "-webkit-flex-grow"?: GlobalsNumber | GlobalsNumber[]; + "-webkit-flex-grow"?: Property.FlexGrow | undefined; /** - * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. + * The **`flex-shrink`** CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, items shrink to fit according to `flex-shrink`. * * **Syntax**: `<number>` * * **Initial value**: `1` */ - "-webkit-flex-shrink"?: GlobalsNumber | GlobalsNumber[]; + "-webkit-flex-shrink"?: Property.FlexShrink | undefined; /** * The **`flex-wrap`** CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked. * @@ -32958,7 +16476,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `nowrap` */ - "-webkit-flex-wrap"?: FlexWrapProperty | FlexWrapProperty[]; + "-webkit-flex-wrap"?: Property.FlexWrap | undefined; /** * The **`font-feature-settings`** CSS property controls advanced typographic features in OpenType fonts. * @@ -32966,7 +16484,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `normal` */ - "-webkit-font-feature-settings"?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[]; + "-webkit-font-feature-settings"?: Property.FontFeatureSettings | undefined; /** * The **`font-kerning`** CSS property sets the use of the kerning information stored in a font. * @@ -32974,7 +16492,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-font-kerning"?: FontKerningProperty | FontKerningProperty[]; + "-webkit-font-kerning"?: Property.FontKerning | undefined; /** * The **`font-smooth`** CSS property controls the application of anti-aliasing when fonts are rendered. * @@ -32982,7 +16500,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-font-smoothing"?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[]; + "-webkit-font-smoothing"?: Property.FontSmooth<TLength> | undefined; /** * The **`font-variant-ligatures`** CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text. * @@ -32990,7 +16508,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `normal` */ - "-webkit-font-variant-ligatures"?: FontVariantLigaturesProperty | FontVariantLigaturesProperty[]; + "-webkit-font-variant-ligatures"?: Property.FontVariantLigatures | undefined; /** * The **`hyphenate-character`** CSS property sets the character (or string) used at the end of a line before a hyphenation break. * @@ -32998,15 +16516,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-hyphenate-character"?: HyphenateCharacterProperty | HyphenateCharacterProperty[]; + "-webkit-hyphenate-character"?: Property.HyphenateCharacter | undefined; /** - * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. You can prevent hyphenation entirely, use hyphenation in manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. + * The **`hyphens`** CSS property specifies how words should be hyphenated when text wraps across multiple lines. It can prevent hyphenation entirely, hyphenate at manually-specified points within the text, or let the browser automatically insert hyphens where appropriate. * * **Syntax**: `none | manual | auto` * * **Initial value**: `manual` */ - "-webkit-hyphens"?: HyphensProperty | HyphensProperty[]; + "-webkit-hyphens"?: Property.Hyphens | undefined; /** * The `initial-letter` CSS property sets styling for dropped, raised, and sunken initial letters. * @@ -33014,7 +16532,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `normal` */ - "-webkit-initial-letter"?: InitialLetterProperty | InitialLetterProperty[]; + "-webkit-initial-letter"?: Property.InitialLetter | undefined; /** * The CSS **`justify-content`** property defines how the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container. * @@ -33022,7 +16540,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `normal` */ - "-webkit-justify-content"?: JustifyContentProperty | JustifyContentProperty[]; + "-webkit-justify-content"?: Property.JustifyContent | undefined; /** * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. * @@ -33030,39 +16548,39 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-line-break"?: LineBreakProperty | LineBreakProperty[]; + "-webkit-line-break"?: Property.LineBreak | undefined; /** - * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block container to the specified number of lines. + * The **`-webkit-line-clamp`** CSS property allows limiting of the contents of a block to the specified number of lines. * * **Syntax**: `none | <integer>` * * **Initial value**: `none` */ - "-webkit-line-clamp"?: WebkitLineClampProperty | WebkitLineClampProperty[]; + "-webkit-line-clamp"?: Property.WebkitLineClamp | undefined; /** - * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-end`** CSS property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. In other words, it corresponds to the `margin-top`, `margin-right`, `margin-bottom` or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * * **Initial value**: `0` */ - "-webkit-margin-end"?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[]; + "-webkit-margin-end"?: Property.MarginInlineEnd<TLength> | undefined; /** - * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`margin-inline-start`** CSS property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation. It corresponds to the `margin-top`, `margin-right`, `margin-bottom`, or `margin-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'margin-left'>` * * **Initial value**: `0` */ - "-webkit-margin-start"?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[]; + "-webkit-margin-start"?: Property.MarginInlineStart<TLength> | undefined; /** - * If a `-webkit-mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. + * If a `mask-image` is specified, `-webkit-mask-attachment` determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block. * * **Syntax**: `<attachment>#` * * **Initial value**: `scroll` */ - "-webkit-mask-attachment"?: WebkitMaskAttachmentProperty | WebkitMaskAttachmentProperty[]; + "-webkit-mask-attachment"?: Property.WebkitMaskAttachment | undefined; /** * The **`mask-border-outset`** CSS property specifies the distance by which an element's mask border is set out from its border box. * @@ -33070,7 +16588,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-webkit-mask-box-image-outset"?: MaskBorderOutsetProperty<TLength> | MaskBorderOutsetProperty<TLength>[]; + "-webkit-mask-box-image-outset"?: Property.MaskBorderOutset<TLength> | undefined; /** * The **`mask-border-repeat`** CSS property sets how the edge regions of a source image are adjusted to fit the dimensions of an element's mask border. * @@ -33078,7 +16596,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `stretch` */ - "-webkit-mask-box-image-repeat"?: MaskBorderRepeatProperty | MaskBorderRepeatProperty[]; + "-webkit-mask-box-image-repeat"?: Property.MaskBorderRepeat | undefined; /** * The **`mask-border-slice`** CSS property divides the image set by `mask-border-source` into regions. These regions are used to form the components of an element's mask border. * @@ -33086,7 +16604,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-webkit-mask-box-image-slice"?: MaskBorderSliceProperty | MaskBorderSliceProperty[]; + "-webkit-mask-box-image-slice"?: Property.MaskBorderSlice | undefined; /** * The **`mask-border-source`** CSS property sets the source image used to create an element's mask border. * @@ -33094,7 +16612,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-mask-box-image-source"?: MaskBorderSourceProperty | MaskBorderSourceProperty[]; + "-webkit-mask-box-image-source"?: Property.MaskBorderSource | undefined; /** * The **`mask-border-width`** CSS property sets the width of an element's mask border. * @@ -33102,15 +16620,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-mask-box-image-width"?: MaskBorderWidthProperty<TLength> | MaskBorderWidthProperty<TLength>[]; + "-webkit-mask-box-image-width"?: Property.MaskBorderWidth<TLength> | undefined; /** - * The **`mask-clip`** CSS property determines the area, which is affected by a mask. The painted content of an element must be restricted to this area. + * The **`mask-clip`** CSS property determines the area which is affected by a mask. The painted content of an element must be restricted to this area. * * **Syntax**: `[ <box> | border | padding | content | text ]#` * * **Initial value**: `border` */ - "-webkit-mask-clip"?: WebkitMaskClipProperty | WebkitMaskClipProperty[]; + "-webkit-mask-clip"?: Property.WebkitMaskClip | undefined; /** * The **`-webkit-mask-composite`** property specifies the manner in which multiple mask images applied to the same element are composited with one another. Mask images are composited in the opposite order that they are declared with the `-webkit-mask-image` property. * @@ -33118,15 +16636,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `source-over` */ - "-webkit-mask-composite"?: WebkitMaskCompositeProperty | WebkitMaskCompositeProperty[]; + "-webkit-mask-composite"?: Property.WebkitMaskComposite | undefined; /** - * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. + * The **`mask-image`** CSS property sets the image that is used as mask layer for an element. By default this means the alpha channel of the mask image will be multiplied with the alpha channel of the element. This can be controlled with the `mask-mode` property. * * **Syntax**: `<mask-reference>#` * * **Initial value**: `none` */ - "-webkit-mask-image"?: WebkitMaskImageProperty | WebkitMaskImageProperty[]; + "-webkit-mask-image"?: Property.WebkitMaskImage | undefined; /** * The **`mask-origin`** CSS property sets the origin of a mask. * @@ -33134,7 +16652,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `padding` */ - "-webkit-mask-origin"?: WebkitMaskOriginProperty | WebkitMaskOriginProperty[]; + "-webkit-mask-origin"?: Property.WebkitMaskOrigin | undefined; /** * The **`mask-position`** CSS property sets the initial position, relative to the mask position layer set by `mask-origin`, for each defined mask image. * @@ -33142,7 +16660,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0% 0%` */ - "-webkit-mask-position"?: WebkitMaskPositionProperty<TLength> | WebkitMaskPositionProperty<TLength>[]; + "-webkit-mask-position"?: Property.WebkitMaskPosition<TLength> | undefined; /** * The `-webkit-mask-position-x` CSS property sets the initial horizontal position of a mask image. * @@ -33150,7 +16668,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0%` */ - "-webkit-mask-position-x"?: WebkitMaskPositionXProperty<TLength> | WebkitMaskPositionXProperty<TLength>[]; + "-webkit-mask-position-x"?: Property.WebkitMaskPositionX<TLength> | undefined; /** * The `-webkit-mask-position-y` CSS property sets the initial vertical position of a mask image. * @@ -33158,7 +16676,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0%` */ - "-webkit-mask-position-y"?: WebkitMaskPositionYProperty<TLength> | WebkitMaskPositionYProperty<TLength>[]; + "-webkit-mask-position-y"?: Property.WebkitMaskPositionY<TLength> | undefined; /** * The **`mask-repeat`** CSS property sets how mask images are repeated. A mask image can be repeated along the horizontal axis, the vertical axis, both axes, or not repeated at all. * @@ -33166,7 +16684,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `repeat` */ - "-webkit-mask-repeat"?: WebkitMaskRepeatProperty | WebkitMaskRepeatProperty[]; + "-webkit-mask-repeat"?: Property.WebkitMaskRepeat | undefined; /** * The `-webkit-mask-repeat-x` property specifies whether and how a mask image is repeated (tiled) horizontally. * @@ -33174,7 +16692,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `repeat` */ - "-webkit-mask-repeat-x"?: WebkitMaskRepeatXProperty | WebkitMaskRepeatXProperty[]; + "-webkit-mask-repeat-x"?: Property.WebkitMaskRepeatX | undefined; /** * The `-webkit-mask-repeat-y` property sets whether and how a mask image is repeated (tiled) vertically. * @@ -33182,7 +16700,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `repeat` */ - "-webkit-mask-repeat-y"?: WebkitMaskRepeatYProperty | WebkitMaskRepeatYProperty[]; + "-webkit-mask-repeat-y"?: Property.WebkitMaskRepeatY | undefined; /** * The **`mask-size`** CSS property specifies the sizes of the mask images. The size of the image can be fully or partially constrained in order to preserve its intrinsic ratio. * @@ -33190,15 +16708,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto auto` */ - "-webkit-mask-size"?: WebkitMaskSizeProperty<TLength> | WebkitMaskSizeProperty<TLength>[]; + "-webkit-mask-size"?: Property.WebkitMaskSize<TLength> | undefined; /** - * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block depending on its writing mode. It corresponds to the `max-width` or the `max-height` property depending on the value defined for `writing-mode`. If the writing mode is vertically oriented, the value of `max-inline-size` relates to the maximal height of the element, otherwise it relates to the maximal width of the element. It relates to `max-block-size`, which defines the other dimension of the element. + * The **`max-inline-size`** CSS property defines the horizontal or vertical maximum size of an element's block, depending on its writing mode. It corresponds to either the `max-width` or the `max-height` property, depending on the value of `writing-mode`. * * **Syntax**: `<'max-width'>` * * **Initial value**: `none` */ - "-webkit-max-inline-size"?: MaxInlineSizeProperty<TLength> | MaxInlineSizeProperty<TLength>[]; + "-webkit-max-inline-size"?: Property.MaxInlineSize<TLength> | undefined; /** * The **`order`** CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. * @@ -33206,7 +16724,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-webkit-order"?: GlobalsNumber | GlobalsNumber[]; + "-webkit-order"?: Property.Order | undefined; /** * The `-webkit-overflow-scrolling` CSS property controls whether or not touch devices use momentum-based scrolling for a given element. * @@ -33214,31 +16732,31 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-overflow-scrolling"?: WebkitOverflowScrollingProperty | WebkitOverflowScrollingProperty[]; + "-webkit-overflow-scrolling"?: Property.WebkitOverflowScrolling | undefined; /** - * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-end`** CSS property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * * **Initial value**: `0` */ - "-webkit-padding-end"?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[]; + "-webkit-padding-end"?: Property.PaddingInlineEnd<TLength> | undefined; /** - * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. It corresponds to the `padding-top`, `padding-right`, `padding-bottom`, or `padding-left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`padding-inline-start`** CSS property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation. * * **Syntax**: `<'padding-left'>` * * **Initial value**: `0` */ - "-webkit-padding-start"?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[]; + "-webkit-padding-start"?: Property.PaddingInlineStart<TLength> | undefined; /** - * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with z>0 becomes larger; each 3D-element with z<0 becomes smaller. The strength of the effect is determined by the value of this property. + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. * * **Syntax**: `none | <length>` * * **Initial value**: `none` */ - "-webkit-perspective"?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[]; + "-webkit-perspective"?: Property.Perspective<TLength> | undefined; /** * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. * @@ -33246,7 +16764,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `50% 50%` */ - "-webkit-perspective-origin"?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[]; + "-webkit-perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; /** * The **`print-color-adjust`** CSS property sets what, if anything, the user agent may do to optimize the appearance of the element on the output device. By default, the browser is allowed to make any adjustments to the element's appearance it determines to be necessary and prudent given the type and capabilities of the output device. * @@ -33254,15 +16772,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `economy` */ - "-webkit-print-color-adjust"?: PrintColorAdjustProperty | PrintColorAdjustProperty[]; + "-webkit-print-color-adjust"?: Property.PrintColorAdjust | undefined; /** - * The `**ruby-position**` CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (`over`), under it (`under`), or between the characters, on their right side (`inter-character`). + * The **`ruby-position`** CSS property defines the position of a ruby element relatives to its base element. It can be positioned over the element (`over`), under it (`under`), or between the characters on their right side (`inter-character`). * * **Syntax**: `[ alternate || [ over | under ] ] | inter-character` * * **Initial value**: `alternate` */ - "-webkit-ruby-position"?: RubyPositionProperty | RubyPositionProperty[]; + "-webkit-ruby-position"?: Property.RubyPosition | undefined; /** * The **`scroll-snap-type`** CSS property sets how strictly snap points are enforced on the scroll container in case there is one. * @@ -33270,7 +16788,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-scroll-snap-type"?: ScrollSnapTypeProperty | ScrollSnapTypeProperty[]; + "-webkit-scroll-snap-type"?: Property.ScrollSnapType | undefined; /** * The **`shape-margin`** CSS property sets a margin for a CSS shape created using `shape-outside`. * @@ -33278,15 +16796,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-webkit-shape-margin"?: ShapeMarginProperty<TLength> | ShapeMarginProperty<TLength>[]; + "-webkit-shape-margin"?: Property.ShapeMargin<TLength> | undefined; /** - * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. + * **`-webkit-tap-highlight-color`** is a non-standard CSS property that sets the color of the highlight that appears over a link while it's being tapped. The highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on. * * **Syntax**: `<color>` * * **Initial value**: `black` */ - "-webkit-tap-highlight-color"?: WebkitTapHighlightColorProperty | WebkitTapHighlightColorProperty[]; + "-webkit-tap-highlight-color"?: Property.WebkitTapHighlightColor | undefined; /** * The **`text-combine-upright`** CSS property sets the combination of characters into the space of a single character. If the combined text is wider than 1em, the user agent must fit the contents within 1em. The resulting composition is treated as a single upright glyph for layout and decoration. This property only has an effect in vertical writing modes. * @@ -33294,7 +16812,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-text-combine"?: TextCombineUprightProperty | TextCombineUprightProperty[]; + "-webkit-text-combine"?: Property.TextCombineUpright | undefined; /** * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. * @@ -33302,7 +16820,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `currentcolor` */ - "-webkit-text-decoration-color"?: TextDecorationColorProperty | TextDecorationColorProperty[]; + "-webkit-text-decoration-color"?: Property.TextDecorationColor | undefined; /** * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. * @@ -33310,15 +16828,15 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-text-decoration-line"?: TextDecorationLineProperty | TextDecorationLineProperty[]; + "-webkit-text-decoration-line"?: Property.TextDecorationLine | undefined; /** - * The **`text-decoration-skip`** CSS property sets what parts of an element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. + * The **`text-decoration-skip`** CSS property sets what parts of an element's content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors. * * **Syntax**: `none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]` * * **Initial value**: `objects` */ - "-webkit-text-decoration-skip"?: TextDecorationSkipProperty | TextDecorationSkipProperty[]; + "-webkit-text-decoration-skip"?: Property.TextDecorationSkip | undefined; /** * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. * @@ -33326,7 +16844,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `solid` */ - "-webkit-text-decoration-style"?: TextDecorationStyleProperty | TextDecorationStyleProperty[]; + "-webkit-text-decoration-style"?: Property.TextDecorationStyle | undefined; /** * The **`text-emphasis-color`** CSS property sets the color of emphasis marks. This value can also be set using the `text-emphasis` shorthand. * @@ -33334,7 +16852,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `currentcolor` */ - "-webkit-text-emphasis-color"?: TextEmphasisColorProperty | TextEmphasisColorProperty[]; + "-webkit-text-emphasis-color"?: Property.TextEmphasisColor | undefined; /** * The **`text-emphasis-position`** CSS property sets where emphasis marks are drawn. Like ruby text, if there isn't enough room for emphasis marks, the line height is increased. * @@ -33342,7 +16860,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `over right` */ - "-webkit-text-emphasis-position"?: GlobalsString | GlobalsString[]; + "-webkit-text-emphasis-position"?: Property.TextEmphasisPosition | undefined; /** * The **`text-emphasis-style`** CSS property sets the appearance of emphasis marks. It can also be set, and reset, using the `text-emphasis` shorthand. * @@ -33350,7 +16868,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-text-emphasis-style"?: TextEmphasisStyleProperty | TextEmphasisStyleProperty[]; + "-webkit-text-emphasis-style"?: Property.TextEmphasisStyle | undefined; /** * The **`-webkit-text-fill-color`** CSS property specifies the fill color of characters of text. If this property is not set, the value of the `color` property is used. * @@ -33358,7 +16876,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `currentcolor` */ - "-webkit-text-fill-color"?: WebkitTextFillColorProperty | WebkitTextFillColorProperty[]; + "-webkit-text-fill-color"?: Property.WebkitTextFillColor | undefined; /** * The **`text-orientation`** CSS property sets the orientation of the text characters in a line. It only affects text in vertical mode (when `writing-mode` is not `horizontal-tb`). It is useful for controlling the display of languages that use vertical script, and also for making vertical table headers. * @@ -33366,7 +16884,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `mixed` */ - "-webkit-text-orientation"?: TextOrientationProperty | TextOrientationProperty[]; + "-webkit-text-orientation"?: Property.TextOrientation | undefined; /** * The **`text-size-adjust`** CSS property controls the text inflation algorithm used on some smartphones and tablets. Other browsers will ignore this property. * @@ -33374,7 +16892,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` for smartphone browsers supporting inflation, `none` in other cases (and then not modifiable). */ - "-webkit-text-size-adjust"?: TextSizeAdjustProperty | TextSizeAdjustProperty[]; + "-webkit-text-size-adjust"?: Property.TextSizeAdjust | undefined; /** * The **`-webkit-text-stroke-color`** CSS property specifies the stroke color of characters of text. If this property is not set, the value of the `color` property is used. * @@ -33382,7 +16900,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `currentcolor` */ - "-webkit-text-stroke-color"?: WebkitTextStrokeColorProperty | WebkitTextStrokeColorProperty[]; + "-webkit-text-stroke-color"?: Property.WebkitTextStrokeColor | undefined; /** * The **`-webkit-text-stroke-width`** CSS property specifies the width of the stroke for text. * @@ -33390,7 +16908,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0` */ - "-webkit-text-stroke-width"?: WebkitTextStrokeWidthProperty<TLength> | WebkitTextStrokeWidthProperty<TLength>[]; + "-webkit-text-stroke-width"?: Property.WebkitTextStrokeWidth<TLength> | undefined; /** * The **`text-underline-position`** CSS property specifies the position of the underline which is set using the `text-decoration` property's `underline` value. * @@ -33398,7 +16916,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `auto` */ - "-webkit-text-underline-position"?: TextUnderlinePositionProperty | TextUnderlinePositionProperty[]; + "-webkit-text-underline-position"?: Property.TextUnderlinePosition | undefined; /** * The `-webkit-touch-callout` CSS property controls the display of the default callout shown when you touch and hold a touch target. * @@ -33406,7 +16924,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `default` */ - "-webkit-touch-callout"?: WebkitTouchCalloutProperty | WebkitTouchCalloutProperty[]; + "-webkit-touch-callout"?: Property.WebkitTouchCallout | undefined; /** * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. * @@ -33414,7 +16932,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `none` */ - "-webkit-transform"?: TransformProperty | TransformProperty[]; + "-webkit-transform"?: Property.Transform | undefined; /** * The **`transform-origin`** CSS property sets the origin for an element's transformations. * @@ -33422,7 +16940,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `50% 50% 0` */ - "-webkit-transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; + "-webkit-transform-origin"?: Property.TransformOrigin<TLength> | undefined; /** * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. * @@ -33430,7 +16948,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `flat` */ - "-webkit-transform-style"?: TransformStyleProperty | TransformStyleProperty[]; + "-webkit-transform-style"?: Property.TransformStyle | undefined; /** * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. * @@ -33438,7 +16956,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0s` */ - "-webkit-transition-delay"?: GlobalsString | GlobalsString[]; + "-webkit-transition-delay"?: Property.TransitionDelay<TTime> | undefined; /** * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. * @@ -33446,7 +16964,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `0s` */ - "-webkit-transition-duration"?: GlobalsString | GlobalsString[]; + "-webkit-transition-duration"?: Property.TransitionDuration<TTime> | undefined; /** * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. * @@ -33454,7 +16972,7 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: all */ - "-webkit-transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[]; + "-webkit-transition-property"?: Property.TransitionProperty | undefined; /** * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. * @@ -33462,187 +16980,189 @@ export interface VendorLonghandPropertiesHyphenFallback<TLength = string | 0> { * * **Initial value**: `ease` */ - "-webkit-transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; + "-webkit-transition-timing-function"?: Property.TransitionTimingFunction | undefined; /** * **Syntax**: `read-only | read-write | read-write-plaintext-only` * * **Initial value**: `read-only` */ - "-webkit-user-modify"?: WebkitUserModifyProperty | WebkitUserModifyProperty[]; + "-webkit-user-modify"?: Property.WebkitUserModify | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `auto | text | none | contain | all` * * **Initial value**: `auto` */ - "-webkit-user-select"?: UserSelectProperty | UserSelectProperty[]; + "-webkit-user-select"?: Property.UserSelect | undefined; /** - * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. + * The **`writing-mode`** CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (`html` element for HTML documents). * * **Syntax**: `horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr` * * **Initial value**: `horizontal-tb` */ - "-webkit-writing-mode"?: WritingModeProperty | WritingModeProperty[]; + "-webkit-writing-mode"?: Property.WritingMode | undefined; } -export interface VendorShorthandPropertiesHyphenFallback<TLength = string | 0> { +export interface VendorShorthandPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. * * **Syntax**: `<single-animation>#` */ - "-moz-animation"?: AnimationProperty | AnimationProperty[]; + "-moz-animation"?: Property.Animation<TTime> | undefined; /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. * * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` */ - "-moz-border-image"?: BorderImageProperty | BorderImageProperty[]; + "-moz-border-image"?: Property.BorderImage | undefined; /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` */ - "-moz-column-rule"?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[]; + "-moz-column-rule"?: Property.ColumnRule<TLength> | undefined; /** - * The **`columns`** CSS property sets the column width and column count of an element. + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. * * **Syntax**: `<'column-width'> || <'column-count'>` */ - "-moz-columns"?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[]; + "-moz-columns"?: Property.Columns<TLength> | undefined; /** - * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS shorthand property can be used to give an element's `outline` rounded corners. * - * **Syntax**: `<single-transition>#` + * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` */ - "-moz-transition"?: TransitionProperty | TransitionProperty[]; + "-moz-outline-radius"?: Property.MozOutlineRadius<TLength> | undefined; /** * The **`-ms-content-zoom-limit`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-limit-min` and `-ms-content-zoom-limit-max` properties. * * **Syntax**: `<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>` */ - "-ms-content-zoom-limit"?: GlobalsString | GlobalsString[]; + "-ms-content-zoom-limit"?: Property.MsContentZoomLimit | undefined; /** * The **`-ms-content-zoom-snap`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-content-zoom-snap-type` and `-ms-content-zoom-snap-points` properties. * * **Syntax**: `<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>` */ - "-ms-content-zoom-snap"?: MsContentZoomSnapProperty | MsContentZoomSnapProperty[]; + "-ms-content-zoom-snap"?: Property.MsContentZoomSnap | undefined; /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. * * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` */ - "-ms-flex"?: FlexProperty<TLength> | FlexProperty<TLength>[]; + "-ms-flex"?: Property.Flex<TLength> | undefined; /** * The **\-ms-scroll-limit** CSS property is a Microsoft extension that specifies values for the `-ms-scroll-limit-x-min`, `-ms-scroll-limit-y-min`, `-ms-scroll-limit-x-max`, and `-ms-scroll-limit-y-max` properties. * * **Syntax**: `<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>` */ - "-ms-scroll-limit"?: GlobalsString | GlobalsString[]; + "-ms-scroll-limit"?: Property.MsScrollLimit | undefined; /** * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-x` properties. * * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>` */ - "-ms-scroll-snap-x"?: GlobalsString | GlobalsString[]; + "-ms-scroll-snap-x"?: Property.MsScrollSnapX | undefined; /** * The **`-ms-scroll-snap-x`** CSS shorthand property is a Microsoft extension that specifies values for the `-ms-scroll-snap-type` and `-ms-scroll-snap-points-y` properties. * * **Syntax**: `<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>` */ - "-ms-scroll-snap-y"?: GlobalsString | GlobalsString[]; + "-ms-scroll-snap-y"?: Property.MsScrollSnapY | undefined; /** * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. * * **Syntax**: `<single-transition>#` */ - "-ms-transition"?: TransitionProperty | TransitionProperty[]; + "-ms-transition"?: Property.Transition<TTime> | undefined; /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. * * **Syntax**: `<single-animation>#` */ - "-webkit-animation"?: AnimationProperty | AnimationProperty[]; + "-webkit-animation"?: Property.Animation<TTime> | undefined; /** * The **`-webkit-border-before`** CSS property is a shorthand property for setting the individual logical block start border property values in a single place in the style sheet. * * **Syntax**: `<'border-width'> || <'border-style'> || <color>` */ - "-webkit-border-before"?: WebkitBorderBeforeProperty<TLength> | WebkitBorderBeforeProperty<TLength>[]; + "-webkit-border-before"?: Property.WebkitBorderBefore<TLength> | undefined; /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. * * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` */ - "-webkit-border-image"?: BorderImageProperty | BorderImageProperty[]; + "-webkit-border-image"?: Property.BorderImage | undefined; /** * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. * * **Syntax**: `<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?` */ - "-webkit-border-radius"?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[]; + "-webkit-border-radius"?: Property.BorderRadius<TLength> | undefined; /** - * The **`column-rule`** CSS property sets the width, style, and color of the rule (line) drawn between columns in a multi-column layout. + * The **`column-rule`** shorthand CSS property sets the width, style, and color of the line drawn between columns in a multi-column layout. * * **Syntax**: `<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>` */ - "-webkit-column-rule"?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[]; + "-webkit-column-rule"?: Property.ColumnRule<TLength> | undefined; /** - * The **`columns`** CSS property sets the column width and column count of an element. + * The **`columns`** CSS shorthand property sets the number of columns to use when drawing an element's contents, as well as those columns' widths. * * **Syntax**: `<'column-width'> || <'column-count'>` */ - "-webkit-columns"?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[]; + "-webkit-columns"?: Property.Columns<TLength> | undefined; /** - * The **`flex`** CSS property sets how a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flex-grow`, `flex-shrink`, and `flex-basis`. + * The **`flex`** CSS shorthand property sets how a flex _item_ will grow or shrink to fit the space available in its flex container. * * **Syntax**: `none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]` */ - "-webkit-flex"?: FlexProperty<TLength> | FlexProperty<TLength>[]; + "-webkit-flex"?: Property.Flex<TLength> | undefined; /** - * The **`flex-flow`** CSS property is a shorthand property for `flex-direction` and `flex-wrap` properties. + * The **`flex-flow`** CSS shorthand property specifies the direction of a flex container, as well as its wrapping behavior. * * **Syntax**: `<'flex-direction'> || <'flex-wrap'>` */ - "-webkit-flex-flow"?: FlexFlowProperty | FlexFlowProperty[]; + "-webkit-flex-flow"?: Property.FlexFlow | undefined; /** - * The **`mask`** CSS property hides an element (partially or fully) by masking or clipping the image at specific points. + * The **`mask`** CSS shorthand property hides an element (partially or fully) by masking or clipping the image at specific points. * * **Syntax**: `[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#` */ - "-webkit-mask"?: WebkitMaskProperty<TLength> | WebkitMaskProperty<TLength>[]; + "-webkit-mask"?: Property.WebkitMask<TLength> | undefined; /** - * The **`mask-border`** CSS property lets you create a mask along the edge of an element's border. + * The **`mask-border`** CSS shorthand property lets you create a mask along the edge of an element's border. * * **Syntax**: `<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>` */ - "-webkit-mask-box-image"?: MaskBorderProperty | MaskBorderProperty[]; + "-webkit-mask-box-image"?: Property.MaskBorder | undefined; /** * The **`text-emphasis`** CSS property applies emphasis marks to text (except spaces and control characters). It is a shorthand for `text-emphasis-style` and `text-emphasis-color`. * * **Syntax**: `<'text-emphasis-style'> || <'text-emphasis-color'>` */ - "-webkit-text-emphasis"?: TextEmphasisProperty | TextEmphasisProperty[]; + "-webkit-text-emphasis"?: Property.TextEmphasis | undefined; /** * The **`-webkit-text-stroke`** CSS property specifies the width and color of strokes for text characters. This is a shorthand property for the longhand properties `-webkit-text-stroke-width` and `-webkit-text-stroke-color`. * * **Syntax**: `<length> || <color>` */ - "-webkit-text-stroke"?: WebkitTextStrokeProperty<TLength> | WebkitTextStrokeProperty<TLength>[]; + "-webkit-text-stroke"?: Property.WebkitTextStroke<TLength> | undefined; /** * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. * * **Syntax**: `<single-transition>#` */ - "-webkit-transition"?: TransitionProperty | TransitionProperty[]; + "-webkit-transition"?: Property.Transition<TTime> | undefined; } -export interface VendorPropertiesHyphenFallback<TLength = string | 0> extends VendorLonghandPropertiesHyphenFallback<TLength>, VendorShorthandPropertiesHyphenFallback<TLength> {} +export interface VendorPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> + extends VendorLonghandPropertiesHyphen<TLength, TTime>, + VendorShorthandPropertiesHyphen<TLength, TTime> {} -export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { +export interface ObsoletePropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { /** * In combination with `elevation`, the **`azimuth`** CSS property enables different audio sources to be positioned spatially for aural presentation. This is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage. Stereo output produce a lateral sound stage, while binaural headphones and multi-speaker setups allow for a fully three-dimensional stage. * @@ -33652,7 +17172,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - azimuth?: AzimuthProperty | AzimuthProperty[]; + azimuth?: Property.Azimuth | undefined; /** * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. * @@ -33662,7 +17182,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "box-align"?: BoxAlignProperty | BoxAlignProperty[]; + "box-align"?: Property.BoxAlign | undefined; /** * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). * @@ -33672,7 +17192,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "box-direction"?: BoxDirectionProperty | BoxDirectionProperty[]; + "box-direction"?: Property.BoxDirection | undefined; /** * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. * @@ -33682,7 +17202,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "box-flex"?: GlobalsNumber | GlobalsNumber[]; + "box-flex"?: Property.BoxFlex | undefined; /** * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. * @@ -33692,7 +17212,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "box-flex-group"?: GlobalsNumber | GlobalsNumber[]; + "box-flex-group"?: Property.BoxFlexGroup | undefined; /** * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). * @@ -33702,7 +17222,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "box-lines"?: BoxLinesProperty | BoxLinesProperty[]; + "box-lines"?: Property.BoxLines | undefined; /** * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. * @@ -33712,9 +17232,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "box-ordinal-group"?: GlobalsNumber | GlobalsNumber[]; + "box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. * * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` * @@ -33722,7 +17242,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "box-orient"?: BoxOrientProperty | BoxOrientProperty[]; + "box-orient"?: Property.BoxOrient | undefined; /** * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. * @@ -33732,9 +17252,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "box-pack"?: BoxPackProperty | BoxPackProperty[]; + "box-pack"?: Property.BoxPack | undefined; /** - * The **`clip`** CSS property defines what portion of an element is visible. The `clip` property applies only to absolutely positioned elements, that is elements with `position:absolute` or `position:fixed`. + * The **`clip`** CSS property defines a visible portion of an element. The `clip` property applies only to absolutely positioned elements — that is, elements with `position:absolute` or `position:fixed`. * * **Syntax**: `<shape> | auto` * @@ -33742,7 +17262,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - clip?: ClipProperty | ClipProperty[]; + clip?: Property.Clip | undefined; /** * The **`column-gap`** CSS property sets the size of the gap (gutter) between an element's columns. * @@ -33752,7 +17272,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "grid-column-gap"?: GridColumnGapProperty<TLength> | GridColumnGapProperty<TLength>[]; + "grid-column-gap"?: Property.GridColumnGap<TLength> | undefined; /** * The **`gap`** CSS property sets the gaps (gutters) between rows and columns. It is a shorthand for `row-gap` and `column-gap`. * @@ -33760,9 +17280,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "grid-gap"?: GridGapProperty<TLength> | GridGapProperty<TLength>[]; + "grid-gap"?: Property.GridGap<TLength> | undefined; /** - * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's grid rows. + * The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows. * * **Syntax**: `<length-percentage>` * @@ -33770,7 +17290,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "grid-row-gap"?: GridRowGapProperty<TLength> | GridRowGapProperty<TLength>[]; + "grid-row-gap"?: Property.GridRowGap<TLength> | undefined; /** * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. * @@ -33780,17 +17300,15 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "ime-mode"?: ImeModeProperty | ImeModeProperty[]; + "ime-mode"?: Property.ImeMode | undefined; /** - * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`inset-block`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'top'>{1,2}` * - * **Initial value**: `auto` - * * @deprecated */ - "offset-block"?: InsetBlockProperty<TLength> | InsetBlockProperty<TLength>[]; + "offset-block"?: Property.InsetBlock<TLength> | undefined; /** * The **`inset-block-end`** CSS property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -33800,7 +17318,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "offset-block-end"?: InsetBlockEndProperty<TLength> | InsetBlockEndProperty<TLength>[]; + "offset-block-end"?: Property.InsetBlockEnd<TLength> | undefined; /** * The **`inset-block-start`** CSS property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -33810,19 +17328,17 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "offset-block-start"?: InsetBlockStartProperty<TLength> | InsetBlockStartProperty<TLength>[]; + "offset-block-start"?: Property.InsetBlockStart<TLength> | undefined; /** - * The **`inset-inline`** CSS property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`inset-inline`** CSS property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top` and `bottom`, or `right` and `left` properties depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'top'>{1,2}` * - * **Initial value**: `auto` - * * @deprecated */ - "offset-inline"?: InsetInlineProperty<TLength> | InsetInlineProperty<TLength>[]; + "offset-inline"?: Property.InsetInline<TLength> | undefined; /** - * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. + * The **`inset-inline-end`** CSS property defines the logical inline end inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * * **Syntax**: `<'top'>` * @@ -33830,7 +17346,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "offset-inline-end"?: InsetInlineEndProperty<TLength> | InsetInlineEndProperty<TLength>[]; + "offset-inline-end"?: Property.InsetInlineEnd<TLength> | undefined; /** * The **`inset-inline-start`** CSS property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation. It corresponds to the `top`, `right`, `bottom`, or `left` property depending on the values defined for `writing-mode`, `direction`, and `text-orientation`. * @@ -33840,7 +17356,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "offset-inline-start"?: InsetInlineStartProperty<TLength> | InsetInlineStartProperty<TLength>[]; + "offset-inline-start"?: Property.InsetInlineStart<TLength> | undefined; /** * The **`scroll-snap-coordinate`** CSS property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's `scroll-snap-destination` for each respective axis. * @@ -33850,7 +17366,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "scroll-snap-coordinate"?: ScrollSnapCoordinateProperty<TLength> | ScrollSnapCoordinateProperty<TLength>[]; + "scroll-snap-coordinate"?: Property.ScrollSnapCoordinate<TLength> | undefined; /** * The **`scroll-snap-destination`** CSS property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with. * @@ -33860,7 +17376,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "scroll-snap-destination"?: ScrollSnapDestinationProperty<TLength> | ScrollSnapDestinationProperty<TLength>[]; + "scroll-snap-destination"?: Property.ScrollSnapDestination<TLength> | undefined; /** * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. * @@ -33870,7 +17386,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "scroll-snap-points-x"?: ScrollSnapPointsXProperty | ScrollSnapPointsXProperty[]; + "scroll-snap-points-x"?: Property.ScrollSnapPointsX | undefined; /** * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. * @@ -33880,7 +17396,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "scroll-snap-points-y"?: ScrollSnapPointsYProperty | ScrollSnapPointsYProperty[]; + "scroll-snap-points-y"?: Property.ScrollSnapPointsY | undefined; /** * The **`scroll-snap-type-x`** CSS property defines how strictly snap points are enforced on the horizontal axis of the scroll container in case there is one. * @@ -33890,7 +17406,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "scroll-snap-type-x"?: ScrollSnapTypeXProperty | ScrollSnapTypeXProperty[]; + "scroll-snap-type-x"?: Property.ScrollSnapTypeX | undefined; /** * The **`scroll-snap-type-y`** CSS property defines how strictly snap points are enforced on the vertical axis of the scroll container in case there is one. * @@ -33900,7 +17416,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "scroll-snap-type-y"?: ScrollSnapTypeYProperty | ScrollSnapTypeYProperty[]; + "scroll-snap-type-y"?: Property.ScrollSnapTypeY | undefined; /** * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. * @@ -33910,7 +17426,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-box-align"?: BoxAlignProperty | BoxAlignProperty[]; + "-khtml-box-align"?: Property.BoxAlign | undefined; /** * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). * @@ -33920,7 +17436,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-box-direction"?: BoxDirectionProperty | BoxDirectionProperty[]; + "-khtml-box-direction"?: Property.BoxDirection | undefined; /** * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. * @@ -33930,7 +17446,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-box-flex"?: GlobalsNumber | GlobalsNumber[]; + "-khtml-box-flex"?: Property.BoxFlex | undefined; /** * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. * @@ -33940,7 +17456,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-box-flex-group"?: GlobalsNumber | GlobalsNumber[]; + "-khtml-box-flex-group"?: Property.BoxFlexGroup | undefined; /** * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). * @@ -33950,7 +17466,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-box-lines"?: BoxLinesProperty | BoxLinesProperty[]; + "-khtml-box-lines"?: Property.BoxLines | undefined; /** * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. * @@ -33960,9 +17476,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-box-ordinal-group"?: GlobalsNumber | GlobalsNumber[]; + "-khtml-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. * * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` * @@ -33970,7 +17486,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-box-orient"?: BoxOrientProperty | BoxOrientProperty[]; + "-khtml-box-orient"?: Property.BoxOrient | undefined; /** * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. * @@ -33980,7 +17496,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-box-pack"?: BoxPackProperty | BoxPackProperty[]; + "-khtml-box-pack"?: Property.BoxPack | undefined; /** * The **`line-break`** CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols. * @@ -33990,9 +17506,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-line-break"?: LineBreakProperty | LineBreakProperty[]; + "-khtml-line-break"?: Property.LineBreak | undefined; /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. * * **Syntax**: `<alpha-value>` * @@ -34000,9 +17516,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-opacity"?: OpacityProperty | OpacityProperty[]; + "-khtml-opacity"?: Property.Opacity | undefined; /** - * The `**user-select**` CSS property controls whether the user can select text. This doesn't have any effect on content loaded as chrome, except in textboxes. + * The **`user-select`** CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. * * **Syntax**: `auto | text | none | contain | all` * @@ -34010,9 +17526,19 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-khtml-user-select"?: UserSelectProperty | UserSelectProperty[]; + "-khtml-user-select"?: Property.UserSelect | undefined; /** - * The **`background-clip`** CSS property sets whether an element's background `<color>` or `<image>` extends underneath its border. + * The **`backface-visibility`** CSS property sets whether the back face of an element is visible when turned towards the user. + * + * **Syntax**: `visible | hidden` + * + * **Initial value**: `visible` + * + * @deprecated + */ + "-moz-backface-visibility"?: Property.BackfaceVisibility | undefined; + /** + * The **`background-clip`** CSS property sets whether an element's background extends underneath its border box, padding box, or content box. * * **Syntax**: `<box>#` * @@ -34020,7 +17546,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-background-clip"?: BackgroundClipProperty | BackgroundClipProperty[]; + "-moz-background-clip"?: Property.BackgroundClip | undefined; /** * The **`box-decoration-break`** CSS property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages. * @@ -34030,9 +17556,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-background-inline-policy"?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[]; + "-moz-background-inline-policy"?: Property.BoxDecorationBreak | undefined; /** - * The **`background-origin`** CSS property sets the _background positioning area_. In other words, it sets the origin position of an image set with the `background-image` property. + * The **`background-origin`** CSS property sets the background's origin: from the border start, inside the border, or inside the padding. * * **Syntax**: `<box>#` * @@ -34040,7 +17566,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-background-origin"?: BackgroundOriginProperty | BackgroundOriginProperty[]; + "-moz-background-origin"?: Property.BackgroundOrigin | undefined; /** * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. * @@ -34050,17 +17576,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-background-size"?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[]; - /** - * The **`-moz-binding`** CSS property is used by Mozilla-based applications to attach an XBL binding to a DOM element. - * - * **Syntax**: `<url> | none` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-moz-binding"?: MozBindingProperty | MozBindingProperty[]; + "-moz-background-size"?: Property.BackgroundSize<TLength> | undefined; /** * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners. * @@ -34068,9 +17584,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-border-radius"?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[]; + "-moz-border-radius"?: Property.BorderRadius<TLength> | undefined; /** - * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element. + * The **`border-bottom-left-radius`** CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -34078,9 +17594,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-border-radius-bottomleft"?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[]; + "-moz-border-radius-bottomleft"?: Property.BorderBottomLeftRadius<TLength> | undefined; /** - * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element. + * The **`border-bottom-right-radius`** CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -34088,9 +17604,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-border-radius-bottomright"?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[]; + "-moz-border-radius-bottomright"?: Property.BorderBottomRightRadius<TLength> | undefined; /** - * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element. + * The **`border-top-left-radius`** CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -34098,9 +17614,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-border-radius-topleft"?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[]; + "-moz-border-radius-topleft"?: Property.BorderTopLeftRadius<TLength> | undefined; /** - * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element. + * The **`border-top-right-radius`** CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. * * **Syntax**: `<length-percentage>{1,2}` * @@ -34108,7 +17624,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-border-radius-topright"?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[]; + "-moz-border-radius-topright"?: Property.BorderTopRightRadius<TLength> | undefined; /** * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. * @@ -34118,7 +17634,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-box-align"?: BoxAlignProperty | BoxAlignProperty[]; + "-moz-box-align"?: Property.BoxAlign | undefined; /** * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). * @@ -34128,7 +17644,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-box-direction"?: BoxDirectionProperty | BoxDirectionProperty[]; + "-moz-box-direction"?: Property.BoxDirection | undefined; /** * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. * @@ -34138,7 +17654,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-box-flex"?: GlobalsNumber | GlobalsNumber[]; + "-moz-box-flex"?: Property.BoxFlex | undefined; /** * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. * @@ -34148,9 +17664,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-box-ordinal-group"?: GlobalsNumber | GlobalsNumber[]; + "-moz-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. * * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` * @@ -34158,7 +17674,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-box-orient"?: BoxOrientProperty | BoxOrientProperty[]; + "-moz-box-orient"?: Property.BoxOrient | undefined; /** * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. * @@ -34168,9 +17684,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-box-pack"?: BoxPackProperty | BoxPackProperty[]; + "-moz-box-pack"?: Property.BoxPack | undefined; /** - * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. + * The **`box-shadow`** CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color. * * **Syntax**: `none | <shadow>#` * @@ -34178,7 +17694,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-box-shadow"?: BoxShadowProperty | BoxShadowProperty[]; + "-moz-box-shadow"?: Property.BoxShadow | undefined; /** * The non-standard **`-moz-float-edge`** CSS property specifies whether the height and width properties of the element include the margin, border, or padding thickness. * @@ -34188,7 +17704,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-float-edge"?: MozFloatEdgeProperty | MozFloatEdgeProperty[]; + "-moz-float-edge"?: Property.MozFloatEdge | undefined; /** * The **`-moz-force-broken-image-icon`** extended CSS property can be used to force the broken image icon to be shown even when a broken image has an `alt` attribute. * @@ -34198,9 +17714,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-force-broken-image-icon"?: MozForceBrokenImageIconProperty | MozForceBrokenImageIconProperty[]; + "-moz-force-broken-image-icon"?: Property.MozForceBrokenImageIcon | undefined; /** - * The **`opacity`** CSS property sets the transparency of an element or the degree to which content behind an element is visible. + * The **`opacity`** CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and is the opposite of transparency. * * **Syntax**: `<alpha-value>` * @@ -34208,15 +17724,15 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-opacity"?: OpacityProperty | OpacityProperty[]; + "-moz-opacity"?: Property.Opacity | undefined; /** - * The **`outline`** CSS property is a shorthand to set various outline properties in a single declaration: `outline-style`, `outline-width`, and `outline-color`. + * The **`outline`** CSS shorthand property sets most of the outline properties in a single declaration. * * **Syntax**: `[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]` * * @deprecated */ - "-moz-outline"?: OutlineProperty<TLength> | OutlineProperty<TLength>[]; + "-moz-outline"?: Property.Outline<TLength> | undefined; /** * The **`outline-color`** CSS property sets the color of an element's outline. * @@ -34226,55 +17742,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-outline-color"?: OutlineColorProperty | OutlineColorProperty[]; - /** - * In Mozilla applications like Firefox, the **`-moz-outline-radius`** CSS property can be used to give an element's `outline` rounded corners. - * - * **Syntax**: `<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?` - * - * @deprecated - */ - "-moz-outline-radius"?: MozOutlineRadiusProperty<TLength> | MozOutlineRadiusProperty<TLength>[]; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomleft`** CSS property can be used to round the bottom-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-outline-radius-bottomleft"?: MozOutlineRadiusBottomleftProperty<TLength> | MozOutlineRadiusBottomleftProperty<TLength>[]; - /** - * In Mozilla applications, the **`-moz-outline-radius-bottomright`** CSS property can be used to round the bottom-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-outline-radius-bottomright"?: MozOutlineRadiusBottomrightProperty<TLength> | MozOutlineRadiusBottomrightProperty<TLength>[]; - /** - * In Mozilla applications, the **`-moz-outline-radius-topleft`** CSS property can be used to round the top-left corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-outline-radius-topleft"?: MozOutlineRadiusTopleftProperty<TLength> | MozOutlineRadiusTopleftProperty<TLength>[]; - /** - * In Mozilla applications, the **`-moz-outline-radius-topright`** CSS property can be used to round the top-right corner of an element's `outline`. - * - * **Syntax**: `<outline-radius>` - * - * **Initial value**: `0` - * - * @deprecated - */ - "-moz-outline-radius-topright"?: MozOutlineRadiusToprightProperty<TLength> | MozOutlineRadiusToprightProperty<TLength>[]; + "-moz-outline-color"?: Property.OutlineColor | undefined; /** * The **`outline-style`** CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the `border`. * @@ -34284,9 +17752,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-outline-style"?: OutlineStyleProperty | OutlineStyleProperty[]; + "-moz-outline-style"?: Property.OutlineStyle | undefined; /** - * The **`outline-width`** CSS property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. + * The CSS **`outline-width`** property sets the thickness of an element's outline. An outline is a line that is drawn around an element, outside the `border`. * * **Syntax**: `<line-width>` * @@ -34294,7 +17762,27 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-outline-width"?: OutlineWidthProperty<TLength> | OutlineWidthProperty<TLength>[]; + "-moz-outline-width"?: Property.OutlineWidth<TLength> | undefined; + /** + * The **`perspective`** CSS property determines the distance between the z=0 plane and the user in order to give a 3D-positioned element some perspective. + * + * **Syntax**: `none | <length>` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-moz-perspective"?: Property.Perspective<TLength> | undefined; + /** + * The **`perspective-origin`** CSS property determines the position at which the viewer is looking. It is used as the _vanishing point_ by the `perspective` property. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * @deprecated + */ + "-moz-perspective-origin"?: Property.PerspectiveOrigin<TLength> | undefined; /** * The **`text-align-last`** CSS property sets how the last line of a block or a line, right before a forced line break, is aligned. * @@ -34304,7 +17792,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-text-align-last"?: TextAlignLastProperty | TextAlignLastProperty[]; + "-moz-text-align-last"?: Property.TextAlignLast | undefined; /** * The **`text-decoration-color`** CSS property sets the color of decorations added to text by `text-decoration-line`. * @@ -34314,7 +17802,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-text-decoration-color"?: TextDecorationColorProperty | TextDecorationColorProperty[]; + "-moz-text-decoration-color"?: Property.TextDecorationColor | undefined; /** * The **`text-decoration-line`** CSS property sets the kind of decoration that is used on text in an element, such as an underline or overline. * @@ -34324,7 +17812,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-text-decoration-line"?: TextDecorationLineProperty | TextDecorationLineProperty[]; + "-moz-text-decoration-line"?: Property.TextDecorationLine | undefined; /** * The **`text-decoration-style`** CSS property sets the style of the lines specified by `text-decoration-line`. The style applies to all lines that are set with `text-decoration-line`. * @@ -34334,173 +17822,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-moz-text-decoration-style"?: TextDecorationStyleProperty | TextDecorationStyleProperty[]; - /** - * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. - * - * **Syntax**: `auto | none | enabled | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-moz-user-input"?: MozUserInputProperty | MozUserInputProperty[]; - /** - * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. - * - * **Syntax**: `auto | normal | active | inactive | disabled` - * - * **Initial value**: `auto` - * - * @deprecated - */ - "-ms-ime-mode"?: ImeModeProperty | ImeModeProperty[]; - /** - * The **`animation`** shorthand CSS property sets an animated transition between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. - * - * **Syntax**: `<single-animation>#` - * - * @deprecated - */ - "-o-animation"?: AnimationProperty | AnimationProperty[]; - /** - * The **`animation-delay`** CSS property sets when an animation starts. The animation can start later, immediately from its beginning, or immediately and partway through the animation. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-animation-delay"?: GlobalsString | GlobalsString[]; - /** - * The **`animation-direction`** CSS property sets whether an animation should play forwards, backwards, or alternating back and forth. - * - * **Syntax**: `<single-animation-direction>#` - * - * **Initial value**: `normal` - * - * @deprecated - */ - "-o-animation-direction"?: AnimationDirectionProperty | AnimationDirectionProperty[]; - /** - * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. - * - * **Syntax**: `<time>#` - * - * **Initial value**: `0s` - * - * @deprecated - */ - "-o-animation-duration"?: GlobalsString | GlobalsString[]; - /** - * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. - * - * **Syntax**: `<single-animation-fill-mode>#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-o-animation-fill-mode"?: AnimationFillModeProperty | AnimationFillModeProperty[]; - /** - * The **`animation-iteration-count`** CSS property sets the number of times an animation cycle should be played before stopping. - * - * **Syntax**: `<single-animation-iteration-count>#` - * - * **Initial value**: `1` - * - * @deprecated - */ - "-o-animation-iteration-count"?: AnimationIterationCountProperty | AnimationIterationCountProperty[]; - /** - * The **`animation-name`** CSS property sets one or more animations to apply to an element. Each name is an `@keyframes` at-rule that sets the property values for the animation sequence. - * - * **Syntax**: `[ none | <keyframes-name> ]#` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-o-animation-name"?: AnimationNameProperty | AnimationNameProperty[]; - /** - * The **`animation-play-state`** CSS property sets whether an animation is running or paused. - * - * **Syntax**: `<single-animation-play-state>#` - * - * **Initial value**: `running` - * - * @deprecated - */ - "-o-animation-play-state"?: AnimationPlayStateProperty | AnimationPlayStateProperty[]; - /** - * The `**animation-timing-function**` CSS property sets how an animation progresses through the duration of each cycle. - * - * **Syntax**: `<easing-function>#` - * - * **Initial value**: `ease` - * - * @deprecated - */ - "-o-animation-timing-function"?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[]; - /** - * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. - * - * **Syntax**: `<bg-size>#` - * - * **Initial value**: `auto auto` - * - * @deprecated - */ - "-o-background-size"?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[]; - /** - * The **`border-image`** CSS property draws an image in place of an element's `border-style`. - * - * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` - * - * @deprecated - */ - "-o-border-image"?: BorderImageProperty | BorderImageProperty[]; - /** - * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. - * - * **Syntax**: `fill | contain | cover | none | scale-down` - * - * **Initial value**: `fill` - * - * @deprecated - */ - "-o-object-fit"?: ObjectFitProperty | ObjectFitProperty[]; - /** - * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. - * - * **Syntax**: `<position>` - * - * **Initial value**: `50% 50%` - * - * @deprecated - */ - "-o-object-position"?: ObjectPositionProperty<TLength> | ObjectPositionProperty<TLength>[]; - /** - * The **`tab-size`** CSS property is used to customize the width of a tab (`U+0009`) character. - * - * **Syntax**: `<integer> | <length>` - * - * **Initial value**: `8` - * - * @deprecated - */ - "-o-tab-size"?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[]; - /** - * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. - * - * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` - * - * **Initial value**: `clip` - * - * @deprecated - */ - "-o-text-overflow"?: TextOverflowProperty | TextOverflowProperty[]; + "-moz-text-decoration-style"?: Property.TextDecorationStyle | undefined; /** * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. * @@ -34510,7 +17832,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-o-transform"?: TransformProperty | TransformProperty[]; + "-moz-transform"?: Property.Transform | undefined; /** * The **`transform-origin`** CSS property sets the origin for an element's transformations. * @@ -34520,7 +17842,17 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-o-transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[]; + "-moz-transform-origin"?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transform-style`** CSS property sets whether children of an element are positioned in the 3D space or are flattened in the plane of the element. + * + * **Syntax**: `flat | preserve-3d` + * + * **Initial value**: `flat` + * + * @deprecated + */ + "-moz-transform-style"?: Property.TransformStyle | undefined; /** * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. * @@ -34528,7 +17860,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-o-transition"?: TransitionProperty | TransitionProperty[]; + "-moz-transition"?: Property.Transition<TTime> | undefined; /** * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. * @@ -34538,7 +17870,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-o-transition-delay"?: GlobalsString | GlobalsString[]; + "-moz-transition-delay"?: Property.TransitionDelay<TTime> | undefined; /** * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. * @@ -34548,7 +17880,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-o-transition-duration"?: GlobalsString | GlobalsString[]; + "-moz-transition-duration"?: Property.TransitionDuration<TTime> | undefined; /** * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. * @@ -34558,7 +17890,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-o-transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[]; + "-moz-transition-property"?: Property.TransitionProperty | undefined; /** * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. * @@ -34568,7 +17900,241 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-o-transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[]; + "-moz-transition-timing-function"?: Property.TransitionTimingFunction | undefined; + /** + * In Mozilla applications, **`-moz-user-input`** determines if an element will accept user input. + * + * **Syntax**: `auto | none | enabled | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "-moz-user-input"?: Property.MozUserInput | undefined; + /** + * The **`ime-mode`** CSS property controls the state of the input method editor (IME) for text fields. This property is obsolete. + * + * **Syntax**: `auto | normal | active | inactive | disabled` + * + * **Initial value**: `auto` + * + * @deprecated + */ + "-ms-ime-mode"?: Property.ImeMode | undefined; + /** + * The **`animation`** shorthand CSS property applies an animation between styles. It is a shorthand for `animation-name`, `animation-duration`, `animation-timing-function`, `animation-delay`, `animation-iteration-count`, `animation-direction`, `animation-fill-mode`, and `animation-play-state`. + * + * **Syntax**: `<single-animation>#` + * + * @deprecated + */ + "-o-animation"?: Property.Animation<TTime> | undefined; + /** + * The **`animation-delay`** CSS property specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation. The animation can start later, immediately from its beginning, or immediately and partway through the animation. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-o-animation-delay"?: Property.AnimationDelay<TTime> | undefined; + /** + * The **`animation-direction`** CSS property sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward. + * + * **Syntax**: `<single-animation-direction>#` + * + * **Initial value**: `normal` + * + * @deprecated + */ + "-o-animation-direction"?: Property.AnimationDirection | undefined; + /** + * The **`animation-duration`** CSS property sets the length of time that an animation takes to complete one cycle. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-o-animation-duration"?: Property.AnimationDuration<TTime> | undefined; + /** + * The **`animation-fill-mode`** CSS property sets how a CSS animation applies styles to its target before and after its execution. + * + * **Syntax**: `<single-animation-fill-mode>#` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-o-animation-fill-mode"?: Property.AnimationFillMode | undefined; + /** + * The **`animation-iteration-count`** CSS property sets the number of times an animation sequence should be played before stopping. + * + * **Syntax**: `<single-animation-iteration-count>#` + * + * **Initial value**: `1` + * + * @deprecated + */ + "-o-animation-iteration-count"?: Property.AnimationIterationCount | undefined; + /** + * The **`animation-name`** CSS property specifies the names of one or more `@keyframes` at-rules that describe the animation to apply to an element. Multiple `@keyframe` at-rules are specified as a comma-separated list of names. If the specified name does not match any `@keyframe` at-rule, no properties are animated. + * + * **Syntax**: `[ none | <keyframes-name> ]#` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-o-animation-name"?: Property.AnimationName | undefined; + /** + * The **`animation-play-state`** CSS property sets whether an animation is running or paused. + * + * **Syntax**: `<single-animation-play-state>#` + * + * **Initial value**: `running` + * + * @deprecated + */ + "-o-animation-play-state"?: Property.AnimationPlayState | undefined; + /** + * The **`animation-timing-function`** CSS property sets how an animation progresses through the duration of each cycle. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + "-o-animation-timing-function"?: Property.AnimationTimingFunction | undefined; + /** + * The **`background-size`** CSS property sets the size of the element's background image. The image can be left to its natural size, stretched, or constrained to fit the available space. + * + * **Syntax**: `<bg-size>#` + * + * **Initial value**: `auto auto` + * + * @deprecated + */ + "-o-background-size"?: Property.BackgroundSize<TLength> | undefined; + /** + * The **`border-image`** CSS property draws an image around a given element. It replaces the element's regular border. + * + * **Syntax**: `<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>` + * + * @deprecated + */ + "-o-border-image"?: Property.BorderImage | undefined; + /** + * The **`object-fit`** CSS property sets how the content of a replaced element, such as an `<img>` or `<video>`, should be resized to fit its container. + * + * **Syntax**: `fill | contain | cover | none | scale-down` + * + * **Initial value**: `fill` + * + * @deprecated + */ + "-o-object-fit"?: Property.ObjectFit | undefined; + /** + * The **`object-position`** CSS property specifies the alignment of the selected replaced element's contents within the element's box. Areas of the box which aren't covered by the replaced element's object will show the element's background. + * + * **Syntax**: `<position>` + * + * **Initial value**: `50% 50%` + * + * @deprecated + */ + "-o-object-position"?: Property.ObjectPosition<TLength> | undefined; + /** + * The **`tab-size`** CSS property is used to customize the width of tab characters (U+0009). + * + * **Syntax**: `<integer> | <length>` + * + * **Initial value**: `8` + * + * @deprecated + */ + "-o-tab-size"?: Property.TabSize<TLength> | undefined; + /** + * The **`text-overflow`** CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis ('`…`'), or display a custom string. + * + * **Syntax**: `[ clip | ellipsis | <string> ]{1,2}` + * + * **Initial value**: `clip` + * + * @deprecated + */ + "-o-text-overflow"?: Property.TextOverflow | undefined; + /** + * The **`transform`** CSS property lets you rotate, scale, skew, or translate an element. It modifies the coordinate space of the CSS visual formatting model. + * + * **Syntax**: `none | <transform-list>` + * + * **Initial value**: `none` + * + * @deprecated + */ + "-o-transform"?: Property.Transform | undefined; + /** + * The **`transform-origin`** CSS property sets the origin for an element's transformations. + * + * **Syntax**: `[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?` + * + * **Initial value**: `50% 50% 0` + * + * @deprecated + */ + "-o-transform-origin"?: Property.TransformOrigin<TLength> | undefined; + /** + * The **`transition`** CSS property is a shorthand property for `transition-property`, `transition-duration`, `transition-timing-function`, and `transition-delay`. + * + * **Syntax**: `<single-transition>#` + * + * @deprecated + */ + "-o-transition"?: Property.Transition<TTime> | undefined; + /** + * The **`transition-delay`** CSS property specifies the duration to wait before starting a property's transition effect when its value changes. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-o-transition-delay"?: Property.TransitionDelay<TTime> | undefined; + /** + * The **`transition-duration`** CSS property sets the length of time a transition animation should take to complete. By default, the value is `0s`, meaning that no animation will occur. + * + * **Syntax**: `<time>#` + * + * **Initial value**: `0s` + * + * @deprecated + */ + "-o-transition-duration"?: Property.TransitionDuration<TTime> | undefined; + /** + * The **`transition-property`** CSS property sets the CSS properties to which a transition effect should be applied. + * + * **Syntax**: `none | <single-transition-property>#` + * + * **Initial value**: all + * + * @deprecated + */ + "-o-transition-property"?: Property.TransitionProperty | undefined; + /** + * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. + * + * **Syntax**: `<easing-function>#` + * + * **Initial value**: `ease` + * + * @deprecated + */ + "-o-transition-timing-function"?: Property.TransitionTimingFunction | undefined; /** * The **`box-align`** CSS property specifies how an element aligns its contents across its layout in a perpendicular direction. The effect of the property is only visible if there is extra space in the box. * @@ -34578,7 +18144,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-webkit-box-align"?: BoxAlignProperty | BoxAlignProperty[]; + "-webkit-box-align"?: Property.BoxAlign | undefined; /** * The **`box-direction`** CSS property specifies whether a box lays out its contents normally (from the top or left edge), or in reverse (from the bottom or right edge). * @@ -34588,7 +18154,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-webkit-box-direction"?: BoxDirectionProperty | BoxDirectionProperty[]; + "-webkit-box-direction"?: Property.BoxDirection | undefined; /** * The **`-moz-box-flex`** and **`-webkit-box-flex`** CSS properties specify how a `-moz-box` or `-webkit-box` grows to fill the box that contains it, in the direction of the containing box's layout. * @@ -34598,7 +18164,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-webkit-box-flex"?: GlobalsNumber | GlobalsNumber[]; + "-webkit-box-flex"?: Property.BoxFlex | undefined; /** * The **`box-flex-group`** CSS property assigns the flexbox's child elements to a flex group. * @@ -34608,7 +18174,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-webkit-box-flex-group"?: GlobalsNumber | GlobalsNumber[]; + "-webkit-box-flex-group"?: Property.BoxFlexGroup | undefined; /** * The **`box-lines`** CSS property determines whether the box may have a single or multiple lines (rows for horizontally oriented boxes, columns for vertically oriented boxes). * @@ -34618,7 +18184,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-webkit-box-lines"?: BoxLinesProperty | BoxLinesProperty[]; + "-webkit-box-lines"?: Property.BoxLines | undefined; /** * The **`box-ordinal-group`** CSS property assigns the flexbox's child elements to an ordinal group. * @@ -34628,9 +18194,9 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-webkit-box-ordinal-group"?: GlobalsNumber | GlobalsNumber[]; + "-webkit-box-ordinal-group"?: Property.BoxOrdinalGroup | undefined; /** - * The **`box-orient`** CSS property specifies whether an element lays out its contents horizontally or vertically. + * The **`box-orient`** CSS property sets whether an element lays out its contents horizontally or vertically. * * **Syntax**: `horizontal | vertical | inline-axis | block-axis | inherit` * @@ -34638,7 +18204,7 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-webkit-box-orient"?: BoxOrientProperty | BoxOrientProperty[]; + "-webkit-box-orient"?: Property.BoxOrient | undefined; /** * The **`-moz-box-pack`** and **`-webkit-box-pack`** CSS properties specify how a `-moz-box` or `-webkit-box` packs its contents in the direction of its layout. The effect of this is only visible if there is extra space in the box. * @@ -34648,329 +18214,129 @@ export interface ObsoletePropertiesHyphenFallback<TLength = string | 0> { * * @deprecated */ - "-webkit-box-pack"?: BoxPackProperty | BoxPackProperty[]; - /** - * The **`scroll-snap-points-x`** CSS property defines the horizontal positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-webkit-scroll-snap-points-x"?: ScrollSnapPointsXProperty | ScrollSnapPointsXProperty[]; - /** - * The **`scroll-snap-points-y`** CSS property defines the vertical positioning of snap points within the content of the scroll container they are applied to. - * - * **Syntax**: `none | repeat( <length-percentage> )` - * - * **Initial value**: `none` - * - * @deprecated - */ - "-webkit-scroll-snap-points-y"?: ScrollSnapPointsYProperty | ScrollSnapPointsYProperty[]; + "-webkit-box-pack"?: Property.BoxPack | undefined; } -export interface SvgPropertiesHyphenFallback<TLength = string | 0> { - "alignment-baseline"?: AlignmentBaselineProperty | AlignmentBaselineProperty[]; - "baseline-shift"?: BaselineShiftProperty<TLength> | BaselineShiftProperty<TLength>[]; - clip?: ClipProperty | ClipProperty[]; - "clip-path"?: ClipPathProperty | ClipPathProperty[]; - "clip-rule"?: ClipRuleProperty | ClipRuleProperty[]; - color?: ColorProperty | ColorProperty[]; - "color-interpolation"?: ColorInterpolationProperty | ColorInterpolationProperty[]; - "color-rendering"?: ColorRenderingProperty | ColorRenderingProperty[]; - cursor?: CursorProperty | CursorProperty[]; - direction?: DirectionProperty | DirectionProperty[]; - display?: DisplayProperty | DisplayProperty[]; - "dominant-baseline"?: DominantBaselineProperty | DominantBaselineProperty[]; - fill?: FillProperty | FillProperty[]; - "fill-opacity"?: GlobalsNumber | GlobalsNumber[]; - "fill-rule"?: FillRuleProperty | FillRuleProperty[]; - filter?: FilterProperty | FilterProperty[]; - "flood-color"?: FloodColorProperty | FloodColorProperty[]; - "flood-opacity"?: GlobalsNumber | GlobalsNumber[]; - font?: FontProperty | FontProperty[]; - "font-family"?: FontFamilyProperty | FontFamilyProperty[]; - "font-size"?: FontSizeProperty<TLength> | FontSizeProperty<TLength>[]; - "font-size-adjust"?: FontSizeAdjustProperty | FontSizeAdjustProperty[]; - "font-stretch"?: FontStretchProperty | FontStretchProperty[]; - "font-style"?: FontStyleProperty | FontStyleProperty[]; - "font-variant"?: FontVariantProperty | FontVariantProperty[]; - "font-weight"?: FontWeightProperty | FontWeightProperty[]; - "glyph-orientation-vertical"?: GlyphOrientationVerticalProperty | GlyphOrientationVerticalProperty[]; - "image-rendering"?: ImageRenderingProperty | ImageRenderingProperty[]; - "letter-spacing"?: LetterSpacingProperty<TLength> | LetterSpacingProperty<TLength>[]; - "lighting-color"?: LightingColorProperty | LightingColorProperty[]; - "line-height"?: LineHeightProperty<TLength> | LineHeightProperty<TLength>[]; - marker?: MarkerProperty | MarkerProperty[]; - "marker-end"?: MarkerEndProperty | MarkerEndProperty[]; - "marker-mid"?: MarkerMidProperty | MarkerMidProperty[]; - "marker-start"?: MarkerStartProperty | MarkerStartProperty[]; - mask?: MaskProperty<TLength> | MaskProperty<TLength>[]; - opacity?: OpacityProperty | OpacityProperty[]; - overflow?: OverflowProperty | OverflowProperty[]; - "paint-order"?: PaintOrderProperty | PaintOrderProperty[]; - "pointer-events"?: PointerEventsProperty | PointerEventsProperty[]; - "shape-rendering"?: ShapeRenderingProperty | ShapeRenderingProperty[]; - "stop-color"?: StopColorProperty | StopColorProperty[]; - "stop-opacity"?: GlobalsNumber | GlobalsNumber[]; - stroke?: StrokeProperty | StrokeProperty[]; - "stroke-dasharray"?: StrokeDasharrayProperty<TLength> | StrokeDasharrayProperty<TLength>[]; - "stroke-dashoffset"?: StrokeDashoffsetProperty<TLength> | StrokeDashoffsetProperty<TLength>[]; - "stroke-linecap"?: StrokeLinecapProperty | StrokeLinecapProperty[]; - "stroke-linejoin"?: StrokeLinejoinProperty | StrokeLinejoinProperty[]; - "stroke-miterlimit"?: GlobalsNumber | GlobalsNumber[]; - "stroke-opacity"?: GlobalsNumber | GlobalsNumber[]; - "stroke-width"?: StrokeWidthProperty<TLength> | StrokeWidthProperty<TLength>[]; - "text-anchor"?: TextAnchorProperty | TextAnchorProperty[]; - "text-decoration"?: TextDecorationProperty<TLength> | TextDecorationProperty<TLength>[]; - "text-rendering"?: TextRenderingProperty | TextRenderingProperty[]; - "unicode-bidi"?: UnicodeBidiProperty | UnicodeBidiProperty[]; - "vector-effect"?: VectorEffectProperty | VectorEffectProperty[]; - visibility?: VisibilityProperty | VisibilityProperty[]; - "white-space"?: WhiteSpaceProperty | WhiteSpaceProperty[]; - "word-spacing"?: WordSpacingProperty<TLength> | WordSpacingProperty<TLength>[]; - "writing-mode"?: WritingModeProperty | WritingModeProperty[]; +export interface SvgPropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + "alignment-baseline"?: Property.AlignmentBaseline | undefined; + "baseline-shift"?: Property.BaselineShift<TLength> | undefined; + clip?: Property.Clip | undefined; + "clip-path"?: Property.ClipPath | undefined; + "clip-rule"?: Property.ClipRule | undefined; + color?: Property.Color | undefined; + "color-interpolation"?: Property.ColorInterpolation | undefined; + "color-rendering"?: Property.ColorRendering | undefined; + cursor?: Property.Cursor | undefined; + direction?: Property.Direction | undefined; + display?: Property.Display | undefined; + "dominant-baseline"?: Property.DominantBaseline | undefined; + fill?: Property.Fill | undefined; + "fill-opacity"?: Property.FillOpacity | undefined; + "fill-rule"?: Property.FillRule | undefined; + filter?: Property.Filter | undefined; + "flood-color"?: Property.FloodColor | undefined; + "flood-opacity"?: Property.FloodOpacity | undefined; + font?: Property.Font | undefined; + "font-family"?: Property.FontFamily | undefined; + "font-size"?: Property.FontSize<TLength> | undefined; + "font-size-adjust"?: Property.FontSizeAdjust | undefined; + "font-stretch"?: Property.FontStretch | undefined; + "font-style"?: Property.FontStyle | undefined; + "font-variant"?: Property.FontVariant | undefined; + "font-weight"?: Property.FontWeight | undefined; + "glyph-orientation-vertical"?: Property.GlyphOrientationVertical | undefined; + "image-rendering"?: Property.ImageRendering | undefined; + "letter-spacing"?: Property.LetterSpacing<TLength> | undefined; + "lighting-color"?: Property.LightingColor | undefined; + "line-height"?: Property.LineHeight<TLength> | undefined; + marker?: Property.Marker | undefined; + "marker-end"?: Property.MarkerEnd | undefined; + "marker-mid"?: Property.MarkerMid | undefined; + "marker-start"?: Property.MarkerStart | undefined; + mask?: Property.Mask<TLength> | undefined; + opacity?: Property.Opacity | undefined; + overflow?: Property.Overflow | undefined; + "paint-order"?: Property.PaintOrder | undefined; + "pointer-events"?: Property.PointerEvents | undefined; + "shape-rendering"?: Property.ShapeRendering | undefined; + "stop-color"?: Property.StopColor | undefined; + "stop-opacity"?: Property.StopOpacity | undefined; + stroke?: Property.Stroke | undefined; + "stroke-dasharray"?: Property.StrokeDasharray<TLength> | undefined; + "stroke-dashoffset"?: Property.StrokeDashoffset<TLength> | undefined; + "stroke-linecap"?: Property.StrokeLinecap | undefined; + "stroke-linejoin"?: Property.StrokeLinejoin | undefined; + "stroke-miterlimit"?: Property.StrokeMiterlimit | undefined; + "stroke-opacity"?: Property.StrokeOpacity | undefined; + "stroke-width"?: Property.StrokeWidth<TLength> | undefined; + "text-anchor"?: Property.TextAnchor | undefined; + "text-decoration"?: Property.TextDecoration<TLength> | undefined; + "text-rendering"?: Property.TextRendering | undefined; + "unicode-bidi"?: Property.UnicodeBidi | undefined; + "vector-effect"?: Property.VectorEffect | undefined; + visibility?: Property.Visibility | undefined; + "white-space"?: Property.WhiteSpace | undefined; + "word-spacing"?: Property.WordSpacing<TLength> | undefined; + "writing-mode"?: Property.WritingMode | undefined; } -export interface PropertiesHyphenFallback<TLength = string | 0> - extends StandardPropertiesHyphenFallback<TLength>, - VendorPropertiesHyphenFallback<TLength>, - ObsoletePropertiesHyphenFallback<TLength>, - SvgPropertiesHyphenFallback<TLength> {} +export interface PropertiesHyphen<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardPropertiesHyphen<TLength, TTime>, + VendorPropertiesHyphen<TLength, TTime>, + ObsoletePropertiesHyphen<TLength, TTime>, + SvgPropertiesHyphen<TLength, TTime> {} -export interface CounterStyle { - additiveSymbols?: string; - fallback?: string; - negative?: string; - pad?: string; - prefix?: string; - range?: CounterStyleRangeProperty; - speakAs?: CounterStyleSpeakAsProperty; - suffix?: string; - symbols?: string; - system?: CounterStyleSystemProperty; -} +export type StandardLonghandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardLonghandProperties<TLength, TTime>>; -export interface CounterStyleHyphen { - "additive-symbols"?: string; - fallback?: string; - negative?: string; - pad?: string; - prefix?: string; - range?: CounterStyleRangeProperty; - "speak-as"?: CounterStyleSpeakAsProperty; - suffix?: string; - symbols?: string; - system?: CounterStyleSystemProperty; -} +export type StandardShorthandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandProperties<TLength, TTime>>; -export interface CounterStyleFallback { - additiveSymbols?: string | string[]; - fallback?: string | string[]; - negative?: string | string[]; - pad?: string | string[]; - prefix?: string | string[]; - range?: CounterStyleRangeProperty | CounterStyleRangeProperty[]; - speakAs?: CounterStyleSpeakAsProperty | CounterStyleSpeakAsProperty[]; - suffix?: string | string[]; - symbols?: string | string[]; - system?: CounterStyleSystemProperty | CounterStyleSystemProperty[]; -} +export interface StandardPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardLonghandPropertiesFallback<TLength, TTime>, + StandardShorthandPropertiesFallback<TLength, TTime> {} -export interface CounterStyleHyphenFallback { - "additive-symbols"?: string | string[]; - fallback?: string | string[]; - negative?: string | string[]; - pad?: string | string[]; - prefix?: string | string[]; - range?: CounterStyleRangeProperty | CounterStyleRangeProperty[]; - "speak-as"?: CounterStyleSpeakAsProperty | CounterStyleSpeakAsProperty[]; - suffix?: string | string[]; - symbols?: string | string[]; - system?: CounterStyleSystemProperty | CounterStyleSystemProperty[]; -} +export type VendorLonghandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorLonghandProperties<TLength, TTime>>; -export interface FontFace { - MozFontFeatureSettings?: FontFaceFontFeatureSettingsProperty; - ascentOverride?: FontFaceAscentOverrideProperty; - descentOverride?: FontFaceDescentOverrideProperty; - fontDisplay?: FontFaceFontDisplayProperty; - fontFamily?: string; - fontFeatureSettings?: FontFaceFontFeatureSettingsProperty; - fontStretch?: FontFaceFontStretchProperty; - fontStyle?: FontFaceFontStyleProperty; - fontVariant?: FontFaceFontVariantProperty; - fontVariationSettings?: FontFaceFontVariationSettingsProperty; - fontWeight?: FontFaceFontWeightProperty; - lineGapOverride?: FontFaceLineGapOverrideProperty; - sizeAdjust?: string; - src?: string; - unicodeRange?: string; -} +export type VendorShorthandPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandProperties<TLength, TTime>>; -export interface FontFaceHyphen { - "-moz-font-feature-settings"?: FontFaceFontFeatureSettingsProperty; - "ascent-override"?: FontFaceAscentOverrideProperty; - "descent-override"?: FontFaceDescentOverrideProperty; - "font-display"?: FontFaceFontDisplayProperty; - "font-family"?: string; - "font-feature-settings"?: FontFaceFontFeatureSettingsProperty; - "font-stretch"?: FontFaceFontStretchProperty; - "font-style"?: FontFaceFontStyleProperty; - "font-variant"?: FontFaceFontVariantProperty; - "font-variation-settings"?: FontFaceFontVariationSettingsProperty; - "font-weight"?: FontFaceFontWeightProperty; - "line-gap-override"?: FontFaceLineGapOverrideProperty; - "size-adjust"?: string; - src?: string; - "unicode-range"?: string; -} +export interface VendorPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends VendorLonghandPropertiesFallback<TLength, TTime>, + VendorShorthandPropertiesFallback<TLength, TTime> {} -export interface FontFaceFallback { - MozFontFeatureSettings?: FontFaceFontFeatureSettingsProperty | FontFaceFontFeatureSettingsProperty[]; - ascentOverride?: FontFaceAscentOverrideProperty | FontFaceAscentOverrideProperty[]; - descentOverride?: FontFaceDescentOverrideProperty | FontFaceDescentOverrideProperty[]; - fontDisplay?: FontFaceFontDisplayProperty | FontFaceFontDisplayProperty[]; - fontFamily?: string | string[]; - fontFeatureSettings?: FontFaceFontFeatureSettingsProperty | FontFaceFontFeatureSettingsProperty[]; - fontStretch?: FontFaceFontStretchProperty | FontFaceFontStretchProperty[]; - fontStyle?: FontFaceFontStyleProperty | FontFaceFontStyleProperty[]; - fontVariant?: FontFaceFontVariantProperty | FontFaceFontVariantProperty[]; - fontVariationSettings?: FontFaceFontVariationSettingsProperty | FontFaceFontVariationSettingsProperty[]; - fontWeight?: FontFaceFontWeightProperty | FontFaceFontWeightProperty[]; - lineGapOverride?: FontFaceLineGapOverrideProperty | FontFaceLineGapOverrideProperty[]; - sizeAdjust?: string | string[]; - src?: string | string[]; - unicodeRange?: string | string[]; -} +export type ObsoletePropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoleteProperties<TLength, TTime>>; -export interface FontFaceHyphenFallback { - "-moz-font-feature-settings"?: FontFaceFontFeatureSettingsProperty | FontFaceFontFeatureSettingsProperty[]; - "ascent-override"?: FontFaceAscentOverrideProperty | FontFaceAscentOverrideProperty[]; - "descent-override"?: FontFaceDescentOverrideProperty | FontFaceDescentOverrideProperty[]; - "font-display"?: FontFaceFontDisplayProperty | FontFaceFontDisplayProperty[]; - "font-family"?: string | string[]; - "font-feature-settings"?: FontFaceFontFeatureSettingsProperty | FontFaceFontFeatureSettingsProperty[]; - "font-stretch"?: FontFaceFontStretchProperty | FontFaceFontStretchProperty[]; - "font-style"?: FontFaceFontStyleProperty | FontFaceFontStyleProperty[]; - "font-variant"?: FontFaceFontVariantProperty | FontFaceFontVariantProperty[]; - "font-variation-settings"?: FontFaceFontVariationSettingsProperty | FontFaceFontVariationSettingsProperty[]; - "font-weight"?: FontFaceFontWeightProperty | FontFaceFontWeightProperty[]; - "line-gap-override"?: FontFaceLineGapOverrideProperty | FontFaceLineGapOverrideProperty[]; - "size-adjust"?: string | string[]; - src?: string | string[]; - "unicode-range"?: string | string[]; -} +export type SvgPropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<SvgProperties<TLength, TTime>>; -export interface Page<TLength = string | 0> { - bleed?: PageBleedProperty<TLength>; - marks?: PageMarksProperty; - size?: PageSizeProperty<TLength>; -} +export interface PropertiesFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardPropertiesFallback<TLength, TTime>, + VendorPropertiesFallback<TLength, TTime>, + ObsoletePropertiesFallback<TLength, TTime>, + SvgPropertiesFallback<TLength, TTime> {} -export interface PageHyphen<TLength = string | 0> { - bleed?: PageBleedProperty<TLength>; - marks?: PageMarksProperty; - size?: PageSizeProperty<TLength>; -} +export type StandardLonghandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardLonghandPropertiesHyphen<TLength, TTime>>; -export interface PageFallback<TLength = string | 0> { - bleed?: PageBleedProperty<TLength> | PageBleedProperty<TLength>[]; - marks?: PageMarksProperty | PageMarksProperty[]; - size?: PageSizeProperty<TLength> | PageSizeProperty<TLength>[]; -} +export type StandardShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<StandardShorthandPropertiesHyphen<TLength, TTime>>; -export interface PageHyphenFallback<TLength = string | 0> { - bleed?: PageBleedProperty<TLength> | PageBleedProperty<TLength>[]; - marks?: PageMarksProperty | PageMarksProperty[]; - size?: PageSizeProperty<TLength> | PageSizeProperty<TLength>[]; -} +export interface StandardPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardLonghandPropertiesHyphenFallback<TLength, TTime>, + StandardShorthandPropertiesHyphenFallback<TLength, TTime> {} -export interface Property { - inherits?: PropertyInheritsProperty; - initialValue?: string; - syntax?: string; -} +export type VendorLonghandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorLonghandPropertiesHyphen<TLength, TTime>>; -export interface PropertyHyphen { - inherits?: PropertyInheritsProperty; - "initial-value"?: string; - syntax?: string; -} +export type VendorShorthandPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<VendorShorthandPropertiesHyphen<TLength, TTime>>; -export interface PropertyFallback { - inherits?: PropertyInheritsProperty | PropertyInheritsProperty[]; - initialValue?: string | string[]; - syntax?: string | string[]; -} +export interface VendorPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends VendorLonghandPropertiesHyphenFallback<TLength, TTime>, + VendorShorthandPropertiesHyphenFallback<TLength, TTime> {} -export interface PropertyHyphenFallback { - inherits?: PropertyInheritsProperty | PropertyInheritsProperty[]; - "initial-value"?: string | string[]; - syntax?: string | string[]; -} +export type ObsoletePropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ObsoletePropertiesHyphen<TLength, TTime>>; -export interface Viewport<TLength = string | 0> { - height?: ViewportHeightProperty<TLength>; - maxHeight?: ViewportMaxHeightProperty<TLength>; - maxWidth?: ViewportMaxWidthProperty<TLength>; - maxZoom?: ViewportMaxZoomProperty; - minHeight?: ViewportMinHeightProperty<TLength>; - minWidth?: ViewportMinWidthProperty<TLength>; - minZoom?: ViewportMinZoomProperty; - orientation?: ViewportOrientationProperty; - userZoom?: ViewportUserZoomProperty; - viewportFit?: ViewportViewportFitProperty; - width?: ViewportWidthProperty<TLength>; - zoom?: ViewportZoomProperty; -} +export type SvgPropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<SvgPropertiesHyphen<TLength, TTime>>; -export interface ViewportHyphen<TLength = string | 0> { - height?: ViewportHeightProperty<TLength>; - "max-height"?: ViewportMaxHeightProperty<TLength>; - "max-width"?: ViewportMaxWidthProperty<TLength>; - "max-zoom"?: ViewportMaxZoomProperty; - "min-height"?: ViewportMinHeightProperty<TLength>; - "min-width"?: ViewportMinWidthProperty<TLength>; - "min-zoom"?: ViewportMinZoomProperty; - orientation?: ViewportOrientationProperty; - "user-zoom"?: ViewportUserZoomProperty; - "viewport-fit"?: ViewportViewportFitProperty; - width?: ViewportWidthProperty<TLength>; - zoom?: ViewportZoomProperty; -} - -export interface ViewportFallback<TLength = string | 0> { - height?: ViewportHeightProperty<TLength> | ViewportHeightProperty<TLength>[]; - maxHeight?: ViewportMaxHeightProperty<TLength> | ViewportMaxHeightProperty<TLength>[]; - maxWidth?: ViewportMaxWidthProperty<TLength> | ViewportMaxWidthProperty<TLength>[]; - maxZoom?: ViewportMaxZoomProperty | ViewportMaxZoomProperty[]; - minHeight?: ViewportMinHeightProperty<TLength> | ViewportMinHeightProperty<TLength>[]; - minWidth?: ViewportMinWidthProperty<TLength> | ViewportMinWidthProperty<TLength>[]; - minZoom?: ViewportMinZoomProperty | ViewportMinZoomProperty[]; - orientation?: ViewportOrientationProperty | ViewportOrientationProperty[]; - userZoom?: ViewportUserZoomProperty | ViewportUserZoomProperty[]; - viewportFit?: ViewportViewportFitProperty | ViewportViewportFitProperty[]; - width?: ViewportWidthProperty<TLength> | ViewportWidthProperty<TLength>[]; - zoom?: ViewportZoomProperty | ViewportZoomProperty[]; -} - -export interface ViewportHyphenFallback<TLength = string | 0> { - height?: ViewportHeightProperty<TLength> | ViewportHeightProperty<TLength>[]; - "max-height"?: ViewportMaxHeightProperty<TLength> | ViewportMaxHeightProperty<TLength>[]; - "max-width"?: ViewportMaxWidthProperty<TLength> | ViewportMaxWidthProperty<TLength>[]; - "max-zoom"?: ViewportMaxZoomProperty | ViewportMaxZoomProperty[]; - "min-height"?: ViewportMinHeightProperty<TLength> | ViewportMinHeightProperty<TLength>[]; - "min-width"?: ViewportMinWidthProperty<TLength> | ViewportMinWidthProperty<TLength>[]; - "min-zoom"?: ViewportMinZoomProperty | ViewportMinZoomProperty[]; - orientation?: ViewportOrientationProperty | ViewportOrientationProperty[]; - "user-zoom"?: ViewportUserZoomProperty | ViewportUserZoomProperty[]; - "viewport-fit"?: ViewportViewportFitProperty | ViewportViewportFitProperty[]; - width?: ViewportWidthProperty<TLength> | ViewportWidthProperty<TLength>[]; - zoom?: ViewportZoomProperty | ViewportZoomProperty[]; -} +export interface PropertiesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> + extends StandardPropertiesHyphenFallback<TLength, TTime>, + VendorPropertiesHyphenFallback<TLength, TTime>, + ObsoletePropertiesHyphenFallback<TLength, TTime>, + SvgPropertiesHyphenFallback<TLength, TTime> {} export type AtRules = | "@charset" @@ -34978,6 +18344,7 @@ export type AtRules = | "@document" | "@font-face" | "@font-feature-values" + | "@font-palette-values" | "@import" | "@keyframes" | "@layer" @@ -34985,7 +18352,9 @@ export type AtRules = | "@namespace" | "@page" | "@property" + | "@scope" | "@scroll-timeline" + | "@starting-style" | "@supports" | "@viewport"; @@ -34997,6 +18366,10 @@ export type AdvancedPseudos = | "::cue-region" | "::part" | "::slotted" + | "::view-transition-group" + | "::view-transition-image-pair" + | "::view-transition-new" + | "::view-transition-old" | ":dir" | ":has" | ":host" @@ -35067,6 +18440,7 @@ export type SimplePseudos = | "::selection" | "::spelling-error" | "::target-text" + | "::view-transition" | ":active" | ":after" | ":any-link" @@ -35138,6 +18512,7 @@ export type HtmlAttributes = | "[alt]" | "[archive]" | "[async]" + | "[attributionsrc]" | "[autobuffer]" | "[autocapitalize]" | "[autocomplete]" @@ -35147,8 +18522,10 @@ export type HtmlAttributes = | "[background]" | "[behavior]" | "[bgcolor]" + | "[blocking]" | "[border]" | "[bottommargin]" + | "[browsingtopics]" | "[capture]" | "[cellpadding]" | "[cellspacing]" @@ -35160,23 +18537,20 @@ export type HtmlAttributes = | "[class]" | "[classid]" | "[clear]" - | "[code]" | "[codebase]" | "[codetype]" | "[color]" | "[cols]" | "[colspan]" - | "[command]" | "[compact]" | "[content]" | "[contenteditable]" | "[contextmenu]" | "[controls]" | "[coords]" + | "[credentialless]" | "[crossorigin]" | "[data]" - | "[datafld]" - | "[datasrc]" | "[datetime]" | "[declare]" | "[decoding]" @@ -35210,7 +18584,6 @@ export type HtmlAttributes = | "[hreflang]" | "[hspace]" | "[http-equiv]" - | "[icon]" | "[id]" | "[imagesizes]" | "[imagesrcset]" @@ -35240,13 +18613,13 @@ export type HtmlAttributes = | "[marginwidth]" | "[max]" | "[maxlength]" - | "[mayscript]" | "[media]" | "[method]" | "[methods]" | "[min]" | "[minlength]" | "[moz-opaque]" + | "[mozactionhint]" | "[mozallowfullscreen]" | "[msallowfullscreen]" | "[multiple]" @@ -35259,7 +18632,6 @@ export type HtmlAttributes = | "[noshade]" | "[novalidate]" | "[nowrap]" - | "[object]" | "[onerror]" | "[open]" | "[optimum]" @@ -35267,11 +18639,12 @@ export type HtmlAttributes = | "[pattern]" | "[ping]" | "[placeholder]" + | "[popover]" + | "[popovertarget]" + | "[popovertargetaction]" | "[poster]" - | "[prefetch]" | "[preload]" | "[profile]" - | "[radiogroup]" | "[readonly]" | "[referrerpolicy]" | "[rel]" @@ -35282,14 +18655,6 @@ export type HtmlAttributes = | "[rows]" | "[rowspan]" | "[rules]" - | "[sandbox-allow-downloads]" - | "[sandbox-allow-modals]" - | "[sandbox-allow-popups-to-escape-sandbox]" - | "[sandbox-allow-popups]" - | "[sandbox-allow-presentation]" - | "[sandbox-allow-same-origin]" - | "[sandbox-allow-storage-access-by-user-activation]" - | "[sandbox-allow-top-navigation-by-user-activation]" | "[sandbox]" | "[scope]" | "[scrollamount]" @@ -35297,6 +18662,7 @@ export type HtmlAttributes = | "[scrolling]" | "[selected]" | "[shadowroot]" + | "[shadowrootmode]" | "[shape]" | "[size]" | "[sizes]" @@ -35325,6 +18691,7 @@ export type HtmlAttributes = | "[value]" | "[valuetype]" | "[version]" + | "[virtualkeyboardpolicy]" | "[vlink]" | "[vspace]" | "[webkitallowfullscreen]" @@ -35341,6 +18708,7 @@ export type SvgAttributes = | "[animation]" | "[arabic-form]" | "[ascent]" + | "[async]" | "[attributeName]" | "[attributeType]" | "[azimuth]" @@ -35363,10 +18731,13 @@ export type SvgAttributes = | "[color]" | "[contentScriptType]" | "[contentStyleType]" + | "[crossorigin]" | "[cursor]" | "[cx]" | "[cy]" | "[d]" + | "[decoding]" + | "[defer]" | "[descent]" | "[diffuseConstant]" | "[direction]" @@ -35574,1985 +18945,2353 @@ export type SvgAttributes = export type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"; -type GlobalsString = Globals | string; +export namespace Property { + export type AccentColor = Globals | DataType.Color | "auto"; -type GlobalsNumber = Globals | number; + export type AlignContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); -export type AccentColorProperty = Globals | Color | "auto"; + export type AlignItems = Globals | DataType.SelfPosition | "baseline" | "normal" | "stretch" | (string & {}); -export type AlignContentProperty = Globals | ContentDistribution | ContentPosition | "baseline" | "normal" | string; + export type AlignSelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "normal" | "stretch" | (string & {}); -export type AlignItemsProperty = Globals | SelfPosition | "baseline" | "normal" | "stretch" | string; + export type AlignTracks = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); -export type AlignSelfProperty = Globals | SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; + export type All = Globals; -export type AlignTracksProperty = Globals | ContentDistribution | ContentPosition | "baseline" | "normal" | string; + export type Animation<TTime = string & {}> = Globals | DataType.SingleAnimation<TTime> | (string & {}); -export type AnimationProperty = Globals | SingleAnimation | string; + export type AnimationComposition = Globals | DataType.SingleAnimationComposition | (string & {}); -export type AnimationDirectionProperty = Globals | SingleAnimationDirection | string; + export type AnimationDelay<TTime = string & {}> = Globals | TTime | (string & {}); -export type AnimationFillModeProperty = Globals | SingleAnimationFillMode | string; + export type AnimationDirection = Globals | DataType.SingleAnimationDirection | (string & {}); -export type AnimationIterationCountProperty = Globals | "infinite" | string | number; + export type AnimationDuration<TTime = string & {}> = Globals | TTime | (string & {}); -export type AnimationNameProperty = Globals | "none" | string; + export type AnimationFillMode = Globals | DataType.SingleAnimationFillMode | (string & {}); -export type AnimationPlayStateProperty = Globals | "paused" | "running" | string; + export type AnimationIterationCount = Globals | "infinite" | (string & {}) | (number & {}); -export type AnimationTimelineProperty = Globals | SingleAnimationTimeline | string; + export type AnimationName = Globals | "none" | (string & {}); -export type AnimationTimingFunctionProperty = Globals | EasingFunction | string; + export type AnimationPlayState = Globals | "paused" | "running" | (string & {}); -export type AppearanceProperty = Globals | CompatAuto | "auto" | "menulist-button" | "none" | "textfield"; + export type AnimationRange<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); -export type AspectRatioProperty = Globals | "auto" | string | number; + export type AnimationRangeEnd<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); -export type AzimuthProperty = - | Globals - | "behind" - | "center" - | "center-left" - | "center-right" - | "far-left" - | "far-right" - | "left" - | "left-side" - | "leftwards" - | "right" - | "right-side" - | "rightwards" - | string; + export type AnimationRangeStart<TLength = (string & {}) | 0> = Globals | DataType.TimelineRangeName | TLength | "normal" | (string & {}); -export type BackdropFilterProperty = Globals | "none" | string; + export type AnimationTimeline = Globals | DataType.SingleAnimationTimeline | (string & {}); -export type BackfaceVisibilityProperty = Globals | "hidden" | "visible"; + export type AnimationTimingFunction = Globals | DataType.EasingFunction | (string & {}); -export type BackgroundProperty<TLength> = Globals | FinalBgLayer<TLength> | string; + export type Appearance = Globals | DataType.CompatAuto | "auto" | "menulist-button" | "none" | "textfield"; -export type BackgroundAttachmentProperty = Globals | Attachment | string; + export type AspectRatio = Globals | "auto" | (string & {}) | (number & {}); -export type BackgroundBlendModeProperty = Globals | BlendMode | string; + export type Azimuth = + | Globals + | "behind" + | "center" + | "center-left" + | "center-right" + | "far-left" + | "far-right" + | "left" + | "left-side" + | "leftwards" + | "right" + | "right-side" + | "rightwards" + | (string & {}); -export type BackgroundClipProperty = Globals | Box | string; + export type BackdropFilter = Globals | "none" | (string & {}); -export type BackgroundColorProperty = Globals | Color; + export type BackfaceVisibility = Globals | "hidden" | "visible"; -export type BackgroundImageProperty = Globals | "none" | string; + export type Background<TLength = (string & {}) | 0> = Globals | DataType.FinalBgLayer<TLength> | (string & {}); -export type BackgroundOriginProperty = Globals | Box | string; + export type BackgroundAttachment = Globals | DataType.Attachment | (string & {}); -export type BackgroundPositionProperty<TLength> = Globals | BgPosition<TLength> | string; + export type BackgroundBlendMode = Globals | DataType.BlendMode | (string & {}); -export type BackgroundPositionXProperty<TLength> = Globals | TLength | "center" | "left" | "right" | "x-end" | "x-start" | string; + export type BackgroundClip = Globals | DataType.Box | (string & {}); -export type BackgroundPositionYProperty<TLength> = Globals | TLength | "bottom" | "center" | "top" | "y-end" | "y-start" | string; + export type BackgroundColor = Globals | DataType.Color; -export type BackgroundRepeatProperty = Globals | RepeatStyle | string; + export type BackgroundImage = Globals | "none" | (string & {}); -export type BackgroundSizeProperty<TLength> = Globals | BgSize<TLength> | string; + export type BackgroundOrigin = Globals | DataType.Box | (string & {}); -export type BlockOverflowProperty = Globals | "clip" | "ellipsis" | string; + export type BackgroundPosition<TLength = (string & {}) | 0> = Globals | DataType.BgPosition<TLength> | (string & {}); -export type BlockSizeProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; + export type BackgroundPositionX<TLength = (string & {}) | 0> = Globals | TLength | "center" | "left" | "right" | "x-end" | "x-start" | (string & {}); -export type BorderProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BackgroundPositionY<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "top" | "y-end" | "y-start" | (string & {}); -export type BorderBlockProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BackgroundRepeat = Globals | DataType.RepeatStyle | (string & {}); -export type BorderBlockColorProperty = Globals | Color | string; + export type BackgroundSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); -export type BorderBlockEndProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BlockOverflow = Globals | "clip" | "ellipsis" | (string & {}); -export type BorderBlockEndColorProperty = Globals | Color; + export type BlockSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); -export type BorderBlockEndStyleProperty = Globals | LineStyle; + export type Border<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderBlockEndWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderBlock<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderBlockStartProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BorderBlockColor = Globals | DataType.Color | (string & {}); -export type BorderBlockStartColorProperty = Globals | Color; + export type BorderBlockEnd<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderBlockStartStyleProperty = Globals | LineStyle; + export type BorderBlockEndColor = Globals | DataType.Color; -export type BorderBlockStartWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderBlockEndStyle = Globals | DataType.LineStyle; -export type BorderBlockStyleProperty = Globals | LineStyle; + export type BorderBlockEndWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderBlockWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderBlockStart<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderBottomProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BorderBlockStartColor = Globals | DataType.Color; -export type BorderBottomColorProperty = Globals | Color; + export type BorderBlockStartStyle = Globals | DataType.LineStyle; -export type BorderBottomLeftRadiusProperty<TLength> = Globals | TLength | string; + export type BorderBlockStartWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderBottomRightRadiusProperty<TLength> = Globals | TLength | string; + export type BorderBlockStyle = Globals | DataType.LineStyle; -export type BorderBottomStyleProperty = Globals | LineStyle; + export type BorderBlockWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderBottomWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderBottom<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderCollapseProperty = Globals | "collapse" | "separate"; + export type BorderBottomColor = Globals | DataType.Color; -export type BorderColorProperty = Globals | Color | string; + export type BorderBottomLeftRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BorderEndEndRadiusProperty<TLength> = Globals | TLength | string; + export type BorderBottomRightRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BorderEndStartRadiusProperty<TLength> = Globals | TLength | string; + export type BorderBottomStyle = Globals | DataType.LineStyle; -export type BorderImageProperty = Globals | "none" | "repeat" | "round" | "space" | "stretch" | string | number; + export type BorderBottomWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderImageOutsetProperty<TLength> = Globals | TLength | string | number; + export type BorderCollapse = Globals | "collapse" | "separate"; -export type BorderImageRepeatProperty = Globals | "repeat" | "round" | "space" | "stretch" | string; + export type BorderColor = Globals | DataType.Color | (string & {}); -export type BorderImageSliceProperty = Globals | string | number; + export type BorderEndEndRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BorderImageSourceProperty = Globals | "none" | string; + export type BorderEndStartRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BorderImageWidthProperty<TLength> = Globals | TLength | "auto" | string | number; + export type BorderImage = Globals | "none" | "repeat" | "round" | "space" | "stretch" | (string & {}) | (number & {}); -export type BorderInlineProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BorderImageOutset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}) | (number & {}); -export type BorderInlineColorProperty = Globals | Color | string; + export type BorderImageRepeat = Globals | "repeat" | "round" | "space" | "stretch" | (string & {}); -export type BorderInlineEndProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BorderImageSlice = Globals | (string & {}) | (number & {}); -export type BorderInlineEndColorProperty = Globals | Color; + export type BorderImageSource = Globals | "none" | (string & {}); -export type BorderInlineEndStyleProperty = Globals | LineStyle; + export type BorderImageWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); -export type BorderInlineEndWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderInline<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderInlineStartProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BorderInlineColor = Globals | DataType.Color | (string & {}); -export type BorderInlineStartColorProperty = Globals | Color; + export type BorderInlineEnd<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderInlineStartStyleProperty = Globals | LineStyle; + export type BorderInlineEndColor = Globals | DataType.Color; -export type BorderInlineStartWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderInlineEndStyle = Globals | DataType.LineStyle; -export type BorderInlineStyleProperty = Globals | LineStyle; + export type BorderInlineEndWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderInlineWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderInlineStart<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderLeftProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BorderInlineStartColor = Globals | DataType.Color; -export type BorderLeftColorProperty = Globals | Color; + export type BorderInlineStartStyle = Globals | DataType.LineStyle; -export type BorderLeftStyleProperty = Globals | LineStyle; + export type BorderInlineStartWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderLeftWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderInlineStyle = Globals | DataType.LineStyle; -export type BorderRadiusProperty<TLength> = Globals | TLength | string; + export type BorderInlineWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderRightProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BorderLeft<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderRightColorProperty = Globals | Color; + export type BorderLeftColor = Globals | DataType.Color; -export type BorderRightStyleProperty = Globals | LineStyle; + export type BorderLeftStyle = Globals | DataType.LineStyle; -export type BorderRightWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderLeftWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderSpacingProperty<TLength> = Globals | TLength | string; + export type BorderRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BorderStartEndRadiusProperty<TLength> = Globals | TLength | string; + export type BorderRight<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderStartStartRadiusProperty<TLength> = Globals | TLength | string; + export type BorderRightColor = Globals | DataType.Color; -export type BorderStyleProperty = Globals | LineStyle | string; + export type BorderRightStyle = Globals | DataType.LineStyle; -export type BorderTopProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type BorderRightWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BorderTopColorProperty = Globals | Color; + export type BorderSpacing<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BorderTopLeftRadiusProperty<TLength> = Globals | TLength | string; + export type BorderStartEndRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BorderTopRightRadiusProperty<TLength> = Globals | TLength | string; + export type BorderStartStartRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BorderTopStyleProperty = Globals | LineStyle; + export type BorderStyle = Globals | DataType.LineStyle | (string & {}); -export type BorderTopWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type BorderTop<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type BorderWidthProperty<TLength> = Globals | LineWidth<TLength> | string; + export type BorderTopColor = Globals | DataType.Color; -export type BottomProperty<TLength> = Globals | TLength | "auto" | string; + export type BorderTopLeftRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BoxAlignProperty = Globals | "baseline" | "center" | "end" | "start" | "stretch"; + export type BorderTopRightRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type BoxDecorationBreakProperty = Globals | "clone" | "slice"; + export type BorderTopStyle = Globals | DataType.LineStyle; -export type BoxDirectionProperty = Globals | "inherit" | "normal" | "reverse"; + export type BorderTopWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type BoxLinesProperty = Globals | "multiple" | "single"; + export type BorderWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); -export type BoxOrientProperty = Globals | "block-axis" | "horizontal" | "inherit" | "inline-axis" | "vertical"; + export type Bottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type BoxPackProperty = Globals | "center" | "end" | "justify" | "start"; + export type BoxAlign = Globals | "baseline" | "center" | "end" | "start" | "stretch"; -export type BoxShadowProperty = Globals | "none" | string; + export type BoxDecorationBreak = Globals | "clone" | "slice"; -export type BoxSizingProperty = Globals | "border-box" | "content-box"; + export type BoxDirection = Globals | "inherit" | "normal" | "reverse"; -export type BreakAfterProperty = - | Globals - | "all" - | "always" - | "auto" - | "avoid" - | "avoid-column" - | "avoid-page" - | "avoid-region" - | "column" - | "left" - | "page" - | "recto" - | "region" - | "right" - | "verso"; + export type BoxFlex = Globals | (number & {}) | (string & {}); -export type BreakBeforeProperty = - | Globals - | "all" - | "always" - | "auto" - | "avoid" - | "avoid-column" - | "avoid-page" - | "avoid-region" - | "column" - | "left" - | "page" - | "recto" - | "region" - | "right" - | "verso"; + export type BoxFlexGroup = Globals | (number & {}) | (string & {}); -export type BreakInsideProperty = Globals | "auto" | "avoid" | "avoid-column" | "avoid-page" | "avoid-region"; + export type BoxLines = Globals | "multiple" | "single"; -export type CaptionSideProperty = Globals | "block-end" | "block-start" | "bottom" | "inline-end" | "inline-start" | "top"; + export type BoxOrdinalGroup = Globals | (number & {}) | (string & {}); -export type CaretColorProperty = Globals | Color | "auto"; + export type BoxOrient = Globals | "block-axis" | "horizontal" | "inherit" | "inline-axis" | "vertical"; -export type ClearProperty = Globals | "both" | "inline-end" | "inline-start" | "left" | "none" | "right"; + export type BoxPack = Globals | "center" | "end" | "justify" | "start"; -export type ClipProperty = Globals | "auto" | string; + export type BoxShadow = Globals | "none" | (string & {}); -export type ClipPathProperty = Globals | GeometryBox | "none" | string; + export type BoxSizing = Globals | "border-box" | "content-box"; -export type ColorProperty = Globals | Color; + export type BreakAfter = + | Globals + | "all" + | "always" + | "auto" + | "avoid" + | "avoid-column" + | "avoid-page" + | "avoid-region" + | "column" + | "left" + | "page" + | "recto" + | "region" + | "right" + | "verso"; -export type PrintColorAdjustProperty = Globals | "economy" | "exact"; + export type BreakBefore = + | Globals + | "all" + | "always" + | "auto" + | "avoid" + | "avoid-column" + | "avoid-page" + | "avoid-region" + | "column" + | "left" + | "page" + | "recto" + | "region" + | "right" + | "verso"; -export type ColorSchemeProperty = Globals | "dark" | "light" | "normal" | string; + export type BreakInside = Globals | "auto" | "avoid" | "avoid-column" | "avoid-page" | "avoid-region"; -export type ColumnCountProperty = Globals | "auto" | number; + export type CaptionSide = Globals | "block-end" | "block-start" | "bottom" | "inline-end" | "inline-start" | "top"; -export type ColumnFillProperty = Globals | "auto" | "balance"; + export type Caret = Globals | DataType.Color | "auto" | "bar" | "block" | "underscore" | (string & {}); -export type ColumnGapProperty<TLength> = Globals | TLength | "normal" | string; + export type CaretColor = Globals | DataType.Color | "auto"; -export type ColumnRuleProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type CaretShape = Globals | "auto" | "bar" | "block" | "underscore"; -export type ColumnRuleColorProperty = Globals | Color; + export type Clear = Globals | "both" | "inline-end" | "inline-start" | "left" | "none" | "right"; -export type ColumnRuleStyleProperty = Globals | LineStyle | string; + export type Clip = Globals | "auto" | (string & {}); -export type ColumnRuleWidthProperty<TLength> = Globals | LineWidth<TLength> | string; + export type ClipPath = Globals | DataType.GeometryBox | "none" | (string & {}); -export type ColumnSpanProperty = Globals | "all" | "none"; + export type Color = Globals | DataType.Color; -export type ColumnWidthProperty<TLength> = Globals | TLength | "auto"; + export type PrintColorAdjust = Globals | "economy" | "exact"; -export type ColumnsProperty<TLength> = Globals | TLength | "auto" | string | number; + export type ColorScheme = Globals | "dark" | "light" | "normal" | (string & {}); -export type ContainProperty = Globals | "content" | "inline-size" | "layout" | "none" | "paint" | "size" | "strict" | "style" | string; + export type ColumnCount = Globals | "auto" | (number & {}) | (string & {}); -export type ContentProperty = Globals | ContentList | "none" | "normal" | string; + export type ColumnFill = Globals | "auto" | "balance" | "balance-all"; -export type ContentVisibilityProperty = Globals | "auto" | "hidden" | "visible"; + export type ColumnGap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); -export type CounterIncrementProperty = Globals | "none" | string; + export type ColumnRule<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -export type CounterResetProperty = Globals | "none" | string; + export type ColumnRuleColor = Globals | DataType.Color; -export type CounterSetProperty = Globals | "none" | string; + export type ColumnRuleStyle = Globals | DataType.LineStyle | (string & {}); -export type CursorProperty = - | Globals - | "-moz-grab" - | "-webkit-grab" - | "alias" - | "all-scroll" - | "auto" - | "cell" - | "col-resize" - | "context-menu" - | "copy" - | "crosshair" - | "default" - | "e-resize" - | "ew-resize" - | "grab" - | "grabbing" - | "help" - | "move" - | "n-resize" - | "ne-resize" - | "nesw-resize" - | "no-drop" - | "none" - | "not-allowed" - | "ns-resize" - | "nw-resize" - | "nwse-resize" - | "pointer" - | "progress" - | "row-resize" - | "s-resize" - | "se-resize" - | "sw-resize" - | "text" - | "vertical-text" - | "w-resize" - | "wait" - | "zoom-in" - | "zoom-out" - | string; + export type ColumnRuleWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); -export type DirectionProperty = Globals | "ltr" | "rtl"; + export type ColumnSpan = Globals | "all" | "none"; -export type DisplayProperty = Globals | DisplayOutside | DisplayInside | DisplayInternal | DisplayLegacy | "contents" | "list-item" | "none" | string; + export type ColumnWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto"; -export type EmptyCellsProperty = Globals | "hide" | "show"; + export type Columns<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); -export type FilterProperty = Globals | "none" | string; + export type Contain = Globals | "content" | "inline-size" | "layout" | "none" | "paint" | "size" | "strict" | "style" | (string & {}); -export type FlexProperty<TLength> = Globals | TLength | "auto" | "content" | "fit-content" | "max-content" | "min-content" | "none" | string | number; + export type ContainIntrinsicBlockSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); -export type FlexBasisProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-auto" - | "auto" - | "content" - | "fit-content" - | "max-content" - | "min-content" - | string; - -export type FlexDirectionProperty = Globals | "column" | "column-reverse" | "row" | "row-reverse"; - -export type FlexFlowProperty = Globals | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | string; - -export type FlexWrapProperty = Globals | "nowrap" | "wrap" | "wrap-reverse"; - -export type FloatProperty = Globals | "inline-end" | "inline-start" | "left" | "none" | "right"; - -export type FontProperty = Globals | "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar" | string; - -export type FontFamilyProperty = Globals | GenericFamily | string; - -export type FontFeatureSettingsProperty = Globals | "normal" | string; - -export type FontKerningProperty = Globals | "auto" | "none" | "normal"; - -export type FontLanguageOverrideProperty = Globals | "normal" | string; - -export type FontOpticalSizingProperty = Globals | "auto" | "none"; - -export type FontSizeProperty<TLength> = Globals | AbsoluteSize | TLength | "larger" | "smaller" | string; - -export type FontSizeAdjustProperty = Globals | "from-font" | "none" | string | number; - -export type FontSmoothProperty<TLength> = Globals | AbsoluteSize | TLength | "always" | "auto" | "never"; - -export type FontStretchProperty = Globals | FontStretchAbsolute; - -export type FontStyleProperty = Globals | "italic" | "normal" | "oblique" | string; - -export type FontSynthesisProperty = Globals | "none" | "small-caps" | "style" | "weight" | string; - -export type FontVariantProperty = - | Globals - | EastAsianVariantValues - | "all-petite-caps" - | "all-small-caps" - | "common-ligatures" - | "contextual" - | "diagonal-fractions" - | "discretionary-ligatures" - | "full-width" - | "historical-forms" - | "historical-ligatures" - | "lining-nums" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "petite-caps" - | "proportional-nums" - | "proportional-width" - | "ruby" - | "slashed-zero" - | "small-caps" - | "stacked-fractions" - | "tabular-nums" - | "titling-caps" - | "unicase" - | string; + export type ContainIntrinsicHeight<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); -export type FontVariantAlternatesProperty = Globals | "historical-forms" | "normal" | string; + export type ContainIntrinsicInlineSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); -export type FontVariantCapsProperty = Globals | "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase"; + export type ContainIntrinsicSize<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); -export type FontVariantEastAsianProperty = Globals | EastAsianVariantValues | "full-width" | "normal" | "proportional-width" | "ruby" | string; + export type ContainIntrinsicWidth<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); -export type FontVariantLigaturesProperty = - | Globals - | "common-ligatures" - | "contextual" - | "discretionary-ligatures" - | "historical-ligatures" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | string; + export type Container = Globals | "none" | (string & {}); -export type FontVariantNumericProperty = - | Globals - | "diagonal-fractions" - | "lining-nums" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "proportional-nums" - | "slashed-zero" - | "stacked-fractions" - | "tabular-nums" - | string; + export type ContainerName = Globals | "none" | (string & {}); -export type FontVariantPositionProperty = Globals | "normal" | "sub" | "super"; + export type ContainerType = Globals | "inline-size" | "normal" | "size"; -export type FontVariationSettingsProperty = Globals | "normal" | string; + export type Content = Globals | DataType.ContentList | "none" | "normal" | (string & {}); -export type FontWeightProperty = Globals | FontWeightAbsolute | "bolder" | "lighter"; + export type ContentVisibility = Globals | "auto" | "hidden" | "visible"; -export type ForcedColorAdjustProperty = Globals | "auto" | "none"; + export type CounterIncrement = Globals | "none" | (string & {}); -export type GapProperty<TLength> = Globals | TLength | "normal" | string; + export type CounterReset = Globals | "none" | (string & {}); -export type GridProperty = Globals | "none" | string; + export type CounterSet = Globals | "none" | (string & {}); -export type GridAreaProperty = Globals | GridLine | string; + export type Cursor = + | Globals + | "-moz-grab" + | "-webkit-grab" + | "alias" + | "all-scroll" + | "auto" + | "cell" + | "col-resize" + | "context-menu" + | "copy" + | "crosshair" + | "default" + | "e-resize" + | "ew-resize" + | "grab" + | "grabbing" + | "help" + | "move" + | "n-resize" + | "ne-resize" + | "nesw-resize" + | "no-drop" + | "none" + | "not-allowed" + | "ns-resize" + | "nw-resize" + | "nwse-resize" + | "pointer" + | "progress" + | "row-resize" + | "s-resize" + | "se-resize" + | "sw-resize" + | "text" + | "vertical-text" + | "w-resize" + | "wait" + | "zoom-in" + | "zoom-out" + | (string & {}); -export type GridAutoColumnsProperty<TLength> = Globals | TrackBreadth<TLength> | string; + export type Direction = Globals | "ltr" | "rtl"; -export type GridAutoFlowProperty = Globals | "column" | "dense" | "row" | string; + export type Display = + | Globals + | DataType.DisplayOutside + | DataType.DisplayInside + | DataType.DisplayInternal + | DataType.DisplayLegacy + | "contents" + | "list-item" + | "none" + | (string & {}); -export type GridAutoRowsProperty<TLength> = Globals | TrackBreadth<TLength> | string; + export type EmptyCells = Globals | "hide" | "show"; -export type GridColumnProperty = Globals | GridLine | string; + export type Filter = Globals | "none" | (string & {}); -export type GridColumnEndProperty = Globals | GridLine; + export type Flex<TLength = (string & {}) | 0> = Globals | TLength | "auto" | "content" | "fit-content" | "max-content" | "min-content" | "none" | (string & {}) | (number & {}); -export type GridColumnGapProperty<TLength> = Globals | TLength | string; + export type FlexBasis<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-auto" + | "auto" + | "content" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); + + export type FlexDirection = Globals | "column" | "column-reverse" | "row" | "row-reverse"; + + export type FlexFlow = Globals | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | (string & {}); + + export type FlexGrow = Globals | (number & {}) | (string & {}); + + export type FlexShrink = Globals | (number & {}) | (string & {}); + + export type FlexWrap = Globals | "nowrap" | "wrap" | "wrap-reverse"; + + export type Float = Globals | "inline-end" | "inline-start" | "left" | "none" | "right"; + + export type Font = Globals | "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar" | (string & {}); + + export type FontFamily = Globals | DataType.GenericFamily | (string & {}); + + export type FontFeatureSettings = Globals | "normal" | (string & {}); + + export type FontKerning = Globals | "auto" | "none" | "normal"; + + export type FontLanguageOverride = Globals | "normal" | (string & {}); + + export type FontOpticalSizing = Globals | "auto" | "none"; + + export type FontPalette = Globals | "dark" | "light" | "normal" | (string & {}); + + export type FontSize<TLength = (string & {}) | 0> = Globals | DataType.AbsoluteSize | TLength | "larger" | "smaller" | (string & {}); + + export type FontSizeAdjust = Globals | "from-font" | "none" | (string & {}) | (number & {}); + + export type FontSmooth<TLength = (string & {}) | 0> = Globals | DataType.AbsoluteSize | TLength | "always" | "auto" | "never"; + + export type FontStretch = Globals | DataType.FontStretchAbsolute; + + export type FontStyle = Globals | "italic" | "normal" | "oblique" | (string & {}); + + export type FontSynthesis = Globals | "none" | "position" | "small-caps" | "style" | "weight" | (string & {}); + + export type FontSynthesisPosition = Globals | "auto" | "none"; -export type GridColumnStartProperty = Globals | GridLine; + export type FontSynthesisSmallCaps = Globals | "auto" | "none"; -export type GridGapProperty<TLength> = Globals | TLength | string; + export type FontSynthesisStyle = Globals | "auto" | "none"; -export type GridRowProperty = Globals | GridLine | string; + export type FontSynthesisWeight = Globals | "auto" | "none"; -export type GridRowEndProperty = Globals | GridLine; + export type FontVariant = + | Globals + | DataType.EastAsianVariantValues + | "all-petite-caps" + | "all-small-caps" + | "common-ligatures" + | "contextual" + | "diagonal-fractions" + | "discretionary-ligatures" + | "full-width" + | "historical-forms" + | "historical-ligatures" + | "lining-nums" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "petite-caps" + | "proportional-nums" + | "proportional-width" + | "ruby" + | "slashed-zero" + | "small-caps" + | "stacked-fractions" + | "tabular-nums" + | "titling-caps" + | "unicase" + | (string & {}); -export type GridRowGapProperty<TLength> = Globals | TLength | string; + export type FontVariantAlternates = Globals | "historical-forms" | "normal" | (string & {}); -export type GridRowStartProperty = Globals | GridLine; + export type FontVariantCaps = Globals | "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase"; -export type GridTemplateProperty = Globals | "none" | string; + export type FontVariantEastAsian = Globals | DataType.EastAsianVariantValues | "full-width" | "normal" | "proportional-width" | "ruby" | (string & {}); -export type GridTemplateAreasProperty = Globals | "none" | string; + export type FontVariantEmoji = Globals | "emoji" | "normal" | "text" | "unicode"; -export type GridTemplateColumnsProperty<TLength> = Globals | TrackBreadth<TLength> | "none" | "subgrid" | string; + export type FontVariantLigatures = + | Globals + | "common-ligatures" + | "contextual" + | "discretionary-ligatures" + | "historical-ligatures" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | (string & {}); -export type GridTemplateRowsProperty<TLength> = Globals | TrackBreadth<TLength> | "none" | "subgrid" | string; + export type FontVariantNumeric = + | Globals + | "diagonal-fractions" + | "lining-nums" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "proportional-nums" + | "slashed-zero" + | "stacked-fractions" + | "tabular-nums" + | (string & {}); -export type HangingPunctuationProperty = Globals | "allow-end" | "first" | "force-end" | "last" | "none" | string; + export type FontVariantPosition = Globals | "normal" | "sub" | "super"; -export type HeightProperty<TLength> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; + export type FontVariationSettings = Globals | "normal" | (string & {}); -export type HyphenateCharacterProperty = Globals | "auto" | string; + export type FontWeight = Globals | DataType.FontWeightAbsolute | "bolder" | "lighter"; -export type HyphensProperty = Globals | "auto" | "manual" | "none"; + export type ForcedColorAdjust = Globals | "auto" | "none"; -export type ImageOrientationProperty = Globals | "flip" | "from-image" | string; + export type Gap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); -export type ImageRenderingProperty = Globals | "-moz-crisp-edges" | "-webkit-optimize-contrast" | "auto" | "crisp-edges" | "pixelated"; + export type Grid = Globals | "none" | (string & {}); -export type ImageResolutionProperty = Globals | "from-image" | string; + export type GridArea = Globals | DataType.GridLine | (string & {}); -export type ImeModeProperty = Globals | "active" | "auto" | "disabled" | "inactive" | "normal"; + export type GridAutoColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | (string & {}); -export type InitialLetterProperty = Globals | "normal" | string | number; + export type GridAutoFlow = Globals | "column" | "dense" | "row" | (string & {}); -export type InlineSizeProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; + export type GridAutoRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | (string & {}); -export type InputSecurityProperty = Globals | "auto" | "none"; + export type GridColumn = Globals | DataType.GridLine | (string & {}); -export type InsetProperty<TLength> = Globals | TLength | "auto" | string; + export type GridColumnEnd = Globals | DataType.GridLine; -export type InsetBlockProperty<TLength> = Globals | TLength | "auto" | string; + export type GridColumnGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type InsetBlockEndProperty<TLength> = Globals | TLength | "auto" | string; + export type GridColumnStart = Globals | DataType.GridLine; -export type InsetBlockStartProperty<TLength> = Globals | TLength | "auto" | string; + export type GridGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type InsetInlineProperty<TLength> = Globals | TLength | "auto" | string; + export type GridRow = Globals | DataType.GridLine | (string & {}); -export type InsetInlineEndProperty<TLength> = Globals | TLength | "auto" | string; + export type GridRowEnd = Globals | DataType.GridLine; -export type InsetInlineStartProperty<TLength> = Globals | TLength | "auto" | string; + export type GridRowGap<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type IsolationProperty = Globals | "auto" | "isolate"; + export type GridRowStart = Globals | DataType.GridLine; -export type JustifyContentProperty = Globals | ContentDistribution | ContentPosition | "left" | "normal" | "right" | string; + export type GridTemplate = Globals | "none" | (string & {}); -export type JustifyItemsProperty = Globals | SelfPosition | "baseline" | "left" | "legacy" | "normal" | "right" | "stretch" | string; + export type GridTemplateAreas = Globals | "none" | (string & {}); -export type JustifySelfProperty = Globals | SelfPosition | "auto" | "baseline" | "left" | "normal" | "right" | "stretch" | string; + export type GridTemplateColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | "subgrid" | (string & {}); -export type JustifyTracksProperty = Globals | ContentDistribution | ContentPosition | "left" | "normal" | "right" | string; + export type GridTemplateRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | "subgrid" | (string & {}); -export type LeftProperty<TLength> = Globals | TLength | "auto" | string; + export type HangingPunctuation = Globals | "allow-end" | "first" | "force-end" | "last" | "none" | (string & {}); -export type LetterSpacingProperty<TLength> = Globals | TLength | "normal"; + export type Height<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); -export type LineBreakProperty = Globals | "anywhere" | "auto" | "loose" | "normal" | "strict"; + export type HyphenateCharacter = Globals | "auto" | (string & {}); -export type LineClampProperty = Globals | "none" | number; + export type HyphenateLimitChars = Globals | "auto" | (string & {}) | (number & {}); -export type LineHeightProperty<TLength> = Globals | TLength | "normal" | string | number; + export type Hyphens = Globals | "auto" | "manual" | "none"; -export type LineHeightStepProperty<TLength> = Globals | TLength; + export type ImageOrientation = Globals | "flip" | "from-image" | (string & {}); -export type ListStyleProperty = Globals | "inside" | "none" | "outside" | string; + export type ImageRendering = Globals | "-moz-crisp-edges" | "-webkit-optimize-contrast" | "auto" | "crisp-edges" | "pixelated"; -export type ListStyleImageProperty = Globals | "none" | string; + export type ImageResolution = Globals | "from-image" | (string & {}); -export type ListStylePositionProperty = Globals | "inside" | "outside"; + export type ImeMode = Globals | "active" | "auto" | "disabled" | "inactive" | "normal"; -export type ListStyleTypeProperty = Globals | "none" | string; + export type InitialLetter = Globals | "normal" | (string & {}) | (number & {}); -export type MarginProperty<TLength> = Globals | TLength | "auto" | string; + export type InlineSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); -export type MarginBlockProperty<TLength> = Globals | TLength | "auto" | string; + export type InputSecurity = Globals | "auto" | "none"; -export type MarginBlockEndProperty<TLength> = Globals | TLength | "auto" | string; + export type Inset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MarginBlockStartProperty<TLength> = Globals | TLength | "auto" | string; + export type InsetBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MarginBottomProperty<TLength> = Globals | TLength | "auto" | string; + export type InsetBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MarginInlineProperty<TLength> = Globals | TLength | "auto" | string; + export type InsetBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MarginInlineEndProperty<TLength> = Globals | TLength | "auto" | string; + export type InsetInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MarginInlineStartProperty<TLength> = Globals | TLength | "auto" | string; + export type InsetInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MarginLeftProperty<TLength> = Globals | TLength | "auto" | string; + export type InsetInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MarginRightProperty<TLength> = Globals | TLength | "auto" | string; + export type Isolation = Globals | "auto" | "isolate"; -export type MarginTopProperty<TLength> = Globals | TLength | "auto" | string; + export type JustifyContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "left" | "normal" | "right" | (string & {}); -export type MaskProperty<TLength> = Globals | MaskLayer<TLength> | string; + export type JustifyItems = Globals | DataType.SelfPosition | "baseline" | "left" | "legacy" | "normal" | "right" | "stretch" | (string & {}); -export type MaskBorderProperty = Globals | "alpha" | "luminance" | "none" | "repeat" | "round" | "space" | "stretch" | string | number; + export type JustifySelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "left" | "normal" | "right" | "stretch" | (string & {}); -export type MaskBorderModeProperty = Globals | "alpha" | "luminance"; + export type JustifyTracks = Globals | DataType.ContentDistribution | DataType.ContentPosition | "left" | "normal" | "right" | (string & {}); -export type MaskBorderOutsetProperty<TLength> = Globals | TLength | string | number; + export type Left<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaskBorderRepeatProperty = Globals | "repeat" | "round" | "space" | "stretch" | string; + export type LetterSpacing<TLength = (string & {}) | 0> = Globals | TLength | "normal"; -export type MaskBorderSliceProperty = Globals | string | number; + export type LineBreak = Globals | "anywhere" | "auto" | "loose" | "normal" | "strict"; -export type MaskBorderSourceProperty = Globals | "none" | string; + export type LineClamp = Globals | "none" | (number & {}) | (string & {}); -export type MaskBorderWidthProperty<TLength> = Globals | TLength | "auto" | string | number; + export type LineHeight<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}) | (number & {}); -export type MaskClipProperty = Globals | GeometryBox | "no-clip" | string; + export type LineHeightStep<TLength = (string & {}) | 0> = Globals | TLength; -export type MaskCompositeProperty = Globals | CompositingOperator | string; + export type ListStyle = Globals | "inside" | "none" | "outside" | (string & {}); -export type MaskImageProperty = Globals | "none" | string; + export type ListStyleImage = Globals | "none" | (string & {}); -export type MaskModeProperty = Globals | MaskingMode | string; + export type ListStylePosition = Globals | "inside" | "outside"; -export type MaskOriginProperty = Globals | Box | "margin-box" | string; + export type ListStyleType = Globals | "none" | (string & {}); -export type MaskPositionProperty<TLength> = Globals | Position<TLength> | string; + export type Margin<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaskRepeatProperty = Globals | RepeatStyle | string; + export type MarginBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaskSizeProperty<TLength> = Globals | BgSize<TLength> | string; + export type MarginBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaskTypeProperty = Globals | "alpha" | "luminance"; + export type MarginBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MathDepthProperty = Globals | "auto-add" | string | number; + export type MarginBottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MathShiftProperty = Globals | "compact" | "normal"; + export type MarginInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MathStyleProperty = Globals | "compact" | "normal"; + export type MarginInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaxBlockSizeProperty<TLength> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "fit-content" - | "max-content" - | "min-content" - | "none" - | string; + export type MarginInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaxHeightProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "none" - | string; + export type MarginLeft<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaxInlineSizeProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "fit-content" - | "max-content" - | "min-content" - | "none" - | string; + export type MarginRight<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaxLinesProperty = Globals | "none" | number; + export type MarginTop<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MaxWidthProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "none" - | string; + export type MarginTrim = Globals | "all" | "in-flow" | "none"; -export type MinBlockSizeProperty<TLength> = - | Globals - | TLength - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; + export type Mask<TLength = (string & {}) | 0> = Globals | DataType.MaskLayer<TLength> | (string & {}); -export type MinHeightProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | string; + export type MaskBorder = Globals | "alpha" | "luminance" | "none" | "repeat" | "round" | "space" | "stretch" | (string & {}) | (number & {}); -export type MinInlineSizeProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "auto" - | "fit-content" - | "max-content" - | "min-content" - | string; + export type MaskBorderMode = Globals | "alpha" | "luminance"; -export type MinWidthProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fill-available" - | "-webkit-fit-content" - | "-webkit-max-content" - | "-webkit-min-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "min-intrinsic" - | string; + export type MaskBorderOutset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}) | (number & {}); -export type MixBlendModeProperty = Globals | BlendMode | "plus-lighter"; + export type MaskBorderRepeat = Globals | "repeat" | "round" | "space" | "stretch" | (string & {}); -export type OffsetProperty<TLength> = Globals | Position<TLength> | GeometryBox | "auto" | "none" | string; + export type MaskBorderSlice = Globals | (string & {}) | (number & {}); -export type OffsetDistanceProperty<TLength> = Globals | TLength | string; + export type MaskBorderSource = Globals | "none" | (string & {}); -export type OffsetPathProperty = Globals | GeometryBox | "none" | string; + export type MaskBorderWidth<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}) | (number & {}); -export type OffsetRotateProperty = Globals | "auto" | "reverse" | string; + export type MaskClip = Globals | DataType.GeometryBox | "no-clip" | (string & {}); -export type ObjectFitProperty = Globals | "contain" | "cover" | "fill" | "none" | "scale-down"; + export type MaskComposite = Globals | DataType.CompositingOperator | (string & {}); -export type ObjectPositionProperty<TLength> = Globals | Position<TLength>; + export type MaskImage = Globals | "none" | (string & {}); -export type OffsetAnchorProperty<TLength> = Globals | Position<TLength> | "auto"; + export type MaskMode = Globals | DataType.MaskingMode | (string & {}); -export type OpacityProperty = Globals | string | number; + export type MaskOrigin = Globals | DataType.GeometryBox | (string & {}); -export type OutlineProperty<TLength> = Globals | Color | LineStyle | LineWidth<TLength> | "auto" | "invert" | string; + export type MaskPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | (string & {}); -export type OutlineColorProperty = Globals | Color | "invert"; + export type MaskRepeat = Globals | DataType.RepeatStyle | (string & {}); -export type OutlineOffsetProperty<TLength> = Globals | TLength; + export type MaskSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); -export type OutlineStyleProperty = Globals | LineStyle | "auto" | string; + export type MaskType = Globals | "alpha" | "luminance"; -export type OutlineWidthProperty<TLength> = Globals | LineWidth<TLength>; + export type MasonryAutoFlow = Globals | "definite-first" | "next" | "ordered" | "pack" | (string & {}); -export type OverflowProperty = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible" | string; + export type MathDepth = Globals | "auto-add" | (string & {}) | (number & {}); -export type OverflowAnchorProperty = Globals | "auto" | "none"; + export type MathShift = Globals | "compact" | "normal"; -export type OverflowBlockProperty = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; + export type MathStyle = Globals | "compact" | "normal"; -export type OverflowClipBoxProperty = Globals | "content-box" | "padding-box"; + export type MaxBlockSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "fit-content" + | "max-content" + | "min-content" + | "none" + | (string & {}); -export type OverflowClipMarginProperty<TLength> = Globals | VisualBox | TLength | string; + export type MaxHeight<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "none" + | (string & {}); -export type OverflowInlineProperty = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; + export type MaxInlineSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "fit-content" + | "max-content" + | "min-content" + | "none" + | (string & {}); -export type OverflowWrapProperty = Globals | "anywhere" | "break-word" | "normal"; + export type MaxLines = Globals | "none" | (number & {}) | (string & {}); -export type OverflowXProperty = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; + export type MaxWidth<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "none" + | (string & {}); -export type OverflowYProperty = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; + export type MinBlockSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); -export type OverscrollBehaviorProperty = Globals | "auto" | "contain" | "none" | string; + export type MinHeight<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | (string & {}); -export type OverscrollBehaviorBlockProperty = Globals | "auto" | "contain" | "none"; + export type MinInlineSize<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "auto" + | "fit-content" + | "max-content" + | "min-content" + | (string & {}); -export type OverscrollBehaviorInlineProperty = Globals | "auto" | "contain" | "none"; + export type MinWidth<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fill-available" + | "-webkit-fit-content" + | "-webkit-max-content" + | "-webkit-min-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "min-intrinsic" + | (string & {}); -export type OverscrollBehaviorXProperty = Globals | "auto" | "contain" | "none"; + export type MixBlendMode = Globals | DataType.BlendMode | "plus-lighter"; -export type OverscrollBehaviorYProperty = Globals | "auto" | "contain" | "none"; + export type Offset<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto" | "none" | "normal" | (string & {}); -export type PaddingProperty<TLength> = Globals | TLength | string; + export type OffsetDistance<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type PaddingBlockProperty<TLength> = Globals | TLength | string; + export type OffsetPath = Globals | "none" | (string & {}); -export type PaddingBlockEndProperty<TLength> = Globals | TLength | string; + export type OffsetRotate = Globals | "auto" | "reverse" | (string & {}); -export type PaddingBlockStartProperty<TLength> = Globals | TLength | string; + export type ObjectFit = Globals | "contain" | "cover" | "fill" | "none" | "scale-down"; -export type PaddingBottomProperty<TLength> = Globals | TLength | string; + export type ObjectPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; -export type PaddingInlineProperty<TLength> = Globals | TLength | string; + export type OffsetAnchor<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto"; -export type PaddingInlineEndProperty<TLength> = Globals | TLength | string; + export type OffsetPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "auto" | "normal"; -export type PaddingInlineStartProperty<TLength> = Globals | TLength | string; + export type Opacity = Globals | (string & {}) | (number & {}); -export type PaddingLeftProperty<TLength> = Globals | TLength | string; + export type Order = Globals | (number & {}) | (string & {}); -export type PaddingRightProperty<TLength> = Globals | TLength | string; + export type Orphans = Globals | (number & {}) | (string & {}); -export type PaddingTopProperty<TLength> = Globals | TLength | string; + export type Outline<TLength = (string & {}) | 0> = Globals | DataType.Color | DataType.LineStyle | DataType.LineWidth<TLength> | "auto" | "invert" | (string & {}); -export type PageBreakAfterProperty = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; + export type OutlineColor = Globals | DataType.Color | "invert"; -export type PageBreakBeforeProperty = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; + export type OutlineOffset<TLength = (string & {}) | 0> = Globals | TLength; -export type PageBreakInsideProperty = Globals | "auto" | "avoid"; + export type OutlineStyle = Globals | DataType.LineStyle | "auto" | (string & {}); -export type PaintOrderProperty = Globals | "fill" | "markers" | "normal" | "stroke" | string; + export type OutlineWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength>; -export type PerspectiveProperty<TLength> = Globals | TLength | "none"; + export type Overflow = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible" | (string & {}); -export type PerspectiveOriginProperty<TLength> = Globals | Position<TLength>; + export type OverflowAnchor = Globals | "auto" | "none"; -export type PlaceContentProperty = Globals | ContentDistribution | ContentPosition | "baseline" | "normal" | string; + export type OverflowBlock = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; -export type PlaceItemsProperty = Globals | SelfPosition | "baseline" | "normal" | "stretch" | string; + export type OverflowClipBox = Globals | "content-box" | "padding-box"; -export type PlaceSelfProperty = Globals | SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; + export type OverflowClipMargin<TLength = (string & {}) | 0> = Globals | DataType.VisualBox | TLength | (string & {}); -export type PointerEventsProperty = Globals | "all" | "auto" | "fill" | "inherit" | "none" | "painted" | "stroke" | "visible" | "visibleFill" | "visiblePainted" | "visibleStroke"; + export type OverflowInline = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; -export type PositionProperty = Globals | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"; + export type OverflowWrap = Globals | "anywhere" | "break-word" | "normal"; -export type QuotesProperty = Globals | "auto" | "none" | string; + export type OverflowX = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; -export type ResizeProperty = Globals | "block" | "both" | "horizontal" | "inline" | "none" | "vertical"; + export type OverflowY = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; -export type RightProperty<TLength> = Globals | TLength | "auto" | string; + export type Overlay = Globals | "auto" | "none"; -export type RotateProperty = Globals | "none" | string; + export type OverscrollBehavior = Globals | "auto" | "contain" | "none" | (string & {}); -export type RowGapProperty<TLength> = Globals | TLength | "normal" | string; + export type OverscrollBehaviorBlock = Globals | "auto" | "contain" | "none"; -export type RubyAlignProperty = Globals | "center" | "space-around" | "space-between" | "start"; + export type OverscrollBehaviorInline = Globals | "auto" | "contain" | "none"; -export type RubyMergeProperty = Globals | "auto" | "collapse" | "separate"; + export type OverscrollBehaviorX = Globals | "auto" | "contain" | "none"; -export type RubyPositionProperty = Globals | "alternate" | "over" | "under" | string; + export type OverscrollBehaviorY = Globals | "auto" | "contain" | "none"; -export type ScaleProperty = Globals | "none" | string | number; + export type Padding<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollBehaviorProperty = Globals | "auto" | "smooth"; + export type PaddingBlock<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginProperty<TLength> = Globals | TLength | string; + export type PaddingBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginBlockProperty<TLength> = Globals | TLength | string; + export type PaddingBlockStart<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginBlockEndProperty<TLength> = Globals | TLength; + export type PaddingBottom<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginBlockStartProperty<TLength> = Globals | TLength; + export type PaddingInline<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginBottomProperty<TLength> = Globals | TLength; + export type PaddingInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginInlineProperty<TLength> = Globals | TLength | string; + export type PaddingInlineStart<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginInlineEndProperty<TLength> = Globals | TLength; + export type PaddingLeft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginInlineStartProperty<TLength> = Globals | TLength; + export type PaddingRight<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginLeftProperty<TLength> = Globals | TLength; + export type PaddingTop<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollMarginRightProperty<TLength> = Globals | TLength; + export type Page = Globals | "auto" | (string & {}); -export type ScrollMarginTopProperty<TLength> = Globals | TLength; + export type PageBreakAfter = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; -export type ScrollPaddingProperty<TLength> = Globals | TLength | "auto" | string; + export type PageBreakBefore = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; -export type ScrollPaddingBlockProperty<TLength> = Globals | TLength | "auto" | string; + export type PageBreakInside = Globals | "auto" | "avoid"; -export type ScrollPaddingBlockEndProperty<TLength> = Globals | TLength | "auto" | string; + export type PaintOrder = Globals | "fill" | "markers" | "normal" | "stroke" | (string & {}); -export type ScrollPaddingBlockStartProperty<TLength> = Globals | TLength | "auto" | string; + export type Perspective<TLength = (string & {}) | 0> = Globals | TLength | "none"; -export type ScrollPaddingBottomProperty<TLength> = Globals | TLength | "auto" | string; + export type PerspectiveOrigin<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; -export type ScrollPaddingInlineProperty<TLength> = Globals | TLength | "auto" | string; + export type PlaceContent = Globals | DataType.ContentDistribution | DataType.ContentPosition | "baseline" | "normal" | (string & {}); -export type ScrollPaddingInlineEndProperty<TLength> = Globals | TLength | "auto" | string; + export type PlaceItems = Globals | DataType.SelfPosition | "baseline" | "normal" | "stretch" | (string & {}); -export type ScrollPaddingInlineStartProperty<TLength> = Globals | TLength | "auto" | string; + export type PlaceSelf = Globals | DataType.SelfPosition | "auto" | "baseline" | "normal" | "stretch" | (string & {}); -export type ScrollPaddingLeftProperty<TLength> = Globals | TLength | "auto" | string; + export type PointerEvents = Globals | "all" | "auto" | "fill" | "inherit" | "none" | "painted" | "stroke" | "visible" | "visibleFill" | "visiblePainted" | "visibleStroke"; -export type ScrollPaddingRightProperty<TLength> = Globals | TLength | "auto" | string; + export type Position = Globals | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"; -export type ScrollPaddingTopProperty<TLength> = Globals | TLength | "auto" | string; + export type Quotes = Globals | "auto" | "none" | (string & {}); -export type ScrollSnapAlignProperty = Globals | "center" | "end" | "none" | "start" | string; + export type Resize = Globals | "block" | "both" | "horizontal" | "inline" | "none" | "vertical"; -export type ScrollSnapCoordinateProperty<TLength> = Globals | Position<TLength> | "none" | string; + export type Right<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type ScrollSnapDestinationProperty<TLength> = Globals | Position<TLength>; + export type Rotate = Globals | "none" | (string & {}); -export type ScrollSnapPointsXProperty = Globals | "none" | string; + export type RowGap<TLength = (string & {}) | 0> = Globals | TLength | "normal" | (string & {}); -export type ScrollSnapPointsYProperty = Globals | "none" | string; + export type RubyAlign = Globals | "center" | "space-around" | "space-between" | "start"; -export type ScrollSnapStopProperty = Globals | "always" | "normal"; + export type RubyMerge = Globals | "auto" | "collapse" | "separate"; -export type ScrollSnapTypeProperty = Globals | "block" | "both" | "inline" | "none" | "x" | "y" | string; + export type RubyPosition = Globals | "alternate" | "inter-character" | "over" | "under" | (string & {}); -export type ScrollSnapTypeXProperty = Globals | "mandatory" | "none" | "proximity"; + export type Scale = Globals | "none" | (string & {}) | (number & {}); -export type ScrollSnapTypeYProperty = Globals | "mandatory" | "none" | "proximity"; + export type ScrollBehavior = Globals | "auto" | "smooth"; -export type ScrollbarColorProperty = Globals | Color | "auto"; + export type ScrollMargin<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollbarGutterProperty = Globals | "auto" | "stable" | string; + export type ScrollMarginBlock<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type ScrollbarWidthProperty = Globals | "auto" | "none" | "thin"; + export type ScrollMarginBlockEnd<TLength = (string & {}) | 0> = Globals | TLength; -export type ShapeImageThresholdProperty = Globals | string | number; + export type ScrollMarginBlockStart<TLength = (string & {}) | 0> = Globals | TLength; -export type ShapeMarginProperty<TLength> = Globals | TLength | string; + export type ScrollMarginBottom<TLength = (string & {}) | 0> = Globals | TLength; -export type ShapeOutsideProperty = Globals | Box | "margin-box" | "none" | string; + export type ScrollMarginInline<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type TabSizeProperty<TLength> = Globals | TLength | number; + export type ScrollMarginInlineEnd<TLength = (string & {}) | 0> = Globals | TLength; -export type TableLayoutProperty = Globals | "auto" | "fixed"; + export type ScrollMarginInlineStart<TLength = (string & {}) | 0> = Globals | TLength; -export type TextAlignProperty = Globals | "center" | "end" | "justify" | "left" | "match-parent" | "right" | "start"; + export type ScrollMarginLeft<TLength = (string & {}) | 0> = Globals | TLength; -export type TextAlignLastProperty = Globals | "auto" | "center" | "end" | "justify" | "left" | "right" | "start"; + export type ScrollMarginRight<TLength = (string & {}) | 0> = Globals | TLength; -export type TextCombineUprightProperty = Globals | "-ms-text-combine-horizontal" | "all" | "digits" | "none" | string; + export type ScrollMarginTop<TLength = (string & {}) | 0> = Globals | TLength; -export type TextDecorationProperty<TLength> = - | Globals - | Color - | TLength - | "auto" - | "blink" - | "dashed" - | "dotted" - | "double" - | "from-font" - | "grammar-error" - | "line-through" - | "none" - | "overline" - | "solid" - | "spelling-error" - | "underline" - | "wavy" - | string; + export type ScrollPadding<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextDecorationColorProperty = Globals | Color; + export type ScrollPaddingBlock<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextDecorationLineProperty = Globals | "blink" | "grammar-error" | "line-through" | "none" | "overline" | "spelling-error" | "underline" | string; + export type ScrollPaddingBlockEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextDecorationSkipProperty = Globals | "box-decoration" | "edges" | "leading-spaces" | "none" | "objects" | "spaces" | "trailing-spaces" | string; + export type ScrollPaddingBlockStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextDecorationSkipInkProperty = Globals | "all" | "auto" | "none"; + export type ScrollPaddingBottom<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextDecorationStyleProperty = Globals | "dashed" | "dotted" | "double" | "solid" | "wavy"; + export type ScrollPaddingInline<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextDecorationThicknessProperty<TLength> = Globals | TLength | "auto" | "from-font" | string; + export type ScrollPaddingInlineEnd<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextEmphasisProperty = Globals | Color | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; + export type ScrollPaddingInlineStart<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextEmphasisColorProperty = Globals | Color; + export type ScrollPaddingLeft<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextEmphasisStyleProperty = Globals | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; + export type ScrollPaddingRight<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextIndentProperty<TLength> = Globals | TLength | string; + export type ScrollPaddingTop<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type TextJustifyProperty = Globals | "auto" | "inter-character" | "inter-word" | "none"; + export type ScrollSnapAlign = Globals | "center" | "end" | "none" | "start" | (string & {}); -export type TextOrientationProperty = Globals | "mixed" | "sideways" | "upright"; + export type ScrollSnapCoordinate<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | "none" | (string & {}); -export type TextOverflowProperty = Globals | "clip" | "ellipsis" | string; + export type ScrollSnapDestination<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength>; -export type TextRenderingProperty = Globals | "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; + export type ScrollSnapPointsX = Globals | "none" | (string & {}); -export type TextShadowProperty = Globals | "none" | string; + export type ScrollSnapPointsY = Globals | "none" | (string & {}); -export type TextSizeAdjustProperty = Globals | "auto" | "none" | string; + export type ScrollSnapStop = Globals | "always" | "normal"; -export type TextTransformProperty = Globals | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "none" | "uppercase"; + export type ScrollSnapType = Globals | "block" | "both" | "inline" | "none" | "x" | "y" | (string & {}); -export type TextUnderlineOffsetProperty<TLength> = Globals | TLength | "auto" | string; + export type ScrollSnapTypeX = Globals | "mandatory" | "none" | "proximity"; -export type TextUnderlinePositionProperty = Globals | "auto" | "from-font" | "left" | "right" | "under" | string; + export type ScrollSnapTypeY = Globals | "mandatory" | "none" | "proximity"; -export type TopProperty<TLength> = Globals | TLength | "auto" | string; + export type ScrollTimeline = Globals | "none" | (string & {}); -export type TouchActionProperty = - | Globals - | "-ms-manipulation" - | "-ms-none" - | "-ms-pinch-zoom" - | "auto" - | "manipulation" - | "none" - | "pan-down" - | "pan-left" - | "pan-right" - | "pan-up" - | "pan-x" - | "pan-y" - | "pinch-zoom" - | string; + export type ScrollTimelineAxis = Globals | "block" | "inline" | "x" | "y" | (string & {}); -export type TransformProperty = Globals | "none" | string; + export type ScrollTimelineName = Globals | "none" | (string & {}); -export type TransformBoxProperty = Globals | "border-box" | "content-box" | "fill-box" | "stroke-box" | "view-box"; + export type ScrollbarColor = Globals | "auto" | (string & {}); -export type TransformOriginProperty<TLength> = Globals | TLength | "bottom" | "center" | "left" | "right" | "top" | string; + export type ScrollbarGutter = Globals | "auto" | "stable" | (string & {}); -export type TransformStyleProperty = Globals | "flat" | "preserve-3d"; + export type ScrollbarWidth = Globals | "auto" | "none" | "thin"; -export type TransitionProperty = Globals | SingleTransition | string; + export type ShapeImageThreshold = Globals | (string & {}) | (number & {}); -export type TransitionPropertyProperty = Globals | "all" | "none" | string; - -export type TransitionTimingFunctionProperty = Globals | EasingFunction | string; - -export type TranslateProperty<TLength> = Globals | TLength | "none" | string; - -export type UnicodeBidiProperty = - | Globals - | "-moz-isolate" - | "-moz-isolate-override" - | "-moz-plaintext" - | "-webkit-isolate" - | "-webkit-isolate-override" - | "-webkit-plaintext" - | "bidi-override" - | "embed" - | "isolate" - | "isolate-override" - | "normal" - | "plaintext"; - -export type UserSelectProperty = Globals | "-moz-none" | "all" | "auto" | "contain" | "element" | "none" | "text"; - -export type VerticalAlignProperty<TLength> = Globals | TLength | "baseline" | "bottom" | "middle" | "sub" | "super" | "text-bottom" | "text-top" | "top" | string; - -export type VisibilityProperty = Globals | "collapse" | "hidden" | "visible"; - -export type WhiteSpaceProperty = Globals | "-moz-pre-wrap" | "break-spaces" | "normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap"; - -export type WidthProperty<TLength> = - | Globals - | TLength - | "-moz-fit-content" - | "-moz-max-content" - | "-moz-min-content" - | "-webkit-fit-content" - | "-webkit-max-content" - | "auto" - | "fit-content" - | "intrinsic" - | "max-content" - | "min-content" - | "min-intrinsic" - | string; - -export type WillChangeProperty = Globals | AnimateableFeature | "auto" | string; - -export type WordBreakProperty = Globals | "break-all" | "break-word" | "keep-all" | "normal"; - -export type WordSpacingProperty<TLength> = Globals | TLength | "normal"; - -export type WordWrapProperty = Globals | "break-word" | "normal"; - -export type WritingModeProperty = Globals | "horizontal-tb" | "sideways-lr" | "sideways-rl" | "vertical-lr" | "vertical-rl"; - -export type ZIndexProperty = Globals | "auto" | number; - -export type ZoomProperty = Globals | "normal" | "reset" | string | number; - -export type MozAppearanceProperty = - | Globals - | "-moz-mac-unified-toolbar" - | "-moz-win-borderless-glass" - | "-moz-win-browsertabbar-toolbox" - | "-moz-win-communications-toolbox" - | "-moz-win-communicationstext" - | "-moz-win-exclude-glass" - | "-moz-win-glass" - | "-moz-win-media-toolbox" - | "-moz-win-mediatext" - | "-moz-window-button-box" - | "-moz-window-button-box-maximized" - | "-moz-window-button-close" - | "-moz-window-button-maximize" - | "-moz-window-button-minimize" - | "-moz-window-button-restore" - | "-moz-window-frame-bottom" - | "-moz-window-frame-left" - | "-moz-window-frame-right" - | "-moz-window-titlebar" - | "-moz-window-titlebar-maximized" - | "button" - | "button-arrow-down" - | "button-arrow-next" - | "button-arrow-previous" - | "button-arrow-up" - | "button-bevel" - | "button-focus" - | "caret" - | "checkbox" - | "checkbox-container" - | "checkbox-label" - | "checkmenuitem" - | "dualbutton" - | "groupbox" - | "listbox" - | "listitem" - | "menuarrow" - | "menubar" - | "menucheckbox" - | "menuimage" - | "menuitem" - | "menuitemtext" - | "menulist" - | "menulist-button" - | "menulist-text" - | "menulist-textfield" - | "menupopup" - | "menuradio" - | "menuseparator" - | "meterbar" - | "meterchunk" - | "none" - | "progressbar" - | "progressbar-vertical" - | "progresschunk" - | "progresschunk-vertical" - | "radio" - | "radio-container" - | "radio-label" - | "radiomenuitem" - | "range" - | "range-thumb" - | "resizer" - | "resizerpanel" - | "scale-horizontal" - | "scale-vertical" - | "scalethumb-horizontal" - | "scalethumb-vertical" - | "scalethumbend" - | "scalethumbstart" - | "scalethumbtick" - | "scrollbarbutton-down" - | "scrollbarbutton-left" - | "scrollbarbutton-right" - | "scrollbarbutton-up" - | "scrollbarthumb-horizontal" - | "scrollbarthumb-vertical" - | "scrollbartrack-horizontal" - | "scrollbartrack-vertical" - | "searchfield" - | "separator" - | "sheet" - | "spinner" - | "spinner-downbutton" - | "spinner-textfield" - | "spinner-upbutton" - | "splitter" - | "statusbar" - | "statusbarpanel" - | "tab" - | "tab-scroll-arrow-back" - | "tab-scroll-arrow-forward" - | "tabpanel" - | "tabpanels" - | "textfield" - | "textfield-multiline" - | "toolbar" - | "toolbarbutton" - | "toolbarbutton-dropdown" - | "toolbargripper" - | "toolbox" - | "tooltip" - | "treeheader" - | "treeheadercell" - | "treeheadersortarrow" - | "treeitem" - | "treeline" - | "treetwisty" - | "treetwistyopen" - | "treeview"; + export type ShapeMargin<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type MozBindingProperty = Globals | "none" | string; + export type ShapeOutside = Globals | DataType.Box | "margin-box" | "none" | (string & {}); -export type MozBorderBottomColorsProperty = Globals | Color | "none" | string; + export type TabSize<TLength = (string & {}) | 0> = Globals | TLength | (number & {}) | (string & {}); -export type MozBorderLeftColorsProperty = Globals | Color | "none" | string; + export type TableLayout = Globals | "auto" | "fixed"; -export type MozBorderRightColorsProperty = Globals | Color | "none" | string; + export type TextAlign = Globals | "-webkit-match-parent" | "center" | "end" | "justify" | "left" | "match-parent" | "right" | "start"; -export type MozBorderTopColorsProperty = Globals | Color | "none" | string; + export type TextAlignLast = Globals | "auto" | "center" | "end" | "justify" | "left" | "right" | "start"; -export type MozContextPropertiesProperty = Globals | "fill" | "fill-opacity" | "none" | "stroke" | "stroke-opacity" | string; + export type TextCombineUpright = Globals | "all" | "none" | (string & {}); -export type MozFloatEdgeProperty = Globals | "border-box" | "content-box" | "margin-box" | "padding-box"; + export type TextDecoration<TLength = (string & {}) | 0> = + | Globals + | DataType.Color + | TLength + | "auto" + | "blink" + | "dashed" + | "dotted" + | "double" + | "from-font" + | "grammar-error" + | "line-through" + | "none" + | "overline" + | "solid" + | "spelling-error" + | "underline" + | "wavy" + | (string & {}); -export type MozForceBrokenImageIconProperty = Globals | 0 | 1; + export type TextDecorationColor = Globals | DataType.Color; -export type MozImageRegionProperty = Globals | "auto" | string; + export type TextDecorationLine = Globals | "blink" | "grammar-error" | "line-through" | "none" | "overline" | "spelling-error" | "underline" | (string & {}); -export type MozOrientProperty = Globals | "block" | "horizontal" | "inline" | "vertical"; + export type TextDecorationSkip = Globals | "box-decoration" | "edges" | "leading-spaces" | "none" | "objects" | "spaces" | "trailing-spaces" | (string & {}); -export type MozOutlineRadiusProperty<TLength> = Globals | TLength | string; + export type TextDecorationSkipInk = Globals | "all" | "auto" | "none"; -export type MozOutlineRadiusBottomleftProperty<TLength> = Globals | TLength | string; + export type TextDecorationStyle = Globals | "dashed" | "dotted" | "double" | "solid" | "wavy"; -export type MozOutlineRadiusBottomrightProperty<TLength> = Globals | TLength | string; + export type TextDecorationThickness<TLength = (string & {}) | 0> = Globals | TLength | "auto" | "from-font" | (string & {}); -export type MozOutlineRadiusTopleftProperty<TLength> = Globals | TLength | string; + export type TextEmphasis = Globals | DataType.Color | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | (string & {}); -export type MozOutlineRadiusToprightProperty<TLength> = Globals | TLength | string; + export type TextEmphasisColor = Globals | DataType.Color; -export type MozStackSizingProperty = Globals | "ignore" | "stretch-to-fit"; + export type TextEmphasisPosition = Globals | (string & {}); -export type MozTextBlinkProperty = Globals | "blink" | "none"; + export type TextEmphasisStyle = Globals | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | (string & {}); -export type MozUserFocusProperty = Globals | "ignore" | "none" | "normal" | "select-after" | "select-all" | "select-before" | "select-menu" | "select-same"; + export type TextIndent<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type MozUserInputProperty = Globals | "auto" | "disabled" | "enabled" | "none"; + export type TextJustify = Globals | "auto" | "inter-character" | "inter-word" | "none"; -export type MozUserModifyProperty = Globals | "read-only" | "read-write" | "write-only"; + export type TextOrientation = Globals | "mixed" | "sideways" | "upright"; -export type MozWindowDraggingProperty = Globals | "drag" | "no-drag"; + export type TextOverflow = Globals | "clip" | "ellipsis" | (string & {}); -export type MozWindowShadowProperty = Globals | "default" | "menu" | "none" | "sheet" | "tooltip"; + export type TextRendering = Globals | "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; -export type MsAcceleratorProperty = Globals | "false" | "true"; + export type TextShadow = Globals | "none" | (string & {}); -export type MsBlockProgressionProperty = Globals | "bt" | "lr" | "rl" | "tb"; + export type TextSizeAdjust = Globals | "auto" | "none" | (string & {}); -export type MsContentZoomChainingProperty = Globals | "chained" | "none"; + export type TextTransform = Globals | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "none" | "uppercase"; -export type MsContentZoomSnapProperty = Globals | "mandatory" | "none" | "proximity" | string; + export type TextUnderlineOffset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MsContentZoomSnapTypeProperty = Globals | "mandatory" | "none" | "proximity"; + export type TextUnderlinePosition = Globals | "auto" | "from-font" | "left" | "right" | "under" | (string & {}); -export type MsContentZoomingProperty = Globals | "none" | "zoom"; + export type TextWrap = Globals | "balance" | "nowrap" | "pretty" | "stable" | "wrap"; -export type MsFlowFromProperty = Globals | "none" | string; + export type TimelineScope = Globals | "none" | (string & {}); -export type MsFlowIntoProperty = Globals | "none" | string; + export type Top<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); -export type MsGridColumnsProperty<TLength> = Globals | TrackBreadth<TLength> | "none" | string; + export type TouchAction = + | Globals + | "-ms-manipulation" + | "-ms-none" + | "-ms-pinch-zoom" + | "auto" + | "manipulation" + | "none" + | "pan-down" + | "pan-left" + | "pan-right" + | "pan-up" + | "pan-x" + | "pan-y" + | "pinch-zoom" + | (string & {}); -export type MsGridRowsProperty<TLength> = Globals | TrackBreadth<TLength> | "none" | string; + export type Transform = Globals | "none" | (string & {}); -export type MsHighContrastAdjustProperty = Globals | "auto" | "none"; + export type TransformBox = Globals | "border-box" | "content-box" | "fill-box" | "stroke-box" | "view-box"; -export type MsHyphenateLimitCharsProperty = Globals | "auto" | string | number; + export type TransformOrigin<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); -export type MsHyphenateLimitLinesProperty = Globals | "no-limit" | number; + export type TransformStyle = Globals | "flat" | "preserve-3d"; -export type MsHyphenateLimitZoneProperty<TLength> = Globals | TLength | string; + export type Transition<TTime = string & {}> = Globals | DataType.SingleTransition<TTime> | (string & {}); -export type MsImeAlignProperty = Globals | "after" | "auto"; + export type TransitionBehavior = Globals | "allow-discrete" | "normal" | (string & {}); -export type MsOverflowStyleProperty = Globals | "-ms-autohiding-scrollbar" | "auto" | "none" | "scrollbar"; + export type TransitionDelay<TTime = string & {}> = Globals | TTime | (string & {}); -export type MsScrollChainingProperty = Globals | "chained" | "none"; + export type TransitionDuration<TTime = string & {}> = Globals | TTime | (string & {}); -export type MsScrollLimitXMaxProperty<TLength> = Globals | TLength | "auto"; + export type TransitionProperty = Globals | "all" | "none" | (string & {}); -export type MsScrollLimitXMinProperty<TLength> = Globals | TLength; + export type TransitionTimingFunction = Globals | DataType.EasingFunction | (string & {}); -export type MsScrollLimitYMaxProperty<TLength> = Globals | TLength | "auto"; + export type Translate<TLength = (string & {}) | 0> = Globals | TLength | "none" | (string & {}); -export type MsScrollLimitYMinProperty<TLength> = Globals | TLength; + export type UnicodeBidi = + | Globals + | "-moz-isolate" + | "-moz-isolate-override" + | "-moz-plaintext" + | "-webkit-isolate" + | "-webkit-isolate-override" + | "-webkit-plaintext" + | "bidi-override" + | "embed" + | "isolate" + | "isolate-override" + | "normal" + | "plaintext"; -export type MsScrollRailsProperty = Globals | "none" | "railed"; + export type UserSelect = Globals | "-moz-none" | "all" | "auto" | "contain" | "element" | "none" | "text"; -export type MsScrollSnapTypeProperty = Globals | "mandatory" | "none" | "proximity"; + export type VerticalAlign<TLength = (string & {}) | 0> = + | Globals + | TLength + | "baseline" + | "bottom" + | "middle" + | "sub" + | "super" + | "text-bottom" + | "text-top" + | "top" + | (string & {}); + + export type ViewTimeline = Globals | "none" | (string & {}); + + export type ViewTimelineAxis = Globals | "block" | "inline" | "x" | "y" | (string & {}); + + export type ViewTimelineInset<TLength = (string & {}) | 0> = Globals | TLength | "auto" | (string & {}); + + export type ViewTimelineName = Globals | "none" | (string & {}); + + export type ViewTransitionName = Globals | "none" | (string & {}); + + export type Visibility = Globals | "collapse" | "hidden" | "visible"; + + export type WhiteSpace = + | Globals + | "-moz-pre-wrap" + | "balance" + | "break-spaces" + | "collapse" + | "discard" + | "discard-after" + | "discard-before" + | "discard-inner" + | "none" + | "normal" + | "nowrap" + | "pre" + | "pre-line" + | "pre-wrap" + | "preserve" + | "preserve-breaks" + | "preserve-spaces" + | "pretty" + | "stable" + | "wrap" + | (string & {}); + + export type WhiteSpaceCollapse = Globals | "break-spaces" | "collapse" | "discard" | "preserve" | "preserve-breaks" | "preserve-spaces"; + + export type WhiteSpaceTrim = Globals | "discard-after" | "discard-before" | "discard-inner" | "none" | (string & {}); + + export type Widows = Globals | (number & {}) | (string & {}); + + export type Width<TLength = (string & {}) | 0> = + | Globals + | TLength + | "-moz-fit-content" + | "-moz-max-content" + | "-moz-min-content" + | "-webkit-fit-content" + | "-webkit-max-content" + | "auto" + | "fit-content" + | "intrinsic" + | "max-content" + | "min-content" + | "min-intrinsic" + | (string & {}); + + export type WillChange = Globals | DataType.AnimateableFeature | "auto" | (string & {}); + + export type WordBreak = Globals | "break-all" | "break-word" | "keep-all" | "normal"; + + export type WordSpacing<TLength = (string & {}) | 0> = Globals | TLength | "normal"; + + export type WordWrap = Globals | "break-word" | "normal"; + + export type WritingMode = Globals | "horizontal-tb" | "sideways-lr" | "sideways-rl" | "vertical-lr" | "vertical-rl"; + + export type ZIndex = Globals | "auto" | (number & {}) | (string & {}); + + export type Zoom = Globals | "normal" | "reset" | (string & {}) | (number & {}); + + export type MozAppearance = + | Globals + | "-moz-mac-unified-toolbar" + | "-moz-win-borderless-glass" + | "-moz-win-browsertabbar-toolbox" + | "-moz-win-communications-toolbox" + | "-moz-win-communicationstext" + | "-moz-win-exclude-glass" + | "-moz-win-glass" + | "-moz-win-media-toolbox" + | "-moz-win-mediatext" + | "-moz-window-button-box" + | "-moz-window-button-box-maximized" + | "-moz-window-button-close" + | "-moz-window-button-maximize" + | "-moz-window-button-minimize" + | "-moz-window-button-restore" + | "-moz-window-frame-bottom" + | "-moz-window-frame-left" + | "-moz-window-frame-right" + | "-moz-window-titlebar" + | "-moz-window-titlebar-maximized" + | "button" + | "button-arrow-down" + | "button-arrow-next" + | "button-arrow-previous" + | "button-arrow-up" + | "button-bevel" + | "button-focus" + | "caret" + | "checkbox" + | "checkbox-container" + | "checkbox-label" + | "checkmenuitem" + | "dualbutton" + | "groupbox" + | "listbox" + | "listitem" + | "menuarrow" + | "menubar" + | "menucheckbox" + | "menuimage" + | "menuitem" + | "menuitemtext" + | "menulist" + | "menulist-button" + | "menulist-text" + | "menulist-textfield" + | "menupopup" + | "menuradio" + | "menuseparator" + | "meterbar" + | "meterchunk" + | "none" + | "progressbar" + | "progressbar-vertical" + | "progresschunk" + | "progresschunk-vertical" + | "radio" + | "radio-container" + | "radio-label" + | "radiomenuitem" + | "range" + | "range-thumb" + | "resizer" + | "resizerpanel" + | "scale-horizontal" + | "scale-vertical" + | "scalethumb-horizontal" + | "scalethumb-vertical" + | "scalethumbend" + | "scalethumbstart" + | "scalethumbtick" + | "scrollbarbutton-down" + | "scrollbarbutton-left" + | "scrollbarbutton-right" + | "scrollbarbutton-up" + | "scrollbarthumb-horizontal" + | "scrollbarthumb-vertical" + | "scrollbartrack-horizontal" + | "scrollbartrack-vertical" + | "searchfield" + | "separator" + | "sheet" + | "spinner" + | "spinner-downbutton" + | "spinner-textfield" + | "spinner-upbutton" + | "splitter" + | "statusbar" + | "statusbarpanel" + | "tab" + | "tab-scroll-arrow-back" + | "tab-scroll-arrow-forward" + | "tabpanel" + | "tabpanels" + | "textfield" + | "textfield-multiline" + | "toolbar" + | "toolbarbutton" + | "toolbarbutton-dropdown" + | "toolbargripper" + | "toolbox" + | "tooltip" + | "treeheader" + | "treeheadercell" + | "treeheadersortarrow" + | "treeitem" + | "treeline" + | "treetwisty" + | "treetwistyopen" + | "treeview"; -export type MsScrollTranslationProperty = Globals | "none" | "vertical-to-horizontal"; + export type MozBinding = Globals | "none" | (string & {}); -export type MsScrollbar3dlightColorProperty = Globals | Color; + export type MozBorderBottomColors = Globals | DataType.Color | "none" | (string & {}); -export type MsScrollbarArrowColorProperty = Globals | Color; + export type MozBorderLeftColors = Globals | DataType.Color | "none" | (string & {}); -export type MsScrollbarBaseColorProperty = Globals | Color; + export type MozBorderRightColors = Globals | DataType.Color | "none" | (string & {}); -export type MsScrollbarDarkshadowColorProperty = Globals | Color; + export type MozBorderTopColors = Globals | DataType.Color | "none" | (string & {}); -export type MsScrollbarFaceColorProperty = Globals | Color; + export type MozContextProperties = Globals | "fill" | "fill-opacity" | "none" | "stroke" | "stroke-opacity" | (string & {}); -export type MsScrollbarHighlightColorProperty = Globals | Color; + export type MozFloatEdge = Globals | "border-box" | "content-box" | "margin-box" | "padding-box"; -export type MsScrollbarShadowColorProperty = Globals | Color; + export type MozForceBrokenImageIcon = Globals | 0 | (string & {}) | 1; -export type MsScrollbarTrackColorProperty = Globals | Color; + export type MozImageRegion = Globals | "auto" | (string & {}); -export type MsTextAutospaceProperty = Globals | "ideograph-alpha" | "ideograph-numeric" | "ideograph-parenthesis" | "ideograph-space" | "none"; + export type MozOrient = Globals | "block" | "horizontal" | "inline" | "vertical"; -export type MsTouchSelectProperty = Globals | "grippers" | "none"; + export type MozOutlineRadius<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type MsUserSelectProperty = Globals | "element" | "none" | "text"; + export type MozOutlineRadiusBottomleft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type MsWrapFlowProperty = Globals | "auto" | "both" | "clear" | "end" | "maximum" | "start"; + export type MozOutlineRadiusBottomright<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type MsWrapMarginProperty<TLength> = Globals | TLength; + export type MozOutlineRadiusTopleft<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type MsWrapThroughProperty = Globals | "none" | "wrap"; + export type MozOutlineRadiusTopright<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type WebkitAppearanceProperty = - | Globals - | "-apple-pay-button" - | "button" - | "button-bevel" - | "caret" - | "checkbox" - | "default-button" - | "inner-spin-button" - | "listbox" - | "listitem" - | "media-controls-background" - | "media-controls-fullscreen-background" - | "media-current-time-display" - | "media-enter-fullscreen-button" - | "media-exit-fullscreen-button" - | "media-fullscreen-button" - | "media-mute-button" - | "media-overlay-play-button" - | "media-play-button" - | "media-seek-back-button" - | "media-seek-forward-button" - | "media-slider" - | "media-sliderthumb" - | "media-time-remaining-display" - | "media-toggle-closed-captions-button" - | "media-volume-slider" - | "media-volume-slider-container" - | "media-volume-sliderthumb" - | "menulist" - | "menulist-button" - | "menulist-text" - | "menulist-textfield" - | "meter" - | "none" - | "progress-bar" - | "progress-bar-value" - | "push-button" - | "radio" - | "searchfield" - | "searchfield-cancel-button" - | "searchfield-decoration" - | "searchfield-results-button" - | "searchfield-results-decoration" - | "slider-horizontal" - | "slider-vertical" - | "sliderthumb-horizontal" - | "sliderthumb-vertical" - | "square-button" - | "textarea" - | "textfield"; + export type MozStackSizing = Globals | "ignore" | "stretch-to-fit"; -export type WebkitBorderBeforeProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; + export type MozTextBlink = Globals | "blink" | "none"; -export type WebkitBorderBeforeColorProperty = Globals | Color; + export type MozUserFocus = Globals | "ignore" | "none" | "normal" | "select-after" | "select-all" | "select-before" | "select-menu" | "select-same"; -export type WebkitBorderBeforeStyleProperty = Globals | LineStyle | string; + export type MozUserInput = Globals | "auto" | "disabled" | "enabled" | "none"; -export type WebkitBorderBeforeWidthProperty<TLength> = Globals | LineWidth<TLength> | string; + export type MozUserModify = Globals | "read-only" | "read-write" | "write-only"; -export type WebkitBoxReflectProperty<TLength> = Globals | TLength | "above" | "below" | "left" | "right" | string; + export type MozWindowDragging = Globals | "drag" | "no-drag"; -export type WebkitLineClampProperty = Globals | "none" | number; + export type MozWindowShadow = Globals | "default" | "menu" | "none" | "sheet" | "tooltip"; -export type WebkitMaskProperty<TLength> = Globals | Position<TLength> | RepeatStyle | Box | "border" | "content" | "none" | "padding" | "text" | string; + export type MsAccelerator = Globals | "false" | "true"; -export type WebkitMaskAttachmentProperty = Globals | Attachment | string; + export type MsBlockProgression = Globals | "bt" | "lr" | "rl" | "tb"; -export type WebkitMaskClipProperty = Globals | Box | "border" | "content" | "padding" | "text" | string; + export type MsContentZoomChaining = Globals | "chained" | "none"; -export type WebkitMaskCompositeProperty = Globals | CompositeStyle | string; + export type MsContentZoomLimit = Globals | (string & {}); -export type WebkitMaskImageProperty = Globals | "none" | string; + export type MsContentZoomLimitMax = Globals | (string & {}); -export type WebkitMaskOriginProperty = Globals | Box | "border" | "content" | "padding" | string; + export type MsContentZoomLimitMin = Globals | (string & {}); -export type WebkitMaskPositionProperty<TLength> = Globals | Position<TLength> | string; + export type MsContentZoomSnap = Globals | "mandatory" | "none" | "proximity" | (string & {}); -export type WebkitMaskPositionXProperty<TLength> = Globals | TLength | "center" | "left" | "right" | string; + export type MsContentZoomSnapPoints = Globals | (string & {}); -export type WebkitMaskPositionYProperty<TLength> = Globals | TLength | "bottom" | "center" | "top" | string; + export type MsContentZoomSnapType = Globals | "mandatory" | "none" | "proximity"; -export type WebkitMaskRepeatProperty = Globals | RepeatStyle | string; + export type MsContentZooming = Globals | "none" | "zoom"; -export type WebkitMaskRepeatXProperty = Globals | "no-repeat" | "repeat" | "round" | "space"; + export type MsFilter = Globals | (string & {}); -export type WebkitMaskRepeatYProperty = Globals | "no-repeat" | "repeat" | "round" | "space"; + export type MsFlowFrom = Globals | "none" | (string & {}); -export type WebkitMaskSizeProperty<TLength> = Globals | BgSize<TLength> | string; + export type MsFlowInto = Globals | "none" | (string & {}); -export type WebkitOverflowScrollingProperty = Globals | "auto" | "touch"; + export type MsGridColumns<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | (string & {}); -export type WebkitTapHighlightColorProperty = Globals | Color; + export type MsGridRows<TLength = (string & {}) | 0> = Globals | DataType.TrackBreadth<TLength> | "none" | (string & {}); -export type WebkitTextFillColorProperty = Globals | Color; + export type MsHighContrastAdjust = Globals | "auto" | "none"; -export type WebkitTextStrokeProperty<TLength> = Globals | Color | TLength | string; + export type MsHyphenateLimitChars = Globals | "auto" | (string & {}) | (number & {}); -export type WebkitTextStrokeColorProperty = Globals | Color; + export type MsHyphenateLimitLines = Globals | "no-limit" | (number & {}) | (string & {}); -export type WebkitTextStrokeWidthProperty<TLength> = Globals | TLength; + export type MsHyphenateLimitZone<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); -export type WebkitTouchCalloutProperty = Globals | "default" | "none"; + export type MsImeAlign = Globals | "after" | "auto"; -export type WebkitUserModifyProperty = Globals | "read-only" | "read-write" | "read-write-plaintext-only"; + export type MsOverflowStyle = Globals | "-ms-autohiding-scrollbar" | "auto" | "none" | "scrollbar"; -export type AlignmentBaselineProperty = - | Globals - | "after-edge" - | "alphabetic" - | "auto" - | "baseline" - | "before-edge" - | "central" - | "hanging" - | "ideographic" - | "mathematical" - | "middle" - | "text-after-edge" - | "text-before-edge"; + export type MsScrollChaining = Globals | "chained" | "none"; -export type BaselineShiftProperty<TLength> = Globals | TLength | "baseline" | "sub" | "super" | string; + export type MsScrollLimit = Globals | (string & {}); -export type ClipRuleProperty = Globals | "evenodd" | "nonzero"; + export type MsScrollLimitXMax<TLength = (string & {}) | 0> = Globals | TLength | "auto"; -export type ColorInterpolationProperty = Globals | "auto" | "linearRGB" | "sRGB"; + export type MsScrollLimitXMin<TLength = (string & {}) | 0> = Globals | TLength; -export type ColorRenderingProperty = Globals | "auto" | "optimizeQuality" | "optimizeSpeed"; + export type MsScrollLimitYMax<TLength = (string & {}) | 0> = Globals | TLength | "auto"; -export type DominantBaselineProperty = - | Globals - | "alphabetic" - | "auto" - | "central" - | "hanging" - | "ideographic" - | "mathematical" - | "middle" - | "no-change" - | "reset-size" - | "text-after-edge" - | "text-before-edge" - | "use-script"; + export type MsScrollLimitYMin<TLength = (string & {}) | 0> = Globals | TLength; -export type FillProperty = Globals | Paint; + export type MsScrollRails = Globals | "none" | "railed"; -export type FillRuleProperty = Globals | "evenodd" | "nonzero"; + export type MsScrollSnapPointsX = Globals | (string & {}); -export type FloodColorProperty = Globals | Color | "currentColor"; + export type MsScrollSnapPointsY = Globals | (string & {}); -export type GlyphOrientationVerticalProperty = Globals | "auto" | string | number; + export type MsScrollSnapType = Globals | "mandatory" | "none" | "proximity"; -export type LightingColorProperty = Globals | Color | "currentColor"; + export type MsScrollSnapX = Globals | (string & {}); -export type MarkerProperty = Globals | "none" | string; + export type MsScrollSnapY = Globals | (string & {}); -export type MarkerEndProperty = Globals | "none" | string; + export type MsScrollTranslation = Globals | "none" | "vertical-to-horizontal"; -export type MarkerMidProperty = Globals | "none" | string; + export type MsScrollbar3dlightColor = Globals | DataType.Color; -export type MarkerStartProperty = Globals | "none" | string; + export type MsScrollbarArrowColor = Globals | DataType.Color; -export type ShapeRenderingProperty = Globals | "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; + export type MsScrollbarBaseColor = Globals | DataType.Color; -export type StopColorProperty = Globals | Color | "currentColor"; + export type MsScrollbarDarkshadowColor = Globals | DataType.Color; -export type StrokeProperty = Globals | Paint; + export type MsScrollbarFaceColor = Globals | DataType.Color; -export type StrokeDasharrayProperty<TLength> = Globals | Dasharray<TLength> | "none"; + export type MsScrollbarHighlightColor = Globals | DataType.Color; -export type StrokeDashoffsetProperty<TLength> = Globals | TLength | string; + export type MsScrollbarShadowColor = Globals | DataType.Color; -export type StrokeLinecapProperty = Globals | "butt" | "round" | "square"; + export type MsScrollbarTrackColor = Globals | DataType.Color; -export type StrokeLinejoinProperty = Globals | "bevel" | "miter" | "round"; + export type MsTextAutospace = Globals | "ideograph-alpha" | "ideograph-numeric" | "ideograph-parenthesis" | "ideograph-space" | "none"; -export type StrokeWidthProperty<TLength> = Globals | TLength | string; + export type MsTouchSelect = Globals | "grippers" | "none"; -export type TextAnchorProperty = Globals | "end" | "middle" | "start"; + export type MsUserSelect = Globals | "element" | "none" | "text"; -export type VectorEffectProperty = Globals | "non-scaling-stroke" | "none"; + export type MsWrapFlow = Globals | "auto" | "both" | "clear" | "end" | "maximum" | "start"; -type CounterStyleRangeProperty = "auto" | "infinite" | string | number; + export type MsWrapMargin<TLength = (string & {}) | 0> = Globals | TLength; -type CounterStyleSpeakAsProperty = "auto" | "bullets" | "numbers" | "spell-out" | "words" | string; + export type MsWrapThrough = Globals | "none" | "wrap"; -type CounterStyleSystemProperty = "additive" | "alphabetic" | "cyclic" | "fixed" | "numeric" | "symbolic" | string; + export type WebkitAppearance = + | Globals + | "-apple-pay-button" + | "button" + | "button-bevel" + | "caret" + | "checkbox" + | "default-button" + | "inner-spin-button" + | "listbox" + | "listitem" + | "media-controls-background" + | "media-controls-fullscreen-background" + | "media-current-time-display" + | "media-enter-fullscreen-button" + | "media-exit-fullscreen-button" + | "media-fullscreen-button" + | "media-mute-button" + | "media-overlay-play-button" + | "media-play-button" + | "media-seek-back-button" + | "media-seek-forward-button" + | "media-slider" + | "media-sliderthumb" + | "media-time-remaining-display" + | "media-toggle-closed-captions-button" + | "media-volume-slider" + | "media-volume-slider-container" + | "media-volume-sliderthumb" + | "menulist" + | "menulist-button" + | "menulist-text" + | "menulist-textfield" + | "meter" + | "none" + | "progress-bar" + | "progress-bar-value" + | "push-button" + | "radio" + | "searchfield" + | "searchfield-cancel-button" + | "searchfield-decoration" + | "searchfield-results-button" + | "searchfield-results-decoration" + | "slider-horizontal" + | "slider-vertical" + | "sliderthumb-horizontal" + | "sliderthumb-vertical" + | "square-button" + | "textarea" + | "textfield"; -type FontFaceFontFeatureSettingsProperty = "normal" | string; + export type WebkitBorderBefore<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | DataType.LineStyle | DataType.Color | (string & {}); -type FontFaceAscentOverrideProperty = "normal" | string; + export type WebkitBorderBeforeColor = Globals | DataType.Color; -type FontFaceDescentOverrideProperty = "normal" | string; + export type WebkitBorderBeforeStyle = Globals | DataType.LineStyle | (string & {}); -type FontFaceFontDisplayProperty = "auto" | "block" | "fallback" | "optional" | "swap"; + export type WebkitBorderBeforeWidth<TLength = (string & {}) | 0> = Globals | DataType.LineWidth<TLength> | (string & {}); -type FontFaceFontStretchProperty = FontStretchAbsolute | string; + export type WebkitBoxReflect<TLength = (string & {}) | 0> = Globals | TLength | "above" | "below" | "left" | "right" | (string & {}); -type FontFaceFontStyleProperty = "italic" | "normal" | "oblique" | string; + export type WebkitLineClamp = Globals | "none" | (number & {}) | (string & {}); -type FontFaceFontVariantProperty = - | EastAsianVariantValues - | "all-petite-caps" - | "all-small-caps" - | "common-ligatures" - | "contextual" - | "diagonal-fractions" - | "discretionary-ligatures" - | "full-width" - | "historical-forms" - | "historical-ligatures" - | "lining-nums" - | "no-common-ligatures" - | "no-contextual" - | "no-discretionary-ligatures" - | "no-historical-ligatures" - | "none" - | "normal" - | "oldstyle-nums" - | "ordinal" - | "petite-caps" - | "proportional-nums" - | "proportional-width" - | "ruby" - | "slashed-zero" - | "small-caps" - | "stacked-fractions" - | "tabular-nums" - | "titling-caps" - | "unicase" - | string; + export type WebkitMask<TLength = (string & {}) | 0> = + | Globals + | DataType.Position<TLength> + | DataType.RepeatStyle + | DataType.Box + | "border" + | "content" + | "none" + | "padding" + | "text" + | (string & {}); -type FontFaceFontVariationSettingsProperty = "normal" | string; + export type WebkitMaskAttachment = Globals | DataType.Attachment | (string & {}); -type FontFaceFontWeightProperty = FontWeightAbsolute | string; + export type WebkitMaskClip = Globals | DataType.Box | "border" | "content" | "padding" | "text" | (string & {}); -type FontFaceLineGapOverrideProperty = "normal" | string; + export type WebkitMaskComposite = Globals | DataType.CompositeStyle | (string & {}); -type PageBleedProperty<TLength> = TLength | "auto"; + export type WebkitMaskImage = Globals | "none" | (string & {}); -type PageMarksProperty = "crop" | "cross" | "none" | string; + export type WebkitMaskOrigin = Globals | DataType.Box | "border" | "content" | "padding" | (string & {}); -type PageSizeProperty<TLength> = PageSize | TLength | "auto" | "landscape" | "portrait" | string; + export type WebkitMaskPosition<TLength = (string & {}) | 0> = Globals | DataType.Position<TLength> | (string & {}); -type PropertyInheritsProperty = "false" | "true"; + export type WebkitMaskPositionX<TLength = (string & {}) | 0> = Globals | TLength | "center" | "left" | "right" | (string & {}); -type ViewportHeightProperty<TLength> = ViewportLength<TLength> | string; + export type WebkitMaskPositionY<TLength = (string & {}) | 0> = Globals | TLength | "bottom" | "center" | "top" | (string & {}); -type ViewportMaxHeightProperty<TLength> = ViewportLength<TLength>; + export type WebkitMaskRepeat = Globals | DataType.RepeatStyle | (string & {}); -type ViewportMaxWidthProperty<TLength> = ViewportLength<TLength>; + export type WebkitMaskRepeatX = Globals | "no-repeat" | "repeat" | "round" | "space"; -type ViewportMaxZoomProperty = "auto" | string | number; + export type WebkitMaskRepeatY = Globals | "no-repeat" | "repeat" | "round" | "space"; -type ViewportMinHeightProperty<TLength> = ViewportLength<TLength>; + export type WebkitMaskSize<TLength = (string & {}) | 0> = Globals | DataType.BgSize<TLength> | (string & {}); -type ViewportMinWidthProperty<TLength> = ViewportLength<TLength>; + export type WebkitOverflowScrolling = Globals | "auto" | "touch"; -type ViewportMinZoomProperty = "auto" | string | number; + export type WebkitTapHighlightColor = Globals | DataType.Color; -type ViewportOrientationProperty = "auto" | "landscape" | "portrait"; + export type WebkitTextFillColor = Globals | DataType.Color; -type ViewportUserZoomProperty = "fixed" | "zoom"; + export type WebkitTextStroke<TLength = (string & {}) | 0> = Globals | DataType.Color | TLength | (string & {}); -type ViewportViewportFitProperty = "auto" | "contain" | "cover"; + export type WebkitTextStrokeColor = Globals | DataType.Color; -type ViewportWidthProperty<TLength> = ViewportLength<TLength> | string; + export type WebkitTextStrokeWidth<TLength = (string & {}) | 0> = Globals | TLength; -type ViewportZoomProperty = "auto" | string | number; + export type WebkitTouchCallout = Globals | "default" | "none"; -type AbsoluteSize = "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large"; + export type WebkitUserModify = Globals | "read-only" | "read-write" | "read-write-plaintext-only"; -type AnimateableFeature = "contents" | "scroll-position" | string; + export type AlignmentBaseline = + | Globals + | "after-edge" + | "alphabetic" + | "auto" + | "baseline" + | "before-edge" + | "central" + | "hanging" + | "ideographic" + | "mathematical" + | "middle" + | "text-after-edge" + | "text-before-edge"; -type Attachment = "fixed" | "local" | "scroll"; + export type BaselineShift<TLength = (string & {}) | 0> = Globals | TLength | "baseline" | "sub" | "super" | (string & {}); -type BgPosition<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; + export type ClipRule = Globals | "evenodd" | "nonzero"; -type BgSize<TLength> = TLength | "auto" | "contain" | "cover" | string; - -type BlendMode = - | "color" - | "color-burn" - | "color-dodge" - | "darken" - | "difference" - | "exclusion" - | "hard-light" - | "hue" - | "lighten" - | "luminosity" - | "multiply" - | "normal" - | "overlay" - | "saturation" - | "screen" - | "soft-light"; - -type Box = "border-box" | "content-box" | "padding-box"; - -type Color = NamedColor | DeprecatedSystemColor | "currentcolor" | string; - -type CompatAuto = - | "button" - | "checkbox" - | "listbox" - | "menulist" - | "meter" - | "progress-bar" - | "push-button" - | "radio" - | "searchfield" - | "slider-horizontal" - | "square-button" - | "textarea"; - -type CompositeStyle = - | "clear" - | "copy" - | "destination-atop" - | "destination-in" - | "destination-out" - | "destination-over" - | "source-atop" - | "source-in" - | "source-out" - | "source-over" - | "xor"; + export type ColorInterpolation = Globals | "auto" | "linearRGB" | "sRGB"; -type CompositingOperator = "add" | "exclude" | "intersect" | "subtract"; + export type ColorRendering = Globals | "auto" | "optimizeQuality" | "optimizeSpeed"; -type ContentDistribution = "space-around" | "space-between" | "space-evenly" | "stretch"; + export type DominantBaseline = + | Globals + | "alphabetic" + | "auto" + | "central" + | "hanging" + | "ideographic" + | "mathematical" + | "middle" + | "no-change" + | "reset-size" + | "text-after-edge" + | "text-before-edge" + | "use-script"; -type ContentList = Quote | "contents" | string; + export type Fill = Globals | DataType.Paint; -type ContentPosition = "center" | "end" | "flex-end" | "flex-start" | "start"; + export type FillOpacity = Globals | (number & {}) | (string & {}); -type CubicBezierTimingFunction = "ease" | "ease-in" | "ease-in-out" | "ease-out" | string; - -type Dasharray<TLength> = TLength | string | number; - -type DeprecatedSystemColor = - | "ActiveBorder" - | "ActiveCaption" - | "AppWorkspace" - | "Background" - | "ButtonFace" - | "ButtonHighlight" - | "ButtonShadow" - | "ButtonText" - | "CaptionText" - | "GrayText" - | "Highlight" - | "HighlightText" - | "InactiveBorder" - | "InactiveCaption" - | "InactiveCaptionText" - | "InfoBackground" - | "InfoText" - | "Menu" - | "MenuText" - | "Scrollbar" - | "ThreeDDarkShadow" - | "ThreeDFace" - | "ThreeDHighlight" - | "ThreeDLightShadow" - | "ThreeDShadow" - | "Window" - | "WindowFrame" - | "WindowText"; - -type DisplayInside = "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "grid" | "ruby" | "table"; - -type DisplayInternal = - | "ruby-base" - | "ruby-base-container" - | "ruby-text" - | "ruby-text-container" - | "table-caption" - | "table-cell" - | "table-column" - | "table-column-group" - | "table-footer-group" - | "table-header-group" - | "table-row" - | "table-row-group"; - -type DisplayLegacy = "-ms-inline-flexbox" | "-ms-inline-grid" | "-webkit-inline-flex" | "inline-block" | "inline-flex" | "inline-grid" | "inline-list-item" | "inline-table"; - -type DisplayOutside = "block" | "inline" | "run-in"; - -type EasingFunction = CubicBezierTimingFunction | StepTimingFunction | "linear"; - -type EastAsianVariantValues = "jis04" | "jis78" | "jis83" | "jis90" | "simplified" | "traditional"; - -type FinalBgLayer<TLength> = Color | BgPosition<TLength> | RepeatStyle | Attachment | Box | "none" | string; - -type FontStretchAbsolute = - | "condensed" - | "expanded" - | "extra-condensed" - | "extra-expanded" - | "normal" - | "semi-condensed" - | "semi-expanded" - | "ultra-condensed" - | "ultra-expanded" - | string; - -type FontWeightAbsolute = "bold" | "normal" | number; - -type GenericFamily = "cursive" | "fantasy" | "monospace" | "sans-serif" | "serif"; - -type GeometryBox = Box | "fill-box" | "margin-box" | "stroke-box" | "view-box"; - -type GridLine = "auto" | string | number; - -type LineStyle = "dashed" | "dotted" | "double" | "groove" | "hidden" | "inset" | "none" | "outset" | "ridge" | "solid"; - -type LineWidth<TLength> = TLength | "medium" | "thick" | "thin"; - -type MaskLayer<TLength> = Position<TLength> | RepeatStyle | GeometryBox | CompositingOperator | MaskingMode | "no-clip" | "none" | string; - -type MaskingMode = "alpha" | "luminance" | "match-source"; - -type NamedColor = - | "aliceblue" - | "antiquewhite" - | "aqua" - | "aquamarine" - | "azure" - | "beige" - | "bisque" - | "black" - | "blanchedalmond" - | "blue" - | "blueviolet" - | "brown" - | "burlywood" - | "cadetblue" - | "chartreuse" - | "chocolate" - | "coral" - | "cornflowerblue" - | "cornsilk" - | "crimson" - | "cyan" - | "darkblue" - | "darkcyan" - | "darkgoldenrod" - | "darkgray" - | "darkgreen" - | "darkgrey" - | "darkkhaki" - | "darkmagenta" - | "darkolivegreen" - | "darkorange" - | "darkorchid" - | "darkred" - | "darksalmon" - | "darkseagreen" - | "darkslateblue" - | "darkslategray" - | "darkslategrey" - | "darkturquoise" - | "darkviolet" - | "deeppink" - | "deepskyblue" - | "dimgray" - | "dimgrey" - | "dodgerblue" - | "firebrick" - | "floralwhite" - | "forestgreen" - | "fuchsia" - | "gainsboro" - | "ghostwhite" - | "gold" - | "goldenrod" - | "gray" - | "green" - | "greenyellow" - | "grey" - | "honeydew" - | "hotpink" - | "indianred" - | "indigo" - | "ivory" - | "khaki" - | "lavender" - | "lavenderblush" - | "lawngreen" - | "lemonchiffon" - | "lightblue" - | "lightcoral" - | "lightcyan" - | "lightgoldenrodyellow" - | "lightgray" - | "lightgreen" - | "lightgrey" - | "lightpink" - | "lightsalmon" - | "lightseagreen" - | "lightskyblue" - | "lightslategray" - | "lightslategrey" - | "lightsteelblue" - | "lightyellow" - | "lime" - | "limegreen" - | "linen" - | "magenta" - | "maroon" - | "mediumaquamarine" - | "mediumblue" - | "mediumorchid" - | "mediumpurple" - | "mediumseagreen" - | "mediumslateblue" - | "mediumspringgreen" - | "mediumturquoise" - | "mediumvioletred" - | "midnightblue" - | "mintcream" - | "mistyrose" - | "moccasin" - | "navajowhite" - | "navy" - | "oldlace" - | "olive" - | "olivedrab" - | "orange" - | "orangered" - | "orchid" - | "palegoldenrod" - | "palegreen" - | "paleturquoise" - | "palevioletred" - | "papayawhip" - | "peachpuff" - | "peru" - | "pink" - | "plum" - | "powderblue" - | "purple" - | "rebeccapurple" - | "red" - | "rosybrown" - | "royalblue" - | "saddlebrown" - | "salmon" - | "sandybrown" - | "seagreen" - | "seashell" - | "sienna" - | "silver" - | "skyblue" - | "slateblue" - | "slategray" - | "slategrey" - | "snow" - | "springgreen" - | "steelblue" - | "tan" - | "teal" - | "thistle" - | "tomato" - | "transparent" - | "turquoise" - | "violet" - | "wheat" - | "white" - | "whitesmoke" - | "yellow" - | "yellowgreen"; - -type PageSize = "A3" | "A4" | "A5" | "B4" | "B5" | "JIS-B4" | "JIS-B5" | "ledger" | "legal" | "letter"; - -type Paint = Color | "child" | "context-fill" | "context-stroke" | "none" | string; - -type Position<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; - -type Quote = "close-quote" | "no-close-quote" | "no-open-quote" | "open-quote"; - -type RepeatStyle = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space" | string; - -type SelfPosition = "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start"; - -type SingleAnimation = EasingFunction | SingleAnimationDirection | SingleAnimationFillMode | "infinite" | "none" | "paused" | "running" | string | number; - -type SingleAnimationDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; - -type SingleAnimationFillMode = "backwards" | "both" | "forwards" | "none"; - -type SingleAnimationTimeline = "auto" | "none" | string; - -type SingleTransition = EasingFunction | "all" | "none" | string; - -type StepTimingFunction = "step-end" | "step-start" | string; - -type TrackBreadth<TLength> = TLength | "auto" | "max-content" | "min-content" | string; - -type ViewportLength<TLength> = TLength | "auto" | string; - -type VisualBox = "border-box" | "content-box" | "padding-box"; + export type FillRule = Globals | "evenodd" | "nonzero"; + + export type FloodColor = Globals | DataType.Color | "currentColor"; + + export type FloodOpacity = Globals | (number & {}) | (string & {}); + + export type GlyphOrientationVertical = Globals | "auto" | (string & {}) | (number & {}); + + export type LightingColor = Globals | DataType.Color | "currentColor"; + + export type Marker = Globals | "none" | (string & {}); + + export type MarkerEnd = Globals | "none" | (string & {}); + + export type MarkerMid = Globals | "none" | (string & {}); + + export type MarkerStart = Globals | "none" | (string & {}); + + export type ShapeRendering = Globals | "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; + + export type StopColor = Globals | DataType.Color | "currentColor"; + + export type StopOpacity = Globals | (number & {}) | (string & {}); + + export type Stroke = Globals | DataType.Paint; + + export type StrokeDasharray<TLength = (string & {}) | 0> = Globals | DataType.Dasharray<TLength> | "none"; + + export type StrokeDashoffset<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type StrokeLinecap = Globals | "butt" | "round" | "square"; + + export type StrokeLinejoin = Globals | "bevel" | "miter" | "round"; + + export type StrokeMiterlimit = Globals | (number & {}) | (string & {}); + + export type StrokeOpacity = Globals | (number & {}) | (string & {}); + + export type StrokeWidth<TLength = (string & {}) | 0> = Globals | TLength | (string & {}); + + export type TextAnchor = Globals | "end" | "middle" | "start"; + + export type VectorEffect = Globals | "non-scaling-stroke" | "none"; +} + +export namespace AtRule { + export interface CounterStyle<TLength = (string & {}) | 0, TTime = string & {}> { + additiveSymbols?: string | undefined; + fallback?: string | undefined; + negative?: string | undefined; + pad?: string | undefined; + prefix?: string | undefined; + range?: Range | undefined; + speakAs?: SpeakAs | undefined; + suffix?: string | undefined; + symbols?: string | undefined; + system?: System | undefined; + } + + export interface CounterStyleHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + "additive-symbols"?: string | undefined; + fallback?: string | undefined; + negative?: string | undefined; + pad?: string | undefined; + prefix?: string | undefined; + range?: Range | undefined; + "speak-as"?: SpeakAs | undefined; + suffix?: string | undefined; + symbols?: string | undefined; + system?: System | undefined; + } + + export type CounterStyleFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<CounterStyle<TLength, TTime>>; + + export type CounterStyleHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<CounterStyleHyphen<TLength, TTime>>; + + export interface FontFace<TLength = (string & {}) | 0, TTime = string & {}> { + MozFontFeatureSettings?: FontFeatureSettings | undefined; + ascentOverride?: AscentOverride | undefined; + descentOverride?: DescentOverride | undefined; + fontDisplay?: FontDisplay | undefined; + fontFamily?: string | undefined; + fontFeatureSettings?: FontFeatureSettings | undefined; + fontStretch?: FontStretch | undefined; + fontStyle?: FontStyle | undefined; + fontVariant?: FontVariant | undefined; + fontVariationSettings?: FontVariationSettings | undefined; + fontWeight?: FontWeight | undefined; + lineGapOverride?: LineGapOverride | undefined; + sizeAdjust?: string | undefined; + src?: string | undefined; + unicodeRange?: string | undefined; + } + + export interface FontFaceHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + "-moz-font-feature-settings"?: FontFeatureSettings | undefined; + "ascent-override"?: AscentOverride | undefined; + "descent-override"?: DescentOverride | undefined; + "font-display"?: FontDisplay | undefined; + "font-family"?: string | undefined; + "font-feature-settings"?: FontFeatureSettings | undefined; + "font-stretch"?: FontStretch | undefined; + "font-style"?: FontStyle | undefined; + "font-variant"?: FontVariant | undefined; + "font-variation-settings"?: FontVariationSettings | undefined; + "font-weight"?: FontWeight | undefined; + "line-gap-override"?: LineGapOverride | undefined; + "size-adjust"?: string | undefined; + src?: string | undefined; + "unicode-range"?: string | undefined; + } + + export type FontFaceFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontFace<TLength, TTime>>; + + export type FontFaceHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontFaceHyphen<TLength, TTime>>; + + export interface FontPaletteValues<TLength = (string & {}) | 0, TTime = string & {}> { + basePalette?: BasePalette | undefined; + fontFamily?: string | undefined; + overrideColors?: string | undefined; + } + + export interface FontPaletteValuesHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + "base-palette"?: BasePalette | undefined; + "font-family"?: string | undefined; + "override-colors"?: string | undefined; + } + + export type FontPaletteValuesFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontPaletteValues<TLength, TTime>>; + + export type FontPaletteValuesHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<FontPaletteValuesHyphen<TLength, TTime>>; + + export interface Page<TLength = (string & {}) | 0, TTime = string & {}> { + bleed?: Bleed<TLength> | undefined; + marks?: Marks | undefined; + pageOrientation?: PageOrientation | undefined; + size?: Size<TLength> | undefined; + } + + export interface PageHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + bleed?: Bleed<TLength> | undefined; + marks?: Marks | undefined; + "page-orientation"?: PageOrientation | undefined; + size?: Size<TLength> | undefined; + } + + export type PageFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Page<TLength, TTime>>; + + export type PageHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<PageHyphen<TLength, TTime>>; + + export interface Property<TLength = (string & {}) | 0, TTime = string & {}> { + inherits?: Inherits | undefined; + initialValue?: string | undefined; + syntax?: string | undefined; + } + + export interface PropertyHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + inherits?: Inherits | undefined; + "initial-value"?: string | undefined; + syntax?: string | undefined; + } + + export type PropertyFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Property<TLength, TTime>>; + + export type PropertyHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<PropertyHyphen<TLength, TTime>>; + + export interface Viewport<TLength = (string & {}) | 0, TTime = string & {}> { + height?: Height<TLength> | undefined; + maxHeight?: MaxHeight<TLength> | undefined; + maxWidth?: MaxWidth<TLength> | undefined; + maxZoom?: MaxZoom | undefined; + minHeight?: MinHeight<TLength> | undefined; + minWidth?: MinWidth<TLength> | undefined; + minZoom?: MinZoom | undefined; + orientation?: Orientation | undefined; + userZoom?: UserZoom | undefined; + viewportFit?: ViewportFit | undefined; + width?: Width<TLength> | undefined; + zoom?: Zoom | undefined; + } + + export interface ViewportHyphen<TLength = (string & {}) | 0, TTime = string & {}> { + height?: Height<TLength> | undefined; + "max-height"?: MaxHeight<TLength> | undefined; + "max-width"?: MaxWidth<TLength> | undefined; + "max-zoom"?: MaxZoom | undefined; + "min-height"?: MinHeight<TLength> | undefined; + "min-width"?: MinWidth<TLength> | undefined; + "min-zoom"?: MinZoom | undefined; + orientation?: Orientation | undefined; + "user-zoom"?: UserZoom | undefined; + "viewport-fit"?: ViewportFit | undefined; + width?: Width<TLength> | undefined; + zoom?: Zoom | undefined; + } + + export type ViewportFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<Viewport<TLength, TTime>>; + + export type ViewportHyphenFallback<TLength = (string & {}) | 0, TTime = string & {}> = Fallback<ViewportHyphen<TLength, TTime>>; + + type Range = "auto" | (string & {}); + + type SpeakAs = "auto" | "bullets" | "numbers" | "spell-out" | "words" | (string & {}); + + type System = "additive" | "alphabetic" | "cyclic" | "fixed" | "numeric" | "symbolic" | (string & {}); + + type FontFeatureSettings = "normal" | (string & {}); + + type AscentOverride = "normal" | (string & {}); + + type DescentOverride = "normal" | (string & {}); + + type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; + + type FontStretch = DataType.FontStretchAbsolute | (string & {}); + + type FontStyle = "italic" | "normal" | "oblique" | (string & {}); + + type FontVariant = + | DataType.EastAsianVariantValues + | "all-petite-caps" + | "all-small-caps" + | "common-ligatures" + | "contextual" + | "diagonal-fractions" + | "discretionary-ligatures" + | "full-width" + | "historical-forms" + | "historical-ligatures" + | "lining-nums" + | "no-common-ligatures" + | "no-contextual" + | "no-discretionary-ligatures" + | "no-historical-ligatures" + | "none" + | "normal" + | "oldstyle-nums" + | "ordinal" + | "petite-caps" + | "proportional-nums" + | "proportional-width" + | "ruby" + | "slashed-zero" + | "small-caps" + | "stacked-fractions" + | "tabular-nums" + | "titling-caps" + | "unicase" + | (string & {}); + + type FontVariationSettings = "normal" | (string & {}); + + type FontWeight = DataType.FontWeightAbsolute | (string & {}); + + type LineGapOverride = "normal" | (string & {}); + + type BasePalette = "dark" | "light" | (number & {}) | (string & {}); + + type Bleed<TLength> = TLength | "auto"; + + type Marks = "crop" | "cross" | "none" | (string & {}); + + type PageOrientation = "rotate-left" | "rotate-right" | "upright"; + + type Size<TLength> = DataType.PageSize | TLength | "auto" | "landscape" | "portrait" | (string & {}); + + type Inherits = "false" | "true"; + + type Height<TLength> = DataType.ViewportLength<TLength> | (string & {}); + + type MaxHeight<TLength> = DataType.ViewportLength<TLength>; + + type MaxWidth<TLength> = DataType.ViewportLength<TLength>; + + type MaxZoom = "auto" | (string & {}) | (number & {}); + + type MinHeight<TLength> = DataType.ViewportLength<TLength>; + + type MinWidth<TLength> = DataType.ViewportLength<TLength>; + + type MinZoom = "auto" | (string & {}) | (number & {}); + + type Orientation = "auto" | "landscape" | "portrait"; + + type UserZoom = "fixed" | "zoom"; + + type ViewportFit = "auto" | "contain" | "cover"; + + type Width<TLength> = DataType.ViewportLength<TLength> | (string & {}); + + type Zoom = "auto" | (string & {}) | (number & {}); +} + +/** + * **Attention!** Data types receives its name from the spec. E.g. `<color>` becomes `DataType.Color` and + * `<content-distribution>` becomes `DataType.ContentDistribution`. It happens quite frequent that these data types + * are split into several data types or/and name changes as the spec develops. So there's a risk that a minor/patch + * update from `csstype` can break your typing if you're using the `DataType` namespace. + */ +export namespace DataType { + type AbsoluteSize = "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large"; + + type AnimateableFeature = "contents" | "scroll-position" | (string & {}); + + type Attachment = "fixed" | "local" | "scroll"; + + type BgPosition<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); + + type BgSize<TLength> = TLength | "auto" | "contain" | "cover" | (string & {}); + + type BlendMode = + | "color" + | "color-burn" + | "color-dodge" + | "darken" + | "difference" + | "exclusion" + | "hard-light" + | "hue" + | "lighten" + | "luminosity" + | "multiply" + | "normal" + | "overlay" + | "saturation" + | "screen" + | "soft-light"; + + type Box = "border-box" | "content-box" | "padding-box"; + + type Color = NamedColor | DeprecatedSystemColor | "currentcolor" | (string & {}); + + type CompatAuto = + | "button" + | "checkbox" + | "listbox" + | "menulist" + | "meter" + | "progress-bar" + | "push-button" + | "radio" + | "searchfield" + | "slider-horizontal" + | "square-button" + | "textarea"; + + type CompositeStyle = + | "clear" + | "copy" + | "destination-atop" + | "destination-in" + | "destination-out" + | "destination-over" + | "source-atop" + | "source-in" + | "source-out" + | "source-over" + | "xor"; + + type CompositingOperator = "add" | "exclude" | "intersect" | "subtract"; + + type ContentDistribution = "space-around" | "space-between" | "space-evenly" | "stretch"; + + type ContentList = Quote | "contents" | (string & {}); + + type ContentPosition = "center" | "end" | "flex-end" | "flex-start" | "start"; + + type CubicBezierTimingFunction = "ease" | "ease-in" | "ease-in-out" | "ease-out" | (string & {}); + + type Dasharray<TLength> = TLength | (string & {}) | (number & {}); + + type DeprecatedSystemColor = + | "ActiveBorder" + | "ActiveCaption" + | "AppWorkspace" + | "Background" + | "ButtonFace" + | "ButtonHighlight" + | "ButtonShadow" + | "ButtonText" + | "CaptionText" + | "GrayText" + | "Highlight" + | "HighlightText" + | "InactiveBorder" + | "InactiveCaption" + | "InactiveCaptionText" + | "InfoBackground" + | "InfoText" + | "Menu" + | "MenuText" + | "Scrollbar" + | "ThreeDDarkShadow" + | "ThreeDFace" + | "ThreeDHighlight" + | "ThreeDLightShadow" + | "ThreeDShadow" + | "Window" + | "WindowFrame" + | "WindowText"; + + type DisplayInside = "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "grid" | "ruby" | "table"; + + type DisplayInternal = + | "ruby-base" + | "ruby-base-container" + | "ruby-text" + | "ruby-text-container" + | "table-caption" + | "table-cell" + | "table-column" + | "table-column-group" + | "table-footer-group" + | "table-header-group" + | "table-row" + | "table-row-group"; + + type DisplayLegacy = "-ms-inline-flexbox" | "-ms-inline-grid" | "-webkit-inline-flex" | "inline-block" | "inline-flex" | "inline-grid" | "inline-list-item" | "inline-table"; + + type DisplayOutside = "block" | "inline" | "run-in"; + + type EasingFunction = CubicBezierTimingFunction | StepTimingFunction | "linear"; + + type EastAsianVariantValues = "jis04" | "jis78" | "jis83" | "jis90" | "simplified" | "traditional"; + + type FinalBgLayer<TLength> = Color | BgPosition<TLength> | RepeatStyle | Attachment | Box | "none" | (string & {}); + + type FontStretchAbsolute = + | "condensed" + | "expanded" + | "extra-condensed" + | "extra-expanded" + | "normal" + | "semi-condensed" + | "semi-expanded" + | "ultra-condensed" + | "ultra-expanded" + | (string & {}); + + type FontWeightAbsolute = "bold" | "normal" | (number & {}) | (string & {}); + + type GenericFamily = "cursive" | "fantasy" | "monospace" | "sans-serif" | "serif"; + + type GeometryBox = Box | "fill-box" | "margin-box" | "stroke-box" | "view-box"; + + type GridLine = "auto" | (string & {}) | (number & {}); + + type LineStyle = "dashed" | "dotted" | "double" | "groove" | "hidden" | "inset" | "none" | "outset" | "ridge" | "solid"; + + type LineWidth<TLength> = TLength | "medium" | "thick" | "thin"; + + type MaskLayer<TLength> = Position<TLength> | RepeatStyle | GeometryBox | CompositingOperator | MaskingMode | "no-clip" | "none" | (string & {}); + + type MaskingMode = "alpha" | "luminance" | "match-source"; + + type NamedColor = + | "aliceblue" + | "antiquewhite" + | "aqua" + | "aquamarine" + | "azure" + | "beige" + | "bisque" + | "black" + | "blanchedalmond" + | "blue" + | "blueviolet" + | "brown" + | "burlywood" + | "cadetblue" + | "chartreuse" + | "chocolate" + | "coral" + | "cornflowerblue" + | "cornsilk" + | "crimson" + | "cyan" + | "darkblue" + | "darkcyan" + | "darkgoldenrod" + | "darkgray" + | "darkgreen" + | "darkgrey" + | "darkkhaki" + | "darkmagenta" + | "darkolivegreen" + | "darkorange" + | "darkorchid" + | "darkred" + | "darksalmon" + | "darkseagreen" + | "darkslateblue" + | "darkslategray" + | "darkslategrey" + | "darkturquoise" + | "darkviolet" + | "deeppink" + | "deepskyblue" + | "dimgray" + | "dimgrey" + | "dodgerblue" + | "firebrick" + | "floralwhite" + | "forestgreen" + | "fuchsia" + | "gainsboro" + | "ghostwhite" + | "gold" + | "goldenrod" + | "gray" + | "green" + | "greenyellow" + | "grey" + | "honeydew" + | "hotpink" + | "indianred" + | "indigo" + | "ivory" + | "khaki" + | "lavender" + | "lavenderblush" + | "lawngreen" + | "lemonchiffon" + | "lightblue" + | "lightcoral" + | "lightcyan" + | "lightgoldenrodyellow" + | "lightgray" + | "lightgreen" + | "lightgrey" + | "lightpink" + | "lightsalmon" + | "lightseagreen" + | "lightskyblue" + | "lightslategray" + | "lightslategrey" + | "lightsteelblue" + | "lightyellow" + | "lime" + | "limegreen" + | "linen" + | "magenta" + | "maroon" + | "mediumaquamarine" + | "mediumblue" + | "mediumorchid" + | "mediumpurple" + | "mediumseagreen" + | "mediumslateblue" + | "mediumspringgreen" + | "mediumturquoise" + | "mediumvioletred" + | "midnightblue" + | "mintcream" + | "mistyrose" + | "moccasin" + | "navajowhite" + | "navy" + | "oldlace" + | "olive" + | "olivedrab" + | "orange" + | "orangered" + | "orchid" + | "palegoldenrod" + | "palegreen" + | "paleturquoise" + | "palevioletred" + | "papayawhip" + | "peachpuff" + | "peru" + | "pink" + | "plum" + | "powderblue" + | "purple" + | "rebeccapurple" + | "red" + | "rosybrown" + | "royalblue" + | "saddlebrown" + | "salmon" + | "sandybrown" + | "seagreen" + | "seashell" + | "sienna" + | "silver" + | "skyblue" + | "slateblue" + | "slategray" + | "slategrey" + | "snow" + | "springgreen" + | "steelblue" + | "tan" + | "teal" + | "thistle" + | "tomato" + | "transparent" + | "turquoise" + | "violet" + | "wheat" + | "white" + | "whitesmoke" + | "yellow" + | "yellowgreen"; + + type PageSize = "A3" | "A4" | "A5" | "B4" | "B5" | "JIS-B4" | "JIS-B5" | "ledger" | "legal" | "letter"; + + type Paint = Color | "child" | "context-fill" | "context-stroke" | "none" | (string & {}); + + type Position<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | (string & {}); + + type Quote = "close-quote" | "no-close-quote" | "no-open-quote" | "open-quote"; + + type RepeatStyle = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space" | (string & {}); + + type SelfPosition = "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start"; + + type SingleAnimation<TTime> = + | EasingFunction + | SingleAnimationDirection + | SingleAnimationFillMode + | SingleAnimationTimeline + | TTime + | "infinite" + | "none" + | "paused" + | "running" + | (string & {}) + | (number & {}); + + type SingleAnimationComposition = "accumulate" | "add" | "replace"; + + type SingleAnimationDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; + + type SingleAnimationFillMode = "backwards" | "both" | "forwards" | "none"; + + type SingleAnimationTimeline = "auto" | "none" | (string & {}); + + type SingleTransition<TTime> = EasingFunction | TTime | "all" | "allow-discrete" | "none" | "normal" | (string & {}); + + type StepTimingFunction = "step-end" | "step-start" | (string & {}); + + type TimelineRangeName = "contain" | "cover" | "entry" | "entry-crossing" | "exit" | "exit-crossing"; + + type TrackBreadth<TLength> = TLength | "auto" | "max-content" | "min-content" | (string & {}); + + type ViewportLength<TLength> = TLength | "auto" | (string & {}); + + type VisualBox = "border-box" | "content-box" | "padding-box"; +} diff --git a/node_modules/csstype/index.js.flow b/node_modules/csstype/index.js.flow index 4ccf2eb1..0b45a320 100644 --- a/node_modules/csstype/index.js.flow +++ b/node_modules/csstype/index.js.flow @@ -1,3612 +1,3558 @@ -// @flow -export type StandardLonghandProperties<TLength = string | 0> = { - accentColor?: AccentColorProperty, - alignContent?: AlignContentProperty, - alignItems?: AlignItemsProperty, - alignSelf?: AlignSelfProperty, - alignTracks?: AlignTracksProperty, - animationComposition?: GlobalsString, - animationDelay?: GlobalsString, - animationDirection?: AnimationDirectionProperty, - animationDuration?: GlobalsString, - animationFillMode?: AnimationFillModeProperty, - animationIterationCount?: AnimationIterationCountProperty, - animationName?: AnimationNameProperty, - animationPlayState?: AnimationPlayStateProperty, - animationTimeline?: AnimationTimelineProperty, - animationTimingFunction?: AnimationTimingFunctionProperty, - appearance?: AppearanceProperty, - aspectRatio?: AspectRatioProperty, - backdropFilter?: BackdropFilterProperty, - backfaceVisibility?: BackfaceVisibilityProperty, - backgroundAttachment?: BackgroundAttachmentProperty, - backgroundBlendMode?: BackgroundBlendModeProperty, - backgroundClip?: BackgroundClipProperty, - backgroundColor?: BackgroundColorProperty, - backgroundImage?: BackgroundImageProperty, - backgroundOrigin?: BackgroundOriginProperty, - backgroundPositionX?: BackgroundPositionXProperty<TLength>, - backgroundPositionY?: BackgroundPositionYProperty<TLength>, - backgroundRepeat?: BackgroundRepeatProperty, - backgroundSize?: BackgroundSizeProperty<TLength>, - blockOverflow?: BlockOverflowProperty, - blockSize?: BlockSizeProperty<TLength>, - borderBlockColor?: BorderBlockColorProperty, - borderBlockEndColor?: BorderBlockEndColorProperty, - borderBlockEndStyle?: BorderBlockEndStyleProperty, - borderBlockEndWidth?: BorderBlockEndWidthProperty<TLength>, - borderBlockStartColor?: BorderBlockStartColorProperty, - borderBlockStartStyle?: BorderBlockStartStyleProperty, - borderBlockStartWidth?: BorderBlockStartWidthProperty<TLength>, - borderBlockStyle?: BorderBlockStyleProperty, - borderBlockWidth?: BorderBlockWidthProperty<TLength>, - borderBottomColor?: BorderBottomColorProperty, - borderBottomLeftRadius?: BorderBottomLeftRadiusProperty<TLength>, - borderBottomRightRadius?: BorderBottomRightRadiusProperty<TLength>, - borderBottomStyle?: BorderBottomStyleProperty, - borderBottomWidth?: BorderBottomWidthProperty<TLength>, - borderCollapse?: BorderCollapseProperty, - borderEndEndRadius?: BorderEndEndRadiusProperty<TLength>, - borderEndStartRadius?: BorderEndStartRadiusProperty<TLength>, - borderImageOutset?: BorderImageOutsetProperty<TLength>, - borderImageRepeat?: BorderImageRepeatProperty, - borderImageSlice?: BorderImageSliceProperty, - borderImageSource?: BorderImageSourceProperty, - borderImageWidth?: BorderImageWidthProperty<TLength>, - borderInlineColor?: BorderInlineColorProperty, - borderInlineEndColor?: BorderInlineEndColorProperty, - borderInlineEndStyle?: BorderInlineEndStyleProperty, - borderInlineEndWidth?: BorderInlineEndWidthProperty<TLength>, - borderInlineStartColor?: BorderInlineStartColorProperty, - borderInlineStartStyle?: BorderInlineStartStyleProperty, - borderInlineStartWidth?: BorderInlineStartWidthProperty<TLength>, - borderInlineStyle?: BorderInlineStyleProperty, - borderInlineWidth?: BorderInlineWidthProperty<TLength>, - borderLeftColor?: BorderLeftColorProperty, - borderLeftStyle?: BorderLeftStyleProperty, - borderLeftWidth?: BorderLeftWidthProperty<TLength>, - borderRightColor?: BorderRightColorProperty, - borderRightStyle?: BorderRightStyleProperty, - borderRightWidth?: BorderRightWidthProperty<TLength>, - borderSpacing?: BorderSpacingProperty<TLength>, - borderStartEndRadius?: BorderStartEndRadiusProperty<TLength>, - borderStartStartRadius?: BorderStartStartRadiusProperty<TLength>, - borderTopColor?: BorderTopColorProperty, - borderTopLeftRadius?: BorderTopLeftRadiusProperty<TLength>, - borderTopRightRadius?: BorderTopRightRadiusProperty<TLength>, - borderTopStyle?: BorderTopStyleProperty, - borderTopWidth?: BorderTopWidthProperty<TLength>, - bottom?: BottomProperty<TLength>, - boxDecorationBreak?: BoxDecorationBreakProperty, - boxShadow?: BoxShadowProperty, - boxSizing?: BoxSizingProperty, - breakAfter?: BreakAfterProperty, - breakBefore?: BreakBeforeProperty, - breakInside?: BreakInsideProperty, - captionSide?: CaptionSideProperty, - caretColor?: CaretColorProperty, - clear?: ClearProperty, - clipPath?: ClipPathProperty, - color?: ColorProperty, - colorAdjust?: PrintColorAdjustProperty, - colorScheme?: ColorSchemeProperty, - columnCount?: ColumnCountProperty, - columnFill?: ColumnFillProperty, - columnGap?: ColumnGapProperty<TLength>, - columnRuleColor?: ColumnRuleColorProperty, - columnRuleStyle?: ColumnRuleStyleProperty, - columnRuleWidth?: ColumnRuleWidthProperty<TLength>, - columnSpan?: ColumnSpanProperty, - columnWidth?: ColumnWidthProperty<TLength>, - contain?: ContainProperty, - content?: ContentProperty, - contentVisibility?: ContentVisibilityProperty, - counterIncrement?: CounterIncrementProperty, - counterReset?: CounterResetProperty, - counterSet?: CounterSetProperty, - cursor?: CursorProperty, - direction?: DirectionProperty, - display?: DisplayProperty, - emptyCells?: EmptyCellsProperty, - filter?: FilterProperty, - flexBasis?: FlexBasisProperty<TLength>, - flexDirection?: FlexDirectionProperty, - flexGrow?: GlobalsNumber, - flexShrink?: GlobalsNumber, - flexWrap?: FlexWrapProperty, - float?: FloatProperty, - fontFamily?: FontFamilyProperty, - fontFeatureSettings?: FontFeatureSettingsProperty, - fontKerning?: FontKerningProperty, - fontLanguageOverride?: FontLanguageOverrideProperty, - fontOpticalSizing?: FontOpticalSizingProperty, - fontSize?: FontSizeProperty<TLength>, - fontSizeAdjust?: FontSizeAdjustProperty, - fontSmooth?: FontSmoothProperty<TLength>, - fontStretch?: FontStretchProperty, - fontStyle?: FontStyleProperty, - fontSynthesis?: FontSynthesisProperty, - fontVariant?: FontVariantProperty, - fontVariantAlternates?: FontVariantAlternatesProperty, - fontVariantCaps?: FontVariantCapsProperty, - fontVariantEastAsian?: FontVariantEastAsianProperty, - fontVariantLigatures?: FontVariantLigaturesProperty, - fontVariantNumeric?: FontVariantNumericProperty, - fontVariantPosition?: FontVariantPositionProperty, - fontVariationSettings?: FontVariationSettingsProperty, - fontWeight?: FontWeightProperty, - forcedColorAdjust?: ForcedColorAdjustProperty, - gridAutoColumns?: GridAutoColumnsProperty<TLength>, - gridAutoFlow?: GridAutoFlowProperty, - gridAutoRows?: GridAutoRowsProperty<TLength>, - gridColumnEnd?: GridColumnEndProperty, - gridColumnStart?: GridColumnStartProperty, - gridRowEnd?: GridRowEndProperty, - gridRowStart?: GridRowStartProperty, - gridTemplateAreas?: GridTemplateAreasProperty, - gridTemplateColumns?: GridTemplateColumnsProperty<TLength>, - gridTemplateRows?: GridTemplateRowsProperty<TLength>, - hangingPunctuation?: HangingPunctuationProperty, - height?: HeightProperty<TLength>, - hyphenateCharacter?: HyphenateCharacterProperty, - hyphens?: HyphensProperty, - imageOrientation?: ImageOrientationProperty, - imageRendering?: ImageRenderingProperty, - imageResolution?: ImageResolutionProperty, - initialLetter?: InitialLetterProperty, - inlineSize?: InlineSizeProperty<TLength>, - inputSecurity?: InputSecurityProperty, - inset?: InsetProperty<TLength>, - insetBlock?: InsetBlockProperty<TLength>, - insetBlockEnd?: InsetBlockEndProperty<TLength>, - insetBlockStart?: InsetBlockStartProperty<TLength>, - insetInline?: InsetInlineProperty<TLength>, - insetInlineEnd?: InsetInlineEndProperty<TLength>, - insetInlineStart?: InsetInlineStartProperty<TLength>, - isolation?: IsolationProperty, - justifyContent?: JustifyContentProperty, - justifyItems?: JustifyItemsProperty, - justifySelf?: JustifySelfProperty, - justifyTracks?: JustifyTracksProperty, - left?: LeftProperty<TLength>, - letterSpacing?: LetterSpacingProperty<TLength>, - lineBreak?: LineBreakProperty, - lineHeight?: LineHeightProperty<TLength>, - lineHeightStep?: LineHeightStepProperty<TLength>, - listStyleImage?: ListStyleImageProperty, - listStylePosition?: ListStylePositionProperty, - listStyleType?: ListStyleTypeProperty, - marginBlock?: MarginBlockProperty<TLength>, - marginBlockEnd?: MarginBlockEndProperty<TLength>, - marginBlockStart?: MarginBlockStartProperty<TLength>, - marginBottom?: MarginBottomProperty<TLength>, - marginInline?: MarginInlineProperty<TLength>, - marginInlineEnd?: MarginInlineEndProperty<TLength>, - marginInlineStart?: MarginInlineStartProperty<TLength>, - marginLeft?: MarginLeftProperty<TLength>, - marginRight?: MarginRightProperty<TLength>, - marginTop?: MarginTopProperty<TLength>, - maskBorderMode?: MaskBorderModeProperty, - maskBorderOutset?: MaskBorderOutsetProperty<TLength>, - maskBorderRepeat?: MaskBorderRepeatProperty, - maskBorderSlice?: MaskBorderSliceProperty, - maskBorderSource?: MaskBorderSourceProperty, - maskBorderWidth?: MaskBorderWidthProperty<TLength>, - maskClip?: MaskClipProperty, - maskComposite?: MaskCompositeProperty, - maskImage?: MaskImageProperty, - maskMode?: MaskModeProperty, - maskOrigin?: MaskOriginProperty, - maskPosition?: MaskPositionProperty<TLength>, - maskRepeat?: MaskRepeatProperty, - maskSize?: MaskSizeProperty<TLength>, - maskType?: MaskTypeProperty, - mathDepth?: MathDepthProperty, - mathShift?: MathShiftProperty, - mathStyle?: MathStyleProperty, - maxBlockSize?: MaxBlockSizeProperty<TLength>, - maxHeight?: MaxHeightProperty<TLength>, - maxInlineSize?: MaxInlineSizeProperty<TLength>, - maxLines?: MaxLinesProperty, - maxWidth?: MaxWidthProperty<TLength>, - minBlockSize?: MinBlockSizeProperty<TLength>, - minHeight?: MinHeightProperty<TLength>, - minInlineSize?: MinInlineSizeProperty<TLength>, - minWidth?: MinWidthProperty<TLength>, - mixBlendMode?: MixBlendModeProperty, - motionDistance?: OffsetDistanceProperty<TLength>, - motionPath?: OffsetPathProperty, - motionRotation?: OffsetRotateProperty, - objectFit?: ObjectFitProperty, - objectPosition?: ObjectPositionProperty<TLength>, - offsetAnchor?: OffsetAnchorProperty<TLength>, - offsetDistance?: OffsetDistanceProperty<TLength>, - offsetPath?: OffsetPathProperty, - offsetRotate?: OffsetRotateProperty, - offsetRotation?: OffsetRotateProperty, - opacity?: OpacityProperty, - order?: GlobalsNumber, - orphans?: GlobalsNumber, - outlineColor?: OutlineColorProperty, - outlineOffset?: OutlineOffsetProperty<TLength>, - outlineStyle?: OutlineStyleProperty, - outlineWidth?: OutlineWidthProperty<TLength>, - overflowAnchor?: OverflowAnchorProperty, - overflowBlock?: OverflowBlockProperty, - overflowClipBox?: OverflowClipBoxProperty, - overflowClipMargin?: OverflowClipMarginProperty<TLength>, - overflowInline?: OverflowInlineProperty, - overflowWrap?: OverflowWrapProperty, - overflowX?: OverflowXProperty, - overflowY?: OverflowYProperty, - overscrollBehaviorBlock?: OverscrollBehaviorBlockProperty, - overscrollBehaviorInline?: OverscrollBehaviorInlineProperty, - overscrollBehaviorX?: OverscrollBehaviorXProperty, - overscrollBehaviorY?: OverscrollBehaviorYProperty, - paddingBlock?: PaddingBlockProperty<TLength>, - paddingBlockEnd?: PaddingBlockEndProperty<TLength>, - paddingBlockStart?: PaddingBlockStartProperty<TLength>, - paddingBottom?: PaddingBottomProperty<TLength>, - paddingInline?: PaddingInlineProperty<TLength>, - paddingInlineEnd?: PaddingInlineEndProperty<TLength>, - paddingInlineStart?: PaddingInlineStartProperty<TLength>, - paddingLeft?: PaddingLeftProperty<TLength>, - paddingRight?: PaddingRightProperty<TLength>, - paddingTop?: PaddingTopProperty<TLength>, - pageBreakAfter?: PageBreakAfterProperty, - pageBreakBefore?: PageBreakBeforeProperty, - pageBreakInside?: PageBreakInsideProperty, - paintOrder?: PaintOrderProperty, - perspective?: PerspectiveProperty<TLength>, - perspectiveOrigin?: PerspectiveOriginProperty<TLength>, - placeContent?: PlaceContentProperty, - pointerEvents?: PointerEventsProperty, - position?: PositionProperty, - printColorAdjust?: PrintColorAdjustProperty, - quotes?: QuotesProperty, - resize?: ResizeProperty, - right?: RightProperty<TLength>, - rotate?: RotateProperty, - rowGap?: RowGapProperty<TLength>, - rubyAlign?: RubyAlignProperty, - rubyMerge?: RubyMergeProperty, - rubyPosition?: RubyPositionProperty, - scale?: ScaleProperty, - scrollBehavior?: ScrollBehaviorProperty, - scrollMargin?: ScrollMarginProperty<TLength>, - scrollMarginBlock?: ScrollMarginBlockProperty<TLength>, - scrollMarginBlockEnd?: ScrollMarginBlockEndProperty<TLength>, - scrollMarginBlockStart?: ScrollMarginBlockStartProperty<TLength>, - scrollMarginBottom?: ScrollMarginBottomProperty<TLength>, - scrollMarginInline?: ScrollMarginInlineProperty<TLength>, - scrollMarginInlineEnd?: ScrollMarginInlineEndProperty<TLength>, - scrollMarginInlineStart?: ScrollMarginInlineStartProperty<TLength>, - scrollMarginLeft?: ScrollMarginLeftProperty<TLength>, - scrollMarginRight?: ScrollMarginRightProperty<TLength>, - scrollMarginTop?: ScrollMarginTopProperty<TLength>, - scrollPadding?: ScrollPaddingProperty<TLength>, - scrollPaddingBlock?: ScrollPaddingBlockProperty<TLength>, - scrollPaddingBlockEnd?: ScrollPaddingBlockEndProperty<TLength>, - scrollPaddingBlockStart?: ScrollPaddingBlockStartProperty<TLength>, - scrollPaddingBottom?: ScrollPaddingBottomProperty<TLength>, - scrollPaddingInline?: ScrollPaddingInlineProperty<TLength>, - scrollPaddingInlineEnd?: ScrollPaddingInlineEndProperty<TLength>, - scrollPaddingInlineStart?: ScrollPaddingInlineStartProperty<TLength>, - scrollPaddingLeft?: ScrollPaddingLeftProperty<TLength>, - scrollPaddingRight?: ScrollPaddingRightProperty<TLength>, - scrollPaddingTop?: ScrollPaddingTopProperty<TLength>, - scrollSnapAlign?: ScrollSnapAlignProperty, - scrollSnapMargin?: ScrollMarginProperty<TLength>, - scrollSnapMarginBottom?: ScrollMarginBottomProperty<TLength>, - scrollSnapMarginLeft?: ScrollMarginLeftProperty<TLength>, - scrollSnapMarginRight?: ScrollMarginRightProperty<TLength>, - scrollSnapMarginTop?: ScrollMarginTopProperty<TLength>, - scrollSnapStop?: ScrollSnapStopProperty, - scrollSnapType?: ScrollSnapTypeProperty, - scrollbarColor?: ScrollbarColorProperty, - scrollbarGutter?: ScrollbarGutterProperty, - scrollbarWidth?: ScrollbarWidthProperty, - shapeImageThreshold?: ShapeImageThresholdProperty, - shapeMargin?: ShapeMarginProperty<TLength>, - shapeOutside?: ShapeOutsideProperty, - tabSize?: TabSizeProperty<TLength>, - tableLayout?: TableLayoutProperty, - textAlign?: TextAlignProperty, - textAlignLast?: TextAlignLastProperty, - textCombineUpright?: TextCombineUprightProperty, - textDecorationColor?: TextDecorationColorProperty, - textDecorationLine?: TextDecorationLineProperty, - textDecorationSkip?: TextDecorationSkipProperty, - textDecorationSkipInk?: TextDecorationSkipInkProperty, - textDecorationStyle?: TextDecorationStyleProperty, - textDecorationThickness?: TextDecorationThicknessProperty<TLength>, - textEmphasisColor?: TextEmphasisColorProperty, - textEmphasisPosition?: GlobalsString, - textEmphasisStyle?: TextEmphasisStyleProperty, - textIndent?: TextIndentProperty<TLength>, - textJustify?: TextJustifyProperty, - textOrientation?: TextOrientationProperty, - textOverflow?: TextOverflowProperty, - textRendering?: TextRenderingProperty, - textShadow?: TextShadowProperty, - textSizeAdjust?: TextSizeAdjustProperty, - textTransform?: TextTransformProperty, - textUnderlineOffset?: TextUnderlineOffsetProperty<TLength>, - textUnderlinePosition?: TextUnderlinePositionProperty, - top?: TopProperty<TLength>, - touchAction?: TouchActionProperty, - transform?: TransformProperty, - transformBox?: TransformBoxProperty, - transformOrigin?: TransformOriginProperty<TLength>, - transformStyle?: TransformStyleProperty, - transitionDelay?: GlobalsString, - transitionDuration?: GlobalsString, - transitionProperty?: TransitionPropertyProperty, - transitionTimingFunction?: TransitionTimingFunctionProperty, - translate?: TranslateProperty<TLength>, - unicodeBidi?: UnicodeBidiProperty, - userSelect?: UserSelectProperty, - verticalAlign?: VerticalAlignProperty<TLength>, - visibility?: VisibilityProperty, - whiteSpace?: WhiteSpaceProperty, - widows?: GlobalsNumber, - width?: WidthProperty<TLength>, - willChange?: WillChangeProperty, - wordBreak?: WordBreakProperty, - wordSpacing?: WordSpacingProperty<TLength>, - wordWrap?: WordWrapProperty, - writingMode?: WritingModeProperty, - zIndex?: ZIndexProperty, - zoom?: ZoomProperty, -}; +// @flow strict -export type StandardShorthandProperties<TLength = string | 0> = { - all?: Globals, - animation?: AnimationProperty, - background?: BackgroundProperty<TLength>, - backgroundPosition?: BackgroundPositionProperty<TLength>, - border?: BorderProperty<TLength>, - borderBlock?: BorderBlockProperty<TLength>, - borderBlockEnd?: BorderBlockEndProperty<TLength>, - borderBlockStart?: BorderBlockStartProperty<TLength>, - borderBottom?: BorderBottomProperty<TLength>, - borderColor?: BorderColorProperty, - borderImage?: BorderImageProperty, - borderInline?: BorderInlineProperty<TLength>, - borderInlineEnd?: BorderInlineEndProperty<TLength>, - borderInlineStart?: BorderInlineStartProperty<TLength>, - borderLeft?: BorderLeftProperty<TLength>, - borderRadius?: BorderRadiusProperty<TLength>, - borderRight?: BorderRightProperty<TLength>, - borderStyle?: BorderStyleProperty, - borderTop?: BorderTopProperty<TLength>, - borderWidth?: BorderWidthProperty<TLength>, - columnRule?: ColumnRuleProperty<TLength>, - columns?: ColumnsProperty<TLength>, - flex?: FlexProperty<TLength>, - flexFlow?: FlexFlowProperty, - font?: FontProperty, - gap?: GapProperty<TLength>, - grid?: GridProperty, - gridArea?: GridAreaProperty, - gridColumn?: GridColumnProperty, - gridRow?: GridRowProperty, - gridTemplate?: GridTemplateProperty, - lineClamp?: LineClampProperty, - listStyle?: ListStyleProperty, - margin?: MarginProperty<TLength>, - mask?: MaskProperty<TLength>, - maskBorder?: MaskBorderProperty, - motion?: OffsetProperty<TLength>, - offset?: OffsetProperty<TLength>, - outline?: OutlineProperty<TLength>, - overflow?: OverflowProperty, - overscrollBehavior?: OverscrollBehaviorProperty, - padding?: PaddingProperty<TLength>, - placeItems?: PlaceItemsProperty, - placeSelf?: PlaceSelfProperty, - textDecoration?: TextDecorationProperty<TLength>, - textEmphasis?: TextEmphasisProperty, - transition?: TransitionProperty, -}; +export type StandardLonghandProperties<TLength = string | 0, TTime = string> = {| + accentColor?: Property$AccentColor, + alignContent?: Property$AlignContent, + alignItems?: Property$AlignItems, + alignSelf?: Property$AlignSelf, + alignTracks?: Property$AlignTracks, + animationComposition?: Property$AnimationComposition, + animationDelay?: Property$AnimationDelay<TTime>, + animationDirection?: Property$AnimationDirection, + animationDuration?: Property$AnimationDuration<TTime>, + animationFillMode?: Property$AnimationFillMode, + animationIterationCount?: Property$AnimationIterationCount, + animationName?: Property$AnimationName, + animationPlayState?: Property$AnimationPlayState, + animationRangeEnd?: Property$AnimationRangeEnd<TLength>, + animationRangeStart?: Property$AnimationRangeStart<TLength>, + animationTimeline?: Property$AnimationTimeline, + animationTimingFunction?: Property$AnimationTimingFunction, + appearance?: Property$Appearance, + aspectRatio?: Property$AspectRatio, + backdropFilter?: Property$BackdropFilter, + backfaceVisibility?: Property$BackfaceVisibility, + backgroundAttachment?: Property$BackgroundAttachment, + backgroundBlendMode?: Property$BackgroundBlendMode, + backgroundClip?: Property$BackgroundClip, + backgroundColor?: Property$BackgroundColor, + backgroundImage?: Property$BackgroundImage, + backgroundOrigin?: Property$BackgroundOrigin, + backgroundPositionX?: Property$BackgroundPositionX<TLength>, + backgroundPositionY?: Property$BackgroundPositionY<TLength>, + backgroundRepeat?: Property$BackgroundRepeat, + backgroundSize?: Property$BackgroundSize<TLength>, + blockOverflow?: Property$BlockOverflow, + blockSize?: Property$BlockSize<TLength>, + borderBlockColor?: Property$BorderBlockColor, + borderBlockEndColor?: Property$BorderBlockEndColor, + borderBlockEndStyle?: Property$BorderBlockEndStyle, + borderBlockEndWidth?: Property$BorderBlockEndWidth<TLength>, + borderBlockStartColor?: Property$BorderBlockStartColor, + borderBlockStartStyle?: Property$BorderBlockStartStyle, + borderBlockStartWidth?: Property$BorderBlockStartWidth<TLength>, + borderBlockStyle?: Property$BorderBlockStyle, + borderBlockWidth?: Property$BorderBlockWidth<TLength>, + borderBottomColor?: Property$BorderBottomColor, + borderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength>, + borderBottomRightRadius?: Property$BorderBottomRightRadius<TLength>, + borderBottomStyle?: Property$BorderBottomStyle, + borderBottomWidth?: Property$BorderBottomWidth<TLength>, + borderCollapse?: Property$BorderCollapse, + borderEndEndRadius?: Property$BorderEndEndRadius<TLength>, + borderEndStartRadius?: Property$BorderEndStartRadius<TLength>, + borderImageOutset?: Property$BorderImageOutset<TLength>, + borderImageRepeat?: Property$BorderImageRepeat, + borderImageSlice?: Property$BorderImageSlice, + borderImageSource?: Property$BorderImageSource, + borderImageWidth?: Property$BorderImageWidth<TLength>, + borderInlineColor?: Property$BorderInlineColor, + borderInlineEndColor?: Property$BorderInlineEndColor, + borderInlineEndStyle?: Property$BorderInlineEndStyle, + borderInlineEndWidth?: Property$BorderInlineEndWidth<TLength>, + borderInlineStartColor?: Property$BorderInlineStartColor, + borderInlineStartStyle?: Property$BorderInlineStartStyle, + borderInlineStartWidth?: Property$BorderInlineStartWidth<TLength>, + borderInlineStyle?: Property$BorderInlineStyle, + borderInlineWidth?: Property$BorderInlineWidth<TLength>, + borderLeftColor?: Property$BorderLeftColor, + borderLeftStyle?: Property$BorderLeftStyle, + borderLeftWidth?: Property$BorderLeftWidth<TLength>, + borderRightColor?: Property$BorderRightColor, + borderRightStyle?: Property$BorderRightStyle, + borderRightWidth?: Property$BorderRightWidth<TLength>, + borderSpacing?: Property$BorderSpacing<TLength>, + borderStartEndRadius?: Property$BorderStartEndRadius<TLength>, + borderStartStartRadius?: Property$BorderStartStartRadius<TLength>, + borderTopColor?: Property$BorderTopColor, + borderTopLeftRadius?: Property$BorderTopLeftRadius<TLength>, + borderTopRightRadius?: Property$BorderTopRightRadius<TLength>, + borderTopStyle?: Property$BorderTopStyle, + borderTopWidth?: Property$BorderTopWidth<TLength>, + bottom?: Property$Bottom<TLength>, + boxDecorationBreak?: Property$BoxDecorationBreak, + boxShadow?: Property$BoxShadow, + boxSizing?: Property$BoxSizing, + breakAfter?: Property$BreakAfter, + breakBefore?: Property$BreakBefore, + breakInside?: Property$BreakInside, + captionSide?: Property$CaptionSide, + caretColor?: Property$CaretColor, + caretShape?: Property$CaretShape, + clear?: Property$Clear, + clipPath?: Property$ClipPath, + color?: Property$Color, + colorAdjust?: Property$PrintColorAdjust, + colorScheme?: Property$ColorScheme, + columnCount?: Property$ColumnCount, + columnFill?: Property$ColumnFill, + columnGap?: Property$ColumnGap<TLength>, + columnRuleColor?: Property$ColumnRuleColor, + columnRuleStyle?: Property$ColumnRuleStyle, + columnRuleWidth?: Property$ColumnRuleWidth<TLength>, + columnSpan?: Property$ColumnSpan, + columnWidth?: Property$ColumnWidth<TLength>, + contain?: Property$Contain, + containIntrinsicBlockSize?: Property$ContainIntrinsicBlockSize<TLength>, + containIntrinsicHeight?: Property$ContainIntrinsicHeight<TLength>, + containIntrinsicInlineSize?: Property$ContainIntrinsicInlineSize<TLength>, + containIntrinsicWidth?: Property$ContainIntrinsicWidth<TLength>, + containerName?: Property$ContainerName, + containerType?: Property$ContainerType, + content?: Property$Content, + contentVisibility?: Property$ContentVisibility, + counterIncrement?: Property$CounterIncrement, + counterReset?: Property$CounterReset, + counterSet?: Property$CounterSet, + cursor?: Property$Cursor, + direction?: Property$Direction, + display?: Property$Display, + emptyCells?: Property$EmptyCells, + filter?: Property$Filter, + flexBasis?: Property$FlexBasis<TLength>, + flexDirection?: Property$FlexDirection, + flexGrow?: Property$FlexGrow, + flexShrink?: Property$FlexShrink, + flexWrap?: Property$FlexWrap, + float?: Property$Float, + fontFamily?: Property$FontFamily, + fontFeatureSettings?: Property$FontFeatureSettings, + fontKerning?: Property$FontKerning, + fontLanguageOverride?: Property$FontLanguageOverride, + fontOpticalSizing?: Property$FontOpticalSizing, + fontPalette?: Property$FontPalette, + fontSize?: Property$FontSize<TLength>, + fontSizeAdjust?: Property$FontSizeAdjust, + fontSmooth?: Property$FontSmooth<TLength>, + fontStretch?: Property$FontStretch, + fontStyle?: Property$FontStyle, + fontSynthesis?: Property$FontSynthesis, + fontSynthesisPosition?: Property$FontSynthesisPosition, + fontSynthesisSmallCaps?: Property$FontSynthesisSmallCaps, + fontSynthesisStyle?: Property$FontSynthesisStyle, + fontSynthesisWeight?: Property$FontSynthesisWeight, + fontVariant?: Property$FontVariant, + fontVariantAlternates?: Property$FontVariantAlternates, + fontVariantCaps?: Property$FontVariantCaps, + fontVariantEastAsian?: Property$FontVariantEastAsian, + fontVariantEmoji?: Property$FontVariantEmoji, + fontVariantLigatures?: Property$FontVariantLigatures, + fontVariantNumeric?: Property$FontVariantNumeric, + fontVariantPosition?: Property$FontVariantPosition, + fontVariationSettings?: Property$FontVariationSettings, + fontWeight?: Property$FontWeight, + forcedColorAdjust?: Property$ForcedColorAdjust, + gridAutoColumns?: Property$GridAutoColumns<TLength>, + gridAutoFlow?: Property$GridAutoFlow, + gridAutoRows?: Property$GridAutoRows<TLength>, + gridColumnEnd?: Property$GridColumnEnd, + gridColumnStart?: Property$GridColumnStart, + gridRowEnd?: Property$GridRowEnd, + gridRowStart?: Property$GridRowStart, + gridTemplateAreas?: Property$GridTemplateAreas, + gridTemplateColumns?: Property$GridTemplateColumns<TLength>, + gridTemplateRows?: Property$GridTemplateRows<TLength>, + hangingPunctuation?: Property$HangingPunctuation, + height?: Property$Height<TLength>, + hyphenateCharacter?: Property$HyphenateCharacter, + hyphenateLimitChars?: Property$HyphenateLimitChars, + hyphens?: Property$Hyphens, + imageOrientation?: Property$ImageOrientation, + imageRendering?: Property$ImageRendering, + imageResolution?: Property$ImageResolution, + initialLetter?: Property$InitialLetter, + inlineSize?: Property$InlineSize<TLength>, + inputSecurity?: Property$InputSecurity, + insetBlockEnd?: Property$InsetBlockEnd<TLength>, + insetBlockStart?: Property$InsetBlockStart<TLength>, + insetInlineEnd?: Property$InsetInlineEnd<TLength>, + insetInlineStart?: Property$InsetInlineStart<TLength>, + isolation?: Property$Isolation, + justifyContent?: Property$JustifyContent, + justifyItems?: Property$JustifyItems, + justifySelf?: Property$JustifySelf, + justifyTracks?: Property$JustifyTracks, + left?: Property$Left<TLength>, + letterSpacing?: Property$LetterSpacing<TLength>, + lineBreak?: Property$LineBreak, + lineHeight?: Property$LineHeight<TLength>, + lineHeightStep?: Property$LineHeightStep<TLength>, + listStyleImage?: Property$ListStyleImage, + listStylePosition?: Property$ListStylePosition, + listStyleType?: Property$ListStyleType, + marginBlockEnd?: Property$MarginBlockEnd<TLength>, + marginBlockStart?: Property$MarginBlockStart<TLength>, + marginBottom?: Property$MarginBottom<TLength>, + marginInlineEnd?: Property$MarginInlineEnd<TLength>, + marginInlineStart?: Property$MarginInlineStart<TLength>, + marginLeft?: Property$MarginLeft<TLength>, + marginRight?: Property$MarginRight<TLength>, + marginTop?: Property$MarginTop<TLength>, + marginTrim?: Property$MarginTrim, + maskBorderMode?: Property$MaskBorderMode, + maskBorderOutset?: Property$MaskBorderOutset<TLength>, + maskBorderRepeat?: Property$MaskBorderRepeat, + maskBorderSlice?: Property$MaskBorderSlice, + maskBorderSource?: Property$MaskBorderSource, + maskBorderWidth?: Property$MaskBorderWidth<TLength>, + maskClip?: Property$MaskClip, + maskComposite?: Property$MaskComposite, + maskImage?: Property$MaskImage, + maskMode?: Property$MaskMode, + maskOrigin?: Property$MaskOrigin, + maskPosition?: Property$MaskPosition<TLength>, + maskRepeat?: Property$MaskRepeat, + maskSize?: Property$MaskSize<TLength>, + maskType?: Property$MaskType, + masonryAutoFlow?: Property$MasonryAutoFlow, + mathDepth?: Property$MathDepth, + mathShift?: Property$MathShift, + mathStyle?: Property$MathStyle, + maxBlockSize?: Property$MaxBlockSize<TLength>, + maxHeight?: Property$MaxHeight<TLength>, + maxInlineSize?: Property$MaxInlineSize<TLength>, + maxLines?: Property$MaxLines, + maxWidth?: Property$MaxWidth<TLength>, + minBlockSize?: Property$MinBlockSize<TLength>, + minHeight?: Property$MinHeight<TLength>, + minInlineSize?: Property$MinInlineSize<TLength>, + minWidth?: Property$MinWidth<TLength>, + mixBlendMode?: Property$MixBlendMode, + motionDistance?: Property$OffsetDistance<TLength>, + motionPath?: Property$OffsetPath, + motionRotation?: Property$OffsetRotate, + objectFit?: Property$ObjectFit, + objectPosition?: Property$ObjectPosition<TLength>, + offsetAnchor?: Property$OffsetAnchor<TLength>, + offsetDistance?: Property$OffsetDistance<TLength>, + offsetPath?: Property$OffsetPath, + offsetPosition?: Property$OffsetPosition<TLength>, + offsetRotate?: Property$OffsetRotate, + offsetRotation?: Property$OffsetRotate, + opacity?: Property$Opacity, + order?: Property$Order, + orphans?: Property$Orphans, + outlineColor?: Property$OutlineColor, + outlineOffset?: Property$OutlineOffset<TLength>, + outlineStyle?: Property$OutlineStyle, + outlineWidth?: Property$OutlineWidth<TLength>, + overflowAnchor?: Property$OverflowAnchor, + overflowBlock?: Property$OverflowBlock, + overflowClipBox?: Property$OverflowClipBox, + overflowClipMargin?: Property$OverflowClipMargin<TLength>, + overflowInline?: Property$OverflowInline, + overflowWrap?: Property$OverflowWrap, + overflowX?: Property$OverflowX, + overflowY?: Property$OverflowY, + overlay?: Property$Overlay, + overscrollBehaviorBlock?: Property$OverscrollBehaviorBlock, + overscrollBehaviorInline?: Property$OverscrollBehaviorInline, + overscrollBehaviorX?: Property$OverscrollBehaviorX, + overscrollBehaviorY?: Property$OverscrollBehaviorY, + paddingBlockEnd?: Property$PaddingBlockEnd<TLength>, + paddingBlockStart?: Property$PaddingBlockStart<TLength>, + paddingBottom?: Property$PaddingBottom<TLength>, + paddingInlineEnd?: Property$PaddingInlineEnd<TLength>, + paddingInlineStart?: Property$PaddingInlineStart<TLength>, + paddingLeft?: Property$PaddingLeft<TLength>, + paddingRight?: Property$PaddingRight<TLength>, + paddingTop?: Property$PaddingTop<TLength>, + page?: Property$Page, + pageBreakAfter?: Property$PageBreakAfter, + pageBreakBefore?: Property$PageBreakBefore, + pageBreakInside?: Property$PageBreakInside, + paintOrder?: Property$PaintOrder, + perspective?: Property$Perspective<TLength>, + perspectiveOrigin?: Property$PerspectiveOrigin<TLength>, + pointerEvents?: Property$PointerEvents, + position?: Property$Position, + printColorAdjust?: Property$PrintColorAdjust, + quotes?: Property$Quotes, + resize?: Property$Resize, + right?: Property$Right<TLength>, + rotate?: Property$Rotate, + rowGap?: Property$RowGap<TLength>, + rubyAlign?: Property$RubyAlign, + rubyMerge?: Property$RubyMerge, + rubyPosition?: Property$RubyPosition, + scale?: Property$Scale, + scrollBehavior?: Property$ScrollBehavior, + scrollMarginBlockEnd?: Property$ScrollMarginBlockEnd<TLength>, + scrollMarginBlockStart?: Property$ScrollMarginBlockStart<TLength>, + scrollMarginBottom?: Property$ScrollMarginBottom<TLength>, + scrollMarginInlineEnd?: Property$ScrollMarginInlineEnd<TLength>, + scrollMarginInlineStart?: Property$ScrollMarginInlineStart<TLength>, + scrollMarginLeft?: Property$ScrollMarginLeft<TLength>, + scrollMarginRight?: Property$ScrollMarginRight<TLength>, + scrollMarginTop?: Property$ScrollMarginTop<TLength>, + scrollPaddingBlockEnd?: Property$ScrollPaddingBlockEnd<TLength>, + scrollPaddingBlockStart?: Property$ScrollPaddingBlockStart<TLength>, + scrollPaddingBottom?: Property$ScrollPaddingBottom<TLength>, + scrollPaddingInlineEnd?: Property$ScrollPaddingInlineEnd<TLength>, + scrollPaddingInlineStart?: Property$ScrollPaddingInlineStart<TLength>, + scrollPaddingLeft?: Property$ScrollPaddingLeft<TLength>, + scrollPaddingRight?: Property$ScrollPaddingRight<TLength>, + scrollPaddingTop?: Property$ScrollPaddingTop<TLength>, + scrollSnapAlign?: Property$ScrollSnapAlign, + scrollSnapMarginBottom?: Property$ScrollMarginBottom<TLength>, + scrollSnapMarginLeft?: Property$ScrollMarginLeft<TLength>, + scrollSnapMarginRight?: Property$ScrollMarginRight<TLength>, + scrollSnapMarginTop?: Property$ScrollMarginTop<TLength>, + scrollSnapStop?: Property$ScrollSnapStop, + scrollSnapType?: Property$ScrollSnapType, + scrollTimelineAxis?: Property$ScrollTimelineAxis, + scrollTimelineName?: Property$ScrollTimelineName, + scrollbarColor?: Property$ScrollbarColor, + scrollbarGutter?: Property$ScrollbarGutter, + scrollbarWidth?: Property$ScrollbarWidth, + shapeImageThreshold?: Property$ShapeImageThreshold, + shapeMargin?: Property$ShapeMargin<TLength>, + shapeOutside?: Property$ShapeOutside, + tabSize?: Property$TabSize<TLength>, + tableLayout?: Property$TableLayout, + textAlign?: Property$TextAlign, + textAlignLast?: Property$TextAlignLast, + textCombineUpright?: Property$TextCombineUpright, + textDecorationColor?: Property$TextDecorationColor, + textDecorationLine?: Property$TextDecorationLine, + textDecorationSkip?: Property$TextDecorationSkip, + textDecorationSkipInk?: Property$TextDecorationSkipInk, + textDecorationStyle?: Property$TextDecorationStyle, + textDecorationThickness?: Property$TextDecorationThickness<TLength>, + textEmphasisColor?: Property$TextEmphasisColor, + textEmphasisPosition?: Property$TextEmphasisPosition, + textEmphasisStyle?: Property$TextEmphasisStyle, + textIndent?: Property$TextIndent<TLength>, + textJustify?: Property$TextJustify, + textOrientation?: Property$TextOrientation, + textOverflow?: Property$TextOverflow, + textRendering?: Property$TextRendering, + textShadow?: Property$TextShadow, + textSizeAdjust?: Property$TextSizeAdjust, + textTransform?: Property$TextTransform, + textUnderlineOffset?: Property$TextUnderlineOffset<TLength>, + textUnderlinePosition?: Property$TextUnderlinePosition, + textWrap?: Property$TextWrap, + timelineScope?: Property$TimelineScope, + top?: Property$Top<TLength>, + touchAction?: Property$TouchAction, + transform?: Property$Transform, + transformBox?: Property$TransformBox, + transformOrigin?: Property$TransformOrigin<TLength>, + transformStyle?: Property$TransformStyle, + transitionBehavior?: Property$TransitionBehavior, + transitionDelay?: Property$TransitionDelay<TTime>, + transitionDuration?: Property$TransitionDuration<TTime>, + transitionProperty?: Property$TransitionProperty, + transitionTimingFunction?: Property$TransitionTimingFunction, + translate?: Property$Translate<TLength>, + unicodeBidi?: Property$UnicodeBidi, + userSelect?: Property$UserSelect, + verticalAlign?: Property$VerticalAlign<TLength>, + viewTimelineAxis?: Property$ViewTimelineAxis, + viewTimelineInset?: Property$ViewTimelineInset<TLength>, + viewTimelineName?: Property$ViewTimelineName, + viewTransitionName?: Property$ViewTransitionName, + visibility?: Property$Visibility, + whiteSpace?: Property$WhiteSpace, + whiteSpaceCollapse?: Property$WhiteSpaceCollapse, + whiteSpaceTrim?: Property$WhiteSpaceTrim, + widows?: Property$Widows, + width?: Property$Width<TLength>, + willChange?: Property$WillChange, + wordBreak?: Property$WordBreak, + wordSpacing?: Property$WordSpacing<TLength>, + wordWrap?: Property$WordWrap, + writingMode?: Property$WritingMode, + zIndex?: Property$ZIndex, + zoom?: Property$Zoom, +|}; -export type StandardProperties<TLength = string | 0> = StandardLonghandProperties<TLength> & StandardShorthandProperties<TLength>; +export type StandardShorthandProperties<TLength = string | 0, TTime = string> = {| + all?: Property$All, + animation?: Property$Animation<TTime>, + animationRange?: Property$AnimationRange<TLength>, + background?: Property$Background<TLength>, + backgroundPosition?: Property$BackgroundPosition<TLength>, + border?: Property$Border<TLength>, + borderBlock?: Property$BorderBlock<TLength>, + borderBlockEnd?: Property$BorderBlockEnd<TLength>, + borderBlockStart?: Property$BorderBlockStart<TLength>, + borderBottom?: Property$BorderBottom<TLength>, + borderColor?: Property$BorderColor, + borderImage?: Property$BorderImage, + borderInline?: Property$BorderInline<TLength>, + borderInlineEnd?: Property$BorderInlineEnd<TLength>, + borderInlineStart?: Property$BorderInlineStart<TLength>, + borderLeft?: Property$BorderLeft<TLength>, + borderRadius?: Property$BorderRadius<TLength>, + borderRight?: Property$BorderRight<TLength>, + borderStyle?: Property$BorderStyle, + borderTop?: Property$BorderTop<TLength>, + borderWidth?: Property$BorderWidth<TLength>, + caret?: Property$Caret, + columnRule?: Property$ColumnRule<TLength>, + columns?: Property$Columns<TLength>, + containIntrinsicSize?: Property$ContainIntrinsicSize<TLength>, + container?: Property$Container, + flex?: Property$Flex<TLength>, + flexFlow?: Property$FlexFlow, + font?: Property$Font, + gap?: Property$Gap<TLength>, + grid?: Property$Grid, + gridArea?: Property$GridArea, + gridColumn?: Property$GridColumn, + gridRow?: Property$GridRow, + gridTemplate?: Property$GridTemplate, + inset?: Property$Inset<TLength>, + insetBlock?: Property$InsetBlock<TLength>, + insetInline?: Property$InsetInline<TLength>, + lineClamp?: Property$LineClamp, + listStyle?: Property$ListStyle, + margin?: Property$Margin<TLength>, + marginBlock?: Property$MarginBlock<TLength>, + marginInline?: Property$MarginInline<TLength>, + mask?: Property$Mask<TLength>, + maskBorder?: Property$MaskBorder, + motion?: Property$Offset<TLength>, + offset?: Property$Offset<TLength>, + outline?: Property$Outline<TLength>, + overflow?: Property$Overflow, + overscrollBehavior?: Property$OverscrollBehavior, + padding?: Property$Padding<TLength>, + paddingBlock?: Property$PaddingBlock<TLength>, + paddingInline?: Property$PaddingInline<TLength>, + placeContent?: Property$PlaceContent, + placeItems?: Property$PlaceItems, + placeSelf?: Property$PlaceSelf, + scrollMargin?: Property$ScrollMargin<TLength>, + scrollMarginBlock?: Property$ScrollMarginBlock<TLength>, + scrollMarginInline?: Property$ScrollMarginInline<TLength>, + scrollPadding?: Property$ScrollPadding<TLength>, + scrollPaddingBlock?: Property$ScrollPaddingBlock<TLength>, + scrollPaddingInline?: Property$ScrollPaddingInline<TLength>, + scrollSnapMargin?: Property$ScrollMargin<TLength>, + scrollTimeline?: Property$ScrollTimeline, + textDecoration?: Property$TextDecoration<TLength>, + textEmphasis?: Property$TextEmphasis, + transition?: Property$Transition<TTime>, + viewTimeline?: Property$ViewTimeline, +|}; -export type VendorLonghandProperties<TLength = string | 0> = { - MozAnimationDelay?: GlobalsString, - MozAnimationDirection?: AnimationDirectionProperty, - MozAnimationDuration?: GlobalsString, - MozAnimationFillMode?: AnimationFillModeProperty, - MozAnimationIterationCount?: AnimationIterationCountProperty, - MozAnimationName?: AnimationNameProperty, - MozAnimationPlayState?: AnimationPlayStateProperty, - MozAnimationTimingFunction?: AnimationTimingFunctionProperty, - MozAppearance?: MozAppearanceProperty, - MozBackfaceVisibility?: BackfaceVisibilityProperty, - MozBorderBottomColors?: MozBorderBottomColorsProperty, - MozBorderEndColor?: BorderInlineEndColorProperty, - MozBorderEndStyle?: BorderInlineEndStyleProperty, - MozBorderEndWidth?: BorderInlineEndWidthProperty<TLength>, - MozBorderLeftColors?: MozBorderLeftColorsProperty, - MozBorderRightColors?: MozBorderRightColorsProperty, - MozBorderStartColor?: BorderInlineStartColorProperty, - MozBorderStartStyle?: BorderInlineStartStyleProperty, - MozBorderTopColors?: MozBorderTopColorsProperty, - MozBoxSizing?: BoxSizingProperty, - MozColumnCount?: ColumnCountProperty, - MozColumnFill?: ColumnFillProperty, - MozColumnRuleColor?: ColumnRuleColorProperty, - MozColumnRuleStyle?: ColumnRuleStyleProperty, - MozColumnRuleWidth?: ColumnRuleWidthProperty<TLength>, - MozColumnWidth?: ColumnWidthProperty<TLength>, - MozContextProperties?: MozContextPropertiesProperty, - MozFontFeatureSettings?: FontFeatureSettingsProperty, - MozFontLanguageOverride?: FontLanguageOverrideProperty, - MozHyphens?: HyphensProperty, - MozImageRegion?: MozImageRegionProperty, - MozMarginEnd?: MarginInlineEndProperty<TLength>, - MozMarginStart?: MarginInlineStartProperty<TLength>, - MozOrient?: MozOrientProperty, - MozOsxFontSmoothing?: FontSmoothProperty<TLength>, - MozPaddingEnd?: PaddingInlineEndProperty<TLength>, - MozPaddingStart?: PaddingInlineStartProperty<TLength>, - MozPerspective?: PerspectiveProperty<TLength>, - MozPerspectiveOrigin?: PerspectiveOriginProperty<TLength>, - MozStackSizing?: MozStackSizingProperty, - MozTabSize?: TabSizeProperty<TLength>, - MozTextBlink?: MozTextBlinkProperty, - MozTextSizeAdjust?: TextSizeAdjustProperty, - MozTransformOrigin?: TransformOriginProperty<TLength>, - MozTransformStyle?: TransformStyleProperty, - MozTransitionDelay?: GlobalsString, - MozTransitionDuration?: GlobalsString, - MozTransitionProperty?: TransitionPropertyProperty, - MozTransitionTimingFunction?: TransitionTimingFunctionProperty, - MozUserFocus?: MozUserFocusProperty, - MozUserModify?: MozUserModifyProperty, - MozUserSelect?: UserSelectProperty, - MozWindowDragging?: MozWindowDraggingProperty, - MozWindowShadow?: MozWindowShadowProperty, - msAccelerator?: MsAcceleratorProperty, - msBlockProgression?: MsBlockProgressionProperty, - msContentZoomChaining?: MsContentZoomChainingProperty, - msContentZoomLimitMax?: GlobalsString, - msContentZoomLimitMin?: GlobalsString, - msContentZoomSnapPoints?: GlobalsString, - msContentZoomSnapType?: MsContentZoomSnapTypeProperty, - msContentZooming?: MsContentZoomingProperty, - msFilter?: GlobalsString, - msFlexDirection?: FlexDirectionProperty, - msFlexPositive?: GlobalsNumber, - msFlowFrom?: MsFlowFromProperty, - msFlowInto?: MsFlowIntoProperty, - msGridColumns?: MsGridColumnsProperty<TLength>, - msGridRows?: MsGridRowsProperty<TLength>, - msHighContrastAdjust?: MsHighContrastAdjustProperty, - msHyphenateLimitChars?: MsHyphenateLimitCharsProperty, - msHyphenateLimitLines?: MsHyphenateLimitLinesProperty, - msHyphenateLimitZone?: MsHyphenateLimitZoneProperty<TLength>, - msHyphens?: HyphensProperty, - msImeAlign?: MsImeAlignProperty, - msLineBreak?: LineBreakProperty, - msOrder?: GlobalsNumber, - msOverflowStyle?: MsOverflowStyleProperty, - msOverflowX?: OverflowXProperty, - msOverflowY?: OverflowYProperty, - msScrollChaining?: MsScrollChainingProperty, - msScrollLimitXMax?: MsScrollLimitXMaxProperty<TLength>, - msScrollLimitXMin?: MsScrollLimitXMinProperty<TLength>, - msScrollLimitYMax?: MsScrollLimitYMaxProperty<TLength>, - msScrollLimitYMin?: MsScrollLimitYMinProperty<TLength>, - msScrollRails?: MsScrollRailsProperty, - msScrollSnapPointsX?: GlobalsString, - msScrollSnapPointsY?: GlobalsString, - msScrollSnapType?: MsScrollSnapTypeProperty, - msScrollTranslation?: MsScrollTranslationProperty, - msScrollbar3dlightColor?: MsScrollbar3dlightColorProperty, - msScrollbarArrowColor?: MsScrollbarArrowColorProperty, - msScrollbarBaseColor?: MsScrollbarBaseColorProperty, - msScrollbarDarkshadowColor?: MsScrollbarDarkshadowColorProperty, - msScrollbarFaceColor?: MsScrollbarFaceColorProperty, - msScrollbarHighlightColor?: MsScrollbarHighlightColorProperty, - msScrollbarShadowColor?: MsScrollbarShadowColorProperty, - msScrollbarTrackColor?: MsScrollbarTrackColorProperty, - msTextAutospace?: MsTextAutospaceProperty, - msTextCombineHorizontal?: TextCombineUprightProperty, - msTextOverflow?: TextOverflowProperty, - msTouchAction?: TouchActionProperty, - msTouchSelect?: MsTouchSelectProperty, - msTransform?: TransformProperty, - msTransformOrigin?: TransformOriginProperty<TLength>, - msTransitionDelay?: GlobalsString, - msTransitionDuration?: GlobalsString, - msTransitionProperty?: TransitionPropertyProperty, - msTransitionTimingFunction?: TransitionTimingFunctionProperty, - msUserSelect?: MsUserSelectProperty, - msWordBreak?: WordBreakProperty, - msWrapFlow?: MsWrapFlowProperty, - msWrapMargin?: MsWrapMarginProperty<TLength>, - msWrapThrough?: MsWrapThroughProperty, - msWritingMode?: WritingModeProperty, - WebkitAlignContent?: AlignContentProperty, - WebkitAlignItems?: AlignItemsProperty, - WebkitAlignSelf?: AlignSelfProperty, - WebkitAnimationDelay?: GlobalsString, - WebkitAnimationDirection?: AnimationDirectionProperty, - WebkitAnimationDuration?: GlobalsString, - WebkitAnimationFillMode?: AnimationFillModeProperty, - WebkitAnimationIterationCount?: AnimationIterationCountProperty, - WebkitAnimationName?: AnimationNameProperty, - WebkitAnimationPlayState?: AnimationPlayStateProperty, - WebkitAnimationTimingFunction?: AnimationTimingFunctionProperty, - WebkitAppearance?: WebkitAppearanceProperty, - WebkitBackdropFilter?: BackdropFilterProperty, - WebkitBackfaceVisibility?: BackfaceVisibilityProperty, - WebkitBackgroundClip?: BackgroundClipProperty, - WebkitBackgroundOrigin?: BackgroundOriginProperty, - WebkitBackgroundSize?: BackgroundSizeProperty<TLength>, - WebkitBorderBeforeColor?: WebkitBorderBeforeColorProperty, - WebkitBorderBeforeStyle?: WebkitBorderBeforeStyleProperty, - WebkitBorderBeforeWidth?: WebkitBorderBeforeWidthProperty<TLength>, - WebkitBorderBottomLeftRadius?: BorderBottomLeftRadiusProperty<TLength>, - WebkitBorderBottomRightRadius?: BorderBottomRightRadiusProperty<TLength>, - WebkitBorderImageSlice?: BorderImageSliceProperty, - WebkitBorderTopLeftRadius?: BorderTopLeftRadiusProperty<TLength>, - WebkitBorderTopRightRadius?: BorderTopRightRadiusProperty<TLength>, - WebkitBoxDecorationBreak?: BoxDecorationBreakProperty, - WebkitBoxReflect?: WebkitBoxReflectProperty<TLength>, - WebkitBoxShadow?: BoxShadowProperty, - WebkitBoxSizing?: BoxSizingProperty, - WebkitClipPath?: ClipPathProperty, - WebkitColumnCount?: ColumnCountProperty, - WebkitColumnFill?: ColumnFillProperty, - WebkitColumnRuleColor?: ColumnRuleColorProperty, - WebkitColumnRuleStyle?: ColumnRuleStyleProperty, - WebkitColumnRuleWidth?: ColumnRuleWidthProperty<TLength>, - WebkitColumnSpan?: ColumnSpanProperty, - WebkitColumnWidth?: ColumnWidthProperty<TLength>, - WebkitFilter?: FilterProperty, - WebkitFlexBasis?: FlexBasisProperty<TLength>, - WebkitFlexDirection?: FlexDirectionProperty, - WebkitFlexGrow?: GlobalsNumber, - WebkitFlexShrink?: GlobalsNumber, - WebkitFlexWrap?: FlexWrapProperty, - WebkitFontFeatureSettings?: FontFeatureSettingsProperty, - WebkitFontKerning?: FontKerningProperty, - WebkitFontSmoothing?: FontSmoothProperty<TLength>, - WebkitFontVariantLigatures?: FontVariantLigaturesProperty, - WebkitHyphenateCharacter?: HyphenateCharacterProperty, - WebkitHyphens?: HyphensProperty, - WebkitInitialLetter?: InitialLetterProperty, - WebkitJustifyContent?: JustifyContentProperty, - WebkitLineBreak?: LineBreakProperty, - WebkitLineClamp?: WebkitLineClampProperty, - WebkitMarginEnd?: MarginInlineEndProperty<TLength>, - WebkitMarginStart?: MarginInlineStartProperty<TLength>, - WebkitMaskAttachment?: WebkitMaskAttachmentProperty, - WebkitMaskBoxImageOutset?: MaskBorderOutsetProperty<TLength>, - WebkitMaskBoxImageRepeat?: MaskBorderRepeatProperty, - WebkitMaskBoxImageSlice?: MaskBorderSliceProperty, - WebkitMaskBoxImageSource?: MaskBorderSourceProperty, - WebkitMaskBoxImageWidth?: MaskBorderWidthProperty<TLength>, - WebkitMaskClip?: WebkitMaskClipProperty, - WebkitMaskComposite?: WebkitMaskCompositeProperty, - WebkitMaskImage?: WebkitMaskImageProperty, - WebkitMaskOrigin?: WebkitMaskOriginProperty, - WebkitMaskPosition?: WebkitMaskPositionProperty<TLength>, - WebkitMaskPositionX?: WebkitMaskPositionXProperty<TLength>, - WebkitMaskPositionY?: WebkitMaskPositionYProperty<TLength>, - WebkitMaskRepeat?: WebkitMaskRepeatProperty, - WebkitMaskRepeatX?: WebkitMaskRepeatXProperty, - WebkitMaskRepeatY?: WebkitMaskRepeatYProperty, - WebkitMaskSize?: WebkitMaskSizeProperty<TLength>, - WebkitMaxInlineSize?: MaxInlineSizeProperty<TLength>, - WebkitOrder?: GlobalsNumber, - WebkitOverflowScrolling?: WebkitOverflowScrollingProperty, - WebkitPaddingEnd?: PaddingInlineEndProperty<TLength>, - WebkitPaddingStart?: PaddingInlineStartProperty<TLength>, - WebkitPerspective?: PerspectiveProperty<TLength>, - WebkitPerspectiveOrigin?: PerspectiveOriginProperty<TLength>, - WebkitPrintColorAdjust?: PrintColorAdjustProperty, - WebkitRubyPosition?: RubyPositionProperty, - WebkitScrollSnapType?: ScrollSnapTypeProperty, - WebkitShapeMargin?: ShapeMarginProperty<TLength>, - WebkitTapHighlightColor?: WebkitTapHighlightColorProperty, - WebkitTextCombine?: TextCombineUprightProperty, - WebkitTextDecorationColor?: TextDecorationColorProperty, - WebkitTextDecorationLine?: TextDecorationLineProperty, - WebkitTextDecorationSkip?: TextDecorationSkipProperty, - WebkitTextDecorationStyle?: TextDecorationStyleProperty, - WebkitTextEmphasisColor?: TextEmphasisColorProperty, - WebkitTextEmphasisPosition?: GlobalsString, - WebkitTextEmphasisStyle?: TextEmphasisStyleProperty, - WebkitTextFillColor?: WebkitTextFillColorProperty, - WebkitTextOrientation?: TextOrientationProperty, - WebkitTextSizeAdjust?: TextSizeAdjustProperty, - WebkitTextStrokeColor?: WebkitTextStrokeColorProperty, - WebkitTextStrokeWidth?: WebkitTextStrokeWidthProperty<TLength>, - WebkitTextUnderlinePosition?: TextUnderlinePositionProperty, - WebkitTouchCallout?: WebkitTouchCalloutProperty, - WebkitTransform?: TransformProperty, - WebkitTransformOrigin?: TransformOriginProperty<TLength>, - WebkitTransformStyle?: TransformStyleProperty, - WebkitTransitionDelay?: GlobalsString, - WebkitTransitionDuration?: GlobalsString, - WebkitTransitionProperty?: TransitionPropertyProperty, - WebkitTransitionTimingFunction?: TransitionTimingFunctionProperty, - WebkitUserModify?: WebkitUserModifyProperty, - WebkitUserSelect?: UserSelectProperty, - WebkitWritingMode?: WritingModeProperty, -}; +export type StandardProperties<TLength = string | 0, TTime = string> = {| ...StandardLonghandProperties<TLength, TTime>, ...StandardShorthandProperties<TLength, TTime> |}; -export type VendorShorthandProperties<TLength = string | 0> = { - MozAnimation?: AnimationProperty, - MozBorderImage?: BorderImageProperty, - MozColumnRule?: ColumnRuleProperty<TLength>, - MozColumns?: ColumnsProperty<TLength>, - MozTransition?: TransitionProperty, - msContentZoomLimit?: GlobalsString, - msContentZoomSnap?: MsContentZoomSnapProperty, - msFlex?: FlexProperty<TLength>, - msScrollLimit?: GlobalsString, - msScrollSnapX?: GlobalsString, - msScrollSnapY?: GlobalsString, - msTransition?: TransitionProperty, - WebkitAnimation?: AnimationProperty, - WebkitBorderBefore?: WebkitBorderBeforeProperty<TLength>, - WebkitBorderImage?: BorderImageProperty, - WebkitBorderRadius?: BorderRadiusProperty<TLength>, - WebkitColumnRule?: ColumnRuleProperty<TLength>, - WebkitColumns?: ColumnsProperty<TLength>, - WebkitFlex?: FlexProperty<TLength>, - WebkitFlexFlow?: FlexFlowProperty, - WebkitMask?: WebkitMaskProperty<TLength>, - WebkitMaskBoxImage?: MaskBorderProperty, - WebkitTextEmphasis?: TextEmphasisProperty, - WebkitTextStroke?: WebkitTextStrokeProperty<TLength>, - WebkitTransition?: TransitionProperty, -}; +export type VendorLonghandProperties<TLength = string | 0, TTime = string> = {| + MozAnimationDelay?: Property$AnimationDelay<TTime>, + MozAnimationDirection?: Property$AnimationDirection, + MozAnimationDuration?: Property$AnimationDuration<TTime>, + MozAnimationFillMode?: Property$AnimationFillMode, + MozAnimationIterationCount?: Property$AnimationIterationCount, + MozAnimationName?: Property$AnimationName, + MozAnimationPlayState?: Property$AnimationPlayState, + MozAnimationTimingFunction?: Property$AnimationTimingFunction, + MozAppearance?: Property$MozAppearance, + MozBinding?: Property$MozBinding, + MozBorderBottomColors?: Property$MozBorderBottomColors, + MozBorderEndColor?: Property$BorderInlineEndColor, + MozBorderEndStyle?: Property$BorderInlineEndStyle, + MozBorderEndWidth?: Property$BorderInlineEndWidth<TLength>, + MozBorderLeftColors?: Property$MozBorderLeftColors, + MozBorderRightColors?: Property$MozBorderRightColors, + MozBorderStartColor?: Property$BorderInlineStartColor, + MozBorderStartStyle?: Property$BorderInlineStartStyle, + MozBorderTopColors?: Property$MozBorderTopColors, + MozBoxSizing?: Property$BoxSizing, + MozColumnCount?: Property$ColumnCount, + MozColumnFill?: Property$ColumnFill, + MozColumnRuleColor?: Property$ColumnRuleColor, + MozColumnRuleStyle?: Property$ColumnRuleStyle, + MozColumnRuleWidth?: Property$ColumnRuleWidth<TLength>, + MozColumnWidth?: Property$ColumnWidth<TLength>, + MozContextProperties?: Property$MozContextProperties, + MozFontFeatureSettings?: Property$FontFeatureSettings, + MozFontLanguageOverride?: Property$FontLanguageOverride, + MozHyphens?: Property$Hyphens, + MozImageRegion?: Property$MozImageRegion, + MozMarginEnd?: Property$MarginInlineEnd<TLength>, + MozMarginStart?: Property$MarginInlineStart<TLength>, + MozOrient?: Property$MozOrient, + MozOsxFontSmoothing?: Property$FontSmooth<TLength>, + MozOutlineRadiusBottomleft?: Property$MozOutlineRadiusBottomleft<TLength>, + MozOutlineRadiusBottomright?: Property$MozOutlineRadiusBottomright<TLength>, + MozOutlineRadiusTopleft?: Property$MozOutlineRadiusTopleft<TLength>, + MozOutlineRadiusTopright?: Property$MozOutlineRadiusTopright<TLength>, + MozPaddingEnd?: Property$PaddingInlineEnd<TLength>, + MozPaddingStart?: Property$PaddingInlineStart<TLength>, + MozStackSizing?: Property$MozStackSizing, + MozTabSize?: Property$TabSize<TLength>, + MozTextBlink?: Property$MozTextBlink, + MozTextSizeAdjust?: Property$TextSizeAdjust, + MozUserFocus?: Property$MozUserFocus, + MozUserModify?: Property$MozUserModify, + MozUserSelect?: Property$UserSelect, + MozWindowDragging?: Property$MozWindowDragging, + MozWindowShadow?: Property$MozWindowShadow, + msAccelerator?: Property$MsAccelerator, + msBlockProgression?: Property$MsBlockProgression, + msContentZoomChaining?: Property$MsContentZoomChaining, + msContentZoomLimitMax?: Property$MsContentZoomLimitMax, + msContentZoomLimitMin?: Property$MsContentZoomLimitMin, + msContentZoomSnapPoints?: Property$MsContentZoomSnapPoints, + msContentZoomSnapType?: Property$MsContentZoomSnapType, + msContentZooming?: Property$MsContentZooming, + msFilter?: Property$MsFilter, + msFlexDirection?: Property$FlexDirection, + msFlexPositive?: Property$FlexGrow, + msFlowFrom?: Property$MsFlowFrom, + msFlowInto?: Property$MsFlowInto, + msGridColumns?: Property$MsGridColumns<TLength>, + msGridRows?: Property$MsGridRows<TLength>, + msHighContrastAdjust?: Property$MsHighContrastAdjust, + msHyphenateLimitChars?: Property$MsHyphenateLimitChars, + msHyphenateLimitLines?: Property$MsHyphenateLimitLines, + msHyphenateLimitZone?: Property$MsHyphenateLimitZone<TLength>, + msHyphens?: Property$Hyphens, + msImeAlign?: Property$MsImeAlign, + msLineBreak?: Property$LineBreak, + msOrder?: Property$Order, + msOverflowStyle?: Property$MsOverflowStyle, + msOverflowX?: Property$OverflowX, + msOverflowY?: Property$OverflowY, + msScrollChaining?: Property$MsScrollChaining, + msScrollLimitXMax?: Property$MsScrollLimitXMax<TLength>, + msScrollLimitXMin?: Property$MsScrollLimitXMin<TLength>, + msScrollLimitYMax?: Property$MsScrollLimitYMax<TLength>, + msScrollLimitYMin?: Property$MsScrollLimitYMin<TLength>, + msScrollRails?: Property$MsScrollRails, + msScrollSnapPointsX?: Property$MsScrollSnapPointsX, + msScrollSnapPointsY?: Property$MsScrollSnapPointsY, + msScrollSnapType?: Property$MsScrollSnapType, + msScrollTranslation?: Property$MsScrollTranslation, + msScrollbar3dlightColor?: Property$MsScrollbar3dlightColor, + msScrollbarArrowColor?: Property$MsScrollbarArrowColor, + msScrollbarBaseColor?: Property$MsScrollbarBaseColor, + msScrollbarDarkshadowColor?: Property$MsScrollbarDarkshadowColor, + msScrollbarFaceColor?: Property$MsScrollbarFaceColor, + msScrollbarHighlightColor?: Property$MsScrollbarHighlightColor, + msScrollbarShadowColor?: Property$MsScrollbarShadowColor, + msScrollbarTrackColor?: Property$MsScrollbarTrackColor, + msTextAutospace?: Property$MsTextAutospace, + msTextCombineHorizontal?: Property$TextCombineUpright, + msTextOverflow?: Property$TextOverflow, + msTouchAction?: Property$TouchAction, + msTouchSelect?: Property$MsTouchSelect, + msTransform?: Property$Transform, + msTransformOrigin?: Property$TransformOrigin<TLength>, + msTransitionDelay?: Property$TransitionDelay<TTime>, + msTransitionDuration?: Property$TransitionDuration<TTime>, + msTransitionProperty?: Property$TransitionProperty, + msTransitionTimingFunction?: Property$TransitionTimingFunction, + msUserSelect?: Property$MsUserSelect, + msWordBreak?: Property$WordBreak, + msWrapFlow?: Property$MsWrapFlow, + msWrapMargin?: Property$MsWrapMargin<TLength>, + msWrapThrough?: Property$MsWrapThrough, + msWritingMode?: Property$WritingMode, + WebkitAlignContent?: Property$AlignContent, + WebkitAlignItems?: Property$AlignItems, + WebkitAlignSelf?: Property$AlignSelf, + WebkitAnimationDelay?: Property$AnimationDelay<TTime>, + WebkitAnimationDirection?: Property$AnimationDirection, + WebkitAnimationDuration?: Property$AnimationDuration<TTime>, + WebkitAnimationFillMode?: Property$AnimationFillMode, + WebkitAnimationIterationCount?: Property$AnimationIterationCount, + WebkitAnimationName?: Property$AnimationName, + WebkitAnimationPlayState?: Property$AnimationPlayState, + WebkitAnimationTimingFunction?: Property$AnimationTimingFunction, + WebkitAppearance?: Property$WebkitAppearance, + WebkitBackdropFilter?: Property$BackdropFilter, + WebkitBackfaceVisibility?: Property$BackfaceVisibility, + WebkitBackgroundClip?: Property$BackgroundClip, + WebkitBackgroundOrigin?: Property$BackgroundOrigin, + WebkitBackgroundSize?: Property$BackgroundSize<TLength>, + WebkitBorderBeforeColor?: Property$WebkitBorderBeforeColor, + WebkitBorderBeforeStyle?: Property$WebkitBorderBeforeStyle, + WebkitBorderBeforeWidth?: Property$WebkitBorderBeforeWidth<TLength>, + WebkitBorderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength>, + WebkitBorderBottomRightRadius?: Property$BorderBottomRightRadius<TLength>, + WebkitBorderImageSlice?: Property$BorderImageSlice, + WebkitBorderTopLeftRadius?: Property$BorderTopLeftRadius<TLength>, + WebkitBorderTopRightRadius?: Property$BorderTopRightRadius<TLength>, + WebkitBoxDecorationBreak?: Property$BoxDecorationBreak, + WebkitBoxReflect?: Property$WebkitBoxReflect<TLength>, + WebkitBoxShadow?: Property$BoxShadow, + WebkitBoxSizing?: Property$BoxSizing, + WebkitClipPath?: Property$ClipPath, + WebkitColumnCount?: Property$ColumnCount, + WebkitColumnFill?: Property$ColumnFill, + WebkitColumnRuleColor?: Property$ColumnRuleColor, + WebkitColumnRuleStyle?: Property$ColumnRuleStyle, + WebkitColumnRuleWidth?: Property$ColumnRuleWidth<TLength>, + WebkitColumnSpan?: Property$ColumnSpan, + WebkitColumnWidth?: Property$ColumnWidth<TLength>, + WebkitFilter?: Property$Filter, + WebkitFlexBasis?: Property$FlexBasis<TLength>, + WebkitFlexDirection?: Property$FlexDirection, + WebkitFlexGrow?: Property$FlexGrow, + WebkitFlexShrink?: Property$FlexShrink, + WebkitFlexWrap?: Property$FlexWrap, + WebkitFontFeatureSettings?: Property$FontFeatureSettings, + WebkitFontKerning?: Property$FontKerning, + WebkitFontSmoothing?: Property$FontSmooth<TLength>, + WebkitFontVariantLigatures?: Property$FontVariantLigatures, + WebkitHyphenateCharacter?: Property$HyphenateCharacter, + WebkitHyphens?: Property$Hyphens, + WebkitInitialLetter?: Property$InitialLetter, + WebkitJustifyContent?: Property$JustifyContent, + WebkitLineBreak?: Property$LineBreak, + WebkitLineClamp?: Property$WebkitLineClamp, + WebkitMarginEnd?: Property$MarginInlineEnd<TLength>, + WebkitMarginStart?: Property$MarginInlineStart<TLength>, + WebkitMaskAttachment?: Property$WebkitMaskAttachment, + WebkitMaskBoxImageOutset?: Property$MaskBorderOutset<TLength>, + WebkitMaskBoxImageRepeat?: Property$MaskBorderRepeat, + WebkitMaskBoxImageSlice?: Property$MaskBorderSlice, + WebkitMaskBoxImageSource?: Property$MaskBorderSource, + WebkitMaskBoxImageWidth?: Property$MaskBorderWidth<TLength>, + WebkitMaskClip?: Property$WebkitMaskClip, + WebkitMaskComposite?: Property$WebkitMaskComposite, + WebkitMaskImage?: Property$WebkitMaskImage, + WebkitMaskOrigin?: Property$WebkitMaskOrigin, + WebkitMaskPosition?: Property$WebkitMaskPosition<TLength>, + WebkitMaskPositionX?: Property$WebkitMaskPositionX<TLength>, + WebkitMaskPositionY?: Property$WebkitMaskPositionY<TLength>, + WebkitMaskRepeat?: Property$WebkitMaskRepeat, + WebkitMaskRepeatX?: Property$WebkitMaskRepeatX, + WebkitMaskRepeatY?: Property$WebkitMaskRepeatY, + WebkitMaskSize?: Property$WebkitMaskSize<TLength>, + WebkitMaxInlineSize?: Property$MaxInlineSize<TLength>, + WebkitOrder?: Property$Order, + WebkitOverflowScrolling?: Property$WebkitOverflowScrolling, + WebkitPaddingEnd?: Property$PaddingInlineEnd<TLength>, + WebkitPaddingStart?: Property$PaddingInlineStart<TLength>, + WebkitPerspective?: Property$Perspective<TLength>, + WebkitPerspectiveOrigin?: Property$PerspectiveOrigin<TLength>, + WebkitPrintColorAdjust?: Property$PrintColorAdjust, + WebkitRubyPosition?: Property$RubyPosition, + WebkitScrollSnapType?: Property$ScrollSnapType, + WebkitShapeMargin?: Property$ShapeMargin<TLength>, + WebkitTapHighlightColor?: Property$WebkitTapHighlightColor, + WebkitTextCombine?: Property$TextCombineUpright, + WebkitTextDecorationColor?: Property$TextDecorationColor, + WebkitTextDecorationLine?: Property$TextDecorationLine, + WebkitTextDecorationSkip?: Property$TextDecorationSkip, + WebkitTextDecorationStyle?: Property$TextDecorationStyle, + WebkitTextEmphasisColor?: Property$TextEmphasisColor, + WebkitTextEmphasisPosition?: Property$TextEmphasisPosition, + WebkitTextEmphasisStyle?: Property$TextEmphasisStyle, + WebkitTextFillColor?: Property$WebkitTextFillColor, + WebkitTextOrientation?: Property$TextOrientation, + WebkitTextSizeAdjust?: Property$TextSizeAdjust, + WebkitTextStrokeColor?: Property$WebkitTextStrokeColor, + WebkitTextStrokeWidth?: Property$WebkitTextStrokeWidth<TLength>, + WebkitTextUnderlinePosition?: Property$TextUnderlinePosition, + WebkitTouchCallout?: Property$WebkitTouchCallout, + WebkitTransform?: Property$Transform, + WebkitTransformOrigin?: Property$TransformOrigin<TLength>, + WebkitTransformStyle?: Property$TransformStyle, + WebkitTransitionDelay?: Property$TransitionDelay<TTime>, + WebkitTransitionDuration?: Property$TransitionDuration<TTime>, + WebkitTransitionProperty?: Property$TransitionProperty, + WebkitTransitionTimingFunction?: Property$TransitionTimingFunction, + WebkitUserModify?: Property$WebkitUserModify, + WebkitUserSelect?: Property$UserSelect, + WebkitWritingMode?: Property$WritingMode, +|}; -export type VendorProperties<TLength = string | 0> = VendorLonghandProperties<TLength> & VendorShorthandProperties<TLength>; +export type VendorShorthandProperties<TLength = string | 0, TTime = string> = {| + MozAnimation?: Property$Animation<TTime>, + MozBorderImage?: Property$BorderImage, + MozColumnRule?: Property$ColumnRule<TLength>, + MozColumns?: Property$Columns<TLength>, + MozOutlineRadius?: Property$MozOutlineRadius<TLength>, + msContentZoomLimit?: Property$MsContentZoomLimit, + msContentZoomSnap?: Property$MsContentZoomSnap, + msFlex?: Property$Flex<TLength>, + msScrollLimit?: Property$MsScrollLimit, + msScrollSnapX?: Property$MsScrollSnapX, + msScrollSnapY?: Property$MsScrollSnapY, + msTransition?: Property$Transition<TTime>, + WebkitAnimation?: Property$Animation<TTime>, + WebkitBorderBefore?: Property$WebkitBorderBefore<TLength>, + WebkitBorderImage?: Property$BorderImage, + WebkitBorderRadius?: Property$BorderRadius<TLength>, + WebkitColumnRule?: Property$ColumnRule<TLength>, + WebkitColumns?: Property$Columns<TLength>, + WebkitFlex?: Property$Flex<TLength>, + WebkitFlexFlow?: Property$FlexFlow, + WebkitMask?: Property$WebkitMask<TLength>, + WebkitMaskBoxImage?: Property$MaskBorder, + WebkitTextEmphasis?: Property$TextEmphasis, + WebkitTextStroke?: Property$WebkitTextStroke<TLength>, + WebkitTransition?: Property$Transition<TTime>, +|}; -export type ObsoleteProperties<TLength = string | 0> = { - azimuth?: AzimuthProperty, - boxAlign?: BoxAlignProperty, - boxDirection?: BoxDirectionProperty, - boxFlex?: GlobalsNumber, - boxFlexGroup?: GlobalsNumber, - boxLines?: BoxLinesProperty, - boxOrdinalGroup?: GlobalsNumber, - boxOrient?: BoxOrientProperty, - boxPack?: BoxPackProperty, - clip?: ClipProperty, - gridColumnGap?: GridColumnGapProperty<TLength>, - gridGap?: GridGapProperty<TLength>, - gridRowGap?: GridRowGapProperty<TLength>, - imeMode?: ImeModeProperty, - offsetBlock?: InsetBlockProperty<TLength>, - offsetBlockEnd?: InsetBlockEndProperty<TLength>, - offsetBlockStart?: InsetBlockStartProperty<TLength>, - offsetInline?: InsetInlineProperty<TLength>, - offsetInlineEnd?: InsetInlineEndProperty<TLength>, - offsetInlineStart?: InsetInlineStartProperty<TLength>, - scrollSnapCoordinate?: ScrollSnapCoordinateProperty<TLength>, - scrollSnapDestination?: ScrollSnapDestinationProperty<TLength>, - scrollSnapPointsX?: ScrollSnapPointsXProperty, - scrollSnapPointsY?: ScrollSnapPointsYProperty, - scrollSnapTypeX?: ScrollSnapTypeXProperty, - scrollSnapTypeY?: ScrollSnapTypeYProperty, - KhtmlBoxAlign?: BoxAlignProperty, - KhtmlBoxDirection?: BoxDirectionProperty, - KhtmlBoxFlex?: GlobalsNumber, - KhtmlBoxFlexGroup?: GlobalsNumber, - KhtmlBoxLines?: BoxLinesProperty, - KhtmlBoxOrdinalGroup?: GlobalsNumber, - KhtmlBoxOrient?: BoxOrientProperty, - KhtmlBoxPack?: BoxPackProperty, - KhtmlLineBreak?: LineBreakProperty, - KhtmlOpacity?: OpacityProperty, - KhtmlUserSelect?: UserSelectProperty, - MozBackgroundClip?: BackgroundClipProperty, - MozBackgroundInlinePolicy?: BoxDecorationBreakProperty, - MozBackgroundOrigin?: BackgroundOriginProperty, - MozBackgroundSize?: BackgroundSizeProperty<TLength>, - MozBinding?: MozBindingProperty, - MozBorderRadius?: BorderRadiusProperty<TLength>, - MozBorderRadiusBottomleft?: BorderBottomLeftRadiusProperty<TLength>, - MozBorderRadiusBottomright?: BorderBottomRightRadiusProperty<TLength>, - MozBorderRadiusTopleft?: BorderTopLeftRadiusProperty<TLength>, - MozBorderRadiusTopright?: BorderTopRightRadiusProperty<TLength>, - MozBoxAlign?: BoxAlignProperty, - MozBoxDirection?: BoxDirectionProperty, - MozBoxFlex?: GlobalsNumber, - MozBoxOrdinalGroup?: GlobalsNumber, - MozBoxOrient?: BoxOrientProperty, - MozBoxPack?: BoxPackProperty, - MozBoxShadow?: BoxShadowProperty, - MozFloatEdge?: MozFloatEdgeProperty, - MozForceBrokenImageIcon?: MozForceBrokenImageIconProperty, - MozOpacity?: OpacityProperty, - MozOutline?: OutlineProperty<TLength>, - MozOutlineColor?: OutlineColorProperty, - MozOutlineRadius?: MozOutlineRadiusProperty<TLength>, - MozOutlineRadiusBottomleft?: MozOutlineRadiusBottomleftProperty<TLength>, - MozOutlineRadiusBottomright?: MozOutlineRadiusBottomrightProperty<TLength>, - MozOutlineRadiusTopleft?: MozOutlineRadiusTopleftProperty<TLength>, - MozOutlineRadiusTopright?: MozOutlineRadiusToprightProperty<TLength>, - MozOutlineStyle?: OutlineStyleProperty, - MozOutlineWidth?: OutlineWidthProperty<TLength>, - MozTextAlignLast?: TextAlignLastProperty, - MozTextDecorationColor?: TextDecorationColorProperty, - MozTextDecorationLine?: TextDecorationLineProperty, - MozTextDecorationStyle?: TextDecorationStyleProperty, - MozUserInput?: MozUserInputProperty, - msImeMode?: ImeModeProperty, - OAnimation?: AnimationProperty, - OAnimationDelay?: GlobalsString, - OAnimationDirection?: AnimationDirectionProperty, - OAnimationDuration?: GlobalsString, - OAnimationFillMode?: AnimationFillModeProperty, - OAnimationIterationCount?: AnimationIterationCountProperty, - OAnimationName?: AnimationNameProperty, - OAnimationPlayState?: AnimationPlayStateProperty, - OAnimationTimingFunction?: AnimationTimingFunctionProperty, - OBackgroundSize?: BackgroundSizeProperty<TLength>, - OBorderImage?: BorderImageProperty, - OObjectFit?: ObjectFitProperty, - OObjectPosition?: ObjectPositionProperty<TLength>, - OTabSize?: TabSizeProperty<TLength>, - OTextOverflow?: TextOverflowProperty, - OTransform?: TransformProperty, - OTransformOrigin?: TransformOriginProperty<TLength>, - OTransition?: TransitionProperty, - OTransitionDelay?: GlobalsString, - OTransitionDuration?: GlobalsString, - OTransitionProperty?: TransitionPropertyProperty, - OTransitionTimingFunction?: TransitionTimingFunctionProperty, - WebkitBoxAlign?: BoxAlignProperty, - WebkitBoxDirection?: BoxDirectionProperty, - WebkitBoxFlex?: GlobalsNumber, - WebkitBoxFlexGroup?: GlobalsNumber, - WebkitBoxLines?: BoxLinesProperty, - WebkitBoxOrdinalGroup?: GlobalsNumber, - WebkitBoxOrient?: BoxOrientProperty, - WebkitBoxPack?: BoxPackProperty, - WebkitScrollSnapPointsX?: ScrollSnapPointsXProperty, - WebkitScrollSnapPointsY?: ScrollSnapPointsYProperty, -}; +export type VendorProperties<TLength = string | 0, TTime = string> = {| ...VendorLonghandProperties<TLength, TTime>, ...VendorShorthandProperties<TLength, TTime> |}; -export type SvgProperties<TLength = string | 0> = { - alignmentBaseline?: AlignmentBaselineProperty, - baselineShift?: BaselineShiftProperty<TLength>, - clip?: ClipProperty, - clipPath?: ClipPathProperty, - clipRule?: ClipRuleProperty, - color?: ColorProperty, - colorInterpolation?: ColorInterpolationProperty, - colorRendering?: ColorRenderingProperty, - cursor?: CursorProperty, - direction?: DirectionProperty, - display?: DisplayProperty, - dominantBaseline?: DominantBaselineProperty, - fill?: FillProperty, - fillOpacity?: GlobalsNumber, - fillRule?: FillRuleProperty, - filter?: FilterProperty, - floodColor?: FloodColorProperty, - floodOpacity?: GlobalsNumber, - font?: FontProperty, - fontFamily?: FontFamilyProperty, - fontSize?: FontSizeProperty<TLength>, - fontSizeAdjust?: FontSizeAdjustProperty, - fontStretch?: FontStretchProperty, - fontStyle?: FontStyleProperty, - fontVariant?: FontVariantProperty, - fontWeight?: FontWeightProperty, - glyphOrientationVertical?: GlyphOrientationVerticalProperty, - imageRendering?: ImageRenderingProperty, - letterSpacing?: LetterSpacingProperty<TLength>, - lightingColor?: LightingColorProperty, - lineHeight?: LineHeightProperty<TLength>, - marker?: MarkerProperty, - markerEnd?: MarkerEndProperty, - markerMid?: MarkerMidProperty, - markerStart?: MarkerStartProperty, - mask?: MaskProperty<TLength>, - opacity?: OpacityProperty, - overflow?: OverflowProperty, - paintOrder?: PaintOrderProperty, - pointerEvents?: PointerEventsProperty, - shapeRendering?: ShapeRenderingProperty, - stopColor?: StopColorProperty, - stopOpacity?: GlobalsNumber, - stroke?: StrokeProperty, - strokeDasharray?: StrokeDasharrayProperty<TLength>, - strokeDashoffset?: StrokeDashoffsetProperty<TLength>, - strokeLinecap?: StrokeLinecapProperty, - strokeLinejoin?: StrokeLinejoinProperty, - strokeMiterlimit?: GlobalsNumber, - strokeOpacity?: GlobalsNumber, - strokeWidth?: StrokeWidthProperty<TLength>, - textAnchor?: TextAnchorProperty, - textDecoration?: TextDecorationProperty<TLength>, - textRendering?: TextRenderingProperty, - unicodeBidi?: UnicodeBidiProperty, - vectorEffect?: VectorEffectProperty, - visibility?: VisibilityProperty, - whiteSpace?: WhiteSpaceProperty, - wordSpacing?: WordSpacingProperty<TLength>, - writingMode?: WritingModeProperty, -}; +export type ObsoleteProperties<TLength = string | 0, TTime = string> = {| + azimuth?: Property$Azimuth, + boxAlign?: Property$BoxAlign, + boxDirection?: Property$BoxDirection, + boxFlex?: Property$BoxFlex, + boxFlexGroup?: Property$BoxFlexGroup, + boxLines?: Property$BoxLines, + boxOrdinalGroup?: Property$BoxOrdinalGroup, + boxOrient?: Property$BoxOrient, + boxPack?: Property$BoxPack, + clip?: Property$Clip, + gridColumnGap?: Property$GridColumnGap<TLength>, + gridGap?: Property$GridGap<TLength>, + gridRowGap?: Property$GridRowGap<TLength>, + imeMode?: Property$ImeMode, + offsetBlock?: Property$InsetBlock<TLength>, + offsetBlockEnd?: Property$InsetBlockEnd<TLength>, + offsetBlockStart?: Property$InsetBlockStart<TLength>, + offsetInline?: Property$InsetInline<TLength>, + offsetInlineEnd?: Property$InsetInlineEnd<TLength>, + offsetInlineStart?: Property$InsetInlineStart<TLength>, + scrollSnapCoordinate?: Property$ScrollSnapCoordinate<TLength>, + scrollSnapDestination?: Property$ScrollSnapDestination<TLength>, + scrollSnapPointsX?: Property$ScrollSnapPointsX, + scrollSnapPointsY?: Property$ScrollSnapPointsY, + scrollSnapTypeX?: Property$ScrollSnapTypeX, + scrollSnapTypeY?: Property$ScrollSnapTypeY, + KhtmlBoxAlign?: Property$BoxAlign, + KhtmlBoxDirection?: Property$BoxDirection, + KhtmlBoxFlex?: Property$BoxFlex, + KhtmlBoxFlexGroup?: Property$BoxFlexGroup, + KhtmlBoxLines?: Property$BoxLines, + KhtmlBoxOrdinalGroup?: Property$BoxOrdinalGroup, + KhtmlBoxOrient?: Property$BoxOrient, + KhtmlBoxPack?: Property$BoxPack, + KhtmlLineBreak?: Property$LineBreak, + KhtmlOpacity?: Property$Opacity, + KhtmlUserSelect?: Property$UserSelect, + MozBackfaceVisibility?: Property$BackfaceVisibility, + MozBackgroundClip?: Property$BackgroundClip, + MozBackgroundInlinePolicy?: Property$BoxDecorationBreak, + MozBackgroundOrigin?: Property$BackgroundOrigin, + MozBackgroundSize?: Property$BackgroundSize<TLength>, + MozBorderRadius?: Property$BorderRadius<TLength>, + MozBorderRadiusBottomleft?: Property$BorderBottomLeftRadius<TLength>, + MozBorderRadiusBottomright?: Property$BorderBottomRightRadius<TLength>, + MozBorderRadiusTopleft?: Property$BorderTopLeftRadius<TLength>, + MozBorderRadiusTopright?: Property$BorderTopRightRadius<TLength>, + MozBoxAlign?: Property$BoxAlign, + MozBoxDirection?: Property$BoxDirection, + MozBoxFlex?: Property$BoxFlex, + MozBoxOrdinalGroup?: Property$BoxOrdinalGroup, + MozBoxOrient?: Property$BoxOrient, + MozBoxPack?: Property$BoxPack, + MozBoxShadow?: Property$BoxShadow, + MozFloatEdge?: Property$MozFloatEdge, + MozForceBrokenImageIcon?: Property$MozForceBrokenImageIcon, + MozOpacity?: Property$Opacity, + MozOutline?: Property$Outline<TLength>, + MozOutlineColor?: Property$OutlineColor, + MozOutlineStyle?: Property$OutlineStyle, + MozOutlineWidth?: Property$OutlineWidth<TLength>, + MozPerspective?: Property$Perspective<TLength>, + MozPerspectiveOrigin?: Property$PerspectiveOrigin<TLength>, + MozTextAlignLast?: Property$TextAlignLast, + MozTextDecorationColor?: Property$TextDecorationColor, + MozTextDecorationLine?: Property$TextDecorationLine, + MozTextDecorationStyle?: Property$TextDecorationStyle, + MozTransform?: Property$Transform, + MozTransformOrigin?: Property$TransformOrigin<TLength>, + MozTransformStyle?: Property$TransformStyle, + MozTransition?: Property$Transition<TTime>, + MozTransitionDelay?: Property$TransitionDelay<TTime>, + MozTransitionDuration?: Property$TransitionDuration<TTime>, + MozTransitionProperty?: Property$TransitionProperty, + MozTransitionTimingFunction?: Property$TransitionTimingFunction, + MozUserInput?: Property$MozUserInput, + msImeMode?: Property$ImeMode, + OAnimation?: Property$Animation<TTime>, + OAnimationDelay?: Property$AnimationDelay<TTime>, + OAnimationDirection?: Property$AnimationDirection, + OAnimationDuration?: Property$AnimationDuration<TTime>, + OAnimationFillMode?: Property$AnimationFillMode, + OAnimationIterationCount?: Property$AnimationIterationCount, + OAnimationName?: Property$AnimationName, + OAnimationPlayState?: Property$AnimationPlayState, + OAnimationTimingFunction?: Property$AnimationTimingFunction, + OBackgroundSize?: Property$BackgroundSize<TLength>, + OBorderImage?: Property$BorderImage, + OObjectFit?: Property$ObjectFit, + OObjectPosition?: Property$ObjectPosition<TLength>, + OTabSize?: Property$TabSize<TLength>, + OTextOverflow?: Property$TextOverflow, + OTransform?: Property$Transform, + OTransformOrigin?: Property$TransformOrigin<TLength>, + OTransition?: Property$Transition<TTime>, + OTransitionDelay?: Property$TransitionDelay<TTime>, + OTransitionDuration?: Property$TransitionDuration<TTime>, + OTransitionProperty?: Property$TransitionProperty, + OTransitionTimingFunction?: Property$TransitionTimingFunction, + WebkitBoxAlign?: Property$BoxAlign, + WebkitBoxDirection?: Property$BoxDirection, + WebkitBoxFlex?: Property$BoxFlex, + WebkitBoxFlexGroup?: Property$BoxFlexGroup, + WebkitBoxLines?: Property$BoxLines, + WebkitBoxOrdinalGroup?: Property$BoxOrdinalGroup, + WebkitBoxOrient?: Property$BoxOrient, + WebkitBoxPack?: Property$BoxPack, +|}; -export type Properties<TLength = string | 0> = StandardProperties<TLength> & VendorProperties<TLength> & ObsoleteProperties<TLength> & SvgProperties<TLength>; +export type SvgProperties<TLength = string | 0, TTime = string> = {| + alignmentBaseline?: Property$AlignmentBaseline, + baselineShift?: Property$BaselineShift<TLength>, + clip?: Property$Clip, + clipPath?: Property$ClipPath, + clipRule?: Property$ClipRule, + color?: Property$Color, + colorInterpolation?: Property$ColorInterpolation, + colorRendering?: Property$ColorRendering, + cursor?: Property$Cursor, + direction?: Property$Direction, + display?: Property$Display, + dominantBaseline?: Property$DominantBaseline, + fill?: Property$Fill, + fillOpacity?: Property$FillOpacity, + fillRule?: Property$FillRule, + filter?: Property$Filter, + floodColor?: Property$FloodColor, + floodOpacity?: Property$FloodOpacity, + font?: Property$Font, + fontFamily?: Property$FontFamily, + fontSize?: Property$FontSize<TLength>, + fontSizeAdjust?: Property$FontSizeAdjust, + fontStretch?: Property$FontStretch, + fontStyle?: Property$FontStyle, + fontVariant?: Property$FontVariant, + fontWeight?: Property$FontWeight, + glyphOrientationVertical?: Property$GlyphOrientationVertical, + imageRendering?: Property$ImageRendering, + letterSpacing?: Property$LetterSpacing<TLength>, + lightingColor?: Property$LightingColor, + lineHeight?: Property$LineHeight<TLength>, + marker?: Property$Marker, + markerEnd?: Property$MarkerEnd, + markerMid?: Property$MarkerMid, + markerStart?: Property$MarkerStart, + mask?: Property$Mask<TLength>, + opacity?: Property$Opacity, + overflow?: Property$Overflow, + paintOrder?: Property$PaintOrder, + pointerEvents?: Property$PointerEvents, + shapeRendering?: Property$ShapeRendering, + stopColor?: Property$StopColor, + stopOpacity?: Property$StopOpacity, + stroke?: Property$Stroke, + strokeDasharray?: Property$StrokeDasharray<TLength>, + strokeDashoffset?: Property$StrokeDashoffset<TLength>, + strokeLinecap?: Property$StrokeLinecap, + strokeLinejoin?: Property$StrokeLinejoin, + strokeMiterlimit?: Property$StrokeMiterlimit, + strokeOpacity?: Property$StrokeOpacity, + strokeWidth?: Property$StrokeWidth<TLength>, + textAnchor?: Property$TextAnchor, + textDecoration?: Property$TextDecoration<TLength>, + textRendering?: Property$TextRendering, + unicodeBidi?: Property$UnicodeBidi, + vectorEffect?: Property$VectorEffect, + visibility?: Property$Visibility, + whiteSpace?: Property$WhiteSpace, + wordSpacing?: Property$WordSpacing<TLength>, + writingMode?: Property$WritingMode, +|}; -export type StandardLonghandPropertiesHyphen<TLength = string | 0> = { - "accent-color"?: AccentColorProperty, - "align-content"?: AlignContentProperty, - "align-items"?: AlignItemsProperty, - "align-self"?: AlignSelfProperty, - "align-tracks"?: AlignTracksProperty, - "animation-composition"?: GlobalsString, - "animation-delay"?: GlobalsString, - "animation-direction"?: AnimationDirectionProperty, - "animation-duration"?: GlobalsString, - "animation-fill-mode"?: AnimationFillModeProperty, - "animation-iteration-count"?: AnimationIterationCountProperty, - "animation-name"?: AnimationNameProperty, - "animation-play-state"?: AnimationPlayStateProperty, - "animation-timeline"?: AnimationTimelineProperty, - "animation-timing-function"?: AnimationTimingFunctionProperty, - appearance?: AppearanceProperty, - "aspect-ratio"?: AspectRatioProperty, - "backdrop-filter"?: BackdropFilterProperty, - "backface-visibility"?: BackfaceVisibilityProperty, - "background-attachment"?: BackgroundAttachmentProperty, - "background-blend-mode"?: BackgroundBlendModeProperty, - "background-clip"?: BackgroundClipProperty, - "background-color"?: BackgroundColorProperty, - "background-image"?: BackgroundImageProperty, - "background-origin"?: BackgroundOriginProperty, - "background-position-x"?: BackgroundPositionXProperty<TLength>, - "background-position-y"?: BackgroundPositionYProperty<TLength>, - "background-repeat"?: BackgroundRepeatProperty, - "background-size"?: BackgroundSizeProperty<TLength>, - "block-overflow"?: BlockOverflowProperty, - "block-size"?: BlockSizeProperty<TLength>, - "border-block-color"?: BorderBlockColorProperty, - "border-block-end-color"?: BorderBlockEndColorProperty, - "border-block-end-style"?: BorderBlockEndStyleProperty, - "border-block-end-width"?: BorderBlockEndWidthProperty<TLength>, - "border-block-start-color"?: BorderBlockStartColorProperty, - "border-block-start-style"?: BorderBlockStartStyleProperty, - "border-block-start-width"?: BorderBlockStartWidthProperty<TLength>, - "border-block-style"?: BorderBlockStyleProperty, - "border-block-width"?: BorderBlockWidthProperty<TLength>, - "border-bottom-color"?: BorderBottomColorProperty, - "border-bottom-left-radius"?: BorderBottomLeftRadiusProperty<TLength>, - "border-bottom-right-radius"?: BorderBottomRightRadiusProperty<TLength>, - "border-bottom-style"?: BorderBottomStyleProperty, - "border-bottom-width"?: BorderBottomWidthProperty<TLength>, - "border-collapse"?: BorderCollapseProperty, - "border-end-end-radius"?: BorderEndEndRadiusProperty<TLength>, - "border-end-start-radius"?: BorderEndStartRadiusProperty<TLength>, - "border-image-outset"?: BorderImageOutsetProperty<TLength>, - "border-image-repeat"?: BorderImageRepeatProperty, - "border-image-slice"?: BorderImageSliceProperty, - "border-image-source"?: BorderImageSourceProperty, - "border-image-width"?: BorderImageWidthProperty<TLength>, - "border-inline-color"?: BorderInlineColorProperty, - "border-inline-end-color"?: BorderInlineEndColorProperty, - "border-inline-end-style"?: BorderInlineEndStyleProperty, - "border-inline-end-width"?: BorderInlineEndWidthProperty<TLength>, - "border-inline-start-color"?: BorderInlineStartColorProperty, - "border-inline-start-style"?: BorderInlineStartStyleProperty, - "border-inline-start-width"?: BorderInlineStartWidthProperty<TLength>, - "border-inline-style"?: BorderInlineStyleProperty, - "border-inline-width"?: BorderInlineWidthProperty<TLength>, - "border-left-color"?: BorderLeftColorProperty, - "border-left-style"?: BorderLeftStyleProperty, - "border-left-width"?: BorderLeftWidthProperty<TLength>, - "border-right-color"?: BorderRightColorProperty, - "border-right-style"?: BorderRightStyleProperty, - "border-right-width"?: BorderRightWidthProperty<TLength>, - "border-spacing"?: BorderSpacingProperty<TLength>, - "border-start-end-radius"?: BorderStartEndRadiusProperty<TLength>, - "border-start-start-radius"?: BorderStartStartRadiusProperty<TLength>, - "border-top-color"?: BorderTopColorProperty, - "border-top-left-radius"?: BorderTopLeftRadiusProperty<TLength>, - "border-top-right-radius"?: BorderTopRightRadiusProperty<TLength>, - "border-top-style"?: BorderTopStyleProperty, - "border-top-width"?: BorderTopWidthProperty<TLength>, - bottom?: BottomProperty<TLength>, - "box-decoration-break"?: BoxDecorationBreakProperty, - "box-shadow"?: BoxShadowProperty, - "box-sizing"?: BoxSizingProperty, - "break-after"?: BreakAfterProperty, - "break-before"?: BreakBeforeProperty, - "break-inside"?: BreakInsideProperty, - "caption-side"?: CaptionSideProperty, - "caret-color"?: CaretColorProperty, - clear?: ClearProperty, - "clip-path"?: ClipPathProperty, - color?: ColorProperty, - "color-adjust"?: PrintColorAdjustProperty, - "color-scheme"?: ColorSchemeProperty, - "column-count"?: ColumnCountProperty, - "column-fill"?: ColumnFillProperty, - "column-gap"?: ColumnGapProperty<TLength>, - "column-rule-color"?: ColumnRuleColorProperty, - "column-rule-style"?: ColumnRuleStyleProperty, - "column-rule-width"?: ColumnRuleWidthProperty<TLength>, - "column-span"?: ColumnSpanProperty, - "column-width"?: ColumnWidthProperty<TLength>, - contain?: ContainProperty, - content?: ContentProperty, - "content-visibility"?: ContentVisibilityProperty, - "counter-increment"?: CounterIncrementProperty, - "counter-reset"?: CounterResetProperty, - "counter-set"?: CounterSetProperty, - cursor?: CursorProperty, - direction?: DirectionProperty, - display?: DisplayProperty, - "empty-cells"?: EmptyCellsProperty, - filter?: FilterProperty, - "flex-basis"?: FlexBasisProperty<TLength>, - "flex-direction"?: FlexDirectionProperty, - "flex-grow"?: GlobalsNumber, - "flex-shrink"?: GlobalsNumber, - "flex-wrap"?: FlexWrapProperty, - float?: FloatProperty, - "font-family"?: FontFamilyProperty, - "font-feature-settings"?: FontFeatureSettingsProperty, - "font-kerning"?: FontKerningProperty, - "font-language-override"?: FontLanguageOverrideProperty, - "font-optical-sizing"?: FontOpticalSizingProperty, - "font-size"?: FontSizeProperty<TLength>, - "font-size-adjust"?: FontSizeAdjustProperty, - "font-smooth"?: FontSmoothProperty<TLength>, - "font-stretch"?: FontStretchProperty, - "font-style"?: FontStyleProperty, - "font-synthesis"?: FontSynthesisProperty, - "font-variant"?: FontVariantProperty, - "font-variant-alternates"?: FontVariantAlternatesProperty, - "font-variant-caps"?: FontVariantCapsProperty, - "font-variant-east-asian"?: FontVariantEastAsianProperty, - "font-variant-ligatures"?: FontVariantLigaturesProperty, - "font-variant-numeric"?: FontVariantNumericProperty, - "font-variant-position"?: FontVariantPositionProperty, - "font-variation-settings"?: FontVariationSettingsProperty, - "font-weight"?: FontWeightProperty, - "forced-color-adjust"?: ForcedColorAdjustProperty, - "grid-auto-columns"?: GridAutoColumnsProperty<TLength>, - "grid-auto-flow"?: GridAutoFlowProperty, - "grid-auto-rows"?: GridAutoRowsProperty<TLength>, - "grid-column-end"?: GridColumnEndProperty, - "grid-column-start"?: GridColumnStartProperty, - "grid-row-end"?: GridRowEndProperty, - "grid-row-start"?: GridRowStartProperty, - "grid-template-areas"?: GridTemplateAreasProperty, - "grid-template-columns"?: GridTemplateColumnsProperty<TLength>, - "grid-template-rows"?: GridTemplateRowsProperty<TLength>, - "hanging-punctuation"?: HangingPunctuationProperty, - height?: HeightProperty<TLength>, - "hyphenate-character"?: HyphenateCharacterProperty, - hyphens?: HyphensProperty, - "image-orientation"?: ImageOrientationProperty, - "image-rendering"?: ImageRenderingProperty, - "image-resolution"?: ImageResolutionProperty, - "initial-letter"?: InitialLetterProperty, - "inline-size"?: InlineSizeProperty<TLength>, - "input-security"?: InputSecurityProperty, - inset?: InsetProperty<TLength>, - "inset-block"?: InsetBlockProperty<TLength>, - "inset-block-end"?: InsetBlockEndProperty<TLength>, - "inset-block-start"?: InsetBlockStartProperty<TLength>, - "inset-inline"?: InsetInlineProperty<TLength>, - "inset-inline-end"?: InsetInlineEndProperty<TLength>, - "inset-inline-start"?: InsetInlineStartProperty<TLength>, - isolation?: IsolationProperty, - "justify-content"?: JustifyContentProperty, - "justify-items"?: JustifyItemsProperty, - "justify-self"?: JustifySelfProperty, - "justify-tracks"?: JustifyTracksProperty, - left?: LeftProperty<TLength>, - "letter-spacing"?: LetterSpacingProperty<TLength>, - "line-break"?: LineBreakProperty, - "line-height"?: LineHeightProperty<TLength>, - "line-height-step"?: LineHeightStepProperty<TLength>, - "list-style-image"?: ListStyleImageProperty, - "list-style-position"?: ListStylePositionProperty, - "list-style-type"?: ListStyleTypeProperty, - "margin-block"?: MarginBlockProperty<TLength>, - "margin-block-end"?: MarginBlockEndProperty<TLength>, - "margin-block-start"?: MarginBlockStartProperty<TLength>, - "margin-bottom"?: MarginBottomProperty<TLength>, - "margin-inline"?: MarginInlineProperty<TLength>, - "margin-inline-end"?: MarginInlineEndProperty<TLength>, - "margin-inline-start"?: MarginInlineStartProperty<TLength>, - "margin-left"?: MarginLeftProperty<TLength>, - "margin-right"?: MarginRightProperty<TLength>, - "margin-top"?: MarginTopProperty<TLength>, - "mask-border-mode"?: MaskBorderModeProperty, - "mask-border-outset"?: MaskBorderOutsetProperty<TLength>, - "mask-border-repeat"?: MaskBorderRepeatProperty, - "mask-border-slice"?: MaskBorderSliceProperty, - "mask-border-source"?: MaskBorderSourceProperty, - "mask-border-width"?: MaskBorderWidthProperty<TLength>, - "mask-clip"?: MaskClipProperty, - "mask-composite"?: MaskCompositeProperty, - "mask-image"?: MaskImageProperty, - "mask-mode"?: MaskModeProperty, - "mask-origin"?: MaskOriginProperty, - "mask-position"?: MaskPositionProperty<TLength>, - "mask-repeat"?: MaskRepeatProperty, - "mask-size"?: MaskSizeProperty<TLength>, - "mask-type"?: MaskTypeProperty, - "math-depth"?: MathDepthProperty, - "math-shift"?: MathShiftProperty, - "math-style"?: MathStyleProperty, - "max-block-size"?: MaxBlockSizeProperty<TLength>, - "max-height"?: MaxHeightProperty<TLength>, - "max-inline-size"?: MaxInlineSizeProperty<TLength>, - "max-lines"?: MaxLinesProperty, - "max-width"?: MaxWidthProperty<TLength>, - "min-block-size"?: MinBlockSizeProperty<TLength>, - "min-height"?: MinHeightProperty<TLength>, - "min-inline-size"?: MinInlineSizeProperty<TLength>, - "min-width"?: MinWidthProperty<TLength>, - "mix-blend-mode"?: MixBlendModeProperty, - "motion-distance"?: OffsetDistanceProperty<TLength>, - "motion-path"?: OffsetPathProperty, - "motion-rotation"?: OffsetRotateProperty, - "object-fit"?: ObjectFitProperty, - "object-position"?: ObjectPositionProperty<TLength>, - "offset-anchor"?: OffsetAnchorProperty<TLength>, - "offset-distance"?: OffsetDistanceProperty<TLength>, - "offset-path"?: OffsetPathProperty, - "offset-rotate"?: OffsetRotateProperty, - "offset-rotation"?: OffsetRotateProperty, - opacity?: OpacityProperty, - order?: GlobalsNumber, - orphans?: GlobalsNumber, - "outline-color"?: OutlineColorProperty, - "outline-offset"?: OutlineOffsetProperty<TLength>, - "outline-style"?: OutlineStyleProperty, - "outline-width"?: OutlineWidthProperty<TLength>, - "overflow-anchor"?: OverflowAnchorProperty, - "overflow-block"?: OverflowBlockProperty, - "overflow-clip-box"?: OverflowClipBoxProperty, - "overflow-clip-margin"?: OverflowClipMarginProperty<TLength>, - "overflow-inline"?: OverflowInlineProperty, - "overflow-wrap"?: OverflowWrapProperty, - "overflow-x"?: OverflowXProperty, - "overflow-y"?: OverflowYProperty, - "overscroll-behavior-block"?: OverscrollBehaviorBlockProperty, - "overscroll-behavior-inline"?: OverscrollBehaviorInlineProperty, - "overscroll-behavior-x"?: OverscrollBehaviorXProperty, - "overscroll-behavior-y"?: OverscrollBehaviorYProperty, - "padding-block"?: PaddingBlockProperty<TLength>, - "padding-block-end"?: PaddingBlockEndProperty<TLength>, - "padding-block-start"?: PaddingBlockStartProperty<TLength>, - "padding-bottom"?: PaddingBottomProperty<TLength>, - "padding-inline"?: PaddingInlineProperty<TLength>, - "padding-inline-end"?: PaddingInlineEndProperty<TLength>, - "padding-inline-start"?: PaddingInlineStartProperty<TLength>, - "padding-left"?: PaddingLeftProperty<TLength>, - "padding-right"?: PaddingRightProperty<TLength>, - "padding-top"?: PaddingTopProperty<TLength>, - "page-break-after"?: PageBreakAfterProperty, - "page-break-before"?: PageBreakBeforeProperty, - "page-break-inside"?: PageBreakInsideProperty, - "paint-order"?: PaintOrderProperty, - perspective?: PerspectiveProperty<TLength>, - "perspective-origin"?: PerspectiveOriginProperty<TLength>, - "place-content"?: PlaceContentProperty, - "pointer-events"?: PointerEventsProperty, - position?: PositionProperty, - "print-color-adjust"?: PrintColorAdjustProperty, - quotes?: QuotesProperty, - resize?: ResizeProperty, - right?: RightProperty<TLength>, - rotate?: RotateProperty, - "row-gap"?: RowGapProperty<TLength>, - "ruby-align"?: RubyAlignProperty, - "ruby-merge"?: RubyMergeProperty, - "ruby-position"?: RubyPositionProperty, - scale?: ScaleProperty, - "scroll-behavior"?: ScrollBehaviorProperty, - "scroll-margin"?: ScrollMarginProperty<TLength>, - "scroll-margin-block"?: ScrollMarginBlockProperty<TLength>, - "scroll-margin-block-end"?: ScrollMarginBlockEndProperty<TLength>, - "scroll-margin-block-start"?: ScrollMarginBlockStartProperty<TLength>, - "scroll-margin-bottom"?: ScrollMarginBottomProperty<TLength>, - "scroll-margin-inline"?: ScrollMarginInlineProperty<TLength>, - "scroll-margin-inline-end"?: ScrollMarginInlineEndProperty<TLength>, - "scroll-margin-inline-start"?: ScrollMarginInlineStartProperty<TLength>, - "scroll-margin-left"?: ScrollMarginLeftProperty<TLength>, - "scroll-margin-right"?: ScrollMarginRightProperty<TLength>, - "scroll-margin-top"?: ScrollMarginTopProperty<TLength>, - "scroll-padding"?: ScrollPaddingProperty<TLength>, - "scroll-padding-block"?: ScrollPaddingBlockProperty<TLength>, - "scroll-padding-block-end"?: ScrollPaddingBlockEndProperty<TLength>, - "scroll-padding-block-start"?: ScrollPaddingBlockStartProperty<TLength>, - "scroll-padding-bottom"?: ScrollPaddingBottomProperty<TLength>, - "scroll-padding-inline"?: ScrollPaddingInlineProperty<TLength>, - "scroll-padding-inline-end"?: ScrollPaddingInlineEndProperty<TLength>, - "scroll-padding-inline-start"?: ScrollPaddingInlineStartProperty<TLength>, - "scroll-padding-left"?: ScrollPaddingLeftProperty<TLength>, - "scroll-padding-right"?: ScrollPaddingRightProperty<TLength>, - "scroll-padding-top"?: ScrollPaddingTopProperty<TLength>, - "scroll-snap-align"?: ScrollSnapAlignProperty, - "scroll-snap-margin"?: ScrollMarginProperty<TLength>, - "scroll-snap-margin-bottom"?: ScrollMarginBottomProperty<TLength>, - "scroll-snap-margin-left"?: ScrollMarginLeftProperty<TLength>, - "scroll-snap-margin-right"?: ScrollMarginRightProperty<TLength>, - "scroll-snap-margin-top"?: ScrollMarginTopProperty<TLength>, - "scroll-snap-stop"?: ScrollSnapStopProperty, - "scroll-snap-type"?: ScrollSnapTypeProperty, - "scrollbar-color"?: ScrollbarColorProperty, - "scrollbar-gutter"?: ScrollbarGutterProperty, - "scrollbar-width"?: ScrollbarWidthProperty, - "shape-image-threshold"?: ShapeImageThresholdProperty, - "shape-margin"?: ShapeMarginProperty<TLength>, - "shape-outside"?: ShapeOutsideProperty, - "tab-size"?: TabSizeProperty<TLength>, - "table-layout"?: TableLayoutProperty, - "text-align"?: TextAlignProperty, - "text-align-last"?: TextAlignLastProperty, - "text-combine-upright"?: TextCombineUprightProperty, - "text-decoration-color"?: TextDecorationColorProperty, - "text-decoration-line"?: TextDecorationLineProperty, - "text-decoration-skip"?: TextDecorationSkipProperty, - "text-decoration-skip-ink"?: TextDecorationSkipInkProperty, - "text-decoration-style"?: TextDecorationStyleProperty, - "text-decoration-thickness"?: TextDecorationThicknessProperty<TLength>, - "text-emphasis-color"?: TextEmphasisColorProperty, - "text-emphasis-position"?: GlobalsString, - "text-emphasis-style"?: TextEmphasisStyleProperty, - "text-indent"?: TextIndentProperty<TLength>, - "text-justify"?: TextJustifyProperty, - "text-orientation"?: TextOrientationProperty, - "text-overflow"?: TextOverflowProperty, - "text-rendering"?: TextRenderingProperty, - "text-shadow"?: TextShadowProperty, - "text-size-adjust"?: TextSizeAdjustProperty, - "text-transform"?: TextTransformProperty, - "text-underline-offset"?: TextUnderlineOffsetProperty<TLength>, - "text-underline-position"?: TextUnderlinePositionProperty, - top?: TopProperty<TLength>, - "touch-action"?: TouchActionProperty, - transform?: TransformProperty, - "transform-box"?: TransformBoxProperty, - "transform-origin"?: TransformOriginProperty<TLength>, - "transform-style"?: TransformStyleProperty, - "transition-delay"?: GlobalsString, - "transition-duration"?: GlobalsString, - "transition-property"?: TransitionPropertyProperty, - "transition-timing-function"?: TransitionTimingFunctionProperty, - translate?: TranslateProperty<TLength>, - "unicode-bidi"?: UnicodeBidiProperty, - "user-select"?: UserSelectProperty, - "vertical-align"?: VerticalAlignProperty<TLength>, - visibility?: VisibilityProperty, - "white-space"?: WhiteSpaceProperty, - widows?: GlobalsNumber, - width?: WidthProperty<TLength>, - "will-change"?: WillChangeProperty, - "word-break"?: WordBreakProperty, - "word-spacing"?: WordSpacingProperty<TLength>, - "word-wrap"?: WordWrapProperty, - "writing-mode"?: WritingModeProperty, - "z-index"?: ZIndexProperty, - zoom?: ZoomProperty, -}; +export type Properties<TLength = string | 0, TTime = string> = {| + ...StandardProperties<TLength, TTime>, + ...VendorProperties<TLength, TTime>, + ...ObsoleteProperties<TLength, TTime>, + ...SvgProperties<TLength, TTime>, +|}; -export type StandardShorthandPropertiesHyphen<TLength = string | 0> = { - all?: Globals, - animation?: AnimationProperty, - background?: BackgroundProperty<TLength>, - "background-position"?: BackgroundPositionProperty<TLength>, - border?: BorderProperty<TLength>, - "border-block"?: BorderBlockProperty<TLength>, - "border-block-end"?: BorderBlockEndProperty<TLength>, - "border-block-start"?: BorderBlockStartProperty<TLength>, - "border-bottom"?: BorderBottomProperty<TLength>, - "border-color"?: BorderColorProperty, - "border-image"?: BorderImageProperty, - "border-inline"?: BorderInlineProperty<TLength>, - "border-inline-end"?: BorderInlineEndProperty<TLength>, - "border-inline-start"?: BorderInlineStartProperty<TLength>, - "border-left"?: BorderLeftProperty<TLength>, - "border-radius"?: BorderRadiusProperty<TLength>, - "border-right"?: BorderRightProperty<TLength>, - "border-style"?: BorderStyleProperty, - "border-top"?: BorderTopProperty<TLength>, - "border-width"?: BorderWidthProperty<TLength>, - "column-rule"?: ColumnRuleProperty<TLength>, - columns?: ColumnsProperty<TLength>, - flex?: FlexProperty<TLength>, - "flex-flow"?: FlexFlowProperty, - font?: FontProperty, - gap?: GapProperty<TLength>, - grid?: GridProperty, - "grid-area"?: GridAreaProperty, - "grid-column"?: GridColumnProperty, - "grid-row"?: GridRowProperty, - "grid-template"?: GridTemplateProperty, - "line-clamp"?: LineClampProperty, - "list-style"?: ListStyleProperty, - margin?: MarginProperty<TLength>, - mask?: MaskProperty<TLength>, - "mask-border"?: MaskBorderProperty, - motion?: OffsetProperty<TLength>, - offset?: OffsetProperty<TLength>, - outline?: OutlineProperty<TLength>, - overflow?: OverflowProperty, - "overscroll-behavior"?: OverscrollBehaviorProperty, - padding?: PaddingProperty<TLength>, - "place-items"?: PlaceItemsProperty, - "place-self"?: PlaceSelfProperty, - "text-decoration"?: TextDecorationProperty<TLength>, - "text-emphasis"?: TextEmphasisProperty, - transition?: TransitionProperty, -}; +export type StandardLonghandPropertiesHyphen<TLength = string | 0, TTime = string> = {| + "accent-color"?: Property$AccentColor, + "align-content"?: Property$AlignContent, + "align-items"?: Property$AlignItems, + "align-self"?: Property$AlignSelf, + "align-tracks"?: Property$AlignTracks, + "animation-composition"?: Property$AnimationComposition, + "animation-delay"?: Property$AnimationDelay<TTime>, + "animation-direction"?: Property$AnimationDirection, + "animation-duration"?: Property$AnimationDuration<TTime>, + "animation-fill-mode"?: Property$AnimationFillMode, + "animation-iteration-count"?: Property$AnimationIterationCount, + "animation-name"?: Property$AnimationName, + "animation-play-state"?: Property$AnimationPlayState, + "animation-range-end"?: Property$AnimationRangeEnd<TLength>, + "animation-range-start"?: Property$AnimationRangeStart<TLength>, + "animation-timeline"?: Property$AnimationTimeline, + "animation-timing-function"?: Property$AnimationTimingFunction, + appearance?: Property$Appearance, + "aspect-ratio"?: Property$AspectRatio, + "backdrop-filter"?: Property$BackdropFilter, + "backface-visibility"?: Property$BackfaceVisibility, + "background-attachment"?: Property$BackgroundAttachment, + "background-blend-mode"?: Property$BackgroundBlendMode, + "background-clip"?: Property$BackgroundClip, + "background-color"?: Property$BackgroundColor, + "background-image"?: Property$BackgroundImage, + "background-origin"?: Property$BackgroundOrigin, + "background-position-x"?: Property$BackgroundPositionX<TLength>, + "background-position-y"?: Property$BackgroundPositionY<TLength>, + "background-repeat"?: Property$BackgroundRepeat, + "background-size"?: Property$BackgroundSize<TLength>, + "block-overflow"?: Property$BlockOverflow, + "block-size"?: Property$BlockSize<TLength>, + "border-block-color"?: Property$BorderBlockColor, + "border-block-end-color"?: Property$BorderBlockEndColor, + "border-block-end-style"?: Property$BorderBlockEndStyle, + "border-block-end-width"?: Property$BorderBlockEndWidth<TLength>, + "border-block-start-color"?: Property$BorderBlockStartColor, + "border-block-start-style"?: Property$BorderBlockStartStyle, + "border-block-start-width"?: Property$BorderBlockStartWidth<TLength>, + "border-block-style"?: Property$BorderBlockStyle, + "border-block-width"?: Property$BorderBlockWidth<TLength>, + "border-bottom-color"?: Property$BorderBottomColor, + "border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength>, + "border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength>, + "border-bottom-style"?: Property$BorderBottomStyle, + "border-bottom-width"?: Property$BorderBottomWidth<TLength>, + "border-collapse"?: Property$BorderCollapse, + "border-end-end-radius"?: Property$BorderEndEndRadius<TLength>, + "border-end-start-radius"?: Property$BorderEndStartRadius<TLength>, + "border-image-outset"?: Property$BorderImageOutset<TLength>, + "border-image-repeat"?: Property$BorderImageRepeat, + "border-image-slice"?: Property$BorderImageSlice, + "border-image-source"?: Property$BorderImageSource, + "border-image-width"?: Property$BorderImageWidth<TLength>, + "border-inline-color"?: Property$BorderInlineColor, + "border-inline-end-color"?: Property$BorderInlineEndColor, + "border-inline-end-style"?: Property$BorderInlineEndStyle, + "border-inline-end-width"?: Property$BorderInlineEndWidth<TLength>, + "border-inline-start-color"?: Property$BorderInlineStartColor, + "border-inline-start-style"?: Property$BorderInlineStartStyle, + "border-inline-start-width"?: Property$BorderInlineStartWidth<TLength>, + "border-inline-style"?: Property$BorderInlineStyle, + "border-inline-width"?: Property$BorderInlineWidth<TLength>, + "border-left-color"?: Property$BorderLeftColor, + "border-left-style"?: Property$BorderLeftStyle, + "border-left-width"?: Property$BorderLeftWidth<TLength>, + "border-right-color"?: Property$BorderRightColor, + "border-right-style"?: Property$BorderRightStyle, + "border-right-width"?: Property$BorderRightWidth<TLength>, + "border-spacing"?: Property$BorderSpacing<TLength>, + "border-start-end-radius"?: Property$BorderStartEndRadius<TLength>, + "border-start-start-radius"?: Property$BorderStartStartRadius<TLength>, + "border-top-color"?: Property$BorderTopColor, + "border-top-left-radius"?: Property$BorderTopLeftRadius<TLength>, + "border-top-right-radius"?: Property$BorderTopRightRadius<TLength>, + "border-top-style"?: Property$BorderTopStyle, + "border-top-width"?: Property$BorderTopWidth<TLength>, + bottom?: Property$Bottom<TLength>, + "box-decoration-break"?: Property$BoxDecorationBreak, + "box-shadow"?: Property$BoxShadow, + "box-sizing"?: Property$BoxSizing, + "break-after"?: Property$BreakAfter, + "break-before"?: Property$BreakBefore, + "break-inside"?: Property$BreakInside, + "caption-side"?: Property$CaptionSide, + "caret-color"?: Property$CaretColor, + "caret-shape"?: Property$CaretShape, + clear?: Property$Clear, + "clip-path"?: Property$ClipPath, + color?: Property$Color, + "color-adjust"?: Property$PrintColorAdjust, + "color-scheme"?: Property$ColorScheme, + "column-count"?: Property$ColumnCount, + "column-fill"?: Property$ColumnFill, + "column-gap"?: Property$ColumnGap<TLength>, + "column-rule-color"?: Property$ColumnRuleColor, + "column-rule-style"?: Property$ColumnRuleStyle, + "column-rule-width"?: Property$ColumnRuleWidth<TLength>, + "column-span"?: Property$ColumnSpan, + "column-width"?: Property$ColumnWidth<TLength>, + contain?: Property$Contain, + "contain-intrinsic-block-size"?: Property$ContainIntrinsicBlockSize<TLength>, + "contain-intrinsic-height"?: Property$ContainIntrinsicHeight<TLength>, + "contain-intrinsic-inline-size"?: Property$ContainIntrinsicInlineSize<TLength>, + "contain-intrinsic-width"?: Property$ContainIntrinsicWidth<TLength>, + "container-name"?: Property$ContainerName, + "container-type"?: Property$ContainerType, + content?: Property$Content, + "content-visibility"?: Property$ContentVisibility, + "counter-increment"?: Property$CounterIncrement, + "counter-reset"?: Property$CounterReset, + "counter-set"?: Property$CounterSet, + cursor?: Property$Cursor, + direction?: Property$Direction, + display?: Property$Display, + "empty-cells"?: Property$EmptyCells, + filter?: Property$Filter, + "flex-basis"?: Property$FlexBasis<TLength>, + "flex-direction"?: Property$FlexDirection, + "flex-grow"?: Property$FlexGrow, + "flex-shrink"?: Property$FlexShrink, + "flex-wrap"?: Property$FlexWrap, + float?: Property$Float, + "font-family"?: Property$FontFamily, + "font-feature-settings"?: Property$FontFeatureSettings, + "font-kerning"?: Property$FontKerning, + "font-language-override"?: Property$FontLanguageOverride, + "font-optical-sizing"?: Property$FontOpticalSizing, + "font-palette"?: Property$FontPalette, + "font-size"?: Property$FontSize<TLength>, + "font-size-adjust"?: Property$FontSizeAdjust, + "font-smooth"?: Property$FontSmooth<TLength>, + "font-stretch"?: Property$FontStretch, + "font-style"?: Property$FontStyle, + "font-synthesis"?: Property$FontSynthesis, + "font-synthesis-position"?: Property$FontSynthesisPosition, + "font-synthesis-small-caps"?: Property$FontSynthesisSmallCaps, + "font-synthesis-style"?: Property$FontSynthesisStyle, + "font-synthesis-weight"?: Property$FontSynthesisWeight, + "font-variant"?: Property$FontVariant, + "font-variant-alternates"?: Property$FontVariantAlternates, + "font-variant-caps"?: Property$FontVariantCaps, + "font-variant-east-asian"?: Property$FontVariantEastAsian, + "font-variant-emoji"?: Property$FontVariantEmoji, + "font-variant-ligatures"?: Property$FontVariantLigatures, + "font-variant-numeric"?: Property$FontVariantNumeric, + "font-variant-position"?: Property$FontVariantPosition, + "font-variation-settings"?: Property$FontVariationSettings, + "font-weight"?: Property$FontWeight, + "forced-color-adjust"?: Property$ForcedColorAdjust, + "grid-auto-columns"?: Property$GridAutoColumns<TLength>, + "grid-auto-flow"?: Property$GridAutoFlow, + "grid-auto-rows"?: Property$GridAutoRows<TLength>, + "grid-column-end"?: Property$GridColumnEnd, + "grid-column-start"?: Property$GridColumnStart, + "grid-row-end"?: Property$GridRowEnd, + "grid-row-start"?: Property$GridRowStart, + "grid-template-areas"?: Property$GridTemplateAreas, + "grid-template-columns"?: Property$GridTemplateColumns<TLength>, + "grid-template-rows"?: Property$GridTemplateRows<TLength>, + "hanging-punctuation"?: Property$HangingPunctuation, + height?: Property$Height<TLength>, + "hyphenate-character"?: Property$HyphenateCharacter, + "hyphenate-limit-chars"?: Property$HyphenateLimitChars, + hyphens?: Property$Hyphens, + "image-orientation"?: Property$ImageOrientation, + "image-rendering"?: Property$ImageRendering, + "image-resolution"?: Property$ImageResolution, + "initial-letter"?: Property$InitialLetter, + "inline-size"?: Property$InlineSize<TLength>, + "input-security"?: Property$InputSecurity, + "inset-block-end"?: Property$InsetBlockEnd<TLength>, + "inset-block-start"?: Property$InsetBlockStart<TLength>, + "inset-inline-end"?: Property$InsetInlineEnd<TLength>, + "inset-inline-start"?: Property$InsetInlineStart<TLength>, + isolation?: Property$Isolation, + "justify-content"?: Property$JustifyContent, + "justify-items"?: Property$JustifyItems, + "justify-self"?: Property$JustifySelf, + "justify-tracks"?: Property$JustifyTracks, + left?: Property$Left<TLength>, + "letter-spacing"?: Property$LetterSpacing<TLength>, + "line-break"?: Property$LineBreak, + "line-height"?: Property$LineHeight<TLength>, + "line-height-step"?: Property$LineHeightStep<TLength>, + "list-style-image"?: Property$ListStyleImage, + "list-style-position"?: Property$ListStylePosition, + "list-style-type"?: Property$ListStyleType, + "margin-block-end"?: Property$MarginBlockEnd<TLength>, + "margin-block-start"?: Property$MarginBlockStart<TLength>, + "margin-bottom"?: Property$MarginBottom<TLength>, + "margin-inline-end"?: Property$MarginInlineEnd<TLength>, + "margin-inline-start"?: Property$MarginInlineStart<TLength>, + "margin-left"?: Property$MarginLeft<TLength>, + "margin-right"?: Property$MarginRight<TLength>, + "margin-top"?: Property$MarginTop<TLength>, + "margin-trim"?: Property$MarginTrim, + "mask-border-mode"?: Property$MaskBorderMode, + "mask-border-outset"?: Property$MaskBorderOutset<TLength>, + "mask-border-repeat"?: Property$MaskBorderRepeat, + "mask-border-slice"?: Property$MaskBorderSlice, + "mask-border-source"?: Property$MaskBorderSource, + "mask-border-width"?: Property$MaskBorderWidth<TLength>, + "mask-clip"?: Property$MaskClip, + "mask-composite"?: Property$MaskComposite, + "mask-image"?: Property$MaskImage, + "mask-mode"?: Property$MaskMode, + "mask-origin"?: Property$MaskOrigin, + "mask-position"?: Property$MaskPosition<TLength>, + "mask-repeat"?: Property$MaskRepeat, + "mask-size"?: Property$MaskSize<TLength>, + "mask-type"?: Property$MaskType, + "masonry-auto-flow"?: Property$MasonryAutoFlow, + "math-depth"?: Property$MathDepth, + "math-shift"?: Property$MathShift, + "math-style"?: Property$MathStyle, + "max-block-size"?: Property$MaxBlockSize<TLength>, + "max-height"?: Property$MaxHeight<TLength>, + "max-inline-size"?: Property$MaxInlineSize<TLength>, + "max-lines"?: Property$MaxLines, + "max-width"?: Property$MaxWidth<TLength>, + "min-block-size"?: Property$MinBlockSize<TLength>, + "min-height"?: Property$MinHeight<TLength>, + "min-inline-size"?: Property$MinInlineSize<TLength>, + "min-width"?: Property$MinWidth<TLength>, + "mix-blend-mode"?: Property$MixBlendMode, + "motion-distance"?: Property$OffsetDistance<TLength>, + "motion-path"?: Property$OffsetPath, + "motion-rotation"?: Property$OffsetRotate, + "object-fit"?: Property$ObjectFit, + "object-position"?: Property$ObjectPosition<TLength>, + "offset-anchor"?: Property$OffsetAnchor<TLength>, + "offset-distance"?: Property$OffsetDistance<TLength>, + "offset-path"?: Property$OffsetPath, + "offset-position"?: Property$OffsetPosition<TLength>, + "offset-rotate"?: Property$OffsetRotate, + "offset-rotation"?: Property$OffsetRotate, + opacity?: Property$Opacity, + order?: Property$Order, + orphans?: Property$Orphans, + "outline-color"?: Property$OutlineColor, + "outline-offset"?: Property$OutlineOffset<TLength>, + "outline-style"?: Property$OutlineStyle, + "outline-width"?: Property$OutlineWidth<TLength>, + "overflow-anchor"?: Property$OverflowAnchor, + "overflow-block"?: Property$OverflowBlock, + "overflow-clip-box"?: Property$OverflowClipBox, + "overflow-clip-margin"?: Property$OverflowClipMargin<TLength>, + "overflow-inline"?: Property$OverflowInline, + "overflow-wrap"?: Property$OverflowWrap, + "overflow-x"?: Property$OverflowX, + "overflow-y"?: Property$OverflowY, + overlay?: Property$Overlay, + "overscroll-behavior-block"?: Property$OverscrollBehaviorBlock, + "overscroll-behavior-inline"?: Property$OverscrollBehaviorInline, + "overscroll-behavior-x"?: Property$OverscrollBehaviorX, + "overscroll-behavior-y"?: Property$OverscrollBehaviorY, + "padding-block-end"?: Property$PaddingBlockEnd<TLength>, + "padding-block-start"?: Property$PaddingBlockStart<TLength>, + "padding-bottom"?: Property$PaddingBottom<TLength>, + "padding-inline-end"?: Property$PaddingInlineEnd<TLength>, + "padding-inline-start"?: Property$PaddingInlineStart<TLength>, + "padding-left"?: Property$PaddingLeft<TLength>, + "padding-right"?: Property$PaddingRight<TLength>, + "padding-top"?: Property$PaddingTop<TLength>, + page?: Property$Page, + "page-break-after"?: Property$PageBreakAfter, + "page-break-before"?: Property$PageBreakBefore, + "page-break-inside"?: Property$PageBreakInside, + "paint-order"?: Property$PaintOrder, + perspective?: Property$Perspective<TLength>, + "perspective-origin"?: Property$PerspectiveOrigin<TLength>, + "pointer-events"?: Property$PointerEvents, + position?: Property$Position, + "print-color-adjust"?: Property$PrintColorAdjust, + quotes?: Property$Quotes, + resize?: Property$Resize, + right?: Property$Right<TLength>, + rotate?: Property$Rotate, + "row-gap"?: Property$RowGap<TLength>, + "ruby-align"?: Property$RubyAlign, + "ruby-merge"?: Property$RubyMerge, + "ruby-position"?: Property$RubyPosition, + scale?: Property$Scale, + "scroll-behavior"?: Property$ScrollBehavior, + "scroll-margin-block-end"?: Property$ScrollMarginBlockEnd<TLength>, + "scroll-margin-block-start"?: Property$ScrollMarginBlockStart<TLength>, + "scroll-margin-bottom"?: Property$ScrollMarginBottom<TLength>, + "scroll-margin-inline-end"?: Property$ScrollMarginInlineEnd<TLength>, + "scroll-margin-inline-start"?: Property$ScrollMarginInlineStart<TLength>, + "scroll-margin-left"?: Property$ScrollMarginLeft<TLength>, + "scroll-margin-right"?: Property$ScrollMarginRight<TLength>, + "scroll-margin-top"?: Property$ScrollMarginTop<TLength>, + "scroll-padding-block-end"?: Property$ScrollPaddingBlockEnd<TLength>, + "scroll-padding-block-start"?: Property$ScrollPaddingBlockStart<TLength>, + "scroll-padding-bottom"?: Property$ScrollPaddingBottom<TLength>, + "scroll-padding-inline-end"?: Property$ScrollPaddingInlineEnd<TLength>, + "scroll-padding-inline-start"?: Property$ScrollPaddingInlineStart<TLength>, + "scroll-padding-left"?: Property$ScrollPaddingLeft<TLength>, + "scroll-padding-right"?: Property$ScrollPaddingRight<TLength>, + "scroll-padding-top"?: Property$ScrollPaddingTop<TLength>, + "scroll-snap-align"?: Property$ScrollSnapAlign, + "scroll-snap-margin-bottom"?: Property$ScrollMarginBottom<TLength>, + "scroll-snap-margin-left"?: Property$ScrollMarginLeft<TLength>, + "scroll-snap-margin-right"?: Property$ScrollMarginRight<TLength>, + "scroll-snap-margin-top"?: Property$ScrollMarginTop<TLength>, + "scroll-snap-stop"?: Property$ScrollSnapStop, + "scroll-snap-type"?: Property$ScrollSnapType, + "scroll-timeline-axis"?: Property$ScrollTimelineAxis, + "scroll-timeline-name"?: Property$ScrollTimelineName, + "scrollbar-color"?: Property$ScrollbarColor, + "scrollbar-gutter"?: Property$ScrollbarGutter, + "scrollbar-width"?: Property$ScrollbarWidth, + "shape-image-threshold"?: Property$ShapeImageThreshold, + "shape-margin"?: Property$ShapeMargin<TLength>, + "shape-outside"?: Property$ShapeOutside, + "tab-size"?: Property$TabSize<TLength>, + "table-layout"?: Property$TableLayout, + "text-align"?: Property$TextAlign, + "text-align-last"?: Property$TextAlignLast, + "text-combine-upright"?: Property$TextCombineUpright, + "text-decoration-color"?: Property$TextDecorationColor, + "text-decoration-line"?: Property$TextDecorationLine, + "text-decoration-skip"?: Property$TextDecorationSkip, + "text-decoration-skip-ink"?: Property$TextDecorationSkipInk, + "text-decoration-style"?: Property$TextDecorationStyle, + "text-decoration-thickness"?: Property$TextDecorationThickness<TLength>, + "text-emphasis-color"?: Property$TextEmphasisColor, + "text-emphasis-position"?: Property$TextEmphasisPosition, + "text-emphasis-style"?: Property$TextEmphasisStyle, + "text-indent"?: Property$TextIndent<TLength>, + "text-justify"?: Property$TextJustify, + "text-orientation"?: Property$TextOrientation, + "text-overflow"?: Property$TextOverflow, + "text-rendering"?: Property$TextRendering, + "text-shadow"?: Property$TextShadow, + "text-size-adjust"?: Property$TextSizeAdjust, + "text-transform"?: Property$TextTransform, + "text-underline-offset"?: Property$TextUnderlineOffset<TLength>, + "text-underline-position"?: Property$TextUnderlinePosition, + "text-wrap"?: Property$TextWrap, + "timeline-scope"?: Property$TimelineScope, + top?: Property$Top<TLength>, + "touch-action"?: Property$TouchAction, + transform?: Property$Transform, + "transform-box"?: Property$TransformBox, + "transform-origin"?: Property$TransformOrigin<TLength>, + "transform-style"?: Property$TransformStyle, + "transition-behavior"?: Property$TransitionBehavior, + "transition-delay"?: Property$TransitionDelay<TTime>, + "transition-duration"?: Property$TransitionDuration<TTime>, + "transition-property"?: Property$TransitionProperty, + "transition-timing-function"?: Property$TransitionTimingFunction, + translate?: Property$Translate<TLength>, + "unicode-bidi"?: Property$UnicodeBidi, + "user-select"?: Property$UserSelect, + "vertical-align"?: Property$VerticalAlign<TLength>, + "view-timeline-axis"?: Property$ViewTimelineAxis, + "view-timeline-inset"?: Property$ViewTimelineInset<TLength>, + "view-timeline-name"?: Property$ViewTimelineName, + "view-transition-name"?: Property$ViewTransitionName, + visibility?: Property$Visibility, + "white-space"?: Property$WhiteSpace, + "white-space-collapse"?: Property$WhiteSpaceCollapse, + "white-space-trim"?: Property$WhiteSpaceTrim, + widows?: Property$Widows, + width?: Property$Width<TLength>, + "will-change"?: Property$WillChange, + "word-break"?: Property$WordBreak, + "word-spacing"?: Property$WordSpacing<TLength>, + "word-wrap"?: Property$WordWrap, + "writing-mode"?: Property$WritingMode, + "z-index"?: Property$ZIndex, + zoom?: Property$Zoom, +|}; -export type StandardPropertiesHyphen<TLength = string | 0> = StandardLonghandPropertiesHyphen<TLength> & StandardShorthandPropertiesHyphen<TLength>; +export type StandardShorthandPropertiesHyphen<TLength = string | 0, TTime = string> = {| + all?: Property$All, + animation?: Property$Animation<TTime>, + "animation-range"?: Property$AnimationRange<TLength>, + background?: Property$Background<TLength>, + "background-position"?: Property$BackgroundPosition<TLength>, + border?: Property$Border<TLength>, + "border-block"?: Property$BorderBlock<TLength>, + "border-block-end"?: Property$BorderBlockEnd<TLength>, + "border-block-start"?: Property$BorderBlockStart<TLength>, + "border-bottom"?: Property$BorderBottom<TLength>, + "border-color"?: Property$BorderColor, + "border-image"?: Property$BorderImage, + "border-inline"?: Property$BorderInline<TLength>, + "border-inline-end"?: Property$BorderInlineEnd<TLength>, + "border-inline-start"?: Property$BorderInlineStart<TLength>, + "border-left"?: Property$BorderLeft<TLength>, + "border-radius"?: Property$BorderRadius<TLength>, + "border-right"?: Property$BorderRight<TLength>, + "border-style"?: Property$BorderStyle, + "border-top"?: Property$BorderTop<TLength>, + "border-width"?: Property$BorderWidth<TLength>, + caret?: Property$Caret, + "column-rule"?: Property$ColumnRule<TLength>, + columns?: Property$Columns<TLength>, + "contain-intrinsic-size"?: Property$ContainIntrinsicSize<TLength>, + container?: Property$Container, + flex?: Property$Flex<TLength>, + "flex-flow"?: Property$FlexFlow, + font?: Property$Font, + gap?: Property$Gap<TLength>, + grid?: Property$Grid, + "grid-area"?: Property$GridArea, + "grid-column"?: Property$GridColumn, + "grid-row"?: Property$GridRow, + "grid-template"?: Property$GridTemplate, + inset?: Property$Inset<TLength>, + "inset-block"?: Property$InsetBlock<TLength>, + "inset-inline"?: Property$InsetInline<TLength>, + "line-clamp"?: Property$LineClamp, + "list-style"?: Property$ListStyle, + margin?: Property$Margin<TLength>, + "margin-block"?: Property$MarginBlock<TLength>, + "margin-inline"?: Property$MarginInline<TLength>, + mask?: Property$Mask<TLength>, + "mask-border"?: Property$MaskBorder, + motion?: Property$Offset<TLength>, + offset?: Property$Offset<TLength>, + outline?: Property$Outline<TLength>, + overflow?: Property$Overflow, + "overscroll-behavior"?: Property$OverscrollBehavior, + padding?: Property$Padding<TLength>, + "padding-block"?: Property$PaddingBlock<TLength>, + "padding-inline"?: Property$PaddingInline<TLength>, + "place-content"?: Property$PlaceContent, + "place-items"?: Property$PlaceItems, + "place-self"?: Property$PlaceSelf, + "scroll-margin"?: Property$ScrollMargin<TLength>, + "scroll-margin-block"?: Property$ScrollMarginBlock<TLength>, + "scroll-margin-inline"?: Property$ScrollMarginInline<TLength>, + "scroll-padding"?: Property$ScrollPadding<TLength>, + "scroll-padding-block"?: Property$ScrollPaddingBlock<TLength>, + "scroll-padding-inline"?: Property$ScrollPaddingInline<TLength>, + "scroll-snap-margin"?: Property$ScrollMargin<TLength>, + "scroll-timeline"?: Property$ScrollTimeline, + "text-decoration"?: Property$TextDecoration<TLength>, + "text-emphasis"?: Property$TextEmphasis, + transition?: Property$Transition<TTime>, + "view-timeline"?: Property$ViewTimeline, +|}; -export type VendorLonghandPropertiesHyphen<TLength = string | 0> = { - "-moz-animation-delay"?: GlobalsString, - "-moz-animation-direction"?: AnimationDirectionProperty, - "-moz-animation-duration"?: GlobalsString, - "-moz-animation-fill-mode"?: AnimationFillModeProperty, - "-moz-animation-iteration-count"?: AnimationIterationCountProperty, - "-moz-animation-name"?: AnimationNameProperty, - "-moz-animation-play-state"?: AnimationPlayStateProperty, - "-moz-animation-timing-function"?: AnimationTimingFunctionProperty, - "-moz-appearance"?: MozAppearanceProperty, - "-moz-backface-visibility"?: BackfaceVisibilityProperty, - "-moz-border-bottom-colors"?: MozBorderBottomColorsProperty, - "-moz-border-end-color"?: BorderInlineEndColorProperty, - "-moz-border-end-style"?: BorderInlineEndStyleProperty, - "-moz-border-end-width"?: BorderInlineEndWidthProperty<TLength>, - "-moz-border-left-colors"?: MozBorderLeftColorsProperty, - "-moz-border-right-colors"?: MozBorderRightColorsProperty, - "-moz-border-start-color"?: BorderInlineStartColorProperty, - "-moz-border-start-style"?: BorderInlineStartStyleProperty, - "-moz-border-top-colors"?: MozBorderTopColorsProperty, - "-moz-box-sizing"?: BoxSizingProperty, - "-moz-column-count"?: ColumnCountProperty, - "-moz-column-fill"?: ColumnFillProperty, - "-moz-column-rule-color"?: ColumnRuleColorProperty, - "-moz-column-rule-style"?: ColumnRuleStyleProperty, - "-moz-column-rule-width"?: ColumnRuleWidthProperty<TLength>, - "-moz-column-width"?: ColumnWidthProperty<TLength>, - "-moz-context-properties"?: MozContextPropertiesProperty, - "-moz-font-feature-settings"?: FontFeatureSettingsProperty, - "-moz-font-language-override"?: FontLanguageOverrideProperty, - "-moz-hyphens"?: HyphensProperty, - "-moz-image-region"?: MozImageRegionProperty, - "-moz-margin-end"?: MarginInlineEndProperty<TLength>, - "-moz-margin-start"?: MarginInlineStartProperty<TLength>, - "-moz-orient"?: MozOrientProperty, - "-moz-osx-font-smoothing"?: FontSmoothProperty<TLength>, - "-moz-padding-end"?: PaddingInlineEndProperty<TLength>, - "-moz-padding-start"?: PaddingInlineStartProperty<TLength>, - "-moz-perspective"?: PerspectiveProperty<TLength>, - "-moz-perspective-origin"?: PerspectiveOriginProperty<TLength>, - "-moz-stack-sizing"?: MozStackSizingProperty, - "-moz-tab-size"?: TabSizeProperty<TLength>, - "-moz-text-blink"?: MozTextBlinkProperty, - "-moz-text-size-adjust"?: TextSizeAdjustProperty, - "-moz-transform-origin"?: TransformOriginProperty<TLength>, - "-moz-transform-style"?: TransformStyleProperty, - "-moz-transition-delay"?: GlobalsString, - "-moz-transition-duration"?: GlobalsString, - "-moz-transition-property"?: TransitionPropertyProperty, - "-moz-transition-timing-function"?: TransitionTimingFunctionProperty, - "-moz-user-focus"?: MozUserFocusProperty, - "-moz-user-modify"?: MozUserModifyProperty, - "-moz-user-select"?: UserSelectProperty, - "-moz-window-dragging"?: MozWindowDraggingProperty, - "-moz-window-shadow"?: MozWindowShadowProperty, - "-ms-accelerator"?: MsAcceleratorProperty, - "-ms-block-progression"?: MsBlockProgressionProperty, - "-ms-content-zoom-chaining"?: MsContentZoomChainingProperty, - "-ms-content-zoom-limit-max"?: GlobalsString, - "-ms-content-zoom-limit-min"?: GlobalsString, - "-ms-content-zoom-snap-points"?: GlobalsString, - "-ms-content-zoom-snap-type"?: MsContentZoomSnapTypeProperty, - "-ms-content-zooming"?: MsContentZoomingProperty, - "-ms-filter"?: GlobalsString, - "-ms-flex-direction"?: FlexDirectionProperty, - "-ms-flex-positive"?: GlobalsNumber, - "-ms-flow-from"?: MsFlowFromProperty, - "-ms-flow-into"?: MsFlowIntoProperty, - "-ms-grid-columns"?: MsGridColumnsProperty<TLength>, - "-ms-grid-rows"?: MsGridRowsProperty<TLength>, - "-ms-high-contrast-adjust"?: MsHighContrastAdjustProperty, - "-ms-hyphenate-limit-chars"?: MsHyphenateLimitCharsProperty, - "-ms-hyphenate-limit-lines"?: MsHyphenateLimitLinesProperty, - "-ms-hyphenate-limit-zone"?: MsHyphenateLimitZoneProperty<TLength>, - "-ms-hyphens"?: HyphensProperty, - "-ms-ime-align"?: MsImeAlignProperty, - "-ms-line-break"?: LineBreakProperty, - "-ms-order"?: GlobalsNumber, - "-ms-overflow-style"?: MsOverflowStyleProperty, - "-ms-overflow-x"?: OverflowXProperty, - "-ms-overflow-y"?: OverflowYProperty, - "-ms-scroll-chaining"?: MsScrollChainingProperty, - "-ms-scroll-limit-x-max"?: MsScrollLimitXMaxProperty<TLength>, - "-ms-scroll-limit-x-min"?: MsScrollLimitXMinProperty<TLength>, - "-ms-scroll-limit-y-max"?: MsScrollLimitYMaxProperty<TLength>, - "-ms-scroll-limit-y-min"?: MsScrollLimitYMinProperty<TLength>, - "-ms-scroll-rails"?: MsScrollRailsProperty, - "-ms-scroll-snap-points-x"?: GlobalsString, - "-ms-scroll-snap-points-y"?: GlobalsString, - "-ms-scroll-snap-type"?: MsScrollSnapTypeProperty, - "-ms-scroll-translation"?: MsScrollTranslationProperty, - "-ms-scrollbar-3dlight-color"?: MsScrollbar3dlightColorProperty, - "-ms-scrollbar-arrow-color"?: MsScrollbarArrowColorProperty, - "-ms-scrollbar-base-color"?: MsScrollbarBaseColorProperty, - "-ms-scrollbar-darkshadow-color"?: MsScrollbarDarkshadowColorProperty, - "-ms-scrollbar-face-color"?: MsScrollbarFaceColorProperty, - "-ms-scrollbar-highlight-color"?: MsScrollbarHighlightColorProperty, - "-ms-scrollbar-shadow-color"?: MsScrollbarShadowColorProperty, - "-ms-scrollbar-track-color"?: MsScrollbarTrackColorProperty, - "-ms-text-autospace"?: MsTextAutospaceProperty, - "-ms-text-combine-horizontal"?: TextCombineUprightProperty, - "-ms-text-overflow"?: TextOverflowProperty, - "-ms-touch-action"?: TouchActionProperty, - "-ms-touch-select"?: MsTouchSelectProperty, - "-ms-transform"?: TransformProperty, - "-ms-transform-origin"?: TransformOriginProperty<TLength>, - "-ms-transition-delay"?: GlobalsString, - "-ms-transition-duration"?: GlobalsString, - "-ms-transition-property"?: TransitionPropertyProperty, - "-ms-transition-timing-function"?: TransitionTimingFunctionProperty, - "-ms-user-select"?: MsUserSelectProperty, - "-ms-word-break"?: WordBreakProperty, - "-ms-wrap-flow"?: MsWrapFlowProperty, - "-ms-wrap-margin"?: MsWrapMarginProperty<TLength>, - "-ms-wrap-through"?: MsWrapThroughProperty, - "-ms-writing-mode"?: WritingModeProperty, - "-webkit-align-content"?: AlignContentProperty, - "-webkit-align-items"?: AlignItemsProperty, - "-webkit-align-self"?: AlignSelfProperty, - "-webkit-animation-delay"?: GlobalsString, - "-webkit-animation-direction"?: AnimationDirectionProperty, - "-webkit-animation-duration"?: GlobalsString, - "-webkit-animation-fill-mode"?: AnimationFillModeProperty, - "-webkit-animation-iteration-count"?: AnimationIterationCountProperty, - "-webkit-animation-name"?: AnimationNameProperty, - "-webkit-animation-play-state"?: AnimationPlayStateProperty, - "-webkit-animation-timing-function"?: AnimationTimingFunctionProperty, - "-webkit-appearance"?: WebkitAppearanceProperty, - "-webkit-backdrop-filter"?: BackdropFilterProperty, - "-webkit-backface-visibility"?: BackfaceVisibilityProperty, - "-webkit-background-clip"?: BackgroundClipProperty, - "-webkit-background-origin"?: BackgroundOriginProperty, - "-webkit-background-size"?: BackgroundSizeProperty<TLength>, - "-webkit-border-before-color"?: WebkitBorderBeforeColorProperty, - "-webkit-border-before-style"?: WebkitBorderBeforeStyleProperty, - "-webkit-border-before-width"?: WebkitBorderBeforeWidthProperty<TLength>, - "-webkit-border-bottom-left-radius"?: BorderBottomLeftRadiusProperty<TLength>, - "-webkit-border-bottom-right-radius"?: BorderBottomRightRadiusProperty<TLength>, - "-webkit-border-image-slice"?: BorderImageSliceProperty, - "-webkit-border-top-left-radius"?: BorderTopLeftRadiusProperty<TLength>, - "-webkit-border-top-right-radius"?: BorderTopRightRadiusProperty<TLength>, - "-webkit-box-decoration-break"?: BoxDecorationBreakProperty, - "-webkit-box-reflect"?: WebkitBoxReflectProperty<TLength>, - "-webkit-box-shadow"?: BoxShadowProperty, - "-webkit-box-sizing"?: BoxSizingProperty, - "-webkit-clip-path"?: ClipPathProperty, - "-webkit-column-count"?: ColumnCountProperty, - "-webkit-column-fill"?: ColumnFillProperty, - "-webkit-column-rule-color"?: ColumnRuleColorProperty, - "-webkit-column-rule-style"?: ColumnRuleStyleProperty, - "-webkit-column-rule-width"?: ColumnRuleWidthProperty<TLength>, - "-webkit-column-span"?: ColumnSpanProperty, - "-webkit-column-width"?: ColumnWidthProperty<TLength>, - "-webkit-filter"?: FilterProperty, - "-webkit-flex-basis"?: FlexBasisProperty<TLength>, - "-webkit-flex-direction"?: FlexDirectionProperty, - "-webkit-flex-grow"?: GlobalsNumber, - "-webkit-flex-shrink"?: GlobalsNumber, - "-webkit-flex-wrap"?: FlexWrapProperty, - "-webkit-font-feature-settings"?: FontFeatureSettingsProperty, - "-webkit-font-kerning"?: FontKerningProperty, - "-webkit-font-smoothing"?: FontSmoothProperty<TLength>, - "-webkit-font-variant-ligatures"?: FontVariantLigaturesProperty, - "-webkit-hyphenate-character"?: HyphenateCharacterProperty, - "-webkit-hyphens"?: HyphensProperty, - "-webkit-initial-letter"?: InitialLetterProperty, - "-webkit-justify-content"?: JustifyContentProperty, - "-webkit-line-break"?: LineBreakProperty, - "-webkit-line-clamp"?: WebkitLineClampProperty, - "-webkit-margin-end"?: MarginInlineEndProperty<TLength>, - "-webkit-margin-start"?: MarginInlineStartProperty<TLength>, - "-webkit-mask-attachment"?: WebkitMaskAttachmentProperty, - "-webkit-mask-box-image-outset"?: MaskBorderOutsetProperty<TLength>, - "-webkit-mask-box-image-repeat"?: MaskBorderRepeatProperty, - "-webkit-mask-box-image-slice"?: MaskBorderSliceProperty, - "-webkit-mask-box-image-source"?: MaskBorderSourceProperty, - "-webkit-mask-box-image-width"?: MaskBorderWidthProperty<TLength>, - "-webkit-mask-clip"?: WebkitMaskClipProperty, - "-webkit-mask-composite"?: WebkitMaskCompositeProperty, - "-webkit-mask-image"?: WebkitMaskImageProperty, - "-webkit-mask-origin"?: WebkitMaskOriginProperty, - "-webkit-mask-position"?: WebkitMaskPositionProperty<TLength>, - "-webkit-mask-position-x"?: WebkitMaskPositionXProperty<TLength>, - "-webkit-mask-position-y"?: WebkitMaskPositionYProperty<TLength>, - "-webkit-mask-repeat"?: WebkitMaskRepeatProperty, - "-webkit-mask-repeat-x"?: WebkitMaskRepeatXProperty, - "-webkit-mask-repeat-y"?: WebkitMaskRepeatYProperty, - "-webkit-mask-size"?: WebkitMaskSizeProperty<TLength>, - "-webkit-max-inline-size"?: MaxInlineSizeProperty<TLength>, - "-webkit-order"?: GlobalsNumber, - "-webkit-overflow-scrolling"?: WebkitOverflowScrollingProperty, - "-webkit-padding-end"?: PaddingInlineEndProperty<TLength>, - "-webkit-padding-start"?: PaddingInlineStartProperty<TLength>, - "-webkit-perspective"?: PerspectiveProperty<TLength>, - "-webkit-perspective-origin"?: PerspectiveOriginProperty<TLength>, - "-webkit-print-color-adjust"?: PrintColorAdjustProperty, - "-webkit-ruby-position"?: RubyPositionProperty, - "-webkit-scroll-snap-type"?: ScrollSnapTypeProperty, - "-webkit-shape-margin"?: ShapeMarginProperty<TLength>, - "-webkit-tap-highlight-color"?: WebkitTapHighlightColorProperty, - "-webkit-text-combine"?: TextCombineUprightProperty, - "-webkit-text-decoration-color"?: TextDecorationColorProperty, - "-webkit-text-decoration-line"?: TextDecorationLineProperty, - "-webkit-text-decoration-skip"?: TextDecorationSkipProperty, - "-webkit-text-decoration-style"?: TextDecorationStyleProperty, - "-webkit-text-emphasis-color"?: TextEmphasisColorProperty, - "-webkit-text-emphasis-position"?: GlobalsString, - "-webkit-text-emphasis-style"?: TextEmphasisStyleProperty, - "-webkit-text-fill-color"?: WebkitTextFillColorProperty, - "-webkit-text-orientation"?: TextOrientationProperty, - "-webkit-text-size-adjust"?: TextSizeAdjustProperty, - "-webkit-text-stroke-color"?: WebkitTextStrokeColorProperty, - "-webkit-text-stroke-width"?: WebkitTextStrokeWidthProperty<TLength>, - "-webkit-text-underline-position"?: TextUnderlinePositionProperty, - "-webkit-touch-callout"?: WebkitTouchCalloutProperty, - "-webkit-transform"?: TransformProperty, - "-webkit-transform-origin"?: TransformOriginProperty<TLength>, - "-webkit-transform-style"?: TransformStyleProperty, - "-webkit-transition-delay"?: GlobalsString, - "-webkit-transition-duration"?: GlobalsString, - "-webkit-transition-property"?: TransitionPropertyProperty, - "-webkit-transition-timing-function"?: TransitionTimingFunctionProperty, - "-webkit-user-modify"?: WebkitUserModifyProperty, - "-webkit-user-select"?: UserSelectProperty, - "-webkit-writing-mode"?: WritingModeProperty, -}; +export type StandardPropertiesHyphen<TLength = string | 0, TTime = string> = {| + ...StandardLonghandPropertiesHyphen<TLength, TTime>, + ...StandardShorthandPropertiesHyphen<TLength, TTime>, +|}; -export type VendorShorthandPropertiesHyphen<TLength = string | 0> = { - "-moz-animation"?: AnimationProperty, - "-moz-border-image"?: BorderImageProperty, - "-moz-column-rule"?: ColumnRuleProperty<TLength>, - "-moz-columns"?: ColumnsProperty<TLength>, - "-moz-transition"?: TransitionProperty, - "-ms-content-zoom-limit"?: GlobalsString, - "-ms-content-zoom-snap"?: MsContentZoomSnapProperty, - "-ms-flex"?: FlexProperty<TLength>, - "-ms-scroll-limit"?: GlobalsString, - "-ms-scroll-snap-x"?: GlobalsString, - "-ms-scroll-snap-y"?: GlobalsString, - "-ms-transition"?: TransitionProperty, - "-webkit-animation"?: AnimationProperty, - "-webkit-border-before"?: WebkitBorderBeforeProperty<TLength>, - "-webkit-border-image"?: BorderImageProperty, - "-webkit-border-radius"?: BorderRadiusProperty<TLength>, - "-webkit-column-rule"?: ColumnRuleProperty<TLength>, - "-webkit-columns"?: ColumnsProperty<TLength>, - "-webkit-flex"?: FlexProperty<TLength>, - "-webkit-flex-flow"?: FlexFlowProperty, - "-webkit-mask"?: WebkitMaskProperty<TLength>, - "-webkit-mask-box-image"?: MaskBorderProperty, - "-webkit-text-emphasis"?: TextEmphasisProperty, - "-webkit-text-stroke"?: WebkitTextStrokeProperty<TLength>, - "-webkit-transition"?: TransitionProperty, -}; +export type VendorLonghandPropertiesHyphen<TLength = string | 0, TTime = string> = {| + "-moz-animation-delay"?: Property$AnimationDelay<TTime>, + "-moz-animation-direction"?: Property$AnimationDirection, + "-moz-animation-duration"?: Property$AnimationDuration<TTime>, + "-moz-animation-fill-mode"?: Property$AnimationFillMode, + "-moz-animation-iteration-count"?: Property$AnimationIterationCount, + "-moz-animation-name"?: Property$AnimationName, + "-moz-animation-play-state"?: Property$AnimationPlayState, + "-moz-animation-timing-function"?: Property$AnimationTimingFunction, + "-moz-appearance"?: Property$MozAppearance, + "-moz-binding"?: Property$MozBinding, + "-moz-border-bottom-colors"?: Property$MozBorderBottomColors, + "-moz-border-end-color"?: Property$BorderInlineEndColor, + "-moz-border-end-style"?: Property$BorderInlineEndStyle, + "-moz-border-end-width"?: Property$BorderInlineEndWidth<TLength>, + "-moz-border-left-colors"?: Property$MozBorderLeftColors, + "-moz-border-right-colors"?: Property$MozBorderRightColors, + "-moz-border-start-color"?: Property$BorderInlineStartColor, + "-moz-border-start-style"?: Property$BorderInlineStartStyle, + "-moz-border-top-colors"?: Property$MozBorderTopColors, + "-moz-box-sizing"?: Property$BoxSizing, + "-moz-column-count"?: Property$ColumnCount, + "-moz-column-fill"?: Property$ColumnFill, + "-moz-column-rule-color"?: Property$ColumnRuleColor, + "-moz-column-rule-style"?: Property$ColumnRuleStyle, + "-moz-column-rule-width"?: Property$ColumnRuleWidth<TLength>, + "-moz-column-width"?: Property$ColumnWidth<TLength>, + "-moz-context-properties"?: Property$MozContextProperties, + "-moz-font-feature-settings"?: Property$FontFeatureSettings, + "-moz-font-language-override"?: Property$FontLanguageOverride, + "-moz-hyphens"?: Property$Hyphens, + "-moz-image-region"?: Property$MozImageRegion, + "-moz-margin-end"?: Property$MarginInlineEnd<TLength>, + "-moz-margin-start"?: Property$MarginInlineStart<TLength>, + "-moz-orient"?: Property$MozOrient, + "-moz-osx-font-smoothing"?: Property$FontSmooth<TLength>, + "-moz-outline-radius-bottomleft"?: Property$MozOutlineRadiusBottomleft<TLength>, + "-moz-outline-radius-bottomright"?: Property$MozOutlineRadiusBottomright<TLength>, + "-moz-outline-radius-topleft"?: Property$MozOutlineRadiusTopleft<TLength>, + "-moz-outline-radius-topright"?: Property$MozOutlineRadiusTopright<TLength>, + "-moz-padding-end"?: Property$PaddingInlineEnd<TLength>, + "-moz-padding-start"?: Property$PaddingInlineStart<TLength>, + "-moz-stack-sizing"?: Property$MozStackSizing, + "-moz-tab-size"?: Property$TabSize<TLength>, + "-moz-text-blink"?: Property$MozTextBlink, + "-moz-text-size-adjust"?: Property$TextSizeAdjust, + "-moz-user-focus"?: Property$MozUserFocus, + "-moz-user-modify"?: Property$MozUserModify, + "-moz-user-select"?: Property$UserSelect, + "-moz-window-dragging"?: Property$MozWindowDragging, + "-moz-window-shadow"?: Property$MozWindowShadow, + "-ms-accelerator"?: Property$MsAccelerator, + "-ms-block-progression"?: Property$MsBlockProgression, + "-ms-content-zoom-chaining"?: Property$MsContentZoomChaining, + "-ms-content-zoom-limit-max"?: Property$MsContentZoomLimitMax, + "-ms-content-zoom-limit-min"?: Property$MsContentZoomLimitMin, + "-ms-content-zoom-snap-points"?: Property$MsContentZoomSnapPoints, + "-ms-content-zoom-snap-type"?: Property$MsContentZoomSnapType, + "-ms-content-zooming"?: Property$MsContentZooming, + "-ms-filter"?: Property$MsFilter, + "-ms-flex-direction"?: Property$FlexDirection, + "-ms-flex-positive"?: Property$FlexGrow, + "-ms-flow-from"?: Property$MsFlowFrom, + "-ms-flow-into"?: Property$MsFlowInto, + "-ms-grid-columns"?: Property$MsGridColumns<TLength>, + "-ms-grid-rows"?: Property$MsGridRows<TLength>, + "-ms-high-contrast-adjust"?: Property$MsHighContrastAdjust, + "-ms-hyphenate-limit-chars"?: Property$MsHyphenateLimitChars, + "-ms-hyphenate-limit-lines"?: Property$MsHyphenateLimitLines, + "-ms-hyphenate-limit-zone"?: Property$MsHyphenateLimitZone<TLength>, + "-ms-hyphens"?: Property$Hyphens, + "-ms-ime-align"?: Property$MsImeAlign, + "-ms-line-break"?: Property$LineBreak, + "-ms-order"?: Property$Order, + "-ms-overflow-style"?: Property$MsOverflowStyle, + "-ms-overflow-x"?: Property$OverflowX, + "-ms-overflow-y"?: Property$OverflowY, + "-ms-scroll-chaining"?: Property$MsScrollChaining, + "-ms-scroll-limit-x-max"?: Property$MsScrollLimitXMax<TLength>, + "-ms-scroll-limit-x-min"?: Property$MsScrollLimitXMin<TLength>, + "-ms-scroll-limit-y-max"?: Property$MsScrollLimitYMax<TLength>, + "-ms-scroll-limit-y-min"?: Property$MsScrollLimitYMin<TLength>, + "-ms-scroll-rails"?: Property$MsScrollRails, + "-ms-scroll-snap-points-x"?: Property$MsScrollSnapPointsX, + "-ms-scroll-snap-points-y"?: Property$MsScrollSnapPointsY, + "-ms-scroll-snap-type"?: Property$MsScrollSnapType, + "-ms-scroll-translation"?: Property$MsScrollTranslation, + "-ms-scrollbar-3dlight-color"?: Property$MsScrollbar3dlightColor, + "-ms-scrollbar-arrow-color"?: Property$MsScrollbarArrowColor, + "-ms-scrollbar-base-color"?: Property$MsScrollbarBaseColor, + "-ms-scrollbar-darkshadow-color"?: Property$MsScrollbarDarkshadowColor, + "-ms-scrollbar-face-color"?: Property$MsScrollbarFaceColor, + "-ms-scrollbar-highlight-color"?: Property$MsScrollbarHighlightColor, + "-ms-scrollbar-shadow-color"?: Property$MsScrollbarShadowColor, + "-ms-scrollbar-track-color"?: Property$MsScrollbarTrackColor, + "-ms-text-autospace"?: Property$MsTextAutospace, + "-ms-text-combine-horizontal"?: Property$TextCombineUpright, + "-ms-text-overflow"?: Property$TextOverflow, + "-ms-touch-action"?: Property$TouchAction, + "-ms-touch-select"?: Property$MsTouchSelect, + "-ms-transform"?: Property$Transform, + "-ms-transform-origin"?: Property$TransformOrigin<TLength>, + "-ms-transition-delay"?: Property$TransitionDelay<TTime>, + "-ms-transition-duration"?: Property$TransitionDuration<TTime>, + "-ms-transition-property"?: Property$TransitionProperty, + "-ms-transition-timing-function"?: Property$TransitionTimingFunction, + "-ms-user-select"?: Property$MsUserSelect, + "-ms-word-break"?: Property$WordBreak, + "-ms-wrap-flow"?: Property$MsWrapFlow, + "-ms-wrap-margin"?: Property$MsWrapMargin<TLength>, + "-ms-wrap-through"?: Property$MsWrapThrough, + "-ms-writing-mode"?: Property$WritingMode, + "-webkit-align-content"?: Property$AlignContent, + "-webkit-align-items"?: Property$AlignItems, + "-webkit-align-self"?: Property$AlignSelf, + "-webkit-animation-delay"?: Property$AnimationDelay<TTime>, + "-webkit-animation-direction"?: Property$AnimationDirection, + "-webkit-animation-duration"?: Property$AnimationDuration<TTime>, + "-webkit-animation-fill-mode"?: Property$AnimationFillMode, + "-webkit-animation-iteration-count"?: Property$AnimationIterationCount, + "-webkit-animation-name"?: Property$AnimationName, + "-webkit-animation-play-state"?: Property$AnimationPlayState, + "-webkit-animation-timing-function"?: Property$AnimationTimingFunction, + "-webkit-appearance"?: Property$WebkitAppearance, + "-webkit-backdrop-filter"?: Property$BackdropFilter, + "-webkit-backface-visibility"?: Property$BackfaceVisibility, + "-webkit-background-clip"?: Property$BackgroundClip, + "-webkit-background-origin"?: Property$BackgroundOrigin, + "-webkit-background-size"?: Property$BackgroundSize<TLength>, + "-webkit-border-before-color"?: Property$WebkitBorderBeforeColor, + "-webkit-border-before-style"?: Property$WebkitBorderBeforeStyle, + "-webkit-border-before-width"?: Property$WebkitBorderBeforeWidth<TLength>, + "-webkit-border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength>, + "-webkit-border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength>, + "-webkit-border-image-slice"?: Property$BorderImageSlice, + "-webkit-border-top-left-radius"?: Property$BorderTopLeftRadius<TLength>, + "-webkit-border-top-right-radius"?: Property$BorderTopRightRadius<TLength>, + "-webkit-box-decoration-break"?: Property$BoxDecorationBreak, + "-webkit-box-reflect"?: Property$WebkitBoxReflect<TLength>, + "-webkit-box-shadow"?: Property$BoxShadow, + "-webkit-box-sizing"?: Property$BoxSizing, + "-webkit-clip-path"?: Property$ClipPath, + "-webkit-column-count"?: Property$ColumnCount, + "-webkit-column-fill"?: Property$ColumnFill, + "-webkit-column-rule-color"?: Property$ColumnRuleColor, + "-webkit-column-rule-style"?: Property$ColumnRuleStyle, + "-webkit-column-rule-width"?: Property$ColumnRuleWidth<TLength>, + "-webkit-column-span"?: Property$ColumnSpan, + "-webkit-column-width"?: Property$ColumnWidth<TLength>, + "-webkit-filter"?: Property$Filter, + "-webkit-flex-basis"?: Property$FlexBasis<TLength>, + "-webkit-flex-direction"?: Property$FlexDirection, + "-webkit-flex-grow"?: Property$FlexGrow, + "-webkit-flex-shrink"?: Property$FlexShrink, + "-webkit-flex-wrap"?: Property$FlexWrap, + "-webkit-font-feature-settings"?: Property$FontFeatureSettings, + "-webkit-font-kerning"?: Property$FontKerning, + "-webkit-font-smoothing"?: Property$FontSmooth<TLength>, + "-webkit-font-variant-ligatures"?: Property$FontVariantLigatures, + "-webkit-hyphenate-character"?: Property$HyphenateCharacter, + "-webkit-hyphens"?: Property$Hyphens, + "-webkit-initial-letter"?: Property$InitialLetter, + "-webkit-justify-content"?: Property$JustifyContent, + "-webkit-line-break"?: Property$LineBreak, + "-webkit-line-clamp"?: Property$WebkitLineClamp, + "-webkit-margin-end"?: Property$MarginInlineEnd<TLength>, + "-webkit-margin-start"?: Property$MarginInlineStart<TLength>, + "-webkit-mask-attachment"?: Property$WebkitMaskAttachment, + "-webkit-mask-box-image-outset"?: Property$MaskBorderOutset<TLength>, + "-webkit-mask-box-image-repeat"?: Property$MaskBorderRepeat, + "-webkit-mask-box-image-slice"?: Property$MaskBorderSlice, + "-webkit-mask-box-image-source"?: Property$MaskBorderSource, + "-webkit-mask-box-image-width"?: Property$MaskBorderWidth<TLength>, + "-webkit-mask-clip"?: Property$WebkitMaskClip, + "-webkit-mask-composite"?: Property$WebkitMaskComposite, + "-webkit-mask-image"?: Property$WebkitMaskImage, + "-webkit-mask-origin"?: Property$WebkitMaskOrigin, + "-webkit-mask-position"?: Property$WebkitMaskPosition<TLength>, + "-webkit-mask-position-x"?: Property$WebkitMaskPositionX<TLength>, + "-webkit-mask-position-y"?: Property$WebkitMaskPositionY<TLength>, + "-webkit-mask-repeat"?: Property$WebkitMaskRepeat, + "-webkit-mask-repeat-x"?: Property$WebkitMaskRepeatX, + "-webkit-mask-repeat-y"?: Property$WebkitMaskRepeatY, + "-webkit-mask-size"?: Property$WebkitMaskSize<TLength>, + "-webkit-max-inline-size"?: Property$MaxInlineSize<TLength>, + "-webkit-order"?: Property$Order, + "-webkit-overflow-scrolling"?: Property$WebkitOverflowScrolling, + "-webkit-padding-end"?: Property$PaddingInlineEnd<TLength>, + "-webkit-padding-start"?: Property$PaddingInlineStart<TLength>, + "-webkit-perspective"?: Property$Perspective<TLength>, + "-webkit-perspective-origin"?: Property$PerspectiveOrigin<TLength>, + "-webkit-print-color-adjust"?: Property$PrintColorAdjust, + "-webkit-ruby-position"?: Property$RubyPosition, + "-webkit-scroll-snap-type"?: Property$ScrollSnapType, + "-webkit-shape-margin"?: Property$ShapeMargin<TLength>, + "-webkit-tap-highlight-color"?: Property$WebkitTapHighlightColor, + "-webkit-text-combine"?: Property$TextCombineUpright, + "-webkit-text-decoration-color"?: Property$TextDecorationColor, + "-webkit-text-decoration-line"?: Property$TextDecorationLine, + "-webkit-text-decoration-skip"?: Property$TextDecorationSkip, + "-webkit-text-decoration-style"?: Property$TextDecorationStyle, + "-webkit-text-emphasis-color"?: Property$TextEmphasisColor, + "-webkit-text-emphasis-position"?: Property$TextEmphasisPosition, + "-webkit-text-emphasis-style"?: Property$TextEmphasisStyle, + "-webkit-text-fill-color"?: Property$WebkitTextFillColor, + "-webkit-text-orientation"?: Property$TextOrientation, + "-webkit-text-size-adjust"?: Property$TextSizeAdjust, + "-webkit-text-stroke-color"?: Property$WebkitTextStrokeColor, + "-webkit-text-stroke-width"?: Property$WebkitTextStrokeWidth<TLength>, + "-webkit-text-underline-position"?: Property$TextUnderlinePosition, + "-webkit-touch-callout"?: Property$WebkitTouchCallout, + "-webkit-transform"?: Property$Transform, + "-webkit-transform-origin"?: Property$TransformOrigin<TLength>, + "-webkit-transform-style"?: Property$TransformStyle, + "-webkit-transition-delay"?: Property$TransitionDelay<TTime>, + "-webkit-transition-duration"?: Property$TransitionDuration<TTime>, + "-webkit-transition-property"?: Property$TransitionProperty, + "-webkit-transition-timing-function"?: Property$TransitionTimingFunction, + "-webkit-user-modify"?: Property$WebkitUserModify, + "-webkit-user-select"?: Property$UserSelect, + "-webkit-writing-mode"?: Property$WritingMode, +|}; -export type VendorPropertiesHyphen<TLength = string | 0> = VendorLonghandPropertiesHyphen<TLength> & VendorShorthandPropertiesHyphen<TLength>; +export type VendorShorthandPropertiesHyphen<TLength = string | 0, TTime = string> = {| + "-moz-animation"?: Property$Animation<TTime>, + "-moz-border-image"?: Property$BorderImage, + "-moz-column-rule"?: Property$ColumnRule<TLength>, + "-moz-columns"?: Property$Columns<TLength>, + "-moz-outline-radius"?: Property$MozOutlineRadius<TLength>, + "-ms-content-zoom-limit"?: Property$MsContentZoomLimit, + "-ms-content-zoom-snap"?: Property$MsContentZoomSnap, + "-ms-flex"?: Property$Flex<TLength>, + "-ms-scroll-limit"?: Property$MsScrollLimit, + "-ms-scroll-snap-x"?: Property$MsScrollSnapX, + "-ms-scroll-snap-y"?: Property$MsScrollSnapY, + "-ms-transition"?: Property$Transition<TTime>, + "-webkit-animation"?: Property$Animation<TTime>, + "-webkit-border-before"?: Property$WebkitBorderBefore<TLength>, + "-webkit-border-image"?: Property$BorderImage, + "-webkit-border-radius"?: Property$BorderRadius<TLength>, + "-webkit-column-rule"?: Property$ColumnRule<TLength>, + "-webkit-columns"?: Property$Columns<TLength>, + "-webkit-flex"?: Property$Flex<TLength>, + "-webkit-flex-flow"?: Property$FlexFlow, + "-webkit-mask"?: Property$WebkitMask<TLength>, + "-webkit-mask-box-image"?: Property$MaskBorder, + "-webkit-text-emphasis"?: Property$TextEmphasis, + "-webkit-text-stroke"?: Property$WebkitTextStroke<TLength>, + "-webkit-transition"?: Property$Transition<TTime>, +|}; -export type ObsoletePropertiesHyphen<TLength = string | 0> = { - azimuth?: AzimuthProperty, - "box-align"?: BoxAlignProperty, - "box-direction"?: BoxDirectionProperty, - "box-flex"?: GlobalsNumber, - "box-flex-group"?: GlobalsNumber, - "box-lines"?: BoxLinesProperty, - "box-ordinal-group"?: GlobalsNumber, - "box-orient"?: BoxOrientProperty, - "box-pack"?: BoxPackProperty, - clip?: ClipProperty, - "grid-column-gap"?: GridColumnGapProperty<TLength>, - "grid-gap"?: GridGapProperty<TLength>, - "grid-row-gap"?: GridRowGapProperty<TLength>, - "ime-mode"?: ImeModeProperty, - "offset-block"?: InsetBlockProperty<TLength>, - "offset-block-end"?: InsetBlockEndProperty<TLength>, - "offset-block-start"?: InsetBlockStartProperty<TLength>, - "offset-inline"?: InsetInlineProperty<TLength>, - "offset-inline-end"?: InsetInlineEndProperty<TLength>, - "offset-inline-start"?: InsetInlineStartProperty<TLength>, - "scroll-snap-coordinate"?: ScrollSnapCoordinateProperty<TLength>, - "scroll-snap-destination"?: ScrollSnapDestinationProperty<TLength>, - "scroll-snap-points-x"?: ScrollSnapPointsXProperty, - "scroll-snap-points-y"?: ScrollSnapPointsYProperty, - "scroll-snap-type-x"?: ScrollSnapTypeXProperty, - "scroll-snap-type-y"?: ScrollSnapTypeYProperty, - "-khtml-box-align"?: BoxAlignProperty, - "-khtml-box-direction"?: BoxDirectionProperty, - "-khtml-box-flex"?: GlobalsNumber, - "-khtml-box-flex-group"?: GlobalsNumber, - "-khtml-box-lines"?: BoxLinesProperty, - "-khtml-box-ordinal-group"?: GlobalsNumber, - "-khtml-box-orient"?: BoxOrientProperty, - "-khtml-box-pack"?: BoxPackProperty, - "-khtml-line-break"?: LineBreakProperty, - "-khtml-opacity"?: OpacityProperty, - "-khtml-user-select"?: UserSelectProperty, - "-moz-background-clip"?: BackgroundClipProperty, - "-moz-background-inline-policy"?: BoxDecorationBreakProperty, - "-moz-background-origin"?: BackgroundOriginProperty, - "-moz-background-size"?: BackgroundSizeProperty<TLength>, - "-moz-binding"?: MozBindingProperty, - "-moz-border-radius"?: BorderRadiusProperty<TLength>, - "-moz-border-radius-bottomleft"?: BorderBottomLeftRadiusProperty<TLength>, - "-moz-border-radius-bottomright"?: BorderBottomRightRadiusProperty<TLength>, - "-moz-border-radius-topleft"?: BorderTopLeftRadiusProperty<TLength>, - "-moz-border-radius-topright"?: BorderTopRightRadiusProperty<TLength>, - "-moz-box-align"?: BoxAlignProperty, - "-moz-box-direction"?: BoxDirectionProperty, - "-moz-box-flex"?: GlobalsNumber, - "-moz-box-ordinal-group"?: GlobalsNumber, - "-moz-box-orient"?: BoxOrientProperty, - "-moz-box-pack"?: BoxPackProperty, - "-moz-box-shadow"?: BoxShadowProperty, - "-moz-float-edge"?: MozFloatEdgeProperty, - "-moz-force-broken-image-icon"?: MozForceBrokenImageIconProperty, - "-moz-opacity"?: OpacityProperty, - "-moz-outline"?: OutlineProperty<TLength>, - "-moz-outline-color"?: OutlineColorProperty, - "-moz-outline-radius"?: MozOutlineRadiusProperty<TLength>, - "-moz-outline-radius-bottomleft"?: MozOutlineRadiusBottomleftProperty<TLength>, - "-moz-outline-radius-bottomright"?: MozOutlineRadiusBottomrightProperty<TLength>, - "-moz-outline-radius-topleft"?: MozOutlineRadiusTopleftProperty<TLength>, - "-moz-outline-radius-topright"?: MozOutlineRadiusToprightProperty<TLength>, - "-moz-outline-style"?: OutlineStyleProperty, - "-moz-outline-width"?: OutlineWidthProperty<TLength>, - "-moz-text-align-last"?: TextAlignLastProperty, - "-moz-text-decoration-color"?: TextDecorationColorProperty, - "-moz-text-decoration-line"?: TextDecorationLineProperty, - "-moz-text-decoration-style"?: TextDecorationStyleProperty, - "-moz-user-input"?: MozUserInputProperty, - "-ms-ime-mode"?: ImeModeProperty, - "-o-animation"?: AnimationProperty, - "-o-animation-delay"?: GlobalsString, - "-o-animation-direction"?: AnimationDirectionProperty, - "-o-animation-duration"?: GlobalsString, - "-o-animation-fill-mode"?: AnimationFillModeProperty, - "-o-animation-iteration-count"?: AnimationIterationCountProperty, - "-o-animation-name"?: AnimationNameProperty, - "-o-animation-play-state"?: AnimationPlayStateProperty, - "-o-animation-timing-function"?: AnimationTimingFunctionProperty, - "-o-background-size"?: BackgroundSizeProperty<TLength>, - "-o-border-image"?: BorderImageProperty, - "-o-object-fit"?: ObjectFitProperty, - "-o-object-position"?: ObjectPositionProperty<TLength>, - "-o-tab-size"?: TabSizeProperty<TLength>, - "-o-text-overflow"?: TextOverflowProperty, - "-o-transform"?: TransformProperty, - "-o-transform-origin"?: TransformOriginProperty<TLength>, - "-o-transition"?: TransitionProperty, - "-o-transition-delay"?: GlobalsString, - "-o-transition-duration"?: GlobalsString, - "-o-transition-property"?: TransitionPropertyProperty, - "-o-transition-timing-function"?: TransitionTimingFunctionProperty, - "-webkit-box-align"?: BoxAlignProperty, - "-webkit-box-direction"?: BoxDirectionProperty, - "-webkit-box-flex"?: GlobalsNumber, - "-webkit-box-flex-group"?: GlobalsNumber, - "-webkit-box-lines"?: BoxLinesProperty, - "-webkit-box-ordinal-group"?: GlobalsNumber, - "-webkit-box-orient"?: BoxOrientProperty, - "-webkit-box-pack"?: BoxPackProperty, - "-webkit-scroll-snap-points-x"?: ScrollSnapPointsXProperty, - "-webkit-scroll-snap-points-y"?: ScrollSnapPointsYProperty, -}; +export type VendorPropertiesHyphen<TLength = string | 0, TTime = string> = {| + ...VendorLonghandPropertiesHyphen<TLength, TTime>, + ...VendorShorthandPropertiesHyphen<TLength, TTime>, +|}; -export type SvgPropertiesHyphen<TLength = string | 0> = { - "alignment-baseline"?: AlignmentBaselineProperty, - "baseline-shift"?: BaselineShiftProperty<TLength>, - clip?: ClipProperty, - "clip-path"?: ClipPathProperty, - "clip-rule"?: ClipRuleProperty, - color?: ColorProperty, - "color-interpolation"?: ColorInterpolationProperty, - "color-rendering"?: ColorRenderingProperty, - cursor?: CursorProperty, - direction?: DirectionProperty, - display?: DisplayProperty, - "dominant-baseline"?: DominantBaselineProperty, - fill?: FillProperty, - "fill-opacity"?: GlobalsNumber, - "fill-rule"?: FillRuleProperty, - filter?: FilterProperty, - "flood-color"?: FloodColorProperty, - "flood-opacity"?: GlobalsNumber, - font?: FontProperty, - "font-family"?: FontFamilyProperty, - "font-size"?: FontSizeProperty<TLength>, - "font-size-adjust"?: FontSizeAdjustProperty, - "font-stretch"?: FontStretchProperty, - "font-style"?: FontStyleProperty, - "font-variant"?: FontVariantProperty, - "font-weight"?: FontWeightProperty, - "glyph-orientation-vertical"?: GlyphOrientationVerticalProperty, - "image-rendering"?: ImageRenderingProperty, - "letter-spacing"?: LetterSpacingProperty<TLength>, - "lighting-color"?: LightingColorProperty, - "line-height"?: LineHeightProperty<TLength>, - marker?: MarkerProperty, - "marker-end"?: MarkerEndProperty, - "marker-mid"?: MarkerMidProperty, - "marker-start"?: MarkerStartProperty, - mask?: MaskProperty<TLength>, - opacity?: OpacityProperty, - overflow?: OverflowProperty, - "paint-order"?: PaintOrderProperty, - "pointer-events"?: PointerEventsProperty, - "shape-rendering"?: ShapeRenderingProperty, - "stop-color"?: StopColorProperty, - "stop-opacity"?: GlobalsNumber, - stroke?: StrokeProperty, - "stroke-dasharray"?: StrokeDasharrayProperty<TLength>, - "stroke-dashoffset"?: StrokeDashoffsetProperty<TLength>, - "stroke-linecap"?: StrokeLinecapProperty, - "stroke-linejoin"?: StrokeLinejoinProperty, - "stroke-miterlimit"?: GlobalsNumber, - "stroke-opacity"?: GlobalsNumber, - "stroke-width"?: StrokeWidthProperty<TLength>, - "text-anchor"?: TextAnchorProperty, - "text-decoration"?: TextDecorationProperty<TLength>, - "text-rendering"?: TextRenderingProperty, - "unicode-bidi"?: UnicodeBidiProperty, - "vector-effect"?: VectorEffectProperty, - visibility?: VisibilityProperty, - "white-space"?: WhiteSpaceProperty, - "word-spacing"?: WordSpacingProperty<TLength>, - "writing-mode"?: WritingModeProperty, -}; +export type ObsoletePropertiesHyphen<TLength = string | 0, TTime = string> = {| + azimuth?: Property$Azimuth, + "box-align"?: Property$BoxAlign, + "box-direction"?: Property$BoxDirection, + "box-flex"?: Property$BoxFlex, + "box-flex-group"?: Property$BoxFlexGroup, + "box-lines"?: Property$BoxLines, + "box-ordinal-group"?: Property$BoxOrdinalGroup, + "box-orient"?: Property$BoxOrient, + "box-pack"?: Property$BoxPack, + clip?: Property$Clip, + "grid-column-gap"?: Property$GridColumnGap<TLength>, + "grid-gap"?: Property$GridGap<TLength>, + "grid-row-gap"?: Property$GridRowGap<TLength>, + "ime-mode"?: Property$ImeMode, + "offset-block"?: Property$InsetBlock<TLength>, + "offset-block-end"?: Property$InsetBlockEnd<TLength>, + "offset-block-start"?: Property$InsetBlockStart<TLength>, + "offset-inline"?: Property$InsetInline<TLength>, + "offset-inline-end"?: Property$InsetInlineEnd<TLength>, + "offset-inline-start"?: Property$InsetInlineStart<TLength>, + "scroll-snap-coordinate"?: Property$ScrollSnapCoordinate<TLength>, + "scroll-snap-destination"?: Property$ScrollSnapDestination<TLength>, + "scroll-snap-points-x"?: Property$ScrollSnapPointsX, + "scroll-snap-points-y"?: Property$ScrollSnapPointsY, + "scroll-snap-type-x"?: Property$ScrollSnapTypeX, + "scroll-snap-type-y"?: Property$ScrollSnapTypeY, + "-khtml-box-align"?: Property$BoxAlign, + "-khtml-box-direction"?: Property$BoxDirection, + "-khtml-box-flex"?: Property$BoxFlex, + "-khtml-box-flex-group"?: Property$BoxFlexGroup, + "-khtml-box-lines"?: Property$BoxLines, + "-khtml-box-ordinal-group"?: Property$BoxOrdinalGroup, + "-khtml-box-orient"?: Property$BoxOrient, + "-khtml-box-pack"?: Property$BoxPack, + "-khtml-line-break"?: Property$LineBreak, + "-khtml-opacity"?: Property$Opacity, + "-khtml-user-select"?: Property$UserSelect, + "-moz-backface-visibility"?: Property$BackfaceVisibility, + "-moz-background-clip"?: Property$BackgroundClip, + "-moz-background-inline-policy"?: Property$BoxDecorationBreak, + "-moz-background-origin"?: Property$BackgroundOrigin, + "-moz-background-size"?: Property$BackgroundSize<TLength>, + "-moz-border-radius"?: Property$BorderRadius<TLength>, + "-moz-border-radius-bottomleft"?: Property$BorderBottomLeftRadius<TLength>, + "-moz-border-radius-bottomright"?: Property$BorderBottomRightRadius<TLength>, + "-moz-border-radius-topleft"?: Property$BorderTopLeftRadius<TLength>, + "-moz-border-radius-topright"?: Property$BorderTopRightRadius<TLength>, + "-moz-box-align"?: Property$BoxAlign, + "-moz-box-direction"?: Property$BoxDirection, + "-moz-box-flex"?: Property$BoxFlex, + "-moz-box-ordinal-group"?: Property$BoxOrdinalGroup, + "-moz-box-orient"?: Property$BoxOrient, + "-moz-box-pack"?: Property$BoxPack, + "-moz-box-shadow"?: Property$BoxShadow, + "-moz-float-edge"?: Property$MozFloatEdge, + "-moz-force-broken-image-icon"?: Property$MozForceBrokenImageIcon, + "-moz-opacity"?: Property$Opacity, + "-moz-outline"?: Property$Outline<TLength>, + "-moz-outline-color"?: Property$OutlineColor, + "-moz-outline-style"?: Property$OutlineStyle, + "-moz-outline-width"?: Property$OutlineWidth<TLength>, + "-moz-perspective"?: Property$Perspective<TLength>, + "-moz-perspective-origin"?: Property$PerspectiveOrigin<TLength>, + "-moz-text-align-last"?: Property$TextAlignLast, + "-moz-text-decoration-color"?: Property$TextDecorationColor, + "-moz-text-decoration-line"?: Property$TextDecorationLine, + "-moz-text-decoration-style"?: Property$TextDecorationStyle, + "-moz-transform"?: Property$Transform, + "-moz-transform-origin"?: Property$TransformOrigin<TLength>, + "-moz-transform-style"?: Property$TransformStyle, + "-moz-transition"?: Property$Transition<TTime>, + "-moz-transition-delay"?: Property$TransitionDelay<TTime>, + "-moz-transition-duration"?: Property$TransitionDuration<TTime>, + "-moz-transition-property"?: Property$TransitionProperty, + "-moz-transition-timing-function"?: Property$TransitionTimingFunction, + "-moz-user-input"?: Property$MozUserInput, + "-ms-ime-mode"?: Property$ImeMode, + "-o-animation"?: Property$Animation<TTime>, + "-o-animation-delay"?: Property$AnimationDelay<TTime>, + "-o-animation-direction"?: Property$AnimationDirection, + "-o-animation-duration"?: Property$AnimationDuration<TTime>, + "-o-animation-fill-mode"?: Property$AnimationFillMode, + "-o-animation-iteration-count"?: Property$AnimationIterationCount, + "-o-animation-name"?: Property$AnimationName, + "-o-animation-play-state"?: Property$AnimationPlayState, + "-o-animation-timing-function"?: Property$AnimationTimingFunction, + "-o-background-size"?: Property$BackgroundSize<TLength>, + "-o-border-image"?: Property$BorderImage, + "-o-object-fit"?: Property$ObjectFit, + "-o-object-position"?: Property$ObjectPosition<TLength>, + "-o-tab-size"?: Property$TabSize<TLength>, + "-o-text-overflow"?: Property$TextOverflow, + "-o-transform"?: Property$Transform, + "-o-transform-origin"?: Property$TransformOrigin<TLength>, + "-o-transition"?: Property$Transition<TTime>, + "-o-transition-delay"?: Property$TransitionDelay<TTime>, + "-o-transition-duration"?: Property$TransitionDuration<TTime>, + "-o-transition-property"?: Property$TransitionProperty, + "-o-transition-timing-function"?: Property$TransitionTimingFunction, + "-webkit-box-align"?: Property$BoxAlign, + "-webkit-box-direction"?: Property$BoxDirection, + "-webkit-box-flex"?: Property$BoxFlex, + "-webkit-box-flex-group"?: Property$BoxFlexGroup, + "-webkit-box-lines"?: Property$BoxLines, + "-webkit-box-ordinal-group"?: Property$BoxOrdinalGroup, + "-webkit-box-orient"?: Property$BoxOrient, + "-webkit-box-pack"?: Property$BoxPack, +|}; -export type PropertiesHyphen<TLength = string | 0> = StandardPropertiesHyphen<TLength> & - VendorPropertiesHyphen<TLength> & - ObsoletePropertiesHyphen<TLength> & - SvgPropertiesHyphen<TLength>; +export type SvgPropertiesHyphen<TLength = string | 0, TTime = string> = {| + "alignment-baseline"?: Property$AlignmentBaseline, + "baseline-shift"?: Property$BaselineShift<TLength>, + clip?: Property$Clip, + "clip-path"?: Property$ClipPath, + "clip-rule"?: Property$ClipRule, + color?: Property$Color, + "color-interpolation"?: Property$ColorInterpolation, + "color-rendering"?: Property$ColorRendering, + cursor?: Property$Cursor, + direction?: Property$Direction, + display?: Property$Display, + "dominant-baseline"?: Property$DominantBaseline, + fill?: Property$Fill, + "fill-opacity"?: Property$FillOpacity, + "fill-rule"?: Property$FillRule, + filter?: Property$Filter, + "flood-color"?: Property$FloodColor, + "flood-opacity"?: Property$FloodOpacity, + font?: Property$Font, + "font-family"?: Property$FontFamily, + "font-size"?: Property$FontSize<TLength>, + "font-size-adjust"?: Property$FontSizeAdjust, + "font-stretch"?: Property$FontStretch, + "font-style"?: Property$FontStyle, + "font-variant"?: Property$FontVariant, + "font-weight"?: Property$FontWeight, + "glyph-orientation-vertical"?: Property$GlyphOrientationVertical, + "image-rendering"?: Property$ImageRendering, + "letter-spacing"?: Property$LetterSpacing<TLength>, + "lighting-color"?: Property$LightingColor, + "line-height"?: Property$LineHeight<TLength>, + marker?: Property$Marker, + "marker-end"?: Property$MarkerEnd, + "marker-mid"?: Property$MarkerMid, + "marker-start"?: Property$MarkerStart, + mask?: Property$Mask<TLength>, + opacity?: Property$Opacity, + overflow?: Property$Overflow, + "paint-order"?: Property$PaintOrder, + "pointer-events"?: Property$PointerEvents, + "shape-rendering"?: Property$ShapeRendering, + "stop-color"?: Property$StopColor, + "stop-opacity"?: Property$StopOpacity, + stroke?: Property$Stroke, + "stroke-dasharray"?: Property$StrokeDasharray<TLength>, + "stroke-dashoffset"?: Property$StrokeDashoffset<TLength>, + "stroke-linecap"?: Property$StrokeLinecap, + "stroke-linejoin"?: Property$StrokeLinejoin, + "stroke-miterlimit"?: Property$StrokeMiterlimit, + "stroke-opacity"?: Property$StrokeOpacity, + "stroke-width"?: Property$StrokeWidth<TLength>, + "text-anchor"?: Property$TextAnchor, + "text-decoration"?: Property$TextDecoration<TLength>, + "text-rendering"?: Property$TextRendering, + "unicode-bidi"?: Property$UnicodeBidi, + "vector-effect"?: Property$VectorEffect, + visibility?: Property$Visibility, + "white-space"?: Property$WhiteSpace, + "word-spacing"?: Property$WordSpacing<TLength>, + "writing-mode"?: Property$WritingMode, +|}; -export type StandardLonghandPropertiesFallback<TLength = string | 0> = { - accentColor?: AccentColorProperty | AccentColorProperty[], - alignContent?: AlignContentProperty | AlignContentProperty[], - alignItems?: AlignItemsProperty | AlignItemsProperty[], - alignSelf?: AlignSelfProperty | AlignSelfProperty[], - alignTracks?: AlignTracksProperty | AlignTracksProperty[], - animationComposition?: GlobalsString | GlobalsString[], - animationDelay?: GlobalsString | GlobalsString[], - animationDirection?: AnimationDirectionProperty | AnimationDirectionProperty[], - animationDuration?: GlobalsString | GlobalsString[], - animationFillMode?: AnimationFillModeProperty | AnimationFillModeProperty[], - animationIterationCount?: AnimationIterationCountProperty | AnimationIterationCountProperty[], - animationName?: AnimationNameProperty | AnimationNameProperty[], - animationPlayState?: AnimationPlayStateProperty | AnimationPlayStateProperty[], - animationTimeline?: AnimationTimelineProperty | AnimationTimelineProperty[], - animationTimingFunction?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[], - appearance?: AppearanceProperty | AppearanceProperty[], - aspectRatio?: AspectRatioProperty | AspectRatioProperty[], - backdropFilter?: BackdropFilterProperty | BackdropFilterProperty[], - backfaceVisibility?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[], - backgroundAttachment?: BackgroundAttachmentProperty | BackgroundAttachmentProperty[], - backgroundBlendMode?: BackgroundBlendModeProperty | BackgroundBlendModeProperty[], - backgroundClip?: BackgroundClipProperty | BackgroundClipProperty[], - backgroundColor?: BackgroundColorProperty | BackgroundColorProperty[], - backgroundImage?: BackgroundImageProperty | BackgroundImageProperty[], - backgroundOrigin?: BackgroundOriginProperty | BackgroundOriginProperty[], - backgroundPositionX?: BackgroundPositionXProperty<TLength> | BackgroundPositionXProperty<TLength>[], - backgroundPositionY?: BackgroundPositionYProperty<TLength> | BackgroundPositionYProperty<TLength>[], - backgroundRepeat?: BackgroundRepeatProperty | BackgroundRepeatProperty[], - backgroundSize?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[], - blockOverflow?: BlockOverflowProperty | BlockOverflowProperty[], - blockSize?: BlockSizeProperty<TLength> | BlockSizeProperty<TLength>[], - borderBlockColor?: BorderBlockColorProperty | BorderBlockColorProperty[], - borderBlockEndColor?: BorderBlockEndColorProperty | BorderBlockEndColorProperty[], - borderBlockEndStyle?: BorderBlockEndStyleProperty | BorderBlockEndStyleProperty[], - borderBlockEndWidth?: BorderBlockEndWidthProperty<TLength> | BorderBlockEndWidthProperty<TLength>[], - borderBlockStartColor?: BorderBlockStartColorProperty | BorderBlockStartColorProperty[], - borderBlockStartStyle?: BorderBlockStartStyleProperty | BorderBlockStartStyleProperty[], - borderBlockStartWidth?: BorderBlockStartWidthProperty<TLength> | BorderBlockStartWidthProperty<TLength>[], - borderBlockStyle?: BorderBlockStyleProperty | BorderBlockStyleProperty[], - borderBlockWidth?: BorderBlockWidthProperty<TLength> | BorderBlockWidthProperty<TLength>[], - borderBottomColor?: BorderBottomColorProperty | BorderBottomColorProperty[], - borderBottomLeftRadius?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[], - borderBottomRightRadius?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[], - borderBottomStyle?: BorderBottomStyleProperty | BorderBottomStyleProperty[], - borderBottomWidth?: BorderBottomWidthProperty<TLength> | BorderBottomWidthProperty<TLength>[], - borderCollapse?: BorderCollapseProperty | BorderCollapseProperty[], - borderEndEndRadius?: BorderEndEndRadiusProperty<TLength> | BorderEndEndRadiusProperty<TLength>[], - borderEndStartRadius?: BorderEndStartRadiusProperty<TLength> | BorderEndStartRadiusProperty<TLength>[], - borderImageOutset?: BorderImageOutsetProperty<TLength> | BorderImageOutsetProperty<TLength>[], - borderImageRepeat?: BorderImageRepeatProperty | BorderImageRepeatProperty[], - borderImageSlice?: BorderImageSliceProperty | BorderImageSliceProperty[], - borderImageSource?: BorderImageSourceProperty | BorderImageSourceProperty[], - borderImageWidth?: BorderImageWidthProperty<TLength> | BorderImageWidthProperty<TLength>[], - borderInlineColor?: BorderInlineColorProperty | BorderInlineColorProperty[], - borderInlineEndColor?: BorderInlineEndColorProperty | BorderInlineEndColorProperty[], - borderInlineEndStyle?: BorderInlineEndStyleProperty | BorderInlineEndStyleProperty[], - borderInlineEndWidth?: BorderInlineEndWidthProperty<TLength> | BorderInlineEndWidthProperty<TLength>[], - borderInlineStartColor?: BorderInlineStartColorProperty | BorderInlineStartColorProperty[], - borderInlineStartStyle?: BorderInlineStartStyleProperty | BorderInlineStartStyleProperty[], - borderInlineStartWidth?: BorderInlineStartWidthProperty<TLength> | BorderInlineStartWidthProperty<TLength>[], - borderInlineStyle?: BorderInlineStyleProperty | BorderInlineStyleProperty[], - borderInlineWidth?: BorderInlineWidthProperty<TLength> | BorderInlineWidthProperty<TLength>[], - borderLeftColor?: BorderLeftColorProperty | BorderLeftColorProperty[], - borderLeftStyle?: BorderLeftStyleProperty | BorderLeftStyleProperty[], - borderLeftWidth?: BorderLeftWidthProperty<TLength> | BorderLeftWidthProperty<TLength>[], - borderRightColor?: BorderRightColorProperty | BorderRightColorProperty[], - borderRightStyle?: BorderRightStyleProperty | BorderRightStyleProperty[], - borderRightWidth?: BorderRightWidthProperty<TLength> | BorderRightWidthProperty<TLength>[], - borderSpacing?: BorderSpacingProperty<TLength> | BorderSpacingProperty<TLength>[], - borderStartEndRadius?: BorderStartEndRadiusProperty<TLength> | BorderStartEndRadiusProperty<TLength>[], - borderStartStartRadius?: BorderStartStartRadiusProperty<TLength> | BorderStartStartRadiusProperty<TLength>[], - borderTopColor?: BorderTopColorProperty | BorderTopColorProperty[], - borderTopLeftRadius?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[], - borderTopRightRadius?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[], - borderTopStyle?: BorderTopStyleProperty | BorderTopStyleProperty[], - borderTopWidth?: BorderTopWidthProperty<TLength> | BorderTopWidthProperty<TLength>[], - bottom?: BottomProperty<TLength> | BottomProperty<TLength>[], - boxDecorationBreak?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[], - boxShadow?: BoxShadowProperty | BoxShadowProperty[], - boxSizing?: BoxSizingProperty | BoxSizingProperty[], - breakAfter?: BreakAfterProperty | BreakAfterProperty[], - breakBefore?: BreakBeforeProperty | BreakBeforeProperty[], - breakInside?: BreakInsideProperty | BreakInsideProperty[], - captionSide?: CaptionSideProperty | CaptionSideProperty[], - caretColor?: CaretColorProperty | CaretColorProperty[], - clear?: ClearProperty | ClearProperty[], - clipPath?: ClipPathProperty | ClipPathProperty[], - color?: ColorProperty | ColorProperty[], - colorAdjust?: PrintColorAdjustProperty | PrintColorAdjustProperty[], - colorScheme?: ColorSchemeProperty | ColorSchemeProperty[], - columnCount?: ColumnCountProperty | ColumnCountProperty[], - columnFill?: ColumnFillProperty | ColumnFillProperty[], - columnGap?: ColumnGapProperty<TLength> | ColumnGapProperty<TLength>[], - columnRuleColor?: ColumnRuleColorProperty | ColumnRuleColorProperty[], - columnRuleStyle?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[], - columnRuleWidth?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[], - columnSpan?: ColumnSpanProperty | ColumnSpanProperty[], - columnWidth?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[], - contain?: ContainProperty | ContainProperty[], - content?: ContentProperty | ContentProperty[], - contentVisibility?: ContentVisibilityProperty | ContentVisibilityProperty[], - counterIncrement?: CounterIncrementProperty | CounterIncrementProperty[], - counterReset?: CounterResetProperty | CounterResetProperty[], - counterSet?: CounterSetProperty | CounterSetProperty[], - cursor?: CursorProperty | CursorProperty[], - direction?: DirectionProperty | DirectionProperty[], - display?: DisplayProperty | DisplayProperty[], - emptyCells?: EmptyCellsProperty | EmptyCellsProperty[], - filter?: FilterProperty | FilterProperty[], - flexBasis?: FlexBasisProperty<TLength> | FlexBasisProperty<TLength>[], - flexDirection?: FlexDirectionProperty | FlexDirectionProperty[], - flexGrow?: GlobalsNumber | GlobalsNumber[], - flexShrink?: GlobalsNumber | GlobalsNumber[], - flexWrap?: FlexWrapProperty | FlexWrapProperty[], - float?: FloatProperty | FloatProperty[], - fontFamily?: FontFamilyProperty | FontFamilyProperty[], - fontFeatureSettings?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[], - fontKerning?: FontKerningProperty | FontKerningProperty[], - fontLanguageOverride?: FontLanguageOverrideProperty | FontLanguageOverrideProperty[], - fontOpticalSizing?: FontOpticalSizingProperty | FontOpticalSizingProperty[], - fontSize?: FontSizeProperty<TLength> | FontSizeProperty<TLength>[], - fontSizeAdjust?: FontSizeAdjustProperty | FontSizeAdjustProperty[], - fontSmooth?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[], - fontStretch?: FontStretchProperty | FontStretchProperty[], - fontStyle?: FontStyleProperty | FontStyleProperty[], - fontSynthesis?: FontSynthesisProperty | FontSynthesisProperty[], - fontVariant?: FontVariantProperty | FontVariantProperty[], - fontVariantAlternates?: FontVariantAlternatesProperty | FontVariantAlternatesProperty[], - fontVariantCaps?: FontVariantCapsProperty | FontVariantCapsProperty[], - fontVariantEastAsian?: FontVariantEastAsianProperty | FontVariantEastAsianProperty[], - fontVariantLigatures?: FontVariantLigaturesProperty | FontVariantLigaturesProperty[], - fontVariantNumeric?: FontVariantNumericProperty | FontVariantNumericProperty[], - fontVariantPosition?: FontVariantPositionProperty | FontVariantPositionProperty[], - fontVariationSettings?: FontVariationSettingsProperty | FontVariationSettingsProperty[], - fontWeight?: FontWeightProperty | FontWeightProperty[], - forcedColorAdjust?: ForcedColorAdjustProperty | ForcedColorAdjustProperty[], - gridAutoColumns?: GridAutoColumnsProperty<TLength> | GridAutoColumnsProperty<TLength>[], - gridAutoFlow?: GridAutoFlowProperty | GridAutoFlowProperty[], - gridAutoRows?: GridAutoRowsProperty<TLength> | GridAutoRowsProperty<TLength>[], - gridColumnEnd?: GridColumnEndProperty | GridColumnEndProperty[], - gridColumnStart?: GridColumnStartProperty | GridColumnStartProperty[], - gridRowEnd?: GridRowEndProperty | GridRowEndProperty[], - gridRowStart?: GridRowStartProperty | GridRowStartProperty[], - gridTemplateAreas?: GridTemplateAreasProperty | GridTemplateAreasProperty[], - gridTemplateColumns?: GridTemplateColumnsProperty<TLength> | GridTemplateColumnsProperty<TLength>[], - gridTemplateRows?: GridTemplateRowsProperty<TLength> | GridTemplateRowsProperty<TLength>[], - hangingPunctuation?: HangingPunctuationProperty | HangingPunctuationProperty[], - height?: HeightProperty<TLength> | HeightProperty<TLength>[], - hyphenateCharacter?: HyphenateCharacterProperty | HyphenateCharacterProperty[], - hyphens?: HyphensProperty | HyphensProperty[], - imageOrientation?: ImageOrientationProperty | ImageOrientationProperty[], - imageRendering?: ImageRenderingProperty | ImageRenderingProperty[], - imageResolution?: ImageResolutionProperty | ImageResolutionProperty[], - initialLetter?: InitialLetterProperty | InitialLetterProperty[], - inlineSize?: InlineSizeProperty<TLength> | InlineSizeProperty<TLength>[], - inputSecurity?: InputSecurityProperty | InputSecurityProperty[], - inset?: InsetProperty<TLength> | InsetProperty<TLength>[], - insetBlock?: InsetBlockProperty<TLength> | InsetBlockProperty<TLength>[], - insetBlockEnd?: InsetBlockEndProperty<TLength> | InsetBlockEndProperty<TLength>[], - insetBlockStart?: InsetBlockStartProperty<TLength> | InsetBlockStartProperty<TLength>[], - insetInline?: InsetInlineProperty<TLength> | InsetInlineProperty<TLength>[], - insetInlineEnd?: InsetInlineEndProperty<TLength> | InsetInlineEndProperty<TLength>[], - insetInlineStart?: InsetInlineStartProperty<TLength> | InsetInlineStartProperty<TLength>[], - isolation?: IsolationProperty | IsolationProperty[], - justifyContent?: JustifyContentProperty | JustifyContentProperty[], - justifyItems?: JustifyItemsProperty | JustifyItemsProperty[], - justifySelf?: JustifySelfProperty | JustifySelfProperty[], - justifyTracks?: JustifyTracksProperty | JustifyTracksProperty[], - left?: LeftProperty<TLength> | LeftProperty<TLength>[], - letterSpacing?: LetterSpacingProperty<TLength> | LetterSpacingProperty<TLength>[], - lineBreak?: LineBreakProperty | LineBreakProperty[], - lineHeight?: LineHeightProperty<TLength> | LineHeightProperty<TLength>[], - lineHeightStep?: LineHeightStepProperty<TLength> | LineHeightStepProperty<TLength>[], - listStyleImage?: ListStyleImageProperty | ListStyleImageProperty[], - listStylePosition?: ListStylePositionProperty | ListStylePositionProperty[], - listStyleType?: ListStyleTypeProperty | ListStyleTypeProperty[], - marginBlock?: MarginBlockProperty<TLength> | MarginBlockProperty<TLength>[], - marginBlockEnd?: MarginBlockEndProperty<TLength> | MarginBlockEndProperty<TLength>[], - marginBlockStart?: MarginBlockStartProperty<TLength> | MarginBlockStartProperty<TLength>[], - marginBottom?: MarginBottomProperty<TLength> | MarginBottomProperty<TLength>[], - marginInline?: MarginInlineProperty<TLength> | MarginInlineProperty<TLength>[], - marginInlineEnd?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[], - marginInlineStart?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[], - marginLeft?: MarginLeftProperty<TLength> | MarginLeftProperty<TLength>[], - marginRight?: MarginRightProperty<TLength> | MarginRightProperty<TLength>[], - marginTop?: MarginTopProperty<TLength> | MarginTopProperty<TLength>[], - maskBorderMode?: MaskBorderModeProperty | MaskBorderModeProperty[], - maskBorderOutset?: MaskBorderOutsetProperty<TLength> | MaskBorderOutsetProperty<TLength>[], - maskBorderRepeat?: MaskBorderRepeatProperty | MaskBorderRepeatProperty[], - maskBorderSlice?: MaskBorderSliceProperty | MaskBorderSliceProperty[], - maskBorderSource?: MaskBorderSourceProperty | MaskBorderSourceProperty[], - maskBorderWidth?: MaskBorderWidthProperty<TLength> | MaskBorderWidthProperty<TLength>[], - maskClip?: MaskClipProperty | MaskClipProperty[], - maskComposite?: MaskCompositeProperty | MaskCompositeProperty[], - maskImage?: MaskImageProperty | MaskImageProperty[], - maskMode?: MaskModeProperty | MaskModeProperty[], - maskOrigin?: MaskOriginProperty | MaskOriginProperty[], - maskPosition?: MaskPositionProperty<TLength> | MaskPositionProperty<TLength>[], - maskRepeat?: MaskRepeatProperty | MaskRepeatProperty[], - maskSize?: MaskSizeProperty<TLength> | MaskSizeProperty<TLength>[], - maskType?: MaskTypeProperty | MaskTypeProperty[], - mathDepth?: MathDepthProperty | MathDepthProperty[], - mathShift?: MathShiftProperty | MathShiftProperty[], - mathStyle?: MathStyleProperty | MathStyleProperty[], - maxBlockSize?: MaxBlockSizeProperty<TLength> | MaxBlockSizeProperty<TLength>[], - maxHeight?: MaxHeightProperty<TLength> | MaxHeightProperty<TLength>[], - maxInlineSize?: MaxInlineSizeProperty<TLength> | MaxInlineSizeProperty<TLength>[], - maxLines?: MaxLinesProperty | MaxLinesProperty[], - maxWidth?: MaxWidthProperty<TLength> | MaxWidthProperty<TLength>[], - minBlockSize?: MinBlockSizeProperty<TLength> | MinBlockSizeProperty<TLength>[], - minHeight?: MinHeightProperty<TLength> | MinHeightProperty<TLength>[], - minInlineSize?: MinInlineSizeProperty<TLength> | MinInlineSizeProperty<TLength>[], - minWidth?: MinWidthProperty<TLength> | MinWidthProperty<TLength>[], - mixBlendMode?: MixBlendModeProperty | MixBlendModeProperty[], - motionDistance?: OffsetDistanceProperty<TLength> | OffsetDistanceProperty<TLength>[], - motionPath?: OffsetPathProperty | OffsetPathProperty[], - motionRotation?: OffsetRotateProperty | OffsetRotateProperty[], - objectFit?: ObjectFitProperty | ObjectFitProperty[], - objectPosition?: ObjectPositionProperty<TLength> | ObjectPositionProperty<TLength>[], - offsetAnchor?: OffsetAnchorProperty<TLength> | OffsetAnchorProperty<TLength>[], - offsetDistance?: OffsetDistanceProperty<TLength> | OffsetDistanceProperty<TLength>[], - offsetPath?: OffsetPathProperty | OffsetPathProperty[], - offsetRotate?: OffsetRotateProperty | OffsetRotateProperty[], - offsetRotation?: OffsetRotateProperty | OffsetRotateProperty[], - opacity?: OpacityProperty | OpacityProperty[], - order?: GlobalsNumber | GlobalsNumber[], - orphans?: GlobalsNumber | GlobalsNumber[], - outlineColor?: OutlineColorProperty | OutlineColorProperty[], - outlineOffset?: OutlineOffsetProperty<TLength> | OutlineOffsetProperty<TLength>[], - outlineStyle?: OutlineStyleProperty | OutlineStyleProperty[], - outlineWidth?: OutlineWidthProperty<TLength> | OutlineWidthProperty<TLength>[], - overflowAnchor?: OverflowAnchorProperty | OverflowAnchorProperty[], - overflowBlock?: OverflowBlockProperty | OverflowBlockProperty[], - overflowClipBox?: OverflowClipBoxProperty | OverflowClipBoxProperty[], - overflowClipMargin?: OverflowClipMarginProperty<TLength> | OverflowClipMarginProperty<TLength>[], - overflowInline?: OverflowInlineProperty | OverflowInlineProperty[], - overflowWrap?: OverflowWrapProperty | OverflowWrapProperty[], - overflowX?: OverflowXProperty | OverflowXProperty[], - overflowY?: OverflowYProperty | OverflowYProperty[], - overscrollBehaviorBlock?: OverscrollBehaviorBlockProperty | OverscrollBehaviorBlockProperty[], - overscrollBehaviorInline?: OverscrollBehaviorInlineProperty | OverscrollBehaviorInlineProperty[], - overscrollBehaviorX?: OverscrollBehaviorXProperty | OverscrollBehaviorXProperty[], - overscrollBehaviorY?: OverscrollBehaviorYProperty | OverscrollBehaviorYProperty[], - paddingBlock?: PaddingBlockProperty<TLength> | PaddingBlockProperty<TLength>[], - paddingBlockEnd?: PaddingBlockEndProperty<TLength> | PaddingBlockEndProperty<TLength>[], - paddingBlockStart?: PaddingBlockStartProperty<TLength> | PaddingBlockStartProperty<TLength>[], - paddingBottom?: PaddingBottomProperty<TLength> | PaddingBottomProperty<TLength>[], - paddingInline?: PaddingInlineProperty<TLength> | PaddingInlineProperty<TLength>[], - paddingInlineEnd?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[], - paddingInlineStart?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[], - paddingLeft?: PaddingLeftProperty<TLength> | PaddingLeftProperty<TLength>[], - paddingRight?: PaddingRightProperty<TLength> | PaddingRightProperty<TLength>[], - paddingTop?: PaddingTopProperty<TLength> | PaddingTopProperty<TLength>[], - pageBreakAfter?: PageBreakAfterProperty | PageBreakAfterProperty[], - pageBreakBefore?: PageBreakBeforeProperty | PageBreakBeforeProperty[], - pageBreakInside?: PageBreakInsideProperty | PageBreakInsideProperty[], - paintOrder?: PaintOrderProperty | PaintOrderProperty[], - perspective?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[], - perspectiveOrigin?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[], - placeContent?: PlaceContentProperty | PlaceContentProperty[], - pointerEvents?: PointerEventsProperty | PointerEventsProperty[], - position?: PositionProperty | PositionProperty[], - printColorAdjust?: PrintColorAdjustProperty | PrintColorAdjustProperty[], - quotes?: QuotesProperty | QuotesProperty[], - resize?: ResizeProperty | ResizeProperty[], - right?: RightProperty<TLength> | RightProperty<TLength>[], - rotate?: RotateProperty | RotateProperty[], - rowGap?: RowGapProperty<TLength> | RowGapProperty<TLength>[], - rubyAlign?: RubyAlignProperty | RubyAlignProperty[], - rubyMerge?: RubyMergeProperty | RubyMergeProperty[], - rubyPosition?: RubyPositionProperty | RubyPositionProperty[], - scale?: ScaleProperty | ScaleProperty[], - scrollBehavior?: ScrollBehaviorProperty | ScrollBehaviorProperty[], - scrollMargin?: ScrollMarginProperty<TLength> | ScrollMarginProperty<TLength>[], - scrollMarginBlock?: ScrollMarginBlockProperty<TLength> | ScrollMarginBlockProperty<TLength>[], - scrollMarginBlockEnd?: ScrollMarginBlockEndProperty<TLength> | ScrollMarginBlockEndProperty<TLength>[], - scrollMarginBlockStart?: ScrollMarginBlockStartProperty<TLength> | ScrollMarginBlockStartProperty<TLength>[], - scrollMarginBottom?: ScrollMarginBottomProperty<TLength> | ScrollMarginBottomProperty<TLength>[], - scrollMarginInline?: ScrollMarginInlineProperty<TLength> | ScrollMarginInlineProperty<TLength>[], - scrollMarginInlineEnd?: ScrollMarginInlineEndProperty<TLength> | ScrollMarginInlineEndProperty<TLength>[], - scrollMarginInlineStart?: ScrollMarginInlineStartProperty<TLength> | ScrollMarginInlineStartProperty<TLength>[], - scrollMarginLeft?: ScrollMarginLeftProperty<TLength> | ScrollMarginLeftProperty<TLength>[], - scrollMarginRight?: ScrollMarginRightProperty<TLength> | ScrollMarginRightProperty<TLength>[], - scrollMarginTop?: ScrollMarginTopProperty<TLength> | ScrollMarginTopProperty<TLength>[], - scrollPadding?: ScrollPaddingProperty<TLength> | ScrollPaddingProperty<TLength>[], - scrollPaddingBlock?: ScrollPaddingBlockProperty<TLength> | ScrollPaddingBlockProperty<TLength>[], - scrollPaddingBlockEnd?: ScrollPaddingBlockEndProperty<TLength> | ScrollPaddingBlockEndProperty<TLength>[], - scrollPaddingBlockStart?: ScrollPaddingBlockStartProperty<TLength> | ScrollPaddingBlockStartProperty<TLength>[], - scrollPaddingBottom?: ScrollPaddingBottomProperty<TLength> | ScrollPaddingBottomProperty<TLength>[], - scrollPaddingInline?: ScrollPaddingInlineProperty<TLength> | ScrollPaddingInlineProperty<TLength>[], - scrollPaddingInlineEnd?: ScrollPaddingInlineEndProperty<TLength> | ScrollPaddingInlineEndProperty<TLength>[], - scrollPaddingInlineStart?: ScrollPaddingInlineStartProperty<TLength> | ScrollPaddingInlineStartProperty<TLength>[], - scrollPaddingLeft?: ScrollPaddingLeftProperty<TLength> | ScrollPaddingLeftProperty<TLength>[], - scrollPaddingRight?: ScrollPaddingRightProperty<TLength> | ScrollPaddingRightProperty<TLength>[], - scrollPaddingTop?: ScrollPaddingTopProperty<TLength> | ScrollPaddingTopProperty<TLength>[], - scrollSnapAlign?: ScrollSnapAlignProperty | ScrollSnapAlignProperty[], - scrollSnapMargin?: ScrollMarginProperty<TLength> | ScrollMarginProperty<TLength>[], - scrollSnapMarginBottom?: ScrollMarginBottomProperty<TLength> | ScrollMarginBottomProperty<TLength>[], - scrollSnapMarginLeft?: ScrollMarginLeftProperty<TLength> | ScrollMarginLeftProperty<TLength>[], - scrollSnapMarginRight?: ScrollMarginRightProperty<TLength> | ScrollMarginRightProperty<TLength>[], - scrollSnapMarginTop?: ScrollMarginTopProperty<TLength> | ScrollMarginTopProperty<TLength>[], - scrollSnapStop?: ScrollSnapStopProperty | ScrollSnapStopProperty[], - scrollSnapType?: ScrollSnapTypeProperty | ScrollSnapTypeProperty[], - scrollbarColor?: ScrollbarColorProperty | ScrollbarColorProperty[], - scrollbarGutter?: ScrollbarGutterProperty | ScrollbarGutterProperty[], - scrollbarWidth?: ScrollbarWidthProperty | ScrollbarWidthProperty[], - shapeImageThreshold?: ShapeImageThresholdProperty | ShapeImageThresholdProperty[], - shapeMargin?: ShapeMarginProperty<TLength> | ShapeMarginProperty<TLength>[], - shapeOutside?: ShapeOutsideProperty | ShapeOutsideProperty[], - tabSize?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[], - tableLayout?: TableLayoutProperty | TableLayoutProperty[], - textAlign?: TextAlignProperty | TextAlignProperty[], - textAlignLast?: TextAlignLastProperty | TextAlignLastProperty[], - textCombineUpright?: TextCombineUprightProperty | TextCombineUprightProperty[], - textDecorationColor?: TextDecorationColorProperty | TextDecorationColorProperty[], - textDecorationLine?: TextDecorationLineProperty | TextDecorationLineProperty[], - textDecorationSkip?: TextDecorationSkipProperty | TextDecorationSkipProperty[], - textDecorationSkipInk?: TextDecorationSkipInkProperty | TextDecorationSkipInkProperty[], - textDecorationStyle?: TextDecorationStyleProperty | TextDecorationStyleProperty[], - textDecorationThickness?: TextDecorationThicknessProperty<TLength> | TextDecorationThicknessProperty<TLength>[], - textEmphasisColor?: TextEmphasisColorProperty | TextEmphasisColorProperty[], - textEmphasisPosition?: GlobalsString | GlobalsString[], - textEmphasisStyle?: TextEmphasisStyleProperty | TextEmphasisStyleProperty[], - textIndent?: TextIndentProperty<TLength> | TextIndentProperty<TLength>[], - textJustify?: TextJustifyProperty | TextJustifyProperty[], - textOrientation?: TextOrientationProperty | TextOrientationProperty[], - textOverflow?: TextOverflowProperty | TextOverflowProperty[], - textRendering?: TextRenderingProperty | TextRenderingProperty[], - textShadow?: TextShadowProperty | TextShadowProperty[], - textSizeAdjust?: TextSizeAdjustProperty | TextSizeAdjustProperty[], - textTransform?: TextTransformProperty | TextTransformProperty[], - textUnderlineOffset?: TextUnderlineOffsetProperty<TLength> | TextUnderlineOffsetProperty<TLength>[], - textUnderlinePosition?: TextUnderlinePositionProperty | TextUnderlinePositionProperty[], - top?: TopProperty<TLength> | TopProperty<TLength>[], - touchAction?: TouchActionProperty | TouchActionProperty[], - transform?: TransformProperty | TransformProperty[], - transformBox?: TransformBoxProperty | TransformBoxProperty[], - transformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - transformStyle?: TransformStyleProperty | TransformStyleProperty[], - transitionDelay?: GlobalsString | GlobalsString[], - transitionDuration?: GlobalsString | GlobalsString[], - transitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[], - transitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - translate?: TranslateProperty<TLength> | TranslateProperty<TLength>[], - unicodeBidi?: UnicodeBidiProperty | UnicodeBidiProperty[], - userSelect?: UserSelectProperty | UserSelectProperty[], - verticalAlign?: VerticalAlignProperty<TLength> | VerticalAlignProperty<TLength>[], - visibility?: VisibilityProperty | VisibilityProperty[], - whiteSpace?: WhiteSpaceProperty | WhiteSpaceProperty[], - widows?: GlobalsNumber | GlobalsNumber[], - width?: WidthProperty<TLength> | WidthProperty<TLength>[], - willChange?: WillChangeProperty | WillChangeProperty[], - wordBreak?: WordBreakProperty | WordBreakProperty[], - wordSpacing?: WordSpacingProperty<TLength> | WordSpacingProperty<TLength>[], - wordWrap?: WordWrapProperty | WordWrapProperty[], - writingMode?: WritingModeProperty | WritingModeProperty[], - zIndex?: ZIndexProperty | ZIndexProperty[], - zoom?: ZoomProperty | ZoomProperty[], -}; +export type PropertiesHyphen<TLength = string | 0, TTime = string> = {| + ...StandardPropertiesHyphen<TLength, TTime>, + ...VendorPropertiesHyphen<TLength, TTime>, + ...ObsoletePropertiesHyphen<TLength, TTime>, + ...SvgPropertiesHyphen<TLength, TTime>, +|}; -export type StandardShorthandPropertiesFallback<TLength = string | 0> = { - all?: Globals | Globals[], - animation?: AnimationProperty | AnimationProperty[], - background?: BackgroundProperty<TLength> | BackgroundProperty<TLength>[], - backgroundPosition?: BackgroundPositionProperty<TLength> | BackgroundPositionProperty<TLength>[], - border?: BorderProperty<TLength> | BorderProperty<TLength>[], - borderBlock?: BorderBlockProperty<TLength> | BorderBlockProperty<TLength>[], - borderBlockEnd?: BorderBlockEndProperty<TLength> | BorderBlockEndProperty<TLength>[], - borderBlockStart?: BorderBlockStartProperty<TLength> | BorderBlockStartProperty<TLength>[], - borderBottom?: BorderBottomProperty<TLength> | BorderBottomProperty<TLength>[], - borderColor?: BorderColorProperty | BorderColorProperty[], - borderImage?: BorderImageProperty | BorderImageProperty[], - borderInline?: BorderInlineProperty<TLength> | BorderInlineProperty<TLength>[], - borderInlineEnd?: BorderInlineEndProperty<TLength> | BorderInlineEndProperty<TLength>[], - borderInlineStart?: BorderInlineStartProperty<TLength> | BorderInlineStartProperty<TLength>[], - borderLeft?: BorderLeftProperty<TLength> | BorderLeftProperty<TLength>[], - borderRadius?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[], - borderRight?: BorderRightProperty<TLength> | BorderRightProperty<TLength>[], - borderStyle?: BorderStyleProperty | BorderStyleProperty[], - borderTop?: BorderTopProperty<TLength> | BorderTopProperty<TLength>[], - borderWidth?: BorderWidthProperty<TLength> | BorderWidthProperty<TLength>[], - columnRule?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[], - columns?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[], - flex?: FlexProperty<TLength> | FlexProperty<TLength>[], - flexFlow?: FlexFlowProperty | FlexFlowProperty[], - font?: FontProperty | FontProperty[], - gap?: GapProperty<TLength> | GapProperty<TLength>[], - grid?: GridProperty | GridProperty[], - gridArea?: GridAreaProperty | GridAreaProperty[], - gridColumn?: GridColumnProperty | GridColumnProperty[], - gridRow?: GridRowProperty | GridRowProperty[], - gridTemplate?: GridTemplateProperty | GridTemplateProperty[], - lineClamp?: LineClampProperty | LineClampProperty[], - listStyle?: ListStyleProperty | ListStyleProperty[], - margin?: MarginProperty<TLength> | MarginProperty<TLength>[], - mask?: MaskProperty<TLength> | MaskProperty<TLength>[], - maskBorder?: MaskBorderProperty | MaskBorderProperty[], - motion?: OffsetProperty<TLength> | OffsetProperty<TLength>[], - offset?: OffsetProperty<TLength> | OffsetProperty<TLength>[], - outline?: OutlineProperty<TLength> | OutlineProperty<TLength>[], - overflow?: OverflowProperty | OverflowProperty[], - overscrollBehavior?: OverscrollBehaviorProperty | OverscrollBehaviorProperty[], - padding?: PaddingProperty<TLength> | PaddingProperty<TLength>[], - placeItems?: PlaceItemsProperty | PlaceItemsProperty[], - placeSelf?: PlaceSelfProperty | PlaceSelfProperty[], - textDecoration?: TextDecorationProperty<TLength> | TextDecorationProperty<TLength>[], - textEmphasis?: TextEmphasisProperty | TextEmphasisProperty[], - transition?: TransitionProperty | TransitionProperty[], -}; +export type StandardLonghandPropertiesFallback<TLength = string | 0, TTime = string> = {| + accentColor?: Property$AccentColor | Array<Property$AccentColor>, + alignContent?: Property$AlignContent | Array<Property$AlignContent>, + alignItems?: Property$AlignItems | Array<Property$AlignItems>, + alignSelf?: Property$AlignSelf | Array<Property$AlignSelf>, + alignTracks?: Property$AlignTracks | Array<Property$AlignTracks>, + animationComposition?: Property$AnimationComposition | Array<Property$AnimationComposition>, + animationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + animationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, + animationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + animationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + animationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + animationName?: Property$AnimationName | Array<Property$AnimationName>, + animationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + animationRangeEnd?: Property$AnimationRangeEnd<TLength> | Array<Property$AnimationRangeEnd<TLength>>, + animationRangeStart?: Property$AnimationRangeStart<TLength> | Array<Property$AnimationRangeStart<TLength>>, + animationTimeline?: Property$AnimationTimeline | Array<Property$AnimationTimeline>, + animationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + appearance?: Property$Appearance | Array<Property$Appearance>, + aspectRatio?: Property$AspectRatio | Array<Property$AspectRatio>, + backdropFilter?: Property$BackdropFilter | Array<Property$BackdropFilter>, + backfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + backgroundAttachment?: Property$BackgroundAttachment | Array<Property$BackgroundAttachment>, + backgroundBlendMode?: Property$BackgroundBlendMode | Array<Property$BackgroundBlendMode>, + backgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, + backgroundColor?: Property$BackgroundColor | Array<Property$BackgroundColor>, + backgroundImage?: Property$BackgroundImage | Array<Property$BackgroundImage>, + backgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + backgroundPositionX?: Property$BackgroundPositionX<TLength> | Array<Property$BackgroundPositionX<TLength>>, + backgroundPositionY?: Property$BackgroundPositionY<TLength> | Array<Property$BackgroundPositionY<TLength>>, + backgroundRepeat?: Property$BackgroundRepeat | Array<Property$BackgroundRepeat>, + backgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + blockOverflow?: Property$BlockOverflow | Array<Property$BlockOverflow>, + blockSize?: Property$BlockSize<TLength> | Array<Property$BlockSize<TLength>>, + borderBlockColor?: Property$BorderBlockColor | Array<Property$BorderBlockColor>, + borderBlockEndColor?: Property$BorderBlockEndColor | Array<Property$BorderBlockEndColor>, + borderBlockEndStyle?: Property$BorderBlockEndStyle | Array<Property$BorderBlockEndStyle>, + borderBlockEndWidth?: Property$BorderBlockEndWidth<TLength> | Array<Property$BorderBlockEndWidth<TLength>>, + borderBlockStartColor?: Property$BorderBlockStartColor | Array<Property$BorderBlockStartColor>, + borderBlockStartStyle?: Property$BorderBlockStartStyle | Array<Property$BorderBlockStartStyle>, + borderBlockStartWidth?: Property$BorderBlockStartWidth<TLength> | Array<Property$BorderBlockStartWidth<TLength>>, + borderBlockStyle?: Property$BorderBlockStyle | Array<Property$BorderBlockStyle>, + borderBlockWidth?: Property$BorderBlockWidth<TLength> | Array<Property$BorderBlockWidth<TLength>>, + borderBottomColor?: Property$BorderBottomColor | Array<Property$BorderBottomColor>, + borderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + borderBottomRightRadius?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + borderBottomStyle?: Property$BorderBottomStyle | Array<Property$BorderBottomStyle>, + borderBottomWidth?: Property$BorderBottomWidth<TLength> | Array<Property$BorderBottomWidth<TLength>>, + borderCollapse?: Property$BorderCollapse | Array<Property$BorderCollapse>, + borderEndEndRadius?: Property$BorderEndEndRadius<TLength> | Array<Property$BorderEndEndRadius<TLength>>, + borderEndStartRadius?: Property$BorderEndStartRadius<TLength> | Array<Property$BorderEndStartRadius<TLength>>, + borderImageOutset?: Property$BorderImageOutset<TLength> | Array<Property$BorderImageOutset<TLength>>, + borderImageRepeat?: Property$BorderImageRepeat | Array<Property$BorderImageRepeat>, + borderImageSlice?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, + borderImageSource?: Property$BorderImageSource | Array<Property$BorderImageSource>, + borderImageWidth?: Property$BorderImageWidth<TLength> | Array<Property$BorderImageWidth<TLength>>, + borderInlineColor?: Property$BorderInlineColor | Array<Property$BorderInlineColor>, + borderInlineEndColor?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, + borderInlineEndStyle?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, + borderInlineEndWidth?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, + borderInlineStartColor?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, + borderInlineStartStyle?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, + borderInlineStartWidth?: Property$BorderInlineStartWidth<TLength> | Array<Property$BorderInlineStartWidth<TLength>>, + borderInlineStyle?: Property$BorderInlineStyle | Array<Property$BorderInlineStyle>, + borderInlineWidth?: Property$BorderInlineWidth<TLength> | Array<Property$BorderInlineWidth<TLength>>, + borderLeftColor?: Property$BorderLeftColor | Array<Property$BorderLeftColor>, + borderLeftStyle?: Property$BorderLeftStyle | Array<Property$BorderLeftStyle>, + borderLeftWidth?: Property$BorderLeftWidth<TLength> | Array<Property$BorderLeftWidth<TLength>>, + borderRightColor?: Property$BorderRightColor | Array<Property$BorderRightColor>, + borderRightStyle?: Property$BorderRightStyle | Array<Property$BorderRightStyle>, + borderRightWidth?: Property$BorderRightWidth<TLength> | Array<Property$BorderRightWidth<TLength>>, + borderSpacing?: Property$BorderSpacing<TLength> | Array<Property$BorderSpacing<TLength>>, + borderStartEndRadius?: Property$BorderStartEndRadius<TLength> | Array<Property$BorderStartEndRadius<TLength>>, + borderStartStartRadius?: Property$BorderStartStartRadius<TLength> | Array<Property$BorderStartStartRadius<TLength>>, + borderTopColor?: Property$BorderTopColor | Array<Property$BorderTopColor>, + borderTopLeftRadius?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + borderTopRightRadius?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + borderTopStyle?: Property$BorderTopStyle | Array<Property$BorderTopStyle>, + borderTopWidth?: Property$BorderTopWidth<TLength> | Array<Property$BorderTopWidth<TLength>>, + bottom?: Property$Bottom<TLength> | Array<Property$Bottom<TLength>>, + boxDecorationBreak?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + boxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, + boxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, + breakAfter?: Property$BreakAfter | Array<Property$BreakAfter>, + breakBefore?: Property$BreakBefore | Array<Property$BreakBefore>, + breakInside?: Property$BreakInside | Array<Property$BreakInside>, + captionSide?: Property$CaptionSide | Array<Property$CaptionSide>, + caretColor?: Property$CaretColor | Array<Property$CaretColor>, + caretShape?: Property$CaretShape | Array<Property$CaretShape>, + clear?: Property$Clear | Array<Property$Clear>, + clipPath?: Property$ClipPath | Array<Property$ClipPath>, + color?: Property$Color | Array<Property$Color>, + colorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + colorScheme?: Property$ColorScheme | Array<Property$ColorScheme>, + columnCount?: Property$ColumnCount | Array<Property$ColumnCount>, + columnFill?: Property$ColumnFill | Array<Property$ColumnFill>, + columnGap?: Property$ColumnGap<TLength> | Array<Property$ColumnGap<TLength>>, + columnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + columnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + columnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + columnSpan?: Property$ColumnSpan | Array<Property$ColumnSpan>, + columnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + contain?: Property$Contain | Array<Property$Contain>, + containIntrinsicBlockSize?: Property$ContainIntrinsicBlockSize<TLength> | Array<Property$ContainIntrinsicBlockSize<TLength>>, + containIntrinsicHeight?: Property$ContainIntrinsicHeight<TLength> | Array<Property$ContainIntrinsicHeight<TLength>>, + containIntrinsicInlineSize?: Property$ContainIntrinsicInlineSize<TLength> | Array<Property$ContainIntrinsicInlineSize<TLength>>, + containIntrinsicWidth?: Property$ContainIntrinsicWidth<TLength> | Array<Property$ContainIntrinsicWidth<TLength>>, + containerName?: Property$ContainerName | Array<Property$ContainerName>, + containerType?: Property$ContainerType | Array<Property$ContainerType>, + content?: Property$Content | Array<Property$Content>, + contentVisibility?: Property$ContentVisibility | Array<Property$ContentVisibility>, + counterIncrement?: Property$CounterIncrement | Array<Property$CounterIncrement>, + counterReset?: Property$CounterReset | Array<Property$CounterReset>, + counterSet?: Property$CounterSet | Array<Property$CounterSet>, + cursor?: Property$Cursor | Array<Property$Cursor>, + direction?: Property$Direction | Array<Property$Direction>, + display?: Property$Display | Array<Property$Display>, + emptyCells?: Property$EmptyCells | Array<Property$EmptyCells>, + filter?: Property$Filter | Array<Property$Filter>, + flexBasis?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, + flexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, + flexGrow?: Property$FlexGrow | Array<Property$FlexGrow>, + flexShrink?: Property$FlexShrink | Array<Property$FlexShrink>, + flexWrap?: Property$FlexWrap | Array<Property$FlexWrap>, + float?: Property$Float | Array<Property$Float>, + fontFamily?: Property$FontFamily | Array<Property$FontFamily>, + fontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + fontKerning?: Property$FontKerning | Array<Property$FontKerning>, + fontLanguageOverride?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, + fontOpticalSizing?: Property$FontOpticalSizing | Array<Property$FontOpticalSizing>, + fontPalette?: Property$FontPalette | Array<Property$FontPalette>, + fontSize?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, + fontSizeAdjust?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, + fontSmooth?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + fontStretch?: Property$FontStretch | Array<Property$FontStretch>, + fontStyle?: Property$FontStyle | Array<Property$FontStyle>, + fontSynthesis?: Property$FontSynthesis | Array<Property$FontSynthesis>, + fontSynthesisPosition?: Property$FontSynthesisPosition | Array<Property$FontSynthesisPosition>, + fontSynthesisSmallCaps?: Property$FontSynthesisSmallCaps | Array<Property$FontSynthesisSmallCaps>, + fontSynthesisStyle?: Property$FontSynthesisStyle | Array<Property$FontSynthesisStyle>, + fontSynthesisWeight?: Property$FontSynthesisWeight | Array<Property$FontSynthesisWeight>, + fontVariant?: Property$FontVariant | Array<Property$FontVariant>, + fontVariantAlternates?: Property$FontVariantAlternates | Array<Property$FontVariantAlternates>, + fontVariantCaps?: Property$FontVariantCaps | Array<Property$FontVariantCaps>, + fontVariantEastAsian?: Property$FontVariantEastAsian | Array<Property$FontVariantEastAsian>, + fontVariantEmoji?: Property$FontVariantEmoji | Array<Property$FontVariantEmoji>, + fontVariantLigatures?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, + fontVariantNumeric?: Property$FontVariantNumeric | Array<Property$FontVariantNumeric>, + fontVariantPosition?: Property$FontVariantPosition | Array<Property$FontVariantPosition>, + fontVariationSettings?: Property$FontVariationSettings | Array<Property$FontVariationSettings>, + fontWeight?: Property$FontWeight | Array<Property$FontWeight>, + forcedColorAdjust?: Property$ForcedColorAdjust | Array<Property$ForcedColorAdjust>, + gridAutoColumns?: Property$GridAutoColumns<TLength> | Array<Property$GridAutoColumns<TLength>>, + gridAutoFlow?: Property$GridAutoFlow | Array<Property$GridAutoFlow>, + gridAutoRows?: Property$GridAutoRows<TLength> | Array<Property$GridAutoRows<TLength>>, + gridColumnEnd?: Property$GridColumnEnd | Array<Property$GridColumnEnd>, + gridColumnStart?: Property$GridColumnStart | Array<Property$GridColumnStart>, + gridRowEnd?: Property$GridRowEnd | Array<Property$GridRowEnd>, + gridRowStart?: Property$GridRowStart | Array<Property$GridRowStart>, + gridTemplateAreas?: Property$GridTemplateAreas | Array<Property$GridTemplateAreas>, + gridTemplateColumns?: Property$GridTemplateColumns<TLength> | Array<Property$GridTemplateColumns<TLength>>, + gridTemplateRows?: Property$GridTemplateRows<TLength> | Array<Property$GridTemplateRows<TLength>>, + hangingPunctuation?: Property$HangingPunctuation | Array<Property$HangingPunctuation>, + height?: Property$Height<TLength> | Array<Property$Height<TLength>>, + hyphenateCharacter?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, + hyphenateLimitChars?: Property$HyphenateLimitChars | Array<Property$HyphenateLimitChars>, + hyphens?: Property$Hyphens | Array<Property$Hyphens>, + imageOrientation?: Property$ImageOrientation | Array<Property$ImageOrientation>, + imageRendering?: Property$ImageRendering | Array<Property$ImageRendering>, + imageResolution?: Property$ImageResolution | Array<Property$ImageResolution>, + initialLetter?: Property$InitialLetter | Array<Property$InitialLetter>, + inlineSize?: Property$InlineSize<TLength> | Array<Property$InlineSize<TLength>>, + inputSecurity?: Property$InputSecurity | Array<Property$InputSecurity>, + insetBlockEnd?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, + insetBlockStart?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, + insetInlineEnd?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, + insetInlineStart?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, + isolation?: Property$Isolation | Array<Property$Isolation>, + justifyContent?: Property$JustifyContent | Array<Property$JustifyContent>, + justifyItems?: Property$JustifyItems | Array<Property$JustifyItems>, + justifySelf?: Property$JustifySelf | Array<Property$JustifySelf>, + justifyTracks?: Property$JustifyTracks | Array<Property$JustifyTracks>, + left?: Property$Left<TLength> | Array<Property$Left<TLength>>, + letterSpacing?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, + lineBreak?: Property$LineBreak | Array<Property$LineBreak>, + lineHeight?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, + lineHeightStep?: Property$LineHeightStep<TLength> | Array<Property$LineHeightStep<TLength>>, + listStyleImage?: Property$ListStyleImage | Array<Property$ListStyleImage>, + listStylePosition?: Property$ListStylePosition | Array<Property$ListStylePosition>, + listStyleType?: Property$ListStyleType | Array<Property$ListStyleType>, + marginBlockEnd?: Property$MarginBlockEnd<TLength> | Array<Property$MarginBlockEnd<TLength>>, + marginBlockStart?: Property$MarginBlockStart<TLength> | Array<Property$MarginBlockStart<TLength>>, + marginBottom?: Property$MarginBottom<TLength> | Array<Property$MarginBottom<TLength>>, + marginInlineEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + marginInlineStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + marginLeft?: Property$MarginLeft<TLength> | Array<Property$MarginLeft<TLength>>, + marginRight?: Property$MarginRight<TLength> | Array<Property$MarginRight<TLength>>, + marginTop?: Property$MarginTop<TLength> | Array<Property$MarginTop<TLength>>, + marginTrim?: Property$MarginTrim | Array<Property$MarginTrim>, + maskBorderMode?: Property$MaskBorderMode | Array<Property$MaskBorderMode>, + maskBorderOutset?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, + maskBorderRepeat?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, + maskBorderSlice?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, + maskBorderSource?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, + maskBorderWidth?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, + maskClip?: Property$MaskClip | Array<Property$MaskClip>, + maskComposite?: Property$MaskComposite | Array<Property$MaskComposite>, + maskImage?: Property$MaskImage | Array<Property$MaskImage>, + maskMode?: Property$MaskMode | Array<Property$MaskMode>, + maskOrigin?: Property$MaskOrigin | Array<Property$MaskOrigin>, + maskPosition?: Property$MaskPosition<TLength> | Array<Property$MaskPosition<TLength>>, + maskRepeat?: Property$MaskRepeat | Array<Property$MaskRepeat>, + maskSize?: Property$MaskSize<TLength> | Array<Property$MaskSize<TLength>>, + maskType?: Property$MaskType | Array<Property$MaskType>, + masonryAutoFlow?: Property$MasonryAutoFlow | Array<Property$MasonryAutoFlow>, + mathDepth?: Property$MathDepth | Array<Property$MathDepth>, + mathShift?: Property$MathShift | Array<Property$MathShift>, + mathStyle?: Property$MathStyle | Array<Property$MathStyle>, + maxBlockSize?: Property$MaxBlockSize<TLength> | Array<Property$MaxBlockSize<TLength>>, + maxHeight?: Property$MaxHeight<TLength> | Array<Property$MaxHeight<TLength>>, + maxInlineSize?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, + maxLines?: Property$MaxLines | Array<Property$MaxLines>, + maxWidth?: Property$MaxWidth<TLength> | Array<Property$MaxWidth<TLength>>, + minBlockSize?: Property$MinBlockSize<TLength> | Array<Property$MinBlockSize<TLength>>, + minHeight?: Property$MinHeight<TLength> | Array<Property$MinHeight<TLength>>, + minInlineSize?: Property$MinInlineSize<TLength> | Array<Property$MinInlineSize<TLength>>, + minWidth?: Property$MinWidth<TLength> | Array<Property$MinWidth<TLength>>, + mixBlendMode?: Property$MixBlendMode | Array<Property$MixBlendMode>, + motionDistance?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, + motionPath?: Property$OffsetPath | Array<Property$OffsetPath>, + motionRotation?: Property$OffsetRotate | Array<Property$OffsetRotate>, + objectFit?: Property$ObjectFit | Array<Property$ObjectFit>, + objectPosition?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, + offsetAnchor?: Property$OffsetAnchor<TLength> | Array<Property$OffsetAnchor<TLength>>, + offsetDistance?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, + offsetPath?: Property$OffsetPath | Array<Property$OffsetPath>, + offsetPosition?: Property$OffsetPosition<TLength> | Array<Property$OffsetPosition<TLength>>, + offsetRotate?: Property$OffsetRotate | Array<Property$OffsetRotate>, + offsetRotation?: Property$OffsetRotate | Array<Property$OffsetRotate>, + opacity?: Property$Opacity | Array<Property$Opacity>, + order?: Property$Order | Array<Property$Order>, + orphans?: Property$Orphans | Array<Property$Orphans>, + outlineColor?: Property$OutlineColor | Array<Property$OutlineColor>, + outlineOffset?: Property$OutlineOffset<TLength> | Array<Property$OutlineOffset<TLength>>, + outlineStyle?: Property$OutlineStyle | Array<Property$OutlineStyle>, + outlineWidth?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, + overflowAnchor?: Property$OverflowAnchor | Array<Property$OverflowAnchor>, + overflowBlock?: Property$OverflowBlock | Array<Property$OverflowBlock>, + overflowClipBox?: Property$OverflowClipBox | Array<Property$OverflowClipBox>, + overflowClipMargin?: Property$OverflowClipMargin<TLength> | Array<Property$OverflowClipMargin<TLength>>, + overflowInline?: Property$OverflowInline | Array<Property$OverflowInline>, + overflowWrap?: Property$OverflowWrap | Array<Property$OverflowWrap>, + overflowX?: Property$OverflowX | Array<Property$OverflowX>, + overflowY?: Property$OverflowY | Array<Property$OverflowY>, + overlay?: Property$Overlay | Array<Property$Overlay>, + overscrollBehaviorBlock?: Property$OverscrollBehaviorBlock | Array<Property$OverscrollBehaviorBlock>, + overscrollBehaviorInline?: Property$OverscrollBehaviorInline | Array<Property$OverscrollBehaviorInline>, + overscrollBehaviorX?: Property$OverscrollBehaviorX | Array<Property$OverscrollBehaviorX>, + overscrollBehaviorY?: Property$OverscrollBehaviorY | Array<Property$OverscrollBehaviorY>, + paddingBlockEnd?: Property$PaddingBlockEnd<TLength> | Array<Property$PaddingBlockEnd<TLength>>, + paddingBlockStart?: Property$PaddingBlockStart<TLength> | Array<Property$PaddingBlockStart<TLength>>, + paddingBottom?: Property$PaddingBottom<TLength> | Array<Property$PaddingBottom<TLength>>, + paddingInlineEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + paddingInlineStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + paddingLeft?: Property$PaddingLeft<TLength> | Array<Property$PaddingLeft<TLength>>, + paddingRight?: Property$PaddingRight<TLength> | Array<Property$PaddingRight<TLength>>, + paddingTop?: Property$PaddingTop<TLength> | Array<Property$PaddingTop<TLength>>, + page?: Property$Page | Array<Property$Page>, + pageBreakAfter?: Property$PageBreakAfter | Array<Property$PageBreakAfter>, + pageBreakBefore?: Property$PageBreakBefore | Array<Property$PageBreakBefore>, + pageBreakInside?: Property$PageBreakInside | Array<Property$PageBreakInside>, + paintOrder?: Property$PaintOrder | Array<Property$PaintOrder>, + perspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + perspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + pointerEvents?: Property$PointerEvents | Array<Property$PointerEvents>, + position?: Property$Position | Array<Property$Position>, + printColorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + quotes?: Property$Quotes | Array<Property$Quotes>, + resize?: Property$Resize | Array<Property$Resize>, + right?: Property$Right<TLength> | Array<Property$Right<TLength>>, + rotate?: Property$Rotate | Array<Property$Rotate>, + rowGap?: Property$RowGap<TLength> | Array<Property$RowGap<TLength>>, + rubyAlign?: Property$RubyAlign | Array<Property$RubyAlign>, + rubyMerge?: Property$RubyMerge | Array<Property$RubyMerge>, + rubyPosition?: Property$RubyPosition | Array<Property$RubyPosition>, + scale?: Property$Scale | Array<Property$Scale>, + scrollBehavior?: Property$ScrollBehavior | Array<Property$ScrollBehavior>, + scrollMarginBlockEnd?: Property$ScrollMarginBlockEnd<TLength> | Array<Property$ScrollMarginBlockEnd<TLength>>, + scrollMarginBlockStart?: Property$ScrollMarginBlockStart<TLength> | Array<Property$ScrollMarginBlockStart<TLength>>, + scrollMarginBottom?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, + scrollMarginInlineEnd?: Property$ScrollMarginInlineEnd<TLength> | Array<Property$ScrollMarginInlineEnd<TLength>>, + scrollMarginInlineStart?: Property$ScrollMarginInlineStart<TLength> | Array<Property$ScrollMarginInlineStart<TLength>>, + scrollMarginLeft?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, + scrollMarginRight?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, + scrollMarginTop?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, + scrollPaddingBlockEnd?: Property$ScrollPaddingBlockEnd<TLength> | Array<Property$ScrollPaddingBlockEnd<TLength>>, + scrollPaddingBlockStart?: Property$ScrollPaddingBlockStart<TLength> | Array<Property$ScrollPaddingBlockStart<TLength>>, + scrollPaddingBottom?: Property$ScrollPaddingBottom<TLength> | Array<Property$ScrollPaddingBottom<TLength>>, + scrollPaddingInlineEnd?: Property$ScrollPaddingInlineEnd<TLength> | Array<Property$ScrollPaddingInlineEnd<TLength>>, + scrollPaddingInlineStart?: Property$ScrollPaddingInlineStart<TLength> | Array<Property$ScrollPaddingInlineStart<TLength>>, + scrollPaddingLeft?: Property$ScrollPaddingLeft<TLength> | Array<Property$ScrollPaddingLeft<TLength>>, + scrollPaddingRight?: Property$ScrollPaddingRight<TLength> | Array<Property$ScrollPaddingRight<TLength>>, + scrollPaddingTop?: Property$ScrollPaddingTop<TLength> | Array<Property$ScrollPaddingTop<TLength>>, + scrollSnapAlign?: Property$ScrollSnapAlign | Array<Property$ScrollSnapAlign>, + scrollSnapMarginBottom?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, + scrollSnapMarginLeft?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, + scrollSnapMarginRight?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, + scrollSnapMarginTop?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, + scrollSnapStop?: Property$ScrollSnapStop | Array<Property$ScrollSnapStop>, + scrollSnapType?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, + scrollTimelineAxis?: Property$ScrollTimelineAxis | Array<Property$ScrollTimelineAxis>, + scrollTimelineName?: Property$ScrollTimelineName | Array<Property$ScrollTimelineName>, + scrollbarColor?: Property$ScrollbarColor | Array<Property$ScrollbarColor>, + scrollbarGutter?: Property$ScrollbarGutter | Array<Property$ScrollbarGutter>, + scrollbarWidth?: Property$ScrollbarWidth | Array<Property$ScrollbarWidth>, + shapeImageThreshold?: Property$ShapeImageThreshold | Array<Property$ShapeImageThreshold>, + shapeMargin?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, + shapeOutside?: Property$ShapeOutside | Array<Property$ShapeOutside>, + tabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + tableLayout?: Property$TableLayout | Array<Property$TableLayout>, + textAlign?: Property$TextAlign | Array<Property$TextAlign>, + textAlignLast?: Property$TextAlignLast | Array<Property$TextAlignLast>, + textCombineUpright?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + textDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + textDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + textDecorationSkip?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, + textDecorationSkipInk?: Property$TextDecorationSkipInk | Array<Property$TextDecorationSkipInk>, + textDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + textDecorationThickness?: Property$TextDecorationThickness<TLength> | Array<Property$TextDecorationThickness<TLength>>, + textEmphasisColor?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, + textEmphasisPosition?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, + textEmphasisStyle?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, + textIndent?: Property$TextIndent<TLength> | Array<Property$TextIndent<TLength>>, + textJustify?: Property$TextJustify | Array<Property$TextJustify>, + textOrientation?: Property$TextOrientation | Array<Property$TextOrientation>, + textOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, + textRendering?: Property$TextRendering | Array<Property$TextRendering>, + textShadow?: Property$TextShadow | Array<Property$TextShadow>, + textSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + textTransform?: Property$TextTransform | Array<Property$TextTransform>, + textUnderlineOffset?: Property$TextUnderlineOffset<TLength> | Array<Property$TextUnderlineOffset<TLength>>, + textUnderlinePosition?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, + textWrap?: Property$TextWrap | Array<Property$TextWrap>, + timelineScope?: Property$TimelineScope | Array<Property$TimelineScope>, + top?: Property$Top<TLength> | Array<Property$Top<TLength>>, + touchAction?: Property$TouchAction | Array<Property$TouchAction>, + transform?: Property$Transform | Array<Property$Transform>, + transformBox?: Property$TransformBox | Array<Property$TransformBox>, + transformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + transformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, + transitionBehavior?: Property$TransitionBehavior | Array<Property$TransitionBehavior>, + transitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + transitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + transitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + transitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + translate?: Property$Translate<TLength> | Array<Property$Translate<TLength>>, + unicodeBidi?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, + userSelect?: Property$UserSelect | Array<Property$UserSelect>, + verticalAlign?: Property$VerticalAlign<TLength> | Array<Property$VerticalAlign<TLength>>, + viewTimelineAxis?: Property$ViewTimelineAxis | Array<Property$ViewTimelineAxis>, + viewTimelineInset?: Property$ViewTimelineInset<TLength> | Array<Property$ViewTimelineInset<TLength>>, + viewTimelineName?: Property$ViewTimelineName | Array<Property$ViewTimelineName>, + viewTransitionName?: Property$ViewTransitionName | Array<Property$ViewTransitionName>, + visibility?: Property$Visibility | Array<Property$Visibility>, + whiteSpace?: Property$WhiteSpace | Array<Property$WhiteSpace>, + whiteSpaceCollapse?: Property$WhiteSpaceCollapse | Array<Property$WhiteSpaceCollapse>, + whiteSpaceTrim?: Property$WhiteSpaceTrim | Array<Property$WhiteSpaceTrim>, + widows?: Property$Widows | Array<Property$Widows>, + width?: Property$Width<TLength> | Array<Property$Width<TLength>>, + willChange?: Property$WillChange | Array<Property$WillChange>, + wordBreak?: Property$WordBreak | Array<Property$WordBreak>, + wordSpacing?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, + wordWrap?: Property$WordWrap | Array<Property$WordWrap>, + writingMode?: Property$WritingMode | Array<Property$WritingMode>, + zIndex?: Property$ZIndex | Array<Property$ZIndex>, + zoom?: Property$Zoom | Array<Property$Zoom>, +|}; -export type StandardPropertiesFallback<TLength = string | 0> = StandardLonghandPropertiesFallback<TLength> & StandardShorthandPropertiesFallback<TLength>; +export type StandardShorthandPropertiesFallback<TLength = string | 0, TTime = string> = {| + all?: Property$All | Array<Property$All>, + animation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + animationRange?: Property$AnimationRange<TLength> | Array<Property$AnimationRange<TLength>>, + background?: Property$Background<TLength> | Array<Property$Background<TLength>>, + backgroundPosition?: Property$BackgroundPosition<TLength> | Array<Property$BackgroundPosition<TLength>>, + border?: Property$Border<TLength> | Array<Property$Border<TLength>>, + borderBlock?: Property$BorderBlock<TLength> | Array<Property$BorderBlock<TLength>>, + borderBlockEnd?: Property$BorderBlockEnd<TLength> | Array<Property$BorderBlockEnd<TLength>>, + borderBlockStart?: Property$BorderBlockStart<TLength> | Array<Property$BorderBlockStart<TLength>>, + borderBottom?: Property$BorderBottom<TLength> | Array<Property$BorderBottom<TLength>>, + borderColor?: Property$BorderColor | Array<Property$BorderColor>, + borderImage?: Property$BorderImage | Array<Property$BorderImage>, + borderInline?: Property$BorderInline<TLength> | Array<Property$BorderInline<TLength>>, + borderInlineEnd?: Property$BorderInlineEnd<TLength> | Array<Property$BorderInlineEnd<TLength>>, + borderInlineStart?: Property$BorderInlineStart<TLength> | Array<Property$BorderInlineStart<TLength>>, + borderLeft?: Property$BorderLeft<TLength> | Array<Property$BorderLeft<TLength>>, + borderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + borderRight?: Property$BorderRight<TLength> | Array<Property$BorderRight<TLength>>, + borderStyle?: Property$BorderStyle | Array<Property$BorderStyle>, + borderTop?: Property$BorderTop<TLength> | Array<Property$BorderTop<TLength>>, + borderWidth?: Property$BorderWidth<TLength> | Array<Property$BorderWidth<TLength>>, + caret?: Property$Caret | Array<Property$Caret>, + columnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + columns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + containIntrinsicSize?: Property$ContainIntrinsicSize<TLength> | Array<Property$ContainIntrinsicSize<TLength>>, + container?: Property$Container | Array<Property$Container>, + flex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + flexFlow?: Property$FlexFlow | Array<Property$FlexFlow>, + font?: Property$Font | Array<Property$Font>, + gap?: Property$Gap<TLength> | Array<Property$Gap<TLength>>, + grid?: Property$Grid | Array<Property$Grid>, + gridArea?: Property$GridArea | Array<Property$GridArea>, + gridColumn?: Property$GridColumn | Array<Property$GridColumn>, + gridRow?: Property$GridRow | Array<Property$GridRow>, + gridTemplate?: Property$GridTemplate | Array<Property$GridTemplate>, + inset?: Property$Inset<TLength> | Array<Property$Inset<TLength>>, + insetBlock?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, + insetInline?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, + lineClamp?: Property$LineClamp | Array<Property$LineClamp>, + listStyle?: Property$ListStyle | Array<Property$ListStyle>, + margin?: Property$Margin<TLength> | Array<Property$Margin<TLength>>, + marginBlock?: Property$MarginBlock<TLength> | Array<Property$MarginBlock<TLength>>, + marginInline?: Property$MarginInline<TLength> | Array<Property$MarginInline<TLength>>, + mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, + maskBorder?: Property$MaskBorder | Array<Property$MaskBorder>, + motion?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, + offset?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, + outline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, + overflow?: Property$Overflow | Array<Property$Overflow>, + overscrollBehavior?: Property$OverscrollBehavior | Array<Property$OverscrollBehavior>, + padding?: Property$Padding<TLength> | Array<Property$Padding<TLength>>, + paddingBlock?: Property$PaddingBlock<TLength> | Array<Property$PaddingBlock<TLength>>, + paddingInline?: Property$PaddingInline<TLength> | Array<Property$PaddingInline<TLength>>, + placeContent?: Property$PlaceContent | Array<Property$PlaceContent>, + placeItems?: Property$PlaceItems | Array<Property$PlaceItems>, + placeSelf?: Property$PlaceSelf | Array<Property$PlaceSelf>, + scrollMargin?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, + scrollMarginBlock?: Property$ScrollMarginBlock<TLength> | Array<Property$ScrollMarginBlock<TLength>>, + scrollMarginInline?: Property$ScrollMarginInline<TLength> | Array<Property$ScrollMarginInline<TLength>>, + scrollPadding?: Property$ScrollPadding<TLength> | Array<Property$ScrollPadding<TLength>>, + scrollPaddingBlock?: Property$ScrollPaddingBlock<TLength> | Array<Property$ScrollPaddingBlock<TLength>>, + scrollPaddingInline?: Property$ScrollPaddingInline<TLength> | Array<Property$ScrollPaddingInline<TLength>>, + scrollSnapMargin?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, + scrollTimeline?: Property$ScrollTimeline | Array<Property$ScrollTimeline>, + textDecoration?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, + textEmphasis?: Property$TextEmphasis | Array<Property$TextEmphasis>, + transition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + viewTimeline?: Property$ViewTimeline | Array<Property$ViewTimeline>, +|}; -export type VendorLonghandPropertiesFallback<TLength = string | 0> = { - MozAnimationDelay?: GlobalsString | GlobalsString[], - MozAnimationDirection?: AnimationDirectionProperty | AnimationDirectionProperty[], - MozAnimationDuration?: GlobalsString | GlobalsString[], - MozAnimationFillMode?: AnimationFillModeProperty | AnimationFillModeProperty[], - MozAnimationIterationCount?: AnimationIterationCountProperty | AnimationIterationCountProperty[], - MozAnimationName?: AnimationNameProperty | AnimationNameProperty[], - MozAnimationPlayState?: AnimationPlayStateProperty | AnimationPlayStateProperty[], - MozAnimationTimingFunction?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[], - MozAppearance?: MozAppearanceProperty | MozAppearanceProperty[], - MozBackfaceVisibility?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[], - MozBorderBottomColors?: MozBorderBottomColorsProperty | MozBorderBottomColorsProperty[], - MozBorderEndColor?: BorderInlineEndColorProperty | BorderInlineEndColorProperty[], - MozBorderEndStyle?: BorderInlineEndStyleProperty | BorderInlineEndStyleProperty[], - MozBorderEndWidth?: BorderInlineEndWidthProperty<TLength> | BorderInlineEndWidthProperty<TLength>[], - MozBorderLeftColors?: MozBorderLeftColorsProperty | MozBorderLeftColorsProperty[], - MozBorderRightColors?: MozBorderRightColorsProperty | MozBorderRightColorsProperty[], - MozBorderStartColor?: BorderInlineStartColorProperty | BorderInlineStartColorProperty[], - MozBorderStartStyle?: BorderInlineStartStyleProperty | BorderInlineStartStyleProperty[], - MozBorderTopColors?: MozBorderTopColorsProperty | MozBorderTopColorsProperty[], - MozBoxSizing?: BoxSizingProperty | BoxSizingProperty[], - MozColumnCount?: ColumnCountProperty | ColumnCountProperty[], - MozColumnFill?: ColumnFillProperty | ColumnFillProperty[], - MozColumnRuleColor?: ColumnRuleColorProperty | ColumnRuleColorProperty[], - MozColumnRuleStyle?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[], - MozColumnRuleWidth?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[], - MozColumnWidth?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[], - MozContextProperties?: MozContextPropertiesProperty | MozContextPropertiesProperty[], - MozFontFeatureSettings?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[], - MozFontLanguageOverride?: FontLanguageOverrideProperty | FontLanguageOverrideProperty[], - MozHyphens?: HyphensProperty | HyphensProperty[], - MozImageRegion?: MozImageRegionProperty | MozImageRegionProperty[], - MozMarginEnd?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[], - MozMarginStart?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[], - MozOrient?: MozOrientProperty | MozOrientProperty[], - MozOsxFontSmoothing?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[], - MozPaddingEnd?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[], - MozPaddingStart?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[], - MozPerspective?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[], - MozPerspectiveOrigin?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[], - MozStackSizing?: MozStackSizingProperty | MozStackSizingProperty[], - MozTabSize?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[], - MozTextBlink?: MozTextBlinkProperty | MozTextBlinkProperty[], - MozTextSizeAdjust?: TextSizeAdjustProperty | TextSizeAdjustProperty[], - MozTransformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - MozTransformStyle?: TransformStyleProperty | TransformStyleProperty[], - MozTransitionDelay?: GlobalsString | GlobalsString[], - MozTransitionDuration?: GlobalsString | GlobalsString[], - MozTransitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[], - MozTransitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - MozUserFocus?: MozUserFocusProperty | MozUserFocusProperty[], - MozUserModify?: MozUserModifyProperty | MozUserModifyProperty[], - MozUserSelect?: UserSelectProperty | UserSelectProperty[], - MozWindowDragging?: MozWindowDraggingProperty | MozWindowDraggingProperty[], - MozWindowShadow?: MozWindowShadowProperty | MozWindowShadowProperty[], - msAccelerator?: MsAcceleratorProperty | MsAcceleratorProperty[], - msBlockProgression?: MsBlockProgressionProperty | MsBlockProgressionProperty[], - msContentZoomChaining?: MsContentZoomChainingProperty | MsContentZoomChainingProperty[], - msContentZoomLimitMax?: GlobalsString | GlobalsString[], - msContentZoomLimitMin?: GlobalsString | GlobalsString[], - msContentZoomSnapPoints?: GlobalsString | GlobalsString[], - msContentZoomSnapType?: MsContentZoomSnapTypeProperty | MsContentZoomSnapTypeProperty[], - msContentZooming?: MsContentZoomingProperty | MsContentZoomingProperty[], - msFilter?: GlobalsString | GlobalsString[], - msFlexDirection?: FlexDirectionProperty | FlexDirectionProperty[], - msFlexPositive?: GlobalsNumber | GlobalsNumber[], - msFlowFrom?: MsFlowFromProperty | MsFlowFromProperty[], - msFlowInto?: MsFlowIntoProperty | MsFlowIntoProperty[], - msGridColumns?: MsGridColumnsProperty<TLength> | MsGridColumnsProperty<TLength>[], - msGridRows?: MsGridRowsProperty<TLength> | MsGridRowsProperty<TLength>[], - msHighContrastAdjust?: MsHighContrastAdjustProperty | MsHighContrastAdjustProperty[], - msHyphenateLimitChars?: MsHyphenateLimitCharsProperty | MsHyphenateLimitCharsProperty[], - msHyphenateLimitLines?: MsHyphenateLimitLinesProperty | MsHyphenateLimitLinesProperty[], - msHyphenateLimitZone?: MsHyphenateLimitZoneProperty<TLength> | MsHyphenateLimitZoneProperty<TLength>[], - msHyphens?: HyphensProperty | HyphensProperty[], - msImeAlign?: MsImeAlignProperty | MsImeAlignProperty[], - msLineBreak?: LineBreakProperty | LineBreakProperty[], - msOrder?: GlobalsNumber | GlobalsNumber[], - msOverflowStyle?: MsOverflowStyleProperty | MsOverflowStyleProperty[], - msOverflowX?: OverflowXProperty | OverflowXProperty[], - msOverflowY?: OverflowYProperty | OverflowYProperty[], - msScrollChaining?: MsScrollChainingProperty | MsScrollChainingProperty[], - msScrollLimitXMax?: MsScrollLimitXMaxProperty<TLength> | MsScrollLimitXMaxProperty<TLength>[], - msScrollLimitXMin?: MsScrollLimitXMinProperty<TLength> | MsScrollLimitXMinProperty<TLength>[], - msScrollLimitYMax?: MsScrollLimitYMaxProperty<TLength> | MsScrollLimitYMaxProperty<TLength>[], - msScrollLimitYMin?: MsScrollLimitYMinProperty<TLength> | MsScrollLimitYMinProperty<TLength>[], - msScrollRails?: MsScrollRailsProperty | MsScrollRailsProperty[], - msScrollSnapPointsX?: GlobalsString | GlobalsString[], - msScrollSnapPointsY?: GlobalsString | GlobalsString[], - msScrollSnapType?: MsScrollSnapTypeProperty | MsScrollSnapTypeProperty[], - msScrollTranslation?: MsScrollTranslationProperty | MsScrollTranslationProperty[], - msScrollbar3dlightColor?: MsScrollbar3dlightColorProperty | MsScrollbar3dlightColorProperty[], - msScrollbarArrowColor?: MsScrollbarArrowColorProperty | MsScrollbarArrowColorProperty[], - msScrollbarBaseColor?: MsScrollbarBaseColorProperty | MsScrollbarBaseColorProperty[], - msScrollbarDarkshadowColor?: MsScrollbarDarkshadowColorProperty | MsScrollbarDarkshadowColorProperty[], - msScrollbarFaceColor?: MsScrollbarFaceColorProperty | MsScrollbarFaceColorProperty[], - msScrollbarHighlightColor?: MsScrollbarHighlightColorProperty | MsScrollbarHighlightColorProperty[], - msScrollbarShadowColor?: MsScrollbarShadowColorProperty | MsScrollbarShadowColorProperty[], - msScrollbarTrackColor?: MsScrollbarTrackColorProperty | MsScrollbarTrackColorProperty[], - msTextAutospace?: MsTextAutospaceProperty | MsTextAutospaceProperty[], - msTextCombineHorizontal?: TextCombineUprightProperty | TextCombineUprightProperty[], - msTextOverflow?: TextOverflowProperty | TextOverflowProperty[], - msTouchAction?: TouchActionProperty | TouchActionProperty[], - msTouchSelect?: MsTouchSelectProperty | MsTouchSelectProperty[], - msTransform?: TransformProperty | TransformProperty[], - msTransformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - msTransitionDelay?: GlobalsString | GlobalsString[], - msTransitionDuration?: GlobalsString | GlobalsString[], - msTransitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[], - msTransitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - msUserSelect?: MsUserSelectProperty | MsUserSelectProperty[], - msWordBreak?: WordBreakProperty | WordBreakProperty[], - msWrapFlow?: MsWrapFlowProperty | MsWrapFlowProperty[], - msWrapMargin?: MsWrapMarginProperty<TLength> | MsWrapMarginProperty<TLength>[], - msWrapThrough?: MsWrapThroughProperty | MsWrapThroughProperty[], - msWritingMode?: WritingModeProperty | WritingModeProperty[], - WebkitAlignContent?: AlignContentProperty | AlignContentProperty[], - WebkitAlignItems?: AlignItemsProperty | AlignItemsProperty[], - WebkitAlignSelf?: AlignSelfProperty | AlignSelfProperty[], - WebkitAnimationDelay?: GlobalsString | GlobalsString[], - WebkitAnimationDirection?: AnimationDirectionProperty | AnimationDirectionProperty[], - WebkitAnimationDuration?: GlobalsString | GlobalsString[], - WebkitAnimationFillMode?: AnimationFillModeProperty | AnimationFillModeProperty[], - WebkitAnimationIterationCount?: AnimationIterationCountProperty | AnimationIterationCountProperty[], - WebkitAnimationName?: AnimationNameProperty | AnimationNameProperty[], - WebkitAnimationPlayState?: AnimationPlayStateProperty | AnimationPlayStateProperty[], - WebkitAnimationTimingFunction?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[], - WebkitAppearance?: WebkitAppearanceProperty | WebkitAppearanceProperty[], - WebkitBackdropFilter?: BackdropFilterProperty | BackdropFilterProperty[], - WebkitBackfaceVisibility?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[], - WebkitBackgroundClip?: BackgroundClipProperty | BackgroundClipProperty[], - WebkitBackgroundOrigin?: BackgroundOriginProperty | BackgroundOriginProperty[], - WebkitBackgroundSize?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[], - WebkitBorderBeforeColor?: WebkitBorderBeforeColorProperty | WebkitBorderBeforeColorProperty[], - WebkitBorderBeforeStyle?: WebkitBorderBeforeStyleProperty | WebkitBorderBeforeStyleProperty[], - WebkitBorderBeforeWidth?: WebkitBorderBeforeWidthProperty<TLength> | WebkitBorderBeforeWidthProperty<TLength>[], - WebkitBorderBottomLeftRadius?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[], - WebkitBorderBottomRightRadius?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[], - WebkitBorderImageSlice?: BorderImageSliceProperty | BorderImageSliceProperty[], - WebkitBorderTopLeftRadius?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[], - WebkitBorderTopRightRadius?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[], - WebkitBoxDecorationBreak?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[], - WebkitBoxReflect?: WebkitBoxReflectProperty<TLength> | WebkitBoxReflectProperty<TLength>[], - WebkitBoxShadow?: BoxShadowProperty | BoxShadowProperty[], - WebkitBoxSizing?: BoxSizingProperty | BoxSizingProperty[], - WebkitClipPath?: ClipPathProperty | ClipPathProperty[], - WebkitColumnCount?: ColumnCountProperty | ColumnCountProperty[], - WebkitColumnFill?: ColumnFillProperty | ColumnFillProperty[], - WebkitColumnRuleColor?: ColumnRuleColorProperty | ColumnRuleColorProperty[], - WebkitColumnRuleStyle?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[], - WebkitColumnRuleWidth?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[], - WebkitColumnSpan?: ColumnSpanProperty | ColumnSpanProperty[], - WebkitColumnWidth?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[], - WebkitFilter?: FilterProperty | FilterProperty[], - WebkitFlexBasis?: FlexBasisProperty<TLength> | FlexBasisProperty<TLength>[], - WebkitFlexDirection?: FlexDirectionProperty | FlexDirectionProperty[], - WebkitFlexGrow?: GlobalsNumber | GlobalsNumber[], - WebkitFlexShrink?: GlobalsNumber | GlobalsNumber[], - WebkitFlexWrap?: FlexWrapProperty | FlexWrapProperty[], - WebkitFontFeatureSettings?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[], - WebkitFontKerning?: FontKerningProperty | FontKerningProperty[], - WebkitFontSmoothing?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[], - WebkitFontVariantLigatures?: FontVariantLigaturesProperty | FontVariantLigaturesProperty[], - WebkitHyphenateCharacter?: HyphenateCharacterProperty | HyphenateCharacterProperty[], - WebkitHyphens?: HyphensProperty | HyphensProperty[], - WebkitInitialLetter?: InitialLetterProperty | InitialLetterProperty[], - WebkitJustifyContent?: JustifyContentProperty | JustifyContentProperty[], - WebkitLineBreak?: LineBreakProperty | LineBreakProperty[], - WebkitLineClamp?: WebkitLineClampProperty | WebkitLineClampProperty[], - WebkitMarginEnd?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[], - WebkitMarginStart?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[], - WebkitMaskAttachment?: WebkitMaskAttachmentProperty | WebkitMaskAttachmentProperty[], - WebkitMaskBoxImageOutset?: MaskBorderOutsetProperty<TLength> | MaskBorderOutsetProperty<TLength>[], - WebkitMaskBoxImageRepeat?: MaskBorderRepeatProperty | MaskBorderRepeatProperty[], - WebkitMaskBoxImageSlice?: MaskBorderSliceProperty | MaskBorderSliceProperty[], - WebkitMaskBoxImageSource?: MaskBorderSourceProperty | MaskBorderSourceProperty[], - WebkitMaskBoxImageWidth?: MaskBorderWidthProperty<TLength> | MaskBorderWidthProperty<TLength>[], - WebkitMaskClip?: WebkitMaskClipProperty | WebkitMaskClipProperty[], - WebkitMaskComposite?: WebkitMaskCompositeProperty | WebkitMaskCompositeProperty[], - WebkitMaskImage?: WebkitMaskImageProperty | WebkitMaskImageProperty[], - WebkitMaskOrigin?: WebkitMaskOriginProperty | WebkitMaskOriginProperty[], - WebkitMaskPosition?: WebkitMaskPositionProperty<TLength> | WebkitMaskPositionProperty<TLength>[], - WebkitMaskPositionX?: WebkitMaskPositionXProperty<TLength> | WebkitMaskPositionXProperty<TLength>[], - WebkitMaskPositionY?: WebkitMaskPositionYProperty<TLength> | WebkitMaskPositionYProperty<TLength>[], - WebkitMaskRepeat?: WebkitMaskRepeatProperty | WebkitMaskRepeatProperty[], - WebkitMaskRepeatX?: WebkitMaskRepeatXProperty | WebkitMaskRepeatXProperty[], - WebkitMaskRepeatY?: WebkitMaskRepeatYProperty | WebkitMaskRepeatYProperty[], - WebkitMaskSize?: WebkitMaskSizeProperty<TLength> | WebkitMaskSizeProperty<TLength>[], - WebkitMaxInlineSize?: MaxInlineSizeProperty<TLength> | MaxInlineSizeProperty<TLength>[], - WebkitOrder?: GlobalsNumber | GlobalsNumber[], - WebkitOverflowScrolling?: WebkitOverflowScrollingProperty | WebkitOverflowScrollingProperty[], - WebkitPaddingEnd?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[], - WebkitPaddingStart?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[], - WebkitPerspective?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[], - WebkitPerspectiveOrigin?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[], - WebkitPrintColorAdjust?: PrintColorAdjustProperty | PrintColorAdjustProperty[], - WebkitRubyPosition?: RubyPositionProperty | RubyPositionProperty[], - WebkitScrollSnapType?: ScrollSnapTypeProperty | ScrollSnapTypeProperty[], - WebkitShapeMargin?: ShapeMarginProperty<TLength> | ShapeMarginProperty<TLength>[], - WebkitTapHighlightColor?: WebkitTapHighlightColorProperty | WebkitTapHighlightColorProperty[], - WebkitTextCombine?: TextCombineUprightProperty | TextCombineUprightProperty[], - WebkitTextDecorationColor?: TextDecorationColorProperty | TextDecorationColorProperty[], - WebkitTextDecorationLine?: TextDecorationLineProperty | TextDecorationLineProperty[], - WebkitTextDecorationSkip?: TextDecorationSkipProperty | TextDecorationSkipProperty[], - WebkitTextDecorationStyle?: TextDecorationStyleProperty | TextDecorationStyleProperty[], - WebkitTextEmphasisColor?: TextEmphasisColorProperty | TextEmphasisColorProperty[], - WebkitTextEmphasisPosition?: GlobalsString | GlobalsString[], - WebkitTextEmphasisStyle?: TextEmphasisStyleProperty | TextEmphasisStyleProperty[], - WebkitTextFillColor?: WebkitTextFillColorProperty | WebkitTextFillColorProperty[], - WebkitTextOrientation?: TextOrientationProperty | TextOrientationProperty[], - WebkitTextSizeAdjust?: TextSizeAdjustProperty | TextSizeAdjustProperty[], - WebkitTextStrokeColor?: WebkitTextStrokeColorProperty | WebkitTextStrokeColorProperty[], - WebkitTextStrokeWidth?: WebkitTextStrokeWidthProperty<TLength> | WebkitTextStrokeWidthProperty<TLength>[], - WebkitTextUnderlinePosition?: TextUnderlinePositionProperty | TextUnderlinePositionProperty[], - WebkitTouchCallout?: WebkitTouchCalloutProperty | WebkitTouchCalloutProperty[], - WebkitTransform?: TransformProperty | TransformProperty[], - WebkitTransformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - WebkitTransformStyle?: TransformStyleProperty | TransformStyleProperty[], - WebkitTransitionDelay?: GlobalsString | GlobalsString[], - WebkitTransitionDuration?: GlobalsString | GlobalsString[], - WebkitTransitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[], - WebkitTransitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - WebkitUserModify?: WebkitUserModifyProperty | WebkitUserModifyProperty[], - WebkitUserSelect?: UserSelectProperty | UserSelectProperty[], - WebkitWritingMode?: WritingModeProperty | WritingModeProperty[], -}; +export type StandardPropertiesFallback<TLength = string | 0, TTime = string> = {| + ...StandardLonghandPropertiesFallback<TLength, TTime>, + ...StandardShorthandPropertiesFallback<TLength, TTime>, +|}; -export type VendorShorthandPropertiesFallback<TLength = string | 0> = { - MozAnimation?: AnimationProperty | AnimationProperty[], - MozBorderImage?: BorderImageProperty | BorderImageProperty[], - MozColumnRule?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[], - MozColumns?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[], - MozTransition?: TransitionProperty | TransitionProperty[], - msContentZoomLimit?: GlobalsString | GlobalsString[], - msContentZoomSnap?: MsContentZoomSnapProperty | MsContentZoomSnapProperty[], - msFlex?: FlexProperty<TLength> | FlexProperty<TLength>[], - msScrollLimit?: GlobalsString | GlobalsString[], - msScrollSnapX?: GlobalsString | GlobalsString[], - msScrollSnapY?: GlobalsString | GlobalsString[], - msTransition?: TransitionProperty | TransitionProperty[], - WebkitAnimation?: AnimationProperty | AnimationProperty[], - WebkitBorderBefore?: WebkitBorderBeforeProperty<TLength> | WebkitBorderBeforeProperty<TLength>[], - WebkitBorderImage?: BorderImageProperty | BorderImageProperty[], - WebkitBorderRadius?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[], - WebkitColumnRule?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[], - WebkitColumns?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[], - WebkitFlex?: FlexProperty<TLength> | FlexProperty<TLength>[], - WebkitFlexFlow?: FlexFlowProperty | FlexFlowProperty[], - WebkitMask?: WebkitMaskProperty<TLength> | WebkitMaskProperty<TLength>[], - WebkitMaskBoxImage?: MaskBorderProperty | MaskBorderProperty[], - WebkitTextEmphasis?: TextEmphasisProperty | TextEmphasisProperty[], - WebkitTextStroke?: WebkitTextStrokeProperty<TLength> | WebkitTextStrokeProperty<TLength>[], - WebkitTransition?: TransitionProperty | TransitionProperty[], -}; +export type VendorLonghandPropertiesFallback<TLength = string | 0, TTime = string> = {| + MozAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + MozAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, + MozAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + MozAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + MozAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + MozAnimationName?: Property$AnimationName | Array<Property$AnimationName>, + MozAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + MozAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + MozAppearance?: Property$MozAppearance | Array<Property$MozAppearance>, + MozBinding?: Property$MozBinding | Array<Property$MozBinding>, + MozBorderBottomColors?: Property$MozBorderBottomColors | Array<Property$MozBorderBottomColors>, + MozBorderEndColor?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, + MozBorderEndStyle?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, + MozBorderEndWidth?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, + MozBorderLeftColors?: Property$MozBorderLeftColors | Array<Property$MozBorderLeftColors>, + MozBorderRightColors?: Property$MozBorderRightColors | Array<Property$MozBorderRightColors>, + MozBorderStartColor?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, + MozBorderStartStyle?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, + MozBorderTopColors?: Property$MozBorderTopColors | Array<Property$MozBorderTopColors>, + MozBoxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, + MozColumnCount?: Property$ColumnCount | Array<Property$ColumnCount>, + MozColumnFill?: Property$ColumnFill | Array<Property$ColumnFill>, + MozColumnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + MozColumnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + MozColumnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + MozColumnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + MozContextProperties?: Property$MozContextProperties | Array<Property$MozContextProperties>, + MozFontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + MozFontLanguageOverride?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, + MozHyphens?: Property$Hyphens | Array<Property$Hyphens>, + MozImageRegion?: Property$MozImageRegion | Array<Property$MozImageRegion>, + MozMarginEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + MozMarginStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + MozOrient?: Property$MozOrient | Array<Property$MozOrient>, + MozOsxFontSmoothing?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + MozOutlineRadiusBottomleft?: Property$MozOutlineRadiusBottomleft<TLength> | Array<Property$MozOutlineRadiusBottomleft<TLength>>, + MozOutlineRadiusBottomright?: Property$MozOutlineRadiusBottomright<TLength> | Array<Property$MozOutlineRadiusBottomright<TLength>>, + MozOutlineRadiusTopleft?: Property$MozOutlineRadiusTopleft<TLength> | Array<Property$MozOutlineRadiusTopleft<TLength>>, + MozOutlineRadiusTopright?: Property$MozOutlineRadiusTopright<TLength> | Array<Property$MozOutlineRadiusTopright<TLength>>, + MozPaddingEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + MozPaddingStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + MozStackSizing?: Property$MozStackSizing | Array<Property$MozStackSizing>, + MozTabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + MozTextBlink?: Property$MozTextBlink | Array<Property$MozTextBlink>, + MozTextSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + MozUserFocus?: Property$MozUserFocus | Array<Property$MozUserFocus>, + MozUserModify?: Property$MozUserModify | Array<Property$MozUserModify>, + MozUserSelect?: Property$UserSelect | Array<Property$UserSelect>, + MozWindowDragging?: Property$MozWindowDragging | Array<Property$MozWindowDragging>, + MozWindowShadow?: Property$MozWindowShadow | Array<Property$MozWindowShadow>, + msAccelerator?: Property$MsAccelerator | Array<Property$MsAccelerator>, + msBlockProgression?: Property$MsBlockProgression | Array<Property$MsBlockProgression>, + msContentZoomChaining?: Property$MsContentZoomChaining | Array<Property$MsContentZoomChaining>, + msContentZoomLimitMax?: Property$MsContentZoomLimitMax | Array<Property$MsContentZoomLimitMax>, + msContentZoomLimitMin?: Property$MsContentZoomLimitMin | Array<Property$MsContentZoomLimitMin>, + msContentZoomSnapPoints?: Property$MsContentZoomSnapPoints | Array<Property$MsContentZoomSnapPoints>, + msContentZoomSnapType?: Property$MsContentZoomSnapType | Array<Property$MsContentZoomSnapType>, + msContentZooming?: Property$MsContentZooming | Array<Property$MsContentZooming>, + msFilter?: Property$MsFilter | Array<Property$MsFilter>, + msFlexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, + msFlexPositive?: Property$FlexGrow | Array<Property$FlexGrow>, + msFlowFrom?: Property$MsFlowFrom | Array<Property$MsFlowFrom>, + msFlowInto?: Property$MsFlowInto | Array<Property$MsFlowInto>, + msGridColumns?: Property$MsGridColumns<TLength> | Array<Property$MsGridColumns<TLength>>, + msGridRows?: Property$MsGridRows<TLength> | Array<Property$MsGridRows<TLength>>, + msHighContrastAdjust?: Property$MsHighContrastAdjust | Array<Property$MsHighContrastAdjust>, + msHyphenateLimitChars?: Property$MsHyphenateLimitChars | Array<Property$MsHyphenateLimitChars>, + msHyphenateLimitLines?: Property$MsHyphenateLimitLines | Array<Property$MsHyphenateLimitLines>, + msHyphenateLimitZone?: Property$MsHyphenateLimitZone<TLength> | Array<Property$MsHyphenateLimitZone<TLength>>, + msHyphens?: Property$Hyphens | Array<Property$Hyphens>, + msImeAlign?: Property$MsImeAlign | Array<Property$MsImeAlign>, + msLineBreak?: Property$LineBreak | Array<Property$LineBreak>, + msOrder?: Property$Order | Array<Property$Order>, + msOverflowStyle?: Property$MsOverflowStyle | Array<Property$MsOverflowStyle>, + msOverflowX?: Property$OverflowX | Array<Property$OverflowX>, + msOverflowY?: Property$OverflowY | Array<Property$OverflowY>, + msScrollChaining?: Property$MsScrollChaining | Array<Property$MsScrollChaining>, + msScrollLimitXMax?: Property$MsScrollLimitXMax<TLength> | Array<Property$MsScrollLimitXMax<TLength>>, + msScrollLimitXMin?: Property$MsScrollLimitXMin<TLength> | Array<Property$MsScrollLimitXMin<TLength>>, + msScrollLimitYMax?: Property$MsScrollLimitYMax<TLength> | Array<Property$MsScrollLimitYMax<TLength>>, + msScrollLimitYMin?: Property$MsScrollLimitYMin<TLength> | Array<Property$MsScrollLimitYMin<TLength>>, + msScrollRails?: Property$MsScrollRails | Array<Property$MsScrollRails>, + msScrollSnapPointsX?: Property$MsScrollSnapPointsX | Array<Property$MsScrollSnapPointsX>, + msScrollSnapPointsY?: Property$MsScrollSnapPointsY | Array<Property$MsScrollSnapPointsY>, + msScrollSnapType?: Property$MsScrollSnapType | Array<Property$MsScrollSnapType>, + msScrollTranslation?: Property$MsScrollTranslation | Array<Property$MsScrollTranslation>, + msScrollbar3dlightColor?: Property$MsScrollbar3dlightColor | Array<Property$MsScrollbar3dlightColor>, + msScrollbarArrowColor?: Property$MsScrollbarArrowColor | Array<Property$MsScrollbarArrowColor>, + msScrollbarBaseColor?: Property$MsScrollbarBaseColor | Array<Property$MsScrollbarBaseColor>, + msScrollbarDarkshadowColor?: Property$MsScrollbarDarkshadowColor | Array<Property$MsScrollbarDarkshadowColor>, + msScrollbarFaceColor?: Property$MsScrollbarFaceColor | Array<Property$MsScrollbarFaceColor>, + msScrollbarHighlightColor?: Property$MsScrollbarHighlightColor | Array<Property$MsScrollbarHighlightColor>, + msScrollbarShadowColor?: Property$MsScrollbarShadowColor | Array<Property$MsScrollbarShadowColor>, + msScrollbarTrackColor?: Property$MsScrollbarTrackColor | Array<Property$MsScrollbarTrackColor>, + msTextAutospace?: Property$MsTextAutospace | Array<Property$MsTextAutospace>, + msTextCombineHorizontal?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + msTextOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, + msTouchAction?: Property$TouchAction | Array<Property$TouchAction>, + msTouchSelect?: Property$MsTouchSelect | Array<Property$MsTouchSelect>, + msTransform?: Property$Transform | Array<Property$Transform>, + msTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + msTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + msTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + msTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + msTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + msUserSelect?: Property$MsUserSelect | Array<Property$MsUserSelect>, + msWordBreak?: Property$WordBreak | Array<Property$WordBreak>, + msWrapFlow?: Property$MsWrapFlow | Array<Property$MsWrapFlow>, + msWrapMargin?: Property$MsWrapMargin<TLength> | Array<Property$MsWrapMargin<TLength>>, + msWrapThrough?: Property$MsWrapThrough | Array<Property$MsWrapThrough>, + msWritingMode?: Property$WritingMode | Array<Property$WritingMode>, + WebkitAlignContent?: Property$AlignContent | Array<Property$AlignContent>, + WebkitAlignItems?: Property$AlignItems | Array<Property$AlignItems>, + WebkitAlignSelf?: Property$AlignSelf | Array<Property$AlignSelf>, + WebkitAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + WebkitAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, + WebkitAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + WebkitAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + WebkitAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + WebkitAnimationName?: Property$AnimationName | Array<Property$AnimationName>, + WebkitAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + WebkitAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + WebkitAppearance?: Property$WebkitAppearance | Array<Property$WebkitAppearance>, + WebkitBackdropFilter?: Property$BackdropFilter | Array<Property$BackdropFilter>, + WebkitBackfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + WebkitBackgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, + WebkitBackgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + WebkitBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + WebkitBorderBeforeColor?: Property$WebkitBorderBeforeColor | Array<Property$WebkitBorderBeforeColor>, + WebkitBorderBeforeStyle?: Property$WebkitBorderBeforeStyle | Array<Property$WebkitBorderBeforeStyle>, + WebkitBorderBeforeWidth?: Property$WebkitBorderBeforeWidth<TLength> | Array<Property$WebkitBorderBeforeWidth<TLength>>, + WebkitBorderBottomLeftRadius?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + WebkitBorderBottomRightRadius?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + WebkitBorderImageSlice?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, + WebkitBorderTopLeftRadius?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + WebkitBorderTopRightRadius?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + WebkitBoxDecorationBreak?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + WebkitBoxReflect?: Property$WebkitBoxReflect<TLength> | Array<Property$WebkitBoxReflect<TLength>>, + WebkitBoxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, + WebkitBoxSizing?: Property$BoxSizing | Array<Property$BoxSizing>, + WebkitClipPath?: Property$ClipPath | Array<Property$ClipPath>, + WebkitColumnCount?: Property$ColumnCount | Array<Property$ColumnCount>, + WebkitColumnFill?: Property$ColumnFill | Array<Property$ColumnFill>, + WebkitColumnRuleColor?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + WebkitColumnRuleStyle?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + WebkitColumnRuleWidth?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + WebkitColumnSpan?: Property$ColumnSpan | Array<Property$ColumnSpan>, + WebkitColumnWidth?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + WebkitFilter?: Property$Filter | Array<Property$Filter>, + WebkitFlexBasis?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, + WebkitFlexDirection?: Property$FlexDirection | Array<Property$FlexDirection>, + WebkitFlexGrow?: Property$FlexGrow | Array<Property$FlexGrow>, + WebkitFlexShrink?: Property$FlexShrink | Array<Property$FlexShrink>, + WebkitFlexWrap?: Property$FlexWrap | Array<Property$FlexWrap>, + WebkitFontFeatureSettings?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + WebkitFontKerning?: Property$FontKerning | Array<Property$FontKerning>, + WebkitFontSmoothing?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + WebkitFontVariantLigatures?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, + WebkitHyphenateCharacter?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, + WebkitHyphens?: Property$Hyphens | Array<Property$Hyphens>, + WebkitInitialLetter?: Property$InitialLetter | Array<Property$InitialLetter>, + WebkitJustifyContent?: Property$JustifyContent | Array<Property$JustifyContent>, + WebkitLineBreak?: Property$LineBreak | Array<Property$LineBreak>, + WebkitLineClamp?: Property$WebkitLineClamp | Array<Property$WebkitLineClamp>, + WebkitMarginEnd?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + WebkitMarginStart?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + WebkitMaskAttachment?: Property$WebkitMaskAttachment | Array<Property$WebkitMaskAttachment>, + WebkitMaskBoxImageOutset?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, + WebkitMaskBoxImageRepeat?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, + WebkitMaskBoxImageSlice?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, + WebkitMaskBoxImageSource?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, + WebkitMaskBoxImageWidth?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, + WebkitMaskClip?: Property$WebkitMaskClip | Array<Property$WebkitMaskClip>, + WebkitMaskComposite?: Property$WebkitMaskComposite | Array<Property$WebkitMaskComposite>, + WebkitMaskImage?: Property$WebkitMaskImage | Array<Property$WebkitMaskImage>, + WebkitMaskOrigin?: Property$WebkitMaskOrigin | Array<Property$WebkitMaskOrigin>, + WebkitMaskPosition?: Property$WebkitMaskPosition<TLength> | Array<Property$WebkitMaskPosition<TLength>>, + WebkitMaskPositionX?: Property$WebkitMaskPositionX<TLength> | Array<Property$WebkitMaskPositionX<TLength>>, + WebkitMaskPositionY?: Property$WebkitMaskPositionY<TLength> | Array<Property$WebkitMaskPositionY<TLength>>, + WebkitMaskRepeat?: Property$WebkitMaskRepeat | Array<Property$WebkitMaskRepeat>, + WebkitMaskRepeatX?: Property$WebkitMaskRepeatX | Array<Property$WebkitMaskRepeatX>, + WebkitMaskRepeatY?: Property$WebkitMaskRepeatY | Array<Property$WebkitMaskRepeatY>, + WebkitMaskSize?: Property$WebkitMaskSize<TLength> | Array<Property$WebkitMaskSize<TLength>>, + WebkitMaxInlineSize?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, + WebkitOrder?: Property$Order | Array<Property$Order>, + WebkitOverflowScrolling?: Property$WebkitOverflowScrolling | Array<Property$WebkitOverflowScrolling>, + WebkitPaddingEnd?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + WebkitPaddingStart?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + WebkitPerspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + WebkitPerspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + WebkitPrintColorAdjust?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + WebkitRubyPosition?: Property$RubyPosition | Array<Property$RubyPosition>, + WebkitScrollSnapType?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, + WebkitShapeMargin?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, + WebkitTapHighlightColor?: Property$WebkitTapHighlightColor | Array<Property$WebkitTapHighlightColor>, + WebkitTextCombine?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + WebkitTextDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + WebkitTextDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + WebkitTextDecorationSkip?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, + WebkitTextDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + WebkitTextEmphasisColor?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, + WebkitTextEmphasisPosition?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, + WebkitTextEmphasisStyle?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, + WebkitTextFillColor?: Property$WebkitTextFillColor | Array<Property$WebkitTextFillColor>, + WebkitTextOrientation?: Property$TextOrientation | Array<Property$TextOrientation>, + WebkitTextSizeAdjust?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + WebkitTextStrokeColor?: Property$WebkitTextStrokeColor | Array<Property$WebkitTextStrokeColor>, + WebkitTextStrokeWidth?: Property$WebkitTextStrokeWidth<TLength> | Array<Property$WebkitTextStrokeWidth<TLength>>, + WebkitTextUnderlinePosition?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, + WebkitTouchCallout?: Property$WebkitTouchCallout | Array<Property$WebkitTouchCallout>, + WebkitTransform?: Property$Transform | Array<Property$Transform>, + WebkitTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + WebkitTransformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, + WebkitTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + WebkitTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + WebkitTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + WebkitTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + WebkitUserModify?: Property$WebkitUserModify | Array<Property$WebkitUserModify>, + WebkitUserSelect?: Property$UserSelect | Array<Property$UserSelect>, + WebkitWritingMode?: Property$WritingMode | Array<Property$WritingMode>, +|}; -export type VendorPropertiesFallback<TLength = string | 0> = VendorLonghandPropertiesFallback<TLength> & VendorShorthandPropertiesFallback<TLength>; +export type VendorShorthandPropertiesFallback<TLength = string | 0, TTime = string> = {| + MozAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + MozBorderImage?: Property$BorderImage | Array<Property$BorderImage>, + MozColumnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + MozColumns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + MozOutlineRadius?: Property$MozOutlineRadius<TLength> | Array<Property$MozOutlineRadius<TLength>>, + msContentZoomLimit?: Property$MsContentZoomLimit | Array<Property$MsContentZoomLimit>, + msContentZoomSnap?: Property$MsContentZoomSnap | Array<Property$MsContentZoomSnap>, + msFlex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + msScrollLimit?: Property$MsScrollLimit | Array<Property$MsScrollLimit>, + msScrollSnapX?: Property$MsScrollSnapX | Array<Property$MsScrollSnapX>, + msScrollSnapY?: Property$MsScrollSnapY | Array<Property$MsScrollSnapY>, + msTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + WebkitAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + WebkitBorderBefore?: Property$WebkitBorderBefore<TLength> | Array<Property$WebkitBorderBefore<TLength>>, + WebkitBorderImage?: Property$BorderImage | Array<Property$BorderImage>, + WebkitBorderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + WebkitColumnRule?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + WebkitColumns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + WebkitFlex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + WebkitFlexFlow?: Property$FlexFlow | Array<Property$FlexFlow>, + WebkitMask?: Property$WebkitMask<TLength> | Array<Property$WebkitMask<TLength>>, + WebkitMaskBoxImage?: Property$MaskBorder | Array<Property$MaskBorder>, + WebkitTextEmphasis?: Property$TextEmphasis | Array<Property$TextEmphasis>, + WebkitTextStroke?: Property$WebkitTextStroke<TLength> | Array<Property$WebkitTextStroke<TLength>>, + WebkitTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, +|}; -export type ObsoletePropertiesFallback<TLength = string | 0> = { - azimuth?: AzimuthProperty | AzimuthProperty[], - boxAlign?: BoxAlignProperty | BoxAlignProperty[], - boxDirection?: BoxDirectionProperty | BoxDirectionProperty[], - boxFlex?: GlobalsNumber | GlobalsNumber[], - boxFlexGroup?: GlobalsNumber | GlobalsNumber[], - boxLines?: BoxLinesProperty | BoxLinesProperty[], - boxOrdinalGroup?: GlobalsNumber | GlobalsNumber[], - boxOrient?: BoxOrientProperty | BoxOrientProperty[], - boxPack?: BoxPackProperty | BoxPackProperty[], - clip?: ClipProperty | ClipProperty[], - gridColumnGap?: GridColumnGapProperty<TLength> | GridColumnGapProperty<TLength>[], - gridGap?: GridGapProperty<TLength> | GridGapProperty<TLength>[], - gridRowGap?: GridRowGapProperty<TLength> | GridRowGapProperty<TLength>[], - imeMode?: ImeModeProperty | ImeModeProperty[], - offsetBlock?: InsetBlockProperty<TLength> | InsetBlockProperty<TLength>[], - offsetBlockEnd?: InsetBlockEndProperty<TLength> | InsetBlockEndProperty<TLength>[], - offsetBlockStart?: InsetBlockStartProperty<TLength> | InsetBlockStartProperty<TLength>[], - offsetInline?: InsetInlineProperty<TLength> | InsetInlineProperty<TLength>[], - offsetInlineEnd?: InsetInlineEndProperty<TLength> | InsetInlineEndProperty<TLength>[], - offsetInlineStart?: InsetInlineStartProperty<TLength> | InsetInlineStartProperty<TLength>[], - scrollSnapCoordinate?: ScrollSnapCoordinateProperty<TLength> | ScrollSnapCoordinateProperty<TLength>[], - scrollSnapDestination?: ScrollSnapDestinationProperty<TLength> | ScrollSnapDestinationProperty<TLength>[], - scrollSnapPointsX?: ScrollSnapPointsXProperty | ScrollSnapPointsXProperty[], - scrollSnapPointsY?: ScrollSnapPointsYProperty | ScrollSnapPointsYProperty[], - scrollSnapTypeX?: ScrollSnapTypeXProperty | ScrollSnapTypeXProperty[], - scrollSnapTypeY?: ScrollSnapTypeYProperty | ScrollSnapTypeYProperty[], - KhtmlBoxAlign?: BoxAlignProperty | BoxAlignProperty[], - KhtmlBoxDirection?: BoxDirectionProperty | BoxDirectionProperty[], - KhtmlBoxFlex?: GlobalsNumber | GlobalsNumber[], - KhtmlBoxFlexGroup?: GlobalsNumber | GlobalsNumber[], - KhtmlBoxLines?: BoxLinesProperty | BoxLinesProperty[], - KhtmlBoxOrdinalGroup?: GlobalsNumber | GlobalsNumber[], - KhtmlBoxOrient?: BoxOrientProperty | BoxOrientProperty[], - KhtmlBoxPack?: BoxPackProperty | BoxPackProperty[], - KhtmlLineBreak?: LineBreakProperty | LineBreakProperty[], - KhtmlOpacity?: OpacityProperty | OpacityProperty[], - KhtmlUserSelect?: UserSelectProperty | UserSelectProperty[], - MozBackgroundClip?: BackgroundClipProperty | BackgroundClipProperty[], - MozBackgroundInlinePolicy?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[], - MozBackgroundOrigin?: BackgroundOriginProperty | BackgroundOriginProperty[], - MozBackgroundSize?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[], - MozBinding?: MozBindingProperty | MozBindingProperty[], - MozBorderRadius?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[], - MozBorderRadiusBottomleft?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[], - MozBorderRadiusBottomright?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[], - MozBorderRadiusTopleft?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[], - MozBorderRadiusTopright?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[], - MozBoxAlign?: BoxAlignProperty | BoxAlignProperty[], - MozBoxDirection?: BoxDirectionProperty | BoxDirectionProperty[], - MozBoxFlex?: GlobalsNumber | GlobalsNumber[], - MozBoxOrdinalGroup?: GlobalsNumber | GlobalsNumber[], - MozBoxOrient?: BoxOrientProperty | BoxOrientProperty[], - MozBoxPack?: BoxPackProperty | BoxPackProperty[], - MozBoxShadow?: BoxShadowProperty | BoxShadowProperty[], - MozFloatEdge?: MozFloatEdgeProperty | MozFloatEdgeProperty[], - MozForceBrokenImageIcon?: MozForceBrokenImageIconProperty | MozForceBrokenImageIconProperty[], - MozOpacity?: OpacityProperty | OpacityProperty[], - MozOutline?: OutlineProperty<TLength> | OutlineProperty<TLength>[], - MozOutlineColor?: OutlineColorProperty | OutlineColorProperty[], - MozOutlineRadius?: MozOutlineRadiusProperty<TLength> | MozOutlineRadiusProperty<TLength>[], - MozOutlineRadiusBottomleft?: MozOutlineRadiusBottomleftProperty<TLength> | MozOutlineRadiusBottomleftProperty<TLength>[], - MozOutlineRadiusBottomright?: MozOutlineRadiusBottomrightProperty<TLength> | MozOutlineRadiusBottomrightProperty<TLength>[], - MozOutlineRadiusTopleft?: MozOutlineRadiusTopleftProperty<TLength> | MozOutlineRadiusTopleftProperty<TLength>[], - MozOutlineRadiusTopright?: MozOutlineRadiusToprightProperty<TLength> | MozOutlineRadiusToprightProperty<TLength>[], - MozOutlineStyle?: OutlineStyleProperty | OutlineStyleProperty[], - MozOutlineWidth?: OutlineWidthProperty<TLength> | OutlineWidthProperty<TLength>[], - MozTextAlignLast?: TextAlignLastProperty | TextAlignLastProperty[], - MozTextDecorationColor?: TextDecorationColorProperty | TextDecorationColorProperty[], - MozTextDecorationLine?: TextDecorationLineProperty | TextDecorationLineProperty[], - MozTextDecorationStyle?: TextDecorationStyleProperty | TextDecorationStyleProperty[], - MozUserInput?: MozUserInputProperty | MozUserInputProperty[], - msImeMode?: ImeModeProperty | ImeModeProperty[], - OAnimation?: AnimationProperty | AnimationProperty[], - OAnimationDelay?: GlobalsString | GlobalsString[], - OAnimationDirection?: AnimationDirectionProperty | AnimationDirectionProperty[], - OAnimationDuration?: GlobalsString | GlobalsString[], - OAnimationFillMode?: AnimationFillModeProperty | AnimationFillModeProperty[], - OAnimationIterationCount?: AnimationIterationCountProperty | AnimationIterationCountProperty[], - OAnimationName?: AnimationNameProperty | AnimationNameProperty[], - OAnimationPlayState?: AnimationPlayStateProperty | AnimationPlayStateProperty[], - OAnimationTimingFunction?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[], - OBackgroundSize?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[], - OBorderImage?: BorderImageProperty | BorderImageProperty[], - OObjectFit?: ObjectFitProperty | ObjectFitProperty[], - OObjectPosition?: ObjectPositionProperty<TLength> | ObjectPositionProperty<TLength>[], - OTabSize?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[], - OTextOverflow?: TextOverflowProperty | TextOverflowProperty[], - OTransform?: TransformProperty | TransformProperty[], - OTransformOrigin?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - OTransition?: TransitionProperty | TransitionProperty[], - OTransitionDelay?: GlobalsString | GlobalsString[], - OTransitionDuration?: GlobalsString | GlobalsString[], - OTransitionProperty?: TransitionPropertyProperty | TransitionPropertyProperty[], - OTransitionTimingFunction?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - WebkitBoxAlign?: BoxAlignProperty | BoxAlignProperty[], - WebkitBoxDirection?: BoxDirectionProperty | BoxDirectionProperty[], - WebkitBoxFlex?: GlobalsNumber | GlobalsNumber[], - WebkitBoxFlexGroup?: GlobalsNumber | GlobalsNumber[], - WebkitBoxLines?: BoxLinesProperty | BoxLinesProperty[], - WebkitBoxOrdinalGroup?: GlobalsNumber | GlobalsNumber[], - WebkitBoxOrient?: BoxOrientProperty | BoxOrientProperty[], - WebkitBoxPack?: BoxPackProperty | BoxPackProperty[], - WebkitScrollSnapPointsX?: ScrollSnapPointsXProperty | ScrollSnapPointsXProperty[], - WebkitScrollSnapPointsY?: ScrollSnapPointsYProperty | ScrollSnapPointsYProperty[], -}; +export type VendorPropertiesFallback<TLength = string | 0, TTime = string> = {| + ...VendorLonghandPropertiesFallback<TLength, TTime>, + ...VendorShorthandPropertiesFallback<TLength, TTime>, +|}; -export type SvgPropertiesFallback<TLength = string | 0> = { - alignmentBaseline?: AlignmentBaselineProperty | AlignmentBaselineProperty[], - baselineShift?: BaselineShiftProperty<TLength> | BaselineShiftProperty<TLength>[], - clip?: ClipProperty | ClipProperty[], - clipPath?: ClipPathProperty | ClipPathProperty[], - clipRule?: ClipRuleProperty | ClipRuleProperty[], - color?: ColorProperty | ColorProperty[], - colorInterpolation?: ColorInterpolationProperty | ColorInterpolationProperty[], - colorRendering?: ColorRenderingProperty | ColorRenderingProperty[], - cursor?: CursorProperty | CursorProperty[], - direction?: DirectionProperty | DirectionProperty[], - display?: DisplayProperty | DisplayProperty[], - dominantBaseline?: DominantBaselineProperty | DominantBaselineProperty[], - fill?: FillProperty | FillProperty[], - fillOpacity?: GlobalsNumber | GlobalsNumber[], - fillRule?: FillRuleProperty | FillRuleProperty[], - filter?: FilterProperty | FilterProperty[], - floodColor?: FloodColorProperty | FloodColorProperty[], - floodOpacity?: GlobalsNumber | GlobalsNumber[], - font?: FontProperty | FontProperty[], - fontFamily?: FontFamilyProperty | FontFamilyProperty[], - fontSize?: FontSizeProperty<TLength> | FontSizeProperty<TLength>[], - fontSizeAdjust?: FontSizeAdjustProperty | FontSizeAdjustProperty[], - fontStretch?: FontStretchProperty | FontStretchProperty[], - fontStyle?: FontStyleProperty | FontStyleProperty[], - fontVariant?: FontVariantProperty | FontVariantProperty[], - fontWeight?: FontWeightProperty | FontWeightProperty[], - glyphOrientationVertical?: GlyphOrientationVerticalProperty | GlyphOrientationVerticalProperty[], - imageRendering?: ImageRenderingProperty | ImageRenderingProperty[], - letterSpacing?: LetterSpacingProperty<TLength> | LetterSpacingProperty<TLength>[], - lightingColor?: LightingColorProperty | LightingColorProperty[], - lineHeight?: LineHeightProperty<TLength> | LineHeightProperty<TLength>[], - marker?: MarkerProperty | MarkerProperty[], - markerEnd?: MarkerEndProperty | MarkerEndProperty[], - markerMid?: MarkerMidProperty | MarkerMidProperty[], - markerStart?: MarkerStartProperty | MarkerStartProperty[], - mask?: MaskProperty<TLength> | MaskProperty<TLength>[], - opacity?: OpacityProperty | OpacityProperty[], - overflow?: OverflowProperty | OverflowProperty[], - paintOrder?: PaintOrderProperty | PaintOrderProperty[], - pointerEvents?: PointerEventsProperty | PointerEventsProperty[], - shapeRendering?: ShapeRenderingProperty | ShapeRenderingProperty[], - stopColor?: StopColorProperty | StopColorProperty[], - stopOpacity?: GlobalsNumber | GlobalsNumber[], - stroke?: StrokeProperty | StrokeProperty[], - strokeDasharray?: StrokeDasharrayProperty<TLength> | StrokeDasharrayProperty<TLength>[], - strokeDashoffset?: StrokeDashoffsetProperty<TLength> | StrokeDashoffsetProperty<TLength>[], - strokeLinecap?: StrokeLinecapProperty | StrokeLinecapProperty[], - strokeLinejoin?: StrokeLinejoinProperty | StrokeLinejoinProperty[], - strokeMiterlimit?: GlobalsNumber | GlobalsNumber[], - strokeOpacity?: GlobalsNumber | GlobalsNumber[], - strokeWidth?: StrokeWidthProperty<TLength> | StrokeWidthProperty<TLength>[], - textAnchor?: TextAnchorProperty | TextAnchorProperty[], - textDecoration?: TextDecorationProperty<TLength> | TextDecorationProperty<TLength>[], - textRendering?: TextRenderingProperty | TextRenderingProperty[], - unicodeBidi?: UnicodeBidiProperty | UnicodeBidiProperty[], - vectorEffect?: VectorEffectProperty | VectorEffectProperty[], - visibility?: VisibilityProperty | VisibilityProperty[], - whiteSpace?: WhiteSpaceProperty | WhiteSpaceProperty[], - wordSpacing?: WordSpacingProperty<TLength> | WordSpacingProperty<TLength>[], - writingMode?: WritingModeProperty | WritingModeProperty[], -}; +export type ObsoletePropertiesFallback<TLength = string | 0, TTime = string> = {| + azimuth?: Property$Azimuth | Array<Property$Azimuth>, + boxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, + boxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, + boxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, + boxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + boxLines?: Property$BoxLines | Array<Property$BoxLines>, + boxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + boxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, + boxPack?: Property$BoxPack | Array<Property$BoxPack>, + clip?: Property$Clip | Array<Property$Clip>, + gridColumnGap?: Property$GridColumnGap<TLength> | Array<Property$GridColumnGap<TLength>>, + gridGap?: Property$GridGap<TLength> | Array<Property$GridGap<TLength>>, + gridRowGap?: Property$GridRowGap<TLength> | Array<Property$GridRowGap<TLength>>, + imeMode?: Property$ImeMode | Array<Property$ImeMode>, + offsetBlock?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, + offsetBlockEnd?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, + offsetBlockStart?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, + offsetInline?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, + offsetInlineEnd?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, + offsetInlineStart?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, + scrollSnapCoordinate?: Property$ScrollSnapCoordinate<TLength> | Array<Property$ScrollSnapCoordinate<TLength>>, + scrollSnapDestination?: Property$ScrollSnapDestination<TLength> | Array<Property$ScrollSnapDestination<TLength>>, + scrollSnapPointsX?: Property$ScrollSnapPointsX | Array<Property$ScrollSnapPointsX>, + scrollSnapPointsY?: Property$ScrollSnapPointsY | Array<Property$ScrollSnapPointsY>, + scrollSnapTypeX?: Property$ScrollSnapTypeX | Array<Property$ScrollSnapTypeX>, + scrollSnapTypeY?: Property$ScrollSnapTypeY | Array<Property$ScrollSnapTypeY>, + KhtmlBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, + KhtmlBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, + KhtmlBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, + KhtmlBoxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + KhtmlBoxLines?: Property$BoxLines | Array<Property$BoxLines>, + KhtmlBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + KhtmlBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, + KhtmlBoxPack?: Property$BoxPack | Array<Property$BoxPack>, + KhtmlLineBreak?: Property$LineBreak | Array<Property$LineBreak>, + KhtmlOpacity?: Property$Opacity | Array<Property$Opacity>, + KhtmlUserSelect?: Property$UserSelect | Array<Property$UserSelect>, + MozBackfaceVisibility?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + MozBackgroundClip?: Property$BackgroundClip | Array<Property$BackgroundClip>, + MozBackgroundInlinePolicy?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + MozBackgroundOrigin?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + MozBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + MozBorderRadius?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + MozBorderRadiusBottomleft?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + MozBorderRadiusBottomright?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + MozBorderRadiusTopleft?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + MozBorderRadiusTopright?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + MozBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, + MozBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, + MozBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, + MozBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + MozBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, + MozBoxPack?: Property$BoxPack | Array<Property$BoxPack>, + MozBoxShadow?: Property$BoxShadow | Array<Property$BoxShadow>, + MozFloatEdge?: Property$MozFloatEdge | Array<Property$MozFloatEdge>, + MozForceBrokenImageIcon?: Property$MozForceBrokenImageIcon | Array<Property$MozForceBrokenImageIcon>, + MozOpacity?: Property$Opacity | Array<Property$Opacity>, + MozOutline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, + MozOutlineColor?: Property$OutlineColor | Array<Property$OutlineColor>, + MozOutlineStyle?: Property$OutlineStyle | Array<Property$OutlineStyle>, + MozOutlineWidth?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, + MozPerspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + MozPerspectiveOrigin?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + MozTextAlignLast?: Property$TextAlignLast | Array<Property$TextAlignLast>, + MozTextDecorationColor?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + MozTextDecorationLine?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + MozTextDecorationStyle?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + MozTransform?: Property$Transform | Array<Property$Transform>, + MozTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + MozTransformStyle?: Property$TransformStyle | Array<Property$TransformStyle>, + MozTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + MozTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + MozTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + MozTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + MozTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + MozUserInput?: Property$MozUserInput | Array<Property$MozUserInput>, + msImeMode?: Property$ImeMode | Array<Property$ImeMode>, + OAnimation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + OAnimationDelay?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + OAnimationDirection?: Property$AnimationDirection | Array<Property$AnimationDirection>, + OAnimationDuration?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + OAnimationFillMode?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + OAnimationIterationCount?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + OAnimationName?: Property$AnimationName | Array<Property$AnimationName>, + OAnimationPlayState?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + OAnimationTimingFunction?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + OBackgroundSize?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + OBorderImage?: Property$BorderImage | Array<Property$BorderImage>, + OObjectFit?: Property$ObjectFit | Array<Property$ObjectFit>, + OObjectPosition?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, + OTabSize?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + OTextOverflow?: Property$TextOverflow | Array<Property$TextOverflow>, + OTransform?: Property$Transform | Array<Property$Transform>, + OTransformOrigin?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + OTransition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + OTransitionDelay?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + OTransitionDuration?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + OTransitionProperty?: Property$TransitionProperty | Array<Property$TransitionProperty>, + OTransitionTimingFunction?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + WebkitBoxAlign?: Property$BoxAlign | Array<Property$BoxAlign>, + WebkitBoxDirection?: Property$BoxDirection | Array<Property$BoxDirection>, + WebkitBoxFlex?: Property$BoxFlex | Array<Property$BoxFlex>, + WebkitBoxFlexGroup?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + WebkitBoxLines?: Property$BoxLines | Array<Property$BoxLines>, + WebkitBoxOrdinalGroup?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + WebkitBoxOrient?: Property$BoxOrient | Array<Property$BoxOrient>, + WebkitBoxPack?: Property$BoxPack | Array<Property$BoxPack>, +|}; -export type PropertiesFallback<TLength = string | 0> = StandardPropertiesFallback<TLength> & - VendorPropertiesFallback<TLength> & - ObsoletePropertiesFallback<TLength> & - SvgPropertiesFallback<TLength>; +export type SvgPropertiesFallback<TLength = string | 0, TTime = string> = {| + alignmentBaseline?: Property$AlignmentBaseline | Array<Property$AlignmentBaseline>, + baselineShift?: Property$BaselineShift<TLength> | Array<Property$BaselineShift<TLength>>, + clip?: Property$Clip | Array<Property$Clip>, + clipPath?: Property$ClipPath | Array<Property$ClipPath>, + clipRule?: Property$ClipRule | Array<Property$ClipRule>, + color?: Property$Color | Array<Property$Color>, + colorInterpolation?: Property$ColorInterpolation | Array<Property$ColorInterpolation>, + colorRendering?: Property$ColorRendering | Array<Property$ColorRendering>, + cursor?: Property$Cursor | Array<Property$Cursor>, + direction?: Property$Direction | Array<Property$Direction>, + display?: Property$Display | Array<Property$Display>, + dominantBaseline?: Property$DominantBaseline | Array<Property$DominantBaseline>, + fill?: Property$Fill | Array<Property$Fill>, + fillOpacity?: Property$FillOpacity | Array<Property$FillOpacity>, + fillRule?: Property$FillRule | Array<Property$FillRule>, + filter?: Property$Filter | Array<Property$Filter>, + floodColor?: Property$FloodColor | Array<Property$FloodColor>, + floodOpacity?: Property$FloodOpacity | Array<Property$FloodOpacity>, + font?: Property$Font | Array<Property$Font>, + fontFamily?: Property$FontFamily | Array<Property$FontFamily>, + fontSize?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, + fontSizeAdjust?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, + fontStretch?: Property$FontStretch | Array<Property$FontStretch>, + fontStyle?: Property$FontStyle | Array<Property$FontStyle>, + fontVariant?: Property$FontVariant | Array<Property$FontVariant>, + fontWeight?: Property$FontWeight | Array<Property$FontWeight>, + glyphOrientationVertical?: Property$GlyphOrientationVertical | Array<Property$GlyphOrientationVertical>, + imageRendering?: Property$ImageRendering | Array<Property$ImageRendering>, + letterSpacing?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, + lightingColor?: Property$LightingColor | Array<Property$LightingColor>, + lineHeight?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, + marker?: Property$Marker | Array<Property$Marker>, + markerEnd?: Property$MarkerEnd | Array<Property$MarkerEnd>, + markerMid?: Property$MarkerMid | Array<Property$MarkerMid>, + markerStart?: Property$MarkerStart | Array<Property$MarkerStart>, + mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, + opacity?: Property$Opacity | Array<Property$Opacity>, + overflow?: Property$Overflow | Array<Property$Overflow>, + paintOrder?: Property$PaintOrder | Array<Property$PaintOrder>, + pointerEvents?: Property$PointerEvents | Array<Property$PointerEvents>, + shapeRendering?: Property$ShapeRendering | Array<Property$ShapeRendering>, + stopColor?: Property$StopColor | Array<Property$StopColor>, + stopOpacity?: Property$StopOpacity | Array<Property$StopOpacity>, + stroke?: Property$Stroke | Array<Property$Stroke>, + strokeDasharray?: Property$StrokeDasharray<TLength> | Array<Property$StrokeDasharray<TLength>>, + strokeDashoffset?: Property$StrokeDashoffset<TLength> | Array<Property$StrokeDashoffset<TLength>>, + strokeLinecap?: Property$StrokeLinecap | Array<Property$StrokeLinecap>, + strokeLinejoin?: Property$StrokeLinejoin | Array<Property$StrokeLinejoin>, + strokeMiterlimit?: Property$StrokeMiterlimit | Array<Property$StrokeMiterlimit>, + strokeOpacity?: Property$StrokeOpacity | Array<Property$StrokeOpacity>, + strokeWidth?: Property$StrokeWidth<TLength> | Array<Property$StrokeWidth<TLength>>, + textAnchor?: Property$TextAnchor | Array<Property$TextAnchor>, + textDecoration?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, + textRendering?: Property$TextRendering | Array<Property$TextRendering>, + unicodeBidi?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, + vectorEffect?: Property$VectorEffect | Array<Property$VectorEffect>, + visibility?: Property$Visibility | Array<Property$Visibility>, + whiteSpace?: Property$WhiteSpace | Array<Property$WhiteSpace>, + wordSpacing?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, + writingMode?: Property$WritingMode | Array<Property$WritingMode>, +|}; -export type StandardLonghandPropertiesHyphenFallback<TLength = string | 0> = { - "accent-color"?: AccentColorProperty | AccentColorProperty[], - "align-content"?: AlignContentProperty | AlignContentProperty[], - "align-items"?: AlignItemsProperty | AlignItemsProperty[], - "align-self"?: AlignSelfProperty | AlignSelfProperty[], - "align-tracks"?: AlignTracksProperty | AlignTracksProperty[], - "animation-composition"?: GlobalsString | GlobalsString[], - "animation-delay"?: GlobalsString | GlobalsString[], - "animation-direction"?: AnimationDirectionProperty | AnimationDirectionProperty[], - "animation-duration"?: GlobalsString | GlobalsString[], - "animation-fill-mode"?: AnimationFillModeProperty | AnimationFillModeProperty[], - "animation-iteration-count"?: AnimationIterationCountProperty | AnimationIterationCountProperty[], - "animation-name"?: AnimationNameProperty | AnimationNameProperty[], - "animation-play-state"?: AnimationPlayStateProperty | AnimationPlayStateProperty[], - "animation-timeline"?: AnimationTimelineProperty | AnimationTimelineProperty[], - "animation-timing-function"?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[], - appearance?: AppearanceProperty | AppearanceProperty[], - "aspect-ratio"?: AspectRatioProperty | AspectRatioProperty[], - "backdrop-filter"?: BackdropFilterProperty | BackdropFilterProperty[], - "backface-visibility"?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[], - "background-attachment"?: BackgroundAttachmentProperty | BackgroundAttachmentProperty[], - "background-blend-mode"?: BackgroundBlendModeProperty | BackgroundBlendModeProperty[], - "background-clip"?: BackgroundClipProperty | BackgroundClipProperty[], - "background-color"?: BackgroundColorProperty | BackgroundColorProperty[], - "background-image"?: BackgroundImageProperty | BackgroundImageProperty[], - "background-origin"?: BackgroundOriginProperty | BackgroundOriginProperty[], - "background-position-x"?: BackgroundPositionXProperty<TLength> | BackgroundPositionXProperty<TLength>[], - "background-position-y"?: BackgroundPositionYProperty<TLength> | BackgroundPositionYProperty<TLength>[], - "background-repeat"?: BackgroundRepeatProperty | BackgroundRepeatProperty[], - "background-size"?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[], - "block-overflow"?: BlockOverflowProperty | BlockOverflowProperty[], - "block-size"?: BlockSizeProperty<TLength> | BlockSizeProperty<TLength>[], - "border-block-color"?: BorderBlockColorProperty | BorderBlockColorProperty[], - "border-block-end-color"?: BorderBlockEndColorProperty | BorderBlockEndColorProperty[], - "border-block-end-style"?: BorderBlockEndStyleProperty | BorderBlockEndStyleProperty[], - "border-block-end-width"?: BorderBlockEndWidthProperty<TLength> | BorderBlockEndWidthProperty<TLength>[], - "border-block-start-color"?: BorderBlockStartColorProperty | BorderBlockStartColorProperty[], - "border-block-start-style"?: BorderBlockStartStyleProperty | BorderBlockStartStyleProperty[], - "border-block-start-width"?: BorderBlockStartWidthProperty<TLength> | BorderBlockStartWidthProperty<TLength>[], - "border-block-style"?: BorderBlockStyleProperty | BorderBlockStyleProperty[], - "border-block-width"?: BorderBlockWidthProperty<TLength> | BorderBlockWidthProperty<TLength>[], - "border-bottom-color"?: BorderBottomColorProperty | BorderBottomColorProperty[], - "border-bottom-left-radius"?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[], - "border-bottom-right-radius"?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[], - "border-bottom-style"?: BorderBottomStyleProperty | BorderBottomStyleProperty[], - "border-bottom-width"?: BorderBottomWidthProperty<TLength> | BorderBottomWidthProperty<TLength>[], - "border-collapse"?: BorderCollapseProperty | BorderCollapseProperty[], - "border-end-end-radius"?: BorderEndEndRadiusProperty<TLength> | BorderEndEndRadiusProperty<TLength>[], - "border-end-start-radius"?: BorderEndStartRadiusProperty<TLength> | BorderEndStartRadiusProperty<TLength>[], - "border-image-outset"?: BorderImageOutsetProperty<TLength> | BorderImageOutsetProperty<TLength>[], - "border-image-repeat"?: BorderImageRepeatProperty | BorderImageRepeatProperty[], - "border-image-slice"?: BorderImageSliceProperty | BorderImageSliceProperty[], - "border-image-source"?: BorderImageSourceProperty | BorderImageSourceProperty[], - "border-image-width"?: BorderImageWidthProperty<TLength> | BorderImageWidthProperty<TLength>[], - "border-inline-color"?: BorderInlineColorProperty | BorderInlineColorProperty[], - "border-inline-end-color"?: BorderInlineEndColorProperty | BorderInlineEndColorProperty[], - "border-inline-end-style"?: BorderInlineEndStyleProperty | BorderInlineEndStyleProperty[], - "border-inline-end-width"?: BorderInlineEndWidthProperty<TLength> | BorderInlineEndWidthProperty<TLength>[], - "border-inline-start-color"?: BorderInlineStartColorProperty | BorderInlineStartColorProperty[], - "border-inline-start-style"?: BorderInlineStartStyleProperty | BorderInlineStartStyleProperty[], - "border-inline-start-width"?: BorderInlineStartWidthProperty<TLength> | BorderInlineStartWidthProperty<TLength>[], - "border-inline-style"?: BorderInlineStyleProperty | BorderInlineStyleProperty[], - "border-inline-width"?: BorderInlineWidthProperty<TLength> | BorderInlineWidthProperty<TLength>[], - "border-left-color"?: BorderLeftColorProperty | BorderLeftColorProperty[], - "border-left-style"?: BorderLeftStyleProperty | BorderLeftStyleProperty[], - "border-left-width"?: BorderLeftWidthProperty<TLength> | BorderLeftWidthProperty<TLength>[], - "border-right-color"?: BorderRightColorProperty | BorderRightColorProperty[], - "border-right-style"?: BorderRightStyleProperty | BorderRightStyleProperty[], - "border-right-width"?: BorderRightWidthProperty<TLength> | BorderRightWidthProperty<TLength>[], - "border-spacing"?: BorderSpacingProperty<TLength> | BorderSpacingProperty<TLength>[], - "border-start-end-radius"?: BorderStartEndRadiusProperty<TLength> | BorderStartEndRadiusProperty<TLength>[], - "border-start-start-radius"?: BorderStartStartRadiusProperty<TLength> | BorderStartStartRadiusProperty<TLength>[], - "border-top-color"?: BorderTopColorProperty | BorderTopColorProperty[], - "border-top-left-radius"?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[], - "border-top-right-radius"?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[], - "border-top-style"?: BorderTopStyleProperty | BorderTopStyleProperty[], - "border-top-width"?: BorderTopWidthProperty<TLength> | BorderTopWidthProperty<TLength>[], - bottom?: BottomProperty<TLength> | BottomProperty<TLength>[], - "box-decoration-break"?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[], - "box-shadow"?: BoxShadowProperty | BoxShadowProperty[], - "box-sizing"?: BoxSizingProperty | BoxSizingProperty[], - "break-after"?: BreakAfterProperty | BreakAfterProperty[], - "break-before"?: BreakBeforeProperty | BreakBeforeProperty[], - "break-inside"?: BreakInsideProperty | BreakInsideProperty[], - "caption-side"?: CaptionSideProperty | CaptionSideProperty[], - "caret-color"?: CaretColorProperty | CaretColorProperty[], - clear?: ClearProperty | ClearProperty[], - "clip-path"?: ClipPathProperty | ClipPathProperty[], - color?: ColorProperty | ColorProperty[], - "color-adjust"?: PrintColorAdjustProperty | PrintColorAdjustProperty[], - "color-scheme"?: ColorSchemeProperty | ColorSchemeProperty[], - "column-count"?: ColumnCountProperty | ColumnCountProperty[], - "column-fill"?: ColumnFillProperty | ColumnFillProperty[], - "column-gap"?: ColumnGapProperty<TLength> | ColumnGapProperty<TLength>[], - "column-rule-color"?: ColumnRuleColorProperty | ColumnRuleColorProperty[], - "column-rule-style"?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[], - "column-rule-width"?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[], - "column-span"?: ColumnSpanProperty | ColumnSpanProperty[], - "column-width"?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[], - contain?: ContainProperty | ContainProperty[], - content?: ContentProperty | ContentProperty[], - "content-visibility"?: ContentVisibilityProperty | ContentVisibilityProperty[], - "counter-increment"?: CounterIncrementProperty | CounterIncrementProperty[], - "counter-reset"?: CounterResetProperty | CounterResetProperty[], - "counter-set"?: CounterSetProperty | CounterSetProperty[], - cursor?: CursorProperty | CursorProperty[], - direction?: DirectionProperty | DirectionProperty[], - display?: DisplayProperty | DisplayProperty[], - "empty-cells"?: EmptyCellsProperty | EmptyCellsProperty[], - filter?: FilterProperty | FilterProperty[], - "flex-basis"?: FlexBasisProperty<TLength> | FlexBasisProperty<TLength>[], - "flex-direction"?: FlexDirectionProperty | FlexDirectionProperty[], - "flex-grow"?: GlobalsNumber | GlobalsNumber[], - "flex-shrink"?: GlobalsNumber | GlobalsNumber[], - "flex-wrap"?: FlexWrapProperty | FlexWrapProperty[], - float?: FloatProperty | FloatProperty[], - "font-family"?: FontFamilyProperty | FontFamilyProperty[], - "font-feature-settings"?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[], - "font-kerning"?: FontKerningProperty | FontKerningProperty[], - "font-language-override"?: FontLanguageOverrideProperty | FontLanguageOverrideProperty[], - "font-optical-sizing"?: FontOpticalSizingProperty | FontOpticalSizingProperty[], - "font-size"?: FontSizeProperty<TLength> | FontSizeProperty<TLength>[], - "font-size-adjust"?: FontSizeAdjustProperty | FontSizeAdjustProperty[], - "font-smooth"?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[], - "font-stretch"?: FontStretchProperty | FontStretchProperty[], - "font-style"?: FontStyleProperty | FontStyleProperty[], - "font-synthesis"?: FontSynthesisProperty | FontSynthesisProperty[], - "font-variant"?: FontVariantProperty | FontVariantProperty[], - "font-variant-alternates"?: FontVariantAlternatesProperty | FontVariantAlternatesProperty[], - "font-variant-caps"?: FontVariantCapsProperty | FontVariantCapsProperty[], - "font-variant-east-asian"?: FontVariantEastAsianProperty | FontVariantEastAsianProperty[], - "font-variant-ligatures"?: FontVariantLigaturesProperty | FontVariantLigaturesProperty[], - "font-variant-numeric"?: FontVariantNumericProperty | FontVariantNumericProperty[], - "font-variant-position"?: FontVariantPositionProperty | FontVariantPositionProperty[], - "font-variation-settings"?: FontVariationSettingsProperty | FontVariationSettingsProperty[], - "font-weight"?: FontWeightProperty | FontWeightProperty[], - "forced-color-adjust"?: ForcedColorAdjustProperty | ForcedColorAdjustProperty[], - "grid-auto-columns"?: GridAutoColumnsProperty<TLength> | GridAutoColumnsProperty<TLength>[], - "grid-auto-flow"?: GridAutoFlowProperty | GridAutoFlowProperty[], - "grid-auto-rows"?: GridAutoRowsProperty<TLength> | GridAutoRowsProperty<TLength>[], - "grid-column-end"?: GridColumnEndProperty | GridColumnEndProperty[], - "grid-column-start"?: GridColumnStartProperty | GridColumnStartProperty[], - "grid-row-end"?: GridRowEndProperty | GridRowEndProperty[], - "grid-row-start"?: GridRowStartProperty | GridRowStartProperty[], - "grid-template-areas"?: GridTemplateAreasProperty | GridTemplateAreasProperty[], - "grid-template-columns"?: GridTemplateColumnsProperty<TLength> | GridTemplateColumnsProperty<TLength>[], - "grid-template-rows"?: GridTemplateRowsProperty<TLength> | GridTemplateRowsProperty<TLength>[], - "hanging-punctuation"?: HangingPunctuationProperty | HangingPunctuationProperty[], - height?: HeightProperty<TLength> | HeightProperty<TLength>[], - "hyphenate-character"?: HyphenateCharacterProperty | HyphenateCharacterProperty[], - hyphens?: HyphensProperty | HyphensProperty[], - "image-orientation"?: ImageOrientationProperty | ImageOrientationProperty[], - "image-rendering"?: ImageRenderingProperty | ImageRenderingProperty[], - "image-resolution"?: ImageResolutionProperty | ImageResolutionProperty[], - "initial-letter"?: InitialLetterProperty | InitialLetterProperty[], - "inline-size"?: InlineSizeProperty<TLength> | InlineSizeProperty<TLength>[], - "input-security"?: InputSecurityProperty | InputSecurityProperty[], - inset?: InsetProperty<TLength> | InsetProperty<TLength>[], - "inset-block"?: InsetBlockProperty<TLength> | InsetBlockProperty<TLength>[], - "inset-block-end"?: InsetBlockEndProperty<TLength> | InsetBlockEndProperty<TLength>[], - "inset-block-start"?: InsetBlockStartProperty<TLength> | InsetBlockStartProperty<TLength>[], - "inset-inline"?: InsetInlineProperty<TLength> | InsetInlineProperty<TLength>[], - "inset-inline-end"?: InsetInlineEndProperty<TLength> | InsetInlineEndProperty<TLength>[], - "inset-inline-start"?: InsetInlineStartProperty<TLength> | InsetInlineStartProperty<TLength>[], - isolation?: IsolationProperty | IsolationProperty[], - "justify-content"?: JustifyContentProperty | JustifyContentProperty[], - "justify-items"?: JustifyItemsProperty | JustifyItemsProperty[], - "justify-self"?: JustifySelfProperty | JustifySelfProperty[], - "justify-tracks"?: JustifyTracksProperty | JustifyTracksProperty[], - left?: LeftProperty<TLength> | LeftProperty<TLength>[], - "letter-spacing"?: LetterSpacingProperty<TLength> | LetterSpacingProperty<TLength>[], - "line-break"?: LineBreakProperty | LineBreakProperty[], - "line-height"?: LineHeightProperty<TLength> | LineHeightProperty<TLength>[], - "line-height-step"?: LineHeightStepProperty<TLength> | LineHeightStepProperty<TLength>[], - "list-style-image"?: ListStyleImageProperty | ListStyleImageProperty[], - "list-style-position"?: ListStylePositionProperty | ListStylePositionProperty[], - "list-style-type"?: ListStyleTypeProperty | ListStyleTypeProperty[], - "margin-block"?: MarginBlockProperty<TLength> | MarginBlockProperty<TLength>[], - "margin-block-end"?: MarginBlockEndProperty<TLength> | MarginBlockEndProperty<TLength>[], - "margin-block-start"?: MarginBlockStartProperty<TLength> | MarginBlockStartProperty<TLength>[], - "margin-bottom"?: MarginBottomProperty<TLength> | MarginBottomProperty<TLength>[], - "margin-inline"?: MarginInlineProperty<TLength> | MarginInlineProperty<TLength>[], - "margin-inline-end"?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[], - "margin-inline-start"?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[], - "margin-left"?: MarginLeftProperty<TLength> | MarginLeftProperty<TLength>[], - "margin-right"?: MarginRightProperty<TLength> | MarginRightProperty<TLength>[], - "margin-top"?: MarginTopProperty<TLength> | MarginTopProperty<TLength>[], - "mask-border-mode"?: MaskBorderModeProperty | MaskBorderModeProperty[], - "mask-border-outset"?: MaskBorderOutsetProperty<TLength> | MaskBorderOutsetProperty<TLength>[], - "mask-border-repeat"?: MaskBorderRepeatProperty | MaskBorderRepeatProperty[], - "mask-border-slice"?: MaskBorderSliceProperty | MaskBorderSliceProperty[], - "mask-border-source"?: MaskBorderSourceProperty | MaskBorderSourceProperty[], - "mask-border-width"?: MaskBorderWidthProperty<TLength> | MaskBorderWidthProperty<TLength>[], - "mask-clip"?: MaskClipProperty | MaskClipProperty[], - "mask-composite"?: MaskCompositeProperty | MaskCompositeProperty[], - "mask-image"?: MaskImageProperty | MaskImageProperty[], - "mask-mode"?: MaskModeProperty | MaskModeProperty[], - "mask-origin"?: MaskOriginProperty | MaskOriginProperty[], - "mask-position"?: MaskPositionProperty<TLength> | MaskPositionProperty<TLength>[], - "mask-repeat"?: MaskRepeatProperty | MaskRepeatProperty[], - "mask-size"?: MaskSizeProperty<TLength> | MaskSizeProperty<TLength>[], - "mask-type"?: MaskTypeProperty | MaskTypeProperty[], - "math-depth"?: MathDepthProperty | MathDepthProperty[], - "math-shift"?: MathShiftProperty | MathShiftProperty[], - "math-style"?: MathStyleProperty | MathStyleProperty[], - "max-block-size"?: MaxBlockSizeProperty<TLength> | MaxBlockSizeProperty<TLength>[], - "max-height"?: MaxHeightProperty<TLength> | MaxHeightProperty<TLength>[], - "max-inline-size"?: MaxInlineSizeProperty<TLength> | MaxInlineSizeProperty<TLength>[], - "max-lines"?: MaxLinesProperty | MaxLinesProperty[], - "max-width"?: MaxWidthProperty<TLength> | MaxWidthProperty<TLength>[], - "min-block-size"?: MinBlockSizeProperty<TLength> | MinBlockSizeProperty<TLength>[], - "min-height"?: MinHeightProperty<TLength> | MinHeightProperty<TLength>[], - "min-inline-size"?: MinInlineSizeProperty<TLength> | MinInlineSizeProperty<TLength>[], - "min-width"?: MinWidthProperty<TLength> | MinWidthProperty<TLength>[], - "mix-blend-mode"?: MixBlendModeProperty | MixBlendModeProperty[], - "motion-distance"?: OffsetDistanceProperty<TLength> | OffsetDistanceProperty<TLength>[], - "motion-path"?: OffsetPathProperty | OffsetPathProperty[], - "motion-rotation"?: OffsetRotateProperty | OffsetRotateProperty[], - "object-fit"?: ObjectFitProperty | ObjectFitProperty[], - "object-position"?: ObjectPositionProperty<TLength> | ObjectPositionProperty<TLength>[], - "offset-anchor"?: OffsetAnchorProperty<TLength> | OffsetAnchorProperty<TLength>[], - "offset-distance"?: OffsetDistanceProperty<TLength> | OffsetDistanceProperty<TLength>[], - "offset-path"?: OffsetPathProperty | OffsetPathProperty[], - "offset-rotate"?: OffsetRotateProperty | OffsetRotateProperty[], - "offset-rotation"?: OffsetRotateProperty | OffsetRotateProperty[], - opacity?: OpacityProperty | OpacityProperty[], - order?: GlobalsNumber | GlobalsNumber[], - orphans?: GlobalsNumber | GlobalsNumber[], - "outline-color"?: OutlineColorProperty | OutlineColorProperty[], - "outline-offset"?: OutlineOffsetProperty<TLength> | OutlineOffsetProperty<TLength>[], - "outline-style"?: OutlineStyleProperty | OutlineStyleProperty[], - "outline-width"?: OutlineWidthProperty<TLength> | OutlineWidthProperty<TLength>[], - "overflow-anchor"?: OverflowAnchorProperty | OverflowAnchorProperty[], - "overflow-block"?: OverflowBlockProperty | OverflowBlockProperty[], - "overflow-clip-box"?: OverflowClipBoxProperty | OverflowClipBoxProperty[], - "overflow-clip-margin"?: OverflowClipMarginProperty<TLength> | OverflowClipMarginProperty<TLength>[], - "overflow-inline"?: OverflowInlineProperty | OverflowInlineProperty[], - "overflow-wrap"?: OverflowWrapProperty | OverflowWrapProperty[], - "overflow-x"?: OverflowXProperty | OverflowXProperty[], - "overflow-y"?: OverflowYProperty | OverflowYProperty[], - "overscroll-behavior-block"?: OverscrollBehaviorBlockProperty | OverscrollBehaviorBlockProperty[], - "overscroll-behavior-inline"?: OverscrollBehaviorInlineProperty | OverscrollBehaviorInlineProperty[], - "overscroll-behavior-x"?: OverscrollBehaviorXProperty | OverscrollBehaviorXProperty[], - "overscroll-behavior-y"?: OverscrollBehaviorYProperty | OverscrollBehaviorYProperty[], - "padding-block"?: PaddingBlockProperty<TLength> | PaddingBlockProperty<TLength>[], - "padding-block-end"?: PaddingBlockEndProperty<TLength> | PaddingBlockEndProperty<TLength>[], - "padding-block-start"?: PaddingBlockStartProperty<TLength> | PaddingBlockStartProperty<TLength>[], - "padding-bottom"?: PaddingBottomProperty<TLength> | PaddingBottomProperty<TLength>[], - "padding-inline"?: PaddingInlineProperty<TLength> | PaddingInlineProperty<TLength>[], - "padding-inline-end"?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[], - "padding-inline-start"?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[], - "padding-left"?: PaddingLeftProperty<TLength> | PaddingLeftProperty<TLength>[], - "padding-right"?: PaddingRightProperty<TLength> | PaddingRightProperty<TLength>[], - "padding-top"?: PaddingTopProperty<TLength> | PaddingTopProperty<TLength>[], - "page-break-after"?: PageBreakAfterProperty | PageBreakAfterProperty[], - "page-break-before"?: PageBreakBeforeProperty | PageBreakBeforeProperty[], - "page-break-inside"?: PageBreakInsideProperty | PageBreakInsideProperty[], - "paint-order"?: PaintOrderProperty | PaintOrderProperty[], - perspective?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[], - "perspective-origin"?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[], - "place-content"?: PlaceContentProperty | PlaceContentProperty[], - "pointer-events"?: PointerEventsProperty | PointerEventsProperty[], - position?: PositionProperty | PositionProperty[], - "print-color-adjust"?: PrintColorAdjustProperty | PrintColorAdjustProperty[], - quotes?: QuotesProperty | QuotesProperty[], - resize?: ResizeProperty | ResizeProperty[], - right?: RightProperty<TLength> | RightProperty<TLength>[], - rotate?: RotateProperty | RotateProperty[], - "row-gap"?: RowGapProperty<TLength> | RowGapProperty<TLength>[], - "ruby-align"?: RubyAlignProperty | RubyAlignProperty[], - "ruby-merge"?: RubyMergeProperty | RubyMergeProperty[], - "ruby-position"?: RubyPositionProperty | RubyPositionProperty[], - scale?: ScaleProperty | ScaleProperty[], - "scroll-behavior"?: ScrollBehaviorProperty | ScrollBehaviorProperty[], - "scroll-margin"?: ScrollMarginProperty<TLength> | ScrollMarginProperty<TLength>[], - "scroll-margin-block"?: ScrollMarginBlockProperty<TLength> | ScrollMarginBlockProperty<TLength>[], - "scroll-margin-block-end"?: ScrollMarginBlockEndProperty<TLength> | ScrollMarginBlockEndProperty<TLength>[], - "scroll-margin-block-start"?: ScrollMarginBlockStartProperty<TLength> | ScrollMarginBlockStartProperty<TLength>[], - "scroll-margin-bottom"?: ScrollMarginBottomProperty<TLength> | ScrollMarginBottomProperty<TLength>[], - "scroll-margin-inline"?: ScrollMarginInlineProperty<TLength> | ScrollMarginInlineProperty<TLength>[], - "scroll-margin-inline-end"?: ScrollMarginInlineEndProperty<TLength> | ScrollMarginInlineEndProperty<TLength>[], - "scroll-margin-inline-start"?: ScrollMarginInlineStartProperty<TLength> | ScrollMarginInlineStartProperty<TLength>[], - "scroll-margin-left"?: ScrollMarginLeftProperty<TLength> | ScrollMarginLeftProperty<TLength>[], - "scroll-margin-right"?: ScrollMarginRightProperty<TLength> | ScrollMarginRightProperty<TLength>[], - "scroll-margin-top"?: ScrollMarginTopProperty<TLength> | ScrollMarginTopProperty<TLength>[], - "scroll-padding"?: ScrollPaddingProperty<TLength> | ScrollPaddingProperty<TLength>[], - "scroll-padding-block"?: ScrollPaddingBlockProperty<TLength> | ScrollPaddingBlockProperty<TLength>[], - "scroll-padding-block-end"?: ScrollPaddingBlockEndProperty<TLength> | ScrollPaddingBlockEndProperty<TLength>[], - "scroll-padding-block-start"?: ScrollPaddingBlockStartProperty<TLength> | ScrollPaddingBlockStartProperty<TLength>[], - "scroll-padding-bottom"?: ScrollPaddingBottomProperty<TLength> | ScrollPaddingBottomProperty<TLength>[], - "scroll-padding-inline"?: ScrollPaddingInlineProperty<TLength> | ScrollPaddingInlineProperty<TLength>[], - "scroll-padding-inline-end"?: ScrollPaddingInlineEndProperty<TLength> | ScrollPaddingInlineEndProperty<TLength>[], - "scroll-padding-inline-start"?: ScrollPaddingInlineStartProperty<TLength> | ScrollPaddingInlineStartProperty<TLength>[], - "scroll-padding-left"?: ScrollPaddingLeftProperty<TLength> | ScrollPaddingLeftProperty<TLength>[], - "scroll-padding-right"?: ScrollPaddingRightProperty<TLength> | ScrollPaddingRightProperty<TLength>[], - "scroll-padding-top"?: ScrollPaddingTopProperty<TLength> | ScrollPaddingTopProperty<TLength>[], - "scroll-snap-align"?: ScrollSnapAlignProperty | ScrollSnapAlignProperty[], - "scroll-snap-margin"?: ScrollMarginProperty<TLength> | ScrollMarginProperty<TLength>[], - "scroll-snap-margin-bottom"?: ScrollMarginBottomProperty<TLength> | ScrollMarginBottomProperty<TLength>[], - "scroll-snap-margin-left"?: ScrollMarginLeftProperty<TLength> | ScrollMarginLeftProperty<TLength>[], - "scroll-snap-margin-right"?: ScrollMarginRightProperty<TLength> | ScrollMarginRightProperty<TLength>[], - "scroll-snap-margin-top"?: ScrollMarginTopProperty<TLength> | ScrollMarginTopProperty<TLength>[], - "scroll-snap-stop"?: ScrollSnapStopProperty | ScrollSnapStopProperty[], - "scroll-snap-type"?: ScrollSnapTypeProperty | ScrollSnapTypeProperty[], - "scrollbar-color"?: ScrollbarColorProperty | ScrollbarColorProperty[], - "scrollbar-gutter"?: ScrollbarGutterProperty | ScrollbarGutterProperty[], - "scrollbar-width"?: ScrollbarWidthProperty | ScrollbarWidthProperty[], - "shape-image-threshold"?: ShapeImageThresholdProperty | ShapeImageThresholdProperty[], - "shape-margin"?: ShapeMarginProperty<TLength> | ShapeMarginProperty<TLength>[], - "shape-outside"?: ShapeOutsideProperty | ShapeOutsideProperty[], - "tab-size"?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[], - "table-layout"?: TableLayoutProperty | TableLayoutProperty[], - "text-align"?: TextAlignProperty | TextAlignProperty[], - "text-align-last"?: TextAlignLastProperty | TextAlignLastProperty[], - "text-combine-upright"?: TextCombineUprightProperty | TextCombineUprightProperty[], - "text-decoration-color"?: TextDecorationColorProperty | TextDecorationColorProperty[], - "text-decoration-line"?: TextDecorationLineProperty | TextDecorationLineProperty[], - "text-decoration-skip"?: TextDecorationSkipProperty | TextDecorationSkipProperty[], - "text-decoration-skip-ink"?: TextDecorationSkipInkProperty | TextDecorationSkipInkProperty[], - "text-decoration-style"?: TextDecorationStyleProperty | TextDecorationStyleProperty[], - "text-decoration-thickness"?: TextDecorationThicknessProperty<TLength> | TextDecorationThicknessProperty<TLength>[], - "text-emphasis-color"?: TextEmphasisColorProperty | TextEmphasisColorProperty[], - "text-emphasis-position"?: GlobalsString | GlobalsString[], - "text-emphasis-style"?: TextEmphasisStyleProperty | TextEmphasisStyleProperty[], - "text-indent"?: TextIndentProperty<TLength> | TextIndentProperty<TLength>[], - "text-justify"?: TextJustifyProperty | TextJustifyProperty[], - "text-orientation"?: TextOrientationProperty | TextOrientationProperty[], - "text-overflow"?: TextOverflowProperty | TextOverflowProperty[], - "text-rendering"?: TextRenderingProperty | TextRenderingProperty[], - "text-shadow"?: TextShadowProperty | TextShadowProperty[], - "text-size-adjust"?: TextSizeAdjustProperty | TextSizeAdjustProperty[], - "text-transform"?: TextTransformProperty | TextTransformProperty[], - "text-underline-offset"?: TextUnderlineOffsetProperty<TLength> | TextUnderlineOffsetProperty<TLength>[], - "text-underline-position"?: TextUnderlinePositionProperty | TextUnderlinePositionProperty[], - top?: TopProperty<TLength> | TopProperty<TLength>[], - "touch-action"?: TouchActionProperty | TouchActionProperty[], - transform?: TransformProperty | TransformProperty[], - "transform-box"?: TransformBoxProperty | TransformBoxProperty[], - "transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - "transform-style"?: TransformStyleProperty | TransformStyleProperty[], - "transition-delay"?: GlobalsString | GlobalsString[], - "transition-duration"?: GlobalsString | GlobalsString[], - "transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[], - "transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - translate?: TranslateProperty<TLength> | TranslateProperty<TLength>[], - "unicode-bidi"?: UnicodeBidiProperty | UnicodeBidiProperty[], - "user-select"?: UserSelectProperty | UserSelectProperty[], - "vertical-align"?: VerticalAlignProperty<TLength> | VerticalAlignProperty<TLength>[], - visibility?: VisibilityProperty | VisibilityProperty[], - "white-space"?: WhiteSpaceProperty | WhiteSpaceProperty[], - widows?: GlobalsNumber | GlobalsNumber[], - width?: WidthProperty<TLength> | WidthProperty<TLength>[], - "will-change"?: WillChangeProperty | WillChangeProperty[], - "word-break"?: WordBreakProperty | WordBreakProperty[], - "word-spacing"?: WordSpacingProperty<TLength> | WordSpacingProperty<TLength>[], - "word-wrap"?: WordWrapProperty | WordWrapProperty[], - "writing-mode"?: WritingModeProperty | WritingModeProperty[], - "z-index"?: ZIndexProperty | ZIndexProperty[], - zoom?: ZoomProperty | ZoomProperty[], -}; +export type PropertiesFallback<TLength = string | 0, TTime = string> = {| + ...StandardPropertiesFallback<TLength, TTime>, + ...VendorPropertiesFallback<TLength, TTime>, + ...ObsoletePropertiesFallback<TLength, TTime>, + ...SvgPropertiesFallback<TLength, TTime>, +|}; -export type StandardShorthandPropertiesHyphenFallback<TLength = string | 0> = { - all?: Globals | Globals[], - animation?: AnimationProperty | AnimationProperty[], - background?: BackgroundProperty<TLength> | BackgroundProperty<TLength>[], - "background-position"?: BackgroundPositionProperty<TLength> | BackgroundPositionProperty<TLength>[], - border?: BorderProperty<TLength> | BorderProperty<TLength>[], - "border-block"?: BorderBlockProperty<TLength> | BorderBlockProperty<TLength>[], - "border-block-end"?: BorderBlockEndProperty<TLength> | BorderBlockEndProperty<TLength>[], - "border-block-start"?: BorderBlockStartProperty<TLength> | BorderBlockStartProperty<TLength>[], - "border-bottom"?: BorderBottomProperty<TLength> | BorderBottomProperty<TLength>[], - "border-color"?: BorderColorProperty | BorderColorProperty[], - "border-image"?: BorderImageProperty | BorderImageProperty[], - "border-inline"?: BorderInlineProperty<TLength> | BorderInlineProperty<TLength>[], - "border-inline-end"?: BorderInlineEndProperty<TLength> | BorderInlineEndProperty<TLength>[], - "border-inline-start"?: BorderInlineStartProperty<TLength> | BorderInlineStartProperty<TLength>[], - "border-left"?: BorderLeftProperty<TLength> | BorderLeftProperty<TLength>[], - "border-radius"?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[], - "border-right"?: BorderRightProperty<TLength> | BorderRightProperty<TLength>[], - "border-style"?: BorderStyleProperty | BorderStyleProperty[], - "border-top"?: BorderTopProperty<TLength> | BorderTopProperty<TLength>[], - "border-width"?: BorderWidthProperty<TLength> | BorderWidthProperty<TLength>[], - "column-rule"?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[], - columns?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[], - flex?: FlexProperty<TLength> | FlexProperty<TLength>[], - "flex-flow"?: FlexFlowProperty | FlexFlowProperty[], - font?: FontProperty | FontProperty[], - gap?: GapProperty<TLength> | GapProperty<TLength>[], - grid?: GridProperty | GridProperty[], - "grid-area"?: GridAreaProperty | GridAreaProperty[], - "grid-column"?: GridColumnProperty | GridColumnProperty[], - "grid-row"?: GridRowProperty | GridRowProperty[], - "grid-template"?: GridTemplateProperty | GridTemplateProperty[], - "line-clamp"?: LineClampProperty | LineClampProperty[], - "list-style"?: ListStyleProperty | ListStyleProperty[], - margin?: MarginProperty<TLength> | MarginProperty<TLength>[], - mask?: MaskProperty<TLength> | MaskProperty<TLength>[], - "mask-border"?: MaskBorderProperty | MaskBorderProperty[], - motion?: OffsetProperty<TLength> | OffsetProperty<TLength>[], - offset?: OffsetProperty<TLength> | OffsetProperty<TLength>[], - outline?: OutlineProperty<TLength> | OutlineProperty<TLength>[], - overflow?: OverflowProperty | OverflowProperty[], - "overscroll-behavior"?: OverscrollBehaviorProperty | OverscrollBehaviorProperty[], - padding?: PaddingProperty<TLength> | PaddingProperty<TLength>[], - "place-items"?: PlaceItemsProperty | PlaceItemsProperty[], - "place-self"?: PlaceSelfProperty | PlaceSelfProperty[], - "text-decoration"?: TextDecorationProperty<TLength> | TextDecorationProperty<TLength>[], - "text-emphasis"?: TextEmphasisProperty | TextEmphasisProperty[], - transition?: TransitionProperty | TransitionProperty[], -}; +export type StandardLonghandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + "accent-color"?: Property$AccentColor | Array<Property$AccentColor>, + "align-content"?: Property$AlignContent | Array<Property$AlignContent>, + "align-items"?: Property$AlignItems | Array<Property$AlignItems>, + "align-self"?: Property$AlignSelf | Array<Property$AlignSelf>, + "align-tracks"?: Property$AlignTracks | Array<Property$AlignTracks>, + "animation-composition"?: Property$AnimationComposition | Array<Property$AnimationComposition>, + "animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + "animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, + "animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + "animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + "animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + "animation-name"?: Property$AnimationName | Array<Property$AnimationName>, + "animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + "animation-range-end"?: Property$AnimationRangeEnd<TLength> | Array<Property$AnimationRangeEnd<TLength>>, + "animation-range-start"?: Property$AnimationRangeStart<TLength> | Array<Property$AnimationRangeStart<TLength>>, + "animation-timeline"?: Property$AnimationTimeline | Array<Property$AnimationTimeline>, + "animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + appearance?: Property$Appearance | Array<Property$Appearance>, + "aspect-ratio"?: Property$AspectRatio | Array<Property$AspectRatio>, + "backdrop-filter"?: Property$BackdropFilter | Array<Property$BackdropFilter>, + "backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + "background-attachment"?: Property$BackgroundAttachment | Array<Property$BackgroundAttachment>, + "background-blend-mode"?: Property$BackgroundBlendMode | Array<Property$BackgroundBlendMode>, + "background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, + "background-color"?: Property$BackgroundColor | Array<Property$BackgroundColor>, + "background-image"?: Property$BackgroundImage | Array<Property$BackgroundImage>, + "background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + "background-position-x"?: Property$BackgroundPositionX<TLength> | Array<Property$BackgroundPositionX<TLength>>, + "background-position-y"?: Property$BackgroundPositionY<TLength> | Array<Property$BackgroundPositionY<TLength>>, + "background-repeat"?: Property$BackgroundRepeat | Array<Property$BackgroundRepeat>, + "background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + "block-overflow"?: Property$BlockOverflow | Array<Property$BlockOverflow>, + "block-size"?: Property$BlockSize<TLength> | Array<Property$BlockSize<TLength>>, + "border-block-color"?: Property$BorderBlockColor | Array<Property$BorderBlockColor>, + "border-block-end-color"?: Property$BorderBlockEndColor | Array<Property$BorderBlockEndColor>, + "border-block-end-style"?: Property$BorderBlockEndStyle | Array<Property$BorderBlockEndStyle>, + "border-block-end-width"?: Property$BorderBlockEndWidth<TLength> | Array<Property$BorderBlockEndWidth<TLength>>, + "border-block-start-color"?: Property$BorderBlockStartColor | Array<Property$BorderBlockStartColor>, + "border-block-start-style"?: Property$BorderBlockStartStyle | Array<Property$BorderBlockStartStyle>, + "border-block-start-width"?: Property$BorderBlockStartWidth<TLength> | Array<Property$BorderBlockStartWidth<TLength>>, + "border-block-style"?: Property$BorderBlockStyle | Array<Property$BorderBlockStyle>, + "border-block-width"?: Property$BorderBlockWidth<TLength> | Array<Property$BorderBlockWidth<TLength>>, + "border-bottom-color"?: Property$BorderBottomColor | Array<Property$BorderBottomColor>, + "border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + "border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + "border-bottom-style"?: Property$BorderBottomStyle | Array<Property$BorderBottomStyle>, + "border-bottom-width"?: Property$BorderBottomWidth<TLength> | Array<Property$BorderBottomWidth<TLength>>, + "border-collapse"?: Property$BorderCollapse | Array<Property$BorderCollapse>, + "border-end-end-radius"?: Property$BorderEndEndRadius<TLength> | Array<Property$BorderEndEndRadius<TLength>>, + "border-end-start-radius"?: Property$BorderEndStartRadius<TLength> | Array<Property$BorderEndStartRadius<TLength>>, + "border-image-outset"?: Property$BorderImageOutset<TLength> | Array<Property$BorderImageOutset<TLength>>, + "border-image-repeat"?: Property$BorderImageRepeat | Array<Property$BorderImageRepeat>, + "border-image-slice"?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, + "border-image-source"?: Property$BorderImageSource | Array<Property$BorderImageSource>, + "border-image-width"?: Property$BorderImageWidth<TLength> | Array<Property$BorderImageWidth<TLength>>, + "border-inline-color"?: Property$BorderInlineColor | Array<Property$BorderInlineColor>, + "border-inline-end-color"?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, + "border-inline-end-style"?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, + "border-inline-end-width"?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, + "border-inline-start-color"?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, + "border-inline-start-style"?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, + "border-inline-start-width"?: Property$BorderInlineStartWidth<TLength> | Array<Property$BorderInlineStartWidth<TLength>>, + "border-inline-style"?: Property$BorderInlineStyle | Array<Property$BorderInlineStyle>, + "border-inline-width"?: Property$BorderInlineWidth<TLength> | Array<Property$BorderInlineWidth<TLength>>, + "border-left-color"?: Property$BorderLeftColor | Array<Property$BorderLeftColor>, + "border-left-style"?: Property$BorderLeftStyle | Array<Property$BorderLeftStyle>, + "border-left-width"?: Property$BorderLeftWidth<TLength> | Array<Property$BorderLeftWidth<TLength>>, + "border-right-color"?: Property$BorderRightColor | Array<Property$BorderRightColor>, + "border-right-style"?: Property$BorderRightStyle | Array<Property$BorderRightStyle>, + "border-right-width"?: Property$BorderRightWidth<TLength> | Array<Property$BorderRightWidth<TLength>>, + "border-spacing"?: Property$BorderSpacing<TLength> | Array<Property$BorderSpacing<TLength>>, + "border-start-end-radius"?: Property$BorderStartEndRadius<TLength> | Array<Property$BorderStartEndRadius<TLength>>, + "border-start-start-radius"?: Property$BorderStartStartRadius<TLength> | Array<Property$BorderStartStartRadius<TLength>>, + "border-top-color"?: Property$BorderTopColor | Array<Property$BorderTopColor>, + "border-top-left-radius"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + "border-top-right-radius"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + "border-top-style"?: Property$BorderTopStyle | Array<Property$BorderTopStyle>, + "border-top-width"?: Property$BorderTopWidth<TLength> | Array<Property$BorderTopWidth<TLength>>, + bottom?: Property$Bottom<TLength> | Array<Property$Bottom<TLength>>, + "box-decoration-break"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + "box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, + "box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, + "break-after"?: Property$BreakAfter | Array<Property$BreakAfter>, + "break-before"?: Property$BreakBefore | Array<Property$BreakBefore>, + "break-inside"?: Property$BreakInside | Array<Property$BreakInside>, + "caption-side"?: Property$CaptionSide | Array<Property$CaptionSide>, + "caret-color"?: Property$CaretColor | Array<Property$CaretColor>, + "caret-shape"?: Property$CaretShape | Array<Property$CaretShape>, + clear?: Property$Clear | Array<Property$Clear>, + "clip-path"?: Property$ClipPath | Array<Property$ClipPath>, + color?: Property$Color | Array<Property$Color>, + "color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + "color-scheme"?: Property$ColorScheme | Array<Property$ColorScheme>, + "column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, + "column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, + "column-gap"?: Property$ColumnGap<TLength> | Array<Property$ColumnGap<TLength>>, + "column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + "column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + "column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + "column-span"?: Property$ColumnSpan | Array<Property$ColumnSpan>, + "column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + contain?: Property$Contain | Array<Property$Contain>, + "contain-intrinsic-block-size"?: Property$ContainIntrinsicBlockSize<TLength> | Array<Property$ContainIntrinsicBlockSize<TLength>>, + "contain-intrinsic-height"?: Property$ContainIntrinsicHeight<TLength> | Array<Property$ContainIntrinsicHeight<TLength>>, + "contain-intrinsic-inline-size"?: Property$ContainIntrinsicInlineSize<TLength> | Array<Property$ContainIntrinsicInlineSize<TLength>>, + "contain-intrinsic-width"?: Property$ContainIntrinsicWidth<TLength> | Array<Property$ContainIntrinsicWidth<TLength>>, + "container-name"?: Property$ContainerName | Array<Property$ContainerName>, + "container-type"?: Property$ContainerType | Array<Property$ContainerType>, + content?: Property$Content | Array<Property$Content>, + "content-visibility"?: Property$ContentVisibility | Array<Property$ContentVisibility>, + "counter-increment"?: Property$CounterIncrement | Array<Property$CounterIncrement>, + "counter-reset"?: Property$CounterReset | Array<Property$CounterReset>, + "counter-set"?: Property$CounterSet | Array<Property$CounterSet>, + cursor?: Property$Cursor | Array<Property$Cursor>, + direction?: Property$Direction | Array<Property$Direction>, + display?: Property$Display | Array<Property$Display>, + "empty-cells"?: Property$EmptyCells | Array<Property$EmptyCells>, + filter?: Property$Filter | Array<Property$Filter>, + "flex-basis"?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, + "flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, + "flex-grow"?: Property$FlexGrow | Array<Property$FlexGrow>, + "flex-shrink"?: Property$FlexShrink | Array<Property$FlexShrink>, + "flex-wrap"?: Property$FlexWrap | Array<Property$FlexWrap>, + float?: Property$Float | Array<Property$Float>, + "font-family"?: Property$FontFamily | Array<Property$FontFamily>, + "font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + "font-kerning"?: Property$FontKerning | Array<Property$FontKerning>, + "font-language-override"?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, + "font-optical-sizing"?: Property$FontOpticalSizing | Array<Property$FontOpticalSizing>, + "font-palette"?: Property$FontPalette | Array<Property$FontPalette>, + "font-size"?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, + "font-size-adjust"?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, + "font-smooth"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + "font-stretch"?: Property$FontStretch | Array<Property$FontStretch>, + "font-style"?: Property$FontStyle | Array<Property$FontStyle>, + "font-synthesis"?: Property$FontSynthesis | Array<Property$FontSynthesis>, + "font-synthesis-position"?: Property$FontSynthesisPosition | Array<Property$FontSynthesisPosition>, + "font-synthesis-small-caps"?: Property$FontSynthesisSmallCaps | Array<Property$FontSynthesisSmallCaps>, + "font-synthesis-style"?: Property$FontSynthesisStyle | Array<Property$FontSynthesisStyle>, + "font-synthesis-weight"?: Property$FontSynthesisWeight | Array<Property$FontSynthesisWeight>, + "font-variant"?: Property$FontVariant | Array<Property$FontVariant>, + "font-variant-alternates"?: Property$FontVariantAlternates | Array<Property$FontVariantAlternates>, + "font-variant-caps"?: Property$FontVariantCaps | Array<Property$FontVariantCaps>, + "font-variant-east-asian"?: Property$FontVariantEastAsian | Array<Property$FontVariantEastAsian>, + "font-variant-emoji"?: Property$FontVariantEmoji | Array<Property$FontVariantEmoji>, + "font-variant-ligatures"?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, + "font-variant-numeric"?: Property$FontVariantNumeric | Array<Property$FontVariantNumeric>, + "font-variant-position"?: Property$FontVariantPosition | Array<Property$FontVariantPosition>, + "font-variation-settings"?: Property$FontVariationSettings | Array<Property$FontVariationSettings>, + "font-weight"?: Property$FontWeight | Array<Property$FontWeight>, + "forced-color-adjust"?: Property$ForcedColorAdjust | Array<Property$ForcedColorAdjust>, + "grid-auto-columns"?: Property$GridAutoColumns<TLength> | Array<Property$GridAutoColumns<TLength>>, + "grid-auto-flow"?: Property$GridAutoFlow | Array<Property$GridAutoFlow>, + "grid-auto-rows"?: Property$GridAutoRows<TLength> | Array<Property$GridAutoRows<TLength>>, + "grid-column-end"?: Property$GridColumnEnd | Array<Property$GridColumnEnd>, + "grid-column-start"?: Property$GridColumnStart | Array<Property$GridColumnStart>, + "grid-row-end"?: Property$GridRowEnd | Array<Property$GridRowEnd>, + "grid-row-start"?: Property$GridRowStart | Array<Property$GridRowStart>, + "grid-template-areas"?: Property$GridTemplateAreas | Array<Property$GridTemplateAreas>, + "grid-template-columns"?: Property$GridTemplateColumns<TLength> | Array<Property$GridTemplateColumns<TLength>>, + "grid-template-rows"?: Property$GridTemplateRows<TLength> | Array<Property$GridTemplateRows<TLength>>, + "hanging-punctuation"?: Property$HangingPunctuation | Array<Property$HangingPunctuation>, + height?: Property$Height<TLength> | Array<Property$Height<TLength>>, + "hyphenate-character"?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, + "hyphenate-limit-chars"?: Property$HyphenateLimitChars | Array<Property$HyphenateLimitChars>, + hyphens?: Property$Hyphens | Array<Property$Hyphens>, + "image-orientation"?: Property$ImageOrientation | Array<Property$ImageOrientation>, + "image-rendering"?: Property$ImageRendering | Array<Property$ImageRendering>, + "image-resolution"?: Property$ImageResolution | Array<Property$ImageResolution>, + "initial-letter"?: Property$InitialLetter | Array<Property$InitialLetter>, + "inline-size"?: Property$InlineSize<TLength> | Array<Property$InlineSize<TLength>>, + "input-security"?: Property$InputSecurity | Array<Property$InputSecurity>, + "inset-block-end"?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, + "inset-block-start"?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, + "inset-inline-end"?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, + "inset-inline-start"?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, + isolation?: Property$Isolation | Array<Property$Isolation>, + "justify-content"?: Property$JustifyContent | Array<Property$JustifyContent>, + "justify-items"?: Property$JustifyItems | Array<Property$JustifyItems>, + "justify-self"?: Property$JustifySelf | Array<Property$JustifySelf>, + "justify-tracks"?: Property$JustifyTracks | Array<Property$JustifyTracks>, + left?: Property$Left<TLength> | Array<Property$Left<TLength>>, + "letter-spacing"?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, + "line-break"?: Property$LineBreak | Array<Property$LineBreak>, + "line-height"?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, + "line-height-step"?: Property$LineHeightStep<TLength> | Array<Property$LineHeightStep<TLength>>, + "list-style-image"?: Property$ListStyleImage | Array<Property$ListStyleImage>, + "list-style-position"?: Property$ListStylePosition | Array<Property$ListStylePosition>, + "list-style-type"?: Property$ListStyleType | Array<Property$ListStyleType>, + "margin-block-end"?: Property$MarginBlockEnd<TLength> | Array<Property$MarginBlockEnd<TLength>>, + "margin-block-start"?: Property$MarginBlockStart<TLength> | Array<Property$MarginBlockStart<TLength>>, + "margin-bottom"?: Property$MarginBottom<TLength> | Array<Property$MarginBottom<TLength>>, + "margin-inline-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + "margin-inline-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + "margin-left"?: Property$MarginLeft<TLength> | Array<Property$MarginLeft<TLength>>, + "margin-right"?: Property$MarginRight<TLength> | Array<Property$MarginRight<TLength>>, + "margin-top"?: Property$MarginTop<TLength> | Array<Property$MarginTop<TLength>>, + "margin-trim"?: Property$MarginTrim | Array<Property$MarginTrim>, + "mask-border-mode"?: Property$MaskBorderMode | Array<Property$MaskBorderMode>, + "mask-border-outset"?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, + "mask-border-repeat"?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, + "mask-border-slice"?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, + "mask-border-source"?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, + "mask-border-width"?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, + "mask-clip"?: Property$MaskClip | Array<Property$MaskClip>, + "mask-composite"?: Property$MaskComposite | Array<Property$MaskComposite>, + "mask-image"?: Property$MaskImage | Array<Property$MaskImage>, + "mask-mode"?: Property$MaskMode | Array<Property$MaskMode>, + "mask-origin"?: Property$MaskOrigin | Array<Property$MaskOrigin>, + "mask-position"?: Property$MaskPosition<TLength> | Array<Property$MaskPosition<TLength>>, + "mask-repeat"?: Property$MaskRepeat | Array<Property$MaskRepeat>, + "mask-size"?: Property$MaskSize<TLength> | Array<Property$MaskSize<TLength>>, + "mask-type"?: Property$MaskType | Array<Property$MaskType>, + "masonry-auto-flow"?: Property$MasonryAutoFlow | Array<Property$MasonryAutoFlow>, + "math-depth"?: Property$MathDepth | Array<Property$MathDepth>, + "math-shift"?: Property$MathShift | Array<Property$MathShift>, + "math-style"?: Property$MathStyle | Array<Property$MathStyle>, + "max-block-size"?: Property$MaxBlockSize<TLength> | Array<Property$MaxBlockSize<TLength>>, + "max-height"?: Property$MaxHeight<TLength> | Array<Property$MaxHeight<TLength>>, + "max-inline-size"?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, + "max-lines"?: Property$MaxLines | Array<Property$MaxLines>, + "max-width"?: Property$MaxWidth<TLength> | Array<Property$MaxWidth<TLength>>, + "min-block-size"?: Property$MinBlockSize<TLength> | Array<Property$MinBlockSize<TLength>>, + "min-height"?: Property$MinHeight<TLength> | Array<Property$MinHeight<TLength>>, + "min-inline-size"?: Property$MinInlineSize<TLength> | Array<Property$MinInlineSize<TLength>>, + "min-width"?: Property$MinWidth<TLength> | Array<Property$MinWidth<TLength>>, + "mix-blend-mode"?: Property$MixBlendMode | Array<Property$MixBlendMode>, + "motion-distance"?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, + "motion-path"?: Property$OffsetPath | Array<Property$OffsetPath>, + "motion-rotation"?: Property$OffsetRotate | Array<Property$OffsetRotate>, + "object-fit"?: Property$ObjectFit | Array<Property$ObjectFit>, + "object-position"?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, + "offset-anchor"?: Property$OffsetAnchor<TLength> | Array<Property$OffsetAnchor<TLength>>, + "offset-distance"?: Property$OffsetDistance<TLength> | Array<Property$OffsetDistance<TLength>>, + "offset-path"?: Property$OffsetPath | Array<Property$OffsetPath>, + "offset-position"?: Property$OffsetPosition<TLength> | Array<Property$OffsetPosition<TLength>>, + "offset-rotate"?: Property$OffsetRotate | Array<Property$OffsetRotate>, + "offset-rotation"?: Property$OffsetRotate | Array<Property$OffsetRotate>, + opacity?: Property$Opacity | Array<Property$Opacity>, + order?: Property$Order | Array<Property$Order>, + orphans?: Property$Orphans | Array<Property$Orphans>, + "outline-color"?: Property$OutlineColor | Array<Property$OutlineColor>, + "outline-offset"?: Property$OutlineOffset<TLength> | Array<Property$OutlineOffset<TLength>>, + "outline-style"?: Property$OutlineStyle | Array<Property$OutlineStyle>, + "outline-width"?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, + "overflow-anchor"?: Property$OverflowAnchor | Array<Property$OverflowAnchor>, + "overflow-block"?: Property$OverflowBlock | Array<Property$OverflowBlock>, + "overflow-clip-box"?: Property$OverflowClipBox | Array<Property$OverflowClipBox>, + "overflow-clip-margin"?: Property$OverflowClipMargin<TLength> | Array<Property$OverflowClipMargin<TLength>>, + "overflow-inline"?: Property$OverflowInline | Array<Property$OverflowInline>, + "overflow-wrap"?: Property$OverflowWrap | Array<Property$OverflowWrap>, + "overflow-x"?: Property$OverflowX | Array<Property$OverflowX>, + "overflow-y"?: Property$OverflowY | Array<Property$OverflowY>, + overlay?: Property$Overlay | Array<Property$Overlay>, + "overscroll-behavior-block"?: Property$OverscrollBehaviorBlock | Array<Property$OverscrollBehaviorBlock>, + "overscroll-behavior-inline"?: Property$OverscrollBehaviorInline | Array<Property$OverscrollBehaviorInline>, + "overscroll-behavior-x"?: Property$OverscrollBehaviorX | Array<Property$OverscrollBehaviorX>, + "overscroll-behavior-y"?: Property$OverscrollBehaviorY | Array<Property$OverscrollBehaviorY>, + "padding-block-end"?: Property$PaddingBlockEnd<TLength> | Array<Property$PaddingBlockEnd<TLength>>, + "padding-block-start"?: Property$PaddingBlockStart<TLength> | Array<Property$PaddingBlockStart<TLength>>, + "padding-bottom"?: Property$PaddingBottom<TLength> | Array<Property$PaddingBottom<TLength>>, + "padding-inline-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + "padding-inline-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + "padding-left"?: Property$PaddingLeft<TLength> | Array<Property$PaddingLeft<TLength>>, + "padding-right"?: Property$PaddingRight<TLength> | Array<Property$PaddingRight<TLength>>, + "padding-top"?: Property$PaddingTop<TLength> | Array<Property$PaddingTop<TLength>>, + page?: Property$Page | Array<Property$Page>, + "page-break-after"?: Property$PageBreakAfter | Array<Property$PageBreakAfter>, + "page-break-before"?: Property$PageBreakBefore | Array<Property$PageBreakBefore>, + "page-break-inside"?: Property$PageBreakInside | Array<Property$PageBreakInside>, + "paint-order"?: Property$PaintOrder | Array<Property$PaintOrder>, + perspective?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + "perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + "pointer-events"?: Property$PointerEvents | Array<Property$PointerEvents>, + position?: Property$Position | Array<Property$Position>, + "print-color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + quotes?: Property$Quotes | Array<Property$Quotes>, + resize?: Property$Resize | Array<Property$Resize>, + right?: Property$Right<TLength> | Array<Property$Right<TLength>>, + rotate?: Property$Rotate | Array<Property$Rotate>, + "row-gap"?: Property$RowGap<TLength> | Array<Property$RowGap<TLength>>, + "ruby-align"?: Property$RubyAlign | Array<Property$RubyAlign>, + "ruby-merge"?: Property$RubyMerge | Array<Property$RubyMerge>, + "ruby-position"?: Property$RubyPosition | Array<Property$RubyPosition>, + scale?: Property$Scale | Array<Property$Scale>, + "scroll-behavior"?: Property$ScrollBehavior | Array<Property$ScrollBehavior>, + "scroll-margin-block-end"?: Property$ScrollMarginBlockEnd<TLength> | Array<Property$ScrollMarginBlockEnd<TLength>>, + "scroll-margin-block-start"?: Property$ScrollMarginBlockStart<TLength> | Array<Property$ScrollMarginBlockStart<TLength>>, + "scroll-margin-bottom"?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, + "scroll-margin-inline-end"?: Property$ScrollMarginInlineEnd<TLength> | Array<Property$ScrollMarginInlineEnd<TLength>>, + "scroll-margin-inline-start"?: Property$ScrollMarginInlineStart<TLength> | Array<Property$ScrollMarginInlineStart<TLength>>, + "scroll-margin-left"?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, + "scroll-margin-right"?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, + "scroll-margin-top"?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, + "scroll-padding-block-end"?: Property$ScrollPaddingBlockEnd<TLength> | Array<Property$ScrollPaddingBlockEnd<TLength>>, + "scroll-padding-block-start"?: Property$ScrollPaddingBlockStart<TLength> | Array<Property$ScrollPaddingBlockStart<TLength>>, + "scroll-padding-bottom"?: Property$ScrollPaddingBottom<TLength> | Array<Property$ScrollPaddingBottom<TLength>>, + "scroll-padding-inline-end"?: Property$ScrollPaddingInlineEnd<TLength> | Array<Property$ScrollPaddingInlineEnd<TLength>>, + "scroll-padding-inline-start"?: Property$ScrollPaddingInlineStart<TLength> | Array<Property$ScrollPaddingInlineStart<TLength>>, + "scroll-padding-left"?: Property$ScrollPaddingLeft<TLength> | Array<Property$ScrollPaddingLeft<TLength>>, + "scroll-padding-right"?: Property$ScrollPaddingRight<TLength> | Array<Property$ScrollPaddingRight<TLength>>, + "scroll-padding-top"?: Property$ScrollPaddingTop<TLength> | Array<Property$ScrollPaddingTop<TLength>>, + "scroll-snap-align"?: Property$ScrollSnapAlign | Array<Property$ScrollSnapAlign>, + "scroll-snap-margin-bottom"?: Property$ScrollMarginBottom<TLength> | Array<Property$ScrollMarginBottom<TLength>>, + "scroll-snap-margin-left"?: Property$ScrollMarginLeft<TLength> | Array<Property$ScrollMarginLeft<TLength>>, + "scroll-snap-margin-right"?: Property$ScrollMarginRight<TLength> | Array<Property$ScrollMarginRight<TLength>>, + "scroll-snap-margin-top"?: Property$ScrollMarginTop<TLength> | Array<Property$ScrollMarginTop<TLength>>, + "scroll-snap-stop"?: Property$ScrollSnapStop | Array<Property$ScrollSnapStop>, + "scroll-snap-type"?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, + "scroll-timeline-axis"?: Property$ScrollTimelineAxis | Array<Property$ScrollTimelineAxis>, + "scroll-timeline-name"?: Property$ScrollTimelineName | Array<Property$ScrollTimelineName>, + "scrollbar-color"?: Property$ScrollbarColor | Array<Property$ScrollbarColor>, + "scrollbar-gutter"?: Property$ScrollbarGutter | Array<Property$ScrollbarGutter>, + "scrollbar-width"?: Property$ScrollbarWidth | Array<Property$ScrollbarWidth>, + "shape-image-threshold"?: Property$ShapeImageThreshold | Array<Property$ShapeImageThreshold>, + "shape-margin"?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, + "shape-outside"?: Property$ShapeOutside | Array<Property$ShapeOutside>, + "tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + "table-layout"?: Property$TableLayout | Array<Property$TableLayout>, + "text-align"?: Property$TextAlign | Array<Property$TextAlign>, + "text-align-last"?: Property$TextAlignLast | Array<Property$TextAlignLast>, + "text-combine-upright"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + "text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + "text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + "text-decoration-skip"?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, + "text-decoration-skip-ink"?: Property$TextDecorationSkipInk | Array<Property$TextDecorationSkipInk>, + "text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + "text-decoration-thickness"?: Property$TextDecorationThickness<TLength> | Array<Property$TextDecorationThickness<TLength>>, + "text-emphasis-color"?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, + "text-emphasis-position"?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, + "text-emphasis-style"?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, + "text-indent"?: Property$TextIndent<TLength> | Array<Property$TextIndent<TLength>>, + "text-justify"?: Property$TextJustify | Array<Property$TextJustify>, + "text-orientation"?: Property$TextOrientation | Array<Property$TextOrientation>, + "text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, + "text-rendering"?: Property$TextRendering | Array<Property$TextRendering>, + "text-shadow"?: Property$TextShadow | Array<Property$TextShadow>, + "text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + "text-transform"?: Property$TextTransform | Array<Property$TextTransform>, + "text-underline-offset"?: Property$TextUnderlineOffset<TLength> | Array<Property$TextUnderlineOffset<TLength>>, + "text-underline-position"?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, + "text-wrap"?: Property$TextWrap | Array<Property$TextWrap>, + "timeline-scope"?: Property$TimelineScope | Array<Property$TimelineScope>, + top?: Property$Top<TLength> | Array<Property$Top<TLength>>, + "touch-action"?: Property$TouchAction | Array<Property$TouchAction>, + transform?: Property$Transform | Array<Property$Transform>, + "transform-box"?: Property$TransformBox | Array<Property$TransformBox>, + "transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, + "transition-behavior"?: Property$TransitionBehavior | Array<Property$TransitionBehavior>, + "transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + translate?: Property$Translate<TLength> | Array<Property$Translate<TLength>>, + "unicode-bidi"?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, + "user-select"?: Property$UserSelect | Array<Property$UserSelect>, + "vertical-align"?: Property$VerticalAlign<TLength> | Array<Property$VerticalAlign<TLength>>, + "view-timeline-axis"?: Property$ViewTimelineAxis | Array<Property$ViewTimelineAxis>, + "view-timeline-inset"?: Property$ViewTimelineInset<TLength> | Array<Property$ViewTimelineInset<TLength>>, + "view-timeline-name"?: Property$ViewTimelineName | Array<Property$ViewTimelineName>, + "view-transition-name"?: Property$ViewTransitionName | Array<Property$ViewTransitionName>, + visibility?: Property$Visibility | Array<Property$Visibility>, + "white-space"?: Property$WhiteSpace | Array<Property$WhiteSpace>, + "white-space-collapse"?: Property$WhiteSpaceCollapse | Array<Property$WhiteSpaceCollapse>, + "white-space-trim"?: Property$WhiteSpaceTrim | Array<Property$WhiteSpaceTrim>, + widows?: Property$Widows | Array<Property$Widows>, + width?: Property$Width<TLength> | Array<Property$Width<TLength>>, + "will-change"?: Property$WillChange | Array<Property$WillChange>, + "word-break"?: Property$WordBreak | Array<Property$WordBreak>, + "word-spacing"?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, + "word-wrap"?: Property$WordWrap | Array<Property$WordWrap>, + "writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, + "z-index"?: Property$ZIndex | Array<Property$ZIndex>, + zoom?: Property$Zoom | Array<Property$Zoom>, +|}; -export type StandardPropertiesHyphenFallback<TLength = string | 0> = StandardLonghandPropertiesHyphenFallback<TLength> & StandardShorthandPropertiesHyphenFallback<TLength>; +export type StandardShorthandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + all?: Property$All | Array<Property$All>, + animation?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + "animation-range"?: Property$AnimationRange<TLength> | Array<Property$AnimationRange<TLength>>, + background?: Property$Background<TLength> | Array<Property$Background<TLength>>, + "background-position"?: Property$BackgroundPosition<TLength> | Array<Property$BackgroundPosition<TLength>>, + border?: Property$Border<TLength> | Array<Property$Border<TLength>>, + "border-block"?: Property$BorderBlock<TLength> | Array<Property$BorderBlock<TLength>>, + "border-block-end"?: Property$BorderBlockEnd<TLength> | Array<Property$BorderBlockEnd<TLength>>, + "border-block-start"?: Property$BorderBlockStart<TLength> | Array<Property$BorderBlockStart<TLength>>, + "border-bottom"?: Property$BorderBottom<TLength> | Array<Property$BorderBottom<TLength>>, + "border-color"?: Property$BorderColor | Array<Property$BorderColor>, + "border-image"?: Property$BorderImage | Array<Property$BorderImage>, + "border-inline"?: Property$BorderInline<TLength> | Array<Property$BorderInline<TLength>>, + "border-inline-end"?: Property$BorderInlineEnd<TLength> | Array<Property$BorderInlineEnd<TLength>>, + "border-inline-start"?: Property$BorderInlineStart<TLength> | Array<Property$BorderInlineStart<TLength>>, + "border-left"?: Property$BorderLeft<TLength> | Array<Property$BorderLeft<TLength>>, + "border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + "border-right"?: Property$BorderRight<TLength> | Array<Property$BorderRight<TLength>>, + "border-style"?: Property$BorderStyle | Array<Property$BorderStyle>, + "border-top"?: Property$BorderTop<TLength> | Array<Property$BorderTop<TLength>>, + "border-width"?: Property$BorderWidth<TLength> | Array<Property$BorderWidth<TLength>>, + caret?: Property$Caret | Array<Property$Caret>, + "column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + columns?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + "contain-intrinsic-size"?: Property$ContainIntrinsicSize<TLength> | Array<Property$ContainIntrinsicSize<TLength>>, + container?: Property$Container | Array<Property$Container>, + flex?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + "flex-flow"?: Property$FlexFlow | Array<Property$FlexFlow>, + font?: Property$Font | Array<Property$Font>, + gap?: Property$Gap<TLength> | Array<Property$Gap<TLength>>, + grid?: Property$Grid | Array<Property$Grid>, + "grid-area"?: Property$GridArea | Array<Property$GridArea>, + "grid-column"?: Property$GridColumn | Array<Property$GridColumn>, + "grid-row"?: Property$GridRow | Array<Property$GridRow>, + "grid-template"?: Property$GridTemplate | Array<Property$GridTemplate>, + inset?: Property$Inset<TLength> | Array<Property$Inset<TLength>>, + "inset-block"?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, + "inset-inline"?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, + "line-clamp"?: Property$LineClamp | Array<Property$LineClamp>, + "list-style"?: Property$ListStyle | Array<Property$ListStyle>, + margin?: Property$Margin<TLength> | Array<Property$Margin<TLength>>, + "margin-block"?: Property$MarginBlock<TLength> | Array<Property$MarginBlock<TLength>>, + "margin-inline"?: Property$MarginInline<TLength> | Array<Property$MarginInline<TLength>>, + mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, + "mask-border"?: Property$MaskBorder | Array<Property$MaskBorder>, + motion?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, + offset?: Property$Offset<TLength> | Array<Property$Offset<TLength>>, + outline?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, + overflow?: Property$Overflow | Array<Property$Overflow>, + "overscroll-behavior"?: Property$OverscrollBehavior | Array<Property$OverscrollBehavior>, + padding?: Property$Padding<TLength> | Array<Property$Padding<TLength>>, + "padding-block"?: Property$PaddingBlock<TLength> | Array<Property$PaddingBlock<TLength>>, + "padding-inline"?: Property$PaddingInline<TLength> | Array<Property$PaddingInline<TLength>>, + "place-content"?: Property$PlaceContent | Array<Property$PlaceContent>, + "place-items"?: Property$PlaceItems | Array<Property$PlaceItems>, + "place-self"?: Property$PlaceSelf | Array<Property$PlaceSelf>, + "scroll-margin"?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, + "scroll-margin-block"?: Property$ScrollMarginBlock<TLength> | Array<Property$ScrollMarginBlock<TLength>>, + "scroll-margin-inline"?: Property$ScrollMarginInline<TLength> | Array<Property$ScrollMarginInline<TLength>>, + "scroll-padding"?: Property$ScrollPadding<TLength> | Array<Property$ScrollPadding<TLength>>, + "scroll-padding-block"?: Property$ScrollPaddingBlock<TLength> | Array<Property$ScrollPaddingBlock<TLength>>, + "scroll-padding-inline"?: Property$ScrollPaddingInline<TLength> | Array<Property$ScrollPaddingInline<TLength>>, + "scroll-snap-margin"?: Property$ScrollMargin<TLength> | Array<Property$ScrollMargin<TLength>>, + "scroll-timeline"?: Property$ScrollTimeline | Array<Property$ScrollTimeline>, + "text-decoration"?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, + "text-emphasis"?: Property$TextEmphasis | Array<Property$TextEmphasis>, + transition?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + "view-timeline"?: Property$ViewTimeline | Array<Property$ViewTimeline>, +|}; -export type VendorLonghandPropertiesHyphenFallback<TLength = string | 0> = { - "-moz-animation-delay"?: GlobalsString | GlobalsString[], - "-moz-animation-direction"?: AnimationDirectionProperty | AnimationDirectionProperty[], - "-moz-animation-duration"?: GlobalsString | GlobalsString[], - "-moz-animation-fill-mode"?: AnimationFillModeProperty | AnimationFillModeProperty[], - "-moz-animation-iteration-count"?: AnimationIterationCountProperty | AnimationIterationCountProperty[], - "-moz-animation-name"?: AnimationNameProperty | AnimationNameProperty[], - "-moz-animation-play-state"?: AnimationPlayStateProperty | AnimationPlayStateProperty[], - "-moz-animation-timing-function"?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[], - "-moz-appearance"?: MozAppearanceProperty | MozAppearanceProperty[], - "-moz-backface-visibility"?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[], - "-moz-border-bottom-colors"?: MozBorderBottomColorsProperty | MozBorderBottomColorsProperty[], - "-moz-border-end-color"?: BorderInlineEndColorProperty | BorderInlineEndColorProperty[], - "-moz-border-end-style"?: BorderInlineEndStyleProperty | BorderInlineEndStyleProperty[], - "-moz-border-end-width"?: BorderInlineEndWidthProperty<TLength> | BorderInlineEndWidthProperty<TLength>[], - "-moz-border-left-colors"?: MozBorderLeftColorsProperty | MozBorderLeftColorsProperty[], - "-moz-border-right-colors"?: MozBorderRightColorsProperty | MozBorderRightColorsProperty[], - "-moz-border-start-color"?: BorderInlineStartColorProperty | BorderInlineStartColorProperty[], - "-moz-border-start-style"?: BorderInlineStartStyleProperty | BorderInlineStartStyleProperty[], - "-moz-border-top-colors"?: MozBorderTopColorsProperty | MozBorderTopColorsProperty[], - "-moz-box-sizing"?: BoxSizingProperty | BoxSizingProperty[], - "-moz-column-count"?: ColumnCountProperty | ColumnCountProperty[], - "-moz-column-fill"?: ColumnFillProperty | ColumnFillProperty[], - "-moz-column-rule-color"?: ColumnRuleColorProperty | ColumnRuleColorProperty[], - "-moz-column-rule-style"?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[], - "-moz-column-rule-width"?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[], - "-moz-column-width"?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[], - "-moz-context-properties"?: MozContextPropertiesProperty | MozContextPropertiesProperty[], - "-moz-font-feature-settings"?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[], - "-moz-font-language-override"?: FontLanguageOverrideProperty | FontLanguageOverrideProperty[], - "-moz-hyphens"?: HyphensProperty | HyphensProperty[], - "-moz-image-region"?: MozImageRegionProperty | MozImageRegionProperty[], - "-moz-margin-end"?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[], - "-moz-margin-start"?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[], - "-moz-orient"?: MozOrientProperty | MozOrientProperty[], - "-moz-osx-font-smoothing"?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[], - "-moz-padding-end"?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[], - "-moz-padding-start"?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[], - "-moz-perspective"?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[], - "-moz-perspective-origin"?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[], - "-moz-stack-sizing"?: MozStackSizingProperty | MozStackSizingProperty[], - "-moz-tab-size"?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[], - "-moz-text-blink"?: MozTextBlinkProperty | MozTextBlinkProperty[], - "-moz-text-size-adjust"?: TextSizeAdjustProperty | TextSizeAdjustProperty[], - "-moz-transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - "-moz-transform-style"?: TransformStyleProperty | TransformStyleProperty[], - "-moz-transition-delay"?: GlobalsString | GlobalsString[], - "-moz-transition-duration"?: GlobalsString | GlobalsString[], - "-moz-transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[], - "-moz-transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - "-moz-user-focus"?: MozUserFocusProperty | MozUserFocusProperty[], - "-moz-user-modify"?: MozUserModifyProperty | MozUserModifyProperty[], - "-moz-user-select"?: UserSelectProperty | UserSelectProperty[], - "-moz-window-dragging"?: MozWindowDraggingProperty | MozWindowDraggingProperty[], - "-moz-window-shadow"?: MozWindowShadowProperty | MozWindowShadowProperty[], - "-ms-accelerator"?: MsAcceleratorProperty | MsAcceleratorProperty[], - "-ms-block-progression"?: MsBlockProgressionProperty | MsBlockProgressionProperty[], - "-ms-content-zoom-chaining"?: MsContentZoomChainingProperty | MsContentZoomChainingProperty[], - "-ms-content-zoom-limit-max"?: GlobalsString | GlobalsString[], - "-ms-content-zoom-limit-min"?: GlobalsString | GlobalsString[], - "-ms-content-zoom-snap-points"?: GlobalsString | GlobalsString[], - "-ms-content-zoom-snap-type"?: MsContentZoomSnapTypeProperty | MsContentZoomSnapTypeProperty[], - "-ms-content-zooming"?: MsContentZoomingProperty | MsContentZoomingProperty[], - "-ms-filter"?: GlobalsString | GlobalsString[], - "-ms-flex-direction"?: FlexDirectionProperty | FlexDirectionProperty[], - "-ms-flex-positive"?: GlobalsNumber | GlobalsNumber[], - "-ms-flow-from"?: MsFlowFromProperty | MsFlowFromProperty[], - "-ms-flow-into"?: MsFlowIntoProperty | MsFlowIntoProperty[], - "-ms-grid-columns"?: MsGridColumnsProperty<TLength> | MsGridColumnsProperty<TLength>[], - "-ms-grid-rows"?: MsGridRowsProperty<TLength> | MsGridRowsProperty<TLength>[], - "-ms-high-contrast-adjust"?: MsHighContrastAdjustProperty | MsHighContrastAdjustProperty[], - "-ms-hyphenate-limit-chars"?: MsHyphenateLimitCharsProperty | MsHyphenateLimitCharsProperty[], - "-ms-hyphenate-limit-lines"?: MsHyphenateLimitLinesProperty | MsHyphenateLimitLinesProperty[], - "-ms-hyphenate-limit-zone"?: MsHyphenateLimitZoneProperty<TLength> | MsHyphenateLimitZoneProperty<TLength>[], - "-ms-hyphens"?: HyphensProperty | HyphensProperty[], - "-ms-ime-align"?: MsImeAlignProperty | MsImeAlignProperty[], - "-ms-line-break"?: LineBreakProperty | LineBreakProperty[], - "-ms-order"?: GlobalsNumber | GlobalsNumber[], - "-ms-overflow-style"?: MsOverflowStyleProperty | MsOverflowStyleProperty[], - "-ms-overflow-x"?: OverflowXProperty | OverflowXProperty[], - "-ms-overflow-y"?: OverflowYProperty | OverflowYProperty[], - "-ms-scroll-chaining"?: MsScrollChainingProperty | MsScrollChainingProperty[], - "-ms-scroll-limit-x-max"?: MsScrollLimitXMaxProperty<TLength> | MsScrollLimitXMaxProperty<TLength>[], - "-ms-scroll-limit-x-min"?: MsScrollLimitXMinProperty<TLength> | MsScrollLimitXMinProperty<TLength>[], - "-ms-scroll-limit-y-max"?: MsScrollLimitYMaxProperty<TLength> | MsScrollLimitYMaxProperty<TLength>[], - "-ms-scroll-limit-y-min"?: MsScrollLimitYMinProperty<TLength> | MsScrollLimitYMinProperty<TLength>[], - "-ms-scroll-rails"?: MsScrollRailsProperty | MsScrollRailsProperty[], - "-ms-scroll-snap-points-x"?: GlobalsString | GlobalsString[], - "-ms-scroll-snap-points-y"?: GlobalsString | GlobalsString[], - "-ms-scroll-snap-type"?: MsScrollSnapTypeProperty | MsScrollSnapTypeProperty[], - "-ms-scroll-translation"?: MsScrollTranslationProperty | MsScrollTranslationProperty[], - "-ms-scrollbar-3dlight-color"?: MsScrollbar3dlightColorProperty | MsScrollbar3dlightColorProperty[], - "-ms-scrollbar-arrow-color"?: MsScrollbarArrowColorProperty | MsScrollbarArrowColorProperty[], - "-ms-scrollbar-base-color"?: MsScrollbarBaseColorProperty | MsScrollbarBaseColorProperty[], - "-ms-scrollbar-darkshadow-color"?: MsScrollbarDarkshadowColorProperty | MsScrollbarDarkshadowColorProperty[], - "-ms-scrollbar-face-color"?: MsScrollbarFaceColorProperty | MsScrollbarFaceColorProperty[], - "-ms-scrollbar-highlight-color"?: MsScrollbarHighlightColorProperty | MsScrollbarHighlightColorProperty[], - "-ms-scrollbar-shadow-color"?: MsScrollbarShadowColorProperty | MsScrollbarShadowColorProperty[], - "-ms-scrollbar-track-color"?: MsScrollbarTrackColorProperty | MsScrollbarTrackColorProperty[], - "-ms-text-autospace"?: MsTextAutospaceProperty | MsTextAutospaceProperty[], - "-ms-text-combine-horizontal"?: TextCombineUprightProperty | TextCombineUprightProperty[], - "-ms-text-overflow"?: TextOverflowProperty | TextOverflowProperty[], - "-ms-touch-action"?: TouchActionProperty | TouchActionProperty[], - "-ms-touch-select"?: MsTouchSelectProperty | MsTouchSelectProperty[], - "-ms-transform"?: TransformProperty | TransformProperty[], - "-ms-transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - "-ms-transition-delay"?: GlobalsString | GlobalsString[], - "-ms-transition-duration"?: GlobalsString | GlobalsString[], - "-ms-transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[], - "-ms-transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - "-ms-user-select"?: MsUserSelectProperty | MsUserSelectProperty[], - "-ms-word-break"?: WordBreakProperty | WordBreakProperty[], - "-ms-wrap-flow"?: MsWrapFlowProperty | MsWrapFlowProperty[], - "-ms-wrap-margin"?: MsWrapMarginProperty<TLength> | MsWrapMarginProperty<TLength>[], - "-ms-wrap-through"?: MsWrapThroughProperty | MsWrapThroughProperty[], - "-ms-writing-mode"?: WritingModeProperty | WritingModeProperty[], - "-webkit-align-content"?: AlignContentProperty | AlignContentProperty[], - "-webkit-align-items"?: AlignItemsProperty | AlignItemsProperty[], - "-webkit-align-self"?: AlignSelfProperty | AlignSelfProperty[], - "-webkit-animation-delay"?: GlobalsString | GlobalsString[], - "-webkit-animation-direction"?: AnimationDirectionProperty | AnimationDirectionProperty[], - "-webkit-animation-duration"?: GlobalsString | GlobalsString[], - "-webkit-animation-fill-mode"?: AnimationFillModeProperty | AnimationFillModeProperty[], - "-webkit-animation-iteration-count"?: AnimationIterationCountProperty | AnimationIterationCountProperty[], - "-webkit-animation-name"?: AnimationNameProperty | AnimationNameProperty[], - "-webkit-animation-play-state"?: AnimationPlayStateProperty | AnimationPlayStateProperty[], - "-webkit-animation-timing-function"?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[], - "-webkit-appearance"?: WebkitAppearanceProperty | WebkitAppearanceProperty[], - "-webkit-backdrop-filter"?: BackdropFilterProperty | BackdropFilterProperty[], - "-webkit-backface-visibility"?: BackfaceVisibilityProperty | BackfaceVisibilityProperty[], - "-webkit-background-clip"?: BackgroundClipProperty | BackgroundClipProperty[], - "-webkit-background-origin"?: BackgroundOriginProperty | BackgroundOriginProperty[], - "-webkit-background-size"?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[], - "-webkit-border-before-color"?: WebkitBorderBeforeColorProperty | WebkitBorderBeforeColorProperty[], - "-webkit-border-before-style"?: WebkitBorderBeforeStyleProperty | WebkitBorderBeforeStyleProperty[], - "-webkit-border-before-width"?: WebkitBorderBeforeWidthProperty<TLength> | WebkitBorderBeforeWidthProperty<TLength>[], - "-webkit-border-bottom-left-radius"?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[], - "-webkit-border-bottom-right-radius"?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[], - "-webkit-border-image-slice"?: BorderImageSliceProperty | BorderImageSliceProperty[], - "-webkit-border-top-left-radius"?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[], - "-webkit-border-top-right-radius"?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[], - "-webkit-box-decoration-break"?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[], - "-webkit-box-reflect"?: WebkitBoxReflectProperty<TLength> | WebkitBoxReflectProperty<TLength>[], - "-webkit-box-shadow"?: BoxShadowProperty | BoxShadowProperty[], - "-webkit-box-sizing"?: BoxSizingProperty | BoxSizingProperty[], - "-webkit-clip-path"?: ClipPathProperty | ClipPathProperty[], - "-webkit-column-count"?: ColumnCountProperty | ColumnCountProperty[], - "-webkit-column-fill"?: ColumnFillProperty | ColumnFillProperty[], - "-webkit-column-rule-color"?: ColumnRuleColorProperty | ColumnRuleColorProperty[], - "-webkit-column-rule-style"?: ColumnRuleStyleProperty | ColumnRuleStyleProperty[], - "-webkit-column-rule-width"?: ColumnRuleWidthProperty<TLength> | ColumnRuleWidthProperty<TLength>[], - "-webkit-column-span"?: ColumnSpanProperty | ColumnSpanProperty[], - "-webkit-column-width"?: ColumnWidthProperty<TLength> | ColumnWidthProperty<TLength>[], - "-webkit-filter"?: FilterProperty | FilterProperty[], - "-webkit-flex-basis"?: FlexBasisProperty<TLength> | FlexBasisProperty<TLength>[], - "-webkit-flex-direction"?: FlexDirectionProperty | FlexDirectionProperty[], - "-webkit-flex-grow"?: GlobalsNumber | GlobalsNumber[], - "-webkit-flex-shrink"?: GlobalsNumber | GlobalsNumber[], - "-webkit-flex-wrap"?: FlexWrapProperty | FlexWrapProperty[], - "-webkit-font-feature-settings"?: FontFeatureSettingsProperty | FontFeatureSettingsProperty[], - "-webkit-font-kerning"?: FontKerningProperty | FontKerningProperty[], - "-webkit-font-smoothing"?: FontSmoothProperty<TLength> | FontSmoothProperty<TLength>[], - "-webkit-font-variant-ligatures"?: FontVariantLigaturesProperty | FontVariantLigaturesProperty[], - "-webkit-hyphenate-character"?: HyphenateCharacterProperty | HyphenateCharacterProperty[], - "-webkit-hyphens"?: HyphensProperty | HyphensProperty[], - "-webkit-initial-letter"?: InitialLetterProperty | InitialLetterProperty[], - "-webkit-justify-content"?: JustifyContentProperty | JustifyContentProperty[], - "-webkit-line-break"?: LineBreakProperty | LineBreakProperty[], - "-webkit-line-clamp"?: WebkitLineClampProperty | WebkitLineClampProperty[], - "-webkit-margin-end"?: MarginInlineEndProperty<TLength> | MarginInlineEndProperty<TLength>[], - "-webkit-margin-start"?: MarginInlineStartProperty<TLength> | MarginInlineStartProperty<TLength>[], - "-webkit-mask-attachment"?: WebkitMaskAttachmentProperty | WebkitMaskAttachmentProperty[], - "-webkit-mask-box-image-outset"?: MaskBorderOutsetProperty<TLength> | MaskBorderOutsetProperty<TLength>[], - "-webkit-mask-box-image-repeat"?: MaskBorderRepeatProperty | MaskBorderRepeatProperty[], - "-webkit-mask-box-image-slice"?: MaskBorderSliceProperty | MaskBorderSliceProperty[], - "-webkit-mask-box-image-source"?: MaskBorderSourceProperty | MaskBorderSourceProperty[], - "-webkit-mask-box-image-width"?: MaskBorderWidthProperty<TLength> | MaskBorderWidthProperty<TLength>[], - "-webkit-mask-clip"?: WebkitMaskClipProperty | WebkitMaskClipProperty[], - "-webkit-mask-composite"?: WebkitMaskCompositeProperty | WebkitMaskCompositeProperty[], - "-webkit-mask-image"?: WebkitMaskImageProperty | WebkitMaskImageProperty[], - "-webkit-mask-origin"?: WebkitMaskOriginProperty | WebkitMaskOriginProperty[], - "-webkit-mask-position"?: WebkitMaskPositionProperty<TLength> | WebkitMaskPositionProperty<TLength>[], - "-webkit-mask-position-x"?: WebkitMaskPositionXProperty<TLength> | WebkitMaskPositionXProperty<TLength>[], - "-webkit-mask-position-y"?: WebkitMaskPositionYProperty<TLength> | WebkitMaskPositionYProperty<TLength>[], - "-webkit-mask-repeat"?: WebkitMaskRepeatProperty | WebkitMaskRepeatProperty[], - "-webkit-mask-repeat-x"?: WebkitMaskRepeatXProperty | WebkitMaskRepeatXProperty[], - "-webkit-mask-repeat-y"?: WebkitMaskRepeatYProperty | WebkitMaskRepeatYProperty[], - "-webkit-mask-size"?: WebkitMaskSizeProperty<TLength> | WebkitMaskSizeProperty<TLength>[], - "-webkit-max-inline-size"?: MaxInlineSizeProperty<TLength> | MaxInlineSizeProperty<TLength>[], - "-webkit-order"?: GlobalsNumber | GlobalsNumber[], - "-webkit-overflow-scrolling"?: WebkitOverflowScrollingProperty | WebkitOverflowScrollingProperty[], - "-webkit-padding-end"?: PaddingInlineEndProperty<TLength> | PaddingInlineEndProperty<TLength>[], - "-webkit-padding-start"?: PaddingInlineStartProperty<TLength> | PaddingInlineStartProperty<TLength>[], - "-webkit-perspective"?: PerspectiveProperty<TLength> | PerspectiveProperty<TLength>[], - "-webkit-perspective-origin"?: PerspectiveOriginProperty<TLength> | PerspectiveOriginProperty<TLength>[], - "-webkit-print-color-adjust"?: PrintColorAdjustProperty | PrintColorAdjustProperty[], - "-webkit-ruby-position"?: RubyPositionProperty | RubyPositionProperty[], - "-webkit-scroll-snap-type"?: ScrollSnapTypeProperty | ScrollSnapTypeProperty[], - "-webkit-shape-margin"?: ShapeMarginProperty<TLength> | ShapeMarginProperty<TLength>[], - "-webkit-tap-highlight-color"?: WebkitTapHighlightColorProperty | WebkitTapHighlightColorProperty[], - "-webkit-text-combine"?: TextCombineUprightProperty | TextCombineUprightProperty[], - "-webkit-text-decoration-color"?: TextDecorationColorProperty | TextDecorationColorProperty[], - "-webkit-text-decoration-line"?: TextDecorationLineProperty | TextDecorationLineProperty[], - "-webkit-text-decoration-skip"?: TextDecorationSkipProperty | TextDecorationSkipProperty[], - "-webkit-text-decoration-style"?: TextDecorationStyleProperty | TextDecorationStyleProperty[], - "-webkit-text-emphasis-color"?: TextEmphasisColorProperty | TextEmphasisColorProperty[], - "-webkit-text-emphasis-position"?: GlobalsString | GlobalsString[], - "-webkit-text-emphasis-style"?: TextEmphasisStyleProperty | TextEmphasisStyleProperty[], - "-webkit-text-fill-color"?: WebkitTextFillColorProperty | WebkitTextFillColorProperty[], - "-webkit-text-orientation"?: TextOrientationProperty | TextOrientationProperty[], - "-webkit-text-size-adjust"?: TextSizeAdjustProperty | TextSizeAdjustProperty[], - "-webkit-text-stroke-color"?: WebkitTextStrokeColorProperty | WebkitTextStrokeColorProperty[], - "-webkit-text-stroke-width"?: WebkitTextStrokeWidthProperty<TLength> | WebkitTextStrokeWidthProperty<TLength>[], - "-webkit-text-underline-position"?: TextUnderlinePositionProperty | TextUnderlinePositionProperty[], - "-webkit-touch-callout"?: WebkitTouchCalloutProperty | WebkitTouchCalloutProperty[], - "-webkit-transform"?: TransformProperty | TransformProperty[], - "-webkit-transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - "-webkit-transform-style"?: TransformStyleProperty | TransformStyleProperty[], - "-webkit-transition-delay"?: GlobalsString | GlobalsString[], - "-webkit-transition-duration"?: GlobalsString | GlobalsString[], - "-webkit-transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[], - "-webkit-transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - "-webkit-user-modify"?: WebkitUserModifyProperty | WebkitUserModifyProperty[], - "-webkit-user-select"?: UserSelectProperty | UserSelectProperty[], - "-webkit-writing-mode"?: WritingModeProperty | WritingModeProperty[], -}; +export type StandardPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + ...StandardLonghandPropertiesHyphenFallback<TLength, TTime>, + ...StandardShorthandPropertiesHyphenFallback<TLength, TTime>, +|}; -export type VendorShorthandPropertiesHyphenFallback<TLength = string | 0> = { - "-moz-animation"?: AnimationProperty | AnimationProperty[], - "-moz-border-image"?: BorderImageProperty | BorderImageProperty[], - "-moz-column-rule"?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[], - "-moz-columns"?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[], - "-moz-transition"?: TransitionProperty | TransitionProperty[], - "-ms-content-zoom-limit"?: GlobalsString | GlobalsString[], - "-ms-content-zoom-snap"?: MsContentZoomSnapProperty | MsContentZoomSnapProperty[], - "-ms-flex"?: FlexProperty<TLength> | FlexProperty<TLength>[], - "-ms-scroll-limit"?: GlobalsString | GlobalsString[], - "-ms-scroll-snap-x"?: GlobalsString | GlobalsString[], - "-ms-scroll-snap-y"?: GlobalsString | GlobalsString[], - "-ms-transition"?: TransitionProperty | TransitionProperty[], - "-webkit-animation"?: AnimationProperty | AnimationProperty[], - "-webkit-border-before"?: WebkitBorderBeforeProperty<TLength> | WebkitBorderBeforeProperty<TLength>[], - "-webkit-border-image"?: BorderImageProperty | BorderImageProperty[], - "-webkit-border-radius"?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[], - "-webkit-column-rule"?: ColumnRuleProperty<TLength> | ColumnRuleProperty<TLength>[], - "-webkit-columns"?: ColumnsProperty<TLength> | ColumnsProperty<TLength>[], - "-webkit-flex"?: FlexProperty<TLength> | FlexProperty<TLength>[], - "-webkit-flex-flow"?: FlexFlowProperty | FlexFlowProperty[], - "-webkit-mask"?: WebkitMaskProperty<TLength> | WebkitMaskProperty<TLength>[], - "-webkit-mask-box-image"?: MaskBorderProperty | MaskBorderProperty[], - "-webkit-text-emphasis"?: TextEmphasisProperty | TextEmphasisProperty[], - "-webkit-text-stroke"?: WebkitTextStrokeProperty<TLength> | WebkitTextStrokeProperty<TLength>[], - "-webkit-transition"?: TransitionProperty | TransitionProperty[], -}; +export type VendorLonghandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + "-moz-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + "-moz-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, + "-moz-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + "-moz-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + "-moz-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + "-moz-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, + "-moz-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + "-moz-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + "-moz-appearance"?: Property$MozAppearance | Array<Property$MozAppearance>, + "-moz-binding"?: Property$MozBinding | Array<Property$MozBinding>, + "-moz-border-bottom-colors"?: Property$MozBorderBottomColors | Array<Property$MozBorderBottomColors>, + "-moz-border-end-color"?: Property$BorderInlineEndColor | Array<Property$BorderInlineEndColor>, + "-moz-border-end-style"?: Property$BorderInlineEndStyle | Array<Property$BorderInlineEndStyle>, + "-moz-border-end-width"?: Property$BorderInlineEndWidth<TLength> | Array<Property$BorderInlineEndWidth<TLength>>, + "-moz-border-left-colors"?: Property$MozBorderLeftColors | Array<Property$MozBorderLeftColors>, + "-moz-border-right-colors"?: Property$MozBorderRightColors | Array<Property$MozBorderRightColors>, + "-moz-border-start-color"?: Property$BorderInlineStartColor | Array<Property$BorderInlineStartColor>, + "-moz-border-start-style"?: Property$BorderInlineStartStyle | Array<Property$BorderInlineStartStyle>, + "-moz-border-top-colors"?: Property$MozBorderTopColors | Array<Property$MozBorderTopColors>, + "-moz-box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, + "-moz-column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, + "-moz-column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, + "-moz-column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + "-moz-column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + "-moz-column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + "-moz-column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + "-moz-context-properties"?: Property$MozContextProperties | Array<Property$MozContextProperties>, + "-moz-font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + "-moz-font-language-override"?: Property$FontLanguageOverride | Array<Property$FontLanguageOverride>, + "-moz-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, + "-moz-image-region"?: Property$MozImageRegion | Array<Property$MozImageRegion>, + "-moz-margin-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + "-moz-margin-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + "-moz-orient"?: Property$MozOrient | Array<Property$MozOrient>, + "-moz-osx-font-smoothing"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + "-moz-outline-radius-bottomleft"?: Property$MozOutlineRadiusBottomleft<TLength> | Array<Property$MozOutlineRadiusBottomleft<TLength>>, + "-moz-outline-radius-bottomright"?: Property$MozOutlineRadiusBottomright<TLength> | Array<Property$MozOutlineRadiusBottomright<TLength>>, + "-moz-outline-radius-topleft"?: Property$MozOutlineRadiusTopleft<TLength> | Array<Property$MozOutlineRadiusTopleft<TLength>>, + "-moz-outline-radius-topright"?: Property$MozOutlineRadiusTopright<TLength> | Array<Property$MozOutlineRadiusTopright<TLength>>, + "-moz-padding-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + "-moz-padding-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + "-moz-stack-sizing"?: Property$MozStackSizing | Array<Property$MozStackSizing>, + "-moz-tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + "-moz-text-blink"?: Property$MozTextBlink | Array<Property$MozTextBlink>, + "-moz-text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + "-moz-user-focus"?: Property$MozUserFocus | Array<Property$MozUserFocus>, + "-moz-user-modify"?: Property$MozUserModify | Array<Property$MozUserModify>, + "-moz-user-select"?: Property$UserSelect | Array<Property$UserSelect>, + "-moz-window-dragging"?: Property$MozWindowDragging | Array<Property$MozWindowDragging>, + "-moz-window-shadow"?: Property$MozWindowShadow | Array<Property$MozWindowShadow>, + "-ms-accelerator"?: Property$MsAccelerator | Array<Property$MsAccelerator>, + "-ms-block-progression"?: Property$MsBlockProgression | Array<Property$MsBlockProgression>, + "-ms-content-zoom-chaining"?: Property$MsContentZoomChaining | Array<Property$MsContentZoomChaining>, + "-ms-content-zoom-limit-max"?: Property$MsContentZoomLimitMax | Array<Property$MsContentZoomLimitMax>, + "-ms-content-zoom-limit-min"?: Property$MsContentZoomLimitMin | Array<Property$MsContentZoomLimitMin>, + "-ms-content-zoom-snap-points"?: Property$MsContentZoomSnapPoints | Array<Property$MsContentZoomSnapPoints>, + "-ms-content-zoom-snap-type"?: Property$MsContentZoomSnapType | Array<Property$MsContentZoomSnapType>, + "-ms-content-zooming"?: Property$MsContentZooming | Array<Property$MsContentZooming>, + "-ms-filter"?: Property$MsFilter | Array<Property$MsFilter>, + "-ms-flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, + "-ms-flex-positive"?: Property$FlexGrow | Array<Property$FlexGrow>, + "-ms-flow-from"?: Property$MsFlowFrom | Array<Property$MsFlowFrom>, + "-ms-flow-into"?: Property$MsFlowInto | Array<Property$MsFlowInto>, + "-ms-grid-columns"?: Property$MsGridColumns<TLength> | Array<Property$MsGridColumns<TLength>>, + "-ms-grid-rows"?: Property$MsGridRows<TLength> | Array<Property$MsGridRows<TLength>>, + "-ms-high-contrast-adjust"?: Property$MsHighContrastAdjust | Array<Property$MsHighContrastAdjust>, + "-ms-hyphenate-limit-chars"?: Property$MsHyphenateLimitChars | Array<Property$MsHyphenateLimitChars>, + "-ms-hyphenate-limit-lines"?: Property$MsHyphenateLimitLines | Array<Property$MsHyphenateLimitLines>, + "-ms-hyphenate-limit-zone"?: Property$MsHyphenateLimitZone<TLength> | Array<Property$MsHyphenateLimitZone<TLength>>, + "-ms-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, + "-ms-ime-align"?: Property$MsImeAlign | Array<Property$MsImeAlign>, + "-ms-line-break"?: Property$LineBreak | Array<Property$LineBreak>, + "-ms-order"?: Property$Order | Array<Property$Order>, + "-ms-overflow-style"?: Property$MsOverflowStyle | Array<Property$MsOverflowStyle>, + "-ms-overflow-x"?: Property$OverflowX | Array<Property$OverflowX>, + "-ms-overflow-y"?: Property$OverflowY | Array<Property$OverflowY>, + "-ms-scroll-chaining"?: Property$MsScrollChaining | Array<Property$MsScrollChaining>, + "-ms-scroll-limit-x-max"?: Property$MsScrollLimitXMax<TLength> | Array<Property$MsScrollLimitXMax<TLength>>, + "-ms-scroll-limit-x-min"?: Property$MsScrollLimitXMin<TLength> | Array<Property$MsScrollLimitXMin<TLength>>, + "-ms-scroll-limit-y-max"?: Property$MsScrollLimitYMax<TLength> | Array<Property$MsScrollLimitYMax<TLength>>, + "-ms-scroll-limit-y-min"?: Property$MsScrollLimitYMin<TLength> | Array<Property$MsScrollLimitYMin<TLength>>, + "-ms-scroll-rails"?: Property$MsScrollRails | Array<Property$MsScrollRails>, + "-ms-scroll-snap-points-x"?: Property$MsScrollSnapPointsX | Array<Property$MsScrollSnapPointsX>, + "-ms-scroll-snap-points-y"?: Property$MsScrollSnapPointsY | Array<Property$MsScrollSnapPointsY>, + "-ms-scroll-snap-type"?: Property$MsScrollSnapType | Array<Property$MsScrollSnapType>, + "-ms-scroll-translation"?: Property$MsScrollTranslation | Array<Property$MsScrollTranslation>, + "-ms-scrollbar-3dlight-color"?: Property$MsScrollbar3dlightColor | Array<Property$MsScrollbar3dlightColor>, + "-ms-scrollbar-arrow-color"?: Property$MsScrollbarArrowColor | Array<Property$MsScrollbarArrowColor>, + "-ms-scrollbar-base-color"?: Property$MsScrollbarBaseColor | Array<Property$MsScrollbarBaseColor>, + "-ms-scrollbar-darkshadow-color"?: Property$MsScrollbarDarkshadowColor | Array<Property$MsScrollbarDarkshadowColor>, + "-ms-scrollbar-face-color"?: Property$MsScrollbarFaceColor | Array<Property$MsScrollbarFaceColor>, + "-ms-scrollbar-highlight-color"?: Property$MsScrollbarHighlightColor | Array<Property$MsScrollbarHighlightColor>, + "-ms-scrollbar-shadow-color"?: Property$MsScrollbarShadowColor | Array<Property$MsScrollbarShadowColor>, + "-ms-scrollbar-track-color"?: Property$MsScrollbarTrackColor | Array<Property$MsScrollbarTrackColor>, + "-ms-text-autospace"?: Property$MsTextAutospace | Array<Property$MsTextAutospace>, + "-ms-text-combine-horizontal"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + "-ms-text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, + "-ms-touch-action"?: Property$TouchAction | Array<Property$TouchAction>, + "-ms-touch-select"?: Property$MsTouchSelect | Array<Property$MsTouchSelect>, + "-ms-transform"?: Property$Transform | Array<Property$Transform>, + "-ms-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "-ms-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "-ms-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "-ms-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "-ms-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + "-ms-user-select"?: Property$MsUserSelect | Array<Property$MsUserSelect>, + "-ms-word-break"?: Property$WordBreak | Array<Property$WordBreak>, + "-ms-wrap-flow"?: Property$MsWrapFlow | Array<Property$MsWrapFlow>, + "-ms-wrap-margin"?: Property$MsWrapMargin<TLength> | Array<Property$MsWrapMargin<TLength>>, + "-ms-wrap-through"?: Property$MsWrapThrough | Array<Property$MsWrapThrough>, + "-ms-writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, + "-webkit-align-content"?: Property$AlignContent | Array<Property$AlignContent>, + "-webkit-align-items"?: Property$AlignItems | Array<Property$AlignItems>, + "-webkit-align-self"?: Property$AlignSelf | Array<Property$AlignSelf>, + "-webkit-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + "-webkit-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, + "-webkit-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + "-webkit-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + "-webkit-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + "-webkit-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, + "-webkit-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + "-webkit-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + "-webkit-appearance"?: Property$WebkitAppearance | Array<Property$WebkitAppearance>, + "-webkit-backdrop-filter"?: Property$BackdropFilter | Array<Property$BackdropFilter>, + "-webkit-backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + "-webkit-background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, + "-webkit-background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + "-webkit-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + "-webkit-border-before-color"?: Property$WebkitBorderBeforeColor | Array<Property$WebkitBorderBeforeColor>, + "-webkit-border-before-style"?: Property$WebkitBorderBeforeStyle | Array<Property$WebkitBorderBeforeStyle>, + "-webkit-border-before-width"?: Property$WebkitBorderBeforeWidth<TLength> | Array<Property$WebkitBorderBeforeWidth<TLength>>, + "-webkit-border-bottom-left-radius"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + "-webkit-border-bottom-right-radius"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + "-webkit-border-image-slice"?: Property$BorderImageSlice | Array<Property$BorderImageSlice>, + "-webkit-border-top-left-radius"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + "-webkit-border-top-right-radius"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + "-webkit-box-decoration-break"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + "-webkit-box-reflect"?: Property$WebkitBoxReflect<TLength> | Array<Property$WebkitBoxReflect<TLength>>, + "-webkit-box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, + "-webkit-box-sizing"?: Property$BoxSizing | Array<Property$BoxSizing>, + "-webkit-clip-path"?: Property$ClipPath | Array<Property$ClipPath>, + "-webkit-column-count"?: Property$ColumnCount | Array<Property$ColumnCount>, + "-webkit-column-fill"?: Property$ColumnFill | Array<Property$ColumnFill>, + "-webkit-column-rule-color"?: Property$ColumnRuleColor | Array<Property$ColumnRuleColor>, + "-webkit-column-rule-style"?: Property$ColumnRuleStyle | Array<Property$ColumnRuleStyle>, + "-webkit-column-rule-width"?: Property$ColumnRuleWidth<TLength> | Array<Property$ColumnRuleWidth<TLength>>, + "-webkit-column-span"?: Property$ColumnSpan | Array<Property$ColumnSpan>, + "-webkit-column-width"?: Property$ColumnWidth<TLength> | Array<Property$ColumnWidth<TLength>>, + "-webkit-filter"?: Property$Filter | Array<Property$Filter>, + "-webkit-flex-basis"?: Property$FlexBasis<TLength> | Array<Property$FlexBasis<TLength>>, + "-webkit-flex-direction"?: Property$FlexDirection | Array<Property$FlexDirection>, + "-webkit-flex-grow"?: Property$FlexGrow | Array<Property$FlexGrow>, + "-webkit-flex-shrink"?: Property$FlexShrink | Array<Property$FlexShrink>, + "-webkit-flex-wrap"?: Property$FlexWrap | Array<Property$FlexWrap>, + "-webkit-font-feature-settings"?: Property$FontFeatureSettings | Array<Property$FontFeatureSettings>, + "-webkit-font-kerning"?: Property$FontKerning | Array<Property$FontKerning>, + "-webkit-font-smoothing"?: Property$FontSmooth<TLength> | Array<Property$FontSmooth<TLength>>, + "-webkit-font-variant-ligatures"?: Property$FontVariantLigatures | Array<Property$FontVariantLigatures>, + "-webkit-hyphenate-character"?: Property$HyphenateCharacter | Array<Property$HyphenateCharacter>, + "-webkit-hyphens"?: Property$Hyphens | Array<Property$Hyphens>, + "-webkit-initial-letter"?: Property$InitialLetter | Array<Property$InitialLetter>, + "-webkit-justify-content"?: Property$JustifyContent | Array<Property$JustifyContent>, + "-webkit-line-break"?: Property$LineBreak | Array<Property$LineBreak>, + "-webkit-line-clamp"?: Property$WebkitLineClamp | Array<Property$WebkitLineClamp>, + "-webkit-margin-end"?: Property$MarginInlineEnd<TLength> | Array<Property$MarginInlineEnd<TLength>>, + "-webkit-margin-start"?: Property$MarginInlineStart<TLength> | Array<Property$MarginInlineStart<TLength>>, + "-webkit-mask-attachment"?: Property$WebkitMaskAttachment | Array<Property$WebkitMaskAttachment>, + "-webkit-mask-box-image-outset"?: Property$MaskBorderOutset<TLength> | Array<Property$MaskBorderOutset<TLength>>, + "-webkit-mask-box-image-repeat"?: Property$MaskBorderRepeat | Array<Property$MaskBorderRepeat>, + "-webkit-mask-box-image-slice"?: Property$MaskBorderSlice | Array<Property$MaskBorderSlice>, + "-webkit-mask-box-image-source"?: Property$MaskBorderSource | Array<Property$MaskBorderSource>, + "-webkit-mask-box-image-width"?: Property$MaskBorderWidth<TLength> | Array<Property$MaskBorderWidth<TLength>>, + "-webkit-mask-clip"?: Property$WebkitMaskClip | Array<Property$WebkitMaskClip>, + "-webkit-mask-composite"?: Property$WebkitMaskComposite | Array<Property$WebkitMaskComposite>, + "-webkit-mask-image"?: Property$WebkitMaskImage | Array<Property$WebkitMaskImage>, + "-webkit-mask-origin"?: Property$WebkitMaskOrigin | Array<Property$WebkitMaskOrigin>, + "-webkit-mask-position"?: Property$WebkitMaskPosition<TLength> | Array<Property$WebkitMaskPosition<TLength>>, + "-webkit-mask-position-x"?: Property$WebkitMaskPositionX<TLength> | Array<Property$WebkitMaskPositionX<TLength>>, + "-webkit-mask-position-y"?: Property$WebkitMaskPositionY<TLength> | Array<Property$WebkitMaskPositionY<TLength>>, + "-webkit-mask-repeat"?: Property$WebkitMaskRepeat | Array<Property$WebkitMaskRepeat>, + "-webkit-mask-repeat-x"?: Property$WebkitMaskRepeatX | Array<Property$WebkitMaskRepeatX>, + "-webkit-mask-repeat-y"?: Property$WebkitMaskRepeatY | Array<Property$WebkitMaskRepeatY>, + "-webkit-mask-size"?: Property$WebkitMaskSize<TLength> | Array<Property$WebkitMaskSize<TLength>>, + "-webkit-max-inline-size"?: Property$MaxInlineSize<TLength> | Array<Property$MaxInlineSize<TLength>>, + "-webkit-order"?: Property$Order | Array<Property$Order>, + "-webkit-overflow-scrolling"?: Property$WebkitOverflowScrolling | Array<Property$WebkitOverflowScrolling>, + "-webkit-padding-end"?: Property$PaddingInlineEnd<TLength> | Array<Property$PaddingInlineEnd<TLength>>, + "-webkit-padding-start"?: Property$PaddingInlineStart<TLength> | Array<Property$PaddingInlineStart<TLength>>, + "-webkit-perspective"?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + "-webkit-perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + "-webkit-print-color-adjust"?: Property$PrintColorAdjust | Array<Property$PrintColorAdjust>, + "-webkit-ruby-position"?: Property$RubyPosition | Array<Property$RubyPosition>, + "-webkit-scroll-snap-type"?: Property$ScrollSnapType | Array<Property$ScrollSnapType>, + "-webkit-shape-margin"?: Property$ShapeMargin<TLength> | Array<Property$ShapeMargin<TLength>>, + "-webkit-tap-highlight-color"?: Property$WebkitTapHighlightColor | Array<Property$WebkitTapHighlightColor>, + "-webkit-text-combine"?: Property$TextCombineUpright | Array<Property$TextCombineUpright>, + "-webkit-text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + "-webkit-text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + "-webkit-text-decoration-skip"?: Property$TextDecorationSkip | Array<Property$TextDecorationSkip>, + "-webkit-text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + "-webkit-text-emphasis-color"?: Property$TextEmphasisColor | Array<Property$TextEmphasisColor>, + "-webkit-text-emphasis-position"?: Property$TextEmphasisPosition | Array<Property$TextEmphasisPosition>, + "-webkit-text-emphasis-style"?: Property$TextEmphasisStyle | Array<Property$TextEmphasisStyle>, + "-webkit-text-fill-color"?: Property$WebkitTextFillColor | Array<Property$WebkitTextFillColor>, + "-webkit-text-orientation"?: Property$TextOrientation | Array<Property$TextOrientation>, + "-webkit-text-size-adjust"?: Property$TextSizeAdjust | Array<Property$TextSizeAdjust>, + "-webkit-text-stroke-color"?: Property$WebkitTextStrokeColor | Array<Property$WebkitTextStrokeColor>, + "-webkit-text-stroke-width"?: Property$WebkitTextStrokeWidth<TLength> | Array<Property$WebkitTextStrokeWidth<TLength>>, + "-webkit-text-underline-position"?: Property$TextUnderlinePosition | Array<Property$TextUnderlinePosition>, + "-webkit-touch-callout"?: Property$WebkitTouchCallout | Array<Property$WebkitTouchCallout>, + "-webkit-transform"?: Property$Transform | Array<Property$Transform>, + "-webkit-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "-webkit-transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, + "-webkit-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "-webkit-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "-webkit-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "-webkit-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + "-webkit-user-modify"?: Property$WebkitUserModify | Array<Property$WebkitUserModify>, + "-webkit-user-select"?: Property$UserSelect | Array<Property$UserSelect>, + "-webkit-writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, +|}; -export type VendorPropertiesHyphenFallback<TLength = string | 0> = VendorLonghandPropertiesHyphenFallback<TLength> & VendorShorthandPropertiesHyphenFallback<TLength>; +export type VendorShorthandPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + "-moz-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + "-moz-border-image"?: Property$BorderImage | Array<Property$BorderImage>, + "-moz-column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + "-moz-columns"?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + "-moz-outline-radius"?: Property$MozOutlineRadius<TLength> | Array<Property$MozOutlineRadius<TLength>>, + "-ms-content-zoom-limit"?: Property$MsContentZoomLimit | Array<Property$MsContentZoomLimit>, + "-ms-content-zoom-snap"?: Property$MsContentZoomSnap | Array<Property$MsContentZoomSnap>, + "-ms-flex"?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + "-ms-scroll-limit"?: Property$MsScrollLimit | Array<Property$MsScrollLimit>, + "-ms-scroll-snap-x"?: Property$MsScrollSnapX | Array<Property$MsScrollSnapX>, + "-ms-scroll-snap-y"?: Property$MsScrollSnapY | Array<Property$MsScrollSnapY>, + "-ms-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + "-webkit-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + "-webkit-border-before"?: Property$WebkitBorderBefore<TLength> | Array<Property$WebkitBorderBefore<TLength>>, + "-webkit-border-image"?: Property$BorderImage | Array<Property$BorderImage>, + "-webkit-border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + "-webkit-column-rule"?: Property$ColumnRule<TLength> | Array<Property$ColumnRule<TLength>>, + "-webkit-columns"?: Property$Columns<TLength> | Array<Property$Columns<TLength>>, + "-webkit-flex"?: Property$Flex<TLength> | Array<Property$Flex<TLength>>, + "-webkit-flex-flow"?: Property$FlexFlow | Array<Property$FlexFlow>, + "-webkit-mask"?: Property$WebkitMask<TLength> | Array<Property$WebkitMask<TLength>>, + "-webkit-mask-box-image"?: Property$MaskBorder | Array<Property$MaskBorder>, + "-webkit-text-emphasis"?: Property$TextEmphasis | Array<Property$TextEmphasis>, + "-webkit-text-stroke"?: Property$WebkitTextStroke<TLength> | Array<Property$WebkitTextStroke<TLength>>, + "-webkit-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, +|}; -export type ObsoletePropertiesHyphenFallback<TLength = string | 0> = { - azimuth?: AzimuthProperty | AzimuthProperty[], - "box-align"?: BoxAlignProperty | BoxAlignProperty[], - "box-direction"?: BoxDirectionProperty | BoxDirectionProperty[], - "box-flex"?: GlobalsNumber | GlobalsNumber[], - "box-flex-group"?: GlobalsNumber | GlobalsNumber[], - "box-lines"?: BoxLinesProperty | BoxLinesProperty[], - "box-ordinal-group"?: GlobalsNumber | GlobalsNumber[], - "box-orient"?: BoxOrientProperty | BoxOrientProperty[], - "box-pack"?: BoxPackProperty | BoxPackProperty[], - clip?: ClipProperty | ClipProperty[], - "grid-column-gap"?: GridColumnGapProperty<TLength> | GridColumnGapProperty<TLength>[], - "grid-gap"?: GridGapProperty<TLength> | GridGapProperty<TLength>[], - "grid-row-gap"?: GridRowGapProperty<TLength> | GridRowGapProperty<TLength>[], - "ime-mode"?: ImeModeProperty | ImeModeProperty[], - "offset-block"?: InsetBlockProperty<TLength> | InsetBlockProperty<TLength>[], - "offset-block-end"?: InsetBlockEndProperty<TLength> | InsetBlockEndProperty<TLength>[], - "offset-block-start"?: InsetBlockStartProperty<TLength> | InsetBlockStartProperty<TLength>[], - "offset-inline"?: InsetInlineProperty<TLength> | InsetInlineProperty<TLength>[], - "offset-inline-end"?: InsetInlineEndProperty<TLength> | InsetInlineEndProperty<TLength>[], - "offset-inline-start"?: InsetInlineStartProperty<TLength> | InsetInlineStartProperty<TLength>[], - "scroll-snap-coordinate"?: ScrollSnapCoordinateProperty<TLength> | ScrollSnapCoordinateProperty<TLength>[], - "scroll-snap-destination"?: ScrollSnapDestinationProperty<TLength> | ScrollSnapDestinationProperty<TLength>[], - "scroll-snap-points-x"?: ScrollSnapPointsXProperty | ScrollSnapPointsXProperty[], - "scroll-snap-points-y"?: ScrollSnapPointsYProperty | ScrollSnapPointsYProperty[], - "scroll-snap-type-x"?: ScrollSnapTypeXProperty | ScrollSnapTypeXProperty[], - "scroll-snap-type-y"?: ScrollSnapTypeYProperty | ScrollSnapTypeYProperty[], - "-khtml-box-align"?: BoxAlignProperty | BoxAlignProperty[], - "-khtml-box-direction"?: BoxDirectionProperty | BoxDirectionProperty[], - "-khtml-box-flex"?: GlobalsNumber | GlobalsNumber[], - "-khtml-box-flex-group"?: GlobalsNumber | GlobalsNumber[], - "-khtml-box-lines"?: BoxLinesProperty | BoxLinesProperty[], - "-khtml-box-ordinal-group"?: GlobalsNumber | GlobalsNumber[], - "-khtml-box-orient"?: BoxOrientProperty | BoxOrientProperty[], - "-khtml-box-pack"?: BoxPackProperty | BoxPackProperty[], - "-khtml-line-break"?: LineBreakProperty | LineBreakProperty[], - "-khtml-opacity"?: OpacityProperty | OpacityProperty[], - "-khtml-user-select"?: UserSelectProperty | UserSelectProperty[], - "-moz-background-clip"?: BackgroundClipProperty | BackgroundClipProperty[], - "-moz-background-inline-policy"?: BoxDecorationBreakProperty | BoxDecorationBreakProperty[], - "-moz-background-origin"?: BackgroundOriginProperty | BackgroundOriginProperty[], - "-moz-background-size"?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[], - "-moz-binding"?: MozBindingProperty | MozBindingProperty[], - "-moz-border-radius"?: BorderRadiusProperty<TLength> | BorderRadiusProperty<TLength>[], - "-moz-border-radius-bottomleft"?: BorderBottomLeftRadiusProperty<TLength> | BorderBottomLeftRadiusProperty<TLength>[], - "-moz-border-radius-bottomright"?: BorderBottomRightRadiusProperty<TLength> | BorderBottomRightRadiusProperty<TLength>[], - "-moz-border-radius-topleft"?: BorderTopLeftRadiusProperty<TLength> | BorderTopLeftRadiusProperty<TLength>[], - "-moz-border-radius-topright"?: BorderTopRightRadiusProperty<TLength> | BorderTopRightRadiusProperty<TLength>[], - "-moz-box-align"?: BoxAlignProperty | BoxAlignProperty[], - "-moz-box-direction"?: BoxDirectionProperty | BoxDirectionProperty[], - "-moz-box-flex"?: GlobalsNumber | GlobalsNumber[], - "-moz-box-ordinal-group"?: GlobalsNumber | GlobalsNumber[], - "-moz-box-orient"?: BoxOrientProperty | BoxOrientProperty[], - "-moz-box-pack"?: BoxPackProperty | BoxPackProperty[], - "-moz-box-shadow"?: BoxShadowProperty | BoxShadowProperty[], - "-moz-float-edge"?: MozFloatEdgeProperty | MozFloatEdgeProperty[], - "-moz-force-broken-image-icon"?: MozForceBrokenImageIconProperty | MozForceBrokenImageIconProperty[], - "-moz-opacity"?: OpacityProperty | OpacityProperty[], - "-moz-outline"?: OutlineProperty<TLength> | OutlineProperty<TLength>[], - "-moz-outline-color"?: OutlineColorProperty | OutlineColorProperty[], - "-moz-outline-radius"?: MozOutlineRadiusProperty<TLength> | MozOutlineRadiusProperty<TLength>[], - "-moz-outline-radius-bottomleft"?: MozOutlineRadiusBottomleftProperty<TLength> | MozOutlineRadiusBottomleftProperty<TLength>[], - "-moz-outline-radius-bottomright"?: MozOutlineRadiusBottomrightProperty<TLength> | MozOutlineRadiusBottomrightProperty<TLength>[], - "-moz-outline-radius-topleft"?: MozOutlineRadiusTopleftProperty<TLength> | MozOutlineRadiusTopleftProperty<TLength>[], - "-moz-outline-radius-topright"?: MozOutlineRadiusToprightProperty<TLength> | MozOutlineRadiusToprightProperty<TLength>[], - "-moz-outline-style"?: OutlineStyleProperty | OutlineStyleProperty[], - "-moz-outline-width"?: OutlineWidthProperty<TLength> | OutlineWidthProperty<TLength>[], - "-moz-text-align-last"?: TextAlignLastProperty | TextAlignLastProperty[], - "-moz-text-decoration-color"?: TextDecorationColorProperty | TextDecorationColorProperty[], - "-moz-text-decoration-line"?: TextDecorationLineProperty | TextDecorationLineProperty[], - "-moz-text-decoration-style"?: TextDecorationStyleProperty | TextDecorationStyleProperty[], - "-moz-user-input"?: MozUserInputProperty | MozUserInputProperty[], - "-ms-ime-mode"?: ImeModeProperty | ImeModeProperty[], - "-o-animation"?: AnimationProperty | AnimationProperty[], - "-o-animation-delay"?: GlobalsString | GlobalsString[], - "-o-animation-direction"?: AnimationDirectionProperty | AnimationDirectionProperty[], - "-o-animation-duration"?: GlobalsString | GlobalsString[], - "-o-animation-fill-mode"?: AnimationFillModeProperty | AnimationFillModeProperty[], - "-o-animation-iteration-count"?: AnimationIterationCountProperty | AnimationIterationCountProperty[], - "-o-animation-name"?: AnimationNameProperty | AnimationNameProperty[], - "-o-animation-play-state"?: AnimationPlayStateProperty | AnimationPlayStateProperty[], - "-o-animation-timing-function"?: AnimationTimingFunctionProperty | AnimationTimingFunctionProperty[], - "-o-background-size"?: BackgroundSizeProperty<TLength> | BackgroundSizeProperty<TLength>[], - "-o-border-image"?: BorderImageProperty | BorderImageProperty[], - "-o-object-fit"?: ObjectFitProperty | ObjectFitProperty[], - "-o-object-position"?: ObjectPositionProperty<TLength> | ObjectPositionProperty<TLength>[], - "-o-tab-size"?: TabSizeProperty<TLength> | TabSizeProperty<TLength>[], - "-o-text-overflow"?: TextOverflowProperty | TextOverflowProperty[], - "-o-transform"?: TransformProperty | TransformProperty[], - "-o-transform-origin"?: TransformOriginProperty<TLength> | TransformOriginProperty<TLength>[], - "-o-transition"?: TransitionProperty | TransitionProperty[], - "-o-transition-delay"?: GlobalsString | GlobalsString[], - "-o-transition-duration"?: GlobalsString | GlobalsString[], - "-o-transition-property"?: TransitionPropertyProperty | TransitionPropertyProperty[], - "-o-transition-timing-function"?: TransitionTimingFunctionProperty | TransitionTimingFunctionProperty[], - "-webkit-box-align"?: BoxAlignProperty | BoxAlignProperty[], - "-webkit-box-direction"?: BoxDirectionProperty | BoxDirectionProperty[], - "-webkit-box-flex"?: GlobalsNumber | GlobalsNumber[], - "-webkit-box-flex-group"?: GlobalsNumber | GlobalsNumber[], - "-webkit-box-lines"?: BoxLinesProperty | BoxLinesProperty[], - "-webkit-box-ordinal-group"?: GlobalsNumber | GlobalsNumber[], - "-webkit-box-orient"?: BoxOrientProperty | BoxOrientProperty[], - "-webkit-box-pack"?: BoxPackProperty | BoxPackProperty[], - "-webkit-scroll-snap-points-x"?: ScrollSnapPointsXProperty | ScrollSnapPointsXProperty[], - "-webkit-scroll-snap-points-y"?: ScrollSnapPointsYProperty | ScrollSnapPointsYProperty[], -}; +export type VendorPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + ...VendorLonghandPropertiesHyphenFallback<TLength, TTime>, + ...VendorShorthandPropertiesHyphenFallback<TLength, TTime>, +|}; -export type SvgPropertiesHyphenFallback<TLength = string | 0> = { - "alignment-baseline"?: AlignmentBaselineProperty | AlignmentBaselineProperty[], - "baseline-shift"?: BaselineShiftProperty<TLength> | BaselineShiftProperty<TLength>[], - clip?: ClipProperty | ClipProperty[], - "clip-path"?: ClipPathProperty | ClipPathProperty[], - "clip-rule"?: ClipRuleProperty | ClipRuleProperty[], - color?: ColorProperty | ColorProperty[], - "color-interpolation"?: ColorInterpolationProperty | ColorInterpolationProperty[], - "color-rendering"?: ColorRenderingProperty | ColorRenderingProperty[], - cursor?: CursorProperty | CursorProperty[], - direction?: DirectionProperty | DirectionProperty[], - display?: DisplayProperty | DisplayProperty[], - "dominant-baseline"?: DominantBaselineProperty | DominantBaselineProperty[], - fill?: FillProperty | FillProperty[], - "fill-opacity"?: GlobalsNumber | GlobalsNumber[], - "fill-rule"?: FillRuleProperty | FillRuleProperty[], - filter?: FilterProperty | FilterProperty[], - "flood-color"?: FloodColorProperty | FloodColorProperty[], - "flood-opacity"?: GlobalsNumber | GlobalsNumber[], - font?: FontProperty | FontProperty[], - "font-family"?: FontFamilyProperty | FontFamilyProperty[], - "font-size"?: FontSizeProperty<TLength> | FontSizeProperty<TLength>[], - "font-size-adjust"?: FontSizeAdjustProperty | FontSizeAdjustProperty[], - "font-stretch"?: FontStretchProperty | FontStretchProperty[], - "font-style"?: FontStyleProperty | FontStyleProperty[], - "font-variant"?: FontVariantProperty | FontVariantProperty[], - "font-weight"?: FontWeightProperty | FontWeightProperty[], - "glyph-orientation-vertical"?: GlyphOrientationVerticalProperty | GlyphOrientationVerticalProperty[], - "image-rendering"?: ImageRenderingProperty | ImageRenderingProperty[], - "letter-spacing"?: LetterSpacingProperty<TLength> | LetterSpacingProperty<TLength>[], - "lighting-color"?: LightingColorProperty | LightingColorProperty[], - "line-height"?: LineHeightProperty<TLength> | LineHeightProperty<TLength>[], - marker?: MarkerProperty | MarkerProperty[], - "marker-end"?: MarkerEndProperty | MarkerEndProperty[], - "marker-mid"?: MarkerMidProperty | MarkerMidProperty[], - "marker-start"?: MarkerStartProperty | MarkerStartProperty[], - mask?: MaskProperty<TLength> | MaskProperty<TLength>[], - opacity?: OpacityProperty | OpacityProperty[], - overflow?: OverflowProperty | OverflowProperty[], - "paint-order"?: PaintOrderProperty | PaintOrderProperty[], - "pointer-events"?: PointerEventsProperty | PointerEventsProperty[], - "shape-rendering"?: ShapeRenderingProperty | ShapeRenderingProperty[], - "stop-color"?: StopColorProperty | StopColorProperty[], - "stop-opacity"?: GlobalsNumber | GlobalsNumber[], - stroke?: StrokeProperty | StrokeProperty[], - "stroke-dasharray"?: StrokeDasharrayProperty<TLength> | StrokeDasharrayProperty<TLength>[], - "stroke-dashoffset"?: StrokeDashoffsetProperty<TLength> | StrokeDashoffsetProperty<TLength>[], - "stroke-linecap"?: StrokeLinecapProperty | StrokeLinecapProperty[], - "stroke-linejoin"?: StrokeLinejoinProperty | StrokeLinejoinProperty[], - "stroke-miterlimit"?: GlobalsNumber | GlobalsNumber[], - "stroke-opacity"?: GlobalsNumber | GlobalsNumber[], - "stroke-width"?: StrokeWidthProperty<TLength> | StrokeWidthProperty<TLength>[], - "text-anchor"?: TextAnchorProperty | TextAnchorProperty[], - "text-decoration"?: TextDecorationProperty<TLength> | TextDecorationProperty<TLength>[], - "text-rendering"?: TextRenderingProperty | TextRenderingProperty[], - "unicode-bidi"?: UnicodeBidiProperty | UnicodeBidiProperty[], - "vector-effect"?: VectorEffectProperty | VectorEffectProperty[], - visibility?: VisibilityProperty | VisibilityProperty[], - "white-space"?: WhiteSpaceProperty | WhiteSpaceProperty[], - "word-spacing"?: WordSpacingProperty<TLength> | WordSpacingProperty<TLength>[], - "writing-mode"?: WritingModeProperty | WritingModeProperty[], -}; +export type ObsoletePropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + azimuth?: Property$Azimuth | Array<Property$Azimuth>, + "box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, + "box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, + "box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, + "box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + "box-lines"?: Property$BoxLines | Array<Property$BoxLines>, + "box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + "box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, + "box-pack"?: Property$BoxPack | Array<Property$BoxPack>, + clip?: Property$Clip | Array<Property$Clip>, + "grid-column-gap"?: Property$GridColumnGap<TLength> | Array<Property$GridColumnGap<TLength>>, + "grid-gap"?: Property$GridGap<TLength> | Array<Property$GridGap<TLength>>, + "grid-row-gap"?: Property$GridRowGap<TLength> | Array<Property$GridRowGap<TLength>>, + "ime-mode"?: Property$ImeMode | Array<Property$ImeMode>, + "offset-block"?: Property$InsetBlock<TLength> | Array<Property$InsetBlock<TLength>>, + "offset-block-end"?: Property$InsetBlockEnd<TLength> | Array<Property$InsetBlockEnd<TLength>>, + "offset-block-start"?: Property$InsetBlockStart<TLength> | Array<Property$InsetBlockStart<TLength>>, + "offset-inline"?: Property$InsetInline<TLength> | Array<Property$InsetInline<TLength>>, + "offset-inline-end"?: Property$InsetInlineEnd<TLength> | Array<Property$InsetInlineEnd<TLength>>, + "offset-inline-start"?: Property$InsetInlineStart<TLength> | Array<Property$InsetInlineStart<TLength>>, + "scroll-snap-coordinate"?: Property$ScrollSnapCoordinate<TLength> | Array<Property$ScrollSnapCoordinate<TLength>>, + "scroll-snap-destination"?: Property$ScrollSnapDestination<TLength> | Array<Property$ScrollSnapDestination<TLength>>, + "scroll-snap-points-x"?: Property$ScrollSnapPointsX | Array<Property$ScrollSnapPointsX>, + "scroll-snap-points-y"?: Property$ScrollSnapPointsY | Array<Property$ScrollSnapPointsY>, + "scroll-snap-type-x"?: Property$ScrollSnapTypeX | Array<Property$ScrollSnapTypeX>, + "scroll-snap-type-y"?: Property$ScrollSnapTypeY | Array<Property$ScrollSnapTypeY>, + "-khtml-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, + "-khtml-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, + "-khtml-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, + "-khtml-box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + "-khtml-box-lines"?: Property$BoxLines | Array<Property$BoxLines>, + "-khtml-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + "-khtml-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, + "-khtml-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, + "-khtml-line-break"?: Property$LineBreak | Array<Property$LineBreak>, + "-khtml-opacity"?: Property$Opacity | Array<Property$Opacity>, + "-khtml-user-select"?: Property$UserSelect | Array<Property$UserSelect>, + "-moz-backface-visibility"?: Property$BackfaceVisibility | Array<Property$BackfaceVisibility>, + "-moz-background-clip"?: Property$BackgroundClip | Array<Property$BackgroundClip>, + "-moz-background-inline-policy"?: Property$BoxDecorationBreak | Array<Property$BoxDecorationBreak>, + "-moz-background-origin"?: Property$BackgroundOrigin | Array<Property$BackgroundOrigin>, + "-moz-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + "-moz-border-radius"?: Property$BorderRadius<TLength> | Array<Property$BorderRadius<TLength>>, + "-moz-border-radius-bottomleft"?: Property$BorderBottomLeftRadius<TLength> | Array<Property$BorderBottomLeftRadius<TLength>>, + "-moz-border-radius-bottomright"?: Property$BorderBottomRightRadius<TLength> | Array<Property$BorderBottomRightRadius<TLength>>, + "-moz-border-radius-topleft"?: Property$BorderTopLeftRadius<TLength> | Array<Property$BorderTopLeftRadius<TLength>>, + "-moz-border-radius-topright"?: Property$BorderTopRightRadius<TLength> | Array<Property$BorderTopRightRadius<TLength>>, + "-moz-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, + "-moz-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, + "-moz-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, + "-moz-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + "-moz-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, + "-moz-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, + "-moz-box-shadow"?: Property$BoxShadow | Array<Property$BoxShadow>, + "-moz-float-edge"?: Property$MozFloatEdge | Array<Property$MozFloatEdge>, + "-moz-force-broken-image-icon"?: Property$MozForceBrokenImageIcon | Array<Property$MozForceBrokenImageIcon>, + "-moz-opacity"?: Property$Opacity | Array<Property$Opacity>, + "-moz-outline"?: Property$Outline<TLength> | Array<Property$Outline<TLength>>, + "-moz-outline-color"?: Property$OutlineColor | Array<Property$OutlineColor>, + "-moz-outline-style"?: Property$OutlineStyle | Array<Property$OutlineStyle>, + "-moz-outline-width"?: Property$OutlineWidth<TLength> | Array<Property$OutlineWidth<TLength>>, + "-moz-perspective"?: Property$Perspective<TLength> | Array<Property$Perspective<TLength>>, + "-moz-perspective-origin"?: Property$PerspectiveOrigin<TLength> | Array<Property$PerspectiveOrigin<TLength>>, + "-moz-text-align-last"?: Property$TextAlignLast | Array<Property$TextAlignLast>, + "-moz-text-decoration-color"?: Property$TextDecorationColor | Array<Property$TextDecorationColor>, + "-moz-text-decoration-line"?: Property$TextDecorationLine | Array<Property$TextDecorationLine>, + "-moz-text-decoration-style"?: Property$TextDecorationStyle | Array<Property$TextDecorationStyle>, + "-moz-transform"?: Property$Transform | Array<Property$Transform>, + "-moz-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "-moz-transform-style"?: Property$TransformStyle | Array<Property$TransformStyle>, + "-moz-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + "-moz-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "-moz-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "-moz-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "-moz-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + "-moz-user-input"?: Property$MozUserInput | Array<Property$MozUserInput>, + "-ms-ime-mode"?: Property$ImeMode | Array<Property$ImeMode>, + "-o-animation"?: Property$Animation<TTime> | Array<Property$Animation<TTime>>, + "-o-animation-delay"?: Property$AnimationDelay<TTime> | Array<Property$AnimationDelay<TTime>>, + "-o-animation-direction"?: Property$AnimationDirection | Array<Property$AnimationDirection>, + "-o-animation-duration"?: Property$AnimationDuration<TTime> | Array<Property$AnimationDuration<TTime>>, + "-o-animation-fill-mode"?: Property$AnimationFillMode | Array<Property$AnimationFillMode>, + "-o-animation-iteration-count"?: Property$AnimationIterationCount | Array<Property$AnimationIterationCount>, + "-o-animation-name"?: Property$AnimationName | Array<Property$AnimationName>, + "-o-animation-play-state"?: Property$AnimationPlayState | Array<Property$AnimationPlayState>, + "-o-animation-timing-function"?: Property$AnimationTimingFunction | Array<Property$AnimationTimingFunction>, + "-o-background-size"?: Property$BackgroundSize<TLength> | Array<Property$BackgroundSize<TLength>>, + "-o-border-image"?: Property$BorderImage | Array<Property$BorderImage>, + "-o-object-fit"?: Property$ObjectFit | Array<Property$ObjectFit>, + "-o-object-position"?: Property$ObjectPosition<TLength> | Array<Property$ObjectPosition<TLength>>, + "-o-tab-size"?: Property$TabSize<TLength> | Array<Property$TabSize<TLength>>, + "-o-text-overflow"?: Property$TextOverflow | Array<Property$TextOverflow>, + "-o-transform"?: Property$Transform | Array<Property$Transform>, + "-o-transform-origin"?: Property$TransformOrigin<TLength> | Array<Property$TransformOrigin<TLength>>, + "-o-transition"?: Property$Transition<TTime> | Array<Property$Transition<TTime>>, + "-o-transition-delay"?: Property$TransitionDelay<TTime> | Array<Property$TransitionDelay<TTime>>, + "-o-transition-duration"?: Property$TransitionDuration<TTime> | Array<Property$TransitionDuration<TTime>>, + "-o-transition-property"?: Property$TransitionProperty | Array<Property$TransitionProperty>, + "-o-transition-timing-function"?: Property$TransitionTimingFunction | Array<Property$TransitionTimingFunction>, + "-webkit-box-align"?: Property$BoxAlign | Array<Property$BoxAlign>, + "-webkit-box-direction"?: Property$BoxDirection | Array<Property$BoxDirection>, + "-webkit-box-flex"?: Property$BoxFlex | Array<Property$BoxFlex>, + "-webkit-box-flex-group"?: Property$BoxFlexGroup | Array<Property$BoxFlexGroup>, + "-webkit-box-lines"?: Property$BoxLines | Array<Property$BoxLines>, + "-webkit-box-ordinal-group"?: Property$BoxOrdinalGroup | Array<Property$BoxOrdinalGroup>, + "-webkit-box-orient"?: Property$BoxOrient | Array<Property$BoxOrient>, + "-webkit-box-pack"?: Property$BoxPack | Array<Property$BoxPack>, +|}; -export type PropertiesHyphenFallback<TLength = string | 0> = StandardPropertiesHyphenFallback<TLength> & - VendorPropertiesHyphenFallback<TLength> & - ObsoletePropertiesHyphenFallback<TLength> & - SvgPropertiesHyphenFallback<TLength>; +export type SvgPropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + "alignment-baseline"?: Property$AlignmentBaseline | Array<Property$AlignmentBaseline>, + "baseline-shift"?: Property$BaselineShift<TLength> | Array<Property$BaselineShift<TLength>>, + clip?: Property$Clip | Array<Property$Clip>, + "clip-path"?: Property$ClipPath | Array<Property$ClipPath>, + "clip-rule"?: Property$ClipRule | Array<Property$ClipRule>, + color?: Property$Color | Array<Property$Color>, + "color-interpolation"?: Property$ColorInterpolation | Array<Property$ColorInterpolation>, + "color-rendering"?: Property$ColorRendering | Array<Property$ColorRendering>, + cursor?: Property$Cursor | Array<Property$Cursor>, + direction?: Property$Direction | Array<Property$Direction>, + display?: Property$Display | Array<Property$Display>, + "dominant-baseline"?: Property$DominantBaseline | Array<Property$DominantBaseline>, + fill?: Property$Fill | Array<Property$Fill>, + "fill-opacity"?: Property$FillOpacity | Array<Property$FillOpacity>, + "fill-rule"?: Property$FillRule | Array<Property$FillRule>, + filter?: Property$Filter | Array<Property$Filter>, + "flood-color"?: Property$FloodColor | Array<Property$FloodColor>, + "flood-opacity"?: Property$FloodOpacity | Array<Property$FloodOpacity>, + font?: Property$Font | Array<Property$Font>, + "font-family"?: Property$FontFamily | Array<Property$FontFamily>, + "font-size"?: Property$FontSize<TLength> | Array<Property$FontSize<TLength>>, + "font-size-adjust"?: Property$FontSizeAdjust | Array<Property$FontSizeAdjust>, + "font-stretch"?: Property$FontStretch | Array<Property$FontStretch>, + "font-style"?: Property$FontStyle | Array<Property$FontStyle>, + "font-variant"?: Property$FontVariant | Array<Property$FontVariant>, + "font-weight"?: Property$FontWeight | Array<Property$FontWeight>, + "glyph-orientation-vertical"?: Property$GlyphOrientationVertical | Array<Property$GlyphOrientationVertical>, + "image-rendering"?: Property$ImageRendering | Array<Property$ImageRendering>, + "letter-spacing"?: Property$LetterSpacing<TLength> | Array<Property$LetterSpacing<TLength>>, + "lighting-color"?: Property$LightingColor | Array<Property$LightingColor>, + "line-height"?: Property$LineHeight<TLength> | Array<Property$LineHeight<TLength>>, + marker?: Property$Marker | Array<Property$Marker>, + "marker-end"?: Property$MarkerEnd | Array<Property$MarkerEnd>, + "marker-mid"?: Property$MarkerMid | Array<Property$MarkerMid>, + "marker-start"?: Property$MarkerStart | Array<Property$MarkerStart>, + mask?: Property$Mask<TLength> | Array<Property$Mask<TLength>>, + opacity?: Property$Opacity | Array<Property$Opacity>, + overflow?: Property$Overflow | Array<Property$Overflow>, + "paint-order"?: Property$PaintOrder | Array<Property$PaintOrder>, + "pointer-events"?: Property$PointerEvents | Array<Property$PointerEvents>, + "shape-rendering"?: Property$ShapeRendering | Array<Property$ShapeRendering>, + "stop-color"?: Property$StopColor | Array<Property$StopColor>, + "stop-opacity"?: Property$StopOpacity | Array<Property$StopOpacity>, + stroke?: Property$Stroke | Array<Property$Stroke>, + "stroke-dasharray"?: Property$StrokeDasharray<TLength> | Array<Property$StrokeDasharray<TLength>>, + "stroke-dashoffset"?: Property$StrokeDashoffset<TLength> | Array<Property$StrokeDashoffset<TLength>>, + "stroke-linecap"?: Property$StrokeLinecap | Array<Property$StrokeLinecap>, + "stroke-linejoin"?: Property$StrokeLinejoin | Array<Property$StrokeLinejoin>, + "stroke-miterlimit"?: Property$StrokeMiterlimit | Array<Property$StrokeMiterlimit>, + "stroke-opacity"?: Property$StrokeOpacity | Array<Property$StrokeOpacity>, + "stroke-width"?: Property$StrokeWidth<TLength> | Array<Property$StrokeWidth<TLength>>, + "text-anchor"?: Property$TextAnchor | Array<Property$TextAnchor>, + "text-decoration"?: Property$TextDecoration<TLength> | Array<Property$TextDecoration<TLength>>, + "text-rendering"?: Property$TextRendering | Array<Property$TextRendering>, + "unicode-bidi"?: Property$UnicodeBidi | Array<Property$UnicodeBidi>, + "vector-effect"?: Property$VectorEffect | Array<Property$VectorEffect>, + visibility?: Property$Visibility | Array<Property$Visibility>, + "white-space"?: Property$WhiteSpace | Array<Property$WhiteSpace>, + "word-spacing"?: Property$WordSpacing<TLength> | Array<Property$WordSpacing<TLength>>, + "writing-mode"?: Property$WritingMode | Array<Property$WritingMode>, +|}; -export type CounterStyle = { - additiveSymbols?: string, - fallback?: string, - negative?: string, - pad?: string, - prefix?: string, - range?: CounterStyleRangeProperty, - speakAs?: CounterStyleSpeakAsProperty, - suffix?: string, - symbols?: string, - system?: CounterStyleSystemProperty, -}; - -export type CounterStyleHyphen = { - "additive-symbols"?: string, - fallback?: string, - negative?: string, - pad?: string, - prefix?: string, - range?: CounterStyleRangeProperty, - "speak-as"?: CounterStyleSpeakAsProperty, - suffix?: string, - symbols?: string, - system?: CounterStyleSystemProperty, -}; - -export type CounterStyleFallback = { - additiveSymbols?: string | string[], - fallback?: string | string[], - negative?: string | string[], - pad?: string | string[], - prefix?: string | string[], - range?: CounterStyleRangeProperty | CounterStyleRangeProperty[], - speakAs?: CounterStyleSpeakAsProperty | CounterStyleSpeakAsProperty[], - suffix?: string | string[], - symbols?: string | string[], - system?: CounterStyleSystemProperty | CounterStyleSystemProperty[], -}; - -export type CounterStyleHyphenFallback = { - "additive-symbols"?: string | string[], - fallback?: string | string[], - negative?: string | string[], - pad?: string | string[], - prefix?: string | string[], - range?: CounterStyleRangeProperty | CounterStyleRangeProperty[], - "speak-as"?: CounterStyleSpeakAsProperty | CounterStyleSpeakAsProperty[], - suffix?: string | string[], - symbols?: string | string[], - system?: CounterStyleSystemProperty | CounterStyleSystemProperty[], -}; - -export type FontFace = { - MozFontFeatureSettings?: FontFaceFontFeatureSettingsProperty, - ascentOverride?: FontFaceAscentOverrideProperty, - descentOverride?: FontFaceDescentOverrideProperty, - fontDisplay?: FontFaceFontDisplayProperty, - fontFamily?: string, - fontFeatureSettings?: FontFaceFontFeatureSettingsProperty, - fontStretch?: FontFaceFontStretchProperty, - fontStyle?: FontFaceFontStyleProperty, - fontVariant?: FontFaceFontVariantProperty, - fontVariationSettings?: FontFaceFontVariationSettingsProperty, - fontWeight?: FontFaceFontWeightProperty, - lineGapOverride?: FontFaceLineGapOverrideProperty, - sizeAdjust?: string, - src?: string, - unicodeRange?: string, -}; - -export type FontFaceHyphen = { - "-moz-font-feature-settings"?: FontFaceFontFeatureSettingsProperty, - "ascent-override"?: FontFaceAscentOverrideProperty, - "descent-override"?: FontFaceDescentOverrideProperty, - "font-display"?: FontFaceFontDisplayProperty, - "font-family"?: string, - "font-feature-settings"?: FontFaceFontFeatureSettingsProperty, - "font-stretch"?: FontFaceFontStretchProperty, - "font-style"?: FontFaceFontStyleProperty, - "font-variant"?: FontFaceFontVariantProperty, - "font-variation-settings"?: FontFaceFontVariationSettingsProperty, - "font-weight"?: FontFaceFontWeightProperty, - "line-gap-override"?: FontFaceLineGapOverrideProperty, - "size-adjust"?: string, - src?: string, - "unicode-range"?: string, -}; - -export type FontFaceFallback = { - MozFontFeatureSettings?: FontFaceFontFeatureSettingsProperty | FontFaceFontFeatureSettingsProperty[], - ascentOverride?: FontFaceAscentOverrideProperty | FontFaceAscentOverrideProperty[], - descentOverride?: FontFaceDescentOverrideProperty | FontFaceDescentOverrideProperty[], - fontDisplay?: FontFaceFontDisplayProperty | FontFaceFontDisplayProperty[], - fontFamily?: string | string[], - fontFeatureSettings?: FontFaceFontFeatureSettingsProperty | FontFaceFontFeatureSettingsProperty[], - fontStretch?: FontFaceFontStretchProperty | FontFaceFontStretchProperty[], - fontStyle?: FontFaceFontStyleProperty | FontFaceFontStyleProperty[], - fontVariant?: FontFaceFontVariantProperty | FontFaceFontVariantProperty[], - fontVariationSettings?: FontFaceFontVariationSettingsProperty | FontFaceFontVariationSettingsProperty[], - fontWeight?: FontFaceFontWeightProperty | FontFaceFontWeightProperty[], - lineGapOverride?: FontFaceLineGapOverrideProperty | FontFaceLineGapOverrideProperty[], - sizeAdjust?: string | string[], - src?: string | string[], - unicodeRange?: string | string[], -}; - -export type FontFaceHyphenFallback = { - "-moz-font-feature-settings"?: FontFaceFontFeatureSettingsProperty | FontFaceFontFeatureSettingsProperty[], - "ascent-override"?: FontFaceAscentOverrideProperty | FontFaceAscentOverrideProperty[], - "descent-override"?: FontFaceDescentOverrideProperty | FontFaceDescentOverrideProperty[], - "font-display"?: FontFaceFontDisplayProperty | FontFaceFontDisplayProperty[], - "font-family"?: string | string[], - "font-feature-settings"?: FontFaceFontFeatureSettingsProperty | FontFaceFontFeatureSettingsProperty[], - "font-stretch"?: FontFaceFontStretchProperty | FontFaceFontStretchProperty[], - "font-style"?: FontFaceFontStyleProperty | FontFaceFontStyleProperty[], - "font-variant"?: FontFaceFontVariantProperty | FontFaceFontVariantProperty[], - "font-variation-settings"?: FontFaceFontVariationSettingsProperty | FontFaceFontVariationSettingsProperty[], - "font-weight"?: FontFaceFontWeightProperty | FontFaceFontWeightProperty[], - "line-gap-override"?: FontFaceLineGapOverrideProperty | FontFaceLineGapOverrideProperty[], - "size-adjust"?: string | string[], - src?: string | string[], - "unicode-range"?: string | string[], -}; - -export type Page<TLength = string | 0> = { - bleed?: PageBleedProperty<TLength>, - marks?: PageMarksProperty, - size?: PageSizeProperty<TLength>, -}; - -export type PageHyphen<TLength = string | 0> = { - bleed?: PageBleedProperty<TLength>, - marks?: PageMarksProperty, - size?: PageSizeProperty<TLength>, -}; - -export type PageFallback<TLength = string | 0> = { - bleed?: PageBleedProperty<TLength> | PageBleedProperty<TLength>[], - marks?: PageMarksProperty | PageMarksProperty[], - size?: PageSizeProperty<TLength> | PageSizeProperty<TLength>[], -}; - -export type PageHyphenFallback<TLength = string | 0> = { - bleed?: PageBleedProperty<TLength> | PageBleedProperty<TLength>[], - marks?: PageMarksProperty | PageMarksProperty[], - size?: PageSizeProperty<TLength> | PageSizeProperty<TLength>[], -}; - -export type Property = { - inherits?: PropertyInheritsProperty, - initialValue?: string, - syntax?: string, -}; - -export type PropertyHyphen = { - inherits?: PropertyInheritsProperty, - "initial-value"?: string, - syntax?: string, -}; - -export type PropertyFallback = { - inherits?: PropertyInheritsProperty | PropertyInheritsProperty[], - initialValue?: string | string[], - syntax?: string | string[], -}; - -export type PropertyHyphenFallback = { - inherits?: PropertyInheritsProperty | PropertyInheritsProperty[], - "initial-value"?: string | string[], - syntax?: string | string[], -}; - -export type Viewport<TLength = string | 0> = { - height?: ViewportHeightProperty<TLength>, - maxHeight?: ViewportMaxHeightProperty<TLength>, - maxWidth?: ViewportMaxWidthProperty<TLength>, - maxZoom?: ViewportMaxZoomProperty, - minHeight?: ViewportMinHeightProperty<TLength>, - minWidth?: ViewportMinWidthProperty<TLength>, - minZoom?: ViewportMinZoomProperty, - orientation?: ViewportOrientationProperty, - userZoom?: ViewportUserZoomProperty, - viewportFit?: ViewportViewportFitProperty, - width?: ViewportWidthProperty<TLength>, - zoom?: ViewportZoomProperty, -}; - -export type ViewportHyphen<TLength = string | 0> = { - height?: ViewportHeightProperty<TLength>, - "max-height"?: ViewportMaxHeightProperty<TLength>, - "max-width"?: ViewportMaxWidthProperty<TLength>, - "max-zoom"?: ViewportMaxZoomProperty, - "min-height"?: ViewportMinHeightProperty<TLength>, - "min-width"?: ViewportMinWidthProperty<TLength>, - "min-zoom"?: ViewportMinZoomProperty, - orientation?: ViewportOrientationProperty, - "user-zoom"?: ViewportUserZoomProperty, - "viewport-fit"?: ViewportViewportFitProperty, - width?: ViewportWidthProperty<TLength>, - zoom?: ViewportZoomProperty, -}; - -export type ViewportFallback<TLength = string | 0> = { - height?: ViewportHeightProperty<TLength> | ViewportHeightProperty<TLength>[], - maxHeight?: ViewportMaxHeightProperty<TLength> | ViewportMaxHeightProperty<TLength>[], - maxWidth?: ViewportMaxWidthProperty<TLength> | ViewportMaxWidthProperty<TLength>[], - maxZoom?: ViewportMaxZoomProperty | ViewportMaxZoomProperty[], - minHeight?: ViewportMinHeightProperty<TLength> | ViewportMinHeightProperty<TLength>[], - minWidth?: ViewportMinWidthProperty<TLength> | ViewportMinWidthProperty<TLength>[], - minZoom?: ViewportMinZoomProperty | ViewportMinZoomProperty[], - orientation?: ViewportOrientationProperty | ViewportOrientationProperty[], - userZoom?: ViewportUserZoomProperty | ViewportUserZoomProperty[], - viewportFit?: ViewportViewportFitProperty | ViewportViewportFitProperty[], - width?: ViewportWidthProperty<TLength> | ViewportWidthProperty<TLength>[], - zoom?: ViewportZoomProperty | ViewportZoomProperty[], -}; - -export type ViewportHyphenFallback<TLength = string | 0> = { - height?: ViewportHeightProperty<TLength> | ViewportHeightProperty<TLength>[], - "max-height"?: ViewportMaxHeightProperty<TLength> | ViewportMaxHeightProperty<TLength>[], - "max-width"?: ViewportMaxWidthProperty<TLength> | ViewportMaxWidthProperty<TLength>[], - "max-zoom"?: ViewportMaxZoomProperty | ViewportMaxZoomProperty[], - "min-height"?: ViewportMinHeightProperty<TLength> | ViewportMinHeightProperty<TLength>[], - "min-width"?: ViewportMinWidthProperty<TLength> | ViewportMinWidthProperty<TLength>[], - "min-zoom"?: ViewportMinZoomProperty | ViewportMinZoomProperty[], - orientation?: ViewportOrientationProperty | ViewportOrientationProperty[], - "user-zoom"?: ViewportUserZoomProperty | ViewportUserZoomProperty[], - "viewport-fit"?: ViewportViewportFitProperty | ViewportViewportFitProperty[], - width?: ViewportWidthProperty<TLength> | ViewportWidthProperty<TLength>[], - zoom?: ViewportZoomProperty | ViewportZoomProperty[], -}; +export type PropertiesHyphenFallback<TLength = string | 0, TTime = string> = {| + ...StandardPropertiesHyphenFallback<TLength, TTime>, + ...VendorPropertiesHyphenFallback<TLength, TTime>, + ...ObsoletePropertiesHyphenFallback<TLength, TTime>, + ...SvgPropertiesHyphenFallback<TLength, TTime>, +|}; export type AtRules = | "@charset" @@ -3614,6 +3560,7 @@ export type AtRules = | "@document" | "@font-face" | "@font-feature-values" + | "@font-palette-values" | "@import" | "@keyframes" | "@layer" @@ -3621,7 +3568,9 @@ export type AtRules = | "@namespace" | "@page" | "@property" + | "@scope" | "@scroll-timeline" + | "@starting-style" | "@supports" | "@viewport"; @@ -3633,6 +3582,10 @@ export type AdvancedPseudos = | "::cue-region" | "::part" | "::slotted" + | "::view-transition-group" + | "::view-transition-image-pair" + | "::view-transition-new" + | "::view-transition-old" | ":dir" | ":has" | ":host" @@ -3703,6 +3656,7 @@ export type SimplePseudos = | "::selection" | "::spelling-error" | "::target-text" + | "::view-transition" | ":active" | ":after" | ":any-link" @@ -3774,6 +3728,7 @@ export type HtmlAttributes = | "[alt]" | "[archive]" | "[async]" + | "[attributionsrc]" | "[autobuffer]" | "[autocapitalize]" | "[autocomplete]" @@ -3783,8 +3738,10 @@ export type HtmlAttributes = | "[background]" | "[behavior]" | "[bgcolor]" + | "[blocking]" | "[border]" | "[bottommargin]" + | "[browsingtopics]" | "[capture]" | "[cellpadding]" | "[cellspacing]" @@ -3796,23 +3753,20 @@ export type HtmlAttributes = | "[class]" | "[classid]" | "[clear]" - | "[code]" | "[codebase]" | "[codetype]" | "[color]" | "[cols]" | "[colspan]" - | "[command]" | "[compact]" | "[content]" | "[contenteditable]" | "[contextmenu]" | "[controls]" | "[coords]" + | "[credentialless]" | "[crossorigin]" | "[data]" - | "[datafld]" - | "[datasrc]" | "[datetime]" | "[declare]" | "[decoding]" @@ -3846,7 +3800,6 @@ export type HtmlAttributes = | "[hreflang]" | "[hspace]" | "[http-equiv]" - | "[icon]" | "[id]" | "[imagesizes]" | "[imagesrcset]" @@ -3876,13 +3829,13 @@ export type HtmlAttributes = | "[marginwidth]" | "[max]" | "[maxlength]" - | "[mayscript]" | "[media]" | "[method]" | "[methods]" | "[min]" | "[minlength]" | "[moz-opaque]" + | "[mozactionhint]" | "[mozallowfullscreen]" | "[msallowfullscreen]" | "[multiple]" @@ -3895,7 +3848,6 @@ export type HtmlAttributes = | "[noshade]" | "[novalidate]" | "[nowrap]" - | "[object]" | "[onerror]" | "[open]" | "[optimum]" @@ -3903,11 +3855,12 @@ export type HtmlAttributes = | "[pattern]" | "[ping]" | "[placeholder]" + | "[popover]" + | "[popovertarget]" + | "[popovertargetaction]" | "[poster]" - | "[prefetch]" | "[preload]" | "[profile]" - | "[radiogroup]" | "[readonly]" | "[referrerpolicy]" | "[rel]" @@ -3918,14 +3871,6 @@ export type HtmlAttributes = | "[rows]" | "[rowspan]" | "[rules]" - | "[sandbox-allow-downloads]" - | "[sandbox-allow-modals]" - | "[sandbox-allow-popups-to-escape-sandbox]" - | "[sandbox-allow-popups]" - | "[sandbox-allow-presentation]" - | "[sandbox-allow-same-origin]" - | "[sandbox-allow-storage-access-by-user-activation]" - | "[sandbox-allow-top-navigation-by-user-activation]" | "[sandbox]" | "[scope]" | "[scrollamount]" @@ -3933,6 +3878,7 @@ export type HtmlAttributes = | "[scrolling]" | "[selected]" | "[shadowroot]" + | "[shadowrootmode]" | "[shape]" | "[size]" | "[sizes]" @@ -3961,6 +3907,7 @@ export type HtmlAttributes = | "[value]" | "[valuetype]" | "[version]" + | "[virtualkeyboardpolicy]" | "[vlink]" | "[vspace]" | "[webkitallowfullscreen]" @@ -3977,6 +3924,7 @@ export type SvgAttributes = | "[animation]" | "[arabic-form]" | "[ascent]" + | "[async]" | "[attributeName]" | "[attributeType]" | "[azimuth]" @@ -3999,10 +3947,13 @@ export type SvgAttributes = | "[color]" | "[contentScriptType]" | "[contentStyleType]" + | "[crossorigin]" | "[cursor]" | "[cx]" | "[cy]" | "[d]" + | "[decoding]" + | "[defer]" | "[descent]" | "[diffuseConstant]" | "[direction]" @@ -4210,41 +4161,51 @@ export type SvgAttributes = export type Globals = "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset"; -type GlobalsString = Globals | string; +export type Property$AccentColor = Globals | DataType$Color | "auto"; -type GlobalsNumber = Globals | number; +export type Property$AlignContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; -export type AccentColorProperty = Globals | Color | "auto"; +export type Property$AlignItems = Globals | DataType$SelfPosition | "baseline" | "normal" | "stretch" | string; -export type AlignContentProperty = Globals | ContentDistribution | ContentPosition | "baseline" | "normal" | string; +export type Property$AlignSelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; -export type AlignItemsProperty = Globals | SelfPosition | "baseline" | "normal" | "stretch" | string; +export type Property$AlignTracks = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; -export type AlignSelfProperty = Globals | SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; +export type Property$All = Globals; -export type AlignTracksProperty = Globals | ContentDistribution | ContentPosition | "baseline" | "normal" | string; +export type Property$Animation<TTime = string> = Globals | DataType$SingleAnimation<TTime> | string; -export type AnimationProperty = Globals | SingleAnimation | string; +export type Property$AnimationComposition = Globals | DataType$SingleAnimationComposition | string; -export type AnimationDirectionProperty = Globals | SingleAnimationDirection | string; +export type Property$AnimationDelay<TTime = string> = Globals | TTime | string; -export type AnimationFillModeProperty = Globals | SingleAnimationFillMode | string; +export type Property$AnimationDirection = Globals | DataType$SingleAnimationDirection | string; -export type AnimationIterationCountProperty = Globals | "infinite" | string | number; +export type Property$AnimationDuration<TTime = string> = Globals | TTime | string; -export type AnimationNameProperty = Globals | "none" | string; +export type Property$AnimationFillMode = Globals | DataType$SingleAnimationFillMode | string; -export type AnimationPlayStateProperty = Globals | "paused" | "running" | string; +export type Property$AnimationIterationCount = Globals | "infinite" | string | number; -export type AnimationTimelineProperty = Globals | SingleAnimationTimeline | string; +export type Property$AnimationName = Globals | "none" | string; -export type AnimationTimingFunctionProperty = Globals | EasingFunction | string; +export type Property$AnimationPlayState = Globals | "paused" | "running" | string; -export type AppearanceProperty = Globals | CompatAuto | "auto" | "menulist-button" | "none" | "textfield"; +export type Property$AnimationRange<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; -export type AspectRatioProperty = Globals | "auto" | string | number; +export type Property$AnimationRangeEnd<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; -export type AzimuthProperty = +export type Property$AnimationRangeStart<TLength = string | 0> = Globals | DataType$TimelineRangeName | TLength | "normal" | string; + +export type Property$AnimationTimeline = Globals | DataType$SingleAnimationTimeline | string; + +export type Property$AnimationTimingFunction = Globals | DataType$EasingFunction | string; + +export type Property$Appearance = Globals | DataType$CompatAuto | "auto" | "menulist-button" | "none" | "textfield"; + +export type Property$AspectRatio = Globals | "auto" | string | number; + +export type Property$Azimuth = | Globals | "behind" | "center" @@ -4260,190 +4221,195 @@ export type AzimuthProperty = | "rightwards" | string; -export type BackdropFilterProperty = Globals | "none" | string; +export type Property$BackdropFilter = Globals | "none" | string; -export type BackfaceVisibilityProperty = Globals | "hidden" | "visible"; +export type Property$BackfaceVisibility = Globals | "hidden" | "visible"; -export type BackgroundProperty<TLength> = Globals | FinalBgLayer<TLength> | string; +export type Property$Background<TLength = string | 0> = Globals | DataType$FinalBgLayer<TLength> | string; -export type BackgroundAttachmentProperty = Globals | Attachment | string; +export type Property$BackgroundAttachment = Globals | DataType$Attachment | string; -export type BackgroundBlendModeProperty = Globals | BlendMode | string; +export type Property$BackgroundBlendMode = Globals | DataType$BlendMode | string; -export type BackgroundClipProperty = Globals | Box | string; +export type Property$BackgroundClip = Globals | DataType$Box | string; -export type BackgroundColorProperty = Globals | Color; +export type Property$BackgroundColor = Globals | DataType$Color; -export type BackgroundImageProperty = Globals | "none" | string; +export type Property$BackgroundImage = Globals | "none" | string; -export type BackgroundOriginProperty = Globals | Box | string; +export type Property$BackgroundOrigin = Globals | DataType$Box | string; -export type BackgroundPositionProperty<TLength> = Globals | BgPosition<TLength> | string; +export type Property$BackgroundPosition<TLength = string | 0> = Globals | DataType$BgPosition<TLength> | string; -export type BackgroundPositionXProperty<TLength> = Globals | TLength | "center" | "left" | "right" | "x-end" | "x-start" | string; +export type Property$BackgroundPositionX<TLength = string | 0> = Globals | TLength | "center" | "left" | "right" | "x-end" | "x-start" | string; -export type BackgroundPositionYProperty<TLength> = Globals | TLength | "bottom" | "center" | "top" | "y-end" | "y-start" | string; +export type Property$BackgroundPositionY<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "top" | "y-end" | "y-start" | string; -export type BackgroundRepeatProperty = Globals | RepeatStyle | string; +export type Property$BackgroundRepeat = Globals | DataType$RepeatStyle | string; -export type BackgroundSizeProperty<TLength> = Globals | BgSize<TLength> | string; +export type Property$BackgroundSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; -export type BlockOverflowProperty = Globals | "clip" | "ellipsis" | string; +export type Property$BlockOverflow = Globals | "clip" | "ellipsis" | string; -export type BlockSizeProperty<TLength> = +export type Property$BlockSize<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" | "-moz-max-content" | "-moz-min-content" - | "-webkit-fill-available" | "auto" | "fit-content" | "max-content" | "min-content" | string; -export type BorderProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$Border<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderBlockProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderBlock<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderBlockColorProperty = Globals | Color | string; +export type Property$BorderBlockColor = Globals | DataType$Color | string; -export type BorderBlockEndProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderBlockEnd<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderBlockEndColorProperty = Globals | Color; +export type Property$BorderBlockEndColor = Globals | DataType$Color; -export type BorderBlockEndStyleProperty = Globals | LineStyle; +export type Property$BorderBlockEndStyle = Globals | DataType$LineStyle; -export type BorderBlockEndWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderBlockEndWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderBlockStartProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderBlockStart<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderBlockStartColorProperty = Globals | Color; +export type Property$BorderBlockStartColor = Globals | DataType$Color; -export type BorderBlockStartStyleProperty = Globals | LineStyle; +export type Property$BorderBlockStartStyle = Globals | DataType$LineStyle; -export type BorderBlockStartWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderBlockStartWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderBlockStyleProperty = Globals | LineStyle; +export type Property$BorderBlockStyle = Globals | DataType$LineStyle; -export type BorderBlockWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderBlockWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderBottomProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderBottom<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderBottomColorProperty = Globals | Color; +export type Property$BorderBottomColor = Globals | DataType$Color; -export type BorderBottomLeftRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderBottomLeftRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderBottomRightRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderBottomRightRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderBottomStyleProperty = Globals | LineStyle; +export type Property$BorderBottomStyle = Globals | DataType$LineStyle; -export type BorderBottomWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderBottomWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderCollapseProperty = Globals | "collapse" | "separate"; +export type Property$BorderCollapse = Globals | "collapse" | "separate"; -export type BorderColorProperty = Globals | Color | string; +export type Property$BorderColor = Globals | DataType$Color | string; -export type BorderEndEndRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderEndEndRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderEndStartRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderEndStartRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderImageProperty = Globals | "none" | "repeat" | "round" | "space" | "stretch" | string | number; +export type Property$BorderImage = Globals | "none" | "repeat" | "round" | "space" | "stretch" | string | number; -export type BorderImageOutsetProperty<TLength> = Globals | TLength | string | number; +export type Property$BorderImageOutset<TLength = string | 0> = Globals | TLength | string | number; -export type BorderImageRepeatProperty = Globals | "repeat" | "round" | "space" | "stretch" | string; +export type Property$BorderImageRepeat = Globals | "repeat" | "round" | "space" | "stretch" | string; -export type BorderImageSliceProperty = Globals | string | number; +export type Property$BorderImageSlice = Globals | string | number; -export type BorderImageSourceProperty = Globals | "none" | string; +export type Property$BorderImageSource = Globals | "none" | string; -export type BorderImageWidthProperty<TLength> = Globals | TLength | "auto" | string | number; +export type Property$BorderImageWidth<TLength = string | 0> = Globals | TLength | "auto" | string | number; -export type BorderInlineProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderInline<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderInlineColorProperty = Globals | Color | string; +export type Property$BorderInlineColor = Globals | DataType$Color | string; -export type BorderInlineEndProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderInlineEnd<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderInlineEndColorProperty = Globals | Color; +export type Property$BorderInlineEndColor = Globals | DataType$Color; -export type BorderInlineEndStyleProperty = Globals | LineStyle; +export type Property$BorderInlineEndStyle = Globals | DataType$LineStyle; -export type BorderInlineEndWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderInlineEndWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderInlineStartProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderInlineStart<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderInlineStartColorProperty = Globals | Color; +export type Property$BorderInlineStartColor = Globals | DataType$Color; -export type BorderInlineStartStyleProperty = Globals | LineStyle; +export type Property$BorderInlineStartStyle = Globals | DataType$LineStyle; -export type BorderInlineStartWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderInlineStartWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderInlineStyleProperty = Globals | LineStyle; +export type Property$BorderInlineStyle = Globals | DataType$LineStyle; -export type BorderInlineWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderInlineWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderLeftProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderLeft<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderLeftColorProperty = Globals | Color; +export type Property$BorderLeftColor = Globals | DataType$Color; -export type BorderLeftStyleProperty = Globals | LineStyle; +export type Property$BorderLeftStyle = Globals | DataType$LineStyle; -export type BorderLeftWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderLeftWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderRightProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderRight<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderRightColorProperty = Globals | Color; +export type Property$BorderRightColor = Globals | DataType$Color; -export type BorderRightStyleProperty = Globals | LineStyle; +export type Property$BorderRightStyle = Globals | DataType$LineStyle; -export type BorderRightWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderRightWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderSpacingProperty<TLength> = Globals | TLength | string; +export type Property$BorderSpacing<TLength = string | 0> = Globals | TLength | string; -export type BorderStartEndRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderStartEndRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderStartStartRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderStartStartRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderStyleProperty = Globals | LineStyle | string; +export type Property$BorderStyle = Globals | DataType$LineStyle | string; -export type BorderTopProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$BorderTop<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type BorderTopColorProperty = Globals | Color; +export type Property$BorderTopColor = Globals | DataType$Color; -export type BorderTopLeftRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderTopLeftRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderTopRightRadiusProperty<TLength> = Globals | TLength | string; +export type Property$BorderTopRightRadius<TLength = string | 0> = Globals | TLength | string; -export type BorderTopStyleProperty = Globals | LineStyle; +export type Property$BorderTopStyle = Globals | DataType$LineStyle; -export type BorderTopWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$BorderTopWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type BorderWidthProperty<TLength> = Globals | LineWidth<TLength> | string; +export type Property$BorderWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; -export type BottomProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$Bottom<TLength = string | 0> = Globals | TLength | "auto" | string; -export type BoxAlignProperty = Globals | "baseline" | "center" | "end" | "start" | "stretch"; +export type Property$BoxAlign = Globals | "baseline" | "center" | "end" | "start" | "stretch"; -export type BoxDecorationBreakProperty = Globals | "clone" | "slice"; +export type Property$BoxDecorationBreak = Globals | "clone" | "slice"; -export type BoxDirectionProperty = Globals | "inherit" | "normal" | "reverse"; +export type Property$BoxDirection = Globals | "inherit" | "normal" | "reverse"; -export type BoxLinesProperty = Globals | "multiple" | "single"; +export type Property$BoxFlex = Globals | number; -export type BoxOrientProperty = Globals | "block-axis" | "horizontal" | "inherit" | "inline-axis" | "vertical"; +export type Property$BoxFlexGroup = Globals | number; -export type BoxPackProperty = Globals | "center" | "end" | "justify" | "start"; +export type Property$BoxLines = Globals | "multiple" | "single"; -export type BoxShadowProperty = Globals | "none" | string; +export type Property$BoxOrdinalGroup = Globals | number; -export type BoxSizingProperty = Globals | "border-box" | "content-box"; +export type Property$BoxOrient = Globals | "block-axis" | "horizontal" | "inherit" | "inline-axis" | "vertical"; -export type BreakAfterProperty = +export type Property$BoxPack = Globals | "center" | "end" | "justify" | "start"; + +export type Property$BoxShadow = Globals | "none" | string; + +export type Property$BoxSizing = Globals | "border-box" | "content-box"; + +export type Property$BreakAfter = | Globals | "all" | "always" @@ -4460,7 +4426,7 @@ export type BreakAfterProperty = | "right" | "verso"; -export type BreakBeforeProperty = +export type Property$BreakBefore = | Globals | "all" | "always" @@ -4477,57 +4443,77 @@ export type BreakBeforeProperty = | "right" | "verso"; -export type BreakInsideProperty = Globals | "auto" | "avoid" | "avoid-column" | "avoid-page" | "avoid-region"; +export type Property$BreakInside = Globals | "auto" | "avoid" | "avoid-column" | "avoid-page" | "avoid-region"; -export type CaptionSideProperty = Globals | "block-end" | "block-start" | "bottom" | "inline-end" | "inline-start" | "top"; +export type Property$CaptionSide = Globals | "block-end" | "block-start" | "bottom" | "inline-end" | "inline-start" | "top"; -export type CaretColorProperty = Globals | Color | "auto"; +export type Property$Caret = Globals | DataType$Color | "auto" | "bar" | "block" | "underscore" | string; -export type ClearProperty = Globals | "both" | "inline-end" | "inline-start" | "left" | "none" | "right"; +export type Property$CaretColor = Globals | DataType$Color | "auto"; -export type ClipProperty = Globals | "auto" | string; +export type Property$CaretShape = Globals | "auto" | "bar" | "block" | "underscore"; -export type ClipPathProperty = Globals | GeometryBox | "none" | string; +export type Property$Clear = Globals | "both" | "inline-end" | "inline-start" | "left" | "none" | "right"; -export type ColorProperty = Globals | Color; +export type Property$Clip = Globals | "auto" | string; -export type PrintColorAdjustProperty = Globals | "economy" | "exact"; +export type Property$ClipPath = Globals | DataType$GeometryBox | "none" | string; -export type ColorSchemeProperty = Globals | "dark" | "light" | "normal" | string; +export type Property$Color = Globals | DataType$Color; -export type ColumnCountProperty = Globals | "auto" | number; +export type Property$PrintColorAdjust = Globals | "economy" | "exact"; -export type ColumnFillProperty = Globals | "auto" | "balance"; +export type Property$ColorScheme = Globals | "dark" | "light" | "normal" | string; -export type ColumnGapProperty<TLength> = Globals | TLength | "normal" | string; +export type Property$ColumnCount = Globals | "auto" | number; -export type ColumnRuleProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$ColumnFill = Globals | "auto" | "balance" | "balance-all"; -export type ColumnRuleColorProperty = Globals | Color; +export type Property$ColumnGap<TLength = string | 0> = Globals | TLength | "normal" | string; -export type ColumnRuleStyleProperty = Globals | LineStyle | string; +export type Property$ColumnRule<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type ColumnRuleWidthProperty<TLength> = Globals | LineWidth<TLength> | string; +export type Property$ColumnRuleColor = Globals | DataType$Color; -export type ColumnSpanProperty = Globals | "all" | "none"; +export type Property$ColumnRuleStyle = Globals | DataType$LineStyle | string; -export type ColumnWidthProperty<TLength> = Globals | TLength | "auto"; +export type Property$ColumnRuleWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; -export type ColumnsProperty<TLength> = Globals | TLength | "auto" | string | number; +export type Property$ColumnSpan = Globals | "all" | "none"; -export type ContainProperty = Globals | "content" | "inline-size" | "layout" | "none" | "paint" | "size" | "strict" | "style" | string; +export type Property$ColumnWidth<TLength = string | 0> = Globals | TLength | "auto"; -export type ContentProperty = Globals | ContentList | "none" | "normal" | string; +export type Property$Columns<TLength = string | 0> = Globals | TLength | "auto" | string | number; -export type ContentVisibilityProperty = Globals | "auto" | "hidden" | "visible"; +export type Property$Contain = Globals | "content" | "inline-size" | "layout" | "none" | "paint" | "size" | "strict" | "style" | string; -export type CounterIncrementProperty = Globals | "none" | string; +export type Property$ContainIntrinsicBlockSize<TLength = string | 0> = Globals | TLength | "none" | string; -export type CounterResetProperty = Globals | "none" | string; +export type Property$ContainIntrinsicHeight<TLength = string | 0> = Globals | TLength | "none" | string; -export type CounterSetProperty = Globals | "none" | string; +export type Property$ContainIntrinsicInlineSize<TLength = string | 0> = Globals | TLength | "none" | string; -export type CursorProperty = +export type Property$ContainIntrinsicSize<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$ContainIntrinsicWidth<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$Container = Globals | "none" | string; + +export type Property$ContainerName = Globals | "none" | string; + +export type Property$ContainerType = Globals | "inline-size" | "normal" | "size"; + +export type Property$Content = Globals | DataType$ContentList | "none" | "normal" | string; + +export type Property$ContentVisibility = Globals | "auto" | "hidden" | "visible"; + +export type Property$CounterIncrement = Globals | "none" | string; + +export type Property$CounterReset = Globals | "none" | string; + +export type Property$CounterSet = Globals | "none" | string; + +export type Property$Cursor = | Globals | "-moz-grab" | "-webkit-grab" @@ -4569,17 +4555,26 @@ export type CursorProperty = | "zoom-out" | string; -export type DirectionProperty = Globals | "ltr" | "rtl"; +export type Property$Direction = Globals | "ltr" | "rtl"; -export type DisplayProperty = Globals | DisplayOutside | DisplayInside | DisplayInternal | DisplayLegacy | "contents" | "list-item" | "none" | string; +export type Property$Display = + | Globals + | DataType$DisplayOutside + | DataType$DisplayInside + | DataType$DisplayInternal + | DataType$DisplayLegacy + | "contents" + | "list-item" + | "none" + | string; -export type EmptyCellsProperty = Globals | "hide" | "show"; +export type Property$EmptyCells = Globals | "hide" | "show"; -export type FilterProperty = Globals | "none" | string; +export type Property$Filter = Globals | "none" | string; -export type FlexProperty<TLength> = Globals | TLength | "auto" | "content" | "fit-content" | "max-content" | "min-content" | "none" | string | number; +export type Property$Flex<TLength = string | 0> = Globals | TLength | "auto" | "content" | "fit-content" | "max-content" | "min-content" | "none" | string | number; -export type FlexBasisProperty<TLength> = +export type Property$FlexBasis<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -4593,41 +4588,55 @@ export type FlexBasisProperty<TLength> = | "min-content" | string; -export type FlexDirectionProperty = Globals | "column" | "column-reverse" | "row" | "row-reverse"; +export type Property$FlexDirection = Globals | "column" | "column-reverse" | "row" | "row-reverse"; -export type FlexFlowProperty = Globals | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | string; +export type Property$FlexFlow = Globals | "column" | "column-reverse" | "nowrap" | "row" | "row-reverse" | "wrap" | "wrap-reverse" | string; -export type FlexWrapProperty = Globals | "nowrap" | "wrap" | "wrap-reverse"; +export type Property$FlexGrow = Globals | number; -export type FloatProperty = Globals | "inline-end" | "inline-start" | "left" | "none" | "right"; +export type Property$FlexShrink = Globals | number; -export type FontProperty = Globals | "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar" | string; +export type Property$FlexWrap = Globals | "nowrap" | "wrap" | "wrap-reverse"; -export type FontFamilyProperty = Globals | GenericFamily | string; +export type Property$Float = Globals | "inline-end" | "inline-start" | "left" | "none" | "right"; -export type FontFeatureSettingsProperty = Globals | "normal" | string; +export type Property$Font = Globals | "caption" | "icon" | "menu" | "message-box" | "small-caption" | "status-bar" | string; -export type FontKerningProperty = Globals | "auto" | "none" | "normal"; +export type Property$FontFamily = Globals | DataType$GenericFamily | string; -export type FontLanguageOverrideProperty = Globals | "normal" | string; +export type Property$FontFeatureSettings = Globals | "normal" | string; -export type FontOpticalSizingProperty = Globals | "auto" | "none"; +export type Property$FontKerning = Globals | "auto" | "none" | "normal"; -export type FontSizeProperty<TLength> = Globals | AbsoluteSize | TLength | "larger" | "smaller" | string; +export type Property$FontLanguageOverride = Globals | "normal" | string; -export type FontSizeAdjustProperty = Globals | "from-font" | "none" | string | number; +export type Property$FontOpticalSizing = Globals | "auto" | "none"; -export type FontSmoothProperty<TLength> = Globals | AbsoluteSize | TLength | "always" | "auto" | "never"; +export type Property$FontPalette = Globals | "dark" | "light" | "normal" | string; -export type FontStretchProperty = Globals | FontStretchAbsolute; +export type Property$FontSize<TLength = string | 0> = Globals | DataType$AbsoluteSize | TLength | "larger" | "smaller" | string; -export type FontStyleProperty = Globals | "italic" | "normal" | "oblique" | string; +export type Property$FontSizeAdjust = Globals | "from-font" | "none" | string | number; -export type FontSynthesisProperty = Globals | "none" | "small-caps" | "style" | "weight" | string; +export type Property$FontSmooth<TLength = string | 0> = Globals | DataType$AbsoluteSize | TLength | "always" | "auto" | "never"; -export type FontVariantProperty = +export type Property$FontStretch = Globals | DataType$FontStretchAbsolute; + +export type Property$FontStyle = Globals | "italic" | "normal" | "oblique" | string; + +export type Property$FontSynthesis = Globals | "none" | "position" | "small-caps" | "style" | "weight" | string; + +export type Property$FontSynthesisPosition = Globals | "auto" | "none"; + +export type Property$FontSynthesisSmallCaps = Globals | "auto" | "none"; + +export type Property$FontSynthesisStyle = Globals | "auto" | "none"; + +export type Property$FontSynthesisWeight = Globals | "auto" | "none"; + +export type Property$FontVariant = | Globals - | EastAsianVariantValues + | DataType$EastAsianVariantValues | "all-petite-caps" | "all-small-caps" | "common-ligatures" @@ -4658,13 +4667,15 @@ export type FontVariantProperty = | "unicase" | string; -export type FontVariantAlternatesProperty = Globals | "historical-forms" | "normal" | string; +export type Property$FontVariantAlternates = Globals | "historical-forms" | "normal" | string; -export type FontVariantCapsProperty = Globals | "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase"; +export type Property$FontVariantCaps = Globals | "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase"; -export type FontVariantEastAsianProperty = Globals | EastAsianVariantValues | "full-width" | "normal" | "proportional-width" | "ruby" | string; +export type Property$FontVariantEastAsian = Globals | DataType$EastAsianVariantValues | "full-width" | "normal" | "proportional-width" | "ruby" | string; -export type FontVariantLigaturesProperty = +export type Property$FontVariantEmoji = Globals | "emoji" | "normal" | "text" | "unicode"; + +export type Property$FontVariantLigatures = | Globals | "common-ligatures" | "contextual" @@ -4678,7 +4689,7 @@ export type FontVariantLigaturesProperty = | "normal" | string; -export type FontVariantNumericProperty = +export type Property$FontVariantNumeric = | Globals | "diagonal-fractions" | "lining-nums" @@ -4691,55 +4702,55 @@ export type FontVariantNumericProperty = | "tabular-nums" | string; -export type FontVariantPositionProperty = Globals | "normal" | "sub" | "super"; +export type Property$FontVariantPosition = Globals | "normal" | "sub" | "super"; -export type FontVariationSettingsProperty = Globals | "normal" | string; +export type Property$FontVariationSettings = Globals | "normal" | string; -export type FontWeightProperty = Globals | FontWeightAbsolute | "bolder" | "lighter"; +export type Property$FontWeight = Globals | DataType$FontWeightAbsolute | "bolder" | "lighter"; -export type ForcedColorAdjustProperty = Globals | "auto" | "none"; +export type Property$ForcedColorAdjust = Globals | "auto" | "none"; -export type GapProperty<TLength> = Globals | TLength | "normal" | string; +export type Property$Gap<TLength = string | 0> = Globals | TLength | "normal" | string; -export type GridProperty = Globals | "none" | string; +export type Property$Grid = Globals | "none" | string; -export type GridAreaProperty = Globals | GridLine | string; +export type Property$GridArea = Globals | DataType$GridLine | string; -export type GridAutoColumnsProperty<TLength> = Globals | TrackBreadth<TLength> | string; +export type Property$GridAutoColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | string; -export type GridAutoFlowProperty = Globals | "column" | "dense" | "row" | string; +export type Property$GridAutoFlow = Globals | "column" | "dense" | "row" | string; -export type GridAutoRowsProperty<TLength> = Globals | TrackBreadth<TLength> | string; +export type Property$GridAutoRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | string; -export type GridColumnProperty = Globals | GridLine | string; +export type Property$GridColumn = Globals | DataType$GridLine | string; -export type GridColumnEndProperty = Globals | GridLine; +export type Property$GridColumnEnd = Globals | DataType$GridLine; -export type GridColumnGapProperty<TLength> = Globals | TLength | string; +export type Property$GridColumnGap<TLength = string | 0> = Globals | TLength | string; -export type GridColumnStartProperty = Globals | GridLine; +export type Property$GridColumnStart = Globals | DataType$GridLine; -export type GridGapProperty<TLength> = Globals | TLength | string; +export type Property$GridGap<TLength = string | 0> = Globals | TLength | string; -export type GridRowProperty = Globals | GridLine | string; +export type Property$GridRow = Globals | DataType$GridLine | string; -export type GridRowEndProperty = Globals | GridLine; +export type Property$GridRowEnd = Globals | DataType$GridLine; -export type GridRowGapProperty<TLength> = Globals | TLength | string; +export type Property$GridRowGap<TLength = string | 0> = Globals | TLength | string; -export type GridRowStartProperty = Globals | GridLine; +export type Property$GridRowStart = Globals | DataType$GridLine; -export type GridTemplateProperty = Globals | "none" | string; +export type Property$GridTemplate = Globals | "none" | string; -export type GridTemplateAreasProperty = Globals | "none" | string; +export type Property$GridTemplateAreas = Globals | "none" | string; -export type GridTemplateColumnsProperty<TLength> = Globals | TrackBreadth<TLength> | "none" | "subgrid" | string; +export type Property$GridTemplateColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | "subgrid" | string; -export type GridTemplateRowsProperty<TLength> = Globals | TrackBreadth<TLength> | "none" | "subgrid" | string; +export type Property$GridTemplateRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | "subgrid" | string; -export type HangingPunctuationProperty = Globals | "allow-end" | "first" | "force-end" | "last" | "none" | string; +export type Property$HangingPunctuation = Globals | "allow-end" | "first" | "force-end" | "last" | "none" | string; -export type HeightProperty<TLength> = +export type Property$Height<TLength = string | 0> = | Globals | TLength | "-moz-max-content" @@ -4751,21 +4762,23 @@ export type HeightProperty<TLength> = | "min-content" | string; -export type HyphenateCharacterProperty = Globals | "auto" | string; +export type Property$HyphenateCharacter = Globals | "auto" | string; -export type HyphensProperty = Globals | "auto" | "manual" | "none"; +export type Property$HyphenateLimitChars = Globals | "auto" | string | number; -export type ImageOrientationProperty = Globals | "flip" | "from-image" | string; +export type Property$Hyphens = Globals | "auto" | "manual" | "none"; -export type ImageRenderingProperty = Globals | "-moz-crisp-edges" | "-webkit-optimize-contrast" | "auto" | "crisp-edges" | "pixelated"; +export type Property$ImageOrientation = Globals | "flip" | "from-image" | string; -export type ImageResolutionProperty = Globals | "from-image" | string; +export type Property$ImageRendering = Globals | "-moz-crisp-edges" | "-webkit-optimize-contrast" | "auto" | "crisp-edges" | "pixelated"; -export type ImeModeProperty = Globals | "active" | "auto" | "disabled" | "inactive" | "normal"; +export type Property$ImageResolution = Globals | "from-image" | string; -export type InitialLetterProperty = Globals | "normal" | string | number; +export type Property$ImeMode = Globals | "active" | "auto" | "disabled" | "inactive" | "normal"; -export type InlineSizeProperty<TLength> = +export type Property$InitialLetter = Globals | "normal" | string | number; + +export type Property$InlineSize<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -4778,115 +4791,119 @@ export type InlineSizeProperty<TLength> = | "min-content" | string; -export type InputSecurityProperty = Globals | "auto" | "none"; +export type Property$InputSecurity = Globals | "auto" | "none"; -export type InsetProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$Inset<TLength = string | 0> = Globals | TLength | "auto" | string; -export type InsetBlockProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$InsetBlock<TLength = string | 0> = Globals | TLength | "auto" | string; -export type InsetBlockEndProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$InsetBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; -export type InsetBlockStartProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$InsetBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; -export type InsetInlineProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$InsetInline<TLength = string | 0> = Globals | TLength | "auto" | string; -export type InsetInlineEndProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$InsetInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; -export type InsetInlineStartProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$InsetInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; -export type IsolationProperty = Globals | "auto" | "isolate"; +export type Property$Isolation = Globals | "auto" | "isolate"; -export type JustifyContentProperty = Globals | ContentDistribution | ContentPosition | "left" | "normal" | "right" | string; +export type Property$JustifyContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "left" | "normal" | "right" | string; -export type JustifyItemsProperty = Globals | SelfPosition | "baseline" | "left" | "legacy" | "normal" | "right" | "stretch" | string; +export type Property$JustifyItems = Globals | DataType$SelfPosition | "baseline" | "left" | "legacy" | "normal" | "right" | "stretch" | string; -export type JustifySelfProperty = Globals | SelfPosition | "auto" | "baseline" | "left" | "normal" | "right" | "stretch" | string; +export type Property$JustifySelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "left" | "normal" | "right" | "stretch" | string; -export type JustifyTracksProperty = Globals | ContentDistribution | ContentPosition | "left" | "normal" | "right" | string; +export type Property$JustifyTracks = Globals | DataType$ContentDistribution | DataType$ContentPosition | "left" | "normal" | "right" | string; -export type LeftProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$Left<TLength = string | 0> = Globals | TLength | "auto" | string; -export type LetterSpacingProperty<TLength> = Globals | TLength | "normal"; +export type Property$LetterSpacing<TLength = string | 0> = Globals | TLength | "normal"; -export type LineBreakProperty = Globals | "anywhere" | "auto" | "loose" | "normal" | "strict"; +export type Property$LineBreak = Globals | "anywhere" | "auto" | "loose" | "normal" | "strict"; -export type LineClampProperty = Globals | "none" | number; +export type Property$LineClamp = Globals | "none" | number; -export type LineHeightProperty<TLength> = Globals | TLength | "normal" | string | number; +export type Property$LineHeight<TLength = string | 0> = Globals | TLength | "normal" | string | number; -export type LineHeightStepProperty<TLength> = Globals | TLength; +export type Property$LineHeightStep<TLength = string | 0> = Globals | TLength; -export type ListStyleProperty = Globals | "inside" | "none" | "outside" | string; +export type Property$ListStyle = Globals | "inside" | "none" | "outside" | string; -export type ListStyleImageProperty = Globals | "none" | string; +export type Property$ListStyleImage = Globals | "none" | string; -export type ListStylePositionProperty = Globals | "inside" | "outside"; +export type Property$ListStylePosition = Globals | "inside" | "outside"; -export type ListStyleTypeProperty = Globals | "none" | string; +export type Property$ListStyleType = Globals | "none" | string; -export type MarginProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$Margin<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginBlockProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginBlock<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginBlockEndProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginBlockStartProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginBottomProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginBottom<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginInlineProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginInline<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginInlineEndProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginInlineStartProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginLeftProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginLeft<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginRightProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginRight<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MarginTopProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$MarginTop<TLength = string | 0> = Globals | TLength | "auto" | string; -export type MaskProperty<TLength> = Globals | MaskLayer<TLength> | string; +export type Property$MarginTrim = Globals | "all" | "in-flow" | "none"; -export type MaskBorderProperty = Globals | "alpha" | "luminance" | "none" | "repeat" | "round" | "space" | "stretch" | string | number; +export type Property$Mask<TLength = string | 0> = Globals | DataType$MaskLayer<TLength> | string; -export type MaskBorderModeProperty = Globals | "alpha" | "luminance"; +export type Property$MaskBorder = Globals | "alpha" | "luminance" | "none" | "repeat" | "round" | "space" | "stretch" | string | number; -export type MaskBorderOutsetProperty<TLength> = Globals | TLength | string | number; +export type Property$MaskBorderMode = Globals | "alpha" | "luminance"; -export type MaskBorderRepeatProperty = Globals | "repeat" | "round" | "space" | "stretch" | string; +export type Property$MaskBorderOutset<TLength = string | 0> = Globals | TLength | string | number; -export type MaskBorderSliceProperty = Globals | string | number; +export type Property$MaskBorderRepeat = Globals | "repeat" | "round" | "space" | "stretch" | string; -export type MaskBorderSourceProperty = Globals | "none" | string; +export type Property$MaskBorderSlice = Globals | string | number; -export type MaskBorderWidthProperty<TLength> = Globals | TLength | "auto" | string | number; +export type Property$MaskBorderSource = Globals | "none" | string; -export type MaskClipProperty = Globals | GeometryBox | "no-clip" | string; +export type Property$MaskBorderWidth<TLength = string | 0> = Globals | TLength | "auto" | string | number; -export type MaskCompositeProperty = Globals | CompositingOperator | string; +export type Property$MaskClip = Globals | DataType$GeometryBox | "no-clip" | string; -export type MaskImageProperty = Globals | "none" | string; +export type Property$MaskComposite = Globals | DataType$CompositingOperator | string; -export type MaskModeProperty = Globals | MaskingMode | string; +export type Property$MaskImage = Globals | "none" | string; -export type MaskOriginProperty = Globals | Box | "margin-box" | string; +export type Property$MaskMode = Globals | DataType$MaskingMode | string; -export type MaskPositionProperty<TLength> = Globals | Position<TLength> | string; +export type Property$MaskOrigin = Globals | DataType$GeometryBox | string; -export type MaskRepeatProperty = Globals | RepeatStyle | string; +export type Property$MaskPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | string; -export type MaskSizeProperty<TLength> = Globals | BgSize<TLength> | string; +export type Property$MaskRepeat = Globals | DataType$RepeatStyle | string; -export type MaskTypeProperty = Globals | "alpha" | "luminance"; +export type Property$MaskSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; -export type MathDepthProperty = Globals | "auto-add" | string | number; +export type Property$MaskType = Globals | "alpha" | "luminance"; -export type MathShiftProperty = Globals | "compact" | "normal"; +export type Property$MasonryAutoFlow = Globals | "definite-first" | "next" | "ordered" | "pack" | string; -export type MathStyleProperty = Globals | "compact" | "normal"; +export type Property$MathDepth = Globals | "auto-add" | string | number; -export type MaxBlockSizeProperty<TLength> = +export type Property$MathShift = Globals | "compact" | "normal"; + +export type Property$MathStyle = Globals | "compact" | "normal"; + +export type Property$MaxBlockSize<TLength = string | 0> = | Globals | TLength | "-moz-max-content" @@ -4898,7 +4915,7 @@ export type MaxBlockSizeProperty<TLength> = | "none" | string; -export type MaxHeightProperty<TLength> = +export type Property$MaxHeight<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -4914,7 +4931,7 @@ export type MaxHeightProperty<TLength> = | "none" | string; -export type MaxInlineSizeProperty<TLength> = +export type Property$MaxInlineSize<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -4927,9 +4944,9 @@ export type MaxInlineSizeProperty<TLength> = | "none" | string; -export type MaxLinesProperty = Globals | "none" | number; +export type Property$MaxLines = Globals | "none" | number; -export type MaxWidthProperty<TLength> = +export type Property$MaxWidth<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -4945,7 +4962,7 @@ export type MaxWidthProperty<TLength> = | "none" | string; -export type MinBlockSizeProperty<TLength> = +export type Property$MinBlockSize<TLength = string | 0> = | Globals | TLength | "-moz-max-content" @@ -4957,7 +4974,7 @@ export type MinBlockSizeProperty<TLength> = | "min-content" | string; -export type MinHeightProperty<TLength> = +export type Property$MinHeight<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -4973,7 +4990,7 @@ export type MinHeightProperty<TLength> = | "min-content" | string; -export type MinInlineSizeProperty<TLength> = +export type Property$MinInlineSize<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -4986,7 +5003,7 @@ export type MinInlineSizeProperty<TLength> = | "min-content" | string; -export type MinWidthProperty<TLength> = +export type Property$MinWidth<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -5004,213 +5021,229 @@ export type MinWidthProperty<TLength> = | "min-intrinsic" | string; -export type MixBlendModeProperty = Globals | BlendMode | "plus-lighter"; +export type Property$MixBlendMode = Globals | DataType$BlendMode | "plus-lighter"; -export type OffsetProperty<TLength> = Globals | Position<TLength> | GeometryBox | "auto" | "none" | string; +export type Property$Offset<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto" | "none" | "normal" | string; -export type OffsetDistanceProperty<TLength> = Globals | TLength | string; +export type Property$OffsetDistance<TLength = string | 0> = Globals | TLength | string; -export type OffsetPathProperty = Globals | GeometryBox | "none" | string; +export type Property$OffsetPath = Globals | "none" | string; -export type OffsetRotateProperty = Globals | "auto" | "reverse" | string; +export type Property$OffsetRotate = Globals | "auto" | "reverse" | string; -export type ObjectFitProperty = Globals | "contain" | "cover" | "fill" | "none" | "scale-down"; +export type Property$ObjectFit = Globals | "contain" | "cover" | "fill" | "none" | "scale-down"; -export type ObjectPositionProperty<TLength> = Globals | Position<TLength>; +export type Property$ObjectPosition<TLength = string | 0> = Globals | DataType$Position<TLength>; -export type OffsetAnchorProperty<TLength> = Globals | Position<TLength> | "auto"; +export type Property$OffsetAnchor<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto"; -export type OpacityProperty = Globals | string | number; +export type Property$OffsetPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | "auto" | "normal"; -export type OutlineProperty<TLength> = Globals | Color | LineStyle | LineWidth<TLength> | "auto" | "invert" | string; +export type Property$Opacity = Globals | string | number; -export type OutlineColorProperty = Globals | Color | "invert"; +export type Property$Order = Globals | number; -export type OutlineOffsetProperty<TLength> = Globals | TLength; +export type Property$Orphans = Globals | number; -export type OutlineStyleProperty = Globals | LineStyle | "auto" | string; +export type Property$Outline<TLength = string | 0> = Globals | DataType$Color | DataType$LineStyle | DataType$LineWidth<TLength> | "auto" | "invert" | string; -export type OutlineWidthProperty<TLength> = Globals | LineWidth<TLength>; +export type Property$OutlineColor = Globals | DataType$Color | "invert"; -export type OverflowProperty = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible" | string; +export type Property$OutlineOffset<TLength = string | 0> = Globals | TLength; -export type OverflowAnchorProperty = Globals | "auto" | "none"; +export type Property$OutlineStyle = Globals | DataType$LineStyle | "auto" | string; -export type OverflowBlockProperty = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; +export type Property$OutlineWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength>; -export type OverflowClipBoxProperty = Globals | "content-box" | "padding-box"; +export type Property$Overflow = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible" | string; -export type OverflowClipMarginProperty<TLength> = Globals | VisualBox | TLength | string; +export type Property$OverflowAnchor = Globals | "auto" | "none"; -export type OverflowInlineProperty = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; +export type Property$OverflowBlock = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; -export type OverflowWrapProperty = Globals | "anywhere" | "break-word" | "normal"; +export type Property$OverflowClipBox = Globals | "content-box" | "padding-box"; -export type OverflowXProperty = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; +export type Property$OverflowClipMargin<TLength = string | 0> = Globals | DataType$VisualBox | TLength | string; -export type OverflowYProperty = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; +export type Property$OverflowInline = Globals | "auto" | "clip" | "hidden" | "scroll" | "visible"; -export type OverscrollBehaviorProperty = Globals | "auto" | "contain" | "none" | string; +export type Property$OverflowWrap = Globals | "anywhere" | "break-word" | "normal"; -export type OverscrollBehaviorBlockProperty = Globals | "auto" | "contain" | "none"; +export type Property$OverflowX = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; -export type OverscrollBehaviorInlineProperty = Globals | "auto" | "contain" | "none"; +export type Property$OverflowY = Globals | "-moz-hidden-unscrollable" | "auto" | "clip" | "hidden" | "scroll" | "visible"; -export type OverscrollBehaviorXProperty = Globals | "auto" | "contain" | "none"; +export type Property$Overlay = Globals | "auto" | "none"; -export type OverscrollBehaviorYProperty = Globals | "auto" | "contain" | "none"; +export type Property$OverscrollBehavior = Globals | "auto" | "contain" | "none" | string; -export type PaddingProperty<TLength> = Globals | TLength | string; +export type Property$OverscrollBehaviorBlock = Globals | "auto" | "contain" | "none"; -export type PaddingBlockProperty<TLength> = Globals | TLength | string; +export type Property$OverscrollBehaviorInline = Globals | "auto" | "contain" | "none"; -export type PaddingBlockEndProperty<TLength> = Globals | TLength | string; +export type Property$OverscrollBehaviorX = Globals | "auto" | "contain" | "none"; -export type PaddingBlockStartProperty<TLength> = Globals | TLength | string; +export type Property$OverscrollBehaviorY = Globals | "auto" | "contain" | "none"; -export type PaddingBottomProperty<TLength> = Globals | TLength | string; +export type Property$Padding<TLength = string | 0> = Globals | TLength | string; -export type PaddingInlineProperty<TLength> = Globals | TLength | string; +export type Property$PaddingBlock<TLength = string | 0> = Globals | TLength | string; -export type PaddingInlineEndProperty<TLength> = Globals | TLength | string; +export type Property$PaddingBlockEnd<TLength = string | 0> = Globals | TLength | string; -export type PaddingInlineStartProperty<TLength> = Globals | TLength | string; +export type Property$PaddingBlockStart<TLength = string | 0> = Globals | TLength | string; -export type PaddingLeftProperty<TLength> = Globals | TLength | string; +export type Property$PaddingBottom<TLength = string | 0> = Globals | TLength | string; -export type PaddingRightProperty<TLength> = Globals | TLength | string; +export type Property$PaddingInline<TLength = string | 0> = Globals | TLength | string; -export type PaddingTopProperty<TLength> = Globals | TLength | string; +export type Property$PaddingInlineEnd<TLength = string | 0> = Globals | TLength | string; -export type PageBreakAfterProperty = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; +export type Property$PaddingInlineStart<TLength = string | 0> = Globals | TLength | string; -export type PageBreakBeforeProperty = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; +export type Property$PaddingLeft<TLength = string | 0> = Globals | TLength | string; -export type PageBreakInsideProperty = Globals | "auto" | "avoid"; +export type Property$PaddingRight<TLength = string | 0> = Globals | TLength | string; -export type PaintOrderProperty = Globals | "fill" | "markers" | "normal" | "stroke" | string; +export type Property$PaddingTop<TLength = string | 0> = Globals | TLength | string; -export type PerspectiveProperty<TLength> = Globals | TLength | "none"; +export type Property$Page = Globals | "auto" | string; -export type PerspectiveOriginProperty<TLength> = Globals | Position<TLength>; +export type Property$PageBreakAfter = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; -export type PlaceContentProperty = Globals | ContentDistribution | ContentPosition | "baseline" | "normal" | string; +export type Property$PageBreakBefore = Globals | "always" | "auto" | "avoid" | "left" | "recto" | "right" | "verso"; -export type PlaceItemsProperty = Globals | SelfPosition | "baseline" | "normal" | "stretch" | string; +export type Property$PageBreakInside = Globals | "auto" | "avoid"; -export type PlaceSelfProperty = Globals | SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; +export type Property$PaintOrder = Globals | "fill" | "markers" | "normal" | "stroke" | string; -export type PointerEventsProperty = Globals | "all" | "auto" | "fill" | "inherit" | "none" | "painted" | "stroke" | "visible" | "visibleFill" | "visiblePainted" | "visibleStroke"; +export type Property$Perspective<TLength = string | 0> = Globals | TLength | "none"; -export type PositionProperty = Globals | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"; +export type Property$PerspectiveOrigin<TLength = string | 0> = Globals | DataType$Position<TLength>; -export type QuotesProperty = Globals | "auto" | "none" | string; +export type Property$PlaceContent = Globals | DataType$ContentDistribution | DataType$ContentPosition | "baseline" | "normal" | string; -export type ResizeProperty = Globals | "block" | "both" | "horizontal" | "inline" | "none" | "vertical"; +export type Property$PlaceItems = Globals | DataType$SelfPosition | "baseline" | "normal" | "stretch" | string; -export type RightProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$PlaceSelf = Globals | DataType$SelfPosition | "auto" | "baseline" | "normal" | "stretch" | string; -export type RotateProperty = Globals | "none" | string; +export type Property$PointerEvents = Globals | "all" | "auto" | "fill" | "inherit" | "none" | "painted" | "stroke" | "visible" | "visibleFill" | "visiblePainted" | "visibleStroke"; -export type RowGapProperty<TLength> = Globals | TLength | "normal" | string; +export type Property$Position = Globals | "-webkit-sticky" | "absolute" | "fixed" | "relative" | "static" | "sticky"; -export type RubyAlignProperty = Globals | "center" | "space-around" | "space-between" | "start"; +export type Property$Quotes = Globals | "auto" | "none" | string; -export type RubyMergeProperty = Globals | "auto" | "collapse" | "separate"; +export type Property$Resize = Globals | "block" | "both" | "horizontal" | "inline" | "none" | "vertical"; -export type RubyPositionProperty = Globals | "alternate" | "over" | "under" | string; +export type Property$Right<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScaleProperty = Globals | "none" | string | number; +export type Property$Rotate = Globals | "none" | string; -export type ScrollBehaviorProperty = Globals | "auto" | "smooth"; +export type Property$RowGap<TLength = string | 0> = Globals | TLength | "normal" | string; -export type ScrollMarginProperty<TLength> = Globals | TLength | string; +export type Property$RubyAlign = Globals | "center" | "space-around" | "space-between" | "start"; -export type ScrollMarginBlockProperty<TLength> = Globals | TLength | string; +export type Property$RubyMerge = Globals | "auto" | "collapse" | "separate"; -export type ScrollMarginBlockEndProperty<TLength> = Globals | TLength; +export type Property$RubyPosition = Globals | "alternate" | "inter-character" | "over" | "under" | string; -export type ScrollMarginBlockStartProperty<TLength> = Globals | TLength; +export type Property$Scale = Globals | "none" | string | number; -export type ScrollMarginBottomProperty<TLength> = Globals | TLength; +export type Property$ScrollBehavior = Globals | "auto" | "smooth"; -export type ScrollMarginInlineProperty<TLength> = Globals | TLength | string; +export type Property$ScrollMargin<TLength = string | 0> = Globals | TLength | string; -export type ScrollMarginInlineEndProperty<TLength> = Globals | TLength; +export type Property$ScrollMarginBlock<TLength = string | 0> = Globals | TLength | string; -export type ScrollMarginInlineStartProperty<TLength> = Globals | TLength; +export type Property$ScrollMarginBlockEnd<TLength = string | 0> = Globals | TLength; -export type ScrollMarginLeftProperty<TLength> = Globals | TLength; +export type Property$ScrollMarginBlockStart<TLength = string | 0> = Globals | TLength; -export type ScrollMarginRightProperty<TLength> = Globals | TLength; +export type Property$ScrollMarginBottom<TLength = string | 0> = Globals | TLength; -export type ScrollMarginTopProperty<TLength> = Globals | TLength; +export type Property$ScrollMarginInline<TLength = string | 0> = Globals | TLength | string; -export type ScrollPaddingProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollMarginInlineEnd<TLength = string | 0> = Globals | TLength; -export type ScrollPaddingBlockProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollMarginInlineStart<TLength = string | 0> = Globals | TLength; -export type ScrollPaddingBlockEndProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollMarginLeft<TLength = string | 0> = Globals | TLength; -export type ScrollPaddingBlockStartProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollMarginRight<TLength = string | 0> = Globals | TLength; -export type ScrollPaddingBottomProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollMarginTop<TLength = string | 0> = Globals | TLength; -export type ScrollPaddingInlineProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollPadding<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollPaddingInlineEndProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollPaddingBlock<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollPaddingInlineStartProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollPaddingBlockEnd<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollPaddingLeftProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollPaddingBlockStart<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollPaddingRightProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollPaddingBottom<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollPaddingTopProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$ScrollPaddingInline<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollSnapAlignProperty = Globals | "center" | "end" | "none" | "start" | string; +export type Property$ScrollPaddingInlineEnd<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollSnapCoordinateProperty<TLength> = Globals | Position<TLength> | "none" | string; +export type Property$ScrollPaddingInlineStart<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollSnapDestinationProperty<TLength> = Globals | Position<TLength>; +export type Property$ScrollPaddingLeft<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollSnapPointsXProperty = Globals | "none" | string; +export type Property$ScrollPaddingRight<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollSnapPointsYProperty = Globals | "none" | string; +export type Property$ScrollPaddingTop<TLength = string | 0> = Globals | TLength | "auto" | string; -export type ScrollSnapStopProperty = Globals | "always" | "normal"; +export type Property$ScrollSnapAlign = Globals | "center" | "end" | "none" | "start" | string; -export type ScrollSnapTypeProperty = Globals | "block" | "both" | "inline" | "none" | "x" | "y" | string; +export type Property$ScrollSnapCoordinate<TLength = string | 0> = Globals | DataType$Position<TLength> | "none" | string; -export type ScrollSnapTypeXProperty = Globals | "mandatory" | "none" | "proximity"; +export type Property$ScrollSnapDestination<TLength = string | 0> = Globals | DataType$Position<TLength>; -export type ScrollSnapTypeYProperty = Globals | "mandatory" | "none" | "proximity"; +export type Property$ScrollSnapPointsX = Globals | "none" | string; -export type ScrollbarColorProperty = Globals | Color | "auto"; +export type Property$ScrollSnapPointsY = Globals | "none" | string; -export type ScrollbarGutterProperty = Globals | "auto" | "stable" | string; +export type Property$ScrollSnapStop = Globals | "always" | "normal"; -export type ScrollbarWidthProperty = Globals | "auto" | "none" | "thin"; +export type Property$ScrollSnapType = Globals | "block" | "both" | "inline" | "none" | "x" | "y" | string; -export type ShapeImageThresholdProperty = Globals | string | number; +export type Property$ScrollSnapTypeX = Globals | "mandatory" | "none" | "proximity"; -export type ShapeMarginProperty<TLength> = Globals | TLength | string; +export type Property$ScrollSnapTypeY = Globals | "mandatory" | "none" | "proximity"; -export type ShapeOutsideProperty = Globals | Box | "margin-box" | "none" | string; +export type Property$ScrollTimeline = Globals | "none" | string; -export type TabSizeProperty<TLength> = Globals | TLength | number; +export type Property$ScrollTimelineAxis = Globals | "block" | "inline" | "x" | "y" | string; -export type TableLayoutProperty = Globals | "auto" | "fixed"; +export type Property$ScrollTimelineName = Globals | "none" | string; -export type TextAlignProperty = Globals | "center" | "end" | "justify" | "left" | "match-parent" | "right" | "start"; +export type Property$ScrollbarColor = Globals | "auto" | string; -export type TextAlignLastProperty = Globals | "auto" | "center" | "end" | "justify" | "left" | "right" | "start"; +export type Property$ScrollbarGutter = Globals | "auto" | "stable" | string; -export type TextCombineUprightProperty = Globals | "-ms-text-combine-horizontal" | "all" | "digits" | "none" | string; +export type Property$ScrollbarWidth = Globals | "auto" | "none" | "thin"; -export type TextDecorationProperty<TLength> = +export type Property$ShapeImageThreshold = Globals | string | number; + +export type Property$ShapeMargin<TLength = string | 0> = Globals | TLength | string; + +export type Property$ShapeOutside = Globals | DataType$Box | "margin-box" | "none" | string; + +export type Property$TabSize<TLength = string | 0> = Globals | TLength | number; + +export type Property$TableLayout = Globals | "auto" | "fixed"; + +export type Property$TextAlign = Globals | "-webkit-match-parent" | "center" | "end" | "justify" | "left" | "match-parent" | "right" | "start"; + +export type Property$TextAlignLast = Globals | "auto" | "center" | "end" | "justify" | "left" | "right" | "start"; + +export type Property$TextCombineUpright = Globals | "all" | "none" | string; + +export type Property$TextDecoration<TLength = string | 0> = | Globals - | Color + | DataType$Color | TLength | "auto" | "blink" @@ -5228,47 +5261,53 @@ export type TextDecorationProperty<TLength> = | "wavy" | string; -export type TextDecorationColorProperty = Globals | Color; +export type Property$TextDecorationColor = Globals | DataType$Color; -export type TextDecorationLineProperty = Globals | "blink" | "grammar-error" | "line-through" | "none" | "overline" | "spelling-error" | "underline" | string; +export type Property$TextDecorationLine = Globals | "blink" | "grammar-error" | "line-through" | "none" | "overline" | "spelling-error" | "underline" | string; -export type TextDecorationSkipProperty = Globals | "box-decoration" | "edges" | "leading-spaces" | "none" | "objects" | "spaces" | "trailing-spaces" | string; +export type Property$TextDecorationSkip = Globals | "box-decoration" | "edges" | "leading-spaces" | "none" | "objects" | "spaces" | "trailing-spaces" | string; -export type TextDecorationSkipInkProperty = Globals | "all" | "auto" | "none"; +export type Property$TextDecorationSkipInk = Globals | "all" | "auto" | "none"; -export type TextDecorationStyleProperty = Globals | "dashed" | "dotted" | "double" | "solid" | "wavy"; +export type Property$TextDecorationStyle = Globals | "dashed" | "dotted" | "double" | "solid" | "wavy"; -export type TextDecorationThicknessProperty<TLength> = Globals | TLength | "auto" | "from-font" | string; +export type Property$TextDecorationThickness<TLength = string | 0> = Globals | TLength | "auto" | "from-font" | string; -export type TextEmphasisProperty = Globals | Color | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; +export type Property$TextEmphasis = Globals | DataType$Color | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; -export type TextEmphasisColorProperty = Globals | Color; +export type Property$TextEmphasisColor = Globals | DataType$Color; -export type TextEmphasisStyleProperty = Globals | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; +export type Property$TextEmphasisPosition = Globals | string; -export type TextIndentProperty<TLength> = Globals | TLength | string; +export type Property$TextEmphasisStyle = Globals | "circle" | "dot" | "double-circle" | "filled" | "none" | "open" | "sesame" | "triangle" | string; -export type TextJustifyProperty = Globals | "auto" | "inter-character" | "inter-word" | "none"; +export type Property$TextIndent<TLength = string | 0> = Globals | TLength | string; -export type TextOrientationProperty = Globals | "mixed" | "sideways" | "upright"; +export type Property$TextJustify = Globals | "auto" | "inter-character" | "inter-word" | "none"; -export type TextOverflowProperty = Globals | "clip" | "ellipsis" | string; +export type Property$TextOrientation = Globals | "mixed" | "sideways" | "upright"; -export type TextRenderingProperty = Globals | "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; +export type Property$TextOverflow = Globals | "clip" | "ellipsis" | string; -export type TextShadowProperty = Globals | "none" | string; +export type Property$TextRendering = Globals | "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed"; -export type TextSizeAdjustProperty = Globals | "auto" | "none" | string; +export type Property$TextShadow = Globals | "none" | string; -export type TextTransformProperty = Globals | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "none" | "uppercase"; +export type Property$TextSizeAdjust = Globals | "auto" | "none" | string; -export type TextUnderlineOffsetProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$TextTransform = Globals | "capitalize" | "full-size-kana" | "full-width" | "lowercase" | "none" | "uppercase"; -export type TextUnderlinePositionProperty = Globals | "auto" | "from-font" | "left" | "right" | "under" | string; +export type Property$TextUnderlineOffset<TLength = string | 0> = Globals | TLength | "auto" | string; -export type TopProperty<TLength> = Globals | TLength | "auto" | string; +export type Property$TextUnderlinePosition = Globals | "auto" | "from-font" | "left" | "right" | "under" | string; -export type TouchActionProperty = +export type Property$TextWrap = Globals | "balance" | "nowrap" | "pretty" | "stable" | "wrap"; + +export type Property$TimelineScope = Globals | "none" | string; + +export type Property$Top<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$TouchAction = | Globals | "-ms-manipulation" | "-ms-none" @@ -5285,23 +5324,29 @@ export type TouchActionProperty = | "pinch-zoom" | string; -export type TransformProperty = Globals | "none" | string; +export type Property$Transform = Globals | "none" | string; -export type TransformBoxProperty = Globals | "border-box" | "content-box" | "fill-box" | "stroke-box" | "view-box"; +export type Property$TransformBox = Globals | "border-box" | "content-box" | "fill-box" | "stroke-box" | "view-box"; -export type TransformOriginProperty<TLength> = Globals | TLength | "bottom" | "center" | "left" | "right" | "top" | string; +export type Property$TransformOrigin<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "left" | "right" | "top" | string; -export type TransformStyleProperty = Globals | "flat" | "preserve-3d"; +export type Property$TransformStyle = Globals | "flat" | "preserve-3d"; -export type TransitionProperty = Globals | SingleTransition | string; +export type Property$Transition<TTime = string> = Globals | DataType$SingleTransition<TTime> | string; -export type TransitionPropertyProperty = Globals | "all" | "none" | string; +export type Property$TransitionBehavior = Globals | "allow-discrete" | "normal" | string; -export type TransitionTimingFunctionProperty = Globals | EasingFunction | string; +export type Property$TransitionDelay<TTime = string> = Globals | TTime | string; -export type TranslateProperty<TLength> = Globals | TLength | "none" | string; +export type Property$TransitionDuration<TTime = string> = Globals | TTime | string; -export type UnicodeBidiProperty = +export type Property$TransitionProperty = Globals | "all" | "none" | string; + +export type Property$TransitionTimingFunction = Globals | DataType$EasingFunction | string; + +export type Property$Translate<TLength = string | 0> = Globals | TLength | "none" | string; + +export type Property$UnicodeBidi = | Globals | "-moz-isolate" | "-moz-isolate-override" @@ -5316,15 +5361,53 @@ export type UnicodeBidiProperty = | "normal" | "plaintext"; -export type UserSelectProperty = Globals | "-moz-none" | "all" | "auto" | "contain" | "element" | "none" | "text"; +export type Property$UserSelect = Globals | "-moz-none" | "all" | "auto" | "contain" | "element" | "none" | "text"; -export type VerticalAlignProperty<TLength> = Globals | TLength | "baseline" | "bottom" | "middle" | "sub" | "super" | "text-bottom" | "text-top" | "top" | string; +export type Property$VerticalAlign<TLength = string | 0> = Globals | TLength | "baseline" | "bottom" | "middle" | "sub" | "super" | "text-bottom" | "text-top" | "top" | string; -export type VisibilityProperty = Globals | "collapse" | "hidden" | "visible"; +export type Property$ViewTimeline = Globals | "none" | string; -export type WhiteSpaceProperty = Globals | "-moz-pre-wrap" | "break-spaces" | "normal" | "nowrap" | "pre" | "pre-line" | "pre-wrap"; +export type Property$ViewTimelineAxis = Globals | "block" | "inline" | "x" | "y" | string; -export type WidthProperty<TLength> = +export type Property$ViewTimelineInset<TLength = string | 0> = Globals | TLength | "auto" | string; + +export type Property$ViewTimelineName = Globals | "none" | string; + +export type Property$ViewTransitionName = Globals | "none" | string; + +export type Property$Visibility = Globals | "collapse" | "hidden" | "visible"; + +export type Property$WhiteSpace = + | Globals + | "-moz-pre-wrap" + | "balance" + | "break-spaces" + | "collapse" + | "discard" + | "discard-after" + | "discard-before" + | "discard-inner" + | "none" + | "normal" + | "nowrap" + | "pre" + | "pre-line" + | "pre-wrap" + | "preserve" + | "preserve-breaks" + | "preserve-spaces" + | "pretty" + | "stable" + | "wrap" + | string; + +export type Property$WhiteSpaceCollapse = Globals | "break-spaces" | "collapse" | "discard" | "preserve" | "preserve-breaks" | "preserve-spaces"; + +export type Property$WhiteSpaceTrim = Globals | "discard-after" | "discard-before" | "discard-inner" | "none" | string; + +export type Property$Widows = Globals | number; + +export type Property$Width<TLength = string | 0> = | Globals | TLength | "-moz-fit-content" @@ -5340,21 +5423,21 @@ export type WidthProperty<TLength> = | "min-intrinsic" | string; -export type WillChangeProperty = Globals | AnimateableFeature | "auto" | string; +export type Property$WillChange = Globals | DataType$AnimateableFeature | "auto" | string; -export type WordBreakProperty = Globals | "break-all" | "break-word" | "keep-all" | "normal"; +export type Property$WordBreak = Globals | "break-all" | "break-word" | "keep-all" | "normal"; -export type WordSpacingProperty<TLength> = Globals | TLength | "normal"; +export type Property$WordSpacing<TLength = string | 0> = Globals | TLength | "normal"; -export type WordWrapProperty = Globals | "break-word" | "normal"; +export type Property$WordWrap = Globals | "break-word" | "normal"; -export type WritingModeProperty = Globals | "horizontal-tb" | "sideways-lr" | "sideways-rl" | "vertical-lr" | "vertical-rl"; +export type Property$WritingMode = Globals | "horizontal-tb" | "sideways-lr" | "sideways-rl" | "vertical-lr" | "vertical-rl"; -export type ZIndexProperty = Globals | "auto" | number; +export type Property$ZIndex = Globals | "auto" | number; -export type ZoomProperty = Globals | "normal" | "reset" | string | number; +export type Property$Zoom = Globals | "normal" | "reset" | string | number; -export type MozAppearanceProperty = +export type Property$MozAppearance = | Globals | "-moz-mac-unified-toolbar" | "-moz-win-borderless-glass" @@ -5467,127 +5550,147 @@ export type MozAppearanceProperty = | "treetwistyopen" | "treeview"; -export type MozBindingProperty = Globals | "none" | string; +export type Property$MozBinding = Globals | "none" | string; -export type MozBorderBottomColorsProperty = Globals | Color | "none" | string; +export type Property$MozBorderBottomColors = Globals | DataType$Color | "none" | string; -export type MozBorderLeftColorsProperty = Globals | Color | "none" | string; +export type Property$MozBorderLeftColors = Globals | DataType$Color | "none" | string; -export type MozBorderRightColorsProperty = Globals | Color | "none" | string; +export type Property$MozBorderRightColors = Globals | DataType$Color | "none" | string; -export type MozBorderTopColorsProperty = Globals | Color | "none" | string; +export type Property$MozBorderTopColors = Globals | DataType$Color | "none" | string; -export type MozContextPropertiesProperty = Globals | "fill" | "fill-opacity" | "none" | "stroke" | "stroke-opacity" | string; +export type Property$MozContextProperties = Globals | "fill" | "fill-opacity" | "none" | "stroke" | "stroke-opacity" | string; -export type MozFloatEdgeProperty = Globals | "border-box" | "content-box" | "margin-box" | "padding-box"; +export type Property$MozFloatEdge = Globals | "border-box" | "content-box" | "margin-box" | "padding-box"; -export type MozForceBrokenImageIconProperty = Globals | 0 | 1; +export type Property$MozForceBrokenImageIcon = Globals | 0 | 1; -export type MozImageRegionProperty = Globals | "auto" | string; +export type Property$MozImageRegion = Globals | "auto" | string; -export type MozOrientProperty = Globals | "block" | "horizontal" | "inline" | "vertical"; +export type Property$MozOrient = Globals | "block" | "horizontal" | "inline" | "vertical"; -export type MozOutlineRadiusProperty<TLength> = Globals | TLength | string; +export type Property$MozOutlineRadius<TLength = string | 0> = Globals | TLength | string; -export type MozOutlineRadiusBottomleftProperty<TLength> = Globals | TLength | string; +export type Property$MozOutlineRadiusBottomleft<TLength = string | 0> = Globals | TLength | string; -export type MozOutlineRadiusBottomrightProperty<TLength> = Globals | TLength | string; +export type Property$MozOutlineRadiusBottomright<TLength = string | 0> = Globals | TLength | string; -export type MozOutlineRadiusTopleftProperty<TLength> = Globals | TLength | string; +export type Property$MozOutlineRadiusTopleft<TLength = string | 0> = Globals | TLength | string; -export type MozOutlineRadiusToprightProperty<TLength> = Globals | TLength | string; +export type Property$MozOutlineRadiusTopright<TLength = string | 0> = Globals | TLength | string; -export type MozStackSizingProperty = Globals | "ignore" | "stretch-to-fit"; +export type Property$MozStackSizing = Globals | "ignore" | "stretch-to-fit"; -export type MozTextBlinkProperty = Globals | "blink" | "none"; +export type Property$MozTextBlink = Globals | "blink" | "none"; -export type MozUserFocusProperty = Globals | "ignore" | "none" | "normal" | "select-after" | "select-all" | "select-before" | "select-menu" | "select-same"; +export type Property$MozUserFocus = Globals | "ignore" | "none" | "normal" | "select-after" | "select-all" | "select-before" | "select-menu" | "select-same"; -export type MozUserInputProperty = Globals | "auto" | "disabled" | "enabled" | "none"; +export type Property$MozUserInput = Globals | "auto" | "disabled" | "enabled" | "none"; -export type MozUserModifyProperty = Globals | "read-only" | "read-write" | "write-only"; +export type Property$MozUserModify = Globals | "read-only" | "read-write" | "write-only"; -export type MozWindowDraggingProperty = Globals | "drag" | "no-drag"; +export type Property$MozWindowDragging = Globals | "drag" | "no-drag"; -export type MozWindowShadowProperty = Globals | "default" | "menu" | "none" | "sheet" | "tooltip"; +export type Property$MozWindowShadow = Globals | "default" | "menu" | "none" | "sheet" | "tooltip"; -export type MsAcceleratorProperty = Globals | "false" | "true"; +export type Property$MsAccelerator = Globals | "false" | "true"; -export type MsBlockProgressionProperty = Globals | "bt" | "lr" | "rl" | "tb"; +export type Property$MsBlockProgression = Globals | "bt" | "lr" | "rl" | "tb"; -export type MsContentZoomChainingProperty = Globals | "chained" | "none"; +export type Property$MsContentZoomChaining = Globals | "chained" | "none"; -export type MsContentZoomSnapProperty = Globals | "mandatory" | "none" | "proximity" | string; +export type Property$MsContentZoomLimit = Globals | string; -export type MsContentZoomSnapTypeProperty = Globals | "mandatory" | "none" | "proximity"; +export type Property$MsContentZoomLimitMax = Globals | string; -export type MsContentZoomingProperty = Globals | "none" | "zoom"; +export type Property$MsContentZoomLimitMin = Globals | string; -export type MsFlowFromProperty = Globals | "none" | string; +export type Property$MsContentZoomSnap = Globals | "mandatory" | "none" | "proximity" | string; -export type MsFlowIntoProperty = Globals | "none" | string; +export type Property$MsContentZoomSnapPoints = Globals | string; -export type MsGridColumnsProperty<TLength> = Globals | TrackBreadth<TLength> | "none" | string; +export type Property$MsContentZoomSnapType = Globals | "mandatory" | "none" | "proximity"; -export type MsGridRowsProperty<TLength> = Globals | TrackBreadth<TLength> | "none" | string; +export type Property$MsContentZooming = Globals | "none" | "zoom"; -export type MsHighContrastAdjustProperty = Globals | "auto" | "none"; +export type Property$MsFilter = Globals | string; -export type MsHyphenateLimitCharsProperty = Globals | "auto" | string | number; +export type Property$MsFlowFrom = Globals | "none" | string; -export type MsHyphenateLimitLinesProperty = Globals | "no-limit" | number; +export type Property$MsFlowInto = Globals | "none" | string; -export type MsHyphenateLimitZoneProperty<TLength> = Globals | TLength | string; +export type Property$MsGridColumns<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | string; -export type MsImeAlignProperty = Globals | "after" | "auto"; +export type Property$MsGridRows<TLength = string | 0> = Globals | DataType$TrackBreadth<TLength> | "none" | string; -export type MsOverflowStyleProperty = Globals | "-ms-autohiding-scrollbar" | "auto" | "none" | "scrollbar"; +export type Property$MsHighContrastAdjust = Globals | "auto" | "none"; -export type MsScrollChainingProperty = Globals | "chained" | "none"; +export type Property$MsHyphenateLimitChars = Globals | "auto" | string | number; -export type MsScrollLimitXMaxProperty<TLength> = Globals | TLength | "auto"; +export type Property$MsHyphenateLimitLines = Globals | "no-limit" | number; -export type MsScrollLimitXMinProperty<TLength> = Globals | TLength; +export type Property$MsHyphenateLimitZone<TLength = string | 0> = Globals | TLength | string; -export type MsScrollLimitYMaxProperty<TLength> = Globals | TLength | "auto"; +export type Property$MsImeAlign = Globals | "after" | "auto"; -export type MsScrollLimitYMinProperty<TLength> = Globals | TLength; +export type Property$MsOverflowStyle = Globals | "-ms-autohiding-scrollbar" | "auto" | "none" | "scrollbar"; -export type MsScrollRailsProperty = Globals | "none" | "railed"; +export type Property$MsScrollChaining = Globals | "chained" | "none"; -export type MsScrollSnapTypeProperty = Globals | "mandatory" | "none" | "proximity"; +export type Property$MsScrollLimit = Globals | string; -export type MsScrollTranslationProperty = Globals | "none" | "vertical-to-horizontal"; +export type Property$MsScrollLimitXMax<TLength = string | 0> = Globals | TLength | "auto"; -export type MsScrollbar3dlightColorProperty = Globals | Color; +export type Property$MsScrollLimitXMin<TLength = string | 0> = Globals | TLength; -export type MsScrollbarArrowColorProperty = Globals | Color; +export type Property$MsScrollLimitYMax<TLength = string | 0> = Globals | TLength | "auto"; -export type MsScrollbarBaseColorProperty = Globals | Color; +export type Property$MsScrollLimitYMin<TLength = string | 0> = Globals | TLength; -export type MsScrollbarDarkshadowColorProperty = Globals | Color; +export type Property$MsScrollRails = Globals | "none" | "railed"; -export type MsScrollbarFaceColorProperty = Globals | Color; +export type Property$MsScrollSnapPointsX = Globals | string; -export type MsScrollbarHighlightColorProperty = Globals | Color; +export type Property$MsScrollSnapPointsY = Globals | string; -export type MsScrollbarShadowColorProperty = Globals | Color; +export type Property$MsScrollSnapType = Globals | "mandatory" | "none" | "proximity"; -export type MsScrollbarTrackColorProperty = Globals | Color; +export type Property$MsScrollSnapX = Globals | string; -export type MsTextAutospaceProperty = Globals | "ideograph-alpha" | "ideograph-numeric" | "ideograph-parenthesis" | "ideograph-space" | "none"; +export type Property$MsScrollSnapY = Globals | string; -export type MsTouchSelectProperty = Globals | "grippers" | "none"; +export type Property$MsScrollTranslation = Globals | "none" | "vertical-to-horizontal"; -export type MsUserSelectProperty = Globals | "element" | "none" | "text"; +export type Property$MsScrollbar3dlightColor = Globals | DataType$Color; -export type MsWrapFlowProperty = Globals | "auto" | "both" | "clear" | "end" | "maximum" | "start"; +export type Property$MsScrollbarArrowColor = Globals | DataType$Color; -export type MsWrapMarginProperty<TLength> = Globals | TLength; +export type Property$MsScrollbarBaseColor = Globals | DataType$Color; -export type MsWrapThroughProperty = Globals | "none" | "wrap"; +export type Property$MsScrollbarDarkshadowColor = Globals | DataType$Color; -export type WebkitAppearanceProperty = +export type Property$MsScrollbarFaceColor = Globals | DataType$Color; + +export type Property$MsScrollbarHighlightColor = Globals | DataType$Color; + +export type Property$MsScrollbarShadowColor = Globals | DataType$Color; + +export type Property$MsScrollbarTrackColor = Globals | DataType$Color; + +export type Property$MsTextAutospace = Globals | "ideograph-alpha" | "ideograph-numeric" | "ideograph-parenthesis" | "ideograph-space" | "none"; + +export type Property$MsTouchSelect = Globals | "grippers" | "none"; + +export type Property$MsUserSelect = Globals | "element" | "none" | "text"; + +export type Property$MsWrapFlow = Globals | "auto" | "both" | "clear" | "end" | "maximum" | "start"; + +export type Property$MsWrapMargin<TLength = string | 0> = Globals | TLength; + +export type Property$MsWrapThrough = Globals | "none" | "wrap"; + +export type Property$WebkitAppearance = | Globals | "-apple-pay-button" | "button" @@ -5639,61 +5742,71 @@ export type WebkitAppearanceProperty = | "textarea" | "textfield"; -export type WebkitBorderBeforeProperty<TLength> = Globals | LineWidth<TLength> | LineStyle | Color | string; +export type Property$WebkitBorderBefore<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | DataType$LineStyle | DataType$Color | string; -export type WebkitBorderBeforeColorProperty = Globals | Color; +export type Property$WebkitBorderBeforeColor = Globals | DataType$Color; -export type WebkitBorderBeforeStyleProperty = Globals | LineStyle | string; +export type Property$WebkitBorderBeforeStyle = Globals | DataType$LineStyle | string; -export type WebkitBorderBeforeWidthProperty<TLength> = Globals | LineWidth<TLength> | string; +export type Property$WebkitBorderBeforeWidth<TLength = string | 0> = Globals | DataType$LineWidth<TLength> | string; -export type WebkitBoxReflectProperty<TLength> = Globals | TLength | "above" | "below" | "left" | "right" | string; +export type Property$WebkitBoxReflect<TLength = string | 0> = Globals | TLength | "above" | "below" | "left" | "right" | string; -export type WebkitLineClampProperty = Globals | "none" | number; +export type Property$WebkitLineClamp = Globals | "none" | number; -export type WebkitMaskProperty<TLength> = Globals | Position<TLength> | RepeatStyle | Box | "border" | "content" | "none" | "padding" | "text" | string; +export type Property$WebkitMask<TLength = string | 0> = + | Globals + | DataType$Position<TLength> + | DataType$RepeatStyle + | DataType$Box + | "border" + | "content" + | "none" + | "padding" + | "text" + | string; -export type WebkitMaskAttachmentProperty = Globals | Attachment | string; +export type Property$WebkitMaskAttachment = Globals | DataType$Attachment | string; -export type WebkitMaskClipProperty = Globals | Box | "border" | "content" | "padding" | "text" | string; +export type Property$WebkitMaskClip = Globals | DataType$Box | "border" | "content" | "padding" | "text" | string; -export type WebkitMaskCompositeProperty = Globals | CompositeStyle | string; +export type Property$WebkitMaskComposite = Globals | DataType$CompositeStyle | string; -export type WebkitMaskImageProperty = Globals | "none" | string; +export type Property$WebkitMaskImage = Globals | "none" | string; -export type WebkitMaskOriginProperty = Globals | Box | "border" | "content" | "padding" | string; +export type Property$WebkitMaskOrigin = Globals | DataType$Box | "border" | "content" | "padding" | string; -export type WebkitMaskPositionProperty<TLength> = Globals | Position<TLength> | string; +export type Property$WebkitMaskPosition<TLength = string | 0> = Globals | DataType$Position<TLength> | string; -export type WebkitMaskPositionXProperty<TLength> = Globals | TLength | "center" | "left" | "right" | string; +export type Property$WebkitMaskPositionX<TLength = string | 0> = Globals | TLength | "center" | "left" | "right" | string; -export type WebkitMaskPositionYProperty<TLength> = Globals | TLength | "bottom" | "center" | "top" | string; +export type Property$WebkitMaskPositionY<TLength = string | 0> = Globals | TLength | "bottom" | "center" | "top" | string; -export type WebkitMaskRepeatProperty = Globals | RepeatStyle | string; +export type Property$WebkitMaskRepeat = Globals | DataType$RepeatStyle | string; -export type WebkitMaskRepeatXProperty = Globals | "no-repeat" | "repeat" | "round" | "space"; +export type Property$WebkitMaskRepeatX = Globals | "no-repeat" | "repeat" | "round" | "space"; -export type WebkitMaskRepeatYProperty = Globals | "no-repeat" | "repeat" | "round" | "space"; +export type Property$WebkitMaskRepeatY = Globals | "no-repeat" | "repeat" | "round" | "space"; -export type WebkitMaskSizeProperty<TLength> = Globals | BgSize<TLength> | string; +export type Property$WebkitMaskSize<TLength = string | 0> = Globals | DataType$BgSize<TLength> | string; -export type WebkitOverflowScrollingProperty = Globals | "auto" | "touch"; +export type Property$WebkitOverflowScrolling = Globals | "auto" | "touch"; -export type WebkitTapHighlightColorProperty = Globals | Color; +export type Property$WebkitTapHighlightColor = Globals | DataType$Color; -export type WebkitTextFillColorProperty = Globals | Color; +export type Property$WebkitTextFillColor = Globals | DataType$Color; -export type WebkitTextStrokeProperty<TLength> = Globals | Color | TLength | string; +export type Property$WebkitTextStroke<TLength = string | 0> = Globals | DataType$Color | TLength | string; -export type WebkitTextStrokeColorProperty = Globals | Color; +export type Property$WebkitTextStrokeColor = Globals | DataType$Color; -export type WebkitTextStrokeWidthProperty<TLength> = Globals | TLength; +export type Property$WebkitTextStrokeWidth<TLength = string | 0> = Globals | TLength; -export type WebkitTouchCalloutProperty = Globals | "default" | "none"; +export type Property$WebkitTouchCallout = Globals | "default" | "none"; -export type WebkitUserModifyProperty = Globals | "read-only" | "read-write" | "read-write-plaintext-only"; +export type Property$WebkitUserModify = Globals | "read-only" | "read-write" | "read-write-plaintext-only"; -export type AlignmentBaselineProperty = +export type Property$AlignmentBaseline = | Globals | "after-edge" | "alphabetic" @@ -5708,15 +5821,15 @@ export type AlignmentBaselineProperty = | "text-after-edge" | "text-before-edge"; -export type BaselineShiftProperty<TLength> = Globals | TLength | "baseline" | "sub" | "super" | string; +export type Property$BaselineShift<TLength = string | 0> = Globals | TLength | "baseline" | "sub" | "super" | string; -export type ClipRuleProperty = Globals | "evenodd" | "nonzero"; +export type Property$ClipRule = Globals | "evenodd" | "nonzero"; -export type ColorInterpolationProperty = Globals | "auto" | "linearRGB" | "sRGB"; +export type Property$ColorInterpolation = Globals | "auto" | "linearRGB" | "sRGB"; -export type ColorRenderingProperty = Globals | "auto" | "optimizeQuality" | "optimizeSpeed"; +export type Property$ColorRendering = Globals | "auto" | "optimizeQuality" | "optimizeSpeed"; -export type DominantBaselineProperty = +export type Property$DominantBaseline = | Globals | "alphabetic" | "auto" @@ -5731,64 +5844,334 @@ export type DominantBaselineProperty = | "text-before-edge" | "use-script"; -export type FillProperty = Globals | Paint; +export type Property$Fill = Globals | DataType$Paint; -export type FillRuleProperty = Globals | "evenodd" | "nonzero"; +export type Property$FillOpacity = Globals | number; -export type FloodColorProperty = Globals | Color | "currentColor"; +export type Property$FillRule = Globals | "evenodd" | "nonzero"; -export type GlyphOrientationVerticalProperty = Globals | "auto" | string | number; +export type Property$FloodColor = Globals | DataType$Color | "currentColor"; -export type LightingColorProperty = Globals | Color | "currentColor"; +export type Property$FloodOpacity = Globals | number; -export type MarkerProperty = Globals | "none" | string; +export type Property$GlyphOrientationVertical = Globals | "auto" | string | number; -export type MarkerEndProperty = Globals | "none" | string; +export type Property$LightingColor = Globals | DataType$Color | "currentColor"; -export type MarkerMidProperty = Globals | "none" | string; +export type Property$Marker = Globals | "none" | string; -export type MarkerStartProperty = Globals | "none" | string; +export type Property$MarkerEnd = Globals | "none" | string; -export type ShapeRenderingProperty = Globals | "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; +export type Property$MarkerMid = Globals | "none" | string; -export type StopColorProperty = Globals | Color | "currentColor"; +export type Property$MarkerStart = Globals | "none" | string; -export type StrokeProperty = Globals | Paint; +export type Property$ShapeRendering = Globals | "auto" | "crispEdges" | "geometricPrecision" | "optimizeSpeed"; -export type StrokeDasharrayProperty<TLength> = Globals | Dasharray<TLength> | "none"; +export type Property$StopColor = Globals | DataType$Color | "currentColor"; -export type StrokeDashoffsetProperty<TLength> = Globals | TLength | string; +export type Property$StopOpacity = Globals | number; -export type StrokeLinecapProperty = Globals | "butt" | "round" | "square"; +export type Property$Stroke = Globals | DataType$Paint; -export type StrokeLinejoinProperty = Globals | "bevel" | "miter" | "round"; +export type Property$StrokeDasharray<TLength = string | 0> = Globals | DataType$Dasharray<TLength> | "none"; -export type StrokeWidthProperty<TLength> = Globals | TLength | string; +export type Property$StrokeDashoffset<TLength = string | 0> = Globals | TLength | string; -export type TextAnchorProperty = Globals | "end" | "middle" | "start"; +export type Property$StrokeLinecap = Globals | "butt" | "round" | "square"; -export type VectorEffectProperty = Globals | "non-scaling-stroke" | "none"; +export type Property$StrokeLinejoin = Globals | "bevel" | "miter" | "round"; -type CounterStyleRangeProperty = "auto" | "infinite" | string | number; +export type Property$StrokeMiterlimit = Globals | number; -type CounterStyleSpeakAsProperty = "auto" | "bullets" | "numbers" | "spell-out" | "words" | string; +export type Property$StrokeOpacity = Globals | number; -type CounterStyleSystemProperty = "additive" | "alphabetic" | "cyclic" | "fixed" | "numeric" | "symbolic" | string; +export type Property$StrokeWidth<TLength = string | 0> = Globals | TLength | string; -type FontFaceFontFeatureSettingsProperty = "normal" | string; +export type Property$TextAnchor = Globals | "end" | "middle" | "start"; -type FontFaceAscentOverrideProperty = "normal" | string; +export type Property$VectorEffect = Globals | "non-scaling-stroke" | "none"; -type FontFaceDescentOverrideProperty = "normal" | string; +export type AtRule$CounterStyle<TLength = string | 0, TTime = string> = {| + additiveSymbols?: string, + fallback?: string, + negative?: string, + pad?: string, + prefix?: string, + range?: AtRule$Range, + speakAs?: AtRule$SpeakAs, + suffix?: string, + symbols?: string, + system?: AtRule$System, +|}; -type FontFaceFontDisplayProperty = "auto" | "block" | "fallback" | "optional" | "swap"; +export type AtRule$CounterStyleHyphen<TLength = string | 0, TTime = string> = {| + "additive-symbols"?: string, + fallback?: string, + negative?: string, + pad?: string, + prefix?: string, + range?: AtRule$Range, + "speak-as"?: AtRule$SpeakAs, + suffix?: string, + symbols?: string, + system?: AtRule$System, +|}; -type FontFaceFontStretchProperty = FontStretchAbsolute | string; +export type AtRule$CounterStyleFallback<TLength = string | 0, TTime = string> = {| + additiveSymbols?: string | Array<string>, + fallback?: string | Array<string>, + negative?: string | Array<string>, + pad?: string | Array<string>, + prefix?: string | Array<string>, + range?: AtRule$Range | Array<AtRule$Range>, + speakAs?: AtRule$SpeakAs | Array<AtRule$SpeakAs>, + suffix?: string | Array<string>, + symbols?: string | Array<string>, + system?: AtRule$System | Array<AtRule$System>, +|}; -type FontFaceFontStyleProperty = "italic" | "normal" | "oblique" | string; +export type AtRule$CounterStyleHyphenFallback<TLength = string | 0, TTime = string> = {| + "additive-symbols"?: string | Array<string>, + fallback?: string | Array<string>, + negative?: string | Array<string>, + pad?: string | Array<string>, + prefix?: string | Array<string>, + range?: AtRule$Range | Array<AtRule$Range>, + "speak-as"?: AtRule$SpeakAs | Array<AtRule$SpeakAs>, + suffix?: string | Array<string>, + symbols?: string | Array<string>, + system?: AtRule$System | Array<AtRule$System>, +|}; -type FontFaceFontVariantProperty = - | EastAsianVariantValues +export type AtRule$FontFace<TLength = string | 0, TTime = string> = {| + MozFontFeatureSettings?: AtRule$FontFeatureSettings, + ascentOverride?: AtRule$AscentOverride, + descentOverride?: AtRule$DescentOverride, + fontDisplay?: AtRule$FontDisplay, + fontFamily?: string, + fontFeatureSettings?: AtRule$FontFeatureSettings, + fontStretch?: AtRule$FontStretch, + fontStyle?: AtRule$FontStyle, + fontVariant?: AtRule$FontVariant, + fontVariationSettings?: AtRule$FontVariationSettings, + fontWeight?: AtRule$FontWeight, + lineGapOverride?: AtRule$LineGapOverride, + sizeAdjust?: string, + src?: string, + unicodeRange?: string, +|}; + +export type AtRule$FontFaceHyphen<TLength = string | 0, TTime = string> = {| + "-moz-font-feature-settings"?: AtRule$FontFeatureSettings, + "ascent-override"?: AtRule$AscentOverride, + "descent-override"?: AtRule$DescentOverride, + "font-display"?: AtRule$FontDisplay, + "font-family"?: string, + "font-feature-settings"?: AtRule$FontFeatureSettings, + "font-stretch"?: AtRule$FontStretch, + "font-style"?: AtRule$FontStyle, + "font-variant"?: AtRule$FontVariant, + "font-variation-settings"?: AtRule$FontVariationSettings, + "font-weight"?: AtRule$FontWeight, + "line-gap-override"?: AtRule$LineGapOverride, + "size-adjust"?: string, + src?: string, + "unicode-range"?: string, +|}; + +export type AtRule$FontFaceFallback<TLength = string | 0, TTime = string> = {| + MozFontFeatureSettings?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, + ascentOverride?: AtRule$AscentOverride | Array<AtRule$AscentOverride>, + descentOverride?: AtRule$DescentOverride | Array<AtRule$DescentOverride>, + fontDisplay?: AtRule$FontDisplay | Array<AtRule$FontDisplay>, + fontFamily?: string | Array<string>, + fontFeatureSettings?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, + fontStretch?: AtRule$FontStretch | Array<AtRule$FontStretch>, + fontStyle?: AtRule$FontStyle | Array<AtRule$FontStyle>, + fontVariant?: AtRule$FontVariant | Array<AtRule$FontVariant>, + fontVariationSettings?: AtRule$FontVariationSettings | Array<AtRule$FontVariationSettings>, + fontWeight?: AtRule$FontWeight | Array<AtRule$FontWeight>, + lineGapOverride?: AtRule$LineGapOverride | Array<AtRule$LineGapOverride>, + sizeAdjust?: string | Array<string>, + src?: string | Array<string>, + unicodeRange?: string | Array<string>, +|}; + +export type AtRule$FontFaceHyphenFallback<TLength = string | 0, TTime = string> = {| + "-moz-font-feature-settings"?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, + "ascent-override"?: AtRule$AscentOverride | Array<AtRule$AscentOverride>, + "descent-override"?: AtRule$DescentOverride | Array<AtRule$DescentOverride>, + "font-display"?: AtRule$FontDisplay | Array<AtRule$FontDisplay>, + "font-family"?: string | Array<string>, + "font-feature-settings"?: AtRule$FontFeatureSettings | Array<AtRule$FontFeatureSettings>, + "font-stretch"?: AtRule$FontStretch | Array<AtRule$FontStretch>, + "font-style"?: AtRule$FontStyle | Array<AtRule$FontStyle>, + "font-variant"?: AtRule$FontVariant | Array<AtRule$FontVariant>, + "font-variation-settings"?: AtRule$FontVariationSettings | Array<AtRule$FontVariationSettings>, + "font-weight"?: AtRule$FontWeight | Array<AtRule$FontWeight>, + "line-gap-override"?: AtRule$LineGapOverride | Array<AtRule$LineGapOverride>, + "size-adjust"?: string | Array<string>, + src?: string | Array<string>, + "unicode-range"?: string | Array<string>, +|}; + +export type AtRule$FontPaletteValues<TLength = string | 0, TTime = string> = {| + basePalette?: AtRule$BasePalette, + fontFamily?: string, + overrideColors?: string, +|}; + +export type AtRule$FontPaletteValuesHyphen<TLength = string | 0, TTime = string> = {| + "base-palette"?: AtRule$BasePalette, + "font-family"?: string, + "override-colors"?: string, +|}; + +export type AtRule$FontPaletteValuesFallback<TLength = string | 0, TTime = string> = {| + basePalette?: AtRule$BasePalette | Array<AtRule$BasePalette>, + fontFamily?: string | Array<string>, + overrideColors?: string | Array<string>, +|}; + +export type AtRule$FontPaletteValuesHyphenFallback<TLength = string | 0, TTime = string> = {| + "base-palette"?: AtRule$BasePalette | Array<AtRule$BasePalette>, + "font-family"?: string | Array<string>, + "override-colors"?: string | Array<string>, +|}; + +export type AtRule$Page<TLength = string | 0, TTime = string> = {| + bleed?: AtRule$Bleed<TLength>, + marks?: AtRule$Marks, + pageOrientation?: AtRule$PageOrientation, + size?: AtRule$Size<TLength>, +|}; + +export type AtRule$PageHyphen<TLength = string | 0, TTime = string> = {| + bleed?: AtRule$Bleed<TLength>, + marks?: AtRule$Marks, + "page-orientation"?: AtRule$PageOrientation, + size?: AtRule$Size<TLength>, +|}; + +export type AtRule$PageFallback<TLength = string | 0, TTime = string> = {| + bleed?: AtRule$Bleed<TLength> | Array<AtRule$Bleed<TLength>>, + marks?: AtRule$Marks | Array<AtRule$Marks>, + pageOrientation?: AtRule$PageOrientation | Array<AtRule$PageOrientation>, + size?: AtRule$Size<TLength> | Array<AtRule$Size<TLength>>, +|}; + +export type AtRule$PageHyphenFallback<TLength = string | 0, TTime = string> = {| + bleed?: AtRule$Bleed<TLength> | Array<AtRule$Bleed<TLength>>, + marks?: AtRule$Marks | Array<AtRule$Marks>, + "page-orientation"?: AtRule$PageOrientation | Array<AtRule$PageOrientation>, + size?: AtRule$Size<TLength> | Array<AtRule$Size<TLength>>, +|}; + +export type AtRule$Property<TLength = string | 0, TTime = string> = {| + inherits?: AtRule$Inherits, + initialValue?: string, + syntax?: string, +|}; + +export type AtRule$PropertyHyphen<TLength = string | 0, TTime = string> = {| + inherits?: AtRule$Inherits, + "initial-value"?: string, + syntax?: string, +|}; + +export type AtRule$PropertyFallback<TLength = string | 0, TTime = string> = {| + inherits?: AtRule$Inherits | Array<AtRule$Inherits>, + initialValue?: string | Array<string>, + syntax?: string | Array<string>, +|}; + +export type AtRule$PropertyHyphenFallback<TLength = string | 0, TTime = string> = {| + inherits?: AtRule$Inherits | Array<AtRule$Inherits>, + "initial-value"?: string | Array<string>, + syntax?: string | Array<string>, +|}; + +export type AtRule$Viewport<TLength = string | 0, TTime = string> = {| + height?: AtRule$Height<TLength>, + maxHeight?: AtRule$MaxHeight<TLength>, + maxWidth?: AtRule$MaxWidth<TLength>, + maxZoom?: AtRule$MaxZoom, + minHeight?: AtRule$MinHeight<TLength>, + minWidth?: AtRule$MinWidth<TLength>, + minZoom?: AtRule$MinZoom, + orientation?: AtRule$Orientation, + userZoom?: AtRule$UserZoom, + viewportFit?: AtRule$ViewportFit, + width?: AtRule$Width<TLength>, + zoom?: AtRule$Zoom, +|}; + +export type AtRule$ViewportHyphen<TLength = string | 0, TTime = string> = {| + height?: AtRule$Height<TLength>, + "max-height"?: AtRule$MaxHeight<TLength>, + "max-width"?: AtRule$MaxWidth<TLength>, + "max-zoom"?: AtRule$MaxZoom, + "min-height"?: AtRule$MinHeight<TLength>, + "min-width"?: AtRule$MinWidth<TLength>, + "min-zoom"?: AtRule$MinZoom, + orientation?: AtRule$Orientation, + "user-zoom"?: AtRule$UserZoom, + "viewport-fit"?: AtRule$ViewportFit, + width?: AtRule$Width<TLength>, + zoom?: AtRule$Zoom, +|}; + +export type AtRule$ViewportFallback<TLength = string | 0, TTime = string> = {| + height?: AtRule$Height<TLength> | Array<AtRule$Height<TLength>>, + maxHeight?: AtRule$MaxHeight<TLength> | Array<AtRule$MaxHeight<TLength>>, + maxWidth?: AtRule$MaxWidth<TLength> | Array<AtRule$MaxWidth<TLength>>, + maxZoom?: AtRule$MaxZoom | Array<AtRule$MaxZoom>, + minHeight?: AtRule$MinHeight<TLength> | Array<AtRule$MinHeight<TLength>>, + minWidth?: AtRule$MinWidth<TLength> | Array<AtRule$MinWidth<TLength>>, + minZoom?: AtRule$MinZoom | Array<AtRule$MinZoom>, + orientation?: AtRule$Orientation | Array<AtRule$Orientation>, + userZoom?: AtRule$UserZoom | Array<AtRule$UserZoom>, + viewportFit?: AtRule$ViewportFit | Array<AtRule$ViewportFit>, + width?: AtRule$Width<TLength> | Array<AtRule$Width<TLength>>, + zoom?: AtRule$Zoom | Array<AtRule$Zoom>, +|}; + +export type AtRule$ViewportHyphenFallback<TLength = string | 0, TTime = string> = {| + height?: AtRule$Height<TLength> | Array<AtRule$Height<TLength>>, + "max-height"?: AtRule$MaxHeight<TLength> | Array<AtRule$MaxHeight<TLength>>, + "max-width"?: AtRule$MaxWidth<TLength> | Array<AtRule$MaxWidth<TLength>>, + "max-zoom"?: AtRule$MaxZoom | Array<AtRule$MaxZoom>, + "min-height"?: AtRule$MinHeight<TLength> | Array<AtRule$MinHeight<TLength>>, + "min-width"?: AtRule$MinWidth<TLength> | Array<AtRule$MinWidth<TLength>>, + "min-zoom"?: AtRule$MinZoom | Array<AtRule$MinZoom>, + orientation?: AtRule$Orientation | Array<AtRule$Orientation>, + "user-zoom"?: AtRule$UserZoom | Array<AtRule$UserZoom>, + "viewport-fit"?: AtRule$ViewportFit | Array<AtRule$ViewportFit>, + width?: AtRule$Width<TLength> | Array<AtRule$Width<TLength>>, + zoom?: AtRule$Zoom | Array<AtRule$Zoom>, +|}; + +type AtRule$Range = "auto" | string; + +type AtRule$SpeakAs = "auto" | "bullets" | "numbers" | "spell-out" | "words" | string; + +type AtRule$System = "additive" | "alphabetic" | "cyclic" | "fixed" | "numeric" | "symbolic" | string; + +type AtRule$FontFeatureSettings = "normal" | string; + +type AtRule$AscentOverride = "normal" | string; + +type AtRule$DescentOverride = "normal" | string; + +type AtRule$FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap"; + +type AtRule$FontStretch = DataType$FontStretchAbsolute | string; + +type AtRule$FontStyle = "italic" | "normal" | "oblique" | string; + +type AtRule$FontVariant = + | DataType$EastAsianVariantValues | "all-petite-caps" | "all-small-caps" | "common-ligatures" @@ -5819,55 +6202,59 @@ type FontFaceFontVariantProperty = | "unicase" | string; -type FontFaceFontVariationSettingsProperty = "normal" | string; +type AtRule$FontVariationSettings = "normal" | string; -type FontFaceFontWeightProperty = FontWeightAbsolute | string; +type AtRule$FontWeight = DataType$FontWeightAbsolute | string; -type FontFaceLineGapOverrideProperty = "normal" | string; +type AtRule$LineGapOverride = "normal" | string; -type PageBleedProperty<TLength> = TLength | "auto"; +type AtRule$BasePalette = "dark" | "light" | number; -type PageMarksProperty = "crop" | "cross" | "none" | string; +type AtRule$Bleed<TLength> = TLength | "auto"; -type PageSizeProperty<TLength> = PageSize | TLength | "auto" | "landscape" | "portrait" | string; +type AtRule$Marks = "crop" | "cross" | "none" | string; -type PropertyInheritsProperty = "false" | "true"; +type AtRule$PageOrientation = "rotate-left" | "rotate-right" | "upright"; -type ViewportHeightProperty<TLength> = ViewportLength<TLength> | string; +type AtRule$Size<TLength> = DataType$PageSize | TLength | "auto" | "landscape" | "portrait" | string; -type ViewportMaxHeightProperty<TLength> = ViewportLength<TLength>; +type AtRule$Inherits = "false" | "true"; -type ViewportMaxWidthProperty<TLength> = ViewportLength<TLength>; +type AtRule$Height<TLength> = DataType$ViewportLength<TLength> | string; -type ViewportMaxZoomProperty = "auto" | string | number; +type AtRule$MaxHeight<TLength> = DataType$ViewportLength<TLength>; -type ViewportMinHeightProperty<TLength> = ViewportLength<TLength>; +type AtRule$MaxWidth<TLength> = DataType$ViewportLength<TLength>; -type ViewportMinWidthProperty<TLength> = ViewportLength<TLength>; +type AtRule$MaxZoom = "auto" | string | number; -type ViewportMinZoomProperty = "auto" | string | number; +type AtRule$MinHeight<TLength> = DataType$ViewportLength<TLength>; -type ViewportOrientationProperty = "auto" | "landscape" | "portrait"; +type AtRule$MinWidth<TLength> = DataType$ViewportLength<TLength>; -type ViewportUserZoomProperty = "fixed" | "zoom"; +type AtRule$MinZoom = "auto" | string | number; -type ViewportViewportFitProperty = "auto" | "contain" | "cover"; +type AtRule$Orientation = "auto" | "landscape" | "portrait"; -type ViewportWidthProperty<TLength> = ViewportLength<TLength> | string; +type AtRule$UserZoom = "fixed" | "zoom"; -type ViewportZoomProperty = "auto" | string | number; +type AtRule$ViewportFit = "auto" | "contain" | "cover"; -type AbsoluteSize = "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large"; +type AtRule$Width<TLength> = DataType$ViewportLength<TLength> | string; -type AnimateableFeature = "contents" | "scroll-position" | string; +type AtRule$Zoom = "auto" | string | number; -type Attachment = "fixed" | "local" | "scroll"; +type DataType$AbsoluteSize = "large" | "medium" | "small" | "x-large" | "x-small" | "xx-large" | "xx-small" | "xxx-large"; -type BgPosition<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; +type DataType$AnimateableFeature = "contents" | "scroll-position" | string; -type BgSize<TLength> = TLength | "auto" | "contain" | "cover" | string; +type DataType$Attachment = "fixed" | "local" | "scroll"; -type BlendMode = +type DataType$BgPosition<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; + +type DataType$BgSize<TLength> = TLength | "auto" | "contain" | "cover" | string; + +type DataType$BlendMode = | "color" | "color-burn" | "color-dodge" @@ -5885,11 +6272,11 @@ type BlendMode = | "screen" | "soft-light"; -type Box = "border-box" | "content-box" | "padding-box"; +type DataType$Box = "border-box" | "content-box" | "padding-box"; -type Color = NamedColor | DeprecatedSystemColor | "currentcolor" | string; +type DataType$Color = DataType$NamedColor | DataType$DeprecatedSystemColor | "currentcolor" | string; -type CompatAuto = +type DataType$CompatAuto = | "button" | "checkbox" | "listbox" @@ -5903,7 +6290,7 @@ type CompatAuto = | "square-button" | "textarea"; -type CompositeStyle = +type DataType$CompositeStyle = | "clear" | "copy" | "destination-atop" @@ -5916,19 +6303,19 @@ type CompositeStyle = | "source-over" | "xor"; -type CompositingOperator = "add" | "exclude" | "intersect" | "subtract"; +type DataType$CompositingOperator = "add" | "exclude" | "intersect" | "subtract"; -type ContentDistribution = "space-around" | "space-between" | "space-evenly" | "stretch"; +type DataType$ContentDistribution = "space-around" | "space-between" | "space-evenly" | "stretch"; -type ContentList = Quote | "contents" | string; +type DataType$ContentList = DataType$Quote | "contents" | string; -type ContentPosition = "center" | "end" | "flex-end" | "flex-start" | "start"; +type DataType$ContentPosition = "center" | "end" | "flex-end" | "flex-start" | "start"; -type CubicBezierTimingFunction = "ease" | "ease-in" | "ease-in-out" | "ease-out" | string; +type DataType$CubicBezierTimingFunction = "ease" | "ease-in" | "ease-in-out" | "ease-out" | string; -type Dasharray<TLength> = TLength | string | number; +type DataType$Dasharray<TLength> = TLength | string | number; -type DeprecatedSystemColor = +type DataType$DeprecatedSystemColor = | "ActiveBorder" | "ActiveCaption" | "AppWorkspace" @@ -5958,9 +6345,9 @@ type DeprecatedSystemColor = | "WindowFrame" | "WindowText"; -type DisplayInside = "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "grid" | "ruby" | "table"; +type DataType$DisplayInside = "-ms-flexbox" | "-ms-grid" | "-webkit-flex" | "flex" | "flow" | "flow-root" | "grid" | "ruby" | "table"; -type DisplayInternal = +type DataType$DisplayInternal = | "ruby-base" | "ruby-base-container" | "ruby-text" @@ -5974,17 +6361,25 @@ type DisplayInternal = | "table-row" | "table-row-group"; -type DisplayLegacy = "-ms-inline-flexbox" | "-ms-inline-grid" | "-webkit-inline-flex" | "inline-block" | "inline-flex" | "inline-grid" | "inline-list-item" | "inline-table"; +type DataType$DisplayLegacy = + | "-ms-inline-flexbox" + | "-ms-inline-grid" + | "-webkit-inline-flex" + | "inline-block" + | "inline-flex" + | "inline-grid" + | "inline-list-item" + | "inline-table"; -type DisplayOutside = "block" | "inline" | "run-in"; +type DataType$DisplayOutside = "block" | "inline" | "run-in"; -type EasingFunction = CubicBezierTimingFunction | StepTimingFunction | "linear"; +type DataType$EasingFunction = DataType$CubicBezierTimingFunction | DataType$StepTimingFunction | "linear"; -type EastAsianVariantValues = "jis04" | "jis78" | "jis83" | "jis90" | "simplified" | "traditional"; +type DataType$EastAsianVariantValues = "jis04" | "jis78" | "jis83" | "jis90" | "simplified" | "traditional"; -type FinalBgLayer<TLength> = Color | BgPosition<TLength> | RepeatStyle | Attachment | Box | "none" | string; +type DataType$FinalBgLayer<TLength> = DataType$Color | DataType$BgPosition<TLength> | DataType$RepeatStyle | DataType$Attachment | DataType$Box | "none" | string; -type FontStretchAbsolute = +type DataType$FontStretchAbsolute = | "condensed" | "expanded" | "extra-condensed" @@ -5996,23 +6391,31 @@ type FontStretchAbsolute = | "ultra-expanded" | string; -type FontWeightAbsolute = "bold" | "normal" | number; +type DataType$FontWeightAbsolute = "bold" | "normal" | number; -type GenericFamily = "cursive" | "fantasy" | "monospace" | "sans-serif" | "serif"; +type DataType$GenericFamily = "cursive" | "fantasy" | "monospace" | "sans-serif" | "serif"; -type GeometryBox = Box | "fill-box" | "margin-box" | "stroke-box" | "view-box"; +type DataType$GeometryBox = DataType$Box | "fill-box" | "margin-box" | "stroke-box" | "view-box"; -type GridLine = "auto" | string | number; +type DataType$GridLine = "auto" | string | number; -type LineStyle = "dashed" | "dotted" | "double" | "groove" | "hidden" | "inset" | "none" | "outset" | "ridge" | "solid"; +type DataType$LineStyle = "dashed" | "dotted" | "double" | "groove" | "hidden" | "inset" | "none" | "outset" | "ridge" | "solid"; -type LineWidth<TLength> = TLength | "medium" | "thick" | "thin"; +type DataType$LineWidth<TLength> = TLength | "medium" | "thick" | "thin"; -type MaskLayer<TLength> = Position<TLength> | RepeatStyle | GeometryBox | CompositingOperator | MaskingMode | "no-clip" | "none" | string; +type DataType$MaskLayer<TLength> = + | DataType$Position<TLength> + | DataType$RepeatStyle + | DataType$GeometryBox + | DataType$CompositingOperator + | DataType$MaskingMode + | "no-clip" + | "none" + | string; -type MaskingMode = "alpha" | "luminance" | "match-source"; +type DataType$MaskingMode = "alpha" | "luminance" | "match-source"; -type NamedColor = +type DataType$NamedColor = | "aliceblue" | "antiquewhite" | "aqua" @@ -6163,32 +6566,47 @@ type NamedColor = | "yellow" | "yellowgreen"; -type PageSize = "A3" | "A4" | "A5" | "B4" | "B5" | "JIS-B4" | "JIS-B5" | "ledger" | "legal" | "letter"; +type DataType$PageSize = "A3" | "A4" | "A5" | "B4" | "B5" | "JIS-B4" | "JIS-B5" | "ledger" | "legal" | "letter"; -type Paint = Color | "child" | "context-fill" | "context-stroke" | "none" | string; +type DataType$Paint = DataType$Color | "child" | "context-fill" | "context-stroke" | "none" | string; -type Position<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; +type DataType$Position<TLength> = TLength | "bottom" | "center" | "left" | "right" | "top" | string; -type Quote = "close-quote" | "no-close-quote" | "no-open-quote" | "open-quote"; +type DataType$Quote = "close-quote" | "no-close-quote" | "no-open-quote" | "open-quote"; -type RepeatStyle = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space" | string; +type DataType$RepeatStyle = "no-repeat" | "repeat" | "repeat-x" | "repeat-y" | "round" | "space" | string; -type SelfPosition = "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start"; +type DataType$SelfPosition = "center" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start"; -type SingleAnimation = EasingFunction | SingleAnimationDirection | SingleAnimationFillMode | "infinite" | "none" | "paused" | "running" | string | number; +type DataType$SingleAnimation<TTime> = + | DataType$EasingFunction + | DataType$SingleAnimationDirection + | DataType$SingleAnimationFillMode + | DataType$SingleAnimationTimeline + | TTime + | "infinite" + | "none" + | "paused" + | "running" + | string + | number; -type SingleAnimationDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; +type DataType$SingleAnimationComposition = "accumulate" | "add" | "replace"; -type SingleAnimationFillMode = "backwards" | "both" | "forwards" | "none"; +type DataType$SingleAnimationDirection = "alternate" | "alternate-reverse" | "normal" | "reverse"; -type SingleAnimationTimeline = "auto" | "none" | string; +type DataType$SingleAnimationFillMode = "backwards" | "both" | "forwards" | "none"; -type SingleTransition = EasingFunction | "all" | "none" | string; +type DataType$SingleAnimationTimeline = "auto" | "none" | string; -type StepTimingFunction = "step-end" | "step-start" | string; +type DataType$SingleTransition<TTime> = DataType$EasingFunction | TTime | "all" | "allow-discrete" | "none" | "normal" | string; -type TrackBreadth<TLength> = TLength | "auto" | "max-content" | "min-content" | string; +type DataType$StepTimingFunction = "step-end" | "step-start" | string; -type ViewportLength<TLength> = TLength | "auto" | string; +type DataType$TimelineRangeName = "contain" | "cover" | "entry" | "entry-crossing" | "exit" | "exit-crossing"; -type VisualBox = "border-box" | "content-box" | "padding-box"; +type DataType$TrackBreadth<TLength> = TLength | "auto" | "max-content" | "min-content" | string; + +type DataType$ViewportLength<TLength> = TLength | "auto" | string; + +type DataType$VisualBox = "border-box" | "content-box" | "padding-box"; diff --git a/node_modules/csstype/package.json b/node_modules/csstype/package.json index b8f3694c..2400fc35 100644 --- a/node_modules/csstype/package.json +++ b/node_modules/csstype/package.json @@ -1,6 +1,6 @@ { "name": "csstype", - "version": "2.6.21", + "version": "3.1.3", "main": "", "types": "index.d.ts", "description": "Strict TypeScript and Flow types for style based on MDN data", @@ -9,36 +9,46 @@ "license": "MIT", "devDependencies": { "@types/chokidar": "^2.1.3", - "@types/jest": "^24.0.21", - "@types/jsdom": "^12.2.4", - "@types/node": "^12.12.3", - "@types/prettier": "^1.18.3", - "chalk": "^2.4.2", - "chokidar": "^3.2.3", - "fast-glob": "^3.1.0", - "flow-bin": "^0.110.1", - "jest": "^24.9.0", - "jsdom": "^15.2.0", - "mdn-browser-compat-data": "git+https://github.com/mdn/browser-compat-data.git#1e8eedcf98a3c282cc745d274050091fa7602490", - "mdn-data": "git+https://github.com/mdn/data.git#fea9f55167435f34fb39912151e1cc4288e7afb7", - "prettier": "^1.18.2", - "sync-request": "^6.1.0", - "ts-node": "^8.4.1", - "tslint": "^5.20.0", - "tslint-config-prettier": "^1.18.0", - "turndown": "^5.0.3", - "typescript": "~3.6.4" + "@types/css-tree": "^2.3.1", + "@types/jest": "^29.5.0", + "@types/jsdom": "^21.1.1", + "@types/node": "^16.18.23", + "@types/prettier": "^2.7.2", + "@types/request": "^2.48.8", + "@types/turndown": "^5.0.1", + "@typescript-eslint/eslint-plugin": "^5.57.0", + "@typescript-eslint/parser": "^5.57.0", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "eslint": "^8.37.0", + "css-tree": "^2.3.1", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-prettier": "^4.2.1", + "fast-glob": "^3.2.12", + "flow-bin": "^0.203.1", + "jest": "^29.5.0", + "jsdom": "^21.1.1", + "mdn-browser-compat-data": "git+https://github.com/mdn/browser-compat-data.git#1bf44517bd08de735e9ec20dbfe8e86c96341054", + "mdn-data": "git+https://github.com/mdn/data.git#7f0c865a3c4b5d891285c93308ee5c25cb5cfee8", + "prettier": "^2.8.7", + "request": "^2.88.2", + "ts-jest": "^29.0.5", + "ts-node": "^10.9.1", + "turndown": "^7.1.2", + "typescript": "~5.0.3" }, "scripts": { + "prepublish": "npm install --prefix __tests__ && npm install --prefix __tests__/__fixtures__", + "prepublishOnly": "tsc && npm run test:src && npm run build && ts-node --files prepublish.ts", "update": "ts-node --files update.ts", "build": "ts-node --files build.ts --start", "watch": "ts-node --files build.ts --watch", - "lint": "tslint --exclude node_modules/**/* --exclude **/*.d.ts --fix **/*.ts", + "lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix", "pretty": "prettier --write build.ts **/*.{ts,js,json,md}", - "lazy": "tsc && npm run lint && npm run pretty", - "test": "jest --no-cache", - "typecheck": "tsc typecheck.ts --noEmit --pretty & flow check typecheck.js", - "prepublish": "tsc && npm run test && npm run build && npm run typecheck" + "lazy": "tsc && npm run lint", + "test": "jest --runInBand", + "test:src": "jest src.*.ts", + "test:dist": "jest dist.*.ts --runInBand" }, "files": [ "index.d.ts", diff --git a/node_modules/entities/LICENSE b/node_modules/entities/LICENSE new file mode 100644 index 00000000..c464f863 --- /dev/null +++ b/node_modules/entities/LICENSE @@ -0,0 +1,11 @@ +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/entities/lib/decode.d.ts b/node_modules/entities/lib/decode.d.ts new file mode 100644 index 00000000..ccfd9fb6 --- /dev/null +++ b/node_modules/entities/lib/decode.d.ts @@ -0,0 +1,211 @@ +import htmlDecodeTree from "./generated/decode-data-html.js"; +import xmlDecodeTree from "./generated/decode-data-xml.js"; +import decodeCodePoint from "./decode_codepoint.js"; +export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; +export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; +export declare enum BinTrieFlags { + VALUE_LENGTH = 49152, + BRANCH_LENGTH = 16256, + JUMP_TABLE = 127 +} +export declare enum DecodingMode { + /** Entities in text nodes that can end with any character. */ + Legacy = 0, + /** Only allow entities terminated with a semicolon. */ + Strict = 1, + /** Entities in attributes have limitations on ending characters. */ + Attribute = 2 +} +/** + * Producers for character reference errors as defined in the HTML spec. + */ +export interface EntityErrorProducer { + missingSemicolonAfterCharacterReference(): void; + absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void; + validateNumericCharacterReference(code: number): void; +} +/** + * Token decoder with support of writing partial entities. + */ +export declare class EntityDecoder { + /** The tree used to decode entities. */ + private readonly decodeTree; + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + private readonly emitCodePoint; + /** An object that is used to produce errors. */ + private readonly errors?; + constructor( + /** The tree used to decode entities. */ + decodeTree: Uint16Array, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint: (cp: number, consumed: number) => void, + /** An object that is used to produce errors. */ + errors?: EntityErrorProducer | undefined); + /** The current state of the decoder. */ + private state; + /** Characters that were consumed while parsing an entity. */ + private consumed; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + private result; + /** The current index in the decode tree. */ + private treeIndex; + /** The number of characters that were consumed in excess. */ + private excess; + /** The mode in which the decoder is operating. */ + private decodeMode; + /** Resets the instance to make it reusable. */ + startEntity(decodeMode: DecodingMode): void; + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(str: string, offset: number): number; + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericStart; + private addToNumericResult; + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericHex; + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericDecimal; + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + private emitNumericEntity; + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNamedEntity; + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + private emitNotTerminatedNamedEntity; + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + private emitNamedEntityData; + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + end(): number; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number; +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +export declare function decodeHTML(str: string, mode?: DecodingMode): string; +/** + * Decodes an HTML string in an attribute. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeHTMLAttribute(str: string): string; +/** + * Decodes an HTML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeHTMLStrict(str: string): string; +/** + * Decodes an XML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeXML(str: string): string; +//# sourceMappingURL=decode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode.d.ts.map b/node_modules/entities/lib/decode.d.ts.map new file mode 100644 index 00000000..4c0b4b45 --- /dev/null +++ b/node_modules/entities/lib/decode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAGN,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAoBxE,oBAAY,YAAY;IACpB,YAAY,QAAwB;IACpC,aAAa,QAAwB;IACrC,UAAU,MAAwB;CACrC;AAuCD,oBAAY,YAAY;IACpB,8DAA8D;IAC9D,MAAM,IAAI;IACV,uDAAuD;IACvD,MAAM,IAAI;IACV,oEAAoE;IACpE,SAAS,IAAI;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,uCAAuC,IAAI,IAAI,CAAC;IAChD,0CAA0C,CACtC,kBAAkB,EAAE,MAAM,GAC3B,IAAI,CAAC;IACR,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACzD;AAED;;GAEG;AACH,qBAAa,aAAa;IAElB,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B;;;;;;;;OAQG;IACH,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,gDAAgD;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;;IAbxB,wCAAwC;IACvB,UAAU,EAAE,WAAW;I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AM,CAE1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode.js b/node_modules/entities/lib/decode.js new file mode 100644 index 00000000..aa4a42c0 --- /dev/null +++ b/node_modules/entities/lib/decode.js @@ -0,0 +1,536 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0; +var decode_data_html_js_1 = __importDefault(require("./generated/decode-data-html.js")); +exports.htmlDecodeTree = decode_data_html_js_1.default; +var decode_data_xml_js_1 = __importDefault(require("./generated/decode-data-xml.js")); +exports.xmlDecodeTree = decode_data_xml_js_1.default; +var decode_codepoint_js_1 = __importStar(require("./decode_codepoint.js")); +exports.decodeCodePoint = decode_codepoint_js_1.default; +var decode_codepoint_js_2 = require("./decode_codepoint.js"); +Object.defineProperty(exports, "replaceCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.replaceCodePoint; } }); +Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.fromCodePoint; } }); +var CharCodes; +(function (CharCodes) { + CharCodes[CharCodes["NUM"] = 35] = "NUM"; + CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; + CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; + CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; + CharCodes[CharCodes["NINE"] = 57] = "NINE"; + CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; + CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; + CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; + CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; + CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; + CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; + CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; +})(CharCodes || (CharCodes = {})); +/** Bit that needs to be set to convert an upper case ASCII character to lower case */ +var TO_LOWER_BIT = 32; +var BinTrieFlags; +(function (BinTrieFlags) { + BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; + BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; + BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; +})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {})); +function isNumber(code) { + return code >= CharCodes.ZERO && code <= CharCodes.NINE; +} +function isHexadecimalCharacter(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); +} +function isAsciiAlphaNumeric(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || + isNumber(code)); +} +/** + * Checks if the given character is a valid end character for an entity in an attribute. + * + * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. + * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + */ +function isEntityInAttributeInvalidEnd(code) { + return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); +} +var EntityDecoderState; +(function (EntityDecoderState) { + EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; + EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; + EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; + EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; + EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; +})(EntityDecoderState || (EntityDecoderState = {})); +var DecodingMode; +(function (DecodingMode) { + /** Entities in text nodes that can end with any character. */ + DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; + /** Only allow entities terminated with a semicolon. */ + DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; + /** Entities in attributes have limitations on ending characters. */ + DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; +})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {})); +/** + * Token decoder with support of writing partial entities. + */ +var EntityDecoder = /** @class */ (function () { + function EntityDecoder( + /** The tree used to decode entities. */ + decodeTree, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint, + /** An object that is used to produce errors. */ + errors) { + this.decodeTree = decodeTree; + this.emitCodePoint = emitCodePoint; + this.errors = errors; + /** The current state of the decoder. */ + this.state = EntityDecoderState.EntityStart; + /** Characters that were consumed while parsing an entity. */ + this.consumed = 1; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + this.result = 0; + /** The current index in the decode tree. */ + this.treeIndex = 0; + /** The number of characters that were consumed in excess. */ + this.excess = 1; + /** The mode in which the decoder is operating. */ + this.decodeMode = DecodingMode.Strict; + } + /** Resets the instance to make it reusable. */ + EntityDecoder.prototype.startEntity = function (decodeMode) { + this.decodeMode = decodeMode; + this.state = EntityDecoderState.EntityStart; + this.result = 0; + this.treeIndex = 0; + this.excess = 1; + this.consumed = 1; + }; + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.write = function (str, offset) { + switch (this.state) { + case EntityDecoderState.EntityStart: { + if (str.charCodeAt(offset) === CharCodes.NUM) { + this.state = EntityDecoderState.NumericStart; + this.consumed += 1; + return this.stateNumericStart(str, offset + 1); + } + this.state = EntityDecoderState.NamedEntity; + return this.stateNamedEntity(str, offset); + } + case EntityDecoderState.NumericStart: { + return this.stateNumericStart(str, offset); + } + case EntityDecoderState.NumericDecimal: { + return this.stateNumericDecimal(str, offset); + } + case EntityDecoderState.NumericHex: { + return this.stateNumericHex(str, offset); + } + case EntityDecoderState.NamedEntity: { + return this.stateNamedEntity(str, offset); + } + } + }; + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.stateNumericStart = function (str, offset) { + if (offset >= str.length) { + return -1; + } + if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { + this.state = EntityDecoderState.NumericHex; + this.consumed += 1; + return this.stateNumericHex(str, offset + 1); + } + this.state = EntityDecoderState.NumericDecimal; + return this.stateNumericDecimal(str, offset); + }; + EntityDecoder.prototype.addToNumericResult = function (str, start, end, base) { + if (start !== end) { + var digitCount = end - start; + this.result = + this.result * Math.pow(base, digitCount) + + parseInt(str.substr(start, digitCount), base); + this.consumed += digitCount; + } + }; + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.stateNumericHex = function (str, offset) { + var startIdx = offset; + while (offset < str.length) { + var char = str.charCodeAt(offset); + if (isNumber(char) || isHexadecimalCharacter(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 16); + return this.emitNumericEntity(char, 3); + } + } + this.addToNumericResult(str, startIdx, offset, 16); + return -1; + }; + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.stateNumericDecimal = function (str, offset) { + var startIdx = offset; + while (offset < str.length) { + var char = str.charCodeAt(offset); + if (isNumber(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 10); + return this.emitNumericEntity(char, 2); + } + } + this.addToNumericResult(str, startIdx, offset, 10); + return -1; + }; + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + EntityDecoder.prototype.emitNumericEntity = function (lastCp, expectedLength) { + var _a; + // Ensure we consumed at least one digit. + if (this.consumed <= expectedLength) { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + // Figure out if this is a legit end of the entity + if (lastCp === CharCodes.SEMI) { + this.consumed += 1; + } + else if (this.decodeMode === DecodingMode.Strict) { + return 0; + } + this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed); + if (this.errors) { + if (lastCp !== CharCodes.SEMI) { + this.errors.missingSemicolonAfterCharacterReference(); + } + this.errors.validateNumericCharacterReference(this.result); + } + return this.consumed; + }; + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + EntityDecoder.prototype.stateNamedEntity = function (str, offset) { + var decodeTree = this.decodeTree; + var current = decodeTree[this.treeIndex]; + // The mask is the number of bytes of the value, including the current byte. + var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + for (; offset < str.length; offset++, this.excess++) { + var char = str.charCodeAt(offset); + this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); + if (this.treeIndex < 0) { + return this.result === 0 || + // If we are parsing an attribute + (this.decodeMode === DecodingMode.Attribute && + // We shouldn't have consumed any characters after the entity, + (valueLength === 0 || + // And there should be no invalid characters. + isEntityInAttributeInvalidEnd(char))) + ? 0 + : this.emitNotTerminatedNamedEntity(); + } + current = decodeTree[this.treeIndex]; + valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + // If the branch is a value, store it and continue + if (valueLength !== 0) { + // If the entity is terminated by a semicolon, we are done. + if (char === CharCodes.SEMI) { + return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); + } + // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. + if (this.decodeMode !== DecodingMode.Strict) { + this.result = this.treeIndex; + this.consumed += this.excess; + this.excess = 0; + } + } + } + return -1; + }; + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + EntityDecoder.prototype.emitNotTerminatedNamedEntity = function () { + var _a; + var _b = this, result = _b.result, decodeTree = _b.decodeTree; + var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; + this.emitNamedEntityData(result, valueLength, this.consumed); + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + return this.consumed; + }; + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + EntityDecoder.prototype.emitNamedEntityData = function (result, valueLength, consumed) { + var decodeTree = this.decodeTree; + this.emitCodePoint(valueLength === 1 + ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH + : decodeTree[result + 1], consumed); + if (valueLength === 3) { + // For multi-byte values, we need to emit the second byte. + this.emitCodePoint(decodeTree[result + 2], consumed); + } + return consumed; + }; + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + EntityDecoder.prototype.end = function () { + var _a; + switch (this.state) { + case EntityDecoderState.NamedEntity: { + // Emit a named entity if we have one. + return this.result !== 0 && + (this.decodeMode !== DecodingMode.Attribute || + this.result === this.treeIndex) + ? this.emitNotTerminatedNamedEntity() + : 0; + } + // Otherwise, emit a numeric entity if we have one. + case EntityDecoderState.NumericDecimal: { + return this.emitNumericEntity(0, 2); + } + case EntityDecoderState.NumericHex: { + return this.emitNumericEntity(0, 3); + } + case EntityDecoderState.NumericStart: { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + case EntityDecoderState.EntityStart: { + // Return 0 if we have no entity. + return 0; + } + } + }; + return EntityDecoder; +}()); +exports.EntityDecoder = EntityDecoder; +/** + * Creates a function that decodes entities in a string. + * + * @param decodeTree The decode tree. + * @returns A function that decodes entities in a string. + */ +function getDecoder(decodeTree) { + var ret = ""; + var decoder = new EntityDecoder(decodeTree, function (str) { return (ret += (0, decode_codepoint_js_1.fromCodePoint)(str)); }); + return function decodeWithTrie(str, decodeMode) { + var lastIndex = 0; + var offset = 0; + while ((offset = str.indexOf("&", offset)) >= 0) { + ret += str.slice(lastIndex, offset); + decoder.startEntity(decodeMode); + var len = decoder.write(str, + // Skip the "&" + offset + 1); + if (len < 0) { + lastIndex = offset + decoder.end(); + break; + } + lastIndex = offset + len; + // If `len` is 0, skip the current `&` and continue. + offset = len === 0 ? lastIndex + 1 : lastIndex; + } + var result = ret + str.slice(lastIndex); + // Make sure we don't keep a reference to the final string. + ret = ""; + return result; + }; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +function determineBranch(decodeTree, current, nodeIdx, char) { + var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; + var jumpOffset = current & BinTrieFlags.JUMP_TABLE; + // Case 1: Single branch encoded in jump offset + if (branchCount === 0) { + return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; + } + // Case 2: Multiple branches encoded in jump table + if (jumpOffset) { + var value = char - jumpOffset; + return value < 0 || value >= branchCount + ? -1 + : decodeTree[nodeIdx + value] - 1; + } + // Case 3: Multiple branches encoded in dictionary + // Binary search for the character. + var lo = nodeIdx; + var hi = lo + branchCount - 1; + while (lo <= hi) { + var mid = (lo + hi) >>> 1; + var midVal = decodeTree[mid]; + if (midVal < char) { + lo = mid + 1; + } + else if (midVal > char) { + hi = mid - 1; + } + else { + return decodeTree[mid + branchCount]; + } + } + return -1; +} +exports.determineBranch = determineBranch; +var htmlDecoder = getDecoder(decode_data_html_js_1.default); +var xmlDecoder = getDecoder(decode_data_xml_js_1.default); +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +function decodeHTML(str, mode) { + if (mode === void 0) { mode = DecodingMode.Legacy; } + return htmlDecoder(str, mode); +} +exports.decodeHTML = decodeHTML; +/** + * Decodes an HTML string in an attribute. + * + * @param str The string to decode. + * @returns The decoded string. + */ +function decodeHTMLAttribute(str) { + return htmlDecoder(str, DecodingMode.Attribute); +} +exports.decodeHTMLAttribute = decodeHTMLAttribute; +/** + * Decodes an HTML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +function decodeHTMLStrict(str) { + return htmlDecoder(str, DecodingMode.Strict); +} +exports.decodeHTMLStrict = decodeHTMLStrict; +/** + * Decodes an XML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +function decodeXML(str) { + return xmlDecoder(str, DecodingMode.Strict); +} +exports.decodeXML = decodeXML; +//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode.js.map b/node_modules/entities/lib/decode.js.map new file mode 100644 index 00000000..afcad7e7 --- /dev/null +++ b/node_modules/entities/lib/decode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAA6D;AAQpD,yBARF,6BAAc,CAQE;AAPvB,sFAA2D;AAOlC,wBAPlB,4BAAa,CAOkB;AANtC,2EAG+B;AAGS,0BANjC,6BAAe,CAMiC;AACvD,6DAAwE;AAA/D,uHAAA,gBAAgB,OAAA;AAAE,oHAAA,aAAa,OA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G,GAAG,CAAC,CAAC;SAChB;aAAM;YACH,OAAO,UAAU,CAAC,GAAG,GAAG,WAAW,CAAC,CAAC;SACxC;KACJ;IAED,OAAO,CAAC,CAAC,CAAC;AACd,CAAC;AA3CD,0CA2CC;AAED,IAAM,WAAW,GAAG,UAAU,CAAC,6BAAc,CAAC,CAAC;AAC/C,IAAM,UAAU,GAAG,UAAU,CAAC,4BAAa,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,GAAW,EAAE,IAA0B;IAA1B,qBAAA,EAAA,OAAO,YAAY,CAAC,MAAM;IAC9D,OAAO,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,gCAEC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,GAAW;IAC3C,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC;AAFD,kDAEC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,GAAW;IACxC,OAAO,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AACjD,CAAC;AAFD,4CAEC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,GAAW;IACjC,OAAO,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAFD,8BAEC"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.d.ts b/node_modules/entities/lib/decode_codepoint.d.ts new file mode 100644 index 00000000..84ae206e --- /dev/null +++ b/node_modules/entities/lib/decode_codepoint.d.ts @@ -0,0 +1,19 @@ +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +export declare const fromCodePoint: (...codePoints: number[]) => string; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +export declare function replaceCodePoint(codePoint: number): number; +/** + * Replace the code point if relevant, then convert it to a string. + * + * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. + * @param codePoint The code point to decode. + * @returns The decoded code point. + */ +export default function decodeCodePoint(codePoint: number): string; +//# sourceMappingURL=decode_codepoint.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.d.ts.map b/node_modules/entities/lib/decode_codepoint.d.ts.map new file mode 100644 index 00000000..38a8deac --- /dev/null +++ b/node_modules/entities/lib/decode_codepoint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"} \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.js b/node_modules/entities/lib/decode_codepoint.js new file mode 100644 index 00000000..12053468 --- /dev/null +++ b/node_modules/entities/lib/decode_codepoint.js @@ -0,0 +1,76 @@ +"use strict"; +// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 +var _a; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.replaceCodePoint = exports.fromCodePoint = void 0; +var decodeMap = new Map([ + [0, 65533], + // C1 Unicode control character reference replacements + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376], +]); +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +exports.fromCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins +(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { + var output = ""; + if (codePoint > 0xffff) { + codePoint -= 0x10000; + output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + output += String.fromCharCode(codePoint); + return output; +}; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +function replaceCodePoint(codePoint) { + var _a; + if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { + return 0xfffd; + } + return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; +} +exports.replaceCodePoint = replaceCodePoint; +/** + * Replace the code point if relevant, then convert it to a string. + * + * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. + * @param codePoint The code point to decode. + * @returns The decoded code point. + */ +function decodeCodePoint(codePoint) { + return (0, exports.fromCodePoint)(replaceCodePoint(codePoint)); +} +exports.default = decodeCodePoint; +//# sourceMappingURL=decode_codepoint.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/decode_codepoint.js.map b/node_modules/entities/lib/decode_codepoint.js.map new file mode 100644 index 00000000..2747865c --- /dev/null +++ b/node_modules/entities/lib/decode_codepoint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode_codepoint.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":";AAAA,qHAAqH;;;;AAErH,IAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,KAAK,CAAC;IACV,sDAAsD;IACtD,CAAC,GAAG,EAAE,IAAI,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AAM,CACxC,CAAC;QACF,SAAS,GAAG,MAAM,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;KAC5C;IAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEN;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,SAAiB;;IAC9C,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,SAAS,GAAG,QAAQ,EAAE;QACtE,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAC;AACjD,CAAC;AAND,4CAMC;AAED;;;;;;GAMG;AACH,SAAwB,eAAe,CAAC,SAAiB;IACrD,OAAO,IAAA,qBAAa,EAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC;AAFD,kCAEC"} \ No newline at end of file diff --git a/node_modules/entities/lib/encode.d.ts b/node_modules/entities/lib/encode.d.ts new file mode 100644 index 00000000..f09c4eee --- /dev/null +++ b/node_modules/entities/lib/encode.d.ts @@ -0,0 +1,22 @@ +/** + * Encodes all characters in the input using HTML entities. This includes + * characters that are valid ASCII characters in HTML documents, such as `#`. + * + * To get a more compact output, consider using the `encodeNonAsciiHTML` + * function, which will only encode characters that are not valid in HTML + * documents, as well as non-ASCII characters. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export declare function encodeHTML(data: string): string; +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. This function will not encode characters that + * are valid in HTML documents, such as `#`. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export declare function encodeNonAsciiHTML(data: string): string; +//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/encode.d.ts.map b/node_modules/entities/lib/encode.d.ts.map new file mode 100644 index 00000000..e24c05b9 --- /dev/null +++ b/node_modules/entities/lib/encode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/node_modules/entities/lib/encode.js b/node_modules/entities/lib/encode.js new file mode 100644 index 00000000..4786a03b --- /dev/null +++ b/node_modules/entities/lib/encode.js @@ -0,0 +1,77 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encodeNonAsciiHTML = exports.encodeHTML = void 0; +var encode_html_js_1 = __importDefault(require("./generated/encode-html.js")); +var escape_js_1 = require("./escape.js"); +var htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; +/** + * Encodes all characters in the input using HTML entities. This includes + * characters that are valid ASCII characters in HTML documents, such as `#`. + * + * To get a more compact output, consider using the `encodeNonAsciiHTML` + * function, which will only encode characters that are not valid in HTML + * documents, as well as non-ASCII characters. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +function encodeHTML(data) { + return encodeHTMLTrieRe(htmlReplacer, data); +} +exports.encodeHTML = encodeHTML; +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. This function will not encode characters that + * are valid in HTML documents, such as `#`. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +function encodeNonAsciiHTML(data) { + return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data); +} +exports.encodeNonAsciiHTML = encodeNonAsciiHTML; +function encodeHTMLTrieRe(regExp, str) { + var ret = ""; + var lastIdx = 0; + var match; + while ((match = regExp.exec(str)) !== null) { + var i = match.index; + ret += str.substring(lastIdx, i); + var char = str.charCodeAt(i); + var next = encode_html_js_1.default.get(char); + if (typeof next === "object") { + // We are in a branch. Try to match the next char. + if (i + 1 < str.length) { + var nextChar = str.charCodeAt(i + 1); + var value = typeof next.n === "number" + ? next.n === nextChar + ? next.o + : undefined + : next.n.get(nextChar); + if (value !== undefined) { + ret += value; + lastIdx = regExp.lastIndex += 1; + continue; + } + } + next = next.v; + } + // We might have a tree node without a value; skip and use a numeric entity. + if (next !== undefined) { + ret += next; + lastIdx = i + 1; + } + else { + var cp = (0, escape_js_1.getCodePoint)(str, i); + ret += "&#x".concat(cp.toString(16), ";"); + // Increase by 1 if we have a surrogate pair + lastIdx = regExp.lastIndex += Number(cp !== char); + } + } + return ret + str.substr(lastIdx); +} +//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/encode.js.map b/node_modules/entities/lib/encode.js.map new file mode 100644 index 00000000..9d471620 --- /dev/null +++ b/node_modules/entities/lib/encode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":";;;;;;AAAA,8EAAkD;AAClD,yCAAwD;AAExD,IAAM,YAAY,GAAG,qCAAqC,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,SAAgB,UAAU,CAAC,IAAY;IACnC,OAAO,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAFD,gCAEC;AACD;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,gBAAgB,CAAC,uBAAW,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAFD,gDAEC;AAED,SAAS,gB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,CAAC;SACnB;aAAM;YACH,IAAM,EAAE,GAAG,IAAA,wBAAY,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAChC,GAAG,IAAI,aAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAG,CAAC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/escape.d.ts b/node_modules/entities/lib/escape.d.ts new file mode 100644 index 00000000..c07ecdc5 --- /dev/null +++ b/node_modules/entities/lib/escape.d.ts @@ -0,0 +1,43 @@ +export declare const xmlReplacer: RegExp; +export declare const getCodePoint: (str: string, index: number) => number; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +export declare function encodeXML(str: string): string; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +export declare const escape: typeof encodeXML; +/** + * Encodes all characters not valid in XML documents using XML entities. + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +export declare const escapeUTF8: (data: string) => string; +/** + * Encodes all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export declare const escapeAttribute: (data: string) => string; +/** + * Encodes all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export declare const escapeText: (data: string) => string; +//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/escape.d.ts.map b/node_modules/entities/lib/escape.d.ts.map new file mode 100644 index 00000000..fa198255 --- /dev/null +++ b/node_modules/entities/lib/escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/escape.js b/node_modules/entities/lib/escape.js new file mode 100644 index 00000000..9f36272f --- /dev/null +++ b/node_modules/entities/lib/escape.js @@ -0,0 +1,122 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.getCodePoint = exports.xmlReplacer = void 0; +exports.xmlReplacer = /["&'<>$\x80-\uFFFF]/g; +var xmlCodeMap = new Map([ + [34, """], + [38, "&"], + [39, "'"], + [60, "<"], + [62, ">"], +]); +// For compatibility with node < 4, we wrap `codePointAt` +exports.getCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition +String.prototype.codePointAt != null + ? function (str, index) { return str.codePointAt(index); } + : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + function (c, index) { + return (c.charCodeAt(index) & 0xfc00) === 0xd800 + ? (c.charCodeAt(index) - 0xd800) * 0x400 + + c.charCodeAt(index + 1) - + 0xdc00 + + 0x10000 + : c.charCodeAt(index); + }; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +function encodeXML(str) { + var ret = ""; + var lastIdx = 0; + var match; + while ((match = exports.xmlReplacer.exec(str)) !== null) { + var i = match.index; + var char = str.charCodeAt(i); + var next = xmlCodeMap.get(char); + if (next !== undefined) { + ret += str.substring(lastIdx, i) + next; + lastIdx = i + 1; + } + else { + ret += "".concat(str.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str, i).toString(16), ";"); + // Increase by 1 if we have a surrogate pair + lastIdx = exports.xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); + } + } + return ret + str.substr(lastIdx); +} +exports.encodeXML = encodeXML; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +exports.escape = encodeXML; +/** + * Creates a function that escapes all characters matched by the given regular + * expression using the given map of characters to escape to their entities. + * + * @param regex Regular expression to match characters to escape. + * @param map Map of characters to escape to their entities. + * + * @returns Function that escapes all characters matched by the given regular + * expression using the given map of characters to escape to their entities. + */ +function getEscaper(regex, map) { + return function escape(data) { + var match; + var lastIdx = 0; + var result = ""; + while ((match = regex.exec(data))) { + if (lastIdx !== match.index) { + result += data.substring(lastIdx, match.index); + } + // We know that this character will be in the map. + result += map.get(match[0].charCodeAt(0)); + // Every match will be of length 1 + lastIdx = match.index + 1; + } + return result + data.substring(lastIdx); + }; +} +/** + * Encodes all characters not valid in XML documents using XML entities. + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +exports.escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); +/** + * Encodes all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +exports.escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ + [34, """], + [38, "&"], + [160, " "], +])); +/** + * Encodes all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +exports.escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ + [38, "&"], + [60, "<"], + [62, ">"], + [160, " "], +])); +//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/escape.js.map b/node_modules/entities/lib/escape.js.map new file mode 100644 index 00000000..f96d022c --- /dev/null +++ b/node_modules/entities/lib/escape.js.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,sBAAsB,CAAC;AAElD,IAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AAC5C,QAAA,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,UAAC,GAAW,EAAE,KAAa,IAAa,OAAA,GAAG,CAAC,WAAW,CAAC,KAAK,CAAE,EAAvB,CAAuB;IACjE,CAAC,CAAC,uEAAuE;QACvE,UAAC,CAAS,EAAE,KAAa;YACrB,OAAA,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,MAAM;gBACrC,CAA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IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.d.ts b/node_modules/entities/lib/esm/decode.d.ts new file mode 100644 index 00000000..ccfd9fb6 --- /dev/null +++ b/node_modules/entities/lib/esm/decode.d.ts @@ -0,0 +1,211 @@ +import htmlDecodeTree from "./generated/decode-data-html.js"; +import xmlDecodeTree from "./generated/decode-data-xml.js"; +import decodeCodePoint from "./decode_codepoint.js"; +export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; +export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; +export declare enum BinTrieFlags { + VALUE_LENGTH = 49152, + BRANCH_LENGTH = 16256, + JUMP_TABLE = 127 +} +export declare enum DecodingMode { + /** Entities in text nodes that can end with any character. */ + Legacy = 0, + /** Only allow entities terminated with a semicolon. */ + Strict = 1, + /** Entities in attributes have limitations on ending characters. */ + Attribute = 2 +} +/** + * Producers for character reference errors as defined in the HTML spec. + */ +export interface EntityErrorProducer { + missingSemicolonAfterCharacterReference(): void; + absenceOfDigitsInNumericCharacterReference(consumedCharacters: number): void; + validateNumericCharacterReference(code: number): void; +} +/** + * Token decoder with support of writing partial entities. + */ +export declare class EntityDecoder { + /** The tree used to decode entities. */ + private readonly decodeTree; + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + private readonly emitCodePoint; + /** An object that is used to produce errors. */ + private readonly errors?; + constructor( + /** The tree used to decode entities. */ + decodeTree: Uint16Array, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint: (cp: number, consumed: number) => void, + /** An object that is used to produce errors. */ + errors?: EntityErrorProducer | undefined); + /** The current state of the decoder. */ + private state; + /** Characters that were consumed while parsing an entity. */ + private consumed; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + private result; + /** The current index in the decode tree. */ + private treeIndex; + /** The number of characters that were consumed in excess. */ + private excess; + /** The mode in which the decoder is operating. */ + private decodeMode; + /** Resets the instance to make it reusable. */ + startEntity(decodeMode: DecodingMode): void; + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(str: string, offset: number): number; + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericStart; + private addToNumericResult; + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericHex; + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNumericDecimal; + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + private emitNumericEntity; + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + private stateNamedEntity; + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + private emitNotTerminatedNamedEntity; + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + private emitNamedEntityData; + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + end(): number; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +export declare function determineBranch(decodeTree: Uint16Array, current: number, nodeIdx: number, char: number): number; +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +export declare function decodeHTML(str: string, mode?: DecodingMode): string; +/** + * Decodes an HTML string in an attribute. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeHTMLAttribute(str: string): string; +/** + * Decodes an HTML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeHTMLStrict(str: string): string; +/** + * Decodes an XML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export declare function decodeXML(str: string): string; +//# sourceMappingURL=decode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.d.ts.map b/node_modules/entities/lib/esm/decode.d.ts.map new file mode 100644 index 00000000..4c0b4b45 --- /dev/null +++ b/node_modules/entities/lib/esm/decode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a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/decode.js new file mode 100644 index 00000000..de225ec6 --- /dev/null +++ b/node_modules/entities/lib/esm/decode.js @@ -0,0 +1,496 @@ +import htmlDecodeTree from "./generated/decode-data-html.js"; +import xmlDecodeTree from "./generated/decode-data-xml.js"; +import decodeCodePoint, { replaceCodePoint, fromCodePoint, } from "./decode_codepoint.js"; +// Re-export for use by eg. htmlparser2 +export { htmlDecodeTree, xmlDecodeTree, decodeCodePoint }; +export { replaceCodePoint, fromCodePoint } from "./decode_codepoint.js"; +var CharCodes; +(function (CharCodes) { + CharCodes[CharCodes["NUM"] = 35] = "NUM"; + CharCodes[CharCodes["SEMI"] = 59] = "SEMI"; + CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS"; + CharCodes[CharCodes["ZERO"] = 48] = "ZERO"; + CharCodes[CharCodes["NINE"] = 57] = "NINE"; + CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A"; + CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F"; + CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X"; + CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z"; + CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A"; + CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F"; + CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z"; +})(CharCodes || (CharCodes = {})); +/** Bit that needs to be set to convert an upper case ASCII character to lower case */ +const TO_LOWER_BIT = 0b100000; +export var BinTrieFlags; +(function (BinTrieFlags) { + BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; + BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH"; + BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; +})(BinTrieFlags || (BinTrieFlags = {})); +function isNumber(code) { + return code >= CharCodes.ZERO && code <= CharCodes.NINE; +} +function isHexadecimalCharacter(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F)); +} +function isAsciiAlphaNumeric(code) { + return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) || + (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) || + isNumber(code)); +} +/** + * Checks if the given character is a valid end character for an entity in an attribute. + * + * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error. + * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + */ +function isEntityInAttributeInvalidEnd(code) { + return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); +} +var EntityDecoderState; +(function (EntityDecoderState) { + EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart"; + EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart"; + EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal"; + EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex"; + EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity"; +})(EntityDecoderState || (EntityDecoderState = {})); +export var DecodingMode; +(function (DecodingMode) { + /** Entities in text nodes that can end with any character. */ + DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy"; + /** Only allow entities terminated with a semicolon. */ + DecodingMode[DecodingMode["Strict"] = 1] = "Strict"; + /** Entities in attributes have limitations on ending characters. */ + DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute"; +})(DecodingMode || (DecodingMode = {})); +/** + * Token decoder with support of writing partial entities. + */ +export class EntityDecoder { + constructor( + /** The tree used to decode entities. */ + decodeTree, + /** + * The function that is called when a codepoint is decoded. + * + * For multi-byte named entities, this will be called multiple times, + * with the second codepoint, and the same `consumed` value. + * + * @param codepoint The decoded codepoint. + * @param consumed The number of bytes consumed by the decoder. + */ + emitCodePoint, + /** An object that is used to produce errors. */ + errors) { + this.decodeTree = decodeTree; + this.emitCodePoint = emitCodePoint; + this.errors = errors; + /** The current state of the decoder. */ + this.state = EntityDecoderState.EntityStart; + /** Characters that were consumed while parsing an entity. */ + this.consumed = 1; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + this.result = 0; + /** The current index in the decode tree. */ + this.treeIndex = 0; + /** The number of characters that were consumed in excess. */ + this.excess = 1; + /** The mode in which the decoder is operating. */ + this.decodeMode = DecodingMode.Strict; + } + /** Resets the instance to make it reusable. */ + startEntity(decodeMode) { + this.decodeMode = decodeMode; + this.state = EntityDecoderState.EntityStart; + this.result = 0; + this.treeIndex = 0; + this.excess = 1; + this.consumed = 1; + } + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * + * @param string The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(str, offset) { + switch (this.state) { + case EntityDecoderState.EntityStart: { + if (str.charCodeAt(offset) === CharCodes.NUM) { + this.state = EntityDecoderState.NumericStart; + this.consumed += 1; + return this.stateNumericStart(str, offset + 1); + } + this.state = EntityDecoderState.NamedEntity; + return this.stateNamedEntity(str, offset); + } + case EntityDecoderState.NumericStart: { + return this.stateNumericStart(str, offset); + } + case EntityDecoderState.NumericDecimal: { + return this.stateNumericDecimal(str, offset); + } + case EntityDecoderState.NumericHex: { + return this.stateNumericHex(str, offset); + } + case EntityDecoderState.NamedEntity: { + return this.stateNamedEntity(str, offset); + } + } + } + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericStart(str, offset) { + if (offset >= str.length) { + return -1; + } + if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { + this.state = EntityDecoderState.NumericHex; + this.consumed += 1; + return this.stateNumericHex(str, offset + 1); + } + this.state = EntityDecoderState.NumericDecimal; + return this.stateNumericDecimal(str, offset); + } + addToNumericResult(str, start, end, base) { + if (start !== end) { + const digitCount = end - start; + this.result = + this.result * Math.pow(base, digitCount) + + parseInt(str.substr(start, digitCount), base); + this.consumed += digitCount; + } + } + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericHex(str, offset) { + const startIdx = offset; + while (offset < str.length) { + const char = str.charCodeAt(offset); + if (isNumber(char) || isHexadecimalCharacter(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 16); + return this.emitNumericEntity(char, 3); + } + } + this.addToNumericResult(str, startIdx, offset, 16); + return -1; + } + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericDecimal(str, offset) { + const startIdx = offset; + while (offset < str.length) { + const char = str.charCodeAt(offset); + if (isNumber(char)) { + offset += 1; + } + else { + this.addToNumericResult(str, startIdx, offset, 10); + return this.emitNumericEntity(char, 2); + } + } + this.addToNumericResult(str, startIdx, offset, 10); + return -1; + } + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + emitNumericEntity(lastCp, expectedLength) { + var _a; + // Ensure we consumed at least one digit. + if (this.consumed <= expectedLength) { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + // Figure out if this is a legit end of the entity + if (lastCp === CharCodes.SEMI) { + this.consumed += 1; + } + else if (this.decodeMode === DecodingMode.Strict) { + return 0; + } + this.emitCodePoint(replaceCodePoint(this.result), this.consumed); + if (this.errors) { + if (lastCp !== CharCodes.SEMI) { + this.errors.missingSemicolonAfterCharacterReference(); + } + this.errors.validateNumericCharacterReference(this.result); + } + return this.consumed; + } + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * + * @param str The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNamedEntity(str, offset) { + const { decodeTree } = this; + let current = decodeTree[this.treeIndex]; + // The mask is the number of bytes of the value, including the current byte. + let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + for (; offset < str.length; offset++, this.excess++) { + const char = str.charCodeAt(offset); + this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); + if (this.treeIndex < 0) { + return this.result === 0 || + // If we are parsing an attribute + (this.decodeMode === DecodingMode.Attribute && + // We shouldn't have consumed any characters after the entity, + (valueLength === 0 || + // And there should be no invalid characters. + isEntityInAttributeInvalidEnd(char))) + ? 0 + : this.emitNotTerminatedNamedEntity(); + } + current = decodeTree[this.treeIndex]; + valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + // If the branch is a value, store it and continue + if (valueLength !== 0) { + // If the entity is terminated by a semicolon, we are done. + if (char === CharCodes.SEMI) { + return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); + } + // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it. + if (this.decodeMode !== DecodingMode.Strict) { + this.result = this.treeIndex; + this.consumed += this.excess; + this.excess = 0; + } + } + } + return -1; + } + /** + * Emit a named entity that was not terminated with a semicolon. + * + * @returns The number of characters consumed. + */ + emitNotTerminatedNamedEntity() { + var _a; + const { result, decodeTree } = this; + const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; + this.emitNamedEntityData(result, valueLength, this.consumed); + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + return this.consumed; + } + /** + * Emit a named entity. + * + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * + * @returns The number of characters consumed. + */ + emitNamedEntityData(result, valueLength, consumed) { + const { decodeTree } = this; + this.emitCodePoint(valueLength === 1 + ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH + : decodeTree[result + 1], consumed); + if (valueLength === 3) { + // For multi-byte values, we need to emit the second byte. + this.emitCodePoint(decodeTree[result + 2], consumed); + } + return consumed; + } + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * + * @returns The number of characters consumed. + */ + end() { + var _a; + switch (this.state) { + case EntityDecoderState.NamedEntity: { + // Emit a named entity if we have one. + return this.result !== 0 && + (this.decodeMode !== DecodingMode.Attribute || + this.result === this.treeIndex) + ? this.emitNotTerminatedNamedEntity() + : 0; + } + // Otherwise, emit a numeric entity if we have one. + case EntityDecoderState.NumericDecimal: { + return this.emitNumericEntity(0, 2); + } + case EntityDecoderState.NumericHex: { + return this.emitNumericEntity(0, 3); + } + case EntityDecoderState.NumericStart: { + (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + case EntityDecoderState.EntityStart: { + // Return 0 if we have no entity. + return 0; + } + } + } +} +/** + * Creates a function that decodes entities in a string. + * + * @param decodeTree The decode tree. + * @returns A function that decodes entities in a string. + */ +function getDecoder(decodeTree) { + let ret = ""; + const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str))); + return function decodeWithTrie(str, decodeMode) { + let lastIndex = 0; + let offset = 0; + while ((offset = str.indexOf("&", offset)) >= 0) { + ret += str.slice(lastIndex, offset); + decoder.startEntity(decodeMode); + const len = decoder.write(str, + // Skip the "&" + offset + 1); + if (len < 0) { + lastIndex = offset + decoder.end(); + break; + } + lastIndex = offset + len; + // If `len` is 0, skip the current `&` and continue. + offset = len === 0 ? lastIndex + 1 : lastIndex; + } + const result = ret + str.slice(lastIndex); + // Make sure we don't keep a reference to the final string. + ret = ""; + return result; + }; +} +/** + * Determines the branch of the current node that is taken given the current + * character. This function is used to traverse the trie. + * + * @param decodeTree The trie. + * @param current The current node. + * @param nodeIdx The index right after the current node and its value. + * @param char The current character. + * @returns The index of the next node, or -1 if no branch is taken. + */ +export function determineBranch(decodeTree, current, nodeIdx, char) { + const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; + const jumpOffset = current & BinTrieFlags.JUMP_TABLE; + // Case 1: Single branch encoded in jump offset + if (branchCount === 0) { + return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; + } + // Case 2: Multiple branches encoded in jump table + if (jumpOffset) { + const value = char - jumpOffset; + return value < 0 || value >= branchCount + ? -1 + : decodeTree[nodeIdx + value] - 1; + } + // Case 3: Multiple branches encoded in dictionary + // Binary search for the character. + let lo = nodeIdx; + let hi = lo + branchCount - 1; + while (lo <= hi) { + const mid = (lo + hi) >>> 1; + const midVal = decodeTree[mid]; + if (midVal < char) { + lo = mid + 1; + } + else if (midVal > char) { + hi = mid - 1; + } + else { + return decodeTree[mid + branchCount]; + } + } + return -1; +} +const htmlDecoder = getDecoder(htmlDecodeTree); +const xmlDecoder = getDecoder(xmlDecodeTree); +/** + * Decodes an HTML string. + * + * @param str The string to decode. + * @param mode The decoding mode. + * @returns The decoded string. + */ +export function decodeHTML(str, mode = DecodingMode.Legacy) { + return htmlDecoder(str, mode); +} +/** + * Decodes an HTML string in an attribute. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export function decodeHTMLAttribute(str) { + return htmlDecoder(str, DecodingMode.Attribute); +} +/** + * Decodes an HTML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export function decodeHTMLStrict(str) { + return htmlDecoder(str, DecodingMode.Strict); +} +/** + * Decodes an XML string, requiring all entities to be terminated by a semicolon. + * + * @param str The string to decode. + * @returns The decoded string. + */ +export function decodeXML(str) { + return xmlDecoder(str, DecodingMode.Strict); +} +//# sourceMappingURL=decode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode.js.map b/node_modules/entities/lib/esm/decode.js.map new file mode 100644 index 00000000..2db15108 --- /dev/null +++ b/node_modules/entities/lib/esm/decode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,aAAa,MAAM,gCAAgC,CAAC;AAC3D,OAAO,eAAe,EAAE,EACpB,gBAAgB,EAChB,aAAa,GAChB,MAAM,uBAAuB,CAAC;AAE/B,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAExE,IAAW,SAaV;AAbD,WAAW,SAAS;IAChB,wCAAQ,CAAA;IACR,0CAAS,CAAA;IACT,8CAAW,CAAA;IACX,0CAAS,CAAA;IACT,0CAAS,CAAA;IACT,gDAAY,CAAA;IACZ,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,iDAAa,CAAA;IACb,gDAAY,CAAA;IACZ,gDAAY,CAAA;IACZ,gDAAY,CAAA;AAChB,CAAC,EAbU,SAAS,KAAT,SAAS,QAanB;AAED,sFAAsF;AACtF,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,mEAAoC,CAAA;IACpC,qEAAqC,CAAA;IACrC,6DAAkC,CAAA;AACtC,CAAC,EAJW,YAAY,KAAZ,YAA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AC,MAAM,CAAC,CAAC;AACjD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACjC,OAAO,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.d.ts b/node_modules/entities/lib/esm/decode_codepoint.d.ts new file mode 100644 index 00000000..84ae206e --- /dev/null +++ b/node_modules/entities/lib/esm/decode_codepoint.d.ts @@ -0,0 +1,19 @@ +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +export declare const fromCodePoint: (...codePoints: number[]) => string; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +export declare function replaceCodePoint(codePoint: number): number; +/** + * Replace the code point if relevant, then convert it to a string. + * + * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. + * @param codePoint The code point to decode. + * @returns The decoded code point. + */ +export default function decodeCodePoint(codePoint: number): string; +//# sourceMappingURL=decode_codepoint.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.d.ts.map b/node_modules/entities/lib/esm/decode_codepoint.d.ts.map new file mode 100644 index 00000000..38a8deac --- /dev/null +++ b/node_modules/entities/lib/esm/decode_codepoint.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.js b/node_modules/entities/lib/esm/decode_codepoint.js new file mode 100644 index 00000000..4d8281e3 --- /dev/null +++ b/node_modules/entities/lib/esm/decode_codepoint.js @@ -0,0 +1,71 @@ +// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134 +var _a; +const decodeMap = new Map([ + [0, 65533], + // C1 Unicode control character reference replacements + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376], +]); +/** + * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point. + */ +export const fromCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins +(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) { + let output = ""; + if (codePoint > 0xffff) { + codePoint -= 0x10000; + output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + output += String.fromCharCode(codePoint); + return output; +}; +/** + * Replace the given code point with a replacement character if it is a + * surrogate or is outside the valid range. Otherwise return the code + * point unchanged. + */ +export function replaceCodePoint(codePoint) { + var _a; + if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { + return 0xfffd; + } + return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; +} +/** + * Replace the code point if relevant, then convert it to a string. + * + * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead. + * @param codePoint The code point to decode. + * @returns The decoded code point. + */ +export default function decodeCodePoint(codePoint) { + return fromCodePoint(replaceCodePoint(codePoint)); +} +//# sourceMappingURL=decode_codepoint.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/decode_codepoint.js.map b/node_modules/entities/lib/esm/decode_codepoint.js.map new file mode 100644 index 00000000..53a32b6d --- /dev/null +++ b/node_modules/entities/lib/esm/decode_codepoint.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode_codepoint.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAAA,qHAAqH;;AAErH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACtB,CAAC,CAAC,EAAE,KAAK,CAAC;IACV,sDAAsD;IACtD,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,IAAI,CAAC;IACX,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;IACV,CAAC,GAAG,EAAE,GAAG,CAAC;CACb,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa;AACtB,iHAAiH;AACjH,MAAA,MAAM,CAAC,aAAa,mCACpB,UAAU,SAAiB;IACvB,IAAI,MAAM,GAAG,EAAE,CAAC;IAEhB,IAAI,SAAS,GAAG,MAAM,EAAE;QACpB,SAAS,IAAI,OAAO,CAAC;QACrB,MAAM,IAAI,MAAM,CAAC,YAAY,CACzB,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CACxC,CAAC;QACF,SAAS,GAAG,MAAM,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;KAC5C;IAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACzC,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEN;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAiB;;IAC9C,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,SAAS,GAAG,QAAQ,EAAE;QACtE,OAAO,MAAM,CAAC;KACjB;IAED,OAAO,MAAA,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAiB;IACrD,OAAO,aAAa,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.d.ts b/node_modules/entities/lib/esm/encode.d.ts new file mode 100644 index 00000000..f09c4eee --- /dev/null +++ b/node_modules/entities/lib/esm/encode.d.ts @@ -0,0 +1,22 @@ +/** + * Encodes all characters in the input using HTML entities. This includes + * characters that are valid ASCII characters in HTML documents, such as `#`. + * + * To get a more compact output, consider using the `encodeNonAsciiHTML` + * function, which will only encode characters that are not valid in HTML + * documents, as well as non-ASCII characters. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export declare function encodeHTML(data: string): string; +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. This function will not encode characters that + * are valid in HTML documents, such as `#`. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export declare function encodeNonAsciiHTML(data: string): string; +//# sourceMappingURL=encode.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.d.ts.map b/node_modules/entities/lib/esm/encode.d.ts.map new file mode 100644 index 00000000..e24c05b9 --- /dev/null +++ b/node_modules/entities/lib/esm/encode.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encode.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AACD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.js b/node_modules/entities/lib/esm/encode.js new file mode 100644 index 00000000..9c2364f4 --- /dev/null +++ b/node_modules/entities/lib/esm/encode.js @@ -0,0 +1,69 @@ +import htmlTrie from "./generated/encode-html.js"; +import { xmlReplacer, getCodePoint } from "./escape.js"; +const htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; +/** + * Encodes all characters in the input using HTML entities. This includes + * characters that are valid ASCII characters in HTML documents, such as `#`. + * + * To get a more compact output, consider using the `encodeNonAsciiHTML` + * function, which will only encode characters that are not valid in HTML + * documents, as well as non-ASCII characters. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export function encodeHTML(data) { + return encodeHTMLTrieRe(htmlReplacer, data); +} +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. This function will not encode characters that + * are valid in HTML documents, such as `#`. + * + * If a character has no equivalent entity, a numeric hexadecimal reference + * (eg. `ü`) will be used. + */ +export function encodeNonAsciiHTML(data) { + return encodeHTMLTrieRe(xmlReplacer, data); +} +function encodeHTMLTrieRe(regExp, str) { + let ret = ""; + let lastIdx = 0; + let match; + while ((match = regExp.exec(str)) !== null) { + const i = match.index; + ret += str.substring(lastIdx, i); + const char = str.charCodeAt(i); + let next = htmlTrie.get(char); + if (typeof next === "object") { + // We are in a branch. Try to match the next char. + if (i + 1 < str.length) { + const nextChar = str.charCodeAt(i + 1); + const value = typeof next.n === "number" + ? next.n === nextChar + ? next.o + : undefined + : next.n.get(nextChar); + if (value !== undefined) { + ret += value; + lastIdx = regExp.lastIndex += 1; + continue; + } + } + next = next.v; + } + // We might have a tree node without a value; skip and use a numeric entity. + if (next !== undefined) { + ret += next; + lastIdx = i + 1; + } + else { + const cp = getCodePoint(str, i); + ret += `&#x${cp.toString(16)};`; + // Increase by 1 if we have a surrogate pair + lastIdx = regExp.lastIndex += Number(cp !== char); + } + } + return ret + str.substr(lastIdx); +} +//# sourceMappingURL=encode.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/encode.js.map b/node_modules/entities/lib/esm/encode.js.map new file mode 100644 index 00000000..14ac068c --- /dev/null +++ b/node_modules/entities/lib/esm/encode.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encode.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["encode.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,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AE/B,IAAI,KAAK,KAAK,SAAS,EAAE;oBACrB,GAAG,IAAI,KAAK,CAAC;oBACb,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC;oBAChC,SAAS;iBACZ;aACJ;YAED,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;SACjB;QAED,4EAA4E;QAC5E,IAAI,IAAI,KAAK,SAAS,EAAE;YACpB,GAAG,IAAI,IAAI,CAAC;YACZ,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;aAAM;YACH,MAAM,EAAE,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAChC,GAAG,IAAI,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC;YAChC,4CAA4C;YAC5C,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;SACrD;KACJ;IAED,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.d.ts b/node_modules/entities/lib/esm/escape.d.ts new file mode 100644 index 00000000..c07ecdc5 --- /dev/null +++ b/node_modules/entities/lib/esm/escape.d.ts @@ -0,0 +1,43 @@ +export declare const xmlReplacer: RegExp; +export declare const getCodePoint: (str: string, index: number) => number; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +export declare function encodeXML(str: string): string; +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +export declare const escape: typeof encodeXML; +/** + * Encodes all characters not valid in XML documents using XML entities. + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +export declare const escapeUTF8: (data: string) => string; +/** + * Encodes all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export declare const escapeAttribute: (data: string) => string; +/** + * Encodes all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export declare const escapeText: (data: string) => string; +//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.d.ts.map b/node_modules/entities/lib/esm/escape.d.ts.map new file mode 100644 index 00000000..fa198255 --- /dev/null +++ b/node_modules/entities/lib/esm/escape.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAyB,CAAC;AAWlD,eAAO,MAAM,YAAY,QAGT,MAAM,SAAS,MAAM,KAAG,MAQD,CAAC;AAExC;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA0B7C;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,kBAAY,CAAC;AAqChC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,SA7Bb,MAAM,KAAK,MA6BuC,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SArClB,MAAM,KAAK,MA4CpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SApDb,MAAM,KAAK,MA4DpB,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.js b/node_modules/entities/lib/esm/escape.js new file mode 100644 index 00000000..c64da6eb --- /dev/null +++ b/node_modules/entities/lib/esm/escape.js @@ -0,0 +1,116 @@ +export const xmlReplacer = /["&'<>$\x80-\uFFFF]/g; +const xmlCodeMap = new Map([ + [34, """], + [38, "&"], + [39, "'"], + [60, "<"], + [62, ">"], +]); +// For compatibility with node < 4, we wrap `codePointAt` +export const getCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition +String.prototype.codePointAt != null + ? (str, index) => str.codePointAt(index) + : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + (c, index) => (c.charCodeAt(index) & 0xfc00) === 0xd800 + ? (c.charCodeAt(index) - 0xd800) * 0x400 + + c.charCodeAt(index + 1) - + 0xdc00 + + 0x10000 + : c.charCodeAt(index); +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +export function encodeXML(str) { + let ret = ""; + let lastIdx = 0; + let match; + while ((match = xmlReplacer.exec(str)) !== null) { + const i = match.index; + const char = str.charCodeAt(i); + const next = xmlCodeMap.get(char); + if (next !== undefined) { + ret += str.substring(lastIdx, i) + next; + lastIdx = i + 1; + } + else { + ret += `${str.substring(lastIdx, i)}&#x${getCodePoint(str, i).toString(16)};`; + // Increase by 1 if we have a surrogate pair + lastIdx = xmlReplacer.lastIndex += Number((char & 0xfc00) === 0xd800); + } + } + return ret + str.substr(lastIdx); +} +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +export const escape = encodeXML; +/** + * Creates a function that escapes all characters matched by the given regular + * expression using the given map of characters to escape to their entities. + * + * @param regex Regular expression to match characters to escape. + * @param map Map of characters to escape to their entities. + * + * @returns Function that escapes all characters matched by the given regular + * expression using the given map of characters to escape to their entities. + */ +function getEscaper(regex, map) { + return function escape(data) { + let match; + let lastIdx = 0; + let result = ""; + while ((match = regex.exec(data))) { + if (lastIdx !== match.index) { + result += data.substring(lastIdx, match.index); + } + // We know that this character will be in the map. + result += map.get(match[0].charCodeAt(0)); + // Every match will be of length 1 + lastIdx = match.index + 1; + } + return result + data.substring(lastIdx); + }; +} +/** + * Encodes all characters not valid in XML documents using XML entities. + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +export const escapeUTF8 = getEscaper(/[&<>'"]/g, xmlCodeMap); +/** + * Encodes all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export const escapeAttribute = getEscaper(/["&\u00A0]/g, new Map([ + [34, """], + [38, "&"], + [160, " "], +])); +/** + * Encodes all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + * + * @param data String to escape. + */ +export const escapeText = getEscaper(/[&<>\u00A0]/g, new Map([ + [38, "&"], + [60, "<"], + [62, ">"], + [160, " "], +])); +//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/escape.js.map b/node_modules/entities/lib/esm/escape.js.map new file mode 100644 index 00000000..164301c2 --- /dev/null +++ b/node_modules/entities/lib/esm/escape.js.map @@ -0,0 +1 @@ +{"version":3,"file":"escape.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["escape.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAElD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC;IACvB,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,QAAQ,CAAC;IACd,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,YAAY;AACrB,uEAAuE;AACvE,MAAM,CAAC,SAAS,CAAC,WAAW,IAAI,IAAI;IAChC,CAAC,CAAC,CAAC,GAAW,EAAE,KAAa,EAAU,EAAE,CAAC,GAAG,CAAC,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;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAChC,cAAc,EACd,IAAI,GAAG,CAAC;IACJ,CAAC,EAAE,EAAE,OAAO,CAAC;IACb,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,QAAQ,CAAC;CAClB,CAAC,CACL,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts b/node_modules/entities/lib/esm/generated/decode-data-html.d.ts new file mode 100644 index 00000000..9cfc4f42 --- /dev/null +++ b/node_modules/entities/lib/esm/generated/decode-data-html.d.ts @@ -0,0 +1,3 @@ +declare const _default: Uint16Array; +export default _default; +//# sourceMappingURL=decode-data-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map b/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map new file mode 100644 index 00000000..6d4d64b8 --- /dev/null +++ b/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.js b/node_modules/entities/lib/esm/generated/decode-data-html.js new file mode 100644 index 00000000..0791b550 --- /dev/null +++ b/node_modules/entities/lib/esm/generated/decode-data-html.js @@ -0,0 +1,7 @@ +// Generated using scripts/write-decode-map.ts +export default new Uint16Array( +// prettier-ignore +"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" + .split("") + .map((c) => c.charCodeAt(0))); +//# sourceMappingURL=decode-data-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-html.js.map b/node_modules/entities/lib/esm/generated/decode-data-html.js.map new file mode 100644 index 00000000..c4b1e6b6 --- /dev/null +++ b/node_modules/entities/lib/esm/generated/decode-data-html.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts b/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts new file mode 100644 index 00000000..4a3f5337 --- /dev/null +++ b/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts @@ -0,0 +1,3 @@ +declare const _default: Uint16Array; +export default _default; +//# sourceMappingURL=decode-data-xml.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map b/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map new file mode 100644 index 00000000..be2a9a2e --- /dev/null +++ b/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-xml.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.js b/node_modules/entities/lib/esm/generated/decode-data-xml.js new file mode 100644 index 00000000..b01dec7d --- /dev/null +++ b/node_modules/entities/lib/esm/generated/decode-data-xml.js @@ -0,0 +1,7 @@ +// Generated using scripts/write-decode-map.ts +export default new Uint16Array( +// prettier-ignore +"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" + .split("") + .map((c) => c.charCodeAt(0))); +//# sourceMappingURL=decode-data-xml.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/decode-data-xml.js.map b/node_modules/entities/lib/esm/generated/decode-data-xml.js.map new file mode 100644 index 00000000..86f7150d --- /dev/null +++ b/node_modules/entities/lib/esm/generated/decode-data-xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.d.ts b/node_modules/entities/lib/esm/generated/encode-html.d.ts new file mode 100644 index 00000000..07048276 --- /dev/null +++ b/node_modules/entities/lib/esm/generated/encode-html.d.ts @@ -0,0 +1,8 @@ +type EncodeTrieNode = string | { + v?: string; + n: number | Map<number, EncodeTrieNode>; + o?: string; +}; +declare const _default: Map<number, EncodeTrieNode>; +export default _default; +//# sourceMappingURL=encode-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.d.ts.map b/node_modules/entities/lib/esm/generated/encode-html.d.ts.map new file mode 100644 index 00000000..e665a6e6 --- /dev/null +++ b/node_modules/entities/lib/esm/generated/encode-html.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encode-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AAY1E,wBAAo+tB"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.js b/node_modules/entities/lib/esm/generated/encode-html.js new file mode 100644 index 00000000..9f1858b9 --- /dev/null +++ b/node_modules/entities/lib/esm/generated/encode-html.js @@ -0,0 +1,10 @@ +// Generated using scripts/write-encode-map.ts +function restoreDiff(arr) { + for (let i = 1; i < arr.length; i++) { + arr[i][0] += arr[i - 1][0] + 1; + } + return arr; +} +// prettier-ignore +export default new Map(/* #__PURE__ */ restoreDiff([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); +//# sourceMappingURL=encode-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/generated/encode-html.js.map b/node_modules/entities/lib/esm/generated/encode-html.js.map new file mode 100644 index 00000000..8906ff8c --- /dev/null +++ b/node_modules/entities/lib/esm/generated/encode-html.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encode-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAM9C,SAAS,WAAW,CAChB,GAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,kBAAkB;AAClB,eAAe,IAAI,GAAG,CAAwB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,U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CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,IAAI,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.d.ts b/node_modules/entities/lib/esm/index.d.ts new file mode 100644 index 00000000..dd4eb11d --- /dev/null +++ b/node_modules/entities/lib/esm/index.d.ts @@ -0,0 +1,96 @@ +import { DecodingMode } from "./decode.js"; +/** The level of entities to support. */ +export declare enum EntityLevel { + /** Support only XML entities. */ + XML = 0, + /** Support HTML entities, which are a superset of XML entities. */ + HTML = 1 +} +export declare enum EncodingMode { + /** + * The output is UTF-8 encoded. Only characters that need escaping within + * XML will be escaped. + */ + UTF8 = 0, + /** + * The output consists only of ASCII characters. Characters that need + * escaping within HTML, and characters that aren't ASCII characters will + * be escaped. + */ + ASCII = 1, + /** + * Encode all characters that have an equivalent entity, as well as all + * characters that are not ASCII characters. + */ + Extensive = 2, + /** + * Encode all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + Attribute = 3, + /** + * Encode all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + Text = 4 +} +export interface DecodingOptions { + /** + * The level of entities to support. + * @default {@link EntityLevel.XML} + */ + level?: EntityLevel; + /** + * Decoding mode. If `Legacy`, will support legacy entities not terminated + * with a semicolon (`;`). + * + * Always `Strict` for XML. For HTML, set this to `true` if you are parsing + * an attribute value. + * + * The deprecated `decodeStrict` function defaults this to `Strict`. + * + * @default {@link DecodingMode.Legacy} + */ + mode?: DecodingMode | undefined; +} +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param options Decoding options. + */ +export declare function decode(data: string, options?: DecodingOptions | EntityLevel): string; +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param options Decoding options. + * @deprecated Use `decode` with the `mode` set to `Strict`. + */ +export declare function decodeStrict(data: string, options?: DecodingOptions | EntityLevel): string; +/** + * Options for `encode`. + */ +export interface EncodingOptions { + /** + * The level of entities to support. + * @default {@link EntityLevel.XML} + */ + level?: EntityLevel; + /** + * Output format. + * @default {@link EncodingMode.Extensive} + */ + mode?: EncodingMode; +} +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param options Encoding options. + */ +export declare function encode(data: string, options?: EncodingOptions | EntityLevel): string; +export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; +export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; +export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.d.ts.map b/node_modules/entities/lib/esm/index.d.ts.map new file mode 100644 index 00000000..cfeef9f3 --- /dev/null +++ b/node_modules/entities/lib/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;IACnE,IAAI,IAAI;CACX;AAED,oBAAY,YAAY;IACpB;;;OAGG;IACH,IAAI,IAAA;IACJ;;;;OAIG;IACH,KAAK,IAAA;IACL;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,SAAS,IAAA;IACT;;;OAGG;IACH,IAAI,IAAA;CACP;AAED,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CASR;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CACxB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAKR;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,eAAe,GAAG,WAA6B,GACzD,MAAM,CAkBR;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB,EAElB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.js b/node_modules/entities/lib/esm/index.js new file mode 100644 index 00000000..acc6dbe9 --- /dev/null +++ b/node_modules/entities/lib/esm/index.js @@ -0,0 +1,99 @@ +import { decodeXML, decodeHTML, DecodingMode } from "./decode.js"; +import { encodeHTML, encodeNonAsciiHTML } from "./encode.js"; +import { encodeXML, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; +/** The level of entities to support. */ +export var EntityLevel; +(function (EntityLevel) { + /** Support only XML entities. */ + EntityLevel[EntityLevel["XML"] = 0] = "XML"; + /** Support HTML entities, which are a superset of XML entities. */ + EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; +})(EntityLevel || (EntityLevel = {})); +export var EncodingMode; +(function (EncodingMode) { + /** + * The output is UTF-8 encoded. Only characters that need escaping within + * XML will be escaped. + */ + EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; + /** + * The output consists only of ASCII characters. Characters that need + * escaping within HTML, and characters that aren't ASCII characters will + * be escaped. + */ + EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; + /** + * Encode all characters that have an equivalent entity, as well as all + * characters that are not ASCII characters. + */ + EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; + /** + * Encode all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; + /** + * Encode all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + EncodingMode[EncodingMode["Text"] = 4] = "Text"; +})(EncodingMode || (EncodingMode = {})); +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param options Decoding options. + */ +export function decode(data, options = EntityLevel.XML) { + const level = typeof options === "number" ? options : options.level; + if (level === EntityLevel.HTML) { + const mode = typeof options === "object" ? options.mode : undefined; + return decodeHTML(data, mode); + } + return decodeXML(data); +} +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param options Decoding options. + * @deprecated Use `decode` with the `mode` set to `Strict`. + */ +export function decodeStrict(data, options = EntityLevel.XML) { + var _a; + const opts = typeof options === "number" ? { level: options } : options; + (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = DecodingMode.Strict); + return decode(data, opts); +} +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param options Encoding options. + */ +export function encode(data, options = EntityLevel.XML) { + const opts = typeof options === "number" ? { level: options } : options; + // Mode `UTF8` just escapes XML entities + if (opts.mode === EncodingMode.UTF8) + return escapeUTF8(data); + if (opts.mode === EncodingMode.Attribute) + return escapeAttribute(data); + if (opts.mode === EncodingMode.Text) + return escapeText(data); + if (opts.level === EntityLevel.HTML) { + if (opts.mode === EncodingMode.ASCII) { + return encodeNonAsciiHTML(data); + } + return encodeHTML(data); + } + // ASCII and Extensive are equivalent + return encodeXML(data); +} +export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; +export { encodeHTML, encodeNonAsciiHTML, +// Legacy aliases (deprecated) +encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; +export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, +// Legacy aliases (deprecated) +decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/esm/index.js.map b/node_modules/entities/lib/esm/index.js.map new file mode 100644 index 00000000..5f634fc1 --- /dev/null +++ b/node_modules/entities/lib/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EACH,SAAS,EACT,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,wCAAwC;AACxC,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAED,MAAM,CAAN,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,KAAZ,YAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAClB,IAAY,EACZ,UAA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KAAK,YAAY,CAAC,IAAI;QAAE,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;IAE7D,IAAI,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QACjC,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,KAAK,EAAE;YAClC,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC;SACnC;QAED,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;KAC3B;IAED,qCAAqC;IACrC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AAED,OAAO,EACH,SAAS,EACT,MAAM,EACN,UAAU,EACV,eAAe,EACf,UAAU,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,UAAU,EACV,kBAAkB;AAClB,8BAA8B;AAC9B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EACH,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,mBAAmB;AACnB,8BAA8B;AAC9B,UAAU,IAAI,WAAW,EACzB,UAAU,IAAI,WAAW,EACzB,gBAAgB,IAAI,iBAAiB,EACrC,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/esm/package.json b/node_modules/entities/lib/esm/package.json new file mode 100644 index 00000000..089153bc --- /dev/null +++ b/node_modules/entities/lib/esm/package.json @@ -0,0 +1 @@ +{"type":"module"} diff --git a/node_modules/entities/lib/generated/decode-data-html.d.ts b/node_modules/entities/lib/generated/decode-data-html.d.ts new file mode 100644 index 00000000..9cfc4f42 --- /dev/null +++ b/node_modules/entities/lib/generated/decode-data-html.d.ts @@ -0,0 +1,3 @@ +declare const _default: Uint16Array; +export default _default; +//# sourceMappingURL=decode-data-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.d.ts.map b/node_modules/entities/lib/generated/decode-data-html.d.ts.map new file mode 100644 index 00000000..6d4d64b8 --- /dev/null +++ b/node_modules/entities/lib/generated/decode-data-html.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.js b/node_modules/entities/lib/generated/decode-data-html.js new file mode 100644 index 00000000..295cd9b4 --- /dev/null +++ b/node_modules/entities/lib/generated/decode-data-html.js @@ -0,0 +1,9 @@ +"use strict"; +// Generated using scripts/write-decode-map.ts +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = new Uint16Array( +// prettier-ignore +"\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b\"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c" + .split("") + .map(function (c) { return c.charCodeAt(0); })); +//# sourceMappingURL=decode-data-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-html.js.map b/node_modules/entities/lib/generated/decode-data-html.js.map new file mode 100644 index 00000000..5732f6f0 --- /dev/null +++ b/node_modules/entities/lib/generated/decode-data-html.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.d.ts b/node_modules/entities/lib/generated/decode-data-xml.d.ts new file mode 100644 index 00000000..4a3f5337 --- /dev/null +++ b/node_modules/entities/lib/generated/decode-data-xml.d.ts @@ -0,0 +1,3 @@ +declare const _default: Uint16Array; +export default _default; +//# sourceMappingURL=decode-data-xml.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.d.ts.map b/node_modules/entities/lib/generated/decode-data-xml.d.ts.map new file mode 100644 index 00000000..be2a9a2e --- /dev/null +++ b/node_modules/entities/lib/generated/decode-data-xml.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-xml.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAEA,wBAKE"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.js b/node_modules/entities/lib/generated/decode-data-xml.js new file mode 100644 index 00000000..8fee7832 --- /dev/null +++ b/node_modules/entities/lib/generated/decode-data-xml.js @@ -0,0 +1,9 @@ +"use strict"; +// Generated using scripts/write-decode-map.ts +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = new Uint16Array( +// prettier-ignore +"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022" + .split("") + .map(function (c) { return c.charCodeAt(0); })); +//# sourceMappingURL=decode-data-xml.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/decode-data-xml.js.map b/node_modules/entities/lib/generated/decode-data-xml.js.map new file mode 100644 index 00000000..569fef45 --- /dev/null +++ b/node_modules/entities/lib/generated/decode-data-xml.js.map @@ -0,0 +1 @@ +{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAE9C,kBAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CACnC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.d.ts b/node_modules/entities/lib/generated/encode-html.d.ts new file mode 100644 index 00000000..07048276 --- /dev/null +++ b/node_modules/entities/lib/generated/encode-html.d.ts @@ -0,0 +1,8 @@ +type EncodeTrieNode = string | { + v?: string; + n: number | Map<number, EncodeTrieNode>; + o?: string; +}; +declare const _default: Map<number, EncodeTrieNode>; +export default _default; +//# sourceMappingURL=encode-html.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.d.ts.map b/node_modules/entities/lib/generated/encode-html.d.ts.map new file mode 100644 index 00000000..e665a6e6 --- /dev/null +++ b/node_modules/entities/lib/generated/encode-html.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"encode-html.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GACb,MAAM,GACN;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;AAY1E,wBAAo+tB"} \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.js b/node_modules/entities/lib/generated/encode-html.js new file mode 100644 index 00000000..071e8530 --- /dev/null +++ b/node_modules/entities/lib/generated/encode-html.js @@ -0,0 +1,12 @@ +"use strict"; +// Generated using scripts/write-encode-map.ts +Object.defineProperty(exports, "__esModule", { value: true }); +function restoreDiff(arr) { + for (var i = 1; i < arr.length; i++) { + arr[i][0] += arr[i - 1][0] + 1; + } + return arr; +} +// prettier-ignore +exports.default = new Map(/* #__PURE__ */ restoreDiff([[9, " "], [0, " "], [22, "!"], [0, """], [0, "#"], [0, "$"], [0, "%"], [0, "&"], [0, "'"], [0, "("], [0, ")"], [0, "*"], [0, "+"], [0, ","], [1, "."], [0, "/"], [10, ":"], [0, ";"], [0, { v: "<", n: 8402, o: "<⃒" }], [0, { v: "=", n: 8421, o: "=⃥" }], [0, { v: ">", n: 8402, o: ">⃒" }], [0, "?"], [0, "@"], [26, "["], [0, "\"], [0, "]"], [0, "^"], [0, "_"], [0, "`"], [5, { n: 106, o: "fj" }], [20, "{"], [0, "|"], [0, "}"], [34, " "], [0, "¡"], [0, "¢"], [0, "£"], [0, "¤"], [0, "¥"], [0, "¦"], [0, "§"], [0, "¨"], [0, "©"], [0, "ª"], [0, "«"], [0, "¬"], [0, "­"], [0, "®"], [0, "¯"], [0, "°"], [0, "±"], [0, "²"], [0, "³"], [0, "´"], [0, "µ"], [0, "¶"], [0, "·"], [0, "¸"], [0, "¹"], [0, "º"], [0, "»"], [0, "¼"], [0, "½"], [0, "¾"], [0, "¿"], [0, "À"], [0, "Á"], [0, "Â"], [0, "Ã"], [0, "Ä"], [0, "Å"], [0, "Æ"], [0, "Ç"], [0, "È"], [0, "É"], [0, "Ê"], [0, "Ë"], [0, "Ì"], [0, "Í"], [0, "Î"], [0, "Ï"], [0, "Ð"], [0, "Ñ"], [0, "Ò"], [0, "Ó"], [0, "Ô"], [0, "Õ"], [0, "Ö"], [0, "×"], [0, "Ø"], [0, "Ù"], [0, "Ú"], [0, "Û"], [0, "Ü"], [0, "Ý"], [0, "Þ"], [0, "ß"], [0, "à"], [0, "á"], [0, "â"], [0, "ã"], [0, "ä"], [0, "å"], [0, "æ"], [0, "ç"], [0, "è"], [0, "é"], [0, "ê"], [0, "ë"], [0, "ì"], [0, "í"], [0, "î"], [0, "ï"], [0, "ð"], [0, "ñ"], [0, "ò"], [0, "ó"], [0, "ô"], [0, "õ"], [0, "ö"], [0, "÷"], [0, "ø"], [0, "ù"], [0, "ú"], [0, "û"], [0, "ü"], [0, "ý"], [0, "þ"], [0, "ÿ"], [0, "Ā"], [0, "ā"], [0, "Ă"], [0, "ă"], [0, "Ą"], [0, "ą"], [0, "Ć"], [0, "ć"], [0, "Ĉ"], [0, "ĉ"], [0, "Ċ"], [0, "ċ"], [0, "Č"], [0, "č"], [0, "Ď"], [0, "ď"], [0, "Đ"], [0, "đ"], [0, "Ē"], [0, "ē"], [2, "Ė"], [0, "ė"], [0, "Ę"], [0, "ę"], [0, "Ě"], [0, "ě"], [0, "Ĝ"], [0, "ĝ"], [0, "Ğ"], [0, "ğ"], [0, "Ġ"], [0, "ġ"], [0, "Ģ"], [1, "Ĥ"], [0, "ĥ"], [0, "Ħ"], [0, "ħ"], [0, "Ĩ"], [0, "ĩ"], [0, "Ī"], [0, "ī"], [2, "Į"], [0, "į"], [0, "İ"], [0, "ı"], [0, "IJ"], [0, "ij"], [0, "Ĵ"], [0, "ĵ"], [0, "Ķ"], [0, "ķ"], [0, "ĸ"], [0, "Ĺ"], [0, "ĺ"], [0, "Ļ"], [0, "ļ"], [0, "Ľ"], [0, "ľ"], [0, "Ŀ"], [0, "ŀ"], [0, "Ł"], [0, "ł"], [0, "Ń"], [0, "ń"], [0, "Ņ"], [0, "ņ"], [0, "Ň"], [0, "ň"], [0, "ʼn"], [0, "Ŋ"], [0, "ŋ"], [0, "Ō"], [0, "ō"], [2, "Ő"], [0, "ő"], [0, "Œ"], [0, "œ"], [0, "Ŕ"], [0, "ŕ"], [0, "Ŗ"], [0, "ŗ"], [0, "Ř"], [0, "ř"], [0, "Ś"], [0, "ś"], [0, "Ŝ"], [0, "ŝ"], [0, "Ş"], [0, "ş"], [0, "Š"], [0, "š"], [0, "Ţ"], [0, "ţ"], [0, "Ť"], [0, "ť"], [0, "Ŧ"], [0, "ŧ"], [0, "Ũ"], [0, "ũ"], [0, "Ū"], [0, "ū"], [0, "Ŭ"], [0, "ŭ"], [0, "Ů"], [0, "ů"], [0, "Ű"], [0, "ű"], [0, "Ų"], [0, "ų"], [0, "Ŵ"], [0, "ŵ"], [0, "Ŷ"], [0, "ŷ"], [0, "Ÿ"], [0, "Ź"], [0, "ź"], [0, "Ż"], [0, "ż"], [0, "Ž"], [0, "ž"], [19, "ƒ"], [34, "Ƶ"], [63, "ǵ"], [65, "ȷ"], [142, "ˆ"], [0, "ˇ"], [16, "˘"], [0, "˙"], [0, "˚"], [0, "˛"], [0, "˜"], [0, "˝"], [51, "̑"], [127, "Α"], [0, "Β"], [0, "Γ"], [0, "Δ"], [0, "Ε"], [0, "Ζ"], [0, "Η"], [0, "Θ"], [0, "Ι"], [0, "Κ"], [0, "Λ"], [0, "Μ"], [0, "Ν"], [0, "Ξ"], [0, "Ο"], [0, "Π"], [0, "Ρ"], [1, "Σ"], [0, "Τ"], [0, "Υ"], [0, "Φ"], [0, "Χ"], [0, "Ψ"], [0, "Ω"], [7, "α"], [0, "β"], [0, "γ"], [0, "δ"], [0, "ε"], [0, "ζ"], [0, "η"], [0, "θ"], [0, "ι"], [0, "κ"], [0, "λ"], [0, "μ"], [0, "ν"], [0, "ξ"], [0, "ο"], [0, "π"], [0, "ρ"], [0, "ς"], [0, "σ"], [0, "τ"], [0, "υ"], [0, "φ"], [0, "χ"], [0, "ψ"], [0, "ω"], [7, "ϑ"], [0, "ϒ"], [2, "ϕ"], [0, "ϖ"], [5, "Ϝ"], [0, "ϝ"], [18, "ϰ"], [0, "ϱ"], [3, "ϵ"], [0, "϶"], [10, "Ё"], [0, "Ђ"], [0, "Ѓ"], [0, "Є"], [0, "Ѕ"], [0, "І"], [0, "Ї"], [0, "Ј"], [0, "Љ"], [0, "Њ"], [0, "Ћ"], [0, "Ќ"], [1, "Ў"], [0, "Џ"], [0, "А"], [0, "Б"], [0, "В"], [0, "Г"], [0, "Д"], [0, "Е"], [0, "Ж"], [0, "З"], [0, "И"], [0, "Й"], [0, "К"], [0, "Л"], [0, "М"], [0, "Н"], [0, "О"], [0, "П"], [0, "Р"], [0, "С"], [0, "Т"], [0, "У"], [0, "Ф"], [0, "Х"], [0, "Ц"], [0, "Ч"], [0, "Ш"], [0, "Щ"], [0, "Ъ"], [0, "Ы"], [0, "Ь"], [0, "Э"], [0, "Ю"], [0, "Я"], [0, "а"], [0, "б"], [0, "в"], [0, "г"], [0, "д"], [0, "е"], [0, "ж"], [0, "з"], [0, "и"], [0, "й"], [0, "к"], [0, "л"], [0, "м"], [0, "н"], [0, "о"], [0, "п"], [0, "р"], [0, "с"], [0, "т"], [0, "у"], [0, "ф"], [0, "х"], [0, "ц"], [0, "ч"], [0, "ш"], [0, "щ"], [0, "ъ"], [0, "ы"], [0, "ь"], [0, "э"], [0, "ю"], [0, "я"], [1, "ё"], [0, "ђ"], [0, "ѓ"], [0, "є"], [0, "ѕ"], [0, "і"], [0, "ї"], [0, "ј"], [0, "љ"], [0, "њ"], [0, "ћ"], [0, "ќ"], [1, "ў"], [0, "џ"], [7074, " "], [0, " "], [0, " "], [0, " "], [1, " "], [0, " "], [0, " "], [0, " "], [0, "​"], [0, "‌"], [0, "‍"], [0, "‎"], [0, "‏"], [0, "‐"], [2, "–"], [0, "—"], [0, "―"], [0, "‖"], [1, "‘"], [0, "’"], [0, "‚"], [1, "“"], [0, "”"], [0, "„"], [1, "†"], [0, "‡"], [0, "•"], [2, "‥"], [0, "…"], [9, "‰"], [0, "‱"], [0, "′"], [0, "″"], [0, "‴"], [0, "‵"], [3, "‹"], [0, "›"], [3, "‾"], [2, "⁁"], [1, "⁃"], [0, "⁄"], [10, "⁏"], [7, "⁗"], [7, { v: " ", n: 8202, o: "  " }], [0, "⁠"], [0, "⁡"], [0, "⁢"], [0, "⁣"], [72, "€"], [46, "⃛"], [0, "⃜"], [37, "ℂ"], [2, "℅"], [4, "ℊ"], [0, "ℋ"], [0, "ℌ"], [0, "ℍ"], [0, "ℎ"], [0, "ℏ"], [0, "ℐ"], [0, "ℑ"], [0, "ℒ"], [0, "ℓ"], [1, "ℕ"], [0, "№"], [0, "℗"], [0, "℘"], [0, "ℙ"], [0, "ℚ"], [0, "ℛ"], [0, "ℜ"], [0, "ℝ"], [0, "℞"], [3, "™"], [1, "ℤ"], [2, "℧"], [0, "ℨ"], [0, "℩"], [2, "ℬ"], [0, "ℭ"], [1, "ℯ"], [0, "ℰ"], [0, "ℱ"], [1, "ℳ"], [0, "ℴ"], [0, "ℵ"], [0, "ℶ"], [0, "ℷ"], [0, "ℸ"], [12, "ⅅ"], [0, "ⅆ"], [0, "ⅇ"], [0, "ⅈ"], [10, "⅓"], [0, "⅔"], [0, "⅕"], [0, "⅖"], [0, "⅗"], [0, "⅘"], [0, "⅙"], [0, "⅚"], [0, "⅛"], [0, "⅜"], [0, "⅝"], [0, "⅞"], [49, "←"], [0, "↑"], [0, "→"], [0, "↓"], [0, "↔"], [0, "↕"], [0, "↖"], [0, "↗"], [0, "↘"], [0, "↙"], [0, "↚"], [0, "↛"], [1, { v: "↝", n: 824, o: "↝̸" }], [0, "↞"], [0, "↟"], [0, "↠"], [0, "↡"], [0, "↢"], [0, "↣"], [0, "↤"], [0, "↥"], [0, "↦"], [0, "↧"], [1, "↩"], [0, "↪"], [0, "↫"], [0, "↬"], [0, "↭"], [0, "↮"], [1, "↰"], [0, "↱"], [0, "↲"], [0, "↳"], [1, "↵"], [0, "↶"], [0, "↷"], [2, "↺"], [0, "↻"], [0, "↼"], [0, "↽"], [0, "↾"], [0, "↿"], [0, "⇀"], [0, "⇁"], [0, "⇂"], [0, "⇃"], [0, "⇄"], [0, "⇅"], [0, "⇆"], [0, "⇇"], [0, "⇈"], [0, "⇉"], [0, "⇊"], [0, "⇋"], [0, "⇌"], [0, "⇍"], [0, "⇎"], [0, "⇏"], [0, "⇐"], [0, "⇑"], [0, "⇒"], [0, "⇓"], [0, "⇔"], [0, "⇕"], [0, "⇖"], [0, "⇗"], [0, "⇘"], [0, "⇙"], [0, "⇚"], [0, "⇛"], [1, "⇝"], [6, "⇤"], [0, "⇥"], [15, "⇵"], [7, "⇽"], [0, "⇾"], [0, "⇿"], [0, "∀"], [0, "∁"], [0, { v: "∂", n: 824, o: "∂̸" }], [0, "∃"], [0, "∄"], [0, "∅"], [1, "∇"], [0, "∈"], [0, "∉"], [1, "∋"], [0, "∌"], [2, "∏"], [0, "∐"], [0, "∑"], [0, "−"], [0, "∓"], [0, "∔"], [1, "∖"], [0, "∗"], [0, "∘"], [1, "√"], [2, "∝"], [0, "∞"], [0, "∟"], [0, { v: "∠", n: 8402, o: "∠⃒" }], [0, "∡"], [0, "∢"], [0, "∣"], [0, "∤"], [0, "∥"], [0, "∦"], [0, "∧"], [0, "∨"], [0, { v: "∩", n: 65024, o: "∩︀" }], [0, { v: "∪", n: 65024, o: "∪︀" }], [0, "∫"], [0, "∬"], [0, "∭"], [0, "∮"], [0, "∯"], [0, "∰"], [0, "∱"], [0, "∲"], [0, "∳"], [0, "∴"], [0, "∵"], [0, "∶"], [0, "∷"], [0, "∸"], [1, "∺"], [0, "∻"], [0, { v: "∼", n: 8402, o: "∼⃒" }], [0, { v: "∽", n: 817, o: "∽̱" }], [0, { v: "∾", n: 819, o: "∾̳" }], [0, "∿"], [0, "≀"], [0, "≁"], [0, { v: "≂", n: 824, o: "≂̸" }], [0, "≃"], [0, "≄"], [0, "≅"], [0, "≆"], [0, "≇"], [0, "≈"], [0, "≉"], [0, "≊"], [0, { v: "≋", n: 824, o: "≋̸" }], [0, "≌"], [0, { v: "≍", n: 8402, o: "≍⃒" }], [0, { v: "≎", n: 824, o: "≎̸" }], [0, { v: "≏", n: 824, o: "≏̸" }], [0, { v: "≐", n: 824, o: "≐̸" }], [0, "≑"], [0, "≒"], [0, "≓"], [0, "≔"], [0, "≕"], [0, "≖"], [0, "≗"], [1, "≙"], [0, "≚"], [1, "≜"], [2, "≟"], [0, "≠"], [0, { v: "≡", n: 8421, o: "≡⃥" }], [0, "≢"], [1, { v: "≤", n: 8402, o: "≤⃒" }], [0, { v: "≥", n: 8402, o: "≥⃒" }], [0, { v: "≦", n: 824, o: "≦̸" }], [0, { v: "≧", n: 824, o: "≧̸" }], [0, { v: "≨", n: 65024, o: "≨︀" }], [0, { v: "≩", n: 65024, o: "≩︀" }], [0, { v: "≪", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≪̸"], [7577, "≪⃒"]])) }], [0, { v: "≫", n: new Map(/* #__PURE__ */ restoreDiff([[824, "≫̸"], [7577, "≫⃒"]])) }], [0, "≬"], [0, "≭"], [0, "≮"], [0, "≯"], [0, "≰"], [0, "≱"], [0, "≲"], [0, "≳"], [0, "≴"], [0, "≵"], [0, "≶"], [0, "≷"], [0, "≸"], [0, "≹"], [0, "≺"], [0, "≻"], [0, "≼"], [0, "≽"], [0, "≾"], [0, { v: "≿", n: 824, o: "≿̸" }], [0, "⊀"], [0, "⊁"], [0, { v: "⊂", n: 8402, o: "⊂⃒" }], [0, { v: "⊃", n: 8402, o: "⊃⃒" }], [0, "⊄"], [0, "⊅"], [0, "⊆"], [0, "⊇"], [0, "⊈"], [0, "⊉"], [0, { v: "⊊", n: 65024, o: "⊊︀" }], [0, { v: "⊋", n: 65024, o: "⊋︀" }], [1, "⊍"], [0, "⊎"], [0, { v: "⊏", n: 824, o: "⊏̸" }], [0, { v: "⊐", n: 824, o: "⊐̸" }], [0, "⊑"], [0, "⊒"], [0, { v: "⊓", n: 65024, o: "⊓︀" }], [0, { v: "⊔", n: 65024, o: "⊔︀" }], [0, "⊕"], [0, "⊖"], [0, "⊗"], [0, "⊘"], [0, "⊙"], [0, "⊚"], [0, "⊛"], [1, "⊝"], [0, "⊞"], [0, "⊟"], [0, "⊠"], [0, "⊡"], [0, "⊢"], [0, "⊣"], [0, "⊤"], [0, "⊥"], [1, "⊧"], [0, "⊨"], [0, "⊩"], [0, "⊪"], [0, "⊫"], [0, "⊬"], [0, "⊭"], [0, "⊮"], [0, "⊯"], [0, "⊰"], [1, "⊲"], [0, "⊳"], [0, { v: "⊴", n: 8402, o: "⊴⃒" }], [0, { v: "⊵", n: 8402, o: "⊵⃒" }], [0, "⊶"], [0, "⊷"], [0, "⊸"], [0, "⊹"], [0, "⊺"], [0, "⊻"], [1, "⊽"], [0, "⊾"], [0, "⊿"], [0, "⋀"], [0, "⋁"], [0, "⋂"], [0, "⋃"], [0, "⋄"], [0, "⋅"], [0, "⋆"], [0, "⋇"], [0, "⋈"], [0, "⋉"], [0, "⋊"], [0, "⋋"], [0, "⋌"], [0, "⋍"], [0, "⋎"], [0, "⋏"], [0, "⋐"], [0, "⋑"], [0, "⋒"], [0, "⋓"], [0, "⋔"], [0, "⋕"], [0, "⋖"], [0, "⋗"], [0, { v: "⋘", n: 824, o: "⋘̸" }], [0, { v: "⋙", n: 824, o: "⋙̸" }], [0, { v: "⋚", n: 65024, o: "⋚︀" }], [0, { v: "⋛", n: 65024, o: "⋛︀" }], [2, "⋞"], [0, "⋟"], [0, "⋠"], [0, "⋡"], [0, "⋢"], [0, "⋣"], [2, "⋦"], [0, "⋧"], [0, "⋨"], [0, "⋩"], [0, "⋪"], [0, "⋫"], [0, "⋬"], [0, "⋭"], [0, "⋮"], [0, "⋯"], [0, "⋰"], [0, "⋱"], [0, "⋲"], [0, "⋳"], [0, "⋴"], [0, { v: "⋵", n: 824, o: "⋵̸" }], [0, "⋶"], [0, "⋷"], [1, { v: "⋹", n: 824, o: "⋹̸" }], [0, "⋺"], [0, "⋻"], [0, "⋼"], [0, "⋽"], [0, "⋾"], [6, "⌅"], [0, "⌆"], [1, "⌈"], [0, "⌉"], [0, "⌊"], [0, "⌋"], [0, "⌌"], [0, "⌍"], [0, "⌎"], [0, "⌏"], [0, "⌐"], [1, "⌒"], [0, "⌓"], [1, "⌕"], [0, "⌖"], [5, "⌜"], [0, "⌝"], [0, "⌞"], [0, "⌟"], [2, "⌢"], [0, "⌣"], [9, "⌭"], [0, "⌮"], [7, "⌶"], [6, "⌽"], [1, "⌿"], [60, "⍼"], [51, "⎰"], [0, "⎱"], [2, "⎴"], [0, "⎵"], [0, "⎶"], [37, "⏜"], [0, "⏝"], [0, "⏞"], [0, "⏟"], [2, "⏢"], [4, "⏧"], [59, "␣"], [164, "Ⓢ"], [55, "─"], [1, "│"], [9, "┌"], [3, "┐"], [3, "└"], [3, "┘"], [3, "├"], [7, "┤"], [7, "┬"], [7, "┴"], [7, "┼"], [19, "═"], [0, "║"], [0, "╒"], [0, "╓"], [0, "╔"], [0, "╕"], [0, "╖"], [0, "╗"], [0, "╘"], [0, "╙"], [0, "╚"], [0, "╛"], [0, "╜"], [0, "╝"], [0, "╞"], [0, "╟"], [0, "╠"], [0, "╡"], [0, "╢"], [0, "╣"], [0, "╤"], [0, "╥"], [0, "╦"], [0, "╧"], [0, "╨"], [0, "╩"], [0, "╪"], [0, "╫"], [0, "╬"], [19, "▀"], [3, "▄"], [3, "█"], [8, "░"], [0, "▒"], [0, "▓"], [13, "□"], [8, "▪"], [0, "▫"], [1, "▭"], [0, "▮"], [2, "▱"], [1, "△"], [0, "▴"], [0, "▵"], [2, "▸"], [0, "▹"], [3, "▽"], [0, "▾"], [0, "▿"], [2, "◂"], [0, "◃"], [6, "◊"], [0, "○"], [32, "◬"], [2, "◯"], [8, "◸"], [0, "◹"], [0, "◺"], [0, "◻"], [0, "◼"], [8, "★"], [0, "☆"], [7, "☎"], [49, "♀"], [1, "♂"], [29, "♠"], [2, "♣"], [1, "♥"], [0, "♦"], [3, "♪"], [2, "♭"], [0, "♮"], [0, "♯"], [163, "✓"], [3, "✗"], [8, "✠"], [21, "✶"], [33, "❘"], [25, "❲"], [0, "❳"], [84, "⟈"], [0, "⟉"], [28, "⟦"], [0, "⟧"], [0, "⟨"], [0, "⟩"], [0, "⟪"], [0, "⟫"], [0, "⟬"], [0, "⟭"], [7, "⟵"], [0, "⟶"], [0, "⟷"], [0, "⟸"], [0, "⟹"], [0, "⟺"], [1, "⟼"], [2, "⟿"], [258, "⤂"], [0, "⤃"], [0, "⤄"], [0, "⤅"], [6, "⤌"], [0, "⤍"], [0, "⤎"], [0, "⤏"], [0, "⤐"], [0, "⤑"], [0, "⤒"], [0, "⤓"], [2, "⤖"], [2, "⤙"], [0, "⤚"], [0, "⤛"], [0, "⤜"], [0, "⤝"], [0, "⤞"], [0, "⤟"], [0, "⤠"], [2, "⤣"], [0, "⤤"], [0, "⤥"], [0, "⤦"], [0, "⤧"], [0, "⤨"], [0, "⤩"], [0, "⤪"], [8, { v: "⤳", n: 824, o: "⤳̸" }], [1, "⤵"], [0, "⤶"], [0, "⤷"], [0, "⤸"], [0, "⤹"], [2, "⤼"], [0, "⤽"], [7, "⥅"], [2, "⥈"], [0, "⥉"], [0, "⥊"], [0, "⥋"], [2, "⥎"], [0, "⥏"], [0, "⥐"], [0, "⥑"], [0, "⥒"], [0, "⥓"], [0, "⥔"], [0, "⥕"], [0, "⥖"], [0, "⥗"], [0, "⥘"], [0, "⥙"], [0, "⥚"], [0, "⥛"], [0, "⥜"], [0, "⥝"], [0, "⥞"], [0, "⥟"], [0, "⥠"], [0, "⥡"], [0, "⥢"], [0, "⥣"], [0, "⥤"], [0, "⥥"], [0, "⥦"], [0, "⥧"], [0, "⥨"], [0, "⥩"], [0, "⥪"], [0, "⥫"], [0, "⥬"], [0, "⥭"], [0, "⥮"], [0, "⥯"], [0, "⥰"], [0, "⥱"], [0, "⥲"], [0, "⥳"], [0, "⥴"], [0, "⥵"], [0, "⥶"], [1, "⥸"], [0, "⥹"], [1, "⥻"], [0, "⥼"], [0, "⥽"], [0, "⥾"], [0, "⥿"], [5, "⦅"], [0, "⦆"], [4, "⦋"], [0, "⦌"], [0, "⦍"], [0, "⦎"], [0, "⦏"], [0, "⦐"], [0, "⦑"], [0, "⦒"], [0, "⦓"], [0, "⦔"], [0, "⦕"], [0, "⦖"], [3, "⦚"], [1, "⦜"], [0, "⦝"], [6, "⦤"], [0, "⦥"], [0, "⦦"], [0, "⦧"], [0, "⦨"], [0, "⦩"], [0, "⦪"], [0, "⦫"], [0, "⦬"], [0, "⦭"], [0, "⦮"], [0, "⦯"], [0, "⦰"], [0, "⦱"], [0, "⦲"], [0, "⦳"], [0, "⦴"], [0, "⦵"], [0, "⦶"], [0, "⦷"], [1, "⦹"], [1, "⦻"], [0, "⦼"], [1, "⦾"], [0, "⦿"], [0, "⧀"], [0, "⧁"], [0, "⧂"], [0, "⧃"], [0, "⧄"], [0, "⧅"], [3, "⧉"], [3, "⧍"], [0, "⧎"], [0, { v: "⧏", n: 824, o: "⧏̸" }], [0, { v: "⧐", n: 824, o: "⧐̸" }], [11, "⧜"], [0, "⧝"], [0, "⧞"], [4, "⧣"], [0, "⧤"], [0, "⧥"], [5, "⧫"], [8, "⧴"], [1, "⧶"], [9, "⨀"], [0, "⨁"], [0, "⨂"], [1, "⨄"], [1, "⨆"], [5, "⨌"], [0, "⨍"], [2, "⨐"], [0, "⨑"], [0, "⨒"], [0, "⨓"], [0, "⨔"], [0, "⨕"], [0, "⨖"], [0, "⨗"], [10, "⨢"], [0, "⨣"], [0, "⨤"], [0, "⨥"], [0, "⨦"], [0, "⨧"], [1, "⨩"], [0, "⨪"], [2, "⨭"], [0, "⨮"], [0, "⨯"], [0, "⨰"], [0, "⨱"], [1, "⨳"], [0, "⨴"], [0, "⨵"], [0, "⨶"], [0, "⨷"], [0, "⨸"], [0, "⨹"], [0, "⨺"], [0, "⨻"], [0, "⨼"], [2, "⨿"], [0, "⩀"], [1, "⩂"], [0, "⩃"], [0, "⩄"], [0, "⩅"], [0, "⩆"], [0, "⩇"], [0, "⩈"], [0, "⩉"], [0, "⩊"], [0, "⩋"], [0, "⩌"], [0, "⩍"], [2, "⩐"], [2, "⩓"], [0, "⩔"], [0, "⩕"], [0, "⩖"], [0, "⩗"], [0, "⩘"], [1, "⩚"], [0, "⩛"], [0, "⩜"], [0, "⩝"], [1, "⩟"], [6, "⩦"], [3, "⩪"], [2, { v: "⩭", n: 824, o: "⩭̸" }], [0, "⩮"], [0, "⩯"], [0, { v: "⩰", n: 824, o: "⩰̸" }], [0, "⩱"], [0, "⩲"], [0, "⩳"], [0, "⩴"], [0, "⩵"], [1, "⩷"], [0, "⩸"], [0, "⩹"], [0, "⩺"], [0, "⩻"], [0, "⩼"], [0, { v: "⩽", n: 824, o: "⩽̸" }], [0, { v: "⩾", n: 824, o: "⩾̸" }], [0, "⩿"], [0, "⪀"], [0, "⪁"], [0, "⪂"], [0, "⪃"], [0, "⪄"], [0, "⪅"], [0, "⪆"], [0, "⪇"], [0, "⪈"], [0, "⪉"], [0, "⪊"], [0, "⪋"], [0, "⪌"], [0, "⪍"], [0, "⪎"], [0, "⪏"], [0, "⪐"], [0, "⪑"], [0, "⪒"], [0, "⪓"], [0, "⪔"], [0, "⪕"], [0, "⪖"], [0, "⪗"], [0, "⪘"], [0, "⪙"], [0, "⪚"], [2, "⪝"], [0, "⪞"], [0, "⪟"], [0, "⪠"], [0, { v: "⪡", n: 824, o: "⪡̸" }], [0, { v: "⪢", n: 824, o: "⪢̸" }], [1, "⪤"], [0, "⪥"], [0, "⪦"], [0, "⪧"], [0, "⪨"], [0, "⪩"], [0, "⪪"], [0, "⪫"], [0, { v: "⪬", n: 65024, o: "⪬︀" }], [0, { v: "⪭", n: 65024, o: "⪭︀" }], [0, "⪮"], [0, { v: "⪯", n: 824, o: "⪯̸" }], [0, { v: "⪰", n: 824, o: "⪰̸" }], [2, "⪳"], [0, "⪴"], [0, "⪵"], [0, "⪶"], [0, "⪷"], [0, "⪸"], [0, "⪹"], [0, "⪺"], [0, "⪻"], [0, "⪼"], [0, "⪽"], [0, "⪾"], [0, "⪿"], [0, "⫀"], [0, "⫁"], [0, "⫂"], [0, "⫃"], [0, "⫄"], [0, { v: "⫅", n: 824, o: "⫅̸" }], [0, { v: "⫆", n: 824, o: "⫆̸" }], [0, "⫇"], [0, "⫈"], [2, { v: "⫋", n: 65024, o: "⫋︀" }], [0, { v: "⫌", n: 65024, o: "⫌︀" }], [2, "⫏"], [0, "⫐"], [0, "⫑"], [0, "⫒"], [0, "⫓"], [0, "⫔"], [0, "⫕"], [0, "⫖"], [0, "⫗"], [0, "⫘"], [0, "⫙"], [0, "⫚"], [0, "⫛"], [8, "⫤"], [1, "⫦"], [0, "⫧"], [0, "⫨"], [0, "⫩"], [1, "⫫"], [0, "⫬"], [0, "⫭"], [0, "⫮"], [0, "⫯"], [0, "⫰"], [0, "⫱"], [0, "⫲"], [0, "⫳"], [9, { v: "⫽", n: 8421, o: "⫽⃥" }], [44343, { n: new Map(/* #__PURE__ */ restoreDiff([[56476, "𝒜"], [1, "𝒞"], [0, "𝒟"], [2, "𝒢"], [2, "𝒥"], [0, "𝒦"], [2, "𝒩"], [0, "𝒪"], [0, "𝒫"], [0, "𝒬"], [1, "𝒮"], [0, "𝒯"], [0, "𝒰"], [0, "𝒱"], [0, "𝒲"], [0, "𝒳"], [0, "𝒴"], [0, "𝒵"], [0, "𝒶"], [0, "𝒷"], [0, "𝒸"], [0, "𝒹"], [1, "𝒻"], [1, "𝒽"], [0, "𝒾"], [0, "𝒿"], [0, "𝓀"], [0, "𝓁"], [0, "𝓂"], [0, "𝓃"], [1, "𝓅"], [0, "𝓆"], [0, "𝓇"], [0, "𝓈"], [0, "𝓉"], [0, "𝓊"], [0, "𝓋"], [0, "𝓌"], [0, "𝓍"], [0, "𝓎"], [0, "𝓏"], [52, "𝔄"], [0, "𝔅"], [1, "𝔇"], [0, "𝔈"], [0, "𝔉"], [0, "𝔊"], [2, "𝔍"], [0, "𝔎"], [0, "𝔏"], [0, "𝔐"], [0, "𝔑"], [0, "𝔒"], [0, "𝔓"], [0, "𝔔"], [1, "𝔖"], [0, "𝔗"], [0, "𝔘"], [0, "𝔙"], [0, "𝔚"], [0, "𝔛"], [0, "𝔜"], [1, "𝔞"], [0, "𝔟"], [0, "𝔠"], [0, "𝔡"], [0, "𝔢"], [0, "𝔣"], [0, "𝔤"], [0, "𝔥"], [0, "𝔦"], [0, "𝔧"], [0, "𝔨"], [0, "𝔩"], [0, "𝔪"], [0, "𝔫"], [0, "𝔬"], [0, "𝔭"], [0, "𝔮"], [0, "𝔯"], [0, "𝔰"], [0, "𝔱"], [0, "𝔲"], [0, "𝔳"], [0, "𝔴"], [0, "𝔵"], [0, "𝔶"], [0, "𝔷"], [0, "𝔸"], [0, "𝔹"], [1, "𝔻"], [0, "𝔼"], [0, "𝔽"], [0, "𝔾"], [1, "𝕀"], [0, "𝕁"], [0, "𝕂"], [0, "𝕃"], [0, "𝕄"], [1, "𝕆"], [3, "𝕊"], [0, "𝕋"], [0, "𝕌"], [0, "𝕍"], [0, "𝕎"], [0, "𝕏"], [0, "𝕐"], [1, "𝕒"], [0, "𝕓"], [0, "𝕔"], [0, "𝕕"], [0, "𝕖"], [0, "𝕗"], [0, "𝕘"], [0, "𝕙"], [0, "𝕚"], [0, "𝕛"], [0, "𝕜"], [0, "𝕝"], [0, "𝕞"], [0, "𝕟"], [0, "𝕠"], [0, "𝕡"], [0, "𝕢"], [0, "𝕣"], [0, "𝕤"], [0, "𝕥"], [0, "𝕦"], [0, "𝕧"], [0, "𝕨"], [0, "𝕩"], [0, "𝕪"], [0, "𝕫"]])) }], [8906, "ff"], [0, "fi"], [0, "fl"], [0, "ffi"], [0, "ffl"]])); +//# sourceMappingURL=encode-html.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/generated/encode-html.js.map b/node_modules/entities/lib/generated/encode-html.js.map new file mode 100644 index 00000000..2d2d9be6 --- /dev/null +++ b/node_modules/entities/lib/generated/encode-html.js.map @@ -0,0 +1 @@ +{"version":3,"file":"encode-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/encode-html.ts"],"names":[],"mappings":";AAAA,8CAA8C;;AAM9C,SAAS,WAAW,CAChB,GAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;KAClC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,kBAAkB;AAClB,kBAAe,IAAI,GAAG,CAAwB,eAAe,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,WAAW,CAAC,EAAC,CAAC,EAAE,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,OAAO,CAAC,EAAC,CAAC,EAAE,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAC,EAAC,MAAM,EAA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,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,EAAC,CAAC,CAAC,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,CAAC,IAAI,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,SAAS,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,EAAC,CAAC,CAAC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/index.d.ts b/node_modules/entities/lib/index.d.ts new file mode 100644 index 00000000..dd4eb11d --- /dev/null +++ b/node_modules/entities/lib/index.d.ts @@ -0,0 +1,96 @@ +import { DecodingMode } from "./decode.js"; +/** The level of entities to support. */ +export declare enum EntityLevel { + /** Support only XML entities. */ + XML = 0, + /** Support HTML entities, which are a superset of XML entities. */ + HTML = 1 +} +export declare enum EncodingMode { + /** + * The output is UTF-8 encoded. Only characters that need escaping within + * XML will be escaped. + */ + UTF8 = 0, + /** + * The output consists only of ASCII characters. Characters that need + * escaping within HTML, and characters that aren't ASCII characters will + * be escaped. + */ + ASCII = 1, + /** + * Encode all characters that have an equivalent entity, as well as all + * characters that are not ASCII characters. + */ + Extensive = 2, + /** + * Encode all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + Attribute = 3, + /** + * Encode all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + Text = 4 +} +export interface DecodingOptions { + /** + * The level of entities to support. + * @default {@link EntityLevel.XML} + */ + level?: EntityLevel; + /** + * Decoding mode. If `Legacy`, will support legacy entities not terminated + * with a semicolon (`;`). + * + * Always `Strict` for XML. For HTML, set this to `true` if you are parsing + * an attribute value. + * + * The deprecated `decodeStrict` function defaults this to `Strict`. + * + * @default {@link DecodingMode.Legacy} + */ + mode?: DecodingMode | undefined; +} +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param options Decoding options. + */ +export declare function decode(data: string, options?: DecodingOptions | EntityLevel): string; +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param options Decoding options. + * @deprecated Use `decode` with the `mode` set to `Strict`. + */ +export declare function decodeStrict(data: string, options?: DecodingOptions | EntityLevel): string; +/** + * Options for `encode`. + */ +export interface EncodingOptions { + /** + * The level of entities to support. + * @default {@link EntityLevel.XML} + */ + level?: EntityLevel; + /** + * Output format. + * @default {@link EncodingMode.Extensive} + */ + mode?: EncodingMode; +} +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param options Encoding options. + */ +export declare function encode(data: string, options?: EncodingOptions | EntityLevel): string; +export { encodeXML, escape, escapeUTF8, escapeAttribute, escapeText, } from "./escape.js"; +export { encodeHTML, encodeNonAsciiHTML, encodeHTML as encodeHTML4, encodeHTML as encodeHTML5, } from "./encode.js"; +export { EntityDecoder, DecodingMode, decodeXML, decodeHTML, decodeHTMLStrict, decodeHTMLAttribute, decodeHTML as decodeHTML4, decodeHTML as decodeHTML5, decodeHTMLStrict as decodeHTML4Strict, decodeHTMLStrict as decodeHTML5Strict, decodeXML as decodeXMLStrict, } from "./decode.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/entities/lib/index.d.ts.map b/node_modules/entities/lib/index.d.ts.map new file mode 100644 index 00000000..cfeef9f3 --- /dev/null +++ b/node_modules/entities/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,aAAa,CAAC;AASlE,wCAAwC;AACxC,oBAAY,WAAW;IACnB,iCAAiC;IACjC,GAAG,IAAI;IACP,mEAAmE;I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,IAAI,eAAe,GAC/B,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/node_modules/entities/lib/index.js b/node_modules/entities/lib/index.js new file mode 100644 index 00000000..f809b1b6 --- /dev/null +++ b/node_modules/entities/lib/index.js @@ -0,0 +1,126 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLAttribute = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.DecodingMode = exports.EntityDecoder = exports.encodeHTML5 = exports.encodeHTML4 = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.escapeText = exports.escapeAttribute = exports.escapeUTF8 = exports.escape = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = exports.EncodingMode = exports.EntityLevel = void 0; +var decode_js_1 = require("./decode.js"); +var encode_js_1 = require("./encode.js"); +var escape_js_1 = require("./escape.js"); +/** The level of entities to support. */ +var EntityLevel; +(function (EntityLevel) { + /** Support only XML entities. */ + EntityLevel[EntityLevel["XML"] = 0] = "XML"; + /** Support HTML entities, which are a superset of XML entities. */ + EntityLevel[EntityLevel["HTML"] = 1] = "HTML"; +})(EntityLevel = exports.EntityLevel || (exports.EntityLevel = {})); +var EncodingMode; +(function (EncodingMode) { + /** + * The output is UTF-8 encoded. Only characters that need escaping within + * XML will be escaped. + */ + EncodingMode[EncodingMode["UTF8"] = 0] = "UTF8"; + /** + * The output consists only of ASCII characters. Characters that need + * escaping within HTML, and characters that aren't ASCII characters will + * be escaped. + */ + EncodingMode[EncodingMode["ASCII"] = 1] = "ASCII"; + /** + * Encode all characters that have an equivalent entity, as well as all + * characters that are not ASCII characters. + */ + EncodingMode[EncodingMode["Extensive"] = 2] = "Extensive"; + /** + * Encode all characters that have to be escaped in HTML attributes, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + EncodingMode[EncodingMode["Attribute"] = 3] = "Attribute"; + /** + * Encode all characters that have to be escaped in HTML text, + * following {@link https://html.spec.whatwg.org/multipage/parsing.html#escapingString}. + */ + EncodingMode[EncodingMode["Text"] = 4] = "Text"; +})(EncodingMode = exports.EncodingMode || (exports.EncodingMode = {})); +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param options Decoding options. + */ +function decode(data, options) { + if (options === void 0) { options = EntityLevel.XML; } + var level = typeof options === "number" ? options : options.level; + if (level === EntityLevel.HTML) { + var mode = typeof options === "object" ? options.mode : undefined; + return (0, decode_js_1.decodeHTML)(data, mode); + } + return (0, decode_js_1.decodeXML)(data); +} +exports.decode = decode; +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param options Decoding options. + * @deprecated Use `decode` with the `mode` set to `Strict`. + */ +function decodeStrict(data, options) { + var _a; + if (options === void 0) { options = EntityLevel.XML; } + var opts = typeof options === "number" ? { level: options } : options; + (_a = opts.mode) !== null && _a !== void 0 ? _a : (opts.mode = decode_js_1.DecodingMode.Strict); + return decode(data, opts); +} +exports.decodeStrict = decodeStrict; +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param options Encoding options. + */ +function encode(data, options) { + if (options === void 0) { options = EntityLevel.XML; } + var opts = typeof options === "number" ? { level: options } : options; + // Mode `UTF8` just escapes XML entities + if (opts.mode === EncodingMode.UTF8) + return (0, escape_js_1.escapeUTF8)(data); + if (opts.mode === EncodingMode.Attribute) + return (0, escape_js_1.escapeAttribute)(data); + if (opts.mode === EncodingMode.Text) + return (0, escape_js_1.escapeText)(data); + if (opts.level === EntityLevel.HTML) { + if (opts.mode === EncodingMode.ASCII) { + return (0, encode_js_1.encodeNonAsciiHTML)(data); + } + return (0, encode_js_1.encodeHTML)(data); + } + // ASCII and Extensive are equivalent + return (0, escape_js_1.encodeXML)(data); +} +exports.encode = encode; +var escape_js_2 = require("./escape.js"); +Object.defineProperty(exports, "encodeXML", { enumerable: true, get: function () { return escape_js_2.encodeXML; } }); +Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } }); +Object.defineProperty(exports, "escapeUTF8", { enumerable: true, get: function () { return escape_js_2.escapeUTF8; } }); +Object.defineProperty(exports, "escapeAttribute", { enumerable: true, get: function () { return escape_js_2.escapeAttribute; } }); +Object.defineProperty(exports, "escapeText", { enumerable: true, get: function () { return escape_js_2.escapeText; } }); +var encode_js_2 = require("./encode.js"); +Object.defineProperty(exports, "encodeHTML", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); +Object.defineProperty(exports, "encodeNonAsciiHTML", { enumerable: true, get: function () { return encode_js_2.encodeNonAsciiHTML; } }); +// Legacy aliases (deprecated) +Object.defineProperty(exports, "encodeHTML4", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); +Object.defineProperty(exports, "encodeHTML5", { enumerable: true, get: function () { return encode_js_2.encodeHTML; } }); +var decode_js_2 = require("./decode.js"); +Object.defineProperty(exports, "EntityDecoder", { enumerable: true, get: function () { return decode_js_2.EntityDecoder; } }); +Object.defineProperty(exports, "DecodingMode", { enumerable: true, get: function () { return decode_js_2.DecodingMode; } }); +Object.defineProperty(exports, "decodeXML", { enumerable: true, get: function () { return decode_js_2.decodeXML; } }); +Object.defineProperty(exports, "decodeHTML", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); +Object.defineProperty(exports, "decodeHTMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); +Object.defineProperty(exports, "decodeHTMLAttribute", { enumerable: true, get: function () { return decode_js_2.decodeHTMLAttribute; } }); +// Legacy aliases (deprecated) +Object.defineProperty(exports, "decodeHTML4", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); +Object.defineProperty(exports, "decodeHTML5", { enumerable: true, get: function () { return decode_js_2.decodeHTML; } }); +Object.defineProperty(exports, "decodeHTML4Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); +Object.defineProperty(exports, "decodeHTML5Strict", { enumerable: true, get: function () { return decode_js_2.decodeHTMLStrict; } }); +Object.defineProperty(exports, "decodeXMLStrict", { enumerable: true, get: function () { return decode_js_2.decodeXML; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/entities/lib/index.js.map b/node_modules/entities/lib/index.js.map new file mode 100644 index 00000000..2ef77513 --- /dev/null +++ b/node_modules/entities/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["index.ts"],"names":[],"mappings":";;;AAAA,yCAAkE;AAClE,yCAA6D;AAC7D,yCAKqB;AAErB,wCAAwC;AACxC,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,IAAY,EACZ,OAAwD;IAAxD,wBAAA,EAAA,UAAyC,WAAW,CAAC,GAAG;IAExD,IAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEpE,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE;QAC5B,IAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,OAAO,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BAAkB,EAAC,IAAI,CAAC,CAAC;SACnC;QAED,OAAO,IAAA,sBAAU,EAAC,IAAI,CAAC,CAAC;KAC3B;IAED,qCAAqC;IACrC,OAAO,IAAA,qBAAS,EAAC,IAAI,CAAC,CAAC;AAC3B,CAAC;AArBD,wBAqBC;AAED,yCAMqB;AALjB,sGAAA,SAAS,OAAA;AACT,mGAAA,MAAM,OAAA;AACN,uGAAA,UAAU,OAAA;AACV,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AAGd,yCAMqB;AALjB,uGAAA,UAAU,OAAA;AACV,+GAAA,kBAAkB,OAAA;AAClB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AAG7B,yCAaqB;AAZjB,0GAAA,aAAa,OAAA;AACb,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,uGAAA,UAAU,OAAA;AACV,6GAAA,gBAAgB,OAAA;AAChB,gHAAA,mBAAmB,OAAA;AACnB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AACzB,8GAAA,gBAAgB,OAAqB;AACrC,8GAAA,gBAAgB,OAAqB;AACrC,4GAAA,SAAS,OAAmB"} \ No newline at end of file diff --git a/node_modules/entities/package.json b/node_modules/entities/package.json new file mode 100644 index 00000000..2e857f8c --- /dev/null +++ b/node_modules/entities/package.json @@ -0,0 +1,90 @@ +{ + "name": "entities", + "version": "4.5.0", + "description": "Encode & decode XML and HTML entities with ease & speed", + "author": "Felix Boehm <me@feedic.com>", + "funding": "https://github.com/fb55/entities?sponsor=1", + "sideEffects": false, + "keywords": [ + "entity", + "decoding", + "encoding", + "html", + "xml", + "html entities" + ], + "directories": { + "lib": "lib/" + }, + "main": "lib/index.js", + "types": "lib/index.d.ts", + "module": "lib/esm/index.js", + "exports": { + ".": { + "require": "./lib/index.js", + "import": "./lib/esm/index.js" + }, + "./lib/decode.js": { + "require": "./lib/decode.js", + "import": "./lib/esm/decode.js" + }, + "./lib/escape.js": { + "require": "./lib/escape.js", + "import": "./lib/esm/escape.js" + } + }, + "files": [ + "lib/**/*" + ], + "engines": { + "node": ">=0.12" + }, + "devDependencies": { + "@types/jest": "^28.1.8", + "@types/node": "^18.15.11", + "@typescript-eslint/eslint-plugin": "^5.58.0", + "@typescript-eslint/parser": "^5.58.0", + "eslint": "^8.38.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-node": "^11.1.0", + "jest": "^28.1.3", + "prettier": "^2.8.7", + "ts-jest": "^28.0.8", + "typedoc": "^0.24.1", + "typescript": "^5.0.4" + }, + "scripts": { + "test": "npm run test:jest && npm run lint", + "test:jest": "jest", + "lint": "npm run lint:es && npm run lint:prettier", + "lint:es": "eslint .", + "lint:prettier": "npm run prettier -- --check", + "format": "npm run format:es && npm run format:prettier", + "format:es": "npm run lint:es -- --fix", + "format:prettier": "npm run prettier -- --write", + "prettier": "prettier '**/*.{ts,md,json,yml}'", + "build": "npm run build:cjs && npm run build:esm", + "build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/entities/$(git rev-parse HEAD)/src/", + "build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json", + "build:docs": "typedoc --hideGenerator src/index.ts", + "build:trie": "ts-node scripts/write-decode-map.ts", + "build:encode-trie": "ts-node scripts/write-encode-map.ts", + "prepare": "npm run build" + }, + "repository": { + "type": "git", + "url": "git://github.com/fb55/entities.git" + }, + "license": "BSD-2-Clause", + "jest": { + "preset": "ts-jest", + "coverageProvider": "v8", + "moduleNameMapper": { + "^(.*)\\.js$": "$1" + } + }, + "prettier": { + "tabWidth": 4, + "proseWrap": "always" + } +} diff --git a/node_modules/entities/readme.md b/node_modules/entities/readme.md new file mode 100644 index 00000000..731d90c6 --- /dev/null +++ b/node_modules/entities/readme.md @@ -0,0 +1,122 @@ +# entities [![NPM version](https://img.shields.io/npm/v/entities.svg)](https://npmjs.org/package/entities) [![Downloads](https://img.shields.io/npm/dm/entities.svg)](https://npmjs.org/package/entities) [![Node.js CI](https://github.com/fb55/entities/actions/workflows/nodejs-test.yml/badge.svg)](https://github.com/fb55/entities/actions/workflows/nodejs-test.yml) + +Encode & decode HTML & XML entities with ease & speed. + +## Features + +- 😇 Tried and true: `entities` is used by many popular libraries; eg. + [`htmlparser2`](https://github.com/fb55/htmlparser2), the official + [AWS SDK](https://github.com/aws/aws-sdk-js-v3) and + [`commonmark`](https://github.com/commonmark/commonmark.js) use it to + process HTML entities. +- ⚡️ Fast: `entities` is the fastest library for decoding HTML entities (as + of April 2022); see [performance](#performance). +- 🎛 Configurable: Get an output tailored for your needs. You are fine with + UTF8? That'll save you some bytes. Prefer to only have ASCII characters? We + can do that as well! + +## How to… + +### …install `entities` + + npm install entities + +### …use `entities` + +```javascript +const entities = require("entities"); + +// Encoding +entities.escapeUTF8("& ü"); // "&#38; ü" +entities.encodeXML("& ü"); // "&#38; ü" +entities.encodeHTML("& ü"); // "&#38; ü" + +// Decoding +entities.decodeXML("asdf & ÿ ü '"); // "asdf & ÿ ü '" +entities.decodeHTML("asdf & ÿ ü '"); // "asdf & ÿ ü '" +``` + +## Performance + +This is how `entities` compares to other libraries on a very basic benchmark +(see `scripts/benchmark.ts`, for 10,000,000 iterations; **lower is better**): + +| Library | Version | `decode` perf | `encode` perf | `escape` perf | +| -------------- | ------- | ------------- | ------------- | ------------- | +| entities | `3.0.1` | 1.418s | 6.786s | 2.196s | +| html-entities | `2.3.2` | 2.530s | 6.829s | 2.415s | +| he | `1.2.0` | 5.800s | 24.237s | 3.624s | +| parse-entities | `3.0.0` | 9.660s | N/A | N/A | + +--- + +## FAQ + +> What methods should I actually use to encode my documents? + +If your target supports UTF-8, the `escapeUTF8` method is going to be your best +choice. Otherwise, use either `encodeHTML` or `encodeXML` based on whether +you're dealing with an HTML or an XML document. + +You can have a look at the options for the `encode` and `decode` methods to see +everything you can configure. + +> When should I use strict decoding? + +When strict decoding, entities not terminated with a semicolon will be ignored. +This is helpful for decoding entities in legacy environments. + +> Why should I use `entities` instead of alternative modules? + +As of April 2022, `entities` is a bit faster than other modules. Still, this is +not a very differentiated space and other modules can catch up. + +**More importantly**, you might already have `entities` in your dependency graph +(as a dependency of eg. `cheerio`, or `htmlparser2`), and including it directly +might not even increase your bundle size. The same is true for other entity +libraries, so have a look through your `node_modules` directory! + +> Does `entities` support tree shaking? + +Yes! `entities` ships as both a CommonJS and a ES module. Note that for best +results, you should not use the `encode` and `decode` functions, as they wrap +around a number of other functions, all of which will remain in the bundle. +Instead, use the functions that you need directly. + +--- + +## Acknowledgements + +This library wouldn't be possible without the work of these individuals. Thanks +to + +- [@mathiasbynens](https://github.com/mathiasbynens) for his explanations + about character encodings, and his library `he`, which was one of the + inspirations for `entities` +- [@inikulin](https://github.com/inikulin) for his work on optimized tries for + decoding HTML entities for the `parse5` project +- [@mdevils](https://github.com/mdevils) for taking on the challenge of + producing a quick entity library with his `html-entities` library. + `entities` would be quite a bit slower if there wasn't any competition. + Right now `entities` is on top, but we'll see how long that lasts! + +--- + +License: BSD-2-Clause + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). Tidelift will +coordinate the fix and disclosure. + +## `entities` for enterprise + +Available as part of the Tidelift Subscription + +The maintainers of `entities` and thousands of other packages are working with +Tidelift to deliver commercial support and maintenance for the open source +dependencies you use to build your applications. Save time, reduce risk, and +improve code health, while paying the maintainers of the exact dependencies you +use. +[Learn more.](https://tidelift.com/subscription/pkg/npm-entities?utm_source=npm-entities&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/esbuild/bin/esbuild b/node_modules/esbuild/bin/esbuild index 8eaeef71..612f8b64 100644 --- a/node_modules/esbuild/bin/esbuild +++ b/node_modules/esbuild/bin/esbuild @@ -200,7 +200,7 @@ for your current platform.`); "node_modules", ".cache", "esbuild", - `pnpapi-${pkg.replace("/", "-")}-${"0.19.10"}-${path.basename(subpath)}` + `pnpapi-${pkg.replace("/", "-")}-${"0.19.11"}-${path.basename(subpath)}` ); if (!fs.existsSync(binTargetPath)) { fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); diff --git a/node_modules/esbuild/lib/main.d.ts b/node_modules/esbuild/lib/main.d.ts index 0c26c6bc..b398f845 100644 --- a/node_modules/esbuild/lib/main.d.ts +++ b/node_modules/esbuild/lib/main.d.ts @@ -661,3 +661,16 @@ export interface InitializeOptions { } export let version: string + +// Call this function to terminate esbuild's child process. The child process +// is not terminated and re-created for each API call because it's more +// efficient to keep it around when there are multiple API calls. +// +// In node this happens automatically before the parent node process exits. So +// you only need to call this if you know you will not make any more esbuild +// API calls and you want to clean up resources. +// +// Unlike node, Deno lacks the necessary APIs to clean up child processes +// automatically. You must manually call stop() in Deno when you're done +// using esbuild or Deno will continue running forever. +export declare function stop(): void; diff --git a/node_modules/esbuild/lib/main.js b/node_modules/esbuild/lib/main.js index 7f5fe8e4..df1077c9 100644 --- a/node_modules/esbuild/lib/main.js +++ b/node_modules/esbuild/lib/main.js @@ -39,6 +39,7 @@ __export(node_exports, { formatMessages: () => formatMessages, formatMessagesSync: () => formatMessagesSync, initialize: () => initialize, + stop: () => stop, transform: () => transform, transformSync: () => transformSync, version: () => version @@ -746,8 +747,8 @@ function createChannel(streamIn) { if (isFirstPacket) { isFirstPacket = false; let binaryVersion = String.fromCharCode(...bytes); - if (binaryVersion !== "0.19.10") { - throw new Error(`Cannot start service: Host version "${"0.19.10"}" does not match binary version ${quote(binaryVersion)}`); + if (binaryVersion !== "0.19.11") { + throw new Error(`Cannot start service: Host version "${"0.19.11"}" does not match binary version ${quote(binaryVersion)}`); } return; } @@ -1940,7 +1941,7 @@ for your current platform.`); "node_modules", ".cache", "esbuild", - `pnpapi-${pkg.replace("/", "-")}-${"0.19.10"}-${path.basename(subpath)}` + `pnpapi-${pkg.replace("/", "-")}-${"0.19.11"}-${path.basename(subpath)}` ); if (!fs.existsSync(binTargetPath)) { fs.mkdirSync(path.dirname(binTargetPath), { recursive: true }); @@ -1975,7 +1976,7 @@ if (process.env.ESBUILD_WORKER_THREADS !== "0") { } } var _a; -var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.19.10"; +var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.19.11"; var esbuildCommandAndArgs = () => { if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) { throw new Error( @@ -2042,7 +2043,7 @@ var fsAsync = { } } }; -var version = "0.19.10"; +var version = "0.19.11"; var build = (options) => ensureServiceIsRunning().build(options); var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions); var transform = (input, options) => ensureServiceIsRunning().transform(input, options); @@ -2131,6 +2132,12 @@ var analyzeMetafileSync = (metafile, options) => { })); return result; }; +var stop = () => { + if (stopService) + stopService(); + if (workerThreadService) + workerThreadService.stop(); +}; var initializeWasCalled = false; var initialize = (options) => { options = validateInitializeOptions(options || {}); @@ -2148,11 +2155,12 @@ var initialize = (options) => { }; var defaultWD = process.cwd(); var longLivedService; +var stopService; var ensureServiceIsRunning = () => { if (longLivedService) return longLivedService; let [command, args] = esbuildCommandAndArgs(); - let child = child_process.spawn(command, args.concat(`--service=${"0.19.10"}`, "--ping"), { + let child = child_process.spawn(command, args.concat(`--service=${"0.19.11"}`, "--ping"), { windowsHide: true, stdio: ["pipe", "pipe", "inherit"], cwd: defaultWD @@ -2175,6 +2183,14 @@ var ensureServiceIsRunning = () => { const stdout = child.stdout; stdout.on("data", readFromStdout); stdout.on("end", afterClose); + stopService = () => { + stdin.destroy(); + stdout.destroy(); + child.kill(); + initializeWasCalled = false; + longLivedService = void 0; + stopService = void 0; + }; let refCount = 0; child.unref(); if (stdin.unref) { @@ -2252,7 +2268,7 @@ var runServiceSync = (callback) => { esbuild: node_exports }); callback(service); - let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.19.10"}`), { + let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.19.11"}`), { cwd: defaultWD, windowsHide: true, input: stdin, @@ -2272,7 +2288,7 @@ var workerThreadService = null; var startWorkerThreadService = (worker_threads2) => { let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel(); let worker = new worker_threads2.Worker(__filename, { - workerData: { workerPort, defaultWD, esbuildVersion: "0.19.10" }, + workerData: { workerPort, defaultWD, esbuildVersion: "0.19.11" }, transferList: [workerPort], // From node's documentation: https://nodejs.org/api/worker_threads.html // @@ -2338,6 +2354,10 @@ error: ${text}`); }, analyzeMetafileSync(metafile, options) { return runCallSync("analyzeMetafile", [metafile, options]); + }, + stop() { + worker.terminate(); + workerThreadService = null; } }; }; @@ -2408,6 +2428,7 @@ var node_default = node_exports; formatMessages, formatMessagesSync, initialize, + stop, transform, transformSync, version diff --git a/node_modules/esbuild/package.json b/node_modules/esbuild/package.json index 43a450ef..4b6b7be4 100644 --- a/node_modules/esbuild/package.json +++ b/node_modules/esbuild/package.json @@ -1,6 +1,6 @@ { "name": "esbuild", - "version": "0.19.10", + "version": "0.19.11", "description": "An extremely fast JavaScript and CSS bundler and minifier.", "repository": "https://github.com/evanw/esbuild", "scripts": { @@ -15,29 +15,29 @@ "esbuild": "bin/esbuild" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.10", - "@esbuild/android-arm": "0.19.10", - "@esbuild/android-arm64": "0.19.10", - "@esbuild/android-x64": "0.19.10", - "@esbuild/darwin-arm64": "0.19.10", - "@esbuild/darwin-x64": "0.19.10", - "@esbuild/freebsd-arm64": "0.19.10", - "@esbuild/freebsd-x64": "0.19.10", - "@esbuild/linux-arm": "0.19.10", - "@esbuild/linux-arm64": "0.19.10", - "@esbuild/linux-ia32": "0.19.10", - "@esbuild/linux-loong64": "0.19.10", - "@esbuild/linux-mips64el": "0.19.10", - "@esbuild/linux-ppc64": "0.19.10", - "@esbuild/linux-riscv64": "0.19.10", - "@esbuild/linux-s390x": "0.19.10", - "@esbuild/linux-x64": "0.19.10", - "@esbuild/netbsd-x64": "0.19.10", - "@esbuild/openbsd-x64": "0.19.10", - "@esbuild/sunos-x64": "0.19.10", - "@esbuild/win32-arm64": "0.19.10", - "@esbuild/win32-ia32": "0.19.10", - "@esbuild/win32-x64": "0.19.10" + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" }, "license": "MIT" } diff --git a/node_modules/follow-redirects/index.js b/node_modules/follow-redirects/index.js index 057c6b1e..f58b9334 100644 --- a/node_modules/follow-redirects/index.js +++ b/node_modules/follow-redirects/index.js @@ -6,6 +6,30 @@ var Writable = require("stream").Writable; var assert = require("assert"); var debug = require("./debug"); +// Whether to use the native URL object or the legacy url module +var useNativeURL = false; +try { + assert(new URL()); +} +catch (error) { + useNativeURL = error.code === "ERR_INVALID_URL"; +} + +// URL fields to preserve in copy operations +var preservedUrlFields = [ + "auth", + "host", + "hostname", + "href", + "path", + "pathname", + "port", + "protocol", + "query", + "search", + "hash", +]; + // Create handlers that pass events from native requests var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; var eventHandlers = Object.create(null); @@ -15,19 +39,20 @@ events.forEach(function (event) { }; }); +// Error types with codes var InvalidUrlError = createErrorType( "ERR_INVALID_URL", "Invalid URL", TypeError ); -// Error types with codes var RedirectionError = createErrorType( "ERR_FR_REDIRECTION_FAILURE", "Redirected request failed" ); var TooManyRedirectsError = createErrorType( "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded" + "Maximum number of redirects exceeded", + RedirectionError ); var MaxBodyLengthExceededError = createErrorType( "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", @@ -62,7 +87,13 @@ function RedirectableRequest(options, responseCallback) { // React to responses of native requests var self = this; this._onNativeResponse = function (response) { - self._processResponse(response); + try { + self._processResponse(response); + } + catch (cause) { + self.emit("error", cause instanceof RedirectionError ? + cause : new RedirectionError({ cause: cause })); + } }; // Perform the first request @@ -280,8 +311,7 @@ RedirectableRequest.prototype._performRequest = function () { var protocol = this._options.protocol; var nativeProtocol = this._options.nativeProtocols[protocol]; if (!nativeProtocol) { - this.emit("error", new TypeError("Unsupported protocol " + protocol)); - return; + throw new TypeError("Unsupported protocol " + protocol); } // If specified, use the agent corresponding to the protocol @@ -380,8 +410,7 @@ RedirectableRequest.prototype._processResponse = function (response) { // RFC7231§6.4: A client SHOULD detect and intervene // in cyclical redirections (i.e., "infinite" redirection loops). if (++this._redirectCount > this._options.maxRedirects) { - this.emit("error", new TooManyRedirectsError()); - return; + throw new TooManyRedirectsError(); } // Store the request headers if applicable @@ -415,33 +444,23 @@ RedirectableRequest.prototype._processResponse = function (response) { var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); // If the redirect is relative, carry over the host of the last request - var currentUrlParts = url.parse(this._currentUrl); + var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); - // Determine the URL of the redirection - var redirectUrl; - try { - redirectUrl = url.resolve(currentUrl, location); - } - catch (cause) { - this.emit("error", new RedirectionError({ cause: cause })); - return; - } - // Create the redirected request - debug("redirecting to", redirectUrl); + var redirectUrl = resolveUrl(location, currentUrl); + debug("redirecting to", redirectUrl.href); this._isRedirect = true; - var redirectUrlParts = url.parse(redirectUrl); - Object.assign(this._options, redirectUrlParts); + spreadUrlObject(redirectUrl, this._options); // Drop confidential headers when redirecting to a less secure protocol // or to a different domain that is not a superdomain - if (redirectUrlParts.protocol !== currentUrlParts.protocol && - redirectUrlParts.protocol !== "https:" || - redirectUrlParts.host !== currentHost && - !isSubdomain(redirectUrlParts.host, currentHost)) { + if (redirectUrl.protocol !== currentUrlParts.protocol && + redirectUrl.protocol !== "https:" || + redirectUrl.host !== currentHost && + !isSubdomain(redirectUrl.host, currentHost)) { removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); } @@ -456,23 +475,12 @@ RedirectableRequest.prototype._processResponse = function (response) { method: method, headers: requestHeaders, }; - try { - beforeRedirect(this._options, responseDetails, requestDetails); - } - catch (err) { - this.emit("error", err); - return; - } + beforeRedirect(this._options, responseDetails, requestDetails); this._sanitizeOptions(this._options); } // Perform the redirected request - try { - this._performRequest(); - } - catch (cause) { - this.emit("error", new RedirectionError({ cause: cause })); - } + this._performRequest(); }; // Wraps the key/value object of protocols with redirect functionality @@ -492,27 +500,16 @@ function wrap(protocols) { // Executes a request, following redirects function request(input, options, callback) { - // Parse parameters - if (isString(input)) { - var parsed; - try { - parsed = urlToOptions(new URL(input)); - } - catch (err) { - /* istanbul ignore next */ - parsed = url.parse(input); - } - if (!isString(parsed.protocol)) { - throw new InvalidUrlError({ input }); - } - input = parsed; + // Parse parameters, ensuring that input is an object + if (isURL(input)) { + input = spreadUrlObject(input); } - else if (URL && (input instanceof URL)) { - input = urlToOptions(input); + else if (isString(input)) { + input = spreadUrlObject(parseUrl(input)); } else { callback = options; - options = input; + options = validateUrl(input); input = { protocol: protocol }; } if (isFunction(options)) { @@ -551,27 +548,57 @@ function wrap(protocols) { return exports; } -/* istanbul ignore next */ function noop() { /* empty */ } -// from https://github.com/nodejs/node/blob/master/lib/internal/url.js -function urlToOptions(urlObject) { - var options = { - protocol: urlObject.protocol, - hostname: urlObject.hostname.startsWith("[") ? - /* istanbul ignore next */ - urlObject.hostname.slice(1, -1) : - urlObject.hostname, - hash: urlObject.hash, - search: urlObject.search, - pathname: urlObject.pathname, - path: urlObject.pathname + urlObject.search, - href: urlObject.href, - }; - if (urlObject.port !== "") { - options.port = Number(urlObject.port); +function parseUrl(input) { + var parsed; + /* istanbul ignore else */ + if (useNativeURL) { + parsed = new URL(input); } - return options; + else { + // Ensure the URL is valid and absolute + parsed = validateUrl(url.parse(input)); + if (!isString(parsed.protocol)) { + throw new InvalidUrlError({ input }); + } + } + return parsed; +} + +function resolveUrl(relative, base) { + /* istanbul ignore next */ + return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); +} + +function validateUrl(input) { + if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { + throw new InvalidUrlError({ input: input.href || input }); + } + if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { + throw new InvalidUrlError({ input: input.href || input }); + } + return input; +} + +function spreadUrlObject(urlObject, target) { + var spread = target || {}; + for (var key of preservedUrlFields) { + spread[key] = urlObject[key]; + } + + // Fix IPv6 hostname + if (spread.hostname.startsWith("[")) { + spread.hostname = spread.hostname.slice(1, -1); + } + // Ensure port is a number + if (spread.port !== "") { + spread.port = Number(spread.port); + } + // Concatenate path + spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; + + return spread; } function removeMatchingHeaders(regex, headers) { @@ -597,8 +624,16 @@ function createErrorType(code, message, baseClass) { // Attach constructor and set default properties CustomError.prototype = new (baseClass || Error)(); - CustomError.prototype.constructor = CustomError; - CustomError.prototype.name = "Error [" + code + "]"; + Object.defineProperties(CustomError.prototype, { + constructor: { + value: CustomError, + enumerable: false, + }, + name: { + value: "Error [" + code + "]", + enumerable: false, + }, + }); return CustomError; } @@ -628,6 +663,10 @@ function isBuffer(value) { return typeof value === "object" && ("length" in value); } +function isURL(value) { + return URL && value instanceof URL; +} + // Exports module.exports = wrap({ http: http, https: https }); module.exports.wrap = wrap; diff --git a/node_modules/follow-redirects/package.json b/node_modules/follow-redirects/package.json index eb90372d..9b87663e 100644 --- a/node_modules/follow-redirects/package.json +++ b/node_modules/follow-redirects/package.json @@ -1,6 +1,6 @@ { "name": "follow-redirects", - "version": "1.15.3", + "version": "1.15.5", "description": "HTTP and HTTPS modules that follow redirects.", "license": "MIT", "main": "index.js", diff --git a/node_modules/magic-string/README.md b/node_modules/magic-string/README.md index d2287093..8de32b33 100644 --- a/node_modules/magic-string/README.md +++ b/node_modules/magic-string/README.md @@ -13,7 +13,7 @@ alt="license"> </a> -Suppose you have some source code. You want to make some light modifications to it - replacing a few characters here and there, wrapping it with a header and footer, etc - and ideally you'd like to generate a source map at the end of it. You've thought about using something like [recast](https://github.com/benjamn/recast) (which allows you to generate an AST from some JavaScript, manipulate it, and reprint it with a sourcemap without losing your comments and formatting), but it seems like overkill for your needs (or maybe the source code isn't JavaScript). +Suppose you have some source code. You want to make some light modifications to it - replacing a few characters here and there, wrapping it with a header and footer, etc - and ideally you'd like to generate a [source map](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/) at the end of it. You've thought about using something like [recast](https://github.com/benjamn/recast) (which allows you to generate an AST from some JavaScript, manipulate it, and reprint it with a sourcemap without losing your comments and formatting), but it seems like overkill for your needs (or maybe the source code isn't JavaScript). Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings and generating sourcemaps. @@ -43,10 +43,10 @@ import fs from 'fs' const s = new MagicString('problems = 99'); -s.overwrite(0, 8, 'answer'); +s.update(0, 8, 'answer'); s.toString(); // 'answer = 99' -s.overwrite(11, 13, '42'); // character indices always refer to the original string +s.update(11, 13, '42'); // character indices always refer to the original string s.toString(); // 'answer = 42' s.prepend('var ').append(';'); // most methods are chainable @@ -66,10 +66,11 @@ You can pass an options argument: ```js const s = new MagicString(someCode, { - // both these options will be used if you later - // call `bundle.addSource( s )` - see below + // these options will be used if you later call `bundle.addSource( s )` - see below filename: 'foo.js', - indentExclusionRanges: [/*...*/] + indentExclusionRanges: [/*...*/], + // market source as ignore in DevTools, see below #Bundling + ignoreList: false }); ``` @@ -106,7 +107,7 @@ Generates a [version 3 sourcemap](https://docs.google.com/document/d/1U1RGAehQwR * `file` - the filename where you plan to write the sourcemap * `source` - the filename of the file containing the original source * `includeContent` - whether to include the original content in the map's `sourcesContent` array -* `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. If sourcemap locations have been specified with `s.addSourceMapLocation()`, they will be used here. +* `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary instead of per character, suitable for string semantics that are separated by words. If sourcemap locations have been specified with `s.addSourcemapLocation()`, they will be used here. The returned sourcemap has two (non-enumerable) methods attached for convenience: @@ -117,6 +118,10 @@ The returned sourcemap has two (non-enumerable) methods attached for convenience code += '\n//# sourceMappingURL=' + map.toUrl(); ``` +### s.hasChanged() + +Indicates if the string has been changed. + ### s.indent( prefix[, options] ) Prefixes each line of the string with `prefix`. If `prefix` is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. Returns `this`. @@ -131,6 +136,10 @@ The `options` argument can have an `exclude` property, which is an array of `[st **DEPRECATED** since 0.17 – use `s.prependRight(...)` instead +### s.isEmpty() + +Returns true if the resulting source is empty (disregarding white space). + ### s.locate( index ) **DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30) @@ -139,16 +148,18 @@ The `options` argument can have an `exclude` property, which is an array of `[st **DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30) -### s.move( start, end, newIndex ) +### s.move( start, end, index ) Moves the characters from `start` and `end` to `index`. Returns `this`. ### s.overwrite( start, end, content[, options] ) -Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. Returns `this`. +Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in that range. The same restrictions as `s.remove()` apply. Returns `this`. The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and a `contentOnly` property which determines whether only the content is overwritten, or anything that was appended/prepended to the range as well. +It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. + ### s.prepend( content ) Prepends the string with the specified content. Returns `this`. @@ -161,6 +172,29 @@ Same as `s.appendLeft(...)`, except that the inserted content will go *before* a Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index` +### s.replace( regexpOrString, substitution ) + +String replacement with RegExp or string. When using a RegExp, replacer function is also supported. Returns `this`. + +```ts +import MagicString from 'magic-string' + +const s = new MagicString(source) + +s.replace('foo', 'bar') +s.replace(/foo/g, 'bar') +s.replace(/(\w)(\d+)/g, (_, $1, $2) => $1.toUpperCase() + $2) +``` + +The differences from [`String.replace`]((https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)): +- It will always match against the **original string** +- It mutates the magic string state (use `.clone()` to be immutable) + +### s.replaceAll( regexpOrString, substitution ) + +Same as `s.replace`, but replace all matched strings instead of just one. +If `substitution` is a regex, then it must have the global (`g`) flag set, or a `TypeError` is thrown. Matches the behavior of the bultin [`String.property.replaceAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll). + ### s.remove( start, end ) Removes the characters from `start` to `end` (of the original string, **not** the generated string). Removing the same content twice, or making removals that partially overlap, will cause an error. Returns `this`. @@ -193,9 +227,13 @@ Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the e Removes empty lines from the start and end. Returns `this`. -### s.isEmpty() +### s.update( start, end, content[, options] ) -Returns true if the resulting source is empty (disregarding white space). +Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. Returns `this`. + +The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and an `overwrite` property which defaults to `false` and determines whether anything that was appended/prepended to the range will be overwritten along with the original content. + +`s.update(start, end, content)` is equivalent to `s.overwrite(start, end, content, { contentOnly: true })`. ## Bundling @@ -214,6 +252,15 @@ bundle.addSource({ content: new MagicString('console.log( answer )') }); +// Sources can be marked as ignore-listed, which provides a hint to debuggers +// to not step into this code and also don't show the source files depending +// on user preferences. +bundle.addSource({ + filename: 'some-3rdparty-library.js', + content: new MagicString('function myLib(){}'), + ignoreList: false // <-- +}) + // Advanced: a source can include an `indentExclusionRanges` property // alongside `filename` and `content`. This will be passed to `s.indent()` // - see documentation above diff --git a/node_modules/magic-string/index.d.ts b/node_modules/magic-string/dist/magic-string.cjs.d.ts similarity index 72% rename from node_modules/magic-string/index.d.ts rename to node_modules/magic-string/dist/magic-string.cjs.d.ts index 343c49dc..42c0ec23 100644 --- a/node_modules/magic-string/index.d.ts +++ b/node_modules/magic-string/dist/magic-string.cjs.d.ts @@ -10,9 +10,11 @@ export interface SourceMapOptions { * be able to pinpoint the exact location of function calls and so on. * With lo-res mappings, devtools may only be able to identify the correct * line - but they're quicker to generate and less bulky. + * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary + * instead of per character, suitable for string semantics that are separated by words. * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here. */ - hires?: boolean; + hires?: boolean | 'boundary'; /** * The filename where you plan to write the sourcemap. */ @@ -35,9 +37,10 @@ export type SourceMapSegment = export interface DecodedSourceMap { file: string; sources: string[]; - sourcesContent: string[]; + sourcesContent?: string[]; names: string[]; mappings: SourceMapSegment[][]; + x_google_ignoreList?: number[]; } export class SourceMap { @@ -46,9 +49,10 @@ export class SourceMap { version: number; file: string; sources: string[]; - sourcesContent: string[]; + sourcesContent?: string[]; names: string[]; mappings: string; + x_google_ignoreList?: number[]; /** * Returns the equivalent of `JSON.stringify(map)` @@ -63,11 +67,21 @@ export class SourceMap { export class Bundle { constructor(options?: BundleOptions); - addSource(source: MagicString | { filename?: string, content: MagicString }): Bundle; + /** + * Adds the specified source to the bundle, which can either be a `MagicString` object directly, + * or an options object that holds a magic string `content` property and optionally provides + * a `filename` for the source within the bundle, as well as an optional `ignoreList` hint + * (which defaults to `false`). The `filename` is used when constructing the source map for the + * bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint + * is used to populate the `x_google_ignoreList` extension field in the source map, which is a + * mechanism for tools to signal to debuggers that certain sources should be ignored by default + * (depending on user preferences). + */ + addSource(source: MagicString | { filename?: string, content: MagicString, ignoreList?: boolean }): Bundle; append(str: string, options?: BundleOptions): Bundle; clone(): Bundle; - generateMap(options?: SourceMapOptions): SourceMap; - generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap; + generateMap(options?: SourceMapOptions): Omit<SourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> }; + generateDecodedMap(options?: SourceMapOptions): Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> }; getIndentString(): string; indent(indentStr?: string): Bundle; indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; @@ -98,6 +112,11 @@ export interface OverwriteOptions { contentOnly?: boolean; } +export interface UpdateOptions { + storeName?: boolean; + overwrite?: boolean; +} + export default class MagicString { constructor(str: string, options?: MagicStringOptions); /** @@ -110,7 +129,7 @@ export default class MagicString { append(content: string): MagicString; /** * Appends the specified content at the index in the original string. - * If a range *ending* with index is subsequently moved, the insert will be moved with it. + * If a range *ending* with index is subsequently moved, the insert will be moved with it. * See also `s.prependLeft(...)`. */ appendLeft(index: number, content: string): MagicString; @@ -155,15 +174,26 @@ export default class MagicString { */ move(start: number, end: number, index: number): MagicString; /** - * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. + * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in + * that range. The same restrictions as `s.remove()` apply. * * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only * the content is overwritten, or anything that was appended/prepended to the range as well. + * + * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. */ overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString; /** - * Prepends the string with the specified content. + * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. + * + * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored + * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only + * the content is overwritten, or anything that was appended/prepended to the range as well. + */ + update(start: number, end: number, content: string, options?: boolean | UpdateOptions): MagicString; + /** + * Prepends the string with the specified content. */ prepend(content: string): MagicString; /** @@ -204,6 +234,14 @@ export default class MagicString { * Removes empty lines from the start and end. */ trimLines(): MagicString; + /** + * String replacement with RegExp or string. + */ + replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString; + /** + * Same as `s.replace`, but replace all matched strings instead of just one. + */ + replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString; lastChar(): string; lastLine(): string; @@ -213,6 +251,11 @@ export default class MagicString { isEmpty(): boolean; length(): number; + /** + * Indicates if the string has been changed. + */ + hasChanged(): boolean; + original: string; /** * Returns the generated string. diff --git a/node_modules/magic-string/dist/magic-string.cjs.js b/node_modules/magic-string/dist/magic-string.cjs.js index 4be44d8e..444d85fe 100644 --- a/node_modules/magic-string/dist/magic-string.cjs.js +++ b/node_modules/magic-string/dist/magic-string.cjs.js @@ -1,203 +1,231 @@ 'use strict'; -var sourcemapCodec = require('sourcemap-codec'); +var sourcemapCodec = require('@jridgewell/sourcemap-codec'); -var BitSet = function BitSet(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; -}; - -BitSet.prototype.add = function add (n) { - this.bits[n >> 5] |= 1 << (n & 31); -}; - -BitSet.prototype.has = function has (n) { - return !!(this.bits[n >> 5] & (1 << (n & 31))); -}; - -var Chunk = function Chunk(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - // we make these non-enumerable, for sanity while debugging - Object.defineProperties(this, { - previous: { writable: true, value: null }, - next: { writable: true, value: null }, - }); -}; - -Chunk.prototype.appendLeft = function appendLeft (content) { - this.outro += content; -}; - -Chunk.prototype.appendRight = function appendRight (content) { - this.intro = this.intro + content; -}; - -Chunk.prototype.clone = function clone () { - var chunk = new Chunk(this.start, this.end, this.original); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; -}; - -Chunk.prototype.contains = function contains (index) { - return this.start < index && index < this.end; -}; - -Chunk.prototype.eachNext = function eachNext (fn) { - var chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; - } -}; - -Chunk.prototype.eachPrevious = function eachPrevious (fn) { - var chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; - } -}; - -Chunk.prototype.edit = function edit (content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { - this.intro = ''; - this.outro = ''; - } - this.storeName = storeName; - - this.edited = true; - - return this; -}; - -Chunk.prototype.prependLeft = function prependLeft (content) { - this.outro = content + this.outro; -}; - -Chunk.prototype.prependRight = function prependRight (content) { - this.intro = content + this.intro; -}; - -Chunk.prototype.split = function split (index) { - var sliceIndex = index - this.start; - - var originalBefore = this.original.slice(0, sliceIndex); - var originalAfter = this.original.slice(sliceIndex); - - this.original = originalBefore; - - var newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if (this.edited) { - // TODO is this block necessary?... - newChunk.edit('', false); - this.content = ''; - } else { - this.content = originalBefore; +class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; } - newChunk.next = this.next; - if (newChunk.next) { newChunk.next.previous = newChunk; } - newChunk.previous = this; - this.next = newChunk; - - return newChunk; -}; - -Chunk.prototype.toString = function toString () { - return this.intro + this.content + this.outro; -}; - -Chunk.prototype.trimEnd = function trimEnd (rx) { - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - - var trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit('', undefined, true); - } - return true; - } else { - this.edit('', undefined, true); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); } -}; -Chunk.prototype.trimStart = function trimStart (rx) { - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - - var trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.end - trimmed.length); - this.edit('', undefined, true); - } - return true; - } else { - this.edit('', undefined, true); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); } -}; - -var btoa = function () { - throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); -}; -if (typeof window !== 'undefined' && typeof window.btoa === 'function') { - btoa = function (str) { return window.btoa(unescape(encodeURIComponent(str))); }; -} else if (typeof Buffer === 'function') { - btoa = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); }; } -var SourceMap = function SourceMap(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = sourcemapCodec.encode(properties.mappings); -}; +class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; -SourceMap.prototype.toString = function toString () { - return JSON.stringify(this); -}; + this.intro = ''; + this.outro = ''; -SourceMap.prototype.toUrl = function toUrl () { - return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); -}; + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } +} + +function getBtoa() { + if (typeof window !== 'undefined' && typeof window.btoa === 'function') { + return (str) => window.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } +} + +const btoa = /*#__PURE__*/ getBtoa(); + +class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = sourcemapCodec.encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); + } +} function guessIndent(code) { - var lines = code.split('\n'); + const lines = code.split('\n'); - var tabbed = lines.filter(function (line) { return /^\t+/.test(line); }); - var spaced = lines.filter(function (line) { return /^ {2,}/.test(line); }); + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); if (tabbed.length === 0 && spaced.length === 0) { return null; @@ -211,8 +239,8 @@ function guessIndent(code) { } // Otherwise, we need to guess the multiple - var min = spaced.reduce(function (previous, current) { - var numSpaces = /^ +/.exec(current)[0].length; + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; return Math.min(numSpaces, previous); }, Infinity); @@ -220,8 +248,8 @@ function guessIndent(code) { } function getRelativePath(from, to) { - var fromParts = from.split(/[/\\]/); - var toParts = to.split(/[/\\]/); + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); fromParts.pop(); // get dirname @@ -231,1077 +259,1240 @@ function getRelativePath(from, to) { } if (fromParts.length) { - var i = fromParts.length; - while (i--) { fromParts[i] = '..'; } + let i = fromParts.length; + while (i--) fromParts[i] = '..'; } return fromParts.concat(toParts).join('/'); } -var toString = Object.prototype.toString; +const toString = Object.prototype.toString; function isObject(thing) { return toString.call(thing) === '[object Object]'; } function getLocator(source) { - var originalLines = source.split('\n'); - var lineOffsets = []; + const originalLines = source.split('\n'); + const lineOffsets = []; - for (var i = 0, pos = 0; i < originalLines.length; i++) { + for (let i = 0, pos = 0; i < originalLines.length; i++) { lineOffsets.push(pos); pos += originalLines[i].length + 1; } return function locate(index) { - var i = 0; - var j = lineOffsets.length; + let i = 0; + let j = lineOffsets.length; while (i < j) { - var m = (i + j) >> 1; + const m = (i + j) >> 1; if (index < lineOffsets[m]) { j = m; } else { i = m + 1; } } - var line = i - 1; - var column = index - lineOffsets[line]; - return { line: line, column: column }; + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; }; } -var Mappings = function Mappings(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; -}; +const wordRegex = /\w/; -Mappings.prototype.addEdit = function addEdit (sourceIndex, content, loc, nameIndex) { - if (content.length) { - var segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - } else if (this.pending) { - this.rawSegments.push(this.pending); - } - - this.advance(content); - this.pending = null; -}; - -Mappings.prototype.addUneditedChunk = function addUneditedChunk (sourceIndex, chunk, original, loc, sourcemapLocations) { - var originalCharIndex = chunk.start; - var first = true; - - while (originalCharIndex < chunk.end) { - if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { - this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]); - } - - if (original[originalCharIndex] === '\n') { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first = true; - } else { - loc.column += 1; - this.generatedCodeColumn += 1; - first = false; - } - - originalCharIndex += 1; - } - - this.pending = null; -}; - -Mappings.prototype.advance = function advance (str) { - if (!str) { return; } - - var lines = str.split('\n'); - - if (lines.length > 1) { - for (var i = 0; i < lines.length - 1; i++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } +class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; } - this.generatedCodeColumn += lines[lines.length - 1].length; -}; + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + while (contentLineEnd >= 0) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); -var n = '\n'; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; -var warned = { + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + } else { + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } +} + +const n = '\n'; + +const warned = { insertLeft: false, insertRight: false, storeName: false, }; -var MagicString = function MagicString(string, options) { - if ( options === void 0 ) options = {}; +class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); - var chunk = new Chunk(0, string.length, string); - - Object.defineProperties(this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: new BitSet() }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: guessIndent(string) }, - }); - - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; -}; - -MagicString.prototype.addSourcemapLocation = function addSourcemapLocation (char) { - this.sourcemapLocations.add(char); -}; - -MagicString.prototype.append = function append (content) { - if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); } - - this.outro += content; - return this; -}; - -MagicString.prototype.appendLeft = function appendLeft (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byEnd[index]; - - if (chunk) { - chunk.appendLeft(content); - } else { - this.intro += content; - } - return this; -}; - -MagicString.prototype.appendRight = function appendRight (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byStart[index]; - - if (chunk) { - chunk.appendRight(content); - } else { - this.outro += content; - } - return this; -}; - -MagicString.prototype.clone = function clone () { - var cloned = new MagicString(this.original, { filename: this.filename }); - - var originalChunk = this.firstChunk; - var clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); - - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - - var nextOriginalChunk = originalChunk.next; - var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if (this.indentExclusionRanges) { - cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - } - - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - - cloned.intro = this.intro; - cloned.outro = this.outro; - - return cloned; -}; - -MagicString.prototype.generateDecodedMap = function generateDecodedMap (options) { - var this$1$1 = this; - - options = options || {}; - - var sourceIndex = 0; - var names = Object.keys(this.storedNames); - var mappings = new Mappings(options.hires); - - var locate = getLocator(this.original); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.firstChunk.eachNext(function (chunk) { - var loc = locate(chunk.start); - - if (chunk.intro.length) { mappings.advance(chunk.intro); } - - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1 - ); - } else { - mappings.addUneditedChunk(sourceIndex, chunk, this$1$1.original, loc, this$1$1.sourcemapLocations); - } - - if (chunk.outro.length) { mappings.advance(chunk.outro); } - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : null, - sources: [options.source ? getRelativePath(options.file || '', options.source) : null], - sourcesContent: options.includeContent ? [this.original] : [null], - names: names, - mappings: mappings.raw, - }; -}; - -MagicString.prototype.generateMap = function generateMap (options) { - return new SourceMap(this.generateDecodedMap(options)); -}; - -MagicString.prototype.getIndentString = function getIndentString () { - return this.indentStr === null ? '\t' : this.indentStr; -}; - -MagicString.prototype.indent = function indent (indentStr, options) { - var pattern = /^[^\r\n]/gm; - - if (isObject(indentStr)) { - options = indentStr; - indentStr = undefined; - } - - indentStr = indentStr !== undefined ? indentStr : this.indentStr || '\t'; - - if (indentStr === '') { return this; } // noop - - options = options || {}; - - // Process exclusion ranges - var isExcluded = {}; - - if (options.exclude) { - var exclusions = - typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; - exclusions.forEach(function (exclusion) { - for (var i = exclusion[0]; i < exclusion[1]; i += 1) { - isExcluded[i] = true; - } + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; } - var shouldIndentNextCharacter = options.indentStart !== false; - var replacer = function (match) { - if (shouldIndentNextCharacter) { return ("" + indentStr + match); } - shouldIndentNextCharacter = true; - return match; - }; + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } - this.intro = this.intro.replace(pattern, replacer); + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - var charIndex = 0; - var chunk = this.firstChunk; + this.outro += content; + return this; + } - while (chunk) { - var end = chunk.end; + appendLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); + this._split(index); - if (chunk.content.length) { - shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; - } - } + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); } else { - charIndex = chunk.start; + this.intro += content; + } + return this; + } - while (charIndex < end) { + appendRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { if (!isExcluded[charIndex]) { - var char = this.original[charIndex]; + chunk.content = chunk.content.replace(pattern, replacer); - if (char === '\n') { - shouldIndentNextCharacter = true; - } else if (char !== '\r' && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - - if (charIndex === chunk.start) { - chunk.prependRight(indentStr); - } else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; } } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace(pattern, replacer); - - return this; -}; - -MagicString.prototype.insert = function insert () { - throw new Error( - 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)' - ); -}; - -MagicString.prototype.insertLeft = function insertLeft (index, content) { - if (!warned.insertLeft) { - console.warn( - 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead' - ); // eslint-disable-line no-console - warned.insertLeft = true; - } - - return this.appendLeft(index, content); -}; - -MagicString.prototype.insertRight = function insertRight (index, content) { - if (!warned.insertRight) { - console.warn( - 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead' - ); // eslint-disable-line no-console - warned.insertRight = true; - } - - return this.prependRight(index, content); -}; - -MagicString.prototype.move = function move (start, end, index) { - if (index >= start && index <= end) { throw new Error('Cannot move a selection inside itself'); } - - this._split(start); - this._split(end); - this._split(index); - - var first = this.byStart[start]; - var last = this.byEnd[end]; - - var oldLeft = first.previous; - var oldRight = last.next; - - var newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) { return this; } - var newLeft = newRight ? newRight.previous : this.lastChunk; - - if (oldLeft) { oldLeft.next = oldRight; } - if (oldRight) { oldRight.previous = oldLeft; } - - if (newLeft) { newLeft.next = first; } - if (newRight) { newRight.previous = last; } - - if (!first.previous) { this.firstChunk = last.next; } - if (!last.next) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight || null; - - if (!newLeft) { this.firstChunk = first; } - if (!newRight) { this.lastChunk = last; } - return this; -}; - -MagicString.prototype.overwrite = function overwrite (start, end, content, options) { - if (typeof content !== 'string') { throw new TypeError('replacement content must be a string'); } - - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - if (end > this.original.length) { throw new Error('end is out of bounds'); } - if (start === end) - { throw new Error( - 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead' - ); } - - this._split(start); - this._split(end); - - if (options === true) { - if (!warned.storeName) { - console.warn( - 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string' - ); // eslint-disable-line no-console - warned.storeName = true; - } - - options = { storeName: true }; - } - var storeName = options !== undefined ? options.storeName : false; - var contentOnly = options !== undefined ? options.contentOnly : false; - - if (storeName) { - var original = this.original.slice(start, end); - Object.defineProperty(this.storedNames, original, { writable: true, value: true, enumerable: true }); - } - - var first = this.byStart[start]; - var last = this.byEnd[end]; - - if (first) { - var chunk = first; - while (chunk !== last) { - if (chunk.next !== this.byStart[chunk.end]) { - throw new Error('Cannot overwrite across a split point'); - } - chunk = chunk.next; - chunk.edit('', false); - } - - first.edit(content, storeName, contentOnly); - } else { - // must be inserting at the end - var newChunk = new Chunk(start, end, '').edit(content, storeName); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - return this; -}; - -MagicString.prototype.prepend = function prepend (content) { - if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); } - - this.intro = content + this.intro; - return this; -}; - -MagicString.prototype.prependLeft = function prependLeft (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byEnd[index]; - - if (chunk) { - chunk.prependLeft(content); - } else { - this.intro = content + this.intro; - } - return this; -}; - -MagicString.prototype.prependRight = function prependRight (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byStart[index]; - - if (chunk) { - chunk.prependRight(content); - } else { - this.outro = content + this.outro; - } - return this; -}; - -MagicString.prototype.remove = function remove (start, end) { - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - if (start === end) { return this; } - - if (start < 0 || end > this.original.length) { throw new Error('Character is out of bounds'); } - if (start > end) { throw new Error('end must be greater than start'); } - - this._split(start); - this._split(end); - - var chunk = this.byStart[start]; - - while (chunk) { - chunk.intro = ''; - chunk.outro = ''; - chunk.edit(''); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; -}; - -MagicString.prototype.lastChar = function lastChar () { - if (this.outro.length) { return this.outro[this.outro.length - 1]; } - var chunk = this.lastChunk; - do { - if (chunk.outro.length) { return chunk.outro[chunk.outro.length - 1]; } - if (chunk.content.length) { return chunk.content[chunk.content.length - 1]; } - if (chunk.intro.length) { return chunk.intro[chunk.intro.length - 1]; } - } while ((chunk = chunk.previous)); - if (this.intro.length) { return this.intro[this.intro.length - 1]; } - return ''; -}; - -MagicString.prototype.lastLine = function lastLine () { - var lineIndex = this.outro.lastIndexOf(n); - if (lineIndex !== -1) { return this.outro.substr(lineIndex + 1); } - var lineStr = this.outro; - var chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.outro.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.outro + lineStr; - } - - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.content.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.content + lineStr; - } - - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.intro.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.intro + lineStr; - } - } while ((chunk = chunk.previous)); - lineIndex = this.intro.lastIndexOf(n); - if (lineIndex !== -1) { return this.intro.substr(lineIndex + 1) + lineStr; } - return this.intro + lineStr; -}; - -MagicString.prototype.slice = function slice (start, end) { - if ( start === void 0 ) start = 0; - if ( end === void 0 ) end = this.original.length; - - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - var result = ''; - - // find start chunk - var chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - // found end chunk before start - if (chunk.start < end && chunk.end >= end) { - return result; - } - - chunk = chunk.next; - } - - if (chunk && chunk.edited && chunk.start !== start) - { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); } - - var startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { - result += chunk.intro; - } - - var containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) - { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); } - - var sliceStart = startChunk === chunk ? start - chunk.start : 0; - var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice(sliceStart, sliceEnd); - - if (chunk.outro && (!containsEnd || chunk.end === end)) { - result += chunk.outro; - } - - if (containsEnd) { - break; - } - - chunk = chunk.next; - } - - return result; -}; - -// TODO deprecate this? not really very useful -MagicString.prototype.snip = function snip (start, end) { - var clone = this.clone(); - clone.remove(0, start); - clone.remove(end, clone.original.length); - - return clone; -}; - -MagicString.prototype._split = function _split (index) { - if (this.byStart[index] || this.byEnd[index]) { return; } - - var chunk = this.lastSearchedChunk; - var searchForward = index > chunk.end; - - while (chunk) { - if (chunk.contains(index)) { return this._splitChunk(chunk, index); } - - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - } -}; - -MagicString.prototype._splitChunk = function _splitChunk (chunk, index) { - if (chunk.edited && chunk.content.length) { - // zero-length edited chunks are a special case (overlapping replacements) - var loc = getLocator(this.original)(index); - throw new Error( - ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")") - ); - } - - var newChunk = chunk.split(index); - - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - - if (chunk === this.lastChunk) { this.lastChunk = newChunk; } - - this.lastSearchedChunk = chunk; - return true; -}; - -MagicString.prototype.toString = function toString () { - var str = this.intro; - - var chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; -}; - -MagicString.prototype.isEmpty = function isEmpty () { - var chunk = this.firstChunk; - do { - if ( - (chunk.intro.length && chunk.intro.trim()) || - (chunk.content.length && chunk.content.trim()) || - (chunk.outro.length && chunk.outro.trim()) - ) - { return false; } - } while ((chunk = chunk.next)); - return true; -}; - -MagicString.prototype.length = function length () { - var chunk = this.firstChunk; - var length = 0; - do { - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - } while ((chunk = chunk.next)); - return length; -}; - -MagicString.prototype.trimLines = function trimLines () { - return this.trim('[\\r\\n]'); -}; - -MagicString.prototype.trim = function trim (charType) { - return this.trimStart(charType).trimEnd(charType); -}; - -MagicString.prototype.trimEndAborted = function trimEndAborted (charType) { - var rx = new RegExp((charType || '\\s') + '+$'); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - - var chunk = this.lastChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimEnd(rx); - - // if chunk was trimmed, we have a new lastChunk - if (chunk.end !== end) { - if (this.lastChunk === chunk) { - this.lastChunk = chunk.next; - } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) { return true; } - chunk = chunk.previous; - } while (chunk); - - return false; -}; - -MagicString.prototype.trimEnd = function trimEnd (charType) { - this.trimEndAborted(charType); - return this; -}; -MagicString.prototype.trimStartAborted = function trimStartAborted (charType) { - var rx = new RegExp('^' + (charType || '\\s') + '+'); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - - var chunk = this.firstChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimStart(rx); - - if (chunk.end !== end) { - // special case... - if (chunk === this.lastChunk) { this.lastChunk = chunk.next; } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) { return true; } - chunk = chunk.next; - } while (chunk); - - return false; -}; - -MagicString.prototype.trimStart = function trimStart (charType) { - this.trimStartAborted(charType); - return this; -}; - -var hasOwnProp = Object.prototype.hasOwnProperty; - -var Bundle = function Bundle(options) { - if ( options === void 0 ) options = {}; - - this.intro = options.intro || ''; - this.separator = options.separator !== undefined ? options.separator : '\n'; - this.sources = []; - this.uniqueSources = []; - this.uniqueSourceIndexByFilename = {}; -}; - -Bundle.prototype.addSource = function addSource (source) { - if (source instanceof MagicString) { - return this.addSource({ - content: source, - filename: source.filename, - separator: this.separator, - }); - } - - if (!isObject(source) || !source.content) { - throw new Error( - 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' - ); - } - - ['filename', 'indentExclusionRanges', 'separator'].forEach(function (option) { - if (!hasOwnProp.call(source, option)) { source[option] = source.content[option]; } - }); - - if (source.separator === undefined) { - // TODO there's a bunch of this sort of thing, needs cleaning up - source.separator = this.separator; - } - - if (source.filename) { - if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { - this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; - this.uniqueSources.push({ filename: source.filename, content: source.content.original }); - } else { - var uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; - if (source.content.original !== uniqueSource.content) { - throw new Error(("Illegal source: same filename (" + (source.filename) + "), different contents")); - } - } - } - - this.sources.push(source); - return this; -}; - -Bundle.prototype.append = function append (str, options) { - this.addSource({ - content: new MagicString(str), - separator: (options && options.separator) || '', - }); - - return this; -}; - -Bundle.prototype.clone = function clone () { - var bundle = new Bundle({ - intro: this.intro, - separator: this.separator, - }); - - this.sources.forEach(function (source) { - bundle.addSource({ - filename: source.filename, - content: source.content.clone(), - separator: source.separator, - }); - }); - - return bundle; -}; - -Bundle.prototype.generateDecodedMap = function generateDecodedMap (options) { - var this$1$1 = this; - if ( options === void 0 ) options = {}; - - var names = []; - this.sources.forEach(function (source) { - Object.keys(source.content.storedNames).forEach(function (name) { - if (!~names.indexOf(name)) { names.push(name); } - }); - }); - - var mappings = new Mappings(options.hires); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.sources.forEach(function (source, i) { - if (i > 0) { - mappings.advance(this$1$1.separator); - } - - var sourceIndex = source.filename ? this$1$1.uniqueSourceIndexByFilename[source.filename] : -1; - var magicString = source.content; - var locate = getLocator(magicString.original); - - if (magicString.intro) { - mappings.advance(magicString.intro); - } - - magicString.firstChunk.eachNext(function (chunk) { - var loc = locate(chunk.start); - - if (chunk.intro.length) { mappings.advance(chunk.intro); } - - if (source.filename) { - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1 - ); - } else { - mappings.addUneditedChunk( - sourceIndex, - chunk, - magicString.original, - loc, - magicString.sourcemapLocations - ); - } } else { - mappings.advance(chunk.content); + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } } - if (chunk.outro.length) { mappings.advance(chunk.outro); } - }); - - if (magicString.outro) { - mappings.advance(magicString.outro); + charIndex = chunk.end; + chunk = chunk.next; } - }); - return { - file: options.file ? options.file.split(/[/\\]/).pop() : null, - sources: this.uniqueSources.map(function (source) { - return options.file ? getRelativePath(options.file, source.filename) : source.filename; - }), - sourcesContent: this.uniqueSources.map(function (source) { - return options.includeContent ? source.content : null; - }), - names: names, - mappings: mappings.raw, - }; -}; + this.outro = this.outro.replace(pattern, replacer); -Bundle.prototype.generateMap = function generateMap (options) { - return new SourceMap(this.generateDecodedMap(options)); -}; - -Bundle.prototype.getIndentString = function getIndentString () { - var indentStringCounts = {}; - - this.sources.forEach(function (source) { - var indentStr = source.content.indentStr; - - if (indentStr === null) { return; } - - if (!indentStringCounts[indentStr]) { indentStringCounts[indentStr] = 0; } - indentStringCounts[indentStr] += 1; - }); - - return ( - Object.keys(indentStringCounts).sort(function (a, b) { - return indentStringCounts[a] - indentStringCounts[b]; - })[0] || '\t' - ); -}; - -Bundle.prototype.indent = function indent (indentStr) { - var this$1$1 = this; - - if (!arguments.length) { - indentStr = this.getIndentString(); + return this; } - if (indentStr === '') { return this; } // noop + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } - var trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); // eslint-disable-line no-console + warned.insertLeft = true; + } - this.sources.forEach(function (source, i) { - var separator = source.separator !== undefined ? source.separator : this$1$1.separator; - var indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); + return this.appendLeft(index, content); + } - source.content.indent(indentStr, { - exclude: source.indentExclusionRanges, - indentStart: indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) - }); + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); // eslint-disable-line no-console + warned.insertRight = true; + } - trailingNewline = source.content.lastChar() === '\n'; - }); + return this.prependRight(index, content); + } - if (this.intro) { - this.intro = - indentStr + - this.intro.replace(/^[^\n]/gm, function (match, index) { - return index > 0 ? indentStr + match : match; + move(start, end, index) { + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); // eslint-disable-line no-console + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; } - return this; -}; + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); -Bundle.prototype.prepend = function prepend (str) { - this.intro = str + this.intro; - return this; -}; + this.intro = content + this.intro; + return this; + } -Bundle.prototype.toString = function toString () { - var this$1$1 = this; + prependLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - var body = this.sources - .map(function (source, i) { - var separator = source.separator !== undefined ? source.separator : this$1$1.separator; - var str = (i > 0 ? separator : '') + source.content.toString(); + this._split(index); - return str; - }) - .join(''); + const chunk = this.byEnd[index]; - return this.intro + body; -}; + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } -Bundle.prototype.isEmpty = function isEmpty () { - if (this.intro.length && this.intro.trim()) { return false; } - if (this.sources.some(function (source) { return !source.content.isEmpty(); })) { return false; } - return true; -}; + prependRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); -Bundle.prototype.length = function length () { - return this.sources.reduce( - function (length, source) { return length + source.content.length(); }, - this.intro.length - ); -}; + this._split(index); -Bundle.prototype.trimLines = function trimLines () { - return this.trim('[\\r\\n]'); -}; + const chunk = this.byStart[index]; -Bundle.prototype.trim = function trim (charType) { - return this.trimStart(charType).trimEnd(charType); -}; + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } -Bundle.prototype.trimStart = function trimStart (charType) { - var rx = new RegExp('^' + (charType || '\\s') + '+'); - this.intro = this.intro.replace(rx, ''); + remove(start, end) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; - if (!this.intro) { - var source; - var i = 0; + if (start === end) return this; + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; do { - source = this.sources[i++]; - if (!source) { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { break; } - } while (!source.content.trimStartAborted(charType)); + + chunk = chunk.next; + } + + return result; } - return this; -}; + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); -Bundle.prototype.trimEnd = function trimEnd (charType) { - var rx = new RegExp((charType || '\\s') + '+$'); + return clone; + } - var source; - var i = this.sources.length - 1; + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; - do { - source = this.sources[i--]; - if (!source) { - this.intro = this.intro.replace(rx, ''); - break; + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; } - } while (!source.content.trimEndAborted(charType)); + } - return this; -}; + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) + this.overwrite( + match.index, + match.index + match[0].length, + getReplacement(match, this.original), + ); + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) + this.overwrite( + match.index, + match.index + match[0].length, + getReplacement(match, this.original), + ); + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } +} + +const hasOwnProp = Object.prototype.hasOwnProperty; + +class Bundle { + constructor(options = {}) { + this.intro = options.intro || ''; + this.separator = options.separator !== undefined ? options.separator : '\n'; + this.sources = []; + this.uniqueSources = []; + this.uniqueSourceIndexByFilename = {}; + } + + addSource(source) { + if (source instanceof MagicString) { + return this.addSource({ + content: source, + filename: source.filename, + separator: this.separator, + }); + } + + if (!isObject(source) || !source.content) { + throw new Error( + 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', + ); + } + + ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { + if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; + }); + + if (source.separator === undefined) { + // TODO there's a bunch of this sort of thing, needs cleaning up + source.separator = this.separator; + } + + if (source.filename) { + if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { + this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; + this.uniqueSources.push({ filename: source.filename, content: source.content.original }); + } else { + const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; + if (source.content.original !== uniqueSource.content) { + throw new Error(`Illegal source: same filename (${source.filename}), different contents`); + } + } + } + + this.sources.push(source); + return this; + } + + append(str, options) { + this.addSource({ + content: new MagicString(str), + separator: (options && options.separator) || '', + }); + + return this; + } + + clone() { + const bundle = new Bundle({ + intro: this.intro, + separator: this.separator, + }); + + this.sources.forEach((source) => { + bundle.addSource({ + filename: source.filename, + content: source.content.clone(), + separator: source.separator, + }); + }); + + return bundle; + } + + generateDecodedMap(options = {}) { + const names = []; + let x_google_ignoreList = undefined; + this.sources.forEach((source) => { + Object.keys(source.content.storedNames).forEach((name) => { + if (!~names.indexOf(name)) names.push(name); + }); + }); + + const mappings = new Mappings(options.hires); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.sources.forEach((source, i) => { + if (i > 0) { + mappings.advance(this.separator); + } + + const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; + const magicString = source.content; + const locate = getLocator(magicString.original); + + if (magicString.intro) { + mappings.advance(magicString.intro); + } + + magicString.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (source.filename) { + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk( + sourceIndex, + chunk, + magicString.original, + loc, + magicString.sourcemapLocations, + ); + } + } else { + mappings.advance(chunk.content); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + if (magicString.outro) { + mappings.advance(magicString.outro); + } + + if (source.ignoreList && sourceIndex !== -1) { + if (x_google_ignoreList === undefined) { + x_google_ignoreList = []; + } + x_google_ignoreList.push(sourceIndex); + } + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: this.uniqueSources.map((source) => { + return options.file ? getRelativePath(options.file, source.filename) : source.filename; + }), + sourcesContent: this.uniqueSources.map((source) => { + return options.includeContent ? source.content : null; + }), + names, + mappings: mappings.raw, + x_google_ignoreList, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + getIndentString() { + const indentStringCounts = {}; + + this.sources.forEach((source) => { + const indentStr = source.content._getRawIndentString(); + + if (indentStr === null) return; + + if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; + indentStringCounts[indentStr] += 1; + }); + + return ( + Object.keys(indentStringCounts).sort((a, b) => { + return indentStringCounts[a] - indentStringCounts[b]; + })[0] || '\t' + ); + } + + indent(indentStr) { + if (!arguments.length) { + indentStr = this.getIndentString(); + } + + if (indentStr === '') return this; // noop + + let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; + + this.sources.forEach((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); + + source.content.indent(indentStr, { + exclude: source.indentExclusionRanges, + indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) + }); + + trailingNewline = source.content.lastChar() === '\n'; + }); + + if (this.intro) { + this.intro = + indentStr + + this.intro.replace(/^[^\n]/gm, (match, index) => { + return index > 0 ? indentStr + match : match; + }); + } + + return this; + } + + prepend(str) { + this.intro = str + this.intro; + return this; + } + + toString() { + const body = this.sources + .map((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const str = (i > 0 ? separator : '') + source.content.toString(); + + return str; + }) + .join(''); + + return this.intro + body; + } + + isEmpty() { + if (this.intro.length && this.intro.trim()) return false; + if (this.sources.some((source) => !source.content.isEmpty())) return false; + return true; + } + + length() { + return this.sources.reduce( + (length, source) => length + source.content.length(), + this.intro.length, + ); + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimStart(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + this.intro = this.intro.replace(rx, ''); + + if (!this.intro) { + let source; + let i = 0; + + do { + source = this.sources[i++]; + if (!source) { + break; + } + } while (!source.content.trimStartAborted(charType)); + } + + return this; + } + + trimEnd(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + let source; + let i = this.sources.length - 1; + + do { + source = this.sources[i--]; + if (!source) { + this.intro = this.intro.replace(rx, ''); + break; + } + } while (!source.content.trimEndAborted(charType)); + + return this; + } +} MagicString.Bundle = Bundle; MagicString.SourceMap = SourceMap; diff --git a/node_modules/magic-string/dist/magic-string.cjs.js.map b/node_modules/magic-string/dist/magic-string.cjs.js.map index 964c77e3..0ebb3874 100644 --- a/node_modules/magic-string/dist/magic-string.cjs.js.map +++ b/node_modules/magic-string/dist/magic-string.cjs.js.map @@ -1 +1 @@ -{"version":3,"file":"magic-string.cjs.js","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t// we make these non-enumerable, for sanity while debugging\n\t\tObject.defineProperties(this, {\n\t\t\tprevious: { writable: true, value: null },\n\t\t\tnext: { writable: true, value: null },\n\t\t});\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.end - trimmed.length);\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from 'sourcemap-codec';\n\nlet btoa = () => {\n\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n};\nif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\tbtoa = (str) => window.btoa(unescape(encodeURIComponent(str)));\n} else if (typeof Buffer === 'function') {\n\tbtoa = (str) => Buffer.from(str, 'utf-8').toString('base64');\n}\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","export default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t}\n\n\t\tthis.advance(content);\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tthis.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: guessIndent(string) },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: [options.source ? getRelativePath(options.file || '', options.source) : null],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : [null],\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tindentStr = indentStr !== undefined ? indentStr : this.indentStr || '\\t';\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)'\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead'\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'\n\t\t\t\t); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst contentOnly = options !== undefined ? options.contentOnly : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, { writable: true, value: true, enumerable: true });\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, contentOnly);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`'\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content.indentStr;\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":["const","let","encode","this"],"mappings":";;;;AAAe,IAAM,MAAM,GAC1B,eAAW,CAAC,GAAG,EAAE;AAClB,CAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AAC3D,EAAC;AACF;iBACC,oBAAI,CAAC,EAAE;AACR,CAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACpC,EAAC;AACF;iBACC,oBAAI,CAAC,EAAE;AACR,CAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAChD;;ACXc,IAAM,KAAK,GACzB,cAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC,CAAE,IAAI,CAAC,KAAK,G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AAC9B,EAAG,IAAI,CAAC,MAAM,EAAE;AAChB,GAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5C,GAAI,MAAM;AACV,GAAI;AACJ,EAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;AACA,CAAE,OAAO,IAAI,CAAC;AACb;;AC1RD,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;AAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"magic-string.cjs.js","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + '' \n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\t\treturn (str) => window.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\twhile (contentLineEnd >= 0) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null)\n\t\t\t\t\tthis.overwrite(\n\t\t\t\t\t\tmatch.index,\n\t\t\t\t\t\tmatch.index + match[0].length,\n\t\t\t\t\t\tgetReplacement(match, this.original),\n\t\t\t\t\t);\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null)\n\t\t\t\tthis.overwrite(\n\t\t\t\t\tmatch.index,\n\t\t\t\t\tmatch.index + match[0].length,\n\t\t\t\t\tgetReplacement(match, this.original),\n\t\t\t\t);\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tthis.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":["encode"],"mappings":";;;;AAAe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;AAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AAC5D,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACrC,EAAE;AACF;AACA,CAAC,GAAG,CAAC,CAAC,EAAE;AACR,EAAE,OAAO,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AE;AACnB,GAAG,IAAI,MAAM,CAAC;AACd,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AACb;AACA,GAAG,GAAG;AACN,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,KAAK,MAAM;AACX,KAAK;AACL,IAAI,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;AACxD,GAAG;AACH;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;AACA,CAAC,OAAO,CAAC,QAAQ,EAAE;AACnB,EAAE,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC;AACpD;AACA,EAAE,IAAI,MAAM,CAAC;AACb,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC;AACA,EAAE,GAAG;AACL,GAAG,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9B,GAAG,IAAI,CAAC,MAAM,EAAE;AAChB,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5C,IAAI,MAAM;AACV,IAAI;AACJ,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;;ACpSA,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;AAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/magic-string/dist/magic-string.es.d.mts b/node_modules/magic-string/dist/magic-string.es.d.mts new file mode 100644 index 00000000..42c0ec23 --- /dev/null +++ b/node_modules/magic-string/dist/magic-string.es.d.mts @@ -0,0 +1,264 @@ +export interface BundleOptions { + intro?: string; + separator?: string; +} + +export interface SourceMapOptions { + /** + * Whether the mapping should be high-resolution. + * Hi-res mappings map every single character, meaning (for example) your devtools will always + * be able to pinpoint the exact location of function calls and so on. + * With lo-res mappings, devtools may only be able to identify the correct + * line - but they're quicker to generate and less bulky. + * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary + * instead of per character, suitable for string semantics that are separated by words. + * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here. + */ + hires?: boolean | 'boundary'; + /** + * The filename where you plan to write the sourcemap. + */ + file?: string; + /** + * The filename of the file containing the original source. + */ + source?: string; + /** + * Whether to include the original content in the map's sourcesContent array. + */ + includeContent?: boolean; +} + +export type SourceMapSegment = + | [number] + | [number, number, number, number] + | [number, number, number, number, number]; + +export interface DecodedSourceMap { + file: string; + sources: string[]; + sourcesContent?: string[]; + names: string[]; + mappings: SourceMapSegment[][]; + x_google_ignoreList?: number[]; +} + +export class SourceMap { + constructor(properties: DecodedSourceMap); + + version: number; + file: string; + sources: string[]; + sourcesContent?: string[]; + names: string[]; + mappings: string; + x_google_ignoreList?: number[]; + + /** + * Returns the equivalent of `JSON.stringify(map)` + */ + toString(): string; + /** + * Returns a DataURI containing the sourcemap. Useful for doing this sort of thing: + * `generateMap(options?: SourceMapOptions): SourceMap;` + */ + toUrl(): string; +} + +export class Bundle { + constructor(options?: BundleOptions); + /** + * Adds the specified source to the bundle, which can either be a `MagicString` object directly, + * or an options object that holds a magic string `content` property and optionally provides + * a `filename` for the source within the bundle, as well as an optional `ignoreList` hint + * (which defaults to `false`). The `filename` is used when constructing the source map for the + * bundle, to identify this `source` in the source map's `sources` field. The `ignoreList` hint + * is used to populate the `x_google_ignoreList` extension field in the source map, which is a + * mechanism for tools to signal to debuggers that certain sources should be ignored by default + * (depending on user preferences). + */ + addSource(source: MagicString | { filename?: string, content: MagicString, ignoreList?: boolean }): Bundle; + append(str: string, options?: BundleOptions): Bundle; + clone(): Bundle; + generateMap(options?: SourceMapOptions): Omit<SourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> }; + generateDecodedMap(options?: SourceMapOptions): Omit<DecodedSourceMap, 'sourcesContent'> & { sourcesContent: Array<string | null> }; + getIndentString(): string; + indent(indentStr?: string): Bundle; + indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; + prepend(str: string): Bundle; + toString(): string; + trimLines(): Bundle; + trim(charType?: string): Bundle; + trimStart(charType?: string): Bundle; + trimEnd(charType?: string): Bundle; + isEmpty(): boolean; + length(): number; +} + +export type ExclusionRange = [ number, number ]; + +export interface MagicStringOptions { + filename?: string, + indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>; +} + +export interface IndentOptions { + exclude?: ExclusionRange | Array<ExclusionRange>; + indentStart?: boolean; +} + +export interface OverwriteOptions { + storeName?: boolean; + contentOnly?: boolean; +} + +export interface UpdateOptions { + storeName?: boolean; + overwrite?: boolean; +} + +export default class MagicString { + constructor(str: string, options?: MagicStringOptions); + /** + * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false. + */ + addSourcemapLocation(char: number): void; + /** + * Appends the specified content to the end of the string. + */ + append(content: string): MagicString; + /** + * Appends the specified content at the index in the original string. + * If a range *ending* with index is subsequently moved, the insert will be moved with it. + * See also `s.prependLeft(...)`. + */ + appendLeft(index: number, content: string): MagicString; + /** + * Appends the specified content at the index in the original string. + * If a range *starting* with index is subsequently moved, the insert will be moved with it. + * See also `s.prependRight(...)`. + */ + appendRight(index: number, content: string): MagicString; + /** + * Does what you'd expect. + */ + clone(): MagicString; + /** + * Generates a version 3 sourcemap. + */ + generateMap(options?: SourceMapOptions): SourceMap; + /** + * Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. + * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead. + */ + generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap; + getIndentString(): string; + + /** + * Prefixes each line of the string with prefix. + * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. + */ + indent(options?: IndentOptions): MagicString; + /** + * Prefixes each line of the string with prefix. + * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. + * + * The options argument can have an exclude property, which is an array of [start, end] character ranges. + * These ranges will be excluded from the indentation - useful for (e.g.) multiline strings. + */ + indent(indentStr?: string, options?: IndentOptions): MagicString; + indentExclusionRanges: ExclusionRange | Array<ExclusionRange>; + + /** + * Moves the characters from `start and `end` to `index`. + */ + move(start: number, end: number, index: number): MagicString; + /** + * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in + * that range. The same restrictions as `s.remove()` apply. + * + * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored + * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only + * the content is overwritten, or anything that was appended/prepended to the range as well. + * + * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content. + */ + overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): MagicString; + /** + * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. + * + * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored + * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only + * the content is overwritten, or anything that was appended/prepended to the range as well. + */ + update(start: number, end: number, content: string, options?: boolean | UpdateOptions): MagicString; + /** + * Prepends the string with the specified content. + */ + prepend(content: string): MagicString; + /** + * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index + */ + prependLeft(index: number, content: string): MagicString; + /** + * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index` + */ + prependRight(index: number, content: string): MagicString; + /** + * Removes the characters from `start` to `end` (of the original string, **not** the generated string). + * Removing the same content twice, or making removals that partially overlap, will cause an error. + */ + remove(start: number, end: number): MagicString; + /** + * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. + * Throws error if the indices are for characters that were already removed. + */ + slice(start: number, end: number): string; + /** + * Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed. + */ + snip(start: number, end: number): MagicString; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. + */ + trim(charType?: string): MagicString; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. + */ + trimStart(charType?: string): MagicString; + /** + * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. + */ + trimEnd(charType?: string): MagicString; + /** + * Removes empty lines from the start and end. + */ + trimLines(): MagicString; + /** + * String replacement with RegExp or string. + */ + replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString; + /** + * Same as `s.replace`, but replace all matched strings instead of just one. + */ + replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): MagicString; + + lastChar(): string; + lastLine(): string; + /** + * Returns true if the resulting source is empty (disregarding white space). + */ + isEmpty(): boolean; + length(): number; + + /** + * Indicates if the string has been changed. + */ + hasChanged(): boolean; + + original: string; + /** + * Returns the generated string. + */ + toString(): string; +} diff --git a/node_modules/magic-string/dist/magic-string.es.js b/node_modules/magic-string/dist/magic-string.es.js deleted file mode 100644 index f6b409a6..00000000 --- a/node_modules/magic-string/dist/magic-string.es.js +++ /dev/null @@ -1,1305 +0,0 @@ -import { encode } from 'sourcemap-codec'; - -var BitSet = function BitSet(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; -}; - -BitSet.prototype.add = function add (n) { - this.bits[n >> 5] |= 1 << (n & 31); -}; - -BitSet.prototype.has = function has (n) { - return !!(this.bits[n >> 5] & (1 << (n & 31))); -}; - -var Chunk = function Chunk(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - // we make these non-enumerable, for sanity while debugging - Object.defineProperties(this, { - previous: { writable: true, value: null }, - next: { writable: true, value: null }, - }); -}; - -Chunk.prototype.appendLeft = function appendLeft (content) { - this.outro += content; -}; - -Chunk.prototype.appendRight = function appendRight (content) { - this.intro = this.intro + content; -}; - -Chunk.prototype.clone = function clone () { - var chunk = new Chunk(this.start, this.end, this.original); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; -}; - -Chunk.prototype.contains = function contains (index) { - return this.start < index && index < this.end; -}; - -Chunk.prototype.eachNext = function eachNext (fn) { - var chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; - } -}; - -Chunk.prototype.eachPrevious = function eachPrevious (fn) { - var chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; - } -}; - -Chunk.prototype.edit = function edit (content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { - this.intro = ''; - this.outro = ''; - } - this.storeName = storeName; - - this.edited = true; - - return this; -}; - -Chunk.prototype.prependLeft = function prependLeft (content) { - this.outro = content + this.outro; -}; - -Chunk.prototype.prependRight = function prependRight (content) { - this.intro = content + this.intro; -}; - -Chunk.prototype.split = function split (index) { - var sliceIndex = index - this.start; - - var originalBefore = this.original.slice(0, sliceIndex); - var originalAfter = this.original.slice(sliceIndex); - - this.original = originalBefore; - - var newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if (this.edited) { - // TODO is this block necessary?... - newChunk.edit('', false); - this.content = ''; - } else { - this.content = originalBefore; - } - - newChunk.next = this.next; - if (newChunk.next) { newChunk.next.previous = newChunk; } - newChunk.previous = this; - this.next = newChunk; - - return newChunk; -}; - -Chunk.prototype.toString = function toString () { - return this.intro + this.content + this.outro; -}; - -Chunk.prototype.trimEnd = function trimEnd (rx) { - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - - var trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit('', undefined, true); - } - return true; - } else { - this.edit('', undefined, true); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - } -}; - -Chunk.prototype.trimStart = function trimStart (rx) { - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - - var trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.end - trimmed.length); - this.edit('', undefined, true); - } - return true; - } else { - this.edit('', undefined, true); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - } -}; - -var btoa = function () { - throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); -}; -if (typeof window !== 'undefined' && typeof window.btoa === 'function') { - btoa = function (str) { return window.btoa(unescape(encodeURIComponent(str))); }; -} else if (typeof Buffer === 'function') { - btoa = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); }; -} - -var SourceMap = function SourceMap(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = encode(properties.mappings); -}; - -SourceMap.prototype.toString = function toString () { - return JSON.stringify(this); -}; - -SourceMap.prototype.toUrl = function toUrl () { - return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); -}; - -function guessIndent(code) { - var lines = code.split('\n'); - - var tabbed = lines.filter(function (line) { return /^\t+/.test(line); }); - var spaced = lines.filter(function (line) { return /^ {2,}/.test(line); }); - - if (tabbed.length === 0 && spaced.length === 0) { - return null; - } - - // More lines tabbed than spaced? Assume tabs, and - // default to tabs in the case of a tie (or nothing - // to go on) - if (tabbed.length >= spaced.length) { - return '\t'; - } - - // Otherwise, we need to guess the multiple - var min = spaced.reduce(function (previous, current) { - var numSpaces = /^ +/.exec(current)[0].length; - return Math.min(numSpaces, previous); - }, Infinity); - - return new Array(min + 1).join(' '); -} - -function getRelativePath(from, to) { - var fromParts = from.split(/[/\\]/); - var toParts = to.split(/[/\\]/); - - fromParts.pop(); // get dirname - - while (fromParts[0] === toParts[0]) { - fromParts.shift(); - toParts.shift(); - } - - if (fromParts.length) { - var i = fromParts.length; - while (i--) { fromParts[i] = '..'; } - } - - return fromParts.concat(toParts).join('/'); -} - -var toString = Object.prototype.toString; - -function isObject(thing) { - return toString.call(thing) === '[object Object]'; -} - -function getLocator(source) { - var originalLines = source.split('\n'); - var lineOffsets = []; - - for (var i = 0, pos = 0; i < originalLines.length; i++) { - lineOffsets.push(pos); - pos += originalLines[i].length + 1; - } - - return function locate(index) { - var i = 0; - var j = lineOffsets.length; - while (i < j) { - var m = (i + j) >> 1; - if (index < lineOffsets[m]) { - j = m; - } else { - i = m + 1; - } - } - var line = i - 1; - var column = index - lineOffsets[line]; - return { line: line, column: column }; - }; -} - -var Mappings = function Mappings(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; -}; - -Mappings.prototype.addEdit = function addEdit (sourceIndex, content, loc, nameIndex) { - if (content.length) { - var segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - } else if (this.pending) { - this.rawSegments.push(this.pending); - } - - this.advance(content); - this.pending = null; -}; - -Mappings.prototype.addUneditedChunk = function addUneditedChunk (sourceIndex, chunk, original, loc, sourcemapLocations) { - var originalCharIndex = chunk.start; - var first = true; - - while (originalCharIndex < chunk.end) { - if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { - this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]); - } - - if (original[originalCharIndex] === '\n') { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first = true; - } else { - loc.column += 1; - this.generatedCodeColumn += 1; - first = false; - } - - originalCharIndex += 1; - } - - this.pending = null; -}; - -Mappings.prototype.advance = function advance (str) { - if (!str) { return; } - - var lines = str.split('\n'); - - if (lines.length > 1) { - for (var i = 0; i < lines.length - 1; i++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } - this.generatedCodeColumn = 0; - } - - this.generatedCodeColumn += lines[lines.length - 1].length; -}; - -var n = '\n'; - -var warned = { - insertLeft: false, - insertRight: false, - storeName: false, -}; - -var MagicString = function MagicString(string, options) { - if ( options === void 0 ) options = {}; - - var chunk = new Chunk(0, string.length, string); - - Object.defineProperties(this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: new BitSet() }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: guessIndent(string) }, - }); - - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; -}; - -MagicString.prototype.addSourcemapLocation = function addSourcemapLocation (char) { - this.sourcemapLocations.add(char); -}; - -MagicString.prototype.append = function append (content) { - if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); } - - this.outro += content; - return this; -}; - -MagicString.prototype.appendLeft = function appendLeft (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byEnd[index]; - - if (chunk) { - chunk.appendLeft(content); - } else { - this.intro += content; - } - return this; -}; - -MagicString.prototype.appendRight = function appendRight (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byStart[index]; - - if (chunk) { - chunk.appendRight(content); - } else { - this.outro += content; - } - return this; -}; - -MagicString.prototype.clone = function clone () { - var cloned = new MagicString(this.original, { filename: this.filename }); - - var originalChunk = this.firstChunk; - var clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); - - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - - var nextOriginalChunk = originalChunk.next; - var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if (this.indentExclusionRanges) { - cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - } - - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - - cloned.intro = this.intro; - cloned.outro = this.outro; - - return cloned; -}; - -MagicString.prototype.generateDecodedMap = function generateDecodedMap (options) { - var this$1$1 = this; - - options = options || {}; - - var sourceIndex = 0; - var names = Object.keys(this.storedNames); - var mappings = new Mappings(options.hires); - - var locate = getLocator(this.original); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.firstChunk.eachNext(function (chunk) { - var loc = locate(chunk.start); - - if (chunk.intro.length) { mappings.advance(chunk.intro); } - - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1 - ); - } else { - mappings.addUneditedChunk(sourceIndex, chunk, this$1$1.original, loc, this$1$1.sourcemapLocations); - } - - if (chunk.outro.length) { mappings.advance(chunk.outro); } - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : null, - sources: [options.source ? getRelativePath(options.file || '', options.source) : null], - sourcesContent: options.includeContent ? [this.original] : [null], - names: names, - mappings: mappings.raw, - }; -}; - -MagicString.prototype.generateMap = function generateMap (options) { - return new SourceMap(this.generateDecodedMap(options)); -}; - -MagicString.prototype.getIndentString = function getIndentString () { - return this.indentStr === null ? '\t' : this.indentStr; -}; - -MagicString.prototype.indent = function indent (indentStr, options) { - var pattern = /^[^\r\n]/gm; - - if (isObject(indentStr)) { - options = indentStr; - indentStr = undefined; - } - - indentStr = indentStr !== undefined ? indentStr : this.indentStr || '\t'; - - if (indentStr === '') { return this; } // noop - - options = options || {}; - - // Process exclusion ranges - var isExcluded = {}; - - if (options.exclude) { - var exclusions = - typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; - exclusions.forEach(function (exclusion) { - for (var i = exclusion[0]; i < exclusion[1]; i += 1) { - isExcluded[i] = true; - } - }); - } - - var shouldIndentNextCharacter = options.indentStart !== false; - var replacer = function (match) { - if (shouldIndentNextCharacter) { return ("" + indentStr + match); } - shouldIndentNextCharacter = true; - return match; - }; - - this.intro = this.intro.replace(pattern, replacer); - - var charIndex = 0; - var chunk = this.firstChunk; - - while (chunk) { - var end = chunk.end; - - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); - - if (chunk.content.length) { - shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; - } - } - } else { - charIndex = chunk.start; - - while (charIndex < end) { - if (!isExcluded[charIndex]) { - var char = this.original[charIndex]; - - if (char === '\n') { - shouldIndentNextCharacter = true; - } else if (char !== '\r' && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - - if (charIndex === chunk.start) { - chunk.prependRight(indentStr); - } else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } - } - } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace(pattern, replacer); - - return this; -}; - -MagicString.prototype.insert = function insert () { - throw new Error( - 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)' - ); -}; - -MagicString.prototype.insertLeft = function insertLeft (index, content) { - if (!warned.insertLeft) { - console.warn( - 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead' - ); // eslint-disable-line no-console - warned.insertLeft = true; - } - - return this.appendLeft(index, content); -}; - -MagicString.prototype.insertRight = function insertRight (index, content) { - if (!warned.insertRight) { - console.warn( - 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead' - ); // eslint-disable-line no-console - warned.insertRight = true; - } - - return this.prependRight(index, content); -}; - -MagicString.prototype.move = function move (start, end, index) { - if (index >= start && index <= end) { throw new Error('Cannot move a selection inside itself'); } - - this._split(start); - this._split(end); - this._split(index); - - var first = this.byStart[start]; - var last = this.byEnd[end]; - - var oldLeft = first.previous; - var oldRight = last.next; - - var newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) { return this; } - var newLeft = newRight ? newRight.previous : this.lastChunk; - - if (oldLeft) { oldLeft.next = oldRight; } - if (oldRight) { oldRight.previous = oldLeft; } - - if (newLeft) { newLeft.next = first; } - if (newRight) { newRight.previous = last; } - - if (!first.previous) { this.firstChunk = last.next; } - if (!last.next) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight || null; - - if (!newLeft) { this.firstChunk = first; } - if (!newRight) { this.lastChunk = last; } - return this; -}; - -MagicString.prototype.overwrite = function overwrite (start, end, content, options) { - if (typeof content !== 'string') { throw new TypeError('replacement content must be a string'); } - - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - if (end > this.original.length) { throw new Error('end is out of bounds'); } - if (start === end) - { throw new Error( - 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead' - ); } - - this._split(start); - this._split(end); - - if (options === true) { - if (!warned.storeName) { - console.warn( - 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string' - ); // eslint-disable-line no-console - warned.storeName = true; - } - - options = { storeName: true }; - } - var storeName = options !== undefined ? options.storeName : false; - var contentOnly = options !== undefined ? options.contentOnly : false; - - if (storeName) { - var original = this.original.slice(start, end); - Object.defineProperty(this.storedNames, original, { writable: true, value: true, enumerable: true }); - } - - var first = this.byStart[start]; - var last = this.byEnd[end]; - - if (first) { - var chunk = first; - while (chunk !== last) { - if (chunk.next !== this.byStart[chunk.end]) { - throw new Error('Cannot overwrite across a split point'); - } - chunk = chunk.next; - chunk.edit('', false); - } - - first.edit(content, storeName, contentOnly); - } else { - // must be inserting at the end - var newChunk = new Chunk(start, end, '').edit(content, storeName); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - return this; -}; - -MagicString.prototype.prepend = function prepend (content) { - if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); } - - this.intro = content + this.intro; - return this; -}; - -MagicString.prototype.prependLeft = function prependLeft (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byEnd[index]; - - if (chunk) { - chunk.prependLeft(content); - } else { - this.intro = content + this.intro; - } - return this; -}; - -MagicString.prototype.prependRight = function prependRight (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byStart[index]; - - if (chunk) { - chunk.prependRight(content); - } else { - this.outro = content + this.outro; - } - return this; -}; - -MagicString.prototype.remove = function remove (start, end) { - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - if (start === end) { return this; } - - if (start < 0 || end > this.original.length) { throw new Error('Character is out of bounds'); } - if (start > end) { throw new Error('end must be greater than start'); } - - this._split(start); - this._split(end); - - var chunk = this.byStart[start]; - - while (chunk) { - chunk.intro = ''; - chunk.outro = ''; - chunk.edit(''); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; -}; - -MagicString.prototype.lastChar = function lastChar () { - if (this.outro.length) { return this.outro[this.outro.length - 1]; } - var chunk = this.lastChunk; - do { - if (chunk.outro.length) { return chunk.outro[chunk.outro.length - 1]; } - if (chunk.content.length) { return chunk.content[chunk.content.length - 1]; } - if (chunk.intro.length) { return chunk.intro[chunk.intro.length - 1]; } - } while ((chunk = chunk.previous)); - if (this.intro.length) { return this.intro[this.intro.length - 1]; } - return ''; -}; - -MagicString.prototype.lastLine = function lastLine () { - var lineIndex = this.outro.lastIndexOf(n); - if (lineIndex !== -1) { return this.outro.substr(lineIndex + 1); } - var lineStr = this.outro; - var chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.outro.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.outro + lineStr; - } - - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.content.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.content + lineStr; - } - - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.intro.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.intro + lineStr; - } - } while ((chunk = chunk.previous)); - lineIndex = this.intro.lastIndexOf(n); - if (lineIndex !== -1) { return this.intro.substr(lineIndex + 1) + lineStr; } - return this.intro + lineStr; -}; - -MagicString.prototype.slice = function slice (start, end) { - if ( start === void 0 ) start = 0; - if ( end === void 0 ) end = this.original.length; - - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - var result = ''; - - // find start chunk - var chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - // found end chunk before start - if (chunk.start < end && chunk.end >= end) { - return result; - } - - chunk = chunk.next; - } - - if (chunk && chunk.edited && chunk.start !== start) - { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); } - - var startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { - result += chunk.intro; - } - - var containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) - { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); } - - var sliceStart = startChunk === chunk ? start - chunk.start : 0; - var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice(sliceStart, sliceEnd); - - if (chunk.outro && (!containsEnd || chunk.end === end)) { - result += chunk.outro; - } - - if (containsEnd) { - break; - } - - chunk = chunk.next; - } - - return result; -}; - -// TODO deprecate this? not really very useful -MagicString.prototype.snip = function snip (start, end) { - var clone = this.clone(); - clone.remove(0, start); - clone.remove(end, clone.original.length); - - return clone; -}; - -MagicString.prototype._split = function _split (index) { - if (this.byStart[index] || this.byEnd[index]) { return; } - - var chunk = this.lastSearchedChunk; - var searchForward = index > chunk.end; - - while (chunk) { - if (chunk.contains(index)) { return this._splitChunk(chunk, index); } - - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - } -}; - -MagicString.prototype._splitChunk = function _splitChunk (chunk, index) { - if (chunk.edited && chunk.content.length) { - // zero-length edited chunks are a special case (overlapping replacements) - var loc = getLocator(this.original)(index); - throw new Error( - ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")") - ); - } - - var newChunk = chunk.split(index); - - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - - if (chunk === this.lastChunk) { this.lastChunk = newChunk; } - - this.lastSearchedChunk = chunk; - return true; -}; - -MagicString.prototype.toString = function toString () { - var str = this.intro; - - var chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; -}; - -MagicString.prototype.isEmpty = function isEmpty () { - var chunk = this.firstChunk; - do { - if ( - (chunk.intro.length && chunk.intro.trim()) || - (chunk.content.length && chunk.content.trim()) || - (chunk.outro.length && chunk.outro.trim()) - ) - { return false; } - } while ((chunk = chunk.next)); - return true; -}; - -MagicString.prototype.length = function length () { - var chunk = this.firstChunk; - var length = 0; - do { - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - } while ((chunk = chunk.next)); - return length; -}; - -MagicString.prototype.trimLines = function trimLines () { - return this.trim('[\\r\\n]'); -}; - -MagicString.prototype.trim = function trim (charType) { - return this.trimStart(charType).trimEnd(charType); -}; - -MagicString.prototype.trimEndAborted = function trimEndAborted (charType) { - var rx = new RegExp((charType || '\\s') + '+$'); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - - var chunk = this.lastChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimEnd(rx); - - // if chunk was trimmed, we have a new lastChunk - if (chunk.end !== end) { - if (this.lastChunk === chunk) { - this.lastChunk = chunk.next; - } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) { return true; } - chunk = chunk.previous; - } while (chunk); - - return false; -}; - -MagicString.prototype.trimEnd = function trimEnd (charType) { - this.trimEndAborted(charType); - return this; -}; -MagicString.prototype.trimStartAborted = function trimStartAborted (charType) { - var rx = new RegExp('^' + (charType || '\\s') + '+'); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - - var chunk = this.firstChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimStart(rx); - - if (chunk.end !== end) { - // special case... - if (chunk === this.lastChunk) { this.lastChunk = chunk.next; } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) { return true; } - chunk = chunk.next; - } while (chunk); - - return false; -}; - -MagicString.prototype.trimStart = function trimStart (charType) { - this.trimStartAborted(charType); - return this; -}; - -var hasOwnProp = Object.prototype.hasOwnProperty; - -var Bundle = function Bundle(options) { - if ( options === void 0 ) options = {}; - - this.intro = options.intro || ''; - this.separator = options.separator !== undefined ? options.separator : '\n'; - this.sources = []; - this.uniqueSources = []; - this.uniqueSourceIndexByFilename = {}; -}; - -Bundle.prototype.addSource = function addSource (source) { - if (source instanceof MagicString) { - return this.addSource({ - content: source, - filename: source.filename, - separator: this.separator, - }); - } - - if (!isObject(source) || !source.content) { - throw new Error( - 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' - ); - } - - ['filename', 'indentExclusionRanges', 'separator'].forEach(function (option) { - if (!hasOwnProp.call(source, option)) { source[option] = source.content[option]; } - }); - - if (source.separator === undefined) { - // TODO there's a bunch of this sort of thing, needs cleaning up - source.separator = this.separator; - } - - if (source.filename) { - if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { - this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; - this.uniqueSources.push({ filename: source.filename, content: source.content.original }); - } else { - var uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; - if (source.content.original !== uniqueSource.content) { - throw new Error(("Illegal source: same filename (" + (source.filename) + "), different contents")); - } - } - } - - this.sources.push(source); - return this; -}; - -Bundle.prototype.append = function append (str, options) { - this.addSource({ - content: new MagicString(str), - separator: (options && options.separator) || '', - }); - - return this; -}; - -Bundle.prototype.clone = function clone () { - var bundle = new Bundle({ - intro: this.intro, - separator: this.separator, - }); - - this.sources.forEach(function (source) { - bundle.addSource({ - filename: source.filename, - content: source.content.clone(), - separator: source.separator, - }); - }); - - return bundle; -}; - -Bundle.prototype.generateDecodedMap = function generateDecodedMap (options) { - var this$1$1 = this; - if ( options === void 0 ) options = {}; - - var names = []; - this.sources.forEach(function (source) { - Object.keys(source.content.storedNames).forEach(function (name) { - if (!~names.indexOf(name)) { names.push(name); } - }); - }); - - var mappings = new Mappings(options.hires); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.sources.forEach(function (source, i) { - if (i > 0) { - mappings.advance(this$1$1.separator); - } - - var sourceIndex = source.filename ? this$1$1.uniqueSourceIndexByFilename[source.filename] : -1; - var magicString = source.content; - var locate = getLocator(magicString.original); - - if (magicString.intro) { - mappings.advance(magicString.intro); - } - - magicString.firstChunk.eachNext(function (chunk) { - var loc = locate(chunk.start); - - if (chunk.intro.length) { mappings.advance(chunk.intro); } - - if (source.filename) { - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1 - ); - } else { - mappings.addUneditedChunk( - sourceIndex, - chunk, - magicString.original, - loc, - magicString.sourcemapLocations - ); - } - } else { - mappings.advance(chunk.content); - } - - if (chunk.outro.length) { mappings.advance(chunk.outro); } - }); - - if (magicString.outro) { - mappings.advance(magicString.outro); - } - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : null, - sources: this.uniqueSources.map(function (source) { - return options.file ? getRelativePath(options.file, source.filename) : source.filename; - }), - sourcesContent: this.uniqueSources.map(function (source) { - return options.includeContent ? source.content : null; - }), - names: names, - mappings: mappings.raw, - }; -}; - -Bundle.prototype.generateMap = function generateMap (options) { - return new SourceMap(this.generateDecodedMap(options)); -}; - -Bundle.prototype.getIndentString = function getIndentString () { - var indentStringCounts = {}; - - this.sources.forEach(function (source) { - var indentStr = source.content.indentStr; - - if (indentStr === null) { return; } - - if (!indentStringCounts[indentStr]) { indentStringCounts[indentStr] = 0; } - indentStringCounts[indentStr] += 1; - }); - - return ( - Object.keys(indentStringCounts).sort(function (a, b) { - return indentStringCounts[a] - indentStringCounts[b]; - })[0] || '\t' - ); -}; - -Bundle.prototype.indent = function indent (indentStr) { - var this$1$1 = this; - - if (!arguments.length) { - indentStr = this.getIndentString(); - } - - if (indentStr === '') { return this; } // noop - - var trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; - - this.sources.forEach(function (source, i) { - var separator = source.separator !== undefined ? source.separator : this$1$1.separator; - var indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); - - source.content.indent(indentStr, { - exclude: source.indentExclusionRanges, - indentStart: indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) - }); - - trailingNewline = source.content.lastChar() === '\n'; - }); - - if (this.intro) { - this.intro = - indentStr + - this.intro.replace(/^[^\n]/gm, function (match, index) { - return index > 0 ? indentStr + match : match; - }); - } - - return this; -}; - -Bundle.prototype.prepend = function prepend (str) { - this.intro = str + this.intro; - return this; -}; - -Bundle.prototype.toString = function toString () { - var this$1$1 = this; - - var body = this.sources - .map(function (source, i) { - var separator = source.separator !== undefined ? source.separator : this$1$1.separator; - var str = (i > 0 ? separator : '') + source.content.toString(); - - return str; - }) - .join(''); - - return this.intro + body; -}; - -Bundle.prototype.isEmpty = function isEmpty () { - if (this.intro.length && this.intro.trim()) { return false; } - if (this.sources.some(function (source) { return !source.content.isEmpty(); })) { return false; } - return true; -}; - -Bundle.prototype.length = function length () { - return this.sources.reduce( - function (length, source) { return length + source.content.length(); }, - this.intro.length - ); -}; - -Bundle.prototype.trimLines = function trimLines () { - return this.trim('[\\r\\n]'); -}; - -Bundle.prototype.trim = function trim (charType) { - return this.trimStart(charType).trimEnd(charType); -}; - -Bundle.prototype.trimStart = function trimStart (charType) { - var rx = new RegExp('^' + (charType || '\\s') + '+'); - this.intro = this.intro.replace(rx, ''); - - if (!this.intro) { - var source; - var i = 0; - - do { - source = this.sources[i++]; - if (!source) { - break; - } - } while (!source.content.trimStartAborted(charType)); - } - - return this; -}; - -Bundle.prototype.trimEnd = function trimEnd (charType) { - var rx = new RegExp((charType || '\\s') + '+$'); - - var source; - var i = this.sources.length - 1; - - do { - source = this.sources[i--]; - if (!source) { - this.intro = this.intro.replace(rx, ''); - break; - } - } while (!source.content.trimEndAborted(charType)); - - return this; -}; - -export { Bundle, SourceMap, MagicString as default }; -//# sourceMappingURL=magic-string.es.js.map diff --git a/node_modules/magic-string/dist/magic-string.es.js.map b/node_modules/magic-string/dist/magic-string.es.js.map deleted file mode 100644 index 4624dd8f..00000000 --- a/node_modules/magic-string/dist/magic-string.es.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"magic-string.es.js","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t// we make these non-enumerable, for sanity while debugging\n\t\tObject.defineProperties(this, {\n\t\t\tprevious: { writable: true, value: null },\n\t\t\tnext: { writable: true, value: null },\n\t\t});\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.end - trimmed.length);\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from 'sourcemap-codec';\n\nlet btoa = () => {\n\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n};\nif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\tbtoa = (str) => window.btoa(unescape(encodeURIComponent(str)));\n} else if (typeof Buffer === 'function') {\n\tbtoa = (str) => Buffer.from(str, 'utf-8').toString('base64');\n}\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","export default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t}\n\n\t\tthis.advance(content);\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tthis.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: guessIndent(string) },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: [options.source ? getRelativePath(options.file || '', options.source) : null],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : [null],\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tindentStr = indentStr !== undefined ? indentStr : this.indentStr || '\\t';\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)'\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead'\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'\n\t\t\t\t); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst contentOnly = options !== undefined ? options.contentOnly : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, { writable: true, value: true, enumerable: true });\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, contentOnly);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`'\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content.indentStr;\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n"],"names":["const","let","this"],"mappings":";;AAAe,IAAM,MAAM,GAC1B,eAAW,CAAC,GAAG,EAAE;AAClB,CAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;AAC3D,EAAC;AACF;iBACC,oBAAI,CAAC,EAAE;AACR,CAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;AACpC,EAAC;AACF;iBACC,oBAAI,CAAC,EAAE;AACR,CAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAChD;;ACXc,IAAM,KAAK,GACzB,cAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;AAClC,CAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACrB,CAAE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;AACjB,CAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;AAC1B;AACA,CAAE,IAA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AAI,MAAM;AACV,GAAI;AACJ,EAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;AACA,CAAE,OAAO,IAAI,CAAC;AACb;;;;"} \ No newline at end of file diff --git a/node_modules/magic-string/dist/magic-string.es.mjs b/node_modules/magic-string/dist/magic-string.es.mjs new file mode 100644 index 00000000..f00760d5 --- /dev/null +++ b/node_modules/magic-string/dist/magic-string.es.mjs @@ -0,0 +1,1496 @@ +import { encode } from '@jridgewell/sourcemap-codec'; + +class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; + } + + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); + } + + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } +} + +class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + + this.intro = ''; + this.outro = ''; + + this.content = content; + this.storeName = false; + this.edited = false; + + { + this.previous = null; + this.next = null; + } + } + + appendLeft(content) { + this.outro += content; + } + + appendRight(content) { + this.intro = this.intro + content; + } + + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; + } + } + + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } +} + +function getBtoa() { + if (typeof window !== 'undefined' && typeof window.btoa === 'function') { + return (str) => window.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } +} + +const btoa = /*#__PURE__*/ getBtoa(); + +class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + } + + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); + } +} + +function guessIndent(code) { + const lines = code.split('\n'); + + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); + + if (tabbed.length === 0 && spaced.length === 0) { + return null; + } + + // More lines tabbed than spaced? Assume tabs, and + // default to tabs in the case of a tie (or nothing + // to go on) + if (tabbed.length >= spaced.length) { + return '\t'; + } + + // Otherwise, we need to guess the multiple + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; + return Math.min(numSpaces, previous); + }, Infinity); + + return new Array(min + 1).join(' '); +} + +function getRelativePath(from, to) { + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); + + fromParts.pop(); // get dirname + + while (fromParts[0] === toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + if (fromParts.length) { + let i = fromParts.length; + while (i--) fromParts[i] = '..'; + } + + return fromParts.concat(toParts).join('/'); +} + +const toString = Object.prototype.toString; + +function isObject(thing) { + return toString.call(thing) === '[object Object]'; +} + +function getLocator(source) { + const originalLines = source.split('\n'); + const lineOffsets = []; + + for (let i = 0, pos = 0; i < originalLines.length; i++) { + lineOffsets.push(pos); + pos += originalLines[i].length + 1; + } + + return function locate(index) { + let i = 0; + let j = lineOffsets.length; + while (i < j) { + const m = (i + j) >> 1; + if (index < lineOffsets[m]) { + j = m; + } else { + i = m + 1; + } + } + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; + }; +} + +const wordRegex = /\w/; + +class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; + this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; + } + + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + while (contentLineEnd >= 0) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + } else { + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } +} + +const n = '\n'; + +const warned = { + insertLeft: false, + insertRight: false, + storeName: false, +}; + +class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); + + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, + }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; + } + + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } + + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.outro += content; + return this; + } + + appendLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); + } else { + this.intro += content; + } + return this; + } + + appendRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { + if (!isExcluded[charIndex]) { + chunk.content = chunk.content.replace(pattern, replacer); + + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; + } + } + } else { + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } + } + + charIndex = chunk.end; + chunk = chunk.next; + } + + this.outro = this.outro.replace(pattern, replacer); + + return this; + } + + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } + + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); // eslint-disable-line no-console + warned.insertLeft = true; + } + + return this.appendLeft(index, content); + } + + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); // eslint-disable-line no-console + warned.insertRight = true; + } + + return this.prependRight(index, content); + } + + move(start, end, index) { + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); // eslint-disable-line no-console + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, + }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; + } + + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); + + this.intro = content + this.intro; + return this; + } + + prependLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } + + prependRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } + + remove(start, end) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + if (start === end) return this; + + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; + do { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { + break; + } + + chunk = chunk.next; + } + + return result; + } + + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); + + return clone; + } + + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; + + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; + } + } + + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) + this.overwrite( + match.index, + match.index + match[0].length, + getReplacement(match, this.original), + ); + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) + this.overwrite( + match.index, + match.index + match[0].length, + getReplacement(match, this.original), + ); + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } +} + +const hasOwnProp = Object.prototype.hasOwnProperty; + +class Bundle { + constructor(options = {}) { + this.intro = options.intro || ''; + this.separator = options.separator !== undefined ? options.separator : '\n'; + this.sources = []; + this.uniqueSources = []; + this.uniqueSourceIndexByFilename = {}; + } + + addSource(source) { + if (source instanceof MagicString) { + return this.addSource({ + content: source, + filename: source.filename, + separator: this.separator, + }); + } + + if (!isObject(source) || !source.content) { + throw new Error( + 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', + ); + } + + ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { + if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; + }); + + if (source.separator === undefined) { + // TODO there's a bunch of this sort of thing, needs cleaning up + source.separator = this.separator; + } + + if (source.filename) { + if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { + this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; + this.uniqueSources.push({ filename: source.filename, content: source.content.original }); + } else { + const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; + if (source.content.original !== uniqueSource.content) { + throw new Error(`Illegal source: same filename (${source.filename}), different contents`); + } + } + } + + this.sources.push(source); + return this; + } + + append(str, options) { + this.addSource({ + content: new MagicString(str), + separator: (options && options.separator) || '', + }); + + return this; + } + + clone() { + const bundle = new Bundle({ + intro: this.intro, + separator: this.separator, + }); + + this.sources.forEach((source) => { + bundle.addSource({ + filename: source.filename, + content: source.content.clone(), + separator: source.separator, + }); + }); + + return bundle; + } + + generateDecodedMap(options = {}) { + const names = []; + let x_google_ignoreList = undefined; + this.sources.forEach((source) => { + Object.keys(source.content.storedNames).forEach((name) => { + if (!~names.indexOf(name)) names.push(name); + }); + }); + + const mappings = new Mappings(options.hires); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.sources.forEach((source, i) => { + if (i > 0) { + mappings.advance(this.separator); + } + + const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; + const magicString = source.content; + const locate = getLocator(magicString.original); + + if (magicString.intro) { + mappings.advance(magicString.intro); + } + + magicString.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (source.filename) { + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk( + sourceIndex, + chunk, + magicString.original, + loc, + magicString.sourcemapLocations, + ); + } + } else { + mappings.advance(chunk.content); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + if (magicString.outro) { + mappings.advance(magicString.outro); + } + + if (source.ignoreList && sourceIndex !== -1) { + if (x_google_ignoreList === undefined) { + x_google_ignoreList = []; + } + x_google_ignoreList.push(sourceIndex); + } + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: this.uniqueSources.map((source) => { + return options.file ? getRelativePath(options.file, source.filename) : source.filename; + }), + sourcesContent: this.uniqueSources.map((source) => { + return options.includeContent ? source.content : null; + }), + names, + mappings: mappings.raw, + x_google_ignoreList, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + getIndentString() { + const indentStringCounts = {}; + + this.sources.forEach((source) => { + const indentStr = source.content._getRawIndentString(); + + if (indentStr === null) return; + + if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; + indentStringCounts[indentStr] += 1; + }); + + return ( + Object.keys(indentStringCounts).sort((a, b) => { + return indentStringCounts[a] - indentStringCounts[b]; + })[0] || '\t' + ); + } + + indent(indentStr) { + if (!arguments.length) { + indentStr = this.getIndentString(); + } + + if (indentStr === '') return this; // noop + + let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; + + this.sources.forEach((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); + + source.content.indent(indentStr, { + exclude: source.indentExclusionRanges, + indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) + }); + + trailingNewline = source.content.lastChar() === '\n'; + }); + + if (this.intro) { + this.intro = + indentStr + + this.intro.replace(/^[^\n]/gm, (match, index) => { + return index > 0 ? indentStr + match : match; + }); + } + + return this; + } + + prepend(str) { + this.intro = str + this.intro; + return this; + } + + toString() { + const body = this.sources + .map((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const str = (i > 0 ? separator : '') + source.content.toString(); + + return str; + }) + .join(''); + + return this.intro + body; + } + + isEmpty() { + if (this.intro.length && this.intro.trim()) return false; + if (this.sources.some((source) => !source.content.isEmpty())) return false; + return true; + } + + length() { + return this.sources.reduce( + (length, source) => length + source.content.length(), + this.intro.length, + ); + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimStart(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + this.intro = this.intro.replace(rx, ''); + + if (!this.intro) { + let source; + let i = 0; + + do { + source = this.sources[i++]; + if (!source) { + break; + } + } while (!source.content.trimStartAborted(charType)); + } + + return this; + } + + trimEnd(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + let source; + let i = this.sources.length - 1; + + do { + source = this.sources[i--]; + if (!source) { + this.intro = this.intro.replace(rx, ''); + break; + } + } while (!source.content.trimEndAborted(charType)); + + return this; + } +} + +export { Bundle, SourceMap, MagicString as default }; +//# sourceMappingURL=magic-string.es.mjs.map diff --git a/node_modules/magic-string/dist/magic-string.es.mjs.map b/node_modules/magic-string/dist/magic-string.es.mjs.map new file mode 100644 index 00000000..a35edf31 --- /dev/null +++ b/node_modules/magic-string/dist/magic-string.es.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"magic-string.es.mjs","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + '' \n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\t\treturn (str) => window.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\twhile (contentLineEnd >= 0) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null)\n\t\t\t\t\tthis.overwrite(\n\t\t\t\t\t\tmatch.index,\n\t\t\t\t\t\tmatch.index + match[0].length,\n\t\t\t\t\t\tgetReplacement(match, this.original),\n\t\t\t\t\t);\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null)\n\t\t\t\tthis.overwrite(\n\t\t\t\t\tmatch.index,\n\t\t\t\t\tmatch.index + match[0].length,\n\t\t\t\t\tgetReplacement(match, this.original),\n\t\t\t\t);\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tthis.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n"],"names":[],"mappings":";;AAAe,MAAM,MAAM,CAAC;AAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;AAClB,EAAE,IAAI,CAAC,IAA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AC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;AACA,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACF;;;;"} \ No newline at end of file diff --git a/node_modules/magic-string/dist/magic-string.umd.js b/node_modules/magic-string/dist/magic-string.umd.js index 573a4e1b..537337fb 100644 --- a/node_modules/magic-string/dist/magic-string.umd.js +++ b/node_modules/magic-string/dist/magic-string.umd.js @@ -4,258 +4,318 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.MagicString = factory()); })(this, (function () { 'use strict'; - var BitSet = function BitSet(arg) { - this.bits = arg instanceof BitSet ? arg.bits.slice() : []; - }; - - BitSet.prototype.add = function add (n) { - this.bits[n >> 5] |= 1 << (n & 31); - }; - - BitSet.prototype.has = function has (n) { - return !!(this.bits[n >> 5] & (1 << (n & 31))); - }; - - var Chunk = function Chunk(start, end, content) { - this.start = start; - this.end = end; - this.original = content; - - this.intro = ''; - this.outro = ''; - - this.content = content; - this.storeName = false; - this.edited = false; - - // we make these non-enumerable, for sanity while debugging - Object.defineProperties(this, { - previous: { writable: true, value: null }, - next: { writable: true, value: null }, - }); - }; - - Chunk.prototype.appendLeft = function appendLeft (content) { - this.outro += content; - }; - - Chunk.prototype.appendRight = function appendRight (content) { - this.intro = this.intro + content; - }; - - Chunk.prototype.clone = function clone () { - var chunk = new Chunk(this.start, this.end, this.original); - - chunk.intro = this.intro; - chunk.outro = this.outro; - chunk.content = this.content; - chunk.storeName = this.storeName; - chunk.edited = this.edited; - - return chunk; - }; - - Chunk.prototype.contains = function contains (index) { - return this.start < index && index < this.end; - }; - - Chunk.prototype.eachNext = function eachNext (fn) { - var chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.next; + class BitSet { + constructor(arg) { + this.bits = arg instanceof BitSet ? arg.bits.slice() : []; } - }; - Chunk.prototype.eachPrevious = function eachPrevious (fn) { - var chunk = this; - while (chunk) { - fn(chunk); - chunk = chunk.previous; + add(n) { + this.bits[n >> 5] |= 1 << (n & 31); } - }; - Chunk.prototype.edit = function edit (content, storeName, contentOnly) { - this.content = content; - if (!contentOnly) { + has(n) { + return !!(this.bits[n >> 5] & (1 << (n & 31))); + } + } + + class Chunk { + constructor(start, end, content) { + this.start = start; + this.end = end; + this.original = content; + this.intro = ''; this.outro = ''; - } - this.storeName = storeName; - this.edited = true; + this.content = content; + this.storeName = false; + this.edited = false; - return this; - }; - - Chunk.prototype.prependLeft = function prependLeft (content) { - this.outro = content + this.outro; - }; - - Chunk.prototype.prependRight = function prependRight (content) { - this.intro = content + this.intro; - }; - - Chunk.prototype.split = function split (index) { - var sliceIndex = index - this.start; - - var originalBefore = this.original.slice(0, sliceIndex); - var originalAfter = this.original.slice(sliceIndex); - - this.original = originalBefore; - - var newChunk = new Chunk(index, this.end, originalAfter); - newChunk.outro = this.outro; - this.outro = ''; - - this.end = index; - - if (this.edited) { - // TODO is this block necessary?... - newChunk.edit('', false); - this.content = ''; - } else { - this.content = originalBefore; - } - - newChunk.next = this.next; - if (newChunk.next) { newChunk.next.previous = newChunk; } - newChunk.previous = this; - this.next = newChunk; - - return newChunk; - }; - - Chunk.prototype.toString = function toString () { - return this.intro + this.content + this.outro; - }; - - Chunk.prototype.trimEnd = function trimEnd (rx) { - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - - var trimmed = this.content.replace(rx, ''); - - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.start + trimmed.length).edit('', undefined, true); + { + this.previous = null; + this.next = null; } - return true; - } else { - this.edit('', undefined, true); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } } - }; - Chunk.prototype.trimStart = function trimStart (rx) { - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } + appendLeft(content) { + this.outro += content; + } - var trimmed = this.content.replace(rx, ''); + appendRight(content) { + this.intro = this.intro + content; + } - if (trimmed.length) { - if (trimmed !== this.content) { - this.split(this.end - trimmed.length); - this.edit('', undefined, true); + clone() { + const chunk = new Chunk(this.start, this.end, this.original); + + chunk.intro = this.intro; + chunk.outro = this.outro; + chunk.content = this.content; + chunk.storeName = this.storeName; + chunk.edited = this.edited; + + return chunk; + } + + contains(index) { + return this.start < index && index < this.end; + } + + eachNext(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.next; } - return true; - } else { - this.edit('', undefined, true); + } + eachPrevious(fn) { + let chunk = this; + while (chunk) { + fn(chunk); + chunk = chunk.previous; + } + } + + edit(content, storeName, contentOnly) { + this.content = content; + if (!contentOnly) { + this.intro = ''; + this.outro = ''; + } + this.storeName = storeName; + + this.edited = true; + + return this; + } + + prependLeft(content) { + this.outro = content + this.outro; + } + + prependRight(content) { + this.intro = content + this.intro; + } + + split(index) { + const sliceIndex = index - this.start; + + const originalBefore = this.original.slice(0, sliceIndex); + const originalAfter = this.original.slice(sliceIndex); + + this.original = originalBefore; + + const newChunk = new Chunk(index, this.end, originalAfter); + newChunk.outro = this.outro; + this.outro = ''; + + this.end = index; + + if (this.edited) { + // after split we should save the edit content record into the correct chunk + // to make sure sourcemap correct + // For example: + // ' test'.trim() + // split -> ' ' + 'test' + // ✔️ edit -> '' + 'test' + // ✖️ edit -> 'test' + '' + // TODO is this block necessary?... + newChunk.edit('', false); + this.content = ''; + } else { + this.content = originalBefore; + } + + newChunk.next = this.next; + if (newChunk.next) newChunk.next.previous = newChunk; + newChunk.previous = this; + this.next = newChunk; + + return newChunk; + } + + toString() { + return this.intro + this.content + this.outro; + } + + trimEnd(rx) { this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - } - }; + if (this.outro.length) return true; - var charToInteger = {}; - var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - for (var i = 0; i < chars.length; i++) { - charToInteger[chars.charCodeAt(i)] = i; + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + this.split(this.start + trimmed.length).edit('', undefined, true); + if (this.edited) { + // save the change, if it has been edited + this.edit(trimmed, this.storeName, true); + } + } + return true; + } else { + this.edit('', undefined, true); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + } + } + + trimStart(rx) { + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + const trimmed = this.content.replace(rx, ''); + + if (trimmed.length) { + if (trimmed !== this.content) { + const newChunk = this.split(this.end - trimmed.length); + if (this.edited) { + // save the change, if it has been edited + newChunk.edit(trimmed, this.storeName, true); + } + this.edit('', undefined, true); + } + return true; + } else { + this.edit('', undefined, true); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + } + } } + + const comma = ','.charCodeAt(0); + const semicolon = ';'.charCodeAt(0); + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + const intToChar = new Uint8Array(64); // 64 possible chars. + const charToInt = new Uint8Array(128); // z is 122 in ASCII + for (let i = 0; i < chars.length; i++) { + const c = chars.charCodeAt(i); + intToChar[i] = c; + charToInt[c] = i; + } + // Provide a fallback for older environments. + const td = typeof TextDecoder !== 'undefined' + ? /* #__PURE__ */ new TextDecoder() + : typeof Buffer !== 'undefined' + ? { + decode(buf) { + const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); + return out.toString(); + }, + } + : { + decode(buf) { + let out = ''; + for (let i = 0; i < buf.length; i++) { + out += String.fromCharCode(buf[i]); + } + return out; + }, + }; function encode(decoded) { - var sourceFileIndex = 0; // second field - var sourceCodeLine = 0; // third field - var sourceCodeColumn = 0; // fourth field - var nameIndex = 0; // fifth field - var mappings = ''; - for (var i = 0; i < decoded.length; i++) { - var line = decoded[i]; - if (i > 0) - mappings += ';'; + const state = new Int32Array(5); + const bufLength = 1024 * 16; + const subLength = bufLength - 36; + const buf = new Uint8Array(bufLength); + const sub = buf.subarray(0, subLength); + let pos = 0; + let out = ''; + for (let i = 0; i < decoded.length; i++) { + const line = decoded[i]; + if (i > 0) { + if (pos === bufLength) { + out += td.decode(buf); + pos = 0; + } + buf[pos++] = semicolon; + } if (line.length === 0) continue; - var generatedCodeColumn = 0; // first field - var lineMappings = []; - for (var _i = 0, line_1 = line; _i < line_1.length; _i++) { - var segment = line_1[_i]; - var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn); - generatedCodeColumn = segment[0]; - if (segment.length > 1) { - segmentMappings += - encodeInteger(segment[1] - sourceFileIndex) + - encodeInteger(segment[2] - sourceCodeLine) + - encodeInteger(segment[3] - sourceCodeColumn); - sourceFileIndex = segment[1]; - sourceCodeLine = segment[2]; - sourceCodeColumn = segment[3]; + state[0] = 0; + for (let j = 0; j < line.length; j++) { + const segment = line[j]; + // We can push up to 5 ints, each int can take at most 7 chars, and we + // may push a comma. + if (pos > subLength) { + out += td.decode(sub); + buf.copyWithin(0, subLength, pos); + pos -= subLength; } - if (segment.length === 5) { - segmentMappings += encodeInteger(segment[4] - nameIndex); - nameIndex = segment[4]; - } - lineMappings.push(segmentMappings); + if (j > 0) + buf[pos++] = comma; + pos = encodeInteger(buf, pos, state, segment, 0); // genColumn + if (segment.length === 1) + continue; + pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex + pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine + pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn + if (segment.length === 4) + continue; + pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex } - mappings += lineMappings.join(','); } - return mappings; + return out + td.decode(buf.subarray(0, pos)); } - function encodeInteger(num) { - var result = ''; + function encodeInteger(buf, pos, state, segment, j) { + const next = segment[j]; + let num = next - state[j]; + state[j] = next; num = num < 0 ? (-num << 1) | 1 : num << 1; do { - var clamped = num & 31; + let clamped = num & 0b011111; num >>>= 5; - if (num > 0) { - clamped |= 32; - } - result += chars[clamped]; + if (num > 0) + clamped |= 0b100000; + buf[pos++] = intToChar[clamped]; } while (num > 0); - return result; + return pos; } - var btoa = function () { - throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); - }; - if (typeof window !== 'undefined' && typeof window.btoa === 'function') { - btoa = function (str) { return window.btoa(unescape(encodeURIComponent(str))); }; - } else if (typeof Buffer === 'function') { - btoa = function (str) { return Buffer.from(str, 'utf-8').toString('base64'); }; + function getBtoa() { + if (typeof window !== 'undefined' && typeof window.btoa === 'function') { + return (str) => window.btoa(unescape(encodeURIComponent(str))); + } else if (typeof Buffer === 'function') { + return (str) => Buffer.from(str, 'utf-8').toString('base64'); + } else { + return () => { + throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); + }; + } } - var SourceMap = function SourceMap(properties) { - this.version = 3; - this.file = properties.file; - this.sources = properties.sources; - this.sourcesContent = properties.sourcesContent; - this.names = properties.names; - this.mappings = encode(properties.mappings); - }; + const btoa = /*#__PURE__*/ getBtoa(); - SourceMap.prototype.toString = function toString () { - return JSON.stringify(this); - }; + class SourceMap { + constructor(properties) { + this.version = 3; + this.file = properties.file; + this.sources = properties.sources; + this.sourcesContent = properties.sourcesContent; + this.names = properties.names; + this.mappings = encode(properties.mappings); + if (typeof properties.x_google_ignoreList !== 'undefined') { + this.x_google_ignoreList = properties.x_google_ignoreList; + } + } - SourceMap.prototype.toUrl = function toUrl () { - return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); - }; + toString() { + return JSON.stringify(this); + } + + toUrl() { + return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString()); + } + } function guessIndent(code) { - var lines = code.split('\n'); + const lines = code.split('\n'); - var tabbed = lines.filter(function (line) { return /^\t+/.test(line); }); - var spaced = lines.filter(function (line) { return /^ {2,}/.test(line); }); + const tabbed = lines.filter((line) => /^\t+/.test(line)); + const spaced = lines.filter((line) => /^ {2,}/.test(line)); if (tabbed.length === 0 && spaced.length === 0) { return null; @@ -269,8 +329,8 @@ } // Otherwise, we need to guess the multiple - var min = spaced.reduce(function (previous, current) { - var numSpaces = /^ +/.exec(current)[0].length; + const min = spaced.reduce((previous, current) => { + const numSpaces = /^ +/.exec(current)[0].length; return Math.min(numSpaces, previous); }, Infinity); @@ -278,8 +338,8 @@ } function getRelativePath(from, to) { - var fromParts = from.split(/[/\\]/); - var toParts = to.split(/[/\\]/); + const fromParts = from.split(/[/\\]/); + const toParts = to.split(/[/\\]/); fromParts.pop(); // get dirname @@ -289,1077 +349,1240 @@ } if (fromParts.length) { - var i = fromParts.length; - while (i--) { fromParts[i] = '..'; } + let i = fromParts.length; + while (i--) fromParts[i] = '..'; } return fromParts.concat(toParts).join('/'); } - var toString = Object.prototype.toString; + const toString = Object.prototype.toString; function isObject(thing) { return toString.call(thing) === '[object Object]'; } function getLocator(source) { - var originalLines = source.split('\n'); - var lineOffsets = []; + const originalLines = source.split('\n'); + const lineOffsets = []; - for (var i = 0, pos = 0; i < originalLines.length; i++) { + for (let i = 0, pos = 0; i < originalLines.length; i++) { lineOffsets.push(pos); pos += originalLines[i].length + 1; } return function locate(index) { - var i = 0; - var j = lineOffsets.length; + let i = 0; + let j = lineOffsets.length; while (i < j) { - var m = (i + j) >> 1; + const m = (i + j) >> 1; if (index < lineOffsets[m]) { j = m; } else { i = m + 1; } } - var line = i - 1; - var column = index - lineOffsets[line]; - return { line: line, column: column }; + const line = i - 1; + const column = index - lineOffsets[line]; + return { line, column }; }; } - var Mappings = function Mappings(hires) { - this.hires = hires; - this.generatedCodeLine = 0; - this.generatedCodeColumn = 0; - this.raw = []; - this.rawSegments = this.raw[this.generatedCodeLine] = []; - this.pending = null; - }; + const wordRegex = /\w/; - Mappings.prototype.addEdit = function addEdit (sourceIndex, content, loc, nameIndex) { - if (content.length) { - var segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; - if (nameIndex >= 0) { - segment.push(nameIndex); - } - this.rawSegments.push(segment); - } else if (this.pending) { - this.rawSegments.push(this.pending); - } - - this.advance(content); - this.pending = null; - }; - - Mappings.prototype.addUneditedChunk = function addUneditedChunk (sourceIndex, chunk, original, loc, sourcemapLocations) { - var originalCharIndex = chunk.start; - var first = true; - - while (originalCharIndex < chunk.end) { - if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { - this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]); - } - - if (original[originalCharIndex] === '\n') { - loc.line += 1; - loc.column = 0; - this.generatedCodeLine += 1; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - this.generatedCodeColumn = 0; - first = true; - } else { - loc.column += 1; - this.generatedCodeColumn += 1; - first = false; - } - - originalCharIndex += 1; - } - - this.pending = null; - }; - - Mappings.prototype.advance = function advance (str) { - if (!str) { return; } - - var lines = str.split('\n'); - - if (lines.length > 1) { - for (var i = 0; i < lines.length - 1; i++) { - this.generatedCodeLine++; - this.raw[this.generatedCodeLine] = this.rawSegments = []; - } + class Mappings { + constructor(hires) { + this.hires = hires; + this.generatedCodeLine = 0; this.generatedCodeColumn = 0; + this.raw = []; + this.rawSegments = this.raw[this.generatedCodeLine] = []; + this.pending = null; } - this.generatedCodeColumn += lines[lines.length - 1].length; - }; + addEdit(sourceIndex, content, loc, nameIndex) { + if (content.length) { + let contentLineEnd = content.indexOf('\n', 0); + let previousContentLineEnd = -1; + while (contentLineEnd >= 0) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); - var n = '\n'; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; - var warned = { + previousContentLineEnd = contentLineEnd; + contentLineEnd = content.indexOf('\n', contentLineEnd + 1); + } + + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + if (nameIndex >= 0) { + segment.push(nameIndex); + } + this.rawSegments.push(segment); + + this.advance(content.slice(previousContentLineEnd + 1)); + } else if (this.pending) { + this.rawSegments.push(this.pending); + this.advance(content); + } + + this.pending = null; + } + + addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { + let originalCharIndex = chunk.start; + let first = true; + // when iterating each char, check if it's in a word boundary + let charInHiresBoundary = false; + + while (originalCharIndex < chunk.end) { + if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { + const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; + + if (this.hires === 'boundary') { + // in hires "boundary", group segments per word boundary than per char + if (wordRegex.test(original[originalCharIndex])) { + // for first char in the boundary found, start the boundary by pushing a segment + if (!charInHiresBoundary) { + this.rawSegments.push(segment); + charInHiresBoundary = true; + } + } else { + // for non-word char, end the boundary by pushing a segment + this.rawSegments.push(segment); + charInHiresBoundary = false; + } + } else { + this.rawSegments.push(segment); + } + } + + if (original[originalCharIndex] === '\n') { + loc.line += 1; + loc.column = 0; + this.generatedCodeLine += 1; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + this.generatedCodeColumn = 0; + first = true; + } else { + loc.column += 1; + this.generatedCodeColumn += 1; + first = false; + } + + originalCharIndex += 1; + } + + this.pending = null; + } + + advance(str) { + if (!str) return; + + const lines = str.split('\n'); + + if (lines.length > 1) { + for (let i = 0; i < lines.length - 1; i++) { + this.generatedCodeLine++; + this.raw[this.generatedCodeLine] = this.rawSegments = []; + } + this.generatedCodeColumn = 0; + } + + this.generatedCodeColumn += lines[lines.length - 1].length; + } + } + + const n = '\n'; + + const warned = { insertLeft: false, insertRight: false, storeName: false, }; - var MagicString = function MagicString(string, options) { - if ( options === void 0 ) options = {}; + class MagicString { + constructor(string, options = {}) { + const chunk = new Chunk(0, string.length, string); - var chunk = new Chunk(0, string.length, string); - - Object.defineProperties(this, { - original: { writable: true, value: string }, - outro: { writable: true, value: '' }, - intro: { writable: true, value: '' }, - firstChunk: { writable: true, value: chunk }, - lastChunk: { writable: true, value: chunk }, - lastSearchedChunk: { writable: true, value: chunk }, - byStart: { writable: true, value: {} }, - byEnd: { writable: true, value: {} }, - filename: { writable: true, value: options.filename }, - indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, - sourcemapLocations: { writable: true, value: new BitSet() }, - storedNames: { writable: true, value: {} }, - indentStr: { writable: true, value: guessIndent(string) }, - }); - - this.byStart[0] = chunk; - this.byEnd[string.length] = chunk; - }; - - MagicString.prototype.addSourcemapLocation = function addSourcemapLocation (char) { - this.sourcemapLocations.add(char); - }; - - MagicString.prototype.append = function append (content) { - if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); } - - this.outro += content; - return this; - }; - - MagicString.prototype.appendLeft = function appendLeft (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byEnd[index]; - - if (chunk) { - chunk.appendLeft(content); - } else { - this.intro += content; - } - return this; - }; - - MagicString.prototype.appendRight = function appendRight (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byStart[index]; - - if (chunk) { - chunk.appendRight(content); - } else { - this.outro += content; - } - return this; - }; - - MagicString.prototype.clone = function clone () { - var cloned = new MagicString(this.original, { filename: this.filename }); - - var originalChunk = this.firstChunk; - var clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); - - while (originalChunk) { - cloned.byStart[clonedChunk.start] = clonedChunk; - cloned.byEnd[clonedChunk.end] = clonedChunk; - - var nextOriginalChunk = originalChunk.next; - var nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); - - if (nextClonedChunk) { - clonedChunk.next = nextClonedChunk; - nextClonedChunk.previous = clonedChunk; - - clonedChunk = nextClonedChunk; - } - - originalChunk = nextOriginalChunk; - } - - cloned.lastChunk = clonedChunk; - - if (this.indentExclusionRanges) { - cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); - } - - cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); - - cloned.intro = this.intro; - cloned.outro = this.outro; - - return cloned; - }; - - MagicString.prototype.generateDecodedMap = function generateDecodedMap (options) { - var this$1$1 = this; - - options = options || {}; - - var sourceIndex = 0; - var names = Object.keys(this.storedNames); - var mappings = new Mappings(options.hires); - - var locate = getLocator(this.original); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.firstChunk.eachNext(function (chunk) { - var loc = locate(chunk.start); - - if (chunk.intro.length) { mappings.advance(chunk.intro); } - - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1 - ); - } else { - mappings.addUneditedChunk(sourceIndex, chunk, this$1$1.original, loc, this$1$1.sourcemapLocations); - } - - if (chunk.outro.length) { mappings.advance(chunk.outro); } - }); - - return { - file: options.file ? options.file.split(/[/\\]/).pop() : null, - sources: [options.source ? getRelativePath(options.file || '', options.source) : null], - sourcesContent: options.includeContent ? [this.original] : [null], - names: names, - mappings: mappings.raw, - }; - }; - - MagicString.prototype.generateMap = function generateMap (options) { - return new SourceMap(this.generateDecodedMap(options)); - }; - - MagicString.prototype.getIndentString = function getIndentString () { - return this.indentStr === null ? '\t' : this.indentStr; - }; - - MagicString.prototype.indent = function indent (indentStr, options) { - var pattern = /^[^\r\n]/gm; - - if (isObject(indentStr)) { - options = indentStr; - indentStr = undefined; - } - - indentStr = indentStr !== undefined ? indentStr : this.indentStr || '\t'; - - if (indentStr === '') { return this; } // noop - - options = options || {}; - - // Process exclusion ranges - var isExcluded = {}; - - if (options.exclude) { - var exclusions = - typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; - exclusions.forEach(function (exclusion) { - for (var i = exclusion[0]; i < exclusion[1]; i += 1) { - isExcluded[i] = true; - } + Object.defineProperties(this, { + original: { writable: true, value: string }, + outro: { writable: true, value: '' }, + intro: { writable: true, value: '' }, + firstChunk: { writable: true, value: chunk }, + lastChunk: { writable: true, value: chunk }, + lastSearchedChunk: { writable: true, value: chunk }, + byStart: { writable: true, value: {} }, + byEnd: { writable: true, value: {} }, + filename: { writable: true, value: options.filename }, + indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, + sourcemapLocations: { writable: true, value: new BitSet() }, + storedNames: { writable: true, value: {} }, + indentStr: { writable: true, value: undefined }, + ignoreList: { writable: true, value: options.ignoreList }, }); + + this.byStart[0] = chunk; + this.byEnd[string.length] = chunk; } - var shouldIndentNextCharacter = options.indentStart !== false; - var replacer = function (match) { - if (shouldIndentNextCharacter) { return ("" + indentStr + match); } - shouldIndentNextCharacter = true; - return match; - }; + addSourcemapLocation(char) { + this.sourcemapLocations.add(char); + } - this.intro = this.intro.replace(pattern, replacer); + append(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - var charIndex = 0; - var chunk = this.firstChunk; + this.outro += content; + return this; + } - while (chunk) { - var end = chunk.end; + appendLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - if (chunk.edited) { - if (!isExcluded[charIndex]) { - chunk.content = chunk.content.replace(pattern, replacer); + this._split(index); - if (chunk.content.length) { - shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; - } - } + const chunk = this.byEnd[index]; + + if (chunk) { + chunk.appendLeft(content); } else { - charIndex = chunk.start; + this.intro += content; + } + return this; + } - while (charIndex < end) { + appendRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); + + this._split(index); + + const chunk = this.byStart[index]; + + if (chunk) { + chunk.appendRight(content); + } else { + this.outro += content; + } + return this; + } + + clone() { + const cloned = new MagicString(this.original, { filename: this.filename }); + + let originalChunk = this.firstChunk; + let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); + + while (originalChunk) { + cloned.byStart[clonedChunk.start] = clonedChunk; + cloned.byEnd[clonedChunk.end] = clonedChunk; + + const nextOriginalChunk = originalChunk.next; + const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); + + if (nextClonedChunk) { + clonedChunk.next = nextClonedChunk; + nextClonedChunk.previous = clonedChunk; + + clonedChunk = nextClonedChunk; + } + + originalChunk = nextOriginalChunk; + } + + cloned.lastChunk = clonedChunk; + + if (this.indentExclusionRanges) { + cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); + } + + cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); + + cloned.intro = this.intro; + cloned.outro = this.outro; + + return cloned; + } + + generateDecodedMap(options) { + options = options || {}; + + const sourceIndex = 0; + const names = Object.keys(this.storedNames); + const mappings = new Mappings(options.hires); + + const locate = getLocator(this.original); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: [ + options.source ? getRelativePath(options.file || '', options.source) : options.file || '', + ], + sourcesContent: options.includeContent ? [this.original] : undefined, + names, + mappings: mappings.raw, + x_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + _ensureindentStr() { + if (this.indentStr === undefined) { + this.indentStr = guessIndent(this.original); + } + } + + _getRawIndentString() { + this._ensureindentStr(); + return this.indentStr; + } + + getIndentString() { + this._ensureindentStr(); + return this.indentStr === null ? '\t' : this.indentStr; + } + + indent(indentStr, options) { + const pattern = /^[^\r\n]/gm; + + if (isObject(indentStr)) { + options = indentStr; + indentStr = undefined; + } + + if (indentStr === undefined) { + this._ensureindentStr(); + indentStr = this.indentStr || '\t'; + } + + if (indentStr === '') return this; // noop + + options = options || {}; + + // Process exclusion ranges + const isExcluded = {}; + + if (options.exclude) { + const exclusions = + typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude; + exclusions.forEach((exclusion) => { + for (let i = exclusion[0]; i < exclusion[1]; i += 1) { + isExcluded[i] = true; + } + }); + } + + let shouldIndentNextCharacter = options.indentStart !== false; + const replacer = (match) => { + if (shouldIndentNextCharacter) return `${indentStr}${match}`; + shouldIndentNextCharacter = true; + return match; + }; + + this.intro = this.intro.replace(pattern, replacer); + + let charIndex = 0; + let chunk = this.firstChunk; + + while (chunk) { + const end = chunk.end; + + if (chunk.edited) { if (!isExcluded[charIndex]) { - var char = this.original[charIndex]; + chunk.content = chunk.content.replace(pattern, replacer); - if (char === '\n') { - shouldIndentNextCharacter = true; - } else if (char !== '\r' && shouldIndentNextCharacter) { - shouldIndentNextCharacter = false; - - if (charIndex === chunk.start) { - chunk.prependRight(indentStr); - } else { - this._splitChunk(chunk, charIndex); - chunk = chunk.next; - chunk.prependRight(indentStr); - } + if (chunk.content.length) { + shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n'; } } - - charIndex += 1; - } - } - - charIndex = chunk.end; - chunk = chunk.next; - } - - this.outro = this.outro.replace(pattern, replacer); - - return this; - }; - - MagicString.prototype.insert = function insert () { - throw new Error( - 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)' - ); - }; - - MagicString.prototype.insertLeft = function insertLeft (index, content) { - if (!warned.insertLeft) { - console.warn( - 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead' - ); // eslint-disable-line no-console - warned.insertLeft = true; - } - - return this.appendLeft(index, content); - }; - - MagicString.prototype.insertRight = function insertRight (index, content) { - if (!warned.insertRight) { - console.warn( - 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead' - ); // eslint-disable-line no-console - warned.insertRight = true; - } - - return this.prependRight(index, content); - }; - - MagicString.prototype.move = function move (start, end, index) { - if (index >= start && index <= end) { throw new Error('Cannot move a selection inside itself'); } - - this._split(start); - this._split(end); - this._split(index); - - var first = this.byStart[start]; - var last = this.byEnd[end]; - - var oldLeft = first.previous; - var oldRight = last.next; - - var newRight = this.byStart[index]; - if (!newRight && last === this.lastChunk) { return this; } - var newLeft = newRight ? newRight.previous : this.lastChunk; - - if (oldLeft) { oldLeft.next = oldRight; } - if (oldRight) { oldRight.previous = oldLeft; } - - if (newLeft) { newLeft.next = first; } - if (newRight) { newRight.previous = last; } - - if (!first.previous) { this.firstChunk = last.next; } - if (!last.next) { - this.lastChunk = first.previous; - this.lastChunk.next = null; - } - - first.previous = newLeft; - last.next = newRight || null; - - if (!newLeft) { this.firstChunk = first; } - if (!newRight) { this.lastChunk = last; } - return this; - }; - - MagicString.prototype.overwrite = function overwrite (start, end, content, options) { - if (typeof content !== 'string') { throw new TypeError('replacement content must be a string'); } - - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - if (end > this.original.length) { throw new Error('end is out of bounds'); } - if (start === end) - { throw new Error( - 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead' - ); } - - this._split(start); - this._split(end); - - if (options === true) { - if (!warned.storeName) { - console.warn( - 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string' - ); // eslint-disable-line no-console - warned.storeName = true; - } - - options = { storeName: true }; - } - var storeName = options !== undefined ? options.storeName : false; - var contentOnly = options !== undefined ? options.contentOnly : false; - - if (storeName) { - var original = this.original.slice(start, end); - Object.defineProperty(this.storedNames, original, { writable: true, value: true, enumerable: true }); - } - - var first = this.byStart[start]; - var last = this.byEnd[end]; - - if (first) { - var chunk = first; - while (chunk !== last) { - if (chunk.next !== this.byStart[chunk.end]) { - throw new Error('Cannot overwrite across a split point'); - } - chunk = chunk.next; - chunk.edit('', false); - } - - first.edit(content, storeName, contentOnly); - } else { - // must be inserting at the end - var newChunk = new Chunk(start, end, '').edit(content, storeName); - - // TODO last chunk in the array may not be the last chunk, if it's moved... - last.next = newChunk; - newChunk.previous = last; - } - return this; - }; - - MagicString.prototype.prepend = function prepend (content) { - if (typeof content !== 'string') { throw new TypeError('outro content must be a string'); } - - this.intro = content + this.intro; - return this; - }; - - MagicString.prototype.prependLeft = function prependLeft (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byEnd[index]; - - if (chunk) { - chunk.prependLeft(content); - } else { - this.intro = content + this.intro; - } - return this; - }; - - MagicString.prototype.prependRight = function prependRight (index, content) { - if (typeof content !== 'string') { throw new TypeError('inserted content must be a string'); } - - this._split(index); - - var chunk = this.byStart[index]; - - if (chunk) { - chunk.prependRight(content); - } else { - this.outro = content + this.outro; - } - return this; - }; - - MagicString.prototype.remove = function remove (start, end) { - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - if (start === end) { return this; } - - if (start < 0 || end > this.original.length) { throw new Error('Character is out of bounds'); } - if (start > end) { throw new Error('end must be greater than start'); } - - this._split(start); - this._split(end); - - var chunk = this.byStart[start]; - - while (chunk) { - chunk.intro = ''; - chunk.outro = ''; - chunk.edit(''); - - chunk = end > chunk.end ? this.byStart[chunk.end] : null; - } - return this; - }; - - MagicString.prototype.lastChar = function lastChar () { - if (this.outro.length) { return this.outro[this.outro.length - 1]; } - var chunk = this.lastChunk; - do { - if (chunk.outro.length) { return chunk.outro[chunk.outro.length - 1]; } - if (chunk.content.length) { return chunk.content[chunk.content.length - 1]; } - if (chunk.intro.length) { return chunk.intro[chunk.intro.length - 1]; } - } while ((chunk = chunk.previous)); - if (this.intro.length) { return this.intro[this.intro.length - 1]; } - return ''; - }; - - MagicString.prototype.lastLine = function lastLine () { - var lineIndex = this.outro.lastIndexOf(n); - if (lineIndex !== -1) { return this.outro.substr(lineIndex + 1); } - var lineStr = this.outro; - var chunk = this.lastChunk; - do { - if (chunk.outro.length > 0) { - lineIndex = chunk.outro.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.outro.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.outro + lineStr; - } - - if (chunk.content.length > 0) { - lineIndex = chunk.content.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.content.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.content + lineStr; - } - - if (chunk.intro.length > 0) { - lineIndex = chunk.intro.lastIndexOf(n); - if (lineIndex !== -1) { return chunk.intro.substr(lineIndex + 1) + lineStr; } - lineStr = chunk.intro + lineStr; - } - } while ((chunk = chunk.previous)); - lineIndex = this.intro.lastIndexOf(n); - if (lineIndex !== -1) { return this.intro.substr(lineIndex + 1) + lineStr; } - return this.intro + lineStr; - }; - - MagicString.prototype.slice = function slice (start, end) { - if ( start === void 0 ) start = 0; - if ( end === void 0 ) end = this.original.length; - - while (start < 0) { start += this.original.length; } - while (end < 0) { end += this.original.length; } - - var result = ''; - - // find start chunk - var chunk = this.firstChunk; - while (chunk && (chunk.start > start || chunk.end <= start)) { - // found end chunk before start - if (chunk.start < end && chunk.end >= end) { - return result; - } - - chunk = chunk.next; - } - - if (chunk && chunk.edited && chunk.start !== start) - { throw new Error(("Cannot use replaced character " + start + " as slice start anchor.")); } - - var startChunk = chunk; - while (chunk) { - if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { - result += chunk.intro; - } - - var containsEnd = chunk.start < end && chunk.end >= end; - if (containsEnd && chunk.edited && chunk.end !== end) - { throw new Error(("Cannot use replaced character " + end + " as slice end anchor.")); } - - var sliceStart = startChunk === chunk ? start - chunk.start : 0; - var sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; - - result += chunk.content.slice(sliceStart, sliceEnd); - - if (chunk.outro && (!containsEnd || chunk.end === end)) { - result += chunk.outro; - } - - if (containsEnd) { - break; - } - - chunk = chunk.next; - } - - return result; - }; - - // TODO deprecate this? not really very useful - MagicString.prototype.snip = function snip (start, end) { - var clone = this.clone(); - clone.remove(0, start); - clone.remove(end, clone.original.length); - - return clone; - }; - - MagicString.prototype._split = function _split (index) { - if (this.byStart[index] || this.byEnd[index]) { return; } - - var chunk = this.lastSearchedChunk; - var searchForward = index > chunk.end; - - while (chunk) { - if (chunk.contains(index)) { return this._splitChunk(chunk, index); } - - chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; - } - }; - - MagicString.prototype._splitChunk = function _splitChunk (chunk, index) { - if (chunk.edited && chunk.content.length) { - // zero-length edited chunks are a special case (overlapping replacements) - var loc = getLocator(this.original)(index); - throw new Error( - ("Cannot split a chunk that has already been edited (" + (loc.line) + ":" + (loc.column) + " – \"" + (chunk.original) + "\")") - ); - } - - var newChunk = chunk.split(index); - - this.byEnd[index] = chunk; - this.byStart[index] = newChunk; - this.byEnd[newChunk.end] = newChunk; - - if (chunk === this.lastChunk) { this.lastChunk = newChunk; } - - this.lastSearchedChunk = chunk; - return true; - }; - - MagicString.prototype.toString = function toString () { - var str = this.intro; - - var chunk = this.firstChunk; - while (chunk) { - str += chunk.toString(); - chunk = chunk.next; - } - - return str + this.outro; - }; - - MagicString.prototype.isEmpty = function isEmpty () { - var chunk = this.firstChunk; - do { - if ( - (chunk.intro.length && chunk.intro.trim()) || - (chunk.content.length && chunk.content.trim()) || - (chunk.outro.length && chunk.outro.trim()) - ) - { return false; } - } while ((chunk = chunk.next)); - return true; - }; - - MagicString.prototype.length = function length () { - var chunk = this.firstChunk; - var length = 0; - do { - length += chunk.intro.length + chunk.content.length + chunk.outro.length; - } while ((chunk = chunk.next)); - return length; - }; - - MagicString.prototype.trimLines = function trimLines () { - return this.trim('[\\r\\n]'); - }; - - MagicString.prototype.trim = function trim (charType) { - return this.trimStart(charType).trimEnd(charType); - }; - - MagicString.prototype.trimEndAborted = function trimEndAborted (charType) { - var rx = new RegExp((charType || '\\s') + '+$'); - - this.outro = this.outro.replace(rx, ''); - if (this.outro.length) { return true; } - - var chunk = this.lastChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimEnd(rx); - - // if chunk was trimmed, we have a new lastChunk - if (chunk.end !== end) { - if (this.lastChunk === chunk) { - this.lastChunk = chunk.next; - } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) { return true; } - chunk = chunk.previous; - } while (chunk); - - return false; - }; - - MagicString.prototype.trimEnd = function trimEnd (charType) { - this.trimEndAborted(charType); - return this; - }; - MagicString.prototype.trimStartAborted = function trimStartAborted (charType) { - var rx = new RegExp('^' + (charType || '\\s') + '+'); - - this.intro = this.intro.replace(rx, ''); - if (this.intro.length) { return true; } - - var chunk = this.firstChunk; - - do { - var end = chunk.end; - var aborted = chunk.trimStart(rx); - - if (chunk.end !== end) { - // special case... - if (chunk === this.lastChunk) { this.lastChunk = chunk.next; } - - this.byEnd[chunk.end] = chunk; - this.byStart[chunk.next.start] = chunk.next; - this.byEnd[chunk.next.end] = chunk.next; - } - - if (aborted) { return true; } - chunk = chunk.next; - } while (chunk); - - return false; - }; - - MagicString.prototype.trimStart = function trimStart (charType) { - this.trimStartAborted(charType); - return this; - }; - - var hasOwnProp = Object.prototype.hasOwnProperty; - - var Bundle = function Bundle(options) { - if ( options === void 0 ) options = {}; - - this.intro = options.intro || ''; - this.separator = options.separator !== undefined ? options.separator : '\n'; - this.sources = []; - this.uniqueSources = []; - this.uniqueSourceIndexByFilename = {}; - }; - - Bundle.prototype.addSource = function addSource (source) { - if (source instanceof MagicString) { - return this.addSource({ - content: source, - filename: source.filename, - separator: this.separator, - }); - } - - if (!isObject(source) || !source.content) { - throw new Error( - 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`' - ); - } - - ['filename', 'indentExclusionRanges', 'separator'].forEach(function (option) { - if (!hasOwnProp.call(source, option)) { source[option] = source.content[option]; } - }); - - if (source.separator === undefined) { - // TODO there's a bunch of this sort of thing, needs cleaning up - source.separator = this.separator; - } - - if (source.filename) { - if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { - this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; - this.uniqueSources.push({ filename: source.filename, content: source.content.original }); - } else { - var uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; - if (source.content.original !== uniqueSource.content) { - throw new Error(("Illegal source: same filename (" + (source.filename) + "), different contents")); - } - } - } - - this.sources.push(source); - return this; - }; - - Bundle.prototype.append = function append (str, options) { - this.addSource({ - content: new MagicString(str), - separator: (options && options.separator) || '', - }); - - return this; - }; - - Bundle.prototype.clone = function clone () { - var bundle = new Bundle({ - intro: this.intro, - separator: this.separator, - }); - - this.sources.forEach(function (source) { - bundle.addSource({ - filename: source.filename, - content: source.content.clone(), - separator: source.separator, - }); - }); - - return bundle; - }; - - Bundle.prototype.generateDecodedMap = function generateDecodedMap (options) { - var this$1$1 = this; - if ( options === void 0 ) options = {}; - - var names = []; - this.sources.forEach(function (source) { - Object.keys(source.content.storedNames).forEach(function (name) { - if (!~names.indexOf(name)) { names.push(name); } - }); - }); - - var mappings = new Mappings(options.hires); - - if (this.intro) { - mappings.advance(this.intro); - } - - this.sources.forEach(function (source, i) { - if (i > 0) { - mappings.advance(this$1$1.separator); - } - - var sourceIndex = source.filename ? this$1$1.uniqueSourceIndexByFilename[source.filename] : -1; - var magicString = source.content; - var locate = getLocator(magicString.original); - - if (magicString.intro) { - mappings.advance(magicString.intro); - } - - magicString.firstChunk.eachNext(function (chunk) { - var loc = locate(chunk.start); - - if (chunk.intro.length) { mappings.advance(chunk.intro); } - - if (source.filename) { - if (chunk.edited) { - mappings.addEdit( - sourceIndex, - chunk.content, - loc, - chunk.storeName ? names.indexOf(chunk.original) : -1 - ); - } else { - mappings.addUneditedChunk( - sourceIndex, - chunk, - magicString.original, - loc, - magicString.sourcemapLocations - ); - } } else { - mappings.advance(chunk.content); + charIndex = chunk.start; + + while (charIndex < end) { + if (!isExcluded[charIndex]) { + const char = this.original[charIndex]; + + if (char === '\n') { + shouldIndentNextCharacter = true; + } else if (char !== '\r' && shouldIndentNextCharacter) { + shouldIndentNextCharacter = false; + + if (charIndex === chunk.start) { + chunk.prependRight(indentStr); + } else { + this._splitChunk(chunk, charIndex); + chunk = chunk.next; + chunk.prependRight(indentStr); + } + } + } + + charIndex += 1; + } } - if (chunk.outro.length) { mappings.advance(chunk.outro); } - }); - - if (magicString.outro) { - mappings.advance(magicString.outro); + charIndex = chunk.end; + chunk = chunk.next; } - }); - return { - file: options.file ? options.file.split(/[/\\]/).pop() : null, - sources: this.uniqueSources.map(function (source) { - return options.file ? getRelativePath(options.file, source.filename) : source.filename; - }), - sourcesContent: this.uniqueSources.map(function (source) { - return options.includeContent ? source.content : null; - }), - names: names, - mappings: mappings.raw, - }; - }; + this.outro = this.outro.replace(pattern, replacer); - Bundle.prototype.generateMap = function generateMap (options) { - return new SourceMap(this.generateDecodedMap(options)); - }; - - Bundle.prototype.getIndentString = function getIndentString () { - var indentStringCounts = {}; - - this.sources.forEach(function (source) { - var indentStr = source.content.indentStr; - - if (indentStr === null) { return; } - - if (!indentStringCounts[indentStr]) { indentStringCounts[indentStr] = 0; } - indentStringCounts[indentStr] += 1; - }); - - return ( - Object.keys(indentStringCounts).sort(function (a, b) { - return indentStringCounts[a] - indentStringCounts[b]; - })[0] || '\t' - ); - }; - - Bundle.prototype.indent = function indent (indentStr) { - var this$1$1 = this; - - if (!arguments.length) { - indentStr = this.getIndentString(); + return this; } - if (indentStr === '') { return this; } // noop + insert() { + throw new Error( + 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)', + ); + } - var trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; + insertLeft(index, content) { + if (!warned.insertLeft) { + console.warn( + 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead', + ); // eslint-disable-line no-console + warned.insertLeft = true; + } - this.sources.forEach(function (source, i) { - var separator = source.separator !== undefined ? source.separator : this$1$1.separator; - var indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); + return this.appendLeft(index, content); + } - source.content.indent(indentStr, { - exclude: source.indentExclusionRanges, - indentStart: indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) - }); + insertRight(index, content) { + if (!warned.insertRight) { + console.warn( + 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead', + ); // eslint-disable-line no-console + warned.insertRight = true; + } - trailingNewline = source.content.lastChar() === '\n'; - }); + return this.prependRight(index, content); + } - if (this.intro) { - this.intro = - indentStr + - this.intro.replace(/^[^\n]/gm, function (match, index) { - return index > 0 ? indentStr + match : match; + move(start, end, index) { + if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself'); + + this._split(start); + this._split(end); + this._split(index); + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + const oldLeft = first.previous; + const oldRight = last.next; + + const newRight = this.byStart[index]; + if (!newRight && last === this.lastChunk) return this; + const newLeft = newRight ? newRight.previous : this.lastChunk; + + if (oldLeft) oldLeft.next = oldRight; + if (oldRight) oldRight.previous = oldLeft; + + if (newLeft) newLeft.next = first; + if (newRight) newRight.previous = last; + + if (!first.previous) this.firstChunk = last.next; + if (!last.next) { + this.lastChunk = first.previous; + this.lastChunk.next = null; + } + + first.previous = newLeft; + last.next = newRight || null; + + if (!newLeft) this.firstChunk = first; + if (!newRight) this.lastChunk = last; + return this; + } + + overwrite(start, end, content, options) { + options = options || {}; + return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); + } + + update(start, end, content, options) { + if (typeof content !== 'string') throw new TypeError('replacement content must be a string'); + + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + if (end > this.original.length) throw new Error('end is out of bounds'); + if (start === end) + throw new Error( + 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead', + ); + + this._split(start); + this._split(end); + + if (options === true) { + if (!warned.storeName) { + console.warn( + 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string', + ); // eslint-disable-line no-console + warned.storeName = true; + } + + options = { storeName: true }; + } + const storeName = options !== undefined ? options.storeName : false; + const overwrite = options !== undefined ? options.overwrite : false; + + if (storeName) { + const original = this.original.slice(start, end); + Object.defineProperty(this.storedNames, original, { + writable: true, + value: true, + enumerable: true, }); + } + + const first = this.byStart[start]; + const last = this.byEnd[end]; + + if (first) { + let chunk = first; + while (chunk !== last) { + if (chunk.next !== this.byStart[chunk.end]) { + throw new Error('Cannot overwrite across a split point'); + } + chunk = chunk.next; + chunk.edit('', false); + } + + first.edit(content, storeName, !overwrite); + } else { + // must be inserting at the end + const newChunk = new Chunk(start, end, '').edit(content, storeName); + + // TODO last chunk in the array may not be the last chunk, if it's moved... + last.next = newChunk; + newChunk.previous = last; + } + return this; } - return this; - }; + prepend(content) { + if (typeof content !== 'string') throw new TypeError('outro content must be a string'); - Bundle.prototype.prepend = function prepend (str) { - this.intro = str + this.intro; - return this; - }; + this.intro = content + this.intro; + return this; + } - Bundle.prototype.toString = function toString () { - var this$1$1 = this; + prependLeft(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - var body = this.sources - .map(function (source, i) { - var separator = source.separator !== undefined ? source.separator : this$1$1.separator; - var str = (i > 0 ? separator : '') + source.content.toString(); + this._split(index); - return str; - }) - .join(''); + const chunk = this.byEnd[index]; - return this.intro + body; - }; + if (chunk) { + chunk.prependLeft(content); + } else { + this.intro = content + this.intro; + } + return this; + } - Bundle.prototype.isEmpty = function isEmpty () { - if (this.intro.length && this.intro.trim()) { return false; } - if (this.sources.some(function (source) { return !source.content.isEmpty(); })) { return false; } - return true; - }; + prependRight(index, content) { + if (typeof content !== 'string') throw new TypeError('inserted content must be a string'); - Bundle.prototype.length = function length () { - return this.sources.reduce( - function (length, source) { return length + source.content.length(); }, - this.intro.length - ); - }; + this._split(index); - Bundle.prototype.trimLines = function trimLines () { - return this.trim('[\\r\\n]'); - }; + const chunk = this.byStart[index]; - Bundle.prototype.trim = function trim (charType) { - return this.trimStart(charType).trimEnd(charType); - }; + if (chunk) { + chunk.prependRight(content); + } else { + this.outro = content + this.outro; + } + return this; + } - Bundle.prototype.trimStart = function trimStart (charType) { - var rx = new RegExp('^' + (charType || '\\s') + '+'); - this.intro = this.intro.replace(rx, ''); + remove(start, end) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; - if (!this.intro) { - var source; - var i = 0; + if (start === end) return this; + if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds'); + if (start > end) throw new Error('end must be greater than start'); + + this._split(start); + this._split(end); + + let chunk = this.byStart[start]; + + while (chunk) { + chunk.intro = ''; + chunk.outro = ''; + chunk.edit(''); + + chunk = end > chunk.end ? this.byStart[chunk.end] : null; + } + return this; + } + + lastChar() { + if (this.outro.length) return this.outro[this.outro.length - 1]; + let chunk = this.lastChunk; do { - source = this.sources[i++]; - if (!source) { + if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; + if (chunk.content.length) return chunk.content[chunk.content.length - 1]; + if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; + } while ((chunk = chunk.previous)); + if (this.intro.length) return this.intro[this.intro.length - 1]; + return ''; + } + + lastLine() { + let lineIndex = this.outro.lastIndexOf(n); + if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); + let lineStr = this.outro; + let chunk = this.lastChunk; + do { + if (chunk.outro.length > 0) { + lineIndex = chunk.outro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.outro + lineStr; + } + + if (chunk.content.length > 0) { + lineIndex = chunk.content.lastIndexOf(n); + if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; + lineStr = chunk.content + lineStr; + } + + if (chunk.intro.length > 0) { + lineIndex = chunk.intro.lastIndexOf(n); + if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; + lineStr = chunk.intro + lineStr; + } + } while ((chunk = chunk.previous)); + lineIndex = this.intro.lastIndexOf(n); + if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; + return this.intro + lineStr; + } + + slice(start = 0, end = this.original.length) { + while (start < 0) start += this.original.length; + while (end < 0) end += this.original.length; + + let result = ''; + + // find start chunk + let chunk = this.firstChunk; + while (chunk && (chunk.start > start || chunk.end <= start)) { + // found end chunk before start + if (chunk.start < end && chunk.end >= end) { + return result; + } + + chunk = chunk.next; + } + + if (chunk && chunk.edited && chunk.start !== start) + throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); + + const startChunk = chunk; + while (chunk) { + if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { + result += chunk.intro; + } + + const containsEnd = chunk.start < end && chunk.end >= end; + if (containsEnd && chunk.edited && chunk.end !== end) + throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); + + const sliceStart = startChunk === chunk ? start - chunk.start : 0; + const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; + + result += chunk.content.slice(sliceStart, sliceEnd); + + if (chunk.outro && (!containsEnd || chunk.end === end)) { + result += chunk.outro; + } + + if (containsEnd) { break; } - } while (!source.content.trimStartAborted(charType)); + + chunk = chunk.next; + } + + return result; } - return this; - }; + // TODO deprecate this? not really very useful + snip(start, end) { + const clone = this.clone(); + clone.remove(0, start); + clone.remove(end, clone.original.length); - Bundle.prototype.trimEnd = function trimEnd (charType) { - var rx = new RegExp((charType || '\\s') + '+$'); + return clone; + } - var source; - var i = this.sources.length - 1; + _split(index) { + if (this.byStart[index] || this.byEnd[index]) return; - do { - source = this.sources[i--]; - if (!source) { - this.intro = this.intro.replace(rx, ''); - break; + let chunk = this.lastSearchedChunk; + const searchForward = index > chunk.end; + + while (chunk) { + if (chunk.contains(index)) return this._splitChunk(chunk, index); + + chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; } - } while (!source.content.trimEndAborted(charType)); + } - return this; - }; + _splitChunk(chunk, index) { + if (chunk.edited && chunk.content.length) { + // zero-length edited chunks are a special case (overlapping replacements) + const loc = getLocator(this.original)(index); + throw new Error( + `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`, + ); + } + + const newChunk = chunk.split(index); + + this.byEnd[index] = chunk; + this.byStart[index] = newChunk; + this.byEnd[newChunk.end] = newChunk; + + if (chunk === this.lastChunk) this.lastChunk = newChunk; + + this.lastSearchedChunk = chunk; + return true; + } + + toString() { + let str = this.intro; + + let chunk = this.firstChunk; + while (chunk) { + str += chunk.toString(); + chunk = chunk.next; + } + + return str + this.outro; + } + + isEmpty() { + let chunk = this.firstChunk; + do { + if ( + (chunk.intro.length && chunk.intro.trim()) || + (chunk.content.length && chunk.content.trim()) || + (chunk.outro.length && chunk.outro.trim()) + ) + return false; + } while ((chunk = chunk.next)); + return true; + } + + length() { + let chunk = this.firstChunk; + let length = 0; + do { + length += chunk.intro.length + chunk.content.length + chunk.outro.length; + } while ((chunk = chunk.next)); + return length; + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimEndAborted(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + this.outro = this.outro.replace(rx, ''); + if (this.outro.length) return true; + + let chunk = this.lastChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimEnd(rx); + + // if chunk was trimmed, we have a new lastChunk + if (chunk.end !== end) { + if (this.lastChunk === chunk) { + this.lastChunk = chunk.next; + } + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.previous; + } while (chunk); + + return false; + } + + trimEnd(charType) { + this.trimEndAborted(charType); + return this; + } + trimStartAborted(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + + this.intro = this.intro.replace(rx, ''); + if (this.intro.length) return true; + + let chunk = this.firstChunk; + + do { + const end = chunk.end; + const aborted = chunk.trimStart(rx); + + if (chunk.end !== end) { + // special case... + if (chunk === this.lastChunk) this.lastChunk = chunk.next; + + this.byEnd[chunk.end] = chunk; + this.byStart[chunk.next.start] = chunk.next; + this.byEnd[chunk.next.end] = chunk.next; + } + + if (aborted) return true; + chunk = chunk.next; + } while (chunk); + + return false; + } + + trimStart(charType) { + this.trimStartAborted(charType); + return this; + } + + hasChanged() { + return this.original !== this.toString(); + } + + _replaceRegexp(searchValue, replacement) { + function getReplacement(match, str) { + if (typeof replacement === 'string') { + return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter + if (i === '$') return '$'; + if (i === '&') return match[0]; + const num = +i; + if (num < match.length) return match[+i]; + return `$${i}`; + }); + } else { + return replacement(...match, match.index, str, match.groups); + } + } + function matchAll(re, str) { + let match; + const matches = []; + while ((match = re.exec(str))) { + matches.push(match); + } + return matches; + } + if (searchValue.global) { + const matches = matchAll(searchValue, this.original); + matches.forEach((match) => { + if (match.index != null) + this.overwrite( + match.index, + match.index + match[0].length, + getReplacement(match, this.original), + ); + }); + } else { + const match = this.original.match(searchValue); + if (match && match.index != null) + this.overwrite( + match.index, + match.index + match[0].length, + getReplacement(match, this.original), + ); + } + return this; + } + + _replaceString(string, replacement) { + const { original } = this; + const index = original.indexOf(string); + + if (index !== -1) { + this.overwrite(index, index + string.length, replacement); + } + + return this; + } + + replace(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceString(searchValue, replacement); + } + + return this._replaceRegexp(searchValue, replacement); + } + + _replaceAllString(string, replacement) { + const { original } = this; + const stringLength = string.length; + for ( + let index = original.indexOf(string); + index !== -1; + index = original.indexOf(string, index + stringLength) + ) { + this.overwrite(index, index + stringLength, replacement); + } + + return this; + } + + replaceAll(searchValue, replacement) { + if (typeof searchValue === 'string') { + return this._replaceAllString(searchValue, replacement); + } + + if (!searchValue.global) { + throw new TypeError( + 'MagicString.prototype.replaceAll called with a non-global RegExp argument', + ); + } + + return this._replaceRegexp(searchValue, replacement); + } + } + + const hasOwnProp = Object.prototype.hasOwnProperty; + + class Bundle { + constructor(options = {}) { + this.intro = options.intro || ''; + this.separator = options.separator !== undefined ? options.separator : '\n'; + this.sources = []; + this.uniqueSources = []; + this.uniqueSourceIndexByFilename = {}; + } + + addSource(source) { + if (source instanceof MagicString) { + return this.addSource({ + content: source, + filename: source.filename, + separator: this.separator, + }); + } + + if (!isObject(source) || !source.content) { + throw new Error( + 'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`', + ); + } + + ['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => { + if (!hasOwnProp.call(source, option)) source[option] = source.content[option]; + }); + + if (source.separator === undefined) { + // TODO there's a bunch of this sort of thing, needs cleaning up + source.separator = this.separator; + } + + if (source.filename) { + if (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) { + this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length; + this.uniqueSources.push({ filename: source.filename, content: source.content.original }); + } else { + const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]]; + if (source.content.original !== uniqueSource.content) { + throw new Error(`Illegal source: same filename (${source.filename}), different contents`); + } + } + } + + this.sources.push(source); + return this; + } + + append(str, options) { + this.addSource({ + content: new MagicString(str), + separator: (options && options.separator) || '', + }); + + return this; + } + + clone() { + const bundle = new Bundle({ + intro: this.intro, + separator: this.separator, + }); + + this.sources.forEach((source) => { + bundle.addSource({ + filename: source.filename, + content: source.content.clone(), + separator: source.separator, + }); + }); + + return bundle; + } + + generateDecodedMap(options = {}) { + const names = []; + let x_google_ignoreList = undefined; + this.sources.forEach((source) => { + Object.keys(source.content.storedNames).forEach((name) => { + if (!~names.indexOf(name)) names.push(name); + }); + }); + + const mappings = new Mappings(options.hires); + + if (this.intro) { + mappings.advance(this.intro); + } + + this.sources.forEach((source, i) => { + if (i > 0) { + mappings.advance(this.separator); + } + + const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1; + const magicString = source.content; + const locate = getLocator(magicString.original); + + if (magicString.intro) { + mappings.advance(magicString.intro); + } + + magicString.firstChunk.eachNext((chunk) => { + const loc = locate(chunk.start); + + if (chunk.intro.length) mappings.advance(chunk.intro); + + if (source.filename) { + if (chunk.edited) { + mappings.addEdit( + sourceIndex, + chunk.content, + loc, + chunk.storeName ? names.indexOf(chunk.original) : -1, + ); + } else { + mappings.addUneditedChunk( + sourceIndex, + chunk, + magicString.original, + loc, + magicString.sourcemapLocations, + ); + } + } else { + mappings.advance(chunk.content); + } + + if (chunk.outro.length) mappings.advance(chunk.outro); + }); + + if (magicString.outro) { + mappings.advance(magicString.outro); + } + + if (source.ignoreList && sourceIndex !== -1) { + if (x_google_ignoreList === undefined) { + x_google_ignoreList = []; + } + x_google_ignoreList.push(sourceIndex); + } + }); + + return { + file: options.file ? options.file.split(/[/\\]/).pop() : undefined, + sources: this.uniqueSources.map((source) => { + return options.file ? getRelativePath(options.file, source.filename) : source.filename; + }), + sourcesContent: this.uniqueSources.map((source) => { + return options.includeContent ? source.content : null; + }), + names, + mappings: mappings.raw, + x_google_ignoreList, + }; + } + + generateMap(options) { + return new SourceMap(this.generateDecodedMap(options)); + } + + getIndentString() { + const indentStringCounts = {}; + + this.sources.forEach((source) => { + const indentStr = source.content._getRawIndentString(); + + if (indentStr === null) return; + + if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0; + indentStringCounts[indentStr] += 1; + }); + + return ( + Object.keys(indentStringCounts).sort((a, b) => { + return indentStringCounts[a] - indentStringCounts[b]; + })[0] || '\t' + ); + } + + indent(indentStr) { + if (!arguments.length) { + indentStr = this.getIndentString(); + } + + if (indentStr === '') return this; // noop + + let trailingNewline = !this.intro || this.intro.slice(-1) === '\n'; + + this.sources.forEach((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const indentStart = trailingNewline || (i > 0 && /\r?\n$/.test(separator)); + + source.content.indent(indentStr, { + exclude: source.indentExclusionRanges, + indentStart, //: trailingNewline || /\r?\n$/.test( separator ) //true///\r?\n/.test( separator ) + }); + + trailingNewline = source.content.lastChar() === '\n'; + }); + + if (this.intro) { + this.intro = + indentStr + + this.intro.replace(/^[^\n]/gm, (match, index) => { + return index > 0 ? indentStr + match : match; + }); + } + + return this; + } + + prepend(str) { + this.intro = str + this.intro; + return this; + } + + toString() { + const body = this.sources + .map((source, i) => { + const separator = source.separator !== undefined ? source.separator : this.separator; + const str = (i > 0 ? separator : '') + source.content.toString(); + + return str; + }) + .join(''); + + return this.intro + body; + } + + isEmpty() { + if (this.intro.length && this.intro.trim()) return false; + if (this.sources.some((source) => !source.content.isEmpty())) return false; + return true; + } + + length() { + return this.sources.reduce( + (length, source) => length + source.content.length(), + this.intro.length, + ); + } + + trimLines() { + return this.trim('[\\r\\n]'); + } + + trim(charType) { + return this.trimStart(charType).trimEnd(charType); + } + + trimStart(charType) { + const rx = new RegExp('^' + (charType || '\\s') + '+'); + this.intro = this.intro.replace(rx, ''); + + if (!this.intro) { + let source; + let i = 0; + + do { + source = this.sources[i++]; + if (!source) { + break; + } + } while (!source.content.trimStartAborted(charType)); + } + + return this; + } + + trimEnd(charType) { + const rx = new RegExp((charType || '\\s') + '+$'); + + let source; + let i = this.sources.length - 1; + + do { + source = this.sources[i--]; + if (!source) { + this.intro = this.intro.replace(rx, ''); + break; + } + } while (!source.content.trimEndAborted(charType)); + + return this; + } + } MagicString.Bundle = Bundle; MagicString.SourceMap = SourceMap; diff --git a/node_modules/magic-string/dist/magic-string.umd.js.map b/node_modules/magic-string/dist/magic-string.umd.js.map index 70607d02..cf18b0ba 100644 --- a/node_modules/magic-string/dist/magic-string.umd.js.map +++ b/node_modules/magic-string/dist/magic-string.umd.js.map @@ -1 +1 @@ -{"version":3,"file":"magic-string.umd.js","sources":["../src/BitSet.js","../src/Chunk.js","../node_modules/sourcemap-codec/dist/sourcemap-codec.es.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\t// we make these non-enumerable, for sanity while debugging\n\t\tObject.defineProperties(this, {\n\t\t\tprevious: { writable: true, value: null },\n\t\t\tnext: { writable: true, value: null },\n\t\t});\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.end - trimmed.length);\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","var charToInteger = {};\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nfor (var i = 0; i < chars.length; i++) {\n charToInteger[chars.charCodeAt(i)] = i;\n}\nfunction decode(mappings) {\n var decoded = [];\n var line = [];\n var segment = [\n 0,\n 0,\n 0,\n 0,\n 0,\n ];\n var j = 0;\n for (var i = 0, shift = 0, value = 0; i < mappings.length; i++) {\n var c = mappings.charCodeAt(i);\n if (c === 44) { // \",\"\n segmentify(line, segment, j);\n j = 0;\n }\n else if (c === 59) { // \";\"\n segmentify(line, segment, j);\n j = 0;\n decoded.push(line);\n line = [];\n segment[0] = 0;\n }\n else {\n var integer = charToInteger[c];\n if (integer === undefined) {\n throw new Error('Invalid character (' + String.fromCharCode(c) + ')');\n }\n var hasContinuationBit = integer & 32;\n integer &= 31;\n value += integer << shift;\n if (hasContinuationBit) {\n shift += 5;\n }\n else {\n var shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = value === 0 ? -0x80000000 : -value;\n }\n segment[j] += value;\n j++;\n value = shift = 0; // reset\n }\n }\n }\n segmentify(line, segment, j);\n decoded.push(line);\n return decoded;\n}\nfunction segmentify(line, segment, j) {\n // This looks ugly, but we're creating specialized arrays with a specific\n // length. This is much faster than creating a new array (which v8 expands to\n // a capacity of 17 after pushing the first item), or slicing out a subarray\n // (which is slow). Length 4 is assumed to be the most frequent, followed by\n // length 5 (since not everything will have an associated name), followed by\n // length 1 (it's probably rare for a source substring to not have an\n // associated segment data).\n if (j === 4)\n line.push([segment[0], segment[1], segment[2], segment[3]]);\n else if (j === 5)\n line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);\n else if (j === 1)\n line.push([segment[0]]);\n}\nfunction encode(decoded) {\n var sourceFileIndex = 0; // second field\n var sourceCodeLine = 0; // third field\n var sourceCodeColumn = 0; // fourth field\n var nameIndex = 0; // fifth field\n var mappings = '';\n for (var i = 0; i < decoded.length; i++) {\n var line = decoded[i];\n if (i > 0)\n mappings += ';';\n if (line.length === 0)\n continue;\n var generatedCodeColumn = 0; // first field\n var lineMappings = [];\n for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {\n var segment = line_1[_i];\n var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);\n generatedCodeColumn = segment[0];\n if (segment.length > 1) {\n segmentMappings +=\n encodeInteger(segment[1] - sourceFileIndex) +\n encodeInteger(segment[2] - sourceCodeLine) +\n encodeInteger(segment[3] - sourceCodeColumn);\n sourceFileIndex = segment[1];\n sourceCodeLine = segment[2];\n sourceCodeColumn = segment[3];\n }\n if (segment.length === 5) {\n segmentMappings += encodeInteger(segment[4] - nameIndex);\n nameIndex = segment[4];\n }\n lineMappings.push(segmentMappings);\n }\n mappings += lineMappings.join(',');\n }\n return mappings;\n}\nfunction encodeInteger(num) {\n var result = '';\n num = num < 0 ? (-num << 1) | 1 : num << 1;\n do {\n var clamped = num & 31;\n num >>>= 5;\n if (num > 0) {\n clamped |= 32;\n }\n result += chars[clamped];\n } while (num > 0);\n return result;\n}\n\nexport { decode, encode };\n//# sourceMappingURL=sourcemap-codec.es.js.map\n","import { encode } from 'sourcemap-codec';\n\nlet btoa = () => {\n\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n};\nif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\tbtoa = (str) => window.btoa(unescape(encodeURIComponent(str)));\n} else if (typeof Buffer === 'function') {\n\tbtoa = (str) => Buffer.from(str, 'utf-8').toString('base64');\n}\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","export default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t}\n\n\t\tthis.advance(content);\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tthis.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: guessIndent(string) },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: [options.source ? getRelativePath(options.file || '', options.source) : null],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : [null],\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tindentStr = indentStr !== undefined ? indentStr : this.indentStr || '\\t';\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)'\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead'\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'\n\t\t\t\t); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst contentOnly = options !== undefined ? options.contentOnly : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, { writable: true, value: true, enumerable: true });\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, contentOnly);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`'\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : null,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content.indentStr;\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":["const","let","this"],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G,WAAW,CAAC;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"magic-string.umd.js","sources":["../src/BitSet.js","../src/Chunk.js","../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js","../src/index-legacy.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + '' \n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","const comma = ','.charCodeAt(0);\nconst semicolon = ';'.charCodeAt(0);\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n// Provide a fallback for older environments.\nconst td = typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf) {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\nfunction decode(mappings) {\n const state = new Int32Array(5);\n const decoded = [];\n let index = 0;\n do {\n const semi = indexOf(mappings, index);\n const line = [];\n let sorted = true;\n let lastCol = 0;\n state[0] = 0;\n for (let i = index; i < semi; i++) {\n let seg;\n i = decodeInteger(mappings, i, state, 0); // genColumn\n const col = state[0];\n if (col < lastCol)\n sorted = false;\n lastCol = col;\n if (hasMoreVlq(mappings, i, semi)) {\n i = decodeInteger(mappings, i, state, 1); // sourcesIndex\n i = decodeInteger(mappings, i, state, 2); // sourceLine\n i = decodeInteger(mappings, i, state, 3); // sourceColumn\n if (hasMoreVlq(mappings, i, semi)) {\n i = decodeInteger(mappings, i, state, 4); // namesIndex\n seg = [col, state[1], state[2], state[3], state[4]];\n }\n else {\n seg = [col, state[1], state[2], state[3]];\n }\n }\n else {\n seg = [col];\n }\n line.push(seg);\n }\n if (!sorted)\n sort(line);\n decoded.push(line);\n index = semi + 1;\n } while (index <= mappings.length);\n return decoded;\n}\nfunction indexOf(mappings, index) {\n const idx = mappings.indexOf(';', index);\n return idx === -1 ? mappings.length : idx;\n}\nfunction decodeInteger(mappings, pos, state, j) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = mappings.charCodeAt(pos++);\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n state[j] += value;\n return pos;\n}\nfunction hasMoreVlq(mappings, i, length) {\n if (i >= length)\n return false;\n return mappings.charCodeAt(i) !== comma;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const state = new Int32Array(5);\n const bufLength = 1024 * 16;\n const subLength = bufLength - 36;\n const buf = new Uint8Array(bufLength);\n const sub = buf.subarray(0, subLength);\n let pos = 0;\n let out = '';\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) {\n if (pos === bufLength) {\n out += td.decode(buf);\n pos = 0;\n }\n buf[pos++] = semicolon;\n }\n if (line.length === 0)\n continue;\n state[0] = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n // We can push up to 5 ints, each int can take at most 7 chars, and we\n // may push a comma.\n if (pos > subLength) {\n out += td.decode(sub);\n buf.copyWithin(0, subLength, pos);\n pos -= subLength;\n }\n if (j > 0)\n buf[pos++] = comma;\n pos = encodeInteger(buf, pos, state, segment, 0); // genColumn\n if (segment.length === 1)\n continue;\n pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex\n pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine\n pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn\n if (segment.length === 4)\n continue;\n pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex\n }\n }\n return out + td.decode(buf.subarray(0, pos));\n}\nfunction encodeInteger(buf, pos, state, segment, j) {\n const next = segment[j];\n let num = next - state[j];\n state[j] = next;\n num = num < 0 ? (-num << 1) | 1 : num << 1;\n do {\n let clamped = num & 0b011111;\n num >>>= 5;\n if (num > 0)\n clamped |= 0b100000;\n buf[pos++] = intToChar[clamped];\n } while (num > 0);\n return pos;\n}\n\nexport { decode, encode };\n//# sourceMappingURL=sourcemap-codec.mjs.map\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof window !== 'undefined' && typeof window.btoa === 'function') {\n\t\treturn (str) => window.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\twhile (contentLineEnd >= 0) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t} else {\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t); // eslint-disable-line no-console\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t); // eslint-disable-line no-console\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length) {\n\t\twhile (start < 0) start += this.original.length;\n\t\twhile (end < 0) end += this.original.length;\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null)\n\t\t\t\t\tthis.overwrite(\n\t\t\t\t\t\tmatch.index,\n\t\t\t\t\t\tmatch.index + match[0].length,\n\t\t\t\t\t\tgetReplacement(match, this.original),\n\t\t\t\t\t);\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null)\n\t\t\t\tthis.overwrite(\n\t\t\t\t\tmatch.index,\n\t\t\t\t\tmatch.index + match[0].length,\n\t\t\t\t\tgetReplacement(match, this.original),\n\t\t\t\t);\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tthis.overwrite(index, index + stringLength, replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n","import MagicString from './MagicString.js';\nimport Bundle from './Bundle.js';\nimport SourceMap from './SourceMap.js';\n\nMagicString.Bundle = Bundle;\nMagicString.SourceMap = SourceMap;\nMagicString.default = MagicString; // work around TypeScript bug https://github.com/Rich-Harris/magic-string/pull/121\n\nexport default MagicString;\n"],"names":[],"mappings":";;;;;;CAAe,MAAM,MAAM,CAAC;CAC5B,CAAC,WAAW,CAAC,GAAG,EAAE;CAClB,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,YAAY,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC;CAC5D,EAAE;AACF;CACA,CAAC,GAAG,CAAC,CAAC,EAAE;CACR,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;CACrC,EAAE;AACF;CACA,CAAC,GAAG,CAAC,CAAC,EAAE;CACR,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;CACjD,EAAE;CACF;;CCZe,MAAM,KAAK,CAAC;CAC3B,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE;CAClC,EAAE,IAAI,CAAC,KAAK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AAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;CAC5C,IAAI,MAAM;CACV,IAAI;CACJ,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;AACrD;CACA,EAAE,OAAO,IAAI,CAAC;CACd,EAAE;CACF;;CCpSA,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;CAC5B,WAAW,CAAC,SAAS,GAAG,SAAS,CAAC;CAClC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC;;;;;;;;","x_google_ignoreList":[2]} \ No newline at end of file diff --git a/node_modules/magic-string/package.json b/node_modules/magic-string/package.json index b37e177b..0789d359 100644 --- a/node_modules/magic-string/package.json +++ b/node_modules/magic-string/package.json @@ -1,6 +1,6 @@ { "name": "magic-string", - "version": "0.25.9", + "version": "0.30.5", "description": "Modify strings, generate sourcemaps", "keywords": [ "string", @@ -12,41 +12,53 @@ "repository": "https://github.com/rich-harris/magic-string", "license": "MIT", "author": "Rich Harris", - "main": "dist/magic-string.cjs.js", - "module": "dist/magic-string.es.js", - "jsnext:main": "dist/magic-string.es.js", - "typings": "index.d.ts", + "main": "./dist/magic-string.cjs.js", + "module": "./dist/magic-string.es.mjs", + "jsnext:main": "./dist/magic-string.es.mjs", + "types": "./dist/magic-string.cjs.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": "./dist/magic-string.es.mjs", + "require": "./dist/magic-string.cjs.js" + } + }, "files": [ "dist/*", "index.d.ts", "README.md" ], "scripts": { - "build": "rollup -c", + "build": "rollup -c && cp ./src/index.d.ts ./dist/magic-string.es.d.mts && cp ./src/index.d.ts ./dist/magic-string.cjs.d.ts", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "format": "prettier --single-quote --print-width 100 --use-tabs --write src/*.js src/**/*.js", - "lint": "eslint src test", + "lint": "eslint src test && publint", "prepare": "npm run build", - "prepublishOnly": "rm -rf dist && npm test", + "prepublishOnly": "npm run lint && rm -rf dist && npm test", "release": "bumpp -x \"npm run changelog\" --all --commit --tag --push && npm publish", - "pretest": "npm run lint && npm run build", + "pretest": "npm run build", "test": "mocha", + "bench": "npm run build && node benchmark/index.mjs", "watch": "rollup -cw" }, - "dependencies": { - "sourcemap-codec": "^1.4.8" - }, "devDependencies": { - "@rollup/plugin-buble": "^0.21.3", - "@rollup/plugin-node-resolve": "^13.1.3", - "@rollup/plugin-replace": "^4.0.0", - "bumpp": "^7.1.1", - "conventional-changelog-cli": "^2.2.2", - "eslint": "^7.32.0", - "mocha": "^9.2.1", - "prettier": "^2.5.1", - "rollup": "^2.69.0", - "source-map": "^0.6.1", + "@rollup/plugin-node-resolve": "^15.2.0", + "@rollup/plugin-replace": "^5.0.2", + "benchmark": "^2.1.4", + "bumpp": "^9.2.0", + "conventional-changelog-cli": "^3.0.0", + "eslint": "^8.47.0", + "mocha": "^10.2.0", + "prettier": "^3.0.2", + "publint": "^0.2.1", + "rollup": "^3.28.0", + "source-map-js": "^1.0.2", "source-map-support": "^0.5.21" + }, + "engines": { + "node": ">=12" + }, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" } } diff --git a/node_modules/postcss/lib/map-generator.js b/node_modules/postcss/lib/map-generator.js index 523b4639..b5da1642 100644 --- a/node_modules/postcss/lib/map-generator.js +++ b/node_modules/postcss/lib/map-generator.js @@ -16,6 +16,7 @@ class MapGenerator { this.root = root this.opts = opts this.css = cssString + this.originalCSS = cssString this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute this.memoizedFileURLs = new Map() @@ -74,7 +75,7 @@ class MapGenerator { } } } else if (this.css) { - this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '') + this.css = this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm, '') } } @@ -276,7 +277,7 @@ class MapGenerator { } }) } else { - let input = new Input(this.css, this.opts) + let input = new Input(this.originalCSS, this.opts) if (input.map) this.previousMaps.push(input.map) } } diff --git a/node_modules/postcss/lib/no-work-result.js b/node_modules/postcss/lib/no-work-result.js index a0609f79..aa3fdb4e 100644 --- a/node_modules/postcss/lib/no-work-result.js +++ b/node_modules/postcss/lib/no-work-result.js @@ -37,6 +37,9 @@ class NoWorkResult { if (generatedMap) { this.result.map = generatedMap } + } else { + map.clearAnnotation(); + this.result.css = map.css; } } diff --git a/node_modules/postcss/lib/processor.js b/node_modules/postcss/lib/processor.js index 0629eb4f..9d6a5acd 100644 --- a/node_modules/postcss/lib/processor.js +++ b/node_modules/postcss/lib/processor.js @@ -7,7 +7,7 @@ let Root = require('./root') class Processor { constructor(plugins = []) { - this.version = '8.4.32' + this.version = '8.4.33' this.plugins = this.normalize(plugins) } @@ -43,10 +43,10 @@ class Processor { process(css, opts = {}) { if ( - this.plugins.length === 0 && - typeof opts.parser === 'undefined' && - typeof opts.stringifier === 'undefined' && - typeof opts.syntax === 'undefined' + !this.plugins.length && + !opts.parser && + !opts.stringifier && + !opts.syntax ) { return new NoWorkResult(this, css, opts) } else { diff --git a/node_modules/postcss/package.json b/node_modules/postcss/package.json index a0dfbef5..5a64c735 100644 --- a/node_modules/postcss/package.json +++ b/node_modules/postcss/package.json @@ -1,6 +1,6 @@ { "name": "postcss", - "version": "8.4.32", + "version": "8.4.33", "description": "Tool for transforming styles with JS plugins", "engines": { "node": "^10 || ^12 || >=14" diff --git a/node_modules/rollup/README.md b/node_modules/rollup/README.md index cfb5ce11..721c96a9 100644 --- a/node_modules/rollup/README.md +++ b/node_modules/rollup/README.md @@ -6,6 +6,9 @@ <a href="https://www.npmjs.com/package/rollup"> <img src="https://img.shields.io/npm/v/rollup.svg" alt="npm version" > </a> + <a href="https://nodejs.org/en/about/previous-releases"> + <img src="https://img.shields.io/node/v/rollup.svg" alt="node compatibility"> + </a> <a href="https://packagephobia.now.sh/result?p=rollup"> <img src="https://packagephobia.now.sh/badge?p=rollup" alt="install size" > </a> @@ -13,7 +16,7 @@ <img src="https://codecov.io/gh/rollup/rollup/graph/badge.svg" alt="code coverage" > </a> <a href="#backers" alt="sponsors on Open Collective"> - <img src="https://opencollective.com/rollup/backers/badge.svg" alt="backers" > + <img src="https://opencollective.com/rollup/backers/badge.svg" alt="backers" > </a> <a href="#sponsors" alt="Sponsors on Open Collective"> <img src="https://opencollective.com/rollup/sponsors/badge.svg" alt="sponsors" > @@ -21,7 +24,6 @@ <a href="https://github.com/rollup/rollup/blob/master/LICENSE.md"> <img src="https://img.shields.io/npm/l/rollup.svg" alt="license"> </a> - <a href='https://is.gd/rollup_chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge'> <img src='https://img.shields.io/discord/466787075518365708?color=778cd1&label=chat' alt='Join the chat at https://is.gd/rollup_chat'> </a> diff --git a/node_modules/rollup/dist/bin/rollup b/node_modules/rollup/dist/bin/rollup index 1f363856..08e032e5 100644 --- a/node_modules/rollup/dist/bin/rollup +++ b/node_modules/rollup/dist/bin/rollup @@ -1,8 +1,8 @@ #!/usr/bin/env node /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/es/getLogFilter.js b/node_modules/rollup/dist/es/getLogFilter.js index d586df13..f9d30f87 100644 --- a/node_modules/rollup/dist/es/getLogFilter.js +++ b/node_modules/rollup/dist/es/getLogFilter.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/es/parseAst.js b/node_modules/rollup/dist/es/parseAst.js index ddb89ea5..a0026316 100644 --- a/node_modules/rollup/dist/es/parseAst.js +++ b/node_modules/rollup/dist/es/parseAst.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/es/rollup.js b/node_modules/rollup/dist/es/rollup.js index 9246c1fb..24a7d22f 100644 --- a/node_modules/rollup/dist/es/rollup.js +++ b/node_modules/rollup/dist/es/rollup.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/es/shared/node-entry.js b/node_modules/rollup/dist/es/shared/node-entry.js index d6e3d362..72f3db8b 100644 --- a/node_modules/rollup/dist/es/shared/node-entry.js +++ b/node_modules/rollup/dist/es/shared/node-entry.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup @@ -16,7 +16,7 @@ import { xxhashBase64Url } from '../../native.js'; import { lstat, realpath, readdir, readFile, mkdir, writeFile } from 'node:fs/promises'; import * as tty from 'tty'; -var version = "4.9.1"; +var version = "4.9.5"; const comma = ','.charCodeAt(0); const semicolon = ';'.charCodeAt(0); @@ -2041,11 +2041,10 @@ const RESERVED_NAMES = new Set([ 'with', 'yield' ]); -const RESERVED_NAMES$1 = RESERVED_NAMES; const illegalCharacters = /[^\w$]/g; const startsWithDigit = (value) => /\d/.test(value[0]); -const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES$1.has(value) || value === 'arguments'; +const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES.has(value) || value === 'arguments'; function isLegal(value) { if (needsEscape(value)) { return false; @@ -2061,9 +2060,12 @@ function makeLegal(value) { return value || '_'; } const VALID_IDENTIFIER_REGEXP = /^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u; -const NUMBER_REGEXP = /^\d+$/; +const NUMBER_REGEXP = /^(?:0|[1-9]\d*)$/; function stringifyObjectKeyIfNeeded(key) { - if (VALID_IDENTIFIER_REGEXP.test(key) || NUMBER_REGEXP.test(key)) { + if (VALID_IDENTIFIER_REGEXP.test(key)) { + return key === '__proto__' ? '["__proto__"]' : key; + } + if (NUMBER_REGEXP.test(key) && +key <= Number.MAX_SAFE_INTEGER) { return key; } return JSON.stringify(key); @@ -5780,7 +5782,7 @@ function toBase64(value) { function getSafeName(baseName, usedNames, forbiddenNames) { let safeName = baseName; let count = 1; - while (usedNames.has(safeName) || RESERVED_NAMES$1.has(safeName) || forbiddenNames?.has(safeName)) { + while (usedNames.has(safeName) || RESERVED_NAMES.has(safeName) || forbiddenNames?.has(safeName)) { safeName = `${baseName}$${toBase64(count++)}`; } usedNames.add(safeName); @@ -7311,7 +7313,9 @@ class Identifier extends NodeBase { // in the same function or at top level of module return (this.isTDZAccess = true); } - if (!this.variable.initReached) { + // We ignore the case where the module is not yet executed because + // moduleSideEffects are false. + if (!this.variable.initReached && this.scope.context.module.isExecuted) { // Either a const/let TDZ violation or // var use before declaration was encountered. return (this.isTDZAccess = true); @@ -9597,7 +9601,7 @@ class ExportDefaultDeclaration extends NodeBase { const hasTrailingSemicolon = code.original.charCodeAt(this.end - 1) === 59; /*";"*/ const systemExportNames = format === 'system' && exportNamesByVariable.get(this.variable); if (systemExportNames) { - code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports('${systemExportNames[0]}', `); + code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports(${JSON.stringify(systemExportNames[0])}, `); code.appendRight(hasTrailingSemicolon ? this.end - 1 : this.end, ')' + (hasTrailingSemicolon ? '' : ';')); } else { @@ -10050,14 +10054,14 @@ const HELPER_GENERATORS = { `}${n}${n}`); }, [INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE](_t, snippets, _liveBindings, freeze, symbols) { - const { getDirectReturnFunction, getObject, n } = snippets; + const { getDirectReturnFunction, getObject, n, _ } = snippets; const [left, right] = getDirectReturnFunction(['e'], { functionReturn: true, lineBreakIndent: null, name: INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE }); return `${left}${getFrozen(freeze, getWithToStringTag(symbols, getObject([ - ['__proto__', 'null'], + [null, `__proto__:${_}null`], ['default', 'e'] ], { lineBreakIndent: null }), snippets))}${right}${n}${n}`; }, @@ -13510,7 +13514,7 @@ class Module { } async tryParseAsync() { try { - return (await parseAstAsync(this.info.code)); + return await parseAstAsync(this.info.code); } catch (error_) { return this.error(logModuleParseError(error_, this.id), error_.pos); @@ -13573,6 +13577,12 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip `${t}enumerable:${_}true,${n}` + `${t}get:${_}${left}${importName}${right}${n}});`; } + else if (specifier.reexported === '__proto__') { + exportBlock += + `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` + + `${t}enumerable:${_}true,${n}` + + `${t}value:${_}${importName}${n}});`; + } else { exportBlock += `exports${getPropertyAccess(specifier.reexported)}${_}=${_}${importName};`; } @@ -13586,7 +13596,12 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip if (lhs !== rhs) { if (exportBlock) exportBlock += n; - exportBlock += `${lhs}${_}=${_}${rhs};`; + exportBlock += + exported === '__proto__' + ? `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` + + `${t}enumerable:${_}true,${n}` + + `${t}value:${_}${rhs}${n}});` + : `${lhs}${_}=${_}${rhs};`; } } for (const { name, reexports } of dependencies) { @@ -13678,7 +13693,9 @@ const getDefineProperty = (name, needsLiveBinding, t, { _, getDirectReturnFuncti `${t}${t}enumerable:${_}true,${n}` + `${t}${t}get:${_}${left}${name}[k]${right}${n}${t}})`); } - return `exports[k]${_}=${_}${name}[k]`; + return (`k${_}===${_}'__proto__'${_}?${_}Object.defineProperty(exports,${_}k,${_}{${n}` + + `${t}${t}enumerable:${_}true,${n}` + + `${t}${t}value:${_}${name}[k]${n}${t}})${_}:${_}exports[k]${_}=${_}${name}[k]`); }; function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, indent, snippets) { @@ -14187,20 +14204,22 @@ function analyzeDependencies(dependencies, exports, t, { _, cnst, getObject, get } } if (reexportedNames.length > 1 || hasStarReexport) { - const exportMapping = getObject(reexportedNames, { lineBreakIndent: null }); if (hasStarReexport) { if (!starExcludes) { starExcludes = getStarExcludes({ dependencies, exports }); } + reexportedNames.unshift([null, `__proto__:${_}null`]); + const exportMapping = getObject(reexportedNames, { lineBreakIndent: null }); setter.push(`${cnst} setter${_}=${_}${exportMapping};`, `for${_}(${cnst} name in module)${_}{`, `${t}if${_}(!_starExcludes[name])${_}setter[name]${_}=${_}module[name];`, '}', 'exports(setter);'); } else { + const exportMapping = getObject(reexportedNames, { lineBreakIndent: null }); setter.push(`exports(${exportMapping});`); } } else { const [key, value] = reexportedNames[0]; - setter.push(`exports('${key}',${_}${value});`); + setter.push(`exports(${JSON.stringify(key)},${_}${value});`); } } setters.push(setter.join(`${n}${t}${t}${t}`)); @@ -14220,9 +14239,19 @@ const getStarExcludes = ({ dependencies, exports }) => { } return starExcludes; }; -const getStarExcludesBlock = (starExcludes, t, { _, cnst, getObject, n }) => starExcludes - ? `${n}${t}${cnst} _starExcludes${_}=${_}${getObject([...starExcludes].map(property => [property, '1']), { lineBreakIndent: { base: t, t } })};` - : ''; +const getStarExcludesBlock = (starExcludes, t, { _, cnst, getObject, n }) => { + if (starExcludes) { + const fields = [...starExcludes].map(property => [ + property, + '1' + ]); + fields.unshift([null, `__proto__:${_}null`]); + return `${n}${t}${cnst} _starExcludes${_}=${_}${getObject(fields, { + lineBreakIndent: { base: t, t } + })};`; + } + return ''; +}; const getImportBindingsBlock = (importBindings, t, { _, n }) => (importBindings.length > 0 ? `${n}${t}var ${importBindings.join(`,${_}`)};` : ''); const getHoistedExportsBlock = (exports, t, snippets) => getExportsBlock(exports.filter(expt => expt.hoisted).map(expt => ({ name: expt.exported, value: expt.local })), t, snippets); function getExportsBlock(exports, t, { _, n }) { @@ -14230,10 +14259,12 @@ function getExportsBlock(exports, t, { _, n }) { return ''; } if (exports.length === 1) { - return `exports('${exports[0].name}',${_}${exports[0].value});${n}${n}`; + return `exports(${JSON.stringify(exports[0].name)},${_}${exports[0].value});${n}${n}`; } return (`exports({${n}` + - exports.map(({ name, value }) => `${t}${name}:${_}${value}`).join(`,${n}`) + + exports + .map(({ name, value }) => `${t}${stringifyObjectKeyIfNeeded(name)}:${_}${value}`) + .join(`,${n}`) + `${n}});${n}${n}`); } const getSyntheticExportsBlock = (exports, t, snippets) => getExportsBlock(exports @@ -14507,7 +14538,7 @@ function assignExportsToMangledNames(exports, exportsByName, exportNamesByVariab nameIndex += 9 * 64 ** (exportName.length - 1); exportName = toBase64(nameIndex); } - } while (RESERVED_NAMES$1.has(exportName) || exportsByName.has(exportName)); + } while (RESERVED_NAMES.has(exportName) || exportsByName.has(exportName)); } exportsByName.set(exportName, variable); exportNamesByVariable.set(variable, [exportName]); @@ -16445,10 +16476,10 @@ function commondir(files) { if (files.length === 1) return dirname(files[0]); const commonSegments = files.slice(1).reduce((commonSegments, file) => { - const pathSegements = file.split(/\/+|\\+/); + const pathSegments = file.split(/\/+|\\+/); let index; - for (index = 0; commonSegments[index] === pathSegements[index] && - index < Math.min(commonSegments.length, pathSegements.length); index++) + for (index = 0; commonSegments[index] === pathSegments[index] && + index < Math.min(commonSegments.length, pathSegments.length); index++) ; return commonSegments.slice(0, index); }, files[0].split(/\/+|\\+/)); @@ -16547,7 +16578,7 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con ]; const isValidPropertyName = reservedNamesAsProps ? (name) => VALID_IDENTIFIER_REGEXP.test(name) - : (name) => !RESERVED_NAMES$1.has(name) && VALID_IDENTIFIER_REGEXP.test(name); + : (name) => !RESERVED_NAMES.has(name) && VALID_IDENTIFIER_REGEXP.test(name); return { _, cnst, diff --git a/node_modules/rollup/dist/es/shared/parseAst.js b/node_modules/rollup/dist/es/shared/parseAst.js index c60cac85..85d14e10 100644 --- a/node_modules/rollup/dist/es/shared/parseAst.js +++ b/node_modules/rollup/dist/es/shared/parseAst.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/es/shared/watch.js b/node_modules/rollup/dist/es/shared/watch.js index 17385c1d..64141d24 100644 --- a/node_modules/rollup/dist/es/shared/watch.js +++ b/node_modules/rollup/dist/es/shared/watch.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/getLogFilter.js b/node_modules/rollup/dist/getLogFilter.js index 376b1991..f6893224 100644 --- a/node_modules/rollup/dist/getLogFilter.js +++ b/node_modules/rollup/dist/getLogFilter.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/loadConfigFile.js b/node_modules/rollup/dist/loadConfigFile.js index 6c0cc279..e80a78ff 100644 --- a/node_modules/rollup/dist/loadConfigFile.js +++ b/node_modules/rollup/dist/loadConfigFile.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/parseAst.js b/node_modules/rollup/dist/parseAst.js index 9e76b855..7d0ae338 100644 --- a/node_modules/rollup/dist/parseAst.js +++ b/node_modules/rollup/dist/parseAst.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/rollup.d.ts b/node_modules/rollup/dist/rollup.d.ts index aea63901..b5cb9632 100644 --- a/node_modules/rollup/dist/rollup.d.ts +++ b/node_modules/rollup/dist/rollup.d.ts @@ -1,3 +1,5 @@ +import type { Program } from 'estree'; + export const VERSION: string; // utils @@ -98,13 +100,13 @@ interface ModuleOptions { } export interface SourceDescription extends Partial<PartialNull<ModuleOptions>> { - ast?: AstNode; + ast?: ProgramNode; code: string; map?: SourceMapInput; } export interface TransformModuleJSON { - ast?: AstNode; + ast?: ProgramNode; code: string; // note if plugins use new this.cache to opt-out auto transform cache customTransformCache: boolean; @@ -115,7 +117,7 @@ export interface TransformModuleJSON { } export interface ModuleJSON extends TransformModuleJSON, ModuleOptions { - ast: AstNode; + ast: ProgramNode; dependencies: string[]; id: string; resolvedIds: ResolvedIdMap; @@ -171,7 +173,7 @@ export type EmittedFile = EmittedAsset | EmittedChunk | EmittedPrebuiltChunk; export type EmitFile = (emittedFile: EmittedFile) => string; interface ModuleInfo extends ModuleOptions { - ast: AstNode | null; + ast: ProgramNode | null; code: string | null; dynamicImporters: readonly string[]; dynamicallyImportedIdResolutions: readonly ResolvedId[]; @@ -204,7 +206,7 @@ type LoggingFunctionWithPosition = ( export type ParseAst = ( input: string, options?: { allowReturnOutsideFunction?: boolean } -) => AstNode; +) => ProgramNode; // declare AbortSignal here for environments without DOM lib or @types/node declare global { @@ -214,7 +216,7 @@ declare global { export type ParseAstAsync = ( input: string, options?: { allowReturnOutsideFunction?: boolean; signal?: AbortSignal } -) => Promise<AstNode>; +) => Promise<ProgramNode>; export interface PluginContext extends MinimalPluginContext { addWatchFile: (id: string) => void; @@ -280,7 +282,7 @@ export type ResolveIdHook = ( export type ShouldTransformCachedModuleHook = ( this: PluginContext, options: { - ast: AstNode; + ast: ProgramNode; code: string; id: string; meta: CustomPluginOptions; @@ -977,6 +979,8 @@ interface AstNode { type: string; } +type ProgramNode = Program & AstNode; + export function defineConfig(options: RollupOptions): RollupOptions; export function defineConfig(options: RollupOptions[]): RollupOptions[]; export function defineConfig(optionsFunction: RollupOptionsFunction): RollupOptionsFunction; diff --git a/node_modules/rollup/dist/rollup.js b/node_modules/rollup/dist/rollup.js index dd02ad59..db65532a 100644 --- a/node_modules/rollup/dist/rollup.js +++ b/node_modules/rollup/dist/rollup.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/shared/fsevents-importer.js b/node_modules/rollup/dist/shared/fsevents-importer.js index 71737700..925122cd 100644 --- a/node_modules/rollup/dist/shared/fsevents-importer.js +++ b/node_modules/rollup/dist/shared/fsevents-importer.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/shared/index.js b/node_modules/rollup/dist/shared/index.js index bfbaedda..49f7229a 100644 --- a/node_modules/rollup/dist/shared/index.js +++ b/node_modules/rollup/dist/shared/index.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/shared/loadConfigFile.js b/node_modules/rollup/dist/shared/loadConfigFile.js index 5e215346..4754586c 100644 --- a/node_modules/rollup/dist/shared/loadConfigFile.js +++ b/node_modules/rollup/dist/shared/loadConfigFile.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/shared/parseAst.js b/node_modules/rollup/dist/shared/parseAst.js index adbe7478..79a29cdf 100644 --- a/node_modules/rollup/dist/shared/parseAst.js +++ b/node_modules/rollup/dist/shared/parseAst.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/shared/rollup.js b/node_modules/rollup/dist/shared/rollup.js index cc825759..6db95454 100644 --- a/node_modules/rollup/dist/shared/rollup.js +++ b/node_modules/rollup/dist/shared/rollup.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup @@ -31,7 +31,7 @@ function _interopNamespaceDefault(e) { const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty); -var version = "4.9.1"; +var version = "4.9.5"; function ensureArray$1(items) { if (Array.isArray(items)) { @@ -3487,11 +3487,10 @@ const RESERVED_NAMES = new Set([ 'with', 'yield' ]); -const RESERVED_NAMES$1 = RESERVED_NAMES; const illegalCharacters = /[^\w$]/g; const startsWithDigit = (value) => /\d/.test(value[0]); -const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES$1.has(value) || value === 'arguments'; +const needsEscape = (value) => startsWithDigit(value) || RESERVED_NAMES.has(value) || value === 'arguments'; function isLegal(value) { if (needsEscape(value)) { return false; @@ -3507,9 +3506,12 @@ function makeLegal(value) { return value || '_'; } const VALID_IDENTIFIER_REGEXP = /^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u; -const NUMBER_REGEXP = /^\d+$/; +const NUMBER_REGEXP = /^(?:0|[1-9]\d*)$/; function stringifyObjectKeyIfNeeded(key) { - if (VALID_IDENTIFIER_REGEXP.test(key) || NUMBER_REGEXP.test(key)) { + if (VALID_IDENTIFIER_REGEXP.test(key)) { + return key === '__proto__' ? '["__proto__"]' : key; + } + if (NUMBER_REGEXP.test(key) && +key <= Number.MAX_SAFE_INTEGER) { return key; } return JSON.stringify(key); @@ -7214,7 +7216,7 @@ class ParameterVariable extends LocalVariable { function getSafeName(baseName, usedNames, forbiddenNames) { let safeName = baseName; let count = 1; - while (usedNames.has(safeName) || RESERVED_NAMES$1.has(safeName) || forbiddenNames?.has(safeName)) { + while (usedNames.has(safeName) || RESERVED_NAMES.has(safeName) || forbiddenNames?.has(safeName)) { safeName = `${baseName}$${toBase64(count++)}`; } usedNames.add(safeName); @@ -8743,7 +8745,9 @@ class Identifier extends NodeBase { // in the same function or at top level of module return (this.isTDZAccess = true); } - if (!this.variable.initReached) { + // We ignore the case where the module is not yet executed because + // moduleSideEffects are false. + if (!this.variable.initReached && this.scope.context.module.isExecuted) { // Either a const/let TDZ violation or // var use before declaration was encountered. return (this.isTDZAccess = true); @@ -11029,7 +11033,7 @@ class ExportDefaultDeclaration extends NodeBase { const hasTrailingSemicolon = code.original.charCodeAt(this.end - 1) === 59; /*";"*/ const systemExportNames = format === 'system' && exportNamesByVariable.get(this.variable); if (systemExportNames) { - code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports('${systemExportNames[0]}', `); + code.overwrite(this.start, declarationStart, `${cnst} ${this.variable.getName(getPropertyAccess)} = exports(${JSON.stringify(systemExportNames[0])}, `); code.appendRight(hasTrailingSemicolon ? this.end - 1 : this.end, ')' + (hasTrailingSemicolon ? '' : ';')); } else { @@ -11482,14 +11486,14 @@ const HELPER_GENERATORS = { `}${n}${n}`); }, [INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE](_t, snippets, _liveBindings, freeze, symbols) { - const { getDirectReturnFunction, getObject, n } = snippets; + const { getDirectReturnFunction, getObject, n, _ } = snippets; const [left, right] = getDirectReturnFunction(['e'], { functionReturn: true, lineBreakIndent: null, name: INTEROP_NAMESPACE_DEFAULT_ONLY_VARIABLE }); return `${left}${getFrozen(freeze, getWithToStringTag(symbols, getObject([ - ['__proto__', 'null'], + [null, `__proto__:${_}null`], ['default', 'e'] ], { lineBreakIndent: null }), snippets))}${right}${n}${n}`; }, @@ -14935,7 +14939,7 @@ class Module { } async tryParseAsync() { try { - return (await parseAst_js.parseAstAsync(this.info.code)); + return await parseAst_js.parseAstAsync(this.info.code); } catch (error_) { return this.error(parseAst_js.logModuleParseError(error_, this.id), error_.pos); @@ -14998,6 +15002,12 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip `${t}enumerable:${_}true,${n}` + `${t}get:${_}${left}${importName}${right}${n}});`; } + else if (specifier.reexported === '__proto__') { + exportBlock += + `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` + + `${t}enumerable:${_}true,${n}` + + `${t}value:${_}${importName}${n}});`; + } else { exportBlock += `exports${getPropertyAccess(specifier.reexported)}${_}=${_}${importName};`; } @@ -15011,7 +15021,12 @@ function getExportBlock$1(exports, dependencies, namedExportsMode, interop, snip if (lhs !== rhs) { if (exportBlock) exportBlock += n; - exportBlock += `${lhs}${_}=${_}${rhs};`; + exportBlock += + exported === '__proto__' + ? `Object.defineProperty(exports,${_}"__proto__",${_}{${n}` + + `${t}enumerable:${_}true,${n}` + + `${t}value:${_}${rhs}${n}});` + : `${lhs}${_}=${_}${rhs};`; } } for (const { name, reexports } of dependencies) { @@ -15103,7 +15118,9 @@ const getDefineProperty = (name, needsLiveBinding, t, { _, getDirectReturnFuncti `${t}${t}enumerable:${_}true,${n}` + `${t}${t}get:${_}${left}${name}[k]${right}${n}${t}})`); } - return `exports[k]${_}=${_}${name}[k]`; + return (`k${_}===${_}'__proto__'${_}?${_}Object.defineProperty(exports,${_}k,${_}{${n}` + + `${t}${t}enumerable:${_}true,${n}` + + `${t}${t}value:${_}${name}[k]${n}${t}})${_}:${_}exports[k]${_}=${_}${name}[k]`); }; function getInteropBlock(dependencies, interop, externalLiveBindings, freeze, symbols, accessedGlobals, indent, snippets) { @@ -15612,20 +15629,22 @@ function analyzeDependencies(dependencies, exports, t, { _, cnst, getObject, get } } if (reexportedNames.length > 1 || hasStarReexport) { - const exportMapping = getObject(reexportedNames, { lineBreakIndent: null }); if (hasStarReexport) { if (!starExcludes) { starExcludes = getStarExcludes({ dependencies, exports }); } + reexportedNames.unshift([null, `__proto__:${_}null`]); + const exportMapping = getObject(reexportedNames, { lineBreakIndent: null }); setter.push(`${cnst} setter${_}=${_}${exportMapping};`, `for${_}(${cnst} name in module)${_}{`, `${t}if${_}(!_starExcludes[name])${_}setter[name]${_}=${_}module[name];`, '}', 'exports(setter);'); } else { + const exportMapping = getObject(reexportedNames, { lineBreakIndent: null }); setter.push(`exports(${exportMapping});`); } } else { const [key, value] = reexportedNames[0]; - setter.push(`exports('${key}',${_}${value});`); + setter.push(`exports(${JSON.stringify(key)},${_}${value});`); } } setters.push(setter.join(`${n}${t}${t}${t}`)); @@ -15645,9 +15664,19 @@ const getStarExcludes = ({ dependencies, exports }) => { } return starExcludes; }; -const getStarExcludesBlock = (starExcludes, t, { _, cnst, getObject, n }) => starExcludes - ? `${n}${t}${cnst} _starExcludes${_}=${_}${getObject([...starExcludes].map(property => [property, '1']), { lineBreakIndent: { base: t, t } })};` - : ''; +const getStarExcludesBlock = (starExcludes, t, { _, cnst, getObject, n }) => { + if (starExcludes) { + const fields = [...starExcludes].map(property => [ + property, + '1' + ]); + fields.unshift([null, `__proto__:${_}null`]); + return `${n}${t}${cnst} _starExcludes${_}=${_}${getObject(fields, { + lineBreakIndent: { base: t, t } + })};`; + } + return ''; +}; const getImportBindingsBlock = (importBindings, t, { _, n }) => (importBindings.length > 0 ? `${n}${t}var ${importBindings.join(`,${_}`)};` : ''); const getHoistedExportsBlock = (exports, t, snippets) => getExportsBlock(exports.filter(expt => expt.hoisted).map(expt => ({ name: expt.exported, value: expt.local })), t, snippets); function getExportsBlock(exports, t, { _, n }) { @@ -15655,10 +15684,12 @@ function getExportsBlock(exports, t, { _, n }) { return ''; } if (exports.length === 1) { - return `exports('${exports[0].name}',${_}${exports[0].value});${n}${n}`; + return `exports(${JSON.stringify(exports[0].name)},${_}${exports[0].value});${n}${n}`; } return (`exports({${n}` + - exports.map(({ name, value }) => `${t}${name}:${_}${value}`).join(`,${n}`) + + exports + .map(({ name, value }) => `${t}${stringifyObjectKeyIfNeeded(name)}:${_}${value}`) + .join(`,${n}`) + `${n}});${n}${n}`); } const getSyntheticExportsBlock = (exports, t, snippets) => getExportsBlock(exports @@ -15932,7 +15963,7 @@ function assignExportsToMangledNames(exports, exportsByName, exportNamesByVariab nameIndex += 9 * 64 ** (exportName.length - 1); exportName = toBase64(nameIndex); } - } while (RESERVED_NAMES$1.has(exportName) || exportsByName.has(exportName)); + } while (RESERVED_NAMES.has(exportName) || exportsByName.has(exportName)); } exportsByName.set(exportName, variable); exportNamesByVariable.set(variable, [exportName]); @@ -17765,10 +17796,10 @@ function commondir(files) { if (files.length === 1) return node_path.dirname(files[0]); const commonSegments = files.slice(1).reduce((commonSegments, file) => { - const pathSegements = file.split(/\/+|\\+/); + const pathSegments = file.split(/\/+|\\+/); let index; - for (index = 0; commonSegments[index] === pathSegements[index] && - index < Math.min(commonSegments.length, pathSegements.length); index++) + for (index = 0; commonSegments[index] === pathSegments[index] && + index < Math.min(commonSegments.length, pathSegments.length); index++) ; return commonSegments.slice(0, index); }, files[0].split(/\/+|\\+/)); @@ -17867,7 +17898,7 @@ function getGenerateCodeSnippets({ compact, generatedCode: { arrowFunctions, con ]; const isValidPropertyName = reservedNamesAsProps ? (name) => VALID_IDENTIFIER_REGEXP.test(name) - : (name) => !RESERVED_NAMES$1.has(name) && VALID_IDENTIFIER_REGEXP.test(name); + : (name) => !RESERVED_NAMES.has(name) && VALID_IDENTIFIER_REGEXP.test(name); return { _, cnst, diff --git a/node_modules/rollup/dist/shared/watch-cli.js b/node_modules/rollup/dist/shared/watch-cli.js index c9d594f7..5a196df6 100644 --- a/node_modules/rollup/dist/shared/watch-cli.js +++ b/node_modules/rollup/dist/shared/watch-cli.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/dist/shared/watch.js b/node_modules/rollup/dist/shared/watch.js index 58dc6a2c..922f6dfb 100644 --- a/node_modules/rollup/dist/shared/watch.js +++ b/node_modules/rollup/dist/shared/watch.js @@ -1,7 +1,7 @@ /* @license - Rollup.js v4.9.1 - Sun, 17 Dec 2023 06:25:43 GMT - commit d56ac63dc0452820272a0d7536340277f7db68bf + Rollup.js v4.9.5 + Fri, 12 Jan 2024 06:15:44 GMT - commit 7fa474cc5ed91c96a4ff80e286aa8534bc15834f https://github.com/rollup/rollup diff --git a/node_modules/rollup/package.json b/node_modules/rollup/package.json index 5ac0a626..2cf5775e 100644 --- a/node_modules/rollup/package.json +++ b/node_modules/rollup/package.json @@ -1,6 +1,6 @@ { "name": "rollup", - "version": "4.9.1", + "version": "4.9.5", "description": "Next-generation ES module bundler", "main": "dist/rollup.js", "module": "dist/es/rollup.js", @@ -81,7 +81,7 @@ "test:package": "node scripts/test-package.js", "test:options": "node scripts/test-options.js", "test:only": "mocha test/test.js", - "test:typescript": "shx rm -rf test/typescript/dist && shx cp -r dist test/typescript/ && tsc --noEmit -p test/typescript && tsc --noEmit", + "test:typescript": "shx rm -rf test/typescript/dist && shx cp -r dist test/typescript/ && tsc --noEmit -p test/typescript && tsc --noEmit && tsc --noEmit -p scripts", "test:browser": "mocha test/browser/index.js", "watch": "rollup --config rollup.config.ts --configPlugin typescript --watch" }, @@ -101,66 +101,69 @@ "homepage": "https://rollupjs.org/", "optionalDependencies": { "fsevents": "~2.3.2", - "@rollup/rollup-darwin-arm64": "4.9.1", - "@rollup/rollup-android-arm64": "4.9.1", - "@rollup/rollup-win32-arm64-msvc": "4.9.1", - "@rollup/rollup-linux-arm64-gnu": "4.9.1", - "@rollup/rollup-linux-arm64-musl": "4.9.1", - "@rollup/rollup-android-arm-eabi": "4.9.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.1", - "@rollup/rollup-win32-ia32-msvc": "4.9.1", - "@rollup/rollup-linux-riscv64-gnu": "4.9.1", - "@rollup/rollup-darwin-x64": "4.9.1", - "@rollup/rollup-win32-x64-msvc": "4.9.1", - "@rollup/rollup-linux-x64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-musl": "4.9.1" + "@rollup/rollup-darwin-arm64": "4.9.5", + "@rollup/rollup-android-arm64": "4.9.5", + "@rollup/rollup-win32-arm64-msvc": "4.9.5", + "@rollup/rollup-linux-arm64-gnu": "4.9.5", + "@rollup/rollup-linux-arm64-musl": "4.9.5", + "@rollup/rollup-android-arm-eabi": "4.9.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.5", + "@rollup/rollup-win32-ia32-msvc": "4.9.5", + "@rollup/rollup-linux-riscv64-gnu": "4.9.5", + "@rollup/rollup-darwin-x64": "4.9.5", + "@rollup/rollup-win32-x64-msvc": "4.9.5", + "@rollup/rollup-linux-x64-gnu": "4.9.5", + "@rollup/rollup-linux-x64-musl": "4.9.5" + }, + "dependencies": { + "@types/estree": "1.0.5" }, "devDependenciesComments": { "@rollup/plugin-typescript": "It appears that 11.1.3 breaks sourcemaps" }, "devDependencies": { - "@codemirror/commands": "^6.3.2", + "@codemirror/commands": "^6.3.3", "@codemirror/lang-javascript": "^6.2.1", - "@codemirror/language": "^6.9.3", + "@codemirror/language": "^6.10.0", "@codemirror/search": "^6.5.5", - "@codemirror/state": "^6.3.3", - "@codemirror/view": "^6.22.2", + "@codemirror/state": "^6.4.0", + "@codemirror/view": "^6.23.0", "@jridgewell/sourcemap-codec": "^1.4.15", "@mermaid-js/mermaid-cli": "^10.6.1", "@napi-rs/cli": "^2.17.0", "@rollup/plugin-alias": "^5.1.0", "@rollup/plugin-buble": "^1.0.3", "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-json": "^6.0.1", + "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "^5.0.5", "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "11.1.5", "@rollup/pluginutils": "^5.1.0", - "@types/estree": "1.0.5", + "@types/inquirer": "^9.0.7", "@types/mocha": "^10.0.6", "@types/node": "18.0.0", "@types/yargs-parser": "^21.0.3", - "@typescript-eslint/eslint-plugin": "^6.14.0", - "@typescript-eslint/parser": "^6.14.0", - "@vue/eslint-config-prettier": "^8.0.0", + "@typescript-eslint/eslint-plugin": "^6.18.1", + "@typescript-eslint/parser": "^6.18.1", + "@vue/eslint-config-prettier": "^9.0.0", "@vue/eslint-config-typescript": "^12.0.0", - "acorn": "^8.11.2", + "acorn": "^8.11.3", "acorn-import-assertions": "^1.9.0", "buble": "^0.20.0", "builtin-modules": "^3.3.0", "chokidar": "^3.5.3", "colorette": "^2.0.20", "concurrently": "^8.2.2", - "core-js": "^3.34.0", + "core-js": "^3.35.0", "date-time": "^4.0.0", "es5-shim": "^4.6.7", "es6-shim": "^0.35.8", - "eslint": "^8.55.0", + "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-import": "^2.29.0", - "eslint-plugin-prettier": "^5.0.1", - "eslint-plugin-unicorn": "^49.0.0", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-prettier": "^5.1.2", + "eslint-plugin-unicorn": "^50.0.1", "eslint-plugin-vue": "^9.19.2", "fixturify": "^3.0.0", "flru": "^1.0.2", @@ -179,28 +182,27 @@ "pretty-bytes": "^6.1.1", "pretty-ms": "^8.0.0", "requirejs": "^2.3.6", - "rollup": "^4.8.0", + "rollup": "^4.9.4", "rollup-plugin-license": "^3.2.0", "rollup-plugin-string": "^3.0.0", - "rollup-plugin-thatworks": "^1.0.4", "semver": "^7.5.4", "shx": "^0.3.4", "signal-exit": "^4.1.0", "source-map": "^0.7.4", "source-map-support": "^0.5.21", - "systemjs": "^6.14.2", + "systemjs": "^6.14.3", "terser": "^5.26.0", "tslib": "^2.6.2", "typescript": "^5.3.3", - "vite": "^5.0.7", - "vitepress": "^1.0.0-rc.31", - "vue": "^3.3.11", + "vite": "^5.0.11", + "vitepress": "^1.0.0-rc.36", + "vue": "^3.4.6", "wasm-pack": "^0.12.1", "weak-napi": "^2.0.2", "yargs-parser": "^21.1.1" }, "overrides": { - "axios": "^1.6.2", + "axios": "^1.6.5", "semver": "^7.5.4" }, "files": [ diff --git a/node_modules/set-function-length/CHANGELOG.md b/node_modules/set-function-length/CHANGELOG.md index 9539676f..8abeb8b5 100644 --- a/node_modules/set-function-length/CHANGELOG.md +++ b/node_modules/set-function-length/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v1.2.0](https://github.com/ljharb/set-function-length/compare/v1.1.1...v1.2.0) - 2024-01-14 + +### Commits + +- [New] add types [`f6d9088`](https://github.com/ljharb/set-function-length/commit/f6d9088b9283a3112b21c6776e8bef6d1f30558a) +- [Fix] ensure `env` properties are always booleans [`0c42f84`](https://github.com/ljharb/set-function-length/commit/0c42f84979086389b3229e1b4272697fd352275a) +- [Dev Deps] update `aud`, `call-bind`, `npmignore`, `tape` [`2b75f75`](https://github.com/ljharb/set-function-length/commit/2b75f75468093a4bb8ce8ca989b2edd2e80d95d1) +- [Deps] update `get-intrinsic`, `has-property-descriptors` [`19bf0fc`](https://github.com/ljharb/set-function-length/commit/19bf0fc4ffaa5ad425acbfa150516be9f3b6263a) +- [meta] add `sideEffects` flag [`8bb9b78`](https://github.com/ljharb/set-function-length/commit/8bb9b78c11c621123f725c9470222f43466c01d0) + ## [v1.1.1](https://github.com/ljharb/set-function-length/compare/v1.1.0...v1.1.1) - 2023-10-19 ### Fixed diff --git a/node_modules/set-function-length/env.d.ts b/node_modules/set-function-length/env.d.ts new file mode 100644 index 00000000..c2e54603 --- /dev/null +++ b/node_modules/set-function-length/env.d.ts @@ -0,0 +1,6 @@ +export var boundFnsHaveConfigurableLengths: boolean; +export var boundFnsHaveWritableLengths: boolean; +export var functionsHaveConfigurableLengths: boolean; +export var functionsHaveWritableLengths: boolean; +export declare let __proto__: null; +//# sourceMappingURL=env.d.ts.map \ No newline at end of file diff --git a/node_modules/set-function-length/env.d.ts.map b/node_modules/set-function-length/env.d.ts.map new file mode 100644 index 00000000..d4ad60de --- /dev/null +++ b/node_modules/set-function-length/env.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["env.js"],"names":[],"mappings":"AAaA,oDAAsE;AAEtE,gDAA8D;AAN9D,qDAA2E;AAE3E,iDAAmE"} \ No newline at end of file diff --git a/node_modules/set-function-length/env.js b/node_modules/set-function-length/env.js index 80c09116..5b8278e0 100644 --- a/node_modules/set-function-length/env.js +++ b/node_modules/set-function-length/env.js @@ -1,14 +1,19 @@ 'use strict'; var gOPD = require('gopd'); +var bind = require('function-bind'); -var functionsHaveConfigurableLengths = gOPD && gOPD(function () {}, 'length').configurable; +var unbound = gOPD && gOPD(function () {}, 'length'); +// @ts-expect-error ts(2555) TS is overly strict with .call +var bound = gOPD && gOPD(bind.call(function () {}), 'length'); -var functionsHaveWritableLengths = gOPD && gOPD(function () {}, 'length').writable; +var functionsHaveConfigurableLengths = !!(unbound && unbound.configurable); -var boundFnsHaveConfigurableLengths = gOPD && gOPD(function () {}.bind(), 'length').configurable; +var functionsHaveWritableLengths = !!(unbound && unbound.writable); -var boundFnsHaveWritableLengths = gOPD && gOPD(function () {}.bind(), 'length').writable; +var boundFnsHaveConfigurableLengths = !!(bound && bound.configurable); + +var boundFnsHaveWritableLengths = !!(bound && bound.writable); module.exports = { __proto__: null, diff --git a/node_modules/set-function-length/index.d.ts b/node_modules/set-function-length/index.d.ts new file mode 100644 index 00000000..3430bbf6 --- /dev/null +++ b/node_modules/set-function-length/index.d.ts @@ -0,0 +1,7 @@ +declare namespace _exports { + export { Func }; +} +declare const _exports: <T extends Func = Func>(fn: T, length: number, loose?: boolean) => T; +export = _exports; +type Func = (...args: unknown[]) => unknown; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/set-function-length/index.d.ts.map b/node_modules/set-function-length/index.d.ts.map new file mode 100644 index 00000000..0031325a --- /dev/null +++ b/node_modules/set-function-length/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":";;;+DAYkD,MAAM,UAAU,OAAO;;sBAFjD,OAAO,EAAE,KAAK,OAAO"} \ No newline at end of file diff --git a/node_modules/set-function-length/index.js b/node_modules/set-function-length/index.js index 7a31688e..c4263869 100644 --- a/node_modules/set-function-length/index.js +++ b/node_modules/set-function-length/index.js @@ -8,6 +8,9 @@ var gOPD = require('gopd'); var $TypeError = GetIntrinsic('%TypeError%'); var $floor = GetIntrinsic('%Math.floor%'); +/** @typedef {(...args: unknown[]) => unknown} Func */ + +/** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */ module.exports = function setFunctionLength(fn, length) { if (typeof fn !== 'function') { throw new $TypeError('`fn` is not a function'); @@ -32,9 +35,9 @@ module.exports = function setFunctionLength(fn, length) { if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { if (hasDescriptors) { - define(fn, 'length', length, true, true); + define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true); } else { - define(fn, 'length', length); + define(/** @type {Parameters<define>[0]} */ (fn), 'length', length); } } return fn; diff --git a/node_modules/set-function-length/package.json b/node_modules/set-function-length/package.json index fdc2cb61..3584411f 100644 --- a/node_modules/set-function-length/package.json +++ b/node_modules/set-function-length/package.json @@ -1,6 +1,6 @@ { "name": "set-function-length", - "version": "1.1.1", + "version": "1.2.0", "description": "Set a function's length property", "main": "index.js", "exports": { @@ -8,15 +8,21 @@ "./env": "./env.js", "./package.json": "./package.json" }, + "sideEffects": false, "directories": { "test": "test" }, "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", + "prepack": "npmignore --auto --commentLines=autogenerated && npm run emit", "prepublish": "not-in-publish || npm run prepublishOnly", "prepublishOnly": "safe-publish-latest", + "tsc": "tsc -p .", + "preemit": "rm -f *.ts *.ts.map test/*.ts test/*.ts.map", + "emit": "npm run tsc -- --noEmit false --emitDeclarationOnly", + "postemit": "rm test/*.ts test/*.ts.map", "prelint": "evalmd README.md", "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", "pretest": "npm run lint", "tests-only": "nyc tape 'test/**/*.js'", "test": "npm run tests-only", @@ -42,27 +48,38 @@ "url": "https://github.com/ljharb/set-function-length/issues" }, "homepage": "https://github.com/ljharb/set-function-length#readme", + "dependencies": { + "define-data-property": "^1.1.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, "devDependencies": { "@ljharb/eslint-config": "^21.1.0", - "aud": "^2.0.3", + "@types/call-bind": "^1.0.5", + "@types/define-properties": "^1.1.5", + "@types/es-value-fixtures": "^1.4.4", + "@types/for-each": "^0.3.3", + "@types/function-bind": "^1.1.10", + "@types/gopd": "^1.0.3", + "@types/has-property-descriptors": "^1.0.3", + "@types/object-inspect": "^1.8.4", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", "auto-changelog": "^2.4.0", - "call-bind": "^1.0.4", + "call-bind": "^1.0.5", "es-value-fixtures": "^1.4.2", "eslint": "=8.8.0", "evalmd": "^0.0.19", "for-each": "^0.3.3", "in-publish": "^2.0.1", - "npmignore": "^0.3.0", + "npmignore": "^0.3.1", "nyc": "^10.3.2", "object-inspect": "^1.13.1", "safe-publish-latest": "^2.0.0", - "tape": "^5.7.1" - }, - "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "tape": "^5.7.3", + "typescript": "^5.4.0-dev.20240113" }, "engines": { "node": ">= 0.4" @@ -78,7 +95,9 @@ "publishConfig": { "ignore": [ ".github/workflows", - "test" + "test", + "!*.d.ts", + "!*.d.ts.map" ] } } diff --git a/node_modules/set-function-length/tsconfig.json b/node_modules/set-function-length/tsconfig.json new file mode 100644 index 00000000..9d730184 --- /dev/null +++ b/node_modules/set-function-length/tsconfig.json @@ -0,0 +1,59 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/source-map/CHANGELOG.md b/node_modules/source-map/CHANGELOG.md deleted file mode 100644 index 3a8c066c..00000000 --- a/node_modules/source-map/CHANGELOG.md +++ /dev/null @@ -1,301 +0,0 @@ -# Change Log - -## 0.5.6 - -* Fix for regression when people were using numbers as names in source maps. See - #236. - -## 0.5.5 - -* Fix "regression" of unsupported, implementation behavior that half the world - happens to have come to depend on. See #235. - -* Fix regression involving function hoisting in SpiderMonkey. See #233. - -## 0.5.4 - -* Large performance improvements to source-map serialization. See #228 and #229. - -## 0.5.3 - -* Do not include unnecessary distribution files. See - commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86. - -## 0.5.2 - -* Include browser distributions of the library in package.json's `files`. See - issue #212. - -## 0.5.1 - -* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See - ff05274becc9e6e1295ed60f3ea090d31d843379. - -## 0.5.0 - -* Node 0.8 is no longer supported. - -* Use webpack instead of dryice for bundling. - -* Big speedups serializing source maps. See pull request #203. - -* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that - explicitly start with the source root. See issue #199. - -## 0.4.4 - -* Fix an issue where using a `SourceMapGenerator` after having created a - `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See - issue #191. - -* Fix an issue with where `SourceMapGenerator` would mistakenly consider - different mappings as duplicates of each other and avoid generating them. See - issue #192. - -## 0.4.3 - -* A very large number of performance improvements, particularly when parsing - source maps. Collectively about 75% of time shaved off of the source map - parsing benchmark! - -* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy - searching in the presence of a column option. See issue #177. - -* Fix a bug with joining a source and its source root when the source is above - the root. See issue #182. - -* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to - determine when all sources' contents are inlined into the source map. See - issue #190. - -## 0.4.2 - -* Add an `.npmignore` file so that the benchmarks aren't pulled down by - dependent projects. Issue #169. - -* Add an optional `column` argument to - `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines - with no mappings. Issues #172 and #173. - -## 0.4.1 - -* Fix accidentally defining a global variable. #170. - -## 0.4.0 - -* The default direction for fuzzy searching was changed back to its original - direction. See #164. - -* There is now a `bias` option you can supply to `SourceMapConsumer` to control - the fuzzy searching direction. See #167. - -* About an 8% speed up in parsing source maps. See #159. - -* Added a benchmark for parsing and generating source maps. - -## 0.3.0 - -* Change the default direction that searching for positions fuzzes when there is - not an exact match. See #154. - -* Support for environments using json2.js for JSON serialization. See #156. - -## 0.2.0 - -* Support for consuming "indexed" source maps which do not have any remote - sections. See pull request #127. This introduces a minor backwards - incompatibility if you are monkey patching `SourceMapConsumer.prototype` - methods. - -## 0.1.43 - -* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue - #148 for some discussion and issues #150, #151, and #152 for implementations. - -## 0.1.42 - -* Fix an issue where `SourceNode`s from different versions of the source-map - library couldn't be used in conjunction with each other. See issue #142. - -## 0.1.41 - -* Fix a bug with getting the source content of relative sources with a "./" - prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). - -* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the - column span of each mapping. - -* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find - all generated positions associated with a given original source and line. - -## 0.1.40 - -* Performance improvements for parsing source maps in SourceMapConsumer. - -## 0.1.39 - -* Fix a bug where setting a source's contents to null before any source content - had been set before threw a TypeError. See issue #131. - -## 0.1.38 - -* Fix a bug where finding relative paths from an empty path were creating - absolute paths. See issue #129. - -## 0.1.37 - -* Fix a bug where if the source root was an empty string, relative source paths - would turn into absolute source paths. Issue #124. - -## 0.1.36 - -* Allow the `names` mapping property to be an empty string. Issue #121. - -## 0.1.35 - -* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` - to specify a path that relative sources in the second parameter should be - relative to. Issue #105. - -* If no file property is given to a `SourceMapGenerator`, then the resulting - source map will no longer have a `null` file property. The property will - simply not exist. Issue #104. - -* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. - Issue #116. - -## 0.1.34 - -* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. - -* Fix bug involving source contents and the - `SourceMapGenerator.prototype.applySourceMap`. Issue #100. - -## 0.1.33 - -* Fix some edge cases surrounding path joining and URL resolution. - -* Add a third parameter for relative path to - `SourceMapGenerator.prototype.applySourceMap`. - -* Fix issues with mappings and EOLs. - -## 0.1.32 - -* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns - (issue 92). - -* Fixed test runner to actually report number of failed tests as its process - exit code. - -* Fixed a typo when reporting bad mappings (issue 87). - -## 0.1.31 - -* Delay parsing the mappings in SourceMapConsumer until queried for a source - location. - -* Support Sass source maps (which at the time of writing deviate from the spec - in small ways) in SourceMapConsumer. - -## 0.1.30 - -* Do not join source root with a source, when the source is a data URI. - -* Extend the test runner to allow running single specific test files at a time. - -* Performance improvements in `SourceNode.prototype.walk` and - `SourceMapConsumer.prototype.eachMapping`. - -* Source map browser builds will now work inside Workers. - -* Better error messages when attempting to add an invalid mapping to a - `SourceMapGenerator`. - -## 0.1.29 - -* Allow duplicate entries in the `names` and `sources` arrays of source maps - (usually from TypeScript) we are parsing. Fixes github issue 72. - -## 0.1.28 - -* Skip duplicate mappings when creating source maps from SourceNode; github - issue 75. - -## 0.1.27 - -* Don't throw an error when the `file` property is missing in SourceMapConsumer, - we don't use it anyway. - -## 0.1.26 - -* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. - -## 0.1.25 - -* Make compatible with browserify - -## 0.1.24 - -* Fix issue with absolute paths and `file://` URIs. See - https://bugzilla.mozilla.org/show_bug.cgi?id=885597 - -## 0.1.23 - -* Fix issue with absolute paths and sourcesContent, github issue 64. - -## 0.1.22 - -* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. - -## 0.1.21 - -* Fixed handling of sources that start with a slash so that they are relative to - the source root's host. - -## 0.1.20 - -* Fixed github issue #43: absolute URLs aren't joined with the source root - anymore. - -## 0.1.19 - -* Using Travis CI to run tests. - -## 0.1.18 - -* Fixed a bug in the handling of sourceRoot. - -## 0.1.17 - -* Added SourceNode.fromStringWithSourceMap. - -## 0.1.16 - -* Added missing documentation. - -* Fixed the generating of empty mappings in SourceNode. - -## 0.1.15 - -* Added SourceMapGenerator.applySourceMap. - -## 0.1.14 - -* The sourceRoot is now handled consistently. - -## 0.1.13 - -* Added SourceMapGenerator.fromSourceMap. - -## 0.1.12 - -* SourceNode now generates empty mappings too. - -## 0.1.11 - -* Added name support to SourceNode. - -## 0.1.10 - -* Added sourcesContent support to the customer and generator. diff --git a/node_modules/source-map/LICENSE b/node_modules/source-map/LICENSE deleted file mode 100644 index ed1b7cf2..00000000 --- a/node_modules/source-map/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ - -Copyright (c) 2009-2011, Mozilla Foundation and contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the names of the Mozilla Foundation nor the names of project - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/source-map/README.md b/node_modules/source-map/README.md deleted file mode 100644 index fea4beb1..00000000 --- a/node_modules/source-map/README.md +++ /dev/null @@ -1,742 +0,0 @@ -# Source Map - -[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) - -[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map) - -This is a library to generate and consume the source map format -[described here][format]. - -[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit - -## Use with Node - - $ npm install source-map - -## Use on the Web - - <script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script> - --------------------------------------------------------------------------------- - -<!-- `npm run toc` to regenerate the Table of Contents --> - -<!-- START doctoc generated TOC please keep comment here to allow auto update --> -<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> -## Table of Contents - -- [Examples](#examples) - - [Consuming a source map](#consuming-a-source-map) - - [Generating a source map](#generating-a-source-map) - - [With SourceNode (high level API)](#with-sourcenode-high-level-api) - - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api) -- [API](#api) - - [SourceMapConsumer](#sourcemapconsumer) - - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap) - - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans) - - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition) - - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition) - - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition) - - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources) - - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing) - - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order) - - [SourceMapGenerator](#sourcemapgenerator) - - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap) - - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer) - - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping) - - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath) - - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring) - - [SourceNode](#sourcenode) - - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name) - - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath) - - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk) - - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk) - - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent) - - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn) - - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn) - - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep) - - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement) - - [SourceNode.prototype.toString()](#sourcenodeprototypetostring) - - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap) - -<!-- END doctoc generated TOC please keep comment here to allow auto update --> - -## Examples - -### Consuming a source map - -```js -var rawSourceMap = { - version: 3, - file: 'min.js', - names: ['bar', 'baz', 'n'], - sources: ['one.js', 'two.js'], - sourceRoot: 'http://example.com/www/js/', - mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' -}; - -var smc = new SourceMapConsumer(rawSourceMap); - -console.log(smc.sources); -// [ 'http://example.com/www/js/one.js', -// 'http://example.com/www/js/two.js' ] - -console.log(smc.originalPositionFor({ - line: 2, - column: 28 -})); -// { source: 'http://example.com/www/js/two.js', -// line: 2, -// column: 10, -// name: 'n' } - -console.log(smc.generatedPositionFor({ - source: 'http://example.com/www/js/two.js', - line: 2, - column: 10 -})); -// { line: 2, column: 28 } - -smc.eachMapping(function (m) { - // ... -}); -``` - -### Generating a source map - -In depth guide: -[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) - -#### With SourceNode (high level API) - -```js -function compile(ast) { - switch (ast.type) { - case 'BinaryExpression': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - [compile(ast.left), " + ", compile(ast.right)] - ); - case 'Literal': - return new SourceNode( - ast.location.line, - ast.location.column, - ast.location.source, - String(ast.value) - ); - // ... - default: - throw new Error("Bad AST"); - } -} - -var ast = parse("40 + 2", "add.js"); -console.log(compile(ast).toStringWithSourceMap({ - file: 'add.js' -})); -// { code: '40 + 2', -// map: [object SourceMapGenerator] } -``` - -#### With SourceMapGenerator (low level API) - -```js -var map = new SourceMapGenerator({ - file: "source-mapped.js" -}); - -map.addMapping({ - generated: { - line: 10, - column: 35 - }, - source: "foo.js", - original: { - line: 33, - column: 2 - }, - name: "christopher" -}); - -console.log(map.toString()); -// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' -``` - -## API - -Get a reference to the module: - -```js -// Node.js -var sourceMap = require('source-map'); - -// Browser builds -var sourceMap = window.sourceMap; - -// Inside Firefox -const sourceMap = require("devtools/toolkit/sourcemap/source-map.js"); -``` - -### SourceMapConsumer - -A SourceMapConsumer instance represents a parsed source map which we can query -for information about the original file positions by giving it a file position -in the generated source. - -#### new SourceMapConsumer(rawSourceMap) - -The only parameter is the raw source map (either as a string which can be -`JSON.parse`'d, or an object). According to the spec, source maps have the -following attributes: - -* `version`: Which version of the source map spec this map is following. - -* `sources`: An array of URLs to the original source files. - -* `names`: An array of identifiers which can be referenced by individual - mappings. - -* `sourceRoot`: Optional. The URL root from which all sources are relative. - -* `sourcesContent`: Optional. An array of contents of the original source files. - -* `mappings`: A string of base64 VLQs which contain the actual mappings. - -* `file`: Optional. The generated filename this source map is associated with. - -```js -var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData); -``` - -#### SourceMapConsumer.prototype.computeColumnSpans() - -Compute the last column for each generated mapping. The last column is -inclusive. - -```js -// Before: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] - -consumer.computeColumnSpans(); - -// After: -consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1, -// lastColumn: 9 }, -// { line: 2, -// column: 10, -// lastColumn: 19 }, -// { line: 2, -// column: 20, -// lastColumn: Infinity } ] - -``` - -#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) - -Returns the original source, line, and column information for the generated -source's line and column positions provided. The only argument is an object with -the following properties: - -* `line`: The line number in the generated source. Line numbers in - this library are 1-based (note that the underlying source map - specification uses 0-based line numbers -- this library handles the - translation). - -* `column`: The column number in the generated source. Column numbers - in this library are 0-based. - -* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or - `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest - element that is smaller than or greater than the one we are searching for, - respectively, if the exact element cannot be found. Defaults to - `SourceMapConsumer.GREATEST_LOWER_BOUND`. - -and an object is returned with the following properties: - -* `source`: The original source file, or null if this information is not - available. - -* `line`: The line number in the original source, or null if this information is - not available. The line number is 1-based. - -* `column`: The column number in the original source, or null if this - information is not available. The column number is 0-based. - -* `name`: The original identifier, or null if this information is not available. - -```js -consumer.originalPositionFor({ line: 2, column: 10 }) -// { source: 'foo.coffee', -// line: 2, -// column: 2, -// name: null } - -consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 }) -// { source: null, -// line: null, -// column: null, -// name: null } -``` - -#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) - -Returns the generated line and column information for the original source, -line, and column positions provided. The only argument is an object with -the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. The line number is - 1-based. - -* `column`: The column number in the original source. The column - number is 0-based. - -and an object is returned with the following properties: - -* `line`: The line number in the generated source, or null. The line - number is 1-based. - -* `column`: The column number in the generated source, or null. The - column number is 0-based. - -```js -consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 }) -// { line: 1, -// column: 56 } -``` - -#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) - -Returns all generated line and column information for the original source, line, -and column provided. If no column is provided, returns all mappings -corresponding to a either the line we are searching for or the next closest line -that has any mappings. Otherwise, returns all mappings corresponding to the -given line and either the column we are searching for or the next closest column -that has any offsets. - -The only argument is an object with the following properties: - -* `source`: The filename of the original source. - -* `line`: The line number in the original source. The line number is - 1-based. - -* `column`: Optional. The column number in the original source. The - column number is 0-based. - -and an array of objects is returned, each with the following properties: - -* `line`: The line number in the generated source, or null. The line - number is 1-based. - -* `column`: The column number in the generated source, or null. The - column number is 0-based. - -```js -consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" }) -// [ { line: 2, -// column: 1 }, -// { line: 2, -// column: 10 }, -// { line: 2, -// column: 20 } ] -``` - -#### SourceMapConsumer.prototype.hasContentsOfAllSources() - -Return true if we have the embedded source content for every source listed in -the source map, false otherwise. - -In other words, if this method returns `true`, then -`consumer.sourceContentFor(s)` will succeed for every source `s` in -`consumer.sources`. - -```js -// ... -if (consumer.hasContentsOfAllSources()) { - consumerReadyCallback(consumer); -} else { - fetchSources(consumer, consumerReadyCallback); -} -// ... -``` - -#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) - -Returns the original source content for the source provided. The only -argument is the URL of the original source file. - -If the source content for the given source is not found, then an error is -thrown. Optionally, pass `true` as the second param to have `null` returned -instead. - -```js -consumer.sources -// [ "my-cool-lib.clj" ] - -consumer.sourceContentFor("my-cool-lib.clj") -// "..." - -consumer.sourceContentFor("this is not in the source map"); -// Error: "this is not in the source map" is not in the source map - -consumer.sourceContentFor("this is not in the source map", true); -// null -``` - -#### SourceMapConsumer.prototype.eachMapping(callback, context, order) - -Iterate over each mapping between an original source/line/column and a -generated line/column in this source map. - -* `callback`: The function that is called with each mapping. Mappings have the - form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, - name }` - -* `context`: Optional. If specified, this object will be the value of `this` - every time that `callback` is called. - -* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or - `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over - the mappings sorted by the generated file's line/column order or the - original's source/line/column order, respectively. Defaults to - `SourceMapConsumer.GENERATED_ORDER`. - -```js -consumer.eachMapping(function (m) { console.log(m); }) -// ... -// { source: 'illmatic.js', -// generatedLine: 1, -// generatedColumn: 0, -// originalLine: 1, -// originalColumn: 0, -// name: null } -// { source: 'illmatic.js', -// generatedLine: 2, -// generatedColumn: 0, -// originalLine: 2, -// originalColumn: 0, -// name: null } -// ... -``` -### SourceMapGenerator - -An instance of the SourceMapGenerator represents a source map which is being -built incrementally. - -#### new SourceMapGenerator([startOfSourceMap]) - -You may pass an object with the following properties: - -* `file`: The filename of the generated source that this source map is - associated with. - -* `sourceRoot`: A root for all relative URLs in this source map. - -* `skipValidation`: Optional. When `true`, disables validation of mappings as - they are added. This can improve performance but should be used with - discretion, as a last resort. Even then, one should avoid using this flag when - running tests, if possible. - -```js -var generator = new sourceMap.SourceMapGenerator({ - file: "my-generated-javascript-file.js", - sourceRoot: "http://example.com/app/js/" -}); -``` - -#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) - -Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance. - -* `sourceMapConsumer` The SourceMap. - -```js -var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer); -``` - -#### SourceMapGenerator.prototype.addMapping(mapping) - -Add a single mapping from original source line and column to the generated -source's line and column for this source map being created. The mapping object -should have the following properties: - -* `generated`: An object with the generated line and column positions. - -* `original`: An object with the original line and column positions. - -* `source`: The original source file (relative to the sourceRoot). - -* `name`: An optional original token name for this mapping. - -```js -generator.addMapping({ - source: "module-one.scm", - original: { line: 128, column: 0 }, - generated: { line: 3, column: 456 } -}) -``` - -#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for an original source file. - -* `sourceFile` the URL of the original source file. - -* `sourceContent` the content of the source file. - -```js -generator.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) - -Applies a SourceMap for a source file to the SourceMap. -Each mapping to the supplied source file is rewritten using the -supplied SourceMap. Note: The resolution for the resulting mappings -is the minimum of this map and the supplied map. - -* `sourceMapConsumer`: The SourceMap to be applied. - -* `sourceFile`: Optional. The filename of the source file. - If omitted, sourceMapConsumer.file will be used, if it exists. - Otherwise an error will be thrown. - -* `sourceMapPath`: Optional. The dirname of the path to the SourceMap - to be applied. If relative, it is relative to the SourceMap. - - This parameter is needed when the two SourceMaps aren't in the same - directory, and the SourceMap to be applied contains relative source - paths. If so, those relative source paths need to be rewritten - relative to the SourceMap. - - If omitted, it is assumed that both SourceMaps are in the same directory, - thus not needing any rewriting. (Supplying `'.'` has the same effect.) - -#### SourceMapGenerator.prototype.toString() - -Renders the source map being generated to a string. - -```js -generator.toString() -// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}' -``` - -### SourceNode - -SourceNodes provide a way to abstract over interpolating and/or concatenating -snippets of generated JavaScript source code, while maintaining the line and -column information associated between those snippets and the original source -code. This is useful as the final intermediate representation a compiler might -use before outputting the generated JS and source map. - -#### new SourceNode([line, column, source[, chunk[, name]]]) - -* `line`: The original line number associated with this source node, or null if - it isn't associated with an original line. The line number is 1-based. - -* `column`: The original column number associated with this source node, or null - if it isn't associated with an original column. The column number - is 0-based. - -* `source`: The original source's filename; null if no filename is provided. - -* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see - below. - -* `name`: Optional. The original identifier. - -```js -var node = new SourceNode(1, 2, "a.cpp", [ - new SourceNode(3, 4, "b.cpp", "extern int status;\n"), - new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"), - new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"), -]); -``` - -#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) - -Creates a SourceNode from generated code and a SourceMapConsumer. - -* `code`: The generated code - -* `sourceMapConsumer` The SourceMap for the generated code - -* `relativePath` The optional path that relative sources in `sourceMapConsumer` - should be relative to. - -```js -var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8")); -var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"), - consumer); -``` - -#### SourceNode.prototype.add(chunk) - -Add a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.add(" + "); -node.add(otherNode); -node.add([leftHandOperandNode, " + ", rightHandOperandNode]); -``` - -#### SourceNode.prototype.prepend(chunk) - -Prepend a chunk of generated JS to this source node. - -* `chunk`: A string snippet of generated JS code, another instance of - `SourceNode`, or an array where each member is one of those things. - -```js -node.prepend("/** Build Id: f783haef86324gf **/\n\n"); -``` - -#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) - -Set the source content for a source file. This will be added to the -`SourceMap` in the `sourcesContent` field. - -* `sourceFile`: The filename of the source file - -* `sourceContent`: The content of the source file - -```js -node.setSourceContent("module-one.scm", - fs.readFileSync("path/to/module-one.scm")) -``` - -#### SourceNode.prototype.walk(fn) - -Walk over the tree of JS snippets in this node and its children. The walking -function is called once for each snippet of JS and is passed that snippet and -the its original associated source's line/column location. - -* `fn`: The traversal function. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.walk(function (code, loc) { console.log("WALK:", code, loc); }) -// WALK: uno { source: 'b.js', line: 3, column: 4, name: null } -// WALK: dos { source: 'a.js', line: 1, column: 2, name: null } -// WALK: tres { source: 'a.js', line: 1, column: 2, name: null } -// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null } -``` - -#### SourceNode.prototype.walkSourceContents(fn) - -Walk over the tree of SourceNodes. The walking function is called for each -source file content and is passed the filename and source content. - -* `fn`: The traversal function. - -```js -var a = new SourceNode(1, 2, "a.js", "generated from a"); -a.setSourceContent("a.js", "original a"); -var b = new SourceNode(1, 2, "b.js", "generated from b"); -b.setSourceContent("b.js", "original b"); -var c = new SourceNode(1, 2, "c.js", "generated from c"); -c.setSourceContent("c.js", "original c"); - -var node = new SourceNode(null, null, null, [a, b, c]); -node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); }) -// WALK: a.js : original a -// WALK: b.js : original b -// WALK: c.js : original c -``` - -#### SourceNode.prototype.join(sep) - -Like `Array.prototype.join` except for SourceNodes. Inserts the separator -between each of this source node's children. - -* `sep`: The separator. - -```js -var lhs = new SourceNode(1, 2, "a.rs", "my_copy"); -var operand = new SourceNode(3, 4, "a.rs", "="); -var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()"); - -var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]); -var joinedNode = node.join(" "); -``` - -#### SourceNode.prototype.replaceRight(pattern, replacement) - -Call `String.prototype.replace` on the very right-most source snippet. Useful -for trimming white space from the end of a source node, etc. - -* `pattern`: The pattern to replace. - -* `replacement`: The thing to replace the pattern with. - -```js -// Trim trailing white space. -node.replaceRight(/\s*$/, ""); -``` - -#### SourceNode.prototype.toString() - -Return the string representation of this source node. Walks over the tree and -concatenates all the various snippets together to one string. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toString() -// 'unodostresquatro' -``` - -#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) - -Returns the string representation of this tree of source nodes, plus a -SourceMapGenerator which contains all the mappings between the generated and -original sources. - -The arguments are the same as those to `new SourceMapGenerator`. - -```js -var node = new SourceNode(1, 2, "a.js", [ - new SourceNode(3, 4, "b.js", "uno"), - "dos", - [ - "tres", - new SourceNode(5, 6, "c.js", "quatro") - ] -]); - -node.toStringWithSourceMap({ file: "my-output-file.js" }) -// { code: 'unodostresquatro', -// map: [object SourceMapGenerator] } -``` diff --git a/node_modules/source-map/dist/source-map.debug.js b/node_modules/source-map/dist/source-map.debug.js deleted file mode 100644 index aad0620d..00000000 --- a/node_modules/source-map/dist/source-map.debug.js +++ /dev/null @@ -1,3234 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; -//#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mNvZGUobWFwcGluZy5vcmlnaW5hbExpbmUgLSAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbExpbmUpO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lIC0gMTtcblxuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHByZXZpb3VzT3JpZ2luYWxDb2x1bW4pO1xuICAgICAgICBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gbWFwcGluZy5vcmlnaW5hbENvbHVtbjtcblxuICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICBuYW1lSWR4ID0gdGhpcy5fbmFtZXMuaW5kZXhPZihtYXBwaW5nLm5hbWUpO1xuICAgICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShuYW1lSWR4IC0gcHJldmlvdXNOYW1lKTtcbiAgICAgICAgICBwcmV2aW91c05hbWUgPSBuYW1lSWR4O1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJlc3VsdCArPSBuZXh0O1xuICAgIH1cblxuICAgIHJldHVybiByZXN1bHQ7XG4gIH07XG5cblNvdXJjZU1hcEdlbmVyYXRvci5wcm90b3R5cGUuX2dlbmVyYXRlU291cmNlc0NvbnRlbnQgPVxuICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZ2VuZXJhdGVTb3VyY2VzQ29udGVudChhU291cmNlcywgYVNvdXJjZVJvb3QpIHtcbiAgICByZXR1cm4gYVNvdXJjZXMubWFwKGZ1bmN0aW9uIChzb3VyY2UpIHtcbiAgICAgIGlmICghdGhpcy5fc291cmNlc0NvbnRlbnRzKSB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgICAgfVxuICAgIC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sZSA9IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBzb3VyY2VGaWxlKTtcbiAgICAgICAgfVxuICAgICAgICBub2RlLnNldFNvdXJjZUNvbnRlbnQoc291cmNlRmlsZSwgY29udGVudCk7XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4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AgIGdlbmVyYXRlZC5jb2x1bW4gPSAwO1xuICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgIGlmIChpZHggKyAxID09PSBsZW5ndGgpIHtcbiAgICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2VNYXBwaW5nQWN0aXZlKSB7XG4gICAgICAgICAgbWFwLmFkZE1hcHBpbmcoe1xuICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICBvcmlnaW5hbDoge1xuICAgICAgICAgICAgICBsaW5lOiBvcmlnaW5hbC5saW5lLFxuICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgY29sdW1uOiBnZW5lcmF0ZWQuY29sdW1uXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBnZW5lcmF0ZWQuY29sdW1uKys7XG4gICAgICB9XG4gICAgfVxuICB9KTtcbiAgdGhpcy53YWxrU291cmNlQ29udGVudHMoZnVuY3Rpb24gKHNvdXJjZUZpbGUsIHNvdXJjZUNvbnRlbnQpIHtcbiAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHsgY29kZTogZ2VuZXJhdGVkLmNvZGUsIG1hcDogbWFwIH07XG59O1xuXG5leHBvcnRzLlNvdXJjZU5vZGUgPSBTb3VyY2VOb2RlO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9saWIvc291cmNlLW5vZGUuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.js b/node_modules/source-map/dist/source-map.js deleted file mode 100644 index b4eb0874..00000000 --- a/node_modules/source-map/dist/source-map.js +++ /dev/null @@ -1,3233 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["sourceMap"] = factory(); - else - root["sourceMap"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - /* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ - exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer; - exports.SourceNode = __webpack_require__(10).SourceNode; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var base64VLQ = __webpack_require__(2); - var util = __webpack_require__(4); - var ArraySet = __webpack_require__(5).ArraySet; - var MappingList = __webpack_require__(6).MappingList; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - var base64 = __webpack_require__(3); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ - exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); - }; - - /** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ - exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; - var dataUrlRegexp = /^data:.+\,.+$/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - /** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ - function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; - } - exports.normalize = normalize; - - /** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ - function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; - } - exports.join = join; - - exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); - }; - - /** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ - function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); - } - exports.relative = relative; - - var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); - }()); - - function identity (s) { - return s; - } - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; - } - exports.toSetString = supportsNullProto ? identity : toSetString; - - function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; - } - exports.fromSetString = supportsNullProto ? identity : fromSetString; - - function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - - function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; - } - - /** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ - function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - } - exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - - /** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ - function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); - } - exports.parseSourceMapInput = parseSourceMapInput; - - /** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ - function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); - } - exports.computeSourceURL = computeSourceURL; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var has = Object.prototype.hasOwnProperty; - var hasNativeMap = typeof Map !== "undefined"; - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ - ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - - /** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ - function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; - } - - /** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ - function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; - } - - /** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ - MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - - /** - * Add the given source mapping. - * - * @param Object aMapping - */ - MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } - }; - - /** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ - MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; - }; - - exports.MappingList = MappingList; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var util = __webpack_require__(4); - var binarySearch = __webpack_require__(8); - var ArraySet = __webpack_require__(5).ArraySet; - var base64VLQ = __webpack_require__(2); - var quickSort = __webpack_require__(9).quickSort; - - function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); - } - - SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); - } - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - // `__generatedMappings` and `__originalMappings` are arrays that hold the - // parsed mapping coordinates from the source map's "mappings" attribute. They - // are lazily instantiated, accessed via the `_generatedMappings` and - // `_originalMappings` getters respectively, and we only parse the mappings - // and create these arrays once queried for a source location. We jump through - // these hoops because there can be many thousands of mappings, and parsing - // them is expensive, so we only want to do it if we must. - // - // Each object in the arrays is of the form: - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `_generatedMappings` is ordered by the generated positions. - // - // `_originalMappings` is ordered by the original positions. - - SourceMapConsumer.prototype.__generatedMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } - }); - - SourceMapConsumer.prototype.__originalMappings = null; - Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } - }); - - SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - SourceMapConsumer.GREATEST_LOWER_BOUND = 1; - SourceMapConsumer.LEAST_UPPER_BOUND = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - - /** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - - exports.SourceMapConsumer = SourceMapConsumer; - - /** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; - } - - BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - - /** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ - BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; - }; - - /** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ - BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - BasicSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } - }); - - /** - * Provide the JIT with a nice shape / hidden class. - */ - function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; - } - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - - /** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ - BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - - exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - - /** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ - function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); - } - - IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); - IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - - /** - * The version of the source mapping spec that we are consuming. - */ - IndexedSourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } - }); - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ - IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - - /** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ - IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ - IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ - IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ - IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - - exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - exports.GREATEST_LOWER_BOUND = 1; - exports.LEAST_UPPER_BOUND = 2; - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } - } - - /** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ - exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - // It turns out that some (most?) JavaScript engines don't self-host - // `Array.prototype.sort`. This makes sense because C++ will likely remain - // faster than JS when doing raw CPU-intensive sorting. However, when using a - // custom comparator function, calling back and forth between the VM's C++ and - // JIT'd JS is rather slow *and* loses JIT type information, resulting in - // worse generated code for the comparator function than would be optimal. In - // fact, when sorting with a comparator, these costs outweigh the benefits of - // sorting in C++. By using our own JS-implemented Quick Sort (below), we get - // a ~3500ms mean speed-up in `bench/bench.html`. - - /** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ - function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; - } - - /** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ - function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); - } - - /** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ - function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } - } - - /** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ - exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - /* -*- Mode: js; js-indent-level: 2; -*- */ - /* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - - var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator; - var util = __webpack_require__(4); - - // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other - // operating systems these days (capturing the result). - var REGEX_NEWLINE = /(\r?\n)/; - - // Newline character code for charCodeAt() comparisons - var NEWLINE_CODE = 10; - - // Private symbol for identifying `SourceNode`s when multiple versions of - // the source-map library are loaded. This MUST NOT CHANGE across - // versions! - var isSourceNode = "$$$isSourceNode$$$"; - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - - -/***/ }) -/******/ ]) -}); -; \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.min.js b/node_modules/source-map/dist/source-map.min.js deleted file mode 100644 index c7c72dad..00000000 --- a/node_modules/source-map/dist/source-map.min.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(t){var o=t;null!==n&&(o=i.relative(n,t)),r._sources.has(o)||r._sources.add(o);var s=e.sourceContentFor(t);null!=s&&r.setSourceContent(t,s)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f<d;f++){if(n=h[f],e="",n.generatedLine!==a)for(s=0;n.generatedLine!==a;)e+=";",a++;else if(f>0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<<s,u=a-1,l=a;n.encode=function(e){var n,r="",o=t(e);do n=o&u,o>>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<<p,p+=s}while(t);r.value=o(g),r.rest=n}},function(e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){var n=65,r=90,t=97,o=122,i=48,s=57,a=43,u=47,l=26,c=52;return n<=e&&e<=r?e-n:t<=e&&e<=o?e-t+l:i<=e&&e<=s?e-i+c:e==a?62:e==u?63:-1}},function(e,n){function r(e,n,r){if(n in e)return e[n];if(3===arguments.length)return r;throw new Error('"'+n+'" is a required argument.')}function t(e){var n=e.match(v);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(e){var r=e,i=t(e);if(i){if(!i.path)return e;r=i.path}for(var s,a=n.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(y))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=f(e.source,n.source);return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:f(e.name,n.name)))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=f(e.source,n.source),0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:f(e.name,n.name)))))}function f(e,n){return e===n?0:null===e?1:null===n?-1:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}function m(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}function _(e,n,r){if(n=n||"",e&&("/"!==e[e.length-1]&&"/"!==n[0]&&(e+="/"),n=e+n),r){var a=t(r);if(!a)throw new Error("sourceMapURL could not be parsed");if(a.path){var u=a.path.lastIndexOf("/");u>=0&&(a.path=a.path.substring(0,u+1))}n=s(o(a),n)}return i(n)}n.getArg=r;var v=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,y=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||v.test(e)},n.relative=a;var C=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=C?u:l,n.fromSetString=C?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d,n.parseSourceMapInput=m,n.computeSourceURL=_},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o<i;o++)r.add(e[o],n);return r},t.prototype.size=function(){return s?this._set.size:Object.getOwnPropertyNames(this._set).length},t.prototype.add=function(e,n){var r=s?e:o.toSetString(e),t=s?this.has(e):i.call(this._set,r),a=this._array.length;t&&!n||this._array.push(e),t||(s?this._set.set(e,a):this._set[r]=a)},t.prototype.has=function(e){if(s)return this._set.has(e);var n=o.toSetString(e);return i.call(this._set,n)},t.prototype.indexOf=function(e){if(s){var n=this._set.get(e);if(n>=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},t.prototype.toArray=function(){return this._array.slice()},n.ArraySet=t},function(e,n,r){function t(e,n){var r=e.generatedLine,t=n.generatedLine,o=e.generatedColumn,s=n.generatedColumn;return t>r||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e,n){var r=e;return"string"==typeof e&&(r=a.parseSourceMapInput(e)),null!=r.sections?new s(r,n):new o(r,n)}function o(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var t=a.getArg(r,"version"),o=a.getArg(r,"sources"),i=a.getArg(r,"names",[]),s=a.getArg(r,"sourceRoot",null),u=a.getArg(r,"sourcesContent",null),c=a.getArg(r,"mappings"),g=a.getArg(r,"file",null);if(t!=this._version)throw new Error("Unsupported version: "+t);s&&(s=a.normalize(s)),o=o.map(String).map(a.normalize).map(function(e){return s&&a.isAbsolute(s)&&a.isAbsolute(e)?a.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(e){return a.computeSourceURL(s,e,n)}),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=n,this.file=g}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e,n){var r=e;"string"==typeof e&&(r=a.parseSourceMapInput(e));var o=a.getArg(r,"version"),i=a.getArg(r,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var r=a.getArg(e,"offset"),o=a.getArg(r,"line"),i=a.getArg(r,"column");if(o<s.line||o===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=r,{generatedOffset:{generatedLine:o+1,generatedColumn:i+1},consumer:new t(a.getArg(e,"map"),n)}})}var a=r(4),u=r(8),l=r(5).ArraySet,c=r(2),g=r(9).quickSort;t.fromSourceMap=function(e,n){return o.fromSourceMap(e,n)},t.prototype._version=3,t.prototype.__generatedMappings=null,Object.defineProperty(t.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),t.prototype.__originalMappings=null,Object.defineProperty(t.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),t.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},t.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},t.GENERATED_ORDER=1,t.ORIGINAL_ORDER=2,t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.prototype.eachMapping=function(e,n,r){var o,i=n||null,s=r||t.GENERATED_ORDER;switch(s){case t.GENERATED_ORDER:o=this._generatedMappings;break;case t.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var n=null===e.source?null:this._sources.at(e.source);return n=a.computeSourceURL(u,n,this._sourceMapURL),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,i)},t.prototype.allGeneratedPositionsFor=function(e){var n=a.getArg(e,"line"),r={source:a.getArg(e,"source"),originalLine:n,originalColumn:a.getArg(e,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var t=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.prototype._findSourceIndex=function(e){var n=e;if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1},o.fromSourceMap=function(e,n){var r=Object.create(o.prototype),t=r._names=l.fromArray(e._names.toArray(),!0),s=r._sources=l.fromArray(e._sources.toArray(),!0);r.sourceRoot=e._sourceRoot,r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=e._file,r._sourceMapURL=n,r._absoluteSources=r._sources.toArray().map(function(e){return a.computeSourceURL(r.sourceRoot,e,n)});for(var u=e._mappings.toArray().slice(),c=r.__generatedMappings=[],p=r.__originalMappings=[],h=0,f=u.length;h<f;h++){var d=u[h],m=new i;m.generatedLine=d.generatedLine,m.generatedColumn=d.generatedColumn,d.source&&(m.source=s.indexOf(d.source),m.originalLine=d.originalLine,m.originalColumn=d.originalColumn,d.name&&(m.name=t.indexOf(d.name)),p.push(m)),c.push(m)}return g(r.__originalMappings,a.compareByOriginalPositions),r},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),o.prototype._parseMappings=function(e,n){for(var r,t,o,s,u,l=1,p=0,h=0,f=0,d=0,m=0,_=e.length,v=0,y={},C={},S=[],A=[];v<_;)if(";"===e.charAt(v))l++,v++,p=0;else if(","===e.charAt(v))v++;else{for(r=new i,r.generatedLine=l,s=v;s<_&&!this._charIsMappingSeparator(e,s);s++);if(t=e.slice(v,s),o=y[t])v+=t.length;else{for(o=[];v<s;)c.decode(e,v,C),u=C.value,v=C.rest,o.push(u);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");y[t]=o}r.generatedColumn=p+o[0],p=r.generatedColumn,o.length>1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),A.push(r),"number"==typeof r.originalLine&&S.push(r)}g(A,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,g(S,a.compareByOriginalPositions),this.__originalMappings=S},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=a.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;var r=this._findSourceIndex(e);if(r>=0)return this.sourcesContent[r];var t=e;null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t));var o;if(null!=this.sourceRoot&&(o=a.urlParse(this.sourceRoot))){var i=t.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(i))return this.sourcesContent[this._sources.indexOf(i)];if((!o.path||"/"==o.path)&&this._sources.has("/"+t))return this.sourcesContent[this._sources.indexOf("/"+t)]}if(n)return null;throw new Error('"'+t+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(n=this._findSourceIndex(n),n<0)return{line:null,column:null,lastColumn:null};var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),s.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=u.search(n,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r?r:e.generatedColumn-n.generatedOffset.generatedColumn}),t=this._sections[r];return t?t.consumer.originalPositionFor({line:n.generatedLine-(t.generatedOffset.generatedLine-1),column:n.generatedColumn-(t.generatedOffset.generatedLine===n.generatedLine?t.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},s.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r],o=t.consumer.sourceContentFor(e,!0);if(o)return o}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer._findSourceIndex(a.getArg(e,"source"))!==-1){var t=r.consumer.generatedPositionFor(e);if(t){var o={line:t.line+(r.generatedOffset.generatedLine-1),column:t.column+(r.generatedOffset.generatedLine===t.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},s.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var t=this._sections[r],o=t.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=t.consumer._sources.at(s.source);u=a.computeSourceURL(t.consumer.sourceRoot,u,this._sourceMapURL),this._sources.add(u),u=this._sources.indexOf(u);var l=null;s.name&&(l=t.consumer._names.at(s.name),this._names.add(l),l=this._names.indexOf(l));var c={source:u,generatedLine:s.generatedLine+(t.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(t.generatedOffset.generatedLine===s.generatedLine?t.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}g(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),g(this.__originalMappings,a.compareByOriginalPositions)},n.IndexedSourceMapConsumer=s},function(e,n){function r(e,t,o,i,s,a){var u=Math.floor((t-e)/2)+e,l=s(o,i[u],!0);return 0===l?u:l>0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t<i.length?t:-1:u:u-e>1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i<s){var a=t(i,s),u=i-1;r(e,a,s);for(var l=e[s],c=i;c<s;c++)n(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var g=u+1;o(e,n,i,g-1),o(e,n,g+1,s)}}n.quickSort=function(e,n){o(e,n,0,e.length-1)}},function(e,n,r){function t(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[u]=!0,null!=t&&this.add(t)}var o=r(1).SourceMapGenerator,i=r(4),s=/(\r?\n)/,a=10,u="$$$isSourceNode$$$";t.fromStringWithSourceMap=function(e,n,r){function o(e,n){if(null===e||void 0===e.source)a.add(n);else{var o=r?i.join(r,e.source):e.source;a.add(new t(e.originalLine,e.originalColumn,o,n,e.name))}}var a=new t,u=e.split(s),l=0,c=function(){function e(){return l<u.length?u[l++]:void 0}var n=e(),r=e()||"";return n+r},g=1,p=0,h=null;return n.eachMapping(function(e){if(null!==h){if(!(g<e.generatedLine)){var n=u[l]||"",r=n.substr(0,e.generatedColumn-p);return u[l]=n.substr(e.generatedColumn-p),p=e.generatedColumn,o(h,r),void(h=e)}o(h,c()),g++,p=0}for(;g<e.generatedLine;)a.add(c()),g++;if(p<e.generatedColumn){var n=u[l]||"";a.add(n.substr(0,e.generatedColumn)),u[l]=n.substr(e.generatedColumn),p=e.generatedColumn}h=e},this),l<u.length&&(h&&o(h,c()),a.add(u.splice(l).join(""))),n.sources.forEach(function(e){var t=n.sourceContentFor(e);null!=t&&(null!=r&&(e=i.join(r,e)),a.setSourceContent(e,t))}),a},t.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},t.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r<t;r++)n=this.children[r],n[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(n=[],r=0;r<t-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},t.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},t.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},t.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,r=t.length;n<r;n++)e(i.fromSetString(t[n]),this.sourceContents[t[n]])},t.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},t.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new o(e),t=!1,i=null,s=null,u=null,l=null;return this.walk(function(e,o){n.code+=e,null!==o.source&&null!==o.line&&null!==o.column?(i===o.source&&s===o.line&&u===o.column&&l===o.name||r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name}),i=o.source,s=o.line,u=o.column,l=o.name,t=!0):t&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,t=!1);for(var c=0,g=e.length;c<g;c++)e.charCodeAt(c)===a?(n.line++,n.column=0,c+1===g?(i=null,t=!1):t&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},n.SourceNode=t}])}); -//# sourceMappingURL=source-map.min.js.map \ No newline at end of file diff --git a/node_modules/source-map/dist/source-map.min.js.map b/node_modules/source-map/dist/source-map.min.js.map deleted file mode 100644 index d2cc86eb..00000000 --- a/node_modules/source-map/dist/source-map.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///source-map.min.js","webpack:///webpack/bootstrap 0fd5815da764db5fb9fe","webpack:///./source-map.js","webpack:///./lib/source-map-generator.js","webpack:///./lib/base64-vlq.js","webpack:///./lib/base64.js","webpack:///./lib/util.js","webpack:///./lib/array-set.js","webpack:///./lib/mapping-list.js","webpack:///./lib/source-map-consumer.js","webpack:///./lib/binary-search.js","webpack:///./lib/quick-sort.js","webpack:///./lib/source-node.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","SourceMapGenerator","SourceMapConsumer","SourceNode","aArgs","_file","util","getArg","_sourceRoot","_skipValidation","_sources","ArraySet","_names","_mappings","MappingList","_sourcesContents","base64VLQ","prototype","_version","fromSourceMap","aSourceMapConsumer","sourceRoot","generator","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","source","relative","original","originalLine","originalColumn","name","addMapping","sources","forEach","sourceFile","sourceRelative","has","add","content","sourceContentFor","setSourceContent","_validateMapping","String","aSourceFile","aSourceContent","Object","create","toSetString","keys","length","applySourceMap","aSourceMapPath","Error","newSources","newNames","unsortedForEach","originalPositionFor","join","aGenerated","aOriginal","aSource","aName","JSON","stringify","_serializeMappings","next","nameIdx","sourceIdx","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","mappings","toArray","i","len","compareByGeneratedPositionsInflated","encode","indexOf","_generateSourcesContent","aSources","aSourceRoot","map","key","hasOwnProperty","toJSON","version","names","sourcesContent","toString","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","digit","encoded","vlq","decode","aStr","aIndex","aOutParam","continuation","strLen","shift","charCodeAt","charAt","value","rest","intToCharMap","split","number","TypeError","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset","aDefaultValue","arguments","urlParse","aUrl","match","urlRegexp","scheme","auth","host","port","path","urlGenerate","aParsedUrl","url","normalize","aPath","part","isAbsolute","parts","up","splice","aRoot","aPathUrl","aRootUrl","dataUrlRegexp","joined","replace","level","index","lastIndexOf","slice","Array","substr","identity","s","isProtoString","fromSetString","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","strcmp","compareByGeneratedPositionsDeflated","onlyCompareGenerated","aStr1","aStr2","parseSourceMapInput","str","parse","computeSourceURL","sourceURL","sourceMapURL","parsed","substring","test","supportsNullProto","obj","_array","_set","hasNativeMap","Map","fromArray","aArray","aAllowDuplicates","set","size","getOwnPropertyNames","sStr","isDuplicate","idx","push","get","at","aIdx","generatedPositionAfter","lineA","lineB","columnA","columnB","_sorted","_last","aCallback","aThisArg","aMapping","sort","aSourceMap","aSourceMapURL","sourceMap","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","_absoluteSources","_sourceMapURL","Mapping","lastOffset","_sections","offset","offsetLine","offsetColumn","generatedOffset","consumer","binarySearch","quickSort","__generatedMappings","defineProperty","configurable","enumerable","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","aContext","aOrder","context","order","_generatedMappings","_originalMappings","allGeneratedPositionsFor","needle","_findSourceIndex","_findMapping","undefined","lastColumn","relativeSource","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","segment","end","cachedSegments","temp","originalMappings","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","search","computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","hasContentsOfAllSources","some","sc","nullOnMissing","fileUriAbsPath","generatedPositionFor","constructor","j","sectionIndex","section","bias","every","generatedPosition","ret","sectionMappings","adjustedMapping","recursiveSearch","aLow","aHigh","aHaystack","aCompare","mid","Math","floor","swap","ary","x","y","randomIntInRange","low","high","round","random","doQuickSort","comparator","r","pivotIndex","pivot","q","aLine","aColumn","aChunks","children","sourceContents","isSourceNode","REGEX_NEWLINE","NEWLINE_CODE","fromStringWithSourceMap","aGeneratedCode","aRelativePath","addMappingWithCode","code","node","remainingLines","remainingLinesIndex","shiftNextLine","getNextLine","lineContents","newLine","lastGeneratedLine","lastMapping","nextLine","aChunk","isArray","chunk","prepend","unshift","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,UAAAD,IAEAD,EAAA,UAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUL,EAAQD,EAASM,GEjDjCN,EAAAe,mBAAAT,EAAA,GAAAS,mBACAf,EAAAgB,kBAAAV,EAAA,GAAAU,kBACAhB,EAAAiB,WAAAX,EAAA,IAAAW,YF6DM,SAAUhB,EAAQD,EAASM,GGhDjC,QAAAS,GAAAG,GACAA,IACAA,MAEAd,KAAAe,MAAAC,EAAAC,OAAAH,EAAA,aACAd,KAAAkB,YAAAF,EAAAC,OAAAH,EAAA,mBACAd,KAAAmB,gBAAAH,EAAAC,OAAAH,EAAA,qBACAd,KAAAoB,SAAA,GAAAC,GACArB,KAAAsB,OAAA,GAAAD,GACArB,KAAAuB,UAAA,GAAAC,GACAxB,KAAAyB,iBAAA,KAvBA,GAAAC,GAAAxB,EAAA,GACAc,EAA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AAyT,MAAAa,EACA,OAAA/T,EAAAF,QACA,OAAAE,EAAAN,MACA,OAAAM,EAAAJ,QACAiV,IAAA7U,EAAAF,QACAgV,IAAA9U,EAAAN,MACAqV,IAAA/U,EAAAJ,QACAoV,IAAAhV,EAAAG,MACAuD,EAAAtD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,OAGA0U,EAAA7U,EAAAF,OACAgV,EAAA9U,EAAAN,KACAqV,EAAA/U,EAAAJ,OACAoV,EAAAhV,EAAAG,KACAyU,GAAA,GACKA,IACLlR,EAAAtD,YACAX,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,UAGAiV,EAAA,KACAD,GAAA,EAEA,QAAA7J,GAAA,EAAAzJ,EAAAyS,EAAAzS,OAA4CyJ,EAAAzJ,EAAcyJ,IAC1DgJ,EAAAzO,WAAAyF,KAAA8H,GACApT,EAAAC,OACAD,EAAAG,OAAA,EAEAmL,EAAA,IAAAzJ,GACAuT,EAAA,KACAD,GAAA,GACSA,GACTlR,EAAAtD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,QAIAV,EAAAG,WAIAxC,KAAAsX,mBAAA,SAAAnU,EAAA0U,GACAvR,EAAA7C,iBAAAN,EAAA0U,MAGU/B,KAAAzT,EAAAyT,KAAAxP,QAGV1G,EAAAiB","file":"source-map.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\n\t * Copyright 2009-2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE.txt or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\texports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\texports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;\n\texports.SourceNode = __webpack_require__(10).SourceNode;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar base64VLQ = __webpack_require__(2);\n\tvar util = __webpack_require__(4);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar MappingList = __webpack_require__(6).MappingList;\n\t\n\t/**\n\t * An instance of the SourceMapGenerator represents a source map which is\n\t * being built incrementally. You may pass an object with the following\n\t * properties:\n\t *\n\t * - file: The filename of the generated source.\n\t * - sourceRoot: A root for all relative URLs in this source map.\n\t */\n\tfunction SourceMapGenerator(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\t this._file = util.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t}\n\t\n\tSourceMapGenerator.prototype._version = 3;\n\t\n\t/**\n\t * Creates a new SourceMapGenerator based on a SourceMapConsumer\n\t *\n\t * @param aSourceMapConsumer The SourceMap.\n\t */\n\tSourceMapGenerator.fromSourceMap =\n\t function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\t\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\t if (sourceRoot != null) {\n\t newMapping.source = util.relative(sourceRoot, newMapping.source);\n\t }\n\t\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\t\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\t\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var sourceRelative = sourceFile;\n\t if (sourceRoot !== null) {\n\t sourceRelative = util.relative(sourceRoot, sourceFile);\n\t }\n\t\n\t if (!generator._sources.has(sourceRelative)) {\n\t generator._sources.add(sourceRelative);\n\t }\n\t\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t };\n\t\n\t/**\n\t * Add a single mapping from original source line and column to the generated\n\t * source's line and column for this source map being created. The mapping\n\t * object should have the following properties:\n\t *\n\t * - generated: An object with the generated line and column positions.\n\t * - original: An object with the original line and column positions.\n\t * - source: The original source file (relative to the sourceRoot).\n\t * - name: An optional original token name for this mapping.\n\t */\n\tSourceMapGenerator.prototype.addMapping =\n\t function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util.getArg(aArgs, 'generated');\n\t var original = util.getArg(aArgs, 'original', null);\n\t var source = util.getArg(aArgs, 'source', null);\n\t var name = util.getArg(aArgs, 'name', null);\n\t\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\t\n\t if (source != null) {\n\t source = String(source);\n\t if (!this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t }\n\t\n\t if (name != null) {\n\t name = String(name);\n\t if (!this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t }\n\t\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t };\n\t\n\t/**\n\t * Set the source content for a source file.\n\t */\n\tSourceMapGenerator.prototype.setSourceContent =\n\t function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\t if (this._sourceRoot != null) {\n\t source = util.relative(this._sourceRoot, source);\n\t }\n\t\n\t if (aSourceContent != null) {\n\t // Add the source content to the _sourcesContents map.\n\t // Create a new _sourcesContents map if the property is null.\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = Object.create(null);\n\t }\n\t this._sourcesContents[util.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t // Remove the source file from the _sourcesContents map.\n\t // If the _sourcesContents map is empty, set the property to null.\n\t delete this._sourcesContents[util.toSetString(source)];\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Applies the mappings of a sub-source-map for a specific source file to the\n\t * source map being generated. Each mapping to the supplied source file is\n\t * rewritten using the supplied source map. Note: The resolution for the\n\t * resulting mappings is the minimium of this map and the supplied map.\n\t *\n\t * @param aSourceMapConsumer The source map to be applied.\n\t * @param aSourceFile Optional. The filename of the source file.\n\t * If omitted, SourceMapConsumer's file property will be used.\n\t * @param aSourceMapPath Optional. The dirname of the path to the source map\n\t * to be applied. If relative, it is relative to the SourceMapConsumer.\n\t * This parameter is needed when the two source maps aren't in the same\n\t * directory, and the source map to be applied contains relative source\n\t * paths. If so, those relative source paths need to be rewritten\n\t * relative to the SourceMapGenerator.\n\t */\n\tSourceMapGenerator.prototype.applySourceMap =\n\t function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\t // If aSourceFile is omitted, we will use the file property of the SourceMap\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error(\n\t 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n\t 'or the source map\\'s \"file\" property. Both were omitted.'\n\t );\n\t }\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\t var sourceRoot = this._sourceRoot;\n\t // Make \"sourceFile\" relative if an absolute Url is passed.\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t // Applying the SourceMap can add and remove items from the sources and\n\t // the names array.\n\t var newSources = new ArraySet();\n\t var newNames = new ArraySet();\n\t\n\t // Find mappings for the \"sourceFile\"\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t // Check if it can be mapped by the source map, then update the mapping.\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\t if (original.source != null) {\n\t // Copy mapping\n\t mapping.source = original.source;\n\t if (aSourceMapPath != null) {\n\t mapping.source = util.join(aSourceMapPath, mapping.source)\n\t }\n\t if (sourceRoot != null) {\n\t mapping.source = util.relative(sourceRoot, mapping.source);\n\t }\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\t\n\t var source = mapping.source;\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\t\n\t var name = mapping.name;\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t\n\t }, this);\n\t this._sources = newSources;\n\t this._names = newNames;\n\t\n\t // Copy sourcesContents of applied map.\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util.join(aSourceMapPath, sourceFile);\n\t }\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t };\n\t\n\t/**\n\t * A mapping can have one of the three levels of data:\n\t *\n\t * 1. Just the generated position.\n\t * 2. The Generated position, original position, and original source.\n\t * 3. Generated and original position, original source, as well as a name\n\t * token.\n\t *\n\t * To maintain consistency, we validate that any new mapping being added falls\n\t * in to one of these categories.\n\t */\n\tSourceMapGenerator.prototype._validateMapping =\n\t function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n\t aName) {\n\t // When aOriginal is truthy but has empty values for .line and .column,\n\t // it is most likely a programmer error. In this case we throw a very\n\t // specific error message to try to guide them the right way.\n\t // For example: https://github.com/Polymer/polymer-bundler/pull/519\n\t if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n\t throw new Error(\n\t 'original.line and original.column are not numbers -- you probably meant to omit ' +\n\t 'the original mapping entirely and only map the generated position. If so, pass ' +\n\t 'null for the original mapping instead of an object with empty or null values.'\n\t );\n\t }\n\t\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '<dir>/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 === null) {\n\t return 1; // aStr2 !== null\n\t }\n\t\n\t if (aStr2 === null) {\n\t return -1; // aStr1 !== null\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t\n\t/**\n\t * Strip any JSON XSSI avoidance prefix from the string (as documented\n\t * in the source maps specification), and then parse the string as\n\t * JSON.\n\t */\n\tfunction parseSourceMapInput(str) {\n\t return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n\t}\n\texports.parseSourceMapInput = parseSourceMapInput;\n\t\n\t/**\n\t * Compute the URL of a source given the the source root, the source's\n\t * URL, and the source map's URL.\n\t */\n\tfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n\t sourceURL = sourceURL || '';\n\t\n\t if (sourceRoot) {\n\t // This follows what Chrome does.\n\t if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n\t sourceRoot += '/';\n\t }\n\t // The spec says:\n\t // Line 4: An optional source root, useful for relocating source\n\t // files on a server or removing repeated values in the\n\t // “sources” entry. This value is prepended to the individual\n\t // entries in the “source” field.\n\t sourceURL = sourceRoot + sourceURL;\n\t }\n\t\n\t // Historically, SourceMapConsumer did not take the sourceMapURL as\n\t // a parameter. This mode is still somewhat supported, which is why\n\t // this code block is conditional. However, it's preferable to pass\n\t // the source map URL to SourceMapConsumer, so that this function\n\t // can implement the source URL resolution algorithm as outlined in\n\t // the spec. This block is basically the equivalent of:\n\t // new URL(sourceURL, sourceMapURL).toString()\n\t // ... except it avoids using URL, which wasn't available in the\n\t // older releases of node still supported by this library.\n\t //\n\t // The spec says:\n\t // If the sources are not absolute URLs after prepending of the\n\t // “sourceRoot”, the sources are resolved relative to the\n\t // SourceMap (like resolving script src in a html document).\n\t if (sourceMapURL) {\n\t var parsed = urlParse(sourceMapURL);\n\t if (!parsed) {\n\t throw new Error(\"sourceMapURL could not be parsed\");\n\t }\n\t if (parsed.path) {\n\t // Strip the last path component, but keep the \"/\".\n\t var index = parsed.path.lastIndexOf('/');\n\t if (index >= 0) {\n\t parsed.path = parsed.path.substring(0, index + 1);\n\t }\n\t }\n\t sourceURL = join(urlGenerate(parsed), sourceURL);\n\t }\n\t\n\t return normalize(sourceURL);\n\t}\n\texports.computeSourceURL = computeSourceURL;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n\t : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t configurable: true,\n\t enumerable: true,\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number is 1-based.\n\t * - column: Optional. the column number in the original source.\n\t * The column number is 0-based.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t needle.source = this._findSourceIndex(needle.source);\n\t if (needle.source < 0) {\n\t return [];\n\t }\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The first parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t if (sourceRoot) {\n\t sourceRoot = util.normalize(sourceRoot);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this._absoluteSources = this._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this._sourceMapURL = aSourceMapURL;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Utility function to find the index of a source. Returns -1 if not\n\t * found.\n\t */\n\tBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t if (this._sources.has(relativeSource)) {\n\t return this._sources.indexOf(relativeSource);\n\t }\n\t\n\t // Maybe aSource is an absolute URL as returned by |sources|. In\n\t // this case we can't simply undo the transform.\n\t var i;\n\t for (i = 0; i < this._absoluteSources.length; ++i) {\n\t if (this._absoluteSources[i] == aSource) {\n\t return i;\n\t }\n\t }\n\t\n\t return -1;\n\t};\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @param String aSourceMapURL\n\t * The URL at which the source map can be found (optional)\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t smc._sourceMapURL = aSourceMapURL;\n\t smc._absoluteSources = smc._sources.toArray().map(function (s) {\n\t return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n\t });\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._absoluteSources.slice();\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t var index = this._findSourceIndex(aSource);\n\t if (index >= 0) {\n\t return this.sourcesContent[index];\n\t }\n\t\n\t var relativeSource = aSource;\n\t if (this.sourceRoot != null) {\n\t relativeSource = util.relative(this.sourceRoot, relativeSource);\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + relativeSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t source = this._findSourceIndex(source);\n\t if (source < 0) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The first parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * The second parameter, if given, is a string whose value is the URL\n\t * at which the source map was found. This URL is used to compute the\n\t * sources array.\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = util.parseSourceMapInput(aSourceMap);\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source. The line number\n\t * is 1-based.\n\t * - column: The column number in the generated source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null. The\n\t * line number is 1-based.\n\t * - column: The column number in the original source, or null. The\n\t * column number is 0-based.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source. The line number\n\t * is 1-based.\n\t * - column: The column number in the original source. The column\n\t * number is 0-based.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null. The\n\t * line number is 1-based. \n\t * - column: The column number in the generated source, or null.\n\t * The column number is 0-based.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = null;\n\t if (mapping.name) {\n\t name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t }\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex] || '';\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0fd5815da764db5fb9fe","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var sourceRelative = sourceFile;\n if (sourceRoot !== null) {\n sourceRelative = util.relative(sourceRoot, sourceFile);\n }\n\n if (!generator._sources.has(sourceRelative)) {\n generator._sources.add(sourceRelative);\n }\n\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.-]*)(?::(\\d+))?(.*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || urlRegexp.test(aPath);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 === null) {\n return 1; // aStr2 !== null\n }\n\n if (aStr2 === null) {\n return -1; // aStr1 !== null\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n/**\n * Strip any JSON XSSI avoidance prefix from the string (as documented\n * in the source maps specification), and then parse the string as\n * JSON.\n */\nfunction parseSourceMapInput(str) {\n return JSON.parse(str.replace(/^\\)]}'[^\\n]*\\n/, ''));\n}\nexports.parseSourceMapInput = parseSourceMapInput;\n\n/**\n * Compute the URL of a source given the the source root, the source's\n * URL, and the source map's URL.\n */\nfunction computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {\n sourceURL = sourceURL || '';\n\n if (sourceRoot) {\n // This follows what Chrome does.\n if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {\n sourceRoot += '/';\n }\n // The spec says:\n // Line 4: An optional source root, useful for relocating source\n // files on a server or removing repeated values in the\n // “sources” entry. This value is prepended to the individual\n // entries in the “source” field.\n sourceURL = sourceRoot + sourceURL;\n }\n\n // Historically, SourceMapConsumer did not take the sourceMapURL as\n // a parameter. This mode is still somewhat supported, which is why\n // this code block is conditional. However, it's preferable to pass\n // the source map URL to SourceMapConsumer, so that this function\n // can implement the source URL resolution algorithm as outlined in\n // the spec. This block is basically the equivalent of:\n // new URL(sourceURL, sourceMapURL).toString()\n // ... except it avoids using URL, which wasn't available in the\n // older releases of node still supported by this library.\n //\n // The spec says:\n // If the sources are not absolute URLs after prepending of the\n // “sourceRoot”, the sources are resolved relative to the\n // SourceMap (like resolving script src in a html document).\n if (sourceMapURL) {\n var parsed = urlParse(sourceMapURL);\n if (!parsed) {\n throw new Error(\"sourceMapURL could not be parsed\");\n }\n if (parsed.path) {\n // Strip the last path component, but keep the \"/\".\n var index = parsed.path.lastIndexOf('/');\n if (index >= 0) {\n parsed.path = parsed.path.substring(0, index + 1);\n }\n }\n sourceURL = join(urlGenerate(parsed), sourceURL);\n }\n\n return normalize(sourceURL);\n}\nexports.computeSourceURL = computeSourceURL;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL)\n : new BasicSourceMapConsumer(sourceMap, aSourceMapURL);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n configurable: true,\n enumerable: true,\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL);\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number is 1-based.\n * - column: Optional. the column number in the original source.\n * The column number is 0-based.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n needle.source = this._findSourceIndex(needle.source);\n if (needle.source < 0) {\n return [];\n }\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The first parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n if (sourceRoot) {\n sourceRoot = util.normalize(sourceRoot);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this._absoluteSources = this._sources.toArray().map(function (s) {\n return util.computeSourceURL(sourceRoot, s, aSourceMapURL);\n });\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this._sourceMapURL = aSourceMapURL;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Utility function to find the index of a source. Returns -1 if not\n * found.\n */\nBasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) {\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n if (this._sources.has(relativeSource)) {\n return this._sources.indexOf(relativeSource);\n }\n\n // Maybe aSource is an absolute URL as returned by |sources|. In\n // this case we can't simply undo the transform.\n var i;\n for (i = 0; i < this._absoluteSources.length; ++i) {\n if (this._absoluteSources[i] == aSource) {\n return i;\n }\n }\n\n return -1;\n};\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @param String aSourceMapURL\n * The URL at which the source map can be found (optional)\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n smc._sourceMapURL = aSourceMapURL;\n smc._absoluteSources = smc._sources.toArray().map(function (s) {\n return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL);\n });\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._absoluteSources.slice();\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL);\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n var index = this._findSourceIndex(aSource);\n if (index >= 0) {\n return this.sourcesContent[index];\n }\n\n var relativeSource = aSource;\n if (this.sourceRoot != null) {\n relativeSource = util.relative(this.sourceRoot, relativeSource);\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = relativeSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + relativeSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + relativeSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + relativeSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based.\n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n source = this._findSourceIndex(source);\n if (source < 0) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The first parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * The second parameter, if given, is a string whose value is the URL\n * at which the source map was found. This URL is used to compute the\n * sources array.\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = util.parseSourceMapInput(aSourceMap);\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL)\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source. The line number\n * is 1-based.\n * - column: The column number in the generated source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null. The\n * line number is 1-based.\n * - column: The column number in the original source, or null. The\n * column number is 0-based.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source. The line number\n * is 1-based.\n * - column: The column number in the original source. The column\n * number is 0-based.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null. The\n * line number is 1-based. \n * - column: The column number in the generated source, or null.\n * The column number is 0-based.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL);\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = null;\n if (mapping.name) {\n name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex] || '';\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex] || '';\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/source-map/lib/array-set.js b/node_modules/source-map/lib/array-set.js deleted file mode 100644 index fbd5c81c..00000000 --- a/node_modules/source-map/lib/array-set.js +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var has = Object.prototype.hasOwnProperty; -var hasNativeMap = typeof Map !== "undefined"; - -/** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ -function ArraySet() { - this._array = []; - this._set = hasNativeMap ? new Map() : Object.create(null); -} - -/** - * Static method for creating ArraySet instances from an existing array. - */ -ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; -}; - -/** - * Return how many unique items are in this ArraySet. If duplicates have been - * added, than those do not count towards the size. - * - * @returns Number - */ -ArraySet.prototype.size = function ArraySet_size() { - return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; -}; - -/** - * Add the given string to this set. - * - * @param String aStr - */ -ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var sStr = hasNativeMap ? aStr : util.toSetString(aStr); - var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - if (hasNativeMap) { - this._set.set(aStr, idx); - } else { - this._set[sStr] = idx; - } - } -}; - -/** - * Is the given string a member of this set? - * - * @param String aStr - */ -ArraySet.prototype.has = function ArraySet_has(aStr) { - if (hasNativeMap) { - return this._set.has(aStr); - } else { - var sStr = util.toSetString(aStr); - return has.call(this._set, sStr); - } -}; - -/** - * What is the index of the given string in the array? - * - * @param String aStr - */ -ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (hasNativeMap) { - var idx = this._set.get(aStr); - if (idx >= 0) { - return idx; - } - } else { - var sStr = util.toSetString(aStr); - if (has.call(this._set, sStr)) { - return this._set[sStr]; - } - } - - throw new Error('"' + aStr + '" is not in the set.'); -}; - -/** - * What is the element at the given index? - * - * @param Number aIdx - */ -ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); -}; - -/** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ -ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); -}; - -exports.ArraySet = ArraySet; diff --git a/node_modules/source-map/lib/base64-vlq.js b/node_modules/source-map/lib/base64-vlq.js deleted file mode 100644 index 612b4040..00000000 --- a/node_modules/source-map/lib/base64-vlq.js +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -var base64 = require('./base64'); - -// A single base 64 digit can contain 6 bits of data. For the base 64 variable -// length quantities we use in the source map spec, the first bit is the sign, -// the next four bits are the actual value, and the 6th bit is the -// continuation bit. The continuation bit tells us whether there are more -// digits in this value following this digit. -// -// Continuation -// | Sign -// | | -// V V -// 101011 - -var VLQ_BASE_SHIFT = 5; - -// binary: 100000 -var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - -// binary: 011111 -var VLQ_BASE_MASK = VLQ_BASE - 1; - -// binary: 100000 -var VLQ_CONTINUATION_BIT = VLQ_BASE; - -/** - * Converts from a two-complement value to a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ -function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; -} - -/** - * Converts to a two-complement value from a value where the sign bit is - * placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ -function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; -} - -/** - * Returns the base 64 VLQ encoded value. - */ -exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; -}; - -/** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string via the out parameter. - */ -exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (aIndex >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - - digit = base64.decode(aStr.charCodeAt(aIndex++)); - if (digit === -1) { - throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); - } - - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - aOutParam.value = fromVLQSigned(result); - aOutParam.rest = aIndex; -}; diff --git a/node_modules/source-map/lib/base64.js b/node_modules/source-map/lib/base64.js deleted file mode 100644 index 8aa86b30..00000000 --- a/node_modules/source-map/lib/base64.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); - -/** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ -exports.encode = function (number) { - if (0 <= number && number < intToCharMap.length) { - return intToCharMap[number]; - } - throw new TypeError("Must be between 0 and 63: " + number); -}; - -/** - * Decode a single base 64 character code digit to an integer. Returns -1 on - * failure. - */ -exports.decode = function (charCode) { - var bigA = 65; // 'A' - var bigZ = 90; // 'Z' - - var littleA = 97; // 'a' - var littleZ = 122; // 'z' - - var zero = 48; // '0' - var nine = 57; // '9' - - var plus = 43; // '+' - var slash = 47; // '/' - - var littleOffset = 26; - var numberOffset = 52; - - // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ - if (bigA <= charCode && charCode <= bigZ) { - return (charCode - bigA); - } - - // 26 - 51: abcdefghijklmnopqrstuvwxyz - if (littleA <= charCode && charCode <= littleZ) { - return (charCode - littleA + littleOffset); - } - - // 52 - 61: 0123456789 - if (zero <= charCode && charCode <= nine) { - return (charCode - zero + numberOffset); - } - - // 62: + - if (charCode == plus) { - return 62; - } - - // 63: / - if (charCode == slash) { - return 63; - } - - // Invalid base64 digit. - return -1; -}; diff --git a/node_modules/source-map/lib/binary-search.js b/node_modules/source-map/lib/binary-search.js deleted file mode 100644 index 010ac941..00000000 --- a/node_modules/source-map/lib/binary-search.js +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -exports.GREATEST_LOWER_BOUND = 1; -exports.LEAST_UPPER_BOUND = 2; - -/** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - */ -function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the index of - // the next-closest element. - // - // 3. We did not find the exact element, and there is no next-closest - // element than the one we are searching for, so we return -1. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return mid; - } - else if (cmp > 0) { - // Our needle is greater than aHaystack[mid]. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); - } - - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return aHigh < aHaystack.length ? aHigh : -1; - } else { - return mid; - } - } - else { - // Our needle is less than aHaystack[mid]. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); - } - - // we are in termination case (3) or (2) and return the appropriate thing. - if (aBias == exports.LEAST_UPPER_BOUND) { - return mid; - } else { - return aLow < 0 ? -1 : aLow; - } - } -} - -/** - * This is an implementation of binary search which will always try and return - * the index of the closest element if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or - * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */ -exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { - if (aHaystack.length === 0) { - return -1; - } - - var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, - aCompare, aBias || exports.GREATEST_LOWER_BOUND); - if (index < 0) { - return -1; - } - - // We have found either the exact element, or the next-closest element than - // the one we are searching for. However, there may be more than one such - // element. Make sure we always return the smallest of these. - while (index - 1 >= 0) { - if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { - break; - } - --index; - } - - return index; -}; diff --git a/node_modules/source-map/lib/mapping-list.js b/node_modules/source-map/lib/mapping-list.js deleted file mode 100644 index 06d1274a..00000000 --- a/node_modules/source-map/lib/mapping-list.js +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2014 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); - -/** - * Determine whether mappingB is after mappingA with respect to generated - * position. - */ -function generatedPositionAfter(mappingA, mappingB) { - // Optimized for most common case - var lineA = mappingA.generatedLine; - var lineB = mappingB.generatedLine; - var columnA = mappingA.generatedColumn; - var columnB = mappingB.generatedColumn; - return lineB > lineA || lineB == lineA && columnB >= columnA || - util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; -} - -/** - * A data structure to provide a sorted view of accumulated mappings in a - * performance conscious manner. It trades a neglibable overhead in general - * case for a large speedup in case of mappings being added in order. - */ -function MappingList() { - this._array = []; - this._sorted = true; - // Serves as infimum - this._last = {generatedLine: -1, generatedColumn: 0}; -} - -/** - * Iterate through internal items. This method takes the same arguments that - * `Array.prototype.forEach` takes. - * - * NOTE: The order of the mappings is NOT guaranteed. - */ -MappingList.prototype.unsortedForEach = - function MappingList_forEach(aCallback, aThisArg) { - this._array.forEach(aCallback, aThisArg); - }; - -/** - * Add the given source mapping. - * - * @param Object aMapping - */ -MappingList.prototype.add = function MappingList_add(aMapping) { - if (generatedPositionAfter(this._last, aMapping)) { - this._last = aMapping; - this._array.push(aMapping); - } else { - this._sorted = false; - this._array.push(aMapping); - } -}; - -/** - * Returns the flat, sorted array of mappings. The mappings are sorted by - * generated position. - * - * WARNING: This method returns internal data without copying, for - * performance. The return value must NOT be mutated, and should be treated as - * an immutable borrow. If you want to take ownership, you must make your own - * copy. - */ -MappingList.prototype.toArray = function MappingList_toArray() { - if (!this._sorted) { - this._array.sort(util.compareByGeneratedPositionsInflated); - this._sorted = true; - } - return this._array; -}; - -exports.MappingList = MappingList; diff --git a/node_modules/source-map/lib/quick-sort.js b/node_modules/source-map/lib/quick-sort.js deleted file mode 100644 index 6a7caadb..00000000 --- a/node_modules/source-map/lib/quick-sort.js +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -// It turns out that some (most?) JavaScript engines don't self-host -// `Array.prototype.sort`. This makes sense because C++ will likely remain -// faster than JS when doing raw CPU-intensive sorting. However, when using a -// custom comparator function, calling back and forth between the VM's C++ and -// JIT'd JS is rather slow *and* loses JIT type information, resulting in -// worse generated code for the comparator function than would be optimal. In -// fact, when sorting with a comparator, these costs outweigh the benefits of -// sorting in C++. By using our own JS-implemented Quick Sort (below), we get -// a ~3500ms mean speed-up in `bench/bench.html`. - -/** - * Swap the elements indexed by `x` and `y` in the array `ary`. - * - * @param {Array} ary - * The array. - * @param {Number} x - * The index of the first item. - * @param {Number} y - * The index of the second item. - */ -function swap(ary, x, y) { - var temp = ary[x]; - ary[x] = ary[y]; - ary[y] = temp; -} - -/** - * Returns a random integer within the range `low .. high` inclusive. - * - * @param {Number} low - * The lower bound on the range. - * @param {Number} high - * The upper bound on the range. - */ -function randomIntInRange(low, high) { - return Math.round(low + (Math.random() * (high - low))); -} - -/** - * The Quick Sort algorithm. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - * @param {Number} p - * Start index of the array - * @param {Number} r - * End index of the array - */ -function doQuickSort(ary, comparator, p, r) { - // If our lower bound is less than our upper bound, we (1) partition the - // array into two pieces and (2) recurse on each half. If it is not, this is - // the empty array and our base case. - - if (p < r) { - // (1) Partitioning. - // - // The partitioning chooses a pivot between `p` and `r` and moves all - // elements that are less than or equal to the pivot to the before it, and - // all the elements that are greater than it after it. The effect is that - // once partition is done, the pivot is in the exact place it will be when - // the array is put in sorted order, and it will not need to be moved - // again. This runs in O(n) time. - - // Always choose a random pivot so that an input array which is reverse - // sorted does not cause O(n^2) running time. - var pivotIndex = randomIntInRange(p, r); - var i = p - 1; - - swap(ary, pivotIndex, r); - var pivot = ary[r]; - - // Immediately after `j` is incremented in this loop, the following hold - // true: - // - // * Every element in `ary[p .. i]` is less than or equal to the pivot. - // - // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. - for (var j = p; j < r; j++) { - if (comparator(ary[j], pivot) <= 0) { - i += 1; - swap(ary, i, j); - } - } - - swap(ary, i + 1, j); - var q = i + 1; - - // (2) Recurse on each half. - - doQuickSort(ary, comparator, p, q - 1); - doQuickSort(ary, comparator, q + 1, r); - } -} - -/** - * Sort the given array in-place with the given comparator function. - * - * @param {Array} ary - * An array to sort. - * @param {function} comparator - * Function to use to compare two items. - */ -exports.quickSort = function (ary, comparator) { - doQuickSort(ary, comparator, 0, ary.length - 1); -}; diff --git a/node_modules/source-map/lib/source-map-consumer.js b/node_modules/source-map/lib/source-map-consumer.js deleted file mode 100644 index 7b99d1da..00000000 --- a/node_modules/source-map/lib/source-map-consumer.js +++ /dev/null @@ -1,1145 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var util = require('./util'); -var binarySearch = require('./binary-search'); -var ArraySet = require('./array-set').ArraySet; -var base64VLQ = require('./base64-vlq'); -var quickSort = require('./quick-sort').quickSort; - -function SourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - return sourceMap.sections != null - ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) - : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); -} - -SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { - return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); -} - -/** - * The version of the source mapping spec that we are consuming. - */ -SourceMapConsumer.prototype._version = 3; - -// `__generatedMappings` and `__originalMappings` are arrays that hold the -// parsed mapping coordinates from the source map's "mappings" attribute. They -// are lazily instantiated, accessed via the `_generatedMappings` and -// `_originalMappings` getters respectively, and we only parse the mappings -// and create these arrays once queried for a source location. We jump through -// these hoops because there can be many thousands of mappings, and parsing -// them is expensive, so we only want to do it if we must. -// -// Each object in the arrays is of the form: -// -// { -// generatedLine: The line number in the generated code, -// generatedColumn: The column number in the generated code, -// source: The path to the original source file that generated this -// chunk of code, -// originalLine: The line number in the original source that -// corresponds to this chunk of generated code, -// originalColumn: The column number in the original source that -// corresponds to this chunk of generated code, -// name: The name of the original symbol which generated this chunk of -// code. -// } -// -// All properties except for `generatedLine` and `generatedColumn` can be -// `null`. -// -// `_generatedMappings` is ordered by the generated positions. -// -// `_originalMappings` is ordered by the original positions. - -SourceMapConsumer.prototype.__generatedMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__generatedMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__generatedMappings; - } -}); - -SourceMapConsumer.prototype.__originalMappings = null; -Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { - configurable: true, - enumerable: true, - get: function () { - if (!this.__originalMappings) { - this._parseMappings(this._mappings, this.sourceRoot); - } - - return this.__originalMappings; - } -}); - -SourceMapConsumer.prototype._charIsMappingSeparator = - function SourceMapConsumer_charIsMappingSeparator(aStr, index) { - var c = aStr.charAt(index); - return c === ";" || c === ","; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - throw new Error("Subclasses must implement _parseMappings"); - }; - -SourceMapConsumer.GENERATED_ORDER = 1; -SourceMapConsumer.ORIGINAL_ORDER = 2; - -SourceMapConsumer.GREATEST_LOWER_BOUND = 1; -SourceMapConsumer.LEAST_UPPER_BOUND = 2; - -/** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ -SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source === null ? null : this._sources.at(mapping.source); - source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name === null ? null : this._names.at(mapping.name) - }; - }, this).forEach(aCallback, context); - }; - -/** - * Returns all generated line and column information for the original source, - * line, and column provided. If no column is provided, returns all mappings - * corresponding to a either the line we are searching for or the next - * closest line that has any mappings. Otherwise, returns all mappings - * corresponding to the given line and either the column we are searching for - * or the next closest column that has any offsets. - * - * The only argument is an object with the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number is 1-based. - * - column: Optional. the column number in the original source. - * The column number is 0-based. - * - * and an array of objects is returned, each with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -SourceMapConsumer.prototype.allGeneratedPositionsFor = - function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { - var line = util.getArg(aArgs, 'line'); - - // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping - // returns the index of the closest mapping less than the needle. By - // setting needle.originalColumn to 0, we thus find the last mapping for - // the given line, provided such a mapping exists. - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: line, - originalColumn: util.getArg(aArgs, 'column', 0) - }; - - needle.source = this._findSourceIndex(needle.source); - if (needle.source < 0) { - return []; - } - - var mappings = []; - - var index = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - binarySearch.LEAST_UPPER_BOUND); - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (aArgs.column === undefined) { - var originalLine = mapping.originalLine; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we found. Since - // mappings are sorted, this is guaranteed to find all mappings for - // the line we found. - while (mapping && mapping.originalLine === originalLine) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } else { - var originalColumn = mapping.originalColumn; - - // Iterate until either we run out of mappings, or we run into - // a mapping for a different line than the one we were searching for. - // Since mappings are sorted, this is guaranteed to find all mappings for - // the line we are searching for. - while (mapping && - mapping.originalLine === line && - mapping.originalColumn == originalColumn) { - mappings.push({ - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }); - - mapping = this._originalMappings[++index]; - } - } - } - - return mappings; - }; - -exports.SourceMapConsumer = SourceMapConsumer; - -/** - * A BasicSourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The first parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: Optional. The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ -function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which - // requires the array) to play nice here. - var names = util.getArg(sourceMap, 'names', []); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - // Once again, Sass deviates from the spec and supplies the version as a - // string rather than a number, so we use loose equality checking here. - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - if (sourceRoot) { - sourceRoot = util.normalize(sourceRoot); - } - - sources = sources - .map(String) - // Some source maps produce relative source paths like "./foo.js" instead of - // "foo.js". Normalize these first so that future comparisons will succeed. - // See bugzil.la/1090768. - .map(util.normalize) - // Always ensure that absolute sources are internally stored relative to - // the source root, if the source root is absolute. Not doing this would - // be particularly problematic when the source root is a prefix of the - // source (valid, but why??). See github issue #199 and bugzil.la/1188982. - .map(function (source) { - return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) - ? util.relative(sourceRoot, source) - : source; - }); - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names.map(String), true); - this._sources = ArraySet.fromArray(sources, true); - - this._absoluteSources = this._sources.toArray().map(function (s) { - return util.computeSourceURL(sourceRoot, s, aSourceMapURL); - }); - - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this._mappings = mappings; - this._sourceMapURL = aSourceMapURL; - this.file = file; -} - -BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; - -/** - * Utility function to find the index of a source. Returns -1 if not - * found. - */ -BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - if (this._sources.has(relativeSource)) { - return this._sources.indexOf(relativeSource); - } - - // Maybe aSource is an absolute URL as returned by |sources|. In - // this case we can't simply undo the transform. - var i; - for (i = 0; i < this._absoluteSources.length; ++i) { - if (this._absoluteSources[i] == aSource) { - return i; - } - } - - return -1; -}; - -/** - * Create a BasicSourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @param String aSourceMapURL - * The URL at which the source map can be found (optional) - * @returns BasicSourceMapConsumer - */ -BasicSourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { - var smc = Object.create(BasicSourceMapConsumer.prototype); - - var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - smc._sourceMapURL = aSourceMapURL; - smc._absoluteSources = smc._sources.toArray().map(function (s) { - return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); - }); - - // Because we are modifying the entries (by converting string sources and - // names to indices into the sources and names ArraySets), we have to make - // a copy of the entry or else bad things happen. Shared mutable state - // strikes again! See github issue #191. - - var generatedMappings = aSourceMap._mappings.toArray().slice(); - var destGeneratedMappings = smc.__generatedMappings = []; - var destOriginalMappings = smc.__originalMappings = []; - - for (var i = 0, length = generatedMappings.length; i < length; i++) { - var srcMapping = generatedMappings[i]; - var destMapping = new Mapping; - destMapping.generatedLine = srcMapping.generatedLine; - destMapping.generatedColumn = srcMapping.generatedColumn; - - if (srcMapping.source) { - destMapping.source = sources.indexOf(srcMapping.source); - destMapping.originalLine = srcMapping.originalLine; - destMapping.originalColumn = srcMapping.originalColumn; - - if (srcMapping.name) { - destMapping.name = names.indexOf(srcMapping.name); - } - - destOriginalMappings.push(destMapping); - } - - destGeneratedMappings.push(destMapping); - } - - quickSort(smc.__originalMappings, util.compareByOriginalPositions); - - return smc; - }; - -/** - * The version of the source mapping spec that we are consuming. - */ -BasicSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { - get: function () { - return this._absoluteSources.slice(); - } -}); - -/** - * Provide the JIT with a nice shape / hidden class. - */ -function Mapping() { - this.generatedLine = 0; - this.generatedColumn = 0; - this.source = null; - this.originalLine = null; - this.originalColumn = null; - this.name = null; -} - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -BasicSourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var length = aStr.length; - var index = 0; - var cachedSegments = {}; - var temp = {}; - var originalMappings = []; - var generatedMappings = []; - var mapping, str, segment, end, value; - - while (index < length) { - if (aStr.charAt(index) === ';') { - generatedLine++; - index++; - previousGeneratedColumn = 0; - } - else if (aStr.charAt(index) === ',') { - index++; - } - else { - mapping = new Mapping(); - mapping.generatedLine = generatedLine; - - // Because each offset is encoded relative to the previous one, - // many segments often have the same encoding. We can exploit this - // fact by caching the parsed variable length fields of each segment, - // allowing us to avoid a second parse if we encounter the same - // segment again. - for (end = index; end < length; end++) { - if (this._charIsMappingSeparator(aStr, end)) { - break; - } - } - str = aStr.slice(index, end); - - segment = cachedSegments[str]; - if (segment) { - index += str.length; - } else { - segment = []; - while (index < end) { - base64VLQ.decode(aStr, index, temp); - value = temp.value; - index = temp.rest; - segment.push(value); - } - - if (segment.length === 2) { - throw new Error('Found a source, but no line and column'); - } - - if (segment.length === 3) { - throw new Error('Found a source and line, but no column'); - } - - cachedSegments[str] = segment; - } - - // Generated column. - mapping.generatedColumn = previousGeneratedColumn + segment[0]; - previousGeneratedColumn = mapping.generatedColumn; - - if (segment.length > 1) { - // Original source. - mapping.source = previousSource + segment[1]; - previousSource += segment[1]; - - // Original line. - mapping.originalLine = previousOriginalLine + segment[2]; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - - // Original column. - mapping.originalColumn = previousOriginalColumn + segment[3]; - previousOriginalColumn = mapping.originalColumn; - - if (segment.length > 4) { - // Original name. - mapping.name = previousName + segment[4]; - previousName += segment[4]; - } - } - - generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - originalMappings.push(mapping); - } - } - } - - quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); - this.__generatedMappings = generatedMappings; - - quickSort(originalMappings, util.compareByOriginalPositions); - this.__originalMappings = originalMappings; - }; - -/** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ -BasicSourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator, aBias) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator, aBias); - }; - -/** - * Compute the last column for each generated mapping. The last column is - * inclusive. - */ -BasicSourceMapConsumer.prototype.computeColumnSpans = - function SourceMapConsumer_computeColumnSpans() { - for (var index = 0; index < this._generatedMappings.length; ++index) { - var mapping = this._generatedMappings[index]; - - // Mappings do not contain a field for the last generated columnt. We - // can come up with an optimistic estimate, however, by assuming that - // mappings are contiguous (i.e. given two consecutive mappings, the - // first mapping ends where the second one starts). - if (index + 1 < this._generatedMappings.length) { - var nextMapping = this._generatedMappings[index + 1]; - - if (mapping.generatedLine === nextMapping.generatedLine) { - mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; - continue; - } - } - - // The last mapping for each line spans the entire line. - mapping.lastGeneratedColumn = Infinity; - } - }; - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ -BasicSourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositionsDeflated, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._generatedMappings[index]; - - if (mapping.generatedLine === needle.generatedLine) { - var source = util.getArg(mapping, 'source', null); - if (source !== null) { - source = this._sources.at(source); - source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); - } - var name = util.getArg(mapping, 'name', null); - if (name !== null) { - name = this._names.at(name); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: name - }; - } - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -BasicSourceMapConsumer.prototype.hasContentsOfAllSources = - function BasicSourceMapConsumer_hasContentsOfAllSources() { - if (!this.sourcesContent) { - return false; - } - return this.sourcesContent.length >= this._sources.size() && - !this.sourcesContent.some(function (sc) { return sc == null; }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -BasicSourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - if (!this.sourcesContent) { - return null; - } - - var index = this._findSourceIndex(aSource); - if (index >= 0) { - return this.sourcesContent[index]; - } - - var relativeSource = aSource; - if (this.sourceRoot != null) { - relativeSource = util.relative(this.sourceRoot, relativeSource); - } - - var url; - if (this.sourceRoot != null - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + relativeSource)) { - return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; - } - } - - // This function is used recursively from - // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we - // don't want to throw if we can't find the source - we just want to - // return null, so we provide a flag to exit gracefully. - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + relativeSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or - * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the - * closest element that is smaller than or greater than the one we are - * searching for, respectively, if the exact element cannot be found. - * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -BasicSourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var source = util.getArg(aArgs, 'source'); - source = this._findSourceIndex(source); - if (source < 0) { - return { - line: null, - column: null, - lastColumn: null - }; - } - - var needle = { - source: source, - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - var index = this._findMapping( - needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions, - util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) - ); - - if (index >= 0) { - var mapping = this._originalMappings[index]; - - if (mapping.source === needle.source) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null), - lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) - }; - } - } - - return { - line: null, - column: null, - lastColumn: null - }; - }; - -exports.BasicSourceMapConsumer = BasicSourceMapConsumer; - -/** - * An IndexedSourceMapConsumer instance represents a parsed source map which - * we can query for information. It differs from BasicSourceMapConsumer in - * that it takes "indexed" source maps (i.e. ones with a "sections" field) as - * input. - * - * The first parameter is a raw source map (either as a JSON string, or already - * parsed to an object). According to the spec for indexed source maps, they - * have the following attributes: - * - * - version: Which version of the source map spec this map is following. - * - file: Optional. The generated file this source map is associated with. - * - sections: A list of section definitions. - * - * Each value under the "sections" field has two fields: - * - offset: The offset into the original specified at which this section - * begins to apply, defined as an object with a "line" and "column" - * field. - * - map: A source map definition. This source map could also be indexed, - * but doesn't have to be. - * - * Instead of the "map" field, it's also possible to have a "url" field - * specifying a URL to retrieve a source map from, but that's currently - * unsupported. - * - * Here's an example source map, taken from the source map spec[0], but - * modified to omit a section which uses the "url" field. - * - * { - * version : 3, - * file: "app.js", - * sections: [{ - * offset: {line:100, column:10}, - * map: { - * version : 3, - * file: "section.js", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AAAA,E;;ABCDE;" - * } - * }], - * } - * - * The second parameter, if given, is a string whose value is the URL - * at which the source map was found. This URL is used to compute the - * sources array. - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt - */ -function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = util.parseSourceMapInput(aSourceMap); - } - - var version = util.getArg(sourceMap, 'version'); - var sections = util.getArg(sourceMap, 'sections'); - - if (version != this._version) { - throw new Error('Unsupported version: ' + version); - } - - this._sources = new ArraySet(); - this._names = new ArraySet(); - - var lastOffset = { - line: -1, - column: 0 - }; - this._sections = sections.map(function (s) { - if (s.url) { - // The url field will require support for asynchronicity. - // See https://github.com/mozilla/source-map/issues/16 - throw new Error('Support for url field in sections not implemented.'); - } - var offset = util.getArg(s, 'offset'); - var offsetLine = util.getArg(offset, 'line'); - var offsetColumn = util.getArg(offset, 'column'); - - if (offsetLine < lastOffset.line || - (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { - throw new Error('Section offsets must be ordered and non-overlapping.'); - } - lastOffset = offset; - - return { - generatedOffset: { - // The offset fields are 0-based, but we use 1-based indices when - // encoding/decoding from VLQ. - generatedLine: offsetLine + 1, - generatedColumn: offsetColumn + 1 - }, - consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) - } - }); -} - -IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); -IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; - -/** - * The version of the source mapping spec that we are consuming. - */ -IndexedSourceMapConsumer.prototype._version = 3; - -/** - * The list of original sources. - */ -Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { - get: function () { - var sources = []; - for (var i = 0; i < this._sections.length; i++) { - for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { - sources.push(this._sections[i].consumer.sources[j]); - } - } - return sources; - } -}); - -/** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. The line number - * is 1-based. - * - column: The column number in the generated source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. The - * line number is 1-based. - * - column: The column number in the original source, or null. The - * column number is 0-based. - * - name: The original identifier, or null. - */ -IndexedSourceMapConsumer.prototype.originalPositionFor = - function IndexedSourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - // Find the section containing the generated position we're trying to map - // to an original position. - var sectionIndex = binarySearch.search(needle, this._sections, - function(needle, section) { - var cmp = needle.generatedLine - section.generatedOffset.generatedLine; - if (cmp) { - return cmp; - } - - return (needle.generatedColumn - - section.generatedOffset.generatedColumn); - }); - var section = this._sections[sectionIndex]; - - if (!section) { - return { - source: null, - line: null, - column: null, - name: null - }; - } - - return section.consumer.originalPositionFor({ - line: needle.generatedLine - - (section.generatedOffset.generatedLine - 1), - column: needle.generatedColumn - - (section.generatedOffset.generatedLine === needle.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - bias: aArgs.bias - }); - }; - -/** - * Return true if we have the source content for every source in the source - * map, false otherwise. - */ -IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = - function IndexedSourceMapConsumer_hasContentsOfAllSources() { - return this._sections.every(function (s) { - return s.consumer.hasContentsOfAllSources(); - }); - }; - -/** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * available. - */ -IndexedSourceMapConsumer.prototype.sourceContentFor = - function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - var content = section.consumer.sourceContentFor(aSource, true); - if (content) { - return content; - } - } - if (nullOnMissing) { - return null; - } - else { - throw new Error('"' + aSource + '" is not in the SourceMap.'); - } - }; - -/** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. The line number - * is 1-based. - * - column: The column number in the original source. The column - * number is 0-based. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. The - * line number is 1-based. - * - column: The column number in the generated source, or null. - * The column number is 0-based. - */ -IndexedSourceMapConsumer.prototype.generatedPositionFor = - function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - - // Only consider this section if the requested source is in the list of - // sources of the consumer. - if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { - continue; - } - var generatedPosition = section.consumer.generatedPositionFor(aArgs); - if (generatedPosition) { - var ret = { - line: generatedPosition.line + - (section.generatedOffset.generatedLine - 1), - column: generatedPosition.column + - (section.generatedOffset.generatedLine === generatedPosition.line - ? section.generatedOffset.generatedColumn - 1 - : 0) - }; - return ret; - } - } - - return { - line: null, - column: null - }; - }; - -/** - * Parse the mappings in a string in to a data structure which we can easily - * query (the ordered arrays in the `this.__generatedMappings` and - * `this.__originalMappings` properties). - */ -IndexedSourceMapConsumer.prototype._parseMappings = - function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { - this.__generatedMappings = []; - this.__originalMappings = []; - for (var i = 0; i < this._sections.length; i++) { - var section = this._sections[i]; - var sectionMappings = section.consumer._generatedMappings; - for (var j = 0; j < sectionMappings.length; j++) { - var mapping = sectionMappings[j]; - - var source = section.consumer._sources.at(mapping.source); - source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); - this._sources.add(source); - source = this._sources.indexOf(source); - - var name = null; - if (mapping.name) { - name = section.consumer._names.at(mapping.name); - this._names.add(name); - name = this._names.indexOf(name); - } - - // The mappings coming from the consumer for the section have - // generated positions relative to the start of the section, so we - // need to offset them to be relative to the start of the concatenated - // generated file. - var adjustedMapping = { - source: source, - generatedLine: mapping.generatedLine + - (section.generatedOffset.generatedLine - 1), - generatedColumn: mapping.generatedColumn + - (section.generatedOffset.generatedLine === mapping.generatedLine - ? section.generatedOffset.generatedColumn - 1 - : 0), - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: name - }; - - this.__generatedMappings.push(adjustedMapping); - if (typeof adjustedMapping.originalLine === 'number') { - this.__originalMappings.push(adjustedMapping); - } - } - } - - quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); - quickSort(this.__originalMappings, util.compareByOriginalPositions); - }; - -exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; diff --git a/node_modules/source-map/lib/source-map-generator.js b/node_modules/source-map/lib/source-map-generator.js deleted file mode 100644 index 508bcfbb..00000000 --- a/node_modules/source-map/lib/source-map-generator.js +++ /dev/null @@ -1,425 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var base64VLQ = require('./base64-vlq'); -var util = require('./util'); -var ArraySet = require('./array-set').ArraySet; -var MappingList = require('./mapping-list').MappingList; - -/** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. You may pass an object with the following - * properties: - * - * - file: The filename of the generated source. - * - sourceRoot: A root for all relative URLs in this source map. - */ -function SourceMapGenerator(aArgs) { - if (!aArgs) { - aArgs = {}; - } - this._file = util.getArg(aArgs, 'file', null); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._skipValidation = util.getArg(aArgs, 'skipValidation', false); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = new MappingList(); - this._sourcesContents = null; -} - -SourceMapGenerator.prototype._version = 3; - -/** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ -SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source != null) { - newMapping.source = mapping.source; - if (sourceRoot != null) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name != null) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var sourceRelative = sourceFile; - if (sourceRoot !== null) { - sourceRelative = util.relative(sourceRoot, sourceFile); - } - - if (!generator._sources.has(sourceRelative)) { - generator._sources.add(sourceRelative); - } - - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - -/** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ -SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - if (!this._skipValidation) { - this._validateMapping(generated, original, source, name); - } - - if (source != null) { - source = String(source); - if (!this._sources.has(source)) { - this._sources.add(source); - } - } - - if (name != null) { - name = String(name); - if (!this._names.has(name)) { - this._names.add(name); - } - } - - this._mappings.add({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - -/** - * Set the source content for a source file. - */ -SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot != null) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent != null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = Object.create(null); - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else if (this._sourcesContents) { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - -/** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - * @param aSourceMapPath Optional. The dirname of the path to the source map - * to be applied. If relative, it is relative to the SourceMapConsumer. - * This parameter is needed when the two source maps aren't in the same - * directory, and the source map to be applied contains relative source - * paths. If so, those relative source paths need to be rewritten - * relative to the SourceMapGenerator. - */ -SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { - var sourceFile = aSourceFile; - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (aSourceFile == null) { - if (aSourceMapConsumer.file == null) { - throw new Error( - 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + - 'or the source map\'s "file" property. Both were omitted.' - ); - } - sourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "sourceFile" relative if an absolute Url is passed. - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "sourceFile" - this._mappings.unsortedForEach(function (mapping) { - if (mapping.source === sourceFile && mapping.originalLine != null) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source != null) { - // Copy mapping - mapping.source = original.source; - if (aSourceMapPath != null) { - mapping.source = util.join(aSourceMapPath, mapping.source) - } - if (sourceRoot != null) { - mapping.source = util.relative(sourceRoot, mapping.source); - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name != null) { - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source != null && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name != null && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aSourceMapPath != null) { - sourceFile = util.join(aSourceMapPath, sourceFile); - } - if (sourceRoot != null) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - -/** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ -SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - // When aOriginal is truthy but has empty values for .line and .column, - // it is most likely a programmer error. In this case we throw a very - // specific error message to try to guide them the right way. - // For example: https://github.com/Polymer/polymer-bundler/pull/519 - if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { - throw new Error( - 'original.line and original.column are not numbers -- you probably meant to omit ' + - 'the original mapping entirely and only map the generated position. If so, pass ' + - 'null for the original mapping instead of an object with empty or null values.' - ); - } - - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - original: aOriginal, - name: aName - })); - } - }; - -/** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ -SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var next; - var mapping; - var nameIdx; - var sourceIdx; - - var mappings = this._mappings.toArray(); - for (var i = 0, len = mappings.length; i < len; i++) { - mapping = mappings[i]; - next = '' - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - next += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { - continue; - } - next += ','; - } - } - - next += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source != null) { - sourceIdx = this._sources.indexOf(mapping.source); - next += base64VLQ.encode(sourceIdx - previousSource); - previousSource = sourceIdx; - - // lines are stored 0-based in SourceMap spec version 3 - next += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - next += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name != null) { - nameIdx = this._names.indexOf(mapping.name); - next += base64VLQ.encode(nameIdx - previousName); - previousName = nameIdx; - } - } - - result += next; - } - - return result; - }; - -SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot != null) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) - ? this._sourcesContents[key] - : null; - }, this); - }; - -/** - * Externalize the source map. - */ -SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._file != null) { - map.file = this._file; - } - if (this._sourceRoot != null) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - -/** - * Render the source map being generated to a string. - */ -SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this.toJSON()); - }; - -exports.SourceMapGenerator = SourceMapGenerator; diff --git a/node_modules/source-map/lib/source-node.js b/node_modules/source-map/lib/source-node.js deleted file mode 100644 index 8bcdbe38..00000000 --- a/node_modules/source-map/lib/source-node.js +++ /dev/null @@ -1,413 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; -var util = require('./util'); - -// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other -// operating systems these days (capturing the result). -var REGEX_NEWLINE = /(\r?\n)/; - -// Newline character code for charCodeAt() comparisons -var NEWLINE_CODE = 10; - -// Private symbol for identifying `SourceNode`s when multiple versions of -// the source-map library are loaded. This MUST NOT CHANGE across -// versions! -var isSourceNode = "$$$isSourceNode$$$"; - -/** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ -function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine == null ? null : aLine; - this.column = aColumn == null ? null : aColumn; - this.source = aSource == null ? null : aSource; - this.name = aName == null ? null : aName; - this[isSourceNode] = true; - if (aChunks != null) this.add(aChunks); -} - -/** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - * @param aRelativePath Optional. The path that relative sources in the - * SourceMapConsumer should be relative to. - */ -SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // All even indices of this array are one line of the generated code, - // while all odd indices are the newlines between two adjacent lines - // (since `REGEX_NEWLINE` captures its match). - // Processed fragments are accessed by calling `shiftNextLine`. - var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); - var remainingLinesIndex = 0; - var shiftNextLine = function() { - var lineContents = getNextLine(); - // The last line of a file might not have a newline. - var newLine = getNextLine() || ""; - return lineContents + newLine; - - function getNextLine() { - return remainingLinesIndex < remainingLines.length ? - remainingLines[remainingLinesIndex++] : undefined; - } - }; - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping !== null) { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - // Associate first line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - lastGeneratedLine++; - lastGeneratedColumn = 0; - // The remaining code is added without mapping - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[remainingLinesIndex] || ''; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - // No more remaining code, continue - lastMapping = mapping; - return; - } - } - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(shiftNextLine()); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[remainingLinesIndex] || ''; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - if (remainingLinesIndex < remainingLines.length) { - if (lastMapping) { - // Associate the remaining code in the current line with "lastMapping" - addMappingWithCode(lastMapping, shiftNextLine()); - } - // and add the remaining lines without any mapping - node.add(remainingLines.splice(remainingLinesIndex).join("")); - } - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content != null) { - if (aRelativePath != null) { - sourceFile = util.join(aRelativePath, sourceFile); - } - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - var source = aRelativePath - ? util.join(aRelativePath, mapping.source) - : mapping.source; - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - source, - code, - mapping.name)); - } - } - }; - -/** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ -SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk[isSourceNode] || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; -}; - -/** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk[isSourceNode]) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } -}; - -/** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ -SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; -}; - -/** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ -SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild[isSourceNode]) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; -}; - -/** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ -SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - -/** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ -SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i][isSourceNode]) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - -/** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ -SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; -}; - -/** - * Returns the string representation of this source node along with a source - * map. - */ -SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - for (var idx = 0, length = chunk.length; idx < length; idx++) { - if (chunk.charCodeAt(idx) === NEWLINE_CODE) { - generated.line++; - generated.column = 0; - // Mappings end at eol - if (idx + 1 === length) { - lastOriginalSource = null; - sourceMappingActive = false; - } else if (sourceMappingActive) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - } else { - generated.column++; - } - } - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; -}; - -exports.SourceNode = SourceNode; diff --git a/node_modules/source-map/lib/util.js b/node_modules/source-map/lib/util.js deleted file mode 100644 index 3ca92e56..00000000 --- a/node_modules/source-map/lib/util.js +++ /dev/null @@ -1,488 +0,0 @@ -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -/** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ -function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } -} -exports.getArg = getArg; - -var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; -var dataUrlRegexp = /^data:.+\,.+$/; - -function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[2], - host: match[3], - port: match[4], - path: match[5] - }; -} -exports.urlParse = urlParse; - -function urlGenerate(aParsedUrl) { - var url = ''; - if (aParsedUrl.scheme) { - url += aParsedUrl.scheme + ':'; - } - url += '//'; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + '@'; - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; -} -exports.urlGenerate = urlGenerate; - -/** - * Normalizes a path, or the path portion of a URL: - * - * - Replaces consecutive slashes with one slash. - * - Removes unnecessary '.' parts. - * - Removes unnecessary '<dir>/..' parts. - * - * Based on code in the Node.js 'path' core module. - * - * @param aPath The path or url to normalize. - */ -function normalize(aPath) { - var path = aPath; - var url = urlParse(aPath); - if (url) { - if (!url.path) { - return aPath; - } - path = url.path; - } - var isAbsolute = exports.isAbsolute(path); - - var parts = path.split(/\/+/); - for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { - part = parts[i]; - if (part === '.') { - parts.splice(i, 1); - } else if (part === '..') { - up++; - } else if (up > 0) { - if (part === '') { - // The first part is blank if the path is absolute. Trying to go - // above the root is a no-op. Therefore we can remove all '..' parts - // directly after the root. - parts.splice(i + 1, up); - up = 0; - } else { - parts.splice(i, 2); - up--; - } - } - } - path = parts.join('/'); - - if (path === '') { - path = isAbsolute ? '/' : '.'; - } - - if (url) { - url.path = path; - return urlGenerate(url); - } - return path; -} -exports.normalize = normalize; - -/** - * Joins two paths/URLs. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be joined with the root. - * - * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a - * scheme-relative URL: Then the scheme of aRoot, if any, is prepended - * first. - * - Otherwise aPath is a path. If aRoot is a URL, then its path portion - * is updated with the result and aRoot is returned. Otherwise the result - * is returned. - * - If aPath is absolute, the result is aPath. - * - Otherwise the two paths are joined with a slash. - * - Joining for example 'http://' and 'www.example.com' is also supported. - */ -function join(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - if (aPath === "") { - aPath = "."; - } - var aPathUrl = urlParse(aPath); - var aRootUrl = urlParse(aRoot); - if (aRootUrl) { - aRoot = aRootUrl.path || '/'; - } - - // `join(foo, '//www.example.org')` - if (aPathUrl && !aPathUrl.scheme) { - if (aRootUrl) { - aPathUrl.scheme = aRootUrl.scheme; - } - return urlGenerate(aPathUrl); - } - - if (aPathUrl || aPath.match(dataUrlRegexp)) { - return aPath; - } - - // `join('http://', 'www.example.com')` - if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { - aRootUrl.host = aPath; - return urlGenerate(aRootUrl); - } - - var joined = aPath.charAt(0) === '/' - ? aPath - : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); - - if (aRootUrl) { - aRootUrl.path = joined; - return urlGenerate(aRootUrl); - } - return joined; -} -exports.join = join; - -exports.isAbsolute = function (aPath) { - return aPath.charAt(0) === '/' || urlRegexp.test(aPath); -}; - -/** - * Make a path relative to a URL or another path. - * - * @param aRoot The root path or URL. - * @param aPath The path or URL to be made relative to aRoot. - */ -function relative(aRoot, aPath) { - if (aRoot === "") { - aRoot = "."; - } - - aRoot = aRoot.replace(/\/$/, ''); - - // It is possible for the path to be above the root. In this case, simply - // checking whether the root is a prefix of the path won't work. Instead, we - // need to remove components from the root one by one, until either we find - // a prefix that fits, or we run out of components to remove. - var level = 0; - while (aPath.indexOf(aRoot + '/') !== 0) { - var index = aRoot.lastIndexOf("/"); - if (index < 0) { - return aPath; - } - - // If the only part of the root that is left is the scheme (i.e. http://, - // file:///, etc.), one or more slashes (/), or simply nothing at all, we - // have exhausted all components, so the path is not relative to the root. - aRoot = aRoot.slice(0, index); - if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { - return aPath; - } - - ++level; - } - - // Make sure we add a "../" for each component we removed from the root. - return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); -} -exports.relative = relative; - -var supportsNullProto = (function () { - var obj = Object.create(null); - return !('__proto__' in obj); -}()); - -function identity (s) { - return s; -} - -/** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ -function toSetString(aStr) { - if (isProtoString(aStr)) { - return '$' + aStr; - } - - return aStr; -} -exports.toSetString = supportsNullProto ? identity : toSetString; - -function fromSetString(aStr) { - if (isProtoString(aStr)) { - return aStr.slice(1); - } - - return aStr; -} -exports.fromSetString = supportsNullProto ? identity : fromSetString; - -function isProtoString(s) { - if (!s) { - return false; - } - - var length = s.length; - - if (length < 9 /* "__proto__".length */) { - return false; - } - - if (s.charCodeAt(length - 1) !== 95 /* '_' */ || - s.charCodeAt(length - 2) !== 95 /* '_' */ || - s.charCodeAt(length - 3) !== 111 /* 'o' */ || - s.charCodeAt(length - 4) !== 116 /* 't' */ || - s.charCodeAt(length - 5) !== 111 /* 'o' */ || - s.charCodeAt(length - 6) !== 114 /* 'r' */ || - s.charCodeAt(length - 7) !== 112 /* 'p' */ || - s.charCodeAt(length - 8) !== 95 /* '_' */ || - s.charCodeAt(length - 9) !== 95 /* '_' */) { - return false; - } - - for (var i = length - 10; i >= 0; i--) { - if (s.charCodeAt(i) !== 36 /* '$' */) { - return false; - } - } - - return true; -} - -/** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ -function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0 || onlyCompareOriginal) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByOriginalPositions = compareByOriginalPositions; - -/** - * Comparator between two mappings with deflated source and name indices where - * the generated positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ -function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0 || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; - -function strcmp(aStr1, aStr2) { - if (aStr1 === aStr2) { - return 0; - } - - if (aStr1 === null) { - return 1; // aStr2 !== null - } - - if (aStr2 === null) { - return -1; // aStr1 !== null - } - - if (aStr1 > aStr2) { - return 1; - } - - return -1; -} - -/** - * Comparator between two mappings with inflated source and name strings where - * the generated positions are compared. - */ -function compareByGeneratedPositionsInflated(mappingA, mappingB) { - var cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp !== 0) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp !== 0) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp !== 0) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); -} -exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; - -/** - * Strip any JSON XSSI avoidance prefix from the string (as documented - * in the source maps specification), and then parse the string as - * JSON. - */ -function parseSourceMapInput(str) { - return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); -} -exports.parseSourceMapInput = parseSourceMapInput; - -/** - * Compute the URL of a source given the the source root, the source's - * URL, and the source map's URL. - */ -function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { - sourceURL = sourceURL || ''; - - if (sourceRoot) { - // This follows what Chrome does. - if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { - sourceRoot += '/'; - } - // The spec says: - // Line 4: An optional source root, useful for relocating source - // files on a server or removing repeated values in the - // “sources” entry. This value is prepended to the individual - // entries in the “source” field. - sourceURL = sourceRoot + sourceURL; - } - - // Historically, SourceMapConsumer did not take the sourceMapURL as - // a parameter. This mode is still somewhat supported, which is why - // this code block is conditional. However, it's preferable to pass - // the source map URL to SourceMapConsumer, so that this function - // can implement the source URL resolution algorithm as outlined in - // the spec. This block is basically the equivalent of: - // new URL(sourceURL, sourceMapURL).toString() - // ... except it avoids using URL, which wasn't available in the - // older releases of node still supported by this library. - // - // The spec says: - // If the sources are not absolute URLs after prepending of the - // “sourceRoot”, the sources are resolved relative to the - // SourceMap (like resolving script src in a html document). - if (sourceMapURL) { - var parsed = urlParse(sourceMapURL); - if (!parsed) { - throw new Error("sourceMapURL could not be parsed"); - } - if (parsed.path) { - // Strip the last path component, but keep the "/". - var index = parsed.path.lastIndexOf('/'); - if (index >= 0) { - parsed.path = parsed.path.substring(0, index + 1); - } - } - sourceURL = join(urlGenerate(parsed), sourceURL); - } - - return normalize(sourceURL); -} -exports.computeSourceURL = computeSourceURL; diff --git a/node_modules/source-map/package.json b/node_modules/source-map/package.json deleted file mode 100644 index 24663417..00000000 --- a/node_modules/source-map/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "source-map", - "description": "Generates and consumes source maps", - "version": "0.6.1", - "homepage": "https://github.com/mozilla/source-map", - "author": "Nick Fitzgerald <nfitzgerald@mozilla.com>", - "contributors": [ - "Tobias Koppers <tobias.koppers@googlemail.com>", - "Duncan Beevers <duncan@dweebd.com>", - "Stephen Crane <scrane@mozilla.com>", - "Ryan Seddon <seddon.ryan@gmail.com>", - "Miles Elam <miles.elam@deem.com>", - "Mihai Bazon <mihai.bazon@gmail.com>", - "Michael Ficarra <github.public.email@michael.ficarra.me>", - "Todd Wolfson <todd@twolfson.com>", - "Alexander Solovyov <alexander@solovyov.net>", - "Felix Gnass <fgnass@gmail.com>", - "Conrad Irwin <conrad.irwin@gmail.com>", - "usrbincc <usrbincc@yahoo.com>", - "David Glasser <glasser@davidglasser.net>", - "Chase Douglas <chase@newrelic.com>", - "Evan Wallace <evan.exe@gmail.com>", - "Heather Arthur <fayearthur@gmail.com>", - "Hugh Kennedy <hughskennedy@gmail.com>", - "David Glasser <glasser@davidglasser.net>", - "Simon Lydell <simon.lydell@gmail.com>", - "Jmeas Smith <jellyes2@gmail.com>", - "Michael Z Goddard <mzgoddard@gmail.com>", - "azu <azu@users.noreply.github.com>", - "John Gozde <john@gozde.ca>", - "Adam Kirkton <akirkton@truefitinnovation.com>", - "Chris Montgomery <christopher.montgomery@dowjones.com>", - "J. Ryan Stinnett <jryans@gmail.com>", - "Jack Herrington <jherrington@walmartlabs.com>", - "Chris Truter <jeffpalentine@gmail.com>", - "Daniel Espeset <daniel@danielespeset.com>", - "Jamie Wong <jamie.lf.wong@gmail.com>", - "Eddy Bruël <ejpbruel@mozilla.com>", - "Hawken Rives <hawkrives@gmail.com>", - "Gilad Peleg <giladp007@gmail.com>", - "djchie <djchie.dev@gmail.com>", - "Gary Ye <garysye@gmail.com>", - "Nicolas Lalevée <nicolas.lalevee@hibnet.org>" - ], - "repository": { - "type": "git", - "url": "http://github.com/mozilla/source-map.git" - }, - "main": "./source-map.js", - "files": [ - "source-map.js", - "source-map.d.ts", - "lib/", - "dist/source-map.debug.js", - "dist/source-map.js", - "dist/source-map.min.js", - "dist/source-map.min.js.map" - ], - "engines": { - "node": ">=0.10.0" - }, - "license": "BSD-3-Clause", - "scripts": { - "test": "npm run build && node test/run-tests.js", - "build": "webpack --color", - "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md" - }, - "devDependencies": { - "doctoc": "^0.15.0", - "webpack": "^1.12.0" - }, - "typings": "source-map" -} diff --git a/node_modules/source-map/source-map.d.ts b/node_modules/source-map/source-map.d.ts deleted file mode 100644 index 8f972b0c..00000000 --- a/node_modules/source-map/source-map.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -export interface StartOfSourceMap { - file?: string; - sourceRoot?: string; -} - -export interface RawSourceMap extends StartOfSourceMap { - version: string; - sources: string[]; - names: string[]; - sourcesContent?: string[]; - mappings: string; -} - -export interface Position { - line: number; - column: number; -} - -export interface LineRange extends Position { - lastColumn: number; -} - -export interface FindPosition extends Position { - // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND - bias?: number; -} - -export interface SourceFindPosition extends FindPosition { - source: string; -} - -export interface MappedPosition extends Position { - source: string; - name?: string; -} - -export interface MappingItem { - source: string; - generatedLine: number; - generatedColumn: number; - originalLine: number; - originalColumn: number; - name: string; -} - -export class SourceMapConsumer { - static GENERATED_ORDER: number; - static ORIGINAL_ORDER: number; - - static GREATEST_LOWER_BOUND: number; - static LEAST_UPPER_BOUND: number; - - constructor(rawSourceMap: RawSourceMap); - computeColumnSpans(): void; - originalPositionFor(generatedPosition: FindPosition): MappedPosition; - generatedPositionFor(originalPosition: SourceFindPosition): LineRange; - allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; - hasContentsOfAllSources(): boolean; - sourceContentFor(source: string, returnNullOnMissing?: boolean): string; - eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; -} - -export interface Mapping { - generated: Position; - original: Position; - source: string; - name?: string; -} - -export class SourceMapGenerator { - constructor(startOfSourceMap?: StartOfSourceMap); - static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; - addMapping(mapping: Mapping): void; - setSourceContent(sourceFile: string, sourceContent: string): void; - applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; - toString(): string; -} - -export interface CodeWithSourceMap { - code: string; - map: SourceMapGenerator; -} - -export class SourceNode { - constructor(); - constructor(line: number, column: number, source: string); - constructor(line: number, column: number, source: string, chunk?: string, name?: string); - static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; - add(chunk: string): void; - prepend(chunk: string): void; - setSourceContent(sourceFile: string, sourceContent: string): void; - walk(fn: (chunk: string, mapping: MappedPosition) => void): void; - walkSourceContents(fn: (file: string, content: string) => void): void; - join(sep: string): SourceNode; - replaceRight(pattern: string, replacement: string): SourceNode; - toString(): string; - toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; -} diff --git a/node_modules/source-map/source-map.js b/node_modules/source-map/source-map.js deleted file mode 100644 index bc88fe82..00000000 --- a/node_modules/source-map/source-map.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./lib/source-node').SourceNode; diff --git a/node_modules/sourcemap-codec/CHANGELOG.md b/node_modules/sourcemap-codec/CHANGELOG.md deleted file mode 100644 index e5ab34a3..00000000 --- a/node_modules/sourcemap-codec/CHANGELOG.md +++ /dev/null @@ -1,64 +0,0 @@ -# sourcemap-codec changelog - -## 1.4.8 - -* Performance boost ([#80](https://github.com/Rich-Harris/sourcemap-codec/pull/80)) - -## 1.4.7 - -* Include .map files in package ([#73](https://github.com/Rich-Harris/sourcemap-codec/issues/73)) - -## 1.4.6 - -* Use arrays instead of typed arrays ([#79](https://github.com/Rich-Harris/sourcemap-codec/pull/79)) - -## 1.4.5 - -* Handle overflow cases ([#78](https://github.com/Rich-Harris/sourcemap-codec/pull/78)) - -## 1.4.4 - -* Use Uint32Array, yikes ([#77](https://github.com/Rich-Harris/sourcemap-codec/pull/77)) - -## 1.4.3 - -* Use Uint16Array to prevent overflow ([#75](https://github.com/Rich-Harris/sourcemap-codec/pull/75)) - -## 1.4.2 - -* GO EVEN FASTER ([#74](https://github.com/Rich-Harris/sourcemap-codec/pull/74)) - -## 1.4.1 - -* GO FASTER ([#71](https://github.com/Rich-Harris/sourcemap-codec/pull/71)) - -## 1.4.0 - -* Add TypeScript declarations ([#70](https://github.com/Rich-Harris/sourcemap-codec/pull/70)) - -## 1.3.1 - -* Update build process, expose `pkg.module` - -## 1.3.0 - -* Update build process - -## 1.2.1 - -* Add dist files to npm package - -## 1.2.0 - -* Add ES6 build -* Update dependencies -* Add test coverage - -## 1.1.0 - -* Fix bug with lines containing single-character segments -* Add tests - -## 1.0.0 - -* First release diff --git a/node_modules/sourcemap-codec/README.md b/node_modules/sourcemap-codec/README.md deleted file mode 100644 index e4373aa9..00000000 --- a/node_modules/sourcemap-codec/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# sourcemap-codec - -Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). - - -## Why? - -Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap. - -This package makes the process slightly easier. - - -## Installation - -```bash -npm install sourcemap-codec -``` - - -## Usage - -```js -import { encode, decode } from 'sourcemap-codec'; - -var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); - -assert.deepEqual( decoded, [ - // the first line (of the generated code) has no mappings, - // as shown by the starting semi-colon (which separates lines) - [], - - // the second line contains four (comma-separated) segments - [ - // segments are encoded as you'd expect: - // [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ] - - // i.e. the first segment begins at column 2, and maps back to the second column - // of the second line (both zero-based) of the 0th source, and uses the 0th - // name in the `map.names` array - [ 2, 0, 2, 2, 0 ], - - // the remaining segments are 4-length rather than 5-length, - // because they don't map a name - [ 4, 0, 2, 4 ], - [ 6, 0, 2, 5 ], - [ 7, 0, 2, 7 ] - ], - - // the final line contains two segments - [ - [ 2, 1, 10, 19 ], - [ 12, 1, 11, 20 ] - ] -]); - -var encoded = encode( decoded ); -assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' ); -``` - - -# License - -MIT diff --git a/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js b/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js deleted file mode 100644 index f5e7d068..00000000 --- a/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js +++ /dev/null @@ -1,124 +0,0 @@ -var charToInteger = {}; -var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; -for (var i = 0; i < chars.length; i++) { - charToInteger[chars.charCodeAt(i)] = i; -} -function decode(mappings) { - var decoded = []; - var line = []; - var segment = [ - 0, - 0, - 0, - 0, - 0, - ]; - var j = 0; - for (var i = 0, shift = 0, value = 0; i < mappings.length; i++) { - var c = mappings.charCodeAt(i); - if (c === 44) { // "," - segmentify(line, segment, j); - j = 0; - } - else if (c === 59) { // ";" - segmentify(line, segment, j); - j = 0; - decoded.push(line); - line = []; - segment[0] = 0; - } - else { - var integer = charToInteger[c]; - if (integer === undefined) { - throw new Error('Invalid character (' + String.fromCharCode(c) + ')'); - } - var hasContinuationBit = integer & 32; - integer &= 31; - value += integer << shift; - if (hasContinuationBit) { - shift += 5; - } - else { - var shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = value === 0 ? -0x80000000 : -value; - } - segment[j] += value; - j++; - value = shift = 0; // reset - } - } - } - segmentify(line, segment, j); - decoded.push(line); - return decoded; -} -function segmentify(line, segment, j) { - // This looks ugly, but we're creating specialized arrays with a specific - // length. This is much faster than creating a new array (which v8 expands to - // a capacity of 17 after pushing the first item), or slicing out a subarray - // (which is slow). Length 4 is assumed to be the most frequent, followed by - // length 5 (since not everything will have an associated name), followed by - // length 1 (it's probably rare for a source substring to not have an - // associated segment data). - if (j === 4) - line.push([segment[0], segment[1], segment[2], segment[3]]); - else if (j === 5) - line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]); - else if (j === 1) - line.push([segment[0]]); -} -function encode(decoded) { - var sourceFileIndex = 0; // second field - var sourceCodeLine = 0; // third field - var sourceCodeColumn = 0; // fourth field - var nameIndex = 0; // fifth field - var mappings = ''; - for (var i = 0; i < decoded.length; i++) { - var line = decoded[i]; - if (i > 0) - mappings += ';'; - if (line.length === 0) - continue; - var generatedCodeColumn = 0; // first field - var lineMappings = []; - for (var _i = 0, line_1 = line; _i < line_1.length; _i++) { - var segment = line_1[_i]; - var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn); - generatedCodeColumn = segment[0]; - if (segment.length > 1) { - segmentMappings += - encodeInteger(segment[1] - sourceFileIndex) + - encodeInteger(segment[2] - sourceCodeLine) + - encodeInteger(segment[3] - sourceCodeColumn); - sourceFileIndex = segment[1]; - sourceCodeLine = segment[2]; - sourceCodeColumn = segment[3]; - } - if (segment.length === 5) { - segmentMappings += encodeInteger(segment[4] - nameIndex); - nameIndex = segment[4]; - } - lineMappings.push(segmentMappings); - } - mappings += lineMappings.join(','); - } - return mappings; -} -function encodeInteger(num) { - var result = ''; - num = num < 0 ? (-num << 1) | 1 : num << 1; - do { - var clamped = num & 31; - num >>>= 5; - if (num > 0) { - clamped |= 32; - } - result += chars[clamped]; - } while (num > 0); - return result; -} - -export { decode, encode }; -//# sourceMappingURL=sourcemap-codec.es.js.map diff --git a/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map b/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map deleted file mode 100644 index f2cab322..00000000 --- a/node_modules/sourcemap-codec/dist/sourcemap-codec.es.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.es.js","sources":["../src/sourcemap-codec.ts"],"sourcesContent":["export type SourceMapSegment =\n\t| [number]\n\t| [number, number, number, number]\n\t| [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nconst charToInteger: { [charCode: number]: number } = {};\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfor (let i = 0; i < chars.length; i++) {\n\tcharToInteger[chars.charCodeAt(i)] = i;\n}\n\nexport function decode(mappings: string): SourceMapMappings {\n\tconst decoded: SourceMapMappings = [];\n\tlet line: SourceMapLine = [];\n\tconst segment: SourceMapSegment = [\n\t\t0, // generated code column\n\t\t0, // source file index\n\t\t0, // source code line\n\t\t0, // source code column\n\t\t0, // name index\n\t];\n\n\tlet j = 0;\n\tfor (let i = 0, shift = 0, value = 0; i < mappings.length; i++) {\n\t\tconst c = mappings.charCodeAt(i);\n\n\t\tif (c === 44) { // \",\"\n\t\t\tsegmentify(line, segment, j);\n\t\t\tj = 0;\n\n\t\t} else if (c === 59) { // \";\"\n\t\t\tsegmentify(line, segment, j);\n\t\t\tj = 0;\n\t\t\tdecoded.push(line);\n\t\t\tline = [];\n\t\t\tsegment[0] = 0;\n\n\t\t} else {\n\t\t\tlet integer = charToInteger[c];\n\t\t\tif (integer === undefined) {\n\t\t\t\tthrow new Error('Invalid character (' + String.fromCharCode(c) + ')');\n\t\t\t}\n\n\t\t\tconst hasContinuationBit = integer & 32;\n\n\t\t\tinteger &= 31;\n\t\t\tvalue += integer << shift;\n\n\t\t\tif (hasContinuationBit) {\n\t\t\t\tshift += 5;\n\t\t\t} else {\n\t\t\t\tconst shouldNegate = value & 1;\n\t\t\t\tvalue >>>= 1;\n\n\t\t\t\tif (shouldNegate) {\n\t\t\t\t\tvalue = value === 0 ? -0x80000000 : -value;\n\t\t\t\t}\n\n\t\t\t\tsegment[j] += value;\n\t\t\t\tj++;\n\t\t\t\tvalue = shift = 0; // reset\n\t\t\t}\n\t\t}\n\t}\n\n\tsegmentify(line, segment, j);\n\tdecoded.push(line);\n\n\treturn decoded;\n}\n\nfunction segmentify(line: SourceMapSegment[], segment: SourceMapSegment, j: number) {\n\t// This looks ugly, but we're creating specialized arrays with a specific\n\t// length. This is much faster than creating a new array (which v8 expands to\n\t// a capacity of 17 after pushing the first item), or slicing out a subarray\n\t// (which is slow). Length 4 is assumed to be the most frequent, followed by\n\t// length 5 (since not everything will have an associated name), followed by\n\t// length 1 (it's probably rare for a source substring to not have an\n\t// associated segment data).\n\tif (j === 4) line.push([segment[0], segment[1], segment[2], segment[3]]);\n\telse if (j === 5) line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);\n\telse if (j === 1) line.push([segment[0]]);\n}\n\nexport function encode(decoded: SourceMapMappings): string {\n\tlet sourceFileIndex = 0; // second field\n\tlet sourceCodeLine = 0; // third field\n\tlet sourceCodeColumn = 0; // fourth field\n\tlet nameIndex = 0; // fifth field\n\tlet mappings = '';\n\n\tfor (let i = 0; i < decoded.length; i++) {\n\t\tconst line = decoded[i];\n\t\tif (i > 0) mappings += ';';\n\t\tif (line.length === 0) continue;\n\n\t\tlet generatedCodeColumn = 0; // first field\n\n\t\tconst lineMappings: string[] = [];\n\n\t\tfor (const segment of line) {\n\t\t\tlet segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);\n\t\t\tgeneratedCodeColumn = segment[0];\n\n\t\t\tif (segment.length > 1) {\n\t\t\t\tsegmentMappings +=\n\t\t\t\t\tencodeInteger(segment[1] - sourceFileIndex) +\n\t\t\t\t\tencodeInteger(segment[2] - sourceCodeLine) +\n\t\t\t\t\tencodeInteger(segment[3] - sourceCodeColumn);\n\n\t\t\t\tsourceFileIndex = segment[1];\n\t\t\t\tsourceCodeLine = segment[2];\n\t\t\t\tsourceCodeColumn = segment[3];\n\t\t\t}\n\n\t\t\tif (segment.length === 5) {\n\t\t\t\tsegmentMappings += encodeInteger(segment[4] - nameIndex);\n\t\t\t\tnameIndex = segment[4];\n\t\t\t}\n\n\t\t\tlineMappings.push(segmentMappings);\n\t\t}\n\n\t\tmappings += lineMappings.join(',');\n\t}\n\n\treturn mappings;\n}\n\nfunction encodeInteger(num: number): string {\n\tvar result = '';\n\tnum = num < 0 ? (-num << 1) | 1 : num << 1;\n\tdo {\n\t\tvar clamped = num & 31;\n\t\tnum >>>= 5;\n\t\tif (num > 0) {\n\t\t\tclamped |= 32;\n\t\t}\n\t\tresult += chars[clamped];\n\t} while (num > 0);\n\n\treturn result;\n}\n"],"names":[],"mappings":"AAOA,IAAM,aAAa,GAAmC,EAAE,CAAC;AACzD,IAAM,KAAK,GAAG,mEAAmE,C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AC9B;YAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACzB,eAAe,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;gBACzD,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;aACvB;YAED,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SACnC;QAED,QAAQ,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACnC;IAED,OAAO,QAAQ,CAAC;CAChB;AAED,SAAS,aAAa,CAAC,GAAW;IACjC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAC3C,GAAG;QACF,IAAI,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC;QACvB,GAAG,MAAM,CAAC,CAAC;QACX,IAAI,GAAG,GAAG,CAAC,EAAE;YACZ,OAAO,IAAI,EAAE,CAAC;SACd;QACD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;KACzB,QAAQ,GAAG,GAAG,CAAC,EAAE;IAElB,OAAO,MAAM,CAAC;CACd;;;;"} \ No newline at end of file diff --git a/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js b/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js deleted file mode 100644 index e305147d..00000000 --- a/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js +++ /dev/null @@ -1,135 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.sourcemapCodec = {})); -}(this, function (exports) { 'use strict'; - - var charToInteger = {}; - var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - for (var i = 0; i < chars.length; i++) { - charToInteger[chars.charCodeAt(i)] = i; - } - function decode(mappings) { - var decoded = []; - var line = []; - var segment = [ - 0, - 0, - 0, - 0, - 0, - ]; - var j = 0; - for (var i = 0, shift = 0, value = 0; i < mappings.length; i++) { - var c = mappings.charCodeAt(i); - if (c === 44) { // "," - segmentify(line, segment, j); - j = 0; - } - else if (c === 59) { // ";" - segmentify(line, segment, j); - j = 0; - decoded.push(line); - line = []; - segment[0] = 0; - } - else { - var integer = charToInteger[c]; - if (integer === undefined) { - throw new Error('Invalid character (' + String.fromCharCode(c) + ')'); - } - var hasContinuationBit = integer & 32; - integer &= 31; - value += integer << shift; - if (hasContinuationBit) { - shift += 5; - } - else { - var shouldNegate = value & 1; - value >>>= 1; - if (shouldNegate) { - value = value === 0 ? -0x80000000 : -value; - } - segment[j] += value; - j++; - value = shift = 0; // reset - } - } - } - segmentify(line, segment, j); - decoded.push(line); - return decoded; - } - function segmentify(line, segment, j) { - // This looks ugly, but we're creating specialized arrays with a specific - // length. This is much faster than creating a new array (which v8 expands to - // a capacity of 17 after pushing the first item), or slicing out a subarray - // (which is slow). Length 4 is assumed to be the most frequent, followed by - // length 5 (since not everything will have an associated name), followed by - // length 1 (it's probably rare for a source substring to not have an - // associated segment data). - if (j === 4) - line.push([segment[0], segment[1], segment[2], segment[3]]); - else if (j === 5) - line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]); - else if (j === 1) - line.push([segment[0]]); - } - function encode(decoded) { - var sourceFileIndex = 0; // second field - var sourceCodeLine = 0; // third field - var sourceCodeColumn = 0; // fourth field - var nameIndex = 0; // fifth field - var mappings = ''; - for (var i = 0; i < decoded.length; i++) { - var line = decoded[i]; - if (i > 0) - mappings += ';'; - if (line.length === 0) - continue; - var generatedCodeColumn = 0; // first field - var lineMappings = []; - for (var _i = 0, line_1 = line; _i < line_1.length; _i++) { - var segment = line_1[_i]; - var segmentMappings = encodeInteger(segment[0] - generatedCodeColumn); - generatedCodeColumn = segment[0]; - if (segment.length > 1) { - segmentMappings += - encodeInteger(segment[1] - sourceFileIndex) + - encodeInteger(segment[2] - sourceCodeLine) + - encodeInteger(segment[3] - sourceCodeColumn); - sourceFileIndex = segment[1]; - sourceCodeLine = segment[2]; - sourceCodeColumn = segment[3]; - } - if (segment.length === 5) { - segmentMappings += encodeInteger(segment[4] - nameIndex); - nameIndex = segment[4]; - } - lineMappings.push(segmentMappings); - } - mappings += lineMappings.join(','); - } - return mappings; - } - function encodeInteger(num) { - var result = ''; - num = num < 0 ? (-num << 1) | 1 : num << 1; - do { - var clamped = num & 31; - num >>>= 5; - if (num > 0) { - clamped |= 32; - } - result += chars[clamped]; - } while (num > 0); - return result; - } - - exports.decode = decode; - exports.encode = encode; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); -//# sourceMappingURL=sourcemap-codec.umd.js.map diff --git a/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map b/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map deleted file mode 100644 index 6ea33e0d..00000000 --- a/node_modules/sourcemap-codec/dist/sourcemap-codec.umd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sourcemap-codec.umd.js","sources":["../src/sourcemap-codec.ts"],"sourcesContent":["export type SourceMapSegment =\n\t| [number]\n\t| [number, number, number, number]\n\t| [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nconst charToInteger: { [charCode: number]: number } = {};\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfor (let i = 0; i < chars.length; i++) {\n\tcharToInteger[chars.charCodeAt(i)] = i;\n}\n\nexport function decode(mappings: string): SourceMapMappings {\n\tconst decoded: SourceMapMappings = [];\n\tlet line: SourceMapLine = [];\n\tconst segment: SourceMapSegment = [\n\t\t0, // generated code column\n\t\t0, // source file index\n\t\t0, // source code line\n\t\t0, // source code column\n\t\t0, // name index\n\t];\n\n\tlet j = 0;\n\tfor (let i = 0, shift = 0, value = 0; i < mappings.length; i++) {\n\t\tconst c = mappings.charCodeAt(i);\n\n\t\tif (c === 44) { // \",\"\n\t\t\tsegmentify(line, segment, j);\n\t\t\tj = 0;\n\n\t\t} else if (c === 59) { // \";\"\n\t\t\tsegmentify(line, segment, j);\n\t\t\tj = 0;\n\t\t\tdecoded.push(line);\n\t\t\tline = [];\n\t\t\tsegment[0] = 0;\n\n\t\t} else {\n\t\t\tlet integer = charToInteger[c];\n\t\t\tif (integer === undefined) {\n\t\t\t\tthrow new Error('Invalid character (' + String.fromCharCode(c) + ')');\n\t\t\t}\n\n\t\t\tconst hasContinuationBit = integer & 32;\n\n\t\t\tinteger &= 31;\n\t\t\tvalue += integer << shift;\n\n\t\t\tif (hasContinuationBit) {\n\t\t\t\tshift += 5;\n\t\t\t} else {\n\t\t\t\tconst shouldNegate = value & 1;\n\t\t\t\tvalue >>>= 1;\n\n\t\t\t\tif (shouldNegate) {\n\t\t\t\t\tvalue = value === 0 ? -0x80000000 : -value;\n\t\t\t\t}\n\n\t\t\t\tsegment[j] += value;\n\t\t\t\tj++;\n\t\t\t\tvalue = shift = 0; // reset\n\t\t\t}\n\t\t}\n\t}\n\n\tsegmentify(line, segment, j);\n\tdecoded.push(line);\n\n\treturn decoded;\n}\n\nfunction segmentify(line: SourceMapSegment[], segment: SourceMapSegment, j: number) {\n\t// This looks ugly, but we're creating specialized arrays with a specific\n\t// length. This is much faster than creating a new array (which v8 expands to\n\t// a capacity of 17 after pushing the first item), or slicing out a subarray\n\t// (which is slow). Length 4 is assumed to be the most frequent, followed by\n\t// length 5 (since not everything will have an associated name), followed by\n\t// length 1 (it's probably rare for a source substring to not have an\n\t// associated segment data).\n\tif (j === 4) line.push([segment[0], segment[1], segment[2], segment[3]]);\n\telse if (j === 5) line.push([segment[0], segment[1], segment[2], segment[3], segment[4]]);\n\telse if (j === 1) line.push([segment[0]]);\n}\n\nexport function encode(decoded: SourceMapMappings): string {\n\tlet sourceFileIndex = 0; // second field\n\tlet sourceCodeLine = 0; // third field\n\tlet sourceCodeColumn = 0; // fourth field\n\tlet nameIndex = 0; // fifth field\n\tlet mappings = '';\n\n\tfor (let i = 0; i < decoded.length; i++) {\n\t\tconst line = decoded[i];\n\t\tif (i > 0) mappings += ';';\n\t\tif (line.length === 0) continue;\n\n\t\tlet generatedCodeColumn = 0; // first field\n\n\t\tconst lineMappings: string[] = [];\n\n\t\tfor (const segment of line) {\n\t\t\tlet segmentMappings = encodeInteger(segment[0] - generatedCodeColumn);\n\t\t\tgeneratedCodeColumn = segment[0];\n\n\t\t\tif (segment.length > 1) {\n\t\t\t\tsegmentMappings +=\n\t\t\t\t\tencodeInteger(segment[1] - sourceFileIndex) +\n\t\t\t\t\tencodeInteger(segment[2] - sourceCodeLine) +\n\t\t\t\t\tencodeInteger(segment[3] - sourceCodeColumn);\n\n\t\t\t\tsourceFileIndex = segment[1];\n\t\t\t\tsourceCodeLine = segment[2];\n\t\t\t\tsourceCodeColumn = segment[3];\n\t\t\t}\n\n\t\t\tif (segment.length === 5) {\n\t\t\t\tsegmentMappings += encodeInteger(segment[4] - nameIndex);\n\t\t\t\tnameIndex = segment[4];\n\t\t\t}\n\n\t\t\tlineMappings.push(segmentMappings);\n\t\t}\n\n\t\tmappings += lineMappings.join(',');\n\t}\n\n\treturn mappings;\n}\n\nfunction encodeInteger(num: number): string {\n\tvar result = '';\n\tnum = num < 0 ? (-num << 1) | 1 : num << 1;\n\tdo {\n\t\tvar clamped = num & 31;\n\t\tnum >>>= 5;\n\t\tif (num > 0) {\n\t\t\tclamped |= 32;\n\t\t}\n\t\tresult += chars[clamped];\n\t} while (num > 0);\n\n\treturn result;\n}\n"],"names":[],"mappings":";;;;;;CAOA,IAAM,aAAa,GAAmC,EAAE,CAAC;CACzD,IAAM,KAAK,GAAG,mEAAmE,CAAC;CAElF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;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O,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;iBACzD,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;cACvB;aAED,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;UACnC;SAED,QAAQ,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;MACnC;KAED,OAAO,QAAQ,CAAC;CACjB,CAAC;CAED,SAAS,aAAa,CAAC,GAAW;KACjC,IAAI,MAAM,GAAG,EAAE,CAAC;KAChB,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;KAC3C,GAAG;SACF,IAAI,OAAO,GAAG,GAAG,GAAG,EAAE,CAAC;SACvB,GAAG,MAAM,CAAC,CAAC;SACX,IAAI,GAAG,GAAG,CAAC,EAAE;aACZ,OAAO,IAAI,EAAE,CAAC;UACd;SACD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;MACzB,QAAQ,GAAG,GAAG,CAAC,EAAE;KAElB,OAAO,MAAM,CAAC;CACf,CAAC;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/sourcemap-codec/package.json b/node_modules/sourcemap-codec/package.json deleted file mode 100644 index 4b2d2193..00000000 --- a/node_modules/sourcemap-codec/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "sourcemap-codec", - "version": "1.4.8", - "description": "Encode/decode sourcemap mappings", - "main": "dist/sourcemap-codec.umd.js", - "module": "dist/sourcemap-codec.es.js", - "types": "dist/types/sourcemap-codec.d.ts", - "scripts": { - "test": "mocha", - "build": "rm -rf dist && rollup -c && tsc", - "pretest": "npm run build", - "prepublish": "npm test", - "lint": "eslint src", - "pretest-coverage": "npm run build", - "test-coverage": "rm -rf coverage/* && istanbul cover --report json node_modules/.bin/_mocha -- -u exports -R spec test/test.js", - "posttest-coverage": "remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.json -b dist && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped.lcov -t lcovonly -b dist && remap-istanbul -i coverage/coverage-final.json -o coverage/coverage-remapped -t html -b dist", - "ci": "npm run test-coverage && codecov < coverage/coverage-remapped.lcov" - }, - "repository": { - "type": "git", - "url": "https://github.com/Rich-Harris/sourcemap-codec" - }, - "keywords": [ - "sourcemap", - "vlq" - ], - "author": "Rich Harris", - "license": "MIT", - "bugs": { - "url": "https://github.com/Rich-Harris/sourcemap-codec/issues" - }, - "homepage": "https://github.com/Rich-Harris/sourcemap-codec", - "dependencies": {}, - "devDependencies": { - "codecov.io": "^0.1.6", - "console-group": "^0.3.3", - "eslint": "^6.0.1", - "eslint-plugin-import": "^2.18.0", - "istanbul": "^0.4.5", - "mocha": "^6.1.4", - "remap-istanbul": "^0.13.0", - "rollup": "^1.16.4", - "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-typescript": "^1.0.1", - "typescript": "^3.5.2" - }, - "files": [ - "dist/*.js", - "dist/*.js.map", - "dist/**/*.d.ts", - "README.md" - ] -} diff --git a/node_modules/vite/LICENSE.md b/node_modules/vite/LICENSE.md index cdbe40a5..15f396ec 100644 --- a/node_modules/vite/LICENSE.md +++ b/node_modules/vite/LICENSE.md @@ -2186,6 +2186,35 @@ Repository: git+https://github.com/isaacs/isexe.git --------------------------------------- +## js-tokens +License: MIT +By: Simon Lydell +Repository: lydell/js-tokens + +> The MIT License (MIT) +> +> Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. + +--------------------------------------- + ## json-stable-stringify License: MIT By: James Halliday diff --git a/node_modules/vite/dist/node/chunks/dep-mc9zj7Ue.js b/node_modules/vite/dist/node/chunks/dep---u6OAyB.js similarity index 99% rename from node_modules/vite/dist/node/chunks/dep-mc9zj7Ue.js rename to node_modules/vite/dist/node/chunks/dep---u6OAyB.js index 002b9d2c..737ea1de 100644 --- a/node_modules/vite/dist/node/chunks/dep-mc9zj7Ue.js +++ b/node_modules/vite/dist/node/chunks/dep---u6OAyB.js @@ -1,4 +1,4 @@ -import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-R0I0XnyH.js'; +import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-9A4-l-43.js'; import require$$0__default from 'fs'; import require$$0 from 'postcss'; import require$$0$1 from 'path'; diff --git a/node_modules/vite/dist/node/chunks/dep-R0I0XnyH.js b/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js similarity index 99% rename from node_modules/vite/dist/node/chunks/dep-R0I0XnyH.js rename to node_modules/vite/dist/node/chunks/dep-9A4-l-43.js index 1e23ec23..990f7c79 100644 --- a/node_modules/vite/dist/node/chunks/dep-R0I0XnyH.js +++ b/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js @@ -12552,10 +12552,10 @@ function processSrcSetSync(srcs, replacer) { descriptor, }))); } -const cleanSrcSetRE = /(?:url|image|gradient|cross-fade)\([^)]*\)|"([^"]|(?<=\\)")*"|'([^']|(?<=\\)')*'/g; +const cleanSrcSetRE = /(?:url|image|gradient|cross-fade)\([^)]*\)|"([^"]|(?<=\\)")*"|'([^']|(?<=\\)')*'|data:\w+\/[\w.+\-]+;base64,[\w+/=]+/g; function splitSrcSet(srcs) { const parts = []; - // There could be a ',' inside of url(data:...), linear-gradient(...) or "data:..." + // There could be a ',' inside of url(data:...), linear-gradient(...), "data:..." or data:... const cleanedSrcs = srcs.replace(cleanSrcSetRE, blankReplacer); let startIndex = 0; let splitIndex; @@ -12742,8 +12742,8 @@ function arraify(target) { return Array.isArray(target) ? target : [target]; } // Taken from https://stackoverflow.com/a/36328890 -const multilineCommentsRE$1 = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g; -const singlelineCommentsRE$1 = /\/\/.*/g; +const multilineCommentsRE = /\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g; +const singlelineCommentsRE = /\/\/.*/g; const requestQuerySplitRE = /\?(?!.*[/|}])/; const requestQueryMaybeEscapedSplitRE = /\\?\?(?!.*[/|}])/; function parseRequest(id) { @@ -12776,7 +12776,7 @@ const requireResolveFromRootWithFallback = (root, id) => { return _require$2.resolve(id, { paths: [root, _dirname] }); }; function emptyCssComments(raw) { - return raw.replace(multilineCommentsRE$1, (s) => ' '.repeat(s.length)); + return raw.replace(multilineCommentsRE, (s) => ' '.repeat(s.length)); } function backwardCompatibleWorkerPlugins(plugins) { if (Array.isArray(plugins)) { @@ -27877,13 +27877,6 @@ function parseExpressionAt(input, pos, options) { return Parser$1.parseExpressionAt(input, pos, options) } -// Acorn is organized as a tokenizer and a recursive-descent parser. -// The `tokenizer` export provides an interface to the tokenizer. - -function tokenizer(input, options) { - return Parser$1.tokenizer(input, options) -} - const HASH_RE = /#/g; const AMPERSAND_RE = /&/g; const EQUAL_RE = /=/g; @@ -37617,112 +37610,468 @@ var src$1 = rc; var postcssrc = /*@__PURE__*/getDefaultExportFromCjs(src$1); -function _stripLiteralAcorn(code, options) { +// Copyright 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell +// License: MIT. +var Identifier, JSXIdentifier, JSXPunctuator, JSXString, JSXText, KeywordsWithExpressionAfter, KeywordsWithNoLineTerminatorAfter, LineTerminatorSequence, MultiLineComment, Newline, NumericLiteral, Punctuator, RegularExpressionLiteral, SingleLineComment, StringLiteral, Template, TokensNotPrecedingObjectLiteral, TokensPrecedingExpression, WhiteSpace; +RegularExpressionLiteral = /\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu; +Punctuator = /--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y; +Identifier = /(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu; +StringLiteral = /(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y; +NumericLiteral = /(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y; +Template = /[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y; +WhiteSpace = /[\t\v\f\ufeff\p{Zs}]+/yu; +LineTerminatorSequence = /\r?\n|[\r\u2028\u2029]/y; +MultiLineComment = /\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y; +SingleLineComment = /\/\/.*/y; +JSXPunctuator = /[<>.:={}]|\/(?![\/*])/y; +JSXIdentifier = /[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu; +JSXString = /(['"])(?:(?!\1)[^])*(\1)?/y; +JSXText = /[^<>{}]+/y; +TokensPrecedingExpression = /^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/; +TokensNotPrecedingObjectLiteral = /^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/; +KeywordsWithExpressionAfter = /^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/; +KeywordsWithNoLineTerminatorAfter = /^(?:return|throw|yield)$/; +Newline = RegExp(LineTerminatorSequence.source); +var jsTokens_1 = function*(input, {jsx = false} = {}) { + var braces, firstCodePoint, isExpression, lastIndex, lastSignificantToken, length, match, mode, nextLastIndex, nextLastSignificantToken, parenNesting, postfixIncDec, punctuator, stack; + ({length} = input); + lastIndex = 0; + lastSignificantToken = ""; + stack = [ + {tag: "JS"} + ]; + braces = []; + parenNesting = 0; + postfixIncDec = false; + while (lastIndex < length) { + mode = stack[stack.length - 1]; + switch (mode.tag) { + case "JS": + case "JSNonExpressionParen": + case "InterpolationInTemplate": + case "InterpolationInJSX": + if (input[lastIndex] === "/" && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) { + RegularExpressionLiteral.lastIndex = lastIndex; + if (match = RegularExpressionLiteral.exec(input)) { + lastIndex = RegularExpressionLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield ({ + type: "RegularExpressionLiteral", + value: match[0], + closed: match[1] !== void 0 && match[1] !== "\\" + }); + continue; + } + } + Punctuator.lastIndex = lastIndex; + if (match = Punctuator.exec(input)) { + punctuator = match[0]; + nextLastIndex = Punctuator.lastIndex; + nextLastSignificantToken = punctuator; + switch (punctuator) { + case "(": + if (lastSignificantToken === "?NonExpressionParenKeyword") { + stack.push({ + tag: "JSNonExpressionParen", + nesting: parenNesting + }); + } + parenNesting++; + postfixIncDec = false; + break; + case ")": + parenNesting--; + postfixIncDec = true; + if (mode.tag === "JSNonExpressionParen" && parenNesting === mode.nesting) { + stack.pop(); + nextLastSignificantToken = "?NonExpressionParenEnd"; + postfixIncDec = false; + } + break; + case "{": + Punctuator.lastIndex = 0; + isExpression = !TokensNotPrecedingObjectLiteral.test(lastSignificantToken) && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken)); + braces.push(isExpression); + postfixIncDec = false; + break; + case "}": + switch (mode.tag) { + case "InterpolationInTemplate": + if (braces.length === mode.nesting) { + Template.lastIndex = lastIndex; + match = Template.exec(input); + lastIndex = Template.lastIndex; + lastSignificantToken = match[0]; + if (match[1] === "${") { + lastSignificantToken = "?InterpolationInTemplate"; + postfixIncDec = false; + yield ({ + type: "TemplateMiddle", + value: match[0] + }); + } else { + stack.pop(); + postfixIncDec = true; + yield ({ + type: "TemplateTail", + value: match[0], + closed: match[1] === "`" + }); + } + continue; + } + break; + case "InterpolationInJSX": + if (braces.length === mode.nesting) { + stack.pop(); + lastIndex += 1; + lastSignificantToken = "}"; + yield ({ + type: "JSXPunctuator", + value: "}" + }); + continue; + } + } + postfixIncDec = braces.pop(); + nextLastSignificantToken = postfixIncDec ? "?ExpressionBraceEnd" : "}"; + break; + case "]": + postfixIncDec = true; + break; + case "++": + case "--": + nextLastSignificantToken = postfixIncDec ? "?PostfixIncDec" : "?UnaryIncDec"; + break; + case "<": + if (jsx && (TokensPrecedingExpression.test(lastSignificantToken) || KeywordsWithExpressionAfter.test(lastSignificantToken))) { + stack.push({tag: "JSXTag"}); + lastIndex += 1; + lastSignificantToken = "<"; + yield ({ + type: "JSXPunctuator", + value: punctuator + }); + continue; + } + postfixIncDec = false; + break; + default: + postfixIncDec = false; + } + lastIndex = nextLastIndex; + lastSignificantToken = nextLastSignificantToken; + yield ({ + type: "Punctuator", + value: punctuator + }); + continue; + } + Identifier.lastIndex = lastIndex; + if (match = Identifier.exec(input)) { + lastIndex = Identifier.lastIndex; + nextLastSignificantToken = match[0]; + switch (match[0]) { + case "for": + case "if": + case "while": + case "with": + if (lastSignificantToken !== "." && lastSignificantToken !== "?.") { + nextLastSignificantToken = "?NonExpressionParenKeyword"; + } + } + lastSignificantToken = nextLastSignificantToken; + postfixIncDec = !KeywordsWithExpressionAfter.test(match[0]); + yield ({ + type: match[1] === "#" ? "PrivateIdentifier" : "IdentifierName", + value: match[0] + }); + continue; + } + StringLiteral.lastIndex = lastIndex; + if (match = StringLiteral.exec(input)) { + lastIndex = StringLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield ({ + type: "StringLiteral", + value: match[0], + closed: match[2] !== void 0 + }); + continue; + } + NumericLiteral.lastIndex = lastIndex; + if (match = NumericLiteral.exec(input)) { + lastIndex = NumericLiteral.lastIndex; + lastSignificantToken = match[0]; + postfixIncDec = true; + yield ({ + type: "NumericLiteral", + value: match[0] + }); + continue; + } + Template.lastIndex = lastIndex; + if (match = Template.exec(input)) { + lastIndex = Template.lastIndex; + lastSignificantToken = match[0]; + if (match[1] === "${") { + lastSignificantToken = "?InterpolationInTemplate"; + stack.push({ + tag: "InterpolationInTemplate", + nesting: braces.length + }); + postfixIncDec = false; + yield ({ + type: "TemplateHead", + value: match[0] + }); + } else { + postfixIncDec = true; + yield ({ + type: "NoSubstitutionTemplate", + value: match[0], + closed: match[1] === "`" + }); + } + continue; + } + break; + case "JSXTag": + case "JSXTagEnd": + JSXPunctuator.lastIndex = lastIndex; + if (match = JSXPunctuator.exec(input)) { + lastIndex = JSXPunctuator.lastIndex; + nextLastSignificantToken = match[0]; + switch (match[0]) { + case "<": + stack.push({tag: "JSXTag"}); + break; + case ">": + stack.pop(); + if (lastSignificantToken === "/" || mode.tag === "JSXTagEnd") { + nextLastSignificantToken = "?JSX"; + postfixIncDec = true; + } else { + stack.push({tag: "JSXChildren"}); + } + break; + case "{": + stack.push({ + tag: "InterpolationInJSX", + nesting: braces.length + }); + nextLastSignificantToken = "?InterpolationInJSX"; + postfixIncDec = false; + break; + case "/": + if (lastSignificantToken === "<") { + stack.pop(); + if (stack[stack.length - 1].tag === "JSXChildren") { + stack.pop(); + } + stack.push({tag: "JSXTagEnd"}); + } + } + lastSignificantToken = nextLastSignificantToken; + yield ({ + type: "JSXPunctuator", + value: match[0] + }); + continue; + } + JSXIdentifier.lastIndex = lastIndex; + if (match = JSXIdentifier.exec(input)) { + lastIndex = JSXIdentifier.lastIndex; + lastSignificantToken = match[0]; + yield ({ + type: "JSXIdentifier", + value: match[0] + }); + continue; + } + JSXString.lastIndex = lastIndex; + if (match = JSXString.exec(input)) { + lastIndex = JSXString.lastIndex; + lastSignificantToken = match[0]; + yield ({ + type: "JSXString", + value: match[0], + closed: match[2] !== void 0 + }); + continue; + } + break; + case "JSXChildren": + JSXText.lastIndex = lastIndex; + if (match = JSXText.exec(input)) { + lastIndex = JSXText.lastIndex; + lastSignificantToken = match[0]; + yield ({ + type: "JSXText", + value: match[0] + }); + continue; + } + switch (input[lastIndex]) { + case "<": + stack.push({tag: "JSXTag"}); + lastIndex++; + lastSignificantToken = "<"; + yield ({ + type: "JSXPunctuator", + value: "<" + }); + continue; + case "{": + stack.push({ + tag: "InterpolationInJSX", + nesting: braces.length + }); + lastIndex++; + lastSignificantToken = "?InterpolationInJSX"; + postfixIncDec = false; + yield ({ + type: "JSXPunctuator", + value: "{" + }); + continue; + } + } + WhiteSpace.lastIndex = lastIndex; + if (match = WhiteSpace.exec(input)) { + lastIndex = WhiteSpace.lastIndex; + yield ({ + type: "WhiteSpace", + value: match[0] + }); + continue; + } + LineTerminatorSequence.lastIndex = lastIndex; + if (match = LineTerminatorSequence.exec(input)) { + lastIndex = LineTerminatorSequence.lastIndex; + postfixIncDec = false; + if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) { + lastSignificantToken = "?NoLineTerminatorHere"; + } + yield ({ + type: "LineTerminatorSequence", + value: match[0] + }); + continue; + } + MultiLineComment.lastIndex = lastIndex; + if (match = MultiLineComment.exec(input)) { + lastIndex = MultiLineComment.lastIndex; + if (Newline.test(match[0])) { + postfixIncDec = false; + if (KeywordsWithNoLineTerminatorAfter.test(lastSignificantToken)) { + lastSignificantToken = "?NoLineTerminatorHere"; + } + } + yield ({ + type: "MultiLineComment", + value: match[0], + closed: match[1] !== void 0 + }); + continue; + } + SingleLineComment.lastIndex = lastIndex; + if (match = SingleLineComment.exec(input)) { + lastIndex = SingleLineComment.lastIndex; + postfixIncDec = false; + yield ({ + type: "SingleLineComment", + value: match[0] + }); + continue; + } + firstCodePoint = String.fromCodePoint(input.codePointAt(lastIndex)); + lastIndex += firstCodePoint.length; + lastSignificantToken = firstCodePoint; + postfixIncDec = false; + yield ({ + type: mode.tag.startsWith("JSX") ? "JSXInvalid" : "Invalid", + value: firstCodePoint + }); + } + return void 0; +}; + +var jsTokens = /*@__PURE__*/getDefaultExportFromCjs(jsTokens_1); + +function stripLiteralJsTokens(code, options) { const FILL = options?.fillChar ?? " "; const FILL_COMMENT = " "; let result = ""; const filter = options?.filter ?? (() => true); - function fillupTo(index) { - if (index > result.length) - result += code.slice(result.length, index).replace(/[^\n]/g, FILL_COMMENT); - } const tokens = []; - const pasers = tokenizer(code, { - ecmaVersion: "latest", - sourceType: "module", - allowHashBang: true, - allowAwaitOutsideFunction: true, - allowImportExportEverywhere: true - }); - const iter = pasers[Symbol.iterator](); - let error; - try { - while (true) { - const { done, value: token } = iter.next(); - if (done) - break; - tokens.push(token); - fillupTo(token.start); - if (token.type.label === "string") { - const body = code.slice(token.start + 1, token.end - 1); - if (filter(body)) { - result += code[token.start] + FILL.repeat(token.end - token.start - 2) + code[token.end - 1]; - continue; - } - } else if (token.type.label === "template") { - const body = code.slice(token.start, token.end); - if (filter(body)) { - result += FILL.repeat(token.end - token.start); - continue; - } - } else if (token.type.label === "regexp") { - const body = code.slice(token.start, token.end); - if (filter(body)) { - result += body.replace(/\/(.*)\/(\w?)$/g, (_, $1, $2) => `/${FILL.repeat($1.length)}/${$2}`); - continue; - } - } - result += code.slice(token.start, token.end); + for (const token of jsTokens(code, { jsx: false })) { + tokens.push(token); + if (token.type === "SingleLineComment") { + result += FILL_COMMENT.repeat(token.value.length); + continue; } - fillupTo(code.length); - } catch (e) { - error = e; + if (token.type === "MultiLineComment") { + result += token.value.replace(/[^\n]/g, FILL_COMMENT); + continue; + } + if (token.type === "StringLiteral") { + const body = token.value.slice(1, -1); + if (filter(body)) { + result += token.value[0] + FILL.repeat(body.length) + token.value[token.value.length - 1]; + continue; + } + } + if (token.type === "NoSubstitutionTemplate") { + const body = token.value.slice(1, -1); + if (filter(body)) { + result += `\`${body.replace(/[^\n]/g, FILL)}\``; + continue; + } + } + if (token.type === "RegularExpressionLiteral") { + const body = token.value; + if (filter(body)) { + result += body.replace(/\/(.*)\/(\w?)$/g, (_, $1, $2) => `/${FILL.repeat($1.length)}/${$2}`); + continue; + } + } + if (token.type === "TemplateHead") { + const body = token.value.slice(1, -2); + if (filter(body)) { + result += `\`${body.replace(/[^\n]/g, FILL)}\${`; + continue; + } + } + if (token.type === "TemplateTail") { + const body = token.value.slice(0, -2); + if (filter(body)) { + result += `}${body.replace(/[^\n]/g, FILL)}\``; + continue; + } + } + if (token.type === "TemplateMiddle") { + const body = token.value.slice(1, -2); + if (filter(body)) { + result += `}${body.replace(/[^\n]/g, FILL)}\${`; + continue; + } + } + result += token.value; } return { - error, result, tokens }; } -const multilineCommentsRE = /\/\*([^*\/])*?\*\//gms; -const singlelineCommentsRE = /(?:^|\n|\r)\s*\/\/.*(?:\r|\n|$)/gm; -const templateLiteralRE$1 = /\$\{(\s*(?:|{.*}|(?!\$\{).|\n|\r)*?\s*)\}/g; -const quotesRE = [ - /(["'`])((?:\\\1|(?!\1)|.|\r)*?)\1/gm, - /([`])((?:\\\1|(?!\1)|.|\n|\r)*?)\1/gm - // multi-line strings (i.e. template literals only) -]; -function stripLiteralRegex(code, options) { - const FILL_COMMENT = " "; - const FILL = options?.fillChar ?? " "; - const filter = options?.filter ?? (() => true); - code = code.replace(multilineCommentsRE, (s) => filter(s) ? FILL_COMMENT.repeat(s.length) : s).replace(singlelineCommentsRE, (s) => filter(s) ? FILL_COMMENT.repeat(s.length) : s); - let expanded = code; - for (let i = 0; i < 16; i++) { - const before = expanded; - expanded = expanded.replace(templateLiteralRE$1, "` $1`"); - if (expanded === before) - break; - } - quotesRE.forEach((re) => { - expanded = expanded.replace(re, (s, quote, body, index) => { - if (!filter(s.slice(1, -1))) - return s; - code = code.slice(0, index + 1) + FILL.repeat(s.length - 2) + code.slice(index + s.length - 1); - return quote + FILL.repeat(s.length - 2) + quote; - }); - }); - return code; -} - function stripLiteral(code, options) { return stripLiteralDetailed(code, options).result; } function stripLiteralDetailed(code, options) { - const acorn = _stripLiteralAcorn(code, options); - if (!acorn.error) { - return { - mode: "acorn", - result: acorn.result, - acorn - }; - } - return { - mode: "regex", - result: stripLiteralRegex(acorn.result + code.slice(acorn.result.length), options), - acorn - }; + return stripLiteralJsTokens(code, options); } var main$1 = {exports: {}}; @@ -38529,13 +38878,12 @@ function buildHtmlPlugin(config) { // Determines true start position for the node, either the < character // position, or the newline at the end of the previous line's node. const nodeStartWithLeadingWhitespace = (node) => { - if (node.sourceCodeLocation.startOffset === 0) - return node.sourceCodeLocation.startOffset; + const startOffset = node.sourceCodeLocation.startOffset; + if (startOffset === 0) + return 0; // Gets the offset for the start of the line including the // newline trailing the previous node - const lineStartOffset = node.sourceCodeLocation.startOffset - - node.sourceCodeLocation.startCol; - const line = s.slice(Math.max(0, lineStartOffset), node.sourceCodeLocation.startOffset); + const lineStartOffset = startOffset - node.sourceCodeLocation.startCol; // <previous-line-node></previous-line-node> // <target-node></target-node> // @@ -38547,9 +38895,16 @@ function buildHtmlPlugin(config) { // // However, if there is content between our target node start and the // previous newline, we cannot strip it out without risking content deletion. - return line.trim() - ? node.sourceCodeLocation.startOffset - : lineStartOffset; + let isLineEmpty = false; + try { + const line = s.slice(Math.max(0, lineStartOffset), startOffset); + isLineEmpty = !line.trim(); + } + catch { + // magic-string may throw if there's some content removed in the sliced string, + // which we ignore and assume the line is not empty + } + return isLineEmpty ? lineStartOffset : startOffset; }; // pre-transform html = await applyHtmlTransforms(html, preHooks, { @@ -40078,8 +40433,8 @@ function createCachedImport(imp) { return cached; }; } -const importPostcssImport = createCachedImport(() => import('./dep-TyoTMUQy.js').then(function (n) { return n.i; })); -const importPostcssModules = createCachedImport(() => import('./dep-mc9zj7Ue.js').then(function (n) { return n.i; })); +const importPostcssImport = createCachedImport(() => import('./dep-FrUgnvs5.js').then(function (n) { return n.i; })); +const importPostcssModules = createCachedImport(() => import('./dep---u6OAyB.js').then(function (n) { return n.i; })); const importPostcss = createCachedImport(() => import('postcss')); /** * @experimental @@ -59111,7 +59466,7 @@ function isBareRelative(url) { return wordCharRE.test(url[0]) && !url.includes(':'); } const isSrcSet = (attr) => attr.name === 'srcset' && attr.prefix === undefined; -const processNodeUrl = (url, useSrcSetReplacer, config, htmlPath, originalUrl, server) => { +const processNodeUrl = (url, useSrcSetReplacer, config, htmlPath, originalUrl, server, isClassicScriptLink) => { // prefix with base (dev only, base is never relative) const replacer = (url) => { if (server?.moduleGraph) { @@ -59135,7 +59490,7 @@ const processNodeUrl = (url, useSrcSetReplacer, config, htmlPath, originalUrl, s htmlPath === '/index.html')) { url = path$o.posix.join(config.base, url); } - if (server && shouldPreTransform(url, config)) { + if (server && !isClassicScriptLink && shouldPreTransform(url, config)) { let preTransformUrl; if (url[0] === '/' && url[1] !== '/') { preTransformUrl = url; @@ -59213,7 +59568,7 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl if (node.nodeName === 'script') { const { src, sourceCodeLocation, isModule } = getScriptInfo(node); if (src) { - const processedUrl = processNodeUrl(src.value, isSrcSet(src), config, htmlPath, originalUrl, server); + const processedUrl = processNodeUrl(src.value, isSrcSet(src), config, htmlPath, originalUrl, server, !isModule); if (processedUrl !== src.value) { overwriteAttrValue(s, sourceCodeLocation, processedUrl); } @@ -60152,7 +60507,10 @@ async function _createServer(inlineConfig = {}, options) { _importGlobMap: new Map(), _forceOptimizeOnRestart: false, _pendingRequests: new Map(), - _fsDenyGlob: picomatch$4(config.server.fs.deny, { matchBase: true }), + _fsDenyGlob: picomatch$4(config.server.fs.deny, { + matchBase: true, + nocase: true, + }), _shortcutsOptions: undefined, }; if (!middlewareMode) { @@ -64244,8 +64602,8 @@ function esbuildScanPlugin(config, container, depImports, missing, entries) { function extractImportPaths(code) { // empty singleline & multiline comments to avoid matching comments code = code - .replace(multilineCommentsRE$1, '/* */') - .replace(singlelineCommentsRE$1, ''); + .replace(multilineCommentsRE, '/* */') + .replace(singlelineCommentsRE, ''); let js = ''; let m; importsRE.lastIndex = 0; @@ -66337,13 +66695,21 @@ function buildImportAnalysisPlugin(config) { const fileDepsCode = `[${fileDeps .map((fileDep) => fileDep.runtime ? fileDep.url : JSON.stringify(fileDep.url)) .join(',')}]`; - s.append(`\ + const mapDepsCode = `\ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = ${fileDepsCode} } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -}`); +}\n`; + // inject extra code before sourcemap comment + const mapFileCommentMatch = convertSourceMap.mapFileCommentRegex.exec(code); + if (mapFileCommentMatch) { + s.appendRight(mapFileCommentMatch.index, mapDepsCode); + } + else { + s.append(mapDepsCode); + } // there may still be markers due to inlined dynamic imports, remove // all the markers regardless let markerStartPos = indexOfMatchInSlice(code, preloadMarkerWithQuote); @@ -67679,9 +68045,9 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development', }; const resolvedWorkerPlugins = await resolvePlugins(workerResolved, workerPrePlugins, workerNormalPlugins, workerPostPlugins); // run configResolved hooks - createPluginHookUtils(resolvedWorkerPlugins) + await Promise.all(createPluginHookUtils(resolvedWorkerPlugins) .getSortedPluginHooks('configResolved') - .map((hook) => hook(workerResolved)); + .map((hook) => hook(workerResolved))); return resolvedWorkerPlugins; }; const resolvedWorkerOptions = { diff --git a/node_modules/vite/dist/node/chunks/dep-TyoTMUQy.js b/node_modules/vite/dist/node/chunks/dep-FrUgnvs5.js similarity index 99% rename from node_modules/vite/dist/node/chunks/dep-TyoTMUQy.js rename to node_modules/vite/dist/node/chunks/dep-FrUgnvs5.js index 7e554ba3..6c3ab683 100644 --- a/node_modules/vite/dist/node/chunks/dep-TyoTMUQy.js +++ b/node_modules/vite/dist/node/chunks/dep-FrUgnvs5.js @@ -1,4 +1,4 @@ -import { y as getDefaultExportFromCjs } from './dep-R0I0XnyH.js'; +import { y as getDefaultExportFromCjs } from './dep-9A4-l-43.js'; import require$$0 from 'path'; import require$$0__default from 'fs'; import { l as lib } from './dep-8a-6Quh6.js'; diff --git a/node_modules/vite/dist/node/cli.js b/node_modules/vite/dist/node/cli.js index edfb8ceb..af2494fe 100644 --- a/node_modules/vite/dist/node/cli.js +++ b/node_modules/vite/dist/node/cli.js @@ -2,7 +2,7 @@ import path from 'node:path'; import fs from 'node:fs'; import { performance } from 'node:perf_hooks'; import { EventEmitter } from 'events'; -import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-R0I0XnyH.js'; +import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-9A4-l-43.js'; import { VERSION } from './constants.js'; import 'node:fs/promises'; import 'node:url'; @@ -759,7 +759,7 @@ cli filterDuplicateOptions(options); // output structure is preserved even after bundling so require() // is ok here - const { createServer } = await import('./chunks/dep-R0I0XnyH.js').then(function (n) { return n.A; }); + const { createServer } = await import('./chunks/dep-9A4-l-43.js').then(function (n) { return n.A; }); try { const server = await createServer({ root, @@ -839,7 +839,7 @@ cli .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`) .action(async (root, options) => { filterDuplicateOptions(options); - const { build } = await import('./chunks/dep-R0I0XnyH.js').then(function (n) { return n.C; }); + const { build } = await import('./chunks/dep-9A4-l-43.js').then(function (n) { return n.C; }); const buildOptions = cleanOptions(options); try { await build({ @@ -867,7 +867,7 @@ cli .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`) .action(async (root, options) => { filterDuplicateOptions(options); - const { optimizeDeps } = await import('./chunks/dep-R0I0XnyH.js').then(function (n) { return n.B; }); + const { optimizeDeps } = await import('./chunks/dep-9A4-l-43.js').then(function (n) { return n.B; }); try { const config = await resolveConfig({ root, @@ -893,7 +893,7 @@ cli .option('--outDir <dir>', `[string] output directory (default: dist)`) .action(async (root, options) => { filterDuplicateOptions(options); - const { preview } = await import('./chunks/dep-R0I0XnyH.js').then(function (n) { return n.D; }); + const { preview } = await import('./chunks/dep-9A4-l-43.js').then(function (n) { return n.D; }); try { const server = await preview({ root, diff --git a/node_modules/vite/dist/node/index.js b/node_modules/vite/dist/node/index.js index 9c41fbce..0fd9cf66 100644 --- a/node_modules/vite/dist/node/index.js +++ b/node_modules/vite/dist/node/index.js @@ -1,6 +1,6 @@ export { parseAst, parseAstAsync } from 'rollup/parseAst'; -import { i as isInNodeModules } from './chunks/dep-R0I0XnyH.js'; -export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-R0I0XnyH.js'; +import { i as isInNodeModules } from './chunks/dep-9A4-l-43.js'; +export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-9A4-l-43.js'; export { VERSION as version } from './constants.js'; export { version as esbuildVersion } from 'esbuild'; export { VERSION as rollupVersion } from 'rollup'; diff --git a/node_modules/vite/package.json b/node_modules/vite/package.json index 1fc885a0..d41a4294 100644 --- a/node_modules/vite/package.json +++ b/node_modules/vite/package.json @@ -1,6 +1,6 @@ { "name": "vite", - "version": "5.0.10", + "version": "5.0.12", "type": "module", "license": "MIT", "author": "Evan You", @@ -121,7 +121,7 @@ "sirv": "^2.0.3", "source-map-support": "^0.5.21", "strip-ansi": "^7.1.0", - "strip-literal": "^1.3.0", + "strip-literal": "^2.0.0", "tsconfck": "^3.0.0", "tslib": "^2.6.2", "types": "link:./types", diff --git a/node_modules/vue/README.md b/node_modules/vue/README.md index a98bd997..2aca524e 100644 --- a/node_modules/vue/README.md +++ b/node_modules/vue/README.md @@ -33,18 +33,23 @@ #### Bundler Build Feature Flags -Starting with 3.0.0-rc.3, `esm-bundler` builds now exposes global feature flags that can be overwritten at compile time: +[Detailed Reference on vuejs.org](https://vuejs.org/api/compile-time-flags.html) -- `__VUE_OPTIONS_API__` (enable/disable Options API support, default: `true`) -- `__VUE_PROD_DEVTOOLS__` (enable/disable devtools support in production, default: `false`) +`esm-bundler` builds of Vue expose global feature flags that can be overwritten at compile time: -The build will work without configuring these flags, however it is **strongly recommended** to properly configure them in order to get proper tree-shaking in the final bundle. To configure these flags: +- `__VUE_OPTIONS_API__` + - Default: `true` + - Enable / disable Options API support -- webpack: use [DefinePlugin](https://webpack.js.org/plugins/define-plugin/) -- Rollup: use [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace) -- Vite: configured by default, but can be overwritten using the [`define` option](https://github.com/vitejs/vite/blob/a4133c073e640b17276b2de6e91a6857bdf382e1/src/node/config.ts#L72-L76) +- `__VUE_PROD_DEVTOOLS__` + - Default: `false` + - Enable / disable devtools support in production -Note: the replacement value **must be boolean literals** and cannot be strings, otherwise the bundler/minifier will not be able to properly evaluate the conditions. +- `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__` + - Default: `false` + - Enable / disable detailed warnings for hydration mismatches in production + +The build will work without configuring these flags, however it is **strongly recommended** to properly configure them in order to get proper tree-shaking in the final bundle. ### For Server-Side Rendering diff --git a/node_modules/vue/compiler-sfc/index.browser.js b/node_modules/vue/compiler-sfc/index.browser.js new file mode 100644 index 00000000..774f9da2 --- /dev/null +++ b/node_modules/vue/compiler-sfc/index.browser.js @@ -0,0 +1 @@ +module.exports = require('@vue/compiler-sfc') diff --git a/node_modules/vue/compiler-sfc/index.browser.mjs b/node_modules/vue/compiler-sfc/index.browser.mjs new file mode 100644 index 00000000..3c30abc8 --- /dev/null +++ b/node_modules/vue/compiler-sfc/index.browser.mjs @@ -0,0 +1 @@ +export * from '@vue/compiler-sfc' diff --git a/node_modules/vue/compiler-sfc/index.d.mts b/node_modules/vue/compiler-sfc/index.d.mts new file mode 100644 index 00000000..3c30abc8 --- /dev/null +++ b/node_modules/vue/compiler-sfc/index.d.mts @@ -0,0 +1 @@ +export * from '@vue/compiler-sfc' diff --git a/node_modules/vue/compiler-sfc/index.js b/node_modules/vue/compiler-sfc/index.js index 774f9da2..2b85ad12 100644 --- a/node_modules/vue/compiler-sfc/index.js +++ b/node_modules/vue/compiler-sfc/index.js @@ -1 +1,3 @@ module.exports = require('@vue/compiler-sfc') + +require('./register-ts.js') diff --git a/node_modules/vue/compiler-sfc/index.mjs b/node_modules/vue/compiler-sfc/index.mjs index 8df9a989..ae5d6e8e 100644 --- a/node_modules/vue/compiler-sfc/index.mjs +++ b/node_modules/vue/compiler-sfc/index.mjs @@ -1 +1,3 @@ -export * from '@vue/compiler-sfc' \ No newline at end of file +export * from '@vue/compiler-sfc' + +import './register-ts.js' diff --git a/node_modules/vue/compiler-sfc/package.json b/node_modules/vue/compiler-sfc/package.json index 1b15fb84..4cf44a46 100644 --- a/node_modules/vue/compiler-sfc/package.json +++ b/node_modules/vue/compiler-sfc/package.json @@ -1,5 +1,4 @@ { "main": "index.js", - "module": "index.mjs", - "types": "index.d.ts" -} \ No newline at end of file + "module": "index.mjs" +} diff --git a/node_modules/vue/compiler-sfc/register-ts.js b/node_modules/vue/compiler-sfc/register-ts.js new file mode 100644 index 00000000..36de2a35 --- /dev/null +++ b/node_modules/vue/compiler-sfc/register-ts.js @@ -0,0 +1,3 @@ +if (typeof require !== 'undefined') { + require('@vue/compiler-sfc').registerTS(() => require('typescript')) +} diff --git a/node_modules/vue/dist/vue.cjs.js b/node_modules/vue/dist/vue.cjs.js index 64464cf4..0fd1266a 100644 --- a/node_modules/vue/dist/vue.cjs.js +++ b/node_modules/vue/dist/vue.cjs.js @@ -1,3 +1,8 @@ +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -6,72 +11,79 @@ var compilerDom = require('@vue/compiler-dom'); var runtimeDom = require('@vue/runtime-dom'); var shared = require('@vue/shared'); -function _interopNamespace(e) { - if (e && e.__esModule) return e; +function _interopNamespaceDefault(e) { var n = Object.create(null); if (e) { - Object.keys(e).forEach(function (k) { + for (var k in e) { n[k] = e[k]; - }); + } } - n['default'] = e; + n.default = e; return Object.freeze(n); } -var runtimeDom__namespace = /*#__PURE__*/_interopNamespace(runtimeDom); +var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom); -// This entry is the "full-build" that includes both the runtime -const compileCache = Object.create(null); +const compileCache = /* @__PURE__ */ new WeakMap(); +function getCache(options) { + let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ); + if (!c) { + c = /* @__PURE__ */ Object.create(null); + compileCache.set(options != null ? options : shared.EMPTY_OBJ, c); + } + return c; +} function compileToFunction(template, options) { - if (!shared.isString(template)) { - if (template.nodeType) { - template = template.innerHTML; - } - else { - runtimeDom.warn(`invalid template option: `, template); - return shared.NOOP; - } + if (!shared.isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + runtimeDom.warn(`invalid template option: `, template); + return shared.NOOP; } - const key = template; - const cached = compileCache[key]; - if (cached) { - return cached; + } + const key = template; + const cache = getCache(options); + const cached = cache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + if (!el) { + runtimeDom.warn(`Template element not found or is empty: ${template}`); } - if (template[0] === '#') { - const el = document.querySelector(template); - if (!el) { - runtimeDom.warn(`Template element not found or is empty: ${template}`); - } - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's rendered - // by the server, the template should not contain any user data. - template = el ? el.innerHTML : ``; - } - const { code } = compilerDom.compile(template, shared.extend({ - hoistStatic: true, - onError: onError , - onWarn: e => onError(e, true) - }, options)); - function onError(err, asWarning = false) { - const message = asWarning - ? err.message - : `Template compilation error: ${err.message}`; - const codeFrame = err.loc && - shared.generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset); - runtimeDom.warn(codeFrame ? `${message}\n${codeFrame}` : message); - } - // The wildcard import results in a huge object with every export - // with keys that cannot be mangled, and can be quite heavy size-wise. - // In the global build we know `Vue` is available globally so we can avoid - // the wildcard object. - const render = (new Function('Vue', code)(runtimeDom__namespace)); - render._rc = true; - return (compileCache[key] = render); + template = el ? el.innerHTML : ``; + } + const opts = shared.extend( + { + hoistStatic: true, + onError: onError , + onWarn: (e) => onError(e, true) + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compilerDom.compile(template, opts); + function onError(err, asWarning = false) { + const message = asWarning ? err.message : `Template compilation error: ${err.message}`; + const codeFrame = err.loc && shared.generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + runtimeDom.warn(codeFrame ? `${message} +${codeFrame}` : message); + } + const render = new Function("Vue", code)(runtimeDom__namespace); + render._rc = true; + return cache[key] = render; } runtimeDom.registerRuntimeCompiler(compileToFunction); -Object.keys(runtimeDom).forEach(function (k) { - if (k !== 'default') exports[k] = runtimeDom[k]; -}); exports.compile = compileToFunction; +Object.keys(runtimeDom).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k]; +}); diff --git a/node_modules/vue/dist/vue.cjs.prod.js b/node_modules/vue/dist/vue.cjs.prod.js index ffcbcded..f59a77c8 100644 --- a/node_modules/vue/dist/vue.cjs.prod.js +++ b/node_modules/vue/dist/vue.cjs.prod.js @@ -1,3 +1,8 @@ +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); @@ -6,60 +11,65 @@ var compilerDom = require('@vue/compiler-dom'); var runtimeDom = require('@vue/runtime-dom'); var shared = require('@vue/shared'); -function _interopNamespace(e) { - if (e && e.__esModule) return e; +function _interopNamespaceDefault(e) { var n = Object.create(null); if (e) { - Object.keys(e).forEach(function (k) { + for (var k in e) { n[k] = e[k]; - }); + } } - n['default'] = e; + n.default = e; return Object.freeze(n); } -var runtimeDom__namespace = /*#__PURE__*/_interopNamespace(runtimeDom); +var runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom); -// This entry is the "full-build" that includes both the runtime -const compileCache = Object.create(null); +const compileCache = /* @__PURE__ */ new WeakMap(); +function getCache(options) { + let c = compileCache.get(options != null ? options : shared.EMPTY_OBJ); + if (!c) { + c = /* @__PURE__ */ Object.create(null); + compileCache.set(options != null ? options : shared.EMPTY_OBJ, c); + } + return c; +} function compileToFunction(template, options) { - if (!shared.isString(template)) { - if (template.nodeType) { - template = template.innerHTML; - } - else { - return shared.NOOP; - } + if (!shared.isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + return shared.NOOP; } - const key = template; - const cached = compileCache[key]; - if (cached) { - return cached; - } - if (template[0] === '#') { - const el = document.querySelector(template); - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's rendered - // by the server, the template should not contain any user data. - template = el ? el.innerHTML : ``; - } - const { code } = compilerDom.compile(template, shared.extend({ - hoistStatic: true, - onError: undefined, - onWarn: shared.NOOP - }, options)); - // The wildcard import results in a huge object with every export - // with keys that cannot be mangled, and can be quite heavy size-wise. - // In the global build we know `Vue` is available globally so we can avoid - // the wildcard object. - const render = (new Function('Vue', code)(runtimeDom__namespace)); - render._rc = true; - return (compileCache[key] = render); + } + const key = template; + const cache = getCache(options); + const cached = cache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + template = el ? el.innerHTML : ``; + } + const opts = shared.extend( + { + hoistStatic: true, + onError: void 0, + onWarn: shared.NOOP + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compilerDom.compile(template, opts); + const render = new Function("Vue", code)(runtimeDom__namespace); + render._rc = true; + return cache[key] = render; } runtimeDom.registerRuntimeCompiler(compileToFunction); -Object.keys(runtimeDom).forEach(function (k) { - if (k !== 'default') exports[k] = runtimeDom[k]; -}); exports.compile = compileToFunction; +Object.keys(runtimeDom).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k]; +}); diff --git a/node_modules/vue/dist/vue.d.mts b/node_modules/vue/dist/vue.d.mts new file mode 100644 index 00000000..991d0a36 --- /dev/null +++ b/node_modules/vue/dist/vue.d.mts @@ -0,0 +1,7 @@ +import { CompilerOptions } from '@vue/compiler-dom'; +import { RenderFunction } from '@vue/runtime-dom'; +export * from '@vue/runtime-dom'; + +export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction; + +export { compileToFunction as compile }; diff --git a/node_modules/vue/dist/vue.d.ts b/node_modules/vue/dist/vue.d.ts index 2f596b6b..991d0a36 100644 --- a/node_modules/vue/dist/vue.d.ts +++ b/node_modules/vue/dist/vue.d.ts @@ -1,9 +1,7 @@ import { CompilerOptions } from '@vue/compiler-dom'; import { RenderFunction } from '@vue/runtime-dom'; +export * from '@vue/runtime-dom'; -export declare function compile(template: string | HTMLElement, options?: CompilerOptions): RenderFunction; +export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction; - -export * from "@vue/runtime-dom"; - -export { } +export { compileToFunction as compile }; diff --git a/node_modules/vue/dist/vue.esm-browser.js b/node_modules/vue/dist/vue.esm-browser.js index 88b305b0..a02c7bca 100644 --- a/node_modules/vue/dist/vue.esm-browser.js +++ b/node_modules/vue/dist/vue.esm-browser.js @@ -1,11155 +1,11299 @@ /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } -/** - * dev only flag -> name mapping - */ -const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` -}; - -/** - * Dev only - */ -const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' -}; - -const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; -const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - -const range = 2; -function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join('\n'); -} - -/** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); -/** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ -function includeBooleanAttr(value) { - return !!value || value === ''; -} - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -// These tag configs are shared between compiler-dom and runtime-dom, so they -// https://developer.mozilla.org/en-US/docs/Web/HTML/Element -const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; -// https://developer.mozilla.org/en-US/docs/Web/SVG/Element -const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; -const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS); - -function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); -} - -/** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ -const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); -}; -const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; - -const EMPTY_OBJ = Object.freeze({}) - ; +const EMPTY_OBJ = Object.freeze({}) ; const EMPTY_ARR = Object.freeze([]) ; -const NOOP = () => { }; -/** - * Always return false. - */ +const NOOP = () => { +}; const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const isModelListener = (key) => key.startsWith('onUpdate:'); +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === '[object Map]'; -const isSet = (val) => toTypeString(val) === '[object Set]'; -const isDate = (val) => toTypeString(val) === '[object Date]'; -const isFunction = (val) => typeof val === 'function'; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; -const isPlainObject = (val) => toTypeString(val) === '[object Object]'; -const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; -const isReservedProp = /*#__PURE__*/ makeMap( -// the leading comma is intentional so empty string "" is also included -',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); -const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; -/** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -/** - * @private - */ -const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); -// compare whether a value has changed, accounting for NaN. +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; -function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); +const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` +}; + +const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" +}; + +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + +const range = 2; +function generateCodeFrame(source, start = 0, end = source.length) { + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); +} + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); +const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; +}; + +function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } -const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -const wasTracked = (dep) => (dep.w & trackOpBit) > 0; -const newTracked = (dep) => (dep.n & trackOpBit) > 0; -const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } -}; -const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } -}; - -const targetMap = new WeakMap(); -// The number of effects currently being tracked recursively. -let effectTrackDepth = 0; -let trackOpBit = 1; -/** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ -const maxMarkerBits = 30; let activeEffect; -const ITERATE_KEY = Symbol('iterate' ); -const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } -function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; +function triggerComputed(computed) { + return computed.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; +let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } +function pauseScheduling() { + pauseScheduleStack++; } -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } +} +const queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } -function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } -} -function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } +function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } -const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); +const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; +}; + +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol("iterate" ); +const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( -/*#__PURE__*/ -Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); -const get = /*#__PURE__*/ createGetter(); -const shallowGet = /*#__PURE__*/ createGetter(false, true); -const readonlyGet = /*#__PURE__*/ createGetter(true); -const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); -const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; -} -const set = /*#__PURE__*/ createSetter(); -const shallowSet = /*#__PURE__*/ createSetter(true); -function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } -function deleteProperty(target, key) { +function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; -} -function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; -} -function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } -const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys -}; -const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } -}; -const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet -}); -// Props handlers are special in the sense that it should not unwrap top-level -// refs (in order to allow refs to be explicitly passed down), but should -// retain the reactivity of the normal readonly object. -const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet -}); + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true +); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); -function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); +function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } -function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); +function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } -function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } -const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } -const reactiveMap = new WeakMap(); -const shallowReactiveMap = new WeakMap(); -const readonlyMap = new WeakMap(); -const shallowReadonlyMap = new WeakMap(); +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } -/** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } -/** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } -/** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } -function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; -function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } +class ComputedRefImpl { + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); + } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } -function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; +} + +function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } +} +function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } } function isRef(r) { - return !!(r && r.__v_isRef === true); + return !!(r && r.__v_isRef === true); } function ref(value) { - return createRef(value, false); + return createRef(value, false); } function shallowRef(value) { - return createRef(value, true); + return createRef(value, true); } function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); } class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); } + } } -function triggerRef(ref) { - triggerRefValue(ref, ref.value ); +function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); } -function unref(ref) { - return isRef(ref) ? ref.value : ref; +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); } const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); } + } }; function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); } class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } } function customRef(factory) { - return new CustomRefImpl(factory); + return new CustomRefImpl(factory); } function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; } class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } } -function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); } -class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; - } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); - } -} -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; -} +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; -const stack = []; +const stack$1 = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack$1.push(vnode); } function popWarningContext() { - stack.pop(); + stack$1.pop(); } function warn$1(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); + pauseTracking(); + const instance = stack$1.length ? stack$1[stack$1.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack$1[stack$1.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } -/* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } -/* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } -/* istanbul ignore next */ function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } } -const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; -const pendingPreFlushCbs = []; -let activePreFlushCbs = null; -let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; -const resolvedPromise = /*#__PURE__*/ Promise.resolve(); +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; -let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } -// #2768 -// Use binary-search to find a suitable position in the queue, -// so that the queue maintains the increasing order of job's id, -// which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } -} -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} -function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } -function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); -} -function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - { - seen = seen || new Map(); - } - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) { - continue; - } - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; +const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; +}; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - { - seen = seen || new Map(); - } - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = (job) => checkRecursiveUpdates(seen, job) - ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (true && check(job)) { - continue; - } - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; } + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); } + } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } - else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`); - return true; - } - else { - seen.set(fn, count + 1); - } + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); } + } } -/* eslint-disable no-restricted-globals */ let isHmrUpdating = false; -const hmrDirtyComponents = new Set(); -// Expose the HMR runtime on the global object -// This makes it entirely tree-shakable without polluting the exports and makes -// it easier to be used in toolings like vue-loader -// Note: for a component to be eligible for HMR it also needs the __hmrId option -// to be set so that its instances can be registered / removed. +const hmrDirtyComponents = /* @__PURE__ */ new Set(); { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; } -const map = new Map(); +const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); } function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); + map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: new Set() - }); - return true; + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; } function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; + return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; } - // update initial record (for not-yet-rendered component) - record.initialDef.render = newRender; - [...record.instances].forEach(instance => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - // this flag forces child components with slot content to update - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); } function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - // update initial def (for not-yet-rendered components) - updateComponentDef(record.initialDef, newComp); - // create a snapshot which avoids the set being mutated during updates - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - // 1. Update existing comp definition to match new one - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - // 2. mark definition dirty. This forces the renderer to replace the - // component on patch. - hmrDirtyComponents.add(oldComp); - } - // 3. invalidate options resolution cache - instance.appContext.optionsCache.delete(instance.type); - // 4. actually update - if (instance.ceReload) { - // custom element - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } - else if (instance.parent) { - // 4. Force the parent instance to re-render. This will cause all updated - // components to be unmounted and re-mounted. Queue the update so that we - // don't end up forcing the same parent to re-render multiple times. - queueJob(instance.parent.update); - // instance is the inner component of an async custom element - // invoke to reset styles - if (instance.parent.type.__asyncLoader && - instance.parent.ceReload) { - instance.parent.ceReload(newComp.styles); - } - } - else if (instance.appContext.reload) { - // root instance mounted via createApp() has a reload method - instance.appContext.reload(); - } - else if (typeof window !== 'undefined') { - // root instance inside tree created via raw render(). Force reload. - window.location.reload(); - } - else { - console.warn('[HMR] Root or manually mounted instance modified. Full reload required.'); - } + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); } - // 5. make sure to cleanup dirty hmr components after update - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); - } - }); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); } function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== '__file' && !(key in newComp)) { - delete oldComp[key]; - } + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; } + } } function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } - catch (e) { - console.error(e); - console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` + - `Full reload required.`); - } - }; + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; } -let devtools; +let devtools$1; let buffer = []; let devtoolsNotInstalled = false; -function emit(event, ...args) { - if (devtools) { - devtools.emit(event, ...args); - } - else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } } -function setDevtoolsHook(hook, target) { - var _a, _b; - devtools = hook; - if (devtools) { - devtools.enabled = true; - buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); - buffer = []; - } - else if ( +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( // handle late devtools injection - only do this if we are in an actual // browser environment to avoid the timer handle stalling test runner exit // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3000); - } - else { - // non-browser env, assume not installed + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; - } + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } } function devtoolsInitApp(app, version) { - emit("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); } function devtoolsUnmountApp(app) { - emit("app:unmount" /* APP_UNMOUNT */, app); + emit$1("app:unmount" /* APP_UNMOUNT */, app); } -const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = -/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const devtoolsComponentRemoved = -/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */); +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ +); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; function createDevtoolsComponentHook(hook) { - return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component); - }; + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; } -const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ +); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ +); function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); - }; + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params); + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); } -function emit$1(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { emitsOptions, propsOptions: [propsOptions] } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && - !(false )) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1(`Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "${toHandlerKey(event)}" prop.`); - } - } - else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1(`Invalid event arguments: event validation failed for event "${event}".`); - } - } - } +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); } - } - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(toNumber); + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } } + } } - { - devtoolsComponentEmit(instance, event, args); + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1(`Event "${lowerCaseEvent}" is emitted in component ` + - `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` + - `Note that HTML attributes are case-insensitive and you cannot use ` + - `v-on to listen to camelCase events when using in-DOM templates. ` + - `You should probably use "${hyphenate(event)}" instead of "${event}".`); - } + if (number) { + args = rawArgs.map(looseToNumber); } - let handlerName; - let handler = props[(handlerName = toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = toHandlerKey(camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = toHandlerKey(hyphenate(event)))]; + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } -// Check if an incoming prop key is a declared emit event listener. -// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are -// both considered matched listeners. function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - hasOwn(options, hyphenate(key)) || - hasOwn(options, key)); + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } -/** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; -/** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } -/** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } -/** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } -/** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; -/** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only -) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } -/** - * dev only flag to track whether $attrs was used during render. - * If $attrs was used during render then the warning for failed attrs - * fallthrough can be suppressed. - */ let accessedAttrs = false; function markAttrsAccessed() { - accessedAttrs = true; + accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if (true && attrs === props) { - markAttrsAccessed(); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } - result = normalizeVNode(render.length > 1 - ? render(props, true - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + } else { + extraAttrs.push(key); + } } - } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - let setRoot = undefined; - if (result.patchFlag > 0 && - result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - // ignore v-model handlers when they fail to fallthrough - if (!isModelListener(key)) { - // remove `on`, lowercase first letter to reflect event casing - // accurately - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } - else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1(`Extraneous non-props attributes (` + - `${extraAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes.`); - } - if (eventAttrs.length) { - warn$1(`Extraneous non-emits event listeners (` + - `${eventAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes. ` + - `If the listener is intended to be a component custom event listener only, ` + - `declare it using the "emits" option.`); - } - } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); } - } - // inherit directives - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1(`Runtime directive used on component with non-element root node. ` + - `The directives will not function as intended.`); + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); } - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } } - // inherit transition data - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1(`Component inside <Transition> renders non-element root node ` + - `that cannot be animated.`); - } - root.transition = vnode.transition; + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); } - if (setRoot) { - setRoot(root); + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); } - else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } -/** - * dev only - * In dev mode, template root level comments are rendered, which turns the - * template into a fragment root, but we need to locate the single element - * root for attrs and scope id processing. - */ const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, undefined]; + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } - else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; + }; + return [normalizeVNode(childRoot), setRoot]; }; -function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; const isElementRoot = (vnode) => { - return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) || - vnode.type === Comment // potential v-if branch switch - ); + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // Parent component's render function was hot-updated. Since this may have - // caused the child component's slots content to have changed, we need to - // force the child to update as well. - if ((prevChildren || nextChildren) && isHmrUpdating) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { - return true; + if (prevProps === nextProps) { + return false; } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (!prevProps) { + return !!nextProps; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!nextProps) { + return true; } - return false; + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } -function updateHOCHostEl({ vnode, parent }, el // HostNode -) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } const isSuspense = (type) => type.__isSuspense; -// Suspense exposes a component-like API, and is treated like a component -// in the compiler, but internally it's a special built-in type that hooks -// directly into the renderer. +let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren }; -// Force-casted public typing for h and TSX props inference -const Suspense = (SuspenseImpl ); +const Suspense = SuspenseImpl ; function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } } -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); } + } } + } } let hasWarned = false; -function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - /* istanbul ignore if */ - if (!hasWarned) { - hasWarned = true; - // @ts-ignore `console.info` cannot be null error - console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`); +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; } - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error(`suspense.resolve() is called without a pending branch.`); - } - if (suspense.isUnmounted) { - throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`); - } - } - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - { - pushWarningContext(vnode); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - { - popWarningContext(); - } - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } } - return result; - /* eslint-enable no-restricted-globals */ + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); } - return s; + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } -function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); } - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else { - warn$1(`injection "${String(key)}" not found.`); - } - } - else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } -} + return ctx; + } +}; -// Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); } -// initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; -// implementation function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` + - `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` + - `supports \`watch(source, cb, options?) signature.`); - } - return doWatch(source, cb, options); + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); } -function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - if (!cb) { - if (immediate !== undefined) { - warn$1(`watch() "immediate" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - if (deep !== undefined) { - warn$1(`watch() "deep" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - } - const warnInvalidSource = (s) => { - warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.`); +function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger +} = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isReactive(source)) { - getter = () => source; - deep = true; + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => isReactive(s) || isShallow(s)); - getter = () => source.map(s => { - if (isRef(s)) { - return s.value; - } - else if (isReactive(s)) { - return traverse(s); - } - else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else { - warnInvalidSource(s); - } - }); + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; - }; - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => hasChanged(v, oldValue[i])) - : hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new ReactiveEffect(getter, scheduler); - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - // initial run + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect); - } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + return unwatch; } -// this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } -function traverse(value, seen) { - if (!isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } +function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey$1 = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - // warn more than one non-comment child - warn$1('<transition> can only be used on a single element or component. ' + - 'Use <transition-group> for lists.'); - break; - } - child = c; - hasFound = true; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = toRaw(props); - const { mode } = rawProps; - // check mode - if (mode && - mode !== 'in-out' && - mode !== 'out-in' && - mode !== 'default') { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } -// The transition hooks are attached to the vnode as vnode.transition -// and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; -} -// the placeholder really only handles one special case: KeepAlive -// in the case of a KeepAlive in a leave phase we need to return a KeepAlive -// placeholder with empty content to avoid the KeepAlive instance from being -// unmounted. -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } -// implementation, close to no-op -function defineComponent(options) { - return isFunction(options) ? { setup: options, name: options.name } : options; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1(`Async component loader resolved to undefined. ` + - `If you are using retry(), make sure to return its return value.`); - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (false )) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } -function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - const cache = new Map(); - const keys = new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; - } - else { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')); - warn$1(`${apiName} is called when there is no active component instance to be ` + - `associated with. ` + - `Lifecycle injection APIs can only be used during execution of setup().` + - (` If you are using async setup(), make sure to register lifecycle ` + - `hooks before the first await statement.` - )); + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } } -const createHook = (lifecycle) => (hook, target = currentInstance) => -// post-create lifecycle registrations are noops during SSR (except for serverPrefetch) -(!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); -const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); -const onMounted = createHook("m" /* MOUNTED */); -const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); -const onUpdated = createHook("u" /* UPDATED */); -const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); -const onUnmounted = createHook("um" /* UNMOUNTED */); -const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); -const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); -const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); +const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) +); +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook("bu"); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook("bum"); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook("sp"); +const onRenderTriggered = createHook( + "rtg" +); +const onRenderTracked = createHook( + "rtc" +); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } -/** -Runtime helper for applying directives to a vnode. Example usage: - -const comp = resolveComponent('comp') -const foo = resolveDirective('foo') -const bar = resolveDirective('bar') - -return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] -]) -*/ -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1('Do not use built-in directive ids as custom directive id: ' + name); - } -} -/** - * Adds directives to a VNode. - */ -function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} - -const COMPONENTS = 'components'; -const DIRECTIVES = 'directives'; -/** - * @private - */ -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol(); -/** - * @private - */ -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } -} -/** - * @private - */ -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -// implementation -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === camelize(name) || - selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS - ? `\nIf this is a native custom element, make sure to exclude it from ` + - `component resolution via compilerOptions.isCustomElement.` - : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } - else { - warn$1(`resolve${capitalize(type.slice(0, -1))} ` + - `can only be used in render() or setup().`); - } -} -function resolve(registry, name) { - return (registry && - (registry[name] || - registry[camelize(name)] || - registry[capitalize(camelize(name))])); -} - -/** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); } - else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else { - ret = []; + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } -/** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } -/** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ -function renderSlot(slots, name, props = {}, -// this is not a user-facing function, so the fallback is always generated by -// the compiler and guaranteed to be a function returning an array -fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` + - `function. You need to mark this component with $dynamic-slots in the ` + - `parent template.`); - slot = () => []; - } - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } -/** - * For prefixing keys in v-on="obj" with "on" - * @private - */ -function toHandlers(obj) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[toHandlerKey(key)] = obj[key]; - } +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; } -/** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; -const publicPropertiesMap = -// Move PURE marker to new line to workaround compiler discarding it -// due to type annotation -/*#__PURE__*/ extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => (shallowReadonly(i.props) ), - $attrs: i => (shallowReadonly(i.attrs) ), - $slots: i => (shallowReadonly(i.slots) ), - $refs: i => (shallowReadonly(i.refs) ), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (resolveMergedOptions(i) ), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (instanceWatch.bind(i) ) -}); -const isReservedPrefix = (key) => key === '_' || key === '$'; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // for internal formatters to know that this is a Vue instance - if (key === '__isVue') { - return true; - } - // prioritize <script setup> bindings during dev. - // this allows even properties that start with _ or $ to be used - so that - // it aligns with the production behavior where the render fn is inlined and - // indeed has access to all declared variables. - if (setupState !== EMPTY_OBJ && - setupState.__isScriptSetup && - hasOwn(setupState, key)) { - return setupState[key]; - } - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - track(instance, "get" /* GET */, key); - markAttrsAccessed(); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else if (currentRenderingInstance && - (!isString(key) || - // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf('__v') !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` + - `character ("$" or "_") and is not proxied on the render context.`); - } - else if (instance === currentRenderingInstance) { - warn$1(`Property ${JSON.stringify(key)} was accessed during render ` + - `but is not defined on instance.`); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance); - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - warn$1(`Attempting to mutate public property "${key}". ` + - `Properties starting with $ are reserved and readonly.`, instance); - return false; - } - else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } - else { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== EMPTY_OBJ && hasOwn(data, key)) || - (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) || - hasOwn(ctx, key) || - hasOwn(publicPropertiesMap, key) || - hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } }; { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` + - `The keys will be empty in production mode to avoid performance overhead.`); - return Reflect.ownKeys(target); - }; + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; } -const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, PublicInstanceProxyHandlers, { +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend( + {}, + PublicInstanceProxyHandlers, + { get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !isGloballyWhitelisted(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`); - } - return has; + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } -}); -// dev only -// In dev mode, the proxy target exposes the same properties as seen on `this` -// for easier console inspection. In prod mode it will be an empty object so -// these properties definitions can be skipped. + } +); function createDevRenderContext(instance) { - const target = {}; - // expose internal instance for proxy handlers - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP }); - // expose public properties - Object.keys(publicPropertiesMap).forEach(key => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; + }); + return target; } -// dev only function exposePropsOnRenderContext(instance) { - const { ctx, propsOptions: [propsOptions] } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach(key => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } -} -// dev only -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach(key => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` + - `which are reserved prefixes for Vue internals.`); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (isArray(a) && isArray(b)) + return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; } function createDuplicateChecker() { - const cache = Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } - else { - cache[key] = type; - } - }; + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; } let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } } - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } - else { - warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` + - `Did you reference the function correctly?`); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1(`The data option must be a function. ` + - `Plain object usage is no longer supported.`); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1(`data() returned a Promise - note data() cannot be async; If you ` + - `intend to perform data fetching before component renders, use ` + - `async setup() + <Suspense>.`); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } - else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - // expose data on ctx during dev - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) - ? opt.bind(publicThis, publicThis) - : isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) - ? opt.set.bind(publicThis) - : () => { - warn$1(`Write operation failed: computed property "${key}" is readonly.`); - } - ; - const c = computed$1({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - { - warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` + - `and no longer needs \`.value\` in the next minor release. ` + - `To opt-in to the new behavior now, ` + - `set \`app.config.unwrapInjectedRef = true\` (this config is ` + - `temporary and will not be needed in the future.)`); - } - ctx[key] = injected; - } - } - else { - ctx[key] = injected; + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); } { - checkDuplicateProperties("Inject" /* INJECT */, key); + checkDuplicateProperties("Methods" /* METHODS */, key); } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; } -function callHook(hook, instance, type) { - callWithAsyncErrorHandling(isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - watch(getter, handler); - } - else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + watch(getter, handler); + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } - else if (isFunction(raw)) { - watch(getter, raw.bind(publicThis)); - } - else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } - else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } - else { - warn$1(`Invalid watch option: "${key}"`, raw); + } else if (isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } } -/** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') { - warn$1(`"expose" option is ignored when declared in mixins or extends. ` + - `It should only be declared in the base component itself.`); - } - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray$1, + created: mergeAsArray$1, + beforeMount: mergeAsArray$1, + mounted: mergeAsArray$1, + beforeUpdate: mergeAsArray$1, + updated: mergeAsArray$1, + beforeDestroy: mergeAsArray$1, + beforeUnmount: mergeAsArray$1, + destroyed: mergeAsArray$1, + unmounted: mergeAsArray$1, + activated: mergeAsArray$1, + deactivated: mergeAsArray$1, + errorCaptured: mergeAsArray$1, + serverPrefetch: mergeAsArray$1, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } -function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; +function mergeAsArray$1(to, from) { + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend(extend(Object.create(null), to), from) : from; + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray$1(to[key], from[key]); + } + return merged; } -function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison -isSSR = false) { - const props = {}; - const attrs = {}; - def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; - } +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); } - // validation + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { { - validateProps(rawProps || {}, props, instance); + warn$1(`provide() can only be used inside setup().`); } - if (isStateful) { - // stateful - instance.props = isSSR ? props : shallowReactive(props); + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; - } - else { - // functional w/ declared props - instance.props = props; - } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); } - instance.attrs = attrs; + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !((instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId))) && - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - trigger(instance, "set" /* SET */, '$attrs'); - } - { - validateProps(rawProps || {}, props, instance); - } + } + if (hasAttrsChanged) { + trigger(instance, "set", "$attrs"); + } + { + validateProps(rawProps || {}, props, instance); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && hasOwn(options, (camelKey = camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, EMPTY_ARR); - return EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); } - else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - isArray(opt) || isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } } - const res = [normalized, needCastKeys]; + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; + if (key[0] !== "$") { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; } -// use function string name to check type constructors -// so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } -/** - * dev only - */ function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - for (const key in options) { - let opt = options[key]; - if (opt == null) - continue; - validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))); - } + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)) + ); + } } -/** - * dev only - */ -function validateProp(name, value, prop, isAbsent) { - const { type, required, validator } = prop; - // required! - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; } - // missing but optional - if (value == null && !prop.required) { - return; - } - // type check - if (type != null && type !== true) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - // value is valid as long as one of the specified types match - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ''); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - // custom validator - if (validator && !validator(value)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } } -const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt'); -/** - * dev only - */ +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; } - else if (expectedType === 'Object') { - valid = isObject(value); - } - else if (expectedType === 'Array') { - valid = isArray(value); - } - else if (expectedType === 'null') { - valid = value === null; - } - else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; } -/** - * dev only - */ function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid prop: type check failed for prop "${name}".` + - ` Expected ${expectedTypes.map(capitalize).join(' | ')}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; } -/** - * dev only - */ function styleValue(value, type) { - if (type === 'String') { - return `"${value}"`; - } - else if (type === 'Number') { - return `${Number(value)}`; - } - else { - return `${value}`; - } + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } } -/** - * dev only - */ function isExplicable(type) { - const explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(elem => type.toLowerCase() === elem); + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); } -/** - * dev only - */ function isBoolean(...args) { - return args.some(elem => elem.toLowerCase() === 'boolean'); + return args.some((elem) => elem.toLowerCase() === "boolean"); } -const isInternalKey = (key) => key[0] === '_' || key === '$stable'; -const normalizeSlotValue = (value) => isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); } - const normalized = withCtx((...args) => { - if (currentInstance) { - warn$1(`Slot "${key}" invoked outside of the render function: ` + - `this will not track dependencies used in the slot. ` + - `Invoke the slot function inside the render function instead.`); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - { - warn$1(`Non-function value encountered for slot "${key}". ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && - !(false )) { - warn$1(`Non-function value encountered for default slot. ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = toRaw(children); - // make compiler marker non-enumerable - def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = toRaw(children); + def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - def(instance.slots, InternalObjectKey, 1); + } + def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if (isHmrUpdating) { - // Parent was HMR updated so slot content may have changed. - // force update slots and mark instance for hmr as well - extend(slots, children); - } - else if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + extend(slots, children); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; -function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; -} -let uid = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = Object.assign({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1(`app.config cannot be replaced. Modify individual options instead.`); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } - else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else { - warn$1(`A plugin must either be a function or an object with an "install" ` + - `function.`); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - else { - warn$1('Mixin has already been applied to target app' + - (mixin.name ? `: ${mixin.name}` : '')); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - // #5571 - if (rootContainer.__vue_app__) { - warn$1(`There is already an app instance mounted on the host container.\n` + - ` If you want to mount another app on the same host container,` + - ` you need to unmount the previous app by calling \`app.unmount()\` first.`); - } - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - // HMR root reload - { - context.reload = () => { - render(cloneVNode(vnode), rootContainer, isSVG); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - else { - warn$1(`App has already been mounted.\n` + - `If you want to remount the same app, move your app creation logic ` + - `into a factory function and create fresh app instances for each ` + - `mount - e.g. \`const createMyApp = () => createApp(App)\``); - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } - else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1(`App already provides property with key "${String(key)}". ` + - `It will be overwritten with the new value.`); - } - context.provides[key] = value; - return app; - } - }); - return app; - }; -} - -/** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + - `A vnode with ref must be created inside the render function.`); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } + } + } else if (_isString) { + refs[ref] = value; + if (hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } - else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } - else if (_isString) { - refs[ref] = value; - if (hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } - else { - doSet(); - } - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } + } } let hasMismatch = false; -const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; +}; const isComment = (node) => node.nodeType === 8 /* COMMENT */; -// Note: hydration is DOM-specific -// But we have to place it in core due to tight coupling with core - splitting -// it out creates a ton of unnecessary complexity. -// Hydration also depends on some renderer internal logic which needs to be -// passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1(`Attempting to hydrate existing markup but container is empty. ` + - `Performing full mount instead.`); - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text mismatch:` + - `\n- Client: ${JSON.stringify(node.data)}` + - `\n- Server: ${JSON.stringify(vnode.children)}`); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else { - warn$1('Invalid HostVNode type:', type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (isOn(key) && !isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + if (!("__vnode" in node)) { + Object.defineProperty(node, "__vnode", { + value: vnode, + enumerable: false + }); + } + if (!("__vueParentComponent" in node)) { + Object.defineProperty(node, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + hasMismatch = true; + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + el.textContent = vnode.children; + } + } + if (props) { + { + for (const key in props) { + if (propHasMismatch(el, key, props[key], vnode)) { + hasMismatch = true; + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - return node; - }; - return [hydrate, hydrateNode]; + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style"); + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = `attribute`; + mismatchKey = key; + } + } + if (mismatchType) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${mismatchType} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key == null ? void 0 : key.trim(); + value = value == null ? void 0 : value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; } -/* eslint-disable no-restricted-globals */ let supported; let perf; function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } } function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } } function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } + if (supported !== void 0) { return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; } -const queuePostRenderEffect = queueEffectWithSuspense - ; -/** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ +const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } -// Separate API for creating hydration-enabled renderer. -// Hydration logic is only used when calling this function, making it -// tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } -// implementation function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else { - warn$1('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); } + } } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); } - else { - // there's no support for dynamic comments - n2.el = n1.el; + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); + } + for (const key in newProps) { + if (isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); } - { - Object.defineProperty(el, '__vnode', { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, '__vueParentComponent', { - value: parentComponent, - enumerable: false - }); + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && - subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - subTree = - filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - // HMR updated, force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (// #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) { - // HMR updated / Dev root fragment (w/ comments), force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { { - startMeasure(instance, `init`); + startMeasure(instance, `render`); } - setupComponent(instance); + instance.subTree = renderComponentRoot(instance); { - endMeasure(instance, `init`); + endMeasure(instance, `render`); } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); return; + } } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); + let originNext = next; + let vnodeHook; { - popWarningContext(); - endMeasure(instance, `mount`); + pushWarningContext(next || instance.vnode); } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - // async & still pending - just update props and slots - // since the component's reactive effect for render isn't set-up yet - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - { - startMeasure(instance, `render`); - } - const subTree = (instance.subTree = renderComponentRoot(instance)); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - // render - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates toggleRecurse(instance, true); { - effect.onTrack = instance.rtc - ? e => invokeArrayFns(instance.rtc, e) - : void 0; - effect.onTrigger = instance.rtg - ? e => invokeArrayFns(instance.rtg, e) - : void 0; - update.ownerInstance = instance; + startMeasure(instance, `render`); } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); + if (u) { + queuePostRenderEffect(u, parentSuspense); } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); - } - }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && - vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ && - transition && - !transition.persisted) { - vnode.children.forEach(child => { - if (child.type === Comment) { - hostRemove(child.el); - } - else { - remove(child); - } - }); - } - else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); } { - devtoolsComponentRemoved(instance); + devtoolsComponentUpdated(instance); } + { + popWarningContext(); + } + } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } + const effect = instance.effect = new ReactiveEffect( + componentUpdateFn, + NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + update.id = instance.uid; + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } -/** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } - // also inherit for comment nodes, but not placeholders (e.g. v-if which - // would have received .el during block patch) - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } } + } } -// https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); -const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1(`Current renderer does not support string target for Teleports. ` + - `(missing querySelector renderer option)`); - return null; - } - else { - const target = select(targetSelector); - if (!target) { - warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` + - `Note the target element must exist before the component is mounted - ` + - `i.e. the target cannot be rendered by the component itself, and ` + - `ideally should be outside of the entire Vue component tree.`); - } - return target; - } + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; } - else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); } + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - // #3302 - // HMR updated, force full diff - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = createComment('teleport start') - ); - const mainAnchor = (n2.anchor = createComment('teleport end') - ); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - else if (!disabled) { - warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } - } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - else { - warn$1('Invalid Teleport target on update:', target, `(${typeof target})`); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } - } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } + } else if (!disabled) { + warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } -// Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; +function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} -const Fragment = Symbol('Fragment' ); -const Text = Symbol('Text' ); -const Comment = Symbol('Comment' ); -const Static = Symbol('Static' ); -// Since v-if and v-for are the two possible ways node structure can dynamically -// change, once we consider v-if branches and each v-for fragment a block, we -// can divide a template into nested blocks, and within each block the node -// structure would be stable. This allows us to skip most children diffing -// and only worry about the dynamic nodes (indicated by patch flags). +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; -/** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } -// Whether we should be tracking dynamic child nodes inside a block. -// Only tracks when this value is > 0 -// We are not using a simple boolean because this value may need to be -// incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; -/** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } -/** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } -/** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 /* COMPONENT */ && - hmrDirtyComponents.has(n2.type)) { - // HMR only: if the component has been hot-updated, force a reload. - return false; - } - return n1.type === n2.type && n1.key === n2.key; + if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; } let vnodeArgsTransformer; -/** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; + vnodeArgsTransformer = transformer; } const createVNodeWithArgsTransform = (...args) => { - return _createVNode(...(vnodeArgsTransformer - ? vnodeArgsTransformer(args, currentRenderingInstance) - : args)); + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); }; const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? isString(ref) || isRef(ref) || isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // validate key - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } -const createVNode = (createVNodeWithArgsTransform ); +const createVNode = createVNodeWithArgsTransform ; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); } - // encode the vnode type information into a bitmap - const shapeFlag = isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) { - type = toRaw(type); - warn$1(`Vue received a Component which was made a reactive object. This can ` + - `lead to unnecessary performance overhead, and should be avoided by ` + - `marking the component with \`markRaw\` or using \`shallowRef\` ` + - `instead of \`ref\`.`, `\nComponent that was made reactive: `, type); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); } - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return isProxy(props) || InternalObjectKey in props - ? extend({}, props) - : props; + if (!props) + return null; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 /* HOISTED */ && isArray(children) - ? children.map(deepCloneVNode) - : children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } -/** - * Dev only, for HMR of hoisted vnodes reused in v-for - * https://github.com/vitejs/vite/issues/2022 - */ function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; } -/** - * @private - */ -function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } -/** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } -/** - * @private - */ -function createCommentVNode(text = '', -// when used as the v-else branch, the comment node must be created as a -// block to ensure correct updates. -asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } -// optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } - else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); -let uid$1 = 0; +let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; +} const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; -const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component'); +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); function validateComponentName(name, config) { - const appIsNativeTag = config.isNativeTag || NO; - if (isBuiltInTag(name) || appIsNativeTag(name)) { - warn$1('Do not use built-in or reserved HTML elements as component id: ' + name); - } + const appIsNativeTag = config.isNativeTag || NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } } function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1(`"compilerOptions" is only supported when using a build of Vue that ` + - `includes the runtime compiler. Since you are using a runtime-only ` + - `build, the options should be passed via your build tool config instead.`); - } + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); } - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - { - exposePropsOnRenderContext(instance); + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } } - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]); - resetTracking(); - unsetCurrentInstance(); - if (isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous'; - warn$1(`Component <${name}>: setup function returned a promise, but no ` + - `<Suspense> boundary was found in the parent component tree. ` + - `A component with async setup() must be nested in a <Suspense> ` + - `in order to be rendered.`); - } - } - } - else { - handleSetupResult(instance, setupResult, isSSR); + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + resetTracking(); + reset(); + if (isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); } + } + } else { + handleSetupResult(instance, setupResult, isSSR); } - else { - finishComponentSetup(instance, isSSR); - } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - // setup returned an inline render function - { - instance.render = setupResult; - } - } - else if (isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1(`setup() should not return VNodes directly - ` + - `return a render function instead.`); - } - // setup returned bindings. - // assuming a render function compiled from template is present. - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } - } - else if (setupResult !== undefined) { - warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`); - } - finishComponentSetup(instance, isSSR); -} -let compile; -let installWithProxy; -/** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ -function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; -} -// dev only -const isRuntimeOnly = () => !compile; -function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend(extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } - } - instance.render = (Component.render || NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); - } - } - // support for 2.x options + if (isFunction(setupResult)) { { - setCurrentInstance(instance); - pauseTracking(); - applyOptions(instance); - resetTracking(); - unsetCurrentInstance(); + instance.render = setupResult; } - // warn missing template/render - // the runtime compilation of template in SSR is done by server-render - if (!Component.render && instance.render === NOOP && !isSSR) { - /* istanbul ignore if */ - if (!compile && Component.template) { - warn$1(`Component provided template option but ` + - `runtime compilation is not supported in this build of Vue.` + - (` Use "vue.esm-browser.js" instead.` - ) /* should not happen */); - } - else { - warn$1(`Component is missing template or render function.`); - } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); } -function createAttrsProxy(instance) { - return new Proxy(instance.attrs, { - get(target, key) { - markAttrsAccessed(); - track(instance, "get" /* GET */, '$attrs'); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } +let compile$1; +let installWithProxy; +function registerRuntimeCompiler(_compile) { + compile$1 = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; +} +const isRuntimeOnly = () => !compile$1; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile$1 && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions ); + Component.render = compile$1(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile$1 && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } +} +function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + markAttrsAccessed(); + track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } + )); +} +function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + })); } function createSetupContext(instance) { - const expose = exposed => { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - instance.exposed = exposed || {}; - }; - let attrs; + const expose = (exposed) => { { - // We use getters in dev in case libs like test-utils overwrite instance - // properties (overwrites should not be done in prod) - return Object.freeze({ - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - get slots() { - return shallowReadonly(instance.slots); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } } + instance.exposed = exposed || {}; + }; + { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } } const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); -function getComponentName(Component) { - return isFunction(Component) - ? Component.displayName || Component.name - : Component.name; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } -/* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { - return isFunction(value) && '__vccOpts' in value; + return isFunction(value) && "__vccOpts" in value; } -const computed$1 = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return computed(getterOrOptions, debugOptions, isInSSRComponentSetup); -}); - -// dev only -const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` + - `<script setup> of a single file component. Its arguments should be ` + - `compiled away and passing it at runtime has no effect.`); -// implementation -function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; -} -// implementation -function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; -} -/** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } -} -/** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ -function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -/** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ -function mergeDefaults(raw, defaults) { - const props = isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - } - return props; -} -/** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -/** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1(`withAsyncContext called without active current instance. ` + - `This is likely a bug.`); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -// Actual implementation -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -const ssrContextKey = Symbol(`ssrContext` ); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn$1(`Server rendering context not provided. Make sure to only call ` + - `useSSRContext() conditionally in the server build.`); - } - return ctx; - } +const computed = (getterOrOptions, debugOptions) => { + return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); }; -function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - if (typeof window === 'undefined') { - return; - } - const vueStyle = { style: 'color:#3ba776' }; - const numberStyle = { style: 'color:#0b1bc9' }; - const stringStyle = { style: 'color:#b62e24' }; - const keywordStyle = { style: 'color:#9d288c' }; - // custom formatter for Chrome - // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html - const formatter = { - header(obj) { - // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ['div', vueStyle, `VueInstance`]; - } - else if (isRef(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, genRefFlag(obj)], - '<', - formatValue(obj.value), - `>` - ]; - } - else if (isReactive(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'], - '<', - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } - else if (isReadonly(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'], - '<', - formatValue(obj), - '>' - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - 'div', - {}, - ...formatInstance(obj.$) - ]; - } +function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + if (!i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const camelizedName = camelize(name); + const hyphenatedName = hyphenate(name); + const res = customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) { + localValue = value; + trigger(); } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock('props', toRaw(instance.props))); + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('setup', instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('data', toRaw(instance.data))); - } - const computed = extractKeys(instance, 'computed'); - if (computed) { - blocks.push(createInstanceBlock('computed', computed)); - } - const injected = extractKeys(instance, 'inject'); - if (injected) { - blocks.push(createInstanceBlock('injected', injected)); - } - blocks.push([ - 'div', - {}, - [ - 'span', - { - style: keywordStyle.style + ';opacity:0.66' - }, - '$ (internal): ' - ], - ['object', { object: instance }] - ]); - return blocks; + } + }; + }; + return res; +} + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ['span', {}]; - } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { return [ - 'div', - { style: 'line-height:1.25em;margin-bottom:0.6em' }, - [ - 'div', - { - style: 'color:#476582' - }, - type - ], - [ - 'div', - { - style: 'padding-left:1.25em' - }, - ...Object.keys(target).map(key => { - return [ - 'div', - {}, - ['span', keywordStyle, key + ': '], - formatValue(target[key], false) - ]; - }) - ] + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + formatValue(obj.value), + `>` ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } } - function formatValue(v, asRaw = true) { - if (typeof v === 'number') { - return ['span', numberStyle, v]; - } - else if (typeof v === 'string') { - return ['span', stringStyle, JSON.stringify(v)]; - } - else if (typeof v === 'boolean') { - return ['span', keywordStyle, v]; - } - else if (isObject(v)) { - return ['object', { object: asRaw ? toRaw(v) : v }]; - } - else { - return ['span', stringStyle, String(v)]; - } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if ((isArray(opts) && opts.includes(key)) || - (isObject(opts) && key in opts)) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) { - return true; - } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); } - else { - window.devtoolsFormatters = [formatter]; + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } -// Core API ------------------------------------------------------------------ -const version = "3.2.36"; -/** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ -const ssrUtils = (null); -/** - * @internal only exposed in compat builds - */ +const version = "3.4.15"; +const warn = warn$1 ; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = devtools$1 ; +const setDevtoolsHook = setDevtoolsHook$1 ; +const ssrUtils = null; const resolveFilter = null; -/** - * @internal only exposed in compat builds. - */ -const compatUtils = (null); +const compatUtils = null; +const DeprecationTypes = null; -const svgNS = 'http://www.w3.org/2000/svg'; -const doc = (typeof document !== 'undefined' ? document : null); -const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; -// compiler should normalize class + :class bindings on the same element -// into a single binding ['staticClass', dynamic] -function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } -} - -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } -} -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } -} -const prefixes = ['Webkit', 'Moz', 'ms']; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; -} - -const xlinkNS = 'http://www.w3.org/1999/xlink'; -function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } -} - -// __UNSAFE__ -// functions. The user is responsible for using them with only trusted content. -function patchDOMProp(el, key, value, -// the following args are passed only due to potential innerHTML/textContent -// overriding existing VNodes, in which case the old tree must be properly -// unmounted. -prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - { - warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` + - `value ${value} is invalid.`, e); - } - } - needRemove && el.removeAttribute(key); -} - -// Async edge case fix requires storing an event listener's attach timestamp. -const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; -})(); -// To avoid the overhead of repeatedly calling performance.now(), we cache -// and use the same timestamp for all event listeners attached in the same tick. -let cachedNow = 0; -const p = /*#__PURE__*/ Promise.resolve(); -const reset = () => { - cachedNow = 0; -}; -const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [hyphenate(name.slice(2)), options]; -} -function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } -} - -const nativeOnRE = /^on[a-z]/; -const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (isOn(key)) { - // ignore v-model listeners - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && isString(value)) { - return false; - } - return key in el; -} - -function defineCustomElement(options, hydrate) { - const Comp = defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); -}); -const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { -}); -class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - if (this.shadowRoot) { - warn$1(`Custom element has pre-rendered declarative shadow root but is not ` + - `defined as hydratable. Use \`defineSSRCustomElement\`.`); - } - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = toNumber(value); - } - this._setProp(camelize(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = createVNode(this._def, extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // HMR - { - instance.ceReload = newStyles => { - // always reset styles - if (this._styles) { - this._styles.forEach(s => this.shadowRoot.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - // if this is an async component, ceReload is called from the inner - // component so no need to reload the async wrapper - if (!this._def.__asyncLoader) { - // reload - this._instance = null; - this._update(); - } - }; - } - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - // record for HMR - { - (this._styles || (this._styles = [])).push(s); - } - }); - } - } -} - -function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - const instance = getCurrentInstance(); - if (!instance) { - warn$1(`useCssModule must be called inside setup()`); - return EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - warn$1(`Current instance does not have CSS modules injected.`); - return EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - warn$1(`Current instance does not have CSS module named "${name}".`); - return EMPTY_OBJ; - } - return mod; - } -} - -/** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ -function useCssVars(getter) { - const instance = getCurrentInstance(); - /* istanbul ignore next */ - if (!instance) { - warn$1(`useCssVars is called without current active component instance.`); - return; - } - const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy)); - watchPostEffect(setVars); - onMounted(() => { - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); -} -function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - // drill down HOCs until it's a non-component vnode - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) { - setVarsOnNode(vnode.el, vars); - } - else if (vnode.type === Fragment) { - vnode.children.forEach(c => setVarsOnVNode(c, vars)); - } - else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) - break; - el = el.nextSibling; - } - } -} -function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - } - } -} - -const TRANSITION = 'transition'; -const ANIMATION = 'animation'; -// DOM Transition is a higher-order-component based on the platform-agnostic -// base Transition component, with DOM-specific logic. +const TRANSITION$1 = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots); -Transition.displayName = 'Transition'; +Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; -const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ extend({}, BaseTransition.props, DOMTransitionPropsValidators)); -/** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ -const callHook$1 = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } +const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; -/** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook$1(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook$1(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook$1(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook$1(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook$1(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook$1(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook$1(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = toNumber(val); - validateDuration(res); - return res; -} -function validateDuration(val) { - if (typeof val !== 'number') { - warn$1(`<transition> explicit duration is not a valid number - ` + - `got ${JSON.stringify(val)}.`); - } - else if (isNaN(val)) { - warn$1(`<transition> explicit duration is NaN - ` + - 'the duration expression might be incorrect.'); - } + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION$1) { + if (transitionTimeout > 0) { + type = TRANSITION$1; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null; + propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION$1}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } -// Old versions of Chromium (below 61.0.3163.100) formats floating pointer -// numbers in a locale-dependent way, using a comma instead of a dot. -// If comma is not replaced with a dot, the input will be rounded down -// (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } -// synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } -const positionMap = new WeakMap(); -const newPositionMap = new WeakMap(); -const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = children; - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - else { - warn$1(`<TransitionGroup> children must be keyed.`); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return createVNode(tag, null, children); - }; +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOldKey = Symbol("_vod"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); +function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + const setVars = () => { + const vars = getter(instance.proxy); + setVarsOnVNode(instance.subTree, vars); + updateTeleports(vars); + }; + watchPostEffect(setVars); + onMounted(() => { + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); +} +function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) + break; + el = el.nextSibling; + } + } +} +function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } +} + +function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = isString(next); + if (next && !isCssString) { + if (prev && !isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = isSpecialBooleanAttr(key); + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } +} + +function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, hydrate2) { + const Comp = defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = camelize(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = createVNode(this._def, extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + { + (this._styles || (this._styles = [])).push(s); + } + }); + } + } +} + +function useCssModule(name = "$style") { + { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssModule must be called inside setup()`); + return EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + warn(`Current instance does not have CSS modules injected.`); + return EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + warn(`Current instance does not have CSS module named "${name}".`); + return EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = children; + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else { + warn(`<TransitionGroup> children must be keyed.`); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return createVNode(tag, null, children); + }; + } +}; +const removeMode = (props) => delete props.mode; +/* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return isArray(fn) ? value => invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } -// We are exporting the v-model runtime directly as vnode hooks so that it can -// be tree-shaken in case v-model is never used. +const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (isArray(value)) { - el.checked = looseIndexOf(value, vnode.props.value) > -1; - } - else if (isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (isArray(value)) { + el.checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; -function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !isArray(value) && !isSet(value)) { - warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` + - `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`); +function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + if (isArrayValue && looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArray(value)) { - option.selected = looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } -// retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } -// retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } -const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) }; -/** - * @private - */ const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; -}; -// Kept for 2.x compat. -// Note: IE11 compat for `spacebar` and `del` is removed for now. -const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' -}; -/** - * @private - */ -const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; -}; - -const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); }; -function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; -} -const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps); -// lazy create the renderer - this makes core renderer logic tree-shakable -// in case the user only imports reactivity utilities from Vue. +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = createRenderer(rendererOptions))); + return renderer || (renderer = createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } -// use explicit type casts here to avoid import() calls in rolled-up d.ts -const render = ((...args) => { - ensureRenderer().render(...args); -}); -const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); -}); -const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; -}); -const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; -}); + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} function injectNativeTagCheck(app) { - // Inject `isNativeTag` - // this is used for component name validation (dev only) - Object.defineProperty(app.config, 'isNativeTag', { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag), - writable: false - }); + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); } -// dev only function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, 'isCustomElement', { - get() { - return isCustomElement; - }, - set() { - warn$1(`The \`isCustomElement\` config option is deprecated. Use ` + - `\`compilerOptions.isCustomElement\` instead.`); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using ` + - `a build of Vue.js that includes the runtime compiler (aka "full build"). ` + - `Since you are using the runtime-only build, \`compilerOptions\` ` + - `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` + - `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` + - `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` + - `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`; - Object.defineProperty(app.config, 'compilerOptions', { - get() { - warn$1(msg); - return compilerOptions; - }, - set() { - warn$1(msg); - } - }); - } + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } } function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn$1(`Failed to mount app: mount target selector "${container}" returned null.`); - } - return res; + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); } - if (window.ShadowRoot && - container instanceof window.ShadowRoot && - container.mode === 'closed') { - warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`); - } - return container; + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; } -/** - * @internal - */ const initDirectivesForSSR = NOOP; var runtimeDom = /*#__PURE__*/Object.freeze({ __proto__: null, - render: render, - hydrate: hydrate, - createApp: createApp, - createSSRApp: createSSRApp, - initDirectivesForSSR: initDirectivesForSSR, - defineCustomElement: defineCustomElement, - defineSSRCustomElement: defineSSRCustomElement, - VueElement: VueElement, - useCssModule: useCssModule, - useCssVars: useCssVars, + BaseTransition: BaseTransition, + BaseTransitionPropsValidators: BaseTransitionPropsValidators, + Comment: Comment, + DeprecationTypes: DeprecationTypes, + EffectScope: EffectScope, + ErrorCodes: ErrorCodes, + ErrorTypeStrings: ErrorTypeStrings, + Fragment: Fragment, + KeepAlive: KeepAlive, + ReactiveEffect: ReactiveEffect, + Static: Static, + Suspense: Suspense, + Teleport: Teleport, + Text: Text, + TrackOpTypes: TrackOpTypes, Transition: Transition, TransitionGroup: TransitionGroup, - vModelText: vModelText, - vModelCheckbox: vModelCheckbox, - vModelRadio: vModelRadio, - vModelSelect: vModelSelect, - vModelDynamic: vModelDynamic, - withModifiers: withModifiers, - withKeys: withKeys, - vShow: vShow, - reactive: reactive, - ref: ref, - readonly: readonly, - unref: unref, - proxyRefs: proxyRefs, - isRef: isRef, - toRef: toRef, - toRefs: toRefs, + TriggerOpTypes: TriggerOpTypes, + VueElement: VueElement, + assertNumber: assertNumber, + callWithAsyncErrorHandling: callWithAsyncErrorHandling, + callWithErrorHandling: callWithErrorHandling, + camelize: camelize, + capitalize: capitalize, + cloneVNode: cloneVNode, + compatUtils: compatUtils, + computed: computed, + createApp: createApp, + createBlock: createBlock, + createCommentVNode: createCommentVNode, + createElementBlock: createElementBlock, + createElementVNode: createBaseVNode, + createHydrationRenderer: createHydrationRenderer, + createPropsRestProxy: createPropsRestProxy, + createRenderer: createRenderer, + createSSRApp: createSSRApp, + createSlots: createSlots, + createStaticVNode: createStaticVNode, + createTextVNode: createTextVNode, + createVNode: createVNode, + customRef: customRef, + defineAsyncComponent: defineAsyncComponent, + defineComponent: defineComponent, + defineCustomElement: defineCustomElement, + defineEmits: defineEmits, + defineExpose: defineExpose, + defineModel: defineModel, + defineOptions: defineOptions, + defineProps: defineProps, + defineSSRCustomElement: defineSSRCustomElement, + defineSlots: defineSlots, + devtools: devtools, + effect: effect, + effectScope: effectScope, + getCurrentInstance: getCurrentInstance, + getCurrentScope: getCurrentScope, + getTransitionRawChildren: getTransitionRawChildren, + guardReactiveProps: guardReactiveProps, + h: h, + handleError: handleError, + hasInjectionContext: hasInjectionContext, + hydrate: hydrate, + initCustomFormatter: initCustomFormatter, + initDirectivesForSSR: initDirectivesForSSR, + inject: inject, + isMemoSame: isMemoSame, isProxy: isProxy, isReactive: isReactive, isReadonly: isReadonly, + isRef: isRef, + isRuntimeOnly: isRuntimeOnly, isShallow: isShallow, - customRef: customRef, - triggerRef: triggerRef, - shallowRef: shallowRef, + isVNode: isVNode, + markRaw: markRaw, + mergeDefaults: mergeDefaults, + mergeModels: mergeModels, + mergeProps: mergeProps, + nextTick: nextTick, + normalizeClass: normalizeClass, + normalizeProps: normalizeProps, + normalizeStyle: normalizeStyle, + onActivated: onActivated, + onBeforeMount: onBeforeMount, + onBeforeUnmount: onBeforeUnmount, + onBeforeUpdate: onBeforeUpdate, + onDeactivated: onDeactivated, + onErrorCaptured: onErrorCaptured, + onMounted: onMounted, + onRenderTracked: onRenderTracked, + onRenderTriggered: onRenderTriggered, + onScopeDispose: onScopeDispose, + onServerPrefetch: onServerPrefetch, + onUnmounted: onUnmounted, + onUpdated: onUpdated, + openBlock: openBlock, + popScopeId: popScopeId, + provide: provide, + proxyRefs: proxyRefs, + pushScopeId: pushScopeId, + queuePostFlushCb: queuePostFlushCb, + reactive: reactive, + readonly: readonly, + ref: ref, + registerRuntimeCompiler: registerRuntimeCompiler, + render: render, + renderList: renderList, + renderSlot: renderSlot, + resolveComponent: resolveComponent, + resolveDirective: resolveDirective, + resolveDynamicComponent: resolveDynamicComponent, + resolveFilter: resolveFilter, + resolveTransitionHooks: resolveTransitionHooks, + setBlockTracking: setBlockTracking, + setDevtoolsHook: setDevtoolsHook, + setTransitionHooks: setTransitionHooks, shallowReactive: shallowReactive, shallowReadonly: shallowReadonly, - markRaw: markRaw, - toRaw: toRaw, - effect: effect, + shallowRef: shallowRef, + ssrContextKey: ssrContextKey, + ssrUtils: ssrUtils, stop: stop, - ReactiveEffect: ReactiveEffect, - effectScope: effectScope, - EffectScope: EffectScope, - getCurrentScope: getCurrentScope, - onScopeDispose: onScopeDispose, - computed: computed$1, + toDisplayString: toDisplayString, + toHandlerKey: toHandlerKey, + toHandlers: toHandlers, + toRaw: toRaw, + toRef: toRef, + toRefs: toRefs, + toValue: toValue, + transformVNodeArgs: transformVNodeArgs, + triggerRef: triggerRef, + unref: unref, + useAttrs: useAttrs, + useCssModule: useCssModule, + useCssVars: useCssVars, + useModel: useModel, + useSSRContext: useSSRContext, + useSlots: useSlots, + useTransitionState: useTransitionState, + vModelCheckbox: vModelCheckbox, + vModelDynamic: vModelDynamic, + vModelRadio: vModelRadio, + vModelSelect: vModelSelect, + vModelText: vModelText, + vShow: vShow, + version: version, + warn: warn, watch: watch, watchEffect: watchEffect, watchPostEffect: watchPostEffect, watchSyncEffect: watchSyncEffect, - onBeforeMount: onBeforeMount, - onMounted: onMounted, - onBeforeUpdate: onBeforeUpdate, - onUpdated: onUpdated, - onBeforeUnmount: onBeforeUnmount, - onUnmounted: onUnmounted, - onActivated: onActivated, - onDeactivated: onDeactivated, - onRenderTracked: onRenderTracked, - onRenderTriggered: onRenderTriggered, - onErrorCaptured: onErrorCaptured, - onServerPrefetch: onServerPrefetch, - provide: provide, - inject: inject, - nextTick: nextTick, - defineComponent: defineComponent, - defineAsyncComponent: defineAsyncComponent, - useAttrs: useAttrs, - useSlots: useSlots, - defineProps: defineProps, - defineEmits: defineEmits, - defineExpose: defineExpose, - withDefaults: withDefaults, - mergeDefaults: mergeDefaults, - createPropsRestProxy: createPropsRestProxy, withAsyncContext: withAsyncContext, - getCurrentInstance: getCurrentInstance, - h: h, - createVNode: createVNode, - cloneVNode: cloneVNode, - mergeProps: mergeProps, - isVNode: isVNode, - Fragment: Fragment, - Text: Text, - Comment: Comment, - Static: Static, - Teleport: Teleport, - Suspense: Suspense, - KeepAlive: KeepAlive, - BaseTransition: BaseTransition, - withDirectives: withDirectives, - useSSRContext: useSSRContext, - ssrContextKey: ssrContextKey, - createRenderer: createRenderer, - createHydrationRenderer: createHydrationRenderer, - queuePostFlushCb: queuePostFlushCb, - warn: warn$1, - handleError: handleError, - callWithErrorHandling: callWithErrorHandling, - callWithAsyncErrorHandling: callWithAsyncErrorHandling, - resolveComponent: resolveComponent, - resolveDirective: resolveDirective, - resolveDynamicComponent: resolveDynamicComponent, - registerRuntimeCompiler: registerRuntimeCompiler, - isRuntimeOnly: isRuntimeOnly, - useTransitionState: useTransitionState, - resolveTransitionHooks: resolveTransitionHooks, - setTransitionHooks: setTransitionHooks, - getTransitionRawChildren: getTransitionRawChildren, - initCustomFormatter: initCustomFormatter, - get devtools () { return devtools; }, - setDevtoolsHook: setDevtoolsHook, withCtx: withCtx, - pushScopeId: pushScopeId, - popScopeId: popScopeId, - withScopeId: withScopeId, - renderList: renderList, - toHandlers: toHandlers, - renderSlot: renderSlot, - createSlots: createSlots, + withDefaults: withDefaults, + withDirectives: withDirectives, + withKeys: withKeys, withMemo: withMemo, - isMemoSame: isMemoSame, - openBlock: openBlock, - createBlock: createBlock, - setBlockTracking: setBlockTracking, - createTextVNode: createTextVNode, - createCommentVNode: createCommentVNode, - createStaticVNode: createStaticVNode, - createElementVNode: createBaseVNode, - createElementBlock: createElementBlock, - guardReactiveProps: guardReactiveProps, - toDisplayString: toDisplayString, - camelize: camelize, - capitalize: capitalize, - toHandlerKey: toHandlerKey, - normalizeProps: normalizeProps, - normalizeClass: normalizeClass, - normalizeStyle: normalizeStyle, - transformVNodeArgs: transformVNodeArgs, - version: version, - ssrUtils: ssrUtils, - resolveFilter: resolveFilter, - compatUtils: compatUtils + withModifiers: withModifiers, + withScopeId: withScopeId }); function initDev() { + { { - { - console.info(`You are running a development build of Vue.\n` + - `Make sure to use the production build (*.prod.js) when deploying for production.`); - } - initCustomFormatter(); + console.info( + `You are running a development build of Vue. +Make sure to use the production build (*.prod.js) when deploying for production.` + ); } + initCustomFormatter(); + } } -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) - ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '<!--' in comment.", - [17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */]: 'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).', - [18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */]: 'Unquoted attribute value cannot contain U+0022 ("), U+0027 (\'), U+003C (<), U+003D (=), and U+0060 (`).', - [19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */]: "Attribute name cannot start with '='.", - [21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */]: "'<?' is allowed only in XML context.", - [20 /* UNEXPECTED_NULL_CHARACTER */]: `Unexpected null character.`, - [22 /* UNEXPECTED_SOLIDUS_IN_TAG */]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23 /* X_INVALID_END_TAG */]: 'Invalid end tag.', - [24 /* X_MISSING_END_TAG */]: 'Element is missing end tag.', - [25 /* X_MISSING_INTERPOLATION_END */]: 'Interpolation end sign was not found.', - [27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */]: 'End bracket for dynamic directive argument was not found. ' + - 'Note that dynamic directive argument cannot contain spaces.', - [26 /* X_MISSING_DIRECTIVE_NAME */]: 'Legal directive name was expected.', - // transform errors - [28 /* X_V_IF_NO_EXPRESSION */]: `v-if/v-else-if is missing expression.`, - [29 /* X_V_IF_SAME_KEY */]: `v-if/else branches must use unique keys.`, - [30 /* X_V_ELSE_NO_ADJACENT_IF */]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31 /* X_V_FOR_NO_EXPRESSION */]: `v-for is missing expression.`, - [32 /* X_V_FOR_MALFORMED_EXPRESSION */]: `v-for has invalid expression.`, - [33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */]: `<template v-for> key should be placed on the <template> tag.`, - [34 /* X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`, - [35 /* X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`, - [36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`, - [37 /* X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` + - `When there are multiple named slots, all slots should use <template> ` + - `syntax to avoid scope ambiguity.`, - [38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `, - [39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */]: `Extraneous children found when component already has explicitly named ` + - `default slot. These children will be ignored.`, - [40 /* X_V_SLOT_MISPLACED */]: `v-slot can only be used on components or <template> tags.`, - [41 /* X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`, - [42 /* X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`, - [43 /* X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44 /* X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `, - [45 /* X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`, - // generic errors - [46 /* X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`, - [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [50 /* __EXTEND_POINT__ */]: `` -}; - const FRAGMENT = Symbol(`Fragment` ); const TELEPORT = Symbol(`Teleport` ); const SUSPENSE = Symbol(`Suspense` ); @@ -11164,7 +11308,9 @@ const CREATE_COMMENT = Symbol(`createCommentVNode` ); const CREATE_TEXT = Symbol(`createTextVNode` ); const CREATE_STATIC = Symbol(`createStaticVNode` ); const RESOLVE_COMPONENT = Symbol(`resolveComponent` ); -const RESOLVE_DYNAMIC_COMPONENT = Symbol(`resolveDynamicComponent` ); +const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` +); const RESOLVE_DIRECTIVE = Symbol(`resolveDirective` ); const RESOLVE_FILTER = Symbol(`resolveFilter` ); const WITH_DIRECTIVES = Symbol(`withDirectives` ); @@ -11189,4228 +11335,4774 @@ const UNREF = Symbol(`unref` ); const IS_REF = Symbol(`isRef` ); const WITH_MEMO = Symbol(`withMemo` ); const IS_MEMO_SAME = Symbol(`isMemoSame` ); -// Name mapping for runtime helpers that need to be imported from 'vue' in -// generated code. Make sure these are correctly exported in the runtime! -// Using `any` here because TS doesn't allow symbols as index type. const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` }; function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach(s => { - helperNameMap[s] = helpers[s]; - }); + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); } -// AST Utilities --------------------------------------------------------------- -// Some expressions, e.g. sequence and conditional expressions, are never -// associated with template nodes, so their source locations are just a stub. -// Container types like CompoundExpression also don't need a real location. const locStub = { - source: '', - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 } + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" }; -function createRoot(children, loc = locStub) { - return { - type: 0 /* ROOT */, - children, - helpers: [], - components: [], - directives: [], - hoists: [], - imports: [], - cached: 0, - temps: 0, - codegenNode: undefined, - loc - }; +function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: 0, + temps: 0, + codegenNode: void 0, + loc: locStub + }; } function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } - else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); } - return { - type: 13 /* VNODE_CALL */, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; } function createArrayExpression(elements, loc = locStub) { - return { - type: 17 /* JS_ARRAY_EXPRESSION */, - loc, - elements - }; + return { + type: 17, + loc, + elements + }; } function createObjectExpression(properties, loc = locStub) { - return { - type: 15 /* JS_OBJECT_EXPRESSION */, - loc, - properties - }; + return { + type: 15, + loc, + properties + }; } function createObjectProperty(key, value) { - return { - type: 16 /* JS_PROPERTY */, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; } -function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0 /* NOT_CONSTANT */) { - return { - type: 4 /* SIMPLE_EXPRESSION */, - loc, - content, - isStatic, - constType: isStatic ? 3 /* CAN_STRINGIFY */ : constType - }; +function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; } function createCompoundExpression(children, loc = locStub) { - return { - type: 8 /* COMPOUND_EXPRESSION */, - loc, - children - }; + return { + type: 8, + loc, + children + }; } function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee, - arguments: args - }; + return { + type: 14, + loc, + callee, + arguments: args + }; } -function createFunctionExpression(params, returns = undefined, newline = false, isSlot = false, loc = locStub) { - return { - type: 18 /* JS_FUNCTION_EXPRESSION */, - params, - returns, - newline, - isSlot, - loc - }; +function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; } function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19 /* JS_CONDITIONAL_EXPRESSION */, - test, - consequent, - alternate, - newline, - loc: locStub - }; + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; } function createCacheExpression(index, value, isVNode = false) { - return { - type: 20 /* JS_CACHE_EXPRESSION */, - index, - value, - isVNode, - loc: locStub - }; + return { + type: 20, + index, + value, + isVNode, + loc: locStub + }; } function createBlockStatement(body) { - return { - type: 21 /* JS_BLOCK_STATEMENT */, - body, - loc: locStub - }; + return { + type: 21, + body, + loc: locStub + }; +} +function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; +} +function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; +} +function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } } -const isStaticExp = (p) => p.type === 4 /* SIMPLE_EXPRESSION */ && p.isStatic; -const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected); +const defaultDelimitersOpen = new Uint8Array([123, 123]); +const defaultDelimitersClose = new Uint8Array([125, 125]); +function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; +} +function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; +} +function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); +} +function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; +} +const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea +}; +class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + const lower = c | 32; + if (lower === 116) { + this.state = 30; + } else { + this.state = lower === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + const lower = c | 32; + if (lower === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (lower === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + const lower = c | 32; + if (lower === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (lower === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } +} + +function defaultOnError(error) { + throw error; +} +function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); +} +function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; +} +const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [52]: `` +}; + +const isStaticExp = (p) => p.type === 4 && p.isStatic; function isCoreComponent(tag) { - if (isBuiltInType(tag, 'Teleport')) { - return TELEPORT; - } - else if (isBuiltInType(tag, 'Suspense')) { - return SUSPENSE; - } - else if (isBuiltInType(tag, 'KeepAlive')) { - return KEEP_ALIVE; - } - else if (isBuiltInType(tag, 'BaseTransition')) { - return BASE_TRANSITION; - } + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } } const nonIdentifierRE = /^\d|[^\$\w]/; const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; -/** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ const isMemberExpressionBrowser = (path) => { - // remove whitespaces around . or [ first - path = path.trim().replace(whitespaceRE, s => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === '[') { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } - else if (char === '(') { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } - else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `[`) { - currentOpenBracketCount++; - } - else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `(`) { - currentOpenParensCount++; - } - else if (char === `)`) { - // if the exp ends as a call then it should not be considered valid - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; + path = path.trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; } - return !currentOpenBracketCount && !currentOpenParensCount; + } + return !currentOpenBracketCount && !currentOpenParensCount; }; -const isMemberExpression = isMemberExpressionBrowser - ; -function getInnerRange(loc, offset, length) { - const source = loc.source.slice(offset, offset + length); - const newLoc = { - source, - start: advancePositionWithClone(loc.start, loc.source, offset), - end: loc.end - }; - if (length != null) { - newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length); - } - return newLoc; -} -function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation(extend({}, pos), source, numberOfCharacters); -} -// advance by mutation without cloning (for performance reasons), since this -// gets called a lot in the parser -function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10 /* newline char code */) { - linesCount++; - lastNewLinePos = i; - } - } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = - lastNewLinePos === -1 - ? pos.column + numberOfCharacters - : numberOfCharacters - lastNewLinePos; - return pos; -} +const isMemberExpression = isMemberExpressionBrowser ; function assert(condition, msg) { - /* istanbul ignore if */ - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } } function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (allowEmpty || p.exp) && - (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; } + } } function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (dynamicOnly) - continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } - else if (p.name === 'bind' && - (p.exp || allowEmpty) && - isStaticArgOf(p.arg, name)) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) + continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; } + } } function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); + return !!(arg && isStaticExp(arg) && arg.content === name); } function hasDynamicKeyVBind(node) { - return node.props.some(p => p.type === 7 /* DIRECTIVE */ && - p.name === 'bind' && - (!p.arg || // v-bind="obj" - p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo] - !p.arg.isStatic) // v-bind:[foo] - ); + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); } -function isText(node) { - return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */; +function isText$1(node) { + return node.type === 5 || node.type === 2; } function isVSlot(p) { - return p.type === 7 /* DIRECTIVE */ && p.name === 'slot'; + return p.type === 7 && p.name === "slot"; } function isTemplateNode(node) { - return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */); + return node.type === 1 && node.tagType === 3; } function isSlotOutlet(node) { - return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */; + return node.type === 1 && node.tagType === 2; } -function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; -} -function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; -} -const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); +const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); function getUnnormalizedProps(props, callPath = []) { - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps(props.arguments[0], callPath.concat(props)); - } + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); } - return [props, callPath]; + } + return [props, callPath]; } function injectProp(node, prop, context) { - let propsWithInjection; - /** - * 1. mergeProps(...) - * 2. toHandlers(...) - * 3. normalizeProps(...) - * 4. normalizeProps(guardReactiveProps(...)) - * - * we need to get the real props before normalization - */ - let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } - else if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // merged props... add ours - // only inject key to object literal if it's the first argument so that - // if doesn't override user provided keys - const first = props.arguments[0]; - if (!isString(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) { - first.properties.unshift(prop); - } - else { - if (props.callee === TO_HANDLERS) { - // #2366 - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } - else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } - else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) { - let alreadyExists = false; - // check existing key to avoid overriding user provided keys - if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) { - const propKeyName = prop.key.content; - alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === propKeyName); - } - if (!alreadyExists) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } - else { - // single v-bind with expression, return a merged replacement + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props + createObjectExpression([prop]), + props ]); - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`, - // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`, - // the `guardReactiveProps` will no longer be needed - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } + } else { + props.arguments.unshift(createObjectExpression([prop])); + } } - if (node.type === 13 /* VNODE_CALL */) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.props = propsWithInjection; - } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); } - else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.arguments[2] = propsWithInjection; - } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } +} +function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; } function toValidAssetId(name, type) { - // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString(); - })}`; + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; } function getMemoedVNodeCall(node) { - if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } - else { - return node; - } -} -function makeBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } } +const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -const deprecationData = { - ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: { - message: `Platform-native elements with "is" prop will no longer be ` + - `treated as components in Vue 3 unless the "is" value is explicitly ` + - `prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: { - message: key => `.sync modifier for v-bind has been removed. Use v-model with ` + - `argument instead. \`v-bind:${key}.sync\` should be changed to ` + - `\`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: { - message: `.prop modifier for v-bind has been removed and no longer necessary. ` + - `Vue 3 will automatically set a binding as DOM property when appropriate.` - }, - ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` + - `object spread: it will now overwrite an existing non-mergeable attribute ` + - `that appears before v-bind in the case of conflict. ` + - `To retain 2.x behavior, move v-bind to make it the first attribute. ` + - `You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: { - message: `v-if / v-for precedence when used on the same element has changed ` + - `in Vue 3: v-if now takes higher precedence and will no longer have ` + - `access to v-for scope variables. It is best to avoid the ambiguity ` + - `with <template> tags or use a computed property that filters v-for ` + - `data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: { - message: `<template> with no special directives will render as a native template ` + - `element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTER" /* COMPILER_FILTERS */]: { - message: `filters have been removed in Vue 3. ` + - `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` + - `Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } -}; -function getCompatValue(key, context) { - const config = context.options - ? context.options.compatConfig - : context.compatConfig; - const value = config && config[key]; - if (key === 'MODE') { - return value || 3; // compiler defaults to v3 behavior - } - else { - return value; - } -} -function isCompatEnabled(key, context) { - const mode = getCompatValue('MODE', context); - const value = getCompatValue(key, context); - // in v3 mode, only enable if explicitly set to true - // otherwise enable for any non-false value - return mode === 3 ? value === true : value !== false; -} -function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; -} -function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === 'suppress-warning') { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) - err.loc = loc; - context.onWarn(err); -} - -// The default decoder only provides escapes for characters reserved as part of -// the template syntax, and is only used if the custom renderer did not provide -// a platform-specific decoder. -const decodeRE = /&(gt|lt|amp|apos|quot);/g; -const decodeMap = { - gt: '>', - lt: '<', - amp: '&', - apos: "'", - quot: '"' -}; const defaultParserOptions = { - delimiters: [`{{`, `}}`], - getNamespace: () => 0 /* HTML */, - getTextMode: () => 0 /* DATA */, - isVoidTag: NO, - isPreTag: NO, - isCustomElement: NO, - decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]), - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false }; -function baseParse(content, options = {}) { - const context = createParserContext(content, options); - const start = getCursor(context); - return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start)); -} -function createParserContext(content, rawOptions) { - const options = extend({}, defaultParserOptions); - let key; - for (key in rawOptions) { - // @ts-ignore - options[key] = - rawOptions[key] === undefined - ? defaultParserOptions[key] - : rawOptions[key]; +let currentOptions = defaultParserOptions; +let currentRoot = null; +let currentInput = ""; +let currentOpenTag = null; +let currentProp = null; +let currentAttrValue = ""; +let currentAttrStartIndex = -1; +let currentAttrEndIndex = -1; +let inPre = 0; +let inVPre = false; +let currentVPreBoundary = null; +const stack = []; +const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); } - return { - options, - column: 1, - line: 1, - offset: 0, - originalSource: content, - source: content, - inPre: false, - inVPre: false, - onWarn: options.onWarn + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 }; -} -function parseChildren(context, mode, ancestors) { - const parent = last(ancestors); - const ns = parent ? parent.ns : 0 /* HTML */; - const nodes = []; - while (!isEnd(context, mode, ancestors)) { - const s = context.source; - let node = undefined; - if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) { - if (!context.inVPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode); - } - else if (mode === 0 /* DATA */ && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1); - } - else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '<!--')) { - node = parseComment(context); - } - else if (startsWith(s, '<!DOCTYPE')) { - // Ignore DOCTYPE by a limitation. - node = parseBogusComment(context); - } - else if (startsWith(s, '<![CDATA[')) { - if (ns !== 0 /* HTML */) { - node = parseCDATA(context, ancestors); - } - else { - emitError(context, 1 /* CDATA_IN_HTML_CONTENT */); - node = parseBogusComment(context); - } - } - else { - emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */); - node = parseBogusComment(context); - } - } - else if (s[1] === '/') { - // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state - if (s.length === 2) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2); - } - else if (s[2] === '>') { - emitError(context, 14 /* MISSING_END_TAG_NAME */, 2); - advanceBy(context, 3); - continue; - } - else if (/[a-z]/i.test(s[2])) { - emitError(context, 23 /* X_INVALID_END_TAG */); - parseTag(context, 1 /* End */, parent); - continue; - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2); - node = parseBogusComment(context); - } - } - else if (/[a-z]/i.test(s[1])) { - node = parseElement(context, ancestors); - } - else if (s[1] === '?') { - emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1); - node = parseBogusComment(context); - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1); - } - } - } - if (!node) { - node = parseText(context, mode); - } - if (isArray(node)) { - for (let i = 0; i < node.length; i++) { - pushNode(nodes, node[i]); - } - } - else { - pushNode(nodes, node); + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } } - // Whitespace handling strategy like v2 - let removedWhitespace = false; - if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) { - const shouldCondense = context.options.whitespace !== 'preserve'; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!context.inPre && node.type === 2 /* TEXT */) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1]; - const next = nodes[i + 1]; - // Remove if: - // - the whitespace is the first or last node, or: - // - (condense mode) the whitespace is adjacent to a comment, or: - // - (condense mode) the whitespace is between two elements AND contains newline - if (!prev || - !next || - (shouldCondense && - (prev.type === 3 /* COMMENT */ || - next.type === 3 /* COMMENT */ || - (prev.type === 1 /* ELEMENT */ && - next.type === 1 /* ELEMENT */ && - /[\r\n]/.test(node.content))))) { - removedWhitespace = true; - nodes[i] = null; - } - else { - // Otherwise, the whitespace is condensed into a single space - node.content = ' '; - } - } - else if (shouldCondense) { - // in condense mode, consecutive whitespaces in text are condensed - // down to a single space. - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' '); - } - } - // Remove comment nodes if desired by configuration. - else if (node.type === 3 /* COMMENT */ && !context.options.comments) { - removedWhitespace = true; - nodes[i] = null; - } - } - if (context.inPre && parent && context.options.isPreTag(parent.tag)) { - // remove leading newline per html spec - // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element - const first = nodes[0]; - if (first && first.type === 2 /* TEXT */) { - first.content = first.content.replace(/^\r?\n/, ''); - } - } + }, + onselfclosingtag(end) { + var _a; + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (((_a = stack[0]) == null ? void 0 : _a.tag) === name) { + onCloseTag(stack.shift(), end); } - return removedWhitespace ? nodes.filter(Boolean) : nodes; -} -function pushNode(nodes, node) { - if (node.type === 2 /* TEXT */) { - const prev = last(nodes); - // Merge if both this and the previous node are text and those are - // consecutive. This happens for cases like "a < b". - if (prev && - prev.type === 2 /* TEXT */ && - prev.loc.end.offset === node.loc.start.offset) { - prev.content += node.content; - prev.loc.end = node.loc.end; - prev.loc.source += node.loc.source; - return; - } - } - nodes.push(node); -} -function parseCDATA(context, ancestors) { - advanceBy(context, 9); - const nodes = parseChildren(context, 3 /* CDATA */, ancestors); - if (context.source.length === 0) { - emitError(context, 6 /* EOF_IN_CDATA */); - } - else { - advanceBy(context, 3); - } - return nodes; -} -function parseComment(context) { - const start = getCursor(context); - let content; - // Regular comment. - const match = /--(\!)?>/.exec(context.source); - if (!match) { - content = context.source.slice(4); - advanceBy(context, context.source.length); - emitError(context, 7 /* EOF_IN_COMMENT */); - } - else { - if (match.index <= 3) { - emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */); - } - if (match[1]) { - emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */); - } - content = context.source.slice(4, match.index); - // Advancing with reporting nested comments. - const s = context.source.slice(0, match.index); - let prevIndex = 1, nestedIndex = 0; - while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) { - advanceBy(context, nestedIndex - prevIndex + 1); - if (nestedIndex + 4 < s.length) { - emitError(context, 16 /* NESTED_COMMENT */); - } - prevIndex = nestedIndex + 1; - } - advanceBy(context, match.index + match[0].length - prevIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) }; -} -function parseBogusComment(context) { - const start = getCursor(context); - const contentStart = context.source[1] === '?' ? 1 : 2; - let content; - const closeIndex = context.source.indexOf('>'); - if (closeIndex === -1) { - content = context.source.slice(contentStart); - advanceBy(context, context.source.length); + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); } - else { - content = context.source.slice(contentStart, closeIndex); - advanceBy(context, closeIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) - }; -} -function parseElement(context, ancestors) { - // Start tag. - const wasInPre = context.inPre; - const wasInVPre = context.inVPre; - const parent = last(ancestors); - const element = parseTag(context, 0 /* Start */, parent); - const isPreBoundary = context.inPre && !wasInPre; - const isVPreBoundary = context.inVPre && !wasInVPre; - if (element.isSelfClosing || context.options.isVoidTag(element.tag)) { - // #4030 self-closing <pre> tag - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - // Children. - ancestors.push(element); - const mode = context.options.getTextMode(element, parent); - const children = parseChildren(context, mode, ancestors); - ancestors.pop(); - element.children = children; - // End tag. - if (startsWithEndTagOpen(context.source, element.tag)) { - parseTag(context, 1 /* End */, parent); - } - else { - emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start); - if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { - const first = children[0]; - if (first && startsWith(first.loc.source, '<!--')) { - emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */); - } - } - } - element.loc = getSelection(context, element.loc.start); - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; -} -const isSpecialTemplateDirective = /*#__PURE__*/ makeMap(`if,else,else-if,for,slot`); -function parseTag(context, type, parent) { - // Tag open. - const start = getCursor(context); - const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source); - const tag = match[1]; - const ns = context.options.getNamespace(tag, parent); - advanceBy(context, match[0].length); - advanceSpaces(context); - // save current state in case we need to re-parse attributes with v-pre - const cursor = getCursor(context); - const currentSource = context.source; - // check <pre> tag - if (context.options.isPreTag(tag)) { - context.inPre = true; - } - // Attributes. - let props = parseAttributes(context, type); - // check v-pre - if (type === 0 /* Start */ && - !context.inVPre && - props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) { - context.inVPre = true; - // reset context - extend(context, cursor); - context.source = currentSource; - // re-parse attrs and filter out v-pre itself - props = parseAttributes(context, type).filter(p => p.name !== 'v-pre'); - } - // Tag close. - let isSelfClosing = false; - if (context.source.length === 0) { - emitError(context, 9 /* EOF_IN_TAG */); - } - else { - isSelfClosing = startsWith(context.source, '/>'); - if (type === 1 /* End */ && isSelfClosing) { - emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */); - } - advanceBy(context, isSelfClosing ? 2 : 1); - } - if (type === 1 /* End */) { - return; - } - let tagType = 0 /* ELEMENT */; - if (!context.inVPre) { - if (tag === 'slot') { - tagType = 2 /* SLOT */; - } - else if (tag === 'template') { - if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) { - tagType = 3 /* TEMPLATE */; - } - } - else if (isComponent(tag, props, context)) { - tagType = 1 /* COMPONENT */; - } - } - return { - type: 1 /* ELEMENT */, - ns, - tag, - tagType, - props, - isSelfClosing, - children: [], - loc: getSelection(context, start), - codegenNode: undefined // to be created during transform phase - }; -} -function isComponent(tag, props, context) { - const options = context.options; - if (options.isCustomElement(tag)) { - return false; - } - if (tag === 'component' || - /^[A-Z]/.test(tag) || - isCoreComponent(tag) || - (options.isBuiltInComponent && options.isBuiltInComponent(tag)) || - (options.isNativeTag && !options.isNativeTag(tag))) { - return true; - } - // at this point the tag should be a native tag, but check for potential "is" - // casting - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.name === 'is' && p.value) { - if (p.value.content.startsWith('vue:')) { - return true; - } - } - } - else { - // directive - // v-is (TODO Deprecate) - if (p.name === 'is') { - return true; - } - else if ( - // :is on plain element - only treat as component in compat mode - p.name === 'bind' && - isStaticArgOf(p.arg, 'is') && - false && - checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } -} -function parseAttributes(context, type) { - const props = []; - const attributeNames = new Set(); - while (context.source.length > 0 && - !startsWith(context.source, '>') && - !startsWith(context.source, '/>')) { - if (startsWith(context.source, '/')) { - emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */); - advanceBy(context, 1); - advanceSpaces(context); - continue; - } - if (type === 1 /* End */) { - emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */); - } - const attr = parseAttribute(context, attributeNames); - // Trim whitespace between class - // https://github.com/vuejs/core/issues/4251 - if (attr.type === 6 /* ATTRIBUTE */ && - attr.value && - attr.name === 'class') { - attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim(); - } - if (type === 0 /* Start */) { - props.push(attr); - } - if (/^[^\t\r\n\f />]/.test(context.source)) { - emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */); - } - advanceSpaces(context); - } - return props; -} -function parseAttribute(context, nameSet) { - // Name. - const start = getCursor(context); - const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source); - const name = match[0]; - if (nameSet.has(name)) { - emitError(context, 2 /* DUPLICATE_ATTRIBUTE */); - } - nameSet.add(name); - if (name[0] === '=') { - emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */); - } - { - const pattern = /["'<]/g; - let m; - while ((m = pattern.exec(name))) { - emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index); - } - } - advanceBy(context, name.length); - // Value - let value = undefined; - if (/^[\t\r\n\f ]*=/.test(context.source)) { - advanceSpaces(context); - advanceBy(context, 1); - advanceSpaces(context); - value = parseAttributeValue(context); - if (!value) { - emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */); - } - } - const loc = getSelection(context, start); - if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) { - const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name); - let isPropShorthand = startsWith(name, '.'); - let dirName = match[1] || - (isPropShorthand || startsWith(name, ':') - ? 'bind' - : startsWith(name, '@') - ? 'on' - : 'slot'); - let arg; - if (match[2]) { - const isSlot = dirName === 'slot'; - const startOffset = name.lastIndexOf(match[2]); - const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length)); - let content = match[2]; - let isStatic = true; - if (content.startsWith('[')) { - isStatic = false; - if (!content.endsWith(']')) { - emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */); - content = content.slice(1); - } - else { - content = content.slice(1, content.length - 1); - } - } - else if (isSlot) { - // #1241 special case for v-slot: vuetify relies extensively on slot - // names containing dots. v-slot doesn't have any modifiers and Vue 2.x - // supports such usage so we are keeping it consistent with 2.x. - content += match[3] || ''; - } - arg = { - type: 4 /* SIMPLE_EXPRESSION */, - content, - isStatic, - constType: isStatic - ? 3 /* CAN_STRINGIFY */ - : 0 /* NOT_CONSTANT */, - loc - }; - } - if (value && value.isQuoted) { - const valueLoc = value.loc; - valueLoc.start.offset++; - valueLoc.start.column++; - valueLoc.end = advancePositionWithClone(valueLoc.start, value.content); - valueLoc.source = valueLoc.source.slice(1, -1); - } - const modifiers = match[3] ? match[3].slice(1).split('.') : []; - if (isPropShorthand) - modifiers.push('prop'); - return { - type: 7 /* DIRECTIVE */, - name: dirName, - exp: value && { - type: 4 /* SIMPLE_EXPRESSION */, - content: value.content, - isStatic: false, - // Treat as non-constant by default. This can be potentially set to - // other values by `transformExpression` to make it eligible for hoisting. - constType: 0 /* NOT_CONSTANT */, - loc: value.loc - }, - arg, - modifiers, - loc - }; - } - // missing directive name or illegal directive name - if (!context.inVPre && startsWith(name, 'v-')) { - emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */); - } - return { - type: 6 /* ATTRIBUTE */, + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, name, - value: value && { - type: 2 /* TEXT */, - content: value.content, - loc: value.loc - }, - loc + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? ["prop"] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) + return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + currentProp.modifiers.push(mod); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } +}); +const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; +const stripParensRE = /^\(|\)$/g; +function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) + return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; +} +function getSlice(start, end) { + return currentInput.slice(start, end); +} +function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; +} +function onText(content, start, end) { + var _a; + { + const tag = (_a = stack[0]) == null ? void 0 : _a.tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if ((lastNode == null ? void 0 : lastNode.type) === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } +} +function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, end + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(el.children, el.tag); + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } +} +function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) + i--; + return i; +} +const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); +function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; +} +function isComponent({ tag, props }) { + var _a; + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || ((_a = currentOptions.isBuiltInComponent) == null ? void 0 : _a.call(currentOptions, tag)) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } + } + } + } + return false; +} +function isUpperCase(c) { + return c > 64 && c < 91; +} +const windowsNewlineRE = /\r\n/g; +function condenseWhitespace(nodes, tag) { + var _a, _b; + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = (_a = nodes[i - 1]) == null ? void 0 : _a.type; + const next = (_b = nodes[i + 1]) == null ? void 0 : _b.type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + if (inPre && tag && currentOptions.isPreTag(tag)) { + const first = nodes[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; +} +function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; +} +function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; +} +function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; +} +function addNode(node) { + (stack[0] || currentRoot).children.push(node); +} +function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; +} +function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); +} +function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc }; + } + return attr; } -function parseAttributeValue(context) { - const start = getCursor(context); - let content; - const quote = context.source[0]; - const isQuoted = quote === `"` || quote === `'`; - if (isQuoted) { - // Quoted value. - advanceBy(context, 1); - const endIndex = context.source.indexOf(quote); - if (endIndex === -1) { - content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */); - } - else { - content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */); - advanceBy(context, 1); - } +function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; +} +function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); +} +function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; +} +function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } } - else { - // Unquoted - const match = /^[^\t\r\n\f >]+/.exec(context.source); - if (!match) { - return undefined; - } - const unexpectedChars = /["'<=`]/g; - let m; - while ((m = unexpectedChars.exec(match[0]))) { - emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index); - } - content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */); + } + { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); } - return { content, isQuoted, loc: getSelection(context, start) }; -} -function parseInterpolation(context, mode) { - const [open, close] = context.options.delimiters; - const closeIndex = context.source.indexOf(close, open.length); - if (closeIndex === -1) { - emitError(context, 25 /* X_MISSING_INTERPOLATION_END */); - return undefined; - } - const start = getCursor(context); - advanceBy(context, open.length); - const innerStart = getCursor(context); - const innerEnd = getCursor(context); - const rawContentLength = closeIndex - open.length; - const rawContent = context.source.slice(0, rawContentLength); - const preTrimContent = parseTextData(context, rawContentLength, mode); - const content = preTrimContent.trim(); - const startOffset = preTrimContent.indexOf(content); - if (startOffset > 0) { - advancePositionWithMutation(innerStart, rawContent, startOffset); - } - const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset); - advancePositionWithMutation(innerEnd, rawContent, endOffset); - advanceBy(context, close.length); - return { - type: 5 /* INTERPOLATION */, - content: { - type: 4 /* SIMPLE_EXPRESSION */, - isStatic: false, - // Set `isConstant` to false by default and will decide in transformExpression - constType: 0 /* NOT_CONSTANT */, - content, - loc: getSelection(context, innerStart, innerEnd) - }, - loc: getSelection(context, start) - }; -} -function parseText(context, mode) { - const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]]; - let endIndex = context.source.length; - for (let i = 0; i < endTokens.length; i++) { - const index = context.source.indexOf(endTokens[i], 1); - if (index !== -1 && endIndex > index) { - endIndex = index; - } - } - const start = getCursor(context); - const content = parseTextData(context, endIndex, mode); - return { - type: 2 /* TEXT */, - content, - loc: getSelection(context, start) - }; -} -/** - * Get text data with a given length from the current location. - * This translates HTML entities in the text data. - */ -function parseTextData(context, length, mode) { - const rawText = context.source.slice(0, length); - advanceBy(context, length); - if (mode === 2 /* RAWTEXT */ || - mode === 3 /* CDATA */ || - !rawText.includes('&')) { - return rawText; - } - else { - // DATA or RCDATA containing "&"". Entity decoding required. - return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */); - } -} -function getCursor(context) { - const { column, line, offset } = context; - return { column, line, offset }; -} -function getSelection(context, start, end) { - end = end || getCursor(context); - return { - start, - end, - source: context.originalSource.slice(start.offset, end.offset) - }; -} -function last(xs) { - return xs[xs.length - 1]; -} -function startsWith(source, searchString) { - return source.startsWith(searchString); -} -function advanceBy(context, numberOfCharacters) { - const { source } = context; - advancePositionWithMutation(context, source, numberOfCharacters); - context.source = source.slice(numberOfCharacters); -} -function advanceSpaces(context) { - const match = /^[\t\r\n\f ]+/.exec(context.source); - if (match) { - advanceBy(context, match[0].length); - } -} -function getNewPosition(context, start, numberOfCharacters) { - return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters); -} -function emitError(context, code, offset, loc = getCursor(context)) { - if (offset) { - loc.offset += offset; - loc.column += offset; - } - context.options.onError(createCompilerError(code, { - start: loc, - end: loc, - source: '' - })); -} -function isEnd(context, mode, ancestors) { - const s = context.source; - switch (mode) { - case 0 /* DATA */: - if (startsWith(s, '</')) { - // TODO: probably bad performance - for (let i = ancestors.length - 1; i >= 0; --i) { - if (startsWithEndTagOpen(s, ancestors[i].tag)) { - return true; - } - } - } - break; - case 1 /* RCDATA */: - case 2 /* RAWTEXT */: { - const parent = last(ancestors); - if (parent && startsWithEndTagOpen(s, parent.tag)) { - return true; - } - break; - } - case 3 /* CDATA */: - if (startsWith(s, ']]>')) { - return true; - } - break; - } - return !s; -} -function startsWithEndTagOpen(source, tag) { - return (startsWith(source, '</') && - source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && - /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')); + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options == null ? void 0 : options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; } function hoistStatic(root, context) { - walk(root, context, + walk( + root, + context, // Root node is unfortunately non-hoistable due to potential parent // fallthrough attributes. - isSingleElementRoot(root, root.children[0])); + isSingleElementRoot(root, root.children[0]) + ); } function isSingleElementRoot(root, child) { - const { children } = root; - return (children.length === 1 && - child.type === 1 /* ELEMENT */ && - !isSlotOutlet(child)); + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); } function walk(node, context, doNotHoistNode = false) { - const { children } = node; - const originalCount = children.length; - let hoistedCount = 0; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - // only plain elements & text calls are eligible for hoisting. - if (child.type === 1 /* ELEMENT */ && - child.tagType === 0 /* ELEMENT */) { - const constantType = doNotHoistNode - ? 0 /* NOT_CONSTANT */ - : getConstantType(child, context); - if (constantType > 0 /* NOT_CONSTANT */) { - if (constantType >= 2 /* CAN_HOIST */) { - child.codegenNode.patchFlag = - -1 /* HOISTED */ + (` /* HOISTED */` ); - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - continue; - } - } - else { - // node may contain dynamic children, but its props may be eligible for - // hoisting. - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - const flag = getPatchFlag(codegenNode); - if ((!flag || - flag === 512 /* NEED_PATCH */ || - flag === 1 /* TEXT */) && - getGeneratedPropsConstantType(child, context) >= - 2 /* CAN_HOIST */) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } + const { children } = node; + const originalCount = children.length; + let hoistedCount = 0; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1 + (` /* HOISTED */` ); + child.codegenNode = context.hoist(child.codegenNode); + hoistedCount++; + continue; } - else if (child.type === 12 /* TEXT_CALL */ && - getConstantType(child.content, context) >= 2 /* CAN_HOIST */) { - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - } - // walk further - if (child.type === 1 /* ELEMENT */) { - const isComponent = child.tagType === 1 /* COMPONENT */; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, context); - if (isComponent) { - context.scopes.vSlot--; - } - } - else if (child.type === 11 /* FOR */) { - // Do not hoist v-for single child because it has to be a block - walk(child, context, child.children.length === 1); - } - else if (child.type === 9 /* IF */) { - for (let i = 0; i < child.branches.length; i++) { - // Do not hoist v-if single child because it has to be a block - walk(child.branches[i], context, child.branches[i].children.length === 1); + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = getPatchFlag(codegenNode); + if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } } + } } - if (hoistedCount && context.transformHoist) { - context.transformHoist(children, context, node); + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, context); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, context, child.children.length === 1); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + context, + child.branches[i2].children.length === 1 + ); + } } - // all children were hoisted - the entire children array is hoistable. - if (hoistedCount && - hoistedCount === originalCount && - node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - node.codegenNode && - node.codegenNode.type === 13 /* VNODE_CALL */ && - isArray(node.codegenNode.children)) { - node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children)); + } + if (hoistedCount && context.transformHoist) { + context.transformHoist(children, context, node); + } + if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + const hoisted = context.hoist( + createArrayExpression(node.codegenNode.children) + ); + if (context.hmr) { + hoisted.content = `[...${hoisted.content}]`; } + node.codegenNode.children = hoisted; + } } function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1 /* ELEMENT */: - if (node.tagType !== 0 /* ELEMENT */) { - return 0 /* NOT_CONSTANT */; + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") { + return 0; + } + const flag = getPatchFlag(codegenNode); + if (!flag) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } } - const cached = constantCache.get(node); - if (cached !== undefined) { - return cached; + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13 /* VNODE_CALL */) { - return 0 /* NOT_CONSTANT */; - } - if (codegenNode.isBlock && - node.tag !== 'svg' && - node.tag !== 'foreignObject') { - return 0 /* NOT_CONSTANT */; - } - const flag = getPatchFlag(codegenNode); - if (!flag) { - let returnType = 3 /* CAN_STRINGIFY */; - // Element itself has no patch flag. However we still need to check: - // 1. Even for a node with no patch flag, it is possible for it to contain - // non-hoistable expressions that refers to scope variables, e.g. compiler - // injected keys or cached event handlers. Therefore we need to always - // check the codegenNode's props to be sure. - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (generatedPropsType < returnType) { - returnType = generatedPropsType; - } - // 2. its children. - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (childType < returnType) { - returnType = childType; - } - } - // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0 - // type, check if any of the props can cause the type to be lowered - // we can skip can_patch because it's guaranteed by the absence of a - // patchFlag. - if (returnType > 1 /* CAN_SKIP_PATCH */) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (expType < returnType) { - returnType = expType; - } - } - } - } - // only svg/foreignObject could be block here, however if they are - // static then they don't need to be blocks since there will be no - // nested updates. - if (codegenNode.isBlock) { - // except set custom directives. - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType); - return returnType; - } - else { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - case 2 /* TEXT */: - case 3 /* COMMENT */: - return 3 /* CAN_STRINGIFY */; - case 9 /* IF */: - case 11 /* FOR */: - case 10 /* IF_BRANCH */: - return 0 /* NOT_CONSTANT */; - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return getConstantType(node.content, context); - case 4 /* SIMPLE_EXPRESSION */: - return node.constType; - case 8 /* COMPOUND_EXPRESSION */: - let returnType = 3 /* CAN_STRINGIFY */; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0 /* NOT_CONSTANT */) { - return 0 /* NOT_CONSTANT */; - } - else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - default: - return 0 /* NOT_CONSTANT */; - } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + default: + return 0; + } } -const allowHoistedHelperSet = new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS +const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS ]); function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 /* JS_CALL_EXPRESSION */ && - !isString(value.callee) && - allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - return getConstantType(arg, context); - } - else if (arg.type === 14 /* JS_CALL_EXPRESSION */) { - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))` - return getConstantTypeOfHelperCall(arg, context); - } + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); } - return 0 /* NOT_CONSTANT */; + } + return 0; } function getGeneratedPropsConstantType(node, context) { - let returnType = 3 /* CAN_STRINGIFY */; - const props = getNodeProps(node); - if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0 /* NOT_CONSTANT */) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4 /* SIMPLE_EXPRESSION */) { - valueType = getConstantType(value, context); - } - else if (value.type === 14 /* JS_CALL_EXPRESSION */) { - // some helper calls can be hoisted, - // such as the `normalizeProps` generated by the compiler for pre-normalize class, - // in this case we need to respect the ConstantType of the helper's arguments - valueType = getConstantTypeOfHelperCall(value, context); - } - else { - valueType = 0 /* NOT_CONSTANT */; - } - if (valueType === 0 /* NOT_CONSTANT */) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } } - return returnType; + } + return returnType; } function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - return codegenNode.props; - } + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } } function getPatchFlag(node) { - const flag = node.patchFlag; - return flag ? parseInt(flag, 10) : undefined; + const flag = node.patchFlag; + return flag ? parseInt(flag, 10) : void 0; } -function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) { - const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/); - const context = { - // options - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: new Map(), - components: new Set(), - directives: new Set(), - hoists: [], - imports: [], - constantCache: new Map(), - temps: 0, - cached: 0, - identifiers: Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } - else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - /* istanbul ignore if */ - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node - ? list.indexOf(node) - : context.currentNode - ? context.childIndex - : -1; - /* istanbul ignore if */ - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - // current node removed - context.currentNode = null; - context.onNodeRemoved(); - } - else { - // sibling node removed - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: () => { }, - addIdentifiers(exp) { - }, - removeIdentifiers(exp) { - }, - hoist(exp) { - if (isString(exp)) - exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false) { - return createCacheExpression(context.cached++, exp, isVNode); +function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic: hoistStatic2 = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig +}) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic: hoistStatic2, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + cached: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); } - }; - return context; + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) + exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false) { + return createCacheExpression(context.cached++, exp, isVNode); + } + }; + return context; } function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - hoistStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - // finalize meta information - root.helpers = [...context.helpers.keys()]; - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + hoistStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; } function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - // if the single child is an element, turn it into a block. - if (isSingleElementRoot(root, child) && child.codegenNode) { - // single element root is never hoisted so codegenNode will never be - // SimpleExpressionNode - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - makeBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } - else { - // - single <slot/>, IfNode, ForNode: already blocks. - // - single text node: always patched. - // root codegen falls through via genNode() - root.codegenNode = child; - } + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; } - else if (children.length > 1) { - // root has multiple nodes - return a fragment block. - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, undefined, false /* isComponent */); + } else if (children.length > 1) { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; } - else ; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else ; } function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) - continue; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) + continue; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } } function traverseNode(node, context) { - context.currentNode = node; - // apply transform plugins - const { nodeTransforms } = context; - const exitFns = []; - for (let i = 0; i < nodeTransforms.length; i++) { - const onExit = nodeTransforms[i](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } - else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - // node was removed - return; - } - else { - // node may have been replaced - node = context.currentNode; - } + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } } - switch (node.type) { - case 3 /* COMMENT */: - if (!context.ssr) { - // inject import for the Comment symbol, which is needed for creating - // comment nodes with `createVNode` - context.helper(CREATE_COMMENT); - } - break; - case 5 /* INTERPOLATION */: - // no need to traverse, but we need to inject toString helper - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9 /* IF */: - for (let i = 0; i < node.branches.length; i++) { - traverseNode(node.branches[i], context); - } - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - case 1 /* ELEMENT */: - case 0 /* ROOT */: - traverseChildren(node, context); - break; - } - // exit transforms - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); + if (!context.currentNode) { + return; + } else { + node = context.currentNode; } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } } function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) - ? (n) => n === name - : (n) => name.test(n); - return (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const { props } = node; - // structural directive transforms are not concerned with slots - // as they are handled separately in vSlot.ts - if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) { - // structural directives are removed to avoid infinite recursion - // also we remove them *before* applying so that it can further - // traverse itself in case it moves the node around - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) - exitFns.push(onExit); - } - } - return exitFns; + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) + exitFns.push(onExit); } - }; + } + return exitFns; + } + }; } const PURE_ANNOTATION = `/*#__PURE__*/`; const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; -function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.loc.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: undefined, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, node) { - context.code += code; - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } - else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push('\n' + ` `.repeat(n)); +function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false +}) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); } - return context; + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; } function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) - options.onContextCreated(context); - const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context; - const hasHelpers = ast.helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== 'module'; - // preambles - // in setup() inline mode, the preamble is generated in a sub context - // and returned separately. - const preambleContext = context; - { - genFunctionPreamble(ast, preambleContext); - } - // enter render function - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache']; - const signature = args.join(', '); - { - push(`function ${functionName}(${signature}) {`); - } + const context = createCodegenContext(ast, options); + if (options.onContextCreated) + options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const isSetupInlined = false; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - // function mode const declarations should be inside with block - // also they should be renamed to avoid collision with user properties - if (hasHelpers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`); - push(`\n`); - newline(); - } + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); } - // generate asset resolution statements - if (ast.components.length) { - genAssets(ast.components, 'component', context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, 'directive', context); - if (ast.temps > 0) { - newline(); - } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } + newline(); } - if (ast.components.length || ast.directives.length || ast.temps) { - push(`\n`); - newline(); - } - // generate the VNode tree expression - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } - else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { deindent(); push(`}`); - return { - ast, - code: context.code, - preamble: ``, - // SourceMapGenerator does have toJSON() method but it's not in the types - map: context.map ? context.map.toJSON() : undefined - }; + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; } function genFunctionPreamble(ast, context) { - const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context; - const VueBinding = runtimeGlobalName; - // Generate const declaration for helpers - // In prefix mode, we place the const declaration at top so it's done - // only once; But if we not prefixing, we place the declaration inside the - // with block so it doesn't incur the `in` check cost for every helper access. - if (ast.helpers.length > 0) { - { - // "with" mode. - // save Vue in a separate variable to avoid collision - push(`const _Vue = ${VueBinding}\n`); - // in "with" mode, helpers are declared inside the with block to avoid - // has check cost, but hoists are lifted out of the function - we need - // to provide the helper here. - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ] - .filter(helper => ast.helpers.includes(helper)) - .map(aliasHelper) - .join(', '); - push(`const { ${staticHelpers} } = _Vue\n`); - } - } + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } } - genHoists(ast.hoists, context); - newline(); - push(`return `); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); } function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper(type === 'component' - ? RESOLVE_COMPONENT - : RESOLVE_DIRECTIVE); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - // potential component implicit self-reference inferred from SFC filename - const maybeSelfReference = id.endsWith('__self'); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`); - if (i < assets.length - 1) { - newline(); - } + const resolver = helper( + type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } } function genHoists(hoists, context) { - if (!hoists.length) { - return; + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline, helper, scopeId, mode } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push( + `const _hoisted_${i + 1} = ${``}` + ); + genNode(exp, context); + newline(); } - context.pure = true; - const { push, newline, helper, scopeId, mode } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = ${``}`); - genNode(exp, context); - newline(); - } - } - context.pure = false; + } + context.pure = false; } -function isText$1(n) { - return (isString(n) || - n.type === 4 /* SIMPLE_EXPRESSION */ || - n.type === 2 /* TEXT */ || - n.type === 5 /* INTERPOLATION */ || - n.type === 8 /* COMPOUND_EXPRESSION */); +function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; } function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || - (nodes.some(n => isArray(n) || !isText$1(n))); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); + const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); } function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node); - } - else if (isArray(node)) { - genNodeListAsArray(node, context); - } - else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(','); - newline(); - } - else { - comma && push(', '); - } - } + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } } function genNode(node, context) { - if (isString(node)) { - context.push(node); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1 /* ELEMENT */: - case 9 /* IF */: - case 11 /* FOR */: - assert(node.codegenNode != null, `Codegen node is missing for element/if/for node. ` + - `Apply appropriate transforms first.`); - genNode(node.codegenNode, context); - break; - case 2 /* TEXT */: - genText(node, context); - break; - case 4 /* SIMPLE_EXPRESSION */: - genExpression(node, context); - break; - case 5 /* INTERPOLATION */: - genInterpolation(node, context); - break; - case 12 /* TEXT_CALL */: - genNode(node.codegenNode, context); - break; - case 8 /* COMPOUND_EXPRESSION */: - genCompoundExpression(node, context); - break; - case 3 /* COMMENT */: - genComment(node, context); - break; - case 13 /* VNODE_CALL */: - genVNodeCall(node, context); - break; - case 14 /* JS_CALL_EXPRESSION */: - genCallExpression(node, context); - break; - case 15 /* JS_OBJECT_EXPRESSION */: - genObjectExpression(node, context); - break; - case 17 /* JS_ARRAY_EXPRESSION */: - genArrayExpression(node, context); - break; - case 18 /* JS_FUNCTION_EXPRESSION */: - genFunctionExpression(node, context); - break; - case 19 /* JS_CONDITIONAL_EXPRESSION */: - genConditionalExpression(node, context); - break; - case 20 /* JS_CACHE_EXPRESSION */: - genCacheExpression(node, context); - break; - case 21 /* JS_BLOCK_STATEMENT */: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22 /* JS_TEMPLATE_LITERAL */: - break; - case 23 /* JS_IF_STATEMENT */: - break; - case 24 /* JS_ASSIGNMENT_EXPRESSION */: - break; - case 25 /* JS_SEQUENCE_EXPRESSION */: - break; - case 26 /* JS_RETURN_STATEMENT */: - break; - /* istanbul ignore next */ - case 10 /* IF_BRANCH */: - // noop - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - // make sure we exhaust all possible types - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } } function genText(node, context) { - context.push(JSON.stringify(node.content), node); + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); } function genExpression(node, context) { - const { content, isStatic } = node; - context.push(isStatic ? JSON.stringify(content) : content, node); + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); } function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) - push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); + const { push, helper, pure } = context; + if (pure) + push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); } function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child); - } - else { - genNode(child, context); - } + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); } + } } function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8 /* COMPOUND_EXPRESSION */) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } - else if (node.isStatic) { - // only quote keys if necessary - const text = isSimpleIdentifier(node.content) - ? node.content - : JSON.stringify(node.content); - push(text, node); - } - else { - push(`[${node.content}]`, node); - } + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } } function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node); + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); } function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node; - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock - ? getVNodeBlockHelper(context.inSSR, isComponent) - : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, node); - genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context); + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlag, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } } function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) - break; - } - return args.slice(0, i + 1).map(arg => arg || `null`); + let i = args.length; + while (i--) { + if (args[i] != null) + break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); } -// JavaScript function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, node); - genNodeList(node.arguments, context); - push(`)`); + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); } function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, node); - return; + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); } - const multilines = properties.length > 1 || - (properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */)); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - // key - genExpressionAsPropertyKey(key, context); - push(`: `); - // value - genNode(value, context); - if (i < properties.length - 1) { - // will only reach this if it's multilines - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); + } + multilines && deindent(); + push(multilines ? `}` : ` }`); } function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); + genNodeListAsArray(node.elements, context); } function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - // wrap slot functions with owner context - push(`_${helperNameMap[WITH_CTX]}(`); + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); } - push(`(`, node); - if (isArray(params)) { - genNodeList(params, context); - } - else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } - } - else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - push(`)`); + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + push(`)`); + } } function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4 /* SIMPLE_EXPRESSION */) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } - else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); + } + genNode(alternate, context); + if (!isNested) { context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent(true /* without newline */); + } + needNewline && deindent( + true + /* without newline */ + ); } function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - push(`_cache[${node.index}] || (`); - if (node.isVNode) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1),`); - newline(); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (node.isVNode) { - push(`,`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); + const { push, helper, indent, deindent, newline } = context; + push(`_cache[${node.index}] || (`); + if (node.isVNode) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1),`); + newline(); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (node.isVNode) { + push(`,`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); } -// these keywords should not appear inside expressions, but operators like -// typeof, instanceof and in are allowed -const prohibitedKeywordRE = new RegExp('\\b' + - ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + - 'super,throw,while,yield,delete,export,import,return,switch,default,' + - 'extends,finally,continue,debugger,function,arguments,typeof,void') - .split(',') - .join('\\b|\\b') + - '\\b'); -// strip strings in expressions +const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" +); const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; -/** - * Validate a non-prefixed expression. - * This is only called when using the in-browser runtime compiler since it - * doesn't prefix expressions. - */ function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { - const exp = node.content; - // empty expressions are validated per-directive since some directives - // do allow empty expressions. - if (!exp.trim()) { - return; - } - try { - new Function(asRawStatements - ? ` ${exp} ` - : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`); - } - catch (e) { - let message = e.message; - const keywordMatch = exp - .replace(stripStringRE, '') - .match(prohibitedKeywordRE); - if (keywordMatch) { - message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; - } - context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, message)); + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } } const transformExpression = (node, context) => { - if (node.type === 5 /* INTERPOLATION */) { - node.content = processExpression(node.content, context); - } - else if (node.type === 1 /* ELEMENT */) { - // handle directives on element - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - // do not process for v-on & v-for since they are special handled - if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') { - const exp = dir.exp; - const arg = dir.arg; - // do not process exp if this is v-on:arg - we need special handling - // for wrapping inline statements. - if (exp && - exp.type === 4 /* SIMPLE_EXPRESSION */ && - !(dir.name === 'on' && arg)) { - dir.exp = processExpression(exp, context, - // slot args must be processed as function params - dir.name === 'slot'); - } - if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg)) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } } + } }; -// Important: since this function uses Node.js only dependencies, it should -// always be used with a leading !true check so that it can be -// tree-shaken from the browser build. -function processExpression(node, context, -// some expressions like v-slot props & v-for aliases should be parsed as -// function params -asParams = false, -// v-on handler values may contain multiple statements -asRawStatements = false, localVars = Object.create(context.identifiers)) { +function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { { - { - // simple in-browser validation (same logic in 2.x) - validateBrowserExpression(node, context, asParams, asRawStatements); - } - return node; + validateBrowserExpression(node, context, asParams, asRawStatements); } + return node; + } } -const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => { +const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { return processIf(node, dir, context, (ifNode, branch, isRoot) => { - // #1587: We need to dynamically increment the key based on the current - // node's sibling nodes, since chained v-if/else branches are - // rendered at the same depth - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9 /* IF */) { - key += sibling.branches.length; - } + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; } - // Exit callback. Complete the codegenNode when all children have been - // transformed. - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context); - } - else { - // attach this branch's codegen node to the v-if root. - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context); - } - }; + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processIf(node, dir, context, processCodegen) { - if (dir.name !== 'else' && - (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc)); - dir.exp = createSimpleExpression(`true`, false, loc); + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: node.loc, + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); } - if (dir.exp) { - validateBrowserExpression(dir.exp, context); - } - if (dir.name === 'if') { + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); const branch = createIfBranch(node, dir); - const ifNode = { - type: 9 /* IF */, - loc: node.loc, - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; } - } - else { - // locate the adjacent v-if - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3 /* COMMENT */) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && - sibling.type === 2 /* TEXT */ && - !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9 /* IF */) { - // Check if v-else was followed by v-else-if - if (dir.name === 'else-if' && - sibling.branches[sibling.branches.length - 1].condition === undefined) { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - // move the node to the if node's branches - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && - // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && - context.parent.type === 1 /* ELEMENT */ && - isBuiltInType(context.parent.tag, 'transition'))) { - branch.children = [...comments, ...branch.children]; - } - // check if user is forcing same key on different branches - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc)); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - // since the branch was removed, it will not be traversed. - // make sure to traverse here. - traverseNode(branch, context); - // call on exit - if (onExit) - onExit(); - // make sure to reset currentNode after traversal to indicate this - // node has been removed. - context.currentNode = null; - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - break; + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) + onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; } + } } function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3 /* TEMPLATE */; - return { - type: 10 /* IF_BRANCH */, - loc: node.loc, - condition: dir.name === 'else' ? undefined : dir.exp, - children: isTemplateIf && !findDir(node, 'for') ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; } function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - 'true' - ])); - } - else { - return createChildrenCodegenNode(branch, keyIndex, context); - } + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } } function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */)); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11 /* FOR */) { - // optimize away nested fragments when child is a ForNode - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } - else { - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (!branch.isTemplateIf && - children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, false, false /* isComponent */, branch.loc); - } + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + false, + false, + branch.loc + ); } - else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - // Change createVNode to createBlock. - if (vnodeCall.type === 13 /* VNODE_CALL */) { - makeBlock(vnodeCall, context); - } - // inject branch key - injectProp(vnodeCall, keyProperty, context); - return ret; + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); } + injectProp(vnodeCall, keyProperty, context); + return ret; + } } function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; } - if (a.type === 6 /* ATTRIBUTE */) { - if (a.value.content !== b.value.content) { - return false; - } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; } - else { - // directive - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 /* SIMPLE_EXPRESSION */ || - exp.isStatic !== branchExp.isStatic || - exp.content !== branchExp.content) { - return false; - } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; } - return true; + } + return true; } function getParentCondition(node) { - while (true) { - if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - node = node.alternate; - } - else { - return node; - } - } - else if (node.type === 20 /* JS_CACHE_EXPRESSION */) { - node = node.value; - } + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; } + } } -const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => { +const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { const { helper, removeHelper } = context; - return processFor(node, dir, context, forNode => { - // create the loop render function expression now, and add the - // iterator on exit after all children have been traversed - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, 'memo'); - const keyProp = findProp(node, `key`); - const keyExp = keyProp && - (keyProp.type === 6 /* ATTRIBUTE */ - ? createSimpleExpression(keyProp.value.content, true) - : keyProp.exp); - const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; - const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ && - forNode.source.constType > 0 /* NOT_CONSTANT */; - const fragmentFlag = isStableFragment - ? 64 /* STABLE_FRAGMENT */ - : keyProp - ? 128 /* KEYED_FRAGMENT */ - : 256 /* UNKEYED_FRAGMENT */; - forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag + - (` /* ${PatchFlagNames[fragmentFlag]} */` ), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc); - return () => { - // finish the codegen now that all children have been traversed - let childBlock; - const { children } = forNode; - // check <template v-for> key placement - if (isTemplate) { - node.children.some(c => { - if (c.type === 1 /* ELEMENT */) { - const key = findProp(c, 'key'); - if (key) { - context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc)); - return true; - } - } - }); + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`); + const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp); + const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag + (` /* ${PatchFlagNames[fragmentFlag]} */` ), + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */; - const slotOutlet = isSlotOutlet(node) - ? node - : isTemplate && - node.children.length === 1 && - isSlotOutlet(node.children[0]) - ? node.children[0] // api-extractor somehow fails to infer this - : null; - if (slotOutlet) { - // <slot v-for="..."> or <template v-for="..."><slot/></template> - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - // <template v-for="..." :key="..."><slot/></template> - // we need to inject the key to the renderSlot() call. - // the props for renderSlot is passed as the 3rd argument. - injectProp(childBlock, keyProperty, context); - } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64 + (` /* ${PatchFlagNames[64]} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); } - else if (needFragmentWrapper) { - // <template v-for="..."> with text or multi-elements - // should generate a fragment block for each loop - childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ + - (` /* ${PatchFlagNames[64 /* STABLE_FRAGMENT */]} */` - ), undefined, undefined, true, undefined, false /* isComponent */); - } - else { - // Normal element v-for. Directly use the child's codegenNode - // but mark it as a block. - childBlock = children[0] - .codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - // switch from block to vnode - removeHelper(OPEN_BLOCK); - removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - // switch from vnode to block - removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ])); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...(keyExp ? [` && _cached.key === `, keyExp] : []), - ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++))); - } - else { - renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */)); - } - }; + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached++)) + ); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; }); -}); -// target-agnostic transform used for both Client and SSR + } +); function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc)); - return; - } - const parseResult = parseForExpression( - // can only be simple expression because vFor transform is applied - // before expression transform. - dir.exp, context); - if (!parseResult) { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc)); - return; - } - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11 /* FOR */, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - // bookkeeping - scopes.vFor++; - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (onExit) - onExit(); - }; + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) + onExit(); + }; } -const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; -// This regex doesn't cover the case if key or index aliases have destructuring, -// but those do not make sense in the first place, so this works in practice. -const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; -const stripParensRE = /^\(|\)$/g; -function parseForExpression(input, context) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) - return; - const [, LHS, RHS] = inMatch; - const result = { - source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: undefined, - key: undefined, - index: undefined - }; - { - validateBrowserExpression(result.source, context); +function finalizeForParseResult(result, context) { + if (result.finalized) + return; + { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); } - let valueContent = LHS.trim().replace(stripParensRE, '').trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, '').trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(loc, keyContent, keyOffset); - { - validateBrowserExpression(result.key, context, true); - } - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key - ? keyOffset + keyContent.length - : trimmedOffset + valueContent.length)); - { - validateBrowserExpression(result.index, context, true); - } - } - } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); } - if (valueContent) { - result.value = createAliasExpression(loc, valueContent, trimmedOffset); - { - validateBrowserExpression(result.value, context, true); - } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); } - return result; -} -function createAliasExpression(range, content, offset) { - return createSimpleExpression(content, false, getInnerRange(range, offset, content.length)); + } + result.finalized = true; } function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); + return createParamsList([value, key, index, ...memoArgs]); } function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) - break; - } - return args - .slice(0, i + 1) - .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false)); + let i = args.length; + while (i--) { + if (args[i]) + break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); } const defaultFallback = createSimpleExpression(`undefined`, false); -// A NodeTransform that: -// 1. Tracks scope identifiers for scoped slots so that they don't get prefixed -// by transformExpression. This is only applied in non-browser builds with -// { prefixIdentifiers: true }. -// 2. Track v-slot depths so that we know a slot is inside another slot. -// Note the exit callback is executed before buildSlots() on the same node, -// so only nested slots see positive numbers. const trackSlotScopes = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 1 /* COMPONENT */ || - node.tagType === 3 /* TEMPLATE */)) { - // We are only checking non-empty v-slot here - // since we only care about slots that introduce scope variables. - const vSlot = findDir(node, 'slot'); - if (vSlot) { - vSlot.exp; - context.scopes.vSlot++; - return () => { - context.scopes.vSlot--; - }; - } + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; } + } }; -const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc); -// Instead of being a DirectiveTransform, v-slot processing is called during -// transformElement to build the slots object for a component. +const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc +); function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - // If the slot is inside a v-for or another v-slot, force it to be dynamic - // since it likely uses a scope variable. - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - // 1. Check for slot with slotProps on component itself. - // <Comp v-slot="{ prop }"/> - const onComponentSlot = findDir(node, 'slot', true); + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc))); + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; } - // 2. Iterate through children and check for template slots - // <template v-slot:foo="{ prop }"> - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = new Set(); - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || - !(slotDir = findDir(slotElement, 'slot', true))) { - // not a <template v-slot>, skip. - if (slotElement.type !== 3 /* COMMENT */) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - // already has on-component slot - this is incorrect usage. - context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc)); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir; - // check if name is dynamic. - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } - else { - hasDynamicSlots = true; - } - const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc); - // check if this slot is conditional (v-if/v-for) - let vIf; - let vElse; - let vFor; - if ((vIf = findDir(slotElement, 'if'))) { - hasDynamicSlots = true; - dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)); - } - else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) { - // find adjacent v-if - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3 /* COMMENT */) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, 'if')) { - // remove node - children.splice(i, 1); - i--; - // attach this slot to previous conditional - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp - ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback) - : buildDynamicSlot(slotName, slotFunction); - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc)); - } - } - else if ((vFor = findDir(slotElement, 'for'))) { - hasDynamicSlots = true; - const parseResult = vFor.parseResult || - parseForExpression(vFor.exp, context); - if (parseResult) { - // Render the dynamic slots as an array and add it to the createSlot() - // args. The runtime knows how to handle it appropriately. - dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */) - ])); - } - else { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc)); - } - } - else { - // check duplicate static names - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc)); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === 'default') { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children) => { - const fn = buildSlotFn(props, children, loc); - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - // implicit default slot (on component) - slotsProperties.push(buildDefaultSlotProperty(undefined, children)); + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; } - else if (implicitDefaultChildren.length && - // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) { - // implicit default slot (mixed with named slots) - if (hasNamedDefaultSlot) { - context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc)); - } - else { - slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren)); - } + } + if (prev && isTemplateNode(prev) && findDir(prev, "if")) { + children.splice(i, 1); + i--; + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); } - const slotFlag = hasDynamicSlots - ? 2 /* DYNAMIC */ - : hasForwardedSlots(node.children) - ? 3 /* FORWARDED */ - : 1 /* STABLE */; - let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression(slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), false))), loc); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + return createObjectProperty(`default`, fn); }; -} -function buildDynamicSlot(name, fn) { - return createObjectExpression([ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) ]); + } + return { + slots, + hasDynamicSlots + }; +} +function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); } function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - if (child.tagType === 2 /* SLOT */ || - hasForwardedSlots(child.children)) { - return true; - } - break; - case 9 /* IF */: - if (hasForwardedSlots(child.branches)) - return true; - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - if (hasForwardedSlots(child.children)) - return true; - break; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; } + break; + case 9: + if (hasForwardedSlots(child.branches)) + return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) + return true; + break; } - return false; + } + return false; } function isNonWhitespaceContent(node) { - if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */) - return true; - return node.type === 2 /* TEXT */ - ? !!node.content.trim() - : isNonWhitespaceContent(node.content); + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); } -// some directive transforms (e.g. v-model) may return a symbol for runtime -// import, which should be used instead of a resolveDirective call. -const directiveImportMap = new WeakMap(); -// generate a JavaScript AST for this element's codegen +const directiveImportMap = /* @__PURE__ */ new WeakMap(); const transformElement = (node, context) => { - // perform the work on exit, after all child expressions have been - // processed and merged. - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */))) { - return; + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let vnodePatchFlag; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); } - const { tag, props } = node; - const isComponent = node.tagType === 1 /* COMPONENT */; - // The goal of the transform is to create a codegenNode implementing the - // VNodeCall interface. - let vnodeTag = isComponent - ? resolveComponentType(node, context) - : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let vnodePatchFlag; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = - // dynamic component may resolve to plain elements - isDynamicComponent || - vnodeTag === TELEPORT || - vnodeTag === SUSPENSE || - (!isComponent && - // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')); - // props - if (props.length > 0) { - const propsBuildResult = buildProps(node, context, undefined, isComponent, isDynamicComponent); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = - directives && directives.length - ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context))) - : undefined; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; } - // children - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - // Although a built-in component, we compile KeepAlive with raw children - // instead of slot functions so that it can be used inside Transition - // or other Transition-wrapping HOCs. - // To ensure correct updates with block optimizations, we need to: - // 1. Force keep-alive into a block. This avoids its children being - // collected by a parent block. - shouldUseBlock = true; - // 2. Force keep-alive to always be updated, since it uses raw children. - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - if (node.children.length > 1) { - context.onError(createCompilerError(45 /* X_KEEP_ALIVE_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - } - const shouldBuildAsSlots = isComponent && - // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && - // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } - else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - // check for dynamic text children - const hasDynamicTextChild = type === 5 /* INTERPOLATION */ || - type === 8 /* COMPOUND_EXPRESSION */; - if (hasDynamicTextChild && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - patchFlag |= 1 /* TEXT */; - } - // pass directly if the only child is a text node - // (plain / interpolation / expression) - if (hasDynamicTextChild || type === 2 /* TEXT */) { - vnodeChildren = child; - } - else { - vnodeChildren = node.children; - } - } - else { - vnodeChildren = node.children; - } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; } - // patchFlag & dynamicPropNames - if (patchFlag !== 0) { - { - if (patchFlag < 0) { - // special flags (negative and mutually exclusive) - vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } - else { - // bitwise flags - const flagNames = Object.keys(PatchFlagNames) - .map(Number) - .filter(n => n > 0 && patchFlag & n) - .map(n => PatchFlagNames[n]) - .join(`, `); - vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; } - node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc); - }; + } else { + vnodeChildren = node.children; + } + } + if (patchFlag !== 0) { + { + if (patchFlag < 0) { + vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + vnodePatchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; }; function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - // 1. dynamic component - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp(node, 'is'); - if (isProp) { - if (isExplicitDynamic || - (false )) { - const exp = isProp.type === 6 /* ATTRIBUTE */ - ? isProp.value && createSimpleExpression(isProp.value.content, true) - : isProp.exp; - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } - else if (isProp.type === 6 /* ATTRIBUTE */ && - isProp.value.content.startsWith('vue:')) { - // <button is="vue:xxx"> - // if not <component>, only is value that starts with "vue:" will be - // treated as component by the parse phase and reach here, unless it's - // compat mode where all is values are considered components - tag = isProp.value.content.slice(4); - } - } - // 1.5 v-is (TODO: Deprecate) - const isDir = !isExplicitDynamic && findDir(node, 'is'); - if (isDir && isDir.exp) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp(node, "is"); + if (isProp) { + if (isExplicitDynamic || false) { + const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp; + if (exp) { return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - isDir.exp + exp ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); } - // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...) - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - // built-ins are simply fallthroughs / have special handling during ssr - // so we don't need to import their runtime equivalents - if (!ssr) - context.helper(builtIn); - return builtIn; - } - // 5. user component (resolve) - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) + context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); } function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - // patchFlag analysis - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && - (!isComponent || isDynamicComponent) && - // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== 'onclick' && - // omit v-model handlers - name !== 'onUpdate:modelValue' && - // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (value.type === 20 /* JS_CACHE_EXPRESSION */ || - ((value.type === 4 /* SIMPLE_EXPRESSION */ || - value.type === 8 /* COMPOUND_EXPRESSION */) && - getConstantType(value, context) > 0)) { - // skip if the prop is a cached handler or has constant value - return; - } - if (name === 'ref') { - hasRef = true; - } - else if (name === 'class') { - hasClassBinding = true; - } - else if (name === 'style') { - hasStyleBinding = true; - } - else if (name !== 'key' && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - // treat the dynamic class and style binding of the component as dynamic props - if (isComponent && - (name === 'class' || name === 'style') && - !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } - else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - // static attribute - const prop = props[i]; - if (prop.type === 6 /* ATTRIBUTE */) { - const { loc, name, value } = prop; - let isStatic = true; - if (name === 'ref') { - hasRef = true; - if (context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - } - // skip is on <component>, or is="vue:xxx" - if (name === 'is' && - (isComponentTag(tag) || - (value && value.content.startsWith('vue:')) || - (false ))) { - continue; - } - properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc))); - } - else { - // directives - const { name, arg, exp, loc } = prop; - const isVBind = name === 'bind'; - const isVOn = name === 'on'; - // skip v-slot - it is handled by its dedicated transform. - if (name === 'slot') { - if (!isComponent) { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc)); - } - continue; - } - // skip v-once/v-memo - they are handled by dedicated transforms. - if (name === 'once' || name === 'memo') { - continue; - } - // skip v-is and :is on <component> - if (name === 'is' || - (isVBind && - isStaticArgOf(arg, 'is') && - (isComponentTag(tag) || - (false )))) { - continue; - } - // skip v-on in SSR compilation - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - (isVBind && isStaticArgOf(arg, 'key')) || - // inline before-update hooks need to force block so that it is invoked - // before children - (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // special case for v-bind and v-on with no argument - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - properties = []; - } - if (isVBind) { - mergeArgs.push(exp); - } - else { - // v-on="obj" -> toHandlers(obj) - mergeArgs.push({ - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee: context.helper(TO_HANDLERS), - arguments: [exp] - }); - } - } - else { - context.onError(createCompilerError(isVBind - ? 34 /* X_V_BIND_NO_EXPRESSION */ - : 35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - continue; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - // has built-in directive transform. - const { props, needRuntime } = directiveTransform(prop, node, context); - !ssr && props.forEach(analyzePatchFlag); - properties.push(...props); - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } - else if (!isBuiltInDirective(name)) { - // no built-in transform, this is a user custom directive. - runtimeDirectives.push(prop); - // custom dirs may use beforeUpdate so they need to force blocks - // to ensure before-update gets called before children update - if (hasChildren) { - shouldUseBlock = true; - } - } - } + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; } - let propsExpression = undefined; - // has v-bind="object" or v-on="object", wrap with mergeProps - if (mergeArgs.length) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - } - if (mergeArgs.length > 1) { - propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc); - } - else { - // single v-bind with nothing else - no need for a mergeProps call - propsExpression = mergeArgs[0]; - } + if (arg) + mergeArgs.push(arg); + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; } - else if (properties.length) { - propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc); - } - // patchFlag analysis - if (hasDynamicKeys) { - patchFlag |= 16 /* FULL_PROPS */; - } - else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2 /* CLASS */; + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4 /* STYLE */; + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); } - if (dynamicPropNames.length) { - patchFlag |= 8 /* PROPS */; + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || false)) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushMergeArg(); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); } - if (hasHydrationEventBinding) { - patchFlag |= 32 /* HYDRATE_EVENTS */; + continue; + } + if (isVBind && modifiers.includes("prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } } - if (!shouldUseBlock && - (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) && - (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512 /* NEED_PATCH */; + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; } - // pre-normalize props, SSR is skipped for now - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15 /* JS_OBJECT_EXPRESSION */: - // means that there is no v-bind, - // but still need to deal with dynamic key binding - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === 'class') { - classKeyIndex = i; - } - else if (key.content === 'style') { - styleKeyIndex = i; - } - } - else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - // no dynamic key - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]); - } - if (styleProp && - // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || - (styleProp.value.type === 4 /* SIMPLE_EXPRESSION */ && - styleProp.value.content.trim()[0] === `[`) || - // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) { - styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]); - } - } - else { - // dynamic key binding, wrap with `normalizeProps` - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]); - } - break; - case 14 /* JS_CALL_EXPRESSION */: - // mergeProps call, do nothing - break; - default: - // single v-bind - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ]); - break; + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; } -// Dedupe props in an object literal. -// Literal duplicated attributes would have been warned during the parse phase, -// however, it's possible to encounter duplicated `onXXX` handlers with different -// modifiers. We also need to merge static and dynamic class / style attributes. -// - onXXX handlers / style: merge into array -// - class: merge into single expression with concatenation function dedupeProperties(properties) { - const knownProps = new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - // dynamic keys are always allowed - if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === 'style' || name === 'class' || isOn(name)) { - mergeAsArray$1(existing, prop); - } - // unexpected duplicate, should have emitted error during parse - } - else { - knownProps.set(name, prop); - deduped.push(prop); - } + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; } - return deduped; + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; } -function mergeAsArray$1(existing, incoming) { - if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.value.elements.push(incoming.value); - } - else { - existing.value = createArrayExpression([existing.value, incoming.value], existing.loc); - } +function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } } function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - // built-in directive with runtime - dirArgs.push(context.helperString(runtime)); + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); } - else { - { - // inject statement for resolving directive - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } + } + const { loc } = dir; + if (dir.exp) + dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); } - const { loc } = dir; - if (dir.exp) - dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc)); - } - return createArrayExpression(dirArgs, dir.loc); + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); } function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) - propsNamesString += ', '; - } - return propsNamesString + `]`; + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) + propsNamesString += ", "; + } + return propsNamesString + `]`; } function isComponentTag(tag) { - return tag === 'component' || tag === 'Component'; + return tag === "component" || tag === "Component"; } const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - '{}', - 'undefined', - 'true' - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); // remove unused arguments - node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc); + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } }; function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = undefined; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.value) { - if (p.name === 'name') { - slotName = JSON.stringify(p.value.content); - } - else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); } - else { - if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) { - if (p.exp) - slotName = p.exp; - } - else { - if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) + slotName = p.exp; + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); } + nonNameProps.push(p); + } } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps(node, context, nonNameProps, false, false); - slotProps = props; - if (directives.length) { - context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc)); - } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); } - return { - slotName, - slotProps - }; + } + return { + slotName, + slotProps + }; } -const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; -const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc)); +const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; +const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); } - let eventName; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - let rawName = arg.content; - // TODO deprecate @vnodeXXX usage - if (rawName.startsWith('vue:')) { - rawName = `vnode-${rawName.slice(4)}`; - } - // for all event listeners, auto convert it to camelCase. See issue #2249 - eventName = createSimpleExpression(toHandlerKey(camelize(rawName)), true, arg.loc); - } - else { - // #2388 - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp.content); + const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); + const hasMultipleStatements = exp.content.includes(`;`); + { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); } - else { - // already a compound expression. - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); } - // handler processing - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = undefined; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp.content); - const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); - const hasMultipleStatements = exp.content.includes(`;`); - { - validateBrowserExpression(exp, context, false, hasMultipleStatements); - } - if (isInlineStatement || (shouldCache && isMemberExp)) { - // wrap inline statement in a function expression - exp = createCompoundExpression([ - `${isInlineStatement - ? `$event` - : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc)) - ] - }; - // apply extended compiler augmentor - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - // cache handlers so that it's always the same handler being passed down. - // this avoids unnecessary re-renders when users use inline handlers on - // components. - ret.props[0].value = context.cache(ret.props[0].value); - } - // mark the key as handler for props normalization check - ret.props.forEach(p => (p.key.isHandlerKey = true)); - return ret; + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; }; -// v-bind without arg is handled directly in ./transformElements.ts due to it affecting -// codegen for the entire props object. This transform here is only for v-bind -// *with* args. const transformBind = (dir, _node, context) => { - const { exp, modifiers, loc } = dir; - const arg = dir.arg; - if (arg.type !== 4 /* SIMPLE_EXPRESSION */) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (!exp && arg.type === 4) { + const propName = camelize(arg.content); + exp = dir.exp = createSimpleExpression(propName, false, arg.loc); + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.includes("camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); } - else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; + } + if (!context.inSSR) { + if (modifiers.includes("prop")) { + injectPrefix(arg, "."); } - // .sync is replaced by v-model:arg - if (modifiers.includes('camel')) { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } - else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } - else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.includes('prop')) { - injectPrefix(arg, '.'); - } - if (modifiers.includes('attr')) { - injectPrefix(arg, '^'); - } - } - if (!exp || - (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) { - context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc)); - return { - props: [createObjectProperty(arg, createSimpleExpression('', true, loc))] - }; + if (modifiers.includes("attr")) { + injectPrefix(arg, "^"); } + } + if (!exp || exp.type === 4 && !exp.content.trim()) { + context.onError(createCompilerError(34, loc)); return { - props: [createObjectProperty(arg, exp)] + props: [createObjectProperty(arg, createSimpleExpression("", true, loc))] }; + } + return { + props: [createObjectProperty(arg, exp)] + }; }; const injectPrefix = (arg, prefix) => { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } - else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } - else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } }; -// Merge adjacent text nodes and expressions into a single expression -// e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child. const transformText = (node, context) => { - if (node.type === 0 /* ROOT */ || - node.type === 1 /* ELEMENT */ || - node.type === 11 /* FOR */ || - node.type === 10 /* IF_BRANCH */) { - // perform the transform on node exit so that all expressions have already - // been processed. - return () => { - const children = node.children; - let currentContainer = undefined; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression([child], child.loc); - } - // merge adjacent text node into current - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } - else { - currentContainer = undefined; - break; - } - } - } + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; } - if (!hasText || - // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - (children.length === 1 && - (node.type === 0 /* ROOT */ || - (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find(p => p.type === 7 /* DIRECTIVE */ && - !context.directiveTransforms[p.name]) && - // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(false ))))) { - return; - } - // pre-convert text nodes into createTextVNode(text) calls to avoid - // runtime normalization. - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) { - const callArgs = []; - // createTextVNode defaults to single whitespace, so if it is a - // single space the code could be an empty call to save bytes. - if (child.type !== 2 /* TEXT */ || child.content !== ' ') { - callArgs.push(child); - } - // mark dynamic text with flag so it gets patched inside a block - if (!context.ssr && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - callArgs.push(1 /* TEXT */ + - (` /* ${PatchFlagNames[1 /* TEXT */]} */` )); - } - children[i] = { - type: 12 /* TEXT_CALL */, - content: child, - loc: child.loc, - codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs) - }; - } - } - }; - } -}; - -const seen = new WeakSet(); -const transformOnce = (node, context) => { - if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) { - if (seen.has(node) || context.inVOnce) { - return; + } } - seen.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */); - } - }; - } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + true)) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } }; -const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc)); - return createTransformProps(); +const seen$1 = /* @__PURE__ */ new WeakSet(); +const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; } - const rawExp = exp.loc.source; - const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp; - // im SFC <script setup> inline mode, the exp may have been transformed into - // _unref(exp) - context.bindingMetadata[rawExp]; - const maybeRef = !true /* SETUP_CONST */; - if (!expString.trim() || - (!isMemberExpression(expString) && !maybeRef)) { - context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc)); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression('modelValue', true); - const eventName = arg - ? isStaticExp(arg) - ? `onUpdate:${arg.content}` - : createCompoundExpression(['"onUpdate:" + ', arg]) - : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - // modelModifiers: { foo: true, "bar-baz": true } - if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) { - const modifiers = dir.modifiers - .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`) - .join(`, `); - const modifiersKey = arg - ? isStaticExp(arg) - ? `${arg.content}Modifiers` - : createCompoundExpression([arg, ' + "Modifiers"']) - : `modelModifiers`; - props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */))); - } - return createTransformProps(props); + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true + /* isVNode */ + ); + } + }; + } +}; + +const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source; + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); }; function createTransformProps(props = []) { - return { props }; + return { props }; } -const seen$1 = new WeakSet(); +const seen = /* @__PURE__ */ new WeakSet(); const transformMemo = (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const dir = findDir(node, 'memo'); - if (!dir || seen$1.has(node)) { - return; - } - seen$1.add(node); - return () => { - const codegenNode = node.codegenNode || - context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) { - // non-component sub tree should be turned into a block - if (node.tagType !== 1 /* COMPONENT */) { - makeBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(undefined, codegenNode), - `_cache`, - String(context.cached++) - ]); - } - }; + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached++) + ]); + } + }; + } }; function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...([]), - ...([transformExpression] - ), - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; -} -// we name it `baseCompile` so that higher order compilers like -// @vue/compiler-dom can export `compile` while re-exporting everything else. -function baseCompile(template, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === 'module'; - /* istanbul ignore if */ + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[], + ...[transformExpression] , + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], { - if (options.prefixIdentifiers === true) { - onError(createCompilerError(46 /* X_PREFIX_ID_NOT_SUPPORTED */)); - } - else if (isModuleMode) { - onError(createCompilerError(47 /* X_MODULE_MODE_NOT_SUPPORTED */)); - } + on: transformOn$1, + bind: transformBind, + model: transformModel$1 } - const prefixIdentifiers = !true ; - if (options.cacheHandlers) { - onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */)); + ]; +} +function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */)); - } - const ast = isString(template) ? baseParse(template, options) : template; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); - transform(ast, extend({}, options, { - prefixIdentifiers, - nodeTransforms: [ - ...nodeTransforms, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: extend({}, directiveTransforms, options.directiveTransforms || {} // user transforms - ) - })); - return generate(ast, extend({}, options, { - prefixIdentifiers - })); + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); } const noopDirectiveTransform = () => ({ props: [] }); @@ -15423,521 +16115,519 @@ const V_MODEL_DYNAMIC = Symbol(`vModelDynamic` ); const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` ); const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` ); const V_SHOW = Symbol(`vShow` ); -const TRANSITION$1 = Symbol(`Transition` ); +const TRANSITION = Symbol(`Transition` ); const TRANSITION_GROUP = Symbol(`TransitionGroup` ); registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION$1]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` }); -/* eslint-disable no-restricted-globals */ let decoder; function decodeHtmlBrowser(raw, asAttr = false) { - if (!decoder) { - decoder = document.createElement('div'); - } - if (asAttr) { - decoder.innerHTML = `<div foo="${raw.replace(/"/g, '"')}">`; - return decoder.children[0].getAttribute('foo'); - } - else { - decoder.innerHTML = raw; - return decoder.textContent; - } + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } } -const isRawTextContainer = /*#__PURE__*/ makeMap('style,iframe,script,noscript', true); const parserOptions = { - isVoidTag, - isNativeTag: tag => isHTMLTag(tag) || isSVGTag(tag), - isPreTag: tag => tag === 'pre', - decodeEntities: decodeHtmlBrowser , - isBuiltInComponent: (tag) => { - if (isBuiltInType(tag, `Transition`)) { - return TRANSITION$1; - } - else if (isBuiltInType(tag, `TransitionGroup`)) { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent) { - let ns = parent ? parent.ns : 0 /* HTML */; - if (parent && ns === 2 /* MATH_ML */) { - if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ && - a.name === 'encoding' && - a.value != null && - (a.value.content === 'text/html' || - a.value.content === 'application/xhtml+xml'))) { - ns = 0 /* HTML */; - } - } - else if (/^m(?:[ions]|text)$/.test(parent.tag) && - tag !== 'mglyph' && - tag !== 'malignmark') { - ns = 0 /* HTML */; - } - } - else if (parent && ns === 1 /* SVG */) { - if (parent.tag === 'foreignObject' || - parent.tag === 'desc' || - parent.tag === 'title') { - ns = 0 /* HTML */; - } - } - if (ns === 0 /* HTML */) { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (tag === 'math') { - return 2 /* MATH_ML */; - } - } - return ns; - }, - // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments - getTextMode({ tag, ns }) { - if (ns === 0 /* HTML */) { - if (tag === 'textarea' || tag === 'title') { - return 1 /* RCDATA */; - } - if (isRawTextContainer(tag)) { - return 2 /* RAWTEXT */; - } - } - return 0 /* DATA */; + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } }; -// Parse inline CSS strings for static style attributes into an object. -// This is a NodeTransform since it works on the static `style` attribute and -// converts it into a dynamic equivalent: -// style="color: red" -> :style='{ "color": "red" }' -// It is then processed by `transformElement` and included in the generated -// props. -const transformStyle = node => { - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((p, i) => { - if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) { - // replace p with an expression node - node.props[i] = { - type: 7 /* DIRECTIVE */, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } +const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } }; const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */); + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); }; function createDOMCompilerError(code, loc) { - return createCompilerError(code, loc, DOMErrorMessages ); + return createCompilerError( + code, + loc, + DOMErrorMessages + ); } const DOMErrorMessages = { - [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`, - [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`, - [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`, - [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`, - [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`, - [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`, - [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`, - [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` }; const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`innerHTML`, true, loc), exp || createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; }; const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`textContent`, true), exp - ? getConstantType(exp, context) > 0 - ? exp - : createCallExpression(context.helperString(TO_DISPLAY_STRING), [exp], loc) - : createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; }; -const transformModel$1 = (dir, node, context) => { - const baseResult = transformModel(dir, node, context); - // base transform has errors OR component v-model (only need props) - if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) { - return baseResult; - } - if (dir.arg) { - context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc)); - } - function checkDuplicatedValue() { - const value = findProp(node, 'value'); - if (value) { - context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === 'input' || - tag === 'textarea' || - tag === 'select' || - isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === 'input' || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7 /* DIRECTIVE */) { - // :type="foo" - directiveToUse = V_MODEL_DYNAMIC; - } - else if (type.value) { - switch (type.value.content) { - case 'radio': - directiveToUse = V_MODEL_RADIO; - break; - case 'checkbox': - directiveToUse = V_MODEL_CHECKBOX; - break; - case 'file': - isInvalidType = true; - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - // text type - checkDuplicatedValue(); - break; - } - } - } - else if (hasDynamicKeyVBind(node)) { - // element has bindings with dynamic keys, which can possibly contain - // "type". - directiveToUse = V_MODEL_DYNAMIC; - } - else { - // text type - checkDuplicatedValue(); - } - } - else if (tag === 'select') { - directiveToUse = V_MODEL_SELECT; - } - else { - // textarea - checkDuplicatedValue(); - } - // inject runtime directive - // by returning the helper symbol via needRuntime - // the import will replaced a resolveDirective call. - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - // native vmodel doesn't need the `modelValue` props since they are also - // passed to the runtime as `binding.value`. removing it reduces code size. - baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === 'modelValue')); +const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; }; -const isEventOptionModifier = /*#__PURE__*/ makeMap(`passive,once,capture`); -const isNonKeyModifier = /*#__PURE__*/ makeMap( -// event propagation management -`stop,prevent,self,` + - // system modifiers + exact - `ctrl,shift,alt,meta,exact,` + - // mouse - `middle`); -// left & right could be mouse or key modifiers based on event type -const maybeKeyModifier = /*#__PURE__*/ makeMap('left,right'); -const isKeyboardEvent = /*#__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`, true); +const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); +const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` +); +const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); +const isKeyboardEvent = /* @__PURE__ */ makeMap( + `onkeyup,onkeydown,onkeypress`, + true +); const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i]; - if (isEventOptionModifier(modifier)) { - // eventOptionModifiers: modifiers for addEventListener() options, - // e.g. .passive & .capture - eventOptionModifiers.push(modifier); + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content)) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); } - else { - // runtimeModifiers: modifiers that needs runtime guards - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content)) { - keyModifiers.push(modifier); - } - else { - nonKeyModifiers.push(modifier); - } - } - else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } - else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } - else { - keyModifiers.push(modifier); - } - } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); } + } } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; }; const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === 'onclick'; - return isStaticClick - ? createSimpleExpression(event, true) - : key.type !== 4 /* SIMPLE_EXPRESSION */ - ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) - : key; + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; }; -const transformOn$1 = (dir, node, context) => { - return transformOn(dir, node, context, baseResult => { - const { modifiers } = dir; - if (!modifiers.length) - return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - // normalize click.right and click.middle since they don't actually fire - if (nonKeyModifiers.includes('right')) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes('middle')) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && - // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(''); - key = isStaticExp(key) - ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) - : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); +const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) + return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); }; const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc)); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; }; const transformTransition = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION$1) { - return () => { - if (!node.children.length) { - return; - } - // warn multiple transition children - if (hasMultipleChildren(node)) { - context.onError(createDOMCompilerError(59 /* X_TRANSITION_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - // check if it's s single child w/ v-show - // if yes, inject "persisted: true" to the transition props - const child = node.children[0]; - if (child.type === 1 /* ELEMENT */) { - for (const p of child.props) { - if (p.type === 7 /* DIRECTIVE */ && p.name === 'show') { - node.props.push({ - type: 6 /* ATTRIBUTE */, - name: 'persisted', - value: undefined, - loc: node.loc - }); - } - } - } - }; + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; } + } }; function hasMultipleChildren(node) { - // #1352 filter out potential comment nodes. - const children = (node.children = node.children.filter(c => c.type !== 3 /* COMMENT */ && - !(c.type === 2 /* TEXT */ && !c.content.trim()))); - const child = children[0]; - return (children.length !== 1 || - child.type === 11 /* FOR */ || - (child.type === 9 /* IF */ && child.branches.some(hasMultipleChildren))); + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); } const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - (node.tag === 'script' || node.tag === 'style')) { - context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc)); - context.removeNode(); - } + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } }; const DOMNodeTransforms = [ - transformStyle, - ...([transformTransition] ) + transformStyle, + ...[transformTransition] ]; const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel$1, - on: transformOn$1, - show: transformShow + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow }; -function compile$1(template, options = {}) { - return baseCompile(template, extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...(options.nodeTransforms || []) - ], - directiveTransforms: extend({}, DOMDirectiveTransforms, options.directiveTransforms || {}), - transformHoist: null - })); +function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); } -// This entry is the "full-build" that includes both the runtime { - initDev(); + initDev(); +} +const compileCache = /* @__PURE__ */ new WeakMap(); +function getCache(options) { + let c = compileCache.get(options != null ? options : EMPTY_OBJ); + if (!c) { + c = /* @__PURE__ */ Object.create(null); + compileCache.set(options != null ? options : EMPTY_OBJ, c); + } + return c; } -const compileCache = Object.create(null); function compileToFunction(template, options) { - if (!isString(template)) { - if (template.nodeType) { - template = template.innerHTML; - } - else { - warn$1(`invalid template option: `, template); - return NOOP; - } + if (!isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + warn(`invalid template option: `, template); + return NOOP; } - const key = template; - const cached = compileCache[key]; - if (cached) { - return cached; + } + const key = template; + const cache = getCache(options); + const cached = cache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + if (!el) { + warn(`Template element not found or is empty: ${template}`); } - if (template[0] === '#') { - const el = document.querySelector(template); - if (!el) { - warn$1(`Template element not found or is empty: ${template}`); - } - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's rendered - // by the server, the template should not contain any user data. - template = el ? el.innerHTML : ``; - } - const { code } = compile$1(template, extend({ - hoistStatic: true, - onError: onError , - onWarn: e => onError(e, true) - }, options)); - function onError(err, asWarning = false) { - const message = asWarning - ? err.message - : `Template compilation error: ${err.message}`; - const codeFrame = err.loc && - generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset); - warn$1(codeFrame ? `${message}\n${codeFrame}` : message); - } - // The wildcard import results in a huge object with every export - // with keys that cannot be mangled, and can be quite heavy size-wise. - // In the global build we know `Vue` is available globally so we can avoid - // the wildcard object. - const render = (new Function('Vue', code)(runtimeDom)); - render._rc = true; - return (compileCache[key] = render); + template = el ? el.innerHTML : ``; + } + const opts = extend( + { + hoistStatic: true, + onError: onError , + onWarn: (e) => onError(e, true) + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compile(template, opts); + function onError(err, asWarning = false) { + const message = asWarning ? err.message : `Template compilation error: ${err.message}`; + const codeFrame = err.loc && generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + warn(codeFrame ? `${message} +${codeFrame}` : message); + } + const render = new Function("Vue", code)(runtimeDom); + render._rc = true; + return cache[key] = render; } registerRuntimeCompiler(compileToFunction); -export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed$1 as computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; +export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; diff --git a/node_modules/vue/dist/vue.esm-browser.prod.js b/node_modules/vue/dist/vue.esm-browser.prod.js index f3df4b4a..ffbe4254 100644 --- a/node_modules/vue/dist/vue.esm-browser.prod.js +++ b/node_modules/vue/dist/vue.esm-browser.prod.js @@ -1 +1,11 @@ -function e(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){return!!e||""===e}function r(e){if(E(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=P(o)?l(o):r(o);if(s)for(const e in s)t[e]=s[e]}return t}return P(e)||M(e)?e:void 0}const s=/;(?![^(]*\))/g,i=/:(.+)/;function l(e){const t={};return e.split(s).forEach((e=>{if(e){const n=e.split(i);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function c(e){let t="";if(P(e))t=e;else if(E(e))for(let n=0;n<e.length;n++){const o=c(e[n]);o&&(t+=o+" ")}else if(M(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function a(e){if(!e)return null;let{class:t,style:n}=e;return t&&!P(t)&&(e.class=c(t)),n&&(e.style=r(n)),e}const u=e("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),p=e("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),f=e("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr");function d(e,t){if(e===t)return!0;let n=R(e),o=R(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=A(e),o=A(t),n||o)return e===t;if(n=E(e),o=E(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=d(e[o],t[o]);return n}(e,t);if(n=M(e),o=M(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!d(e[n],t[n]))return!1}}return String(e)===String(t)}function h(e,t){return e.findIndex((e=>d(e,t)))}const m=e=>P(e)?e:null==e?"":E(e)||M(e)&&(e.toString===I||!F(e.toString))?JSON.stringify(e,g,2):String(e),g=(e,t)=>t&&t.__v_isRef?g(e,t.value):$(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:O(t)?{[`Set(${t.size})`]:[...t.values()]}:!M(t)||E(t)||L(t)?t:String(t),v={},y=[],_=()=>{},b=()=>!1,S=/^on[^a-z]/,x=e=>S.test(e),C=e=>e.startsWith("onUpdate:"),w=Object.assign,k=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},T=Object.prototype.hasOwnProperty,N=(e,t)=>T.call(e,t),E=Array.isArray,$=e=>"[object Map]"===B(e),O=e=>"[object Set]"===B(e),R=e=>"[object Date]"===B(e),F=e=>"function"==typeof e,P=e=>"string"==typeof e,A=e=>"symbol"==typeof e,M=e=>null!==e&&"object"==typeof e,V=e=>M(e)&&F(e.then)&&F(e.catch),I=Object.prototype.toString,B=e=>I.call(e),L=e=>"[object Object]"===B(e),j=e=>P(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,U=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),D=e("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),H=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},W=/-(\w)/g,z=H((e=>e.replace(W,((e,t)=>t?t.toUpperCase():"")))),K=/\B([A-Z])/g,G=H((e=>e.replace(K,"-$1").toLowerCase())),q=H((e=>e.charAt(0).toUpperCase()+e.slice(1))),J=H((e=>e?`on${q(e)}`:"")),Y=(e,t)=>!Object.is(e,t),Z=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Q=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},X=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let ee;let te;class ne{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&te&&(this.parent=te,this.index=(te.scopes||(te.scopes=[])).push(this)-1)}run(e){if(this.active){const t=te;try{return te=this,e()}finally{te=t}}}on(){te=this}off(){te=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function oe(e){return new ne(e)}function re(e,t=te){t&&t.active&&t.effects.push(e)}function se(){return te}function ie(e){te&&te.cleanups.push(e)}const le=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ce=e=>(e.w&fe)>0,ae=e=>(e.n&fe)>0,ue=new WeakMap;let pe=0,fe=1;let de;const he=Symbol(""),me=Symbol("");class ge{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,re(this,n)}run(){if(!this.active)return this.fn();let e=de,t=be;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=de,de=this,be=!0,fe=1<<++pe,pe<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=fe})(this):ve(this),this.fn()}finally{pe<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const r=t[o];ce(r)&&!ae(r)?r.delete(e):t[n++]=r,r.w&=~fe,r.n&=~fe}t.length=n}})(this),fe=1<<--pe,de=this.parent,be=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){de===this?this.deferStop=!0:this.active&&(ve(this),this.onStop&&this.onStop(),this.active=!1)}}function ve(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}function ye(e,t){e.effect&&(e=e.effect.fn);const n=new ge(e);t&&(w(n,t),t.scope&&re(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o}function _e(e){e.effect.stop()}let be=!0;const Se=[];function xe(){Se.push(be),be=!1}function Ce(){const e=Se.pop();be=void 0===e||e}function we(e,t,n){if(be&&de){let t=ue.get(e);t||ue.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=le()),ke(o)}}function ke(e,t){let n=!1;pe<=30?ae(e)||(e.n|=fe,n=!ce(e)):n=!e.has(de),n&&(e.add(de),de.deps.push(e))}function Te(e,t,n,o,r,s){const i=ue.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&E(e))i.forEach(((e,t)=>{("length"===t||t>=o)&&l.push(e)}));else switch(void 0!==n&&l.push(i.get(n)),t){case"add":E(e)?j(n)&&l.push(i.get("length")):(l.push(i.get(he)),$(e)&&l.push(i.get(me)));break;case"delete":E(e)||(l.push(i.get(he)),$(e)&&l.push(i.get(me)));break;case"set":$(e)&&l.push(i.get(he))}if(1===l.length)l[0]&&Ne(l[0]);else{const e=[];for(const t of l)t&&e.push(...t);Ne(le(e))}}function Ne(e,t){const n=E(e)?e:[...e];for(const o of n)o.computed&&Ee(o);for(const o of n)o.computed||Ee(o)}function Ee(e,t){(e!==de||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const $e=e("__proto__,__v_isRef,__isVue"),Oe=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(A)),Re=Ie(),Fe=Ie(!1,!0),Pe=Ie(!0),Ae=Ie(!0,!0),Me=Ve();function Ve(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=kt(this);for(let t=0,r=this.length;t<r;t++)we(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(kt)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){xe();const n=kt(this)[t].apply(this,e);return Ce(),n}})),e}function Ie(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?ht:dt:t?ft:pt).get(n))return n;const s=E(n);if(!e&&s&&N(Me,o))return Reflect.get(Me,o,r);const i=Reflect.get(n,o,r);return(A(o)?Oe.has(o):$e(o))?i:(e||we(n,0,o),t?i:Rt(i)?s&&j(o)?i:i.value:M(i)?e?yt(i):gt(i):i)}}function Be(e=!1){return function(t,n,o,r){let s=t[n];if(xt(s)&&Rt(s)&&!Rt(o))return!1;if(!e&&!xt(o)&&(Ct(o)||(o=kt(o),s=kt(s)),!E(t)&&Rt(s)&&!Rt(o)))return s.value=o,!0;const i=E(t)&&j(n)?Number(n)<t.length:N(t,n),l=Reflect.set(t,n,o,r);return t===kt(r)&&(i?Y(o,s)&&Te(t,"set",n,o):Te(t,"add",n,o)),l}}const Le={get:Re,set:Be(),deleteProperty:function(e,t){const n=N(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&Te(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return A(t)&&Oe.has(t)||we(e,0,t),n},ownKeys:function(e){return we(e,0,E(e)?"length":he),Reflect.ownKeys(e)}},je={get:Pe,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Ue=w({},Le,{get:Fe,set:Be(!0)}),De=w({},je,{get:Ae}),He=e=>e,We=e=>Reflect.getPrototypeOf(e);function ze(e,t,n=!1,o=!1){const r=kt(e=e.__v_raw),s=kt(t);n||(t!==s&&we(r,0,t),we(r,0,s));const{has:i}=We(r),l=o?He:n?Et:Nt;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function Ke(e,t=!1){const n=this.__v_raw,o=kt(n),r=kt(e);return t||(e!==r&&we(o,0,e),we(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function Ge(e,t=!1){return e=e.__v_raw,!t&&we(kt(e),0,he),Reflect.get(e,"size",e)}function qe(e){e=kt(e);const t=kt(this);return We(t).has.call(t,e)||(t.add(e),Te(t,"add",e,e)),this}function Je(e,t){t=kt(t);const n=kt(this),{has:o,get:r}=We(n);let s=o.call(n,e);s||(e=kt(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?Y(t,i)&&Te(n,"set",e,t):Te(n,"add",e,t),this}function Ye(e){const t=kt(this),{has:n,get:o}=We(t);let r=n.call(t,e);r||(e=kt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&Te(t,"delete",e,void 0),s}function Ze(){const e=kt(this),t=0!==e.size,n=e.clear();return t&&Te(e,"clear",void 0,void 0),n}function Qe(e,t){return function(n,o){const r=this,s=r.__v_raw,i=kt(s),l=t?He:e?Et:Nt;return!e&&we(i,0,he),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function Xe(e,t,n){return function(...o){const r=this.__v_raw,s=kt(r),i=$(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?He:t?Et:Nt;return!t&&we(s,0,c?me:he),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function et(e){return function(...t){return"delete"!==e&&this}}function tt(){const e={get(e){return ze(this,e)},get size(){return Ge(this)},has:Ke,add:qe,set:Je,delete:Ye,clear:Ze,forEach:Qe(!1,!1)},t={get(e){return ze(this,e,!1,!0)},get size(){return Ge(this)},has:Ke,add:qe,set:Je,delete:Ye,clear:Ze,forEach:Qe(!1,!0)},n={get(e){return ze(this,e,!0)},get size(){return Ge(this,!0)},has(e){return Ke.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Qe(!0,!1)},o={get(e){return ze(this,e,!0,!0)},get size(){return Ge(this,!0)},has(e){return Ke.call(this,e,!0)},add:et("add"),set:et("set"),delete:et("delete"),clear:et("clear"),forEach:Qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Xe(r,!1,!1),n[r]=Xe(r,!0,!1),t[r]=Xe(r,!1,!0),o[r]=Xe(r,!0,!0)})),[e,n,t,o]}const[nt,ot,rt,st]=tt();function it(e,t){const n=t?e?st:rt:e?ot:nt;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(N(n,o)&&o in t?n:t,o,r)}const lt={get:it(!1,!1)},ct={get:it(!1,!0)},at={get:it(!0,!1)},ut={get:it(!0,!0)},pt=new WeakMap,ft=new WeakMap,dt=new WeakMap,ht=new WeakMap;function mt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>B(e).slice(8,-1))(e))}function gt(e){return xt(e)?e:bt(e,!1,Le,lt,pt)}function vt(e){return bt(e,!1,Ue,ct,ft)}function yt(e){return bt(e,!0,je,at,dt)}function _t(e){return bt(e,!0,De,ut,ht)}function bt(e,t,n,o,r){if(!M(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=mt(e);if(0===i)return e;const l=new Proxy(e,2===i?o:n);return r.set(e,l),l}function St(e){return xt(e)?St(e.__v_raw):!(!e||!e.__v_isReactive)}function xt(e){return!(!e||!e.__v_isReadonly)}function Ct(e){return!(!e||!e.__v_isShallow)}function wt(e){return St(e)||xt(e)}function kt(e){const t=e&&e.__v_raw;return t?kt(t):e}function Tt(e){return Q(e,"__v_skip",!0),e}const Nt=e=>M(e)?gt(e):e,Et=e=>M(e)?yt(e):e;function $t(e){be&&de&&ke((e=kt(e)).dep||(e.dep=le()))}function Ot(e,t){(e=kt(e)).dep&&Ne(e.dep)}function Rt(e){return!(!e||!0!==e.__v_isRef)}function Ft(e){return At(e,!1)}function Pt(e){return At(e,!0)}function At(e,t){return Rt(e)?e:new Mt(e,t)}class Mt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:kt(e),this._value=t?e:Nt(e)}get value(){return $t(this),this._value}set value(e){e=this.__v_isShallow?e:kt(e),Y(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:Nt(e),Ot(this))}}function Vt(e){Ot(e)}function It(e){return Rt(e)?e.value:e}const Bt={get:(e,t,n)=>It(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Rt(r)&&!Rt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Lt(e){return St(e)?e:new Proxy(e,Bt)}class jt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>$t(this)),(()=>Ot(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Ut(e){return new jt(e)}function Dt(e){const t=E(e)?new Array(e.length):{};for(const n in e)t[n]=Wt(e,n);return t}class Ht{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function Wt(e,t,n){const o=e[t];return Rt(o)?o:new Ht(e,t,n)}class zt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ge(e,(()=>{this._dirty||(this._dirty=!0,Ot(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=kt(this);return $t(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const Kt=[];function Gt(e,...t){xe();const n=Kt.length?Kt[Kt.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=function(){let e=Kt[Kt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}();if(o)Yt(o,n,11,[e+t.join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${Ls(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=` at <${Ls(e.component,e.type,!!e.component&&null==e.component.parent)}`,r=">"+n;return e.props?[o,...qt(e.props),r]:[o+r]}(e))})),t}(r)),console.warn(...n)}Ce()}function qt(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...Jt(n,e[n]))})),n.length>3&&t.push(" ..."),t}function Jt(e,t,n){return P(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:Rt(t)?(t=Jt(e,kt(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):F(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=kt(t),n?t:[`${e}=`,t])}function Yt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){Qt(s,t,n)}return r}function Zt(e,t,n,o){if(F(e)){const r=Yt(e,t,n,o);return r&&V(r)&&r.catch((e=>{Qt(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Zt(e[s],t,n,o));return r}function Qt(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const i=t.appContext.config.errorHandler;if(i)return void Yt(i,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let Xt=!1,en=!1;const tn=[];let nn=0;const on=[];let rn=null,sn=0;const ln=[];let cn=null,an=0;const un=Promise.resolve();let pn=null,fn=null;function dn(e){const t=pn||un;return e?t.then(this?e.bind(this):e):t}function hn(e){tn.length&&tn.includes(e,Xt&&e.allowRecurse?nn+1:nn)||e===fn||(null==e.id?tn.push(e):tn.splice(function(e){let t=nn+1,n=tn.length;for(;t<n;){const o=t+n>>>1;bn(tn[o])<e?t=o+1:n=o}return t}(e.id),0,e),mn())}function mn(){Xt||en||(en=!0,pn=un.then(Sn))}function gn(e,t,n,o){E(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),mn()}function vn(e){gn(e,cn,ln,an)}function yn(e,t=null){if(on.length){for(fn=t,rn=[...new Set(on)],on.length=0,sn=0;sn<rn.length;sn++)rn[sn]();rn=null,sn=0,fn=null,yn(e,t)}}function _n(e){if(yn(),ln.length){const e=[...new Set(ln)];if(ln.length=0,cn)return void cn.push(...e);for(cn=e,cn.sort(((e,t)=>bn(e)-bn(t))),an=0;an<cn.length;an++)cn[an]();cn=null,an=0}}const bn=e=>null==e.id?1/0:e.id;function Sn(e){en=!1,Xt=!0,yn(e),tn.sort(((e,t)=>bn(e)-bn(t)));try{for(nn=0;nn<tn.length;nn++){const e=tn[nn];e&&!1!==e.active&&Yt(e,null,14)}}finally{nn=0,tn.length=0,_n(),Xt=!1,pn=null,(tn.length||on.length||ln.length)&&Sn(e)}}let xn,Cn=[];function wn(e,t){var n,o;if(xn=e,xn)xn.enabled=!0,Cn.forEach((({event:e,args:t})=>xn.emit(e,...t))),Cn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(o=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===o?void 0:o.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{wn(e,t)})),setTimeout((()=>{xn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Cn=[])}),3e3)}else Cn=[]}function kn(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||v;let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=o[e]||v;s&&(r=n.map((e=>e.trim()))),t&&(r=n.map(X))}let l,c=o[l=J(t)]||o[l=J(z(t))];!c&&s&&(c=o[l=J(G(t))]),c&&Zt(c,e,6,r);const a=o[l+"Once"];if(a){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,Zt(a,e,6,r)}}function Tn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!F(e)){const o=e=>{const n=Tn(e,t,!0);n&&(l=!0,w(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(E(s)?s.forEach((e=>i[e]=null)):w(i,s),o.set(e,i),i):(o.set(e,null),null)}function Nn(e,t){return!(!e||!x(t))&&(t=t.slice(2).replace(/Once$/,""),N(e,t[0].toLowerCase()+t.slice(1))||N(e,G(t))||N(e,t))}let En=null,$n=null;function On(e){const t=En;return En=e,$n=e&&e.type.__scopeId||null,t}function Rn(e){$n=e}function Fn(){$n=null}const Pn=e=>An;function An(e,t=En,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Xr(-1);const r=On(t),s=e(...n);return On(r),o._d&&Xr(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function Mn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:l,attrs:c,emit:a,render:u,renderCache:p,data:f,setupState:d,ctx:h,inheritAttrs:m}=e;let g,v;const y=On(e);try{if(4&n.shapeFlag){const e=r||o;g=gs(u.call(e,e,p,s,d,f,h)),v=c}else{const e=t;0,g=gs(e(s,e.length>1?{attrs:c,slots:l,emit:a}:null)),v=t.props?c:Vn(c)}}catch(b){qr.length=0,Qt(b,e,1),g=us(Kr)}let _=g;if(v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=_;e.length&&7&t&&(i&&e.some(C)&&(v=In(v,i)),_=fs(_,v))}return n.dirs&&(_=fs(_),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),g=_,On(y),g}const Vn=e=>{let t;for(const n in e)("class"===n||"style"===n||x(n))&&((t||(t={}))[n]=e[n]);return t},In=(e,t)=>{const n={};for(const o in e)C(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Bn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!Nn(n,s))return!0}return!1}function Ln({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const jn=e=>e.__isSuspense,Un={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){null==e?function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,p=u("div"),f=e.suspense=Hn(e,r,o,t,p,n,s,i,l,c);a(null,f.pendingBranch=e.ssContent,p,null,o,f,s,i),f.deps>0?(Dn(e,"onPending"),Dn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),Kn(f,e.ssFallback)):f.resolve()}(t,n,o,r,s,i,l,c,a):function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const f=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=p;if(m)p.pendingBranch=f,rs(f,m)?(c(m,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():g&&(c(h,d,n,o,r,null,s,i,l),Kn(p,d))):(p.pendingId++,v?(p.isHydrating=!1,p.activeBranch=m):a(m,r,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),g?(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():(c(h,d,n,o,r,null,s,i,l),Kn(p,d))):h&&rs(f,h)?(c(h,f,n,o,r,p,s,i,l),p.resolve(!0)):(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0&&p.resolve()));else if(h&&rs(f,h))c(h,f,n,o,r,p,s,i,l),Kn(p,f);else if(Dn(t,"onPending"),p.pendingBranch=f,p.pendingId++,c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0)p.resolve();else{const{timeout:e,pendingId:t}=p;e>0?setTimeout((()=>{p.pendingId===t&&p.fallback(d)}),e):0===e&&p.fallback(d)}}(e,t,n,o,r,i,l,c,a)},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=Hn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve();return u},create:Hn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=Wn(o?n.default:n),e.ssFallback=o?Wn(n.fallback):us(Kr)}};function Dn(e,t){const n=e.props&&e.props[t];F(n)&&n()}function Hn(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:p,m:f,um:d,n:h,o:{parentNode:m,remove:g}}=a,v=X(e.props&&e.props.timeout),y={vnode:e,parent:t,parentComponent:n,isSVG:i,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof v?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:i,container:l}=y;if(y.isHydrating)y.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===y.pendingId&&f(o,l,t,0)});let{anchor:t}=y;n&&(t=h(n),d(n,i,y,!0)),e||f(o,l,t,0)}Kn(y,o),y.pendingBranch=null,y.isInFallback=!1;let c=y.parent,a=!1;for(;c;){if(c.pendingBranch){c.effects.push(...s),a=!0;break}c=c.parent}a||vn(s),y.effects=[],Dn(t,"onResolve")},fallback(e){if(!y.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=y;Dn(t,"onFallback");const i=h(n),a=()=>{y.isInFallback&&(p(null,e,r,i,o,null,s,l,c),Kn(y,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),y.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){y.activeBranch&&f(y.activeBranch,e,t,n),y.container=e},next:()=>y.activeBranch&&h(y.activeBranch),registerDep(e,t){const n=!!y.pendingBranch;n&&y.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{Qt(t,e,0)})).then((r=>{if(e.isUnmounted||y.isUnmounted||y.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;Rs(e,r,!1),o&&(s.el=o);const l=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),y,i,c),l&&g(l),Ln(e,s.el),n&&0==--y.deps&&y.resolve()}))},unmount(e,t){y.isUnmounted=!0,y.activeBranch&&d(y.activeBranch,n,e,t),y.pendingBranch&&d(y.pendingBranch,n,e,t)}};return y}function Wn(e){let t;if(F(e)){const n=Qr&&e._c;n&&(e._d=!1,Yr()),e=e(),n&&(e._d=!0,t=Jr,Zr())}if(E(e)){const t=function(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!os(o))return;if(o.type!==Kr||"v-if"===o.children){if(t)return;t=o}}return t}(e);e=t}return e=gs(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function zn(e,t){t&&t.pendingBranch?E(e)?t.effects.push(...e):t.effects.push(e):vn(e)}function Kn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,Ln(o,r))}function Gn(e,t){if(Cs){let n=Cs.provides;const o=Cs.parent&&Cs.parent.provides;o===n&&(n=Cs.provides=Object.create(o)),n[e]=t}else;}function qn(e,t,n=!1){const o=Cs||En;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&F(t)?t.call(o.proxy):t}}function Jn(e,t){return eo(e,null,t)}function Yn(e,t){return eo(e,null,{flush:"post"})}function Zn(e,t){return eo(e,null,{flush:"sync"})}const Qn={};function Xn(e,t,n){return eo(e,t,n)}function eo(e,t,{immediate:n,deep:o,flush:r}=v){const s=Cs;let i,l,c=!1,a=!1;if(Rt(e)?(i=()=>e.value,c=Ct(e)):St(e)?(i=()=>e,o=!0):E(e)?(a=!0,c=e.some((e=>St(e)||Ct(e))),i=()=>e.map((e=>Rt(e)?e.value:St(e)?oo(e):F(e)?Yt(e,s,2):void 0))):i=F(e)?t?()=>Yt(e,s,2):()=>{if(!s||!s.isUnmounted)return l&&l(),Zt(e,s,3,[u])}:_,t&&o){const e=i;i=()=>oo(e())}let u=e=>{l=h.onStop=()=>{Yt(e,s,4)}},p=a?[]:Qn;const f=()=>{if(h.active)if(t){const e=h.run();(o||c||(a?e.some(((e,t)=>Y(e,p[t]))):Y(e,p)))&&(l&&l(),Zt(t,s,3,[e,p===Qn?void 0:p,u]),p=e)}else h.run()};let d;f.allowRecurse=!!t,d="sync"===r?f:"post"===r?()=>Pr(f,s&&s.suspense):()=>function(e){gn(e,rn,on,sn)}(f);const h=new ge(i,d);return t?n?f():p=h.run():"post"===r?Pr(h.run.bind(h),s&&s.suspense):h.run(),()=>{h.stop(),s&&s.scope&&k(s.scope.effects,h)}}function to(e,t,n){const o=this.proxy,r=P(e)?e.includes(".")?no(o,e):()=>o[e]:e.bind(o,o);let s;F(t)?s=t:(s=t.handler,n=t);const i=Cs;ks(this);const l=eo(r,s.bind(o),n);return i?ks(i):Ts(),l}function no(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function oo(e,t){if(!M(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),Rt(e))oo(e.value,t);else if(E(e))for(let n=0;n<e.length;n++)oo(e[n],t);else if(O(e)||$(e))e.forEach((e=>{oo(e,t)}));else if(L(e))for(const n in e)oo(e[n],t);return e}function ro(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Oo((()=>{e.isMounted=!0})),Po((()=>{e.isUnmounting=!0})),e}const so=[Function,Array],io={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:so,onEnter:so,onAfterEnter:so,onEnterCancelled:so,onBeforeLeave:so,onLeave:so,onAfterLeave:so,onLeaveCancelled:so,onBeforeAppear:so,onAppear:so,onAfterAppear:so,onAppearCancelled:so},setup(e,{slots:t}){const n=ws(),o=ro();let r;return()=>{const s=t.default&&fo(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1)for(const e of s)if(e.type!==Kr){i=e;break}const l=kt(e),{mode:c}=l;if(o.isLeaving)return ao(i);const a=uo(i);if(!a)return ao(i);const u=co(a,l,o,n);po(a,u);const p=n.subTree,f=p&&uo(p);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(f&&f.type!==Kr&&(!rs(a,f)||d)){const e=co(f,l,o,n);if(po(f,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},ao(i);"in-out"===c&&a.type!==Kr&&(e.delayLeave=(e,t,n)=>{lo(o,f)[String(f.key)]=f,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function lo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function co(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:f,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,_=String(e.key),b=lo(n,e),S=(e,t)=>{e&&Zt(e,o,9,t)},x=(e,t)=>{const n=t[1];S(e,t),E(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},C={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=m||l}t._leaveCb&&t._leaveCb(!0);const s=b[_];s&&rs(e,s)&&s.el._leaveCb&&s.el._leaveCb(),S(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=g||c,o=v||a,s=y||u}let i=!1;const l=e._enterCb=t=>{i||(i=!0,S(t?s:o,[e]),C.delayedLeave&&C.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();S(p,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,o(),S(n?h:d,[t]),t._leaveCb=void 0,b[r]===e&&delete b[r])};b[r]=e,f?x(f,[t,i]):i()},clone:e=>co(e,t,n,o)};return C}function ao(e){if(yo(e))return(e=fs(e)).children=null,e}function uo(e){return yo(e)?e.children?e.children[0]:void 0:e}function po(e,t){6&e.shapeFlag&&e.component?po(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function fo(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let i=e[s];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:s);i.type===Wr?(128&i.patchFlag&&r++,o=o.concat(fo(i.children,t,l))):(t||i.type!==Kr)&&o.push(null!=l?fs(i,{key:l}):i)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}function ho(e){return F(e)?{setup:e,name:e.name}:e}const mo=e=>!!e.type.__asyncLoader;function go(e){F(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const p=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,p()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return ho({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return c},setup(){const e=Cs;if(c)return()=>vo(c,e);const t=t=>{a=null,Qt(t,e,13,!o)};if(i&&e.suspense)return p().then((t=>()=>vo(t,e))).catch((e=>(t(e),()=>o?us(o,{error:e}):null)));const l=Ft(!1),u=Ft(),f=Ft(!!r);return r&&setTimeout((()=>{f.value=!1}),r),null!=s&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),p().then((()=>{l.value=!0,e.parent&&yo(e.parent.vnode)&&hn(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?vo(c,e):u.value&&o?us(o,{error:u.value}):n&&!f.value?us(n):void 0}})}function vo(e,{vnode:{ref:t,props:n,children:o}}){const r=us(e,n,o);return r.ref=t,r}const yo=e=>e.type.__isKeepAlive,_o={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=ws(),o=n.ctx,r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:p}}}=o,f=p("div");function d(e){ko(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=Bs(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);i&&t.type===i.type?i&&ko(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),Pr((()=>{s.isDeactivated=!1,s.a&&Z(s.a);const t=e.props&&e.props.onVnodeMounted;t&&bs(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;a(e,f,null,1,l),Pr((()=>{t.da&&Z(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&bs(n,t.parent,e),t.isDeactivated=!0}),l)},Xn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>bo(e,t))),t&&h((e=>!bo(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&r.set(g,To(n.subTree))};return Oo(v),Fo(v),Po((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=To(t);if(e.type!==r.type)d(e);else{ko(r);const e=r.component.da;e&&Pr(e,o)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!(os(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let l=To(o);const c=l.type,a=Bs(mo(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:p,max:f}=e;if(u&&(!a||!bo(u,a))||p&&a&&bo(p,a))return i=l,o;const d=null==l.key?c:l.key,h=r.get(d);return l.el&&(l=fs(l),128&o.shapeFlag&&(o.ssContent=l)),g=d,h?(l.el=h.el,l.component=h.component,l.transition&&po(l,l.transition),l.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),f&&s.size>parseInt(f,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,jn(o.type)?o:l}}};function bo(e,t){return E(e)?e.some((e=>bo(e,t))):P(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function So(e,t){Co(e,"a",t)}function xo(e,t){Co(e,"da",t)}function Co(e,t,n=Cs){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(No(t,o,n),n){let e=n.parent;for(;e&&e.parent;)yo(e.parent.vnode)&&wo(o,t,n,e),e=e.parent}}function wo(e,t,n,o){const r=No(t,e,o,!0);Ao((()=>{k(o[t],r)}),n)}function ko(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function To(e){return 128&e.shapeFlag?e.ssContent:e}function No(e,t,n=Cs,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;xe(),ks(n);const r=Zt(t,n,e,o);return Ts(),Ce(),r});return o?r.unshift(s):r.push(s),s}}const Eo=e=>(t,n=Cs)=>(!Os||"sp"===e)&&No(e,t,n),$o=Eo("bm"),Oo=Eo("m"),Ro=Eo("bu"),Fo=Eo("u"),Po=Eo("bum"),Ao=Eo("um"),Mo=Eo("sp"),Vo=Eo("rtg"),Io=Eo("rtc");function Bo(e,t=Cs){No("ec",e,t)}function Lo(e,t){const n=En;if(null===n)return e;const o=Vs(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,n,i,l=v]=t[s];F(e)&&(e={mounted:e,updated:e}),e.deep&&oo(n),r.push({dir:e,instance:o,value:n,oldValue:void 0,arg:i,modifiers:l})}return e}function jo(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let c=l.dir[o];c&&(xe(),Zt(c,n,8,[e.el,l,e,t]),Ce())}}function Uo(e,t){return zo("components",e,!0,t)||e}const Do=Symbol();function Ho(e){return P(e)?zo("components",e,!1)||e:e||Do}function Wo(e){return zo("directives",e)}function zo(e,t,n=!0,o=!1){const r=En||Cs;if(r){const n=r.type;if("components"===e){const e=Bs(n);if(e&&(e===t||e===z(t)||e===q(z(t))))return n}const s=Ko(r[e]||n[e],t)||Ko(r.appContext[e],t);return!s&&o?n:s}}function Ko(e,t){return e&&(e[t]||e[z(t)]||e[q(z(t))])}function Go(e,t,n,o){let r;const s=n&&n[o];if(E(e)||P(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(M(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[o]=t(e[i],i,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r}function qo(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(E(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.fn)}return e}function Jo(e,t,n={},o,r){if(En.isCE||En.parent&&mo(En.parent)&&En.parent.isCE)return us("slot","default"===t?null:{name:t},o&&o());let s=e[t];s&&s._c&&(s._d=!1),Yr();const i=s&&Yo(s(n)),l=ns(Wr,{key:n.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Yo(e){return e.some((e=>!os(e)||e.type!==Kr&&!(e.type===Wr&&!Yo(e.children))))?e:null}function Zo(e){const t={};for(const n in e)t[J(n)]=e[n];return t}const Qo=e=>e?Ns(e)?Vs(e)||e.proxy:Qo(e.parent):null,Xo=w(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qo(e.parent),$root:e=>Qo(e.root),$emit:e=>e.emit,$options:e=>ir(e),$forceUpdate:e=>e.f||(e.f=()=>hn(e.update)),$nextTick:e=>e.n||(e.n=dn.bind(e.proxy)),$watch:e=>to.bind(e)}),er={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:l,appContext:c}=e;let a;if("$"!==t[0]){const l=i[t];if(void 0!==l)switch(l){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(o!==v&&N(o,t))return i[t]=1,o[t];if(r!==v&&N(r,t))return i[t]=2,r[t];if((a=e.propsOptions[0])&&N(a,t))return i[t]=3,s[t];if(n!==v&&N(n,t))return i[t]=4,n[t];nr&&(i[t]=0)}}const u=Xo[t];let p,f;return u?("$attrs"===t&&we(e,0,t),u(e)):(p=l.__cssModules)&&(p=p[t])?p:n!==v&&N(n,t)?(i[t]=4,n[t]):(f=c.config.globalProperties,N(f,t)?f[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return r!==v&&N(r,t)?(r[t]=n,!0):o!==v&&N(o,t)?(o[t]=n,!0):!N(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let l;return!!n[i]||e!==v&&N(e,i)||t!==v&&N(t,i)||(l=s[0])&&N(l,i)||N(o,i)||N(Xo,i)||N(r.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:N(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},tr=w({},er,{get(e,t){if(t!==Symbol.unscopables)return er.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)});let nr=!0;function or(e){const t=ir(e),n=e.proxy,o=e.ctx;nr=!1,t.beforeCreate&&rr(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:p,mounted:f,beforeUpdate:d,updated:h,activated:m,deactivated:g,beforeUnmount:v,unmounted:y,render:b,renderTracked:S,renderTriggered:x,errorCaptured:C,serverPrefetch:w,expose:k,inheritAttrs:T,components:N,directives:$}=t;if(a&&function(e,t,n=_,o=!1){E(e)&&(e=ur(e));for(const r in e){const n=e[r];let s;s=M(n)?"default"in n?qn(n.from||r,n.default,!0):qn(n.from||r):qn(n),Rt(s)&&o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}(a,o,null,e.appContext.config.unwrapInjectedRef),i)for(const _ in i){const e=i[_];F(e)&&(o[_]=e.bind(n))}if(r){const t=r.call(n,n);M(t)&&(e.data=gt(t))}if(nr=!0,s)for(const E in s){const e=s[E],t=F(e)?e.bind(n,n):F(e.get)?e.get.bind(n,n):_,r=!F(e)&&F(e.set)?e.set.bind(n):_,i=js({get:t,set:r});Object.defineProperty(o,E,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(l)for(const _ in l)sr(l[_],o,n,_);if(c){const e=F(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{Gn(t,e[t])}))}function O(e,t){E(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&rr(u,e,"c"),O($o,p),O(Oo,f),O(Ro,d),O(Fo,h),O(So,m),O(xo,g),O(Bo,C),O(Io,S),O(Vo,x),O(Po,v),O(Ao,y),O(Mo,w),E(k))if(k.length){const t=e.exposed||(e.exposed={});k.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});b&&e.render===_&&(e.render=b),null!=T&&(e.inheritAttrs=T),N&&(e.components=N),$&&(e.directives=$)}function rr(e,t,n){Zt(E(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function sr(e,t,n,o){const r=o.includes(".")?no(n,o):()=>n[o];if(P(e)){const n=t[e];F(n)&&Xn(r,n)}else if(F(e))Xn(r,e.bind(n));else if(M(e))if(E(e))e.forEach((e=>sr(e,t,n,o)));else{const o=F(e.handler)?e.handler.bind(n):t[e.handler];F(o)&&Xn(r,o,e)}}function ir(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>lr(c,e,i,!0))),lr(c,t,i)):c=t,s.set(t,c),c}function lr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&lr(e,s,n,!0),r&&r.forEach((t=>lr(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=cr[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const cr={data:ar,props:fr,emits:fr,methods:fr,computed:fr,beforeCreate:pr,created:pr,beforeMount:pr,mounted:pr,beforeUpdate:pr,updated:pr,beforeDestroy:pr,beforeUnmount:pr,destroyed:pr,unmounted:pr,activated:pr,deactivated:pr,errorCaptured:pr,serverPrefetch:pr,components:fr,directives:fr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=w(Object.create(null),e);for(const o in t)n[o]=pr(e[o],t[o]);return n},provide:ar,inject:function(e,t){return fr(ur(e),ur(t))}};function ar(e,t){return t?e?function(){return w(F(e)?e.call(this,this):e,F(t)?t.call(this,this):t)}:t:e}function ur(e){if(E(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function pr(e,t){return e?[...new Set([].concat(e,t))]:t}function fr(e,t){return e?w(w(Object.create(null),e),t):t}function dr(e,t,n,o){const[r,s]=e.propsOptions;let i,l=!1;if(t)for(let c in t){if(U(c))continue;const a=t[c];let u;r&&N(r,u=z(c))?s&&s.includes(u)?(i||(i={}))[u]=a:n[u]=a:Nn(e.emitsOptions,c)||c in o&&a===o[c]||(o[c]=a,l=!0)}if(s){const t=kt(n),o=i||v;for(let i=0;i<s.length;i++){const l=s[i];n[l]=hr(r,t,l,o[l],e,!N(o,l))}}return l}function hr(e,t,n,o,r,s){const i=e[n];if(null!=i){const e=N(i,"default");if(e&&void 0===o){const e=i.default;if(i.type!==Function&&F(e)){const{propsDefaults:s}=r;n in s?o=s[n]:(ks(r),o=s[n]=e.call(null,t),Ts())}else o=e}i[0]&&(s&&!e?o=!1:!i[1]||""!==o&&o!==G(n)||(o=!0))}return o}function mr(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,i={},l=[];let c=!1;if(!F(e)){const o=e=>{c=!0;const[n,o]=mr(e,t,!0);w(i,n),o&&l.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return o.set(e,y),y;if(E(s))for(let u=0;u<s.length;u++){const e=z(s[u]);gr(e)&&(i[e]=v)}else if(s)for(const u in s){const e=z(u);if(gr(e)){const t=s[u],n=i[e]=E(t)||F(t)?{type:t}:t;if(n){const t=_r(Boolean,n.type),o=_r(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||N(n,"default"))&&l.push(e)}}}const a=[i,l];return o.set(e,a),a}function gr(e){return"$"!==e[0]}function vr(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function yr(e,t){return vr(e)===vr(t)}function _r(e,t){return E(t)?t.findIndex((t=>yr(t,e))):F(t)&&yr(t,e)?0:-1}const br=e=>"_"===e[0]||"$stable"===e,Sr=e=>E(e)?e.map(gs):[gs(e)],xr=(e,t,n)=>{if(t._n)return t;const o=An(((...e)=>Sr(t(...e))),n);return o._c=!1,o},Cr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(br(r))continue;const n=e[r];if(F(n))t[r]=xr(0,n,o);else if(null!=n){const e=Sr(n);t[r]=()=>e}}},wr=(e,t)=>{const n=Sr(t);e.slots.default=()=>n};function kr(){return{app:null,config:{isNativeTag:b,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Tr=0;function Nr(e,t){return function(n,o=null){F(n)||(n=Object.assign({},n)),null==o||M(o)||(o=null);const r=kr(),s=new Set;let i=!1;const l=r.app={_uid:Tr++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:oi,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&F(e.install)?(s.add(e),e.install(l,...t)):F(e)&&(s.add(e),e(l,...t))),l),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),l),component:(e,t)=>t?(r.components[e]=t,l):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,l):r.directives[e],mount(s,c,a){if(!i){const u=us(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),i=!0,l._container=s,s.__vue_app__=l,Vs(u.component)||u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,l)};return l}}function Er(e,t,n,o,r=!1){if(E(e))return void e.forEach(((e,s)=>Er(e,t&&(E(t)?t[s]:t),n,o,r)));if(mo(o)&&!r)return;const s=4&o.shapeFlag?Vs(o.component)||o.component.proxy:o.el,i=r?null:s,{i:l,r:c}=e,a=t&&t.r,u=l.refs===v?l.refs={}:l.refs,p=l.setupState;if(null!=a&&a!==c&&(P(a)?(u[a]=null,N(p,a)&&(p[a]=null)):Rt(a)&&(a.value=null)),F(c))Yt(c,l,12,[i,u]);else{const t=P(c),o=Rt(c);if(t||o){const o=()=>{if(e.f){const n=t?u[c]:c.value;r?E(n)&&k(n,s):E(n)?n.includes(s)||n.push(s):t?(u[c]=[s],N(p,c)&&(p[c]=u[c])):(c.value=[s],e.k&&(u[e.k]=c.value))}else t?(u[c]=i,N(p,c)&&(p[c]=i)):Rt(c)&&(c.value=i,e.k&&(u[e.k]=i))};i?(o.id=-1,Pr(o,n)):o()}}}let $r=!1;const Or=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,Rr=e=>8===e.nodeType;function Fr(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:l,insert:c,createComment:a}}=e,u=(n,o,l,a,g,v=!1)=>{const y=Rr(n)&&"["===n.data,_=()=>h(n,o,l,a,g,y),{type:b,ref:S,shapeFlag:x,patchFlag:C}=o,w=n.nodeType;o.el=n,-2===C&&(v=!1,o.dynamicChildren=null);let k=null;switch(b){case zr:3!==w?""===o.children?(c(o.el=r(""),i(n),n),k=n):k=_():(n.data!==o.children&&($r=!0,n.data=o.children),k=s(n));break;case Kr:k=8!==w||y?_():s(n);break;case Gr:if(1===w){k=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=k.outerHTML),t===o.staticCount-1&&(o.anchor=k),k=s(k);return k}k=_();break;case Wr:k=y?d(n,o,l,a,g,v):_();break;default:if(1&x)k=1!==w||o.type.toLowerCase()!==n.tagName.toLowerCase()?_():p(n,o,l,a,g,v);else if(6&x){o.slotScopeIds=g;const e=i(n);if(t(o,e,null,l,a,Or(e),v),k=y?m(n):s(n),k&&Rr(k)&&"teleport end"===k.data&&(k=s(k)),mo(o)){let t;y?(t=us(Wr),t.anchor=k?k.previousSibling:e.lastChild):t=3===n.nodeType?ds(""):us("div"),t.el=n,o.component.subTree=t}}else 64&x?k=8!==w?_():o.type.hydrate(n,o,l,a,g,v,e,f):128&x&&(k=o.type.hydrate(n,o,l,a,Or(i(n)),g,v,e,u))}return null!=S&&Er(S,null,a,o),k},p=(e,t,n,r,s,i)=>{i=i||!!t.dynamicChildren;const{type:c,props:a,patchFlag:u,shapeFlag:p,dirs:d}=t,h="input"===c&&d||"option"===c;if(h||-1!==u){if(d&&jo(t,null,n,"created"),a)if(h||!i||48&u)for(const t in a)(h&&t.endsWith("value")||x(t)&&!U(t))&&o(e,t,null,a[t],!1,void 0,n);else a.onClick&&o(e,"onClick",null,a.onClick,!1,void 0,n);let c;if((c=a&&a.onVnodeBeforeMount)&&bs(c,n,t),d&&jo(t,null,n,"beforeMount"),((c=a&&a.onVnodeMounted)||d)&&zn((()=>{c&&bs(c,n,t),d&&jo(t,null,n,"mounted")}),r),16&p&&(!a||!a.innerHTML&&!a.textContent)){let o=f(e.firstChild,t,e,n,r,s,i);for(;o;){$r=!0;const e=o;o=o.nextSibling,l(e)}}else 8&p&&e.textContent!==t.children&&($r=!0,e.textContent=t.children)}return e.nextSibling},f=(e,t,o,r,s,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let p=0;p<a;p++){const t=l?c[p]:c[p]=gs(c[p]);if(e)e=u(e,t,r,s,i,l);else{if(t.type===zr&&!t.children)continue;$r=!0,n(null,t,o,null,r,s,Or(o),i)}}return e},d=(e,t,n,o,r,l)=>{const{slotScopeIds:u}=t;u&&(r=r?r.concat(u):u);const p=i(e),d=f(s(e),t,p,n,o,r,l);return d&&Rr(d)&&"]"===d.data?s(t.anchor=d):($r=!0,c(t.anchor=a("]"),p,d),d)},h=(e,t,o,r,c,a)=>{if($r=!0,t.el=null,a){const t=m(e);for(;;){const n=s(e);if(!n||n===t)break;l(n)}}const u=s(e),p=i(e);return l(e),n(null,t,p,u,o,r,Or(p),c),u},m=e=>{let t=0;for(;e;)if((e=s(e))&&Rr(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),void _n();$r=!1,u(t.firstChild,e,null,null,null),_n(),$r&&console.error("Hydration completed but contains mismatches.")},u]}const Pr=zn;function Ar(e){return Vr(e)}function Mr(e){return Vr(e,Fr)}function Vr(e,t){(ee||(ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})).__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:s,createText:i,createComment:l,setText:c,setElementText:a,parentNode:u,nextSibling:p,setScopeId:f=_,cloneNode:d,insertStaticContent:h}=e,m=(e,t,n,o=null,r=null,s=null,i=!1,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!rs(e,t)&&(o=Y(e),H(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:p}=t;switch(a){case zr:g(e,t,n,o);break;case Kr:b(e,t,n,o);break;case Gr:null==e&&S(t,n,o,i);break;case Wr:R(e,t,n,o,r,s,i,l,c);break;default:1&p?x(e,t,n,o,r,s,i,l,c):6&p?F(e,t,n,o,r,s,i,l,c):(64&p||128&p)&&a.process(e,t,n,o,r,s,i,l,c,te)}null!=u&&r&&Er(u,e&&e.ref,s,t||e,!t)},g=(e,t,o,r)=>{if(null==e)n(t.el=i(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},b=(e,t,o,r)=>{null==e?n(t.el=l(t.children||""),o,r):t.el=e.el},S=(e,t,n,o)=>{[e.el,e.anchor]=h(e.children,t,n,o,e.el,e.anchor)},x=(e,t,n,o,r,s,i,l,c)=>{i=i||"svg"===t.type,null==e?C(t,n,o,r,s,i,l,c):E(e,t,r,s,i,l,c)},C=(e,t,o,i,l,c,u,p)=>{let f,h;const{type:m,props:g,shapeFlag:v,transition:y,patchFlag:_,dirs:b}=e;if(e.el&&void 0!==d&&-1===_)f=e.el=d(e.el);else{if(f=e.el=s(e.type,c,g&&g.is,g),8&v?a(f,e.children):16&v&&T(e.children,f,null,i,l,c&&"foreignObject"!==m,u,p),b&&jo(e,null,i,"created"),g){for(const t in g)"value"===t||U(t)||r(f,t,null,g[t],c,e.children,i,l,J);"value"in g&&r(f,"value",null,g.value),(h=g.onVnodeBeforeMount)&&bs(h,i,e)}k(f,e,e.scopeId,u,i)}b&&jo(e,null,i,"beforeMount");const S=(!l||l&&!l.pendingBranch)&&y&&!y.persisted;S&&y.beforeEnter(f),n(f,t,o),((h=g&&g.onVnodeMounted)||S||b)&&Pr((()=>{h&&bs(h,i,e),S&&y.enter(f),b&&jo(e,null,i,"mounted")}),l)},k=(e,t,n,o,r)=>{if(n&&f(e,n),o)for(let s=0;s<o.length;s++)f(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;k(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},T=(e,t,n,o,r,s,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?vs(e[a]):gs(e[a]);m(null,c,t,n,o,r,s,i,l)}},E=(e,t,n,o,s,i,l)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:p,dirs:f}=t;u|=16&e.patchFlag;const d=e.props||v,h=t.props||v;let m;n&&Ir(n,!1),(m=h.onVnodeBeforeUpdate)&&bs(m,n,t,e),f&&jo(t,e,n,"beforeUpdate"),n&&Ir(n,!0);const g=s&&"foreignObject"!==t.type;if(p?$(e.dynamicChildren,p,c,n,o,g,i):l||B(e,t,c,null,n,o,g,i,!1),u>0){if(16&u)O(c,t,d,h,n,o,s);else if(2&u&&d.class!==h.class&&r(c,"class",null,h.class,s),4&u&&r(c,"style",d.style,h.style,s),8&u){const i=t.dynamicProps;for(let t=0;t<i.length;t++){const l=i[t],a=d[l],u=h[l];u===a&&"value"!==l||r(c,l,a,u,s,e.children,n,o,J)}}1&u&&e.children!==t.children&&a(c,t.children)}else l||null!=p||O(c,t,d,h,n,o,s);((m=h.onVnodeUpdated)||f)&&Pr((()=>{m&&bs(m,n,t,e),f&&jo(t,e,n,"updated")}),o)},$=(e,t,n,o,r,s,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],p=c.el&&(c.type===Wr||!rs(c,a)||70&c.shapeFlag)?u(c.el):n;m(c,a,p,null,o,r,s,i,!0)}},O=(e,t,n,o,s,i,l)=>{if(n!==o){for(const c in o){if(U(c))continue;const a=o[c],u=n[c];a!==u&&"value"!==c&&r(e,c,u,a,l,t.children,s,i,J)}if(n!==v)for(const c in n)U(c)||c in o||r(e,c,n[c],null,l,t.children,s,i,J);"value"in o&&r(e,"value",n.value,o.value)}},R=(e,t,o,r,s,l,c,a,u)=>{const p=t.el=e?e.el:i(""),f=t.anchor=e?e.anchor:i("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(n(p,o,r),n(f,o,r),T(t.children,o,f,s,l,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?($(e.dynamicChildren,h,o,s,l,c,a),(null!=t.key||s&&t===s.subTree)&&Br(e,t,!0)):B(e,t,o,f,s,l,c,a,u)},F=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):P(t,n,o,r,s,i,c):A(e,t,c)},P=(e,t,n,o,r,s,i)=>{const l=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||Ss,s={uid:xs++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new ne(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:mr(o,r),emitsOptions:Tn(o,r),emit:null,emitted:null,propsDefaults:v,inheritAttrs:o.inheritAttrs,ctx:v,data:v,props:v,attrs:v,slots:v,refs:v,setupState:v,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=kn.bind(null,s),e.ce&&e.ce(s);return s}(e,o,r);if(yo(e)&&(l.ctx.renderer=te),function(e,t=!1){Os=t;const{props:n,children:o}=e.vnode,r=Ns(e);(function(e,t,n,o=!1){const r={},s={};Q(s,is,1),e.propsDefaults=Object.create(null),dr(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);e.props=n?o?r:vt(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=kt(t),Q(t,"_",n)):Cr(t,e.slots={})}else e.slots={},t&&wr(e,t);Q(e.slots,is,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Tt(new Proxy(e.ctx,er));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?Ms(e):null;ks(e),xe();const r=Yt(o,e,0,[e.props,n]);if(Ce(),Ts(),V(r)){if(r.then(Ts,Ts),t)return r.then((n=>{Rs(e,n,t)})).catch((t=>{Qt(t,e,0)}));e.asyncDep=r}else Rs(e,r,t)}else As(e,t)}(e,t):void 0;Os=!1}(l),l.asyncDep){if(r&&r.registerDep(l,M),!e.el){const e=l.subTree=us(Kr);b(null,e,t,n)}}else M(l,e,t,n,r,s,i)},A=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||Bn(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?Bn(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==o[n]&&!Nn(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void I(o,t,n);o.next=t,function(e){const t=tn.indexOf(e);t>nn&&tn.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},M=(e,t,n,o,r,s,i)=>{const l=e.effect=new ge((()=>{if(e.isMounted){let t,{next:n,bu:o,u:l,parent:c,vnode:a}=e,p=n;Ir(e,!1),n?(n.el=a.el,I(e,n,i)):n=a,o&&Z(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&bs(t,c,n,a),Ir(e,!0);const f=Mn(e),d=e.subTree;e.subTree=f,m(d,f,u(d.el),Y(d),e,r,s),n.el=f.el,null===p&&Ln(e,f.el),l&&Pr(l,r),(t=n.props&&n.props.onVnodeUpdated)&&Pr((()=>bs(t,c,n,a)),r)}else{let i;const{el:l,props:c}=t,{bm:a,m:u,parent:p}=e,f=mo(t);if(Ir(e,!1),a&&Z(a),!f&&(i=c&&c.onVnodeBeforeMount)&&bs(i,p,t),Ir(e,!0),l&&re){const n=()=>{e.subTree=Mn(e),re(l,e.subTree,e,r,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const i=e.subTree=Mn(e);m(null,i,n,o,e,r,s),t.el=i.el}if(u&&Pr(u,r),!f&&(i=c&&c.onVnodeMounted)){const e=t;Pr((()=>bs(i,p,e)),r)}(256&t.shapeFlag||p&&mo(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&Pr(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>hn(c)),e.scope),c=e.update=()=>l.run();c.id=e.uid,Ir(e,!0),c()},I=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=kt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;dr(e,t,r,s)&&(a=!0);for(const s in l)t&&(N(t,s)||(o=G(s))!==s&&N(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=hr(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&N(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let i=n[o];if(Nn(e.emitsOptions,i))continue;const u=t[i];if(c)if(N(s,i))u!==s[i]&&(s[i]=u,a=!0);else{const t=z(i);r[t]=hr(c,l,t,u,e,!1)}else u!==s[i]&&(s[i]=u,a=!0)}}a&&Te(e,"set","$attrs")}(e,t.props,o,n),((e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,i=v;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(w(r,t),n||1!==e||delete r._):(s=!t.$stable,Cr(t,r)),i=t}else t&&(wr(e,t),i={default:1});if(s)for(const l in r)br(l)||l in i||delete r[l]})(e,t.children,n),xe(),yn(void 0,e.update),Ce()},B=(e,t,n,o,r,s,i,l,c=!1)=>{const u=e&&e.children,p=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void j(u,f,n,o,r,s,i,l,c);if(256&d)return void L(u,f,n,o,r,s,i,l,c)}8&h?(16&p&&J(u,r,s),f!==u&&a(n,f)):16&p?16&h?j(u,f,n,o,r,s,i,l,c):J(u,r,s,!0):(8&p&&a(n,""),16&h&&T(f,n,o,r,s,i,l,c))},L=(e,t,n,o,r,s,i,l,c)=>{const a=(e=e||y).length,u=(t=t||y).length,p=Math.min(a,u);let f;for(f=0;f<p;f++){const o=t[f]=c?vs(t[f]):gs(t[f]);m(e[f],o,n,null,r,s,i,l,c)}a>u?J(e,r,s,!0,!1,p):T(t,n,o,r,s,i,l,c,p)},j=(e,t,n,o,r,s,i,l,c)=>{let a=0;const u=t.length;let p=e.length-1,f=u-1;for(;a<=p&&a<=f;){const o=e[a],u=t[a]=c?vs(t[a]):gs(t[a]);if(!rs(o,u))break;m(o,u,n,null,r,s,i,l,c),a++}for(;a<=p&&a<=f;){const o=e[p],a=t[f]=c?vs(t[f]):gs(t[f]);if(!rs(o,a))break;m(o,a,n,null,r,s,i,l,c),p--,f--}if(a>p){if(a<=f){const e=f+1,p=e<u?t[e].el:o;for(;a<=f;)m(null,t[a]=c?vs(t[a]):gs(t[a]),n,p,r,s,i,l,c),a++}}else if(a>f)for(;a<=p;)H(e[a],r,s,!0),a++;else{const d=a,h=a,g=new Map;for(a=h;a<=f;a++){const e=t[a]=c?vs(t[a]):gs(t[a]);null!=e.key&&g.set(e.key,a)}let v,_=0;const b=f-h+1;let S=!1,x=0;const C=new Array(b);for(a=0;a<b;a++)C[a]=0;for(a=d;a<=p;a++){const o=e[a];if(_>=b){H(o,r,s,!0);continue}let u;if(null!=o.key)u=g.get(o.key);else for(v=h;v<=f;v++)if(0===C[v-h]&&rs(o,t[v])){u=v;break}void 0===u?H(o,r,s,!0):(C[u-h]=a+1,u>=x?x=u:S=!0,m(o,t[u],n,null,r,s,i,l,c),_++)}const w=S?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(C):y;for(v=w.length-1,a=b-1;a>=0;a--){const e=h+a,p=t[e],f=e+1<u?t[e+1].el:o;0===C[a]?m(null,p,n,f,r,s,i,l,c):S&&(v<0||a!==w[v]?D(p,n,f,2):v--)}}},D=(e,t,o,r,s=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void D(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void l.move(e,t,o,te);if(l===Wr){n(i,t,o);for(let e=0;e<a.length;e++)D(a[e],t,o,r);return void n(e.anchor,t,o)}if(l===Gr)return void(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=p(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(i),n(i,t,o),Pr((()=>c.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,l=()=>n(i,t,o),a=()=>{e(i,(()=>{l(),s&&s()}))};r?r(i,l,a):a()}else n(i,t,o)},H=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:p,dirs:f}=e;if(null!=l&&Er(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&f,h=!mo(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&bs(m,t,e),6&u)q(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&jo(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,te,o):a&&(s!==Wr||p>0&&64&p)?J(a,t,n,!1,!0):(s===Wr&&384&p||!r&&16&u)&&J(c,t,n),o&&W(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&Pr((()=>{m&&bs(m,t,e),d&&jo(e,null,t,"unmounted")}),n)},W=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===Wr)return void K(n,r);if(t===Gr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=p(e),o(e),e=n;o(t)})(e);const i=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,i);o?o(e.el,i,r):r()}else i()},K=(e,t)=>{let n;for(;e!==t;)n=p(e),o(e),e=n;o(t)},q=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&Z(o),r.stop(),s&&(s.active=!1,H(i,e,t,n)),l&&Pr(l,t),Pr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},J=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i<e.length;i++)H(e[i],t,n,o,r)},Y=e=>6&e.shapeFlag?Y(e.component.subTree):128&e.shapeFlag?e.suspense.next():p(e.anchor||e.el),X=(e,t,n)=>{null==e?t._vnode&&H(t._vnode,null,null,!0):m(t._vnode||null,e,t,null,null,null,n),_n(),t._vnode=e},te={p:m,um:H,m:D,r:W,mt:P,mc:T,pc:B,pbc:$,n:Y,o:e};let oe,re;return t&&([oe,re]=t(te)),{render:X,hydrate:oe,createApp:Nr(X,oe)}}function Ir({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Br(e,t,n=!1){const o=e.children,r=t.children;if(E(o)&&E(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=vs(r[s]),t.el=e.el),n||Br(e,t))}}const Lr=e=>e&&(e.disabled||""===e.disabled),jr=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Ur=(e,t)=>{const n=e&&e.to;if(P(n)){if(t){return t(n)}return null}return n};function Dr(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,p=2===s;if(p&&o(i,t,n),(!p||Lr(u))&&16&c)for(let f=0;f<a.length;f++)r(a[f],t,n,2);p&&o(l,t,n)}const Hr={__isTeleport:!0,process(e,t,n,o,r,s,i,l,c,a){const{mc:u,pc:p,pbc:f,o:{insert:d,querySelector:h,createText:m}}=a,g=Lr(t.props);let{shapeFlag:v,children:y,dynamicChildren:_}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");d(e,n,o),d(a,n,o);const p=t.target=Ur(t.props,h),f=t.targetAnchor=m("");p&&(d(f,p),i=i||jr(p));const _=(e,t)=>{16&v&&u(y,e,t,r,s,i,l,c)};g?_(n,a):p&&_(p,f)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=Lr(e.props),v=m?n:u,y=m?o:d;if(i=i||jr(u),_?(f(e.dynamicChildren,_,v,r,s,i,l),Br(e,t,!0)):c||p(e,t,v,y,r,s,i,l,!1),g)m||Dr(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Ur(t.props,h);e&&Dr(t,e,null,a,0)}else m&&Dr(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:p,props:f}=e;if(p&&s(u),(i||!Lr(f))&&(s(a),16&l))for(let d=0;d<c.length;d++){const e=c[d];r(e,t,n,!0,!!e.dynamicChildren)}},move:Dr,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=Ur(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(Lr(t.props))t.anchor=a(i(e),t,l(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=i(e);let l=c;for(;l;)if(l=i(l),l&&8===l.nodeType&&"teleport anchor"===l.data){t.targetAnchor=l,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(c,t,u,n,o,r,s)}}return t.anchor&&i(t.anchor)}},Wr=Symbol(void 0),zr=Symbol(void 0),Kr=Symbol(void 0),Gr=Symbol(void 0),qr=[];let Jr=null;function Yr(e=!1){qr.push(Jr=e?null:[])}function Zr(){qr.pop(),Jr=qr[qr.length-1]||null}let Qr=1;function Xr(e){Qr+=e}function es(e){return e.dynamicChildren=Qr>0?Jr||y:null,Zr(),Qr>0&&Jr&&Jr.push(e),e}function ts(e,t,n,o,r,s){return es(as(e,t,n,o,r,s,!0))}function ns(e,t,n,o,r){return es(us(e,t,n,o,r,!0))}function os(e){return!!e&&!0===e.__v_isVNode}function rs(e,t){return e.type===t.type&&e.key===t.key}function ss(e){}const is="__vInternal",ls=({key:e})=>null!=e?e:null,cs=({ref:e,ref_key:t,ref_for:n})=>null!=e?P(e)||Rt(e)||F(e)?{i:En,r:e,k:t,f:!!n}:e:null;function as(e,t=null,n=null,o=0,r=null,s=(e===Wr?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ls(t),ref:t&&cs(t),scopeId:$n,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return l?(ys(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=P(n)?8:16),Qr>0&&!i&&Jr&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Jr.push(c),c}const us=function(e,t=null,n=null,o=0,s=null,i=!1){e&&e!==Do||(e=Kr);if(os(e)){const o=fs(e,t,!0);return n&&ys(o,n),Qr>0&&!i&&Jr&&(6&o.shapeFlag?Jr[Jr.indexOf(e)]=o:Jr.push(o)),o.patchFlag|=-2,o}l=e,F(l)&&"__vccOpts"in l&&(e=e.__vccOpts);var l;if(t){t=ps(t);let{class:e,style:n}=t;e&&!P(e)&&(t.class=c(e)),M(n)&&(wt(n)&&!E(n)&&(n=w({},n)),t.style=r(n))}const a=P(e)?1:jn(e)?128:(e=>e.__isTeleport)(e)?64:M(e)?4:F(e)?2:0;return as(e,t,n,o,s,a,i,!0)};function ps(e){return e?wt(e)||is in e?w({},e):e:null}function fs(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?_s(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ls(l),ref:t&&t.ref?n&&r?E(r)?r.concat(cs(t)):[r,cs(t)]:cs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Wr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fs(e.ssContent),ssFallback:e.ssFallback&&fs(e.ssFallback),el:e.el,anchor:e.anchor}}function ds(e=" ",t=0){return us(zr,null,e,t)}function hs(e,t){const n=us(Gr,null,e);return n.staticCount=t,n}function ms(e="",t=!1){return t?(Yr(),ns(Kr,null,e)):us(Kr,null,e)}function gs(e){return null==e||"boolean"==typeof e?us(Kr):E(e)?us(Wr,null,e.slice()):"object"==typeof e?vs(e):us(zr,null,String(e))}function vs(e){return null===e.el||e.memo?e:fs(e)}function ys(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(E(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),ys(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||is in t?3===o&&En&&(1===En.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=En}}else F(t)?(t={default:t,_ctx:En},n=32):(t=String(t),64&o?(n=16,t=[ds(t)]):n=8);e.children=t,e.shapeFlag|=n}function _s(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=c([t.class,o.class]));else if("style"===e)t.style=r([t.style,o.style]);else if(x(e)){const n=t[e],r=o[e];!r||n===r||E(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function bs(e,t,n,o=null){Zt(e,t,7,[n,o])}const Ss=kr();let xs=0;let Cs=null;const ws=()=>Cs||En,ks=e=>{Cs=e,e.scope.on()},Ts=()=>{Cs&&Cs.scope.off(),Cs=null};function Ns(e){return 4&e.vnode.shapeFlag}let Es,$s,Os=!1;function Rs(e,t,n){F(t)?e.render=t:M(t)&&(e.setupState=Lt(t)),As(e,n)}function Fs(e){Es=e,$s=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,tr))}}const Ps=()=>!Es;function As(e,t,n){const o=e.type;if(!e.render){if(!t&&Es&&!o.render){const t=o.template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=w(w({isCustomElement:n,delimiters:s},r),i);o.render=Es(t,l)}}e.render=o.render||_,$s&&$s(e)}ks(e),xe(),or(e),Ce(),Ts()}function Ms(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(we(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}function Vs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Lt(Tt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Xo?Xo[n](e):void 0}))}const Is=/(?:^|[-_])(\w)/g;function Bs(e){return F(e)&&e.displayName||e.name}function Ls(e,t,n=!1){let o=Bs(t);if(!o&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(o=e[1])}if(!o&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};o=n(e.components||e.parent.type.components)||n(e.appContext.components)}return o?o.replace(Is,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}const js=(e,t)=>function(e,t,n=!1){let o,r;const s=F(e);return s?(o=e,r=_):(o=e.get,r=e.set),new zt(o,r,s||!r,n)}(e,0,Os);function Us(){return null}function Ds(){return null}function Hs(e){}function Ws(e,t){return null}function zs(){return Gs().slots}function Ks(){return Gs().attrs}function Gs(){const e=ws();return e.setupContext||(e.setupContext=Ms(e))}function qs(e,t){const n=E(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const o in t){const e=n[o];e?E(e)||F(e)?n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(n[o]={default:t[o]})}return n}function Js(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Ys(e){const t=ws();let n=e();return Ts(),V(n)&&(n=n.catch((e=>{throw ks(t),e}))),[n,()=>ks(t)]}function Zs(e,t,n){const o=arguments.length;return 2===o?M(t)&&!E(t)?os(t)?us(e,null,[t]):us(e,t):us(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&os(n)&&(n=[n]),us(e,t,n))}const Qs=Symbol(""),Xs=()=>{{const e=qn(Qs);return e||Gt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function ei(){}function ti(e,t,n,o){const r=n[o];if(r&&ni(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function ni(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(Y(n[o],t[o]))return!1;return Qr>0&&Jr&&Jr.push(e),!0}const oi="3.2.36",ri=null,si=null,ii=null,li="undefined"!=typeof document?document:null,ci=li&&li.createElement("template"),ai={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?li.createElementNS("http://www.w3.org/2000/svg",e):li.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>li.createTextNode(e),createComment:e=>li.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>li.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{ci.innerHTML=o?`<svg>${e}</svg>`:e;const r=ci.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const ui=/\s*!important$/;function pi(e,t,n){if(E(n))n.forEach((n=>pi(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=di[t];if(n)return n;let o=z(t);if("filter"!==o&&o in e)return di[t]=o;o=q(o);for(let r=0;r<fi.length;r++){const n=fi[r]+o;if(n in e)return di[t]=n}return t}(e,t);ui.test(n)?e.setProperty(G(o),n.replace(ui,""),"important"):e[o]=n}}const fi=["Webkit","Moz","ms"],di={};const hi="http://www.w3.org/1999/xlink";const[mi,gi]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let vi=0;const yi=Promise.resolve(),_i=()=>{vi=0};function bi(e,t,n,o){e.addEventListener(t,n,o)}function Si(e,t,n,o,r=null){const s=e._vei||(e._vei={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(xi.test(e)){let n;for(t={};n=e.match(xi);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[G(e.slice(2)),t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{const o=e.timeStamp||mi();(gi||o>=n.attached-1)&&Zt(function(e,t){if(E(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>vi||(yi.then(_i),vi=mi()))(),n}(o,r);bi(e,n,i,l)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}const xi=/(?:Once|Passive|Capture)$/;const Ci=/^on[a-z]/;function wi(e,t){const n=ho(e);class o extends Ni{constructor(e){super(n,e,t)}}return o.def=n,o}const ki=e=>wi(e,Tl),Ti="undefined"!=typeof HTMLElement?HTMLElement:class{};class Ni extends Ti{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,dn((()=>{this._connected||(kl(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=e=>{const{props:t,styles:n}=e,o=!E(t),r=t?o?Object.keys(t):t:[];let s;if(o)for(const i in this._props){const e=t[i];(e===Number||e&&e.type===Number)&&(this._props[i]=X(this._props[i]),(s||(s=Object.create(null)))[i]=!0)}this._numberProps=s;for(const i of Object.keys(this))"_"!==i[0]&&this._setProp(i,this[i],!0,!1);for(const i of r.map(z))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(e){this._setProp(i,e)}});this._applyStyles(n),this._update()},t=this._def.__asyncLoader;t?t().then(e):e(this._def)}_setAttr(e){let t=this.getAttribute(e);this._numberProps&&this._numberProps[e]&&(t=X(t)),this._setProp(z(e),t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(G(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(G(e),t+""):t||this.removeAttribute(G(e))))}_update(){kl(this._createVNode(),this.shadowRoot)}_createVNode(){const e=us(this._def,w({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0,e.emit=(e,...t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Ni){e.parent=t._instance;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Ei(e="$style"){{const t=ws();if(!t)return v;const n=t.type.__cssModules;if(!n)return v;const o=n[e];return o||v}}function $i(e){const t=ws();if(!t)return;const n=()=>Oi(t.subTree,e(t.proxy));Yn(n),Oo((()=>{const e=new MutationObserver(n);e.observe(t.subTree.el.parentNode,{childList:!0}),Ao((()=>e.disconnect()))}))}function Oi(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Oi(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Ri(e.el,t);else if(e.type===Wr)e.children.forEach((e=>Oi(e,t)));else if(e.type===Gr){let{el:n,anchor:o}=e;for(;n&&(Ri(n,t),n!==o);)n=n.nextSibling}}function Ri(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Fi=(e,{slots:t})=>Zs(io,Ii(e),t);Fi.displayName="Transition";const Pi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ai=Fi.props=w({},io.props,Pi),Mi=(e,t=[])=>{E(e)?e.forEach((e=>e(...t))):e&&e(...t)},Vi=e=>!!e&&(E(e)?e.some((e=>e.length>1)):e.length>1);function Ii(e){const t={};for(const w in e)w in Pi||(t[w]=e[w]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=i,appearToClass:u=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(M(e))return[Bi(e.enter),Bi(e.leave)];{const t=Bi(e);return[t,t]}}(r),m=h&&h[0],g=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:_,onLeave:b,onLeaveCancelled:S,onBeforeAppear:x=v,onAppear:C=y,onAppearCancelled:k=_}=t,T=(e,t,n)=>{ji(e,t?u:l),ji(e,t?a:i),n&&n()},N=(e,t)=>{e._isLeaving=!1,ji(e,p),ji(e,d),ji(e,f),t&&t()},E=e=>(t,n)=>{const r=e?C:y,i=()=>T(t,e,n);Mi(r,[t,i]),Ui((()=>{ji(t,e?c:s),Li(t,e?u:l),Vi(r)||Hi(t,o,m,i)}))};return w(t,{onBeforeEnter(e){Mi(v,[e]),Li(e,s),Li(e,i)},onBeforeAppear(e){Mi(x,[e]),Li(e,c),Li(e,a)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>N(e,t);Li(e,p),Gi(),Li(e,f),Ui((()=>{e._isLeaving&&(ji(e,p),Li(e,d),Vi(b)||Hi(e,o,g,n))})),Mi(b,[e,n])},onEnterCancelled(e){T(e,!1),Mi(_,[e])},onAppearCancelled(e){T(e,!0),Mi(k,[e])},onLeaveCancelled(e){N(e),Mi(S,[e])}})}function Bi(e){return X(e)}function Li(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function ji(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Ui(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Di=0;function Hi(e,t,n,o){const r=e._endId=++Di,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=Wi(e,t);if(!i)return o();const a=i+"end";let u=0;const p=()=>{e.removeEventListener(a,f),s()},f=t=>{t.target===e&&++u>=c&&p()};setTimeout((()=>{u<c&&p()}),l+1),e.addEventListener(a,f)}function Wi(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),i=zi(r,s),l=o("animationDelay"),c=o("animationDuration"),a=zi(l,c);let u=null,p=0,f=0;"transition"===t?i>0&&(u="transition",p=i,f=s.length):"animation"===t?a>0&&(u="animation",p=a,f=c.length):(p=Math.max(i,a),u=p>0?i>a?"transition":"animation":null,f=u?"transition"===u?s.length:c.length:0);return{type:u,timeout:p,propCount:f,hasTransform:"transition"===u&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}function zi(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Ki(t)+Ki(e[n]))))}function Ki(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Gi(){return document.body.offsetHeight}const qi=new WeakMap,Ji=new WeakMap,Yi={name:"TransitionGroup",props:w({},Ai,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ws(),o=ro();let r,s;return Fo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=Wi(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(Zi),r.forEach(Qi);const o=r.filter(Xi);Gi(),o.forEach((e=>{const n=e.el,o=n.style;Li(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,ji(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=kt(e),l=Ii(i);let c=i.tag||Wr;r=s,s=t.default?fo(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&po(t,co(t,l,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];po(t,co(t,l,o,n)),qi.set(t,t.el.getBoundingClientRect())}return us(c,null,s)}}};function Zi(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function Qi(e){Ji.set(e,e.el.getBoundingClientRect())}function Xi(e){const t=qi.get(e),n=Ji.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const el=e=>{const t=e.props["onUpdate:modelValue"]||!1;return E(t)?e=>Z(t,e):t};function tl(e){e.target.composing=!0}function nl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ol={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=el(r);const s=o||r.props&&"number"===r.props.type;bi(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=X(o)),e._assign(o)})),n&&bi(e,"change",(()=>{e.value=e.value.trim()})),t||(bi(e,"compositionstart",tl),bi(e,"compositionend",nl),bi(e,"change",nl))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=el(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&X(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},rl={deep:!0,created(e,t,n){e._assign=el(n),bi(e,"change",(()=>{const t=e._modelValue,n=al(e),o=e.checked,r=e._assign;if(E(t)){const e=h(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(O(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(ul(e,o))}))},mounted:sl,beforeUpdate(e,t,n){e._assign=el(n),sl(e,t,n)}};function sl(e,{value:t,oldValue:n},o){e._modelValue=t,E(t)?e.checked=h(t,o.props.value)>-1:O(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=d(t,ul(e,!0)))}const il={created(e,{value:t},n){e.checked=d(t,n.props.value),e._assign=el(n),bi(e,"change",(()=>{e._assign(al(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=el(o),t!==n&&(e.checked=d(t,o.props.value))}},ll={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=O(t);bi(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?X(al(e)):al(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=el(o)},mounted(e,{value:t}){cl(e,t)},beforeUpdate(e,t,n){e._assign=el(n)},updated(e,{value:t}){cl(e,t)}};function cl(e,t){const n=e.multiple;if(!n||E(t)||O(t)){for(let o=0,r=e.options.length;o<r;o++){const r=e.options[o],s=al(r);if(n)r.selected=E(t)?h(t,s)>-1:t.has(s);else if(d(al(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function al(e){return"_value"in e?e._value:e.value}function ul(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const pl={created(e,t,n){fl(e,t,n,null,"created")},mounted(e,t,n){fl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){fl(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){fl(e,t,n,o,"updated")}};function fl(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return ll;case"TEXTAREA":return ol;default:switch(t){case"checkbox":return rl;case"radio":return il;default:return ol}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const dl=["ctrl","shift","alt","meta"],hl={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>dl.some((n=>e[`${n}Key`]&&!t.includes(n)))},ml=(e,t)=>(n,...o)=>{for(let e=0;e<t.length;e++){const o=hl[t[e]];if(o&&o(n,t))return}return e(n,...o)},gl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},vl=(e,t)=>n=>{if(!("key"in n))return;const o=G(n.key);return t.some((e=>e===o||gl[e]===o))?e(n):void 0},yl={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):_l(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),_l(e,!0),o.enter(e)):o.leave(e,(()=>{_l(e,!1)})):_l(e,t))},beforeUnmount(e,{value:t}){_l(e,t)}};function _l(e,t){e.style.display=t?e._vod:"none"}const bl=w({patchProp:(e,t,r,s,i=!1,l,c,a,u)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,i):"style"===t?function(e,t,n){const o=e.style,r=P(n);if(n&&!r){for(const e in n)pi(o,e,n[e]);if(t&&!P(t))for(const e in t)null==n[e]&&pi(o,e,"")}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,r,s):x(t)?C(t)||Si(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&Ci.test(t)&&F(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Ci.test(t)&&P(n))return!1;return t in e}(e,t,s,i))?function(e,t,n,r,s,i,l){if("innerHTML"===t||"textContent"===t)return r&&l(r,s,i),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const o=null==n?"":n;return e.value===o&&"OPTION"!==e.tagName||(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=o(n):null==n&&"string"===r?(n="",c=!0):"number"===r&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,l,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,r,s,i){if(s&&t.startsWith("xlink:"))null==r?e.removeAttributeNS(hi,t.slice(6,t.length)):e.setAttributeNS(hi,t,r);else{const s=n(t);null==r||s&&!o(r)?e.removeAttribute(t):e.setAttribute(t,s?"":r)}}(e,t,s,i))}},ai);let Sl,xl=!1;function Cl(){return Sl||(Sl=Ar(bl))}function wl(){return Sl=xl?Sl:Mr(bl),xl=!0,Sl}const kl=(...e)=>{Cl().render(...e)},Tl=(...e)=>{wl().hydrate(...e)},Nl=(...e)=>{const t=Cl().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=$l(e);if(!o)return;const r=t._component;F(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},El=(...e)=>{const t=wl().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=$l(e);if(t)return n(t,!0,t instanceof SVGElement)},t};function $l(e){if(P(e)){return document.querySelector(e)}return e}const Ol=_;var Rl=Object.freeze({__proto__:null,render:kl,hydrate:Tl,createApp:Nl,createSSRApp:El,initDirectivesForSSR:Ol,defineCustomElement:wi,defineSSRCustomElement:ki,VueElement:Ni,useCssModule:Ei,useCssVars:$i,Transition:Fi,TransitionGroup:Yi,vModelText:ol,vModelCheckbox:rl,vModelRadio:il,vModelSelect:ll,vModelDynamic:pl,withModifiers:ml,withKeys:vl,vShow:yl,reactive:gt,ref:Ft,readonly:yt,unref:It,proxyRefs:Lt,isRef:Rt,toRef:Wt,toRefs:Dt,isProxy:wt,isReactive:St,isReadonly:xt,isShallow:Ct,customRef:Ut,triggerRef:Vt,shallowRef:Pt,shallowReactive:vt,shallowReadonly:_t,markRaw:Tt,toRaw:kt,effect:ye,stop:_e,ReactiveEffect:ge,effectScope:oe,EffectScope:ne,getCurrentScope:se,onScopeDispose:ie,computed:js,watch:Xn,watchEffect:Jn,watchPostEffect:Yn,watchSyncEffect:Zn,onBeforeMount:$o,onMounted:Oo,onBeforeUpdate:Ro,onUpdated:Fo,onBeforeUnmount:Po,onUnmounted:Ao,onActivated:So,onDeactivated:xo,onRenderTracked:Io,onRenderTriggered:Vo,onErrorCaptured:Bo,onServerPrefetch:Mo,provide:Gn,inject:qn,nextTick:dn,defineComponent:ho,defineAsyncComponent:go,useAttrs:Ks,useSlots:zs,defineProps:Us,defineEmits:Ds,defineExpose:Hs,withDefaults:Ws,mergeDefaults:qs,createPropsRestProxy:Js,withAsyncContext:Ys,getCurrentInstance:ws,h:Zs,createVNode:us,cloneVNode:fs,mergeProps:_s,isVNode:os,Fragment:Wr,Text:zr,Comment:Kr,Static:Gr,Teleport:Hr,Suspense:Un,KeepAlive:_o,BaseTransition:io,withDirectives:Lo,useSSRContext:Xs,ssrContextKey:Qs,createRenderer:Ar,createHydrationRenderer:Mr,queuePostFlushCb:vn,warn:Gt,handleError:Qt,callWithErrorHandling:Yt,callWithAsyncErrorHandling:Zt,resolveComponent:Uo,resolveDirective:Wo,resolveDynamicComponent:Ho,registerRuntimeCompiler:Fs,isRuntimeOnly:Ps,useTransitionState:ro,resolveTransitionHooks:co,setTransitionHooks:po,getTransitionRawChildren:fo,initCustomFormatter:ei,get devtools(){return xn},setDevtoolsHook:wn,withCtx:An,pushScopeId:Rn,popScopeId:Fn,withScopeId:Pn,renderList:Go,toHandlers:Zo,renderSlot:Jo,createSlots:qo,withMemo:ti,isMemoSame:ni,openBlock:Yr,createBlock:ns,setBlockTracking:Xr,createTextVNode:ds,createCommentVNode:ms,createStaticVNode:hs,createElementVNode:as,createElementBlock:ts,guardReactiveProps:ps,toDisplayString:m,camelize:z,capitalize:q,toHandlerKey:J,normalizeProps:a,normalizeClass:c,normalizeStyle:r,transformVNodeArgs:ss,version:oi,ssrUtils:null,resolveFilter:null,compatUtils:null});function Fl(e){throw e}function Pl(e){}function Al(e,t,n,o){const r=new SyntaxError(String(e));return r.code=e,r.loc=t,r}const Ml=Symbol(""),Vl=Symbol(""),Il=Symbol(""),Bl=Symbol(""),Ll=Symbol(""),jl=Symbol(""),Ul=Symbol(""),Dl=Symbol(""),Hl=Symbol(""),Wl=Symbol(""),zl=Symbol(""),Kl=Symbol(""),Gl=Symbol(""),ql=Symbol(""),Jl=Symbol(""),Yl=Symbol(""),Zl=Symbol(""),Ql=Symbol(""),Xl=Symbol(""),ec=Symbol(""),tc=Symbol(""),nc=Symbol(""),oc=Symbol(""),rc=Symbol(""),sc=Symbol(""),ic=Symbol(""),lc=Symbol(""),cc=Symbol(""),ac=Symbol(""),uc=Symbol(""),pc=Symbol(""),fc=Symbol(""),dc=Symbol(""),hc=Symbol(""),mc=Symbol(""),gc=Symbol(""),vc=Symbol(""),yc=Symbol(""),_c=Symbol(""),bc={[Ml]:"Fragment",[Vl]:"Teleport",[Il]:"Suspense",[Bl]:"KeepAlive",[Ll]:"BaseTransition",[jl]:"openBlock",[Ul]:"createBlock",[Dl]:"createElementBlock",[Hl]:"createVNode",[Wl]:"createElementVNode",[zl]:"createCommentVNode",[Kl]:"createTextVNode",[Gl]:"createStaticVNode",[ql]:"resolveComponent",[Jl]:"resolveDynamicComponent",[Yl]:"resolveDirective",[Zl]:"resolveFilter",[Ql]:"withDirectives",[Xl]:"renderList",[ec]:"renderSlot",[tc]:"createSlots",[nc]:"toDisplayString",[oc]:"mergeProps",[rc]:"normalizeClass",[sc]:"normalizeStyle",[ic]:"normalizeProps",[lc]:"guardReactiveProps",[cc]:"toHandlers",[ac]:"camelize",[uc]:"capitalize",[pc]:"toHandlerKey",[fc]:"setBlockTracking",[dc]:"pushScopeId",[hc]:"popScopeId",[mc]:"withCtx",[gc]:"unref",[vc]:"isRef",[yc]:"withMemo",[_c]:"isMemoSame"};const Sc={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function xc(e,t,n,o,r,s,i,l=!1,c=!1,a=!1,u=Sc){return e&&(l?(e.helper(jl),e.helper(Zc(e.inSSR,a))):e.helper(Yc(e.inSSR,a)),i&&e.helper(Ql)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function Cc(e,t=Sc){return{type:17,loc:t,elements:e}}function wc(e,t=Sc){return{type:15,loc:t,properties:e}}function kc(e,t){return{type:16,loc:Sc,key:P(e)?Tc(e,!0):e,value:t}}function Tc(e,t=!1,n=Sc,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function Nc(e,t=Sc){return{type:8,loc:t,children:e}}function Ec(e,t=[],n=Sc){return{type:14,loc:n,callee:e,arguments:t}}function $c(e,t,n=!1,o=!1,r=Sc){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function Oc(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:Sc}}const Rc=e=>4===e.type&&e.isStatic,Fc=(e,t)=>e===t||e===G(t);function Pc(e){return Fc(e,"Teleport")?Vl:Fc(e,"Suspense")?Il:Fc(e,"KeepAlive")?Bl:Fc(e,"BaseTransition")?Ll:void 0}const Ac=/^\d|[^\$\w]/,Mc=e=>!Ac.test(e),Vc=/[A-Za-z_$\xA0-\uFFFF]/,Ic=/[\.\?\w$\xA0-\uFFFF]/,Bc=/\s+[.[]\s*|\s*[.[]\s+/g,Lc=e=>{e=e.trim().replace(Bc,(e=>e.trim()));let t=0,n=[],o=0,r=0,s=null;for(let i=0;i<e.length;i++){const l=e.charAt(i);switch(t){case 0:if("["===l)n.push(t),t=1,o++;else if("("===l)n.push(t),t=2,r++;else if(!(0===i?Vc:Ic).test(l))return!1;break;case 1:"'"===l||'"'===l||"`"===l?(n.push(t),t=3,s=l):"["===l?o++:"]"===l&&(--o||(t=n.pop()));break;case 2:if("'"===l||'"'===l||"`"===l)n.push(t),t=3,s=l;else if("("===l)r++;else if(")"===l){if(i===e.length-1)return!1;--r||(t=n.pop())}break;case 3:l===s&&(t=n.pop(),s=null)}}return!o&&!r};function jc(e,t,n){const o={source:e.source.slice(t,t+n),start:Uc(e.start,e.source,t),end:e.end};return null!=n&&(o.end=Uc(e.start,e.source,t+n)),o}function Uc(e,t,n=t.length){return Dc(w({},e),t,n)}function Dc(e,t,n=t.length){let o=0,r=-1;for(let s=0;s<n;s++)10===t.charCodeAt(s)&&(o++,r=s);return e.offset+=n,e.line+=o,e.column=-1===r?e.column+n:n-r,e}function Hc(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(7===r.type&&(n||r.exp)&&(P(t)?r.name===t:t.test(r.name)))return r}}function Wc(e,t,n=!1,o=!1){for(let r=0;r<e.props.length;r++){const s=e.props[r];if(6===s.type){if(n)continue;if(s.name===t&&(s.value||o))return s}else if("bind"===s.name&&(s.exp||o)&&zc(s.arg,t))return s}}function zc(e,t){return!(!e||!Rc(e)||e.content!==t)}function Kc(e){return 5===e.type||2===e.type}function Gc(e){return 7===e.type&&"slot"===e.name}function qc(e){return 1===e.type&&3===e.tagType}function Jc(e){return 1===e.type&&2===e.tagType}function Yc(e,t){return e||t?Hl:Wl}function Zc(e,t){return e||t?Ul:Dl}const Qc=new Set([ic,lc]);function Xc(e,t=[]){if(e&&!P(e)&&14===e.type){const n=e.callee;if(!P(n)&&Qc.has(n))return Xc(e.arguments[0],t.concat(e))}return[e,t]}function ea(e,t,n){let o,r,s=13===e.type?e.props:e.arguments[2],i=[];if(s&&!P(s)&&14===s.type){const e=Xc(s);s=e[0],i=e[1],r=i[i.length-1]}if(null==s||P(s))o=wc([t]);else if(14===s.type){const e=s.arguments[0];P(e)||15!==e.type?s.callee===cc?o=Ec(n.helper(oc),[wc([t]),s]):s.arguments.unshift(wc([t])):e.properties.unshift(t),!o&&(o=s)}else if(15===s.type){let e=!1;if(4===t.key.type){const n=t.key.content;e=s.properties.some((e=>4===e.key.type&&e.key.content===n))}e||s.properties.unshift(t),o=s}else o=Ec(n.helper(oc),[wc([t]),s]),r&&r.callee===lc&&(r=i[i.length-2]);13===e.type?r?r.arguments[0]=o:e.props=o:r?r.arguments[0]=o:e.arguments[2]=o}function ta(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function na(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Yc(o,e.isComponent)),t(jl),t(Zc(o,e.isComponent)))}const oa=/&(gt|lt|amp|apos|quot);/g,ra={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},sa={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:b,isPreTag:b,isCustomElement:b,decodeEntities:e=>e.replace(oa,((e,t)=>ra[t])),onError:Fl,onWarn:Pl,comments:!1};function ia(e,t={}){const n=function(e,t){const n=w({},sa);let o;for(o in t)n[o]=void 0===t[o]?sa[o]:t[o];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),o=ba(n);return function(e,t=Sc){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}(la(n,0,[]),Sa(n,o))}function la(e,t,n){const o=xa(n),r=o?o.ns:0,s=[];for(;!Na(e,t,n);){const i=e.source;let l;if(0===t||1===t)if(!e.inVPre&&Ca(i,e.options.delimiters[0]))l=va(e,t);else if(0===t&&"<"===i[0])if(1===i.length);else if("!"===i[1])l=Ca(i,"\x3c!--")?ua(e):Ca(i,"<!DOCTYPE")?pa(e):Ca(i,"<![CDATA[")&&0!==r?aa(e,n):pa(e);else if("/"===i[1])if(2===i.length);else{if(">"===i[2]){wa(e,3);continue}if(/[a-z]/i.test(i[2])){ha(e,1,o);continue}l=pa(e)}else/[a-z]/i.test(i[1])?l=fa(e,n):"?"===i[1]&&(l=pa(e));if(l||(l=ya(e,t)),E(l))for(let e=0;e<l.length;e++)ca(s,l[e]);else ca(s,l)}let i=!1;if(2!==t&&1!==t){const t="preserve"!==e.options.whitespace;for(let n=0;n<s.length;n++){const o=s[n];if(e.inPre||2!==o.type)3!==o.type||e.options.comments||(i=!0,s[n]=null);else if(/[^\t\r\n\f ]/.test(o.content))t&&(o.content=o.content.replace(/[\t\r\n\f ]+/g," "));else{const e=s[n-1],r=s[n+1];!e||!r||t&&(3===e.type||3===r.type||1===e.type&&1===r.type&&/[\r\n]/.test(o.content))?(i=!0,s[n]=null):o.content=" "}}if(e.inPre&&o&&e.options.isPreTag(o.tag)){const e=s[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}}return i?s.filter(Boolean):s}function ca(e,t){if(2===t.type){const n=xa(e);if(n&&2===n.type&&n.loc.end.offset===t.loc.start.offset)return n.content+=t.content,n.loc.end=t.loc.end,void(n.loc.source+=t.loc.source)}e.push(t)}function aa(e,t){wa(e,9);const n=la(e,3,t);return 0===e.source.length||wa(e,3),n}function ua(e){const t=ba(e);let n;const o=/--(\!)?>/.exec(e.source);if(o){n=e.source.slice(4,o.index);const t=e.source.slice(0,o.index);let r=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",r));)wa(e,s-r+1),r=s+1;wa(e,o.index+o[0].length-r+1)}else n=e.source.slice(4),wa(e,e.source.length);return{type:3,content:n,loc:Sa(e,t)}}function pa(e){const t=ba(e),n="?"===e.source[1]?1:2;let o;const r=e.source.indexOf(">");return-1===r?(o=e.source.slice(n),wa(e,e.source.length)):(o=e.source.slice(n,r),wa(e,r+1)),{type:3,content:o,loc:Sa(e,t)}}function fa(e,t){const n=e.inPre,o=e.inVPre,r=xa(t),s=ha(e,0,r),i=e.inPre&&!n,l=e.inVPre&&!o;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),l&&(e.inVPre=!1),s;t.push(s);const c=e.options.getTextMode(s,r),a=la(e,c,t);if(t.pop(),s.children=a,Ea(e.source,s.tag))ha(e,1,r);else if(0===e.source.length&&"script"===s.tag.toLowerCase()){const e=a[0];e&&Ca(e.loc.source,"\x3c!--")}return s.loc=Sa(e,s.loc.start),i&&(e.inPre=!1),l&&(e.inVPre=!1),s}const da=e("if,else,else-if,for,slot");function ha(e,t,n){const o=ba(e),r=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=r[1],i=e.options.getNamespace(s,n);wa(e,r[0].length),ka(e);const l=ba(e),c=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let a=ma(e,t);0===t&&!e.inVPre&&a.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,w(e,l),e.source=c,a=ma(e,t).filter((e=>"v-pre"!==e.name)));let u=!1;if(0===e.source.length||(u=Ca(e.source,"/>"),wa(e,u?2:1)),1===t)return;let p=0;return e.inVPre||("slot"===s?p=2:"template"===s?a.some((e=>7===e.type&&da(e.name)))&&(p=3):function(e,t,n){const o=n.options;if(o.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||Pc(e)||o.isBuiltInComponent&&o.isBuiltInComponent(e)||o.isNativeTag&&!o.isNativeTag(e))return!0;for(let r=0;r<t.length;r++){const e=t[r];if(6===e.type){if("is"===e.name&&e.value&&e.value.content.startsWith("vue:"))return!0}else{if("is"===e.name)return!0;"bind"===e.name&&zc(e.arg,"is")}}}(s,a,e)&&(p=1)),{type:1,ns:i,tag:s,tagType:p,props:a,isSelfClosing:u,children:[],loc:Sa(e,o),codegenNode:void 0}}function ma(e,t){const n=[],o=new Set;for(;e.source.length>0&&!Ca(e.source,">")&&!Ca(e.source,"/>");){if(Ca(e.source,"/")){wa(e,1),ka(e);continue}const r=ga(e,o);6===r.type&&r.value&&"class"===r.name&&(r.value.content=r.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(r),/^[^\t\r\n\f />]/.test(e.source),ka(e)}return n}function ga(e,t){const n=ba(e),o=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(o),t.add(o);{const e=/["'<]/g;let t;for(;t=e.exec(o););}let r;wa(e,o.length),/^[\t\r\n\f ]*=/.test(e.source)&&(ka(e),wa(e,1),ka(e),r=function(e){const t=ba(e);let n;const o=e.source[0],r='"'===o||"'"===o;if(r){wa(e,1);const t=e.source.indexOf(o);-1===t?n=_a(e,e.source.length,4):(n=_a(e,t,4),wa(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const o=/["'<=`]/g;let r;for(;r=o.exec(t[0]););n=_a(e,t[0].length,4)}return{content:n,isQuoted:r,loc:Sa(e,t)}}(e));const s=Sa(e,n);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(o)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(o);let i,l=Ca(o,"."),c=t[1]||(l||Ca(o,":")?"bind":Ca(o,"@")?"on":"slot");if(t[2]){const r="slot"===c,s=o.lastIndexOf(t[2]),l=Sa(e,Ta(e,n,s),Ta(e,n,s+t[2].length+(r&&t[3]||"").length));let a=t[2],u=!0;a.startsWith("[")?(u=!1,a=a.endsWith("]")?a.slice(1,a.length-1):a.slice(1)):r&&(a+=t[3]||""),i={type:4,content:a,isStatic:u,constType:u?3:0,loc:l}}if(r&&r.isQuoted){const e=r.loc;e.start.offset++,e.start.column++,e.end=Uc(e.start,r.content),e.source=e.source.slice(1,-1)}const a=t[3]?t[3].slice(1).split("."):[];return l&&a.push("prop"),{type:7,name:c,exp:r&&{type:4,content:r.content,isStatic:!1,constType:0,loc:r.loc},arg:i,modifiers:a,loc:s}}return!e.inVPre&&Ca(o,"v-"),{type:6,name:o,value:r&&{type:2,content:r.content,loc:r.loc},loc:s}}function va(e,t){const[n,o]=e.options.delimiters,r=e.source.indexOf(o,n.length);if(-1===r)return;const s=ba(e);wa(e,n.length);const i=ba(e),l=ba(e),c=r-n.length,a=e.source.slice(0,c),u=_a(e,c,t),p=u.trim(),f=u.indexOf(p);f>0&&Dc(i,a,f);return Dc(l,a,c-(u.length-p.length-f)),wa(e,o.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:p,loc:Sa(e,i,l)},loc:Sa(e,s)}}function ya(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let o=e.source.length;for(let s=0;s<n.length;s++){const t=e.source.indexOf(n[s],1);-1!==t&&o>t&&(o=t)}const r=ba(e);return{type:2,content:_a(e,o,t),loc:Sa(e,r)}}function _a(e,t,n){const o=e.source.slice(0,t);return wa(e,t),2!==n&&3!==n&&o.includes("&")?e.options.decodeEntities(o,4===n):o}function ba(e){const{column:t,line:n,offset:o}=e;return{column:t,line:n,offset:o}}function Sa(e,t,n){return{start:t,end:n=n||ba(e),source:e.originalSource.slice(t.offset,n.offset)}}function xa(e){return e[e.length-1]}function Ca(e,t){return e.startsWith(t)}function wa(e,t){const{source:n}=e;Dc(e,n,t),e.source=n.slice(t)}function ka(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&wa(e,t[0].length)}function Ta(e,t,n){return Uc(t,e.originalSource.slice(t.offset,n),n)}function Na(e,t,n){const o=e.source;switch(t){case 0:if(Ca(o,"</"))for(let e=n.length-1;e>=0;--e)if(Ea(o,n[e].tag))return!0;break;case 1:case 2:{const e=xa(n);if(e&&Ea(o,e.tag))return!0;break}case 3:if(Ca(o,"]]>"))return!0}return!o}function Ea(e,t){return Ca(e,"</")&&e.slice(2,2+t.length).toLowerCase()===t.toLowerCase()&&/[\t\r\n\f />]/.test(e[2+t.length]||">")}function $a(e,t){Ra(e,t,Oa(e,e.children[0]))}function Oa(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!Jc(t)}function Ra(e,t,n=!1){const{children:o}=e,r=o.length;let s=0;for(let i=0;i<o.length;i++){const e=o[i];if(1===e.type&&0===e.tagType){const o=n?0:Fa(e,t);if(o>0){if(o>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),s++;continue}}else{const n=e.codegenNode;if(13===n.type){const o=Ia(n);if((!o||512===o||1===o)&&Ma(e,t)>=2){const o=Va(e);o&&(n.props=t.hoist(o))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}else 12===e.type&&Fa(e.content,t)>=2&&(e.codegenNode=t.hoist(e.codegenNode),s++);if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,Ra(e,t),n&&t.scopes.vSlot--}else if(11===e.type)Ra(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)Ra(e.branches[n],t,1===e.branches[n].children.length)}s&&t.transformHoist&&t.transformHoist(o,t,e),s&&s===r&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&E(e.codegenNode.children)&&(e.codegenNode.children=t.hoist(Cc(e.codegenNode.children)))}function Fa(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(Ia(r))return n.set(e,0),0;{let o=3;const s=Ma(e,t);if(0===s)return n.set(e,0),0;s<o&&(o=s);for(let r=0;r<e.children.length;r++){const s=Fa(e.children[r],t);if(0===s)return n.set(e,0),0;s<o&&(o=s)}if(o>1)for(let r=0;r<e.props.length;r++){const s=e.props[r];if(7===s.type&&"bind"===s.name&&s.exp){const r=Fa(s.exp,t);if(0===r)return n.set(e,0),0;r<o&&(o=r)}}if(r.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(jl),t.removeHelper(Zc(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(Yc(t.inSSR,r.isComponent))}return n.set(e,o),o}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return Fa(e.content,t);case 4:return e.constType;case 8:let s=3;for(let n=0;n<e.children.length;n++){const o=e.children[n];if(P(o)||A(o))continue;const r=Fa(o,t);if(0===r)return 0;r<s&&(s=r)}return s}}const Pa=new Set([rc,sc,ic,lc]);function Aa(e,t){if(14===e.type&&!P(e.callee)&&Pa.has(e.callee)){const n=e.arguments[0];if(4===n.type)return Fa(n,t);if(14===n.type)return Aa(n,t)}return 0}function Ma(e,t){let n=3;const o=Va(e);if(o&&15===o.type){const{properties:e}=o;for(let o=0;o<e.length;o++){const{key:r,value:s}=e[o],i=Fa(r,t);if(0===i)return i;let l;if(i<n&&(n=i),l=4===s.type?Fa(s,t):14===s.type?Aa(s,t):0,0===l)return l;l<n&&(n=l)}}return n}function Va(e){const t=e.codegenNode;if(13===t.type)return t.props}function Ia(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function Ba(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:o=!1,cacheHandlers:r=!1,nodeTransforms:s=[],directiveTransforms:i={},transformHoist:l=null,isBuiltInComponent:c=_,isCustomElement:a=_,expressionPlugins:u=[],scopeId:p=null,slotted:f=!0,ssr:d=!1,inSSR:h=!1,ssrCssVars:m="",bindingMetadata:g=v,inline:y=!1,isTS:b=!1,onError:S=Fl,onWarn:x=Pl,compatConfig:C}){const w=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),k={selfName:w&&q(z(w[1])),prefixIdentifiers:n,hoistStatic:o,cacheHandlers:r,nodeTransforms:s,directiveTransforms:i,transformHoist:l,isBuiltInComponent:c,isCustomElement:a,expressionPlugins:u,scopeId:p,slotted:f,ssr:d,inSSR:h,ssrCssVars:m,bindingMetadata:g,inline:y,isTS:b,onError:S,onWarn:x,compatConfig:C,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new Map,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=k.helpers.get(e)||0;return k.helpers.set(e,t+1),e},removeHelper(e){const t=k.helpers.get(e);if(t){const n=t-1;n?k.helpers.set(e,n):k.helpers.delete(e)}},helperString:e=>`_${bc[k.helper(e)]}`,replaceNode(e){k.parent.children[k.childIndex]=k.currentNode=e},removeNode(e){const t=e?k.parent.children.indexOf(e):k.currentNode?k.childIndex:-1;e&&e!==k.currentNode?k.childIndex>t&&(k.childIndex--,k.onNodeRemoved()):(k.currentNode=null,k.onNodeRemoved()),k.parent.children.splice(t,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){P(e)&&(e=Tc(e)),k.hoists.push(e);const t=Tc(`_hoisted_${k.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:Sc}}(k.cached++,e,t)};return k}function La(e,t){const n=Ba(e,t);ja(e,n),t.hoistStatic&&$a(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(Oa(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&na(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=xc(t,n(Ml),void 0,e.children,o+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=[...n.helpers.keys()],e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached}function ja(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let s=0;s<n.length;s++){const r=n[s](e,t);if(r&&(E(r)?o.push(...r):o.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(zl);break;case 5:t.ssr||t.helper(nc);break;case 9:for(let n=0;n<e.branches.length;n++)ja(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];P(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=o,ja(r,t))}}(e,t)}t.currentNode=e;let r=o.length;for(;r--;)o[r]()}function Ua(e,t){const n=P(e)?t=>t===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(Gc))return;const s=[];for(let i=0;i<r.length;i++){const l=r[i];if(7===l.type&&n(l.name)){r.splice(i,1),i--;const n=t(e,l,o);n&&s.push(n)}}return s}}}const Da=e=>`${bc[e]}: _${bc[e]}`;function Ha(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:p=!1,inSSR:f=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:p,inSSR:f,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${bc[e]}`,push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:c,ssr:a}=n,u=e.helpers.length>0,p=!s&&"module"!==o;!function(e,t){const{push:n,newline:o,runtimeGlobalName:r}=t,s=r;if(e.helpers.length>0&&(n(`const _Vue = ${s}\n`),e.hoists.length)){n(`const { ${[Hl,Wl,zl,Kl,Gl].filter((t=>e.helpers.includes(t))).map(Da).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r<e.length;r++){const s=e[r];s&&(n(`const _hoisted_${r+1} = `),Ga(s,t),o())}t.pure=!1})(e.hoists,t),o(),n("return ")}(e,n);if(r(`function ${a?"ssrRender":"render"}(${(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),i(),p&&(r("with (_ctx) {"),i(),u&&(r(`const { ${e.helpers.map(Da).join(", ")} } = _Vue`),r("\n"),c())),e.components.length&&(Wa(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Wa(e.directives,"directive",n),e.temps>0&&c()),e.temps>0){r("let ");for(let t=0;t<e.temps;t++)r(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n"),c()),a||r("return "),e.codegenNode?Ga(e.codegenNode,n):r("null"),p&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Wa(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("component"===t?ql:Yl);for(let l=0;l<e.length;l++){let n=e[l];const c=n.endsWith("__self");c&&(n=n.slice(0,-6)),o(`const ${ta(n,t)} = ${i}(${JSON.stringify(n)}${c?", true":""})${s?"!":""}`),l<e.length-1&&r()}}function za(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Ka(e,t,n),n&&t.deindent(),t.push("]")}function Ka(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;i<e.length;i++){const l=e[i];P(l)?r(l):E(l)?za(l,t):Ga(l,t),i<e.length-1&&(n?(o&&r(","),s()):o&&r(", "))}}function Ga(e,t){if(P(e))t.push(e);else if(A(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:Ga(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),e)}(e,t);break;case 4:qa(e,t);break;case 5:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n("/*#__PURE__*/");n(`${o(nc)}(`),Ga(e.content,t),n(")")}(e,t);break;case 8:Ja(e,t);break;case 3:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n("/*#__PURE__*/");n(`${o(zl)}(${JSON.stringify(e.content)})`,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:o,pure:r}=t,{tag:s,props:i,children:l,patchFlag:c,dynamicProps:a,directives:u,isBlock:p,disableTracking:f,isComponent:d}=e;u&&n(o(Ql)+"(");p&&n(`(${o(jl)}(${f?"true":""}), `);r&&n("/*#__PURE__*/");const h=p?Zc(t.inSSR,d):Yc(t.inSSR,d);n(o(h)+"(",e),Ka(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([s,i,l,c,a]),t),n(")"),p&&n(")");u&&(n(", "),Ga(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=P(e.callee)?e.callee:o(e.callee);r&&n("/*#__PURE__*/");n(s+"(",e),Ka(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let c=0;c<i.length;c++){const{key:e,value:o}=i[c];Ya(e,t),n(": "),Ga(o,t),c<i.length-1&&(n(","),s())}l&&r(),n(l?"}":" }")}(e,t);break;case 17:!function(e,t){za(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:o,deindent:r}=t,{params:s,returns:i,body:l,newline:c,isSlot:a}=e;a&&n(`_${bc[mc]}(`);n("(",e),E(s)?Ka(s,t):s&&Ga(s,t);n(") => "),(c||l)&&(n("{"),o());i?(c&&n("return "),E(i)?za(i,t):Ga(i,t)):l&&Ga(l,t);(c||l)&&(r(),n("}"));a&&n(")")}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!Mc(n.content);e&&i("("),qa(n,t),e&&i(")")}else i("("),Ga(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),Ga(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const u=19===r.type;u||t.indentLevel++;Ga(r,t),u||t.indentLevel--;s&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(fc)}(-1),`),i());n(`_cache[${e.index}] = `),Ga(e.value,t),e.isVNode&&(n(","),i(),n(`${o(fc)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:Ka(e.body,t,!0,!1)}}function qa(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,e)}function Ja(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];P(o)?t.push(o):Ga(o,t)}}function Ya(e,t){const{push:n}=t;if(8===e.type)n("["),Ja(e,t),n("]");else if(e.isStatic){n(Mc(e.content)?e.content:JSON.stringify(e.content),e)}else n(`[${e.content}]`,e)}const Za=Ua(/^(if|else|else-if)$/,((e,t,n)=>function(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){t.exp=Tc("true",!1,t.exp?t.exp.loc:e.loc)}if("if"===t.name){const r=Qa(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){n.removeNode();const r=Qa(e,t);i.branches.push(r);const s=o&&o(i,r,!1);ja(r,n),s&&s(),n.currentNode=null}break}n.removeNode(i)}}}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=Xa(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=Xa(t,i+e.branches.length-1,n)}}}))));function Qa(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Hc(e,"for")?e.children:[e],userKey:Wc(e,"key"),isTemplateIf:n}}function Xa(e,t,n){return e.condition?Oc(e.condition,eu(e,t,n),Ec(n.helper(zl),['""',"true"])):eu(e,t,n)}function eu(e,t,n){const{helper:o}=n,r=kc("key",Tc(`${t}`,!1,Sc,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return ea(e,r,n),e}{let t=64;return xc(n,o(Ml),wc([r]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===yc?l.arguments[1].returns:l;return 13===t.type&&na(t,n),ea(t,r,n),e}var l}const tu=Ua("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return;const r=su(t.exp);if(!r)return;const{scopes:s}=n,{source:i,value:l,key:c,index:a}=r,u={type:11,loc:t.loc,source:i,valueAlias:l,keyAlias:c,objectIndexAlias:a,parseResult:r,children:qc(e)?e.children:[e]};n.replaceNode(u),s.vFor++;const p=o&&o(u);return()=>{s.vFor--,p&&p()}}(e,t,n,(t=>{const s=Ec(o(Xl),[t.source]),i=qc(e),l=Hc(e,"memo"),c=Wc(e,"key"),a=c&&(6===c.type?Tc(c.value.content,!0):c.exp),u=c?kc("key",a):null,p=4===t.source.type&&t.source.constType>0,f=p?64:c?128:256;return t.codegenNode=xc(n,o(Ml),void 0,s,f+"",void 0,void 0,!0,!p,!1,e.loc),()=>{let c;const{children:f}=t,d=1!==f.length||1!==f[0].type,h=Jc(e)?e:i&&1===e.children.length&&Jc(e.children[0])?e.children[0]:null;if(h?(c=h.codegenNode,i&&u&&ea(c,u,n)):d?c=xc(n,o(Ml),u?wc([u]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=f[0].codegenNode,i&&u&&ea(c,u,n),c.isBlock!==!p&&(c.isBlock?(r(jl),r(Zc(n.inSSR,c.isComponent))):r(Yc(n.inSSR,c.isComponent))),c.isBlock=!p,c.isBlock?(o(jl),o(Zc(n.inSSR,c.isComponent))):o(Yc(n.inSSR,c.isComponent))),l){const e=$c(lu(t.parseResult,[Tc("_cached")]));e.body={type:21,body:[Nc(["const _memo = (",l.exp,")"]),Nc(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(_c)}(_cached, _memo)) return _cached`]),Nc(["const _item = ",c]),Tc("_item.memo = _memo"),Tc("return _item")],loc:Sc},s.arguments.push(e,Tc("_cache"),Tc(String(n.cached++)))}else s.arguments.push($c(lu(t.parseResult),c,!0))}}))}));const nu=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,ou=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ru=/^\(|\)$/g;function su(e,t){const n=e.loc,o=e.content,r=o.match(nu);if(!r)return;const[,s,i]=r,l={source:iu(n,i.trim(),o.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let c=s.trim().replace(ru,"").trim();const a=s.indexOf(c),u=c.match(ou);if(u){c=c.replace(ou,"").trim();const e=u[1].trim();let t;if(e&&(t=o.indexOf(e,a+c.length),l.key=iu(n,e,t)),u[2]){const r=u[2].trim();r&&(l.index=iu(n,r,o.indexOf(r,l.key?t+e.length:a+c.length)))}}return c&&(l.value=iu(n,c,a)),l}function iu(e,t,n){return Tc(t,!1,jc(e,n,t.length))}function lu({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Tc("_".repeat(t+1),!1)))}([e,t,n,...o])}const cu=Tc("undefined",!1),au=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Hc(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},uu=(e,t,n)=>$c(e,t,!1,!0,t.length?t[0].loc:n);function pu(e,t,n=uu){t.helper(mc);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=Hc(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!Rc(e)&&(l=!0),s.push(kc(e||Tc("default",!0),n(t,o,r)))}let a=!1,u=!1;const p=[],f=new Set;for(let m=0;m<o.length;m++){const e=o[m];let r;if(!qc(e)||!(r=Hc(e,"slot",!0))){3!==e.type&&p.push(e);continue}if(c)break;a=!0;const{children:d,loc:h}=e,{arg:g=Tc("default",!0),exp:v}=r;let y;Rc(g)?y=g?g.content:"default":l=!0;const _=n(v,d,h);let b,S,x;if(b=Hc(e,"if"))l=!0,i.push(Oc(b.exp,fu(g,_),cu));else if(S=Hc(e,/^else(-if)?$/,!0)){let e,t=m;for(;t--&&(e=o[t],3===e.type););if(e&&qc(e)&&Hc(e,"if")){o.splice(m,1),m--;let e=i[i.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=S.exp?Oc(S.exp,fu(g,_),cu):fu(g,_)}}else if(x=Hc(e,"for")){l=!0;const e=x.parseResult||su(x.exp);e&&i.push(Ec(t.helper(Xl),[e.source,$c(lu(e),fu(g,_),!0)]))}else{if(y){if(f.has(y))continue;f.add(y),"default"===y&&(u=!0)}s.push(kc(g,_))}}if(!c){const e=(e,t)=>kc("default",n(e,t,r));a?p.length&&p.some((e=>hu(e)))&&(u||s.push(e(void 0,p))):s.push(e(void 0,o))}const d=l?2:du(e.children)?3:1;let h=wc(s.concat(kc("_",Tc(d+"",!1))),r);return i.length&&(h=Ec(t.helper(tc),[h,Cc(i)])),{slots:h,hasDynamicSlots:l}}function fu(e,t){return wc([kc("name",e),kc("fn",t)])}function du(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||du(n.children))return!0;break;case 9:if(du(n.branches))return!0;break;case 10:case 11:if(du(n.children))return!0}}return!1}function hu(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():hu(e.content))}const mu=new WeakMap,gu=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=bu(o),s=Wc(e,"is");if(s)if(r){const e=6===s.type?s.value&&Tc(s.value.content,!0):s.exp;if(e)return Ec(t.helper(Jl),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=!r&&Hc(e,"is");if(i&&i.exp)return Ec(t.helper(Jl),[i.exp]);const l=Pc(o)||t.isBuiltInComponent(o);if(l)return n||t.helper(l),l;return t.helper(ql),t.components.add(o),ta(o,"component")}(e,t):`"${n}"`;const i=M(s)&&s.callee===Jl;let l,c,a,u,p,f,d=0,h=i||s===Vl||s===Il||!r&&("svg"===n||"foreignObject"===n);if(o.length>0){const n=vu(e,t,void 0,r,i);l=n.props,d=n.patchFlag,p=n.dynamicPropNames;const o=n.directives;f=o&&o.length?Cc(o.map((e=>function(e,t){const n=[],o=mu.get(e);o?n.push(t.helperString(o)):(t.helper(Yl),t.directives.add(e.name),n.push(ta(e.name,"directive")));const{loc:r}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Tc("true",!1,r);n.push(wc(e.modifiers.map((e=>kc(e,t))),r))}return Cc(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===Bl&&(h=!0,d|=1024);if(r&&s!==Vl&&s!==Bl){const{slots:n,hasDynamicSlots:o}=pu(e,t);c=n,o&&(d|=1024)}else if(1===e.children.length&&s!==Vl){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Fa(n,t)&&(d|=1),c=r||2===o?n:e.children}else c=e.children}0!==d&&(a=String(d),p&&p.length&&(u=function(e){let t="[";for(let n=0,o=e.length;n<o;n++)t+=JSON.stringify(e[n]),n<o-1&&(t+=", ");return t+"]"}(p))),e.codegenNode=xc(t,s,l,c,a,u,f,!!h,!1,r,e.loc)};function vu(e,t,n=e.props,o,r,s=!1){const{tag:i,loc:l,children:c}=e;let a=[];const u=[],p=[],f=c.length>0;let d=!1,h=0,m=!1,g=!1,v=!1,y=!1,_=!1,b=!1;const S=[],C=({key:e,value:n})=>{if(Rc(e)){const s=e.content,i=x(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||U(s)||(y=!0),i&&U(s)&&(b=!0),20===n.type||(4===n.type||8===n.type)&&Fa(n,t)>0)return;"ref"===s?m=!0:"class"===s?g=!0:"style"===s?v=!0:"key"===s||S.includes(s)||S.push(s),!o||"class"!==s&&"style"!==s||S.includes(s)||S.push(s)}else _=!0};for(let x=0;x<n.length;x++){const o=n[x];if(6===o.type){const{loc:e,name:n,value:r}=o;let s=!0;if("ref"===n&&(m=!0,t.scopes.vFor>0&&a.push(kc(Tc("ref_for",!0),Tc("true")))),"is"===n&&(bu(i)||r&&r.content.startsWith("vue:")))continue;a.push(kc(Tc(n,!0,jc(e,0,n.length)),Tc(r?r.content:"",s,r?r.loc:e)))}else{const{name:n,arg:r,exp:c,loc:h}=o,m="bind"===n,g="on"===n;if("slot"===n)continue;if("once"===n||"memo"===n)continue;if("is"===n||m&&zc(r,"is")&&bu(i))continue;if(g&&s)continue;if((m&&zc(r,"key")||g&&f&&zc(r,"vue:before-update"))&&(d=!0),m&&zc(r,"ref")&&t.scopes.vFor>0&&a.push(kc(Tc("ref_for",!0),Tc("true"))),!r&&(m||g)){_=!0,c&&(a.length&&(u.push(wc(yu(a),l)),a=[]),u.push(m?c:{type:14,loc:h,callee:t.helper(cc),arguments:[c]}));continue}const v=t.directiveTransforms[n];if(v){const{props:n,needRuntime:r}=v(o,e,t);!s&&n.forEach(C),a.push(...n),r&&(p.push(o),A(r)&&mu.set(o,r))}else D(n)||(p.push(o),f&&(d=!0))}}let w;if(u.length?(a.length&&u.push(wc(yu(a),l)),w=u.length>1?Ec(t.helper(oc),u,l):u[0]):a.length&&(w=wc(yu(a),l)),_?h|=16:(g&&!o&&(h|=2),v&&!o&&(h|=4),S.length&&(h|=8),y&&(h|=32)),d||0!==h&&32!==h||!(m||b||p.length>0)||(h|=512),!t.inSSR&&w)switch(w.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t<w.properties.length;t++){const r=w.properties[t].key;Rc(r)?"class"===r.content?e=t:"style"===r.content&&(n=t):r.isHandlerKey||(o=!0)}const r=w.properties[e],s=w.properties[n];o?w=Ec(t.helper(ic),[w]):(r&&!Rc(r.value)&&(r.value=Ec(t.helper(rc),[r.value])),s&&(v||4===s.value.type&&"["===s.value.content.trim()[0]||17===s.value.type)&&(s.value=Ec(t.helper(sc),[s.value])));break;case 14:break;default:w=Ec(t.helper(ic),[Ec(t.helper(lc),[w])])}return{props:w,directives:p,patchFlag:h,dynamicPropNames:S,shouldUseBlock:d}}function yu(e){const t=new Map,n=[];for(let o=0;o<e.length;o++){const r=e[o];if(8===r.key.type||!r.key.isStatic){n.push(r);continue}const s=r.key.content,i=t.get(s);i?("style"===s||"class"===s||x(s))&&_u(i,r):(t.set(s,r),n.push(r))}return n}function _u(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=Cc([e.value,t.value],e.loc)}function bu(e){return"component"===e||"Component"===e}const Su=(e,t)=>{if(Jc(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let s=0;s<e.props.length;s++){const t=e.props[s];6===t.type?t.value&&("name"===t.name?o=JSON.stringify(t.value.content):(t.name=z(t.name),r.push(t))):"bind"===t.name&&zc(t.arg,"name")?t.exp&&(o=t.exp):("bind"===t.name&&t.arg&&Rc(t.arg)&&(t.arg.content=z(t.arg.content)),r.push(t))}if(r.length>0){const{props:o,directives:s}=vu(e,t,r,!1,!1);n=o}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=$c([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=Ec(t.helper(ec),i,o)}};const xu=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,Cu=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let l;if(4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),l=Tc(J(z(e)),!0,i.loc)}else l=Nc([`${n.helperString(pc)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(pc)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=Lc(c.content),t=!(e||xu.test(c.content)),n=c.content.includes(";");(t||a&&e)&&(c=Nc([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[kc(l,c||Tc("() => {}",!1,r))]};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},wu=(e,t,n)=>{const{exp:o,modifiers:r,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),r.includes("camel")&&(4===i.type?i.content=i.isStatic?z(i.content):`${n.helperString(ac)}(${i.content})`:(i.children.unshift(`${n.helperString(ac)}(`),i.children.push(")"))),n.inSSR||(r.includes("prop")&&ku(i,"."),r.includes("attr")&&ku(i,"^")),!o||4===o.type&&!o.content.trim()?{props:[kc(i,Tc("",!0,s))]}:{props:[kc(i,o)]}},ku=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Tu=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e<n.length;e++){const t=n[e];if(Kc(t)){r=!0;for(let r=e+1;r<n.length;r++){const s=n[r];if(!Kc(s)){o=void 0;break}o||(o=n[e]=Nc([t],t.loc)),o.children.push(" + ",s),n.splice(r,1),r--}}}if(r&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name])))))for(let e=0;e<n.length;e++){const o=n[e];if(Kc(o)||8===o.type){const r=[];2===o.type&&" "===o.content||r.push(o),t.ssr||0!==Fa(o,t)||r.push("1"),n[e]={type:12,content:o,loc:o.loc,codegenNode:Ec(t.helper(Kl),r)}}}}},Nu=new WeakSet,Eu=(e,t)=>{if(1===e.type&&Hc(e,"once",!0)){if(Nu.has(e)||t.inVOnce)return;return Nu.add(e),t.inVOnce=!0,t.helper(fc),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},$u=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return Ou();const s=o.loc.source,i=4===o.type?o.content:s;if(!i.trim()||!Lc(i))return Ou();const l=r||Tc("modelValue",!0),c=r?Rc(r)?`onUpdate:${r.content}`:Nc(['"onUpdate:" + ',r]):"onUpdate:modelValue";let a;a=Nc([`${n.isTS?"($event: any)":"$event"} => ((`,o,") = $event)"]);const u=[kc(l,e.exp),kc(c,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Mc(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?Rc(r)?`${r.content}Modifiers`:Nc([r,' + "Modifiers"']):"modelModifiers";u.push(kc(n,Tc(`{ ${t} }`,!1,e.loc,2)))}return Ou(u)};function Ou(e=[]){return{props:e}}const Ru=new WeakSet,Fu=(e,t)=>{if(1===e.type){const n=Hc(e,"memo");if(!n||Ru.has(e))return;return Ru.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&na(o,t),e.codegenNode=Ec(t.helper(yc),[n.exp,$c(void 0,o),"_cache",String(t.cached++)]))}}};function Pu(e,t={}){const n=t.onError||Fl,o="module"===t.mode;!0===t.prefixIdentifiers?n(Al(46)):o&&n(Al(47));t.cacheHandlers&&n(Al(48)),t.scopeId&&!o&&n(Al(49));const r=P(e)?ia(e,t):e,[s,i]=[[Eu,Za,Fu,tu,Su,gu,au,Tu],{on:Cu,bind:wu,model:$u}];return La(r,w({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:w({},i,t.directiveTransforms||{})})),Ha(r,w({},t,{prefixIdentifiers:false}))}const Au=Symbol(""),Mu=Symbol(""),Vu=Symbol(""),Iu=Symbol(""),Bu=Symbol(""),Lu=Symbol(""),ju=Symbol(""),Uu=Symbol(""),Du=Symbol(""),Hu=Symbol("");var Wu;let zu;Wu={[Au]:"vModelRadio",[Mu]:"vModelCheckbox",[Vu]:"vModelText",[Iu]:"vModelSelect",[Bu]:"vModelDynamic",[Lu]:"withModifiers",[ju]:"withKeys",[Uu]:"vShow",[Du]:"Transition",[Hu]:"TransitionGroup"},Object.getOwnPropertySymbols(Wu).forEach((e=>{bc[e]=Wu[e]}));const Ku=e("style,iframe,script,noscript",!0),Gu={isVoidTag:f,isNativeTag:e=>u(e)||p(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return zu||(zu=document.createElement("div")),t?(zu.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,zu.children[0].getAttribute("foo")):(zu.innerHTML=e,zu.textContent)},isBuiltInComponent:e=>Fc(e,"Transition")?Du:Fc(e,"TransitionGroup")?Hu:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(Ku(e))return 2}return 0}},qu=(e,t)=>{const n=l(e);return Tc(JSON.stringify(n),!1,t,3)};const Ju=e("passive,once,capture"),Yu=e("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Zu=e("left,right"),Qu=e("onkeyup,onkeydown,onkeypress",!0),Xu=(e,t)=>Rc(e)&&"onclick"===e.content.toLowerCase()?Tc(t,!0):4!==e.type?Nc(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,ep=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},tp=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Tc("style",!0,t.loc),exp:qu(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],np={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[kc(Tc("innerHTML",!0,r),o||Tc("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[kc(Tc("textContent",!0),o?Fa(o,n)>0?o:Ec(n.helperString(nc),[o],r):Tc("",!0))]}},model:(e,t,n)=>{const o=$u(e,t,n);if(!o.props.length||1===t.tagType)return o;const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let e=Vu,i=!1;if("input"===r||s){const n=Wc(t,"type");if(n){if(7===n.type)e=Bu;else if(n.value)switch(n.value.content){case"radio":e=Au;break;case"checkbox":e=Mu;break;case"file":i=!0}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(e=Bu)}else"select"===r&&(e=Iu);i||(o.needRuntime=n.helper(e))}return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>Cu(e,0,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n,o)=>{const r=[],s=[],i=[];for(let l=0;l<t.length;l++){const n=t[l];Ju(n)?i.push(n):Zu(n)?Rc(e)?Qu(e.content)?r.push(n):s.push(n):(r.push(n),s.push(n)):Yu(n)?s.push(n):r.push(n)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:i}})(r,o);if(l.includes("right")&&(r=Xu(r,"onContextmenu")),l.includes("middle")&&(r=Xu(r,"onMouseup")),l.length&&(s=Ec(n.helper(Lu),[s,JSON.stringify(l)])),!i.length||Rc(r)&&!Qu(r.content)||(s=Ec(n.helper(ju),[s,JSON.stringify(i)])),c.length){const e=c.map(q).join("");r=Rc(r)?Tc(`${r.content}${e}`,!0):Nc(["(",r,`) + "${e}"`])}return{props:[kc(r,s)]}})),show:(e,t,n)=>({props:[],needRuntime:n.helper(Uu)})};const op=Object.create(null);function rp(e,t){if(!P(e)){if(!e.nodeType)return _;e=e.innerHTML}const n=e,o=op[n];if(o)return o;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const{code:r}=function(e,t={}){return Pu(e,w({},Gu,t,{nodeTransforms:[ep,...tp,...t.nodeTransforms||[]],directiveTransforms:w({},np,t.directiveTransforms||{}),transformHoist:null}))}(e,w({hoistStatic:!0,onError:void 0,onWarn:_},t)),s=new Function("Vue",r)(Rl);return s._rc=!0,op[n]=s}Fs(rp);export{io as BaseTransition,Kr as Comment,ne as EffectScope,Wr as Fragment,_o as KeepAlive,ge as ReactiveEffect,Gr as Static,Un as Suspense,Hr as Teleport,zr as Text,Fi as Transition,Yi as TransitionGroup,Ni as VueElement,Zt as callWithAsyncErrorHandling,Yt as callWithErrorHandling,z as camelize,q as capitalize,fs as cloneVNode,ii as compatUtils,rp as compile,js as computed,Nl as createApp,ns as createBlock,ms as createCommentVNode,ts as createElementBlock,as as createElementVNode,Mr as createHydrationRenderer,Js as createPropsRestProxy,Ar as createRenderer,El as createSSRApp,qo as createSlots,hs as createStaticVNode,ds as createTextVNode,us as createVNode,Ut as customRef,go as defineAsyncComponent,ho as defineComponent,wi as defineCustomElement,Ds as defineEmits,Hs as defineExpose,Us as defineProps,ki as defineSSRCustomElement,xn as devtools,ye as effect,oe as effectScope,ws as getCurrentInstance,se as getCurrentScope,fo as getTransitionRawChildren,ps as guardReactiveProps,Zs as h,Qt as handleError,Tl as hydrate,ei as initCustomFormatter,Ol as initDirectivesForSSR,qn as inject,ni as isMemoSame,wt as isProxy,St as isReactive,xt as isReadonly,Rt as isRef,Ps as isRuntimeOnly,Ct as isShallow,os as isVNode,Tt as markRaw,qs as mergeDefaults,_s as mergeProps,dn as nextTick,c as normalizeClass,a as normalizeProps,r as normalizeStyle,So as onActivated,$o as onBeforeMount,Po as onBeforeUnmount,Ro as onBeforeUpdate,xo as onDeactivated,Bo as onErrorCaptured,Oo as onMounted,Io as onRenderTracked,Vo as onRenderTriggered,ie as onScopeDispose,Mo as onServerPrefetch,Ao as onUnmounted,Fo as onUpdated,Yr as openBlock,Fn as popScopeId,Gn as provide,Lt as proxyRefs,Rn as pushScopeId,vn as queuePostFlushCb,gt as reactive,yt as readonly,Ft as ref,Fs as registerRuntimeCompiler,kl as render,Go as renderList,Jo as renderSlot,Uo as resolveComponent,Wo as resolveDirective,Ho as resolveDynamicComponent,si as resolveFilter,co as resolveTransitionHooks,Xr as setBlockTracking,wn as setDevtoolsHook,po as setTransitionHooks,vt as shallowReactive,_t as shallowReadonly,Pt as shallowRef,Qs as ssrContextKey,ri as ssrUtils,_e as stop,m as toDisplayString,J as toHandlerKey,Zo as toHandlers,kt as toRaw,Wt as toRef,Dt as toRefs,ss as transformVNodeArgs,Vt as triggerRef,It as unref,Ks as useAttrs,Ei as useCssModule,$i as useCssVars,Xs as useSSRContext,zs as useSlots,ro as useTransitionState,rl as vModelCheckbox,pl as vModelDynamic,il as vModelRadio,ll as vModelSelect,ol as vModelText,yl as vShow,oi as version,Gt as warn,Xn as watch,Jn as watchEffect,Yn as watchPostEffect,Zn as watchSyncEffect,Ys as withAsyncContext,An as withCtx,Ws as withDefaults,Lo as withDirectives,vl as withKeys,ti as withMemo,ml as withModifiers,Pn as withScopeId}; +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],s=()=>{},o=()=>!1,r=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),i=e=>e.startsWith("onUpdate:"),l=Object.assign,c=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},a=Object.prototype.hasOwnProperty,u=(e,t)=>a.call(e,t),d=Array.isArray,p=e=>"[object Map]"===S(e),h=e=>"[object Set]"===S(e),f=e=>"[object Date]"===S(e),m=e=>"function"==typeof e,g=e=>"string"==typeof e,v=e=>"symbol"==typeof e,y=e=>null!==e&&"object"==typeof e,b=e=>(y(e)||m(e))&&m(e.then)&&m(e.catch),_=Object.prototype.toString,S=e=>_.call(e),x=e=>S(e).slice(8,-1),C=e=>"[object Object]"===S(e),k=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),w=e("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),N=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},A=/-(\w)/g,E=N((e=>e.replace(A,((e,t)=>t?t.toUpperCase():"")))),I=/\B([A-Z])/g,R=N((e=>e.replace(I,"-$1").toLowerCase())),O=N((e=>e.charAt(0).toUpperCase()+e.slice(1))),F=N((e=>e?`on${O(e)}`:"")),L=(e,t)=>!Object.is(e,t),M=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},P=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},$=e=>{const t=parseFloat(e);return isNaN(t)?e:t},B=e=>{const t=g(e)?Number(e):NaN;return isNaN(t)?e:t};let V;const D=()=>V||(V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),U=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");function j(e){if(d(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=g(s)?K(s):j(s);if(o)for(const e in o)t[e]=o[e]}return t}if(g(e)||y(e))return e}const H=/;(?![^(]*\))/g,q=/:([^]+)/,W=/\/\*[^]*?\*\//g;function K(e){const t={};return e.replace(W,"").split(H).forEach((e=>{if(e){const n=e.split(q);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function z(e){let t="";if(g(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){const s=z(e[n]);s&&(t+=s+" ")}else if(y(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function G(e){if(!e)return null;let{class:t,style:n}=e;return t&&!g(t)&&(e.class=z(t)),n&&(e.style=j(n)),e}const J=e("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),X=e("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),Q=e("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),Z=e("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),Y=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function ee(e){return!!e||""===e}function te(e,t){if(e===t)return!0;let n=f(e),s=f(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=v(e),s=v(t),n||s)return e===t;if(n=d(e),s=d(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=te(e[s],t[s]);return n}(e,t);if(n=y(e),s=y(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),o=t.hasOwnProperty(n);if(s&&!o||!s&&o||!te(e[n],t[n]))return!1}}return String(e)===String(t)}function ne(e,t){return e.findIndex((e=>te(e,t)))}const se=e=>g(e)?e:null==e?"":d(e)||y(e)&&(e.toString===_||!m(e.toString))?JSON.stringify(e,oe,2):String(e),oe=(e,t)=>t&&t.__v_isRef?oe(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],s)=>(e[re(t,s)+" =>"]=n,e)),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>re(e)))}:v(t)?re(t):!y(t)||d(t)||C(t)?t:String(t),re=(e,t="")=>{var n;return v(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let ie,le;class ce{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ie,!e&&ie&&(this.index=(ie.scopes||(ie.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=ie;try{return ie=this,e()}finally{ie=t}}}on(){ie=this}off(){ie=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function ae(e){return new ce(e)}function ue(e,t=ie){t&&t.active&&t.effects.push(e)}function de(){return ie}function pe(e){ie&&ie.cleanups.push(e)}class he{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,ue(this,s)}get dirty(){if(1===this._dirtyLevel){Ce();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(fe(t.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),ke()}return this._dirtyLevel>=2}set dirty(e){this._dirtyLevel=e?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=_e,t=le;try{return _e=!0,le=this,this._runnings++,me(this),this.fn()}finally{ge(this),this._runnings--,le=t,_e=e}}stop(){var e;this.active&&(me(this),ge(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function fe(e){return e.value}function me(e){e._trackId++,e._depsLength=0}function ge(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)ve(e.deps[t],e);e.deps.length=e._depsLength}}function ve(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function ye(e,t){e.effect instanceof he&&(e=e.effect.fn);const n=new he(e,s,(()=>{n.dirty&&n.run()}));t&&(l(n,t),t.scope&&ue(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o}function be(e){e.effect.stop()}let _e=!0,Se=0;const xe=[];function Ce(){xe.push(_e),_e=!1}function ke(){const e=xe.pop();_e=void 0===e||e}function Te(){Se++}function we(){for(Se--;!Se&&Ae.length;)Ae.shift()()}function Ne(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&ve(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Ae=[];function Ee(e,t,n){Te();for(const s of e.keys())if(s._dirtyLevel<t&&e.get(s)===s._trackId){const e=s._dirtyLevel;s._dirtyLevel=t,0===e&&(s._shouldSchedule=!0,s.trigger())}Ie(e),we()}function Ie(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,Ae.push(t.scheduler))}const Re=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Oe=new WeakMap,Fe=Symbol(""),Le=Symbol("");function Me(e,t,n){if(_e&&le){let t=Oe.get(e);t||Oe.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=Re((()=>t.delete(n)))),Ne(le,s)}}function Pe(e,t,n,s,o,r){const i=Oe.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&d(e)){const e=Number(s);i.forEach(((t,n)=>{("length"===n||!v(n)&&n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":d(e)?k(n)&&l.push(i.get("length")):(l.push(i.get(Fe)),p(e)&&l.push(i.get(Le)));break;case"delete":d(e)||(l.push(i.get(Fe)),p(e)&&l.push(i.get(Le)));break;case"set":p(e)&&l.push(i.get(Fe))}Te();for(const c of l)c&&Ee(c,2);we()}const $e=e("__proto__,__v_isRef,__isVue"),Be=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(v)),Ve=De();function De(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=It(this);for(let t=0,o=this.length;t<o;t++)Me(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(It)):s}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){Ce(),Te();const n=It(this)[t].apply(this,e);return we(),ke(),n}})),e}function Ue(e){const t=It(this);return Me(t,0,e),t.hasOwnProperty(e)}class je{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const s=this._isReadonly,o=this._shallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(s?o?_t:bt:o?yt:vt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=d(e);if(!s){if(r&&u(Ve,t))return Reflect.get(Ve,t,n);if("hasOwnProperty"===t)return Ue}const i=Reflect.get(e,t,n);return(v(t)?Be.has(t):$e(t))?i:(s||Me(e,0,t),o?i:$t(i)?r&&k(t)?i:i.value:y(i)?s?Ct(i):St(i):i)}}class He extends je{constructor(e=!1){super(!1,e)}set(e,t,n,s){let o=e[t];if(!this._shallow){const t=Nt(o);if(At(n)||Nt(n)||(o=It(o),n=It(n)),!d(e)&&$t(o)&&!$t(n))return!t&&(o.value=n,!0)}const r=d(e)&&k(t)?Number(t)<e.length:u(e,t),i=Reflect.set(e,t,n,s);return e===It(s)&&(r?L(n,o)&&Pe(e,"set",t,n):Pe(e,"add",t,n)),i}deleteProperty(e,t){const n=u(e,t),s=Reflect.deleteProperty(e,t);return s&&n&&Pe(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return v(t)&&Be.has(t)||Me(e,0,t),n}ownKeys(e){return Me(e,0,d(e)?"length":Fe),Reflect.ownKeys(e)}}class qe extends je{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const We=new He,Ke=new qe,ze=new He(!0),Ge=new qe(!0),Je=e=>e,Xe=e=>Reflect.getPrototypeOf(e);function Qe(e,t,n=!1,s=!1){const o=It(e=e.__v_raw),r=It(t);n||(L(t,r)&&Me(o,0,t),Me(o,0,r));const{has:i}=Xe(o),l=s?Je:n?Ft:Ot;return i.call(o,t)?l(e.get(t)):i.call(o,r)?l(e.get(r)):void(e!==o&&e.get(t))}function Ze(e,t=!1){const n=this.__v_raw,s=It(n),o=It(e);return t||(L(e,o)&&Me(s,0,e),Me(s,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function Ye(e,t=!1){return e=e.__v_raw,!t&&Me(It(e),0,Fe),Reflect.get(e,"size",e)}function et(e){e=It(e);const t=It(this);return Xe(t).has.call(t,e)||(t.add(e),Pe(t,"add",e,e)),this}function tt(e,t){t=It(t);const n=It(this),{has:s,get:o}=Xe(n);let r=s.call(n,e);r||(e=It(e),r=s.call(n,e));const i=o.call(n,e);return n.set(e,t),r?L(t,i)&&Pe(n,"set",e,t):Pe(n,"add",e,t),this}function nt(e){const t=It(this),{has:n,get:s}=Xe(t);let o=n.call(t,e);o||(e=It(e),o=n.call(t,e)),s&&s.call(t,e);const r=t.delete(e);return o&&Pe(t,"delete",e,void 0),r}function st(){const e=It(this),t=0!==e.size,n=e.clear();return t&&Pe(e,"clear",void 0,void 0),n}function ot(e,t){return function(n,s){const o=this,r=o.__v_raw,i=It(r),l=t?Je:e?Ft:Ot;return!e&&Me(i,0,Fe),r.forEach(((e,t)=>n.call(s,l(e),l(t),o)))}}function rt(e,t,n){return function(...s){const o=this.__v_raw,r=It(o),i=p(r),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=o[e](...s),u=n?Je:t?Ft:Ot;return!t&&Me(r,0,c?Le:Fe),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function it(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function lt(){const e={get(e){return Qe(this,e)},get size(){return Ye(this)},has:Ze,add:et,set:tt,delete:nt,clear:st,forEach:ot(!1,!1)},t={get(e){return Qe(this,e,!1,!0)},get size(){return Ye(this)},has:Ze,add:et,set:tt,delete:nt,clear:st,forEach:ot(!1,!0)},n={get(e){return Qe(this,e,!0)},get size(){return Ye(this,!0)},has(e){return Ze.call(this,e,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:ot(!0,!1)},s={get(e){return Qe(this,e,!0,!0)},get size(){return Ye(this,!0)},has(e){return Ze.call(this,e,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:ot(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=rt(o,!1,!1),n[o]=rt(o,!0,!1),t[o]=rt(o,!1,!0),s[o]=rt(o,!0,!0)})),[e,n,t,s]}const[ct,at,ut,dt]=lt();function pt(e,t){const n=t?e?dt:ut:e?at:ct;return(t,s,o)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(u(n,s)&&s in t?n:t,s,o)}const ht={get:pt(!1,!1)},ft={get:pt(!1,!0)},mt={get:pt(!0,!1)},gt={get:pt(!0,!0)},vt=new WeakMap,yt=new WeakMap,bt=new WeakMap,_t=new WeakMap;function St(e){return Nt(e)?e:Tt(e,!1,We,ht,vt)}function xt(e){return Tt(e,!1,ze,ft,yt)}function Ct(e){return Tt(e,!0,Ke,mt,bt)}function kt(e){return Tt(e,!0,Ge,gt,_t)}function Tt(e,t,n,s,o){if(!y(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=o.get(e);if(r)return r;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(x(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?s:n);return o.set(e,c),c}function wt(e){return Nt(e)?wt(e.__v_raw):!(!e||!e.__v_isReactive)}function Nt(e){return!(!e||!e.__v_isReadonly)}function At(e){return!(!e||!e.__v_isShallow)}function Et(e){return wt(e)||Nt(e)}function It(e){const t=e&&e.__v_raw;return t?It(t):e}function Rt(e){return P(e,"__v_skip",!0),e}const Ot=e=>y(e)?St(e):e,Ft=e=>y(e)?Ct(e):e;class Lt{constructor(e,t,n,s){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new he((()=>e(this._value)),(()=>Pt(this,1)),(()=>this.dep&&Ie(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=It(this);return e._cacheable&&!e.effect.dirty||L(e._value,e._value=e.effect.run())&&Pt(e,2),Mt(e),e.effect._dirtyLevel>=1&&Pt(e,1),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Mt(e){_e&&le&&(e=It(e),Ne(le,e.dep||(e.dep=Re((()=>e.dep=void 0),e instanceof Lt?e:void 0))))}function Pt(e,t=2,n){const s=(e=It(e)).dep;s&&Ee(s,t)}function $t(e){return!(!e||!0!==e.__v_isRef)}function Bt(e){return Dt(e,!1)}function Vt(e){return Dt(e,!0)}function Dt(e,t){return $t(e)?e:new Ut(e,t)}class Ut{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:It(e),this._value=t?e:Ot(e)}get value(){return Mt(this),this._value}set value(e){const t=this.__v_isShallow||At(e)||Nt(e);e=t?e:It(e),L(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Ot(e),Pt(this,2))}}function jt(e){Pt(e,2)}function Ht(e){return $t(e)?e.value:e}function qt(e){return m(e)?e():Ht(e)}const Wt={get:(e,t,n)=>Ht(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return $t(o)&&!$t(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Kt(e){return wt(e)?e:new Proxy(e,Wt)}class zt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>Mt(this)),(()=>Pt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Gt(e){return new zt(e)}function Jt(e){const t=d(e)?new Array(e.length):{};for(const n in e)t[n]=Yt(e,n);return t}class Xt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=It(this._object),t=this._key,null==(n=Oe.get(e))?void 0:n.get(t);var e,t,n}}class Qt{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Zt(e,t,n){return $t(e)?e:m(e)?new Qt(e):y(e)&&arguments.length>1?Yt(e,t,n):Bt(e)}function Yt(e,t,n){const s=e[t];return $t(s)?s:new Xt(e,t,n)}const en={GET:"get",HAS:"has",ITERATE:"iterate"},tn={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};function nn(e,t){}const sn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"};function on(e,t,n,s){let o;try{o=s?e(...s):e()}catch(r){ln(r,t,n)}return o}function rn(e,t,n,s){if(m(e)){const o=on(e,t,n,s);return o&&b(o)&&o.catch((e=>{ln(e,t,n)})),o}const o=[];for(let r=0;r<e.length;r++)o.push(rn(e[r],t,n,s));return o}function ln(e,t,n,s=!0){if(t){let s=t.parent;const o=t.proxy,r=`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const t=s.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,o,r))return;s=s.parent}const i=t.appContext.config.errorHandler;if(i)return void on(i,null,10,[e,o,r])}!function(e,t,n,s=!0){console.error(e)}(e,0,0,s)}let cn=!1,an=!1;const un=[];let dn=0;const pn=[];let hn=null,fn=0;const mn=Promise.resolve();let gn=null;function vn(e){const t=gn||mn;return e?t.then(this?e.bind(this):e):t}function yn(e){un.length&&un.includes(e,cn&&e.allowRecurse?dn+1:dn)||(null==e.id?un.push(e):un.splice(function(e){let t=dn+1,n=un.length;for(;t<n;){const s=t+n>>>1,o=un[s],r=Cn(o);r<e||r===e&&o.pre?t=s+1:n=s}return t}(e.id),0,e),bn())}function bn(){cn||an||(an=!0,gn=mn.then(Tn))}function _n(e){d(e)?pn.push(...e):hn&&hn.includes(e,e.allowRecurse?fn+1:fn)||pn.push(e),bn()}function Sn(e,t,n=(cn?dn+1:0)){for(;n<un.length;n++){const t=un[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;un.splice(n,1),n--,t()}}}function xn(e){if(pn.length){const e=[...new Set(pn)].sort(((e,t)=>Cn(e)-Cn(t)));if(pn.length=0,hn)return void hn.push(...e);for(hn=e,fn=0;fn<hn.length;fn++)hn[fn]();hn=null,fn=0}}const Cn=e=>null==e.id?1/0:e.id,kn=(e,t)=>{const n=Cn(e)-Cn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Tn(e){an=!1,cn=!0,un.sort(kn);try{for(dn=0;dn<un.length;dn++){const e=un[dn];e&&!1!==e.active&&on(e,null,14)}}finally{dn=0,un.length=0,xn(),cn=!1,gn=null,(un.length||pn.length)&&Tn()}}function wn(e,n,...s){if(e.isUnmounted)return;const o=e.vnode.props||t;let r=s;const i=n.startsWith("update:"),l=i&&n.slice(7);if(l&&l in o){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:n,trim:i}=o[e]||t;i&&(r=s.map((e=>g(e)?e.trim():e))),n&&(r=s.map($))}let c,a=o[c=F(n)]||o[c=F(E(n))];!a&&i&&(a=o[c=F(R(n))]),a&&rn(a,e,6,r);const u=o[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,rn(u,e,6,r)}}function Nn(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(void 0!==o)return o;const r=e.emits;let i={},c=!1;if(!m(e)){const s=e=>{const n=Nn(e,t,!0);n&&(c=!0,l(i,n))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return r||c?(d(r)?r.forEach((e=>i[e]=null)):l(i,r),y(e)&&s.set(e,i),i):(y(e)&&s.set(e,null),null)}function An(e,t){return!(!e||!r(t))&&(t=t.slice(2).replace(/Once$/,""),u(e,t[0].toLowerCase()+t.slice(1))||u(e,R(t))||u(e,t))}let En=null,In=null;function Rn(e){const t=En;return En=e,In=e&&e.type.__scopeId||null,t}function On(e){In=e}function Fn(){In=null}const Ln=e=>Mn;function Mn(e,t=En,n){if(!t)return e;if(e._n)return e;const s=(...n)=>{s._d&&Fr(-1);const o=Rn(t);let r;try{r=e(...n)}finally{Rn(o),s._d&&Fr(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Pn(e){const{type:t,vnode:n,proxy:s,withProxy:o,props:r,propsOptions:[l],slots:c,attrs:a,emit:u,render:d,renderCache:p,data:h,setupState:f,ctx:m,inheritAttrs:g}=e;let v,y;const b=Rn(e);try{if(4&n.shapeFlag){const e=o||s;v=Xr(d.call(e,e,p,r,f,h,m)),y=a}else{const e=t;0,v=Xr(e(r,e.length>1?{attrs:a,slots:c,emit:u}:null)),y=t.props?a:$n(a)}}catch(S){Ar.length=0,ln(S,e,1),v=qr(wr)}let _=v;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=_;e.length&&7&t&&(l&&e.some(i)&&(y=Bn(y,l)),_=Kr(_,y))}return n.dirs&&(_=Kr(_),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),v=_,Rn(b),v}const $n=e=>{let t;for(const n in e)("class"===n||"style"===n||r(n))&&((t||(t={}))[n]=e[n]);return t},Bn=(e,t)=>{const n={};for(const s in e)i(s)&&s.slice(9)in t||(n[s]=e[s]);return n};function Vn(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const r=s[o];if(t[r]!==e[r]&&!An(n,r))return!0}return!1}function Dn({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s!==e)break;(e=t.vnode).el=n,t=t.parent}}const Un="components";function jn(e,t){return Kn(Un,e,!0,t)||e}const Hn=Symbol.for("v-ndc");function qn(e){return g(e)?Kn(Un,e,!1)||e:e||Hn}function Wn(e){return Kn("directives",e)}function Kn(e,t,n=!0,s=!1){const o=En||si;if(o){const n=o.type;if(e===Un){const e=bi(n,!1);if(e&&(e===t||e===E(t)||e===O(E(t))))return n}const r=zn(o[e]||n[e],t)||zn(o.appContext[e],t);return!r&&s?n:r}}function zn(e,t){return e&&(e[t]||e[E(t)]||e[O(E(t))])}const Gn=e=>e.__isSuspense;let Jn=0;const Xn={name:"Suspense",__isSuspense:!0,process(e,t,n,s,o,r,i,l,c,a){if(null==e)!function(e,t,n,s,o,r,i,l,c){const{p:a,o:{createElement:u}}=c,d=u("div"),p=e.suspense=Zn(e,o,s,t,d,n,r,i,l,c);a(null,p.pendingBranch=e.ssContent,d,null,s,p,r,i),p.deps>0?(Qn(e,"onPending"),Qn(e,"onFallback"),a(null,e.ssFallback,t,n,s,null,r,i),ts(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,s,o,r,i,l,c,a);else{if(r&&r.deps>0)return void(t.suspense=e.suspense);!function(e,t,n,s,o,r,i,l,{p:c,um:a,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:m,isInFallback:g,isHydrating:v}=d;if(m)d.pendingBranch=p,Br(p,m)?(c(m,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0?d.resolve():g&&(v||(c(f,h,n,s,o,null,r,i,l),ts(d,h)))):(d.pendingId=Jn++,v?(d.isHydrating=!1,d.activeBranch=m):a(m,o,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0?d.resolve():(c(f,h,n,s,o,null,r,i,l),ts(d,h))):f&&Br(p,f)?(c(f,p,n,s,o,d,r,i,l),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0&&d.resolve()));else if(f&&Br(p,f))c(f,p,n,s,o,d,r,i,l),ts(d,p);else if(Qn(t,"onPending"),d.pendingBranch=p,d.pendingId=512&p.shapeFlag?p.component.suspenseId:Jn++,c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(h)}),e):0===e&&d.fallback(h)}}(e,t,n,s,o,i,l,c,a)}},hydrate:function(e,t,n,s,o,r,i,l,c){const a=t.suspense=Zn(t,s,n,e.parentNode,document.createElement("div"),null,o,r,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,r,i);0===a.deps&&a.resolve(!1,!0);return u},create:Zn,normalize:function(e){const{shapeFlag:t,children:n}=e,s=32&t;e.ssContent=Yn(s?n.default:n),e.ssFallback=s?Yn(n.fallback):qr(wr)}};function Qn(e,t){const n=e.props&&e.props[t];m(n)&&n()}function Zn(e,t,n,s,o,r,i,l,c,a,u=!1){const{p:d,m:p,um:h,n:f,o:{parentNode:m,remove:g}}=a;let v;const y=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);y&&(null==t?void 0:t.pendingBranch)&&(v=t.pendingId,t.deps++);const b=e.props?B(e.props.timeout):void 0,_=r,S={vnode:e,parent:t,parentComponent:n,namespace:i,container:s,hiddenContainer:o,deps:0,pendingId:Jn++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:s,activeBranch:o,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=S;let d=!1;S.isHydrating?S.isHydrating=!1:e||(d=o&&i.transition&&"out-in"===i.transition.mode,d&&(o.transition.afterLeave=()=>{l===S.pendingId&&(p(i,u,r===_?f(o):r,0),_n(c))}),o&&(m(o.el)!==S.hiddenContainer&&(r=f(o)),h(o,a,S,!0)),d||p(i,u,r,0)),ts(S,i),S.pendingBranch=null,S.isInFallback=!1;let g=S.parent,b=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),b=!0;break}g=g.parent}b||d||_n(c),S.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),Qn(s,"onResolve")},fallback(e){if(!S.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:s,container:o,namespace:r}=S;Qn(t,"onFallback");const i=f(n),a=()=>{S.isInFallback&&(d(null,e,o,i,s,null,r,l,c),ts(S,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),S.isInFallback=!0,h(n,s,null,!0),u||a()},move(e,t,n){S.activeBranch&&p(S.activeBranch,e,t,n),S.container=e},next:()=>S.activeBranch&&f(S.activeBranch),registerDep(e,t){const n=!!S.pendingBranch;n&&S.deps++;const s=e.vnode.el;e.asyncDep.catch((t=>{ln(t,e,0)})).then((o=>{if(e.isUnmounted||S.isUnmounted||S.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:r}=e;hi(e,o,!1),s&&(r.el=s);const l=!s&&e.subTree.el;t(e,r,m(s||e.subTree.el),s?null:f(e.subTree),S,i,c),l&&g(l),Dn(e,r.el),n&&0==--S.deps&&S.resolve()}))},unmount(e,t){S.isUnmounted=!0,S.activeBranch&&h(S.activeBranch,n,e,t),S.pendingBranch&&h(S.pendingBranch,n,e,t)}};return S}function Yn(e){let t;if(m(e)){const n=Or&&e._c;n&&(e._d=!1,Ir()),e=e(),n&&(e._d=!0,t=Er,Rr())}if(d(e)){const t=function(e,t=!0){let n;for(let s=0;s<e.length;s++){const t=e[s];if(!$r(t))return;if(t.type!==wr||"v-if"===t.children){if(n)return;n=t}}return n}(e);e=t}return e=Xr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function es(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):_n(e)}function ts(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let o=t.el;for(;!o&&t.component;)o=(t=t.component.subTree).el;n.el=o,s&&s.subTree===n&&(s.vnode.el=o,Dn(s,o))}const ns=Symbol.for("v-scx"),ss=()=>Uo(ns);function os(e,t){return as(e,null,t)}function rs(e,t){return as(e,null,{flush:"post"})}function is(e,t){return as(e,null,{flush:"sync"})}const ls={};function cs(e,t,n){return as(e,t,n)}function as(e,n,{immediate:o,deep:r,flush:i,once:l}=t){if(n&&l){const e=n;n=(...t)=>{e(...t),C()}}const a=si,u=e=>!0===r?e:ps(e,!1===r?1:void 0);let p,h,f=!1,g=!1;if($t(e)?(p=()=>e.value,f=At(e)):wt(e)?(p=()=>u(e),f=!0):d(e)?(g=!0,f=e.some((e=>wt(e)||At(e))),p=()=>e.map((e=>$t(e)?e.value:wt(e)?u(e):m(e)?on(e,a,2):void 0))):p=m(e)?n?()=>on(e,a,2):()=>(h&&h(),rn(e,a,3,[v])):s,n&&r){const e=p;p=()=>ps(e())}let v=e=>{h=S.onStop=()=>{on(e,a,4),h=S.onStop=void 0}},y=g?new Array(e.length).fill(ls):ls;const b=()=>{if(S.active&&S.dirty)if(n){const e=S.run();(r||f||(g?e.some(((e,t)=>L(e,y[t]))):L(e,y)))&&(h&&h(),rn(n,a,3,[e,y===ls?void 0:g&&y[0]===ls?[]:y,v]),y=e)}else S.run()};let _;b.allowRecurse=!!n,"sync"===i?_=b:"post"===i?_=()=>cr(b,a&&a.suspense):(b.pre=!0,a&&(b.id=a.uid),_=()=>yn(b));const S=new he(p,s,_),x=de(),C=()=>{S.stop(),x&&c(x.effects,S)};return n?o?b():y=S.run():"post"===i?cr(S.run.bind(S),a&&a.suspense):S.run(),C}function us(e,t,n){const s=this.proxy,o=g(e)?e.includes(".")?ds(s,e):()=>s[e]:e.bind(s,s);let r;m(t)?r=t:(r=t.handler,n=t);const i=li(this),l=as(o,r.bind(s),n);return i(),l}function ds(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function ps(e,t,n=0,s){if(!y(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((s=s||new Set).has(e))return e;if(s.add(e),$t(e))ps(e.value,t,n,s);else if(d(e))for(let o=0;o<e.length;o++)ps(e[o],t,n,s);else if(h(e)||p(e))e.forEach((e=>{ps(e,t,n,s)}));else if(C(e))for(const o in e)ps(e[o],t,n,s);return e}function hs(e,n){if(null===En)return e;const s=yi(En)||En.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r<n.length;r++){let[e,i,l,c=t]=n[r];e&&(m(e)&&(e={mounted:e,updated:e}),e.deep&&ps(i),o.push({dir:e,instance:s,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e}function fs(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];r&&(l.oldValue=r[i].value);let c=l.dir[s];c&&(Ce(),rn(c,n,8,[e.el,l,e,t]),ke())}}const ms=Symbol("_leaveCb"),gs=Symbol("_enterCb");function vs(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Hs((()=>{e.isMounted=!0})),Ks((()=>{e.isUnmounting=!0})),e}const ys=[Function,Array],bs={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ys,onEnter:ys,onAfterEnter:ys,onEnterCancelled:ys,onBeforeLeave:ys,onLeave:ys,onAfterLeave:ys,onLeaveCancelled:ys,onBeforeAppear:ys,onAppear:ys,onAfterAppear:ys,onAppearCancelled:ys},_s={name:"BaseTransition",props:bs,setup(e,{slots:t}){const n=oi(),s=vs();let o;return()=>{const r=t.default&&ws(t.default(),!0);if(!r||!r.length)return;let i=r[0];if(r.length>1)for(const e of r)if(e.type!==wr){i=e;break}const l=It(e),{mode:c}=l;if(s.isLeaving)return Cs(i);const a=ks(i);if(!a)return Cs(i);const u=xs(a,l,s,n);Ts(a,u);const d=n.subTree,p=d&&ks(d);let h=!1;const{getTransitionKey:f}=a.type;if(f){const e=f();void 0===o?o=e:e!==o&&(o=e,h=!0)}if(p&&p.type!==wr&&(!Br(a,p)||h)){const e=xs(p,l,s,n);if(Ts(p,e),"out-in"===c)return s.isLeaving=!0,e.afterLeave=()=>{s.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},Cs(i);"in-out"===c&&a.type!==wr&&(e.delayLeave=(e,t,n)=>{Ss(s,p)[String(p.key)]=p,e[ms]=()=>{t(),e[ms]=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function Ss(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function xs(e,t,n,s){const{appear:o,mode:r,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:h,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,_=String(e.key),S=Ss(n,e),x=(e,t)=>{e&&rn(e,s,9,t)},C=(e,t)=>{const n=t[1];x(e,t),d(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},k={mode:r,persisted:i,beforeEnter(t){let s=l;if(!n.isMounted){if(!o)return;s=g||l}t[ms]&&t[ms](!0);const r=S[_];r&&Br(e,r)&&r.el[ms]&&r.el[ms](),x(s,[t])},enter(e){let t=c,s=a,r=u;if(!n.isMounted){if(!o)return;t=v||c,s=y||a,r=b||u}let i=!1;const l=e[gs]=t=>{i||(i=!0,x(t?r:s,[e]),k.delayedLeave&&k.delayedLeave(),e[gs]=void 0)};t?C(t,[e,l]):l()},leave(t,s){const o=String(e.key);if(t[gs]&&t[gs](!0),n.isUnmounting)return s();x(p,[t]);let r=!1;const i=t[ms]=n=>{r||(r=!0,s(),x(n?m:f,[t]),t[ms]=void 0,S[o]===e&&delete S[o])};S[o]=e,h?C(h,[t,i]):i()},clone:e=>xs(e,t,n,s)};return k}function Cs(e){if(Rs(e))return(e=Kr(e)).children=null,e}function ks(e){return Rs(e)?e.children?e.children[0]:void 0:e}function Ts(e,t){6&e.shapeFlag&&e.component?Ts(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ws(e,t=!1,n){let s=[],o=0;for(let r=0;r<e.length;r++){let i=e[r];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:r);i.type===kr?(128&i.patchFlag&&o++,s=s.concat(ws(i.children,t,l))):(t||i.type!==wr)&&s.push(null!=l?Kr(i,{key:l}):i)}if(o>1)for(let r=0;r<s.length;r++)s[r].patchFlag=-2;return s} +/*! #__NO_SIDE_EFFECTS__ */function Ns(e,t){return m(e)?(()=>l({name:e.name},t,{setup:e}))():e}const As=e=>!!e.type.__asyncLoader +/*! #__NO_SIDE_EFFECTS__ */;function Es(e){m(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:o=200,timeout:r,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const d=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,d()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return Ns({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return c},setup(){const e=si;if(c)return()=>Is(c,e);const t=t=>{a=null,ln(t,e,13,!s)};if(i&&e.suspense)return d().then((t=>()=>Is(t,e))).catch((e=>(t(e),()=>s?qr(s,{error:e}):null)));const l=Bt(!1),u=Bt(),p=Bt(!!o);return o&&setTimeout((()=>{p.value=!1}),o),null!=r&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${r}ms.`);t(e),u.value=e}}),r),d().then((()=>{l.value=!0,e.parent&&Rs(e.parent.vnode)&&(e.parent.effect.dirty=!0,yn(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?Is(c,e):u.value&&s?qr(s,{error:u.value}):n&&!p.value?qr(n):void 0}})}function Is(e,t){const{ref:n,props:s,children:o,ce:r}=t.vnode,i=qr(e,s,o);return i.ref=n,i.ce=r,delete t.vnode.ce,i}const Rs=e=>e.type.__isKeepAlive,Os={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=oi(),s=n.ctx,o=new Map,r=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:d}}}=s,p=d("div");function h(e){Bs(e),u(e,n,l,!0)}function f(e){o.forEach(((t,n)=>{const s=bi(t.type);!s||e&&e(s)||m(n)}))}function m(e){const t=o.get(e);i&&Br(t,i)?i&&Bs(i):h(t),o.delete(e),r.delete(e)}s.activate=(e,t,n,s,o)=>{const r=e.component;a(e,t,n,0,l),c(r.vnode,e,t,n,r,l,s,e.slotScopeIds,o),cr((()=>{r.isDeactivated=!1,r.a&&M(r.a);const t=e.props&&e.props.onVnodeMounted;t&&ei(t,r.parent,e)}),l)},s.deactivate=e=>{const t=e.component;a(e,p,null,1,l),cr((()=>{t.da&&M(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&ei(n,t.parent,e),t.isDeactivated=!0}),l)},cs((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>Fs(e,t))),t&&f((e=>!Fs(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&o.set(g,Vs(n.subTree))};return Hs(v),Ws(v),Ks((()=>{o.forEach((e=>{const{subTree:t,suspense:s}=n,o=Vs(t);if(e.type!==o.type||e.key!==o.key)h(e);else{Bs(o);const e=o.component.da;e&&cr(e,s)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),s=n[0];if(n.length>1)return i=null,n;if(!($r(s)&&(4&s.shapeFlag||128&s.shapeFlag)))return i=null,s;let l=Vs(s);const c=l.type,a=bi(As(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:d,max:p}=e;if(u&&(!a||!Fs(u,a))||d&&a&&Fs(d,a))return i=l,s;const h=null==l.key?c:l.key,f=o.get(h);return l.el&&(l=Kr(l),128&s.shapeFlag&&(s.ssContent=l)),g=h,f?(l.el=f.el,l.component=f.component,l.transition&&Ts(l,l.transition),l.shapeFlag|=512,r.delete(h),r.add(h)):(r.add(h),p&&r.size>parseInt(p,10)&&m(r.values().next().value)),l.shapeFlag|=256,i=l,Gn(s.type)?s:l}}};function Fs(e,t){return d(e)?e.some((e=>Fs(e,t))):g(e)?e.split(",").includes(t):"[object RegExp]"===S(e)&&e.test(t)}function Ls(e,t){Ps(e,"a",t)}function Ms(e,t){Ps(e,"da",t)}function Ps(e,t,n=si){const s=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Ds(t,s,n),n){let e=n.parent;for(;e&&e.parent;)Rs(e.parent.vnode)&&$s(s,t,n,e),e=e.parent}}function $s(e,t,n,s){const o=Ds(t,e,s,!0);zs((()=>{c(s[t],o)}),n)}function Bs(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Vs(e){return 128&e.shapeFlag?e.ssContent:e}function Ds(e,t,n=si,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;Ce();const o=li(n),r=rn(t,n,e,s);return o(),ke(),r});return s?o.unshift(r):o.push(r),r}}const Us=e=>(t,n=si)=>(!pi||"sp"===e)&&Ds(e,((...e)=>t(...e)),n),js=Us("bm"),Hs=Us("m"),qs=Us("bu"),Ws=Us("u"),Ks=Us("bum"),zs=Us("um"),Gs=Us("sp"),Js=Us("rtg"),Xs=Us("rtc");function Qs(e,t=si){Ds("ec",e,t)}function Zs(e,t,n,s){let o;const r=n&&n[s];if(d(e)||g(e)){o=new Array(e.length);for(let n=0,s=e.length;n<s;n++)o[n]=t(e[n],n,void 0,r&&r[n])}else if("number"==typeof e){o=new Array(e);for(let n=0;n<e;n++)o[n]=t(n+1,n,void 0,r&&r[n])}else if(y(e))if(e[Symbol.iterator])o=Array.from(e,((e,n)=>t(e,n,void 0,r&&r[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let s=0,i=n.length;s<i;s++){const i=n[s];o[s]=t(e[i],i,s,r&&r[s])}}else o=[];return n&&(n[s]=o),o}function Ys(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(d(s))for(let t=0;t<s.length;t++)e[s[t].name]=s[t].fn;else s&&(e[s.name]=s.key?(...e)=>{const t=s.fn(...e);return t&&(t.key=s.key),t}:s.fn)}return e}function eo(e,t,n={},s,o){if(En.isCE||En.parent&&As(En.parent)&&En.parent.isCE)return"default"!==t&&(n.name=t),qr("slot",n,s&&s());let r=e[t];r&&r._c&&(r._d=!1),Ir();const i=r&&to(r(n)),l=Pr(kr,{key:n.key||i&&i.key||`_${t}`},i||(s?s():[]),i&&1===e._?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l}function to(e){return e.some((e=>!$r(e)||e.type!==wr&&!(e.type===kr&&!to(e.children))))?e:null}function no(e,t){const n={};for(const s in e)n[t&&/[A-Z]/.test(s)?`on:${s}`:F(s)]=e[s];return n}const so=e=>e?ai(e)?yi(e)||e.proxy:so(e.parent):null,oo=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>so(e.parent),$root:e=>so(e.root),$emit:e=>e.emit,$options:e=>Ao(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,yn(e.update)}),$nextTick:e=>e.n||(e.n=vn.bind(e.proxy)),$watch:e=>us.bind(e)}),ro=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),io={get({_:e},n){const{ctx:s,setupState:o,data:r,props:i,accessCache:l,type:c,appContext:a}=e;let d;if("$"!==n[0]){const c=l[n];if(void 0!==c)switch(c){case 1:return o[n];case 2:return r[n];case 4:return s[n];case 3:return i[n]}else{if(ro(o,n))return l[n]=1,o[n];if(r!==t&&u(r,n))return l[n]=2,r[n];if((d=e.propsOptions[0])&&u(d,n))return l[n]=3,i[n];if(s!==t&&u(s,n))return l[n]=4,s[n];ko&&(l[n]=0)}}const p=oo[n];let h,f;return p?("$attrs"===n&&Me(e,0,n),p(e)):(h=c.__cssModules)&&(h=h[n])?h:s!==t&&u(s,n)?(l[n]=4,s[n]):(f=a.config.globalProperties,u(f,n)?f[n]:void 0)},set({_:e},n,s){const{data:o,setupState:r,ctx:i}=e;return ro(r,n)?(r[n]=s,!0):o!==t&&u(o,n)?(o[n]=s,!0):!u(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(i[n]=s,!0))},has({_:{data:e,setupState:n,accessCache:s,ctx:o,appContext:r,propsOptions:i}},l){let c;return!!s[l]||e!==t&&u(e,l)||ro(n,l)||(c=i[0])&&u(c,l)||u(o,l)||u(oo,l)||u(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:u(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},lo=l({},io,{get(e,t){if(t!==Symbol.unscopables)return io.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!U(t)});function co(){return null}function ao(){return null}function uo(e){}function po(e){}function ho(){return null}function fo(){}function mo(e,t){return null}function go(){return yo().slots}function vo(){return yo().attrs}function yo(){const e=oi();return e.setupContext||(e.setupContext=vi(e))}function bo(e){return d(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function _o(e,t){const n=bo(e);for(const s in t){if(s.startsWith("__skip"))continue;let e=n[s];e?d(e)||m(e)?e=n[s]={type:e,default:t[s]}:e.default=t[s]:null===e&&(e=n[s]={default:t[s]}),e&&t[`__skip_${s}`]&&(e.skipFactory=!0)}return n}function So(e,t){return e&&t?d(e)&&d(t)?e.concat(t):l({},bo(e),bo(t)):e||t}function xo(e,t){const n={};for(const s in e)t.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>e[s]});return n}function Co(e){const t=oi();let n=e();return ci(),b(n)&&(n=n.catch((e=>{throw li(t),e}))),[n,()=>li(t)]}let ko=!0;function To(e){const t=Ao(e),n=e.proxy,o=e.ctx;ko=!1,t.beforeCreate&&wo(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:c,provide:a,inject:u,created:p,beforeMount:h,mounted:f,beforeUpdate:g,updated:v,activated:b,deactivated:_,beforeUnmount:S,unmounted:x,render:C,renderTracked:k,renderTriggered:T,errorCaptured:w,serverPrefetch:N,expose:A,inheritAttrs:E,components:I,directives:R}=t;if(u&&function(e,t,n=s){d(e)&&(e=Oo(e));for(const s in e){const n=e[s];let o;o=y(n)?"default"in n?Uo(n.from||s,n.default,!0):Uo(n.from||s):Uo(n),$t(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[s]=o}}(u,o,null),l)for(const s in l){const e=l[s];m(e)&&(o[s]=e.bind(n))}if(r){const t=r.call(n,n);y(t)&&(e.data=St(t))}if(ko=!0,i)for(const d in i){const e=i[d],t=m(e)?e.bind(n,n):m(e.get)?e.get.bind(n,n):s,r=!m(e)&&m(e.set)?e.set.bind(n):s,l=_i({get:t,set:r});Object.defineProperty(o,d,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const s in c)No(c[s],o,n,s);if(a){const e=m(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Do(t,e[t])}))}function O(e,t){d(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&wo(p,e,"c"),O(js,h),O(Hs,f),O(qs,g),O(Ws,v),O(Ls,b),O(Ms,_),O(Qs,w),O(Xs,k),O(Js,T),O(Ks,S),O(zs,x),O(Gs,N),d(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});C&&e.render===s&&(e.render=C),null!=E&&(e.inheritAttrs=E),I&&(e.components=I),R&&(e.directives=R)}function wo(e,t,n){rn(d(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function No(e,t,n,s){const o=s.includes(".")?ds(n,s):()=>n[s];if(g(e)){const n=t[e];m(n)&&cs(o,n)}else if(m(e))cs(o,e.bind(n));else if(y(e))if(d(e))e.forEach((e=>No(e,t,n,s)));else{const s=m(e.handler)?e.handler.bind(n):t[e.handler];m(s)&&cs(o,s,e)}}function Ao(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let c;return l?c=l:o.length||n||s?(c={},o.length&&o.forEach((e=>Eo(c,e,i,!0))),Eo(c,t,i)):c=t,y(t)&&r.set(t,c),c}function Eo(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Eo(e,r,n,!0),o&&o.forEach((t=>Eo(e,t,n,!0)));for(const i in t)if(s&&"expose"===i);else{const s=Io[i]||n&&n[i];e[i]=s?s(e[i],t[i]):t[i]}return e}const Io={data:Ro,props:Mo,emits:Mo,methods:Lo,computed:Lo,beforeCreate:Fo,created:Fo,beforeMount:Fo,mounted:Fo,beforeUpdate:Fo,updated:Fo,beforeDestroy:Fo,beforeUnmount:Fo,destroyed:Fo,unmounted:Fo,activated:Fo,deactivated:Fo,errorCaptured:Fo,serverPrefetch:Fo,components:Lo,directives:Lo,watch:function(e,t){if(!e)return t;if(!t)return e;const n=l(Object.create(null),e);for(const s in t)n[s]=Fo(e[s],t[s]);return n},provide:Ro,inject:function(e,t){return Lo(Oo(e),Oo(t))}};function Ro(e,t){return t?e?function(){return l(m(e)?e.call(this,this):e,m(t)?t.call(this,this):t)}:t:e}function Oo(e){if(d(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Fo(e,t){return e?[...new Set([].concat(e,t))]:t}function Lo(e,t){return e?l(Object.create(null),e,t):t}function Mo(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:l(Object.create(null),bo(e),bo(null!=t?t:{})):t}function Po(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let $o=0;function Bo(e,t){return function(n,s=null){m(n)||(n=l({},n)),null==s||y(s)||(s=null);const o=Po(),r=new WeakSet;let i=!1;const c=o.app={_uid:$o++,_component:n,_props:s,_container:null,_context:o,_instance:null,version:wi,get config(){return o.config},set config(e){},use:(e,...t)=>(r.has(e)||(e&&m(e.install)?(r.add(e),e.install(c,...t)):m(e)&&(r.add(e),e(c,...t))),c),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),c),component:(e,t)=>t?(o.components[e]=t,c):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,c):o.directives[e],mount(r,l,a){if(!i){const u=qr(n,s);return u.appContext=o,!0===a?a="svg":!1===a&&(a=void 0),l&&t?t(u,r):e(u,r,a),i=!0,c._container=r,r.__vue_app__=c,yi(u.component)||u.component.proxy}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,c),runWithContext(e){Vo=c;try{return e()}finally{Vo=null}}};return c}}let Vo=null;function Do(e,t){if(si){let n=si.provides;const s=si.parent&&si.parent.provides;s===n&&(n=si.provides=Object.create(s)),n[e]=t}else;}function Uo(e,t,n=!1){const s=si||En;if(s||Vo){const o=s?null==s.parent?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:Vo._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&m(t)?t.call(s&&s.proxy):t}}function jo(){return!!(si||En||Vo)}function Ho(e,n,s,o){const[r,i]=e.propsOptions;let l,c=!1;if(n)for(let t in n){if(T(t))continue;const a=n[t];let d;r&&u(r,d=E(t))?i&&i.includes(d)?(l||(l={}))[d]=a:s[d]=a:An(e.emitsOptions,t)||t in o&&a===o[t]||(o[t]=a,c=!0)}if(i){const n=It(s),o=l||t;for(let t=0;t<i.length;t++){const l=i[t];s[l]=qo(r,n,l,o[l],e,!u(o,l))}}return c}function qo(e,t,n,s,o,r){const i=e[n];if(null!=i){const e=u(i,"default");if(e&&void 0===s){const e=i.default;if(i.type!==Function&&!i.skipFactory&&m(e)){const{propsDefaults:r}=o;if(n in r)s=r[n];else{const i=li(o);s=r[n]=e.call(null,t),i()}}else s=e}i[0]&&(r&&!e?s=!1:!i[1]||""!==s&&s!==R(n)||(s=!0))}return s}function Wo(e,s,o=!1){const r=s.propsCache,i=r.get(e);if(i)return i;const c=e.props,a={},p=[];let h=!1;if(!m(e)){const t=e=>{h=!0;const[t,n]=Wo(e,s,!0);l(a,t),n&&p.push(...n)};!o&&s.mixins.length&&s.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!h)return y(e)&&r.set(e,n),n;if(d(c))for(let n=0;n<c.length;n++){const e=E(c[n]);Ko(e)&&(a[e]=t)}else if(c)for(const t in c){const e=E(t);if(Ko(e)){const n=c[t],s=a[e]=d(n)||m(n)?{type:n}:l({},n);if(s){const t=Jo(Boolean,s.type),n=Jo(String,s.type);s[0]=t>-1,s[1]=n<0||t<n,(t>-1||u(s,"default"))&&p.push(e)}}}const f=[a,p];return y(e)&&r.set(e,f),f}function Ko(e){return"$"!==e[0]}function zo(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function Go(e,t){return zo(e)===zo(t)}function Jo(e,t){return d(t)?t.findIndex((t=>Go(t,e))):m(t)&&Go(t,e)?0:-1}const Xo=e=>"_"===e[0]||"$stable"===e,Qo=e=>d(e)?e.map(Xr):[Xr(e)],Zo=(e,t,n)=>{if(t._n)return t;const s=Mn(((...e)=>Qo(t(...e))),n);return s._c=!1,s},Yo=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Xo(o))continue;const n=e[o];if(m(n))t[o]=Zo(0,n,s);else if(null!=n){const e=Qo(n);t[o]=()=>e}}},er=(e,t)=>{const n=Qo(t);e.slots.default=()=>n},tr=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=It(t),P(t,"_",n)):Yo(t,e.slots={})}else e.slots={},t&&er(e,t);P(e.slots,Dr,1)},nr=(e,n,s)=>{const{vnode:o,slots:r}=e;let i=!0,c=t;if(32&o.shapeFlag){const e=n._;e?s&&1===e?i=!1:(l(r,n),s||1!==e||delete r._):(i=!n.$stable,Yo(n,r)),c=n}else n&&(er(e,n),c={default:1});if(i)for(const t in r)Xo(t)||null!=c[t]||delete r[t]};function sr(e,n,s,o,r=!1){if(d(e))return void e.forEach(((e,t)=>sr(e,n&&(d(n)?n[t]:n),s,o,r)));if(As(o)&&!r)return;const i=4&o.shapeFlag?yi(o.component)||o.component.proxy:o.el,l=r?null:i,{i:a,r:p}=e,h=n&&n.r,f=a.refs===t?a.refs={}:a.refs,v=a.setupState;if(null!=h&&h!==p&&(g(h)?(f[h]=null,u(v,h)&&(v[h]=null)):$t(h)&&(h.value=null)),m(p))on(p,a,12,[l,f]);else{const t=g(p),n=$t(p),o=e.f;if(t||n){const a=()=>{if(o){const n=t?u(v,p)?v[p]:f[p]:p.value;r?d(n)&&c(n,i):d(n)?n.includes(i)||n.push(i):t?(f[p]=[i],u(v,p)&&(v[p]=f[p])):(p.value=[i],e.k&&(f[e.k]=p.value))}else t?(f[p]=l,u(v,p)&&(v[p]=l)):n&&(p.value=l,e.k&&(f[e.k]=l))};r||o?a():(a.id=-1,cr(a,s))}}}let or=!1;const rr=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,ir=e=>8===e.nodeType;function lr(e){const{mt:t,p:n,o:{patchProp:s,createText:o,nextSibling:i,parentNode:l,remove:c,insert:a,createComment:u}}=e,d=(n,s,r,c,u,b=!1)=>{const _=ir(n)&&"["===n.data,S=()=>m(n,s,r,c,u,_),{type:x,ref:C,shapeFlag:k,patchFlag:T}=s;let w=n.nodeType;s.el=n,-2===T&&(b=!1,s.dynamicChildren=null);let N=null;switch(x){case Tr:3!==w?""===s.children?(a(s.el=o(""),l(n),n),N=n):N=S():(n.data!==s.children&&(or=!0,n.data=s.children),N=i(n));break;case wr:y(n)?(N=i(n),v(s.el=n.content.firstChild,n,r)):N=8!==w||_?S():i(n);break;case Nr:if(_&&(w=(n=i(n)).nodeType),1===w||3===w){N=n;const e=!s.children.length;for(let t=0;t<s.staticCount;t++)e&&(s.children+=1===N.nodeType?N.outerHTML:N.data),t===s.staticCount-1&&(s.anchor=N),N=i(N);return _?i(N):N}S();break;case kr:N=_?f(n,s,r,c,u,b):S();break;default:if(1&k)N=1===w&&s.type.toLowerCase()===n.tagName.toLowerCase()||y(n)?p(n,s,r,c,u,b):S();else if(6&k){s.slotScopeIds=u;const e=l(n);if(N=_?g(n):ir(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(s,e,null,r,c,rr(e),b),As(s)){let t;_?(t=qr(kr),t.anchor=N?N.previousSibling:e.lastChild):t=3===n.nodeType?zr(""):qr("div"),t.el=n,s.component.subTree=t}}else 64&k?N=8!==w?S():s.type.hydrate(n,s,r,c,u,b,e,h):128&k&&(N=s.type.hydrate(n,s,r,c,rr(l(n)),u,b,e,d))}return null!=C&&sr(C,null,c,s),N},p=(e,t,n,o,i,l)=>{l=l||!!t.dynamicChildren;const{type:a,props:u,patchFlag:d,shapeFlag:p,dirs:f,transition:m}=t,g="input"===a||"option"===a;if(g||-1!==d){f&&fs(t,null,n,"created");let a,b=!1;if(y(e)){b=fr(o,m)&&n&&n.vnode.props&&n.vnode.props.appear;const s=e.content.firstChild;b&&m.beforeEnter(s),v(s,e,n),t.el=e=s}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let s=h(e.firstChild,t,e,n,o,i,l);for(;s;){or=!0;const e=s;s=s.nextSibling,c(e)}}else 8&p&&e.textContent!==t.children&&(or=!0,e.textContent=t.children);if(u)if(g||!l||48&d)for(const t in u)(g&&(t.endsWith("value")||"indeterminate"===t)||r(t)&&!T(t)||"."===t[0])&&s(e,t,null,u[t],void 0,void 0,n);else u.onClick&&s(e,"onClick",null,u.onClick,void 0,void 0,n);(a=u&&u.onVnodeBeforeMount)&&ei(a,n,t),f&&fs(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||f||b)&&es((()=>{a&&ei(a,n,t),b&&m.enter(e),f&&fs(t,null,n,"mounted")}),o)}return e.nextSibling},h=(e,t,s,o,r,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let u=0;u<a;u++){const t=l?c[u]:c[u]=Xr(c[u]);if(e)e=d(e,t,o,r,i,l);else{if(t.type===Tr&&!t.children)continue;or=!0,n(null,t,s,null,o,r,rr(s),i)}}return e},f=(e,t,n,s,o,r)=>{const{slotScopeIds:c}=t;c&&(o=o?o.concat(c):c);const d=l(e),p=h(i(e),t,d,n,s,o,r);return p&&ir(p)&&"]"===p.data?i(t.anchor=p):(or=!0,a(t.anchor=u("]"),d,p),p)},m=(e,t,s,o,r,a)=>{if(or=!0,t.el=null,a){const t=g(e);for(;;){const n=i(e);if(!n||n===t)break;c(n)}}const u=i(e),d=l(e);return c(e),n(null,t,d,u,s,o,rr(d),r),u},g=(e,t="[",n="]")=>{let s=0;for(;e;)if((e=i(e))&&ir(e)&&(e.data===t&&s++,e.data===n)){if(0===s)return i(e);s--}return e},v=(e,t,n)=>{const s=t.parentNode;s&&s.replaceChild(e,t);let o=n;for(;o;)o.vnode.el===t&&(o.vnode.el=o.subTree.el=e),o=o.parent},y=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),xn(),void(t._vnode=e);or=!1,d(t.firstChild,e,null,null,null),xn(),t._vnode=e,or&&console.error("Hydration completed but contains mismatches.")},d]}const cr=es;function ar(e){return dr(e)}function ur(e){return dr(e,lr)}function dr(e,o){D().__VUE__=!0;const{insert:r,remove:i,patchProp:l,createElement:c,createText:a,createComment:d,setText:p,setElementText:h,parentNode:f,nextSibling:m,setScopeId:g=s,insertStaticContent:v}=e,y=(e,t,n,s=null,o=null,r=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Br(e,t)&&(s=Q(e),K(e,o,r,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:d}=t;switch(a){case Tr:_(e,t,n,s);break;case wr:S(e,t,n,s);break;case Nr:null==e&&x(t,n,s,i);break;case kr:F(e,t,n,s,o,r,i,l,c);break;default:1&d?C(e,t,n,s,o,r,i,l,c):6&d?L(e,t,n,s,o,r,i,l,c):(64&d||128&d)&&a.process(e,t,n,s,o,r,i,l,c,ee)}null!=u&&o&&sr(u,e&&e.ref,r,t||e,!t)},_=(e,t,n,s)=>{if(null==e)r(t.el=a(t.children),n,s);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},S=(e,t,n,s)=>{null==e?r(t.el=d(t.children||""),n,s):t.el=e.el},x=(e,t,n,s)=>{[e.el,e.anchor]=v(e.children,t,n,s,e.el,e.anchor)},C=(e,t,n,s,o,r,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?k(t,n,s,o,r,i,l,c):A(e,t,o,r,i,l,c)},k=(e,t,n,s,o,i,a,u)=>{let d,p;const{props:f,shapeFlag:m,transition:g,dirs:v}=e;if(d=e.el=c(e.type,i,f&&f.is,f),8&m?h(d,e.children):16&m&&N(e.children,d,null,s,o,pr(e,i),a,u),v&&fs(e,null,s,"created"),w(d,e,e.scopeId,a,s),f){for(const t in f)"value"===t||T(t)||l(d,t,null,f[t],i,e.children,s,o,X);"value"in f&&l(d,"value",null,f.value,i),(p=f.onVnodeBeforeMount)&&ei(p,s,e)}v&&fs(e,null,s,"beforeMount");const y=fr(o,g);y&&g.beforeEnter(d),r(d,t,n),((p=f&&f.onVnodeMounted)||y||v)&&cr((()=>{p&&ei(p,s,e),y&&g.enter(d),v&&fs(e,null,s,"mounted")}),o)},w=(e,t,n,s,o)=>{if(n&&g(e,n),s)for(let r=0;r<s.length;r++)g(e,s[r]);if(o){if(t===o.subTree){const t=o.vnode;w(e,t,t.scopeId,t.slotScopeIds,o.parent)}}},N=(e,t,n,s,o,r,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?Qr(e[a]):Xr(e[a]);y(null,c,t,n,s,o,r,i,l)}},A=(e,n,s,o,r,i,c)=>{const a=n.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=n;u|=16&e.patchFlag;const f=e.props||t,m=n.props||t;let g;if(s&&hr(s,!1),(g=m.onVnodeBeforeUpdate)&&ei(g,s,n,e),p&&fs(n,e,s,"beforeUpdate"),s&&hr(s,!0),d?I(e.dynamicChildren,d,a,s,o,pr(n,r),i):c||j(e,n,a,null,s,o,pr(n,r),i,!1),u>0){if(16&u)O(a,n,f,m,s,o,r);else if(2&u&&f.class!==m.class&&l(a,"class",null,m.class,r),4&u&&l(a,"style",f.style,m.style,r),8&u){const t=n.dynamicProps;for(let n=0;n<t.length;n++){const i=t[n],c=f[i],u=m[i];u===c&&"value"!==i||l(a,i,c,u,r,e.children,s,o,X)}}1&u&&e.children!==n.children&&h(a,n.children)}else c||null!=d||O(a,n,f,m,s,o,r);((g=m.onVnodeUpdated)||p)&&cr((()=>{g&&ei(g,s,n,e),p&&fs(n,e,s,"updated")}),o)},I=(e,t,n,s,o,r,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],u=c.el&&(c.type===kr||!Br(c,a)||70&c.shapeFlag)?f(c.el):n;y(c,a,u,null,s,o,r,i,!0)}},O=(e,n,s,o,r,i,c)=>{if(s!==o){if(s!==t)for(const t in s)T(t)||t in o||l(e,t,s[t],null,c,n.children,r,i,X);for(const t in o){if(T(t))continue;const a=o[t],u=s[t];a!==u&&"value"!==t&&l(e,t,u,a,c,n.children,r,i,X)}"value"in o&&l(e,"value",s.value,o.value,c)}},F=(e,t,n,s,o,i,l,c,u)=>{const d=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(r(d,n,s),r(p,n,s),N(t.children||[],n,p,o,i,l,c,u)):h>0&&64&h&&f&&e.dynamicChildren?(I(e.dynamicChildren,f,n,o,i,l,c),(null!=t.key||o&&t===o.subTree)&&mr(e,t,!0)):j(e,t,n,p,o,i,l,c,u)},L=(e,t,n,s,o,r,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?o.ctx.activate(t,n,s,i,c):$(t,n,s,o,r,i,c):B(e,t,c)},$=(e,n,s,o,r,i,l)=>{const c=e.component=function(e,n,s){const o=e.type,r=(n?n.appContext:e.appContext)||ti,i={uid:ni++,vnode:e,type:o,parent:n,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new ce(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Wo(o,r),emitsOptions:Nn(o,r),emit:null,emitted:null,propsDefaults:t,inheritAttrs:o.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=n?n.root:i,i.emit=wn.bind(null,i),e.ce&&e.ce(i);return i}(e,o,r);if(Rs(e)&&(c.ctx.renderer=ee),function(e,t=!1){t&&ii(t);const{props:n,children:s}=e.vnode,o=ai(e);(function(e,t,n,s=!1){const o={},r={};P(r,Dr,1),e.propsDefaults=Object.create(null),Ho(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);e.props=n?s?o:xt(o):e.type.props?o:r,e.attrs=r})(e,n,o,t),tr(e,s);const r=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Rt(new Proxy(e.ctx,io));const{setup:s}=n;if(s){const n=e.setupContext=s.length>1?vi(e):null,o=li(e);Ce();const r=on(s,e,0,[e.props,n]);if(ke(),o(),b(r)){if(r.then(ci,ci),t)return r.then((n=>{hi(e,n,t)})).catch((t=>{ln(t,e,0)}));e.asyncDep=r}else hi(e,r,t)}else gi(e,t)}(e,t):void 0;t&&ii(!1)}(c),c.asyncDep){if(r&&r.registerDep(c,V),!e.el){const e=c.subTree=qr(wr);S(null,e,n,s)}}else V(c,e,n,s,r,i,l)},B=(e,t,n)=>{const s=t.component=e.component;if(function(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:c}=t,a=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!o&&!l||l&&l.$stable)||s!==i&&(s?!i||Vn(s,i,a):!!i);if(1024&c)return!0;if(16&c)return s?Vn(s,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==s[n]&&!An(a,n))return!0}}return!1}(e,t,n)){if(s.asyncDep&&!s.asyncResolved)return void U(s,t,n);s.next=t,function(e){const t=un.indexOf(e);t>dn&&un.splice(t,1)}(s.update),s.effect.dirty=!0,s.update()}else t.el=e.el,s.vnode=t},V=(e,t,n,o,r,i,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:s,parent:o,vnode:a}=e;{const n=gr(e);if(n)return t&&(t.el=a.el,U(e,t,l)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,d=t;hr(e,!1),t?(t.el=a.el,U(e,t,l)):t=a,n&&M(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&ei(u,o,t,a),hr(e,!0);const p=Pn(e),h=e.subTree;e.subTree=p,y(h,p,f(h.el),Q(h),e,r,i),t.el=p.el,null===d&&Dn(e,p.el),s&&cr(s,r),(u=t.props&&t.props.onVnodeUpdated)&&cr((()=>ei(u,o,t,a)),r)}else{let s;const{el:l,props:c}=t,{bm:a,m:u,parent:d}=e,p=As(t);if(hr(e,!1),a&&M(a),!p&&(s=c&&c.onVnodeBeforeMount)&&ei(s,d,t),hr(e,!0),l&&ne){const n=()=>{e.subTree=Pn(e),ne(l,e.subTree,e,r,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const s=e.subTree=Pn(e);y(null,s,n,o,e,r,i),t.el=s.el}if(u&&cr(u,r),!p&&(s=c&&c.onVnodeMounted)){const e=t;cr((()=>ei(s,d,e)),r)}(256&t.shapeFlag||d&&As(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&cr(e.a,r),e.isMounted=!0,t=n=o=null}},a=e.effect=new he(c,s,(()=>yn(u)),e.scope),u=e.update=()=>{a.dirty&&a.run()};u.id=e.uid,hr(e,!0),u()},U=(e,t,n)=>{t.component=e;const s=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=It(o),[c]=e.propsOptions;let a=!1;if(!(s||i>0)||16&i){let s;Ho(e,t,o,r)&&(a=!0);for(const r in l)t&&(u(t,r)||(s=R(r))!==r&&u(t,s))||(c?!n||void 0===n[r]&&void 0===n[s]||(o[r]=qo(c,l,r,void 0,e,!0)):delete o[r]);if(r!==l)for(const e in r)t&&u(t,e)||(delete r[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let s=0;s<n.length;s++){let i=n[s];if(An(e.emitsOptions,i))continue;const d=t[i];if(c)if(u(r,i))d!==r[i]&&(r[i]=d,a=!0);else{const t=E(i);o[t]=qo(c,l,t,d,e,!1)}else d!==r[i]&&(r[i]=d,a=!0)}}a&&Pe(e,"set","$attrs")}(e,t.props,s,n),nr(e,t.children,n),Ce(),Sn(e),ke()},j=(e,t,n,s,o,r,i,l,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:f}=t;if(p>0){if(128&p)return void q(a,d,n,s,o,r,i,l,c);if(256&p)return void H(a,d,n,s,o,r,i,l,c)}8&f?(16&u&&X(a,o,r),d!==a&&h(n,d)):16&u?16&f?q(a,d,n,s,o,r,i,l,c):X(a,o,r,!0):(8&u&&h(n,""),16&f&&N(d,n,s,o,r,i,l,c))},H=(e,t,s,o,r,i,l,c,a)=>{const u=(e=e||n).length,d=(t=t||n).length,p=Math.min(u,d);let h;for(h=0;h<p;h++){const n=t[h]=a?Qr(t[h]):Xr(t[h]);y(e[h],n,s,null,r,i,l,c,a)}u>d?X(e,r,i,!0,!1,p):N(t,s,o,r,i,l,c,a,p)},q=(e,t,s,o,r,i,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;for(;u<=p&&u<=h;){const n=e[u],o=t[u]=a?Qr(t[u]):Xr(t[u]);if(!Br(n,o))break;y(n,o,s,null,r,i,l,c,a),u++}for(;u<=p&&u<=h;){const n=e[p],o=t[h]=a?Qr(t[h]):Xr(t[h]);if(!Br(n,o))break;y(n,o,s,null,r,i,l,c,a),p--,h--}if(u>p){if(u<=h){const e=h+1,n=e<d?t[e].el:o;for(;u<=h;)y(null,t[u]=a?Qr(t[u]):Xr(t[u]),s,n,r,i,l,c,a),u++}}else if(u>h)for(;u<=p;)K(e[u],r,i,!0),u++;else{const f=u,m=u,g=new Map;for(u=m;u<=h;u++){const e=t[u]=a?Qr(t[u]):Xr(t[u]);null!=e.key&&g.set(e.key,u)}let v,b=0;const _=h-m+1;let S=!1,x=0;const C=new Array(_);for(u=0;u<_;u++)C[u]=0;for(u=f;u<=p;u++){const n=e[u];if(b>=_){K(n,r,i,!0);continue}let o;if(null!=n.key)o=g.get(n.key);else for(v=m;v<=h;v++)if(0===C[v-m]&&Br(n,t[v])){o=v;break}void 0===o?K(n,r,i,!0):(C[o-m]=u+1,o>=x?x=o:S=!0,y(n,t[o],s,null,r,i,l,c,a),b++)}const k=S?function(e){const t=e.slice(),n=[0];let s,o,r,i,l;const c=e.length;for(s=0;s<c;s++){const c=e[s];if(0!==c){if(o=n[n.length-1],e[o]<c){t[s]=o,n.push(s);continue}for(r=0,i=n.length-1;r<i;)l=r+i>>1,e[n[l]]<c?r=l+1:i=l;c<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}r=n.length,i=n[r-1];for(;r-- >0;)n[r]=i,i=t[i];return n}(C):n;for(v=k.length-1,u=_-1;u>=0;u--){const e=m+u,n=t[e],p=e+1<d?t[e+1].el:o;0===C[u]?y(null,n,s,p,r,i,l,c,a):S&&(v<0||u!==k[v]?W(n,s,p,2):v--)}}},W=(e,t,n,s,o=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void W(e.component.subTree,t,n,s);if(128&u)return void e.suspense.move(t,n,s);if(64&u)return void l.move(e,t,n,ee);if(l===kr){r(i,t,n);for(let e=0;e<a.length;e++)W(a[e],t,n,s);return void r(e.anchor,t,n)}if(l===Nr)return void(({el:e,anchor:t},n,s)=>{let o;for(;e&&e!==t;)o=m(e),r(e,n,s),e=o;r(t,n,s)})(e,t,n);if(2!==s&&1&u&&c)if(0===s)c.beforeEnter(i),r(i,t,n),cr((()=>c.enter(i)),o);else{const{leave:e,delayLeave:s,afterLeave:o}=c,l=()=>r(i,t,n),a=()=>{e(i,(()=>{l(),o&&o()}))};s?s(i,l,a):a()}else r(i,t,n)},K=(e,t,n,s=!1,o=!1)=>{const{type:r,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:d,dirs:p}=e;if(null!=l&&sr(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const h=1&u&&p,f=!As(e);let m;if(f&&(m=i&&i.onVnodeBeforeUnmount)&&ei(m,t,e),6&u)J(e.component,n,s);else{if(128&u)return void e.suspense.unmount(n,s);h&&fs(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,o,ee,s):a&&(r!==kr||d>0&&64&d)?X(a,t,n,!1,!0):(r===kr&&384&d||!o&&16&u)&&X(c,t,n),s&&z(e)}(f&&(m=i&&i.onVnodeUnmounted)||h)&&cr((()=>{m&&ei(m,t,e),h&&fs(e,null,t,"unmounted")}),n)},z=e=>{const{type:t,el:n,anchor:s,transition:o}=e;if(t===kr)return void G(n,s);if(t===Nr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)})(e);const r=()=>{i(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:s}=o,i=()=>t(n,r);s?s(e.el,r,i):i()}else r()},G=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},J=(e,t,n)=>{const{bum:s,scope:o,update:r,subTree:i,um:l}=e;s&&M(s),o.stop(),r&&(r.active=!1,K(i,e,t,n)),l&&cr(l,t),cr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,s=!1,o=!1,r=0)=>{for(let i=r;i<e.length;i++)K(e[i],t,n,s,o)},Q=e=>6&e.shapeFlag?Q(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el);let Z=!1;const Y=(e,t,n)=>{null==e?t._vnode&&K(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,Sn(),xn(),Z=!1),t._vnode=e},ee={p:y,um:K,m:W,r:z,mt:$,mc:N,pc:j,pbc:I,n:Q,o:e};let te,ne;return o&&([te,ne]=o(ee)),{render:Y,hydrate:te,createApp:Bo(Y,te)}}function pr({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function hr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function fr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function mr(e,t,n=!1){const s=e.children,o=t.children;if(d(s)&&d(o))for(let r=0;r<s.length;r++){const e=s[r];let t=o[r];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=o[r]=Qr(o[r]),t.el=e.el),n||mr(e,t)),t.type===Tr&&(t.el=e.el)}}function gr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:gr(t)}const vr=e=>e&&(e.disabled||""===e.disabled),yr=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,br=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,_r=(e,t)=>{const n=e&&e.to;if(g(n)){if(t){return t(n)}return null}return n};function Sr(e,t,n,{o:{insert:s},m:o},r=2){0===r&&s(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,d=2===r;if(d&&s(i,t,n),(!d||vr(u))&&16&c)for(let p=0;p<a.length;p++)o(a[p],t,n,2);d&&s(l,t,n)}const xr={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,r,i,l,c,a){const{mc:u,pc:d,pbc:p,o:{insert:h,querySelector:f,createText:m}}=a,g=vr(t.props);let{shapeFlag:v,children:y,dynamicChildren:b}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");h(e,n,s),h(a,n,s);const d=t.target=_r(t.props,f),p=t.targetAnchor=m("");d&&(h(p,d),"svg"===i||yr(d)?i="svg":("mathml"===i||br(d))&&(i="mathml"));const b=(e,t)=>{16&v&&u(y,e,t,o,r,i,l,c)};g?b(n,a):d&&b(d,p)}else{t.el=e.el;const s=t.anchor=e.anchor,u=t.target=e.target,h=t.targetAnchor=e.targetAnchor,m=vr(e.props),v=m?n:u,y=m?s:h;if("svg"===i||yr(u)?i="svg":("mathml"===i||br(u))&&(i="mathml"),b?(p(e.dynamicChildren,b,v,o,r,i,l),mr(e,t,!0)):c||d(e,t,v,y,o,r,i,l,!1),g)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Sr(t,n,s,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=_r(t.props,f);e&&Sr(t,e,null,a,0)}else m&&Sr(t,u,h,a,1)}Cr(t)},remove(e,t,n,s,{um:o,o:{remove:r}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:d,props:p}=e;if(d&&r(u),i&&r(a),16&l){const e=i||!vr(p);for(let s=0;s<c.length;s++){const r=c[s];o(r,t,n,e,!!r.dynamicChildren)}}},move:Sr,hydrate:function(e,t,n,s,o,r,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=_r(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(vr(t.props))t.anchor=a(i(e),t,l(e),n,s,o,r),t.targetAnchor=c;else{t.anchor=i(e);let l=c;for(;l;)if(l=i(l),l&&8===l.nodeType&&"teleport anchor"===l.data){t.targetAnchor=l,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(c,t,u,n,s,o,r)}Cr(t)}return t.anchor&&i(t.anchor)}};function Cr(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const kr=Symbol.for("v-fgt"),Tr=Symbol.for("v-txt"),wr=Symbol.for("v-cmt"),Nr=Symbol.for("v-stc"),Ar=[];let Er=null;function Ir(e=!1){Ar.push(Er=e?null:[])}function Rr(){Ar.pop(),Er=Ar[Ar.length-1]||null}let Or=1;function Fr(e){Or+=e}function Lr(e){return e.dynamicChildren=Or>0?Er||n:null,Rr(),Or>0&&Er&&Er.push(e),e}function Mr(e,t,n,s,o,r){return Lr(Hr(e,t,n,s,o,r,!0))}function Pr(e,t,n,s,o){return Lr(qr(e,t,n,s,o,!0))}function $r(e){return!!e&&!0===e.__v_isVNode}function Br(e,t){return e.type===t.type&&e.key===t.key}function Vr(e){}const Dr="__vInternal",Ur=({key:e})=>null!=e?e:null,jr=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?g(e)||$t(e)||m(e)?{i:En,r:e,k:t,f:!!n}:e:null);function Hr(e,t=null,n=null,s=0,o=null,r=(e===kr?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ur(t),ref:t&&jr(t),scopeId:In,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:En};return l?(Zr(c,n),128&r&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Or>0&&!i&&Er&&(c.patchFlag>0||6&r)&&32!==c.patchFlag&&Er.push(c),c}const qr=function(e,t=null,n=null,s=0,o=null,r=!1){e&&e!==Hn||(e=wr);if($r(e)){const s=Kr(e,t,!0);return n&&Zr(s,n),Or>0&&!r&&Er&&(6&s.shapeFlag?Er[Er.indexOf(e)]=s:Er.push(s)),s.patchFlag|=-2,s}i=e,m(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=Wr(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=z(e)),y(n)&&(Et(n)&&!d(n)&&(n=l({},n)),t.style=j(n))}const c=g(e)?1:Gn(e)?128:(e=>e.__isTeleport)(e)?64:y(e)?4:m(e)?2:0;return Hr(e,t,n,s,o,c,r,!0)};function Wr(e){return e?Et(e)||Dr in e?l({},e):e:null}function Kr(e,t,n=!1){const{props:s,ref:o,patchFlag:r,children:i}=e,l=t?Yr(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ur(l),ref:t&&t.ref?n&&o?d(o)?o.concat(jr(t)):[o,jr(t)]:jr(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==kr?-1===r?16:16|r:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Kr(e.ssContent),ssFallback:e.ssFallback&&Kr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function zr(e=" ",t=0){return qr(Tr,null,e,t)}function Gr(e,t){const n=qr(Nr,null,e);return n.staticCount=t,n}function Jr(e="",t=!1){return t?(Ir(),Pr(wr,null,e)):qr(wr,null,e)}function Xr(e){return null==e||"boolean"==typeof e?qr(wr):d(e)?qr(kr,null,e.slice()):"object"==typeof e?Qr(e):qr(Tr,null,String(e))}function Qr(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Kr(e)}function Zr(e,t){let n=0;const{shapeFlag:s}=e;if(null==t)t=null;else if(d(t))n=16;else if("object"==typeof t){if(65&s){const n=t.default;return void(n&&(n._c&&(n._d=!1),Zr(e,n()),n._c&&(n._d=!0)))}{n=32;const s=t._;s||Dr in t?3===s&&En&&(1===En.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=En}}else m(t)?(t={default:t,_ctx:En},n=32):(t=String(t),64&s?(n=16,t=[zr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Yr(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const e in s)if("class"===e)t.class!==s.class&&(t.class=z([t.class,s.class]));else if("style"===e)t.style=j([t.style,s.style]);else if(r(e)){const n=t[e],o=s[e];!o||n===o||d(n)&&n.includes(o)||(t[e]=n?[].concat(n,o):o)}else""!==e&&(t[e]=s[e])}return t}function ei(e,t,n,s=null){rn(e,t,7,[n,s])}const ti=Po();let ni=0;let si=null;const oi=()=>si||En;let ri,ii;ri=e=>{si=e},ii=e=>{pi=e};const li=e=>{const t=si;return ri(e),e.scope.on(),()=>{e.scope.off(),ri(t)}},ci=()=>{si&&si.scope.off(),ri(null)};function ai(e){return 4&e.vnode.shapeFlag}let ui,di,pi=!1;function hi(e,t,n){m(t)?e.render=t:y(t)&&(e.setupState=Kt(t)),gi(e,n)}function fi(e){ui=e,di=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,lo))}}const mi=()=>!ui;function gi(e,t,n){const o=e.type;if(!e.render){if(!t&&ui&&!o.render){const t=o.template||Ao(e).template;if(t){const{isCustomElement:n,compilerOptions:s}=e.appContext.config,{delimiters:r,compilerOptions:i}=o,c=l(l({isCustomElement:n,delimiters:r},s),i);o.render=ui(t,c)}}e.render=o.render||s,di&&di(e)}{const t=li(e);Ce();try{To(e)}finally{ke(),t()}}}function vi(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(Me(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function yi(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Kt(Rt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in oo?oo[n](e):void 0,has:(e,t)=>t in e||t in oo}))}function bi(e,t=!0){return m(e)?e.displayName||e.name:e.name||t&&e.__name}const _i=(e,t)=>function(e,t,n=!1){let o,r;const i=m(e);return i?(o=e,r=s):(o=e.get,r=e.set),new Lt(o,r,i||!r,n)}(e,0,pi);function Si(e,n,s=t){const o=oi(),r=E(n),i=R(n),l=Gt(((t,l)=>{let c;return is((()=>{const t=e[n];L(c,t)&&(c=t,l())})),{get:()=>(t(),s.get?s.get(c):c),set(e){const t=o.vnode.props;t&&(n in t||r in t||i in t)&&(`onUpdate:${n}`in t||`onUpdate:${r}`in t||`onUpdate:${i}`in t)||!L(e,c)||(c=e,l()),o.emit(`update:${n}`,s.set?s.set(e):e)}}})),c="modelValue"===n?"modelModifiers":`${n}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l}function xi(e,t,n){const s=arguments.length;return 2===s?y(t)&&!d(t)?$r(t)?qr(e,null,[t]):qr(e,t):qr(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):3===s&&$r(n)&&(n=[n]),qr(e,t,n))}function Ci(){}function ki(e,t,n,s){const o=n[s];if(o&&Ti(o,e))return o;const r=t();return r.memo=e.slice(),n[s]=r}function Ti(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s<n.length;s++)if(L(n[s],t[s]))return!1;return Or>0&&Er&&Er.push(e),!0}const wi="3.4.15",Ni=s,Ai=null,Ei=void 0,Ii=s,Ri=null,Oi=null,Fi=null,Li=null,Mi="undefined"!=typeof document?document:null,Pi=Mi&&Mi.createElement("template"),$i={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o="svg"===t?Mi.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Mi.createElementNS("http://www.w3.org/1998/Math/MathML",e):Mi.createElement(e,n?{is:n}:void 0);return"select"===e&&s&&null!=s.multiple&&o.setAttribute("multiple",s.multiple),o},createText:e=>Mi.createTextNode(e),createComment:e=>Mi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const i=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==r&&(o=o.nextSibling););else{Pi.innerHTML="svg"===s?`<svg>${e}</svg>`:"mathml"===s?`<math>${e}</math>`:e;const o=Pi.content;if("svg"===s||"mathml"===s){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Bi="transition",Vi="animation",Di=Symbol("_vtc"),Ui=(e,{slots:t})=>xi(_s,Ki(e),t);Ui.displayName="Transition";const ji={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Hi=Ui.props=l({},bs,ji),qi=(e,t=[])=>{d(e)?e.forEach((e=>e(...t))):e&&e(...t)},Wi=e=>!!e&&(d(e)?e.some((e=>e.length>1)):e.length>1);function Ki(e){const t={};for(const l in e)l in ji||(t[l]=e[l]);if(!1===e.css)return t;const{name:n="v",type:s,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:u=i,appearToClass:d=c,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(y(e))return[zi(e.enter),zi(e.leave)];{const t=zi(e);return[t,t]}}(o),g=m&&m[0],v=m&&m[1],{onBeforeEnter:b,onEnter:_,onEnterCancelled:S,onLeave:x,onLeaveCancelled:C,onBeforeAppear:k=b,onAppear:T=_,onAppearCancelled:w=S}=t,N=(e,t,n)=>{Ji(e,t?d:c),Ji(e,t?u:i),n&&n()},A=(e,t)=>{e._isLeaving=!1,Ji(e,p),Ji(e,f),Ji(e,h),t&&t()},E=e=>(t,n)=>{const o=e?T:_,i=()=>N(t,e,n);qi(o,[t,i]),Xi((()=>{Ji(t,e?a:r),Gi(t,e?d:c),Wi(o)||Zi(t,s,g,i)}))};return l(t,{onBeforeEnter(e){qi(b,[e]),Gi(e,r),Gi(e,i)},onBeforeAppear(e){qi(k,[e]),Gi(e,a),Gi(e,u)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>A(e,t);Gi(e,p),nl(),Gi(e,h),Xi((()=>{e._isLeaving&&(Ji(e,p),Gi(e,f),Wi(x)||Zi(e,s,v,n))})),qi(x,[e,n])},onEnterCancelled(e){N(e,!1),qi(S,[e])},onAppearCancelled(e){N(e,!0),qi(w,[e])},onLeaveCancelled(e){A(e),qi(C,[e])}})}function zi(e){return B(e)}function Gi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Di]||(e[Di]=new Set)).add(t)}function Ji(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Di];n&&(n.delete(t),n.size||(e[Di]=void 0))}function Xi(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Qi=0;function Zi(e,t,n,s){const o=e._endId=++Qi,r=()=>{o===e._endId&&s()};if(n)return setTimeout(r,n);const{type:i,timeout:l,propCount:c}=Yi(e,t);if(!i)return s();const a=i+"end";let u=0;const d=()=>{e.removeEventListener(a,p),r()},p=t=>{t.target===e&&++u>=c&&d()};setTimeout((()=>{u<c&&d()}),l+1),e.addEventListener(a,p)}function Yi(e,t){const n=window.getComputedStyle(e),s=e=>(n[e]||"").split(", "),o=s(`${Bi}Delay`),r=s(`${Bi}Duration`),i=el(o,r),l=s(`${Vi}Delay`),c=s(`${Vi}Duration`),a=el(l,c);let u=null,d=0,p=0;t===Bi?i>0&&(u=Bi,d=i,p=r.length):t===Vi?a>0&&(u=Vi,d=a,p=c.length):(d=Math.max(i,a),u=d>0?i>a?Bi:Vi:null,p=u?u===Bi?r.length:c.length:0);return{type:u,timeout:d,propCount:p,hasTransform:u===Bi&&/\b(transform|all)(,|$)/.test(s(`${Bi}Property`).toString())}}function el(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>tl(t)+tl(e[n]))))}function tl(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function nl(){return document.body.offsetHeight}const sl=Symbol("_vod"),ol={beforeMount(e,{value:t},{transition:n}){e[sl]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):rl(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),rl(e,!0),s.enter(e)):s.leave(e,(()=>{rl(e,!1)})):rl(e,t))},beforeUnmount(e,{value:t}){rl(e,t)}};function rl(e,t){e.style.display=t?e[sl]:"none"}const il=Symbol("");function ll(e){const t=oi();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>al(e,n)))},s=()=>{const s=e(t.proxy);cl(t.subTree,s),n(s)};rs(s),Hs((()=>{const e=new MutationObserver(s);e.observe(t.subTree.el.parentNode,{childList:!0}),zs((()=>e.disconnect()))}))}function cl(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{cl(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)al(e.el,t);else if(e.type===kr)e.children.forEach((e=>cl(e,t)));else if(e.type===Nr){let{el:n,anchor:s}=e;for(;n&&(al(n,t),n!==s);)n=n.nextSibling}}function al(e,t){if(1===e.nodeType){const n=e.style;let s="";for(const e in t)n.setProperty(`--${e}`,t[e]),s+=`--${e}: ${t[e]};`;n[il]=s}}const ul=/\s*!important$/;function dl(e,t,n){if(d(n))n.forEach((n=>dl(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=function(e,t){const n=hl[t];if(n)return n;let s=E(t);if("filter"!==s&&s in e)return hl[t]=s;s=O(s);for(let o=0;o<pl.length;o++){const n=pl[o]+s;if(n in e)return hl[t]=n}return t}(e,t);ul.test(n)?e.setProperty(R(s),n.replace(ul,""),"important"):e[s]=n}}const pl=["Webkit","Moz","ms"],hl={};const fl="http://www.w3.org/1999/xlink";function ml(e,t,n,s){e.addEventListener(t,n,s)}const gl=Symbol("_vei");function vl(e,t,n,s,o=null){const r=e[gl]||(e[gl]={}),i=r[t];if(s&&i)i.value=s;else{const[n,l]=function(e){let t;if(yl.test(e)){let n;for(t={};n=e.match(yl);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):R(e.slice(2));return[n,t]}(t);if(s){const i=r[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();rn(function(e,t){if(d(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Sl(),n}(s,o);ml(e,n,i,l)}else i&&(!function(e,t,n,s){e.removeEventListener(t,n,s)}(e,n,i,l),r[t]=void 0)}}const yl=/(?:Once|Passive|Capture)$/;let bl=0;const _l=Promise.resolve(),Sl=()=>bl||(_l.then((()=>bl=0)),bl=Date.now());const xl=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123; +/*! #__NO_SIDE_EFFECTS__ */ +function Cl(e,t){const n=Ns(e);class s extends wl{constructor(e){super(n,e,t)}}return s.def=n,s} +/*! #__NO_SIDE_EFFECTS__ */const kl=e=>Cl(e,cc),Tl="undefined"!=typeof HTMLElement?HTMLElement:class{};class wl extends Tl{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),vn((()=>{this._connected||(lc(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:s}=e;let o;if(n&&!d(n))for(const r in n){const e=n[r];(e===Number||e&&e.type===Number)&&(r in this._props&&(this._props[r]=B(this._props[r])),(o||(o=Object.create(null)))[E(r)]=!0)}this._numberProps=o,t&&this._resolveProps(e),this._applyStyles(s),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=d(t)?t:Object.keys(t||{});for(const s of Object.keys(this))"_"!==s[0]&&n.includes(s)&&this._setProp(s,this[s],!0,!1);for(const s of n.map(E))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(e){this._setProp(s,e)}})}_setAttr(e){let t=this.getAttribute(e);const n=E(e);this._numberProps&&this._numberProps[n]&&(t=B(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,s=!0){t!==this._props[e]&&(this._props[e]=t,s&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(R(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(R(e),t+""):t||this.removeAttribute(R(e))))}_update(){lc(this._createVNode(),this.shadowRoot)}_createVNode(){const e=qr(this._def,l({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),R(e)!==e&&t(R(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof wl){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Nl(e="$style"){{const n=oi();if(!n)return t;const s=n.type.__cssModules;if(!s)return t;const o=s[e];return o||t}}const Al=new WeakMap,El=new WeakMap,Il=Symbol("_moveCb"),Rl=Symbol("_enterCb"),Ol={name:"TransitionGroup",props:l({},Hi,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=oi(),s=vs();let o,r;return Ws((()=>{if(!o.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const s=e.cloneNode(),o=e[Di];o&&o.forEach((e=>{e.split(/\s+/).forEach((e=>e&&s.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&s.classList.add(e))),s.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(s);const{hasTransform:i}=Yi(s);return r.removeChild(s),i}(o[0].el,n.vnode.el,t))return;o.forEach(Ll),o.forEach(Ml);const s=o.filter(Pl);nl(),s.forEach((e=>{const n=e.el,s=n.style;Gi(n,t),s.transform=s.webkitTransform=s.transitionDuration="";const o=n[Il]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",o),n[Il]=null,Ji(n,t))};n.addEventListener("transitionend",o)}))})),()=>{const i=It(e),l=Ki(i);let c=i.tag||kr;o=r,r=t.default?ws(t.default()):[];for(let e=0;e<r.length;e++){const t=r[e];null!=t.key&&Ts(t,xs(t,l,s,n))}if(o)for(let e=0;e<o.length;e++){const t=o[e];Ts(t,xs(t,l,s,n)),Al.set(t,t.el.getBoundingClientRect())}return qr(c,null,r)}}},Fl=Ol;function Ll(e){const t=e.el;t[Il]&&t[Il](),t[Rl]&&t[Rl]()}function Ml(e){El.set(e,e.el.getBoundingClientRect())}function Pl(e){const t=Al.get(e),n=El.get(e),s=t.left-n.left,o=t.top-n.top;if(s||o){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${s}px,${o}px)`,t.transitionDuration="0s",e}}const $l=e=>{const t=e.props["onUpdate:modelValue"]||!1;return d(t)?e=>M(t,e):t};function Bl(e){e.target.composing=!0}function Vl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Dl=Symbol("_assign"),Ul={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[Dl]=$l(o);const r=s||o.props&&"number"===o.props.type;ml(e,t?"change":"input",(t=>{if(t.target.composing)return;let s=e.value;n&&(s=s.trim()),r&&(s=$(s)),e[Dl](s)})),n&&ml(e,"change",(()=>{e.value=e.value.trim()})),t||(ml(e,"compositionstart",Bl),ml(e,"compositionend",Vl),ml(e,"change",Vl))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:o}},r){if(e[Dl]=$l(r),e.composing)return;const i=null==t?"":t;if((o||"number"===e.type?$(e.value):e.value)!==i){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(s&&e.value.trim()===i)return}e.value=i}}},jl={deep:!0,created(e,t,n){e[Dl]=$l(n),ml(e,"change",(()=>{const t=e._modelValue,n=zl(e),s=e.checked,o=e[Dl];if(d(t)){const e=ne(t,n),r=-1!==e;if(s&&!r)o(t.concat(n));else if(!s&&r){const n=[...t];n.splice(e,1),o(n)}}else if(h(t)){const e=new Set(t);s?e.add(n):e.delete(n),o(e)}else o(Gl(e,s))}))},mounted:Hl,beforeUpdate(e,t,n){e[Dl]=$l(n),Hl(e,t,n)}};function Hl(e,{value:t,oldValue:n},s){e._modelValue=t,d(t)?e.checked=ne(t,s.props.value)>-1:h(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=te(t,Gl(e,!0)))}const ql={created(e,{value:t},n){e.checked=te(t,n.props.value),e[Dl]=$l(n),ml(e,"change",(()=>{e[Dl](zl(e))}))},beforeUpdate(e,{value:t,oldValue:n},s){e[Dl]=$l(s),t!==n&&(e.checked=te(t,s.props.value))}},Wl={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=h(t);ml(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?$(zl(e)):zl(e)));e[Dl](e.multiple?o?new Set(t):t:t[0]),e._assigning=!0,vn((()=>{e._assigning=!1}))})),e[Dl]=$l(s)},mounted(e,{value:t,oldValue:n,modifiers:{number:s}}){Kl(e,t,n,s)},beforeUpdate(e,t,n){e[Dl]=$l(n)},updated(e,{value:t,oldValue:n,modifiers:{number:s}}){e._assigning||Kl(e,t,n,s)}};function Kl(e,t,n,s){const o=e.multiple,r=d(t);if((!o||r||h(t))&&(!r||!te(t,n))){for(let n=0,i=e.options.length;n<i;n++){const i=e.options[n],l=zl(i);if(o)if(r){const e=typeof l;i.selected="string"===e||"number"===e?t.includes(s?$(l):l):ne(t,l)>-1}else i.selected=t.has(l);else if(te(zl(i),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}o||-1===e.selectedIndex||(e.selectedIndex=-1)}}function zl(e){return"_value"in e?e._value:e.value}function Gl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Jl={created(e,t,n){Xl(e,t,n,null,"created")},mounted(e,t,n){Xl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Xl(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Xl(e,t,n,s,"updated")}};function Xl(e,t,n,s,o){const r=function(e,t){switch(e){case"SELECT":return Wl;case"TEXTAREA":return Ul;default:switch(t){case"checkbox":return jl;case"radio":return ql;default:return Ul}}}(e.tagName,n.props&&n.props.type)[o];r&&r(e,t,n,s)}const Ql=["ctrl","shift","alt","meta"],Zl={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ql.some((n=>e[`${n}Key`]&&!t.includes(n)))},Yl=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(n,...s)=>{for(let e=0;e<t.length;e++){const s=Zl[t[e]];if(s&&s(n,t))return}return e(n,...s)})},ec={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},tc=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=n=>{if(!("key"in n))return;const s=R(n.key);return t.some((e=>e===s||ec[e]===s))?e(n):void 0})},nc=l({patchProp:(e,t,n,s,o,l,c,a,u)=>{const d="svg"===o;"class"===t?function(e,t,n){const s=e[Di];s&&(t=(t?[t,...s]:[...s]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,d):"style"===t?function(e,t,n){const s=e.style,o=s.display,r=g(n);if(n&&!r){if(t&&!g(t))for(const e in t)null==n[e]&&dl(s,e,"");for(const e in n)dl(s,e,n[e])}else if(r){if(t!==n){const e=s[il];e&&(n+=";"+e),s.cssText=n}}else t&&e.removeAttribute("style");sl in e&&(s.display=o)}(e,n,s):r(t)?i(t)||vl(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,s){if(s)return"innerHTML"===t||"textContent"===t||!!(t in e&&xl(t)&&m(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(xl(t)&&g(n))return!1;return t in e}(e,t,s,d))?function(e,t,n,s,o,r,i){if("innerHTML"===t||"textContent"===t)return s&&i(s,o,r),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=n;const s=null==n?"":n;return("OPTION"===l?e.getAttribute("value"):e.value)!==s&&(e.value=s),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const s=typeof e[t];"boolean"===s?n=ee(n):null==n&&"string"===s?(n="",c=!0):"number"===s&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,l,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,n,s,o){if(s&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(fl,t.slice(6,t.length)):e.setAttributeNS(fl,t,n);else{const s=Y(t);null==n||s&&!ee(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}(e,t,s,d))}},$i);let sc,oc=!1;function rc(){return sc||(sc=ar(nc))}function ic(){return sc=oc?sc:ur(nc),oc=!0,sc}const lc=(...e)=>{rc().render(...e)},cc=(...e)=>{ic().hydrate(...e)},ac=(...e)=>{const t=rc().createApp(...e),{mount:n}=t;return t.mount=e=>{const s=pc(e);if(!s)return;const o=t._component;m(o)||o.render||o.template||(o.template=s.innerHTML),s.innerHTML="";const r=n(s,!1,dc(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t},uc=(...e)=>{const t=ic().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=pc(e);if(t)return n(t,!0,dc(t))},t};function dc(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function pc(e){if(g(e)){return document.querySelector(e)}return e}const hc=s;var fc=Object.freeze({__proto__:null,BaseTransition:_s,BaseTransitionPropsValidators:bs,Comment:wr,DeprecationTypes:null,EffectScope:ce,ErrorCodes:sn,ErrorTypeStrings:null,Fragment:kr,KeepAlive:Os,ReactiveEffect:he,Static:Nr,Suspense:Xn,Teleport:xr,Text:Tr,TrackOpTypes:en,Transition:Ui,TransitionGroup:Fl,TriggerOpTypes:tn,VueElement:wl,assertNumber:nn,callWithAsyncErrorHandling:rn,callWithErrorHandling:on,camelize:E,capitalize:O,cloneVNode:Kr,compatUtils:null,computed:_i,createApp:ac,createBlock:Pr,createCommentVNode:Jr,createElementBlock:Mr,createElementVNode:Hr,createHydrationRenderer:ur,createPropsRestProxy:xo,createRenderer:ar,createSSRApp:uc,createSlots:Ys,createStaticVNode:Gr,createTextVNode:zr,createVNode:qr,customRef:Gt,defineAsyncComponent:Es,defineComponent:Ns,defineCustomElement:Cl,defineEmits:ao,defineExpose:uo,defineModel:fo,defineOptions:po,defineProps:co,defineSSRCustomElement:kl,defineSlots:ho,devtools:Ei,effect:ye,effectScope:ae,getCurrentInstance:oi,getCurrentScope:de,getTransitionRawChildren:ws,guardReactiveProps:Wr,h:xi,handleError:ln,hasInjectionContext:jo,hydrate:cc,initCustomFormatter:Ci,initDirectivesForSSR:hc,inject:Uo,isMemoSame:Ti,isProxy:Et,isReactive:wt,isReadonly:Nt,isRef:$t,isRuntimeOnly:mi,isShallow:At,isVNode:$r,markRaw:Rt,mergeDefaults:_o,mergeModels:So,mergeProps:Yr,nextTick:vn,normalizeClass:z,normalizeProps:G,normalizeStyle:j,onActivated:Ls,onBeforeMount:js,onBeforeUnmount:Ks,onBeforeUpdate:qs,onDeactivated:Ms,onErrorCaptured:Qs,onMounted:Hs,onRenderTracked:Xs,onRenderTriggered:Js,onScopeDispose:pe,onServerPrefetch:Gs,onUnmounted:zs,onUpdated:Ws,openBlock:Ir,popScopeId:Fn,provide:Do,proxyRefs:Kt,pushScopeId:On,queuePostFlushCb:_n,reactive:St,readonly:Ct,ref:Bt,registerRuntimeCompiler:fi,render:lc,renderList:Zs,renderSlot:eo,resolveComponent:jn,resolveDirective:Wn,resolveDynamicComponent:qn,resolveFilter:null,resolveTransitionHooks:xs,setBlockTracking:Fr,setDevtoolsHook:Ii,setTransitionHooks:Ts,shallowReactive:xt,shallowReadonly:kt,shallowRef:Vt,ssrContextKey:ns,ssrUtils:null,stop:be,toDisplayString:se,toHandlerKey:F,toHandlers:no,toRaw:It,toRef:Zt,toRefs:Jt,toValue:qt,transformVNodeArgs:Vr,triggerRef:jt,unref:Ht,useAttrs:vo,useCssModule:Nl,useCssVars:ll,useModel:Si,useSSRContext:ss,useSlots:go,useTransitionState:vs,vModelCheckbox:jl,vModelDynamic:Jl,vModelRadio:ql,vModelSelect:Wl,vModelText:Ul,vShow:ol,version:wi,warn:Ni,watch:cs,watchEffect:os,watchPostEffect:rs,watchSyncEffect:is,withAsyncContext:Co,withCtx:Mn,withDefaults:mo,withDirectives:hs,withKeys:tc,withMemo:ki,withModifiers:Yl,withScopeId:Ln});const mc=Symbol(""),gc=Symbol(""),vc=Symbol(""),yc=Symbol(""),bc=Symbol(""),_c=Symbol(""),Sc=Symbol(""),xc=Symbol(""),Cc=Symbol(""),kc=Symbol(""),Tc=Symbol(""),wc=Symbol(""),Nc=Symbol(""),Ac=Symbol(""),Ec=Symbol(""),Ic=Symbol(""),Rc=Symbol(""),Oc=Symbol(""),Fc=Symbol(""),Lc=Symbol(""),Mc=Symbol(""),Pc=Symbol(""),$c=Symbol(""),Bc=Symbol(""),Vc=Symbol(""),Dc=Symbol(""),Uc=Symbol(""),jc=Symbol(""),Hc=Symbol(""),qc=Symbol(""),Wc=Symbol(""),Kc=Symbol(""),zc=Symbol(""),Gc=Symbol(""),Jc=Symbol(""),Xc=Symbol(""),Qc=Symbol(""),Zc=Symbol(""),Yc=Symbol(""),ea={[mc]:"Fragment",[gc]:"Teleport",[vc]:"Suspense",[yc]:"KeepAlive",[bc]:"BaseTransition",[_c]:"openBlock",[Sc]:"createBlock",[xc]:"createElementBlock",[Cc]:"createVNode",[kc]:"createElementVNode",[Tc]:"createCommentVNode",[wc]:"createTextVNode",[Nc]:"createStaticVNode",[Ac]:"resolveComponent",[Ec]:"resolveDynamicComponent",[Ic]:"resolveDirective",[Rc]:"resolveFilter",[Oc]:"withDirectives",[Fc]:"renderList",[Lc]:"renderSlot",[Mc]:"createSlots",[Pc]:"toDisplayString",[$c]:"mergeProps",[Bc]:"normalizeClass",[Vc]:"normalizeStyle",[Dc]:"normalizeProps",[Uc]:"guardReactiveProps",[jc]:"toHandlers",[Hc]:"camelize",[qc]:"capitalize",[Wc]:"toHandlerKey",[Kc]:"setBlockTracking",[zc]:"pushScopeId",[Gc]:"popScopeId",[Jc]:"withCtx",[Xc]:"unref",[Qc]:"isRef",[Zc]:"withMemo",[Yc]:"isMemoSame"};const ta={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function na(e,t,n,s,o,r,i,l=!1,c=!1,a=!1,u=ta){return e&&(l?(e.helper(_c),e.helper(pa(e.inSSR,a))):e.helper(da(e.inSSR,a)),i&&e.helper(Oc)),{type:13,tag:t,props:n,children:s,patchFlag:o,dynamicProps:r,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function sa(e,t=ta){return{type:17,loc:t,elements:e}}function oa(e,t=ta){return{type:15,loc:t,properties:e}}function ra(e,t){return{type:16,loc:ta,key:g(e)?ia(e,!0):e,value:t}}function ia(e,t=!1,n=ta,s=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:s}}function la(e,t=ta){return{type:8,loc:t,children:e}}function ca(e,t=[],n=ta){return{type:14,loc:n,callee:e,arguments:t}}function aa(e,t=void 0,n=!1,s=!1,o=ta){return{type:18,params:e,returns:t,newline:n,isSlot:s,loc:o}}function ua(e,t,n,s=!0){return{type:19,test:e,consequent:t,alternate:n,newline:s,loc:ta}}function da(e,t){return e||t?Cc:kc}function pa(e,t){return e||t?Sc:xc}function ha(e,{helper:t,removeHelper:n,inSSR:s}){e.isBlock||(e.isBlock=!0,n(da(s,e.isComponent)),t(_c),t(pa(s,e.isComponent)))}const fa=new Uint8Array([123,123]),ma=new Uint8Array([125,125]);function ga(e){return e>=97&&e<=122||e>=65&&e<=90}function va(e){return 32===e||10===e||9===e||12===e||13===e}function ya(e){return 47===e||62===e||va(e)}function ba(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const _a={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};function Sa(e){throw e}function xa(e){}function Ca(e,t,n,s){const o=new SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return o.code=e,o.loc=t,o}const ka=e=>4===e.type&&e.isStatic;function Ta(e){switch(e){case"Teleport":case"teleport":return gc;case"Suspense":case"suspense":return vc;case"KeepAlive":case"keep-alive":return yc;case"BaseTransition":case"base-transition":return bc}}const wa=/^\d|[^\$\w]/,Na=e=>!wa.test(e),Aa=/[A-Za-z_$\xA0-\uFFFF]/,Ea=/[\.\?\w$\xA0-\uFFFF]/,Ia=/\s+[.[]\s*|\s*[.[]\s+/g,Ra=e=>{e=e.trim().replace(Ia,(e=>e.trim()));let t=0,n=[],s=0,o=0,r=null;for(let i=0;i<e.length;i++){const l=e.charAt(i);switch(t){case 0:if("["===l)n.push(t),t=1,s++;else if("("===l)n.push(t),t=2,o++;else if(!(0===i?Aa:Ea).test(l))return!1;break;case 1:"'"===l||'"'===l||"`"===l?(n.push(t),t=3,r=l):"["===l?s++:"]"===l&&(--s||(t=n.pop()));break;case 2:if("'"===l||'"'===l||"`"===l)n.push(t),t=3,r=l;else if("("===l)o++;else if(")"===l){if(i===e.length-1)return!1;--o||(t=n.pop())}break;case 3:l===r&&(t=n.pop(),r=null)}}return!s&&!o};function Oa(e,t,n=!1){for(let s=0;s<e.props.length;s++){const o=e.props[s];if(7===o.type&&(n||o.exp)&&(g(t)?o.name===t:t.test(o.name)))return o}}function Fa(e,t,n=!1,s=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(6===r.type){if(n)continue;if(r.name===t&&(r.value||s))return r}else if("bind"===r.name&&(r.exp||s)&&La(r.arg,t))return r}}function La(e,t){return!(!e||!ka(e)||e.content!==t)}function Ma(e){return 5===e.type||2===e.type}function Pa(e){return 7===e.type&&"slot"===e.name}function $a(e){return 1===e.type&&3===e.tagType}function Ba(e){return 1===e.type&&2===e.tagType}const Va=new Set([Dc,Uc]);function Da(e,t=[]){if(e&&!g(e)&&14===e.type){const n=e.callee;if(!g(n)&&Va.has(n))return Da(e.arguments[0],t.concat(e))}return[e,t]}function Ua(e,t,n){let s,o,r=13===e.type?e.props:e.arguments[2],i=[];if(r&&!g(r)&&14===r.type){const e=Da(r);r=e[0],i=e[1],o=i[i.length-1]}if(null==r||g(r))s=oa([t]);else if(14===r.type){const e=r.arguments[0];g(e)||15!==e.type?r.callee===jc?s=ca(n.helper($c),[oa([t]),r]):r.arguments.unshift(oa([t])):ja(t,e)||e.properties.unshift(t),!s&&(s=r)}else 15===r.type?(ja(t,r)||r.properties.unshift(t),s=r):(s=ca(n.helper($c),[oa([t]),r]),o&&o.callee===Uc&&(o=i[i.length-2]));13===e.type?o?o.arguments[0]=s:e.props=s:o?o.arguments[0]=s:e.arguments[2]=s}function ja(e,t){let n=!1;if(4===e.key.type){const s=e.key.content;n=t.properties.some((e=>4===e.key.type&&e.key.content===s))}return n}function Ha(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const qa=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Wa={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:o,isPreTag:o,isCustomElement:o,onError:Sa,onWarn:xa,comments:!1,prefixIdentifiers:!1};let Ka=Wa,za=null,Ga="",Ja=null,Xa=null,Qa="",Za=-1,Ya=-1,eu=0,tu=!1,nu=null;const su=[],ou=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=fa,this.delimiterClose=ma,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=fa,this.delimiterClose=ma}getPos(e){let t=1,n=e+1;for(let s=this.newlines.length-1;s>=0;s--){const o=this.newlines[s];if(e>o){t=s+2,n=e-o;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?ya(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||va(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.sectionStart=t+2,this.stateInClosingTagName(e),void(this.inRCDATA=!1)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===_a.TitleEnd||this.currentSequence===_a.TextareaEnd&&!this.inSFCRoot?e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===_a.Cdata[this.sequenceIndex]?++this.sequenceIndex===_a.Cdata.length&&(this.state=28,this.currentSequence=_a.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===_a.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){if(33===e)this.state=22,this.sectionStart=this.index+1;else if(63===e)this.state=24,this.sectionStart=this.index+1;else if(ga(e))if(this.sectionStart=this.index,0===this.mode)this.state=6;else if(this.inSFCRoot)this.state=34;else if(this.inXML)this.state=6;else{const t=32|e;this.state=116===t?30:115===t?29:6}else 47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){ya(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(ya(e)){const t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(ba("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){va(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=ga(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||va(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):va(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):va(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||ya(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||ya(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||ya(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||ya(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||ya(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):va(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):va(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){va(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):39!==e&&60!==e&&61!==e&&96!==e||this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=_a.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const t=32|e;t===_a.ScriptEnd[3]?this.startSpecial(_a.ScriptEnd,4):t===_a.StyleEnd[3]?this.startSpecial(_a.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){const t=32|e;t===_a.TitleEnd[3]?this.startSpecial(_a.TitleEnd,4):t===_a.TextareaEnd[3]?this.startSpecial(_a.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):19!==this.state&&20!==this.state&&21!==this.state||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===_a.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(su,{onerr:Cu,ontext(e,t){au(lu(e,t),e,t)},ontextentity(e,t,n){au(e,t,n)},oninterpolation(e,t){if(tu)return au(lu(e,t),e,t);let n=e+ou.delimiterOpen.length,s=t-ou.delimiterClose.length;for(;va(Ga.charCodeAt(n));)n++;for(;va(Ga.charCodeAt(s-1));)s--;let o=lu(n,s);o.includes("&")&&(o=Ka.decodeEntities(o,!1)),yu({type:5,content:xu(o,!1,bu(n,s)),loc:bu(e,t)})},onopentagname(e,t){const n=lu(e,t);Ja={type:1,tag:n,ns:Ka.getNamespace(n,su[0],Ka.ns),tagType:0,props:[],children:[],loc:bu(e-1,t),codegenNode:void 0}},onopentagend(e){cu(e)},onclosetag(e,t){const n=lu(e,t);if(!Ka.isVoidTag(n)){let s=!1;for(let e=0;e<su.length;e++){if(su[e].tag.toLowerCase()===n.toLowerCase()){s=!0;for(let n=0;n<=e;n++){uu(su.shift(),t,n<e)}break}}s||du(e,60)}},onselfclosingtag(e){var t;const n=Ja.tag;Ja.isSelfClosing=!0,cu(e),(null==(t=su[0])?void 0:t.tag)===n&&uu(su.shift(),e)},onattribname(e,t){Xa={type:6,name:lu(e,t),nameLoc:bu(e,t),value:void 0,loc:bu(e)}},ondirname(e,t){const n=lu(e,t),s="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(tu||""===s)Xa={type:6,name:n,nameLoc:bu(e,t),value:void 0,loc:bu(e)};else if(Xa={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?["prop"]:[],loc:bu(e)},"pre"===s){tu=ou.inVPre=!0,nu=Ja;const e=Ja.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=Su(e[t]))}},ondirarg(e,t){if(e===t)return;const n=lu(e,t);if(tu)Xa.name+=n,_u(Xa.nameLoc,t);else{const s="["!==n[0];Xa.arg=xu(s?n:n.slice(1,-1),s,bu(e,t),s?3:0)}},ondirmodifier(e,t){const n=lu(e,t);if(tu)Xa.name+="."+n,_u(Xa.nameLoc,t);else if("slot"===Xa.name){const e=Xa.arg;e&&(e.content+="."+n,_u(e.loc,t))}else Xa.modifiers.push(n)},onattribdata(e,t){Qa+=lu(e,t),Za<0&&(Za=e),Ya=t},onattribentity(e,t,n){Qa+=e,Za<0&&(Za=t),Ya=n},onattribnameend(e){const t=lu(Xa.loc.start.offset,e);7===Xa.type&&(Xa.rawName=t),Ja.props.some((e=>(7===e.type?e.rawName:e.name)===t))},onattribend(e,t){if(Ja&&Xa){if(_u(Xa.loc,t),0!==e)if(Qa.includes("&")&&(Qa=Ka.decodeEntities(Qa,!0)),6===Xa.type)"class"===Xa.name&&(Qa=vu(Qa).trim()),Xa.value={type:2,content:Qa,loc:1===e?bu(Za,Ya):bu(Za-1,Ya+1)},ou.inSFCRoot&&"template"===Ja.tag&&"lang"===Xa.name&&Qa&&"html"!==Qa&&ou.enterRCDATA(ba("</template"),0);else{let e=0;Xa.exp=xu(Qa,!1,bu(Za,Ya),0,e),"for"===Xa.name&&(Xa.forParseResult=function(e){const t=e.loc,n=e.content,s=n.match(qa);if(!s)return;const[,o,r]=s,i=(e,n,s=!1)=>{const o=t.start.offset+n;return xu(e,!1,bu(o,o+e.length),0,s?1:0)},l={source:i(r.trim(),n.indexOf(r,o.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=o.trim().replace(iu,"").trim();const a=o.indexOf(c),u=c.match(ru);if(u){c=c.replace(ru,"").trim();const e=u[1].trim();let t;if(e&&(t=n.indexOf(e,a+c.length),l.key=i(e,t,!0)),u[2]){const s=u[2].trim();s&&(l.index=i(s,n.indexOf(s,l.key?t+e.length:a+c.length),!0))}}c&&(l.value=i(c,a,!0));return l}(Xa.exp))}7===Xa.type&&"pre"===Xa.name||Ja.props.push(Xa)}Qa="",Za=Ya=-1},oncomment(e,t){Ka.comments&&yu({type:3,content:lu(e,t),loc:bu(e-4,t+3)})},onend(){const e=Ga.length;for(let t=0;t<su.length;t++)uu(su[t],e-1)},oncdata(e,t){0!==su[0].ns&&au(lu(e,t),e,t)},onprocessinginstruction(e){0===(su[0]?su[0].ns:Ka.ns)&&Cu(21,e-1)}}),ru=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,iu=/^\(|\)$/g;function lu(e,t){return Ga.slice(e,t)}function cu(e){ou.inSFCRoot&&(Ja.innerLoc=bu(e+1,e+1)),yu(Ja);const{tag:t,ns:n}=Ja;0===n&&Ka.isPreTag(t)&&eu++,Ka.isVoidTag(t)?uu(Ja,e):(su.unshift(Ja),1!==n&&2!==n||(ou.inXML=!0)),Ja=null}function au(e,t,n){var s;{const t=null==(s=su[0])?void 0:s.tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=Ka.decodeEntities(e,!1))}const o=su[0]||za,r=o.children[o.children.length-1];2===(null==r?void 0:r.type)?(r.content+=e,_u(r.loc,n)):o.children.push({type:2,content:e,loc:bu(t,n)})}function uu(e,t,n=!1){_u(e.loc,n?du(t,60):t+1),ou.inSFCRoot&&(e.innerLoc.end=l({},e.children.length?e.children[e.children.length-1].loc.end:e.innerLoc.start),e.innerLoc.source=lu(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:s,ns:o}=e;tu||("slot"===s?e.tagType=2:!function({tag:e,props:t}){if("template"===e)for(let n=0;n<t.length;n++)if(7===t[n].type&&pu.has(t[n].name))return!0;return!1}(e)?function({tag:e,props:t}){var n;if(Ka.isCustomElement(e))return!1;if("component"===e||(s=e.charCodeAt(0),s>64&&s<91)||Ta(e)||(null==(n=Ka.isBuiltInComponent)?void 0:n.call(Ka,e))||Ka.isNativeTag&&!Ka.isNativeTag(e))return!0;var s;for(let o=0;o<t.length;o++){const e=t[o];if(6===e.type&&"is"===e.name&&e.value&&e.value.content.startsWith("vue:"))return!0}return!1}(e)&&(e.tagType=1):e.tagType=3),ou.inRCDATA||(e.children=fu(e.children,e.tag)),0===o&&Ka.isPreTag(s)&&eu--,nu===e&&(tu=ou.inVPre=!1,nu=null),ou.inXML&&0===(su[0]?su[0].ns:Ka.ns)&&(ou.inXML=!1)}function du(e,t){let n=e;for(;Ga.charCodeAt(n)!==t&&n>=0;)n--;return n}const pu=new Set(["if","else","else-if","for","slot"]);const hu=/\r\n/g;function fu(e,t){var n,s;const o="preserve"!==Ka.whitespace;let r=!1;for(let i=0;i<e.length;i++){const t=e[i];if(2===t.type)if(eu)t.content=t.content.replace(hu,"\n");else if(mu(t.content)){const l=null==(n=e[i-1])?void 0:n.type,c=null==(s=e[i+1])?void 0:s.type;!l||!c||o&&(3===l&&(3===c||1===c)||1===l&&(3===c||1===c&&gu(t.content)))?(r=!0,e[i]=null):t.content=" "}else o&&(t.content=vu(t.content))}if(eu&&t&&Ka.isPreTag(t)){const t=e[0];t&&2===t.type&&(t.content=t.content.replace(/^\r?\n/,""))}return r?e.filter(Boolean):e}function mu(e){for(let t=0;t<e.length;t++)if(!va(e.charCodeAt(t)))return!1;return!0}function gu(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}function vu(e){let t="",n=!1;for(let s=0;s<e.length;s++)va(e.charCodeAt(s))?n||(t+=" ",n=!0):(t+=e[s],n=!1);return t}function yu(e){(su[0]||za).children.push(e)}function bu(e,t){return{start:ou.getPos(e),end:null==t?t:ou.getPos(t),source:null==t?t:lu(e,t)}}function _u(e,t){e.end=ou.getPos(t),e.source=lu(e.start.offset,t)}function Su(e){const t={type:6,name:e.rawName,nameLoc:bu(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function xu(e,t=!1,n,s=0,o=0){return ia(e,t,n,s)}function Cu(e,t,n){Ka.onError(Ca(e,bu(t,t)))}function ku(e,t){if(ou.reset(),Ja=null,Xa=null,Qa="",Za=-1,Ya=-1,su.length=0,Ga=e,Ka=l({},Wa),t){let e;for(e in t)null!=t[e]&&(Ka[e]=t[e])}ou.mode="html"===Ka.parseMode?1:"sfc"===Ka.parseMode?2:0,ou.inXML=1===Ka.ns||2===Ka.ns;const n=null==t?void 0:t.delimiters;n&&(ou.delimiterOpen=ba(n[0]),ou.delimiterClose=ba(n[1]));const s=za=function(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:ta}}([],e);return ou.parse(Ga),s.loc=bu(0,e.length),s.children=fu(s.children),za=null,s}function Tu(e,t){Nu(e,t,wu(e,e.children[0]))}function wu(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!Ba(t)}function Nu(e,t,n=!1){const{children:s}=e,o=s.length;let r=0;for(let i=0;i<s.length;i++){const e=s[i];if(1===e.type&&0===e.tagType){const s=n?0:Au(e,t);if(s>0){if(s>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),r++;continue}}else{const n=e.codegenNode;if(13===n.type){const s=Fu(n);if((!s||512===s||1===s)&&Ru(e,t)>=2){const s=Ou(e);s&&(n.props=t.hoist(s))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,Nu(e,t),n&&t.scopes.vSlot--}else if(11===e.type)Nu(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)Nu(e.branches[n],t,1===e.branches[n].children.length)}if(r&&t.transformHoist&&t.transformHoist(s,t,e),r&&r===o&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&d(e.codegenNode.children)){const n=t.hoist(sa(e.codegenNode.children));t.hmr&&(n.content=`[...${n.content}]`),e.codegenNode.children=n}}function Au(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const s=n.get(e);if(void 0!==s)return s;const o=e.codegenNode;if(13!==o.type)return 0;if(o.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(Fu(o))return n.set(e,0),0;{let s=3;const r=Ru(e,t);if(0===r)return n.set(e,0),0;r<s&&(s=r);for(let o=0;o<e.children.length;o++){const r=Au(e.children[o],t);if(0===r)return n.set(e,0),0;r<s&&(s=r)}if(s>1)for(let o=0;o<e.props.length;o++){const r=e.props[o];if(7===r.type&&"bind"===r.name&&r.exp){const o=Au(r.exp,t);if(0===o)return n.set(e,0),0;o<s&&(s=o)}}if(o.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(_c),t.removeHelper(pa(t.inSSR,o.isComponent)),o.isBlock=!1,t.helper(da(t.inSSR,o.isComponent))}return n.set(e,s),s}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return Au(e.content,t);case 4:return e.constType;case 8:let r=3;for(let n=0;n<e.children.length;n++){const s=e.children[n];if(g(s)||v(s))continue;const o=Au(s,t);if(0===o)return 0;o<r&&(r=o)}return r}}const Eu=new Set([Bc,Vc,Dc,Uc]);function Iu(e,t){if(14===e.type&&!g(e.callee)&&Eu.has(e.callee)){const n=e.arguments[0];if(4===n.type)return Au(n,t);if(14===n.type)return Iu(n,t)}return 0}function Ru(e,t){let n=3;const s=Ou(e);if(s&&15===s.type){const{properties:e}=s;for(let s=0;s<e.length;s++){const{key:o,value:r}=e[s],i=Au(o,t);if(0===i)return i;let l;if(i<n&&(n=i),l=4===r.type?Au(r,t):14===r.type?Iu(r,t):0,0===l)return l;l<n&&(n=l)}}return n}function Ou(e){const t=e.codegenNode;if(13===t.type)return t.props}function Fu(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function Lu(e,{filename:n="",prefixIdentifiers:o=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:c=[],directiveTransforms:a={},transformHoist:u=null,isBuiltInComponent:d=s,isCustomElement:p=s,expressionPlugins:h=[],scopeId:f=null,slotted:m=!0,ssr:v=!1,inSSR:y=!1,ssrCssVars:b="",bindingMetadata:_=t,inline:S=!1,isTS:x=!1,onError:C=Sa,onWarn:k=xa,compatConfig:T}){const w=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),N={filename:n,selfName:w&&O(E(w[1])),prefixIdentifiers:o,hoistStatic:r,hmr:i,cacheHandlers:l,nodeTransforms:c,directiveTransforms:a,transformHoist:u,isBuiltInComponent:d,isCustomElement:p,expressionPlugins:h,scopeId:f,slotted:m,ssr:v,inSSR:y,ssrCssVars:b,bindingMetadata:_,inline:S,isTS:x,onError:C,onWarn:k,compatConfig:T,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=N.helpers.get(e)||0;return N.helpers.set(e,t+1),e},removeHelper(e){const t=N.helpers.get(e);if(t){const n=t-1;n?N.helpers.set(e,n):N.helpers.delete(e)}},helperString:e=>`_${ea[N.helper(e)]}`,replaceNode(e){N.parent.children[N.childIndex]=N.currentNode=e},removeNode(e){const t=e?N.parent.children.indexOf(e):N.currentNode?N.childIndex:-1;e&&e!==N.currentNode?N.childIndex>t&&(N.childIndex--,N.onNodeRemoved()):(N.currentNode=null,N.onNodeRemoved()),N.parent.children.splice(t,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){g(e)&&(e=ia(e)),N.hoists.push(e);const t=ia(`_hoisted_${N.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:ta}}(N.cached++,e,t)};return N}function Mu(e,t){const n=Lu(e,t);Pu(e,n),t.hoistStatic&&Tu(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:s}=e;if(1===s.length){const n=s[0];if(wu(e,n)&&n.codegenNode){const s=n.codegenNode;13===s.type&&ha(s,t),e.codegenNode=s}else e.codegenNode=n}else if(s.length>1){let s=64;e.codegenNode=na(t,n(mc),void 0,e.children,s+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}function Pu(e,t){t.currentNode=e;const{nodeTransforms:n}=t,s=[];for(let r=0;r<n.length;r++){const o=n[r](e,t);if(o&&(d(o)?s.push(...o):s.push(o)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(Tc);break;case 5:t.ssr||t.helper(Pc);break;case 9:for(let n=0;n<e.branches.length;n++)Pu(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const s=()=>{n--};for(;n<e.children.length;n++){const o=e.children[n];g(o)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=s,Pu(o,t))}}(e,t)}t.currentNode=e;let o=s.length;for(;o--;)s[o]()}function $u(e,t){const n=g(e)?t=>t===e:t=>e.test(t);return(e,s)=>{if(1===e.type){const{props:o}=e;if(3===e.tagType&&o.some(Pa))return;const r=[];for(let i=0;i<o.length;i++){const l=o[i];if(7===l.type&&n(l.name)){o.splice(i,1),i--;const n=t(e,l,s);n&&r.push(n)}}return r}}}const Bu="/*#__PURE__*/",Vu=e=>`${ea[e]}: _${ea[e]}`;function Du(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:s=!1,filename:o="template.vue.html",scopeId:r=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){const h={mode:t,prefixIdentifiers:n,sourceMap:s,filename:o,scopeId:r,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${ea[e]}`,push(e,t=-2,n){h.code+=e},indent(){f(++h.indentLevel)},deindent(e=!1){e?--h.indentLevel:f(--h.indentLevel)},newline(){f(h.indentLevel)}};function f(e){h.push("\n"+" ".repeat(e),0)}return h}function Uu(e,t={}){const n=Du(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:o,prefixIdentifiers:r,indent:i,deindent:l,newline:c,ssr:a}=n,u=Array.from(e.helpers),d=u.length>0,p=!r&&"module"!==s,h=n;!function(e,t){const{push:n,newline:s,runtimeGlobalName:o}=t,r=o,i=Array.from(e.helpers);if(i.length>0&&(n(`const _Vue = ${r}\n`,-1),e.hoists.length)){n(`const { ${[Cc,kc,Tc,wc,Nc].filter((e=>i.includes(e))).map(Vu).join(", ")} } = _Vue\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s}=t;s();for(let o=0;o<e.length;o++){const r=e[o];r&&(n(`const _hoisted_${o+1} = `),Wu(r,t),s())}t.pure=!1})(e.hoists,t),s(),n("return ")}(e,h);if(o(`function ${a?"ssrRender":"render"}(${(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),i(),p&&(o("with (_ctx) {"),i(),d&&(o(`const { ${u.map(Vu).join(", ")} } = _Vue\n`,-1),c())),e.components.length&&(ju(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(ju(e.directives,"directive",n),e.temps>0&&c()),e.temps>0){o("let ");for(let t=0;t<e.temps;t++)o(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(o("\n",0),c()),a||o("return "),e.codegenNode?Wu(e.codegenNode,n):o("null"),p&&(l(),o("}")),l(),o("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function ju(e,t,{helper:n,push:s,newline:o,isTS:r}){const i=n("component"===t?Ac:Ic);for(let l=0;l<e.length;l++){let n=e[l];const c=n.endsWith("__self");c&&(n=n.slice(0,-6)),s(`const ${Ha(n,t)} = ${i}(${JSON.stringify(n)}${c?", true":""})${r?"!":""}`),l<e.length-1&&o()}}function Hu(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),qu(e,t,n),n&&t.deindent(),t.push("]")}function qu(e,t,n=!1,s=!0){const{push:o,newline:r}=t;for(let i=0;i<e.length;i++){const l=e[i];g(l)?o(l,-3):d(l)?Hu(l,t):Wu(l,t),i<e.length-1&&(n?(s&&o(","),r()):s&&o(", "))}}function Wu(e,t){if(g(e))t.push(e,-3);else if(v(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:Wu(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:Ku(e,t);break;case 5:!function(e,t){const{push:n,helper:s,pure:o}=t;o&&n(Bu);n(`${s(Pc)}(`),Wu(e.content,t),n(")")}(e,t);break;case 8:zu(e,t);break;case 3:!function(e,t){const{push:n,helper:s,pure:o}=t;o&&n(Bu);n(`${s(Tc)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:s,pure:o}=t,{tag:r,props:i,children:l,patchFlag:c,dynamicProps:a,directives:u,isBlock:d,disableTracking:p,isComponent:h}=e;u&&n(s(Oc)+"(");d&&n(`(${s(_c)}(${p?"true":""}), `);o&&n(Bu);const f=d?pa(t.inSSR,h):da(t.inSSR,h);n(s(f)+"(",-2,e),qu(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([r,i,l,c,a]),t),n(")"),d&&n(")");u&&(n(", "),Wu(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:s,pure:o}=t,r=g(e.callee)?e.callee:s(e.callee);o&&n(Bu);n(r+"(",-2,e),qu(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:s,deindent:o,newline:r}=t,{properties:i}=e;if(!i.length)return void n("{}",-2,e);const l=i.length>1||!1;n(l?"{":"{ "),l&&s();for(let c=0;c<i.length;c++){const{key:e,value:s}=i[c];Gu(e,t),n(": "),Wu(s,t),c<i.length-1&&(n(","),r())}l&&o(),n(l?"}":" }")}(e,t);break;case 17:!function(e,t){Hu(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:s,deindent:o}=t,{params:r,returns:i,body:l,newline:c,isSlot:a}=e;a&&n(`_${ea[Jc]}(`);n("(",-2,e),d(r)?qu(r,t):r&&Wu(r,t);n(") => "),(c||l)&&(n("{"),s());i?(c&&n("return "),d(i)?Hu(i,t):Wu(i,t)):l&&Wu(l,t);(c||l)&&(o(),n("}"));a&&n(")")}(e,t);break;case 19:!function(e,t){const{test:n,consequent:s,alternate:o,newline:r}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!Na(n.content);e&&i("("),Ku(n,t),e&&i(")")}else i("("),Wu(n,t),i(")");r&&l(),t.indentLevel++,r||i(" "),i("? "),Wu(s,t),t.indentLevel--,r&&a(),r||i(" "),i(": ");const u=19===o.type;u||t.indentLevel++;Wu(o,t),u||t.indentLevel--;r&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:s,indent:o,deindent:r,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(o(),n(`${s(Kc)}(-1),`),i());n(`_cache[${e.index}] = `),Wu(e.value,t),e.isVNode&&(n(","),i(),n(`${s(Kc)}(1),`),i(),n(`_cache[${e.index}]`),r());n(")")}(e,t);break;case 21:qu(e.body,t,!0,!1)}}function Ku(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,-3,e)}function zu(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];g(s)?t.push(s,-3):Wu(s,t)}}function Gu(e,t){const{push:n}=t;if(8===e.type)n("["),zu(e,t),n("]");else if(e.isStatic){n(Na(e.content)?e.content:JSON.stringify(e.content),-2,e)}else n(`[${e.content}]`,-3,e)}const Ju=$u(/^(if|else|else-if)$/,((e,t,n)=>function(e,t,n,s){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const s=t.exp?t.exp.loc:e.loc;n.onError(Ca(28,t.loc)),t.exp=ia("true",!1,s)}if("if"===t.name){const o=Xu(e,t),r={type:9,loc:e.loc,branches:[o]};if(n.replaceNode(r),s)return s(r,o,!0)}else{const o=n.parent.children;let r=o.indexOf(e);for(;r-- >=-1;){const i=o[r];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(Ca(30,e.loc)),n.removeNode();const o=Xu(e,t);i.branches.push(o);const r=s&&s(i,o,!1);Pu(o,n),r&&r(),n.currentNode=null}else n.onError(Ca(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,s)=>{const o=n.parent.children;let r=o.indexOf(e),i=0;for(;r-- >=0;){const e=o[r];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(s)e.codegenNode=Qu(t,i,n);else{const s=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);s.alternate=Qu(t,i+e.branches.length-1,n)}}}))));function Xu(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Oa(e,"for")?e.children:[e],userKey:Fa(e,"key"),isTemplateIf:n}}function Qu(e,t,n){return e.condition?ua(e.condition,Zu(e,t,n),ca(n.helper(Tc),['""',"true"])):Zu(e,t,n)}function Zu(e,t,n){const{helper:s}=n,o=ra("key",ia(`${t}`,!1,ta,2)),{children:r}=e,i=r[0];if(1!==r.length||1!==i.type){if(1===r.length&&11===i.type){const e=i.codegenNode;return Ua(e,o,n),e}{let t=64;return na(n,s(mc),oa([o]),r,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===Zc?l.arguments[1].returns:l;return 13===t.type&&ha(t,n),Ua(t,o,n),e}var l}const Yu=$u("for",((e,t,n)=>{const{helper:s,removeHelper:o}=n;return function(e,t,n,s){if(!t.exp)return void n.onError(Ca(31,t.loc));const o=t.forParseResult;if(!o)return void n.onError(Ca(32,t.loc));ed(o);const{scopes:r}=n,{source:i,value:l,key:c,index:a}=o,u={type:11,loc:t.loc,source:i,valueAlias:l,keyAlias:c,objectIndexAlias:a,parseResult:o,children:$a(e)?e.children:[e]};n.replaceNode(u),r.vFor++;const d=s&&s(u);return()=>{r.vFor--,d&&d()}}(e,t,n,(t=>{const r=ca(s(Fc),[t.source]),i=$a(e),l=Oa(e,"memo"),c=Fa(e,"key"),a=c&&(6===c.type?ia(c.value.content,!0):c.exp),u=c?ra("key",a):null,d=4===t.source.type&&t.source.constType>0,p=d?64:c?128:256;return t.codegenNode=na(n,s(mc),void 0,r,p+"",void 0,void 0,!0,!d,!1,e.loc),()=>{let c;const{children:p}=t,h=1!==p.length||1!==p[0].type,f=Ba(e)?e:i&&1===e.children.length&&Ba(e.children[0])?e.children[0]:null;if(f?(c=f.codegenNode,i&&u&&Ua(c,u,n)):h?c=na(n,s(mc),u?oa([u]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=p[0].codegenNode,i&&u&&Ua(c,u,n),c.isBlock!==!d&&(c.isBlock?(o(_c),o(pa(n.inSSR,c.isComponent))):o(da(n.inSSR,c.isComponent))),c.isBlock=!d,c.isBlock?(s(_c),s(pa(n.inSSR,c.isComponent))):s(da(n.inSSR,c.isComponent))),l){const e=aa(td(t.parseResult,[ia("_cached")]));e.body={type:21,body:[la(["const _memo = (",l.exp,")"]),la(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(Yc)}(_cached, _memo)) return _cached`]),la(["const _item = ",c]),ia("_item.memo = _memo"),ia("return _item")],loc:ta},r.arguments.push(e,ia("_cache"),ia(String(n.cached++)))}else r.arguments.push(aa(td(t.parseResult),c,!0))}}))}));function ed(e,t){e.finalized||(e.finalized=!0)}function td({value:e,key:t,index:n},s=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||ia("_".repeat(t+1),!1)))}([e,t,n,...s])}const nd=ia("undefined",!1),sd=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Oa(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},od=(e,t,n,s)=>aa(e,n,!1,!0,n.length?n[0].loc:s);function rd(e,t,n=od){t.helper(Jc);const{children:s,loc:o}=e,r=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=Oa(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!ka(e)&&(l=!0),r.push(ra(e||ia("default",!0),n(t,void 0,s,o)))}let a=!1,u=!1;const d=[],p=new Set;let h=0;for(let g=0;g<s.length;g++){const e=s[g];let o;if(!$a(e)||!(o=Oa(e,"slot",!0))){3!==e.type&&d.push(e);continue}if(c){t.onError(Ca(37,o.loc));break}a=!0;const{children:f,loc:m}=e,{arg:v=ia("default",!0),exp:y,loc:b}=o;let _;ka(v)?_=v?v.content:"default":l=!0;const S=Oa(e,"for"),x=n(y,S,f,m);let C,k;if(C=Oa(e,"if"))l=!0,i.push(ua(C.exp,id(v,x,h++),nd));else if(k=Oa(e,/^else(-if)?$/,!0)){let e,n=g;for(;n--&&(e=s[n],3===e.type););if(e&&$a(e)&&Oa(e,"if")){s.splice(g,1),g--;let e=i[i.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=k.exp?ua(k.exp,id(v,x,h++),nd):id(v,x,h++)}else t.onError(Ca(30,k.loc))}else if(S){l=!0;const e=S.forParseResult;e?(ed(e),i.push(ca(t.helper(Fc),[e.source,aa(td(e),id(v,x),!0)]))):t.onError(Ca(32,S.loc))}else{if(_){if(p.has(_)){t.onError(Ca(38,b));continue}p.add(_),"default"===_&&(u=!0)}r.push(ra(v,x))}}if(!c){const e=(e,t)=>ra("default",n(e,void 0,t,o));a?d.length&&d.some((e=>cd(e)))&&(u?t.onError(Ca(39,d[0].loc)):r.push(e(void 0,d))):r.push(e(void 0,s))}const f=l?2:ld(e.children)?3:1;let m=oa(r.concat(ra("_",ia(f+"",!1))),o);return i.length&&(m=ca(t.helper(Mc),[m,sa(i)])),{slots:m,hasDynamicSlots:l}}function id(e,t,n){const s=[ra("name",e),ra("fn",t)];return null!=n&&s.push(ra("key",ia(String(n),!0))),oa(s)}function ld(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||ld(n.children))return!0;break;case 9:if(ld(n.branches))return!0;break;case 10:case 11:if(ld(n.children))return!0}}return!1}function cd(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():cd(e.content))}const ad=new WeakMap,ud=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:s}=e,o=1===e.tagType;let r=o?function(e,t,n=!1){let{tag:s}=e;const o=fd(s),r=Fa(e,"is");if(r)if(o){const e=6===r.type?r.value&&ia(r.value.content,!0):r.exp;if(e)return ca(t.helper(Ec),[e])}else 6===r.type&&r.value.content.startsWith("vue:")&&(s=r.value.content.slice(4));const i=Ta(s)||t.isBuiltInComponent(s);if(i)return n||t.helper(i),i;return t.helper(Ac),t.components.add(s),Ha(s,"component")}(e,t):`"${n}"`;const i=y(r)&&r.callee===Ec;let l,c,a,u,d,p,h=0,f=i||r===gc||r===vc||!o&&("svg"===n||"foreignObject"===n);if(s.length>0){const n=dd(e,t,void 0,o,i);l=n.props,h=n.patchFlag,d=n.dynamicPropNames;const s=n.directives;p=s&&s.length?sa(s.map((e=>function(e,t){const n=[],s=ad.get(e);s?n.push(t.helperString(s)):(t.helper(Ic),t.directives.add(e.name),n.push(Ha(e.name,"directive")));const{loc:o}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=ia("true",!1,o);n.push(oa(e.modifiers.map((e=>ra(e,t))),o))}return sa(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(f=!0)}if(e.children.length>0){r===yc&&(f=!0,h|=1024);if(o&&r!==gc&&r!==yc){const{slots:n,hasDynamicSlots:s}=rd(e,t);c=n,s&&(h|=1024)}else if(1===e.children.length&&r!==gc){const n=e.children[0],s=n.type,o=5===s||8===s;o&&0===Au(n,t)&&(h|=1),c=o||2===s?n:e.children}else c=e.children}0!==h&&(a=String(h),d&&d.length&&(u=function(e){let t="[";for(let n=0,s=e.length;n<s;n++)t+=JSON.stringify(e[n]),n<s-1&&(t+=", ");return t+"]"}(d))),e.codegenNode=na(t,r,l,c,a,u,p,!!f,!1,o,e.loc)};function dd(e,t,n=e.props,s,o,i=!1){const{tag:l,loc:c,children:a}=e;let u=[];const d=[],p=[],h=a.length>0;let f=!1,m=0,g=!1,y=!1,b=!1,_=!1,S=!1,x=!1;const C=[],k=e=>{u.length&&(d.push(oa(pd(u),c)),u=[]),e&&d.push(e)},N=({key:e,value:n})=>{if(ka(e)){const i=e.content,l=r(i);if(!l||s&&!o||"onclick"===i.toLowerCase()||"onUpdate:modelValue"===i||T(i)||(_=!0),l&&T(i)&&(x=!0),l&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&Au(n,t)>0)return;"ref"===i?g=!0:"class"===i?y=!0:"style"===i?b=!0:"key"===i||C.includes(i)||C.push(i),!s||"class"!==i&&"style"!==i||C.includes(i)||C.push(i)}else S=!0};for(let r=0;r<n.length;r++){const o=n[r];if(6===o.type){const{loc:e,name:n,nameLoc:s,value:r}=o;let i=!0;if("ref"===n&&(g=!0,t.scopes.vFor>0&&u.push(ra(ia("ref_for",!0),ia("true")))),"is"===n&&(fd(l)||r&&r.content.startsWith("vue:")))continue;u.push(ra(ia(n,!0,s),ia(r?r.content:"",i,r?r.loc:e)))}else{const{name:n,arg:r,exp:a,loc:g,modifiers:y}=o,b="bind"===n,_="on"===n;if("slot"===n){s||t.onError(Ca(40,g));continue}if("once"===n||"memo"===n)continue;if("is"===n||b&&La(r,"is")&&fd(l))continue;if(_&&i)continue;if((b&&La(r,"key")||_&&h&&La(r,"vue:before-update"))&&(f=!0),b&&La(r,"ref")&&t.scopes.vFor>0&&u.push(ra(ia("ref_for",!0),ia("true"))),!r&&(b||_)){S=!0,a?b?(k(),d.push(a)):k({type:14,loc:g,callee:t.helper(jc),arguments:s?[a]:[a,"true"]}):t.onError(Ca(b?34:35,g));continue}b&&y.includes("prop")&&(m|=32);const x=t.directiveTransforms[n];if(x){const{props:n,needRuntime:s}=x(o,e,t);!i&&n.forEach(N),_&&r&&!ka(r)?k(oa(n,c)):u.push(...n),s&&(p.push(o),v(s)&&ad.set(o,s))}else w(n)||(p.push(o),h&&(f=!0))}}let A;if(d.length?(k(),A=d.length>1?ca(t.helper($c),d,c):d[0]):u.length&&(A=oa(pd(u),c)),S?m|=16:(y&&!s&&(m|=2),b&&!s&&(m|=4),C.length&&(m|=8),_&&(m|=32)),f||0!==m&&32!==m||!(g||x||p.length>0)||(m|=512),!t.inSSR&&A)switch(A.type){case 15:let e=-1,n=-1,s=!1;for(let t=0;t<A.properties.length;t++){const o=A.properties[t].key;ka(o)?"class"===o.content?e=t:"style"===o.content&&(n=t):o.isHandlerKey||(s=!0)}const o=A.properties[e],r=A.properties[n];s?A=ca(t.helper(Dc),[A]):(o&&!ka(o.value)&&(o.value=ca(t.helper(Bc),[o.value])),r&&(b||4===r.value.type&&"["===r.value.content.trim()[0]||17===r.value.type)&&(r.value=ca(t.helper(Vc),[r.value])));break;case 14:break;default:A=ca(t.helper(Dc),[ca(t.helper(Uc),[A])])}return{props:A,directives:p,patchFlag:m,dynamicPropNames:C,shouldUseBlock:f}}function pd(e){const t=new Map,n=[];for(let s=0;s<e.length;s++){const o=e[s];if(8===o.key.type||!o.key.isStatic){n.push(o);continue}const i=o.key.content,l=t.get(i);l?("style"===i||"class"===i||r(i))&&hd(l,o):(t.set(i,o),n.push(o))}return n}function hd(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=sa([e.value,t.value],e.loc)}function fd(e){return"component"===e||"Component"===e}const md=(e,t)=>{if(Ba(e)){const{children:n,loc:s}=e,{slotName:o,slotProps:r}=function(e,t){let n,s='"default"';const o=[];for(let r=0;r<e.props.length;r++){const t=e.props[r];6===t.type?t.value&&("name"===t.name?s=JSON.stringify(t.value.content):(t.name=E(t.name),o.push(t))):"bind"===t.name&&La(t.arg,"name")?t.exp&&(s=t.exp):("bind"===t.name&&t.arg&&ka(t.arg)&&(t.arg.content=E(t.arg.content)),o.push(t))}if(o.length>0){const{props:s,directives:r}=dd(e,t,o,!1,!1);n=s,r.length&&t.onError(Ca(36,r[0].loc))}return{slotName:s,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",o,"{}","undefined","true"];let l=2;r&&(i[2]=r,l=3),n.length&&(i[3]=aa([],n,!1,!1,s),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=ca(t.helper(Lc),i,s)}};const gd=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,vd=(e,t,n,s)=>{const{loc:o,modifiers:r,arg:i}=e;let l;if(4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);l=ia(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?F(E(e)):`on:${e}`,!0,i.loc)}else l=la([`${n.helperString(Wc)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(Wc)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=Ra(c.content),t=!(e||gd.test(c.content)),n=c.content.includes(";");(t||a&&e)&&(c=la([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[ra(l,c||ia("() => {}",!1,o))]};return s&&(u=s(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},yd=(e,t,n)=>{const{modifiers:s,loc:o}=e,r=e.arg;let{exp:i}=e;if(!i&&4===r.type){const t=E(r.content);i=e.exp=ia(t,!1,r.loc)}return 4!==r.type?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=`${r.content} || ""`),s.includes("camel")&&(4===r.type?r.content=r.isStatic?E(r.content):`${n.helperString(Hc)}(${r.content})`:(r.children.unshift(`${n.helperString(Hc)}(`),r.children.push(")"))),n.inSSR||(s.includes("prop")&&bd(r,"."),s.includes("attr")&&bd(r,"^")),!i||4===i.type&&!i.content.trim()?{props:[ra(r,ia("",!0,o))]}:{props:[ra(r,i)]}},bd=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},_d=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let s,o=!1;for(let e=0;e<n.length;e++){const t=n[e];if(Ma(t)){o=!0;for(let o=e+1;o<n.length;o++){const r=n[o];if(!Ma(r)){s=void 0;break}s||(s=n[e]=la([t],t.loc)),s.children.push(" + ",r),n.splice(o,1),o--}}}if(o&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name])))))for(let e=0;e<n.length;e++){const s=n[e];if(Ma(s)||8===s.type){const o=[];2===s.type&&" "===s.content||o.push(s),t.ssr||0!==Au(s,t)||o.push("1"),n[e]={type:12,content:s,loc:s.loc,codegenNode:ca(t.helper(wc),o)}}}}},Sd=new WeakSet,xd=(e,t)=>{if(1===e.type&&Oa(e,"once",!0)){if(Sd.has(e)||t.inVOnce||t.inSSR)return;return Sd.add(e),t.inVOnce=!0,t.helper(Kc),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},Cd=(e,t,n)=>{const{exp:s,arg:o}=e;if(!s)return n.onError(Ca(41,e.loc)),kd();const r=s.loc.source,i=4===s.type?s.content:r,l=n.bindingMetadata[r];if("props"===l||"props-aliased"===l)return kd();if(!i.trim()||!Ra(i))return n.onError(Ca(42,s.loc)),kd();const c=o||ia("modelValue",!0),a=o?ka(o)?`onUpdate:${E(o.content)}`:la(['"onUpdate:" + ',o]):"onUpdate:modelValue";let u;u=la([`${n.isTS?"($event: any)":"$event"} => ((`,s,") = $event)"]);const d=[ra(c,e.exp),ra(a,u)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Na(e)?e:JSON.stringify(e))+": true")).join(", "),n=o?ka(o)?`${o.content}Modifiers`:la([o,' + "Modifiers"']):"modelModifiers";d.push(ra(n,ia(`{ ${t} }`,!1,e.loc,2)))}return kd(d)};function kd(e=[]){return{props:e}}const Td=new WeakSet,wd=(e,t)=>{if(1===e.type){const n=Oa(e,"memo");if(!n||Td.has(e))return;return Td.add(e),()=>{const s=e.codegenNode||t.currentNode.codegenNode;s&&13===s.type&&(1!==e.tagType&&ha(s,t),e.codegenNode=ca(t.helper(Zc),[n.exp,aa(void 0,s),"_cache",String(t.cached++)]))}}};function Nd(e,t={}){const n=t.onError||Sa,s="module"===t.mode;!0===t.prefixIdentifiers?n(Ca(47)):s&&n(Ca(48));t.cacheHandlers&&n(Ca(49)),t.scopeId&&!s&&n(Ca(50));const o=l({},t,{prefixIdentifiers:!1}),r=g(e)?ku(e,o):e,[i,c]=[[xd,Ju,wd,Yu,md,ud,sd,_d],{on:vd,bind:yd,model:Cd}];return Mu(r,l({},o,{nodeTransforms:[...i,...t.nodeTransforms||[]],directiveTransforms:l({},c,t.directiveTransforms||{})})),Uu(r,o)}const Ad=Symbol(""),Ed=Symbol(""),Id=Symbol(""),Rd=Symbol(""),Od=Symbol(""),Fd=Symbol(""),Ld=Symbol(""),Md=Symbol(""),Pd=Symbol(""),$d=Symbol("");var Bd;let Vd;Bd={[Ad]:"vModelRadio",[Ed]:"vModelCheckbox",[Id]:"vModelText",[Rd]:"vModelSelect",[Od]:"vModelDynamic",[Fd]:"withModifiers",[Ld]:"withKeys",[Md]:"vShow",[Pd]:"Transition",[$d]:"TransitionGroup"},Object.getOwnPropertySymbols(Bd).forEach((e=>{ea[e]=Bd[e]}));const Dd={parseMode:"html",isVoidTag:Z,isNativeTag:e=>J(e)||X(e)||Q(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return Vd||(Vd=document.createElement("div")),t?(Vd.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Vd.children[0].getAttribute("foo")):(Vd.innerHTML=e,Vd.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?Pd:"TransitionGroup"===e||"transition-group"===e?$d:void 0,getNamespace(e,t,n){let s=t?t.ns:n;if(t&&2===s)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(s=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(s=0);else t&&1===s&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(s=0));if(0===s){if("svg"===e)return 1;if("math"===e)return 2}return s}},Ud=(e,t)=>{const n=K(e);return ia(JSON.stringify(n),!1,t,3)};function jd(e,t){return Ca(e,t)}const Hd=e("passive,once,capture"),qd=e("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Wd=e("left,right"),Kd=e("onkeyup,onkeydown,onkeypress",!0),zd=(e,t)=>ka(e)&&"onclick"===e.content.toLowerCase()?ia(t,!0):4!==e.type?la(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Gd=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},Jd=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:ia("style",!0,t.loc),exp:Ud(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],Xd={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:s,loc:o}=e;return s||n.onError(jd(53,o)),t.children.length&&(n.onError(jd(54,o)),t.children.length=0),{props:[ra(ia("innerHTML",!0,o),s||ia("",!0))]}},text:(e,t,n)=>{const{exp:s,loc:o}=e;return s||n.onError(jd(55,o)),t.children.length&&(n.onError(jd(56,o)),t.children.length=0),{props:[ra(ia("textContent",!0),s?Au(s,n)>0?s:ca(n.helperString(Pc),[s],o):ia("",!0))]}},model:(e,t,n)=>{const s=Cd(e,t,n);if(!s.props.length||1===t.tagType)return s;e.arg&&n.onError(jd(58,e.arg.loc));const{tag:o}=t,r=n.isCustomElement(o);if("input"===o||"textarea"===o||"select"===o||r){let i=Id,l=!1;if("input"===o||r){const s=Fa(t,"type");if(s){if(7===s.type)i=Od;else if(s.value)switch(s.value.content){case"radio":i=Ad;break;case"checkbox":i=Ed;break;case"file":l=!0,n.onError(jd(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=Od)}else"select"===o&&(i=Rd);l||(s.needRuntime=n.helper(i))}else n.onError(jd(57,e.loc));return s.props=s.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),s},on:(e,t,n)=>vd(e,t,n,(t=>{const{modifiers:s}=e;if(!s.length)return t;let{key:o,value:r}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n,s)=>{const o=[],r=[],i=[];for(let l=0;l<t.length;l++){const n=t[l];Hd(n)?i.push(n):Wd(n)?ka(e)?Kd(e.content)?o.push(n):r.push(n):(o.push(n),r.push(n)):qd(n)?r.push(n):o.push(n)}return{keyModifiers:o,nonKeyModifiers:r,eventOptionModifiers:i}})(o,s);if(l.includes("right")&&(o=zd(o,"onContextmenu")),l.includes("middle")&&(o=zd(o,"onMouseup")),l.length&&(r=ca(n.helper(Fd),[r,JSON.stringify(l)])),!i.length||ka(o)&&!Kd(o.content)||(r=ca(n.helper(Ld),[r,JSON.stringify(i)])),c.length){const e=c.map(O).join("");o=ka(o)?ia(`${o.content}${e}`,!0):la(["(",o,`) + "${e}"`])}return{props:[ra(o,r)]}})),show:(e,t,n)=>{const{exp:s,loc:o}=e;return s||n.onError(jd(61,o)),{props:[],needRuntime:n.helper(Md)}}};const Qd=new WeakMap;function Zd(e,n){if(!g(e)){if(!e.nodeType)return s;e=e.innerHTML}const o=e,r=function(e){let n=Qd.get(null!=e?e:t);return n||(n=Object.create(null),Qd.set(null!=e?e:t,n)),n}(n),i=r[o];if(i)return i;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const c=l({hoistStatic:!0,onError:void 0,onWarn:s},n);c.isCustomElement||"undefined"==typeof customElements||(c.isCustomElement=e=>!!customElements.get(e));const{code:a}=function(e,t={}){return Nd(e,l({},Dd,t,{nodeTransforms:[Gd,...Jd,...t.nodeTransforms||[]],directiveTransforms:l({},Xd,t.directiveTransforms||{}),transformHoist:null}))}(e,c),u=new Function("Vue",a)(fc);return u._rc=!0,r[o]=u}fi(Zd);export{_s as BaseTransition,bs as BaseTransitionPropsValidators,wr as Comment,Li as DeprecationTypes,ce as EffectScope,sn as ErrorCodes,Ai as ErrorTypeStrings,kr as Fragment,Os as KeepAlive,he as ReactiveEffect,Nr as Static,Xn as Suspense,xr as Teleport,Tr as Text,en as TrackOpTypes,Ui as Transition,Fl as TransitionGroup,tn as TriggerOpTypes,wl as VueElement,nn as assertNumber,rn as callWithAsyncErrorHandling,on as callWithErrorHandling,E as camelize,O as capitalize,Kr as cloneVNode,Fi as compatUtils,Zd as compile,_i as computed,ac as createApp,Pr as createBlock,Jr as createCommentVNode,Mr as createElementBlock,Hr as createElementVNode,ur as createHydrationRenderer,xo as createPropsRestProxy,ar as createRenderer,uc as createSSRApp,Ys as createSlots,Gr as createStaticVNode,zr as createTextVNode,qr as createVNode,Gt as customRef,Es as defineAsyncComponent,Ns as defineComponent,Cl as defineCustomElement,ao as defineEmits,uo as defineExpose,fo as defineModel,po as defineOptions,co as defineProps,kl as defineSSRCustomElement,ho as defineSlots,Ei as devtools,ye as effect,ae as effectScope,oi as getCurrentInstance,de as getCurrentScope,ws as getTransitionRawChildren,Wr as guardReactiveProps,xi as h,ln as handleError,jo as hasInjectionContext,cc as hydrate,Ci as initCustomFormatter,hc as initDirectivesForSSR,Uo as inject,Ti as isMemoSame,Et as isProxy,wt as isReactive,Nt as isReadonly,$t as isRef,mi as isRuntimeOnly,At as isShallow,$r as isVNode,Rt as markRaw,_o as mergeDefaults,So as mergeModels,Yr as mergeProps,vn as nextTick,z as normalizeClass,G as normalizeProps,j as normalizeStyle,Ls as onActivated,js as onBeforeMount,Ks as onBeforeUnmount,qs as onBeforeUpdate,Ms as onDeactivated,Qs as onErrorCaptured,Hs as onMounted,Xs as onRenderTracked,Js as onRenderTriggered,pe as onScopeDispose,Gs as onServerPrefetch,zs as onUnmounted,Ws as onUpdated,Ir as openBlock,Fn as popScopeId,Do as provide,Kt as proxyRefs,On as pushScopeId,_n as queuePostFlushCb,St as reactive,Ct as readonly,Bt as ref,fi as registerRuntimeCompiler,lc as render,Zs as renderList,eo as renderSlot,jn as resolveComponent,Wn as resolveDirective,qn as resolveDynamicComponent,Oi as resolveFilter,xs as resolveTransitionHooks,Fr as setBlockTracking,Ii as setDevtoolsHook,Ts as setTransitionHooks,xt as shallowReactive,kt as shallowReadonly,Vt as shallowRef,ns as ssrContextKey,Ri as ssrUtils,be as stop,se as toDisplayString,F as toHandlerKey,no as toHandlers,It as toRaw,Zt as toRef,Jt as toRefs,qt as toValue,Vr as transformVNodeArgs,jt as triggerRef,Ht as unref,vo as useAttrs,Nl as useCssModule,ll as useCssVars,Si as useModel,ss as useSSRContext,go as useSlots,vs as useTransitionState,jl as vModelCheckbox,Jl as vModelDynamic,ql as vModelRadio,Wl as vModelSelect,Ul as vModelText,ol as vShow,wi as version,Ni as warn,cs as watch,os as watchEffect,rs as watchPostEffect,is as watchSyncEffect,Co as withAsyncContext,Mn as withCtx,mo as withDefaults,hs as withDirectives,tc as withKeys,ki as withMemo,Yl as withModifiers,Ln as withScopeId}; diff --git a/node_modules/vue/dist/vue.esm-bundler.js b/node_modules/vue/dist/vue.esm-bundler.js index abc7ea5d..a9ec46ec 100644 --- a/node_modules/vue/dist/vue.esm-bundler.js +++ b/node_modules/vue/dist/vue.esm-bundler.js @@ -1,66 +1,79 @@ +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ import * as runtimeDom from '@vue/runtime-dom'; -import { initCustomFormatter, warn, registerRuntimeCompiler } from '@vue/runtime-dom'; +import { initCustomFormatter, registerRuntimeCompiler, warn } from '@vue/runtime-dom'; export * from '@vue/runtime-dom'; import { compile } from '@vue/compiler-dom'; -import { isString, NOOP, extend, generateCodeFrame } from '@vue/shared'; +import { isString, NOOP, extend, generateCodeFrame, EMPTY_OBJ } from '@vue/shared'; function initDev() { - { - initCustomFormatter(); - } + { + initCustomFormatter(); + } } -// This entry is the "full-build" that includes both the runtime -if ((process.env.NODE_ENV !== 'production')) { - initDev(); +if (!!(process.env.NODE_ENV !== "production")) { + initDev(); +} +const compileCache = /* @__PURE__ */ new WeakMap(); +function getCache(options) { + let c = compileCache.get(options != null ? options : EMPTY_OBJ); + if (!c) { + c = /* @__PURE__ */ Object.create(null); + compileCache.set(options != null ? options : EMPTY_OBJ, c); + } + return c; } -const compileCache = Object.create(null); function compileToFunction(template, options) { - if (!isString(template)) { - if (template.nodeType) { - template = template.innerHTML; - } - else { - (process.env.NODE_ENV !== 'production') && warn(`invalid template option: `, template); - return NOOP; - } + if (!isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + !!(process.env.NODE_ENV !== "production") && warn(`invalid template option: `, template); + return NOOP; } - const key = template; - const cached = compileCache[key]; - if (cached) { - return cached; + } + const key = template; + const cache = getCache(options); + const cached = cache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + if (!!(process.env.NODE_ENV !== "production") && !el) { + warn(`Template element not found or is empty: ${template}`); } - if (template[0] === '#') { - const el = document.querySelector(template); - if ((process.env.NODE_ENV !== 'production') && !el) { - warn(`Template element not found or is empty: ${template}`); - } - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's rendered - // by the server, the template should not contain any user data. - template = el ? el.innerHTML : ``; - } - const { code } = compile(template, extend({ - hoistStatic: true, - onError: (process.env.NODE_ENV !== 'production') ? onError : undefined, - onWarn: (process.env.NODE_ENV !== 'production') ? e => onError(e, true) : NOOP - }, options)); - function onError(err, asWarning = false) { - const message = asWarning - ? err.message - : `Template compilation error: ${err.message}`; - const codeFrame = err.loc && - generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset); - warn(codeFrame ? `${message}\n${codeFrame}` : message); - } - // The wildcard import results in a huge object with every export - // with keys that cannot be mangled, and can be quite heavy size-wise. - // In the global build we know `Vue` is available globally so we can avoid - // the wildcard object. - const render = (new Function('Vue', code)(runtimeDom)); - render._rc = true; - return (compileCache[key] = render); + template = el ? el.innerHTML : ``; + } + const opts = extend( + { + hoistStatic: true, + onError: !!(process.env.NODE_ENV !== "production") ? onError : void 0, + onWarn: !!(process.env.NODE_ENV !== "production") ? (e) => onError(e, true) : NOOP + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compile(template, opts); + function onError(err, asWarning = false) { + const message = asWarning ? err.message : `Template compilation error: ${err.message}`; + const codeFrame = err.loc && generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + warn(codeFrame ? `${message} +${codeFrame}` : message); + } + const render = new Function("Vue", code)(runtimeDom); + render._rc = true; + return cache[key] = render; } registerRuntimeCompiler(compileToFunction); diff --git a/node_modules/vue/dist/vue.global.js b/node_modules/vue/dist/vue.global.js index ede96807..cb3b748e 100644 --- a/node_modules/vue/dist/vue.global.js +++ b/node_modules/vue/dist/vue.global.js @@ -1,10992 +1,11122 @@ +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ var Vue = (function (exports) { 'use strict'; - /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } - /** - * dev only flag -> name mapping - */ - const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` - }; - - /** - * Dev only - */ - const slotFlagsText = { - [1 /* STABLE */]: 'STABLE', - [2 /* DYNAMIC */]: 'DYNAMIC', - [3 /* FORWARDED */]: 'FORWARDED' - }; - - const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; - const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - - const range = 2; - function generateCodeFrame(source, start = 0, end = source.length) { - // Split the content into individual lines but capture the newline sequence - // that separated each line. This is important because the actual sequence is - // needed to properly take into account the full line length for offset - // comparison - let lines = source.split(/(\r?\n)/); - // Separate the lines and newline sequences into separate arrays for easier referencing - const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); - lines = lines.filter((_, idx) => idx % 2 === 0); - let count = 0; - const res = []; - for (let i = 0; i < lines.length; i++) { - count += - lines[i].length + - ((newlineSequences[i] && newlineSequences[i].length) || 0); - if (count >= start) { - for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; - const line = j + 1; - res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`); - const lineLength = lines[j].length; - const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0; - if (j === i) { - // push underline - const pad = start - (count - (lineLength + newLineSeqLength)); - const length = Math.max(1, end > count ? lineLength - pad : end - start); - res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length)); - } - else if (j > i) { - if (end > count) { - const length = Math.max(Math.min(end - count, lineLength), 1); - res.push(` | ` + '^'.repeat(length)); - } - count += lineLength + newLineSeqLength; - } - } - break; - } - } - return res.join('\n'); - } - - /** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ - const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; - const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); - /** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ - function includeBooleanAttr(value) { - return !!value || value === ''; - } - - function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } - } - const listDelimiterRE = /;(?![^(]*\))/g; - const propertyDelimiterRE = /:(.+)/; - function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; - } - function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); - } - function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; - } - - // These tag configs are shared between compiler-dom and runtime-dom, so they - // https://developer.mozilla.org/en-US/docs/Web/HTML/Element - const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; - // https://developer.mozilla.org/en-US/docs/Web/SVG/Element - const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; - const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr'; - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS); - - function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; - } - function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); - } - function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); - } - - /** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ - const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); - }; - const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; - }; - - const EMPTY_OBJ = Object.freeze({}) - ; + const EMPTY_OBJ = Object.freeze({}) ; const EMPTY_ARR = Object.freeze([]) ; - const NOOP = () => { }; - /** - * Always return false. - */ + const NOOP = () => { + }; const NO = () => false; - const onRE = /^on[^a-z]/; - const isOn = (key) => onRE.test(key); - const isModelListener = (key) => key.startsWith('onUpdate:'); + const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter + (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); + const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; - const hasOwnProperty = Object.prototype.hasOwnProperty; - const hasOwn = (val, key) => hasOwnProperty.call(val, key); + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; + const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; - const isMap = (val) => toTypeString(val) === '[object Map]'; - const isSet = (val) => toTypeString(val) === '[object Set]'; - const isDate = (val) => toTypeString(val) === '[object Date]'; - const isFunction = (val) => typeof val === 'function'; - const isString = (val) => typeof val === 'string'; - const isSymbol = (val) => typeof val === 'symbol'; - const isObject = (val) => val !== null && typeof val === 'object'; + const isMap = (val) => toTypeString(val) === "[object Map]"; + const isSet = (val) => toTypeString(val) === "[object Set]"; + const isDate = (val) => toTypeString(val) === "[object Date]"; + const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; + const isFunction = (val) => typeof val === "function"; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; - const isPlainObject = (val) => toTypeString(val) === '[object Object]'; - const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; - const isReservedProp = /*#__PURE__*/ makeMap( - // the leading comma is intentional so empty string "" is also included - ',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); - const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); + const isPlainObject = (val) => toTypeString(val) === "[object Object]"; + const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; + const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" + ); + const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" + ); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; - /** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; - /** - * @private - */ - const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); - /** - * @private - */ - const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); - /** - * @private - */ - const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); - // compare whether a value has changed, accounting for NaN. + const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() + ); + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + }); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); + }; + const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; - function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); + const PatchFlagNames = { + [1]: `TEXT`, + [2]: `CLASS`, + [4]: `STYLE`, + [8]: `PROPS`, + [16]: `FULL_PROPS`, + [32]: `NEED_HYDRATION`, + [64]: `STABLE_FRAGMENT`, + [128]: `KEYED_FRAGMENT`, + [256]: `UNKEYED_FRAGMENT`, + [512]: `NEED_PATCH`, + [1024]: `DYNAMIC_SLOTS`, + [2048]: `DEV_ROOT_FRAGMENT`, + [-1]: `HOISTED`, + [-2]: `BAIL` + }; + + const slotFlagsText = { + [1]: "STABLE", + [2]: "DYNAMIC", + [3]: "FORWARDED" + }; + + const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; + const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + + const range = 2; + function generateCodeFrame(source, start = 0, end = source.length) { + let lines = source.split(/(\r?\n)/); + const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); + lines = lines.filter((_, idx) => idx % 2 === 0); + let count = 0; + const res = []; + for (let i = 0; i < lines.length; i++) { + count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); + if (count >= start) { + for (let j = i - range; j <= i + range || end > count; j++) { + if (j < 0 || j >= lines.length) + continue; + const line = j + 1; + res.push( + `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` + ); + const lineLength = lines[j].length; + const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; + if (j === i) { + const pad = start - (count - (lineLength + newLineSeqLength)); + const length = Math.max( + 1, + end > count ? lineLength - pad : end - start + ); + res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); + } else if (j > i) { + if (end > count) { + const length = Math.max(Math.min(end - count, lineLength), 1); + res.push(` | ` + "^".repeat(length)); + } + count += lineLength + newLineSeqLength; + } + } + break; + } + } + return res.join("\n"); + } + + function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } + } + const listDelimiterRE = /;(?![^(]*\))/g; + const propertyDelimiterRE = /:([^]+)/; + const styleCommentRE = /\/\*[^]*?\*\//g; + function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; + } + function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; + } + function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); + } + function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; + } + + const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; + const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; + const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); + + const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; + const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); + const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` + ); + function includeBooleanAttr(value) { + return !!value || value === ""; + } + const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` + ); + const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` + ); + function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; + } + + function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; + } + function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); + } + function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); + } + + const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); + }; + const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; + }; + const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; + }; + + function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } - const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; - }; - const wasTracked = (dep) => (dep.w & trackOpBit) > 0; - const newTracked = (dep) => (dep.n & trackOpBit) > 0; - const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } - }; - const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } - }; - - const targetMap = new WeakMap(); - // The number of effects currently being tracked recursively. - let effectTrackDepth = 0; - let trackOpBit = 1; - /** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ - const maxMarkerBits = 30; let activeEffect; - const ITERATE_KEY = Symbol('iterate' ); - const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } - function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; + function triggerComputed(computed) { + return computed.value; + } + function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; + } + function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } + } + function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; + let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } - function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } + function pauseScheduling() { + pauseScheduleStack++; } - function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } + function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } - function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; + function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } + } + const queueEffectSchedulers = []; + function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } - function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - } - function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } + function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } - const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); + const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; + }; + + const targetMap = /* @__PURE__ */ new WeakMap(); + const ITERATE_KEY = Symbol("iterate" ); + const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); + function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } + } + function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); + } + function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); + } + + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( - /*#__PURE__*/ - Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); - const get = /*#__PURE__*/ createGetter(); - const shallowGet = /*#__PURE__*/ createGetter(false, true); - const readonlyGet = /*#__PURE__*/ createGetter(true); - const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); - const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) + ); + const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; - } - function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; - } - const set = /*#__PURE__*/ createSetter(); - const shallowSet = /*#__PURE__*/ createSetter(true); - function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } - function deleteProperty(target, key) { + function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); + } + class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + } + class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; - } - function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; - } - function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } - const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys - }; - const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; + class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } - }; - const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet - }); - // Props handlers are special in the sense that it should not unwrap top-level - // refs (in order to allow refs to be explicitly passed down), but should - // retain the reactivity of the normal readonly object. - const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet - }); + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + } + const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); + const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true + ); + const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); - function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); + function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } - function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); + function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } - function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; + function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } - const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); + const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations + ] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; - function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } + function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } - const reactiveMap = new WeakMap(); - const shallowReactiveMap = new WeakMap(); - const readonlyMap = new WeakMap(); - const shallowReadonlyMap = new WeakMap(); + const reactiveMap = /* @__PURE__ */ new WeakMap(); + const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + const readonlyMap = /* @__PURE__ */ new WeakMap(); + const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } - /** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } - /** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } - /** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } - function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; - function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } + class ComputedRefImpl { + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); + } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } - function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } + function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; + } + + function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } + } + function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } } function isRef(r) { - return !!(r && r.__v_isRef === true); + return !!(r && r.__v_isRef === true); } function ref(value) { - return createRef(value, false); + return createRef(value, false); } function shallowRef(value) { - return createRef(value, true); + return createRef(value, true); } function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); } class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); } + } } - function triggerRef(ref) { - triggerRefValue(ref, ref.value ); + function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); } - function unref(ref) { - return isRef(ref) ? ref.value : ref; + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + function toValue(source) { + return isFunction(source) ? source() : unref(source); } const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); } + } }; function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); } class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } } function customRef(factory) { - return new CustomRefImpl(factory); + return new CustomRefImpl(factory); } function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; } class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } } - function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); + class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } + } + function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } + } + function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); } - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; - } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); - } - } - function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; - } + const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" + }; + const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" + }; - const stack = []; + const stack$1 = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack$1.push(vnode); } function popWarningContext() { - stack.pop(); + stack$1.pop(); } function warn$1(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); + pauseTracking(); + const instance = stack$1.length ? stack$1[stack$1.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack$1[stack$1.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } - /* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } - /* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } - /* istanbul ignore next */ function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } + } + function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } } - const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' + const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" + }; + const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; - const pendingPreFlushCbs = []; - let activePreFlushCbs = null; - let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; - const resolvedPromise = /*#__PURE__*/ Promise.resolve(); + const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; - let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } - // #2768 - // Use binary-search to find a suitable position in the queue, - // so that the queue maintains the increasing order of job's id, - // which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } - } - function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } - } - function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } - } - function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } - function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); + function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } + } + function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); - } - function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - { - seen = seen || new Map(); - } - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) { - continue; - } - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); + } + function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; + const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; + }; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - { - seen = seen || new Map(); - } - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = (job) => checkRecursiveUpdates(seen, job) - ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (true && check(job)) { - continue; - } - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; } + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); } + } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } - else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`); - return true; - } - else { - seen.set(fn, count + 1); - } + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); } + } } - /* eslint-disable no-restricted-globals */ let isHmrUpdating = false; - const hmrDirtyComponents = new Set(); - // Expose the HMR runtime on the global object - // This makes it entirely tree-shakable without polluting the exports and makes - // it easier to be used in toolings like vue-loader - // Note: for a component to be eligible for HMR it also needs the __hmrId option - // to be set so that its instances can be registered / removed. + const hmrDirtyComponents = /* @__PURE__ */ new Set(); { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; } - const map = new Map(); + const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); } function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); + map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: new Set() - }); - return true; + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; } function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; + return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; } - // update initial record (for not-yet-rendered component) - record.initialDef.render = newRender; - [...record.instances].forEach(instance => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - // this flag forces child components with slot content to update - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); } function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - // update initial def (for not-yet-rendered components) - updateComponentDef(record.initialDef, newComp); - // create a snapshot which avoids the set being mutated during updates - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - // 1. Update existing comp definition to match new one - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - // 2. mark definition dirty. This forces the renderer to replace the - // component on patch. - hmrDirtyComponents.add(oldComp); - } - // 3. invalidate options resolution cache - instance.appContext.optionsCache.delete(instance.type); - // 4. actually update - if (instance.ceReload) { - // custom element - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } - else if (instance.parent) { - // 4. Force the parent instance to re-render. This will cause all updated - // components to be unmounted and re-mounted. Queue the update so that we - // don't end up forcing the same parent to re-render multiple times. - queueJob(instance.parent.update); - // instance is the inner component of an async custom element - // invoke to reset styles - if (instance.parent.type.__asyncLoader && - instance.parent.ceReload) { - instance.parent.ceReload(newComp.styles); - } - } - else if (instance.appContext.reload) { - // root instance mounted via createApp() has a reload method - instance.appContext.reload(); - } - else if (typeof window !== 'undefined') { - // root instance inside tree created via raw render(). Force reload. - window.location.reload(); - } - else { - console.warn('[HMR] Root or manually mounted instance modified. Full reload required.'); - } + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); } - // 5. make sure to cleanup dirty hmr components after update - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); - } - }); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); } function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== '__file' && !(key in newComp)) { - delete oldComp[key]; - } + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; } + } } function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } - catch (e) { - console.error(e); - console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` + - `Full reload required.`); - } - }; + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; } + let devtools$1; let buffer = []; let devtoolsNotInstalled = false; - function emit(event, ...args) { - if (exports.devtools) { - exports.devtools.emit(event, ...args); - } - else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } + function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } } - function setDevtoolsHook(hook, target) { - var _a, _b; - exports.devtools = hook; - if (exports.devtools) { - exports.devtools.enabled = true; - buffer.forEach(({ event, args }) => exports.devtools.emit(event, ...args)); - buffer = []; - } - else if ( + function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( // handle late devtools injection - only do this if we are in an actual // browser environment to avoid the timer handle stalling test runner exit // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!exports.devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3000); - } - else { - // non-browser env, assume not installed + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; - } + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } } function devtoolsInitApp(app, version) { - emit("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); } function devtoolsUnmountApp(app) { - emit("app:unmount" /* APP_UNMOUNT */, app); + emit$1("app:unmount" /* APP_UNMOUNT */, app); } - const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); - const devtoolsComponentUpdated = - /*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); - const devtoolsComponentRemoved = - /*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */); + const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ + ); + const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); + const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ + ); + const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } + }; function createDevtoolsComponentHook(hook) { - return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component); - }; + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; } - const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); - const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); + const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ + ); + const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ + ); function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); - }; + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params); + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); } - function emit$1(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { emitsOptions, propsOptions: [propsOptions] } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && - !(false )) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1(`Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "${toHandlerKey(event)}" prop.`); - } - } - else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1(`Invalid event arguments: event validation failed for event "${event}".`); - } - } - } + function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); } - } - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(toNumber); + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } } + } } - { - devtoolsComponentEmit(instance, event, args); + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1(`Event "${lowerCaseEvent}" is emitted in component ` + - `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` + - `Note that HTML attributes are case-insensitive and you cannot use ` + - `v-on to listen to camelCase events when using in-DOM templates. ` + - `You should probably use "${hyphenate(event)}" instead of "${event}".`); - } + if (number) { + args = rawArgs.map(looseToNumber); } - let handlerName; - let handler = props[(handlerName = toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = toHandlerKey(camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = toHandlerKey(hyphenate(event)))]; + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } - // Check if an incoming prop key is a declared emit event listener. - // e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are - // both considered matched listeners. function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - hasOwn(options, hyphenate(key)) || - hasOwn(options, key)); + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } - /** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; - /** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } - /** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } - /** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } - /** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; - /** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ - function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only - ) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; + function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } - /** - * dev only flag to track whether $attrs was used during render. - * If $attrs was used during render then the warning for failed attrs - * fallthrough can be suppressed. - */ let accessedAttrs = false; function markAttrsAccessed() { - accessedAttrs = true; + accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if (true && attrs === props) { - markAttrsAccessed(); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } - result = normalizeVNode(render.length > 1 - ? render(props, true - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + } else { + extraAttrs.push(key); + } } - } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - let setRoot = undefined; - if (result.patchFlag > 0 && - result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - // ignore v-model handlers when they fail to fallthrough - if (!isModelListener(key)) { - // remove `on`, lowercase first letter to reflect event casing - // accurately - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } - else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1(`Extraneous non-props attributes (` + - `${extraAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes.`); - } - if (eventAttrs.length) { - warn$1(`Extraneous non-emits event listeners (` + - `${eventAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes. ` + - `If the listener is intended to be a component custom event listener only, ` + - `declare it using the "emits" option.`); - } - } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); } - } - // inherit directives - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1(`Runtime directive used on component with non-element root node. ` + - `The directives will not function as intended.`); + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); } - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } } - // inherit transition data - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1(`Component inside <Transition> renders non-element root node ` + - `that cannot be animated.`); - } - root.transition = vnode.transition; + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); } - if (setRoot) { - setRoot(root); + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); } - else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } - /** - * dev only - * In dev mode, template root level comments are rendered, which turns the - * template into a fragment root, but we need to locate the single element - * root for attrs and scope id processing. - */ const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, undefined]; + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } - else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; + }; + return [normalizeVNode(childRoot), setRoot]; }; - function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; + function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; const isElementRoot = (vnode) => { - return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) || - vnode.type === Comment // potential v-if branch switch - ); + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // Parent component's render function was hot-updated. Since this may have - // caused the child component's slots content to have changed, we need to - // force the child to update as well. - if ((prevChildren || nextChildren) && isHmrUpdating) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { - return true; + if (prevProps === nextProps) { + return false; } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (!prevProps) { + return !!nextProps; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!nextProps) { + return true; } - return false; + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } - function updateHOCHostEl({ vnode, parent }, el // HostNode - ) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; + function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } + } + + const COMPONENTS = "components"; + const DIRECTIVES = "directives"; + function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; + } + const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } + } + function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); + } + function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } + } + function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } const isSuspense = (type) => type.__isSuspense; - // Suspense exposes a component-like API, and is treated like a component - // in the compiler, but internally it's a special built-in type that hooks - // directly into the renderer. + let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren }; - // Force-casted public typing for h and TSX props inference - const Suspense = (SuspenseImpl ); + const Suspense = SuspenseImpl ; function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } } - function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. + function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } + } + function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } } - } - function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); } + } } + } } let hasWarned = false; - function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - /* istanbul ignore if */ - if (!hasWarned) { - hasWarned = true; - // @ts-ignore `console.info` cannot be null error - console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`); + function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; } - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error(`suspense.resolve() is called without a pending branch.`); - } - if (suspense.isUnmounted) { - throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`); - } - } - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - { - pushWarningContext(vnode); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - { - popWarningContext(); - } - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); } - }; - return suspense; - } - function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } } - return result; - /* eslint-enable no-restricted-globals */ + }; + return suspense; + } + function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); } - return s; + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } + } + function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } - function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } - } - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } - } - function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else { - warn$1(`injection "${String(key)}" not found.`); - } - } - else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } - } + const ssrContextKey = Symbol.for("v-scx"); + const useSSRContext = () => { + { + warn$1(`useSSRContext() is not supported in the global build.`); + } + }; - // Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); } - // initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; - // implementation function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` + - `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` + - `supports \`watch(source, cb, options?) signature.`); - } - return doWatch(source, cb, options); + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); } - function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - if (!cb) { - if (immediate !== undefined) { - warn$1(`watch() "immediate" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - if (deep !== undefined) { - warn$1(`watch() "deep" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - } - const warnInvalidSource = (s) => { - warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.`); + function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger + } = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isReactive(source)) { - getter = () => source; - deep = true; + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => isReactive(s) || isShallow(s)); - getter = () => source.map(s => { - if (isRef(s)) { - return s.value; - } - else if (isReactive(s)) { - return traverse(s); - } - else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else { - warnInvalidSource(s); - } - }); + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; - }; - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => hasChanged(v, oldValue[i])) - : hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new ReactiveEffect(getter, scheduler); - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - // initial run + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect); - } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + return unwatch; } - // this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } - function traverse(value, seen) { - if (!isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } + function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } + function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } + } + function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; + } + function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } + } + + const leaveCbKey = Symbol("_leaveCb"); + const enterCbKey$1 = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; - const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - // warn more than one non-comment child - warn$1('<transition> can only be used on a single element or component. ' + - 'Use <transition-group> for lists.'); - break; - } - child = c; - hasFound = true; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = toRaw(props); - const { mode } = rawProps; - // check mode - if (mode && - mode !== 'in-out' && - mode !== 'out-in' && - mode !== 'default') { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } + const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator + }; + const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; - // export the public type for h/tsx inference - // also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } - // The transition hooks are attached to the vnode as vnode.transition - // and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; - } - // the placeholder really only handles one special case: KeepAlive - // in the case of a KeepAlive in a leave phase we need to return a KeepAlive - // placeholder with empty content to avoid the KeepAlive instance from being - // unmounted. - function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; + } + function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } - // implementation, close to no-op - function defineComponent(options) { - return isFunction(options) ? { setup: options, name: options.name } : options; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1(`Async component loader resolved to undefined. ` + - `If you are using retry(), make sure to return its return value.`); - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (false )) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } - function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; + function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - const cache = new Map(); - const keys = new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; - // export the public type for h/tsx inference - // also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; - } - else { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')); - warn$1(`${apiName} is called when there is no active component instance to be ` + - `associated with. ` + - `Lifecycle injection APIs can only be used during execution of setup().` + - (` If you are using async setup(), make sure to register lifecycle ` + - `hooks before the first await statement.` - )); + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } } - const createHook = (lifecycle) => (hook, target = currentInstance) => - // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) - (!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); - const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); - const onMounted = createHook("m" /* MOUNTED */); - const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); - const onUpdated = createHook("u" /* UPDATED */); - const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); - const onUnmounted = createHook("um" /* UNMOUNTED */); - const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); - const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); - const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); + const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) + ); + const onBeforeMount = createHook("bm"); + const onMounted = createHook("m"); + const onBeforeUpdate = createHook("bu"); + const onUpdated = createHook("u"); + const onBeforeUnmount = createHook("bum"); + const onUnmounted = createHook("um"); + const onServerPrefetch = createHook("sp"); + const onRenderTriggered = createHook( + "rtg" + ); + const onRenderTracked = createHook( + "rtc" + ); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } - /** - Runtime helper for applying directives to a vnode. Example usage: - - const comp = resolveComponent('comp') - const foo = resolveDirective('foo') - const bar = resolveDirective('bar') - - return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] - ]) - */ - function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1('Do not use built-in directive ids as custom directive id: ' + name); - } - } - /** - * Adds directives to a VNode. - */ - function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; - } - function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } - } - - const COMPONENTS = 'components'; - const DIRECTIVES = 'directives'; - /** - * @private - */ - function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; - } - const NULL_DYNAMIC_COMPONENT = Symbol(); - /** - * @private - */ - function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } - } - /** - * @private - */ - function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); - } - // implementation - function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === camelize(name) || - selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS - ? `\nIf this is a native custom element, make sure to exclude it from ` + - `component resolution via compilerOptions.isCustomElement.` - : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } - else { - warn$1(`resolve${capitalize(type.slice(0, -1))} ` + - `can only be used in render() or setup().`); - } - } - function resolve(registry, name) { - return (registry && - (registry[name] || - registry[camelize(name)] || - registry[capitalize(camelize(name))])); - } - - /** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); } - else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else { - ret = []; + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } - /** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } - /** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ - function renderSlot(slots, name, props = {}, - // this is not a user-facing function, so the fallback is always generated by - // the compiler and guaranteed to be a function returning an array - fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` + - `function. You need to mark this component with $dynamic-slots in the ` + - `parent template.`); - slot = () => []; - } - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; + function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } - /** - * For prefixing keys in v-on="obj" with "on" - * @private - */ - function toHandlers(obj) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[toHandlerKey(key)] = obj[key]; - } + function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; } - /** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; - const publicPropertiesMap = - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /*#__PURE__*/ extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => (shallowReadonly(i.props) ), - $attrs: i => (shallowReadonly(i.attrs) ), - $slots: i => (shallowReadonly(i.slots) ), - $refs: i => (shallowReadonly(i.refs) ), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (resolveMergedOptions(i) ), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (instanceWatch.bind(i) ) - }); - const isReservedPrefix = (key) => key === '_' || key === '$'; + const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) + ); + const isReservedPrefix = (key) => key === "_" || key === "$"; + const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // for internal formatters to know that this is a Vue instance - if (key === '__isVue') { - return true; - } - // prioritize <script setup> bindings during dev. - // this allows even properties that start with _ or $ to be used - so that - // it aligns with the production behavior where the render fn is inlined and - // indeed has access to all declared variables. - if (setupState !== EMPTY_OBJ && - setupState.__isScriptSetup && - hasOwn(setupState, key)) { - return setupState[key]; - } - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - track(instance, "get" /* GET */, key); - markAttrsAccessed(); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else if (currentRenderingInstance && - (!isString(key) || - // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf('__v') !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` + - `character ("$" or "_") and is not proxied on the render context.`); - } - else if (instance === currentRenderingInstance) { - warn$1(`Property ${JSON.stringify(key)} was accessed during render ` + - `but is not defined on instance.`); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance); - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - warn$1(`Attempting to mutate public property "${key}". ` + - `Properties starting with $ are reserved and readonly.`, instance); - return false; - } - else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } - else { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== EMPTY_OBJ && hasOwn(data, key)) || - (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) || - hasOwn(ctx, key) || - hasOwn(publicPropertiesMap, key) || - hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } }; { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` + - `The keys will be empty in production mode to avoid performance overhead.`); - return Reflect.ownKeys(target); - }; + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; } - const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, PublicInstanceProxyHandlers, { + const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend( + {}, + PublicInstanceProxyHandlers, + { get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !isGloballyWhitelisted(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`); - } - return has; + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } - }); - // dev only - // In dev mode, the proxy target exposes the same properties as seen on `this` - // for easier console inspection. In prod mode it will be an empty object so - // these properties definitions can be skipped. + } + ); function createDevRenderContext(instance) { - const target = {}; - // expose internal instance for proxy handlers - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP }); - // expose public properties - Object.keys(publicPropertiesMap).forEach(key => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; + }); + return target; } - // dev only function exposePropsOnRenderContext(instance) { - const { ctx, propsOptions: [propsOptions] } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach(key => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } - } - // dev only - function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach(key => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` + - `which are reserved prefixes for Vue internals.`); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); }); + } + } + function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); + } + + const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` + ); + function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; + } + function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; + } + function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } + } + function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } + } + function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; + } + function defineModel() { + { + warnRuntimeUsage("defineModel"); + } + } + function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; + } + function useSlots() { + return getContext().slots; + } + function useAttrs() { + return getContext().attrs; + } + function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); + } + function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; + } + function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; + } + function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (isArray(a) && isArray(b)) + return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); + } + function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; + } + function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; } function createDuplicateChecker() { - const cache = Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } - else { - cache[key] = type; - } - }; + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; } let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } } - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } - else { - warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` + - `Did you reference the function correctly?`); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1(`The data option must be a function. ` + - `Plain object usage is no longer supported.`); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1(`data() returned a Promise - note data() cannot be async; If you ` + - `intend to perform data fetching before component renders, use ` + - `async setup() + <Suspense>.`); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } - else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - // expose data on ctx during dev - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) - ? opt.bind(publicThis, publicThis) - : isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) - ? opt.set.bind(publicThis) - : () => { - warn$1(`Write operation failed: computed property "${key}" is readonly.`); - } - ; - const c = computed$1({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; - } - function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - { - warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` + - `and no longer needs \`.value\` in the next minor release. ` + - `To opt-in to the new behavior now, ` + - `set \`app.config.unwrapInjectedRef = true\` (this config is ` + - `temporary and will not be needed in the future.)`); - } - ctx[key] = injected; - } - } - else { - ctx[key] = injected; + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); } { - checkDuplicateProperties("Inject" /* INJECT */, key); + checkDuplicateProperties("Methods" /* METHODS */, key); } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; } - function callHook(hook, instance, type) { - callWithAsyncErrorHandling(isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); + function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } + } + function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - watch(getter, handler); - } - else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + watch(getter, handler); + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } - else if (isFunction(raw)) { - watch(getter, raw.bind(publicThis)); - } - else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } - else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } - else { - warn$1(`Invalid watch option: "${key}"`, raw); + } else if (isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } } - /** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') { - warn$1(`"expose" option is ignored when declared in mixins or extends. ` + - `It should only be declared in the base component itself.`); - } - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray$1, + created: mergeAsArray$1, + beforeMount: mergeAsArray$1, + mounted: mergeAsArray$1, + beforeUpdate: mergeAsArray$1, + updated: mergeAsArray$1, + beforeDestroy: mergeAsArray$1, + beforeUnmount: mergeAsArray$1, + destroyed: mergeAsArray$1, + unmounted: mergeAsArray$1, + activated: mergeAsArray$1, + deactivated: mergeAsArray$1, + errorCaptured: mergeAsArray$1, + serverPrefetch: mergeAsArray$1, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } - function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; + function mergeAsArray$1(to, from) { + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend(extend(Object.create(null), to), from) : from; + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; + } + function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray$1(to[key], from[key]); + } + return merged; } - function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison - isSSR = false) { - const props = {}; - const attrs = {}; - def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; - } + function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; + } + let uid$1 = 0; + function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); } - // validation + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; + } + let currentApp = null; + + function provide(key, value) { + if (!currentInstance) { { - validateProps(rawProps || {}, props, instance); + warn$1(`provide() can only be used inside setup().`); } - if (isStateful) { - // stateful - instance.props = isSSR ? props : shallowReactive(props); + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; - } - else { - // functional w/ declared props - instance.props = props; - } + provides[key] = value; + } + } + function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); } - instance.attrs = attrs; + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } + } + function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); + } + + function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; + } + function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !((instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId))) && - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - trigger(instance, "set" /* SET */, '$attrs'); - } - { - validateProps(rawProps || {}, props, instance); - } + } + if (hasAttrsChanged) { + trigger(instance, "set", "$attrs"); + } + { + validateProps(rawProps || {}, props, instance); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && hasOwn(options, (camelKey = camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, EMPTY_ARR); - return EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); } - else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - isArray(opt) || isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } } - const res = [normalized, needCastKeys]; + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; + if (key[0] !== "$") { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; } - // use function string name to check type constructors - // so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } - /** - * dev only - */ function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - for (const key in options) { - let opt = options[key]; - if (opt == null) - continue; - validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))); - } + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)) + ); + } } - /** - * dev only - */ - function validateProp(name, value, prop, isAbsent) { - const { type, required, validator } = prop; - // required! - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; + function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; } - // missing but optional - if (value == null && !prop.required) { - return; - } - // type check - if (type != null && type !== true) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - // value is valid as long as one of the specified types match - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ''); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - // custom validator - if (validator && !validator(value)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } } - const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt'); - /** - * dev only - */ + const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" + ); function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; } - else if (expectedType === 'Object') { - valid = isObject(value); - } - else if (expectedType === 'Array') { - valid = isArray(value); - } - else if (expectedType === 'null') { - valid = value === null; - } - else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; } - /** - * dev only - */ function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid prop: type check failed for prop "${name}".` + - ` Expected ${expectedTypes.map(capitalize).join(' | ')}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; } - /** - * dev only - */ function styleValue(value, type) { - if (type === 'String') { - return `"${value}"`; - } - else if (type === 'Number') { - return `${Number(value)}`; - } - else { - return `${value}`; - } + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } } - /** - * dev only - */ function isExplicable(type) { - const explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(elem => type.toLowerCase() === elem); + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); } - /** - * dev only - */ function isBoolean(...args) { - return args.some(elem => elem.toLowerCase() === 'boolean'); + return args.some((elem) => elem.toLowerCase() === "boolean"); } - const isInternalKey = (key) => key[0] === '_' || key === '$stable'; - const normalizeSlotValue = (value) => isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; + const isInternalKey = (key) => key[0] === "_" || key === "$stable"; + const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); } - const normalized = withCtx((...args) => { - if (currentInstance) { - warn$1(`Slot "${key}" invoked outside of the render function: ` + - `this will not track dependencies used in the slot. ` + - `Invoke the slot function inside the render function instead.`); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - { - warn$1(`Non-function value encountered for slot "${key}". ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && - !(false )) { - warn$1(`Non-function value encountered for default slot. ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = toRaw(children); - // make compiler marker non-enumerable - def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = toRaw(children); + def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - def(instance.slots, InternalObjectKey, 1); + } + def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if (isHmrUpdating) { - // Parent was HMR updated so slot content may have changed. - // force update slots and mark instance for hmr as well - extend(slots, children); - } - else if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + extend(slots, children); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; - function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; - } - let uid = 0; - function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = Object.assign({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1(`app.config cannot be replaced. Modify individual options instead.`); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } - else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else { - warn$1(`A plugin must either be a function or an object with an "install" ` + - `function.`); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - else { - warn$1('Mixin has already been applied to target app' + - (mixin.name ? `: ${mixin.name}` : '')); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - // #5571 - if (rootContainer.__vue_app__) { - warn$1(`There is already an app instance mounted on the host container.\n` + - ` If you want to mount another app on the same host container,` + - ` you need to unmount the previous app by calling \`app.unmount()\` first.`); - } - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - // HMR root reload - { - context.reload = () => { - render(cloneVNode(vnode), rootContainer, isSVG); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - else { - warn$1(`App has already been mounted.\n` + - `If you want to remount the same app, move your app creation logic ` + - `into a factory function and create fresh app instances for each ` + - `mount - e.g. \`const createMyApp = () => createApp(App)\``); - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } - else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1(`App already provides property with key "${String(key)}". ` + - `It will be overwritten with the new value.`); - } - context.provides[key] = value; - return app; - } - }); - return app; - }; - } - - /** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + - `A vnode with ref must be created inside the render function.`); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } + } + } else if (_isString) { + refs[ref] = value; + if (hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } - else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } - else if (_isString) { - refs[ref] = value; - if (hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } - else { - doSet(); - } - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } + } } let hasMismatch = false; - const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; + const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; + const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); + const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; + }; const isComment = (node) => node.nodeType === 8 /* COMMENT */; - // Note: hydration is DOM-specific - // But we have to place it in core due to tight coupling with core - splitting - // it out creates a ton of unnecessary complexity. - // Hydration also depends on some renderer internal logic which needs to be - // passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1(`Attempting to hydrate existing markup but container is empty. ` + - `Performing full mount instead.`); - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text mismatch:` + - `\n- Client: ${JSON.stringify(node.data)}` + - `\n- Server: ${JSON.stringify(vnode.children)}`); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else { - warn$1('Invalid HostVNode type:', type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (isOn(key) && !isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + if (!("__vnode" in node)) { + Object.defineProperty(node, "__vnode", { + value: vnode, + enumerable: false + }); + } + if (!("__vueParentComponent" in node)) { + Object.defineProperty(node, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + hasMismatch = true; + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + el.textContent = vnode.children; + } + } + if (props) { + { + for (const key in props) { + if (propHasMismatch(el, key, props[key], vnode)) { + hasMismatch = true; + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - return node; - }; - return [hydrate, hydrateNode]; + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; + } + function propHasMismatch(el, key, clientValue, vnode) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style"); + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = `attribute`; + mismatchKey = key; + } + } + if (mismatchType) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${mismatchType} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; + } + function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); + } + function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; + } + function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key == null ? void 0 : key.trim(); + value = value == null ? void 0 : value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; + } + function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; } - /* eslint-disable no-restricted-globals */ let supported; let perf; function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } } function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } } function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } + if (supported !== void 0) { return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; } - const queuePostRenderEffect = queueEffectWithSuspense - ; - /** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ + const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } - // Separate API for creating hydration-enabled renderer. - // Hydration logic is only used when calling this function, making it - // tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } - // implementation function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else { - warn$1('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); } + } } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); } - else { - // there's no support for dynamic comments - n2.el = n1.el; + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); + } + for (const key in newProps) { + if (isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); } - { - Object.defineProperty(el, '__vnode', { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, '__vueParentComponent', { - value: parentComponent, - enumerable: false - }); + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && - subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - subTree = - filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - // HMR updated, force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (// #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) { - // HMR updated / Dev root fragment (w/ comments), force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { { - startMeasure(instance, `init`); + startMeasure(instance, `render`); } - setupComponent(instance); + instance.subTree = renderComponentRoot(instance); { - endMeasure(instance, `init`); + endMeasure(instance, `render`); } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); return; + } } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); + let originNext = next; + let vnodeHook; { - popWarningContext(); - endMeasure(instance, `mount`); + pushWarningContext(next || instance.vnode); } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - // async & still pending - just update props and slots - // since the component's reactive effect for render isn't set-up yet - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - { - startMeasure(instance, `render`); - } - const subTree = (instance.subTree = renderComponentRoot(instance)); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - // render - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates toggleRecurse(instance, true); { - effect.onTrack = instance.rtc - ? e => invokeArrayFns(instance.rtc, e) - : void 0; - effect.onTrigger = instance.rtg - ? e => invokeArrayFns(instance.rtg, e) - : void 0; - update.ownerInstance = instance; + startMeasure(instance, `render`); } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); + if (u) { + queuePostRenderEffect(u, parentSuspense); } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); - } - }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && - vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ && - transition && - !transition.persisted) { - vnode.children.forEach(child => { - if (child.type === Comment) { - hostRemove(child.el); - } - else { - remove(child); - } - }); - } - else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); } { - devtoolsComponentRemoved(instance); + devtoolsComponentUpdated(instance); } + { + popWarningContext(); + } + } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } + const effect = instance.effect = new ReactiveEffect( + componentUpdateFn, + NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + update.id = instance.uid; + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; + } + function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; + } + function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } - /** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } - // also inherit for comment nodes, but not placeholders (e.g. v-if which - // would have received .el during block patch) - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } } + } } - // https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; + } + function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; - const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); - const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; + const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); + const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; + const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1(`Current renderer does not support string target for Teleports. ` + - `(missing querySelector renderer option)`); - return null; - } - else { - const target = select(targetSelector); - if (!target) { - warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` + - `Note the target element must exist before the component is mounted - ` + - `i.e. the target cannot be rendered by the component itself, and ` + - `ideally should be outside of the entire Vue component tree.`); - } - return target; - } + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; } - else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); } + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - // #3302 - // HMR updated, force full diff - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = createComment('teleport start') - ); - const mainAnchor = (n2.anchor = createComment('teleport end') - ); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - else if (!disabled) { - warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } - } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - else { - warn$1('Invalid Teleport target on update:', target, `(${typeof target})`); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } - } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport - }; - function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } + } else if (!disabled) { + warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } - } - function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport + }; + function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } + } + function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } + }, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } - // Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; + function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } + } - const Fragment = Symbol('Fragment' ); - const Text = Symbol('Text' ); - const Comment = Symbol('Comment' ); - const Static = Symbol('Static' ); - // Since v-if and v-for are the two possible ways node structure can dynamically - // change, once we consider v-if branches and each v-for fragment a block, we - // can divide a template into nested blocks, and within each block the node - // structure would be stable. This allows us to skip most children diffing - // and only worry about the dynamic nodes (indicated by patch flags). + const Fragment = Symbol.for("v-fgt"); + const Text = Symbol.for("v-txt"); + const Comment = Symbol.for("v-cmt"); + const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; - /** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } - // Whether we should be tracking dynamic child nodes inside a block. - // Only tracks when this value is > 0 - // We are not using a simple boolean because this value may need to be - // incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; - /** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } - /** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } - /** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 /* COMPONENT */ && - hmrDirtyComponents.has(n2.type)) { - // HMR only: if the component has been hot-updated, force a reload. - return false; - } - return n1.type === n2.type && n1.key === n2.key; + if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; } let vnodeArgsTransformer; - /** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; + vnodeArgsTransformer = transformer; } const createVNodeWithArgsTransform = (...args) => { - return _createVNode(...(vnodeArgsTransformer - ? vnodeArgsTransformer(args, currentRenderingInstance) - : args)); + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); }; const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; - const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? isString(ref) || isRef(ref) || isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); + const normalizeRef = ({ + ref, + ref_key, + ref_for + }) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; - function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } + function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // validate key - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } - const createVNode = (createVNodeWithArgsTransform ); + const createVNode = createVNodeWithArgsTransform ; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); } - // encode the vnode type information into a bitmap - const shapeFlag = isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) { - type = toRaw(type); - warn$1(`Vue received a Component which was made a reactive object. This can ` + - `lead to unnecessary performance overhead, and should be avoided by ` + - `marking the component with \`markRaw\` or using \`shallowRef\` ` + - `instead of \`ref\`.`, `\nComponent that was made reactive: `, type); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); } - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return isProxy(props) || InternalObjectKey in props - ? extend({}, props) - : props; + if (!props) + return null; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 /* HOISTED */ && isArray(children) - ? children.map(deepCloneVNode) - : children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } - /** - * Dev only, for HMR of hoisted vnodes reused in v-for - * https://github.com/vitejs/vite/issues/2022 - */ function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; } - /** - * @private - */ - function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); + function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } - /** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } - /** - * @private - */ - function createCommentVNode(text = '', - // when used as the v-else branch, the comment node must be created as a - // block to ensure correct updates. - asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); + function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } - // optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } - else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); - let uid$1 = 0; + let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; + let internalSetCurrentInstance; + let setInSSRSetupState; + { + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; + } const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; - const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component'); + const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); function validateComponentName(name, config) { - const appIsNativeTag = config.isNativeTag || NO; - if (isBuiltInTag(name) || appIsNativeTag(name)) { - warn$1('Do not use built-in or reserved HTML elements as component id: ' + name); - } + const appIsNativeTag = config.isNativeTag || NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } } function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1(`"compilerOptions" is only supported when using a build of Vue that ` + - `includes the runtime compiler. Since you are using a runtime-only ` + - `build, the options should be passed via your build tool config instead.`); - } + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); } - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - { - exposePropsOnRenderContext(instance); + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } } - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]); - resetTracking(); - unsetCurrentInstance(); - if (isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous'; - warn$1(`Component <${name}>: setup function returned a promise, but no ` + - `<Suspense> boundary was found in the parent component tree. ` + - `A component with async setup() must be nested in a <Suspense> ` + - `in order to be rendered.`); - } - } - } - else { - handleSetupResult(instance, setupResult, isSSR); + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + resetTracking(); + reset(); + if (isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); } + } + } else { + handleSetupResult(instance, setupResult, isSSR); } - else { - finishComponentSetup(instance, isSSR); - } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - // setup returned an inline render function - { - instance.render = setupResult; - } - } - else if (isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1(`setup() should not return VNodes directly - ` + - `return a render function instead.`); - } - // setup returned bindings. - // assuming a render function compiled from template is present. - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } - } - else if (setupResult !== undefined) { - warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`); - } - finishComponentSetup(instance, isSSR); - } - let compile; - let installWithProxy; - /** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ - function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; - } - // dev only - const isRuntimeOnly = () => !compile; - function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend(extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } - } - instance.render = (Component.render || NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); - } - } - // support for 2.x options + if (isFunction(setupResult)) { { - setCurrentInstance(instance); - pauseTracking(); - applyOptions(instance); - resetTracking(); - unsetCurrentInstance(); + instance.render = setupResult; } - // warn missing template/render - // the runtime compilation of template in SSR is done by server-render - if (!Component.render && instance.render === NOOP && !isSSR) { - /* istanbul ignore if */ - if (!compile && Component.template) { - warn$1(`Component provided template option but ` + - `runtime compilation is not supported in this build of Vue.` + - (` Use "vue.global.js" instead.` - ) /* should not happen */); - } - else { - warn$1(`Component is missing template or render function.`); - } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); } - function createAttrsProxy(instance) { - return new Proxy(instance.attrs, { - get(target, key) { - markAttrsAccessed(); - track(instance, "get" /* GET */, '$attrs'); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } + let compile$1; + let installWithProxy; + function registerRuntimeCompiler(_compile) { + compile$1 = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; + } + const isRuntimeOnly = () => !compile$1; + function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile$1 && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions ); + Component.render = compile$1(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile$1 && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } + } + function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + markAttrsAccessed(); + track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } + )); + } + function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + })); } function createSetupContext(instance) { - const expose = exposed => { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - instance.exposed = exposed || {}; - }; - let attrs; + const expose = (exposed) => { { - // We use getters in dev in case libs like test-utils overwrite instance - // properties (overwrites should not be done in prod) - return Object.freeze({ - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - get slots() { - return shallowReadonly(instance.slots); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } } + instance.exposed = exposed || {}; + }; + { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } } const classifyRE = /(?:^|[-_])(\w)/g; - const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); - function getComponentName(Component) { - return isFunction(Component) - ? Component.displayName || Component.name - : Component.name; + const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); + function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } - /* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { - return isFunction(value) && '__vccOpts' in value; + return isFunction(value) && "__vccOpts" in value; } - const computed$1 = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return computed(getterOrOptions, debugOptions, isInSSRComponentSetup); - }); - - // dev only - const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` + - `<script setup> of a single file component. Its arguments should be ` + - `compiled away and passing it at runtime has no effect.`); - // implementation - function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; - } - // implementation - function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; - } - /** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ - function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } - } - /** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ - function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; - } - function useSlots() { - return getContext().slots; - } - function useAttrs() { - return getContext().attrs; - } - function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); - } - /** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ - function mergeDefaults(raw, defaults) { - const props = isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - } - return props; - } - /** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ - function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; - } - /** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ - function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1(`withAsyncContext called without active current instance. ` + - `This is likely a bug.`); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; - } - - // Actual implementation - function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } - } - - const ssrContextKey = Symbol(`ssrContext` ); - const useSSRContext = () => { - { - warn$1(`useSSRContext() is not supported in the global build.`); - } + const computed = (getterOrOptions, debugOptions) => { + return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); }; - function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - if (typeof window === 'undefined') { - return; - } - const vueStyle = { style: 'color:#3ba776' }; - const numberStyle = { style: 'color:#0b1bc9' }; - const stringStyle = { style: 'color:#b62e24' }; - const keywordStyle = { style: 'color:#9d288c' }; - // custom formatter for Chrome - // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html - const formatter = { - header(obj) { - // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ['div', vueStyle, `VueInstance`]; - } - else if (isRef(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, genRefFlag(obj)], - '<', - formatValue(obj.value), - `>` - ]; - } - else if (isReactive(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'], - '<', - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } - else if (isReadonly(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'], - '<', - formatValue(obj), - '>' - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - 'div', - {}, - ...formatInstance(obj.$) - ]; - } + function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + if (!i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const camelizedName = camelize(name); + const hyphenatedName = hyphenate(name); + const res = customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) { + localValue = value; + trigger(); } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock('props', toRaw(instance.props))); + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('setup', instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('data', toRaw(instance.data))); - } - const computed = extractKeys(instance, 'computed'); - if (computed) { - blocks.push(createInstanceBlock('computed', computed)); - } - const injected = extractKeys(instance, 'inject'); - if (injected) { - blocks.push(createInstanceBlock('injected', injected)); - } - blocks.push([ - 'div', - {}, - [ - 'span', - { - style: keywordStyle.style + ';opacity:0.66' - }, - '$ (internal): ' - ], - ['object', { object: instance }] - ]); - return blocks; + } + }; + }; + return res; + } + + function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ['span', {}]; - } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } + } + + function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { return [ - 'div', - { style: 'line-height:1.25em;margin-bottom:0.6em' }, - [ - 'div', - { - style: 'color:#476582' - }, - type - ], - [ - 'div', - { - style: 'padding-left:1.25em' - }, - ...Object.keys(target).map(key => { - return [ - 'div', - {}, - ['span', keywordStyle, key + ': '], - formatValue(target[key], false) - ]; - }) - ] + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + formatValue(obj.value), + `>` ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } } - function formatValue(v, asRaw = true) { - if (typeof v === 'number') { - return ['span', numberStyle, v]; - } - else if (typeof v === 'string') { - return ['span', stringStyle, JSON.stringify(v)]; - } - else if (typeof v === 'boolean') { - return ['span', keywordStyle, v]; - } - else if (isObject(v)) { - return ['object', { object: asRaw ? toRaw(v) : v }]; - } - else { - return ['span', stringStyle, String(v)]; - } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if ((isArray(opts) && opts.includes(key)) || - (isObject(opts) && key in opts)) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) { - return true; - } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); } - else { - window.devtoolsFormatters = [formatter]; + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } - // Core API ------------------------------------------------------------------ - const version = "3.2.36"; - /** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ - const ssrUtils = (null); - /** - * @internal only exposed in compat builds - */ + const version = "3.4.15"; + const warn = warn$1 ; + const ErrorTypeStrings = ErrorTypeStrings$1 ; + const devtools = devtools$1 ; + const setDevtoolsHook = setDevtoolsHook$1 ; + const ssrUtils = null; const resolveFilter = null; - /** - * @internal only exposed in compat builds. - */ - const compatUtils = (null); + const compatUtils = null; + const DeprecationTypes = null; - const svgNS = 'http://www.w3.org/2000/svg'; - const doc = (typeof document !== 'undefined' ? document : null); - const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); + const svgNS = "http://www.w3.org/2000/svg"; + const mathmlNS = "http://www.w3.org/1998/Math/MathML"; + const doc = typeof document !== "undefined" ? document : null; + const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; - // compiler should normalize class + :class bindings on the same element - // into a single binding ['staticClass', dynamic] - function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } - } - - function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } - } - const importantRE = /\s*!important$/; - function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } - } - const prefixes = ['Webkit', 'Moz', 'ms']; - const prefixCache = {}; - function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; - } - - const xlinkNS = 'http://www.w3.org/1999/xlink'; - function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } - } - - // __UNSAFE__ - // functions. The user is responsible for using them with only trusted content. - function patchDOMProp(el, key, value, - // the following args are passed only due to potential innerHTML/textContent - // overriding existing VNodes, in which case the old tree must be properly - // unmounted. - prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - { - warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` + - `value ${value} is invalid.`, e); - } - } - needRemove && el.removeAttribute(key); - } - - // Async edge case fix requires storing an event listener's attach timestamp. - const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; - })(); - // To avoid the overhead of repeatedly calling performance.now(), we cache - // and use the same timestamp for all event listeners attached in the same tick. - let cachedNow = 0; - const p = /*#__PURE__*/ Promise.resolve(); - const reset = () => { - cachedNow = 0; - }; - const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); - function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); - } - function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); - } - function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } - } - const optionsModifierRE = /(?:Once|Passive|Capture)$/; - function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [hyphenate(name.slice(2)), options]; - } - function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; - } - function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } - } - - const nativeOnRE = /^on[a-z]/; - const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (isOn(key)) { - // ignore v-model listeners - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } - }; - function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && isString(value)) { - return false; - } - return key in el; - } - - function defineCustomElement(options, hydrate) { - const Comp = defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; - } - const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); - }); - const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { - }); - class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - if (this.shadowRoot) { - warn$1(`Custom element has pre-rendered declarative shadow root but is not ` + - `defined as hydratable. Use \`defineSSRCustomElement\`.`); - } - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = toNumber(value); - } - this._setProp(camelize(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = createVNode(this._def, extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // HMR - { - instance.ceReload = newStyles => { - // always reset styles - if (this._styles) { - this._styles.forEach(s => this.shadowRoot.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - // if this is an async component, ceReload is called from the inner - // component so no need to reload the async wrapper - if (!this._def.__asyncLoader) { - // reload - this._instance = null; - this._update(); - } - }; - } - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - // record for HMR - { - (this._styles || (this._styles = [])).push(s); - } - }); - } - } - } - - function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - { - warn$1(`useCssModule() is not supported in the global build.`); - } - return EMPTY_OBJ; - } - } - - /** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ - function useCssVars(getter) { - const instance = getCurrentInstance(); - /* istanbul ignore next */ - if (!instance) { - warn$1(`useCssVars is called without current active component instance.`); - return; - } - const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy)); - watchPostEffect(setVars); - onMounted(() => { - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); - } - function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - // drill down HOCs until it's a non-component vnode - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) { - setVarsOnNode(vnode.el, vars); - } - else if (vnode.type === Fragment) { - vnode.children.forEach(c => setVarsOnVNode(c, vars)); - } - else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) - break; - el = el.nextSibling; - } - } - } - function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - } - } - } - - const TRANSITION = 'transition'; - const ANIMATION = 'animation'; - // DOM Transition is a higher-order-component based on the platform-agnostic - // base Transition component, with DOM-specific logic. + const TRANSITION$1 = "transition"; + const ANIMATION = "animation"; + const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots); - Transition.displayName = 'Transition'; + Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; - const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ extend({}, BaseTransition.props, DOMTransitionPropsValidators)); - /** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ - const callHook$1 = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } + const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators + ); + const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; - /** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook$1(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook$1(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook$1(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook$1(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook$1(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook$1(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook$1(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = toNumber(val); - validateDuration(res); - return res; - } - function validateDuration(val) { - if (typeof val !== 'number') { - warn$1(`<transition> explicit duration is not a valid number - ` + - `got ${JSON.stringify(val)}.`); - } - else if (isNaN(val)) { - warn$1(`<transition> explicit duration is NaN - ` + - 'the duration expression might be incorrect.'); - } + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION$1) { + if (transitionTimeout > 0) { + type = TRANSITION$1; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null; + propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION$1}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } - // Old versions of Chromium (below 61.0.3163.100) formats floating pointer - // numbers in a locale-dependent way, using a comma instead of a dot. - // If comma is not replaced with a dot, the input will be rounded down - // (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } - // synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } - const positionMap = new WeakMap(); - const newPositionMap = new WeakMap(); - const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = children; - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - else { - warn$1(`<TransitionGroup> children must be keyed.`); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return createVNode(tag, null, children); - }; + function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } + } + + const vShowOldKey = Symbol("_vod"); + const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; + { + vShow.name = "show"; + } + function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; + } + + const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); + function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + const setVars = () => { + const vars = getter(instance.proxy); + setVarsOnVNode(instance.subTree, vars); + updateTeleports(vars); + }; + watchPostEffect(setVars); + onMounted(() => { + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); + } + function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) + break; + el = el.nextSibling; + } + } + } + function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } + } + + function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = isString(next); + if (next && !isCssString) { + if (prev && !isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } + } + const semicolonRE = /[^\\];\s*$/; + const importantRE = /\s*!important$/; + function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } + } + const prefixes = ["Webkit", "Moz", "ms"]; + const prefixCache = {}; + function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; + } + + const xlinkNS = "http://www.w3.org/1999/xlink"; + function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = isSpecialBooleanAttr(key); + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } + } + + function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); + } + + function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); + } + function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); + } + const veiKey = Symbol("_vei"); + function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } + } + const optionsModifierRE = /(?:Once|Passive|Capture)$/; + function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; + } + let cachedNow = 0; + const p = /* @__PURE__ */ Promise.resolve(); + const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); + function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; + } + function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } + } + + const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter + key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; + const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } + }; + function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; + } + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineCustomElement(options, hydrate2) { + const Comp = defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; + } + /*! #__NO_SIDE_EFFECTS__ */ + const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); + }; + const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { + }; + class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = camelize(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = createVNode(this._def, extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + { + (this._styles || (this._styles = [])).push(s); + } + }); + } + } + } + + function useCssModule(name = "$style") { + { + { + warn(`useCssModule() is not supported in the global build.`); + } + return EMPTY_OBJ; + } + } + + const positionMap = /* @__PURE__ */ new WeakMap(); + const newPositionMap = /* @__PURE__ */ new WeakMap(); + const moveCbKey = Symbol("_moveCb"); + const enterCbKey = Symbol("_enterCb"); + const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = children; + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else { + warn(`<TransitionGroup> children must be keyed.`); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return createVNode(tag, null, children); + }; + } + }; + const removeMode = (props) => delete props.mode; + /* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return isArray(fn) ? value => invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } - // We are exporting the v-model runtime directly as vnode hooks so that it can - // be tree-shaken in case v-model is never used. + const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (isArray(value)) { - el.checked = looseIndexOf(value, vnode.props.value) > -1; - } - else if (isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (isArray(value)) { + el.checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; - function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !isArray(value) && !isSet(value)) { - warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` + - `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`); + function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + if (isArrayValue && looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArray(value)) { - option.selected = looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } - // retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } - // retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } - const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; + const systemModifiers = ["ctrl", "shift", "alt", "meta"]; const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) }; - /** - * @private - */ const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; - }; - // Kept for 2.x compat. - // Note: IE11 compat for `spacebar` and `del` is removed for now. - const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' - }; - /** - * @private - */ - const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; - }; - - const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; } + return fn(event, ...args); + }); + }; + const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" + }; + const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); }; - function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; - } - const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps); - // lazy create the renderer - this makes core renderer logic tree-shakable - // in case the user only imports reactivity utilities from Vue. + const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = createRenderer(rendererOptions))); + return renderer || (renderer = createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } - // use explicit type casts here to avoid import() calls in rolled-up d.ts - const render = ((...args) => { - ensureRenderer().render(...args); - }); - const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); - }); - const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + const render = (...args) => { + ensureRenderer().render(...args); + }; + const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); + }; + const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; - }); - const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; - }); + return proxy; + }; + return app; + }; + const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; + }; + function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } + } function injectNativeTagCheck(app) { - // Inject `isNativeTag` - // this is used for component name validation (dev only) - Object.defineProperty(app.config, 'isNativeTag', { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag), - writable: false - }); + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); } - // dev only function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, 'isCustomElement', { - get() { - return isCustomElement; - }, - set() { - warn$1(`The \`isCustomElement\` config option is deprecated. Use ` + - `\`compilerOptions.isCustomElement\` instead.`); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using ` + - `a build of Vue.js that includes the runtime compiler (aka "full build"). ` + - `Since you are using the runtime-only build, \`compilerOptions\` ` + - `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` + - `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` + - `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` + - `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`; - Object.defineProperty(app.config, 'compilerOptions', { - get() { - warn$1(msg); - return compilerOptions; - }, - set() { - warn$1(msg); - } - }); - } + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } } function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn$1(`Failed to mount app: mount target selector "${container}" returned null.`); - } - return res; + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); } - if (window.ShadowRoot && - container instanceof window.ShadowRoot && - container.mode === 'closed') { - warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`); - } - return container; + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; } - /** - * @internal - */ const initDirectivesForSSR = NOOP; function initDev() { + { { - { - console.info(`You are running a development build of Vue.\n` + - `Make sure to use the production build (*.prod.js) when deploying for production.`); - } - initCustomFormatter(); + console.info( + `You are running a development build of Vue. +Make sure to use the production build (*.prod.js) when deploying for production.` + ); } + initCustomFormatter(); + } } - function defaultOnError(error) { - throw error; - } - function defaultOnWarn(msg) { - console.warn(`[Vue warn] ${msg.message}`); - } - function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (messages || errorMessages)[code] + (additionalMessage || ``) - ; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; - } - const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '<!--' in comment.", - [17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */]: 'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).', - [18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */]: 'Unquoted attribute value cannot contain U+0022 ("), U+0027 (\'), U+003C (<), U+003D (=), and U+0060 (`).', - [19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */]: "Attribute name cannot start with '='.", - [21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */]: "'<?' is allowed only in XML context.", - [20 /* UNEXPECTED_NULL_CHARACTER */]: `Unexpected null character.`, - [22 /* UNEXPECTED_SOLIDUS_IN_TAG */]: "Illegal '/' in tags.", - // Vue-specific parse errors - [23 /* X_INVALID_END_TAG */]: 'Invalid end tag.', - [24 /* X_MISSING_END_TAG */]: 'Element is missing end tag.', - [25 /* X_MISSING_INTERPOLATION_END */]: 'Interpolation end sign was not found.', - [27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */]: 'End bracket for dynamic directive argument was not found. ' + - 'Note that dynamic directive argument cannot contain spaces.', - [26 /* X_MISSING_DIRECTIVE_NAME */]: 'Legal directive name was expected.', - // transform errors - [28 /* X_V_IF_NO_EXPRESSION */]: `v-if/v-else-if is missing expression.`, - [29 /* X_V_IF_SAME_KEY */]: `v-if/else branches must use unique keys.`, - [30 /* X_V_ELSE_NO_ADJACENT_IF */]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, - [31 /* X_V_FOR_NO_EXPRESSION */]: `v-for is missing expression.`, - [32 /* X_V_FOR_MALFORMED_EXPRESSION */]: `v-for has invalid expression.`, - [33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */]: `<template v-for> key should be placed on the <template> tag.`, - [34 /* X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`, - [35 /* X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`, - [36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`, - [37 /* X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` + - `When there are multiple named slots, all slots should use <template> ` + - `syntax to avoid scope ambiguity.`, - [38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `, - [39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */]: `Extraneous children found when component already has explicitly named ` + - `default slot. These children will be ignored.`, - [40 /* X_V_SLOT_MISPLACED */]: `v-slot can only be used on components or <template> tags.`, - [41 /* X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`, - [42 /* X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`, - [43 /* X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, - [44 /* X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `, - [45 /* X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`, - // generic errors - [46 /* X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`, - [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`, - [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, - [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`, - // just to fulfill types - [50 /* __EXTEND_POINT__ */]: `` - }; - const FRAGMENT = Symbol(`Fragment` ); const TELEPORT = Symbol(`Teleport` ); const SUSPENSE = Symbol(`Suspense` ); @@ -11001,7 +11131,9 @@ var Vue = (function (exports) { const CREATE_TEXT = Symbol(`createTextVNode` ); const CREATE_STATIC = Symbol(`createStaticVNode` ); const RESOLVE_COMPONENT = Symbol(`resolveComponent` ); - const RESOLVE_DYNAMIC_COMPONENT = Symbol(`resolveDynamicComponent` ); + const RESOLVE_DYNAMIC_COMPONENT = Symbol( + `resolveDynamicComponent` + ); const RESOLVE_DIRECTIVE = Symbol(`resolveDirective` ); const RESOLVE_FILTER = Symbol(`resolveFilter` ); const WITH_DIRECTIVES = Symbol(`withDirectives` ); @@ -11026,4228 +11158,4774 @@ var Vue = (function (exports) { const IS_REF = Symbol(`isRef` ); const WITH_MEMO = Symbol(`withMemo` ); const IS_MEMO_SAME = Symbol(`isMemoSame` ); - // Name mapping for runtime helpers that need to be imported from 'vue' in - // generated code. Make sure these are correctly exported in the runtime! - // Using `any` here because TS doesn't allow symbols as index type. const helperNameMap = { - [FRAGMENT]: `Fragment`, - [TELEPORT]: `Teleport`, - [SUSPENSE]: `Suspense`, - [KEEP_ALIVE]: `KeepAlive`, - [BASE_TRANSITION]: `BaseTransition`, - [OPEN_BLOCK]: `openBlock`, - [CREATE_BLOCK]: `createBlock`, - [CREATE_ELEMENT_BLOCK]: `createElementBlock`, - [CREATE_VNODE]: `createVNode`, - [CREATE_ELEMENT_VNODE]: `createElementVNode`, - [CREATE_COMMENT]: `createCommentVNode`, - [CREATE_TEXT]: `createTextVNode`, - [CREATE_STATIC]: `createStaticVNode`, - [RESOLVE_COMPONENT]: `resolveComponent`, - [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, - [RESOLVE_DIRECTIVE]: `resolveDirective`, - [RESOLVE_FILTER]: `resolveFilter`, - [WITH_DIRECTIVES]: `withDirectives`, - [RENDER_LIST]: `renderList`, - [RENDER_SLOT]: `renderSlot`, - [CREATE_SLOTS]: `createSlots`, - [TO_DISPLAY_STRING]: `toDisplayString`, - [MERGE_PROPS]: `mergeProps`, - [NORMALIZE_CLASS]: `normalizeClass`, - [NORMALIZE_STYLE]: `normalizeStyle`, - [NORMALIZE_PROPS]: `normalizeProps`, - [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, - [TO_HANDLERS]: `toHandlers`, - [CAMELIZE]: `camelize`, - [CAPITALIZE]: `capitalize`, - [TO_HANDLER_KEY]: `toHandlerKey`, - [SET_BLOCK_TRACKING]: `setBlockTracking`, - [PUSH_SCOPE_ID]: `pushScopeId`, - [POP_SCOPE_ID]: `popScopeId`, - [WITH_CTX]: `withCtx`, - [UNREF]: `unref`, - [IS_REF]: `isRef`, - [WITH_MEMO]: `withMemo`, - [IS_MEMO_SAME]: `isMemoSame` + [FRAGMENT]: `Fragment`, + [TELEPORT]: `Teleport`, + [SUSPENSE]: `Suspense`, + [KEEP_ALIVE]: `KeepAlive`, + [BASE_TRANSITION]: `BaseTransition`, + [OPEN_BLOCK]: `openBlock`, + [CREATE_BLOCK]: `createBlock`, + [CREATE_ELEMENT_BLOCK]: `createElementBlock`, + [CREATE_VNODE]: `createVNode`, + [CREATE_ELEMENT_VNODE]: `createElementVNode`, + [CREATE_COMMENT]: `createCommentVNode`, + [CREATE_TEXT]: `createTextVNode`, + [CREATE_STATIC]: `createStaticVNode`, + [RESOLVE_COMPONENT]: `resolveComponent`, + [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`, + [RESOLVE_DIRECTIVE]: `resolveDirective`, + [RESOLVE_FILTER]: `resolveFilter`, + [WITH_DIRECTIVES]: `withDirectives`, + [RENDER_LIST]: `renderList`, + [RENDER_SLOT]: `renderSlot`, + [CREATE_SLOTS]: `createSlots`, + [TO_DISPLAY_STRING]: `toDisplayString`, + [MERGE_PROPS]: `mergeProps`, + [NORMALIZE_CLASS]: `normalizeClass`, + [NORMALIZE_STYLE]: `normalizeStyle`, + [NORMALIZE_PROPS]: `normalizeProps`, + [GUARD_REACTIVE_PROPS]: `guardReactiveProps`, + [TO_HANDLERS]: `toHandlers`, + [CAMELIZE]: `camelize`, + [CAPITALIZE]: `capitalize`, + [TO_HANDLER_KEY]: `toHandlerKey`, + [SET_BLOCK_TRACKING]: `setBlockTracking`, + [PUSH_SCOPE_ID]: `pushScopeId`, + [POP_SCOPE_ID]: `popScopeId`, + [WITH_CTX]: `withCtx`, + [UNREF]: `unref`, + [IS_REF]: `isRef`, + [WITH_MEMO]: `withMemo`, + [IS_MEMO_SAME]: `isMemoSame` }; function registerRuntimeHelpers(helpers) { - Object.getOwnPropertySymbols(helpers).forEach(s => { - helperNameMap[s] = helpers[s]; - }); + Object.getOwnPropertySymbols(helpers).forEach((s) => { + helperNameMap[s] = helpers[s]; + }); } - // AST Utilities --------------------------------------------------------------- - // Some expressions, e.g. sequence and conditional expressions, are never - // associated with template nodes, so their source locations are just a stub. - // Container types like CompoundExpression also don't need a real location. const locStub = { - source: '', - start: { line: 1, column: 1, offset: 0 }, - end: { line: 1, column: 1, offset: 0 } + start: { line: 1, column: 1, offset: 0 }, + end: { line: 1, column: 1, offset: 0 }, + source: "" }; - function createRoot(children, loc = locStub) { - return { - type: 0 /* ROOT */, - children, - helpers: [], - components: [], - directives: [], - hoists: [], - imports: [], - cached: 0, - temps: 0, - codegenNode: undefined, - loc - }; + function createRoot(children, source = "") { + return { + type: 0, + source, + children, + helpers: /* @__PURE__ */ new Set(), + components: [], + directives: [], + hoists: [], + imports: [], + cached: 0, + temps: 0, + codegenNode: void 0, + loc: locStub + }; } function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) { - if (context) { - if (isBlock) { - context.helper(OPEN_BLOCK); - context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); - } - else { - context.helper(getVNodeHelper(context.inSSR, isComponent)); - } - if (directives) { - context.helper(WITH_DIRECTIVES); - } + if (context) { + if (isBlock) { + context.helper(OPEN_BLOCK); + context.helper(getVNodeBlockHelper(context.inSSR, isComponent)); + } else { + context.helper(getVNodeHelper(context.inSSR, isComponent)); } - return { - type: 13 /* VNODE_CALL */, - tag, - props, - children, - patchFlag, - dynamicProps, - directives, - isBlock, - disableTracking, - isComponent, - loc - }; + if (directives) { + context.helper(WITH_DIRECTIVES); + } + } + return { + type: 13, + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent, + loc + }; } function createArrayExpression(elements, loc = locStub) { - return { - type: 17 /* JS_ARRAY_EXPRESSION */, - loc, - elements - }; + return { + type: 17, + loc, + elements + }; } function createObjectExpression(properties, loc = locStub) { - return { - type: 15 /* JS_OBJECT_EXPRESSION */, - loc, - properties - }; + return { + type: 15, + loc, + properties + }; } function createObjectProperty(key, value) { - return { - type: 16 /* JS_PROPERTY */, - loc: locStub, - key: isString(key) ? createSimpleExpression(key, true) : key, - value - }; + return { + type: 16, + loc: locStub, + key: isString(key) ? createSimpleExpression(key, true) : key, + value + }; } - function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0 /* NOT_CONSTANT */) { - return { - type: 4 /* SIMPLE_EXPRESSION */, - loc, - content, - isStatic, - constType: isStatic ? 3 /* CAN_STRINGIFY */ : constType - }; + function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) { + return { + type: 4, + loc, + content, + isStatic, + constType: isStatic ? 3 : constType + }; } function createCompoundExpression(children, loc = locStub) { - return { - type: 8 /* COMPOUND_EXPRESSION */, - loc, - children - }; + return { + type: 8, + loc, + children + }; } function createCallExpression(callee, args = [], loc = locStub) { - return { - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee, - arguments: args - }; + return { + type: 14, + loc, + callee, + arguments: args + }; } - function createFunctionExpression(params, returns = undefined, newline = false, isSlot = false, loc = locStub) { - return { - type: 18 /* JS_FUNCTION_EXPRESSION */, - params, - returns, - newline, - isSlot, - loc - }; + function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) { + return { + type: 18, + params, + returns, + newline, + isSlot, + loc + }; } function createConditionalExpression(test, consequent, alternate, newline = true) { - return { - type: 19 /* JS_CONDITIONAL_EXPRESSION */, - test, - consequent, - alternate, - newline, - loc: locStub - }; + return { + type: 19, + test, + consequent, + alternate, + newline, + loc: locStub + }; } function createCacheExpression(index, value, isVNode = false) { - return { - type: 20 /* JS_CACHE_EXPRESSION */, - index, - value, - isVNode, - loc: locStub - }; + return { + type: 20, + index, + value, + isVNode, + loc: locStub + }; } function createBlockStatement(body) { - return { - type: 21 /* JS_BLOCK_STATEMENT */, - body, - loc: locStub - }; + return { + type: 21, + body, + loc: locStub + }; + } + function getVNodeHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; + } + function getVNodeBlockHelper(ssr, isComponent) { + return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; + } + function convertToBlock(node, { helper, removeHelper, inSSR }) { + if (!node.isBlock) { + node.isBlock = true; + removeHelper(getVNodeHelper(inSSR, node.isComponent)); + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(inSSR, node.isComponent)); + } } - const isStaticExp = (p) => p.type === 4 /* SIMPLE_EXPRESSION */ && p.isStatic; - const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected); + const defaultDelimitersOpen = new Uint8Array([123, 123]); + const defaultDelimitersClose = new Uint8Array([125, 125]); + function isTagStartChar(c) { + return c >= 97 && c <= 122 || c >= 65 && c <= 90; + } + function isWhitespace(c) { + return c === 32 || c === 10 || c === 9 || c === 12 || c === 13; + } + function isEndOfTagSection(c) { + return c === 47 || c === 62 || isWhitespace(c); + } + function toCharCodes(str) { + const ret = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret; + } + const Sequences = { + Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]), + // CDATA[ + CdataEnd: new Uint8Array([93, 93, 62]), + // ]]> + CommentEnd: new Uint8Array([45, 45, 62]), + // `-->` + ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]), + // `<\/script` + StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]), + // `</style` + TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]), + // `</title` + TextareaEnd: new Uint8Array([ + 60, + 47, + 116, + 101, + 120, + 116, + 97, + 114, + 101, + 97 + ]) + // `</textarea + }; + class Tokenizer { + constructor(stack, cbs) { + this.stack = stack; + this.cbs = cbs; + /** The current state the tokenizer is in. */ + this.state = 1; + /** The read buffer. */ + this.buffer = ""; + /** The beginning of the section that is currently being read. */ + this.sectionStart = 0; + /** The index within the buffer that we are currently looking at. */ + this.index = 0; + /** The start of the last entity. */ + this.entityStart = 0; + /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */ + this.baseState = 1; + /** For special parsing behavior inside of script and style tags. */ + this.inRCDATA = false; + /** For disabling RCDATA tags handling */ + this.inXML = false; + /** For disabling interpolation parsing in v-pre */ + this.inVPre = false; + /** Record newline positions for fast line / column calculation */ + this.newlines = []; + this.mode = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + this.delimiterIndex = -1; + this.currentSequence = void 0; + this.sequenceIndex = 0; + } + get inSFCRoot() { + return this.mode === 2 && this.stack.length === 0; + } + reset() { + this.state = 1; + this.mode = 0; + this.buffer = ""; + this.sectionStart = 0; + this.index = 0; + this.baseState = 1; + this.inRCDATA = false; + this.currentSequence = void 0; + this.newlines.length = 0; + this.delimiterOpen = defaultDelimitersOpen; + this.delimiterClose = defaultDelimitersClose; + } + /** + * Generate Position object with line / column information using recorded + * newline positions. We know the index is always going to be an already + * processed index, so all the newlines up to this index should have been + * recorded. + */ + getPos(index) { + let line = 1; + let column = index + 1; + for (let i = this.newlines.length - 1; i >= 0; i--) { + const newlineIndex = this.newlines[i]; + if (index > newlineIndex) { + line = i + 2; + column = index - newlineIndex; + break; + } + } + return { + column, + line, + offset: index + }; + } + peek() { + return this.buffer.charCodeAt(this.index + 1); + } + stateText(c) { + if (c === 60) { + if (this.index > this.sectionStart) { + this.cbs.ontext(this.sectionStart, this.index); + } + this.state = 5; + this.sectionStart = this.index; + } else if (!this.inVPre && c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } + stateInterpolationOpen(c) { + if (c === this.delimiterOpen[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterOpen.length - 1) { + const start = this.index + 1 - this.delimiterOpen.length; + if (start > this.sectionStart) { + this.cbs.ontext(this.sectionStart, start); + } + this.state = 3; + this.sectionStart = start; + } else { + this.delimiterIndex++; + } + } else if (this.inRCDATA) { + this.state = 32; + this.stateInRCDATA(c); + } else { + this.state = 1; + this.stateText(c); + } + } + stateInterpolation(c) { + if (c === this.delimiterClose[0]) { + this.state = 4; + this.delimiterIndex = 0; + this.stateInterpolationClose(c); + } + } + stateInterpolationClose(c) { + if (c === this.delimiterClose[this.delimiterIndex]) { + if (this.delimiterIndex === this.delimiterClose.length - 1) { + this.cbs.oninterpolation(this.sectionStart, this.index + 1); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else { + this.delimiterIndex++; + } + } else { + this.state = 3; + this.stateInterpolation(c); + } + } + stateSpecialStartSequence(c) { + const isEnd = this.sequenceIndex === this.currentSequence.length; + const isMatch = isEnd ? ( + // If we are at the end of the sequence, make sure the tag name has ended + isEndOfTagSection(c) + ) : ( + // Otherwise, do a case-insensitive comparison + (c | 32) === this.currentSequence[this.sequenceIndex] + ); + if (!isMatch) { + this.inRCDATA = false; + } else if (!isEnd) { + this.sequenceIndex++; + return; + } + this.sequenceIndex = 0; + this.state = 6; + this.stateInTagName(c); + } + /** Look for an end tag. For <title> and <textarea>, also decode entities. */ + stateInRCDATA(c) { + if (this.sequenceIndex === this.currentSequence.length) { + if (c === 62 || isWhitespace(c)) { + const endOfText = this.index - this.currentSequence.length; + if (this.sectionStart < endOfText) { + const actualIndex = this.index; + this.index = endOfText; + this.cbs.ontext(this.sectionStart, endOfText); + this.index = actualIndex; + } + this.sectionStart = endOfText + 2; + this.stateInClosingTagName(c); + this.inRCDATA = false; + return; + } + this.sequenceIndex = 0; + } + if ((c | 32) === this.currentSequence[this.sequenceIndex]) { + this.sequenceIndex += 1; + } else if (this.sequenceIndex === 0) { + if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) { + if (c === this.delimiterOpen[0]) { + this.state = 2; + this.delimiterIndex = 0; + this.stateInterpolationOpen(c); + } + } else if (this.fastForwardTo(60)) { + this.sequenceIndex = 1; + } + } else { + this.sequenceIndex = Number(c === 60); + } + } + stateCDATASequence(c) { + if (c === Sequences.Cdata[this.sequenceIndex]) { + if (++this.sequenceIndex === Sequences.Cdata.length) { + this.state = 28; + this.currentSequence = Sequences.CdataEnd; + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + } + } else { + this.sequenceIndex = 0; + this.state = 23; + this.stateInDeclaration(c); + } + } + /** + * When we wait for one specific character, we can speed things up + * by skipping through the buffer until we find it. + * + * @returns Whether the character was found. + */ + fastForwardTo(c) { + while (++this.index < this.buffer.length) { + const cc = this.buffer.charCodeAt(this.index); + if (cc === 10) { + this.newlines.push(this.index); + } + if (cc === c) { + return true; + } + } + this.index = this.buffer.length - 1; + return false; + } + /** + * Comments and CDATA end with `-->` and `]]>`. + * + * Their common qualities are: + * - Their end sequences have a distinct character they start with. + * - That character is then repeated, so we have to check multiple repeats. + * - All characters but the start character of the sequence can be skipped. + */ + stateInCommentLike(c) { + if (c === this.currentSequence[this.sequenceIndex]) { + if (++this.sequenceIndex === this.currentSequence.length) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, this.index - 2); + } else { + this.cbs.oncomment(this.sectionStart, this.index - 2); + } + this.sequenceIndex = 0; + this.sectionStart = this.index + 1; + this.state = 1; + } + } else if (this.sequenceIndex === 0) { + if (this.fastForwardTo(this.currentSequence[0])) { + this.sequenceIndex = 1; + } + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { + this.sequenceIndex = 0; + } + } + startSpecial(sequence, offset) { + this.enterRCDATA(sequence, offset); + this.state = 31; + } + enterRCDATA(sequence, offset) { + this.inRCDATA = true; + this.currentSequence = sequence; + this.sequenceIndex = offset; + } + stateBeforeTagName(c) { + if (c === 33) { + this.state = 22; + this.sectionStart = this.index + 1; + } else if (c === 63) { + this.state = 24; + this.sectionStart = this.index + 1; + } else if (isTagStartChar(c)) { + this.sectionStart = this.index; + if (this.mode === 0) { + this.state = 6; + } else if (this.inSFCRoot) { + this.state = 34; + } else if (!this.inXML) { + const lower = c | 32; + if (lower === 116) { + this.state = 30; + } else { + this.state = lower === 115 ? 29 : 6; + } + } else { + this.state = 6; + } + } else if (c === 47) { + this.state = 8; + } else { + this.state = 1; + this.stateText(c); + } + } + stateInTagName(c) { + if (isEndOfTagSection(c)) { + this.handleTagName(c); + } + } + stateInSFCRootTagName(c) { + if (isEndOfTagSection(c)) { + const tag = this.buffer.slice(this.sectionStart, this.index); + if (tag !== "template") { + this.enterRCDATA(toCharCodes(`</` + tag), 0); + } + this.handleTagName(c); + } + } + handleTagName(c) { + this.cbs.onopentagname(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } + stateBeforeClosingTagName(c) { + if (isWhitespace(c)) ; else if (c === 62) { + { + this.cbs.onerr(14, this.index); + } + this.state = 1; + this.sectionStart = this.index + 1; + } else { + this.state = isTagStartChar(c) ? 9 : 27; + this.sectionStart = this.index; + } + } + stateInClosingTagName(c) { + if (c === 62 || isWhitespace(c)) { + this.cbs.onclosetag(this.sectionStart, this.index); + this.sectionStart = -1; + this.state = 10; + this.stateAfterClosingTagName(c); + } + } + stateAfterClosingTagName(c) { + if (c === 62) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeAttrName(c) { + if (c === 62) { + this.cbs.onopentagend(this.index); + if (this.inRCDATA) { + this.state = 32; + } else { + this.state = 1; + } + this.sectionStart = this.index + 1; + } else if (c === 47) { + this.state = 7; + if (this.peek() !== 62) { + this.cbs.onerr(22, this.index); + } + } else if (c === 60 && this.peek() === 47) { + this.cbs.onopentagend(this.index); + this.state = 5; + this.sectionStart = this.index; + } else if (!isWhitespace(c)) { + if (c === 61) { + this.cbs.onerr( + 19, + this.index + ); + } + this.handleAttrStart(c); + } + } + handleAttrStart(c) { + if (c === 118 && this.peek() === 45) { + this.state = 13; + this.sectionStart = this.index; + } else if (c === 46 || c === 58 || c === 64 || c === 35) { + this.cbs.ondirname(this.index, this.index + 1); + this.state = 14; + this.sectionStart = this.index + 1; + } else { + this.state = 12; + this.sectionStart = this.index; + } + } + stateInSelfClosingTag(c) { + if (c === 62) { + this.cbs.onselfclosingtag(this.index); + this.state = 1; + this.sectionStart = this.index + 1; + this.inRCDATA = false; + } else if (!isWhitespace(c)) { + this.state = 11; + this.stateBeforeAttrName(c); + } + } + stateInAttrName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.onattribname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 34 || c === 39 || c === 60) { + this.cbs.onerr( + 17, + this.index + ); + } + } + stateInDirName(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirname(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 58) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 14; + this.sectionStart = this.index + 1; + } else if (c === 46) { + this.cbs.ondirname(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDirArg(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 91) { + this.state = 15; + } else if (c === 46) { + this.cbs.ondirarg(this.sectionStart, this.index); + this.state = 16; + this.sectionStart = this.index + 1; + } + } + stateInDynamicDirArg(c) { + if (c === 93) { + this.state = 14; + } else if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirarg(this.sectionStart, this.index + 1); + this.handleAttrNameEnd(c); + { + this.cbs.onerr( + 27, + this.index + ); + } + } + } + stateInDirModifier(c) { + if (c === 61 || isEndOfTagSection(c)) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.handleAttrNameEnd(c); + } else if (c === 46) { + this.cbs.ondirmodifier(this.sectionStart, this.index); + this.sectionStart = this.index + 1; + } + } + handleAttrNameEnd(c) { + this.sectionStart = this.index; + this.state = 17; + this.cbs.onattribnameend(this.index); + this.stateAfterAttrName(c); + } + stateAfterAttrName(c) { + if (c === 61) { + this.state = 18; + } else if (c === 47 || c === 62) { + this.cbs.onattribend(0, this.sectionStart); + this.sectionStart = -1; + this.state = 11; + this.stateBeforeAttrName(c); + } else if (!isWhitespace(c)) { + this.cbs.onattribend(0, this.sectionStart); + this.handleAttrStart(c); + } + } + stateBeforeAttrValue(c) { + if (c === 34) { + this.state = 19; + this.sectionStart = this.index + 1; + } else if (c === 39) { + this.state = 20; + this.sectionStart = this.index + 1; + } else if (!isWhitespace(c)) { + this.sectionStart = this.index; + this.state = 21; + this.stateInAttrValueNoQuotes(c); + } + } + handleInAttrValue(c, quote) { + if (c === quote || this.fastForwardTo(quote)) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend( + quote === 34 ? 3 : 2, + this.index + 1 + ); + this.state = 11; + } + } + stateInAttrValueDoubleQuotes(c) { + this.handleInAttrValue(c, 34); + } + stateInAttrValueSingleQuotes(c) { + this.handleInAttrValue(c, 39); + } + stateInAttrValueNoQuotes(c) { + if (isWhitespace(c) || c === 62) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = -1; + this.cbs.onattribend(1, this.index); + this.state = 11; + this.stateBeforeAttrName(c); + } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) { + this.cbs.onerr( + 18, + this.index + ); + } else ; + } + stateBeforeDeclaration(c) { + if (c === 91) { + this.state = 26; + this.sequenceIndex = 0; + } else { + this.state = c === 45 ? 25 : 23; + } + } + stateInDeclaration(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateInProcessingInstruction(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.onprocessinginstruction(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeComment(c) { + if (c === 45) { + this.state = 28; + this.currentSequence = Sequences.CommentEnd; + this.sequenceIndex = 2; + this.sectionStart = this.index + 1; + } else { + this.state = 23; + } + } + stateInSpecialComment(c) { + if (c === 62 || this.fastForwardTo(62)) { + this.cbs.oncomment(this.sectionStart, this.index); + this.state = 1; + this.sectionStart = this.index + 1; + } + } + stateBeforeSpecialS(c) { + const lower = c | 32; + if (lower === Sequences.ScriptEnd[3]) { + this.startSpecial(Sequences.ScriptEnd, 4); + } else if (lower === Sequences.StyleEnd[3]) { + this.startSpecial(Sequences.StyleEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + stateBeforeSpecialT(c) { + const lower = c | 32; + if (lower === Sequences.TitleEnd[3]) { + this.startSpecial(Sequences.TitleEnd, 4); + } else if (lower === Sequences.TextareaEnd[3]) { + this.startSpecial(Sequences.TextareaEnd, 4); + } else { + this.state = 6; + this.stateInTagName(c); + } + } + startEntity() { + } + stateInEntity() { + } + /** + * Iterates through the buffer, calling the function corresponding to the current state. + * + * States that are more likely to be hit are higher up, as a performance improvement. + */ + parse(input) { + this.buffer = input; + while (this.index < this.buffer.length) { + const c = this.buffer.charCodeAt(this.index); + if (c === 10) { + this.newlines.push(this.index); + } + switch (this.state) { + case 1: { + this.stateText(c); + break; + } + case 2: { + this.stateInterpolationOpen(c); + break; + } + case 3: { + this.stateInterpolation(c); + break; + } + case 4: { + this.stateInterpolationClose(c); + break; + } + case 31: { + this.stateSpecialStartSequence(c); + break; + } + case 32: { + this.stateInRCDATA(c); + break; + } + case 26: { + this.stateCDATASequence(c); + break; + } + case 19: { + this.stateInAttrValueDoubleQuotes(c); + break; + } + case 12: { + this.stateInAttrName(c); + break; + } + case 13: { + this.stateInDirName(c); + break; + } + case 14: { + this.stateInDirArg(c); + break; + } + case 15: { + this.stateInDynamicDirArg(c); + break; + } + case 16: { + this.stateInDirModifier(c); + break; + } + case 28: { + this.stateInCommentLike(c); + break; + } + case 27: { + this.stateInSpecialComment(c); + break; + } + case 11: { + this.stateBeforeAttrName(c); + break; + } + case 6: { + this.stateInTagName(c); + break; + } + case 34: { + this.stateInSFCRootTagName(c); + break; + } + case 9: { + this.stateInClosingTagName(c); + break; + } + case 5: { + this.stateBeforeTagName(c); + break; + } + case 17: { + this.stateAfterAttrName(c); + break; + } + case 20: { + this.stateInAttrValueSingleQuotes(c); + break; + } + case 18: { + this.stateBeforeAttrValue(c); + break; + } + case 8: { + this.stateBeforeClosingTagName(c); + break; + } + case 10: { + this.stateAfterClosingTagName(c); + break; + } + case 29: { + this.stateBeforeSpecialS(c); + break; + } + case 30: { + this.stateBeforeSpecialT(c); + break; + } + case 21: { + this.stateInAttrValueNoQuotes(c); + break; + } + case 7: { + this.stateInSelfClosingTag(c); + break; + } + case 23: { + this.stateInDeclaration(c); + break; + } + case 22: { + this.stateBeforeDeclaration(c); + break; + } + case 25: { + this.stateBeforeComment(c); + break; + } + case 24: { + this.stateInProcessingInstruction(c); + break; + } + case 33: { + this.stateInEntity(); + break; + } + } + this.index++; + } + this.cleanup(); + this.finish(); + } + /** + * Remove data that has already been consumed from the buffer. + */ + cleanup() { + if (this.sectionStart !== this.index) { + if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) { + this.cbs.ontext(this.sectionStart, this.index); + this.sectionStart = this.index; + } else if (this.state === 19 || this.state === 20 || this.state === 21) { + this.cbs.onattribdata(this.sectionStart, this.index); + this.sectionStart = this.index; + } + } + } + finish() { + this.handleTrailingData(); + this.cbs.onend(); + } + /** Handle any trailing data. */ + handleTrailingData() { + const endIndex = this.buffer.length; + if (this.sectionStart >= endIndex) { + return; + } + if (this.state === 28) { + if (this.currentSequence === Sequences.CdataEnd) { + this.cbs.oncdata(this.sectionStart, endIndex); + } else { + this.cbs.oncomment(this.sectionStart, endIndex); + } + } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else { + this.cbs.ontext(this.sectionStart, endIndex); + } + } + emitCodePoint(cp, consumed) { + } + } + + function defaultOnError(error) { + throw error; + } + function defaultOnWarn(msg) { + console.warn(`[Vue warn] ${msg.message}`); + } + function createCompilerError(code, loc, messages, additionalMessage) { + const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; + const error = new SyntaxError(String(msg)); + error.code = code; + error.loc = loc; + return error; + } + const errorMessages = { + // parse errors + [0]: "Illegal comment.", + [1]: "CDATA section is allowed only in XML context.", + [2]: "Duplicate attribute.", + [3]: "End tag cannot have attributes.", + [4]: "Illegal '/' in tags.", + [5]: "Unexpected EOF in tag.", + [6]: "Unexpected EOF in CDATA section.", + [7]: "Unexpected EOF in comment.", + [8]: "Unexpected EOF in script.", + [9]: "Unexpected EOF in tag.", + [10]: "Incorrectly closed comment.", + [11]: "Incorrectly opened comment.", + [12]: "Illegal tag name. Use '<' to print '<'.", + [13]: "Attribute value was expected.", + [14]: "End tag name was expected.", + [15]: "Whitespace was expected.", + [16]: "Unexpected '<!--' in comment.", + [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`, + [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).", + [19]: "Attribute name cannot start with '='.", + [21]: "'<?' is allowed only in XML context.", + [20]: `Unexpected null character.`, + [22]: "Illegal '/' in tags.", + // Vue-specific parse errors + [23]: "Invalid end tag.", + [24]: "Element is missing end tag.", + [25]: "Interpolation end sign was not found.", + [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.", + [26]: "Legal directive name was expected.", + // transform errors + [28]: `v-if/v-else-if is missing expression.`, + [29]: `v-if/else branches must use unique keys.`, + [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`, + [31]: `v-for is missing expression.`, + [32]: `v-for has invalid expression.`, + [33]: `<template v-for> key should be placed on the <template> tag.`, + [34]: `v-bind is missing expression.`, + [35]: `v-on is missing expression.`, + [36]: `Unexpected custom directive on <slot> outlet.`, + [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`, + [38]: `Duplicate slot names found. `, + [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`, + [40]: `v-slot can only be used on components or <template> tags.`, + [41]: `v-model is missing expression.`, + [42]: `v-model value must be a valid JavaScript member expression.`, + [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`, + [44]: `v-model cannot be used on a prop, because local prop bindings are not writable. +Use a v-bind binding combined with a v-on listener that emits update:x event instead.`, + [45]: `Error parsing JavaScript expression: `, + [46]: `<KeepAlive> expects exactly one child component.`, + [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`, + // generic errors + [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`, + [48]: `ES module mode is not supported in this build of compiler.`, + [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`, + [50]: `"scopeId" option is only supported in module mode.`, + // just to fulfill types + [52]: `` + }; + + const isStaticExp = (p) => p.type === 4 && p.isStatic; function isCoreComponent(tag) { - if (isBuiltInType(tag, 'Teleport')) { - return TELEPORT; - } - else if (isBuiltInType(tag, 'Suspense')) { - return SUSPENSE; - } - else if (isBuiltInType(tag, 'KeepAlive')) { - return KEEP_ALIVE; - } - else if (isBuiltInType(tag, 'BaseTransition')) { - return BASE_TRANSITION; - } + switch (tag) { + case "Teleport": + case "teleport": + return TELEPORT; + case "Suspense": + case "suspense": + return SUSPENSE; + case "KeepAlive": + case "keep-alive": + return KEEP_ALIVE; + case "BaseTransition": + case "base-transition": + return BASE_TRANSITION; + } } const nonIdentifierRE = /^\d|[^\$\w]/; const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name); const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/; const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/; const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g; - /** - * Simple lexer to check if an expression is a member expression. This is - * lax and only checks validity at the root level (i.e. does not validate exps - * inside square brackets), but it's ok since these are only used on template - * expressions and false positives are invalid expressions in the first place. - */ const isMemberExpressionBrowser = (path) => { - // remove whitespaces around . or [ first - path = path.trim().replace(whitespaceRE, s => s.trim()); - let state = 0 /* inMemberExp */; - let stateStack = []; - let currentOpenBracketCount = 0; - let currentOpenParensCount = 0; - let currentStringType = null; - for (let i = 0; i < path.length; i++) { - const char = path.charAt(i); - switch (state) { - case 0 /* inMemberExp */: - if (char === '[') { - stateStack.push(state); - state = 1 /* inBrackets */; - currentOpenBracketCount++; - } - else if (char === '(') { - stateStack.push(state); - state = 2 /* inParens */; - currentOpenParensCount++; - } - else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { - return false; - } - break; - case 1 /* inBrackets */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `[`) { - currentOpenBracketCount++; - } - else if (char === `]`) { - if (!--currentOpenBracketCount) { - state = stateStack.pop(); - } - } - break; - case 2 /* inParens */: - if (char === `'` || char === `"` || char === '`') { - stateStack.push(state); - state = 3 /* inString */; - currentStringType = char; - } - else if (char === `(`) { - currentOpenParensCount++; - } - else if (char === `)`) { - // if the exp ends as a call then it should not be considered valid - if (i === path.length - 1) { - return false; - } - if (!--currentOpenParensCount) { - state = stateStack.pop(); - } - } - break; - case 3 /* inString */: - if (char === currentStringType) { - state = stateStack.pop(); - currentStringType = null; - } - break; + path = path.trim().replace(whitespaceRE, (s) => s.trim()); + let state = 0 /* inMemberExp */; + let stateStack = []; + let currentOpenBracketCount = 0; + let currentOpenParensCount = 0; + let currentStringType = null; + for (let i = 0; i < path.length; i++) { + const char = path.charAt(i); + switch (state) { + case 0 /* inMemberExp */: + if (char === "[") { + stateStack.push(state); + state = 1 /* inBrackets */; + currentOpenBracketCount++; + } else if (char === "(") { + stateStack.push(state); + state = 2 /* inParens */; + currentOpenParensCount++; + } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) { + return false; } + break; + case 1 /* inBrackets */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `[`) { + currentOpenBracketCount++; + } else if (char === `]`) { + if (!--currentOpenBracketCount) { + state = stateStack.pop(); + } + } + break; + case 2 /* inParens */: + if (char === `'` || char === `"` || char === "`") { + stateStack.push(state); + state = 3 /* inString */; + currentStringType = char; + } else if (char === `(`) { + currentOpenParensCount++; + } else if (char === `)`) { + if (i === path.length - 1) { + return false; + } + if (!--currentOpenParensCount) { + state = stateStack.pop(); + } + } + break; + case 3 /* inString */: + if (char === currentStringType) { + state = stateStack.pop(); + currentStringType = null; + } + break; } - return !currentOpenBracketCount && !currentOpenParensCount; + } + return !currentOpenBracketCount && !currentOpenParensCount; }; - const isMemberExpression = isMemberExpressionBrowser - ; - function getInnerRange(loc, offset, length) { - const source = loc.source.slice(offset, offset + length); - const newLoc = { - source, - start: advancePositionWithClone(loc.start, loc.source, offset), - end: loc.end - }; - if (length != null) { - newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length); - } - return newLoc; - } - function advancePositionWithClone(pos, source, numberOfCharacters = source.length) { - return advancePositionWithMutation(extend({}, pos), source, numberOfCharacters); - } - // advance by mutation without cloning (for performance reasons), since this - // gets called a lot in the parser - function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) { - let linesCount = 0; - let lastNewLinePos = -1; - for (let i = 0; i < numberOfCharacters; i++) { - if (source.charCodeAt(i) === 10 /* newline char code */) { - linesCount++; - lastNewLinePos = i; - } - } - pos.offset += numberOfCharacters; - pos.line += linesCount; - pos.column = - lastNewLinePos === -1 - ? pos.column + numberOfCharacters - : numberOfCharacters - lastNewLinePos; - return pos; - } + const isMemberExpression = isMemberExpressionBrowser ; function assert(condition, msg) { - /* istanbul ignore if */ - if (!condition) { - throw new Error(msg || `unexpected compiler condition`); - } + if (!condition) { + throw new Error(msg || `unexpected compiler condition`); + } } function findDir(node, name, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && - (allowEmpty || p.exp) && - (isString(name) ? p.name === name : name.test(p.name))) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) { + return p; } + } } function findProp(node, name, dynamicOnly = false, allowEmpty = false) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (dynamicOnly) - continue; - if (p.name === name && (p.value || allowEmpty)) { - return p; - } - } - else if (p.name === 'bind' && - (p.exp || allowEmpty) && - isStaticArgOf(p.arg, name)) { - return p; - } + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (dynamicOnly) + continue; + if (p.name === name && (p.value || allowEmpty)) { + return p; + } + } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) { + return p; } + } } function isStaticArgOf(arg, name) { - return !!(arg && isStaticExp(arg) && arg.content === name); + return !!(arg && isStaticExp(arg) && arg.content === name); } function hasDynamicKeyVBind(node) { - return node.props.some(p => p.type === 7 /* DIRECTIVE */ && - p.name === 'bind' && - (!p.arg || // v-bind="obj" - p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo] - !p.arg.isStatic) // v-bind:[foo] - ); + return node.props.some( + (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj" + p.arg.type !== 4 || // v-bind:[_ctx.foo] + !p.arg.isStatic) + // v-bind:[foo] + ); } - function isText(node) { - return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */; + function isText$1(node) { + return node.type === 5 || node.type === 2; } function isVSlot(p) { - return p.type === 7 /* DIRECTIVE */ && p.name === 'slot'; + return p.type === 7 && p.name === "slot"; } function isTemplateNode(node) { - return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */); + return node.type === 1 && node.tagType === 3; } function isSlotOutlet(node) { - return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */; + return node.type === 1 && node.tagType === 2; } - function getVNodeHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE; - } - function getVNodeBlockHelper(ssr, isComponent) { - return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK; - } - const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); + const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]); function getUnnormalizedProps(props, callPath = []) { - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const callee = props.callee; - if (!isString(callee) && propsHelperSet.has(callee)) { - return getUnnormalizedProps(props.arguments[0], callPath.concat(props)); - } + if (props && !isString(props) && props.type === 14) { + const callee = props.callee; + if (!isString(callee) && propsHelperSet.has(callee)) { + return getUnnormalizedProps( + props.arguments[0], + callPath.concat(props) + ); } - return [props, callPath]; + } + return [props, callPath]; } function injectProp(node, prop, context) { - let propsWithInjection; - /** - * 1. mergeProps(...) - * 2. toHandlers(...) - * 3. normalizeProps(...) - * 4. normalizeProps(guardReactiveProps(...)) - * - * we need to get the real props before normalization - */ - let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2]; - let callPath = []; - let parentCall; - if (props && - !isString(props) && - props.type === 14 /* JS_CALL_EXPRESSION */) { - const ret = getUnnormalizedProps(props); - props = ret[0]; - callPath = ret[1]; - parentCall = callPath[callPath.length - 1]; - } - if (props == null || isString(props)) { - propsWithInjection = createObjectExpression([prop]); - } - else if (props.type === 14 /* JS_CALL_EXPRESSION */) { - // merged props... add ours - // only inject key to object literal if it's the first argument so that - // if doesn't override user provided keys - const first = props.arguments[0]; - if (!isString(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) { - first.properties.unshift(prop); - } - else { - if (props.callee === TO_HANDLERS) { - // #2366 - propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props - ]); - } - else { - props.arguments.unshift(createObjectExpression([prop])); - } - } - !propsWithInjection && (propsWithInjection = props); - } - else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) { - let alreadyExists = false; - // check existing key to avoid overriding user provided keys - if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) { - const propKeyName = prop.key.content; - alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === propKeyName); - } - if (!alreadyExists) { - props.properties.unshift(prop); - } - propsWithInjection = props; - } - else { - // single v-bind with expression, return a merged replacement + let propsWithInjection; + let props = node.type === 13 ? node.props : node.arguments[2]; + let callPath = []; + let parentCall; + if (props && !isString(props) && props.type === 14) { + const ret = getUnnormalizedProps(props); + props = ret[0]; + callPath = ret[1]; + parentCall = callPath[callPath.length - 1]; + } + if (props == null || isString(props)) { + propsWithInjection = createObjectExpression([prop]); + } else if (props.type === 14) { + const first = props.arguments[0]; + if (!isString(first) && first.type === 15) { + if (!hasProp(prop, first)) { + first.properties.unshift(prop); + } + } else { + if (props.callee === TO_HANDLERS) { propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ - createObjectExpression([prop]), - props + createObjectExpression([prop]), + props ]); - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`, - // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`, - // the `guardReactiveProps` will no longer be needed - if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { - parentCall = callPath[callPath.length - 2]; - } + } else { + props.arguments.unshift(createObjectExpression([prop])); + } } - if (node.type === 13 /* VNODE_CALL */) { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.props = propsWithInjection; - } + !propsWithInjection && (propsWithInjection = props); + } else if (props.type === 15) { + if (!hasProp(prop, props)) { + props.properties.unshift(prop); } - else { - if (parentCall) { - parentCall.arguments[0] = propsWithInjection; - } - else { - node.arguments[2] = propsWithInjection; - } + propsWithInjection = props; + } else { + propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [ + createObjectExpression([prop]), + props + ]); + if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) { + parentCall = callPath[callPath.length - 2]; } + } + if (node.type === 13) { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.props = propsWithInjection; + } + } else { + if (parentCall) { + parentCall.arguments[0] = propsWithInjection; + } else { + node.arguments[2] = propsWithInjection; + } + } + } + function hasProp(prop, props) { + let result = false; + if (prop.key.type === 4) { + const propKeyName = prop.key.content; + result = props.properties.some( + (p) => p.key.type === 4 && p.key.content === propKeyName + ); + } + return result; } function toValidAssetId(name, type) { - // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character - return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { - return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString(); - })}`; + return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => { + return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString(); + })}`; } function getMemoedVNodeCall(node) { - if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) { - return node.arguments[1].returns; - } - else { - return node; - } - } - function makeBlock(node, { helper, removeHelper, inSSR }) { - if (!node.isBlock) { - node.isBlock = true; - removeHelper(getVNodeHelper(inSSR, node.isComponent)); - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(inSSR, node.isComponent)); - } + if (node.type === 14 && node.callee === WITH_MEMO) { + return node.arguments[1].returns; + } else { + return node; + } } + const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; - const deprecationData = { - ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: { - message: `Platform-native elements with "is" prop will no longer be ` + - `treated as components in Vue 3 unless the "is" value is explicitly ` + - `prefixed with "vue:".`, - link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html` - }, - ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: { - message: key => `.sync modifier for v-bind has been removed. Use v-model with ` + - `argument instead. \`v-bind:${key}.sync\` should be changed to ` + - `\`v-model:${key}\`.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html` - }, - ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: { - message: `.prop modifier for v-bind has been removed and no longer necessary. ` + - `Vue 3 will automatically set a binding as DOM property when appropriate.` - }, - ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: { - message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` + - `object spread: it will now overwrite an existing non-mergeable attribute ` + - `that appears before v-bind in the case of conflict. ` + - `To retain 2.x behavior, move v-bind to make it the first attribute. ` + - `You can also suppress this warning if the usage is intended.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html` - }, - ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: { - message: `.native modifier for v-on has been removed as is no longer necessary.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html` - }, - ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: { - message: `v-if / v-for precedence when used on the same element has changed ` + - `in Vue 3: v-if now takes higher precedence and will no longer have ` + - `access to v-for scope variables. It is best to avoid the ambiguity ` + - `with <template> tags or use a computed property that filters v-for ` + - `data source.`, - link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html` - }, - ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: { - message: `<template> with no special directives will render as a native template ` + - `element instead of its inner content in Vue 3.` - }, - ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: { - message: `"inline-template" has been removed in Vue 3.`, - link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html` - }, - ["COMPILER_FILTER" /* COMPILER_FILTERS */]: { - message: `filters have been removed in Vue 3. ` + - `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` + - `Use method calls or computed properties instead.`, - link: `https://v3-migration.vuejs.org/breaking-changes/filters.html` - } - }; - function getCompatValue(key, context) { - const config = context.options - ? context.options.compatConfig - : context.compatConfig; - const value = config && config[key]; - if (key === 'MODE') { - return value || 3; // compiler defaults to v3 behavior - } - else { - return value; - } - } - function isCompatEnabled(key, context) { - const mode = getCompatValue('MODE', context); - const value = getCompatValue(key, context); - // in v3 mode, only enable if explicitly set to true - // otherwise enable for any non-false value - return mode === 3 ? value === true : value !== false; - } - function checkCompatEnabled(key, context, loc, ...args) { - const enabled = isCompatEnabled(key, context); - if (enabled) { - warnDeprecation(key, context, loc, ...args); - } - return enabled; - } - function warnDeprecation(key, context, loc, ...args) { - const val = getCompatValue(key, context); - if (val === 'suppress-warning') { - return; - } - const { message, link } = deprecationData[key]; - const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`; - const err = new SyntaxError(msg); - err.code = key; - if (loc) - err.loc = loc; - context.onWarn(err); - } - - // The default decoder only provides escapes for characters reserved as part of - // the template syntax, and is only used if the custom renderer did not provide - // a platform-specific decoder. - const decodeRE = /&(gt|lt|amp|apos|quot);/g; - const decodeMap = { - gt: '>', - lt: '<', - amp: '&', - apos: "'", - quot: '"' - }; const defaultParserOptions = { - delimiters: [`{{`, `}}`], - getNamespace: () => 0 /* HTML */, - getTextMode: () => 0 /* DATA */, - isVoidTag: NO, - isPreTag: NO, - isCustomElement: NO, - decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]), - onError: defaultOnError, - onWarn: defaultOnWarn, - comments: true + parseMode: "base", + ns: 0, + delimiters: [`{{`, `}}`], + getNamespace: () => 0, + isVoidTag: NO, + isPreTag: NO, + isCustomElement: NO, + onError: defaultOnError, + onWarn: defaultOnWarn, + comments: true, + prefixIdentifiers: false }; - function baseParse(content, options = {}) { - const context = createParserContext(content, options); - const start = getCursor(context); - return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start)); - } - function createParserContext(content, rawOptions) { - const options = extend({}, defaultParserOptions); - let key; - for (key in rawOptions) { - // @ts-ignore - options[key] = - rawOptions[key] === undefined - ? defaultParserOptions[key] - : rawOptions[key]; + let currentOptions = defaultParserOptions; + let currentRoot = null; + let currentInput = ""; + let currentOpenTag = null; + let currentProp = null; + let currentAttrValue = ""; + let currentAttrStartIndex = -1; + let currentAttrEndIndex = -1; + let inPre = 0; + let inVPre = false; + let currentVPreBoundary = null; + const stack = []; + const tokenizer = new Tokenizer(stack, { + onerr: emitError, + ontext(start, end) { + onText(getSlice(start, end), start, end); + }, + ontextentity(char, start, end) { + onText(char, start, end); + }, + oninterpolation(start, end) { + if (inVPre) { + return onText(getSlice(start, end), start, end); } - return { - options, - column: 1, - line: 1, - offset: 0, - originalSource: content, - source: content, - inPre: false, - inVPre: false, - onWarn: options.onWarn + let innerStart = start + tokenizer.delimiterOpen.length; + let innerEnd = end - tokenizer.delimiterClose.length; + while (isWhitespace(currentInput.charCodeAt(innerStart))) { + innerStart++; + } + while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) { + innerEnd--; + } + let exp = getSlice(innerStart, innerEnd); + if (exp.includes("&")) { + { + exp = currentOptions.decodeEntities(exp, false); + } + } + addNode({ + type: 5, + content: createExp(exp, false, getLoc(innerStart, innerEnd)), + loc: getLoc(start, end) + }); + }, + onopentagname(start, end) { + const name = getSlice(start, end); + currentOpenTag = { + type: 1, + tag: name, + ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns), + tagType: 0, + // will be refined on tag close + props: [], + children: [], + loc: getLoc(start - 1, end), + codegenNode: void 0 }; - } - function parseChildren(context, mode, ancestors) { - const parent = last(ancestors); - const ns = parent ? parent.ns : 0 /* HTML */; - const nodes = []; - while (!isEnd(context, mode, ancestors)) { - const s = context.source; - let node = undefined; - if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) { - if (!context.inVPre && startsWith(s, context.options.delimiters[0])) { - // '{{' - node = parseInterpolation(context, mode); - } - else if (mode === 0 /* DATA */ && s[0] === '<') { - // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state - if (s.length === 1) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1); - } - else if (s[1] === '!') { - // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state - if (startsWith(s, '<!--')) { - node = parseComment(context); - } - else if (startsWith(s, '<!DOCTYPE')) { - // Ignore DOCTYPE by a limitation. - node = parseBogusComment(context); - } - else if (startsWith(s, '<![CDATA[')) { - if (ns !== 0 /* HTML */) { - node = parseCDATA(context, ancestors); - } - else { - emitError(context, 1 /* CDATA_IN_HTML_CONTENT */); - node = parseBogusComment(context); - } - } - else { - emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */); - node = parseBogusComment(context); - } - } - else if (s[1] === '/') { - // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state - if (s.length === 2) { - emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2); - } - else if (s[2] === '>') { - emitError(context, 14 /* MISSING_END_TAG_NAME */, 2); - advanceBy(context, 3); - continue; - } - else if (/[a-z]/i.test(s[2])) { - emitError(context, 23 /* X_INVALID_END_TAG */); - parseTag(context, 1 /* End */, parent); - continue; - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2); - node = parseBogusComment(context); - } - } - else if (/[a-z]/i.test(s[1])) { - node = parseElement(context, ancestors); - } - else if (s[1] === '?') { - emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1); - node = parseBogusComment(context); - } - else { - emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1); - } - } - } - if (!node) { - node = parseText(context, mode); - } - if (isArray(node)) { - for (let i = 0; i < node.length; i++) { - pushNode(nodes, node[i]); - } - } - else { - pushNode(nodes, node); + }, + onopentagend(end) { + endOpenTag(end); + }, + onclosetag(start, end) { + const name = getSlice(start, end); + if (!currentOptions.isVoidTag(name)) { + let found = false; + for (let i = 0; i < stack.length; i++) { + const e = stack[i]; + if (e.tag.toLowerCase() === name.toLowerCase()) { + found = true; + if (i > 0) { + emitError(24, stack[0].loc.start.offset); + } + for (let j = 0; j <= i; j++) { + const el = stack.shift(); + onCloseTag(el, end, j < i); + } + break; } + } + if (!found) { + emitError(23, backTrack(start, 60)); + } } - // Whitespace handling strategy like v2 - let removedWhitespace = false; - if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) { - const shouldCondense = context.options.whitespace !== 'preserve'; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!context.inPre && node.type === 2 /* TEXT */) { - if (!/[^\t\r\n\f ]/.test(node.content)) { - const prev = nodes[i - 1]; - const next = nodes[i + 1]; - // Remove if: - // - the whitespace is the first or last node, or: - // - (condense mode) the whitespace is adjacent to a comment, or: - // - (condense mode) the whitespace is between two elements AND contains newline - if (!prev || - !next || - (shouldCondense && - (prev.type === 3 /* COMMENT */ || - next.type === 3 /* COMMENT */ || - (prev.type === 1 /* ELEMENT */ && - next.type === 1 /* ELEMENT */ && - /[\r\n]/.test(node.content))))) { - removedWhitespace = true; - nodes[i] = null; - } - else { - // Otherwise, the whitespace is condensed into a single space - node.content = ' '; - } - } - else if (shouldCondense) { - // in condense mode, consecutive whitespaces in text are condensed - // down to a single space. - node.content = node.content.replace(/[\t\r\n\f ]+/g, ' '); - } - } - // Remove comment nodes if desired by configuration. - else if (node.type === 3 /* COMMENT */ && !context.options.comments) { - removedWhitespace = true; - nodes[i] = null; - } - } - if (context.inPre && parent && context.options.isPreTag(parent.tag)) { - // remove leading newline per html spec - // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element - const first = nodes[0]; - if (first && first.type === 2 /* TEXT */) { - first.content = first.content.replace(/^\r?\n/, ''); - } - } + }, + onselfclosingtag(end) { + var _a; + const name = currentOpenTag.tag; + currentOpenTag.isSelfClosing = true; + endOpenTag(end); + if (((_a = stack[0]) == null ? void 0 : _a.tag) === name) { + onCloseTag(stack.shift(), end); } - return removedWhitespace ? nodes.filter(Boolean) : nodes; - } - function pushNode(nodes, node) { - if (node.type === 2 /* TEXT */) { - const prev = last(nodes); - // Merge if both this and the previous node are text and those are - // consecutive. This happens for cases like "a < b". - if (prev && - prev.type === 2 /* TEXT */ && - prev.loc.end.offset === node.loc.start.offset) { - prev.content += node.content; - prev.loc.end = node.loc.end; - prev.loc.source += node.loc.source; - return; - } - } - nodes.push(node); - } - function parseCDATA(context, ancestors) { - advanceBy(context, 9); - const nodes = parseChildren(context, 3 /* CDATA */, ancestors); - if (context.source.length === 0) { - emitError(context, 6 /* EOF_IN_CDATA */); - } - else { - advanceBy(context, 3); - } - return nodes; - } - function parseComment(context) { - const start = getCursor(context); - let content; - // Regular comment. - const match = /--(\!)?>/.exec(context.source); - if (!match) { - content = context.source.slice(4); - advanceBy(context, context.source.length); - emitError(context, 7 /* EOF_IN_COMMENT */); - } - else { - if (match.index <= 3) { - emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */); - } - if (match[1]) { - emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */); - } - content = context.source.slice(4, match.index); - // Advancing with reporting nested comments. - const s = context.source.slice(0, match.index); - let prevIndex = 1, nestedIndex = 0; - while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) { - advanceBy(context, nestedIndex - prevIndex + 1); - if (nestedIndex + 4 < s.length) { - emitError(context, 16 /* NESTED_COMMENT */); - } - prevIndex = nestedIndex + 1; - } - advanceBy(context, match.index + match[0].length - prevIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) + }, + onattribname(start, end) { + currentProp = { + type: 6, + name: getSlice(start, end), + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) }; - } - function parseBogusComment(context) { - const start = getCursor(context); - const contentStart = context.source[1] === '?' ? 1 : 2; - let content; - const closeIndex = context.source.indexOf('>'); - if (closeIndex === -1) { - content = context.source.slice(contentStart); - advanceBy(context, context.source.length); + }, + ondirname(start, end) { + const raw = getSlice(start, end); + const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2); + if (!inVPre && name === "") { + emitError(26, start); } - else { - content = context.source.slice(contentStart, closeIndex); - advanceBy(context, closeIndex + 1); - } - return { - type: 3 /* COMMENT */, - content, - loc: getSelection(context, start) - }; - } - function parseElement(context, ancestors) { - // Start tag. - const wasInPre = context.inPre; - const wasInVPre = context.inVPre; - const parent = last(ancestors); - const element = parseTag(context, 0 /* Start */, parent); - const isPreBoundary = context.inPre && !wasInPre; - const isVPreBoundary = context.inVPre && !wasInVPre; - if (element.isSelfClosing || context.options.isVoidTag(element.tag)) { - // #4030 self-closing <pre> tag - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - // Children. - ancestors.push(element); - const mode = context.options.getTextMode(element, parent); - const children = parseChildren(context, mode, ancestors); - ancestors.pop(); - element.children = children; - // End tag. - if (startsWithEndTagOpen(context.source, element.tag)) { - parseTag(context, 1 /* End */, parent); - } - else { - emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start); - if (context.source.length === 0 && element.tag.toLowerCase() === 'script') { - const first = children[0]; - if (first && startsWith(first.loc.source, '<!--')) { - emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */); - } - } - } - element.loc = getSelection(context, element.loc.start); - if (isPreBoundary) { - context.inPre = false; - } - if (isVPreBoundary) { - context.inVPre = false; - } - return element; - } - const isSpecialTemplateDirective = /*#__PURE__*/ makeMap(`if,else,else-if,for,slot`); - function parseTag(context, type, parent) { - // Tag open. - const start = getCursor(context); - const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source); - const tag = match[1]; - const ns = context.options.getNamespace(tag, parent); - advanceBy(context, match[0].length); - advanceSpaces(context); - // save current state in case we need to re-parse attributes with v-pre - const cursor = getCursor(context); - const currentSource = context.source; - // check <pre> tag - if (context.options.isPreTag(tag)) { - context.inPre = true; - } - // Attributes. - let props = parseAttributes(context, type); - // check v-pre - if (type === 0 /* Start */ && - !context.inVPre && - props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) { - context.inVPre = true; - // reset context - extend(context, cursor); - context.source = currentSource; - // re-parse attrs and filter out v-pre itself - props = parseAttributes(context, type).filter(p => p.name !== 'v-pre'); - } - // Tag close. - let isSelfClosing = false; - if (context.source.length === 0) { - emitError(context, 9 /* EOF_IN_TAG */); - } - else { - isSelfClosing = startsWith(context.source, '/>'); - if (type === 1 /* End */ && isSelfClosing) { - emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */); - } - advanceBy(context, isSelfClosing ? 2 : 1); - } - if (type === 1 /* End */) { - return; - } - let tagType = 0 /* ELEMENT */; - if (!context.inVPre) { - if (tag === 'slot') { - tagType = 2 /* SLOT */; - } - else if (tag === 'template') { - if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) { - tagType = 3 /* TEMPLATE */; - } - } - else if (isComponent(tag, props, context)) { - tagType = 1 /* COMPONENT */; - } - } - return { - type: 1 /* ELEMENT */, - ns, - tag, - tagType, - props, - isSelfClosing, - children: [], - loc: getSelection(context, start), - codegenNode: undefined // to be created during transform phase - }; - } - function isComponent(tag, props, context) { - const options = context.options; - if (options.isCustomElement(tag)) { - return false; - } - if (tag === 'component' || - /^[A-Z]/.test(tag) || - isCoreComponent(tag) || - (options.isBuiltInComponent && options.isBuiltInComponent(tag)) || - (options.isNativeTag && !options.isNativeTag(tag))) { - return true; - } - // at this point the tag should be a native tag, but check for potential "is" - // casting - for (let i = 0; i < props.length; i++) { - const p = props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.name === 'is' && p.value) { - if (p.value.content.startsWith('vue:')) { - return true; - } - } - } - else { - // directive - // v-is (TODO Deprecate) - if (p.name === 'is') { - return true; - } - else if ( - // :is on plain element - only treat as component in compat mode - p.name === 'bind' && - isStaticArgOf(p.arg, 'is') && - false && - checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) { - return true; - } - } - } - } - function parseAttributes(context, type) { - const props = []; - const attributeNames = new Set(); - while (context.source.length > 0 && - !startsWith(context.source, '>') && - !startsWith(context.source, '/>')) { - if (startsWith(context.source, '/')) { - emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */); - advanceBy(context, 1); - advanceSpaces(context); - continue; - } - if (type === 1 /* End */) { - emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */); - } - const attr = parseAttribute(context, attributeNames); - // Trim whitespace between class - // https://github.com/vuejs/core/issues/4251 - if (attr.type === 6 /* ATTRIBUTE */ && - attr.value && - attr.name === 'class') { - attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim(); - } - if (type === 0 /* Start */) { - props.push(attr); - } - if (/^[^\t\r\n\f />]/.test(context.source)) { - emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */); - } - advanceSpaces(context); - } - return props; - } - function parseAttribute(context, nameSet) { - // Name. - const start = getCursor(context); - const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source); - const name = match[0]; - if (nameSet.has(name)) { - emitError(context, 2 /* DUPLICATE_ATTRIBUTE */); - } - nameSet.add(name); - if (name[0] === '=') { - emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */); - } - { - const pattern = /["'<]/g; - let m; - while ((m = pattern.exec(name))) { - emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index); - } - } - advanceBy(context, name.length); - // Value - let value = undefined; - if (/^[\t\r\n\f ]*=/.test(context.source)) { - advanceSpaces(context); - advanceBy(context, 1); - advanceSpaces(context); - value = parseAttributeValue(context); - if (!value) { - emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */); - } - } - const loc = getSelection(context, start); - if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) { - const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name); - let isPropShorthand = startsWith(name, '.'); - let dirName = match[1] || - (isPropShorthand || startsWith(name, ':') - ? 'bind' - : startsWith(name, '@') - ? 'on' - : 'slot'); - let arg; - if (match[2]) { - const isSlot = dirName === 'slot'; - const startOffset = name.lastIndexOf(match[2]); - const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length)); - let content = match[2]; - let isStatic = true; - if (content.startsWith('[')) { - isStatic = false; - if (!content.endsWith(']')) { - emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */); - content = content.slice(1); - } - else { - content = content.slice(1, content.length - 1); - } - } - else if (isSlot) { - // #1241 special case for v-slot: vuetify relies extensively on slot - // names containing dots. v-slot doesn't have any modifiers and Vue 2.x - // supports such usage so we are keeping it consistent with 2.x. - content += match[3] || ''; - } - arg = { - type: 4 /* SIMPLE_EXPRESSION */, - content, - isStatic, - constType: isStatic - ? 3 /* CAN_STRINGIFY */ - : 0 /* NOT_CONSTANT */, - loc - }; - } - if (value && value.isQuoted) { - const valueLoc = value.loc; - valueLoc.start.offset++; - valueLoc.start.column++; - valueLoc.end = advancePositionWithClone(valueLoc.start, value.content); - valueLoc.source = valueLoc.source.slice(1, -1); - } - const modifiers = match[3] ? match[3].slice(1).split('.') : []; - if (isPropShorthand) - modifiers.push('prop'); - return { - type: 7 /* DIRECTIVE */, - name: dirName, - exp: value && { - type: 4 /* SIMPLE_EXPRESSION */, - content: value.content, - isStatic: false, - // Treat as non-constant by default. This can be potentially set to - // other values by `transformExpression` to make it eligible for hoisting. - constType: 0 /* NOT_CONSTANT */, - loc: value.loc - }, - arg, - modifiers, - loc - }; - } - // missing directive name or illegal directive name - if (!context.inVPre && startsWith(name, 'v-')) { - emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */); - } - return { - type: 6 /* ATTRIBUTE */, + if (inVPre || name === "") { + currentProp = { + type: 6, + name: raw, + nameLoc: getLoc(start, end), + value: void 0, + loc: getLoc(start) + }; + } else { + currentProp = { + type: 7, name, - value: value && { - type: 2 /* TEXT */, - content: value.content, - loc: value.loc - }, - loc + rawName: raw, + exp: void 0, + arg: void 0, + modifiers: raw === "." ? ["prop"] : [], + loc: getLoc(start) + }; + if (name === "pre") { + inVPre = tokenizer.inVPre = true; + currentVPreBoundary = currentOpenTag; + const props = currentOpenTag.props; + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7) { + props[i] = dirToAttr(props[i]); + } + } + } + } + }, + ondirarg(start, end) { + if (start === end) + return; + const arg = getSlice(start, end); + if (inVPre) { + currentProp.name += arg; + setLocEnd(currentProp.nameLoc, end); + } else { + const isStatic = arg[0] !== `[`; + currentProp.arg = createExp( + isStatic ? arg : arg.slice(1, -1), + isStatic, + getLoc(start, end), + isStatic ? 3 : 0 + ); + } + }, + ondirmodifier(start, end) { + const mod = getSlice(start, end); + if (inVPre) { + currentProp.name += "." + mod; + setLocEnd(currentProp.nameLoc, end); + } else if (currentProp.name === "slot") { + const arg = currentProp.arg; + if (arg) { + arg.content += "." + mod; + setLocEnd(arg.loc, end); + } + } else { + currentProp.modifiers.push(mod); + } + }, + onattribdata(start, end) { + currentAttrValue += getSlice(start, end); + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribentity(char, start, end) { + currentAttrValue += char; + if (currentAttrStartIndex < 0) + currentAttrStartIndex = start; + currentAttrEndIndex = end; + }, + onattribnameend(end) { + const start = currentProp.loc.start.offset; + const name = getSlice(start, end); + if (currentProp.type === 7) { + currentProp.rawName = name; + } + if (currentOpenTag.props.some( + (p) => (p.type === 7 ? p.rawName : p.name) === name + )) { + emitError(2, start); + } + }, + onattribend(quote, end) { + if (currentOpenTag && currentProp) { + setLocEnd(currentProp.loc, end); + if (quote !== 0) { + if (currentAttrValue.includes("&")) { + currentAttrValue = currentOptions.decodeEntities( + currentAttrValue, + true + ); + } + if (currentProp.type === 6) { + if (currentProp.name === "class") { + currentAttrValue = condense(currentAttrValue).trim(); + } + if (quote === 1 && !currentAttrValue) { + emitError(13, end); + } + currentProp.value = { + type: 2, + content: currentAttrValue, + loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1) + }; + if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") { + tokenizer.enterRCDATA(toCharCodes(`</template`), 0); + } + } else { + let expParseMode = 0 /* Normal */; + currentProp.exp = createExp( + currentAttrValue, + false, + getLoc(currentAttrStartIndex, currentAttrEndIndex), + 0, + expParseMode + ); + if (currentProp.name === "for") { + currentProp.forParseResult = parseForExpression(currentProp.exp); + } + } + } + if (currentProp.type !== 7 || currentProp.name !== "pre") { + currentOpenTag.props.push(currentProp); + } + } + currentAttrValue = ""; + currentAttrStartIndex = currentAttrEndIndex = -1; + }, + oncomment(start, end) { + if (currentOptions.comments) { + addNode({ + type: 3, + content: getSlice(start, end), + loc: getLoc(start - 4, end + 3) + }); + } + }, + onend() { + const end = currentInput.length; + if (tokenizer.state !== 1) { + switch (tokenizer.state) { + case 5: + case 8: + emitError(5, end); + break; + case 3: + case 4: + emitError( + 25, + tokenizer.sectionStart + ); + break; + case 28: + if (tokenizer.currentSequence === Sequences.CdataEnd) { + emitError(6, end); + } else { + emitError(7, end); + } + break; + case 6: + case 7: + case 9: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + emitError(9, end); + break; + } + } + for (let index = 0; index < stack.length; index++) { + onCloseTag(stack[index], end - 1); + emitError(24, stack[index].loc.start.offset); + } + }, + oncdata(start, end) { + if (stack[0].ns !== 0) { + onText(getSlice(start, end), start, end); + } else { + emitError(1, start - 9); + } + }, + onprocessinginstruction(start) { + if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + emitError( + 21, + start - 1 + ); + } + } + }); + const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; + const stripParensRE = /^\(|\)$/g; + function parseForExpression(input) { + const loc = input.loc; + const exp = input.content; + const inMatch = exp.match(forAliasRE); + if (!inMatch) + return; + const [, LHS, RHS] = inMatch; + const createAliasExpression = (content, offset, asParam = false) => { + const start = loc.start.offset + offset; + const end = start + content.length; + return createExp( + content, + false, + getLoc(start, end), + 0, + asParam ? 1 /* Params */ : 0 /* Normal */ + ); + }; + const result = { + source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)), + value: void 0, + key: void 0, + index: void 0, + finalized: false + }; + let valueContent = LHS.trim().replace(stripParensRE, "").trim(); + const trimmedOffset = LHS.indexOf(valueContent); + const iteratorMatch = valueContent.match(forIteratorRE); + if (iteratorMatch) { + valueContent = valueContent.replace(forIteratorRE, "").trim(); + const keyContent = iteratorMatch[1].trim(); + let keyOffset; + if (keyContent) { + keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); + result.key = createAliasExpression(keyContent, keyOffset, true); + } + if (iteratorMatch[2]) { + const indexContent = iteratorMatch[2].trim(); + if (indexContent) { + result.index = createAliasExpression( + indexContent, + exp.indexOf( + indexContent, + result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length + ), + true + ); + } + } + } + if (valueContent) { + result.value = createAliasExpression(valueContent, trimmedOffset, true); + } + return result; + } + function getSlice(start, end) { + return currentInput.slice(start, end); + } + function endOpenTag(end) { + if (tokenizer.inSFCRoot) { + currentOpenTag.innerLoc = getLoc(end + 1, end + 1); + } + addNode(currentOpenTag); + const { tag, ns } = currentOpenTag; + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre++; + } + if (currentOptions.isVoidTag(tag)) { + onCloseTag(currentOpenTag, end); + } else { + stack.unshift(currentOpenTag); + if (ns === 1 || ns === 2) { + tokenizer.inXML = true; + } + } + currentOpenTag = null; + } + function onText(content, start, end) { + var _a; + { + const tag = (_a = stack[0]) == null ? void 0 : _a.tag; + if (tag !== "script" && tag !== "style" && content.includes("&")) { + content = currentOptions.decodeEntities(content, false); + } + } + const parent = stack[0] || currentRoot; + const lastNode = parent.children[parent.children.length - 1]; + if ((lastNode == null ? void 0 : lastNode.type) === 2) { + lastNode.content += content; + setLocEnd(lastNode.loc, end); + } else { + parent.children.push({ + type: 2, + content, + loc: getLoc(start, end) + }); + } + } + function onCloseTag(el, end, isImplied = false) { + if (isImplied) { + setLocEnd(el.loc, backTrack(end, 60)); + } else { + setLocEnd(el.loc, end + 1); + } + if (tokenizer.inSFCRoot) { + if (el.children.length) { + el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end); + } else { + el.innerLoc.end = extend({}, el.innerLoc.start); + } + el.innerLoc.source = getSlice( + el.innerLoc.start.offset, + el.innerLoc.end.offset + ); + } + const { tag, ns } = el; + if (!inVPre) { + if (tag === "slot") { + el.tagType = 2; + } else if (isFragmentTemplate(el)) { + el.tagType = 3; + } else if (isComponent(el)) { + el.tagType = 1; + } + } + if (!tokenizer.inRCDATA) { + el.children = condenseWhitespace(el.children, el.tag); + } + if (ns === 0 && currentOptions.isPreTag(tag)) { + inPre--; + } + if (currentVPreBoundary === el) { + inVPre = tokenizer.inVPre = false; + currentVPreBoundary = null; + } + if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) { + tokenizer.inXML = false; + } + } + function backTrack(index, c) { + let i = index; + while (currentInput.charCodeAt(i) !== c && i >= 0) + i--; + return i; + } + const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]); + function isFragmentTemplate({ tag, props }) { + if (tag === "template") { + for (let i = 0; i < props.length; i++) { + if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) { + return true; + } + } + } + return false; + } + function isComponent({ tag, props }) { + var _a; + if (currentOptions.isCustomElement(tag)) { + return false; + } + if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || ((_a = currentOptions.isBuiltInComponent) == null ? void 0 : _a.call(currentOptions, tag)) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) { + return true; + } + for (let i = 0; i < props.length; i++) { + const p = props[i]; + if (p.type === 6) { + if (p.name === "is" && p.value) { + if (p.value.content.startsWith("vue:")) { + return true; + } + } + } + } + return false; + } + function isUpperCase(c) { + return c > 64 && c < 91; + } + const windowsNewlineRE = /\r\n/g; + function condenseWhitespace(nodes, tag) { + var _a, _b; + const shouldCondense = currentOptions.whitespace !== "preserve"; + let removedWhitespace = false; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (node.type === 2) { + if (!inPre) { + if (isAllWhitespace(node.content)) { + const prev = (_a = nodes[i - 1]) == null ? void 0 : _a.type; + const next = (_b = nodes[i + 1]) == null ? void 0 : _b.type; + if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) { + removedWhitespace = true; + nodes[i] = null; + } else { + node.content = " "; + } + } else if (shouldCondense) { + node.content = condense(node.content); + } + } else { + node.content = node.content.replace(windowsNewlineRE, "\n"); + } + } + } + if (inPre && tag && currentOptions.isPreTag(tag)) { + const first = nodes[0]; + if (first && first.type === 2) { + first.content = first.content.replace(/^\r?\n/, ""); + } + } + return removedWhitespace ? nodes.filter(Boolean) : nodes; + } + function isAllWhitespace(str) { + for (let i = 0; i < str.length; i++) { + if (!isWhitespace(str.charCodeAt(i))) { + return false; + } + } + return true; + } + function hasNewlineChar(str) { + for (let i = 0; i < str.length; i++) { + const c = str.charCodeAt(i); + if (c === 10 || c === 13) { + return true; + } + } + return false; + } + function condense(str) { + let ret = ""; + let prevCharIsWhitespace = false; + for (let i = 0; i < str.length; i++) { + if (isWhitespace(str.charCodeAt(i))) { + if (!prevCharIsWhitespace) { + ret += " "; + prevCharIsWhitespace = true; + } + } else { + ret += str[i]; + prevCharIsWhitespace = false; + } + } + return ret; + } + function addNode(node) { + (stack[0] || currentRoot).children.push(node); + } + function getLoc(start, end) { + return { + start: tokenizer.getPos(start), + // @ts-expect-error allow late attachment + end: end == null ? end : tokenizer.getPos(end), + // @ts-expect-error allow late attachment + source: end == null ? end : getSlice(start, end) + }; + } + function setLocEnd(loc, end) { + loc.end = tokenizer.getPos(end); + loc.source = getSlice(loc.start.offset, end); + } + function dirToAttr(dir) { + const attr = { + type: 6, + name: dir.rawName, + nameLoc: getLoc( + dir.loc.start.offset, + dir.loc.start.offset + dir.rawName.length + ), + value: void 0, + loc: dir.loc + }; + if (dir.exp) { + const loc = dir.exp.loc; + if (loc.end.offset < dir.loc.end.offset) { + loc.start.offset--; + loc.start.column--; + loc.end.offset++; + loc.end.column++; + } + attr.value = { + type: 2, + content: dir.exp.content, + loc }; + } + return attr; } - function parseAttributeValue(context) { - const start = getCursor(context); - let content; - const quote = context.source[0]; - const isQuoted = quote === `"` || quote === `'`; - if (isQuoted) { - // Quoted value. - advanceBy(context, 1); - const endIndex = context.source.indexOf(quote); - if (endIndex === -1) { - content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */); - } - else { - content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */); - advanceBy(context, 1); - } + function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) { + const exp = createSimpleExpression(content, isStatic, loc, constType); + return exp; + } + function emitError(code, index, message) { + currentOptions.onError( + createCompilerError(code, getLoc(index, index), void 0, message) + ); + } + function reset() { + tokenizer.reset(); + currentOpenTag = null; + currentProp = null; + currentAttrValue = ""; + currentAttrStartIndex = -1; + currentAttrEndIndex = -1; + stack.length = 0; + } + function baseParse(input, options) { + reset(); + currentInput = input; + currentOptions = extend({}, defaultParserOptions); + if (options) { + let key; + for (key in options) { + if (options[key] != null) { + currentOptions[key] = options[key]; + } } - else { - // Unquoted - const match = /^[^\t\r\n\f >]+/.exec(context.source); - if (!match) { - return undefined; - } - const unexpectedChars = /["'<=`]/g; - let m; - while ((m = unexpectedChars.exec(match[0]))) { - emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index); - } - content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */); + } + { + if (!currentOptions.decodeEntities) { + throw new Error( + `[@vue/compiler-core] decodeEntities option is required in browser builds.` + ); } - return { content, isQuoted, loc: getSelection(context, start) }; - } - function parseInterpolation(context, mode) { - const [open, close] = context.options.delimiters; - const closeIndex = context.source.indexOf(close, open.length); - if (closeIndex === -1) { - emitError(context, 25 /* X_MISSING_INTERPOLATION_END */); - return undefined; - } - const start = getCursor(context); - advanceBy(context, open.length); - const innerStart = getCursor(context); - const innerEnd = getCursor(context); - const rawContentLength = closeIndex - open.length; - const rawContent = context.source.slice(0, rawContentLength); - const preTrimContent = parseTextData(context, rawContentLength, mode); - const content = preTrimContent.trim(); - const startOffset = preTrimContent.indexOf(content); - if (startOffset > 0) { - advancePositionWithMutation(innerStart, rawContent, startOffset); - } - const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset); - advancePositionWithMutation(innerEnd, rawContent, endOffset); - advanceBy(context, close.length); - return { - type: 5 /* INTERPOLATION */, - content: { - type: 4 /* SIMPLE_EXPRESSION */, - isStatic: false, - // Set `isConstant` to false by default and will decide in transformExpression - constType: 0 /* NOT_CONSTANT */, - content, - loc: getSelection(context, innerStart, innerEnd) - }, - loc: getSelection(context, start) - }; - } - function parseText(context, mode) { - const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]]; - let endIndex = context.source.length; - for (let i = 0; i < endTokens.length; i++) { - const index = context.source.indexOf(endTokens[i], 1); - if (index !== -1 && endIndex > index) { - endIndex = index; - } - } - const start = getCursor(context); - const content = parseTextData(context, endIndex, mode); - return { - type: 2 /* TEXT */, - content, - loc: getSelection(context, start) - }; - } - /** - * Get text data with a given length from the current location. - * This translates HTML entities in the text data. - */ - function parseTextData(context, length, mode) { - const rawText = context.source.slice(0, length); - advanceBy(context, length); - if (mode === 2 /* RAWTEXT */ || - mode === 3 /* CDATA */ || - !rawText.includes('&')) { - return rawText; - } - else { - // DATA or RCDATA containing "&"". Entity decoding required. - return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */); - } - } - function getCursor(context) { - const { column, line, offset } = context; - return { column, line, offset }; - } - function getSelection(context, start, end) { - end = end || getCursor(context); - return { - start, - end, - source: context.originalSource.slice(start.offset, end.offset) - }; - } - function last(xs) { - return xs[xs.length - 1]; - } - function startsWith(source, searchString) { - return source.startsWith(searchString); - } - function advanceBy(context, numberOfCharacters) { - const { source } = context; - advancePositionWithMutation(context, source, numberOfCharacters); - context.source = source.slice(numberOfCharacters); - } - function advanceSpaces(context) { - const match = /^[\t\r\n\f ]+/.exec(context.source); - if (match) { - advanceBy(context, match[0].length); - } - } - function getNewPosition(context, start, numberOfCharacters) { - return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters); - } - function emitError(context, code, offset, loc = getCursor(context)) { - if (offset) { - loc.offset += offset; - loc.column += offset; - } - context.options.onError(createCompilerError(code, { - start: loc, - end: loc, - source: '' - })); - } - function isEnd(context, mode, ancestors) { - const s = context.source; - switch (mode) { - case 0 /* DATA */: - if (startsWith(s, '</')) { - // TODO: probably bad performance - for (let i = ancestors.length - 1; i >= 0; --i) { - if (startsWithEndTagOpen(s, ancestors[i].tag)) { - return true; - } - } - } - break; - case 1 /* RCDATA */: - case 2 /* RAWTEXT */: { - const parent = last(ancestors); - if (parent && startsWithEndTagOpen(s, parent.tag)) { - return true; - } - break; - } - case 3 /* CDATA */: - if (startsWith(s, ']]>')) { - return true; - } - break; - } - return !s; - } - function startsWithEndTagOpen(source, tag) { - return (startsWith(source, '</') && - source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() && - /[\t\r\n\f />]/.test(source[2 + tag.length] || '>')); + } + tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0; + tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2; + const delimiters = options == null ? void 0 : options.delimiters; + if (delimiters) { + tokenizer.delimiterOpen = toCharCodes(delimiters[0]); + tokenizer.delimiterClose = toCharCodes(delimiters[1]); + } + const root = currentRoot = createRoot([], input); + tokenizer.parse(currentInput); + root.loc = getLoc(0, input.length); + root.children = condenseWhitespace(root.children); + currentRoot = null; + return root; } function hoistStatic(root, context) { - walk(root, context, + walk( + root, + context, // Root node is unfortunately non-hoistable due to potential parent // fallthrough attributes. - isSingleElementRoot(root, root.children[0])); + isSingleElementRoot(root, root.children[0]) + ); } function isSingleElementRoot(root, child) { - const { children } = root; - return (children.length === 1 && - child.type === 1 /* ELEMENT */ && - !isSlotOutlet(child)); + const { children } = root; + return children.length === 1 && child.type === 1 && !isSlotOutlet(child); } function walk(node, context, doNotHoistNode = false) { - const { children } = node; - const originalCount = children.length; - let hoistedCount = 0; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - // only plain elements & text calls are eligible for hoisting. - if (child.type === 1 /* ELEMENT */ && - child.tagType === 0 /* ELEMENT */) { - const constantType = doNotHoistNode - ? 0 /* NOT_CONSTANT */ - : getConstantType(child, context); - if (constantType > 0 /* NOT_CONSTANT */) { - if (constantType >= 2 /* CAN_HOIST */) { - child.codegenNode.patchFlag = - -1 /* HOISTED */ + (` /* HOISTED */` ); - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - continue; - } - } - else { - // node may contain dynamic children, but its props may be eligible for - // hoisting. - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - const flag = getPatchFlag(codegenNode); - if ((!flag || - flag === 512 /* NEED_PATCH */ || - flag === 1 /* TEXT */) && - getGeneratedPropsConstantType(child, context) >= - 2 /* CAN_HOIST */) { - const props = getNodeProps(child); - if (props) { - codegenNode.props = context.hoist(props); - } - } - if (codegenNode.dynamicProps) { - codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); - } - } - } + const { children } = node; + const originalCount = children.length; + let hoistedCount = 0; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.type === 1 && child.tagType === 0) { + const constantType = doNotHoistNode ? 0 : getConstantType(child, context); + if (constantType > 0) { + if (constantType >= 2) { + child.codegenNode.patchFlag = -1 + (` /* HOISTED */` ); + child.codegenNode = context.hoist(child.codegenNode); + hoistedCount++; + continue; } - else if (child.type === 12 /* TEXT_CALL */ && - getConstantType(child.content, context) >= 2 /* CAN_HOIST */) { - child.codegenNode = context.hoist(child.codegenNode); - hoistedCount++; - } - // walk further - if (child.type === 1 /* ELEMENT */) { - const isComponent = child.tagType === 1 /* COMPONENT */; - if (isComponent) { - context.scopes.vSlot++; - } - walk(child, context); - if (isComponent) { - context.scopes.vSlot--; - } - } - else if (child.type === 11 /* FOR */) { - // Do not hoist v-for single child because it has to be a block - walk(child, context, child.children.length === 1); - } - else if (child.type === 9 /* IF */) { - for (let i = 0; i < child.branches.length; i++) { - // Do not hoist v-if single child because it has to be a block - walk(child.branches[i], context, child.branches[i].children.length === 1); + } else { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + const flag = getPatchFlag(codegenNode); + if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) { + const props = getNodeProps(child); + if (props) { + codegenNode.props = context.hoist(props); } + } + if (codegenNode.dynamicProps) { + codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps); + } } + } } - if (hoistedCount && context.transformHoist) { - context.transformHoist(children, context, node); + if (child.type === 1) { + const isComponent = child.tagType === 1; + if (isComponent) { + context.scopes.vSlot++; + } + walk(child, context); + if (isComponent) { + context.scopes.vSlot--; + } + } else if (child.type === 11) { + walk(child, context, child.children.length === 1); + } else if (child.type === 9) { + for (let i2 = 0; i2 < child.branches.length; i2++) { + walk( + child.branches[i2], + context, + child.branches[i2].children.length === 1 + ); + } } - // all children were hoisted - the entire children array is hoistable. - if (hoistedCount && - hoistedCount === originalCount && - node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - node.codegenNode && - node.codegenNode.type === 13 /* VNODE_CALL */ && - isArray(node.codegenNode.children)) { - node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children)); + } + if (hoistedCount && context.transformHoist) { + context.transformHoist(children, context, node); + } + if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) { + const hoisted = context.hoist( + createArrayExpression(node.codegenNode.children) + ); + if (context.hmr) { + hoisted.content = `[...${hoisted.content}]`; } + node.codegenNode.children = hoisted; + } } function getConstantType(node, context) { - const { constantCache } = context; - switch (node.type) { - case 1 /* ELEMENT */: - if (node.tagType !== 0 /* ELEMENT */) { - return 0 /* NOT_CONSTANT */; + const { constantCache } = context; + switch (node.type) { + case 1: + if (node.tagType !== 0) { + return 0; + } + const cached = constantCache.get(node); + if (cached !== void 0) { + return cached; + } + const codegenNode = node.codegenNode; + if (codegenNode.type !== 13) { + return 0; + } + if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") { + return 0; + } + const flag = getPatchFlag(codegenNode); + if (!flag) { + let returnType2 = 3; + const generatedPropsType = getGeneratedPropsConstantType(node, context); + if (generatedPropsType === 0) { + constantCache.set(node, 0); + return 0; + } + if (generatedPropsType < returnType2) { + returnType2 = generatedPropsType; + } + for (let i = 0; i < node.children.length; i++) { + const childType = getConstantType(node.children[i], context); + if (childType === 0) { + constantCache.set(node, 0); + return 0; + } + if (childType < returnType2) { + returnType2 = childType; + } + } + if (returnType2 > 1) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7 && p.name === "bind" && p.exp) { + const expType = getConstantType(p.exp, context); + if (expType === 0) { + constantCache.set(node, 0); + return 0; + } + if (expType < returnType2) { + returnType2 = expType; + } } - const cached = constantCache.get(node); - if (cached !== undefined) { - return cached; + } + } + if (codegenNode.isBlock) { + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 7) { + constantCache.set(node, 0); + return 0; } - const codegenNode = node.codegenNode; - if (codegenNode.type !== 13 /* VNODE_CALL */) { - return 0 /* NOT_CONSTANT */; - } - if (codegenNode.isBlock && - node.tag !== 'svg' && - node.tag !== 'foreignObject') { - return 0 /* NOT_CONSTANT */; - } - const flag = getPatchFlag(codegenNode); - if (!flag) { - let returnType = 3 /* CAN_STRINGIFY */; - // Element itself has no patch flag. However we still need to check: - // 1. Even for a node with no patch flag, it is possible for it to contain - // non-hoistable expressions that refers to scope variables, e.g. compiler - // injected keys or cached event handlers. Therefore we need to always - // check the codegenNode's props to be sure. - const generatedPropsType = getGeneratedPropsConstantType(node, context); - if (generatedPropsType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (generatedPropsType < returnType) { - returnType = generatedPropsType; - } - // 2. its children. - for (let i = 0; i < node.children.length; i++) { - const childType = getConstantType(node.children[i], context); - if (childType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (childType < returnType) { - returnType = childType; - } - } - // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0 - // type, check if any of the props can cause the type to be lowered - // we can skip can_patch because it's guaranteed by the absence of a - // patchFlag. - if (returnType > 1 /* CAN_SKIP_PATCH */) { - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) { - const expType = getConstantType(p.exp, context); - if (expType === 0 /* NOT_CONSTANT */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - if (expType < returnType) { - returnType = expType; - } - } - } - } - // only svg/foreignObject could be block here, however if they are - // static then they don't need to be blocks since there will be no - // nested updates. - if (codegenNode.isBlock) { - // except set custom directives. - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 7 /* DIRECTIVE */) { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - } - context.removeHelper(OPEN_BLOCK); - context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)); - codegenNode.isBlock = false; - context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); - } - constantCache.set(node, returnType); - return returnType; - } - else { - constantCache.set(node, 0 /* NOT_CONSTANT */); - return 0 /* NOT_CONSTANT */; - } - case 2 /* TEXT */: - case 3 /* COMMENT */: - return 3 /* CAN_STRINGIFY */; - case 9 /* IF */: - case 11 /* FOR */: - case 10 /* IF_BRANCH */: - return 0 /* NOT_CONSTANT */; - case 5 /* INTERPOLATION */: - case 12 /* TEXT_CALL */: - return getConstantType(node.content, context); - case 4 /* SIMPLE_EXPRESSION */: - return node.constType; - case 8 /* COMPOUND_EXPRESSION */: - let returnType = 3 /* CAN_STRINGIFY */; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child) || isSymbol(child)) { - continue; - } - const childType = getConstantType(child, context); - if (childType === 0 /* NOT_CONSTANT */) { - return 0 /* NOT_CONSTANT */; - } - else if (childType < returnType) { - returnType = childType; - } - } - return returnType; - default: - return 0 /* NOT_CONSTANT */; - } + } + context.removeHelper(OPEN_BLOCK); + context.removeHelper( + getVNodeBlockHelper(context.inSSR, codegenNode.isComponent) + ); + codegenNode.isBlock = false; + context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent)); + } + constantCache.set(node, returnType2); + return returnType2; + } else { + constantCache.set(node, 0); + return 0; + } + case 2: + case 3: + return 3; + case 9: + case 11: + case 10: + return 0; + case 5: + case 12: + return getConstantType(node.content, context); + case 4: + return node.constType; + case 8: + let returnType = 3; + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child) || isSymbol(child)) { + continue; + } + const childType = getConstantType(child, context); + if (childType === 0) { + return 0; + } else if (childType < returnType) { + returnType = childType; + } + } + return returnType; + default: + return 0; + } } - const allowHoistedHelperSet = new Set([ - NORMALIZE_CLASS, - NORMALIZE_STYLE, - NORMALIZE_PROPS, - GUARD_REACTIVE_PROPS + const allowHoistedHelperSet = /* @__PURE__ */ new Set([ + NORMALIZE_CLASS, + NORMALIZE_STYLE, + NORMALIZE_PROPS, + GUARD_REACTIVE_PROPS ]); function getConstantTypeOfHelperCall(value, context) { - if (value.type === 14 /* JS_CALL_EXPRESSION */ && - !isString(value.callee) && - allowHoistedHelperSet.has(value.callee)) { - const arg = value.arguments[0]; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - return getConstantType(arg, context); - } - else if (arg.type === 14 /* JS_CALL_EXPRESSION */) { - // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))` - return getConstantTypeOfHelperCall(arg, context); - } + if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) { + const arg = value.arguments[0]; + if (arg.type === 4) { + return getConstantType(arg, context); + } else if (arg.type === 14) { + return getConstantTypeOfHelperCall(arg, context); } - return 0 /* NOT_CONSTANT */; + } + return 0; } function getGeneratedPropsConstantType(node, context) { - let returnType = 3 /* CAN_STRINGIFY */; - const props = getNodeProps(node); - if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) { - const { properties } = props; - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - const keyType = getConstantType(key, context); - if (keyType === 0 /* NOT_CONSTANT */) { - return keyType; - } - if (keyType < returnType) { - returnType = keyType; - } - let valueType; - if (value.type === 4 /* SIMPLE_EXPRESSION */) { - valueType = getConstantType(value, context); - } - else if (value.type === 14 /* JS_CALL_EXPRESSION */) { - // some helper calls can be hoisted, - // such as the `normalizeProps` generated by the compiler for pre-normalize class, - // in this case we need to respect the ConstantType of the helper's arguments - valueType = getConstantTypeOfHelperCall(value, context); - } - else { - valueType = 0 /* NOT_CONSTANT */; - } - if (valueType === 0 /* NOT_CONSTANT */) { - return valueType; - } - if (valueType < returnType) { - returnType = valueType; - } - } + let returnType = 3; + const props = getNodeProps(node); + if (props && props.type === 15) { + const { properties } = props; + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + const keyType = getConstantType(key, context); + if (keyType === 0) { + return keyType; + } + if (keyType < returnType) { + returnType = keyType; + } + let valueType; + if (value.type === 4) { + valueType = getConstantType(value, context); + } else if (value.type === 14) { + valueType = getConstantTypeOfHelperCall(value, context); + } else { + valueType = 0; + } + if (valueType === 0) { + return valueType; + } + if (valueType < returnType) { + returnType = valueType; + } } - return returnType; + } + return returnType; } function getNodeProps(node) { - const codegenNode = node.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - return codegenNode.props; - } + const codegenNode = node.codegenNode; + if (codegenNode.type === 13) { + return codegenNode.props; + } } function getPatchFlag(node) { - const flag = node.patchFlag; - return flag ? parseInt(flag, 10) : undefined; + const flag = node.patchFlag; + return flag ? parseInt(flag, 10) : void 0; } - function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) { - const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/); - const context = { - // options - selfName: nameMatch && capitalize(camelize(nameMatch[1])), - prefixIdentifiers, - hoistStatic, - cacheHandlers, - nodeTransforms, - directiveTransforms, - transformHoist, - isBuiltInComponent, - isCustomElement, - expressionPlugins, - scopeId, - slotted, - ssr, - inSSR, - ssrCssVars, - bindingMetadata, - inline, - isTS, - onError, - onWarn, - compatConfig, - // state - root, - helpers: new Map(), - components: new Set(), - directives: new Set(), - hoists: [], - imports: [], - constantCache: new Map(), - temps: 0, - cached: 0, - identifiers: Object.create(null), - scopes: { - vFor: 0, - vSlot: 0, - vPre: 0, - vOnce: 0 - }, - parent: null, - currentNode: root, - childIndex: 0, - inVOnce: false, - // methods - helper(name) { - const count = context.helpers.get(name) || 0; - context.helpers.set(name, count + 1); - return name; - }, - removeHelper(name) { - const count = context.helpers.get(name); - if (count) { - const currentCount = count - 1; - if (!currentCount) { - context.helpers.delete(name); - } - else { - context.helpers.set(name, currentCount); - } - } - }, - helperString(name) { - return `_${helperNameMap[context.helper(name)]}`; - }, - replaceNode(node) { - /* istanbul ignore if */ - { - if (!context.currentNode) { - throw new Error(`Node being replaced is already removed.`); - } - if (!context.parent) { - throw new Error(`Cannot replace root node.`); - } - } - context.parent.children[context.childIndex] = context.currentNode = node; - }, - removeNode(node) { - if (!context.parent) { - throw new Error(`Cannot remove root node.`); - } - const list = context.parent.children; - const removalIndex = node - ? list.indexOf(node) - : context.currentNode - ? context.childIndex - : -1; - /* istanbul ignore if */ - if (removalIndex < 0) { - throw new Error(`node being removed is not a child of current parent`); - } - if (!node || node === context.currentNode) { - // current node removed - context.currentNode = null; - context.onNodeRemoved(); - } - else { - // sibling node removed - if (context.childIndex > removalIndex) { - context.childIndex--; - context.onNodeRemoved(); - } - } - context.parent.children.splice(removalIndex, 1); - }, - onNodeRemoved: () => { }, - addIdentifiers(exp) { - }, - removeIdentifiers(exp) { - }, - hoist(exp) { - if (isString(exp)) - exp = createSimpleExpression(exp); - context.hoists.push(exp); - const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */); - identifier.hoisted = exp; - return identifier; - }, - cache(exp, isVNode = false) { - return createCacheExpression(context.cached++, exp, isVNode); + function createTransformContext(root, { + filename = "", + prefixIdentifiers = false, + hoistStatic: hoistStatic2 = false, + hmr = false, + cacheHandlers = false, + nodeTransforms = [], + directiveTransforms = {}, + transformHoist = null, + isBuiltInComponent = NOOP, + isCustomElement = NOOP, + expressionPlugins = [], + scopeId = null, + slotted = true, + ssr = false, + inSSR = false, + ssrCssVars = ``, + bindingMetadata = EMPTY_OBJ, + inline = false, + isTS = false, + onError = defaultOnError, + onWarn = defaultOnWarn, + compatConfig + }) { + const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/); + const context = { + // options + filename, + selfName: nameMatch && capitalize(camelize(nameMatch[1])), + prefixIdentifiers, + hoistStatic: hoistStatic2, + hmr, + cacheHandlers, + nodeTransforms, + directiveTransforms, + transformHoist, + isBuiltInComponent, + isCustomElement, + expressionPlugins, + scopeId, + slotted, + ssr, + inSSR, + ssrCssVars, + bindingMetadata, + inline, + isTS, + onError, + onWarn, + compatConfig, + // state + root, + helpers: /* @__PURE__ */ new Map(), + components: /* @__PURE__ */ new Set(), + directives: /* @__PURE__ */ new Set(), + hoists: [], + imports: [], + constantCache: /* @__PURE__ */ new WeakMap(), + temps: 0, + cached: 0, + identifiers: /* @__PURE__ */ Object.create(null), + scopes: { + vFor: 0, + vSlot: 0, + vPre: 0, + vOnce: 0 + }, + parent: null, + currentNode: root, + childIndex: 0, + inVOnce: false, + // methods + helper(name) { + const count = context.helpers.get(name) || 0; + context.helpers.set(name, count + 1); + return name; + }, + removeHelper(name) { + const count = context.helpers.get(name); + if (count) { + const currentCount = count - 1; + if (!currentCount) { + context.helpers.delete(name); + } else { + context.helpers.set(name, currentCount); } - }; - return context; + } + }, + helperString(name) { + return `_${helperNameMap[context.helper(name)]}`; + }, + replaceNode(node) { + { + if (!context.currentNode) { + throw new Error(`Node being replaced is already removed.`); + } + if (!context.parent) { + throw new Error(`Cannot replace root node.`); + } + } + context.parent.children[context.childIndex] = context.currentNode = node; + }, + removeNode(node) { + if (!context.parent) { + throw new Error(`Cannot remove root node.`); + } + const list = context.parent.children; + const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1; + if (removalIndex < 0) { + throw new Error(`node being removed is not a child of current parent`); + } + if (!node || node === context.currentNode) { + context.currentNode = null; + context.onNodeRemoved(); + } else { + if (context.childIndex > removalIndex) { + context.childIndex--; + context.onNodeRemoved(); + } + } + context.parent.children.splice(removalIndex, 1); + }, + onNodeRemoved: NOOP, + addIdentifiers(exp) { + }, + removeIdentifiers(exp) { + }, + hoist(exp) { + if (isString(exp)) + exp = createSimpleExpression(exp); + context.hoists.push(exp); + const identifier = createSimpleExpression( + `_hoisted_${context.hoists.length}`, + false, + exp.loc, + 2 + ); + identifier.hoisted = exp; + return identifier; + }, + cache(exp, isVNode = false) { + return createCacheExpression(context.cached++, exp, isVNode); + } + }; + return context; } function transform(root, options) { - const context = createTransformContext(root, options); - traverseNode(root, context); - if (options.hoistStatic) { - hoistStatic(root, context); - } - if (!options.ssr) { - createRootCodegen(root, context); - } - // finalize meta information - root.helpers = [...context.helpers.keys()]; - root.components = [...context.components]; - root.directives = [...context.directives]; - root.imports = context.imports; - root.hoists = context.hoists; - root.temps = context.temps; - root.cached = context.cached; + const context = createTransformContext(root, options); + traverseNode(root, context); + if (options.hoistStatic) { + hoistStatic(root, context); + } + if (!options.ssr) { + createRootCodegen(root, context); + } + root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]); + root.components = [...context.components]; + root.directives = [...context.directives]; + root.imports = context.imports; + root.hoists = context.hoists; + root.temps = context.temps; + root.cached = context.cached; + root.transformed = true; } function createRootCodegen(root, context) { - const { helper } = context; - const { children } = root; - if (children.length === 1) { - const child = children[0]; - // if the single child is an element, turn it into a block. - if (isSingleElementRoot(root, child) && child.codegenNode) { - // single element root is never hoisted so codegenNode will never be - // SimpleExpressionNode - const codegenNode = child.codegenNode; - if (codegenNode.type === 13 /* VNODE_CALL */) { - makeBlock(codegenNode, context); - } - root.codegenNode = codegenNode; - } - else { - // - single <slot/>, IfNode, ForNode: already blocks. - // - single text node: always patched. - // root codegen falls through via genNode() - root.codegenNode = child; - } + const { helper } = context; + const { children } = root; + if (children.length === 1) { + const child = children[0]; + if (isSingleElementRoot(root, child) && child.codegenNode) { + const codegenNode = child.codegenNode; + if (codegenNode.type === 13) { + convertToBlock(codegenNode, context); + } + root.codegenNode = codegenNode; + } else { + root.codegenNode = child; } - else if (children.length > 1) { - // root has multiple nodes - return a fragment block. - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, undefined, false /* isComponent */); + } else if (children.length > 1) { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; } - else ; + root.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + root.children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else ; } function traverseChildren(parent, context) { - let i = 0; - const nodeRemoved = () => { - i--; - }; - for (; i < parent.children.length; i++) { - const child = parent.children[i]; - if (isString(child)) - continue; - context.parent = parent; - context.childIndex = i; - context.onNodeRemoved = nodeRemoved; - traverseNode(child, context); - } + let i = 0; + const nodeRemoved = () => { + i--; + }; + for (; i < parent.children.length; i++) { + const child = parent.children[i]; + if (isString(child)) + continue; + context.parent = parent; + context.childIndex = i; + context.onNodeRemoved = nodeRemoved; + traverseNode(child, context); + } } function traverseNode(node, context) { - context.currentNode = node; - // apply transform plugins - const { nodeTransforms } = context; - const exitFns = []; - for (let i = 0; i < nodeTransforms.length; i++) { - const onExit = nodeTransforms[i](node, context); - if (onExit) { - if (isArray(onExit)) { - exitFns.push(...onExit); - } - else { - exitFns.push(onExit); - } - } - if (!context.currentNode) { - // node was removed - return; - } - else { - // node may have been replaced - node = context.currentNode; - } + context.currentNode = node; + const { nodeTransforms } = context; + const exitFns = []; + for (let i2 = 0; i2 < nodeTransforms.length; i2++) { + const onExit = nodeTransforms[i2](node, context); + if (onExit) { + if (isArray(onExit)) { + exitFns.push(...onExit); + } else { + exitFns.push(onExit); + } } - switch (node.type) { - case 3 /* COMMENT */: - if (!context.ssr) { - // inject import for the Comment symbol, which is needed for creating - // comment nodes with `createVNode` - context.helper(CREATE_COMMENT); - } - break; - case 5 /* INTERPOLATION */: - // no need to traverse, but we need to inject toString helper - if (!context.ssr) { - context.helper(TO_DISPLAY_STRING); - } - break; - // for container types, further traverse downwards - case 9 /* IF */: - for (let i = 0; i < node.branches.length; i++) { - traverseNode(node.branches[i], context); - } - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - case 1 /* ELEMENT */: - case 0 /* ROOT */: - traverseChildren(node, context); - break; - } - // exit transforms - context.currentNode = node; - let i = exitFns.length; - while (i--) { - exitFns[i](); + if (!context.currentNode) { + return; + } else { + node = context.currentNode; } + } + switch (node.type) { + case 3: + if (!context.ssr) { + context.helper(CREATE_COMMENT); + } + break; + case 5: + if (!context.ssr) { + context.helper(TO_DISPLAY_STRING); + } + break; + case 9: + for (let i2 = 0; i2 < node.branches.length; i2++) { + traverseNode(node.branches[i2], context); + } + break; + case 10: + case 11: + case 1: + case 0: + traverseChildren(node, context); + break; + } + context.currentNode = node; + let i = exitFns.length; + while (i--) { + exitFns[i](); + } } function createStructuralDirectiveTransform(name, fn) { - const matches = isString(name) - ? (n) => n === name - : (n) => name.test(n); - return (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const { props } = node; - // structural directive transforms are not concerned with slots - // as they are handled separately in vSlot.ts - if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) { - return; - } - const exitFns = []; - for (let i = 0; i < props.length; i++) { - const prop = props[i]; - if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) { - // structural directives are removed to avoid infinite recursion - // also we remove them *before* applying so that it can further - // traverse itself in case it moves the node around - props.splice(i, 1); - i--; - const onExit = fn(node, prop, context); - if (onExit) - exitFns.push(onExit); - } - } - return exitFns; + const matches = isString(name) ? (n) => n === name : (n) => name.test(n); + return (node, context) => { + if (node.type === 1) { + const { props } = node; + if (node.tagType === 3 && props.some(isVSlot)) { + return; + } + const exitFns = []; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 7 && matches(prop.name)) { + props.splice(i, 1); + i--; + const onExit = fn(node, prop, context); + if (onExit) + exitFns.push(onExit); } - }; + } + return exitFns; + } + }; } const PURE_ANNOTATION = `/*#__PURE__*/`; const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`; - function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) { - const context = { - mode, - prefixIdentifiers, - sourceMap, - filename, - scopeId, - optimizeImports, - runtimeGlobalName, - runtimeModuleName, - ssrRuntimeModuleName, - ssr, - isTS, - inSSR, - source: ast.loc.source, - code: ``, - column: 1, - line: 1, - offset: 0, - indentLevel: 0, - pure: false, - map: undefined, - helper(key) { - return `_${helperNameMap[key]}`; - }, - push(code, node) { - context.code += code; - }, - indent() { - newline(++context.indentLevel); - }, - deindent(withoutNewLine = false) { - if (withoutNewLine) { - --context.indentLevel; - } - else { - newline(--context.indentLevel); - } - }, - newline() { - newline(context.indentLevel); - } - }; - function newline(n) { - context.push('\n' + ` `.repeat(n)); + function createCodegenContext(ast, { + mode = "function", + prefixIdentifiers = mode === "module", + sourceMap = false, + filename = `template.vue.html`, + scopeId = null, + optimizeImports = false, + runtimeGlobalName = `Vue`, + runtimeModuleName = `vue`, + ssrRuntimeModuleName = "vue/server-renderer", + ssr = false, + isTS = false, + inSSR = false + }) { + const context = { + mode, + prefixIdentifiers, + sourceMap, + filename, + scopeId, + optimizeImports, + runtimeGlobalName, + runtimeModuleName, + ssrRuntimeModuleName, + ssr, + isTS, + inSSR, + source: ast.source, + code: ``, + column: 1, + line: 1, + offset: 0, + indentLevel: 0, + pure: false, + map: void 0, + helper(key) { + return `_${helperNameMap[key]}`; + }, + push(code, newlineIndex = -2 /* None */, node) { + context.code += code; + }, + indent() { + newline(++context.indentLevel); + }, + deindent(withoutNewLine = false) { + if (withoutNewLine) { + --context.indentLevel; + } else { + newline(--context.indentLevel); + } + }, + newline() { + newline(context.indentLevel); } - return context; + }; + function newline(n) { + context.push("\n" + ` `.repeat(n), 0 /* Start */); + } + return context; } function generate(ast, options = {}) { - const context = createCodegenContext(ast, options); - if (options.onContextCreated) - options.onContextCreated(context); - const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context; - const hasHelpers = ast.helpers.length > 0; - const useWithBlock = !prefixIdentifiers && mode !== 'module'; - // preambles - // in setup() inline mode, the preamble is generated in a sub context - // and returned separately. - const preambleContext = context; - { - genFunctionPreamble(ast, preambleContext); - } - // enter render function - const functionName = ssr ? `ssrRender` : `render`; - const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache']; - const signature = args.join(', '); - { - push(`function ${functionName}(${signature}) {`); - } + const context = createCodegenContext(ast, options); + if (options.onContextCreated) + options.onContextCreated(context); + const { + mode, + push, + prefixIdentifiers, + indent, + deindent, + newline, + scopeId, + ssr + } = context; + const helpers = Array.from(ast.helpers); + const hasHelpers = helpers.length > 0; + const useWithBlock = !prefixIdentifiers && mode !== "module"; + const isSetupInlined = false; + const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context; + { + genFunctionPreamble(ast, preambleContext); + } + const functionName = ssr ? `ssrRender` : `render`; + const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]; + const signature = args.join(", "); + { + push(`function ${functionName}(${signature}) {`); + } + indent(); + if (useWithBlock) { + push(`with (_ctx) {`); indent(); - if (useWithBlock) { - push(`with (_ctx) {`); - indent(); - // function mode const declarations should be inside with block - // also they should be renamed to avoid collision with user properties - if (hasHelpers) { - push(`const { ${ast.helpers.map(aliasHelper).join(', ')} } = _Vue`); - push(`\n`); - newline(); - } + if (hasHelpers) { + push( + `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue +`, + -1 /* End */ + ); + newline(); } - // generate asset resolution statements - if (ast.components.length) { - genAssets(ast.components, 'component', context); - if (ast.directives.length || ast.temps > 0) { - newline(); - } - } - if (ast.directives.length) { - genAssets(ast.directives, 'directive', context); - if (ast.temps > 0) { - newline(); - } + } + if (ast.components.length) { + genAssets(ast.components, "component", context); + if (ast.directives.length || ast.temps > 0) { + newline(); } + } + if (ast.directives.length) { + genAssets(ast.directives, "directive", context); if (ast.temps > 0) { - push(`let `); - for (let i = 0; i < ast.temps; i++) { - push(`${i > 0 ? `, ` : ``}_temp${i}`); - } + newline(); } - if (ast.components.length || ast.directives.length || ast.temps) { - push(`\n`); - newline(); - } - // generate the VNode tree expression - if (!ssr) { - push(`return `); - } - if (ast.codegenNode) { - genNode(ast.codegenNode, context); - } - else { - push(`null`); - } - if (useWithBlock) { - deindent(); - push(`}`); + } + if (ast.temps > 0) { + push(`let `); + for (let i = 0; i < ast.temps; i++) { + push(`${i > 0 ? `, ` : ``}_temp${i}`); } + } + if (ast.components.length || ast.directives.length || ast.temps) { + push(` +`, 0 /* Start */); + newline(); + } + if (!ssr) { + push(`return `); + } + if (ast.codegenNode) { + genNode(ast.codegenNode, context); + } else { + push(`null`); + } + if (useWithBlock) { deindent(); push(`}`); - return { - ast, - code: context.code, - preamble: ``, - // SourceMapGenerator does have toJSON() method but it's not in the types - map: context.map ? context.map.toJSON() : undefined - }; + } + deindent(); + push(`}`); + return { + ast, + code: context.code, + preamble: isSetupInlined ? preambleContext.code : ``, + map: context.map ? context.map.toJSON() : void 0 + }; } function genFunctionPreamble(ast, context) { - const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context; - const VueBinding = runtimeGlobalName; - // Generate const declaration for helpers - // In prefix mode, we place the const declaration at top so it's done - // only once; But if we not prefixing, we place the declaration inside the - // with block so it doesn't incur the `in` check cost for every helper access. - if (ast.helpers.length > 0) { - { - // "with" mode. - // save Vue in a separate variable to avoid collision - push(`const _Vue = ${VueBinding}\n`); - // in "with" mode, helpers are declared inside the with block to avoid - // has check cost, but hoists are lifted out of the function - we need - // to provide the helper here. - if (ast.hoists.length) { - const staticHelpers = [ - CREATE_VNODE, - CREATE_ELEMENT_VNODE, - CREATE_COMMENT, - CREATE_TEXT, - CREATE_STATIC - ] - .filter(helper => ast.helpers.includes(helper)) - .map(aliasHelper) - .join(', '); - push(`const { ${staticHelpers} } = _Vue\n`); - } - } + const { + ssr, + prefixIdentifiers, + push, + newline, + runtimeModuleName, + runtimeGlobalName, + ssrRuntimeModuleName + } = context; + const VueBinding = runtimeGlobalName; + const helpers = Array.from(ast.helpers); + if (helpers.length > 0) { + { + push(`const _Vue = ${VueBinding} +`, -1 /* End */); + if (ast.hoists.length) { + const staticHelpers = [ + CREATE_VNODE, + CREATE_ELEMENT_VNODE, + CREATE_COMMENT, + CREATE_TEXT, + CREATE_STATIC + ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", "); + push(`const { ${staticHelpers} } = _Vue +`, -1 /* End */); + } } - genHoists(ast.hoists, context); - newline(); - push(`return `); + } + genHoists(ast.hoists, context); + newline(); + push(`return `); } function genAssets(assets, type, { helper, push, newline, isTS }) { - const resolver = helper(type === 'component' - ? RESOLVE_COMPONENT - : RESOLVE_DIRECTIVE); - for (let i = 0; i < assets.length; i++) { - let id = assets[i]; - // potential component implicit self-reference inferred from SFC filename - const maybeSelfReference = id.endsWith('__self'); - if (maybeSelfReference) { - id = id.slice(0, -6); - } - push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`); - if (i < assets.length - 1) { - newline(); - } + const resolver = helper( + type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE + ); + for (let i = 0; i < assets.length; i++) { + let id = assets[i]; + const maybeSelfReference = id.endsWith("__self"); + if (maybeSelfReference) { + id = id.slice(0, -6); } + push( + `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}` + ); + if (i < assets.length - 1) { + newline(); + } + } } function genHoists(hoists, context) { - if (!hoists.length) { - return; + if (!hoists.length) { + return; + } + context.pure = true; + const { push, newline, helper, scopeId, mode } = context; + newline(); + for (let i = 0; i < hoists.length; i++) { + const exp = hoists[i]; + if (exp) { + push( + `const _hoisted_${i + 1} = ${``}` + ); + genNode(exp, context); + newline(); } - context.pure = true; - const { push, newline, helper, scopeId, mode } = context; - newline(); - for (let i = 0; i < hoists.length; i++) { - const exp = hoists[i]; - if (exp) { - push(`const _hoisted_${i + 1} = ${``}`); - genNode(exp, context); - newline(); - } - } - context.pure = false; + } + context.pure = false; } - function isText$1(n) { - return (isString(n) || - n.type === 4 /* SIMPLE_EXPRESSION */ || - n.type === 2 /* TEXT */ || - n.type === 5 /* INTERPOLATION */ || - n.type === 8 /* COMPOUND_EXPRESSION */); + function isText(n) { + return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8; } function genNodeListAsArray(nodes, context) { - const multilines = nodes.length > 3 || - (nodes.some(n => isArray(n) || !isText$1(n))); - context.push(`[`); - multilines && context.indent(); - genNodeList(nodes, context, multilines); - multilines && context.deindent(); - context.push(`]`); + const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n)); + context.push(`[`); + multilines && context.indent(); + genNodeList(nodes, context, multilines); + multilines && context.deindent(); + context.push(`]`); } function genNodeList(nodes, context, multilines = false, comma = true) { - const { push, newline } = context; - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (isString(node)) { - push(node); - } - else if (isArray(node)) { - genNodeListAsArray(node, context); - } - else { - genNode(node, context); - } - if (i < nodes.length - 1) { - if (multilines) { - comma && push(','); - newline(); - } - else { - comma && push(', '); - } - } + const { push, newline } = context; + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + if (isString(node)) { + push(node, -3 /* Unknown */); + } else if (isArray(node)) { + genNodeListAsArray(node, context); + } else { + genNode(node, context); } + if (i < nodes.length - 1) { + if (multilines) { + comma && push(","); + newline(); + } else { + comma && push(", "); + } + } + } } function genNode(node, context) { - if (isString(node)) { - context.push(node); - return; - } - if (isSymbol(node)) { - context.push(context.helper(node)); - return; - } - switch (node.type) { - case 1 /* ELEMENT */: - case 9 /* IF */: - case 11 /* FOR */: - assert(node.codegenNode != null, `Codegen node is missing for element/if/for node. ` + - `Apply appropriate transforms first.`); - genNode(node.codegenNode, context); - break; - case 2 /* TEXT */: - genText(node, context); - break; - case 4 /* SIMPLE_EXPRESSION */: - genExpression(node, context); - break; - case 5 /* INTERPOLATION */: - genInterpolation(node, context); - break; - case 12 /* TEXT_CALL */: - genNode(node.codegenNode, context); - break; - case 8 /* COMPOUND_EXPRESSION */: - genCompoundExpression(node, context); - break; - case 3 /* COMMENT */: - genComment(node, context); - break; - case 13 /* VNODE_CALL */: - genVNodeCall(node, context); - break; - case 14 /* JS_CALL_EXPRESSION */: - genCallExpression(node, context); - break; - case 15 /* JS_OBJECT_EXPRESSION */: - genObjectExpression(node, context); - break; - case 17 /* JS_ARRAY_EXPRESSION */: - genArrayExpression(node, context); - break; - case 18 /* JS_FUNCTION_EXPRESSION */: - genFunctionExpression(node, context); - break; - case 19 /* JS_CONDITIONAL_EXPRESSION */: - genConditionalExpression(node, context); - break; - case 20 /* JS_CACHE_EXPRESSION */: - genCacheExpression(node, context); - break; - case 21 /* JS_BLOCK_STATEMENT */: - genNodeList(node.body, context, true, false); - break; - // SSR only types - case 22 /* JS_TEMPLATE_LITERAL */: - break; - case 23 /* JS_IF_STATEMENT */: - break; - case 24 /* JS_ASSIGNMENT_EXPRESSION */: - break; - case 25 /* JS_SEQUENCE_EXPRESSION */: - break; - case 26 /* JS_RETURN_STATEMENT */: - break; - /* istanbul ignore next */ - case 10 /* IF_BRANCH */: - // noop - break; - default: - { - assert(false, `unhandled codegen node type: ${node.type}`); - // make sure we exhaust all possible types - const exhaustiveCheck = node; - return exhaustiveCheck; - } - } + if (isString(node)) { + context.push(node, -3 /* Unknown */); + return; + } + if (isSymbol(node)) { + context.push(context.helper(node)); + return; + } + switch (node.type) { + case 1: + case 9: + case 11: + assert( + node.codegenNode != null, + `Codegen node is missing for element/if/for node. Apply appropriate transforms first.` + ); + genNode(node.codegenNode, context); + break; + case 2: + genText(node, context); + break; + case 4: + genExpression(node, context); + break; + case 5: + genInterpolation(node, context); + break; + case 12: + genNode(node.codegenNode, context); + break; + case 8: + genCompoundExpression(node, context); + break; + case 3: + genComment(node, context); + break; + case 13: + genVNodeCall(node, context); + break; + case 14: + genCallExpression(node, context); + break; + case 15: + genObjectExpression(node, context); + break; + case 17: + genArrayExpression(node, context); + break; + case 18: + genFunctionExpression(node, context); + break; + case 19: + genConditionalExpression(node, context); + break; + case 20: + genCacheExpression(node, context); + break; + case 21: + genNodeList(node.body, context, true, false); + break; + case 22: + break; + case 23: + break; + case 24: + break; + case 25: + break; + case 26: + break; + case 10: + break; + default: + { + assert(false, `unhandled codegen node type: ${node.type}`); + const exhaustiveCheck = node; + return exhaustiveCheck; + } + } } function genText(node, context) { - context.push(JSON.stringify(node.content), node); + context.push(JSON.stringify(node.content), -3 /* Unknown */, node); } function genExpression(node, context) { - const { content, isStatic } = node; - context.push(isStatic ? JSON.stringify(content) : content, node); + const { content, isStatic } = node; + context.push( + isStatic ? JSON.stringify(content) : content, + -3 /* Unknown */, + node + ); } function genInterpolation(node, context) { - const { push, helper, pure } = context; - if (pure) - push(PURE_ANNOTATION); - push(`${helper(TO_DISPLAY_STRING)}(`); - genNode(node.content, context); - push(`)`); + const { push, helper, pure } = context; + if (pure) + push(PURE_ANNOTATION); + push(`${helper(TO_DISPLAY_STRING)}(`); + genNode(node.content, context); + push(`)`); } function genCompoundExpression(node, context) { - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - if (isString(child)) { - context.push(child); - } - else { - genNode(child, context); - } + for (let i = 0; i < node.children.length; i++) { + const child = node.children[i]; + if (isString(child)) { + context.push(child, -3 /* Unknown */); + } else { + genNode(child, context); } + } } function genExpressionAsPropertyKey(node, context) { - const { push } = context; - if (node.type === 8 /* COMPOUND_EXPRESSION */) { - push(`[`); - genCompoundExpression(node, context); - push(`]`); - } - else if (node.isStatic) { - // only quote keys if necessary - const text = isSimpleIdentifier(node.content) - ? node.content - : JSON.stringify(node.content); - push(text, node); - } - else { - push(`[${node.content}]`, node); - } + const { push } = context; + if (node.type === 8) { + push(`[`); + genCompoundExpression(node, context); + push(`]`); + } else if (node.isStatic) { + const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content); + push(text, -2 /* None */, node); + } else { + push(`[${node.content}]`, -3 /* Unknown */, node); + } } function genComment(node, context) { - const { push, helper, pure } = context; - if (pure) { - push(PURE_ANNOTATION); - } - push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node); + const { push, helper, pure } = context; + if (pure) { + push(PURE_ANNOTATION); + } + push( + `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, + -3 /* Unknown */, + node + ); } function genVNodeCall(node, context) { - const { push, helper, pure } = context; - const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node; - if (directives) { - push(helper(WITH_DIRECTIVES) + `(`); - } - if (isBlock) { - push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); - } - if (pure) { - push(PURE_ANNOTATION); - } - const callHelper = isBlock - ? getVNodeBlockHelper(context.inSSR, isComponent) - : getVNodeHelper(context.inSSR, isComponent); - push(helper(callHelper) + `(`, node); - genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context); + const { push, helper, pure } = context; + const { + tag, + props, + children, + patchFlag, + dynamicProps, + directives, + isBlock, + disableTracking, + isComponent + } = node; + if (directives) { + push(helper(WITH_DIRECTIVES) + `(`); + } + if (isBlock) { + push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `); + } + if (pure) { + push(PURE_ANNOTATION); + } + const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent); + push(helper(callHelper) + `(`, -2 /* None */, node); + genNodeList( + genNullableArgs([tag, props, children, patchFlag, dynamicProps]), + context + ); + push(`)`); + if (isBlock) { push(`)`); - if (isBlock) { - push(`)`); - } - if (directives) { - push(`, `); - genNode(directives, context); - push(`)`); - } + } + if (directives) { + push(`, `); + genNode(directives, context); + push(`)`); + } } function genNullableArgs(args) { - let i = args.length; - while (i--) { - if (args[i] != null) - break; - } - return args.slice(0, i + 1).map(arg => arg || `null`); + let i = args.length; + while (i--) { + if (args[i] != null) + break; + } + return args.slice(0, i + 1).map((arg) => arg || `null`); } - // JavaScript function genCallExpression(node, context) { - const { push, helper, pure } = context; - const callee = isString(node.callee) ? node.callee : helper(node.callee); - if (pure) { - push(PURE_ANNOTATION); - } - push(callee + `(`, node); - genNodeList(node.arguments, context); - push(`)`); + const { push, helper, pure } = context; + const callee = isString(node.callee) ? node.callee : helper(node.callee); + if (pure) { + push(PURE_ANNOTATION); + } + push(callee + `(`, -2 /* None */, node); + genNodeList(node.arguments, context); + push(`)`); } function genObjectExpression(node, context) { - const { push, indent, deindent, newline } = context; - const { properties } = node; - if (!properties.length) { - push(`{}`, node); - return; + const { push, indent, deindent, newline } = context; + const { properties } = node; + if (!properties.length) { + push(`{}`, -2 /* None */, node); + return; + } + const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4); + push(multilines ? `{` : `{ `); + multilines && indent(); + for (let i = 0; i < properties.length; i++) { + const { key, value } = properties[i]; + genExpressionAsPropertyKey(key, context); + push(`: `); + genNode(value, context); + if (i < properties.length - 1) { + push(`,`); + newline(); } - const multilines = properties.length > 1 || - (properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */)); - push(multilines ? `{` : `{ `); - multilines && indent(); - for (let i = 0; i < properties.length; i++) { - const { key, value } = properties[i]; - // key - genExpressionAsPropertyKey(key, context); - push(`: `); - // value - genNode(value, context); - if (i < properties.length - 1) { - // will only reach this if it's multilines - push(`,`); - newline(); - } - } - multilines && deindent(); - push(multilines ? `}` : ` }`); + } + multilines && deindent(); + push(multilines ? `}` : ` }`); } function genArrayExpression(node, context) { - genNodeListAsArray(node.elements, context); + genNodeListAsArray(node.elements, context); } function genFunctionExpression(node, context) { - const { push, indent, deindent } = context; - const { params, returns, body, newline, isSlot } = node; - if (isSlot) { - // wrap slot functions with owner context - push(`_${helperNameMap[WITH_CTX]}(`); + const { push, indent, deindent } = context; + const { params, returns, body, newline, isSlot } = node; + if (isSlot) { + push(`_${helperNameMap[WITH_CTX]}(`); + } + push(`(`, -2 /* None */, node); + if (isArray(params)) { + genNodeList(params, context); + } else if (params) { + genNode(params, context); + } + push(`) => `); + if (newline || body) { + push(`{`); + indent(); + } + if (returns) { + if (newline) { + push(`return `); } - push(`(`, node); - if (isArray(params)) { - genNodeList(params, context); - } - else if (params) { - genNode(params, context); - } - push(`) => `); - if (newline || body) { - push(`{`); - indent(); - } - if (returns) { - if (newline) { - push(`return `); - } - if (isArray(returns)) { - genNodeListAsArray(returns, context); - } - else { - genNode(returns, context); - } - } - else if (body) { - genNode(body, context); - } - if (newline || body) { - deindent(); - push(`}`); - } - if (isSlot) { - push(`)`); + if (isArray(returns)) { + genNodeListAsArray(returns, context); + } else { + genNode(returns, context); } + } else if (body) { + genNode(body, context); + } + if (newline || body) { + deindent(); + push(`}`); + } + if (isSlot) { + push(`)`); + } } function genConditionalExpression(node, context) { - const { test, consequent, alternate, newline: needNewline } = node; - const { push, indent, deindent, newline } = context; - if (test.type === 4 /* SIMPLE_EXPRESSION */) { - const needsParens = !isSimpleIdentifier(test.content); - needsParens && push(`(`); - genExpression(test, context); - needsParens && push(`)`); - } - else { - push(`(`); - genNode(test, context); - push(`)`); - } - needNewline && indent(); + const { test, consequent, alternate, newline: needNewline } = node; + const { push, indent, deindent, newline } = context; + if (test.type === 4) { + const needsParens = !isSimpleIdentifier(test.content); + needsParens && push(`(`); + genExpression(test, context); + needsParens && push(`)`); + } else { + push(`(`); + genNode(test, context); + push(`)`); + } + needNewline && indent(); + context.indentLevel++; + needNewline || push(` `); + push(`? `); + genNode(consequent, context); + context.indentLevel--; + needNewline && newline(); + needNewline || push(` `); + push(`: `); + const isNested = alternate.type === 19; + if (!isNested) { context.indentLevel++; - needNewline || push(` `); - push(`? `); - genNode(consequent, context); + } + genNode(alternate, context); + if (!isNested) { context.indentLevel--; - needNewline && newline(); - needNewline || push(` `); - push(`: `); - const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */; - if (!isNested) { - context.indentLevel++; - } - genNode(alternate, context); - if (!isNested) { - context.indentLevel--; - } - needNewline && deindent(true /* without newline */); + } + needNewline && deindent( + true + /* without newline */ + ); } function genCacheExpression(node, context) { - const { push, helper, indent, deindent, newline } = context; - push(`_cache[${node.index}] || (`); - if (node.isVNode) { - indent(); - push(`${helper(SET_BLOCK_TRACKING)}(-1),`); - newline(); - } - push(`_cache[${node.index}] = `); - genNode(node.value, context); - if (node.isVNode) { - push(`,`); - newline(); - push(`${helper(SET_BLOCK_TRACKING)}(1),`); - newline(); - push(`_cache[${node.index}]`); - deindent(); - } - push(`)`); + const { push, helper, indent, deindent, newline } = context; + push(`_cache[${node.index}] || (`); + if (node.isVNode) { + indent(); + push(`${helper(SET_BLOCK_TRACKING)}(-1),`); + newline(); + } + push(`_cache[${node.index}] = `); + genNode(node.value, context); + if (node.isVNode) { + push(`,`); + newline(); + push(`${helper(SET_BLOCK_TRACKING)}(1),`); + newline(); + push(`_cache[${node.index}]`); + deindent(); + } + push(`)`); } - // these keywords should not appear inside expressions, but operators like - // typeof, instanceof and in are allowed - const prohibitedKeywordRE = new RegExp('\\b' + - ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + - 'super,throw,while,yield,delete,export,import,return,switch,default,' + - 'extends,finally,continue,debugger,function,arguments,typeof,void') - .split(',') - .join('\\b|\\b') + - '\\b'); - // strip strings in expressions + const prohibitedKeywordRE = new RegExp( + "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b" + ); const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; - /** - * Validate a non-prefixed expression. - * This is only called when using the in-browser runtime compiler since it - * doesn't prefix expressions. - */ function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) { - const exp = node.content; - // empty expressions are validated per-directive since some directives - // do allow empty expressions. - if (!exp.trim()) { - return; - } - try { - new Function(asRawStatements - ? ` ${exp} ` - : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`); - } - catch (e) { - let message = e.message; - const keywordMatch = exp - .replace(stripStringRE, '') - .match(prohibitedKeywordRE); - if (keywordMatch) { - message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; - } - context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, message)); + const exp = node.content; + if (!exp.trim()) { + return; + } + try { + new Function( + asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}` + ); + } catch (e) { + let message = e.message; + const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE); + if (keywordMatch) { + message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`; } + context.onError( + createCompilerError( + 45, + node.loc, + void 0, + message + ) + ); + } } const transformExpression = (node, context) => { - if (node.type === 5 /* INTERPOLATION */) { - node.content = processExpression(node.content, context); - } - else if (node.type === 1 /* ELEMENT */) { - // handle directives on element - for (let i = 0; i < node.props.length; i++) { - const dir = node.props[i]; - // do not process for v-on & v-for since they are special handled - if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') { - const exp = dir.exp; - const arg = dir.arg; - // do not process exp if this is v-on:arg - we need special handling - // for wrapping inline statements. - if (exp && - exp.type === 4 /* SIMPLE_EXPRESSION */ && - !(dir.name === 'on' && arg)) { - dir.exp = processExpression(exp, context, - // slot args must be processed as function params - dir.name === 'slot'); - } - if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) { - dir.arg = processExpression(arg, context); - } - } + if (node.type === 5) { + node.content = processExpression( + node.content, + context + ); + } else if (node.type === 1) { + for (let i = 0; i < node.props.length; i++) { + const dir = node.props[i]; + if (dir.type === 7 && dir.name !== "for") { + const exp = dir.exp; + const arg = dir.arg; + if (exp && exp.type === 4 && !(dir.name === "on" && arg)) { + dir.exp = processExpression( + exp, + context, + // slot args must be processed as function params + dir.name === "slot" + ); } + if (arg && arg.type === 4 && !arg.isStatic) { + dir.arg = processExpression(arg, context); + } + } } + } }; - // Important: since this function uses Node.js only dependencies, it should - // always be used with a leading !true check so that it can be - // tree-shaken from the browser build. - function processExpression(node, context, - // some expressions like v-slot props & v-for aliases should be parsed as - // function params - asParams = false, - // v-on handler values may contain multiple statements - asRawStatements = false, localVars = Object.create(context.identifiers)) { + function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) { + { { - { - // simple in-browser validation (same logic in 2.x) - validateBrowserExpression(node, context, asParams, asRawStatements); - } - return node; + validateBrowserExpression(node, context, asParams, asRawStatements); } + return node; + } } - const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => { + const transformIf = createStructuralDirectiveTransform( + /^(if|else|else-if)$/, + (node, dir, context) => { return processIf(node, dir, context, (ifNode, branch, isRoot) => { - // #1587: We need to dynamically increment the key based on the current - // node's sibling nodes, since chained v-if/else branches are - // rendered at the same depth - const siblings = context.parent.children; - let i = siblings.indexOf(ifNode); - let key = 0; - while (i-- >= 0) { - const sibling = siblings[i]; - if (sibling && sibling.type === 9 /* IF */) { - key += sibling.branches.length; - } + const siblings = context.parent.children; + let i = siblings.indexOf(ifNode); + let key = 0; + while (i-- >= 0) { + const sibling = siblings[i]; + if (sibling && sibling.type === 9) { + key += sibling.branches.length; } - // Exit callback. Complete the codegenNode when all children have been - // transformed. - return () => { - if (isRoot) { - ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context); - } - else { - // attach this branch's codegen node to the v-if root. - const parentCondition = getParentCondition(ifNode.codegenNode); - parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context); - } - }; + } + return () => { + if (isRoot) { + ifNode.codegenNode = createCodegenNodeForBranch( + branch, + key, + context + ); + } else { + const parentCondition = getParentCondition(ifNode.codegenNode); + parentCondition.alternate = createCodegenNodeForBranch( + branch, + key + ifNode.branches.length - 1, + context + ); + } + }; }); - }); - // target-agnostic transform used for both Client and SSR + } + ); function processIf(node, dir, context, processCodegen) { - if (dir.name !== 'else' && - (!dir.exp || !dir.exp.content.trim())) { - const loc = dir.exp ? dir.exp.loc : node.loc; - context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc)); - dir.exp = createSimpleExpression(`true`, false, loc); + if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) { + const loc = dir.exp ? dir.exp.loc : node.loc; + context.onError( + createCompilerError(28, dir.loc) + ); + dir.exp = createSimpleExpression(`true`, false, loc); + } + if (dir.exp) { + validateBrowserExpression(dir.exp, context); + } + if (dir.name === "if") { + const branch = createIfBranch(node, dir); + const ifNode = { + type: 9, + loc: node.loc, + branches: [branch] + }; + context.replaceNode(ifNode); + if (processCodegen) { + return processCodegen(ifNode, branch, true); } - if (dir.exp) { - validateBrowserExpression(dir.exp, context); - } - if (dir.name === 'if') { + } else { + const siblings = context.parent.children; + const comments = []; + let i = siblings.indexOf(node); + while (i-- >= -1) { + const sibling = siblings[i]; + if (sibling && sibling.type === 3) { + context.removeNode(sibling); + comments.unshift(sibling); + continue; + } + if (sibling && sibling.type === 2 && !sibling.content.trim().length) { + context.removeNode(sibling); + continue; + } + if (sibling && sibling.type === 9) { + if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) { + context.onError( + createCompilerError(30, node.loc) + ); + } + context.removeNode(); const branch = createIfBranch(node, dir); - const ifNode = { - type: 9 /* IF */, - loc: node.loc, - branches: [branch] - }; - context.replaceNode(ifNode); - if (processCodegen) { - return processCodegen(ifNode, branch, true); + if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition> + !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) { + branch.children = [...comments, ...branch.children]; } - } - else { - // locate the adjacent v-if - const siblings = context.parent.children; - const comments = []; - let i = siblings.indexOf(node); - while (i-- >= -1) { - const sibling = siblings[i]; - if (sibling && sibling.type === 3 /* COMMENT */) { - context.removeNode(sibling); - comments.unshift(sibling); - continue; - } - if (sibling && - sibling.type === 2 /* TEXT */ && - !sibling.content.trim().length) { - context.removeNode(sibling); - continue; - } - if (sibling && sibling.type === 9 /* IF */) { - // Check if v-else was followed by v-else-if - if (dir.name === 'else-if' && - sibling.branches[sibling.branches.length - 1].condition === undefined) { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - // move the node to the if node's branches - context.removeNode(); - const branch = createIfBranch(node, dir); - if (comments.length && - // #3619 ignore comments if the v-if is direct child of <transition> - !(context.parent && - context.parent.type === 1 /* ELEMENT */ && - isBuiltInType(context.parent.tag, 'transition'))) { - branch.children = [...comments, ...branch.children]; - } - // check if user is forcing same key on different branches - { - const key = branch.userKey; - if (key) { - sibling.branches.forEach(({ userKey }) => { - if (isSameKey(userKey, key)) { - context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc)); - } - }); - } - } - sibling.branches.push(branch); - const onExit = processCodegen && processCodegen(sibling, branch, false); - // since the branch was removed, it will not be traversed. - // make sure to traverse here. - traverseNode(branch, context); - // call on exit - if (onExit) - onExit(); - // make sure to reset currentNode after traversal to indicate this - // node has been removed. - context.currentNode = null; - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc)); - } - break; + { + const key = branch.userKey; + if (key) { + sibling.branches.forEach(({ userKey }) => { + if (isSameKey(userKey, key)) { + context.onError( + createCompilerError( + 29, + branch.userKey.loc + ) + ); + } + }); + } } + sibling.branches.push(branch); + const onExit = processCodegen && processCodegen(sibling, branch, false); + traverseNode(branch, context); + if (onExit) + onExit(); + context.currentNode = null; + } else { + context.onError( + createCompilerError(30, node.loc) + ); + } + break; } + } } function createIfBranch(node, dir) { - const isTemplateIf = node.tagType === 3 /* TEMPLATE */; - return { - type: 10 /* IF_BRANCH */, - loc: node.loc, - condition: dir.name === 'else' ? undefined : dir.exp, - children: isTemplateIf && !findDir(node, 'for') ? node.children : [node], - userKey: findProp(node, `key`), - isTemplateIf - }; + const isTemplateIf = node.tagType === 3; + return { + type: 10, + loc: node.loc, + condition: dir.name === "else" ? void 0 : dir.exp, + children: isTemplateIf && !findDir(node, "for") ? node.children : [node], + userKey: findProp(node, `key`), + isTemplateIf + }; } function createCodegenNodeForBranch(branch, keyIndex, context) { - if (branch.condition) { - return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context), - // make sure to pass in asBlock: true so that the comment node call - // closes the current block. - createCallExpression(context.helper(CREATE_COMMENT), [ - '"v-if"' , - 'true' - ])); - } - else { - return createChildrenCodegenNode(branch, keyIndex, context); - } + if (branch.condition) { + return createConditionalExpression( + branch.condition, + createChildrenCodegenNode(branch, keyIndex, context), + // make sure to pass in asBlock: true so that the comment node call + // closes the current block. + createCallExpression(context.helper(CREATE_COMMENT), [ + '"v-if"' , + "true" + ]) + ); + } else { + return createChildrenCodegenNode(branch, keyIndex, context); + } } function createChildrenCodegenNode(branch, keyIndex, context) { - const { helper } = context; - const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */)); - const { children } = branch; - const firstChild = children[0]; - const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */; - if (needFragmentWrapper) { - if (children.length === 1 && firstChild.type === 11 /* FOR */) { - // optimize away nested fragments when child is a ForNode - const vnodeCall = firstChild.codegenNode; - injectProp(vnodeCall, keyProperty, context); - return vnodeCall; - } - else { - let patchFlag = 64 /* STABLE_FRAGMENT */; - let patchFlagText = PatchFlagNames[64 /* STABLE_FRAGMENT */]; - // check if the fragment actually contains a single valid child with - // the rest being comments - if (!branch.isTemplateIf && - children.filter(c => c.type !== 3 /* COMMENT */).length === 1) { - patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */; - patchFlagText += `, ${PatchFlagNames[2048 /* DEV_ROOT_FRAGMENT */]}`; - } - return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + (` /* ${patchFlagText} */` ), undefined, undefined, true, false, false /* isComponent */, branch.loc); - } + const { helper } = context; + const keyProperty = createObjectProperty( + `key`, + createSimpleExpression( + `${keyIndex}`, + false, + locStub, + 2 + ) + ); + const { children } = branch; + const firstChild = children[0]; + const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1; + if (needFragmentWrapper) { + if (children.length === 1 && firstChild.type === 11) { + const vnodeCall = firstChild.codegenNode; + injectProp(vnodeCall, keyProperty, context); + return vnodeCall; + } else { + let patchFlag = 64; + let patchFlagText = PatchFlagNames[64]; + if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) { + patchFlag |= 2048; + patchFlagText += `, ${PatchFlagNames[2048]}`; + } + return createVNodeCall( + context, + helper(FRAGMENT), + createObjectExpression([keyProperty]), + children, + patchFlag + (` /* ${patchFlagText} */` ), + void 0, + void 0, + true, + false, + false, + branch.loc + ); } - else { - const ret = firstChild.codegenNode; - const vnodeCall = getMemoedVNodeCall(ret); - // Change createVNode to createBlock. - if (vnodeCall.type === 13 /* VNODE_CALL */) { - makeBlock(vnodeCall, context); - } - // inject branch key - injectProp(vnodeCall, keyProperty, context); - return ret; + } else { + const ret = firstChild.codegenNode; + const vnodeCall = getMemoedVNodeCall(ret); + if (vnodeCall.type === 13) { + convertToBlock(vnodeCall, context); } + injectProp(vnodeCall, keyProperty, context); + return ret; + } } function isSameKey(a, b) { - if (!a || a.type !== b.type) { - return false; + if (!a || a.type !== b.type) { + return false; + } + if (a.type === 6) { + if (a.value.content !== b.value.content) { + return false; } - if (a.type === 6 /* ATTRIBUTE */) { - if (a.value.content !== b.value.content) { - return false; - } + } else { + const exp = a.exp; + const branchExp = b.exp; + if (exp.type !== branchExp.type) { + return false; } - else { - // directive - const exp = a.exp; - const branchExp = b.exp; - if (exp.type !== branchExp.type) { - return false; - } - if (exp.type !== 4 /* SIMPLE_EXPRESSION */ || - exp.isStatic !== branchExp.isStatic || - exp.content !== branchExp.content) { - return false; - } + if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) { + return false; } - return true; + } + return true; } function getParentCondition(node) { - while (true) { - if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - node = node.alternate; - } - else { - return node; - } - } - else if (node.type === 20 /* JS_CACHE_EXPRESSION */) { - node = node.value; - } + while (true) { + if (node.type === 19) { + if (node.alternate.type === 19) { + node = node.alternate; + } else { + return node; + } + } else if (node.type === 20) { + node = node.value; } + } } - const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => { + const transformFor = createStructuralDirectiveTransform( + "for", + (node, dir, context) => { const { helper, removeHelper } = context; - return processFor(node, dir, context, forNode => { - // create the loop render function expression now, and add the - // iterator on exit after all children have been traversed - const renderExp = createCallExpression(helper(RENDER_LIST), [ - forNode.source - ]); - const isTemplate = isTemplateNode(node); - const memo = findDir(node, 'memo'); - const keyProp = findProp(node, `key`); - const keyExp = keyProp && - (keyProp.type === 6 /* ATTRIBUTE */ - ? createSimpleExpression(keyProp.value.content, true) - : keyProp.exp); - const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; - const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ && - forNode.source.constType > 0 /* NOT_CONSTANT */; - const fragmentFlag = isStableFragment - ? 64 /* STABLE_FRAGMENT */ - : keyProp - ? 128 /* KEYED_FRAGMENT */ - : 256 /* UNKEYED_FRAGMENT */; - forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag + - (` /* ${PatchFlagNames[fragmentFlag]} */` ), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc); - return () => { - // finish the codegen now that all children have been traversed - let childBlock; - const { children } = forNode; - // check <template v-for> key placement - if (isTemplate) { - node.children.some(c => { - if (c.type === 1 /* ELEMENT */) { - const key = findProp(c, 'key'); - if (key) { - context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc)); - return true; - } - } - }); + return processFor(node, dir, context, (forNode) => { + const renderExp = createCallExpression(helper(RENDER_LIST), [ + forNode.source + ]); + const isTemplate = isTemplateNode(node); + const memo = findDir(node, "memo"); + const keyProp = findProp(node, `key`); + const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp); + const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null; + const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0; + const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256; + forNode.codegenNode = createVNodeCall( + context, + helper(FRAGMENT), + void 0, + renderExp, + fragmentFlag + (` /* ${PatchFlagNames[fragmentFlag]} */` ), + void 0, + void 0, + true, + !isStableFragment, + false, + node.loc + ); + return () => { + let childBlock; + const { children } = forNode; + if (isTemplate) { + node.children.some((c) => { + if (c.type === 1) { + const key = findProp(c, "key"); + if (key) { + context.onError( + createCompilerError( + 33, + key.loc + ) + ); + return true; + } } - const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */; - const slotOutlet = isSlotOutlet(node) - ? node - : isTemplate && - node.children.length === 1 && - isSlotOutlet(node.children[0]) - ? node.children[0] // api-extractor somehow fails to infer this - : null; - if (slotOutlet) { - // <slot v-for="..."> or <template v-for="..."><slot/></template> - childBlock = slotOutlet.codegenNode; - if (isTemplate && keyProperty) { - // <template v-for="..." :key="..."><slot/></template> - // we need to inject the key to the renderSlot() call. - // the props for renderSlot is passed as the 3rd argument. - injectProp(childBlock, keyProperty, context); - } + }); + } + const needFragmentWrapper = children.length !== 1 || children[0].type !== 1; + const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null; + if (slotOutlet) { + childBlock = slotOutlet.codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + } else if (needFragmentWrapper) { + childBlock = createVNodeCall( + context, + helper(FRAGMENT), + keyProperty ? createObjectExpression([keyProperty]) : void 0, + node.children, + 64 + (` /* ${PatchFlagNames[64]} */` ), + void 0, + void 0, + true, + void 0, + false + ); + } else { + childBlock = children[0].codegenNode; + if (isTemplate && keyProperty) { + injectProp(childBlock, keyProperty, context); + } + if (childBlock.isBlock !== !isStableFragment) { + if (childBlock.isBlock) { + removeHelper(OPEN_BLOCK); + removeHelper( + getVNodeBlockHelper(context.inSSR, childBlock.isComponent) + ); + } else { + removeHelper( + getVNodeHelper(context.inSSR, childBlock.isComponent) + ); } - else if (needFragmentWrapper) { - // <template v-for="..."> with text or multi-elements - // should generate a fragment block for each loop - childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ + - (` /* ${PatchFlagNames[64 /* STABLE_FRAGMENT */]} */` - ), undefined, undefined, true, undefined, false /* isComponent */); - } - else { - // Normal element v-for. Directly use the child's codegenNode - // but mark it as a block. - childBlock = children[0] - .codegenNode; - if (isTemplate && keyProperty) { - injectProp(childBlock, keyProperty, context); - } - if (childBlock.isBlock !== !isStableFragment) { - if (childBlock.isBlock) { - // switch from block to vnode - removeHelper(OPEN_BLOCK); - removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - // switch from vnode to block - removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - childBlock.isBlock = !isStableFragment; - if (childBlock.isBlock) { - helper(OPEN_BLOCK); - helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); - } - else { - helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); - } - } - if (memo) { - const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [ - createSimpleExpression(`_cached`) - ])); - loop.body = createBlockStatement([ - createCompoundExpression([`const _memo = (`, memo.exp, `)`]), - createCompoundExpression([ - `if (_cached`, - ...(keyExp ? [` && _cached.key === `, keyExp] : []), - ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached` - ]), - createCompoundExpression([`const _item = `, childBlock]), - createSimpleExpression(`_item.memo = _memo`), - createSimpleExpression(`return _item`) - ]); - renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++))); - } - else { - renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */)); - } - }; + } + childBlock.isBlock = !isStableFragment; + if (childBlock.isBlock) { + helper(OPEN_BLOCK); + helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent)); + } else { + helper(getVNodeHelper(context.inSSR, childBlock.isComponent)); + } + } + if (memo) { + const loop = createFunctionExpression( + createForLoopParams(forNode.parseResult, [ + createSimpleExpression(`_cached`) + ]) + ); + loop.body = createBlockStatement([ + createCompoundExpression([`const _memo = (`, memo.exp, `)`]), + createCompoundExpression([ + `if (_cached`, + ...keyExp ? [` && _cached.key === `, keyExp] : [], + ` && ${context.helperString( + IS_MEMO_SAME + )}(_cached, _memo)) return _cached` + ]), + createCompoundExpression([`const _item = `, childBlock]), + createSimpleExpression(`_item.memo = _memo`), + createSimpleExpression(`return _item`) + ]); + renderExp.arguments.push( + loop, + createSimpleExpression(`_cache`), + createSimpleExpression(String(context.cached++)) + ); + } else { + renderExp.arguments.push( + createFunctionExpression( + createForLoopParams(forNode.parseResult), + childBlock, + true + ) + ); + } + }; }); - }); - // target-agnostic transform used for both Client and SSR + } + ); function processFor(node, dir, context, processCodegen) { - if (!dir.exp) { - context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc)); - return; - } - const parseResult = parseForExpression( - // can only be simple expression because vFor transform is applied - // before expression transform. - dir.exp, context); - if (!parseResult) { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc)); - return; - } - const { addIdentifiers, removeIdentifiers, scopes } = context; - const { source, value, key, index } = parseResult; - const forNode = { - type: 11 /* FOR */, - loc: dir.loc, - source, - valueAlias: value, - keyAlias: key, - objectIndexAlias: index, - parseResult, - children: isTemplateNode(node) ? node.children : [node] - }; - context.replaceNode(forNode); - // bookkeeping - scopes.vFor++; - const onExit = processCodegen && processCodegen(forNode); - return () => { - scopes.vFor--; - if (onExit) - onExit(); - }; + if (!dir.exp) { + context.onError( + createCompilerError(31, dir.loc) + ); + return; + } + const parseResult = dir.forParseResult; + if (!parseResult) { + context.onError( + createCompilerError(32, dir.loc) + ); + return; + } + finalizeForParseResult(parseResult, context); + const { addIdentifiers, removeIdentifiers, scopes } = context; + const { source, value, key, index } = parseResult; + const forNode = { + type: 11, + loc: dir.loc, + source, + valueAlias: value, + keyAlias: key, + objectIndexAlias: index, + parseResult, + children: isTemplateNode(node) ? node.children : [node] + }; + context.replaceNode(forNode); + scopes.vFor++; + const onExit = processCodegen && processCodegen(forNode); + return () => { + scopes.vFor--; + if (onExit) + onExit(); + }; } - const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/; - // This regex doesn't cover the case if key or index aliases have destructuring, - // but those do not make sense in the first place, so this works in practice. - const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; - const stripParensRE = /^\(|\)$/g; - function parseForExpression(input, context) { - const loc = input.loc; - const exp = input.content; - const inMatch = exp.match(forAliasRE); - if (!inMatch) - return; - const [, LHS, RHS] = inMatch; - const result = { - source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)), - value: undefined, - key: undefined, - index: undefined - }; - { - validateBrowserExpression(result.source, context); + function finalizeForParseResult(result, context) { + if (result.finalized) + return; + { + validateBrowserExpression(result.source, context); + if (result.key) { + validateBrowserExpression( + result.key, + context, + true + ); } - let valueContent = LHS.trim().replace(stripParensRE, '').trim(); - const trimmedOffset = LHS.indexOf(valueContent); - const iteratorMatch = valueContent.match(forIteratorRE); - if (iteratorMatch) { - valueContent = valueContent.replace(forIteratorRE, '').trim(); - const keyContent = iteratorMatch[1].trim(); - let keyOffset; - if (keyContent) { - keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length); - result.key = createAliasExpression(loc, keyContent, keyOffset); - { - validateBrowserExpression(result.key, context, true); - } - } - if (iteratorMatch[2]) { - const indexContent = iteratorMatch[2].trim(); - if (indexContent) { - result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key - ? keyOffset + keyContent.length - : trimmedOffset + valueContent.length)); - { - validateBrowserExpression(result.index, context, true); - } - } - } + if (result.index) { + validateBrowserExpression( + result.index, + context, + true + ); } - if (valueContent) { - result.value = createAliasExpression(loc, valueContent, trimmedOffset); - { - validateBrowserExpression(result.value, context, true); - } + if (result.value) { + validateBrowserExpression( + result.value, + context, + true + ); } - return result; - } - function createAliasExpression(range, content, offset) { - return createSimpleExpression(content, false, getInnerRange(range, offset, content.length)); + } + result.finalized = true; } function createForLoopParams({ value, key, index }, memoArgs = []) { - return createParamsList([value, key, index, ...memoArgs]); + return createParamsList([value, key, index, ...memoArgs]); } function createParamsList(args) { - let i = args.length; - while (i--) { - if (args[i]) - break; - } - return args - .slice(0, i + 1) - .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false)); + let i = args.length; + while (i--) { + if (args[i]) + break; + } + return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false)); } const defaultFallback = createSimpleExpression(`undefined`, false); - // A NodeTransform that: - // 1. Tracks scope identifiers for scoped slots so that they don't get prefixed - // by transformExpression. This is only applied in non-browser builds with - // { prefixIdentifiers: true }. - // 2. Track v-slot depths so that we know a slot is inside another slot. - // Note the exit callback is executed before buildSlots() on the same node, - // so only nested slots see positive numbers. const trackSlotScopes = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - (node.tagType === 1 /* COMPONENT */ || - node.tagType === 3 /* TEMPLATE */)) { - // We are only checking non-empty v-slot here - // since we only care about slots that introduce scope variables. - const vSlot = findDir(node, 'slot'); - if (vSlot) { - vSlot.exp; - context.scopes.vSlot++; - return () => { - context.scopes.vSlot--; - }; - } + if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) { + const vSlot = findDir(node, "slot"); + if (vSlot) { + vSlot.exp; + context.scopes.vSlot++; + return () => { + context.scopes.vSlot--; + }; } + } }; - const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc); - // Instead of being a DirectiveTransform, v-slot processing is called during - // transformElement to build the slots object for a component. + const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression( + props, + children, + false, + true, + children.length ? children[0].loc : loc + ); function buildSlots(node, context, buildSlotFn = buildClientSlotFn) { - context.helper(WITH_CTX); - const { children, loc } = node; - const slotsProperties = []; - const dynamicSlots = []; - // If the slot is inside a v-for or another v-slot, force it to be dynamic - // since it likely uses a scope variable. - let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; - // 1. Check for slot with slotProps on component itself. - // <Comp v-slot="{ prop }"/> - const onComponentSlot = findDir(node, 'slot', true); + context.helper(WITH_CTX); + const { children, loc } = node; + const slotsProperties = []; + const dynamicSlots = []; + let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0; + const onComponentSlot = findDir(node, "slot", true); + if (onComponentSlot) { + const { arg, exp } = onComponentSlot; + if (arg && !isStaticExp(arg)) { + hasDynamicSlots = true; + } + slotsProperties.push( + createObjectProperty( + arg || createSimpleExpression("default", true), + buildSlotFn(exp, void 0, children, loc) + ) + ); + } + let hasTemplateSlots = false; + let hasNamedDefaultSlot = false; + const implicitDefaultChildren = []; + const seenSlotNames = /* @__PURE__ */ new Set(); + let conditionalBranchIndex = 0; + for (let i = 0; i < children.length; i++) { + const slotElement = children[i]; + let slotDir; + if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) { + if (slotElement.type !== 3) { + implicitDefaultChildren.push(slotElement); + } + continue; + } if (onComponentSlot) { - const { arg, exp } = onComponentSlot; - if (arg && !isStaticExp(arg)) { - hasDynamicSlots = true; - } - slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc))); + context.onError( + createCompilerError(37, slotDir.loc) + ); + break; } - // 2. Iterate through children and check for template slots - // <template v-slot:foo="{ prop }"> - let hasTemplateSlots = false; - let hasNamedDefaultSlot = false; - const implicitDefaultChildren = []; - const seenSlotNames = new Set(); - for (let i = 0; i < children.length; i++) { - const slotElement = children[i]; - let slotDir; - if (!isTemplateNode(slotElement) || - !(slotDir = findDir(slotElement, 'slot', true))) { - // not a <template v-slot>, skip. - if (slotElement.type !== 3 /* COMMENT */) { - implicitDefaultChildren.push(slotElement); - } - continue; - } - if (onComponentSlot) { - // already has on-component slot - this is incorrect usage. - context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc)); - break; - } - hasTemplateSlots = true; - const { children: slotChildren, loc: slotLoc } = slotElement; - const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir; - // check if name is dynamic. - let staticSlotName; - if (isStaticExp(slotName)) { - staticSlotName = slotName ? slotName.content : `default`; - } - else { - hasDynamicSlots = true; - } - const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc); - // check if this slot is conditional (v-if/v-for) - let vIf; - let vElse; - let vFor; - if ((vIf = findDir(slotElement, 'if'))) { - hasDynamicSlots = true; - dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)); - } - else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) { - // find adjacent v-if - let j = i; - let prev; - while (j--) { - prev = children[j]; - if (prev.type !== 3 /* COMMENT */) { - break; - } - } - if (prev && isTemplateNode(prev) && findDir(prev, 'if')) { - // remove node - children.splice(i, 1); - i--; - // attach this slot to previous conditional - let conditional = dynamicSlots[dynamicSlots.length - 1]; - while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) { - conditional = conditional.alternate; - } - conditional.alternate = vElse.exp - ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback) - : buildDynamicSlot(slotName, slotFunction); - } - else { - context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc)); - } - } - else if ((vFor = findDir(slotElement, 'for'))) { - hasDynamicSlots = true; - const parseResult = vFor.parseResult || - parseForExpression(vFor.exp, context); - if (parseResult) { - // Render the dynamic slots as an array and add it to the createSlot() - // args. The runtime knows how to handle it appropriately. - dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [ - parseResult.source, - createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */) - ])); - } - else { - context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc)); - } - } - else { - // check duplicate static names - if (staticSlotName) { - if (seenSlotNames.has(staticSlotName)) { - context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc)); - continue; - } - seenSlotNames.add(staticSlotName); - if (staticSlotName === 'default') { - hasNamedDefaultSlot = true; - } - } - slotsProperties.push(createObjectProperty(slotName, slotFunction)); - } + hasTemplateSlots = true; + const { children: slotChildren, loc: slotLoc } = slotElement; + const { + arg: slotName = createSimpleExpression(`default`, true), + exp: slotProps, + loc: dirLoc + } = slotDir; + let staticSlotName; + if (isStaticExp(slotName)) { + staticSlotName = slotName ? slotName.content : `default`; + } else { + hasDynamicSlots = true; } - if (!onComponentSlot) { - const buildDefaultSlotProperty = (props, children) => { - const fn = buildSlotFn(props, children, loc); - return createObjectProperty(`default`, fn); - }; - if (!hasTemplateSlots) { - // implicit default slot (on component) - slotsProperties.push(buildDefaultSlotProperty(undefined, children)); + const vFor = findDir(slotElement, "for"); + const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc); + let vIf; + let vElse; + if (vIf = findDir(slotElement, "if")) { + hasDynamicSlots = true; + dynamicSlots.push( + createConditionalExpression( + vIf.exp, + buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++), + defaultFallback + ) + ); + } else if (vElse = findDir( + slotElement, + /^else(-if)?$/, + true + /* allowEmpty */ + )) { + let j = i; + let prev; + while (j--) { + prev = children[j]; + if (prev.type !== 3) { + break; } - else if (implicitDefaultChildren.length && - // #3766 - // with whitespace: 'preserve', whitespaces between slots will end up in - // implicitDefaultChildren. Ignore if all implicit children are whitespaces. - implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) { - // implicit default slot (mixed with named slots) - if (hasNamedDefaultSlot) { - context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc)); - } - else { - slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren)); - } + } + if (prev && isTemplateNode(prev) && findDir(prev, "if")) { + children.splice(i, 1); + i--; + let conditional = dynamicSlots[dynamicSlots.length - 1]; + while (conditional.alternate.type === 19) { + conditional = conditional.alternate; } + conditional.alternate = vElse.exp ? createConditionalExpression( + vElse.exp, + buildDynamicSlot( + slotName, + slotFunction, + conditionalBranchIndex++ + ), + defaultFallback + ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++); + } else { + context.onError( + createCompilerError(30, vElse.loc) + ); + } + } else if (vFor) { + hasDynamicSlots = true; + const parseResult = vFor.forParseResult; + if (parseResult) { + finalizeForParseResult(parseResult, context); + dynamicSlots.push( + createCallExpression(context.helper(RENDER_LIST), [ + parseResult.source, + createFunctionExpression( + createForLoopParams(parseResult), + buildDynamicSlot(slotName, slotFunction), + true + ) + ]) + ); + } else { + context.onError( + createCompilerError( + 32, + vFor.loc + ) + ); + } + } else { + if (staticSlotName) { + if (seenSlotNames.has(staticSlotName)) { + context.onError( + createCompilerError( + 38, + dirLoc + ) + ); + continue; + } + seenSlotNames.add(staticSlotName); + if (staticSlotName === "default") { + hasNamedDefaultSlot = true; + } + } + slotsProperties.push(createObjectProperty(slotName, slotFunction)); } - const slotFlag = hasDynamicSlots - ? 2 /* DYNAMIC */ - : hasForwardedSlots(node.children) - ? 3 /* FORWARDED */ - : 1 /* STABLE */; - let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, - // 2 = compiled but dynamic = can skip normalization, but must run diff - // 1 = compiled and static = can skip normalization AND diff as optimized - createSimpleExpression(slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), false))), loc); - if (dynamicSlots.length) { - slots = createCallExpression(context.helper(CREATE_SLOTS), [ - slots, - createArrayExpression(dynamicSlots) - ]); - } - return { - slots, - hasDynamicSlots + } + if (!onComponentSlot) { + const buildDefaultSlotProperty = (props, children2) => { + const fn = buildSlotFn(props, void 0, children2, loc); + return createObjectProperty(`default`, fn); }; - } - function buildDynamicSlot(name, fn) { - return createObjectExpression([ - createObjectProperty(`name`, name), - createObjectProperty(`fn`, fn) + if (!hasTemplateSlots) { + slotsProperties.push(buildDefaultSlotProperty(void 0, children)); + } else if (implicitDefaultChildren.length && // #3766 + // with whitespace: 'preserve', whitespaces between slots will end up in + // implicitDefaultChildren. Ignore if all implicit children are whitespaces. + implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) { + if (hasNamedDefaultSlot) { + context.onError( + createCompilerError( + 39, + implicitDefaultChildren[0].loc + ) + ); + } else { + slotsProperties.push( + buildDefaultSlotProperty(void 0, implicitDefaultChildren) + ); + } + } + } + const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1; + let slots = createObjectExpression( + slotsProperties.concat( + createObjectProperty( + `_`, + // 2 = compiled but dynamic = can skip normalization, but must run diff + // 1 = compiled and static = can skip normalization AND diff as optimized + createSimpleExpression( + slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ), + false + ) + ) + ), + loc + ); + if (dynamicSlots.length) { + slots = createCallExpression(context.helper(CREATE_SLOTS), [ + slots, + createArrayExpression(dynamicSlots) ]); + } + return { + slots, + hasDynamicSlots + }; + } + function buildDynamicSlot(name, fn, index) { + const props = [ + createObjectProperty(`name`, name), + createObjectProperty(`fn`, fn) + ]; + if (index != null) { + props.push( + createObjectProperty(`key`, createSimpleExpression(String(index), true)) + ); + } + return createObjectExpression(props); } function hasForwardedSlots(children) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - switch (child.type) { - case 1 /* ELEMENT */: - if (child.tagType === 2 /* SLOT */ || - hasForwardedSlots(child.children)) { - return true; - } - break; - case 9 /* IF */: - if (hasForwardedSlots(child.branches)) - return true; - break; - case 10 /* IF_BRANCH */: - case 11 /* FOR */: - if (hasForwardedSlots(child.children)) - return true; - break; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + switch (child.type) { + case 1: + if (child.tagType === 2 || hasForwardedSlots(child.children)) { + return true; } + break; + case 9: + if (hasForwardedSlots(child.branches)) + return true; + break; + case 10: + case 11: + if (hasForwardedSlots(child.children)) + return true; + break; } - return false; + } + return false; } function isNonWhitespaceContent(node) { - if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */) - return true; - return node.type === 2 /* TEXT */ - ? !!node.content.trim() - : isNonWhitespaceContent(node.content); + if (node.type !== 2 && node.type !== 12) + return true; + return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content); } - // some directive transforms (e.g. v-model) may return a symbol for runtime - // import, which should be used instead of a resolveDirective call. - const directiveImportMap = new WeakMap(); - // generate a JavaScript AST for this element's codegen + const directiveImportMap = /* @__PURE__ */ new WeakMap(); const transformElement = (node, context) => { - // perform the work on exit, after all child expressions have been - // processed and merged. - return function postTransformElement() { - node = context.currentNode; - if (!(node.type === 1 /* ELEMENT */ && - (node.tagType === 0 /* ELEMENT */ || - node.tagType === 1 /* COMPONENT */))) { - return; + return function postTransformElement() { + node = context.currentNode; + if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) { + return; + } + const { tag, props } = node; + const isComponent = node.tagType === 1; + let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`; + const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; + let vnodeProps; + let vnodeChildren; + let vnodePatchFlag; + let patchFlag = 0; + let vnodeDynamicProps; + let dynamicPropNames; + let vnodeDirectives; + let shouldUseBlock = ( + // dynamic component may resolve to plain elements + isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block + // updates inside get proper isSVG flag at runtime. (#639, #643) + // This is technically web-specific, but splitting the logic out of core + // leads to too much unnecessary complexity. + (tag === "svg" || tag === "foreignObject") + ); + if (props.length > 0) { + const propsBuildResult = buildProps( + node, + context, + void 0, + isComponent, + isDynamicComponent + ); + vnodeProps = propsBuildResult.props; + patchFlag = propsBuildResult.patchFlag; + dynamicPropNames = propsBuildResult.dynamicPropNames; + const directives = propsBuildResult.directives; + vnodeDirectives = directives && directives.length ? createArrayExpression( + directives.map((dir) => buildDirectiveArgs(dir, context)) + ) : void 0; + if (propsBuildResult.shouldUseBlock) { + shouldUseBlock = true; + } + } + if (node.children.length > 0) { + if (vnodeTag === KEEP_ALIVE) { + shouldUseBlock = true; + patchFlag |= 1024; + if (node.children.length > 1) { + context.onError( + createCompilerError(46, { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + }) + ); } - const { tag, props } = node; - const isComponent = node.tagType === 1 /* COMPONENT */; - // The goal of the transform is to create a codegenNode implementing the - // VNodeCall interface. - let vnodeTag = isComponent - ? resolveComponentType(node, context) - : `"${tag}"`; - const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT; - let vnodeProps; - let vnodeChildren; - let vnodePatchFlag; - let patchFlag = 0; - let vnodeDynamicProps; - let dynamicPropNames; - let vnodeDirectives; - let shouldUseBlock = - // dynamic component may resolve to plain elements - isDynamicComponent || - vnodeTag === TELEPORT || - vnodeTag === SUSPENSE || - (!isComponent && - // <svg> and <foreignObject> must be forced into blocks so that block - // updates inside get proper isSVG flag at runtime. (#639, #643) - // This is technically web-specific, but splitting the logic out of core - // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')); - // props - if (props.length > 0) { - const propsBuildResult = buildProps(node, context, undefined, isComponent, isDynamicComponent); - vnodeProps = propsBuildResult.props; - patchFlag = propsBuildResult.patchFlag; - dynamicPropNames = propsBuildResult.dynamicPropNames; - const directives = propsBuildResult.directives; - vnodeDirectives = - directives && directives.length - ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context))) - : undefined; - if (propsBuildResult.shouldUseBlock) { - shouldUseBlock = true; - } + } + const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling + vnodeTag !== TELEPORT && // explained above. + vnodeTag !== KEEP_ALIVE; + if (shouldBuildAsSlots) { + const { slots, hasDynamicSlots } = buildSlots(node, context); + vnodeChildren = slots; + if (hasDynamicSlots) { + patchFlag |= 1024; } - // children - if (node.children.length > 0) { - if (vnodeTag === KEEP_ALIVE) { - // Although a built-in component, we compile KeepAlive with raw children - // instead of slot functions so that it can be used inside Transition - // or other Transition-wrapping HOCs. - // To ensure correct updates with block optimizations, we need to: - // 1. Force keep-alive into a block. This avoids its children being - // collected by a parent block. - shouldUseBlock = true; - // 2. Force keep-alive to always be updated, since it uses raw children. - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - if (node.children.length > 1) { - context.onError(createCompilerError(45 /* X_KEEP_ALIVE_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - } - const shouldBuildAsSlots = isComponent && - // Teleport is not a real component and has dedicated runtime handling - vnodeTag !== TELEPORT && - // explained above. - vnodeTag !== KEEP_ALIVE; - if (shouldBuildAsSlots) { - const { slots, hasDynamicSlots } = buildSlots(node, context); - vnodeChildren = slots; - if (hasDynamicSlots) { - patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } - else if (node.children.length === 1 && vnodeTag !== TELEPORT) { - const child = node.children[0]; - const type = child.type; - // check for dynamic text children - const hasDynamicTextChild = type === 5 /* INTERPOLATION */ || - type === 8 /* COMPOUND_EXPRESSION */; - if (hasDynamicTextChild && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - patchFlag |= 1 /* TEXT */; - } - // pass directly if the only child is a text node - // (plain / interpolation / expression) - if (hasDynamicTextChild || type === 2 /* TEXT */) { - vnodeChildren = child; - } - else { - vnodeChildren = node.children; - } - } - else { - vnodeChildren = node.children; - } + } else if (node.children.length === 1 && vnodeTag !== TELEPORT) { + const child = node.children[0]; + const type = child.type; + const hasDynamicTextChild = type === 5 || type === 8; + if (hasDynamicTextChild && getConstantType(child, context) === 0) { + patchFlag |= 1; } - // patchFlag & dynamicPropNames - if (patchFlag !== 0) { - { - if (patchFlag < 0) { - // special flags (negative and mutually exclusive) - vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; - } - else { - // bitwise flags - const flagNames = Object.keys(PatchFlagNames) - .map(Number) - .filter(n => n > 0 && patchFlag & n) - .map(n => PatchFlagNames[n]) - .join(`, `); - vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; - } - } - if (dynamicPropNames && dynamicPropNames.length) { - vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); - } + if (hasDynamicTextChild || type === 2) { + vnodeChildren = child; + } else { + vnodeChildren = node.children; } - node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc); - }; + } else { + vnodeChildren = node.children; + } + } + if (patchFlag !== 0) { + { + if (patchFlag < 0) { + vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`; + } else { + const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `); + vnodePatchFlag = patchFlag + ` /* ${flagNames} */`; + } + } + if (dynamicPropNames && dynamicPropNames.length) { + vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames); + } + } + node.codegenNode = createVNodeCall( + context, + vnodeTag, + vnodeProps, + vnodeChildren, + vnodePatchFlag, + vnodeDynamicProps, + vnodeDirectives, + !!shouldUseBlock, + false, + isComponent, + node.loc + ); + }; }; function resolveComponentType(node, context, ssr = false) { - let { tag } = node; - // 1. dynamic component - const isExplicitDynamic = isComponentTag(tag); - const isProp = findProp(node, 'is'); - if (isProp) { - if (isExplicitDynamic || - (false )) { - const exp = isProp.type === 6 /* ATTRIBUTE */ - ? isProp.value && createSimpleExpression(isProp.value.content, true) - : isProp.exp; - if (exp) { - return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - exp - ]); - } - } - else if (isProp.type === 6 /* ATTRIBUTE */ && - isProp.value.content.startsWith('vue:')) { - // <button is="vue:xxx"> - // if not <component>, only is value that starts with "vue:" will be - // treated as component by the parse phase and reach here, unless it's - // compat mode where all is values are considered components - tag = isProp.value.content.slice(4); - } - } - // 1.5 v-is (TODO: Deprecate) - const isDir = !isExplicitDynamic && findDir(node, 'is'); - if (isDir && isDir.exp) { + let { tag } = node; + const isExplicitDynamic = isComponentTag(tag); + const isProp = findProp(node, "is"); + if (isProp) { + if (isExplicitDynamic || false) { + const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp; + if (exp) { return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [ - isDir.exp + exp ]); + } + } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) { + tag = isProp.value.content.slice(4); } - // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...) - const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); - if (builtIn) { - // built-ins are simply fallthroughs / have special handling during ssr - // so we don't need to import their runtime equivalents - if (!ssr) - context.helper(builtIn); - return builtIn; - } - // 5. user component (resolve) - context.helper(RESOLVE_COMPONENT); - context.components.add(tag); - return toValidAssetId(tag, `component`); + } + const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag); + if (builtIn) { + if (!ssr) + context.helper(builtIn); + return builtIn; + } + context.helper(RESOLVE_COMPONENT); + context.components.add(tag); + return toValidAssetId(tag, `component`); } function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) { - const { tag, loc: elementLoc, children } = node; - let properties = []; - const mergeArgs = []; - const runtimeDirectives = []; - const hasChildren = children.length > 0; - let shouldUseBlock = false; - // patchFlag analysis - let patchFlag = 0; - let hasRef = false; - let hasClassBinding = false; - let hasStyleBinding = false; - let hasHydrationEventBinding = false; - let hasDynamicKeys = false; - let hasVnodeHook = false; - const dynamicPropNames = []; - const analyzePatchFlag = ({ key, value }) => { - if (isStaticExp(key)) { - const name = key.content; - const isEventHandler = isOn(name); - if (isEventHandler && - (!isComponent || isDynamicComponent) && - // omit the flag for click handlers because hydration gives click - // dedicated fast path. - name.toLowerCase() !== 'onclick' && - // omit v-model handlers - name !== 'onUpdate:modelValue' && - // omit onVnodeXXX hooks - !isReservedProp(name)) { - hasHydrationEventBinding = true; - } - if (isEventHandler && isReservedProp(name)) { - hasVnodeHook = true; - } - if (value.type === 20 /* JS_CACHE_EXPRESSION */ || - ((value.type === 4 /* SIMPLE_EXPRESSION */ || - value.type === 8 /* COMPOUND_EXPRESSION */) && - getConstantType(value, context) > 0)) { - // skip if the prop is a cached handler or has constant value - return; - } - if (name === 'ref') { - hasRef = true; - } - else if (name === 'class') { - hasClassBinding = true; - } - else if (name === 'style') { - hasStyleBinding = true; - } - else if (name !== 'key' && !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - // treat the dynamic class and style binding of the component as dynamic props - if (isComponent && - (name === 'class' || name === 'style') && - !dynamicPropNames.includes(name)) { - dynamicPropNames.push(name); - } - } - else { - hasDynamicKeys = true; - } - }; - for (let i = 0; i < props.length; i++) { - // static attribute - const prop = props[i]; - if (prop.type === 6 /* ATTRIBUTE */) { - const { loc, name, value } = prop; - let isStatic = true; - if (name === 'ref') { - hasRef = true; - if (context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - } - // skip is on <component>, or is="vue:xxx" - if (name === 'is' && - (isComponentTag(tag) || - (value && value.content.startsWith('vue:')) || - (false ))) { - continue; - } - properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc))); - } - else { - // directives - const { name, arg, exp, loc } = prop; - const isVBind = name === 'bind'; - const isVOn = name === 'on'; - // skip v-slot - it is handled by its dedicated transform. - if (name === 'slot') { - if (!isComponent) { - context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc)); - } - continue; - } - // skip v-once/v-memo - they are handled by dedicated transforms. - if (name === 'once' || name === 'memo') { - continue; - } - // skip v-is and :is on <component> - if (name === 'is' || - (isVBind && - isStaticArgOf(arg, 'is') && - (isComponentTag(tag) || - (false )))) { - continue; - } - // skip v-on in SSR compilation - if (isVOn && ssr) { - continue; - } - if ( - // #938: elements with dynamic keys should be forced into blocks - (isVBind && isStaticArgOf(arg, 'key')) || - // inline before-update hooks need to force block so that it is invoked - // before children - (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) { - shouldUseBlock = true; - } - if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) { - properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true'))); - } - // special case for v-bind and v-on with no argument - if (!arg && (isVBind || isVOn)) { - hasDynamicKeys = true; - if (exp) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - properties = []; - } - if (isVBind) { - mergeArgs.push(exp); - } - else { - // v-on="obj" -> toHandlers(obj) - mergeArgs.push({ - type: 14 /* JS_CALL_EXPRESSION */, - loc, - callee: context.helper(TO_HANDLERS), - arguments: [exp] - }); - } - } - else { - context.onError(createCompilerError(isVBind - ? 34 /* X_V_BIND_NO_EXPRESSION */ - : 35 /* X_V_ON_NO_EXPRESSION */, loc)); - } - continue; - } - const directiveTransform = context.directiveTransforms[name]; - if (directiveTransform) { - // has built-in directive transform. - const { props, needRuntime } = directiveTransform(prop, node, context); - !ssr && props.forEach(analyzePatchFlag); - properties.push(...props); - if (needRuntime) { - runtimeDirectives.push(prop); - if (isSymbol(needRuntime)) { - directiveImportMap.set(prop, needRuntime); - } - } - } - else if (!isBuiltInDirective(name)) { - // no built-in transform, this is a user custom directive. - runtimeDirectives.push(prop); - // custom dirs may use beforeUpdate so they need to force blocks - // to ensure before-update gets called before children update - if (hasChildren) { - shouldUseBlock = true; - } - } - } + const { tag, loc: elementLoc, children } = node; + let properties = []; + const mergeArgs = []; + const runtimeDirectives = []; + const hasChildren = children.length > 0; + let shouldUseBlock = false; + let patchFlag = 0; + let hasRef = false; + let hasClassBinding = false; + let hasStyleBinding = false; + let hasHydrationEventBinding = false; + let hasDynamicKeys = false; + let hasVnodeHook = false; + const dynamicPropNames = []; + const pushMergeArg = (arg) => { + if (properties.length) { + mergeArgs.push( + createObjectExpression(dedupeProperties(properties), elementLoc) + ); + properties = []; } - let propsExpression = undefined; - // has v-bind="object" or v-on="object", wrap with mergeProps - if (mergeArgs.length) { - if (properties.length) { - mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc)); - } - if (mergeArgs.length > 1) { - propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc); - } - else { - // single v-bind with nothing else - no need for a mergeProps call - propsExpression = mergeArgs[0]; - } + if (arg) + mergeArgs.push(arg); + }; + const analyzePatchFlag = ({ key, value }) => { + if (isStaticExp(key)) { + const name = key.content; + const isEventHandler = isOn(name); + if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click + // dedicated fast path. + name.toLowerCase() !== "onclick" && // omit v-model handlers + name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks + !isReservedProp(name)) { + hasHydrationEventBinding = true; + } + if (isEventHandler && isReservedProp(name)) { + hasVnodeHook = true; + } + if (isEventHandler && value.type === 14) { + value = value.arguments[0]; + } + if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) { + return; + } + if (name === "ref") { + hasRef = true; + } else if (name === "class") { + hasClassBinding = true; + } else if (name === "style") { + hasStyleBinding = true; + } else if (name !== "key" && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) { + dynamicPropNames.push(name); + } + } else { + hasDynamicKeys = true; } - else if (properties.length) { - propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc); - } - // patchFlag analysis - if (hasDynamicKeys) { - patchFlag |= 16 /* FULL_PROPS */; - } - else { - if (hasClassBinding && !isComponent) { - patchFlag |= 2 /* CLASS */; + }; + for (let i = 0; i < props.length; i++) { + const prop = props[i]; + if (prop.type === 6) { + const { loc, name, nameLoc, value } = prop; + let isStatic = true; + if (name === "ref") { + hasRef = true; + if (context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); } - if (hasStyleBinding && !isComponent) { - patchFlag |= 4 /* STYLE */; + } + if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || false)) { + continue; + } + properties.push( + createObjectProperty( + createSimpleExpression(name, true, nameLoc), + createSimpleExpression( + value ? value.content : "", + isStatic, + value ? value.loc : loc + ) + ) + ); + } else { + const { name, arg, exp, loc, modifiers } = prop; + const isVBind = name === "bind"; + const isVOn = name === "on"; + if (name === "slot") { + if (!isComponent) { + context.onError( + createCompilerError(40, loc) + ); } - if (dynamicPropNames.length) { - patchFlag |= 8 /* PROPS */; + continue; + } + if (name === "once" || name === "memo") { + continue; + } + if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || false)) { + continue; + } + if (isVOn && ssr) { + continue; + } + if ( + // #938: elements with dynamic keys should be forced into blocks + isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked + // before children + isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update") + ) { + shouldUseBlock = true; + } + if (isVBind && isStaticArgOf(arg, "ref") && context.scopes.vFor > 0) { + properties.push( + createObjectProperty( + createSimpleExpression("ref_for", true), + createSimpleExpression("true") + ) + ); + } + if (!arg && (isVBind || isVOn)) { + hasDynamicKeys = true; + if (exp) { + if (isVBind) { + pushMergeArg(); + mergeArgs.push(exp); + } else { + pushMergeArg({ + type: 14, + loc, + callee: context.helper(TO_HANDLERS), + arguments: isComponent ? [exp] : [exp, `true`] + }); + } + } else { + context.onError( + createCompilerError( + isVBind ? 34 : 35, + loc + ) + ); } - if (hasHydrationEventBinding) { - patchFlag |= 32 /* HYDRATE_EVENTS */; + continue; + } + if (isVBind && modifiers.includes("prop")) { + patchFlag |= 32; + } + const directiveTransform = context.directiveTransforms[name]; + if (directiveTransform) { + const { props: props2, needRuntime } = directiveTransform(prop, node, context); + !ssr && props2.forEach(analyzePatchFlag); + if (isVOn && arg && !isStaticExp(arg)) { + pushMergeArg(createObjectExpression(props2, elementLoc)); + } else { + properties.push(...props2); } + if (needRuntime) { + runtimeDirectives.push(prop); + if (isSymbol(needRuntime)) { + directiveImportMap.set(prop, needRuntime); + } + } + } else if (!isBuiltInDirective(name)) { + runtimeDirectives.push(prop); + if (hasChildren) { + shouldUseBlock = true; + } + } } - if (!shouldUseBlock && - (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) && - (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { - patchFlag |= 512 /* NEED_PATCH */; + } + let propsExpression = void 0; + if (mergeArgs.length) { + pushMergeArg(); + if (mergeArgs.length > 1) { + propsExpression = createCallExpression( + context.helper(MERGE_PROPS), + mergeArgs, + elementLoc + ); + } else { + propsExpression = mergeArgs[0]; } - // pre-normalize props, SSR is skipped for now - if (!context.inSSR && propsExpression) { - switch (propsExpression.type) { - case 15 /* JS_OBJECT_EXPRESSION */: - // means that there is no v-bind, - // but still need to deal with dynamic key binding - let classKeyIndex = -1; - let styleKeyIndex = -1; - let hasDynamicKey = false; - for (let i = 0; i < propsExpression.properties.length; i++) { - const key = propsExpression.properties[i].key; - if (isStaticExp(key)) { - if (key.content === 'class') { - classKeyIndex = i; - } - else if (key.content === 'style') { - styleKeyIndex = i; - } - } - else if (!key.isHandlerKey) { - hasDynamicKey = true; - } - } - const classProp = propsExpression.properties[classKeyIndex]; - const styleProp = propsExpression.properties[styleKeyIndex]; - // no dynamic key - if (!hasDynamicKey) { - if (classProp && !isStaticExp(classProp.value)) { - classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]); - } - if (styleProp && - // the static style is compiled into an object, - // so use `hasStyleBinding` to ensure that it is a dynamic style binding - (hasStyleBinding || - (styleProp.value.type === 4 /* SIMPLE_EXPRESSION */ && - styleProp.value.content.trim()[0] === `[`) || - // v-bind:style and style both exist, - // v-bind:style with static literal object - styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) { - styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]); - } - } - else { - // dynamic key binding, wrap with `normalizeProps` - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]); - } - break; - case 14 /* JS_CALL_EXPRESSION */: - // mergeProps call, do nothing - break; - default: - // single v-bind - propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [ - createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ - propsExpression - ]) - ]); - break; + } else if (properties.length) { + propsExpression = createObjectExpression( + dedupeProperties(properties), + elementLoc + ); + } + if (hasDynamicKeys) { + patchFlag |= 16; + } else { + if (hasClassBinding && !isComponent) { + patchFlag |= 2; + } + if (hasStyleBinding && !isComponent) { + patchFlag |= 4; + } + if (dynamicPropNames.length) { + patchFlag |= 8; + } + if (hasHydrationEventBinding) { + patchFlag |= 32; + } + } + if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) { + patchFlag |= 512; + } + if (!context.inSSR && propsExpression) { + switch (propsExpression.type) { + case 15: + let classKeyIndex = -1; + let styleKeyIndex = -1; + let hasDynamicKey = false; + for (let i = 0; i < propsExpression.properties.length; i++) { + const key = propsExpression.properties[i].key; + if (isStaticExp(key)) { + if (key.content === "class") { + classKeyIndex = i; + } else if (key.content === "style") { + styleKeyIndex = i; + } + } else if (!key.isHandlerKey) { + hasDynamicKey = true; + } } + const classProp = propsExpression.properties[classKeyIndex]; + const styleProp = propsExpression.properties[styleKeyIndex]; + if (!hasDynamicKey) { + if (classProp && !isStaticExp(classProp.value)) { + classProp.value = createCallExpression( + context.helper(NORMALIZE_CLASS), + [classProp.value] + ); + } + if (styleProp && // the static style is compiled into an object, + // so use `hasStyleBinding` to ensure that it is a dynamic style binding + (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist, + // v-bind:style with static literal object + styleProp.value.type === 17)) { + styleProp.value = createCallExpression( + context.helper(NORMALIZE_STYLE), + [styleProp.value] + ); + } + } else { + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [propsExpression] + ); + } + break; + case 14: + break; + default: + propsExpression = createCallExpression( + context.helper(NORMALIZE_PROPS), + [ + createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [ + propsExpression + ]) + ] + ); + break; } - return { - props: propsExpression, - directives: runtimeDirectives, - patchFlag, - dynamicPropNames, - shouldUseBlock - }; + } + return { + props: propsExpression, + directives: runtimeDirectives, + patchFlag, + dynamicPropNames, + shouldUseBlock + }; } - // Dedupe props in an object literal. - // Literal duplicated attributes would have been warned during the parse phase, - // however, it's possible to encounter duplicated `onXXX` handlers with different - // modifiers. We also need to merge static and dynamic class / style attributes. - // - onXXX handlers / style: merge into array - // - class: merge into single expression with concatenation function dedupeProperties(properties) { - const knownProps = new Map(); - const deduped = []; - for (let i = 0; i < properties.length; i++) { - const prop = properties[i]; - // dynamic keys are always allowed - if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) { - deduped.push(prop); - continue; - } - const name = prop.key.content; - const existing = knownProps.get(name); - if (existing) { - if (name === 'style' || name === 'class' || isOn(name)) { - mergeAsArray$1(existing, prop); - } - // unexpected duplicate, should have emitted error during parse - } - else { - knownProps.set(name, prop); - deduped.push(prop); - } + const knownProps = /* @__PURE__ */ new Map(); + const deduped = []; + for (let i = 0; i < properties.length; i++) { + const prop = properties[i]; + if (prop.key.type === 8 || !prop.key.isStatic) { + deduped.push(prop); + continue; } - return deduped; + const name = prop.key.content; + const existing = knownProps.get(name); + if (existing) { + if (name === "style" || name === "class" || isOn(name)) { + mergeAsArray(existing, prop); + } + } else { + knownProps.set(name, prop); + deduped.push(prop); + } + } + return deduped; } - function mergeAsArray$1(existing, incoming) { - if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) { - existing.value.elements.push(incoming.value); - } - else { - existing.value = createArrayExpression([existing.value, incoming.value], existing.loc); - } + function mergeAsArray(existing, incoming) { + if (existing.value.type === 17) { + existing.value.elements.push(incoming.value); + } else { + existing.value = createArrayExpression( + [existing.value, incoming.value], + existing.loc + ); + } } function buildDirectiveArgs(dir, context) { - const dirArgs = []; - const runtime = directiveImportMap.get(dir); - if (runtime) { - // built-in directive with runtime - dirArgs.push(context.helperString(runtime)); + const dirArgs = []; + const runtime = directiveImportMap.get(dir); + if (runtime) { + dirArgs.push(context.helperString(runtime)); + } else { + { + context.helper(RESOLVE_DIRECTIVE); + context.directives.add(dir.name); + dirArgs.push(toValidAssetId(dir.name, `directive`)); } - else { - { - // inject statement for resolving directive - context.helper(RESOLVE_DIRECTIVE); - context.directives.add(dir.name); - dirArgs.push(toValidAssetId(dir.name, `directive`)); - } + } + const { loc } = dir; + if (dir.exp) + dirArgs.push(dir.exp); + if (dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); } - const { loc } = dir; - if (dir.exp) - dirArgs.push(dir.exp); - if (dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(dir.arg); + dirArgs.push(dir.arg); + } + if (Object.keys(dir.modifiers).length) { + if (!dir.arg) { + if (!dir.exp) { + dirArgs.push(`void 0`); + } + dirArgs.push(`void 0`); } - if (Object.keys(dir.modifiers).length) { - if (!dir.arg) { - if (!dir.exp) { - dirArgs.push(`void 0`); - } - dirArgs.push(`void 0`); - } - const trueExpression = createSimpleExpression(`true`, false, loc); - dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc)); - } - return createArrayExpression(dirArgs, dir.loc); + const trueExpression = createSimpleExpression(`true`, false, loc); + dirArgs.push( + createObjectExpression( + dir.modifiers.map( + (modifier) => createObjectProperty(modifier, trueExpression) + ), + loc + ) + ); + } + return createArrayExpression(dirArgs, dir.loc); } function stringifyDynamicPropNames(props) { - let propsNamesString = `[`; - for (let i = 0, l = props.length; i < l; i++) { - propsNamesString += JSON.stringify(props[i]); - if (i < l - 1) - propsNamesString += ', '; - } - return propsNamesString + `]`; + let propsNamesString = `[`; + for (let i = 0, l = props.length; i < l; i++) { + propsNamesString += JSON.stringify(props[i]); + if (i < l - 1) + propsNamesString += ", "; + } + return propsNamesString + `]`; } function isComponentTag(tag) { - return tag === 'component' || tag === 'Component'; + return tag === "component" || tag === "Component"; } const transformSlotOutlet = (node, context) => { - if (isSlotOutlet(node)) { - const { children, loc } = node; - const { slotName, slotProps } = processSlotOutlet(node, context); - const slotArgs = [ - context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, - slotName, - '{}', - 'undefined', - 'true' - ]; - let expectedLen = 2; - if (slotProps) { - slotArgs[2] = slotProps; - expectedLen = 3; - } - if (children.length) { - slotArgs[3] = createFunctionExpression([], children, false, false, loc); - expectedLen = 4; - } - if (context.scopeId && !context.slotted) { - expectedLen = 5; - } - slotArgs.splice(expectedLen); // remove unused arguments - node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc); + if (isSlotOutlet(node)) { + const { children, loc } = node; + const { slotName, slotProps } = processSlotOutlet(node, context); + const slotArgs = [ + context.prefixIdentifiers ? `_ctx.$slots` : `$slots`, + slotName, + "{}", + "undefined", + "true" + ]; + let expectedLen = 2; + if (slotProps) { + slotArgs[2] = slotProps; + expectedLen = 3; } + if (children.length) { + slotArgs[3] = createFunctionExpression([], children, false, false, loc); + expectedLen = 4; + } + if (context.scopeId && !context.slotted) { + expectedLen = 5; + } + slotArgs.splice(expectedLen); + node.codegenNode = createCallExpression( + context.helper(RENDER_SLOT), + slotArgs, + loc + ); + } }; function processSlotOutlet(node, context) { - let slotName = `"default"`; - let slotProps = undefined; - const nonNameProps = []; - for (let i = 0; i < node.props.length; i++) { - const p = node.props[i]; - if (p.type === 6 /* ATTRIBUTE */) { - if (p.value) { - if (p.name === 'name') { - slotName = JSON.stringify(p.value.content); - } - else { - p.name = camelize(p.name); - nonNameProps.push(p); - } - } + let slotName = `"default"`; + let slotProps = void 0; + const nonNameProps = []; + for (let i = 0; i < node.props.length; i++) { + const p = node.props[i]; + if (p.type === 6) { + if (p.value) { + if (p.name === "name") { + slotName = JSON.stringify(p.value.content); + } else { + p.name = camelize(p.name); + nonNameProps.push(p); } - else { - if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) { - if (p.exp) - slotName = p.exp; - } - else { - if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) { - p.arg.content = camelize(p.arg.content); - } - nonNameProps.push(p); - } + } + } else { + if (p.name === "bind" && isStaticArgOf(p.arg, "name")) { + if (p.exp) + slotName = p.exp; + } else { + if (p.name === "bind" && p.arg && isStaticExp(p.arg)) { + p.arg.content = camelize(p.arg.content); } + nonNameProps.push(p); + } } - if (nonNameProps.length > 0) { - const { props, directives } = buildProps(node, context, nonNameProps, false, false); - slotProps = props; - if (directives.length) { - context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc)); - } + } + if (nonNameProps.length > 0) { + const { props, directives } = buildProps( + node, + context, + nonNameProps, + false, + false + ); + slotProps = props; + if (directives.length) { + context.onError( + createCompilerError( + 36, + directives[0].loc + ) + ); } - return { - slotName, - slotProps - }; + } + return { + slotName, + slotProps + }; } - const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; - const transformOn = (dir, node, context, augmentor) => { - const { loc, modifiers, arg } = dir; - if (!dir.exp && !modifiers.length) { - context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc)); + const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/; + const transformOn$1 = (dir, node, context, augmentor) => { + const { loc, modifiers, arg } = dir; + if (!dir.exp && !modifiers.length) { + context.onError(createCompilerError(35, loc)); + } + let eventName; + if (arg.type === 4) { + if (arg.isStatic) { + let rawName = arg.content; + if (rawName.startsWith("vnode")) { + context.onError(createCompilerError(51, arg.loc)); + } + if (rawName.startsWith("vue:")) { + rawName = `vnode-${rawName.slice(4)}`; + } + const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? ( + // for non-element and vnode lifecycle event listeners, auto convert + // it to camelCase. See issue #2249 + toHandlerKey(camelize(rawName)) + ) : ( + // preserve case for plain element listeners that have uppercase + // letters, as these may be custom elements' custom events + `on:${rawName}` + ); + eventName = createSimpleExpression(eventString, true, arg.loc); + } else { + eventName = createCompoundExpression([ + `${context.helperString(TO_HANDLER_KEY)}(`, + arg, + `)` + ]); } - let eventName; - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - let rawName = arg.content; - // TODO deprecate @vnodeXXX usage - if (rawName.startsWith('vue:')) { - rawName = `vnode-${rawName.slice(4)}`; - } - // for all event listeners, auto convert it to camelCase. See issue #2249 - eventName = createSimpleExpression(toHandlerKey(camelize(rawName)), true, arg.loc); - } - else { - // #2388 - eventName = createCompoundExpression([ - `${context.helperString(TO_HANDLER_KEY)}(`, - arg, - `)` - ]); - } + } else { + eventName = arg; + eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); + eventName.children.push(`)`); + } + let exp = dir.exp; + if (exp && !exp.content.trim()) { + exp = void 0; + } + let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; + if (exp) { + const isMemberExp = isMemberExpression(exp.content); + const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); + const hasMultipleStatements = exp.content.includes(`;`); + { + validateBrowserExpression( + exp, + context, + false, + hasMultipleStatements + ); } - else { - // already a compound expression. - eventName = arg; - eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`); - eventName.children.push(`)`); + if (isInlineStatement || shouldCache && isMemberExp) { + exp = createCompoundExpression([ + `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, + exp, + hasMultipleStatements ? `}` : `)` + ]); } - // handler processing - let exp = dir.exp; - if (exp && !exp.content.trim()) { - exp = undefined; - } - let shouldCache = context.cacheHandlers && !exp && !context.inVOnce; - if (exp) { - const isMemberExp = isMemberExpression(exp.content); - const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content)); - const hasMultipleStatements = exp.content.includes(`;`); - { - validateBrowserExpression(exp, context, false, hasMultipleStatements); - } - if (isInlineStatement || (shouldCache && isMemberExp)) { - // wrap inline statement in a function expression - exp = createCompoundExpression([ - `${isInlineStatement - ? `$event` - : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`, - exp, - hasMultipleStatements ? `}` : `)` - ]); - } - } - let ret = { - props: [ - createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc)) - ] - }; - // apply extended compiler augmentor - if (augmentor) { - ret = augmentor(ret); - } - if (shouldCache) { - // cache handlers so that it's always the same handler being passed down. - // this avoids unnecessary re-renders when users use inline handlers on - // components. - ret.props[0].value = context.cache(ret.props[0].value); - } - // mark the key as handler for props normalization check - ret.props.forEach(p => (p.key.isHandlerKey = true)); - return ret; + } + let ret = { + props: [ + createObjectProperty( + eventName, + exp || createSimpleExpression(`() => {}`, false, loc) + ) + ] + }; + if (augmentor) { + ret = augmentor(ret); + } + if (shouldCache) { + ret.props[0].value = context.cache(ret.props[0].value); + } + ret.props.forEach((p) => p.key.isHandlerKey = true); + return ret; }; - // v-bind without arg is handled directly in ./transformElements.ts due to it affecting - // codegen for the entire props object. This transform here is only for v-bind - // *with* args. const transformBind = (dir, _node, context) => { - const { exp, modifiers, loc } = dir; - const arg = dir.arg; - if (arg.type !== 4 /* SIMPLE_EXPRESSION */) { - arg.children.unshift(`(`); - arg.children.push(`) || ""`); + const { modifiers, loc } = dir; + const arg = dir.arg; + let { exp } = dir; + if (!exp && arg.type === 4) { + const propName = camelize(arg.content); + exp = dir.exp = createSimpleExpression(propName, false, arg.loc); + } + if (arg.type !== 4) { + arg.children.unshift(`(`); + arg.children.push(`) || ""`); + } else if (!arg.isStatic) { + arg.content = `${arg.content} || ""`; + } + if (modifiers.includes("camel")) { + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = camelize(arg.content); + } else { + arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; + } + } else { + arg.children.unshift(`${context.helperString(CAMELIZE)}(`); + arg.children.push(`)`); } - else if (!arg.isStatic) { - arg.content = `${arg.content} || ""`; + } + if (!context.inSSR) { + if (modifiers.includes("prop")) { + injectPrefix(arg, "."); } - // .sync is replaced by v-model:arg - if (modifiers.includes('camel')) { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = camelize(arg.content); - } - else { - arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`; - } - } - else { - arg.children.unshift(`${context.helperString(CAMELIZE)}(`); - arg.children.push(`)`); - } - } - if (!context.inSSR) { - if (modifiers.includes('prop')) { - injectPrefix(arg, '.'); - } - if (modifiers.includes('attr')) { - injectPrefix(arg, '^'); - } - } - if (!exp || - (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) { - context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc)); - return { - props: [createObjectProperty(arg, createSimpleExpression('', true, loc))] - }; + if (modifiers.includes("attr")) { + injectPrefix(arg, "^"); } + } + if (!exp || exp.type === 4 && !exp.content.trim()) { + context.onError(createCompilerError(34, loc)); return { - props: [createObjectProperty(arg, exp)] + props: [createObjectProperty(arg, createSimpleExpression("", true, loc))] }; + } + return { + props: [createObjectProperty(arg, exp)] + }; }; const injectPrefix = (arg, prefix) => { - if (arg.type === 4 /* SIMPLE_EXPRESSION */) { - if (arg.isStatic) { - arg.content = prefix + arg.content; - } - else { - arg.content = `\`${prefix}\${${arg.content}}\``; - } - } - else { - arg.children.unshift(`'${prefix}' + (`); - arg.children.push(`)`); + if (arg.type === 4) { + if (arg.isStatic) { + arg.content = prefix + arg.content; + } else { + arg.content = `\`${prefix}\${${arg.content}}\``; } + } else { + arg.children.unshift(`'${prefix}' + (`); + arg.children.push(`)`); + } }; - // Merge adjacent text nodes and expressions into a single expression - // e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child. const transformText = (node, context) => { - if (node.type === 0 /* ROOT */ || - node.type === 1 /* ELEMENT */ || - node.type === 11 /* FOR */ || - node.type === 10 /* IF_BRANCH */) { - // perform the transform on node exit so that all expressions have already - // been processed. - return () => { - const children = node.children; - let currentContainer = undefined; - let hasText = false; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child)) { - hasText = true; - for (let j = i + 1; j < children.length; j++) { - const next = children[j]; - if (isText(next)) { - if (!currentContainer) { - currentContainer = children[i] = createCompoundExpression([child], child.loc); - } - // merge adjacent text node into current - currentContainer.children.push(` + `, next); - children.splice(j, 1); - j--; - } - else { - currentContainer = undefined; - break; - } - } - } + if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) { + return () => { + const children = node.children; + let currentContainer = void 0; + let hasText = false; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child)) { + hasText = true; + for (let j = i + 1; j < children.length; j++) { + const next = children[j]; + if (isText$1(next)) { + if (!currentContainer) { + currentContainer = children[i] = createCompoundExpression( + [child], + child.loc + ); + } + currentContainer.children.push(` + `, next); + children.splice(j, 1); + j--; + } else { + currentContainer = void 0; + break; } - if (!hasText || - // if this is a plain element with a single text child, leave it - // as-is since the runtime has dedicated fast path for this by directly - // setting textContent of the element. - // for component root it's always normalized anyway. - (children.length === 1 && - (node.type === 0 /* ROOT */ || - (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - // #3756 - // custom directives can potentially add DOM elements arbitrarily, - // we need to avoid setting textContent of the element at runtime - // to avoid accidentally overwriting the DOM elements added - // by the user through custom directives. - !node.props.find(p => p.type === 7 /* DIRECTIVE */ && - !context.directiveTransforms[p.name]) && - // in compat mode, <template> tags with no special directives - // will be rendered as a fragment so its children must be - // converted into vnodes. - !(false ))))) { - return; - } - // pre-convert text nodes into createTextVNode(text) calls to avoid - // runtime normalization. - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) { - const callArgs = []; - // createTextVNode defaults to single whitespace, so if it is a - // single space the code could be an empty call to save bytes. - if (child.type !== 2 /* TEXT */ || child.content !== ' ') { - callArgs.push(child); - } - // mark dynamic text with flag so it gets patched inside a block - if (!context.ssr && - getConstantType(child, context) === 0 /* NOT_CONSTANT */) { - callArgs.push(1 /* TEXT */ + - (` /* ${PatchFlagNames[1 /* TEXT */]} */` )); - } - children[i] = { - type: 12 /* TEXT_CALL */, - content: child, - loc: child.loc, - codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs) - }; - } - } - }; - } - }; - - const seen = new WeakSet(); - const transformOnce = (node, context) => { - if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) { - if (seen.has(node) || context.inVOnce) { - return; + } } - seen.add(node); - context.inVOnce = true; - context.helper(SET_BLOCK_TRACKING); - return () => { - context.inVOnce = false; - const cur = context.currentNode; - if (cur.codegenNode) { - cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */); - } - }; - } + } + if (!hasText || // if this is a plain element with a single text child, leave it + // as-is since the runtime has dedicated fast path for this by directly + // setting textContent of the element. + // for component root it's always normalized anyway. + children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756 + // custom directives can potentially add DOM elements arbitrarily, + // we need to avoid setting textContent of the element at runtime + // to avoid accidentally overwriting the DOM elements added + // by the user through custom directives. + !node.props.find( + (p) => p.type === 7 && !context.directiveTransforms[p.name] + ) && // in compat mode, <template> tags with no special directives + // will be rendered as a fragment so its children must be + // converted into vnodes. + true)) { + return; + } + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isText$1(child) || child.type === 8) { + const callArgs = []; + if (child.type !== 2 || child.content !== " ") { + callArgs.push(child); + } + if (!context.ssr && getConstantType(child, context) === 0) { + callArgs.push( + 1 + (` /* ${PatchFlagNames[1]} */` ) + ); + } + children[i] = { + type: 12, + content: child, + loc: child.loc, + codegenNode: createCallExpression( + context.helper(CREATE_TEXT), + callArgs + ) + }; + } + } + }; + } }; - const transformModel = (dir, node, context) => { - const { exp, arg } = dir; - if (!exp) { - context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc)); - return createTransformProps(); + const seen$1 = /* @__PURE__ */ new WeakSet(); + const transformOnce = (node, context) => { + if (node.type === 1 && findDir(node, "once", true)) { + if (seen$1.has(node) || context.inVOnce || context.inSSR) { + return; } - const rawExp = exp.loc.source; - const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp; - // im SFC <script setup> inline mode, the exp may have been transformed into - // _unref(exp) - context.bindingMetadata[rawExp]; - const maybeRef = !true /* SETUP_CONST */; - if (!expString.trim() || - (!isMemberExpression(expString) && !maybeRef)) { - context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc)); - return createTransformProps(); - } - const propName = arg ? arg : createSimpleExpression('modelValue', true); - const eventName = arg - ? isStaticExp(arg) - ? `onUpdate:${arg.content}` - : createCompoundExpression(['"onUpdate:" + ', arg]) - : `onUpdate:modelValue`; - let assignmentExp; - const eventArg = context.isTS ? `($event: any)` : `$event`; - { - assignmentExp = createCompoundExpression([ - `${eventArg} => ((`, - exp, - `) = $event)` - ]); - } - const props = [ - // modelValue: foo - createObjectProperty(propName, dir.exp), - // "onUpdate:modelValue": $event => (foo = $event) - createObjectProperty(eventName, assignmentExp) - ]; - // modelModifiers: { foo: true, "bar-baz": true } - if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) { - const modifiers = dir.modifiers - .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`) - .join(`, `); - const modifiersKey = arg - ? isStaticExp(arg) - ? `${arg.content}Modifiers` - : createCompoundExpression([arg, ' + "Modifiers"']) - : `modelModifiers`; - props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */))); - } - return createTransformProps(props); + seen$1.add(node); + context.inVOnce = true; + context.helper(SET_BLOCK_TRACKING); + return () => { + context.inVOnce = false; + const cur = context.currentNode; + if (cur.codegenNode) { + cur.codegenNode = context.cache( + cur.codegenNode, + true + /* isVNode */ + ); + } + }; + } + }; + + const transformModel$1 = (dir, node, context) => { + const { exp, arg } = dir; + if (!exp) { + context.onError( + createCompilerError(41, dir.loc) + ); + return createTransformProps(); + } + const rawExp = exp.loc.source; + const expString = exp.type === 4 ? exp.content : rawExp; + const bindingType = context.bindingMetadata[rawExp]; + if (bindingType === "props" || bindingType === "props-aliased") { + context.onError(createCompilerError(44, exp.loc)); + return createTransformProps(); + } + const maybeRef = false; + if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) { + context.onError( + createCompilerError(42, exp.loc) + ); + return createTransformProps(); + } + const propName = arg ? arg : createSimpleExpression("modelValue", true); + const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`; + let assignmentExp; + const eventArg = context.isTS ? `($event: any)` : `$event`; + { + assignmentExp = createCompoundExpression([ + `${eventArg} => ((`, + exp, + `) = $event)` + ]); + } + const props = [ + // modelValue: foo + createObjectProperty(propName, dir.exp), + // "onUpdate:modelValue": $event => (foo = $event) + createObjectProperty(eventName, assignmentExp) + ]; + if (dir.modifiers.length && node.tagType === 1) { + const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `); + const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`; + props.push( + createObjectProperty( + modifiersKey, + createSimpleExpression( + `{ ${modifiers} }`, + false, + dir.loc, + 2 + ) + ) + ); + } + return createTransformProps(props); }; function createTransformProps(props = []) { - return { props }; + return { props }; } - const seen$1 = new WeakSet(); + const seen = /* @__PURE__ */ new WeakSet(); const transformMemo = (node, context) => { - if (node.type === 1 /* ELEMENT */) { - const dir = findDir(node, 'memo'); - if (!dir || seen$1.has(node)) { - return; - } - seen$1.add(node); - return () => { - const codegenNode = node.codegenNode || - context.currentNode.codegenNode; - if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) { - // non-component sub tree should be turned into a block - if (node.tagType !== 1 /* COMPONENT */) { - makeBlock(codegenNode, context); - } - node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ - dir.exp, - createFunctionExpression(undefined, codegenNode), - `_cache`, - String(context.cached++) - ]); - } - }; + if (node.type === 1) { + const dir = findDir(node, "memo"); + if (!dir || seen.has(node)) { + return; } + seen.add(node); + return () => { + const codegenNode = node.codegenNode || context.currentNode.codegenNode; + if (codegenNode && codegenNode.type === 13) { + if (node.tagType !== 1) { + convertToBlock(codegenNode, context); + } + node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [ + dir.exp, + createFunctionExpression(void 0, codegenNode), + `_cache`, + String(context.cached++) + ]); + } + }; + } }; function getBaseTransformPreset(prefixIdentifiers) { - return [ - [ - transformOnce, - transformIf, - transformMemo, - transformFor, - ...([]), - ...([transformExpression] - ), - transformSlotOutlet, - transformElement, - trackSlotScopes, - transformText - ], - { - on: transformOn, - bind: transformBind, - model: transformModel - } - ]; - } - // we name it `baseCompile` so that higher order compilers like - // @vue/compiler-dom can export `compile` while re-exporting everything else. - function baseCompile(template, options = {}) { - const onError = options.onError || defaultOnError; - const isModuleMode = options.mode === 'module'; - /* istanbul ignore if */ + return [ + [ + transformOnce, + transformIf, + transformMemo, + transformFor, + ...[], + ...[transformExpression] , + transformSlotOutlet, + transformElement, + trackSlotScopes, + transformText + ], { - if (options.prefixIdentifiers === true) { - onError(createCompilerError(46 /* X_PREFIX_ID_NOT_SUPPORTED */)); - } - else if (isModuleMode) { - onError(createCompilerError(47 /* X_MODULE_MODE_NOT_SUPPORTED */)); - } + on: transformOn$1, + bind: transformBind, + model: transformModel$1 } - const prefixIdentifiers = !true ; - if (options.cacheHandlers) { - onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */)); + ]; + } + function baseCompile(source, options = {}) { + const onError = options.onError || defaultOnError; + const isModuleMode = options.mode === "module"; + { + if (options.prefixIdentifiers === true) { + onError(createCompilerError(47)); + } else if (isModuleMode) { + onError(createCompilerError(48)); } - if (options.scopeId && !isModuleMode) { - onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */)); - } - const ast = isString(template) ? baseParse(template, options) : template; - const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); - transform(ast, extend({}, options, { - prefixIdentifiers, - nodeTransforms: [ - ...nodeTransforms, - ...(options.nodeTransforms || []) // user transforms - ], - directiveTransforms: extend({}, directiveTransforms, options.directiveTransforms || {} // user transforms - ) - })); - return generate(ast, extend({}, options, { - prefixIdentifiers - })); + } + const prefixIdentifiers = false; + if (options.cacheHandlers) { + onError(createCompilerError(49)); + } + if (options.scopeId && !isModuleMode) { + onError(createCompilerError(50)); + } + const resolvedOptions = extend({}, options, { + prefixIdentifiers + }); + const ast = isString(source) ? baseParse(source, resolvedOptions) : source; + const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(); + transform( + ast, + extend({}, resolvedOptions, { + nodeTransforms: [ + ...nodeTransforms, + ...options.nodeTransforms || [] + // user transforms + ], + directiveTransforms: extend( + {}, + directiveTransforms, + options.directiveTransforms || {} + // user transforms + ) + }) + ); + return generate(ast, resolvedOptions); } const noopDirectiveTransform = () => ({ props: [] }); @@ -15260,526 +15938,528 @@ var Vue = (function (exports) { const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` ); const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` ); const V_SHOW = Symbol(`vShow` ); - const TRANSITION$1 = Symbol(`Transition` ); + const TRANSITION = Symbol(`Transition` ); const TRANSITION_GROUP = Symbol(`TransitionGroup` ); registerRuntimeHelpers({ - [V_MODEL_RADIO]: `vModelRadio`, - [V_MODEL_CHECKBOX]: `vModelCheckbox`, - [V_MODEL_TEXT]: `vModelText`, - [V_MODEL_SELECT]: `vModelSelect`, - [V_MODEL_DYNAMIC]: `vModelDynamic`, - [V_ON_WITH_MODIFIERS]: `withModifiers`, - [V_ON_WITH_KEYS]: `withKeys`, - [V_SHOW]: `vShow`, - [TRANSITION$1]: `Transition`, - [TRANSITION_GROUP]: `TransitionGroup` + [V_MODEL_RADIO]: `vModelRadio`, + [V_MODEL_CHECKBOX]: `vModelCheckbox`, + [V_MODEL_TEXT]: `vModelText`, + [V_MODEL_SELECT]: `vModelSelect`, + [V_MODEL_DYNAMIC]: `vModelDynamic`, + [V_ON_WITH_MODIFIERS]: `withModifiers`, + [V_ON_WITH_KEYS]: `withKeys`, + [V_SHOW]: `vShow`, + [TRANSITION]: `Transition`, + [TRANSITION_GROUP]: `TransitionGroup` }); - /* eslint-disable no-restricted-globals */ let decoder; function decodeHtmlBrowser(raw, asAttr = false) { - if (!decoder) { - decoder = document.createElement('div'); - } - if (asAttr) { - decoder.innerHTML = `<div foo="${raw.replace(/"/g, '"')}">`; - return decoder.children[0].getAttribute('foo'); - } - else { - decoder.innerHTML = raw; - return decoder.textContent; - } + if (!decoder) { + decoder = document.createElement("div"); + } + if (asAttr) { + decoder.innerHTML = `<div foo="${raw.replace(/"/g, """)}">`; + return decoder.children[0].getAttribute("foo"); + } else { + decoder.innerHTML = raw; + return decoder.textContent; + } } - const isRawTextContainer = /*#__PURE__*/ makeMap('style,iframe,script,noscript', true); const parserOptions = { - isVoidTag, - isNativeTag: tag => isHTMLTag(tag) || isSVGTag(tag), - isPreTag: tag => tag === 'pre', - decodeEntities: decodeHtmlBrowser , - isBuiltInComponent: (tag) => { - if (isBuiltInType(tag, `Transition`)) { - return TRANSITION$1; - } - else if (isBuiltInType(tag, `TransitionGroup`)) { - return TRANSITION_GROUP; - } - }, - // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher - getNamespace(tag, parent) { - let ns = parent ? parent.ns : 0 /* HTML */; - if (parent && ns === 2 /* MATH_ML */) { - if (parent.tag === 'annotation-xml') { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ && - a.name === 'encoding' && - a.value != null && - (a.value.content === 'text/html' || - a.value.content === 'application/xhtml+xml'))) { - ns = 0 /* HTML */; - } - } - else if (/^m(?:[ions]|text)$/.test(parent.tag) && - tag !== 'mglyph' && - tag !== 'malignmark') { - ns = 0 /* HTML */; - } - } - else if (parent && ns === 1 /* SVG */) { - if (parent.tag === 'foreignObject' || - parent.tag === 'desc' || - parent.tag === 'title') { - ns = 0 /* HTML */; - } - } - if (ns === 0 /* HTML */) { - if (tag === 'svg') { - return 1 /* SVG */; - } - if (tag === 'math') { - return 2 /* MATH_ML */; - } - } - return ns; - }, - // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments - getTextMode({ tag, ns }) { - if (ns === 0 /* HTML */) { - if (tag === 'textarea' || tag === 'title') { - return 1 /* RCDATA */; - } - if (isRawTextContainer(tag)) { - return 2 /* RAWTEXT */; - } - } - return 0 /* DATA */; + parseMode: "html", + isVoidTag, + isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + isPreTag: (tag) => tag === "pre", + decodeEntities: decodeHtmlBrowser , + isBuiltInComponent: (tag) => { + if (tag === "Transition" || tag === "transition") { + return TRANSITION; + } else if (tag === "TransitionGroup" || tag === "transition-group") { + return TRANSITION_GROUP; } + }, + // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher + getNamespace(tag, parent, rootNamespace) { + let ns = parent ? parent.ns : rootNamespace; + if (parent && ns === 2) { + if (parent.tag === "annotation-xml") { + if (tag === "svg") { + return 1; + } + if (parent.props.some( + (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml") + )) { + ns = 0; + } + } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") { + ns = 0; + } + } else if (parent && ns === 1) { + if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") { + ns = 0; + } + } + if (ns === 0) { + if (tag === "svg") { + return 1; + } + if (tag === "math") { + return 2; + } + } + return ns; + } }; - // Parse inline CSS strings for static style attributes into an object. - // This is a NodeTransform since it works on the static `style` attribute and - // converts it into a dynamic equivalent: - // style="color: red" -> :style='{ "color": "red" }' - // It is then processed by `transformElement` and included in the generated - // props. - const transformStyle = node => { - if (node.type === 1 /* ELEMENT */) { - node.props.forEach((p, i) => { - if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) { - // replace p with an expression node - node.props[i] = { - type: 7 /* DIRECTIVE */, - name: `bind`, - arg: createSimpleExpression(`style`, true, p.loc), - exp: parseInlineCSS(p.value.content, p.loc), - modifiers: [], - loc: p.loc - }; - } - }); - } + const transformStyle = (node) => { + if (node.type === 1) { + node.props.forEach((p, i) => { + if (p.type === 6 && p.name === "style" && p.value) { + node.props[i] = { + type: 7, + name: `bind`, + arg: createSimpleExpression(`style`, true, p.loc), + exp: parseInlineCSS(p.value.content, p.loc), + modifiers: [], + loc: p.loc + }; + } + }); + } }; const parseInlineCSS = (cssText, loc) => { - const normalized = parseStringStyle(cssText); - return createSimpleExpression(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */); + const normalized = parseStringStyle(cssText); + return createSimpleExpression( + JSON.stringify(normalized), + false, + loc, + 3 + ); }; function createDOMCompilerError(code, loc) { - return createCompilerError(code, loc, DOMErrorMessages ); + return createCompilerError( + code, + loc, + DOMErrorMessages + ); } const DOMErrorMessages = { - [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`, - [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`, - [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`, - [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`, - [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`, - [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`, - [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, - [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, - [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`, - [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`, - [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` + [53]: `v-html is missing expression.`, + [54]: `v-html will override element children.`, + [55]: `v-text is missing expression.`, + [56]: `v-text will override element children.`, + [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`, + [58]: `v-model argument is not supported on plain elements.`, + [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`, + [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`, + [61]: `v-show is missing expression.`, + [62]: `<Transition> expects exactly one child element or component.`, + [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.` }; const transformVHtml = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`innerHTML`, true, loc), exp || createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(53, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(54, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`innerHTML`, true, loc), + exp || createSimpleExpression("", true) + ) + ] + }; }; const transformVText = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc)); - } - if (node.children.length) { - context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc)); - node.children.length = 0; - } - return { - props: [ - createObjectProperty(createSimpleExpression(`textContent`, true), exp - ? getConstantType(exp, context) > 0 - ? exp - : createCallExpression(context.helperString(TO_DISPLAY_STRING), [exp], loc) - : createSimpleExpression('', true)) - ] - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(55, loc) + ); + } + if (node.children.length) { + context.onError( + createDOMCompilerError(56, loc) + ); + node.children.length = 0; + } + return { + props: [ + createObjectProperty( + createSimpleExpression(`textContent`, true), + exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression( + context.helperString(TO_DISPLAY_STRING), + [exp], + loc + ) : createSimpleExpression("", true) + ) + ] + }; }; - const transformModel$1 = (dir, node, context) => { - const baseResult = transformModel(dir, node, context); - // base transform has errors OR component v-model (only need props) - if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) { - return baseResult; - } - if (dir.arg) { - context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc)); - } - function checkDuplicatedValue() { - const value = findProp(node, 'value'); - if (value) { - context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc)); - } - } - const { tag } = node; - const isCustomElement = context.isCustomElement(tag); - if (tag === 'input' || - tag === 'textarea' || - tag === 'select' || - isCustomElement) { - let directiveToUse = V_MODEL_TEXT; - let isInvalidType = false; - if (tag === 'input' || isCustomElement) { - const type = findProp(node, `type`); - if (type) { - if (type.type === 7 /* DIRECTIVE */) { - // :type="foo" - directiveToUse = V_MODEL_DYNAMIC; - } - else if (type.value) { - switch (type.value.content) { - case 'radio': - directiveToUse = V_MODEL_RADIO; - break; - case 'checkbox': - directiveToUse = V_MODEL_CHECKBOX; - break; - case 'file': - isInvalidType = true; - context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc)); - break; - default: - // text type - checkDuplicatedValue(); - break; - } - } - } - else if (hasDynamicKeyVBind(node)) { - // element has bindings with dynamic keys, which can possibly contain - // "type". - directiveToUse = V_MODEL_DYNAMIC; - } - else { - // text type - checkDuplicatedValue(); - } - } - else if (tag === 'select') { - directiveToUse = V_MODEL_SELECT; - } - else { - // textarea - checkDuplicatedValue(); - } - // inject runtime directive - // by returning the helper symbol via needRuntime - // the import will replaced a resolveDirective call. - if (!isInvalidType) { - baseResult.needRuntime = context.helper(directiveToUse); - } - } - else { - context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc)); - } - // native vmodel doesn't need the `modelValue` props since they are also - // passed to the runtime as `binding.value`. removing it reduces code size. - baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ && - p.key.content === 'modelValue')); + const transformModel = (dir, node, context) => { + const baseResult = transformModel$1(dir, node, context); + if (!baseResult.props.length || node.tagType === 1) { return baseResult; + } + if (dir.arg) { + context.onError( + createDOMCompilerError( + 58, + dir.arg.loc + ) + ); + } + function checkDuplicatedValue() { + const value = findDir(node, "bind"); + if (value && isStaticArgOf(value.arg, "value")) { + context.onError( + createDOMCompilerError( + 60, + value.loc + ) + ); + } + } + const { tag } = node; + const isCustomElement = context.isCustomElement(tag); + if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) { + let directiveToUse = V_MODEL_TEXT; + let isInvalidType = false; + if (tag === "input" || isCustomElement) { + const type = findProp(node, `type`); + if (type) { + if (type.type === 7) { + directiveToUse = V_MODEL_DYNAMIC; + } else if (type.value) { + switch (type.value.content) { + case "radio": + directiveToUse = V_MODEL_RADIO; + break; + case "checkbox": + directiveToUse = V_MODEL_CHECKBOX; + break; + case "file": + isInvalidType = true; + context.onError( + createDOMCompilerError( + 59, + dir.loc + ) + ); + break; + default: + checkDuplicatedValue(); + break; + } + } + } else if (hasDynamicKeyVBind(node)) { + directiveToUse = V_MODEL_DYNAMIC; + } else { + checkDuplicatedValue(); + } + } else if (tag === "select") { + directiveToUse = V_MODEL_SELECT; + } else { + checkDuplicatedValue(); + } + if (!isInvalidType) { + baseResult.needRuntime = context.helper(directiveToUse); + } + } else { + context.onError( + createDOMCompilerError( + 57, + dir.loc + ) + ); + } + baseResult.props = baseResult.props.filter( + (p) => !(p.key.type === 4 && p.key.content === "modelValue") + ); + return baseResult; }; - const isEventOptionModifier = /*#__PURE__*/ makeMap(`passive,once,capture`); - const isNonKeyModifier = /*#__PURE__*/ makeMap( - // event propagation management -`stop,prevent,self,` + - // system modifiers + exact - `ctrl,shift,alt,meta,exact,` + - // mouse - `middle`); - // left & right could be mouse or key modifiers based on event type - const maybeKeyModifier = /*#__PURE__*/ makeMap('left,right'); - const isKeyboardEvent = /*#__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`, true); + const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`); + const isNonKeyModifier = /* @__PURE__ */ makeMap( + // event propagation management + `stop,prevent,self,ctrl,shift,alt,meta,exact,middle` + ); + const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right"); + const isKeyboardEvent = /* @__PURE__ */ makeMap( + `onkeyup,onkeydown,onkeypress`, + true + ); const resolveModifiers = (key, modifiers, context, loc) => { - const keyModifiers = []; - const nonKeyModifiers = []; - const eventOptionModifiers = []; - for (let i = 0; i < modifiers.length; i++) { - const modifier = modifiers[i]; - if (isEventOptionModifier(modifier)) { - // eventOptionModifiers: modifiers for addEventListener() options, - // e.g. .passive & .capture - eventOptionModifiers.push(modifier); + const keyModifiers = []; + const nonKeyModifiers = []; + const eventOptionModifiers = []; + for (let i = 0; i < modifiers.length; i++) { + const modifier = modifiers[i]; + if (isEventOptionModifier(modifier)) { + eventOptionModifiers.push(modifier); + } else { + if (maybeKeyModifier(modifier)) { + if (isStaticExp(key)) { + if (isKeyboardEvent(key.content)) { + keyModifiers.push(modifier); + } else { + nonKeyModifiers.push(modifier); + } + } else { + keyModifiers.push(modifier); + nonKeyModifiers.push(modifier); } - else { - // runtimeModifiers: modifiers that needs runtime guards - if (maybeKeyModifier(modifier)) { - if (isStaticExp(key)) { - if (isKeyboardEvent(key.content)) { - keyModifiers.push(modifier); - } - else { - nonKeyModifiers.push(modifier); - } - } - else { - keyModifiers.push(modifier); - nonKeyModifiers.push(modifier); - } - } - else { - if (isNonKeyModifier(modifier)) { - nonKeyModifiers.push(modifier); - } - else { - keyModifiers.push(modifier); - } - } + } else { + if (isNonKeyModifier(modifier)) { + nonKeyModifiers.push(modifier); + } else { + keyModifiers.push(modifier); } + } } - return { - keyModifiers, - nonKeyModifiers, - eventOptionModifiers - }; + } + return { + keyModifiers, + nonKeyModifiers, + eventOptionModifiers + }; }; const transformClick = (key, event) => { - const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === 'onclick'; - return isStaticClick - ? createSimpleExpression(event, true) - : key.type !== 4 /* SIMPLE_EXPRESSION */ - ? createCompoundExpression([ - `(`, - key, - `) === "onClick" ? "${event}" : (`, - key, - `)` - ]) - : key; + const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick"; + return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([ + `(`, + key, + `) === "onClick" ? "${event}" : (`, + key, + `)` + ]) : key; }; - const transformOn$1 = (dir, node, context) => { - return transformOn(dir, node, context, baseResult => { - const { modifiers } = dir; - if (!modifiers.length) - return baseResult; - let { key, value: handlerExp } = baseResult.props[0]; - const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); - // normalize click.right and click.middle since they don't actually fire - if (nonKeyModifiers.includes('right')) { - key = transformClick(key, `onContextmenu`); - } - if (nonKeyModifiers.includes('middle')) { - key = transformClick(key, `onMouseup`); - } - if (nonKeyModifiers.length) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ - handlerExp, - JSON.stringify(nonKeyModifiers) - ]); - } - if (keyModifiers.length && - // if event name is dynamic, always wrap with keys guard - (!isStaticExp(key) || isKeyboardEvent(key.content))) { - handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ - handlerExp, - JSON.stringify(keyModifiers) - ]); - } - if (eventOptionModifiers.length) { - const modifierPostfix = eventOptionModifiers.map(capitalize).join(''); - key = isStaticExp(key) - ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) - : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); - } - return { - props: [createObjectProperty(key, handlerExp)] - }; - }); + const transformOn = (dir, node, context) => { + return transformOn$1(dir, node, context, (baseResult) => { + const { modifiers } = dir; + if (!modifiers.length) + return baseResult; + let { key, value: handlerExp } = baseResult.props[0]; + const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc); + if (nonKeyModifiers.includes("right")) { + key = transformClick(key, `onContextmenu`); + } + if (nonKeyModifiers.includes("middle")) { + key = transformClick(key, `onMouseup`); + } + if (nonKeyModifiers.length) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [ + handlerExp, + JSON.stringify(nonKeyModifiers) + ]); + } + if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard + (!isStaticExp(key) || isKeyboardEvent(key.content))) { + handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [ + handlerExp, + JSON.stringify(keyModifiers) + ]); + } + if (eventOptionModifiers.length) { + const modifierPostfix = eventOptionModifiers.map(capitalize).join(""); + key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]); + } + return { + props: [createObjectProperty(key, handlerExp)] + }; + }); }; const transformShow = (dir, node, context) => { - const { exp, loc } = dir; - if (!exp) { - context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc)); - } - return { - props: [], - needRuntime: context.helper(V_SHOW) - }; + const { exp, loc } = dir; + if (!exp) { + context.onError( + createDOMCompilerError(61, loc) + ); + } + return { + props: [], + needRuntime: context.helper(V_SHOW) + }; }; const transformTransition = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 1 /* COMPONENT */) { - const component = context.isBuiltInComponent(node.tag); - if (component === TRANSITION$1) { - return () => { - if (!node.children.length) { - return; - } - // warn multiple transition children - if (hasMultipleChildren(node)) { - context.onError(createDOMCompilerError(59 /* X_TRANSITION_INVALID_CHILDREN */, { - start: node.children[0].loc.start, - end: node.children[node.children.length - 1].loc.end, - source: '' - })); - } - // check if it's s single child w/ v-show - // if yes, inject "persisted: true" to the transition props - const child = node.children[0]; - if (child.type === 1 /* ELEMENT */) { - for (const p of child.props) { - if (p.type === 7 /* DIRECTIVE */ && p.name === 'show') { - node.props.push({ - type: 6 /* ATTRIBUTE */, - name: 'persisted', - value: undefined, - loc: node.loc - }); - } - } - } - }; + if (node.type === 1 && node.tagType === 1) { + const component = context.isBuiltInComponent(node.tag); + if (component === TRANSITION) { + return () => { + if (!node.children.length) { + return; } + if (hasMultipleChildren(node)) { + context.onError( + createDOMCompilerError( + 62, + { + start: node.children[0].loc.start, + end: node.children[node.children.length - 1].loc.end, + source: "" + } + ) + ); + } + const child = node.children[0]; + if (child.type === 1) { + for (const p of child.props) { + if (p.type === 7 && p.name === "show") { + node.props.push({ + type: 6, + name: "persisted", + nameLoc: node.loc, + value: void 0, + loc: node.loc + }); + } + } + } + }; } + } }; function hasMultipleChildren(node) { - // #1352 filter out potential comment nodes. - const children = (node.children = node.children.filter(c => c.type !== 3 /* COMMENT */ && - !(c.type === 2 /* TEXT */ && !c.content.trim()))); - const child = children[0]; - return (children.length !== 1 || - child.type === 11 /* FOR */ || - (child.type === 9 /* IF */ && child.branches.some(hasMultipleChildren))); + const children = node.children = node.children.filter( + (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()) + ); + const child = children[0]; + return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren); } const ignoreSideEffectTags = (node, context) => { - if (node.type === 1 /* ELEMENT */ && - node.tagType === 0 /* ELEMENT */ && - (node.tag === 'script' || node.tag === 'style')) { - context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc)); - context.removeNode(); - } + if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) { + context.onError( + createDOMCompilerError( + 63, + node.loc + ) + ); + context.removeNode(); + } }; const DOMNodeTransforms = [ - transformStyle, - ...([transformTransition] ) + transformStyle, + ...[transformTransition] ]; const DOMDirectiveTransforms = { - cloak: noopDirectiveTransform, - html: transformVHtml, - text: transformVText, - model: transformModel$1, - on: transformOn$1, - show: transformShow + cloak: noopDirectiveTransform, + html: transformVHtml, + text: transformVText, + model: transformModel, + // override compiler-core + on: transformOn, + // override compiler-core + show: transformShow }; - function compile$1(template, options = {}) { - return baseCompile(template, extend({}, parserOptions, options, { - nodeTransforms: [ - // ignore <script> and <tag> - // this is not put inside DOMNodeTransforms because that list is used - // by compiler-ssr to generate vnode fallback branches - ignoreSideEffectTags, - ...DOMNodeTransforms, - ...(options.nodeTransforms || []) - ], - directiveTransforms: extend({}, DOMDirectiveTransforms, options.directiveTransforms || {}), - transformHoist: null - })); + function compile(src, options = {}) { + return baseCompile( + src, + extend({}, parserOptions, options, { + nodeTransforms: [ + // ignore <script> and <tag> + // this is not put inside DOMNodeTransforms because that list is used + // by compiler-ssr to generate vnode fallback branches + ignoreSideEffectTags, + ...DOMNodeTransforms, + ...options.nodeTransforms || [] + ], + directiveTransforms: extend( + {}, + DOMDirectiveTransforms, + options.directiveTransforms || {} + ), + transformHoist: null + }) + ); } - // This entry is the "full-build" that includes both the runtime { - initDev(); + initDev(); + } + const compileCache = /* @__PURE__ */ new WeakMap(); + function getCache(options) { + let c = compileCache.get(options != null ? options : EMPTY_OBJ); + if (!c) { + c = /* @__PURE__ */ Object.create(null); + compileCache.set(options != null ? options : EMPTY_OBJ, c); + } + return c; } - const compileCache = Object.create(null); function compileToFunction(template, options) { - if (!isString(template)) { - if (template.nodeType) { - template = template.innerHTML; - } - else { - warn$1(`invalid template option: `, template); - return NOOP; - } + if (!isString(template)) { + if (template.nodeType) { + template = template.innerHTML; + } else { + warn(`invalid template option: `, template); + return NOOP; } - const key = template; - const cached = compileCache[key]; - if (cached) { - return cached; + } + const key = template; + const cache = getCache(options); + const cached = cache[key]; + if (cached) { + return cached; + } + if (template[0] === "#") { + const el = document.querySelector(template); + if (!el) { + warn(`Template element not found or is empty: ${template}`); } - if (template[0] === '#') { - const el = document.querySelector(template); - if (!el) { - warn$1(`Template element not found or is empty: ${template}`); - } - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's rendered - // by the server, the template should not contain any user data. - template = el ? el.innerHTML : ``; - } - const { code } = compile$1(template, extend({ - hoistStatic: true, - onError: onError , - onWarn: e => onError(e, true) - }, options)); - function onError(err, asWarning = false) { - const message = asWarning - ? err.message - : `Template compilation error: ${err.message}`; - const codeFrame = err.loc && - generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset); - warn$1(codeFrame ? `${message}\n${codeFrame}` : message); - } - // The wildcard import results in a huge object with every export - // with keys that cannot be mangled, and can be quite heavy size-wise. - // In the global build we know `Vue` is available globally so we can avoid - // the wildcard object. - const render = (new Function(code)() ); - render._rc = true; - return (compileCache[key] = render); + template = el ? el.innerHTML : ``; + } + const opts = extend( + { + hoistStatic: true, + onError: onError , + onWarn: (e) => onError(e, true) + }, + options + ); + if (!opts.isCustomElement && typeof customElements !== "undefined") { + opts.isCustomElement = (tag) => !!customElements.get(tag); + } + const { code } = compile(template, opts); + function onError(err, asWarning = false) { + const message = asWarning ? err.message : `Template compilation error: ${err.message}`; + const codeFrame = err.loc && generateCodeFrame( + template, + err.loc.start.offset, + err.loc.end.offset + ); + warn(codeFrame ? `${message} +${codeFrame}` : message); + } + const render = new Function(code)() ; + render._rc = true; + return cache[key] = render; } registerRuntimeCompiler(compileToFunction); exports.BaseTransition = BaseTransition; + exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; exports.Comment = Comment; + exports.DeprecationTypes = DeprecationTypes; exports.EffectScope = EffectScope; + exports.ErrorCodes = ErrorCodes; + exports.ErrorTypeStrings = ErrorTypeStrings; exports.Fragment = Fragment; exports.KeepAlive = KeepAlive; exports.ReactiveEffect = ReactiveEffect; @@ -15787,9 +16467,12 @@ var Vue = (function (exports) { exports.Suspense = Suspense; exports.Teleport = Teleport; exports.Text = Text; + exports.TrackOpTypes = TrackOpTypes; exports.Transition = Transition; exports.TransitionGroup = TransitionGroup; + exports.TriggerOpTypes = TriggerOpTypes; exports.VueElement = VueElement; + exports.assertNumber = assertNumber; exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; exports.callWithErrorHandling = callWithErrorHandling; exports.camelize = camelize; @@ -15797,7 +16480,7 @@ var Vue = (function (exports) { exports.cloneVNode = cloneVNode; exports.compatUtils = compatUtils; exports.compile = compileToFunction; - exports.computed = computed$1; + exports.computed = computed; exports.createApp = createApp; exports.createBlock = createBlock; exports.createCommentVNode = createCommentVNode; @@ -15817,8 +16500,12 @@ var Vue = (function (exports) { exports.defineCustomElement = defineCustomElement; exports.defineEmits = defineEmits; exports.defineExpose = defineExpose; + exports.defineModel = defineModel; + exports.defineOptions = defineOptions; exports.defineProps = defineProps; exports.defineSSRCustomElement = defineSSRCustomElement; + exports.defineSlots = defineSlots; + exports.devtools = devtools; exports.effect = effect; exports.effectScope = effectScope; exports.getCurrentInstance = getCurrentInstance; @@ -15827,6 +16514,7 @@ var Vue = (function (exports) { exports.guardReactiveProps = guardReactiveProps; exports.h = h; exports.handleError = handleError; + exports.hasInjectionContext = hasInjectionContext; exports.hydrate = hydrate; exports.initCustomFormatter = initCustomFormatter; exports.initDirectivesForSSR = initDirectivesForSSR; @@ -15841,6 +16529,7 @@ var Vue = (function (exports) { exports.isVNode = isVNode; exports.markRaw = markRaw; exports.mergeDefaults = mergeDefaults; + exports.mergeModels = mergeModels; exports.mergeProps = mergeProps; exports.nextTick = nextTick; exports.normalizeClass = normalizeClass; @@ -15892,12 +16581,14 @@ var Vue = (function (exports) { exports.toRaw = toRaw; exports.toRef = toRef; exports.toRefs = toRefs; + exports.toValue = toValue; exports.transformVNodeArgs = transformVNodeArgs; exports.triggerRef = triggerRef; exports.unref = unref; exports.useAttrs = useAttrs; exports.useCssModule = useCssModule; exports.useCssVars = useCssVars; + exports.useModel = useModel; exports.useSSRContext = useSSRContext; exports.useSlots = useSlots; exports.useTransitionState = useTransitionState; @@ -15908,7 +16599,7 @@ var Vue = (function (exports) { exports.vModelText = vModelText; exports.vShow = vShow; exports.version = version; - exports.warn = warn$1; + exports.warn = warn; exports.watch = watch; exports.watchEffect = watchEffect; exports.watchPostEffect = watchPostEffect; @@ -15922,8 +16613,6 @@ var Vue = (function (exports) { exports.withModifiers = withModifiers; exports.withScopeId = withScopeId; - Object.defineProperty(exports, '__esModule', { value: true }); - return exports; -}({})); +})({}); diff --git a/node_modules/vue/dist/vue.global.prod.js b/node_modules/vue/dist/vue.global.prod.js index a30e6181..3e91f428 100644 --- a/node_modules/vue/dist/vue.global.prod.js +++ b/node_modules/vue/dist/vue.global.prod.js @@ -1 +1,11 @@ -var Vue=function(e){"use strict";function t(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),o=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function r(e){return!!e||""===e}function s(e){if(N(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=R(o)?c(o):s(o);if(r)for(const e in r)t[e]=r[e]}return t}return R(e)||P(e)?e:void 0}const i=/;(?![^(]*\))/g,l=/:(.+)/;function c(e){const t={};return e.split(i).forEach((e=>{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function a(e){let t="";if(R(e))t=e;else if(N(e))for(let n=0;n<e.length;n++){const o=a(e[n]);o&&(t+=o+" ")}else if(P(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const u=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),p=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),f=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr");function d(e,t){if(e===t)return!0;let n=O(e),o=O(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=A(e),o=A(t),n||o)return e===t;if(n=N(e),o=N(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=d(e[o],t[o]);return n}(e,t);if(n=P(e),o=P(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!d(e[n],t[n]))return!1}}return String(e)===String(t)}function h(e,t){return e.findIndex((e=>d(e,t)))}const m=(e,t)=>t&&t.__v_isRef?m(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:$(t)?{[`Set(${t.size})`]:[...t.values()]}:!P(t)||N(t)||B(t)?t:String(t),g={},v=[],y=()=>{},b=()=>!1,_=/^on[^a-z]/,S=e=>_.test(e),x=e=>e.startsWith("onUpdate:"),C=Object.assign,w=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},k=Object.prototype.hasOwnProperty,T=(e,t)=>k.call(e,t),N=Array.isArray,E=e=>"[object Map]"===I(e),$=e=>"[object Set]"===I(e),O=e=>"[object Date]"===I(e),F=e=>"function"==typeof e,R=e=>"string"==typeof e,A=e=>"symbol"==typeof e,P=e=>null!==e&&"object"==typeof e,M=e=>P(e)&&F(e.then)&&F(e.catch),V=Object.prototype.toString,I=e=>V.call(e),B=e=>"[object Object]"===I(e),L=e=>R(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,j=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),D=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,W=D((e=>e.replace(H,((e,t)=>t?t.toUpperCase():"")))),z=/\B([A-Z])/g,K=D((e=>e.replace(z,"-$1").toLowerCase())),G=D((e=>e.charAt(0).toUpperCase()+e.slice(1))),q=D((e=>e?`on${G(e)}`:"")),J=(e,t)=>!Object.is(e,t),Y=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Z=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Q=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let X;let ee;class te{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&ee&&(this.parent=ee,this.index=(ee.scopes||(ee.scopes=[])).push(this)-1)}run(e){if(this.active){const t=ee;try{return ee=this,e()}finally{ee=t}}}on(){ee=this}off(){ee=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function ne(e,t=ee){t&&t.active&&t.effects.push(e)}const oe=e=>{const t=new Set(e);return t.w=0,t.n=0,t},re=e=>(e.w&ce)>0,se=e=>(e.n&ce)>0,ie=new WeakMap;let le=0,ce=1;let ae;const ue=Symbol(""),pe=Symbol("");class fe{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,ne(this,n)}run(){if(!this.active)return this.fn();let e=ae,t=he;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=ae,ae=this,he=!0,ce=1<<++le,le<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=ce})(this):de(this),this.fn()}finally{le<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const r=t[o];re(r)&&!se(r)?r.delete(e):t[n++]=r,r.w&=~ce,r.n&=~ce}t.length=n}})(this),ce=1<<--le,ae=this.parent,he=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){ae===this?this.deferStop=!0:this.active&&(de(this),this.onStop&&this.onStop(),this.active=!1)}}function de(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let he=!0;const me=[];function ge(){me.push(he),he=!1}function ve(){const e=me.pop();he=void 0===e||e}function ye(e,t,n){if(he&&ae){let t=ie.get(e);t||ie.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=oe()),be(o)}}function be(e,t){let n=!1;le<=30?se(e)||(e.n|=ce,n=!re(e)):n=!e.has(ae),n&&(e.add(ae),ae.deps.push(e))}function _e(e,t,n,o,r,s){const i=ie.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&N(e))i.forEach(((e,t)=>{("length"===t||t>=o)&&l.push(e)}));else switch(void 0!==n&&l.push(i.get(n)),t){case"add":N(e)?L(n)&&l.push(i.get("length")):(l.push(i.get(ue)),E(e)&&l.push(i.get(pe)));break;case"delete":N(e)||(l.push(i.get(ue)),E(e)&&l.push(i.get(pe)));break;case"set":E(e)&&l.push(i.get(ue))}if(1===l.length)l[0]&&Se(l[0]);else{const e=[];for(const t of l)t&&e.push(...t);Se(oe(e))}}function Se(e,t){const n=N(e)?e:[...e];for(const o of n)o.computed&&xe(o);for(const o of n)o.computed||xe(o)}function xe(e,t){(e!==ae||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const Ce=t("__proto__,__v_isRef,__isVue"),we=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(A)),ke=Fe(),Te=Fe(!1,!0),Ne=Fe(!0),Ee=Fe(!0,!0),$e=Oe();function Oe(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=yt(this);for(let t=0,r=this.length;t<r;t++)ye(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(yt)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){ge();const n=yt(this)[t].apply(this,e);return ve(),n}})),e}function Fe(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?ct:lt:t?it:st).get(n))return n;const s=N(n);if(!e&&s&&T($e,o))return Reflect.get($e,o,r);const i=Reflect.get(n,o,r);return(A(o)?we.has(o):Ce(o))?i:(e||ye(n,0,o),t?i:wt(i)?s&&L(o)?i:i.value:P(i)?e?ft(i):ut(i):i)}}function Re(e=!1){return function(t,n,o,r){let s=t[n];if(mt(s)&&wt(s)&&!wt(o))return!1;if(!e&&!mt(o)&&(gt(o)||(o=yt(o),s=yt(s)),!N(t)&&wt(s)&&!wt(o)))return s.value=o,!0;const i=N(t)&&L(n)?Number(n)<t.length:T(t,n),l=Reflect.set(t,n,o,r);return t===yt(r)&&(i?J(o,s)&&_e(t,"set",n,o):_e(t,"add",n,o)),l}}const Ae={get:ke,set:Re(),deleteProperty:function(e,t){const n=T(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&_e(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return A(t)&&we.has(t)||ye(e,0,t),n},ownKeys:function(e){return ye(e,0,N(e)?"length":ue),Reflect.ownKeys(e)}},Pe={get:Ne,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Me=C({},Ae,{get:Te,set:Re(!0)}),Ve=C({},Pe,{get:Ee}),Ie=e=>e,Be=e=>Reflect.getPrototypeOf(e);function Le(e,t,n=!1,o=!1){const r=yt(e=e.__v_raw),s=yt(t);n||(t!==s&&ye(r,0,t),ye(r,0,s));const{has:i}=Be(r),l=o?Ie:n?St:_t;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function je(e,t=!1){const n=this.__v_raw,o=yt(n),r=yt(e);return t||(e!==r&&ye(o,0,e),ye(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function Ue(e,t=!1){return e=e.__v_raw,!t&&ye(yt(e),0,ue),Reflect.get(e,"size",e)}function De(e){e=yt(e);const t=yt(this);return Be(t).has.call(t,e)||(t.add(e),_e(t,"add",e,e)),this}function He(e,t){t=yt(t);const n=yt(this),{has:o,get:r}=Be(n);let s=o.call(n,e);s||(e=yt(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?J(t,i)&&_e(n,"set",e,t):_e(n,"add",e,t),this}function We(e){const t=yt(this),{has:n,get:o}=Be(t);let r=n.call(t,e);r||(e=yt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&_e(t,"delete",e,void 0),s}function ze(){const e=yt(this),t=0!==e.size,n=e.clear();return t&&_e(e,"clear",void 0,void 0),n}function Ke(e,t){return function(n,o){const r=this,s=r.__v_raw,i=yt(s),l=t?Ie:e?St:_t;return!e&&ye(i,0,ue),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function Ge(e,t,n){return function(...o){const r=this.__v_raw,s=yt(r),i=E(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?Ie:t?St:_t;return!t&&ye(s,0,c?pe:ue),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function qe(e){return function(...t){return"delete"!==e&&this}}function Je(){const e={get(e){return Le(this,e)},get size(){return Ue(this)},has:je,add:De,set:He,delete:We,clear:ze,forEach:Ke(!1,!1)},t={get(e){return Le(this,e,!1,!0)},get size(){return Ue(this)},has:je,add:De,set:He,delete:We,clear:ze,forEach:Ke(!1,!0)},n={get(e){return Le(this,e,!0)},get size(){return Ue(this,!0)},has(e){return je.call(this,e,!0)},add:qe("add"),set:qe("set"),delete:qe("delete"),clear:qe("clear"),forEach:Ke(!0,!1)},o={get(e){return Le(this,e,!0,!0)},get size(){return Ue(this,!0)},has(e){return je.call(this,e,!0)},add:qe("add"),set:qe("set"),delete:qe("delete"),clear:qe("clear"),forEach:Ke(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Ge(r,!1,!1),n[r]=Ge(r,!0,!1),t[r]=Ge(r,!1,!0),o[r]=Ge(r,!0,!0)})),[e,n,t,o]}const[Ye,Ze,Qe,Xe]=Je();function et(e,t){const n=t?e?Xe:Qe:e?Ze:Ye;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(T(n,o)&&o in t?n:t,o,r)}const tt={get:et(!1,!1)},nt={get:et(!1,!0)},ot={get:et(!0,!1)},rt={get:et(!0,!0)},st=new WeakMap,it=new WeakMap,lt=new WeakMap,ct=new WeakMap;function at(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>I(e).slice(8,-1))(e))}function ut(e){return mt(e)?e:dt(e,!1,Ae,tt,st)}function pt(e){return dt(e,!1,Me,nt,it)}function ft(e){return dt(e,!0,Pe,ot,lt)}function dt(e,t,n,o,r){if(!P(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=at(e);if(0===i)return e;const l=new Proxy(e,2===i?o:n);return r.set(e,l),l}function ht(e){return mt(e)?ht(e.__v_raw):!(!e||!e.__v_isReactive)}function mt(e){return!(!e||!e.__v_isReadonly)}function gt(e){return!(!e||!e.__v_isShallow)}function vt(e){return ht(e)||mt(e)}function yt(e){const t=e&&e.__v_raw;return t?yt(t):e}function bt(e){return Z(e,"__v_skip",!0),e}const _t=e=>P(e)?ut(e):e,St=e=>P(e)?ft(e):e;function xt(e){he&&ae&&be((e=yt(e)).dep||(e.dep=oe()))}function Ct(e,t){(e=yt(e)).dep&&Se(e.dep)}function wt(e){return!(!e||!0!==e.__v_isRef)}function kt(e){return Tt(e,!1)}function Tt(e,t){return wt(e)?e:new Nt(e,t)}class Nt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:yt(e),this._value=t?e:_t(e)}get value(){return xt(this),this._value}set value(e){e=this.__v_isShallow?e:yt(e),J(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:_t(e),Ct(this))}}function Et(e){return wt(e)?e.value:e}const $t={get:(e,t,n)=>Et(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return wt(r)&&!wt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Ot(e){return ht(e)?e:new Proxy(e,$t)}class Ft{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>xt(this)),(()=>Ct(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}class Rt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function At(e,t,n){const o=e[t];return wt(o)?o:new Rt(e,t,n)}class Pt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new fe(e,(()=>{this._dirty||(this._dirty=!0,Ct(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=yt(this);return xt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const Mt=[];function Vt(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...It(n,e[n]))})),n.length>3&&t.push(" ..."),t}function It(e,t,n){return R(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:wt(t)?(t=It(e,yt(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):F(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=yt(t),n?t:[`${e}=`,t])}function Bt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){jt(s,t,n)}return r}function Lt(e,t,n,o){if(F(e)){const r=Bt(e,t,n,o);return r&&M(r)&&r.catch((e=>{jt(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Lt(e[s],t,n,o));return r}function jt(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const i=t.appContext.config.errorHandler;if(i)return void Bt(i,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let Ut=!1,Dt=!1;const Ht=[];let Wt=0;const zt=[];let Kt=null,Gt=0;const qt=[];let Jt=null,Yt=0;const Zt=Promise.resolve();let Qt=null,Xt=null;function en(e){const t=Qt||Zt;return e?t.then(this?e.bind(this):e):t}function tn(e){Ht.length&&Ht.includes(e,Ut&&e.allowRecurse?Wt+1:Wt)||e===Xt||(null==e.id?Ht.push(e):Ht.splice(function(e){let t=Wt+1,n=Ht.length;for(;t<n;){const o=t+n>>>1;cn(Ht[o])<e?t=o+1:n=o}return t}(e.id),0,e),nn())}function nn(){Ut||Dt||(Dt=!0,Qt=Zt.then(an))}function on(e,t,n,o){N(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),nn()}function rn(e){on(e,Jt,qt,Yt)}function sn(e,t=null){if(zt.length){for(Xt=t,Kt=[...new Set(zt)],zt.length=0,Gt=0;Gt<Kt.length;Gt++)Kt[Gt]();Kt=null,Gt=0,Xt=null,sn(e,t)}}function ln(e){if(sn(),qt.length){const e=[...new Set(qt)];if(qt.length=0,Jt)return void Jt.push(...e);for(Jt=e,Jt.sort(((e,t)=>cn(e)-cn(t))),Yt=0;Yt<Jt.length;Yt++)Jt[Yt]();Jt=null,Yt=0}}const cn=e=>null==e.id?1/0:e.id;function an(e){Dt=!1,Ut=!0,sn(e),Ht.sort(((e,t)=>cn(e)-cn(t)));try{for(Wt=0;Wt<Ht.length;Wt++){const e=Ht[Wt];e&&!1!==e.active&&Bt(e,null,14)}}finally{Wt=0,Ht.length=0,ln(),Ut=!1,Qt=null,(Ht.length||zt.length||qt.length)&&an(e)}}let un=[];function pn(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||g;let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const e=`${"modelValue"===i?"model":i}Modifiers`,{number:t,trim:s}=o[e]||g;s&&(r=n.map((e=>e.trim()))),t&&(r=n.map(Q))}let l,c=o[l=q(t)]||o[l=q(W(t))];!c&&s&&(c=o[l=q(K(t))]),c&&Lt(c,e,6,r);const a=o[l+"Once"];if(a){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,Lt(a,e,6,r)}}function fn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!F(e)){const o=e=>{const n=fn(e,t,!0);n&&(l=!0,C(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(N(s)?s.forEach((e=>i[e]=null)):C(i,s),o.set(e,i),i):(o.set(e,null),null)}function dn(e,t){return!(!e||!S(t))&&(t=t.slice(2).replace(/Once$/,""),T(e,t[0].toLowerCase()+t.slice(1))||T(e,K(t))||T(e,t))}let hn=null,mn=null;function gn(e){const t=hn;return hn=e,mn=e&&e.type.__scopeId||null,t}function vn(e,t=hn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Tr(-1);const r=gn(t),s=e(...n);return gn(r),o._d&&Tr(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function yn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:l,attrs:c,emit:a,render:u,renderCache:p,data:f,setupState:d,ctx:h,inheritAttrs:m}=e;let g,v;const y=gn(e);try{if(4&n.shapeFlag){const e=r||o;g=Lr(u.call(e,e,p,s,d,f,h)),v=c}else{const e=t;0,g=Lr(e(s,e.length>1?{attrs:c,slots:l,emit:a}:null)),v=t.props?c:bn(c)}}catch(_){Sr.length=0,jt(_,e,1),g=Mr(br)}let b=g;if(v&&!1!==m){const e=Object.keys(v),{shapeFlag:t}=b;e.length&&7&t&&(i&&e.some(x)&&(v=_n(v,i)),b=Ir(b,v))}return n.dirs&&(b=Ir(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),g=b,gn(y),g}const bn=e=>{let t;for(const n in e)("class"===n||"style"===n||S(n))&&((t||(t={}))[n]=e[n]);return t},_n=(e,t)=>{const n={};for(const o in e)x(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Sn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!dn(n,s))return!0}return!1}function xn({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const Cn=e=>e.__isSuspense,wn={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){null==e?function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,p=u("div"),f=e.suspense=Tn(e,r,o,t,p,n,s,i,l,c);a(null,f.pendingBranch=e.ssContent,p,null,o,f,s,i),f.deps>0?(kn(e,"onPending"),kn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),$n(f,e.ssFallback)):f.resolve()}(t,n,o,r,s,i,l,c,a):function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const f=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=p;if(m)p.pendingBranch=f,Or(f,m)?(c(m,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():g&&(c(h,d,n,o,r,null,s,i,l),$n(p,d))):(p.pendingId++,v?(p.isHydrating=!1,p.activeBranch=m):a(m,r,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),g?(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():(c(h,d,n,o,r,null,s,i,l),$n(p,d))):h&&Or(f,h)?(c(h,f,n,o,r,p,s,i,l),p.resolve(!0)):(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0&&p.resolve()));else if(h&&Or(f,h))c(h,f,n,o,r,p,s,i,l),$n(p,f);else if(kn(t,"onPending"),p.pendingBranch=f,p.pendingId++,c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0)p.resolve();else{const{timeout:e,pendingId:t}=p;e>0?setTimeout((()=>{p.pendingId===t&&p.fallback(d)}),e):0===e&&p.fallback(d)}}(e,t,n,o,r,i,l,c,a)},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=Tn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve();return u},create:Tn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=Nn(o?n.default:n),e.ssFallback=o?Nn(n.fallback):Mr(br)}};function kn(e,t){const n=e.props&&e.props[t];F(n)&&n()}function Tn(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:p,m:f,um:d,n:h,o:{parentNode:m,remove:g}}=a,v=Q(e.props&&e.props.timeout),y={vnode:e,parent:t,parentComponent:n,isSVG:i,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof v?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:i,container:l}=y;if(y.isHydrating)y.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===y.pendingId&&f(o,l,t,0)});let{anchor:t}=y;n&&(t=h(n),d(n,i,y,!0)),e||f(o,l,t,0)}$n(y,o),y.pendingBranch=null,y.isInFallback=!1;let c=y.parent,a=!1;for(;c;){if(c.pendingBranch){c.effects.push(...s),a=!0;break}c=c.parent}a||rn(s),y.effects=[],kn(t,"onResolve")},fallback(e){if(!y.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=y;kn(t,"onFallback");const i=h(n),a=()=>{y.isInFallback&&(p(null,e,r,i,o,null,s,l,c),$n(y,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),y.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){y.activeBranch&&f(y.activeBranch,e,t,n),y.container=e},next:()=>y.activeBranch&&h(y.activeBranch),registerDep(e,t){const n=!!y.pendingBranch;n&&y.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{jt(t,e,0)})).then((r=>{if(e.isUnmounted||y.isUnmounted||y.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;es(e,r,!1),o&&(s.el=o);const l=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),y,i,c),l&&g(l),xn(e,s.el),n&&0==--y.deps&&y.resolve()}))},unmount(e,t){y.isUnmounted=!0,y.activeBranch&&d(y.activeBranch,n,e,t),y.pendingBranch&&d(y.pendingBranch,n,e,t)}};return y}function Nn(e){let t;if(F(e)){const n=kr&&e._c;n&&(e._d=!1,Cr()),e=e(),n&&(e._d=!0,t=xr,wr())}if(N(e)){const t=function(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!$r(o))return;if(o.type!==br||"v-if"===o.children){if(t)return;t=o}}return t}(e);e=t}return e=Lr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function En(e,t){t&&t.pendingBranch?N(e)?t.effects.push(...e):t.effects.push(e):rn(e)}function $n(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,xn(o,r))}function On(e,t){if(Kr){let n=Kr.provides;const o=Kr.parent&&Kr.parent.provides;o===n&&(n=Kr.provides=Object.create(o)),n[e]=t}else;}function Fn(e,t,n=!1){const o=Kr||hn;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&F(t)?t.call(o.proxy):t}}function Rn(e,t){return Mn(e,null,{flush:"post"})}const An={};function Pn(e,t,n){return Mn(e,t,n)}function Mn(e,t,{immediate:n,deep:o,flush:r}=g){const s=Kr;let i,l,c=!1,a=!1;if(wt(e)?(i=()=>e.value,c=gt(e)):ht(e)?(i=()=>e,o=!0):N(e)?(a=!0,c=e.some((e=>ht(e)||gt(e))),i=()=>e.map((e=>wt(e)?e.value:ht(e)?Bn(e):F(e)?Bt(e,s,2):void 0))):i=F(e)?t?()=>Bt(e,s,2):()=>{if(!s||!s.isUnmounted)return l&&l(),Lt(e,s,3,[u])}:y,t&&o){const e=i;i=()=>Bn(e())}let u=e=>{l=h.onStop=()=>{Bt(e,s,4)}},p=a?[]:An;const f=()=>{if(h.active)if(t){const e=h.run();(o||c||(a?e.some(((e,t)=>J(e,p[t]))):J(e,p)))&&(l&&l(),Lt(t,s,3,[e,p===An?void 0:p,u]),p=e)}else h.run()};let d;f.allowRecurse=!!t,d="sync"===r?f:"post"===r?()=>ir(f,s&&s.suspense):()=>function(e){on(e,Kt,zt,Gt)}(f);const h=new fe(i,d);return t?n?f():p=h.run():"post"===r?ir(h.run.bind(h),s&&s.suspense):h.run(),()=>{h.stop(),s&&s.scope&&w(s.scope.effects,h)}}function Vn(e,t,n){const o=this.proxy,r=R(e)?e.includes(".")?In(o,e):()=>o[e]:e.bind(o,o);let s;F(t)?s=t:(s=t.handler,n=t);const i=Kr;qr(this);const l=Mn(r,s.bind(o),n);return i?qr(i):Jr(),l}function In(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Bn(e,t){if(!P(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),wt(e))Bn(e.value,t);else if(N(e))for(let n=0;n<e.length;n++)Bn(e[n],t);else if($(e)||E(e))e.forEach((e=>{Bn(e,t)}));else if(B(e))for(const n in e)Bn(e[n],t);return e}function Ln(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ao((()=>{e.isMounted=!0})),fo((()=>{e.isUnmounting=!0})),e}const jn=[Function,Array],Un={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:jn,onEnter:jn,onAfterEnter:jn,onEnterCancelled:jn,onBeforeLeave:jn,onLeave:jn,onAfterLeave:jn,onLeaveCancelled:jn,onBeforeAppear:jn,onAppear:jn,onAfterAppear:jn,onAppearCancelled:jn},setup(e,{slots:t}){const n=Gr(),o=Ln();let r;return()=>{const s=t.default&&Gn(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1)for(const e of s)if(e.type!==br){i=e;break}const l=yt(e),{mode:c}=l;if(o.isLeaving)return Wn(i);const a=zn(i);if(!a)return Wn(i);const u=Hn(a,l,o,n);Kn(a,u);const p=n.subTree,f=p&&zn(p);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(f&&f.type!==br&&(!Or(a,f)||d)){const e=Hn(f,l,o,n);if(Kn(f,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},Wn(i);"in-out"===c&&a.type!==br&&(e.delayLeave=(e,t,n)=>{Dn(o,f)[String(f.key)]=f,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function Dn(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Hn(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:f,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:g,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),_=Dn(n,e),S=(e,t)=>{e&&Lt(e,o,9,t)},x=(e,t)=>{const n=t[1];S(e,t),N(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},C={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=m||l}t._leaveCb&&t._leaveCb(!0);const s=_[b];s&&Or(e,s)&&s.el._leaveCb&&s.el._leaveCb(),S(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=g||c,o=v||a,s=y||u}let i=!1;const l=e._enterCb=t=>{i||(i=!0,S(t?s:o,[e]),C.delayedLeave&&C.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();S(p,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,o(),S(n?h:d,[t]),t._leaveCb=void 0,_[r]===e&&delete _[r])};_[r]=e,f?x(f,[t,i]):i()},clone:e=>Hn(e,t,n,o)};return C}function Wn(e){if(Zn(e))return(e=Ir(e)).children=null,e}function zn(e){return Zn(e)?e.children?e.children[0]:void 0:e}function Kn(e,t){6&e.shapeFlag&&e.component?Kn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gn(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let i=e[s];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:s);i.type===vr?(128&i.patchFlag&&r++,o=o.concat(Gn(i.children,t,l))):(t||i.type!==br)&&o.push(null!=l?Ir(i,{key:l}):i)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}function qn(e){return F(e)?{setup:e,name:e.name}:e}const Jn=e=>!!e.type.__asyncLoader;function Yn(e,{vnode:{ref:t,props:n,children:o}}){const r=Mr(e,n,o);return r.ref=t,r}const Zn=e=>e.type.__isKeepAlive,Qn={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Gr(),o=n.ctx,r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:p}}}=o,f=p("div");function d(e){ro(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=is(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);i&&t.type===i.type?i&&ro(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),ir((()=>{s.isDeactivated=!1,s.a&&Y(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Hr(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;a(e,f,null,1,l),ir((()=>{t.da&&Y(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Hr(n,t.parent,e),t.isDeactivated=!0}),l)},Pn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Xn(e,t))),t&&h((e=>!Xn(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&r.set(g,so(n.subTree))};return ao(v),po(v),fo((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=so(t);if(e.type!==r.type)d(e);else{ro(r);const e=r.component.da;e&&ir(e,o)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!($r(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let l=so(o);const c=l.type,a=is(Jn(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:p,max:f}=e;if(u&&(!a||!Xn(u,a))||p&&a&&Xn(p,a))return i=l,o;const d=null==l.key?c:l.key,h=r.get(d);return l.el&&(l=Ir(l),128&o.shapeFlag&&(o.ssContent=l)),g=d,h?(l.el=h.el,l.component=h.component,l.transition&&Kn(l,l.transition),l.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),f&&s.size>parseInt(f,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,Cn(o.type)?o:l}}};function Xn(e,t){return N(e)?e.some((e=>Xn(e,t))):R(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function eo(e,t){no(e,"a",t)}function to(e,t){no(e,"da",t)}function no(e,t,n=Kr){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(io(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Zn(e.parent.vnode)&&oo(o,t,n,e),e=e.parent}}function oo(e,t,n,o){const r=io(t,e,o,!0);ho((()=>{w(o[t],r)}),n)}function ro(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function so(e){return 128&e.shapeFlag?e.ssContent:e}function io(e,t,n=Kr,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;ge(),qr(n);const r=Lt(t,n,e,o);return Jr(),ve(),r});return o?r.unshift(s):r.push(s),s}}const lo=e=>(t,n=Kr)=>(!Xr||"sp"===e)&&io(e,t,n),co=lo("bm"),ao=lo("m"),uo=lo("bu"),po=lo("u"),fo=lo("bum"),ho=lo("um"),mo=lo("sp"),go=lo("rtg"),vo=lo("rtc");function yo(e,t=Kr){io("ec",e,t)}function bo(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let c=l.dir[o];c&&(ge(),Lt(c,n,8,[e.el,l,e,t]),ve())}}const _o="components";const So=Symbol();function xo(e,t,n=!0,o=!1){const r=hn||Kr;if(r){const n=r.type;if(e===_o){const e=is(n);if(e&&(e===t||e===W(t)||e===G(W(t))))return n}const s=Co(r[e]||n[e],t)||Co(r.appContext[e],t);return!s&&o?n:s}}function Co(e,t){return e&&(e[t]||e[W(t)]||e[G(W(t))])}function wo(e){return e.some((e=>!$r(e)||e.type!==br&&!(e.type===vr&&!wo(e.children))))?e:null}const ko=e=>e?Yr(e)?rs(e)||e.proxy:ko(e.parent):null,To=C(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ko(e.parent),$root:e=>ko(e.root),$emit:e=>e.emit,$options:e=>Ao(e),$forceUpdate:e=>e.f||(e.f=()=>tn(e.update)),$nextTick:e=>e.n||(e.n=en.bind(e.proxy)),$watch:e=>Vn.bind(e)}),No={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:l,appContext:c}=e;let a;if("$"!==t[0]){const l=i[t];if(void 0!==l)switch(l){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(o!==g&&T(o,t))return i[t]=1,o[t];if(r!==g&&T(r,t))return i[t]=2,r[t];if((a=e.propsOptions[0])&&T(a,t))return i[t]=3,s[t];if(n!==g&&T(n,t))return i[t]=4,n[t];$o&&(i[t]=0)}}const u=To[t];let p,f;return u?("$attrs"===t&&ye(e,0,t),u(e)):(p=l.__cssModules)&&(p=p[t])?p:n!==g&&T(n,t)?(i[t]=4,n[t]):(f=c.config.globalProperties,T(f,t)?f[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return r!==g&&T(r,t)?(r[t]=n,!0):o!==g&&T(o,t)?(o[t]=n,!0):!T(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let l;return!!n[i]||e!==g&&T(e,i)||t!==g&&T(t,i)||(l=s[0])&&T(l,i)||T(o,i)||T(To,i)||T(r.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:T(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Eo=C({},No,{get(e,t){if(t!==Symbol.unscopables)return No.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!n(t)});let $o=!0;function Oo(e){const t=Ao(e),n=e.proxy,o=e.ctx;$o=!1,t.beforeCreate&&Fo(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:l,provide:c,inject:a,created:u,beforeMount:p,mounted:f,beforeUpdate:d,updated:h,activated:m,deactivated:g,beforeUnmount:v,unmounted:b,render:_,renderTracked:S,renderTriggered:x,errorCaptured:C,serverPrefetch:w,expose:k,inheritAttrs:T,components:E,directives:$}=t;if(a&&function(e,t,n=y,o=!1){N(e)&&(e=Io(e));for(const r in e){const n=e[r];let s;s=P(n)?"default"in n?Fn(n.from||r,n.default,!0):Fn(n.from||r):Fn(n),wt(s)&&o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}(a,o,null,e.appContext.config.unwrapInjectedRef),i)for(const y in i){const e=i[y];F(e)&&(o[y]=e.bind(n))}if(r){const t=r.call(n,n);P(t)&&(e.data=ut(t))}if($o=!0,s)for(const N in s){const e=s[N],t=F(e)?e.bind(n,n):F(e.get)?e.get.bind(n,n):y,r=!F(e)&&F(e.set)?e.set.bind(n):y,i=cs({get:t,set:r});Object.defineProperty(o,N,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(l)for(const y in l)Ro(l[y],o,n,y);if(c){const e=F(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{On(t,e[t])}))}function O(e,t){N(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&Fo(u,e,"c"),O(co,p),O(ao,f),O(uo,d),O(po,h),O(eo,m),O(to,g),O(yo,C),O(vo,S),O(go,x),O(fo,v),O(ho,b),O(mo,w),N(k))if(k.length){const t=e.exposed||(e.exposed={});k.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});_&&e.render===y&&(e.render=_),null!=T&&(e.inheritAttrs=T),E&&(e.components=E),$&&(e.directives=$)}function Fo(e,t,n){Lt(N(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Ro(e,t,n,o){const r=o.includes(".")?In(n,o):()=>n[o];if(R(e)){const n=t[e];F(n)&&Pn(r,n)}else if(F(e))Pn(r,e.bind(n));else if(P(e))if(N(e))e.forEach((e=>Ro(e,t,n,o)));else{const o=F(e.handler)?e.handler.bind(n):t[e.handler];F(o)&&Pn(r,o,e)}}function Ao(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>Po(c,e,i,!0))),Po(c,t,i)):c=t,s.set(t,c),c}function Po(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Po(e,s,n,!0),r&&r.forEach((t=>Po(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=Mo[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const Mo={data:Vo,props:Lo,emits:Lo,methods:Lo,computed:Lo,beforeCreate:Bo,created:Bo,beforeMount:Bo,mounted:Bo,beforeUpdate:Bo,updated:Bo,beforeDestroy:Bo,beforeUnmount:Bo,destroyed:Bo,unmounted:Bo,activated:Bo,deactivated:Bo,errorCaptured:Bo,serverPrefetch:Bo,components:Lo,directives:Lo,watch:function(e,t){if(!e)return t;if(!t)return e;const n=C(Object.create(null),e);for(const o in t)n[o]=Bo(e[o],t[o]);return n},provide:Vo,inject:function(e,t){return Lo(Io(e),Io(t))}};function Vo(e,t){return t?e?function(){return C(F(e)?e.call(this,this):e,F(t)?t.call(this,this):t)}:t:e}function Io(e){if(N(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Bo(e,t){return e?[...new Set([].concat(e,t))]:t}function Lo(e,t){return e?C(C(Object.create(null),e),t):t}function jo(e,t,n,o){const[r,s]=e.propsOptions;let i,l=!1;if(t)for(let c in t){if(j(c))continue;const a=t[c];let u;r&&T(r,u=W(c))?s&&s.includes(u)?(i||(i={}))[u]=a:n[u]=a:dn(e.emitsOptions,c)||c in o&&a===o[c]||(o[c]=a,l=!0)}if(s){const t=yt(n),o=i||g;for(let i=0;i<s.length;i++){const l=s[i];n[l]=Uo(r,t,l,o[l],e,!T(o,l))}}return l}function Uo(e,t,n,o,r,s){const i=e[n];if(null!=i){const e=T(i,"default");if(e&&void 0===o){const e=i.default;if(i.type!==Function&&F(e)){const{propsDefaults:s}=r;n in s?o=s[n]:(qr(r),o=s[n]=e.call(null,t),Jr())}else o=e}i[0]&&(s&&!e?o=!1:!i[1]||""!==o&&o!==K(n)||(o=!0))}return o}function Do(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,i={},l=[];let c=!1;if(!F(e)){const o=e=>{c=!0;const[n,o]=Do(e,t,!0);C(i,n),o&&l.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return o.set(e,v),v;if(N(s))for(let u=0;u<s.length;u++){const e=W(s[u]);Ho(e)&&(i[e]=g)}else if(s)for(const u in s){const e=W(u);if(Ho(e)){const t=s[u],n=i[e]=N(t)||F(t)?{type:t}:t;if(n){const t=Ko(Boolean,n.type),o=Ko(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||T(n,"default"))&&l.push(e)}}}const a=[i,l];return o.set(e,a),a}function Ho(e){return"$"!==e[0]}function Wo(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function zo(e,t){return Wo(e)===Wo(t)}function Ko(e,t){return N(t)?t.findIndex((t=>zo(t,e))):F(t)&&zo(t,e)?0:-1}const Go=e=>"_"===e[0]||"$stable"===e,qo=e=>N(e)?e.map(Lr):[Lr(e)],Jo=(e,t,n)=>{if(t._n)return t;const o=vn(((...e)=>qo(t(...e))),n);return o._c=!1,o},Yo=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Go(r))continue;const n=e[r];if(F(n))t[r]=Jo(0,n,o);else if(null!=n){const e=qo(n);t[r]=()=>e}}},Zo=(e,t)=>{const n=qo(t);e.slots.default=()=>n};function Qo(){return{app:null,config:{isNativeTag:b,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Xo=0;function er(e,t){return function(n,o=null){F(n)||(n=Object.assign({},n)),null==o||P(o)||(o=null);const r=Qo(),s=new Set;let i=!1;const l=r.app={_uid:Xo++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:ds,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&F(e.install)?(s.add(e),e.install(l,...t)):F(e)&&(s.add(e),e(l,...t))),l),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),l),component:(e,t)=>t?(r.components[e]=t,l):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,l):r.directives[e],mount(s,c,a){if(!i){const u=Mr(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),i=!0,l._container=s,s.__vue_app__=l,rs(u.component)||u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,l)};return l}}function tr(e,t,n,o,r=!1){if(N(e))return void e.forEach(((e,s)=>tr(e,t&&(N(t)?t[s]:t),n,o,r)));if(Jn(o)&&!r)return;const s=4&o.shapeFlag?rs(o.component)||o.component.proxy:o.el,i=r?null:s,{i:l,r:c}=e,a=t&&t.r,u=l.refs===g?l.refs={}:l.refs,p=l.setupState;if(null!=a&&a!==c&&(R(a)?(u[a]=null,T(p,a)&&(p[a]=null)):wt(a)&&(a.value=null)),F(c))Bt(c,l,12,[i,u]);else{const t=R(c),o=wt(c);if(t||o){const o=()=>{if(e.f){const n=t?u[c]:c.value;r?N(n)&&w(n,s):N(n)?n.includes(s)||n.push(s):t?(u[c]=[s],T(p,c)&&(p[c]=u[c])):(c.value=[s],e.k&&(u[e.k]=c.value))}else t?(u[c]=i,T(p,c)&&(p[c]=i)):wt(c)&&(c.value=i,e.k&&(u[e.k]=i))};i?(o.id=-1,ir(o,n)):o()}}}let nr=!1;const or=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,rr=e=>8===e.nodeType;function sr(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:l,insert:c,createComment:a}}=e,u=(n,o,l,a,g,v=!1)=>{const y=rr(n)&&"["===n.data,b=()=>h(n,o,l,a,g,y),{type:_,ref:S,shapeFlag:x,patchFlag:C}=o,w=n.nodeType;o.el=n,-2===C&&(v=!1,o.dynamicChildren=null);let k=null;switch(_){case yr:3!==w?""===o.children?(c(o.el=r(""),i(n),n),k=n):k=b():(n.data!==o.children&&(nr=!0,n.data=o.children),k=s(n));break;case br:k=8!==w||y?b():s(n);break;case _r:if(1===w){k=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=k.outerHTML),t===o.staticCount-1&&(o.anchor=k),k=s(k);return k}k=b();break;case vr:k=y?d(n,o,l,a,g,v):b();break;default:if(1&x)k=1!==w||o.type.toLowerCase()!==n.tagName.toLowerCase()?b():p(n,o,l,a,g,v);else if(6&x){o.slotScopeIds=g;const e=i(n);if(t(o,e,null,l,a,or(e),v),k=y?m(n):s(n),k&&rr(k)&&"teleport end"===k.data&&(k=s(k)),Jn(o)){let t;y?(t=Mr(vr),t.anchor=k?k.previousSibling:e.lastChild):t=3===n.nodeType?Br(""):Mr("div"),t.el=n,o.component.subTree=t}}else 64&x?k=8!==w?b():o.type.hydrate(n,o,l,a,g,v,e,f):128&x&&(k=o.type.hydrate(n,o,l,a,or(i(n)),g,v,e,u))}return null!=S&&tr(S,null,a,o),k},p=(e,t,n,r,s,i)=>{i=i||!!t.dynamicChildren;const{type:c,props:a,patchFlag:u,shapeFlag:p,dirs:d}=t,h="input"===c&&d||"option"===c;if(h||-1!==u){if(d&&bo(t,null,n,"created"),a)if(h||!i||48&u)for(const t in a)(h&&t.endsWith("value")||S(t)&&!j(t))&&o(e,t,null,a[t],!1,void 0,n);else a.onClick&&o(e,"onClick",null,a.onClick,!1,void 0,n);let c;if((c=a&&a.onVnodeBeforeMount)&&Hr(c,n,t),d&&bo(t,null,n,"beforeMount"),((c=a&&a.onVnodeMounted)||d)&&En((()=>{c&&Hr(c,n,t),d&&bo(t,null,n,"mounted")}),r),16&p&&(!a||!a.innerHTML&&!a.textContent)){let o=f(e.firstChild,t,e,n,r,s,i);for(;o;){nr=!0;const e=o;o=o.nextSibling,l(e)}}else 8&p&&e.textContent!==t.children&&(nr=!0,e.textContent=t.children)}return e.nextSibling},f=(e,t,o,r,s,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let p=0;p<a;p++){const t=l?c[p]:c[p]=Lr(c[p]);if(e)e=u(e,t,r,s,i,l);else{if(t.type===yr&&!t.children)continue;nr=!0,n(null,t,o,null,r,s,or(o),i)}}return e},d=(e,t,n,o,r,l)=>{const{slotScopeIds:u}=t;u&&(r=r?r.concat(u):u);const p=i(e),d=f(s(e),t,p,n,o,r,l);return d&&rr(d)&&"]"===d.data?s(t.anchor=d):(nr=!0,c(t.anchor=a("]"),p,d),d)},h=(e,t,o,r,c,a)=>{if(nr=!0,t.el=null,a){const t=m(e);for(;;){const n=s(e);if(!n||n===t)break;l(n)}}const u=s(e),p=i(e);return l(e),n(null,t,p,u,o,r,or(p),c),u},m=e=>{let t=0;for(;e;)if((e=s(e))&&rr(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),void ln();nr=!1,u(t.firstChild,e,null,null,null),ln(),nr&&console.error("Hydration completed but contains mismatches.")},u]}const ir=En;function lr(e){return ar(e)}function cr(e){return ar(e,sr)}function ar(e,t){(X||(X="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})).__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:s,createText:i,createComment:l,setText:c,setElementText:a,parentNode:u,nextSibling:p,setScopeId:f=y,cloneNode:d,insertStaticContent:h}=e,m=(e,t,n,o=null,r=null,s=null,i=!1,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Or(e,t)&&(o=Q(e),H(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:p}=t;switch(a){case yr:b(e,t,n,o);break;case br:_(e,t,n,o);break;case _r:null==e&&S(t,n,o,i);break;case vr:F(e,t,n,o,r,s,i,l,c);break;default:1&p?x(e,t,n,o,r,s,i,l,c):6&p?R(e,t,n,o,r,s,i,l,c):(64&p||128&p)&&a.process(e,t,n,o,r,s,i,l,c,ne)}null!=u&&r&&tr(u,e&&e.ref,s,t||e,!t)},b=(e,t,o,r)=>{if(null==e)n(t.el=i(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},_=(e,t,o,r)=>{null==e?n(t.el=l(t.children||""),o,r):t.el=e.el},S=(e,t,n,o)=>{[e.el,e.anchor]=h(e.children,t,n,o,e.el,e.anchor)},x=(e,t,n,o,r,s,i,l,c)=>{i=i||"svg"===t.type,null==e?w(t,n,o,r,s,i,l,c):E(e,t,r,s,i,l,c)},w=(e,t,o,i,l,c,u,p)=>{let f,h;const{type:m,props:g,shapeFlag:v,transition:y,patchFlag:b,dirs:_}=e;if(e.el&&void 0!==d&&-1===b)f=e.el=d(e.el);else{if(f=e.el=s(e.type,c,g&&g.is,g),8&v?a(f,e.children):16&v&&N(e.children,f,null,i,l,c&&"foreignObject"!==m,u,p),_&&bo(e,null,i,"created"),g){for(const t in g)"value"===t||j(t)||r(f,t,null,g[t],c,e.children,i,l,J);"value"in g&&r(f,"value",null,g.value),(h=g.onVnodeBeforeMount)&&Hr(h,i,e)}k(f,e,e.scopeId,u,i)}_&&bo(e,null,i,"beforeMount");const S=(!l||l&&!l.pendingBranch)&&y&&!y.persisted;S&&y.beforeEnter(f),n(f,t,o),((h=g&&g.onVnodeMounted)||S||_)&&ir((()=>{h&&Hr(h,i,e),S&&y.enter(f),_&&bo(e,null,i,"mounted")}),l)},k=(e,t,n,o,r)=>{if(n&&f(e,n),o)for(let s=0;s<o.length;s++)f(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;k(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},N=(e,t,n,o,r,s,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?jr(e[a]):Lr(e[a]);m(null,c,t,n,o,r,s,i,l)}},E=(e,t,n,o,s,i,l)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:p,dirs:f}=t;u|=16&e.patchFlag;const d=e.props||g,h=t.props||g;let m;n&&ur(n,!1),(m=h.onVnodeBeforeUpdate)&&Hr(m,n,t,e),f&&bo(t,e,n,"beforeUpdate"),n&&ur(n,!0);const v=s&&"foreignObject"!==t.type;if(p?$(e.dynamicChildren,p,c,n,o,v,i):l||B(e,t,c,null,n,o,v,i,!1),u>0){if(16&u)O(c,t,d,h,n,o,s);else if(2&u&&d.class!==h.class&&r(c,"class",null,h.class,s),4&u&&r(c,"style",d.style,h.style,s),8&u){const i=t.dynamicProps;for(let t=0;t<i.length;t++){const l=i[t],a=d[l],u=h[l];u===a&&"value"!==l||r(c,l,a,u,s,e.children,n,o,J)}}1&u&&e.children!==t.children&&a(c,t.children)}else l||null!=p||O(c,t,d,h,n,o,s);((m=h.onVnodeUpdated)||f)&&ir((()=>{m&&Hr(m,n,t,e),f&&bo(t,e,n,"updated")}),o)},$=(e,t,n,o,r,s,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],p=c.el&&(c.type===vr||!Or(c,a)||70&c.shapeFlag)?u(c.el):n;m(c,a,p,null,o,r,s,i,!0)}},O=(e,t,n,o,s,i,l)=>{if(n!==o){for(const c in o){if(j(c))continue;const a=o[c],u=n[c];a!==u&&"value"!==c&&r(e,c,u,a,l,t.children,s,i,J)}if(n!==g)for(const c in n)j(c)||c in o||r(e,c,n[c],null,l,t.children,s,i,J);"value"in o&&r(e,"value",n.value,o.value)}},F=(e,t,o,r,s,l,c,a,u)=>{const p=t.el=e?e.el:i(""),f=t.anchor=e?e.anchor:i("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(n(p,o,r),n(f,o,r),N(t.children,o,f,s,l,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?($(e.dynamicChildren,h,o,s,l,c,a),(null!=t.key||s&&t===s.subTree)&&pr(e,t,!0)):B(e,t,o,f,s,l,c,a,u)},R=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):A(t,n,o,r,s,i,c):P(e,t,c)},A=(e,t,n,o,r,s,i)=>{const l=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||Wr,s={uid:zr++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new te(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Do(o,r),emitsOptions:fn(o,r),emit:null,emitted:null,propsDefaults:g,inheritAttrs:o.inheritAttrs,ctx:g,data:g,props:g,attrs:g,slots:g,refs:g,setupState:g,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=pn.bind(null,s),e.ce&&e.ce(s);return s}(e,o,r);if(Zn(e)&&(l.ctx.renderer=ne),function(e,t=!1){Xr=t;const{props:n,children:o}=e.vnode,r=Yr(e);(function(e,t,n,o=!1){const r={},s={};Z(s,Fr,1),e.propsDefaults=Object.create(null),jo(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);e.props=n?o?r:pt(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=yt(t),Z(t,"_",n)):Yo(t,e.slots={})}else e.slots={},t&&Zo(e,t);Z(e.slots,Fr,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=bt(new Proxy(e.ctx,No));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?os(e):null;qr(e),ge();const r=Bt(o,e,0,[e.props,n]);if(ve(),Jr(),M(r)){if(r.then(Jr,Jr),t)return r.then((n=>{es(e,n,t)})).catch((t=>{jt(t,e,0)}));e.asyncDep=r}else es(e,r,t)}else ns(e,t)}(e,t):void 0;Xr=!1}(l),l.asyncDep){if(r&&r.registerDep(l,V),!e.el){const e=l.subTree=Mr(br);_(null,e,t,n)}}else V(l,e,t,n,r,s,i)},P=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||Sn(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?Sn(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==o[n]&&!dn(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void I(o,t,n);o.next=t,function(e){const t=Ht.indexOf(e);t>Wt&&Ht.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},V=(e,t,n,o,r,s,i)=>{const l=e.effect=new fe((()=>{if(e.isMounted){let t,{next:n,bu:o,u:l,parent:c,vnode:a}=e,p=n;ur(e,!1),n?(n.el=a.el,I(e,n,i)):n=a,o&&Y(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Hr(t,c,n,a),ur(e,!0);const f=yn(e),d=e.subTree;e.subTree=f,m(d,f,u(d.el),Q(d),e,r,s),n.el=f.el,null===p&&xn(e,f.el),l&&ir(l,r),(t=n.props&&n.props.onVnodeUpdated)&&ir((()=>Hr(t,c,n,a)),r)}else{let i;const{el:l,props:c}=t,{bm:a,m:u,parent:p}=e,f=Jn(t);if(ur(e,!1),a&&Y(a),!f&&(i=c&&c.onVnodeBeforeMount)&&Hr(i,p,t),ur(e,!0),l&&re){const n=()=>{e.subTree=yn(e),re(l,e.subTree,e,r,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const i=e.subTree=yn(e);m(null,i,n,o,e,r,s),t.el=i.el}if(u&&ir(u,r),!f&&(i=c&&c.onVnodeMounted)){const e=t;ir((()=>Hr(i,p,e)),r)}(256&t.shapeFlag||p&&Jn(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&ir(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>tn(c)),e.scope),c=e.update=()=>l.run();c.id=e.uid,ur(e,!0),c()},I=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=yt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;jo(e,t,r,s)&&(a=!0);for(const s in l)t&&(T(t,s)||(o=K(s))!==s&&T(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Uo(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&T(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let i=n[o];if(dn(e.emitsOptions,i))continue;const u=t[i];if(c)if(T(s,i))u!==s[i]&&(s[i]=u,a=!0);else{const t=W(i);r[t]=Uo(c,l,t,u,e,!1)}else u!==s[i]&&(s[i]=u,a=!0)}}a&&_e(e,"set","$attrs")}(e,t.props,o,n),((e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,i=g;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(C(r,t),n||1!==e||delete r._):(s=!t.$stable,Yo(t,r)),i=t}else t&&(Zo(e,t),i={default:1});if(s)for(const l in r)Go(l)||l in i||delete r[l]})(e,t.children,n),ge(),sn(void 0,e.update),ve()},B=(e,t,n,o,r,s,i,l,c=!1)=>{const u=e&&e.children,p=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void U(u,f,n,o,r,s,i,l,c);if(256&d)return void L(u,f,n,o,r,s,i,l,c)}8&h?(16&p&&J(u,r,s),f!==u&&a(n,f)):16&p?16&h?U(u,f,n,o,r,s,i,l,c):J(u,r,s,!0):(8&p&&a(n,""),16&h&&N(f,n,o,r,s,i,l,c))},L=(e,t,n,o,r,s,i,l,c)=>{const a=(e=e||v).length,u=(t=t||v).length,p=Math.min(a,u);let f;for(f=0;f<p;f++){const o=t[f]=c?jr(t[f]):Lr(t[f]);m(e[f],o,n,null,r,s,i,l,c)}a>u?J(e,r,s,!0,!1,p):N(t,n,o,r,s,i,l,c,p)},U=(e,t,n,o,r,s,i,l,c)=>{let a=0;const u=t.length;let p=e.length-1,f=u-1;for(;a<=p&&a<=f;){const o=e[a],u=t[a]=c?jr(t[a]):Lr(t[a]);if(!Or(o,u))break;m(o,u,n,null,r,s,i,l,c),a++}for(;a<=p&&a<=f;){const o=e[p],a=t[f]=c?jr(t[f]):Lr(t[f]);if(!Or(o,a))break;m(o,a,n,null,r,s,i,l,c),p--,f--}if(a>p){if(a<=f){const e=f+1,p=e<u?t[e].el:o;for(;a<=f;)m(null,t[a]=c?jr(t[a]):Lr(t[a]),n,p,r,s,i,l,c),a++}}else if(a>f)for(;a<=p;)H(e[a],r,s,!0),a++;else{const d=a,h=a,g=new Map;for(a=h;a<=f;a++){const e=t[a]=c?jr(t[a]):Lr(t[a]);null!=e.key&&g.set(e.key,a)}let y,b=0;const _=f-h+1;let S=!1,x=0;const C=new Array(_);for(a=0;a<_;a++)C[a]=0;for(a=d;a<=p;a++){const o=e[a];if(b>=_){H(o,r,s,!0);continue}let u;if(null!=o.key)u=g.get(o.key);else for(y=h;y<=f;y++)if(0===C[y-h]&&Or(o,t[y])){u=y;break}void 0===u?H(o,r,s,!0):(C[u-h]=a+1,u>=x?x=u:S=!0,m(o,t[u],n,null,r,s,i,l,c),b++)}const w=S?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(C):v;for(y=w.length-1,a=_-1;a>=0;a--){const e=h+a,p=t[e],f=e+1<u?t[e+1].el:o;0===C[a]?m(null,p,n,f,r,s,i,l,c):S&&(y<0||a!==w[y]?D(p,n,f,2):y--)}}},D=(e,t,o,r,s=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void D(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void l.move(e,t,o,ne);if(l===vr){n(i,t,o);for(let e=0;e<a.length;e++)D(a[e],t,o,r);return void n(e.anchor,t,o)}if(l===_r)return void(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=p(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(i),n(i,t,o),ir((()=>c.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,l=()=>n(i,t,o),a=()=>{e(i,(()=>{l(),s&&s()}))};r?r(i,l,a):a()}else n(i,t,o)},H=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:p,dirs:f}=e;if(null!=l&&tr(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&f,h=!Jn(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&Hr(m,t,e),6&u)q(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&bo(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ne,o):a&&(s!==vr||p>0&&64&p)?J(a,t,n,!1,!0):(s===vr&&384&p||!r&&16&u)&&J(c,t,n),o&&z(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&ir((()=>{m&&Hr(m,t,e),d&&bo(e,null,t,"unmounted")}),n)},z=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===vr)return void G(n,r);if(t===_r)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=p(e),o(e),e=n;o(t)})(e);const i=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,i);o?o(e.el,i,r):r()}else i()},G=(e,t)=>{let n;for(;e!==t;)n=p(e),o(e),e=n;o(t)},q=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&Y(o),r.stop(),s&&(s.active=!1,H(i,e,t,n)),l&&ir(l,t),ir((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},J=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i<e.length;i++)H(e[i],t,n,o,r)},Q=e=>6&e.shapeFlag?Q(e.component.subTree):128&e.shapeFlag?e.suspense.next():p(e.anchor||e.el),ee=(e,t,n)=>{null==e?t._vnode&&H(t._vnode,null,null,!0):m(t._vnode||null,e,t,null,null,null,n),ln(),t._vnode=e},ne={p:m,um:H,m:D,r:z,mt:A,mc:N,pc:B,pbc:$,n:Q,o:e};let oe,re;return t&&([oe,re]=t(ne)),{render:ee,hydrate:oe,createApp:er(ee,oe)}}function ur({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function pr(e,t,n=!1){const o=e.children,r=t.children;if(N(o)&&N(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=jr(r[s]),t.el=e.el),n||pr(e,t))}}const fr=e=>e&&(e.disabled||""===e.disabled),dr=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,hr=(e,t)=>{const n=e&&e.to;if(R(n)){if(t){return t(n)}return null}return n};function mr(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,p=2===s;if(p&&o(i,t,n),(!p||fr(u))&&16&c)for(let f=0;f<a.length;f++)r(a[f],t,n,2);p&&o(l,t,n)}const gr={__isTeleport:!0,process(e,t,n,o,r,s,i,l,c,a){const{mc:u,pc:p,pbc:f,o:{insert:d,querySelector:h,createText:m}}=a,g=fr(t.props);let{shapeFlag:v,children:y,dynamicChildren:b}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");d(e,n,o),d(a,n,o);const p=t.target=hr(t.props,h),f=t.targetAnchor=m("");p&&(d(f,p),i=i||dr(p));const b=(e,t)=>{16&v&&u(y,e,t,r,s,i,l,c)};g?b(n,a):p&&b(p,f)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=fr(e.props),v=m?n:u,y=m?o:d;if(i=i||dr(u),b?(f(e.dynamicChildren,b,v,r,s,i,l),pr(e,t,!0)):c||p(e,t,v,y,r,s,i,l,!1),g)m||mr(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=hr(t.props,h);e&&mr(t,e,null,a,0)}else m&&mr(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:p,props:f}=e;if(p&&s(u),(i||!fr(f))&&(s(a),16&l))for(let d=0;d<c.length;d++){const e=c[d];r(e,t,n,!0,!!e.dynamicChildren)}},move:mr,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=hr(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(fr(t.props))t.anchor=a(i(e),t,l(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=i(e);let l=c;for(;l;)if(l=i(l),l&&8===l.nodeType&&"teleport anchor"===l.data){t.targetAnchor=l,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(c,t,u,n,o,r,s)}}return t.anchor&&i(t.anchor)}},vr=Symbol(void 0),yr=Symbol(void 0),br=Symbol(void 0),_r=Symbol(void 0),Sr=[];let xr=null;function Cr(e=!1){Sr.push(xr=e?null:[])}function wr(){Sr.pop(),xr=Sr[Sr.length-1]||null}let kr=1;function Tr(e){kr+=e}function Nr(e){return e.dynamicChildren=kr>0?xr||v:null,wr(),kr>0&&xr&&xr.push(e),e}function Er(e,t,n,o,r){return Nr(Mr(e,t,n,o,r,!0))}function $r(e){return!!e&&!0===e.__v_isVNode}function Or(e,t){return e.type===t.type&&e.key===t.key}const Fr="__vInternal",Rr=({key:e})=>null!=e?e:null,Ar=({ref:e,ref_key:t,ref_for:n})=>null!=e?R(e)||wt(e)||F(e)?{i:hn,r:e,k:t,f:!!n}:e:null;function Pr(e,t=null,n=null,o=0,r=null,s=(e===vr?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Rr(t),ref:t&&Ar(t),scopeId:mn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return l?(Ur(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=R(n)?8:16),kr>0&&!i&&xr&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&xr.push(c),c}const Mr=function(e,t=null,n=null,o=0,r=null,i=!1){e&&e!==So||(e=br);if($r(e)){const o=Ir(e,t,!0);return n&&Ur(o,n),kr>0&&!i&&xr&&(6&o.shapeFlag?xr[xr.indexOf(e)]=o:xr.push(o)),o.patchFlag|=-2,o}l=e,F(l)&&"__vccOpts"in l&&(e=e.__vccOpts);var l;if(t){t=Vr(t);let{class:e,style:n}=t;e&&!R(e)&&(t.class=a(e)),P(n)&&(vt(n)&&!N(n)&&(n=C({},n)),t.style=s(n))}const c=R(e)?1:Cn(e)?128:(e=>e.__isTeleport)(e)?64:P(e)?4:F(e)?2:0;return Pr(e,t,n,o,r,c,i,!0)};function Vr(e){return e?vt(e)||Fr in e?C({},e):e:null}function Ir(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?Dr(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Rr(l),ref:t&&t.ref?n&&r?N(r)?r.concat(Ar(t)):[r,Ar(t)]:Ar(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==vr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ir(e.ssContent),ssFallback:e.ssFallback&&Ir(e.ssFallback),el:e.el,anchor:e.anchor}}function Br(e=" ",t=0){return Mr(yr,null,e,t)}function Lr(e){return null==e||"boolean"==typeof e?Mr(br):N(e)?Mr(vr,null,e.slice()):"object"==typeof e?jr(e):Mr(yr,null,String(e))}function jr(e){return null===e.el||e.memo?e:Ir(e)}function Ur(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(N(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Ur(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Fr in t?3===o&&hn&&(1===hn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=hn}}else F(t)?(t={default:t,_ctx:hn},n=32):(t=String(t),64&o?(n=16,t=[Br(t)]):n=8);e.children=t,e.shapeFlag|=n}function Dr(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=a([t.class,o.class]));else if("style"===e)t.style=s([t.style,o.style]);else if(S(e)){const n=t[e],r=o[e];!r||n===r||N(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function Hr(e,t,n,o=null){Lt(e,t,7,[n,o])}const Wr=Qo();let zr=0;let Kr=null;const Gr=()=>Kr||hn,qr=e=>{Kr=e,e.scope.on()},Jr=()=>{Kr&&Kr.scope.off(),Kr=null};function Yr(e){return 4&e.vnode.shapeFlag}let Zr,Qr,Xr=!1;function es(e,t,n){F(t)?e.render=t:P(t)&&(e.setupState=Ot(t)),ns(e,n)}function ts(e){Zr=e,Qr=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Eo))}}function ns(e,t,n){const o=e.type;if(!e.render){if(!t&&Zr&&!o.render){const t=o.template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=C(C({isCustomElement:n,delimiters:s},r),i);o.render=Zr(t,l)}}e.render=o.render||y,Qr&&Qr(e)}qr(e),ge(),Oo(e),ve(),Jr()}function os(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(ye(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}function rs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Ot(bt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in To?To[n](e):void 0}))}const ss=/(?:^|[-_])(\w)/g;function is(e){return F(e)&&e.displayName||e.name}function ls(e,t,n=!1){let o=is(t);if(!o&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(o=e[1])}if(!o&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};o=n(e.components||e.parent.type.components)||n(e.appContext.components)}return o?o.replace(ss,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}const cs=(e,t)=>function(e,t,n=!1){let o,r;const s=F(e);return s?(o=e,r=y):(o=e.get,r=e.set),new Pt(o,r,s||!r,n)}(e,0,Xr);function as(){const e=Gr();return e.setupContext||(e.setupContext=os(e))}function us(e,t,n){const o=arguments.length;return 2===o?P(t)&&!N(t)?$r(t)?Mr(e,null,[t]):Mr(e,t):Mr(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&$r(n)&&(n=[n]),Mr(e,t,n))}const ps=Symbol("");function fs(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(J(n[o],t[o]))return!1;return kr>0&&xr&&xr.push(e),!0}const ds="3.2.36",hs="undefined"!=typeof document?document:null,ms=hs&&hs.createElement("template"),gs={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?hs.createElementNS("http://www.w3.org/2000/svg",e):hs.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>hs.createTextNode(e),createComment:e=>hs.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>hs.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{ms.innerHTML=o?`<svg>${e}</svg>`:e;const r=ms.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const vs=/\s*!important$/;function ys(e,t,n){if(N(n))n.forEach((n=>ys(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=_s[t];if(n)return n;let o=W(t);if("filter"!==o&&o in e)return _s[t]=o;o=G(o);for(let r=0;r<bs.length;r++){const n=bs[r]+o;if(n in e)return _s[t]=n}return t}(e,t);vs.test(n)?e.setProperty(K(o),n.replace(vs,""),"important"):e[o]=n}}const bs=["Webkit","Moz","ms"],_s={};const Ss="http://www.w3.org/1999/xlink";const[xs,Cs]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let ws=0;const ks=Promise.resolve(),Ts=()=>{ws=0};function Ns(e,t,n,o){e.addEventListener(t,n,o)}function Es(e,t,n,o,r=null){const s=e._vei||(e._vei={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if($s.test(e)){let n;for(t={};n=e.match($s);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[K(e.slice(2)),t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{const o=e.timeStamp||xs();(Cs||o>=n.attached-1)&&Lt(function(e,t){if(N(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>ws||(ks.then(Ts),ws=xs()))(),n}(o,r);Ns(e,n,i,l)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}const $s=/(?:Once|Passive|Capture)$/;const Os=/^on[a-z]/;function Fs(e,t){const n=qn(e);class o extends As{constructor(e){super(n,e,t)}}return o.def=n,o}const Rs="undefined"!=typeof HTMLElement?HTMLElement:class{};class As extends Rs{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,en((()=>{this._connected||($i(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=e=>{const{props:t,styles:n}=e,o=!N(t),r=t?o?Object.keys(t):t:[];let s;if(o)for(const i in this._props){const e=t[i];(e===Number||e&&e.type===Number)&&(this._props[i]=Q(this._props[i]),(s||(s=Object.create(null)))[i]=!0)}this._numberProps=s;for(const i of Object.keys(this))"_"!==i[0]&&this._setProp(i,this[i],!0,!1);for(const i of r.map(W))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(e){this._setProp(i,e)}});this._applyStyles(n),this._update()},t=this._def.__asyncLoader;t?t().then(e):e(this._def)}_setAttr(e){let t=this.getAttribute(e);this._numberProps&&this._numberProps[e]&&(t=Q(t)),this._setProp(W(e),t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(K(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(K(e),t+""):t||this.removeAttribute(K(e))))}_update(){$i(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Mr(this._def,C({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0,e.emit=(e,...t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof As){e.parent=t._instance;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Ps(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Ps(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Ms(e.el,t);else if(e.type===vr)e.children.forEach((e=>Ps(e,t)));else if(e.type===_r){let{el:n,anchor:o}=e;for(;n&&(Ms(n,t),n!==o);)n=n.nextSibling}}function Ms(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Vs="transition",Is="animation",Bs=(e,{slots:t})=>us(Un,Hs(e),t);Bs.displayName="Transition";const Ls={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},js=Bs.props=C({},Un.props,Ls),Us=(e,t=[])=>{N(e)?e.forEach((e=>e(...t))):e&&e(...t)},Ds=e=>!!e&&(N(e)?e.some((e=>e.length>1)):e.length>1);function Hs(e){const t={};for(const C in e)C in Ls||(t[C]=e[C]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=i,appearToClass:u=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(P(e))return[Ws(e.enter),Ws(e.leave)];{const t=Ws(e);return[t,t]}}(r),m=h&&h[0],g=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:_,onLeaveCancelled:S,onBeforeAppear:x=v,onAppear:w=y,onAppearCancelled:k=b}=t,T=(e,t,n)=>{Ks(e,t?u:l),Ks(e,t?a:i),n&&n()},N=(e,t)=>{e._isLeaving=!1,Ks(e,p),Ks(e,d),Ks(e,f),t&&t()},E=e=>(t,n)=>{const r=e?w:y,i=()=>T(t,e,n);Us(r,[t,i]),Gs((()=>{Ks(t,e?c:s),zs(t,e?u:l),Ds(r)||Js(t,o,m,i)}))};return C(t,{onBeforeEnter(e){Us(v,[e]),zs(e,s),zs(e,i)},onBeforeAppear(e){Us(x,[e]),zs(e,c),zs(e,a)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>N(e,t);zs(e,p),Xs(),zs(e,f),Gs((()=>{e._isLeaving&&(Ks(e,p),zs(e,d),Ds(_)||Js(e,o,g,n))})),Us(_,[e,n])},onEnterCancelled(e){T(e,!1),Us(b,[e])},onAppearCancelled(e){T(e,!0),Us(k,[e])},onLeaveCancelled(e){N(e),Us(S,[e])}})}function Ws(e){return Q(e)}function zs(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function Ks(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Gs(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let qs=0;function Js(e,t,n,o){const r=e._endId=++qs,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=Ys(e,t);if(!i)return o();const a=i+"end";let u=0;const p=()=>{e.removeEventListener(a,f),s()},f=t=>{t.target===e&&++u>=c&&p()};setTimeout((()=>{u<c&&p()}),l+1),e.addEventListener(a,f)}function Ys(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),i=Zs(r,s),l=o("animationDelay"),c=o("animationDuration"),a=Zs(l,c);let u=null,p=0,f=0;t===Vs?i>0&&(u=Vs,p=i,f=s.length):t===Is?a>0&&(u=Is,p=a,f=c.length):(p=Math.max(i,a),u=p>0?i>a?Vs:Is:null,f=u?u===Vs?s.length:c.length:0);return{type:u,timeout:p,propCount:f,hasTransform:u===Vs&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}function Zs(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Qs(t)+Qs(e[n]))))}function Qs(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Xs(){return document.body.offsetHeight}const ei=new WeakMap,ti=new WeakMap,ni={name:"TransitionGroup",props:C({},js,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Gr(),o=Ln();let r,s;return po((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=Ys(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(oi),r.forEach(ri);const o=r.filter(si);Xs(),o.forEach((e=>{const n=e.el,o=n.style;zs(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,Ks(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=yt(e),l=Hs(i);let c=i.tag||vr;r=s,s=t.default?Gn(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&Kn(t,Hn(t,l,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];Kn(t,Hn(t,l,o,n)),ei.set(t,t.el.getBoundingClientRect())}return Mr(c,null,s)}}};function oi(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function ri(e){ti.set(e,e.el.getBoundingClientRect())}function si(e){const t=ei.get(e),n=ti.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const ii=e=>{const t=e.props["onUpdate:modelValue"]||!1;return N(t)?e=>Y(t,e):t};function li(e){e.target.composing=!0}function ci(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ai={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=ii(r);const s=o||r.props&&"number"===r.props.type;Ns(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=Q(o)),e._assign(o)})),n&&Ns(e,"change",(()=>{e.value=e.value.trim()})),t||(Ns(e,"compositionstart",li),Ns(e,"compositionend",ci),Ns(e,"change",ci))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=ii(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&Q(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},ui={deep:!0,created(e,t,n){e._assign=ii(n),Ns(e,"change",(()=>{const t=e._modelValue,n=mi(e),o=e.checked,r=e._assign;if(N(t)){const e=h(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if($(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(gi(e,o))}))},mounted:pi,beforeUpdate(e,t,n){e._assign=ii(n),pi(e,t,n)}};function pi(e,{value:t,oldValue:n},o){e._modelValue=t,N(t)?e.checked=h(t,o.props.value)>-1:$(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=d(t,gi(e,!0)))}const fi={created(e,{value:t},n){e.checked=d(t,n.props.value),e._assign=ii(n),Ns(e,"change",(()=>{e._assign(mi(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=ii(o),t!==n&&(e.checked=d(t,o.props.value))}},di={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=$(t);Ns(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?Q(mi(e)):mi(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=ii(o)},mounted(e,{value:t}){hi(e,t)},beforeUpdate(e,t,n){e._assign=ii(n)},updated(e,{value:t}){hi(e,t)}};function hi(e,t){const n=e.multiple;if(!n||N(t)||$(t)){for(let o=0,r=e.options.length;o<r;o++){const r=e.options[o],s=mi(r);if(n)r.selected=N(t)?h(t,s)>-1:t.has(s);else if(d(mi(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function mi(e){return"_value"in e?e._value:e.value}function gi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const vi={created(e,t,n){yi(e,t,n,null,"created")},mounted(e,t,n){yi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){yi(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){yi(e,t,n,o,"updated")}};function yi(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return di;case"TEXTAREA":return ai;default:switch(t){case"checkbox":return ui;case"radio":return fi;default:return ai}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const bi=["ctrl","shift","alt","meta"],_i={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>bi.some((n=>e[`${n}Key`]&&!t.includes(n)))},Si={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},xi={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Ci(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Ci(e,!0),o.enter(e)):o.leave(e,(()=>{Ci(e,!1)})):Ci(e,t))},beforeUnmount(e,{value:t}){Ci(e,t)}};function Ci(e,t){e.style.display=t?e._vod:"none"}const wi=C({patchProp:(e,t,n,s,i=!1,l,c,a,u)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,i):"style"===t?function(e,t,n){const o=e.style,r=R(n);if(n&&!r){for(const e in n)ys(o,e,n[e]);if(t&&!R(t))for(const e in t)null==n[e]&&ys(o,e,"")}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,n,s):S(t)?x(t)||Es(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&Os.test(t)&&F(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Os.test(t)&&R(n))return!1;return t in e}(e,t,s,i))?function(e,t,n,o,s,i,l){if("innerHTML"===t||"textContent"===t)return o&&l(o,s,i),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const o=null==n?"":n;return e.value===o&&"OPTION"!==e.tagName||(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=r(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,l,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,n,s,i){if(s&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(Ss,t.slice(6,t.length)):e.setAttributeNS(Ss,t,n);else{const s=o(t);null==n||s&&!r(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}(e,t,s,i))}},gs);let ki,Ti=!1;function Ni(){return ki||(ki=lr(wi))}function Ei(){return ki=Ti?ki:cr(wi),Ti=!0,ki}const $i=(...e)=>{Ni().render(...e)},Oi=(...e)=>{Ei().hydrate(...e)};function Fi(e){if(R(e)){return document.querySelector(e)}return e}const Ri=y;function Ai(e){throw e}function Pi(e){}function Mi(e,t,n,o){const r=new SyntaxError(String(e));return r.code=e,r.loc=t,r}const Vi=Symbol(""),Ii=Symbol(""),Bi=Symbol(""),Li=Symbol(""),ji=Symbol(""),Ui=Symbol(""),Di=Symbol(""),Hi=Symbol(""),Wi=Symbol(""),zi=Symbol(""),Ki=Symbol(""),Gi=Symbol(""),qi=Symbol(""),Ji=Symbol(""),Yi=Symbol(""),Zi=Symbol(""),Qi=Symbol(""),Xi=Symbol(""),el=Symbol(""),tl=Symbol(""),nl=Symbol(""),ol=Symbol(""),rl=Symbol(""),sl=Symbol(""),il=Symbol(""),ll=Symbol(""),cl=Symbol(""),al=Symbol(""),ul=Symbol(""),pl=Symbol(""),fl=Symbol(""),dl=Symbol(""),hl=Symbol(""),ml=Symbol(""),gl=Symbol(""),vl=Symbol(""),yl=Symbol(""),bl=Symbol(""),_l=Symbol(""),Sl={[Vi]:"Fragment",[Ii]:"Teleport",[Bi]:"Suspense",[Li]:"KeepAlive",[ji]:"BaseTransition",[Ui]:"openBlock",[Di]:"createBlock",[Hi]:"createElementBlock",[Wi]:"createVNode",[zi]:"createElementVNode",[Ki]:"createCommentVNode",[Gi]:"createTextVNode",[qi]:"createStaticVNode",[Ji]:"resolveComponent",[Yi]:"resolveDynamicComponent",[Zi]:"resolveDirective",[Qi]:"resolveFilter",[Xi]:"withDirectives",[el]:"renderList",[tl]:"renderSlot",[nl]:"createSlots",[ol]:"toDisplayString",[rl]:"mergeProps",[sl]:"normalizeClass",[il]:"normalizeStyle",[ll]:"normalizeProps",[cl]:"guardReactiveProps",[al]:"toHandlers",[ul]:"camelize",[pl]:"capitalize",[fl]:"toHandlerKey",[dl]:"setBlockTracking",[hl]:"pushScopeId",[ml]:"popScopeId",[gl]:"withCtx",[vl]:"unref",[yl]:"isRef",[bl]:"withMemo",[_l]:"isMemoSame"};const xl={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function Cl(e,t,n,o,r,s,i,l=!1,c=!1,a=!1,u=xl){return e&&(l?(e.helper(Ui),e.helper(Ql(e.inSSR,a))):e.helper(Zl(e.inSSR,a)),i&&e.helper(Xi)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function wl(e,t=xl){return{type:17,loc:t,elements:e}}function kl(e,t=xl){return{type:15,loc:t,properties:e}}function Tl(e,t){return{type:16,loc:xl,key:R(e)?Nl(e,!0):e,value:t}}function Nl(e,t=!1,n=xl,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function El(e,t=xl){return{type:8,loc:t,children:e}}function $l(e,t=[],n=xl){return{type:14,loc:n,callee:e,arguments:t}}function Ol(e,t,n=!1,o=!1,r=xl){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function Fl(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:xl}}const Rl=e=>4===e.type&&e.isStatic,Al=(e,t)=>e===t||e===K(t);function Pl(e){return Al(e,"Teleport")?Ii:Al(e,"Suspense")?Bi:Al(e,"KeepAlive")?Li:Al(e,"BaseTransition")?ji:void 0}const Ml=/^\d|[^\$\w]/,Vl=e=>!Ml.test(e),Il=/[A-Za-z_$\xA0-\uFFFF]/,Bl=/[\.\?\w$\xA0-\uFFFF]/,Ll=/\s+[.[]\s*|\s*[.[]\s+/g,jl=e=>{e=e.trim().replace(Ll,(e=>e.trim()));let t=0,n=[],o=0,r=0,s=null;for(let i=0;i<e.length;i++){const l=e.charAt(i);switch(t){case 0:if("["===l)n.push(t),t=1,o++;else if("("===l)n.push(t),t=2,r++;else if(!(0===i?Il:Bl).test(l))return!1;break;case 1:"'"===l||'"'===l||"`"===l?(n.push(t),t=3,s=l):"["===l?o++:"]"===l&&(--o||(t=n.pop()));break;case 2:if("'"===l||'"'===l||"`"===l)n.push(t),t=3,s=l;else if("("===l)r++;else if(")"===l){if(i===e.length-1)return!1;--r||(t=n.pop())}break;case 3:l===s&&(t=n.pop(),s=null)}}return!o&&!r};function Ul(e,t,n){const o={source:e.source.slice(t,t+n),start:Dl(e.start,e.source,t),end:e.end};return null!=n&&(o.end=Dl(e.start,e.source,t+n)),o}function Dl(e,t,n=t.length){return Hl(C({},e),t,n)}function Hl(e,t,n=t.length){let o=0,r=-1;for(let s=0;s<n;s++)10===t.charCodeAt(s)&&(o++,r=s);return e.offset+=n,e.line+=o,e.column=-1===r?e.column+n:n-r,e}function Wl(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(7===r.type&&(n||r.exp)&&(R(t)?r.name===t:t.test(r.name)))return r}}function zl(e,t,n=!1,o=!1){for(let r=0;r<e.props.length;r++){const s=e.props[r];if(6===s.type){if(n)continue;if(s.name===t&&(s.value||o))return s}else if("bind"===s.name&&(s.exp||o)&&Kl(s.arg,t))return s}}function Kl(e,t){return!(!e||!Rl(e)||e.content!==t)}function Gl(e){return 5===e.type||2===e.type}function ql(e){return 7===e.type&&"slot"===e.name}function Jl(e){return 1===e.type&&3===e.tagType}function Yl(e){return 1===e.type&&2===e.tagType}function Zl(e,t){return e||t?Wi:zi}function Ql(e,t){return e||t?Di:Hi}const Xl=new Set([ll,cl]);function ec(e,t=[]){if(e&&!R(e)&&14===e.type){const n=e.callee;if(!R(n)&&Xl.has(n))return ec(e.arguments[0],t.concat(e))}return[e,t]}function tc(e,t,n){let o,r,s=13===e.type?e.props:e.arguments[2],i=[];if(s&&!R(s)&&14===s.type){const e=ec(s);s=e[0],i=e[1],r=i[i.length-1]}if(null==s||R(s))o=kl([t]);else if(14===s.type){const e=s.arguments[0];R(e)||15!==e.type?s.callee===al?o=$l(n.helper(rl),[kl([t]),s]):s.arguments.unshift(kl([t])):e.properties.unshift(t),!o&&(o=s)}else if(15===s.type){let e=!1;if(4===t.key.type){const n=t.key.content;e=s.properties.some((e=>4===e.key.type&&e.key.content===n))}e||s.properties.unshift(t),o=s}else o=$l(n.helper(rl),[kl([t]),s]),r&&r.callee===cl&&(r=i[i.length-2]);13===e.type?r?r.arguments[0]=o:e.props=o:r?r.arguments[0]=o:e.arguments[2]=o}function nc(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function oc(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Zl(o,e.isComponent)),t(Ui),t(Ql(o,e.isComponent)))}const rc=/&(gt|lt|amp|apos|quot);/g,sc={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},ic={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:b,isPreTag:b,isCustomElement:b,decodeEntities:e=>e.replace(rc,((e,t)=>sc[t])),onError:Ai,onWarn:Pi,comments:!1};function lc(e,t={}){const n=function(e,t){const n=C({},ic);let o;for(o in t)n[o]=void 0===t[o]?ic[o]:t[o];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),o=Sc(n);return function(e,t=xl){return{type:0,children:e,helpers:[],components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}(cc(n,0,[]),xc(n,o))}function cc(e,t,n){const o=Cc(n),r=o?o.ns:0,s=[];for(;!Ec(e,t,n);){const i=e.source;let l;if(0===t||1===t)if(!e.inVPre&&wc(i,e.options.delimiters[0]))l=yc(e,t);else if(0===t&&"<"===i[0])if(1===i.length);else if("!"===i[1])l=wc(i,"\x3c!--")?pc(e):wc(i,"<!DOCTYPE")?fc(e):wc(i,"<![CDATA[")&&0!==r?uc(e,n):fc(e);else if("/"===i[1])if(2===i.length);else{if(">"===i[2]){kc(e,3);continue}if(/[a-z]/i.test(i[2])){mc(e,1,o);continue}l=fc(e)}else/[a-z]/i.test(i[1])?l=dc(e,n):"?"===i[1]&&(l=fc(e));if(l||(l=bc(e,t)),N(l))for(let e=0;e<l.length;e++)ac(s,l[e]);else ac(s,l)}let i=!1;if(2!==t&&1!==t){const t="preserve"!==e.options.whitespace;for(let n=0;n<s.length;n++){const o=s[n];if(e.inPre||2!==o.type)3!==o.type||e.options.comments||(i=!0,s[n]=null);else if(/[^\t\r\n\f ]/.test(o.content))t&&(o.content=o.content.replace(/[\t\r\n\f ]+/g," "));else{const e=s[n-1],r=s[n+1];!e||!r||t&&(3===e.type||3===r.type||1===e.type&&1===r.type&&/[\r\n]/.test(o.content))?(i=!0,s[n]=null):o.content=" "}}if(e.inPre&&o&&e.options.isPreTag(o.tag)){const e=s[0];e&&2===e.type&&(e.content=e.content.replace(/^\r?\n/,""))}}return i?s.filter(Boolean):s}function ac(e,t){if(2===t.type){const n=Cc(e);if(n&&2===n.type&&n.loc.end.offset===t.loc.start.offset)return n.content+=t.content,n.loc.end=t.loc.end,void(n.loc.source+=t.loc.source)}e.push(t)}function uc(e,t){kc(e,9);const n=cc(e,3,t);return 0===e.source.length||kc(e,3),n}function pc(e){const t=Sc(e);let n;const o=/--(\!)?>/.exec(e.source);if(o){n=e.source.slice(4,o.index);const t=e.source.slice(0,o.index);let r=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",r));)kc(e,s-r+1),r=s+1;kc(e,o.index+o[0].length-r+1)}else n=e.source.slice(4),kc(e,e.source.length);return{type:3,content:n,loc:xc(e,t)}}function fc(e){const t=Sc(e),n="?"===e.source[1]?1:2;let o;const r=e.source.indexOf(">");return-1===r?(o=e.source.slice(n),kc(e,e.source.length)):(o=e.source.slice(n,r),kc(e,r+1)),{type:3,content:o,loc:xc(e,t)}}function dc(e,t){const n=e.inPre,o=e.inVPre,r=Cc(t),s=mc(e,0,r),i=e.inPre&&!n,l=e.inVPre&&!o;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),l&&(e.inVPre=!1),s;t.push(s);const c=e.options.getTextMode(s,r),a=cc(e,c,t);if(t.pop(),s.children=a,$c(e.source,s.tag))mc(e,1,r);else if(0===e.source.length&&"script"===s.tag.toLowerCase()){const e=a[0];e&&wc(e.loc.source,"\x3c!--")}return s.loc=xc(e,s.loc.start),i&&(e.inPre=!1),l&&(e.inVPre=!1),s}const hc=t("if,else,else-if,for,slot");function mc(e,t,n){const o=Sc(e),r=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=r[1],i=e.options.getNamespace(s,n);kc(e,r[0].length),Tc(e);const l=Sc(e),c=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let a=gc(e,t);0===t&&!e.inVPre&&a.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,C(e,l),e.source=c,a=gc(e,t).filter((e=>"v-pre"!==e.name)));let u=!1;if(0===e.source.length||(u=wc(e.source,"/>"),kc(e,u?2:1)),1===t)return;let p=0;return e.inVPre||("slot"===s?p=2:"template"===s?a.some((e=>7===e.type&&hc(e.name)))&&(p=3):function(e,t,n){const o=n.options;if(o.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||Pl(e)||o.isBuiltInComponent&&o.isBuiltInComponent(e)||o.isNativeTag&&!o.isNativeTag(e))return!0;for(let r=0;r<t.length;r++){const e=t[r];if(6===e.type){if("is"===e.name&&e.value&&e.value.content.startsWith("vue:"))return!0}else{if("is"===e.name)return!0;"bind"===e.name&&Kl(e.arg,"is")}}}(s,a,e)&&(p=1)),{type:1,ns:i,tag:s,tagType:p,props:a,isSelfClosing:u,children:[],loc:xc(e,o),codegenNode:void 0}}function gc(e,t){const n=[],o=new Set;for(;e.source.length>0&&!wc(e.source,">")&&!wc(e.source,"/>");){if(wc(e.source,"/")){kc(e,1),Tc(e);continue}const r=vc(e,o);6===r.type&&r.value&&"class"===r.name&&(r.value.content=r.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(r),/^[^\t\r\n\f />]/.test(e.source),Tc(e)}return n}function vc(e,t){const n=Sc(e),o=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(o),t.add(o);{const e=/["'<]/g;let t;for(;t=e.exec(o););}let r;kc(e,o.length),/^[\t\r\n\f ]*=/.test(e.source)&&(Tc(e),kc(e,1),Tc(e),r=function(e){const t=Sc(e);let n;const o=e.source[0],r='"'===o||"'"===o;if(r){kc(e,1);const t=e.source.indexOf(o);-1===t?n=_c(e,e.source.length,4):(n=_c(e,t,4),kc(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const o=/["'<=`]/g;let r;for(;r=o.exec(t[0]););n=_c(e,t[0].length,4)}return{content:n,isQuoted:r,loc:xc(e,t)}}(e));const s=xc(e,n);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(o)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(o);let i,l=wc(o,"."),c=t[1]||(l||wc(o,":")?"bind":wc(o,"@")?"on":"slot");if(t[2]){const r="slot"===c,s=o.lastIndexOf(t[2]),l=xc(e,Nc(e,n,s),Nc(e,n,s+t[2].length+(r&&t[3]||"").length));let a=t[2],u=!0;a.startsWith("[")?(u=!1,a=a.endsWith("]")?a.slice(1,a.length-1):a.slice(1)):r&&(a+=t[3]||""),i={type:4,content:a,isStatic:u,constType:u?3:0,loc:l}}if(r&&r.isQuoted){const e=r.loc;e.start.offset++,e.start.column++,e.end=Dl(e.start,r.content),e.source=e.source.slice(1,-1)}const a=t[3]?t[3].slice(1).split("."):[];return l&&a.push("prop"),{type:7,name:c,exp:r&&{type:4,content:r.content,isStatic:!1,constType:0,loc:r.loc},arg:i,modifiers:a,loc:s}}return!e.inVPre&&wc(o,"v-"),{type:6,name:o,value:r&&{type:2,content:r.content,loc:r.loc},loc:s}}function yc(e,t){const[n,o]=e.options.delimiters,r=e.source.indexOf(o,n.length);if(-1===r)return;const s=Sc(e);kc(e,n.length);const i=Sc(e),l=Sc(e),c=r-n.length,a=e.source.slice(0,c),u=_c(e,c,t),p=u.trim(),f=u.indexOf(p);f>0&&Hl(i,a,f);return Hl(l,a,c-(u.length-p.length-f)),kc(e,o.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:p,loc:xc(e,i,l)},loc:xc(e,s)}}function bc(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let o=e.source.length;for(let s=0;s<n.length;s++){const t=e.source.indexOf(n[s],1);-1!==t&&o>t&&(o=t)}const r=Sc(e);return{type:2,content:_c(e,o,t),loc:xc(e,r)}}function _c(e,t,n){const o=e.source.slice(0,t);return kc(e,t),2!==n&&3!==n&&o.includes("&")?e.options.decodeEntities(o,4===n):o}function Sc(e){const{column:t,line:n,offset:o}=e;return{column:t,line:n,offset:o}}function xc(e,t,n){return{start:t,end:n=n||Sc(e),source:e.originalSource.slice(t.offset,n.offset)}}function Cc(e){return e[e.length-1]}function wc(e,t){return e.startsWith(t)}function kc(e,t){const{source:n}=e;Hl(e,n,t),e.source=n.slice(t)}function Tc(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&kc(e,t[0].length)}function Nc(e,t,n){return Dl(t,e.originalSource.slice(t.offset,n),n)}function Ec(e,t,n){const o=e.source;switch(t){case 0:if(wc(o,"</"))for(let e=n.length-1;e>=0;--e)if($c(o,n[e].tag))return!0;break;case 1:case 2:{const e=Cc(n);if(e&&$c(o,e.tag))return!0;break}case 3:if(wc(o,"]]>"))return!0}return!o}function $c(e,t){return wc(e,"</")&&e.slice(2,2+t.length).toLowerCase()===t.toLowerCase()&&/[\t\r\n\f />]/.test(e[2+t.length]||">")}function Oc(e,t){Rc(e,t,Fc(e,e.children[0]))}function Fc(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!Yl(t)}function Rc(e,t,n=!1){const{children:o}=e,r=o.length;let s=0;for(let i=0;i<o.length;i++){const e=o[i];if(1===e.type&&0===e.tagType){const o=n?0:Ac(e,t);if(o>0){if(o>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),s++;continue}}else{const n=e.codegenNode;if(13===n.type){const o=Bc(n);if((!o||512===o||1===o)&&Vc(e,t)>=2){const o=Ic(e);o&&(n.props=t.hoist(o))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}else 12===e.type&&Ac(e.content,t)>=2&&(e.codegenNode=t.hoist(e.codegenNode),s++);if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,Rc(e,t),n&&t.scopes.vSlot--}else if(11===e.type)Rc(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)Rc(e.branches[n],t,1===e.branches[n].children.length)}s&&t.transformHoist&&t.transformHoist(o,t,e),s&&s===r&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&N(e.codegenNode.children)&&(e.codegenNode.children=t.hoist(wl(e.codegenNode.children)))}function Ac(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(Bc(r))return n.set(e,0),0;{let o=3;const s=Vc(e,t);if(0===s)return n.set(e,0),0;s<o&&(o=s);for(let r=0;r<e.children.length;r++){const s=Ac(e.children[r],t);if(0===s)return n.set(e,0),0;s<o&&(o=s)}if(o>1)for(let r=0;r<e.props.length;r++){const s=e.props[r];if(7===s.type&&"bind"===s.name&&s.exp){const r=Ac(s.exp,t);if(0===r)return n.set(e,0),0;r<o&&(o=r)}}if(r.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(Ui),t.removeHelper(Ql(t.inSSR,r.isComponent)),r.isBlock=!1,t.helper(Zl(t.inSSR,r.isComponent))}return n.set(e,o),o}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return Ac(e.content,t);case 4:return e.constType;case 8:let s=3;for(let n=0;n<e.children.length;n++){const o=e.children[n];if(R(o)||A(o))continue;const r=Ac(o,t);if(0===r)return 0;r<s&&(s=r)}return s}}const Pc=new Set([sl,il,ll,cl]);function Mc(e,t){if(14===e.type&&!R(e.callee)&&Pc.has(e.callee)){const n=e.arguments[0];if(4===n.type)return Ac(n,t);if(14===n.type)return Mc(n,t)}return 0}function Vc(e,t){let n=3;const o=Ic(e);if(o&&15===o.type){const{properties:e}=o;for(let o=0;o<e.length;o++){const{key:r,value:s}=e[o],i=Ac(r,t);if(0===i)return i;let l;if(i<n&&(n=i),l=4===s.type?Ac(s,t):14===s.type?Mc(s,t):0,0===l)return l;l<n&&(n=l)}}return n}function Ic(e){const t=e.codegenNode;if(13===t.type)return t.props}function Bc(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function Lc(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:o=!1,cacheHandlers:r=!1,nodeTransforms:s=[],directiveTransforms:i={},transformHoist:l=null,isBuiltInComponent:c=y,isCustomElement:a=y,expressionPlugins:u=[],scopeId:p=null,slotted:f=!0,ssr:d=!1,inSSR:h=!1,ssrCssVars:m="",bindingMetadata:v=g,inline:b=!1,isTS:_=!1,onError:S=Ai,onWarn:x=Pi,compatConfig:C}){const w=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),k={selfName:w&&G(W(w[1])),prefixIdentifiers:n,hoistStatic:o,cacheHandlers:r,nodeTransforms:s,directiveTransforms:i,transformHoist:l,isBuiltInComponent:c,isCustomElement:a,expressionPlugins:u,scopeId:p,slotted:f,ssr:d,inSSR:h,ssrCssVars:m,bindingMetadata:v,inline:b,isTS:_,onError:S,onWarn:x,compatConfig:C,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new Map,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=k.helpers.get(e)||0;return k.helpers.set(e,t+1),e},removeHelper(e){const t=k.helpers.get(e);if(t){const n=t-1;n?k.helpers.set(e,n):k.helpers.delete(e)}},helperString:e=>`_${Sl[k.helper(e)]}`,replaceNode(e){k.parent.children[k.childIndex]=k.currentNode=e},removeNode(e){const t=e?k.parent.children.indexOf(e):k.currentNode?k.childIndex:-1;e&&e!==k.currentNode?k.childIndex>t&&(k.childIndex--,k.onNodeRemoved()):(k.currentNode=null,k.onNodeRemoved()),k.parent.children.splice(t,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){R(e)&&(e=Nl(e)),k.hoists.push(e);const t=Nl(`_hoisted_${k.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:xl}}(k.cached++,e,t)};return k}function jc(e,t){const n=Lc(e,t);Uc(e,n),t.hoistStatic&&Oc(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(Fc(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&oc(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=Cl(t,n(Vi),void 0,e.children,o+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=[...n.helpers.keys()],e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached}function Uc(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let s=0;s<n.length;s++){const r=n[s](e,t);if(r&&(N(r)?o.push(...r):o.push(r)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(Ki);break;case 5:t.ssr||t.helper(ol);break;case 9:for(let n=0;n<e.branches.length;n++)Uc(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];R(r)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=o,Uc(r,t))}}(e,t)}t.currentNode=e;let r=o.length;for(;r--;)o[r]()}function Dc(e,t){const n=R(e)?t=>t===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(ql))return;const s=[];for(let i=0;i<r.length;i++){const l=r[i];if(7===l.type&&n(l.name)){r.splice(i,1),i--;const n=t(e,l,o);n&&s.push(n)}}return s}}}const Hc="/*#__PURE__*/",Wc=e=>`${Sl[e]}: _${Sl[e]}`;function zc(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:p=!1,inSSR:f=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:p,inSSR:f,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${Sl[e]}`,push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:c,ssr:a}=n,u=e.helpers.length>0,p=!s&&"module"!==o;!function(e,t){const{push:n,newline:o,runtimeGlobalName:r}=t,s=r;if(e.helpers.length>0&&(n(`const _Vue = ${s}\n`),e.hoists.length)){n(`const { ${[Wi,zi,Ki,Gi,qi].filter((t=>e.helpers.includes(t))).map(Wc).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r<e.length;r++){const s=e[r];s&&(n(`const _hoisted_${r+1} = `),Jc(s,t),o())}t.pure=!1})(e.hoists,t),o(),n("return ")}(e,n);if(r(`function ${a?"ssrRender":"render"}(${(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),i(),p&&(r("with (_ctx) {"),i(),u&&(r(`const { ${e.helpers.map(Wc).join(", ")} } = _Vue`),r("\n"),c())),e.components.length&&(Kc(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Kc(e.directives,"directive",n),e.temps>0&&c()),e.temps>0){r("let ");for(let t=0;t<e.temps;t++)r(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n"),c()),a||r("return "),e.codegenNode?Jc(e.codegenNode,n):r("null"),p&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Kc(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("component"===t?Ji:Zi);for(let l=0;l<e.length;l++){let n=e[l];const c=n.endsWith("__self");c&&(n=n.slice(0,-6)),o(`const ${nc(n,t)} = ${i}(${JSON.stringify(n)}${c?", true":""})${s?"!":""}`),l<e.length-1&&r()}}function Gc(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),qc(e,t,n),n&&t.deindent(),t.push("]")}function qc(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;i<e.length;i++){const l=e[i];R(l)?r(l):N(l)?Gc(l,t):Jc(l,t),i<e.length-1&&(n?(o&&r(","),s()):o&&r(", "))}}function Jc(e,t){if(R(e))t.push(e);else if(A(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:Jc(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),e)}(e,t);break;case 4:Yc(e,t);break;case 5:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n(Hc);n(`${o(ol)}(`),Jc(e.content,t),n(")")}(e,t);break;case 8:Zc(e,t);break;case 3:!function(e,t){const{push:n,helper:o,pure:r}=t;r&&n(Hc);n(`${o(Ki)}(${JSON.stringify(e.content)})`,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:o,pure:r}=t,{tag:s,props:i,children:l,patchFlag:c,dynamicProps:a,directives:u,isBlock:p,disableTracking:f,isComponent:d}=e;u&&n(o(Xi)+"(");p&&n(`(${o(Ui)}(${f?"true":""}), `);r&&n(Hc);const h=p?Ql(t.inSSR,d):Zl(t.inSSR,d);n(o(h)+"(",e),qc(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([s,i,l,c,a]),t),n(")"),p&&n(")");u&&(n(", "),Jc(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=R(e.callee)?e.callee:o(e.callee);r&&n(Hc);n(s+"(",e),qc(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let c=0;c<i.length;c++){const{key:e,value:o}=i[c];Qc(e,t),n(": "),Jc(o,t),c<i.length-1&&(n(","),s())}l&&r(),n(l?"}":" }")}(e,t);break;case 17:!function(e,t){Gc(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:o,deindent:r}=t,{params:s,returns:i,body:l,newline:c,isSlot:a}=e;a&&n(`_${Sl[gl]}(`);n("(",e),N(s)?qc(s,t):s&&Jc(s,t);n(") => "),(c||l)&&(n("{"),o());i?(c&&n("return "),N(i)?Gc(i,t):Jc(i,t)):l&&Jc(l,t);(c||l)&&(r(),n("}"));a&&n(")")}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!Vl(n.content);e&&i("("),Yc(n,t),e&&i(")")}else i("("),Jc(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),Jc(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const u=19===r.type;u||t.indentLevel++;Jc(r,t),u||t.indentLevel--;s&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(dl)}(-1),`),i());n(`_cache[${e.index}] = `),Jc(e.value,t),e.isVNode&&(n(","),i(),n(`${o(dl)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:qc(e.body,t,!0,!1)}}function Yc(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,e)}function Zc(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];R(o)?t.push(o):Jc(o,t)}}function Qc(e,t){const{push:n}=t;if(8===e.type)n("["),Zc(e,t),n("]");else if(e.isStatic){n(Vl(e.content)?e.content:JSON.stringify(e.content),e)}else n(`[${e.content}]`,e)}const Xc=Dc(/^(if|else|else-if)$/,((e,t,n)=>function(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){t.exp=Nl("true",!1,t.exp?t.exp.loc:e.loc)}if("if"===t.name){const r=ea(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){n.removeNode();const r=ea(e,t);i.branches.push(r);const s=o&&o(i,r,!1);Uc(r,n),s&&s(),n.currentNode=null}break}n.removeNode(i)}}}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=ta(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=ta(t,i+e.branches.length-1,n)}}}))));function ea(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Wl(e,"for")?e.children:[e],userKey:zl(e,"key"),isTemplateIf:n}}function ta(e,t,n){return e.condition?Fl(e.condition,na(e,t,n),$l(n.helper(Ki),['""',"true"])):na(e,t,n)}function na(e,t,n){const{helper:o}=n,r=Tl("key",Nl(`${t}`,!1,xl,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return tc(e,r,n),e}{let t=64;return Cl(n,o(Vi),kl([r]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===bl?l.arguments[1].returns:l;return 13===t.type&&oc(t,n),tc(t,r,n),e}var l}const oa=Dc("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return;const r=la(t.exp);if(!r)return;const{scopes:s}=n,{source:i,value:l,key:c,index:a}=r,u={type:11,loc:t.loc,source:i,valueAlias:l,keyAlias:c,objectIndexAlias:a,parseResult:r,children:Jl(e)?e.children:[e]};n.replaceNode(u),s.vFor++;const p=o&&o(u);return()=>{s.vFor--,p&&p()}}(e,t,n,(t=>{const s=$l(o(el),[t.source]),i=Jl(e),l=Wl(e,"memo"),c=zl(e,"key"),a=c&&(6===c.type?Nl(c.value.content,!0):c.exp),u=c?Tl("key",a):null,p=4===t.source.type&&t.source.constType>0,f=p?64:c?128:256;return t.codegenNode=Cl(n,o(Vi),void 0,s,f+"",void 0,void 0,!0,!p,!1,e.loc),()=>{let c;const{children:f}=t,d=1!==f.length||1!==f[0].type,h=Yl(e)?e:i&&1===e.children.length&&Yl(e.children[0])?e.children[0]:null;if(h?(c=h.codegenNode,i&&u&&tc(c,u,n)):d?c=Cl(n,o(Vi),u?kl([u]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=f[0].codegenNode,i&&u&&tc(c,u,n),c.isBlock!==!p&&(c.isBlock?(r(Ui),r(Ql(n.inSSR,c.isComponent))):r(Zl(n.inSSR,c.isComponent))),c.isBlock=!p,c.isBlock?(o(Ui),o(Ql(n.inSSR,c.isComponent))):o(Zl(n.inSSR,c.isComponent))),l){const e=Ol(aa(t.parseResult,[Nl("_cached")]));e.body={type:21,body:[El(["const _memo = (",l.exp,")"]),El(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(_l)}(_cached, _memo)) return _cached`]),El(["const _item = ",c]),Nl("_item.memo = _memo"),Nl("return _item")],loc:xl},s.arguments.push(e,Nl("_cache"),Nl(String(n.cached++)))}else s.arguments.push(Ol(aa(t.parseResult),c,!0))}}))}));const ra=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,sa=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ia=/^\(|\)$/g;function la(e,t){const n=e.loc,o=e.content,r=o.match(ra);if(!r)return;const[,s,i]=r,l={source:ca(n,i.trim(),o.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let c=s.trim().replace(ia,"").trim();const a=s.indexOf(c),u=c.match(sa);if(u){c=c.replace(sa,"").trim();const e=u[1].trim();let t;if(e&&(t=o.indexOf(e,a+c.length),l.key=ca(n,e,t)),u[2]){const r=u[2].trim();r&&(l.index=ca(n,r,o.indexOf(r,l.key?t+e.length:a+c.length)))}}return c&&(l.value=ca(n,c,a)),l}function ca(e,t,n){return Nl(t,!1,Ul(e,n,t.length))}function aa({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Nl("_".repeat(t+1),!1)))}([e,t,n,...o])}const ua=Nl("undefined",!1),pa=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Wl(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},fa=(e,t,n)=>Ol(e,t,!1,!0,t.length?t[0].loc:n);function da(e,t,n=fa){t.helper(gl);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=Wl(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!Rl(e)&&(l=!0),s.push(Tl(e||Nl("default",!0),n(t,o,r)))}let a=!1,u=!1;const p=[],f=new Set;for(let m=0;m<o.length;m++){const e=o[m];let r;if(!Jl(e)||!(r=Wl(e,"slot",!0))){3!==e.type&&p.push(e);continue}if(c)break;a=!0;const{children:d,loc:h}=e,{arg:g=Nl("default",!0),exp:v}=r;let y;Rl(g)?y=g?g.content:"default":l=!0;const b=n(v,d,h);let _,S,x;if(_=Wl(e,"if"))l=!0,i.push(Fl(_.exp,ha(g,b),ua));else if(S=Wl(e,/^else(-if)?$/,!0)){let e,t=m;for(;t--&&(e=o[t],3===e.type););if(e&&Jl(e)&&Wl(e,"if")){o.splice(m,1),m--;let e=i[i.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=S.exp?Fl(S.exp,ha(g,b),ua):ha(g,b)}}else if(x=Wl(e,"for")){l=!0;const e=x.parseResult||la(x.exp);e&&i.push($l(t.helper(el),[e.source,Ol(aa(e),ha(g,b),!0)]))}else{if(y){if(f.has(y))continue;f.add(y),"default"===y&&(u=!0)}s.push(Tl(g,b))}}if(!c){const e=(e,t)=>Tl("default",n(e,t,r));a?p.length&&p.some((e=>ga(e)))&&(u||s.push(e(void 0,p))):s.push(e(void 0,o))}const d=l?2:ma(e.children)?3:1;let h=kl(s.concat(Tl("_",Nl(d+"",!1))),r);return i.length&&(h=$l(t.helper(nl),[h,wl(i)])),{slots:h,hasDynamicSlots:l}}function ha(e,t){return kl([Tl("name",e),Tl("fn",t)])}function ma(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||ma(n.children))return!0;break;case 9:if(ma(n.branches))return!0;break;case 10:case 11:if(ma(n.children))return!0}}return!1}function ga(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():ga(e.content))}const va=new WeakMap,ya=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=xa(o),s=zl(e,"is");if(s)if(r){const e=6===s.type?s.value&&Nl(s.value.content,!0):s.exp;if(e)return $l(t.helper(Yi),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=!r&&Wl(e,"is");if(i&&i.exp)return $l(t.helper(Yi),[i.exp]);const l=Pl(o)||t.isBuiltInComponent(o);if(l)return n||t.helper(l),l;return t.helper(Ji),t.components.add(o),nc(o,"component")}(e,t):`"${n}"`;const i=P(s)&&s.callee===Yi;let l,c,a,u,p,f,d=0,h=i||s===Ii||s===Bi||!r&&("svg"===n||"foreignObject"===n);if(o.length>0){const n=ba(e,t,void 0,r,i);l=n.props,d=n.patchFlag,p=n.dynamicPropNames;const o=n.directives;f=o&&o.length?wl(o.map((e=>function(e,t){const n=[],o=va.get(e);o?n.push(t.helperString(o)):(t.helper(Zi),t.directives.add(e.name),n.push(nc(e.name,"directive")));const{loc:r}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Nl("true",!1,r);n.push(kl(e.modifiers.map((e=>Tl(e,t))),r))}return wl(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===Li&&(h=!0,d|=1024);if(r&&s!==Ii&&s!==Li){const{slots:n,hasDynamicSlots:o}=da(e,t);c=n,o&&(d|=1024)}else if(1===e.children.length&&s!==Ii){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Ac(n,t)&&(d|=1),c=r||2===o?n:e.children}else c=e.children}0!==d&&(a=String(d),p&&p.length&&(u=function(e){let t="[";for(let n=0,o=e.length;n<o;n++)t+=JSON.stringify(e[n]),n<o-1&&(t+=", ");return t+"]"}(p))),e.codegenNode=Cl(t,s,l,c,a,u,f,!!h,!1,r,e.loc)};function ba(e,t,n=e.props,o,r,s=!1){const{tag:i,loc:l,children:c}=e;let a=[];const u=[],p=[],f=c.length>0;let d=!1,h=0,m=!1,g=!1,v=!1,y=!1,b=!1,_=!1;const x=[],C=({key:e,value:n})=>{if(Rl(e)){const s=e.content,i=S(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||j(s)||(y=!0),i&&j(s)&&(_=!0),20===n.type||(4===n.type||8===n.type)&&Ac(n,t)>0)return;"ref"===s?m=!0:"class"===s?g=!0:"style"===s?v=!0:"key"===s||x.includes(s)||x.push(s),!o||"class"!==s&&"style"!==s||x.includes(s)||x.push(s)}else b=!0};for(let S=0;S<n.length;S++){const o=n[S];if(6===o.type){const{loc:e,name:n,value:r}=o;let s=!0;if("ref"===n&&(m=!0,t.scopes.vFor>0&&a.push(Tl(Nl("ref_for",!0),Nl("true")))),"is"===n&&(xa(i)||r&&r.content.startsWith("vue:")))continue;a.push(Tl(Nl(n,!0,Ul(e,0,n.length)),Nl(r?r.content:"",s,r?r.loc:e)))}else{const{name:n,arg:r,exp:c,loc:h}=o,m="bind"===n,g="on"===n;if("slot"===n)continue;if("once"===n||"memo"===n)continue;if("is"===n||m&&Kl(r,"is")&&xa(i))continue;if(g&&s)continue;if((m&&Kl(r,"key")||g&&f&&Kl(r,"vue:before-update"))&&(d=!0),m&&Kl(r,"ref")&&t.scopes.vFor>0&&a.push(Tl(Nl("ref_for",!0),Nl("true"))),!r&&(m||g)){b=!0,c&&(a.length&&(u.push(kl(_a(a),l)),a=[]),u.push(m?c:{type:14,loc:h,callee:t.helper(al),arguments:[c]}));continue}const v=t.directiveTransforms[n];if(v){const{props:n,needRuntime:r}=v(o,e,t);!s&&n.forEach(C),a.push(...n),r&&(p.push(o),A(r)&&va.set(o,r))}else U(n)||(p.push(o),f&&(d=!0))}}let w;if(u.length?(a.length&&u.push(kl(_a(a),l)),w=u.length>1?$l(t.helper(rl),u,l):u[0]):a.length&&(w=kl(_a(a),l)),b?h|=16:(g&&!o&&(h|=2),v&&!o&&(h|=4),x.length&&(h|=8),y&&(h|=32)),d||0!==h&&32!==h||!(m||_||p.length>0)||(h|=512),!t.inSSR&&w)switch(w.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t<w.properties.length;t++){const r=w.properties[t].key;Rl(r)?"class"===r.content?e=t:"style"===r.content&&(n=t):r.isHandlerKey||(o=!0)}const r=w.properties[e],s=w.properties[n];o?w=$l(t.helper(ll),[w]):(r&&!Rl(r.value)&&(r.value=$l(t.helper(sl),[r.value])),s&&(v||4===s.value.type&&"["===s.value.content.trim()[0]||17===s.value.type)&&(s.value=$l(t.helper(il),[s.value])));break;case 14:break;default:w=$l(t.helper(ll),[$l(t.helper(cl),[w])])}return{props:w,directives:p,patchFlag:h,dynamicPropNames:x,shouldUseBlock:d}}function _a(e){const t=new Map,n=[];for(let o=0;o<e.length;o++){const r=e[o];if(8===r.key.type||!r.key.isStatic){n.push(r);continue}const s=r.key.content,i=t.get(s);i?("style"===s||"class"===s||S(s))&&Sa(i,r):(t.set(s,r),n.push(r))}return n}function Sa(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=wl([e.value,t.value],e.loc)}function xa(e){return"component"===e||"Component"===e}const Ca=(e,t)=>{if(Yl(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let s=0;s<e.props.length;s++){const t=e.props[s];6===t.type?t.value&&("name"===t.name?o=JSON.stringify(t.value.content):(t.name=W(t.name),r.push(t))):"bind"===t.name&&Kl(t.arg,"name")?t.exp&&(o=t.exp):("bind"===t.name&&t.arg&&Rl(t.arg)&&(t.arg.content=W(t.arg.content)),r.push(t))}if(r.length>0){const{props:o,directives:s}=ba(e,t,r,!1,!1);n=o}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=Ol([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=$l(t.helper(tl),i,o)}};const wa=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ka=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let l;if(4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),l=Nl(q(W(e)),!0,i.loc)}else l=El([`${n.helperString(fl)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(fl)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=jl(c.content),t=!(e||wa.test(c.content)),n=c.content.includes(";");(t||a&&e)&&(c=El([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[Tl(l,c||Nl("() => {}",!1,r))]};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},Ta=(e,t,n)=>{const{exp:o,modifiers:r,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),r.includes("camel")&&(4===i.type?i.content=i.isStatic?W(i.content):`${n.helperString(ul)}(${i.content})`:(i.children.unshift(`${n.helperString(ul)}(`),i.children.push(")"))),n.inSSR||(r.includes("prop")&&Na(i,"."),r.includes("attr")&&Na(i,"^")),!o||4===o.type&&!o.content.trim()?{props:[Tl(i,Nl("",!0,s))]}:{props:[Tl(i,o)]}},Na=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Ea=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e<n.length;e++){const t=n[e];if(Gl(t)){r=!0;for(let r=e+1;r<n.length;r++){const s=n[r];if(!Gl(s)){o=void 0;break}o||(o=n[e]=El([t],t.loc)),o.children.push(" + ",s),n.splice(r,1),r--}}}if(r&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name])))))for(let e=0;e<n.length;e++){const o=n[e];if(Gl(o)||8===o.type){const r=[];2===o.type&&" "===o.content||r.push(o),t.ssr||0!==Ac(o,t)||r.push("1"),n[e]={type:12,content:o,loc:o.loc,codegenNode:$l(t.helper(Gi),r)}}}}},$a=new WeakSet,Oa=(e,t)=>{if(1===e.type&&Wl(e,"once",!0)){if($a.has(e)||t.inVOnce)return;return $a.add(e),t.inVOnce=!0,t.helper(dl),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},Fa=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return Ra();const s=o.loc.source,i=4===o.type?o.content:s;if(!i.trim()||!jl(i))return Ra();const l=r||Nl("modelValue",!0),c=r?Rl(r)?`onUpdate:${r.content}`:El(['"onUpdate:" + ',r]):"onUpdate:modelValue";let a;a=El([`${n.isTS?"($event: any)":"$event"} => ((`,o,") = $event)"]);const u=[Tl(l,e.exp),Tl(c,a)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Vl(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?Rl(r)?`${r.content}Modifiers`:El([r,' + "Modifiers"']):"modelModifiers";u.push(Tl(n,Nl(`{ ${t} }`,!1,e.loc,2)))}return Ra(u)};function Ra(e=[]){return{props:e}}const Aa=new WeakSet,Pa=(e,t)=>{if(1===e.type){const n=Wl(e,"memo");if(!n||Aa.has(e))return;return Aa.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&oc(o,t),e.codegenNode=$l(t.helper(bl),[n.exp,Ol(void 0,o),"_cache",String(t.cached++)]))}}};function Ma(e,t={}){const n=t.onError||Ai,o="module"===t.mode;!0===t.prefixIdentifiers?n(Mi(46)):o&&n(Mi(47));t.cacheHandlers&&n(Mi(48)),t.scopeId&&!o&&n(Mi(49));const r=R(e)?lc(e,t):e,[s,i]=[[Oa,Xc,Pa,oa,Ca,ya,pa,Ea],{on:ka,bind:Ta,model:Fa}];return jc(r,C({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:C({},i,t.directiveTransforms||{})})),zc(r,C({},t,{prefixIdentifiers:false}))}const Va=Symbol(""),Ia=Symbol(""),Ba=Symbol(""),La=Symbol(""),ja=Symbol(""),Ua=Symbol(""),Da=Symbol(""),Ha=Symbol(""),Wa=Symbol(""),za=Symbol("");var Ka;let Ga;Ka={[Va]:"vModelRadio",[Ia]:"vModelCheckbox",[Ba]:"vModelText",[La]:"vModelSelect",[ja]:"vModelDynamic",[Ua]:"withModifiers",[Da]:"withKeys",[Ha]:"vShow",[Wa]:"Transition",[za]:"TransitionGroup"},Object.getOwnPropertySymbols(Ka).forEach((e=>{Sl[e]=Ka[e]}));const qa=t("style,iframe,script,noscript",!0),Ja={isVoidTag:f,isNativeTag:e=>u(e)||p(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return Ga||(Ga=document.createElement("div")),t?(Ga.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Ga.children[0].getAttribute("foo")):(Ga.innerHTML=e,Ga.textContent)},isBuiltInComponent:e=>Al(e,"Transition")?Wa:Al(e,"TransitionGroup")?za:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(qa(e))return 2}return 0}},Ya=(e,t)=>{const n=c(e);return Nl(JSON.stringify(n),!1,t,3)};const Za=t("passive,once,capture"),Qa=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Xa=t("left,right"),eu=t("onkeyup,onkeydown,onkeypress",!0),tu=(e,t)=>Rl(e)&&"onclick"===e.content.toLowerCase()?Nl(t,!0):4!==e.type?El(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,nu=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},ou=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Nl("style",!0,t.loc),exp:Ya(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],ru={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[Tl(Nl("innerHTML",!0,r),o||Nl("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return t.children.length&&(t.children.length=0),{props:[Tl(Nl("textContent",!0),o?Ac(o,n)>0?o:$l(n.helperString(ol),[o],r):Nl("",!0))]}},model:(e,t,n)=>{const o=Fa(e,t,n);if(!o.props.length||1===t.tagType)return o;const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let e=Ba,i=!1;if("input"===r||s){const n=zl(t,"type");if(n){if(7===n.type)e=ja;else if(n.value)switch(n.value.content){case"radio":e=Va;break;case"checkbox":e=Ia;break;case"file":i=!0}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(e=ja)}else"select"===r&&(e=La);i||(o.needRuntime=n.helper(e))}return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>ka(e,0,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n,o)=>{const r=[],s=[],i=[];for(let l=0;l<t.length;l++){const n=t[l];Za(n)?i.push(n):Xa(n)?Rl(e)?eu(e.content)?r.push(n):s.push(n):(r.push(n),s.push(n)):Qa(n)?s.push(n):r.push(n)}return{keyModifiers:r,nonKeyModifiers:s,eventOptionModifiers:i}})(r,o);if(l.includes("right")&&(r=tu(r,"onContextmenu")),l.includes("middle")&&(r=tu(r,"onMouseup")),l.length&&(s=$l(n.helper(Ua),[s,JSON.stringify(l)])),!i.length||Rl(r)&&!eu(r.content)||(s=$l(n.helper(Da),[s,JSON.stringify(i)])),c.length){const e=c.map(G).join("");r=Rl(r)?Nl(`${r.content}${e}`,!0):El(["(",r,`) + "${e}"`])}return{props:[Tl(r,s)]}})),show:(e,t,n)=>({props:[],needRuntime:n.helper(Ha)})};const su=Object.create(null);function iu(e,t){if(!R(e)){if(!e.nodeType)return y;e=e.innerHTML}const n=e,o=su[n];if(o)return o;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const{code:r}=function(e,t={}){return Ma(e,C({},Ja,t,{nodeTransforms:[nu,...ou,...t.nodeTransforms||[]],directiveTransforms:C({},ru,t.directiveTransforms||{}),transformHoist:null}))}(e,C({hoistStatic:!0,onError:void 0,onWarn:y},t)),s=new Function(r)();return s._rc=!0,su[n]=s}return ts(iu),e.BaseTransition=Un,e.Comment=br,e.EffectScope=te,e.Fragment=vr,e.KeepAlive=Qn,e.ReactiveEffect=fe,e.Static=_r,e.Suspense=wn,e.Teleport=gr,e.Text=yr,e.Transition=Bs,e.TransitionGroup=ni,e.VueElement=As,e.callWithAsyncErrorHandling=Lt,e.callWithErrorHandling=Bt,e.camelize=W,e.capitalize=G,e.cloneVNode=Ir,e.compatUtils=null,e.compile=iu,e.computed=cs,e.createApp=(...e)=>{const t=Ni().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Fi(e);if(!o)return;const r=t._component;F(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},e.createBlock=Er,e.createCommentVNode=function(e="",t=!1){return t?(Cr(),Er(br,null,e)):Mr(br,null,e)},e.createElementBlock=function(e,t,n,o,r,s){return Nr(Pr(e,t,n,o,r,s,!0))},e.createElementVNode=Pr,e.createHydrationRenderer=cr,e.createPropsRestProxy=function(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n},e.createRenderer=lr,e.createSSRApp=(...e)=>{const t=Ei().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Fi(e);if(t)return n(t,!0,t instanceof SVGElement)},t},e.createSlots=function(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(N(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.fn)}return e},e.createStaticVNode=function(e,t){const n=Mr(_r,null,e);return n.staticCount=t,n},e.createTextVNode=Br,e.createVNode=Mr,e.customRef=function(e){return new Ft(e)},e.defineAsyncComponent=function(e){F(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const p=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,p()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return qn({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return c},setup(){const e=Kr;if(c)return()=>Yn(c,e);const t=t=>{a=null,jt(t,e,13,!o)};if(i&&e.suspense)return p().then((t=>()=>Yn(t,e))).catch((e=>(t(e),()=>o?Mr(o,{error:e}):null)));const l=kt(!1),u=kt(),f=kt(!!r);return r&&setTimeout((()=>{f.value=!1}),r),null!=s&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),p().then((()=>{l.value=!0,e.parent&&Zn(e.parent.vnode)&&tn(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?Yn(c,e):u.value&&o?Mr(o,{error:u.value}):n&&!f.value?Mr(n):void 0}})},e.defineComponent=qn,e.defineCustomElement=Fs,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=e=>Fs(e,Oi),e.effect=function(e,t){e.effect&&(e=e.effect.fn);const n=new fe(e);t&&(C(n,t),t.scope&&ne(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o},e.effectScope=function(e){return new te(e)},e.getCurrentInstance=Gr,e.getCurrentScope=function(){return ee},e.getTransitionRawChildren=Gn,e.guardReactiveProps=Vr,e.h=us,e.handleError=jt,e.hydrate=Oi,e.initCustomFormatter=function(){},e.initDirectivesForSSR=Ri,e.inject=Fn,e.isMemoSame=fs,e.isProxy=vt,e.isReactive=ht,e.isReadonly=mt,e.isRef=wt,e.isRuntimeOnly=()=>!Zr,e.isShallow=gt,e.isVNode=$r,e.markRaw=bt,e.mergeDefaults=function(e,t){const n=N(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const o in t){const e=n[o];e?N(e)||F(e)?n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(n[o]={default:t[o]})}return n},e.mergeProps=Dr,e.nextTick=en,e.normalizeClass=a,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!R(t)&&(e.class=a(t)),n&&(e.style=s(n)),e},e.normalizeStyle=s,e.onActivated=eo,e.onBeforeMount=co,e.onBeforeUnmount=fo,e.onBeforeUpdate=uo,e.onDeactivated=to,e.onErrorCaptured=yo,e.onMounted=ao,e.onRenderTracked=vo,e.onRenderTriggered=go,e.onScopeDispose=function(e){ee&&ee.cleanups.push(e)},e.onServerPrefetch=mo,e.onUnmounted=ho,e.onUpdated=po,e.openBlock=Cr,e.popScopeId=function(){mn=null},e.provide=On,e.proxyRefs=Ot,e.pushScopeId=function(e){mn=e},e.queuePostFlushCb=rn,e.reactive=ut,e.readonly=ft,e.ref=kt,e.registerRuntimeCompiler=ts,e.render=$i,e.renderList=function(e,t,n,o){let r;const s=n&&n[o];if(N(e)||R(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(P(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[o]=t(e[i],i,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r},e.renderSlot=function(e,t,n={},o,r){if(hn.isCE||hn.parent&&Jn(hn.parent)&&hn.parent.isCE)return Mr("slot","default"===t?null:{name:t},o&&o());let s=e[t];s&&s._c&&(s._d=!1),Cr();const i=s&&wo(s(n)),l=Er(vr,{key:n.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l},e.resolveComponent=function(e,t){return xo(_o,e,!0,t)||e},e.resolveDirective=function(e){return xo("directives",e)},e.resolveDynamicComponent=function(e){return R(e)?xo(_o,e,!1)||e:e||So},e.resolveFilter=null,e.resolveTransitionHooks=Hn,e.setBlockTracking=Tr,e.setDevtoolsHook=function t(n,o){var r,s;if(e.devtools=n,e.devtools)e.devtools.enabled=!0,un.forEach((({event:t,args:n})=>e.devtools.emit(t,...n))),un=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(s=null===(r=window.navigator)||void 0===r?void 0:r.userAgent)||void 0===s?void 0:s.includes("jsdom"))){(o.__VUE_DEVTOOLS_HOOK_REPLAY__=o.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{t(e,o)})),setTimeout((()=>{e.devtools||(o.__VUE_DEVTOOLS_HOOK_REPLAY__=null,un=[])}),3e3)}else un=[]},e.setTransitionHooks=Kn,e.shallowReactive=pt,e.shallowReadonly=function(e){return dt(e,!0,Ve,rt,ct)},e.shallowRef=function(e){return Tt(e,!0)},e.ssrContextKey=ps,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=e=>R(e)?e:null==e?"":N(e)||P(e)&&(e.toString===V||!F(e.toString))?JSON.stringify(e,m,2):String(e),e.toHandlerKey=q,e.toHandlers=function(e){const t={};for(const n in e)t[q(n)]=e[n];return t},e.toRaw=yt,e.toRef=At,e.toRefs=function(e){const t=N(e)?new Array(e.length):{};for(const n in e)t[n]=At(e,n);return t},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){Ct(e)},e.unref=Et,e.useAttrs=function(){return as().attrs},e.useCssModule=function(e="$style"){return g},e.useCssVars=function(e){const t=Gr();if(!t)return;const n=()=>Ps(t.subTree,e(t.proxy));Rn(n),ao((()=>{const e=new MutationObserver(n);e.observe(t.subTree.el.parentNode,{childList:!0}),ho((()=>e.disconnect()))}))},e.useSSRContext=()=>{},e.useSlots=function(){return as().slots},e.useTransitionState=Ln,e.vModelCheckbox=ui,e.vModelDynamic=vi,e.vModelRadio=fi,e.vModelSelect=di,e.vModelText=ai,e.vShow=xi,e.version=ds,e.warn=function(e,...t){ge();const n=Mt.length?Mt[Mt.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=function(){let e=Mt[Mt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}();if(o)Bt(o,n,11,[e+t.join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${ls(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=` at <${ls(e.component,e.type,!!e.component&&null==e.component.parent)}`,r=">"+n;return e.props?[o,...Vt(e.props),r]:[o+r]}(e))})),t}(r)),console.warn(...n)}ve()},e.watch=Pn,e.watchEffect=function(e,t){return Mn(e,null,t)},e.watchPostEffect=Rn,e.watchSyncEffect=function(e,t){return Mn(e,null,{flush:"sync"})},e.withAsyncContext=function(e){const t=Gr();let n=e();return Jr(),M(n)&&(n=n.catch((e=>{throw qr(t),e}))),[n,()=>qr(t)]},e.withCtx=vn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){const n=hn;if(null===n)return e;const o=rs(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,n,i,l=g]=t[s];F(e)&&(e={mounted:e,updated:e}),e.deep&&Bn(n),r.push({dir:e,instance:o,value:n,oldValue:void 0,arg:i,modifiers:l})}return e},e.withKeys=(e,t)=>n=>{if(!("key"in n))return;const o=K(n.key);return t.some((e=>e===o||Si[e]===o))?e(n):void 0},e.withMemo=function(e,t,n,o){const r=n[o];if(r&&fs(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s},e.withModifiers=(e,t)=>(n,...o)=>{for(let e=0;e<t.length;e++){const o=_i[t[e]];if(o&&o(n,t))return}return e(n,...o)},e.withScopeId=e=>vn,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var Vue=function(e){"use strict";function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},s=[],o=()=>{},r=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),p=Array.isArray,h=e=>"[object Map]"===x(e),f=e=>"[object Set]"===x(e),m=e=>"[object Date]"===x(e),g=e=>"function"==typeof e,v=e=>"string"==typeof e,y=e=>"symbol"==typeof e,b=e=>null!==e&&"object"==typeof e,_=e=>(b(e)||g(e))&&g(e.then)&&g(e.catch),S=Object.prototype.toString,x=e=>S.call(e),C=e=>x(e).slice(8,-1),k=e=>"[object Object]"===x(e),T=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),N=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),A=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},E=/-(\w)/g,I=A((e=>e.replace(E,((e,t)=>t?t.toUpperCase():"")))),R=/\B([A-Z])/g,O=A((e=>e.replace(R,"-$1").toLowerCase())),F=A((e=>e.charAt(0).toUpperCase()+e.slice(1))),L=A((e=>e?`on${F(e)}`:"")),M=(e,t)=>!Object.is(e,t),P=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},$=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},B=e=>{const t=parseFloat(e);return isNaN(t)?e:t},V=e=>{const t=v(e)?Number(e):NaN;return isNaN(t)?e:t};let D;const U=()=>D||(D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),j=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");function H(e){if(p(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=v(s)?z(s):H(s);if(o)for(const e in o)t[e]=o[e]}return t}if(v(e)||b(e))return e}const q=/;(?![^(]*\))/g,W=/:([^]+)/,K=/\/\*[^]*?\*\//g;function z(e){const t={};return e.replace(K,"").split(q).forEach((e=>{if(e){const n=e.split(W);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function G(e){let t="";if(v(e))t=e;else if(p(e))for(let n=0;n<e.length;n++){const s=G(e[n]);s&&(t+=s+" ")}else if(b(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const J=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),X=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),Q=t("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),Z=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),Y=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function ee(e){return!!e||""===e}function te(e,t){if(e===t)return!0;let n=m(e),s=m(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=y(e),s=y(t),n||s)return e===t;if(n=p(e),s=p(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=te(e[s],t[s]);return n}(e,t);if(n=b(e),s=b(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),o=t.hasOwnProperty(n);if(s&&!o||!s&&o||!te(e[n],t[n]))return!1}}return String(e)===String(t)}function ne(e,t){return e.findIndex((e=>te(e,t)))}const se=(e,t)=>t&&t.__v_isRef?se(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],s)=>(e[oe(t,s)+" =>"]=n,e)),{})}:f(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>oe(e)))}:y(t)?oe(t):!b(t)||p(t)||k(t)?t:String(t),oe=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let re,ie;class le{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=re,!e&&re&&(this.index=(re.scopes||(re.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=re;try{return re=this,e()}finally{re=t}}}on(){re=this}off(){re=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function ce(e,t=re){t&&t.active&&t.effects.push(e)}function ae(){return re}class ue{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,ce(this,s)}get dirty(){if(1===this._dirtyLevel){ye();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(de(t.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),be()}return this._dirtyLevel>=2}set dirty(e){this._dirtyLevel=e?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=me,t=ie;try{return me=!0,ie=this,this._runnings++,pe(this),this.fn()}finally{he(this),this._runnings--,ie=t,me=e}}stop(){var e;this.active&&(pe(this),he(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function de(e){return e.value}function pe(e){e._trackId++,e._depsLength=0}function he(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)fe(e.deps[t],e);e.deps.length=e._depsLength}}function fe(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}let me=!0,ge=0;const ve=[];function ye(){ve.push(me),me=!1}function be(){const e=ve.pop();me=void 0===e||e}function _e(){ge++}function Se(){for(ge--;!ge&&Ce.length;)Ce.shift()()}function xe(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&fe(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Ce=[];function ke(e,t,n){_e();for(const s of e.keys())if(s._dirtyLevel<t&&e.get(s)===s._trackId){const e=s._dirtyLevel;s._dirtyLevel=t,0===e&&(s._shouldSchedule=!0,s.trigger())}Te(e),Se()}function Te(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,Ce.push(t.scheduler))}const we=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Ne=new WeakMap,Ae=Symbol(""),Ee=Symbol("");function Ie(e,t,n){if(me&&ie){let t=Ne.get(e);t||Ne.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=we((()=>t.delete(n)))),xe(ie,s)}}function Re(e,t,n,s,o,r){const i=Ne.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&p(e)){const e=Number(s);i.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":p(e)?T(n)&&l.push(i.get("length")):(l.push(i.get(Ae)),h(e)&&l.push(i.get(Ee)));break;case"delete":p(e)||(l.push(i.get(Ae)),h(e)&&l.push(i.get(Ee)));break;case"set":h(e)&&l.push(i.get(Ae))}_e();for(const c of l)c&&ke(c,2);Se()}const Oe=t("__proto__,__v_isRef,__isVue"),Fe=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),Le=Me();function Me(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=kt(this);for(let t=0,o=this.length;t<o;t++)Ie(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(kt)):s}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){ye(),_e();const n=kt(this)[t].apply(this,e);return Se(),be(),n}})),e}function Pe(e){const t=kt(this);return Ie(t,0,e),t.hasOwnProperty(e)}class $e{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const s=this._isReadonly,o=this._shallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(s?o?mt:ft:o?ht:pt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=p(e);if(!s){if(r&&d(Le,t))return Reflect.get(Le,t,n);if("hasOwnProperty"===t)return Pe}const i=Reflect.get(e,t,n);return(y(t)?Fe.has(t):Oe(t))?i:(s||Ie(e,0,t),o?i:Rt(i)?r&&T(t)?i:i.value:b(i)?s?yt(i):gt(i):i)}}class Be extends $e{constructor(e=!1){super(!1,e)}set(e,t,n,s){let o=e[t];if(!this._shallow){const t=St(o);if(xt(n)||St(n)||(o=kt(o),n=kt(n)),!p(e)&&Rt(o)&&!Rt(n))return!t&&(o.value=n,!0)}const r=p(e)&&T(t)?Number(t)<e.length:d(e,t),i=Reflect.set(e,t,n,s);return e===kt(s)&&(r?M(n,o)&&Re(e,"set",t,n):Re(e,"add",t,n)),i}deleteProperty(e,t){const n=d(e,t),s=Reflect.deleteProperty(e,t);return s&&n&&Re(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return y(t)&&Fe.has(t)||Ie(e,0,t),n}ownKeys(e){return Ie(e,0,p(e)?"length":Ae),Reflect.ownKeys(e)}}class Ve extends $e{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const De=new Be,Ue=new Ve,je=new Be(!0),He=new Ve(!0),qe=e=>e,We=e=>Reflect.getPrototypeOf(e);function Ke(e,t,n=!1,s=!1){const o=kt(e=e.__v_raw),r=kt(t);n||(M(t,r)&&Ie(o,0,t),Ie(o,0,r));const{has:i}=We(o),l=s?qe:n?Nt:wt;return i.call(o,t)?l(e.get(t)):i.call(o,r)?l(e.get(r)):void(e!==o&&e.get(t))}function ze(e,t=!1){const n=this.__v_raw,s=kt(n),o=kt(e);return t||(M(e,o)&&Ie(s,0,e),Ie(s,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function Ge(e,t=!1){return e=e.__v_raw,!t&&Ie(kt(e),0,Ae),Reflect.get(e,"size",e)}function Je(e){e=kt(e);const t=kt(this);return We(t).has.call(t,e)||(t.add(e),Re(t,"add",e,e)),this}function Xe(e,t){t=kt(t);const n=kt(this),{has:s,get:o}=We(n);let r=s.call(n,e);r||(e=kt(e),r=s.call(n,e));const i=o.call(n,e);return n.set(e,t),r?M(t,i)&&Re(n,"set",e,t):Re(n,"add",e,t),this}function Qe(e){const t=kt(this),{has:n,get:s}=We(t);let o=n.call(t,e);o||(e=kt(e),o=n.call(t,e)),s&&s.call(t,e);const r=t.delete(e);return o&&Re(t,"delete",e,void 0),r}function Ze(){const e=kt(this),t=0!==e.size,n=e.clear();return t&&Re(e,"clear",void 0,void 0),n}function Ye(e,t){return function(n,s){const o=this,r=o.__v_raw,i=kt(r),l=t?qe:e?Nt:wt;return!e&&Ie(i,0,Ae),r.forEach(((e,t)=>n.call(s,l(e),l(t),o)))}}function et(e,t,n){return function(...s){const o=this.__v_raw,r=kt(o),i=h(r),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=o[e](...s),u=n?qe:t?Nt:wt;return!t&&Ie(r,0,c?Ee:Ae),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function tt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function nt(){const e={get(e){return Ke(this,e)},get size(){return Ge(this)},has:ze,add:Je,set:Xe,delete:Qe,clear:Ze,forEach:Ye(!1,!1)},t={get(e){return Ke(this,e,!1,!0)},get size(){return Ge(this)},has:ze,add:Je,set:Xe,delete:Qe,clear:Ze,forEach:Ye(!1,!0)},n={get(e){return Ke(this,e,!0)},get size(){return Ge(this,!0)},has(e){return ze.call(this,e,!0)},add:tt("add"),set:tt("set"),delete:tt("delete"),clear:tt("clear"),forEach:Ye(!0,!1)},s={get(e){return Ke(this,e,!0,!0)},get size(){return Ge(this,!0)},has(e){return ze.call(this,e,!0)},add:tt("add"),set:tt("set"),delete:tt("delete"),clear:tt("clear"),forEach:Ye(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=et(o,!1,!1),n[o]=et(o,!0,!1),t[o]=et(o,!1,!0),s[o]=et(o,!0,!0)})),[e,n,t,s]}const[st,ot,rt,it]=nt();function lt(e,t){const n=t?e?it:rt:e?ot:st;return(t,s,o)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(d(n,s)&&s in t?n:t,s,o)}const ct={get:lt(!1,!1)},at={get:lt(!1,!0)},ut={get:lt(!0,!1)},dt={get:lt(!0,!0)},pt=new WeakMap,ht=new WeakMap,ft=new WeakMap,mt=new WeakMap;function gt(e){return St(e)?e:bt(e,!1,De,ct,pt)}function vt(e){return bt(e,!1,je,at,ht)}function yt(e){return bt(e,!0,Ue,ut,ft)}function bt(e,t,n,s,o){if(!b(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=o.get(e);if(r)return r;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(C(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?s:n);return o.set(e,c),c}function _t(e){return St(e)?_t(e.__v_raw):!(!e||!e.__v_isReactive)}function St(e){return!(!e||!e.__v_isReadonly)}function xt(e){return!(!e||!e.__v_isShallow)}function Ct(e){return _t(e)||St(e)}function kt(e){const t=e&&e.__v_raw;return t?kt(t):e}function Tt(e){return $(e,"__v_skip",!0),e}const wt=e=>b(e)?gt(e):e,Nt=e=>b(e)?yt(e):e;class At{constructor(e,t,n,s){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ue((()=>e(this._value)),(()=>It(this,1)),(()=>this.dep&&Te(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=kt(this);return e._cacheable&&!e.effect.dirty||M(e._value,e._value=e.effect.run())&&It(e,2),Et(e),e.effect._dirtyLevel>=1&&It(e,1),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Et(e){me&&ie&&(e=kt(e),xe(ie,e.dep||(e.dep=we((()=>e.dep=void 0),e instanceof At?e:void 0))))}function It(e,t=2,n){const s=(e=kt(e)).dep;s&&ke(s,t)}function Rt(e){return!(!e||!0!==e.__v_isRef)}function Ot(e){return Ft(e,!1)}function Ft(e,t){return Rt(e)?e:new Lt(e,t)}class Lt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:kt(e),this._value=t?e:wt(e)}get value(){return Et(this),this._value}set value(e){const t=this.__v_isShallow||xt(e)||St(e);e=t?e:kt(e),M(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:wt(e),It(this,2))}}function Mt(e){return Rt(e)?e.value:e}const Pt={get:(e,t,n)=>Mt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Rt(o)&&!Rt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function $t(e){return _t(e)?e:new Proxy(e,Pt)}class Bt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>Et(this)),(()=>It(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Vt(e){return new Bt(e)}class Dt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=kt(this._object),t=this._key,null==(n=Ne.get(e))?void 0:n.get(t);var e,t,n}}class Ut{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function jt(e,t,n){const s=e[t];return Rt(s)?s:new Dt(e,t,n)}function Ht(e,t,n,s){let o;try{o=s?e(...s):e()}catch(r){Wt(r,t,n)}return o}function qt(e,t,n,s){if(g(e)){const o=Ht(e,t,n,s);return o&&_(o)&&o.catch((e=>{Wt(e,t,n)})),o}const o=[];for(let r=0;r<e.length;r++)o.push(qt(e[r],t,n,s));return o}function Wt(e,t,n,s=!0){if(t){let s=t.parent;const o=t.proxy,r=`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){const t=s.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,o,r))return;s=s.parent}const i=t.appContext.config.errorHandler;if(i)return void Ht(i,null,10,[e,o,r])}!function(e,t,n,s=!0){console.error(e)}(e,0,0,s)}let Kt=!1,zt=!1;const Gt=[];let Jt=0;const Xt=[];let Qt=null,Zt=0;const Yt=Promise.resolve();let en=null;function tn(e){const t=en||Yt;return e?t.then(this?e.bind(this):e):t}function nn(e){Gt.length&&Gt.includes(e,Kt&&e.allowRecurse?Jt+1:Jt)||(null==e.id?Gt.push(e):Gt.splice(function(e){let t=Jt+1,n=Gt.length;for(;t<n;){const s=t+n>>>1,o=Gt[s],r=cn(o);r<e||r===e&&o.pre?t=s+1:n=s}return t}(e.id),0,e),sn())}function sn(){Kt||zt||(zt=!0,en=Yt.then(un))}function on(e){p(e)?Xt.push(...e):Qt&&Qt.includes(e,e.allowRecurse?Zt+1:Zt)||Xt.push(e),sn()}function rn(e,t,n=(Kt?Jt+1:0)){for(;n<Gt.length;n++){const t=Gt[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;Gt.splice(n,1),n--,t()}}}function ln(e){if(Xt.length){const e=[...new Set(Xt)].sort(((e,t)=>cn(e)-cn(t)));if(Xt.length=0,Qt)return void Qt.push(...e);for(Qt=e,Zt=0;Zt<Qt.length;Zt++)Qt[Zt]();Qt=null,Zt=0}}const cn=e=>null==e.id?1/0:e.id,an=(e,t)=>{const n=cn(e)-cn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function un(e){zt=!1,Kt=!0,Gt.sort(an);try{for(Jt=0;Jt<Gt.length;Jt++){const e=Gt[Jt];e&&!1!==e.active&&Ht(e,null,14)}}finally{Jt=0,Gt.length=0,ln(),Kt=!1,en=null,(Gt.length||Xt.length)&&un()}}function dn(e,t,...s){if(e.isUnmounted)return;const o=e.vnode.props||n;let r=s;const i=t.startsWith("update:"),l=i&&t.slice(7);if(l&&l in o){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:t,trim:i}=o[e]||n;i&&(r=s.map((e=>v(e)?e.trim():e))),t&&(r=s.map(B))}let c,a=o[c=L(t)]||o[c=L(I(t))];!a&&i&&(a=o[c=L(O(t))]),a&&qt(a,e,6,r);const u=o[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,qt(u,e,6,r)}}function pn(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(void 0!==o)return o;const r=e.emits;let i={},l=!1;if(!g(e)){const s=e=>{const n=pn(e,t,!0);n&&(l=!0,c(i,n))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return r||l?(p(r)?r.forEach((e=>i[e]=null)):c(i,r),b(e)&&s.set(e,i),i):(b(e)&&s.set(e,null),null)}function hn(e,t){return!(!e||!i(t))&&(t=t.slice(2).replace(/Once$/,""),d(e,t[0].toLowerCase()+t.slice(1))||d(e,O(t))||d(e,t))}let fn=null,mn=null;function gn(e){const t=fn;return fn=e,mn=e&&e.type.__scopeId||null,t}function vn(e,t=fn,n){if(!t)return e;if(e._n)return e;const s=(...n)=>{s._d&&qo(-1);const o=gn(t);let r;try{r=e(...n)}finally{gn(o),s._d&&qo(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function yn(e){const{type:t,vnode:n,proxy:s,withProxy:o,props:r,propsOptions:[i],slots:c,attrs:a,emit:u,render:d,renderCache:p,data:h,setupState:f,ctx:m,inheritAttrs:g}=e;let v,y;const b=gn(e);try{if(4&n.shapeFlag){const e=o||s;v=sr(d.call(e,e,p,r,f,h,m)),y=a}else{const e=t;0,v=sr(e(r,e.length>1?{attrs:a,slots:c,emit:u}:null)),y=t.props?a:bn(a)}}catch(S){Vo.length=0,Wt(S,e,1),v=Yo($o)}let _=v;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=_;e.length&&7&t&&(i&&e.some(l)&&(y=_n(y,i)),_=tr(_,y))}return n.dirs&&(_=tr(_),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),v=_,gn(b),v}const bn=e=>{let t;for(const n in e)("class"===n||"style"===n||i(n))&&((t||(t={}))[n]=e[n]);return t},_n=(e,t)=>{const n={};for(const s in e)l(s)&&s.slice(9)in t||(n[s]=e[s]);return n};function Sn(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const r=s[o];if(t[r]!==e[r]&&!hn(n,r))return!0}return!1}function xn({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s!==e)break;(e=t.vnode).el=n,t=t.parent}}const Cn="components";const kn=Symbol.for("v-ndc");function Tn(e,t,n=!0,s=!1){const o=fn||ur;if(o){const n=o.type;if(e===Cn){const e=Tr(n,!1);if(e&&(e===t||e===I(t)||e===F(I(t))))return n}const r=wn(o[e]||n[e],t)||wn(o.appContext[e],t);return!r&&s?n:r}}function wn(e,t){return e&&(e[t]||e[I(t)]||e[F(I(t))])}const Nn=e=>e.__isSuspense;let An=0;const En={name:"Suspense",__isSuspense:!0,process(e,t,n,s,o,r,i,l,c,a){if(null==e)!function(e,t,n,s,o,r,i,l,c){const{p:a,o:{createElement:u}}=c,d=u("div"),p=e.suspense=Rn(e,o,s,t,d,n,r,i,l,c);a(null,p.pendingBranch=e.ssContent,d,null,s,p,r,i),p.deps>0?(In(e,"onPending"),In(e,"onFallback"),a(null,e.ssFallback,t,n,s,null,r,i),Ln(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,s,o,r,i,l,c,a);else{if(r&&r.deps>0)return void(t.suspense=e.suspense);!function(e,t,n,s,o,r,i,l,{p:c,um:a,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:m,isInFallback:g,isHydrating:v}=d;if(m)d.pendingBranch=p,Go(p,m)?(c(m,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0?d.resolve():g&&(v||(c(f,h,n,s,o,null,r,i,l),Ln(d,h)))):(d.pendingId=An++,v?(d.isHydrating=!1,d.activeBranch=m):a(m,o,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0?d.resolve():(c(f,h,n,s,o,null,r,i,l),Ln(d,h))):f&&Go(p,f)?(c(f,p,n,s,o,d,r,i,l),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0&&d.resolve()));else if(f&&Go(p,f))c(f,p,n,s,o,d,r,i,l),Ln(d,p);else if(In(t,"onPending"),d.pendingBranch=p,d.pendingId=512&p.shapeFlag?p.component.suspenseId:An++,c(null,p,d.hiddenContainer,null,o,d,r,i,l),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(h)}),e):0===e&&d.fallback(h)}}(e,t,n,s,o,i,l,c,a)}},hydrate:function(e,t,n,s,o,r,i,l,c){const a=t.suspense=Rn(t,s,n,e.parentNode,document.createElement("div"),null,o,r,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,r,i);0===a.deps&&a.resolve(!1,!0);return u},create:Rn,normalize:function(e){const{shapeFlag:t,children:n}=e,s=32&t;e.ssContent=On(s?n.default:n),e.ssFallback=s?On(n.fallback):Yo($o)}};function In(e,t){const n=e.props&&e.props[t];g(n)&&n()}function Rn(e,t,n,s,o,r,i,l,c,a,u=!1){const{p:d,m:p,um:h,n:f,o:{parentNode:m,remove:g}}=a;let v;const y=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);y&&(null==t?void 0:t.pendingBranch)&&(v=t.pendingId,t.deps++);const b=e.props?V(e.props.timeout):void 0,_=r,S={vnode:e,parent:t,parentComponent:n,namespace:i,container:s,hiddenContainer:o,deps:0,pendingId:An++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:s,activeBranch:o,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=S;let d=!1;S.isHydrating?S.isHydrating=!1:e||(d=o&&i.transition&&"out-in"===i.transition.mode,d&&(o.transition.afterLeave=()=>{l===S.pendingId&&(p(i,u,r===_?f(o):r,0),on(c))}),o&&(m(o.el)!==S.hiddenContainer&&(r=f(o)),h(o,a,S,!0)),d||p(i,u,r,0)),Ln(S,i),S.pendingBranch=null,S.isInFallback=!1;let g=S.parent,b=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),b=!0;break}g=g.parent}b||d||on(c),S.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),In(s,"onResolve")},fallback(e){if(!S.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:s,container:o,namespace:r}=S;In(t,"onFallback");const i=f(n),a=()=>{S.isInFallback&&(d(null,e,o,i,s,null,r,l,c),Ln(S,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),S.isInFallback=!0,h(n,s,null,!0),u||a()},move(e,t,n){S.activeBranch&&p(S.activeBranch,e,t,n),S.container=e},next:()=>S.activeBranch&&f(S.activeBranch),registerDep(e,t){const n=!!S.pendingBranch;n&&S.deps++;const s=e.vnode.el;e.asyncDep.catch((t=>{Wt(t,e,0)})).then((o=>{if(e.isUnmounted||S.isUnmounted||S.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:r}=e;_r(e,o,!1),s&&(r.el=s);const l=!s&&e.subTree.el;t(e,r,m(s||e.subTree.el),s?null:f(e.subTree),S,i,c),l&&g(l),xn(e,r.el),n&&0==--S.deps&&S.resolve()}))},unmount(e,t){S.isUnmounted=!0,S.activeBranch&&h(S.activeBranch,n,e,t),S.pendingBranch&&h(S.pendingBranch,n,e,t)}};return S}function On(e){let t;if(g(e)){const n=Ho&&e._c;n&&(e._d=!1,Uo()),e=e(),n&&(e._d=!0,t=Do,jo())}if(p(e)){const t=function(e,t=!0){let n;for(let s=0;s<e.length;s++){const t=e[s];if(!zo(t))return;if(t.type!==$o||"v-if"===t.children){if(n)return;n=t}}return n}(e);e=t}return e=sr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Fn(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):on(e)}function Ln(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let o=t.el;for(;!o&&t.component;)o=(t=t.component.subTree).el;n.el=o,s&&s.subTree===n&&(s.vnode.el=o,xn(s,o))}const Mn=Symbol.for("v-scx");function Pn(e,t){return Dn(e,null,{flush:"post"})}function $n(e,t){return Dn(e,null,{flush:"sync"})}const Bn={};function Vn(e,t,n){return Dn(e,t,n)}function Dn(e,t,{immediate:s,deep:r,flush:i,once:l}=n){if(t&&l){const e=t;t=(...t)=>{e(...t),C()}}const c=ur,u=e=>!0===r?e:Hn(e,!1===r?1:void 0);let d,h,f=!1,m=!1;if(Rt(e)?(d=()=>e.value,f=xt(e)):_t(e)?(d=()=>u(e),f=!0):p(e)?(m=!0,f=e.some((e=>_t(e)||xt(e))),d=()=>e.map((e=>Rt(e)?e.value:_t(e)?u(e):g(e)?Ht(e,c,2):void 0))):d=g(e)?t?()=>Ht(e,c,2):()=>(h&&h(),qt(e,c,3,[v])):o,t&&r){const e=d;d=()=>Hn(e())}let v=e=>{h=S.onStop=()=>{Ht(e,c,4),h=S.onStop=void 0}},y=m?new Array(e.length).fill(Bn):Bn;const b=()=>{if(S.active&&S.dirty)if(t){const e=S.run();(r||f||(m?e.some(((e,t)=>M(e,y[t]))):M(e,y)))&&(h&&h(),qt(t,c,3,[e,y===Bn?void 0:m&&y[0]===Bn?[]:y,v]),y=e)}else S.run()};let _;b.allowRecurse=!!t,"sync"===i?_=b:"post"===i?_=()=>bo(b,c&&c.suspense):(b.pre=!0,c&&(b.id=c.uid),_=()=>nn(b));const S=new ue(d,o,_),x=ae(),C=()=>{S.stop(),x&&a(x.effects,S)};return t?s?b():y=S.run():"post"===i?bo(S.run.bind(S),c&&c.suspense):S.run(),C}function Un(e,t,n){const s=this.proxy,o=v(e)?e.includes(".")?jn(s,e):()=>s[e]:e.bind(s,s);let r;g(t)?r=t:(r=t.handler,n=t);const i=fr(this),l=Dn(o,r.bind(s),n);return i(),l}function jn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Hn(e,t,n=0,s){if(!b(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((s=s||new Set).has(e))return e;if(s.add(e),Rt(e))Hn(e.value,t,n,s);else if(p(e))for(let o=0;o<e.length;o++)Hn(e[o],t,n,s);else if(f(e)||h(e))e.forEach((e=>{Hn(e,t,n,s)}));else if(k(e))for(const o in e)Hn(e[o],t,n,s);return e}function qn(e,t,n,s){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];r&&(l.oldValue=r[i].value);let c=l.dir[s];c&&(ye(),qt(c,n,8,[e.el,l,e,t]),be())}}const Wn=Symbol("_leaveCb"),Kn=Symbol("_enterCb");function zn(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ys((()=>{e.isMounted=!0})),Ss((()=>{e.isUnmounting=!0})),e}const Gn=[Function,Array],Jn={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Gn,onEnter:Gn,onAfterEnter:Gn,onEnterCancelled:Gn,onBeforeLeave:Gn,onLeave:Gn,onAfterLeave:Gn,onLeaveCancelled:Gn,onBeforeAppear:Gn,onAppear:Gn,onAfterAppear:Gn,onAppearCancelled:Gn},Xn={name:"BaseTransition",props:Jn,setup(e,{slots:t}){const n=dr(),s=zn();let o;return()=>{const r=t.default&&ns(t.default(),!0);if(!r||!r.length)return;let i=r[0];if(r.length>1)for(const e of r)if(e.type!==$o){i=e;break}const l=kt(e),{mode:c}=l;if(s.isLeaving)return Yn(i);const a=es(i);if(!a)return Yn(i);const u=Zn(a,l,s,n);ts(a,u);const d=n.subTree,p=d&&es(d);let h=!1;const{getTransitionKey:f}=a.type;if(f){const e=f();void 0===o?o=e:e!==o&&(o=e,h=!0)}if(p&&p.type!==$o&&(!Go(a,p)||h)){const e=Zn(p,l,s,n);if(ts(p,e),"out-in"===c)return s.isLeaving=!0,e.afterLeave=()=>{s.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},Yn(i);"in-out"===c&&a.type!==$o&&(e.delayLeave=(e,t,n)=>{Qn(s,p)[String(p.key)]=p,e[Wn]=()=>{t(),e[Wn]=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function Qn(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Zn(e,t,n,s){const{appear:o,mode:r,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:d,onLeave:h,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,_=String(e.key),S=Qn(n,e),x=(e,t)=>{e&&qt(e,s,9,t)},C=(e,t)=>{const n=t[1];x(e,t),p(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},k={mode:r,persisted:i,beforeEnter(t){let s=l;if(!n.isMounted){if(!o)return;s=g||l}t[Wn]&&t[Wn](!0);const r=S[_];r&&Go(e,r)&&r.el[Wn]&&r.el[Wn](),x(s,[t])},enter(e){let t=c,s=a,r=u;if(!n.isMounted){if(!o)return;t=v||c,s=y||a,r=b||u}let i=!1;const l=e[Kn]=t=>{i||(i=!0,x(t?r:s,[e]),k.delayedLeave&&k.delayedLeave(),e[Kn]=void 0)};t?C(t,[e,l]):l()},leave(t,s){const o=String(e.key);if(t[Kn]&&t[Kn](!0),n.isUnmounting)return s();x(d,[t]);let r=!1;const i=t[Wn]=n=>{r||(r=!0,s(),x(n?m:f,[t]),t[Wn]=void 0,S[o]===e&&delete S[o])};S[o]=e,h?C(h,[t,i]):i()},clone:e=>Zn(e,t,n,s)};return k}function Yn(e){if(is(e))return(e=tr(e)).children=null,e}function es(e){return is(e)?e.children?e.children[0]:void 0:e}function ts(e,t){6&e.shapeFlag&&e.component?ts(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ns(e,t=!1,n){let s=[],o=0;for(let r=0;r<e.length;r++){let i=e[r];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:r);i.type===Mo?(128&i.patchFlag&&o++,s=s.concat(ns(i.children,t,l))):(t||i.type!==$o)&&s.push(null!=l?tr(i,{key:l}):i)}if(o>1)for(let r=0;r<s.length;r++)s[r].patchFlag=-2;return s} +/*! #__NO_SIDE_EFFECTS__ */function ss(e,t){return g(e)?(()=>c({name:e.name},t,{setup:e}))():e}const os=e=>!!e.type.__asyncLoader +/*! #__NO_SIDE_EFFECTS__ */;function rs(e,t){const{ref:n,props:s,children:o,ce:r}=t.vnode,i=Yo(e,s,o);return i.ref=n,i.ce=r,delete t.vnode.ce,i}const is=e=>e.type.__isKeepAlive,ls={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=dr(),s=n.ctx,o=new Map,r=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:d}}}=s,p=d("div");function h(e){hs(e),u(e,n,l,!0)}function f(e){o.forEach(((t,n)=>{const s=Tr(t.type);!s||e&&e(s)||m(n)}))}function m(e){const t=o.get(e);i&&Go(t,i)?i&&hs(i):h(t),o.delete(e),r.delete(e)}s.activate=(e,t,n,s,o)=>{const r=e.component;a(e,t,n,0,l),c(r.vnode,e,t,n,r,l,s,e.slotScopeIds,o),bo((()=>{r.isDeactivated=!1,r.a&&P(r.a);const t=e.props&&e.props.onVnodeMounted;t&&lr(t,r.parent,e)}),l)},s.deactivate=e=>{const t=e.component;a(e,p,null,1,l),bo((()=>{t.da&&P(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&lr(n,t.parent,e),t.isDeactivated=!0}),l)},Vn((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>cs(e,t))),t&&f((e=>!cs(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&o.set(g,fs(n.subTree))};return ys(v),_s(v),Ss((()=>{o.forEach((e=>{const{subTree:t,suspense:s}=n,o=fs(t);if(e.type!==o.type||e.key!==o.key)h(e);else{hs(o);const e=o.component.da;e&&bo(e,s)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),s=n[0];if(n.length>1)return i=null,n;if(!(zo(s)&&(4&s.shapeFlag||128&s.shapeFlag)))return i=null,s;let l=fs(s);const c=l.type,a=Tr(os(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:d,max:p}=e;if(u&&(!a||!cs(u,a))||d&&a&&cs(d,a))return i=l,s;const h=null==l.key?c:l.key,f=o.get(h);return l.el&&(l=tr(l),128&s.shapeFlag&&(s.ssContent=l)),g=h,f?(l.el=f.el,l.component=f.component,l.transition&&ts(l,l.transition),l.shapeFlag|=512,r.delete(h),r.add(h)):(r.add(h),p&&r.size>parseInt(p,10)&&m(r.values().next().value)),l.shapeFlag|=256,i=l,Nn(s.type)?s:l}}};function cs(e,t){return p(e)?e.some((e=>cs(e,t))):v(e)?e.split(",").includes(t):"[object RegExp]"===x(e)&&e.test(t)}function as(e,t){ds(e,"a",t)}function us(e,t){ds(e,"da",t)}function ds(e,t,n=ur){const s=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(ms(t,s,n),n){let e=n.parent;for(;e&&e.parent;)is(e.parent.vnode)&&ps(s,t,n,e),e=e.parent}}function ps(e,t,n,s){const o=ms(t,e,s,!0);xs((()=>{a(s[t],o)}),n)}function hs(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function fs(e){return 128&e.shapeFlag?e.ssContent:e}function ms(e,t,n=ur,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;ye();const o=fr(n),r=qt(t,n,e,s);return o(),be(),r});return s?o.unshift(r):o.push(r),r}}const gs=e=>(t,n=ur)=>(!br||"sp"===e)&&ms(e,((...e)=>t(...e)),n),vs=gs("bm"),ys=gs("m"),bs=gs("bu"),_s=gs("u"),Ss=gs("bum"),xs=gs("um"),Cs=gs("sp"),ks=gs("rtg"),Ts=gs("rtc");function ws(e,t=ur){ms("ec",e,t)}function Ns(e){return e.some((e=>!zo(e)||e.type!==$o&&!(e.type===Mo&&!Ns(e.children))))?e:null}const As=e=>e?gr(e)?kr(e)||e.proxy:As(e.parent):null,Es=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>As(e.parent),$root:e=>As(e.root),$emit:e=>e.emit,$options:e=>Vs(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,nn(e.update)}),$nextTick:e=>e.n||(e.n=tn.bind(e.proxy)),$watch:e=>Un.bind(e)}),Is=(e,t)=>e!==n&&!e.__isScriptSetup&&d(e,t),Rs={get({_:e},t){const{ctx:s,setupState:o,data:r,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==t[0]){const c=l[t];if(void 0!==c)switch(c){case 1:return o[t];case 2:return r[t];case 4:return s[t];case 3:return i[t]}else{if(Is(o,t))return l[t]=1,o[t];if(r!==n&&d(r,t))return l[t]=2,r[t];if((u=e.propsOptions[0])&&d(u,t))return l[t]=3,i[t];if(s!==n&&d(s,t))return l[t]=4,s[t];Ms&&(l[t]=0)}}const p=Es[t];let h,f;return p?("$attrs"===t&&Ie(e,0,t),p(e)):(h=c.__cssModules)&&(h=h[t])?h:s!==n&&d(s,t)?(l[t]=4,s[t]):(f=a.config.globalProperties,d(f,t)?f[t]:void 0)},set({_:e},t,s){const{data:o,setupState:r,ctx:i}=e;return Is(r,t)?(r[t]=s,!0):o!==n&&d(o,t)?(o[t]=s,!0):!d(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=s,!0))},has({_:{data:e,setupState:t,accessCache:s,ctx:o,appContext:r,propsOptions:i}},l){let c;return!!s[l]||e!==n&&d(e,l)||Is(t,l)||(c=i[0])&&d(c,l)||d(o,l)||d(Es,l)||d(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:d(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Os=c({},Rs,{get(e,t){if(t!==Symbol.unscopables)return Rs.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!j(t)});function Fs(){const e=dr();return e.setupContext||(e.setupContext=Cr(e))}function Ls(e){return p(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Ms=!0;function Ps(e){const t=Vs(e),n=e.proxy,s=e.ctx;Ms=!1,t.beforeCreate&&$s(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:c,provide:a,inject:u,created:d,beforeMount:h,mounted:f,beforeUpdate:m,updated:v,activated:y,deactivated:_,beforeUnmount:S,unmounted:x,render:C,renderTracked:k,renderTriggered:T,errorCaptured:w,serverPrefetch:N,expose:A,inheritAttrs:E,components:I,directives:R}=t;if(u&&function(e,t,n=o){p(e)&&(e=Hs(e));for(const s in e){const n=e[s];let o;o=b(n)?"default"in n?Zs(n.from||s,n.default,!0):Zs(n.from||s):Zs(n),Rt(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[s]=o}}(u,s,null),l)for(const o in l){const e=l[o];g(e)&&(s[o]=e.bind(n))}if(r){const t=r.call(n,n);b(t)&&(e.data=gt(t))}if(Ms=!0,i)for(const p in i){const e=i[p],t=g(e)?e.bind(n,n):g(e.get)?e.get.bind(n,n):o,r=!g(e)&&g(e.set)?e.set.bind(n):o,l=wr({get:t,set:r});Object.defineProperty(s,p,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const o in c)Bs(c[o],s,n,o);if(a){const e=g(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Qs(t,e[t])}))}function O(e,t){p(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&$s(d,e,"c"),O(vs,h),O(ys,f),O(bs,m),O(_s,v),O(as,y),O(us,_),O(ws,w),O(Ts,k),O(ks,T),O(Ss,S),O(xs,x),O(Cs,N),p(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});C&&e.render===o&&(e.render=C),null!=E&&(e.inheritAttrs=E),I&&(e.components=I),R&&(e.directives=R)}function $s(e,t,n){qt(p(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Bs(e,t,n,s){const o=s.includes(".")?jn(n,s):()=>n[s];if(v(e)){const n=t[e];g(n)&&Vn(o,n)}else if(g(e))Vn(o,e.bind(n));else if(b(e))if(p(e))e.forEach((e=>Bs(e,t,n,s)));else{const s=g(e.handler)?e.handler.bind(n):t[e.handler];g(s)&&Vn(o,s,e)}}function Vs(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let c;return l?c=l:o.length||n||s?(c={},o.length&&o.forEach((e=>Ds(c,e,i,!0))),Ds(c,t,i)):c=t,b(t)&&r.set(t,c),c}function Ds(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Ds(e,r,n,!0),o&&o.forEach((t=>Ds(e,t,n,!0)));for(const i in t)if(s&&"expose"===i);else{const s=Us[i]||n&&n[i];e[i]=s?s(e[i],t[i]):t[i]}return e}const Us={data:js,props:Ks,emits:Ks,methods:Ws,computed:Ws,beforeCreate:qs,created:qs,beforeMount:qs,mounted:qs,beforeUpdate:qs,updated:qs,beforeDestroy:qs,beforeUnmount:qs,destroyed:qs,unmounted:qs,activated:qs,deactivated:qs,errorCaptured:qs,serverPrefetch:qs,components:Ws,directives:Ws,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const s in t)n[s]=qs(e[s],t[s]);return n},provide:js,inject:function(e,t){return Ws(Hs(e),Hs(t))}};function js(e,t){return t?e?function(){return c(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function Hs(e){if(p(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function qs(e,t){return e?[...new Set([].concat(e,t))]:t}function Ws(e,t){return e?c(Object.create(null),e,t):t}function Ks(e,t){return e?p(e)&&p(t)?[...new Set([...e,...t])]:c(Object.create(null),Ls(e),Ls(null!=t?t:{})):t}function zs(){return{app:null,config:{isNativeTag:r,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Gs=0;function Js(e,t){return function(n,s=null){g(n)||(n=c({},n)),null==s||b(s)||(s=null);const o=zs(),r=new WeakSet;let i=!1;const l=o.app={_uid:Gs++,_component:n,_props:s,_container:null,_context:o,_instance:null,version:Er,get config(){return o.config},set config(e){},use:(e,...t)=>(r.has(e)||(e&&g(e.install)?(r.add(e),e.install(l,...t)):g(e)&&(r.add(e),e(l,...t))),l),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),l),component:(e,t)=>t?(o.components[e]=t,l):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,l):o.directives[e],mount(r,c,a){if(!i){const u=Yo(n,s);return u.appContext=o,!0===a?a="svg":!1===a&&(a=void 0),c&&t?t(u,r):e(u,r,a),i=!0,l._container=r,r.__vue_app__=l,kr(u.component)||u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,l),runWithContext(e){Xs=l;try{return e()}finally{Xs=null}}};return l}}let Xs=null;function Qs(e,t){if(ur){let n=ur.provides;const s=ur.parent&&ur.parent.provides;s===n&&(n=ur.provides=Object.create(s)),n[e]=t}else;}function Zs(e,t,n=!1){const s=ur||fn;if(s||Xs){const o=s?null==s.parent?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:Xs._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&g(t)?t.call(s&&s.proxy):t}}function Ys(e,t,s,o){const[r,i]=e.propsOptions;let l,c=!1;if(t)for(let n in t){if(w(n))continue;const a=t[n];let u;r&&d(r,u=I(n))?i&&i.includes(u)?(l||(l={}))[u]=a:s[u]=a:hn(e.emitsOptions,n)||n in o&&a===o[n]||(o[n]=a,c=!0)}if(i){const t=kt(s),o=l||n;for(let n=0;n<i.length;n++){const l=i[n];s[l]=eo(r,t,l,o[l],e,!d(o,l))}}return c}function eo(e,t,n,s,o,r){const i=e[n];if(null!=i){const e=d(i,"default");if(e&&void 0===s){const e=i.default;if(i.type!==Function&&!i.skipFactory&&g(e)){const{propsDefaults:r}=o;if(n in r)s=r[n];else{const i=fr(o);s=r[n]=e.call(null,t),i()}}else s=e}i[0]&&(r&&!e?s=!1:!i[1]||""!==s&&s!==O(n)||(s=!0))}return s}function to(e,t,o=!1){const r=t.propsCache,i=r.get(e);if(i)return i;const l=e.props,a={},u=[];let h=!1;if(!g(e)){const n=e=>{h=!0;const[n,s]=to(e,t,!0);c(a,n),s&&u.push(...s)};!o&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!l&&!h)return b(e)&&r.set(e,s),s;if(p(l))for(let s=0;s<l.length;s++){const e=I(l[s]);no(e)&&(a[e]=n)}else if(l)for(const n in l){const e=I(n);if(no(e)){const t=l[n],s=a[e]=p(t)||g(t)?{type:t}:c({},t);if(s){const t=ro(Boolean,s.type),n=ro(String,s.type);s[0]=t>-1,s[1]=n<0||t<n,(t>-1||d(s,"default"))&&u.push(e)}}}const f=[a,u];return b(e)&&r.set(e,f),f}function no(e){return"$"!==e[0]}function so(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function oo(e,t){return so(e)===so(t)}function ro(e,t){return p(t)?t.findIndex((t=>oo(t,e))):g(t)&&oo(t,e)?0:-1}const io=e=>"_"===e[0]||"$stable"===e,lo=e=>p(e)?e.map(sr):[sr(e)],co=(e,t,n)=>{if(t._n)return t;const s=vn(((...e)=>lo(t(...e))),n);return s._c=!1,s},ao=(e,t,n)=>{const s=e._ctx;for(const o in e){if(io(o))continue;const n=e[o];if(g(n))t[o]=co(0,n,s);else if(null!=n){const e=lo(n);t[o]=()=>e}}},uo=(e,t)=>{const n=lo(t);e.slots.default=()=>n},po=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=kt(t),$(t,"_",n)):ao(t,e.slots={})}else e.slots={},t&&uo(e,t);$(e.slots,Jo,1)},ho=(e,t,s)=>{const{vnode:o,slots:r}=e;let i=!0,l=n;if(32&o.shapeFlag){const e=t._;e?s&&1===e?i=!1:(c(r,t),s||1!==e||delete r._):(i=!t.$stable,ao(t,r)),l=t}else t&&(uo(e,t),l={default:1});if(i)for(const n in r)io(n)||null!=l[n]||delete r[n]};function fo(e,t,s,o,r=!1){if(p(e))return void e.forEach(((e,n)=>fo(e,t&&(p(t)?t[n]:t),s,o,r)));if(os(o)&&!r)return;const i=4&o.shapeFlag?kr(o.component)||o.component.proxy:o.el,l=r?null:i,{i:c,r:u}=e,h=t&&t.r,f=c.refs===n?c.refs={}:c.refs,m=c.setupState;if(null!=h&&h!==u&&(v(h)?(f[h]=null,d(m,h)&&(m[h]=null)):Rt(h)&&(h.value=null)),g(u))Ht(u,c,12,[l,f]);else{const t=v(u),n=Rt(u),o=e.f;if(t||n){const c=()=>{if(o){const n=t?d(m,u)?m[u]:f[u]:u.value;r?p(n)&&a(n,i):p(n)?n.includes(i)||n.push(i):t?(f[u]=[i],d(m,u)&&(m[u]=f[u])):(u.value=[i],e.k&&(f[e.k]=u.value))}else t?(f[u]=l,d(m,u)&&(m[u]=l)):n&&(u.value=l,e.k&&(f[e.k]=l))};r||o?c():(c.id=-1,bo(c,s))}}}let mo=!1;const go=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,vo=e=>8===e.nodeType;function yo(e){const{mt:t,p:n,o:{patchProp:s,createText:o,nextSibling:r,parentNode:l,remove:c,insert:a,createComment:u}}=e,d=(n,s,i,c,u,b=!1)=>{const _=vo(n)&&"["===n.data,S=()=>m(n,s,i,c,u,_),{type:x,ref:C,shapeFlag:k,patchFlag:T}=s;let w=n.nodeType;s.el=n,-2===T&&(b=!1,s.dynamicChildren=null);let N=null;switch(x){case Po:3!==w?""===s.children?(a(s.el=o(""),l(n),n),N=n):N=S():(n.data!==s.children&&(mo=!0,n.data=s.children),N=r(n));break;case $o:y(n)?(N=r(n),v(s.el=n.content.firstChild,n,i)):N=8!==w||_?S():r(n);break;case Bo:if(_&&(w=(n=r(n)).nodeType),1===w||3===w){N=n;const e=!s.children.length;for(let t=0;t<s.staticCount;t++)e&&(s.children+=1===N.nodeType?N.outerHTML:N.data),t===s.staticCount-1&&(s.anchor=N),N=r(N);return _?r(N):N}S();break;case Mo:N=_?f(n,s,i,c,u,b):S();break;default:if(1&k)N=1===w&&s.type.toLowerCase()===n.tagName.toLowerCase()||y(n)?p(n,s,i,c,u,b):S();else if(6&k){s.slotScopeIds=u;const e=l(n);if(N=_?g(n):vo(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):r(n),t(s,e,null,i,c,go(e),b),os(s)){let t;_?(t=Yo(Mo),t.anchor=N?N.previousSibling:e.lastChild):t=3===n.nodeType?nr(""):Yo("div"),t.el=n,s.component.subTree=t}}else 64&k?N=8!==w?S():s.type.hydrate(n,s,i,c,u,b,e,h):128&k&&(N=s.type.hydrate(n,s,i,c,go(l(n)),u,b,e,d))}return null!=C&&fo(C,null,c,s),N},p=(e,t,n,o,r,l)=>{l=l||!!t.dynamicChildren;const{type:a,props:u,patchFlag:d,shapeFlag:p,dirs:f,transition:m}=t,g="input"===a||"option"===a;if(g||-1!==d){f&&qn(t,null,n,"created");let a,b=!1;if(y(e)){b=To(o,m)&&n&&n.vnode.props&&n.vnode.props.appear;const s=e.content.firstChild;b&&m.beforeEnter(s),v(s,e,n),t.el=e=s}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let s=h(e.firstChild,t,e,n,o,r,l);for(;s;){mo=!0;const e=s;s=s.nextSibling,c(e)}}else 8&p&&e.textContent!==t.children&&(mo=!0,e.textContent=t.children);if(u)if(g||!l||48&d)for(const t in u)(g&&(t.endsWith("value")||"indeterminate"===t)||i(t)&&!w(t)||"."===t[0])&&s(e,t,null,u[t],void 0,void 0,n);else u.onClick&&s(e,"onClick",null,u.onClick,void 0,void 0,n);(a=u&&u.onVnodeBeforeMount)&&lr(a,n,t),f&&qn(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||f||b)&&Fn((()=>{a&&lr(a,n,t),b&&m.enter(e),f&&qn(t,null,n,"mounted")}),o)}return e.nextSibling},h=(e,t,s,o,r,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let u=0;u<a;u++){const t=l?c[u]:c[u]=sr(c[u]);if(e)e=d(e,t,o,r,i,l);else{if(t.type===Po&&!t.children)continue;mo=!0,n(null,t,s,null,o,r,go(s),i)}}return e},f=(e,t,n,s,o,i)=>{const{slotScopeIds:c}=t;c&&(o=o?o.concat(c):c);const d=l(e),p=h(r(e),t,d,n,s,o,i);return p&&vo(p)&&"]"===p.data?r(t.anchor=p):(mo=!0,a(t.anchor=u("]"),d,p),p)},m=(e,t,s,o,i,a)=>{if(mo=!0,t.el=null,a){const t=g(e);for(;;){const n=r(e);if(!n||n===t)break;c(n)}}const u=r(e),d=l(e);return c(e),n(null,t,d,u,s,o,go(d),i),u},g=(e,t="[",n="]")=>{let s=0;for(;e;)if((e=r(e))&&vo(e)&&(e.data===t&&s++,e.data===n)){if(0===s)return r(e);s--}return e},v=(e,t,n)=>{const s=t.parentNode;s&&s.replaceChild(e,t);let o=n;for(;o;)o.vnode.el===t&&(o.vnode.el=o.subTree.el=e),o=o.parent},y=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),ln(),void(t._vnode=e);mo=!1,d(t.firstChild,e,null,null,null),ln(),t._vnode=e,mo&&console.error("Hydration completed but contains mismatches.")},d]}const bo=Fn;function _o(e){return xo(e)}function So(e){return xo(e,yo)}function xo(e,t){U().__VUE__=!0;const{insert:r,remove:i,patchProp:l,createElement:c,createText:a,createComment:u,setText:p,setElementText:h,parentNode:f,nextSibling:m,setScopeId:g=o,insertStaticContent:v}=e,y=(e,t,n,s=null,o=null,r=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Go(e,t)&&(s=Q(e),K(e,o,r,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:d}=t;switch(a){case Po:b(e,t,n,s);break;case $o:S(e,t,n,s);break;case Bo:null==e&&x(t,n,s,i);break;case Mo:F(e,t,n,s,o,r,i,l,c);break;default:1&d?C(e,t,n,s,o,r,i,l,c):6&d?L(e,t,n,s,o,r,i,l,c):(64&d||128&d)&&a.process(e,t,n,s,o,r,i,l,c,ee)}null!=u&&o&&fo(u,e&&e.ref,r,t||e,!t)},b=(e,t,n,s)=>{if(null==e)r(t.el=a(t.children),n,s);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},S=(e,t,n,s)=>{null==e?r(t.el=u(t.children||""),n,s):t.el=e.el},x=(e,t,n,s)=>{[e.el,e.anchor]=v(e.children,t,n,s,e.el,e.anchor)},C=(e,t,n,s,o,r,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?k(t,n,s,o,r,i,l,c):A(e,t,o,r,i,l,c)},k=(e,t,n,s,o,i,a,u)=>{let d,p;const{props:f,shapeFlag:m,transition:g,dirs:v}=e;if(d=e.el=c(e.type,i,f&&f.is,f),8&m?h(d,e.children):16&m&&N(e.children,d,null,s,o,Co(e,i),a,u),v&&qn(e,null,s,"created"),T(d,e,e.scopeId,a,s),f){for(const t in f)"value"===t||w(t)||l(d,t,null,f[t],i,e.children,s,o,X);"value"in f&&l(d,"value",null,f.value,i),(p=f.onVnodeBeforeMount)&&lr(p,s,e)}v&&qn(e,null,s,"beforeMount");const y=To(o,g);y&&g.beforeEnter(d),r(d,t,n),((p=f&&f.onVnodeMounted)||y||v)&&bo((()=>{p&&lr(p,s,e),y&&g.enter(d),v&&qn(e,null,s,"mounted")}),o)},T=(e,t,n,s,o)=>{if(n&&g(e,n),s)for(let r=0;r<s.length;r++)g(e,s[r]);if(o){if(t===o.subTree){const t=o.vnode;T(e,t,t.scopeId,t.slotScopeIds,o.parent)}}},N=(e,t,n,s,o,r,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?or(e[a]):sr(e[a]);y(null,c,t,n,s,o,r,i,l)}},A=(e,t,s,o,r,i,c)=>{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=t;u|=16&e.patchFlag;const f=e.props||n,m=t.props||n;let g;if(s&&ko(s,!1),(g=m.onVnodeBeforeUpdate)&&lr(g,s,t,e),p&&qn(t,e,s,"beforeUpdate"),s&&ko(s,!0),d?E(e.dynamicChildren,d,a,s,o,Co(t,r),i):c||j(e,t,a,null,s,o,Co(t,r),i,!1),u>0){if(16&u)R(a,t,f,m,s,o,r);else if(2&u&&f.class!==m.class&&l(a,"class",null,m.class,r),4&u&&l(a,"style",f.style,m.style,r),8&u){const n=t.dynamicProps;for(let t=0;t<n.length;t++){const i=n[t],c=f[i],u=m[i];u===c&&"value"!==i||l(a,i,c,u,r,e.children,s,o,X)}}1&u&&e.children!==t.children&&h(a,t.children)}else c||null!=d||R(a,t,f,m,s,o,r);((g=m.onVnodeUpdated)||p)&&bo((()=>{g&&lr(g,s,t,e),p&&qn(t,e,s,"updated")}),o)},E=(e,t,n,s,o,r,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],u=c.el&&(c.type===Mo||!Go(c,a)||70&c.shapeFlag)?f(c.el):n;y(c,a,u,null,s,o,r,i,!0)}},R=(e,t,s,o,r,i,c)=>{if(s!==o){if(s!==n)for(const n in s)w(n)||n in o||l(e,n,s[n],null,c,t.children,r,i,X);for(const n in o){if(w(n))continue;const a=o[n],u=s[n];a!==u&&"value"!==n&&l(e,n,u,a,c,t.children,r,i,X)}"value"in o&&l(e,"value",s.value,o.value,c)}},F=(e,t,n,s,o,i,l,c,u)=>{const d=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(r(d,n,s),r(p,n,s),N(t.children||[],n,p,o,i,l,c,u)):h>0&&64&h&&f&&e.dynamicChildren?(E(e.dynamicChildren,f,n,o,i,l,c),(null!=t.key||o&&t===o.subTree)&&wo(e,t,!0)):j(e,t,n,p,o,i,l,c,u)},L=(e,t,n,s,o,r,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?o.ctx.activate(t,n,s,i,c):M(t,n,s,o,r,i,c):B(e,t,c)},M=(e,t,s,o,r,i,l)=>{const c=e.component=function(e,t,s){const o=e.type,r=(t?t.appContext:e.appContext)||cr,i={uid:ar++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new le(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:to(o,r),emitsOptions:pn(o,r),emit:null,emitted:null,propsDefaults:n,inheritAttrs:o.inheritAttrs,ctx:n,data:n,props:n,attrs:n,slots:n,refs:n,setupState:n,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=t?t.root:i,i.emit=dn.bind(null,i),e.ce&&e.ce(i);return i}(e,o,r);if(is(e)&&(c.ctx.renderer=ee),function(e,t=!1){t&&hr(t);const{props:n,children:s}=e.vnode,o=gr(e);(function(e,t,n,s=!1){const o={},r={};$(r,Jo,1),e.propsDefaults=Object.create(null),Ys(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);e.props=n?s?o:vt(o):e.type.props?o:r,e.attrs=r})(e,n,o,t),po(e,s);const r=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Tt(new Proxy(e.ctx,Rs));const{setup:s}=n;if(s){const n=e.setupContext=s.length>1?Cr(e):null,o=fr(e);ye();const r=Ht(s,e,0,[e.props,n]);if(be(),o(),_(r)){if(r.then(mr,mr),t)return r.then((n=>{_r(e,n,t)})).catch((t=>{Wt(t,e,0)}));e.asyncDep=r}else _r(e,r,t)}else xr(e,t)}(e,t):void 0;t&&hr(!1)}(c),c.asyncDep){if(r&&r.registerDep(c,V),!e.el){const e=c.subTree=Yo($o);S(null,e,t,s)}}else V(c,e,t,s,r,i,l)},B=(e,t,n)=>{const s=t.component=e.component;if(function(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:l,patchFlag:c}=t,a=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!o&&!l||l&&l.$stable)||s!==i&&(s?!i||Sn(s,i,a):!!i);if(1024&c)return!0;if(16&c)return s?Sn(s,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==s[n]&&!hn(a,n))return!0}}return!1}(e,t,n)){if(s.asyncDep&&!s.asyncResolved)return void D(s,t,n);s.next=t,function(e){const t=Gt.indexOf(e);t>Jt&&Gt.splice(t,1)}(s.update),s.effect.dirty=!0,s.update()}else t.el=e.el,s.vnode=t},V=(e,t,n,s,r,i,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:s,parent:o,vnode:a}=e;{const n=No(e);if(n)return t&&(t.el=a.el,D(e,t,l)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,d=t;ko(e,!1),t?(t.el=a.el,D(e,t,l)):t=a,n&&P(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&lr(u,o,t,a),ko(e,!0);const p=yn(e),h=e.subTree;e.subTree=p,y(h,p,f(h.el),Q(h),e,r,i),t.el=p.el,null===d&&xn(e,p.el),s&&bo(s,r),(u=t.props&&t.props.onVnodeUpdated)&&bo((()=>lr(u,o,t,a)),r)}else{let o;const{el:l,props:c}=t,{bm:a,m:u,parent:d}=e,p=os(t);if(ko(e,!1),a&&P(a),!p&&(o=c&&c.onVnodeBeforeMount)&&lr(o,d,t),ko(e,!0),l&&ne){const n=()=>{e.subTree=yn(e),ne(l,e.subTree,e,r,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const o=e.subTree=yn(e);y(null,o,n,s,e,r,i),t.el=o.el}if(u&&bo(u,r),!p&&(o=c&&c.onVnodeMounted)){const e=t;bo((()=>lr(o,d,e)),r)}(256&t.shapeFlag||d&&os(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&bo(e.a,r),e.isMounted=!0,t=n=s=null}},a=e.effect=new ue(c,o,(()=>nn(u)),e.scope),u=e.update=()=>{a.dirty&&a.run()};u.id=e.uid,ko(e,!0),u()},D=(e,t,n)=>{t.component=e;const s=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=kt(o),[c]=e.propsOptions;let a=!1;if(!(s||i>0)||16&i){let s;Ys(e,t,o,r)&&(a=!0);for(const r in l)t&&(d(t,r)||(s=O(r))!==r&&d(t,s))||(c?!n||void 0===n[r]&&void 0===n[s]||(o[r]=eo(c,l,r,void 0,e,!0)):delete o[r]);if(r!==l)for(const e in r)t&&d(t,e)||(delete r[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let s=0;s<n.length;s++){let i=n[s];if(hn(e.emitsOptions,i))continue;const u=t[i];if(c)if(d(r,i))u!==r[i]&&(r[i]=u,a=!0);else{const t=I(i);o[t]=eo(c,l,t,u,e,!1)}else u!==r[i]&&(r[i]=u,a=!0)}}a&&Re(e,"set","$attrs")}(e,t.props,s,n),ho(e,t.children,n),ye(),rn(e),be()},j=(e,t,n,s,o,r,i,l,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:f}=t;if(p>0){if(128&p)return void q(a,d,n,s,o,r,i,l,c);if(256&p)return void H(a,d,n,s,o,r,i,l,c)}8&f?(16&u&&X(a,o,r),d!==a&&h(n,d)):16&u?16&f?q(a,d,n,s,o,r,i,l,c):X(a,o,r,!0):(8&u&&h(n,""),16&f&&N(d,n,s,o,r,i,l,c))},H=(e,t,n,o,r,i,l,c,a)=>{const u=(e=e||s).length,d=(t=t||s).length,p=Math.min(u,d);let h;for(h=0;h<p;h++){const s=t[h]=a?or(t[h]):sr(t[h]);y(e[h],s,n,null,r,i,l,c,a)}u>d?X(e,r,i,!0,!1,p):N(t,n,o,r,i,l,c,a,p)},q=(e,t,n,o,r,i,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;for(;u<=p&&u<=h;){const s=e[u],o=t[u]=a?or(t[u]):sr(t[u]);if(!Go(s,o))break;y(s,o,n,null,r,i,l,c,a),u++}for(;u<=p&&u<=h;){const s=e[p],o=t[h]=a?or(t[h]):sr(t[h]);if(!Go(s,o))break;y(s,o,n,null,r,i,l,c,a),p--,h--}if(u>p){if(u<=h){const e=h+1,s=e<d?t[e].el:o;for(;u<=h;)y(null,t[u]=a?or(t[u]):sr(t[u]),n,s,r,i,l,c,a),u++}}else if(u>h)for(;u<=p;)K(e[u],r,i,!0),u++;else{const f=u,m=u,g=new Map;for(u=m;u<=h;u++){const e=t[u]=a?or(t[u]):sr(t[u]);null!=e.key&&g.set(e.key,u)}let v,b=0;const _=h-m+1;let S=!1,x=0;const C=new Array(_);for(u=0;u<_;u++)C[u]=0;for(u=f;u<=p;u++){const s=e[u];if(b>=_){K(s,r,i,!0);continue}let o;if(null!=s.key)o=g.get(s.key);else for(v=m;v<=h;v++)if(0===C[v-m]&&Go(s,t[v])){o=v;break}void 0===o?K(s,r,i,!0):(C[o-m]=u+1,o>=x?x=o:S=!0,y(s,t[o],n,null,r,i,l,c,a),b++)}const k=S?function(e){const t=e.slice(),n=[0];let s,o,r,i,l;const c=e.length;for(s=0;s<c;s++){const c=e[s];if(0!==c){if(o=n[n.length-1],e[o]<c){t[s]=o,n.push(s);continue}for(r=0,i=n.length-1;r<i;)l=r+i>>1,e[n[l]]<c?r=l+1:i=l;c<e[n[r]]&&(r>0&&(t[s]=n[r-1]),n[r]=s)}}r=n.length,i=n[r-1];for(;r-- >0;)n[r]=i,i=t[i];return n}(C):s;for(v=k.length-1,u=_-1;u>=0;u--){const e=m+u,s=t[e],p=e+1<d?t[e+1].el:o;0===C[u]?y(null,s,n,p,r,i,l,c,a):S&&(v<0||u!==k[v]?W(s,n,p,2):v--)}}},W=(e,t,n,s,o=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void W(e.component.subTree,t,n,s);if(128&u)return void e.suspense.move(t,n,s);if(64&u)return void l.move(e,t,n,ee);if(l===Mo){r(i,t,n);for(let e=0;e<a.length;e++)W(a[e],t,n,s);return void r(e.anchor,t,n)}if(l===Bo)return void(({el:e,anchor:t},n,s)=>{let o;for(;e&&e!==t;)o=m(e),r(e,n,s),e=o;r(t,n,s)})(e,t,n);if(2!==s&&1&u&&c)if(0===s)c.beforeEnter(i),r(i,t,n),bo((()=>c.enter(i)),o);else{const{leave:e,delayLeave:s,afterLeave:o}=c,l=()=>r(i,t,n),a=()=>{e(i,(()=>{l(),o&&o()}))};s?s(i,l,a):a()}else r(i,t,n)},K=(e,t,n,s=!1,o=!1)=>{const{type:r,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:d,dirs:p}=e;if(null!=l&&fo(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const h=1&u&&p,f=!os(e);let m;if(f&&(m=i&&i.onVnodeBeforeUnmount)&&lr(m,t,e),6&u)J(e.component,n,s);else{if(128&u)return void e.suspense.unmount(n,s);h&&qn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,o,ee,s):a&&(r!==Mo||d>0&&64&d)?X(a,t,n,!1,!0):(r===Mo&&384&d||!o&&16&u)&&X(c,t,n),s&&z(e)}(f&&(m=i&&i.onVnodeUnmounted)||h)&&bo((()=>{m&&lr(m,t,e),h&&qn(e,null,t,"unmounted")}),n)},z=e=>{const{type:t,el:n,anchor:s,transition:o}=e;if(t===Mo)return void G(n,s);if(t===Bo)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)})(e);const r=()=>{i(n),o&&!o.persisted&&o.afterLeave&&o.afterLeave()};if(1&e.shapeFlag&&o&&!o.persisted){const{leave:t,delayLeave:s}=o,i=()=>t(n,r);s?s(e.el,r,i):i()}else r()},G=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},J=(e,t,n)=>{const{bum:s,scope:o,update:r,subTree:i,um:l}=e;s&&P(s),o.stop(),r&&(r.active=!1,K(i,e,t,n)),l&&bo(l,t),bo((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,s=!1,o=!1,r=0)=>{for(let i=r;i<e.length;i++)K(e[i],t,n,s,o)},Q=e=>6&e.shapeFlag?Q(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el);let Z=!1;const Y=(e,t,n)=>{null==e?t._vnode&&K(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,rn(),ln(),Z=!1),t._vnode=e},ee={p:y,um:K,m:W,r:z,mt:M,mc:N,pc:j,pbc:E,n:Q,o:e};let te,ne;return t&&([te,ne]=t(ee)),{render:Y,hydrate:te,createApp:Js(Y,te)}}function Co({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ko({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function To(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wo(e,t,n=!1){const s=e.children,o=t.children;if(p(s)&&p(o))for(let r=0;r<s.length;r++){const e=s[r];let t=o[r];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=o[r]=or(o[r]),t.el=e.el),n||wo(e,t)),t.type===Po&&(t.el=e.el)}}function No(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:No(t)}const Ao=e=>e&&(e.disabled||""===e.disabled),Eo=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Io=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,Ro=(e,t)=>{const n=e&&e.to;if(v(n)){if(t){return t(n)}return null}return n};function Oo(e,t,n,{o:{insert:s},m:o},r=2){0===r&&s(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,d=2===r;if(d&&s(i,t,n),(!d||Ao(u))&&16&c)for(let p=0;p<a.length;p++)o(a[p],t,n,2);d&&s(l,t,n)}const Fo={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,r,i,l,c,a){const{mc:u,pc:d,pbc:p,o:{insert:h,querySelector:f,createText:m}}=a,g=Ao(t.props);let{shapeFlag:v,children:y,dynamicChildren:b}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");h(e,n,s),h(a,n,s);const d=t.target=Ro(t.props,f),p=t.targetAnchor=m("");d&&(h(p,d),"svg"===i||Eo(d)?i="svg":("mathml"===i||Io(d))&&(i="mathml"));const b=(e,t)=>{16&v&&u(y,e,t,o,r,i,l,c)};g?b(n,a):d&&b(d,p)}else{t.el=e.el;const s=t.anchor=e.anchor,u=t.target=e.target,h=t.targetAnchor=e.targetAnchor,m=Ao(e.props),v=m?n:u,y=m?s:h;if("svg"===i||Eo(u)?i="svg":("mathml"===i||Io(u))&&(i="mathml"),b?(p(e.dynamicChildren,b,v,o,r,i,l),wo(e,t,!0)):c||d(e,t,v,y,o,r,i,l,!1),g)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Oo(t,n,s,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Ro(t.props,f);e&&Oo(t,e,null,a,0)}else m&&Oo(t,u,h,a,1)}Lo(t)},remove(e,t,n,s,{um:o,o:{remove:r}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:d,props:p}=e;if(d&&r(u),i&&r(a),16&l){const e=i||!Ao(p);for(let s=0;s<c.length;s++){const r=c[s];o(r,t,n,e,!!r.dynamicChildren)}}},move:Oo,hydrate:function(e,t,n,s,o,r,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=Ro(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(Ao(t.props))t.anchor=a(i(e),t,l(e),n,s,o,r),t.targetAnchor=c;else{t.anchor=i(e);let l=c;for(;l;)if(l=i(l),l&&8===l.nodeType&&"teleport anchor"===l.data){t.targetAnchor=l,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(c,t,u,n,s,o,r)}Lo(t)}return t.anchor&&i(t.anchor)}};function Lo(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const Mo=Symbol.for("v-fgt"),Po=Symbol.for("v-txt"),$o=Symbol.for("v-cmt"),Bo=Symbol.for("v-stc"),Vo=[];let Do=null;function Uo(e=!1){Vo.push(Do=e?null:[])}function jo(){Vo.pop(),Do=Vo[Vo.length-1]||null}let Ho=1;function qo(e){Ho+=e}function Wo(e){return e.dynamicChildren=Ho>0?Do||s:null,jo(),Ho>0&&Do&&Do.push(e),e}function Ko(e,t,n,s,o){return Wo(Yo(e,t,n,s,o,!0))}function zo(e){return!!e&&!0===e.__v_isVNode}function Go(e,t){return e.type===t.type&&e.key===t.key}const Jo="__vInternal",Xo=({key:e})=>null!=e?e:null,Qo=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||Rt(e)||g(e)?{i:fn,r:e,k:t,f:!!n}:e:null);function Zo(e,t=null,n=null,s=0,o=null,r=(e===Mo?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xo(t),ref:t&&Qo(t),scopeId:mn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:fn};return l?(rr(c,n),128&r&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),Ho>0&&!i&&Do&&(c.patchFlag>0||6&r)&&32!==c.patchFlag&&Do.push(c),c}const Yo=function(e,t=null,n=null,s=0,o=null,r=!1){e&&e!==kn||(e=$o);if(zo(e)){const s=tr(e,t,!0);return n&&rr(s,n),Ho>0&&!r&&Do&&(6&s.shapeFlag?Do[Do.indexOf(e)]=s:Do.push(s)),s.patchFlag|=-2,s}i=e,g(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=er(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=G(e)),b(n)&&(Ct(n)&&!p(n)&&(n=c({},n)),t.style=H(n))}const l=v(e)?1:Nn(e)?128:(e=>e.__isTeleport)(e)?64:b(e)?4:g(e)?2:0;return Zo(e,t,n,s,o,l,r,!0)};function er(e){return e?Ct(e)||Jo in e?c({},e):e:null}function tr(e,t,n=!1){const{props:s,ref:o,patchFlag:r,children:i}=e,l=t?ir(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Xo(l),ref:t&&t.ref?n&&o?p(o)?o.concat(Qo(t)):[o,Qo(t)]:Qo(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Mo?-1===r?16:16|r:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&tr(e.ssContent),ssFallback:e.ssFallback&&tr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function nr(e=" ",t=0){return Yo(Po,null,e,t)}function sr(e){return null==e||"boolean"==typeof e?Yo($o):p(e)?Yo(Mo,null,e.slice()):"object"==typeof e?or(e):Yo(Po,null,String(e))}function or(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:tr(e)}function rr(e,t){let n=0;const{shapeFlag:s}=e;if(null==t)t=null;else if(p(t))n=16;else if("object"==typeof t){if(65&s){const n=t.default;return void(n&&(n._c&&(n._d=!1),rr(e,n()),n._c&&(n._d=!0)))}{n=32;const s=t._;s||Jo in t?3===s&&fn&&(1===fn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=fn}}else g(t)?(t={default:t,_ctx:fn},n=32):(t=String(t),64&s?(n=16,t=[nr(t)]):n=8);e.children=t,e.shapeFlag|=n}function ir(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const e in s)if("class"===e)t.class!==s.class&&(t.class=G([t.class,s.class]));else if("style"===e)t.style=H([t.style,s.style]);else if(i(e)){const n=t[e],o=s[e];!o||n===o||p(n)&&n.includes(o)||(t[e]=n?[].concat(n,o):o)}else""!==e&&(t[e]=s[e])}return t}function lr(e,t,n,s=null){qt(e,t,7,[n,s])}const cr=zs();let ar=0;let ur=null;const dr=()=>ur||fn;let pr,hr;pr=e=>{ur=e},hr=e=>{br=e};const fr=e=>{const t=ur;return pr(e),e.scope.on(),()=>{e.scope.off(),pr(t)}},mr=()=>{ur&&ur.scope.off(),pr(null)};function gr(e){return 4&e.vnode.shapeFlag}let vr,yr,br=!1;function _r(e,t,n){g(t)?e.render=t:b(t)&&(e.setupState=$t(t)),xr(e,n)}function Sr(e){vr=e,yr=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Os))}}function xr(e,t,n){const s=e.type;if(!e.render){if(!t&&vr&&!s.render){const t=s.template||Vs(e).template;if(t){const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:r,compilerOptions:i}=s,l=c(c({isCustomElement:n,delimiters:r},o),i);s.render=vr(t,l)}}e.render=s.render||o,yr&&yr(e)}{const t=fr(e);ye();try{Ps(e)}finally{be(),t()}}}function Cr(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(Ie(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function kr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy($t(Tt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Es?Es[n](e):void 0,has:(e,t)=>t in e||t in Es}))}function Tr(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}const wr=(e,t)=>function(e,t,n=!1){let s,r;const i=g(e);return i?(s=e,r=o):(s=e.get,r=e.set),new At(s,r,i||!r,n)}(e,0,br);function Nr(e,t,n){const s=arguments.length;return 2===s?b(t)&&!p(t)?zo(t)?Yo(e,null,[t]):Yo(e,t):Yo(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):3===s&&zo(n)&&(n=[n]),Yo(e,t,n))}function Ar(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s<n.length;s++)if(M(n[s],t[s]))return!1;return Ho>0&&Do&&Do.push(e),!0}const Er="3.4.15",Ir=o,Rr=o,Or="undefined"!=typeof document?document:null,Fr=Or&&Or.createElement("template"),Lr={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o="svg"===t?Or.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Or.createElementNS("http://www.w3.org/1998/Math/MathML",e):Or.createElement(e,n?{is:n}:void 0);return"select"===e&&s&&null!=s.multiple&&o.setAttribute("multiple",s.multiple),o},createText:e=>Or.createTextNode(e),createComment:e=>Or.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Or.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const i=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==r&&(o=o.nextSibling););else{Fr.innerHTML="svg"===s?`<svg>${e}</svg>`:"mathml"===s?`<math>${e}</math>`:e;const o=Fr.content;if("svg"===s||"mathml"===s){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Mr="transition",Pr="animation",$r=Symbol("_vtc"),Br=(e,{slots:t})=>Nr(Xn,Hr(e),t);Br.displayName="Transition";const Vr={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Dr=Br.props=c({},Jn,Vr),Ur=(e,t=[])=>{p(e)?e.forEach((e=>e(...t))):e&&e(...t)},jr=e=>!!e&&(p(e)?e.some((e=>e.length>1)):e.length>1);function Hr(e){const t={};for(const c in e)c in Vr||(t[c]=e[c]);if(!1===e.css)return t;const{name:n="v",type:s,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:u=i,appearToClass:d=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(b(e))return[qr(e.enter),qr(e.leave)];{const t=qr(e);return[t,t]}}(o),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:_,onEnterCancelled:S,onLeave:x,onLeaveCancelled:C,onBeforeAppear:k=y,onAppear:T=_,onAppearCancelled:w=S}=t,N=(e,t,n)=>{Kr(e,t?d:l),Kr(e,t?u:i),n&&n()},A=(e,t)=>{e._isLeaving=!1,Kr(e,p),Kr(e,f),Kr(e,h),t&&t()},E=e=>(t,n)=>{const o=e?T:_,i=()=>N(t,e,n);Ur(o,[t,i]),zr((()=>{Kr(t,e?a:r),Wr(t,e?d:l),jr(o)||Jr(t,s,g,i)}))};return c(t,{onBeforeEnter(e){Ur(y,[e]),Wr(e,r),Wr(e,i)},onBeforeAppear(e){Ur(k,[e]),Wr(e,a),Wr(e,u)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>A(e,t);Wr(e,p),Yr(),Wr(e,h),zr((()=>{e._isLeaving&&(Kr(e,p),Wr(e,f),jr(x)||Jr(e,s,v,n))})),Ur(x,[e,n])},onEnterCancelled(e){N(e,!1),Ur(S,[e])},onAppearCancelled(e){N(e,!0),Ur(w,[e])},onLeaveCancelled(e){A(e),Ur(C,[e])}})}function qr(e){return V(e)}function Wr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[$r]||(e[$r]=new Set)).add(t)}function Kr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[$r];n&&(n.delete(t),n.size||(e[$r]=void 0))}function zr(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Gr=0;function Jr(e,t,n,s){const o=e._endId=++Gr,r=()=>{o===e._endId&&s()};if(n)return setTimeout(r,n);const{type:i,timeout:l,propCount:c}=Xr(e,t);if(!i)return s();const a=i+"end";let u=0;const d=()=>{e.removeEventListener(a,p),r()},p=t=>{t.target===e&&++u>=c&&d()};setTimeout((()=>{u<c&&d()}),l+1),e.addEventListener(a,p)}function Xr(e,t){const n=window.getComputedStyle(e),s=e=>(n[e]||"").split(", "),o=s(`${Mr}Delay`),r=s(`${Mr}Duration`),i=Qr(o,r),l=s(`${Pr}Delay`),c=s(`${Pr}Duration`),a=Qr(l,c);let u=null,d=0,p=0;t===Mr?i>0&&(u=Mr,d=i,p=r.length):t===Pr?a>0&&(u=Pr,d=a,p=c.length):(d=Math.max(i,a),u=d>0?i>a?Mr:Pr:null,p=u?u===Mr?r.length:c.length:0);return{type:u,timeout:d,propCount:p,hasTransform:u===Mr&&/\b(transform|all)(,|$)/.test(s(`${Mr}Property`).toString())}}function Qr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Zr(t)+Zr(e[n]))))}function Zr(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Yr(){return document.body.offsetHeight}const ei=Symbol("_vod"),ti={beforeMount(e,{value:t},{transition:n}){e[ei]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ni(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),ni(e,!0),s.enter(e)):s.leave(e,(()=>{ni(e,!1)})):ni(e,t))},beforeUnmount(e,{value:t}){ni(e,t)}};function ni(e,t){e.style.display=t?e[ei]:"none"}const si=Symbol("");function oi(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{oi(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)ri(e.el,t);else if(e.type===Mo)e.children.forEach((e=>oi(e,t)));else if(e.type===Bo){let{el:n,anchor:s}=e;for(;n&&(ri(n,t),n!==s);)n=n.nextSibling}}function ri(e,t){if(1===e.nodeType){const n=e.style;let s="";for(const e in t)n.setProperty(`--${e}`,t[e]),s+=`--${e}: ${t[e]};`;n[si]=s}}const ii=/\s*!important$/;function li(e,t,n){if(p(n))n.forEach((n=>li(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=function(e,t){const n=ai[t];if(n)return n;let s=I(t);if("filter"!==s&&s in e)return ai[t]=s;s=F(s);for(let o=0;o<ci.length;o++){const n=ci[o]+s;if(n in e)return ai[t]=n}return t}(e,t);ii.test(n)?e.setProperty(O(s),n.replace(ii,""),"important"):e[s]=n}}const ci=["Webkit","Moz","ms"],ai={};const ui="http://www.w3.org/1999/xlink";function di(e,t,n,s){e.addEventListener(t,n,s)}const pi=Symbol("_vei");function hi(e,t,n,s,o=null){const r=e[pi]||(e[pi]={}),i=r[t];if(s&&i)i.value=s;else{const[n,l]=function(e){let t;if(fi.test(e)){let n;for(t={};n=e.match(fi);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):O(e.slice(2));return[n,t]}(t);if(s){const i=r[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();qt(function(e,t){if(p(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=vi(),n}(s,o);di(e,n,i,l)}else i&&(!function(e,t,n,s){e.removeEventListener(t,n,s)}(e,n,i,l),r[t]=void 0)}}const fi=/(?:Once|Passive|Capture)$/;let mi=0;const gi=Promise.resolve(),vi=()=>mi||(gi.then((()=>mi=0)),mi=Date.now());const yi=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123; +/*! #__NO_SIDE_EFFECTS__ */ +function bi(e,t){const n=ss(e);class s extends Si{constructor(e){super(n,e,t)}}return s.def=n,s} +/*! #__NO_SIDE_EFFECTS__ */const _i="undefined"!=typeof HTMLElement?HTMLElement:class{};class Si extends _i{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),tn((()=>{this._connected||(Yi(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:s}=e;let o;if(n&&!p(n))for(const r in n){const e=n[r];(e===Number||e&&e.type===Number)&&(r in this._props&&(this._props[r]=V(this._props[r])),(o||(o=Object.create(null)))[I(r)]=!0)}this._numberProps=o,t&&this._resolveProps(e),this._applyStyles(s),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=p(t)?t:Object.keys(t||{});for(const s of Object.keys(this))"_"!==s[0]&&n.includes(s)&&this._setProp(s,this[s],!0,!1);for(const s of n.map(I))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(e){this._setProp(s,e)}})}_setAttr(e){let t=this.getAttribute(e);const n=I(e);this._numberProps&&this._numberProps[n]&&(t=V(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,s=!0){t!==this._props[e]&&(this._props[e]=t,s&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(O(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(O(e),t+""):t||this.removeAttribute(O(e))))}_update(){Yi(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Yo(this._def,c({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),O(e)!==e&&t(O(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof Si){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}const xi=new WeakMap,Ci=new WeakMap,ki=Symbol("_moveCb"),Ti=Symbol("_enterCb"),wi={name:"TransitionGroup",props:c({},Dr,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=dr(),s=zn();let o,r;return _s((()=>{if(!o.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const s=e.cloneNode(),o=e[$r];o&&o.forEach((e=>{e.split(/\s+/).forEach((e=>e&&s.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&s.classList.add(e))),s.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(s);const{hasTransform:i}=Xr(s);return r.removeChild(s),i}(o[0].el,n.vnode.el,t))return;o.forEach(Ai),o.forEach(Ei);const s=o.filter(Ii);Yr(),s.forEach((e=>{const n=e.el,s=n.style;Wr(n,t),s.transform=s.webkitTransform=s.transitionDuration="";const o=n[ki]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",o),n[ki]=null,Kr(n,t))};n.addEventListener("transitionend",o)}))})),()=>{const i=kt(e),l=Hr(i);let c=i.tag||Mo;o=r,r=t.default?ns(t.default()):[];for(let e=0;e<r.length;e++){const t=r[e];null!=t.key&&ts(t,Zn(t,l,s,n))}if(o)for(let e=0;e<o.length;e++){const t=o[e];ts(t,Zn(t,l,s,n)),xi.set(t,t.el.getBoundingClientRect())}return Yo(c,null,r)}}},Ni=wi;function Ai(e){const t=e.el;t[ki]&&t[ki](),t[Ti]&&t[Ti]()}function Ei(e){Ci.set(e,e.el.getBoundingClientRect())}function Ii(e){const t=xi.get(e),n=Ci.get(e),s=t.left-n.left,o=t.top-n.top;if(s||o){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${s}px,${o}px)`,t.transitionDuration="0s",e}}const Ri=e=>{const t=e.props["onUpdate:modelValue"]||!1;return p(t)?e=>P(t,e):t};function Oi(e){e.target.composing=!0}function Fi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Li=Symbol("_assign"),Mi={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e[Li]=Ri(o);const r=s||o.props&&"number"===o.props.type;di(e,t?"change":"input",(t=>{if(t.target.composing)return;let s=e.value;n&&(s=s.trim()),r&&(s=B(s)),e[Li](s)})),n&&di(e,"change",(()=>{e.value=e.value.trim()})),t||(di(e,"compositionstart",Oi),di(e,"compositionend",Fi),di(e,"change",Fi))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:o}},r){if(e[Li]=Ri(r),e.composing)return;const i=null==t?"":t;if((o||"number"===e.type?B(e.value):e.value)!==i){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(s&&e.value.trim()===i)return}e.value=i}}},Pi={deep:!0,created(e,t,n){e[Li]=Ri(n),di(e,"change",(()=>{const t=e._modelValue,n=Ui(e),s=e.checked,o=e[Li];if(p(t)){const e=ne(t,n),r=-1!==e;if(s&&!r)o(t.concat(n));else if(!s&&r){const n=[...t];n.splice(e,1),o(n)}}else if(f(t)){const e=new Set(t);s?e.add(n):e.delete(n),o(e)}else o(ji(e,s))}))},mounted:$i,beforeUpdate(e,t,n){e[Li]=Ri(n),$i(e,t,n)}};function $i(e,{value:t,oldValue:n},s){e._modelValue=t,p(t)?e.checked=ne(t,s.props.value)>-1:f(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=te(t,ji(e,!0)))}const Bi={created(e,{value:t},n){e.checked=te(t,n.props.value),e[Li]=Ri(n),di(e,"change",(()=>{e[Li](Ui(e))}))},beforeUpdate(e,{value:t,oldValue:n},s){e[Li]=Ri(s),t!==n&&(e.checked=te(t,s.props.value))}},Vi={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const o=f(t);di(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?B(Ui(e)):Ui(e)));e[Li](e.multiple?o?new Set(t):t:t[0]),e._assigning=!0,tn((()=>{e._assigning=!1}))})),e[Li]=Ri(s)},mounted(e,{value:t,oldValue:n,modifiers:{number:s}}){Di(e,t,n,s)},beforeUpdate(e,t,n){e[Li]=Ri(n)},updated(e,{value:t,oldValue:n,modifiers:{number:s}}){e._assigning||Di(e,t,n,s)}};function Di(e,t,n,s){const o=e.multiple,r=p(t);if((!o||r||f(t))&&(!r||!te(t,n))){for(let n=0,i=e.options.length;n<i;n++){const i=e.options[n],l=Ui(i);if(o)if(r){const e=typeof l;i.selected="string"===e||"number"===e?t.includes(s?B(l):l):ne(t,l)>-1}else i.selected=t.has(l);else if(te(Ui(i),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}o||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Ui(e){return"_value"in e?e._value:e.value}function ji(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Hi={created(e,t,n){qi(e,t,n,null,"created")},mounted(e,t,n){qi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){qi(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){qi(e,t,n,s,"updated")}};function qi(e,t,n,s,o){const r=function(e,t){switch(e){case"SELECT":return Vi;case"TEXTAREA":return Mi;default:switch(t){case"checkbox":return Pi;case"radio":return Bi;default:return Mi}}}(e.tagName,n.props&&n.props.type)[o];r&&r(e,t,n,s)}const Wi=["ctrl","shift","alt","meta"],Ki={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Wi.some((n=>e[`${n}Key`]&&!t.includes(n)))},zi={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Gi=c({patchProp:(e,t,n,s,o,r,c,a,u)=>{const d="svg"===o;"class"===t?function(e,t,n){const s=e[$r];s&&(t=(t?[t,...s]:[...s]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,d):"style"===t?function(e,t,n){const s=e.style,o=s.display,r=v(n);if(n&&!r){if(t&&!v(t))for(const e in t)null==n[e]&&li(s,e,"");for(const e in n)li(s,e,n[e])}else if(r){if(t!==n){const e=s[si];e&&(n+=";"+e),s.cssText=n}}else t&&e.removeAttribute("style");ei in e&&(s.display=o)}(e,n,s):i(t)?l(t)||hi(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,s){if(s)return"innerHTML"===t||"textContent"===t||!!(t in e&&yi(t)&&g(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(yi(t)&&v(n))return!1;return t in e}(e,t,s,d))?function(e,t,n,s,o,r,i){if("innerHTML"===t||"textContent"===t)return s&&i(s,o,r),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=n;const s=null==n?"":n;return("OPTION"===l?e.getAttribute("value"):e.value)!==s&&(e.value=s),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const s=typeof e[t];"boolean"===s?n=ee(n):null==n&&"string"===s?(n="",c=!0):"number"===s&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,r,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,n,s,o){if(s&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(ui,t.slice(6,t.length)):e.setAttributeNS(ui,t,n);else{const s=Y(t);null==n||s&&!ee(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}(e,t,s,d))}},Lr);let Ji,Xi=!1;function Qi(){return Ji||(Ji=_o(Gi))}function Zi(){return Ji=Xi?Ji:So(Gi),Xi=!0,Ji}const Yi=(...e)=>{Qi().render(...e)},el=(...e)=>{Zi().hydrate(...e)};function tl(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function nl(e){if(v(e)){return document.querySelector(e)}return e}const sl=o,ol=Symbol(""),rl=Symbol(""),il=Symbol(""),ll=Symbol(""),cl=Symbol(""),al=Symbol(""),ul=Symbol(""),dl=Symbol(""),pl=Symbol(""),hl=Symbol(""),fl=Symbol(""),ml=Symbol(""),gl=Symbol(""),vl=Symbol(""),yl=Symbol(""),bl=Symbol(""),_l=Symbol(""),Sl=Symbol(""),xl=Symbol(""),Cl=Symbol(""),kl=Symbol(""),Tl=Symbol(""),wl=Symbol(""),Nl=Symbol(""),Al=Symbol(""),El=Symbol(""),Il=Symbol(""),Rl=Symbol(""),Ol=Symbol(""),Fl=Symbol(""),Ll=Symbol(""),Ml=Symbol(""),Pl=Symbol(""),$l=Symbol(""),Bl=Symbol(""),Vl=Symbol(""),Dl=Symbol(""),Ul=Symbol(""),jl=Symbol(""),Hl={[ol]:"Fragment",[rl]:"Teleport",[il]:"Suspense",[ll]:"KeepAlive",[cl]:"BaseTransition",[al]:"openBlock",[ul]:"createBlock",[dl]:"createElementBlock",[pl]:"createVNode",[hl]:"createElementVNode",[fl]:"createCommentVNode",[ml]:"createTextVNode",[gl]:"createStaticVNode",[vl]:"resolveComponent",[yl]:"resolveDynamicComponent",[bl]:"resolveDirective",[_l]:"resolveFilter",[Sl]:"withDirectives",[xl]:"renderList",[Cl]:"renderSlot",[kl]:"createSlots",[Tl]:"toDisplayString",[wl]:"mergeProps",[Nl]:"normalizeClass",[Al]:"normalizeStyle",[El]:"normalizeProps",[Il]:"guardReactiveProps",[Rl]:"toHandlers",[Ol]:"camelize",[Fl]:"capitalize",[Ll]:"toHandlerKey",[Ml]:"setBlockTracking",[Pl]:"pushScopeId",[$l]:"popScopeId",[Bl]:"withCtx",[Vl]:"unref",[Dl]:"isRef",[Ul]:"withMemo",[jl]:"isMemoSame"};const ql={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Wl(e,t,n,s,o,r,i,l=!1,c=!1,a=!1,u=ql){return e&&(l?(e.helper(al),e.helper(tc(e.inSSR,a))):e.helper(ec(e.inSSR,a)),i&&e.helper(Sl)),{type:13,tag:t,props:n,children:s,patchFlag:o,dynamicProps:r,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function Kl(e,t=ql){return{type:17,loc:t,elements:e}}function zl(e,t=ql){return{type:15,loc:t,properties:e}}function Gl(e,t){return{type:16,loc:ql,key:v(e)?Jl(e,!0):e,value:t}}function Jl(e,t=!1,n=ql,s=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:s}}function Xl(e,t=ql){return{type:8,loc:t,children:e}}function Ql(e,t=[],n=ql){return{type:14,loc:n,callee:e,arguments:t}}function Zl(e,t=void 0,n=!1,s=!1,o=ql){return{type:18,params:e,returns:t,newline:n,isSlot:s,loc:o}}function Yl(e,t,n,s=!0){return{type:19,test:e,consequent:t,alternate:n,newline:s,loc:ql}}function ec(e,t){return e||t?pl:hl}function tc(e,t){return e||t?ul:dl}function nc(e,{helper:t,removeHelper:n,inSSR:s}){e.isBlock||(e.isBlock=!0,n(ec(s,e.isComponent)),t(al),t(tc(s,e.isComponent)))}const sc=new Uint8Array([123,123]),oc=new Uint8Array([125,125]);function rc(e){return e>=97&&e<=122||e>=65&&e<=90}function ic(e){return 32===e||10===e||9===e||12===e||13===e}function lc(e){return 47===e||62===e||ic(e)}function cc(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const ac={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};function uc(e){throw e}function dc(e){}function pc(e,t,n,s){const o=new SyntaxError(String(`https://vuejs.org/error-reference/#compiler-${e}`));return o.code=e,o.loc=t,o}const hc=e=>4===e.type&&e.isStatic;function fc(e){switch(e){case"Teleport":case"teleport":return rl;case"Suspense":case"suspense":return il;case"KeepAlive":case"keep-alive":return ll;case"BaseTransition":case"base-transition":return cl}}const mc=/^\d|[^\$\w]/,gc=e=>!mc.test(e),vc=/[A-Za-z_$\xA0-\uFFFF]/,yc=/[\.\?\w$\xA0-\uFFFF]/,bc=/\s+[.[]\s*|\s*[.[]\s+/g,_c=e=>{e=e.trim().replace(bc,(e=>e.trim()));let t=0,n=[],s=0,o=0,r=null;for(let i=0;i<e.length;i++){const l=e.charAt(i);switch(t){case 0:if("["===l)n.push(t),t=1,s++;else if("("===l)n.push(t),t=2,o++;else if(!(0===i?vc:yc).test(l))return!1;break;case 1:"'"===l||'"'===l||"`"===l?(n.push(t),t=3,r=l):"["===l?s++:"]"===l&&(--s||(t=n.pop()));break;case 2:if("'"===l||'"'===l||"`"===l)n.push(t),t=3,r=l;else if("("===l)o++;else if(")"===l){if(i===e.length-1)return!1;--o||(t=n.pop())}break;case 3:l===r&&(t=n.pop(),r=null)}}return!s&&!o};function Sc(e,t,n=!1){for(let s=0;s<e.props.length;s++){const o=e.props[s];if(7===o.type&&(n||o.exp)&&(v(t)?o.name===t:t.test(o.name)))return o}}function xc(e,t,n=!1,s=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(6===r.type){if(n)continue;if(r.name===t&&(r.value||s))return r}else if("bind"===r.name&&(r.exp||s)&&Cc(r.arg,t))return r}}function Cc(e,t){return!(!e||!hc(e)||e.content!==t)}function kc(e){return 5===e.type||2===e.type}function Tc(e){return 7===e.type&&"slot"===e.name}function wc(e){return 1===e.type&&3===e.tagType}function Nc(e){return 1===e.type&&2===e.tagType}const Ac=new Set([El,Il]);function Ec(e,t=[]){if(e&&!v(e)&&14===e.type){const n=e.callee;if(!v(n)&&Ac.has(n))return Ec(e.arguments[0],t.concat(e))}return[e,t]}function Ic(e,t,n){let s,o,r=13===e.type?e.props:e.arguments[2],i=[];if(r&&!v(r)&&14===r.type){const e=Ec(r);r=e[0],i=e[1],o=i[i.length-1]}if(null==r||v(r))s=zl([t]);else if(14===r.type){const e=r.arguments[0];v(e)||15!==e.type?r.callee===Rl?s=Ql(n.helper(wl),[zl([t]),r]):r.arguments.unshift(zl([t])):Rc(t,e)||e.properties.unshift(t),!s&&(s=r)}else 15===r.type?(Rc(t,r)||r.properties.unshift(t),s=r):(s=Ql(n.helper(wl),[zl([t]),r]),o&&o.callee===Il&&(o=i[i.length-2]));13===e.type?o?o.arguments[0]=s:e.props=s:o?o.arguments[0]=s:e.arguments[2]=s}function Rc(e,t){let n=!1;if(4===e.key.type){const s=e.key.content;n=t.properties.some((e=>4===e.key.type&&e.key.content===s))}return n}function Oc(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const Fc=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Lc={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:r,isPreTag:r,isCustomElement:r,onError:uc,onWarn:dc,comments:!1,prefixIdentifiers:!1};let Mc=Lc,Pc=null,$c="",Bc=null,Vc=null,Dc="",Uc=-1,jc=-1,Hc=0,qc=!1,Wc=null;const Kc=[],zc=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=sc,this.delimiterClose=oc,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=sc,this.delimiterClose=oc}getPos(e){let t=1,n=e+1;for(let s=this.newlines.length-1;s>=0;s--){const o=this.newlines[s];if(e>o){t=s+2,n=e-o;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?lc(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||ic(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.sectionStart=t+2,this.stateInClosingTagName(e),void(this.inRCDATA=!1)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===ac.TitleEnd||this.currentSequence===ac.TextareaEnd&&!this.inSFCRoot?e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===ac.Cdata[this.sequenceIndex]?++this.sequenceIndex===ac.Cdata.length&&(this.state=28,this.currentSequence=ac.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===ac.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){if(33===e)this.state=22,this.sectionStart=this.index+1;else if(63===e)this.state=24,this.sectionStart=this.index+1;else if(rc(e))if(this.sectionStart=this.index,0===this.mode)this.state=6;else if(this.inSFCRoot)this.state=34;else if(this.inXML)this.state=6;else{const t=32|e;this.state=116===t?30:115===t?29:6}else 47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){lc(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(lc(e)){const t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(cc("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){ic(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=rc(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||ic(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):ic(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):ic(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||lc(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||lc(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||lc(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||lc(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||lc(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):ic(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):ic(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){ic(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):39!==e&&60!==e&&61!==e&&96!==e||this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=ac.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){const t=32|e;t===ac.ScriptEnd[3]?this.startSpecial(ac.ScriptEnd,4):t===ac.StyleEnd[3]?this.startSpecial(ac.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){const t=32|e;t===ac.TitleEnd[3]?this.startSpecial(ac.TitleEnd,4):t===ac.TextareaEnd[3]?this.startSpecial(ac.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):19!==this.state&&20!==this.state&&21!==this.state||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===ac.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(Kc,{onerr:pa,ontext(e,t){Zc(Xc(e,t),e,t)},ontextentity(e,t,n){Zc(e,t,n)},oninterpolation(e,t){if(qc)return Zc(Xc(e,t),e,t);let n=e+zc.delimiterOpen.length,s=t-zc.delimiterClose.length;for(;ic($c.charCodeAt(n));)n++;for(;ic($c.charCodeAt(s-1));)s--;let o=Xc(n,s);o.includes("&")&&(o=Mc.decodeEntities(o,!1)),la({type:5,content:da(o,!1,ca(n,s)),loc:ca(e,t)})},onopentagname(e,t){const n=Xc(e,t);Bc={type:1,tag:n,ns:Mc.getNamespace(n,Kc[0],Mc.ns),tagType:0,props:[],children:[],loc:ca(e-1,t),codegenNode:void 0}},onopentagend(e){Qc(e)},onclosetag(e,t){const n=Xc(e,t);if(!Mc.isVoidTag(n)){let s=!1;for(let e=0;e<Kc.length;e++){if(Kc[e].tag.toLowerCase()===n.toLowerCase()){s=!0;for(let n=0;n<=e;n++){Yc(Kc.shift(),t,n<e)}break}}s||ea(e,60)}},onselfclosingtag(e){var t;const n=Bc.tag;Bc.isSelfClosing=!0,Qc(e),(null==(t=Kc[0])?void 0:t.tag)===n&&Yc(Kc.shift(),e)},onattribname(e,t){Vc={type:6,name:Xc(e,t),nameLoc:ca(e,t),value:void 0,loc:ca(e)}},ondirname(e,t){const n=Xc(e,t),s="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(qc||""===s)Vc={type:6,name:n,nameLoc:ca(e,t),value:void 0,loc:ca(e)};else if(Vc={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?["prop"]:[],loc:ca(e)},"pre"===s){qc=zc.inVPre=!0,Wc=Bc;const e=Bc.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=ua(e[t]))}},ondirarg(e,t){if(e===t)return;const n=Xc(e,t);if(qc)Vc.name+=n,aa(Vc.nameLoc,t);else{const s="["!==n[0];Vc.arg=da(s?n:n.slice(1,-1),s,ca(e,t),s?3:0)}},ondirmodifier(e,t){const n=Xc(e,t);if(qc)Vc.name+="."+n,aa(Vc.nameLoc,t);else if("slot"===Vc.name){const e=Vc.arg;e&&(e.content+="."+n,aa(e.loc,t))}else Vc.modifiers.push(n)},onattribdata(e,t){Dc+=Xc(e,t),Uc<0&&(Uc=e),jc=t},onattribentity(e,t,n){Dc+=e,Uc<0&&(Uc=t),jc=n},onattribnameend(e){const t=Xc(Vc.loc.start.offset,e);7===Vc.type&&(Vc.rawName=t),Bc.props.some((e=>(7===e.type?e.rawName:e.name)===t))},onattribend(e,t){if(Bc&&Vc){if(aa(Vc.loc,t),0!==e)if(Dc.includes("&")&&(Dc=Mc.decodeEntities(Dc,!0)),6===Vc.type)"class"===Vc.name&&(Dc=ia(Dc).trim()),Vc.value={type:2,content:Dc,loc:1===e?ca(Uc,jc):ca(Uc-1,jc+1)},zc.inSFCRoot&&"template"===Bc.tag&&"lang"===Vc.name&&Dc&&"html"!==Dc&&zc.enterRCDATA(cc("</template"),0);else{let e=0;Vc.exp=da(Dc,!1,ca(Uc,jc),0,e),"for"===Vc.name&&(Vc.forParseResult=function(e){const t=e.loc,n=e.content,s=n.match(Fc);if(!s)return;const[,o,r]=s,i=(e,n,s=!1)=>{const o=t.start.offset+n;return da(e,!1,ca(o,o+e.length),0,s?1:0)},l={source:i(r.trim(),n.indexOf(r,o.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=o.trim().replace(Jc,"").trim();const a=o.indexOf(c),u=c.match(Gc);if(u){c=c.replace(Gc,"").trim();const e=u[1].trim();let t;if(e&&(t=n.indexOf(e,a+c.length),l.key=i(e,t,!0)),u[2]){const s=u[2].trim();s&&(l.index=i(s,n.indexOf(s,l.key?t+e.length:a+c.length),!0))}}c&&(l.value=i(c,a,!0));return l}(Vc.exp))}7===Vc.type&&"pre"===Vc.name||Bc.props.push(Vc)}Dc="",Uc=jc=-1},oncomment(e,t){Mc.comments&&la({type:3,content:Xc(e,t),loc:ca(e-4,t+3)})},onend(){const e=$c.length;for(let t=0;t<Kc.length;t++)Yc(Kc[t],e-1)},oncdata(e,t){0!==Kc[0].ns&&Zc(Xc(e,t),e,t)},onprocessinginstruction(e){0===(Kc[0]?Kc[0].ns:Mc.ns)&&pa(21,e-1)}}),Gc=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Jc=/^\(|\)$/g;function Xc(e,t){return $c.slice(e,t)}function Qc(e){zc.inSFCRoot&&(Bc.innerLoc=ca(e+1,e+1)),la(Bc);const{tag:t,ns:n}=Bc;0===n&&Mc.isPreTag(t)&&Hc++,Mc.isVoidTag(t)?Yc(Bc,e):(Kc.unshift(Bc),1!==n&&2!==n||(zc.inXML=!0)),Bc=null}function Zc(e,t,n){var s;{const t=null==(s=Kc[0])?void 0:s.tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=Mc.decodeEntities(e,!1))}const o=Kc[0]||Pc,r=o.children[o.children.length-1];2===(null==r?void 0:r.type)?(r.content+=e,aa(r.loc,n)):o.children.push({type:2,content:e,loc:ca(t,n)})}function Yc(e,t,n=!1){aa(e.loc,n?ea(t,60):t+1),zc.inSFCRoot&&(e.innerLoc.end=c({},e.children.length?e.children[e.children.length-1].loc.end:e.innerLoc.start),e.innerLoc.source=Xc(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:s,ns:o}=e;qc||("slot"===s?e.tagType=2:!function({tag:e,props:t}){if("template"===e)for(let n=0;n<t.length;n++)if(7===t[n].type&&ta.has(t[n].name))return!0;return!1}(e)?function({tag:e,props:t}){var n;if(Mc.isCustomElement(e))return!1;if("component"===e||(s=e.charCodeAt(0),s>64&&s<91)||fc(e)||(null==(n=Mc.isBuiltInComponent)?void 0:n.call(Mc,e))||Mc.isNativeTag&&!Mc.isNativeTag(e))return!0;var s;for(let o=0;o<t.length;o++){const e=t[o];if(6===e.type&&"is"===e.name&&e.value&&e.value.content.startsWith("vue:"))return!0}return!1}(e)&&(e.tagType=1):e.tagType=3),zc.inRCDATA||(e.children=sa(e.children,e.tag)),0===o&&Mc.isPreTag(s)&&Hc--,Wc===e&&(qc=zc.inVPre=!1,Wc=null),zc.inXML&&0===(Kc[0]?Kc[0].ns:Mc.ns)&&(zc.inXML=!1)}function ea(e,t){let n=e;for(;$c.charCodeAt(n)!==t&&n>=0;)n--;return n}const ta=new Set(["if","else","else-if","for","slot"]);const na=/\r\n/g;function sa(e,t){var n,s;const o="preserve"!==Mc.whitespace;let r=!1;for(let i=0;i<e.length;i++){const t=e[i];if(2===t.type)if(Hc)t.content=t.content.replace(na,"\n");else if(oa(t.content)){const l=null==(n=e[i-1])?void 0:n.type,c=null==(s=e[i+1])?void 0:s.type;!l||!c||o&&(3===l&&(3===c||1===c)||1===l&&(3===c||1===c&&ra(t.content)))?(r=!0,e[i]=null):t.content=" "}else o&&(t.content=ia(t.content))}if(Hc&&t&&Mc.isPreTag(t)){const t=e[0];t&&2===t.type&&(t.content=t.content.replace(/^\r?\n/,""))}return r?e.filter(Boolean):e}function oa(e){for(let t=0;t<e.length;t++)if(!ic(e.charCodeAt(t)))return!1;return!0}function ra(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}function ia(e){let t="",n=!1;for(let s=0;s<e.length;s++)ic(e.charCodeAt(s))?n||(t+=" ",n=!0):(t+=e[s],n=!1);return t}function la(e){(Kc[0]||Pc).children.push(e)}function ca(e,t){return{start:zc.getPos(e),end:null==t?t:zc.getPos(t),source:null==t?t:Xc(e,t)}}function aa(e,t){e.end=zc.getPos(t),e.source=Xc(e.start.offset,t)}function ua(e){const t={type:6,name:e.rawName,nameLoc:ca(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function da(e,t=!1,n,s=0,o=0){return Jl(e,t,n,s)}function pa(e,t,n){Mc.onError(pc(e,ca(t,t)))}function ha(e,t){if(zc.reset(),Bc=null,Vc=null,Dc="",Uc=-1,jc=-1,Kc.length=0,$c=e,Mc=c({},Lc),t){let e;for(e in t)null!=t[e]&&(Mc[e]=t[e])}zc.mode="html"===Mc.parseMode?1:"sfc"===Mc.parseMode?2:0,zc.inXML=1===Mc.ns||2===Mc.ns;const n=null==t?void 0:t.delimiters;n&&(zc.delimiterOpen=cc(n[0]),zc.delimiterClose=cc(n[1]));const s=Pc=function(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:ql}}([],e);return zc.parse($c),s.loc=ca(0,e.length),s.children=sa(s.children),Pc=null,s}function fa(e,t){ga(e,t,ma(e,e.children[0]))}function ma(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!Nc(t)}function ga(e,t,n=!1){const{children:s}=e,o=s.length;let r=0;for(let i=0;i<s.length;i++){const e=s[i];if(1===e.type&&0===e.tagType){const s=n?0:va(e,t);if(s>0){if(s>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),r++;continue}}else{const n=e.codegenNode;if(13===n.type){const s=xa(n);if((!s||512===s||1===s)&&_a(e,t)>=2){const s=Sa(e);s&&(n.props=t.hoist(s))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,ga(e,t),n&&t.scopes.vSlot--}else if(11===e.type)ga(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)ga(e.branches[n],t,1===e.branches[n].children.length)}if(r&&t.transformHoist&&t.transformHoist(s,t,e),r&&r===o&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&p(e.codegenNode.children)){const n=t.hoist(Kl(e.codegenNode.children));t.hmr&&(n.content=`[...${n.content}]`),e.codegenNode.children=n}}function va(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const s=n.get(e);if(void 0!==s)return s;const o=e.codegenNode;if(13!==o.type)return 0;if(o.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(xa(o))return n.set(e,0),0;{let s=3;const r=_a(e,t);if(0===r)return n.set(e,0),0;r<s&&(s=r);for(let o=0;o<e.children.length;o++){const r=va(e.children[o],t);if(0===r)return n.set(e,0),0;r<s&&(s=r)}if(s>1)for(let o=0;o<e.props.length;o++){const r=e.props[o];if(7===r.type&&"bind"===r.name&&r.exp){const o=va(r.exp,t);if(0===o)return n.set(e,0),0;o<s&&(s=o)}}if(o.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(al),t.removeHelper(tc(t.inSSR,o.isComponent)),o.isBlock=!1,t.helper(ec(t.inSSR,o.isComponent))}return n.set(e,s),s}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return va(e.content,t);case 4:return e.constType;case 8:let r=3;for(let n=0;n<e.children.length;n++){const s=e.children[n];if(v(s)||y(s))continue;const o=va(s,t);if(0===o)return 0;o<r&&(r=o)}return r}}const ya=new Set([Nl,Al,El,Il]);function ba(e,t){if(14===e.type&&!v(e.callee)&&ya.has(e.callee)){const n=e.arguments[0];if(4===n.type)return va(n,t);if(14===n.type)return ba(n,t)}return 0}function _a(e,t){let n=3;const s=Sa(e);if(s&&15===s.type){const{properties:e}=s;for(let s=0;s<e.length;s++){const{key:o,value:r}=e[s],i=va(o,t);if(0===i)return i;let l;if(i<n&&(n=i),l=4===r.type?va(r,t):14===r.type?ba(r,t):0,0===l)return l;l<n&&(n=l)}}return n}function Sa(e){const t=e.codegenNode;if(13===t.type)return t.props}function xa(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function Ca(e,{filename:t="",prefixIdentifiers:s=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:c=[],directiveTransforms:a={},transformHoist:u=null,isBuiltInComponent:d=o,isCustomElement:p=o,expressionPlugins:h=[],scopeId:f=null,slotted:m=!0,ssr:g=!1,inSSR:y=!1,ssrCssVars:b="",bindingMetadata:_=n,inline:S=!1,isTS:x=!1,onError:C=uc,onWarn:k=dc,compatConfig:T}){const w=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),N={filename:t,selfName:w&&F(I(w[1])),prefixIdentifiers:s,hoistStatic:r,hmr:i,cacheHandlers:l,nodeTransforms:c,directiveTransforms:a,transformHoist:u,isBuiltInComponent:d,isCustomElement:p,expressionPlugins:h,scopeId:f,slotted:m,ssr:g,inSSR:y,ssrCssVars:b,bindingMetadata:_,inline:S,isTS:x,onError:C,onWarn:k,compatConfig:T,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){const t=N.helpers.get(e)||0;return N.helpers.set(e,t+1),e},removeHelper(e){const t=N.helpers.get(e);if(t){const n=t-1;n?N.helpers.set(e,n):N.helpers.delete(e)}},helperString:e=>`_${Hl[N.helper(e)]}`,replaceNode(e){N.parent.children[N.childIndex]=N.currentNode=e},removeNode(e){const t=e?N.parent.children.indexOf(e):N.currentNode?N.childIndex:-1;e&&e!==N.currentNode?N.childIndex>t&&(N.childIndex--,N.onNodeRemoved()):(N.currentNode=null,N.onNodeRemoved()),N.parent.children.splice(t,1)},onNodeRemoved:o,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){v(e)&&(e=Jl(e)),N.hoists.push(e);const t=Jl(`_hoisted_${N.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:ql}}(N.cached++,e,t)};return N}function ka(e,t){const n=Ca(e,t);Ta(e,n),t.hoistStatic&&fa(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:s}=e;if(1===s.length){const n=s[0];if(ma(e,n)&&n.codegenNode){const s=n.codegenNode;13===s.type&&nc(s,t),e.codegenNode=s}else e.codegenNode=n}else if(s.length>1){let s=64;e.codegenNode=Wl(t,n(ol),void 0,e.children,s+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}function Ta(e,t){t.currentNode=e;const{nodeTransforms:n}=t,s=[];for(let r=0;r<n.length;r++){const o=n[r](e,t);if(o&&(p(o)?s.push(...o):s.push(o)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(fl);break;case 5:t.ssr||t.helper(Tl);break;case 9:for(let n=0;n<e.branches.length;n++)Ta(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const s=()=>{n--};for(;n<e.children.length;n++){const o=e.children[n];v(o)||(t.parent=e,t.childIndex=n,t.onNodeRemoved=s,Ta(o,t))}}(e,t)}t.currentNode=e;let o=s.length;for(;o--;)s[o]()}function wa(e,t){const n=v(e)?t=>t===e:t=>e.test(t);return(e,s)=>{if(1===e.type){const{props:o}=e;if(3===e.tagType&&o.some(Tc))return;const r=[];for(let i=0;i<o.length;i++){const l=o[i];if(7===l.type&&n(l.name)){o.splice(i,1),i--;const n=t(e,l,s);n&&r.push(n)}}return r}}}const Na="/*#__PURE__*/",Aa=e=>`${Hl[e]}: _${Hl[e]}`;function Ea(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:s=!1,filename:o="template.vue.html",scopeId:r=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){const h={mode:t,prefixIdentifiers:n,sourceMap:s,filename:o,scopeId:r,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${Hl[e]}`,push(e,t=-2,n){h.code+=e},indent(){f(++h.indentLevel)},deindent(e=!1){e?--h.indentLevel:f(--h.indentLevel)},newline(){f(h.indentLevel)}};function f(e){h.push("\n"+" ".repeat(e),0)}return h}function Ia(e,t={}){const n=Ea(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:o,prefixIdentifiers:r,indent:i,deindent:l,newline:c,ssr:a}=n,u=Array.from(e.helpers),d=u.length>0,p=!r&&"module"!==s,h=n;!function(e,t){const{push:n,newline:s,runtimeGlobalName:o}=t,r=o,i=Array.from(e.helpers);if(i.length>0&&(n(`const _Vue = ${r}\n`,-1),e.hoists.length)){n(`const { ${[pl,hl,fl,ml,gl].filter((e=>i.includes(e))).map(Aa).join(", ")} } = _Vue\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s}=t;s();for(let o=0;o<e.length;o++){const r=e[o];r&&(n(`const _hoisted_${o+1} = `),La(r,t),s())}t.pure=!1})(e.hoists,t),s(),n("return ")}(e,h);if(o(`function ${a?"ssrRender":"render"}(${(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),i(),p&&(o("with (_ctx) {"),i(),d&&(o(`const { ${u.map(Aa).join(", ")} } = _Vue\n`,-1),c())),e.components.length&&(Ra(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Ra(e.directives,"directive",n),e.temps>0&&c()),e.temps>0){o("let ");for(let t=0;t<e.temps;t++)o(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(o("\n",0),c()),a||o("return "),e.codegenNode?La(e.codegenNode,n):o("null"),p&&(l(),o("}")),l(),o("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Ra(e,t,{helper:n,push:s,newline:o,isTS:r}){const i=n("component"===t?vl:bl);for(let l=0;l<e.length;l++){let n=e[l];const c=n.endsWith("__self");c&&(n=n.slice(0,-6)),s(`const ${Oc(n,t)} = ${i}(${JSON.stringify(n)}${c?", true":""})${r?"!":""}`),l<e.length-1&&o()}}function Oa(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Fa(e,t,n),n&&t.deindent(),t.push("]")}function Fa(e,t,n=!1,s=!0){const{push:o,newline:r}=t;for(let i=0;i<e.length;i++){const l=e[i];v(l)?o(l,-3):p(l)?Oa(l,t):La(l,t),i<e.length-1&&(n?(s&&o(","),r()):s&&o(", "))}}function La(e,t){if(v(e))t.push(e,-3);else if(y(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:La(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:Ma(e,t);break;case 5:!function(e,t){const{push:n,helper:s,pure:o}=t;o&&n(Na);n(`${s(Tl)}(`),La(e.content,t),n(")")}(e,t);break;case 8:Pa(e,t);break;case 3:!function(e,t){const{push:n,helper:s,pure:o}=t;o&&n(Na);n(`${s(fl)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:s,pure:o}=t,{tag:r,props:i,children:l,patchFlag:c,dynamicProps:a,directives:u,isBlock:d,disableTracking:p,isComponent:h}=e;u&&n(s(Sl)+"(");d&&n(`(${s(al)}(${p?"true":""}), `);o&&n(Na);const f=d?tc(t.inSSR,h):ec(t.inSSR,h);n(s(f)+"(",-2,e),Fa(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([r,i,l,c,a]),t),n(")"),d&&n(")");u&&(n(", "),La(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:s,pure:o}=t,r=v(e.callee)?e.callee:s(e.callee);o&&n(Na);n(r+"(",-2,e),Fa(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:s,deindent:o,newline:r}=t,{properties:i}=e;if(!i.length)return void n("{}",-2,e);const l=i.length>1||!1;n(l?"{":"{ "),l&&s();for(let c=0;c<i.length;c++){const{key:e,value:s}=i[c];$a(e,t),n(": "),La(s,t),c<i.length-1&&(n(","),r())}l&&o(),n(l?"}":" }")}(e,t);break;case 17:!function(e,t){Oa(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:s,deindent:o}=t,{params:r,returns:i,body:l,newline:c,isSlot:a}=e;a&&n(`_${Hl[Bl]}(`);n("(",-2,e),p(r)?Fa(r,t):r&&La(r,t);n(") => "),(c||l)&&(n("{"),s());i?(c&&n("return "),p(i)?Oa(i,t):La(i,t)):l&&La(l,t);(c||l)&&(o(),n("}"));a&&n(")")}(e,t);break;case 19:!function(e,t){const{test:n,consequent:s,alternate:o,newline:r}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!gc(n.content);e&&i("("),Ma(n,t),e&&i(")")}else i("("),La(n,t),i(")");r&&l(),t.indentLevel++,r||i(" "),i("? "),La(s,t),t.indentLevel--,r&&a(),r||i(" "),i(": ");const u=19===o.type;u||t.indentLevel++;La(o,t),u||t.indentLevel--;r&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:s,indent:o,deindent:r,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(o(),n(`${s(Ml)}(-1),`),i());n(`_cache[${e.index}] = `),La(e.value,t),e.isVNode&&(n(","),i(),n(`${s(Ml)}(1),`),i(),n(`_cache[${e.index}]`),r());n(")")}(e,t);break;case 21:Fa(e.body,t,!0,!1)}}function Ma(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,-3,e)}function Pa(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];v(s)?t.push(s,-3):La(s,t)}}function $a(e,t){const{push:n}=t;if(8===e.type)n("["),Pa(e,t),n("]");else if(e.isStatic){n(gc(e.content)?e.content:JSON.stringify(e.content),-2,e)}else n(`[${e.content}]`,-3,e)}const Ba=wa(/^(if|else|else-if)$/,((e,t,n)=>function(e,t,n,s){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const s=t.exp?t.exp.loc:e.loc;n.onError(pc(28,t.loc)),t.exp=Jl("true",!1,s)}if("if"===t.name){const o=Va(e,t),r={type:9,loc:e.loc,branches:[o]};if(n.replaceNode(r),s)return s(r,o,!0)}else{const o=n.parent.children;let r=o.indexOf(e);for(;r-- >=-1;){const i=o[r];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(pc(30,e.loc)),n.removeNode();const o=Va(e,t);i.branches.push(o);const r=s&&s(i,o,!1);Ta(o,n),r&&r(),n.currentNode=null}else n.onError(pc(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,s)=>{const o=n.parent.children;let r=o.indexOf(e),i=0;for(;r-- >=0;){const e=o[r];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(s)e.codegenNode=Da(t,i,n);else{const s=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);s.alternate=Da(t,i+e.branches.length-1,n)}}}))));function Va(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Sc(e,"for")?e.children:[e],userKey:xc(e,"key"),isTemplateIf:n}}function Da(e,t,n){return e.condition?Yl(e.condition,Ua(e,t,n),Ql(n.helper(fl),['""',"true"])):Ua(e,t,n)}function Ua(e,t,n){const{helper:s}=n,o=Gl("key",Jl(`${t}`,!1,ql,2)),{children:r}=e,i=r[0];if(1!==r.length||1!==i.type){if(1===r.length&&11===i.type){const e=i.codegenNode;return Ic(e,o,n),e}{let t=64;return Wl(n,s(ol),zl([o]),r,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===Ul?l.arguments[1].returns:l;return 13===t.type&&nc(t,n),Ic(t,o,n),e}var l}const ja=wa("for",((e,t,n)=>{const{helper:s,removeHelper:o}=n;return function(e,t,n,s){if(!t.exp)return void n.onError(pc(31,t.loc));const o=t.forParseResult;if(!o)return void n.onError(pc(32,t.loc));Ha(o);const{scopes:r}=n,{source:i,value:l,key:c,index:a}=o,u={type:11,loc:t.loc,source:i,valueAlias:l,keyAlias:c,objectIndexAlias:a,parseResult:o,children:wc(e)?e.children:[e]};n.replaceNode(u),r.vFor++;const d=s&&s(u);return()=>{r.vFor--,d&&d()}}(e,t,n,(t=>{const r=Ql(s(xl),[t.source]),i=wc(e),l=Sc(e,"memo"),c=xc(e,"key"),a=c&&(6===c.type?Jl(c.value.content,!0):c.exp),u=c?Gl("key",a):null,d=4===t.source.type&&t.source.constType>0,p=d?64:c?128:256;return t.codegenNode=Wl(n,s(ol),void 0,r,p+"",void 0,void 0,!0,!d,!1,e.loc),()=>{let c;const{children:p}=t,h=1!==p.length||1!==p[0].type,f=Nc(e)?e:i&&1===e.children.length&&Nc(e.children[0])?e.children[0]:null;if(f?(c=f.codegenNode,i&&u&&Ic(c,u,n)):h?c=Wl(n,s(ol),u?zl([u]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=p[0].codegenNode,i&&u&&Ic(c,u,n),c.isBlock!==!d&&(c.isBlock?(o(al),o(tc(n.inSSR,c.isComponent))):o(ec(n.inSSR,c.isComponent))),c.isBlock=!d,c.isBlock?(s(al),s(tc(n.inSSR,c.isComponent))):s(ec(n.inSSR,c.isComponent))),l){const e=Zl(qa(t.parseResult,[Jl("_cached")]));e.body={type:21,body:[Xl(["const _memo = (",l.exp,")"]),Xl(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(jl)}(_cached, _memo)) return _cached`]),Xl(["const _item = ",c]),Jl("_item.memo = _memo"),Jl("return _item")],loc:ql},r.arguments.push(e,Jl("_cache"),Jl(String(n.cached++)))}else r.arguments.push(Zl(qa(t.parseResult),c,!0))}}))}));function Ha(e,t){e.finalized||(e.finalized=!0)}function qa({value:e,key:t,index:n},s=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Jl("_".repeat(t+1),!1)))}([e,t,n,...s])}const Wa=Jl("undefined",!1),Ka=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Sc(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},za=(e,t,n,s)=>Zl(e,n,!1,!0,n.length?n[0].loc:s);function Ga(e,t,n=za){t.helper(Bl);const{children:s,loc:o}=e,r=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=Sc(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!hc(e)&&(l=!0),r.push(Gl(e||Jl("default",!0),n(t,void 0,s,o)))}let a=!1,u=!1;const d=[],p=new Set;let h=0;for(let g=0;g<s.length;g++){const e=s[g];let o;if(!wc(e)||!(o=Sc(e,"slot",!0))){3!==e.type&&d.push(e);continue}if(c){t.onError(pc(37,o.loc));break}a=!0;const{children:f,loc:m}=e,{arg:v=Jl("default",!0),exp:y,loc:b}=o;let _;hc(v)?_=v?v.content:"default":l=!0;const S=Sc(e,"for"),x=n(y,S,f,m);let C,k;if(C=Sc(e,"if"))l=!0,i.push(Yl(C.exp,Ja(v,x,h++),Wa));else if(k=Sc(e,/^else(-if)?$/,!0)){let e,n=g;for(;n--&&(e=s[n],3===e.type););if(e&&wc(e)&&Sc(e,"if")){s.splice(g,1),g--;let e=i[i.length-1];for(;19===e.alternate.type;)e=e.alternate;e.alternate=k.exp?Yl(k.exp,Ja(v,x,h++),Wa):Ja(v,x,h++)}else t.onError(pc(30,k.loc))}else if(S){l=!0;const e=S.forParseResult;e?(Ha(e),i.push(Ql(t.helper(xl),[e.source,Zl(qa(e),Ja(v,x),!0)]))):t.onError(pc(32,S.loc))}else{if(_){if(p.has(_)){t.onError(pc(38,b));continue}p.add(_),"default"===_&&(u=!0)}r.push(Gl(v,x))}}if(!c){const e=(e,t)=>Gl("default",n(e,void 0,t,o));a?d.length&&d.some((e=>Qa(e)))&&(u?t.onError(pc(39,d[0].loc)):r.push(e(void 0,d))):r.push(e(void 0,s))}const f=l?2:Xa(e.children)?3:1;let m=zl(r.concat(Gl("_",Jl(f+"",!1))),o);return i.length&&(m=Ql(t.helper(kl),[m,Kl(i)])),{slots:m,hasDynamicSlots:l}}function Ja(e,t,n){const s=[Gl("name",e),Gl("fn",t)];return null!=n&&s.push(Gl("key",Jl(String(n),!0))),zl(s)}function Xa(e){for(let t=0;t<e.length;t++){const n=e[t];switch(n.type){case 1:if(2===n.tagType||Xa(n.children))return!0;break;case 9:if(Xa(n.branches))return!0;break;case 10:case 11:if(Xa(n.children))return!0}}return!1}function Qa(e){return 2!==e.type&&12!==e.type||(2===e.type?!!e.content.trim():Qa(e.content))}const Za=new WeakMap,Ya=(e,t)=>function(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:s}=e,o=1===e.tagType;let r=o?function(e,t,n=!1){let{tag:s}=e;const o=su(s),r=xc(e,"is");if(r)if(o){const e=6===r.type?r.value&&Jl(r.value.content,!0):r.exp;if(e)return Ql(t.helper(yl),[e])}else 6===r.type&&r.value.content.startsWith("vue:")&&(s=r.value.content.slice(4));const i=fc(s)||t.isBuiltInComponent(s);if(i)return n||t.helper(i),i;return t.helper(vl),t.components.add(s),Oc(s,"component")}(e,t):`"${n}"`;const i=b(r)&&r.callee===yl;let l,c,a,u,d,p,h=0,f=i||r===rl||r===il||!o&&("svg"===n||"foreignObject"===n);if(s.length>0){const n=eu(e,t,void 0,o,i);l=n.props,h=n.patchFlag,d=n.dynamicPropNames;const s=n.directives;p=s&&s.length?Kl(s.map((e=>function(e,t){const n=[],s=Za.get(e);s?n.push(t.helperString(s)):(t.helper(bl),t.directives.add(e.name),n.push(Oc(e.name,"directive")));const{loc:o}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Jl("true",!1,o);n.push(zl(e.modifiers.map((e=>Gl(e,t))),o))}return Kl(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(f=!0)}if(e.children.length>0){r===ll&&(f=!0,h|=1024);if(o&&r!==rl&&r!==ll){const{slots:n,hasDynamicSlots:s}=Ga(e,t);c=n,s&&(h|=1024)}else if(1===e.children.length&&r!==rl){const n=e.children[0],s=n.type,o=5===s||8===s;o&&0===va(n,t)&&(h|=1),c=o||2===s?n:e.children}else c=e.children}0!==h&&(a=String(h),d&&d.length&&(u=function(e){let t="[";for(let n=0,s=e.length;n<s;n++)t+=JSON.stringify(e[n]),n<s-1&&(t+=", ");return t+"]"}(d))),e.codegenNode=Wl(t,r,l,c,a,u,p,!!f,!1,o,e.loc)};function eu(e,t,n=e.props,s,o,r=!1){const{tag:l,loc:c,children:a}=e;let u=[];const d=[],p=[],h=a.length>0;let f=!1,m=0,g=!1,v=!1,b=!1,_=!1,S=!1,x=!1;const C=[],k=e=>{u.length&&(d.push(zl(tu(u),c)),u=[]),e&&d.push(e)},T=({key:e,value:n})=>{if(hc(e)){const r=e.content,l=i(r);if(!l||s&&!o||"onclick"===r.toLowerCase()||"onUpdate:modelValue"===r||w(r)||(_=!0),l&&w(r)&&(x=!0),l&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&va(n,t)>0)return;"ref"===r?g=!0:"class"===r?v=!0:"style"===r?b=!0:"key"===r||C.includes(r)||C.push(r),!s||"class"!==r&&"style"!==r||C.includes(r)||C.push(r)}else S=!0};for(let i=0;i<n.length;i++){const o=n[i];if(6===o.type){const{loc:e,name:n,nameLoc:s,value:r}=o;let i=!0;if("ref"===n&&(g=!0,t.scopes.vFor>0&&u.push(Gl(Jl("ref_for",!0),Jl("true")))),"is"===n&&(su(l)||r&&r.content.startsWith("vue:")))continue;u.push(Gl(Jl(n,!0,s),Jl(r?r.content:"",i,r?r.loc:e)))}else{const{name:n,arg:i,exp:a,loc:g,modifiers:v}=o,b="bind"===n,_="on"===n;if("slot"===n){s||t.onError(pc(40,g));continue}if("once"===n||"memo"===n)continue;if("is"===n||b&&Cc(i,"is")&&su(l))continue;if(_&&r)continue;if((b&&Cc(i,"key")||_&&h&&Cc(i,"vue:before-update"))&&(f=!0),b&&Cc(i,"ref")&&t.scopes.vFor>0&&u.push(Gl(Jl("ref_for",!0),Jl("true"))),!i&&(b||_)){S=!0,a?b?(k(),d.push(a)):k({type:14,loc:g,callee:t.helper(Rl),arguments:s?[a]:[a,"true"]}):t.onError(pc(b?34:35,g));continue}b&&v.includes("prop")&&(m|=32);const x=t.directiveTransforms[n];if(x){const{props:n,needRuntime:s}=x(o,e,t);!r&&n.forEach(T),_&&i&&!hc(i)?k(zl(n,c)):u.push(...n),s&&(p.push(o),y(s)&&Za.set(o,s))}else N(n)||(p.push(o),h&&(f=!0))}}let A;if(d.length?(k(),A=d.length>1?Ql(t.helper(wl),d,c):d[0]):u.length&&(A=zl(tu(u),c)),S?m|=16:(v&&!s&&(m|=2),b&&!s&&(m|=4),C.length&&(m|=8),_&&(m|=32)),f||0!==m&&32!==m||!(g||x||p.length>0)||(m|=512),!t.inSSR&&A)switch(A.type){case 15:let e=-1,n=-1,s=!1;for(let t=0;t<A.properties.length;t++){const o=A.properties[t].key;hc(o)?"class"===o.content?e=t:"style"===o.content&&(n=t):o.isHandlerKey||(s=!0)}const o=A.properties[e],r=A.properties[n];s?A=Ql(t.helper(El),[A]):(o&&!hc(o.value)&&(o.value=Ql(t.helper(Nl),[o.value])),r&&(b||4===r.value.type&&"["===r.value.content.trim()[0]||17===r.value.type)&&(r.value=Ql(t.helper(Al),[r.value])));break;case 14:break;default:A=Ql(t.helper(El),[Ql(t.helper(Il),[A])])}return{props:A,directives:p,patchFlag:m,dynamicPropNames:C,shouldUseBlock:f}}function tu(e){const t=new Map,n=[];for(let s=0;s<e.length;s++){const o=e[s];if(8===o.key.type||!o.key.isStatic){n.push(o);continue}const r=o.key.content,l=t.get(r);l?("style"===r||"class"===r||i(r))&&nu(l,o):(t.set(r,o),n.push(o))}return n}function nu(e,t){17===e.value.type?e.value.elements.push(t.value):e.value=Kl([e.value,t.value],e.loc)}function su(e){return"component"===e||"Component"===e}const ou=(e,t)=>{if(Nc(e)){const{children:n,loc:s}=e,{slotName:o,slotProps:r}=function(e,t){let n,s='"default"';const o=[];for(let r=0;r<e.props.length;r++){const t=e.props[r];6===t.type?t.value&&("name"===t.name?s=JSON.stringify(t.value.content):(t.name=I(t.name),o.push(t))):"bind"===t.name&&Cc(t.arg,"name")?t.exp&&(s=t.exp):("bind"===t.name&&t.arg&&hc(t.arg)&&(t.arg.content=I(t.arg.content)),o.push(t))}if(o.length>0){const{props:s,directives:r}=eu(e,t,o,!1,!1);n=s,r.length&&t.onError(pc(36,r[0].loc))}return{slotName:s,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",o,"{}","undefined","true"];let l=2;r&&(i[2]=r,l=3),n.length&&(i[3]=Zl([],n,!1,!1,s),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=Ql(t.helper(Cl),i,s)}};const ru=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,iu=(e,t,n,s)=>{const{loc:o,modifiers:r,arg:i}=e;let l;if(4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);l=Jl(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?L(I(e)):`on:${e}`,!0,i.loc)}else l=Xl([`${n.helperString(Ll)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(Ll)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=_c(c.content),t=!(e||ru.test(c.content)),n=c.content.includes(";");(t||a&&e)&&(c=Xl([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[Gl(l,c||Jl("() => {}",!1,o))]};return s&&(u=s(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},lu=(e,t,n)=>{const{modifiers:s,loc:o}=e,r=e.arg;let{exp:i}=e;if(!i&&4===r.type){const t=I(r.content);i=e.exp=Jl(t,!1,r.loc)}return 4!==r.type?(r.children.unshift("("),r.children.push(') || ""')):r.isStatic||(r.content=`${r.content} || ""`),s.includes("camel")&&(4===r.type?r.content=r.isStatic?I(r.content):`${n.helperString(Ol)}(${r.content})`:(r.children.unshift(`${n.helperString(Ol)}(`),r.children.push(")"))),n.inSSR||(s.includes("prop")&&cu(r,"."),s.includes("attr")&&cu(r,"^")),!i||4===i.type&&!i.content.trim()?{props:[Gl(r,Jl("",!0,o))]}:{props:[Gl(r,i)]}},cu=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},au=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let s,o=!1;for(let e=0;e<n.length;e++){const t=n[e];if(kc(t)){o=!0;for(let o=e+1;o<n.length;o++){const r=n[o];if(!kc(r)){s=void 0;break}s||(s=n[e]=Xl([t],t.loc)),s.children.push(" + ",r),n.splice(o,1),o--}}}if(o&&(1!==n.length||0!==e.type&&(1!==e.type||0!==e.tagType||e.props.find((e=>7===e.type&&!t.directiveTransforms[e.name])))))for(let e=0;e<n.length;e++){const s=n[e];if(kc(s)||8===s.type){const o=[];2===s.type&&" "===s.content||o.push(s),t.ssr||0!==va(s,t)||o.push("1"),n[e]={type:12,content:s,loc:s.loc,codegenNode:Ql(t.helper(ml),o)}}}}},uu=new WeakSet,du=(e,t)=>{if(1===e.type&&Sc(e,"once",!0)){if(uu.has(e)||t.inVOnce||t.inSSR)return;return uu.add(e),t.inVOnce=!0,t.helper(Ml),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},pu=(e,t,n)=>{const{exp:s,arg:o}=e;if(!s)return n.onError(pc(41,e.loc)),hu();const r=s.loc.source,i=4===s.type?s.content:r,l=n.bindingMetadata[r];if("props"===l||"props-aliased"===l)return hu();if(!i.trim()||!_c(i))return n.onError(pc(42,s.loc)),hu();const c=o||Jl("modelValue",!0),a=o?hc(o)?`onUpdate:${I(o.content)}`:Xl(['"onUpdate:" + ',o]):"onUpdate:modelValue";let u;u=Xl([`${n.isTS?"($event: any)":"$event"} => ((`,s,") = $event)"]);const d=[Gl(c,e.exp),Gl(a,u)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(gc(e)?e:JSON.stringify(e))+": true")).join(", "),n=o?hc(o)?`${o.content}Modifiers`:Xl([o,' + "Modifiers"']):"modelModifiers";d.push(Gl(n,Jl(`{ ${t} }`,!1,e.loc,2)))}return hu(d)};function hu(e=[]){return{props:e}}const fu=new WeakSet,mu=(e,t)=>{if(1===e.type){const n=Sc(e,"memo");if(!n||fu.has(e))return;return fu.add(e),()=>{const s=e.codegenNode||t.currentNode.codegenNode;s&&13===s.type&&(1!==e.tagType&&nc(s,t),e.codegenNode=Ql(t.helper(Ul),[n.exp,Zl(void 0,s),"_cache",String(t.cached++)]))}}};function gu(e,t={}){const n=t.onError||uc,s="module"===t.mode;!0===t.prefixIdentifiers?n(pc(47)):s&&n(pc(48));t.cacheHandlers&&n(pc(49)),t.scopeId&&!s&&n(pc(50));const o=c({},t,{prefixIdentifiers:!1}),r=v(e)?ha(e,o):e,[i,l]=[[du,Ba,mu,ja,ou,Ya,Ka,au],{on:iu,bind:lu,model:pu}];return ka(r,c({},o,{nodeTransforms:[...i,...t.nodeTransforms||[]],directiveTransforms:c({},l,t.directiveTransforms||{})})),Ia(r,o)}const vu=Symbol(""),yu=Symbol(""),bu=Symbol(""),_u=Symbol(""),Su=Symbol(""),xu=Symbol(""),Cu=Symbol(""),ku=Symbol(""),Tu=Symbol(""),wu=Symbol("");var Nu;let Au;Nu={[vu]:"vModelRadio",[yu]:"vModelCheckbox",[bu]:"vModelText",[_u]:"vModelSelect",[Su]:"vModelDynamic",[xu]:"withModifiers",[Cu]:"withKeys",[ku]:"vShow",[Tu]:"Transition",[wu]:"TransitionGroup"},Object.getOwnPropertySymbols(Nu).forEach((e=>{Hl[e]=Nu[e]}));const Eu={parseMode:"html",isVoidTag:Z,isNativeTag:e=>J(e)||X(e)||Q(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return Au||(Au=document.createElement("div")),t?(Au.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,Au.children[0].getAttribute("foo")):(Au.innerHTML=e,Au.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?Tu:"TransitionGroup"===e||"transition-group"===e?wu:void 0,getNamespace(e,t,n){let s=t?t.ns:n;if(t&&2===s)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(s=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(s=0);else t&&1===s&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(s=0));if(0===s){if("svg"===e)return 1;if("math"===e)return 2}return s}},Iu=(e,t)=>{const n=z(e);return Jl(JSON.stringify(n),!1,t,3)};function Ru(e,t){return pc(e,t)}const Ou=t("passive,once,capture"),Fu=t("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Lu=t("left,right"),Mu=t("onkeyup,onkeydown,onkeypress",!0),Pu=(e,t)=>hc(e)&&"onclick"===e.content.toLowerCase()?Jl(t,!0):4!==e.type?Xl(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,$u=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},Bu=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Jl("style",!0,t.loc),exp:Iu(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],Vu={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:s,loc:o}=e;return s||n.onError(Ru(53,o)),t.children.length&&(n.onError(Ru(54,o)),t.children.length=0),{props:[Gl(Jl("innerHTML",!0,o),s||Jl("",!0))]}},text:(e,t,n)=>{const{exp:s,loc:o}=e;return s||n.onError(Ru(55,o)),t.children.length&&(n.onError(Ru(56,o)),t.children.length=0),{props:[Gl(Jl("textContent",!0),s?va(s,n)>0?s:Ql(n.helperString(Tl),[s],o):Jl("",!0))]}},model:(e,t,n)=>{const s=pu(e,t,n);if(!s.props.length||1===t.tagType)return s;e.arg&&n.onError(Ru(58,e.arg.loc));const{tag:o}=t,r=n.isCustomElement(o);if("input"===o||"textarea"===o||"select"===o||r){let i=bu,l=!1;if("input"===o||r){const s=xc(t,"type");if(s){if(7===s.type)i=Su;else if(s.value)switch(s.value.content){case"radio":i=vu;break;case"checkbox":i=yu;break;case"file":l=!0,n.onError(Ru(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=Su)}else"select"===o&&(i=_u);l||(s.needRuntime=n.helper(i))}else n.onError(Ru(57,e.loc));return s.props=s.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),s},on:(e,t,n)=>iu(e,t,n,(t=>{const{modifiers:s}=e;if(!s.length)return t;let{key:o,value:r}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n,s)=>{const o=[],r=[],i=[];for(let l=0;l<t.length;l++){const n=t[l];Ou(n)?i.push(n):Lu(n)?hc(e)?Mu(e.content)?o.push(n):r.push(n):(o.push(n),r.push(n)):Fu(n)?r.push(n):o.push(n)}return{keyModifiers:o,nonKeyModifiers:r,eventOptionModifiers:i}})(o,s);if(l.includes("right")&&(o=Pu(o,"onContextmenu")),l.includes("middle")&&(o=Pu(o,"onMouseup")),l.length&&(r=Ql(n.helper(xu),[r,JSON.stringify(l)])),!i.length||hc(o)&&!Mu(o.content)||(r=Ql(n.helper(Cu),[r,JSON.stringify(i)])),c.length){const e=c.map(F).join("");o=hc(o)?Jl(`${o.content}${e}`,!0):Xl(["(",o,`) + "${e}"`])}return{props:[Gl(o,r)]}})),show:(e,t,n)=>{const{exp:s,loc:o}=e;return s||n.onError(Ru(61,o)),{props:[],needRuntime:n.helper(ku)}}};const Du=new WeakMap;function Uu(e,t){if(!v(e)){if(!e.nodeType)return o;e=e.innerHTML}const s=e,r=function(e){let t=Du.get(null!=e?e:n);return t||(t=Object.create(null),Du.set(null!=e?e:n,t)),t}(t),i=r[s];if(i)return i;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const l=c({hoistStatic:!0,onError:void 0,onWarn:o},t);l.isCustomElement||"undefined"==typeof customElements||(l.isCustomElement=e=>!!customElements.get(e));const{code:a}=function(e,t={}){return gu(e,c({},Eu,t,{nodeTransforms:[$u,...Bu,...t.nodeTransforms||[]],directiveTransforms:c({},Vu,t.directiveTransforms||{}),transformHoist:null}))}(e,l),u=new Function(a)();return u._rc=!0,r[s]=u}return Sr(Uu),e.BaseTransition=Xn,e.BaseTransitionPropsValidators=Jn,e.Comment=$o,e.DeprecationTypes=null,e.EffectScope=le,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},e.ErrorTypeStrings=null,e.Fragment=Mo,e.KeepAlive=ls,e.ReactiveEffect=ue,e.Static=Bo,e.Suspense=En,e.Teleport=Fo,e.Text=Po,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=Br,e.TransitionGroup=Ni,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=Si,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=qt,e.callWithErrorHandling=Ht,e.camelize=I,e.capitalize=F,e.cloneVNode=tr,e.compatUtils=null,e.compile=Uu,e.computed=wr,e.createApp=(...e)=>{const t=Qi().createApp(...e),{mount:n}=t;return t.mount=e=>{const s=nl(e);if(!s)return;const o=t._component;g(o)||o.render||o.template||(o.template=s.innerHTML),s.innerHTML="";const r=n(s,!1,tl(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t},e.createBlock=Ko,e.createCommentVNode=function(e="",t=!1){return t?(Uo(),Ko($o,null,e)):Yo($o,null,e)},e.createElementBlock=function(e,t,n,s,o,r){return Wo(Zo(e,t,n,s,o,r,!0))},e.createElementVNode=Zo,e.createHydrationRenderer=So,e.createPropsRestProxy=function(e,t){const n={};for(const s in e)t.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>e[s]});return n},e.createRenderer=_o,e.createSSRApp=(...e)=>{const t=Zi().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=nl(e);if(t)return n(t,!0,tl(t))},t},e.createSlots=function(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(p(s))for(let t=0;t<s.length;t++)e[s[t].name]=s[t].fn;else s&&(e[s.name]=s.key?(...e)=>{const t=s.fn(...e);return t&&(t.key=s.key),t}:s.fn)}return e},e.createStaticVNode=function(e,t){const n=Yo(Bo,null,e);return n.staticCount=t,n},e.createTextVNode=nr,e.createVNode=Yo,e.customRef=Vt,e.defineAsyncComponent=function(e){g(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:o=200,timeout:r,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const d=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,d()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return ss({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return c},setup(){const e=ur;if(c)return()=>rs(c,e);const t=t=>{a=null,Wt(t,e,13,!s)};if(i&&e.suspense)return d().then((t=>()=>rs(t,e))).catch((e=>(t(e),()=>s?Yo(s,{error:e}):null)));const l=Ot(!1),u=Ot(),p=Ot(!!o);return o&&setTimeout((()=>{p.value=!1}),o),null!=r&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${r}ms.`);t(e),u.value=e}}),r),d().then((()=>{l.value=!0,e.parent&&is(e.parent.vnode)&&(e.parent.effect.dirty=!0,nn(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?rs(c,e):u.value&&s?Yo(s,{error:u.value}):n&&!p.value?Yo(n):void 0}})},e.defineComponent=ss,e.defineCustomElement=bi,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=e=>bi(e,el),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof ue&&(e=e.effect.fn);const n=new ue(e,o,(()=>{n.dirty&&n.run()}));t&&(c(n,t),t.scope&&ce(n,t.scope)),t&&t.lazy||n.run();const s=n.run.bind(n);return s.effect=n,s},e.effectScope=function(e){return new le(e)},e.getCurrentInstance=dr,e.getCurrentScope=ae,e.getTransitionRawChildren=ns,e.guardReactiveProps=er,e.h=Nr,e.handleError=Wt,e.hasInjectionContext=function(){return!!(ur||fn||Xs)},e.hydrate=el,e.initCustomFormatter=function(){},e.initDirectivesForSSR=sl,e.inject=Zs,e.isMemoSame=Ar,e.isProxy=Ct,e.isReactive=_t,e.isReadonly=St,e.isRef=Rt,e.isRuntimeOnly=()=>!vr,e.isShallow=xt,e.isVNode=zo,e.markRaw=Tt,e.mergeDefaults=function(e,t){const n=Ls(e);for(const s in t){if(s.startsWith("__skip"))continue;let e=n[s];e?p(e)||g(e)?e=n[s]={type:e,default:t[s]}:e.default=t[s]:null===e&&(e=n[s]={default:t[s]}),e&&t[`__skip_${s}`]&&(e.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?p(e)&&p(t)?e.concat(t):c({},Ls(e),Ls(t)):e||t},e.mergeProps=ir,e.nextTick=tn,e.normalizeClass=G,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!v(t)&&(e.class=G(t)),n&&(e.style=H(n)),e},e.normalizeStyle=H,e.onActivated=as,e.onBeforeMount=vs,e.onBeforeUnmount=Ss,e.onBeforeUpdate=bs,e.onDeactivated=us,e.onErrorCaptured=ws,e.onMounted=ys,e.onRenderTracked=Ts,e.onRenderTriggered=ks,e.onScopeDispose=function(e){re&&re.cleanups.push(e)},e.onServerPrefetch=Cs,e.onUnmounted=xs,e.onUpdated=_s,e.openBlock=Uo,e.popScopeId=function(){mn=null},e.provide=Qs,e.proxyRefs=$t,e.pushScopeId=function(e){mn=e},e.queuePostFlushCb=on,e.reactive=gt,e.readonly=yt,e.ref=Ot,e.registerRuntimeCompiler=Sr,e.render=Yi,e.renderList=function(e,t,n,s){let o;const r=n&&n[s];if(p(e)||v(e)){o=new Array(e.length);for(let n=0,s=e.length;n<s;n++)o[n]=t(e[n],n,void 0,r&&r[n])}else if("number"==typeof e){o=new Array(e);for(let n=0;n<e;n++)o[n]=t(n+1,n,void 0,r&&r[n])}else if(b(e))if(e[Symbol.iterator])o=Array.from(e,((e,n)=>t(e,n,void 0,r&&r[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let s=0,i=n.length;s<i;s++){const i=n[s];o[s]=t(e[i],i,s,r&&r[s])}}else o=[];return n&&(n[s]=o),o},e.renderSlot=function(e,t,n={},s,o){if(fn.isCE||fn.parent&&os(fn.parent)&&fn.parent.isCE)return"default"!==t&&(n.name=t),Yo("slot",n,s&&s());let r=e[t];r&&r._c&&(r._d=!1),Uo();const i=r&&Ns(r(n)),l=Ko(Mo,{key:n.key||i&&i.key||`_${t}`},i||(s?s():[]),i&&1===e._?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l},e.resolveComponent=function(e,t){return Tn(Cn,e,!0,t)||e},e.resolveDirective=function(e){return Tn("directives",e)},e.resolveDynamicComponent=function(e){return v(e)?Tn(Cn,e,!1)||e:e||kn},e.resolveFilter=null,e.resolveTransitionHooks=Zn,e.setBlockTracking=qo,e.setDevtoolsHook=Rr,e.setTransitionHooks=ts,e.shallowReactive=vt,e.shallowReadonly=function(e){return bt(e,!0,He,dt,mt)},e.shallowRef=function(e){return Ft(e,!0)},e.ssrContextKey=Mn,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=e=>v(e)?e:null==e?"":p(e)||b(e)&&(e.toString===S||!g(e.toString))?JSON.stringify(e,se,2):String(e),e.toHandlerKey=L,e.toHandlers=function(e,t){const n={};for(const s in e)n[t&&/[A-Z]/.test(s)?`on:${s}`:L(s)]=e[s];return n},e.toRaw=kt,e.toRef=function(e,t,n){return Rt(e)?e:g(e)?new Ut(e):b(e)&&arguments.length>1?jt(e,t,n):Ot(e)},e.toRefs=function(e){const t=p(e)?new Array(e.length):{};for(const n in e)t[n]=jt(e,n);return t},e.toValue=function(e){return g(e)?e():Mt(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){It(e,2)},e.unref=Mt,e.useAttrs=function(){return Fs().attrs},e.useCssModule=function(e="$style"){return n},e.useCssVars=function(e){const t=dr();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>ri(e,n)))},s=()=>{const s=e(t.proxy);oi(t.subTree,s),n(s)};Pn(s),ys((()=>{const e=new MutationObserver(s);e.observe(t.subTree.el.parentNode,{childList:!0}),xs((()=>e.disconnect()))}))},e.useModel=function(e,t,s=n){const o=dr(),r=I(t),i=O(t),l=Vt(((n,l)=>{let c;return $n((()=>{const n=e[t];M(c,n)&&(c=n,l())})),{get:()=>(n(),s.get?s.get(c):c),set(e){const n=o.vnode.props;n&&(t in n||r in n||i in n)&&(`onUpdate:${t}`in n||`onUpdate:${r}`in n||`onUpdate:${i}`in n)||!M(e,c)||(c=e,l()),o.emit(`update:${t}`,s.set?s.set(e):e)}}})),c="modelValue"===t?"modelModifiers":`${t}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l},e.useSSRContext=()=>{},e.useSlots=function(){return Fs().slots},e.useTransitionState=zn,e.vModelCheckbox=Pi,e.vModelDynamic=Hi,e.vModelRadio=Bi,e.vModelSelect=Vi,e.vModelText=Mi,e.vShow=ti,e.version=Er,e.warn=Ir,e.watch=Vn,e.watchEffect=function(e,t){return Dn(e,null,t)},e.watchPostEffect=Pn,e.watchSyncEffect=$n,e.withAsyncContext=function(e){const t=dr();let n=e();return mr(),_(n)&&(n=n.catch((e=>{throw fr(t),e}))),[n,()=>fr(t)]},e.withCtx=vn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===fn)return e;const s=kr(fn)||fn.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[e,i,l,c=n]=t[r];e&&(g(e)&&(e={mounted:e,updated:e}),e.deep&&Hn(i),o.push({dir:e,instance:s,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e},e.withKeys=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=n=>{if(!("key"in n))return;const s=O(n.key);return t.some((e=>e===s||zi[e]===s))?e(n):void 0})},e.withMemo=function(e,t,n,s){const o=n[s];if(o&&Ar(o,e))return o;const r=t();return r.memo=e.slice(),n[s]=r},e.withModifiers=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(n,...s)=>{for(let e=0;e<t.length;e++){const s=Ki[t[e]];if(s&&s(n,t))return}return e(n,...s)})},e.withScopeId=e=>vn,e}({}); diff --git a/node_modules/vue/dist/vue.runtime.esm-browser.js b/node_modules/vue/dist/vue.runtime.esm-browser.js index 6e0d4bfe..d773fbb3 100644 --- a/node_modules/vue/dist/vue.runtime.esm-browser.js +++ b/node_modules/vue/dist/vue.runtime.esm-browser.js @@ -1,10861 +1,11081 @@ /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } -const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; -const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - -/** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ -const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); -/** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ -function includeBooleanAttr(value) { - return !!value || value === ''; -} - -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } -} -const listDelimiterRE = /;(?![^(]*\))/g; -const propertyDelimiterRE = /:(.+)/; -function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} - -// These tag configs are shared between compiler-dom and runtime-dom, so they -// https://developer.mozilla.org/en-US/docs/Web/HTML/Element -const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; -// https://developer.mozilla.org/en-US/docs/Web/SVG/Element -const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); -/** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ -const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); - -function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); -} - -/** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ -const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); -}; -const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; - -const EMPTY_OBJ = Object.freeze({}) - ; +const EMPTY_OBJ = Object.freeze({}) ; const EMPTY_ARR = Object.freeze([]) ; -const NOOP = () => { }; -/** - * Always return false. - */ +const NOOP = () => { +}; const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); -const isModelListener = (key) => key.startsWith('onUpdate:'); +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; -const hasOwnProperty = Object.prototype.hasOwnProperty; -const hasOwn = (val, key) => hasOwnProperty.call(val, key); +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; -const isMap = (val) => toTypeString(val) === '[object Map]'; -const isSet = (val) => toTypeString(val) === '[object Set]'; -const isDate = (val) => toTypeString(val) === '[object Date]'; -const isFunction = (val) => typeof val === 'function'; -const isString = (val) => typeof val === 'string'; -const isSymbol = (val) => typeof val === 'symbol'; -const isObject = (val) => val !== null && typeof val === 'object'; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isDate = (val) => toTypeString(val) === "[object Date]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; -const isPlainObject = (val) => toTypeString(val) === '[object Object]'; -const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; -const isReservedProp = /*#__PURE__*/ makeMap( -// the leading comma is intentional so empty string "" is also included -',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); -const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); +const isPlainObject = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; -/** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); -/** - * @private - */ -const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); -/** - * @private - */ -const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); -// compare whether a value has changed, accounting for NaN. +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; -function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} + +const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); +const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} + +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; +}; + +function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } -const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -const wasTracked = (dep) => (dep.w & trackOpBit) > 0; -const newTracked = (dep) => (dep.n & trackOpBit) > 0; -const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } -}; -const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } -}; - -const targetMap = new WeakMap(); -// The number of effects currently being tracked recursively. -let effectTrackDepth = 0; -let trackOpBit = 1; -/** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ -const maxMarkerBits = 30; let activeEffect; -const ITERATE_KEY = Symbol('iterate' ); -const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } -function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; +function triggerComputed(computed) { + return computed.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; +let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } +function pauseScheduling() { + pauseScheduleStack++; } -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } +} +const queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } -function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } -} -function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } +function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } -const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); +const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; +}; + +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol("iterate" ); +const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( -/*#__PURE__*/ -Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); -const get = /*#__PURE__*/ createGetter(); -const shallowGet = /*#__PURE__*/ createGetter(false, true); -const readonlyGet = /*#__PURE__*/ createGetter(true); -const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); -const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; -} -const set = /*#__PURE__*/ createSetter(); -const shallowSet = /*#__PURE__*/ createSetter(true); -function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } -function deleteProperty(target, key) { +function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; -} -function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; -} -function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } -const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys -}; -const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } -}; -const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet -}); -// Props handlers are special in the sense that it should not unwrap top-level -// refs (in order to allow refs to be explicitly passed down), but should -// retain the reactivity of the normal readonly object. -const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet -}); + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true +); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); -function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); +function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } -function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); +function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } -function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } -const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; -function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } -const reactiveMap = new WeakMap(); -const shallowReactiveMap = new WeakMap(); -const readonlyMap = new WeakMap(); -const shallowReadonlyMap = new WeakMap(); +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } -/** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } -/** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } -/** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } -function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; -function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } +class ComputedRefImpl { + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); + } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } -function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } -} -function isRef(r) { - return !!(r && r.__v_isRef === true); -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } -} -function triggerRef(ref) { - triggerRefValue(ref, ref.value ); -} -function unref(ref) { - return isRef(ref) ? ref.value : ref; -} -const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -} -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; -} -class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } -} -function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; } -class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; - } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); - } +function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } } -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; +function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } } +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); + } + } +} +function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} + +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; const stack = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack.push(vnode); } function popWarningContext() { - stack.pop(); + stack.pop(); } function warn$1(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } -/* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } -/* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } -/* istanbul ignore next */ function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } } -const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" +}; +const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; -const pendingPreFlushCbs = []; -let activePreFlushCbs = null; -let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; -const resolvedPromise = /*#__PURE__*/ Promise.resolve(); +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; -let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } -// #2768 -// Use binary-search to find a suitable position in the queue, -// so that the queue maintains the increasing order of job's id, -// which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } -} -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} -function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } -function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); -} -function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - { - seen = seen || new Map(); - } - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) { - continue; - } - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; +const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; +}; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - { - seen = seen || new Map(); - } - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = (job) => checkRecursiveUpdates(seen, job) - ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (true && check(job)) { - continue; - } - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; } + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); } + } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } - else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`); - return true; - } - else { - seen.set(fn, count + 1); - } + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); } + } } -/* eslint-disable no-restricted-globals */ let isHmrUpdating = false; -const hmrDirtyComponents = new Set(); -// Expose the HMR runtime on the global object -// This makes it entirely tree-shakable without polluting the exports and makes -// it easier to be used in toolings like vue-loader -// Note: for a component to be eligible for HMR it also needs the __hmrId option -// to be set so that its instances can be registered / removed. +const hmrDirtyComponents = /* @__PURE__ */ new Set(); { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; } -const map = new Map(); +const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); } function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); + map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: new Set() - }); - return true; + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; } function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; + return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; } - // update initial record (for not-yet-rendered component) - record.initialDef.render = newRender; - [...record.instances].forEach(instance => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - // this flag forces child components with slot content to update - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); } function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - // update initial def (for not-yet-rendered components) - updateComponentDef(record.initialDef, newComp); - // create a snapshot which avoids the set being mutated during updates - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - // 1. Update existing comp definition to match new one - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - // 2. mark definition dirty. This forces the renderer to replace the - // component on patch. - hmrDirtyComponents.add(oldComp); - } - // 3. invalidate options resolution cache - instance.appContext.optionsCache.delete(instance.type); - // 4. actually update - if (instance.ceReload) { - // custom element - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } - else if (instance.parent) { - // 4. Force the parent instance to re-render. This will cause all updated - // components to be unmounted and re-mounted. Queue the update so that we - // don't end up forcing the same parent to re-render multiple times. - queueJob(instance.parent.update); - // instance is the inner component of an async custom element - // invoke to reset styles - if (instance.parent.type.__asyncLoader && - instance.parent.ceReload) { - instance.parent.ceReload(newComp.styles); - } - } - else if (instance.appContext.reload) { - // root instance mounted via createApp() has a reload method - instance.appContext.reload(); - } - else if (typeof window !== 'undefined') { - // root instance inside tree created via raw render(). Force reload. - window.location.reload(); - } - else { - console.warn('[HMR] Root or manually mounted instance modified. Full reload required.'); - } + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); } - // 5. make sure to cleanup dirty hmr components after update - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); - } - }); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); } function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== '__file' && !(key in newComp)) { - delete oldComp[key]; - } + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; } + } } function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } - catch (e) { - console.error(e); - console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` + - `Full reload required.`); - } - }; + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; } -let devtools; +let devtools$1; let buffer = []; let devtoolsNotInstalled = false; -function emit(event, ...args) { - if (devtools) { - devtools.emit(event, ...args); - } - else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } } -function setDevtoolsHook(hook, target) { - var _a, _b; - devtools = hook; - if (devtools) { - devtools.enabled = true; - buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); - buffer = []; - } - else if ( +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( // handle late devtools injection - only do this if we are in an actual // browser environment to avoid the timer handle stalling test runner exit // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3000); - } - else { - // non-browser env, assume not installed + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; - } + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } } function devtoolsInitApp(app, version) { - emit("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); } function devtoolsUnmountApp(app) { - emit("app:unmount" /* APP_UNMOUNT */, app); + emit$1("app:unmount" /* APP_UNMOUNT */, app); } -const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); -const devtoolsComponentUpdated = -/*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); -const devtoolsComponentRemoved = -/*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */); +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ +); +const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); +const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ +); +const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; function createDevtoolsComponentHook(hook) { - return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component); - }; + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; } -const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); -const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ +); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ +); function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); - }; + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params); + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); } -function emit$1(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { emitsOptions, propsOptions: [propsOptions] } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && - !(false )) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1(`Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "${toHandlerKey(event)}" prop.`); - } - } - else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1(`Invalid event arguments: event validation failed for event "${event}".`); - } - } - } +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); } - } - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(toNumber); + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } } + } } - { - devtoolsComponentEmit(instance, event, args); + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1(`Event "${lowerCaseEvent}" is emitted in component ` + - `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` + - `Note that HTML attributes are case-insensitive and you cannot use ` + - `v-on to listen to camelCase events when using in-DOM templates. ` + - `You should probably use "${hyphenate(event)}" instead of "${event}".`); - } + if (number) { + args = rawArgs.map(looseToNumber); } - let handlerName; - let handler = props[(handlerName = toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = toHandlerKey(camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = toHandlerKey(hyphenate(event)))]; + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } -// Check if an incoming prop key is a declared emit event listener. -// e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are -// both considered matched listeners. function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - hasOwn(options, hyphenate(key)) || - hasOwn(options, key)); + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } -/** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; -/** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } -/** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } -/** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } -/** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; -/** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only -) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } -/** - * dev only flag to track whether $attrs was used during render. - * If $attrs was used during render then the warning for failed attrs - * fallthrough can be suppressed. - */ let accessedAttrs = false; function markAttrsAccessed() { - accessedAttrs = true; + accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if (true && attrs === props) { - markAttrsAccessed(); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } - result = normalizeVNode(render.length > 1 - ? render(props, true - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + } else { + extraAttrs.push(key); + } } - } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - let setRoot = undefined; - if (result.patchFlag > 0 && - result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - // ignore v-model handlers when they fail to fallthrough - if (!isModelListener(key)) { - // remove `on`, lowercase first letter to reflect event casing - // accurately - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } - else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1(`Extraneous non-props attributes (` + - `${extraAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes.`); - } - if (eventAttrs.length) { - warn$1(`Extraneous non-emits event listeners (` + - `${eventAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes. ` + - `If the listener is intended to be a component custom event listener only, ` + - `declare it using the "emits" option.`); - } - } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); } - } - // inherit directives - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1(`Runtime directive used on component with non-element root node. ` + - `The directives will not function as intended.`); + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); } - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } } - // inherit transition data - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1(`Component inside <Transition> renders non-element root node ` + - `that cannot be animated.`); - } - root.transition = vnode.transition; + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); } - if (setRoot) { - setRoot(root); + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); } - else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } -/** - * dev only - * In dev mode, template root level comments are rendered, which turns the - * template into a fragment root, but we need to locate the single element - * root for attrs and scope id processing. - */ const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, undefined]; + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } - else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; + }; + return [normalizeVNode(childRoot), setRoot]; }; -function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; const isElementRoot = (vnode) => { - return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) || - vnode.type === Comment // potential v-if branch switch - ); + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // Parent component's render function was hot-updated. Since this may have - // caused the child component's slots content to have changed, we need to - // force the child to update as well. - if ((prevChildren || nextChildren) && isHmrUpdating) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { - return true; + if (prevProps === nextProps) { + return false; } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (!prevProps) { + return !!nextProps; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!nextProps) { + return true; } - return false; + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } -function updateHOCHostEl({ vnode, parent }, el // HostNode -) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} + +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } const isSuspense = (type) => type.__isSuspense; -// Suspense exposes a component-like API, and is treated like a component -// in the compiler, but internally it's a special built-in type that hooks -// directly into the renderer. +let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren }; -// Force-casted public typing for h and TSX props inference -const Suspense = (SuspenseImpl ); +const Suspense = SuspenseImpl ; function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } } -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); } + } } + } } let hasWarned = false; -function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - /* istanbul ignore if */ - if (!hasWarned) { - hasWarned = true; - // @ts-ignore `console.info` cannot be null error - console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`); +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; } - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error(`suspense.resolve() is called without a pending branch.`); - } - if (suspense.isUnmounted) { - throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`); - } - } - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - { - pushWarningContext(vnode); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - { - popWarningContext(); - } - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } } - return result; - /* eslint-enable no-restricted-globals */ + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); } - return s; + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } -function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } +const ssrContextKey = Symbol.for("v-scx"); +const useSSRContext = () => { + { + const ctx = inject(ssrContextKey); + if (!ctx) { + warn$1( + `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.` + ); } - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } -} -function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else { - warn$1(`injection "${String(key)}" not found.`); - } - } - else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } -} + return ctx; + } +}; -// Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); } -// initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; -// implementation function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` + - `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` + - `supports \`watch(source, cb, options?) signature.`); - } - return doWatch(source, cb, options); + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); } -function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - if (!cb) { - if (immediate !== undefined) { - warn$1(`watch() "immediate" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - if (deep !== undefined) { - warn$1(`watch() "deep" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - } - const warnInvalidSource = (s) => { - warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.`); +function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger +} = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isReactive(source)) { - getter = () => source; - deep = true; + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => isReactive(s) || isShallow(s)); - getter = () => source.map(s => { - if (isRef(s)) { - return s.value; - } - else if (isReactive(s)) { - return traverse(s); - } - else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else { - warnInvalidSource(s); - } - }); + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; - }; - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => hasChanged(v, oldValue[i])) - : hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new ReactiveEffect(getter, scheduler); - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - // initial run + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect); - } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + return unwatch; } -// this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } -function traverse(value, seen) { - if (!isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } +function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey$1 = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - // warn more than one non-comment child - warn$1('<transition> can only be used on a single element or component. ' + - 'Use <transition-group> for lists.'); - break; - } - child = c; - hasFound = true; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = toRaw(props); - const { mode } = rawProps; - // check mode - if (mode && - mode !== 'in-out' && - mode !== 'out-in' && - mode !== 'default') { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } -// The transition hooks are attached to the vnode as vnode.transition -// and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; -} -// the placeholder really only handles one special case: KeepAlive -// in the case of a KeepAlive in a leave phase we need to return a KeepAlive -// placeholder with empty content to avoid the KeepAlive instance from being -// unmounted. -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } -// implementation, close to no-op -function defineComponent(options) { - return isFunction(options) ? { setup: options, name: options.name } : options; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1(`Async component loader resolved to undefined. ` + - `If you are using retry(), make sure to return its return value.`); - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (false )) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } -function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - const cache = new Map(); - const keys = new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; -// export the public type for h/tsx inference -// also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; - } - else { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')); - warn$1(`${apiName} is called when there is no active component instance to be ` + - `associated with. ` + - `Lifecycle injection APIs can only be used during execution of setup().` + - (` If you are using async setup(), make sure to register lifecycle ` + - `hooks before the first await statement.` - )); + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } } -const createHook = (lifecycle) => (hook, target = currentInstance) => -// post-create lifecycle registrations are noops during SSR (except for serverPrefetch) -(!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); -const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); -const onMounted = createHook("m" /* MOUNTED */); -const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); -const onUpdated = createHook("u" /* UPDATED */); -const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); -const onUnmounted = createHook("um" /* UNMOUNTED */); -const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); -const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); -const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); +const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) +); +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook("bu"); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook("bum"); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook("sp"); +const onRenderTriggered = createHook( + "rtg" +); +const onRenderTracked = createHook( + "rtc" +); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } -/** -Runtime helper for applying directives to a vnode. Example usage: - -const comp = resolveComponent('comp') -const foo = resolveDirective('foo') -const bar = resolveDirective('bar') - -return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] -]) -*/ -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1('Do not use built-in directive ids as custom directive id: ' + name); - } -} -/** - * Adds directives to a VNode. - */ -function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} - -const COMPONENTS = 'components'; -const DIRECTIVES = 'directives'; -/** - * @private - */ -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -const NULL_DYNAMIC_COMPONENT = Symbol(); -/** - * @private - */ -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } -} -/** - * @private - */ -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -// implementation -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === camelize(name) || - selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS - ? `\nIf this is a native custom element, make sure to exclude it from ` + - `component resolution via compilerOptions.isCustomElement.` - : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } - else { - warn$1(`resolve${capitalize(type.slice(0, -1))} ` + - `can only be used in render() or setup().`); - } -} -function resolve(registry, name) { - return (registry && - (registry[name] || - registry[camelize(name)] || - registry[capitalize(camelize(name))])); -} - -/** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); } - else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else { - ret = []; + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } -/** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } -/** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ -function renderSlot(slots, name, props = {}, -// this is not a user-facing function, so the fallback is always generated by -// the compiler and guaranteed to be a function returning an array -fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` + - `function. You need to mark this component with $dynamic-slots in the ` + - `parent template.`); - slot = () => []; - } - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } -/** - * For prefixing keys in v-on="obj" with "on" - * @private - */ -function toHandlers(obj) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[toHandlerKey(key)] = obj[key]; - } +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; } -/** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; -const publicPropertiesMap = -// Move PURE marker to new line to workaround compiler discarding it -// due to type annotation -/*#__PURE__*/ extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => (shallowReadonly(i.props) ), - $attrs: i => (shallowReadonly(i.attrs) ), - $slots: i => (shallowReadonly(i.slots) ), - $refs: i => (shallowReadonly(i.refs) ), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (resolveMergedOptions(i) ), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (instanceWatch.bind(i) ) -}); -const isReservedPrefix = (key) => key === '_' || key === '$'; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // for internal formatters to know that this is a Vue instance - if (key === '__isVue') { - return true; - } - // prioritize <script setup> bindings during dev. - // this allows even properties that start with _ or $ to be used - so that - // it aligns with the production behavior where the render fn is inlined and - // indeed has access to all declared variables. - if (setupState !== EMPTY_OBJ && - setupState.__isScriptSetup && - hasOwn(setupState, key)) { - return setupState[key]; - } - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - track(instance, "get" /* GET */, key); - markAttrsAccessed(); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else if (currentRenderingInstance && - (!isString(key) || - // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf('__v') !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` + - `character ("$" or "_") and is not proxied on the render context.`); - } - else if (instance === currentRenderingInstance) { - warn$1(`Property ${JSON.stringify(key)} was accessed during render ` + - `but is not defined on instance.`); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance); - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - warn$1(`Attempting to mutate public property "${key}". ` + - `Properties starting with $ are reserved and readonly.`, instance); - return false; - } - else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } - else { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== EMPTY_OBJ && hasOwn(data, key)) || - (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) || - hasOwn(ctx, key) || - hasOwn(publicPropertiesMap, key) || - hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } }; { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` + - `The keys will be empty in production mode to avoid performance overhead.`); - return Reflect.ownKeys(target); - }; + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; } -const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, PublicInstanceProxyHandlers, { +const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend( + {}, + PublicInstanceProxyHandlers, + { get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !isGloballyWhitelisted(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`); - } - return has; + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } -}); -// dev only -// In dev mode, the proxy target exposes the same properties as seen on `this` -// for easier console inspection. In prod mode it will be an empty object so -// these properties definitions can be skipped. + } +); function createDevRenderContext(instance) { - const target = {}; - // expose internal instance for proxy handlers - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP }); - // expose public properties - Object.keys(publicPropertiesMap).forEach(key => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; + }); + return target; } -// dev only function exposePropsOnRenderContext(instance) { - const { ctx, propsOptions: [propsOptions] } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach(key => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } -} -// dev only -function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach(key => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` + - `which are reserved prefixes for Vue internals.`); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); }); + } +} +function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); +} + +const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` +); +function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; +} +function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; +} +function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } +} +function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } +} +function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; +} +function defineModel() { + { + warnRuntimeUsage("defineModel"); + } +} +function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; +} +function useSlots() { + return getContext().slots; +} +function useAttrs() { + return getContext().attrs; +} +function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; +} +function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; +} +function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (isArray(a) && isArray(b)) + return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); +} +function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; +} +function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; } function createDuplicateChecker() { - const cache = Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } - else { - cache[key] = type; - } - }; + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; } let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } } - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } - else { - warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` + - `Did you reference the function correctly?`); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1(`The data option must be a function. ` + - `Plain object usage is no longer supported.`); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1(`data() returned a Promise - note data() cannot be async; If you ` + - `intend to perform data fetching before component renders, use ` + - `async setup() + <Suspense>.`); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } - else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - // expose data on ctx during dev - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) - ? opt.bind(publicThis, publicThis) - : isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) - ? opt.set.bind(publicThis) - : () => { - warn$1(`Write operation failed: computed property "${key}" is readonly.`); - } - ; - const c = computed$1({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; -} -function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - { - warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` + - `and no longer needs \`.value\` in the next minor release. ` + - `To opt-in to the new behavior now, ` + - `set \`app.config.unwrapInjectedRef = true\` (this config is ` + - `temporary and will not be needed in the future.)`); - } - ctx[key] = injected; - } - } - else { - ctx[key] = injected; + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); } { - checkDuplicateProperties("Inject" /* INJECT */, key); + checkDuplicateProperties("Methods" /* METHODS */, key); } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; } -function callHook(hook, instance, type) { - callWithAsyncErrorHandling(isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } +} +function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - watch(getter, handler); - } - else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + watch(getter, handler); + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } - else if (isFunction(raw)) { - watch(getter, raw.bind(publicThis)); - } - else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } - else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } - else { - warn$1(`Invalid watch option: "${key}"`, raw); + } else if (isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } } -/** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') { - warn$1(`"expose" option is ignored when declared in mixins or extends. ` + - `It should only be declared in the base component itself.`); - } - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend(extend(Object.create(null), to), from) : from; + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; } -function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison -isSSR = false) { - const props = {}; - const attrs = {}; - def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; - } +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); } - // validation + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; +} +let currentApp = null; + +function provide(key, value) { + if (!currentInstance) { { - validateProps(rawProps || {}, props, instance); + warn$1(`provide() can only be used inside setup().`); } - if (isStateful) { - // stateful - instance.props = isSSR ? props : shallowReactive(props); + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; - } - else { - // functional w/ declared props - instance.props = props; - } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); } - instance.attrs = attrs; + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} + +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !((instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId))) && - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - trigger(instance, "set" /* SET */, '$attrs'); - } - { - validateProps(rawProps || {}, props, instance); - } + } + if (hasAttrsChanged) { + trigger(instance, "set", "$attrs"); + } + { + validateProps(rawProps || {}, props, instance); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && hasOwn(options, (camelKey = camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, EMPTY_ARR); - return EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); } - else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - isArray(opt) || isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } } - const res = [normalized, needCastKeys]; + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; + if (key[0] !== "$") { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; } -// use function string name to check type constructors -// so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } -/** - * dev only - */ function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - for (const key in options) { - let opt = options[key]; - if (opt == null) - continue; - validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))); - } + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)) + ); + } } -/** - * dev only - */ -function validateProp(name, value, prop, isAbsent) { - const { type, required, validator } = prop; - // required! - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; +function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; } - // missing but optional - if (value == null && !prop.required) { - return; - } - // type check - if (type != null && type !== true) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - // value is valid as long as one of the specified types match - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ''); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - // custom validator - if (validator && !validator(value)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } } -const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt'); -/** - * dev only - */ +const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" +); function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; } - else if (expectedType === 'Object') { - valid = isObject(value); - } - else if (expectedType === 'Array') { - valid = isArray(value); - } - else if (expectedType === 'null') { - valid = value === null; - } - else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; } -/** - * dev only - */ function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid prop: type check failed for prop "${name}".` + - ` Expected ${expectedTypes.map(capitalize).join(' | ')}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; } -/** - * dev only - */ function styleValue(value, type) { - if (type === 'String') { - return `"${value}"`; - } - else if (type === 'Number') { - return `${Number(value)}`; - } - else { - return `${value}`; - } + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } } -/** - * dev only - */ function isExplicable(type) { - const explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(elem => type.toLowerCase() === elem); + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); } -/** - * dev only - */ function isBoolean(...args) { - return args.some(elem => elem.toLowerCase() === 'boolean'); + return args.some((elem) => elem.toLowerCase() === "boolean"); } -const isInternalKey = (key) => key[0] === '_' || key === '$stable'; -const normalizeSlotValue = (value) => isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); } - const normalized = withCtx((...args) => { - if (currentInstance) { - warn$1(`Slot "${key}" invoked outside of the render function: ` + - `this will not track dependencies used in the slot. ` + - `Invoke the slot function inside the render function instead.`); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - { - warn$1(`Non-function value encountered for slot "${key}". ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && - !(false )) { - warn$1(`Non-function value encountered for default slot. ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = toRaw(children); - // make compiler marker non-enumerable - def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = toRaw(children); + def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - def(instance.slots, InternalObjectKey, 1); + } + def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if (isHmrUpdating) { - // Parent was HMR updated so slot content may have changed. - // force update slots and mark instance for hmr as well - extend(slots, children); - } - else if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + extend(slots, children); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; -function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; -} -let uid = 0; -function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = Object.assign({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1(`app.config cannot be replaced. Modify individual options instead.`); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } - else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else { - warn$1(`A plugin must either be a function or an object with an "install" ` + - `function.`); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - else { - warn$1('Mixin has already been applied to target app' + - (mixin.name ? `: ${mixin.name}` : '')); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - // #5571 - if (rootContainer.__vue_app__) { - warn$1(`There is already an app instance mounted on the host container.\n` + - ` If you want to mount another app on the same host container,` + - ` you need to unmount the previous app by calling \`app.unmount()\` first.`); - } - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - // HMR root reload - { - context.reload = () => { - render(cloneVNode(vnode), rootContainer, isSVG); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - else { - warn$1(`App has already been mounted.\n` + - `If you want to remount the same app, move your app creation logic ` + - `into a factory function and create fresh app instances for each ` + - `mount - e.g. \`const createMyApp = () => createApp(App)\``); - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } - else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1(`App already provides property with key "${String(key)}". ` + - `It will be overwritten with the new value.`); - } - context.provides[key] = value; - return app; - } - }); - return app; - }; -} - -/** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + - `A vnode with ref must be created inside the render function.`); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } + } + } else if (_isString) { + refs[ref] = value; + if (hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } - else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } - else if (_isString) { - refs[ref] = value; - if (hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } - else { - doSet(); - } - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } + } } let hasMismatch = false; -const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; +}; const isComment = (node) => node.nodeType === 8 /* COMMENT */; -// Note: hydration is DOM-specific -// But we have to place it in core due to tight coupling with core - splitting -// it out creates a ton of unnecessary complexity. -// Hydration also depends on some renderer internal logic which needs to be -// passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1(`Attempting to hydrate existing markup but container is empty. ` + - `Performing full mount instead.`); - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text mismatch:` + - `\n- Client: ${JSON.stringify(node.data)}` + - `\n- Server: ${JSON.stringify(vnode.children)}`); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else { - warn$1('Invalid HostVNode type:', type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (isOn(key) && !isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + if (!("__vnode" in node)) { + Object.defineProperty(node, "__vnode", { + value: vnode, + enumerable: false + }); + } + if (!("__vueParentComponent" in node)) { + Object.defineProperty(node, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + hasMismatch = true; + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + el.textContent = vnode.children; + } + } + if (props) { + { + for (const key in props) { + if (propHasMismatch(el, key, props[key], vnode)) { + hasMismatch = true; + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - return node; - }; - return [hydrate, hydrateNode]; + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; +} +function propHasMismatch(el, key, clientValue, vnode) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style"); + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = `attribute`; + mismatchKey = key; + } + } + if (mismatchType) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${mismatchType} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; +} +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); +} +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key == null ? void 0 : key.trim(); + value = value == null ? void 0 : value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; } -/* eslint-disable no-restricted-globals */ let supported; let perf; function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } } function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } } function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } + if (supported !== void 0) { return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; } -const queuePostRenderEffect = queueEffectWithSuspense - ; -/** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ +const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } -// Separate API for creating hydration-enabled renderer. -// Hydration logic is only used when calling this function, making it -// tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } -// implementation function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else { - warn$1('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); } + } } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); } - else { - // there's no support for dynamic comments - n2.el = n1.el; + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); + } + for (const key in newProps) { + if (isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); } - { - Object.defineProperty(el, '__vnode', { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, '__vueParentComponent', { - value: parentComponent, - enumerable: false - }); + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && - subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - subTree = - filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - // HMR updated, force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (// #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) { - // HMR updated / Dev root fragment (w/ comments), force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { { - startMeasure(instance, `init`); + startMeasure(instance, `render`); } - setupComponent(instance); + instance.subTree = renderComponentRoot(instance); { - endMeasure(instance, `init`); + endMeasure(instance, `render`); } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); return; + } } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); + let originNext = next; + let vnodeHook; { - popWarningContext(); - endMeasure(instance, `mount`); + pushWarningContext(next || instance.vnode); } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - // async & still pending - just update props and slots - // since the component's reactive effect for render isn't set-up yet - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - { - startMeasure(instance, `render`); - } - const subTree = (instance.subTree = renderComponentRoot(instance)); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - // render - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates toggleRecurse(instance, true); { - effect.onTrack = instance.rtc - ? e => invokeArrayFns(instance.rtc, e) - : void 0; - effect.onTrigger = instance.rtg - ? e => invokeArrayFns(instance.rtg, e) - : void 0; - update.ownerInstance = instance; + startMeasure(instance, `render`); } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); + if (u) { + queuePostRenderEffect(u, parentSuspense); } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); - } - }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && - vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ && - transition && - !transition.persisted) { - vnode.children.forEach(child => { - if (child.type === Comment) { - hostRemove(child.el); - } - else { - remove(child); - } - }); - } - else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); } { - devtoolsComponentRemoved(instance); + devtoolsComponentUpdated(instance); } + { + popWarningContext(); + } + } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } + const effect = instance.effect = new ReactiveEffect( + componentUpdateFn, + NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + update.id = instance.uid; + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; +} +function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; +} +function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } -/** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } - // also inherit for comment nodes, but not placeholders (e.g. v-if which - // would have received .el during block patch) - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } } + } } -// https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; +} +function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; -const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); -const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1(`Current renderer does not support string target for Teleports. ` + - `(missing querySelector renderer option)`); - return null; - } - else { - const target = select(targetSelector); - if (!target) { - warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` + - `Note the target element must exist before the component is mounted - ` + - `i.e. the target cannot be rendered by the component itself, and ` + - `ideally should be outside of the entire Vue component tree.`); - } - return target; - } + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; } - else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); } + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - // #3302 - // HMR updated, force full diff - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = createComment('teleport start') - ); - const mainAnchor = (n2.anchor = createComment('teleport end') - ); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - else if (!disabled) { - warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } - } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - else { - warn$1('Invalid Teleport target on update:', target, `(${typeof target})`); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } - } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport -}; -function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } + } else if (!disabled) { + warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } -} -function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } -// Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; +function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} -const Fragment = Symbol('Fragment' ); -const Text = Symbol('Text' ); -const Comment = Symbol('Comment' ); -const Static = Symbol('Static' ); -// Since v-if and v-for are the two possible ways node structure can dynamically -// change, once we consider v-if branches and each v-for fragment a block, we -// can divide a template into nested blocks, and within each block the node -// structure would be stable. This allows us to skip most children diffing -// and only worry about the dynamic nodes (indicated by patch flags). +const Fragment = Symbol.for("v-fgt"); +const Text = Symbol.for("v-txt"); +const Comment = Symbol.for("v-cmt"); +const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; -/** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } -// Whether we should be tracking dynamic child nodes inside a block. -// Only tracks when this value is > 0 -// We are not using a simple boolean because this value may need to be -// incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; -/** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } -/** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } -/** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 /* COMPONENT */ && - hmrDirtyComponents.has(n2.type)) { - // HMR only: if the component has been hot-updated, force a reload. - return false; - } - return n1.type === n2.type && n1.key === n2.key; + if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; } let vnodeArgsTransformer; -/** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; + vnodeArgsTransformer = transformer; } const createVNodeWithArgsTransform = (...args) => { - return _createVNode(...(vnodeArgsTransformer - ? vnodeArgsTransformer(args, currentRenderingInstance) - : args)); + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); }; const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; -const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? isString(ref) || isRef(ref) || isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); +const normalizeRef = ({ + ref, + ref_key, + ref_for +}) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; -function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } +function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // validate key - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } -const createVNode = (createVNodeWithArgsTransform ); +const createVNode = createVNodeWithArgsTransform ; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); } - // encode the vnode type information into a bitmap - const shapeFlag = isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) { - type = toRaw(type); - warn$1(`Vue received a Component which was made a reactive object. This can ` + - `lead to unnecessary performance overhead, and should be avoided by ` + - `marking the component with \`markRaw\` or using \`shallowRef\` ` + - `instead of \`ref\`.`, `\nComponent that was made reactive: `, type); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); } - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return isProxy(props) || InternalObjectKey in props - ? extend({}, props) - : props; + if (!props) + return null; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 /* HOISTED */ && isArray(children) - ? children.map(deepCloneVNode) - : children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } -/** - * Dev only, for HMR of hoisted vnodes reused in v-for - * https://github.com/vitejs/vite/issues/2022 - */ function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; } -/** - * @private - */ -function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); +function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } -/** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } -/** - * @private - */ -function createCommentVNode(text = '', -// when used as the v-else branch, the comment node must be created as a -// block to ensure correct updates. -asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); +function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } -// optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } - else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); -let uid$1 = 0; +let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; +let internalSetCurrentInstance; +let setInSSRSetupState; +{ + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; +} const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; -const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component'); +const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); function validateComponentName(name, config) { - const appIsNativeTag = config.isNativeTag || NO; - if (isBuiltInTag(name) || appIsNativeTag(name)) { - warn$1('Do not use built-in or reserved HTML elements as component id: ' + name); - } + const appIsNativeTag = config.isNativeTag || NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } } function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1(`"compilerOptions" is only supported when using a build of Vue that ` + - `includes the runtime compiler. Since you are using a runtime-only ` + - `build, the options should be passed via your build tool config instead.`); - } + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); } - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - { - exposePropsOnRenderContext(instance); + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } } - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]); - resetTracking(); - unsetCurrentInstance(); - if (isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous'; - warn$1(`Component <${name}>: setup function returned a promise, but no ` + - `<Suspense> boundary was found in the parent component tree. ` + - `A component with async setup() must be nested in a <Suspense> ` + - `in order to be rendered.`); - } - } - } - else { - handleSetupResult(instance, setupResult, isSSR); + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + resetTracking(); + reset(); + if (isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); } + } + } else { + handleSetupResult(instance, setupResult, isSSR); } - else { - finishComponentSetup(instance, isSSR); - } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - // setup returned an inline render function - { - instance.render = setupResult; - } - } - else if (isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1(`setup() should not return VNodes directly - ` + - `return a render function instead.`); - } - // setup returned bindings. - // assuming a render function compiled from template is present. - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } - } - else if (setupResult !== undefined) { - warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`); - } - finishComponentSetup(instance, isSSR); -} -let compile; -let installWithProxy; -/** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ -function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; -} -// dev only -const isRuntimeOnly = () => !compile; -function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend(extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } - } - instance.render = (Component.render || NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); - } - } - // support for 2.x options + if (isFunction(setupResult)) { { - setCurrentInstance(instance); - pauseTracking(); - applyOptions(instance); - resetTracking(); - unsetCurrentInstance(); + instance.render = setupResult; } - // warn missing template/render - // the runtime compilation of template in SSR is done by server-render - if (!Component.render && instance.render === NOOP && !isSSR) { - /* istanbul ignore if */ - if (!compile && Component.template) { - warn$1(`Component provided template option but ` + - `runtime compilation is not supported in this build of Vue.` + - (` Use "vue.esm-browser.js" instead.` - ) /* should not happen */); - } - else { - warn$1(`Component is missing template or render function.`); - } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); } -function createAttrsProxy(instance) { - return new Proxy(instance.attrs, { - get(target, key) { - markAttrsAccessed(); - track(instance, "get" /* GET */, '$attrs'); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } +let compile$1; +let installWithProxy; +function registerRuntimeCompiler(_compile) { + compile$1 = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; +} +const isRuntimeOnly = () => !compile$1; +function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile$1 && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions ); + Component.render = compile$1(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile$1 && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } +} +function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + markAttrsAccessed(); + track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } + )); +} +function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + })); } function createSetupContext(instance) { - const expose = exposed => { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - instance.exposed = exposed || {}; - }; - let attrs; + const expose = (exposed) => { { - // We use getters in dev in case libs like test-utils overwrite instance - // properties (overwrites should not be done in prod) - return Object.freeze({ - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - get slots() { - return shallowReadonly(instance.slots); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } } + instance.exposed = exposed || {}; + }; + { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } } const classifyRE = /(?:^|[-_])(\w)/g; -const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); -function getComponentName(Component) { - return isFunction(Component) - ? Component.displayName || Component.name - : Component.name; +const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); +function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } -/* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { - return isFunction(value) && '__vccOpts' in value; + return isFunction(value) && "__vccOpts" in value; } -const computed$1 = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return computed(getterOrOptions, debugOptions, isInSSRComponentSetup); -}); - -// dev only -const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` + - `<script setup> of a single file component. Its arguments should be ` + - `compiled away and passing it at runtime has no effect.`); -// implementation -function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; -} -// implementation -function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; -} -/** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ -function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } -} -/** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ -function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; -} -function useSlots() { - return getContext().slots; -} -function useAttrs() { - return getContext().attrs; -} -function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); -} -/** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ -function mergeDefaults(raw, defaults) { - const props = isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - } - return props; -} -/** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ -function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; -} -/** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ -function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1(`withAsyncContext called without active current instance. ` + - `This is likely a bug.`); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; -} - -// Actual implementation -function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } -} - -const ssrContextKey = Symbol(`ssrContext` ); -const useSSRContext = () => { - { - const ctx = inject(ssrContextKey); - if (!ctx) { - warn$1(`Server rendering context not provided. Make sure to only call ` + - `useSSRContext() conditionally in the server build.`); - } - return ctx; - } +const computed = (getterOrOptions, debugOptions) => { + return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); }; -function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - if (typeof window === 'undefined') { - return; - } - const vueStyle = { style: 'color:#3ba776' }; - const numberStyle = { style: 'color:#0b1bc9' }; - const stringStyle = { style: 'color:#b62e24' }; - const keywordStyle = { style: 'color:#9d288c' }; - // custom formatter for Chrome - // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html - const formatter = { - header(obj) { - // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ['div', vueStyle, `VueInstance`]; - } - else if (isRef(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, genRefFlag(obj)], - '<', - formatValue(obj.value), - `>` - ]; - } - else if (isReactive(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'], - '<', - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } - else if (isReadonly(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'], - '<', - formatValue(obj), - '>' - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - 'div', - {}, - ...formatInstance(obj.$) - ]; - } +function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + if (!i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const camelizedName = camelize(name); + const hyphenatedName = hyphenate(name); + const res = customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) { + localValue = value; + trigger(); } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock('props', toRaw(instance.props))); + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('setup', instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('data', toRaw(instance.data))); - } - const computed = extractKeys(instance, 'computed'); - if (computed) { - blocks.push(createInstanceBlock('computed', computed)); - } - const injected = extractKeys(instance, 'inject'); - if (injected) { - blocks.push(createInstanceBlock('injected', injected)); - } - blocks.push([ - 'div', - {}, - [ - 'span', - { - style: keywordStyle.style + ';opacity:0.66' - }, - '$ (internal): ' - ], - ['object', { object: instance }] - ]); - return blocks; + } + }; + }; + return res; +} + +function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ['span', {}]; - } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } +} + +function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { return [ - 'div', - { style: 'line-height:1.25em;margin-bottom:0.6em' }, - [ - 'div', - { - style: 'color:#476582' - }, - type - ], - [ - 'div', - { - style: 'padding-left:1.25em' - }, - ...Object.keys(target).map(key => { - return [ - 'div', - {}, - ['span', keywordStyle, key + ': '], - formatValue(target[key], false) - ]; - }) - ] + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + formatValue(obj.value), + `>` ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } } - function formatValue(v, asRaw = true) { - if (typeof v === 'number') { - return ['span', numberStyle, v]; - } - else if (typeof v === 'string') { - return ['span', stringStyle, JSON.stringify(v)]; - } - else if (typeof v === 'boolean') { - return ['span', keywordStyle, v]; - } - else if (isObject(v)) { - return ['object', { object: asRaw ? toRaw(v) : v }]; - } - else { - return ['span', stringStyle, String(v)]; - } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if ((isArray(opts) && opts.includes(key)) || - (isObject(opts) && key in opts)) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) { - return true; - } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); } - else { - window.devtoolsFormatters = [formatter]; + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } -// Core API ------------------------------------------------------------------ -const version = "3.2.36"; -/** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ -const ssrUtils = (null); -/** - * @internal only exposed in compat builds - */ +const version = "3.4.15"; +const warn = warn$1 ; +const ErrorTypeStrings = ErrorTypeStrings$1 ; +const devtools = devtools$1 ; +const setDevtoolsHook = setDevtoolsHook$1 ; +const ssrUtils = null; const resolveFilter = null; -/** - * @internal only exposed in compat builds. - */ -const compatUtils = (null); +const compatUtils = null; +const DeprecationTypes = null; -const svgNS = 'http://www.w3.org/2000/svg'; -const doc = (typeof document !== 'undefined' ? document : null); -const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); +const svgNS = "http://www.w3.org/2000/svg"; +const mathmlNS = "http://www.w3.org/1998/Math/MathML"; +const doc = typeof document !== "undefined" ? document : null; +const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; -// compiler should normalize class + :class bindings on the same element -// into a single binding ['staticClass', dynamic] -function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } -} - -function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } -} -const importantRE = /\s*!important$/; -function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } -} -const prefixes = ['Webkit', 'Moz', 'ms']; -const prefixCache = {}; -function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; -} - -const xlinkNS = 'http://www.w3.org/1999/xlink'; -function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } -} - -// __UNSAFE__ -// functions. The user is responsible for using them with only trusted content. -function patchDOMProp(el, key, value, -// the following args are passed only due to potential innerHTML/textContent -// overriding existing VNodes, in which case the old tree must be properly -// unmounted. -prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - { - warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` + - `value ${value} is invalid.`, e); - } - } - needRemove && el.removeAttribute(key); -} - -// Async edge case fix requires storing an event listener's attach timestamp. -const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; -})(); -// To avoid the overhead of repeatedly calling performance.now(), we cache -// and use the same timestamp for all event listeners attached in the same tick. -let cachedNow = 0; -const p = /*#__PURE__*/ Promise.resolve(); -const reset = () => { - cachedNow = 0; -}; -const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); -function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); -} -function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); -} -function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } -} -const optionsModifierRE = /(?:Once|Passive|Capture)$/; -function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [hyphenate(name.slice(2)), options]; -} -function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; -} -function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } -} - -const nativeOnRE = /^on[a-z]/; -const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (isOn(key)) { - // ignore v-model listeners - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } -}; -function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && isString(value)) { - return false; - } - return key in el; -} - -function defineCustomElement(options, hydrate) { - const Comp = defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; -} -const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); -}); -const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { -}); -class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - if (this.shadowRoot) { - warn$1(`Custom element has pre-rendered declarative shadow root but is not ` + - `defined as hydratable. Use \`defineSSRCustomElement\`.`); - } - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = toNumber(value); - } - this._setProp(camelize(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = createVNode(this._def, extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // HMR - { - instance.ceReload = newStyles => { - // always reset styles - if (this._styles) { - this._styles.forEach(s => this.shadowRoot.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - // if this is an async component, ceReload is called from the inner - // component so no need to reload the async wrapper - if (!this._def.__asyncLoader) { - // reload - this._instance = null; - this._update(); - } - }; - } - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - // record for HMR - { - (this._styles || (this._styles = [])).push(s); - } - }); - } - } -} - -function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - const instance = getCurrentInstance(); - if (!instance) { - warn$1(`useCssModule must be called inside setup()`); - return EMPTY_OBJ; - } - const modules = instance.type.__cssModules; - if (!modules) { - warn$1(`Current instance does not have CSS modules injected.`); - return EMPTY_OBJ; - } - const mod = modules[name]; - if (!mod) { - warn$1(`Current instance does not have CSS module named "${name}".`); - return EMPTY_OBJ; - } - return mod; - } -} - -/** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ -function useCssVars(getter) { - const instance = getCurrentInstance(); - /* istanbul ignore next */ - if (!instance) { - warn$1(`useCssVars is called without current active component instance.`); - return; - } - const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy)); - watchPostEffect(setVars); - onMounted(() => { - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); -} -function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - // drill down HOCs until it's a non-component vnode - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) { - setVarsOnNode(vnode.el, vars); - } - else if (vnode.type === Fragment) { - vnode.children.forEach(c => setVarsOnVNode(c, vars)); - } - else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) - break; - el = el.nextSibling; - } - } -} -function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - } - } -} - -const TRANSITION = 'transition'; -const ANIMATION = 'animation'; -// DOM Transition is a higher-order-component based on the platform-agnostic -// base Transition component, with DOM-specific logic. +const TRANSITION = "transition"; +const ANIMATION = "animation"; +const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots); -Transition.displayName = 'Transition'; +Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; -const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ extend({}, BaseTransition.props, DOMTransitionPropsValidators)); -/** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ -const callHook$1 = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } +const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators +); +const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; -/** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook$1(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook$1(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook$1(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook$1(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook$1(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook$1(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook$1(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = toNumber(val); - validateDuration(res); - return res; -} -function validateDuration(val) { - if (typeof val !== 'number') { - warn$1(`<transition> explicit duration is not a valid number - ` + - `got ${JSON.stringify(val)}.`); - } - else if (isNaN(val)) { - warn$1(`<transition> explicit duration is NaN - ` + - 'the duration expression might be incorrect.'); - } + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } -// Old versions of Chromium (below 61.0.3163.100) formats floating pointer -// numbers in a locale-dependent way, using a comma instead of a dot. -// If comma is not replaced with a dot, the input will be rounded down -// (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } -// synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } -const positionMap = new WeakMap(); -const newPositionMap = new WeakMap(); -const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = children; - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - else { - warn$1(`<TransitionGroup> children must be keyed.`); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return createVNode(tag, null, children); - }; +function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } +} + +const vShowOldKey = Symbol("_vod"); +const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; +{ + vShow.name = "show"; +} +function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; +} + +const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); +function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + const setVars = () => { + const vars = getter(instance.proxy); + setVarsOnVNode(instance.subTree, vars); + updateTeleports(vars); + }; + watchPostEffect(setVars); + onMounted(() => { + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); +} +function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) + break; + el = el.nextSibling; + } + } +} +function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } +} + +function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = isString(next); + if (next && !isCssString) { + if (prev && !isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } +} +const semicolonRE = /[^\\];\s*$/; +const importantRE = /\s*!important$/; +function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } +} +const prefixes = ["Webkit", "Moz", "ms"]; +const prefixCache = {}; +function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; +} + +const xlinkNS = "http://www.w3.org/1999/xlink"; +function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = isSpecialBooleanAttr(key); + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } +} + +function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); +} + +function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); +} +function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); +} +const veiKey = Symbol("_vei"); +function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } +} +const optionsModifierRE = /(?:Once|Passive|Capture)$/; +function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; +} +let cachedNow = 0; +const p = /* @__PURE__ */ Promise.resolve(); +const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); +function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; +} +function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } +} + +const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter +key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; +const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } +}; +function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineCustomElement(options, hydrate2) { + const Comp = defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; +} +/*! #__NO_SIDE_EFFECTS__ */ +const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); +}; +const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { +}; +class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = camelize(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = createVNode(this._def, extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + { + (this._styles || (this._styles = [])).push(s); + } + }); + } + } +} + +function useCssModule(name = "$style") { + { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssModule must be called inside setup()`); + return EMPTY_OBJ; + } + const modules = instance.type.__cssModules; + if (!modules) { + warn(`Current instance does not have CSS modules injected.`); + return EMPTY_OBJ; + } + const mod = modules[name]; + if (!mod) { + warn(`Current instance does not have CSS module named "${name}".`); + return EMPTY_OBJ; + } + return mod; + } +} + +const positionMap = /* @__PURE__ */ new WeakMap(); +const newPositionMap = /* @__PURE__ */ new WeakMap(); +const moveCbKey = Symbol("_moveCb"); +const enterCbKey = Symbol("_enterCb"); +const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = children; + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else { + warn(`<TransitionGroup> children must be keyed.`); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return createVNode(tag, null, children); + }; + } +}; +const removeMode = (props) => delete props.mode; +/* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return isArray(fn) ? value => invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } -// We are exporting the v-model runtime directly as vnode hooks so that it can -// be tree-shaken in case v-model is never used. +const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (isArray(value)) { - el.checked = looseIndexOf(value, vnode.props.value) > -1; - } - else if (isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (isArray(value)) { + el.checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; -function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !isArray(value) && !isSet(value)) { - warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` + - `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`); +function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + if (isArrayValue && looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArray(value)) { - option.selected = looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } -// retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } -// retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } -const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; +const systemModifiers = ["ctrl", "shift", "alt", "meta"]; const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) }; -/** - * @private - */ const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; -}; -// Kept for 2.x compat. -// Note: IE11 compat for `spacebar` and `del` is removed for now. -const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' -}; -/** - * @private - */ -const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; -}; - -const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; } + return fn(event, ...args); + }); +}; +const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" +}; +const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); }; -function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; -} -const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps); -// lazy create the renderer - this makes core renderer logic tree-shakable -// in case the user only imports reactivity utilities from Vue. +const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = createRenderer(rendererOptions))); + return renderer || (renderer = createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } -// use explicit type casts here to avoid import() calls in rolled-up d.ts -const render = ((...args) => { - ensureRenderer().render(...args); -}); -const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); -}); -const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); +const render = (...args) => { + ensureRenderer().render(...args); +}; +const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); +}; +const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; -}); -const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; -}); + return proxy; + }; + return app; +}; +const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; +}; +function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } +} function injectNativeTagCheck(app) { - // Inject `isNativeTag` - // this is used for component name validation (dev only) - Object.defineProperty(app.config, 'isNativeTag', { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag), - writable: false - }); + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); } -// dev only function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, 'isCustomElement', { - get() { - return isCustomElement; - }, - set() { - warn$1(`The \`isCustomElement\` config option is deprecated. Use ` + - `\`compilerOptions.isCustomElement\` instead.`); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using ` + - `a build of Vue.js that includes the runtime compiler (aka "full build"). ` + - `Since you are using the runtime-only build, \`compilerOptions\` ` + - `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` + - `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` + - `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` + - `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`; - Object.defineProperty(app.config, 'compilerOptions', { - get() { - warn$1(msg); - return compilerOptions; - }, - set() { - warn$1(msg); - } - }); - } + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } } function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn$1(`Failed to mount app: mount target selector "${container}" returned null.`); - } - return res; + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); } - if (window.ShadowRoot && - container instanceof window.ShadowRoot && - container.mode === 'closed') { - warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`); - } - return container; + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; } -/** - * @internal - */ const initDirectivesForSSR = NOOP; function initDev() { + { { - { - console.info(`You are running a development build of Vue.\n` + - `Make sure to use the production build (*.prod.js) when deploying for production.`); - } - initCustomFormatter(); + console.info( + `You are running a development build of Vue. +Make sure to use the production build (*.prod.js) when deploying for production.` + ); } + initCustomFormatter(); + } } -// This entry exports the runtime only, and is built as { - initDev(); + initDev(); } -const compile$1 = () => { - { - warn$1(`Runtime compilation is not supported in this build of Vue.` + - (` Use "vue.esm-browser.js" instead.` - ) /* should not happen */); - } +const compile = () => { + { + warn( + `Runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` ) + ); + } }; -export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compile$1 as compile, computed$1 as computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; +export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useModel, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId }; diff --git a/node_modules/vue/dist/vue.runtime.esm-browser.prod.js b/node_modules/vue/dist/vue.runtime.esm-browser.prod.js index c430f101..f1910444 100644 --- a/node_modules/vue/dist/vue.runtime.esm-browser.prod.js +++ b/node_modules/vue/dist/vue.runtime.esm-browser.prod.js @@ -1 +1,11 @@ -function e(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){return!!e||""===e}function r(e){if(k(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=O(o)?i(o):r(o);if(s)for(const e in s)t[e]=s[e]}return t}return O(e)||L(e)?e:void 0}const s=/;(?![^(]*\))/g,l=/:(.+)/;function i(e){const t={};return e.split(s).forEach((e=>{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function c(e){let t="";if(O(e))t=e;else if(k(e))for(let n=0;n<e.length;n++){const o=c(e[n]);o&&(t+=o+" ")}else if(L(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function a(e){if(!e)return null;let{class:t,style:n}=e;return t&&!O(t)&&(e.class=c(t)),n&&(e.style=r(n)),e}function u(e,t){if(e===t)return!0;let n=F(e),o=F(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=P(e),o=P(t),n||o)return e===t;if(n=k(e),o=k(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=u(e[o],t[o]);return n}(e,t);if(n=L(e),o=L(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!u(e[n],t[n]))return!1}}return String(e)===String(t)}function f(e,t){return e.findIndex((e=>u(e,t)))}const p=e=>O(e)?e:null==e?"":k(e)||L(e)&&(e.toString===R||!T(e.toString))?JSON.stringify(e,d,2):String(e),d=(e,t)=>t&&t.__v_isRef?d(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:A(t)?{[`Set(${t.size})`]:[...t.values()]}:!L(t)||k(t)||I(t)?t:String(t),h={},g=[],v=()=>{},m=()=>!1,_=/^on[^a-z]/,y=e=>_.test(e),b=e=>e.startsWith("onUpdate:"),C=Object.assign,x=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},w=Object.prototype.hasOwnProperty,S=(e,t)=>w.call(e,t),k=Array.isArray,E=e=>"[object Map]"===M(e),A=e=>"[object Set]"===M(e),F=e=>"[object Date]"===M(e),T=e=>"function"==typeof e,O=e=>"string"==typeof e,P=e=>"symbol"==typeof e,L=e=>null!==e&&"object"==typeof e,N=e=>L(e)&&T(e.then)&&T(e.catch),R=Object.prototype.toString,M=e=>R.call(e),I=e=>"[object Object]"===M(e),B=e=>O(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,V=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},j=/-(\w)/g,U=$((e=>e.replace(j,((e,t)=>t?t.toUpperCase():"")))),D=/\B([A-Z])/g,H=$((e=>e.replace(D,"-$1").toLowerCase())),W=$((e=>e.charAt(0).toUpperCase()+e.slice(1))),z=$((e=>e?`on${W(e)}`:"")),K=(e,t)=>!Object.is(e,t),G=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},q=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},J=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Y;let X;class Z{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&X&&(this.parent=X,this.index=(X.scopes||(X.scopes=[])).push(this)-1)}run(e){if(this.active){const t=X;try{return X=this,e()}finally{X=t}}}on(){X=this}off(){X=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function Q(e){return new Z(e)}function ee(e,t=X){t&&t.active&&t.effects.push(e)}function te(){return X}function ne(e){X&&X.cleanups.push(e)}const oe=e=>{const t=new Set(e);return t.w=0,t.n=0,t},re=e=>(e.w&ce)>0,se=e=>(e.n&ce)>0,le=new WeakMap;let ie=0,ce=1;let ae;const ue=Symbol(""),fe=Symbol("");class pe{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,ee(this,n)}run(){if(!this.active)return this.fn();let e=ae,t=ve;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=ae,ae=this,ve=!0,ce=1<<++ie,ie<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=ce})(this):de(this),this.fn()}finally{ie<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const r=t[o];re(r)&&!se(r)?r.delete(e):t[n++]=r,r.w&=~ce,r.n&=~ce}t.length=n}})(this),ce=1<<--ie,ae=this.parent,ve=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){ae===this?this.deferStop=!0:this.active&&(de(this),this.onStop&&this.onStop(),this.active=!1)}}function de(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}function he(e,t){e.effect&&(e=e.effect.fn);const n=new pe(e);t&&(C(n,t),t.scope&&ee(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o}function ge(e){e.effect.stop()}let ve=!0;const me=[];function _e(){me.push(ve),ve=!1}function ye(){const e=me.pop();ve=void 0===e||e}function be(e,t,n){if(ve&&ae){let t=le.get(e);t||le.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=oe()),Ce(o)}}function Ce(e,t){let n=!1;ie<=30?se(e)||(e.n|=ce,n=!re(e)):n=!e.has(ae),n&&(e.add(ae),ae.deps.push(e))}function xe(e,t,n,o,r,s){const l=le.get(e);if(!l)return;let i=[];if("clear"===t)i=[...l.values()];else if("length"===n&&k(e))l.forEach(((e,t)=>{("length"===t||t>=o)&&i.push(e)}));else switch(void 0!==n&&i.push(l.get(n)),t){case"add":k(e)?B(n)&&i.push(l.get("length")):(i.push(l.get(ue)),E(e)&&i.push(l.get(fe)));break;case"delete":k(e)||(i.push(l.get(ue)),E(e)&&i.push(l.get(fe)));break;case"set":E(e)&&i.push(l.get(ue))}if(1===i.length)i[0]&&we(i[0]);else{const e=[];for(const t of i)t&&e.push(...t);we(oe(e))}}function we(e,t){const n=k(e)?e:[...e];for(const o of n)o.computed&&Se(o);for(const o of n)o.computed||Se(o)}function Se(e,t){(e!==ae||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const ke=e("__proto__,__v_isRef,__isVue"),Ee=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(P)),Ae=Ne(),Fe=Ne(!1,!0),Te=Ne(!0),Oe=Ne(!0,!0),Pe=Le();function Le(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Ct(this);for(let t=0,r=this.length;t<r;t++)be(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(Ct)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){_e();const n=Ct(this)[t].apply(this,e);return ye(),n}})),e}function Ne(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?ut:at:t?ct:it).get(n))return n;const s=k(n);if(!e&&s&&S(Pe,o))return Reflect.get(Pe,o,r);const l=Reflect.get(n,o,r);return(P(o)?Ee.has(o):ke(o))?l:(e||be(n,0,o),t?l:At(l)?s&&B(o)?l:l.value:L(l)?e?ht(l):pt(l):l)}}function Re(e=!1){return function(t,n,o,r){let s=t[n];if(_t(s)&&At(s)&&!At(o))return!1;if(!e&&!_t(o)&&(yt(o)||(o=Ct(o),s=Ct(s)),!k(t)&&At(s)&&!At(o)))return s.value=o,!0;const l=k(t)&&B(n)?Number(n)<t.length:S(t,n),i=Reflect.set(t,n,o,r);return t===Ct(r)&&(l?K(o,s)&&xe(t,"set",n,o):xe(t,"add",n,o)),i}}const Me={get:Ae,set:Re(),deleteProperty:function(e,t){const n=S(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&xe(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return P(t)&&Ee.has(t)||be(e,0,t),n},ownKeys:function(e){return be(e,0,k(e)?"length":ue),Reflect.ownKeys(e)}},Ie={get:Te,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Be=C({},Me,{get:Fe,set:Re(!0)}),Ve=C({},Ie,{get:Oe}),$e=e=>e,je=e=>Reflect.getPrototypeOf(e);function Ue(e,t,n=!1,o=!1){const r=Ct(e=e.__v_raw),s=Ct(t);n||(t!==s&&be(r,0,t),be(r,0,s));const{has:l}=je(r),i=o?$e:n?St:wt;return l.call(r,t)?i(e.get(t)):l.call(r,s)?i(e.get(s)):void(e!==r&&e.get(t))}function De(e,t=!1){const n=this.__v_raw,o=Ct(n),r=Ct(e);return t||(e!==r&&be(o,0,e),be(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function He(e,t=!1){return e=e.__v_raw,!t&&be(Ct(e),0,ue),Reflect.get(e,"size",e)}function We(e){e=Ct(e);const t=Ct(this);return je(t).has.call(t,e)||(t.add(e),xe(t,"add",e,e)),this}function ze(e,t){t=Ct(t);const n=Ct(this),{has:o,get:r}=je(n);let s=o.call(n,e);s||(e=Ct(e),s=o.call(n,e));const l=r.call(n,e);return n.set(e,t),s?K(t,l)&&xe(n,"set",e,t):xe(n,"add",e,t),this}function Ke(e){const t=Ct(this),{has:n,get:o}=je(t);let r=n.call(t,e);r||(e=Ct(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&xe(t,"delete",e,void 0),s}function Ge(){const e=Ct(this),t=0!==e.size,n=e.clear();return t&&xe(e,"clear",void 0,void 0),n}function qe(e,t){return function(n,o){const r=this,s=r.__v_raw,l=Ct(s),i=t?$e:e?St:wt;return!e&&be(l,0,ue),s.forEach(((e,t)=>n.call(o,i(e),i(t),r)))}}function Je(e,t,n){return function(...o){const r=this.__v_raw,s=Ct(r),l=E(s),i="entries"===e||e===Symbol.iterator&&l,c="keys"===e&&l,a=r[e](...o),u=n?$e:t?St:wt;return!t&&be(s,0,c?fe:ue),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:i?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Ye(e){return function(...t){return"delete"!==e&&this}}function Xe(){const e={get(e){return Ue(this,e)},get size(){return He(this)},has:De,add:We,set:ze,delete:Ke,clear:Ge,forEach:qe(!1,!1)},t={get(e){return Ue(this,e,!1,!0)},get size(){return He(this)},has:De,add:We,set:ze,delete:Ke,clear:Ge,forEach:qe(!1,!0)},n={get(e){return Ue(this,e,!0)},get size(){return He(this,!0)},has(e){return De.call(this,e,!0)},add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear"),forEach:qe(!0,!1)},o={get(e){return Ue(this,e,!0,!0)},get size(){return He(this,!0)},has(e){return De.call(this,e,!0)},add:Ye("add"),set:Ye("set"),delete:Ye("delete"),clear:Ye("clear"),forEach:qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Je(r,!1,!1),n[r]=Je(r,!0,!1),t[r]=Je(r,!1,!0),o[r]=Je(r,!0,!0)})),[e,n,t,o]}const[Ze,Qe,et,tt]=Xe();function nt(e,t){const n=t?e?tt:et:e?Qe:Ze;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(S(n,o)&&o in t?n:t,o,r)}const ot={get:nt(!1,!1)},rt={get:nt(!1,!0)},st={get:nt(!0,!1)},lt={get:nt(!0,!0)},it=new WeakMap,ct=new WeakMap,at=new WeakMap,ut=new WeakMap;function ft(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>M(e).slice(8,-1))(e))}function pt(e){return _t(e)?e:vt(e,!1,Me,ot,it)}function dt(e){return vt(e,!1,Be,rt,ct)}function ht(e){return vt(e,!0,Ie,st,at)}function gt(e){return vt(e,!0,Ve,lt,ut)}function vt(e,t,n,o,r){if(!L(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const l=ft(e);if(0===l)return e;const i=new Proxy(e,2===l?o:n);return r.set(e,i),i}function mt(e){return _t(e)?mt(e.__v_raw):!(!e||!e.__v_isReactive)}function _t(e){return!(!e||!e.__v_isReadonly)}function yt(e){return!(!e||!e.__v_isShallow)}function bt(e){return mt(e)||_t(e)}function Ct(e){const t=e&&e.__v_raw;return t?Ct(t):e}function xt(e){return q(e,"__v_skip",!0),e}const wt=e=>L(e)?pt(e):e,St=e=>L(e)?ht(e):e;function kt(e){ve&&ae&&Ce((e=Ct(e)).dep||(e.dep=oe()))}function Et(e,t){(e=Ct(e)).dep&&we(e.dep)}function At(e){return!(!e||!0!==e.__v_isRef)}function Ft(e){return Ot(e,!1)}function Tt(e){return Ot(e,!0)}function Ot(e,t){return At(e)?e:new Pt(e,t)}class Pt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Ct(e),this._value=t?e:wt(e)}get value(){return kt(this),this._value}set value(e){e=this.__v_isShallow?e:Ct(e),K(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:wt(e),Et(this))}}function Lt(e){Et(e)}function Nt(e){return At(e)?e.value:e}const Rt={get:(e,t,n)=>Nt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return At(r)&&!At(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Mt(e){return mt(e)?e:new Proxy(e,Rt)}class It{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>kt(this)),(()=>Et(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Bt(e){return new It(e)}function Vt(e){const t=k(e)?new Array(e.length):{};for(const n in e)t[n]=jt(e,n);return t}class $t{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function jt(e,t,n){const o=e[t];return At(o)?o:new $t(e,t,n)}class Ut{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new pe(e,(()=>{this._dirty||(this._dirty=!0,Et(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=Ct(this);return kt(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const Dt=[];function Ht(e,...t){_e();const n=Dt.length?Dt[Dt.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=function(){let e=Dt[Dt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}();if(o)Kt(o,n,11,[e+t.join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${Ms(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=` at <${Ms(e.component,e.type,!!e.component&&null==e.component.parent)}`,r=">"+n;return e.props?[o,...Wt(e.props),r]:[o+r]}(e))})),t}(r)),console.warn(...n)}ye()}function Wt(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...zt(n,e[n]))})),n.length>3&&t.push(" ..."),t}function zt(e,t,n){return O(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:At(t)?(t=zt(e,Ct(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):T(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Ct(t),n?t:[`${e}=`,t])}function Kt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){qt(s,t,n)}return r}function Gt(e,t,n,o){if(T(e)){const r=Kt(e,t,n,o);return r&&N(r)&&r.catch((e=>{qt(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Gt(e[s],t,n,o));return r}function qt(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const l=t.appContext.config.errorHandler;if(l)return void Kt(l,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let Jt=!1,Yt=!1;const Xt=[];let Zt=0;const Qt=[];let en=null,tn=0;const nn=[];let on=null,rn=0;const sn=Promise.resolve();let ln=null,cn=null;function an(e){const t=ln||sn;return e?t.then(this?e.bind(this):e):t}function un(e){Xt.length&&Xt.includes(e,Jt&&e.allowRecurse?Zt+1:Zt)||e===cn||(null==e.id?Xt.push(e):Xt.splice(function(e){let t=Zt+1,n=Xt.length;for(;t<n;){const o=t+n>>>1;vn(Xt[o])<e?t=o+1:n=o}return t}(e.id),0,e),fn())}function fn(){Jt||Yt||(Yt=!0,ln=sn.then(mn))}function pn(e,t,n,o){k(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),fn()}function dn(e){pn(e,on,nn,rn)}function hn(e,t=null){if(Qt.length){for(cn=t,en=[...new Set(Qt)],Qt.length=0,tn=0;tn<en.length;tn++)en[tn]();en=null,tn=0,cn=null,hn(e,t)}}function gn(e){if(hn(),nn.length){const e=[...new Set(nn)];if(nn.length=0,on)return void on.push(...e);for(on=e,on.sort(((e,t)=>vn(e)-vn(t))),rn=0;rn<on.length;rn++)on[rn]();on=null,rn=0}}const vn=e=>null==e.id?1/0:e.id;function mn(e){Yt=!1,Jt=!0,hn(e),Xt.sort(((e,t)=>vn(e)-vn(t)));try{for(Zt=0;Zt<Xt.length;Zt++){const e=Xt[Zt];e&&!1!==e.active&&Kt(e,null,14)}}finally{Zt=0,Xt.length=0,gn(),Jt=!1,ln=null,(Xt.length||Qt.length||nn.length)&&mn(e)}}let _n,yn=[];function bn(e,t){var n,o;if(_n=e,_n)_n.enabled=!0,yn.forEach((({event:e,args:t})=>_n.emit(e,...t))),yn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(o=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===o?void 0:o.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{bn(e,t)})),setTimeout((()=>{_n||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,yn=[])}),3e3)}else yn=[]}function Cn(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||h;let r=n;const s=t.startsWith("update:"),l=s&&t.slice(7);if(l&&l in o){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:t,trim:s}=o[e]||h;s&&(r=n.map((e=>e.trim()))),t&&(r=n.map(J))}let i,c=o[i=z(t)]||o[i=z(U(t))];!c&&s&&(c=o[i=z(H(t))]),c&&Gt(c,e,6,r);const a=o[i+"Once"];if(a){if(e.emitted){if(e.emitted[i])return}else e.emitted={};e.emitted[i]=!0,Gt(a,e,6,r)}}function xn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let l={},i=!1;if(!T(e)){const o=e=>{const n=xn(e,t,!0);n&&(i=!0,C(l,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||i?(k(s)?s.forEach((e=>l[e]=null)):C(l,s),o.set(e,l),l):(o.set(e,null),null)}function wn(e,t){return!(!e||!y(t))&&(t=t.slice(2).replace(/Once$/,""),S(e,t[0].toLowerCase()+t.slice(1))||S(e,H(t))||S(e,t))}let Sn=null,kn=null;function En(e){const t=Sn;return Sn=e,kn=e&&e.type.__scopeId||null,t}function An(e){kn=e}function Fn(){kn=null}const Tn=e=>On;function On(e,t=Sn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Jr(-1);const r=En(t),s=e(...n);return En(r),o._d&&Jr(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function Pn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:i,attrs:c,emit:a,render:u,renderCache:f,data:p,setupState:d,ctx:h,inheritAttrs:g}=e;let v,m;const _=En(e);try{if(4&n.shapeFlag){const e=r||o;v=ps(u.call(e,e,f,s,d,p,h)),m=c}else{const e=t;0,v=ps(e(s,e.length>1?{attrs:c,slots:i,emit:a}:null)),m=t.props?c:Ln(c)}}catch(C){Wr.length=0,qt(C,e,1),v=ls(Dr)}let y=v;if(m&&!1!==g){const e=Object.keys(m),{shapeFlag:t}=y;e.length&&7&t&&(l&&e.some(b)&&(m=Nn(m,l)),y=cs(y,m))}return n.dirs&&(y=cs(y),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),v=y,En(_),v}const Ln=e=>{let t;for(const n in e)("class"===n||"style"===n||y(n))&&((t||(t={}))[n]=e[n]);return t},Nn=(e,t)=>{const n={};for(const o in e)b(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Rn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!wn(n,s))return!0}return!1}function Mn({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const In=e=>e.__isSuspense,Bn={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,l,i,c,a){null==e?function(e,t,n,o,r,s,l,i,c){const{p:a,o:{createElement:u}}=c,f=u("div"),p=e.suspense=$n(e,r,o,t,f,n,s,l,i,c);a(null,p.pendingBranch=e.ssContent,f,null,o,p,s,l),p.deps>0?(Vn(e,"onPending"),Vn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,l),Dn(p,e.ssFallback)):p.resolve()}(t,n,o,r,s,l,i,c,a):function(e,t,n,o,r,s,l,i,{p:c,um:a,o:{createElement:u}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:g,isInFallback:v,isHydrating:m}=f;if(g)f.pendingBranch=p,es(p,g)?(c(g,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0?f.resolve():v&&(c(h,d,n,o,r,null,s,l,i),Dn(f,d))):(f.pendingId++,m?(f.isHydrating=!1,f.activeBranch=g):a(g,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),v?(c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0?f.resolve():(c(h,d,n,o,r,null,s,l,i),Dn(f,d))):h&&es(p,h)?(c(h,p,n,o,r,f,s,l,i),f.resolve(!0)):(c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0&&f.resolve()));else if(h&&es(p,h))c(h,p,n,o,r,f,s,l,i),Dn(f,p);else if(Vn(t,"onPending"),f.pendingBranch=p,f.pendingId++,c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,o,r,l,i,c,a)},hydrate:function(e,t,n,o,r,s,l,i,c){const a=t.suspense=$n(t,o,n,e.parentNode,document.createElement("div"),null,r,s,l,i,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,l);0===a.deps&&a.resolve();return u},create:$n,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=jn(o?n.default:n),e.ssFallback=o?jn(n.fallback):ls(Dr)}};function Vn(e,t){const n=e.props&&e.props[t];T(n)&&n()}function $n(e,t,n,o,r,s,l,i,c,a,u=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:g,remove:v}}=a,m=J(e.props&&e.props.timeout),_={vnode:e,parent:t,parentComponent:n,isSVG:l,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof m?m:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:l,container:i}=_;if(_.isHydrating)_.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===_.pendingId&&p(o,i,t,0)});let{anchor:t}=_;n&&(t=h(n),d(n,l,_,!0)),e||p(o,i,t,0)}Dn(_,o),_.pendingBranch=null,_.isInFallback=!1;let c=_.parent,a=!1;for(;c;){if(c.pendingBranch){c.effects.push(...s),a=!0;break}c=c.parent}a||dn(s),_.effects=[],Vn(t,"onResolve")},fallback(e){if(!_.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=_;Vn(t,"onFallback");const l=h(n),a=()=>{_.isInFallback&&(f(null,e,r,l,o,null,s,i,c),Dn(_,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),_.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){_.activeBranch&&p(_.activeBranch,e,t,n),_.container=e},next:()=>_.activeBranch&&h(_.activeBranch),registerDep(e,t){const n=!!_.pendingBranch;n&&_.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{qt(t,e,0)})).then((r=>{if(e.isUnmounted||_.isUnmounted||_.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;As(e,r,!1),o&&(s.el=o);const i=!o&&e.subTree.el;t(e,s,g(o||e.subTree.el),o?null:h(e.subTree),_,l,c),i&&v(i),Mn(e,s.el),n&&0==--_.deps&&_.resolve()}))},unmount(e,t){_.isUnmounted=!0,_.activeBranch&&d(_.activeBranch,n,e,t),_.pendingBranch&&d(_.pendingBranch,n,e,t)}};return _}function jn(e){let t;if(T(e)){const n=qr&&e._c;n&&(e._d=!1,Kr()),e=e(),n&&(e._d=!0,t=zr,Gr())}if(k(e)){const t=function(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!Qr(o))return;if(o.type!==Dr||"v-if"===o.children){if(t)return;t=o}}return t}(e);e=t}return e=ps(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Un(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):dn(e)}function Dn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,Mn(o,r))}function Hn(e,t){if(ys){let n=ys.provides;const o=ys.parent&&ys.parent.provides;o===n&&(n=ys.provides=Object.create(o)),n[e]=t}else;}function Wn(e,t,n=!1){const o=ys||Sn;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&T(t)?t.call(o.proxy):t}}function zn(e,t){return Yn(e,null,t)}function Kn(e,t){return Yn(e,null,{flush:"post"})}function Gn(e,t){return Yn(e,null,{flush:"sync"})}const qn={};function Jn(e,t,n){return Yn(e,t,n)}function Yn(e,t,{immediate:n,deep:o,flush:r}=h){const s=ys;let l,i,c=!1,a=!1;if(At(e)?(l=()=>e.value,c=yt(e)):mt(e)?(l=()=>e,o=!0):k(e)?(a=!0,c=e.some((e=>mt(e)||yt(e))),l=()=>e.map((e=>At(e)?e.value:mt(e)?Qn(e):T(e)?Kt(e,s,2):void 0))):l=T(e)?t?()=>Kt(e,s,2):()=>{if(!s||!s.isUnmounted)return i&&i(),Gt(e,s,3,[u])}:v,t&&o){const e=l;l=()=>Qn(e())}let u=e=>{i=g.onStop=()=>{Kt(e,s,4)}},f=a?[]:qn;const p=()=>{if(g.active)if(t){const e=g.run();(o||c||(a?e.some(((e,t)=>K(e,f[t]))):K(e,f)))&&(i&&i(),Gt(t,s,3,[e,f===qn?void 0:f,u]),f=e)}else g.run()};let d;p.allowRecurse=!!t,d="sync"===r?p:"post"===r?()=>Tr(p,s&&s.suspense):()=>function(e){pn(e,en,Qt,tn)}(p);const g=new pe(l,d);return t?n?p():f=g.run():"post"===r?Tr(g.run.bind(g),s&&s.suspense):g.run(),()=>{g.stop(),s&&s.scope&&x(s.scope.effects,g)}}function Xn(e,t,n){const o=this.proxy,r=O(e)?e.includes(".")?Zn(o,e):()=>o[e]:e.bind(o,o);let s;T(t)?s=t:(s=t.handler,n=t);const l=ys;Cs(this);const i=Yn(r,s.bind(o),n);return l?Cs(l):xs(),i}function Zn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Qn(e,t){if(!L(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),At(e))Qn(e.value,t);else if(k(e))for(let n=0;n<e.length;n++)Qn(e[n],t);else if(A(e)||E(e))e.forEach((e=>{Qn(e,t)}));else if(I(e))for(const n in e)Qn(e[n],t);return e}function eo(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Eo((()=>{e.isMounted=!0})),To((()=>{e.isUnmounting=!0})),e}const to=[Function,Array],no={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:to,onEnter:to,onAfterEnter:to,onEnterCancelled:to,onBeforeLeave:to,onLeave:to,onAfterLeave:to,onLeaveCancelled:to,onBeforeAppear:to,onAppear:to,onAfterAppear:to,onAppearCancelled:to},setup(e,{slots:t}){const n=bs(),o=eo();let r;return()=>{const s=t.default&&co(t.default(),!0);if(!s||!s.length)return;let l=s[0];if(s.length>1)for(const e of s)if(e.type!==Dr){l=e;break}const i=Ct(e),{mode:c}=i;if(o.isLeaving)return so(l);const a=lo(l);if(!a)return so(l);const u=ro(a,i,o,n);io(a,u);const f=n.subTree,p=f&&lo(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==Dr&&(!es(a,p)||d)){const e=ro(p,i,o,n);if(io(p,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},so(l);"in-out"===c&&a.type!==Dr&&(e.delayLeave=(e,t,n)=>{oo(o,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return l}}};function oo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ro(e,t,n,o){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:i,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:g,onAppear:v,onAfterAppear:m,onAppearCancelled:_}=t,y=String(e.key),b=oo(n,e),C=(e,t)=>{e&&Gt(e,o,9,t)},x=(e,t)=>{const n=t[1];C(e,t),k(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},w={mode:s,persisted:l,beforeEnter(t){let o=i;if(!n.isMounted){if(!r)return;o=g||i}t._leaveCb&&t._leaveCb(!0);const s=b[y];s&&es(e,s)&&s.el._leaveCb&&s.el._leaveCb(),C(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=v||c,o=m||a,s=_||u}let l=!1;const i=e._enterCb=t=>{l||(l=!0,C(t?s:o,[e]),w.delayedLeave&&w.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,i]):i()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();C(f,[t]);let s=!1;const l=t._leaveCb=n=>{s||(s=!0,o(),C(n?h:d,[t]),t._leaveCb=void 0,b[r]===e&&delete b[r])};b[r]=e,p?x(p,[t,l]):l()},clone:e=>ro(e,t,n,o)};return w}function so(e){if(ho(e))return(e=cs(e)).children=null,e}function lo(e){return ho(e)?e.children?e.children[0]:void 0:e}function io(e,t){6&e.shapeFlag&&e.component?io(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function co(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let l=e[s];const i=null==n?l.key:String(n)+String(null!=l.key?l.key:s);l.type===jr?(128&l.patchFlag&&r++,o=o.concat(co(l.children,t,i))):(t||l.type!==Dr)&&o.push(null!=i?cs(l,{key:i}):l)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}function ao(e){return T(e)?{setup:e,name:e.name}:e}const uo=e=>!!e.type.__asyncLoader;function fo(e){T(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:l=!0,onError:i}=e;let c,a=null,u=0;const f=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),i)return new Promise(((t,n)=>{i(e,(()=>t((u++,a=null,f()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return ao({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return c},setup(){const e=ys;if(c)return()=>po(c,e);const t=t=>{a=null,qt(t,e,13,!o)};if(l&&e.suspense)return f().then((t=>()=>po(t,e))).catch((e=>(t(e),()=>o?ls(o,{error:e}):null)));const i=Ft(!1),u=Ft(),p=Ft(!!r);return r&&setTimeout((()=>{p.value=!1}),r),null!=s&&setTimeout((()=>{if(!i.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),f().then((()=>{i.value=!0,e.parent&&ho(e.parent.vnode)&&un(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>i.value&&c?po(c,e):u.value&&o?ls(o,{error:u.value}):n&&!p.value?ls(n):void 0}})}function po(e,{vnode:{ref:t,props:n,children:o}}){const r=ls(e,n,o);return r.ref=t,r}const ho=e=>e.type.__isKeepAlive,go={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=bs(),o=n.ctx,r=new Map,s=new Set;let l=null;const i=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:f}}}=o,p=f("div");function d(e){Co(e),u(e,n,i,!0)}function h(e){r.forEach(((t,n)=>{const o=Rs(t.type);!o||e&&e(o)||g(n)}))}function g(e){const t=r.get(e);l&&t.type===l.type?l&&Co(l):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,i),c(s.vnode,e,t,n,s,i,o,e.slotScopeIds,r),Tr((()=>{s.isDeactivated=!1,s.a&&G(s.a);const t=e.props&&e.props.onVnodeMounted;t&&vs(t,s.parent,e)}),i)},o.deactivate=e=>{const t=e.component;a(e,p,null,1,i),Tr((()=>{t.da&&G(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&vs(n,t.parent,e),t.isDeactivated=!0}),i)},Jn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>vo(e,t))),t&&h((e=>!vo(t,e)))}),{flush:"post",deep:!0});let v=null;const m=()=>{null!=v&&r.set(v,xo(n.subTree))};return Eo(m),Fo(m),To((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=xo(t);if(e.type!==r.type)d(e);else{Co(r);const e=r.component.da;e&&Tr(e,o)}}))})),()=>{if(v=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return l=null,n;if(!(Qr(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return l=null,o;let i=xo(o);const c=i.type,a=Rs(uo(i)?i.type.__asyncResolved||{}:c),{include:u,exclude:f,max:p}=e;if(u&&(!a||!vo(u,a))||f&&a&&vo(f,a))return l=i,o;const d=null==i.key?c:i.key,h=r.get(d);return i.el&&(i=cs(i),128&o.shapeFlag&&(o.ssContent=i)),v=d,h?(i.el=h.el,i.component=h.component,i.transition&&io(i,i.transition),i.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&g(s.values().next().value)),i.shapeFlag|=256,l=i,In(o.type)?o:i}}};function vo(e,t){return k(e)?e.some((e=>vo(e,t))):O(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function mo(e,t){yo(e,"a",t)}function _o(e,t){yo(e,"da",t)}function yo(e,t,n=ys){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(wo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)ho(e.parent.vnode)&&bo(o,t,n,e),e=e.parent}}function bo(e,t,n,o){const r=wo(t,e,o,!0);Oo((()=>{x(o[t],r)}),n)}function Co(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function xo(e){return 128&e.shapeFlag?e.ssContent:e}function wo(e,t,n=ys,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;_e(),Cs(n);const r=Gt(t,n,e,o);return xs(),ye(),r});return o?r.unshift(s):r.push(s),s}}const So=e=>(t,n=ys)=>(!Es||"sp"===e)&&wo(e,t,n),ko=So("bm"),Eo=So("m"),Ao=So("bu"),Fo=So("u"),To=So("bum"),Oo=So("um"),Po=So("sp"),Lo=So("rtg"),No=So("rtc");function Ro(e,t=ys){wo("ec",e,t)}function Mo(e,t){const n=Sn;if(null===n)return e;const o=Ls(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,n,l,i=h]=t[s];T(e)&&(e={mounted:e,updated:e}),e.deep&&Qn(n),r.push({dir:e,instance:o,value:n,oldValue:void 0,arg:l,modifiers:i})}return e}function Io(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let l=0;l<r.length;l++){const i=r[l];s&&(i.oldValue=s[l].value);let c=i.dir[o];c&&(_e(),Gt(c,n,8,[e.el,i,e,t]),ye())}}function Bo(e,t){return Uo("components",e,!0,t)||e}const Vo=Symbol();function $o(e){return O(e)?Uo("components",e,!1)||e:e||Vo}function jo(e){return Uo("directives",e)}function Uo(e,t,n=!0,o=!1){const r=Sn||ys;if(r){const n=r.type;if("components"===e){const e=Rs(n);if(e&&(e===t||e===U(t)||e===W(U(t))))return n}const s=Do(r[e]||n[e],t)||Do(r.appContext[e],t);return!s&&o?n:s}}function Do(e,t){return e&&(e[t]||e[U(t)]||e[W(U(t))])}function Ho(e,t,n,o){let r;const s=n&&n[o];if(k(e)||O(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(L(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,l=n.length;o<l;o++){const l=n[o];r[o]=t(e[l],l,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r}function Wo(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(k(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.fn)}return e}function zo(e,t,n={},o,r){if(Sn.isCE||Sn.parent&&uo(Sn.parent)&&Sn.parent.isCE)return ls("slot","default"===t?null:{name:t},o&&o());let s=e[t];s&&s._c&&(s._d=!1),Kr();const l=s&&Ko(s(n)),i=Zr(jr,{key:n.key||`_${t}`},l||(o?o():[]),l&&1===e._?64:-2);return!r&&i.scopeId&&(i.slotScopeIds=[i.scopeId+"-s"]),s&&s._c&&(s._d=!0),i}function Ko(e){return e.some((e=>!Qr(e)||e.type!==Dr&&!(e.type===jr&&!Ko(e.children))))?e:null}function Go(e){const t={};for(const n in e)t[z(n)]=e[n];return t}const qo=e=>e?ws(e)?Ls(e)||e.proxy:qo(e.parent):null,Jo=C(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>qo(e.parent),$root:e=>qo(e.root),$emit:e=>e.emit,$options:e=>nr(e),$forceUpdate:e=>e.f||(e.f=()=>un(e.update)),$nextTick:e=>e.n||(e.n=an.bind(e.proxy)),$watch:e=>Xn.bind(e)}),Yo={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:l,type:i,appContext:c}=e;let a;if("$"!==t[0]){const i=l[t];if(void 0!==i)switch(i){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(o!==h&&S(o,t))return l[t]=1,o[t];if(r!==h&&S(r,t))return l[t]=2,r[t];if((a=e.propsOptions[0])&&S(a,t))return l[t]=3,s[t];if(n!==h&&S(n,t))return l[t]=4,n[t];Zo&&(l[t]=0)}}const u=Jo[t];let f,p;return u?("$attrs"===t&&be(e,0,t),u(e)):(f=i.__cssModules)&&(f=f[t])?f:n!==h&&S(n,t)?(l[t]=4,n[t]):(p=c.config.globalProperties,S(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return r!==h&&S(r,t)?(r[t]=n,!0):o!==h&&S(o,t)?(o[t]=n,!0):!S(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},l){let i;return!!n[l]||e!==h&&S(e,l)||t!==h&&S(t,l)||(i=s[0])&&S(i,l)||S(o,l)||S(Jo,l)||S(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:S(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Xo=C({},Yo,{get(e,t){if(t!==Symbol.unscopables)return Yo.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)});let Zo=!0;function Qo(e){const t=nr(e),n=e.proxy,o=e.ctx;Zo=!1,t.beforeCreate&&er(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:l,watch:i,provide:c,inject:a,created:u,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:g,deactivated:m,beforeUnmount:_,unmounted:y,render:b,renderTracked:C,renderTriggered:x,errorCaptured:w,serverPrefetch:S,expose:E,inheritAttrs:A,components:F,directives:O}=t;if(a&&function(e,t,n=v,o=!1){k(e)&&(e=lr(e));for(const r in e){const n=e[r];let s;s=L(n)?"default"in n?Wn(n.from||r,n.default,!0):Wn(n.from||r):Wn(n),At(s)&&o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}(a,o,null,e.appContext.config.unwrapInjectedRef),l)for(const v in l){const e=l[v];T(e)&&(o[v]=e.bind(n))}if(r){const t=r.call(n,n);L(t)&&(e.data=pt(t))}if(Zo=!0,s)for(const k in s){const e=s[k],t=T(e)?e.bind(n,n):T(e.get)?e.get.bind(n,n):v,r=!T(e)&&T(e.set)?e.set.bind(n):v,l=Is({get:t,set:r});Object.defineProperty(o,k,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(i)for(const v in i)tr(i[v],o,n,v);if(c){const e=T(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{Hn(t,e[t])}))}function P(e,t){k(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&er(u,e,"c"),P(ko,f),P(Eo,p),P(Ao,d),P(Fo,h),P(mo,g),P(_o,m),P(Ro,w),P(No,C),P(Lo,x),P(To,_),P(Oo,y),P(Po,S),k(E))if(E.length){const t=e.exposed||(e.exposed={});E.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});b&&e.render===v&&(e.render=b),null!=A&&(e.inheritAttrs=A),F&&(e.components=F),O&&(e.directives=O)}function er(e,t,n){Gt(k(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function tr(e,t,n,o){const r=o.includes(".")?Zn(n,o):()=>n[o];if(O(e)){const n=t[e];T(n)&&Jn(r,n)}else if(T(e))Jn(r,e.bind(n));else if(L(e))if(k(e))e.forEach((e=>tr(e,t,n,o)));else{const o=T(e.handler)?e.handler.bind(n):t[e.handler];T(o)&&Jn(r,o,e)}}function nr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:l}}=e.appContext,i=s.get(t);let c;return i?c=i:r.length||n||o?(c={},r.length&&r.forEach((e=>or(c,e,l,!0))),or(c,t,l)):c=t,s.set(t,c),c}function or(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&or(e,s,n,!0),r&&r.forEach((t=>or(e,t,n,!0)));for(const l in t)if(o&&"expose"===l);else{const o=rr[l]||n&&n[l];e[l]=o?o(e[l],t[l]):t[l]}return e}const rr={data:sr,props:cr,emits:cr,methods:cr,computed:cr,beforeCreate:ir,created:ir,beforeMount:ir,mounted:ir,beforeUpdate:ir,updated:ir,beforeDestroy:ir,beforeUnmount:ir,destroyed:ir,unmounted:ir,activated:ir,deactivated:ir,errorCaptured:ir,serverPrefetch:ir,components:cr,directives:cr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=C(Object.create(null),e);for(const o in t)n[o]=ir(e[o],t[o]);return n},provide:sr,inject:function(e,t){return cr(lr(e),lr(t))}};function sr(e,t){return t?e?function(){return C(T(e)?e.call(this,this):e,T(t)?t.call(this,this):t)}:t:e}function lr(e){if(k(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ir(e,t){return e?[...new Set([].concat(e,t))]:t}function cr(e,t){return e?C(C(Object.create(null),e),t):t}function ar(e,t,n,o){const[r,s]=e.propsOptions;let l,i=!1;if(t)for(let c in t){if(V(c))continue;const a=t[c];let u;r&&S(r,u=U(c))?s&&s.includes(u)?(l||(l={}))[u]=a:n[u]=a:wn(e.emitsOptions,c)||c in o&&a===o[c]||(o[c]=a,i=!0)}if(s){const t=Ct(n),o=l||h;for(let l=0;l<s.length;l++){const i=s[l];n[i]=ur(r,t,i,o[i],e,!S(o,i))}}return i}function ur(e,t,n,o,r,s){const l=e[n];if(null!=l){const e=S(l,"default");if(e&&void 0===o){const e=l.default;if(l.type!==Function&&T(e)){const{propsDefaults:s}=r;n in s?o=s[n]:(Cs(r),o=s[n]=e.call(null,t),xs())}else o=e}l[0]&&(s&&!e?o=!1:!l[1]||""!==o&&o!==H(n)||(o=!0))}return o}function fr(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,l={},i=[];let c=!1;if(!T(e)){const o=e=>{c=!0;const[n,o]=fr(e,t,!0);C(l,n),o&&i.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return o.set(e,g),g;if(k(s))for(let u=0;u<s.length;u++){const e=U(s[u]);pr(e)&&(l[e]=h)}else if(s)for(const u in s){const e=U(u);if(pr(e)){const t=s[u],n=l[e]=k(t)||T(t)?{type:t}:t;if(n){const t=gr(Boolean,n.type),o=gr(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||S(n,"default"))&&i.push(e)}}}const a=[l,i];return o.set(e,a),a}function pr(e){return"$"!==e[0]}function dr(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function hr(e,t){return dr(e)===dr(t)}function gr(e,t){return k(t)?t.findIndex((t=>hr(t,e))):T(t)&&hr(t,e)?0:-1}const vr=e=>"_"===e[0]||"$stable"===e,mr=e=>k(e)?e.map(ps):[ps(e)],_r=(e,t,n)=>{if(t._n)return t;const o=On(((...e)=>mr(t(...e))),n);return o._c=!1,o},yr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(vr(r))continue;const n=e[r];if(T(n))t[r]=_r(0,n,o);else if(null!=n){const e=mr(n);t[r]=()=>e}}},br=(e,t)=>{const n=mr(t);e.slots.default=()=>n};function Cr(){return{app:null,config:{isNativeTag:m,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let xr=0;function wr(e,t){return function(n,o=null){T(n)||(n=Object.assign({},n)),null==o||L(o)||(o=null);const r=Cr(),s=new Set;let l=!1;const i=r.app={_uid:xr++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Qs,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&T(e.install)?(s.add(e),e.install(i,...t)):T(e)&&(s.add(e),e(i,...t))),i),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),i),component:(e,t)=>t?(r.components[e]=t,i):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,i):r.directives[e],mount(s,c,a){if(!l){const u=ls(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),l=!0,i._container=s,s.__vue_app__=i,Ls(u.component)||u.component.proxy}},unmount(){l&&(e(null,i._container),delete i._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,i)};return i}}function Sr(e,t,n,o,r=!1){if(k(e))return void e.forEach(((e,s)=>Sr(e,t&&(k(t)?t[s]:t),n,o,r)));if(uo(o)&&!r)return;const s=4&o.shapeFlag?Ls(o.component)||o.component.proxy:o.el,l=r?null:s,{i:i,r:c}=e,a=t&&t.r,u=i.refs===h?i.refs={}:i.refs,f=i.setupState;if(null!=a&&a!==c&&(O(a)?(u[a]=null,S(f,a)&&(f[a]=null)):At(a)&&(a.value=null)),T(c))Kt(c,i,12,[l,u]);else{const t=O(c),o=At(c);if(t||o){const o=()=>{if(e.f){const n=t?u[c]:c.value;r?k(n)&&x(n,s):k(n)?n.includes(s)||n.push(s):t?(u[c]=[s],S(f,c)&&(f[c]=u[c])):(c.value=[s],e.k&&(u[e.k]=c.value))}else t?(u[c]=l,S(f,c)&&(f[c]=l)):At(c)&&(c.value=l,e.k&&(u[e.k]=l))};l?(o.id=-1,Tr(o,n)):o()}}}let kr=!1;const Er=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,Ar=e=>8===e.nodeType;function Fr(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:l,remove:i,insert:c,createComment:a}}=e,u=(n,o,i,a,v,m=!1)=>{const _=Ar(n)&&"["===n.data,y=()=>h(n,o,i,a,v,_),{type:b,ref:C,shapeFlag:x,patchFlag:w}=o,S=n.nodeType;o.el=n,-2===w&&(m=!1,o.dynamicChildren=null);let k=null;switch(b){case Ur:3!==S?""===o.children?(c(o.el=r(""),l(n),n),k=n):k=y():(n.data!==o.children&&(kr=!0,n.data=o.children),k=s(n));break;case Dr:k=8!==S||_?y():s(n);break;case Hr:if(1===S){k=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=k.outerHTML),t===o.staticCount-1&&(o.anchor=k),k=s(k);return k}k=y();break;case jr:k=_?d(n,o,i,a,v,m):y();break;default:if(1&x)k=1!==S||o.type.toLowerCase()!==n.tagName.toLowerCase()?y():f(n,o,i,a,v,m);else if(6&x){o.slotScopeIds=v;const e=l(n);if(t(o,e,null,i,a,Er(e),m),k=_?g(n):s(n),k&&Ar(k)&&"teleport end"===k.data&&(k=s(k)),uo(o)){let t;_?(t=ls(jr),t.anchor=k?k.previousSibling:e.lastChild):t=3===n.nodeType?as(""):ls("div"),t.el=n,o.component.subTree=t}}else 64&x?k=8!==S?y():o.type.hydrate(n,o,i,a,v,m,e,p):128&x&&(k=o.type.hydrate(n,o,i,a,Er(l(n)),v,m,e,u))}return null!=C&&Sr(C,null,a,o),k},f=(e,t,n,r,s,l)=>{l=l||!!t.dynamicChildren;const{type:c,props:a,patchFlag:u,shapeFlag:f,dirs:d}=t,h="input"===c&&d||"option"===c;if(h||-1!==u){if(d&&Io(t,null,n,"created"),a)if(h||!l||48&u)for(const t in a)(h&&t.endsWith("value")||y(t)&&!V(t))&&o(e,t,null,a[t],!1,void 0,n);else a.onClick&&o(e,"onClick",null,a.onClick,!1,void 0,n);let c;if((c=a&&a.onVnodeBeforeMount)&&vs(c,n,t),d&&Io(t,null,n,"beforeMount"),((c=a&&a.onVnodeMounted)||d)&&Un((()=>{c&&vs(c,n,t),d&&Io(t,null,n,"mounted")}),r),16&f&&(!a||!a.innerHTML&&!a.textContent)){let o=p(e.firstChild,t,e,n,r,s,l);for(;o;){kr=!0;const e=o;o=o.nextSibling,i(e)}}else 8&f&&e.textContent!==t.children&&(kr=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,o,r,s,l,i)=>{i=i||!!t.dynamicChildren;const c=t.children,a=c.length;for(let f=0;f<a;f++){const t=i?c[f]:c[f]=ps(c[f]);if(e)e=u(e,t,r,s,l,i);else{if(t.type===Ur&&!t.children)continue;kr=!0,n(null,t,o,null,r,s,Er(o),l)}}return e},d=(e,t,n,o,r,i)=>{const{slotScopeIds:u}=t;u&&(r=r?r.concat(u):u);const f=l(e),d=p(s(e),t,f,n,o,r,i);return d&&Ar(d)&&"]"===d.data?s(t.anchor=d):(kr=!0,c(t.anchor=a("]"),f,d),d)},h=(e,t,o,r,c,a)=>{if(kr=!0,t.el=null,a){const t=g(e);for(;;){const n=s(e);if(!n||n===t)break;i(n)}}const u=s(e),f=l(e);return i(e),n(null,t,f,u,o,r,Er(f),c),u},g=e=>{let t=0;for(;e;)if((e=s(e))&&Ar(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),void gn();kr=!1,u(t.firstChild,e,null,null,null),gn(),kr&&console.error("Hydration completed but contains mismatches.")},u]}const Tr=Un;function Or(e){return Lr(e)}function Pr(e){return Lr(e,Fr)}function Lr(e,t){(Y||(Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})).__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:s,createText:l,createComment:i,setText:c,setElementText:a,parentNode:u,nextSibling:f,setScopeId:p=v,cloneNode:d,insertStaticContent:m}=e,_=(e,t,n,o=null,r=null,s=null,l=!1,i=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!es(e,t)&&(o=ee(e),z(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:f}=t;switch(a){case Ur:y(e,t,n,o);break;case Dr:b(e,t,n,o);break;case Hr:null==e&&x(t,n,o,l);break;case jr:P(e,t,n,o,r,s,l,i,c);break;default:1&f?w(e,t,n,o,r,s,l,i,c):6&f?L(e,t,n,o,r,s,l,i,c):(64&f||128&f)&&a.process(e,t,n,o,r,s,l,i,c,ne)}null!=u&&r&&Sr(u,e&&e.ref,s,t||e,!t)},y=(e,t,o,r)=>{if(null==e)n(t.el=l(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},b=(e,t,o,r)=>{null==e?n(t.el=i(t.children||""),o,r):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=m(e.children,t,n,o,e.el,e.anchor)},w=(e,t,n,o,r,s,l,i,c)=>{l=l||"svg"===t.type,null==e?k(t,n,o,r,s,l,i,c):F(e,t,r,s,l,i,c)},k=(e,t,o,l,i,c,u,f)=>{let p,h;const{type:g,props:v,shapeFlag:m,transition:_,patchFlag:y,dirs:b}=e;if(e.el&&void 0!==d&&-1===y)p=e.el=d(e.el);else{if(p=e.el=s(e.type,c,v&&v.is,v),8&m?a(p,e.children):16&m&&A(e.children,p,null,l,i,c&&"foreignObject"!==g,u,f),b&&Io(e,null,l,"created"),v){for(const t in v)"value"===t||V(t)||r(p,t,null,v[t],c,e.children,l,i,Q);"value"in v&&r(p,"value",null,v.value),(h=v.onVnodeBeforeMount)&&vs(h,l,e)}E(p,e,e.scopeId,u,l)}b&&Io(e,null,l,"beforeMount");const C=(!i||i&&!i.pendingBranch)&&_&&!_.persisted;C&&_.beforeEnter(p),n(p,t,o),((h=v&&v.onVnodeMounted)||C||b)&&Tr((()=>{h&&vs(h,l,e),C&&_.enter(p),b&&Io(e,null,l,"mounted")}),i)},E=(e,t,n,o,r)=>{if(n&&p(e,n),o)for(let s=0;s<o.length;s++)p(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;E(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},A=(e,t,n,o,r,s,l,i,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=i?ds(e[a]):ps(e[a]);_(null,c,t,n,o,r,s,l,i)}},F=(e,t,n,o,s,l,i)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=t;u|=16&e.patchFlag;const d=e.props||h,g=t.props||h;let v;n&&Nr(n,!1),(v=g.onVnodeBeforeUpdate)&&vs(v,n,t,e),p&&Io(t,e,n,"beforeUpdate"),n&&Nr(n,!0);const m=s&&"foreignObject"!==t.type;if(f?T(e.dynamicChildren,f,c,n,o,m,l):i||$(e,t,c,null,n,o,m,l,!1),u>0){if(16&u)O(c,t,d,g,n,o,s);else if(2&u&&d.class!==g.class&&r(c,"class",null,g.class,s),4&u&&r(c,"style",d.style,g.style,s),8&u){const l=t.dynamicProps;for(let t=0;t<l.length;t++){const i=l[t],a=d[i],u=g[i];u===a&&"value"!==i||r(c,i,a,u,s,e.children,n,o,Q)}}1&u&&e.children!==t.children&&a(c,t.children)}else i||null!=f||O(c,t,d,g,n,o,s);((v=g.onVnodeUpdated)||p)&&Tr((()=>{v&&vs(v,n,t,e),p&&Io(t,e,n,"updated")}),o)},T=(e,t,n,o,r,s,l)=>{for(let i=0;i<t.length;i++){const c=e[i],a=t[i],f=c.el&&(c.type===jr||!es(c,a)||70&c.shapeFlag)?u(c.el):n;_(c,a,f,null,o,r,s,l,!0)}},O=(e,t,n,o,s,l,i)=>{if(n!==o){for(const c in o){if(V(c))continue;const a=o[c],u=n[c];a!==u&&"value"!==c&&r(e,c,u,a,i,t.children,s,l,Q)}if(n!==h)for(const c in n)V(c)||c in o||r(e,c,n[c],null,i,t.children,s,l,Q);"value"in o&&r(e,"value",n.value,o.value)}},P=(e,t,o,r,s,i,c,a,u)=>{const f=t.el=e?e.el:l(""),p=t.anchor=e?e.anchor:l("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:g}=t;g&&(a=a?a.concat(g):g),null==e?(n(f,o,r),n(p,o,r),A(t.children,o,p,s,i,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(T(e.dynamicChildren,h,o,s,i,c,a),(null!=t.key||s&&t===s.subTree)&&Rr(e,t,!0)):$(e,t,o,p,s,i,c,a,u)},L=(e,t,n,o,r,s,l,i,c)=>{t.slotScopeIds=i,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,l,c):R(t,n,o,r,s,l,c):M(e,t,c)},R=(e,t,n,o,r,s,l)=>{const i=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||ms,s={uid:_s++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Z(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:fr(o,r),emitsOptions:xn(o,r),emit:null,emitted:null,propsDefaults:h,inheritAttrs:o.inheritAttrs,ctx:h,data:h,props:h,attrs:h,slots:h,refs:h,setupState:h,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=Cn.bind(null,s),e.ce&&e.ce(s);return s}(e,o,r);if(ho(e)&&(i.ctx.renderer=ne),function(e,t=!1){Es=t;const{props:n,children:o}=e.vnode,r=ws(e);(function(e,t,n,o=!1){const r={},s={};q(s,ns,1),e.propsDefaults=Object.create(null),ar(e,t,r,s);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);e.props=n?o?r:dt(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Ct(t),q(t,"_",n)):yr(t,e.slots={})}else e.slots={},t&&br(e,t);q(e.slots,ns,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=xt(new Proxy(e.ctx,Yo));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?Ps(e):null;Cs(e),_e();const r=Kt(o,e,0,[e.props,n]);if(ye(),xs(),N(r)){if(r.then(xs,xs),t)return r.then((n=>{As(e,n,t)})).catch((t=>{qt(t,e,0)}));e.asyncDep=r}else As(e,r,t)}else Os(e,t)}(e,t):void 0;Es=!1}(i),i.asyncDep){if(r&&r.registerDep(i,I),!e.el){const e=i.subTree=ls(Dr);b(null,e,t,n)}}else I(i,e,t,n,r,s,l)},M=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:l,children:i,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!i||i&&i.$stable)||o!==l&&(o?!l||Rn(o,l,a):!!l);if(1024&c)return!0;if(16&c)return o?Rn(o,l,a):!!l;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(l[n]!==o[n]&&!wn(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void B(o,t,n);o.next=t,function(e){const t=Xt.indexOf(e);t>Zt&&Xt.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},I=(e,t,n,o,r,s,l)=>{const i=e.effect=new pe((()=>{if(e.isMounted){let t,{next:n,bu:o,u:i,parent:c,vnode:a}=e,f=n;Nr(e,!1),n?(n.el=a.el,B(e,n,l)):n=a,o&&G(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&vs(t,c,n,a),Nr(e,!0);const p=Pn(e),d=e.subTree;e.subTree=p,_(d,p,u(d.el),ee(d),e,r,s),n.el=p.el,null===f&&Mn(e,p.el),i&&Tr(i,r),(t=n.props&&n.props.onVnodeUpdated)&&Tr((()=>vs(t,c,n,a)),r)}else{let l;const{el:i,props:c}=t,{bm:a,m:u,parent:f}=e,p=uo(t);if(Nr(e,!1),a&&G(a),!p&&(l=c&&c.onVnodeBeforeMount)&&vs(l,f,t),Nr(e,!0),i&&re){const n=()=>{e.subTree=Pn(e),re(i,e.subTree,e,r,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const l=e.subTree=Pn(e);_(null,l,n,o,e,r,s),t.el=l.el}if(u&&Tr(u,r),!p&&(l=c&&c.onVnodeMounted)){const e=t;Tr((()=>vs(l,f,e)),r)}(256&t.shapeFlag||f&&uo(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&Tr(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>un(c)),e.scope),c=e.update=()=>i.run();c.id=e.uid,Nr(e,!0),c()},B=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:l}}=e,i=Ct(r),[c]=e.propsOptions;let a=!1;if(!(o||l>0)||16&l){let o;ar(e,t,r,s)&&(a=!0);for(const s in i)t&&(S(t,s)||(o=H(s))!==s&&S(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=ur(c,i,s,void 0,e,!0)):delete r[s]);if(s!==i)for(const e in s)t&&S(t,e)||(delete s[e],a=!0)}else if(8&l){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let l=n[o];if(wn(e.emitsOptions,l))continue;const u=t[l];if(c)if(S(s,l))u!==s[l]&&(s[l]=u,a=!0);else{const t=U(l);r[t]=ur(c,i,t,u,e,!1)}else u!==s[l]&&(s[l]=u,a=!0)}}a&&xe(e,"set","$attrs")}(e,t.props,o,n),((e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,l=h;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(C(r,t),n||1!==e||delete r._):(s=!t.$stable,yr(t,r)),l=t}else t&&(br(e,t),l={default:1});if(s)for(const i in r)vr(i)||i in l||delete r[i]})(e,t.children,n),_e(),hn(void 0,e.update),ye()},$=(e,t,n,o,r,s,l,i,c=!1)=>{const u=e&&e.children,f=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void D(u,p,n,o,r,s,l,i,c);if(256&d)return void j(u,p,n,o,r,s,l,i,c)}8&h?(16&f&&Q(u,r,s),p!==u&&a(n,p)):16&f?16&h?D(u,p,n,o,r,s,l,i,c):Q(u,r,s,!0):(8&f&&a(n,""),16&h&&A(p,n,o,r,s,l,i,c))},j=(e,t,n,o,r,s,l,i,c)=>{const a=(e=e||g).length,u=(t=t||g).length,f=Math.min(a,u);let p;for(p=0;p<f;p++){const o=t[p]=c?ds(t[p]):ps(t[p]);_(e[p],o,n,null,r,s,l,i,c)}a>u?Q(e,r,s,!0,!1,f):A(t,n,o,r,s,l,i,c,f)},D=(e,t,n,o,r,s,l,i,c)=>{let a=0;const u=t.length;let f=e.length-1,p=u-1;for(;a<=f&&a<=p;){const o=e[a],u=t[a]=c?ds(t[a]):ps(t[a]);if(!es(o,u))break;_(o,u,n,null,r,s,l,i,c),a++}for(;a<=f&&a<=p;){const o=e[f],a=t[p]=c?ds(t[p]):ps(t[p]);if(!es(o,a))break;_(o,a,n,null,r,s,l,i,c),f--,p--}if(a>f){if(a<=p){const e=p+1,f=e<u?t[e].el:o;for(;a<=p;)_(null,t[a]=c?ds(t[a]):ps(t[a]),n,f,r,s,l,i,c),a++}}else if(a>p)for(;a<=f;)z(e[a],r,s,!0),a++;else{const d=a,h=a,v=new Map;for(a=h;a<=p;a++){const e=t[a]=c?ds(t[a]):ps(t[a]);null!=e.key&&v.set(e.key,a)}let m,y=0;const b=p-h+1;let C=!1,x=0;const w=new Array(b);for(a=0;a<b;a++)w[a]=0;for(a=d;a<=f;a++){const o=e[a];if(y>=b){z(o,r,s,!0);continue}let u;if(null!=o.key)u=v.get(o.key);else for(m=h;m<=p;m++)if(0===w[m-h]&&es(o,t[m])){u=m;break}void 0===u?z(o,r,s,!0):(w[u-h]=a+1,u>=x?x=u:C=!0,_(o,t[u],n,null,r,s,l,i,c),y++)}const S=C?function(e){const t=e.slice(),n=[0];let o,r,s,l,i;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,l=n.length-1;s<l;)i=s+l>>1,e[n[i]]<c?s=i+1:l=i;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,l=n[s-1];for(;s-- >0;)n[s]=l,l=t[l];return n}(w):g;for(m=S.length-1,a=b-1;a>=0;a--){const e=h+a,f=t[e],p=e+1<u?t[e+1].el:o;0===w[a]?_(null,f,n,p,r,s,l,i,c):C&&(m<0||a!==S[m]?W(f,n,p,2):m--)}}},W=(e,t,o,r,s=null)=>{const{el:l,type:i,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void W(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void i.move(e,t,o,ne);if(i===jr){n(l,t,o);for(let e=0;e<a.length;e++)W(a[e],t,o,r);return void n(e.anchor,t,o)}if(i===Hr)return void(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=f(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(l),n(l,t,o),Tr((()=>c.enter(l)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,i=()=>n(l,t,o),a=()=>{e(l,(()=>{i(),s&&s()}))};r?r(l,i,a):a()}else n(l,t,o)},z=(e,t,n,o=!1,r=!1)=>{const{type:s,props:l,ref:i,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:f,dirs:p}=e;if(null!=i&&Sr(i,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&p,h=!uo(e);let g;if(h&&(g=l&&l.onVnodeBeforeUnmount)&&vs(g,t,e),6&u)X(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&Io(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ne,o):a&&(s!==jr||f>0&&64&f)?Q(a,t,n,!1,!0):(s===jr&&384&f||!r&&16&u)&&Q(c,t,n),o&&K(e)}(h&&(g=l&&l.onVnodeUnmounted)||d)&&Tr((()=>{g&&vs(g,t,e),d&&Io(e,null,t,"unmounted")}),n)},K=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===jr)return void J(n,r);if(t===Hr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),o(e),e=n;o(t)})(e);const l=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,l);o?o(e.el,l,r):r()}else l()},J=(e,t)=>{let n;for(;e!==t;)n=f(e),o(e),e=n;o(t)},X=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:l,um:i}=e;o&&G(o),r.stop(),s&&(s.active=!1,z(l,e,t,n)),i&&Tr(i,t),Tr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,n,o=!1,r=!1,s=0)=>{for(let l=s;l<e.length;l++)z(e[l],t,n,o,r)},ee=e=>6&e.shapeFlag?ee(e.component.subTree):128&e.shapeFlag?e.suspense.next():f(e.anchor||e.el),te=(e,t,n)=>{null==e?t._vnode&&z(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),gn(),t._vnode=e},ne={p:_,um:z,m:W,r:K,mt:R,mc:A,pc:$,pbc:T,n:ee,o:e};let oe,re;return t&&([oe,re]=t(ne)),{render:te,hydrate:oe,createApp:wr(te,oe)}}function Nr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Rr(e,t,n=!1){const o=e.children,r=t.children;if(k(o)&&k(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=ds(r[s]),t.el=e.el),n||Rr(e,t))}}const Mr=e=>e&&(e.disabled||""===e.disabled),Ir=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Br=(e,t)=>{const n=e&&e.to;if(O(n)){if(t){return t(n)}return null}return n};function Vr(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:l,anchor:i,shapeFlag:c,children:a,props:u}=e,f=2===s;if(f&&o(l,t,n),(!f||Mr(u))&&16&c)for(let p=0;p<a.length;p++)r(a[p],t,n,2);f&&o(i,t,n)}const $r={__isTeleport:!0,process(e,t,n,o,r,s,l,i,c,a){const{mc:u,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:g}}=a,v=Mr(t.props);let{shapeFlag:m,children:_,dynamicChildren:y}=t;if(null==e){const e=t.el=g(""),a=t.anchor=g("");d(e,n,o),d(a,n,o);const f=t.target=Br(t.props,h),p=t.targetAnchor=g("");f&&(d(p,f),l=l||Ir(f));const y=(e,t)=>{16&m&&u(_,e,t,r,s,l,i,c)};v?y(n,a):f&&y(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,g=Mr(e.props),m=g?n:u,_=g?o:d;if(l=l||Ir(u),y?(p(e.dynamicChildren,y,m,r,s,l,i),Rr(e,t,!0)):c||f(e,t,m,_,r,s,l,i,!1),v)g||Vr(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Br(t.props,h);e&&Vr(t,e,null,a,0)}else g&&Vr(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},l){const{shapeFlag:i,children:c,anchor:a,targetAnchor:u,target:f,props:p}=e;if(f&&s(u),(l||!Mr(p))&&(s(a),16&i))for(let d=0;d<c.length;d++){const e=c[d];r(e,t,n,!0,!!e.dynamicChildren)}},move:Vr,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:l,parentNode:i,querySelector:c}},a){const u=t.target=Br(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(Mr(t.props))t.anchor=a(l(e),t,i(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=l(e);let i=c;for(;i;)if(i=l(i),i&&8===i.nodeType&&"teleport anchor"===i.data){t.targetAnchor=i,u._lpa=t.targetAnchor&&l(t.targetAnchor);break}a(c,t,u,n,o,r,s)}}return t.anchor&&l(t.anchor)}},jr=Symbol(void 0),Ur=Symbol(void 0),Dr=Symbol(void 0),Hr=Symbol(void 0),Wr=[];let zr=null;function Kr(e=!1){Wr.push(zr=e?null:[])}function Gr(){Wr.pop(),zr=Wr[Wr.length-1]||null}let qr=1;function Jr(e){qr+=e}function Yr(e){return e.dynamicChildren=qr>0?zr||g:null,Gr(),qr>0&&zr&&zr.push(e),e}function Xr(e,t,n,o,r,s){return Yr(ss(e,t,n,o,r,s,!0))}function Zr(e,t,n,o,r){return Yr(ls(e,t,n,o,r,!0))}function Qr(e){return!!e&&!0===e.__v_isVNode}function es(e,t){return e.type===t.type&&e.key===t.key}function ts(e){}const ns="__vInternal",os=({key:e})=>null!=e?e:null,rs=({ref:e,ref_key:t,ref_for:n})=>null!=e?O(e)||At(e)||T(e)?{i:Sn,r:e,k:t,f:!!n}:e:null;function ss(e,t=null,n=null,o=0,r=null,s=(e===jr?0:1),l=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&os(t),ref:t&&rs(t),scopeId:kn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return i?(hs(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=O(n)?8:16),qr>0&&!l&&zr&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&zr.push(c),c}const ls=function(e,t=null,n=null,o=0,s=null,l=!1){e&&e!==Vo||(e=Dr);if(Qr(e)){const o=cs(e,t,!0);return n&&hs(o,n),qr>0&&!l&&zr&&(6&o.shapeFlag?zr[zr.indexOf(e)]=o:zr.push(o)),o.patchFlag|=-2,o}i=e,T(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=is(t);let{class:e,style:n}=t;e&&!O(e)&&(t.class=c(e)),L(n)&&(bt(n)&&!k(n)&&(n=C({},n)),t.style=r(n))}const a=O(e)?1:In(e)?128:(e=>e.__isTeleport)(e)?64:L(e)?4:T(e)?2:0;return ss(e,t,n,o,s,a,l,!0)};function is(e){return e?bt(e)||ns in e?C({},e):e:null}function cs(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:l}=e,i=t?gs(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:i,key:i&&os(i),ref:t&&t.ref?n&&r?k(r)?r.concat(rs(t)):[r,rs(t)]:rs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==jr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cs(e.ssContent),ssFallback:e.ssFallback&&cs(e.ssFallback),el:e.el,anchor:e.anchor}}function as(e=" ",t=0){return ls(Ur,null,e,t)}function us(e,t){const n=ls(Hr,null,e);return n.staticCount=t,n}function fs(e="",t=!1){return t?(Kr(),Zr(Dr,null,e)):ls(Dr,null,e)}function ps(e){return null==e||"boolean"==typeof e?ls(Dr):k(e)?ls(jr,null,e.slice()):"object"==typeof e?ds(e):ls(Ur,null,String(e))}function ds(e){return null===e.el||e.memo?e:cs(e)}function hs(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),hs(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||ns in t?3===o&&Sn&&(1===Sn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Sn}}else T(t)?(t={default:t,_ctx:Sn},n=32):(t=String(t),64&o?(n=16,t=[as(t)]):n=8);e.children=t,e.shapeFlag|=n}function gs(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=c([t.class,o.class]));else if("style"===e)t.style=r([t.style,o.style]);else if(y(e)){const n=t[e],r=o[e];!r||n===r||k(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function vs(e,t,n,o=null){Gt(e,t,7,[n,o])}const ms=Cr();let _s=0;let ys=null;const bs=()=>ys||Sn,Cs=e=>{ys=e,e.scope.on()},xs=()=>{ys&&ys.scope.off(),ys=null};function ws(e){return 4&e.vnode.shapeFlag}let Ss,ks,Es=!1;function As(e,t,n){T(t)?e.render=t:L(t)&&(e.setupState=Mt(t)),Os(e,n)}function Fs(e){Ss=e,ks=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Xo))}}const Ts=()=>!Ss;function Os(e,t,n){const o=e.type;if(!e.render){if(!t&&Ss&&!o.render){const t=o.template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:l}=o,i=C(C({isCustomElement:n,delimiters:s},r),l);o.render=Ss(t,i)}}e.render=o.render||v,ks&&ks(e)}Cs(e),_e(),Qo(e),ye(),xs()}function Ps(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(be(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}function Ls(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Mt(xt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Jo?Jo[n](e):void 0}))}const Ns=/(?:^|[-_])(\w)/g;function Rs(e){return T(e)&&e.displayName||e.name}function Ms(e,t,n=!1){let o=Rs(t);if(!o&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(o=e[1])}if(!o&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};o=n(e.components||e.parent.type.components)||n(e.appContext.components)}return o?o.replace(Ns,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}const Is=(e,t)=>function(e,t,n=!1){let o,r;const s=T(e);return s?(o=e,r=v):(o=e.get,r=e.set),new Ut(o,r,s||!r,n)}(e,0,Es);function Bs(){return null}function Vs(){return null}function $s(e){}function js(e,t){return null}function Us(){return Hs().slots}function Ds(){return Hs().attrs}function Hs(){const e=bs();return e.setupContext||(e.setupContext=Ps(e))}function Ws(e,t){const n=k(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const o in t){const e=n[o];e?k(e)||T(e)?n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(n[o]={default:t[o]})}return n}function zs(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Ks(e){const t=bs();let n=e();return xs(),N(n)&&(n=n.catch((e=>{throw Cs(t),e}))),[n,()=>Cs(t)]}function Gs(e,t,n){const o=arguments.length;return 2===o?L(t)&&!k(t)?Qr(t)?ls(e,null,[t]):ls(e,t):ls(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Qr(n)&&(n=[n]),ls(e,t,n))}const qs=Symbol(""),Js=()=>{{const e=Wn(qs);return e||Ht("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function Ys(){}function Xs(e,t,n,o){const r=n[o];if(r&&Zs(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function Zs(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(K(n[o],t[o]))return!1;return qr>0&&zr&&zr.push(e),!0}const Qs="3.2.36",el=null,tl=null,nl=null,ol="undefined"!=typeof document?document:null,rl=ol&&ol.createElement("template"),sl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?ol.createElementNS("http://www.w3.org/2000/svg",e):ol.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>ol.createTextNode(e),createComment:e=>ol.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ol.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o,r,s){const l=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{rl.innerHTML=o?`<svg>${e}</svg>`:e;const r=rl.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const ll=/\s*!important$/;function il(e,t,n){if(k(n))n.forEach((n=>il(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=al[t];if(n)return n;let o=U(t);if("filter"!==o&&o in e)return al[t]=o;o=W(o);for(let r=0;r<cl.length;r++){const n=cl[r]+o;if(n in e)return al[t]=n}return t}(e,t);ll.test(n)?e.setProperty(H(o),n.replace(ll,""),"important"):e[o]=n}}const cl=["Webkit","Moz","ms"],al={};const ul="http://www.w3.org/1999/xlink";const[fl,pl]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let dl=0;const hl=Promise.resolve(),gl=()=>{dl=0};function vl(e,t,n,o){e.addEventListener(t,n,o)}function ml(e,t,n,o,r=null){const s=e._vei||(e._vei={}),l=s[t];if(o&&l)l.value=o;else{const[n,i]=function(e){let t;if(_l.test(e)){let n;for(t={};n=e.match(_l);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[H(e.slice(2)),t]}(t);if(o){const l=s[t]=function(e,t){const n=e=>{const o=e.timeStamp||fl();(pl||o>=n.attached-1)&&Gt(function(e,t){if(k(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>dl||(hl.then(gl),dl=fl()))(),n}(o,r);vl(e,n,l,i)}else l&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,l,i),s[t]=void 0)}}const _l=/(?:Once|Passive|Capture)$/;const yl=/^on[a-z]/;function bl(e,t){const n=ao(e);class o extends wl{constructor(e){super(n,e,t)}}return o.def=n,o}const Cl=e=>bl(e,xi),xl="undefined"!=typeof HTMLElement?HTMLElement:class{};class wl extends xl{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,an((()=>{this._connected||(Ci(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=e=>{const{props:t,styles:n}=e,o=!k(t),r=t?o?Object.keys(t):t:[];let s;if(o)for(const l in this._props){const e=t[l];(e===Number||e&&e.type===Number)&&(this._props[l]=J(this._props[l]),(s||(s=Object.create(null)))[l]=!0)}this._numberProps=s;for(const l of Object.keys(this))"_"!==l[0]&&this._setProp(l,this[l],!0,!1);for(const l of r.map(U))Object.defineProperty(this,l,{get(){return this._getProp(l)},set(e){this._setProp(l,e)}});this._applyStyles(n),this._update()},t=this._def.__asyncLoader;t?t().then(e):e(this._def)}_setAttr(e){let t=this.getAttribute(e);this._numberProps&&this._numberProps[e]&&(t=J(t)),this._setProp(U(e),t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(H(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(H(e),t+""):t||this.removeAttribute(H(e))))}_update(){Ci(this._createVNode(),this.shadowRoot)}_createVNode(){const e=ls(this._def,C({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0,e.emit=(e,...t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof wl){e.parent=t._instance;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Sl(e="$style"){{const t=bs();if(!t)return h;const n=t.type.__cssModules;if(!n)return h;const o=n[e];return o||h}}function kl(e){const t=bs();if(!t)return;const n=()=>El(t.subTree,e(t.proxy));Kn(n),Eo((()=>{const e=new MutationObserver(n);e.observe(t.subTree.el.parentNode,{childList:!0}),Oo((()=>e.disconnect()))}))}function El(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{El(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Al(e.el,t);else if(e.type===jr)e.children.forEach((e=>El(e,t)));else if(e.type===Hr){let{el:n,anchor:o}=e;for(;n&&(Al(n,t),n!==o);)n=n.nextSibling}}function Al(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Fl=(e,{slots:t})=>Gs(no,Nl(e),t);Fl.displayName="Transition";const Tl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ol=Fl.props=C({},no.props,Tl),Pl=(e,t=[])=>{k(e)?e.forEach((e=>e(...t))):e&&e(...t)},Ll=e=>!!e&&(k(e)?e.some((e=>e.length>1)):e.length>1);function Nl(e){const t={};for(const C in e)C in Tl||(t[C]=e[C]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=l,appearToClass:u=i,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(L(e))return[Rl(e.enter),Rl(e.leave)];{const t=Rl(e);return[t,t]}}(r),g=h&&h[0],v=h&&h[1],{onBeforeEnter:m,onEnter:_,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:w=m,onAppear:S=_,onAppearCancelled:k=y}=t,E=(e,t,n)=>{Il(e,t?u:i),Il(e,t?a:l),n&&n()},A=(e,t)=>{e._isLeaving=!1,Il(e,f),Il(e,d),Il(e,p),t&&t()},F=e=>(t,n)=>{const r=e?S:_,l=()=>E(t,e,n);Pl(r,[t,l]),Bl((()=>{Il(t,e?c:s),Ml(t,e?u:i),Ll(r)||$l(t,o,g,l)}))};return C(t,{onBeforeEnter(e){Pl(m,[e]),Ml(e,s),Ml(e,l)},onBeforeAppear(e){Pl(w,[e]),Ml(e,c),Ml(e,a)},onEnter:F(!1),onAppear:F(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>A(e,t);Ml(e,f),Hl(),Ml(e,p),Bl((()=>{e._isLeaving&&(Il(e,f),Ml(e,d),Ll(b)||$l(e,o,v,n))})),Pl(b,[e,n])},onEnterCancelled(e){E(e,!1),Pl(y,[e])},onAppearCancelled(e){E(e,!0),Pl(k,[e])},onLeaveCancelled(e){A(e),Pl(x,[e])}})}function Rl(e){return J(e)}function Ml(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function Il(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Bl(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Vl=0;function $l(e,t,n,o){const r=e._endId=++Vl,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:l,timeout:i,propCount:c}=jl(e,t);if(!l)return o();const a=l+"end";let u=0;const f=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&f()};setTimeout((()=>{u<c&&f()}),i+1),e.addEventListener(a,p)}function jl(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),l=Ul(r,s),i=o("animationDelay"),c=o("animationDuration"),a=Ul(i,c);let u=null,f=0,p=0;"transition"===t?l>0&&(u="transition",f=l,p=s.length):"animation"===t?a>0&&(u="animation",f=a,p=c.length):(f=Math.max(l,a),u=f>0?l>a?"transition":"animation":null,p=u?"transition"===u?s.length:c.length:0);return{type:u,timeout:f,propCount:p,hasTransform:"transition"===u&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}function Ul(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Dl(t)+Dl(e[n]))))}function Dl(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function Hl(){return document.body.offsetHeight}const Wl=new WeakMap,zl=new WeakMap,Kl={name:"TransitionGroup",props:C({},Ol,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=bs(),o=eo();let r,s;return Fo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=jl(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(Gl),r.forEach(ql);const o=r.filter(Jl);Hl(),o.forEach((e=>{const n=e.el,o=n.style;Ml(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,Il(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const l=Ct(e),i=Nl(l);let c=l.tag||jr;r=s,s=t.default?co(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&io(t,ro(t,i,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];io(t,ro(t,i,o,n)),Wl.set(t,t.el.getBoundingClientRect())}return ls(c,null,s)}}};function Gl(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function ql(e){zl.set(e,e.el.getBoundingClientRect())}function Jl(e){const t=Wl.get(e),n=zl.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const Yl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>G(t,e):t};function Xl(e){e.target.composing=!0}function Zl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ql={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=Yl(r);const s=o||r.props&&"number"===r.props.type;vl(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=J(o)),e._assign(o)})),n&&vl(e,"change",(()=>{e.value=e.value.trim()})),t||(vl(e,"compositionstart",Xl),vl(e,"compositionend",Zl),vl(e,"change",Zl))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=Yl(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&J(e.value)===t)return}const l=null==t?"":t;e.value!==l&&(e.value=l)}},ei={deep:!0,created(e,t,n){e._assign=Yl(n),vl(e,"change",(()=>{const t=e._modelValue,n=si(e),o=e.checked,r=e._assign;if(k(t)){const e=f(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(A(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(li(e,o))}))},mounted:ti,beforeUpdate(e,t,n){e._assign=Yl(n),ti(e,t,n)}};function ti(e,{value:t,oldValue:n},o){e._modelValue=t,k(t)?e.checked=f(t,o.props.value)>-1:A(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=u(t,li(e,!0)))}const ni={created(e,{value:t},n){e.checked=u(t,n.props.value),e._assign=Yl(n),vl(e,"change",(()=>{e._assign(si(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=Yl(o),t!==n&&(e.checked=u(t,o.props.value))}},oi={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=A(t);vl(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?J(si(e)):si(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=Yl(o)},mounted(e,{value:t}){ri(e,t)},beforeUpdate(e,t,n){e._assign=Yl(n)},updated(e,{value:t}){ri(e,t)}};function ri(e,t){const n=e.multiple;if(!n||k(t)||A(t)){for(let o=0,r=e.options.length;o<r;o++){const r=e.options[o],s=si(r);if(n)r.selected=k(t)?f(t,s)>-1:t.has(s);else if(u(si(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function si(e){return"_value"in e?e._value:e.value}function li(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ii={created(e,t,n){ci(e,t,n,null,"created")},mounted(e,t,n){ci(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){ci(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){ci(e,t,n,o,"updated")}};function ci(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return oi;case"TEXTAREA":return Ql;default:switch(t){case"checkbox":return ei;case"radio":return ni;default:return Ql}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const ai=["ctrl","shift","alt","meta"],ui={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>ai.some((n=>e[`${n}Key`]&&!t.includes(n)))},fi=(e,t)=>(n,...o)=>{for(let e=0;e<t.length;e++){const o=ui[t[e]];if(o&&o(n,t))return}return e(n,...o)},pi={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},di=(e,t)=>n=>{if(!("key"in n))return;const o=H(n.key);return t.some((e=>e===o||pi[e]===o))?e(n):void 0},hi={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):gi(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),gi(e,!0),o.enter(e)):o.leave(e,(()=>{gi(e,!1)})):gi(e,t))},beforeUnmount(e,{value:t}){gi(e,t)}};function gi(e,t){e.style.display=t?e._vod:"none"}const vi=C({patchProp:(e,t,r,s,l=!1,i,c,a,u)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,l):"style"===t?function(e,t,n){const o=e.style,r=O(n);if(n&&!r){for(const e in n)il(o,e,n[e]);if(t&&!O(t))for(const e in t)null==n[e]&&il(o,e,"")}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,r,s):y(t)?b(t)||ml(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&yl.test(t)&&T(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(yl.test(t)&&O(n))return!1;return t in e}(e,t,s,l))?function(e,t,n,r,s,l,i){if("innerHTML"===t||"textContent"===t)return r&&i(r,s,l),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const o=null==n?"":n;return e.value===o&&"OPTION"!==e.tagName||(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=o(n):null==n&&"string"===r?(n="",c=!0):"number"===r&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,i,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,r,s,l){if(s&&t.startsWith("xlink:"))null==r?e.removeAttributeNS(ul,t.slice(6,t.length)):e.setAttributeNS(ul,t,r);else{const s=n(t);null==r||s&&!o(r)?e.removeAttribute(t):e.setAttribute(t,s?"":r)}}(e,t,s,l))}},sl);let mi,_i=!1;function yi(){return mi||(mi=Or(vi))}function bi(){return mi=_i?mi:Pr(vi),_i=!0,mi}const Ci=(...e)=>{yi().render(...e)},xi=(...e)=>{bi().hydrate(...e)},wi=(...e)=>{const t=yi().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=ki(e);if(!o)return;const r=t._component;T(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},Si=(...e)=>{const t=bi().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=ki(e);if(t)return n(t,!0,t instanceof SVGElement)},t};function ki(e){if(O(e)){return document.querySelector(e)}return e}const Ei=v,Ai=()=>{};export{no as BaseTransition,Dr as Comment,Z as EffectScope,jr as Fragment,go as KeepAlive,pe as ReactiveEffect,Hr as Static,Bn as Suspense,$r as Teleport,Ur as Text,Fl as Transition,Kl as TransitionGroup,wl as VueElement,Gt as callWithAsyncErrorHandling,Kt as callWithErrorHandling,U as camelize,W as capitalize,cs as cloneVNode,nl as compatUtils,Ai as compile,Is as computed,wi as createApp,Zr as createBlock,fs as createCommentVNode,Xr as createElementBlock,ss as createElementVNode,Pr as createHydrationRenderer,zs as createPropsRestProxy,Or as createRenderer,Si as createSSRApp,Wo as createSlots,us as createStaticVNode,as as createTextVNode,ls as createVNode,Bt as customRef,fo as defineAsyncComponent,ao as defineComponent,bl as defineCustomElement,Vs as defineEmits,$s as defineExpose,Bs as defineProps,Cl as defineSSRCustomElement,_n as devtools,he as effect,Q as effectScope,bs as getCurrentInstance,te as getCurrentScope,co as getTransitionRawChildren,is as guardReactiveProps,Gs as h,qt as handleError,xi as hydrate,Ys as initCustomFormatter,Ei as initDirectivesForSSR,Wn as inject,Zs as isMemoSame,bt as isProxy,mt as isReactive,_t as isReadonly,At as isRef,Ts as isRuntimeOnly,yt as isShallow,Qr as isVNode,xt as markRaw,Ws as mergeDefaults,gs as mergeProps,an as nextTick,c as normalizeClass,a as normalizeProps,r as normalizeStyle,mo as onActivated,ko as onBeforeMount,To as onBeforeUnmount,Ao as onBeforeUpdate,_o as onDeactivated,Ro as onErrorCaptured,Eo as onMounted,No as onRenderTracked,Lo as onRenderTriggered,ne as onScopeDispose,Po as onServerPrefetch,Oo as onUnmounted,Fo as onUpdated,Kr as openBlock,Fn as popScopeId,Hn as provide,Mt as proxyRefs,An as pushScopeId,dn as queuePostFlushCb,pt as reactive,ht as readonly,Ft as ref,Fs as registerRuntimeCompiler,Ci as render,Ho as renderList,zo as renderSlot,Bo as resolveComponent,jo as resolveDirective,$o as resolveDynamicComponent,tl as resolveFilter,ro as resolveTransitionHooks,Jr as setBlockTracking,bn as setDevtoolsHook,io as setTransitionHooks,dt as shallowReactive,gt as shallowReadonly,Tt as shallowRef,qs as ssrContextKey,el as ssrUtils,ge as stop,p as toDisplayString,z as toHandlerKey,Go as toHandlers,Ct as toRaw,jt as toRef,Vt as toRefs,ts as transformVNodeArgs,Lt as triggerRef,Nt as unref,Ds as useAttrs,Sl as useCssModule,kl as useCssVars,Js as useSSRContext,Us as useSlots,eo as useTransitionState,ei as vModelCheckbox,ii as vModelDynamic,ni as vModelRadio,oi as vModelSelect,Ql as vModelText,hi as vShow,Qs as version,Ht as warn,Jn as watch,zn as watchEffect,Kn as watchPostEffect,Gn as watchSyncEffect,Ks as withAsyncContext,On as withCtx,js as withDefaults,Mo as withDirectives,di as withKeys,Xs as withMemo,fi as withModifiers,Tn as withScopeId}; +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const t={},n=[],o=()=>{},r=()=>!1,s=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),i=e=>e.startsWith("onUpdate:"),l=Object.assign,c=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},a=Object.prototype.hasOwnProperty,u=(e,t)=>a.call(e,t),f=Array.isArray,p=e=>"[object Map]"===C(e),d=e=>"[object Set]"===C(e),h=e=>"[object Date]"===C(e),v=e=>"function"==typeof e,g=e=>"string"==typeof e,m=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,y=e=>(_(e)||v(e))&&v(e.then)&&v(e.catch),b=Object.prototype.toString,C=e=>b.call(e),x=e=>C(e).slice(8,-1),E=e=>"[object Object]"===C(e),S=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},k=/-(\w)/g,T=A((e=>e.replace(k,((e,t)=>t?t.toUpperCase():"")))),N=/\B([A-Z])/g,O=A((e=>e.replace(N,"-$1").toLowerCase())),L=A((e=>e.charAt(0).toUpperCase()+e.slice(1))),F=A((e=>e?`on${L(e)}`:"")),R=(e,t)=>!Object.is(e,t),P=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},I=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},M=e=>{const t=parseFloat(e);return isNaN(t)?e:t},B=e=>{const t=g(e)?Number(e):NaN;return isNaN(t)?e:t};let V;const U=()=>V||(V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),$=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");function j(e){if(f(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=g(o)?K(o):j(o);if(r)for(const e in r)t[e]=r[e]}return t}if(g(e)||_(e))return e}const D=/;(?![^(]*\))/g,H=/:([^]+)/,W=/\/\*[^]*?\*\//g;function K(e){const t={};return e.replace(W,"").split(D).forEach((e=>{if(e){const n=e.split(H);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function z(e){let t="";if(g(e))t=e;else if(f(e))for(let n=0;n<e.length;n++){const o=z(e[n]);o&&(t+=o+" ")}else if(_(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function G(e){if(!e)return null;let{class:t,style:n}=e;return t&&!g(t)&&(e.class=z(t)),n&&(e.style=j(n)),e}const q=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function J(e){return!!e||""===e}function X(e,t){if(e===t)return!0;let n=h(e),o=h(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=m(e),o=m(t),n||o)return e===t;if(n=f(e),o=f(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=X(e[o],t[o]);return n}(e,t);if(n=_(e),o=_(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!X(e[n],t[n]))return!1}}return String(e)===String(t)}function Y(e,t){return e.findIndex((e=>X(e,t)))}const Z=e=>g(e)?e:null==e?"":f(e)||_(e)&&(e.toString===b||!v(e.toString))?JSON.stringify(e,Q,2):String(e),Q=(e,t)=>t&&t.__v_isRef?Q(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[ee(t,o)+" =>"]=n,e)),{})}:d(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ee(e)))}:m(t)?ee(t):!_(t)||f(t)||E(t)?t:String(t),ee=(e,t="")=>{var n;return m(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let te,ne;class oe{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=te,!e&&te&&(this.index=(te.scopes||(te.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=te;try{return te=this,e()}finally{te=t}}}on(){te=this}off(){te=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function re(e){return new oe(e)}function se(e,t=te){t&&t.active&&t.effects.push(e)}function ie(){return te}function le(e){te&&te.cleanups.push(e)}class ce{constructor(e,t,n,o){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,se(this,o)}get dirty(){if(1===this._dirtyLevel){_e();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(ae(t.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),ye()}return this._dirtyLevel>=2}set dirty(e){this._dirtyLevel=e?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=ve,t=ne;try{return ve=!0,ne=this,this._runnings++,ue(this),this.fn()}finally{fe(this),this._runnings--,ne=t,ve=e}}stop(){var e;this.active&&(ue(this),fe(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function ae(e){return e.value}function ue(e){e._trackId++,e._depsLength=0}function fe(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)pe(e.deps[t],e);e.deps.length=e._depsLength}}function pe(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function de(e,t){e.effect instanceof ce&&(e=e.effect.fn);const n=new ce(e,o,(()=>{n.dirty&&n.run()}));t&&(l(n,t),t.scope&&se(n,t.scope)),t&&t.lazy||n.run();const r=n.run.bind(n);return r.effect=n,r}function he(e){e.effect.stop()}let ve=!0,ge=0;const me=[];function _e(){me.push(ve),ve=!1}function ye(){const e=me.pop();ve=void 0===e||e}function be(){ge++}function Ce(){for(ge--;!ge&&Ee.length;)Ee.shift()()}function xe(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&pe(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Ee=[];function Se(e,t,n){be();for(const o of e.keys())if(o._dirtyLevel<t&&e.get(o)===o._trackId){const e=o._dirtyLevel;o._dirtyLevel=t,0===e&&(o._shouldSchedule=!0,o.trigger())}we(e),Ce()}function we(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,Ee.push(t.scheduler))}const Ae=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},ke=new WeakMap,Te=Symbol(""),Ne=Symbol("");function Oe(e,t,n){if(ve&&ne){let t=ke.get(e);t||ke.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Ae((()=>t.delete(n)))),xe(ne,o)}}function Le(e,t,n,o,r,s){const i=ke.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&f(e)){const e=Number(o);i.forEach(((t,n)=>{("length"===n||!m(n)&&n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":f(e)?S(n)&&l.push(i.get("length")):(l.push(i.get(Te)),p(e)&&l.push(i.get(Ne)));break;case"delete":f(e)||(l.push(i.get(Te)),p(e)&&l.push(i.get(Ne)));break;case"set":p(e)&&l.push(i.get(Te))}be();for(const c of l)c&&Se(c,2);Ce()}const Fe=e("__proto__,__v_isRef,__isVue"),Re=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(m)),Pe=Ie();function Ie(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=wt(this);for(let t=0,r=this.length;t<r;t++)Oe(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(wt)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){_e(),be();const n=wt(this)[t].apply(this,e);return Ce(),ye(),n}})),e}function Me(e){const t=wt(this);return Oe(t,0,e),t.hasOwnProperty(e)}class Be{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const o=this._isReadonly,r=this._shallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?vt:ht:r?dt:pt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=f(e);if(!o){if(s&&u(Pe,t))return Reflect.get(Pe,t,n);if("hasOwnProperty"===t)return Me}const i=Reflect.get(e,t,n);return(m(t)?Re.has(t):Fe(t))?i:(o||Oe(e,0,t),r?i:Ft(i)?s&&S(t)?i:i.value:_(i)?o?_t(i):gt(i):i)}}class Ve extends Be{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._shallow){const t=xt(r);if(Et(n)||xt(n)||(r=wt(r),n=wt(n)),!f(e)&&Ft(r)&&!Ft(n))return!t&&(r.value=n,!0)}const s=f(e)&&S(t)?Number(t)<e.length:u(e,t),i=Reflect.set(e,t,n,o);return e===wt(o)&&(s?R(n,r)&&Le(e,"set",t,n):Le(e,"add",t,n)),i}deleteProperty(e,t){const n=u(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&Le(e,"delete",t,void 0),o}has(e,t){const n=Reflect.has(e,t);return m(t)&&Re.has(t)||Oe(e,0,t),n}ownKeys(e){return Oe(e,0,f(e)?"length":Te),Reflect.ownKeys(e)}}class Ue extends Be{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const $e=new Ve,je=new Ue,De=new Ve(!0),He=new Ue(!0),We=e=>e,Ke=e=>Reflect.getPrototypeOf(e);function ze(e,t,n=!1,o=!1){const r=wt(e=e.__v_raw),s=wt(t);n||(R(t,s)&&Oe(r,0,t),Oe(r,0,s));const{has:i}=Ke(r),l=o?We:n?Tt:kt;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function Ge(e,t=!1){const n=this.__v_raw,o=wt(n),r=wt(e);return t||(R(e,r)&&Oe(o,0,e),Oe(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function qe(e,t=!1){return e=e.__v_raw,!t&&Oe(wt(e),0,Te),Reflect.get(e,"size",e)}function Je(e){e=wt(e);const t=wt(this);return Ke(t).has.call(t,e)||(t.add(e),Le(t,"add",e,e)),this}function Xe(e,t){t=wt(t);const n=wt(this),{has:o,get:r}=Ke(n);let s=o.call(n,e);s||(e=wt(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?R(t,i)&&Le(n,"set",e,t):Le(n,"add",e,t),this}function Ye(e){const t=wt(this),{has:n,get:o}=Ke(t);let r=n.call(t,e);r||(e=wt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&Le(t,"delete",e,void 0),s}function Ze(){const e=wt(this),t=0!==e.size,n=e.clear();return t&&Le(e,"clear",void 0,void 0),n}function Qe(e,t){return function(n,o){const r=this,s=r.__v_raw,i=wt(s),l=t?We:e?Tt:kt;return!e&&Oe(i,0,Te),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function et(e,t,n){return function(...o){const r=this.__v_raw,s=wt(r),i=p(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?We:t?Tt:kt;return!t&&Oe(s,0,c?Ne:Te),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function tt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function nt(){const e={get(e){return ze(this,e)},get size(){return qe(this)},has:Ge,add:Je,set:Xe,delete:Ye,clear:Ze,forEach:Qe(!1,!1)},t={get(e){return ze(this,e,!1,!0)},get size(){return qe(this)},has:Ge,add:Je,set:Xe,delete:Ye,clear:Ze,forEach:Qe(!1,!0)},n={get(e){return ze(this,e,!0)},get size(){return qe(this,!0)},has(e){return Ge.call(this,e,!0)},add:tt("add"),set:tt("set"),delete:tt("delete"),clear:tt("clear"),forEach:Qe(!0,!1)},o={get(e){return ze(this,e,!0,!0)},get size(){return qe(this,!0)},has(e){return Ge.call(this,e,!0)},add:tt("add"),set:tt("set"),delete:tt("delete"),clear:tt("clear"),forEach:Qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=et(r,!1,!1),n[r]=et(r,!0,!1),t[r]=et(r,!1,!0),o[r]=et(r,!0,!0)})),[e,n,t,o]}const[ot,rt,st,it]=nt();function lt(e,t){const n=t?e?it:st:e?rt:ot;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(u(n,o)&&o in t?n:t,o,r)}const ct={get:lt(!1,!1)},at={get:lt(!1,!0)},ut={get:lt(!0,!1)},ft={get:lt(!0,!0)},pt=new WeakMap,dt=new WeakMap,ht=new WeakMap,vt=new WeakMap;function gt(e){return xt(e)?e:bt(e,!1,$e,ct,pt)}function mt(e){return bt(e,!1,De,at,dt)}function _t(e){return bt(e,!0,je,ut,ht)}function yt(e){return bt(e,!0,He,ft,vt)}function bt(e,t,n,o,r){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(x(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function Ct(e){return xt(e)?Ct(e.__v_raw):!(!e||!e.__v_isReactive)}function xt(e){return!(!e||!e.__v_isReadonly)}function Et(e){return!(!e||!e.__v_isShallow)}function St(e){return Ct(e)||xt(e)}function wt(e){const t=e&&e.__v_raw;return t?wt(t):e}function At(e){return I(e,"__v_skip",!0),e}const kt=e=>_(e)?gt(e):e,Tt=e=>_(e)?_t(e):e;class Nt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ce((()=>e(this._value)),(()=>Lt(this,1)),(()=>this.dep&&we(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=wt(this);return e._cacheable&&!e.effect.dirty||R(e._value,e._value=e.effect.run())&&Lt(e,2),Ot(e),e.effect._dirtyLevel>=1&&Lt(e,1),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Ot(e){ve&&ne&&(e=wt(e),xe(ne,e.dep||(e.dep=Ae((()=>e.dep=void 0),e instanceof Nt?e:void 0))))}function Lt(e,t=2,n){const o=(e=wt(e)).dep;o&&Se(o,t)}function Ft(e){return!(!e||!0!==e.__v_isRef)}function Rt(e){return It(e,!1)}function Pt(e){return It(e,!0)}function It(e,t){return Ft(e)?e:new Mt(e,t)}class Mt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:wt(e),this._value=t?e:kt(e)}get value(){return Ot(this),this._value}set value(e){const t=this.__v_isShallow||Et(e)||xt(e);e=t?e:wt(e),R(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:kt(e),Lt(this,2))}}function Bt(e){Lt(e,2)}function Vt(e){return Ft(e)?e.value:e}function Ut(e){return v(e)?e():Vt(e)}const $t={get:(e,t,n)=>Vt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Ft(r)&&!Ft(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function jt(e){return Ct(e)?e:new Proxy(e,$t)}class Dt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>Ot(this)),(()=>Lt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Ht(e){return new Dt(e)}function Wt(e){const t=f(e)?new Array(e.length):{};for(const n in e)t[n]=qt(e,n);return t}class Kt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=wt(this._object),t=this._key,null==(n=ke.get(e))?void 0:n.get(t);var e,t,n}}class zt{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Gt(e,t,n){return Ft(e)?e:v(e)?new zt(e):_(e)&&arguments.length>1?qt(e,t,n):Rt(e)}function qt(e,t,n){const o=e[t];return Ft(o)?o:new Kt(e,t,n)}const Jt={GET:"get",HAS:"has",ITERATE:"iterate"},Xt={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};function Yt(e,t){}const Zt={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"};function Qt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){tn(s,t,n)}return r}function en(e,t,n,o){if(v(e)){const r=Qt(e,t,n,o);return r&&y(r)&&r.catch((e=>{tn(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(en(e[s],t,n,o));return r}function tn(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const i=t.appContext.config.errorHandler;if(i)return void Qt(i,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let nn=!1,on=!1;const rn=[];let sn=0;const ln=[];let cn=null,an=0;const un=Promise.resolve();let fn=null;function pn(e){const t=fn||un;return e?t.then(this?e.bind(this):e):t}function dn(e){rn.length&&rn.includes(e,nn&&e.allowRecurse?sn+1:sn)||(null==e.id?rn.push(e):rn.splice(function(e){let t=sn+1,n=rn.length;for(;t<n;){const o=t+n>>>1,r=rn[o],s=_n(r);s<e||s===e&&r.pre?t=o+1:n=o}return t}(e.id),0,e),hn())}function hn(){nn||on||(on=!0,fn=un.then(bn))}function vn(e){f(e)?ln.push(...e):cn&&cn.includes(e,e.allowRecurse?an+1:an)||ln.push(e),hn()}function gn(e,t,n=(nn?sn+1:0)){for(;n<rn.length;n++){const t=rn[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;rn.splice(n,1),n--,t()}}}function mn(e){if(ln.length){const e=[...new Set(ln)].sort(((e,t)=>_n(e)-_n(t)));if(ln.length=0,cn)return void cn.push(...e);for(cn=e,an=0;an<cn.length;an++)cn[an]();cn=null,an=0}}const _n=e=>null==e.id?1/0:e.id,yn=(e,t)=>{const n=_n(e)-_n(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function bn(e){on=!1,nn=!0,rn.sort(yn);try{for(sn=0;sn<rn.length;sn++){const e=rn[sn];e&&!1!==e.active&&Qt(e,null,14)}}finally{sn=0,rn.length=0,mn(),nn=!1,fn=null,(rn.length||ln.length)&&bn()}}function Cn(e,n,...o){if(e.isUnmounted)return;const r=e.vnode.props||t;let s=o;const i=n.startsWith("update:"),l=i&&n.slice(7);if(l&&l in r){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:n,trim:i}=r[e]||t;i&&(s=o.map((e=>g(e)?e.trim():e))),n&&(s=o.map(M))}let c,a=r[c=F(n)]||r[c=F(T(n))];!a&&i&&(a=r[c=F(O(n))]),a&&en(a,e,6,s);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,en(u,e,6,s)}}function xn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},c=!1;if(!v(e)){const o=e=>{const n=xn(e,t,!0);n&&(c=!0,l(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||c?(f(s)?s.forEach((e=>i[e]=null)):l(i,s),_(e)&&o.set(e,i),i):(_(e)&&o.set(e,null),null)}function En(e,t){return!(!e||!s(t))&&(t=t.slice(2).replace(/Once$/,""),u(e,t[0].toLowerCase()+t.slice(1))||u(e,O(t))||u(e,t))}let Sn=null,wn=null;function An(e){const t=Sn;return Sn=e,wn=e&&e.type.__scopeId||null,t}function kn(e){wn=e}function Tn(){wn=null}const Nn=e=>On;function On(e,t=Sn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Ts(-1);const r=An(t);let s;try{s=e(...n)}finally{An(r),o._d&&Ts(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Ln(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:c,attrs:a,emit:u,render:f,renderCache:p,data:d,setupState:h,ctx:v,inheritAttrs:g}=e;let m,_;const y=An(e);try{if(4&n.shapeFlag){const e=r||o;m=Ks(f.call(e,e,p,s,h,d,v)),_=a}else{const e=t;0,m=Ks(e(s,e.length>1?{attrs:a,slots:c,emit:u}:null)),_=t.props?a:Fn(a)}}catch(C){Es.length=0,tn(C,e,1),m=Us(Cs)}let b=m;if(_&&!1!==g){const e=Object.keys(_),{shapeFlag:t}=b;e.length&&7&t&&(l&&e.some(i)&&(_=Rn(_,l)),b=js(b,_))}return n.dirs&&(b=js(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),m=b,An(y),m}const Fn=e=>{let t;for(const n in e)("class"===n||"style"===n||s(n))&&((t||(t={}))[n]=e[n]);return t},Rn=(e,t)=>{const n={};for(const o in e)i(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Pn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!En(n,s))return!0}return!1}function In({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}const Mn="components";function Bn(e,t){return jn(Mn,e,!0,t)||e}const Vn=Symbol.for("v-ndc");function Un(e){return g(e)?jn(Mn,e,!1)||e:e||Vn}function $n(e){return jn("directives",e)}function jn(e,t,n=!0,o=!1){const r=Sn||Zs;if(r){const n=r.type;if(e===Mn){const e=hi(n,!1);if(e&&(e===t||e===T(t)||e===L(T(t))))return n}const s=Dn(r[e]||n[e],t)||Dn(r.appContext[e],t);return!s&&o?n:s}}function Dn(e,t){return e&&(e[t]||e[T(t)]||e[L(T(t))])}const Hn=e=>e.__isSuspense;let Wn=0;const Kn={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){if(null==e)!function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,f=u("div"),p=e.suspense=Gn(e,r,o,t,f,n,s,i,l,c);a(null,p.pendingBranch=e.ssContent,f,null,o,p,s,i),p.deps>0?(zn(e,"onPending"),zn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),Xn(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a);else{if(s&&s.deps>0)return void(t.suspense=e.suspense);!function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:v,isInFallback:g,isHydrating:m}=f;if(v)f.pendingBranch=p,Rs(p,v)?(c(v,p,f.hiddenContainer,null,r,f,s,i,l),f.deps<=0?f.resolve():g&&(m||(c(h,d,n,o,r,null,s,i,l),Xn(f,d)))):(f.pendingId=Wn++,m?(f.isHydrating=!1,f.activeBranch=v):a(v,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),g?(c(null,p,f.hiddenContainer,null,r,f,s,i,l),f.deps<=0?f.resolve():(c(h,d,n,o,r,null,s,i,l),Xn(f,d))):h&&Rs(p,h)?(c(h,p,n,o,r,f,s,i,l),f.resolve(!0)):(c(null,p,f.hiddenContainer,null,r,f,s,i,l),f.deps<=0&&f.resolve()));else if(h&&Rs(p,h))c(h,p,n,o,r,f,s,i,l),Xn(f,p);else if(zn(t,"onPending"),f.pendingBranch=p,f.pendingId=512&p.shapeFlag?p.component.suspenseId:Wn++,c(null,p,f.hiddenContainer,null,r,f,s,i,l),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,o,r,i,l,c,a)}},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=Gn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve(!1,!0);return u},create:Gn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=qn(o?n.default:n),e.ssFallback=o?qn(n.fallback):Us(Cs)}};function zn(e,t){const n=e.props&&e.props[t];v(n)&&n()}function Gn(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:v,remove:g}}=a;let m;const _=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);_&&(null==t?void 0:t.pendingBranch)&&(m=t.pendingId,t.deps++);const y=e.props?B(e.props.timeout):void 0,b=s,C={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:Wn++,timeout:"number"==typeof y?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=C;let f=!1;C.isHydrating?C.isHydrating=!1:e||(f=r&&i.transition&&"out-in"===i.transition.mode,f&&(r.transition.afterLeave=()=>{l===C.pendingId&&(p(i,u,s===b?h(r):s,0),vn(c))}),r&&(v(r.el)!==C.hiddenContainer&&(s=h(r)),d(r,a,C,!0)),f||p(i,u,s,0)),Xn(C,i),C.pendingBranch=null,C.isInFallback=!1;let g=C.parent,y=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),y=!0;break}g=g.parent}y||f||vn(c),C.effects=[],_&&t&&t.pendingBranch&&m===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),zn(o,"onResolve")},fallback(e){if(!C.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,namespace:s}=C;zn(t,"onFallback");const i=h(n),a=()=>{C.isInFallback&&(f(null,e,r,i,o,null,s,l,c),Xn(C,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),C.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){C.activeBranch&&p(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&h(C.activeBranch),registerDep(e,t){const n=!!C.pendingBranch;n&&C.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{tn(t,e,0)})).then((r=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;ci(e,r,!1),o&&(s.el=o);const l=!o&&e.subTree.el;t(e,s,v(o||e.subTree.el),o?null:h(e.subTree),C,i,c),l&&g(l),In(e,s.el),n&&0==--C.deps&&C.resolve()}))},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&d(C.activeBranch,n,e,t),C.pendingBranch&&d(C.pendingBranch,n,e,t)}};return C}function qn(e){let t;if(v(e)){const n=ks&&e._c;n&&(e._d=!1,ws()),e=e(),n&&(e._d=!0,t=Ss,As())}if(f(e)){const t=function(e,t=!0){let n;for(let o=0;o<e.length;o++){const t=e[o];if(!Fs(t))return;if(t.type!==Cs||"v-if"===t.children){if(n)return;n=t}}return n}(e);e=t}return e=Ks(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Jn(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):vn(e)}function Xn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,In(o,r))}const Yn=Symbol.for("v-scx"),Zn=()=>Mr(Yn);function Qn(e,t){return ro(e,null,t)}function eo(e,t){return ro(e,null,{flush:"post"})}function to(e,t){return ro(e,null,{flush:"sync"})}const no={};function oo(e,t,n){return ro(e,t,n)}function ro(e,n,{immediate:r,deep:s,flush:i,once:l}=t){if(n&&l){const e=n;n=(...t)=>{e(...t),E()}}const a=Zs,u=e=>!0===s?e:lo(e,!1===s?1:void 0);let p,d,h=!1,g=!1;if(Ft(e)?(p=()=>e.value,h=Et(e)):Ct(e)?(p=()=>u(e),h=!0):f(e)?(g=!0,h=e.some((e=>Ct(e)||Et(e))),p=()=>e.map((e=>Ft(e)?e.value:Ct(e)?u(e):v(e)?Qt(e,a,2):void 0))):p=v(e)?n?()=>Qt(e,a,2):()=>(d&&d(),en(e,a,3,[m])):o,n&&s){const e=p;p=()=>lo(e())}let m=e=>{d=C.onStop=()=>{Qt(e,a,4),d=C.onStop=void 0}},_=g?new Array(e.length).fill(no):no;const y=()=>{if(C.active&&C.dirty)if(n){const e=C.run();(s||h||(g?e.some(((e,t)=>R(e,_[t]))):R(e,_)))&&(d&&d(),en(n,a,3,[e,_===no?void 0:g&&_[0]===no?[]:_,m]),_=e)}else C.run()};let b;y.allowRecurse=!!n,"sync"===i?b=y:"post"===i?b=()=>os(y,a&&a.suspense):(y.pre=!0,a&&(y.id=a.uid),b=()=>dn(y));const C=new ce(p,o,b),x=ie(),E=()=>{C.stop(),x&&c(x.effects,C)};return n?r?y():_=C.run():"post"===i?os(C.run.bind(C),a&&a.suspense):C.run(),E}function so(e,t,n){const o=this.proxy,r=g(e)?e.includes(".")?io(o,e):()=>o[e]:e.bind(o,o);let s;v(t)?s=t:(s=t.handler,n=t);const i=ni(this),l=ro(r,s.bind(o),n);return i(),l}function io(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function lo(e,t,n=0,o){if(!_(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),Ft(e))lo(e.value,t,n,o);else if(f(e))for(let r=0;r<e.length;r++)lo(e[r],t,n,o);else if(d(e)||p(e))e.forEach((e=>{lo(e,t,n,o)}));else if(E(e))for(const r in e)lo(e[r],t,n,o);return e}function co(e,n){if(null===Sn)return e;const o=di(Sn)||Sn.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<n.length;s++){let[e,i,l,c=t]=n[s];e&&(v(e)&&(e={mounted:e,updated:e}),e.deep&&lo(i),r.push({dir:e,instance:o,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e}function ao(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let c=l.dir[o];c&&(_e(),en(c,n,8,[e.el,l,e,t]),ye())}}const uo=Symbol("_leaveCb"),fo=Symbol("_enterCb");function po(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Uo((()=>{e.isMounted=!0})),Do((()=>{e.isUnmounting=!0})),e}const ho=[Function,Array],vo={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ho,onEnter:ho,onAfterEnter:ho,onEnterCancelled:ho,onBeforeLeave:ho,onLeave:ho,onAfterLeave:ho,onLeaveCancelled:ho,onBeforeAppear:ho,onAppear:ho,onAfterAppear:ho,onAppearCancelled:ho},go={name:"BaseTransition",props:vo,setup(e,{slots:t}){const n=Qs(),o=po();let r;return()=>{const s=t.default&&xo(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1)for(const e of s)if(e.type!==Cs){i=e;break}const l=wt(e),{mode:c}=l;if(o.isLeaving)return yo(i);const a=bo(i);if(!a)return yo(i);const u=_o(a,l,o,n);Co(a,u);const f=n.subTree,p=f&&bo(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==Cs&&(!Rs(a,p)||d)){const e=_o(p,l,o,n);if(Co(p,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},yo(i);"in-out"===c&&a.type!==Cs&&(e.delayLeave=(e,t,n)=>{mo(o,p)[String(p.key)]=p,e[uo]=()=>{t(),e[uo]=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function mo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function _o(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:v,onBeforeAppear:g,onAppear:m,onAfterAppear:_,onAppearCancelled:y}=t,b=String(e.key),C=mo(n,e),x=(e,t)=>{e&&en(e,o,9,t)},E=(e,t)=>{const n=t[1];x(e,t),f(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},S={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=g||l}t[uo]&&t[uo](!0);const s=C[b];s&&Rs(e,s)&&s.el[uo]&&s.el[uo](),x(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=m||c,o=_||a,s=y||u}let i=!1;const l=e[fo]=t=>{i||(i=!0,x(t?s:o,[e]),S.delayedLeave&&S.delayedLeave(),e[fo]=void 0)};t?E(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t[fo]&&t[fo](!0),n.isUnmounting)return o();x(p,[t]);let s=!1;const i=t[uo]=n=>{s||(s=!0,o(),x(n?v:h,[t]),t[uo]=void 0,C[r]===e&&delete C[r])};C[r]=e,d?E(d,[t,i]):i()},clone:e=>_o(e,t,n,o)};return S}function yo(e){if(ko(e))return(e=js(e)).children=null,e}function bo(e){return ko(e)?e.children?e.children[0]:void 0:e}function Co(e,t){6&e.shapeFlag&&e.component?Co(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function xo(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let i=e[s];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:s);i.type===ys?(128&i.patchFlag&&r++,o=o.concat(xo(i.children,t,l))):(t||i.type!==Cs)&&o.push(null!=l?js(i,{key:l}):i)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o} +/*! #__NO_SIDE_EFFECTS__ */function Eo(e,t){return v(e)?(()=>l({name:e.name},t,{setup:e}))():e}const So=e=>!!e.type.__asyncLoader +/*! #__NO_SIDE_EFFECTS__ */;function wo(e){v(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const f=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,f()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return Eo({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return c},setup(){const e=Zs;if(c)return()=>Ao(c,e);const t=t=>{a=null,tn(t,e,13,!o)};if(i&&e.suspense)return f().then((t=>()=>Ao(t,e))).catch((e=>(t(e),()=>o?Us(o,{error:e}):null)));const l=Rt(!1),u=Rt(),p=Rt(!!r);return r&&setTimeout((()=>{p.value=!1}),r),null!=s&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),f().then((()=>{l.value=!0,e.parent&&ko(e.parent.vnode)&&(e.parent.effect.dirty=!0,dn(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?Ao(c,e):u.value&&o?Us(o,{error:u.value}):n&&!p.value?Us(n):void 0}})}function Ao(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=Us(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const ko=e=>e.type.__isKeepAlive,To={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Qs(),o=n.ctx,r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:f}}}=o,p=f("div");function d(e){Po(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=hi(t.type);!o||e&&e(o)||v(n)}))}function v(e){const t=r.get(e);i&&Rs(t,i)?i&&Po(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),os((()=>{s.isDeactivated=!1,s.a&&P(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Js(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;a(e,p,null,1,l),os((()=>{t.da&&P(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Js(n,t.parent,e),t.isDeactivated=!0}),l)},oo((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>No(e,t))),t&&h((e=>!No(t,e)))}),{flush:"post",deep:!0});let g=null;const m=()=>{null!=g&&r.set(g,Io(n.subTree))};return Uo(m),jo(m),Do((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=Io(t);if(e.type!==r.type||e.key!==r.key)d(e);else{Po(r);const e=r.component.da;e&&os(e,o)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!(Fs(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let l=Io(o);const c=l.type,a=hi(So(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:f,max:p}=e;if(u&&(!a||!No(u,a))||f&&a&&No(f,a))return i=l,o;const d=null==l.key?c:l.key,h=r.get(d);return l.el&&(l=js(l),128&o.shapeFlag&&(o.ssContent=l)),g=d,h?(l.el=h.el,l.component=h.component,l.transition&&Co(l,l.transition),l.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&v(s.values().next().value)),l.shapeFlag|=256,i=l,Hn(o.type)?o:l}}};function No(e,t){return f(e)?e.some((e=>No(e,t))):g(e)?e.split(",").includes(t):"[object RegExp]"===C(e)&&e.test(t)}function Oo(e,t){Fo(e,"a",t)}function Lo(e,t){Fo(e,"da",t)}function Fo(e,t,n=Zs){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Mo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)ko(e.parent.vnode)&&Ro(o,t,n,e),e=e.parent}}function Ro(e,t,n,o){const r=Mo(t,e,o,!0);Ho((()=>{c(o[t],r)}),n)}function Po(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Io(e){return 128&e.shapeFlag?e.ssContent:e}function Mo(e,t,n=Zs,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;_e();const r=ni(n),s=en(t,n,e,o);return r(),ye(),s});return o?r.unshift(s):r.push(s),s}}const Bo=e=>(t,n=Zs)=>(!li||"sp"===e)&&Mo(e,((...e)=>t(...e)),n),Vo=Bo("bm"),Uo=Bo("m"),$o=Bo("bu"),jo=Bo("u"),Do=Bo("bum"),Ho=Bo("um"),Wo=Bo("sp"),Ko=Bo("rtg"),zo=Bo("rtc");function Go(e,t=Zs){Mo("ec",e,t)}function qo(e,t,n,o){let r;const s=n&&n[o];if(f(e)||g(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(_(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[o]=t(e[i],i,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r}function Jo(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(f(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.key?(...e)=>{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function Xo(e,t,n={},o,r){if(Sn.isCE||Sn.parent&&So(Sn.parent)&&Sn.parent.isCE)return"default"!==t&&(n.name=t),Us("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),ws();const i=s&&Yo(s(n)),l=Ls(ys,{key:n.key||i&&i.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Yo(e){return e.some((e=>!Fs(e)||e.type!==Cs&&!(e.type===ys&&!Yo(e.children))))?e:null}function Zo(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:F(o)]=e[o];return n}const Qo=e=>e?ri(e)?di(e)||e.proxy:Qo(e.parent):null,er=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qo(e.parent),$root:e=>Qo(e.root),$emit:e=>e.emit,$options:e=>Er(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,dn(e.update)}),$nextTick:e=>e.n||(e.n=pn.bind(e.proxy)),$watch:e=>so.bind(e)}),tr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),nr={get({_:e},n){const{ctx:o,setupState:r,data:s,props:i,accessCache:l,type:c,appContext:a}=e;let f;if("$"!==n[0]){const c=l[n];if(void 0!==c)switch(c){case 1:return r[n];case 2:return s[n];case 4:return o[n];case 3:return i[n]}else{if(tr(r,n))return l[n]=1,r[n];if(s!==t&&u(s,n))return l[n]=2,s[n];if((f=e.propsOptions[0])&&u(f,n))return l[n]=3,i[n];if(o!==t&&u(o,n))return l[n]=4,o[n];yr&&(l[n]=0)}}const p=er[n];let d,h;return p?("$attrs"===n&&Oe(e,0,n),p(e)):(d=c.__cssModules)&&(d=d[n])?d:o!==t&&u(o,n)?(l[n]=4,o[n]):(h=a.config.globalProperties,u(h,n)?h[n]:void 0)},set({_:e},n,o){const{data:r,setupState:s,ctx:i}=e;return tr(s,n)?(s[n]=o,!0):r!==t&&u(r,n)?(r[n]=o,!0):!u(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(i[n]=o,!0))},has({_:{data:e,setupState:n,accessCache:o,ctx:r,appContext:s,propsOptions:i}},l){let c;return!!o[l]||e!==t&&u(e,l)||tr(n,l)||(c=i[0])&&u(c,l)||u(r,l)||u(er,l)||u(s.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:u(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},or=l({},nr,{get(e,t){if(t!==Symbol.unscopables)return nr.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!$(t)});function rr(){return null}function sr(){return null}function ir(e){}function lr(e){}function cr(){return null}function ar(){}function ur(e,t){return null}function fr(){return dr().slots}function pr(){return dr().attrs}function dr(){const e=Qs();return e.setupContext||(e.setupContext=pi(e))}function hr(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function vr(e,t){const n=hr(e);for(const o in t){if(o.startsWith("__skip"))continue;let e=n[o];e?f(e)||v(e)?e=n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(e=n[o]={default:t[o]}),e&&t[`__skip_${o}`]&&(e.skipFactory=!0)}return n}function gr(e,t){return e&&t?f(e)&&f(t)?e.concat(t):l({},hr(e),hr(t)):e||t}function mr(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function _r(e){const t=Qs();let n=e();return oi(),y(n)&&(n=n.catch((e=>{throw ni(t),e}))),[n,()=>ni(t)]}let yr=!0;function br(e){const t=Er(e),n=e.proxy,r=e.ctx;yr=!1,t.beforeCreate&&Cr(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:c,provide:a,inject:u,created:p,beforeMount:d,mounted:h,beforeUpdate:g,updated:m,activated:y,deactivated:b,beforeUnmount:C,unmounted:x,render:E,renderTracked:S,renderTriggered:w,errorCaptured:A,serverPrefetch:k,expose:T,inheritAttrs:N,components:O,directives:L}=t;if(u&&function(e,t,n=o){f(e)&&(e=kr(e));for(const o in e){const n=e[o];let r;r=_(n)?"default"in n?Mr(n.from||o,n.default,!0):Mr(n.from||o):Mr(n),Ft(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(u,r,null),l)for(const o in l){const e=l[o];v(e)&&(r[o]=e.bind(n))}if(s){const t=s.call(n,n);_(t)&&(e.data=gt(t))}if(yr=!0,i)for(const f in i){const e=i[f],t=v(e)?e.bind(n,n):v(e.get)?e.get.bind(n,n):o,s=!v(e)&&v(e.set)?e.set.bind(n):o,l=vi({get:t,set:s});Object.defineProperty(r,f,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const o in c)xr(c[o],r,n,o);if(a){const e=v(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Ir(t,e[t])}))}function F(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&Cr(p,e,"c"),F(Vo,d),F(Uo,h),F($o,g),F(jo,m),F(Oo,y),F(Lo,b),F(Go,A),F(zo,S),F(Ko,w),F(Do,C),F(Ho,x),F(Wo,k),f(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});E&&e.render===o&&(e.render=E),null!=N&&(e.inheritAttrs=N),O&&(e.components=O),L&&(e.directives=L)}function Cr(e,t,n){en(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function xr(e,t,n,o){const r=o.includes(".")?io(n,o):()=>n[o];if(g(e)){const n=t[e];v(n)&&oo(r,n)}else if(v(e))oo(r,e.bind(n));else if(_(e))if(f(e))e.forEach((e=>xr(e,t,n,o)));else{const o=v(e.handler)?e.handler.bind(n):t[e.handler];v(o)&&oo(r,o,e)}}function Er(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>Sr(c,e,i,!0))),Sr(c,t,i)):c=t,_(t)&&s.set(t,c),c}function Sr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Sr(e,s,n,!0),r&&r.forEach((t=>Sr(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=wr[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const wr={data:Ar,props:Or,emits:Or,methods:Nr,computed:Nr,beforeCreate:Tr,created:Tr,beforeMount:Tr,mounted:Tr,beforeUpdate:Tr,updated:Tr,beforeDestroy:Tr,beforeUnmount:Tr,destroyed:Tr,unmounted:Tr,activated:Tr,deactivated:Tr,errorCaptured:Tr,serverPrefetch:Tr,components:Nr,directives:Nr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=l(Object.create(null),e);for(const o in t)n[o]=Tr(e[o],t[o]);return n},provide:Ar,inject:function(e,t){return Nr(kr(e),kr(t))}};function Ar(e,t){return t?e?function(){return l(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function kr(e){if(f(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Tr(e,t){return e?[...new Set([].concat(e,t))]:t}function Nr(e,t){return e?l(Object.create(null),e,t):t}function Or(e,t){return e?f(e)&&f(t)?[...new Set([...e,...t])]:l(Object.create(null),hr(e),hr(null!=t?t:{})):t}function Lr(){return{app:null,config:{isNativeTag:r,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Fr=0;function Rr(e,t){return function(n,o=null){v(n)||(n=l({},n)),null==o||_(o)||(o=null);const r=Lr(),s=new WeakSet;let i=!1;const c=r.app={_uid:Fr++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Ci,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&v(e.install)?(s.add(e),e.install(c,...t)):v(e)&&(s.add(e),e(c,...t))),c),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),c),component:(e,t)=>t?(r.components[e]=t,c):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,c):r.directives[e],mount(s,l,a){if(!i){const u=Us(n,o);return u.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),l&&t?t(u,s):e(u,s,a),i=!0,c._container=s,s.__vue_app__=c,di(u.component)||u.component.proxy}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,c),runWithContext(e){Pr=c;try{return e()}finally{Pr=null}}};return c}}let Pr=null;function Ir(e,t){if(Zs){let n=Zs.provides;const o=Zs.parent&&Zs.parent.provides;o===n&&(n=Zs.provides=Object.create(o)),n[e]=t}else;}function Mr(e,t,n=!1){const o=Zs||Sn;if(o||Pr){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:Pr._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&v(t)?t.call(o&&o.proxy):t}}function Br(){return!!(Zs||Sn||Pr)}function Vr(e,n,o,r){const[s,i]=e.propsOptions;let l,c=!1;if(n)for(let t in n){if(w(t))continue;const a=n[t];let f;s&&u(s,f=T(t))?i&&i.includes(f)?(l||(l={}))[f]=a:o[f]=a:En(e.emitsOptions,t)||t in r&&a===r[t]||(r[t]=a,c=!0)}if(i){const n=wt(o),r=l||t;for(let t=0;t<i.length;t++){const l=i[t];o[l]=Ur(s,n,l,r[l],e,!u(r,l))}}return c}function Ur(e,t,n,o,r,s){const i=e[n];if(null!=i){const e=u(i,"default");if(e&&void 0===o){const e=i.default;if(i.type!==Function&&!i.skipFactory&&v(e)){const{propsDefaults:s}=r;if(n in s)o=s[n];else{const i=ni(r);o=s[n]=e.call(null,t),i()}}else o=e}i[0]&&(s&&!e?o=!1:!i[1]||""!==o&&o!==O(n)||(o=!0))}return o}function $r(e,o,r=!1){const s=o.propsCache,i=s.get(e);if(i)return i;const c=e.props,a={},p=[];let d=!1;if(!v(e)){const t=e=>{d=!0;const[t,n]=$r(e,o,!0);l(a,t),n&&p.push(...n)};!r&&o.mixins.length&&o.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!d)return _(e)&&s.set(e,n),n;if(f(c))for(let n=0;n<c.length;n++){const e=T(c[n]);jr(e)&&(a[e]=t)}else if(c)for(const t in c){const e=T(t);if(jr(e)){const n=c[t],o=a[e]=f(n)||v(n)?{type:n}:l({},n);if(o){const t=Wr(Boolean,o.type),n=Wr(String,o.type);o[0]=t>-1,o[1]=n<0||t<n,(t>-1||u(o,"default"))&&p.push(e)}}}const h=[a,p];return _(e)&&s.set(e,h),h}function jr(e){return"$"!==e[0]}function Dr(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function Hr(e,t){return Dr(e)===Dr(t)}function Wr(e,t){return f(t)?t.findIndex((t=>Hr(t,e))):v(t)&&Hr(t,e)?0:-1}const Kr=e=>"_"===e[0]||"$stable"===e,zr=e=>f(e)?e.map(Ks):[Ks(e)],Gr=(e,t,n)=>{if(t._n)return t;const o=On(((...e)=>zr(t(...e))),n);return o._c=!1,o},qr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Kr(r))continue;const n=e[r];if(v(n))t[r]=Gr(0,n,o);else if(null!=n){const e=zr(n);t[r]=()=>e}}},Jr=(e,t)=>{const n=zr(t);e.slots.default=()=>n},Xr=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=wt(t),I(t,"_",n)):qr(t,e.slots={})}else e.slots={},t&&Jr(e,t);I(e.slots,Is,1)},Yr=(e,n,o)=>{const{vnode:r,slots:s}=e;let i=!0,c=t;if(32&r.shapeFlag){const e=n._;e?o&&1===e?i=!1:(l(s,n),o||1!==e||delete s._):(i=!n.$stable,qr(n,s)),c=n}else n&&(Jr(e,n),c={default:1});if(i)for(const t in s)Kr(t)||null!=c[t]||delete s[t]};function Zr(e,n,o,r,s=!1){if(f(e))return void e.forEach(((e,t)=>Zr(e,n&&(f(n)?n[t]:n),o,r,s)));if(So(r)&&!s)return;const i=4&r.shapeFlag?di(r.component)||r.component.proxy:r.el,l=s?null:i,{i:a,r:p}=e,d=n&&n.r,h=a.refs===t?a.refs={}:a.refs,m=a.setupState;if(null!=d&&d!==p&&(g(d)?(h[d]=null,u(m,d)&&(m[d]=null)):Ft(d)&&(d.value=null)),v(p))Qt(p,a,12,[l,h]);else{const t=g(p),n=Ft(p),r=e.f;if(t||n){const a=()=>{if(r){const n=t?u(m,p)?m[p]:h[p]:p.value;s?f(n)&&c(n,i):f(n)?n.includes(i)||n.push(i):t?(h[p]=[i],u(m,p)&&(m[p]=h[p])):(p.value=[i],e.k&&(h[e.k]=p.value))}else t?(h[p]=l,u(m,p)&&(m[p]=l)):n&&(p.value=l,e.k&&(h[e.k]=l))};s||r?a():(a.id=-1,os(a,o))}}}let Qr=!1;const es=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,ts=e=>8===e.nodeType;function ns(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:i,parentNode:l,remove:c,insert:a,createComment:u}}=e,f=(n,o,s,c,u,y=!1)=>{const b=ts(n)&&"["===n.data,C=()=>v(n,o,s,c,u,b),{type:x,ref:E,shapeFlag:S,patchFlag:w}=o;let A=n.nodeType;o.el=n,-2===w&&(y=!1,o.dynamicChildren=null);let k=null;switch(x){case bs:3!==A?""===o.children?(a(o.el=r(""),l(n),n),k=n):k=C():(n.data!==o.children&&(Qr=!0,n.data=o.children),k=i(n));break;case Cs:_(n)?(k=i(n),m(o.el=n.content.firstChild,n,s)):k=8!==A||b?C():i(n);break;case xs:if(b&&(A=(n=i(n)).nodeType),1===A||3===A){k=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=1===k.nodeType?k.outerHTML:k.data),t===o.staticCount-1&&(o.anchor=k),k=i(k);return b?i(k):k}C();break;case ys:k=b?h(n,o,s,c,u,y):C();break;default:if(1&S)k=1===A&&o.type.toLowerCase()===n.tagName.toLowerCase()||_(n)?p(n,o,s,c,u,y):C();else if(6&S){o.slotScopeIds=u;const e=l(n);if(k=b?g(n):ts(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):i(n),t(o,e,null,s,c,es(e),y),So(o)){let t;b?(t=Us(ys),t.anchor=k?k.previousSibling:e.lastChild):t=3===n.nodeType?Ds(""):Us("div"),t.el=n,o.component.subTree=t}}else 64&S?k=8!==A?C():o.type.hydrate(n,o,s,c,u,y,e,d):128&S&&(k=o.type.hydrate(n,o,s,c,es(l(n)),u,y,e,f))}return null!=E&&Zr(E,null,c,o),k},p=(e,t,n,r,i,l)=>{l=l||!!t.dynamicChildren;const{type:a,props:u,patchFlag:f,shapeFlag:p,dirs:h,transition:v}=t,g="input"===a||"option"===a;if(g||-1!==f){h&&ao(t,null,n,"created");let a,y=!1;if(_(e)){y=as(r,v)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;y&&v.beforeEnter(o),m(o,e,n),t.el=e=o}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let o=d(e.firstChild,t,e,n,r,i,l);for(;o;){Qr=!0;const e=o;o=o.nextSibling,c(e)}}else 8&p&&e.textContent!==t.children&&(Qr=!0,e.textContent=t.children);if(u)if(g||!l||48&f)for(const t in u)(g&&(t.endsWith("value")||"indeterminate"===t)||s(t)&&!w(t)||"."===t[0])&&o(e,t,null,u[t],void 0,void 0,n);else u.onClick&&o(e,"onClick",null,u.onClick,void 0,void 0,n);(a=u&&u.onVnodeBeforeMount)&&Js(a,n,t),h&&ao(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||h||y)&&Jn((()=>{a&&Js(a,n,t),y&&v.enter(e),h&&ao(t,null,n,"mounted")}),r)}return e.nextSibling},d=(e,t,o,r,s,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let u=0;u<a;u++){const t=l?c[u]:c[u]=Ks(c[u]);if(e)e=f(e,t,r,s,i,l);else{if(t.type===bs&&!t.children)continue;Qr=!0,n(null,t,o,null,r,s,es(o),i)}}return e},h=(e,t,n,o,r,s)=>{const{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);const f=l(e),p=d(i(e),t,f,n,o,r,s);return p&&ts(p)&&"]"===p.data?i(t.anchor=p):(Qr=!0,a(t.anchor=u("]"),f,p),p)},v=(e,t,o,r,s,a)=>{if(Qr=!0,t.el=null,a){const t=g(e);for(;;){const n=i(e);if(!n||n===t)break;c(n)}}const u=i(e),f=l(e);return c(e),n(null,t,f,u,o,r,es(f),s),u},g=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=i(e))&&ts(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return i(e);o--}return e},m=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},_=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),mn(),void(t._vnode=e);Qr=!1,f(t.firstChild,e,null,null,null),mn(),t._vnode=e,Qr&&console.error("Hydration completed but contains mismatches.")},f]}const os=Jn;function rs(e){return is(e)}function ss(e){return is(e,ns)}function is(e,r){U().__VUE__=!0;const{insert:s,remove:i,patchProp:l,createElement:c,createText:a,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:v,setScopeId:g=o,insertStaticContent:m}=e,_=(e,t,n,o=null,r=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Rs(e,t)&&(o=Y(e),z(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:f}=t;switch(a){case bs:b(e,t,n,o);break;case Cs:C(e,t,n,o);break;case xs:null==e&&x(t,n,o,i);break;case ys:R(e,t,n,o,r,s,i,l,c);break;default:1&f?E(e,t,n,o,r,s,i,l,c):6&f?M(e,t,n,o,r,s,i,l,c):(64&f||128&f)&&a.process(e,t,n,o,r,s,i,l,c,ee)}null!=u&&r&&Zr(u,e&&e.ref,s,t||e,!t)},b=(e,t,n,o)=>{if(null==e)s(t.el=a(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},C=(e,t,n,o)=>{null==e?s(t.el=f(t.children||""),n,o):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=m(e.children,t,n,o,e.el,e.anchor)},E=(e,t,n,o,r,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?S(t,n,o,r,s,i,l,c):N(e,t,r,s,i,l,c)},S=(e,t,n,o,r,i,a,u)=>{let f,p;const{props:h,shapeFlag:v,transition:g,dirs:m}=e;if(f=e.el=c(e.type,i,h&&h.is,h),8&v?d(f,e.children):16&v&&k(e.children,f,null,o,r,ls(e,i),a,u),m&&ao(e,null,o,"created"),A(f,e,e.scopeId,a,o),h){for(const t in h)"value"===t||w(t)||l(f,t,null,h[t],i,e.children,o,r,X);"value"in h&&l(f,"value",null,h.value,i),(p=h.onVnodeBeforeMount)&&Js(p,o,e)}m&&ao(e,null,o,"beforeMount");const _=as(r,g);_&&g.beforeEnter(f),s(f,t,n),((p=h&&h.onVnodeMounted)||_||m)&&os((()=>{p&&Js(p,o,e),_&&g.enter(f),m&&ao(e,null,o,"mounted")}),r)},A=(e,t,n,o,r)=>{if(n&&g(e,n),o)for(let s=0;s<o.length;s++)g(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;A(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},k=(e,t,n,o,r,s,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?zs(e[a]):Ks(e[a]);_(null,c,t,n,o,r,s,i,l)}},N=(e,n,o,r,s,i,c)=>{const a=n.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=n;u|=16&e.patchFlag;const h=e.props||t,v=n.props||t;let g;if(o&&cs(o,!1),(g=v.onVnodeBeforeUpdate)&&Js(g,o,n,e),p&&ao(n,e,o,"beforeUpdate"),o&&cs(o,!0),f?L(e.dynamicChildren,f,a,o,r,ls(n,s),i):c||D(e,n,a,null,o,r,ls(n,s),i,!1),u>0){if(16&u)F(a,n,h,v,o,r,s);else if(2&u&&h.class!==v.class&&l(a,"class",null,v.class,s),4&u&&l(a,"style",h.style,v.style,s),8&u){const t=n.dynamicProps;for(let n=0;n<t.length;n++){const i=t[n],c=h[i],u=v[i];u===c&&"value"!==i||l(a,i,c,u,s,e.children,o,r,X)}}1&u&&e.children!==n.children&&d(a,n.children)}else c||null!=f||F(a,n,h,v,o,r,s);((g=v.onVnodeUpdated)||p)&&os((()=>{g&&Js(g,o,n,e),p&&ao(n,e,o,"updated")}),r)},L=(e,t,n,o,r,s,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],u=c.el&&(c.type===ys||!Rs(c,a)||70&c.shapeFlag)?h(c.el):n;_(c,a,u,null,o,r,s,i,!0)}},F=(e,n,o,r,s,i,c)=>{if(o!==r){if(o!==t)for(const t in o)w(t)||t in r||l(e,t,o[t],null,c,n.children,s,i,X);for(const t in r){if(w(t))continue;const a=r[t],u=o[t];a!==u&&"value"!==t&&l(e,t,u,a,c,n.children,s,i,X)}"value"in r&&l(e,"value",o.value,r.value,c)}},R=(e,t,n,o,r,i,l,c,u)=>{const f=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:v}=t;v&&(c=c?c.concat(v):v),null==e?(s(f,n,o),s(p,n,o),k(t.children||[],n,p,r,i,l,c,u)):d>0&&64&d&&h&&e.dynamicChildren?(L(e.dynamicChildren,h,n,r,i,l,c),(null!=t.key||r&&t===r.subTree)&&us(e,t,!0)):D(e,t,n,p,r,i,l,c,u)},M=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):B(t,n,o,r,s,i,c):V(e,t,c)},B=(e,n,o,r,s,i,l)=>{const c=e.component=function(e,n,o){const r=e.type,s=(n?n.appContext:e.appContext)||Xs,i={uid:Ys++,vnode:e,type:r,parent:n,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new oe(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:$r(r,s),emitsOptions:xn(r,s),emit:null,emitted:null,propsDefaults:t,inheritAttrs:r.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=n?n.root:i,i.emit=Cn.bind(null,i),e.ce&&e.ce(i);return i}(e,r,s);if(ko(e)&&(c.ctx.renderer=ee),function(e,t=!1){t&&ti(t);const{props:n,children:o}=e.vnode,r=ri(e);(function(e,t,n,o=!1){const r={},s={};I(s,Is,1),e.propsDefaults=Object.create(null),Vr(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);e.props=n?o?r:mt(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),Xr(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=At(new Proxy(e.ctx,nr));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?pi(e):null,r=ni(e);_e();const s=Qt(o,e,0,[e.props,n]);if(ye(),r(),y(s)){if(s.then(oi,oi),t)return s.then((n=>{ci(e,n,t)})).catch((t=>{tn(t,e,0)}));e.asyncDep=s}else ci(e,s,t)}else fi(e,t)}(e,t):void 0;t&&ti(!1)}(c),c.asyncDep){if(s&&s.registerDep(c,$),!e.el){const e=c.subTree=Us(Cs);C(null,e,n,o)}}else $(c,e,n,o,s,i,l)},V=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||Pn(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?Pn(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==o[n]&&!En(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void j(o,t,n);o.next=t,function(e){const t=rn.indexOf(e);t>sn&&rn.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},$=(e,t,n,r,s,i,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:r,vnode:a}=e;{const n=fs(e);if(n)return t&&(t.el=a.el,j(e,t,l)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,f=t;cs(e,!1),t?(t.el=a.el,j(e,t,l)):t=a,n&&P(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Js(u,r,t,a),cs(e,!0);const p=Ln(e),d=e.subTree;e.subTree=p,_(d,p,h(d.el),Y(d),e,s,i),t.el=p.el,null===f&&In(e,p.el),o&&os(o,s),(u=t.props&&t.props.onVnodeUpdated)&&os((()=>Js(u,r,t,a)),s)}else{let o;const{el:l,props:c}=t,{bm:a,m:u,parent:f}=e,p=So(t);if(cs(e,!1),a&&P(a),!p&&(o=c&&c.onVnodeBeforeMount)&&Js(o,f,t),cs(e,!0),l&&ne){const n=()=>{e.subTree=Ln(e),ne(l,e.subTree,e,s,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const o=e.subTree=Ln(e);_(null,o,n,r,e,s,i),t.el=o.el}if(u&&os(u,s),!p&&(o=c&&c.onVnodeMounted)){const e=t;os((()=>Js(o,f,e)),s)}(256&t.shapeFlag||f&&So(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&os(e.a,s),e.isMounted=!0,t=n=r=null}},a=e.effect=new ce(c,o,(()=>dn(u)),e.scope),u=e.update=()=>{a.dirty&&a.run()};u.id=e.uid,cs(e,!0),u()},j=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=wt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;Vr(e,t,r,s)&&(a=!0);for(const s in l)t&&(u(t,s)||(o=O(s))!==s&&u(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Ur(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&u(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let i=n[o];if(En(e.emitsOptions,i))continue;const f=t[i];if(c)if(u(s,i))f!==s[i]&&(s[i]=f,a=!0);else{const t=T(i);r[t]=Ur(c,l,t,f,e,!1)}else f!==s[i]&&(s[i]=f,a=!0)}}a&&Le(e,"set","$attrs")}(e,t.props,o,n),Yr(e,t.children,n),_e(),gn(e),ye()},D=(e,t,n,o,r,s,i,l,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void W(a,f,n,o,r,s,i,l,c);if(256&p)return void H(a,f,n,o,r,s,i,l,c)}8&h?(16&u&&X(a,r,s),f!==a&&d(n,f)):16&u?16&h?W(a,f,n,o,r,s,i,l,c):X(a,r,s,!0):(8&u&&d(n,""),16&h&&k(f,n,o,r,s,i,l,c))},H=(e,t,o,r,s,i,l,c,a)=>{const u=(e=e||n).length,f=(t=t||n).length,p=Math.min(u,f);let d;for(d=0;d<p;d++){const n=t[d]=a?zs(t[d]):Ks(t[d]);_(e[d],n,o,null,s,i,l,c,a)}u>f?X(e,s,i,!0,!1,p):k(t,o,r,s,i,l,c,a,p)},W=(e,t,o,r,s,i,l,c,a)=>{let u=0;const f=t.length;let p=e.length-1,d=f-1;for(;u<=p&&u<=d;){const n=e[u],r=t[u]=a?zs(t[u]):Ks(t[u]);if(!Rs(n,r))break;_(n,r,o,null,s,i,l,c,a),u++}for(;u<=p&&u<=d;){const n=e[p],r=t[d]=a?zs(t[d]):Ks(t[d]);if(!Rs(n,r))break;_(n,r,o,null,s,i,l,c,a),p--,d--}if(u>p){if(u<=d){const e=d+1,n=e<f?t[e].el:r;for(;u<=d;)_(null,t[u]=a?zs(t[u]):Ks(t[u]),o,n,s,i,l,c,a),u++}}else if(u>d)for(;u<=p;)z(e[u],s,i,!0),u++;else{const h=u,v=u,g=new Map;for(u=v;u<=d;u++){const e=t[u]=a?zs(t[u]):Ks(t[u]);null!=e.key&&g.set(e.key,u)}let m,y=0;const b=d-v+1;let C=!1,x=0;const E=new Array(b);for(u=0;u<b;u++)E[u]=0;for(u=h;u<=p;u++){const n=e[u];if(y>=b){z(n,s,i,!0);continue}let r;if(null!=n.key)r=g.get(n.key);else for(m=v;m<=d;m++)if(0===E[m-v]&&Rs(n,t[m])){r=m;break}void 0===r?z(n,s,i,!0):(E[r-v]=u+1,r>=x?x=r:C=!0,_(n,t[r],o,null,s,i,l,c,a),y++)}const S=C?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(E):n;for(m=S.length-1,u=b-1;u>=0;u--){const e=v+u,n=t[e],p=e+1<f?t[e+1].el:r;0===E[u]?_(null,n,o,p,s,i,l,c,a):C&&(m<0||u!==S[m]?K(n,o,p,2):m--)}}},K=(e,t,n,o,r=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void K(e.component.subTree,t,n,o);if(128&u)return void e.suspense.move(t,n,o);if(64&u)return void l.move(e,t,n,ee);if(l===ys){s(i,t,n);for(let e=0;e<a.length;e++)K(a[e],t,n,o);return void s(e.anchor,t,n)}if(l===xs)return void(({el:e,anchor:t},n,o)=>{let r;for(;e&&e!==t;)r=v(e),s(e,n,o),e=r;s(t,n,o)})(e,t,n);if(2!==o&&1&u&&c)if(0===o)c.beforeEnter(i),s(i,t,n),os((()=>c.enter(i)),r);else{const{leave:e,delayLeave:o,afterLeave:r}=c,l=()=>s(i,t,n),a=()=>{e(i,(()=>{l(),r&&r()}))};o?o(i,l,a):a()}else s(i,t,n)},z=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:f,dirs:p}=e;if(null!=l&&Zr(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&p,h=!So(e);let v;if(h&&(v=i&&i.onVnodeBeforeUnmount)&&Js(v,t,e),6&u)J(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&ao(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ee,o):a&&(s!==ys||f>0&&64&f)?X(a,t,n,!1,!0):(s===ys&&384&f||!r&&16&u)&&X(c,t,n),o&&G(e)}(h&&(v=i&&i.onVnodeUnmounted)||d)&&os((()=>{v&&Js(v,t,e),d&&ao(e,null,t,"unmounted")}),n)},G=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===ys)return void q(n,o);if(t===xs)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=v(e),i(e),e=n;i(t)})(e);const s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,i=()=>t(n,s);o?o(e.el,s,i):i()}else s()},q=(e,t)=>{let n;for(;e!==t;)n=v(e),i(e),e=n;i(t)},J=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&P(o),r.stop(),s&&(s.active=!1,z(i,e,t,n)),l&&os(l,t),os((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i<e.length;i++)z(e[i],t,n,o,r)},Y=e=>6&e.shapeFlag?Y(e.component.subTree):128&e.shapeFlag?e.suspense.next():v(e.anchor||e.el);let Z=!1;const Q=(e,t,n)=>{null==e?t._vnode&&z(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,gn(),mn(),Z=!1),t._vnode=e},ee={p:_,um:z,m:K,r:G,mt:B,mc:k,pc:D,pbc:L,n:Y,o:e};let te,ne;return r&&([te,ne]=r(ee)),{render:Q,hydrate:te,createApp:Rr(Q,te)}}function ls({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function cs({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function as(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function us(e,t,n=!1){const o=e.children,r=t.children;if(f(o)&&f(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=zs(r[s]),t.el=e.el),n||us(e,t)),t.type===bs&&(t.el=e.el)}}function fs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fs(t)}const ps=e=>e&&(e.disabled||""===e.disabled),ds=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,hs=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,vs=(e,t)=>{const n=e&&e.to;if(g(n)){if(t){return t(n)}return null}return n};function gs(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,f=2===s;if(f&&o(i,t,n),(!f||ps(u))&&16&c)for(let p=0;p<a.length;p++)r(a[p],t,n,2);f&&o(l,t,n)}const ms={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,s,i,l,c,a){const{mc:u,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:v}}=a,g=ps(t.props);let{shapeFlag:m,children:_,dynamicChildren:y}=t;if(null==e){const e=t.el=v(""),a=t.anchor=v("");d(e,n,o),d(a,n,o);const f=t.target=vs(t.props,h),p=t.targetAnchor=v("");f&&(d(p,f),"svg"===i||ds(f)?i="svg":("mathml"===i||hs(f))&&(i="mathml"));const y=(e,t)=>{16&m&&u(_,e,t,r,s,i,l,c)};g?y(n,a):f&&y(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,v=ps(e.props),m=v?n:u,_=v?o:d;if("svg"===i||ds(u)?i="svg":("mathml"===i||hs(u))&&(i="mathml"),y?(p(e.dynamicChildren,y,m,r,s,i,l),us(e,t,!0)):c||f(e,t,m,_,r,s,i,l,!1),g)v?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):gs(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=vs(t.props,h);e&&gs(t,e,null,a,0)}else v&&gs(t,u,d,a,1)}_s(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:f,props:p}=e;if(f&&s(u),i&&s(a),16&l){const e=i||!ps(p);for(let o=0;o<c.length;o++){const s=c[o];r(s,t,n,e,!!s.dynamicChildren)}}},move:gs,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=vs(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(ps(t.props))t.anchor=a(i(e),t,l(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=i(e);let l=c;for(;l;)if(l=i(l),l&&8===l.nodeType&&"teleport anchor"===l.data){t.targetAnchor=l,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(c,t,u,n,o,r,s)}_s(t)}return t.anchor&&i(t.anchor)}};function _s(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const ys=Symbol.for("v-fgt"),bs=Symbol.for("v-txt"),Cs=Symbol.for("v-cmt"),xs=Symbol.for("v-stc"),Es=[];let Ss=null;function ws(e=!1){Es.push(Ss=e?null:[])}function As(){Es.pop(),Ss=Es[Es.length-1]||null}let ks=1;function Ts(e){ks+=e}function Ns(e){return e.dynamicChildren=ks>0?Ss||n:null,As(),ks>0&&Ss&&Ss.push(e),e}function Os(e,t,n,o,r,s){return Ns(Vs(e,t,n,o,r,s,!0))}function Ls(e,t,n,o,r){return Ns(Us(e,t,n,o,r,!0))}function Fs(e){return!!e&&!0===e.__v_isVNode}function Rs(e,t){return e.type===t.type&&e.key===t.key}function Ps(e){}const Is="__vInternal",Ms=({key:e})=>null!=e?e:null,Bs=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?g(e)||Ft(e)||v(e)?{i:Sn,r:e,k:t,f:!!n}:e:null);function Vs(e,t=null,n=null,o=0,r=null,s=(e===ys?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ms(t),ref:t&&Bs(t),scopeId:wn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Sn};return l?(Gs(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),ks>0&&!i&&Ss&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Ss.push(c),c}const Us=function(e,t=null,n=null,o=0,r=null,s=!1){e&&e!==Vn||(e=Cs);if(Fs(e)){const o=js(e,t,!0);return n&&Gs(o,n),ks>0&&!s&&Ss&&(6&o.shapeFlag?Ss[Ss.indexOf(e)]=o:Ss.push(o)),o.patchFlag|=-2,o}i=e,v(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=$s(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=z(e)),_(n)&&(St(n)&&!f(n)&&(n=l({},n)),t.style=j(n))}const c=g(e)?1:Hn(e)?128:(e=>e.__isTeleport)(e)?64:_(e)?4:v(e)?2:0;return Vs(e,t,n,o,r,c,s,!0)};function $s(e){return e?St(e)||Is in e?l({},e):e:null}function js(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?qs(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ms(l),ref:t&&t.ref?n&&r?f(r)?r.concat(Bs(t)):[r,Bs(t)]:Bs(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ys?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&js(e.ssContent),ssFallback:e.ssFallback&&js(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Ds(e=" ",t=0){return Us(bs,null,e,t)}function Hs(e,t){const n=Us(xs,null,e);return n.staticCount=t,n}function Ws(e="",t=!1){return t?(ws(),Ls(Cs,null,e)):Us(Cs,null,e)}function Ks(e){return null==e||"boolean"==typeof e?Us(Cs):f(e)?Us(ys,null,e.slice()):"object"==typeof e?zs(e):Us(bs,null,String(e))}function zs(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:js(e)}function Gs(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Gs(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Is in t?3===o&&Sn&&(1===Sn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Sn}}else v(t)?(t={default:t,_ctx:Sn},n=32):(t=String(t),64&o?(n=16,t=[Ds(t)]):n=8);e.children=t,e.shapeFlag|=n}function qs(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=z([t.class,o.class]));else if("style"===e)t.style=j([t.style,o.style]);else if(s(e)){const n=t[e],r=o[e];!r||n===r||f(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function Js(e,t,n,o=null){en(e,t,7,[n,o])}const Xs=Lr();let Ys=0;let Zs=null;const Qs=()=>Zs||Sn;let ei,ti;ei=e=>{Zs=e},ti=e=>{li=e};const ni=e=>{const t=Zs;return ei(e),e.scope.on(),()=>{e.scope.off(),ei(t)}},oi=()=>{Zs&&Zs.scope.off(),ei(null)};function ri(e){return 4&e.vnode.shapeFlag}let si,ii,li=!1;function ci(e,t,n){v(t)?e.render=t:_(t)&&(e.setupState=jt(t)),fi(e,n)}function ai(e){si=e,ii=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,or))}}const ui=()=>!si;function fi(e,t,n){const r=e.type;if(!e.render){if(!t&&si&&!r.render){const t=r.template||Er(e).template;if(t){const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:i}=r,c=l(l({isCustomElement:n,delimiters:s},o),i);r.render=si(t,c)}}e.render=r.render||o,ii&&ii(e)}{const t=ni(e);_e();try{br(e)}finally{ye(),t()}}}function pi(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(Oe(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function di(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(jt(At(e.exposed)),{get:(t,n)=>n in t?t[n]:n in er?er[n](e):void 0,has:(e,t)=>t in e||t in er}))}function hi(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}const vi=(e,t)=>function(e,t,n=!1){let r,s;const i=v(e);return i?(r=e,s=o):(r=e.get,s=e.set),new Nt(r,s,i||!s,n)}(e,0,li);function gi(e,n,o=t){const r=Qs(),s=T(n),i=O(n),l=Ht(((t,l)=>{let c;return to((()=>{const t=e[n];R(c,t)&&(c=t,l())})),{get:()=>(t(),o.get?o.get(c):c),set(e){const t=r.vnode.props;t&&(n in t||s in t||i in t)&&(`onUpdate:${n}`in t||`onUpdate:${s}`in t||`onUpdate:${i}`in t)||!R(e,c)||(c=e,l()),r.emit(`update:${n}`,o.set?o.set(e):e)}}})),c="modelValue"===n?"modelModifiers":`${n}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l}function mi(e,t,n){const o=arguments.length;return 2===o?_(t)&&!f(t)?Fs(t)?Us(e,null,[t]):Us(e,t):Us(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Fs(n)&&(n=[n]),Us(e,t,n))}function _i(){}function yi(e,t,n,o){const r=n[o];if(r&&bi(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function bi(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(R(n[o],t[o]))return!1;return ks>0&&Ss&&Ss.push(e),!0}const Ci="3.4.15",xi=o,Ei=null,Si=void 0,wi=o,Ai=null,ki=null,Ti=null,Ni=null,Oi="undefined"!=typeof document?document:null,Li=Oi&&Oi.createElement("template"),Fi={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?Oi.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Oi.createElementNS("http://www.w3.org/1998/Math/MathML",e):Oi.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>Oi.createTextNode(e),createComment:e=>Oi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{Li.innerHTML="svg"===o?`<svg>${e}</svg>`:"mathml"===o?`<math>${e}</math>`:e;const r=Li.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ri="transition",Pi="animation",Ii=Symbol("_vtc"),Mi=(e,{slots:t})=>mi(go,ji(e),t);Mi.displayName="Transition";const Bi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Vi=Mi.props=l({},vo,Bi),Ui=(e,t=[])=>{f(e)?e.forEach((e=>e(...t))):e&&e(...t)},$i=e=>!!e&&(f(e)?e.some((e=>e.length>1)):e.length>1);function ji(e){const t={};for(const l in e)l in Bi||(t[l]=e[l]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=i,appearToClass:f=c,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,v=function(e){if(null==e)return null;if(_(e))return[Di(e.enter),Di(e.leave)];{const t=Di(e);return[t,t]}}(r),g=v&&v[0],m=v&&v[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:C,onLeave:x,onLeaveCancelled:E,onBeforeAppear:S=y,onAppear:w=b,onAppearCancelled:A=C}=t,k=(e,t,n)=>{Wi(e,t?f:c),Wi(e,t?u:i),n&&n()},T=(e,t)=>{e._isLeaving=!1,Wi(e,p),Wi(e,h),Wi(e,d),t&&t()},N=e=>(t,n)=>{const r=e?w:b,i=()=>k(t,e,n);Ui(r,[t,i]),Ki((()=>{Wi(t,e?a:s),Hi(t,e?f:c),$i(r)||Gi(t,o,g,i)}))};return l(t,{onBeforeEnter(e){Ui(y,[e]),Hi(e,s),Hi(e,i)},onBeforeAppear(e){Ui(S,[e]),Hi(e,a),Hi(e,u)},onEnter:N(!1),onAppear:N(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>T(e,t);Hi(e,p),Yi(),Hi(e,d),Ki((()=>{e._isLeaving&&(Wi(e,p),Hi(e,h),$i(x)||Gi(e,o,m,n))})),Ui(x,[e,n])},onEnterCancelled(e){k(e,!1),Ui(C,[e])},onAppearCancelled(e){k(e,!0),Ui(A,[e])},onLeaveCancelled(e){T(e),Ui(E,[e])}})}function Di(e){return B(e)}function Hi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Ii]||(e[Ii]=new Set)).add(t)}function Wi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Ii];n&&(n.delete(t),n.size||(e[Ii]=void 0))}function Ki(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let zi=0;function Gi(e,t,n,o){const r=e._endId=++zi,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=qi(e,t);if(!i)return o();const a=i+"end";let u=0;const f=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&f()};setTimeout((()=>{u<c&&f()}),l+1),e.addEventListener(a,p)}function qi(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o(`${Ri}Delay`),s=o(`${Ri}Duration`),i=Ji(r,s),l=o(`${Pi}Delay`),c=o(`${Pi}Duration`),a=Ji(l,c);let u=null,f=0,p=0;t===Ri?i>0&&(u=Ri,f=i,p=s.length):t===Pi?a>0&&(u=Pi,f=a,p=c.length):(f=Math.max(i,a),u=f>0?i>a?Ri:Pi:null,p=u?u===Ri?s.length:c.length:0);return{type:u,timeout:f,propCount:p,hasTransform:u===Ri&&/\b(transform|all)(,|$)/.test(o(`${Ri}Property`).toString())}}function Ji(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Xi(t)+Xi(e[n]))))}function Xi(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Yi(){return document.body.offsetHeight}const Zi=Symbol("_vod"),Qi={beforeMount(e,{value:t},{transition:n}){e[Zi]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):el(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),el(e,!0),o.enter(e)):o.leave(e,(()=>{el(e,!1)})):el(e,t))},beforeUnmount(e,{value:t}){el(e,t)}};function el(e,t){e.style.display=t?e[Zi]:"none"}const tl=Symbol("");function nl(e){const t=Qs();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>rl(e,n)))},o=()=>{const o=e(t.proxy);ol(t.subTree,o),n(o)};eo(o),Uo((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),Ho((()=>e.disconnect()))}))}function ol(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{ol(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)rl(e.el,t);else if(e.type===ys)e.children.forEach((e=>ol(e,t)));else if(e.type===xs){let{el:n,anchor:o}=e;for(;n&&(rl(n,t),n!==o);)n=n.nextSibling}}function rl(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t)n.setProperty(`--${e}`,t[e]),o+=`--${e}: ${t[e]};`;n[tl]=o}}const sl=/\s*!important$/;function il(e,t,n){if(f(n))n.forEach((n=>il(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=cl[t];if(n)return n;let o=T(t);if("filter"!==o&&o in e)return cl[t]=o;o=L(o);for(let r=0;r<ll.length;r++){const n=ll[r]+o;if(n in e)return cl[t]=n}return t}(e,t);sl.test(n)?e.setProperty(O(o),n.replace(sl,""),"important"):e[o]=n}}const ll=["Webkit","Moz","ms"],cl={};const al="http://www.w3.org/1999/xlink";function ul(e,t,n,o){e.addEventListener(t,n,o)}const fl=Symbol("_vei");function pl(e,t,n,o,r=null){const s=e[fl]||(e[fl]={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(dl.test(e)){let n;for(t={};n=e.match(dl);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):O(e.slice(2));return[n,t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();en(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=gl(),n}(o,r);ul(e,n,i,l)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}const dl=/(?:Once|Passive|Capture)$/;let hl=0;const vl=Promise.resolve(),gl=()=>hl||(vl.then((()=>hl=0)),hl=Date.now());const ml=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123; +/*! #__NO_SIDE_EFFECTS__ */ +function _l(e,t){const n=Eo(e);class o extends Cl{constructor(e){super(n,e,t)}}return o.def=n,o} +/*! #__NO_SIDE_EFFECTS__ */const yl=e=>_l(e,oc),bl="undefined"!=typeof HTMLElement?HTMLElement:class{};class Cl extends bl{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),pn((()=>{this._connected||(nc(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:o}=e;let r;if(n&&!f(n))for(const s in n){const e=n[s];(e===Number||e&&e.type===Number)&&(s in this._props&&(this._props[s]=B(this._props[s])),(r||(r=Object.create(null)))[T(s)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=f(t)?t:Object.keys(t||{});for(const o of Object.keys(this))"_"!==o[0]&&n.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of n.map(T))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(e){this._setProp(o,e)}})}_setAttr(e){let t=this.getAttribute(e);const n=T(e);this._numberProps&&this._numberProps[n]&&(t=B(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(O(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(O(e),t+""):t||this.removeAttribute(O(e))))}_update(){nc(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Us(this._def,l({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),O(e)!==e&&t(O(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof Cl){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function xl(e="$style"){{const n=Qs();if(!n)return t;const o=n.type.__cssModules;if(!o)return t;const r=o[e];return r||t}}const El=new WeakMap,Sl=new WeakMap,wl=Symbol("_moveCb"),Al=Symbol("_enterCb"),kl={name:"TransitionGroup",props:l({},Vi,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Qs(),o=po();let r,s;return jo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),r=e[Ii];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=qi(o);return s.removeChild(o),i}(r[0].el,n.vnode.el,t))return;r.forEach(Nl),r.forEach(Ol);const o=r.filter(Ll);Yi(),o.forEach((e=>{const n=e.el,o=n.style;Hi(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n[wl]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[wl]=null,Wi(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=wt(e),l=ji(i);let c=i.tag||ys;r=s,s=t.default?xo(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&Co(t,_o(t,l,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];Co(t,_o(t,l,o,n)),El.set(t,t.el.getBoundingClientRect())}return Us(c,null,s)}}},Tl=kl;function Nl(e){const t=e.el;t[wl]&&t[wl](),t[Al]&&t[Al]()}function Ol(e){Sl.set(e,e.el.getBoundingClientRect())}function Ll(e){const t=El.get(e),n=Sl.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const Fl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>P(t,e):t};function Rl(e){e.target.composing=!0}function Pl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Il=Symbol("_assign"),Ml={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Il]=Fl(r);const s=o||r.props&&"number"===r.props.type;ul(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=M(o)),e[Il](o)})),n&&ul(e,"change",(()=>{e.value=e.value.trim()})),t||(ul(e,"compositionstart",Rl),ul(e,"compositionend",Pl),ul(e,"change",Pl))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e[Il]=Fl(s),e.composing)return;const i=null==t?"":t;if((r||"number"===e.type?M(e.value):e.value)!==i){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===i)return}e.value=i}}},Bl={deep:!0,created(e,t,n){e[Il]=Fl(n),ul(e,"change",(()=>{const t=e._modelValue,n=Dl(e),o=e.checked,r=e[Il];if(f(t)){const e=Y(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(d(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Hl(e,o))}))},mounted:Vl,beforeUpdate(e,t,n){e[Il]=Fl(n),Vl(e,t,n)}};function Vl(e,{value:t,oldValue:n},o){e._modelValue=t,f(t)?e.checked=Y(t,o.props.value)>-1:d(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=X(t,Hl(e,!0)))}const Ul={created(e,{value:t},n){e.checked=X(t,n.props.value),e[Il]=Fl(n),ul(e,"change",(()=>{e[Il](Dl(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[Il]=Fl(o),t!==n&&(e.checked=X(t,o.props.value))}},$l={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=d(t);ul(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?M(Dl(e)):Dl(e)));e[Il](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,pn((()=>{e._assigning=!1}))})),e[Il]=Fl(o)},mounted(e,{value:t,oldValue:n,modifiers:{number:o}}){jl(e,t,n,o)},beforeUpdate(e,t,n){e[Il]=Fl(n)},updated(e,{value:t,oldValue:n,modifiers:{number:o}}){e._assigning||jl(e,t,n,o)}};function jl(e,t,n,o){const r=e.multiple,s=f(t);if((!r||s||d(t))&&(!s||!X(t,n))){for(let n=0,i=e.options.length;n<i;n++){const i=e.options[n],l=Dl(i);if(r)if(s){const e=typeof l;i.selected="string"===e||"number"===e?t.includes(o?M(l):l):Y(t,l)>-1}else i.selected=t.has(l);else if(X(Dl(i),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}r||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Dl(e){return"_value"in e?e._value:e.value}function Hl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Wl={created(e,t,n){Kl(e,t,n,null,"created")},mounted(e,t,n){Kl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Kl(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Kl(e,t,n,o,"updated")}};function Kl(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return $l;case"TEXTAREA":return Ml;default:switch(t){case"checkbox":return Bl;case"radio":return Ul;default:return Ml}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const zl=["ctrl","shift","alt","meta"],Gl={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>zl.some((n=>e[`${n}Key`]&&!t.includes(n)))},ql=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e<t.length;e++){const o=Gl[t[e]];if(o&&o(n,t))return}return e(n,...o)})},Jl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Xl=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=O(n.key);return t.some((e=>e===o||Jl[e]===o))?e(n):void 0})},Yl=l({patchProp:(e,t,n,o,r,l,c,a,u)=>{const f="svg"===r;"class"===t?function(e,t,n){const o=e[Ii];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,f):"style"===t?function(e,t,n){const o=e.style,r=o.display,s=g(n);if(n&&!s){if(t&&!g(t))for(const e in t)null==n[e]&&il(o,e,"");for(const e in n)il(o,e,n[e])}else if(s){if(t!==n){const e=o[tl];e&&(n+=";"+e),o.cssText=n}}else t&&e.removeAttribute("style");Zi in e&&(o.display=r)}(e,n,o):s(t)?i(t)||pl(e,t,0,o,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&ml(t)&&v(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(ml(t)&&g(n))return!1;return t in e}(e,t,o,f))?function(e,t,n,o,r,s,i){if("innerHTML"===t||"textContent"===t)return o&&i(o,r,s),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=n;const o=null==n?"":n;return("OPTION"===l?e.getAttribute("value"):e.value)!==o&&(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=J(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,o,l,c,a,u):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o,r){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(al,t.slice(6,t.length)):e.setAttributeNS(al,t,n);else{const o=q(t);null==n||o&&!J(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,f))}},Fi);let Zl,Ql=!1;function ec(){return Zl||(Zl=rs(Yl))}function tc(){return Zl=Ql?Zl:ss(Yl),Ql=!0,Zl}const nc=(...e)=>{ec().render(...e)},oc=(...e)=>{tc().hydrate(...e)},rc=(...e)=>{const t=ec().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=lc(e);if(!o)return;const r=t._component;v(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,ic(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},sc=(...e)=>{const t=tc().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=lc(e);if(t)return n(t,!0,ic(t))},t};function ic(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function lc(e){if(g(e)){return document.querySelector(e)}return e}const cc=o,ac=()=>{};export{go as BaseTransition,vo as BaseTransitionPropsValidators,Cs as Comment,Ni as DeprecationTypes,oe as EffectScope,Zt as ErrorCodes,Ei as ErrorTypeStrings,ys as Fragment,To as KeepAlive,ce as ReactiveEffect,xs as Static,Kn as Suspense,ms as Teleport,bs as Text,Jt as TrackOpTypes,Mi as Transition,Tl as TransitionGroup,Xt as TriggerOpTypes,Cl as VueElement,Yt as assertNumber,en as callWithAsyncErrorHandling,Qt as callWithErrorHandling,T as camelize,L as capitalize,js as cloneVNode,Ti as compatUtils,ac as compile,vi as computed,rc as createApp,Ls as createBlock,Ws as createCommentVNode,Os as createElementBlock,Vs as createElementVNode,ss as createHydrationRenderer,mr as createPropsRestProxy,rs as createRenderer,sc as createSSRApp,Jo as createSlots,Hs as createStaticVNode,Ds as createTextVNode,Us as createVNode,Ht as customRef,wo as defineAsyncComponent,Eo as defineComponent,_l as defineCustomElement,sr as defineEmits,ir as defineExpose,ar as defineModel,lr as defineOptions,rr as defineProps,yl as defineSSRCustomElement,cr as defineSlots,Si as devtools,de as effect,re as effectScope,Qs as getCurrentInstance,ie as getCurrentScope,xo as getTransitionRawChildren,$s as guardReactiveProps,mi as h,tn as handleError,Br as hasInjectionContext,oc as hydrate,_i as initCustomFormatter,cc as initDirectivesForSSR,Mr as inject,bi as isMemoSame,St as isProxy,Ct as isReactive,xt as isReadonly,Ft as isRef,ui as isRuntimeOnly,Et as isShallow,Fs as isVNode,At as markRaw,vr as mergeDefaults,gr as mergeModels,qs as mergeProps,pn as nextTick,z as normalizeClass,G as normalizeProps,j as normalizeStyle,Oo as onActivated,Vo as onBeforeMount,Do as onBeforeUnmount,$o as onBeforeUpdate,Lo as onDeactivated,Go as onErrorCaptured,Uo as onMounted,zo as onRenderTracked,Ko as onRenderTriggered,le as onScopeDispose,Wo as onServerPrefetch,Ho as onUnmounted,jo as onUpdated,ws as openBlock,Tn as popScopeId,Ir as provide,jt as proxyRefs,kn as pushScopeId,vn as queuePostFlushCb,gt as reactive,_t as readonly,Rt as ref,ai as registerRuntimeCompiler,nc as render,qo as renderList,Xo as renderSlot,Bn as resolveComponent,$n as resolveDirective,Un as resolveDynamicComponent,ki as resolveFilter,_o as resolveTransitionHooks,Ts as setBlockTracking,wi as setDevtoolsHook,Co as setTransitionHooks,mt as shallowReactive,yt as shallowReadonly,Pt as shallowRef,Yn as ssrContextKey,Ai as ssrUtils,he as stop,Z as toDisplayString,F as toHandlerKey,Zo as toHandlers,wt as toRaw,Gt as toRef,Wt as toRefs,Ut as toValue,Ps as transformVNodeArgs,Bt as triggerRef,Vt as unref,pr as useAttrs,xl as useCssModule,nl as useCssVars,gi as useModel,Zn as useSSRContext,fr as useSlots,po as useTransitionState,Bl as vModelCheckbox,Wl as vModelDynamic,Ul as vModelRadio,$l as vModelSelect,Ml as vModelText,Qi as vShow,Ci as version,xi as warn,oo as watch,Qn as watchEffect,eo as watchPostEffect,to as watchSyncEffect,_r as withAsyncContext,On as withCtx,ur as withDefaults,co as withDirectives,Xl as withKeys,yi as withMemo,ql as withModifiers,Nn as withScopeId}; diff --git a/node_modules/vue/dist/vue.runtime.esm-bundler.js b/node_modules/vue/dist/vue.runtime.esm-bundler.js index c5dac254..8f6548ee 100644 --- a/node_modules/vue/dist/vue.runtime.esm-bundler.js +++ b/node_modules/vue/dist/vue.runtime.esm-bundler.js @@ -1,22 +1,26 @@ +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ import { initCustomFormatter, warn } from '@vue/runtime-dom'; export * from '@vue/runtime-dom'; function initDev() { - { - initCustomFormatter(); - } + { + initCustomFormatter(); + } } -// This entry exports the runtime only, and is built as -if ((process.env.NODE_ENV !== 'production')) { - initDev(); +if (!!(process.env.NODE_ENV !== "production")) { + initDev(); } const compile = () => { - if ((process.env.NODE_ENV !== 'production')) { - warn(`Runtime compilation is not supported in this build of Vue.` + - (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` - ) /* should not happen */); - } + if (!!(process.env.NODE_ENV !== "production")) { + warn( + `Runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` ) + ); + } }; export { compile }; diff --git a/node_modules/vue/dist/vue.runtime.global.js b/node_modules/vue/dist/vue.runtime.global.js index 64282800..9403c56e 100644 --- a/node_modules/vue/dist/vue.runtime.global.js +++ b/node_modules/vue/dist/vue.runtime.global.js @@ -1,10851 +1,11075 @@ +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ var Vue = (function (exports) { 'use strict'; - /** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ function makeMap(str, expectsLowerCase) { - const map = Object.create(null); - const list = str.split(','); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val]; + const set = new Set(str.split(",")); + return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val); } - const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + - 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt'; - const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED); - - /** - * On the client we only need to offer special cases for boolean attributes that - * have different names from their corresponding dom properties: - * - itemscope -> N/A - * - allowfullscreen -> allowFullscreen - * - formnovalidate -> formNoValidate - * - ismap -> isMap - * - nomodule -> noModule - * - novalidate -> noValidate - * - readonly -> readOnly - */ - const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; - const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs); - /** - * Boolean attributes should be included if the value is truthy or ''. - * e.g. `<select multiple>` compiles to `{ multiple: '' }` - */ - function includeBooleanAttr(value) { - return !!value || value === ''; - } - - function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) - ? parseStringStyle(item) - : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } - else if (isString(value)) { - return value; - } - else if (isObject(value)) { - return value; - } - } - const listDelimiterRE = /;(?![^(]*\))/g; - const propertyDelimiterRE = /:(.+)/; - function parseStringStyle(cssText) { - const ret = {}; - cssText.split(listDelimiterRE).forEach(item => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; - } - function normalizeClass(value) { - let res = ''; - if (isString(value)) { - res = value; - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + ' '; - } - } - } - else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + ' '; - } - } - } - return res.trim(); - } - function normalizeProps(props) { - if (!props) - return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; - } - - // These tag configs are shared between compiler-dom and runtime-dom, so they - // https://developer.mozilla.org/en-US/docs/Web/HTML/Element - const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' + - 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' + - 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' + - 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' + - 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' + - 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' + - 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' + - 'option,output,progress,select,textarea,details,dialog,menu,' + - 'summary,template,blockquote,iframe,tfoot'; - // https://developer.mozilla.org/en-US/docs/Web/SVG/Element - const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + - 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + - 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + - 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + - 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + - 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + - 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + - 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + - 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + - 'text,textPath,title,tspan,unknown,use,view'; - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS); - /** - * Compiler only. - * Do NOT use in runtime code paths unless behind `true` flag. - */ - const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS); - - function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; - } - function looseEqual(a, b) { - if (a === b) - return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - /* istanbul ignore if: this if will probably never be called */ - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if ((aHasKey && !bHasKey) || - (!aHasKey && bHasKey) || - !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); - } - function looseIndexOf(arr, val) { - return arr.findIndex(item => looseEqual(item, val)); - } - - /** - * For converting {{ interpolation }} values to displayed strings. - * @private - */ - const toDisplayString = (val) => { - return isString(val) - ? val - : val == null - ? '' - : isArray(val) || - (isObject(val) && - (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) - : String(val); - }; - const replacer = (_key, val) => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } - else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => { - entries[`${key} =>`] = val; - return entries; - }, {}) - }; - } - else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()] - }; - } - else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; - }; - - const EMPTY_OBJ = Object.freeze({}) - ; + const EMPTY_OBJ = Object.freeze({}) ; const EMPTY_ARR = Object.freeze([]) ; - const NOOP = () => { }; - /** - * Always return false. - */ + const NOOP = () => { + }; const NO = () => false; - const onRE = /^on[^a-z]/; - const isOn = (key) => onRE.test(key); - const isModelListener = (key) => key.startsWith('onUpdate:'); + const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter + (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); + const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } }; - const hasOwnProperty = Object.prototype.hasOwnProperty; - const hasOwn = (val, key) => hasOwnProperty.call(val, key); + const hasOwnProperty$1 = Object.prototype.hasOwnProperty; + const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); const isArray = Array.isArray; - const isMap = (val) => toTypeString(val) === '[object Map]'; - const isSet = (val) => toTypeString(val) === '[object Set]'; - const isDate = (val) => toTypeString(val) === '[object Date]'; - const isFunction = (val) => typeof val === 'function'; - const isString = (val) => typeof val === 'string'; - const isSymbol = (val) => typeof val === 'symbol'; - const isObject = (val) => val !== null && typeof val === 'object'; + const isMap = (val) => toTypeString(val) === "[object Map]"; + const isSet = (val) => toTypeString(val) === "[object Set]"; + const isDate = (val) => toTypeString(val) === "[object Date]"; + const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; + const isFunction = (val) => typeof val === "function"; + const isString = (val) => typeof val === "string"; + const isSymbol = (val) => typeof val === "symbol"; + const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); const toRawType = (value) => { - // extract "RawType" from strings like "[object RawType]" - return toTypeString(value).slice(8, -1); + return toTypeString(value).slice(8, -1); }; - const isPlainObject = (val) => toTypeString(val) === '[object Object]'; - const isIntegerKey = (key) => isString(key) && - key !== 'NaN' && - key[0] !== '-' && - '' + parseInt(key, 10) === key; - const isReservedProp = /*#__PURE__*/ makeMap( - // the leading comma is intentional so empty string "" is also included - ',key,ref,ref_for,ref_key,' + - 'onVnodeBeforeMount,onVnodeMounted,' + - 'onVnodeBeforeUpdate,onVnodeUpdated,' + - 'onVnodeBeforeUnmount,onVnodeUnmounted'); - const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'); + const isPlainObject = (val) => toTypeString(val) === "[object Object]"; + const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; + const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" + ); + const isBuiltInDirective = /* @__PURE__ */ makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" + ); const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; }; const camelizeRE = /-(\w)/g; - /** - * @private - */ const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : '')); + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; - /** - * @private - */ - const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); - /** - * @private - */ - const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1)); - /** - * @private - */ - const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``); - // compare whether a value has changed, accounting for NaN. + const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() + ); + const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); + }); + const toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + }); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); const invokeArrayFns = (fns, arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](arg); - } + for (let i = 0; i < fns.length; i++) { + fns[i](arg); + } }; const def = (obj, key, value) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - value - }); + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + value + }); + }; + const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; }; const toNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; }; let _globalThis; const getGlobalThis = () => { - return (_globalThis || - (_globalThis = - typeof globalThis !== 'undefined' - ? globalThis - : typeof self !== 'undefined' - ? self - : typeof window !== 'undefined' - ? window - : typeof global !== 'undefined' - ? global - : {})); + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; - function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); + const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; + const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); + + function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } + } + const listDelimiterRE = /;(?![^(]*\))/g; + const propertyDelimiterRE = /:([^]+)/; + const styleCommentRE = /\/\*[^]*?\*\//g; + function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; + } + function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + if (isString(value) || typeof value === "number") { + ret += `${normalizedKey}:${value};`; + } + } + return ret; + } + function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); + } + function normalizeProps(props) { + if (!props) + return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; + } + + const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; + const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; + const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; + const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); + const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); + const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); + + const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; + const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); + const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` + ); + function includeBooleanAttr(value) { + return !!value || value === ""; + } + const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` + ); + const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` + ); + function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; + } + + function looseCompareArrays(a, b) { + if (a.length !== b.length) + return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; + } + function looseEqual(a, b) { + if (a === b) + return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); + } + function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); + } + + const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); + }; + const replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; + }; + const stringifySymbol = (v, i = "") => { + var _a; + return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v; + }; + + function warn$2(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); } let activeEffectScope; class EffectScope { - constructor(detached = false) { - /** - * @internal - */ - this.active = true; - /** - * @internal - */ - this.effects = []; - /** - * @internal - */ - this.cleanups = []; - if (!detached && activeEffectScope) { - this.parent = activeEffectScope; - this.index = - (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1; - } - } - run(fn) { - if (this.active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } - finally { - activeEffectScope = currentEffectScope; - } - } - else { - warn(`cannot run an inactive effect scope.`); - } - } + constructor(detached = false) { + this.detached = detached; /** - * This should only be called on non-detached scopes * @internal */ - on() { + this._active = true; + /** + * @internal + */ + this.effects = []; + /** + * @internal + */ + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else { + warn$2(`cannot run an inactive effect scope.`); } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this.active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - // nested scope, dereference from parent to avoid memory leaks - if (this.parent && !fromParent) { - // optimized O(1) removal - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.active = false; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; } + } } function effectScope(detached) { - return new EffectScope(detached); + return new EffectScope(detached); } function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } + if (scope && scope.active) { + scope.effects.push(effect); + } } function getCurrentScope() { - return activeEffectScope; + return activeEffectScope; } function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } - else { - warn(`onScopeDispose() is called when there is no active effect scope` + - ` to be associated with.`); - } + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else { + warn$2( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } } - const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; - }; - const wasTracked = (dep) => (dep.w & trackOpBit) > 0; - const newTracked = (dep) => (dep.n & trackOpBit) > 0; - const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; // set was tracked - } - } - }; - const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } - else { - deps[ptr++] = dep; - } - // clear bits - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; - } - deps.length = ptr; - } - }; - - const targetMap = new WeakMap(); - // The number of effects currently being tracked recursively. - let effectTrackDepth = 0; - let trackOpBit = 1; - /** - * The bitwise track markers support at most 30 levels of recursion. - * This value is chosen to enable modern JS engines to use a SMI on all platforms. - * When recursion depth is greater, fall back to using a full cleanup. - */ - const maxMarkerBits = 30; let activeEffect; - const ITERATE_KEY = Symbol('iterate' ); - const MAP_KEY_ITERATE_KEY = Symbol('Map key iterate' ); class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = undefined; - recordEffectScope(this, scope); + constructor(fn, trigger, scheduler, scope) { + this.fn = fn; + this.trigger = trigger; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + /** + * @internal + */ + this._dirtyLevel = 2; + /** + * @internal + */ + this._trackId = 0; + /** + * @internal + */ + this._runnings = 0; + /** + * @internal + */ + this._shouldSchedule = false; + /** + * @internal + */ + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 1) { + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + triggerComputed(dep.computed); + if (this._dirtyLevel >= 2) { + break; + } + } + } + if (this._dirtyLevel < 2) { + this._dirtyLevel = 0; + } + resetTracking(); } - run() { - if (!this.active) { - return this.fn(); - } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } - try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } - else { - cleanupEffect(this); - } - return this.fn(); - } - finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = undefined; - if (this.deferStop) { - this.stop(); - } - } + return this._dirtyLevel >= 2; + } + set dirty(v) { + this._dirtyLevel = v ? 2 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); } - stop() { - // stopped while running itself - defer the cleanup - if (activeEffect === this) { - this.deferStop = true; - } - else if (this.active) { - cleanupEffect(this); - if (this.onStop) { - this.onStop(); - } - this.active = false; - } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; } + } + stop() { + var _a; + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + (_a = this.onStop) == null ? void 0 : _a.call(this); + this.active = false; + } + } } - function cleanupEffect(effect) { - const { deps } = effect; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect); - } - deps.length = 0; + function triggerComputed(computed) { + return computed.value; + } + function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; + } + function postCleanupEffect(effect2) { + if (effect2.deps && effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); } + effect2.deps.length = effect2._depsLength; + } + } + function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } } function effect(fn, options) { - if (fn.effect) { - fn = fn.effect.fn; + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); } - const _effect = new ReactiveEffect(fn); - if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; + }); + if (options) { + extend(_effect, options); + if (options.scope) + recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; } function stop(runner) { - runner.effect.stop(); + runner.effect.stop(); } let shouldTrack = true; + let pauseScheduleStack = 0; const trackStack = []; function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; + trackStack.push(shouldTrack); + shouldTrack = false; } function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === undefined ? true : last; + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; } - function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, (dep = createDep())); - } - const eventInfo = { effect: activeEffect, target, type, key } - ; - trackEffects(dep, eventInfo); - } + function pauseScheduling() { + pauseScheduleStack++; } - function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; // set newly tracked - shouldTrack = !wasTracked(dep); - } - } - else { - // Full cleanup mode. - shouldTrack = !dep.has(activeEffect); - } - if (shouldTrack) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack(Object.assign({ effect: activeEffect }, debuggerEventExtraInfo)); - } - } + function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } } - function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - // never been tracked - return; + function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; } - let deps = []; - if (type === "clear" /* CLEAR */) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()]; + { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } - else if (key === 'length' && isArray(target)) { - depsMap.forEach((dep, key) => { - if (key === 'length' || key >= newValue) { - deps.push(dep); - } - }); - } - else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case "add" /* ADD */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')); - } - break; - case "delete" /* DELETE */: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set" /* SET */: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } - ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); - } - } - } - else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } - } + } + } + const queueEffectSchedulers = []; + function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (effect2._dirtyLevel < dirtyLevel && dep.get(effect2) === effect2._trackId) { + const lastDirtyLevel = effect2._dirtyLevel; + effect2._dirtyLevel = dirtyLevel; + if (lastDirtyLevel === 0) { + effect2._shouldSchedule = true; { - triggerEffects(createDep(effects), eventInfo); + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); } + effect2.trigger(); + } } + } + scheduleEffects(dep); + resetScheduling(); } - function triggerEffects(dep, debuggerEventExtraInfo) { - // spread into array for stabilization - const effects = isArray(dep) ? dep : [...dep]; - for (const effect of effects) { - if (effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - for (const effect of effects) { - if (!effect.computed) { - triggerEffect(effect, debuggerEventExtraInfo); - } - } - } - function triggerEffect(effect, debuggerEventExtraInfo) { - if (effect !== activeEffect || effect.allowRecurse) { - if (effect.onTrigger) { - effect.onTrigger(extend({ effect }, debuggerEventExtraInfo)); - } - if (effect.scheduler) { - effect.scheduler(); - } - else { - effect.run(); - } + function scheduleEffects(dep) { + for (const effect2 of dep.keys()) { + if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) { + effect2._shouldSchedule = false; + queueEffectSchedulers.push(effect2.scheduler); } + } } - const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`); + const createDep = (cleanup, computed) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed; + return dep; + }; + + const targetMap = /* @__PURE__ */ new WeakMap(); + const ITERATE_KEY = Symbol("iterate" ); + const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); + function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + { + target, + type, + key + } + ); + } + } + function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 2, + { + target, + type, + key, + newValue, + oldValue, + oldTarget + } + ); + } + } + resetScheduling(); + } + function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); + } + + const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); const builtInSymbols = new Set( - /*#__PURE__*/ - Object.getOwnPropertyNames(Symbol) - // ios10.x Object.getOwnPropertyNames(Symbol) can enumerate 'arguments' and 'caller' - // but accessing them on Symbol leads to TypeError because Symbol is a strict mode - // function - .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => Symbol[key]) - .filter(isSymbol)); - const get = /*#__PURE__*/ createGetter(); - const shallowGet = /*#__PURE__*/ createGetter(false, true); - const readonlyGet = /*#__PURE__*/ createGetter(true); - const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true); - const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations(); + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) + ); + const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); function createArrayInstrumentations() { - const instrumentations = {}; - ['includes', 'indexOf', 'lastIndexOf'].forEach(key => { - instrumentations[key] = function (...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get" /* GET */, i + ''); - } - // we run the method using the original args first (which may be reactive) - const res = arr[key](...args); - if (res === -1 || res === false) { - // if that didn't work, run it again using raw values. - return arr[key](...args.map(toRaw)); - } - else { - return res; - } - }; - }); - ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => { - instrumentations[key] = function (...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; - } - function createGetter(isReadonly = false, shallow = false) { - return function get(target, key, receiver) { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_isShallow" /* IS_SHALLOW */) { - return shallow; - } - else if (key === "__v_raw" /* RAW */ && - receiver === - (isReadonly - ? shallow - ? shallowReadonlyMap - : readonlyMap - : shallow - ? shallowReactiveMap - : reactiveMap).get(target)) { - return target; - } - const targetIsArray = isArray(target); - if (!isReadonly && targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly) { - track(target, "get" /* GET */, key); - } - if (shallow) { - return res; - } - if (isRef(res)) { - // ref unwrapping - skip unwrap for Array + integer key. - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - // Convert returned value into a proxy as well. we do the isObject check - // here to avoid invalid value warning. Also need to lazy access readonly - // and reactive here to avoid circular dependency. - return isReadonly ? readonly(res) : reactive(res); - } + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { return res; + } }; - } - const set = /*#__PURE__*/ createSetter(); - const shallowSet = /*#__PURE__*/ createSetter(true); - function createSetter(shallow = false) { - return function set(target, key, value, receiver) { - let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow && !isReadonly(value)) { - if (!isShallow(value)) { - value = toRaw(value); - oldValue = toRaw(oldValue); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - } - const hadKey = isArray(target) && isIntegerKey(key) - ? Number(key) < target.length - : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - // don't trigger if target is something up in the prototype chain of original - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - } - return result; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; }; + }); + return instrumentations; } - function deleteProperty(target, key) { + function hasOwnProperty(key) { + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); + } + class BaseReactiveHandler { + constructor(_isReadonly = false, _shallow = false) { + this._isReadonly = _isReadonly; + this._shallow = _shallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, shallow = this._shallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return shallow; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (shallow) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } + } + class MutableReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(false, shallow); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._shallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { const hadKey = hasOwn(target, key); const oldValue = target[key]; const result = Reflect.deleteProperty(target, key); if (result && hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); + trigger(target, "delete", key, void 0, oldValue); } return result; - } - function has(target, key) { + } + has(target, key) { const result = Reflect.has(target, key); if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has" /* HAS */, key); + track(target, "has", key); } return result; - } - function ownKeys(target) { - track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY); + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); return Reflect.ownKeys(target); + } } - const mutableHandlers = { - get, - set, - deleteProperty, - has, - ownKeys - }; - const readonlyHandlers = { - get: readonlyGet, - set(target, key) { - { - warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; - }, - deleteProperty(target, key) { - { - warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target); - } - return true; + class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(shallow = false) { + super(true, shallow); + } + set(target, key) { + { + warn$2( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); } - }; - const shallowReactiveHandlers = /*#__PURE__*/ extend({}, mutableHandlers, { - get: shallowGet, - set: shallowSet - }); - // Props handlers are special in the sense that it should not unwrap top-level - // refs (in order to allow refs to be explicitly passed down), but should - // retain the reactivity of the normal readonly object. - const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, { - get: shallowReadonlyGet - }); + return true; + } + deleteProperty(target, key) { + { + warn$2( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + } + const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); + const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); + const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler( + true + ); + const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); - function get$1(target, key, isReadonly = false, isShallow = false) { - // #1772: readonly(reactive(Map)) should return readonly + reactive version - // of the value - target = target["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "get" /* GET */, key); - } - track(rawTarget, "get" /* GET */, rawKey); - } - const { has } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - if (has.call(rawTarget, key)) { - return wrap(target.get(key)); - } - else if (has.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } - else if (target !== rawTarget) { - // #3602 readonly(reactive(Map)) - // ensure that the nested reactive `Map` can do tracking for itself - target.get(key); + function get(target, key, isReadonly = false, isShallow = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } } - function has$1(key, isReadonly = false) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { - track(rawTarget, "has" /* HAS */, key); - } - track(rawTarget, "has" /* HAS */, rawKey); + function has(key, isReadonly = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); } - return key === rawKey - ? target.has(key) - : target.has(key) || target.has(rawKey); + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } function size(target, isReadonly = false) { - target = target["__v_raw" /* RAW */]; - !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY); - return Reflect.get(target, 'size', target); + target = target["__v_raw"]; + !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); } function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add" /* ADD */, value, value); - } - return this; + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; } - function set$1(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add" /* ADD */, key, value); - } - else if (hasChanged(value, oldValue)) { - trigger(target, "set" /* SET */, key, value, oldValue); - } - return this; + function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; } function deleteEntry(key) { - const target = toRaw(this); - const { has, get } = getProto(target); - let hadKey = has.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has.call(target, key); - } - else { - checkIdentityKeys(target, has, key); - } - const oldValue = get ? get.call(target, key) : undefined; - // forward the operation before queueing reactions - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete" /* DELETE */, key, undefined, oldValue); - } - return result; + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; } function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = isMap(target) - ? new Map(target) - : new Set(target) - ; - // forward the operation before queueing reactions - const result = target.clear(); - if (hadItems) { - trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget); - } - return result; + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = isMap(target) ? new Map(target) : new Set(target) ; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; } function createForEach(isReadonly, isShallow) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY); - return target.forEach((value, key) => { - // important: make sure the callback is - // 1. invoked with the reactive map as `this` and 3rd arg - // 2. the value received should be a corresponding reactive/readonly. - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; } function createIterableMethod(method, isReadonly, isShallow) { - return function (...args) { - const target = this["__v_raw" /* RAW */]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap); - const isKeyOnly = method === 'keys' && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && - track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY); - // return a wrapped iterator which returns observed versions of the - // values emitted from the real iterator - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done - ? { value, done } - : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + !isReadonly && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } }; + }; } function createReadonlyMethod(type) { - return function (...args) { - { - const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this)); - } - return type === "delete" /* DELETE */ ? false : this; - }; + return function(...args) { + { + const key = args[0] ? `on key "${args[0]}" ` : ``; + console.warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; } function createInstrumentations() { - const mutableInstrumentations = { - get(key) { - return get$1(this, key); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations = { - get(key) { - return get$1(this, key, false, true); - }, - get size() { - return size(this); - }, - has: has$1, - add, - set: set$1, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations = { - get(key) { - return get$1(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations = { - get(key) { - return get$1(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has$1.call(this, key, true); - }, - add: createReadonlyMethod("add" /* ADD */), - set: createReadonlyMethod("set" /* SET */), - delete: createReadonlyMethod("delete" /* DELETE */), - clear: createReadonlyMethod("clear" /* CLEAR */), - forEach: createForEach(true, true) - }; - const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator]; - iteratorMethods.forEach(method => { - mutableInstrumentations[method] = createIterableMethod(method, false, false); - readonlyInstrumentations[method] = createIterableMethod(method, true, false); - shallowInstrumentations[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true); - }); - return [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations - ]; + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod( + method, + false, + false + ); + readonlyInstrumentations2[method] = createIterableMethod( + method, + true, + false + ); + shallowInstrumentations2[method] = createIterableMethod( + method, + false, + true + ); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; } - const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations(); + const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations + ] = /* @__PURE__ */ createInstrumentations(); function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow - ? isReadonly - ? shallowReadonlyInstrumentations - : shallowInstrumentations - : isReadonly - ? readonlyInstrumentations - : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive" /* IS_REACTIVE */) { - return !isReadonly; - } - else if (key === "__v_isReadonly" /* IS_READONLY */) { - return isReadonly; - } - else if (key === "__v_raw" /* RAW */) { - return target; - } - return Reflect.get(hasOwn(instrumentations, key) && key in target - ? instrumentations - : target, key, receiver); - }; + const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly; + } else if (key === "__v_isReadonly") { + return isReadonly; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; } const mutableCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, false) + get: /* @__PURE__ */ createInstrumentationGetter(false, false) }; const shallowCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(false, true) + get: /* @__PURE__ */ createInstrumentationGetter(false, true) }; const readonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, false) + get: /* @__PURE__ */ createInstrumentationGetter(true, false) }; const shallowReadonlyCollectionHandlers = { - get: /*#__PURE__*/ createInstrumentationGetter(true, true) + get: /* @__PURE__ */ createInstrumentationGetter(true, true) }; - function checkIdentityKeys(target, has, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has.call(target, rawKey)) { - const type = toRawType(target); - console.warn(`Reactive ${type} contains both the raw and reactive ` + - `versions of the same object${type === `Map` ? ` as keys` : ``}, ` + - `which can lead to inconsistencies. ` + - `Avoid differentiating between the raw and reactive versions ` + - `of an object and only use the reactive version if possible.`); - } + function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + console.warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } } - const reactiveMap = new WeakMap(); - const shallowReactiveMap = new WeakMap(); - const readonlyMap = new WeakMap(); - const shallowReadonlyMap = new WeakMap(); + const reactiveMap = /* @__PURE__ */ new WeakMap(); + const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); + const readonlyMap = /* @__PURE__ */ new WeakMap(); + const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); function targetTypeMap(rawType) { - switch (rawType) { - case 'Object': - case 'Array': - return 1 /* COMMON */; - case 'Map': - case 'Set': - case 'WeakMap': - case 'WeakSet': - return 2 /* COLLECTION */; - default: - return 0 /* INVALID */; - } + switch (rawType) { + case "Object": + case "Array": + return 1 /* COMMON */; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2 /* COLLECTION */; + default: + return 0 /* INVALID */; + } } function getTargetType(value) { - return value["__v_skip" /* SKIP */] || !Object.isExtensible(value) - ? 0 /* INVALID */ - : targetTypeMap(toRawType(value)); + return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value)); } function reactive(target) { - // if trying to observe a readonly proxy, return the readonly version. - if (isReadonly(target)) { - return target; - } - return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap); + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); } - /** - * Return a shallowly-reactive copy of the original object, where only the root - * level properties are reactive. It also does not auto-unwrap refs (even at the - * root level). - */ function shallowReactive(target) { - return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap); + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); } - /** - * Creates a readonly copy of the original object. Note the returned copy is not - * made reactive, but `readonly` can be called on an already reactive object. - */ function readonly(target) { - return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap); + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); } - /** - * Returns a reactive-copy of the original object, where only the root level - * properties are readonly, and does NOT unwrap refs nor recursively convert - * returned properties. - * This is used for creating the props proxy object for stateful components. - */ function shallowReadonly(target) { - return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap); + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); } - function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - { - console.warn(`value cannot be made reactive: ${String(target)}`); - } - return target; + function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + { + console.warn(`value cannot be made reactive: ${String(target)}`); } - // target is already a Proxy, return it. - // exception: calling readonly() on a reactive object - if (target["__v_raw" /* RAW */] && - !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) { - return target; - } - // target already has corresponding Proxy - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - // only specific value types can be observed. - const targetType = getTargetType(target); - if (targetType === 0 /* INVALID */) { - return target; - } - const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers); - proxyMap.set(target, proxy); - return proxy; + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0 /* INVALID */) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; } function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw" /* RAW */]); - } - return !!(value && value["__v_isReactive" /* IS_REACTIVE */]); + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); } function isReadonly(value) { - return !!(value && value["__v_isReadonly" /* IS_READONLY */]); + return !!(value && value["__v_isReadonly"]); } function isShallow(value) { - return !!(value && value["__v_isShallow" /* IS_SHALLOW */]); + return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return isReactive(value) || isReadonly(value); } function toRaw(observed) { - const raw = observed && observed["__v_raw" /* RAW */]; - return raw ? toRaw(raw) : observed; + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip" /* SKIP */, true); - return value; + def(value, "__v_skip", true); + return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; - function trackRefValue(ref) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref); - { - trackEffects(ref.dep || (ref.dep = createDep()), { - target: ref, - type: "get" /* GET */, - key: 'value' - }); - } + class ComputedRefImpl { + constructor(getter, _setter, isReadonly, isSSR) { + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue(this, 1), + () => this.dep && scheduleEffects(this.dep) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly; + } + get value() { + const self = toRaw(this); + if (!self._cacheable || self.effect.dirty) { + if (hasChanged(self._value, self._value = self.effect.run())) { + triggerRefValue(self, 2); + } } + trackRefValue(self); + if (self.effect._dirtyLevel >= 1) { + triggerRefValue(self, 1); + } + return self._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion } - function triggerRefValue(ref, newVal) { - ref = toRaw(ref); - if (ref.dep) { - { - triggerEffects(ref.dep, { - target: ref, - type: "set" /* SET */, - key: 'value', - newValue: newVal - }); - } - } - } - function isRef(r) { - return !!(r && r.__v_isRef === true); - } - function ref(value) { - return createRef(value, false); - } - function shallowRef(value) { - return createRef(value, true); - } - function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); - } - class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = undefined; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - newVal = this.__v_isShallow ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = this.__v_isShallow ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); - } - } - } - function triggerRef(ref) { - triggerRefValue(ref, ref.value ); - } - function unref(ref) { - return isRef(ref) ? ref.value : ref; - } - const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } - else { - return Reflect.set(target, key, value, receiver); - } - } - }; - function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) - ? objectWithRefs - : new Proxy(objectWithRefs, shallowUnwrapHandlers); - } - class CustomRefImpl { - constructor(factory) { - this.dep = undefined; - this.__v_isRef = true; - const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this)); - this._get = get; - this._set = set; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } - } - function customRef(factory) { - return new CustomRefImpl(factory); - } - function toRefs(object) { - if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = toRef(object, key); - } - return ret; - } - class ObjectRefImpl { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === undefined ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - } - function toRef(object, key, defaultValue) { - const val = object[key]; - return isRef(val) - ? val - : new ObjectRefImpl(object, key, defaultValue); + function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = () => { + console.warn("Write operation failed: computed value is readonly"); + } ; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; } - class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = undefined; - this.__v_isRef = true; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly" /* IS_READONLY */] = isReadonly; - } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); - } - return self._value; - } - set value(newValue) { - this._setter(newValue); - } + function trackRefValue(ref2) { + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + ref2.dep || (ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + )), + { + target: ref2, + type: "get", + key: "value" + } + ); + } } - function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = () => { - console.warn('Write operation failed: computed value is readonly'); - } - ; - } - else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; + function triggerRefValue(ref2, dirtyLevel = 2, newVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + { + target: ref2, + type: "set", + key: "value", + newValue: newVal + } + ); + } } + function isRef(r) { + return !!(r && r.__v_isRef === true); + } + function ref(value) { + return createRef(value, false); + } + function shallowRef(value) { + return createRef(value, true); + } + function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); + } + class RefImpl { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 2, newVal); + } + } + } + function triggerRef(ref2) { + triggerRefValue(ref2, 2, ref2.value ); + } + function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; + } + function toValue(source) { + return isFunction(source) ? source() : unref(source); + } + const shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } + }; + function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); + } + class CustomRefImpl { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get, set } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get; + this._set = set; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } + } + function customRef(factory) { + return new CustomRefImpl(factory); + } + function toRefs(object) { + if (!isProxy(object)) { + console.warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; + } + class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } + } + class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } + } + function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } + } + function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); + } + + const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" + }; + const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" + }; const stack = []; function pushWarningContext(vnode) { - stack.push(vnode); + stack.push(vnode); } function popWarningContext() { - stack.pop(); + stack.pop(); } function warn$1(msg, ...args) { - // avoid props formatting or warn handler tracking deps that might be mutated - // during patch, leading to infinite recursion. - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [ - msg + args.join(''), - instance && instance.proxy, - trace - .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`) - .join('\n'), - trace - ]); + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + msg + args.join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); } - else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - /* istanbul ignore if */ - if (trace.length && - // avoid spamming console during tests - !false) { - warnArgs.push(`\n`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); + console.warn(...warnArgs); + } + resetTracking(); } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); } - // we can't just use the stack because it will be incomplete during updates - // that did not start from the root. Re-construct the parent chain using - // instance parent pointers. - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } - else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; } - /* istanbul ignore next */ function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry)); - }); - return logs; + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; } function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`; - const close = `>` + postfix; - return vnode.props - ? [open, ...formatProps(vnode.props), close] - : [open + close]; + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; } - /* istanbul ignore next */ function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach(key => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; } - /* istanbul ignore next */ function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } - else if (typeof value === 'number' || - typeof value === 'boolean' || - value == null) { - return raw ? value : [`${key}=${value}`]; - } - else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } - else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } - else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } + } + function assertNumber(val, type) { + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } } - const ErrorTypeStrings = { - ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook', - ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook', - ["c" /* CREATED */]: 'created hook', - ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook', - ["m" /* MOUNTED */]: 'mounted hook', - ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook', - ["u" /* UPDATED */]: 'updated', - ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook', - ["um" /* UNMOUNTED */]: 'unmounted hook', - ["a" /* ACTIVATED */]: 'activated hook', - ["da" /* DEACTIVATED */]: 'deactivated hook', - ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook', - ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook', - ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook', - [0 /* SETUP_FUNCTION */]: 'setup function', - [1 /* RENDER_FUNCTION */]: 'render function', - [2 /* WATCH_GETTER */]: 'watcher getter', - [3 /* WATCH_CALLBACK */]: 'watcher callback', - [4 /* WATCH_CLEANUP */]: 'watcher cleanup function', - [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler', - [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler', - [7 /* VNODE_HOOK */]: 'vnode hook', - [8 /* DIRECTIVE_HOOK */]: 'directive hook', - [9 /* TRANSITION_HOOK */]: 'transition hook', - [10 /* APP_ERROR_HANDLER */]: 'app errorHandler', - [11 /* APP_WARN_HANDLER */]: 'app warnHandler', - [12 /* FUNCTION_REF */]: 'ref function', - [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader', - [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' + - 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core' + const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" + }; + const ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." }; function callWithErrorHandling(fn, instance, type, args) { - let res; - try { - res = args ? fn(...args) : fn(); - } - catch (err) { - handleError(err, instance, type); - } - return res; + let res; + try { + res = args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } + return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch(err => { - handleError(err, instance, type); - }); - } - return res; + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; + return res; + } + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; } function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - // the exposed instance is the render proxy to keep it consistent with 2.x - const exposedInstance = instance.proxy; - // in production the hook receives only the error code - const errorInfo = ErrorTypeStrings[type] ; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - // app-level handling - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]); + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = ErrorTypeStrings$1[type] ; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { return; + } } + } + cur = cur.parent; } - logError(err, type, contextVNode, throwInDev); + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + return; + } + } + logError(err, type, contextVNode, throwInDev); } function logError(err, type, contextVNode, throwInDev = true) { - { - const info = ErrorTypeStrings[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - // crash in dev by default so it's more noticeable - if (throwInDev) { - throw err; - } - else { - console.error(err); - } + { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } } let isFlushing = false; let isFlushPending = false; const queue = []; let flushIndex = 0; - const pendingPreFlushCbs = []; - let activePreFlushCbs = null; - let preFlushIndex = 0; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; - const resolvedPromise = /*#__PURE__*/ Promise.resolve(); + const resolvedPromise = /* @__PURE__ */ Promise.resolve(); let currentFlushPromise = null; - let currentPreFlushParentJob = null; const RECURSION_LIMIT = 100; function nextTick(fn) { - const p = currentFlushPromise || resolvedPromise; - return fn ? p.then(this ? fn.bind(this) : fn) : p; + const p = currentFlushPromise || resolvedPromise; + return fn ? p.then(this ? fn.bind(this) : fn) : p; } - // #2768 - // Use binary-search to find a suitable position in the queue, - // so that the queue maintains the increasing order of job's id, - // which can prevent the job from being skipped and also can avoid repeated patching. function findInsertionIndex(id) { - // the start index should be `flushIndex + 1` - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = (start + end) >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? (start = middle + 1) : (end = middle); + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; } - return start; + } + return start; } function queueJob(job) { - // the dedupe search uses the startIndex argument of Array.includes() - // by default the search index includes the current job that is being run - // so it cannot recursively trigger itself again. - // if the job is a watch() callback, the search will start with a +1 index to - // allow it recursively trigger itself - it is the user's responsibility to - // ensure it doesn't end up in an infinite loop. - if ((!queue.length || - !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) && - job !== currentPreFlushParentJob) { - if (job.id == null) { - queue.push(job); - } - else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } - } - function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } - } - function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } - } - function queueCb(cb, activeQueue, pendingQueue, index) { - if (!isArray(cb)) { - if (!activeQueue || - !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) { - pendingQueue.push(cb); - } - } - else { - // if cb is an array, it is a component lifecycle hook which can only be - // triggered by a job, which is already deduped in the main queue, so - // we can skip duplicate check here to improve perf - pendingQueue.push(...cb); + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); } queueFlush(); + } } - function queuePreFlushCb(cb) { - queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex); + function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } + } + function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } } function queuePostFlushCb(cb) { - queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex); - } - function flushPreFlushCbs(seen, parentJob = null) { - if (pendingPreFlushCbs.length) { - currentPreFlushParentJob = parentJob; - activePreFlushCbs = [...new Set(pendingPreFlushCbs)]; - pendingPreFlushCbs.length = 0; - { - seen = seen || new Map(); - } - for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) { - if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) { - continue; - } - activePreFlushCbs[preFlushIndex](); - } - activePreFlushCbs = null; - preFlushIndex = 0; - currentPreFlushParentJob = null; - // recursively flush until it drains - flushPreFlushCbs(seen, parentJob); + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); + } + function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } } function flushPostFlushCbs(seen) { - // flush any pre cbs queued during the flush (e.g. pre watchers) - flushPreFlushCbs(); - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; - pendingPostFlushCbs.length = 0; - // #1947 already has active queue, nested flushPostFlushCbs call - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - { - seen = seen || new Map(); - } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { - continue; - } - activePostFlushCbs[postFlushIndex](); - } - activePostFlushCbs = null; - postFlushIndex = 0; + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; } + activePostFlushCbs = deduped; + { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + continue; + } + activePostFlushCbs[postFlushIndex](); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } } const getId = (job) => job.id == null ? Infinity : job.id; + const comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) + return -1; + if (b.pre && !a.pre) + return 1; + } + return diff; + }; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - { - seen = seen || new Map(); - } - flushPreFlushCbs(seen); - // Sort queue before flush. - // This ensures that: - // 1. Components are updated from parent to child. (because parent is always - // created before the child so its render effect will have smaller - // priority number) - // 2. If a component is unmounted during a parent component's update, - // its update can be skipped. - queue.sort((a, b) => getId(a) - getId(b)); - // conditional usage of checkRecursiveUpdate must be determined out of - // try ... catch block since Rollup by default de-optimizes treeshaking - // inside try-catch. This can leave all warning code unshaked. Although - // they would get eventually shaken by a minifier like terser, some minifiers - // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610) - const check = (job) => checkRecursiveUpdates(seen, job) - ; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (true && check(job)) { - continue; - } - // console.log(`running:`, job.id) - callWithErrorHandling(job, null, 14 /* SCHEDULER */); - } + isFlushPending = false; + isFlushing = true; + { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = (job) => checkRecursiveUpdates(seen, job) ; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; } + callWithErrorHandling(job, null, 14); + } } - finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - // some postFlushCb queued jobs! - // keep flushing until it drains. - if (queue.length || - pendingPreFlushCbs.length || - pendingPostFlushCbs.length) { - flushJobs(seen); - } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); } + } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } - else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn$1(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`); - return true; - } - else { - seen.set(fn, count + 1); - } + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); } + } } - /* eslint-disable no-restricted-globals */ let isHmrUpdating = false; - const hmrDirtyComponents = new Set(); - // Expose the HMR runtime on the global object - // This makes it entirely tree-shakable without polluting the exports and makes - // it easier to be used in toolings like vue-loader - // Note: for a component to be eligible for HMR it also needs the __hmrId option - // to be set so that its instances can be registered / removed. + const hmrDirtyComponents = /* @__PURE__ */ new Set(); { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; } - const map = new Map(); + const map = /* @__PURE__ */ new Map(); function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); } function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); + map.get(instance.type.__hmrId).instances.delete(instance); } function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: new Set() - }); - return true; + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; } function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; + return isClassComponent(component) ? component.__vccOpts : component; } function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; } - // update initial record (for not-yet-rendered component) - record.initialDef.render = newRender; - [...record.instances].forEach(instance => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - // this flag forces child components with slot content to update - isHmrUpdating = true; - instance.update(); - isHmrUpdating = false; - }); + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); } function reload(id, newComp) { - const record = map.get(id); - if (!record) - return; - newComp = normalizeClassComponent(newComp); - // update initial def (for not-yet-rendered components) - updateComponentDef(record.initialDef, newComp); - // create a snapshot which avoids the set being mutated during updates - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - // 1. Update existing comp definition to match new one - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - // 2. mark definition dirty. This forces the renderer to replace the - // component on patch. - hmrDirtyComponents.add(oldComp); - } - // 3. invalidate options resolution cache - instance.appContext.optionsCache.delete(instance.type); - // 4. actually update - if (instance.ceReload) { - // custom element - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } - else if (instance.parent) { - // 4. Force the parent instance to re-render. This will cause all updated - // components to be unmounted and re-mounted. Queue the update so that we - // don't end up forcing the same parent to re-render multiple times. - queueJob(instance.parent.update); - // instance is the inner component of an async custom element - // invoke to reset styles - if (instance.parent.type.__asyncLoader && - instance.parent.ceReload) { - instance.parent.ceReload(newComp.styles); - } - } - else if (instance.appContext.reload) { - // root instance mounted via createApp() has a reload method - instance.appContext.reload(); - } - else if (typeof window !== 'undefined') { - // root instance inside tree created via raw render(). Force reload. - window.location.reload(); - } - else { - console.warn('[HMR] Root or manually mounted instance modified. Full reload required.'); - } + const record = map.get(id); + if (!record) + return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); } - // 5. make sure to cleanup dirty hmr components after update - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete(normalizeClassComponent(instance.type)); - } - }); + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); } function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== '__file' && !(key in newComp)) { - delete oldComp[key]; - } + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; } + } } function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } - catch (e) { - console.error(e); - console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` + - `Full reload required.`); - } - }; + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; } + let devtools$1; let buffer = []; let devtoolsNotInstalled = false; - function emit(event, ...args) { - if (exports.devtools) { - exports.devtools.emit(event, ...args); - } - else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } + function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } } - function setDevtoolsHook(hook, target) { - var _a, _b; - exports.devtools = hook; - if (exports.devtools) { - exports.devtools.enabled = true; - buffer.forEach(({ event, args }) => exports.devtools.emit(event, ...args)); - buffer = []; - } - else if ( + function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( // handle late devtools injection - only do this if we are in an actual // browser environment to avoid the timer handle stalling test runner exit // (#4815) - typeof window !== 'undefined' && - // some envs mock window but not fully - window.HTMLElement && - // also exclude jsdom - !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) { - const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = - target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []); - replay.push((newHook) => { - setDevtoolsHook(newHook, target); - }); - // clear buffer after 3s - the user probably doesn't have devtools installed - // at all, and keeping the buffer will cause memory leaks (#4738) - setTimeout(() => { - if (!exports.devtools) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3000); - } - else { - // non-browser env, assume not installed + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; - } + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } } function devtoolsInitApp(app, version) { - emit("app:init" /* APP_INIT */, app, version, { - Fragment, - Text, - Comment, - Static - }); + emit$1("app:init" /* APP_INIT */, app, version, { + Fragment, + Text, + Comment, + Static + }); } function devtoolsUnmountApp(app) { - emit("app:unmount" /* APP_UNMOUNT */, app); + emit$1("app:unmount" /* APP_UNMOUNT */, app); } - const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); - const devtoolsComponentUpdated = - /*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); - const devtoolsComponentRemoved = - /*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */); + const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( + "component:added" /* COMPONENT_ADDED */ + ); + const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); + const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( + "component:removed" /* COMPONENT_REMOVED */ + ); + const devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } + }; function createDevtoolsComponentHook(hook) { - return (component) => { - emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component); - }; + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; } - const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); - const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); + const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:start" /* PERFORMANCE_START */ + ); + const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( + "perf:end" /* PERFORMANCE_END */ + ); function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit(hook, component.appContext.app, component.uid, component, type, time); - }; + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; } function devtoolsComponentEmit(component, event, params) { - emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params); + emit$1( + "component:emit" /* COMPONENT_EMIT */, + component.appContext.app, + component, + event, + params + ); } - function emit$1(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { emitsOptions, propsOptions: [propsOptions] } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && - !(false )) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1(`Component emitted event "${event}" but it is neither declared in ` + - `the emits option nor as an "${toHandlerKey(event)}" prop.`); - } - } - else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1(`Invalid event arguments: event validation failed for event "${event}".`); - } - } - } + function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) + return; + const props = instance.vnode.props || EMPTY_OBJ; + { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); } - } - let args = rawArgs; - const isModelListener = event.startsWith('update:'); - // for v-model update:xxx events, apply modifiers on args - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map(a => a.trim()); - } - if (number) { - args = rawArgs.map(toNumber); + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } } + } } - { - devtoolsComponentEmit(instance, event, args); + } + let args = rawArgs; + const isModelListener = event.startsWith("update:"); + const modelArg = isModelListener && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1(`Event "${lowerCaseEvent}" is emitted in component ` + - `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` + - `Note that HTML attributes are case-insensitive and you cannot use ` + - `v-on to listen to camelCase events when using in-DOM templates. ` + - `You should probably use "${hyphenate(event)}" instead of "${event}".`); - } + if (number) { + args = rawArgs.map(looseToNumber); } - let handlerName; - let handler = props[(handlerName = toHandlerKey(event))] || - // also try camelCase event handler (#2249) - props[(handlerName = toHandlerKey(camelize(event)))]; - // for v-model update:xxx events, also trigger kebab-case equivalent - // for props passed via kebab-case - if (!handler && isModelListener) { - handler = props[(handlerName = toHandlerKey(hyphenate(event)))]; + } + { + devtoolsComponentEmit(instance, event, args); + } + { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); } - if (handler) { - callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } - else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args); + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } } function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== undefined) { - return cached; + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (!isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); } - const raw = comp.emits; - let normalized = {}; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw) => { - const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } + if (comp.extends) { + extendEmits(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, null); - return null; + if (comp.mixins) { + comp.mixins.forEach(extendEmits); } - if (isArray(raw)) { - raw.forEach(key => (normalized[key] = null)); - } - else { - extend(normalized, raw); + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { cache.set(comp, normalized); - return normalized; + } + return normalized; } - // Check if an incoming prop key is a declared emit event listener. - // e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are - // both considered matched listeners. function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ''); - return (hasOwn(options, key[0].toLowerCase() + key.slice(1)) || - hasOwn(options, hyphenate(key)) || - hasOwn(options, key)); + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); } - /** - * mark the current rendering instance for asset resolution (e.g. - * resolveComponent, resolveDirective) during render - */ let currentRenderingInstance = null; let currentScopeId = null; - /** - * Note: rendering calls maybe nested. The function returns the parent rendering - * instance if present, which should be restored after the render is done: - * - * ```js - * const prev = setCurrentRenderingInstance(i) - * // ...render - * setCurrentRenderingInstance(prev) - * ``` - */ function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = (instance && instance.type.__scopeId) || null; - return prev; + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; } - /** - * Set scope id when creating hoisted vnodes. - * @private compiler helper - */ function pushScopeId(id) { - currentScopeId = id; + currentScopeId = id; } - /** - * Technically we no longer need this after 3.0.8 but we need to keep the same - * API for backwards compat w/ code generated by compilers. - * @private - */ function popScopeId() { - currentScopeId = null; + currentScopeId = null; } - /** - * Only for backwards compat - * @private - */ const withScopeId = (_id) => withCtx; - /** - * Wrap a slot function to memoize current rendering instance - * @private compiler helper - */ - function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only - ) { - if (!ctx) - return fn; - // already normalized - if (fn._n) { - return fn; + function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) + return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - const renderFnWithContext = (...args) => { - // If a user calls a compiled slot inside a template expression (#1745), it - // can mess up block tracking, so by default we disable block tracking and - // force bail out when invoking a compiled slot (indicated by the ._d flag). - // This isn't necessary if rendering a compiled `<slot>`, so we flip the - // ._d flag off when invoking the wrapped fn inside `renderSlot`. - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - const res = fn(...args); - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - { - devtoolsComponentUpdated(ctx); - } - return res; - }; - // mark normalized to avoid duplicated wrapping - renderFnWithContext._n = true; - // mark this as compiled by default - // this is used in vnode.ts -> normalizeChildren() to set the slot - // rendering flag. - renderFnWithContext._c = true; - // disable block tracking by default - renderFnWithContext._d = true; - return renderFnWithContext; + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; } - /** - * dev only flag to track whether $attrs was used during render. - * If $attrs was used during render then the warning for failed attrs - * fallthrough can be suppressed. - */ let accessedAttrs = false; function markAttrsAccessed() { - accessedAttrs = true; + accessedAttrs = true; } function renderComponentRoot(instance) { - const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) { - // withProxy is a proxy with a different `has` trap only for - // runtime-compiled render functions using `with` block. - const proxyToUse = withProxy || proxy; - result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx)); - fallthroughAttrs = attrs; + const { + type: Component, + vnode, + proxy, + withProxy, + props, + propsOptions: [propsOptions], + slots, + attrs, + emit, + render, + renderCache, + data, + setupState, + ctx, + inheritAttrs + } = instance; + let result; + let fallthroughAttrs; + const prev = setCurrentRenderingInstance(instance); + { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); } - else { - // functional - const render = Component; - // in dev, mark attrs accessed if optional props (attrs === props) - if (true && attrs === props) { - markAttrsAccessed(); + }) : proxyToUse; + result = normalizeVNode( + render.call( + thisProxy, + proxyToUse, + renderCache, + props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render2 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render2.length > 1 ? render2( + props, + true ? { + get attrs() { + markAttrsAccessed(); + return attrs; + }, + slots, + emit + } : { attrs, slots, emit } + ) : render2( + props, + null + /* we know it doesn't need it */ + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); } - result = normalizeVNode(render.length > 1 - ? render(props, true - ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } - : { attrs, slots, emit }) - : render(props, null /* we know it doesn't need it */)); - fallthroughAttrs = Component.props - ? attrs - : getFunctionalFallthrough(attrs); + } else { + extraAttrs.push(key); + } } - } - catch (err) { - blockStack.length = 0; - handleError(err, instance, 1 /* RENDER_FUNCTION */); - result = createVNode(Comment); - } - // attr merging - // in dev mode, comments are preserved, and it's possible for a template - // to have comments along side the root element which makes it a fragment - let root = result; - let setRoot = undefined; - if (result.patchFlag > 0 && - result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) { - if (propsOptions && keys.some(isModelListener)) { - // If a v-model listener (onUpdate:xxx) has a corresponding declared - // prop, it indicates this component expects to handle v-model and - // it should not fallthrough. - // related: #1543, #1643, #1989 - fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions); - } - root = cloneVNode(root, fallthroughAttrs); - } - else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - // ignore v-model handlers when they fail to fallthrough - if (!isModelListener(key)) { - // remove `on`, lowercase first letter to reflect event casing - // accurately - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } - else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1(`Extraneous non-props attributes (` + - `${extraAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes.`); - } - if (eventAttrs.length) { - warn$1(`Extraneous non-emits event listeners (` + - `${eventAttrs.join(', ')}) ` + - `were passed to component but could not be automatically inherited ` + - `because component renders fragment or text root nodes. ` + - `If the listener is intended to be a component custom event listener only, ` + - `declare it using the "emits" option.`); - } - } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); } - } - // inherit directives - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1(`Runtime directive used on component with non-element root node. ` + - `The directives will not function as intended.`); + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); } - // clone before mutating since the root may be a hoisted vnode - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } } - // inherit transition data - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1(`Component inside <Transition> renders non-element root node ` + - `that cannot be animated.`); - } - root.transition = vnode.transition; + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); } - if (setRoot) { - setRoot(root); + root = cloneVNode(root); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside <Transition> renders non-element root node that cannot be animated.` + ); } - else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; } - /** - * dev only - * In dev mode, template root level comments are rendered, which turns the - * template into a fragment root, but we need to locate the single element - * root for attrs and scope id processing. - */ const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, undefined]; + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } - else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; + }; + return [normalizeVNode(childRoot), setRoot]; }; - function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - // ignore user comment - if (child.type !== Comment || child.children === 'v-if') { - if (singleRoot) { - // has more than 1 non-comment child, return now - return; - } - else { - singleRoot = child; - } - } - } - else { - return; + function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } } + } + } else { + return; } - return singleRoot; + } + return singleRoot; } const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === 'class' || key === 'style' || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; } - return res; + } + return res; }; const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; } - return res; + } + return res; }; const isElementRoot = (vnode) => { - return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) || - vnode.type === Comment // potential v-if branch switch - ); + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; }; function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - // Parent component's render function was hot-updated. Since this may have - // caused the child component's slots content to have changed, we need to - // force the child to update as well. - if ((prevChildren || nextChildren) && isHmrUpdating) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { return true; + } } - // force child update for runtime directive or transition on component vnode. - if (nextVNode.dirs || nextVNode.transition) { - return true; + if (prevProps === nextProps) { + return false; } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024 /* DYNAMIC_SLOTS */) { - // slot content that references values that might have changed, - // e.g. in a v-for - return true; - } - if (patchFlag & 16 /* FULL_PROPS */) { - if (!prevProps) { - return !!nextProps; - } - // presence of this flag indicates props are always non-null - return hasPropsChanged(prevProps, nextProps, emits); - } - else if (patchFlag & 8 /* PROPS */) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emits, key)) { - return true; - } - } - } + if (!prevProps) { + return !!nextProps; } - else { - // this path is only taken by manually written render functions - // so presence of any children leads to a forced update - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); + if (!nextProps) { + return true; } - return false; + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; } function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && - !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; + } + return false; } - function updateHOCHostEl({ vnode, parent }, el // HostNode - ) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; + function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } + } + + const COMPONENTS = "components"; + const DIRECTIVES = "directives"; + function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; + } + const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); + function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } + } + function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); + } + function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } + } + function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } const isSuspense = (type) => type.__isSuspense; - // Suspense exposes a component-like API, and is treated like a component - // in the compiler, but internally it's a special built-in type that hooks - // directly into the renderer. + let suspenseId = 0; const SuspenseImpl = { - name: 'Suspense', - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, - // platform-specific impl passed from renderer - rendererInternals) { - if (n1 == null) { - mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals); - } - else { - patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0) { + n2.suspense = n1.suspense; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren }; - // Force-casted public typing for h and TSX props inference - const Suspense = (SuspenseImpl ); + const Suspense = SuspenseImpl ; function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } } - function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - const { p: patch, o: { createElement } } = rendererInternals; - const hiddenContainer = createElement('div'); - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals)); - // start mounting the content subtree in an off-dom container - patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds); - // now check if we have encountered any async deps - if (suspense.deps > 0) { - // has async - // invoke @fallback event - triggerEvent(vnode, 'onPending'); - triggerEvent(vnode, 'onFallback'); - // mount the fallback tree - patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds); - setActiveBranch(suspense, vnode.ssFallback); - } - else { - // Suspense has no async deps. Just resolve. + function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } + } + function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } } - } - function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = (n2.suspense = n1.suspense); - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - // same root type but content may have changed. - patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else if (isInFallback) { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else { - // toggled before pending tree is resolved - suspense.pendingId++; - if (isHydrating) { - // if toggled before hydration is finished, the current DOM tree is - // no longer valid. set it as the active branch so it will be unmounted - // when resolved - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } - else { - unmount(pendingBranch, parentComponent, suspense); - } - // increment pending ID. this is used to invalidate async callbacks - // reset suspense state - suspense.deps = 0; - // discard effects from pending branch - suspense.effects.length = 0; - // discard previous container - suspense.hiddenContainer = createElement('div'); - if (isInFallback) { - // already in fallback state - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - else { - patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newFallback); - } - } - else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // toggled "back" to current active branch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - // force resolve - suspense.resolve(true); - } - else { - // switched to a 3rd branch - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } - else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - // root did not change, just normal patch - patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, newBranch); - } - else { - // root node toggled - // invoke @pending event - triggerEvent(n2, 'onPending'); - // mount pending branch in off-dom container - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized); - if (suspense.deps <= 0) { - // incoming branch has no async deps, resolve now. - suspense.resolve(); - } - else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } - else if (timeout === 0) { - suspense.fallback(newFallback); - } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); } + } } + } } let hasWarned = false; - function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - /* istanbul ignore if */ - if (!hasWarned) { - hasWarned = true; - // @ts-ignore `console.info` cannot be null error - console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`); + function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + `<Suspense> is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; } - const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals; - const timeout = toNumber(vnode.props && vnode.props.timeout); - const suspense = { - vnode, - parent, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === 'number' ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error(`suspense.resolve() is called without a pending branch.`); - } - if (suspense.isUnmounted) { - throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`); - } - } - const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } - else if (!resume) { - const delayEnter = activeBranch && - pendingBranch.transition && - pendingBranch.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - }; - } - // this is initial anchor on mount - let { anchor } = suspense; - // unmount current active tree - if (activeBranch) { - // if the fallback tree was mounted, it may have been moved - // as part of a parent suspense. get the latest anchor for insertion - anchor = next(activeBranch); - unmount(activeBranch, parentComponent, suspense, true); - } - if (!delayEnter) { - // move content from off-dom container to actual container - move(pendingBranch, container, anchor, 0 /* ENTER */); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - // flush buffered effects - // check if there is a pending parent suspense - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - // found a pending parent suspense, merge buffered post jobs - // into that parent - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - // no pending parent suspense, flush all jobs - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - // invoke @resolve event - triggerEvent(vnode, 'onResolve'); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode, activeBranch, parentComponent, container, isSVG } = suspense; - // invoke @fallback event - triggerEvent(vnode, 'onFallback'); - const anchor = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - // mount the fallback tree - patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context - isSVG, slotScopeIds, optimized); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in'; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - // unmount current active branch - unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now - true // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container, anchor, type) { - suspense.activeBranch && - move(suspense.activeBranch, container, anchor, type); - suspense.container = container; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance - .asyncDep.catch(err => { - handleError(err, instance, 0 /* SETUP_FUNCTION */); - }) - .then(asyncSetupResult => { - // retry when the setup() promise resolves. - // component may have been unmounted before resolve. - if (instance.isUnmounted || - suspense.isUnmounted || - suspense.pendingId !== instance.suspenseId) { - return; - } - // retry from this component - instance.asyncResolved = true; - const { vnode } = instance; - { - pushWarningContext(vnode); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - // vnode may have been replaced if an update happened before the - // async dep is resolved. - vnode.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect(instance, vnode, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode.el); - { - popWarningContext(); - } - // only decrease deps count if suspense is not already resolved - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove); - } - if (suspense.pendingBranch) { - unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove); - } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); } - }; - return suspense; - } - function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - /* eslint-disable no-restricted-globals */ - const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */)); - // there are two possible scenarios for server-rendered suspense: - // - success: ssr content should be fully resolved - // - failure: ssr content should be the fallback branch. - // however, on the client we don't really know if it has failed or not - // attempt to hydrate the DOM assuming it has succeeded, but we still - // need to construct a suspense boundary first - const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized); - if (suspense.deps === 0) { - suspense.resolve(); + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized + ); + if (placeholder) { + remove(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } } - return result; - /* eslint-enable no-restricted-globals */ + }; + return suspense; + } + function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; } function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */; - vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children); - vnode.ssFallback = isSlotChildren - ? normalizeSuspenseSlot(children.fallback) - : createVNode(Comment); + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); } function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - // disableTracking: false - // allow block tracking for compiled slots - // (see ./componentRenderContext.ts) - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild) { - warn$1(`<Suspense> slots expect a single root node.`); - } - s = singleChild; + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter(c => c !== s); + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(`<Suspense> slots expect a single root node.`); } - return s; + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; } function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } - else { - suspense.effects.push(fn); - } - } - else { - queuePostFlushCb(fn); + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); } + } else { + queuePostFlushCb(fn); + } } function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = (vnode.el = branch.el); - // in case suspense is the root node of a component, - // recursively update the HOC el - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } + } + function isVNodeSuspensible(vnode) { + var _a; + return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; } - function provide(key, value) { - if (!currentInstance) { - { - warn$1(`provide() can only be used inside setup().`); - } - } - else { - let provides = currentInstance.provides; - // by default an instance inherits its parent's provides object - // but when it needs to provide values of its own, it creates its - // own provides object using parent provides object as prototype. - // this way in `inject` we can simply look up injections from direct - // parent and let the prototype chain do the work. - const parentProvides = currentInstance.parent && currentInstance.parent.provides; - if (parentProvides === provides) { - provides = currentInstance.provides = Object.create(parentProvides); - } - // TS doesn't allow symbol as index type - provides[key] = value; - } - } - function inject(key, defaultValue, treatDefaultAsFactory = false) { - // fallback to `currentRenderingInstance` so that this can be called in - // a functional component - const instance = currentInstance || currentRenderingInstance; - if (instance) { - // #2400 - // to support `app.use` plugins, - // fallback to appContext's `provides` if the instance is at root - const provides = instance.parent == null - ? instance.vnode.appContext && instance.vnode.appContext.provides - : instance.parent.provides; - if (provides && key in provides) { - // TS doesn't allow symbol as index type - return provides[key]; - } - else if (arguments.length > 1) { - return treatDefaultAsFactory && isFunction(defaultValue) - ? defaultValue.call(instance.proxy) - : defaultValue; - } - else { - warn$1(`injection "${String(key)}" not found.`); - } - } - else { - warn$1(`inject() can only be used inside setup() or functional components.`); - } - } + const ssrContextKey = Symbol.for("v-scx"); + const useSSRContext = () => { + { + warn$1(`useSSRContext() is not supported in the global build.`); + } + }; - // Simple effect. function watchEffect(effect, options) { - return doWatch(effect, null, options); + return doWatch(effect, null, options); } function watchPostEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'post' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "post" }) + ); } function watchSyncEffect(effect, options) { - return doWatch(effect, null, (Object.assign(Object.assign({}, options), { flush: 'sync' }) )); + return doWatch( + effect, + null, + extend({}, options, { flush: "sync" }) + ); } - // initial value for watchers to trigger on undefined initial values const INITIAL_WATCHER_VALUE = {}; - // implementation function watch(source, cb, options) { - if (!isFunction(cb)) { - warn$1(`\`watch(fn, options?)\` signature has been moved to a separate API. ` + - `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` + - `supports \`watch(source, cb, options?) signature.`); - } - return doWatch(source, cb, options); + if (!isFunction(cb)) { + warn$1( + `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` + ); + } + return doWatch(source, cb, options); } - function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - if (!cb) { - if (immediate !== undefined) { - warn$1(`watch() "immediate" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - if (deep !== undefined) { - warn$1(`watch() "deep" option is only respected when using the ` + - `watch(source, callback, options?) signature.`); - } - } - const warnInvalidSource = (s) => { - warn$1(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` + - `a reactive object, or an array of these types.`); + function doWatch(source, cb, { + immediate, + deep, + flush, + once, + onTrack, + onTrigger + } = EMPTY_OBJ) { + if (cb && once) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + unwatch(); }; - const instance = currentInstance; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); + } + if (deep !== void 0 && typeof deep === "number") { + warn$1( + `watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.` + ); + } + if (!cb) { + if (immediate !== void 0) { + warn$1( + `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isReactive(source)) { - getter = () => source; - deep = true; + if (deep !== void 0) { + warn$1( + `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some(s => isReactive(s) || isShallow(s)); - getter = () => source.map(s => { - if (isRef(s)) { - return s.value; - } - else if (isReactive(s)) { - return traverse(s); - } - else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */); - } - else { - warnInvalidSource(s); - } - }); + if (once !== void 0) { + warn$1( + `watch() "once" option is only respected when using the watch(source, callback, options?) signature.` + ); } - else if (isFunction(source)) { - if (cb) { - // getter with cb - getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */); - } - else { - // no cb -> simple effect - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]); - }; - } - } - else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */); - }; - }; - let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; - } - if (cb) { - // watch(source, cb) - const newValue = effect.run(); - if (deep || - forceTrigger || - (isMultiSource - ? newValue.some((v, i) => hasChanged(v, oldValue[i])) - : hasChanged(newValue, oldValue)) || - (false )) { - // cleanup before running cb again - if (cleanup) { - cleanup(); - } - callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue, - onCleanup - ]); - oldValue = newValue; - } - } - else { - // watchEffect - effect.run(); - } - }; - // important: mark the job as a watcher callback so that scheduler knows - // it is allowed to self-trigger (#1727) - job.allowRecurse = !!cb; - let scheduler; - if (flush === 'sync') { - scheduler = job; // the scheduler function gets called directly - } - else if (flush === 'post') { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } - else { - // default: 'pre' - scheduler = () => queuePreFlushCb(job); - } - const effect = new ReactiveEffect(getter, scheduler); - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - // initial run + } + const warnInvalidSource = (s) => { + warn$1( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const instance = currentInstance; + const reactiveGetter = (source2) => deep === true ? source2 : ( + // for deep: false, only traverse root-level properties + traverse(source2, deep === false ? 1 : void 0) + ); + let getter; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return callWithErrorHandling(s, instance, 2); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { if (cb) { - if (immediate) { - job(); - } - else { - oldValue = effect.run(); + getter = () => callWithErrorHandling(source, instance, 2); + } else { + getter = () => { + if (cleanup) { + cleanup(); } + return callWithAsyncErrorHandling( + source, + instance, + 3, + [onCleanup] + ); + }; } - else if (flush === 'post') { - queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense); - } - else { - effect.run(); - } - return () => { - effect.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect); - } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + getter = () => traverse(baseGetter()); + } + let cleanup; + let onCleanup = (fn) => { + cleanup = effect.onStop = () => { + callWithErrorHandling(fn, instance, 4); + cleanup = effect.onStop = void 0; }; + }; + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = () => { + if (!effect.active || !effect.dirty) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) { + if (cleanup) { + cleanup(); + } + callWithAsyncErrorHandling(cb, instance, 3, [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + onCleanup + ]); + oldValue = newValue; + } + } else { + effect.run(); + } + }; + job.allowRecurse = !!cb; + let scheduler; + if (flush === "sync") { + scheduler = job; + } else if (flush === "post") { + scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); + } else { + job.pre = true; + if (instance) + job.id = instance.uid; + scheduler = () => queueJob(job); + } + const effect = new ReactiveEffect(getter, NOOP, scheduler); + const scope = getCurrentScope(); + const unwatch = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + { + effect.onTrack = onTrack; + effect.onTrigger = onTrigger; + } + if (cb) { + if (immediate) { + job(); + } else { + oldValue = effect.run(); + } + } else if (flush === "post") { + queuePostRenderEffect( + effect.run.bind(effect), + instance && instance.suspense + ); + } else { + effect.run(); + } + return unwatch; } - // this.$watch function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) - ? source.includes('.') - ? createPathGetter(publicThis, source) - : () => publicThis[source] - : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } - else { - cb = value.handler; - options = value; - } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } - else { - unsetCurrentInstance(); - } - return res; + const publicThis = this.proxy; + const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); + let cb; + if (isFunction(value)) { + cb = value; + } else { + cb = value.handler; + options = value; + } + const reset = setCurrentInstance(this); + const res = doWatch(getter, cb.bind(publicThis), options); + reset(); + return res; } function createPathGetter(ctx, path) { - const segments = path.split('.'); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; + const segments = path.split("."); + return () => { + let cur = ctx; + for (let i = 0; i < segments.length && cur; i++) { + cur = cur[segments[i]]; + } + return cur; + }; } - function traverse(value, seen) { - if (!isObject(value) || value["__v_skip" /* SKIP */]) { - return value; - } - seen = seen || new Set(); - if (seen.has(value)) { - return value; - } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } - else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); - } - } - else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } - else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); - } - } + function traverse(value, depth, currentDepth = 0, seen) { + if (!isObject(value) || value["__v_skip"]) { return value; + } + if (depth && depth > 0) { + if (currentDepth >= depth) { + return value; + } + currentDepth++; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + if (isRef(value)) { + traverse(value.value, depth, currentDepth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, currentDepth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, currentDepth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, currentDepth, seen); + } + } + return value; } + function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } + } + function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getExposeProxy(currentRenderingInstance) || currentRenderingInstance.proxy; + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; + } + function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } + } + + const leaveCbKey = Symbol("_leaveCb"); + const enterCbKey$1 = Symbol("_enterCb"); function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: new Map() - }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; - }); - return state; + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; } const TransitionHookValidator = [Function, Array]; - const BaseTransitionImpl = { - name: `BaseTransition`, - props: { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; - } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - // locate first non-comment child - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - // warn more than one non-comment child - warn$1('<transition> can only be used on a single element or component. ' + - 'Use <transition-group> for lists.'); - break; - } - child = c; - hasFound = true; - } - } - } - // there's no need to track reactivity for these props so use the raw - // props for a bit better perf - const rawProps = toRaw(props); - const { mode } = rawProps; - // check mode - if (mode && - mode !== 'in-out' && - mode !== 'out-in' && - mode !== 'default') { - warn$1(`invalid <transition> mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - // in the case of <transition><keep-alive/></transition>, we need to - // compare the type of the kept-alive children. - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === undefined) { - prevTransitionKey = key; - } - else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - // handle mode - if (oldInnerChild && - oldInnerChild.type !== Comment && - (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance); - // update old tree's hooks in case of dynamic transition - setTransitionHooks(oldInnerChild, leavingHooks); - // switching between different views - if (mode === 'out-in') { - state.isLeaving = true; - // return placeholder node and queue update when leave finishes - leavingHooks.afterLeave = () => { - state.isLeaving = false; - instance.update(); - }; - return emptyPlaceholder(child); - } - else if (mode === 'in-out' && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - // early removal callback - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = undefined; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; - } - } - return child; - }; - } + const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator + }; + const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevTransitionKey; + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + "<transition> can only be used on a single element or component. Use <transition-group> for lists." + ); + break; + } + child = c; + hasFound = true; + } + } + } + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid <transition> mode: ${mode}`); + } + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getKeepAliveChild(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + const enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance + ); + setTransitionHooks(innerChild, enterHooks); + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getKeepAliveChild(oldChild); + let transitionKeyChanged = false; + const { getTransitionKey } = innerChild.type; + if (getTransitionKey) { + const key = getTransitionKey(); + if (prevTransitionKey === void 0) { + prevTransitionKey = key; + } else if (key !== prevTransitionKey) { + prevTransitionKey = key; + transitionKeyChanged = true; + } + } + if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in") { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (instance.update.active !== false) { + instance.effect.dirty = true; + instance.update(); + } + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } }; - // export the public type for h/tsx inference - // also to avoid inline import() in generated d.ts files const BaseTransition = BaseTransitionImpl; function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; } - // The transition hooks are attached to the vnode as vnode.transition - // and will be called at appropriate timing in the renderer. function resolveTransitionHooks(vnode, props, state, instance) { - const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && - callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every(hook => hook.length <= 1)) - done(); - } - else if (hook.length <= 1) { - done(); - } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } - else { - return; - } - } - // for same element (v-show) - if (el._leaveCb) { - el._leaveCb(true /* cancelled */); - } - // for toggled element with same key (v-if) - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && - isSameVNodeType(vnode, leavingVNode) && - leavingVNode.el._leaveCb) { - // force early removal (not cancelled) - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; - } - else { - return; - } - } - let called = false; - const done = (el._enterCb = (cancelled) => { - if (called) - return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } - else { - callHook(afterHook, [el]); - } - if (hooks.delayedLeave) { - hooks.delayedLeave(); - } - el._enterCb = undefined; - }); - if (hook) { - callAsyncHook(hook, [el, done]); - } - else { - done(); - } - }, - leave(el, remove) { - const key = String(vnode.key); - if (el._enterCb) { - el._enterCb(true /* cancelled */); - } - if (state.isUnmounting) { - return remove(); - } - callHook(onBeforeLeave, [el]); - let called = false; - const done = (el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } - else { - callHook(onAfterLeave, [el]); - } - el._leaveCb = undefined; - if (leavingVNodesCache[key] === vnode) { - delete leavingVNodesCache[key]; - } - }); - leavingVNodesCache[key] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); - } - else { - done(); - } - }, - clone(vnode) { - return resolveTransitionHooks(vnode, props, state, instance); - } - }; - return hooks; - } - // the placeholder really only handles one special case: KeepAlive - // in the case of a KeepAlive in a leave phase we need to return a KeepAlive - // placeholder with empty content to avoid the KeepAlive instance from being - // unmounted. - function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) + done(); + } else if (hook.length <= 1) { + done(); } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) + return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) + return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + return resolveTransitionHooks(vnode2, props, state, instance); + } + }; + return hooks; + } + function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } } function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) - ? vnode.children - ? vnode.children[0] - : undefined - : vnode; + return isKeepAlive(vnode) ? ( + // #7121 ensure get the child component subtree in case + // it's been replaced during HMR + vnode.component ? vnode.component.subTree : vnode.children ? vnode.children[0] : void 0 + ) : vnode; } function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } - else if (vnode.shapeFlag & 128 /* SUSPENSE */) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } - else { - vnode.transition = hooks; - } + if (vnode.shapeFlag & 6 && vnode.component) { + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } } function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - // #5360 inherit parent key in case of <template v-for> - const key = parentKey == null - ? child.key - : String(parentKey) + String(child.key != null ? child.key : i); - // handle fragment children case, e.g. v-for - if (child.type === Fragment) { - if (child.patchFlag & 128 /* KEYED_FRAGMENT */) - keyedFragmentCount++; - ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key)); - } - // comment placeholders should be skipped, e.g. v-if - else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); - } + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) + keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); } - // #1126 if a transition children list contains multiple sub fragments, these - // fragments will be merged into a flat children array. Since each v-for - // fragment may contain different static bindings inside, we need to de-op - // these children to force full diffs to ensure correct behavior. - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2 /* BAIL */; - } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; } - return ret; + } + return ret; } - // implementation, close to no-op - function defineComponent(options) { - return isFunction(options) ? { setup: options, name: options.name } : options; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; } const isAsyncWrapper = (i) => !!i.type.__asyncLoader; + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out - suspensible = true, onError: userOnError } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return (pendingRequest || - (thisRequest = pendingRequest = - loader() - .catch(err => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } - else { - throw err; - } - }) - .then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1(`Async component loader resolved to undefined. ` + - `If you are using retry(), make sure to return its return value.`); - } - // interop module default - if (comp && - (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - }))); - }; - return defineComponent({ - name: 'AsyncComponentWrapper', - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - // already resolved - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */); - }; - // suspense-controlled or SSR. - if ((suspensible && instance.suspense) || - (false )) { - return load() - .then(comp => { - return () => createInnerComp(comp, instance); - }) - .catch(err => { - onError(err); - return () => errorComponent - ? createVNode(errorComponent, { - error: err - }) - : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error(`Async component timed out after ${timeout}ms.`); - onError(err); - error.value = err; - } - }, timeout); - } - load() - .then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - // parent is keep-alive, force update so the loaded component's - // name is taken into account - queueJob(instance.parent.update); - } - }) - .catch(err => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } - else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } - else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || false) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); } - }); + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); } - function createInnerComp(comp, { vnode: { ref, props, children, shapeFlag }, parent }) { - const vnode = createVNode(comp, props, children); - // ensure inner component inherits the async wrapper's ref owner - vnode.ref = ref; - return vnode; + function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; } const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - // KeepAlive communicates with the instantiated renderer via the - // ctx where the renderer passes in its internals, - // and the KeepAlive instance exposes activate/deactivate implementations. - // The whole point of this is to avoid importing KeepAlive directly in the - // renderer to facilitate tree-shaking. - const sharedContext = instance.ctx; - const cache = new Map(); - const keys = new Set(); - let current = null; - { - instance.__v_cache = cache; - } - const parentSuspense = instance.suspense; - const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext; - const storageContainer = createElement('div'); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance = vnode.component; - move(vnode, container, anchor, 0 /* ENTER */, parentSuspense); - // in case props have changed - patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized); - queuePostRenderEffect(() => { - instance.isDeactivated = false; - if (instance.a) { - invokeArrayFns(instance.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - sharedContext.deactivate = (vnode) => { - const instance = vnode.component; - move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense); - queuePostRenderEffect(() => { - if (instance.da) { - invokeArrayFns(instance.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance.parent, vnode); - } - instance.isDeactivated = true; - }, parentSuspense); - { - // Update components tree - devtoolsComponentAdded(instance); - } - }; - function unmount(vnode) { - // reset the shapeFlag so it can be properly unmounted - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); - } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); - } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || cached.type !== current.type) { - unmount(cached); - } - else if (current) { - // current active instance should no longer be kept-alive. - // we can't unmount it now but it might be later, so reset its flag now. - resetShapeFlag(current); - } - cache.delete(key); - keys.delete(key); - } - // prune cache on include/exclude prop change - watch(() => [props.include, props.exclude], ([include, exclude]) => { - include && pruneCache(name => matches(include, name)); - exclude && pruneCache(name => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: 'post', deep: true }); - // cache sub tree after render - let pendingCacheKey = null; - const cacheSubtree = () => { - // fix #1621, the pendingCacheKey could be 0 - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); - } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach(cached => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type) { - // current instance will be unmounted as part of keep-alive's unmount - resetShapeFlag(vnode); - // but invoke its deactivated hook here - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; - } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn$1(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } - else if (!isVNode(rawVNode) || - (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) && - !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) { - current = null; - return rawVNode; - } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - // for async components, name check should be based in its loaded - // inner component if available - const name = getComponentName(isAsyncWrapper(vnode) - ? vnode.type.__asyncResolved || {} - : comp); - const { include, exclude, max } = props; - if ((include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name))) { - current = vnode; - return rawVNode; - } - const key = vnode.key == null ? comp : vnode.key; - const cachedVNode = cache.get(key); - // clone vnode if it's reused because we are going to mutate it - if (vnode.el) { - vnode = cloneVNode(vnode); - if (rawVNode.shapeFlag & 128 /* SUSPENSE */) { - rawVNode.ssContent = vnode; - } - } - // #1513 it's possible for the returned vnode to be cloned due to attr - // fallthrough or scopeId, so the vnode here may not be the final vnode - // that is mounted. Instead of caching it directly, we store the pending - // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. - pendingCacheKey = key; - if (cachedVNode) { - // copy over mounted state - vnode.el = cachedVNode.el; - vnode.component = cachedVNode.component; - if (vnode.transition) { - // recursively update transition hooks on subTree - setTransitionHooks(vnode, vnode.transition); - } - // avoid vnode being mounted as fresh - vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */; - // make this key the freshest - keys.delete(key); - keys.add(key); - } - else { - keys.add(key); - // prune oldest entry - if (max && keys.size > parseInt(max, 10)) { - pruneCacheEntry(keys.values().next().value); - } - } - // avoid vnode being unmounted - vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - current = vnode; - return isSuspense(rawVNode.type) ? rawVNode : vnode; - }; + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); + } + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && (!filter || !filter(name))) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (!current || !isSameVNodeType(cached, current)) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); + } + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } }; - // export the public type for h/tsx inference - // also to avoid inline import() in generated d.ts files const KeepAlive = KeepAliveImpl; function matches(pattern, name) { - if (isArray(pattern)) { - return pattern.some((p) => matches(p, name)); - } - else if (isString(pattern)) { - return pattern.split(',').includes(name); - } - else if (pattern.test) { - return pattern.test(name); - } - /* istanbul ignore next */ - return false; + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + return pattern.test(name); + } + return false; } function onActivated(hook, target) { - registerKeepAliveHook(hook, "a" /* ACTIVATED */, target); + registerKeepAliveHook(hook, "a", target); } function onDeactivated(hook, target) { - registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target); + registerKeepAliveHook(hook, "da", target); } function registerKeepAliveHook(hook, type, target = currentInstance) { - // cache the deactivate branch check wrapper for injected hooks so the same - // hook can be properly deduped by the scheduler. "__wdc" stands for "with - // deactivation check". - const wrappedHook = hook.__wdc || - (hook.__wdc = () => { - // only fire the hook if the target instance is NOT in a deactivated branch. - let current = target; - while (current) { - if (current.isDeactivated) { - return; - } - current = current.parent; - } - return hook(); - }); - injectHook(type, wrappedHook, target); - // In addition to registering it on the target instance, we walk up the parent - // chain and register it on all ancestor instances that are keep-alive roots. - // This avoids the need to walk the entire component tree when invoking these - // hooks, and more importantly, avoids the need to track child components in - // arrays. - if (target) { - let current = target.parent; - while (current && current.parent) { - if (isKeepAlive(current.parent.vnode)) { - injectToKeepAliveRoot(wrappedHook, type, target, current); - } - current = current.parent; - } + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } } function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { - // injectHook wraps the original for error handling, so make sure to remove - // the wrapped version. - const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */); - onUnmounted(() => { - remove(keepAliveRoot[type], injected); - }, target); + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); } function resetShapeFlag(vnode) { - let shapeFlag = vnode.shapeFlag; - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */; - } - if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */; - } - vnode.shapeFlag = shapeFlag; + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; } function getInnerChild(vnode) { - return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode; + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - // cache the error handling wrapper for injected hooks so the same hook - // can be properly deduped by the scheduler. "__weh" stands for "with error - // handling". - const wrappedHook = hook.__weh || - (hook.__weh = (...args) => { - if (target.isUnmounted) { - return; - } - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - // Set currentInstance during hook invocation. - // This assumes the hook does not synchronously trigger other hooks, which - // can only be false when the user does something really funky. - setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - unsetCurrentInstance(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } - else { - hooks.push(wrappedHook); - } - return wrappedHook; - } - else { - const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, '')); - warn$1(`${apiName} is called when there is no active component instance to be ` + - `associated with. ` + - `Lifecycle injection APIs can only be used during execution of setup().` + - (` If you are using async setup(), make sure to register lifecycle ` + - `hooks before the first await statement.` - )); + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + if (target.isUnmounted) { + return; + } + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } } - const createHook = (lifecycle) => (hook, target = currentInstance) => - // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) - (!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) && - injectHook(lifecycle, hook, target); - const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */); - const onMounted = createHook("m" /* MOUNTED */); - const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */); - const onUpdated = createHook("u" /* UPDATED */); - const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */); - const onUnmounted = createHook("um" /* UNMOUNTED */); - const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */); - const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */); - const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */); + const createHook = (lifecycle) => (hook, target = currentInstance) => ( + // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) + (!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target) + ); + const onBeforeMount = createHook("bm"); + const onMounted = createHook("m"); + const onBeforeUpdate = createHook("bu"); + const onUpdated = createHook("u"); + const onBeforeUnmount = createHook("bum"); + const onUnmounted = createHook("um"); + const onServerPrefetch = createHook("sp"); + const onRenderTriggered = createHook( + "rtg" + ); + const onRenderTracked = createHook( + "rtc" + ); function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec" /* ERROR_CAPTURED */, hook, target); + injectHook("ec", hook, target); } - /** - Runtime helper for applying directives to a vnode. Example usage: - - const comp = resolveComponent('comp') - const foo = resolveDirective('foo') - const bar = resolveDirective('bar') - - return withDirectives(h(comp), [ - [foo, this.x], - [bar, this.y] - ]) - */ - function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1('Do not use built-in directive ids as custom directive id: ' + name); - } - } - /** - * Adds directives to a VNode. - */ - function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getExposeProxy(internalInstance) || - internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - return vnode; - } - function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - // disable tracking inside all lifecycle hooks - // since they can potentially be called inside effects. - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } - } - - const COMPONENTS = 'components'; - const DIRECTIVES = 'directives'; - /** - * @private - */ - function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; - } - const NULL_DYNAMIC_COMPONENT = Symbol(); - /** - * @private - */ - function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } - else { - // invalid types will fallthrough to createVNode and raise warning - return (component || NULL_DYNAMIC_COMPONENT); - } - } - /** - * @private - */ - function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); - } - // implementation - function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - // explicit self name has highest priority - if (type === COMPONENTS) { - const selfName = getComponentName(Component); - if (selfName && - (selfName === name || - selfName === camelize(name) || - selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || - // global registration - resolve(instance.appContext[type], name); - if (!res && maybeSelfReference) { - // fallback to implicit self-reference - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS - ? `\nIf this is a native custom element, make sure to exclude it from ` + - `component resolution via compilerOptions.isCustomElement.` - : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } - else { - warn$1(`resolve${capitalize(type.slice(0, -1))} ` + - `can only be used in render() or setup().`); - } - } - function resolve(registry, name) { - return (registry && - (registry[name] || - registry[camelize(name)] || - registry[capitalize(camelize(name))])); - } - - /** - * Actual implementation - */ function renderList(source, renderItem, cache, index) { - let ret; - const cached = (cache && cache[index]); - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, undefined, cached && cached[i]); - } + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); } - else if (typeof source === 'number') { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]); - } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); } - else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i])); - } - else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); } - else { - ret = []; + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } } - if (cache) { - cache[index] = ret; - } - return ret; + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; } - /** - * Compiler runtime helper for creating dynamic slots object - * @private - */ function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - // array of dynamic slot generated by <template v-for="..." #[...]> - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } - else if (slot) { - // conditional single slot generated by <template v-if="..." #foo> - slots[slot.name] = slot.fn; - } + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) + res.key = slot.key; + return res; + } : slot.fn; } - return slots; + } + return slots; } - /** - * Compiler runtime helper for rendering `<slot/>` - * @private - */ - function renderSlot(slots, name, props = {}, - // this is not a user-facing function, so the fallback is always generated by - // the compiler and guaranteed to be a function returning an array - fallback, noSlotted) { - if (currentRenderingInstance.isCE || - (currentRenderingInstance.parent && - isAsyncWrapper(currentRenderingInstance.parent) && - currentRenderingInstance.parent.isCE)) { - return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1(`SSR-optimized slot function detected in a non-SSR-optimized render ` + - `function. You need to mark this component with $dynamic-slots in the ` + - `parent template.`); - slot = () => []; - } - // a compiled slot disables block tracking by default to avoid manual - // invocation interfering with template-based block tracking, but in - // `renderSlot` we can be sure that it's template-based so we can force - // enable it. - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */ - ? 64 /* STABLE_FRAGMENT */ - : -2 /* BAIL */); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + '-s']; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; + function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") + props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; } function ensureValidVNode(vnodes) { - return vnodes.some(child => { - if (!isVNode(child)) - return true; - if (child.type === Comment) - return false; - if (child.type === Fragment && - !ensureValidVNode(child.children)) - return false; - return true; - }) - ? vnodes - : null; + return vnodes.some((child) => { + if (!isVNode(child)) + return true; + if (child.type === Comment) + return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; } - /** - * For prefixing keys in v-on="obj" with "on" - * @private - */ - function toHandlers(obj) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[toHandlerKey(key)] = obj[key]; - } + function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; } - /** - * #2437 In Vue 3, functional components do not have a public instance proxy but - * they exist in the internal parent chain. For code that relies on traversing - * public $parent chains, skip functional ones and go to the parent instead. - */ const getPublicInstance = (i) => { - if (!i) - return null; - if (isStatefulComponent(i)) - return getExposeProxy(i) || i.proxy; - return getPublicInstance(i.parent); + if (!i) + return null; + if (isStatefulComponent(i)) + return getExposeProxy(i) || i.proxy; + return getPublicInstance(i.parent); }; - const publicPropertiesMap = - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - /*#__PURE__*/ extend(Object.create(null), { - $: i => i, - $el: i => i.vnode.el, - $data: i => i.data, - $props: i => (shallowReadonly(i.props) ), - $attrs: i => (shallowReadonly(i.attrs) ), - $slots: i => (shallowReadonly(i.slots) ), - $refs: i => (shallowReadonly(i.refs) ), - $parent: i => getPublicInstance(i.parent), - $root: i => getPublicInstance(i.root), - $emit: i => i.emit, - $options: i => (resolveMergedOptions(i) ), - $forceUpdate: i => i.f || (i.f = () => queueJob(i.update)), - $nextTick: i => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: i => (instanceWatch.bind(i) ) - }); - const isReservedPrefix = (key) => key === '_' || key === '$'; + const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) + ); + const isReservedPrefix = (key) => key === "_" || key === "$"; + const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); const PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - // for internal formatters to know that this is a Vue instance - if (key === '__isVue') { - return true; - } - // prioritize <script setup> bindings during dev. - // this allows even properties that start with _ or $ to be used - so that - // it aligns with the production behavior where the render fn is inlined and - // indeed has access to all declared variables. - if (setupState !== EMPTY_OBJ && - setupState.__isScriptSetup && - hasOwn(setupState, key)) { - return setupState[key]; - } - // data / props / ctx - // This getter gets called for every property access on the render context - // during render and is a major hotspot. The most expensive part of this - // is the multiple hasOwn() calls. It's much faster to do a simple property - // access on a plain object, so we use an accessCache object (with null - // prototype) to memoize what access type a key corresponds to. - let normalizedProps; - if (key[0] !== '$') { - const n = accessCache[key]; - if (n !== undefined) { - switch (n) { - case 1 /* SETUP */: - return setupState[key]; - case 2 /* DATA */: - return data[key]; - case 4 /* CONTEXT */: - return ctx[key]; - case 3 /* PROPS */: - return props[key]; - // default: just fallthrough - } - } - else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - accessCache[key] = 1 /* SETUP */; - return setupState[key]; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2 /* DATA */; - return data[key]; - } - else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && - hasOwn(normalizedProps, key)) { - accessCache[key] = 3 /* PROPS */; - return props[key]; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if (shouldCacheAccess) { - accessCache[key] = 0 /* OTHER */; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - // public $xxx properties - if (publicGetter) { - if (key === '$attrs') { - track(instance, "get" /* GET */, key); - markAttrsAccessed(); - } - return publicGetter(instance); - } - else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && - (cssModule = cssModule[key])) { - return cssModule; - } - else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - // user may set custom properties to `this` that start with `$` - accessCache[key] = 4 /* CONTEXT */; - return ctx[key]; - } - else if ( - // global properties - ((globalProperties = appContext.config.globalProperties), - hasOwn(globalProperties, key))) { - { - return globalProperties[key]; - } - } - else if (currentRenderingInstance && - (!isString(key) || - // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf('__v') !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` + - `character ("$" or "_") and is not proxied on the render context.`); - } - else if (instance === currentRenderingInstance) { - warn$1(`Property ${JSON.stringify(key)} was accessed during render ` + - `but is not defined on instance.`); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) { - setupState[key] = value; - return true; - } - else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - data[key] = value; - return true; - } - else if (hasOwn(instance.props, key)) { - warn$1(`Attempting to mutate prop "${key}". Props are readonly.`, instance); - return false; - } - if (key[0] === '$' && key.slice(1) in instance) { - warn$1(`Attempting to mutate public property "${key}". ` + - `Properties starting with $ are reserved and readonly.`, instance); - return false; - } - else { - if (key in instance.appContext.config.globalProperties) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - value - }); - } - else { - ctx[key] = value; - } - } - return true; - }, - has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) { - let normalizedProps; - return (!!accessCache[key] || - (data !== EMPTY_OBJ && hasOwn(data, key)) || - (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) || - ((normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key)) || - hasOwn(ctx, key) || - hasOwn(publicPropertiesMap, key) || - hasOwn(appContext.config.globalProperties, key)); - }, - defineProperty(target, key, descriptor) { - if (descriptor.get != null) { - // invalidate key cache of a getter based property #5417 - target._.accessCache[key] = 0; - } - else if (hasOwn(descriptor, 'value')) { - this.set(target, key, descriptor.value, null); - } - return Reflect.defineProperty(target, key, descriptor); + get({ _: instance }, key) { + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance, "get", key); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`); + return false; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + warn$1(`Attempting to mutate prop "${key}". Props are readonly.`); + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + warn$1( + `Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.` + ); + return false; + } else { + if (key in instance.appContext.config.globalProperties) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + value + }); + } else { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } }; { - PublicInstanceProxyHandlers.ownKeys = (target) => { - warn$1(`Avoid app logic that relies on enumerating keys on a component instance. ` + - `The keys will be empty in production mode to avoid performance overhead.`); - return Reflect.ownKeys(target); - }; + PublicInstanceProxyHandlers.ownKeys = (target) => { + warn$1( + `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.` + ); + return Reflect.ownKeys(target); + }; } - const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, PublicInstanceProxyHandlers, { + const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend( + {}, + PublicInstanceProxyHandlers, + { get(target, key) { - // fast path for unscopables when using `with` block - if (key === Symbol.unscopables) { - return; - } - return PublicInstanceProxyHandlers.get(target, key, target); + if (key === Symbol.unscopables) { + return; + } + return PublicInstanceProxyHandlers.get(target, key, target); }, has(_, key) { - const has = key[0] !== '_' && !isGloballyWhitelisted(key); - if (!has && PublicInstanceProxyHandlers.has(_, key)) { - warn$1(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`); - } - return has; + const has = key[0] !== "_" && !isGloballyAllowed(key); + if (!has && PublicInstanceProxyHandlers.has(_, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} should not start with _ which is a reserved prefix for Vue internals.` + ); + } + return has; } - }); - // dev only - // In dev mode, the proxy target exposes the same properties as seen on `this` - // for easier console inspection. In prod mode it will be an empty object so - // these properties definitions can be skipped. + } + ); function createDevRenderContext(instance) { - const target = {}; - // expose internal instance for proxy handlers - Object.defineProperty(target, `_`, { - configurable: true, - enumerable: false, - get: () => instance + const target = {}; + Object.defineProperty(target, `_`, { + configurable: true, + enumerable: false, + get: () => instance + }); + Object.keys(publicPropertiesMap).forEach((key) => { + Object.defineProperty(target, key, { + configurable: true, + enumerable: false, + get: () => publicPropertiesMap[key](instance), + // intercepted by the proxy so no need for implementation, + // but needed to prevent set errors + set: NOOP }); - // expose public properties - Object.keys(publicPropertiesMap).forEach(key => { - Object.defineProperty(target, key, { - configurable: true, - enumerable: false, - get: () => publicPropertiesMap[key](instance), - // intercepted by the proxy so no need for implementation, - // but needed to prevent set errors - set: NOOP - }); - }); - return target; + }); + return target; } - // dev only function exposePropsOnRenderContext(instance) { - const { ctx, propsOptions: [propsOptions] } = instance; - if (propsOptions) { - Object.keys(propsOptions).forEach(key => { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => instance.props[key], - set: NOOP - }); - }); - } - } - // dev only - function exposeSetupStateOnRenderContext(instance) { - const { ctx, setupState } = instance; - Object.keys(toRaw(setupState)).forEach(key => { - if (!setupState.__isScriptSetup) { - if (isReservedPrefix(key[0])) { - warn$1(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` + - `which are reserved prefixes for Vue internals.`); - return; - } - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => setupState[key], - set: NOOP - }); - } + const { + ctx, + propsOptions: [propsOptions] + } = instance; + if (propsOptions) { + Object.keys(propsOptions).forEach((key) => { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => instance.props[key], + set: NOOP + }); }); + } + } + function exposeSetupStateOnRenderContext(instance) { + const { ctx, setupState } = instance; + Object.keys(toRaw(setupState)).forEach((key) => { + if (!setupState.__isScriptSetup) { + if (isReservedPrefix(key[0])) { + warn$1( + `setup() return property ${JSON.stringify( + key + )} should not start with "$" or "_" which are reserved prefixes for Vue internals.` + ); + return; + } + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => setupState[key], + set: NOOP + }); + } + }); + } + + const warnRuntimeUsage = (method) => warn$1( + `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.` + ); + function defineProps() { + { + warnRuntimeUsage(`defineProps`); + } + return null; + } + function defineEmits() { + { + warnRuntimeUsage(`defineEmits`); + } + return null; + } + function defineExpose(exposed) { + { + warnRuntimeUsage(`defineExpose`); + } + } + function defineOptions(options) { + { + warnRuntimeUsage(`defineOptions`); + } + } + function defineSlots() { + { + warnRuntimeUsage(`defineSlots`); + } + return null; + } + function defineModel() { + { + warnRuntimeUsage("defineModel"); + } + } + function withDefaults(props, defaults) { + { + warnRuntimeUsage(`withDefaults`); + } + return null; + } + function useSlots() { + return getContext().slots; + } + function useAttrs() { + return getContext().attrs; + } + function getContext() { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useContext() called without active instance.`); + } + return i.setupContext || (i.setupContext = createSetupContext(i)); + } + function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p) => (normalized[p] = null, normalized), + {} + ) : props; + } + function mergeDefaults(raw, defaults) { + const props = normalizePropsOrEmits(raw); + for (const key in defaults) { + if (key.startsWith("__skip")) + continue; + let opt = props[key]; + if (opt) { + if (isArray(opt) || isFunction(opt)) { + opt = props[key] = { type: opt, default: defaults[key] }; + } else { + opt.default = defaults[key]; + } + } else if (opt === null) { + opt = props[key] = { default: defaults[key] }; + } else { + warn$1(`props default key "${key}" has no corresponding declaration.`); + } + if (opt && defaults[`__skip_${key}`]) { + opt.skipFactory = true; + } + } + return props; + } + function mergeModels(a, b) { + if (!a || !b) + return a || b; + if (isArray(a) && isArray(b)) + return a.concat(b); + return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b)); + } + function createPropsRestProxy(props, excludedKeys) { + const ret = {}; + for (const key in props) { + if (!excludedKeys.includes(key)) { + Object.defineProperty(ret, key, { + enumerable: true, + get: () => props[key] + }); + } + } + return ret; + } + function withAsyncContext(getAwaitable) { + const ctx = getCurrentInstance(); + if (!ctx) { + warn$1( + `withAsyncContext called without active current instance. This is likely a bug.` + ); + } + let awaitable = getAwaitable(); + unsetCurrentInstance(); + if (isPromise(awaitable)) { + awaitable = awaitable.catch((e) => { + setCurrentInstance(ctx); + throw e; + }); + } + return [awaitable, () => setCurrentInstance(ctx)]; } function createDuplicateChecker() { - const cache = Object.create(null); - return (type, key) => { - if (cache[key]) { - warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); - } - else { - cache[key] = type; - } - }; + const cache = /* @__PURE__ */ Object.create(null); + return (type, key) => { + if (cache[key]) { + warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`); + } else { + cache[key] = type; + } + }; } let shouldCacheAccess = true; function applyOptions(instance) { - const options = resolveMergedOptions(instance); - const publicThis = instance.proxy; - const ctx = instance.ctx; - // do not cache property access on public proxy during state initialization - shouldCacheAccess = false; - // call beforeCreate first before accessing other options since - // the hook may mutate resolved options (#2791) - if (options.beforeCreate) { - callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */); - } - const { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { // state - data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, // lifecycle - created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch, + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, // public API - expose, inheritAttrs, + expose, + inheritAttrs, // assets - components, directives, filters } = options; - const checkDuplicateProperties = createDuplicateChecker() ; - { - const [propsOptions] = instance.propsOptions; - if (propsOptions) { - for (const key in propsOptions) { - checkDuplicateProperties("Props" /* PROPS */, key); - } - } + components, + directives, + filters + } = options; + const checkDuplicateProperties = createDuplicateChecker() ; + { + const [propsOptions] = instance.propsOptions; + if (propsOptions) { + for (const key in propsOptions) { + checkDuplicateProperties("Props" /* PROPS */, key); + } } - // options initialization order (to be consistent with Vue 2): - // - props (already done outside of this function) - // - inject - // - methods - // - data (deferred since it relies on `this` access) - // - computed - // - watch (deferred since it relies on `this` access) - if (injectOptions) { - resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef); - } - if (methods) { - for (const key in methods) { - const methodHandler = methods[key]; - if (isFunction(methodHandler)) { - // In dev mode, we use the `createRenderContext` function to define - // methods to the proxy target, and those are read-only but - // reconfigurable, so it needs to be redefined here - { - Object.defineProperty(ctx, key, { - value: methodHandler.bind(publicThis), - configurable: true, - enumerable: true, - writable: true - }); - } - { - checkDuplicateProperties("Methods" /* METHODS */, key); - } - } - else { - warn$1(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` + - `Did you reference the function correctly?`); - } - } - } - if (dataOptions) { - if (!isFunction(dataOptions)) { - warn$1(`The data option must be a function. ` + - `Plain object usage is no longer supported.`); - } - const data = dataOptions.call(publicThis, publicThis); - if (isPromise(data)) { - warn$1(`data() returned a Promise - note data() cannot be async; If you ` + - `intend to perform data fetching before component renders, use ` + - `async setup() + <Suspense>.`); - } - if (!isObject(data)) { - warn$1(`data() should return an object.`); - } - else { - instance.data = reactive(data); - { - for (const key in data) { - checkDuplicateProperties("Data" /* DATA */, key); - // expose data on ctx during dev - if (!isReservedPrefix(key[0])) { - Object.defineProperty(ctx, key, { - configurable: true, - enumerable: true, - get: () => data[key], - set: NOOP - }); - } - } - } - } - } - // state initialization complete at this point - start caching access - shouldCacheAccess = true; - if (computedOptions) { - for (const key in computedOptions) { - const opt = computedOptions[key]; - const get = isFunction(opt) - ? opt.bind(publicThis, publicThis) - : isFunction(opt.get) - ? opt.get.bind(publicThis, publicThis) - : NOOP; - if (get === NOOP) { - warn$1(`Computed property "${key}" has no getter.`); - } - const set = !isFunction(opt) && isFunction(opt.set) - ? opt.set.bind(publicThis) - : () => { - warn$1(`Write operation failed: computed property "${key}" is readonly.`); - } - ; - const c = computed$1({ - get, - set - }); - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => c.value, - set: v => (c.value = v) - }); - { - checkDuplicateProperties("Computed" /* COMPUTED */, key); - } - } - } - if (watchOptions) { - for (const key in watchOptions) { - createWatcher(watchOptions[key], ctx, publicThis, key); - } - } - if (provideOptions) { - const provides = isFunction(provideOptions) - ? provideOptions.call(publicThis) - : provideOptions; - Reflect.ownKeys(provides).forEach(key => { - provide(key, provides[key]); - }); - } - if (created) { - callHook(created, instance, "c" /* CREATED */); - } - function registerLifecycleHook(register, hook) { - if (isArray(hook)) { - hook.forEach(_hook => register(_hook.bind(publicThis))); - } - else if (hook) { - register(hook.bind(publicThis)); - } - } - registerLifecycleHook(onBeforeMount, beforeMount); - registerLifecycleHook(onMounted, mounted); - registerLifecycleHook(onBeforeUpdate, beforeUpdate); - registerLifecycleHook(onUpdated, updated); - registerLifecycleHook(onActivated, activated); - registerLifecycleHook(onDeactivated, deactivated); - registerLifecycleHook(onErrorCaptured, errorCaptured); - registerLifecycleHook(onRenderTracked, renderTracked); - registerLifecycleHook(onRenderTriggered, renderTriggered); - registerLifecycleHook(onBeforeUnmount, beforeUnmount); - registerLifecycleHook(onUnmounted, unmounted); - registerLifecycleHook(onServerPrefetch, serverPrefetch); - if (isArray(expose)) { - if (expose.length) { - const exposed = instance.exposed || (instance.exposed = {}); - expose.forEach(key => { - Object.defineProperty(exposed, key, { - get: () => publicThis[key], - set: val => (publicThis[key] = val) - }); - }); - } - else if (!instance.exposed) { - instance.exposed = {}; - } - } - // options that are handled when creating the instance but also need to be - // applied from mixins - if (render && instance.render === NOOP) { - instance.render = render; - } - if (inheritAttrs != null) { - instance.inheritAttrs = inheritAttrs; - } - // asset options. - if (components) - instance.components = components; - if (directives) - instance.directives = directives; - } - function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP, unwrapRef = false) { - if (isArray(injectOptions)) { - injectOptions = normalizeInject(injectOptions); - } - for (const key in injectOptions) { - const opt = injectOptions[key]; - let injected; - if (isObject(opt)) { - if ('default' in opt) { - injected = inject(opt.from || key, opt.default, true /* treat default function as factory */); - } - else { - injected = inject(opt.from || key); - } - } - else { - injected = inject(opt); - } - if (isRef(injected)) { - // TODO remove the check in 3.3 - if (unwrapRef) { - Object.defineProperty(ctx, key, { - enumerable: true, - configurable: true, - get: () => injected.value, - set: v => (injected.value = v) - }); - } - else { - { - warn$1(`injected property "${key}" is a ref and will be auto-unwrapped ` + - `and no longer needs \`.value\` in the next minor release. ` + - `To opt-in to the new behavior now, ` + - `set \`app.config.unwrapInjectedRef = true\` (this config is ` + - `temporary and will not be needed in the future.)`); - } - ctx[key] = injected; - } - } - else { - ctx[key] = injected; + } + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + Object.defineProperty(ctx, key, { + value: methodHandler.bind(publicThis), + configurable: true, + enumerable: true, + writable: true + }); } { - checkDuplicateProperties("Inject" /* INJECT */, key); + checkDuplicateProperties("Methods" /* METHODS */, key); } + } else { + warn$1( + `Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?` + ); + } } + } + if (dataOptions) { + if (!isFunction(dataOptions)) { + warn$1( + `The data option must be a function. Plain object usage is no longer supported.` + ); + } + const data = dataOptions.call(publicThis, publicThis); + if (isPromise(data)) { + warn$1( + `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.` + ); + } + if (!isObject(data)) { + warn$1(`data() should return an object.`); + } else { + instance.data = reactive(data); + { + for (const key in data) { + checkDuplicateProperties("Data" /* DATA */, key); + if (!isReservedPrefix(key[0])) { + Object.defineProperty(ctx, key, { + configurable: true, + enumerable: true, + get: () => data[key], + set: NOOP + }); + } + } + } + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + if (get === NOOP) { + warn$1(`Computed property "${key}" has no getter.`); + } + const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => { + warn$1( + `Write operation failed: computed property "${key}" is readonly.` + ); + } ; + const c = computed({ + get, + set + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + { + checkDuplicateProperties("Computed" /* COMPUTED */, key); + } + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render && instance.render === NOOP) { + instance.render = render; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) + instance.components = components; + if (directives) + instance.directives = directives; } - function callHook(hook, instance, type) { - callWithAsyncErrorHandling(isArray(hook) - ? hook.map(h => h.bind(instance.proxy)) - : hook.bind(instance.proxy), instance, type); + function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + { + checkDuplicateProperties("Inject" /* INJECT */, key); + } + } + } + function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); } function createWatcher(raw, ctx, publicThis, key) { - const getter = key.includes('.') - ? createPathGetter(publicThis, key) - : () => publicThis[key]; - if (isString(raw)) { - const handler = ctx[raw]; - if (isFunction(handler)) { - watch(getter, handler); - } - else { - warn$1(`Invalid watch handler specified by key "${raw}"`, handler); - } + const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + watch(getter, handler); + } else { + warn$1(`Invalid watch handler specified by key "${raw}"`, handler); } - else if (isFunction(raw)) { - watch(getter, raw.bind(publicThis)); - } - else if (isObject(raw)) { - if (isArray(raw)) { - raw.forEach(r => createWatcher(r, ctx, publicThis, key)); - } - else { - const handler = isFunction(raw.handler) - ? raw.handler.bind(publicThis) - : ctx[raw.handler]; - if (isFunction(handler)) { - watch(getter, handler, raw); - } - else { - warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); - } - } - } - else { - warn$1(`Invalid watch option: "${key}"`, raw); + } else if (isFunction(raw)) { + watch(getter, raw.bind(publicThis)); + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } else { + warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler); + } } + } else { + warn$1(`Invalid watch option: "${key}"`, raw); + } } - /** - * Resolve merged options and cache it on the component. - * This is done only once per-component since the merging does not involve - * instances. - */ function resolveMergedOptions(instance) { - const base = instance.type; - const { mixins, extends: extendsOptions } = base; - const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext; - const cached = cache.get(base); - let resolved; - if (cached) { - resolved = cached; + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; } - else if (!globalMixins.length && !mixins && !extendsOptions) { - { - resolved = base; - } - } - else { - resolved = {}; - if (globalMixins.length) { - globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true)); - } - mergeOptions(resolved, base, optionMergeStrategies); + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { cache.set(base, resolved); - return resolved; + } + return resolved; } function mergeOptions(to, from, strats, asMixin = false) { - const { mixins, extends: extendsOptions } = from; - if (extendsOptions) { - mergeOptions(to, extendsOptions, strats, true); + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") { + warn$1( + `"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.` + ); + } else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; } - if (mixins) { - mixins.forEach((m) => mergeOptions(to, m, strats, true)); - } - for (const key in from) { - if (asMixin && key === 'expose') { - warn$1(`"expose" option is ignored when declared in mixins or extends. ` + - `It should only be declared in the base component itself.`); - } - else { - const strat = internalOptionMergeStrats[key] || (strats && strats[key]); - to[key] = strat ? strat(to[key], from[key]) : from[key]; - } - } - return to; + } + return to; } const internalOptionMergeStrats = { - data: mergeDataFn, - props: mergeObjectOptions, - emits: mergeObjectOptions, - // objects - methods: mergeObjectOptions, - computed: mergeObjectOptions, - // lifecycle - beforeCreate: mergeAsArray, - created: mergeAsArray, - beforeMount: mergeAsArray, - mounted: mergeAsArray, - beforeUpdate: mergeAsArray, - updated: mergeAsArray, - beforeDestroy: mergeAsArray, - beforeUnmount: mergeAsArray, - destroyed: mergeAsArray, - unmounted: mergeAsArray, - activated: mergeAsArray, - deactivated: mergeAsArray, - errorCaptured: mergeAsArray, - serverPrefetch: mergeAsArray, - // assets - components: mergeObjectOptions, - directives: mergeObjectOptions, - // watch - watch: mergeWatchOptions, - // provide / inject - provide: mergeDataFn, - inject: mergeInject + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject }; function mergeDataFn(to, from) { - if (!from) { - return to; - } - if (!to) { - return from; - } - return function mergedDataFn() { - return (extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from); - }; + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return (extend)( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; } function mergeInject(to, from) { - return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); } function normalizeInject(raw) { - if (isArray(raw)) { - const res = {}; - for (let i = 0; i < raw.length; i++) { - res[raw[i]] = raw[i]; - } - return res; + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; } - return raw; + return res; + } + return raw; } function mergeAsArray(to, from) { - return to ? [...new Set([].concat(to, from))] : from; + return to ? [...new Set([].concat(to, from))] : from; } function mergeObjectOptions(to, from) { - return to ? extend(extend(Object.create(null), to), from) : from; + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; + } + function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } } function mergeWatchOptions(to, from) { - if (!to) - return from; - if (!from) - return to; - const merged = extend(Object.create(null), to); - for (const key in from) { - merged[key] = mergeAsArray(to[key], from[key]); - } - return merged; + if (!to) + return from; + if (!from) + return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; } - function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison - isSSR = false) { - const props = {}; - const attrs = {}; - def(attrs, InternalObjectKey, 1); - instance.propsDefaults = Object.create(null); - setFullProps(instance, rawProps, props, attrs); - // ensure all declared prop keys are present - for (const key in instance.propsOptions[0]) { - if (!(key in props)) { - props[key] = undefined; - } + function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; + } + let uid$1 = 0; + function createAppAPI(render, hydrate) { + return function createApp(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); } - // validation + if (rootProps != null && !isObject(rootProps)) { + warn$1(`root props passed to app.mount() must be an object.`); + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + { + warn$1( + `app.config cannot be replaced. Modify individual options instead.` + ); + } + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) { + warn$1(`Plugin has already been applied to target app.`); + } else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else { + warn$1( + `A plugin must either be a function or an object with an "install" function.` + ); + } + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } else { + warn$1( + "Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "") + ); + } + } + return app; + }, + component(name, component) { + { + validateComponentName(name, context.config); + } + if (!component) { + return context.components[name]; + } + if (context.components[name]) { + warn$1(`Component "${name}" has already been registered in target app.`); + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + { + validateDirectiveName(name); + } + if (!directive) { + return context.directives[name]; + } + if (context.directives[name]) { + warn$1(`Directive "${name}" has already been registered in target app.`); + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + if (rootContainer.__vue_app__) { + warn$1( + `There is already an app instance mounted on the host container. + If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.` + ); + } + const vnode = createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + { + context.reload = () => { + render( + cloneVNode(vnode), + rootContainer, + namespace + ); + }; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + { + app._instance = vnode.component; + devtoolsInitApp(app, version); + } + return getExposeProxy(vnode.component) || vnode.component.proxy; + } else { + warn$1( + `App has already been mounted. +If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\`` + ); + } + }, + unmount() { + if (isMounted) { + render(null, app._container); + { + app._instance = null; + devtoolsUnmountApp(app); + } + delete app._container.__vue_app__; + } else { + warn$1(`Cannot unmount an app that is not mounted.`); + } + }, + provide(key, value) { + if (key in context.provides) { + warn$1( + `App already provides property with key "${String(key)}". It will be overwritten with the new value.` + ); + } + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + currentApp = app; + try { + return fn(); + } finally { + currentApp = null; + } + } + }; + return app; + }; + } + let currentApp = null; + + function provide(key, value) { + if (!currentInstance) { { - validateProps(rawProps || {}, props, instance); + warn$1(`provide() can only be used inside setup().`); } - if (isStateful) { - // stateful - instance.props = isSSR ? props : shallowReactive(props); + } else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); } - else { - if (!instance.type.props) { - // functional w/ optional props, props === attrs - instance.props = attrs; - } - else { - // functional w/ declared props - instance.props = props; - } + provides[key] = value; + } + } + function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else { + warn$1(`injection "${String(key)}" not found.`); } - instance.attrs = attrs; + } else { + warn$1(`inject() can only be used inside setup() or functional components.`); + } + } + function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); + } + + function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = {}; + def(attrs, InternalObjectKey, 1); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + { + validateProps(rawProps || {}, props, instance); + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; + } + function isInHmrContext(instance) { + while (instance) { + if (instance.type.__hmrId) + return true; + instance = instance.parent; + } } function updateProps(instance, rawProps, rawPrevProps, optimized) { - const { props, attrs, vnode: { patchFlag } } = instance; - const rawCurrentProps = toRaw(props); - const [options] = instance.propsOptions; - let hasAttrsChanged = false; - if ( + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !((instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId))) && - (optimized || patchFlag > 0) && - !(patchFlag & 16 /* FULL_PROPS */)) { - if (patchFlag & 8 /* PROPS */) { - // Compiler-generated props & no keys change, just set the updated - // the props. - const propsToUpdate = instance.vnode.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - let key = propsToUpdate[i]; - // skip if the prop key is a declared emit event listener - if (isEmitListener(instance.emitsOptions, key)) { - continue; - } - // PROPS flag guarantees rawProps to be non-null - const value = rawProps[key]; - if (options) { - // attr / props separation was done on init and will be consistent - // in this code path, so just check if attrs have it. - if (hasOwn(attrs, key)) { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - else { - const camelizedKey = camelize(key); - props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */); - } - } - else { - if (value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } - } + !isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; } - } - else { - // full props update. - if (setFullProps(instance, rawProps, props, attrs)) { + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; hasAttrsChanged = true; + } } - // in case of dynamic props, check if we need to delete keys from - // the props object - let kebabKey; - for (const key in rawCurrentProps) { - if (!rawProps || - // for camelCase - (!hasOwn(rawProps, key) && - // it's possible the original props was passed in as kebab-case - // and converted to camelCase (#955) - ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))) { - if (options) { - if (rawPrevProps && - // for camelCase - (rawPrevProps[key] !== undefined || - // for kebab-case - rawPrevProps[kebabKey] !== undefined)) { - props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */); - } - } - else { - delete props[key]; - } - } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; } - // in the case of functional component w/o props declaration, props and - // attrs point to the same object so it should already have been updated. - if (attrs !== rawCurrentProps) { - for (const key in attrs) { - if (!rawProps || - (!hasOwn(rawProps, key) && - (!false ))) { - delete attrs[key]; - hasAttrsChanged = true; - } - } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; } + } } - // trigger updates for $attrs in case it's used in component slots - if (hasAttrsChanged) { - trigger(instance, "set" /* SET */, '$attrs'); - } - { - validateProps(rawProps || {}, props, instance); - } + } + if (hasAttrsChanged) { + trigger(instance, "set", "$attrs"); + } + { + validateProps(rawProps || {}, props, instance); + } } function setFullProps(instance, rawProps, props, attrs) { - const [options, needCastKeys] = instance.propsOptions; - let hasAttrsChanged = false; - let rawCastValues; - if (rawProps) { - for (let key in rawProps) { - // key, ref are reserved and never passed down - if (isReservedProp(key)) { - continue; - } - const value = rawProps[key]; - // prop option names are camelized during normalization, so to support - // kebab -> camel conversion here we need to camelize the key. - let camelKey; - if (options && hasOwn(options, (camelKey = camelize(key)))) { - if (!needCastKeys || !needCastKeys.includes(camelKey)) { - props[camelKey] = value; - } - else { - (rawCastValues || (rawCastValues = {}))[camelKey] = value; - } - } - else if (!isEmitListener(instance.emitsOptions, key)) { - if (!(key in attrs) || value !== attrs[key]) { - attrs[key] = value; - hasAttrsChanged = true; - } - } + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; } - } - if (needCastKeys) { - const rawCurrentProps = toRaw(props); - const castValues = rawCastValues || EMPTY_OBJ; - for (let i = 0; i < needCastKeys.length; i++) { - const key = needCastKeys[i]; - props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !hasOwn(castValues, key)); + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; } + } } - return hasAttrsChanged; + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; } function resolvePropValue(options, props, key, value, instance, isAbsent) { - const opt = options[key]; - if (opt != null) { - const hasDefault = hasOwn(opt, 'default'); - // default values - if (hasDefault && value === undefined) { - const defaultValue = opt.default; - if (opt.type !== Function && isFunction(defaultValue)) { - const { propsDefaults } = instance; - if (key in propsDefaults) { - value = propsDefaults[key]; - } - else { - setCurrentInstance(instance); - value = propsDefaults[key] = defaultValue.call(null, props); - unsetCurrentInstance(); - } - } - else { - value = defaultValue; - } - } - // boolean casting - if (opt[0 /* shouldCast */]) { - if (isAbsent && !hasDefault) { - value = false; - } - else if (opt[1 /* shouldCastTrue */] && - (value === '' || value === hyphenate(key))) { - value = true; - } + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); } + } else { + value = defaultValue; + } } - return value; + if (opt[0 /* shouldCast */]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; } function normalizePropsOptions(comp, appContext, asMixin = false) { - const cache = appContext.propsCache; - const cached = cache.get(comp); - if (cached) { - return cached; + const cache = appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) + needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); } - const raw = comp.props; - const normalized = {}; - const needCastKeys = []; - // apply mixin/extends props - let hasExtends = false; - if (!isFunction(comp)) { - const extendProps = (raw) => { - hasExtends = true; - const [props, keys] = normalizePropsOptions(raw, appContext, true); - extend(normalized, props); - if (keys) - needCastKeys.push(...keys); - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendProps); - } - if (comp.extends) { - extendProps(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendProps); - } + if (comp.extends) { + extendProps(comp.extends); } - if (!raw && !hasExtends) { - cache.set(comp, EMPTY_ARR); - return EMPTY_ARR; + if (comp.mixins) { + comp.mixins.forEach(extendProps); } - if (isArray(raw)) { - for (let i = 0; i < raw.length; i++) { - if (!isString(raw[i])) { - warn$1(`props must be strings when using array syntax.`, raw[i]); - } - const normalizedKey = camelize(raw[i]); - if (validatePropName(normalizedKey)) { - normalized[normalizedKey] = EMPTY_OBJ; - } - } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); } - else if (raw) { - if (!isObject(raw)) { - warn$1(`invalid props options`, raw); - } - for (const key in raw) { - const normalizedKey = camelize(key); - if (validatePropName(normalizedKey)) { - const opt = raw[key]; - const prop = (normalized[normalizedKey] = - isArray(opt) || isFunction(opt) ? { type: opt } : opt); - if (prop) { - const booleanIndex = getTypeIndex(Boolean, prop.type); - const stringIndex = getTypeIndex(String, prop.type); - prop[0 /* shouldCast */] = booleanIndex > -1; - prop[1 /* shouldCastTrue */] = - stringIndex < 0 || booleanIndex < stringIndex; - // if the prop needs boolean casting or default value - if (booleanIndex > -1 || hasOwn(prop, 'default')) { - needCastKeys.push(normalizedKey); - } - } - } - } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + if (!isString(raw[i])) { + warn$1(`props must be strings when using array syntax.`, raw[i]); + } + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } } - const res = [normalized, needCastKeys]; + } else if (raw) { + if (!isObject(raw)) { + warn$1(`invalid props options`, raw); + } + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + if (prop) { + const booleanIndex = getTypeIndex(Boolean, prop.type); + const stringIndex = getTypeIndex(String, prop.type); + prop[0 /* shouldCast */] = booleanIndex > -1; + prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex; + if (booleanIndex > -1 || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { cache.set(comp, res); - return res; + } + return res; } function validatePropName(key) { - if (key[0] !== '$') { - return true; - } - else { - warn$1(`Invalid prop name: "${key}" is a reserved property.`); - } - return false; + if (key[0] !== "$") { + return true; + } else { + warn$1(`Invalid prop name: "${key}" is a reserved property.`); + } + return false; } - // use function string name to check type constructors - // so that it works across vms / iframes. function getType(ctor) { - const match = ctor && ctor.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ctor === null ? 'null' : ''; + const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/); + return match ? match[2] : ctor === null ? "null" : ""; } function isSameType(a, b) { - return getType(a) === getType(b); + return getType(a) === getType(b); } function getTypeIndex(type, expectedTypes) { - if (isArray(expectedTypes)) { - return expectedTypes.findIndex(t => isSameType(t, type)); - } - else if (isFunction(expectedTypes)) { - return isSameType(expectedTypes, type) ? 0 : -1; - } - return -1; + if (isArray(expectedTypes)) { + return expectedTypes.findIndex((t) => isSameType(t, type)); + } else if (isFunction(expectedTypes)) { + return isSameType(expectedTypes, type) ? 0 : -1; + } + return -1; } - /** - * dev only - */ function validateProps(rawProps, props, instance) { - const resolvedValues = toRaw(props); - const options = instance.propsOptions[0]; - for (const key in options) { - let opt = options[key]; - if (opt == null) - continue; - validateProp(key, resolvedValues[key], opt, !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))); - } + const resolvedValues = toRaw(props); + const options = instance.propsOptions[0]; + for (const key in options) { + let opt = options[key]; + if (opt == null) + continue; + validateProp( + key, + resolvedValues[key], + opt, + shallowReadonly(resolvedValues) , + !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key)) + ); + } } - /** - * dev only - */ - function validateProp(name, value, prop, isAbsent) { - const { type, required, validator } = prop; - // required! - if (required && isAbsent) { - warn$1('Missing required prop: "' + name + '"'); - return; + function validateProp(name, value, prop, props, isAbsent) { + const { type, required, validator, skipCheck } = prop; + if (required && isAbsent) { + warn$1('Missing required prop: "' + name + '"'); + return; + } + if (value == null && !required) { + return; + } + if (type != null && type !== true && !skipCheck) { + let isValid = false; + const types = isArray(type) ? type : [type]; + const expectedTypes = []; + for (let i = 0; i < types.length && !isValid; i++) { + const { valid, expectedType } = assertType(value, types[i]); + expectedTypes.push(expectedType || ""); + isValid = valid; } - // missing but optional - if (value == null && !prop.required) { - return; - } - // type check - if (type != null && type !== true) { - let isValid = false; - const types = isArray(type) ? type : [type]; - const expectedTypes = []; - // value is valid as long as one of the specified types match - for (let i = 0; i < types.length && !isValid; i++) { - const { valid, expectedType } = assertType(value, types[i]); - expectedTypes.push(expectedType || ''); - isValid = valid; - } - if (!isValid) { - warn$1(getInvalidTypeMessage(name, value, expectedTypes)); - return; - } - } - // custom validator - if (validator && !validator(value)) { - warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + if (!isValid) { + warn$1(getInvalidTypeMessage(name, value, expectedTypes)); + return; } + } + if (validator && !validator(value, props)) { + warn$1('Invalid prop: custom validator check failed for prop "' + name + '".'); + } } - const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt'); - /** - * dev only - */ + const isSimpleType = /* @__PURE__ */ makeMap( + "String,Number,Boolean,Function,Symbol,BigInt" + ); function assertType(value, type) { - let valid; - const expectedType = getType(type); - if (isSimpleType(expectedType)) { - const t = typeof value; - valid = t === expectedType.toLowerCase(); - // for primitive wrapper objects - if (!valid && t === 'object') { - valid = value instanceof type; - } + let valid; + const expectedType = getType(type); + if (isSimpleType(expectedType)) { + const t = typeof value; + valid = t === expectedType.toLowerCase(); + if (!valid && t === "object") { + valid = value instanceof type; } - else if (expectedType === 'Object') { - valid = isObject(value); - } - else if (expectedType === 'Array') { - valid = isArray(value); - } - else if (expectedType === 'null') { - valid = value === null; - } - else { - valid = value instanceof type; - } - return { - valid, - expectedType - }; + } else if (expectedType === "Object") { + valid = isObject(value); + } else if (expectedType === "Array") { + valid = isArray(value); + } else if (expectedType === "null") { + valid = value === null; + } else { + valid = value instanceof type; + } + return { + valid, + expectedType + }; } - /** - * dev only - */ function getInvalidTypeMessage(name, value, expectedTypes) { - let message = `Invalid prop: type check failed for prop "${name}".` + - ` Expected ${expectedTypes.map(capitalize).join(' | ')}`; - const expectedType = expectedTypes[0]; - const receivedType = toRawType(value); - const expectedValue = styleValue(value, expectedType); - const receivedValue = styleValue(value, receivedType); - // check if we need to specify expected value - if (expectedTypes.length === 1 && - isExplicable(expectedType) && - !isBoolean(expectedType, receivedType)) { - message += ` with value ${expectedValue}`; - } - message += `, got ${receivedType} `; - // check if we need to specify received value - if (isExplicable(receivedType)) { - message += `with value ${receivedValue}.`; - } - return message; + if (expectedTypes.length === 0) { + return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`; + } + let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`; + const expectedType = expectedTypes[0]; + const receivedType = toRawType(value); + const expectedValue = styleValue(value, expectedType); + const receivedValue = styleValue(value, receivedType); + if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) { + message += ` with value ${expectedValue}`; + } + message += `, got ${receivedType} `; + if (isExplicable(receivedType)) { + message += `with value ${receivedValue}.`; + } + return message; } - /** - * dev only - */ function styleValue(value, type) { - if (type === 'String') { - return `"${value}"`; - } - else if (type === 'Number') { - return `${Number(value)}`; - } - else { - return `${value}`; - } + if (type === "String") { + return `"${value}"`; + } else if (type === "Number") { + return `${Number(value)}`; + } else { + return `${value}`; + } } - /** - * dev only - */ function isExplicable(type) { - const explicitTypes = ['string', 'number', 'boolean']; - return explicitTypes.some(elem => type.toLowerCase() === elem); + const explicitTypes = ["string", "number", "boolean"]; + return explicitTypes.some((elem) => type.toLowerCase() === elem); } - /** - * dev only - */ function isBoolean(...args) { - return args.some(elem => elem.toLowerCase() === 'boolean'); + return args.some((elem) => elem.toLowerCase() === "boolean"); } - const isInternalKey = (key) => key[0] === '_' || key === '$stable'; - const normalizeSlotValue = (value) => isArray(value) - ? value.map(normalizeVNode) - : [normalizeVNode(value)]; + const isInternalKey = (key) => key[0] === "_" || key === "$stable"; + const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; const normalizeSlot = (key, rawSlot, ctx) => { - if (rawSlot._n) { - // already normalized - #5353 - return rawSlot; + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (currentInstance && (!ctx || ctx.root === currentInstance.root)) { + warn$1( + `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.` + ); } - const normalized = withCtx((...args) => { - if (currentInstance) { - warn$1(`Slot "${key}" invoked outside of the render function: ` + - `this will not track dependencies used in the slot. ` + - `Invoke the slot function inside the render function instead.`); - } - return normalizeSlotValue(rawSlot(...args)); - }, ctx); - normalized._c = false; - return normalized; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; }; const normalizeObjectSlots = (rawSlots, slots, instance) => { - const ctx = rawSlots._ctx; - for (const key in rawSlots) { - if (isInternalKey(key)) - continue; - const value = rawSlots[key]; - if (isFunction(value)) { - slots[key] = normalizeSlot(key, value, ctx); - } - else if (value != null) { - { - warn$1(`Non-function value encountered for slot "${key}". ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(value); - slots[key] = () => normalized; - } + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) + continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + { + warn$1( + `Non-function value encountered for slot "${key}". Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; } + } }; const normalizeVNodeSlots = (instance, children) => { - if (!isKeepAlive(instance.vnode) && - !(false )) { - warn$1(`Non-function value encountered for default slot. ` + - `Prefer function slots for better performance.`); - } - const normalized = normalizeSlotValue(children); - instance.slots.default = () => normalized; + if (!isKeepAlive(instance.vnode) && true) { + warn$1( + `Non-function value encountered for default slot. Prefer function slots for better performance.` + ); + } + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; }; const initSlots = (instance, children) => { - if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // users can get the shallow readonly version of the slots object through `this.$slots`, - // we should avoid the proxy object polluting the slots of the internal instance - instance.slots = toRaw(children); - // make compiler marker non-enumerable - def(children, '_', type); - } - else { - normalizeObjectSlots(children, (instance.slots = {})); - } + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + instance.slots = toRaw(children); + def(children, "_", type); + } else { + normalizeObjectSlots( + children, + instance.slots = {}); } - else { - instance.slots = {}; - if (children) { - normalizeVNodeSlots(instance, children); - } + } else { + instance.slots = {}; + if (children) { + normalizeVNodeSlots(instance, children); } - def(instance.slots, InternalObjectKey, 1); + } + def(instance.slots, InternalObjectKey, 1); }; const updateSlots = (instance, children, optimized) => { - const { vnode, slots } = instance; - let needDeletionCheck = true; - let deletionComparisonTarget = EMPTY_OBJ; - if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) { - const type = children._; - if (type) { - // compiled slots. - if (isHmrUpdating) { - // Parent was HMR updated so slot content may have changed. - // force update slots and mark instance for hmr as well - extend(slots, children); - } - else if (optimized && type === 1 /* STABLE */) { - // compiled AND stable. - // no need to update, and skip stale slots removal. - needDeletionCheck = false; - } - else { - // compiled but dynamic (v-if/v-for on slots) - update slots, but skip - // normalization. - extend(slots, children); - // #2893 - // when rendering the optimized slots by manually written render function, - // we need to delete the `slots._` flag if necessary to make subsequent updates reliable, - // i.e. let the `renderSlot` create the bailed Fragment - if (!optimized && type === 1 /* STABLE */) { - delete slots._; - } - } + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (isHmrUpdating) { + extend(slots, children); + trigger(instance, "set", "$slots"); + } else if (optimized && type === 1) { + needDeletionCheck = false; + } else { + extend(slots, children); + if (!optimized && type === 1) { + delete slots._; } - else { - needDeletionCheck = !children.$stable; - normalizeObjectSlots(children, slots); - } - deletionComparisonTarget = children; + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); } - else if (children) { - // non slot object children (direct value) passed to a component - normalizeVNodeSlots(instance, children); - deletionComparisonTarget = { default: 1 }; - } - // delete stale slots - if (needDeletionCheck) { - for (const key in slots) { - if (!isInternalKey(key) && !(key in deletionComparisonTarget)) { - delete slots[key]; - } - } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } } + } }; - function createAppContext() { - return { - app: null, - config: { - isNativeTag: NO, - performance: false, - globalProperties: {}, - optionMergeStrategies: {}, - errorHandler: undefined, - warnHandler: undefined, - compilerOptions: {} - }, - mixins: [], - components: {}, - directives: {}, - provides: Object.create(null), - optionsCache: new WeakMap(), - propsCache: new WeakMap(), - emitsCache: new WeakMap() - }; - } - let uid = 0; - function createAppAPI(render, hydrate) { - return function createApp(rootComponent, rootProps = null) { - if (!isFunction(rootComponent)) { - rootComponent = Object.assign({}, rootComponent); - } - if (rootProps != null && !isObject(rootProps)) { - warn$1(`root props passed to app.mount() must be an object.`); - rootProps = null; - } - const context = createAppContext(); - const installedPlugins = new Set(); - let isMounted = false; - const app = (context.app = { - _uid: uid++, - _component: rootComponent, - _props: rootProps, - _container: null, - _context: context, - _instance: null, - version, - get config() { - return context.config; - }, - set config(v) { - { - warn$1(`app.config cannot be replaced. Modify individual options instead.`); - } - }, - use(plugin, ...options) { - if (installedPlugins.has(plugin)) { - warn$1(`Plugin has already been applied to target app.`); - } - else if (plugin && isFunction(plugin.install)) { - installedPlugins.add(plugin); - plugin.install(app, ...options); - } - else if (isFunction(plugin)) { - installedPlugins.add(plugin); - plugin(app, ...options); - } - else { - warn$1(`A plugin must either be a function or an object with an "install" ` + - `function.`); - } - return app; - }, - mixin(mixin) { - { - if (!context.mixins.includes(mixin)) { - context.mixins.push(mixin); - } - else { - warn$1('Mixin has already been applied to target app' + - (mixin.name ? `: ${mixin.name}` : '')); - } - } - return app; - }, - component(name, component) { - { - validateComponentName(name, context.config); - } - if (!component) { - return context.components[name]; - } - if (context.components[name]) { - warn$1(`Component "${name}" has already been registered in target app.`); - } - context.components[name] = component; - return app; - }, - directive(name, directive) { - { - validateDirectiveName(name); - } - if (!directive) { - return context.directives[name]; - } - if (context.directives[name]) { - warn$1(`Directive "${name}" has already been registered in target app.`); - } - context.directives[name] = directive; - return app; - }, - mount(rootContainer, isHydrate, isSVG) { - if (!isMounted) { - // #5571 - if (rootContainer.__vue_app__) { - warn$1(`There is already an app instance mounted on the host container.\n` + - ` If you want to mount another app on the same host container,` + - ` you need to unmount the previous app by calling \`app.unmount()\` first.`); - } - const vnode = createVNode(rootComponent, rootProps); - // store app context on the root VNode. - // this will be set on the root instance on initial mount. - vnode.appContext = context; - // HMR root reload - { - context.reload = () => { - render(cloneVNode(vnode), rootContainer, isSVG); - }; - } - if (isHydrate && hydrate) { - hydrate(vnode, rootContainer); - } - else { - render(vnode, rootContainer, isSVG); - } - isMounted = true; - app._container = rootContainer; - rootContainer.__vue_app__ = app; - { - app._instance = vnode.component; - devtoolsInitApp(app, version); - } - return getExposeProxy(vnode.component) || vnode.component.proxy; - } - else { - warn$1(`App has already been mounted.\n` + - `If you want to remount the same app, move your app creation logic ` + - `into a factory function and create fresh app instances for each ` + - `mount - e.g. \`const createMyApp = () => createApp(App)\``); - } - }, - unmount() { - if (isMounted) { - render(null, app._container); - { - app._instance = null; - devtoolsUnmountApp(app); - } - delete app._container.__vue_app__; - } - else { - warn$1(`Cannot unmount an app that is not mounted.`); - } - }, - provide(key, value) { - if (key in context.provides) { - warn$1(`App already provides property with key "${String(key)}". ` + - `It will be overwritten with the new value.`); - } - context.provides[key] = value; - return app; - } - }); - return app; - }; - } - - /** - * Function for handling a template ref - */ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { - if (isArray(rawRef)) { - rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount)); - return; + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getExposeProxy(vnode.component) || vnode.component.proxy : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (hasOwn(setupState, oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; } - if (isAsyncWrapper(vnode) && !isUnmount) { - // when mounting async components, nothing needs to be done, - // because the template ref is forwarded to inner component - return; - } - const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ - ? getExposeProxy(vnode.component) || vnode.component.proxy - : vnode.el; - const value = isUnmount ? null : refValue; - const { i: owner, r: ref } = rawRef; - if (!owner) { - warn$1(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` + - `A vnode with ref must be created inside the render function.`); - return; - } - const oldRef = oldRawRef && oldRawRef.r; - const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs; - const setupState = owner.setupState; - // dynamic ref changed. unset old ref - if (oldRef != null && oldRef !== ref) { - if (isString(oldRef)) { - refs[oldRef] = null; - if (hasOwn(setupState, oldRef)) { - setupState[oldRef] = null; + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + const isVFor = rawRef.f; + if (_isString || _isRef) { + const doSet = () => { + if (isVFor) { + const existing = _isString ? hasOwn(setupState, ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (hasOwn(setupState, ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) + refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } + } + } else if (_isString) { + refs[ref] = value; + if (hasOwn(setupState, ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) + refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - else if (isRef(oldRef)) { - oldRef.value = null; - } - } - if (isFunction(ref)) { - callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]); - } - else { - const _isString = isString(ref); - const _isRef = isRef(ref); - if (_isString || _isRef) { - const doSet = () => { - if (rawRef.f) { - const existing = _isString ? refs[ref] : ref.value; - if (isUnmount) { - isArray(existing) && remove(existing, refValue); - } - else { - if (!isArray(existing)) { - if (_isString) { - refs[ref] = [refValue]; - if (hasOwn(setupState, ref)) { - setupState[ref] = refs[ref]; - } - } - else { - ref.value = [refValue]; - if (rawRef.k) - refs[rawRef.k] = ref.value; - } - } - else if (!existing.includes(refValue)) { - existing.push(refValue); - } - } - } - else if (_isString) { - refs[ref] = value; - if (hasOwn(setupState, ref)) { - setupState[ref] = value; - } - } - else if (isRef(ref)) { - ref.value = value; - if (rawRef.k) - refs[rawRef.k] = value; - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } - }; - if (value) { - doSet.id = -1; - queuePostRenderEffect(doSet, parentSuspense); - } - else { - doSet(); - } - } - else { - warn$1('Invalid template ref type:', ref, `(${typeof ref})`); - } + }; + if (isUnmount || isVFor) { + doSet(); + } else { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } + } } let hasMismatch = false; - const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject'; + const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; + const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); + const getContainerType = (container) => { + if (isSVGContainer(container)) + return "svg"; + if (isMathMLContainer(container)) + return "mathml"; + return void 0; + }; const isComment = (node) => node.nodeType === 8 /* COMMENT */; - // Note: hydration is DOM-specific - // But we have to place it in core due to tight coupling with core - splitting - // it out creates a ton of unnecessary complexity. - // Hydration also depends on some renderer internal logic which needs to be - // passed in via arguments. function createHydrationFunctions(rendererInternals) { - const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals; - const hydrate = (vnode, container) => { - if (!container.hasChildNodes()) { - warn$1(`Attempting to hydrate existing markup but container is empty. ` + - `Performing full mount instead.`); - patch(null, vnode, container); - flushPostFlushCbs(); - return; - } - hasMismatch = false; - hydrateNode(container.firstChild, vnode, null, null, null); - flushPostFlushCbs(); - if (hasMismatch && !false) { - // this error should show up in production - console.error(`Hydration completed but contains mismatches.`); - } - }; - const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { - const isFragmentStart = isComment(node) && node.data === '['; - const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart); - const { type, ref, shapeFlag, patchFlag } = vnode; - const domType = node.nodeType; - vnode.el = node; - if (patchFlag === -2 /* BAIL */) { - optimized = false; - vnode.dynamicChildren = null; - } - let nextNode = null; - switch (type) { - case Text: - if (domType !== 3 /* TEXT */) { - // #5728 empty text node inside a slot can cause hydration failure - // because the server rendered HTML won't contain a text node - if (vnode.children === '') { - insert((vnode.el = createText('')), parentNode(node), node); - nextNode = node; - } - else { - nextNode = onMismatch(); - } - } - else { - if (node.data !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text mismatch:` + - `\n- Client: ${JSON.stringify(node.data)}` + - `\n- Server: ${JSON.stringify(vnode.children)}`); - node.data = vnode.children; - } - nextNode = nextSibling(node); - } - break; - case Comment: - if (domType !== 8 /* COMMENT */ || isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = nextSibling(node); - } - break; - case Static: - if (domType !== 1 /* ELEMENT */) { - nextNode = onMismatch(); - } - else { - // determine anchor, adopt content - nextNode = node; - // if the static vnode has its content stripped during build, - // adopt it from the server-rendered HTML. - const needToAdoptContent = !vnode.children.length; - for (let i = 0; i < vnode.staticCount; i++) { - if (needToAdoptContent) - vnode.children += nextNode.outerHTML; - if (i === vnode.staticCount - 1) { - vnode.anchor = nextNode; - } - nextNode = nextSibling(nextNode); - } - return nextNode; - } - break; - case Fragment: - if (!isFragmentStart) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - if (domType !== 1 /* ELEMENT */ || - vnode.type.toLowerCase() !== - node.tagName.toLowerCase()) { - nextNode = onMismatch(); - } - else { - nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } - else if (shapeFlag & 6 /* COMPONENT */) { - // when setting up the render effect, if the initial vnode already - // has .el set, the component will perform hydration instead of mount - // on its sub-tree. - vnode.slotScopeIds = slotScopeIds; - const container = parentNode(node); - mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized); - // component may be async, so in the case of fragments we cannot rely - // on component's rendered output to determine the end of the fragment - // instead, we do a lookahead to find the end anchor node. - nextNode = isFragmentStart - ? locateClosingAsyncAnchor(node) - : nextSibling(node); - // #4293 teleport as component root - if (nextNode && - isComment(nextNode) && - nextNode.data === 'teleport end') { - nextNode = nextSibling(nextNode); - } - // #3787 - // if component is async, it may get moved / unmounted before its - // inner component is loaded, so we need to give it a placeholder - // vnode that matches its adopted DOM. - if (isAsyncWrapper(vnode)) { - let subTree; - if (isFragmentStart) { - subTree = createVNode(Fragment); - subTree.anchor = nextNode - ? nextNode.previousSibling - : container.lastChild; - } - else { - subTree = - node.nodeType === 3 ? createTextVNode('') : createVNode('div'); - } - subTree.el = node; - vnode.component.subTree = subTree; - } - } - else if (shapeFlag & 64 /* TELEPORT */) { - if (domType !== 8 /* COMMENT */) { - nextNode = onMismatch(); - } - else { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren); - } - } - else if (shapeFlag & 128 /* SUSPENSE */) { - nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode); - } - else { - warn$1('Invalid HostVNode type:', type, `(${typeof type})`); - } - } - if (ref != null) { - setRef(ref, null, parentSuspense, vnode); - } - return nextNode; - }; - const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!vnode.dynamicChildren; - const { type, props, patchFlag, shapeFlag, dirs } = vnode; - // #4006 for form elements with non-string v-model value bindings - // e.g. <option :value="obj">, <input type="checkbox" :true-value="1"> - const forcePatchValue = (type === 'input' && dirs) || type === 'option'; - // skip props & children if this is hoisted static nodes - // #5405 in dev, always hydrate children for HMR - { - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - if (forcePatchValue || - !optimized || - patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) { - for (const key in props) { - if ((forcePatchValue && key.endsWith('value')) || - (isOn(key) && !isReservedProp(key))) { - patchProp(el, key, null, props[key], false, undefined, parentComponent); - } - } - } - else if (props.onClick) { - // Fast path for click listeners (which is most often) to avoid - // iterating through props. - patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent); - } - } - // vnode / directive hooks - let vnodeHooks; - if ((vnodeHooks = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHooks, parentComponent, vnode); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - if ((vnodeHooks = props && props.onVnodeMounted) || dirs) { - queueEffectWithSuspense(() => { - vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - // children - if (shapeFlag & 16 /* ARRAY_CHILDREN */ && - // skip if element has innerHTML / textContent - !(props && (props.innerHTML || props.textContent))) { - let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized); - let hasWarned = false; - while (next) { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${vnode.type}>: ` + - `server rendered element contains more child nodes than client vdom.`); - hasWarned = true; - } - // The SSRed DOM contains more nodes than it should. Remove them. - const cur = next; - next = next.nextSibling; - remove(cur); - } - } - else if (shapeFlag & 8 /* TEXT_CHILDREN */) { - if (el.textContent !== vnode.children) { - hasMismatch = true; - warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` + - `- Client: ${el.textContent}\n` + - `- Server: ${vnode.children}`); - el.textContent = vnode.children; - } - } - } - return el.nextSibling; - }; - const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { - optimized = optimized || !!parentVNode.dynamicChildren; - const children = parentVNode.children; - const l = children.length; - let hasWarned = false; - for (let i = 0; i < l; i++) { - const vnode = optimized - ? children[i] - : (children[i] = normalizeVNode(children[i])); - if (node) { - node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized); - } - else if (vnode.type === Text && !vnode.children) { - continue; - } - else { - hasMismatch = true; - if (!hasWarned) { - warn$1(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` + - `server rendered element contains fewer child nodes than client vdom.`); - hasWarned = true; - } - // the SSRed DOM didn't contain enough nodes. Mount the missing ones. - patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - } - } - return node; - }; - const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { - const { slotScopeIds: fragmentSlotScopeIds } = vnode; - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - const container = parentNode(node); - const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized); - if (next && isComment(next) && next.data === ']') { - return nextSibling((vnode.anchor = next)); - } - else { - // fragment didn't hydrate successfully, since we didn't get a end anchor - // back. This should have led to node/children mismatch warnings. + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment + } + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` + ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; + } + hasMismatch = false; + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; + if (hasMismatch && true) { + console.error(`Hydration completed but contains mismatches.`); + } + }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + if (!("__vnode" in node)) { + Object.defineProperty(node, "__vnode", { + value: vnode, + enumerable: false + }); + } + if (!("__vueParentComponent" in node)) { + Object.defineProperty(node, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3 /* TEXT */) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { hasMismatch = true; - // since the anchor is missing, we need to create one and insert it - insert((vnode.anchor = createComment(`]`)), container, next); - return next; + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + node.data = vnode.children; + } + nextNode = nextSibling(node); } - }; - const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 /* COMMENT */ || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 /* ELEMENT */ || domType === 3 /* TEXT */) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 /* ELEMENT */ ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 /* ELEMENT */ || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8 /* COMMENT */) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; + }; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + hasMismatch = true; + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + if (el.textContent !== vnode.children) { + hasMismatch = true; + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + el.textContent = vnode.children; + } + } + if (props) { + { + for (const key in props) { + if (propHasMismatch(el, key, props[key], vnode)) { + hasMismatch = true; + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === ".") { + patchProp( + el, + key, + null, + props[key], + void 0, + void 0, + parentComponent + ); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + } + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + if (node) { + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (vnode.type === Text && !vnode.children) { + continue; + } else { hasMismatch = true; - warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */ - ? `(text)` - : isComment(node) && node.data === '[' - ? `(start of fragment)` - : ``); - vnode.el = null; - if (isFragment) { - // remove excessive fragment nodes - const end = locateClosingAsyncAnchor(node); - while (true) { - const next = nextSibling(node); - if (next && next !== end) { - remove(next); - } - else { - break; - } - } + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; } - const next = nextSibling(node); - const container = parentNode(node); - remove(node); - patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds); - return next; - }; - const locateClosingAsyncAnchor = (node) => { - let match = 0; - while (node) { - node = nextSibling(node); - if (node && isComment(node)) { - if (node.data === '[') - match++; - if (node.data === ']') { - if (match === 0) { - return nextSibling(node); - } - else { - match--; - } - } - } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + } + } + return node; + }; + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); + } else { + hasMismatch = true; + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + hasMismatch = true; + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; } - return node; - }; - return [hydrate, hydrateNode]; + } + } + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) + match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } + } + return node; + }; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 /* ELEMENT */ && node.tagName.toLowerCase() === "template"; + }; + return [hydrate, hydrateNode]; + } + function propHasMismatch(el, key, clientValue, vnode) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style"); + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = `attribute`; + mismatchKey = key; + } + } + if (mismatchType) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${mismatchType} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; + } + return false; + } + function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); + } + function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const s of a) { + if (!b.has(s)) { + return false; + } + } + return true; + } + function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key == null ? void 0 : key.trim(); + value = value == null ? void 0 : value.trim(); + if (key && value) { + styleMap.set(key, value); + } + } + return styleMap; + } + function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; + } + } + return true; } - /* eslint-disable no-restricted-globals */ let supported; let perf; function startMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - perf.mark(`vue-${type}-${instance.uid}`); - } - { - devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + perf.mark(`vue-${type}-${instance.uid}`); + } + { + devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now()); + } } function endMeasure(instance, type) { - if (instance.appContext.config.performance && isSupported()) { - const startTag = `vue-${type}-${instance.uid}`; - const endTag = startTag + `:end`; - perf.mark(endTag); - perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag); - perf.clearMarks(startTag); - perf.clearMarks(endTag); - } - { - devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); - } + if (instance.appContext.config.performance && isSupported()) { + const startTag = `vue-${type}-${instance.uid}`; + const endTag = startTag + `:end`; + perf.mark(endTag); + perf.measure( + `<${formatComponentName(instance, instance.type)}> ${type}`, + startTag, + endTag + ); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + } + { + devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now()); + } } function isSupported() { - if (supported !== undefined) { - return supported; - } - if (typeof window !== 'undefined' && window.performance) { - supported = true; - perf = window.performance; - } - else { - supported = false; - } + if (supported !== void 0) { return supported; + } + if (typeof window !== "undefined" && window.performance) { + supported = true; + perf = window.performance; + } else { + supported = false; + } + return supported; } - const queuePostRenderEffect = queueEffectWithSuspense - ; - /** - * The createRenderer function accepts two generic arguments: - * HostNode and HostElement, corresponding to Node and Element types in the - * host environment. For example, for runtime-dom, HostNode would be the DOM - * `Node` interface and HostElement would be the DOM `Element` interface. - * - * Custom renderers can pass in the platform specific types like this: - * - * ``` js - * const { render, createApp } = createRenderer<Node, Element>({ - * patchProp, - * ...nodeOps - * }) - * ``` - */ + const queuePostRenderEffect = queueEffectWithSuspense ; function createRenderer(options) { - return baseCreateRenderer(options); + return baseCreateRenderer(options); } - // Separate API for creating hydration-enabled renderer. - // Hydration logic is only used when calling this function, making it - // tree-shakable. function createHydrationRenderer(options) { - return baseCreateRenderer(options, createHydrationFunctions); + return baseCreateRenderer(options, createHydrationFunctions); } - // implementation function baseCreateRenderer(options, createHydrationFns) { - const target = getGlobalThis(); - target.__VUE__ = true; - { - setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + const target = getGlobalThis(); + target.__VUE__ = true; + { + setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target); + } + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { + if (n1 === n2) { + return; } - const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options; - // Note: functions inside this closure should use `const xxx = () => {}` - // style in order to prevent being inlined by minifiers. - const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => { - if (n1 === n2) { - return; - } - // patching & not same type, unmount old tree - if (n1 && !isSameVNodeType(n1, n2)) { - anchor = getNextHostNode(n1); - unmount(n1, parentComponent, parentSuspense, true); - n1 = null; - } - if (n2.patchFlag === -2 /* BAIL */) { - optimized = false; - n2.dynamicChildren = null; - } - const { type, ref, shapeFlag } = n2; - switch (type) { - case Text: - processText(n1, n2, container, anchor); - break; - case Comment: - processCommentNode(n1, n2, container, anchor); - break; - case Static: - if (n1 == null) { - mountStaticNode(n2, container, anchor, isSVG); - } - else { - patchStaticNode(n1, n2, container, isSVG); - } - break; - case Fragment: - processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - break; - default: - if (shapeFlag & 1 /* ELEMENT */) { - processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 6 /* COMPONENT */) { - processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (shapeFlag & 64 /* TELEPORT */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else if (shapeFlag & 128 /* SUSPENSE */) { - type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals); - } - else { - warn$1('Invalid VNode type:', type, `(${typeof type})`); - } - } - // set ref - if (ref != null && parentComponent) { - setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); - } - }; - const processText = (n1, n2, container, anchor) => { + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: if (n1 == null) { - hostInsert((n2.el = hostCreateText(n2.children)), container, anchor); + mountStaticNode(n2, container, anchor, namespace); + } else { + patchStaticNode(n1, n2, container, namespace); } - else { - const el = (n2.el = n1.el); - if (n2.children !== n1.children) { - hostSetText(el, n2.children); + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else { + warn$1("Invalid VNode type:", type, `(${typeof type})`); + } + } + if (ref != null && parentComponent) { + setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const patchStaticNode = (n1, n2, container, namespace) => { + if (n2.children !== n1.children) { + const anchor = hostNextSibling(n1.anchor); + removeStaticNode(n1); + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace + ); + } else { + n2.el = n1.el; + n2.anchor = n1.anchor; + } + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp( + el, + key, + null, + props[key], + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + { + Object.defineProperty(el, "__vnode", { + value: vnode, + enumerable: false + }); + Object.defineProperty(el, "__vueParentComponent", { + value: parentComponent, + enumerable: false + }); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (subTree.patchFlag > 0 && subTree.patchFlag & 2048) { + subTree = filterSingleRoot(subTree.children) || subTree; + } + if (vnode === subTree) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (isHmrUpdating) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); + } + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + n1.children, + parentComponent, + parentSuspense, + unmountChildren + ); } + } } - }; - const processCommentNode = (n1, n2, container, anchor) => { - if (n1 == null) { - hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor); + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); } - else { - // there's no support for dynamic comments - n2.el = n1.el; + } + } else if (!optimized && dynamicChildren == null) { + patchProps( + el, + n2, + oldProps, + newProps, + parentComponent, + parentSuspense, + namespace + ); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); + } } - }; - const mountStaticNode = (n2, container, anchor, isSVG) => { - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor); - }; - /** - * Dev / HMR only - */ - const patchStaticNode = (n1, n2, container, isSVG) => { - // static nodes are only patched during dev for HMR - if (n2.children !== n1.children) { - const anchor = hostNextSibling(n1.anchor); - // remove existing - removeStaticNode(n1); - [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG); + } + for (const key in newProps) { + if (isReservedProp(key)) + continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp( + el, + key, + prev, + next, + namespace, + vnode.children, + parentComponent, + parentSuspense, + unmountChildren + ); } - else { - n2.el = n1.el; - n2.anchor = n1.anchor; + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if ( + // #5523 dev root fragment may inherit directives + isHmrUpdating || patchFlag & 2048 + ) { + patchFlag = 0; + optimized = false; + dynamicChildren = null; + } + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<></>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + { + traverseStaticChildren(n1, n2); } - }; - const moveStaticNode = ({ el, anchor }, container, nextSibling) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostInsert(el, container, nextSibling); - el = next; + } else { + patchChildren( + n1, + n2, + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + }; + const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + n2.slotScopeIds = slotScopeIds; + if (n1 == null) { + if (n2.shapeFlag & 512) { + parentComponent.ctx.activate( + n2, + container, + anchor, + namespace, + optimized + ); + } else { + mountComponent( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + optimized + ); + } + } else { + updateComponent(n1, n2, optimized); + } + }; + const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => { + const instance = (initialVNode.component = createComponentInstance( + initialVNode, + parentComponent, + parentSuspense + )); + if (instance.type.__hmrId) { + registerHMR(instance); + } + { + pushWarningContext(initialVNode); + startMeasure(instance, `mount`); + } + if (isKeepAlive(initialVNode)) { + instance.ctx.renderer = internals; + } + { + { + startMeasure(instance, `init`); + } + setupComponent(instance); + { + endMeasure(instance, `init`); + } + } + if (instance.asyncDep) { + parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); + if (!initialVNode.el) { + const placeholder = instance.subTree = createVNode(Comment); + processCommentNode(null, placeholder, container, anchor); + } + } else { + setupRenderEffect( + instance, + initialVNode, + container, + anchor, + parentSuspense, + namespace, + optimized + ); + } + { + popWarningContext(); + endMeasure(instance, `mount`); + } + }; + const updateComponent = (n1, n2, optimized) => { + const instance = n2.component = n1.component; + if (shouldUpdateComponent(n1, n2, optimized)) { + if (instance.asyncDep && !instance.asyncResolved) { + { + pushWarningContext(n2); } - hostInsert(anchor, container, nextSibling); - }; - const removeStaticNode = ({ el, anchor }) => { - let next; - while (el && el !== anchor) { - next = hostNextSibling(el); - hostRemove(el); - el = next; + updateComponentPreRender(instance, n2, optimized); + { + popWarningContext(); } - hostRemove(anchor); - }; - const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - isSVG = isSVG || n2.type === 'svg'; - if (n1 == null) { - mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let el; + return; + } else { + instance.next = n2; + invalidateJob(instance.update); + instance.effect.dirty = true; + instance.update(); + } + } else { + n2.el = n1.el; + instance.vnode = n2; + } + }; + const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => { + const componentUpdateFn = () => { + if (!instance.isMounted) { let vnodeHook; - const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode; - { - el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props); - // mount children first, since some props may rely on child content - // being already rendered, e.g. `<select value>` - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(el, vnode.children); - } - else if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized); - } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'created'); - } - // props - if (props) { - for (const key in props) { - if (key !== 'value' && !isReservedProp(key)) { - hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - /** - * Special case for setting value on DOM elements: - * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024) - * - it needs to be forced (#1471) - * #2353 proposes adding another renderer option to configure this, but - * the properties affects are so finite it is worth special casing it - * here to reduce the complexity. (Special casing it also should not - * affect non-DOM renderers) - */ - if ('value' in props) { - hostPatchProp(el, 'value', null, props.value); - } - if ((vnodeHook = props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - } - // scopeId - setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + const { el, props } = initialVNode; + const { bm, m, parent } = instance; + const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); + toggleRecurse(instance, false); + if (bm) { + invokeArrayFns(bm); } - { - Object.defineProperty(el, '__vnode', { - value: vnode, - enumerable: false - }); - Object.defineProperty(el, '__vueParentComponent', { - value: parentComponent, - enumerable: false - }); + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) { + invokeVNodeHook(vnodeHook, parent, initialVNode); } - if (dirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount'); - } - // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved - // #1689 For inside suspense + suspense resolved case, just call it - const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) && - transition && - !transition.persisted; - if (needCallTransitionHooks) { - transition.beforeEnter(el); - } - hostInsert(el, container, anchor); - if ((vnodeHook = props && props.onVnodeMounted) || - needCallTransitionHooks || - dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - needCallTransitionHooks && transition.enter(el); - dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted'); - }, parentSuspense); - } - }; - const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { - if (scopeId) { - hostSetScopeId(el, scopeId); - } - if (slotScopeIds) { - for (let i = 0; i < slotScopeIds.length; i++) { - hostSetScopeId(el, slotScopeIds[i]); - } - } - if (parentComponent) { - let subTree = parentComponent.subTree; - if (subTree.patchFlag > 0 && - subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) { - subTree = - filterSingleRoot(subTree.children) || subTree; - } - if (vnode === subTree) { - const parentVNode = parentComponent.vnode; - setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent); - } - } - }; - const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => { - for (let i = start; i < children.length; i++) { - const child = (children[i] = optimized - ? cloneIfMounted(children[i]) - : normalizeVNode(children[i])); - patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const el = (n2.el = n1.el); - let { patchFlag, dynamicChildren, dirs } = n2; - // #1426 take the old vnode's patch flag into account since user may clone a - // compiler-generated vnode, which de-opts to FULL_PROPS - patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */; - const oldProps = n1.props || EMPTY_OBJ; - const newProps = n2.props || EMPTY_OBJ; - let vnodeHook; - // disable recurse in beforeUpdate hooks - parentComponent && toggleRecurse(parentComponent, false); - if ((vnodeHook = newProps.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - } - if (dirs) { - invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate'); - } - parentComponent && toggleRecurse(parentComponent, true); - if (isHmrUpdating) { - // HMR updated, force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - const areChildrenSVG = isSVG && n2.type !== 'foreignObject'; - if (dynamicChildren) { - patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - } - else if (!optimized) { - // full diff - patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false); - } - if (patchFlag > 0) { - // the presence of a patchFlag means this element's render code was - // generated by the compiler and can take the fast path. - // in this path old node and new node are guaranteed to have the same shape - // (i.e. at the exact same position in the source template) - if (patchFlag & 16 /* FULL_PROPS */) { - // element props contain dynamic keys, full diff needed - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - else { - // class - // this flag is matched when the element has dynamic class bindings. - if (patchFlag & 2 /* CLASS */) { - if (oldProps.class !== newProps.class) { - hostPatchProp(el, 'class', null, newProps.class, isSVG); - } - } - // style - // this flag is matched when the element has dynamic style bindings - if (patchFlag & 4 /* STYLE */) { - hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG); - } - // props - // This flag is matched when the element has dynamic prop/attr bindings - // other than class and style. The keys of dynamic prop/attrs are saved for - // faster iteration. - // Note dynamic keys like :[foo]="bar" will cause this optimization to - // bail out and go through a full diff because we need to unset the old key - if (patchFlag & 8 /* PROPS */) { - // if the flag is present then dynamicProps must be non-null - const propsToUpdate = n2.dynamicProps; - for (let i = 0; i < propsToUpdate.length; i++) { - const key = propsToUpdate[i]; - const prev = oldProps[key]; - const next = newProps[key]; - // #1471 force patch value - if (next !== prev || key === 'value') { - hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - } - // text - // This flag is matched when the element has only dynamic text children. - if (patchFlag & 1 /* TEXT */) { - if (n1.children !== n2.children) { - hostSetElementText(el, n2.children); - } - } - } - else if (!optimized && dynamicChildren == null) { - // unoptimized, full diff - patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG); - } - if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); - dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated'); - }, parentSuspense); - } - }; - // The fast path for blocks. - const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => { - for (let i = 0; i < newChildren.length; i++) { - const oldVNode = oldChildren[i]; - const newVNode = newChildren[i]; - // Determine the container (parent element) for the patch. - const container = - // oldVNode may be an errored async setup() component inside Suspense - // which will not have a mounted element - oldVNode.el && - // - In the case of a Fragment, we need to provide the actual parent - // of the Fragment itself so it can move its children. - (oldVNode.type === Fragment || - // - In the case of different nodes, there is going to be a replacement - // which also requires the correct parent container - !isSameVNodeType(oldVNode, newVNode) || - // - In the case of a component, it could contain anything. - oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */)) - ? hostParentNode(oldVNode.el) - : // In other cases, the parent container is not actually used so we - // just pass the block element here to avoid a DOM parentNode call. - fallbackContainer; - patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true); - } - }; - const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => { - if (oldProps !== newProps) { - for (const key in newProps) { - // empty string is not valid prop - if (isReservedProp(key)) - continue; - const next = newProps[key]; - const prev = oldProps[key]; - // defer patching value - if (next !== prev && key !== 'value') { - hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - if (oldProps !== EMPTY_OBJ) { - for (const key in oldProps) { - if (!isReservedProp(key) && !(key in newProps)) { - hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren); - } - } - } - if ('value' in newProps) { - hostPatchProp(el, 'value', oldProps.value, newProps.value); - } - } - }; - const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText('')); - const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText('')); - let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; - if (// #5523 dev root fragment may inherit directives - (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) { - // HMR updated / Dev root fragment (w/ comments), force full diff - patchFlag = 0; - optimized = false; - dynamicChildren = null; - } - // check if this is a slot fragment with :slotted scope ids - if (fragmentSlotScopeIds) { - slotScopeIds = slotScopeIds - ? slotScopeIds.concat(fragmentSlotScopeIds) - : fragmentSlotScopeIds; - } - if (n1 == null) { - hostInsert(fragmentStartAnchor, container, anchor); - hostInsert(fragmentEndAnchor, container, anchor); - // a fragment can only have array children - // since they are either generated by the compiler, or implicitly created - // from arrays. - mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - if (patchFlag > 0 && - patchFlag & 64 /* STABLE_FRAGMENT */ && - dynamicChildren && - // #2715 the previous fragment could've been a BAILed one as a result - // of renderSlot() with no valid children - n1.dynamicChildren) { - // a stable fragment (template root or <template v-for>) doesn't need to - // patch children order, but it may contain dynamicChildren. - patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds); - if (parentComponent && parentComponent.type.__hmrId) { - traverseStaticChildren(n1, n2); - } - else if ( - // #2080 if the stable fragment has a key, it's a <template v-for> that may - // get moved around. Make sure all root level vnodes inherit el. - // #2134 or if it's a component root, it may also get moved around - // as the component is being moved. - n2.key != null || - (parentComponent && n2 === parentComponent.subTree)) { - traverseStaticChildren(n1, n2, true /* shallow */); - } - } - else { - // keyed / unkeyed, or manual fragments. - // for keyed & unkeyed, since they are compiler generated from v-for, - // each child is guaranteed to be a block so the fragment will never - // have dynamicChildren. - patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } - }; - const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - n2.slotScopeIds = slotScopeIds; - if (n1 == null) { - if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) { - parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized); - } - else { - mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized); - } - } - else { - updateComponent(n1, n2, optimized); - } - }; - const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => { - const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense)); - if (instance.type.__hmrId) { - registerHMR(instance); - } - { - pushWarningContext(initialVNode); - startMeasure(instance, `mount`); - } - // inject renderer internals for keepAlive - if (isKeepAlive(initialVNode)) { - instance.ctx.renderer = internals; - } - // resolve props and slots for setup context - { + toggleRecurse(instance, true); + if (el && hydrateNode) { + const hydrateSubTree = () => { { - startMeasure(instance, `init`); + startMeasure(instance, `render`); } - setupComponent(instance); + instance.subTree = renderComponentRoot(instance); { - endMeasure(instance, `init`); + endMeasure(instance, `render`); } + { + startMeasure(instance, `hydrate`); + } + hydrateNode( + el, + instance.subTree, + instance, + parentSuspense, + null + ); + { + endMeasure(instance, `hydrate`); + } + }; + if (isAsyncWrapperVNode) { + initialVNode.type.__asyncLoader().then( + // note: we are moving the render call into an async callback, + // which means it won't track dependencies - but it's ok because + // a server-rendered async wrapper is already in resolved state + // and it will never need to change. + () => !instance.isUnmounted && hydrateSubTree() + ); + } else { + hydrateSubTree(); + } + } else { + { + startMeasure(instance, `render`); + } + const subTree = instance.subTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); + } + { + startMeasure(instance, `patch`); + } + patch( + null, + subTree, + container, + anchor, + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); + } + initialVNode.el = subTree.el; } - // setup() is async. This component relies on async logic to be resolved - // before proceeding - if (instance.asyncDep) { - parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect); - // Give it a placeholder if this is not hydration - // TODO handle self-defined fallback - if (!initialVNode.el) { - const placeholder = (instance.subTree = createVNode(Comment)); - processCommentNode(null, placeholder, container, anchor); + if (m) { + queuePostRenderEffect(m, parentSuspense); + } + if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) { + const scopedInitialVNode = initialVNode; + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), + parentSuspense + ); + } + if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) { + instance.a && queuePostRenderEffect(instance.a, parentSuspense); + } + instance.isMounted = true; + { + devtoolsComponentAdded(instance); + } + initialVNode = container = anchor = null; + } else { + let { next, bu, u, parent, vnode } = instance; + { + const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance); + if (nonHydratedAsyncRoot) { + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); } + nonHydratedAsyncRoot.asyncDep.then(() => { + if (!instance.isUnmounted) { + componentUpdateFn(); + } + }); return; + } } - setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized); + let originNext = next; + let vnodeHook; { - popWarningContext(); - endMeasure(instance, `mount`); + pushWarningContext(next || instance.vnode); } - }; - const updateComponent = (n1, n2, optimized) => { - const instance = (n2.component = n1.component); - if (shouldUpdateComponent(n1, n2, optimized)) { - if (instance.asyncDep && - !instance.asyncResolved) { - // async & still pending - just update props and slots - // since the component's reactive effect for render isn't set-up yet - { - pushWarningContext(n2); - } - updateComponentPreRender(instance, n2, optimized); - { - popWarningContext(); - } - return; - } - else { - // normal update - instance.next = n2; - // in case the child component is also queued, remove it to avoid - // double updating the same child component in the same flush. - invalidateJob(instance.update); - // instance.update is the reactive effect. - instance.update(); - } + toggleRecurse(instance, false); + if (next) { + next.el = vnode.el; + updateComponentPreRender(instance, next, optimized); + } else { + next = vnode; } - else { - // no update needed. just copy over properties - n2.el = n1.el; - instance.vnode = n2; + if (bu) { + invokeArrayFns(bu); + } + if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parent, next, vnode); } - }; - const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => { - const componentUpdateFn = () => { - if (!instance.isMounted) { - let vnodeHook; - const { el, props } = initialVNode; - const { bm, m, parent } = instance; - const isAsyncWrapperVNode = isAsyncWrapper(initialVNode); - toggleRecurse(instance, false); - // beforeMount hook - if (bm) { - invokeArrayFns(bm); - } - // onVnodeBeforeMount - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeBeforeMount)) { - invokeVNodeHook(vnodeHook, parent, initialVNode); - } - toggleRecurse(instance, true); - if (el && hydrateNode) { - // vnode has adopted host node - perform hydration instead of mount. - const hydrateSubTree = () => { - { - startMeasure(instance, `render`); - } - instance.subTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `hydrate`); - } - hydrateNode(el, instance.subTree, instance, parentSuspense, null); - { - endMeasure(instance, `hydrate`); - } - }; - if (isAsyncWrapperVNode) { - initialVNode.type.__asyncLoader().then( - // note: we are moving the render call into an async callback, - // which means it won't track dependencies - but it's ok because - // a server-rendered async wrapper is already in resolved state - // and it will never need to change. - () => !instance.isUnmounted && hydrateSubTree()); - } - else { - hydrateSubTree(); - } - } - else { - { - startMeasure(instance, `render`); - } - const subTree = (instance.subTree = renderComponentRoot(instance)); - { - endMeasure(instance, `render`); - } - { - startMeasure(instance, `patch`); - } - patch(null, subTree, container, anchor, instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - initialVNode.el = subTree.el; - } - // mounted hook - if (m) { - queuePostRenderEffect(m, parentSuspense); - } - // onVnodeMounted - if (!isAsyncWrapperVNode && - (vnodeHook = props && props.onVnodeMounted)) { - const scopedInitialVNode = initialVNode; - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense); - } - // activated hook for keep-alive roots. - // #1742 activated hook must be accessed after first render - // since the hook may be injected by a child keep-alive - if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ || - (parent && - isAsyncWrapper(parent.vnode) && - parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) { - instance.a && queuePostRenderEffect(instance.a, parentSuspense); - } - instance.isMounted = true; - { - devtoolsComponentAdded(instance); - } - // #2458: deference mount-only object parameters to prevent memleaks - initialVNode = container = anchor = null; - } - else { - // updateComponent - // This is triggered by mutation of component's own state (next: null) - // OR parent calling processComponent (next: VNode) - let { next, bu, u, parent, vnode } = instance; - let originNext = next; - let vnodeHook; - { - pushWarningContext(next || instance.vnode); - } - // Disallow component effect recursion during pre-lifecycle hooks. - toggleRecurse(instance, false); - if (next) { - next.el = vnode.el; - updateComponentPreRender(instance, next, optimized); - } - else { - next = vnode; - } - // beforeUpdate hook - if (bu) { - invokeArrayFns(bu); - } - // onVnodeBeforeUpdate - if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) { - invokeVNodeHook(vnodeHook, parent, next, vnode); - } - toggleRecurse(instance, true); - // render - { - startMeasure(instance, `render`); - } - const nextTree = renderComponentRoot(instance); - { - endMeasure(instance, `render`); - } - const prevTree = instance.subTree; - instance.subTree = nextTree; - { - startMeasure(instance, `patch`); - } - patch(prevTree, nextTree, - // parent may have changed if it's in a teleport - hostParentNode(prevTree.el), - // anchor may have changed if it's in a fragment - getNextHostNode(prevTree), instance, parentSuspense, isSVG); - { - endMeasure(instance, `patch`); - } - next.el = nextTree.el; - if (originNext === null) { - // self-triggered update. In case of HOC, update parent component - // vnode el. HOC is indicated by parent instance's subTree pointing - // to child component's vnode - updateHOCHostEl(instance, nextTree.el); - } - // updated hook - if (u) { - queuePostRenderEffect(u, parentSuspense); - } - // onVnodeUpdated - if ((vnodeHook = next.props && next.props.onVnodeUpdated)) { - queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense); - } - { - devtoolsComponentUpdated(instance); - } - { - popWarningContext(); - } - } - }; - // create reactive effect for rendering - const effect = (instance.effect = new ReactiveEffect(componentUpdateFn, () => queueJob(update), instance.scope // track it in component's effect scope - )); - const update = (instance.update = () => effect.run()); - update.id = instance.uid; - // allowRecurse - // #1801, #2043 component render effects should allow recursive updates toggleRecurse(instance, true); { - effect.onTrack = instance.rtc - ? e => invokeArrayFns(instance.rtc, e) - : void 0; - effect.onTrigger = instance.rtg - ? e => invokeArrayFns(instance.rtg, e) - : void 0; - update.ownerInstance = instance; + startMeasure(instance, `render`); } - update(); - }; - const updateComponentPreRender = (instance, nextVNode, optimized) => { - nextVNode.component = instance; - const prevProps = instance.vnode.props; - instance.vnode = nextVNode; - instance.next = null; - updateProps(instance, nextVNode.props, prevProps, optimized); - updateSlots(instance, nextVNode.children, optimized); - pauseTracking(); - // props update may have triggered pre-flush watchers. - // flush them before the render update. - flushPreFlushCbs(undefined, instance.update); - resetTracking(); - }; - const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => { - const c1 = n1 && n1.children; - const prevShapeFlag = n1 ? n1.shapeFlag : 0; - const c2 = n2.children; - const { patchFlag, shapeFlag } = n2; - // fast path - if (patchFlag > 0) { - if (patchFlag & 128 /* KEYED_FRAGMENT */) { - // this could be either fully-keyed or mixed (some keyed some not) - // presence of patchFlag means children are guaranteed to be arrays - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } - else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) { - // unkeyed - patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - return; - } + const nextTree = renderComponentRoot(instance); + { + endMeasure(instance, `render`); } - // children has 3 possibilities: text, array or no children. - if (shapeFlag & 8 /* TEXT_CHILDREN */) { - // text children fast path - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - unmountChildren(c1, parentComponent, parentSuspense); - } - if (c2 !== c1) { - hostSetElementText(container, c2); - } + const prevTree = instance.subTree; + instance.subTree = nextTree; + { + startMeasure(instance, `patch`); } - else { - if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) { - // prev children was array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - // two arrays, cannot assume anything, do full diff - patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - // no new children, just unmount old - unmountChildren(c1, parentComponent, parentSuspense, true); - } - } - else { - // prev children was text OR null - // new children is array OR null - if (prevShapeFlag & 8 /* TEXT_CHILDREN */) { - hostSetElementText(container, ''); - } - // mount new if array - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - } + patch( + prevTree, + nextTree, + // parent may have changed if it's in a teleport + hostParentNode(prevTree.el), + // anchor may have changed if it's in a fragment + getNextHostNode(prevTree), + instance, + parentSuspense, + namespace + ); + { + endMeasure(instance, `patch`); } - }; - const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - c1 = c1 || EMPTY_ARR; - c2 = c2 || EMPTY_ARR; - const oldLength = c1.length; - const newLength = c2.length; - const commonLength = Math.min(oldLength, newLength); - let i; - for (i = 0; i < commonLength; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); + next.el = nextTree.el; + if (originNext === null) { + updateHOCHostEl(instance, nextTree.el); } - if (oldLength > newLength) { - // remove old - unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength); + if (u) { + queuePostRenderEffect(u, parentSuspense); } - else { - // mount new - mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength); - } - }; - // can be all-keyed or mixed - const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => { - let i = 0; - const l2 = c2.length; - let e1 = c1.length - 1; // prev ending index - let e2 = l2 - 1; // next ending index - // 1. sync from start - // (a b) c - // (a b) d e - while (i <= e1 && i <= e2) { - const n1 = c1[i]; - const n2 = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - i++; - } - // 2. sync from end - // a (b c) - // d e (b c) - while (i <= e1 && i <= e2) { - const n1 = c1[e1]; - const n2 = (c2[e2] = optimized - ? cloneIfMounted(c2[e2]) - : normalizeVNode(c2[e2])); - if (isSameVNodeType(n1, n2)) { - patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else { - break; - } - e1--; - e2--; - } - // 3. common sequence + mount - // (a b) - // (a b) c - // i = 2, e1 = 1, e2 = 2 - // (a b) - // c (a b) - // i = 0, e1 = -1, e2 = 0 - if (i > e1) { - if (i <= e2) { - const nextPos = e2 + 1; - const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; - while (i <= e2) { - patch(null, (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - i++; - } - } - } - // 4. common sequence + unmount - // (a b) c - // (a b) - // i = 2, e1 = 2, e2 = 1 - // a (b c) - // (b c) - // i = 0, e1 = 0, e2 = -1 - else if (i > e2) { - while (i <= e1) { - unmount(c1[i], parentComponent, parentSuspense, true); - i++; - } - } - // 5. unknown sequence - // [i ... e1 + 1]: a b [c d e] f g - // [i ... e2 + 1]: a b [e d c h] f g - // i = 2, e1 = 4, e2 = 5 - else { - const s1 = i; // prev starting index - const s2 = i; // next starting index - // 5.1 build key:index map for newChildren - const keyToNewIndexMap = new Map(); - for (i = s2; i <= e2; i++) { - const nextChild = (c2[i] = optimized - ? cloneIfMounted(c2[i]) - : normalizeVNode(c2[i])); - if (nextChild.key != null) { - if (keyToNewIndexMap.has(nextChild.key)) { - warn$1(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`); - } - keyToNewIndexMap.set(nextChild.key, i); - } - } - // 5.2 loop through old children left to be patched and try to patch - // matching nodes & remove nodes that are no longer present - let j; - let patched = 0; - const toBePatched = e2 - s2 + 1; - let moved = false; - // used to track whether any node has moved - let maxNewIndexSoFar = 0; - // works as Map<newIndex, oldIndex> - // Note that oldIndex is offset by +1 - // and oldIndex = 0 is a special value indicating the new node has - // no corresponding old node. - // used for determining longest stable subsequence - const newIndexToOldIndexMap = new Array(toBePatched); - for (i = 0; i < toBePatched; i++) - newIndexToOldIndexMap[i] = 0; - for (i = s1; i <= e1; i++) { - const prevChild = c1[i]; - if (patched >= toBePatched) { - // all new children have been patched so this can only be a removal - unmount(prevChild, parentComponent, parentSuspense, true); - continue; - } - let newIndex; - if (prevChild.key != null) { - newIndex = keyToNewIndexMap.get(prevChild.key); - } - else { - // key-less node, try to locate a key-less node of the same type - for (j = s2; j <= e2; j++) { - if (newIndexToOldIndexMap[j - s2] === 0 && - isSameVNodeType(prevChild, c2[j])) { - newIndex = j; - break; - } - } - } - if (newIndex === undefined) { - unmount(prevChild, parentComponent, parentSuspense, true); - } - else { - newIndexToOldIndexMap[newIndex - s2] = i + 1; - if (newIndex >= maxNewIndexSoFar) { - maxNewIndexSoFar = newIndex; - } - else { - moved = true; - } - patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - patched++; - } - } - // 5.3 move and mount - // generate longest stable subsequence only when nodes have moved - const increasingNewIndexSequence = moved - ? getSequence(newIndexToOldIndexMap) - : EMPTY_ARR; - j = increasingNewIndexSequence.length - 1; - // looping backwards so that we can use last patched node as anchor - for (i = toBePatched - 1; i >= 0; i--) { - const nextIndex = s2 + i; - const nextChild = c2[nextIndex]; - const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; - if (newIndexToOldIndexMap[i] === 0) { - // mount new - patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - else if (moved) { - // move if: - // There is no stable subsequence (e.g. a reverse) - // OR current node is not among the stable sequence - if (j < 0 || i !== increasingNewIndexSequence[j]) { - move(nextChild, container, anchor, 2 /* REORDER */); - } - else { - j--; - } - } - } - } - }; - const move = (vnode, container, anchor, moveType, parentSuspense = null) => { - const { el, type, transition, children, shapeFlag } = vnode; - if (shapeFlag & 6 /* COMPONENT */) { - move(vnode.component.subTree, container, anchor, moveType); - return; - } - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.move(container, anchor, moveType); - return; - } - if (shapeFlag & 64 /* TELEPORT */) { - type.move(vnode, container, anchor, internals); - return; - } - if (type === Fragment) { - hostInsert(el, container, anchor); - for (let i = 0; i < children.length; i++) { - move(children[i], container, anchor, moveType); - } - hostInsert(vnode.anchor, container, anchor); - return; - } - if (type === Static) { - moveStaticNode(vnode, container, anchor); - return; - } - // single nodes - const needTransition = moveType !== 2 /* REORDER */ && - shapeFlag & 1 /* ELEMENT */ && - transition; - if (needTransition) { - if (moveType === 0 /* ENTER */) { - transition.beforeEnter(el); - hostInsert(el, container, anchor); - queuePostRenderEffect(() => transition.enter(el), parentSuspense); - } - else { - const { leave, delayLeave, afterLeave } = transition; - const remove = () => hostInsert(el, container, anchor); - const performLeave = () => { - leave(el, () => { - remove(); - afterLeave && afterLeave(); - }); - }; - if (delayLeave) { - delayLeave(el, remove, performLeave); - } - else { - performLeave(); - } - } - } - else { - hostInsert(el, container, anchor); - } - }; - const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { - const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode; - // unset ref - if (ref != null) { - setRef(ref, null, parentSuspense, vnode, true); - } - if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) { - parentComponent.ctx.deactivate(vnode); - return; - } - const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs; - const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); - let vnodeHook; - if (shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeBeforeUnmount)) { - invokeVNodeHook(vnodeHook, parentComponent, vnode); - } - if (shapeFlag & 6 /* COMPONENT */) { - unmountComponent(vnode.component, parentSuspense, doRemove); - } - else { - if (shapeFlag & 128 /* SUSPENSE */) { - vnode.suspense.unmount(parentSuspense, doRemove); - return; - } - if (shouldInvokeDirs) { - invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount'); - } - if (shapeFlag & 64 /* TELEPORT */) { - vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove); - } - else if (dynamicChildren && - // #1153: fast path should not be taken for non-stable (v-for) fragments - (type !== Fragment || - (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) { - // fast path for block nodes: only need to unmount dynamic children. - unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true); - } - else if ((type === Fragment && - patchFlag & - (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) || - (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) { - unmountChildren(children, parentComponent, parentSuspense); - } - if (doRemove) { - remove(vnode); - } - } - if ((shouldInvokeVnodeHook && - (vnodeHook = props && props.onVnodeUnmounted)) || - shouldInvokeDirs) { - queuePostRenderEffect(() => { - vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); - shouldInvokeDirs && - invokeDirectiveHook(vnode, null, parentComponent, 'unmounted'); - }, parentSuspense); - } - }; - const remove = vnode => { - const { type, el, anchor, transition } = vnode; - if (type === Fragment) { - if (vnode.patchFlag > 0 && - vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ && - transition && - !transition.persisted) { - vnode.children.forEach(child => { - if (child.type === Comment) { - hostRemove(child.el); - } - else { - remove(child); - } - }); - } - else { - removeFragment(el, anchor); - } - return; - } - if (type === Static) { - removeStaticNode(vnode); - return; - } - const performRemove = () => { - hostRemove(el); - if (transition && !transition.persisted && transition.afterLeave) { - transition.afterLeave(); - } - }; - if (vnode.shapeFlag & 1 /* ELEMENT */ && - transition && - !transition.persisted) { - const { leave, delayLeave } = transition; - const performLeave = () => leave(el, performRemove); - if (delayLeave) { - delayLeave(vnode.el, performRemove, performLeave); - } - else { - performLeave(); - } - } - else { - performRemove(); - } - }; - const removeFragment = (cur, end) => { - // For fragments, directly remove all contained DOM nodes. - // (fragment child nodes cannot have transition) - let next; - while (cur !== end) { - next = hostNextSibling(cur); - hostRemove(cur); - cur = next; - } - hostRemove(end); - }; - const unmountComponent = (instance, parentSuspense, doRemove) => { - if (instance.type.__hmrId) { - unregisterHMR(instance); - } - const { bum, scope, update, subTree, um } = instance; - // beforeUnmount hook - if (bum) { - invokeArrayFns(bum); - } - // stop effects in component scope - scope.stop(); - // update may be null if a component is unmounted before its async - // setup has resolved. - if (update) { - // so that scheduler will no longer invoke it - update.active = false; - unmount(subTree, instance, parentSuspense, doRemove); - } - // unmounted hook - if (um) { - queuePostRenderEffect(um, parentSuspense); - } - queuePostRenderEffect(() => { - instance.isUnmounted = true; - }, parentSuspense); - // A component with async dep inside a pending suspense is unmounted before - // its async dep resolves. This should remove the dep from the suspense, and - // cause the suspense to resolve immediately if that was the last dep. - if (parentSuspense && - parentSuspense.pendingBranch && - !parentSuspense.isUnmounted && - instance.asyncDep && - !instance.asyncResolved && - instance.suspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0) { - parentSuspense.resolve(); - } + if (vnodeHook = next.props && next.props.onVnodeUpdated) { + queuePostRenderEffect( + () => invokeVNodeHook(vnodeHook, parent, next, vnode), + parentSuspense + ); } { - devtoolsComponentRemoved(instance); + devtoolsComponentUpdated(instance); } + { + popWarningContext(); + } + } }; - const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { - for (let i = start; i < children.length; i++) { - unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); - } + const effect = instance.effect = new ReactiveEffect( + componentUpdateFn, + NOOP, + () => queueJob(update), + instance.scope + // track it in component's effect scope + ); + const update = instance.update = () => { + if (effect.dirty) { + effect.run(); + } }; - const getNextHostNode = vnode => { - if (vnode.shapeFlag & 6 /* COMPONENT */) { - return getNextHostNode(vnode.component.subTree); - } - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - return vnode.suspense.next(); - } - return hostNextSibling((vnode.anchor || vnode.el)); - }; - const render = (vnode, container, isSVG) => { - if (vnode == null) { - if (container._vnode) { - unmount(container._vnode, null, null, true); - } - } - else { - patch(container._vnode || null, vnode, container, null, null, null, isSVG); - } - flushPostFlushCbs(); - container._vnode = vnode; - }; - const internals = { - p: patch, - um: unmount, - m: move, - r: remove, - mt: mountComponent, - mc: mountChildren, - pc: patchChildren, - pbc: patchBlockChildren, - n: getNextHostNode, - o: options - }; - let hydrate; - let hydrateNode; - if (createHydrationFns) { - [hydrate, hydrateNode] = createHydrationFns(internals); + update.id = instance.uid; + toggleRecurse(instance, true); + { + effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0; + effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0; + update.ownerInstance = instance; } - return { - render, - hydrate, - createApp: createAppAPI(render, hydrate) + update(); + }; + const updateComponentPreRender = (instance, nextVNode, optimized) => { + nextVNode.component = instance; + const prevProps = instance.vnode.props; + instance.vnode = nextVNode; + instance.next = null; + updateProps(instance, nextVNode.props, prevProps, optimized); + updateSlots(instance, nextVNode.children, optimized); + pauseTracking(); + flushPreFlushCbs(instance); + resetTracking(); + }; + const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => { + const c1 = n1 && n1.children; + const prevShapeFlag = n1 ? n1.shapeFlag : 0; + const c2 = n2.children; + const { patchFlag, shapeFlag } = n2; + if (patchFlag > 0) { + if (patchFlag & 128) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } else if (patchFlag & 256) { + patchUnkeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + return; + } + } + if (shapeFlag & 8) { + if (prevShapeFlag & 16) { + unmountChildren(c1, parentComponent, parentSuspense); + } + if (c2 !== c1) { + hostSetElementText(container, c2); + } + } else { + if (prevShapeFlag & 16) { + if (shapeFlag & 16) { + patchKeyedChildren( + c1, + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + unmountChildren(c1, parentComponent, parentSuspense, true); + } + } else { + if (prevShapeFlag & 8) { + hostSetElementText(container, ""); + } + if (shapeFlag & 16) { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + } + } + }; + const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + c1 = c1 || EMPTY_ARR; + c2 = c2 || EMPTY_ARR; + const oldLength = c1.length; + const newLength = c2.length; + const commonLength = Math.min(oldLength, newLength); + let i; + for (i = 0; i < commonLength; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + patch( + c1[i], + nextChild, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + if (oldLength > newLength) { + unmountChildren( + c1, + parentComponent, + parentSuspense, + true, + false, + commonLength + ); + } else { + mountChildren( + c2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + commonLength + ); + } + }; + const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let i = 0; + const l2 = c2.length; + let e1 = c1.length - 1; + let e2 = l2 - 1; + while (i <= e1 && i <= e2) { + const n1 = c1[i]; + const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + i++; + } + while (i <= e1 && i <= e2) { + const n1 = c1[e1]; + const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]); + if (isSameVNodeType(n1, n2)) { + patch( + n1, + n2, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + break; + } + e1--; + e2--; + } + if (i > e1) { + if (i <= e2) { + const nextPos = e2 + 1; + const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor; + while (i <= e2) { + patch( + null, + c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]), + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + i++; + } + } + } else if (i > e2) { + while (i <= e1) { + unmount(c1[i], parentComponent, parentSuspense, true); + i++; + } + } else { + const s1 = i; + const s2 = i; + const keyToNewIndexMap = /* @__PURE__ */ new Map(); + for (i = s2; i <= e2; i++) { + const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]); + if (nextChild.key != null) { + if (keyToNewIndexMap.has(nextChild.key)) { + warn$1( + `Duplicate keys found during update:`, + JSON.stringify(nextChild.key), + `Make sure keys are unique.` + ); + } + keyToNewIndexMap.set(nextChild.key, i); + } + } + let j; + let patched = 0; + const toBePatched = e2 - s2 + 1; + let moved = false; + let maxNewIndexSoFar = 0; + const newIndexToOldIndexMap = new Array(toBePatched); + for (i = 0; i < toBePatched; i++) + newIndexToOldIndexMap[i] = 0; + for (i = s1; i <= e1; i++) { + const prevChild = c1[i]; + if (patched >= toBePatched) { + unmount(prevChild, parentComponent, parentSuspense, true); + continue; + } + let newIndex; + if (prevChild.key != null) { + newIndex = keyToNewIndexMap.get(prevChild.key); + } else { + for (j = s2; j <= e2; j++) { + if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) { + newIndex = j; + break; + } + } + } + if (newIndex === void 0) { + unmount(prevChild, parentComponent, parentSuspense, true); + } else { + newIndexToOldIndexMap[newIndex - s2] = i + 1; + if (newIndex >= maxNewIndexSoFar) { + maxNewIndexSoFar = newIndex; + } else { + moved = true; + } + patch( + prevChild, + c2[newIndex], + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + patched++; + } + } + const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR; + j = increasingNewIndexSequence.length - 1; + for (i = toBePatched - 1; i >= 0; i--) { + const nextIndex = s2 + i; + const nextChild = c2[nextIndex]; + const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor; + if (newIndexToOldIndexMap[i] === 0) { + patch( + null, + nextChild, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (moved) { + if (j < 0 || i !== increasingNewIndexSequence[j]) { + move(nextChild, container, anchor, 2); + } else { + j--; + } + } + } + } + }; + const move = (vnode, container, anchor, moveType, parentSuspense = null) => { + const { el, type, transition, children, shapeFlag } = vnode; + if (shapeFlag & 6) { + move(vnode.component.subTree, container, anchor, moveType); + return; + } + if (shapeFlag & 128) { + vnode.suspense.move(container, anchor, moveType); + return; + } + if (shapeFlag & 64) { + type.move(vnode, container, anchor, internals); + return; + } + if (type === Fragment) { + hostInsert(el, container, anchor); + for (let i = 0; i < children.length; i++) { + move(children[i], container, anchor, moveType); + } + hostInsert(vnode.anchor, container, anchor); + return; + } + if (type === Static) { + moveStaticNode(vnode, container, anchor); + return; + } + const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition; + if (needTransition2) { + if (moveType === 0) { + transition.beforeEnter(el); + hostInsert(el, container, anchor); + queuePostRenderEffect(() => transition.enter(el), parentSuspense); + } else { + const { leave, delayLeave, afterLeave } = transition; + const remove2 = () => hostInsert(el, container, anchor); + const performLeave = () => { + leave(el, () => { + remove2(); + afterLeave && afterLeave(); + }); + }; + if (delayLeave) { + delayLeave(el, remove2, performLeave); + } else { + performLeave(); + } + } + } else { + hostInsert(el, container, anchor); + } + }; + const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => { + const { + type, + props, + ref, + children, + dynamicChildren, + shapeFlag, + patchFlag, + dirs + } = vnode; + if (ref != null) { + setRef(ref, null, parentSuspense, vnode, true); + } + if (shapeFlag & 256) { + parentComponent.ctx.deactivate(vnode); + return; + } + const shouldInvokeDirs = shapeFlag & 1 && dirs; + const shouldInvokeVnodeHook = !isAsyncWrapper(vnode); + let vnodeHook; + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + if (shapeFlag & 6) { + unmountComponent(vnode.component, parentSuspense, doRemove); + } else { + if (shapeFlag & 128) { + vnode.suspense.unmount(parentSuspense, doRemove); + return; + } + if (shouldInvokeDirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount"); + } + if (shapeFlag & 64) { + vnode.type.remove( + vnode, + parentComponent, + parentSuspense, + optimized, + internals, + doRemove + ); + } else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments + (type !== Fragment || patchFlag > 0 && patchFlag & 64)) { + unmountChildren( + dynamicChildren, + parentComponent, + parentSuspense, + false, + true + ); + } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) { + unmountChildren(children, parentComponent, parentSuspense); + } + if (doRemove) { + remove(vnode); + } + } + if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted"); + }, parentSuspense); + } + }; + const remove = (vnode) => { + const { type, el, anchor, transition } = vnode; + if (type === Fragment) { + if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) { + vnode.children.forEach((child) => { + if (child.type === Comment) { + hostRemove(child.el); + } else { + remove(child); + } + }); + } else { + removeFragment(el, anchor); + } + return; + } + if (type === Static) { + removeStaticNode(vnode); + return; + } + const performRemove = () => { + hostRemove(el); + if (transition && !transition.persisted && transition.afterLeave) { + transition.afterLeave(); + } }; + if (vnode.shapeFlag & 1 && transition && !transition.persisted) { + const { leave, delayLeave } = transition; + const performLeave = () => leave(el, performRemove); + if (delayLeave) { + delayLeave(vnode.el, performRemove, performLeave); + } else { + performLeave(); + } + } else { + performRemove(); + } + }; + const removeFragment = (cur, end) => { + let next; + while (cur !== end) { + next = hostNextSibling(cur); + hostRemove(cur); + cur = next; + } + hostRemove(end); + }; + const unmountComponent = (instance, parentSuspense, doRemove) => { + if (instance.type.__hmrId) { + unregisterHMR(instance); + } + const { bum, scope, update, subTree, um } = instance; + if (bum) { + invokeArrayFns(bum); + } + scope.stop(); + if (update) { + update.active = false; + unmount(subTree, instance, parentSuspense, doRemove); + } + if (um) { + queuePostRenderEffect(um, parentSuspense); + } + queuePostRenderEffect(() => { + instance.isUnmounted = true; + }, parentSuspense); + if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0) { + parentSuspense.resolve(); + } + } + { + devtoolsComponentRemoved(instance); + } + }; + const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => { + for (let i = start; i < children.length; i++) { + unmount(children[i], parentComponent, parentSuspense, doRemove, optimized); + } + }; + const getNextHostNode = (vnode) => { + if (vnode.shapeFlag & 6) { + return getNextHostNode(vnode.component.subTree); + } + if (vnode.shapeFlag & 128) { + return vnode.suspense.next(); + } + return hostNextSibling(vnode.anchor || vnode.el); + }; + let isFlushing = false; + const render = (vnode, container, namespace) => { + if (vnode == null) { + if (container._vnode) { + unmount(container._vnode, null, null, true); + } + } else { + patch( + container._vnode || null, + vnode, + container, + null, + null, + null, + namespace + ); + } + if (!isFlushing) { + isFlushing = true; + flushPreFlushCbs(); + flushPostFlushCbs(); + isFlushing = false; + } + container._vnode = vnode; + }; + const internals = { + p: patch, + um: unmount, + m: move, + r: remove, + mt: mountComponent, + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + n: getNextHostNode, + o: options + }; + let hydrate; + let hydrateNode; + if (createHydrationFns) { + [hydrate, hydrateNode] = createHydrationFns( + internals + ); + } + return { + render, + hydrate, + createApp: createAppAPI(render, hydrate) + }; + } + function resolveChildrenNamespace({ type, props }, currentNamespace) { + return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace; } function toggleRecurse({ effect, update }, allowed) { - effect.allowRecurse = update.allowRecurse = allowed; + effect.allowRecurse = update.allowRecurse = allowed; + } + function needTransition(parentSuspense, transition) { + return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted; } - /** - * #1156 - * When a component is HMR-enabled, we need to make sure that all static nodes - * inside a block also inherit the DOM element from the previous tree so that - * HMR updates (which are full updates) can retrieve the element for patching. - * - * #2080 - * Inside keyed `template` fragment static children, if a fragment is moved, - * the children will always be moved. Therefore, in order to ensure correct move - * position, el should be inherited from previous nodes. - */ function traverseStaticChildren(n1, n2, shallow = false) { - const ch1 = n1.children; - const ch2 = n2.children; - if (isArray(ch1) && isArray(ch2)) { - for (let i = 0; i < ch1.length; i++) { - // this is only called in the optimized path so array children are - // guaranteed to be vnodes - const c1 = ch1[i]; - let c2 = ch2[i]; - if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) { - if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) { - c2 = ch2[i] = cloneIfMounted(ch2[i]); - c2.el = c1.el; - } - if (!shallow) - traverseStaticChildren(c1, c2); - } - // also inherit for comment nodes, but not placeholders (e.g. v-if which - // would have received .el during block patch) - if (c2.type === Comment && !c2.el) { - c2.el = c1.el; - } + const ch1 = n1.children; + const ch2 = n2.children; + if (isArray(ch1) && isArray(ch2)) { + for (let i = 0; i < ch1.length; i++) { + const c1 = ch1[i]; + let c2 = ch2[i]; + if (c2.shapeFlag & 1 && !c2.dynamicChildren) { + if (c2.patchFlag <= 0 || c2.patchFlag === 32) { + c2 = ch2[i] = cloneIfMounted(ch2[i]); + c2.el = c1.el; } + if (!shallow) + traverseStaticChildren(c1, c2); + } + if (c2.type === Text) { + c2.el = c1.el; + } + if (c2.type === Comment && !c2.el) { + c2.el = c1.el; + } } + } } - // https://en.wikipedia.org/wiki/Longest_increasing_subsequence function getSequence(arr) { - const p = arr.slice(); - const result = [0]; - let i, j, u, v, c; - const len = arr.length; - for (i = 0; i < len; i++) { - const arrI = arr[i]; - if (arrI !== 0) { - j = result[result.length - 1]; - if (arr[j] < arrI) { - p[i] = j; - result.push(i); - continue; - } - u = 0; - v = result.length - 1; - while (u < v) { - c = (u + v) >> 1; - if (arr[result[c]] < arrI) { - u = c + 1; - } - else { - v = c; - } - } - if (arrI < arr[result[u]]) { - if (u > 0) { - p[i] = result[u - 1]; - } - result[u] = i; - } + const p = arr.slice(); + const result = [0]; + let i, j, u, v, c; + const len = arr.length; + for (i = 0; i < len; i++) { + const arrI = arr[i]; + if (arrI !== 0) { + j = result[result.length - 1]; + if (arr[j] < arrI) { + p[i] = j; + result.push(i); + continue; + } + u = 0; + v = result.length - 1; + while (u < v) { + c = u + v >> 1; + if (arr[result[c]] < arrI) { + u = c + 1; + } else { + v = c; } + } + if (arrI < arr[result[u]]) { + if (u > 0) { + p[i] = result[u - 1]; + } + result[u] = i; + } } - u = result.length; - v = result[u - 1]; - while (u-- > 0) { - result[u] = v; - v = p[v]; + } + u = result.length; + v = result[u - 1]; + while (u-- > 0) { + result[u] = v; + v = p[v]; + } + return result; + } + function locateNonHydratedAsyncRoot(instance) { + const subComponent = instance.subTree.component; + if (subComponent) { + if (subComponent.asyncDep && !subComponent.asyncResolved) { + return subComponent; + } else { + return locateNonHydratedAsyncRoot(subComponent); } - return result; + } } const isTeleport = (type) => type.__isTeleport; - const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ''); - const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement; + const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); + const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; + const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; const resolveTarget = (props, select) => { - const targetSelector = props && props.to; - if (isString(targetSelector)) { - if (!select) { - warn$1(`Current renderer does not support string target for Teleports. ` + - `(missing querySelector renderer option)`); - return null; - } - else { - const target = select(targetSelector); - if (!target) { - warn$1(`Failed to locate Teleport target with selector "${targetSelector}". ` + - `Note the target element must exist before the component is mounted - ` + - `i.e. the target cannot be rendered by the component itself, and ` + - `ideally should be outside of the entire Vue component tree.`); - } - return target; - } + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` + ); + return null; + } else { + const target = select(targetSelector); + if (!target) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); + } + return target; } - else { - if (!targetSelector && !isTeleportDisabled(props)) { - warn$1(`Invalid Teleport target: ${targetSelector}`); - } - return targetSelector; + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); } + return targetSelector; + } }; const TeleportImpl = { - __isTeleport: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) { - const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals; - const disabled = isTeleportDisabled(n2.props); - let { shapeFlag, children, dynamicChildren } = n2; - // #3302 - // HMR updated, force full diff - if (isHmrUpdating) { - optimized = false; - dynamicChildren = null; - } - if (n1 == null) { - // insert anchors in the main view - const placeholder = (n2.el = createComment('teleport start') - ); - const mainAnchor = (n2.anchor = createComment('teleport end') - ); - insert(placeholder, container, anchor); - insert(mainAnchor, container, anchor); - const target = (n2.target = resolveTarget(n2.props, querySelector)); - const targetAnchor = (n2.targetAnchor = createText('')); - if (target) { - insert(targetAnchor, target); - // #2652 we could be teleporting from a non-SVG tree into an SVG tree - isSVG = isSVG || isTargetSVG(target); - } - else if (!disabled) { - warn$1('Invalid Teleport target on mount:', target, `(${typeof target})`); - } - const mount = (container, anchor) => { - // Teleport *always* has Array children. This is enforced in both the - // compiler and vnode children normalization. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized); - } - }; - if (disabled) { - mount(container, mainAnchor); - } - else if (target) { - mount(target, targetAnchor); - } - } - else { - // update content - n2.el = n1.el; - const mainAnchor = (n2.anchor = n1.anchor); - const target = (n2.target = n1.target); - const targetAnchor = (n2.targetAnchor = n1.targetAnchor); - const wasDisabled = isTeleportDisabled(n1.props); - const currentContainer = wasDisabled ? container : target; - const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; - isSVG = isSVG || isTargetSVG(target); - if (dynamicChildren) { - // fast path when the teleport happens to be a block root - patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds); - // even in block tree mode we need to make sure all root-level nodes - // in the teleport inherit previous DOM references so that they can - // be moved in future patches. - traverseStaticChildren(n1, n2, true); - } - else if (!optimized) { - patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false); - } - if (disabled) { - if (!wasDisabled) { - // enabled -> disabled - // move into main container - moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */); - } - } - else { - // target changed - if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { - const nextTarget = (n2.target = resolveTarget(n2.props, querySelector)); - if (nextTarget) { - moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */); - } - else { - warn$1('Invalid Teleport target on update:', target, `(${typeof target})`); - } - } - else if (wasDisabled) { - // disabled -> enabled - // move into teleport target - moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */); - } - } - } - }, - remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { - const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; - if (target) { - hostRemove(targetAnchor); - } - // an unmounted teleport should always remove its children if not disabled - if (doRemove || !isTeleportDisabled(props)) { - hostRemove(anchor); - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - const child = children[i]; - unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren); - } - } - } - }, - move: moveTeleport, - hydrate: hydrateTeleport - }; - function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) { - // move target anchor if this is a target change. - if (moveType === 0 /* TARGET_CHANGE */) { - insert(vnode.targetAnchor, container, parentAnchor); + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; } - const { el, anchor, shapeFlag, children, props } = vnode; - const isReorder = moveType === 2 /* REORDER */; - // move main view anchor if this is a re-order. - if (isReorder) { - insert(el, container, parentAnchor); - } - // if this is a re-order and teleport is enabled (content is in target) - // do not move children. So the opposite is: only move children if this - // is not a reorder, or the teleport is disabled - if (!isReorder || isTeleportDisabled(props)) { - // Teleport has either Array children or no children. - if (shapeFlag & 16 /* ARRAY_CHILDREN */) { - for (let i = 0; i < children.length; i++) { - move(children[i], container, parentAnchor, 2 /* REORDER */); - } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = n2.targetAnchor = createText(""); + if (target) { + insert(targetAnchor, target); + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; } + } else if (!disabled) { + warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`); + } + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + if (disabled) { + mount(container, mainAnchor); + } else if (target) { + mount(target, targetAnchor); + } + } else { + n2.el = n1.el; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } } - // move main view anchor if this is a re-order. - if (isReorder) { - insert(anchor, container, parentAnchor); - } - } - function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) { - const target = (vnode.target = resolveTarget(vnode.props, querySelector)); + updateCssVars(n2); + }, + remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode; if (target) { - // if multiple teleports rendered to the same target element, we need to - // pick up from where the last teleport finished instead of the first node - const targetNode = target._lpa || target.firstChild; - if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) { - if (isTeleportDisabled(vnode.props)) { - vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized); - vnode.targetAnchor = targetNode; - } - else { - vnode.anchor = nextSibling(node); - // lookahead until we find the target anchor - // we cannot rely on return value of hydrateChildren() because there - // could be nested teleports - let targetAnchor = targetNode; - while (targetAnchor) { - targetAnchor = nextSibling(targetAnchor); - if (targetAnchor && - targetAnchor.nodeType === 8 && - targetAnchor.data === 'teleport anchor') { - vnode.targetAnchor = targetAnchor; - target._lpa = - vnode.targetAnchor && nextSibling(vnode.targetAnchor); - break; - } - } - hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized); - } - } + hostRemove(targetAnchor); } - return vnode.anchor && nextSibling(vnode.anchor); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport + }; + function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } + } + function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector } + }, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetAnchor = targetNode; + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + targetAnchor = nextSibling(targetAnchor); + if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + hydrateChildren( + targetNode, + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); } - // Force-casted public typing for h and TSX props inference const Teleport = TeleportImpl; + function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.children[0].el; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) + node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } + } - const Fragment = Symbol('Fragment' ); - const Text = Symbol('Text' ); - const Comment = Symbol('Comment' ); - const Static = Symbol('Static' ); - // Since v-if and v-for are the two possible ways node structure can dynamically - // change, once we consider v-if branches and each v-for fragment a block, we - // can divide a template into nested blocks, and within each block the node - // structure would be stable. This allows us to skip most children diffing - // and only worry about the dynamic nodes (indicated by patch flags). + const Fragment = Symbol.for("v-fgt"); + const Text = Symbol.for("v-txt"); + const Comment = Symbol.for("v-cmt"); + const Static = Symbol.for("v-stc"); const blockStack = []; let currentBlock = null; - /** - * Open a block. - * This must be called before `createBlock`. It cannot be part of `createBlock` - * because the children of the block are evaluated before `createBlock` itself - * is called. The generated code typically looks like this: - * - * ```js - * function render() { - * return (openBlock(),createBlock('div', null, [...])) - * } - * ``` - * disableTracking is true when creating a v-for fragment block, since a v-for - * fragment always diffs its children. - * - * @private - */ function openBlock(disableTracking = false) { - blockStack.push((currentBlock = disableTracking ? null : [])); + blockStack.push(currentBlock = disableTracking ? null : []); } function closeBlock() { - blockStack.pop(); - currentBlock = blockStack[blockStack.length - 1] || null; + blockStack.pop(); + currentBlock = blockStack[blockStack.length - 1] || null; } - // Whether we should be tracking dynamic child nodes inside a block. - // Only tracks when this value is > 0 - // We are not using a simple boolean because this value may need to be - // incremented/decremented by nested usage of v-once (see below) let isBlockTreeEnabled = 1; - /** - * Block tracking sometimes needs to be disabled, for example during the - * creation of a tree that needs to be cached by v-once. The compiler generates - * code like this: - * - * ``` js - * _cache[1] || ( - * setBlockTracking(-1), - * _cache[1] = createVNode(...), - * setBlockTracking(1), - * _cache[1] - * ) - * ``` - * - * @private - */ function setBlockTracking(value) { - isBlockTreeEnabled += value; + isBlockTreeEnabled += value; } function setupBlock(vnode) { - // save current block children on the block vnode - vnode.dynamicChildren = - isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; - // close block - closeBlock(); - // a block is always going to be patched, so track it as a child of its - // parent block - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(vnode); - } - return vnode; + vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null; + closeBlock(); + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(vnode); + } + return vnode; } - /** - * @private - */ function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) { - return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */)); + return setupBlock( + createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + true + ) + ); } - /** - * Create a block root vnode. Takes the same exact arguments as `createVNode`. - * A block root keeps track of dynamic nodes within the block in the - * `dynamicChildren` array. - * - * @private - */ function createBlock(type, props, children, patchFlag, dynamicProps) { - return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */)); + return setupBlock( + createVNode( + type, + props, + children, + patchFlag, + dynamicProps, + true + ) + ); } function isVNode(value) { - return value ? value.__v_isVNode === true : false; + return value ? value.__v_isVNode === true : false; } function isSameVNodeType(n1, n2) { - if (n2.shapeFlag & 6 /* COMPONENT */ && - hmrDirtyComponents.has(n2.type)) { - // HMR only: if the component has been hot-updated, force a reload. - return false; - } - return n1.type === n2.type && n1.key === n2.key; + if (n2.shapeFlag & 6 && hmrDirtyComponents.has(n2.type)) { + n1.shapeFlag &= ~256; + n2.shapeFlag &= ~512; + return false; + } + return n1.type === n2.type && n1.key === n2.key; } let vnodeArgsTransformer; - /** - * Internal API for registering an arguments transform for createVNode - * used for creating stubs in the test-utils - * It is *internal* but needs to be exposed for test-utils to pick up proper - * typings - */ function transformVNodeArgs(transformer) { - vnodeArgsTransformer = transformer; + vnodeArgsTransformer = transformer; } const createVNodeWithArgsTransform = (...args) => { - return _createVNode(...(vnodeArgsTransformer - ? vnodeArgsTransformer(args, currentRenderingInstance) - : args)); + return _createVNode( + ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args + ); }; const InternalObjectKey = `__vInternal`; const normalizeKey = ({ key }) => key != null ? key : null; - const normalizeRef = ({ ref, ref_key, ref_for }) => { - return (ref != null - ? isString(ref) || isRef(ref) || isFunction(ref) - ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } - : ref - : null); + const normalizeRef = ({ + ref, + ref_key, + ref_for + }) => { + if (typeof ref === "number") { + ref = "" + ref; + } + return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null; }; - function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) { - const vnode = { - __v_isVNode: true, - __v_skip: true, - type, - props, - key: props && normalizeKey(props), - ref: props && normalizeRef(props), - scopeId: currentScopeId, - slotScopeIds: null, - children, - component: null, - suspense: null, - ssContent: null, - ssFallback: null, - dirs: null, - transition: null, - el: null, - anchor: null, - target: null, - targetAnchor: null, - staticCount: 0, - shapeFlag, - patchFlag, - dynamicProps, - dynamicChildren: null, - appContext: null - }; - if (needFullChildrenNormalization) { - normalizeChildren(vnode, children); - // normalize suspense children - if (shapeFlag & 128 /* SUSPENSE */) { - type.normalize(vnode); - } + function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) { + const vnode = { + __v_isVNode: true, + __v_skip: true, + type, + props, + key: props && normalizeKey(props), + ref: props && normalizeRef(props), + scopeId: currentScopeId, + slotScopeIds: null, + children, + component: null, + suspense: null, + ssContent: null, + ssFallback: null, + dirs: null, + transition: null, + el: null, + anchor: null, + target: null, + targetAnchor: null, + staticCount: 0, + shapeFlag, + patchFlag, + dynamicProps, + dynamicChildren: null, + appContext: null, + ctx: currentRenderingInstance + }; + if (needFullChildrenNormalization) { + normalizeChildren(vnode, children); + if (shapeFlag & 128) { + type.normalize(vnode); } - else if (children) { - // compiled element vnode - if children is passed, only possible types are - // string or Array. - vnode.shapeFlag |= isString(children) - ? 8 /* TEXT_CHILDREN */ - : 16 /* ARRAY_CHILDREN */; - } - // validate key - if (vnode.key !== vnode.key) { - warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); - } - // track vnode for block tree - if (isBlockTreeEnabled > 0 && - // avoid a block node from tracking itself - !isBlockNode && - // has current parent block - currentBlock && - // presence of a patch flag indicates this node needs patching on updates. - // component nodes also should always be patched, because even if the - // component doesn't need to update, it needs to persist the instance on to - // the next vnode so that it can be properly unmounted later. - (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) && - // the EVENTS flag is only for hydration and if it is the only flag, the - // vnode should not be considered dynamic due to handler caching. - vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) { - currentBlock.push(vnode); - } - return vnode; + } else if (children) { + vnode.shapeFlag |= isString(children) ? 8 : 16; + } + if (vnode.key !== vnode.key) { + warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type); + } + if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself + !isBlockNode && // has current parent block + currentBlock && // presence of a patch flag indicates this node needs patching on updates. + // component nodes also should always be patched, because even if the + // component doesn't need to update, it needs to persist the instance on to + // the next vnode so that it can be properly unmounted later. + (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the + // vnode should not be considered dynamic due to handler caching. + vnode.patchFlag !== 32) { + currentBlock.push(vnode); + } + return vnode; } - const createVNode = (createVNodeWithArgsTransform ); + const createVNode = createVNodeWithArgsTransform ; function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) { - if (!type || type === NULL_DYNAMIC_COMPONENT) { - if (!type) { - warn$1(`Invalid vnode type when creating vnode: ${type}.`); - } - type = Comment; + if (!type || type === NULL_DYNAMIC_COMPONENT) { + if (!type) { + warn$1(`Invalid vnode type when creating vnode: ${type}.`); } - if (isVNode(type)) { - // createVNode receiving an existing vnode. This happens in cases like - // <component :is="vnode"/> - // #2078 make sure to merge refs during the clone instead of overwriting it - const cloned = cloneVNode(type, props, true /* mergeRef: true */); - if (children) { - normalizeChildren(cloned, children); - } - if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { - if (cloned.shapeFlag & 6 /* COMPONENT */) { - currentBlock[currentBlock.indexOf(type)] = cloned; - } - else { - currentBlock.push(cloned); - } - } - cloned.patchFlag |= -2 /* BAIL */; - return cloned; + type = Comment; + } + if (isVNode(type)) { + const cloned = cloneVNode( + type, + props, + true + /* mergeRef: true */ + ); + if (children) { + normalizeChildren(cloned, children); } - // class component normalization. - if (isClassComponent(type)) { - type = type.__vccOpts; + if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) { + if (cloned.shapeFlag & 6) { + currentBlock[currentBlock.indexOf(type)] = cloned; + } else { + currentBlock.push(cloned); + } } - // class & style normalization. - if (props) { - // for reactive or proxy objects, we need to clone it to enable mutation. - props = guardReactiveProps(props); - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (isObject(style)) { - // reactive state objects need to be cloned since they are likely to be - // mutated - if (isProxy(style) && !isArray(style)) { - style = extend({}, style); - } - props.style = normalizeStyle(style); - } + cloned.patchFlag |= -2; + return cloned; + } + if (isClassComponent(type)) { + type = type.__vccOpts; + } + if (props) { + props = guardReactiveProps(props); + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); } - // encode the vnode type information into a bitmap - const shapeFlag = isString(type) - ? 1 /* ELEMENT */ - : isSuspense(type) - ? 128 /* SUSPENSE */ - : isTeleport(type) - ? 64 /* TELEPORT */ - : isObject(type) - ? 4 /* STATEFUL_COMPONENT */ - : isFunction(type) - ? 2 /* FUNCTIONAL_COMPONENT */ - : 0; - if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) { - type = toRaw(type); - warn$1(`Vue received a Component which was made a reactive object. This can ` + - `lead to unnecessary performance overhead, and should be avoided by ` + - `marking the component with \`markRaw\` or using \`shallowRef\` ` + - `instead of \`ref\`.`, `\nComponent that was made reactive: `, type); + if (isObject(style)) { + if (isProxy(style) && !isArray(style)) { + style = extend({}, style); + } + props.style = normalizeStyle(style); } - return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true); + } + const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0; + if (shapeFlag & 4 && isProxy(type)) { + type = toRaw(type); + warn$1( + `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`, + ` +Component that was made reactive: `, + type + ); + } + return createBaseVNode( + type, + props, + children, + patchFlag, + dynamicProps, + shapeFlag, + isBlockNode, + true + ); } function guardReactiveProps(props) { - if (!props) - return null; - return isProxy(props) || InternalObjectKey in props - ? extend({}, props) - : props; + if (!props) + return null; + return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props; } function cloneVNode(vnode, extraProps, mergeRef = false) { - // This is intentionally NOT using spread or extend to avoid the runtime - // key enumeration cost. - const { props, ref, patchFlag, children } = vnode; - const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; - const cloned = { - __v_isVNode: true, - __v_skip: true, - type: vnode.type, - props: mergedProps, - key: mergedProps && normalizeKey(mergedProps), - ref: extraProps && extraProps.ref - ? // #2078 in the case of <component :is="vnode" ref="extra"/> - // if the vnode itself already has a ref, cloneVNode will need to merge - // the refs so the single vnode can be set on multiple refs - mergeRef && ref - ? isArray(ref) - ? ref.concat(normalizeRef(extraProps)) - : [ref, normalizeRef(extraProps)] - : normalizeRef(extraProps) - : ref, - scopeId: vnode.scopeId, - slotScopeIds: vnode.slotScopeIds, - children: patchFlag === -1 /* HOISTED */ && isArray(children) - ? children.map(deepCloneVNode) - : children, - target: vnode.target, - targetAnchor: vnode.targetAnchor, - staticCount: vnode.staticCount, - shapeFlag: vnode.shapeFlag, - // if the vnode is cloned with extra props, we can no longer assume its - // existing patch flag to be reliable and need to add the FULL_PROPS flag. - // note: preserve flag for fragments since they use the flag for children - // fast paths only. - patchFlag: extraProps && vnode.type !== Fragment - ? patchFlag === -1 // hoisted node - ? 16 /* FULL_PROPS */ - : patchFlag | 16 /* FULL_PROPS */ - : patchFlag, - dynamicProps: vnode.dynamicProps, - dynamicChildren: vnode.dynamicChildren, - appContext: vnode.appContext, - dirs: vnode.dirs, - transition: vnode.transition, - // These should technically only be non-null on mounted VNodes. However, - // they *should* be copied for kept-alive vnodes. So we just always copy - // them since them being non-null during a mount doesn't affect the logic as - // they will simply be overwritten. - component: vnode.component, - suspense: vnode.suspense, - ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), - ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), - el: vnode.el, - anchor: vnode.anchor - }; - return cloned; + const { props, ref, patchFlag, children } = vnode; + const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props; + const cloned = { + __v_isVNode: true, + __v_skip: true, + type: vnode.type, + props: mergedProps, + key: mergedProps && normalizeKey(mergedProps), + ref: extraProps && extraProps.ref ? ( + // #2078 in the case of <component :is="vnode" ref="extra"/> + // if the vnode itself already has a ref, cloneVNode will need to merge + // the refs so the single vnode can be set on multiple refs + mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps) + ) : ref, + scopeId: vnode.scopeId, + slotScopeIds: vnode.slotScopeIds, + children: patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children, + target: vnode.target, + targetAnchor: vnode.targetAnchor, + staticCount: vnode.staticCount, + shapeFlag: vnode.shapeFlag, + // if the vnode is cloned with extra props, we can no longer assume its + // existing patch flag to be reliable and need to add the FULL_PROPS flag. + // note: preserve flag for fragments since they use the flag for children + // fast paths only. + patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag, + dynamicProps: vnode.dynamicProps, + dynamicChildren: vnode.dynamicChildren, + appContext: vnode.appContext, + dirs: vnode.dirs, + transition: vnode.transition, + // These should technically only be non-null on mounted VNodes. However, + // they *should* be copied for kept-alive vnodes. So we just always copy + // them since them being non-null during a mount doesn't affect the logic as + // they will simply be overwritten. + component: vnode.component, + suspense: vnode.suspense, + ssContent: vnode.ssContent && cloneVNode(vnode.ssContent), + ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback), + el: vnode.el, + anchor: vnode.anchor, + ctx: vnode.ctx, + ce: vnode.ce + }; + return cloned; } - /** - * Dev only, for HMR of hoisted vnodes reused in v-for - * https://github.com/vitejs/vite/issues/2022 - */ function deepCloneVNode(vnode) { - const cloned = cloneVNode(vnode); - if (isArray(vnode.children)) { - cloned.children = vnode.children.map(deepCloneVNode); - } - return cloned; + const cloned = cloneVNode(vnode); + if (isArray(vnode.children)) { + cloned.children = vnode.children.map(deepCloneVNode); + } + return cloned; } - /** - * @private - */ - function createTextVNode(text = ' ', flag = 0) { - return createVNode(Text, null, text, flag); + function createTextVNode(text = " ", flag = 0) { + return createVNode(Text, null, text, flag); } - /** - * @private - */ function createStaticVNode(content, numberOfNodes) { - // A static vnode can contain multiple stringified elements, and the number - // of elements is necessary for hydration. - const vnode = createVNode(Static, null, content); - vnode.staticCount = numberOfNodes; - return vnode; + const vnode = createVNode(Static, null, content); + vnode.staticCount = numberOfNodes; + return vnode; } - /** - * @private - */ - function createCommentVNode(text = '', - // when used as the v-else branch, the comment node must be created as a - // block to ensure correct updates. - asBlock = false) { - return asBlock - ? (openBlock(), createBlock(Comment, null, text)) - : createVNode(Comment, null, text); + function createCommentVNode(text = "", asBlock = false) { + return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text); } function normalizeVNode(child) { - if (child == null || typeof child === 'boolean') { - // empty placeholder - return createVNode(Comment); - } - else if (isArray(child)) { - // fragment - return createVNode(Fragment, null, - // #3666, avoid reference pollution when reusing vnode - child.slice()); - } - else if (typeof child === 'object') { - // already vnode, this should be the most common since compiled templates - // always produce all-vnode children arrays - return cloneIfMounted(child); - } - else { - // strings and numbers - return createVNode(Text, null, String(child)); - } + if (child == null || typeof child === "boolean") { + return createVNode(Comment); + } else if (isArray(child)) { + return createVNode( + Fragment, + null, + // #3666, avoid reference pollution when reusing vnode + child.slice() + ); + } else if (typeof child === "object") { + return cloneIfMounted(child); + } else { + return createVNode(Text, null, String(child)); + } } - // optimized normalization for template-compiled render fns function cloneIfMounted(child) { - return child.el === null || child.memo ? child : cloneVNode(child); + return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child); } function normalizeChildren(vnode, children) { - let type = 0; - const { shapeFlag } = vnode; - if (children == null) { - children = null; - } - else if (isArray(children)) { - type = 16 /* ARRAY_CHILDREN */; - } - else if (typeof children === 'object') { - if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) { - // Normalize slot to plain children for plain element and Teleport - const slot = children.default; - if (slot) { - // _c marker is added by withCtx() indicating this is a compiled slot - slot._c && (slot._d = false); - normalizeChildren(vnode, slot()); - slot._c && (slot._d = true); - } - return; - } - else { - type = 32 /* SLOTS_CHILDREN */; - const slotFlag = children._; - if (!slotFlag && !(InternalObjectKey in children)) { - children._ctx = currentRenderingInstance; - } - else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) { - // a child component receives forwarded slots from the parent. - // its slot type is determined by its parent's slot type. - if (currentRenderingInstance.slots._ === 1 /* STABLE */) { - children._ = 1 /* STABLE */; - } - else { - children._ = 2 /* DYNAMIC */; - vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */; - } - } + let type = 0; + const { shapeFlag } = vnode; + if (children == null) { + children = null; + } else if (isArray(children)) { + type = 16; + } else if (typeof children === "object") { + if (shapeFlag & (1 | 64)) { + const slot = children.default; + if (slot) { + slot._c && (slot._d = false); + normalizeChildren(vnode, slot()); + slot._c && (slot._d = true); + } + return; + } else { + type = 32; + const slotFlag = children._; + if (!slotFlag && !(InternalObjectKey in children)) { + children._ctx = currentRenderingInstance; + } else if (slotFlag === 3 && currentRenderingInstance) { + if (currentRenderingInstance.slots._ === 1) { + children._ = 1; + } else { + children._ = 2; + vnode.patchFlag |= 1024; } + } } - else if (isFunction(children)) { - children = { default: children, _ctx: currentRenderingInstance }; - type = 32 /* SLOTS_CHILDREN */; + } else if (isFunction(children)) { + children = { default: children, _ctx: currentRenderingInstance }; + type = 32; + } else { + children = String(children); + if (shapeFlag & 64) { + type = 16; + children = [createTextVNode(children)]; + } else { + type = 8; } - else { - children = String(children); - // force teleport children to array so it can be moved around - if (shapeFlag & 64 /* TELEPORT */) { - type = 16 /* ARRAY_CHILDREN */; - children = [createTextVNode(children)]; - } - else { - type = 8 /* TEXT_CHILDREN */; - } - } - vnode.children = children; - vnode.shapeFlag |= type; + } + vnode.children = children; + vnode.shapeFlag |= type; } function mergeProps(...args) { - const ret = {}; - for (let i = 0; i < args.length; i++) { - const toMerge = args[i]; - for (const key in toMerge) { - if (key === 'class') { - if (ret.class !== toMerge.class) { - ret.class = normalizeClass([ret.class, toMerge.class]); - } - } - else if (key === 'style') { - ret.style = normalizeStyle([ret.style, toMerge.style]); - } - else if (isOn(key)) { - const existing = ret[key]; - const incoming = toMerge[key]; - if (incoming && - existing !== incoming && - !(isArray(existing) && existing.includes(incoming))) { - ret[key] = existing - ? [].concat(existing, incoming) - : incoming; - } - } - else if (key !== '') { - ret[key] = toMerge[key]; - } + const ret = {}; + for (let i = 0; i < args.length; i++) { + const toMerge = args[i]; + for (const key in toMerge) { + if (key === "class") { + if (ret.class !== toMerge.class) { + ret.class = normalizeClass([ret.class, toMerge.class]); } + } else if (key === "style") { + ret.style = normalizeStyle([ret.style, toMerge.style]); + } else if (isOn(key)) { + const existing = ret[key]; + const incoming = toMerge[key]; + if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) { + ret[key] = existing ? [].concat(existing, incoming) : incoming; + } + } else if (key !== "") { + ret[key] = toMerge[key]; + } } - return ret; + } + return ret; } function invokeVNodeHook(hook, instance, vnode, prevVNode = null) { - callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [ - vnode, - prevVNode - ]); + callWithAsyncErrorHandling(hook, instance, 7, [ + vnode, + prevVNode + ]); } const emptyAppContext = createAppContext(); - let uid$1 = 0; + let uid = 0; function createComponentInstance(vnode, parent, suspense) { - const type = vnode.type; - // inherit parent app context - or - if root, adopt from root vnode - const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; - const instance = { - uid: uid$1++, - vnode, - type, - parent, - appContext, - root: null, - next: null, - subTree: null, - effect: null, - update: null, - scope: new EffectScope(true /* detached */), - render: null, - proxy: null, - exposed: null, - exposeProxy: null, - withProxy: null, - provides: parent ? parent.provides : Object.create(appContext.provides), - accessCache: null, - renderCache: [], - // local resolved assets - components: null, - directives: null, - // resolved props and emits options - propsOptions: normalizePropsOptions(type, appContext), - emitsOptions: normalizeEmitsOptions(type, appContext), - // emit - emit: null, - emitted: null, - // props default value - propsDefaults: EMPTY_OBJ, - // inheritAttrs - inheritAttrs: type.inheritAttrs, - // state - ctx: EMPTY_OBJ, - data: EMPTY_OBJ, - props: EMPTY_OBJ, - attrs: EMPTY_OBJ, - slots: EMPTY_OBJ, - refs: EMPTY_OBJ, - setupState: EMPTY_OBJ, - setupContext: null, - // suspense related - suspense, - suspenseId: suspense ? suspense.pendingId : 0, - asyncDep: null, - asyncResolved: false, - // lifecycle hooks - // not using enums here because it results in computed properties - isMounted: false, - isUnmounted: false, - isDeactivated: false, - bc: null, - c: null, - bm: null, - m: null, - bu: null, - u: null, - um: null, - bum: null, - da: null, - a: null, - rtg: null, - rtc: null, - ec: null, - sp: null - }; - { - instance.ctx = createDevRenderContext(instance); - } - instance.root = parent ? parent.root : instance; - instance.emit = emit$1.bind(null, instance); - // apply custom element special handling - if (vnode.ce) { - vnode.ce(instance); - } - return instance; + const type = vnode.type; + const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext; + const instance = { + uid: uid++, + vnode, + type, + parent, + appContext, + root: null, + // to be immediately set + next: null, + subTree: null, + // will be set synchronously right after creation + effect: null, + update: null, + // will be set synchronously right after creation + scope: new EffectScope( + true + /* detached */ + ), + render: null, + proxy: null, + exposed: null, + exposeProxy: null, + withProxy: null, + provides: parent ? parent.provides : Object.create(appContext.provides), + accessCache: null, + renderCache: [], + // local resolved assets + components: null, + directives: null, + // resolved props and emits options + propsOptions: normalizePropsOptions(type, appContext), + emitsOptions: normalizeEmitsOptions(type, appContext), + // emit + emit: null, + // to be set immediately + emitted: null, + // props default value + propsDefaults: EMPTY_OBJ, + // inheritAttrs + inheritAttrs: type.inheritAttrs, + // state + ctx: EMPTY_OBJ, + data: EMPTY_OBJ, + props: EMPTY_OBJ, + attrs: EMPTY_OBJ, + slots: EMPTY_OBJ, + refs: EMPTY_OBJ, + setupState: EMPTY_OBJ, + setupContext: null, + attrsProxy: null, + slotsProxy: null, + // suspense related + suspense, + suspenseId: suspense ? suspense.pendingId : 0, + asyncDep: null, + asyncResolved: false, + // lifecycle hooks + // not using enums here because it results in computed properties + isMounted: false, + isUnmounted: false, + isDeactivated: false, + bc: null, + c: null, + bm: null, + m: null, + bu: null, + u: null, + um: null, + bum: null, + da: null, + a: null, + rtg: null, + rtc: null, + ec: null, + sp: null + }; + { + instance.ctx = createDevRenderContext(instance); + } + instance.root = parent ? parent.root : instance; + instance.emit = emit.bind(null, instance); + if (vnode.ce) { + vnode.ce(instance); + } + return instance; } let currentInstance = null; const getCurrentInstance = () => currentInstance || currentRenderingInstance; + let internalSetCurrentInstance; + let setInSSRSetupState; + { + internalSetCurrentInstance = (i) => { + currentInstance = i; + }; + setInSSRSetupState = (v) => { + isInSSRComponentSetup = v; + }; + } const setCurrentInstance = (instance) => { - currentInstance = instance; - instance.scope.on(); + const prev = currentInstance; + internalSetCurrentInstance(instance); + instance.scope.on(); + return () => { + instance.scope.off(); + internalSetCurrentInstance(prev); + }; }; const unsetCurrentInstance = () => { - currentInstance && currentInstance.scope.off(); - currentInstance = null; + currentInstance && currentInstance.scope.off(); + internalSetCurrentInstance(null); }; - const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component'); + const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component"); function validateComponentName(name, config) { - const appIsNativeTag = config.isNativeTag || NO; - if (isBuiltInTag(name) || appIsNativeTag(name)) { - warn$1('Do not use built-in or reserved HTML elements as component id: ' + name); - } + const appIsNativeTag = config.isNativeTag || NO; + if (isBuiltInTag(name) || appIsNativeTag(name)) { + warn$1( + "Do not use built-in or reserved HTML elements as component id: " + name + ); + } } function isStatefulComponent(instance) { - return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */; + return instance.vnode.shapeFlag & 4; } let isInSSRComponentSetup = false; function setupComponent(instance, isSSR = false) { - isInSSRComponentSetup = isSSR; - const { props, children } = instance.vnode; - const isStateful = isStatefulComponent(instance); - initProps(instance, props, isStateful, isSSR); - initSlots(instance, children); - const setupResult = isStateful - ? setupStatefulComponent(instance, isSSR) - : undefined; - isInSSRComponentSetup = false; - return setupResult; + isSSR && setInSSRSetupState(isSSR); + const { props, children } = instance.vnode; + const isStateful = isStatefulComponent(instance); + initProps(instance, props, isStateful, isSSR); + initSlots(instance, children); + const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0; + isSSR && setInSSRSetupState(false); + return setupResult; } function setupStatefulComponent(instance, isSSR) { - var _a; - const Component = instance.type; - { - if (Component.name) { - validateComponentName(Component.name, instance.appContext.config); - } - if (Component.components) { - const names = Object.keys(Component.components); - for (let i = 0; i < names.length; i++) { - validateComponentName(names[i], instance.appContext.config); - } - } - if (Component.directives) { - const names = Object.keys(Component.directives); - for (let i = 0; i < names.length; i++) { - validateDirectiveName(names[i]); - } - } - if (Component.compilerOptions && isRuntimeOnly()) { - warn$1(`"compilerOptions" is only supported when using a build of Vue that ` + - `includes the runtime compiler. Since you are using a runtime-only ` + - `build, the options should be passed via your build tool config instead.`); - } + var _a; + const Component = instance.type; + { + if (Component.name) { + validateComponentName(Component.name, instance.appContext.config); } - // 0. create render proxy property access cache - instance.accessCache = Object.create(null); - // 1. create public instance / render proxy - // also mark it raw so it's never observed - instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); - { - exposePropsOnRenderContext(instance); + if (Component.components) { + const names = Object.keys(Component.components); + for (let i = 0; i < names.length; i++) { + validateComponentName(names[i], instance.appContext.config); + } } - // 2. call setup() - const { setup } = Component; - if (setup) { - const setupContext = (instance.setupContext = - setup.length > 1 ? createSetupContext(instance) : null); - setCurrentInstance(instance); - pauseTracking(); - const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]); - resetTracking(); - unsetCurrentInstance(); - if (isPromise(setupResult)) { - setupResult.then(unsetCurrentInstance, unsetCurrentInstance); - if (isSSR) { - // return the promise so server-renderer can wait on it - return setupResult - .then((resolvedResult) => { - handleSetupResult(instance, resolvedResult, isSSR); - }) - .catch(e => { - handleError(e, instance, 0 /* SETUP_FUNCTION */); - }); - } - else { - // async setup returned Promise. - // bail here and wait for re-entry. - instance.asyncDep = setupResult; - if (!instance.suspense) { - const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous'; - warn$1(`Component <${name}>: setup function returned a promise, but no ` + - `<Suspense> boundary was found in the parent component tree. ` + - `A component with async setup() must be nested in a <Suspense> ` + - `in order to be rendered.`); - } - } - } - else { - handleSetupResult(instance, setupResult, isSSR); + if (Component.directives) { + const names = Object.keys(Component.directives); + for (let i = 0; i < names.length; i++) { + validateDirectiveName(names[i]); + } + } + if (Component.compilerOptions && isRuntimeOnly()) { + warn$1( + `"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.` + ); + } + } + instance.accessCache = /* @__PURE__ */ Object.create(null); + instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers)); + { + exposePropsOnRenderContext(instance); + } + const { setup } = Component; + if (setup) { + const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null; + const reset = setCurrentInstance(instance); + pauseTracking(); + const setupResult = callWithErrorHandling( + setup, + instance, + 0, + [ + shallowReadonly(instance.props) , + setupContext + ] + ); + resetTracking(); + reset(); + if (isPromise(setupResult)) { + setupResult.then(unsetCurrentInstance, unsetCurrentInstance); + if (isSSR) { + return setupResult.then((resolvedResult) => { + handleSetupResult(instance, resolvedResult, isSSR); + }).catch((e) => { + handleError(e, instance, 0); + }); + } else { + instance.asyncDep = setupResult; + if (!instance.suspense) { + const name = (_a = Component.name) != null ? _a : "Anonymous"; + warn$1( + `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.` + ); } + } + } else { + handleSetupResult(instance, setupResult, isSSR); } - else { - finishComponentSetup(instance, isSSR); - } + } else { + finishComponentSetup(instance, isSSR); + } } function handleSetupResult(instance, setupResult, isSSR) { - if (isFunction(setupResult)) { - // setup returned an inline render function - { - instance.render = setupResult; - } - } - else if (isObject(setupResult)) { - if (isVNode(setupResult)) { - warn$1(`setup() should not return VNodes directly - ` + - `return a render function instead.`); - } - // setup returned bindings. - // assuming a render function compiled from template is present. - { - instance.devtoolsRawSetupState = setupResult; - } - instance.setupState = proxyRefs(setupResult); - { - exposeSetupStateOnRenderContext(instance); - } - } - else if (setupResult !== undefined) { - warn$1(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`); - } - finishComponentSetup(instance, isSSR); - } - let compile; - let installWithProxy; - /** - * For runtime-dom to register the compiler. - * Note the exported method uses any to avoid d.ts relying on the compiler types. - */ - function registerRuntimeCompiler(_compile) { - compile = _compile; - installWithProxy = i => { - if (i.render._rc) { - i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); - } - }; - } - // dev only - const isRuntimeOnly = () => !compile; - function finishComponentSetup(instance, isSSR, skipOptions) { - const Component = instance.type; - // template / render function normalization - // could be already set when returned from setup() - if (!instance.render) { - // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation - // is done by server-renderer - if (!isSSR && compile && !Component.render) { - const template = Component.template; - if (template) { - { - startMeasure(instance, `compile`); - } - const { isCustomElement, compilerOptions } = instance.appContext.config; - const { delimiters, compilerOptions: componentCompilerOptions } = Component; - const finalCompilerOptions = extend(extend({ - isCustomElement, - delimiters - }, compilerOptions), componentCompilerOptions); - Component.render = compile(template, finalCompilerOptions); - { - endMeasure(instance, `compile`); - } - } - } - instance.render = (Component.render || NOOP); - // for runtime-compiled render functions using `with` blocks, the render - // proxy used needs a different `has` handler which is more performant and - // also only allows a whitelist of globals to fallthrough. - if (installWithProxy) { - installWithProxy(instance); - } - } - // support for 2.x options + if (isFunction(setupResult)) { { - setCurrentInstance(instance); - pauseTracking(); - applyOptions(instance); - resetTracking(); - unsetCurrentInstance(); + instance.render = setupResult; } - // warn missing template/render - // the runtime compilation of template in SSR is done by server-render - if (!Component.render && instance.render === NOOP && !isSSR) { - /* istanbul ignore if */ - if (!compile && Component.template) { - warn$1(`Component provided template option but ` + - `runtime compilation is not supported in this build of Vue.` + - (` Use "vue.global.js" instead.` - ) /* should not happen */); - } - else { - warn$1(`Component is missing template or render function.`); - } + } else if (isObject(setupResult)) { + if (isVNode(setupResult)) { + warn$1( + `setup() should not return VNodes directly - return a render function instead.` + ); } + { + instance.devtoolsRawSetupState = setupResult; + } + instance.setupState = proxyRefs(setupResult); + { + exposeSetupStateOnRenderContext(instance); + } + } else if (setupResult !== void 0) { + warn$1( + `setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}` + ); + } + finishComponentSetup(instance, isSSR); } - function createAttrsProxy(instance) { - return new Proxy(instance.attrs, { - get(target, key) { - markAttrsAccessed(); - track(instance, "get" /* GET */, '$attrs'); - return target[key]; - }, - set() { - warn$1(`setupContext.attrs is readonly.`); - return false; - }, - deleteProperty() { - warn$1(`setupContext.attrs is readonly.`); - return false; - } + let compile$1; + let installWithProxy; + function registerRuntimeCompiler(_compile) { + compile$1 = _compile; + installWithProxy = (i) => { + if (i.render._rc) { + i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers); + } + }; + } + const isRuntimeOnly = () => !compile$1; + function finishComponentSetup(instance, isSSR, skipOptions) { + const Component = instance.type; + if (!instance.render) { + if (!isSSR && compile$1 && !Component.render) { + const template = Component.template || resolveMergedOptions(instance).template; + if (template) { + { + startMeasure(instance, `compile`); } + const { isCustomElement, compilerOptions } = instance.appContext.config; + const { delimiters, compilerOptions: componentCompilerOptions } = Component; + const finalCompilerOptions = extend( + extend( + { + isCustomElement, + delimiters + }, + compilerOptions + ), + componentCompilerOptions ); + Component.render = compile$1(template, finalCompilerOptions); + { + endMeasure(instance, `compile`); + } + } + } + instance.render = Component.render || NOOP; + if (installWithProxy) { + installWithProxy(instance); + } + } + { + const reset = setCurrentInstance(instance); + pauseTracking(); + try { + applyOptions(instance); + } finally { + resetTracking(); + reset(); + } + } + if (!Component.render && instance.render === NOOP && !isSSR) { + if (!compile$1 && Component.template) { + warn$1( + `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) + ); + } else { + warn$1(`Component is missing template or render function.`); + } + } + } + function getAttrsProxy(instance) { + return instance.attrsProxy || (instance.attrsProxy = new Proxy( + instance.attrs, + { + get(target, key) { + markAttrsAccessed(); + track(instance, "get", "$attrs"); + return target[key]; + }, + set() { + warn$1(`setupContext.attrs is readonly.`); + return false; + }, + deleteProperty() { + warn$1(`setupContext.attrs is readonly.`); + return false; + } + } + )); + } + function getSlotsProxy(instance) { + return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, { + get(target, key) { + track(instance, "get", "$slots"); + return target[key]; + } + })); } function createSetupContext(instance) { - const expose = exposed => { - if (instance.exposed) { - warn$1(`expose() should be called only once per setup().`); - } - instance.exposed = exposed || {}; - }; - let attrs; + const expose = (exposed) => { { - // We use getters in dev in case libs like test-utils overwrite instance - // properties (overwrites should not be done in prod) - return Object.freeze({ - get attrs() { - return attrs || (attrs = createAttrsProxy(instance)); - }, - get slots() { - return shallowReadonly(instance.slots); - }, - get emit() { - return (event, ...args) => instance.emit(event, ...args); - }, - expose - }); + if (instance.exposed) { + warn$1(`expose() should be called only once per setup().`); + } + if (exposed != null) { + let exposedType = typeof exposed; + if (exposedType === "object") { + if (isArray(exposed)) { + exposedType = "array"; + } else if (isRef(exposed)) { + exposedType = "ref"; + } + } + if (exposedType !== "object") { + warn$1( + `expose() should be passed a plain object, received ${exposedType}.` + ); + } + } } + instance.exposed = exposed || {}; + }; + { + return Object.freeze({ + get attrs() { + return getAttrsProxy(instance); + }, + get slots() { + return getSlotsProxy(instance); + }, + get emit() { + return (event, ...args) => instance.emit(event, ...args); + }, + expose + }); + } } function getExposeProxy(instance) { - if (instance.exposed) { - return (instance.exposeProxy || - (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { - get(target, key) { - if (key in target) { - return target[key]; - } - else if (key in publicPropertiesMap) { - return publicPropertiesMap[key](instance); - } - } - }))); - } + if (instance.exposed) { + return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), { + get(target, key) { + if (key in target) { + return target[key]; + } else if (key in publicPropertiesMap) { + return publicPropertiesMap[key](instance); + } + }, + has(target, key) { + return key in target || key in publicPropertiesMap; + } + })); + } } const classifyRE = /(?:^|[-_])(\w)/g; - const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, ''); - function getComponentName(Component) { - return isFunction(Component) - ? Component.displayName || Component.name - : Component.name; + const classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, ""); + function getComponentName(Component, includeInferred = true) { + return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name; } - /* istanbul ignore next */ function formatComponentName(instance, Component, isRoot = false) { - let name = getComponentName(Component); - if (!name && Component.__file) { - const match = Component.__file.match(/([^/\\]+)\.\w+$/); - if (match) { - name = match[1]; + let name = getComponentName(Component); + if (!name && Component.__file) { + const match = Component.__file.match(/([^/\\]+)\.\w+$/); + if (match) { + name = match[1]; + } + } + if (!name && instance && instance.parent) { + const inferFromRegistry = (registry) => { + for (const key in registry) { + if (registry[key] === Component) { + return key; } - } - if (!name && instance && instance.parent) { - // try to infer the name based on reverse resolution - const inferFromRegistry = (registry) => { - for (const key in registry) { - if (registry[key] === Component) { - return key; - } - } - }; - name = - inferFromRegistry(instance.components || - instance.parent.type.components) || inferFromRegistry(instance.appContext.components); - } - return name ? classify(name) : isRoot ? `App` : `Anonymous`; + } + }; + name = inferFromRegistry( + instance.components || instance.parent.type.components + ) || inferFromRegistry(instance.appContext.components); + } + return name ? classify(name) : isRoot ? `App` : `Anonymous`; } function isClassComponent(value) { - return isFunction(value) && '__vccOpts' in value; + return isFunction(value) && "__vccOpts" in value; } - const computed$1 = ((getterOrOptions, debugOptions) => { - // @ts-ignore - return computed(getterOrOptions, debugOptions, isInSSRComponentSetup); - }); - - // dev only - const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside ` + - `<script setup> of a single file component. Its arguments should be ` + - `compiled away and passing it at runtime has no effect.`); - // implementation - function defineProps() { - { - warnRuntimeUsage(`defineProps`); - } - return null; - } - // implementation - function defineEmits() { - { - warnRuntimeUsage(`defineEmits`); - } - return null; - } - /** - * Vue `<script setup>` compiler macro for declaring a component's exposed - * instance properties when it is accessed by a parent component via template - * refs. - * - * `<script setup>` components are closed by default - i.e. variables inside - * the `<script setup>` scope is not exposed to parent unless explicitly exposed - * via `defineExpose`. - * - * This is only usable inside `<script setup>`, is compiled away in the - * output and should **not** be actually called at runtime. - */ - function defineExpose(exposed) { - { - warnRuntimeUsage(`defineExpose`); - } - } - /** - * Vue `<script setup>` compiler macro for providing props default values when - * using type-based `defineProps` declaration. - * - * Example usage: - * ```ts - * withDefaults(defineProps<{ - * size?: number - * labels?: string[] - * }>(), { - * size: 3, - * labels: () => ['default label'] - * }) - * ``` - * - * This is only usable inside `<script setup>`, is compiled away in the output - * and should **not** be actually called at runtime. - */ - function withDefaults(props, defaults) { - { - warnRuntimeUsage(`withDefaults`); - } - return null; - } - function useSlots() { - return getContext().slots; - } - function useAttrs() { - return getContext().attrs; - } - function getContext() { - const i = getCurrentInstance(); - if (!i) { - warn$1(`useContext() called without active instance.`); - } - return i.setupContext || (i.setupContext = createSetupContext(i)); - } - /** - * Runtime helper for merging default declarations. Imported by compiled code - * only. - * @internal - */ - function mergeDefaults(raw, defaults) { - const props = isArray(raw) - ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {}) - : raw; - for (const key in defaults) { - const opt = props[key]; - if (opt) { - if (isArray(opt) || isFunction(opt)) { - props[key] = { type: opt, default: defaults[key] }; - } - else { - opt.default = defaults[key]; - } - } - else if (opt === null) { - props[key] = { default: defaults[key] }; - } - else { - warn$1(`props default key "${key}" has no corresponding declaration.`); - } - } - return props; - } - /** - * Used to create a proxy for the rest element when destructuring props with - * defineProps(). - * @internal - */ - function createPropsRestProxy(props, excludedKeys) { - const ret = {}; - for (const key in props) { - if (!excludedKeys.includes(key)) { - Object.defineProperty(ret, key, { - enumerable: true, - get: () => props[key] - }); - } - } - return ret; - } - /** - * `<script setup>` helper for persisting the current instance context over - * async/await flows. - * - * `@vue/compiler-sfc` converts the following: - * - * ```ts - * const x = await foo() - * ``` - * - * into: - * - * ```ts - * let __temp, __restore - * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp) - * ``` - * @internal - */ - function withAsyncContext(getAwaitable) { - const ctx = getCurrentInstance(); - if (!ctx) { - warn$1(`withAsyncContext called without active current instance. ` + - `This is likely a bug.`); - } - let awaitable = getAwaitable(); - unsetCurrentInstance(); - if (isPromise(awaitable)) { - awaitable = awaitable.catch(e => { - setCurrentInstance(ctx); - throw e; - }); - } - return [awaitable, () => setCurrentInstance(ctx)]; - } - - // Actual implementation - function h(type, propsOrChildren, children) { - const l = arguments.length; - if (l === 2) { - if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { - // single vnode without props - if (isVNode(propsOrChildren)) { - return createVNode(type, null, [propsOrChildren]); - } - // props without children - return createVNode(type, propsOrChildren); - } - else { - // omit props - return createVNode(type, null, propsOrChildren); - } - } - else { - if (l > 3) { - children = Array.prototype.slice.call(arguments, 2); - } - else if (l === 3 && isVNode(children)) { - children = [children]; - } - return createVNode(type, propsOrChildren, children); - } - } - - const ssrContextKey = Symbol(`ssrContext` ); - const useSSRContext = () => { - { - warn$1(`useSSRContext() is not supported in the global build.`); - } + const computed = (getterOrOptions, debugOptions) => { + return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup); }; - function initCustomFormatter() { - /* eslint-disable no-restricted-globals */ - if (typeof window === 'undefined') { - return; - } - const vueStyle = { style: 'color:#3ba776' }; - const numberStyle = { style: 'color:#0b1bc9' }; - const stringStyle = { style: 'color:#b62e24' }; - const keywordStyle = { style: 'color:#9d288c' }; - // custom formatter for Chrome - // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html - const formatter = { - header(obj) { - // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup - if (!isObject(obj)) { - return null; - } - if (obj.__isVue) { - return ['div', vueStyle, `VueInstance`]; - } - else if (isRef(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, genRefFlag(obj)], - '<', - formatValue(obj.value), - `>` - ]; - } - else if (isReactive(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'], - '<', - formatValue(obj), - `>${isReadonly(obj) ? ` (readonly)` : ``}` - ]; - } - else if (isReadonly(obj)) { - return [ - 'div', - {}, - ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'], - '<', - formatValue(obj), - '>' - ]; - } - return null; - }, - hasBody(obj) { - return obj && obj.__isVue; - }, - body(obj) { - if (obj && obj.__isVue) { - return [ - 'div', - {}, - ...formatInstance(obj.$) - ]; - } + function useModel(props, name, options = EMPTY_OBJ) { + const i = getCurrentInstance(); + if (!i) { + warn$1(`useModel() called without active instance.`); + return ref(); + } + if (!i.propsOptions[0][name]) { + warn$1(`useModel() called with prop "${name}" which is not declared.`); + return ref(); + } + const camelizedName = camelize(name); + const hyphenatedName = hyphenate(name); + const res = customRef((track, trigger) => { + let localValue; + watchSyncEffect(() => { + const propValue = props[name]; + if (hasChanged(localValue, propValue)) { + localValue = propValue; + trigger(); + } + }); + return { + get() { + track(); + return options.get ? options.get(localValue) : localValue; + }, + set(value) { + const rawProps = i.vnode.props; + if (!(rawProps && // check if parent has passed v-model + (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) { + localValue = value; + trigger(); } + i.emit(`update:${name}`, options.set ? options.set(value) : value); + } }; - function formatInstance(instance) { - const blocks = []; - if (instance.type.props && instance.props) { - blocks.push(createInstanceBlock('props', toRaw(instance.props))); + }); + const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`; + res[Symbol.iterator] = () => { + let i2 = 0; + return { + next() { + if (i2 < 2) { + return { value: i2++ ? props[modifierKey] || {} : res, done: false }; + } else { + return { done: true }; } - if (instance.setupState !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('setup', instance.setupState)); - } - if (instance.data !== EMPTY_OBJ) { - blocks.push(createInstanceBlock('data', toRaw(instance.data))); - } - const computed = extractKeys(instance, 'computed'); - if (computed) { - blocks.push(createInstanceBlock('computed', computed)); - } - const injected = extractKeys(instance, 'inject'); - if (injected) { - blocks.push(createInstanceBlock('injected', injected)); - } - blocks.push([ - 'div', - {}, - [ - 'span', - { - style: keywordStyle.style + ';opacity:0.66' - }, - '$ (internal): ' - ], - ['object', { object: instance }] - ]); - return blocks; + } + }; + }; + return res; + } + + function h(type, propsOrChildren, children) { + const l = arguments.length; + if (l === 2) { + if (isObject(propsOrChildren) && !isArray(propsOrChildren)) { + if (isVNode(propsOrChildren)) { + return createVNode(type, null, [propsOrChildren]); + } + return createVNode(type, propsOrChildren); + } else { + return createVNode(type, null, propsOrChildren); } - function createInstanceBlock(type, target) { - target = extend({}, target); - if (!Object.keys(target).length) { - return ['span', {}]; - } + } else { + if (l > 3) { + children = Array.prototype.slice.call(arguments, 2); + } else if (l === 3 && isVNode(children)) { + children = [children]; + } + return createVNode(type, propsOrChildren, children); + } + } + + function initCustomFormatter() { + if (typeof window === "undefined") { + return; + } + const vueStyle = { style: "color:#3ba776" }; + const numberStyle = { style: "color:#1677ff" }; + const stringStyle = { style: "color:#f5222d" }; + const keywordStyle = { style: "color:#eb2f96" }; + const formatter = { + header(obj) { + if (!isObject(obj)) { + return null; + } + if (obj.__isVue) { + return ["div", vueStyle, `VueInstance`]; + } else if (isRef(obj)) { return [ - 'div', - { style: 'line-height:1.25em;margin-bottom:0.6em' }, - [ - 'div', - { - style: 'color:#476582' - }, - type - ], - [ - 'div', - { - style: 'padding-left:1.25em' - }, - ...Object.keys(target).map(key => { - return [ - 'div', - {}, - ['span', keywordStyle, key + ': '], - formatValue(target[key], false) - ]; - }) - ] + "div", + {}, + ["span", vueStyle, genRefFlag(obj)], + "<", + formatValue(obj.value), + `>` ]; + } else if (isReactive(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"], + "<", + formatValue(obj), + `>${isReadonly(obj) ? ` (readonly)` : ``}` + ]; + } else if (isReadonly(obj)) { + return [ + "div", + {}, + ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"], + "<", + formatValue(obj), + ">" + ]; + } + return null; + }, + hasBody(obj) { + return obj && obj.__isVue; + }, + body(obj) { + if (obj && obj.__isVue) { + return [ + "div", + {}, + ...formatInstance(obj.$) + ]; + } } - function formatValue(v, asRaw = true) { - if (typeof v === 'number') { - return ['span', numberStyle, v]; - } - else if (typeof v === 'string') { - return ['span', stringStyle, JSON.stringify(v)]; - } - else if (typeof v === 'boolean') { - return ['span', keywordStyle, v]; - } - else if (isObject(v)) { - return ['object', { object: asRaw ? toRaw(v) : v }]; - } - else { - return ['span', stringStyle, String(v)]; - } + }; + function formatInstance(instance) { + const blocks = []; + if (instance.type.props && instance.props) { + blocks.push(createInstanceBlock("props", toRaw(instance.props))); } - function extractKeys(instance, type) { - const Comp = instance.type; - if (isFunction(Comp)) { - return; - } - const extracted = {}; - for (const key in instance.ctx) { - if (isKeyOfType(Comp, key, type)) { - extracted[key] = instance.ctx[key]; - } - } - return extracted; + if (instance.setupState !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("setup", instance.setupState)); } - function isKeyOfType(Comp, key, type) { - const opts = Comp[type]; - if ((isArray(opts) && opts.includes(key)) || - (isObject(opts) && key in opts)) { - return true; - } - if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { - return true; - } - if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) { - return true; - } + if (instance.data !== EMPTY_OBJ) { + blocks.push(createInstanceBlock("data", toRaw(instance.data))); } - function genRefFlag(v) { - if (isShallow(v)) { - return `ShallowRef`; - } - if (v.effect) { - return `ComputedRef`; - } - return `Ref`; + const computed = extractKeys(instance, "computed"); + if (computed) { + blocks.push(createInstanceBlock("computed", computed)); } - if (window.devtoolsFormatters) { - window.devtoolsFormatters.push(formatter); + const injected = extractKeys(instance, "inject"); + if (injected) { + blocks.push(createInstanceBlock("injected", injected)); } - else { - window.devtoolsFormatters = [formatter]; + blocks.push([ + "div", + {}, + [ + "span", + { + style: keywordStyle.style + ";opacity:0.66" + }, + "$ (internal): " + ], + ["object", { object: instance }] + ]); + return blocks; + } + function createInstanceBlock(type, target) { + target = extend({}, target); + if (!Object.keys(target).length) { + return ["span", {}]; } + return [ + "div", + { style: "line-height:1.25em;margin-bottom:0.6em" }, + [ + "div", + { + style: "color:#476582" + }, + type + ], + [ + "div", + { + style: "padding-left:1.25em" + }, + ...Object.keys(target).map((key) => { + return [ + "div", + {}, + ["span", keywordStyle, key + ": "], + formatValue(target[key], false) + ]; + }) + ] + ]; + } + function formatValue(v, asRaw = true) { + if (typeof v === "number") { + return ["span", numberStyle, v]; + } else if (typeof v === "string") { + return ["span", stringStyle, JSON.stringify(v)]; + } else if (typeof v === "boolean") { + return ["span", keywordStyle, v]; + } else if (isObject(v)) { + return ["object", { object: asRaw ? toRaw(v) : v }]; + } else { + return ["span", stringStyle, String(v)]; + } + } + function extractKeys(instance, type) { + const Comp = instance.type; + if (isFunction(Comp)) { + return; + } + const extracted = {}; + for (const key in instance.ctx) { + if (isKeyOfType(Comp, key, type)) { + extracted[key] = instance.ctx[key]; + } + } + return extracted; + } + function isKeyOfType(Comp, key, type) { + const opts = Comp[type]; + if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) { + return true; + } + if (Comp.extends && isKeyOfType(Comp.extends, key, type)) { + return true; + } + if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) { + return true; + } + } + function genRefFlag(v) { + if (isShallow(v)) { + return `ShallowRef`; + } + if (v.effect) { + return `ComputedRef`; + } + return `Ref`; + } + if (window.devtoolsFormatters) { + window.devtoolsFormatters.push(formatter); + } else { + window.devtoolsFormatters = [formatter]; + } } function withMemo(memo, render, cache, index) { - const cached = cache[index]; - if (cached && isMemoSame(cached, memo)) { - return cached; - } - const ret = render(); - // shallow clone - ret.memo = memo.slice(); - return (cache[index] = ret); + const cached = cache[index]; + if (cached && isMemoSame(cached, memo)) { + return cached; + } + const ret = render(); + ret.memo = memo.slice(); + return cache[index] = ret; } function isMemoSame(cached, memo) { - const prev = cached.memo; - if (prev.length != memo.length) { - return false; + const prev = cached.memo; + if (prev.length != memo.length) { + return false; + } + for (let i = 0; i < prev.length; i++) { + if (hasChanged(prev[i], memo[i])) { + return false; } - for (let i = 0; i < prev.length; i++) { - if (hasChanged(prev[i], memo[i])) { - return false; - } - } - // make sure to let parent block track it when returning cached - if (isBlockTreeEnabled > 0 && currentBlock) { - currentBlock.push(cached); - } - return true; + } + if (isBlockTreeEnabled > 0 && currentBlock) { + currentBlock.push(cached); + } + return true; } - // Core API ------------------------------------------------------------------ - const version = "3.2.36"; - /** - * SSR utils for \@vue/server-renderer. Only exposed in cjs builds. - * @internal - */ - const ssrUtils = (null); - /** - * @internal only exposed in compat builds - */ + const version = "3.4.15"; + const warn = warn$1 ; + const ErrorTypeStrings = ErrorTypeStrings$1 ; + const devtools = devtools$1 ; + const setDevtoolsHook = setDevtoolsHook$1 ; + const ssrUtils = null; const resolveFilter = null; - /** - * @internal only exposed in compat builds. - */ - const compatUtils = (null); + const compatUtils = null; + const DeprecationTypes = null; - const svgNS = 'http://www.w3.org/2000/svg'; - const doc = (typeof document !== 'undefined' ? document : null); - const templateContainer = doc && /*#__PURE__*/ doc.createElement('template'); + const svgNS = "http://www.w3.org/2000/svg"; + const mathmlNS = "http://www.w3.org/1998/Math/MathML"; + const doc = typeof document !== "undefined" ? document : null; + const templateContainer = doc && /* @__PURE__ */ doc.createElement("template"); const nodeOps = { - insert: (child, parent, anchor) => { - parent.insertBefore(child, anchor || null); - }, - remove: child => { - const parent = child.parentNode; - if (parent) { - parent.removeChild(child); - } - }, - createElement: (tag, isSVG, is, props) => { - const el = isSVG - ? doc.createElementNS(svgNS, tag) - : doc.createElement(tag, is ? { is } : undefined); - if (tag === 'select' && props && props.multiple != null) { - el.setAttribute('multiple', props.multiple); - } - return el; - }, - createText: text => doc.createTextNode(text), - createComment: text => doc.createComment(text), - setText: (node, text) => { - node.nodeValue = text; - }, - setElementText: (el, text) => { - el.textContent = text; - }, - parentNode: node => node.parentNode, - nextSibling: node => node.nextSibling, - querySelector: selector => doc.querySelector(selector), - setScopeId(el, id) { - el.setAttribute(id, ''); - }, - cloneNode(el) { - const cloned = el.cloneNode(true); - // #3072 - // - in `patchDOMProp`, we store the actual value in the `el._value` property. - // - normally, elements using `:value` bindings will not be hoisted, but if - // the bound value is a constant, e.g. `:value="true"` - they do get - // hoisted. - // - in production, hoisted nodes are cloned when subsequent inserts, but - // cloneNode() does not copy the custom property we attached. - // - This may need to account for other custom DOM properties we attach to - // elements in addition to `_value` in the future. - if (`_value` in el) { - cloned._value = el._value; - } - return cloned; - }, - // __UNSAFE__ - // Reason: innerHTML. - // Static content here can only come from compiled templates. - // As long as the user only uses trusted templates, this is safe. - insertStaticContent(content, parent, anchor, isSVG, start, end) { - // <parent> before | first ... last | anchor </parent> - const before = anchor ? anchor.previousSibling : parent.lastChild; - // #5308 can only take cached path if: - // - has a single root node - // - nextSibling info is still available - if (start && (start === end || start.nextSibling)) { - // cached - while (true) { - parent.insertBefore(start.cloneNode(true), anchor); - if (start === end || !(start = start.nextSibling)) - break; - } - } - else { - // fresh insert - templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content; - const template = templateContainer.content; - if (isSVG) { - // remove outer svg wrapper - const wrapper = template.firstChild; - while (wrapper.firstChild) { - template.appendChild(wrapper.firstChild); - } - template.removeChild(wrapper); - } - parent.insertBefore(template, anchor); - } - return [ - // first - before ? before.nextSibling : parent.firstChild, - // last - anchor ? anchor.previousSibling : parent.lastChild - ]; + insert: (child, parent, anchor) => { + parent.insertBefore(child, anchor || null); + }, + remove: (child) => { + const parent = child.parentNode; + if (parent) { + parent.removeChild(child); } + }, + createElement: (tag, namespace, is, props) => { + const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0); + if (tag === "select" && props && props.multiple != null) { + el.setAttribute("multiple", props.multiple); + } + return el; + }, + createText: (text) => doc.createTextNode(text), + createComment: (text) => doc.createComment(text), + setText: (node, text) => { + node.nodeValue = text; + }, + setElementText: (el, text) => { + el.textContent = text; + }, + parentNode: (node) => node.parentNode, + nextSibling: (node) => node.nextSibling, + querySelector: (selector) => doc.querySelector(selector), + setScopeId(el, id) { + el.setAttribute(id, ""); + }, + // __UNSAFE__ + // Reason: innerHTML. + // Static content here can only come from compiled templates. + // As long as the user only uses trusted templates, this is safe. + insertStaticContent(content, parent, anchor, namespace, start, end) { + const before = anchor ? anchor.previousSibling : parent.lastChild; + if (start && (start === end || start.nextSibling)) { + while (true) { + parent.insertBefore(start.cloneNode(true), anchor); + if (start === end || !(start = start.nextSibling)) + break; + } + } else { + templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content; + const template = templateContainer.content; + if (namespace === "svg" || namespace === "mathml") { + const wrapper = template.firstChild; + while (wrapper.firstChild) { + template.appendChild(wrapper.firstChild); + } + template.removeChild(wrapper); + } + parent.insertBefore(template, anchor); + } + return [ + // first + before ? before.nextSibling : parent.firstChild, + // last + anchor ? anchor.previousSibling : parent.lastChild + ]; + } }; - // compiler should normalize class + :class bindings on the same element - // into a single binding ['staticClass', dynamic] - function patchClass(el, value, isSVG) { - // directly setting className should be faster than setAttribute in theory - // if this is an element during a transition, take the temporary transition - // classes into account. - const transitionClasses = el._vtc; - if (transitionClasses) { - value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' '); - } - if (value == null) { - el.removeAttribute('class'); - } - else if (isSVG) { - el.setAttribute('class', value); - } - else { - el.className = value; - } - } - - function patchStyle(el, prev, next) { - const style = el.style; - const isCssString = isString(next); - if (next && !isCssString) { - for (const key in next) { - setStyle(style, key, next[key]); - } - if (prev && !isString(prev)) { - for (const key in prev) { - if (next[key] == null) { - setStyle(style, key, ''); - } - } - } - } - else { - const currentDisplay = style.display; - if (isCssString) { - if (prev !== next) { - style.cssText = next; - } - } - else if (prev) { - el.removeAttribute('style'); - } - // indicates that the `display` of the element is controlled by `v-show`, - // so we always keep the current `display` value regardless of the `style` - // value, thus handing over control to `v-show`. - if ('_vod' in el) { - style.display = currentDisplay; - } - } - } - const importantRE = /\s*!important$/; - function setStyle(style, name, val) { - if (isArray(val)) { - val.forEach(v => setStyle(style, name, v)); - } - else { - if (val == null) - val = ''; - if (name.startsWith('--')) { - // custom property definition - style.setProperty(name, val); - } - else { - const prefixed = autoPrefix(style, name); - if (importantRE.test(val)) { - // !important - style.setProperty(hyphenate(prefixed), val.replace(importantRE, ''), 'important'); - } - else { - style[prefixed] = val; - } - } - } - } - const prefixes = ['Webkit', 'Moz', 'ms']; - const prefixCache = {}; - function autoPrefix(style, rawName) { - const cached = prefixCache[rawName]; - if (cached) { - return cached; - } - let name = camelize(rawName); - if (name !== 'filter' && name in style) { - return (prefixCache[rawName] = name); - } - name = capitalize(name); - for (let i = 0; i < prefixes.length; i++) { - const prefixed = prefixes[i] + name; - if (prefixed in style) { - return (prefixCache[rawName] = prefixed); - } - } - return rawName; - } - - const xlinkNS = 'http://www.w3.org/1999/xlink'; - function patchAttr(el, key, value, isSVG, instance) { - if (isSVG && key.startsWith('xlink:')) { - if (value == null) { - el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); - } - else { - el.setAttributeNS(xlinkNS, key, value); - } - } - else { - // note we are only checking boolean attributes that don't have a - // corresponding dom prop of the same name here. - const isBoolean = isSpecialBooleanAttr(key); - if (value == null || (isBoolean && !includeBooleanAttr(value))) { - el.removeAttribute(key); - } - else { - el.setAttribute(key, isBoolean ? '' : value); - } - } - } - - // __UNSAFE__ - // functions. The user is responsible for using them with only trusted content. - function patchDOMProp(el, key, value, - // the following args are passed only due to potential innerHTML/textContent - // overriding existing VNodes, in which case the old tree must be properly - // unmounted. - prevChildren, parentComponent, parentSuspense, unmountChildren) { - if (key === 'innerHTML' || key === 'textContent') { - if (prevChildren) { - unmountChildren(prevChildren, parentComponent, parentSuspense); - } - el[key] = value == null ? '' : value; - return; - } - if (key === 'value' && - el.tagName !== 'PROGRESS' && - // custom elements may use _value internally - !el.tagName.includes('-')) { - // store value as _value as well since - // non-string values will be stringified. - el._value = value; - const newValue = value == null ? '' : value; - if (el.value !== newValue || - // #4956: always set for OPTION elements because its value falls back to - // textContent if no value attribute is present. And setting .value for - // OPTION has no side effect - el.tagName === 'OPTION') { - el.value = newValue; - } - if (value == null) { - el.removeAttribute(key); - } - return; - } - let needRemove = false; - if (value === '' || value == null) { - const type = typeof el[key]; - if (type === 'boolean') { - // e.g. <select multiple> compiles to { multiple: '' } - value = includeBooleanAttr(value); - } - else if (value == null && type === 'string') { - // e.g. <div :id="null"> - value = ''; - needRemove = true; - } - else if (type === 'number') { - // e.g. <img :width="null"> - // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error - value = 0; - needRemove = true; - } - } - // some properties perform value validation and throw, - // some properties has getter, no setter, will error in 'use strict' - // eg. <select :type="null"></select> <select :willValidate="null"></select> - try { - el[key] = value; - } - catch (e) { - { - warn$1(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` + - `value ${value} is invalid.`, e); - } - } - needRemove && el.removeAttribute(key); - } - - // Async edge case fix requires storing an event listener's attach timestamp. - const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => { - let _getNow = Date.now; - let skipTimestampCheck = false; - if (typeof window !== 'undefined') { - // Determine what event timestamp the browser is using. Annoyingly, the - // timestamp can either be hi-res (relative to page load) or low-res - // (relative to UNIX epoch), so in order to compare time we have to use the - // same timestamp type when saving the flush timestamp. - if (Date.now() > document.createEvent('Event').timeStamp) { - // if the low-res timestamp which is bigger than the event timestamp - // (which is evaluated AFTER) it means the event is using a hi-res timestamp, - // and we need to use the hi-res version for event listeners as well. - _getNow = performance.now.bind(performance); - } - // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation - // and does not fire microtasks in between event propagation, so safe to exclude. - const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i); - skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53); - } - return [_getNow, skipTimestampCheck]; - })(); - // To avoid the overhead of repeatedly calling performance.now(), we cache - // and use the same timestamp for all event listeners attached in the same tick. - let cachedNow = 0; - const p = /*#__PURE__*/ Promise.resolve(); - const reset = () => { - cachedNow = 0; - }; - const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow())); - function addEventListener(el, event, handler, options) { - el.addEventListener(event, handler, options); - } - function removeEventListener(el, event, handler, options) { - el.removeEventListener(event, handler, options); - } - function patchEvent(el, rawName, prevValue, nextValue, instance = null) { - // vei = vue event invokers - const invokers = el._vei || (el._vei = {}); - const existingInvoker = invokers[rawName]; - if (nextValue && existingInvoker) { - // patch - existingInvoker.value = nextValue; - } - else { - const [name, options] = parseName(rawName); - if (nextValue) { - // add - const invoker = (invokers[rawName] = createInvoker(nextValue, instance)); - addEventListener(el, name, invoker, options); - } - else if (existingInvoker) { - // remove - removeEventListener(el, name, existingInvoker, options); - invokers[rawName] = undefined; - } - } - } - const optionsModifierRE = /(?:Once|Passive|Capture)$/; - function parseName(name) { - let options; - if (optionsModifierRE.test(name)) { - options = {}; - let m; - while ((m = name.match(optionsModifierRE))) { - name = name.slice(0, name.length - m[0].length); - options[m[0].toLowerCase()] = true; - } - } - return [hyphenate(name.slice(2)), options]; - } - function createInvoker(initialValue, instance) { - const invoker = (e) => { - // async edge case #6566: inner click event triggers patch, event handler - // attached to outer element during patch, and triggered again. This - // happens because browsers fire microtask ticks between event propagation. - // the solution is simple: we save the timestamp when a handler is attached, - // and the handler would only fire if the event passed to it was fired - // AFTER it was attached. - const timeStamp = e.timeStamp || _getNow(); - if (skipTimestampCheck || timeStamp >= invoker.attached - 1) { - callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]); - } - }; - invoker.value = initialValue; - invoker.attached = getNow(); - return invoker; - } - function patchStopImmediatePropagation(e, value) { - if (isArray(value)) { - const originalStop = e.stopImmediatePropagation; - e.stopImmediatePropagation = () => { - originalStop.call(e); - e._stopped = true; - }; - return value.map(fn => (e) => !e._stopped && fn && fn(e)); - } - else { - return value; - } - } - - const nativeOnRE = /^on[a-z]/; - const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => { - if (key === 'class') { - patchClass(el, nextValue, isSVG); - } - else if (key === 'style') { - patchStyle(el, prevValue, nextValue); - } - else if (isOn(key)) { - // ignore v-model listeners - if (!isModelListener(key)) { - patchEvent(el, key, prevValue, nextValue, parentComponent); - } - } - else if (key[0] === '.' - ? ((key = key.slice(1)), true) - : key[0] === '^' - ? ((key = key.slice(1)), false) - : shouldSetAsProp(el, key, nextValue, isSVG)) { - patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren); - } - else { - // special case for <input v-model type="checkbox"> with - // :true-value & :false-value - // store value as dom properties since non-string values will be - // stringified. - if (key === 'true-value') { - el._trueValue = nextValue; - } - else if (key === 'false-value') { - el._falseValue = nextValue; - } - patchAttr(el, key, nextValue, isSVG); - } - }; - function shouldSetAsProp(el, key, value, isSVG) { - if (isSVG) { - // most keys must be set as attribute on svg elements to work - // ...except innerHTML & textContent - if (key === 'innerHTML' || key === 'textContent') { - return true; - } - // or native onclick with function values - if (key in el && nativeOnRE.test(key) && isFunction(value)) { - return true; - } - return false; - } - // these are enumerated attrs, however their corresponding DOM properties - // are actually booleans - this leads to setting it with a string "false" - // value leading it to be coerced to `true`, so we need to always treat - // them as attributes. - // Note that `contentEditable` doesn't have this problem: its DOM - // property is also enumerated string values. - if (key === 'spellcheck' || key === 'draggable' || key === 'translate') { - return false; - } - // #1787, #2840 form property on form elements is readonly and must be set as - // attribute. - if (key === 'form') { - return false; - } - // #1526 <input list> must be set as attribute - if (key === 'list' && el.tagName === 'INPUT') { - return false; - } - // #2766 <textarea type> must be set as attribute - if (key === 'type' && el.tagName === 'TEXTAREA') { - return false; - } - // native onclick with string value, must be set as attribute - if (nativeOnRE.test(key) && isString(value)) { - return false; - } - return key in el; - } - - function defineCustomElement(options, hydrate) { - const Comp = defineComponent(options); - class VueCustomElement extends VueElement { - constructor(initialProps) { - super(Comp, initialProps, hydrate); - } - } - VueCustomElement.def = Comp; - return VueCustomElement; - } - const defineSSRCustomElement = ((options) => { - // @ts-ignore - return defineCustomElement(options, hydrate); - }); - const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class { - }); - class VueElement extends BaseClass { - constructor(_def, _props = {}, hydrate) { - super(); - this._def = _def; - this._props = _props; - /** - * @internal - */ - this._instance = null; - this._connected = false; - this._resolved = false; - this._numberProps = null; - if (this.shadowRoot && hydrate) { - hydrate(this._createVNode(), this.shadowRoot); - } - else { - if (this.shadowRoot) { - warn$1(`Custom element has pre-rendered declarative shadow root but is not ` + - `defined as hydratable. Use \`defineSSRCustomElement\`.`); - } - this.attachShadow({ mode: 'open' }); - } - } - connectedCallback() { - this._connected = true; - if (!this._instance) { - this._resolveDef(); - } - } - disconnectedCallback() { - this._connected = false; - nextTick(() => { - if (!this._connected) { - render(null, this.shadowRoot); - this._instance = null; - } - }); - } - /** - * resolve inner component definition (handle possible async component) - */ - _resolveDef() { - if (this._resolved) { - return; - } - this._resolved = true; - // set initial attrs - for (let i = 0; i < this.attributes.length; i++) { - this._setAttr(this.attributes[i].name); - } - // watch future attr changes - new MutationObserver(mutations => { - for (const m of mutations) { - this._setAttr(m.attributeName); - } - }).observe(this, { attributes: true }); - const resolve = (def) => { - const { props, styles } = def; - const hasOptions = !isArray(props); - const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : []; - // cast Number-type props set before resolve - let numberProps; - if (hasOptions) { - for (const key in this._props) { - const opt = props[key]; - if (opt === Number || (opt && opt.type === Number)) { - this._props[key] = toNumber(this._props[key]); - (numberProps || (numberProps = Object.create(null)))[key] = true; - } - } - } - this._numberProps = numberProps; - // check if there are props set pre-upgrade or connect - for (const key of Object.keys(this)) { - if (key[0] !== '_') { - this._setProp(key, this[key], true, false); - } - } - // defining getter/setters on prototype - for (const key of rawKeys.map(camelize)) { - Object.defineProperty(this, key, { - get() { - return this._getProp(key); - }, - set(val) { - this._setProp(key, val); - } - }); - } - // apply CSS - this._applyStyles(styles); - // initial render - this._update(); - }; - const asyncDef = this._def.__asyncLoader; - if (asyncDef) { - asyncDef().then(resolve); - } - else { - resolve(this._def); - } - } - _setAttr(key) { - let value = this.getAttribute(key); - if (this._numberProps && this._numberProps[key]) { - value = toNumber(value); - } - this._setProp(camelize(key), value, false); - } - /** - * @internal - */ - _getProp(key) { - return this._props[key]; - } - /** - * @internal - */ - _setProp(key, val, shouldReflect = true, shouldUpdate = true) { - if (val !== this._props[key]) { - this._props[key] = val; - if (shouldUpdate && this._instance) { - this._update(); - } - // reflect - if (shouldReflect) { - if (val === true) { - this.setAttribute(hyphenate(key), ''); - } - else if (typeof val === 'string' || typeof val === 'number') { - this.setAttribute(hyphenate(key), val + ''); - } - else if (!val) { - this.removeAttribute(hyphenate(key)); - } - } - } - } - _update() { - render(this._createVNode(), this.shadowRoot); - } - _createVNode() { - const vnode = createVNode(this._def, extend({}, this._props)); - if (!this._instance) { - vnode.ce = instance => { - this._instance = instance; - instance.isCE = true; - // HMR - { - instance.ceReload = newStyles => { - // always reset styles - if (this._styles) { - this._styles.forEach(s => this.shadowRoot.removeChild(s)); - this._styles.length = 0; - } - this._applyStyles(newStyles); - // if this is an async component, ceReload is called from the inner - // component so no need to reload the async wrapper - if (!this._def.__asyncLoader) { - // reload - this._instance = null; - this._update(); - } - }; - } - // intercept emit - instance.emit = (event, ...args) => { - this.dispatchEvent(new CustomEvent(event, { - detail: args - })); - }; - // locate nearest Vue custom element parent for provide/inject - let parent = this; - while ((parent = - parent && (parent.parentNode || parent.host))) { - if (parent instanceof VueElement) { - instance.parent = parent._instance; - break; - } - } - }; - } - return vnode; - } - _applyStyles(styles) { - if (styles) { - styles.forEach(css => { - const s = document.createElement('style'); - s.textContent = css; - this.shadowRoot.appendChild(s); - // record for HMR - { - (this._styles || (this._styles = [])).push(s); - } - }); - } - } - } - - function useCssModule(name = '$style') { - /* istanbul ignore else */ - { - { - warn$1(`useCssModule() is not supported in the global build.`); - } - return EMPTY_OBJ; - } - } - - /** - * Runtime helper for SFC's CSS variable injection feature. - * @private - */ - function useCssVars(getter) { - const instance = getCurrentInstance(); - /* istanbul ignore next */ - if (!instance) { - warn$1(`useCssVars is called without current active component instance.`); - return; - } - const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy)); - watchPostEffect(setVars); - onMounted(() => { - const ob = new MutationObserver(setVars); - ob.observe(instance.subTree.el.parentNode, { childList: true }); - onUnmounted(() => ob.disconnect()); - }); - } - function setVarsOnVNode(vnode, vars) { - if (vnode.shapeFlag & 128 /* SUSPENSE */) { - const suspense = vnode.suspense; - vnode = suspense.activeBranch; - if (suspense.pendingBranch && !suspense.isHydrating) { - suspense.effects.push(() => { - setVarsOnVNode(suspense.activeBranch, vars); - }); - } - } - // drill down HOCs until it's a non-component vnode - while (vnode.component) { - vnode = vnode.component.subTree; - } - if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) { - setVarsOnNode(vnode.el, vars); - } - else if (vnode.type === Fragment) { - vnode.children.forEach(c => setVarsOnVNode(c, vars)); - } - else if (vnode.type === Static) { - let { el, anchor } = vnode; - while (el) { - setVarsOnNode(el, vars); - if (el === anchor) - break; - el = el.nextSibling; - } - } - } - function setVarsOnNode(el, vars) { - if (el.nodeType === 1) { - const style = el.style; - for (const key in vars) { - style.setProperty(`--${key}`, vars[key]); - } - } - } - - const TRANSITION = 'transition'; - const ANIMATION = 'animation'; - // DOM Transition is a higher-order-component based on the platform-agnostic - // base Transition component, with DOM-specific logic. + const TRANSITION = "transition"; + const ANIMATION = "animation"; + const vtcKey = Symbol("_vtc"); const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots); - Transition.displayName = 'Transition'; + Transition.displayName = "Transition"; const DOMTransitionPropsValidators = { - name: String, - type: String, - css: { - type: Boolean, - default: true - }, - duration: [String, Number, Object], - enterFromClass: String, - enterActiveClass: String, - enterToClass: String, - appearFromClass: String, - appearActiveClass: String, - appearToClass: String, - leaveFromClass: String, - leaveActiveClass: String, - leaveToClass: String + name: String, + type: String, + css: { + type: Boolean, + default: true + }, + duration: [String, Number, Object], + enterFromClass: String, + enterActiveClass: String, + enterToClass: String, + appearFromClass: String, + appearActiveClass: String, + appearToClass: String, + leaveFromClass: String, + leaveActiveClass: String, + leaveToClass: String }; - const TransitionPropsValidators = (Transition.props = - /*#__PURE__*/ extend({}, BaseTransition.props, DOMTransitionPropsValidators)); - /** - * #3227 Incoming hooks may be merged into arrays when wrapping Transition - * with custom HOCs. - */ - const callHook$1 = (hook, args = []) => { - if (isArray(hook)) { - hook.forEach(h => h(...args)); - } - else if (hook) { - hook(...args); - } + const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend( + {}, + BaseTransitionPropsValidators, + DOMTransitionPropsValidators + ); + const callHook = (hook, args = []) => { + if (isArray(hook)) { + hook.forEach((h2) => h2(...args)); + } else if (hook) { + hook(...args); + } }; - /** - * Check if a hook expects a callback (2nd arg), which means the user - * intends to explicitly control the end of the transition. - */ const hasExplicitCallback = (hook) => { - return hook - ? isArray(hook) - ? hook.some(h => h.length > 1) - : hook.length > 1 - : false; + return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false; }; function resolveTransitionProps(rawProps) { - const baseProps = {}; - for (const key in rawProps) { - if (!(key in DOMTransitionPropsValidators)) { - baseProps[key] = rawProps[key]; + const baseProps = {}; + for (const key in rawProps) { + if (!(key in DOMTransitionPropsValidators)) { + baseProps[key] = rawProps[key]; + } + } + if (rawProps.css === false) { + return baseProps; + } + const { + name = "v", + type, + duration, + enterFromClass = `${name}-enter-from`, + enterActiveClass = `${name}-enter-active`, + enterToClass = `${name}-enter-to`, + appearFromClass = enterFromClass, + appearActiveClass = enterActiveClass, + appearToClass = enterToClass, + leaveFromClass = `${name}-leave-from`, + leaveActiveClass = `${name}-leave-active`, + leaveToClass = `${name}-leave-to` + } = rawProps; + const durations = normalizeDuration(duration); + const enterDuration = durations && durations[0]; + const leaveDuration = durations && durations[1]; + const { + onBeforeEnter, + onEnter, + onEnterCancelled, + onLeave, + onLeaveCancelled, + onBeforeAppear = onBeforeEnter, + onAppear = onEnter, + onAppearCancelled = onEnterCancelled + } = baseProps; + const finishEnter = (el, isAppear, done) => { + removeTransitionClass(el, isAppear ? appearToClass : enterToClass); + removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); + done && done(); + }; + const finishLeave = (el, done) => { + el._isLeaving = false; + removeTransitionClass(el, leaveFromClass); + removeTransitionClass(el, leaveToClass); + removeTransitionClass(el, leaveActiveClass); + done && done(); + }; + const makeEnterHook = (isAppear) => { + return (el, done) => { + const hook = isAppear ? onAppear : onEnter; + const resolve = () => finishEnter(el, isAppear, done); + callHook(hook, [el, resolve]); + nextFrame(() => { + removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); + addTransitionClass(el, isAppear ? appearToClass : enterToClass); + if (!hasExplicitCallback(hook)) { + whenTransitionEnds(el, type, enterDuration, resolve); } - } - if (rawProps.css === false) { - return baseProps; - } - const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps; - const durations = normalizeDuration(duration); - const enterDuration = durations && durations[0]; - const leaveDuration = durations && durations[1]; - const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps; - const finishEnter = (el, isAppear, done) => { - removeTransitionClass(el, isAppear ? appearToClass : enterToClass); - removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass); - done && done(); + }); }; - const finishLeave = (el, done) => { - el._isLeaving = false; + }; + return extend(baseProps, { + onBeforeEnter(el) { + callHook(onBeforeEnter, [el]); + addTransitionClass(el, enterFromClass); + addTransitionClass(el, enterActiveClass); + }, + onBeforeAppear(el) { + callHook(onBeforeAppear, [el]); + addTransitionClass(el, appearFromClass); + addTransitionClass(el, appearActiveClass); + }, + onEnter: makeEnterHook(false), + onAppear: makeEnterHook(true), + onLeave(el, done) { + el._isLeaving = true; + const resolve = () => finishLeave(el, done); + addTransitionClass(el, leaveFromClass); + forceReflow(); + addTransitionClass(el, leaveActiveClass); + nextFrame(() => { + if (!el._isLeaving) { + return; + } removeTransitionClass(el, leaveFromClass); - removeTransitionClass(el, leaveToClass); - removeTransitionClass(el, leaveActiveClass); - done && done(); - }; - const makeEnterHook = (isAppear) => { - return (el, done) => { - const hook = isAppear ? onAppear : onEnter; - const resolve = () => finishEnter(el, isAppear, done); - callHook$1(hook, [el, resolve]); - nextFrame(() => { - removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass); - addTransitionClass(el, isAppear ? appearToClass : enterToClass); - if (!hasExplicitCallback(hook)) { - whenTransitionEnds(el, type, enterDuration, resolve); - } - }); - }; - }; - return extend(baseProps, { - onBeforeEnter(el) { - callHook$1(onBeforeEnter, [el]); - addTransitionClass(el, enterFromClass); - addTransitionClass(el, enterActiveClass); - }, - onBeforeAppear(el) { - callHook$1(onBeforeAppear, [el]); - addTransitionClass(el, appearFromClass); - addTransitionClass(el, appearActiveClass); - }, - onEnter: makeEnterHook(false), - onAppear: makeEnterHook(true), - onLeave(el, done) { - el._isLeaving = true; - const resolve = () => finishLeave(el, done); - addTransitionClass(el, leaveFromClass); - // force reflow so *-leave-from classes immediately take effect (#2593) - forceReflow(); - addTransitionClass(el, leaveActiveClass); - nextFrame(() => { - if (!el._isLeaving) { - // cancelled - return; - } - removeTransitionClass(el, leaveFromClass); - addTransitionClass(el, leaveToClass); - if (!hasExplicitCallback(onLeave)) { - whenTransitionEnds(el, type, leaveDuration, resolve); - } - }); - callHook$1(onLeave, [el, resolve]); - }, - onEnterCancelled(el) { - finishEnter(el, false); - callHook$1(onEnterCancelled, [el]); - }, - onAppearCancelled(el) { - finishEnter(el, true); - callHook$1(onAppearCancelled, [el]); - }, - onLeaveCancelled(el) { - finishLeave(el); - callHook$1(onLeaveCancelled, [el]); + addTransitionClass(el, leaveToClass); + if (!hasExplicitCallback(onLeave)) { + whenTransitionEnds(el, type, leaveDuration, resolve); } - }); + }); + callHook(onLeave, [el, resolve]); + }, + onEnterCancelled(el) { + finishEnter(el, false); + callHook(onEnterCancelled, [el]); + }, + onAppearCancelled(el) { + finishEnter(el, true); + callHook(onAppearCancelled, [el]); + }, + onLeaveCancelled(el) { + finishLeave(el); + callHook(onLeaveCancelled, [el]); + } + }); } function normalizeDuration(duration) { - if (duration == null) { - return null; - } - else if (isObject(duration)) { - return [NumberOf(duration.enter), NumberOf(duration.leave)]; - } - else { - const n = NumberOf(duration); - return [n, n]; - } + if (duration == null) { + return null; + } else if (isObject(duration)) { + return [NumberOf(duration.enter), NumberOf(duration.leave)]; + } else { + const n = NumberOf(duration); + return [n, n]; + } } function NumberOf(val) { - const res = toNumber(val); - validateDuration(res); - return res; - } - function validateDuration(val) { - if (typeof val !== 'number') { - warn$1(`<transition> explicit duration is not a valid number - ` + - `got ${JSON.stringify(val)}.`); - } - else if (isNaN(val)) { - warn$1(`<transition> explicit duration is NaN - ` + - 'the duration expression might be incorrect.'); - } + const res = toNumber(val); + { + assertNumber(res, "<transition> explicit duration"); + } + return res; } function addTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.add(c)); - (el._vtc || - (el._vtc = new Set())).add(cls); + cls.split(/\s+/).forEach((c) => c && el.classList.add(c)); + (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls); } function removeTransitionClass(el, cls) { - cls.split(/\s+/).forEach(c => c && el.classList.remove(c)); - const { _vtc } = el; - if (_vtc) { - _vtc.delete(cls); - if (!_vtc.size) { - el._vtc = undefined; - } + cls.split(/\s+/).forEach((c) => c && el.classList.remove(c)); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.delete(cls); + if (!_vtc.size) { + el[vtcKey] = void 0; } + } } function nextFrame(cb) { - requestAnimationFrame(() => { - requestAnimationFrame(cb); - }); + requestAnimationFrame(() => { + requestAnimationFrame(cb); + }); } let endId = 0; function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) { - const id = (el._endId = ++endId); - const resolveIfNotStale = () => { - if (id === el._endId) { - resolve(); - } - }; - if (explicitTimeout) { - return setTimeout(resolveIfNotStale, explicitTimeout); + const id = el._endId = ++endId; + const resolveIfNotStale = () => { + if (id === el._endId) { + resolve(); } - const { type, timeout, propCount } = getTransitionInfo(el, expectedType); - if (!type) { - return resolve(); + }; + if (explicitTimeout) { + return setTimeout(resolveIfNotStale, explicitTimeout); + } + const { type, timeout, propCount } = getTransitionInfo(el, expectedType); + if (!type) { + return resolve(); + } + const endEvent = type + "end"; + let ended = 0; + const end = () => { + el.removeEventListener(endEvent, onEnd); + resolveIfNotStale(); + }; + const onEnd = (e) => { + if (e.target === el && ++ended >= propCount) { + end(); } - const endEvent = type + 'end'; - let ended = 0; - const end = () => { - el.removeEventListener(endEvent, onEnd); - resolveIfNotStale(); - }; - const onEnd = (e) => { - if (e.target === el && ++ended >= propCount) { - end(); - } - }; - setTimeout(() => { - if (ended < propCount) { - end(); - } - }, timeout + 1); - el.addEventListener(endEvent, onEnd); + }; + setTimeout(() => { + if (ended < propCount) { + end(); + } + }, timeout + 1); + el.addEventListener(endEvent, onEnd); } function getTransitionInfo(el, expectedType) { - const styles = window.getComputedStyle(el); - // JSDOM may return undefined for transition properties - const getStyleProperties = (key) => (styles[key] || '').split(', '); - const transitionDelays = getStyleProperties(TRANSITION + 'Delay'); - const transitionDurations = getStyleProperties(TRANSITION + 'Duration'); - const transitionTimeout = getTimeout(transitionDelays, transitionDurations); - const animationDelays = getStyleProperties(ANIMATION + 'Delay'); - const animationDurations = getStyleProperties(ANIMATION + 'Duration'); - const animationTimeout = getTimeout(animationDelays, animationDurations); - let type = null; - let timeout = 0; - let propCount = 0; - /* istanbul ignore if */ - if (expectedType === TRANSITION) { - if (transitionTimeout > 0) { - type = TRANSITION; - timeout = transitionTimeout; - propCount = transitionDurations.length; - } + const styles = window.getComputedStyle(el); + const getStyleProperties = (key) => (styles[key] || "").split(", "); + const transitionDelays = getStyleProperties(`${TRANSITION}Delay`); + const transitionDurations = getStyleProperties(`${TRANSITION}Duration`); + const transitionTimeout = getTimeout(transitionDelays, transitionDurations); + const animationDelays = getStyleProperties(`${ANIMATION}Delay`); + const animationDurations = getStyleProperties(`${ANIMATION}Duration`); + const animationTimeout = getTimeout(animationDelays, animationDurations); + let type = null; + let timeout = 0; + let propCount = 0; + if (expectedType === TRANSITION) { + if (transitionTimeout > 0) { + type = TRANSITION; + timeout = transitionTimeout; + propCount = transitionDurations.length; } - else if (expectedType === ANIMATION) { - if (animationTimeout > 0) { - type = ANIMATION; - timeout = animationTimeout; - propCount = animationDurations.length; - } + } else if (expectedType === ANIMATION) { + if (animationTimeout > 0) { + type = ANIMATION; + timeout = animationTimeout; + propCount = animationDurations.length; } - else { - timeout = Math.max(transitionTimeout, animationTimeout); - type = - timeout > 0 - ? transitionTimeout > animationTimeout - ? TRANSITION - : ANIMATION - : null; - propCount = type - ? type === TRANSITION - ? transitionDurations.length - : animationDurations.length - : 0; - } - const hasTransform = type === TRANSITION && - /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']); - return { - type, - timeout, - propCount, - hasTransform - }; + } else { + timeout = Math.max(transitionTimeout, animationTimeout); + type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null; + propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0; + } + const hasTransform = type === TRANSITION && /\b(transform|all)(,|$)/.test( + getStyleProperties(`${TRANSITION}Property`).toString() + ); + return { + type, + timeout, + propCount, + hasTransform + }; } function getTimeout(delays, durations) { - while (delays.length < durations.length) { - delays = delays.concat(delays); - } - return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); + while (delays.length < durations.length) { + delays = delays.concat(delays); + } + return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i]))); } - // Old versions of Chromium (below 61.0.3163.100) formats floating pointer - // numbers in a locale-dependent way, using a comma instead of a dot. - // If comma is not replaced with a dot, the input will be rounded down - // (i.e. acting as a floor function) causing unexpected behaviors function toMs(s) { - return Number(s.slice(0, -1).replace(',', '.')) * 1000; + if (s === "auto") + return 0; + return Number(s.slice(0, -1).replace(",", ".")) * 1e3; } - // synchronously force layout to put elements into a certain state function forceReflow() { - return document.body.offsetHeight; + return document.body.offsetHeight; } - const positionMap = new WeakMap(); - const newPositionMap = new WeakMap(); - const TransitionGroupImpl = { - name: 'TransitionGroup', - props: /*#__PURE__*/ extend({}, TransitionPropsValidators, { - tag: String, - moveClass: String - }), - setup(props, { slots }) { - const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevChildren; - let children; - onUpdated(() => { - // children is guaranteed to exist after initial render - if (!prevChildren.length) { - return; - } - const moveClass = props.moveClass || `${props.name || 'v'}-move`; - if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) { - return; - } - // we divide the work into three loops to avoid mixing DOM reads and writes - // in each iteration - which helps prevent layout thrashing. - prevChildren.forEach(callPendingCbs); - prevChildren.forEach(recordPosition); - const movedChildren = prevChildren.filter(applyTranslation); - // force reflow to put everything in position - forceReflow(); - movedChildren.forEach(c => { - const el = c.el; - const style = el.style; - addTransitionClass(el, moveClass); - style.transform = style.webkitTransform = style.transitionDuration = ''; - const cb = (el._moveCb = (e) => { - if (e && e.target !== el) { - return; - } - if (!e || /transform$/.test(e.propertyName)) { - el.removeEventListener('transitionend', cb); - el._moveCb = null; - removeTransitionClass(el, moveClass); - } - }); - el.addEventListener('transitionend', cb); - }); - }); - return () => { - const rawProps = toRaw(props); - const cssTransitionProps = resolveTransitionProps(rawProps); - let tag = rawProps.tag || Fragment; - prevChildren = children; - children = slots.default ? getTransitionRawChildren(slots.default()) : []; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child.key != null) { - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - } - else { - warn$1(`<TransitionGroup> children must be keyed.`); - } - } - if (prevChildren) { - for (let i = 0; i < prevChildren.length; i++) { - const child = prevChildren[i]; - setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance)); - positionMap.set(child, child.el.getBoundingClientRect()); - } - } - return createVNode(tag, null, children); - }; + function patchClass(el, value, isSVG) { + const transitionClasses = el[vtcKey]; + if (transitionClasses) { + value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" "); + } + if (value == null) { + el.removeAttribute("class"); + } else if (isSVG) { + el.setAttribute("class", value); + } else { + el.className = value; + } + } + + const vShowOldKey = Symbol("_vod"); + const vShow = { + beforeMount(el, { value }, { transition }) { + el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display; + if (transition && value) { + transition.beforeEnter(el); + } else { + setDisplay(el, value); } + }, + mounted(el, { value }, { transition }) { + if (transition && value) { + transition.enter(el); + } + }, + updated(el, { value, oldValue }, { transition }) { + if (!value === !oldValue) + return; + if (transition) { + if (value) { + transition.beforeEnter(el); + setDisplay(el, true); + transition.enter(el); + } else { + transition.leave(el, () => { + setDisplay(el, false); + }); + } + } else { + setDisplay(el, value); + } + }, + beforeUnmount(el, { value }) { + setDisplay(el, value); + } }; + { + vShow.name = "show"; + } + function setDisplay(el, value) { + el.style.display = value ? el[vShowOldKey] : "none"; + } + + const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" ); + function useCssVars(getter) { + const instance = getCurrentInstance(); + if (!instance) { + warn(`useCssVars is called without current active component instance.`); + return; + } + const updateTeleports = instance.ut = (vars = getter(instance.proxy)) => { + Array.from( + document.querySelectorAll(`[data-v-owner="${instance.uid}"]`) + ).forEach((node) => setVarsOnNode(node, vars)); + }; + const setVars = () => { + const vars = getter(instance.proxy); + setVarsOnVNode(instance.subTree, vars); + updateTeleports(vars); + }; + watchPostEffect(setVars); + onMounted(() => { + const ob = new MutationObserver(setVars); + ob.observe(instance.subTree.el.parentNode, { childList: true }); + onUnmounted(() => ob.disconnect()); + }); + } + function setVarsOnVNode(vnode, vars) { + if (vnode.shapeFlag & 128) { + const suspense = vnode.suspense; + vnode = suspense.activeBranch; + if (suspense.pendingBranch && !suspense.isHydrating) { + suspense.effects.push(() => { + setVarsOnVNode(suspense.activeBranch, vars); + }); + } + } + while (vnode.component) { + vnode = vnode.component.subTree; + } + if (vnode.shapeFlag & 1 && vnode.el) { + setVarsOnNode(vnode.el, vars); + } else if (vnode.type === Fragment) { + vnode.children.forEach((c) => setVarsOnVNode(c, vars)); + } else if (vnode.type === Static) { + let { el, anchor } = vnode; + while (el) { + setVarsOnNode(el, vars); + if (el === anchor) + break; + el = el.nextSibling; + } + } + } + function setVarsOnNode(el, vars) { + if (el.nodeType === 1) { + const style = el.style; + let cssText = ""; + for (const key in vars) { + style.setProperty(`--${key}`, vars[key]); + cssText += `--${key}: ${vars[key]};`; + } + style[CSS_VAR_TEXT] = cssText; + } + } + + function patchStyle(el, prev, next) { + const style = el.style; + const currentDisplay = style.display; + const isCssString = isString(next); + if (next && !isCssString) { + if (prev && !isString(prev)) { + for (const key in prev) { + if (next[key] == null) { + setStyle(style, key, ""); + } + } + } + for (const key in next) { + setStyle(style, key, next[key]); + } + } else { + if (isCssString) { + if (prev !== next) { + const cssVarText = style[CSS_VAR_TEXT]; + if (cssVarText) { + next += ";" + cssVarText; + } + style.cssText = next; + } + } else if (prev) { + el.removeAttribute("style"); + } + } + if (vShowOldKey in el) { + style.display = currentDisplay; + } + } + const semicolonRE = /[^\\];\s*$/; + const importantRE = /\s*!important$/; + function setStyle(style, name, val) { + if (isArray(val)) { + val.forEach((v) => setStyle(style, name, v)); + } else { + if (val == null) + val = ""; + { + if (semicolonRE.test(val)) { + warn( + `Unexpected semicolon at the end of '${name}' style value: '${val}'` + ); + } + } + if (name.startsWith("--")) { + style.setProperty(name, val); + } else { + const prefixed = autoPrefix(style, name); + if (importantRE.test(val)) { + style.setProperty( + hyphenate(prefixed), + val.replace(importantRE, ""), + "important" + ); + } else { + style[prefixed] = val; + } + } + } + } + const prefixes = ["Webkit", "Moz", "ms"]; + const prefixCache = {}; + function autoPrefix(style, rawName) { + const cached = prefixCache[rawName]; + if (cached) { + return cached; + } + let name = camelize(rawName); + if (name !== "filter" && name in style) { + return prefixCache[rawName] = name; + } + name = capitalize(name); + for (let i = 0; i < prefixes.length; i++) { + const prefixed = prefixes[i] + name; + if (prefixed in style) { + return prefixCache[rawName] = prefixed; + } + } + return rawName; + } + + const xlinkNS = "http://www.w3.org/1999/xlink"; + function patchAttr(el, key, value, isSVG, instance) { + if (isSVG && key.startsWith("xlink:")) { + if (value == null) { + el.removeAttributeNS(xlinkNS, key.slice(6, key.length)); + } else { + el.setAttributeNS(xlinkNS, key, value); + } + } else { + const isBoolean = isSpecialBooleanAttr(key); + if (value == null || isBoolean && !includeBooleanAttr(value)) { + el.removeAttribute(key); + } else { + el.setAttribute(key, isBoolean ? "" : value); + } + } + } + + function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) { + if (key === "innerHTML" || key === "textContent") { + if (prevChildren) { + unmountChildren(prevChildren, parentComponent, parentSuspense); + } + el[key] = value == null ? "" : value; + return; + } + const tag = el.tagName; + if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally + !tag.includes("-")) { + el._value = value; + const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value; + const newValue = value == null ? "" : value; + if (oldValue !== newValue) { + el.value = newValue; + } + if (value == null) { + el.removeAttribute(key); + } + return; + } + let needRemove = false; + if (value === "" || value == null) { + const type = typeof el[key]; + if (type === "boolean") { + value = includeBooleanAttr(value); + } else if (value == null && type === "string") { + value = ""; + needRemove = true; + } else if (type === "number") { + value = 0; + needRemove = true; + } + } + try { + el[key] = value; + } catch (e) { + if (!needRemove) { + warn( + `Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`, + e + ); + } + } + needRemove && el.removeAttribute(key); + } + + function addEventListener(el, event, handler, options) { + el.addEventListener(event, handler, options); + } + function removeEventListener(el, event, handler, options) { + el.removeEventListener(event, handler, options); + } + const veiKey = Symbol("_vei"); + function patchEvent(el, rawName, prevValue, nextValue, instance = null) { + const invokers = el[veiKey] || (el[veiKey] = {}); + const existingInvoker = invokers[rawName]; + if (nextValue && existingInvoker) { + existingInvoker.value = nextValue; + } else { + const [name, options] = parseName(rawName); + if (nextValue) { + const invoker = invokers[rawName] = createInvoker(nextValue, instance); + addEventListener(el, name, invoker, options); + } else if (existingInvoker) { + removeEventListener(el, name, existingInvoker, options); + invokers[rawName] = void 0; + } + } + } + const optionsModifierRE = /(?:Once|Passive|Capture)$/; + function parseName(name) { + let options; + if (optionsModifierRE.test(name)) { + options = {}; + let m; + while (m = name.match(optionsModifierRE)) { + name = name.slice(0, name.length - m[0].length); + options[m[0].toLowerCase()] = true; + } + } + const event = name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)); + return [event, options]; + } + let cachedNow = 0; + const p = /* @__PURE__ */ Promise.resolve(); + const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now()); + function createInvoker(initialValue, instance) { + const invoker = (e) => { + if (!e._vts) { + e._vts = Date.now(); + } else if (e._vts <= invoker.attached) { + return; + } + callWithAsyncErrorHandling( + patchStopImmediatePropagation(e, invoker.value), + instance, + 5, + [e] + ); + }; + invoker.value = initialValue; + invoker.attached = getNow(); + return invoker; + } + function patchStopImmediatePropagation(e, value) { + if (isArray(value)) { + const originalStop = e.stopImmediatePropagation; + e.stopImmediatePropagation = () => { + originalStop.call(e); + e._stopped = true; + }; + return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2)); + } else { + return value; + } + } + + const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter + key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123; + const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => { + const isSVG = namespace === "svg"; + if (key === "class") { + patchClass(el, nextValue, isSVG); + } else if (key === "style") { + patchStyle(el, prevValue, nextValue); + } else if (isOn(key)) { + if (!isModelListener(key)) { + patchEvent(el, key, prevValue, nextValue, parentComponent); + } + } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) { + patchDOMProp( + el, + key, + nextValue, + prevChildren, + parentComponent, + parentSuspense, + unmountChildren + ); + } else { + if (key === "true-value") { + el._trueValue = nextValue; + } else if (key === "false-value") { + el._falseValue = nextValue; + } + patchAttr(el, key, nextValue, isSVG); + } + }; + function shouldSetAsProp(el, key, value, isSVG) { + if (isSVG) { + if (key === "innerHTML" || key === "textContent") { + return true; + } + if (key in el && isNativeOn(key) && isFunction(value)) { + return true; + } + return false; + } + if (key === "spellcheck" || key === "draggable" || key === "translate") { + return false; + } + if (key === "form") { + return false; + } + if (key === "list" && el.tagName === "INPUT") { + return false; + } + if (key === "type" && el.tagName === "TEXTAREA") { + return false; + } + if (key === "width" || key === "height") { + const tag = el.tagName; + if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") { + return false; + } + } + if (isNativeOn(key) && isString(value)) { + return false; + } + return key in el; + } + + /*! #__NO_SIDE_EFFECTS__ */ + // @__NO_SIDE_EFFECTS__ + function defineCustomElement(options, hydrate2) { + const Comp = defineComponent(options); + class VueCustomElement extends VueElement { + constructor(initialProps) { + super(Comp, initialProps, hydrate2); + } + } + VueCustomElement.def = Comp; + return VueCustomElement; + } + /*! #__NO_SIDE_EFFECTS__ */ + const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => { + return /* @__PURE__ */ defineCustomElement(options, hydrate); + }; + const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class { + }; + class VueElement extends BaseClass { + constructor(_def, _props = {}, hydrate2) { + super(); + this._def = _def; + this._props = _props; + /** + * @internal + */ + this._instance = null; + this._connected = false; + this._resolved = false; + this._numberProps = null; + this._ob = null; + if (this.shadowRoot && hydrate2) { + hydrate2(this._createVNode(), this.shadowRoot); + } else { + if (this.shadowRoot) { + warn( + `Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.` + ); + } + this.attachShadow({ mode: "open" }); + if (!this._def.__asyncLoader) { + this._resolveProps(this._def); + } + } + } + connectedCallback() { + this._connected = true; + if (!this._instance) { + if (this._resolved) { + this._update(); + } else { + this._resolveDef(); + } + } + } + disconnectedCallback() { + this._connected = false; + if (this._ob) { + this._ob.disconnect(); + this._ob = null; + } + nextTick(() => { + if (!this._connected) { + render(null, this.shadowRoot); + this._instance = null; + } + }); + } + /** + * resolve inner component definition (handle possible async component) + */ + _resolveDef() { + this._resolved = true; + for (let i = 0; i < this.attributes.length; i++) { + this._setAttr(this.attributes[i].name); + } + this._ob = new MutationObserver((mutations) => { + for (const m of mutations) { + this._setAttr(m.attributeName); + } + }); + this._ob.observe(this, { attributes: true }); + const resolve = (def, isAsync = false) => { + const { props, styles } = def; + let numberProps; + if (props && !isArray(props)) { + for (const key in props) { + const opt = props[key]; + if (opt === Number || opt && opt.type === Number) { + if (key in this._props) { + this._props[key] = toNumber(this._props[key]); + } + (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true; + } + } + } + this._numberProps = numberProps; + if (isAsync) { + this._resolveProps(def); + } + this._applyStyles(styles); + this._update(); + }; + const asyncDef = this._def.__asyncLoader; + if (asyncDef) { + asyncDef().then((def) => resolve(def, true)); + } else { + resolve(this._def); + } + } + _resolveProps(def) { + const { props } = def; + const declaredPropKeys = isArray(props) ? props : Object.keys(props || {}); + for (const key of Object.keys(this)) { + if (key[0] !== "_" && declaredPropKeys.includes(key)) { + this._setProp(key, this[key], true, false); + } + } + for (const key of declaredPropKeys.map(camelize)) { + Object.defineProperty(this, key, { + get() { + return this._getProp(key); + }, + set(val) { + this._setProp(key, val); + } + }); + } + } + _setAttr(key) { + let value = this.getAttribute(key); + const camelKey = camelize(key); + if (this._numberProps && this._numberProps[camelKey]) { + value = toNumber(value); + } + this._setProp(camelKey, value, false); + } + /** + * @internal + */ + _getProp(key) { + return this._props[key]; + } + /** + * @internal + */ + _setProp(key, val, shouldReflect = true, shouldUpdate = true) { + if (val !== this._props[key]) { + this._props[key] = val; + if (shouldUpdate && this._instance) { + this._update(); + } + if (shouldReflect) { + if (val === true) { + this.setAttribute(hyphenate(key), ""); + } else if (typeof val === "string" || typeof val === "number") { + this.setAttribute(hyphenate(key), val + ""); + } else if (!val) { + this.removeAttribute(hyphenate(key)); + } + } + } + } + _update() { + render(this._createVNode(), this.shadowRoot); + } + _createVNode() { + const vnode = createVNode(this._def, extend({}, this._props)); + if (!this._instance) { + vnode.ce = (instance) => { + this._instance = instance; + instance.isCE = true; + { + instance.ceReload = (newStyles) => { + if (this._styles) { + this._styles.forEach((s) => this.shadowRoot.removeChild(s)); + this._styles.length = 0; + } + this._applyStyles(newStyles); + this._instance = null; + this._update(); + }; + } + const dispatch = (event, args) => { + this.dispatchEvent( + new CustomEvent(event, { + detail: args + }) + ); + }; + instance.emit = (event, ...args) => { + dispatch(event, args); + if (hyphenate(event) !== event) { + dispatch(hyphenate(event), args); + } + }; + let parent = this; + while (parent = parent && (parent.parentNode || parent.host)) { + if (parent instanceof VueElement) { + instance.parent = parent._instance; + instance.provides = parent._instance.provides; + break; + } + } + }; + } + return vnode; + } + _applyStyles(styles) { + if (styles) { + styles.forEach((css) => { + const s = document.createElement("style"); + s.textContent = css; + this.shadowRoot.appendChild(s); + { + (this._styles || (this._styles = [])).push(s); + } + }); + } + } + } + + function useCssModule(name = "$style") { + { + { + warn(`useCssModule() is not supported in the global build.`); + } + return EMPTY_OBJ; + } + } + + const positionMap = /* @__PURE__ */ new WeakMap(); + const newPositionMap = /* @__PURE__ */ new WeakMap(); + const moveCbKey = Symbol("_moveCb"); + const enterCbKey = Symbol("_enterCb"); + const TransitionGroupImpl = { + name: "TransitionGroup", + props: /* @__PURE__ */ extend({}, TransitionPropsValidators, { + tag: String, + moveClass: String + }), + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + let prevChildren; + let children; + onUpdated(() => { + if (!prevChildren.length) { + return; + } + const moveClass = props.moveClass || `${props.name || "v"}-move`; + if (!hasCSSTransform( + prevChildren[0].el, + instance.vnode.el, + moveClass + )) { + return; + } + prevChildren.forEach(callPendingCbs); + prevChildren.forEach(recordPosition); + const movedChildren = prevChildren.filter(applyTranslation); + forceReflow(); + movedChildren.forEach((c) => { + const el = c.el; + const style = el.style; + addTransitionClass(el, moveClass); + style.transform = style.webkitTransform = style.transitionDuration = ""; + const cb = el[moveCbKey] = (e) => { + if (e && e.target !== el) { + return; + } + if (!e || /transform$/.test(e.propertyName)) { + el.removeEventListener("transitionend", cb); + el[moveCbKey] = null; + removeTransitionClass(el, moveClass); + } + }; + el.addEventListener("transitionend", cb); + }); + }); + return () => { + const rawProps = toRaw(props); + const cssTransitionProps = resolveTransitionProps(rawProps); + let tag = rawProps.tag || Fragment; + prevChildren = children; + children = slots.default ? getTransitionRawChildren(slots.default()) : []; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (child.key != null) { + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + } else { + warn(`<TransitionGroup> children must be keyed.`); + } + } + if (prevChildren) { + for (let i = 0; i < prevChildren.length; i++) { + const child = prevChildren[i]; + setTransitionHooks( + child, + resolveTransitionHooks(child, cssTransitionProps, state, instance) + ); + positionMap.set(child, child.el.getBoundingClientRect()); + } + } + return createVNode(tag, null, children); + }; + } + }; + const removeMode = (props) => delete props.mode; + /* @__PURE__ */ removeMode(TransitionGroupImpl.props); const TransitionGroup = TransitionGroupImpl; function callPendingCbs(c) { - const el = c.el; - if (el._moveCb) { - el._moveCb(); - } - if (el._enterCb) { - el._enterCb(); - } + const el = c.el; + if (el[moveCbKey]) { + el[moveCbKey](); + } + if (el[enterCbKey]) { + el[enterCbKey](); + } } function recordPosition(c) { - newPositionMap.set(c, c.el.getBoundingClientRect()); + newPositionMap.set(c, c.el.getBoundingClientRect()); } function applyTranslation(c) { - const oldPos = positionMap.get(c); - const newPos = newPositionMap.get(c); - const dx = oldPos.left - newPos.left; - const dy = oldPos.top - newPos.top; - if (dx || dy) { - const s = c.el.style; - s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; - s.transitionDuration = '0s'; - return c; - } + const oldPos = positionMap.get(c); + const newPos = newPositionMap.get(c); + const dx = oldPos.left - newPos.left; + const dy = oldPos.top - newPos.top; + if (dx || dy) { + const s = c.el.style; + s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`; + s.transitionDuration = "0s"; + return c; + } } function hasCSSTransform(el, root, moveClass) { - // Detect whether an element with the move class applied has - // CSS transitions. Since the element may be inside an entering - // transition at this very moment, we make a clone of it and remove - // all other transition classes applied to ensure only the move class - // is applied. - const clone = el.cloneNode(); - if (el._vtc) { - el._vtc.forEach(cls => { - cls.split(/\s+/).forEach(c => c && clone.classList.remove(c)); - }); - } - moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c)); - clone.style.display = 'none'; - const container = (root.nodeType === 1 ? root : root.parentNode); - container.appendChild(clone); - const { hasTransform } = getTransitionInfo(clone); - container.removeChild(clone); - return hasTransform; + const clone = el.cloneNode(); + const _vtc = el[vtcKey]; + if (_vtc) { + _vtc.forEach((cls) => { + cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c)); + }); + } + moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c)); + clone.style.display = "none"; + const container = root.nodeType === 1 ? root : root.parentNode; + container.appendChild(clone); + const { hasTransform } = getTransitionInfo(clone); + container.removeChild(clone); + return hasTransform; } const getModelAssigner = (vnode) => { - const fn = vnode.props['onUpdate:modelValue'] || - (false ); - return isArray(fn) ? value => invokeArrayFns(fn, value) : fn; + const fn = vnode.props["onUpdate:modelValue"] || false; + return isArray(fn) ? (value) => invokeArrayFns(fn, value) : fn; }; function onCompositionStart(e) { - e.target.composing = true; + e.target.composing = true; } function onCompositionEnd(e) { - const target = e.target; - if (target.composing) { - target.composing = false; - target.dispatchEvent(new Event('input')); - } + const target = e.target; + if (target.composing) { + target.composing = false; + target.dispatchEvent(new Event("input")); + } } - // We are exporting the v-model runtime directly as vnode hooks so that it can - // be tree-shaken in case v-model is never used. + const assignKey = Symbol("_assign"); const vModelText = { - created(el, { modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - const castToNumber = number || (vnode.props && vnode.props.type === 'number'); - addEventListener(el, lazy ? 'change' : 'input', e => { - if (e.target.composing) - return; - let domValue = el.value; - if (trim) { - domValue = domValue.trim(); - } - if (castToNumber) { - domValue = toNumber(domValue); - } - el._assign(domValue); - }); - if (trim) { - addEventListener(el, 'change', () => { - el.value = el.value.trim(); - }); - } - if (!lazy) { - addEventListener(el, 'compositionstart', onCompositionStart); - addEventListener(el, 'compositionend', onCompositionEnd); - // Safari < 10.2 & UIWebView doesn't fire compositionend when - // switching focus before confirming composition choice - // this also fixes the issue where some browsers e.g. iOS Chrome - // fires "change" instead of "input" on autocomplete. - addEventListener(el, 'change', onCompositionEnd); - } - }, - // set value on mounted so it's after min/max for type="range" - mounted(el, { value }) { - el.value = value == null ? '' : value; - }, - beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { - el._assign = getModelAssigner(vnode); - // avoid clearing unresolved text. #2302 - if (el.composing) - return; - if (document.activeElement === el && el.type !== 'range') { - if (lazy) { - return; - } - if (trim && el.value.trim() === value) { - return; - } - if ((number || el.type === 'number') && toNumber(el.value) === value) { - return; - } - } - const newValue = value == null ? '' : value; - if (el.value !== newValue) { - el.value = newValue; - } + created(el, { modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + const castToNumber = number || vnode.props && vnode.props.type === "number"; + addEventListener(el, lazy ? "change" : "input", (e) => { + if (e.target.composing) + return; + let domValue = el.value; + if (trim) { + domValue = domValue.trim(); + } + if (castToNumber) { + domValue = looseToNumber(domValue); + } + el[assignKey](domValue); + }); + if (trim) { + addEventListener(el, "change", () => { + el.value = el.value.trim(); + }); } + if (!lazy) { + addEventListener(el, "compositionstart", onCompositionStart); + addEventListener(el, "compositionend", onCompositionEnd); + addEventListener(el, "change", onCompositionEnd); + } + }, + // set value on mounted so it's after min/max for type="range" + mounted(el, { value }) { + el.value = value == null ? "" : value; + }, + beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (el.composing) + return; + const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value; + const newValue = value == null ? "" : value; + if (elValue === newValue) { + return; + } + if (document.activeElement === el && el.type !== "range") { + if (lazy) { + return; + } + if (trim && el.value.trim() === newValue) { + return; + } + } + el.value = newValue; + } }; const vModelCheckbox = { - // #4096 array checkboxes need to be deep traversed - deep: true, - created(el, _, vnode) { - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - const modelValue = el._modelValue; - const elementValue = getValue(el); - const checked = el.checked; - const assign = el._assign; - if (isArray(modelValue)) { - const index = looseIndexOf(modelValue, elementValue); - const found = index !== -1; - if (checked && !found) { - assign(modelValue.concat(elementValue)); - } - else if (!checked && found) { - const filtered = [...modelValue]; - filtered.splice(index, 1); - assign(filtered); - } - } - else if (isSet(modelValue)) { - const cloned = new Set(modelValue); - if (checked) { - cloned.add(elementValue); - } - else { - cloned.delete(elementValue); - } - assign(cloned); - } - else { - assign(getCheckboxValue(el, checked)); - } - }); - }, - // set initial checked on mount to wait for true-value/false-value - mounted: setChecked, - beforeUpdate(el, binding, vnode) { - el._assign = getModelAssigner(vnode); - setChecked(el, binding, vnode); - } + // #4096 array checkboxes need to be deep traversed + deep: true, + created(el, _, vnode) { + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + const modelValue = el._modelValue; + const elementValue = getValue(el); + const checked = el.checked; + const assign = el[assignKey]; + if (isArray(modelValue)) { + const index = looseIndexOf(modelValue, elementValue); + const found = index !== -1; + if (checked && !found) { + assign(modelValue.concat(elementValue)); + } else if (!checked && found) { + const filtered = [...modelValue]; + filtered.splice(index, 1); + assign(filtered); + } + } else if (isSet(modelValue)) { + const cloned = new Set(modelValue); + if (checked) { + cloned.add(elementValue); + } else { + cloned.delete(elementValue); + } + assign(cloned); + } else { + assign(getCheckboxValue(el, checked)); + } + }); + }, + // set initial checked on mount to wait for true-value/false-value + mounted: setChecked, + beforeUpdate(el, binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + setChecked(el, binding, vnode); + } }; function setChecked(el, { value, oldValue }, vnode) { - el._modelValue = value; - if (isArray(value)) { - el.checked = looseIndexOf(value, vnode.props.value) > -1; - } - else if (isSet(value)) { - el.checked = value.has(vnode.props.value); - } - else if (value !== oldValue) { - el.checked = looseEqual(value, getCheckboxValue(el, true)); - } + el._modelValue = value; + if (isArray(value)) { + el.checked = looseIndexOf(value, vnode.props.value) > -1; + } else if (isSet(value)) { + el.checked = value.has(vnode.props.value); + } else if (value !== oldValue) { + el.checked = looseEqual(value, getCheckboxValue(el, true)); + } } const vModelRadio = { - created(el, { value }, vnode) { - el.checked = looseEqual(value, vnode.props.value); - el._assign = getModelAssigner(vnode); - addEventListener(el, 'change', () => { - el._assign(getValue(el)); - }); - }, - beforeUpdate(el, { value, oldValue }, vnode) { - el._assign = getModelAssigner(vnode); - if (value !== oldValue) { - el.checked = looseEqual(value, vnode.props.value); - } + created(el, { value }, vnode) { + el.checked = looseEqual(value, vnode.props.value); + el[assignKey] = getModelAssigner(vnode); + addEventListener(el, "change", () => { + el[assignKey](getValue(el)); + }); + }, + beforeUpdate(el, { value, oldValue }, vnode) { + el[assignKey] = getModelAssigner(vnode); + if (value !== oldValue) { + el.checked = looseEqual(value, vnode.props.value); } + } }; const vModelSelect = { - // <select multiple> value need to be deep traversed - deep: true, - created(el, { value, modifiers: { number } }, vnode) { - const isSetModel = isSet(value); - addEventListener(el, 'change', () => { - const selectedVal = Array.prototype.filter - .call(el.options, (o) => o.selected) - .map((o) => number ? toNumber(getValue(o)) : getValue(o)); - el._assign(el.multiple - ? isSetModel - ? new Set(selectedVal) - : selectedVal - : selectedVal[0]); - }); - el._assign = getModelAssigner(vnode); - }, - // set value in mounted & updated because <select> relies on its children - // <option>s. - mounted(el, { value }) { - setSelected(el, value); - }, - beforeUpdate(el, _binding, vnode) { - el._assign = getModelAssigner(vnode); - }, - updated(el, { value }) { - setSelected(el, value); + // <select multiple> value need to be deep traversed + deep: true, + created(el, { value, modifiers: { number } }, vnode) { + const isSetModel = isSet(value); + addEventListener(el, "change", () => { + const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map( + (o) => number ? looseToNumber(getValue(o)) : getValue(o) + ); + el[assignKey]( + el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0] + ); + el._assigning = true; + nextTick(() => { + el._assigning = false; + }); + }); + el[assignKey] = getModelAssigner(vnode); + }, + // set value in mounted & updated because <select> relies on its children + // <option>s. + mounted(el, { value, oldValue, modifiers: { number } }) { + setSelected(el, value, oldValue, number); + }, + beforeUpdate(el, _binding, vnode) { + el[assignKey] = getModelAssigner(vnode); + }, + updated(el, { value, oldValue, modifiers: { number } }) { + if (!el._assigning) { + setSelected(el, value, oldValue, number); } + } }; - function setSelected(el, value) { - const isMultiple = el.multiple; - if (isMultiple && !isArray(value) && !isSet(value)) { - warn$1(`<select multiple v-model> expects an Array or Set value for its binding, ` + - `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`); + function setSelected(el, value, oldValue, number) { + const isMultiple = el.multiple; + const isArrayValue = isArray(value); + if (isMultiple && !isArrayValue && !isSet(value)) { + warn( + `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.` + ); + return; + } + if (isArrayValue && looseEqual(value, oldValue)) { + return; + } + for (let i = 0, l = el.options.length; i < l; i++) { + const option = el.options[i]; + const optionValue = getValue(option); + if (isMultiple) { + if (isArrayValue) { + const optionType = typeof optionValue; + if (optionType === "string" || optionType === "number") { + option.selected = value.includes( + number ? looseToNumber(optionValue) : optionValue + ); + } else { + option.selected = looseIndexOf(value, optionValue) > -1; + } + } else { + option.selected = value.has(optionValue); + } + } else { + if (looseEqual(getValue(option), value)) { + if (el.selectedIndex !== i) + el.selectedIndex = i; return; + } } - for (let i = 0, l = el.options.length; i < l; i++) { - const option = el.options[i]; - const optionValue = getValue(option); - if (isMultiple) { - if (isArray(value)) { - option.selected = looseIndexOf(value, optionValue) > -1; - } - else { - option.selected = value.has(optionValue); - } - } - else { - if (looseEqual(getValue(option), value)) { - if (el.selectedIndex !== i) - el.selectedIndex = i; - return; - } - } - } - if (!isMultiple && el.selectedIndex !== -1) { - el.selectedIndex = -1; - } + } + if (!isMultiple && el.selectedIndex !== -1) { + el.selectedIndex = -1; + } } - // retrieve raw value set via :value bindings function getValue(el) { - return '_value' in el ? el._value : el.value; + return "_value" in el ? el._value : el.value; } - // retrieve raw value for true-value and false-value set via :true-value or :false-value bindings function getCheckboxValue(el, checked) { - const key = checked ? '_trueValue' : '_falseValue'; - return key in el ? el[key] : checked; + const key = checked ? "_trueValue" : "_falseValue"; + return key in el ? el[key] : checked; } const vModelDynamic = { - created(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'created'); - }, - mounted(el, binding, vnode) { - callModelHook(el, binding, vnode, null, 'mounted'); - }, - beforeUpdate(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate'); - }, - updated(el, binding, vnode, prevVNode) { - callModelHook(el, binding, vnode, prevVNode, 'updated'); - } + created(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "created"); + }, + mounted(el, binding, vnode) { + callModelHook(el, binding, vnode, null, "mounted"); + }, + beforeUpdate(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "beforeUpdate"); + }, + updated(el, binding, vnode, prevVNode) { + callModelHook(el, binding, vnode, prevVNode, "updated"); + } }; function resolveDynamicModel(tagName, type) { - switch (tagName) { - case 'SELECT': - return vModelSelect; - case 'TEXTAREA': - return vModelText; + switch (tagName) { + case "SELECT": + return vModelSelect; + case "TEXTAREA": + return vModelText; + default: + switch (type) { + case "checkbox": + return vModelCheckbox; + case "radio": + return vModelRadio; default: - switch (type) { - case 'checkbox': - return vModelCheckbox; - case 'radio': - return vModelRadio; - default: - return vModelText; - } - } + return vModelText; + } + } } function callModelHook(el, binding, vnode, prevVNode, hook) { - const modelToUse = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type); - const fn = modelToUse[hook]; - fn && fn(el, binding, vnode, prevVNode); + const modelToUse = resolveDynamicModel( + el.tagName, + vnode.props && vnode.props.type + ); + const fn = modelToUse[hook]; + fn && fn(el, binding, vnode, prevVNode); } - const systemModifiers = ['ctrl', 'shift', 'alt', 'meta']; + const systemModifiers = ["ctrl", "shift", "alt", "meta"]; const modifierGuards = { - stop: e => e.stopPropagation(), - prevent: e => e.preventDefault(), - self: e => e.target !== e.currentTarget, - ctrl: e => !e.ctrlKey, - shift: e => !e.shiftKey, - alt: e => !e.altKey, - meta: e => !e.metaKey, - left: e => 'button' in e && e.button !== 0, - middle: e => 'button' in e && e.button !== 1, - right: e => 'button' in e && e.button !== 2, - exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m)) + stop: (e) => e.stopPropagation(), + prevent: (e) => e.preventDefault(), + self: (e) => e.target !== e.currentTarget, + ctrl: (e) => !e.ctrlKey, + shift: (e) => !e.shiftKey, + alt: (e) => !e.altKey, + meta: (e) => !e.metaKey, + left: (e) => "button" in e && e.button !== 0, + middle: (e) => "button" in e && e.button !== 1, + right: (e) => "button" in e && e.button !== 2, + exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m)) }; - /** - * @private - */ const withModifiers = (fn, modifiers) => { - return (event, ...args) => { - for (let i = 0; i < modifiers.length; i++) { - const guard = modifierGuards[modifiers[i]]; - if (guard && guard(event, modifiers)) - return; - } - return fn(event, ...args); - }; - }; - // Kept for 2.x compat. - // Note: IE11 compat for `spacebar` and `del` is removed for now. - const keyNames = { - esc: 'escape', - space: ' ', - up: 'arrow-up', - left: 'arrow-left', - right: 'arrow-right', - down: 'arrow-down', - delete: 'backspace' - }; - /** - * @private - */ - const withKeys = (fn, modifiers) => { - return (event) => { - if (!('key' in event)) { - return; - } - const eventKey = hyphenate(event.key); - if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) { - return fn(event); - } - }; - }; - - const vShow = { - beforeMount(el, { value }, { transition }) { - el._vod = el.style.display === 'none' ? '' : el.style.display; - if (transition && value) { - transition.beforeEnter(el); - } - else { - setDisplay(el, value); - } - }, - mounted(el, { value }, { transition }) { - if (transition && value) { - transition.enter(el); - } - }, - updated(el, { value, oldValue }, { transition }) { - if (!value === !oldValue) - return; - if (transition) { - if (value) { - transition.beforeEnter(el); - setDisplay(el, true); - transition.enter(el); - } - else { - transition.leave(el, () => { - setDisplay(el, false); - }); - } - } - else { - setDisplay(el, value); - } - }, - beforeUnmount(el, { value }) { - setDisplay(el, value); + const cache = fn._withMods || (fn._withMods = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => { + for (let i = 0; i < modifiers.length; i++) { + const guard = modifierGuards[modifiers[i]]; + if (guard && guard(event, modifiers)) + return; } + return fn(event, ...args); + }); + }; + const keyNames = { + esc: "escape", + space: " ", + up: "arrow-up", + left: "arrow-left", + right: "arrow-right", + down: "arrow-down", + delete: "backspace" + }; + const withKeys = (fn, modifiers) => { + const cache = fn._withKeys || (fn._withKeys = {}); + const cacheKey = modifiers.join("."); + return cache[cacheKey] || (cache[cacheKey] = (event) => { + if (!("key" in event)) { + return; + } + const eventKey = hyphenate(event.key); + if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) { + return fn(event); + } + }); }; - function setDisplay(el, value) { - el.style.display = value ? el._vod : 'none'; - } - const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps); - // lazy create the renderer - this makes core renderer logic tree-shakable - // in case the user only imports reactivity utilities from Vue. + const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps); let renderer; let enabledHydration = false; function ensureRenderer() { - return (renderer || - (renderer = createRenderer(rendererOptions))); + return renderer || (renderer = createRenderer(rendererOptions)); } function ensureHydrationRenderer() { - renderer = enabledHydration - ? renderer - : createHydrationRenderer(rendererOptions); - enabledHydration = true; - return renderer; + renderer = enabledHydration ? renderer : createHydrationRenderer(rendererOptions); + enabledHydration = true; + return renderer; } - // use explicit type casts here to avoid import() calls in rolled-up d.ts - const render = ((...args) => { - ensureRenderer().render(...args); - }); - const hydrate = ((...args) => { - ensureHydrationRenderer().hydrate(...args); - }); - const createApp = ((...args) => { - const app = ensureRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + const render = (...args) => { + ensureRenderer().render(...args); + }; + const hydrate = (...args) => { + ensureHydrationRenderer().hydrate(...args); + }; + const createApp = (...args) => { + const app = ensureRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (!container) + return; + const component = app._component; + if (!isFunction(component) && !component.render && !component.template) { + component.template = container.innerHTML; } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (!container) - return; - const component = app._component; - if (!isFunction(component) && !component.render && !component.template) { - // __UNSAFE__ - // Reason: potential execution of JS expressions in in-DOM template. - // The user must make sure the in-DOM template is trusted. If it's - // rendered by the server, the template should not contain any user data. - component.template = container.innerHTML; - } - // clear content before mounting - container.innerHTML = ''; - const proxy = mount(container, false, container instanceof SVGElement); - if (container instanceof Element) { - container.removeAttribute('v-cloak'); - container.setAttribute('data-v-app', ''); - } - return proxy; - }; - return app; - }); - const createSSRApp = ((...args) => { - const app = ensureHydrationRenderer().createApp(...args); - { - injectNativeTagCheck(app); - injectCompilerOptionsCheck(app); + container.innerHTML = ""; + const proxy = mount(container, false, resolveRootNamespace(container)); + if (container instanceof Element) { + container.removeAttribute("v-cloak"); + container.setAttribute("data-v-app", ""); } - const { mount } = app; - app.mount = (containerOrSelector) => { - const container = normalizeContainer(containerOrSelector); - if (container) { - return mount(container, true, container instanceof SVGElement); - } - }; - return app; - }); + return proxy; + }; + return app; + }; + const createSSRApp = (...args) => { + const app = ensureHydrationRenderer().createApp(...args); + { + injectNativeTagCheck(app); + injectCompilerOptionsCheck(app); + } + const { mount } = app; + app.mount = (containerOrSelector) => { + const container = normalizeContainer(containerOrSelector); + if (container) { + return mount(container, true, resolveRootNamespace(container)); + } + }; + return app; + }; + function resolveRootNamespace(container) { + if (container instanceof SVGElement) { + return "svg"; + } + if (typeof MathMLElement === "function" && container instanceof MathMLElement) { + return "mathml"; + } + } function injectNativeTagCheck(app) { - // Inject `isNativeTag` - // this is used for component name validation (dev only) - Object.defineProperty(app.config, 'isNativeTag', { - value: (tag) => isHTMLTag(tag) || isSVGTag(tag), - writable: false - }); + Object.defineProperty(app.config, "isNativeTag", { + value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag), + writable: false + }); } - // dev only function injectCompilerOptionsCheck(app) { - if (isRuntimeOnly()) { - const isCustomElement = app.config.isCustomElement; - Object.defineProperty(app.config, 'isCustomElement', { - get() { - return isCustomElement; - }, - set() { - warn$1(`The \`isCustomElement\` config option is deprecated. Use ` + - `\`compilerOptions.isCustomElement\` instead.`); - } - }); - const compilerOptions = app.config.compilerOptions; - const msg = `The \`compilerOptions\` config option is only respected when using ` + - `a build of Vue.js that includes the runtime compiler (aka "full build"). ` + - `Since you are using the runtime-only build, \`compilerOptions\` ` + - `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` + - `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` + - `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` + - `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`; - Object.defineProperty(app.config, 'compilerOptions', { - get() { - warn$1(msg); - return compilerOptions; - }, - set() { - warn$1(msg); - } - }); - } + if (isRuntimeOnly()) { + const isCustomElement = app.config.isCustomElement; + Object.defineProperty(app.config, "isCustomElement", { + get() { + return isCustomElement; + }, + set() { + warn( + `The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.` + ); + } + }); + const compilerOptions = app.config.compilerOptions; + const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead. +- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option. +- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader +- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`; + Object.defineProperty(app.config, "compilerOptions", { + get() { + warn(msg); + return compilerOptions; + }, + set() { + warn(msg); + } + }); + } } function normalizeContainer(container) { - if (isString(container)) { - const res = document.querySelector(container); - if (!res) { - warn$1(`Failed to mount app: mount target selector "${container}" returned null.`); - } - return res; + if (isString(container)) { + const res = document.querySelector(container); + if (!res) { + warn( + `Failed to mount app: mount target selector "${container}" returned null.` + ); } - if (window.ShadowRoot && - container instanceof window.ShadowRoot && - container.mode === 'closed') { - warn$1(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`); - } - return container; + return res; + } + if (window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") { + warn( + `mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs` + ); + } + return container; } - /** - * @internal - */ const initDirectivesForSSR = NOOP; function initDev() { + { { - { - console.info(`You are running a development build of Vue.\n` + - `Make sure to use the production build (*.prod.js) when deploying for production.`); - } - initCustomFormatter(); + console.info( + `You are running a development build of Vue. +Make sure to use the production build (*.prod.js) when deploying for production.` + ); } + initCustomFormatter(); + } } - // This entry exports the runtime only, and is built as { - initDev(); + initDev(); } - const compile$1 = () => { - { - warn$1(`Runtime compilation is not supported in this build of Vue.` + - (` Use "vue.global.js" instead.` - ) /* should not happen */); - } + const compile = () => { + { + warn( + `Runtime compilation is not supported in this build of Vue.` + (` Use "vue.global.js" instead.` ) + ); + } }; exports.BaseTransition = BaseTransition; + exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators; exports.Comment = Comment; + exports.DeprecationTypes = DeprecationTypes; exports.EffectScope = EffectScope; + exports.ErrorCodes = ErrorCodes; + exports.ErrorTypeStrings = ErrorTypeStrings; exports.Fragment = Fragment; exports.KeepAlive = KeepAlive; exports.ReactiveEffect = ReactiveEffect; @@ -10853,17 +11077,20 @@ var Vue = (function (exports) { exports.Suspense = Suspense; exports.Teleport = Teleport; exports.Text = Text; + exports.TrackOpTypes = TrackOpTypes; exports.Transition = Transition; exports.TransitionGroup = TransitionGroup; + exports.TriggerOpTypes = TriggerOpTypes; exports.VueElement = VueElement; + exports.assertNumber = assertNumber; exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling; exports.callWithErrorHandling = callWithErrorHandling; exports.camelize = camelize; exports.capitalize = capitalize; exports.cloneVNode = cloneVNode; exports.compatUtils = compatUtils; - exports.compile = compile$1; - exports.computed = computed$1; + exports.compile = compile; + exports.computed = computed; exports.createApp = createApp; exports.createBlock = createBlock; exports.createCommentVNode = createCommentVNode; @@ -10883,8 +11110,12 @@ var Vue = (function (exports) { exports.defineCustomElement = defineCustomElement; exports.defineEmits = defineEmits; exports.defineExpose = defineExpose; + exports.defineModel = defineModel; + exports.defineOptions = defineOptions; exports.defineProps = defineProps; exports.defineSSRCustomElement = defineSSRCustomElement; + exports.defineSlots = defineSlots; + exports.devtools = devtools; exports.effect = effect; exports.effectScope = effectScope; exports.getCurrentInstance = getCurrentInstance; @@ -10893,6 +11124,7 @@ var Vue = (function (exports) { exports.guardReactiveProps = guardReactiveProps; exports.h = h; exports.handleError = handleError; + exports.hasInjectionContext = hasInjectionContext; exports.hydrate = hydrate; exports.initCustomFormatter = initCustomFormatter; exports.initDirectivesForSSR = initDirectivesForSSR; @@ -10907,6 +11139,7 @@ var Vue = (function (exports) { exports.isVNode = isVNode; exports.markRaw = markRaw; exports.mergeDefaults = mergeDefaults; + exports.mergeModels = mergeModels; exports.mergeProps = mergeProps; exports.nextTick = nextTick; exports.normalizeClass = normalizeClass; @@ -10958,12 +11191,14 @@ var Vue = (function (exports) { exports.toRaw = toRaw; exports.toRef = toRef; exports.toRefs = toRefs; + exports.toValue = toValue; exports.transformVNodeArgs = transformVNodeArgs; exports.triggerRef = triggerRef; exports.unref = unref; exports.useAttrs = useAttrs; exports.useCssModule = useCssModule; exports.useCssVars = useCssVars; + exports.useModel = useModel; exports.useSSRContext = useSSRContext; exports.useSlots = useSlots; exports.useTransitionState = useTransitionState; @@ -10974,7 +11209,7 @@ var Vue = (function (exports) { exports.vModelText = vModelText; exports.vShow = vShow; exports.version = version; - exports.warn = warn$1; + exports.warn = warn; exports.watch = watch; exports.watchEffect = watchEffect; exports.watchPostEffect = watchPostEffect; @@ -10988,8 +11223,6 @@ var Vue = (function (exports) { exports.withModifiers = withModifiers; exports.withScopeId = withScopeId; - Object.defineProperty(exports, '__esModule', { value: true }); - return exports; -}({})); +})({}); diff --git a/node_modules/vue/dist/vue.runtime.global.prod.js b/node_modules/vue/dist/vue.runtime.global.prod.js index 4b6acc7b..7b6dc636 100644 --- a/node_modules/vue/dist/vue.runtime.global.prod.js +++ b/node_modules/vue/dist/vue.runtime.global.prod.js @@ -1 +1,11 @@ -var Vue=function(e){"use strict";function t(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),o=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function r(e){return!!e||""===e}function s(e){if(S(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=F(o)?c(o):s(o);if(r)for(const e in r)t[e]=r[e]}return t}return F(e)||O(e)?e:void 0}const l=/;(?![^(]*\))/g,i=/:(.+)/;function c(e){const t={};return e.split(l).forEach((e=>{if(e){const n=e.split(i);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function a(e){let t="";if(F(e))t=e;else if(S(e))for(let n=0;n<e.length;n++){const o=a(e[n]);o&&(t+=o+" ")}else if(O(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function u(e,t){if(e===t)return!0;let n=A(e),o=A(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=R(e),o=R(t),n||o)return e===t;if(n=S(e),o=S(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=u(e[o],t[o]);return n}(e,t);if(n=O(e),o=O(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!u(e[n],t[n]))return!1}}return String(e)===String(t)}function f(e,t){return e.findIndex((e=>u(e,t)))}const p=(e,t)=>t&&t.__v_isRef?p(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:k(t)?{[`Set(${t.size})`]:[...t.values()]}:!O(t)||S(t)||V(t)?t:String(t),d={},h=[],m=()=>{},v=()=>!1,g=/^on[^a-z]/,_=e=>g.test(e),y=e=>e.startsWith("onUpdate:"),b=Object.assign,C=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},x=Object.prototype.hasOwnProperty,w=(e,t)=>x.call(e,t),S=Array.isArray,E=e=>"[object Map]"===N(e),k=e=>"[object Set]"===N(e),A=e=>"[object Date]"===N(e),T=e=>"function"==typeof e,F=e=>"string"==typeof e,R=e=>"symbol"==typeof e,O=e=>null!==e&&"object"==typeof e,P=e=>O(e)&&T(e.then)&&T(e.catch),M=Object.prototype.toString,N=e=>M.call(e),V=e=>"[object Object]"===N(e),B=e=>F(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,L=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),I=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},$=/-(\w)/g,j=I((e=>e.replace($,((e,t)=>t?t.toUpperCase():"")))),U=/\B([A-Z])/g,D=I((e=>e.replace(U,"-$1").toLowerCase())),H=I((e=>e.charAt(0).toUpperCase()+e.slice(1))),z=I((e=>e?`on${H(e)}`:"")),W=(e,t)=>!Object.is(e,t),K=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},G=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},q=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let J;let Y;class X{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&Y&&(this.parent=Y,this.index=(Y.scopes||(Y.scopes=[])).push(this)-1)}run(e){if(this.active){const t=Y;try{return Y=this,e()}finally{Y=t}}}on(){Y=this}off(){Y=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}function Z(e,t=Y){t&&t.active&&t.effects.push(e)}const Q=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ee=e=>(e.w&re)>0,te=e=>(e.n&re)>0,ne=new WeakMap;let oe=0,re=1;let se;const le=Symbol(""),ie=Symbol("");class ce{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,Z(this,n)}run(){if(!this.active)return this.fn();let e=se,t=ue;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=se,se=this,ue=!0,re=1<<++oe,oe<=30?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=re})(this):ae(this),this.fn()}finally{oe<=30&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o<t.length;o++){const r=t[o];ee(r)&&!te(r)?r.delete(e):t[n++]=r,r.w&=~re,r.n&=~re}t.length=n}})(this),re=1<<--oe,se=this.parent,ue=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){se===this?this.deferStop=!0:this.active&&(ae(this),this.onStop&&this.onStop(),this.active=!1)}}function ae(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let ue=!0;const fe=[];function pe(){fe.push(ue),ue=!1}function de(){const e=fe.pop();ue=void 0===e||e}function he(e,t,n){if(ue&&se){let t=ne.get(e);t||ne.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Q()),me(o)}}function me(e,t){let n=!1;oe<=30?te(e)||(e.n|=re,n=!ee(e)):n=!e.has(se),n&&(e.add(se),se.deps.push(e))}function ve(e,t,n,o,r,s){const l=ne.get(e);if(!l)return;let i=[];if("clear"===t)i=[...l.values()];else if("length"===n&&S(e))l.forEach(((e,t)=>{("length"===t||t>=o)&&i.push(e)}));else switch(void 0!==n&&i.push(l.get(n)),t){case"add":S(e)?B(n)&&i.push(l.get("length")):(i.push(l.get(le)),E(e)&&i.push(l.get(ie)));break;case"delete":S(e)||(i.push(l.get(le)),E(e)&&i.push(l.get(ie)));break;case"set":E(e)&&i.push(l.get(le))}if(1===i.length)i[0]&&ge(i[0]);else{const e=[];for(const t of i)t&&e.push(...t);ge(Q(e))}}function ge(e,t){const n=S(e)?e:[...e];for(const o of n)o.computed&&_e(o);for(const o of n)o.computed||_e(o)}function _e(e,t){(e!==se||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const ye=t("__proto__,__v_isRef,__isVue"),be=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(R)),Ce=Ae(),xe=Ae(!1,!0),we=Ae(!0),Se=Ae(!0,!0),Ee=ke();function ke(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=ht(this);for(let t=0,r=this.length;t<r;t++)he(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(ht)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){pe();const n=ht(this)[t].apply(this,e);return de(),n}})),e}function Ae(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?rt:ot:t?nt:tt).get(n))return n;const s=S(n);if(!e&&s&&w(Ee,o))return Reflect.get(Ee,o,r);const l=Reflect.get(n,o,r);return(R(o)?be.has(o):ye(o))?l:(e||he(n,0,o),t?l:bt(l)?s&&B(o)?l:l.value:O(l)?e?ct(l):lt(l):l)}}function Te(e=!1){return function(t,n,o,r){let s=t[n];if(ft(s)&&bt(s)&&!bt(o))return!1;if(!e&&!ft(o)&&(pt(o)||(o=ht(o),s=ht(s)),!S(t)&&bt(s)&&!bt(o)))return s.value=o,!0;const l=S(t)&&B(n)?Number(n)<t.length:w(t,n),i=Reflect.set(t,n,o,r);return t===ht(r)&&(l?W(o,s)&&ve(t,"set",n,o):ve(t,"add",n,o)),i}}const Fe={get:Ce,set:Te(),deleteProperty:function(e,t){const n=w(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&ve(e,"delete",t,void 0),o},has:function(e,t){const n=Reflect.has(e,t);return R(t)&&be.has(t)||he(e,0,t),n},ownKeys:function(e){return he(e,0,S(e)?"length":le),Reflect.ownKeys(e)}},Re={get:we,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Oe=b({},Fe,{get:xe,set:Te(!0)}),Pe=b({},Re,{get:Se}),Me=e=>e,Ne=e=>Reflect.getPrototypeOf(e);function Ve(e,t,n=!1,o=!1){const r=ht(e=e.__v_raw),s=ht(t);n||(t!==s&&he(r,0,t),he(r,0,s));const{has:l}=Ne(r),i=o?Me:n?gt:vt;return l.call(r,t)?i(e.get(t)):l.call(r,s)?i(e.get(s)):void(e!==r&&e.get(t))}function Be(e,t=!1){const n=this.__v_raw,o=ht(n),r=ht(e);return t||(e!==r&&he(o,0,e),he(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function Le(e,t=!1){return e=e.__v_raw,!t&&he(ht(e),0,le),Reflect.get(e,"size",e)}function Ie(e){e=ht(e);const t=ht(this);return Ne(t).has.call(t,e)||(t.add(e),ve(t,"add",e,e)),this}function $e(e,t){t=ht(t);const n=ht(this),{has:o,get:r}=Ne(n);let s=o.call(n,e);s||(e=ht(e),s=o.call(n,e));const l=r.call(n,e);return n.set(e,t),s?W(t,l)&&ve(n,"set",e,t):ve(n,"add",e,t),this}function je(e){const t=ht(this),{has:n,get:o}=Ne(t);let r=n.call(t,e);r||(e=ht(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&ve(t,"delete",e,void 0),s}function Ue(){const e=ht(this),t=0!==e.size,n=e.clear();return t&&ve(e,"clear",void 0,void 0),n}function De(e,t){return function(n,o){const r=this,s=r.__v_raw,l=ht(s),i=t?Me:e?gt:vt;return!e&&he(l,0,le),s.forEach(((e,t)=>n.call(o,i(e),i(t),r)))}}function He(e,t,n){return function(...o){const r=this.__v_raw,s=ht(r),l=E(s),i="entries"===e||e===Symbol.iterator&&l,c="keys"===e&&l,a=r[e](...o),u=n?Me:t?gt:vt;return!t&&he(s,0,c?ie:le),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:i?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function ze(e){return function(...t){return"delete"!==e&&this}}function We(){const e={get(e){return Ve(this,e)},get size(){return Le(this)},has:Be,add:Ie,set:$e,delete:je,clear:Ue,forEach:De(!1,!1)},t={get(e){return Ve(this,e,!1,!0)},get size(){return Le(this)},has:Be,add:Ie,set:$e,delete:je,clear:Ue,forEach:De(!1,!0)},n={get(e){return Ve(this,e,!0)},get size(){return Le(this,!0)},has(e){return Be.call(this,e,!0)},add:ze("add"),set:ze("set"),delete:ze("delete"),clear:ze("clear"),forEach:De(!0,!1)},o={get(e){return Ve(this,e,!0,!0)},get size(){return Le(this,!0)},has(e){return Be.call(this,e,!0)},add:ze("add"),set:ze("set"),delete:ze("delete"),clear:ze("clear"),forEach:De(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=He(r,!1,!1),n[r]=He(r,!0,!1),t[r]=He(r,!1,!0),o[r]=He(r,!0,!0)})),[e,n,t,o]}const[Ke,Ge,qe,Je]=We();function Ye(e,t){const n=t?e?Je:qe:e?Ge:Ke;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(w(n,o)&&o in t?n:t,o,r)}const Xe={get:Ye(!1,!1)},Ze={get:Ye(!1,!0)},Qe={get:Ye(!0,!1)},et={get:Ye(!0,!0)},tt=new WeakMap,nt=new WeakMap,ot=new WeakMap,rt=new WeakMap;function st(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>N(e).slice(8,-1))(e))}function lt(e){return ft(e)?e:at(e,!1,Fe,Xe,tt)}function it(e){return at(e,!1,Oe,Ze,nt)}function ct(e){return at(e,!0,Re,Qe,ot)}function at(e,t,n,o,r){if(!O(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const l=st(e);if(0===l)return e;const i=new Proxy(e,2===l?o:n);return r.set(e,i),i}function ut(e){return ft(e)?ut(e.__v_raw):!(!e||!e.__v_isReactive)}function ft(e){return!(!e||!e.__v_isReadonly)}function pt(e){return!(!e||!e.__v_isShallow)}function dt(e){return ut(e)||ft(e)}function ht(e){const t=e&&e.__v_raw;return t?ht(t):e}function mt(e){return G(e,"__v_skip",!0),e}const vt=e=>O(e)?lt(e):e,gt=e=>O(e)?ct(e):e;function _t(e){ue&&se&&me((e=ht(e)).dep||(e.dep=Q()))}function yt(e,t){(e=ht(e)).dep&&ge(e.dep)}function bt(e){return!(!e||!0!==e.__v_isRef)}function Ct(e){return xt(e,!1)}function xt(e,t){return bt(e)?e:new wt(e,t)}class wt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:ht(e),this._value=t?e:vt(e)}get value(){return _t(this),this._value}set value(e){e=this.__v_isShallow?e:ht(e),W(e,this._rawValue)&&(this._rawValue=e,this._value=this.__v_isShallow?e:vt(e),yt(this))}}function St(e){return bt(e)?e.value:e}const Et={get:(e,t,n)=>St(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return bt(r)&&!bt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function kt(e){return ut(e)?e:new Proxy(e,Et)}class At{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>_t(this)),(()=>yt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}class Tt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}}function Ft(e,t,n){const o=e[t];return bt(o)?o:new Tt(e,t,n)}class Rt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new ce(e,(()=>{this._dirty||(this._dirty=!0,yt(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=ht(this);return _t(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}const Ot=[];function Pt(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach((n=>{t.push(...Mt(n,e[n]))})),n.length>3&&t.push(" ..."),t}function Mt(e,t,n){return F(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):"number"==typeof t||"boolean"==typeof t||null==t?n?t:[`${e}=${t}`]:bt(t)?(t=Mt(e,ht(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):T(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ht(t),n?t:[`${e}=`,t])}function Nt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){Bt(s,t,n)}return r}function Vt(e,t,n,o){if(T(e)){const r=Nt(e,t,n,o);return r&&P(r)&&r.catch((e=>{Bt(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Vt(e[s],t,n,o));return r}function Bt(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=n;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const l=t.appContext.config.errorHandler;if(l)return void Nt(l,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let Lt=!1,It=!1;const $t=[];let jt=0;const Ut=[];let Dt=null,Ht=0;const zt=[];let Wt=null,Kt=0;const Gt=Promise.resolve();let qt=null,Jt=null;function Yt(e){const t=qt||Gt;return e?t.then(this?e.bind(this):e):t}function Xt(e){$t.length&&$t.includes(e,Lt&&e.allowRecurse?jt+1:jt)||e===Jt||(null==e.id?$t.push(e):$t.splice(function(e){let t=jt+1,n=$t.length;for(;t<n;){const o=t+n>>>1;on($t[o])<e?t=o+1:n=o}return t}(e.id),0,e),Zt())}function Zt(){Lt||It||(It=!0,qt=Gt.then(rn))}function Qt(e,t,n,o){S(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),Zt()}function en(e){Qt(e,Wt,zt,Kt)}function tn(e,t=null){if(Ut.length){for(Jt=t,Dt=[...new Set(Ut)],Ut.length=0,Ht=0;Ht<Dt.length;Ht++)Dt[Ht]();Dt=null,Ht=0,Jt=null,tn(e,t)}}function nn(e){if(tn(),zt.length){const e=[...new Set(zt)];if(zt.length=0,Wt)return void Wt.push(...e);for(Wt=e,Wt.sort(((e,t)=>on(e)-on(t))),Kt=0;Kt<Wt.length;Kt++)Wt[Kt]();Wt=null,Kt=0}}const on=e=>null==e.id?1/0:e.id;function rn(e){It=!1,Lt=!0,tn(e),$t.sort(((e,t)=>on(e)-on(t)));try{for(jt=0;jt<$t.length;jt++){const e=$t[jt];e&&!1!==e.active&&Nt(e,null,14)}}finally{jt=0,$t.length=0,nn(),Lt=!1,qt=null,($t.length||Ut.length||zt.length)&&rn(e)}}let sn=[];function ln(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||d;let r=n;const s=t.startsWith("update:"),l=s&&t.slice(7);if(l&&l in o){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:t,trim:s}=o[e]||d;s&&(r=n.map((e=>e.trim()))),t&&(r=n.map(q))}let i,c=o[i=z(t)]||o[i=z(j(t))];!c&&s&&(c=o[i=z(D(t))]),c&&Vt(c,e,6,r);const a=o[i+"Once"];if(a){if(e.emitted){if(e.emitted[i])return}else e.emitted={};e.emitted[i]=!0,Vt(a,e,6,r)}}function cn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let l={},i=!1;if(!T(e)){const o=e=>{const n=cn(e,t,!0);n&&(i=!0,b(l,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||i?(S(s)?s.forEach((e=>l[e]=null)):b(l,s),o.set(e,l),l):(o.set(e,null),null)}function an(e,t){return!(!e||!_(t))&&(t=t.slice(2).replace(/Once$/,""),w(e,t[0].toLowerCase()+t.slice(1))||w(e,D(t))||w(e,t))}let un=null,fn=null;function pn(e){const t=un;return un=e,fn=e&&e.type.__scopeId||null,t}function dn(e,t=un,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&xr(-1);const r=pn(t),s=e(...n);return pn(r),o._d&&xr(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function hn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:i,attrs:c,emit:a,render:u,renderCache:f,data:p,setupState:d,ctx:h,inheritAttrs:m}=e;let v,g;const _=pn(e);try{if(4&n.shapeFlag){const e=r||o;v=Vr(u.call(e,e,f,s,d,p,h)),g=c}else{const e=t;0,v=Vr(e(s,e.length>1?{attrs:c,slots:i,emit:a}:null)),g=t.props?c:mn(c)}}catch(C){gr.length=0,Bt(C,e,1),v=Or(mr)}let b=v;if(g&&!1!==m){const e=Object.keys(g),{shapeFlag:t}=b;e.length&&7&t&&(l&&e.some(y)&&(g=vn(g,l)),b=Mr(b,g))}return n.dirs&&(b=Mr(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),v=b,pn(_),v}const mn=e=>{let t;for(const n in e)("class"===n||"style"===n||_(n))&&((t||(t={}))[n]=e[n]);return t},vn=(e,t)=>{const n={};for(const o in e)y(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function gn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!an(n,s))return!0}return!1}function _n({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const yn=e=>e.__isSuspense,bn={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,l,i,c,a){null==e?function(e,t,n,o,r,s,l,i,c){const{p:a,o:{createElement:u}}=c,f=u("div"),p=e.suspense=xn(e,r,o,t,f,n,s,l,i,c);a(null,p.pendingBranch=e.ssContent,f,null,o,p,s,l),p.deps>0?(Cn(e,"onPending"),Cn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,l),En(p,e.ssFallback)):p.resolve()}(t,n,o,r,s,l,i,c,a):function(e,t,n,o,r,s,l,i,{p:c,um:a,o:{createElement:u}}){const f=t.suspense=e.suspense;f.vnode=t,t.el=e.el;const p=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:v,isHydrating:g}=f;if(m)f.pendingBranch=p,kr(p,m)?(c(m,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0?f.resolve():v&&(c(h,d,n,o,r,null,s,l,i),En(f,d))):(f.pendingId++,g?(f.isHydrating=!1,f.activeBranch=m):a(m,r,f),f.deps=0,f.effects.length=0,f.hiddenContainer=u("div"),v?(c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0?f.resolve():(c(h,d,n,o,r,null,s,l,i),En(f,d))):h&&kr(p,h)?(c(h,p,n,o,r,f,s,l,i),f.resolve(!0)):(c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0&&f.resolve()));else if(h&&kr(p,h))c(h,p,n,o,r,f,s,l,i),En(f,p);else if(Cn(t,"onPending"),f.pendingBranch=p,f.pendingId++,c(null,p,f.hiddenContainer,null,r,f,s,l,i),f.deps<=0)f.resolve();else{const{timeout:e,pendingId:t}=f;e>0?setTimeout((()=>{f.pendingId===t&&f.fallback(d)}),e):0===e&&f.fallback(d)}}(e,t,n,o,r,l,i,c,a)},hydrate:function(e,t,n,o,r,s,l,i,c){const a=t.suspense=xn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,l,i,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,l);0===a.deps&&a.resolve();return u},create:xn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=wn(o?n.default:n),e.ssFallback=o?wn(n.fallback):Or(mr)}};function Cn(e,t){const n=e.props&&e.props[t];T(n)&&n()}function xn(e,t,n,o,r,s,l,i,c,a,u=!1){const{p:f,m:p,um:d,n:h,o:{parentNode:m,remove:v}}=a,g=q(e.props&&e.props.timeout),_={vnode:e,parent:t,parentComponent:n,isSVG:l,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof g?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1){const{vnode:t,activeBranch:n,pendingBranch:o,pendingId:r,effects:s,parentComponent:l,container:i}=_;if(_.isHydrating)_.isHydrating=!1;else if(!e){const e=n&&o.transition&&"out-in"===o.transition.mode;e&&(n.transition.afterLeave=()=>{r===_.pendingId&&p(o,i,t,0)});let{anchor:t}=_;n&&(t=h(n),d(n,l,_,!0)),e||p(o,i,t,0)}En(_,o),_.pendingBranch=null,_.isInFallback=!1;let c=_.parent,a=!1;for(;c;){if(c.pendingBranch){c.effects.push(...s),a=!0;break}c=c.parent}a||en(s),_.effects=[],Cn(t,"onResolve")},fallback(e){if(!_.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=_;Cn(t,"onFallback");const l=h(n),a=()=>{_.isInFallback&&(f(null,e,r,l,o,null,s,i,c),En(_,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),_.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){_.activeBranch&&p(_.activeBranch,e,t,n),_.container=e},next:()=>_.activeBranch&&h(_.activeBranch),registerDep(e,t){const n=!!_.pendingBranch;n&&_.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{Bt(t,e,0)})).then((r=>{if(e.isUnmounted||_.isUnmounted||_.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;Yr(e,r,!1),o&&(s.el=o);const i=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),_,l,c),i&&v(i),_n(e,s.el),n&&0==--_.deps&&_.resolve()}))},unmount(e,t){_.isUnmounted=!0,_.activeBranch&&d(_.activeBranch,n,e,t),_.pendingBranch&&d(_.pendingBranch,n,e,t)}};return _}function wn(e){let t;if(T(e)){const n=Cr&&e._c;n&&(e._d=!1,yr()),e=e(),n&&(e._d=!0,t=_r,br())}if(S(e)){const t=function(e){let t;for(let n=0;n<e.length;n++){const o=e[n];if(!Er(o))return;if(o.type!==mr||"v-if"===o.children){if(t)return;t=o}}return t}(e);e=t}return e=Vr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Sn(e,t){t&&t.pendingBranch?S(e)?t.effects.push(...e):t.effects.push(e):en(e)}function En(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,_n(o,r))}function kn(e,t){if(Dr){let n=Dr.provides;const o=Dr.parent&&Dr.parent.provides;o===n&&(n=Dr.provides=Object.create(o)),n[e]=t}else;}function An(e,t,n=!1){const o=Dr||un;if(o){const r=null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&T(t)?t.call(o.proxy):t}}function Tn(e,t){return On(e,null,{flush:"post"})}const Fn={};function Rn(e,t,n){return On(e,t,n)}function On(e,t,{immediate:n,deep:o,flush:r}=d){const s=Dr;let l,i,c=!1,a=!1;if(bt(e)?(l=()=>e.value,c=pt(e)):ut(e)?(l=()=>e,o=!0):S(e)?(a=!0,c=e.some((e=>ut(e)||pt(e))),l=()=>e.map((e=>bt(e)?e.value:ut(e)?Nn(e):T(e)?Nt(e,s,2):void 0))):l=T(e)?t?()=>Nt(e,s,2):()=>{if(!s||!s.isUnmounted)return i&&i(),Vt(e,s,3,[u])}:m,t&&o){const e=l;l=()=>Nn(e())}let u=e=>{i=v.onStop=()=>{Nt(e,s,4)}},f=a?[]:Fn;const p=()=>{if(v.active)if(t){const e=v.run();(o||c||(a?e.some(((e,t)=>W(e,f[t]))):W(e,f)))&&(i&&i(),Vt(t,s,3,[e,f===Fn?void 0:f,u]),f=e)}else v.run()};let h;p.allowRecurse=!!t,h="sync"===r?p:"post"===r?()=>nr(p,s&&s.suspense):()=>function(e){Qt(e,Dt,Ut,Ht)}(p);const v=new ce(l,h);return t?n?p():f=v.run():"post"===r?nr(v.run.bind(v),s&&s.suspense):v.run(),()=>{v.stop(),s&&s.scope&&C(s.scope.effects,v)}}function Pn(e,t,n){const o=this.proxy,r=F(e)?e.includes(".")?Mn(o,e):()=>o[e]:e.bind(o,o);let s;T(t)?s=t:(s=t.handler,n=t);const l=Dr;zr(this);const i=On(r,s.bind(o),n);return l?zr(l):Wr(),i}function Mn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Nn(e,t){if(!O(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),bt(e))Nn(e.value,t);else if(S(e))for(let n=0;n<e.length;n++)Nn(e[n],t);else if(k(e)||E(e))e.forEach((e=>{Nn(e,t)}));else if(V(e))for(const n in e)Nn(e[n],t);return e}function Vn(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return so((()=>{e.isMounted=!0})),co((()=>{e.isUnmounting=!0})),e}const Bn=[Function,Array],Ln={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Bn,onEnter:Bn,onAfterEnter:Bn,onEnterCancelled:Bn,onBeforeLeave:Bn,onLeave:Bn,onAfterLeave:Bn,onLeaveCancelled:Bn,onBeforeAppear:Bn,onAppear:Bn,onAfterAppear:Bn,onAppearCancelled:Bn},setup(e,{slots:t}){const n=Hr(),o=Vn();let r;return()=>{const s=t.default&&Hn(t.default(),!0);if(!s||!s.length)return;let l=s[0];if(s.length>1)for(const e of s)if(e.type!==mr){l=e;break}const i=ht(e),{mode:c}=i;if(o.isLeaving)return jn(l);const a=Un(l);if(!a)return jn(l);const u=$n(a,i,o,n);Dn(a,u);const f=n.subTree,p=f&&Un(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==mr&&(!kr(a,p)||d)){const e=$n(p,i,o,n);if(Dn(p,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},jn(l);"in-out"===c&&a.type!==mr&&(e.delayLeave=(e,t,n)=>{In(o,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return l}}};function In(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function $n(e,t,n,o){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:i,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:m,onAppear:v,onAfterAppear:g,onAppearCancelled:_}=t,y=String(e.key),b=In(n,e),C=(e,t)=>{e&&Vt(e,o,9,t)},x=(e,t)=>{const n=t[1];C(e,t),S(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},w={mode:s,persisted:l,beforeEnter(t){let o=i;if(!n.isMounted){if(!r)return;o=m||i}t._leaveCb&&t._leaveCb(!0);const s=b[y];s&&kr(e,s)&&s.el._leaveCb&&s.el._leaveCb(),C(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=v||c,o=g||a,s=_||u}let l=!1;const i=e._enterCb=t=>{l||(l=!0,C(t?s:o,[e]),w.delayedLeave&&w.delayedLeave(),e._enterCb=void 0)};t?x(t,[e,i]):i()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();C(f,[t]);let s=!1;const l=t._leaveCb=n=>{s||(s=!0,o(),C(n?h:d,[t]),t._leaveCb=void 0,b[r]===e&&delete b[r])};b[r]=e,p?x(p,[t,l]):l()},clone:e=>$n(e,t,n,o)};return w}function jn(e){if(Gn(e))return(e=Mr(e)).children=null,e}function Un(e){return Gn(e)?e.children?e.children[0]:void 0:e}function Dn(e,t){6&e.shapeFlag&&e.component?Dn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Hn(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let l=e[s];const i=null==n?l.key:String(n)+String(null!=l.key?l.key:s);l.type===dr?(128&l.patchFlag&&r++,o=o.concat(Hn(l.children,t,i))):(t||l.type!==mr)&&o.push(null!=i?Mr(l,{key:i}):l)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}function zn(e){return T(e)?{setup:e,name:e.name}:e}const Wn=e=>!!e.type.__asyncLoader;function Kn(e,{vnode:{ref:t,props:n,children:o}}){const r=Or(e,n,o);return r.ref=t,r}const Gn=e=>e.type.__isKeepAlive,qn={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Hr(),o=n.ctx,r=new Map,s=new Set;let l=null;const i=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:f}}}=o,p=f("div");function d(e){eo(e),u(e,n,i,!0)}function h(e){r.forEach(((t,n)=>{const o=ts(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);l&&t.type===l.type?l&&eo(l):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,i),c(s.vnode,e,t,n,s,i,o,e.slotScopeIds,r),nr((()=>{s.isDeactivated=!1,s.a&&K(s.a);const t=e.props&&e.props.onVnodeMounted;t&&$r(t,s.parent,e)}),i)},o.deactivate=e=>{const t=e.component;a(e,p,null,1,i),nr((()=>{t.da&&K(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&$r(n,t.parent,e),t.isDeactivated=!0}),i)},Rn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Jn(e,t))),t&&h((e=>!Jn(t,e)))}),{flush:"post",deep:!0});let v=null;const g=()=>{null!=v&&r.set(v,to(n.subTree))};return so(g),io(g),co((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=to(t);if(e.type!==r.type)d(e);else{eo(r);const e=r.component.da;e&&nr(e,o)}}))})),()=>{if(v=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return l=null,n;if(!(Er(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return l=null,o;let i=to(o);const c=i.type,a=ts(Wn(i)?i.type.__asyncResolved||{}:c),{include:u,exclude:f,max:p}=e;if(u&&(!a||!Jn(u,a))||f&&a&&Jn(f,a))return l=i,o;const d=null==i.key?c:i.key,h=r.get(d);return i.el&&(i=Mr(i),128&o.shapeFlag&&(o.ssContent=i)),v=d,h?(i.el=h.el,i.component=h.component,i.transition&&Dn(i,i.transition),i.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),i.shapeFlag|=256,l=i,yn(o.type)?o:i}}};function Jn(e,t){return S(e)?e.some((e=>Jn(e,t))):F(e)?e.split(",").includes(t):!!e.test&&e.test(t)}function Yn(e,t){Zn(e,"a",t)}function Xn(e,t){Zn(e,"da",t)}function Zn(e,t,n=Dr){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(no(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Gn(e.parent.vnode)&&Qn(o,t,n,e),e=e.parent}}function Qn(e,t,n,o){const r=no(t,e,o,!0);ao((()=>{C(o[t],r)}),n)}function eo(e){let t=e.shapeFlag;256&t&&(t-=256),512&t&&(t-=512),e.shapeFlag=t}function to(e){return 128&e.shapeFlag?e.ssContent:e}function no(e,t,n=Dr,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;pe(),zr(n);const r=Vt(t,n,e,o);return Wr(),de(),r});return o?r.unshift(s):r.push(s),s}}const oo=e=>(t,n=Dr)=>(!Jr||"sp"===e)&&no(e,t,n),ro=oo("bm"),so=oo("m"),lo=oo("bu"),io=oo("u"),co=oo("bum"),ao=oo("um"),uo=oo("sp"),fo=oo("rtg"),po=oo("rtc");function ho(e,t=Dr){no("ec",e,t)}function mo(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let l=0;l<r.length;l++){const i=r[l];s&&(i.oldValue=s[l].value);let c=i.dir[o];c&&(pe(),Vt(c,n,8,[e.el,i,e,t]),de())}}const vo="components";const go=Symbol();function _o(e,t,n=!0,o=!1){const r=un||Dr;if(r){const n=r.type;if(e===vo){const e=ts(n);if(e&&(e===t||e===j(t)||e===H(j(t))))return n}const s=yo(r[e]||n[e],t)||yo(r.appContext[e],t);return!s&&o?n:s}}function yo(e,t){return e&&(e[t]||e[j(t)]||e[H(j(t))])}function bo(e){return e.some((e=>!Er(e)||e.type!==mr&&!(e.type===dr&&!bo(e.children))))?e:null}const Co=e=>e?Kr(e)?Qr(e)||e.proxy:Co(e.parent):null,xo=b(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Co(e.parent),$root:e=>Co(e.root),$emit:e=>e.emit,$options:e=>Fo(e),$forceUpdate:e=>e.f||(e.f=()=>Xt(e.update)),$nextTick:e=>e.n||(e.n=Yt.bind(e.proxy)),$watch:e=>Pn.bind(e)}),wo={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:l,type:i,appContext:c}=e;let a;if("$"!==t[0]){const i=l[t];if(void 0!==i)switch(i){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(o!==d&&w(o,t))return l[t]=1,o[t];if(r!==d&&w(r,t))return l[t]=2,r[t];if((a=e.propsOptions[0])&&w(a,t))return l[t]=3,s[t];if(n!==d&&w(n,t))return l[t]=4,n[t];Eo&&(l[t]=0)}}const u=xo[t];let f,p;return u?("$attrs"===t&&he(e,0,t),u(e)):(f=i.__cssModules)&&(f=f[t])?f:n!==d&&w(n,t)?(l[t]=4,n[t]):(p=c.config.globalProperties,w(p,t)?p[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return r!==d&&w(r,t)?(r[t]=n,!0):o!==d&&w(o,t)?(o[t]=n,!0):!w(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},l){let i;return!!n[l]||e!==d&&w(e,l)||t!==d&&w(t,l)||(i=s[0])&&w(i,l)||w(o,l)||w(xo,l)||w(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:w(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},So=b({},wo,{get(e,t){if(t!==Symbol.unscopables)return wo.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!n(t)});let Eo=!0;function ko(e){const t=Fo(e),n=e.proxy,o=e.ctx;Eo=!1,t.beforeCreate&&Ao(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:l,watch:i,provide:c,inject:a,created:u,beforeMount:f,mounted:p,beforeUpdate:d,updated:h,activated:v,deactivated:g,beforeUnmount:_,unmounted:y,render:b,renderTracked:C,renderTriggered:x,errorCaptured:w,serverPrefetch:E,expose:k,inheritAttrs:A,components:F,directives:R}=t;if(a&&function(e,t,n=m,o=!1){S(e)&&(e=Mo(e));for(const r in e){const n=e[r];let s;s=O(n)?"default"in n?An(n.from||r,n.default,!0):An(n.from||r):An(n),bt(s)&&o?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e}):t[r]=s}}(a,o,null,e.appContext.config.unwrapInjectedRef),l)for(const m in l){const e=l[m];T(e)&&(o[m]=e.bind(n))}if(r){const t=r.call(n,n);O(t)&&(e.data=lt(t))}if(Eo=!0,s)for(const S in s){const e=s[S],t=T(e)?e.bind(n,n):T(e.get)?e.get.bind(n,n):m,r=!T(e)&&T(e.set)?e.set.bind(n):m,l=os({get:t,set:r});Object.defineProperty(o,S,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(i)for(const m in i)To(i[m],o,n,m);if(c){const e=T(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{kn(t,e[t])}))}function P(e,t){S(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&Ao(u,e,"c"),P(ro,f),P(so,p),P(lo,d),P(io,h),P(Yn,v),P(Xn,g),P(ho,w),P(po,C),P(fo,x),P(co,_),P(ao,y),P(uo,E),S(k))if(k.length){const t=e.exposed||(e.exposed={});k.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});b&&e.render===m&&(e.render=b),null!=A&&(e.inheritAttrs=A),F&&(e.components=F),R&&(e.directives=R)}function Ao(e,t,n){Vt(S(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function To(e,t,n,o){const r=o.includes(".")?Mn(n,o):()=>n[o];if(F(e)){const n=t[e];T(n)&&Rn(r,n)}else if(T(e))Rn(r,e.bind(n));else if(O(e))if(S(e))e.forEach((e=>To(e,t,n,o)));else{const o=T(e.handler)?e.handler.bind(n):t[e.handler];T(o)&&Rn(r,o,e)}}function Fo(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:l}}=e.appContext,i=s.get(t);let c;return i?c=i:r.length||n||o?(c={},r.length&&r.forEach((e=>Ro(c,e,l,!0))),Ro(c,t,l)):c=t,s.set(t,c),c}function Ro(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Ro(e,s,n,!0),r&&r.forEach((t=>Ro(e,t,n,!0)));for(const l in t)if(o&&"expose"===l);else{const o=Oo[l]||n&&n[l];e[l]=o?o(e[l],t[l]):t[l]}return e}const Oo={data:Po,props:Vo,emits:Vo,methods:Vo,computed:Vo,beforeCreate:No,created:No,beforeMount:No,mounted:No,beforeUpdate:No,updated:No,beforeDestroy:No,beforeUnmount:No,destroyed:No,unmounted:No,activated:No,deactivated:No,errorCaptured:No,serverPrefetch:No,components:Vo,directives:Vo,watch:function(e,t){if(!e)return t;if(!t)return e;const n=b(Object.create(null),e);for(const o in t)n[o]=No(e[o],t[o]);return n},provide:Po,inject:function(e,t){return Vo(Mo(e),Mo(t))}};function Po(e,t){return t?e?function(){return b(T(e)?e.call(this,this):e,T(t)?t.call(this,this):t)}:t:e}function Mo(e){if(S(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function No(e,t){return e?[...new Set([].concat(e,t))]:t}function Vo(e,t){return e?b(b(Object.create(null),e),t):t}function Bo(e,t,n,o){const[r,s]=e.propsOptions;let l,i=!1;if(t)for(let c in t){if(L(c))continue;const a=t[c];let u;r&&w(r,u=j(c))?s&&s.includes(u)?(l||(l={}))[u]=a:n[u]=a:an(e.emitsOptions,c)||c in o&&a===o[c]||(o[c]=a,i=!0)}if(s){const t=ht(n),o=l||d;for(let l=0;l<s.length;l++){const i=s[l];n[i]=Lo(r,t,i,o[i],e,!w(o,i))}}return i}function Lo(e,t,n,o,r,s){const l=e[n];if(null!=l){const e=w(l,"default");if(e&&void 0===o){const e=l.default;if(l.type!==Function&&T(e)){const{propsDefaults:s}=r;n in s?o=s[n]:(zr(r),o=s[n]=e.call(null,t),Wr())}else o=e}l[0]&&(s&&!e?o=!1:!l[1]||""!==o&&o!==D(n)||(o=!0))}return o}function Io(e,t,n=!1){const o=t.propsCache,r=o.get(e);if(r)return r;const s=e.props,l={},i=[];let c=!1;if(!T(e)){const o=e=>{c=!0;const[n,o]=Io(e,t,!0);b(l,n),o&&i.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!c)return o.set(e,h),h;if(S(s))for(let u=0;u<s.length;u++){const e=j(s[u]);$o(e)&&(l[e]=d)}else if(s)for(const u in s){const e=j(u);if($o(e)){const t=s[u],n=l[e]=S(t)||T(t)?{type:t}:t;if(n){const t=Do(Boolean,n.type),o=Do(String,n.type);n[0]=t>-1,n[1]=o<0||t<o,(t>-1||w(n,"default"))&&i.push(e)}}}const a=[l,i];return o.set(e,a),a}function $o(e){return"$"!==e[0]}function jo(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function Uo(e,t){return jo(e)===jo(t)}function Do(e,t){return S(t)?t.findIndex((t=>Uo(t,e))):T(t)&&Uo(t,e)?0:-1}const Ho=e=>"_"===e[0]||"$stable"===e,zo=e=>S(e)?e.map(Vr):[Vr(e)],Wo=(e,t,n)=>{if(t._n)return t;const o=dn(((...e)=>zo(t(...e))),n);return o._c=!1,o},Ko=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Ho(r))continue;const n=e[r];if(T(n))t[r]=Wo(0,n,o);else if(null!=n){const e=zo(n);t[r]=()=>e}}},Go=(e,t)=>{const n=zo(t);e.slots.default=()=>n};function qo(){return{app:null,config:{isNativeTag:v,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Jo=0;function Yo(e,t){return function(n,o=null){T(n)||(n=Object.assign({},n)),null==o||O(o)||(o=null);const r=qo(),s=new Set;let l=!1;const i=r.app={_uid:Jo++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:cs,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&T(e.install)?(s.add(e),e.install(i,...t)):T(e)&&(s.add(e),e(i,...t))),i),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),i),component:(e,t)=>t?(r.components[e]=t,i):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,i):r.directives[e],mount(s,c,a){if(!l){const u=Or(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),l=!0,i._container=s,s.__vue_app__=i,Qr(u.component)||u.component.proxy}},unmount(){l&&(e(null,i._container),delete i._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,i)};return i}}function Xo(e,t,n,o,r=!1){if(S(e))return void e.forEach(((e,s)=>Xo(e,t&&(S(t)?t[s]:t),n,o,r)));if(Wn(o)&&!r)return;const s=4&o.shapeFlag?Qr(o.component)||o.component.proxy:o.el,l=r?null:s,{i:i,r:c}=e,a=t&&t.r,u=i.refs===d?i.refs={}:i.refs,f=i.setupState;if(null!=a&&a!==c&&(F(a)?(u[a]=null,w(f,a)&&(f[a]=null)):bt(a)&&(a.value=null)),T(c))Nt(c,i,12,[l,u]);else{const t=F(c),o=bt(c);if(t||o){const o=()=>{if(e.f){const n=t?u[c]:c.value;r?S(n)&&C(n,s):S(n)?n.includes(s)||n.push(s):t?(u[c]=[s],w(f,c)&&(f[c]=u[c])):(c.value=[s],e.k&&(u[e.k]=c.value))}else t?(u[c]=l,w(f,c)&&(f[c]=l)):bt(c)&&(c.value=l,e.k&&(u[e.k]=l))};l?(o.id=-1,nr(o,n)):o()}}}let Zo=!1;const Qo=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,er=e=>8===e.nodeType;function tr(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:l,remove:i,insert:c,createComment:a}}=e,u=(n,o,i,a,v,g=!1)=>{const _=er(n)&&"["===n.data,y=()=>h(n,o,i,a,v,_),{type:b,ref:C,shapeFlag:x,patchFlag:w}=o,S=n.nodeType;o.el=n,-2===w&&(g=!1,o.dynamicChildren=null);let E=null;switch(b){case hr:3!==S?""===o.children?(c(o.el=r(""),l(n),n),E=n):E=y():(n.data!==o.children&&(Zo=!0,n.data=o.children),E=s(n));break;case mr:E=8!==S||_?y():s(n);break;case vr:if(1===S){E=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=E.outerHTML),t===o.staticCount-1&&(o.anchor=E),E=s(E);return E}E=y();break;case dr:E=_?d(n,o,i,a,v,g):y();break;default:if(1&x)E=1!==S||o.type.toLowerCase()!==n.tagName.toLowerCase()?y():f(n,o,i,a,v,g);else if(6&x){o.slotScopeIds=v;const e=l(n);if(t(o,e,null,i,a,Qo(e),g),E=_?m(n):s(n),E&&er(E)&&"teleport end"===E.data&&(E=s(E)),Wn(o)){let t;_?(t=Or(dr),t.anchor=E?E.previousSibling:e.lastChild):t=3===n.nodeType?Nr(""):Or("div"),t.el=n,o.component.subTree=t}}else 64&x?E=8!==S?y():o.type.hydrate(n,o,i,a,v,g,e,p):128&x&&(E=o.type.hydrate(n,o,i,a,Qo(l(n)),v,g,e,u))}return null!=C&&Xo(C,null,a,o),E},f=(e,t,n,r,s,l)=>{l=l||!!t.dynamicChildren;const{type:c,props:a,patchFlag:u,shapeFlag:f,dirs:d}=t,h="input"===c&&d||"option"===c;if(h||-1!==u){if(d&&mo(t,null,n,"created"),a)if(h||!l||48&u)for(const t in a)(h&&t.endsWith("value")||_(t)&&!L(t))&&o(e,t,null,a[t],!1,void 0,n);else a.onClick&&o(e,"onClick",null,a.onClick,!1,void 0,n);let c;if((c=a&&a.onVnodeBeforeMount)&&$r(c,n,t),d&&mo(t,null,n,"beforeMount"),((c=a&&a.onVnodeMounted)||d)&&Sn((()=>{c&&$r(c,n,t),d&&mo(t,null,n,"mounted")}),r),16&f&&(!a||!a.innerHTML&&!a.textContent)){let o=p(e.firstChild,t,e,n,r,s,l);for(;o;){Zo=!0;const e=o;o=o.nextSibling,i(e)}}else 8&f&&e.textContent!==t.children&&(Zo=!0,e.textContent=t.children)}return e.nextSibling},p=(e,t,o,r,s,l,i)=>{i=i||!!t.dynamicChildren;const c=t.children,a=c.length;for(let f=0;f<a;f++){const t=i?c[f]:c[f]=Vr(c[f]);if(e)e=u(e,t,r,s,l,i);else{if(t.type===hr&&!t.children)continue;Zo=!0,n(null,t,o,null,r,s,Qo(o),l)}}return e},d=(e,t,n,o,r,i)=>{const{slotScopeIds:u}=t;u&&(r=r?r.concat(u):u);const f=l(e),d=p(s(e),t,f,n,o,r,i);return d&&er(d)&&"]"===d.data?s(t.anchor=d):(Zo=!0,c(t.anchor=a("]"),f,d),d)},h=(e,t,o,r,c,a)=>{if(Zo=!0,t.el=null,a){const t=m(e);for(;;){const n=s(e);if(!n||n===t)break;i(n)}}const u=s(e),f=l(e);return i(e),n(null,t,f,u,o,r,Qo(f),c),u},m=e=>{let t=0;for(;e;)if((e=s(e))&&er(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),void nn();Zo=!1,u(t.firstChild,e,null,null,null),nn(),Zo&&console.error("Hydration completed but contains mismatches.")},u]}const nr=Sn;function or(e){return sr(e)}function rr(e){return sr(e,tr)}function sr(e,t){(J||(J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})).__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:s,createText:l,createComment:i,setText:c,setElementText:a,parentNode:u,nextSibling:f,setScopeId:p=m,cloneNode:v,insertStaticContent:g}=e,_=(e,t,n,o=null,r=null,s=null,l=!1,i=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!kr(e,t)&&(o=ee(e),W(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:f}=t;switch(a){case hr:y(e,t,n,o);break;case mr:C(e,t,n,o);break;case vr:null==e&&x(t,n,o,l);break;case dr:O(e,t,n,o,r,s,l,i,c);break;default:1&f?S(e,t,n,o,r,s,l,i,c):6&f?M(e,t,n,o,r,s,l,i,c):(64&f||128&f)&&a.process(e,t,n,o,r,s,l,i,c,ne)}null!=u&&r&&Xo(u,e&&e.ref,s,t||e,!t)},y=(e,t,o,r)=>{if(null==e)n(t.el=l(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&c(n,t.children)}},C=(e,t,o,r)=>{null==e?n(t.el=i(t.children||""),o,r):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=g(e.children,t,n,o,e.el,e.anchor)},S=(e,t,n,o,r,s,l,i,c)=>{l=l||"svg"===t.type,null==e?E(t,n,o,r,s,l,i,c):T(e,t,r,s,l,i,c)},E=(e,t,o,l,i,c,u,f)=>{let p,d;const{type:h,props:m,shapeFlag:g,transition:_,patchFlag:y,dirs:b}=e;if(e.el&&void 0!==v&&-1===y)p=e.el=v(e.el);else{if(p=e.el=s(e.type,c,m&&m.is,m),8&g?a(p,e.children):16&g&&A(e.children,p,null,l,i,c&&"foreignObject"!==h,u,f),b&&mo(e,null,l,"created"),m){for(const t in m)"value"===t||L(t)||r(p,t,null,m[t],c,e.children,l,i,Q);"value"in m&&r(p,"value",null,m.value),(d=m.onVnodeBeforeMount)&&$r(d,l,e)}k(p,e,e.scopeId,u,l)}b&&mo(e,null,l,"beforeMount");const C=(!i||i&&!i.pendingBranch)&&_&&!_.persisted;C&&_.beforeEnter(p),n(p,t,o),((d=m&&m.onVnodeMounted)||C||b)&&nr((()=>{d&&$r(d,l,e),C&&_.enter(p),b&&mo(e,null,l,"mounted")}),i)},k=(e,t,n,o,r)=>{if(n&&p(e,n),o)for(let s=0;s<o.length;s++)p(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;k(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},A=(e,t,n,o,r,s,l,i,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=i?Br(e[a]):Vr(e[a]);_(null,c,t,n,o,r,s,l,i)}},T=(e,t,n,o,s,l,i)=>{const c=t.el=e.el;let{patchFlag:u,dynamicChildren:f,dirs:p}=t;u|=16&e.patchFlag;const h=e.props||d,m=t.props||d;let v;n&&lr(n,!1),(v=m.onVnodeBeforeUpdate)&&$r(v,n,t,e),p&&mo(t,e,n,"beforeUpdate"),n&&lr(n,!0);const g=s&&"foreignObject"!==t.type;if(f?F(e.dynamicChildren,f,c,n,o,g,l):i||$(e,t,c,null,n,o,g,l,!1),u>0){if(16&u)R(c,t,h,m,n,o,s);else if(2&u&&h.class!==m.class&&r(c,"class",null,m.class,s),4&u&&r(c,"style",h.style,m.style,s),8&u){const l=t.dynamicProps;for(let t=0;t<l.length;t++){const i=l[t],a=h[i],u=m[i];u===a&&"value"!==i||r(c,i,a,u,s,e.children,n,o,Q)}}1&u&&e.children!==t.children&&a(c,t.children)}else i||null!=f||R(c,t,h,m,n,o,s);((v=m.onVnodeUpdated)||p)&&nr((()=>{v&&$r(v,n,t,e),p&&mo(t,e,n,"updated")}),o)},F=(e,t,n,o,r,s,l)=>{for(let i=0;i<t.length;i++){const c=e[i],a=t[i],f=c.el&&(c.type===dr||!kr(c,a)||70&c.shapeFlag)?u(c.el):n;_(c,a,f,null,o,r,s,l,!0)}},R=(e,t,n,o,s,l,i)=>{if(n!==o){for(const c in o){if(L(c))continue;const a=o[c],u=n[c];a!==u&&"value"!==c&&r(e,c,u,a,i,t.children,s,l,Q)}if(n!==d)for(const c in n)L(c)||c in o||r(e,c,n[c],null,i,t.children,s,l,Q);"value"in o&&r(e,"value",n.value,o.value)}},O=(e,t,o,r,s,i,c,a,u)=>{const f=t.el=e?e.el:l(""),p=t.anchor=e?e.anchor:l("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(n(f,o,r),n(p,o,r),A(t.children,o,p,s,i,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(F(e.dynamicChildren,h,o,s,i,c,a),(null!=t.key||s&&t===s.subTree)&&ir(e,t,!0)):$(e,t,o,p,s,i,c,a,u)},M=(e,t,n,o,r,s,l,i,c)=>{t.slotScopeIds=i,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,l,c):N(t,n,o,r,s,l,c):V(e,t,c)},N=(e,t,n,o,r,s,l)=>{const i=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||jr,s={uid:Ur++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new X(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Io(o,r),emitsOptions:cn(o,r),emit:null,emitted:null,propsDefaults:d,inheritAttrs:o.inheritAttrs,ctx:d,data:d,props:d,attrs:d,slots:d,refs:d,setupState:d,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=ln.bind(null,s),e.ce&&e.ce(s);return s}(e,o,r);if(Gn(e)&&(i.ctx.renderer=ne),function(e,t=!1){Jr=t;const{props:n,children:o}=e.vnode,r=Kr(e);(function(e,t,n,o=!1){const r={},s={};G(s,Ar,1),e.propsDefaults=Object.create(null),Bo(e,t,r,s);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);e.props=n?o?r:it(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=ht(t),G(t,"_",n)):Ko(t,e.slots={})}else e.slots={},t&&Go(e,t);G(e.slots,Ar,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=mt(new Proxy(e.ctx,wo));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?Zr(e):null;zr(e),pe();const r=Nt(o,e,0,[e.props,n]);if(de(),Wr(),P(r)){if(r.then(Wr,Wr),t)return r.then((n=>{Yr(e,n,t)})).catch((t=>{Bt(t,e,0)}));e.asyncDep=r}else Yr(e,r,t)}else Xr(e,t)}(e,t):void 0;Jr=!1}(i),i.asyncDep){if(r&&r.registerDep(i,B),!e.el){const e=i.subTree=Or(mr);C(null,e,t,n)}}else B(i,e,t,n,r,s,l)},V=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:l,children:i,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!i||i&&i.$stable)||o!==l&&(o?!l||gn(o,l,a):!!l);if(1024&c)return!0;if(16&c)return o?gn(o,l,a):!!l;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(l[n]!==o[n]&&!an(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void I(o,t,n);o.next=t,function(e){const t=$t.indexOf(e);t>jt&&$t.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},B=(e,t,n,o,r,s,l)=>{const i=e.effect=new ce((()=>{if(e.isMounted){let t,{next:n,bu:o,u:i,parent:c,vnode:a}=e,f=n;lr(e,!1),n?(n.el=a.el,I(e,n,l)):n=a,o&&K(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&$r(t,c,n,a),lr(e,!0);const p=hn(e),d=e.subTree;e.subTree=p,_(d,p,u(d.el),ee(d),e,r,s),n.el=p.el,null===f&&_n(e,p.el),i&&nr(i,r),(t=n.props&&n.props.onVnodeUpdated)&&nr((()=>$r(t,c,n,a)),r)}else{let l;const{el:i,props:c}=t,{bm:a,m:u,parent:f}=e,p=Wn(t);if(lr(e,!1),a&&K(a),!p&&(l=c&&c.onVnodeBeforeMount)&&$r(l,f,t),lr(e,!0),i&&re){const n=()=>{e.subTree=hn(e),re(i,e.subTree,e,r,null)};p?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const l=e.subTree=hn(e);_(null,l,n,o,e,r,s),t.el=l.el}if(u&&nr(u,r),!p&&(l=c&&c.onVnodeMounted)){const e=t;nr((()=>$r(l,f,e)),r)}(256&t.shapeFlag||f&&Wn(f.vnode)&&256&f.vnode.shapeFlag)&&e.a&&nr(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>Xt(c)),e.scope),c=e.update=()=>i.run();c.id=e.uid,lr(e,!0),c()},I=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:l}}=e,i=ht(r),[c]=e.propsOptions;let a=!1;if(!(o||l>0)||16&l){let o;Bo(e,t,r,s)&&(a=!0);for(const s in i)t&&(w(t,s)||(o=D(s))!==s&&w(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Lo(c,i,s,void 0,e,!0)):delete r[s]);if(s!==i)for(const e in s)t&&w(t,e)||(delete s[e],a=!0)}else if(8&l){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let l=n[o];if(an(e.emitsOptions,l))continue;const u=t[l];if(c)if(w(s,l))u!==s[l]&&(s[l]=u,a=!0);else{const t=j(l);r[t]=Lo(c,i,t,u,e,!1)}else u!==s[l]&&(s[l]=u,a=!0)}}a&&ve(e,"set","$attrs")}(e,t.props,o,n),((e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,l=d;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(b(r,t),n||1!==e||delete r._):(s=!t.$stable,Ko(t,r)),l=t}else t&&(Go(e,t),l={default:1});if(s)for(const i in r)Ho(i)||i in l||delete r[i]})(e,t.children,n),pe(),tn(void 0,e.update),de()},$=(e,t,n,o,r,s,l,i,c=!1)=>{const u=e&&e.children,f=e?e.shapeFlag:0,p=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void H(u,p,n,o,r,s,l,i,c);if(256&d)return void U(u,p,n,o,r,s,l,i,c)}8&h?(16&f&&Q(u,r,s),p!==u&&a(n,p)):16&f?16&h?H(u,p,n,o,r,s,l,i,c):Q(u,r,s,!0):(8&f&&a(n,""),16&h&&A(p,n,o,r,s,l,i,c))},U=(e,t,n,o,r,s,l,i,c)=>{const a=(e=e||h).length,u=(t=t||h).length,f=Math.min(a,u);let p;for(p=0;p<f;p++){const o=t[p]=c?Br(t[p]):Vr(t[p]);_(e[p],o,n,null,r,s,l,i,c)}a>u?Q(e,r,s,!0,!1,f):A(t,n,o,r,s,l,i,c,f)},H=(e,t,n,o,r,s,l,i,c)=>{let a=0;const u=t.length;let f=e.length-1,p=u-1;for(;a<=f&&a<=p;){const o=e[a],u=t[a]=c?Br(t[a]):Vr(t[a]);if(!kr(o,u))break;_(o,u,n,null,r,s,l,i,c),a++}for(;a<=f&&a<=p;){const o=e[f],a=t[p]=c?Br(t[p]):Vr(t[p]);if(!kr(o,a))break;_(o,a,n,null,r,s,l,i,c),f--,p--}if(a>f){if(a<=p){const e=p+1,f=e<u?t[e].el:o;for(;a<=p;)_(null,t[a]=c?Br(t[a]):Vr(t[a]),n,f,r,s,l,i,c),a++}}else if(a>p)for(;a<=f;)W(e[a],r,s,!0),a++;else{const d=a,m=a,v=new Map;for(a=m;a<=p;a++){const e=t[a]=c?Br(t[a]):Vr(t[a]);null!=e.key&&v.set(e.key,a)}let g,y=0;const b=p-m+1;let C=!1,x=0;const w=new Array(b);for(a=0;a<b;a++)w[a]=0;for(a=d;a<=f;a++){const o=e[a];if(y>=b){W(o,r,s,!0);continue}let u;if(null!=o.key)u=v.get(o.key);else for(g=m;g<=p;g++)if(0===w[g-m]&&kr(o,t[g])){u=g;break}void 0===u?W(o,r,s,!0):(w[u-m]=a+1,u>=x?x=u:C=!0,_(o,t[u],n,null,r,s,l,i,c),y++)}const S=C?function(e){const t=e.slice(),n=[0];let o,r,s,l,i;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,l=n.length-1;s<l;)i=s+l>>1,e[n[i]]<c?s=i+1:l=i;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,l=n[s-1];for(;s-- >0;)n[s]=l,l=t[l];return n}(w):h;for(g=S.length-1,a=b-1;a>=0;a--){const e=m+a,f=t[e],p=e+1<u?t[e+1].el:o;0===w[a]?_(null,f,n,p,r,s,l,i,c):C&&(g<0||a!==S[g]?z(f,n,p,2):g--)}}},z=(e,t,o,r,s=null)=>{const{el:l,type:i,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void z(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void i.move(e,t,o,ne);if(i===dr){n(l,t,o);for(let e=0;e<a.length;e++)z(a[e],t,o,r);return void n(e.anchor,t,o)}if(i===vr)return void(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=f(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(l),n(l,t,o),nr((()=>c.enter(l)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,i=()=>n(l,t,o),a=()=>{e(l,(()=>{i(),s&&s()}))};r?r(l,i,a):a()}else n(l,t,o)},W=(e,t,n,o=!1,r=!1)=>{const{type:s,props:l,ref:i,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:f,dirs:p}=e;if(null!=i&&Xo(i,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&p,h=!Wn(e);let m;if(h&&(m=l&&l.onVnodeBeforeUnmount)&&$r(m,t,e),6&u)Z(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&mo(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ne,o):a&&(s!==dr||f>0&&64&f)?Q(a,t,n,!1,!0):(s===dr&&384&f||!r&&16&u)&&Q(c,t,n),o&&q(e)}(h&&(m=l&&l.onVnodeUnmounted)||d)&&nr((()=>{m&&$r(m,t,e),d&&mo(e,null,t,"unmounted")}),n)},q=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===dr)return void Y(n,r);if(t===vr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),o(e),e=n;o(t)})(e);const l=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,l);o?o(e.el,l,r):r()}else l()},Y=(e,t)=>{let n;for(;e!==t;)n=f(e),o(e),e=n;o(t)},Z=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:l,um:i}=e;o&&K(o),r.stop(),s&&(s.active=!1,W(l,e,t,n)),i&&nr(i,t),nr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Q=(e,t,n,o=!1,r=!1,s=0)=>{for(let l=s;l<e.length;l++)W(e[l],t,n,o,r)},ee=e=>6&e.shapeFlag?ee(e.component.subTree):128&e.shapeFlag?e.suspense.next():f(e.anchor||e.el),te=(e,t,n)=>{null==e?t._vnode&&W(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),nn(),t._vnode=e},ne={p:_,um:W,m:z,r:q,mt:N,mc:A,pc:$,pbc:F,n:ee,o:e};let oe,re;return t&&([oe,re]=t(ne)),{render:te,hydrate:oe,createApp:Yo(te,oe)}}function lr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ir(e,t,n=!1){const o=e.children,r=t.children;if(S(o)&&S(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=Br(r[s]),t.el=e.el),n||ir(e,t))}}const cr=e=>e&&(e.disabled||""===e.disabled),ar=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ur=(e,t)=>{const n=e&&e.to;if(F(n)){if(t){return t(n)}return null}return n};function fr(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:l,anchor:i,shapeFlag:c,children:a,props:u}=e,f=2===s;if(f&&o(l,t,n),(!f||cr(u))&&16&c)for(let p=0;p<a.length;p++)r(a[p],t,n,2);f&&o(i,t,n)}const pr={__isTeleport:!0,process(e,t,n,o,r,s,l,i,c,a){const{mc:u,pc:f,pbc:p,o:{insert:d,querySelector:h,createText:m}}=a,v=cr(t.props);let{shapeFlag:g,children:_,dynamicChildren:y}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");d(e,n,o),d(a,n,o);const f=t.target=ur(t.props,h),p=t.targetAnchor=m("");f&&(d(p,f),l=l||ar(f));const y=(e,t)=>{16&g&&u(_,e,t,r,s,l,i,c)};v?y(n,a):f&&y(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=cr(e.props),g=m?n:u,_=m?o:d;if(l=l||ar(u),y?(p(e.dynamicChildren,y,g,r,s,l,i),ir(e,t,!0)):c||f(e,t,g,_,r,s,l,i,!1),v)m||fr(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=ur(t.props,h);e&&fr(t,e,null,a,0)}else m&&fr(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},l){const{shapeFlag:i,children:c,anchor:a,targetAnchor:u,target:f,props:p}=e;if(f&&s(u),(l||!cr(p))&&(s(a),16&i))for(let d=0;d<c.length;d++){const e=c[d];r(e,t,n,!0,!!e.dynamicChildren)}},move:fr,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:l,parentNode:i,querySelector:c}},a){const u=t.target=ur(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(cr(t.props))t.anchor=a(l(e),t,i(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=l(e);let i=c;for(;i;)if(i=l(i),i&&8===i.nodeType&&"teleport anchor"===i.data){t.targetAnchor=i,u._lpa=t.targetAnchor&&l(t.targetAnchor);break}a(c,t,u,n,o,r,s)}}return t.anchor&&l(t.anchor)}},dr=Symbol(void 0),hr=Symbol(void 0),mr=Symbol(void 0),vr=Symbol(void 0),gr=[];let _r=null;function yr(e=!1){gr.push(_r=e?null:[])}function br(){gr.pop(),_r=gr[gr.length-1]||null}let Cr=1;function xr(e){Cr+=e}function wr(e){return e.dynamicChildren=Cr>0?_r||h:null,br(),Cr>0&&_r&&_r.push(e),e}function Sr(e,t,n,o,r){return wr(Or(e,t,n,o,r,!0))}function Er(e){return!!e&&!0===e.__v_isVNode}function kr(e,t){return e.type===t.type&&e.key===t.key}const Ar="__vInternal",Tr=({key:e})=>null!=e?e:null,Fr=({ref:e,ref_key:t,ref_for:n})=>null!=e?F(e)||bt(e)||T(e)?{i:un,r:e,k:t,f:!!n}:e:null;function Rr(e,t=null,n=null,o=0,r=null,s=(e===dr?0:1),l=!1,i=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Tr(t),ref:t&&Fr(t),scopeId:fn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null};return i?(Lr(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=F(n)?8:16),Cr>0&&!l&&_r&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&_r.push(c),c}const Or=function(e,t=null,n=null,o=0,r=null,l=!1){e&&e!==go||(e=mr);if(Er(e)){const o=Mr(e,t,!0);return n&&Lr(o,n),Cr>0&&!l&&_r&&(6&o.shapeFlag?_r[_r.indexOf(e)]=o:_r.push(o)),o.patchFlag|=-2,o}i=e,T(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=Pr(t);let{class:e,style:n}=t;e&&!F(e)&&(t.class=a(e)),O(n)&&(dt(n)&&!S(n)&&(n=b({},n)),t.style=s(n))}const c=F(e)?1:yn(e)?128:(e=>e.__isTeleport)(e)?64:O(e)?4:T(e)?2:0;return Rr(e,t,n,o,r,c,l,!0)};function Pr(e){return e?dt(e)||Ar in e?b({},e):e:null}function Mr(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:l}=e,i=t?Ir(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:i,key:i&&Tr(i),ref:t&&t.ref?n&&r?S(r)?r.concat(Fr(t)):[r,Fr(t)]:Fr(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==dr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Mr(e.ssContent),ssFallback:e.ssFallback&&Mr(e.ssFallback),el:e.el,anchor:e.anchor}}function Nr(e=" ",t=0){return Or(hr,null,e,t)}function Vr(e){return null==e||"boolean"==typeof e?Or(mr):S(e)?Or(dr,null,e.slice()):"object"==typeof e?Br(e):Or(hr,null,String(e))}function Br(e){return null===e.el||e.memo?e:Mr(e)}function Lr(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(S(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Lr(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Ar in t?3===o&&un&&(1===un.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=un}}else T(t)?(t={default:t,_ctx:un},n=32):(t=String(t),64&o?(n=16,t=[Nr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ir(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=a([t.class,o.class]));else if("style"===e)t.style=s([t.style,o.style]);else if(_(e)){const n=t[e],r=o[e];!r||n===r||S(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function $r(e,t,n,o=null){Vt(e,t,7,[n,o])}const jr=qo();let Ur=0;let Dr=null;const Hr=()=>Dr||un,zr=e=>{Dr=e,e.scope.on()},Wr=()=>{Dr&&Dr.scope.off(),Dr=null};function Kr(e){return 4&e.vnode.shapeFlag}let Gr,qr,Jr=!1;function Yr(e,t,n){T(t)?e.render=t:O(t)&&(e.setupState=kt(t)),Xr(e,n)}function Xr(e,t,n){const o=e.type;if(!e.render){if(!t&&Gr&&!o.render){const t=o.template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:l}=o,i=b(b({isCustomElement:n,delimiters:s},r),l);o.render=Gr(t,i)}}e.render=o.render||m,qr&&qr(e)}zr(e),pe(),ko(e),de(),Wr()}function Zr(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(he(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}function Qr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(kt(mt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in xo?xo[n](e):void 0}))}const es=/(?:^|[-_])(\w)/g;function ts(e){return T(e)&&e.displayName||e.name}function ns(e,t,n=!1){let o=ts(t);if(!o&&t.__file){const e=t.__file.match(/([^/\\]+)\.\w+$/);e&&(o=e[1])}if(!o&&e&&e.parent){const n=e=>{for(const n in e)if(e[n]===t)return n};o=n(e.components||e.parent.type.components)||n(e.appContext.components)}return o?o.replace(es,(e=>e.toUpperCase())).replace(/[-_]/g,""):n?"App":"Anonymous"}const os=(e,t)=>function(e,t,n=!1){let o,r;const s=T(e);return s?(o=e,r=m):(o=e.get,r=e.set),new Rt(o,r,s||!r,n)}(e,0,Jr);function rs(){const e=Hr();return e.setupContext||(e.setupContext=Zr(e))}function ss(e,t,n){const o=arguments.length;return 2===o?O(t)&&!S(t)?Er(t)?Or(e,null,[t]):Or(e,t):Or(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Er(n)&&(n=[n]),Or(e,t,n))}const ls=Symbol("");function is(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(W(n[o],t[o]))return!1;return Cr>0&&_r&&_r.push(e),!0}const cs="3.2.36",as="undefined"!=typeof document?document:null,us=as&&as.createElement("template"),fs={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?as.createElementNS("http://www.w3.org/2000/svg",e):as.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>as.createTextNode(e),createComment:e=>as.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>as.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o,r,s){const l=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{us.innerHTML=o?`<svg>${e}</svg>`:e;const r=us.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const ps=/\s*!important$/;function ds(e,t,n){if(S(n))n.forEach((n=>ds(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=ms[t];if(n)return n;let o=j(t);if("filter"!==o&&o in e)return ms[t]=o;o=H(o);for(let r=0;r<hs.length;r++){const n=hs[r]+o;if(n in e)return ms[t]=n}return t}(e,t);ps.test(n)?e.setProperty(D(o),n.replace(ps,""),"important"):e[o]=n}}const hs=["Webkit","Moz","ms"],ms={};const vs="http://www.w3.org/1999/xlink";const[gs,_s]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let ys=0;const bs=Promise.resolve(),Cs=()=>{ys=0};function xs(e,t,n,o){e.addEventListener(t,n,o)}function ws(e,t,n,o,r=null){const s=e._vei||(e._vei={}),l=s[t];if(o&&l)l.value=o;else{const[n,i]=function(e){let t;if(Ss.test(e)){let n;for(t={};n=e.match(Ss);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[D(e.slice(2)),t]}(t);if(o){const l=s[t]=function(e,t){const n=e=>{const o=e.timeStamp||gs();(_s||o>=n.attached-1)&&Vt(function(e,t){if(S(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>ys||(bs.then(Cs),ys=gs()))(),n}(o,r);xs(e,n,l,i)}else l&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,l,i),s[t]=void 0)}}const Ss=/(?:Once|Passive|Capture)$/;const Es=/^on[a-z]/;function ks(e,t){const n=zn(e);class o extends Ts{constructor(e){super(n,e,t)}}return o.def=n,o}const As="undefined"!=typeof HTMLElement?HTMLElement:class{};class Ts extends As{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,Yt((()=>{this._connected||(Sl(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=e=>{const{props:t,styles:n}=e,o=!S(t),r=t?o?Object.keys(t):t:[];let s;if(o)for(const l in this._props){const e=t[l];(e===Number||e&&e.type===Number)&&(this._props[l]=q(this._props[l]),(s||(s=Object.create(null)))[l]=!0)}this._numberProps=s;for(const l of Object.keys(this))"_"!==l[0]&&this._setProp(l,this[l],!0,!1);for(const l of r.map(j))Object.defineProperty(this,l,{get(){return this._getProp(l)},set(e){this._setProp(l,e)}});this._applyStyles(n),this._update()},t=this._def.__asyncLoader;t?t().then(e):e(this._def)}_setAttr(e){let t=this.getAttribute(e);this._numberProps&&this._numberProps[e]&&(t=q(t)),this._setProp(j(e),t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(D(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(D(e),t+""):t||this.removeAttribute(D(e))))}_update(){Sl(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Or(this._def,b({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0,e.emit=(e,...t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Ts){e.parent=t._instance;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Fs(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Fs(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Rs(e.el,t);else if(e.type===dr)e.children.forEach((e=>Fs(e,t)));else if(e.type===vr){let{el:n,anchor:o}=e;for(;n&&(Rs(n,t),n!==o);)n=n.nextSibling}}function Rs(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Os="transition",Ps="animation",Ms=(e,{slots:t})=>ss(Ln,Is(e),t);Ms.displayName="Transition";const Ns={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Vs=Ms.props=b({},Ln.props,Ns),Bs=(e,t=[])=>{S(e)?e.forEach((e=>e(...t))):e&&e(...t)},Ls=e=>!!e&&(S(e)?e.some((e=>e.length>1)):e.length>1);function Is(e){const t={};for(const b in e)b in Ns||(t[b]=e[b]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=l,appearToClass:u=i,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(O(e))return[$s(e.enter),$s(e.leave)];{const t=$s(e);return[t,t]}}(r),m=h&&h[0],v=h&&h[1],{onBeforeEnter:g,onEnter:_,onEnterCancelled:y,onLeave:C,onLeaveCancelled:x,onBeforeAppear:w=g,onAppear:S=_,onAppearCancelled:E=y}=t,k=(e,t,n)=>{Us(e,t?u:i),Us(e,t?a:l),n&&n()},A=(e,t)=>{e._isLeaving=!1,Us(e,f),Us(e,d),Us(e,p),t&&t()},T=e=>(t,n)=>{const r=e?S:_,l=()=>k(t,e,n);Bs(r,[t,l]),Ds((()=>{Us(t,e?c:s),js(t,e?u:i),Ls(r)||zs(t,o,m,l)}))};return b(t,{onBeforeEnter(e){Bs(g,[e]),js(e,s),js(e,l)},onBeforeAppear(e){Bs(w,[e]),js(e,c),js(e,a)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>A(e,t);js(e,f),qs(),js(e,p),Ds((()=>{e._isLeaving&&(Us(e,f),js(e,d),Ls(C)||zs(e,o,v,n))})),Bs(C,[e,n])},onEnterCancelled(e){k(e,!1),Bs(y,[e])},onAppearCancelled(e){k(e,!0),Bs(E,[e])},onLeaveCancelled(e){A(e),Bs(x,[e])}})}function $s(e){return q(e)}function js(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function Us(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Ds(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Hs=0;function zs(e,t,n,o){const r=e._endId=++Hs,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:l,timeout:i,propCount:c}=Ws(e,t);if(!l)return o();const a=l+"end";let u=0;const f=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&f()};setTimeout((()=>{u<c&&f()}),i+1),e.addEventListener(a,p)}function Ws(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),l=Ks(r,s),i=o("animationDelay"),c=o("animationDuration"),a=Ks(i,c);let u=null,f=0,p=0;t===Os?l>0&&(u=Os,f=l,p=s.length):t===Ps?a>0&&(u=Ps,f=a,p=c.length):(f=Math.max(l,a),u=f>0?l>a?Os:Ps:null,p=u?u===Os?s.length:c.length:0);return{type:u,timeout:f,propCount:p,hasTransform:u===Os&&/\b(transform|all)(,|$)/.test(n.transitionProperty)}}function Ks(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Gs(t)+Gs(e[n]))))}function Gs(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function qs(){return document.body.offsetHeight}const Js=new WeakMap,Ys=new WeakMap,Xs={name:"TransitionGroup",props:b({},Vs,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Hr(),o=Vn();let r,s;return io((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=Ws(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(Zs),r.forEach(Qs);const o=r.filter(el);qs(),o.forEach((e=>{const n=e.el,o=n.style;js(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,Us(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const l=ht(e),i=Is(l);let c=l.tag||dr;r=s,s=t.default?Hn(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&Dn(t,$n(t,i,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];Dn(t,$n(t,i,o,n)),Js.set(t,t.el.getBoundingClientRect())}return Or(c,null,s)}}};function Zs(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function Qs(e){Ys.set(e,e.el.getBoundingClientRect())}function el(e){const t=Js.get(e),n=Ys.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const tl=e=>{const t=e.props["onUpdate:modelValue"]||!1;return S(t)?e=>K(t,e):t};function nl(e){e.target.composing=!0}function ol(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const rl={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=tl(r);const s=o||r.props&&"number"===r.props.type;xs(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=q(o)),e._assign(o)})),n&&xs(e,"change",(()=>{e.value=e.value.trim()})),t||(xs(e,"compositionstart",nl),xs(e,"compositionend",ol),xs(e,"change",ol))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=tl(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&q(e.value)===t)return}const l=null==t?"":t;e.value!==l&&(e.value=l)}},sl={deep:!0,created(e,t,n){e._assign=tl(n),xs(e,"change",(()=>{const t=e._modelValue,n=ul(e),o=e.checked,r=e._assign;if(S(t)){const e=f(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(k(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(fl(e,o))}))},mounted:ll,beforeUpdate(e,t,n){e._assign=tl(n),ll(e,t,n)}};function ll(e,{value:t,oldValue:n},o){e._modelValue=t,S(t)?e.checked=f(t,o.props.value)>-1:k(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=u(t,fl(e,!0)))}const il={created(e,{value:t},n){e.checked=u(t,n.props.value),e._assign=tl(n),xs(e,"change",(()=>{e._assign(ul(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=tl(o),t!==n&&(e.checked=u(t,o.props.value))}},cl={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=k(t);xs(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?q(ul(e)):ul(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=tl(o)},mounted(e,{value:t}){al(e,t)},beforeUpdate(e,t,n){e._assign=tl(n)},updated(e,{value:t}){al(e,t)}};function al(e,t){const n=e.multiple;if(!n||S(t)||k(t)){for(let o=0,r=e.options.length;o<r;o++){const r=e.options[o],s=ul(r);if(n)r.selected=S(t)?f(t,s)>-1:t.has(s);else if(u(ul(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function ul(e){return"_value"in e?e._value:e.value}function fl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const pl={created(e,t,n){dl(e,t,n,null,"created")},mounted(e,t,n){dl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){dl(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){dl(e,t,n,o,"updated")}};function dl(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return cl;case"TEXTAREA":return rl;default:switch(t){case"checkbox":return sl;case"radio":return il;default:return rl}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const hl=["ctrl","shift","alt","meta"],ml={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>hl.some((n=>e[`${n}Key`]&&!t.includes(n)))},vl={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},gl={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):_l(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),_l(e,!0),o.enter(e)):o.leave(e,(()=>{_l(e,!1)})):_l(e,t))},beforeUnmount(e,{value:t}){_l(e,t)}};function _l(e,t){e.style.display=t?e._vod:"none"}const yl=b({patchProp:(e,t,n,s,l=!1,i,c,a,u)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,l):"style"===t?function(e,t,n){const o=e.style,r=F(n);if(n&&!r){for(const e in n)ds(o,e,n[e]);if(t&&!F(t))for(const e in t)null==n[e]&&ds(o,e,"")}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,n,s):_(t)?y(t)||ws(e,t,0,s,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&Es.test(t)&&T(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Es.test(t)&&F(n))return!1;return t in e}(e,t,s,l))?function(e,t,n,o,s,l,i){if("innerHTML"===t||"textContent"===t)return o&&i(o,s,l),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const o=null==n?"":n;return e.value===o&&"OPTION"!==e.tagName||(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=r(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,s,i,c,a,u):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),function(e,t,n,s,l){if(s&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(vs,t.slice(6,t.length)):e.setAttributeNS(vs,t,n);else{const s=o(t);null==n||s&&!r(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}(e,t,s,l))}},fs);let bl,Cl=!1;function xl(){return bl||(bl=or(yl))}function wl(){return bl=Cl?bl:rr(yl),Cl=!0,bl}const Sl=(...e)=>{xl().render(...e)},El=(...e)=>{wl().hydrate(...e)};function kl(e){if(F(e)){return document.querySelector(e)}return e}const Al=m;return e.BaseTransition=Ln,e.Comment=mr,e.EffectScope=X,e.Fragment=dr,e.KeepAlive=qn,e.ReactiveEffect=ce,e.Static=vr,e.Suspense=bn,e.Teleport=pr,e.Text=hr,e.Transition=Ms,e.TransitionGroup=Xs,e.VueElement=Ts,e.callWithAsyncErrorHandling=Vt,e.callWithErrorHandling=Nt,e.camelize=j,e.capitalize=H,e.cloneVNode=Mr,e.compatUtils=null,e.compile=()=>{},e.computed=os,e.createApp=(...e)=>{const t=xl().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=kl(e);if(!o)return;const r=t._component;T(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},e.createBlock=Sr,e.createCommentVNode=function(e="",t=!1){return t?(yr(),Sr(mr,null,e)):Or(mr,null,e)},e.createElementBlock=function(e,t,n,o,r,s){return wr(Rr(e,t,n,o,r,s,!0))},e.createElementVNode=Rr,e.createHydrationRenderer=rr,e.createPropsRestProxy=function(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n},e.createRenderer=or,e.createSSRApp=(...e)=>{const t=wl().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=kl(e);if(t)return n(t,!0,t instanceof SVGElement)},t},e.createSlots=function(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(S(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.fn)}return e},e.createStaticVNode=function(e,t){const n=Or(vr,null,e);return n.staticCount=t,n},e.createTextVNode=Nr,e.createVNode=Or,e.customRef=function(e){return new At(e)},e.defineAsyncComponent=function(e){T(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:l=!0,onError:i}=e;let c,a=null,u=0;const f=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),i)return new Promise(((t,n)=>{i(e,(()=>t((u++,a=null,f()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return zn({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return c},setup(){const e=Dr;if(c)return()=>Kn(c,e);const t=t=>{a=null,Bt(t,e,13,!o)};if(l&&e.suspense)return f().then((t=>()=>Kn(t,e))).catch((e=>(t(e),()=>o?Or(o,{error:e}):null)));const i=Ct(!1),u=Ct(),p=Ct(!!r);return r&&setTimeout((()=>{p.value=!1}),r),null!=s&&setTimeout((()=>{if(!i.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),f().then((()=>{i.value=!0,e.parent&&Gn(e.parent.vnode)&&Xt(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>i.value&&c?Kn(c,e):u.value&&o?Or(o,{error:u.value}):n&&!p.value?Or(n):void 0}})},e.defineComponent=zn,e.defineCustomElement=ks,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=e=>ks(e,El),e.effect=function(e,t){e.effect&&(e=e.effect.fn);const n=new ce(e);t&&(b(n,t),t.scope&&Z(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o},e.effectScope=function(e){return new X(e)},e.getCurrentInstance=Hr,e.getCurrentScope=function(){return Y},e.getTransitionRawChildren=Hn,e.guardReactiveProps=Pr,e.h=ss,e.handleError=Bt,e.hydrate=El,e.initCustomFormatter=function(){},e.initDirectivesForSSR=Al,e.inject=An,e.isMemoSame=is,e.isProxy=dt,e.isReactive=ut,e.isReadonly=ft,e.isRef=bt,e.isRuntimeOnly=()=>!Gr,e.isShallow=pt,e.isVNode=Er,e.markRaw=mt,e.mergeDefaults=function(e,t){const n=S(e)?e.reduce(((e,t)=>(e[t]={},e)),{}):e;for(const o in t){const e=n[o];e?S(e)||T(e)?n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(n[o]={default:t[o]})}return n},e.mergeProps=Ir,e.nextTick=Yt,e.normalizeClass=a,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!F(t)&&(e.class=a(t)),n&&(e.style=s(n)),e},e.normalizeStyle=s,e.onActivated=Yn,e.onBeforeMount=ro,e.onBeforeUnmount=co,e.onBeforeUpdate=lo,e.onDeactivated=Xn,e.onErrorCaptured=ho,e.onMounted=so,e.onRenderTracked=po,e.onRenderTriggered=fo,e.onScopeDispose=function(e){Y&&Y.cleanups.push(e)},e.onServerPrefetch=uo,e.onUnmounted=ao,e.onUpdated=io,e.openBlock=yr,e.popScopeId=function(){fn=null},e.provide=kn,e.proxyRefs=kt,e.pushScopeId=function(e){fn=e},e.queuePostFlushCb=en,e.reactive=lt,e.readonly=ct,e.ref=Ct,e.registerRuntimeCompiler=function(e){Gr=e,qr=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,So))}},e.render=Sl,e.renderList=function(e,t,n,o){let r;const s=n&&n[o];if(S(e)||F(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(O(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,l=n.length;o<l;o++){const l=n[o];r[o]=t(e[l],l,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r},e.renderSlot=function(e,t,n={},o,r){if(un.isCE||un.parent&&Wn(un.parent)&&un.parent.isCE)return Or("slot","default"===t?null:{name:t},o&&o());let s=e[t];s&&s._c&&(s._d=!1),yr();const l=s&&bo(s(n)),i=Sr(dr,{key:n.key||`_${t}`},l||(o?o():[]),l&&1===e._?64:-2);return!r&&i.scopeId&&(i.slotScopeIds=[i.scopeId+"-s"]),s&&s._c&&(s._d=!0),i},e.resolveComponent=function(e,t){return _o(vo,e,!0,t)||e},e.resolveDirective=function(e){return _o("directives",e)},e.resolveDynamicComponent=function(e){return F(e)?_o(vo,e,!1)||e:e||go},e.resolveFilter=null,e.resolveTransitionHooks=$n,e.setBlockTracking=xr,e.setDevtoolsHook=function t(n,o){var r,s;if(e.devtools=n,e.devtools)e.devtools.enabled=!0,sn.forEach((({event:t,args:n})=>e.devtools.emit(t,...n))),sn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null===(s=null===(r=window.navigator)||void 0===r?void 0:r.userAgent)||void 0===s?void 0:s.includes("jsdom"))){(o.__VUE_DEVTOOLS_HOOK_REPLAY__=o.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{t(e,o)})),setTimeout((()=>{e.devtools||(o.__VUE_DEVTOOLS_HOOK_REPLAY__=null,sn=[])}),3e3)}else sn=[]},e.setTransitionHooks=Dn,e.shallowReactive=it,e.shallowReadonly=function(e){return at(e,!0,Pe,et,rt)},e.shallowRef=function(e){return xt(e,!0)},e.ssrContextKey=ls,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=e=>F(e)?e:null==e?"":S(e)||O(e)&&(e.toString===M||!T(e.toString))?JSON.stringify(e,p,2):String(e),e.toHandlerKey=z,e.toHandlers=function(e){const t={};for(const n in e)t[z(n)]=e[n];return t},e.toRaw=ht,e.toRef=Ft,e.toRefs=function(e){const t=S(e)?new Array(e.length):{};for(const n in e)t[n]=Ft(e,n);return t},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){yt(e)},e.unref=St,e.useAttrs=function(){return rs().attrs},e.useCssModule=function(e="$style"){return d},e.useCssVars=function(e){const t=Hr();if(!t)return;const n=()=>Fs(t.subTree,e(t.proxy));Tn(n),so((()=>{const e=new MutationObserver(n);e.observe(t.subTree.el.parentNode,{childList:!0}),ao((()=>e.disconnect()))}))},e.useSSRContext=()=>{},e.useSlots=function(){return rs().slots},e.useTransitionState=Vn,e.vModelCheckbox=sl,e.vModelDynamic=pl,e.vModelRadio=il,e.vModelSelect=cl,e.vModelText=rl,e.vShow=gl,e.version=cs,e.warn=function(e,...t){pe();const n=Ot.length?Ot[Ot.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=function(){let e=Ot[Ot.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}();if(o)Nt(o,n,11,[e+t.join(""),n&&n.proxy,r.map((({vnode:e})=>`at <${ns(n,e.type)}>`)).join("\n"),r]);else{const n=[`[Vue warn]: ${e}`,...t];r.length&&n.push("\n",...function(e){const t=[];return e.forEach(((e,n)=>{t.push(...0===n?[]:["\n"],...function({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=` at <${ns(e.component,e.type,!!e.component&&null==e.component.parent)}`,r=">"+n;return e.props?[o,...Pt(e.props),r]:[o+r]}(e))})),t}(r)),console.warn(...n)}de()},e.watch=Rn,e.watchEffect=function(e,t){return On(e,null,t)},e.watchPostEffect=Tn,e.watchSyncEffect=function(e,t){return On(e,null,{flush:"sync"})},e.withAsyncContext=function(e){const t=Hr();let n=e();return Wr(),P(n)&&(n=n.catch((e=>{throw zr(t),e}))),[n,()=>zr(t)]},e.withCtx=dn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){const n=un;if(null===n)return e;const o=Qr(n)||n.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,n,l,i=d]=t[s];T(e)&&(e={mounted:e,updated:e}),e.deep&&Nn(n),r.push({dir:e,instance:o,value:n,oldValue:void 0,arg:l,modifiers:i})}return e},e.withKeys=(e,t)=>n=>{if(!("key"in n))return;const o=D(n.key);return t.some((e=>e===o||vl[e]===o))?e(n):void 0},e.withMemo=function(e,t,n,o){const r=n[o];if(r&&is(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s},e.withModifiers=(e,t)=>(n,...o)=>{for(let e=0;e<t.length;e++){const o=ml[t[e]];if(o&&o(n,t))return}return e(n,...o)},e.withScopeId=e=>dn,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); +/** +* vue v3.4.15 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +var Vue=function(e){"use strict";function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},o=[],r=()=>{},s=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,p=(e,t)=>u.call(e,t),f=Array.isArray,d=e=>"[object Map]"===x(e),h=e=>"[object Set]"===x(e),m=e=>"[object Date]"===x(e),v=e=>"function"==typeof e,g=e=>"string"==typeof e,y=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,b=e=>(_(e)||v(e))&&v(e.then)&&v(e.catch),C=Object.prototype.toString,x=e=>C.call(e),S=e=>x(e).slice(8,-1),E=e=>"[object Object]"===x(e),w=e=>g(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,k=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),A=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},T=/-(\w)/g,R=A((e=>e.replace(T,((e,t)=>t?t.toUpperCase():"")))),N=/\B([A-Z])/g,O=A((e=>e.replace(N,"-$1").toLowerCase())),F=A((e=>e.charAt(0).toUpperCase()+e.slice(1))),L=A((e=>e?`on${F(e)}`:"")),P=(e,t)=>!Object.is(e,t),M=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},I=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},V=e=>{const t=parseFloat(e);return isNaN(t)?e:t},B=e=>{const t=g(e)?Number(e):NaN;return isNaN(t)?e:t};let U;const $=()=>U||(U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),D=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error");function j(e){if(f(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=g(o)?z(o):j(o);if(r)for(const e in r)t[e]=r[e]}return t}if(g(e)||_(e))return e}const H=/;(?![^(]*\))/g,W=/:([^]+)/,K=/\/\*[^]*?\*\//g;function z(e){const t={};return e.replace(K,"").split(H).forEach((e=>{if(e){const n=e.split(W);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function G(e){let t="";if(g(e))t=e;else if(f(e))for(let n=0;n<e.length;n++){const o=G(e[n]);o&&(t+=o+" ")}else if(_(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const q=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function J(e){return!!e||""===e}function X(e,t){if(e===t)return!0;let n=m(e),o=m(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=y(e),o=y(t),n||o)return e===t;if(n=f(e),o=f(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=X(e[o],t[o]);return n}(e,t);if(n=_(e),o=_(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!X(e[n],t[n]))return!1}}return String(e)===String(t)}function Y(e,t){return e.findIndex((e=>X(e,t)))}const Z=(e,t)=>t&&t.__v_isRef?Z(e,t.value):d(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[Q(t,o)+" =>"]=n,e)),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>Q(e)))}:y(t)?Q(t):!_(t)||f(t)||E(t)?t:String(t),Q=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let ee,te;class ne{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ee,!e&&ee&&(this.index=(ee.scopes||(ee.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=ee;try{return ee=this,e()}finally{ee=t}}}on(){ee=this}off(){ee=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0,this._active=!1}}}function oe(e,t=ee){t&&t.active&&t.effects.push(e)}function re(){return ee}class se{constructor(e,t,n,o){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,oe(this,o)}get dirty(){if(1===this._dirtyLevel){de();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(ie(t.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),he()}return this._dirtyLevel>=2}set dirty(e){this._dirtyLevel=e?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=ue,t=te;try{return ue=!0,te=this,this._runnings++,le(this),this.fn()}finally{ce(this),this._runnings--,te=t,ue=e}}stop(){var e;this.active&&(le(this),ce(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function ie(e){return e.value}function le(e){e._trackId++,e._depsLength=0}function ce(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)ae(e.deps[t],e);e.deps.length=e._depsLength}}function ae(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}let ue=!0,pe=0;const fe=[];function de(){fe.push(ue),ue=!1}function he(){const e=fe.pop();ue=void 0===e||e}function me(){pe++}function ve(){for(pe--;!pe&&ye.length;)ye.shift()()}function ge(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&ae(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}const ye=[];function _e(e,t,n){me();for(const o of e.keys())if(o._dirtyLevel<t&&e.get(o)===o._trackId){const e=o._dirtyLevel;o._dirtyLevel=t,0===e&&(o._shouldSchedule=!0,o.trigger())}be(e),ve()}function be(e){for(const t of e.keys())t.scheduler&&t._shouldSchedule&&(!t._runnings||t.allowRecurse)&&e.get(t)===t._trackId&&(t._shouldSchedule=!1,ye.push(t.scheduler))}const Ce=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},xe=new WeakMap,Se=Symbol(""),Ee=Symbol("");function we(e,t,n){if(ue&&te){let t=xe.get(e);t||xe.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Ce((()=>t.delete(n)))),ge(te,o)}}function ke(e,t,n,o,r,s){const i=xe.get(e);if(!i)return;let l=[];if("clear"===t)l=[...i.values()];else if("length"===n&&f(e)){const e=Number(o);i.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":f(e)?w(n)&&l.push(i.get("length")):(l.push(i.get(Se)),d(e)&&l.push(i.get(Ee)));break;case"delete":f(e)||(l.push(i.get(Se)),d(e)&&l.push(i.get(Ee)));break;case"set":d(e)&&l.push(i.get(Se))}me();for(const c of l)c&&_e(c,2);ve()}const Ae=t("__proto__,__v_isRef,__isVue"),Te=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),Re=Ne();function Ne(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=_t(this);for(let t=0,r=this.length;t<r;t++)we(n,0,t+"");const o=n[t](...e);return-1===o||!1===o?n[t](...e.map(_t)):o}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){de(),me();const n=_t(this)[t].apply(this,e);return ve(),he(),n}})),e}function Oe(e){const t=_t(this);return we(t,0,e),t.hasOwnProperty(e)}class Fe{constructor(e=!1,t=!1){this._isReadonly=e,this._shallow=t}get(e,t,n){const o=this._isReadonly,r=this._shallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?ut:at:r?ct:lt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=f(e);if(!o){if(s&&p(Re,t))return Reflect.get(Re,t,n);if("hasOwnProperty"===t)return Oe}const i=Reflect.get(e,t,n);return(y(t)?Te.has(t):Ae(t))?i:(o||we(e,0,t),r?i:kt(i)?s&&w(t)?i:i.value:_(i)?o?dt(i):pt(i):i)}}class Le extends Fe{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._shallow){const t=vt(r);if(gt(n)||vt(n)||(r=_t(r),n=_t(n)),!f(e)&&kt(r)&&!kt(n))return!t&&(r.value=n,!0)}const s=f(e)&&w(t)?Number(t)<e.length:p(e,t),i=Reflect.set(e,t,n,o);return e===_t(o)&&(s?P(n,r)&&ke(e,"set",t,n):ke(e,"add",t,n)),i}deleteProperty(e,t){const n=p(e,t),o=Reflect.deleteProperty(e,t);return o&&n&&ke(e,"delete",t,void 0),o}has(e,t){const n=Reflect.has(e,t);return y(t)&&Te.has(t)||we(e,0,t),n}ownKeys(e){return we(e,0,f(e)?"length":Se),Reflect.ownKeys(e)}}class Pe extends Fe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}}const Me=new Le,Ie=new Pe,Ve=new Le(!0),Be=new Pe(!0),Ue=e=>e,$e=e=>Reflect.getPrototypeOf(e);function De(e,t,n=!1,o=!1){const r=_t(e=e.__v_raw),s=_t(t);n||(P(t,s)&&we(r,0,t),we(r,0,s));const{has:i}=$e(r),l=o?Ue:n?xt:Ct;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function je(e,t=!1){const n=this.__v_raw,o=_t(n),r=_t(e);return t||(P(e,r)&&we(o,0,e),we(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function He(e,t=!1){return e=e.__v_raw,!t&&we(_t(e),0,Se),Reflect.get(e,"size",e)}function We(e){e=_t(e);const t=_t(this);return $e(t).has.call(t,e)||(t.add(e),ke(t,"add",e,e)),this}function Ke(e,t){t=_t(t);const n=_t(this),{has:o,get:r}=$e(n);let s=o.call(n,e);s||(e=_t(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?P(t,i)&&ke(n,"set",e,t):ke(n,"add",e,t),this}function ze(e){const t=_t(this),{has:n,get:o}=$e(t);let r=n.call(t,e);r||(e=_t(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&ke(t,"delete",e,void 0),s}function Ge(){const e=_t(this),t=0!==e.size,n=e.clear();return t&&ke(e,"clear",void 0,void 0),n}function qe(e,t){return function(n,o){const r=this,s=r.__v_raw,i=_t(s),l=t?Ue:e?xt:Ct;return!e&&we(i,0,Se),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function Je(e,t,n){return function(...o){const r=this.__v_raw,s=_t(r),i=d(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?Ue:t?xt:Ct;return!t&&we(s,0,c?Ee:Se),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Xe(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Ye(){const e={get(e){return De(this,e)},get size(){return He(this)},has:je,add:We,set:Ke,delete:ze,clear:Ge,forEach:qe(!1,!1)},t={get(e){return De(this,e,!1,!0)},get size(){return He(this)},has:je,add:We,set:Ke,delete:ze,clear:Ge,forEach:qe(!1,!0)},n={get(e){return De(this,e,!0)},get size(){return He(this,!0)},has(e){return je.call(this,e,!0)},add:Xe("add"),set:Xe("set"),delete:Xe("delete"),clear:Xe("clear"),forEach:qe(!0,!1)},o={get(e){return De(this,e,!0,!0)},get size(){return He(this,!0)},has(e){return je.call(this,e,!0)},add:Xe("add"),set:Xe("set"),delete:Xe("delete"),clear:Xe("clear"),forEach:qe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Je(r,!1,!1),n[r]=Je(r,!0,!1),t[r]=Je(r,!1,!0),o[r]=Je(r,!0,!0)})),[e,n,t,o]}const[Ze,Qe,et,tt]=Ye();function nt(e,t){const n=t?e?tt:et:e?Qe:Ze;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(p(n,o)&&o in t?n:t,o,r)}const ot={get:nt(!1,!1)},rt={get:nt(!1,!0)},st={get:nt(!0,!1)},it={get:nt(!0,!0)},lt=new WeakMap,ct=new WeakMap,at=new WeakMap,ut=new WeakMap;function pt(e){return vt(e)?e:ht(e,!1,Me,ot,lt)}function ft(e){return ht(e,!1,Ve,rt,ct)}function dt(e){return ht(e,!0,Ie,st,at)}function ht(e,t,n,o,r){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(S(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function mt(e){return vt(e)?mt(e.__v_raw):!(!e||!e.__v_isReactive)}function vt(e){return!(!e||!e.__v_isReadonly)}function gt(e){return!(!e||!e.__v_isShallow)}function yt(e){return mt(e)||vt(e)}function _t(e){const t=e&&e.__v_raw;return t?_t(t):e}function bt(e){return I(e,"__v_skip",!0),e}const Ct=e=>_(e)?pt(e):e,xt=e=>_(e)?dt(e):e;class St{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new se((()=>e(this._value)),(()=>wt(this,1)),(()=>this.dep&&be(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=_t(this);return e._cacheable&&!e.effect.dirty||P(e._value,e._value=e.effect.run())&&wt(e,2),Et(e),e.effect._dirtyLevel>=1&&wt(e,1),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Et(e){ue&&te&&(e=_t(e),ge(te,e.dep||(e.dep=Ce((()=>e.dep=void 0),e instanceof St?e:void 0))))}function wt(e,t=2,n){const o=(e=_t(e)).dep;o&&_e(o,t)}function kt(e){return!(!e||!0!==e.__v_isRef)}function At(e){return Tt(e,!1)}function Tt(e,t){return kt(e)?e:new Rt(e,t)}class Rt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:_t(e),this._value=t?e:Ct(e)}get value(){return Et(this),this._value}set value(e){const t=this.__v_isShallow||gt(e)||vt(e);e=t?e:_t(e),P(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Ct(e),wt(this,2))}}function Nt(e){return kt(e)?e.value:e}const Ot={get:(e,t,n)=>Nt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return kt(r)&&!kt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Ft(e){return mt(e)?e:new Proxy(e,Ot)}class Lt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>Et(this)),(()=>wt(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function Pt(e){return new Lt(e)}class Mt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=_t(this._object),t=this._key,null==(n=xe.get(e))?void 0:n.get(t);var e,t,n}}class It{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Vt(e,t,n){const o=e[t];return kt(o)?o:new Mt(e,t,n)}function Bt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){$t(s,t,n)}return r}function Ut(e,t,n,o){if(v(e)){const r=Bt(e,t,n,o);return r&&b(r)&&r.catch((e=>{$t(e,t,n)})),r}const r=[];for(let s=0;s<e.length;s++)r.push(Ut(e[s],t,n,o));return r}function $t(e,t,n,o=!0){if(t){let o=t.parent;const r=t.proxy,s=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const t=o.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,r,s))return;o=o.parent}const i=t.appContext.config.errorHandler;if(i)return void Bt(i,null,10,[e,r,s])}!function(e,t,n,o=!0){console.error(e)}(e,0,0,o)}let Dt=!1,jt=!1;const Ht=[];let Wt=0;const Kt=[];let zt=null,Gt=0;const qt=Promise.resolve();let Jt=null;function Xt(e){const t=Jt||qt;return e?t.then(this?e.bind(this):e):t}function Yt(e){Ht.length&&Ht.includes(e,Dt&&e.allowRecurse?Wt+1:Wt)||(null==e.id?Ht.push(e):Ht.splice(function(e){let t=Wt+1,n=Ht.length;for(;t<n;){const o=t+n>>>1,r=Ht[o],s=nn(r);s<e||s===e&&r.pre?t=o+1:n=o}return t}(e.id),0,e),Zt())}function Zt(){Dt||jt||(jt=!0,Jt=qt.then(rn))}function Qt(e){f(e)?Kt.push(...e):zt&&zt.includes(e,e.allowRecurse?Gt+1:Gt)||Kt.push(e),Zt()}function en(e,t,n=(Dt?Wt+1:0)){for(;n<Ht.length;n++){const t=Ht[n];if(t&&t.pre){if(e&&t.id!==e.uid)continue;Ht.splice(n,1),n--,t()}}}function tn(e){if(Kt.length){const e=[...new Set(Kt)].sort(((e,t)=>nn(e)-nn(t)));if(Kt.length=0,zt)return void zt.push(...e);for(zt=e,Gt=0;Gt<zt.length;Gt++)zt[Gt]();zt=null,Gt=0}}const nn=e=>null==e.id?1/0:e.id,on=(e,t)=>{const n=nn(e)-nn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function rn(e){jt=!1,Dt=!0,Ht.sort(on);try{for(Wt=0;Wt<Ht.length;Wt++){const e=Ht[Wt];e&&!1!==e.active&&Bt(e,null,14)}}finally{Wt=0,Ht.length=0,tn(),Dt=!1,Jt=null,(Ht.length||Kt.length)&&rn()}}function sn(e,t,...o){if(e.isUnmounted)return;const r=e.vnode.props||n;let s=o;const i=t.startsWith("update:"),l=i&&t.slice(7);if(l&&l in r){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:t,trim:i}=r[e]||n;i&&(s=o.map((e=>g(e)?e.trim():e))),t&&(s=o.map(V))}let c,a=r[c=L(t)]||r[c=L(R(t))];!a&&i&&(a=r[c=L(O(t))]),a&&Ut(a,e,6,s);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Ut(u,e,6,s)}}function ln(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!v(e)){const o=e=>{const n=ln(e,t,!0);n&&(l=!0,c(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(f(s)?s.forEach((e=>i[e]=null)):c(i,s),_(e)&&o.set(e,i),i):(_(e)&&o.set(e,null),null)}function cn(e,t){return!(!e||!i(t))&&(t=t.slice(2).replace(/Once$/,""),p(e,t[0].toLowerCase()+t.slice(1))||p(e,O(t))||p(e,t))}let an=null,un=null;function pn(e){const t=an;return an=e,un=e&&e.type.__scopeId||null,t}function fn(e,t=an,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Ur(-1);const r=pn(t);let s;try{s=e(...n)}finally{pn(r),o._d&&Ur(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function dn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:c,attrs:a,emit:u,render:p,renderCache:f,data:d,setupState:h,ctx:m,inheritAttrs:v}=e;let g,y;const _=pn(e);try{if(4&n.shapeFlag){const e=r||o;g=Zr(p.call(e,e,f,s,h,d,m)),y=a}else{const e=t;0,g=Zr(e(s,e.length>1?{attrs:a,slots:c,emit:u}:null)),y=t.props?a:hn(a)}}catch(C){Pr.length=0,$t(C,e,1),g=qr(Fr)}let b=g;if(y&&!1!==v){const e=Object.keys(y),{shapeFlag:t}=b;e.length&&7&t&&(i&&e.some(l)&&(y=mn(y,i)),b=Xr(b,y))}return n.dirs&&(b=Xr(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),g=b,pn(_),g}const hn=e=>{let t;for(const n in e)("class"===n||"style"===n||i(n))&&((t||(t={}))[n]=e[n]);return t},mn=(e,t)=>{const n={};for(const o in e)l(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function vn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r<o.length;r++){const s=o[r];if(t[s]!==e[s]&&!cn(n,s))return!0}return!1}function gn({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}const yn="components";const _n=Symbol.for("v-ndc");function bn(e,t,n=!0,o=!1){const r=an||ss;if(r){const n=r.type;if(e===yn){const e=_s(n,!1);if(e&&(e===t||e===R(t)||e===F(R(t))))return n}const s=Cn(r[e]||n[e],t)||Cn(r.appContext[e],t);return!s&&o?n:s}}function Cn(e,t){return e&&(e[t]||e[R(t)]||e[F(R(t))])}const xn=e=>e.__isSuspense;let Sn=0;const En={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){if(null==e)!function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,p=u("div"),f=e.suspense=kn(e,r,o,t,p,n,s,i,l,c);a(null,f.pendingBranch=e.ssContent,p,null,o,f,s,i),f.deps>0?(wn(e,"onPending"),wn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),Rn(f,e.ssFallback)):f.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a);else{if(s&&s.deps>0)return void(t.suspense=e.suspense);!function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const f=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:v,isHydrating:g}=p;if(m)p.pendingBranch=f,Hr(f,m)?(c(m,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():v&&(g||(c(h,d,n,o,r,null,s,i,l),Rn(p,d)))):(p.pendingId=Sn++,g?(p.isHydrating=!1,p.activeBranch=m):a(m,r,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),v?(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():(c(h,d,n,o,r,null,s,i,l),Rn(p,d))):h&&Hr(f,h)?(c(h,f,n,o,r,p,s,i,l),p.resolve(!0)):(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0&&p.resolve()));else if(h&&Hr(f,h))c(h,f,n,o,r,p,s,i,l),Rn(p,f);else if(wn(t,"onPending"),p.pendingBranch=f,p.pendingId=512&f.shapeFlag?f.component.suspenseId:Sn++,c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0)p.resolve();else{const{timeout:e,pendingId:t}=p;e>0?setTimeout((()=>{p.pendingId===t&&p.fallback(d)}),e):0===e&&p.fallback(d)}}(e,t,n,o,r,i,l,c,a)}},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=kn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve(!1,!0);return u},create:kn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=An(o?n.default:n),e.ssFallback=o?An(n.fallback):qr(Fr)}};function wn(e,t){const n=e.props&&e.props[t];v(n)&&n()}function kn(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:p,m:f,um:d,n:h,o:{parentNode:m,remove:v}}=a;let g;const y=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);y&&(null==t?void 0:t.pendingBranch)&&(g=t.pendingId,t.deps++);const _=e.props?B(e.props.timeout):void 0,b=s,C={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:Sn++,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=C;let p=!1;C.isHydrating?C.isHydrating=!1:e||(p=r&&i.transition&&"out-in"===i.transition.mode,p&&(r.transition.afterLeave=()=>{l===C.pendingId&&(f(i,u,s===b?h(r):s,0),Qt(c))}),r&&(m(r.el)!==C.hiddenContainer&&(s=h(r)),d(r,a,C,!0)),p||f(i,u,s,0)),Rn(C,i),C.pendingBranch=null,C.isInFallback=!1;let v=C.parent,_=!1;for(;v;){if(v.pendingBranch){v.effects.push(...c),_=!0;break}v=v.parent}_||p||Qt(c),C.effects=[],y&&t&&t.pendingBranch&&g===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),wn(o,"onResolve")},fallback(e){if(!C.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,namespace:s}=C;wn(t,"onFallback");const i=h(n),a=()=>{C.isInFallback&&(p(null,e,r,i,o,null,s,l,c),Rn(C,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),C.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){C.activeBranch&&f(C.activeBranch,e,t,n),C.container=e},next:()=>C.activeBranch&&h(C.activeBranch),registerDep(e,t){const n=!!C.pendingBranch;n&&C.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{$t(t,e,0)})).then((r=>{if(e.isUnmounted||C.isUnmounted||C.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;ms(e,r,!1),o&&(s.el=o);const l=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),C,i,c),l&&v(l),gn(e,s.el),n&&0==--C.deps&&C.resolve()}))},unmount(e,t){C.isUnmounted=!0,C.activeBranch&&d(C.activeBranch,n,e,t),C.pendingBranch&&d(C.pendingBranch,n,e,t)}};return C}function An(e){let t;if(v(e)){const n=Br&&e._c;n&&(e._d=!1,Ir()),e=e(),n&&(e._d=!0,t=Mr,Vr())}if(f(e)){const t=function(e,t=!0){let n;for(let o=0;o<e.length;o++){const t=e[o];if(!jr(t))return;if(t.type!==Fr||"v-if"===t.children){if(n)return;n=t}}return n}(e);e=t}return e=Zr(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter((t=>t!==e))),e}function Tn(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):Qt(e)}function Rn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,gn(o,r))}const Nn=Symbol.for("v-scx");function On(e,t){return Mn(e,null,{flush:"post"})}function Fn(e,t){return Mn(e,null,{flush:"sync"})}const Ln={};function Pn(e,t,n){return Mn(e,t,n)}function Mn(e,t,{immediate:o,deep:s,flush:i,once:l}=n){if(t&&l){const e=t;t=(...t)=>{e(...t),S()}}const c=ss,u=e=>!0===s?e:Bn(e,!1===s?1:void 0);let p,d,h=!1,m=!1;if(kt(e)?(p=()=>e.value,h=gt(e)):mt(e)?(p=()=>u(e),h=!0):f(e)?(m=!0,h=e.some((e=>mt(e)||gt(e))),p=()=>e.map((e=>kt(e)?e.value:mt(e)?u(e):v(e)?Bt(e,c,2):void 0))):p=v(e)?t?()=>Bt(e,c,2):()=>(d&&d(),Ut(e,c,3,[g])):r,t&&s){const e=p;p=()=>Bn(e())}let g=e=>{d=C.onStop=()=>{Bt(e,c,4),d=C.onStop=void 0}},y=m?new Array(e.length).fill(Ln):Ln;const _=()=>{if(C.active&&C.dirty)if(t){const e=C.run();(s||h||(m?e.some(((e,t)=>P(e,y[t]))):P(e,y)))&&(d&&d(),Ut(t,c,3,[e,y===Ln?void 0:m&&y[0]===Ln?[]:y,g]),y=e)}else C.run()};let b;_.allowRecurse=!!t,"sync"===i?b=_:"post"===i?b=()=>hr(_,c&&c.suspense):(_.pre=!0,c&&(_.id=c.uid),b=()=>Yt(_));const C=new se(p,r,b),x=re(),S=()=>{C.stop(),x&&a(x.effects,C)};return t?o?_():y=C.run():"post"===i?hr(C.run.bind(C),c&&c.suspense):C.run(),S}function In(e,t,n){const o=this.proxy,r=g(e)?e.includes(".")?Vn(o,e):()=>o[e]:e.bind(o,o);let s;v(t)?s=t:(s=t.handler,n=t);const i=as(this),l=Mn(r,s.bind(o),n);return i(),l}function Vn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function Bn(e,t,n=0,o){if(!_(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),kt(e))Bn(e.value,t,n,o);else if(f(e))for(let r=0;r<e.length;r++)Bn(e[r],t,n,o);else if(h(e)||d(e))e.forEach((e=>{Bn(e,t,n,o)}));else if(E(e))for(const r in e)Bn(e[r],t,n,o);return e}function Un(e,t,n,o){const r=e.dirs,s=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];s&&(l.oldValue=s[i].value);let c=l.dir[o];c&&(de(),Ut(c,n,8,[e.el,l,e,t]),he())}}const $n=Symbol("_leaveCb"),Dn=Symbol("_enterCb");function jn(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ho((()=>{e.isMounted=!0})),go((()=>{e.isUnmounting=!0})),e}const Hn=[Function,Array],Wn={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Hn,onEnter:Hn,onAfterEnter:Hn,onEnterCancelled:Hn,onBeforeLeave:Hn,onLeave:Hn,onAfterLeave:Hn,onLeaveCancelled:Hn,onBeforeAppear:Hn,onAppear:Hn,onAfterAppear:Hn,onAppearCancelled:Hn},Kn={name:"BaseTransition",props:Wn,setup(e,{slots:t}){const n=is(),o=jn();let r;return()=>{const s=t.default&&Yn(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1)for(const e of s)if(e.type!==Fr){i=e;break}const l=_t(e),{mode:c}=l;if(o.isLeaving)return qn(i);const a=Jn(i);if(!a)return qn(i);const u=Gn(a,l,o,n);Xn(a,u);const p=n.subTree,f=p&&Jn(p);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(f&&f.type!==Fr&&(!Hr(a,f)||d)){const e=Gn(f,l,o,n);if(Xn(f,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},qn(i);"in-out"===c&&a.type!==Fr&&(e.delayLeave=(e,t,n)=>{zn(o,f)[String(f.key)]=f,e[$n]=()=>{t(),e[$n]=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function zn(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Gn(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:v,onAppear:g,onAfterAppear:y,onAppearCancelled:_}=t,b=String(e.key),C=zn(n,e),x=(e,t)=>{e&&Ut(e,o,9,t)},S=(e,t)=>{const n=t[1];x(e,t),f(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},E={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=v||l}t[$n]&&t[$n](!0);const s=C[b];s&&Hr(e,s)&&s.el[$n]&&s.el[$n](),x(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=g||c,o=y||a,s=_||u}let i=!1;const l=e[Dn]=t=>{i||(i=!0,x(t?s:o,[e]),E.delayedLeave&&E.delayedLeave(),e[Dn]=void 0)};t?S(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t[Dn]&&t[Dn](!0),n.isUnmounting)return o();x(p,[t]);let s=!1;const i=t[$n]=n=>{s||(s=!0,o(),x(n?m:h,[t]),t[$n]=void 0,C[r]===e&&delete C[r])};C[r]=e,d?S(d,[t,i]):i()},clone:e=>Gn(e,t,n,o)};return E}function qn(e){if(to(e))return(e=Xr(e)).children=null,e}function Jn(e){return to(e)?e.children?e.children[0]:void 0:e}function Xn(e,t){6&e.shapeFlag&&e.component?Xn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Yn(e,t=!1,n){let o=[],r=0;for(let s=0;s<e.length;s++){let i=e[s];const l=null==n?i.key:String(n)+String(null!=i.key?i.key:s);i.type===Nr?(128&i.patchFlag&&r++,o=o.concat(Yn(i.children,t,l))):(t||i.type!==Fr)&&o.push(null!=l?Xr(i,{key:l}):i)}if(r>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o} +/*! #__NO_SIDE_EFFECTS__ */function Zn(e,t){return v(e)?(()=>c({name:e.name},t,{setup:e}))():e}const Qn=e=>!!e.type.__asyncLoader +/*! #__NO_SIDE_EFFECTS__ */;function eo(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=qr(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const to=e=>e.type.__isKeepAlive,no={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=is(),o=n.ctx,r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:p}}}=o,f=p("div");function d(e){co(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=_s(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);i&&Hr(t,i)?i&&co(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),hr((()=>{s.isDeactivated=!1,s.a&&M(s.a);const t=e.props&&e.props.onVnodeMounted;t&&ns(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;a(e,f,null,1,l),hr((()=>{t.da&&M(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&ns(n,t.parent,e),t.isDeactivated=!0}),l)},Pn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>oo(e,t))),t&&h((e=>!oo(t,e)))}),{flush:"post",deep:!0});let v=null;const g=()=>{null!=v&&r.set(v,ao(n.subTree))};return ho(g),vo(g),go((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=ao(t);if(e.type!==r.type||e.key!==r.key)d(e);else{co(r);const e=r.component.da;e&&hr(e,o)}}))})),()=>{if(v=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!(jr(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let l=ao(o);const c=l.type,a=_s(Qn(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:p,max:f}=e;if(u&&(!a||!oo(u,a))||p&&a&&oo(p,a))return i=l,o;const d=null==l.key?c:l.key,h=r.get(d);return l.el&&(l=Xr(l),128&o.shapeFlag&&(o.ssContent=l)),v=d,h?(l.el=h.el,l.component=h.component,l.transition&&Xn(l,l.transition),l.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),f&&s.size>parseInt(f,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,xn(o.type)?o:l}}};function oo(e,t){return f(e)?e.some((e=>oo(e,t))):g(e)?e.split(",").includes(t):"[object RegExp]"===x(e)&&e.test(t)}function ro(e,t){io(e,"a",t)}function so(e,t){io(e,"da",t)}function io(e,t,n=ss){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(uo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)to(e.parent.vnode)&&lo(o,t,n,e),e=e.parent}}function lo(e,t,n,o){const r=uo(t,e,o,!0);yo((()=>{a(o[t],r)}),n)}function co(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ao(e){return 128&e.shapeFlag?e.ssContent:e}function uo(e,t,n=ss,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;de();const r=as(n),s=Ut(t,n,e,o);return r(),he(),s});return o?r.unshift(s):r.push(s),s}}const po=e=>(t,n=ss)=>(!hs||"sp"===e)&&uo(e,((...e)=>t(...e)),n),fo=po("bm"),ho=po("m"),mo=po("bu"),vo=po("u"),go=po("bum"),yo=po("um"),_o=po("sp"),bo=po("rtg"),Co=po("rtc");function xo(e,t=ss){uo("ec",e,t)}function So(e){return e.some((e=>!jr(e)||e.type!==Fr&&!(e.type===Nr&&!So(e.children))))?e:null}const Eo=e=>e?ps(e)?ys(e)||e.proxy:Eo(e.parent):null,wo=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Eo(e.parent),$root:e=>Eo(e.root),$emit:e=>e.emit,$options:e=>Mo(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Yt(e.update)}),$nextTick:e=>e.n||(e.n=Xt.bind(e.proxy)),$watch:e=>In.bind(e)}),ko=(e,t)=>e!==n&&!e.__isScriptSetup&&p(e,t),Ao={get({_:e},t){const{ctx:o,setupState:r,data:s,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==t[0]){const c=l[t];if(void 0!==c)switch(c){case 1:return r[t];case 2:return s[t];case 4:return o[t];case 3:return i[t]}else{if(ko(r,t))return l[t]=1,r[t];if(s!==n&&p(s,t))return l[t]=2,s[t];if((u=e.propsOptions[0])&&p(u,t))return l[t]=3,i[t];if(o!==n&&p(o,t))return l[t]=4,o[t];Oo&&(l[t]=0)}}const f=wo[t];let d,h;return f?("$attrs"===t&&we(e,0,t),f(e)):(d=c.__cssModules)&&(d=d[t])?d:o!==n&&p(o,t)?(l[t]=4,o[t]):(h=a.config.globalProperties,p(h,t)?h[t]:void 0)},set({_:e},t,o){const{data:r,setupState:s,ctx:i}=e;return ko(s,t)?(s[t]=o,!0):r!==n&&p(r,t)?(r[t]=o,!0):!p(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(i[t]=o,!0))},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:s,propsOptions:i}},l){let c;return!!o[l]||e!==n&&p(e,l)||ko(t,l)||(c=i[0])&&p(c,l)||p(r,l)||p(wo,l)||p(s.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:p(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},To=c({},Ao,{get(e,t){if(t!==Symbol.unscopables)return Ao.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!D(t)});function Ro(){const e=is();return e.setupContext||(e.setupContext=gs(e))}function No(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Oo=!0;function Fo(e){const t=Mo(e),n=e.proxy,o=e.ctx;Oo=!1,t.beforeCreate&&Lo(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:c,provide:a,inject:u,created:p,beforeMount:d,mounted:h,beforeUpdate:m,updated:g,activated:y,deactivated:b,beforeUnmount:C,unmounted:x,render:S,renderTracked:E,renderTriggered:w,errorCaptured:k,serverPrefetch:A,expose:T,inheritAttrs:R,components:N,directives:O}=t;if(u&&function(e,t,n=r){f(e)&&(e=Uo(e));for(const o in e){const n=e[o];let r;r=_(n)?"default"in n?qo(n.from||o,n.default,!0):qo(n.from||o):qo(n),kt(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(u,o,null),l)for(const r in l){const e=l[r];v(e)&&(o[r]=e.bind(n))}if(s){const t=s.call(n,n);_(t)&&(e.data=pt(t))}if(Oo=!0,i)for(const f in i){const e=i[f],t=v(e)?e.bind(n,n):v(e.get)?e.get.bind(n,n):r,s=!v(e)&&v(e.set)?e.set.bind(n):r,l=bs({get:t,set:s});Object.defineProperty(o,f,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const r in c)Po(c[r],o,n,r);if(a){const e=v(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Go(t,e[t])}))}function F(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&Lo(p,e,"c"),F(fo,d),F(ho,h),F(mo,m),F(vo,g),F(ro,y),F(so,b),F(xo,k),F(Co,E),F(bo,w),F(go,C),F(yo,x),F(_o,A),f(T))if(T.length){const t=e.exposed||(e.exposed={});T.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===r&&(e.render=S),null!=R&&(e.inheritAttrs=R),N&&(e.components=N),O&&(e.directives=O)}function Lo(e,t,n){Ut(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Po(e,t,n,o){const r=o.includes(".")?Vn(n,o):()=>n[o];if(g(e)){const n=t[e];v(n)&&Pn(r,n)}else if(v(e))Pn(r,e.bind(n));else if(_(e))if(f(e))e.forEach((e=>Po(e,t,n,o)));else{const o=v(e.handler)?e.handler.bind(n):t[e.handler];v(o)&&Pn(r,o,e)}}function Mo(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>Io(c,e,i,!0))),Io(c,t,i)):c=t,_(t)&&s.set(t,c),c}function Io(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Io(e,s,n,!0),r&&r.forEach((t=>Io(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=Vo[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const Vo={data:Bo,props:jo,emits:jo,methods:Do,computed:Do,beforeCreate:$o,created:$o,beforeMount:$o,mounted:$o,beforeUpdate:$o,updated:$o,beforeDestroy:$o,beforeUnmount:$o,destroyed:$o,unmounted:$o,activated:$o,deactivated:$o,errorCaptured:$o,serverPrefetch:$o,components:Do,directives:Do,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const o in t)n[o]=$o(e[o],t[o]);return n},provide:Bo,inject:function(e,t){return Do(Uo(e),Uo(t))}};function Bo(e,t){return t?e?function(){return c(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Uo(e){if(f(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function $o(e,t){return e?[...new Set([].concat(e,t))]:t}function Do(e,t){return e?c(Object.create(null),e,t):t}function jo(e,t){return e?f(e)&&f(t)?[...new Set([...e,...t])]:c(Object.create(null),No(e),No(null!=t?t:{})):t}function Ho(){return{app:null,config:{isNativeTag:s,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Wo=0;function Ko(e,t){return function(n,o=null){v(n)||(n=c({},n)),null==o||_(o)||(o=null);const r=Ho(),s=new WeakSet;let i=!1;const l=r.app={_uid:Wo++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:Ss,get config(){return r.config},set config(e){},use:(e,...t)=>(s.has(e)||(e&&v(e.install)?(s.add(e),e.install(l,...t)):v(e)&&(s.add(e),e(l,...t))),l),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),l),component:(e,t)=>t?(r.components[e]=t,l):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,l):r.directives[e],mount(s,c,a){if(!i){const u=qr(n,o);return u.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),c&&t?t(u,s):e(u,s,a),i=!0,l._container=s,s.__vue_app__=l,ys(u.component)||u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,l),runWithContext(e){zo=l;try{return e()}finally{zo=null}}};return l}}let zo=null;function Go(e,t){if(ss){let n=ss.provides;const o=ss.parent&&ss.parent.provides;o===n&&(n=ss.provides=Object.create(o)),n[e]=t}else;}function qo(e,t,n=!1){const o=ss||an;if(o||zo){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:zo._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&v(t)?t.call(o&&o.proxy):t}}function Jo(e,t,o,r){const[s,i]=e.propsOptions;let l,c=!1;if(t)for(let n in t){if(k(n))continue;const a=t[n];let u;s&&p(s,u=R(n))?i&&i.includes(u)?(l||(l={}))[u]=a:o[u]=a:cn(e.emitsOptions,n)||n in r&&a===r[n]||(r[n]=a,c=!0)}if(i){const t=_t(o),r=l||n;for(let n=0;n<i.length;n++){const l=i[n];o[l]=Xo(s,t,l,r[l],e,!p(r,l))}}return c}function Xo(e,t,n,o,r,s){const i=e[n];if(null!=i){const e=p(i,"default");if(e&&void 0===o){const e=i.default;if(i.type!==Function&&!i.skipFactory&&v(e)){const{propsDefaults:s}=r;if(n in s)o=s[n];else{const i=as(r);o=s[n]=e.call(null,t),i()}}else o=e}i[0]&&(s&&!e?o=!1:!i[1]||""!==o&&o!==O(n)||(o=!0))}return o}function Yo(e,t,r=!1){const s=t.propsCache,i=s.get(e);if(i)return i;const l=e.props,a={},u=[];let d=!1;if(!v(e)){const n=e=>{d=!0;const[n,o]=Yo(e,t,!0);c(a,n),o&&u.push(...o)};!r&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!l&&!d)return _(e)&&s.set(e,o),o;if(f(l))for(let o=0;o<l.length;o++){const e=R(l[o]);Zo(e)&&(a[e]=n)}else if(l)for(const n in l){const e=R(n);if(Zo(e)){const t=l[n],o=a[e]=f(t)||v(t)?{type:t}:c({},t);if(o){const t=tr(Boolean,o.type),n=tr(String,o.type);o[0]=t>-1,o[1]=n<0||t<n,(t>-1||p(o,"default"))&&u.push(e)}}}const h=[a,u];return _(e)&&s.set(e,h),h}function Zo(e){return"$"!==e[0]}function Qo(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function er(e,t){return Qo(e)===Qo(t)}function tr(e,t){return f(t)?t.findIndex((t=>er(t,e))):v(t)&&er(t,e)?0:-1}const nr=e=>"_"===e[0]||"$stable"===e,or=e=>f(e)?e.map(Zr):[Zr(e)],rr=(e,t,n)=>{if(t._n)return t;const o=fn(((...e)=>or(t(...e))),n);return o._c=!1,o},sr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(nr(r))continue;const n=e[r];if(v(n))t[r]=rr(0,n,o);else if(null!=n){const e=or(n);t[r]=()=>e}}},ir=(e,t)=>{const n=or(t);e.slots.default=()=>n},lr=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=_t(t),I(t,"_",n)):sr(t,e.slots={})}else e.slots={},t&&ir(e,t);I(e.slots,Wr,1)},cr=(e,t,o)=>{const{vnode:r,slots:s}=e;let i=!0,l=n;if(32&r.shapeFlag){const e=t._;e?o&&1===e?i=!1:(c(s,t),o||1!==e||delete s._):(i=!t.$stable,sr(t,s)),l=t}else t&&(ir(e,t),l={default:1});if(i)for(const n in s)nr(n)||null!=l[n]||delete s[n]};function ar(e,t,o,r,s=!1){if(f(e))return void e.forEach(((e,n)=>ar(e,t&&(f(t)?t[n]:t),o,r,s)));if(Qn(r)&&!s)return;const i=4&r.shapeFlag?ys(r.component)||r.component.proxy:r.el,l=s?null:i,{i:c,r:u}=e,d=t&&t.r,h=c.refs===n?c.refs={}:c.refs,m=c.setupState;if(null!=d&&d!==u&&(g(d)?(h[d]=null,p(m,d)&&(m[d]=null)):kt(d)&&(d.value=null)),v(u))Bt(u,c,12,[l,h]);else{const t=g(u),n=kt(u),r=e.f;if(t||n){const c=()=>{if(r){const n=t?p(m,u)?m[u]:h[u]:u.value;s?f(n)&&a(n,i):f(n)?n.includes(i)||n.push(i):t?(h[u]=[i],p(m,u)&&(m[u]=h[u])):(u.value=[i],e.k&&(h[e.k]=u.value))}else t?(h[u]=l,p(m,u)&&(m[u]=l)):n&&(u.value=l,e.k&&(h[e.k]=l))};s||r?c():(c.id=-1,hr(c,o))}}}let ur=!1;const pr=e=>(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0,fr=e=>8===e.nodeType;function dr(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:l,remove:c,insert:a,createComment:u}}=e,p=(n,o,i,c,u,_=!1)=>{const b=fr(n)&&"["===n.data,C=()=>m(n,o,i,c,u,b),{type:x,ref:S,shapeFlag:E,patchFlag:w}=o;let k=n.nodeType;o.el=n,-2===w&&(_=!1,o.dynamicChildren=null);let A=null;switch(x){case Or:3!==k?""===o.children?(a(o.el=r(""),l(n),n),A=n):A=C():(n.data!==o.children&&(ur=!0,n.data=o.children),A=s(n));break;case Fr:y(n)?(A=s(n),g(o.el=n.content.firstChild,n,i)):A=8!==k||b?C():s(n);break;case Lr:if(b&&(k=(n=s(n)).nodeType),1===k||3===k){A=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=1===A.nodeType?A.outerHTML:A.data),t===o.staticCount-1&&(o.anchor=A),A=s(A);return b?s(A):A}C();break;case Nr:A=b?h(n,o,i,c,u,_):C();break;default:if(1&E)A=1===k&&o.type.toLowerCase()===n.tagName.toLowerCase()||y(n)?f(n,o,i,c,u,_):C();else if(6&E){o.slotScopeIds=u;const e=l(n);if(A=b?v(n):fr(n)&&"teleport start"===n.data?v(n,n.data,"teleport end"):s(n),t(o,e,null,i,c,pr(e),_),Qn(o)){let t;b?(t=qr(Nr),t.anchor=A?A.previousSibling:e.lastChild):t=3===n.nodeType?Yr(""):qr("div"),t.el=n,o.component.subTree=t}}else 64&E?A=8!==k?C():o.type.hydrate(n,o,i,c,u,_,e,d):128&E&&(A=o.type.hydrate(n,o,i,c,pr(l(n)),u,_,e,p))}return null!=S&&ar(S,null,c,o),A},f=(e,t,n,r,s,l)=>{l=l||!!t.dynamicChildren;const{type:a,props:u,patchFlag:p,shapeFlag:f,dirs:h,transition:m}=t,v="input"===a||"option"===a;if(v||-1!==p){h&&Un(t,null,n,"created");let a,_=!1;if(y(e)){_=br(r,m)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;_&&m.beforeEnter(o),g(o,e,n),t.el=e=o}if(16&f&&(!u||!u.innerHTML&&!u.textContent)){let o=d(e.firstChild,t,e,n,r,s,l);for(;o;){ur=!0;const e=o;o=o.nextSibling,c(e)}}else 8&f&&e.textContent!==t.children&&(ur=!0,e.textContent=t.children);if(u)if(v||!l||48&p)for(const t in u)(v&&(t.endsWith("value")||"indeterminate"===t)||i(t)&&!k(t)||"."===t[0])&&o(e,t,null,u[t],void 0,void 0,n);else u.onClick&&o(e,"onClick",null,u.onClick,void 0,void 0,n);(a=u&&u.onVnodeBeforeMount)&&ns(a,n,t),h&&Un(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||h||_)&&Tn((()=>{a&&ns(a,n,t),_&&m.enter(e),h&&Un(t,null,n,"mounted")}),r)}return e.nextSibling},d=(e,t,o,r,s,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let u=0;u<a;u++){const t=l?c[u]:c[u]=Zr(c[u]);if(e)e=p(e,t,r,s,i,l);else{if(t.type===Or&&!t.children)continue;ur=!0,n(null,t,o,null,r,s,pr(o),i)}}return e},h=(e,t,n,o,r,i)=>{const{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);const p=l(e),f=d(s(e),t,p,n,o,r,i);return f&&fr(f)&&"]"===f.data?s(t.anchor=f):(ur=!0,a(t.anchor=u("]"),p,f),f)},m=(e,t,o,r,i,a)=>{if(ur=!0,t.el=null,a){const t=v(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const u=s(e),p=l(e);return c(e),n(null,t,p,u,o,r,pr(p),i),u},v=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=s(e))&&fr(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return s(e);o--}return e},g=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},y=e=>1===e.nodeType&&"template"===e.tagName.toLowerCase();return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),tn(),void(t._vnode=e);ur=!1,p(t.firstChild,e,null,null,null),tn(),t._vnode=e,ur&&console.error("Hydration completed but contains mismatches.")},p]}const hr=Tn;function mr(e){return gr(e)}function vr(e){return gr(e,dr)}function gr(e,t){$().__VUE__=!0;const{insert:s,remove:i,patchProp:l,createElement:c,createText:a,createComment:u,setText:f,setElementText:d,parentNode:h,nextSibling:m,setScopeId:v=r,insertStaticContent:g}=e,y=(e,t,n,o=null,r=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Hr(e,t)&&(o=Y(e),z(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:p}=t;switch(a){case Or:_(e,t,n,o);break;case Fr:C(e,t,n,o);break;case Lr:null==e&&x(t,n,o,i);break;case Nr:L(e,t,n,o,r,s,i,l,c);break;default:1&p?S(e,t,n,o,r,s,i,l,c):6&p?P(e,t,n,o,r,s,i,l,c):(64&p||128&p)&&a.process(e,t,n,o,r,s,i,l,c,ee)}null!=u&&r&&ar(u,e&&e.ref,s,t||e,!t)},_=(e,t,n,o)=>{if(null==e)s(t.el=a(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},C=(e,t,n,o)=>{null==e?s(t.el=u(t.children||""),n,o):t.el=e.el},x=(e,t,n,o)=>{[e.el,e.anchor]=g(e.children,t,n,o,e.el,e.anchor)},S=(e,t,n,o,r,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?E(t,n,o,r,s,i,l,c):T(e,t,r,s,i,l,c)},E=(e,t,n,o,r,i,a,u)=>{let p,f;const{props:h,shapeFlag:m,transition:v,dirs:g}=e;if(p=e.el=c(e.type,i,h&&h.is,h),8&m?d(p,e.children):16&m&&A(e.children,p,null,o,r,yr(e,i),a,u),g&&Un(e,null,o,"created"),w(p,e,e.scopeId,a,o),h){for(const t in h)"value"===t||k(t)||l(p,t,null,h[t],i,e.children,o,r,X);"value"in h&&l(p,"value",null,h.value,i),(f=h.onVnodeBeforeMount)&&ns(f,o,e)}g&&Un(e,null,o,"beforeMount");const y=br(r,v);y&&v.beforeEnter(p),s(p,t,n),((f=h&&h.onVnodeMounted)||y||g)&&hr((()=>{f&&ns(f,o,e),y&&v.enter(p),g&&Un(e,null,o,"mounted")}),r)},w=(e,t,n,o,r)=>{if(n&&v(e,n),o)for(let s=0;s<o.length;s++)v(e,o[s]);if(r){if(t===r.subTree){const t=r.vnode;w(e,t,t.scopeId,t.slotScopeIds,r.parent)}}},A=(e,t,n,o,r,s,i,l,c=0)=>{for(let a=c;a<e.length;a++){const c=e[a]=l?Qr(e[a]):Zr(e[a]);y(null,c,t,n,o,r,s,i,l)}},T=(e,t,o,r,s,i,c)=>{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:p,dirs:f}=t;u|=16&e.patchFlag;const h=e.props||n,m=t.props||n;let v;if(o&&_r(o,!1),(v=m.onVnodeBeforeUpdate)&&ns(v,o,t,e),f&&Un(t,e,o,"beforeUpdate"),o&&_r(o,!0),p?N(e.dynamicChildren,p,a,o,r,yr(t,s),i):c||j(e,t,a,null,o,r,yr(t,s),i,!1),u>0){if(16&u)F(a,t,h,m,o,r,s);else if(2&u&&h.class!==m.class&&l(a,"class",null,m.class,s),4&u&&l(a,"style",h.style,m.style,s),8&u){const n=t.dynamicProps;for(let t=0;t<n.length;t++){const i=n[t],c=h[i],u=m[i];u===c&&"value"!==i||l(a,i,c,u,s,e.children,o,r,X)}}1&u&&e.children!==t.children&&d(a,t.children)}else c||null!=p||F(a,t,h,m,o,r,s);((v=m.onVnodeUpdated)||f)&&hr((()=>{v&&ns(v,o,t,e),f&&Un(t,e,o,"updated")}),r)},N=(e,t,n,o,r,s,i)=>{for(let l=0;l<t.length;l++){const c=e[l],a=t[l],u=c.el&&(c.type===Nr||!Hr(c,a)||70&c.shapeFlag)?h(c.el):n;y(c,a,u,null,o,r,s,i,!0)}},F=(e,t,o,r,s,i,c)=>{if(o!==r){if(o!==n)for(const n in o)k(n)||n in r||l(e,n,o[n],null,c,t.children,s,i,X);for(const n in r){if(k(n))continue;const a=r[n],u=o[n];a!==u&&"value"!==n&&l(e,n,u,a,c,t.children,s,i,X)}"value"in r&&l(e,"value",o.value,r.value,c)}},L=(e,t,n,o,r,i,l,c,u)=>{const p=t.el=e?e.el:a(""),f=t.anchor=e?e.anchor:a("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(s(p,n,o),s(f,n,o),A(t.children||[],n,f,r,i,l,c,u)):d>0&&64&d&&h&&e.dynamicChildren?(N(e.dynamicChildren,h,n,r,i,l,c),(null!=t.key||r&&t===r.subTree)&&Cr(e,t,!0)):j(e,t,n,f,r,i,l,c,u)},P=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):V(t,n,o,r,s,i,c):B(e,t,c)},V=(e,t,o,r,s,i,l)=>{const c=e.component=function(e,t,o){const r=e.type,s=(t?t.appContext:e.appContext)||os,i={uid:rs++,vnode:e,type:r,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new ne(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Yo(r,s),emitsOptions:ln(r,s),emit:null,emitted:null,propsDefaults:n,inheritAttrs:r.inheritAttrs,ctx:n,data:n,props:n,attrs:n,slots:n,refs:n,setupState:n,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=t?t.root:i,i.emit=sn.bind(null,i),e.ce&&e.ce(i);return i}(e,r,s);if(to(e)&&(c.ctx.renderer=ee),function(e,t=!1){t&&cs(t);const{props:n,children:o}=e.vnode,r=ps(e);(function(e,t,n,o=!1){const r={},s={};I(s,Wr,1),e.propsDefaults=Object.create(null),Jo(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);e.props=n?o?r:ft(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),lr(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=bt(new Proxy(e.ctx,Ao));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?gs(e):null,r=as(e);de();const s=Bt(o,e,0,[e.props,n]);if(he(),r(),b(s)){if(s.then(us,us),t)return s.then((n=>{ms(e,n,t)})).catch((t=>{$t(t,e,0)}));e.asyncDep=s}else ms(e,s,t)}else vs(e,t)}(e,t):void 0;t&&cs(!1)}(c),c.asyncDep){if(s&&s.registerDep(c,U),!e.el){const e=c.subTree=qr(Fr);C(null,e,t,o)}}else U(c,e,t,o,s,i,l)},B=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||vn(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?vn(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(i[n]!==o[n]&&!cn(a,n))return!0}}return!1}(e,t,n)){if(o.asyncDep&&!o.asyncResolved)return void D(o,t,n);o.next=t,function(e){const t=Ht.indexOf(e);t>Wt&&Ht.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},U=(e,t,n,o,s,i,l)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:r,vnode:a}=e;{const n=xr(e);if(n)return t&&(t.el=a.el,D(e,t,l)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let u,p=t;_r(e,!1),t?(t.el=a.el,D(e,t,l)):t=a,n&&M(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&ns(u,r,t,a),_r(e,!0);const f=dn(e),d=e.subTree;e.subTree=f,y(d,f,h(d.el),Y(d),e,s,i),t.el=f.el,null===p&&gn(e,f.el),o&&hr(o,s),(u=t.props&&t.props.onVnodeUpdated)&&hr((()=>ns(u,r,t,a)),s)}else{let r;const{el:l,props:c}=t,{bm:a,m:u,parent:p}=e,f=Qn(t);if(_r(e,!1),a&&M(a),!f&&(r=c&&c.onVnodeBeforeMount)&&ns(r,p,t),_r(e,!0),l&&oe){const n=()=>{e.subTree=dn(e),oe(l,e.subTree,e,s,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const r=e.subTree=dn(e);y(null,r,n,o,e,s,i),t.el=r.el}if(u&&hr(u,s),!f&&(r=c&&c.onVnodeMounted)){const e=t;hr((()=>ns(r,p,e)),s)}(256&t.shapeFlag||p&&Qn(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&hr(e.a,s),e.isMounted=!0,t=n=o=null}},a=e.effect=new se(c,r,(()=>Yt(u)),e.scope),u=e.update=()=>{a.dirty&&a.run()};u.id=e.uid,_r(e,!0),u()},D=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=_t(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;Jo(e,t,r,s)&&(a=!0);for(const s in l)t&&(p(t,s)||(o=O(s))!==s&&p(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Xo(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&p(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o<n.length;o++){let i=n[o];if(cn(e.emitsOptions,i))continue;const u=t[i];if(c)if(p(s,i))u!==s[i]&&(s[i]=u,a=!0);else{const t=R(i);r[t]=Xo(c,l,t,u,e,!1)}else u!==s[i]&&(s[i]=u,a=!0)}}a&&ke(e,"set","$attrs")}(e,t.props,o,n),cr(e,t.children,n),de(),en(e),he()},j=(e,t,n,o,r,s,i,l,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,p=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f)return void W(a,p,n,o,r,s,i,l,c);if(256&f)return void H(a,p,n,o,r,s,i,l,c)}8&h?(16&u&&X(a,r,s),p!==a&&d(n,p)):16&u?16&h?W(a,p,n,o,r,s,i,l,c):X(a,r,s,!0):(8&u&&d(n,""),16&h&&A(p,n,o,r,s,i,l,c))},H=(e,t,n,r,s,i,l,c,a)=>{const u=(e=e||o).length,p=(t=t||o).length,f=Math.min(u,p);let d;for(d=0;d<f;d++){const o=t[d]=a?Qr(t[d]):Zr(t[d]);y(e[d],o,n,null,s,i,l,c,a)}u>p?X(e,s,i,!0,!1,f):A(t,n,r,s,i,l,c,a,f)},W=(e,t,n,r,s,i,l,c,a)=>{let u=0;const p=t.length;let f=e.length-1,d=p-1;for(;u<=f&&u<=d;){const o=e[u],r=t[u]=a?Qr(t[u]):Zr(t[u]);if(!Hr(o,r))break;y(o,r,n,null,s,i,l,c,a),u++}for(;u<=f&&u<=d;){const o=e[f],r=t[d]=a?Qr(t[d]):Zr(t[d]);if(!Hr(o,r))break;y(o,r,n,null,s,i,l,c,a),f--,d--}if(u>f){if(u<=d){const e=d+1,o=e<p?t[e].el:r;for(;u<=d;)y(null,t[u]=a?Qr(t[u]):Zr(t[u]),n,o,s,i,l,c,a),u++}}else if(u>d)for(;u<=f;)z(e[u],s,i,!0),u++;else{const h=u,m=u,v=new Map;for(u=m;u<=d;u++){const e=t[u]=a?Qr(t[u]):Zr(t[u]);null!=e.key&&v.set(e.key,u)}let g,_=0;const b=d-m+1;let C=!1,x=0;const S=new Array(b);for(u=0;u<b;u++)S[u]=0;for(u=h;u<=f;u++){const o=e[u];if(_>=b){z(o,s,i,!0);continue}let r;if(null!=o.key)r=v.get(o.key);else for(g=m;g<=d;g++)if(0===S[g-m]&&Hr(o,t[g])){r=g;break}void 0===r?z(o,s,i,!0):(S[r-m]=u+1,r>=x?x=r:C=!0,y(o,t[r],n,null,s,i,l,c,a),_++)}const E=C?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o<c;o++){const c=e[o];if(0!==c){if(r=n[n.length-1],e[r]<c){t[o]=r,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<c?s=l+1:i=l;c<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(S):o;for(g=E.length-1,u=b-1;u>=0;u--){const e=m+u,o=t[e],f=e+1<p?t[e+1].el:r;0===S[u]?y(null,o,n,f,s,i,l,c,a):C&&(g<0||u!==E[g]?K(o,n,f,2):g--)}}},K=(e,t,n,o,r=null)=>{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void K(e.component.subTree,t,n,o);if(128&u)return void e.suspense.move(t,n,o);if(64&u)return void l.move(e,t,n,ee);if(l===Nr){s(i,t,n);for(let e=0;e<a.length;e++)K(a[e],t,n,o);return void s(e.anchor,t,n)}if(l===Lr)return void(({el:e,anchor:t},n,o)=>{let r;for(;e&&e!==t;)r=m(e),s(e,n,o),e=r;s(t,n,o)})(e,t,n);if(2!==o&&1&u&&c)if(0===o)c.beforeEnter(i),s(i,t,n),hr((()=>c.enter(i)),r);else{const{leave:e,delayLeave:o,afterLeave:r}=c,l=()=>s(i,t,n),a=()=>{e(i,(()=>{l(),r&&r()}))};o?o(i,l,a):a()}else s(i,t,n)},z=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:p,dirs:f}=e;if(null!=l&&ar(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&f,h=!Qn(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&ns(m,t,e),6&u)J(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&Un(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ee,o):a&&(s!==Nr||p>0&&64&p)?X(a,t,n,!1,!0):(s===Nr&&384&p||!r&&16&u)&&X(c,t,n),o&&G(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&hr((()=>{m&&ns(m,t,e),d&&Un(e,null,t,"unmounted")}),n)},G=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===Nr)return void q(n,o);if(t===Lr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)})(e);const s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,i=()=>t(n,s);o?o(e.el,s,i):i()}else s()},q=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},J=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&M(o),r.stop(),s&&(s.active=!1,z(i,e,t,n)),l&&hr(l,t),hr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},X=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i<e.length;i++)z(e[i],t,n,o,r)},Y=e=>6&e.shapeFlag?Y(e.component.subTree):128&e.shapeFlag?e.suspense.next():m(e.anchor||e.el);let Z=!1;const Q=(e,t,n)=>{null==e?t._vnode&&z(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,en(),tn(),Z=!1),t._vnode=e},ee={p:y,um:z,m:K,r:G,mt:V,mc:A,pc:j,pbc:N,n:Y,o:e};let te,oe;return t&&([te,oe]=t(ee)),{render:Q,hydrate:te,createApp:Ko(Q,te)}}function yr({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function _r({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function br(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cr(e,t,n=!1){const o=e.children,r=t.children;if(f(o)&&f(r))for(let s=0;s<o.length;s++){const e=o[s];let t=r[s];1&t.shapeFlag&&!t.dynamicChildren&&((t.patchFlag<=0||32===t.patchFlag)&&(t=r[s]=Qr(r[s]),t.el=e.el),n||Cr(e,t)),t.type===Or&&(t.el=e.el)}}function xr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:xr(t)}const Sr=e=>e&&(e.disabled||""===e.disabled),Er=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,wr=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,kr=(e,t)=>{const n=e&&e.to;if(g(n)){if(t){return t(n)}return null}return n};function Ar(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,p=2===s;if(p&&o(i,t,n),(!p||Sr(u))&&16&c)for(let f=0;f<a.length;f++)r(a[f],t,n,2);p&&o(l,t,n)}const Tr={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,s,i,l,c,a){const{mc:u,pc:p,pbc:f,o:{insert:d,querySelector:h,createText:m}}=a,v=Sr(t.props);let{shapeFlag:g,children:y,dynamicChildren:_}=t;if(null==e){const e=t.el=m(""),a=t.anchor=m("");d(e,n,o),d(a,n,o);const p=t.target=kr(t.props,h),f=t.targetAnchor=m("");p&&(d(f,p),"svg"===i||Er(p)?i="svg":("mathml"===i||wr(p))&&(i="mathml"));const _=(e,t)=>{16&g&&u(y,e,t,r,s,i,l,c)};v?_(n,a):p&&_(p,f)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=Sr(e.props),g=m?n:u,y=m?o:d;if("svg"===i||Er(u)?i="svg":("mathml"===i||wr(u))&&(i="mathml"),_?(f(e.dynamicChildren,_,g,r,s,i,l),Cr(e,t,!0)):c||p(e,t,g,y,r,s,i,l,!1),v)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ar(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=kr(t.props,h);e&&Ar(t,e,null,a,0)}else m&&Ar(t,u,d,a,1)}Rr(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:p,props:f}=e;if(p&&s(u),i&&s(a),16&l){const e=i||!Sr(f);for(let o=0;o<c.length;o++){const s=c[o];r(s,t,n,e,!!s.dynamicChildren)}}},move:Ar,hydrate:function(e,t,n,o,r,s,{o:{nextSibling:i,parentNode:l,querySelector:c}},a){const u=t.target=kr(t.props,c);if(u){const c=u._lpa||u.firstChild;if(16&t.shapeFlag)if(Sr(t.props))t.anchor=a(i(e),t,l(e),n,o,r,s),t.targetAnchor=c;else{t.anchor=i(e);let l=c;for(;l;)if(l=i(l),l&&8===l.nodeType&&"teleport anchor"===l.data){t.targetAnchor=l,u._lpa=t.targetAnchor&&i(t.targetAnchor);break}a(c,t,u,n,o,r,s)}Rr(t)}return t.anchor&&i(t.anchor)}};function Rr(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)1===n.nodeType&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const Nr=Symbol.for("v-fgt"),Or=Symbol.for("v-txt"),Fr=Symbol.for("v-cmt"),Lr=Symbol.for("v-stc"),Pr=[];let Mr=null;function Ir(e=!1){Pr.push(Mr=e?null:[])}function Vr(){Pr.pop(),Mr=Pr[Pr.length-1]||null}let Br=1;function Ur(e){Br+=e}function $r(e){return e.dynamicChildren=Br>0?Mr||o:null,Vr(),Br>0&&Mr&&Mr.push(e),e}function Dr(e,t,n,o,r){return $r(qr(e,t,n,o,r,!0))}function jr(e){return!!e&&!0===e.__v_isVNode}function Hr(e,t){return e.type===t.type&&e.key===t.key}const Wr="__vInternal",Kr=({key:e})=>null!=e?e:null,zr=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?g(e)||kt(e)||v(e)?{i:an,r:e,k:t,f:!!n}:e:null);function Gr(e,t=null,n=null,o=0,r=null,s=(e===Nr?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Kr(t),ref:t&&zr(t),scopeId:un,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:an};return l?(es(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Br>0&&!i&&Mr&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&Mr.push(c),c}const qr=function(e,t=null,n=null,o=0,r=null,s=!1){e&&e!==_n||(e=Fr);if(jr(e)){const o=Xr(e,t,!0);return n&&es(o,n),Br>0&&!s&&Mr&&(6&o.shapeFlag?Mr[Mr.indexOf(e)]=o:Mr.push(o)),o.patchFlag|=-2,o}i=e,v(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=Jr(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=G(e)),_(n)&&(yt(n)&&!f(n)&&(n=c({},n)),t.style=j(n))}const l=g(e)?1:xn(e)?128:(e=>e.__isTeleport)(e)?64:_(e)?4:v(e)?2:0;return Gr(e,t,n,o,r,l,s,!0)};function Jr(e){return e?yt(e)||Wr in e?c({},e):e:null}function Xr(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?ts(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Kr(l),ref:t&&t.ref?n&&r?f(r)?r.concat(zr(t)):[r,zr(t)]:zr(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Nr?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Xr(e.ssContent),ssFallback:e.ssFallback&&Xr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Yr(e=" ",t=0){return qr(Or,null,e,t)}function Zr(e){return null==e||"boolean"==typeof e?qr(Fr):f(e)?qr(Nr,null,e.slice()):"object"==typeof e?Qr(e):qr(Or,null,String(e))}function Qr(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Xr(e)}function es(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),es(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Wr in t?3===o&&an&&(1===an.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=an}}else v(t)?(t={default:t,_ctx:an},n=32):(t=String(t),64&o?(n=16,t=[Yr(t)]):n=8);e.children=t,e.shapeFlag|=n}function ts(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const e in o)if("class"===e)t.class!==o.class&&(t.class=G([t.class,o.class]));else if("style"===e)t.style=j([t.style,o.style]);else if(i(e)){const n=t[e],r=o[e];!r||n===r||f(n)&&n.includes(r)||(t[e]=n?[].concat(n,r):r)}else""!==e&&(t[e]=o[e])}return t}function ns(e,t,n,o=null){Ut(e,t,7,[n,o])}const os=Ho();let rs=0;let ss=null;const is=()=>ss||an;let ls,cs;ls=e=>{ss=e},cs=e=>{hs=e};const as=e=>{const t=ss;return ls(e),e.scope.on(),()=>{e.scope.off(),ls(t)}},us=()=>{ss&&ss.scope.off(),ls(null)};function ps(e){return 4&e.vnode.shapeFlag}let fs,ds,hs=!1;function ms(e,t,n){v(t)?e.render=t:_(t)&&(e.setupState=Ft(t)),vs(e,n)}function vs(e,t,n){const o=e.type;if(!e.render){if(!t&&fs&&!o.render){const t=o.template||Mo(e).template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=c(c({isCustomElement:n,delimiters:s},r),i);o.render=fs(t,l)}}e.render=o.render||r,ds&&ds(e)}{const t=as(e);de();try{Fo(e)}finally{he(),t()}}}function gs(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(we(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function ys(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Ft(bt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in wo?wo[n](e):void 0,has:(e,t)=>t in e||t in wo}))}function _s(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}const bs=(e,t)=>function(e,t,n=!1){let o,s;const i=v(e);return i?(o=e,s=r):(o=e.get,s=e.set),new St(o,s,i||!s,n)}(e,0,hs);function Cs(e,t,n){const o=arguments.length;return 2===o?_(t)&&!f(t)?jr(t)?qr(e,null,[t]):qr(e,t):qr(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&jr(n)&&(n=[n]),qr(e,t,n))}function xs(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o<n.length;o++)if(P(n[o],t[o]))return!1;return Br>0&&Mr&&Mr.push(e),!0}const Ss="3.4.15",Es=r,ws=r,ks="undefined"!=typeof document?document:null,As=ks&&ks.createElement("template"),Ts={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?ks.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?ks.createElementNS("http://www.w3.org/1998/Math/MathML",e):ks.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>ks.createTextNode(e),createComment:e=>ks.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ks.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{As.innerHTML="svg"===o?`<svg>${e}</svg>`:"mathml"===o?`<math>${e}</math>`:e;const r=As.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Rs="transition",Ns="animation",Os=Symbol("_vtc"),Fs=(e,{slots:t})=>Cs(Kn,Vs(e),t);Fs.displayName="Transition";const Ls={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ps=Fs.props=c({},Wn,Ls),Ms=(e,t=[])=>{f(e)?e.forEach((e=>e(...t))):e&&e(...t)},Is=e=>!!e&&(f(e)?e.some((e=>e.length>1)):e.length>1);function Vs(e){const t={};for(const c in e)c in Ls||(t[c]=e[c]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=i,appearToClass:p=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(_(e))return[Bs(e.enter),Bs(e.leave)];{const t=Bs(e);return[t,t]}}(r),v=m&&m[0],g=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:C,onLeave:x,onLeaveCancelled:S,onBeforeAppear:E=y,onAppear:w=b,onAppearCancelled:k=C}=t,A=(e,t,n)=>{$s(e,t?p:l),$s(e,t?u:i),n&&n()},T=(e,t)=>{e._isLeaving=!1,$s(e,f),$s(e,h),$s(e,d),t&&t()},R=e=>(t,n)=>{const r=e?w:b,i=()=>A(t,e,n);Ms(r,[t,i]),Ds((()=>{$s(t,e?a:s),Us(t,e?p:l),Is(r)||Hs(t,o,v,i)}))};return c(t,{onBeforeEnter(e){Ms(y,[e]),Us(e,s),Us(e,i)},onBeforeAppear(e){Ms(E,[e]),Us(e,a),Us(e,u)},onEnter:R(!1),onAppear:R(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>T(e,t);Us(e,f),Gs(),Us(e,d),Ds((()=>{e._isLeaving&&($s(e,f),Us(e,h),Is(x)||Hs(e,o,g,n))})),Ms(x,[e,n])},onEnterCancelled(e){A(e,!1),Ms(C,[e])},onAppearCancelled(e){A(e,!0),Ms(k,[e])},onLeaveCancelled(e){T(e),Ms(S,[e])}})}function Bs(e){return B(e)}function Us(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Os]||(e[Os]=new Set)).add(t)}function $s(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Os];n&&(n.delete(t),n.size||(e[Os]=void 0))}function Ds(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let js=0;function Hs(e,t,n,o){const r=e._endId=++js,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=Ws(e,t);if(!i)return o();const a=i+"end";let u=0;const p=()=>{e.removeEventListener(a,f),s()},f=t=>{t.target===e&&++u>=c&&p()};setTimeout((()=>{u<c&&p()}),l+1),e.addEventListener(a,f)}function Ws(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o(`${Rs}Delay`),s=o(`${Rs}Duration`),i=Ks(r,s),l=o(`${Ns}Delay`),c=o(`${Ns}Duration`),a=Ks(l,c);let u=null,p=0,f=0;t===Rs?i>0&&(u=Rs,p=i,f=s.length):t===Ns?a>0&&(u=Ns,p=a,f=c.length):(p=Math.max(i,a),u=p>0?i>a?Rs:Ns:null,f=u?u===Rs?s.length:c.length:0);return{type:u,timeout:p,propCount:f,hasTransform:u===Rs&&/\b(transform|all)(,|$)/.test(o(`${Rs}Property`).toString())}}function Ks(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>zs(t)+zs(e[n]))))}function zs(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Gs(){return document.body.offsetHeight}const qs=Symbol("_vod"),Js={beforeMount(e,{value:t},{transition:n}){e[qs]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Xs(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Xs(e,!0),o.enter(e)):o.leave(e,(()=>{Xs(e,!1)})):Xs(e,t))},beforeUnmount(e,{value:t}){Xs(e,t)}};function Xs(e,t){e.style.display=t?e[qs]:"none"}const Ys=Symbol("");function Zs(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Zs(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Qs(e.el,t);else if(e.type===Nr)e.children.forEach((e=>Zs(e,t)));else if(e.type===Lr){let{el:n,anchor:o}=e;for(;n&&(Qs(n,t),n!==o);)n=n.nextSibling}}function Qs(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t)n.setProperty(`--${e}`,t[e]),o+=`--${e}: ${t[e]};`;n[Ys]=o}}const ei=/\s*!important$/;function ti(e,t,n){if(f(n))n.forEach((n=>ti(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=oi[t];if(n)return n;let o=R(t);if("filter"!==o&&o in e)return oi[t]=o;o=F(o);for(let r=0;r<ni.length;r++){const n=ni[r]+o;if(n in e)return oi[t]=n}return t}(e,t);ei.test(n)?e.setProperty(O(o),n.replace(ei,""),"important"):e[o]=n}}const ni=["Webkit","Moz","ms"],oi={};const ri="http://www.w3.org/1999/xlink";function si(e,t,n,o){e.addEventListener(t,n,o)}const ii=Symbol("_vei");function li(e,t,n,o,r=null){const s=e[ii]||(e[ii]={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(ci.test(e)){let n;for(t={};n=e.match(ci);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}const n=":"===e[2]?e.slice(3):O(e.slice(2));return[n,t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Ut(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=pi(),n}(o,r);si(e,n,i,l)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}const ci=/(?:Once|Passive|Capture)$/;let ai=0;const ui=Promise.resolve(),pi=()=>ai||(ui.then((()=>ai=0)),ai=Date.now());const fi=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123; +/*! #__NO_SIDE_EFFECTS__ */ +function di(e,t){const n=Zn(e);class o extends mi{constructor(e){super(n,e,t)}}return o.def=n,o} +/*! #__NO_SIDE_EFFECTS__ */const hi="undefined"!=typeof HTMLElement?HTMLElement:class{};class mi extends hi{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),Xt((()=>{this._connected||(Gi(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:o}=e;let r;if(n&&!f(n))for(const s in n){const e=n[s];(e===Number||e&&e.type===Number)&&(s in this._props&&(this._props[s]=B(this._props[s])),(r||(r=Object.create(null)))[R(s)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=f(t)?t:Object.keys(t||{});for(const o of Object.keys(this))"_"!==o[0]&&n.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of n.map(R))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(e){this._setProp(o,e)}})}_setAttr(e){let t=this.getAttribute(e);const n=R(e);this._numberProps&&this._numberProps[n]&&(t=B(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(O(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(O(e),t+""):t||this.removeAttribute(O(e))))}_update(){Gi(this._createVNode(),this.shadowRoot)}_createVNode(){const e=qr(this._def,c({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),O(e)!==e&&t(O(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof mi){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}const vi=new WeakMap,gi=new WeakMap,yi=Symbol("_moveCb"),_i=Symbol("_enterCb"),bi={name:"TransitionGroup",props:c({},Ps,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=is(),o=jn();let r,s;return vo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),r=e[Os];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=Ws(o);return s.removeChild(o),i}(r[0].el,n.vnode.el,t))return;r.forEach(xi),r.forEach(Si);const o=r.filter(Ei);Gs(),o.forEach((e=>{const n=e.el,o=n.style;Us(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n[yi]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[yi]=null,$s(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=_t(e),l=Vs(i);let c=i.tag||Nr;r=s,s=t.default?Yn(t.default()):[];for(let e=0;e<s.length;e++){const t=s[e];null!=t.key&&Xn(t,Gn(t,l,o,n))}if(r)for(let e=0;e<r.length;e++){const t=r[e];Xn(t,Gn(t,l,o,n)),vi.set(t,t.el.getBoundingClientRect())}return qr(c,null,s)}}},Ci=bi;function xi(e){const t=e.el;t[yi]&&t[yi](),t[_i]&&t[_i]()}function Si(e){gi.set(e,e.el.getBoundingClientRect())}function Ei(e){const t=vi.get(e),n=gi.get(e),o=t.left-n.left,r=t.top-n.top;if(o||r){const t=e.el.style;return t.transform=t.webkitTransform=`translate(${o}px,${r}px)`,t.transitionDuration="0s",e}}const wi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>M(t,e):t};function ki(e){e.target.composing=!0}function Ai(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ti=Symbol("_assign"),Ri={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Ti]=wi(r);const s=o||r.props&&"number"===r.props.type;si(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=V(o)),e[Ti](o)})),n&&si(e,"change",(()=>{e.value=e.value.trim()})),t||(si(e,"compositionstart",ki),si(e,"compositionend",Ai),si(e,"change",Ai))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e[Ti]=wi(s),e.composing)return;const i=null==t?"":t;if((r||"number"===e.type?V(e.value):e.value)!==i){if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===i)return}e.value=i}}},Ni={deep:!0,created(e,t,n){e[Ti]=wi(n),si(e,"change",(()=>{const t=e._modelValue,n=Mi(e),o=e.checked,r=e[Ti];if(f(t)){const e=Y(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(h(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Ii(e,o))}))},mounted:Oi,beforeUpdate(e,t,n){e[Ti]=wi(n),Oi(e,t,n)}};function Oi(e,{value:t,oldValue:n},o){e._modelValue=t,f(t)?e.checked=Y(t,o.props.value)>-1:h(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=X(t,Ii(e,!0)))}const Fi={created(e,{value:t},n){e.checked=X(t,n.props.value),e[Ti]=wi(n),si(e,"change",(()=>{e[Ti](Mi(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[Ti]=wi(o),t!==n&&(e.checked=X(t,o.props.value))}},Li={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=h(t);si(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?V(Mi(e)):Mi(e)));e[Ti](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,Xt((()=>{e._assigning=!1}))})),e[Ti]=wi(o)},mounted(e,{value:t,oldValue:n,modifiers:{number:o}}){Pi(e,t,n,o)},beforeUpdate(e,t,n){e[Ti]=wi(n)},updated(e,{value:t,oldValue:n,modifiers:{number:o}}){e._assigning||Pi(e,t,n,o)}};function Pi(e,t,n,o){const r=e.multiple,s=f(t);if((!r||s||h(t))&&(!s||!X(t,n))){for(let n=0,i=e.options.length;n<i;n++){const i=e.options[n],l=Mi(i);if(r)if(s){const e=typeof l;i.selected="string"===e||"number"===e?t.includes(o?V(l):l):Y(t,l)>-1}else i.selected=t.has(l);else if(X(Mi(i),t))return void(e.selectedIndex!==n&&(e.selectedIndex=n))}r||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Mi(e){return"_value"in e?e._value:e.value}function Ii(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Vi={created(e,t,n){Bi(e,t,n,null,"created")},mounted(e,t,n){Bi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Bi(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Bi(e,t,n,o,"updated")}};function Bi(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return Li;case"TEXTAREA":return Ri;default:switch(t){case"checkbox":return Ni;case"radio":return Fi;default:return Ri}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const Ui=["ctrl","shift","alt","meta"],$i={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Ui.some((n=>e[`${n}Key`]&&!t.includes(n)))},Di={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ji=c({patchProp:(e,t,n,o,r,s,c,a,u)=>{const p="svg"===r;"class"===t?function(e,t,n){const o=e[Os];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,p):"style"===t?function(e,t,n){const o=e.style,r=o.display,s=g(n);if(n&&!s){if(t&&!g(t))for(const e in t)null==n[e]&&ti(o,e,"");for(const e in n)ti(o,e,n[e])}else if(s){if(t!==n){const e=o[Ys];e&&(n+=";"+e),o.cssText=n}}else t&&e.removeAttribute("style");qs in e&&(o.display=r)}(e,n,o):i(t)?l(t)||li(e,t,0,o,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&fi(t)&&v(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(fi(t)&&g(n))return!1;return t in e}(e,t,o,p))?function(e,t,n,o,r,s,i){if("innerHTML"===t||"textContent"===t)return o&&i(o,r,s),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=n;const o=null==n?"":n;return("OPTION"===l?e.getAttribute("value"):e.value)!==o&&(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=J(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,o,s,c,a,u):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o,r){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(ri,t.slice(6,t.length)):e.setAttributeNS(ri,t,n);else{const o=q(t);null==n||o&&!J(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,p))}},Ts);let Hi,Wi=!1;function Ki(){return Hi||(Hi=mr(ji))}function zi(){return Hi=Wi?Hi:vr(ji),Wi=!0,Hi}const Gi=(...e)=>{Ki().render(...e)},qi=(...e)=>{zi().hydrate(...e)};function Ji(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Xi(e){if(g(e)){return document.querySelector(e)}return e}const Yi=r;return e.BaseTransition=Kn,e.BaseTransitionPropsValidators=Wn,e.Comment=Fr,e.DeprecationTypes=null,e.EffectScope=ne,e.ErrorCodes={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},e.ErrorTypeStrings=null,e.Fragment=Nr,e.KeepAlive=no,e.ReactiveEffect=se,e.Static=Lr,e.Suspense=En,e.Teleport=Tr,e.Text=Or,e.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},e.Transition=Fs,e.TransitionGroup=Ci,e.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},e.VueElement=mi,e.assertNumber=function(e,t){},e.callWithAsyncErrorHandling=Ut,e.callWithErrorHandling=Bt,e.camelize=R,e.capitalize=F,e.cloneVNode=Xr,e.compatUtils=null,e.compile=()=>{},e.computed=bs,e.createApp=(...e)=>{const t=Ki().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Xi(e);if(!o)return;const r=t._component;v(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,Ji(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},e.createBlock=Dr,e.createCommentVNode=function(e="",t=!1){return t?(Ir(),Dr(Fr,null,e)):qr(Fr,null,e)},e.createElementBlock=function(e,t,n,o,r,s){return $r(Gr(e,t,n,o,r,s,!0))},e.createElementVNode=Gr,e.createHydrationRenderer=vr,e.createPropsRestProxy=function(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n},e.createRenderer=mr,e.createSSRApp=(...e)=>{const t=zi().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Xi(e);if(t)return n(t,!0,Ji(t))},t},e.createSlots=function(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(f(o))for(let t=0;t<o.length;t++)e[o[t].name]=o[t].fn;else o&&(e[o.name]=o.key?(...e)=>{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e},e.createStaticVNode=function(e,t){const n=qr(Lr,null,e);return n.staticCount=t,n},e.createTextVNode=Yr,e.createVNode=qr,e.customRef=Pt,e.defineAsyncComponent=function(e){v(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const p=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,p()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return Zn({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return c},setup(){const e=ss;if(c)return()=>eo(c,e);const t=t=>{a=null,$t(t,e,13,!o)};if(i&&e.suspense)return p().then((t=>()=>eo(t,e))).catch((e=>(t(e),()=>o?qr(o,{error:e}):null)));const l=At(!1),u=At(),f=At(!!r);return r&&setTimeout((()=>{f.value=!1}),r),null!=s&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),p().then((()=>{l.value=!0,e.parent&&to(e.parent.vnode)&&(e.parent.effect.dirty=!0,Yt(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?eo(c,e):u.value&&o?qr(o,{error:u.value}):n&&!f.value?qr(n):void 0}})},e.defineComponent=Zn,e.defineCustomElement=di,e.defineEmits=function(){return null},e.defineExpose=function(e){},e.defineModel=function(){},e.defineOptions=function(e){},e.defineProps=function(){return null},e.defineSSRCustomElement=e=>di(e,qi),e.defineSlots=function(){return null},e.devtools=void 0,e.effect=function(e,t){e.effect instanceof se&&(e=e.effect.fn);const n=new se(e,r,(()=>{n.dirty&&n.run()}));t&&(c(n,t),t.scope&&oe(n,t.scope)),t&&t.lazy||n.run();const o=n.run.bind(n);return o.effect=n,o},e.effectScope=function(e){return new ne(e)},e.getCurrentInstance=is,e.getCurrentScope=re,e.getTransitionRawChildren=Yn,e.guardReactiveProps=Jr,e.h=Cs,e.handleError=$t,e.hasInjectionContext=function(){return!!(ss||an||zo)},e.hydrate=qi,e.initCustomFormatter=function(){},e.initDirectivesForSSR=Yi,e.inject=qo,e.isMemoSame=xs,e.isProxy=yt,e.isReactive=mt,e.isReadonly=vt,e.isRef=kt,e.isRuntimeOnly=()=>!fs,e.isShallow=gt,e.isVNode=jr,e.markRaw=bt,e.mergeDefaults=function(e,t){const n=No(e);for(const o in t){if(o.startsWith("__skip"))continue;let e=n[o];e?f(e)||v(e)?e=n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(e=n[o]={default:t[o]}),e&&t[`__skip_${o}`]&&(e.skipFactory=!0)}return n},e.mergeModels=function(e,t){return e&&t?f(e)&&f(t)?e.concat(t):c({},No(e),No(t)):e||t},e.mergeProps=ts,e.nextTick=Xt,e.normalizeClass=G,e.normalizeProps=function(e){if(!e)return null;let{class:t,style:n}=e;return t&&!g(t)&&(e.class=G(t)),n&&(e.style=j(n)),e},e.normalizeStyle=j,e.onActivated=ro,e.onBeforeMount=fo,e.onBeforeUnmount=go,e.onBeforeUpdate=mo,e.onDeactivated=so,e.onErrorCaptured=xo,e.onMounted=ho,e.onRenderTracked=Co,e.onRenderTriggered=bo,e.onScopeDispose=function(e){ee&&ee.cleanups.push(e)},e.onServerPrefetch=_o,e.onUnmounted=yo,e.onUpdated=vo,e.openBlock=Ir,e.popScopeId=function(){un=null},e.provide=Go,e.proxyRefs=Ft,e.pushScopeId=function(e){un=e},e.queuePostFlushCb=Qt,e.reactive=pt,e.readonly=dt,e.ref=At,e.registerRuntimeCompiler=function(e){fs=e,ds=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,To))}},e.render=Gi,e.renderList=function(e,t,n,o){let r;const s=n&&n[o];if(f(e)||g(e)){r=new Array(e.length);for(let n=0,o=e.length;n<o;n++)r[n]=t(e[n],n,void 0,s&&s[n])}else if("number"==typeof e){r=new Array(e);for(let n=0;n<e;n++)r[n]=t(n+1,n,void 0,s&&s[n])}else if(_(e))if(e[Symbol.iterator])r=Array.from(e,((e,n)=>t(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o<i;o++){const i=n[o];r[o]=t(e[i],i,o,s&&s[o])}}else r=[];return n&&(n[o]=r),r},e.renderSlot=function(e,t,n={},o,r){if(an.isCE||an.parent&&Qn(an.parent)&&an.parent.isCE)return"default"!==t&&(n.name=t),qr("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),Ir();const i=s&&So(s(n)),l=Dr(Nr,{key:n.key||i&&i.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l},e.resolveComponent=function(e,t){return bn(yn,e,!0,t)||e},e.resolveDirective=function(e){return bn("directives",e)},e.resolveDynamicComponent=function(e){return g(e)?bn(yn,e,!1)||e:e||_n},e.resolveFilter=null,e.resolveTransitionHooks=Gn,e.setBlockTracking=Ur,e.setDevtoolsHook=ws,e.setTransitionHooks=Xn,e.shallowReactive=ft,e.shallowReadonly=function(e){return ht(e,!0,Be,it,ut)},e.shallowRef=function(e){return Tt(e,!0)},e.ssrContextKey=Nn,e.ssrUtils=null,e.stop=function(e){e.effect.stop()},e.toDisplayString=e=>g(e)?e:null==e?"":f(e)||_(e)&&(e.toString===C||!v(e.toString))?JSON.stringify(e,Z,2):String(e),e.toHandlerKey=L,e.toHandlers=function(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:L(o)]=e[o];return n},e.toRaw=_t,e.toRef=function(e,t,n){return kt(e)?e:v(e)?new It(e):_(e)&&arguments.length>1?Vt(e,t,n):At(e)},e.toRefs=function(e){const t=f(e)?new Array(e.length):{};for(const n in e)t[n]=Vt(e,n);return t},e.toValue=function(e){return v(e)?e():Nt(e)},e.transformVNodeArgs=function(e){},e.triggerRef=function(e){wt(e,2)},e.unref=Nt,e.useAttrs=function(){return Ro().attrs},e.useCssModule=function(e="$style"){return n},e.useCssVars=function(e){const t=is();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>Qs(e,n)))},o=()=>{const o=e(t.proxy);Zs(t.subTree,o),n(o)};On(o),ho((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),yo((()=>e.disconnect()))}))},e.useModel=function(e,t,o=n){const r=is(),s=R(t),i=O(t),l=Pt(((n,l)=>{let c;return Fn((()=>{const n=e[t];P(c,n)&&(c=n,l())})),{get:()=>(n(),o.get?o.get(c):c),set(e){const n=r.vnode.props;n&&(t in n||s in n||i in n)&&(`onUpdate:${t}`in n||`onUpdate:${s}`in n||`onUpdate:${i}`in n)||!P(e,c)||(c=e,l()),r.emit(`update:${t}`,o.set?o.set(e):e)}}})),c="modelValue"===t?"modelModifiers":`${t}Modifiers`;return l[Symbol.iterator]=()=>{let t=0;return{next:()=>t<2?{value:t++?e[c]||{}:l,done:!1}:{done:!0}}},l},e.useSSRContext=()=>{},e.useSlots=function(){return Ro().slots},e.useTransitionState=jn,e.vModelCheckbox=Ni,e.vModelDynamic=Vi,e.vModelRadio=Fi,e.vModelSelect=Li,e.vModelText=Ri,e.vShow=Js,e.version=Ss,e.warn=Es,e.watch=Pn,e.watchEffect=function(e,t){return Mn(e,null,t)},e.watchPostEffect=On,e.watchSyncEffect=Fn,e.withAsyncContext=function(e){const t=is();let n=e();return us(),b(n)&&(n=n.catch((e=>{throw as(t),e}))),[n,()=>as(t)]},e.withCtx=fn,e.withDefaults=function(e,t){return null},e.withDirectives=function(e,t){if(null===an)return e;const o=ys(an)||an.proxy,r=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[e,i,l,c=n]=t[s];e&&(v(e)&&(e={mounted:e,updated:e}),e.deep&&Bn(i),r.push({dir:e,instance:o,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e},e.withKeys=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=O(n.key);return t.some((e=>e===o||Di[e]===o))?e(n):void 0})},e.withMemo=function(e,t,n,o){const r=n[o];if(r&&xs(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s},e.withModifiers=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e<t.length;e++){const o=$i[t[e]];if(o&&o(n,t))return}return e(n,...o)})},e.withScopeId=e=>fn,e}({}); diff --git a/node_modules/vue/index.mjs b/node_modules/vue/index.mjs index 8b436124..fcb9204c 100644 --- a/node_modules/vue/index.mjs +++ b/node_modules/vue/index.mjs @@ -1 +1 @@ -export * from './index.js' \ No newline at end of file +export * from './index.js' diff --git a/node_modules/vue/jsx-runtime/index.d.ts b/node_modules/vue/jsx-runtime/index.d.ts new file mode 100644 index 00000000..a52ac66a --- /dev/null +++ b/node_modules/vue/jsx-runtime/index.d.ts @@ -0,0 +1,25 @@ +/* eslint-disable @typescript-eslint/prefer-ts-expect-error */ +import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom' + +/** + * JSX namespace for usage with @jsxImportsSource directive + * when ts compilerOptions.jsx is 'react-jsx' or 'react-jsxdev' + * https://www.typescriptlang.org/tsconfig#jsxImportSource + */ +export { h as jsx, h as jsxDEV, Fragment } from '@vue/runtime-dom' + +export namespace JSX { + export interface Element extends VNode {} + export interface ElementClass { + $props: {} + } + export interface ElementAttributesProperty { + $props: {} + } + export interface IntrinsicElements extends NativeElements { + // allow arbitrary elements + // @ts-ignore suppress ts:2374 = Duplicate string index signature. + [name: string]: any + } + export interface IntrinsicAttributes extends ReservedProps {} +} diff --git a/node_modules/vue/jsx-runtime/index.js b/node_modules/vue/jsx-runtime/index.js new file mode 100644 index 00000000..73b137d5 --- /dev/null +++ b/node_modules/vue/jsx-runtime/index.js @@ -0,0 +1,15 @@ +const { h, Fragment } = require('vue') + +function jsx(type, props, key) { + const { children } = props + delete props.children + if (arguments.length > 2) { + props.key = key + } + return h(type, props, children) +} + +exports.jsx = jsx +exports.jsxs = jsx +exports.jsxDEV = jsx +exports.Fragment = Fragment diff --git a/node_modules/vue/jsx-runtime/index.mjs b/node_modules/vue/jsx-runtime/index.mjs new file mode 100644 index 00000000..e2528cba --- /dev/null +++ b/node_modules/vue/jsx-runtime/index.mjs @@ -0,0 +1,12 @@ +import { h, Fragment } from 'vue' + +function jsx(type, props, key) { + const { children } = props + delete props.children + if (arguments.length > 2) { + props.key = key + } + return h(type, props, children) +} + +export { Fragment, jsx, jsx as jsxs, jsx as jsxDEV } diff --git a/node_modules/vue/jsx-runtime/package.json b/node_modules/vue/jsx-runtime/package.json new file mode 100644 index 00000000..778c7ebf --- /dev/null +++ b/node_modules/vue/jsx-runtime/package.json @@ -0,0 +1,5 @@ +{ + "main": "index.js", + "module": "index.mjs", + "types": "index.d.ts" +} diff --git a/node_modules/vue/jsx.d.ts b/node_modules/vue/jsx.d.ts new file mode 100644 index 00000000..1fa1e326 --- /dev/null +++ b/node_modules/vue/jsx.d.ts @@ -0,0 +1,22 @@ +/* eslint-disable @typescript-eslint/prefer-ts-expect-error */ +// global JSX namespace registration +// somehow we have to copy=pase the jsx-runtime types here to make TypeScript happy +import type { NativeElements, ReservedProps, VNode } from '@vue/runtime-dom' + +declare global { + namespace JSX { + export interface Element extends VNode {} + export interface ElementClass { + $props: {} + } + export interface ElementAttributesProperty { + $props: {} + } + export interface IntrinsicElements extends NativeElements { + // allow arbitrary elements + // @ts-ignore suppress ts:2374 = Duplicate string index signature. + [name: string]: any + } + export interface IntrinsicAttributes extends ReservedProps {} + } +} diff --git a/node_modules/vue/macros-global.d.ts b/node_modules/vue/macros-global.d.ts deleted file mode 100644 index 9b6f5a53..00000000 --- a/node_modules/vue/macros-global.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - $ as _$, - $$ as _$$, - $ref as _$ref, - $shallowRef as _$shallowRef, - $computed as _$computed, - $customRef as _$customRef, - $toRef as _$toRef -} from './macros' - -declare global { - const $: typeof _$ - const $$: typeof _$$ - const $ref: typeof _$ref - const $shallowRef: typeof _$shallowRef - const $computed: typeof _$computed - const $customRef: typeof _$customRef - const $toRef: typeof _$toRef -} diff --git a/node_modules/vue/macros.d.ts b/node_modules/vue/macros.d.ts deleted file mode 100644 index 9df3f107..00000000 --- a/node_modules/vue/macros.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { - Ref, - UnwrapRef, - ComputedRef, - WritableComputedOptions, - DebuggerOptions, - WritableComputedRef, - CustomRefFactory -} from '@vue/runtime-dom' - -export declare const RefType: unique symbol - -export declare const enum RefTypes { - Ref = 1, - ComputedRef = 2, - WritableComputedRef = 3 -} - -type RefValue<T> = T extends null | undefined ? T : ReactiveVariable<T> - -type ReactiveVariable<T> = T & { [RefType]?: RefTypes.Ref } - -type ComputedRefValue<T> = T extends null | undefined ? T : ComputedVariable<T> - -type ComputedVariable<T> = T & { [RefType]?: RefTypes.ComputedRef } - -type WritableComputedRefValue<T> = T extends null | undefined - ? T - : WritableComputedVariable<T> - -type WritableComputedVariable<T> = T & { - [RefType]?: RefTypes.WritableComputedRef -} - -type NormalObject<T extends object> = T & { [RefType]?: never } - -/** - * Vue ref transform macro for binding refs as reactive variables. - */ -export declare function $<T>(arg: ComputedRef<T>): ComputedRefValue<T> -export declare function $<T>( - arg: WritableComputedRef<T> -): WritableComputedRefValue<T> -export declare function $<T>(arg: Ref<T>): RefValue<T> -export declare function $<T extends object>(arg?: T): DestructureRefs<T> - -type DestructureRefs<T extends object> = { - [K in keyof T]: T[K] extends ComputedRef<infer V> - ? ComputedRefValue<V> - : T[K] extends WritableComputedRef<infer V> - ? WritableComputedRefValue<V> - : T[K] extends Ref<infer V> - ? RefValue<V> - : T[K] -} - -/** - * Vue ref transform macro for accessing underlying refs of reactive variables. - */ -export declare function $$<T extends object>(arg: NormalObject<T>): ToRawRefs<T> -export declare function $$<T>(value: RefValue<T>): Ref<T> -export declare function $$<T>(value: ComputedRefValue<T>): ComputedRef<T> -export declare function $$<T>( - value: WritableComputedRefValue<T> -): WritableComputedRef<T> - -type ToRawRefs<T extends object> = { - [K in keyof T]: T[K] extends RefValue<infer V> - ? Ref<V> - : T[K] extends ComputedRefValue<infer V> - ? ComputedRef<V> - : T[K] extends WritableComputedRefValue<infer V> - ? WritableComputedRef<V> - : T[K] extends object - ? T[K] extends - | Function - | Map<any, any> - | Set<any> - | WeakMap<any, any> - | WeakSet<any> - ? T[K] - : ToRawRefs<T[K]> - : T[K] -} - -export declare function $ref<T>(arg?: T | Ref<T>): RefValue<UnwrapRef<T>> - -export declare function $shallowRef<T>(arg?: T): RefValue<T> - -export declare function $toRef<T extends object, K extends keyof T>( - object: T, - key: K -): RefValue<T[K]> - -export declare function $toRef<T extends object, K extends keyof T>( - object: T, - key: K, - defaultValue: T[K] -): RefValue<Exclude<T[K], undefined>> - -export declare function $customRef<T>(factory: CustomRefFactory<T>): RefValue<T> - -export declare function $computed<T>( - getter: () => T, - debuggerOptions?: DebuggerOptions -): ComputedRefValue<T> -export declare function $computed<T>( - options: WritableComputedOptions<T>, - debuggerOptions?: DebuggerOptions -): WritableComputedRefValue<T> diff --git a/node_modules/vue/package.json b/node_modules/vue/package.json index b7cad088..9bed48d4 100644 --- a/node_modules/vue/package.json +++ b/node_modules/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.2.36", + "version": "3.4.15", "description": "The progressive JavaScript framework for building modern web UI.", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", @@ -13,32 +13,61 @@ "dist", "compiler-sfc", "server-renderer", - "macros.d.ts", - "macros-global.d.ts", - "ref-macros.d.ts" + "jsx-runtime", + "jsx.d.ts" ], "exports": { ".": { "import": { + "types": "./dist/vue.d.mts", "node": "./index.mjs", "default": "./dist/vue.runtime.esm-bundler.js" }, - "require": "./index.js", - "types": "./dist/vue.d.ts" + "require": { + "types": "./dist/vue.d.ts", + "node": { + "production": "./dist/vue.cjs.prod.js", + "development": "./dist/vue.cjs.js", + "default": "./index.js" + }, + "default": "./index.js" + } }, "./server-renderer": { - "import": "./server-renderer/index.mjs", - "require": "./server-renderer/index.js" + "import": { + "types": "./server-renderer/index.d.mts", + "default": "./server-renderer/index.mjs" + }, + "require": { + "types": "./server-renderer/index.d.ts", + "default": "./server-renderer/index.js" + } }, "./compiler-sfc": { - "import": "./compiler-sfc/index.mjs", - "require": "./compiler-sfc/index.js" + "import": { + "types": "./compiler-sfc/index.d.mts", + "browser": "./compiler-sfc/index.browser.mjs", + "default": "./compiler-sfc/index.mjs" + }, + "require": { + "types": "./compiler-sfc/index.d.ts", + "browser": "./compiler-sfc/index.browser.js", + "default": "./compiler-sfc/index.js" + } }, + "./jsx-runtime": { + "types": "./jsx-runtime/index.d.ts", + "import": "./jsx-runtime/index.mjs", + "require": "./jsx-runtime/index.js" + }, + "./jsx-dev-runtime": { + "types": "./jsx-runtime/index.d.ts", + "import": "./jsx-runtime/index.mjs", + "require": "./jsx-runtime/index.js" + }, + "./jsx": "./jsx.d.ts", "./dist/*": "./dist/*", - "./package.json": "./package.json", - "./macros": "./macros.d.ts", - "./macros-global": "./macros-global.d.ts", - "./ref-macros": "./ref-macros.d.ts" + "./package.json": "./package.json" }, "buildOptions": { "name": "Vue", @@ -66,10 +95,18 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/vue#readme", "dependencies": { - "@vue/shared": "3.2.36", - "@vue/compiler-dom": "3.2.36", - "@vue/runtime-dom": "3.2.36", - "@vue/compiler-sfc": "3.2.36", - "@vue/server-renderer": "3.2.36" + "@vue/compiler-dom": "3.4.15", + "@vue/server-renderer": "3.4.15", + "@vue/runtime-dom": "3.4.15", + "@vue/compiler-sfc": "3.4.15", + "@vue/shared": "3.4.15" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } -} +} \ No newline at end of file diff --git a/node_modules/vue/ref-macros.d.ts b/node_modules/vue/ref-macros.d.ts deleted file mode 100644 index 6afce7f7..00000000 --- a/node_modules/vue/ref-macros.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// TODO deprecated file - to be removed when out of experimental -import './macros-global' diff --git a/node_modules/vue/server-renderer/index.d.mts b/node_modules/vue/server-renderer/index.d.mts new file mode 100644 index 00000000..ac614729 --- /dev/null +++ b/node_modules/vue/server-renderer/index.d.mts @@ -0,0 +1 @@ +export * from '@vue/server-renderer' diff --git a/node_modules/vue/server-renderer/index.mjs b/node_modules/vue/server-renderer/index.mjs index 3e081c15..ac614729 100644 --- a/node_modules/vue/server-renderer/index.mjs +++ b/node_modules/vue/server-renderer/index.mjs @@ -1 +1 @@ -export * from '@vue/server-renderer' \ No newline at end of file +export * from '@vue/server-renderer' diff --git a/node_modules/vue/server-renderer/package.json b/node_modules/vue/server-renderer/package.json index 1b15fb84..4cf44a46 100644 --- a/node_modules/vue/server-renderer/package.json +++ b/node_modules/vue/server-renderer/package.json @@ -1,5 +1,4 @@ { "main": "index.js", - "module": "index.mjs", - "types": "index.d.ts" -} \ No newline at end of file + "module": "index.mjs" +} diff --git a/package-lock.json b/package-lock.json index 62c755a5..dcc766db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,9 +29,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.10.tgz", - "integrity": "sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", + "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", "cpu": [ "ppc64" ], @@ -44,9 +44,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.10.tgz", - "integrity": "sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", + "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", "cpu": [ "arm" ], @@ -59,9 +59,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.10.tgz", - "integrity": "sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", + "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", "cpu": [ "arm64" ], @@ -74,9 +74,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.10.tgz", - "integrity": "sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", + "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", "cpu": [ "x64" ], @@ -89,9 +89,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.10.tgz", - "integrity": "sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", + "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", "cpu": [ "arm64" ], @@ -104,9 +104,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.10.tgz", - "integrity": "sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", + "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", "cpu": [ "x64" ], @@ -119,9 +119,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.10.tgz", - "integrity": "sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", + "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", "cpu": [ "arm64" ], @@ -134,9 +134,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.10.tgz", - "integrity": "sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", + "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", "cpu": [ "x64" ], @@ -149,9 +149,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.10.tgz", - "integrity": "sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", + "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", "cpu": [ "arm" ], @@ -164,9 +164,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.10.tgz", - "integrity": "sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", + "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", "cpu": [ "arm64" ], @@ -179,9 +179,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.10.tgz", - "integrity": "sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", + "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", "cpu": [ "ia32" ], @@ -194,9 +194,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.10.tgz", - "integrity": "sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", + "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", "cpu": [ "loong64" ], @@ -209,9 +209,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.10.tgz", - "integrity": "sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", + "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", "cpu": [ "mips64el" ], @@ -224,9 +224,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.10.tgz", - "integrity": "sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", + "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", "cpu": [ "ppc64" ], @@ -239,9 +239,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.10.tgz", - "integrity": "sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", + "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", "cpu": [ "riscv64" ], @@ -254,9 +254,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.10.tgz", - "integrity": "sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", + "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", "cpu": [ "s390x" ], @@ -269,9 +269,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.10.tgz", - "integrity": "sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", + "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", "cpu": [ "x64" ], @@ -284,9 +284,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.10.tgz", - "integrity": "sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", + "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", "cpu": [ "x64" ], @@ -299,9 +299,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.10.tgz", - "integrity": "sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", + "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", "cpu": [ "x64" ], @@ -314,9 +314,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.10.tgz", - "integrity": "sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", + "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", "cpu": [ "x64" ], @@ -329,9 +329,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.10.tgz", - "integrity": "sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", + "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", "cpu": [ "arm64" ], @@ -344,9 +344,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.10.tgz", - "integrity": "sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", + "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", "cpu": [ "ia32" ], @@ -359,9 +359,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.10.tgz", - "integrity": "sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", + "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", "cpu": [ "x64" ], @@ -428,10 +428,15 @@ "vue": "^3.0.0" } }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.1.tgz", - "integrity": "sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.5.tgz", + "integrity": "sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA==", "cpu": [ "arm" ], @@ -441,9 +446,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.1.tgz", - "integrity": "sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.5.tgz", + "integrity": "sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg==", "cpu": [ "arm64" ], @@ -453,9 +458,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.1.tgz", - "integrity": "sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.5.tgz", + "integrity": "sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w==", "cpu": [ "arm64" ], @@ -465,9 +470,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.1.tgz", - "integrity": "sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.5.tgz", + "integrity": "sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==", "cpu": [ "x64" ], @@ -477,9 +482,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.1.tgz", - "integrity": "sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.5.tgz", + "integrity": "sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g==", "cpu": [ "arm" ], @@ -489,9 +494,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.1.tgz", - "integrity": "sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.5.tgz", + "integrity": "sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA==", "cpu": [ "arm64" ], @@ -501,9 +506,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.1.tgz", - "integrity": "sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.5.tgz", + "integrity": "sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ==", "cpu": [ "arm64" ], @@ -513,9 +518,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.1.tgz", - "integrity": "sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.5.tgz", + "integrity": "sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA==", "cpu": [ "riscv64" ], @@ -525,9 +530,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.1.tgz", - "integrity": "sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.5.tgz", + "integrity": "sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA==", "cpu": [ "x64" ], @@ -537,9 +542,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.1.tgz", - "integrity": "sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.5.tgz", + "integrity": "sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg==", "cpu": [ "x64" ], @@ -549,9 +554,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.1.tgz", - "integrity": "sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.5.tgz", + "integrity": "sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ==", "cpu": [ "arm64" ], @@ -561,9 +566,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.1.tgz", - "integrity": "sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.5.tgz", + "integrity": "sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA==", "cpu": [ "ia32" ], @@ -573,9 +578,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.1.tgz", - "integrity": "sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.5.tgz", + "integrity": "sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==", "cpu": [ "x64" ], @@ -584,10 +589,15 @@ "win32" ] }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + }, "node_modules/@vitejs/plugin-vue": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.0.tgz", - "integrity": "sha512-7x5e8X4J1Wi4NxudGjJBd2OFerAi/0nzF80ojCzvfj347WVr0YSn82C8BSsgwSHzlk9Kw5xnZfj0/7RLnNwP5w==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.3.tgz", + "integrity": "sha512-b8S5dVS40rgHdDrw+DQi/xOM9ed+kSRZzfm1T74bMmBDCd8XO87NKlFYInzCtwvtWwXZvo1QxE2OSspTATWrbA==", "engines": { "node": "^18.0.0 || >=20.0.0" }, @@ -597,106 +607,94 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.36.tgz", - "integrity": "sha512-bbyZM5hvBicv0PW3KUfVi+x3ylHnfKG7DOn5wM+f2OztTzTjLEyBb/5yrarIYpmnGitVGbjZqDbODyW4iK8hqw==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.15.tgz", + "integrity": "sha512-XcJQVOaxTKCnth1vCxEChteGuwG6wqnUHxAm1DO3gCz0+uXKaJNx8/digSz4dLALCy8n2lKq24jSUs8segoqIw==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/shared": "3.2.36", + "@babel/parser": "^7.23.6", + "@vue/shared": "3.4.15", + "entities": "^4.5.0", "estree-walker": "^2.0.2", - "source-map": "^0.6.1" + "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-dom": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.36.tgz", - "integrity": "sha512-tcOTAOiW4s24QLnq+ON6J+GRONXJ+A/mqKCORi0LSlIh8XQlNnlm24y8xIL8la+ZDgkdbjarQ9ZqYSvEja6gVA==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.15.tgz", + "integrity": "sha512-wox0aasVV74zoXyblarOM3AZQz/Z+OunYcIHe1OsGclCHt8RsRm04DObjefaI82u6XDzv+qGWZ24tIsRAIi5MQ==", "dependencies": { - "@vue/compiler-core": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/compiler-core": "3.4.15", + "@vue/shared": "3.4.15" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.36.tgz", - "integrity": "sha512-AvGb4bTj4W8uQ4BqaSxo7UwTEqX5utdRSMyHy58OragWlt8nEACQ9mIeQh3K4di4/SX+41+pJrLIY01lHAOFOA==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.15.tgz", + "integrity": "sha512-LCn5M6QpkpFsh3GQvs2mJUOAlBQcCco8D60Bcqmf3O3w5a+KWS5GvYbrrJBkgvL1BDnTp+e8q0lXCLgHhKguBA==", "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.36", - "@vue/compiler-dom": "3.2.36", - "@vue/compiler-ssr": "3.2.36", - "@vue/reactivity-transform": "3.2.36", - "@vue/shared": "3.2.36", + "@babel/parser": "^7.23.6", + "@vue/compiler-core": "3.4.15", + "@vue/compiler-dom": "3.4.15", + "@vue/compiler-ssr": "3.4.15", + "@vue/shared": "3.4.15", "estree-walker": "^2.0.2", - "magic-string": "^0.25.7", - "postcss": "^8.1.10", - "source-map": "^0.6.1" + "magic-string": "^0.30.5", + "postcss": "^8.4.33", + "source-map-js": "^1.0.2" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.36.tgz", - "integrity": "sha512-+KugInUFRvOxEdLkZwE+W43BqHyhBh0jpYXhmqw1xGq2dmE6J9eZ8UUSOKNhdHtQ/iNLWWeK/wPZkVLUf3YGaw==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.15.tgz", + "integrity": "sha512-1jdeQyiGznr8gjFDadVmOJqZiLNSsMa5ZgqavkPZ8O2wjHv0tVuAEsw5hTdUoUW4232vpBbL/wJhzVW/JwY1Uw==", "dependencies": { - "@vue/compiler-dom": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/compiler-dom": "3.4.15", + "@vue/shared": "3.4.15" } }, "node_modules/@vue/reactivity": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.36.tgz", - "integrity": "sha512-c2qvopo0crh9A4GXi2/2kfGYMxsJW4tVILrqRPydVGZHhq0fnzy6qmclWOhBFckEhmyxmpHpdJtIRYGeKcuhnA==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.15.tgz", + "integrity": "sha512-55yJh2bsff20K5O84MxSvXKPHHt17I2EomHznvFiJCAZpJTNW8IuLj1xZWMLELRhBK3kkFV/1ErZGHJfah7i7w==", "dependencies": { - "@vue/shared": "3.2.36" - } - }, - "node_modules/@vue/reactivity-transform": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.36.tgz", - "integrity": "sha512-Jk5o2BhpODC9XTA7o4EL8hSJ4JyrFWErLtClG3NH8wDS7ri9jBDWxI7/549T7JY9uilKsaNM+4pJASLj5dtRwA==", - "dependencies": { - "@babel/parser": "^7.16.4", - "@vue/compiler-core": "3.2.36", - "@vue/shared": "3.2.36", - "estree-walker": "^2.0.2", - "magic-string": "^0.25.7" + "@vue/shared": "3.4.15" } }, "node_modules/@vue/runtime-core": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.36.tgz", - "integrity": "sha512-PTWBD+Lub+1U3/KhbCExrfxyS14hstLX+cBboxVHaz+kXoiDLNDEYAovPtxeTutbqtClIXtft+wcGdC+FUQ9qQ==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.15.tgz", + "integrity": "sha512-6E3by5m6v1AkW0McCeAyhHTw+3y17YCOKG0U0HDKDscV4Hs0kgNT5G+GCHak16jKgcCDHpI9xe5NKb8sdLCLdw==", "dependencies": { - "@vue/reactivity": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/reactivity": "3.4.15", + "@vue/shared": "3.4.15" } }, "node_modules/@vue/runtime-dom": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.36.tgz", - "integrity": "sha512-gYPYblm7QXHVuBohqNRRT7Wez0f2Mx2D40rb4fleehrJU9CnkjG0phhcGEZFfGwCmHZRqBCRgbFWE98bPULqkg==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.15.tgz", + "integrity": "sha512-EVW8D6vfFVq3V/yDKNPBFkZKGMFSvZrUQmx196o/v2tHKdwWdiZjYUBS+0Ez3+ohRyF8Njwy/6FH5gYJ75liUw==", "dependencies": { - "@vue/runtime-core": "3.2.36", - "@vue/shared": "3.2.36", - "csstype": "^2.6.8" + "@vue/runtime-core": "3.4.15", + "@vue/shared": "3.4.15", + "csstype": "^3.1.3" } }, "node_modules/@vue/server-renderer": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.36.tgz", - "integrity": "sha512-uZE0+jfye6yYXWvAQYeHZv+f50sRryvy16uiqzk3jn8hEY8zTjI+rzlmZSGoE915k+W/Ol9XSw6vxOUD8dGkUg==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.15.tgz", + "integrity": "sha512-3HYzaidu9cHjrT+qGUuDhFYvF/j643bHC6uUN9BgM11DVy+pM6ATsG6uPBLnkwOgs7BpJABReLmpL3ZPAsUaqw==", "dependencies": { - "@vue/compiler-ssr": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/compiler-ssr": "3.4.15", + "@vue/shared": "3.4.15" }, "peerDependencies": { - "vue": "3.2.36" + "vue": "3.4.15" } }, "node_modules/@vue/shared": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.36.tgz", - "integrity": "sha512-JtB41wXl7Au3+Nl3gD16Cfpj7k/6aCroZ6BbOiCMFCMvrOpkg/qQUXTso2XowaNqBbnkuGHurLAqkLBxNGc1hQ==" + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.15.tgz", + "integrity": "sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==" }, "node_modules/asynckit": { "version": "0.4.0", @@ -704,11 +702,11 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.3.tgz", - "integrity": "sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -738,9 +736,9 @@ } }, "node_modules/csstype": { - "version": "2.6.21", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.21.tgz", - "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/deepmerge": { "version": "4.3.1", @@ -771,10 +769,21 @@ "node": ">=0.4.0" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/esbuild": { - "version": "0.19.10", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.10.tgz", - "integrity": "sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA==", + "version": "0.19.11", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", + "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" @@ -783,29 +792,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.10", - "@esbuild/android-arm": "0.19.10", - "@esbuild/android-arm64": "0.19.10", - "@esbuild/android-x64": "0.19.10", - "@esbuild/darwin-arm64": "0.19.10", - "@esbuild/darwin-x64": "0.19.10", - "@esbuild/freebsd-arm64": "0.19.10", - "@esbuild/freebsd-x64": "0.19.10", - "@esbuild/linux-arm": "0.19.10", - "@esbuild/linux-arm64": "0.19.10", - "@esbuild/linux-ia32": "0.19.10", - "@esbuild/linux-loong64": "0.19.10", - "@esbuild/linux-mips64el": "0.19.10", - "@esbuild/linux-ppc64": "0.19.10", - "@esbuild/linux-riscv64": "0.19.10", - "@esbuild/linux-s390x": "0.19.10", - "@esbuild/linux-x64": "0.19.10", - "@esbuild/netbsd-x64": "0.19.10", - "@esbuild/openbsd-x64": "0.19.10", - "@esbuild/sunos-x64": "0.19.10", - "@esbuild/win32-arm64": "0.19.10", - "@esbuild/win32-ia32": "0.19.10", - "@esbuild/win32-x64": "0.19.10" + "@esbuild/aix-ppc64": "0.19.11", + "@esbuild/android-arm": "0.19.11", + "@esbuild/android-arm64": "0.19.11", + "@esbuild/android-x64": "0.19.11", + "@esbuild/darwin-arm64": "0.19.11", + "@esbuild/darwin-x64": "0.19.11", + "@esbuild/freebsd-arm64": "0.19.11", + "@esbuild/freebsd-x64": "0.19.11", + "@esbuild/linux-arm": "0.19.11", + "@esbuild/linux-arm64": "0.19.11", + "@esbuild/linux-ia32": "0.19.11", + "@esbuild/linux-loong64": "0.19.11", + "@esbuild/linux-mips64el": "0.19.11", + "@esbuild/linux-ppc64": "0.19.11", + "@esbuild/linux-riscv64": "0.19.11", + "@esbuild/linux-s390x": "0.19.11", + "@esbuild/linux-x64": "0.19.11", + "@esbuild/netbsd-x64": "0.19.11", + "@esbuild/openbsd-x64": "0.19.11", + "@esbuild/sunos-x64": "0.19.11", + "@esbuild/win32-arm64": "0.19.11", + "@esbuild/win32-ia32": "0.19.11", + "@esbuild/win32-x64": "0.19.11" } }, "node_modules/estree-walker": { @@ -814,9 +823,9 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", @@ -965,11 +974,14 @@ "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.30.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", + "integrity": "sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==", "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.15" + }, + "engines": { + "node": ">=12" } }, "node_modules/mime-db": { @@ -1039,9 +1051,9 @@ } }, "node_modules/postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", + "version": "8.4.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", + "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", "funding": [ { "type": "opencollective", @@ -1085,9 +1097,12 @@ } }, "node_modules/rollup": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", - "integrity": "sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.5.tgz", + "integrity": "sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==", + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, @@ -1096,31 +1111,32 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.1", - "@rollup/rollup-android-arm64": "4.9.1", - "@rollup/rollup-darwin-arm64": "4.9.1", - "@rollup/rollup-darwin-x64": "4.9.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.1", - "@rollup/rollup-linux-arm64-gnu": "4.9.1", - "@rollup/rollup-linux-arm64-musl": "4.9.1", - "@rollup/rollup-linux-riscv64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-musl": "4.9.1", - "@rollup/rollup-win32-arm64-msvc": "4.9.1", - "@rollup/rollup-win32-ia32-msvc": "4.9.1", - "@rollup/rollup-win32-x64-msvc": "4.9.1", + "@rollup/rollup-android-arm-eabi": "4.9.5", + "@rollup/rollup-android-arm64": "4.9.5", + "@rollup/rollup-darwin-arm64": "4.9.5", + "@rollup/rollup-darwin-x64": "4.9.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.5", + "@rollup/rollup-linux-arm64-gnu": "4.9.5", + "@rollup/rollup-linux-arm64-musl": "4.9.5", + "@rollup/rollup-linux-riscv64-gnu": "4.9.5", + "@rollup/rollup-linux-x64-gnu": "4.9.5", + "@rollup/rollup-linux-x64-musl": "4.9.5", + "@rollup/rollup-win32-arm64-msvc": "4.9.5", + "@rollup/rollup-win32-ia32-msvc": "4.9.5", + "@rollup/rollup-win32-x64-msvc": "4.9.5", "fsevents": "~2.3.2" } }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", "dependencies": { "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -1139,14 +1155,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", @@ -1155,16 +1163,10 @@ "node": ">=0.10.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead" - }, "node_modules/vite": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.10.tgz", - "integrity": "sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.12.tgz", + "integrity": "sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==", "dependencies": { "esbuild": "^0.19.3", "postcss": "^8.4.32", @@ -1226,15 +1228,23 @@ } }, "node_modules/vue": { - "version": "3.2.36", - "resolved": "https://registry.npmjs.org/vue/-/vue-3.2.36.tgz", - "integrity": "sha512-5yTXmrE6gW8IQgttzHW5bfBiFA6mx35ZXHjGLDmKYzW6MMmYvCwuKybANRepwkMYeXw2v1buGg3/lPICY5YlZw==", + "version": "3.4.15", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.15.tgz", + "integrity": "sha512-jC0GH4KkWLWJOEQjOpkqU1bQsBwf4R1rsFtw5GQJbjHVKWDzO6P0nWWBTmjp1xSemAioDFj1jdaK1qa3DnMQoQ==", "dependencies": { - "@vue/compiler-dom": "3.2.36", - "@vue/compiler-sfc": "3.2.36", - "@vue/runtime-dom": "3.2.36", - "@vue/server-renderer": "3.2.36", - "@vue/shared": "3.2.36" + "@vue/compiler-dom": "3.4.15", + "@vue/compiler-sfc": "3.4.15", + "@vue/runtime-dom": "3.4.15", + "@vue/server-renderer": "3.4.15", + "@vue/shared": "3.4.15" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } } } diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php index c6b54af7..51e734a7 100644 --- a/vendor/composer/InstalledVersions.php +++ b/vendor/composer/InstalledVersions.php @@ -98,7 +98,7 @@ class InstalledVersions { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } @@ -119,7 +119,7 @@ class InstalledVersions */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints($constraint); + $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -328,7 +328,9 @@ class InstalledVersions if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -340,12 +342,17 @@ class InstalledVersions // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; } else { self::$installed = array(); } } - $installed[] = self::$installed; + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } return $installed; } diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index a74f24fa..52e63a75 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -2990,6 +2990,7 @@ return array( 'Nette\\Utils\\ImageColor' => $vendorDir . '/nette/utils/src/Utils/ImageColor.php', 'Nette\\Utils\\ImageException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', 'Nette\\Utils\\ImageType' => $vendorDir . '/nette/utils/src/Utils/ImageType.php', + 'Nette\\Utils\\Iterables' => $vendorDir . '/nette/utils/src/Utils/Iterables.php', 'Nette\\Utils\\Json' => $vendorDir . '/nette/utils/src/Utils/Json.php', 'Nette\\Utils\\JsonException' => $vendorDir . '/nette/utils/src/Utils/exceptions.php', 'Nette\\Utils\\ObjectHelpers' => $vendorDir . '/nette/utils/src/Utils/ObjectHelpers.php', @@ -3535,6 +3536,15 @@ return array( 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php', 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php', 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpNoticeSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitDeprecationSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitErrorSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredWarningSubscriber' => $vendorDir . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php', 'PHPUnit\\Metadata\\After' => $vendorDir . '/phpunit/phpunit/src/Metadata/After.php', 'PHPUnit\\Metadata\\AfterClass' => $vendorDir . '/phpunit/phpunit/src/Metadata/AfterClass.php', 'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php', @@ -4015,24 +4025,22 @@ return array( 'PhpParser\\Internal\\DiffElem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', 'PhpParser\\Internal\\Differ' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', 'PhpParser\\Internal\\PrintableNewAnonClassNode' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', + 'PhpParser\\Internal\\TokenPolyfill' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', 'PhpParser\\Internal\\TokenStream' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', 'PhpParser\\JsonDecoder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', 'PhpParser\\Lexer' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer.php', 'PhpParser\\Lexer\\Emulative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', + 'PhpParser\\Modifiers' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Modifiers.php', 'PhpParser\\NameContext' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NameContext.php', 'PhpParser\\Node' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node.php', 'PhpParser\\NodeAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', @@ -4043,19 +4051,22 @@ return array( 'PhpParser\\NodeVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', 'PhpParser\\NodeVisitorAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', 'PhpParser\\NodeVisitor\\CloningVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', + 'PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', 'PhpParser\\NodeVisitor\\FindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', 'PhpParser\\NodeVisitor\\NameResolver' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => $vendorDir . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', 'PhpParser\\Node\\Arg' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'PhpParser\\Node\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', 'PhpParser\\Node\\Attribute' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', 'PhpParser\\Node\\AttributeGroup' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'PhpParser\\Node\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', 'PhpParser\\Node\\ComplexType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', 'PhpParser\\Node\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'PhpParser\\Node\\DeclareItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', 'PhpParser\\Node\\Expr' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', 'PhpParser\\Node\\Expr\\ArrayDimFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', - 'PhpParser\\Node\\Expr\\ArrayItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', 'PhpParser\\Node\\Expr\\Array_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', 'PhpParser\\Node\\Expr\\ArrowFunction' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', 'PhpParser\\Node\\Expr\\Assign' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', @@ -4116,7 +4127,6 @@ return array( 'PhpParser\\Node\\Expr\\ClassConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', 'PhpParser\\Node\\Expr\\Clone_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', 'PhpParser\\Node\\Expr\\Closure' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', - 'PhpParser\\Node\\Expr\\ClosureUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', 'PhpParser\\Node\\Expr\\ConstFetch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', 'PhpParser\\Node\\Expr\\Empty_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', 'PhpParser\\Node\\Expr\\Error' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', @@ -4151,6 +4161,7 @@ return array( 'PhpParser\\Node\\Expr\\Yield_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', 'PhpParser\\Node\\FunctionLike' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', 'PhpParser\\Node\\Identifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'PhpParser\\Node\\InterpolatedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', 'PhpParser\\Node\\IntersectionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', 'PhpParser\\Node\\MatchArm' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', 'PhpParser\\Node\\Name' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name.php', @@ -4158,11 +4169,11 @@ return array( 'PhpParser\\Node\\Name\\Relative' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', 'PhpParser\\Node\\NullableType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', 'PhpParser\\Node\\Param' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'PhpParser\\Node\\PropertyItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', 'PhpParser\\Node\\Scalar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', - 'PhpParser\\Node\\Scalar\\DNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', - 'PhpParser\\Node\\Scalar\\Encapsed' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', - 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', - 'PhpParser\\Node\\Scalar\\LNumber' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'PhpParser\\Node\\Scalar\\Float_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', + 'PhpParser\\Node\\Scalar\\Int_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', + 'PhpParser\\Node\\Scalar\\InterpolatedString' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', 'PhpParser\\Node\\Scalar\\MagicConst' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', @@ -4173,7 +4184,9 @@ return array( 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', 'PhpParser\\Node\\Scalar\\String_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'PhpParser\\Node\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', 'PhpParser\\Node\\Stmt' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'PhpParser\\Node\\Stmt\\Block' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', 'PhpParser\\Node\\Stmt\\Break_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', 'PhpParser\\Node\\Stmt\\Case_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', 'PhpParser\\Node\\Stmt\\Catch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', @@ -4183,7 +4196,6 @@ return array( 'PhpParser\\Node\\Stmt\\Class_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', 'PhpParser\\Node\\Stmt\\Const_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', 'PhpParser\\Node\\Stmt\\Continue_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', - 'PhpParser\\Node\\Stmt\\DeclareDeclare' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', 'PhpParser\\Node\\Stmt\\Declare_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', 'PhpParser\\Node\\Stmt\\Do_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', 'PhpParser\\Node\\Stmt\\Echo_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', @@ -4207,12 +4219,9 @@ return array( 'PhpParser\\Node\\Stmt\\Namespace_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', 'PhpParser\\Node\\Stmt\\Nop' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', 'PhpParser\\Node\\Stmt\\Property' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', - 'PhpParser\\Node\\Stmt\\PropertyProperty' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', 'PhpParser\\Node\\Stmt\\Return_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', - 'PhpParser\\Node\\Stmt\\StaticVar' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', 'PhpParser\\Node\\Stmt\\Static_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', 'PhpParser\\Node\\Stmt\\Switch_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', - 'PhpParser\\Node\\Stmt\\Throw_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php', 'PhpParser\\Node\\Stmt\\TraitUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', @@ -4220,21 +4229,22 @@ return array( 'PhpParser\\Node\\Stmt\\Trait_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', 'PhpParser\\Node\\Stmt\\TryCatch' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', 'PhpParser\\Node\\Stmt\\Unset_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', - 'PhpParser\\Node\\Stmt\\UseUse' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', 'PhpParser\\Node\\Stmt\\Use_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', 'PhpParser\\Node\\Stmt\\While_' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', 'PhpParser\\Node\\UnionType' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', + 'PhpParser\\Node\\UseItem' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', 'PhpParser\\Node\\VarLikeIdentifier' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', 'PhpParser\\Node\\VariadicPlaceholder' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', 'PhpParser\\Parser' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser.php', 'PhpParser\\ParserAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', 'PhpParser\\ParserFactory' => $vendorDir . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', - 'PhpParser\\Parser\\Multiple' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php', - 'PhpParser\\Parser\\Php5' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php', 'PhpParser\\Parser\\Php7' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', - 'PhpParser\\Parser\\Tokens' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php', + 'PhpParser\\Parser\\Php8' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', + 'PhpParser\\PhpVersion' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', + 'PhpParser\\PrettyPrinter' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', 'PhpParser\\PrettyPrinterAbstract' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', 'PhpParser\\PrettyPrinter\\Standard' => $vendorDir . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'PhpParser\\Token' => $vendorDir . '/nikic/php-parser/lib/PhpParser/Token.php', 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'Psr\\Clock\\ClockInterface' => $vendorDir . '/psr/clock/src/ClockInterface.php', 'Psr\\Container\\ContainerExceptionInterface' => $vendorDir . '/psr/container/src/ContainerExceptionInterface.php', @@ -4283,7 +4293,6 @@ return array( 'Psy\\CodeCleaner\\FunctionContextPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/FunctionContextPass.php', 'Psy\\CodeCleaner\\FunctionReturnInWriteContextPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php', 'Psy\\CodeCleaner\\ImplicitReturnPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php', - 'Psy\\CodeCleaner\\InstanceOfPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/InstanceOfPass.php', 'Psy\\CodeCleaner\\IssetPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/IssetPass.php', 'Psy\\CodeCleaner\\LabelContextPass' => $vendorDir . '/psy/psysh/src/CodeCleaner/LabelContextPass.php', 'Psy\\CodeCleaner\\LeavePsyshAlonePass' => $vendorDir . '/psy/psysh/src/CodeCleaner/LeavePsyshAlonePass.php', @@ -4345,7 +4354,6 @@ return array( 'Psy\\Exception\\ParseErrorException' => $vendorDir . '/psy/psysh/src/Exception/ParseErrorException.php', 'Psy\\Exception\\RuntimeException' => $vendorDir . '/psy/psysh/src/Exception/RuntimeException.php', 'Psy\\Exception\\ThrowUpException' => $vendorDir . '/psy/psysh/src/Exception/ThrowUpException.php', - 'Psy\\Exception\\TypeErrorException' => $vendorDir . '/psy/psysh/src/Exception/TypeErrorException.php', 'Psy\\Exception\\UnexpectedTargetException' => $vendorDir . '/psy/psysh/src/Exception/UnexpectedTargetException.php', 'Psy\\ExecutionClosure' => $vendorDir . '/psy/psysh/src/ExecutionClosure.php', 'Psy\\ExecutionLoopClosure' => $vendorDir . '/psy/psysh/src/ExecutionLoopClosure.php', @@ -4355,7 +4363,6 @@ return array( 'Psy\\ExecutionLoop\\RunkitReloader' => $vendorDir . '/psy/psysh/src/ExecutionLoop/RunkitReloader.php', 'Psy\\Formatter\\CodeFormatter' => $vendorDir . '/psy/psysh/src/Formatter/CodeFormatter.php', 'Psy\\Formatter\\DocblockFormatter' => $vendorDir . '/psy/psysh/src/Formatter/DocblockFormatter.php', - 'Psy\\Formatter\\Formatter' => $vendorDir . '/psy/psysh/src/Formatter/Formatter.php', 'Psy\\Formatter\\ReflectorFormatter' => $vendorDir . '/psy/psysh/src/Formatter/ReflectorFormatter.php', 'Psy\\Formatter\\SignatureFormatter' => $vendorDir . '/psy/psysh/src/Formatter/SignatureFormatter.php', 'Psy\\Formatter\\TraceFormatter' => $vendorDir . '/psy/psysh/src/Formatter/TraceFormatter.php', @@ -4370,7 +4377,6 @@ return array( 'Psy\\Output\\Theme' => $vendorDir . '/psy/psysh/src/Output/Theme.php', 'Psy\\ParserFactory' => $vendorDir . '/psy/psysh/src/ParserFactory.php', 'Psy\\Readline\\GNUReadline' => $vendorDir . '/psy/psysh/src/Readline/GNUReadline.php', - 'Psy\\Readline\\HoaConsole' => $vendorDir . '/psy/psysh/src/Readline/HoaConsole.php', 'Psy\\Readline\\Hoa\\Autocompleter' => $vendorDir . '/psy/psysh/src/Readline/Hoa/Autocompleter.php', 'Psy\\Readline\\Hoa\\AutocompleterAggregate' => $vendorDir . '/psy/psysh/src/Readline/Hoa/AutocompleterAggregate.php', 'Psy\\Readline\\Hoa\\AutocompleterPath' => $vendorDir . '/psy/psysh/src/Readline/Hoa/AutocompleterPath.php', @@ -4430,9 +4436,7 @@ return array( 'Psy\\Readline\\Readline' => $vendorDir . '/psy/psysh/src/Readline/Readline.php', 'Psy\\Readline\\Transient' => $vendorDir . '/psy/psysh/src/Readline/Transient.php', 'Psy\\Readline\\Userland' => $vendorDir . '/psy/psysh/src/Readline/Userland.php', - 'Psy\\Reflection\\ReflectionClassConstant' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionClassConstant.php', 'Psy\\Reflection\\ReflectionConstant' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionConstant.php', - 'Psy\\Reflection\\ReflectionConstant_' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionConstant_.php', 'Psy\\Reflection\\ReflectionLanguageConstruct' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php', 'Psy\\Reflection\\ReflectionLanguageConstructParameter' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php', 'Psy\\Reflection\\ReflectionNamespace' => $vendorDir . '/psy/psysh/src/Reflection/ReflectionNamespace.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 3f9cd891..86aa25ba 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -3519,6 +3519,7 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'Nette\\Utils\\ImageColor' => __DIR__ . '/..' . '/nette/utils/src/Utils/ImageColor.php', 'Nette\\Utils\\ImageException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', 'Nette\\Utils\\ImageType' => __DIR__ . '/..' . '/nette/utils/src/Utils/ImageType.php', + 'Nette\\Utils\\Iterables' => __DIR__ . '/..' . '/nette/utils/src/Utils/Iterables.php', 'Nette\\Utils\\Json' => __DIR__ . '/..' . '/nette/utils/src/Utils/Json.php', 'Nette\\Utils\\JsonException' => __DIR__ . '/..' . '/nette/utils/src/Utils/exceptions.php', 'Nette\\Utils\\ObjectHelpers' => __DIR__ . '/..' . '/nette/utils/src/Utils/ObjectHelpers.php', @@ -4064,6 +4065,15 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PHPUnit\\Logging\\TestDox\\TestResultCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollectionIterator.php', 'PHPUnit\\Logging\\TestDox\\TestResultCollector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php', 'PHPUnit\\Logging\\TestDox\\TestSkippedSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestSkippedSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpNoticeSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitDeprecationSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitErrorSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredPhpunitWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php', + 'PHPUnit\\Logging\\TestDox\\TestTriggeredWarningSubscriber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php', 'PHPUnit\\Metadata\\After' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/After.php', 'PHPUnit\\Metadata\\AfterClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/AfterClass.php', 'PHPUnit\\Metadata\\Annotation\\Parser\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php', @@ -4544,24 +4554,22 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\Internal\\DiffElem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php', 'PhpParser\\Internal\\Differ' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/Differ.php', 'PhpParser\\Internal\\PrintableNewAnonClassNode' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php', + 'PhpParser\\Internal\\TokenPolyfill' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php', 'PhpParser\\Internal\\TokenStream' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php', 'PhpParser\\JsonDecoder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/JsonDecoder.php', 'PhpParser\\Lexer' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer.php', 'PhpParser\\Lexer\\Emulative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php', 'PhpParser\\Lexer\\TokenEmulator\\AttributeEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\CoaleseEqualTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\EnumTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ExplicitOctalEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FlexibleDocStringEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\FnTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\KeywordEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\MatchTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\NullsafeTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php', - 'PhpParser\\Lexer\\TokenEmulator\\NumericLiteralSeparatorEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyFunctionTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReadonlyTokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\ReverseEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php', 'PhpParser\\Lexer\\TokenEmulator\\TokenEmulator' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php', + 'PhpParser\\Modifiers' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Modifiers.php', 'PhpParser\\NameContext' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NameContext.php', 'PhpParser\\Node' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node.php', 'PhpParser\\NodeAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeAbstract.php', @@ -4572,19 +4580,22 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\NodeVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor.php', 'PhpParser\\NodeVisitorAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php', 'PhpParser\\NodeVisitor\\CloningVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php', + 'PhpParser\\NodeVisitor\\CommentAnnotatingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php', 'PhpParser\\NodeVisitor\\FindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php', 'PhpParser\\NodeVisitor\\FirstFindingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php', 'PhpParser\\NodeVisitor\\NameResolver' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php', 'PhpParser\\NodeVisitor\\NodeConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php', 'PhpParser\\NodeVisitor\\ParentConnectingVisitor' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php', 'PhpParser\\Node\\Arg' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Arg.php', + 'PhpParser\\Node\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php', 'PhpParser\\Node\\Attribute' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Attribute.php', 'PhpParser\\Node\\AttributeGroup' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php', + 'PhpParser\\Node\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php', 'PhpParser\\Node\\ComplexType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/ComplexType.php', 'PhpParser\\Node\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Const_.php', + 'PhpParser\\Node\\DeclareItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php', 'PhpParser\\Node\\Expr' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr.php', 'PhpParser\\Node\\Expr\\ArrayDimFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php', - 'PhpParser\\Node\\Expr\\ArrayItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php', 'PhpParser\\Node\\Expr\\Array_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php', 'PhpParser\\Node\\Expr\\ArrowFunction' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php', 'PhpParser\\Node\\Expr\\Assign' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php', @@ -4645,7 +4656,6 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\Node\\Expr\\ClassConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php', 'PhpParser\\Node\\Expr\\Clone_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php', 'PhpParser\\Node\\Expr\\Closure' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php', - 'PhpParser\\Node\\Expr\\ClosureUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php', 'PhpParser\\Node\\Expr\\ConstFetch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php', 'PhpParser\\Node\\Expr\\Empty_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php', 'PhpParser\\Node\\Expr\\Error' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php', @@ -4680,6 +4690,7 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\Node\\Expr\\Yield_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php', 'PhpParser\\Node\\FunctionLike' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php', 'PhpParser\\Node\\Identifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Identifier.php', + 'PhpParser\\Node\\InterpolatedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php', 'PhpParser\\Node\\IntersectionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php', 'PhpParser\\Node\\MatchArm' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/MatchArm.php', 'PhpParser\\Node\\Name' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name.php', @@ -4687,11 +4698,11 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\Node\\Name\\Relative' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php', 'PhpParser\\Node\\NullableType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/NullableType.php', 'PhpParser\\Node\\Param' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Param.php', + 'PhpParser\\Node\\PropertyItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php', 'PhpParser\\Node\\Scalar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar.php', - 'PhpParser\\Node\\Scalar\\DNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php', - 'PhpParser\\Node\\Scalar\\Encapsed' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php', - 'PhpParser\\Node\\Scalar\\EncapsedStringPart' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php', - 'PhpParser\\Node\\Scalar\\LNumber' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php', + 'PhpParser\\Node\\Scalar\\Float_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php', + 'PhpParser\\Node\\Scalar\\Int_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php', + 'PhpParser\\Node\\Scalar\\InterpolatedString' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php', 'PhpParser\\Node\\Scalar\\MagicConst' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Dir' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php', @@ -4702,7 +4713,9 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\Node\\Scalar\\MagicConst\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php', 'PhpParser\\Node\\Scalar\\MagicConst\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php', 'PhpParser\\Node\\Scalar\\String_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php', + 'PhpParser\\Node\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/StaticVar.php', 'PhpParser\\Node\\Stmt' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt.php', + 'PhpParser\\Node\\Stmt\\Block' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php', 'PhpParser\\Node\\Stmt\\Break_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php', 'PhpParser\\Node\\Stmt\\Case_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php', 'PhpParser\\Node\\Stmt\\Catch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php', @@ -4712,7 +4725,6 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\Node\\Stmt\\Class_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php', 'PhpParser\\Node\\Stmt\\Const_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php', 'PhpParser\\Node\\Stmt\\Continue_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php', - 'PhpParser\\Node\\Stmt\\DeclareDeclare' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php', 'PhpParser\\Node\\Stmt\\Declare_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php', 'PhpParser\\Node\\Stmt\\Do_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php', 'PhpParser\\Node\\Stmt\\Echo_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php', @@ -4736,12 +4748,9 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\Node\\Stmt\\Namespace_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php', 'PhpParser\\Node\\Stmt\\Nop' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php', 'PhpParser\\Node\\Stmt\\Property' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php', - 'PhpParser\\Node\\Stmt\\PropertyProperty' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php', 'PhpParser\\Node\\Stmt\\Return_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php', - 'PhpParser\\Node\\Stmt\\StaticVar' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php', 'PhpParser\\Node\\Stmt\\Static_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php', 'PhpParser\\Node\\Stmt\\Switch_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php', - 'PhpParser\\Node\\Stmt\\Throw_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php', 'PhpParser\\Node\\Stmt\\TraitUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php', 'PhpParser\\Node\\Stmt\\TraitUseAdaptation' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php', 'PhpParser\\Node\\Stmt\\TraitUseAdaptation\\Alias' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php', @@ -4749,21 +4758,22 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'PhpParser\\Node\\Stmt\\Trait_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php', 'PhpParser\\Node\\Stmt\\TryCatch' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php', 'PhpParser\\Node\\Stmt\\Unset_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php', - 'PhpParser\\Node\\Stmt\\UseUse' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php', 'PhpParser\\Node\\Stmt\\Use_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php', 'PhpParser\\Node\\Stmt\\While_' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php', 'PhpParser\\Node\\UnionType' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UnionType.php', + 'PhpParser\\Node\\UseItem' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/UseItem.php', 'PhpParser\\Node\\VarLikeIdentifier' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php', 'PhpParser\\Node\\VariadicPlaceholder' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php', 'PhpParser\\Parser' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser.php', 'PhpParser\\ParserAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserAbstract.php', 'PhpParser\\ParserFactory' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/ParserFactory.php', - 'PhpParser\\Parser\\Multiple' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Multiple.php', - 'PhpParser\\Parser\\Php5' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php5.php', 'PhpParser\\Parser\\Php7' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php7.php', - 'PhpParser\\Parser\\Tokens' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Tokens.php', + 'PhpParser\\Parser\\Php8' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Parser/Php8.php', + 'PhpParser\\PhpVersion' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PhpVersion.php', + 'PhpParser\\PrettyPrinter' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter.php', 'PhpParser\\PrettyPrinterAbstract' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php', 'PhpParser\\PrettyPrinter\\Standard' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php', + 'PhpParser\\Token' => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser/Token.php', 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'Psr\\Clock\\ClockInterface' => __DIR__ . '/..' . '/psr/clock/src/ClockInterface.php', 'Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/..' . '/psr/container/src/ContainerExceptionInterface.php', @@ -4812,7 +4822,6 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'Psy\\CodeCleaner\\FunctionContextPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/FunctionContextPass.php', 'Psy\\CodeCleaner\\FunctionReturnInWriteContextPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php', 'Psy\\CodeCleaner\\ImplicitReturnPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php', - 'Psy\\CodeCleaner\\InstanceOfPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/InstanceOfPass.php', 'Psy\\CodeCleaner\\IssetPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/IssetPass.php', 'Psy\\CodeCleaner\\LabelContextPass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/LabelContextPass.php', 'Psy\\CodeCleaner\\LeavePsyshAlonePass' => __DIR__ . '/..' . '/psy/psysh/src/CodeCleaner/LeavePsyshAlonePass.php', @@ -4874,7 +4883,6 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'Psy\\Exception\\ParseErrorException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/ParseErrorException.php', 'Psy\\Exception\\RuntimeException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/RuntimeException.php', 'Psy\\Exception\\ThrowUpException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/ThrowUpException.php', - 'Psy\\Exception\\TypeErrorException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/TypeErrorException.php', 'Psy\\Exception\\UnexpectedTargetException' => __DIR__ . '/..' . '/psy/psysh/src/Exception/UnexpectedTargetException.php', 'Psy\\ExecutionClosure' => __DIR__ . '/..' . '/psy/psysh/src/ExecutionClosure.php', 'Psy\\ExecutionLoopClosure' => __DIR__ . '/..' . '/psy/psysh/src/ExecutionLoopClosure.php', @@ -4884,7 +4892,6 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'Psy\\ExecutionLoop\\RunkitReloader' => __DIR__ . '/..' . '/psy/psysh/src/ExecutionLoop/RunkitReloader.php', 'Psy\\Formatter\\CodeFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/CodeFormatter.php', 'Psy\\Formatter\\DocblockFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/DocblockFormatter.php', - 'Psy\\Formatter\\Formatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/Formatter.php', 'Psy\\Formatter\\ReflectorFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/ReflectorFormatter.php', 'Psy\\Formatter\\SignatureFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/SignatureFormatter.php', 'Psy\\Formatter\\TraceFormatter' => __DIR__ . '/..' . '/psy/psysh/src/Formatter/TraceFormatter.php', @@ -4899,7 +4906,6 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'Psy\\Output\\Theme' => __DIR__ . '/..' . '/psy/psysh/src/Output/Theme.php', 'Psy\\ParserFactory' => __DIR__ . '/..' . '/psy/psysh/src/ParserFactory.php', 'Psy\\Readline\\GNUReadline' => __DIR__ . '/..' . '/psy/psysh/src/Readline/GNUReadline.php', - 'Psy\\Readline\\HoaConsole' => __DIR__ . '/..' . '/psy/psysh/src/Readline/HoaConsole.php', 'Psy\\Readline\\Hoa\\Autocompleter' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/Autocompleter.php', 'Psy\\Readline\\Hoa\\AutocompleterAggregate' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/AutocompleterAggregate.php', 'Psy\\Readline\\Hoa\\AutocompleterPath' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Hoa/AutocompleterPath.php', @@ -4959,9 +4965,7 @@ class ComposerStaticInitc055060de071b17f9341a87ba18bf477 'Psy\\Readline\\Readline' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Readline.php', 'Psy\\Readline\\Transient' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Transient.php', 'Psy\\Readline\\Userland' => __DIR__ . '/..' . '/psy/psysh/src/Readline/Userland.php', - 'Psy\\Reflection\\ReflectionClassConstant' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionClassConstant.php', 'Psy\\Reflection\\ReflectionConstant' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionConstant.php', - 'Psy\\Reflection\\ReflectionConstant_' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionConstant_.php', 'Psy\\Reflection\\ReflectionLanguageConstruct' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionLanguageConstruct.php', 'Psy\\Reflection\\ReflectionLanguageConstructParameter' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php', 'Psy\\Reflection\\ReflectionNamespace' => __DIR__ . '/..' . '/psy/psysh/src/Reflection/ReflectionNamespace.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 40d7f9c9..fbf5dd9b 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -210,17 +210,17 @@ }, { "name": "doctrine/inflector", - "version": "2.0.8", - "version_normalized": "2.0.8.0", + "version": "2.0.9", + "version_normalized": "2.0.9.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" + "reference": "2930cd5ef353871c821d5c43ed030d39ac8cfe65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", - "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/2930cd5ef353871c821d5c43ed030d39ac8cfe65", + "reference": "2930cd5ef353871c821d5c43ed030d39ac8cfe65", "shasum": "" }, "require": { @@ -234,7 +234,7 @@ "phpunit/phpunit": "^8.5 || ^9.5", "vimeo/psalm": "^4.25 || ^5.4" }, - "time": "2023-06-16T13:40:37+00:00", + "time": "2024-01-15T18:05:13+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -284,7 +284,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.8" + "source": "https://github.com/doctrine/inflector/tree/2.0.9" }, "funding": [ { @@ -518,17 +518,17 @@ }, { "name": "fakerphp/faker", - "version": "v1.23.0", - "version_normalized": "1.23.0.0", + "version": "v1.23.1", + "version_normalized": "1.23.1.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", - "reference": "e3daa170d00fde61ea7719ef47bb09bb8f1d9b01", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { @@ -553,13 +553,8 @@ "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", "ext-mbstring": "Required for multibyte Unicode string functionality." }, - "time": "2023-06-12T08:44:38+00:00", + "time": "2024-01-02T13:46:09+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" - } - }, "installation-source": "dist", "autoload": { "psr-4": { @@ -583,7 +578,7 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.23.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, "install-path": "../fakerphp/faker" }, @@ -1354,17 +1349,17 @@ }, { "name": "laravel/framework", - "version": "v10.39.0", - "version_normalized": "10.39.0.0", + "version": "v10.41.0", + "version_normalized": "10.41.0.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "114926b07bfb5fbf2545c03aa2ce5c8c37be650c" + "reference": "da31969bd35e6ee0bbcd9e876f88952dc754b012" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/114926b07bfb5fbf2545c03aa2ce5c8c37be650c", - "reference": "114926b07bfb5fbf2545c03aa2ce5c8c37be650c", + "url": "https://api.github.com/repos/laravel/framework/zipball/da31969bd35e6ee0bbcd9e876f88952dc754b012", + "reference": "da31969bd35e6ee0bbcd9e876f88952dc754b012", "shasum": "" }, "require": { @@ -1513,7 +1508,7 @@ "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.2).", "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." }, - "time": "2023-12-27T14:26:28+00:00", + "time": "2024-01-16T15:23:58+00:00", "type": "library", "extra": { "branch-alias": { @@ -1562,17 +1557,17 @@ }, { "name": "laravel/pint", - "version": "v1.13.7", - "version_normalized": "1.13.7.0", + "version": "v1.13.9", + "version_normalized": "1.13.9.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "4157768980dbd977f1c4b4cc94997416d8b30ece" + "reference": "e3e269cc5d874c8efd2dc7962b1c7ff2585fe525" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/4157768980dbd977f1c4b4cc94997416d8b30ece", - "reference": "4157768980dbd977f1c4b4cc94997416d8b30ece", + "url": "https://api.github.com/repos/laravel/pint/zipball/e3e269cc5d874c8efd2dc7962b1c7ff2585fe525", + "reference": "e3e269cc5d874c8efd2dc7962b1c7ff2585fe525", "shasum": "" }, "require": { @@ -1583,15 +1578,15 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.38.0", - "illuminate/view": "^10.30.1", + "friendsofphp/php-cs-fixer": "^3.47.0", + "illuminate/view": "^10.40.0", + "larastan/larastan": "^2.8.1", "laravel-zero/framework": "^10.3.0", - "mockery/mockery": "^1.6.6", - "nunomaduro/larastan": "^2.6.4", + "mockery/mockery": "^1.6.7", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.24.2" + "pestphp/pest": "^2.31.0" }, - "time": "2023-12-05T19:43:12+00:00", + "time": "2024-01-16T17:39:29+00:00", "bin": [ "builds/pint" ], @@ -1631,17 +1626,17 @@ }, { "name": "laravel/prompts", - "version": "v0.1.14", - "version_normalized": "0.1.14.0", + "version": "v0.1.15", + "version_normalized": "0.1.15.0", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "2219fa9c4b944add1e825c3bdb8ecae8bc503bc6" + "reference": "d814a27514d99b03c85aa42b22cfd946568636c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/2219fa9c4b944add1e825c3bdb8ecae8bc503bc6", - "reference": "2219fa9c4b944add1e825c3bdb8ecae8bc503bc6", + "url": "https://api.github.com/repos/laravel/prompts/zipball/d814a27514d99b03c85aa42b22cfd946568636c1", + "reference": "d814a27514d99b03c85aa42b22cfd946568636c1", "shasum": "" }, "require": { @@ -1663,7 +1658,7 @@ "suggest": { "ext-pcntl": "Required for the spinner to be animated." }, - "time": "2023-12-27T04:18:09+00:00", + "time": "2023-12-29T22:37:42+00:00", "type": "library", "extra": { "branch-alias": { @@ -1685,23 +1680,23 @@ ], "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.14" + "source": "https://github.com/laravel/prompts/tree/v0.1.15" }, "install-path": "../laravel/prompts" }, { "name": "laravel/sail", - "version": "v1.26.3", - "version_normalized": "1.26.3.0", + "version": "v1.27.1", + "version_normalized": "1.27.1.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "fa1ad5fbb03686dfc752bfd1861d86091cc1c32d" + "reference": "9dc648978e4276f2bfd37a076a52e3bd9394777f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/fa1ad5fbb03686dfc752bfd1861d86091cc1c32d", - "reference": "fa1ad5fbb03686dfc752bfd1861d86091cc1c32d", + "url": "https://api.github.com/repos/laravel/sail/zipball/9dc648978e4276f2bfd37a076a52e3bd9394777f", + "reference": "9dc648978e4276f2bfd37a076a52e3bd9394777f", "shasum": "" }, "require": { @@ -1715,7 +1710,7 @@ "orchestra/testbench": "^7.0|^8.0|^9.0", "phpstan/phpstan": "^1.10" }, - "time": "2023-12-02T18:26:39+00:00", + "time": "2024-01-13T18:46:48+00:00", "bin": [ "bin/sail" ], @@ -1891,26 +1886,26 @@ }, { "name": "laravel/tinker", - "version": "v2.8.2", - "version_normalized": "2.8.2.0", + "version": "v2.9.0", + "version_normalized": "2.9.0.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3" + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/b936d415b252b499e8c3b1f795cd4fc20f57e1f3", - "reference": "b936d415b252b499e8c3b1f795cd4fc20f57e1f3", + "url": "https://api.github.com/repos/laravel/tinker/zipball/502e0fe3f0415d06d5db1f83a472f0f3b754bafe", + "reference": "502e0fe3f0415d06d5db1f83a472f0f3b754bafe", "shasum": "" }, "require": { - "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", "php": "^7.2.5|^8.0", - "psy/psysh": "^0.10.4|^0.11.1", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, "require-dev": { "mockery/mockery": "~1.3.3|^1.4.2", @@ -1918,14 +1913,11 @@ "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." }, - "time": "2023-08-15T14:27:00+00:00", + "time": "2024-01-04T16:10:04+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" @@ -1957,7 +1949,7 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.8.2" + "source": "https://github.com/laravel/tinker/tree/v2.9.0" }, "install-path": "../laravel/tinker" }, @@ -2799,17 +2791,17 @@ }, { "name": "nette/utils", - "version": "v4.0.3", - "version_normalized": "4.0.3.0", + "version": "v4.0.4", + "version_normalized": "4.0.4.0", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015" + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/a9d127dd6a203ce6d255b2e2db49759f7506e015", - "reference": "a9d127dd6a203ce6d255b2e2db49759f7506e015", + "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", "shasum": "" }, "require": { @@ -2833,7 +2825,7 @@ "ext-mbstring": "to use Strings::lower() etc...", "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()" }, - "time": "2023-10-29T21:02:13+00:00", + "time": "2024-01-17T16:50:36+00:00", "type": "library", "extra": { "branch-alias": { @@ -2882,41 +2874,43 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.3" + "source": "https://github.com/nette/utils/tree/v4.0.4" }, "install-path": "../nette/utils" }, { "name": "nikic/php-parser", - "version": "v4.18.0", - "version_normalized": "4.18.0.0", + "version": "v5.0.0", + "version_normalized": "5.0.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, - "time": "2023-12-10T21:03:43+00:00", + "time": "2024-01-07T17:17:35+00:00", "bin": [ "bin/php-parse" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "installation-source": "dist", @@ -2941,7 +2935,7 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, "install-path": "../nikic/php-parser" }, @@ -3666,17 +3660,17 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.5", - "version_normalized": "10.5.5.0", + "version": "10.5.8", + "version_normalized": "10.5.8.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856" + "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ed21115d505b4b4f7dc7b5651464e19a2c7f7856", - "reference": "ed21115d505b4b4f7dc7b5651464e19a2c7f7856", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/08f4fa74d5fbfff1ef22abffee47aaedcaea227e", + "reference": "08f4fa74d5fbfff1ef22abffee47aaedcaea227e", "shasum": "" }, "require": { @@ -3710,7 +3704,7 @@ "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" }, - "time": "2023-12-27T15:13:52+00:00", + "time": "2024-01-19T07:07:27+00:00", "bin": [ "phpunit" ], @@ -3750,7 +3744,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.5" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.8" }, "funding": [ { @@ -4206,26 +4200,26 @@ }, { "name": "psy/psysh", - "version": "v0.11.22", - "version_normalized": "0.11.22.0", + "version": "v0.12.0", + "version_normalized": "0.12.0.0", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "128fa1b608be651999ed9789c95e6e2a31b5802b" + "reference": "750bf031a48fd07c673dbe3f11f72362ea306d0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/128fa1b608be651999ed9789c95e6e2a31b5802b", - "reference": "128fa1b608be651999ed9789c95e6e2a31b5802b", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/750bf031a48fd07c673dbe3f11f72362ea306d0d", + "reference": "750bf031a48fd07c673dbe3f11f72362ea306d0d", "shasum": "" }, "require": { "ext-json": "*", "ext-tokenizer": "*", - "nikic/php-parser": "^4.0 || ^3.1", - "php": "^8.0 || ^7.0.8", - "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4" + "nikic/php-parser": "^5.0 || ^4.0", + "php": "^8.0 || ^7.4", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" }, "conflict": { "symfony/console": "4.4.37 || 5.3.14 || 5.3.15 || 5.4.3 || 5.4.4 || 6.0.3 || 6.0.4" @@ -4236,17 +4230,16 @@ "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-pdo-sqlite": "The doc command requires SQLite to work.", - "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well." }, - "time": "2023-10-14T21:56:36+00:00", + "time": "2023-12-20T15:28:09+00:00", "bin": [ "bin/psysh" ], "type": "library", "extra": { "branch-alias": { - "dev-0.11": "0.11.x-dev" + "dev-main": "0.12.x-dev" }, "bamarni-bin": { "bin-links": false, @@ -4283,7 +4276,7 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.22" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.0" }, "install-path": "../psy/psysh" }, @@ -5621,17 +5614,17 @@ }, { "name": "spatie/ignition", - "version": "1.11.3", - "version_normalized": "1.11.3.0", + "version": "1.12.0", + "version_normalized": "1.12.0.0", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "3d886de644ff7a5b42e4d27c1e1f67c8b5f00044" + "reference": "5b6f801c605a593106b623e45ca41496a6e7d56d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/3d886de644ff7a5b42e4d27c1e1f67c8b5f00044", - "reference": "3d886de644ff7a5b42e4d27c1e1f67c8b5f00044", + "url": "https://api.github.com/repos/spatie/ignition/zipball/5b6f801c605a593106b623e45ca41496a6e7d56d", + "reference": "5b6f801c605a593106b623e45ca41496a6e7d56d", "shasum": "" }, "require": { @@ -5659,7 +5652,7 @@ "openai-php/client": "Require get solutions from OpenAI", "simple-cache-implementation": "To cache solutions from OpenAI" }, - "time": "2023-10-18T14:09:40+00:00", + "time": "2024-01-03T15:49:39+00:00", "type": "library", "extra": { "branch-alias": { @@ -5707,36 +5700,36 @@ }, { "name": "spatie/laravel-ignition", - "version": "2.3.3", - "version_normalized": "2.3.3.0", + "version": "2.4.1", + "version_normalized": "2.4.1.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "66499cd3c858642ded56dafb8fa0352057ca20dd" + "reference": "005e1e7b1232f3b22d7e7be3f602693efc7dba67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/66499cd3c858642ded56dafb8fa0352057ca20dd", - "reference": "66499cd3c858642ded56dafb8fa0352057ca20dd", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/005e1e7b1232f3b22d7e7be3f602693efc7dba67", + "reference": "005e1e7b1232f3b22d7e7be3f602693efc7dba67", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "illuminate/support": "^10.0", + "illuminate/support": "^10.0|^11.0", "php": "^8.1", "spatie/flare-client-php": "^1.3.5", "spatie/ignition": "^1.9", - "symfony/console": "^6.2.3", - "symfony/var-dumper": "^6.2.3" + "symfony/console": "^6.2.3|^7.0", + "symfony/var-dumper": "^6.2.3|^7.0" }, "require-dev": { - "livewire/livewire": "^2.11", + "livewire/livewire": "^2.11|^3.3.5", "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.3.4", - "orchestra/testbench": "^8.0", - "pestphp/pest": "^1.22.3", + "openai-php/client": "^0.8.1", + "orchestra/testbench": "^8.0|^9.0", + "pestphp/pest": "^2.30", "phpstan/extension-installer": "^1.2", "phpstan/phpstan-deprecation-rules": "^1.1.1", "phpstan/phpstan-phpunit": "^1.3.3", @@ -5746,7 +5739,7 @@ "openai-php/client": "Require get solutions from OpenAI", "psr/simple-cache-implementation": "Needed to cache solutions from OpenAI" }, - "time": "2023-12-21T09:43:05+00:00", + "time": "2024-01-12T13:14:58+00:00", "type": "library", "extra": { "laravel": { @@ -5802,17 +5795,17 @@ }, { "name": "symfony/console", - "version": "v6.4.1", - "version_normalized": "6.4.1.0", + "version": "v6.4.2", + "version_normalized": "6.4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -5845,7 +5838,7 @@ "symfony/stopwatch": "^5.4|^6.0|^7.0", "symfony/var-dumper": "^5.4|^6.0|^7.0" }, - "time": "2023-11-30T10:54:28+00:00", + "time": "2023-12-10T16:15:48+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -5879,7 +5872,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -6115,17 +6108,17 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.0.0", - "version_normalized": "7.0.0.0", + "version": "v7.0.2", + "version_normalized": "7.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "c459b40ffe67c49af6fd392aac374c9edf8a027e" + "reference": "098b62ae81fdd6cbf941f355059f617db28f4f9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c459b40ffe67c49af6fd392aac374c9edf8a027e", - "reference": "c459b40ffe67c49af6fd392aac374c9edf8a027e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/098b62ae81fdd6cbf941f355059f617db28f4f9a", + "reference": "098b62ae81fdd6cbf941f355059f617db28f4f9a", "shasum": "" }, "require": { @@ -6150,7 +6143,7 @@ "symfony/service-contracts": "^2.5|^3", "symfony/stopwatch": "^6.4|^7.0" }, - "time": "2023-07-27T16:29:09+00:00", + "time": "2023-12-27T22:24:19+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -6178,7 +6171,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.2" }, "funding": [ { @@ -6344,17 +6337,17 @@ }, { "name": "symfony/http-foundation", - "version": "v6.4.0", - "version_normalized": "6.4.0.0", + "version": "v6.4.2", + "version_normalized": "6.4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "44a6d39a9cc11e154547d882d5aac1e014440771" + "reference": "172d807f9ef3fc3fbed8377cc57c20d389269271" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/44a6d39a9cc11e154547d882d5aac1e014440771", - "reference": "44a6d39a9cc11e154547d882d5aac1e014440771", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/172d807f9ef3fc3fbed8377cc57c20d389269271", + "reference": "172d807f9ef3fc3fbed8377cc57c20d389269271", "shasum": "" }, "require": { @@ -6376,7 +6369,7 @@ "symfony/mime": "^5.4|^6.0|^7.0", "symfony/rate-limiter": "^5.4|^6.0|^7.0" }, - "time": "2023-11-20T16:41:16+00:00", + "time": "2023-12-27T22:16:42+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -6404,7 +6397,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.0" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.2" }, "funding": [ { @@ -6424,17 +6417,17 @@ }, { "name": "symfony/http-kernel", - "version": "v6.4.1", - "version_normalized": "6.4.1.0", + "version": "v6.4.2", + "version_normalized": "6.4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "2953274c16a229b3933ef73a6898e18388e12e1b" + "reference": "13e8387320b5942d0dc408440c888e2d526efef4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/2953274c16a229b3933ef73a6898e18388e12e1b", - "reference": "2953274c16a229b3933ef73a6898e18388e12e1b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/13e8387320b5942d0dc408440c888e2d526efef4", + "reference": "13e8387320b5942d0dc408440c888e2d526efef4", "shasum": "" }, "require": { @@ -6492,7 +6485,7 @@ "symfony/var-exporter": "^6.2|^7.0", "twig/twig": "^2.13|^3.0.4" }, - "time": "2023-12-01T17:02:02+00:00", + "time": "2023-12-30T15:31:44+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -6520,7 +6513,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.1" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.2" }, "funding": [ { @@ -6540,17 +6533,17 @@ }, { "name": "symfony/mailer", - "version": "v6.4.0", - "version_normalized": "6.4.0.0", + "version": "v6.4.2", + "version_normalized": "6.4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba" + "reference": "6da89e5c9202f129717a770a03183fb140720168" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba", - "reference": "ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba", + "url": "https://api.github.com/repos/symfony/mailer/zipball/6da89e5c9202f129717a770a03183fb140720168", + "reference": "6da89e5c9202f129717a770a03183fb140720168", "shasum": "" }, "require": { @@ -6575,7 +6568,7 @@ "symfony/messenger": "^6.2|^7.0", "symfony/twig-bridge": "^6.2|^7.0" }, - "time": "2023-11-12T18:02:22+00:00", + "time": "2023-12-19T09:12:31+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -6603,7 +6596,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.4.0" + "source": "https://github.com/symfony/mailer/tree/v6.4.2" }, "funding": [ { @@ -7475,23 +7468,23 @@ }, { "name": "symfony/process", - "version": "v6.4.0", - "version_normalized": "6.4.0.0", + "version": "v6.4.2", + "version_normalized": "6.4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa" + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/191703b1566d97a5425dc969e4350d32b8ef17aa", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa", + "url": "https://api.github.com/repos/symfony/process/zipball/c4b1ef0bc80533d87a2e969806172f1c2a980241", + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241", "shasum": "" }, "require": { "php": ">=8.1" }, - "time": "2023-11-17T21:06:49+00:00", + "time": "2023-12-22T16:42:54+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7519,7 +7512,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.0" + "source": "https://github.com/symfony/process/tree/v6.4.2" }, "funding": [ { @@ -7539,17 +7532,17 @@ }, { "name": "symfony/routing", - "version": "v6.4.1", - "version_normalized": "6.4.1.0", + "version": "v6.4.2", + "version_normalized": "6.4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0c95c164fdba18b12523b75e64199ca3503e6d40" + "reference": "98eab13a07fddc85766f1756129c69f207ffbc21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0c95c164fdba18b12523b75e64199ca3503e6d40", - "reference": "0c95c164fdba18b12523b75e64199ca3503e6d40", + "url": "https://api.github.com/repos/symfony/routing/zipball/98eab13a07fddc85766f1756129c69f207ffbc21", + "reference": "98eab13a07fddc85766f1756129c69f207ffbc21", "shasum": "" }, "require": { @@ -7571,7 +7564,7 @@ "symfony/http-foundation": "^5.4|^6.0|^7.0", "symfony/yaml": "^5.4|^6.0|^7.0" }, - "time": "2023-12-01T14:54:37+00:00", + "time": "2023-12-29T15:34:34+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7605,7 +7598,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.1" + "source": "https://github.com/symfony/routing/tree/v6.4.2" }, "funding": [ { @@ -7710,17 +7703,17 @@ }, { "name": "symfony/string", - "version": "v7.0.0", - "version_normalized": "7.0.0.0", + "version": "v7.0.2", + "version_normalized": "7.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620" + "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/92bd2bfbba476d4a1838e5e12168bef2fd1e6620", - "reference": "92bd2bfbba476d4a1838e5e12168bef2fd1e6620", + "url": "https://api.github.com/repos/symfony/string/zipball/cc78f14f91f5e53b42044d0620961c48028ff9f5", + "reference": "cc78f14f91f5e53b42044d0620961c48028ff9f5", "shasum": "" }, "require": { @@ -7740,7 +7733,7 @@ "symfony/translation-contracts": "^2.5|^3.0", "symfony/var-exporter": "^6.4|^7.0" }, - "time": "2023-11-29T08:40:23+00:00", + "time": "2023-12-10T16:54:46+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7779,7 +7772,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.0" + "source": "https://github.com/symfony/string/tree/v7.0.2" }, "funding": [ { @@ -7799,17 +7792,17 @@ }, { "name": "symfony/translation", - "version": "v6.4.0", - "version_normalized": "6.4.0.0", + "version": "v6.4.2", + "version_normalized": "6.4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37" + "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37", - "reference": "b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37", + "url": "https://api.github.com/repos/symfony/translation/zipball/a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", + "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", "shasum": "" }, "require": { @@ -7846,7 +7839,7 @@ "symfony/service-contracts": "^2.5|^3", "symfony/yaml": "^5.4|^6.0|^7.0" }, - "time": "2023-11-29T08:14:36+00:00", + "time": "2023-12-18T09:25:29+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -7877,7 +7870,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.0" + "source": "https://github.com/symfony/translation/tree/v6.4.2" }, "funding": [ { @@ -8055,17 +8048,17 @@ }, { "name": "symfony/var-dumper", - "version": "v6.4.0", - "version_normalized": "6.4.0.0", + "version": "v6.4.2", + "version_normalized": "6.4.2.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "c40f7d17e91d8b407582ed51a2bbf83c52c367f6" + "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c40f7d17e91d8b407582ed51a2bbf83c52c367f6", - "reference": "c40f7d17e91d8b407582ed51a2bbf83c52c367f6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", + "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", "shasum": "" }, "require": { @@ -8085,7 +8078,7 @@ "symfony/uid": "^5.4|^6.0|^7.0", "twig/twig": "^2.13|^3.0.4" }, - "time": "2023-11-09T08:28:32+00:00", + "time": "2023-12-28T19:16:56+00:00", "bin": [ "Resources/bin/var-dump-server" ], @@ -8123,7 +8116,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.0" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.2" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 0ffba0b4..5d04f34d 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'laravel/laravel', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '5a7641d6fa2c601113f4b38dd988082b0faa0c58', + 'reference' => 'a068f5495757670b10fae352ef70c64b48109251', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -50,9 +50,9 @@ 'dev_requirement' => false, ), 'doctrine/inflector' => array( - 'pretty_version' => '2.0.8', - 'version' => '2.0.8.0', - 'reference' => 'f9301a5b2fb1216b2b08f02ba04dc45423db6bff', + 'pretty_version' => '2.0.9', + 'version' => '2.0.9.0', + 'reference' => '2930cd5ef353871c821d5c43ed030d39ac8cfe65', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), @@ -86,9 +86,9 @@ 'dev_requirement' => false, ), 'fakerphp/faker' => array( - 'pretty_version' => 'v1.23.0', - 'version' => '1.23.0.0', - 'reference' => 'e3daa170d00fde61ea7719ef47bb09bb8f1d9b01', + 'pretty_version' => 'v1.23.1', + 'version' => '1.23.1.0', + 'reference' => 'bfb4fe148adbf78eff521199619b93a52ae3554b', 'type' => 'library', 'install_path' => __DIR__ . '/../fakerphp/faker', 'aliases' => array(), @@ -169,199 +169,199 @@ 'illuminate/auth' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/broadcasting' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/bus' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/cache' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/collections' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/conditionable' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/config' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/console' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/container' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/contracts' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/cookie' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/database' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/encryption' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/events' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/filesystem' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/hashing' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/http' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/log' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/macroable' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/mail' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/notifications' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/pagination' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/pipeline' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/process' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/queue' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/redis' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/routing' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/session' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/support' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/testing' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/translation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/validation' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'illuminate/view' => array( 'dev_requirement' => false, 'replaced' => array( - 0 => 'v10.39.0', + 0 => 'v10.41.0', ), ), 'inertiajs/inertia-laravel' => array( @@ -380,9 +380,9 @@ ), ), 'laravel/framework' => array( - 'pretty_version' => 'v10.39.0', - 'version' => '10.39.0.0', - 'reference' => '114926b07bfb5fbf2545c03aa2ce5c8c37be650c', + 'pretty_version' => 'v10.41.0', + 'version' => '10.41.0.0', + 'reference' => 'da31969bd35e6ee0bbcd9e876f88952dc754b012', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/framework', 'aliases' => array(), @@ -391,34 +391,34 @@ 'laravel/laravel' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '5a7641d6fa2c601113f4b38dd988082b0faa0c58', + 'reference' => 'a068f5495757670b10fae352ef70c64b48109251', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'laravel/pint' => array( - 'pretty_version' => 'v1.13.7', - 'version' => '1.13.7.0', - 'reference' => '4157768980dbd977f1c4b4cc94997416d8b30ece', + 'pretty_version' => 'v1.13.9', + 'version' => '1.13.9.0', + 'reference' => 'e3e269cc5d874c8efd2dc7962b1c7ff2585fe525', 'type' => 'project', 'install_path' => __DIR__ . '/../laravel/pint', 'aliases' => array(), 'dev_requirement' => true, ), 'laravel/prompts' => array( - 'pretty_version' => 'v0.1.14', - 'version' => '0.1.14.0', - 'reference' => '2219fa9c4b944add1e825c3bdb8ecae8bc503bc6', + 'pretty_version' => 'v0.1.15', + 'version' => '0.1.15.0', + 'reference' => 'd814a27514d99b03c85aa42b22cfd946568636c1', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/prompts', 'aliases' => array(), 'dev_requirement' => false, ), 'laravel/sail' => array( - 'pretty_version' => 'v1.26.3', - 'version' => '1.26.3.0', - 'reference' => 'fa1ad5fbb03686dfc752bfd1861d86091cc1c32d', + 'pretty_version' => 'v1.27.1', + 'version' => '1.27.1.0', + 'reference' => '9dc648978e4276f2bfd37a076a52e3bd9394777f', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/sail', 'aliases' => array(), @@ -443,9 +443,9 @@ 'dev_requirement' => false, ), 'laravel/tinker' => array( - 'pretty_version' => 'v2.8.2', - 'version' => '2.8.2.0', - 'reference' => 'b936d415b252b499e8c3b1f795cd4fc20f57e1f3', + 'pretty_version' => 'v2.9.0', + 'version' => '2.9.0.0', + 'reference' => '502e0fe3f0415d06d5db1f83a472f0f3b754bafe', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/tinker', 'aliases' => array(), @@ -548,18 +548,18 @@ 'dev_requirement' => false, ), 'nette/utils' => array( - 'pretty_version' => 'v4.0.3', - 'version' => '4.0.3.0', - 'reference' => 'a9d127dd6a203ce6d255b2e2db49759f7506e015', + 'pretty_version' => 'v4.0.4', + 'version' => '4.0.4.0', + 'reference' => 'd3ad0aa3b9f934602cb3e3902ebccf10be34d218', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => false, ), 'nikic/php-parser' => array( - 'pretty_version' => 'v4.18.0', - 'version' => '4.18.0.0', - 'reference' => '1bcbb2179f97633e98bbbc87044ee2611c7d7999', + 'pretty_version' => 'v5.0.0', + 'version' => '5.0.0.0', + 'reference' => '4a21235f7e56e713259a6f76bf4b5ea08502b9dc', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), @@ -656,9 +656,9 @@ 'dev_requirement' => true, ), 'phpunit/phpunit' => array( - 'pretty_version' => '10.5.5', - 'version' => '10.5.5.0', - 'reference' => 'ed21115d505b4b4f7dc7b5651464e19a2c7f7856', + 'pretty_version' => '10.5.8', + 'version' => '10.5.8.0', + 'reference' => '08f4fa74d5fbfff1ef22abffee47aaedcaea227e', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/phpunit', 'aliases' => array(), @@ -786,9 +786,9 @@ ), ), 'psy/psysh' => array( - 'pretty_version' => 'v0.11.22', - 'version' => '0.11.22.0', - 'reference' => '128fa1b608be651999ed9789c95e6e2a31b5802b', + 'pretty_version' => 'v0.12.0', + 'version' => '0.12.0.0', + 'reference' => '750bf031a48fd07c673dbe3f11f72362ea306d0d', 'type' => 'library', 'install_path' => __DIR__ . '/../psy/psysh', 'aliases' => array(), @@ -981,27 +981,27 @@ 'dev_requirement' => true, ), 'spatie/ignition' => array( - 'pretty_version' => '1.11.3', - 'version' => '1.11.3.0', - 'reference' => '3d886de644ff7a5b42e4d27c1e1f67c8b5f00044', + 'pretty_version' => '1.12.0', + 'version' => '1.12.0.0', + 'reference' => '5b6f801c605a593106b623e45ca41496a6e7d56d', 'type' => 'library', 'install_path' => __DIR__ . '/../spatie/ignition', 'aliases' => array(), 'dev_requirement' => true, ), 'spatie/laravel-ignition' => array( - 'pretty_version' => '2.3.3', - 'version' => '2.3.3.0', - 'reference' => '66499cd3c858642ded56dafb8fa0352057ca20dd', + 'pretty_version' => '2.4.1', + 'version' => '2.4.1.0', + 'reference' => '005e1e7b1232f3b22d7e7be3f602693efc7dba67', 'type' => 'library', 'install_path' => __DIR__ . '/../spatie/laravel-ignition', 'aliases' => array(), 'dev_requirement' => true, ), 'symfony/console' => array( - 'pretty_version' => 'v6.4.1', - 'version' => '6.4.1.0', - 'reference' => 'a550a7c99daeedef3f9d23fb82e3531525ff11fd', + 'pretty_version' => 'v6.4.2', + 'version' => '6.4.2.0', + 'reference' => '0254811a143e6bc6c8deea08b589a7e68a37f625', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), @@ -1035,9 +1035,9 @@ 'dev_requirement' => false, ), 'symfony/event-dispatcher' => array( - 'pretty_version' => 'v7.0.0', - 'version' => '7.0.0.0', - 'reference' => 'c459b40ffe67c49af6fd392aac374c9edf8a027e', + 'pretty_version' => 'v7.0.2', + 'version' => '7.0.2.0', + 'reference' => '098b62ae81fdd6cbf941f355059f617db28f4f9a', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/event-dispatcher', 'aliases' => array(), @@ -1068,27 +1068,27 @@ 'dev_requirement' => false, ), 'symfony/http-foundation' => array( - 'pretty_version' => 'v6.4.0', - 'version' => '6.4.0.0', - 'reference' => '44a6d39a9cc11e154547d882d5aac1e014440771', + 'pretty_version' => 'v6.4.2', + 'version' => '6.4.2.0', + 'reference' => '172d807f9ef3fc3fbed8377cc57c20d389269271', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-foundation', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/http-kernel' => array( - 'pretty_version' => 'v6.4.1', - 'version' => '6.4.1.0', - 'reference' => '2953274c16a229b3933ef73a6898e18388e12e1b', + 'pretty_version' => 'v6.4.2', + 'version' => '6.4.2.0', + 'reference' => '13e8387320b5942d0dc408440c888e2d526efef4', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/http-kernel', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/mailer' => array( - 'pretty_version' => 'v6.4.0', - 'version' => '6.4.0.0', - 'reference' => 'ca8dcf8892cdc5b4358ecf2528429bb5e706f7ba', + 'pretty_version' => 'v6.4.2', + 'version' => '6.4.2.0', + 'reference' => '6da89e5c9202f129717a770a03183fb140720168', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/mailer', 'aliases' => array(), @@ -1185,18 +1185,18 @@ 'dev_requirement' => false, ), 'symfony/process' => array( - 'pretty_version' => 'v6.4.0', - 'version' => '6.4.0.0', - 'reference' => '191703b1566d97a5425dc969e4350d32b8ef17aa', + 'pretty_version' => 'v6.4.2', + 'version' => '6.4.2.0', + 'reference' => 'c4b1ef0bc80533d87a2e969806172f1c2a980241', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/routing' => array( - 'pretty_version' => 'v6.4.1', - 'version' => '6.4.1.0', - 'reference' => '0c95c164fdba18b12523b75e64199ca3503e6d40', + 'pretty_version' => 'v6.4.2', + 'version' => '6.4.2.0', + 'reference' => '98eab13a07fddc85766f1756129c69f207ffbc21', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/routing', 'aliases' => array(), @@ -1212,18 +1212,18 @@ 'dev_requirement' => false, ), 'symfony/string' => array( - 'pretty_version' => 'v7.0.0', - 'version' => '7.0.0.0', - 'reference' => '92bd2bfbba476d4a1838e5e12168bef2fd1e6620', + 'pretty_version' => 'v7.0.2', + 'version' => '7.0.2.0', + 'reference' => 'cc78f14f91f5e53b42044d0620961c48028ff9f5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/translation' => array( - 'pretty_version' => 'v6.4.0', - 'version' => '6.4.0.0', - 'reference' => 'b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37', + 'pretty_version' => 'v6.4.2', + 'version' => '6.4.2.0', + 'reference' => 'a2ab2ec1a462e53016de8e8d5e8912bfd62ea681', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/translation', 'aliases' => array(), @@ -1254,9 +1254,9 @@ 'dev_requirement' => false, ), 'symfony/var-dumper' => array( - 'pretty_version' => 'v6.4.0', - 'version' => '6.4.0.0', - 'reference' => 'c40f7d17e91d8b407582ed51a2bbf83c52c367f6', + 'pretty_version' => 'v6.4.2', + 'version' => '6.4.2.0', + 'reference' => '68d6573ec98715ddcae5a0a85bee3c1c27a4c33f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), diff --git a/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php b/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php index 806e1753..04b6d00c 100644 --- a/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php +++ b/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/English/Inflectible.php @@ -93,6 +93,7 @@ class Inflectible public static function getIrregular(): iterable { yield new Substitution(new Word('atlas'), new Word('atlases')); + yield new Substitution(new Word('axis'), new Word('axes')); yield new Substitution(new Word('axe'), new Word('axes')); yield new Substitution(new Word('beef'), new Word('beefs')); yield new Substitution(new Word('blouse'), new Word('blouses')); @@ -104,6 +105,7 @@ class Inflectible yield new Substitution(new Word('child'), new Word('children')); yield new Substitution(new Word('canvas'), new Word('canvases')); yield new Substitution(new Word('cookie'), new Word('cookies')); + yield new Substitution(new Word('brownie'), new Word('brownies')); yield new Substitution(new Word('corpus'), new Word('corpuses')); yield new Substitution(new Word('cow'), new Word('cows')); yield new Substitution(new Word('criterion'), new Word('criteria')); @@ -111,6 +113,7 @@ class Inflectible yield new Substitution(new Word('demo'), new Word('demos')); yield new Substitution(new Word('domino'), new Word('dominoes')); yield new Substitution(new Word('echo'), new Word('echoes')); + yield new Substitution(new Word('epoch'), new Word('epochs')); yield new Substitution(new Word('foot'), new Word('feet')); yield new Substitution(new Word('fungus'), new Word('fungi')); yield new Substitution(new Word('ganglion'), new Word('ganglions')); diff --git a/vendor/fakerphp/faker/CHANGELOG.md b/vendor/fakerphp/faker/CHANGELOG.md index 0900d479..d7f8396d 100644 --- a/vendor/fakerphp/faker/CHANGELOG.md +++ b/vendor/fakerphp/faker/CHANGELOG.md @@ -1,6 +1,14 @@ # CHANGELOG -## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.23.0...main) +## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.23.1...1.23) + +## [2023-09-29, v1.23.1](https://github.com/FakerPHP/Faker/compare/v1.23.0..v1.23.1) + +- Fixed double `а` female lastName in `ru_RU/Person::name()` (#832) +- Fixed polish license plates (#685) +- Stopped using `static` in callables in `Provider\pt_BR\PhoneNumber` (#785) +- Fixed incorrect female name (#794) +- Stopped using the deprecated `MT_RAND_PHP` constant to seed the random generator on PHP 8.3 (#844) ## [2023-06-12, v1.23.0](https://github.com/FakerPHP/Faker/compare/v1.22.0..v1.23.0) diff --git a/vendor/fakerphp/faker/composer.json b/vendor/fakerphp/faker/composer.json index 9b85ce9d..88724f2a 100644 --- a/vendor/fakerphp/faker/composer.json +++ b/vendor/fakerphp/faker/composer.json @@ -52,10 +52,5 @@ "composer/package-versions-deprecated": true }, "sort-packages": true - }, - "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" - } } } diff --git a/vendor/fakerphp/faker/psalm.baseline.xml b/vendor/fakerphp/faker/psalm.baseline.xml deleted file mode 100644 index 271a6a6b..00000000 --- a/vendor/fakerphp/faker/psalm.baseline.xml +++ /dev/null @@ -1,227 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<files psalm-version="5.11.0@c9b192ab8400fdaf04b2b13d110575adc879aa90"> - <file src="src/Faker/Calculator/Luhn.php"> - <InvalidReturnStatement> - <code>0</code> - </InvalidReturnStatement> - <InvalidReturnType> - <code>string</code> - </InvalidReturnType> - </file> - <file src="src/Faker/Generator.php"> - <InvalidReturnStatement> - <code><![CDATA[$this->uniqueGenerator]]></code> - <code>new ChanceGenerator($this, $weight, $default)</code> - <code>new ValidGenerator($this, $validator, $maxRetries)</code> - </InvalidReturnStatement> - <InvalidReturnType> - <code>self</code> - <code>self</code> - <code>self</code> - </InvalidReturnType> - </file> - <file src="src/Faker/ORM/CakePHP/EntityPopulator.php"> - <UndefinedClass> - <code>TableRegistry</code> - </UndefinedClass> - </file> - <file src="src/Faker/ORM/Doctrine/EntityPopulator.php"> - <UndefinedClass> - <code><![CDATA[$this->class]]></code> - <code><![CDATA[$this->class->associationMappings]]></code> - <code>\Doctrine\ODM\MongoDB\Mapping\ClassMetadata</code> - <code>\Doctrine\ODM\MongoDB\Mapping\ClassMetadata</code> - <code>\Doctrine\ODM\MongoDB\Mapping\ClassMetadata</code> - <code>\Doctrine\ORM\Mapping\ClassMetadata</code> - <code>\Doctrine\ORM\Mapping\ClassMetadata</code> - </UndefinedClass> - <UndefinedInterfaceMethod> - <code>createQueryBuilder</code> - <code>getAssociationMappings</code> - <code>newInstance</code> - </UndefinedInterfaceMethod> - </file> - <file src="src/Faker/ORM/Mandango/EntityPopulator.php"> - <UndefinedClass> - <code>Mandango</code> - <code>Mandango</code> - </UndefinedClass> - </file> - <file src="src/Faker/ORM/Mandango/Populator.php"> - <UndefinedClass> - <code><![CDATA[$this->mandango]]></code> - <code>Mandango</code> - </UndefinedClass> - </file> - <file src="src/Faker/ORM/Propel/ColumnTypeGuesser.php"> - <UndefinedClass> - <code>\ColumnMap</code> - </UndefinedClass> - </file> - <file src="src/Faker/ORM/Propel/EntityPopulator.php"> - <UndefinedClass> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>\ColumnMap</code> - </UndefinedClass> - </file> - <file src="src/Faker/ORM/Propel/Populator.php"> - <UndefinedClass> - <code>\Propel</code> - </UndefinedClass> - <UndefinedDocblockClass> - <code>PropelPDO</code> - </UndefinedDocblockClass> - </file> - <file src="src/Faker/ORM/Propel2/ColumnTypeGuesser.php"> - <UndefinedClass> - <code>ColumnMap</code> - </UndefinedClass> - </file> - <file src="src/Faker/ORM/Propel2/EntityPopulator.php"> - <UndefinedClass> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>$columnMap</code> - <code>ColumnMap</code> - </UndefinedClass> - </file> - <file src="src/Faker/ORM/Propel2/Populator.php"> - <UndefinedClass> - <code>Propel</code> - </UndefinedClass> - <UndefinedDocblockClass> - <code>PropelPDO</code> - </UndefinedDocblockClass> - </file> - <file src="src/Faker/ORM/Spot/EntityPopulator.php"> - <InvalidReturnStatement> - <code><![CDATA[$this->mapper]]></code> - </InvalidReturnStatement> - <InvalidReturnType> - <code>string</code> - </InvalidReturnType> - <UndefinedClass> - <code>$relation</code> - <code>$relation</code> - <code>BelongsTo</code> - <code>Locator</code> - <code>Mapper</code> - </UndefinedClass> - <UndefinedDocblockClass> - <code>$locator</code> - <code><![CDATA[$this->mapper]]></code> - <code><![CDATA[$this->mapper]]></code> - <code><![CDATA[$this->mapper]]></code> - <code><![CDATA[$this->mapper]]></code> - <code><![CDATA[$this->mapper]]></code> - <code>Locator</code> - <code>Mapper</code> - </UndefinedDocblockClass> - </file> - <file src="src/Faker/ORM/Spot/Populator.php"> - <UndefinedClass> - <code><![CDATA[$this->locator]]></code> - <code>Locator</code> - </UndefinedClass> - <UndefinedDocblockClass> - <code>Locator</code> - </UndefinedDocblockClass> - </file> - <file src="src/Faker/Provider/Base.php"> - <InvalidArgument> - <code>[static::class, 'randomDigit']</code> - </InvalidArgument> - <UndefinedClass> - <code>\UnitEnum</code> - <code>\UnitEnum</code> - </UndefinedClass> - <UndefinedDocblockClass> - <code>Closure</code> - </UndefinedDocblockClass> - <UndefinedFunction> - <code>enum_exists($array)</code> - <code>enum_exists($array)</code> - </UndefinedFunction> - </file> - <file src="src/Faker/Provider/Biased.php"> - <InvalidParamDefault> - <code>callable</code> - </InvalidParamDefault> - </file> - <file src="src/Faker/Provider/File.php"> - <FalsableReturnStatement> - <code>false</code> - </FalsableReturnStatement> - </file> - <file src="src/Faker/Provider/PhoneNumber.php"> - <InvalidReturnStatement> - <code>$imei</code> - </InvalidReturnStatement> - <InvalidReturnType> - <code>int</code> - </InvalidReturnType> - </file> - <file src="src/Faker/Provider/ar_SA/Address.php"> - <UndefinedPropertyFetch> - <code>static::$cityPrefix</code> - </UndefinedPropertyFetch> - </file> - <file src="src/Faker/Provider/cs_CZ/Person.php"> - <NonStaticSelfCall> - <code>static::birthNumber(static::GENDER_FEMALE)</code> - <code>static::birthNumber(static::GENDER_MALE)</code> - </NonStaticSelfCall> - </file> - <file src="src/Faker/Provider/en_SG/Person.php"> - <InvalidArrayOffset> - <code>$weights[$i]</code> - </InvalidArrayOffset> - </file> - <file src="src/Faker/Provider/is_IS/Person.php"> - <InvalidArrayOffset> - <code>$ref[$i]</code> - </InvalidArrayOffset> - </file> - <file src="src/Faker/Provider/ja_JP/Text.php"> - <UndefinedMethod> - <code>static::split($text)</code> - </UndefinedMethod> - </file> - <file src="src/Faker/Provider/pl_PL/Company.php"> - <InvalidArrayOffset> - <code>$weights[$i]</code> - <code>$weights[$i]</code> - </InvalidArrayOffset> - </file> - <file src="src/Faker/Provider/pl_PL/Person.php"> - <InvalidArrayOffset> - <code>$high[$i]</code> - <code>$low[$i]</code> - <code>$result[$i]</code> - <code>$weights[$i + 3]</code> - <code>$weights[$i]</code> - <code>$weights[$i]</code> - </InvalidArrayOffset> - <UndefinedDocblockClass> - <code>DateTime</code> - </UndefinedDocblockClass> - </file> - <file src="src/Faker/Provider/sl_SI/Person.php"> - <NonStaticSelfCall> - <code>static::lastName()</code> - <code>static::lastName()</code> - </NonStaticSelfCall> - </file> -</files> diff --git a/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php b/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php index 9c3daf17..fbf11fcd 100644 --- a/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php +++ b/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php @@ -17,11 +17,9 @@ class Ean * * @see https://en.wikipedia.org/wiki/International_Article_Number * - * @param string $digits - * * @return int */ - public static function checksum($digits) + public static function checksum(string $digits) { $sequence = (strlen($digits) + 1) === 8 ? [3, 1] : [1, 3]; $sums = 0; @@ -41,7 +39,7 @@ class Ean * * @return bool */ - public static function isValid($ean) + public static function isValid(string $ean) { if (!preg_match(self::PATTERN, $ean)) { return false; diff --git a/vendor/fakerphp/faker/src/Faker/Calculator/Iban.php b/vendor/fakerphp/faker/src/Faker/Calculator/Iban.php index b00b18f0..19068fd7 100644 --- a/vendor/fakerphp/faker/src/Faker/Calculator/Iban.php +++ b/vendor/fakerphp/faker/src/Faker/Calculator/Iban.php @@ -7,11 +7,9 @@ class Iban /** * Generates IBAN Checksum * - * @param string $iban - * * @return string Checksum (numeric string) */ - public static function checksum($iban) + public static function checksum(string $iban) { // Move first four digits to end and set checksum to '00' $checkString = substr($iban, 4) . substr($iban, 0, 2) . '00'; @@ -34,11 +32,9 @@ class Iban /** * Converts letter to number * - * @param string $char - * * @return int */ - public static function alphaToNumber($char) + public static function alphaToNumber(string $char) { return ord($char) - 55; } @@ -50,7 +46,7 @@ class Iban * * @return int */ - public static function mod97($number) + public static function mod97(string $number) { $checksum = (int) $number[0]; @@ -64,11 +60,9 @@ class Iban /** * Checks whether an IBAN has a valid checksum * - * @param string $iban - * * @return bool */ - public static function isValid($iban) + public static function isValid(string $iban) { return self::checksum($iban) === substr($iban, 2, 2); } diff --git a/vendor/fakerphp/faker/src/Faker/Calculator/Luhn.php b/vendor/fakerphp/faker/src/Faker/Calculator/Luhn.php index 3a048fb0..4c1e6f50 100644 --- a/vendor/fakerphp/faker/src/Faker/Calculator/Luhn.php +++ b/vendor/fakerphp/faker/src/Faker/Calculator/Luhn.php @@ -13,11 +13,9 @@ namespace Faker\Calculator; class Luhn { /** - * @param string $number - * * @return int */ - private static function checksum($number) + private static function checksum(string $number) { $number = (string) $number; $length = strlen($number); @@ -35,16 +33,14 @@ class Luhn } /** - * @param string $partialNumber - * * @return string */ - public static function computeCheckDigit($partialNumber) + public static function computeCheckDigit(string $partialNumber) { $checkDigit = self::checksum($partialNumber . '0'); if ($checkDigit === 0) { - return 0; + return '0'; } return (string) (10 - $checkDigit); @@ -53,11 +49,9 @@ class Luhn /** * Checks whether a number (partial number + check digit) is Luhn compliant * - * @param string $number - * * @return bool */ - public static function isValid($number) + public static function isValid(string $number) { return self::checksum($number) === 0; } @@ -65,11 +59,9 @@ class Luhn /** * Generate a Luhn compliant number. * - * @param string $partialValue - * * @return string */ - public static function generateLuhnNumber($partialValue) + public static function generateLuhnNumber(string $partialValue) { if (!preg_match('/^\d+$/', $partialValue)) { throw new \InvalidArgumentException('Argument should be an integer.'); diff --git a/vendor/fakerphp/faker/src/Faker/Container/Container.php b/vendor/fakerphp/faker/src/Faker/Container/Container.php index 2dd2d974..9b361845 100644 --- a/vendor/fakerphp/faker/src/Faker/Container/Container.php +++ b/vendor/fakerphp/faker/src/Faker/Container/Container.php @@ -16,9 +16,9 @@ final class Container implements ContainerInterface /** * @var array<string, callable|object|string> */ - private $definitions; + private array $definitions; - private $services = []; + private array $services = []; /** * Create a container object with a set of definitions. The array value MUST @@ -63,7 +63,7 @@ final class Container implements ContainerInterface $definition = $this->definitions[$id]; - $service = $this->services[$id] = $this->getService($id, $definition); + $service = $this->getService($id, $definition); if (!$service instanceof Extension) { throw new \RuntimeException(sprintf( @@ -73,6 +73,8 @@ final class Container implements ContainerInterface )); } + $this->services[$id] = $service; + return $service; } @@ -81,7 +83,7 @@ final class Container implements ContainerInterface * * @param callable|object|string $definition */ - private function getService($id, $definition) + private function getService(string $id, $definition) { if (is_callable($definition)) { try { @@ -134,12 +136,4 @@ final class Container implements ContainerInterface return array_key_exists($id, $this->definitions); } - - /** - * Get the bindings between Extension interfaces and implementations. - */ - public function getDefinitions(): array - { - return $this->definitions; - } } diff --git a/vendor/fakerphp/faker/src/Faker/Container/ContainerBuilder.php b/vendor/fakerphp/faker/src/Faker/Container/ContainerBuilder.php index 3fb335ff..f2545e94 100644 --- a/vendor/fakerphp/faker/src/Faker/Container/ContainerBuilder.php +++ b/vendor/fakerphp/faker/src/Faker/Container/ContainerBuilder.php @@ -5,14 +5,7 @@ declare(strict_types=1); namespace Faker\Container; use Faker\Core; -use Faker\Extension\BarcodeExtension; -use Faker\Extension\BloodExtension; -use Faker\Extension\ColorExtension; -use Faker\Extension\DateTimeExtension; -use Faker\Extension\FileExtension; -use Faker\Extension\NumberExtension; -use Faker\Extension\UuidExtension; -use Faker\Extension\VersionExtension; +use Faker\Extension; /** * @experimental This class is experimental and does not fall under our BC promise @@ -22,36 +15,23 @@ final class ContainerBuilder /** * @var array<string, callable|object|string> */ - private $definitions = []; + private array $definitions = []; /** - * @param callable|object|string $value + * @param callable|object|string $definition * * @throws \InvalidArgumentException */ - public function add($value, string $name = null): self + public function add(string $id, $definition): self { - if (!is_string($value) && !is_callable($value) && !is_object($value)) { + if (!is_string($definition) && !is_callable($definition) && !is_object($definition)) { throw new \InvalidArgumentException(sprintf( 'First argument to "%s::add()" must be a string, callable or object.', self::class, )); } - if ($name === null) { - if (is_string($value)) { - $name = $value; - } elseif (is_object($value)) { - $name = get_class($value); - } else { - throw new \InvalidArgumentException(sprintf( - 'Second argument to "%s::add()" is required not passing a string or object as first argument', - self::class, - )); - } - } - - $this->definitions[$name] = $value; + $this->definitions[$id] = $definition; return $this; } @@ -61,32 +41,28 @@ final class ContainerBuilder return new Container($this->definitions); } - /** - * Get an array with extension that represent the default English - * functionality. - */ - public static function defaultExtensions(): array + private static function defaultExtensions(): array { return [ - BarcodeExtension::class => Core\Barcode::class, - BloodExtension::class => Core\Blood::class, - ColorExtension::class => Core\Color::class, - DateTimeExtension::class => Core\DateTime::class, - FileExtension::class => Core\File::class, - NumberExtension::class => Core\Number::class, - VersionExtension::class => Core\Version::class, - UuidExtension::class => Core\Uuid::class, + Extension\BarcodeExtension::class => Core\Barcode::class, + Extension\BloodExtension::class => Core\Blood::class, + Extension\ColorExtension::class => Core\Color::class, + Extension\DateTimeExtension::class => Core\DateTime::class, + Extension\FileExtension::class => Core\File::class, + Extension\NumberExtension::class => Core\Number::class, + Extension\UuidExtension::class => Core\Uuid::class, + Extension\VersionExtension::class => Core\Version::class, ]; } - public static function getDefault(): ContainerInterface + public static function withDefaultExtensions(): self { $instance = new self(); foreach (self::defaultExtensions() as $id => $definition) { - $instance->add($definition, $id); + $instance->add($id, $definition); } - return $instance->build(); + return $instance; } } diff --git a/vendor/fakerphp/faker/src/Faker/Container/ContainerInterface.php b/vendor/fakerphp/faker/src/Faker/Container/ContainerInterface.php index d34f4a89..9e5237d3 100644 --- a/vendor/fakerphp/faker/src/Faker/Container/ContainerInterface.php +++ b/vendor/fakerphp/faker/src/Faker/Container/ContainerInterface.php @@ -6,8 +6,4 @@ use Psr\Container\ContainerInterface as BaseContainerInterface; interface ContainerInterface extends BaseContainerInterface { - /** - * Get the bindings between Extension interfaces and implementations. - */ - public function getDefinitions(): array; } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Barcode.php b/vendor/fakerphp/faker/src/Faker/Core/Barcode.php index 89f801a5..a85420be 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Barcode.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Barcode.php @@ -12,6 +12,13 @@ use Faker\Extension; */ final class Barcode implements Extension\BarcodeExtension { + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + private function ean(int $length = 13): string { $code = Extension\Helper::numerify(str_repeat('#', $length - 1)); @@ -38,7 +45,7 @@ final class Barcode implements Extension\BarcodeExtension public function isbn13(): string { - $code = '97' . mt_rand(8, 9) . Extension\Helper::numerify(str_repeat('#', 9)); + $code = '97' . $this->numberExtension->numberBetween(8, 9) . Extension\Helper::numerify(str_repeat('#', 9)); return sprintf('%s%s', $code, Calculator\Ean::checksum($code)); } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Blood.php b/vendor/fakerphp/faker/src/Faker/Core/Blood.php index 50a5806c..03e563fc 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Blood.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Blood.php @@ -14,12 +14,12 @@ final class Blood implements Extension\BloodExtension /** * @var string[] */ - private $bloodTypes = ['A', 'AB', 'B', 'O']; + private array $bloodTypes = ['A', 'AB', 'B', 'O']; /** * @var string[] */ - private $bloodRhFactors = ['+', '-']; + private array $bloodRhFactors = ['+', '-']; public function bloodType(): string { diff --git a/vendor/fakerphp/faker/src/Faker/Core/Color.php b/vendor/fakerphp/faker/src/Faker/Core/Color.php index 6e4e350e..bd948190 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Color.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Color.php @@ -12,19 +12,20 @@ use Faker\Extension\Helper; */ final class Color implements Extension\ColorExtension { - /** - * @var string[] - */ - private $safeColorNames = [ - 'black', 'maroon', 'green', 'navy', 'olive', - 'purple', 'teal', 'lime', 'blue', 'silver', - 'gray', 'yellow', 'fuchsia', 'aqua', 'white', - ]; + private Extension\NumberExtension $numberExtension; /** * @var string[] */ - private $allColorNames = [ + private array $safeColorNames = [ + 'black', 'maroon', 'green', 'navy', 'olive', + 'purple', 'teal', 'lime', 'blue', 'silver', + 'gray', 'yellow', 'fuchsia', 'aqua', 'white', + ]; + /** + * @var string[] + */ + private array $allColorNames = [ 'AliceBlue', 'AntiqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque', 'Black', 'BlanchedAlmond', 'Blue', 'BlueViolet', 'Brown', 'BurlyWood', 'CadetBlue', @@ -53,14 +54,17 @@ final class Color implements Extension\ColorExtension 'Turquoise', 'Violet', 'Wheat', 'White', 'WhiteSmoke', 'Yellow', 'YellowGreen', ]; + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + /** * @example '#fa3cc2' */ public function hexColor(): string { - $number = new Number(); - - return '#' . str_pad(dechex($number->numberBetween(1, 16777215)), 6, '0', STR_PAD_LEFT); + return '#' . str_pad(dechex($this->numberExtension->numberBetween(1, 16777215)), 6, '0', STR_PAD_LEFT); } /** @@ -68,8 +72,7 @@ final class Color implements Extension\ColorExtension */ public function safeHexColor(): string { - $number = new Number(); - $color = str_pad(dechex($number->numberBetween(0, 255)), 3, '0', STR_PAD_LEFT); + $color = str_pad(dechex($this->numberExtension->numberBetween(0, 255)), 3, '0', STR_PAD_LEFT); return sprintf( '#%s%s%s%s%s%s', @@ -122,12 +125,10 @@ final class Color implements Extension\ColorExtension */ public function rgbaCssColor(): string { - $number = new Number(); - return sprintf( 'rgba(%s,%s)', $this->rgbColor(), - $number->randomFloat(1, 0, 1), + $this->numberExtension->randomFloat(1, 0, 1), ); } @@ -152,13 +153,11 @@ final class Color implements Extension\ColorExtension */ public function hslColor(): string { - $number = new Number(); - return sprintf( '%s,%s,%s', - $number->numberBetween(0, 360), - $number->numberBetween(0, 100), - $number->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 360), + $this->numberExtension->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 100), ); } @@ -169,12 +168,10 @@ final class Color implements Extension\ColorExtension */ public function hslColorAsArray(): array { - $number = new Number(); - return [ - $number->numberBetween(0, 360), - $number->numberBetween(0, 100), - $number->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 360), + $this->numberExtension->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 100), ]; } } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Coordinates.php b/vendor/fakerphp/faker/src/Faker/Core/Coordinates.php index 40a26589..15b5492e 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Coordinates.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Coordinates.php @@ -4,10 +4,20 @@ declare(strict_types=1); namespace Faker\Core; -use Faker\Extension\Extension; +use Faker\Extension; -class Coordinates implements Extension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Coordinates implements Extension\Extension { + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + /** * @example '77.147489' * @@ -52,8 +62,8 @@ class Coordinates implements Extension public function localCoordinates(): array { return [ - 'latitude' => static::latitude(), - 'longitude' => static::longitude(), + 'latitude' => $this->latitude(), + 'longitude' => $this->longitude(), ]; } @@ -63,6 +73,6 @@ class Coordinates implements Extension throw new \LogicException('Invalid coordinates boundaries'); } - return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); + return $this->numberExtension->randomFloat($nbMaxDecimals, $min, $max); } } diff --git a/vendor/fakerphp/faker/src/Faker/Core/DateTime.php b/vendor/fakerphp/faker/src/Faker/Core/DateTime.php index f3d78776..6ef40a96 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/DateTime.php +++ b/vendor/fakerphp/faker/src/Faker/Core/DateTime.php @@ -8,7 +8,7 @@ use Faker\Extension\GeneratorAwareExtensionTrait; use Faker\Extension\Helper; /** - * @experimental + * @experimental This class is experimental and does not fall under our BC promise * * @since 1.20.0 */ @@ -19,12 +19,9 @@ final class DateTime implements DateTimeExtension, GeneratorAwareExtension /** * @var string[] */ - private $centuries = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII', 'XIX', 'XX', 'XXI']; + private array $centuries = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII', 'XIX', 'XX', 'XXI']; - /** - * @var string - */ - private $defaultTimezone = null; + private ?string $defaultTimezone = null; /** * Get the POSIX-timestamp of a DateTime, int or string. @@ -33,7 +30,7 @@ final class DateTime implements DateTimeExtension, GeneratorAwareExtension * * @return false|int */ - protected function getTimestamp($until = 'now') + private function getTimestamp($until = 'now') { if (is_numeric($until)) { return (int) $until; @@ -51,22 +48,12 @@ final class DateTime implements DateTimeExtension, GeneratorAwareExtension * * @param int $timestamp the UNIX / POSIX-compatible timestamp */ - protected function getTimestampDateTime(int $timestamp): \DateTime + private function getTimestampDateTime(int $timestamp): \DateTime { return new \DateTime('@' . $timestamp); } - protected function setDefaultTimezone(string $timezone = null): void - { - $this->defaultTimezone = $timezone; - } - - protected function getDefaultTimezone(): ?string - { - return $this->defaultTimezone; - } - - protected function resolveTimezone(?string $timezone): string + private function resolveTimezone(?string $timezone): string { if ($timezone !== null) { return $timezone; @@ -78,7 +65,7 @@ final class DateTime implements DateTimeExtension, GeneratorAwareExtension /** * Internal method to set the timezone on a DateTime object. */ - protected function setTimezone(\DateTime $dateTime, ?string $timezone): \DateTime + private function setTimezone(\DateTime $dateTime, ?string $timezone): \DateTime { $timezone = $this->resolveTimezone($timezone); diff --git a/vendor/fakerphp/faker/src/Faker/Core/File.php b/vendor/fakerphp/faker/src/Faker/Core/File.php index adddb0cb..5151e900 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/File.php +++ b/vendor/fakerphp/faker/src/Faker/Core/File.php @@ -18,7 +18,7 @@ final class File implements Extension\FileExtension * * @see http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types */ - private $mimeTypes = [ + private array $mimeTypes = [ 'application/atom+xml' => 'atom', 'application/ecmascript' => 'ecma', 'application/emma+xml' => 'emma', diff --git a/vendor/fakerphp/faker/src/Faker/Core/Number.php b/vendor/fakerphp/faker/src/Faker/Core/Number.php index f67c0426..a16920c9 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Number.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Number.php @@ -21,12 +21,12 @@ final class Number implements Extension\NumberExtension public function randomDigit(): int { - return mt_rand(0, 9); + return $this->numberBetween(0, 9); } public function randomDigitNot(int $except): int { - $result = self::numberBetween(0, 8); + $result = $this->numberBetween(0, 8); if ($result >= $except) { ++$result; @@ -37,7 +37,7 @@ final class Number implements Extension\NumberExtension public function randomDigitNotZero(): int { - return mt_rand(1, 9); + return $this->numberBetween(1, 9); } public function randomFloat(?int $nbMaxDecimals = null, float $min = 0, ?float $max = null): float @@ -60,7 +60,7 @@ final class Number implements Extension\NumberExtension $max = $tmp; } - return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); + return round($min + $this->numberBetween() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); } public function randomNumber(int $nbDigits = null, bool $strict = false): int @@ -75,9 +75,9 @@ final class Number implements Extension\NumberExtension } if ($strict) { - return mt_rand(10 ** ($nbDigits - 1), $max); + return $this->numberBetween(10 ** ($nbDigits - 1), $max); } - return mt_rand(0, $max); + return $this->numberBetween(0, $max); } } diff --git a/vendor/fakerphp/faker/src/Faker/Core/Uuid.php b/vendor/fakerphp/faker/src/Faker/Core/Uuid.php index 5e3b633a..d1db1b22 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Uuid.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Uuid.php @@ -2,17 +2,26 @@ namespace Faker\Core; -use Faker\Extension\UuidExtension; +use Faker\Extension; -final class Uuid implements UuidExtension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Uuid implements Extension\UuidExtension { + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + + $this->numberExtension = $numberExtension ?: new Number(); + } + public function uuid3(): string { - $number = new Number(); - // fix for compatibility with 32bit architecture; each mt_rand call is restricted to 32bit // two such calls will cause 64bits of randomness regardless of architecture - $seed = $number->numberBetween(0, 2147483647) . '#' . $number->numberBetween(0, 2147483647); + $seed = $this->numberExtension->numberBetween(0, 2147483647) . '#' . $this->numberExtension->numberBetween(0, 2147483647); // Hash the seed and convert to a byte array $val = md5($seed, true); diff --git a/vendor/fakerphp/faker/src/Faker/Core/Version.php b/vendor/fakerphp/faker/src/Faker/Core/Version.php index ce484e6a..8863c480 100644 --- a/vendor/fakerphp/faker/src/Faker/Core/Version.php +++ b/vendor/fakerphp/faker/src/Faker/Core/Version.php @@ -4,16 +4,25 @@ declare(strict_types=1); namespace Faker\Core; -use Faker\Extension\Helper; -use Faker\Extension\VersionExtension; +use Faker\Extension; use Faker\Provider\DateTime; -final class Version implements VersionExtension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Version implements Extension\VersionExtension { + private Extension\NumberExtension $numberExtension; /** * @var string[] */ - private $semverCommonPreReleaseIdentifiers = ['alpha', 'beta', 'rc']; + private array $semverCommonPreReleaseIdentifiers = ['alpha', 'beta', 'rc']; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + + $this->numberExtension = $numberExtension ?: new Number(); + } /** * Represents v2.0.0 of the semantic versioning: https://semver.org/spec/v2.0.0.html @@ -22,11 +31,11 @@ final class Version implements VersionExtension { return sprintf( '%d.%d.%d%s%s', - mt_rand(0, 9), - mt_rand(0, 99), - mt_rand(0, 99), - $preRelease && mt_rand(0, 1) ? '-' . $this->semverPreReleaseIdentifier() : '', - $build && mt_rand(0, 1) ? '+' . $this->semverBuildIdentifier() : '', + $this->numberExtension->numberBetween(0, 9), + $this->numberExtension->numberBetween(0, 99), + $this->numberExtension->numberBetween(0, 99), + $preRelease && $this->numberExtension->numberBetween(0, 1) === 1 ? '-' . $this->semverPreReleaseIdentifier() : '', + $build && $this->numberExtension->numberBetween(0, 1) === 1 ? '+' . $this->semverBuildIdentifier() : '', ); } @@ -35,13 +44,13 @@ final class Version implements VersionExtension */ private function semverPreReleaseIdentifier(): string { - $ident = Helper::randomElement($this->semverCommonPreReleaseIdentifiers); + $ident = Extension\Helper::randomElement($this->semverCommonPreReleaseIdentifiers); - if (!mt_rand(0, 1)) { + if ($this->numberExtension->numberBetween(0, 1) !== 1) { return $ident; } - return $ident . '.' . mt_rand(1, 99); + return $ident . '.' . $this->numberExtension->numberBetween(1, 99); } /** @@ -49,9 +58,9 @@ final class Version implements VersionExtension */ private function semverBuildIdentifier(): string { - if (mt_rand(0, 1)) { + if ($this->numberExtension->numberBetween(0, 1) === 1) { // short git revision syntax: https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection - return substr(sha1(Helper::lexify('??????')), 0, 7); + return substr(sha1(Extension\Helper::lexify('??????')), 0, 7); } // date syntax diff --git a/vendor/fakerphp/faker/src/Faker/Extension/Helper.php b/vendor/fakerphp/faker/src/Faker/Extension/Helper.php index 27a66143..47200e90 100644 --- a/vendor/fakerphp/faker/src/Faker/Extension/Helper.php +++ b/vendor/fakerphp/faker/src/Faker/Extension/Helper.php @@ -83,10 +83,10 @@ final class Helper public static function bothify(string $string): string { $string = self::replaceWildcard($string, '*', static function () { - return mt_rand(0, 1) ? '#' : '?'; + return mt_rand(0, 1) === 1 ? '#' : '?'; }); - return static::lexify(static::numerify($string)); + return self::lexify(self::numerify($string)); } private static function replaceWildcard(string $string, string $wildcard, callable $callback): string diff --git a/vendor/fakerphp/faker/src/Faker/Factory.php b/vendor/fakerphp/faker/src/Faker/Factory.php index 7d29de75..e9d20143 100644 --- a/vendor/fakerphp/faker/src/Faker/Factory.php +++ b/vendor/fakerphp/faker/src/Faker/Factory.php @@ -38,10 +38,12 @@ class Factory if ($providerClass = self::findProviderClassname($provider, $locale)) { return $providerClass; } + // fallback to default locale if ($providerClass = self::findProviderClassname($provider, static::DEFAULT_LOCALE)) { return $providerClass; } + // fallback to no locale if ($providerClass = self::findProviderClassname($provider)) { return $providerClass; diff --git a/vendor/fakerphp/faker/src/Faker/Generator.php b/vendor/fakerphp/faker/src/Faker/Generator.php index 2cad02d7..0b994e4c 100644 --- a/vendor/fakerphp/faker/src/Faker/Generator.php +++ b/vendor/fakerphp/faker/src/Faker/Generator.php @@ -279,7 +279,7 @@ use Faker\Container\ContainerInterface; * * @property string $image * - * @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null, $gray = false) + * @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null, $gray = false, string $format = 'png') * * @property string $email * @@ -463,7 +463,7 @@ use Faker\Container\ContainerInterface; * * @property string $lastName * - * @method string lastName() + * @method string lastName($gender = null) * * @property string $title * @@ -567,7 +567,7 @@ class Generator public function __construct(ContainerInterface $container = null) { - $this->container = $container ?: Container\ContainerBuilder::getDefault(); + $this->container = $container ?: Container\ContainerBuilder::withDefaultExtensions()->build(); } /** @@ -687,10 +687,22 @@ class Generator if ($seed === null) { mt_srand(); } else { - mt_srand((int) $seed, MT_RAND_PHP); + mt_srand((int) $seed, self::mode()); } } + /** + * @see https://www.php.net/manual/en/migration83.deprecated.php#migration83.deprecated.random + */ + private static function mode(): int + { + if (PHP_VERSION_ID < 80300) { + return MT_RAND_PHP; + } + + return MT_RAND_MT19937; + } + public function format($format, $arguments = []) { return call_user_func_array($this->getFormatter($format), $arguments); diff --git a/vendor/fakerphp/faker/src/Faker/Provider/Base.php b/vendor/fakerphp/faker/src/Faker/Provider/Base.php index d91552c8..6b9876bc 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/Base.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/Base.php @@ -491,7 +491,7 @@ class Base public static function bothify($string = '## ??') { $string = self::replaceWildcard($string, '*', static function () { - return mt_rand(0, 1) ? '#' : '?'; + return mt_rand(0, 1) === 1 ? '#' : '?'; }); return static::lexify(static::numerify($string)); @@ -576,6 +576,7 @@ class Base // remove backslashes (that are not followed by another backslash) because they are escape characters $match = preg_replace('/\\\(?!\\\)/', '', $matches[1]); $randomElement = Base::randomElement(str_split($match)); + //[.] should not be a random character, but a literal . return str_replace('.', '\.', $randomElement); }, $regex); diff --git a/vendor/fakerphp/faker/src/Faker/Provider/Image.php b/vendor/fakerphp/faker/src/Faker/Provider/Image.php index 53f28dfc..e7871421 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/Image.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/Image.php @@ -123,6 +123,7 @@ class Image extends Base ); $dir = null === $dir ? sys_get_temp_dir() : $dir; // GNU/Linux / OS X / Windows compatible + // Validate directory path if (!is_dir($dir) || !is_writable($dir)) { throw new \InvalidArgumentException(sprintf('Cannot write to directory "%s"', $dir)); diff --git a/vendor/fakerphp/faker/src/Faker/Provider/cs_CZ/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/cs_CZ/Person.php index 64b4e9e0..f0bca49e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/cs_CZ/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/cs_CZ/Person.php @@ -28,7 +28,7 @@ class Person extends \Faker\Provider\Person protected static $firstNameMale = [ 'Adam', 'Aleš', 'Alois', 'Antonín', 'Bohumil', 'Bohuslav', 'Dagmar', 'Dalibor', 'Daniel', 'David', 'Dominik', 'Dušan', 'Eduard', 'Emil', - 'Filip', 'František', 'Ilona', 'Ivan', 'Ivo', 'Jakub', 'Jan', 'Ján', + 'Filip', 'František', 'Igor', 'Ivan', 'Ivo', 'Jakub', 'Jan', 'Ján', 'Jaromír', 'Jaroslav', 'Jindřich', 'Jiří', 'Josef', 'Jozef', 'Kamil', 'Karel', 'Kryštof', 'Ladislav', 'Libor', 'Lubomír', 'Luboš', 'Luděk', 'Ludvík', 'Lukáš', 'Marcel', 'Marek', 'Martin', 'Matěj', 'Matyáš', @@ -451,6 +451,7 @@ class Person extends \Faker\Provider\Person if ($gender == static::GENDER_FEMALE) { $month += 50; } + // from year 2004 everyone has +20 to month when birth numbers in one day are exhausted if ($year >= 2004 && $this->generator->boolean(10)) { $month += 20; diff --git a/vendor/fakerphp/faker/src/Faker/Provider/en_US/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/en_US/Company.php index ee72fca9..8cab28a9 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/en_US/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/en_US/Company.php @@ -15,7 +15,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'blockchain', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Person.php index df018d15..2d2b525e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/en_ZA/Person.php @@ -135,9 +135,8 @@ class Person extends \Faker\Provider\Person /** * @see https://en.wikipedia.org/wiki/National_identification_number#South_Africa * - * @param \DateTime $birthdate - * @param bool $citizen - * @param string $gender + * @param bool $citizen + * @param string $gender * * @return string */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/es_AR/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/es_AR/Company.php index f14d4467..bc6211cd 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/es_AR/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/es_AR/Company.php @@ -17,7 +17,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/es_ES/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/es_ES/Company.php index 73bd3159..5d6dafec 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/es_ES/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/es_ES/Company.php @@ -22,7 +22,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/es_PE/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/es_PE/Company.php index ff9f50dc..96a1d13e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/es_PE/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/es_PE/Company.php @@ -17,7 +17,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php index 328a44b2..bb1c24c0 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/fi_FI/Person.php @@ -91,8 +91,7 @@ class Person extends \Faker\Provider\Person * * @see http://www.finlex.fi/fi/laki/ajantasa/2010/20100128 * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format DDMMYYCZZZQ, where DDMMYY is the date of birth, C the century sign, ZZZ the individual number and Q the control character (checksum) */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php index 106f648c..d6dbb76c 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/fr_FR/Address.php @@ -34,7 +34,11 @@ class Address extends \Faker\Provider\Address ]; protected static $buildingNumber = ['%', '%#', '%#', '%#', '%##']; - protected static $postcode = ['#####', '## ###']; + + /** + * @see https://en.wikipedia.org/wiki/Postal_codes_in_France + */ + protected static $postcode = ['#####']; protected static $country = [ 'Afghanistan', 'Afrique du sud', 'Albanie', 'Algérie', 'Allemagne', 'Andorre', 'Angola', 'Anguilla', 'Antarctique', 'Antigua et Barbuda', 'Antilles néerlandaises', 'Arabie saoudite', 'Argentine', 'Arménie', 'Aruba', 'Australie', 'Autriche', 'Azerbaïdjan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Belgique', 'Belize', 'Benin', 'Bermudes (Les)', 'Bhoutan', 'Biélorussie', 'Bolivie', 'Bosnie-Herzégovine', 'Botswana', 'Bouvet (Îles)', 'Brunei', 'Brésil', 'Bulgarie', 'Burkina Faso', 'Burundi', 'Cambodge', 'Cameroun', 'Canada', 'Cap Vert', 'Cayman (Îles)', 'Chili', 'Chine (Rép. pop.)', 'Christmas (Île)', 'Chypre', 'Cocos (Îles)', 'Colombie', 'Comores', 'Cook (Îles)', 'Corée du Nord', 'Corée, Sud', 'Costa Rica', 'Croatie', 'Cuba', 'Côte d\'Ivoire', 'Danemark', 'Djibouti', 'Dominique', 'Égypte', 'El Salvador', 'Émirats arabes unis', 'Équateur', 'Érythrée', 'Espagne', 'Estonie', 'États-Unis', 'Ethiopie', 'Falkland (Île)', 'Fidji (République des)', 'Finlande', 'France', 'Féroé (Îles)', 'Gabon', diff --git a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Address.php index b9930ff8..efa9dd5e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Address.php @@ -12,35 +12,35 @@ class Address extends \Faker\Provider\Address ]; protected static $postcode = ['#####']; protected static $state = [ - 'Agrigento', 'Alessandria', 'Ancona', 'Aosta', 'Arezzo', 'Ascoli Piceno', 'Asti', 'Avellino', 'Bari', 'Barletta-Andria-Trani', 'Belluno', 'Benevento', 'Bergamo', 'Biella', 'Bologna', 'Bolzano', 'Brescia', 'Brindisi', 'Cagliari', 'Caltanissetta', 'Campobasso', 'Carbonia-Iglesias', 'Caserta', 'Catania', 'Catanzaro', 'Chieti', 'Como', 'Cosenza', 'Cremona', 'Crotone', 'Cuneo', 'Enna', 'Fermo', 'Ferrara', 'Firenze', 'Foggia', 'Forlì-Cesena', 'Frosinone', 'Genova', 'Gorizia', 'Grosseto', 'Imperia', 'Isernia', 'La Spezia', 'L\'Aquila', 'Latina', 'Lecce', 'Lecco', 'Livorno', 'Lodi', 'Lucca', 'Macerata', 'Mantova', 'Massa-Carrara', 'Matera', 'Messina', 'Milano', 'Modena', 'Monza e della Brianza', 'Napoli', 'Novara', 'Nuoro', 'Olbia-Tempio', 'Oristano', 'Padova', 'Palermo', 'Parma', 'Pavia', 'Perugia', 'Pesaro e Urbino', 'Pescara', 'Piacenza', 'Pisa', 'Pistoia', 'Pordenone', 'Potenza', 'Prato', 'Ragusa', 'Ravenna', 'Reggio Calabria', 'Reggio Emilia', 'Rieti', 'Rimini', 'Roma', 'Rovigo', 'Salerno', 'Medio Campidano', 'Sassari', 'Savona', 'Siena', 'Siracusa', 'Sondrio', 'Taranto', 'Teramo', 'Terni', 'Torino', 'Ogliastra', 'Trapani', 'Trento', 'Treviso', 'Trieste', 'Udine', 'Varese', 'Venezia', 'Verbano-Cusio-Ossola', 'Vercelli', 'Verona', 'Vibo Valentia', 'Vicenza', 'Viterbo', + 'Agrigento', 'Alessandria', 'Ancona', 'Aosta', 'Arezzo', 'Ascoli Piceno', 'Asti', 'Avellino', 'Bari', 'Barletta-Andria-Trani', 'Belluno', 'Benevento', 'Bergamo', 'Biella', 'Bologna', 'Bolzano', 'Brescia', 'Brindisi', 'Cagliari', 'Caltanissetta', 'Campobasso', 'Caserta', 'Catania', 'Catanzaro', 'Chieti', 'Como', 'Cosenza', 'Cremona', 'Crotone', 'Cuneo', 'Enna', 'Fermo', 'Ferrara', 'Firenze', 'Foggia', 'Forlì-Cesena', 'Frosinone', 'Genova', 'Gorizia', 'Grosseto', 'Imperia', 'Isernia', 'La Spezia', 'L\'Aquila', 'Latina', 'Lecce', 'Lecco', 'Livorno', 'Lodi', 'Lucca', 'Macerata', 'Mantova', 'Massa-Carrara', 'Matera', 'Messina', 'Milano', 'Modena', 'Monza e della Brianza', 'Napoli', 'Novara', 'Nuoro', 'Oristano', 'Padova', 'Palermo', 'Parma', 'Pavia', 'Perugia', 'Pesaro e Urbino', 'Pescara', 'Piacenza', 'Pisa', 'Pistoia', 'Pordenone', 'Potenza', 'Prato', 'Ragusa', 'Ravenna', 'Reggio Calabria', 'Reggio Emilia', 'Rieti', 'Rimini', 'Roma', 'Rovigo', 'Salerno', 'Sassari', 'Savona', 'Siena', 'Siracusa', 'Sondrio', 'Sud Sardegna', 'Taranto', 'Teramo', 'Terni', 'Torino', 'Trapani', 'Trento', 'Treviso', 'Trieste', 'Udine', 'Varese', 'Venezia', 'Verbano-Cusio-Ossola', 'Vercelli', 'Verona', 'Vibo Valentia', 'Vicenza', 'Viterbo', ]; protected static $stateAbbr = [ - 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CI', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'SP', 'AQ', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OT', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'VS', 'SS', 'SV', 'SI', 'SR', 'SO', 'TA', 'TE', 'TR', 'TO', 'OG', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', + 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'SP', 'AQ', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'SS', 'SV', 'SI', 'SR', 'SO', 'SU', 'TA', 'TE', 'TR', 'TO', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', ]; protected static $country = [ - 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antartide (territori a sud del 60° parallelo)', 'Antigua e Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', - 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Bielorussia', 'Belgio', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia e Herzegovina', 'Botswana', 'Bouvet Island (Bouvetoya)', 'Brasile', 'Territorio dell\'arcipelago indiano', 'Isole Vergini Britanniche', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', - 'Cambogia', 'Cameroon', 'Canada', 'Capo Verde', 'Isole Cayman', 'Repubblica Centrale Africana', 'Chad', 'Cile', 'Cina', 'Isola di Pasqua', 'Isola di Cocos (Keeling)', 'Colombia', 'Comoros', 'Congo', 'Isole Cook', 'Costa Rica', 'Costa d\'Avorio', 'Croazia', 'Cuba', 'Cipro', 'Repubblica Ceca', - 'Danimarca', 'Gibuti', 'Repubblica Dominicana', - 'Equador', 'Egitto', 'El Salvador', 'Guinea Equatoriale', 'Eritrea', 'Estonia', 'Etiopia', - 'Isole Faroe', 'Isole Falkland (Malvinas)', 'Fiji', 'Finlandia', 'Francia', 'Guyana Francese', 'Polinesia Francese', 'Territori Francesi del sud', - 'Gabon', 'Gambia', 'Georgia', 'Germania', 'Ghana', 'Gibilterra', 'Grecia', 'Groenlandia', 'Grenada', 'Guadalupa', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana', - 'Haiti', 'Heard Island and McDonald Islands', 'Città del Vaticano', 'Honduras', 'Hong Kong', 'Ungheria', - 'Islanda', 'India', 'Indonesia', 'Iran', 'Iraq', 'Irlanda', 'Isola di Man', 'Israele', 'Italia', - 'Giamaica', 'Giappone', 'Jersey', 'Giordania', - 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea', 'Kuwait', 'Republicca Kirgiza', - 'Repubblica del Laos', 'Latvia', 'Libano', 'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Liechtenstein', 'Lituania', 'Lussemburgo', - 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malesia', 'Maldive', 'Mali', 'Malta', 'Isole Marshall', 'Martinica', 'Mauritania', 'Mauritius', 'Mayotte', 'Messico', 'Micronesia', 'Moldova', 'Principato di Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Marocco', 'Mozambico', 'Myanmar', - 'Namibia', 'Nauru', 'Nepal', 'Antille Olandesi', 'Olanda', 'Nuova Caledonia', 'Nuova Zelanda', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Isole Norfolk', 'Northern Mariana Islands', 'Norvegia', - 'Oman', - 'Pakistan', 'Palau', 'Palestina', 'Panama', 'Papua Nuova Guinea', 'Paraguay', 'Peru', 'Filippine', 'Pitcairn Islands', 'Polonia', 'Portogallo', 'Porto Rico', + 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antartide (territori a sud del 60° parallelo)', 'Antigua e Barbuda', 'Antille Olandesi', 'Arabia Saudita', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', + 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Bielorussia', 'Belgio', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia e Herzegovina', 'Botswana', 'Isola Bouvet', 'Brasile', 'Territorio dell\'arcipelago indiano', 'Isole Vergini Britanniche', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi', + 'Cambogia', 'Cameroon', 'Canada', 'Capo Verde', 'Isole Cayman', 'Repubblica Centrale Africana', 'Chad', 'Cile', 'Cina', 'Isola di Pasqua', 'Isole Cocos', 'Colombia', 'Comore', 'Congo', 'Isole Cook', 'Costa Rica', 'Costa d\'Avorio', 'Croazia', 'Cuba', 'Cipro', 'Repubblica Ceca', + 'Danimarca', 'Repubblica Dominicana', + 'Equador', 'Egitto', 'El Salvador', 'Emirati Arabi Uniti', 'Eritrea', 'Estonia', 'Eswatini', 'Etiopia', + 'Isole Faroe', 'Isole Falkland', 'Fiji', 'Filippine', 'Finlandia', 'Francia', 'Guyana Francese', 'Polinesia Francese', 'Territori Francesi del Sud', + 'Gabon', 'Gambia', 'Georgia', 'Georgia del Sud e Isole Sandwich Australi', 'Germania', 'Ghana', 'Giamaica', 'Giappone', 'Gibilterra', 'Gibuti', 'Giordania', 'Grecia', 'Groenlandia', 'Grenada', 'Guadalupa', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guinea Equatoriale', 'Guyana', + 'Haiti', 'Isole Heard e McDonald', 'Honduras', 'Hong Kong', + 'Islanda', 'India', 'Indonesia', 'Iran', 'Iraq', 'Irlanda', 'Israele', 'Italia', + 'Isola di Jersey', + 'Kazakhstan', 'Kenya', 'Kirghizistan', 'Kiribati', 'Korea', 'Kuwait', + 'Repubblica del Laos', 'Latvia', 'Lesotho', 'Libano', 'Liberia', 'Libia', 'Liechtenstein', 'Lituania', 'Lussemburgo', + 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malesia', 'Maldive', 'Mali', 'Malta', 'Isola di Man', 'Isole Marianne Settentrionali', 'Isole Marshall', 'Martinica', 'Mauritania', 'Mauritius', 'Mayotte', 'Messico', 'Micronesia', 'Isole Minori esterne degli Stati Uniti d\'America', 'Moldova', 'Principato di Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Marocco', 'Mozambico', 'Myanmar', + 'Namibia', 'Nauru', 'Nepal', 'Nuova Caledonia', 'Nuova Zelanda', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Isole Norfolk', 'Norvegia', + 'Olanda', 'Oman', + 'Pakistan', 'Palau', 'Palestina', 'Panama', 'Papua Nuova Guinea', 'Paraguay', 'Peru', 'Isole Pitcairn', 'Polonia', 'Portogallo', 'Porto Rico', 'Qatar', - 'Reunion', 'Romania', 'Russia', 'Rwanda', - 'San Bartolomeo', 'Sant\'Elena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Arabia Saudita', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovenia', 'Isole Solomon', 'Somalia', 'Sud Africa', 'Georgia del sud e South Sandwich Islands', 'Spagna', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard & Jan Mayen Islands', 'Swaziland', 'Svezia', 'Svizzera', 'Siria', - 'Taiwan', 'Tajikistan', 'Tanzania', 'Tailandia', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad e Tobago', 'Tunisia', 'Turchia', 'Turkmenistan', 'Isole di Turks and Caicos', 'Tuvalu', - 'Uganda', 'Ucraina', 'Emirati Arabi Uniti', 'Regno Unito', 'Stati Uniti d\'America', 'United States Minor Outlying Islands', 'Isole Vergini Statunitensi', 'Uruguay', 'Uzbekistan', - 'Vanuatu', 'Venezuela', 'Vietnam', - 'Wallis and Futuna', 'Western Sahara', + 'Regno Unito', 'Isola della Riunione', 'Romania', 'Russia', 'Rwanda', + 'Sahara Occidentale', 'San Bartolomeo', 'Sant\'Elena', 'Saint Kitts e Nevis', 'Saint Lucia', 'Saint Martin', 'Saint-Pierre e Miquelon', 'Saint Vincent e Grenadine', 'Samoa', 'San Marino', 'Sao Tome e Principe', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovenia', 'Isole Solomon', 'Somalia', 'Spagna', 'Sri Lanka', 'Stati Uniti d\'America', 'Sud Africa', 'Sudan', 'Suriname', 'Isole Svalbard e Jan Mayen', 'Svezia', 'Svizzera', 'Siria', + 'Taiwan', 'Tajikistan', 'Tanzania', 'Tailandia', 'Timor Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad e Tobago', 'Tunisia', 'Turchia', 'Turkmenistan', 'Isole di Turks e Caicos', 'Tuvalu', + 'Uganda', 'Ucraina', 'Uruguay', 'Uzbekistan', 'Ungheria', + 'Vanuatu', 'Vaticano', 'Venezuela', 'Isole Vergini Statunitensi', 'Vietnam', + 'Wallis e Futuna', 'Yemen', 'Zambia', 'Zimbabwe', ]; @@ -64,7 +64,7 @@ class Address extends \Faker\Provider\Address protected static $secondaryAddressFormats = ['Appartamento ##', 'Piano #']; /** - * @example 'East' + * @example 'Borgo' */ public static function cityPrefix() { @@ -72,7 +72,7 @@ class Address extends \Faker\Provider\Address } /** - * @example 'Appt. 350' + * @example 'Appartamento 350' */ public static function secondaryAddress() { @@ -80,7 +80,7 @@ class Address extends \Faker\Provider\Address } /** - * @example 'California' + * @example 'Cagliari' */ public static function state() { diff --git a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Person.php index 9922fd02..c74052ea 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/it_IT/Person.php @@ -23,41 +23,54 @@ class Person extends \Faker\Provider\Person ]; protected static $firstNameMale = [ - 'Aaron', 'Abramo', 'Adriano', 'Akira', 'Alan', 'Alberto', 'Albino', 'Alessandro', 'Alessio', 'Amedeo', 'Amos', 'Anastasio', 'Anselmo', - 'Antimo', 'Antonino', 'Antonio', 'Ariel', 'Armando', 'Aroldo', 'Arturo', 'Augusto', 'Battista', 'Bernardo', 'Boris', 'Caio', - 'Carlo', 'Carmelo', 'Ciro', 'Damiano', 'Danny', 'Dante', 'Davide', 'Davis', 'Demis', 'Dimitri', 'Domingo', 'Dylan', - 'Edilio', 'Egidio', 'Elio', 'Emanuel', 'Emidio', 'Enrico', 'Enzo', 'Ercole', 'Ermes', 'Ethan', 'Ettore', 'Eusebio', - 'Fabiano', 'Fabio', 'Ferdinando', 'Fernando', 'Fiorenzo', 'Flavio', 'Folco', 'Fulvio', 'Furio', 'Gabriele', 'Gaetano', 'Gastone', - 'Gavino', 'Gerlando', 'Germano', 'Giacinto', 'Gianantonio', 'Giancarlo', 'Gianmarco', 'Gianmaria', 'Gioacchino', 'Giordano', 'Giorgio', 'Giuliano', - 'Giulio', 'Graziano', 'Gregorio', 'Guido', 'Harry', 'Hector', 'Iacopo', 'Ian', 'Ilario', 'Italo', 'Ivano', 'Jack', - 'Jacopo', 'Jari', 'Jarno', 'Joey', 'Joseph', 'Joshua', 'Kai', 'Karim', 'Kris', 'Lamberto', 'Lauro', 'Lazzaro', - 'Leonardo', 'Liborio', 'Lino', 'Lorenzo', 'Loris', 'Ludovico', 'Luigi', 'Manfredi', 'Manuele', 'Marco', 'Mariano', 'Marino', - 'Marvin', 'Marzio', 'Matteo', 'Mattia', 'Mauro', 'Max', 'Michael', 'Mirco', 'Mirko', 'Modesto', 'Moreno', 'Nabil', - 'Nadir', 'Nathan', 'Nazzareno', 'Nick', 'Nico', 'Noah', 'Noel', 'Omar', 'Oreste', 'Osvaldo', 'Pablo', 'Patrizio', - 'Pietro', 'Priamo', 'Quirino', 'Raoul', 'Renato', 'Renzo', 'Rocco', 'Rodolfo', 'Romeo', 'Romolo', 'Rudy', 'Sabatino', - 'Sabino', 'Samuel', 'Sandro', 'Santo', 'Sebastian', 'Sesto', 'Silvano', 'Silverio', 'Sirio', 'Siro', 'Timoteo', 'Timothy', - 'Tommaso', 'Ubaldo', 'Umberto', 'Vinicio', 'Walter', 'Xavier', 'Yago', 'Alighieri', 'Alighiero', 'Amerigo', 'Arcibaldo', 'Arduino', - 'Artes', 'Audenico', 'Ausonio', 'Bacchisio', 'Baldassarre', 'Bettino', 'Bortolo', 'Caligola', 'Cecco', 'Cirino', 'Cleros', - 'Costantino', 'Costanzo', 'Danthon', 'Demian', 'Domiziano', 'Edipo', 'Egisto', 'Eliziario', 'Eriberto', 'Erminio', - 'Eustachio', 'Evangelista', 'Fiorentino', 'Giacobbe', 'Gianleonardo', 'Gianriccardo', 'Giobbe', 'Ippolito', - 'Isira', 'Joannes', 'Kociss', 'Laerte', 'Maggiore', 'Muzio', 'Nestore', 'Odino', 'Odone', 'Olo', 'Oretta', 'Orfeo', - 'Osea', 'Pacifico', 'Pericle', 'Piererminio', 'Pierfrancesco', 'Piersilvio', 'Primo', 'Quarto', 'Quasimodo', - 'Radames', 'Radio', 'Raniero', 'Rosalino', 'Rosolino', 'Rufo', 'Secondo', 'Tancredi', 'Tazio', 'Terzo', 'Teseo', - 'Tolomeo', 'Trevis', 'Tristano', 'Ulrico', 'Valdo', 'Zaccaria', 'Dindo', 'Serse', + 'Aaron', 'Abramo', 'Adriano', 'Agostino', 'Akira', 'Alan', 'Alberto', 'Albino', 'Aldo', 'Alessandro', 'Alessio', + 'Alfonso', 'Alfredo', 'Alighieri', 'Alighiero', 'Amedeo', 'Amerigo', 'Amos', 'Anastasio', 'Andrea', 'Angelo', + 'Anselmo', 'Antimo', 'Antonino', 'Antonio', 'Arcibaldo', 'Arduino', 'Ariel', 'Armando', 'Aroldo', 'Artes', 'Arturo', + 'Audenico', 'Augusto', 'Ausonio', 'Bacchisio', 'Baldassarre', 'Battista', 'Bernardo', 'Bettino', 'Boris', 'Bortolo', + 'Bruno', 'Caio', 'Caligola', 'Carlo', 'Carmelo', 'Carmine', 'Cecco', 'Cesare', 'Cirino', 'Ciro', 'Claudio', 'Cleros', + 'Corrado', 'Cosimo', 'Costantino', 'Costanzo', 'Damiano', 'Danilo', 'Danny', 'Dante', 'Danthon', 'Dario', 'David', + 'Davide', 'Davis', 'Demian', 'Demis', 'Dimitri', 'Dindo', 'Dino', 'Domenico', 'Domingo', 'Domiziano', 'Donato', 'Dylan', + 'Edilio', 'Edipo', 'Egidio', 'Egisto', 'Elio', 'Eliziario', 'Emanuel', 'Emanuele', 'Emidio', 'Emilio', 'Enrico', 'Enzo', + 'Ercole', 'Eriberto', 'Ermes', 'Erminio', 'Ernesto', 'Ethan', 'Ettore', 'Eugenio', 'Eusebio', 'Eustachio', 'Evangelista', + 'Fabiano', 'Fabio', 'Fabrizio', 'Fausto', 'Federico', 'Felice', 'Ferdinando', 'Fernando', 'Filippo', 'Fiorentino', + 'Fiorenzo', 'Flavio', 'Folco', 'Francesco', 'Franco', 'Fulvio', 'Furio', 'Gabriele', 'Gaetano', 'Gastone', 'Gavino', + 'Gennaro', 'Gerardo', 'Gerlando', 'Germano', 'Giacinto', 'Giacobbe', 'Giacomo', 'Gian', 'Gianantonio', 'Giancarlo', + 'Gianfranco', 'Gianleonardo', 'Gianluca', 'Gianmarco', 'Gianmaria', 'Gianni', 'Gianriccardo', 'Gino', 'Gioacchino', 'Giobbe', + 'Giordano', 'Giorgio', 'Giovanni', 'Giuliano', 'Giulio', 'Giuseppe', 'Graziano', 'Gregorio', 'Guido', 'Harry', 'Hector', + 'Iacopo', 'Ian', 'Ilario', 'Ippolito', 'Isira', 'Italo', 'Ivano', 'Jack', 'Jacopo', 'Jari', 'Jarno', 'Joannes', 'Joey', + 'Joseph', 'Joshua', 'Kai', 'Karim', 'Kociss', 'Kris', 'Laerte', 'Lamberto', 'Lauro', 'Lazzaro', 'Leonardo', 'Liborio', + 'Lino', 'Lorenzo', 'Loris', 'Luca', 'Luciano', 'Ludovico', 'Luigi', 'Maggiore', 'Manfredi', 'Manuele', 'Marcello', + 'Marco', 'Mariano', 'Marino', 'Mario', 'Marvin', 'Marzio', 'Massimiliano', 'Massimo', 'Matteo', 'Mattia', 'Maurizio', + 'Mauro', 'Max', 'Michael', 'Mirco', 'Mirko', 'Modesto', 'Moreno', 'Muzio', 'Nabil', 'Nadir', 'Nathan', 'Nazzareno', + 'Nestore', 'Nick', 'Nico', 'Nicola', 'Noah', 'Noel', 'Odino', 'Odone', 'Olo', 'Omar', 'Oreste', 'Oretta', 'Orfeo', + 'Osea', 'Osvaldo', 'Pablo', 'Pacifico', 'Paolo', 'Pasquale', 'Patrizio', 'Pericle', 'Piererminio', 'Pierfrancesco', + 'Piero', 'Piersilvio', 'Pietro', 'Priamo', 'Primo', 'Quarto', 'Quasimodo', 'Quirino', 'Radames', 'Radio', 'Raffaele', + 'Raniero', 'Raoul', 'Renato', 'Renzo', 'Riccardo', 'Roberto', 'Rocco', 'Rodolfo', 'Romano', 'Romeo', 'Romolo', + 'Rosalino', 'Rosolino', 'Rudy', 'Rufo', 'Sabatino', 'Sabino', 'Salvatore', 'Samuel', 'Sandro', 'Santo', 'Sebastian', + 'Sebastiano', 'Secondo', 'Sergio', 'Serse', 'Sesto', 'Silvano', 'Silverio', 'Silvio', 'Sirio', 'Siro', 'Stefano', + 'Tancredi', 'Tazio', 'Terzo', 'Teseo', 'Timoteo', 'Timothy', 'Tolomeo', 'Tommaso', 'Trevis', 'Tristano', 'Ubaldo', + 'Ugo', 'Ulrico', 'Umberto', 'Valdo', 'Vincenzo', 'Vinicio', 'Vito', 'Vittorio', 'Walter', 'Xavier', 'Yago', 'Zaccaria', ]; protected static $firstNameFemale = [ - 'Assia', 'Benedetta', 'Bibiana', 'Brigitta', 'Carmela', 'Celeste', 'Cira', 'Claudia', 'Concetta', 'Cristyn', 'Deborah', 'Demi', 'Diana', - 'Donatella', 'Doriana', 'Edvige', 'Elda', 'Elga', 'Elsa', 'Emilia', 'Enrica', 'Erminia', 'Evita', 'Fatima', 'Felicia', - 'Filomena', 'Fortunata', 'Gilda', 'Giovanna', 'Giulietta', 'Grazia', 'Helga', 'Ileana', 'Ingrid', 'Ione', 'Irene', 'Isabel', - 'Ivonne', 'Jelena', 'Kayla', 'Kristel', 'Laura', 'Leone', 'Lia', 'Lidia', 'Lisa', 'Loredana', 'Loretta', 'Luce', - 'Lucia', 'Lucrezia', 'Luna', 'Maika', 'Marcella', 'Maria', 'Marianita', 'Mariapia', 'Marina', 'Maristella', 'Maruska', 'Matilde', - 'Mercedes', 'Michele', 'Miriam', 'Miriana', 'Monia', 'Morgana', 'Naomi', 'Neri', 'Nicoletta', 'Ninfa', 'Noemi', 'Nunzia', - 'Olimpia', 'Ortensia', 'Penelope', 'Prisca', 'Rebecca', 'Rita', 'Rosalba', 'Rosaria', 'Rosita', 'Ruth', 'Samira', 'Sarita', - 'Sasha', 'Shaira', 'Thea', 'Ursula', 'Vania', 'Vera', 'Vienna', 'Artemide', 'Cassiopea', 'Cesidia', 'Clea', 'Cleopatra', - 'Clodovea', 'Cosetta', 'Damiana', 'Danuta', 'Diamante', 'Eufemia', 'Flaviana', 'Gelsomina', 'Genziana', 'Giacinta', 'Guendalina', - 'Jole', 'Mariagiulia', 'Marieva', 'Mietta', 'Nayade', 'Piccarda', 'Selvaggia', 'Sibilla', 'Soriana', 'Sue ellen', 'Tosca', 'Violante', - 'Vitalba', 'Zelida', + 'Adriana', 'Alessandra', 'Andrea', 'Angela', 'Angelina', 'Anna', 'Annalisa', 'Annamaria', 'Annunziata', 'Antonella', + 'Antonia', 'Antonietta', 'Antonina', 'Artemide', 'Asia', 'Assia', 'Assunta', 'Barbara', 'Benedetta', 'Bibiana', 'Brigitta', + 'Bruna', 'Carla', 'Carmela', 'Cassiopea', 'Caterina', 'Celeste', 'Cesidia', 'Chiara', 'Cinzia', 'Cira', 'Clara', 'Claudia', + 'Clea', 'Cleopatra', 'Clodovea', 'Concetta', 'Cosetta', 'Cristina', 'Cristyn', 'Damiana', 'Daniela', 'Danuta', 'Deborah', + 'Demi', 'Diamante', 'Diana', 'Domenica', 'Donatella', 'Doriana', 'Edvige', 'Elda', 'Elena', 'Eleonora', 'Elga', 'Elisa', + 'Elisabetta', 'Elsa', 'Emanuela', 'Emilia', 'Enrica', 'Erminia', 'Eufemia', 'Evita', 'Fatima', 'Federica', 'Felicia', + 'Filomena', 'Flaviana', 'Fortunata', 'Franca', 'Francesca', 'Gabriella', 'Gelsomina', 'Genziana', 'Giacinta', 'Gilda', + 'Giovanna', 'Giuliana', 'Giulietta', 'Giuseppa', 'Giuseppina', 'Grazia', 'Graziella', 'Guendalina', 'Helga', 'Ida', 'Ileana', + 'Ingrid', 'Ione', 'Irene', 'Isabel', 'Isabella', 'Ivana', 'Ivonne', 'Jelena', 'Jole', 'Kayla', 'Kristel', 'Laura', 'Leone', + 'Lia', 'Lidia', 'Liliana', 'Lina', 'Lisa', 'Loredana', 'Loretta', 'Luce', 'Lucia', 'Luciana', 'Lucrezia', 'Luisa', 'Luna', + 'Maddalena', 'Maika', 'Manuela', 'Marcella', 'Margherita', 'Maria', 'Mariagiulia', 'Marianita', 'Marianna', 'Mariapia', + 'Marieva', 'Marina', 'Marisa', 'Maristella', 'Marta', 'Maruska', 'Matilde', 'Mercedes', 'Michela', 'Michele', 'Michelle', + 'Mietta', 'Mirella', 'Miriam', 'Miriana', 'Monia', 'Monica', 'Morgana', 'Nadia', 'Naomi', 'Nayade', 'Neri', 'Nicoletta', + 'Ninfa', 'Noemi', 'Nunzia', 'Olimpia', 'Ortensia', 'Paola', 'Patrizia', 'Penelope', 'Piccarda', 'Pierina', 'Prisca', + 'Raffaella', 'Rebecca', 'Renata', 'Rita', 'Roberta', 'Rosa', 'Rosalba', 'Rosalia', 'Rosanna', 'Rosaria', 'Rosita', + 'Ruth', 'Sabrina', 'Samira', 'Sandra', 'Sara', 'Sarah', 'Sarita', 'Sasha', 'Selvaggia', 'Shaira', 'Sibilla', 'Silvana', + 'Silvia', 'Simona', 'Sonia', 'Soriana', 'Stefania', 'Stella', 'Sue ellen', 'Teresa', 'Thea', 'Tiziana', 'Tosca', + 'Ursula', 'Valentina', 'Vania', 'Vera', 'Veronica', 'Vienna', 'Vincenza', 'Violante', 'Vitalba', 'Vittoria', 'Zelida', ]; protected static $lastName = [ @@ -69,7 +82,7 @@ class Person extends \Faker\Provider\Person 'Rizzi', 'Monti', 'Cattaneo', 'Morelli', 'Amato', 'Silvestri', 'Mazza', 'Testa', 'Grassi', 'Pellegrino', 'Carbone', 'Giuliani', 'Benedetti', 'Barone', 'Rossetti', 'Caputo', 'Montanari', 'Guerra', 'Palmieri', 'Bernardi', 'Martino', 'Fiore', 'De rosa', 'Ferretti', 'Bellini', 'Basile', 'Riva', 'Donati', 'Piras', 'Vitali', 'Battaglia', 'Sartori', 'Neri', 'Costantini', - 'Milani', 'Pagano', 'Ruggiero', 'Sorrentino', 'D\'amico', 'Orlando', 'Damico', 'Negri', + 'Milani', 'Pagano', 'Ruggiero', 'Sorrentino', 'D\'amico', 'Orlando', 'Damico', 'Negri', 'Verdi', ]; protected static $titleMale = ['Sig.', 'Dott.', 'Dr.', 'Ing.']; diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ja_JP/Text.php b/vendor/fakerphp/faker/src/Faker/Provider/ja_JP/Text.php index 55bcc629..9cb9a71b 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ja_JP/Text.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ja_JP/Text.php @@ -628,10 +628,12 @@ EOT; $chars = static::split($text); $last = end($chars); } + // if the last char is a not-valid-end punctuation, remove it if (in_array($last, static::$notEndPunct, false)) { $text = preg_replace('/.$/u', '', $text); } + // if the last char is not a valid punctuation, append a default one. return in_array($last, static::$endPunct, false) ? $text : $text . '。'; } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Company.php b/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Company.php index 4663a748..75efebf8 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Company.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Company.php @@ -54,8 +54,6 @@ class Company extends \Faker\Provider\Company * * @see http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fbus_business%2Ffor_businessmen%2Farticle%2Fbusiness_identification_number&lang=en * - * @param \DateTime $registrationDate - * * @return string 12 digits, like 150140000019 */ public static function businessIdentificationNumber(\DateTime $registrationDate = null) diff --git a/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Person.php index 61852a21..353dfae4 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/kk_KZ/Person.php @@ -207,8 +207,7 @@ class Person extends \Faker\Provider\Person * @see http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fcitizen_migration%2Fpassport_id_card%2Farticle%2Fiin_info&lang=en * @see https://ru.wikipedia.org/wiki/%D0%98%D0%BD%D0%B4%D0%B8%D0%B2%D0%B8%D0%B4%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9_%D0%B8%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80 * - * @param \DateTime $birthDate - * @param int $gender + * @param int $gender * * @return string 12 digits, like 780322300455 */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/lt_LT/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/lt_LT/Person.php index c448ab81..570eecfb 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/lt_LT/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/lt_LT/Person.php @@ -325,9 +325,8 @@ class Person extends \Faker\Provider\Person * @see https://en.wikipedia.org/wiki/National_identification_number#Lithuania * @see https://lt.wikipedia.org/wiki/Asmens_kodas * - * @param string $gender [male|female] - * @param \DateTime $birthdate - * @param string $randomNumber three integers + * @param string $gender [male|female] + * @param string $randomNumber three integers * * @return string on format XXXXXXXXXXX */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Address.php index fc8db5c1..0bddcc53 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Address.php @@ -12,7 +12,7 @@ class Address extends \Faker\Provider\Address ]; protected static $buildingNumber = ['%#']; - protected static $postcode = ['LV ####']; + protected static $postcode = ['LV-####']; /** * @see https://lv.wikipedia.org/wiki/Suver%C4%93no_valstu_uzskait%C4%ABjums diff --git a/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Person.php index d251f891..21396717 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/lv_LV/Person.php @@ -2,7 +2,6 @@ namespace Faker\Provider\lv_LV; -use Faker\Calculator\Luhn; use Faker\Provider\DateTime; class Person extends \Faker\Provider\Person @@ -135,8 +134,6 @@ class Person extends \Faker\Provider\Person * * @see https://en.wikipedia.org/wiki/National_identification_number#Latvia * - * @param \DateTime $birthdate - * * @return string on format XXXXXX-XXXXX */ public function personalIdentityNumber(\DateTime $birthdate = null) @@ -145,11 +142,32 @@ class Person extends \Faker\Provider\Person $birthdate = DateTime::dateTimeThisCentury(); } + $year = $birthdate->format('Y'); + + if ($year >= 2000 && $year <= 2099) { + $century = 2; + } elseif ($year >= 1900 && $year <= 1999) { + $century = 1; + } else { + $century = 0; + } + $datePart = $birthdate->format('dmy'); - $randomDigits = (string) static::numerify('####'); + $serialNumber = static::numerify('###'); - $checksum = Luhn::computeCheckDigit($datePart . $randomDigits); + $partialNumberSplit = str_split($datePart . $century . $serialNumber); - return $datePart . '-' . $randomDigits . $checksum; + $idDigitValidator = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; + $total = 0; + + foreach ($partialNumberSplit as $key => $digit) { + if (isset($idDigitValidator[$key])) { + $total += $idDigitValidator[$key] * (int) $digit; + } + } + + $checksumDigit = (1101 - $total) % 11 % 10; + + return $datePart . '-' . $century . $serialNumber . $checksumDigit; } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ms_MY/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/ms_MY/Person.php index 1cd011bf..d685715d 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ms_MY/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ms_MY/Person.php @@ -792,6 +792,7 @@ class Person extends \Faker\Provider\Person // gender digit. Odd = MALE, Even = FEMALE $g = self::numberBetween(0, 9); + //Credit: https://gist.github.com/mauris/3629548 if ($gender === static::GENDER_MALE) { $g = $g | 1; diff --git a/vendor/fakerphp/faker/src/Faker/Provider/nb_NO/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/nb_NO/Person.php index 86ce721b..8ee85cac 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/nb_NO/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/nb_NO/Person.php @@ -288,8 +288,7 @@ class Person extends \Faker\Provider\Person * * @see https://no.wikipedia.org/wiki/Personnummer * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format DDMMYY##### */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Person.php index f4a60f96..55d6f18e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/nl_BE/Person.php @@ -73,17 +73,17 @@ class Person extends \Faker\Provider\Person ]; /** - * Belgian Rijksregister numbers are used to identify each citizen, - * it consists of three parts, the person's day of birth, in the - * format 'ymd', followed by a number between 1 and 997, odd for - * males, even for females. The last part is used to check if it's - * a valid number. + * Belgian Rijksregister numbers are used to identify each citizen, + * it consists of three parts, the person's day of birth, in the + * format 'ymd', followed by a number between 1 and 997, odd for + * males, even for females. The last part is used to check if it's + * a valid number. * * @see https://nl.wikipedia.org/wiki/Rijksregisternummer * - * @param string|null $gender 'male', 'female' or null for any + * @param string|null $gender 'male', 'female' or null for any * - * @return string + * @return string */ public static function rrn($gender = null) { diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php index ca42cb8c..a7b01bbb 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Address.php @@ -99,101 +99,97 @@ class Address extends \Faker\Provider\Address * @see http://www.poczta-polska.pl/ */ protected static $street = [ - '1 Maja', '3 Maja', '11 Listopada', 'Agrestowa', 'Akacjowa', 'Andersa Władysława', 'Armii Krajowej', - 'Asnyka Adama', 'Astrów', 'Azaliowa', 'Baczyńskiego Krzysztofa Kamila', 'Bałtycka', - 'Barlickiego Norberta', 'Batalionów Chłopskich', 'Batorego Stefana', 'Bema Józefa', - 'Bema Józefa', 'Beskidzka', 'Białostocka', 'Bielska', 'Bieszczadzka', 'Błękitna', - 'Boczna', 'Bogusławskiego Wojciecha', 'Bohaterów Westerplatte', 'Bolesława Chrobrego', - 'Bolesława Krzywoustego', 'Borowa', 'Botaniczna', 'Bracka', 'Bratków', 'Broniewskiego Władysława', - 'Brzechwy Jana', 'Brzoskwiniowa', 'Brzozowa', 'Budowlanych', 'Bukowa', 'Bursztynowa', - 'Bydgoska', 'Bytomska', 'Cedrowa', 'Cegielniana', 'Ceglana', 'Chabrowa', 'Chełmońskiego Józefa', - 'Chłodna', 'Chłopska', 'Chmielna', 'Chopina Fryderyka', 'Chorzowska', 'Chrobrego Bolesława', - 'Ciasna', 'Cicha', 'Cieszyńska', 'Cisowa', 'Cmentarna', 'Curie-Skłodowskiej Marii', - 'Czarnieckiego Stefana', 'Czereśniowa', 'Częstochowska', 'Czwartaków', 'Daleka', 'Daszyńskiego Ignacego', - 'Dąbrowskiego Jana Henryka', 'Dąbrowskiego Jarosława', 'Dąbrowskiego Jarosława', - 'Dąbrowskiej Marii', 'Dąbrowszczaków', 'Dąbrówki', 'Dębowa', 'Diamentowa', 'Długa', - 'Długosza Jana', 'Dmowskiego Romana', 'Dobra', 'Dolna', 'Dożynkowa', 'Drzymały Michała', - 'Dubois Stanisława', 'Dworcowa', 'Dworska', 'Działkowa', 'Energetyków', 'Fabryczna', - 'Fałata Juliana', 'Fiołkowa', 'Folwarczna', 'Franciszkańska', 'Francuska', 'Fredry Aleksandra', - 'Gagarina Jurija', 'Gajowa', 'Gałczyńskiego Konstantego Ildefonsa', 'Gdańska', 'Gdyńska', - 'Gliwicka', 'Głogowa', 'Głogowska', 'Głowackiego Bartosza', 'Główna', 'Gminna', 'Gnieźnieńska', - 'Gojawiczyńskiej Poli', 'Gołębia', 'Gościnna', 'Górna', 'Górnicza', 'Górnośląska', - 'Grabowa', 'Graniczna', 'Granitowa', 'Grochowska', 'Grodzka', 'Grota-Roweckiego Stefana', - 'Grottgera Artura', 'Grójecka', 'Grunwaldzka', 'Grzybowa', 'Hallera Józefa', 'Handlowa', - 'Harcerska', 'Hetmańska', 'Hoża', 'Husarska', 'Hutnicza', 'Inżynierska', 'Iwaszkiewicza Jarosława', - 'Jagiellońska', 'Jagiellońskie Os.', 'Jagiełły Władysława', 'Jagodowa', 'Jałowcowa', - 'Jana Pawła II', 'Jana Pawła II Al.', 'Jaracza Stefana', 'Jarzębinowa', 'Jaskółcza', - 'Jasna', 'Jastrzębia', 'Jaśminowa', 'Jaworowa', 'Jerozolimskie Al.', 'Jesienna', 'Jesionowa', - 'Jeżynowa', 'Jodłowa', 'Kalinowa', 'Kaliska', 'Kamienna', 'Karłowicza Mieczysława', - 'Karpacka', 'Kartuska', 'Kasprowicza Jana', 'Kasprzaka Marcina', 'Kasztanowa', 'Kaszubska', - 'Katowicka', 'Kazimierza Wielkiego', 'Kielecka', 'Kilińskiego Jana', 'Kleeberga Franciszka', - 'Klonowa', 'Kłosowa', 'Kochanowskiego Jana', 'Kolberga Oskara', 'Kolejowa', 'Kolorowa', - 'Kołłątaja Hugo', 'Kołłątaja Hugona', 'Kołobrzeska', 'Konarskiego Stanisława', - 'Konopnickiej Marii', 'Konstytucji 3 Maja', 'Konwaliowa', 'Kopalniana', 'Kopernika Mikołaja', - 'Koralowa', 'Korczaka Janusza', 'Korfantego Wojciecha', 'Kosmonautów', 'Kossaka Juliusza', - 'Kosynierów', 'Koszalińska', 'Koszykowa', 'Kościelna', 'Kościuszki Tadeusza', 'Kościuszki Tadeusza Pl.', - 'Kowalska', 'Krakowska', 'Krańcowa', 'Krasickiego Ignacego', 'Krasińskiego Zygmunta', - 'Kraszewskiego Józefa Ignacego', 'Kresowa', 'Kręta', 'Królewska', 'Królowej Jadwigi', - 'Krótka', 'Krucza', 'Kruczkowskiego Leona', 'Krzywa', 'Księżycowa', 'Kujawska', 'Kusocińskiego Janusza', - 'Kwiatkowskiego Eugeniusza', 'Kwiatowa', 'Lawendowa', 'Lazurowa', 'Lechicka', 'Legionów', - 'Legnicka', 'Lelewela Joachima', 'Leszczynowa', 'Leśmiana Bolesława', 'Leśna', 'Letnia', - 'Ligonia Juliusza', 'Liliowa', 'Limanowskiego Bolesława', 'Lipowa', 'Lisia', 'Litewska', - 'Lompy Józefa', 'Lotnicza', 'Lotników', 'Lubelska', 'Ludowa', 'Lwowska', 'Łabędzia', - 'Łagiewnicka', 'Łanowa', 'Łączna', 'Łąkowa', 'Łokietka Władysława', 'Łomżyńska', - 'Łowicka', 'Łódzka', 'Łukasiewicza Ignacego', 'Łużycka', 'Maczka Stanisława', - 'Magazynowa', 'Majowa', 'Makowa', 'Makuszyńskiego Kornela', 'Malczewskiego Jacka', 'Malinowa', - 'Mała', 'Małachowskiego Stanisława', 'Małopolska', 'Marszałkowska', 'Matejki Jana', - 'Mazowiecka', 'Mazurska', 'Miarki Karola', 'Mickiewicza Adama', 'Miedziana', 'Mieszka I', - 'Miła', 'Miodowa', 'Młynarska', 'Młyńska', 'Modlińska', 'Modra', 'Modrzejewskiej Heleny', - 'Modrzewiowa', 'Mokra', 'Moniuszki Stanisława', 'Morcinka Gustawa', 'Morelowa', 'Morska', - 'Mostowa', 'Myśliwska', 'Nadbrzeżna', 'Nadrzeczna', 'Nałkowskiej Zofii', 'Narutowicza Gabriela', - 'Niecała', 'Niedziałkowskiego Mieczysława', 'Niemcewicza Juliana Ursyna', 'Niepodległości', - 'Niepodległości Al.', 'Niska', 'Norwida Cypriana Kamila', 'Nowa', 'Nowowiejska', 'Nowowiejskiego Feliksa', + '1 Maja', '3 Maja', '11 Listopada', 'Agrestowa', 'Akacjowa', 'Andersa', 'Armii Krajowej', + 'Asnyka', 'Astrów', 'Azaliowa', 'Baczyńskiego', 'Bałtycka', 'Barlickiego', 'Batalionów Chłopskich', + 'Batorego', 'Bema', 'Beskidzka', 'Białostocka', 'Bielska', 'Bieszczadzka', 'Błękitna', + 'Boczna', 'Bogusławskiego', 'Bohaterów Westerplatte', 'Bolesława Chrobrego', + 'Bolesława Krzywoustego', 'Borowa', 'Botaniczna', 'Bracka', 'Bratków', 'Broniewskiego', + 'Brzechwy', 'Brzoskwiniowa', 'Brzozowa', 'Budowlanych', 'Bukowa', 'Bursztynowa', + 'Bydgoska', 'Bytomska', 'Cedrowa', 'Cegielniana', 'Ceglana', 'Chabrowa', 'Chełmońskiego', + 'Chłodna', 'Chłopska', 'Chmielna', 'Chopina Fryderyka', 'Chorzowska', + 'Ciasna', 'Cicha', 'Cieszyńska', 'Cisowa', 'Cmentarna', 'Curie-Skłodowskiej', + 'Czarnieckiego', 'Czereśniowa', 'Częstochowska', 'Czwartaków', 'Daleka', 'Daszyńskiego', + 'Dąbrowskiego', 'Dąbrowskiej', 'Dąbrowszczaków', 'Dąbrówki', 'Dębowa', 'Diamentowa', 'Długa', + 'Długosza', 'Dmowskiego', 'Dobra', 'Dolna', 'Dożynkowa', 'Drzymały', + 'Dworcowa', 'Dworska', 'Działkowa', 'Energetyków', 'Fabryczna', + 'Fałata', 'Fiołkowa', 'Folwarczna', 'Franciszkańska', 'Francuska', 'Fredry', + 'Gagarina', 'Gajowa', 'Gałczyńskiego', 'Gdańska', 'Gdyńska', + 'Gliwicka', 'Głogowa', 'Głogowska', 'Głowackiego', 'Główna', 'Gminna', 'Gnieźnieńska', + 'Gojawiczyńskiej', 'Gołębia', 'Gościnna', 'Górna', 'Górnicza', 'Górnośląska', + 'Grabowa', 'Graniczna', 'Granitowa', 'Grochowska', 'Grodzka', 'Grota-Roweckiego', + 'Grottgera', 'Grójecka', 'Grunwaldzka', 'Grzybowa', 'Hallera', 'Handlowa', + 'Harcerska', 'Hetmańska', 'Hoża', 'Husarska', 'Hutnicza', 'Inżynierska', 'Iwaszkiewicza', + 'Jagiellońska', 'Os. Jagiellońskie', 'Jagiełły', 'Jagodowa', 'Jałowcowa', + 'Jana Pawła II', 'Al. Jana Pawła II', 'Jaracza', 'Jarzębinowa', 'Jaskółcza', + 'Jasna', 'Jastrzębia', 'Jaśminowa', 'Jaworowa', 'Al. Jerozolimskie', 'Jesienna', 'Jesionowa', + 'Jeżynowa', 'Jodłowa', 'Kalinowa', 'Kaliska', 'Kamienna', 'Karłowicza', + 'Karpacka', 'Kartuska', 'Kasprowicza', 'Kasprzaka Marcina', 'Kasztanowa', 'Kaszubska', + 'Katowicka', 'Kazimierza Wielkiego', 'Kielecka', 'Kilińskiego', 'Kleeberga', + 'Klonowa', 'Kłosowa', 'Kochanowskiego', 'Kolberga', 'Kolejowa', 'Kolorowa', + 'Kołłątaja', 'Kołobrzeska', 'Konarskiego', + 'Konopnickiej', 'Konstytucji 3 Maja', 'Konwaliowa', 'Kopalniana', 'Kopernika', + 'Koralowa', 'Korczaka', 'Korfantego', 'Kosmonautów', 'Kossaka', + 'Kosynierów', 'Koszalińska', 'Koszykowa', 'Kościelna', 'Kościuszki', 'Pl. Kościuszki', + 'Kowalska', 'Krakowska', 'Krańcowa', 'Krasickiego', 'Krasińskiego', + 'Kraszewskiego', 'Kresowa', 'Kręta', 'Królewska', 'Królowej Jadwigi', + 'Krótka', 'Krucza', 'Kruczkowskiego', 'Krzywa', 'Księżycowa', 'Kujawska', 'Kusocińskiego', + 'Kwiatkowskiego', 'Kwiatowa', 'Lawendowa', 'Lazurowa', 'Lechicka', 'Legionów', + 'Legnicka', 'Lelewela', 'Leszczynowa', 'Leśmiana', 'Leśna', 'Letnia', + 'Ligonia', 'Liliowa', 'Limanowskiego', 'Lipowa', 'Lisia', 'Litewska', + 'Lompy', 'Lotnicza', 'Lotników', 'Lubelska', 'Ludowa', 'Lwowska', 'Łabędzia', + 'Łagiewnicka', 'Łanowa', 'Łączna', 'Łąkowa', 'Łokietka', 'Łomżyńska', + 'Łowicka', 'Łódzka', 'Łukasiewicza', 'Łużycka', 'Maczka', + 'Magazynowa', 'Majowa', 'Makowa', 'Makuszyńskiego', 'Malczewskiego', 'Malinowa', + 'Mała', 'Małachowskiego', 'Małopolska', 'Marszałkowska', 'Matejki', + 'Mazowiecka', 'Mazurska', 'Miarki', 'Mickiewicza', 'Miedziana', 'Mieszka I', + 'Miła', 'Miodowa', 'Młynarska', 'Młyńska', 'Modlińska', 'Modra', 'Modrzejewskiej', + 'Modrzewiowa', 'Mokra', 'Moniuszki', 'Morcinka', 'Morelowa', 'Morska', + 'Mostowa', 'Myśliwska', 'Nadbrzeżna', 'Nadrzeczna', 'Nałkowskiej', 'Narutowicza', + 'Niecała', 'Niedziałkowskiego', 'Niemcewicza', 'Niepodległości', + 'Al. Niepodległości', 'Niska', 'Norwida', 'Nowa', 'Nowowiejska', 'Nowowiejskiego', 'Nowy Świat', 'Obrońców Westerplatte', 'Odrodzenia', 'Odrzańska', 'Ogrodowa', 'Okopowa', - 'Okólna', 'Okrężna', 'Okrzei Stefana', 'Okulickiego Leopolda', 'Olchowa', 'Olimpijska', - 'Olsztyńska', 'Opolska', 'Orkana Władysława', 'Orla', 'Orzechowa', 'Orzeszkowej Elizy', - 'Osiedlowa', 'Oświęcimska', 'Owocowa', 'Paderewskiego Ignacego', 'Parkowa', 'Partyzantów', - 'Patriotów', 'Pawia', 'Perłowa', 'Piaskowa', 'Piastowska', 'Piastowskie Os.', 'Piekarska', - 'Piękna', 'Piłsudskiego Józefa', 'Piłsudskiego Józefa', 'Piłsudskiego Józefa Al.', - 'Piotrkowska', 'Piwna', 'Plater Emilii', 'Plebiscytowa', 'Płocka', 'Pocztowa', 'Podchorążych', + 'Okólna', 'Okrężna', 'Okrzei', 'Okulickiego', 'Olchowa', 'Olimpijska', + 'Olsztyńska', 'Opolska', 'Orkana', 'Orla', 'Orzechowa', 'Orzeszkowej', + 'Osiedlowa', 'Oświęcimska', 'Owocowa', 'Paderewskiego', 'Parkowa', 'Partyzantów', + 'Patriotów', 'Pawia', 'Perłowa', 'Piaskowa', 'Piastowska', 'Os. Piastowskie', 'Piekarska', + 'Piękna', 'Piłsudskiego', 'Al. Piłsudskiego', + 'Piotrkowska', 'Piwna', 'Emilii Plater', 'Plebiscytowa', 'Płocka', 'Pocztowa', 'Podchorążych', 'Podgórna', 'Podhalańska', 'Podleśna', 'Podmiejska', 'Podwale', 'Pogodna', 'Pokoju', - 'Pola Wincentego', 'Polna', 'Południowa', 'Pomorska', 'Poniatowskiego Józefa', 'Poniatowskiego Józefa', - 'Popiełuszki Jerzego', 'Poprzeczna', 'Portowa', 'Porzeczkowa', 'Powstańców', 'Powstańców Śląskich', + 'Wincentego Pola', 'Polna', 'Południowa', 'Pomorska', 'Poniatowskiego', + 'Popiełuszki', 'Poprzeczna', 'Portowa', 'Porzeczkowa', 'Powstańców', 'Powstańców Śląskich', 'Powstańców Wielkopolskich', 'Poziomkowa', 'Poznańska', 'Północna', 'Promienna', - 'Prosta', 'Prusa Bolesława', 'Przechodnia', 'Przemysłowa', 'Przybyszewskiego Stanisława', - 'Przyjaźni', 'Pszenna', 'Ptasia', 'Pułaskiego Kazimierza', 'Pułaskiego Kazimierza', - 'Puławska', 'Puszkina Aleksandra', 'Racławicka', 'Radomska', 'Radosna', 'Rataja Macieja', - 'Reja Mikołaja', 'Rejtana Tadeusza', 'Reymonta Władysława', 'Reymonta Władysława Stanisława', + 'Prosta', 'Bolesława Prusa', 'Przechodnia', 'Przemysłowa', 'Przybyszewskiego', + 'Przyjaźni', 'Pszenna', 'Ptasia', 'Pułaskiego', 'Puławska', 'Puszkina', 'Racławicka', + 'Radomska', 'Radosna', 'Rataja', 'Reja', 'Rejtana', 'Reymonta', 'Robotnicza', 'Rodzinna', 'Rolna', 'Rolnicza', 'Równa', 'Różana', 'Rubinowa', 'Rumiankowa', - 'Rybacka', 'Rybna', 'Rybnicka', 'Rycerska', 'Rynek', 'Rynek Rynek', 'Rzeczna', 'Rzemieślnicza', - 'Sadowa', 'Sandomierska', 'Saperów', 'Sawickiej Hanki', 'Sądowa', 'Sąsiedzka', 'Senatorska', - 'Siemiradzkiego Henryka', 'Sienkiewicza Henryka', 'Sienna', 'Siewna', 'Sikorskiego Władysława', - 'Sikorskiego Władysława', 'Skargi Piotra', 'Skargi Piotra', 'Składowa', 'Skłodowskiej-Curie Marii', - 'Skośna', 'Skrajna', 'Słoneczna', 'Słonecznikowa', 'Słowackiego Juliusza', 'Słowiańska', - 'Słowicza', 'Sobieskiego Jana', 'Sobieskiego Jana III', 'Sokola', 'Solidarności Al.', - 'Solna', 'Solskiego Ludwika', 'Sosnowa', 'Sowia', 'Sowińskiego Józefa', 'Spacerowa', - 'Spokojna', 'Sportowa', 'Spółdzielcza', 'Srebrna', 'Staffa Leopolda', 'Stalowa', 'Staromiejska', - 'Starowiejska', 'Staszica Stanisława', 'Stawowa', 'Stolarska', 'Strażacka', 'Stroma', - 'Struga Andrzeja', 'Strumykowa', 'Strzelecka', 'Studzienna', 'Stwosza Wita', 'Sucha', - 'Sucharskiego Henryka', 'Szafirowa', 'Szarych Szeregów', 'Szczecińska', 'Szczęśliwa', - 'Szeroka', 'Szewska', 'Szkolna', 'Szmaragdowa', 'Szpitalna', 'Szymanowskiego Karola', - 'Ściegiennego Piotra', 'Śląska', 'Średnia', 'Środkowa', 'Świdnicka', 'Świerkowa', + 'Rybacka', 'Rybna', 'Rybnicka', 'Rycerska', 'Rynek', 'Rzeczna', 'Rzemieślnicza', + 'Sadowa', 'Sandomierska', 'Saperów', 'Sawickiej', 'Sądowa', 'Sąsiedzka', 'Senatorska', + 'Siemiradzkiego', 'Sienkiewicza', 'Sienna', 'Siewna', + 'Sikorskiego', 'Piotra Skargi', 'Składowa', 'Skłodowskiej-Curie', + 'Skośna', 'Skrajna', 'Słoneczna', 'Słonecznikowa', 'Słowackiego', 'Słowiańska', + 'Słowicza', 'Sobieskiego', 'Jana III Sobieskiego', 'Sokola', 'Al. Solidarności', + 'Solna', 'Solskiego', 'Sosnowa', 'Sowia', 'Sowińskiego', 'Spacerowa', + 'Spokojna', 'Sportowa', 'Spółdzielcza', 'Srebrna', 'Staffa ', 'Stalowa', 'Staromiejska', + 'Starowiejska', 'Staszica', 'Stawowa', 'Stolarska', 'Strażacka', 'Stroma', + 'Struga', 'Strumykowa', 'Strzelecka', 'Studzienna', 'Wita Stwosza', 'Sucha', + 'Sucharskiego', 'Szafirowa', 'Szarych Szeregów', 'Szczecińska', 'Szczęśliwa', + 'Szeroka', 'Szewska', 'Szkolna', 'Szmaragdowa', 'Szpitalna', 'Szymanowskiego', + 'Ściegiennego', 'Śląska', 'Średnia', 'Środkowa', 'Świdnicka', 'Świerkowa', 'Świętojańska', 'Świętokrzyska', 'Targowa', 'Tatrzańska', 'Tęczowa', 'Topolowa', - 'Torowa', 'Toruńska', 'Towarowa', 'Traugutta Romualda', 'Truskawkowa', 'Tulipanowa', - 'Tulipanów', 'Turkusowa', 'Turystyczna', 'Tuwima Juliana', 'Tylna', 'Tysiąclecia', 'Ułańska', - 'Urocza', 'Wałowa', 'Wandy', 'Wańkowicza Melchiora', 'Wapienna', 'Warmińska', 'Warszawska', - 'Waryńskiego Ludwika', 'Wąska', 'Wczasowa', 'Wesoła', 'Węglowa', 'Widok', 'Wiejska', - 'Wielkopolska', 'Wieniawskiego Henryka', 'Wierzbowa', 'Wilcza', 'Wileńska', 'Willowa', - 'Wiosenna', 'Wiśniowa', 'Witosa Wincentego', 'Władysława IV', 'Wodna', 'Wojska Polskiego', - 'Wojska Polskiego Al.', 'Wolności', 'Wolności Pl.', 'Wolska', 'Wołodyjowskiego Michała', - 'Wrocławska', 'Wronia', 'Wróblewskiego Walerego', 'Wrzosowa', 'Wschodnia', 'Wspólna', - 'Wybickiego Józefa', 'Wysoka', 'Wyspiańskiego Stanisława', 'Wyszyńskiego Stefana', - 'Wyzwolenia', 'Wyzwolenia Al.', 'Zachodnia', 'Zacisze', 'Zajęcza', 'Zakątek', 'Zakopiańska', - 'Zamenhofa Ludwika', 'Zamkowa', 'Zapolskiej Gabrieli', 'Zbożowa', 'Zdrojowa', 'Zgierska', + 'Torowa', 'Toruńska', 'Towarowa', 'Traugutta', 'Truskawkowa', 'Tulipanowa', + 'Tulipanów', 'Turkusowa', 'Turystyczna', 'Tuwima', 'Tylna', 'Tysiąclecia', 'Ułańska', + 'Urocza', 'Wałowa', 'Wandy', 'Wańkowicza', 'Wapienna', 'Warmińska', 'Warszawska', + 'Waryńskiego', 'Wąska', 'Wczasowa', 'Wesoła', 'Węglowa', 'Widok', 'Wiejska', + 'Wielkopolska', 'Wieniawskiego', 'Wierzbowa', 'Wilcza', 'Wileńska', 'Willowa', + 'Wiosenna', 'Wiśniowa', 'Witosa', 'Władysława IV', 'Wodna', 'Wojska Polskiego', + 'Al. Wojska Polskiego', 'Wolności', 'Pl. Wolności', 'Wolska', 'Wołodyjowskiego', + 'Wrocławska', 'Wronia', 'Wróblewskiego', 'Wrzosowa', 'Wschodnia', 'Wspólna', + 'Wybickiego', 'Wysoka', 'Wyspiańskiego', 'Wyszyńskiego', + 'Wyzwolenia', 'Al. Wyzwolenia', 'Zachodnia', 'Zacisze', 'Zajęcza', 'Zakątek', 'Zakopiańska', + 'Zamenhofa', 'Zamkowa', 'Zapolskiej', 'Zbożowa', 'Zdrojowa', 'Zgierska', 'Zielna', 'Zielona', 'Złota', 'Zwierzyniecka', 'Zwycięstwa', 'Źródlana', 'Żabia', - 'Żeglarska', 'Żelazna', 'Żeromskiego Stefana', 'Żniwna', 'Żołnierska', 'Żółkiewskiego Stanisława', - 'Żurawia', 'Żwirki Franciszka i Wigury Stanisława', 'Żwirki i Wigury', 'Żwirowa', - 'Żytnia', + 'Żeglarska', 'Żelazna', 'Żeromskiego', 'Żniwna', 'Żołnierska', 'Żółkiewskiego', + 'Żurawia', 'Żwirki i Wigury', 'Żwirowa', 'Żytnia', ]; public function city() diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php index 661e4b0b..f6ed7f6b 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/Internet.php @@ -5,5 +5,5 @@ namespace Faker\Provider\pl_PL; class Internet extends \Faker\Provider\Internet { protected static $freeEmailDomain = ['gmail.com', 'yahoo.com', 'wp.pl', 'onet.pl', 'interia.pl', 'gazeta.pl']; - protected static $tld = ['pl', 'pl', 'pl', 'pl', 'pl', 'pl', 'com', 'info', 'net', 'org', 'com.pl', 'com.pl']; + protected static $tld = ['pl', 'pl', 'pl', 'pl', 'pl', 'pl', 'com', 'info', 'net', 'org', 'com.pl', 'com.pl', 'co.pl', 'net.pl', 'org.pl']; } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php index d59c93de..59e100eb 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pl_PL/LicensePlate.php @@ -6,7 +6,7 @@ use Faker\Provider\Base; /** * Generator of Polish vehicle registration numbers. - * {@link} http://prawo.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU20170002355 + * {@link} https://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU20220001847 * {@link} https://pl.wikipedia.org/wiki/Tablice_rejestracyjne_w_Polsce#Tablice_standardowe */ class LicensePlate extends Base @@ -15,37 +15,37 @@ class LicensePlate extends Base * @var array list of Polish voivodeships and respective vehicle registration number prefixes. */ protected static $voivodeships = [ - 'dolnośląskie' => 'D', - 'kujawsko-pomorskie' => 'C', - 'lubelskie' => 'L', - 'lubuskie' => 'F', - 'łódzkie' => 'E', - 'małopolskie' => 'K', - 'mazowieckie' => 'W', - 'opolskie' => 'O', - 'podkarpackie' => 'R', - 'podlaskie' => 'B', - 'pomorskie' => 'G', - 'śląskie' => 'S', - 'świętokrzyskie' => 'T', - 'warmińsko-mazurskie' => 'N', - 'wielkopolskie' => 'P', - 'zachodniopomorskie' => 'Z', + 'dolnośląskie' => ['D', 'V'], + 'kujawsko-pomorskie' => ['C'], + 'lubelskie' => ['L'], + 'lubuskie' => ['F'], + 'łódzkie' => ['E'], + 'małopolskie' => ['K', 'J'], + 'mazowieckie' => ['W', 'A'], + 'opolskie' => ['O'], + 'podkarpackie' => ['R', 'Y'], + 'podlaskie' => ['B'], + 'pomorskie' => ['G', 'X'], + 'śląskie' => ['S', 'I'], + 'świętokrzyskie' => ['T'], + 'warmińsko-mazurskie' => ['N'], + 'wielkopolskie' => ['P', 'M'], + 'zachodniopomorskie' => ['Z'], ]; /** * @var array list of special vehicle registration number prefixes. */ protected static $specials = [ - 'army' => 'U', - 'services' => 'H', + 'army' => ['U'], + 'services' => ['H'], ]; /** * @var array list of Polish counties and respective vehicle registration number prefixes. */ protected static $counties = [ - 'D' => [ + 'dolnośląskie' => [ 'Jelenia Góra' => ['J'], 'Legnica' => ['L'], 'Wałbrzych' => ['B'], @@ -77,7 +77,7 @@ class LicensePlate extends Base 'zgorzelecki' => ['ZG'], 'złotoryjski' => ['ZL'], ], - 'C' => [ + 'kujawsko-pomorskie' => [ 'Bydgoszcz' => ['B'], 'Grudziądz' => ['G'], 'Toruń' => ['T'], @@ -102,7 +102,7 @@ class LicensePlate extends Base 'włocławski' => ['WL'], 'żniński' => ['ZN'], ], - 'L' => [ + 'lubelskie' => [ 'Biała Podlaska' => ['B'], 'Chełm' => ['C'], 'Lublin' => ['U'], @@ -128,7 +128,7 @@ class LicensePlate extends Base 'włodawski' => ['WL'], 'zamojski' => ['ZA'], ], - 'F' => [ + 'lubuskie' => [ 'Gorzów Wielkopolski' => ['G'], 'Zielona Góra' => ['Z'], 'gorzowski' => ['GW'], @@ -144,8 +144,8 @@ class LicensePlate extends Base 'żagański' => ['ZG'], 'żarski' => ['ZA'], ], - 'E' => [ - 'Łódź' => ['L'], + 'łódzkie' => [ + 'Łódź' => ['L', 'D'], 'Piotrków Trybunalski' => ['P'], 'Skierniewice' => ['S'], 'brzeziński' => ['BR'], @@ -170,8 +170,8 @@ class LicensePlate extends Base 'zduńskowolski' => ['ZD'], 'zgierski' => ['ZG'], ], - 'K' => [ - 'Kraków' => ['R'], + 'małopolskie' => [ + 'Kraków' => ['R', 'K'], 'Nowy Sącz' => ['N'], 'Tarnów' => ['T'], 'bocheński' => ['BA', 'BC'], @@ -179,7 +179,7 @@ class LicensePlate extends Base 'chrzanowski' => ['CH'], 'dąbrowski' => ['DA'], 'gorlicki' => ['GR'], - 'krakowski' => ['RA'], + 'krakowski' => ['RA', 'RK'], 'limanowski' => ['LI'], 'miechowski' => ['MI'], 'myślenicki' => ['MY'], @@ -194,7 +194,7 @@ class LicensePlate extends Base 'wadowicki' => ['WA'], 'wielicki' => ['WI'], ], - 'W' => [ + 'mazowieckie' => [ 'Ostrołęka' => ['O'], 'Płock' => ['P'], 'Radom' => ['R'], @@ -216,7 +216,7 @@ class LicensePlate extends Base 'ostrołęcki' => ['OS'], 'ostrowski' => ['OR'], 'otwocki' => ['OT'], - 'piaseczyński' => ['PA', 'PI'], + 'piaseczyński' => ['PA', 'PI', 'PW', 'PX'], 'płocki' => ['PL'], 'płoński' => ['PN'], 'pruszkowski' => ['PP', 'PR', 'PS'], @@ -238,7 +238,7 @@ class LicensePlate extends Base 'żuromiński' => ['ZU'], 'żyrardowski' => ['ZY'], ], - 'O' => [ + 'opolskie' => [ 'Opole' => ['P'], 'brzeski' => ['B'], 'głubczycki' => ['GL'], @@ -252,7 +252,7 @@ class LicensePlate extends Base 'prudnicki' => ['PR'], 'strzelecki' => ['ST'], ], - 'R' => [ + 'podkarpackie' => [ 'Krosno' => ['K'], 'Przemyśl' => ['P'], 'Rzeszów' => ['Z'], @@ -273,18 +273,18 @@ class LicensePlate extends Base 'przemyski' => ['PR'], 'przeworski' => ['PZ'], 'ropczycko-sędziszowski' => ['RS'], - 'rzeszowski' => ['ZE'], + 'rzeszowski' => ['ZE', 'ZR', 'ZZ'], 'sanocki' => ['SA'], 'stalowowolski' => ['ST'], 'strzyżowski' => ['SR'], 'tarnobrzeski' => ['TA'], ], - 'B' => [ + 'podlaskie' => [ 'Białystok' => ['I'], 'Łomża' => ['L'], 'Suwałki' => ['S'], 'augustowski' => ['AU'], - 'białostocki' => ['IA'], + 'białostocki' => ['IA', 'IB'], 'bielski' => ['BI'], 'grajewski' => ['GR'], 'hajnowski' => ['HA'], @@ -298,7 +298,7 @@ class LicensePlate extends Base 'wysokomazowiecki' => ['WM'], 'zambrowski' => ['ZA'], ], - 'G' => [ + 'pomorskie' => [ 'Gdańsk' => ['D'], 'Gdynia' => ['A'], 'Słupsk' => ['S'], @@ -307,7 +307,7 @@ class LicensePlate extends Base 'chojnicki' => ['CH'], 'człuchowski' => ['CZ'], 'gdański' => ['DA'], - 'kartuski' => ['KY', 'KA'], + 'kartuski' => ['KA', 'KY', 'KZ'], 'kościerski' => ['KS'], 'kwidzyński' => ['KW'], 'lęborski' => ['LE'], @@ -320,7 +320,7 @@ class LicensePlate extends Base 'tczewski' => ['TC'], 'wejherowski' => ['WE', 'WO'], ], - 'S' => [ + 'śląskie' => [ 'Bielsko-Biała' => ['B'], 'Bytom' => ['Y'], 'Chorzów' => ['H'], @@ -340,9 +340,9 @@ class LicensePlate extends Base 'Tychy' => ['T'], 'Zabrze' => ['Z'], 'Żory' => ['ZO'], - 'będziński' => ['BE'], + 'będziński' => ['BE', 'BN', 'E'], 'bielski' => ['BI'], - 'cieszyński' => ['CN', 'CI'], + 'cieszyński' => ['CI', 'CN'], 'częstochowski' => ['CZ'], 'gliwicki' => ['GL'], 'kłobucki' => ['KL'], @@ -358,7 +358,7 @@ class LicensePlate extends Base 'zawierciański' => ['ZA'], 'żywiecki' => ['ZY'], ], - 'T' => [ + 'świętokrzyskie' => [ 'Kielce' => ['K'], 'buski' => ['BU'], 'jędrzejowski' => ['JE'], @@ -374,7 +374,7 @@ class LicensePlate extends Base 'staszowski' => ['SZ'], 'włoszczowski' => ['LW'], ], - 'N' => [ + 'warmińsko-mazurskie' => [ 'Elbląg' => ['E'], 'Olsztyn' => ['O'], 'bartoszycki' => ['BA'], @@ -397,7 +397,7 @@ class LicensePlate extends Base 'szczycieński' => ['SZ'], 'węgorzewski' => ['WE'], ], - 'P' => [ + 'wielkopolskie' => [ 'Kalisz' => ['A', 'K'], 'Konin' => ['KO', 'N'], 'Leszno' => ['L'], @@ -434,7 +434,7 @@ class LicensePlate extends Base 'wrzesiński' => ['WR'], 'złotowski' => ['ZL'], ], - 'Z' => [ + 'zachodniopomorskie' => [ 'Koszalin' => ['K'], 'Szczecin' => ['S', 'Z'], 'Świnoujście' => ['SW'], @@ -457,10 +457,10 @@ class LicensePlate extends Base 'świdwiński' => ['SD'], 'wałecki' => ['WA'], ], - 'U' => [ + 'army' => [ 'Siły Zbrojne Rzeczypospolitej Polskiej' => ['A', 'B', 'C', 'D', 'E', 'G', 'I', 'J', 'K', 'L'], ], - 'H' => [ + 'services' => [ 'Centralne Biuro Antykorupcyjne' => ['A'], 'Służba Ochrony Państwa' => ['BA', 'BB', 'BE', 'BF', 'BG'], 'Służba Celno-Skarbowa' => ['CA', 'CB', 'CC', 'CD', 'CE', 'CF', 'CG', 'CH', 'CJ', 'CK', 'CL', 'CM', 'CN', 'CO', 'CP', 'CR'], @@ -514,12 +514,13 @@ class LicensePlate extends Base ?array $counties = null ): string { $voivodeshipsAvailable = static::$voivodeships + ($special ? static::$specials : []); - $voivodeshipCode = static::selectRandomArea($voivodeshipsAvailable, $voivodeships); + $voivodeshipSelected = static::selectRandomArea($voivodeshipsAvailable, $voivodeships); + $voivodeshipCode = static::randomElement($voivodeshipsAvailable[$voivodeshipSelected]); - $countiesAvailable = static::$counties[$voivodeshipCode]; + $countiesAvailable = static::$counties[$voivodeshipSelected]; $countySelected = self::selectRandomArea($countiesAvailable, $counties); - $countyCode = static::randomElement($countySelected); + $countyCode = static::randomElement(static::$counties[$voivodeshipSelected][$countySelected]); $suffix = static::regexify(static::randomElement(strlen($countyCode) === 1 ? static::$plateSuffixesGroup1 : static::$plateSuffixesGroup2)); @@ -528,6 +529,8 @@ class LicensePlate extends Base /** * Selects random area from the list of available and requested. + * + * @return string */ protected static function selectRandomArea(array $available, ?array $requested) { @@ -537,6 +540,6 @@ class LicensePlate extends Base $requested = array_keys($available); } - return $available[static::randomElement($requested)]; + return static::randomElement($requested); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/PhoneNumber.php b/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/PhoneNumber.php index 6717def5..66016583 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/PhoneNumber.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/PhoneNumber.php @@ -83,7 +83,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber ['landline', null], ]); - return call_user_func("static::{$options[0]}", $formatted, $options[1]); + return call_user_func([static::class, $options[0]], $formatted, $options[1]); } /** @@ -135,7 +135,7 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber { $method = static::randomElement(['cellphoneNumber', 'landlineNumber']); - return call_user_func("static::$method", true); + return call_user_func([static::class, $method], true); } /** @@ -145,6 +145,6 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber { $method = static::randomElement(['cellphoneNumber', 'landlineNumber']); - return call_user_func("static::$method", false); + return call_user_func([static::class, $method], false); } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Text.php b/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Text.php index d177c872..ce607285 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Text.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/pt_BR/Text.php @@ -5,52 +5,52 @@ namespace Faker\Provider\pt_BR; class Text extends \Faker\Provider\Text { /** - * The Project Gutenberg EBook of Dom Casmurro, by Machado de Assis + * The Project Gutenberg EBook of Dom Casmurro, by Machado de Assis * - * This eBook is for the use of anyone anywhere in the United States and most - * other parts of the world at no cost and with almost no restrictions - * whatsoever. You may copy it, give it away or re-use it under the terms of - * the Project Gutenberg License included with this eBook or online at - * www.gutenberg.org. If you are not located in the United States, you'll have - * to check the laws of the country where you are located before using this ebook. + * This eBook is for the use of anyone anywhere in the United States and most + * other parts of the world at no cost and with almost no restrictions + * whatsoever. You may copy it, give it away or re-use it under the terms of + * the Project Gutenberg License included with this eBook or online at + * www.gutenberg.org. If you are not located in the United States, you'll have + * to check the laws of the country where you are located before using this ebook. * - * Title: Dom Casmurro + * Title: Dom Casmurro * - * Author: Machado de Assis + * Author: Machado de Assis * - * Release Date: October 15, 2017 [EBook #55752] + * Release Date: October 15, 2017 [EBook #55752] * - * Language: Portuguese + * Language: Portuguese * - * *** START OF THIS PROJECT GUTENBERG EBOOK DOM CASMURRO *** + * *** START OF THIS PROJECT GUTENBERG EBOOK DOM CASMURRO *** * - * Produced by Laura Natal Rodriguez & Marc D'Hooghe at Free - * Literature (online soon in an extended version,also linking - * to free sources for education worldwide ... MOOC's, - * educational materials,...) (Images generously made available - * by the Bibliotheca Nacional Digital Brasil.) + * Produced by Laura Natal Rodriguez & Marc D'Hooghe at Free + * Literature (online soon in an extended version,also linking + * to free sources for education worldwide ... MOOC's, + * educational materials,...) (Images generously made available + * by the Bibliotheca Nacional Digital Brasil.) * - * DOM CASMURRO + * DOM CASMURRO * - * POR + * POR * - * MACHADO DE ASSIS + * MACHADO DE ASSIS * - * DA ACADEMIA BRAZILEIRA + * DA ACADEMIA BRAZILEIRA * - * H. GARNIER, LIVREIRO-EDITOR + * H. GARNIER, LIVREIRO-EDITOR * - * RUA MOREIRA CEZAR, 71 + * RUA MOREIRA CEZAR, 71 * - * RIO DE JANEIRO + * RIO DE JANEIRO * - * 6, RUE DES SAINTS-PÈRES, 6 + * 6, RUE DES SAINTS-PÈRES, 6 * - * PARIZ + * PARIZ * - * @see https://www.gutenberg.org/cache/epub/55752/pg55752.txt + * @see https://www.gutenberg.org/cache/epub/55752/pg55752.txt * - * @var string + * @var string */ protected static $baseText = <<<'EOT' I diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ro_RO/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/ro_RO/Person.php index d8ef51d0..90770041 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ro_RO/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ro_RO/Person.php @@ -182,6 +182,7 @@ class Person extends \Faker\Provider\Person $dateOfBirthFinal = implode('-', $dateOfBirthParts); $date = \DateTime::createFromFormat('Y-m-d', $dateOfBirthFinal); + //a full (invalid) date might have been supplied, check if it converts if ($date->format('Y-m-d') !== $dateOfBirthFinal) { throw new \InvalidArgumentException("Invalid date of birth - '{$date->format('Y-m-d')}' generated based on '{$dateOfBirth}' received"); diff --git a/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Person.php index 95ec8069..b0e17d4e 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Person.php @@ -5,8 +5,8 @@ namespace Faker\Provider\ru_RU; class Person extends \Faker\Provider\Person { protected static $maleNameFormats = [ - '{{firstNameMale}} {{middleNameMale}} {{lastName}}', - '{{lastName}} {{firstNameMale}} {{middleNameMale}}', + '{{firstNameMale}} {{middleNameMale}} {{lastNameMale}}', + '{{lastNameMale}} {{firstNameMale}} {{middleNameMale}}', ]; /** @@ -14,8 +14,8 @@ class Person extends \Faker\Provider\Person * That list of MALE last names could be safely extended to FEMALE list just by adding 'a' letter at the end */ protected static $femaleNameFormats = [ - '{{firstNameFemale}} {{middleNameFemale}} {{lastName}}а', - '{{lastName}}а {{firstNameFemale}} {{middleNameFemale}}', + '{{firstNameFemale}} {{middleNameFemale}} {{lastNameFemale}}', + '{{lastNameFemale}} {{firstNameFemale}} {{middleNameFemale}}', ]; /** @@ -165,16 +165,24 @@ class Person extends \Faker\Provider\Person */ public function lastName($gender = null) { - $lastName = static::randomElement(static::$lastName); - if (static::GENDER_FEMALE === $gender) { - return $lastName . 'а'; + return $this->lastNameFemale(); } if (static::GENDER_MALE === $gender) { - return $lastName; + return $this->lastNameMale(); } - return $lastName . static::randomElement(static::$lastNameSuffix); + return static::randomElement(static::$lastName) . static::randomElement(static::$lastNameSuffix); + } + + public function lastNameMale(): string + { + return static::randomElement(static::$lastName); + } + + public function lastNameFemale(): string + { + return static::randomElement(static::$lastName) . 'а'; } } diff --git a/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/Person.php b/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/Person.php index a98f0871..1142a1f6 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/Person.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/sv_SE/Person.php @@ -121,8 +121,7 @@ class Person extends \Faker\Provider\Person * * @see http://en.wikipedia.org/wiki/Personal_identity_number_(Sweden) * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format XXXXXX-XXXX */ diff --git a/vendor/fakerphp/faker/src/Faker/Provider/zh_CN/Address.php b/vendor/fakerphp/faker/src/Faker/Provider/zh_CN/Address.php index d67e1497..00b9eb77 100644 --- a/vendor/fakerphp/faker/src/Faker/Provider/zh_CN/Address.php +++ b/vendor/fakerphp/faker/src/Faker/Provider/zh_CN/Address.php @@ -101,7 +101,7 @@ class Address extends \Faker\Provider\Address '斯威士兰', '瑞典', '瑞士', '叙利亚', '塔吉克斯坦', '坦桑尼亚', '泰国', '阿拉伯联合酋长国', '多哥', '托克劳群岛', '汤加', '特立尼达和多巴哥', '突尼斯', '土耳其', '土库曼斯坦', - '特克斯和凯科斯群岛(', '图瓦卢', '美国', '乌干达', '乌克兰', + '特克斯和凯科斯群岛', '图瓦卢', '美国', '乌干达', '乌克兰', '英国', '乌拉圭', '乌兹别克斯坦', '瓦努阿图', '梵蒂冈', '委内瑞拉', '越南', '维尔京群岛', '维尔京群岛和圣罗克伊', '威克岛', '瓦里斯和富士那群岛', '西撒哈拉', '也门', '南斯拉夫', diff --git a/vendor/laravel/framework/CHANGELOG.md b/vendor/laravel/framework/CHANGELOG.md index dc2f134b..47ae1120 100644 --- a/vendor/laravel/framework/CHANGELOG.md +++ b/vendor/laravel/framework/CHANGELOG.md @@ -1,6 +1,51 @@ # Release Notes for 10.x -## [Unreleased](https://github.com/laravel/framework/compare/v10.38.2...10.x) +## [Unreleased](https://github.com/laravel/framework/compare/v10.40.0...10.x) + +## [v10.40.0](https://github.com/laravel/framework/compare/v10.39.0...v10.40.0) - 2024-01-09 + +* [10.x] `Model::preventAccessingMissingAttributes()` raises exception for enums & primitive castable attributes that were not retrieved by [@cosmastech](https://github.com/cosmastech) in https://github.com/laravel/framework/pull/49480 +* [10.x] Include system versioned tables for MariaDB by [@hafezdivandari](https://github.com/hafezdivandari) in https://github.com/laravel/framework/pull/49509 +* [10.x] Fixes the `Arr::dot()` method to properly handle indexes array by [@kayw-geek](https://github.com/kayw-geek) in https://github.com/laravel/framework/pull/49507 +* [10.x] Expand Gate::allows & Gate::denies signature by [@antonkomarev](https://github.com/antonkomarev) in https://github.com/laravel/framework/pull/49503 +* [10.x] Improve numeric comparison for custom casts by [@imahmood](https://github.com/imahmood) in https://github.com/laravel/framework/pull/49504 +* [10.x] Add session except method by [@xurshudyan](https://github.com/xurshudyan) in https://github.com/laravel/framework/pull/49520 +* [10.x] Add `Number::clamp` by [@jbrooksuk](https://github.com/jbrooksuk) in https://github.com/laravel/framework/pull/49512 +* [10.x] Fix Schedule test by [@michaelnabil230](https://github.com/michaelnabil230) in https://github.com/laravel/framework/pull/49538 +* [10.x] Use correct format of date by [@buismaarten](https://github.com/buismaarten) in https://github.com/laravel/framework/pull/49541 +* [10.x] Clean Arr by [@michaelnabil230](https://github.com/michaelnabil230) in https://github.com/laravel/framework/pull/49530 +* [10.x] Make ComponentAttributeBag Arrayable by [@iamgergo](https://github.com/iamgergo) in https://github.com/laravel/framework/pull/49524 +* [10.x] Fix whenAggregated when default is not specified by [@lovePizza](https://github.com/lovePizza) in https://github.com/laravel/framework/pull/49521 +* [10.x] Update AsArrayObject.php to use ARRAY_AS_PROPS flag by [@pintend](https://github.com/pintend) in https://github.com/laravel/framework/pull/49534 +* [10.x] Remove invalid `RedisCluster::client()` call by [@tillkruss](https://github.com/tillkruss) in https://github.com/laravel/framework/pull/49560 +* [10.x] Remove unused code from `PhpRedisConnector` by [@tillkruss](https://github.com/tillkruss) in https://github.com/laravel/framework/pull/49559 +* [10.x] Flush about command during test runs by [@timacdonald](https://github.com/timacdonald) in https://github.com/laravel/framework/pull/49557 +* [10.x] Fix parentOfParameter method by [@iamgergo](https://github.com/iamgergo) in https://github.com/laravel/framework/pull/49548 +* [10.x] Make the Schema Builder macroable by [@kevinb1989](https://github.com/kevinb1989) in https://github.com/laravel/framework/pull/49547 +* [10.x] Remove unused code from tests by [@imahmood](https://github.com/imahmood) in https://github.com/laravel/framework/pull/49566 +* [10.x] Update Query/Builder.php $columns typehint by [@Grldk](https://github.com/Grldk) in https://github.com/laravel/framework/pull/49563 +* [10.x] Add assertViewEmpty to TestView by [@dwightwatson](https://github.com/dwightwatson) in https://github.com/laravel/framework/pull/49558 +* [10.x] Update tailwind.blade.php for dark mode by [@sabinchacko03](https://github.com/sabinchacko03) in https://github.com/laravel/framework/pull/49515 +* [10.x] Fix deprecation with null value in cache FileStore by [@driesvints](https://github.com/driesvints) in https://github.com/laravel/framework/pull/49578 +* [10.x] Allow Vite asset path customization by [@timacdonald](https://github.com/timacdonald) in https://github.com/laravel/framework/pull/49437 +* [10.x] Type hinting of the second parameter of date- and time-related `where*()` methods of `Illuminate\Database\Query\Builder` by [@lorenzolosa](https://github.com/lorenzolosa) in https://github.com/laravel/framework/pull/49599 +* [10.x] Fix Stringable::convertCase() return type by [@vaites](https://github.com/vaites) in https://github.com/laravel/framework/pull/49590 +* Allow \Blade::stringable() to be called on native Iterables by [@tsjason](https://github.com/tsjason) in https://github.com/laravel/framework/pull/49591 +* [10.x] Refactor time handling using `InteractsWithTime` trait method by [@xurshudyan](https://github.com/xurshudyan) in https://github.com/laravel/framework/pull/49601 +* [10.x] Add `assertCount` test helper by [@xurshudyan](https://github.com/xurshudyan) in https://github.com/laravel/framework/pull/49609 +* [10.x] Ability to establish connection without using Config Repository by [@deleugpn](https://github.com/deleugpn) in https://github.com/laravel/framework/pull/49527 +* [10.x] Add APA style title helper by [@hotmeteor](https://github.com/hotmeteor) in https://github.com/laravel/framework/pull/49572 +* [10.x] Fix usage of alternatives in error output by [@Mrjavaci](https://github.com/Mrjavaci) in https://github.com/laravel/framework/pull/49614 +* [10.x] Use locks for queue job popping for PlanetScale's MySQL-compatible Vitess 19 engine by [@crynobone](https://github.com/crynobone) in https://github.com/laravel/framework/pull/49561 + +## [v10.39.0](https://github.com/laravel/framework/compare/v10.38.2...v10.39.0) - 2023-12-27 + +* [9.x] Support for phpredis 6.0.0 by [@MichalHubatka](https://github.com/MichalHubatka) in https://github.com/laravel/framework/pull/48380 +* [10.x] Dynamic `maxTries` for queued jobs by [@mechelon](https://github.com/mechelon) in https://github.com/laravel/framework/pull/49473 +* [10.x] Avoid TypeError when using json validation rule when PHP < 8.3 by [@Xint0](https://github.com/Xint0) in https://github.com/laravel/framework/pull/49474 +* [10.x] Fix use statement compilation in Blade templates by [@MrPunyapal](https://github.com/MrPunyapal) in https://github.com/laravel/framework/pull/49479 +* [10.x] Allow testing prompts validation by [@cerbero90](https://github.com/cerbero90) in https://github.com/laravel/framework/pull/49447 +* [10.x] Add 'Roundrobin' Symfony mailer transport driver by [@me-shaon](https://github.com/me-shaon) in https://github.com/laravel/framework/pull/49435 ## [v10.38.2](https://github.com/laravel/framework/compare/v10.38.1...v10.38.2) - 2023-12-22 diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php b/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php index e8ef93b6..1f0a7200 100644 --- a/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php +++ b/vendor/laravel/framework/src/Illuminate/Auth/Access/Gate.php @@ -318,9 +318,9 @@ class Gate implements GateContract } /** - * Determine if the given ability should be granted for the current user. + * Determine if all of the given abilities should be granted for the current user. * - * @param string $ability + * @param iterable|string $ability * @param array|mixed $arguments * @return bool */ @@ -330,9 +330,9 @@ class Gate implements GateContract } /** - * Determine if the given ability should be denied for the current user. + * Determine if any of the given abilities should be denied for the current user. * - * @param string $ability + * @param iterable|string $ability * @param array|mixed $arguments * @return bool */ diff --git a/vendor/laravel/framework/src/Illuminate/Bus/PendingBatch.php b/vendor/laravel/framework/src/Illuminate/Bus/PendingBatch.php index 60ff3884..b9622f8c 100644 --- a/vendor/laravel/framework/src/Illuminate/Bus/PendingBatch.php +++ b/vendor/laravel/framework/src/Illuminate/Bus/PendingBatch.php @@ -344,4 +344,26 @@ class PendingBatch new BatchDispatched($batch) ); } + + /** + * Dispatch the batch if the given truth test passes. + * + * @param bool|\Closure $boolean + * @return \Illuminate\Bus\Batch|null + */ + public function dispatchIf($boolean) + { + return value($boolean) ? $this->dispatch() : null; + } + + /** + * Dispatch the batch unless the given truth test passes. + * + * @param bool|\Closure $boolean + * @return \Illuminate\Bus\Batch|null + */ + public function dispatchUnless($boolean) + { + return ! value($boolean) ? $this->dispatch() : null; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php index 73aef8d6..b9c6fde5 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/DynamoDbStore.php @@ -285,7 +285,7 @@ class DynamoDbStore implements LockProvider, Store ], 'ExpressionAttributeValues' => [ ':now' => [ - 'N' => (string) Carbon::now()->getTimestamp(), + 'N' => (string) $this->currentTime(), ], ], ]); @@ -326,7 +326,7 @@ class DynamoDbStore implements LockProvider, Store ], 'ExpressionAttributeValues' => [ ':now' => [ - 'N' => (string) Carbon::now()->getTimestamp(), + 'N' => (string) $this->currentTime(), ], ':amount' => [ 'N' => (string) $value, @@ -371,7 +371,7 @@ class DynamoDbStore implements LockProvider, Store ], 'ExpressionAttributeValues' => [ ':now' => [ - 'N' => (string) Carbon::now()->getTimestamp(), + 'N' => (string) $this->currentTime(), ], ':amount' => [ 'N' => (string) $value, @@ -469,7 +469,7 @@ class DynamoDbStore implements LockProvider, Store { return $seconds > 0 ? $this->availableAt($seconds) - : Carbon::now()->getTimestamp(); + : $this->currentTime(); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php index b18e568f..9d5e2e95 100644 --- a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php +++ b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php @@ -290,9 +290,11 @@ class FileStore implements Store, LockProvider // just return null. Otherwise, we'll get the contents of the file and get // the expiration UNIX timestamps from the start of the file's contents. try { - $expire = substr( - $contents = $this->files->get($path, true), 0, 10 - ); + if (is_null($contents = $this->files->get($path, true))) { + return $this->emptyPayload(); + } + + $expire = substr($contents, 0, 10); } catch (Exception) { return $this->emptyPayload(); } diff --git a/vendor/laravel/framework/src/Illuminate/Collections/Arr.php b/vendor/laravel/framework/src/Illuminate/Collections/Arr.php index d0544154..d1e4a40a 100644 --- a/vendor/laravel/framework/src/Illuminate/Collections/Arr.php +++ b/vendor/laravel/framework/src/Illuminate/Collections/Arr.php @@ -113,13 +113,13 @@ class Arr foreach ($array as $key => $value) { if (is_array($value) && ! empty($value)) { - $results[] = static::dot($value, $prepend.$key.'.'); + $results = array_merge($results, static::dot($value, $prepend.$key.'.')); } else { - $results[] = [$prepend.$key => $value]; + $results[$prepend.$key] = $value; } } - return array_merge(...$results); + return $results; } /** @@ -476,9 +476,7 @@ class Arr */ public static function prependKeysWith($array, $prependWith) { - return Collection::make($array)->mapWithKeys(function ($item, $key) use ($prependWith) { - return [$prependWith.$key => $item]; - })->all(); + return static::mapWithKeys($array, fn ($item, $key) => [$prependWith.$key => $item]); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php index f061dc67..efb34916 100644 --- a/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Console/GeneratorCommand.php @@ -249,7 +249,7 @@ abstract class GeneratorCommand extends Command implements PromptsForMissingInpu { $modelPath = is_dir(app_path('Models')) ? app_path('Models') : app_path(); - return collect((new Finder)->files()->depth(0)->in($modelPath)) + return collect(Finder::create()->files()->depth(0)->in($modelPath)) ->map(fn ($file) => $file->getBasename('.php')) ->sort() ->values() @@ -269,7 +269,7 @@ abstract class GeneratorCommand extends Command implements PromptsForMissingInpu return []; } - return collect((new Finder)->files()->depth(0)->in($eventPath)) + return collect(Finder::create()->files()->depth(0)->in($eventPath)) ->map(fn ($file) => $file->getBasename('.php')) ->sort() ->values() diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php index b88ab179..eb605d82 100644 --- a/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Auth/Access/Gate.php @@ -57,18 +57,18 @@ interface Gate public function after(callable $callback); /** - * Determine if the given ability should be granted for the current user. + * Determine if all of the given abilities should be granted for the current user. * - * @param string $ability + * @param iterable|string $ability * @param array|mixed $arguments * @return bool */ public function allows($ability, $arguments = []); /** - * Determine if the given ability should be denied for the current user. + * Determine if any of the given abilities should be denied for the current user. * - * @param string $ability + * @param iterable|string $ability * @param array|mixed $arguments * @return bool */ diff --git a/vendor/laravel/framework/src/Illuminate/Contracts/Translation/Translator.php b/vendor/laravel/framework/src/Illuminate/Contracts/Translation/Translator.php index 6eae4915..ded1a8b8 100644 --- a/vendor/laravel/framework/src/Illuminate/Contracts/Translation/Translator.php +++ b/vendor/laravel/framework/src/Illuminate/Contracts/Translation/Translator.php @@ -18,7 +18,7 @@ interface Translator * Get a translation according to an integer value. * * @param string $key - * @param \Countable|int|array $number + * @param \Countable|int|float|array $number * @param array $replace * @param string|null $locale * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Database/Console/PruneCommand.php b/vendor/laravel/framework/src/Illuminate/Database/Console/PruneCommand.php index 0c51beb3..23875d11 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Console/PruneCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Console/PruneCommand.php @@ -24,6 +24,7 @@ class PruneCommand extends Command protected $signature = 'model:prune {--model=* : Class names of the models to be pruned} {--except=* : Class names of the models to be excluded from pruning} + {--path=* : Absolute path(s) to directories where models are located} {--chunk=1000 : The number of models to retrieve per chunk of models to be deleted} {--pretend : Display the number of prunable records found instead of deleting them}'; @@ -125,7 +126,7 @@ class PruneCommand extends Command throw new InvalidArgumentException('The --models and --except options cannot be combined.'); } - return collect((new Finder)->in($this->getDefaultPath())->files()->name('*.php')) + return collect(Finder::create()->in($this->getPath())->files()->name('*.php')) ->map(function ($model) { $namespace = $this->laravel->getNamespace(); @@ -146,12 +147,18 @@ class PruneCommand extends Command } /** - * Get the default path where models are located. + * Get the path where models are located. * - * @return string|string[] + * @return string[]|string */ - protected function getDefaultPath() + protected function getPath() { + if (! empty($path = $this->option('path'))) { + return collect($path)->map(function ($path) { + return base_path($path); + })->all(); + } + return app_path('Models'); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php b/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php index 84602917..daefffee 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php +++ b/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php @@ -101,16 +101,39 @@ class DatabaseManager implements ConnectionResolverInterface $this->makeConnection($database), $type ); - if ($this->app->bound('events')) { - $this->app['events']->dispatch( - new ConnectionEstablished($this->connections[$name]) - ); - } + $this->dispatchConnectionEstablishedEvent($this->connections[$name]); } return $this->connections[$name]; } + /** + * Get a database connection instance from the given configuration. + * + * @param string $name + * @param array $config + * @param bool $force + * @return \Illuminate\Database\ConnectionInterface + */ + public function connectUsing(string $name, array $config, bool $force = false) + { + if ($force) { + $this->purge($name); + } + + if (isset($this->connections[$name])) { + throw new RuntimeException("Cannot establish connection [$name] because another connection with that name already exists."); + } + + $connection = $this->configure( + $this->factory->make($config, $name), null + ); + + $this->dispatchConnectionEstablishedEvent($connection); + + return tap($connection, fn ($connection) => $this->connections[$name] = $connection); + } + /** * Parse the connection into an array of the name and read / write type. * @@ -209,6 +232,23 @@ class DatabaseManager implements ConnectionResolverInterface return $connection; } + /** + * Dispatch the ConnectionEstablished event if the event dispatcher is available. + * + * @param \Illuminate\Database\Connection $connection + * @return void + */ + protected function dispatchConnectionEstablishedEvent(Connection $connection) + { + if (! $this->app->bound('events')) { + return; + } + + $this->app['events']->dispatch( + new ConnectionEstablished($connection) + ); + } + /** * Prepare the read / write mode for database connection instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsArrayObject.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsArrayObject.php index 2ee6b56e..5ee80d0b 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsArrayObject.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/AsArrayObject.php @@ -25,7 +25,7 @@ class AsArrayObject implements Castable $data = Json::decode($attributes[$key]); - return is_array($data) ? new ArrayObject($data) : null; + return is_array($data) ? new ArrayObject($data, ArrayObject::ARRAY_AS_PROPS) : null; } public function set($model, $key, $value, $attributes) diff --git a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php index 8385eef4..991f0643 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php @@ -2126,6 +2126,13 @@ trait HasAttributes // an appropriate native PHP type dependent upon the associated value // given with the key in the pair. Dayle made this comment line up. if ($this->hasCast($key)) { + if (static::preventsAccessingMissingAttributes() && + ! array_key_exists($key, $this->attributes) && + ($this->isEnumCastable($key) || + in_array($this->getCastType($key), static::$primitiveCastTypes))) { + $this->throwMissingAttributeExceptionIfApplicable($key); + } + return $this->castAttribute($key, $value); } diff --git a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php index 3aa2b542..62abc800 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php @@ -82,7 +82,7 @@ class Builder implements BuilderContract /** * The columns that should be returned. * - * @var array + * @var array|null */ public $columns; @@ -1379,7 +1379,7 @@ class Builder implements BuilderContract * Add a "where date" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|null $operator * @param \DateTimeInterface|string|null $value * @param string $boolean * @return $this @@ -1403,7 +1403,7 @@ class Builder implements BuilderContract * Add an "or where date" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|null $operator * @param \DateTimeInterface|string|null $value * @return $this */ @@ -1420,7 +1420,7 @@ class Builder implements BuilderContract * Add a "where time" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|null $operator * @param \DateTimeInterface|string|null $value * @param string $boolean * @return $this @@ -1444,7 +1444,7 @@ class Builder implements BuilderContract * Add an "or where time" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|null $operator * @param \DateTimeInterface|string|null $value * @return $this */ @@ -1461,7 +1461,7 @@ class Builder implements BuilderContract * Add a "where day" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|int|null $operator * @param \DateTimeInterface|string|int|null $value * @param string $boolean * @return $this @@ -1489,7 +1489,7 @@ class Builder implements BuilderContract * Add an "or where day" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|int|null $operator * @param \DateTimeInterface|string|int|null $value * @return $this */ @@ -1506,7 +1506,7 @@ class Builder implements BuilderContract * Add a "where month" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|int|null $operator * @param \DateTimeInterface|string|int|null $value * @param string $boolean * @return $this @@ -1534,7 +1534,7 @@ class Builder implements BuilderContract * Add an "or where month" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|int|null $operator * @param \DateTimeInterface|string|int|null $value * @return $this */ @@ -1551,7 +1551,7 @@ class Builder implements BuilderContract * Add a "where year" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|int|null $operator * @param \DateTimeInterface|string|int|null $value * @param string $boolean * @return $this @@ -1575,7 +1575,7 @@ class Builder implements BuilderContract * Add an "or where year" statement to the query. * * @param \Illuminate\Contracts\Database\Query\Expression|string $column - * @param string $operator + * @param \DateTimeInterface|string|int|null $operator * @param \DateTimeInterface|string|int|null $value * @return $this */ diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php index c4b3da94..770c6c52 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php @@ -5,11 +5,14 @@ namespace Illuminate\Database\Schema; use Closure; use Illuminate\Container\Container; use Illuminate\Database\Connection; +use Illuminate\Support\Traits\Macroable; use InvalidArgumentException; use LogicException; class Builder { + use Macroable; + /** * The database connection instance. * diff --git a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php index 1f64a7c2..d54e9a6f 100644 --- a/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php +++ b/vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -88,7 +88,7 @@ class MySqlGrammar extends Grammar return sprintf( 'select table_name as `name`, (data_length + index_length) as `size`, ' .'table_comment as `comment`, engine as `engine`, table_collation as `collation` ' - ."from information_schema.tables where table_schema = %s and table_type = 'BASE TABLE' " + ."from information_schema.tables where table_schema = %s and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') " .'order by table_name', $this->quoteString($database) ); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php index b7585b42..a352be0f 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Application.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Application.php @@ -40,7 +40,7 @@ class Application extends Container implements ApplicationContract, CachesConfig * * @var string */ - const VERSION = '10.39.0'; + const VERSION = '10.41.0'; /** * The base path for the Laravel installation. diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php index 8d3c6892..2fb14990 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Bus/PendingChain.php @@ -132,7 +132,7 @@ class PendingChain } /** - * Dispatch the job with the given arguments. + * Dispatch the job chain. * * @return \Illuminate\Foundation\Bus\PendingDispatch */ @@ -165,4 +165,26 @@ class PendingChain return app(Dispatcher::class)->dispatch($firstJob); } + + /** + * Dispatch the job chain if the given truth test passes. + * + * @param bool|\Closure $boolean + * @return \Illuminate\Foundation\Bus\PendingDispatch|null + */ + public function dispatchIf($boolean) + { + return value($boolean) ? $this->dispatch() : null; + } + + /** + * Dispatch the job chain unless the given truth test passes. + * + * @param bool|\Closure $boolean + * @return \Illuminate\Foundation\Bus\PendingDispatch|null + */ + public function dispatchUnless($boolean) + { + return ! value($boolean) ? $this->dispatch() : null; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/AboutCommand.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/AboutCommand.php index b393c60f..20c24e8e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/AboutCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/AboutCommand.php @@ -302,4 +302,16 @@ class AboutCommand extends Command { return (string) Str::of($value)->lower()->snake(); } + + /** + * Flush the registered about data. + * + * @return void + */ + public static function flushState() + { + static::$data = []; + + static::$customDataResolvers = []; + } } diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php index 227f7cae..7b19b42f 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php @@ -340,7 +340,7 @@ class Kernel implements KernelContract $namespace = $this->app->getNamespace(); - foreach ((new Finder)->in($paths)->files() as $file) { + foreach (Finder::create()->in($paths)->files() as $file) { $command = $this->commandClassFromFile($file, $namespace); if (is_subclass_of($command, Command::class) && diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/job.queued.stub b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/job.queued.stub index bc67adcf..9a7cec52 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/job.queued.stub +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Console/stubs/job.queued.stub @@ -3,7 +3,6 @@ namespace {{ namespace }}; use Illuminate\Bus\Queueable; -use Illuminate\Contracts\Queue\ShouldBeUnique; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Events/DiscoverEvents.php b/vendor/laravel/framework/src/Illuminate/Foundation/Events/DiscoverEvents.php index b285759d..a4728c2e 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Events/DiscoverEvents.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Events/DiscoverEvents.php @@ -29,7 +29,7 @@ class DiscoverEvents public static function within($listenerPath, $basePath) { $listeners = collect(static::getListenerEvents( - (new Finder)->files()->in($listenerPath), $basePath + Finder::create()->files()->in($listenerPath), $basePath )); $discoveredEvents = []; diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php index 498be561..5591945d 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php @@ -843,7 +843,7 @@ class Handler implements ExceptionHandlerContract $message .= '. Did you mean one of these?'; with(new Error($output))->render($message); - with(new BulletList($output))->render($e->getAlternatives()); + with(new BulletList($output))->render($alternatives); $output->writeln(''); } else { diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php index b9b76bf2..152b5c41 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php @@ -6,6 +6,7 @@ use Carbon\CarbonImmutable; use Illuminate\Console\Application as Artisan; use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Bootstrap\HandleExceptions; +use Illuminate\Foundation\Console\AboutCommand; use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull; use Illuminate\Foundation\Http\Middleware\TrimStrings; use Illuminate\Queue\Queue; @@ -242,6 +243,7 @@ abstract class TestCase extends BaseTestCase $this->originalExceptionHandler = null; $this->originalDeprecationHandler = null; + AboutCommand::flushState(); Artisan::forgetBootstrappers(); Component::flushCache(); Component::forgetComponentsResolver(); diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php b/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php index 9c0a24d0..a81ca161 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/Vite.php @@ -55,6 +55,13 @@ class Vite implements Htmlable */ protected $manifestFilename = 'manifest.json'; + /** + * The custom asset path resolver. + * + * @var callable|null + */ + protected $assetPathResolver = null; + /** * The script tag attributes resolvers. * @@ -160,6 +167,19 @@ class Vite implements Htmlable return $this; } + /** + * Resolve asset paths using the provided resolver. + * + * @param callable|null $urlResolver + * @return $this + */ + public function createAssetPathsUsing($resolver) + { + $this->assetPathResolver = $resolver; + + return $this; + } + /** * Get the Vite "hot" file path. * @@ -688,7 +708,7 @@ class Vite implements Htmlable */ protected function assetPath($path, $secure = null) { - return asset($path, $secure); + return ($this->assetPathResolver ?? asset(...))($path, $secure); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php b/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php index e4c15edc..c698bbdf 100644 --- a/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php +++ b/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php @@ -929,7 +929,7 @@ if (! function_exists('trans_choice')) { * Translates the given message based on a count. * * @param string $key - * @param \Countable|int|array $number + * @param \Countable|int|float|array $number * @param array $replace * @param string|null $locale * @return string diff --git a/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php b/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php index 78e361fe..28defb4d 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php @@ -78,7 +78,7 @@ class PendingRequest /** * The raw body for the request. * - * @var string + * @var \Psr\Http\Message\StreamInterface|string */ protected $pendingBody; @@ -259,7 +259,7 @@ class PendingRequest /** * Attach a raw body to the request. * - * @param string $content + * @param \Psr\Http\Message\StreamInterface|string $content * @param string $contentType * @return $this */ diff --git a/vendor/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php b/vendor/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php index 3f25ca05..9940c3e0 100644 --- a/vendor/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php +++ b/vendor/laravel/framework/src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php @@ -320,6 +320,10 @@ trait ConditionallyLoadsAttributes */ public function whenAggregated($relationship, $column, $aggregate, $value = null, $default = null) { + if (func_num_args() < 5) { + $default = new MissingValue; + } + $attribute = (string) Str::of($relationship)->snake()->append('_')->append($aggregate)->append('_')->finish($column); if (! isset($this->resource->getAttributes()[$attribute])) { diff --git a/vendor/laravel/framework/src/Illuminate/Log/LogManager.php b/vendor/laravel/framework/src/Illuminate/Log/LogManager.php index 60498f4e..15df806d 100644 --- a/vendor/laravel/framework/src/Illuminate/Log/LogManager.php +++ b/vendor/laravel/framework/src/Illuminate/Log/LogManager.php @@ -501,6 +501,22 @@ class LogManager implements LoggerInterface return $this->sharedContext; } + /** + * Flush the log context on all currently resolved channels. + * + * @return $this + */ + public function withoutContext() + { + foreach ($this->channels as $channel) { + if (method_exists($channel, 'withoutContext')) { + $channel->withoutContext(); + } + } + + return $this; + } + /** * Flush the shared context. * diff --git a/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php b/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php index 7bdf38ad..4016ee5a 100644 --- a/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php +++ b/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php @@ -1231,7 +1231,7 @@ class Mailable implements MailableContract, Renderable PHPUnit::assertTrue( $this->hasTo($address, $name), - "Did not see expected recipient [{$recipient}] in email recipients." + "Did not see expected recipient [{$recipient}] in email 'to' recipients." ); return $this; @@ -1264,7 +1264,7 @@ class Mailable implements MailableContract, Renderable PHPUnit::assertTrue( $this->hasCc($address, $name), - "Did not see expected recipient [{$recipient}] in email recipients." + "Did not see expected recipient [{$recipient}] in email 'cc' recipients." ); return $this; @@ -1285,7 +1285,7 @@ class Mailable implements MailableContract, Renderable PHPUnit::assertTrue( $this->hasBcc($address, $name), - "Did not see expected recipient [{$recipient}] in email recipients." + "Did not see expected recipient [{$recipient}] in email 'bcc' recipients." ); return $this; diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php index 6872cca3..ea02400f 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/simple-tailwind.blade.php @@ -2,22 +2,22 @@ <nav role="navigation" aria-label="Pagination Navigation" class="flex justify-between"> {{-- Previous Page Link --}} @if ($paginator->onFirstPage()) - <span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md"> + <span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600"> {!! __('pagination.previous') !!} </span> @else - <a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150"> + <a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300"> {!! __('pagination.previous') !!} </a> @endif {{-- Next Page Link --}} @if ($paginator->hasMorePages()) - <a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150"> + <a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300"> {!! __('pagination.next') !!} </a> @else - <span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md"> + <span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600"> {!! __('pagination.next') !!} </span> @endif diff --git a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php index 5bf323b4..aee2ad28 100644 --- a/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php +++ b/vendor/laravel/framework/src/Illuminate/Pagination/resources/views/tailwind.blade.php @@ -2,21 +2,21 @@ <nav role="navigation" aria-label="{{ __('Pagination Navigation') }}" class="flex items-center justify-between"> <div class="flex justify-between flex-1 sm:hidden"> @if ($paginator->onFirstPage()) - <span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md"> + <span class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600"> {!! __('pagination.previous') !!} </span> @else - <a href="{{ $paginator->previousPageUrl() }}" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150"> + <a href="{{ $paginator->previousPageUrl() }}" class="relative inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300"> {!! __('pagination.previous') !!} </a> @endif @if ($paginator->hasMorePages()) - <a href="{{ $paginator->nextPageUrl() }}" class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150"> + <a href="{{ $paginator->nextPageUrl() }}" class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 rounded-md hover:text-gray-500 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-300 dark:focus:border-blue-700 dark:active:bg-gray-700 dark:active:text-gray-300"> {!! __('pagination.next') !!} </a> @else - <span class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md"> + <span class="relative inline-flex items-center px-4 py-2 ml-3 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 rounded-md dark:text-gray-600 dark:bg-gray-800 dark:border-gray-600"> {!! __('pagination.next') !!} </span> @endif @@ -24,7 +24,7 @@ <div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"> <div> - <p class="text-sm text-gray-700 leading-5"> + <p class="text-sm text-gray-700 leading-5 dark:text-gray-400"> {!! __('Showing') !!} @if ($paginator->firstItem()) <span class="font-medium">{{ $paginator->firstItem() }}</span> @@ -40,18 +40,18 @@ </div> <div> - <span class="relative z-0 inline-flex shadow-sm rounded-md"> + <span class="relative z-0 inline-flex rtl:flex-row-reverse shadow-sm rounded-md"> {{-- Previous Page Link --}} @if ($paginator->onFirstPage()) <span aria-disabled="true" aria-label="{{ __('pagination.previous') }}"> - <span class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-l-md leading-5" aria-hidden="true"> + <span class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-l-md leading-5 dark:bg-gray-800 dark:border-gray-600" aria-hidden="true"> <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> <path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" /> </svg> </span> </span> @else - <a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150" aria-label="{{ __('pagination.previous') }}"> + <a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="relative inline-flex items-center px-2 py-2 text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-l-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:active:bg-gray-700 dark:focus:border-blue-800" aria-label="{{ __('pagination.previous') }}"> <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> <path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" /> </svg> @@ -63,7 +63,7 @@ {{-- "Three Dots" Separator --}} @if (is_string($element)) <span aria-disabled="true"> - <span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 cursor-default leading-5">{{ $element }}</span> + <span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 cursor-default leading-5 dark:bg-gray-800 dark:border-gray-600">{{ $element }}</span> </span> @endif @@ -72,10 +72,10 @@ @foreach ($element as $page => $url) @if ($page == $paginator->currentPage()) <span aria-current="page"> - <span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">{{ $page }}</span> + <span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5 dark:bg-gray-800 dark:border-gray-600">{{ $page }}</span> </span> @else - <a href="{{ $url }}" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 hover:text-gray-500 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150" aria-label="{{ __('Go to page :page', ['page' => $page]) }}"> + <a href="{{ $url }}" class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-700 bg-white border border-gray-300 leading-5 hover:text-gray-500 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-700 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-400 dark:hover:text-gray-300 dark:active:bg-gray-700 dark:focus:border-blue-800" aria-label="{{ __('Go to page :page', ['page' => $page]) }}"> {{ $page }} </a> @endif @@ -85,14 +85,14 @@ {{-- Next Page Link --}} @if ($paginator->hasMorePages()) - <a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150" aria-label="{{ __('pagination.next') }}"> + <a href="{{ $paginator->nextPageUrl() }}" rel="next" class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 rounded-r-md leading-5 hover:text-gray-400 focus:z-10 focus:outline-none focus:ring ring-gray-300 focus:border-blue-300 active:bg-gray-100 active:text-gray-500 transition ease-in-out duration-150 dark:bg-gray-800 dark:border-gray-600 dark:active:bg-gray-700 dark:focus:border-blue-800" aria-label="{{ __('pagination.next') }}"> <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /> </svg> </a> @else <span aria-disabled="true" aria-label="{{ __('pagination.next') }}"> - <span class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-r-md leading-5" aria-hidden="true"> + <span class="relative inline-flex items-center px-2 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default rounded-r-md leading-5 dark:bg-gray-800 dark:border-gray-600" aria-hidden="true"> <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" /> </svg> diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ClearCommand.php index 6f3e8dc3..8f4187bc 100644 --- a/vendor/laravel/framework/src/Illuminate/Queue/Console/ClearCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/ClearCommand.php @@ -57,6 +57,8 @@ class ClearCommand extends Command $this->components->info('Cleared '.$count.' '.Str::plural('job', $count).' from the ['.$queueName.'] queue'); } else { $this->components->error('Clearing queues is not supported on ['.(new ReflectionClass($queue))->getShortName().']'); + + return 1; } return 0; diff --git a/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php b/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php index 22d87d32..fce7803c 100644 --- a/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/Console/ForgetFailedCommand.php @@ -25,7 +25,7 @@ class ForgetFailedCommand extends Command /** * Execute the console command. * - * @return void + * @return int|null */ public function handle() { @@ -33,6 +33,8 @@ class ForgetFailedCommand extends Command $this->components->info('Failed job deleted successfully.'); } else { $this->components->error('No failed job matches the given ID.'); + + return 1; } } } diff --git a/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php b/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php index c650f7c4..d57f1879 100644 --- a/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php @@ -268,7 +268,8 @@ class DatabaseQueue extends Queue implements QueueContract, ClearableQueue if (($databaseEngine === 'mysql' && version_compare($databaseVersion, '8.0.1', '>=')) || ($databaseEngine === 'mariadb' && version_compare($databaseVersion, '10.6.0', '>=')) || - ($databaseEngine === 'pgsql' && version_compare($databaseVersion, '9.5', '>='))) { + ($databaseEngine === 'pgsql' && version_compare($databaseVersion, '9.5', '>=')) || + ($databaseEngine === 'vitess' && version_compare($databaseVersion, '19.0', '>='))) { return 'FOR UPDATE SKIP LOCKED'; } diff --git a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php index 2f94d28a..478352ae 100644 --- a/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php +++ b/vendor/laravel/framework/src/Illuminate/Queue/QueueServiceProvider.php @@ -198,7 +198,9 @@ class QueueServiceProvider extends ServiceProvider implements DeferrableProvider }; $resetScope = function () use ($app) { - if (method_exists($app['log']->driver(), 'withoutContext')) { + $app['log']->flushSharedContext(); + + if (method_exists($app['log'], 'withoutContext')) { $app['log']->withoutContext(); } diff --git a/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php b/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php index d15b15cd..06618a2f 100644 --- a/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php +++ b/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php @@ -63,9 +63,7 @@ class PhpRedisConnector implements Connector */ protected function buildClusterConnectionString(array $server) { - return $this->formatHost($server).':'.$server['port'].'?'.Arr::query(Arr::only($server, [ - 'database', 'password', 'prefix', 'read_timeout', - ])); + return $this->formatHost($server).':'.$server['port']; } /** @@ -199,10 +197,6 @@ class PhpRedisConnector implements Connector $client->setOption(RedisCluster::OPT_SLAVE_FAILOVER, $options['failover']); } - if (! empty($options['name'])) { - $client->client('SETNAME', $options['name']); - } - if (array_key_exists('serializer', $options)) { $client->setOption(Redis::OPT_SERIALIZER, $options['serializer']); } diff --git a/vendor/laravel/framework/src/Illuminate/Routing/Route.php b/vendor/laravel/framework/src/Illuminate/Routing/Route.php index 76645007..02518733 100644 --- a/vendor/laravel/framework/src/Illuminate/Routing/Route.php +++ b/vendor/laravel/framework/src/Illuminate/Routing/Route.php @@ -583,7 +583,7 @@ class Route { $key = array_search($parameter, array_keys($this->parameters)); - if ($key === 0) { + if ($key === 0 || $key === false) { return; } diff --git a/vendor/laravel/framework/src/Illuminate/Session/Store.php b/vendor/laravel/framework/src/Illuminate/Session/Store.php index 10184dee..fb9e2c4f 100644 --- a/vendor/laravel/framework/src/Illuminate/Session/Store.php +++ b/vendor/laravel/framework/src/Illuminate/Session/Store.php @@ -245,6 +245,17 @@ class Store implements Session return Arr::only($this->attributes, $keys); } + /** + * Get all the session data except for a specified array of items. + * + * @param array $keys + * @return array + */ + public function except(array $keys) + { + return Arr::except($this->attributes, $keys); + } + /** * Checks if a key exists. * diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/DB.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/DB.php index d9de5c9a..e13bd509 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/DB.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/DB.php @@ -4,6 +4,7 @@ namespace Illuminate\Support\Facades; /** * @method static \Illuminate\Database\Connection connection(string|null $name = null) + * @method static \Illuminate\Database\ConnectionInterface connectUsing(string $name, array $config, bool $force = false) * @method static void registerDoctrineType(string $class, string $name, string $type) * @method static void purge(string|null $name = null) * @method static void disconnect(string|null $name = null) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Gate.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Gate.php index 77178440..4423a1d6 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Gate.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Gate.php @@ -13,8 +13,8 @@ use Illuminate\Contracts\Auth\Access\Gate as GateContract; * @method static \Illuminate\Auth\Access\Gate policy(string $class, string $policy) * @method static \Illuminate\Auth\Access\Gate before(callable $callback) * @method static \Illuminate\Auth\Access\Gate after(callable $callback) - * @method static bool allows(string $ability, array|mixed $arguments = []) - * @method static bool denies(string $ability, array|mixed $arguments = []) + * @method static bool allows(iterable|string $ability, array|mixed $arguments = []) + * @method static bool denies(iterable|string $ability, array|mixed $arguments = []) * @method static bool check(iterable|string $abilities, array|mixed $arguments = []) * @method static bool any(iterable|string $abilities, array|mixed $arguments = []) * @method static bool none(iterable|string $abilities, array|mixed $arguments = []) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Http.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Http.php index 6a445e07..4c0cbd91 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Http.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Http.php @@ -27,7 +27,7 @@ use Illuminate\Http\Client\Factory; * @method static void flushMacros() * @method static mixed macroCall(string $method, array $parameters) * @method static \Illuminate\Http\Client\PendingRequest baseUrl(string $url) - * @method static \Illuminate\Http\Client\PendingRequest withBody(string $content, string $contentType = 'application/json') + * @method static \Illuminate\Http\Client\PendingRequest withBody(\Psr\Http\Message\StreamInterface|string $content, string $contentType = 'application/json') * @method static \Illuminate\Http\Client\PendingRequest asJson() * @method static \Illuminate\Http\Client\PendingRequest asForm() * @method static \Illuminate\Http\Client\PendingRequest attach(string|array $name, string|resource $contents = '', string|null $filename = null, array $headers = []) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php index cdaad3d0..a341b5fa 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Lang.php @@ -6,7 +6,7 @@ namespace Illuminate\Support\Facades; * @method static bool hasForLocale(string $key, string|null $locale = null) * @method static bool has(string $key, string|null $locale = null, bool $fallback = true) * @method static string|array get(string $key, array $replace = [], string|null $locale = null, bool $fallback = true) - * @method static string choice(string $key, \Countable|int|array $number, array $replace = [], string|null $locale = null) + * @method static string choice(string $key, \Countable|int|float|array $number, array $replace = [], string|null $locale = null) * @method static void addLines(array $lines, string $locale, string $namespace = '*') * @method static void load(string $namespace, string $group, string $locale) * @method static \Illuminate\Translation\Translator handleMissingKeysUsing(callable|null $callback) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Log.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Log.php index 1fb2cfca..37e03961 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Log.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Log.php @@ -9,6 +9,7 @@ namespace Illuminate\Support\Facades; * @method static \Psr\Log\LoggerInterface driver(string|null $driver = null) * @method static \Illuminate\Log\LogManager shareContext(array $context) * @method static array sharedContext() + * @method static \Illuminate\Log\LogManager withoutContext() * @method static \Illuminate\Log\LogManager flushSharedContext() * @method static string|null getDefaultDriver() * @method static void setDefaultDriver(string $name) @@ -26,7 +27,6 @@ namespace Illuminate\Support\Facades; * @method static void log(mixed $level, string $message, array $context = []) * @method static void write(string $level, \Illuminate\Contracts\Support\Arrayable|\Illuminate\Contracts\Support\Jsonable|\Illuminate\Support\Stringable|array|string $message, array $context = []) * @method static \Illuminate\Log\Logger withContext(array $context = []) - * @method static \Illuminate\Log\Logger withoutContext() * @method static void listen(\Closure $callback) * @method static \Psr\Log\LoggerInterface getLogger() * @method static \Illuminate\Contracts\Events\Dispatcher getEventDispatcher() diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Queue.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Queue.php index 2646f09d..50e2c7b8 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Queue.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Queue.php @@ -45,6 +45,7 @@ use Illuminate\Support\Testing\Fakes\QueueFake; * @method static void assertClosurePushed(callable|int|null $callback = null) * @method static void assertClosureNotPushed(callable|null $callback = null) * @method static void assertNotPushed(string|\Closure $job, callable|null $callback = null) + * @method static void assertCount(int $expectedCount) * @method static void assertNothingPushed() * @method static \Illuminate\Support\Collection pushed(string $job, callable|null $callback = null) * @method static bool hasPushed(string $job) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php index 8d4d9b0c..8aa0eb90 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Schema.php @@ -39,6 +39,10 @@ namespace Illuminate\Support\Facades; * @method static \Illuminate\Database\Connection getConnection() * @method static \Illuminate\Database\Schema\Builder setConnection(\Illuminate\Database\Connection $connection) * @method static void blueprintResolver(\Closure $resolver) + * @method static void macro(string $name, object|callable $macro) + * @method static void mixin(object $mixin, bool $replace = true) + * @method static bool hasMacro(string $name) + * @method static void flushMacros() * * @see \Illuminate\Database\Schema\Builder */ diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php index 4baf6c93..125b3dbb 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Session.php @@ -21,6 +21,7 @@ namespace Illuminate\Support\Facades; * @method static void ageFlashData() * @method static array all() * @method static array only(array $keys) + * @method static array except(array $keys) * @method static bool exists(string|array $key) * @method static bool missing(string|array $key) * @method static bool has(string|array $key) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Facades/Vite.php b/vendor/laravel/framework/src/Illuminate/Support/Facades/Vite.php index 4ebda1a3..2f37c675 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Facades/Vite.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Facades/Vite.php @@ -9,6 +9,7 @@ namespace Illuminate\Support\Facades; * @method static \Illuminate\Foundation\Vite useIntegrityKey(string|false $key) * @method static \Illuminate\Foundation\Vite withEntryPoints(array $entryPoints) * @method static \Illuminate\Foundation\Vite useManifestFilename(string $filename) + * @method static \Illuminate\Foundation\Vite createAssetPathsUsing(void $resolver) * @method static string hotFile() * @method static \Illuminate\Foundation\Vite useHotFile(string $path) * @method static \Illuminate\Foundation\Vite useBuildDirectory(string $path) diff --git a/vendor/laravel/framework/src/Illuminate/Support/Number.php b/vendor/laravel/framework/src/Illuminate/Support/Number.php index a101e903..7719055f 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Number.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Number.php @@ -46,12 +46,22 @@ class Number * * @param int|float $number * @param string|null $locale + * @param int|null $after + * @param int|null $until * @return string */ - public static function spell(int|float $number, ?string $locale = null) + public static function spell(int|float $number, ?string $locale = null, ?int $after = null, ?int $until = null) { static::ensureIntlExtensionIsInstalled(); + if (! is_null($after) && $number <= $after) { + return static::format($number, locale: $locale); + } + + if (! is_null($until) && $number >= $until) { + return static::format($number, locale: $locale); + } + $formatter = new NumberFormatter($locale ?? static::$locale, NumberFormatter::SPELLOUT); return $formatter->format($number); @@ -134,12 +144,12 @@ class Number } /** - * Convert the number to its human readable equivalent. + * Convert the number to its human-readable equivalent. * - * @param int $number + * @param int|float $number * @param int $precision * @param int|null $maxPrecision - * @return string + * @return bool|string */ public static function abbreviate(int|float $number, int $precision = 0, ?int $maxPrecision = null) { @@ -147,12 +157,13 @@ class Number } /** - * Convert the number to its human readable equivalent. + * Convert the number to its human-readable equivalent. * - * @param int $number + * @param int|float $number * @param int $precision * @param int|null $maxPrecision - * @return string + * @param bool $abbreviate + * @return bool|string */ public static function forHumans(int|float $number, int $precision = 0, ?int $maxPrecision = null, bool $abbreviate = false) { @@ -172,13 +183,13 @@ class Number } /** - * Convert the number to its human readable equivalent. + * Convert the number to its human-readable equivalent. * - * @param int $number + * @param int|float $number * @param int $precision * @param int|null $maxPrecision * @param array $units - * @return string + * @return string|false */ protected static function summarize(int|float $number, int $precision = 0, ?int $maxPrecision = null, array $units = []) { @@ -208,6 +219,19 @@ class Number return trim(sprintf('%s%s', static::format($number, $precision, $maxPrecision), $units[$displayExponent] ?? '')); } + /** + * Clamp the given number between the given minimum and maximum. + * + * @param int|float $number + * @param int|float $min + * @param int|float $max + * @return int|float + */ + public static function clamp(int|float $number, int|float $min, int|float $max) + { + return min(max($number, $min), $max); + } + /** * Execute the given callback using the given locale. * @@ -243,7 +267,9 @@ class Number protected static function ensureIntlExtensionIsInstalled() { if (! extension_loaded('intl')) { - throw new RuntimeException('The "intl" PHP extension is required to use this method.'); + $method = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['function']; + + throw new RuntimeException('The "intl" PHP extension is required to use the ['.$method.'] method.'); } } } diff --git a/vendor/laravel/framework/src/Illuminate/Support/Str.php b/vendor/laravel/framework/src/Illuminate/Support/Str.php index fa7960b1..4d51462f 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Str.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Str.php @@ -1238,7 +1238,7 @@ class Str } /** - * Convert the given string to title case. + * Convert the given string to proper case. * * @param string $value * @return string @@ -1249,7 +1249,7 @@ class Str } /** - * Convert the given string to title case for each word. + * Convert the given string to proper case for each word. * * @param string $value * @return string @@ -1267,6 +1267,52 @@ class Str return implode(' ', array_filter(explode('_', $collapsed))); } + /** + * Convert the given string to APA-style title case. + * + * See: https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case + * + * @param string $value + * @return string + */ + public static function apa($value) + { + $minorWords = [ + 'and', 'as', 'but', 'for', 'if', 'nor', 'or', 'so', 'yet', 'a', 'an', + 'the', 'at', 'by', 'for', 'in', 'of', 'off', 'on', 'per', 'to', 'up', 'via', + ]; + + $endPunctuation = ['.', '!', '?', ':', '—', ',']; + + $words = preg_split('/\s+/', $value, -1, PREG_SPLIT_NO_EMPTY); + + $words[0] = ucfirst(mb_strtolower($words[0])); + + for ($i = 0; $i < count($words); $i++) { + $lowercaseWord = mb_strtolower($words[$i]); + + if (str_contains($lowercaseWord, '-')) { + $hyphenatedWords = explode('-', $lowercaseWord); + + $hyphenatedWords = array_map(function ($part) use ($minorWords) { + return (in_array($part, $minorWords) && mb_strlen($part) <= 3) ? $part : ucfirst($part); + }, $hyphenatedWords); + + $words[$i] = implode('-', $hyphenatedWords); + } else { + if (in_array($lowercaseWord, $minorWords) && + mb_strlen($lowercaseWord) <= 3 && + ! ($i === 0 || in_array(mb_substr($words[$i - 1], -1), $endPunctuation))) { + $words[$i] = $lowercaseWord; + } else { + $words[$i] = ucfirst($lowercaseWord); + } + } + } + + return implode(' ', $words); + } + /** * Get the singular form of an English word. * diff --git a/vendor/laravel/framework/src/Illuminate/Support/Stringable.php b/vendor/laravel/framework/src/Illuminate/Support/Stringable.php index 018416d9..144cbb8c 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Stringable.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Stringable.php @@ -205,7 +205,7 @@ class Stringable implements JsonSerializable, ArrayAccess * * @param int $mode * @param string $encoding - * @return string + * @return static */ public function convertCase(int $mode = MB_CASE_FOLD, ?string $encoding = 'UTF-8') { @@ -788,7 +788,7 @@ class Stringable implements JsonSerializable, ArrayAccess } /** - * Convert the given string to title case. + * Convert the given string to proper case. * * @return static */ @@ -797,6 +797,26 @@ class Stringable implements JsonSerializable, ArrayAccess return new static(Str::title($this->value)); } + /** + * Convert the given string to proper case for each word. + * + * @return static + */ + public function headline() + { + return new static(Str::headline($this->value)); + } + + /** + * Convert the given string to APA-style title case. + * + * @return static + */ + public function apa() + { + return new static(Str::apa($this->value)); + } + /** * Transliterate a string to its closest ASCII representation. * @@ -809,16 +829,6 @@ class Stringable implements JsonSerializable, ArrayAccess return new static(Str::transliterate($this->value, $unknown, $strict)); } - /** - * Convert the given string to title case for each word. - * - * @return static - */ - public function headline() - { - return new static(Str::headline($this->value)); - } - /** * Get the singular form of an English word. * @@ -1271,11 +1281,12 @@ class Stringable implements JsonSerializable, ArrayAccess /** * Get the underlying string value as an integer. * + * @param int $base * @return int */ - public function toInteger() + public function toInteger($base = 10) { - return intval($this->value); + return intval($this->value, $base); } /** diff --git a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php index 4117d561..d0da55de 100644 --- a/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php +++ b/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/QueueFake.php @@ -278,6 +278,22 @@ class QueueFake extends QueueManager implements Fake, Queue ); } + /** + * Assert the total count of jobs that were pushed. + * + * @param int $expectedCount + * @return void + */ + public function assertCount($expectedCount) + { + $actualCount = collect($this->jobs)->flatten(1)->count(); + + PHPUnit::assertSame( + $expectedCount, $actualCount, + "Expected {$expectedCount} jobs to be pushed, but found {$actualCount} instead." + ); + } + /** * Assert that no jobs were pushed. * diff --git a/vendor/laravel/framework/src/Illuminate/Testing/TestView.php b/vendor/laravel/framework/src/Illuminate/Testing/TestView.php index 137b41e6..350e1757 100644 --- a/vendor/laravel/framework/src/Illuminate/Testing/TestView.php +++ b/vendor/laravel/framework/src/Illuminate/Testing/TestView.php @@ -106,6 +106,18 @@ class TestView return $this; } + /** + * Assert that the view's rendered content is empty. + * + * @return $this + */ + public function assertViewEmpty() + { + PHPUnit::assertEmpty($this->rendered); + + return $this; + } + /** * Assert that the given string is contained within the view. * diff --git a/vendor/laravel/framework/src/Illuminate/Translation/PotentiallyTranslatedString.php b/vendor/laravel/framework/src/Illuminate/Translation/PotentiallyTranslatedString.php index f46db352..efcccca2 100644 --- a/vendor/laravel/framework/src/Illuminate/Translation/PotentiallyTranslatedString.php +++ b/vendor/laravel/framework/src/Illuminate/Translation/PotentiallyTranslatedString.php @@ -57,7 +57,7 @@ class PotentiallyTranslatedString implements Stringable /** * Translates the string based on a count. * - * @param \Countable|int|array $number + * @param \Countable|int|float|array $number * @param array $replace * @param string|null $locale * @return $this diff --git a/vendor/laravel/framework/src/Illuminate/Translation/Translator.php b/vendor/laravel/framework/src/Illuminate/Translation/Translator.php index f9f8b49c..634a102d 100644 --- a/vendor/laravel/framework/src/Illuminate/Translation/Translator.php +++ b/vendor/laravel/framework/src/Illuminate/Translation/Translator.php @@ -183,7 +183,7 @@ class Translator extends NamespacedItemResolver implements TranslatorContract * Get a translation according to an integer value. * * @param string $key - * @param \Countable|int|array $number + * @param \Countable|int|float|array $number * @param array $replace * @param string|null $locale * @return string diff --git a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php index 37f1cbc9..911abd22 100644 --- a/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php +++ b/vendor/laravel/framework/src/Illuminate/View/Compilers/Concerns/CompilesEchos.php @@ -162,6 +162,10 @@ trait CompilesEchos return call_user_func($this->echoHandlers[get_class($value)], $value); } + if (is_iterable($value) && isset($this->echoHandlers['iterable'])) { + return call_user_func($this->echoHandlers['iterable'], $value); + } + return $value; } } diff --git a/vendor/laravel/pint/builds/pint b/vendor/laravel/pint/builds/pint index 771c46b8..a9f7a2b6 100644 Binary files a/vendor/laravel/pint/builds/pint and b/vendor/laravel/pint/builds/pint differ diff --git a/vendor/laravel/pint/composer.json b/vendor/laravel/pint/composer.json index 66a81429..50b201d1 100644 --- a/vendor/laravel/pint/composer.json +++ b/vendor/laravel/pint/composer.json @@ -23,13 +23,13 @@ "ext-xml": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.38.0", - "illuminate/view": "^10.30.1", + "friendsofphp/php-cs-fixer": "^3.47.0", + "illuminate/view": "^10.40.0", + "larastan/larastan": "^2.8.1", "laravel-zero/framework": "^10.3.0", - "mockery/mockery": "^1.6.6", - "nunomaduro/larastan": "^2.6.4", + "mockery/mockery": "^1.6.7", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.24.2" + "pestphp/pest": "^2.31.0" }, "autoload": { "psr-4": { diff --git a/vendor/laravel/prompts/src/ConfirmPrompt.php b/vendor/laravel/prompts/src/ConfirmPrompt.php index 351f265e..23b8a97f 100644 --- a/vendor/laravel/prompts/src/ConfirmPrompt.php +++ b/vendor/laravel/prompts/src/ConfirmPrompt.php @@ -2,8 +2,6 @@ namespace Laravel\Prompts; -use Closure; - class ConfirmPrompt extends Prompt { /** @@ -20,8 +18,8 @@ class ConfirmPrompt extends Prompt public string $yes = 'Yes', public string $no = 'No', public bool|string $required = false, - public ?Closure $validate = null, - public string $hint = '' + public mixed $validate = null, + public string $hint = '', ) { $this->confirmed = $default; diff --git a/vendor/laravel/prompts/src/MultiSearchPrompt.php b/vendor/laravel/prompts/src/MultiSearchPrompt.php index 5e69217d..4ba87ce9 100644 --- a/vendor/laravel/prompts/src/MultiSearchPrompt.php +++ b/vendor/laravel/prompts/src/MultiSearchPrompt.php @@ -35,7 +35,7 @@ class MultiSearchPrompt extends Prompt public string $placeholder = '', public int $scroll = 5, public bool|string $required = false, - public ?Closure $validate = null, + public mixed $validate = null, public string $hint = '', ) { $this->trackTypedValue(submit: false, ignore: fn ($key) => Key::oneOf([Key::SPACE, Key::HOME, Key::END, Key::CTRL_A, Key::CTRL_E], $key) && $this->highlighted !== null); diff --git a/vendor/laravel/prompts/src/MultiSelectPrompt.php b/vendor/laravel/prompts/src/MultiSelectPrompt.php index 3c1e897e..b2f0c704 100644 --- a/vendor/laravel/prompts/src/MultiSelectPrompt.php +++ b/vendor/laravel/prompts/src/MultiSelectPrompt.php @@ -2,7 +2,6 @@ namespace Laravel\Prompts; -use Closure; use Illuminate\Support\Collection; class MultiSelectPrompt extends Prompt @@ -42,8 +41,8 @@ class MultiSelectPrompt extends Prompt array|Collection $default = [], public int $scroll = 5, public bool|string $required = false, - public ?Closure $validate = null, - public string $hint = '' + public mixed $validate = null, + public string $hint = '', ) { $this->options = $options instanceof Collection ? $options->all() : $options; $this->default = $default instanceof Collection ? $default->all() : $default; diff --git a/vendor/laravel/prompts/src/PasswordPrompt.php b/vendor/laravel/prompts/src/PasswordPrompt.php index ef9e6061..31802c1e 100644 --- a/vendor/laravel/prompts/src/PasswordPrompt.php +++ b/vendor/laravel/prompts/src/PasswordPrompt.php @@ -2,8 +2,6 @@ namespace Laravel\Prompts; -use Closure; - class PasswordPrompt extends Prompt { use Concerns\TypedValue; @@ -15,8 +13,8 @@ class PasswordPrompt extends Prompt public string $label, public string $placeholder = '', public bool|string $required = false, - public ?Closure $validate = null, - public string $hint = '' + public mixed $validate = null, + public string $hint = '', ) { $this->trackTypedValue(); } diff --git a/vendor/laravel/prompts/src/Prompt.php b/vendor/laravel/prompts/src/Prompt.php index fcc80baf..1f50b102 100644 --- a/vendor/laravel/prompts/src/Prompt.php +++ b/vendor/laravel/prompts/src/Prompt.php @@ -45,15 +45,25 @@ abstract class Prompt public bool|string $required; /** - * The validator callback. + * The validator callback or rules. */ - protected ?Closure $validate; + public mixed $validate; + + /** + * The cancellation callback. + */ + protected static Closure $cancelUsing; /** * Indicates if the prompt has been validated. */ protected bool $validated = false; + /** + * The custom validation callback. + */ + protected static ?Closure $validateUsing; + /** * The output instance. */ @@ -108,7 +118,11 @@ abstract class Prompt if ($continue === false || $key === Key::CTRL_C) { if ($key === Key::CTRL_C) { - static::terminal()->exit(); + if (isset(static::$cancelUsing)) { + return (static::$cancelUsing)(); + } else { + static::terminal()->exit(); + } } return $this->value(); @@ -119,6 +133,14 @@ abstract class Prompt } } + /** + * Register a callback to be invoked when a user cancels a prompt. + */ + public static function cancelUsing(Closure $callback): void + { + static::$cancelUsing = $callback; + } + /** * How many new lines were written by the last output. */ @@ -173,6 +195,14 @@ abstract class Prompt return static::$terminal ??= new Terminal(); } + /** + * Set the custom validation callback. + */ + public static function validateUsing(Closure $callback): void + { + static::$validateUsing = $callback; + } + /** * Render the prompt. */ @@ -314,14 +344,18 @@ abstract class Prompt return; } - if (! isset($this->validate)) { + if (! isset($this->validate) && ! isset(static::$validateUsing)) { return; } - $error = ($this->validate)($value); + $error = match (true) { + is_callable($this->validate) => ($this->validate)($value), + isset(static::$validateUsing) => (static::$validateUsing)($this), + default => throw new RuntimeException('The validation logic is missing.'), + }; if (! is_string($error) && ! is_null($error)) { - throw new \RuntimeException('The validator must return a string or null.'); + throw new RuntimeException('The validator must return a string or null.'); } if (is_string($error) && strlen($error) > 0) { diff --git a/vendor/laravel/prompts/src/SearchPrompt.php b/vendor/laravel/prompts/src/SearchPrompt.php index 13532848..b9b820ce 100644 --- a/vendor/laravel/prompts/src/SearchPrompt.php +++ b/vendor/laravel/prompts/src/SearchPrompt.php @@ -28,7 +28,7 @@ class SearchPrompt extends Prompt public Closure $options, public string $placeholder = '', public int $scroll = 5, - public ?Closure $validate = null, + public mixed $validate = null, public string $hint = '', public bool|string $required = true, ) { diff --git a/vendor/laravel/prompts/src/SelectPrompt.php b/vendor/laravel/prompts/src/SelectPrompt.php index 6c9e5ed8..081f09c7 100644 --- a/vendor/laravel/prompts/src/SelectPrompt.php +++ b/vendor/laravel/prompts/src/SelectPrompt.php @@ -2,7 +2,6 @@ namespace Laravel\Prompts; -use Closure; use Illuminate\Support\Collection; use InvalidArgumentException; @@ -27,7 +26,7 @@ class SelectPrompt extends Prompt array|Collection $options, public int|string|null $default = null, public int $scroll = 5, - public ?Closure $validate = null, + public mixed $validate = null, public string $hint = '', public bool|string $required = true, ) { diff --git a/vendor/laravel/prompts/src/SuggestPrompt.php b/vendor/laravel/prompts/src/SuggestPrompt.php index 9e34c19b..85f2bf7b 100644 --- a/vendor/laravel/prompts/src/SuggestPrompt.php +++ b/vendor/laravel/prompts/src/SuggestPrompt.php @@ -37,8 +37,8 @@ class SuggestPrompt extends Prompt public string $default = '', public int $scroll = 5, public bool|string $required = false, - public ?Closure $validate = null, - public string $hint = '' + public mixed $validate = null, + public string $hint = '', ) { $this->options = $options instanceof Collection ? $options->all() : $options; diff --git a/vendor/laravel/prompts/src/TextPrompt.php b/vendor/laravel/prompts/src/TextPrompt.php index 2588f7b0..74a41a5e 100644 --- a/vendor/laravel/prompts/src/TextPrompt.php +++ b/vendor/laravel/prompts/src/TextPrompt.php @@ -2,8 +2,6 @@ namespace Laravel\Prompts; -use Closure; - class TextPrompt extends Prompt { use Concerns\TypedValue; @@ -16,8 +14,8 @@ class TextPrompt extends Prompt public string $placeholder = '', public string $default = '', public bool|string $required = false, - public ?Closure $validate = null, - public string $hint = '' + public mixed $validate = null, + public string $hint = '', ) { $this->trackTypedValue($default); } diff --git a/vendor/laravel/prompts/src/helpers.php b/vendor/laravel/prompts/src/helpers.php index b28d8840..d5e60b68 100644 --- a/vendor/laravel/prompts/src/helpers.php +++ b/vendor/laravel/prompts/src/helpers.php @@ -8,17 +8,17 @@ use Illuminate\Support\Collection; /** * Prompt the user for text input. */ -function text(string $label, string $placeholder = '', string $default = '', bool|string $required = false, ?Closure $validate = null, string $hint = ''): string +function text(string $label, string $placeholder = '', string $default = '', bool|string $required = false, mixed $validate = null, string $hint = ''): string { - return (new TextPrompt($label, $placeholder, $default, $required, $validate, $hint))->prompt(); + return (new TextPrompt(...func_get_args()))->prompt(); } /** * Prompt the user for input, hiding the value. */ -function password(string $label, string $placeholder = '', bool|string $required = false, ?Closure $validate = null, string $hint = ''): string +function password(string $label, string $placeholder = '', bool|string $required = false, mixed $validate = null, string $hint = ''): string { - return (new PasswordPrompt($label, $placeholder, $required, $validate, $hint))->prompt(); + return (new PasswordPrompt(...func_get_args()))->prompt(); } /** @@ -27,9 +27,9 @@ function password(string $label, string $placeholder = '', bool|string $required * @param array<int|string, string>|Collection<int|string, string> $options * @param true|string $required */ -function select(string $label, array|Collection $options, int|string|null $default = null, int $scroll = 5, ?Closure $validate = null, string $hint = '', bool|string $required = true): int|string +function select(string $label, array|Collection $options, int|string|null $default = null, int $scroll = 5, mixed $validate = null, string $hint = '', bool|string $required = true): int|string { - return (new SelectPrompt($label, $options, $default, $scroll, $validate, $hint, $required))->prompt(); + return (new SelectPrompt(...func_get_args()))->prompt(); } /** @@ -39,17 +39,17 @@ function select(string $label, array|Collection $options, int|string|null $defau * @param array<int|string>|Collection<int, int|string> $default * @return array<int|string> */ -function multiselect(string $label, array|Collection $options, array|Collection $default = [], int $scroll = 5, bool|string $required = false, ?Closure $validate = null, string $hint = 'Use the space bar to select options.'): array +function multiselect(string $label, array|Collection $options, array|Collection $default = [], int $scroll = 5, bool|string $required = false, mixed $validate = null, string $hint = 'Use the space bar to select options.'): array { - return (new MultiSelectPrompt($label, $options, $default, $scroll, $required, $validate, $hint))->prompt(); + return (new MultiSelectPrompt(...func_get_args()))->prompt(); } /** * Prompt the user to confirm an action. */ -function confirm(string $label, bool $default = true, string $yes = 'Yes', string $no = 'No', bool|string $required = false, ?Closure $validate = null, string $hint = ''): bool +function confirm(string $label, bool $default = true, string $yes = 'Yes', string $no = 'No', bool|string $required = false, mixed $validate = null, string $hint = ''): bool { - return (new ConfirmPrompt($label, $default, $yes, $no, $required, $validate, $hint))->prompt(); + return (new ConfirmPrompt(...func_get_args()))->prompt(); } /** @@ -57,9 +57,9 @@ function confirm(string $label, bool $default = true, string $yes = 'Yes', strin * * @param array<string>|Collection<int, string>|Closure(string): array<string> $options */ -function suggest(string $label, array|Collection|Closure $options, string $placeholder = '', string $default = '', int $scroll = 5, bool|string $required = false, ?Closure $validate = null, string $hint = ''): string +function suggest(string $label, array|Collection|Closure $options, string $placeholder = '', string $default = '', int $scroll = 5, bool|string $required = false, mixed $validate = null, string $hint = ''): string { - return (new SuggestPrompt($label, $options, $placeholder, $default, $scroll, $required, $validate, $hint))->prompt(); + return (new SuggestPrompt(...func_get_args()))->prompt(); } /** @@ -68,9 +68,9 @@ function suggest(string $label, array|Collection|Closure $options, string $place * @param Closure(string): array<int|string, string> $options * @param true|string $required */ -function search(string $label, Closure $options, string $placeholder = '', int $scroll = 5, ?Closure $validate = null, string $hint = '', bool|string $required = true): int|string +function search(string $label, Closure $options, string $placeholder = '', int $scroll = 5, mixed $validate = null, string $hint = '', bool|string $required = true): int|string { - return (new SearchPrompt($label, $options, $placeholder, $scroll, $validate, $hint, $required))->prompt(); + return (new SearchPrompt(...func_get_args()))->prompt(); } /** @@ -79,9 +79,9 @@ function search(string $label, Closure $options, string $placeholder = '', int $ * @param Closure(string): array<int|string, string> $options * @return array<int|string> */ -function multisearch(string $label, Closure $options, string $placeholder = '', int $scroll = 5, bool|string $required = false, ?Closure $validate = null, string $hint = 'Use the space bar to select options.'): array +function multisearch(string $label, Closure $options, string $placeholder = '', int $scroll = 5, bool|string $required = false, mixed $validate = null, string $hint = 'Use the space bar to select options.'): array { - return (new MultiSearchPrompt($label, $options, $placeholder, $scroll, $required, $validate, $hint))->prompt(); + return (new MultiSearchPrompt(...func_get_args()))->prompt(); } /** diff --git a/vendor/laravel/sail/runtimes/8.0/Dockerfile b/vendor/laravel/sail/runtimes/8.0/Dockerfile index d4cd0d36..a6dabe6b 100644 --- a/vendor/laravel/sail/runtimes/8.0/Dockerfile +++ b/vendor/laravel/sail/runtimes/8.0/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC +ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/vendor/laravel/sail/runtimes/8.0/supervisord.conf b/vendor/laravel/sail/runtimes/8.0/supervisord.conf index 9d284795..26ccc0a5 100644 --- a/vendor/laravel/sail/runtimes/8.0/supervisord.conf +++ b/vendor/laravel/sail/runtimes/8.0/supervisord.conf @@ -5,7 +5,7 @@ logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] -command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 +command=%(ENV_SUPERVISOR_PHP_COMMAND)s user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout diff --git a/vendor/laravel/sail/runtimes/8.1/Dockerfile b/vendor/laravel/sail/runtimes/8.1/Dockerfile index e62b4371..746f3ecb 100644 --- a/vendor/laravel/sail/runtimes/8.1/Dockerfile +++ b/vendor/laravel/sail/runtimes/8.1/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC +ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/vendor/laravel/sail/runtimes/8.1/supervisord.conf b/vendor/laravel/sail/runtimes/8.1/supervisord.conf index 9d284795..26ccc0a5 100644 --- a/vendor/laravel/sail/runtimes/8.1/supervisord.conf +++ b/vendor/laravel/sail/runtimes/8.1/supervisord.conf @@ -5,7 +5,7 @@ logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] -command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 +command=%(ENV_SUPERVISOR_PHP_COMMAND)s user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout diff --git a/vendor/laravel/sail/runtimes/8.2/Dockerfile b/vendor/laravel/sail/runtimes/8.2/Dockerfile index 414301f1..3de361ef 100644 --- a/vendor/laravel/sail/runtimes/8.2/Dockerfile +++ b/vendor/laravel/sail/runtimes/8.2/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC +ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/vendor/laravel/sail/runtimes/8.2/supervisord.conf b/vendor/laravel/sail/runtimes/8.2/supervisord.conf index 9d284795..26ccc0a5 100644 --- a/vendor/laravel/sail/runtimes/8.2/supervisord.conf +++ b/vendor/laravel/sail/runtimes/8.2/supervisord.conf @@ -5,7 +5,7 @@ logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] -command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 +command=%(ENV_SUPERVISOR_PHP_COMMAND)s user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout diff --git a/vendor/laravel/sail/runtimes/8.3/Dockerfile b/vendor/laravel/sail/runtimes/8.3/Dockerfile index 789df190..a4fa8890 100644 --- a/vendor/laravel/sail/runtimes/8.3/Dockerfile +++ b/vendor/laravel/sail/runtimes/8.3/Dockerfile @@ -10,6 +10,7 @@ WORKDIR /var/www/html ENV DEBIAN_FRONTEND noninteractive ENV TZ=UTC +ENV SUPERVISOR_PHP_COMMAND="/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80" RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/vendor/laravel/sail/runtimes/8.3/supervisord.conf b/vendor/laravel/sail/runtimes/8.3/supervisord.conf index 9d284795..26ccc0a5 100644 --- a/vendor/laravel/sail/runtimes/8.3/supervisord.conf +++ b/vendor/laravel/sail/runtimes/8.3/supervisord.conf @@ -5,7 +5,7 @@ logfile=/var/log/supervisor/supervisord.log pidfile=/var/run/supervisord.pid [program:php] -command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80 +command=%(ENV_SUPERVISOR_PHP_COMMAND)s user=sail environment=LARAVEL_SAIL="1" stdout_logfile=/dev/stdout diff --git a/vendor/laravel/sail/src/Console/Concerns/InteractsWithDockerComposeServices.php b/vendor/laravel/sail/src/Console/Concerns/InteractsWithDockerComposeServices.php index 10974980..d0821c67 100644 --- a/vendor/laravel/sail/src/Console/Concerns/InteractsWithDockerComposeServices.php +++ b/vendor/laravel/sail/src/Console/Concerns/InteractsWithDockerComposeServices.php @@ -170,6 +170,10 @@ trait InteractsWithDockerComposeServices { if (! file_exists($path = $this->laravel->basePath('phpunit.xml'))) { $path = $this->laravel->basePath('phpunit.xml.dist'); + + if (! file_exists($path)) { + return; + } } $phpunit = file_get_contents($path); diff --git a/vendor/laravel/sail/stubs/docker-compose.stub b/vendor/laravel/sail/stubs/docker-compose.stub index 55023b2c..9619b379 100644 --- a/vendor/laravel/sail/stubs/docker-compose.stub +++ b/vendor/laravel/sail/stubs/docker-compose.stub @@ -2,11 +2,11 @@ services: laravel.test: build: - context: ./vendor/laravel/sail/runtimes/8.2 + context: ./vendor/laravel/sail/runtimes/8.3 dockerfile: Dockerfile args: WWWGROUP: '${WWWGROUP}' - image: sail-8.2/app + image: sail-8.3/app extra_hosts: - 'host.docker.internal:host-gateway' ports: diff --git a/vendor/laravel/tinker/composer.json b/vendor/laravel/tinker/composer.json index 4d8363bd..827dd1dc 100644 --- a/vendor/laravel/tinker/composer.json +++ b/vendor/laravel/tinker/composer.json @@ -11,11 +11,11 @@ ], "require": { "php": "^7.2.5|^8.0", - "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", - "psy/psysh": "^0.10.4|^0.11.1", - "symfony/var-dumper": "^4.3.4|^5.0|^6.0" + "illuminate/console": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0", + "psy/psysh": "^0.11.1|^0.12.0", + "symfony/var-dumper": "^4.3.4|^5.0|^6.0|^7.0" }, "require-dev": { "mockery/mockery": "~1.3.3|^1.4.2", @@ -23,7 +23,7 @@ "phpunit/phpunit": "^8.5.8|^9.3.3" }, "suggest": { - "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0|^8.0|^9.0|^10.0|^11.0)." }, "autoload": { "psr-4": { @@ -38,9 +38,6 @@ } }, "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, "laravel": { "providers": [ "Laravel\\Tinker\\TinkerServiceProvider" diff --git a/vendor/nette/utils/src/StaticClass.php b/vendor/nette/utils/src/StaticClass.php index e7692563..b1d84862 100644 --- a/vendor/nette/utils/src/StaticClass.php +++ b/vendor/nette/utils/src/StaticClass.php @@ -18,7 +18,7 @@ trait StaticClass /** * Class is static and cannot be instantiated. */ - final private function __construct() + private function __construct() { } diff --git a/vendor/nette/utils/src/Utils/Arrays.php b/vendor/nette/utils/src/Utils/Arrays.php index ba3dda72..c33fb9a5 100644 --- a/vendor/nette/utils/src/Utils/Arrays.php +++ b/vendor/nette/utils/src/Utils/Arrays.php @@ -121,26 +121,64 @@ class Arrays /** - * Returns the first item from the array or null if array is empty. + * Returns the first item (matching the specified predicate if given). If there is no such item, it returns result of invoking $else or null. + * The $predicate has the signature `function (mixed $value, int|string $key, array $array): bool`. * @template T * @param array<T> $array * @return ?T */ - public static function first(array $array): mixed + public static function first(array $array, ?callable $predicate = null, ?callable $else = null): mixed { - return $array[array_key_first($array)] ?? null; + $key = self::firstKey($array, $predicate); + return $key === null + ? ($else ? $else() : null) + : $array[$key]; } /** - * Returns the last item from the array or null if array is empty. + * Returns the last item (matching the specified predicate if given). If there is no such item, it returns result of invoking $else or null. + * The $predicate has the signature `function (mixed $value, int|string $key, array $array): bool`. * @template T * @param array<T> $array * @return ?T */ - public static function last(array $array): mixed + public static function last(array $array, ?callable $predicate = null, ?callable $else = null): mixed { - return $array[array_key_last($array)] ?? null; + $key = self::lastKey($array, $predicate); + return $key === null + ? ($else ? $else() : null) + : $array[$key]; + } + + + /** + * Returns the key of first item (matching the specified predicate if given) or null if there is no such item. + * The $predicate has the signature `function (mixed $value, int|string $key, array $array): bool`. + */ + public static function firstKey(array $array, ?callable $predicate = null): int|string|null + { + if (!$predicate) { + return array_key_first($array); + } + foreach ($array as $k => $v) { + if ($predicate($v, $k, $array)) { + return $k; + } + } + return null; + } + + + /** + * Returns the key of last item (matching the specified predicate if given) or null if there is no such item. + * The $predicate has the signature `function (mixed $value, int|string $key, array $array): bool`. + */ + public static function lastKey(array $array, ?callable $predicate = null): int|string|null + { + return $predicate + ? self::firstKey(array_reverse($array, preserve_keys: true), $predicate) + : array_key_last($array); } @@ -217,7 +255,7 @@ class Arrays $res = []; $cb = $preserveKeys ? function ($v, $k) use (&$res): void { $res[$k] = $v; } - : function ($v) use (&$res): void { $res[] = $v; }; + : function ($v) use (&$res): void { $res[] = $v; }; array_walk_recursive($array, $cb); return $res; } @@ -330,17 +368,17 @@ class Arrays /** - * Tests whether at least one element in the array passes the test implemented by the - * provided callback with signature `function ($value, $key, array $array): bool`. + * Tests whether at least one element in the array passes the test implemented by the provided function, + * which has the signature `function ($value, $key, array $array): bool`. * @template K * @template V * @param iterable<K, V> $array - * @param callable(V, K, ($array is array ? array<K, V> : iterable<K, V>)): bool $callback + * @param callable(V, K, ($array is array ? array<K, V> : iterable<K, V>)): bool $predicate */ - public static function some(iterable $array, callable $callback): bool + public static function some(iterable $array, callable $predicate): bool { foreach ($array as $k => $v) { - if ($callback($v, $k, $array)) { + if ($predicate($v, $k, $array)) { return true; } } @@ -355,12 +393,12 @@ class Arrays * @template K * @template V * @param iterable<K, V> $array - * @param callable(V, K, ($array is array ? array<K, V> : iterable<K, V>)): bool $callback + * @param callable(V, K, ($array is array ? array<K, V> : iterable<K, V>)): bool $predicate */ - public static function every(iterable $array, callable $callback): bool + public static function every(iterable $array, callable $predicate): bool { foreach ($array as $k => $v) { - if (!$callback($v, $k, $array)) { + if (!$predicate($v, $k, $array)) { return false; } } @@ -370,20 +408,41 @@ class Arrays /** - * Calls $callback on all elements in the array and returns the array of return values. - * The callback has the signature `function ($value, $key, array $array): bool`. + * Returns a new array containing all key-value pairs matching the given $predicate. + * The callback has the signature `function (mixed $value, int|string $key, array $array): bool`. + * @template K of array-key + * @template V + * @param array<K, V> $array + * @param callable(V, K, array<K, V>): bool $predicate + * @return array<K, V> + */ + public static function filter(array $array, callable $predicate): array + { + $res = []; + foreach ($array as $k => $v) { + if ($predicate($v, $k, $array)) { + $res[$k] = $v; + } + } + return $res; + } + + + /** + * Returns an array containing the original keys and results of applying the given transform function to each element. + * The function has signature `function ($value, $key, array $array): mixed`. * @template K of array-key * @template V * @template R * @param iterable<K, V> $array - * @param callable(V, K, ($array is array ? array<K, V> : iterable<K, V>)): R $callback + * @param callable(V, K, ($array is array ? array<K, V> : iterable<K, V>)): R $transformer * @return array<K, R> */ - public static function map(iterable $array, callable $callback): array + public static function map(iterable $array, callable $transformer): array { $res = []; foreach ($array as $k => $v) { - $res[$k] = $callback($v, $k, $array); + $res[$k] = $transformer($v, $k, $array); } return $res; diff --git a/vendor/nette/utils/src/Utils/Image.php b/vendor/nette/utils/src/Utils/Image.php index ce2cb50e..eb728f62 100644 --- a/vendor/nette/utils/src/Utils/Image.php +++ b/vendor/nette/utils/src/Utils/Image.php @@ -320,6 +320,21 @@ class Image } + /** @return ImageType[] */ + public static function getSupportedTypes(): array + { + $flag = imagetypes(); + return array_filter([ + $flag & IMG_GIF ? ImageType::GIF : null, + $flag & IMG_JPG ? ImageType::JPEG : null, + $flag & IMG_PNG ? ImageType::PNG : null, + $flag & IMG_WEBP ? ImageType::WEBP : null, + $flag & 256 ? ImageType::AVIF : null, // IMG_AVIF + $flag & IMG_BMP ? ImageType::BMP : null, + ]); + } + + /** * Wraps GD image. */ diff --git a/vendor/nette/utils/src/Utils/Iterables.php b/vendor/nette/utils/src/Utils/Iterables.php new file mode 100644 index 00000000..a2a0b53e --- /dev/null +++ b/vendor/nette/utils/src/Utils/Iterables.php @@ -0,0 +1,159 @@ +<?php + +/** + * This file is part of the Nette Framework (https://nette.org) + * Copyright (c) 2004 David Grudl (https://davidgrudl.com) + */ + +declare(strict_types=1); + +namespace Nette\Utils; + +use Nette; + + +/** + * Utilities for iterables. + */ +final class Iterables +{ + use Nette\StaticClass; + + /** + * Tests for the presence of value. + */ + public static function contains(iterable $iterable, mixed $value): bool + { + foreach ($iterable as $v) { + if ($v === $value) { + return true; + } + } + return false; + } + + + /** + * Tests for the presence of key. + */ + public static function containsKey(iterable $iterable, mixed $key): bool + { + foreach ($iterable as $k => $v) { + if ($k === $key) { + return true; + } + } + return false; + } + + + /** + * Returns the first item (matching the specified predicate if given). If there is no such item, it returns result of invoking $else or null. + * The $predicate has the signature `function (mixed $value, mixed $key, iterable $iterable): bool`. + * @template T + * @param iterable<T> $iterable + * @return ?T + */ + public static function first(iterable $iterable, ?callable $predicate = null, ?callable $else = null): mixed + { + foreach ($iterable as $k => $v) { + if (!$predicate || $predicate($v, $k, $iterable)) { + return $v; + } + } + return $else ? $else() : null; + } + + + /** + * Returns the key of first item (matching the specified predicate if given). If there is no such item, it returns result of invoking $else or null. + * The $predicate has the signature `function (mixed $value, mixed $key, iterable $iterable): bool`. + * @template T + * @param iterable<T, mixed> $iterable + * @return ?T + */ + public static function firstKey(iterable $iterable, ?callable $predicate = null, ?callable $else = null): mixed + { + foreach ($iterable as $k => $v) { + if (!$predicate || $predicate($v, $k, $iterable)) { + return $k; + } + } + return $else ? $else() : null; + } + + + /** + * Tests whether at least one element in the iterator passes the test implemented by the + * provided callback with signature `function (mixed $value, mixed $key, iterable $iterable): bool`. + * @template K + * @template V + * @param iterable<K, V> $iterable + * @param callable(V, K, iterable<K, V>): bool $predicate + */ + public static function some(iterable $iterable, callable $predicate): bool + { + foreach ($iterable as $k => $v) { + if ($predicate($v, $k, $iterable)) { + return true; + } + } + return false; + } + + + /** + * Tests whether all elements in the iterator pass the test implemented by the provided function, + * which has the signature `function (mixed $value, mixed $key, iterable $iterable): bool`. + * @template K + * @template V + * @param iterable<K, V> $iterable + * @param callable(V, K, iterable<K, V>): bool $predicate + */ + public static function every(iterable $iterable, callable $predicate): bool + { + foreach ($iterable as $k => $v) { + if (!$predicate($v, $k, $iterable)) { + return false; + } + } + return true; + } + + + /** + * Iterator that filters elements according to a given $predicate. Maintains original keys. + * The callback has the signature `function (mixed $value, mixed $key, iterable $iterable): bool`. + * @template K + * @template V + * @param iterable<K, V> $iterable + * @param callable(V, K, iterable<K, V>): bool $predicate + * @return \Generator<K, V> + */ + public static function filter(iterable $iterable, callable $predicate): \Generator + { + foreach ($iterable as $k => $v) { + if ($predicate($v, $k, $iterable)) { + yield $k => $v; + } + } + } + + + /** + * Iterator that transforms values by calling $transformer. Maintains original keys. + * The callback has the signature `function (mixed $value, mixed $key, iterable $iterable): bool`. + * @template K + * @template V + * @template R + * @param iterable<K, V> $iterable + * @param callable(V, K, iterable<K, V>): R $transformer + * @return \Generator<K, R> + */ + public static function map(iterable $iterable, callable $transformer): \Generator + { + foreach ($iterable as $k => $v) { + yield $k => $transformer($v, $k, $iterable); + } + } +} diff --git a/vendor/nette/utils/src/Utils/Random.php b/vendor/nette/utils/src/Utils/Random.php index d8ebcdc7..b14fbd55 100644 --- a/vendor/nette/utils/src/Utils/Random.php +++ b/vendor/nette/utils/src/Utils/Random.php @@ -10,6 +10,7 @@ declare(strict_types=1); namespace Nette\Utils; use Nette; +use Random\Randomizer; /** @@ -37,6 +38,8 @@ final class Random throw new Nette\InvalidArgumentException('Length must be greater than zero.'); } elseif ($chLen < 2) { throw new Nette\InvalidArgumentException('Character list must contain at least two chars.'); + } elseif (PHP_VERSION_ID >= 80300) { + return (new Randomizer)->getBytesFromString($charlist, $length); } $res = ''; diff --git a/vendor/nette/utils/src/Utils/Strings.php b/vendor/nette/utils/src/Utils/Strings.php index 2a649ea7..1615b3e8 100644 --- a/vendor/nette/utils/src/Utils/Strings.php +++ b/vendor/nette/utils/src/Utils/Strings.php @@ -21,7 +21,7 @@ class Strings { use Nette\StaticClass; - public const TrimCharacters = " \t\n\r\0\x0B\u{A0}"; + public const TrimCharacters = " \t\n\r\0\x0B\u{A0}\u{2000}\u{2001}\u{2002}\u{2003}\u{2004}\u{2005}\u{2006}\u{2007}\u{2008}\u{2009}\u{200A}\u{200B}"; /** @deprecated use Strings::TrimCharacters */ public const TRIM_CHARACTERS = self::TrimCharacters; diff --git a/vendor/nikic/php-parser/.php-cs-fixer.dist.php b/vendor/nikic/php-parser/.php-cs-fixer.dist.php new file mode 100644 index 00000000..314307ef --- /dev/null +++ b/vendor/nikic/php-parser/.php-cs-fixer.dist.php @@ -0,0 +1,31 @@ +<?php + +$finder = PhpCsFixer\Finder::create() + ->exclude('PhpParser/Parser') + ->in(__DIR__ . '/lib') + ->in(__DIR__ . '/test') + ->in(__DIR__ . '/grammar') +; + +$config = new PhpCsFixer\Config(); +return $config->setRiskyAllowed(true) + ->setRules([ + '@PSR12' => true, + // We use PSR12 with consistent brace placement. + 'curly_braces_position' => [ + 'functions_opening_brace' => 'same_line', + 'classes_opening_brace' => 'same_line', + ], + // declare(strict_types=1) on the same line as <?php. + 'blank_line_after_opening_tag' => false, + 'declare_strict_types' => true, + // Keep argument formatting for now. + 'method_argument_space' => ['on_multiline' => 'ignore'], + 'phpdoc_align' => ['align' => 'left'], + 'phpdoc_trim' => true, + 'no_empty_phpdoc' => true, + 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], + 'no_extra_blank_lines' => true, + ]) + ->setFinder($finder) +; diff --git a/vendor/nikic/php-parser/Makefile b/vendor/nikic/php-parser/Makefile new file mode 100644 index 00000000..9a7bdf2d --- /dev/null +++ b/vendor/nikic/php-parser/Makefile @@ -0,0 +1,10 @@ +.PHONY: phpstan php-cs-fixer + +tools/vendor: + composer install -d tools + +phpstan: tools/vendor + tools/vendor/bin/phpstan + +php-cs-fixer: tools/vendor + tools/vendor/bin/php-cs-fixer fix diff --git a/vendor/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md index 36de23cd..7555838e 100644 --- a/vendor/nikic/php-parser/README.md +++ b/vendor/nikic/php-parser/README.md @@ -3,24 +3,24 @@ PHP Parser [![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master) -This is a PHP 5.2 to PHP 8.2 parser written in PHP. Its purpose is to simplify static code analysis and +This is a PHP parser written in PHP. Its purpose is to simplify static code analysis and manipulation. -[**Documentation for version 4.x**][doc_4_x] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.2). +[**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x). -[Documentation for version 3.x][doc_3_x] (unsupported; for running on PHP >= 5.5; for parsing PHP 5.2 to PHP 7.2). +[Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 8.3). Features -------- The main features provided by this library are: - * Parsing PHP 5, PHP 7, and PHP 8 code into an abstract syntax tree (AST). + * Parsing PHP 7, and PHP 8 code into an abstract syntax tree (AST). * Invalid code can be parsed into a partial AST. * The AST contains accurate location information. * Dumping the AST in human-readable form. * Converting an AST back to PHP code. - * Experimental: Formatting can be preserved for partially changed ASTs. + * Formatting can be preserved for partially changed ASTs. * Infrastructure to traverse and modify ASTs. * Resolution of namespaced names. * Evaluation of constant expressions. @@ -51,7 +51,7 @@ function test($foo) } CODE; -$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); +$parser = (new ParserFactory())->createForNewestSupportedVersion(); try { $ast = $parser->parse($code); } catch (Error $error) { @@ -68,12 +68,17 @@ This dumps an AST looking something like this: ``` array( 0: Stmt_Function( + attrGroups: array( + ) byRef: false name: Identifier( name: test ) params: array( 0: Param( + attrGroups: array( + ) + flags: 0 type: null byRef: false variadic: false @@ -88,12 +93,11 @@ array( 0: Stmt_Expression( expr: Expr_FuncCall( name: Name( - parts: array( - 0: var_dump - ) + name: var_dump ) args: array( 0: Arg( + name: null value: Expr_Variable( name: foo ) @@ -135,12 +139,16 @@ This gives us an AST where the `Function_::$stmts` are empty: ``` array( 0: Stmt_Function( + attrGroups: array( + ) byRef: false name: Identifier( name: test ) params: array( 0: Param( + attrGroups: array( + ) type: null byRef: false variadic: false @@ -203,9 +211,8 @@ Component documentation: * [AST builders](doc/component/AST_builders.markdown) * Fluent builders for AST nodes * [Lexer](doc/component/Lexer.markdown) - * Lexer options - * Token and file positions for nodes - * Custom attributes + * Emulation + * Tokens, positions and attributes * [Error handling](doc/component/Error_handling.markdown) * Column information for errors * Error recovery (parsing of syntactically incorrect code) @@ -223,3 +230,4 @@ Component documentation: [doc_3_x]: https://github.com/nikic/PHP-Parser/tree/3.x/doc [doc_4_x]: https://github.com/nikic/PHP-Parser/tree/4.x/doc + [doc_master]: https://github.com/nikic/PHP-Parser/tree/master/doc diff --git a/vendor/nikic/php-parser/bin/php-parse b/vendor/nikic/php-parser/bin/php-parse index bb3e46df..fc44f234 100644 --- a/vendor/nikic/php-parser/bin/php-parse +++ b/vendor/nikic/php-parser/bin/php-parse @@ -26,13 +26,7 @@ if (empty($files)) { showHelp("Must specify at least one file."); } -$lexer = new PhpParser\Lexer\Emulative(['usedAttributes' => [ - 'startLine', 'endLine', 'startFilePos', 'endFilePos', 'comments' -]]); -$parser = (new PhpParser\ParserFactory)->create( - PhpParser\ParserFactory::PREFER_PHP7, - $lexer -); +$parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']); $dumper = new PhpParser\NodeDumper([ 'dumpComments' => true, 'dumpPositions' => $attributes['with-positions'], @@ -43,7 +37,10 @@ $traverser = new PhpParser\NodeTraverser(); $traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver); foreach ($files as $file) { - if (strpos($file, '<?php') === 0) { + if ($file === '-') { + $code = file_get_contents('php://stdin'); + fwrite(STDERR, "====> Stdin:\n"); + } else if (strpos($file, '<?php') === 0) { $code = $file; fwrite(STDERR, "====> Code $code\n"); } else { @@ -108,7 +105,7 @@ function showHelp($error = '') { if ($error) { fwrite(STDERR, $error . "\n\n"); } - fwrite($error ? STDERR : STDOUT, <<<OUTPUT + fwrite($error ? STDERR : STDOUT, <<<'OUTPUT' Usage: php-parse [operations] file1.php [file2.php ...] or: php-parse [operations] "<?php code" Turn PHP source code into an abstract syntax tree. @@ -123,6 +120,7 @@ Operations is a list of the following options (--dump by default): -c, --with-column-info Show column-numbers for errors (if available) -P, --with-positions Show positions in node dumps -r, --with-recovery Use parsing with error recovery + --version=VERSION Target specific PHP version (default: newest) -h, --help Display this page Example: @@ -143,6 +141,7 @@ function parseArgs($args) { 'with-column-info' => false, 'with-positions' => false, 'with-recovery' => false, + 'version' => PhpParser\PhpVersion::getNewestSupported(), ]; array_shift($args); @@ -193,7 +192,9 @@ function parseArgs($args) { $parseOptions = false; break; default: - if ($arg[0] === '-') { + if (preg_match('/^--version=(.*)$/', $arg, $matches)) { + $attributes['version'] = PhpParser\PhpVersion::fromString($matches[1]); + } elseif ($arg[0] === '-' && \strlen($arg[0]) > 1) { showHelp("Invalid operation $arg."); } else { $files[] = $arg; diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json index 2fd064a2..b4b1bca7 100644 --- a/vendor/nikic/php-parser/composer.json +++ b/vendor/nikic/php-parser/composer.json @@ -13,16 +13,18 @@ } ], "require": { - "php": ">=7.0", - "ext-tokenizer": "*" + "php": ">=7.4", + "ext-tokenizer": "*", + "ext-json": "*", + "ext-ctype": "*" }, "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", "ircmaxell/php-yacc": "^0.0.7" }, "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder.php b/vendor/nikic/php-parser/lib/PhpParser/Builder.php index 26d8921e..d6aa124c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder.php @@ -2,12 +2,11 @@ namespace PhpParser; -interface Builder -{ +interface Builder { /** * Returns the built node. * * @return Node The built node */ - public function getNode() : Node; + public function getNode(): Node; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php index a7fe129b..fa5dc10e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php @@ -6,26 +6,28 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Const_; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class ClassConst implements PhpParser\Builder -{ - protected $flags = 0; - protected $attributes = []; - protected $constants = []; +class ClassConst implements PhpParser\Builder { + protected int $flags = 0; + /** @var array<string, mixed> */ + protected array $attributes = []; + /** @var list<Const_> */ + protected array $constants = []; - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; - /** @var Identifier|Node\Name|Node\ComplexType */ - protected $type; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; + /** @var Identifier|Node\Name|Node\ComplexType|null */ + protected ?Node $type = null; /** * Creates a class constant builder * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value */ public function __construct($name, $value) { @@ -35,7 +37,7 @@ class ClassConst implements PhpParser\Builder /** * Add another constant to const group * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value * * @return $this The builder instance (for fluid interface) @@ -52,7 +54,7 @@ class ClassConst implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -63,7 +65,7 @@ class ClassConst implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -74,7 +76,7 @@ class ClassConst implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -85,7 +87,7 @@ class ClassConst implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); return $this; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php index 35b54d04..6f394315 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Class_.php @@ -4,25 +4,27 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Class_ extends Declaration -{ - protected $name; - - protected $extends = null; - protected $implements = []; - protected $flags = 0; - - protected $uses = []; - protected $constants = []; - protected $properties = []; - protected $methods = []; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Class_ extends Declaration { + protected string $name; + protected ?Name $extends = null; + /** @var list<Name> */ + protected array $implements = []; + protected int $flags = 0; + /** @var list<Stmt\TraitUse> */ + protected array $uses = []; + /** @var list<Stmt\ClassConst> */ + protected array $constants = []; + /** @var list<Stmt\Property> */ + protected array $properties = []; + /** @var list<Stmt\ClassMethod> */ + protected array $methods = []; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates a class builder. @@ -67,7 +69,7 @@ class Class_ extends Declaration * @return $this The builder instance (for fluid interface) */ public function makeAbstract() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::ABSTRACT); return $this; } @@ -78,13 +80,18 @@ class Class_ extends Declaration * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::FINAL); return $this; } + /** + * Makes the class readonly. + * + * @return $this The builder instance (for fluid interface) + */ public function makeReadonly() { - $this->flags = BuilderHelpers::addClassModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); + $this->flags = BuilderHelpers::addClassModifier($this->flags, Modifiers::READONLY); return $this; } @@ -99,20 +106,18 @@ class Class_ extends Declaration public function addStmt($stmt) { $stmt = BuilderHelpers::normalizeNode($stmt); - $targets = [ - Stmt\TraitUse::class => &$this->uses, - Stmt\ClassConst::class => &$this->constants, - Stmt\Property::class => &$this->properties, - Stmt\ClassMethod::class => &$this->methods, - ]; - - $class = \get_class($stmt); - if (!isset($targets[$class])) { + if ($stmt instanceof Stmt\Property) { + $this->properties[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - $targets[$class][] = $stmt; - return $this; } @@ -134,7 +139,7 @@ class Class_ extends Declaration * * @return Stmt\Class_ The built class node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Class_($this->name, [ 'flags' => $this->flags, 'extends' => $this->extends, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php index 83094992..488b7213 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php @@ -5,16 +5,23 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; -abstract class Declaration implements PhpParser\Builder -{ - protected $attributes = []; +abstract class Declaration implements PhpParser\Builder { + /** @var array<string, mixed> */ + protected array $attributes = []; + /** + * Adds a statement. + * + * @param PhpParser\Node\Stmt|PhpParser\Builder $stmt The statement to add + * + * @return $this The builder instance (for fluid interface) + */ abstract public function addStmt($stmt); /** * Adds multiple statements. * - * @param array $stmts The statements to add + * @param (PhpParser\Node\Stmt|PhpParser\Builder)[] $stmts The statements to add * * @return $this The builder instance (for fluid interface) */ diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php index accc5166..04058bf5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/EnumCase.php @@ -10,19 +10,21 @@ use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class EnumCase implements PhpParser\Builder -{ +class EnumCase implements PhpParser\Builder { + /** @var Identifier|string */ protected $name; - protected $value = null; - protected $attributes = []; + /** @var ?Node\Expr */ + protected ?Node\Expr $value = null; + /** @var array<string, mixed> */ + protected array $attributes = []; - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates an enum case builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name */ public function __construct($name) { $this->name = $name; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php index be7eef95..c00df03f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Enum_.php @@ -9,20 +9,21 @@ use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Enum_ extends Declaration -{ - protected $name; - protected $scalarType = null; - - protected $implements = []; - - protected $uses = []; - protected $enumCases = []; - protected $constants = []; - protected $methods = []; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Enum_ extends Declaration { + protected string $name; + protected ?Identifier $scalarType = null; + /** @var list<Name> */ + protected array $implements = []; + /** @var list<Stmt\TraitUse> */ + protected array $uses = []; + /** @var list<Stmt\EnumCase> */ + protected array $enumCases = []; + /** @var list<Stmt\ClassConst> */ + protected array $constants = []; + /** @var list<Stmt\ClassMethod> */ + protected array $methods = []; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates an enum builder. @@ -36,7 +37,7 @@ class Enum_ extends Declaration /** * Sets the scalar type. * - * @param string|Identifier $type + * @param string|Identifier $scalarType * * @return $this */ @@ -71,20 +72,18 @@ class Enum_ extends Declaration public function addStmt($stmt) { $stmt = BuilderHelpers::normalizeNode($stmt); - $targets = [ - Stmt\TraitUse::class => &$this->uses, - Stmt\EnumCase::class => &$this->enumCases, - Stmt\ClassConst::class => &$this->constants, - Stmt\ClassMethod::class => &$this->methods, - ]; - - $class = \get_class($stmt); - if (!isset($targets[$class])) { + if ($stmt instanceof Stmt\EnumCase) { + $this->enumCases[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassMethod) { + $this->methods[] = $stmt; + } elseif ($stmt instanceof Stmt\TraitUse) { + $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; + } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } - $targets[$class][] = $stmt; - return $this; } @@ -106,7 +105,7 @@ class Enum_ extends Declaration * * @return Stmt\Enum_ The built enum node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Enum_($this->name, [ 'scalarType' => $this->scalarType, 'implements' => $this->implements, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php index 98ea9d33..ff79cb6b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php @@ -5,13 +5,13 @@ namespace PhpParser\Builder; use PhpParser\BuilderHelpers; use PhpParser\Node; -abstract class FunctionLike extends Declaration -{ - protected $returnByRef = false; - protected $params = []; +abstract class FunctionLike extends Declaration { + protected bool $returnByRef = false; + /** @var Node\Param[] */ + protected array $params = []; - /** @var string|Node\Name|Node\NullableType|null */ - protected $returnType = null; + /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ + protected ?Node $returnType = null; /** * Make the function return by reference. @@ -46,7 +46,7 @@ abstract class FunctionLike extends Declaration /** * Adds multiple parameters. * - * @param array $params The parameters to add + * @param (Node\Param|Param)[] $params The parameters to add * * @return $this The builder instance (for fluid interface) */ diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php index 1cd73c0d..48f5f693 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php @@ -7,13 +7,13 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Function_ extends FunctionLike -{ - protected $name; - protected $stmts = []; +class Function_ extends FunctionLike { + protected string $name; + /** @var list<Stmt> */ + protected array $stmts = []; - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates a function builder. @@ -55,7 +55,7 @@ class Function_ extends FunctionLike * * @return Stmt\Function_ The built function node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Function_($this->name, [ 'byRef' => $this->returnByRef, 'params' => $this->params, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php index 7806e85f..13dd3f7f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php @@ -8,15 +8,16 @@ use PhpParser\Node; use PhpParser\Node\Name; use PhpParser\Node\Stmt; -class Interface_ extends Declaration -{ - protected $name; - protected $extends = []; - protected $constants = []; - protected $methods = []; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Interface_ extends Declaration { + protected string $name; + /** @var list<Name> */ + protected array $extends = []; + /** @var list<Stmt\ClassConst> */ + protected array $constants = []; + /** @var list<Stmt\ClassMethod> */ + protected array $methods = []; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates an interface builder. @@ -83,7 +84,7 @@ class Interface_ extends Declaration * * @return Stmt\Interface_ The built interface node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Interface_($this->name, [ 'extends' => $this->extends, 'stmts' => array_merge($this->constants, $this->methods), diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php index 232d7cb8..8358dbe3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php @@ -4,19 +4,20 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Method extends FunctionLike -{ - protected $name; - protected $flags = 0; +class Method extends FunctionLike { + protected string $name; - /** @var array|null */ - protected $stmts = []; + protected int $flags = 0; - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + /** @var list<Stmt>|null */ + protected ?array $stmts = []; + + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates a method builder. @@ -33,7 +34,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -44,7 +45,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -55,7 +56,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -66,7 +67,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); return $this; } @@ -81,7 +82,7 @@ class Method extends FunctionLike throw new \LogicException('Cannot make method with statements abstract'); } - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_ABSTRACT); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::ABSTRACT); $this->stmts = null; // abstract methods don't have statements return $this; @@ -93,7 +94,7 @@ class Method extends FunctionLike * @return $this The builder instance (for fluid interface) */ public function makeFinal() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_FINAL); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::FINAL); return $this; } @@ -133,7 +134,7 @@ class Method extends FunctionLike * * @return Stmt\ClassMethod The built method node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\ClassMethod($this->name, [ 'flags' => $this->flags, 'byRef' => $this->returnByRef, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php index 1c751e16..80fe6f84 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php @@ -7,10 +7,10 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Namespace_ extends Declaration -{ - private $name; - private $stmts = []; +class Namespace_ extends Declaration { + private ?Node\Name $name; + /** @var Stmt[] */ + private array $stmts = []; /** * Creates a namespace builder. @@ -39,7 +39,7 @@ class Namespace_ extends Declaration * * @return Stmt\Namespace_ The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Namespace_($this->name, $this->stmts, $this->attributes); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php index 69f35332..f439e876 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php @@ -4,25 +4,19 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; -class Param implements PhpParser\Builder -{ - protected $name; - - protected $default = null; - - /** @var Node\Identifier|Node\Name|Node\NullableType|null */ - protected $type = null; - - protected $byRef = false; - - protected $variadic = false; - - protected $flags = 0; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Param implements PhpParser\Builder { + protected string $name; + protected ?Node\Expr $default = null; + /** @var Node\Identifier|Node\Name|Node\ComplexType|null */ + protected ?Node $type = null; + protected bool $byRef = false; + protected int $flags = 0; + protected bool $variadic = false; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates a parameter builder. @@ -62,19 +56,6 @@ class Param implements PhpParser\Builder return $this; } - /** - * Sets type for the parameter. - * - * @param string|Node\Name|Node\Identifier|Node\ComplexType $type Parameter type - * - * @return $this The builder instance (for fluid interface) - * - * @deprecated Use setType() instead - */ - public function setTypeHint($type) { - return $this->setType($type); - } - /** * Make the parameter accept the value by reference. * @@ -103,7 +84,7 @@ class Param implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Node\Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -114,7 +95,7 @@ class Param implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Node\Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -125,7 +106,7 @@ class Param implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Node\Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -136,7 +117,7 @@ class Param implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Node\Stmt\Class_::MODIFIER_READONLY); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); return $this; } @@ -159,7 +140,7 @@ class Param implements PhpParser\Builder * * @return Node\Param The built parameter node */ - public function getNode() : Node { + public function getNode(): Node { return new Node\Param( new Node\Expr\Variable($this->name), $this->default, $this->type, $this->byRef, $this->variadic, [], $this->flags, $this->attributeGroups diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php index 68e31856..3fc96d98 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php @@ -4,25 +4,25 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Stmt; use PhpParser\Node\ComplexType; -class Property implements PhpParser\Builder -{ - protected $name; +class Property implements PhpParser\Builder { + protected string $name; - protected $flags = 0; - protected $default = null; - protected $attributes = []; + protected int $flags = 0; - /** @var null|Identifier|Name|NullableType */ - protected $type; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; + protected ?Node\Expr $default = null; + /** @var array<string, mixed> */ + protected array $attributes = []; + /** @var null|Identifier|Name|ComplexType */ + protected ?Node $type = null; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates a property builder. @@ -39,7 +39,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PUBLIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PUBLIC); return $this; } @@ -50,7 +50,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PROTECTED); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PROTECTED); return $this; } @@ -61,7 +61,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_PRIVATE); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::PRIVATE); return $this; } @@ -72,7 +72,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeStatic() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_STATIC); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::STATIC); return $this; } @@ -83,7 +83,7 @@ class Property implements PhpParser\Builder * @return $this The builder instance (for fluid interface) */ public function makeReadonly() { - $this->flags = BuilderHelpers::addModifier($this->flags, Stmt\Class_::MODIFIER_READONLY); + $this->flags = BuilderHelpers::addModifier($this->flags, Modifiers::READONLY); return $this; } @@ -147,11 +147,11 @@ class Property implements PhpParser\Builder * * @return Stmt\Property The built property node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Property( - $this->flags !== 0 ? $this->flags : Stmt\Class_::MODIFIER_PUBLIC, + $this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [ - new Stmt\PropertyProperty($this->name, $this->default) + new Node\PropertyItem($this->name, $this->default) ], $this->attributes, $this->type, diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php index 311e8cd7..cf21c821 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUse.php @@ -7,10 +7,11 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class TraitUse implements Builder -{ - protected $traits = []; - protected $adaptations = []; +class TraitUse implements Builder { + /** @var Node\Name[] */ + protected array $traits = []; + /** @var Stmt\TraitUseAdaptation[] */ + protected array $adaptations = []; /** * Creates a trait use builder. @@ -58,7 +59,7 @@ class TraitUse implements Builder * * @return Node The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\TraitUse($this->traits, $this->adaptations); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php index eb6c0b62..fee09583 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php @@ -4,43 +4,40 @@ namespace PhpParser\Builder; use PhpParser\Builder; use PhpParser\BuilderHelpers; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Stmt; -class TraitUseAdaptation implements Builder -{ - const TYPE_UNDEFINED = 0; - const TYPE_ALIAS = 1; - const TYPE_PRECEDENCE = 2; +class TraitUseAdaptation implements Builder { + private const TYPE_UNDEFINED = 0; + private const TYPE_ALIAS = 1; + private const TYPE_PRECEDENCE = 2; - /** @var int Type of building adaptation */ - protected $type; - - protected $trait; - protected $method; - - protected $modifier = null; - protected $alias = null; - - protected $insteadof = []; + protected int $type; + protected ?Node\Name $trait; + protected Node\Identifier $method; + protected ?int $modifier = null; + protected ?Node\Identifier $alias = null; + /** @var Node\Name[] */ + protected array $insteadof = []; /** * Creates a trait use adaptation builder. * - * @param Node\Name|string|null $trait Name of adaptated trait - * @param Node\Identifier|string $method Name of adaptated method + * @param Node\Name|string|null $trait Name of adapted trait + * @param Node\Identifier|string $method Name of adapted method */ public function __construct($trait, $method) { $this->type = self::TYPE_UNDEFINED; - $this->trait = is_null($trait)? null: BuilderHelpers::normalizeName($trait); + $this->trait = is_null($trait) ? null : BuilderHelpers::normalizeName($trait); $this->method = BuilderHelpers::normalizeIdentifier($method); } /** * Sets alias of method. * - * @param Node\Identifier|string $alias Alias for adaptated method + * @param Node\Identifier|string $alias Alias for adapted method * * @return $this The builder instance (for fluid interface) */ @@ -53,37 +50,37 @@ class TraitUseAdaptation implements Builder throw new \LogicException('Cannot set alias for not alias adaptation buider'); } - $this->alias = $alias; + $this->alias = BuilderHelpers::normalizeIdentifier($alias); return $this; } /** - * Sets adaptated method public. + * Sets adapted method public. * * @return $this The builder instance (for fluid interface) */ public function makePublic() { - $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC); + $this->setModifier(Modifiers::PUBLIC); return $this; } /** - * Sets adaptated method protected. + * Sets adapted method protected. * * @return $this The builder instance (for fluid interface) */ public function makeProtected() { - $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED); + $this->setModifier(Modifiers::PROTECTED); return $this; } /** - * Sets adaptated method private. + * Sets adapted method private. * * @return $this The builder instance (for fluid interface) */ public function makePrivate() { - $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE); + $this->setModifier(Modifiers::PRIVATE); return $this; } @@ -114,7 +111,7 @@ class TraitUseAdaptation implements Builder return $this; } - protected function setModifier(int $modifier) { + protected function setModifier(int $modifier): void { if ($this->type === self::TYPE_UNDEFINED) { $this->type = self::TYPE_ALIAS; } @@ -135,7 +132,7 @@ class TraitUseAdaptation implements Builder * * @return Node The built node */ - public function getNode() : Node { + public function getNode(): Node { switch ($this->type) { case self::TYPE_ALIAS: return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php index 97f32f98..ffa1bd5c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php @@ -7,15 +7,18 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Trait_ extends Declaration -{ - protected $name; - protected $uses = []; - protected $properties = []; - protected $methods = []; - - /** @var Node\AttributeGroup[] */ - protected $attributeGroups = []; +class Trait_ extends Declaration { + protected string $name; + /** @var list<Stmt\TraitUse> */ + protected array $uses = []; + /** @var list<Stmt\ClassConst> */ + protected array $constants = []; + /** @var list<Stmt\Property> */ + protected array $properties = []; + /** @var list<Stmt\ClassMethod> */ + protected array $methods = []; + /** @var list<Node\AttributeGroup> */ + protected array $attributeGroups = []; /** * Creates an interface builder. @@ -42,6 +45,8 @@ class Trait_ extends Declaration $this->methods[] = $stmt; } elseif ($stmt instanceof Stmt\TraitUse) { $this->uses[] = $stmt; + } elseif ($stmt instanceof Stmt\ClassConst) { + $this->constants[] = $stmt; } else { throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType())); } @@ -67,10 +72,10 @@ class Trait_ extends Declaration * * @return Stmt\Trait_ The built interface node */ - public function getNode() : PhpParser\Node { + public function getNode(): PhpParser\Node { return new Stmt\Trait_( $this->name, [ - 'stmts' => array_merge($this->uses, $this->properties, $this->methods), + 'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods), 'attrGroups' => $this->attributeGroups, ], $this->attributes ); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php index 4bd3d12d..b82cf139 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php @@ -7,17 +7,17 @@ use PhpParser\BuilderHelpers; use PhpParser\Node; use PhpParser\Node\Stmt; -class Use_ implements Builder -{ - protected $name; - protected $type; - protected $alias = null; +class Use_ implements Builder { + protected Node\Name $name; + /** @var Stmt\Use_::TYPE_* */ + protected int $type; + protected ?string $alias = null; /** * Creates a name use (alias) builder. * * @param Node\Name|string $name Name of the entity (namespace, class, function, constant) to alias - * @param int $type One of the Stmt\Use_::TYPE_* constants + * @param Stmt\Use_::TYPE_* $type One of the Stmt\Use_::TYPE_* constants */ public function __construct($name, int $type) { $this->name = BuilderHelpers::normalizeName($name); @@ -41,9 +41,9 @@ class Use_ implements Builder * * @return Stmt\Use_ The built node */ - public function getNode() : Node { + public function getNode(): Node { return new Stmt\Use_([ - new Stmt\UseUse($this->name, $this->alias) + new Node\UseItem($this->name, $this->alias) ], $this->type); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php index af010e02..b7efe5e9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php @@ -10,17 +10,14 @@ use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Use_; -class BuilderFactory -{ +class BuilderFactory { /** * Creates an attribute node. * * @param string|Name $name Name of the attribute - * @param array $args Attribute named arguments - * - * @return Node\Attribute + * @param array $args Attribute named arguments */ - public function attribute($name, array $args = []) : Node\Attribute { + public function attribute($name, array $args = []): Node\Attribute { return new Node\Attribute( BuilderHelpers::normalizeName($name), $this->args($args) @@ -34,7 +31,7 @@ class BuilderFactory * * @return Builder\Namespace_ The created namespace builder */ - public function namespace($name) : Builder\Namespace_ { + public function namespace($name): Builder\Namespace_ { return new Builder\Namespace_($name); } @@ -45,7 +42,7 @@ class BuilderFactory * * @return Builder\Class_ The created class builder */ - public function class(string $name) : Builder\Class_ { + public function class(string $name): Builder\Class_ { return new Builder\Class_($name); } @@ -56,7 +53,7 @@ class BuilderFactory * * @return Builder\Interface_ The created interface builder */ - public function interface(string $name) : Builder\Interface_ { + public function interface(string $name): Builder\Interface_ { return new Builder\Interface_($name); } @@ -67,7 +64,7 @@ class BuilderFactory * * @return Builder\Trait_ The created trait builder */ - public function trait(string $name) : Builder\Trait_ { + public function trait(string $name): Builder\Trait_ { return new Builder\Trait_($name); } @@ -78,7 +75,7 @@ class BuilderFactory * * @return Builder\Enum_ The created enum builder */ - public function enum(string $name) : Builder\Enum_ { + public function enum(string $name): Builder\Enum_ { return new Builder\Enum_($name); } @@ -87,21 +84,21 @@ class BuilderFactory * * @param Node\Name|string ...$traits Trait names * - * @return Builder\TraitUse The create trait use builder + * @return Builder\TraitUse The created trait use builder */ - public function useTrait(...$traits) : Builder\TraitUse { + public function useTrait(...$traits): Builder\TraitUse { return new Builder\TraitUse(...$traits); } /** * Creates a trait use adaptation builder. * - * @param Node\Name|string|null $trait Trait name + * @param Node\Name|string|null $trait Trait name * @param Node\Identifier|string $method Method name * - * @return Builder\TraitUseAdaptation The create trait use adaptation builder + * @return Builder\TraitUseAdaptation The created trait use adaptation builder */ - public function traitUseAdaptation($trait, $method = null) : Builder\TraitUseAdaptation { + public function traitUseAdaptation($trait, $method = null): Builder\TraitUseAdaptation { if ($method === null) { $method = $trait; $trait = null; @@ -117,7 +114,7 @@ class BuilderFactory * * @return Builder\Method The created method builder */ - public function method(string $name) : Builder\Method { + public function method(string $name): Builder\Method { return new Builder\Method($name); } @@ -128,7 +125,7 @@ class BuilderFactory * * @return Builder\Param The created parameter builder */ - public function param(string $name) : Builder\Param { + public function param(string $name): Builder\Param { return new Builder\Param($name); } @@ -139,7 +136,7 @@ class BuilderFactory * * @return Builder\Property The created property builder */ - public function property(string $name) : Builder\Property { + public function property(string $name): Builder\Property { return new Builder\Property($name); } @@ -150,7 +147,7 @@ class BuilderFactory * * @return Builder\Function_ The created function builder */ - public function function(string $name) : Builder\Function_ { + public function function(string $name): Builder\Function_ { return new Builder\Function_($name); } @@ -161,7 +158,7 @@ class BuilderFactory * * @return Builder\Use_ The created use builder */ - public function use($name) : Builder\Use_ { + public function use($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_NORMAL); } @@ -172,7 +169,7 @@ class BuilderFactory * * @return Builder\Use_ The created use function builder */ - public function useFunction($name) : Builder\Use_ { + public function useFunction($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_FUNCTION); } @@ -183,30 +180,30 @@ class BuilderFactory * * @return Builder\Use_ The created use const builder */ - public function useConst($name) : Builder\Use_ { + public function useConst($name): Builder\Use_ { return new Builder\Use_($name, Use_::TYPE_CONSTANT); } /** * Creates a class constant builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * @param Node\Expr|bool|null|int|float|string|array $value Value * * @return Builder\ClassConst The created use const builder */ - public function classConst($name, $value) : Builder\ClassConst { + public function classConst($name, $value): Builder\ClassConst { return new Builder\ClassConst($name, $value); } /** * Creates an enum case builder. * - * @param string|Identifier $name Name + * @param string|Identifier $name Name * * @return Builder\EnumCase The created use const builder */ - public function enumCase($name) : Builder\EnumCase { + public function enumCase($name): Builder\EnumCase { return new Builder\EnumCase($name); } @@ -214,10 +211,8 @@ class BuilderFactory * Creates node a for a literal value. * * @param Expr|bool|null|int|float|string|array $value $value - * - * @return Expr */ - public function val($value) : Expr { + public function val($value): Expr { return BuilderHelpers::normalizeValue($value); } @@ -225,10 +220,8 @@ class BuilderFactory * Creates variable node. * * @param string|Expr $name Name - * - * @return Expr\Variable */ - public function var($name) : Expr\Variable { + public function var($name): Expr\Variable { if (!\is_string($name) && !$name instanceof Expr) { throw new \LogicException('Variable name must be string or Expr'); } @@ -243,9 +236,9 @@ class BuilderFactory * * @param array $args List of arguments to normalize * - * @return Arg[] + * @return list<Arg> */ - public function args(array $args) : array { + public function args(array $args): array { $normalizedArgs = []; foreach ($args as $key => $arg) { if (!($arg instanceof Arg)) { @@ -263,11 +256,9 @@ class BuilderFactory * Creates a function call node. * * @param string|Name|Expr $name Function name - * @param array $args Function arguments - * - * @return Expr\FuncCall + * @param array $args Function arguments */ - public function funcCall($name, array $args = []) : Expr\FuncCall { + public function funcCall($name, array $args = []): Expr\FuncCall { return new Expr\FuncCall( BuilderHelpers::normalizeNameOrExpr($name), $this->args($args) @@ -277,13 +268,11 @@ class BuilderFactory /** * Creates a method call node. * - * @param Expr $var Variable the method is called on + * @param Expr $var Variable the method is called on * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - * - * @return Expr\MethodCall + * @param array $args Method arguments */ - public function methodCall(Expr $var, $name, array $args = []) : Expr\MethodCall { + public function methodCall(Expr $var, $name, array $args = []): Expr\MethodCall { return new Expr\MethodCall( $var, BuilderHelpers::normalizeIdentifierOrExpr($name), @@ -294,13 +283,11 @@ class BuilderFactory /** * Creates a static method call node. * - * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array $args Method arguments - * - * @return Expr\StaticCall + * @param string|Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array $args Method arguments */ - public function staticCall($class, $name, array $args = []) : Expr\StaticCall { + public function staticCall($class, $name, array $args = []): Expr\StaticCall { return new Expr\StaticCall( BuilderHelpers::normalizeNameOrExpr($class), BuilderHelpers::normalizeIdentifierOrExpr($name), @@ -312,11 +299,9 @@ class BuilderFactory * Creates an object creation node. * * @param string|Name|Expr $class Class name - * @param array $args Constructor arguments - * - * @return Expr\New_ + * @param array $args Constructor arguments */ - public function new($class, array $args = []) : Expr\New_ { + public function new($class, array $args = []): Expr\New_ { return new Expr\New_( BuilderHelpers::normalizeNameOrExpr($class), $this->args($args) @@ -327,22 +312,18 @@ class BuilderFactory * Creates a constant fetch node. * * @param string|Name $name Constant name - * - * @return Expr\ConstFetch */ - public function constFetch($name) : Expr\ConstFetch { + public function constFetch($name): Expr\ConstFetch { return new Expr\ConstFetch(BuilderHelpers::normalizeName($name)); } /** * Creates a property fetch node. * - * @param Expr $var Variable holding object + * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Property name - * - * @return Expr\PropertyFetch */ - public function propertyFetch(Expr $var, $name) : Expr\PropertyFetch { + public function propertyFetch(Expr $var, $name): Expr\PropertyFetch { return new Expr\PropertyFetch($var, BuilderHelpers::normalizeIdentifierOrExpr($name)); } @@ -350,9 +331,7 @@ class BuilderFactory * Creates a class constant fetch node. * * @param string|Name|Expr $class Class name - * @param string|Identifier|Expr $name Constant name - * - * @return Expr\ClassConstFetch + * @param string|Identifier|Expr $name Constant name */ public function classConstFetch($class, $name): Expr\ClassConstFetch { return new Expr\ClassConstFetch( @@ -365,10 +344,8 @@ class BuilderFactory * Creates nested Concat nodes from a list of expressions. * * @param Expr|string ...$exprs Expressions or literal strings - * - * @return Concat */ - public function concat(...$exprs) : Concat { + public function concat(...$exprs): Concat { $numExprs = count($exprs); if ($numExprs < 2) { throw new \LogicException('Expected at least two expressions'); @@ -383,9 +360,8 @@ class BuilderFactory /** * @param string|Expr $expr - * @return Expr */ - private function normalizeStringExpr($expr) : Expr { + private function normalizeStringExpr($expr): Expr { if ($expr instanceof Expr) { return $expr; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php index af6ceb99..3e41b26f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php +++ b/vendor/nikic/php-parser/lib/PhpParser/BuilderHelpers.php @@ -15,8 +15,7 @@ use PhpParser\Node\Stmt; * * @internal */ -final class BuilderHelpers -{ +final class BuilderHelpers { /** * Normalizes a node: Converts builder objects to nodes. * @@ -24,7 +23,7 @@ final class BuilderHelpers * * @return Node The normalized node */ - public static function normalizeNode($node) : Node { + public static function normalizeNode($node): Node { if ($node instanceof Builder) { return $node->getNode(); } @@ -45,7 +44,7 @@ final class BuilderHelpers * * @return Stmt The normalized statement node */ - public static function normalizeStmt($node) : Stmt { + public static function normalizeStmt($node): Stmt { $node = self::normalizeNode($node); if ($node instanceof Stmt) { return $node; @@ -65,7 +64,7 @@ final class BuilderHelpers * * @return Identifier The normalized identifier */ - public static function normalizeIdentifier($name) : Identifier { + public static function normalizeIdentifier($name): Identifier { if ($name instanceof Identifier) { return $name; } @@ -103,7 +102,7 @@ final class BuilderHelpers * * @return Name The normalized name */ - public static function normalizeName($name) : Name { + public static function normalizeName($name): Name { if ($name instanceof Name) { return $name; } @@ -219,7 +218,7 @@ final class BuilderHelpers * * @return Expr The normalized value */ - public static function normalizeValue($value) : Expr { + public static function normalizeValue($value): Expr { if ($value instanceof Node\Expr) { return $value; } @@ -237,11 +236,11 @@ final class BuilderHelpers } if (is_int($value)) { - return new Scalar\LNumber($value); + return new Scalar\Int_($value); } if (is_float($value)) { - return new Scalar\DNumber($value); + return new Scalar\Float_($value); } if (is_string($value)) { @@ -254,12 +253,12 @@ final class BuilderHelpers foreach ($value as $itemKey => $itemValue) { // for consecutive, numeric keys don't generate keys if (null !== $lastKey && ++$lastKey === $itemKey) { - $items[] = new Expr\ArrayItem( + $items[] = new Node\ArrayItem( self::normalizeValue($itemValue) ); } else { $lastKey = null; - $items[] = new Expr\ArrayItem( + $items[] = new Node\ArrayItem( self::normalizeValue($itemValue), self::normalizeValue($itemKey) ); @@ -279,7 +278,7 @@ final class BuilderHelpers * * @return Comment\Doc The normalized doc comment */ - public static function normalizeDocComment($docComment) : Comment\Doc { + public static function normalizeDocComment($docComment): Comment\Doc { if ($docComment instanceof Comment\Doc) { return $docComment; } @@ -298,8 +297,7 @@ final class BuilderHelpers * * @return Node\AttributeGroup The Attribute Group */ - public static function normalizeAttribute($attribute) : Node\AttributeGroup - { + public static function normalizeAttribute($attribute): Node\AttributeGroup { if ($attribute instanceof Node\AttributeGroup) { return $attribute; } @@ -315,12 +313,12 @@ final class BuilderHelpers * Adds a modifier and returns new modifier bitmask. * * @param int $modifiers Existing modifiers - * @param int $modifier Modifier to set + * @param int $modifier Modifier to set * * @return int New modifiers */ - public static function addModifier(int $modifiers, int $modifier) : int { - Stmt\Class_::verifyModifier($modifiers, $modifier); + public static function addModifier(int $modifiers, int $modifier): int { + Modifiers::verifyModifier($modifiers, $modifier); return $modifiers | $modifier; } @@ -328,8 +326,8 @@ final class BuilderHelpers * Adds a modifier and returns new modifier bitmask. * @return int New modifiers */ - public static function addClassModifier(int $existingModifiers, int $modifierToSet) : int { - Stmt\Class_::verifyClassModifier($existingModifiers, $modifierToSet); + public static function addClassModifier(int $existingModifiers, int $modifierToSet): int { + Modifiers::verifyClassModifier($existingModifiers, $modifierToSet); return $existingModifiers | $modifierToSet; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment.php b/vendor/nikic/php-parser/lib/PhpParser/Comment.php index 61e98d3d..17dc4c73 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Comment.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Comment.php @@ -2,23 +2,22 @@ namespace PhpParser; -class Comment implements \JsonSerializable -{ - protected $text; - protected $startLine; - protected $startFilePos; - protected $startTokenPos; - protected $endLine; - protected $endFilePos; - protected $endTokenPos; +class Comment implements \JsonSerializable { + protected string $text; + protected int $startLine; + protected int $startFilePos; + protected int $startTokenPos; + protected int $endLine; + protected int $endFilePos; + protected int $endTokenPos; /** * Constructs a comment node. * - * @param string $text Comment text (including comment delimiters like /*) - * @param int $startLine Line number the comment started on - * @param int $startFilePos File offset the comment started on - * @param int $startTokenPos Token offset the comment started on + * @param string $text Comment text (including comment delimiters like /*) + * @param int $startLine Line number the comment started on + * @param int $startFilePos File offset the comment started on + * @param int $startTokenPos Token offset the comment started on */ public function __construct( string $text, @@ -39,7 +38,7 @@ class Comment implements \JsonSerializable * * @return string The comment text (including comment delimiters like /*) */ - public function getText() : string { + public function getText(): string { return $this->text; } @@ -48,7 +47,7 @@ class Comment implements \JsonSerializable * * @return int Line number (or -1 if not available) */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->startLine; } @@ -57,7 +56,7 @@ class Comment implements \JsonSerializable * * @return int File offset (or -1 if not available) */ - public function getStartFilePos() : int { + public function getStartFilePos(): int { return $this->startFilePos; } @@ -66,7 +65,7 @@ class Comment implements \JsonSerializable * * @return int Token offset (or -1 if not available) */ - public function getStartTokenPos() : int { + public function getStartTokenPos(): int { return $this->startTokenPos; } @@ -75,7 +74,7 @@ class Comment implements \JsonSerializable * * @return int Line number (or -1 if not available) */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->endLine; } @@ -84,7 +83,7 @@ class Comment implements \JsonSerializable * * @return int File offset (or -1 if not available) */ - public function getEndFilePos() : int { + public function getEndFilePos(): int { return $this->endFilePos; } @@ -93,49 +92,16 @@ class Comment implements \JsonSerializable * * @return int Token offset (or -1 if not available) */ - public function getEndTokenPos() : int { + public function getEndTokenPos(): int { return $this->endTokenPos; } - /** - * Gets the line number the comment started on. - * - * @deprecated Use getStartLine() instead - * - * @return int Line number - */ - public function getLine() : int { - return $this->startLine; - } - - /** - * Gets the file offset the comment started on. - * - * @deprecated Use getStartFilePos() instead - * - * @return int File offset - */ - public function getFilePos() : int { - return $this->startFilePos; - } - - /** - * Gets the token offset the comment started on. - * - * @deprecated Use getStartTokenPos() instead - * - * @return int Token offset - */ - public function getTokenPos() : int { - return $this->startTokenPos; - } - /** * Gets the comment text. * * @return string The comment text (including comment delimiters like /*) */ - public function __toString() : string { + public function __toString(): string { return $this->text; } @@ -144,18 +110,19 @@ class Comment implements \JsonSerializable * * "Reformatted" here means that we try to clean up the whitespace at the * starts of the lines. This is necessary because we receive the comments - * without trailing whitespace on the first line, but with trailing whitespace + * without leading whitespace on the first line, but with leading whitespace * on all subsequent lines. * - * @return mixed|string + * Additionally, this normalizes CRLF newlines to LF newlines. */ - public function getReformattedText() { - $text = trim($this->text); + public function getReformattedText(): string { + $text = str_replace("\r\n", "\n", $this->text); $newlinePos = strpos($text, "\n"); if (false === $newlinePos) { // Single line comments don't need further processing return $text; - } elseif (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) { + } + if (preg_match('(^.*(?:\n\s+\*.*)+$)', $text)) { // Multi line comment of the type // // /* @@ -164,8 +131,9 @@ class Comment implements \JsonSerializable // */ // // is handled by replacing the whitespace sequences before the * by a single space - return preg_replace('(^\s+\*)m', ' *', $this->text); - } elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { + return preg_replace('(^\s+\*)m', ' *', $text); + } + if (preg_match('(^/\*\*?\s*\n)', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) { // Multi line comment of the type // // /* @@ -177,7 +145,8 @@ class Comment implements \JsonSerializable // */ on all lines. So if the last line is " */", then " " is removed at the // start of all lines. return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text); - } elseif (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { + } + if (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) { // Multi line comment of the type // // /* Some text. @@ -204,9 +173,9 @@ class Comment implements \JsonSerializable * @param string $str String to check * @return int Length in characters. Tabs count as single characters. */ - private function getShortestWhitespacePrefixLen(string $str) : int { + private function getShortestWhitespacePrefixLen(string $str): int { $lines = explode("\n", $str); - $shortestPrefixLen = \INF; + $shortestPrefixLen = \PHP_INT_MAX; foreach ($lines as $line) { preg_match('(^\s*)', $line, $matches); $prefixLen = strlen($matches[0]); @@ -218,10 +187,9 @@ class Comment implements \JsonSerializable } /** - * @return array - * @psalm-return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} + * @return array{nodeType:string, text:mixed, line:mixed, filePos:mixed} */ - public function jsonSerialize() : array { + public function jsonSerialize(): array { // Technically not a node, but we make it look like one anyway $type = $this instanceof Comment\Doc ? 'Comment_Doc' : 'Comment'; return [ diff --git a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php index a9db6128..bb3e9146 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php @@ -2,6 +2,5 @@ namespace PhpParser\Comment; -class Doc extends \PhpParser\Comment -{ +class Doc extends \PhpParser\Comment { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php b/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php index 49c92d59..7964058a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluationException.php @@ -1,6 +1,6 @@ -<?php +<?php declare(strict_types=1); namespace PhpParser; -class ConstExprEvaluationException extends \Exception -{} +class ConstExprEvaluationException extends \Exception { +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php b/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php index 7131c3d2..73e59fc5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ConstExprEvaluator.php @@ -1,11 +1,12 @@ -<?php +<?php declare(strict_types=1); namespace PhpParser; -use function array_merge; use PhpParser\Node\Expr; use PhpParser\Node\Scalar; +use function array_merge; + /** * Evaluates constant expressions. * @@ -25,8 +26,8 @@ use PhpParser\Node\Scalar; * point to string conversions are affected by the precision ini setting. Secondly, they are also * affected by the LC_NUMERIC locale. */ -class ConstExprEvaluator -{ +class ConstExprEvaluator { + /** @var callable|null */ private $fallbackEvaluator; /** @@ -37,8 +38,8 @@ class ConstExprEvaluator * * @param callable|null $fallbackEvaluator To call if subexpression cannot be evaluated */ - public function __construct(callable $fallbackEvaluator = null) { - $this->fallbackEvaluator = $fallbackEvaluator ?? function(Expr $expr) { + public function __construct(?callable $fallbackEvaluator = null) { + $this->fallbackEvaluator = $fallbackEvaluator ?? function (Expr $expr) { throw new ConstExprEvaluationException( "Expression of type {$expr->getType()} cannot be evaluated" ); @@ -63,7 +64,7 @@ class ConstExprEvaluator * @throws ConstExprEvaluationException if the expression cannot be evaluated or an error occurred */ public function evaluateSilently(Expr $expr) { - set_error_handler(function($num, $str, $file, $line) { + set_error_handler(function ($num, $str, $file, $line) { throw new \ErrorException($str, 0, $num, $file, $line); }); @@ -101,9 +102,10 @@ class ConstExprEvaluator return $this->evaluate($expr); } + /** @return mixed */ private function evaluate(Expr $expr) { - if ($expr instanceof Scalar\LNumber - || $expr instanceof Scalar\DNumber + if ($expr instanceof Scalar\Int_ + || $expr instanceof Scalar\Float_ || $expr instanceof Scalar\String_ ) { return $expr->value; @@ -146,7 +148,7 @@ class ConstExprEvaluator return ($this->fallbackEvaluator)($expr); } - private function evaluateArray(Expr\Array_ $expr) { + private function evaluateArray(Expr\Array_ $expr): array { $array = []; foreach ($expr->items as $item) { if (null !== $item->key) { @@ -160,6 +162,7 @@ class ConstExprEvaluator return $array; } + /** @return mixed */ private function evaluateTernary(Expr\Ternary $expr) { if (null === $expr->if) { return $this->evaluate($expr->cond) ?: $this->evaluate($expr->else); @@ -170,6 +173,7 @@ class ConstExprEvaluator : $this->evaluate($expr->else); } + /** @return mixed */ private function evaluateBinaryOp(Expr\BinaryOp $expr) { if ($expr instanceof Expr\BinaryOp\Coalesce && $expr->left instanceof Expr\ArrayDimFetch @@ -216,6 +220,7 @@ class ConstExprEvaluator throw new \Exception('Should not happen'); } + /** @return mixed */ private function evaluateConstFetch(Expr\ConstFetch $expr) { $name = $expr->name->toLowerString(); switch ($name) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Error.php index d1fb959d..02feace0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Error.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Error.php @@ -2,25 +2,20 @@ namespace PhpParser; -class Error extends \RuntimeException -{ - protected $rawMessage; - protected $attributes; +class Error extends \RuntimeException { + protected string $rawMessage; + /** @var array<string, mixed> */ + protected array $attributes; /** * Creates an Exception signifying a parse error. * - * @param string $message Error message - * @param array|int $attributes Attributes of node/token where error occurred - * (or start line of error -- deprecated) + * @param string $message Error message + * @param array<string, mixed> $attributes Attributes of node/token where error occurred */ - public function __construct(string $message, $attributes = []) { + public function __construct(string $message, array $attributes = []) { $this->rawMessage = $message; - if (is_array($attributes)) { - $this->attributes = $attributes; - } else { - $this->attributes = ['startLine' => $attributes]; - } + $this->attributes = $attributes; $this->updateMessage(); } @@ -29,7 +24,7 @@ class Error extends \RuntimeException * * @return string Error message */ - public function getRawMessage() : string { + public function getRawMessage(): string { return $this->rawMessage; } @@ -38,7 +33,7 @@ class Error extends \RuntimeException * * @return int Error start line */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -47,25 +42,25 @@ class Error extends \RuntimeException * * @return int Error end line */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->attributes['endLine'] ?? -1; } /** * Gets the attributes of the node/token the error occurred at. * - * @return array + * @return array<string, mixed> */ - public function getAttributes() : array { + public function getAttributes(): array { return $this->attributes; } /** * Sets the attributes of the node/token the error occurred at. * - * @param array $attributes + * @param array<string, mixed> $attributes */ - public function setAttributes(array $attributes) { + public function setAttributes(array $attributes): void { $this->attributes = $attributes; $this->updateMessage(); } @@ -75,7 +70,7 @@ class Error extends \RuntimeException * * @param string $message Error message */ - public function setRawMessage(string $message) { + public function setRawMessage(string $message): void { $this->rawMessage = $message; $this->updateMessage(); } @@ -85,7 +80,7 @@ class Error extends \RuntimeException * * @param int $line Error start line */ - public function setStartLine(int $line) { + public function setStartLine(int $line): void { $this->attributes['startLine'] = $line; $this->updateMessage(); } @@ -94,10 +89,8 @@ class Error extends \RuntimeException * Returns whether the error has start and end column information. * * For column information enable the startFilePos and endFilePos in the lexer options. - * - * @return bool */ - public function hasColumnInfo() : bool { + public function hasColumnInfo(): bool { return isset($this->attributes['startFilePos'], $this->attributes['endFilePos']); } @@ -105,9 +98,8 @@ class Error extends \RuntimeException * Gets the start column (1-based) into the line where the error started. * * @param string $code Source code of the file - * @return int */ - public function getStartColumn(string $code) : int { + public function getStartColumn(string $code): int { if (!$this->hasColumnInfo()) { throw new \RuntimeException('Error does not have column information'); } @@ -119,9 +111,8 @@ class Error extends \RuntimeException * Gets the end column (1-based) into the line where the error ended. * * @param string $code Source code of the file - * @return int */ - public function getEndColumn(string $code) : int { + public function getEndColumn(string $code): int { if (!$this->hasColumnInfo()) { throw new \RuntimeException('Error does not have column information'); } @@ -136,7 +127,7 @@ class Error extends \RuntimeException * * @return string Formatted message */ - public function getMessageWithColumnInfo(string $code) : string { + public function getMessageWithColumnInfo(string $code): string { return sprintf( '%s from %d:%d to %d:%d', $this->getRawMessage(), $this->getStartLine(), $this->getStartColumn($code), @@ -148,11 +139,11 @@ class Error extends \RuntimeException * Converts a file offset into a column. * * @param string $code Source code that $pos indexes into - * @param int $pos 0-based position in $code + * @param int $pos 0-based position in $code * * @return int 1-based column (relative to start of line) */ - private function toColumn(string $code, int $pos) : int { + private function toColumn(string $code, int $pos): int { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } @@ -168,7 +159,7 @@ class Error extends \RuntimeException /** * Updates the exception message after a change to rawMessage or rawLine. */ - protected function updateMessage() { + protected function updateMessage(): void { $this->message = $this->rawMessage; if (-1 === $this->getStartLine()) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php index d620e745..51ad730c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler.php @@ -2,12 +2,11 @@ namespace PhpParser; -interface ErrorHandler -{ +interface ErrorHandler { /** * Handle an error generated during lexing, parsing or some other operation. * * @param Error $error The error that needs to be handled */ - public function handleError(Error $error); + public function handleError(Error $error): void; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php index 784b61b1..eee63492 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php @@ -10,12 +10,11 @@ use PhpParser\ErrorHandler; * * This allows graceful handling of errors. */ -class Collecting implements ErrorHandler -{ +class Collecting implements ErrorHandler { /** @var Error[] Collected errors */ - private $errors = []; + private array $errors = []; - public function handleError(Error $error) { + public function handleError(Error $error): void { $this->errors[] = $error; } @@ -24,23 +23,21 @@ class Collecting implements ErrorHandler * * @return Error[] */ - public function getErrors() : array { + public function getErrors(): array { return $this->errors; } /** * Check whether there are any errors. - * - * @return bool */ - public function hasErrors() : bool { + public function hasErrors(): bool { return !empty($this->errors); } /** * Reset/clear collected errors. */ - public function clearErrors() { + public function clearErrors(): void { $this->errors = []; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php index aeee989b..dff33dd0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php @@ -10,9 +10,8 @@ use PhpParser\ErrorHandler; * * This is the default strategy used by all components. */ -class Throwing implements ErrorHandler -{ - public function handleError(Error $error) { +class Throwing implements ErrorHandler { + public function handleError(Error $error): void { throw $error; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php index a38b57ba..7433b5d3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php @@ -5,20 +5,24 @@ namespace PhpParser\Internal; /** * @internal */ -class DiffElem -{ - const TYPE_KEEP = 0; - const TYPE_REMOVE = 1; - const TYPE_ADD = 2; - const TYPE_REPLACE = 3; +class DiffElem { + public const TYPE_KEEP = 0; + public const TYPE_REMOVE = 1; + public const TYPE_ADD = 2; + public const TYPE_REPLACE = 3; /** @var int One of the TYPE_* constants */ - public $type; + public int $type; /** @var mixed Is null for add operations */ public $old; /** @var mixed Is null for remove operations */ public $new; + /** + * @param int $type One of the TYPE_* constants + * @param mixed $old Is null for add operations + * @param mixed $new Is null for remove operations + */ public function __construct(int $type, $old, $new) { $this->type = $type; $this->old = $old; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php index 7f218c74..253e1757 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php @@ -8,16 +8,17 @@ namespace PhpParser\Internal; * Myers, Eugene W. "An O (ND) difference algorithm and its variations." * Algorithmica 1.1 (1986): 251-266. * + * @template T * @internal */ -class Differ -{ +class Differ { + /** @var callable(T, T): bool */ private $isEqual; /** * Create differ over the given equality relation. * - * @param callable $isEqual Equality relation with signature function($a, $b) : bool + * @param callable(T, T): bool $isEqual Equality relation */ public function __construct(callable $isEqual) { $this->isEqual = $isEqual; @@ -26,12 +27,14 @@ class Differ /** * Calculate diff (edit script) from $old to $new. * - * @param array $old Original array - * @param array $new New array + * @param T[] $old Original array + * @param T[] $new New array * * @return DiffElem[] Diff (edit script) */ - public function diff(array $old, array $new) { + public function diff(array $old, array $new): array { + $old = \array_values($old); + $new = \array_values($new); list($trace, $x, $y) = $this->calculateTrace($old, $new); return $this->extractDiff($trace, $x, $y, $old, $new); } @@ -42,32 +45,37 @@ class Differ * If a sequence of remove operations is followed by the same number of add operations, these * will be coalesced into replace operations. * - * @param array $old Original array - * @param array $new New array + * @param T[] $old Original array + * @param T[] $new New array * * @return DiffElem[] Diff (edit script), including replace operations */ - public function diffWithReplacements(array $old, array $new) { + public function diffWithReplacements(array $old, array $new): array { return $this->coalesceReplacements($this->diff($old, $new)); } - private function calculateTrace(array $a, array $b) { - $n = \count($a); - $m = \count($b); + /** + * @param T[] $old + * @param T[] $new + * @return array{array<int, array<int, int>>, int, int} + */ + private function calculateTrace(array $old, array $new): array { + $n = \count($old); + $m = \count($new); $max = $n + $m; $v = [1 => 0]; $trace = []; for ($d = 0; $d <= $max; $d++) { $trace[] = $v; for ($k = -$d; $k <= $d; $k += 2) { - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { - $x = $v[$k+1]; + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { + $x = $v[$k + 1]; } else { - $x = $v[$k-1] + 1; + $x = $v[$k - 1] + 1; } $y = $x - $k; - while ($x < $n && $y < $m && ($this->isEqual)($a[$x], $b[$y])) { + while ($x < $n && $y < $m && ($this->isEqual)($old[$x], $new[$y])) { $x++; $y++; } @@ -81,13 +89,19 @@ class Differ throw new \Exception('Should not happen'); } - private function extractDiff(array $trace, int $x, int $y, array $a, array $b) { + /** + * @param array<int, array<int, int>> $trace + * @param T[] $old + * @param T[] $new + * @return DiffElem[] + */ + private function extractDiff(array $trace, int $x, int $y, array $old, array $new): array { $result = []; for ($d = \count($trace) - 1; $d >= 0; $d--) { $v = $trace[$d]; $k = $x - $y; - if ($k === -$d || ($k !== $d && $v[$k-1] < $v[$k+1])) { + if ($k === -$d || ($k !== $d && $v[$k - 1] < $v[$k + 1])) { $prevK = $k + 1; } else { $prevK = $k - 1; @@ -97,7 +111,7 @@ class Differ $prevY = $prevX - $prevK; while ($x > $prevX && $y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_KEEP, $a[$x-1], $b[$y-1]); + $result[] = new DiffElem(DiffElem::TYPE_KEEP, $old[$x - 1], $new[$y - 1]); $x--; $y--; } @@ -107,12 +121,12 @@ class Differ } while ($x > $prevX) { - $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $a[$x-1], null); + $result[] = new DiffElem(DiffElem::TYPE_REMOVE, $old[$x - 1], null); $x--; } while ($y > $prevY) { - $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $b[$y-1]); + $result[] = new DiffElem(DiffElem::TYPE_ADD, null, $new[$y - 1]); $y--; } } @@ -125,7 +139,7 @@ class Differ * @param DiffElem[] $diff * @return DiffElem[] */ - private function coalesceReplacements(array $diff) { + private function coalesceReplacements(array $diff): array { $newDiff = []; $c = \count($diff); for ($i = 0; $i < $c; $i++) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index 67632270..b30a99a1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -15,23 +15,30 @@ use PhpParser\Node\Expr; * * @internal */ -class PrintableNewAnonClassNode extends Expr -{ +class PrintableNewAnonClassNode extends Expr { /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var int Modifiers */ - public $flags; - /** @var Node\Arg[] Arguments */ - public $args; + public int $flags; + /** @var (Node\Arg|Node\VariadicPlaceholder)[] Arguments */ + public array $args; /** @var null|Node\Name Name of extended class */ - public $extends; + public ?Node\Name $extends; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; + /** + * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param (Node\Arg|Node\VariadicPlaceholder)[] $args Arguments + * @param Node\Name|null $extends Name of extended class + * @param Node\Name[] $implements Names of implemented interfaces + * @param Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Attributes + */ public function __construct( - array $attrGroups, int $flags, array $args, Node\Name $extends = null, array $implements, + array $attrGroups, int $flags, array $args, ?Node\Name $extends, array $implements, array $stmts, array $attributes ) { parent::__construct($attributes); @@ -43,7 +50,7 @@ class PrintableNewAnonClassNode extends Expr $this->stmts = $stmts; } - public static function fromNewNode(Expr\New_ $newNode) { + public static function fromNewNode(Expr\New_ $newNode): self { $class = $newNode->class; assert($class instanceof Node\Stmt\Class_); // We don't assert that $class->name is null here, to allow consumers to assign unique names @@ -54,11 +61,11 @@ class PrintableNewAnonClassNode extends Expr ); } - public function getType() : string { + public function getType(): string { return 'Expr_PrintableNewAnonClass'; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'args', 'extends', 'implements', 'stmts']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php new file mode 100644 index 00000000..36022d09 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php @@ -0,0 +1,237 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Internal; + +if (\PHP_VERSION_ID >= 80000) { + class TokenPolyfill extends \PhpToken { + } + return; +} + +/** + * This is a polyfill for the PhpToken class introduced in PHP 8.0. We do not actually polyfill + * PhpToken, because composer might end up picking a different polyfill implementation, which does + * not meet our requirements. + * + * @internal + */ +class TokenPolyfill { + /** @var int The ID of the token. Either a T_* constant of a character code < 256. */ + public int $id; + /** @var string The textual content of the token. */ + public string $text; + /** @var int The 1-based starting line of the token (or -1 if unknown). */ + public int $line; + /** @var int The 0-based starting position of the token (or -1 if unknown). */ + public int $pos; + + /** @var array<int, bool> Tokens ignored by the PHP parser. */ + private const IGNORABLE_TOKENS = [ + \T_WHITESPACE => true, + \T_COMMENT => true, + \T_DOC_COMMENT => true, + \T_OPEN_TAG => true, + ]; + + /** @var array<int, bool> Tokens that may be part of a T_NAME_* identifier. */ + private static array $identifierTokens; + + /** + * Create a Token with the given ID and text, as well optional line and position information. + */ + final public function __construct(int $id, string $text, int $line = -1, int $pos = -1) { + $this->id = $id; + $this->text = $text; + $this->line = $line; + $this->pos = $pos; + } + + /** + * Get the name of the token. For single-char tokens this will be the token character. + * Otherwise it will be a T_* style name, or null if the token ID is unknown. + */ + public function getTokenName(): ?string { + if ($this->id < 256) { + return \chr($this->id); + } + + $name = token_name($this->id); + return $name === 'UNKNOWN' ? null : $name; + } + + /** + * Check whether the token is of the given kind. The kind may be either an integer that matches + * the token ID, a string that matches the token text, or an array of integers/strings. In the + * latter case, the function returns true if any of the kinds in the array match. + * + * @param int|string|(int|string)[] $kind + */ + public function is($kind): bool { + if (\is_int($kind)) { + return $this->id === $kind; + } + if (\is_string($kind)) { + return $this->text === $kind; + } + if (\is_array($kind)) { + foreach ($kind as $entry) { + if (\is_int($entry)) { + if ($this->id === $entry) { + return true; + } + } elseif (\is_string($entry)) { + if ($this->text === $entry) { + return true; + } + } else { + throw new \TypeError( + 'Argument #1 ($kind) must only have elements of type string|int, ' . + gettype($entry) . ' given'); + } + } + return false; + } + throw new \TypeError( + 'Argument #1 ($kind) must be of type string|int|array, ' .gettype($kind) . ' given'); + } + + /** + * Check whether this token would be ignored by the PHP parser. Returns true for T_WHITESPACE, + * T_COMMENT, T_DOC_COMMENT and T_OPEN_TAG, and false for everything else. + */ + public function isIgnorable(): bool { + return isset(self::IGNORABLE_TOKENS[$this->id]); + } + + /** + * Return the textual content of the token. + */ + public function __toString(): string { + return $this->text; + } + + /** + * Tokenize the given source code and return an array of tokens. + * + * This performs certain canonicalizations to match the PHP 8.0 token format: + * * Bad characters are represented using T_BAD_CHARACTER rather than omitted. + * * T_COMMENT does not include trailing newlines, instead the newline is part of a following + * T_WHITESPACE token. + * * Namespaced names are represented using T_NAME_* tokens. + * + * @return static[] + */ + public static function tokenize(string $code, int $flags = 0): array { + self::init(); + + $tokens = []; + $line = 1; + $pos = 0; + $origTokens = \token_get_all($code, $flags); + + $numTokens = \count($origTokens); + for ($i = 0; $i < $numTokens; $i++) { + $token = $origTokens[$i]; + if (\is_string($token)) { + if (\strlen($token) === 2) { + // b" and B" are tokenized as single-char tokens, even though they aren't. + $tokens[] = new static(\ord('"'), $token, $line, $pos); + $pos += 2; + } else { + $tokens[] = new static(\ord($token), $token, $line, $pos); + $pos++; + } + } else { + $id = $token[0]; + $text = $token[1]; + + // Emulate PHP 8.0 comment format, which does not include trailing whitespace anymore. + if ($id === \T_COMMENT && \substr($text, 0, 2) !== '/*' && + \preg_match('/(\r\n|\n|\r)$/D', $text, $matches) + ) { + $trailingNewline = $matches[0]; + $text = \substr($text, 0, -\strlen($trailingNewline)); + $tokens[] = new static($id, $text, $line, $pos); + $pos += \strlen($text); + + if ($i + 1 < $numTokens && $origTokens[$i + 1][0] === \T_WHITESPACE) { + // Move trailing newline into following T_WHITESPACE token, if it already exists. + $origTokens[$i + 1][1] = $trailingNewline . $origTokens[$i + 1][1]; + $origTokens[$i + 1][2]--; + } else { + // Otherwise, we need to create a new T_WHITESPACE token. + $tokens[] = new static(\T_WHITESPACE, $trailingNewline, $line, $pos); + $line++; + $pos += \strlen($trailingNewline); + } + continue; + } + + // Emulate PHP 8.0 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and + // T_STRING into a single token. + if (($id === \T_NS_SEPARATOR || isset(self::$identifierTokens[$id]))) { + $newText = $text; + $lastWasSeparator = $id === \T_NS_SEPARATOR; + for ($j = $i + 1; $j < $numTokens; $j++) { + if ($lastWasSeparator) { + if (!isset(self::$identifierTokens[$origTokens[$j][0]])) { + break; + } + $lastWasSeparator = false; + } else { + if ($origTokens[$j][0] !== \T_NS_SEPARATOR) { + break; + } + $lastWasSeparator = true; + } + $newText .= $origTokens[$j][1]; + } + if ($lastWasSeparator) { + // Trailing separator is not part of the name. + $j--; + $newText = \substr($newText, 0, -1); + } + if ($j > $i + 1) { + if ($id === \T_NS_SEPARATOR) { + $id = \T_NAME_FULLY_QUALIFIED; + } elseif ($id === \T_NAMESPACE) { + $id = \T_NAME_RELATIVE; + } else { + $id = \T_NAME_QUALIFIED; + } + $tokens[] = new static($id, $newText, $line, $pos); + $pos += \strlen($newText); + $i = $j - 1; + continue; + } + } + + $tokens[] = new static($id, $text, $line, $pos); + $line += \substr_count($text, "\n"); + $pos += \strlen($text); + } + } + return $tokens; + } + + /** Initialize private static state needed by tokenize(). */ + private static function init(): void { + if (isset(self::$identifierTokens)) { + return; + } + + // Based on semi_reserved production. + self::$identifierTokens = \array_fill_keys([ + \T_STRING, + \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, + \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, + \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, + \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, + \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, + \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, + \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, + \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, + \T_MATCH, + ], true); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php index 7e0a5de0..8fba1312 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php @@ -2,22 +2,23 @@ namespace PhpParser\Internal; +use PhpParser\Token; + /** * Provides operations on token streams, for use by pretty printer. * * @internal */ -class TokenStream -{ - /** @var array Tokens (in token_get_all format) */ - private $tokens; +class TokenStream { + /** @var Token[] Tokens (in PhpToken::tokenize() format) */ + private array $tokens; /** @var int[] Map from position to indentation */ - private $indentMap; + private array $indentMap; /** * Create token stream instance. * - * @param array $tokens Tokens in token_get_all() format + * @param Token[] $tokens Tokens in PhpToken::tokenize() format */ public function __construct(array $tokens) { $this->tokens = $tokens; @@ -28,11 +29,9 @@ class TokenStream * Whether the given position is immediately surrounded by parenthesis. * * @param int $startPos Start position - * @param int $endPos End position - * - * @return bool + * @param int $endPos End position */ - public function haveParens(int $startPos, int $endPos) : bool { + public function haveParens(int $startPos, int $endPos): bool { return $this->haveTokenImmediatelyBefore($startPos, '(') && $this->haveTokenImmediatelyAfter($endPos, ')'); } @@ -41,11 +40,9 @@ class TokenStream * Whether the given position is immediately surrounded by braces. * * @param int $startPos Start position - * @param int $endPos End position - * - * @return bool + * @param int $endPos End position */ - public function haveBraces(int $startPos, int $endPos) : bool { + public function haveBraces(int $startPos, int $endPos): bool { return ($this->haveTokenImmediatelyBefore($startPos, '{') || $this->haveTokenImmediatelyBefore($startPos, T_CURLY_OPEN)) && $this->haveTokenImmediatelyAfter($endPos, '}'); @@ -56,21 +53,20 @@ class TokenStream * * During this check whitespace and comments are skipped. * - * @param int $pos Position before which the token should occur + * @param int $pos Position before which the token should occur * @param int|string $expectedTokenType Token to check for * * @return bool Whether the expected token was found */ - public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool { + public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType): bool { $tokens = $this->tokens; $pos--; for (; $pos >= 0; $pos--) { - $tokenType = $tokens[$pos][0]; - if ($tokenType === $expectedTokenType) { + $token = $tokens[$pos]; + if ($token->is($expectedTokenType)) { return true; } - if ($tokenType !== \T_WHITESPACE - && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) { + if (!$token->isIgnorable()) { break; } } @@ -82,28 +78,28 @@ class TokenStream * * During this check whitespace and comments are skipped. * - * @param int $pos Position after which the token should occur + * @param int $pos Position after which the token should occur * @param int|string $expectedTokenType Token to check for * * @return bool Whether the expected token was found */ - public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool { + public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType): bool { $tokens = $this->tokens; $pos++; - for (; $pos < \count($tokens); $pos++) { - $tokenType = $tokens[$pos][0]; - if ($tokenType === $expectedTokenType) { + for ($c = \count($tokens); $pos < $c; $pos++) { + $token = $tokens[$pos]; + if ($token->is($expectedTokenType)) { return true; } - if ($tokenType !== \T_WHITESPACE - && $tokenType !== \T_COMMENT && $tokenType !== \T_DOC_COMMENT) { + if (!$token->isIgnorable()) { break; } } return false; } - public function skipLeft(int $pos, $skipTokenType) { + /** @param int|string|(int|string)[] $skipTokenType */ + public function skipLeft(int $pos, $skipTokenType): int { $tokens = $this->tokens; $pos = $this->skipLeftWhitespace($pos); @@ -111,7 +107,7 @@ class TokenStream return $pos; } - if ($tokens[$pos][0] !== $skipTokenType) { + if (!$tokens[$pos]->is($skipTokenType)) { // Shouldn't happen. The skip token MUST be there throw new \Exception('Encountered unexpected token'); } @@ -120,7 +116,8 @@ class TokenStream return $this->skipLeftWhitespace($pos); } - public function skipRight(int $pos, $skipTokenType) { + /** @param int|string|(int|string)[] $skipTokenType */ + public function skipRight(int $pos, $skipTokenType): int { $tokens = $this->tokens; $pos = $this->skipRightWhitespace($pos); @@ -128,7 +125,7 @@ class TokenStream return $pos; } - if ($tokens[$pos][0] !== $skipTokenType) { + if (!$tokens[$pos]->is($skipTokenType)) { // Shouldn't happen. The skip token MUST be there throw new \Exception('Encountered unexpected token'); } @@ -143,11 +140,10 @@ class TokenStream * @param int $pos Token position * @return int Non-whitespace token position */ - public function skipLeftWhitespace(int $pos) { + public function skipLeftWhitespace(int $pos): int { $tokens = $this->tokens; for (; $pos >= 0; $pos--) { - $type = $tokens[$pos][0]; - if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) { + if (!$tokens[$pos]->isIgnorable()) { break; } } @@ -160,22 +156,21 @@ class TokenStream * @param int $pos Token position * @return int Non-whitespace token position */ - public function skipRightWhitespace(int $pos) { + public function skipRightWhitespace(int $pos): int { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { - $type = $tokens[$pos][0]; - if ($type !== \T_WHITESPACE && $type !== \T_COMMENT && $type !== \T_DOC_COMMENT) { + if (!$tokens[$pos]->isIgnorable()) { break; } } return $pos; } - public function findRight(int $pos, $findTokenType) { + /** @param int|string|(int|string)[] $findTokenType */ + public function findRight(int $pos, $findTokenType): int { $tokens = $this->tokens; for ($count = \count($tokens); $pos < $count; $pos++) { - $type = $tokens[$pos][0]; - if ($type === $findTokenType) { + if ($tokens[$pos]->is($findTokenType)) { return $pos; } } @@ -190,22 +185,16 @@ class TokenStream * @param int|string $tokenType Token type to look for * @return bool Whether the token occurs in the given range */ - public function haveTokenInRange(int $startPos, int $endPos, $tokenType) { + public function haveTokenInRange(int $startPos, int $endPos, $tokenType): bool { $tokens = $this->tokens; for ($pos = $startPos; $pos < $endPos; $pos++) { - if ($tokens[$pos][0] === $tokenType) { + if ($tokens[$pos]->is($tokenType)) { return true; } } return false; } - public function haveBracesInRange(int $startPos, int $endPos) { - return $this->haveTokenInRange($startPos, $endPos, '{') - || $this->haveTokenInRange($startPos, $endPos, T_CURLY_OPEN) - || $this->haveTokenInRange($startPos, $endPos, '}'); - } - public function haveTagInRange(int $startPos, int $endPos): bool { return $this->haveTokenInRange($startPos, $endPos, \T_OPEN_TAG) || $this->haveTokenInRange($startPos, $endPos, \T_CLOSE_TAG); @@ -218,41 +207,37 @@ class TokenStream * * @return int Indentation depth (in spaces) */ - public function getIndentationBefore(int $pos) : int { + public function getIndentationBefore(int $pos): int { return $this->indentMap[$pos]; } /** * Get the code corresponding to a token offset range, optionally adjusted for indentation. * - * @param int $from Token start position (inclusive) - * @param int $to Token end position (exclusive) + * @param int $from Token start position (inclusive) + * @param int $to Token end position (exclusive) * @param int $indent By how much the code should be indented (can be negative as well) * * @return string Code corresponding to token range, adjusted for indentation */ - public function getTokenCode(int $from, int $to, int $indent) : string { + public function getTokenCode(int $from, int $to, int $indent): string { $tokens = $this->tokens; $result = ''; for ($pos = $from; $pos < $to; $pos++) { $token = $tokens[$pos]; - if (\is_array($token)) { - $type = $token[0]; - $content = $token[1]; - if ($type === \T_CONSTANT_ENCAPSED_STRING || $type === \T_ENCAPSED_AND_WHITESPACE) { - $result .= $content; - } else { - // TODO Handle non-space indentation - if ($indent < 0) { - $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $content); - } elseif ($indent > 0) { - $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $content); - } else { - $result .= $content; - } - } + $id = $token->id; + $text = $token->text; + if ($id === \T_CONSTANT_ENCAPSED_STRING || $id === \T_ENCAPSED_AND_WHITESPACE) { + $result .= $text; } else { - $result .= $token; + // TODO Handle non-space indentation + if ($indent < 0) { + $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $text); + } elseif ($indent > 0) { + $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $text); + } else { + $result .= $text; + } } } return $result; @@ -263,14 +248,14 @@ class TokenStream * * @return int[] Token position to indentation map */ - private function calcIndentMap() { + private function calcIndentMap(): array { $indentMap = []; $indent = 0; foreach ($this->tokens as $token) { $indentMap[] = $indent; - if ($token[0] === \T_WHITESPACE) { - $content = $token[1]; + if ($token->id === \T_WHITESPACE) { + $content = $token->text; $newlinePos = \strrpos($content, "\n"); if (false !== $newlinePos) { $indent = \strlen($content) - $newlinePos - 1; diff --git a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php index 47d2003d..7be41426 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php +++ b/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php @@ -2,11 +2,11 @@ namespace PhpParser; -class JsonDecoder -{ - /** @var \ReflectionClass[] Node type to reflection class map */ - private $reflectionClassCache; +class JsonDecoder { + /** @var \ReflectionClass<Node>[] Node type to reflection class map */ + private array $reflectionClassCache; + /** @return mixed */ public function decode(string $json) { $value = json_decode($json, true); if (json_last_error()) { @@ -16,6 +16,10 @@ class JsonDecoder return $this->decodeRecursive($value); } + /** + * @param mixed $value + * @return mixed + */ private function decodeRecursive($value) { if (\is_array($value)) { if (isset($value['nodeType'])) { @@ -29,7 +33,7 @@ class JsonDecoder return $value; } - private function decodeArray(array $array) : array { + private function decodeArray(array $array): array { $decodedArray = []; foreach ($array as $key => $value) { $decodedArray[$key] = $this->decodeRecursive($value); @@ -37,14 +41,13 @@ class JsonDecoder return $decodedArray; } - private function decodeNode(array $value) : Node { + private function decodeNode(array $value): Node { $nodeType = $value['nodeType']; if (!\is_string($nodeType)) { throw new \RuntimeException('Node type must be a string'); } $reflectionClass = $this->reflectionClassFromNodeType($nodeType); - /** @var Node $node */ $node = $reflectionClass->newInstanceWithoutConstructor(); if (isset($value['attributes'])) { @@ -66,7 +69,7 @@ class JsonDecoder return $node; } - private function decodeComment(array $value) : Comment { + private function decodeComment(array $value): Comment { $className = $value['nodeType'] === 'Comment' ? Comment::class : Comment\Doc::class; if (!isset($value['text'])) { throw new \RuntimeException('Comment must have text'); @@ -79,7 +82,8 @@ class JsonDecoder ); } - private function reflectionClassFromNodeType(string $nodeType) : \ReflectionClass { + /** @return \ReflectionClass<Node> */ + private function reflectionClassFromNodeType(string $nodeType): \ReflectionClass { if (!isset($this->reflectionClassCache[$nodeType])) { $className = $this->classNameFromNodeType($nodeType); $this->reflectionClassCache[$nodeType] = new \ReflectionClass($className); @@ -87,7 +91,8 @@ class JsonDecoder return $this->reflectionClassCache[$nodeType]; } - private function classNameFromNodeType(string $nodeType) : string { + /** @return class-string<Node> */ + private function classNameFromNodeType(string $nodeType): string { $className = 'PhpParser\\Node\\' . strtr($nodeType, '_', '\\'); if (class_exists($className)) { return $className; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php index e15dd0a5..5e2ece96 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer.php @@ -2,559 +2,115 @@ namespace PhpParser; -use PhpParser\Parser\Tokens; - -class Lexer -{ - protected $code; - protected $tokens; - protected $pos; - protected $line; - protected $filePos; - protected $prevCloseTagHasNewline; - - protected $tokenMap; - protected $dropTokens; - protected $identifierTokens; - - private $attributeStartLineUsed; - private $attributeEndLineUsed; - private $attributeStartTokenPosUsed; - private $attributeEndTokenPosUsed; - private $attributeStartFilePosUsed; - private $attributeEndFilePosUsed; - private $attributeCommentsUsed; +require __DIR__ . '/compatibility_tokens.php'; +class Lexer { /** - * Creates a Lexer. + * Tokenize the provided source code. * - * @param array $options Options array. Currently only the 'usedAttributes' option is supported, - * which is an array of attributes to add to the AST nodes. Possible - * attributes are: 'comments', 'startLine', 'endLine', 'startTokenPos', - * 'endTokenPos', 'startFilePos', 'endFilePos'. The option defaults to the - * first three. For more info see getNextToken() docs. - */ - public function __construct(array $options = []) { - // Create Map from internal tokens to PhpParser tokens. - $this->defineCompatibilityTokens(); - $this->tokenMap = $this->createTokenMap(); - $this->identifierTokens = $this->createIdentifierTokenMap(); - - // map of tokens to drop while lexing (the map is only used for isset lookup, - // that's why the value is simply set to 1; the value is never actually used.) - $this->dropTokens = array_fill_keys( - [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], 1 - ); - - $defaultAttributes = ['comments', 'startLine', 'endLine']; - $usedAttributes = array_fill_keys($options['usedAttributes'] ?? $defaultAttributes, true); - - // Create individual boolean properties to make these checks faster. - $this->attributeStartLineUsed = isset($usedAttributes['startLine']); - $this->attributeEndLineUsed = isset($usedAttributes['endLine']); - $this->attributeStartTokenPosUsed = isset($usedAttributes['startTokenPos']); - $this->attributeEndTokenPosUsed = isset($usedAttributes['endTokenPos']); - $this->attributeStartFilePosUsed = isset($usedAttributes['startFilePos']); - $this->attributeEndFilePosUsed = isset($usedAttributes['endFilePos']); - $this->attributeCommentsUsed = isset($usedAttributes['comments']); - } - - /** - * Initializes the lexer for lexing the provided source code. + * The token array is in the same format as provided by the PhpToken::tokenize() method in + * PHP 8.0. The tokens are instances of PhpParser\Token, to abstract over a polyfill + * implementation in earlier PHP version. * - * This function does not throw if lexing errors occur. Instead, errors may be retrieved using - * the getErrors() method. + * The token array is terminated by a sentinel token with token ID 0. + * The token array does not discard any tokens (i.e. whitespace and comments are included). + * The token position attributes are against this token array. * - * @param string $code The source code to lex + * @param string $code The source code to tokenize. * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to - * ErrorHandler\Throwing + * ErrorHandler\Throwing. + * @return Token[] Tokens */ - public function startLexing(string $code, ErrorHandler $errorHandler = null) { + public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { if (null === $errorHandler) { $errorHandler = new ErrorHandler\Throwing(); } - $this->code = $code; // keep the code around for __halt_compiler() handling - $this->pos = -1; - $this->line = 1; - $this->filePos = 0; - - // If inline HTML occurs without preceding code, treat it as if it had a leading newline. - // This ensures proper composability, because having a newline is the "safe" assumption. - $this->prevCloseTagHasNewline = true; - $scream = ini_set('xdebug.scream', '0'); - $this->tokens = @token_get_all($code); - $this->postprocessTokens($errorHandler); + $tokens = @Token::tokenize($code); + $this->postprocessTokens($tokens, $errorHandler); if (false !== $scream) { ini_set('xdebug.scream', $scream); } - } - private function handleInvalidCharacterRange($start, $end, $line, ErrorHandler $errorHandler) { - $tokens = []; - for ($i = $start; $i < $end; $i++) { - $chr = $this->code[$i]; - if ($chr === "\0") { - // PHP cuts error message after null byte, so need special case - $errorMsg = 'Unexpected null byte'; - } else { - $errorMsg = sprintf( - 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) - ); - } - - $tokens[] = [\T_BAD_CHARACTER, $chr, $line]; - $errorHandler->handleError(new Error($errorMsg, [ - 'startLine' => $line, - 'endLine' => $line, - 'startFilePos' => $i, - 'endFilePos' => $i, - ])); - } return $tokens; } - /** - * Check whether comment token is unterminated. - * - * @return bool - */ - private function isUnterminatedComment($token) : bool { - return ($token[0] === \T_COMMENT || $token[0] === \T_DOC_COMMENT) - && substr($token[1], 0, 2) === '/*' - && substr($token[1], -2) !== '*/'; + private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void { + $chr = $token->text; + if ($chr === "\0") { + // PHP cuts error message after null byte, so need special case + $errorMsg = 'Unexpected null byte'; + } else { + $errorMsg = sprintf( + 'Unexpected character "%s" (ASCII %d)', $chr, ord($chr) + ); + } + + $errorHandler->handleError(new Error($errorMsg, [ + 'startLine' => $token->line, + 'endLine' => $token->line, + 'startFilePos' => $token->pos, + 'endFilePos' => $token->pos, + ])); } - protected function postprocessTokens(ErrorHandler $errorHandler) { - // PHP's error handling for token_get_all() is rather bad, so if we want detailed - // error information we need to compute it ourselves. Invalid character errors are - // detected by finding "gaps" in the token array. Unterminated comments are detected - // by checking if a trailing comment has a "*/" at the end. - // - // Additionally, we perform a number of canonicalizations here: - // * Use the PHP 8.0 comment format, which does not include trailing whitespace anymore. - // * Use PHP 8.0 T_NAME_* tokens. + private function isUnterminatedComment(Token $token): bool { + return $token->is([\T_COMMENT, \T_DOC_COMMENT]) + && substr($token->text, 0, 2) === '/*' + && substr($token->text, -2) !== '*/'; + } + + /** + * @param list<Token> $tokens + */ + protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler): void { + // This function reports errors (bad characters and unterminated comments) in the token + // array, and performs certain canonicalizations: // * Use PHP 8.1 T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG and // T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG tokens used to disambiguate intersection types. + // * Add a sentinel token with ID 0. + + $numTokens = \count($tokens); + if ($numTokens === 0) { + // Empty input edge case: Just add the sentinel token. + $tokens[] = new Token(0, "\0", 1, 0); + return; + } - $filePos = 0; - $line = 1; - $numTokens = \count($this->tokens); for ($i = 0; $i < $numTokens; $i++) { - $token = $this->tokens[$i]; - - // Since PHP 7.4 invalid characters are represented by a T_BAD_CHARACTER token. - // In this case we only need to emit an error. - if ($token[0] === \T_BAD_CHARACTER) { - $this->handleInvalidCharacterRange($filePos, $filePos + 1, $line, $errorHandler); + $token = $tokens[$i]; + if ($token->id === \T_BAD_CHARACTER) { + $this->handleInvalidCharacter($token, $errorHandler); } - if ($token[0] === \T_COMMENT && substr($token[1], 0, 2) !== '/*' - && preg_match('/(\r\n|\n|\r)$/D', $token[1], $matches)) { - $trailingNewline = $matches[0]; - $token[1] = substr($token[1], 0, -strlen($trailingNewline)); - $this->tokens[$i] = $token; - if (isset($this->tokens[$i + 1]) && $this->tokens[$i + 1][0] === \T_WHITESPACE) { - // Move trailing newline into following T_WHITESPACE token, if it already exists. - $this->tokens[$i + 1][1] = $trailingNewline . $this->tokens[$i + 1][1]; - $this->tokens[$i + 1][2]--; - } else { - // Otherwise, we need to create a new T_WHITESPACE token. - array_splice($this->tokens, $i + 1, 0, [ - [\T_WHITESPACE, $trailingNewline, $line], - ]); - $numTokens++; - } - } - - // Emulate PHP 8 T_NAME_* tokens, by combining sequences of T_NS_SEPARATOR and T_STRING - // into a single token. - if (\is_array($token) - && ($token[0] === \T_NS_SEPARATOR || isset($this->identifierTokens[$token[0]]))) { - $lastWasSeparator = $token[0] === \T_NS_SEPARATOR; - $text = $token[1]; - for ($j = $i + 1; isset($this->tokens[$j]); $j++) { - if ($lastWasSeparator) { - if (!isset($this->identifierTokens[$this->tokens[$j][0]])) { - break; - } - $lastWasSeparator = false; - } else { - if ($this->tokens[$j][0] !== \T_NS_SEPARATOR) { - break; - } - $lastWasSeparator = true; - } - $text .= $this->tokens[$j][1]; - } - if ($lastWasSeparator) { - // Trailing separator is not part of the name. - $j--; - $text = substr($text, 0, -1); - } - if ($j > $i + 1) { - if ($token[0] === \T_NS_SEPARATOR) { - $type = \T_NAME_FULLY_QUALIFIED; - } else if ($token[0] === \T_NAMESPACE) { - $type = \T_NAME_RELATIVE; - } else { - $type = \T_NAME_QUALIFIED; - } - $token = [$type, $text, $line]; - array_splice($this->tokens, $i, $j - $i, [$token]); - $numTokens -= $j - $i - 1; - } - } - - if ($token === '&') { + if ($token->id === \ord('&')) { $next = $i + 1; - while (isset($this->tokens[$next]) && $this->tokens[$next][0] === \T_WHITESPACE) { + while (isset($tokens[$next]) && $tokens[$next]->id === \T_WHITESPACE) { $next++; } - $followedByVarOrVarArg = isset($this->tokens[$next]) && - ($this->tokens[$next][0] === \T_VARIABLE || $this->tokens[$next][0] === \T_ELLIPSIS); - $this->tokens[$i] = $token = [ - $followedByVarOrVarArg - ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG - : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG, - '&', - $line, - ]; - } - - $tokenValue = \is_string($token) ? $token : $token[1]; - $tokenLen = \strlen($tokenValue); - - if (substr($this->code, $filePos, $tokenLen) !== $tokenValue) { - // Something is missing, must be an invalid character - $nextFilePos = strpos($this->code, $tokenValue, $filePos); - $badCharTokens = $this->handleInvalidCharacterRange( - $filePos, $nextFilePos, $line, $errorHandler); - $filePos = (int) $nextFilePos; - - array_splice($this->tokens, $i, 0, $badCharTokens); - $numTokens += \count($badCharTokens); - $i += \count($badCharTokens); - } - - $filePos += $tokenLen; - $line += substr_count($tokenValue, "\n"); - } - - if ($filePos !== \strlen($this->code)) { - if (substr($this->code, $filePos, 2) === '/*') { - // Unlike PHP, HHVM will drop unterminated comments entirely - $comment = substr($this->code, $filePos); - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $line, - 'endLine' => $line + substr_count($comment, "\n"), - 'startFilePos' => $filePos, - 'endFilePos' => $filePos + \strlen($comment), - ])); - - // Emulate the PHP behavior - $isDocComment = isset($comment[3]) && $comment[3] === '*'; - $this->tokens[] = [$isDocComment ? \T_DOC_COMMENT : \T_COMMENT, $comment, $line]; - } else { - // Invalid characters at the end of the input - $badCharTokens = $this->handleInvalidCharacterRange( - $filePos, \strlen($this->code), $line, $errorHandler); - $this->tokens = array_merge($this->tokens, $badCharTokens); - } - return; - } - - if (count($this->tokens) > 0) { - // Check for unterminated comment - $lastToken = $this->tokens[count($this->tokens) - 1]; - if ($this->isUnterminatedComment($lastToken)) { - $errorHandler->handleError(new Error('Unterminated comment', [ - 'startLine' => $line - substr_count($lastToken[1], "\n"), - 'endLine' => $line, - 'startFilePos' => $filePos - \strlen($lastToken[1]), - 'endFilePos' => $filePos, - ])); - } - } - } - - /** - * Fetches the next token. - * - * The available attributes are determined by the 'usedAttributes' option, which can - * be specified in the constructor. The following attributes are supported: - * - * * 'comments' => Array of PhpParser\Comment or PhpParser\Comment\Doc instances, - * representing all comments that occurred between the previous - * non-discarded token and the current one. - * * 'startLine' => Line in which the node starts. - * * 'endLine' => Line in which the node ends. - * * 'startTokenPos' => Offset into the token array of the first token in the node. - * * 'endTokenPos' => Offset into the token array of the last token in the node. - * * 'startFilePos' => Offset into the code string of the first character that is part of the node. - * * 'endFilePos' => Offset into the code string of the last character that is part of the node. - * - * @param mixed $value Variable to store token content in - * @param mixed $startAttributes Variable to store start attributes in - * @param mixed $endAttributes Variable to store end attributes in - * - * @return int Token id - */ - public function getNextToken(&$value = null, &$startAttributes = null, &$endAttributes = null) : int { - $startAttributes = []; - $endAttributes = []; - - while (1) { - if (isset($this->tokens[++$this->pos])) { - $token = $this->tokens[$this->pos]; - } else { - // EOF token with ID 0 - $token = "\0"; - } - - if ($this->attributeStartLineUsed) { - $startAttributes['startLine'] = $this->line; - } - if ($this->attributeStartTokenPosUsed) { - $startAttributes['startTokenPos'] = $this->pos; - } - if ($this->attributeStartFilePosUsed) { - $startAttributes['startFilePos'] = $this->filePos; - } - - if (\is_string($token)) { - $value = $token; - if (isset($token[1])) { - // bug in token_get_all - $this->filePos += 2; - $id = ord('"'); - } else { - $this->filePos += 1; - $id = ord($token); - } - } elseif (!isset($this->dropTokens[$token[0]])) { - $value = $token[1]; - $id = $this->tokenMap[$token[0]]; - if (\T_CLOSE_TAG === $token[0]) { - $this->prevCloseTagHasNewline = false !== strpos($token[1], "\n") - || false !== strpos($token[1], "\r"); - } elseif (\T_INLINE_HTML === $token[0]) { - $startAttributes['hasLeadingNewline'] = $this->prevCloseTagHasNewline; - } - - $this->line += substr_count($value, "\n"); - $this->filePos += \strlen($value); - } else { - $origLine = $this->line; - $origFilePos = $this->filePos; - $this->line += substr_count($token[1], "\n"); - $this->filePos += \strlen($token[1]); - - if (\T_COMMENT === $token[0] || \T_DOC_COMMENT === $token[0]) { - if ($this->attributeCommentsUsed) { - $comment = \T_DOC_COMMENT === $token[0] - ? new Comment\Doc($token[1], - $origLine, $origFilePos, $this->pos, - $this->line, $this->filePos - 1, $this->pos) - : new Comment($token[1], - $origLine, $origFilePos, $this->pos, - $this->line, $this->filePos - 1, $this->pos); - $startAttributes['comments'][] = $comment; - } - } - continue; - } - - if ($this->attributeEndLineUsed) { - $endAttributes['endLine'] = $this->line; - } - if ($this->attributeEndTokenPosUsed) { - $endAttributes['endTokenPos'] = $this->pos; - } - if ($this->attributeEndFilePosUsed) { - $endAttributes['endFilePos'] = $this->filePos - 1; - } - - return $id; - } - - throw new \RuntimeException('Reached end of lexer loop'); - } - - /** - * Returns the token array for current code. - * - * The token array is in the same format as provided by the - * token_get_all() function and does not discard tokens (i.e. - * whitespace and comments are included). The token position - * attributes are against this token array. - * - * @return array Array of tokens in token_get_all() format - */ - public function getTokens() : array { - return $this->tokens; - } - - /** - * Handles __halt_compiler() by returning the text after it. - * - * @return string Remaining text - */ - public function handleHaltCompiler() : string { - // text after T_HALT_COMPILER, still including (); - $textAfter = substr($this->code, $this->filePos); - - // ensure that it is followed by (); - // this simplifies the situation, by not allowing any comments - // in between of the tokens. - if (!preg_match('~^\s*\(\s*\)\s*(?:;|\?>\r?\n?)~', $textAfter, $matches)) { - throw new Error('__HALT_COMPILER must be followed by "();"'); - } - - // prevent the lexer from returning any further tokens - $this->pos = count($this->tokens); - - // return with (); removed - return substr($textAfter, strlen($matches[0])); - } - - private function defineCompatibilityTokens() { - static $compatTokensDefined = false; - if ($compatTokensDefined) { - return; - } - - $compatTokens = [ - // PHP 7.4 - 'T_BAD_CHARACTER', - 'T_FN', - 'T_COALESCE_EQUAL', - // PHP 8.0 - 'T_NAME_QUALIFIED', - 'T_NAME_FULLY_QUALIFIED', - 'T_NAME_RELATIVE', - 'T_MATCH', - 'T_NULLSAFE_OBJECT_OPERATOR', - 'T_ATTRIBUTE', - // PHP 8.1 - 'T_ENUM', - 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', - 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', - 'T_READONLY', - ]; - - // PHP-Parser might be used together with another library that also emulates some or all - // of these tokens. Perform a sanity-check that all already defined tokens have been - // assigned a unique ID. - $usedTokenIds = []; - foreach ($compatTokens as $token) { - if (\defined($token)) { - $tokenId = \constant($token); - $clashingToken = $usedTokenIds[$tokenId] ?? null; - if ($clashingToken !== null) { - throw new \Error(sprintf( - 'Token %s has same ID as token %s, ' . - 'you may be using a library with broken token emulation', - $token, $clashingToken - )); - } - $usedTokenIds[$tokenId] = $token; + $followedByVarOrVarArg = isset($tokens[$next]) && + $tokens[$next]->is([\T_VARIABLE, \T_ELLIPSIS]); + $token->id = $followedByVarOrVarArg + ? \T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG + : \T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; } } - // Now define any tokens that have not yet been emulated. Try to assign IDs from -1 - // downwards, but skip any IDs that may already be in use. - $newTokenId = -1; - foreach ($compatTokens as $token) { - if (!\defined($token)) { - while (isset($usedTokenIds[$newTokenId])) { - $newTokenId--; - } - \define($token, $newTokenId); - $newTokenId--; - } + // Check for unterminated comment + $lastToken = $tokens[$numTokens - 1]; + if ($this->isUnterminatedComment($lastToken)) { + $errorHandler->handleError(new Error('Unterminated comment', [ + 'startLine' => $lastToken->line, + 'endLine' => $lastToken->getEndLine(), + 'startFilePos' => $lastToken->pos, + 'endFilePos' => $lastToken->getEndPos(), + ])); } - $compatTokensDefined = true; - } - - /** - * Creates the token map. - * - * The token map maps the PHP internal token identifiers - * to the identifiers used by the Parser. Additionally it - * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. - * - * @return array The token map - */ - protected function createTokenMap() : array { - $tokenMap = []; - - // 256 is the minimum possible token number, as everything below - // it is an ASCII value - for ($i = 256; $i < 1000; ++$i) { - if (\T_DOUBLE_COLON === $i) { - // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM - $tokenMap[$i] = Tokens::T_PAAMAYIM_NEKUDOTAYIM; - } elseif(\T_OPEN_TAG_WITH_ECHO === $i) { - // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO - $tokenMap[$i] = Tokens::T_ECHO; - } elseif(\T_CLOSE_TAG === $i) { - // T_CLOSE_TAG is equivalent to ';' - $tokenMap[$i] = ord(';'); - } elseif ('UNKNOWN' !== $name = token_name($i)) { - if ('T_HASHBANG' === $name) { - // HHVM uses a special token for #! hashbang lines - $tokenMap[$i] = Tokens::T_INLINE_HTML; - } elseif (defined($name = Tokens::class . '::' . $name)) { - // Other tokens can be mapped directly - $tokenMap[$i] = constant($name); - } - } - } - - // HHVM uses a special token for numbers that overflow to double - if (defined('T_ONUMBER')) { - $tokenMap[\T_ONUMBER] = Tokens::T_DNUMBER; - } - // HHVM also has a separate token for the __COMPILER_HALT_OFFSET__ constant - if (defined('T_COMPILER_HALT_OFFSET')) { - $tokenMap[\T_COMPILER_HALT_OFFSET] = Tokens::T_STRING; - } - - // Assign tokens for which we define compatibility constants, as token_name() does not know them. - $tokenMap[\T_FN] = Tokens::T_FN; - $tokenMap[\T_COALESCE_EQUAL] = Tokens::T_COALESCE_EQUAL; - $tokenMap[\T_NAME_QUALIFIED] = Tokens::T_NAME_QUALIFIED; - $tokenMap[\T_NAME_FULLY_QUALIFIED] = Tokens::T_NAME_FULLY_QUALIFIED; - $tokenMap[\T_NAME_RELATIVE] = Tokens::T_NAME_RELATIVE; - $tokenMap[\T_MATCH] = Tokens::T_MATCH; - $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = Tokens::T_NULLSAFE_OBJECT_OPERATOR; - $tokenMap[\T_ATTRIBUTE] = Tokens::T_ATTRIBUTE; - $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = Tokens::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; - $tokenMap[\T_ENUM] = Tokens::T_ENUM; - $tokenMap[\T_READONLY] = Tokens::T_READONLY; - - return $tokenMap; - } - - private function createIdentifierTokenMap(): array { - // Based on semi_reserved production. - return array_fill_keys([ - \T_STRING, - \T_STATIC, \T_ABSTRACT, \T_FINAL, \T_PRIVATE, \T_PROTECTED, \T_PUBLIC, \T_READONLY, - \T_INCLUDE, \T_INCLUDE_ONCE, \T_EVAL, \T_REQUIRE, \T_REQUIRE_ONCE, \T_LOGICAL_OR, \T_LOGICAL_XOR, \T_LOGICAL_AND, - \T_INSTANCEOF, \T_NEW, \T_CLONE, \T_EXIT, \T_IF, \T_ELSEIF, \T_ELSE, \T_ENDIF, \T_ECHO, \T_DO, \T_WHILE, - \T_ENDWHILE, \T_FOR, \T_ENDFOR, \T_FOREACH, \T_ENDFOREACH, \T_DECLARE, \T_ENDDECLARE, \T_AS, \T_TRY, \T_CATCH, - \T_FINALLY, \T_THROW, \T_USE, \T_INSTEADOF, \T_GLOBAL, \T_VAR, \T_UNSET, \T_ISSET, \T_EMPTY, \T_CONTINUE, \T_GOTO, - \T_FUNCTION, \T_CONST, \T_RETURN, \T_PRINT, \T_YIELD, \T_LIST, \T_SWITCH, \T_ENDSWITCH, \T_CASE, \T_DEFAULT, - \T_BREAK, \T_ARRAY, \T_CALLABLE, \T_EXTENDS, \T_IMPLEMENTS, \T_NAMESPACE, \T_TRAIT, \T_INTERFACE, \T_CLASS, - \T_CLASS_C, \T_TRAIT_C, \T_FUNC_C, \T_METHOD_C, \T_LINE, \T_FILE, \T_DIR, \T_NS_C, \T_HALT_COMPILER, \T_FN, - \T_MATCH, - ], true); + // Add sentinel token. + $tokens[] = new Token(0, "\0", $lastToken->getEndLine(), $lastToken->getEndPos()); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php index b0929f3c..934954cd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php @@ -18,42 +18,29 @@ use PhpParser\Lexer\TokenEmulator\ReadonlyFunctionTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReadonlyTokenEmulator; use PhpParser\Lexer\TokenEmulator\ReverseEmulator; use PhpParser\Lexer\TokenEmulator\TokenEmulator; +use PhpParser\PhpVersion; +use PhpParser\Token; -class Emulative extends Lexer -{ - const PHP_7_3 = '7.3dev'; - const PHP_7_4 = '7.4dev'; - const PHP_8_0 = '8.0dev'; - const PHP_8_1 = '8.1dev'; - const PHP_8_2 = '8.2dev'; +class Emulative extends Lexer { + /** @var array{int, string, string}[] Patches used to reverse changes introduced in the code */ + private array $patches = []; - /** @var mixed[] Patches used to reverse changes introduced in the code */ - private $patches = []; + /** @var list<TokenEmulator> */ + private array $emulators = []; - /** @var TokenEmulator[] */ - private $emulators = []; + private PhpVersion $targetPhpVersion; - /** @var string */ - private $targetPhpVersion; + private PhpVersion $hostPhpVersion; /** - * @param mixed[] $options Lexer options. In addition to the usual options, - * accepts a 'phpVersion' string that specifies the - * version to emulate. Defaults to newest supported. + * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. */ - public function __construct(array $options = []) - { - $this->targetPhpVersion = $options['phpVersion'] ?? Emulative::PHP_8_2; - unset($options['phpVersion']); - - parent::__construct($options); + public function __construct(?PhpVersion $phpVersion = null) { + $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); + $this->hostPhpVersion = PhpVersion::getHostVersion(); $emulators = [ - new FlexibleDocStringEmulator(), - new FnTokenEmulator(), new MatchTokenEmulator(), - new CoaleseEqualTokenEmulator(), - new NumericLiteralSeparatorEmulator(), new NullsafeTokenEmulator(), new AttributeEmulator(), new EnumTokenEmulator(), @@ -68,21 +55,24 @@ class Emulative extends Lexer $emulatorPhpVersion = $emulator->getPhpVersion(); if ($this->isForwardEmulationNeeded($emulatorPhpVersion)) { $this->emulators[] = $emulator; - } else if ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { + } elseif ($this->isReverseEmulationNeeded($emulatorPhpVersion)) { $this->emulators[] = new ReverseEmulator($emulator); } } } - public function startLexing(string $code, ErrorHandler $errorHandler = null) { - $emulators = array_filter($this->emulators, function($emulator) use($code) { + public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array { + $emulators = array_filter($this->emulators, function ($emulator) use ($code) { return $emulator->isEmulationNeeded($code); }); if (empty($emulators)) { // Nothing to emulate, yay - parent::startLexing($code, $errorHandler); - return; + return parent::tokenize($code, $errorHandler); + } + + if ($errorHandler === null) { + $errorHandler = new ErrorHandler\Throwing(); } $this->patches = []; @@ -91,9 +81,9 @@ class Emulative extends Lexer } $collector = new ErrorHandler\Collecting(); - parent::startLexing($code, $collector); + $tokens = parent::tokenize($code, $collector); $this->sortPatches(); - $this->fixupTokens(); + $tokens = $this->fixupTokens($tokens); $errors = $collector->getErrors(); if (!empty($errors)) { @@ -104,90 +94,80 @@ class Emulative extends Lexer } foreach ($emulators as $emulator) { - $this->tokens = $emulator->emulate($code, $this->tokens); + $tokens = $emulator->emulate($code, $tokens); } + + return $tokens; } - private function isForwardEmulationNeeded(string $emulatorPhpVersion): bool { - return version_compare(\PHP_VERSION, $emulatorPhpVersion, '<') - && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '>='); + private function isForwardEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { + return $this->hostPhpVersion->older($emulatorPhpVersion) + && $this->targetPhpVersion->newerOrEqual($emulatorPhpVersion); } - private function isReverseEmulationNeeded(string $emulatorPhpVersion): bool { - return version_compare(\PHP_VERSION, $emulatorPhpVersion, '>=') - && version_compare($this->targetPhpVersion, $emulatorPhpVersion, '<'); + private function isReverseEmulationNeeded(PhpVersion $emulatorPhpVersion): bool { + return $this->hostPhpVersion->newerOrEqual($emulatorPhpVersion) + && $this->targetPhpVersion->older($emulatorPhpVersion); } - private function sortPatches() - { + private function sortPatches(): void { // Patches may be contributed by different emulators. // Make sure they are sorted by increasing patch position. - usort($this->patches, function($p1, $p2) { + usort($this->patches, function ($p1, $p2) { return $p1[0] <=> $p2[0]; }); } - private function fixupTokens() - { + /** + * @param list<Token> $tokens + * @return list<Token> + */ + private function fixupTokens(array $tokens): array { if (\count($this->patches) === 0) { - return; + return $tokens; } // Load first patch $patchIdx = 0; - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; // We use a manual loop over the tokens, because we modify the array on the fly - $pos = 0; - for ($i = 0, $c = \count($this->tokens); $i < $c; $i++) { - $token = $this->tokens[$i]; - if (\is_string($token)) { - if ($patchPos === $pos) { - // Only support replacement for string tokens. - assert($patchType === 'replace'); - $this->tokens[$i] = $patchText; - - // Fetch the next patch - $patchIdx++; - if ($patchIdx >= \count($this->patches)) { - // No more patches, we're done - return; - } - list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - } - - $pos += \strlen($token); - continue; - } - - $len = \strlen($token[1]); - $posDelta = 0; + $posDelta = 0; + $lineDelta = 0; + for ($i = 0, $c = \count($tokens); $i < $c; $i++) { + $token = $tokens[$i]; + $pos = $token->pos; + $token->pos += $posDelta; + $token->line += $lineDelta; + $localPosDelta = 0; + $len = \strlen($token->text); while ($patchPos >= $pos && $patchPos < $pos + $len) { $patchTextLen = \strlen($patchText); if ($patchType === 'remove') { if ($patchPos === $pos && $patchTextLen === $len) { // Remove token entirely - array_splice($this->tokens, $i, 1, []); + array_splice($tokens, $i, 1, []); $i--; $c--; } else { // Remove from token string - $this->tokens[$i][1] = substr_replace( - $token[1], '', $patchPos - $pos + $posDelta, $patchTextLen + $token->text = substr_replace( + $token->text, '', $patchPos - $pos + $localPosDelta, $patchTextLen ); - $posDelta -= $patchTextLen; + $localPosDelta -= $patchTextLen; } + $lineDelta -= \substr_count($patchText, "\n"); } elseif ($patchType === 'add') { // Insert into the token string - $this->tokens[$i][1] = substr_replace( - $token[1], $patchText, $patchPos - $pos + $posDelta, 0 + $token->text = substr_replace( + $token->text, $patchText, $patchPos - $pos + $localPosDelta, 0 ); - $posDelta += $patchTextLen; - } else if ($patchType === 'replace') { + $localPosDelta += $patchTextLen; + $lineDelta += \substr_count($patchText, "\n"); + } elseif ($patchType === 'replace') { // Replace inside the token string - $this->tokens[$i][1] = substr_replace( - $token[1], $patchText, $patchPos - $pos + $posDelta, $patchTextLen + $token->text = substr_replace( + $token->text, $patchText, $patchPos - $pos + $localPosDelta, $patchTextLen ); } else { assert(false); @@ -196,22 +176,17 @@ class Emulative extends Lexer // Fetch the next patch $patchIdx++; if ($patchIdx >= \count($this->patches)) { - // No more patches, we're done - return; + // No more patches. However, we still need to adjust position. + $patchPos = \PHP_INT_MAX; + break; } list($patchPos, $patchType, $patchText) = $this->patches[$patchIdx]; - - // Multiple patches may apply to the same token. Reload the current one to check - // If the new patch applies - $token = $this->tokens[$i]; } - $pos += $len; + $posDelta += $localPosDelta; } - - // A patch did not apply - assert(false); + return $tokens; } /** @@ -219,7 +194,7 @@ class Emulative extends Lexer * * @param Error[] $errors */ - private function fixupErrors(array $errors) { + private function fixupErrors(array $errors): void { foreach ($errors as $error) { $attrs = $error->getAttributes(); @@ -235,7 +210,7 @@ class Emulative extends Lexer if ($patchType === 'add') { $posDelta += strlen($patchText); $lineDelta += substr_count($patchText, "\n"); - } else if ($patchType === 'remove') { + } elseif ($patchType === 'remove') { $posDelta -= strlen($patchText); $lineDelta -= substr_count($patchText, "\n"); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php index 6776a519..2c12f33a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php @@ -2,43 +2,36 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; +use PhpParser\Token; -final class AttributeEmulator extends TokenEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_0; +final class AttributeEmulator extends TokenEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 0); } - public function isEmulationNeeded(string $code) : bool - { + public function isEmulationNeeded(string $code): bool { return strpos($code, '#[') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way. - $line = 1; for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if ($tokens[$i] === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1] === '[') { + $token = $tokens[$i]; + if ($token->text === '#' && isset($tokens[$i + 1]) && $tokens[$i + 1]->text === '[') { array_splice($tokens, $i, 2, [ - [\T_ATTRIBUTE, '#[', $line] + new Token(\T_ATTRIBUTE, '#[', $token->line, $token->pos), ]); $c--; continue; } - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } } return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // TODO return $tokens; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php deleted file mode 100644 index d91da921..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php declare(strict_types=1); - -namespace PhpParser\Lexer\TokenEmulator; - -use PhpParser\Lexer\Emulative; - -final class CoaleseEqualTokenEmulator extends TokenEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_7_4; - } - - public function isEmulationNeeded(string $code): bool - { - return strpos($code, '??=') !== false; - } - - public function emulate(string $code, array $tokens): array - { - // We need to manually iterate and manage a count because we'll change - // the tokens array on the way - $line = 1; - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if (isset($tokens[$i + 1])) { - if ($tokens[$i][0] === T_COALESCE && $tokens[$i + 1] === '=') { - array_splice($tokens, $i, 2, [ - [\T_COALESCE_EQUAL, '??=', $line] - ]); - $c--; - continue; - } - } - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } - } - - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array - { - // ??= was not valid code previously, don't bother. - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php index 4ddc0b17..5418f52c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php @@ -2,30 +2,25 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; -final class EnumTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_1; +final class EnumTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 1); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'enum'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_ENUM; } - protected function isKeywordContext(array $tokens, int $pos): bool - { + protected function isKeywordContext(array $tokens, int $pos): bool { return parent::isKeywordContext($tokens, $pos) && isset($tokens[$pos + 2]) - && $tokens[$pos + 1][0] === \T_WHITESPACE - && $tokens[$pos + 2][0] === \T_STRING; + && $tokens[$pos + 1]->id === \T_WHITESPACE + && $tokens[$pos + 2]->id === \T_STRING; } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php index f5f6805b..9cadf420 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php @@ -2,11 +2,12 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; +use PhpParser\Token; class ExplicitOctalEmulator extends TokenEmulator { - public function getPhpVersion(): string { - return Emulative::PHP_8_1; + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 1); } public function isEmulationNeeded(string $code): bool { @@ -15,13 +16,14 @@ class ExplicitOctalEmulator extends TokenEmulator { public function emulate(string $code, array $tokens): array { for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if ($tokens[$i][0] == \T_LNUMBER && $tokens[$i][1] === '0' && - isset($tokens[$i + 1]) && $tokens[$i + 1][0] == \T_STRING && - preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1][1]) + $token = $tokens[$i]; + if ($token->id == \T_LNUMBER && $token->text === '0' && + isset($tokens[$i + 1]) && $tokens[$i + 1]->id == \T_STRING && + preg_match('/[oO][0-7]+(?:_[0-7]+)*/', $tokens[$i + 1]->text) ) { - $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1][1]); + $tokenKind = $this->resolveIntegerOrFloatToken($tokens[$i + 1]->text); array_splice($tokens, $i, 2, [ - [$tokenKind, '0' . $tokens[$i + 1][1], $tokens[$i][2]], + new Token($tokenKind, '0' . $tokens[$i + 1]->text, $token->line, $token->pos), ]); $c--; } @@ -29,8 +31,7 @@ class ExplicitOctalEmulator extends TokenEmulator { return $tokens; } - private function resolveIntegerOrFloatToken(string $str): int - { + private function resolveIntegerOrFloatToken(string $str): int { $str = substr($str, 1); $str = str_replace('_', '', $str); $num = octdec($str); @@ -41,4 +42,4 @@ class ExplicitOctalEmulator extends TokenEmulator { // Explicit octals were not legal code previously, don't bother. return $tokens; } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php deleted file mode 100644 index c15d6271..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php declare(strict_types=1); - -namespace PhpParser\Lexer\TokenEmulator; - -use PhpParser\Lexer\Emulative; - -final class FlexibleDocStringEmulator extends TokenEmulator -{ - const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX' -/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n -(?:.*\r?\n)*? -(?<indentation>\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?<separator>(?:;?[\r\n])?)/x -REGEX; - - public function getPhpVersion(): string - { - return Emulative::PHP_7_3; - } - - public function isEmulationNeeded(string $code) : bool - { - return strpos($code, '<<<') !== false; - } - - public function emulate(string $code, array $tokens): array - { - // Handled by preprocessing + fixup. - return $tokens; - } - - public function reverseEmulate(string $code, array $tokens): array - { - // Not supported. - return $tokens; - } - - public function preprocessCode(string $code, array &$patches): string { - if (!preg_match_all(self::FLEXIBLE_DOC_STRING_REGEX, $code, $matches, PREG_SET_ORDER|PREG_OFFSET_CAPTURE)) { - // No heredoc/nowdoc found - return $code; - } - - // Keep track of how much we need to adjust string offsets due to the modifications we - // already made - $posDelta = 0; - foreach ($matches as $match) { - $indentation = $match['indentation'][0]; - $indentationStart = $match['indentation'][1]; - - $separator = $match['separator'][0]; - $separatorStart = $match['separator'][1]; - - if ($indentation === '' && $separator !== '') { - // Ordinary heredoc/nowdoc - continue; - } - - if ($indentation !== '') { - // Remove indentation - $indentationLen = strlen($indentation); - $code = substr_replace($code, '', $indentationStart + $posDelta, $indentationLen); - $patches[] = [$indentationStart + $posDelta, 'add', $indentation]; - $posDelta -= $indentationLen; - } - - if ($separator === '') { - // Insert newline as separator - $code = substr_replace($code, "\n", $separatorStart + $posDelta, 0); - $patches[] = [$separatorStart + $posDelta, 'remove', "\n"]; - $posDelta += 1; - } - } - - return $code; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php deleted file mode 100644 index eb7e4963..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php declare(strict_types=1); - -namespace PhpParser\Lexer\TokenEmulator; - -use PhpParser\Lexer\Emulative; - -final class FnTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_7_4; - } - - public function getKeywordString(): string - { - return 'fn'; - } - - public function getKeywordToken(): int - { - return \T_FN; - } -} \ No newline at end of file diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php index f8e83629..9803f996 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php @@ -2,43 +2,38 @@ namespace PhpParser\Lexer\TokenEmulator; -abstract class KeywordEmulator extends TokenEmulator -{ - abstract function getKeywordString(): string; - abstract function getKeywordToken(): int; +use PhpParser\Token; - public function isEmulationNeeded(string $code): bool - { +abstract class KeywordEmulator extends TokenEmulator { + abstract public function getKeywordString(): string; + abstract public function getKeywordToken(): int; + + public function isEmulationNeeded(string $code): bool { return strpos(strtolower($code), $this->getKeywordString()) !== false; } - protected function isKeywordContext(array $tokens, int $pos): bool - { + /** @param Token[] $tokens */ + protected function isKeywordContext(array $tokens, int $pos): bool { $previousNonSpaceToken = $this->getPreviousNonSpaceToken($tokens, $pos); - return $previousNonSpaceToken === null || $previousNonSpaceToken[0] !== \T_OBJECT_OPERATOR; + return $previousNonSpaceToken === null || $previousNonSpaceToken->id !== \T_OBJECT_OPERATOR; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { $keywordString = $this->getKeywordString(); foreach ($tokens as $i => $token) { - if ($token[0] === T_STRING && strtolower($token[1]) === $keywordString + if ($token->id === T_STRING && strtolower($token->text) === $keywordString && $this->isKeywordContext($tokens, $i)) { - $tokens[$i][0] = $this->getKeywordToken(); + $token->id = $this->getKeywordToken(); } } return $tokens; } - /** - * @param mixed[] $tokens - * @return array|string|null - */ - private function getPreviousNonSpaceToken(array $tokens, int $start) - { + /** @param Token[] $tokens */ + private function getPreviousNonSpaceToken(array $tokens, int $start): ?Token { for ($i = $start - 1; $i >= 0; --$i) { - if ($tokens[$i][0] === T_WHITESPACE) { + if ($tokens[$i]->id === T_WHITESPACE) { continue; } @@ -48,12 +43,11 @@ abstract class KeywordEmulator extends TokenEmulator return null; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { $keywordToken = $this->getKeywordToken(); - foreach ($tokens as $i => $token) { - if ($token[0] === $keywordToken) { - $tokens[$i][0] = \T_STRING; + foreach ($tokens as $token) { + if ($token->id === $keywordToken) { + $token->id = \T_STRING; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php index 902a46df..0fa5fbc2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php @@ -2,22 +2,18 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; -final class MatchTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_0; +final class MatchTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 0); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'match'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_MATCH; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php index 1a29c676..cede96f0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php @@ -2,65 +2,58 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; +use PhpParser\Token; -final class NullsafeTokenEmulator extends TokenEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_0; +final class NullsafeTokenEmulator extends TokenEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 0); } - public function isEmulationNeeded(string $code): bool - { + public function isEmulationNeeded(string $code): bool { return strpos($code, '?->') !== false; } - public function emulate(string $code, array $tokens): array - { + public function emulate(string $code, array $tokens): array { // We need to manually iterate and manage a count because we'll change // the tokens array on the way - $line = 1; for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - if ($tokens[$i] === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1][0] === \T_OBJECT_OPERATOR) { + $token = $tokens[$i]; + if ($token->text === '?' && isset($tokens[$i + 1]) && $tokens[$i + 1]->id === \T_OBJECT_OPERATOR) { array_splice($tokens, $i, 2, [ - [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line] + new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), ]); $c--; continue; } // Handle ?-> inside encapsed string. - if ($tokens[$i][0] === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) - && $tokens[$i - 1][0] === \T_VARIABLE - && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $tokens[$i][1], $matches) + if ($token->id === \T_ENCAPSED_AND_WHITESPACE && isset($tokens[$i - 1]) + && $tokens[$i - 1]->id === \T_VARIABLE + && preg_match('/^\?->([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)/', $token->text, $matches) ) { $replacement = [ - [\T_NULLSAFE_OBJECT_OPERATOR, '?->', $line], - [\T_STRING, $matches[1], $line], + new Token(\T_NULLSAFE_OBJECT_OPERATOR, '?->', $token->line, $token->pos), + new Token(\T_STRING, $matches[1], $token->line, $token->pos + 3), ]; - if (\strlen($matches[0]) !== \strlen($tokens[$i][1])) { - $replacement[] = [ + $matchLen = \strlen($matches[0]); + if ($matchLen !== \strlen($token->text)) { + $replacement[] = new Token( \T_ENCAPSED_AND_WHITESPACE, - \substr($tokens[$i][1], \strlen($matches[0])), - $line - ]; + \substr($token->text, $matchLen), + $token->line, $token->pos + $matchLen + ); } array_splice($tokens, $i, 1, $replacement); $c += \count($replacement) - 1; continue; } - - if (\is_array($tokens[$i])) { - $line += substr_count($tokens[$i][1], "\n"); - } } return $tokens; } - public function reverseEmulate(string $code, array $tokens): array - { + public function reverseEmulate(string $code, array $tokens): array { // ?-> was not valid code previously, don't bother. return $tokens; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php deleted file mode 100644 index cdf793e4..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php declare(strict_types=1); - -namespace PhpParser\Lexer\TokenEmulator; - -use PhpParser\Lexer\Emulative; - -final class NumericLiteralSeparatorEmulator extends TokenEmulator -{ - const BIN = '(?:0b[01]+(?:_[01]+)*)'; - const HEX = '(?:0x[0-9a-f]+(?:_[0-9a-f]+)*)'; - const DEC = '(?:[0-9]+(?:_[0-9]+)*)'; - const SIMPLE_FLOAT = '(?:' . self::DEC . '\.' . self::DEC . '?|\.' . self::DEC . ')'; - const EXP = '(?:e[+-]?' . self::DEC . ')'; - const FLOAT = '(?:' . self::SIMPLE_FLOAT . self::EXP . '?|' . self::DEC . self::EXP . ')'; - const NUMBER = '~' . self::FLOAT . '|' . self::BIN . '|' . self::HEX . '|' . self::DEC . '~iA'; - - public function getPhpVersion(): string - { - return Emulative::PHP_7_4; - } - - public function isEmulationNeeded(string $code) : bool - { - return preg_match('~[0-9]_[0-9]~', $code) - || preg_match('~0x[0-9a-f]+_[0-9a-f]~i', $code); - } - - public function emulate(string $code, array $tokens): array - { - // We need to manually iterate and manage a count because we'll change - // the tokens array on the way - $codeOffset = 0; - for ($i = 0, $c = count($tokens); $i < $c; ++$i) { - $token = $tokens[$i]; - $tokenLen = \strlen(\is_array($token) ? $token[1] : $token); - - if ($token[0] !== T_LNUMBER && $token[0] !== T_DNUMBER) { - $codeOffset += $tokenLen; - continue; - } - - $res = preg_match(self::NUMBER, $code, $matches, 0, $codeOffset); - assert($res, "No number at number token position"); - - $match = $matches[0]; - $matchLen = \strlen($match); - if ($matchLen === $tokenLen) { - // Original token already holds the full number. - $codeOffset += $tokenLen; - continue; - } - - $tokenKind = $this->resolveIntegerOrFloatToken($match); - $newTokens = [[$tokenKind, $match, $token[2]]]; - - $numTokens = 1; - $len = $tokenLen; - while ($matchLen > $len) { - $nextToken = $tokens[$i + $numTokens]; - $nextTokenText = \is_array($nextToken) ? $nextToken[1] : $nextToken; - $nextTokenLen = \strlen($nextTokenText); - - $numTokens++; - if ($matchLen < $len + $nextTokenLen) { - // Split trailing characters into a partial token. - assert(is_array($nextToken), "Partial token should be an array token"); - $partialText = substr($nextTokenText, $matchLen - $len); - $newTokens[] = [$nextToken[0], $partialText, $nextToken[2]]; - break; - } - - $len += $nextTokenLen; - } - - array_splice($tokens, $i, $numTokens, $newTokens); - $c -= $numTokens - \count($newTokens); - $codeOffset += $matchLen; - } - - return $tokens; - } - - private function resolveIntegerOrFloatToken(string $str): int - { - $str = str_replace('_', '', $str); - - if (stripos($str, '0b') === 0) { - $num = bindec($str); - } elseif (stripos($str, '0x') === 0) { - $num = hexdec($str); - } elseif (stripos($str, '0') === 0 && ctype_digit($str)) { - $num = octdec($str); - } else { - $num = +$str; - } - - return is_float($num) ? T_DNUMBER : T_LNUMBER; - } - - public function reverseEmulate(string $code, array $tokens): array - { - // Numeric separators were not legal code previously, don't bother. - return $tokens; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php index e671458c..5990d7fa 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php @@ -2,7 +2,7 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; /* * In PHP 8.1, "readonly(" was special cased in the lexer in order to support functions with @@ -20,8 +20,8 @@ class ReadonlyFunctionTokenEmulator extends KeywordEmulator { return \T_READONLY; } - public function getPhpVersion(): string { - return Emulative::PHP_8_2; + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 2); } public function reverseEmulate(string $code, array $tokens): array { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php index 539a2bcf..37240f79 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php @@ -2,35 +2,30 @@ namespace PhpParser\Lexer\TokenEmulator; -use PhpParser\Lexer\Emulative; +use PhpParser\PhpVersion; -final class ReadonlyTokenEmulator extends KeywordEmulator -{ - public function getPhpVersion(): string - { - return Emulative::PHP_8_1; +final class ReadonlyTokenEmulator extends KeywordEmulator { + public function getPhpVersion(): PhpVersion { + return PhpVersion::fromComponents(8, 1); } - public function getKeywordString(): string - { + public function getKeywordString(): string { return 'readonly'; } - public function getKeywordToken(): int - { + public function getKeywordToken(): int { return \T_READONLY; } - protected function isKeywordContext(array $tokens, int $pos): bool - { + protected function isKeywordContext(array $tokens, int $pos): bool { if (!parent::isKeywordContext($tokens, $pos)) { return false; } // Support "function readonly(" return !(isset($tokens[$pos + 1]) && - ($tokens[$pos + 1][0] === '(' || - ($tokens[$pos + 1][0] === \T_WHITESPACE && + ($tokens[$pos + 1]->text === '(' || + ($tokens[$pos + 1]->id === \T_WHITESPACE && isset($tokens[$pos + 2]) && - $tokens[$pos + 2][0] === '('))); + $tokens[$pos + 2]->text === '('))); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php index 90093f66..851b5c4a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php @@ -2,19 +2,20 @@ namespace PhpParser\Lexer\TokenEmulator; +use PhpParser\PhpVersion; + /** * Reverses emulation direction of the inner emulator. */ -final class ReverseEmulator extends TokenEmulator -{ +final class ReverseEmulator extends TokenEmulator { /** @var TokenEmulator Inner emulator */ - private $emulator; + private TokenEmulator $emulator; public function __construct(TokenEmulator $emulator) { $this->emulator = $emulator; } - public function getPhpVersion(): string { + public function getPhpVersion(): PhpVersion { return $this->emulator->getPhpVersion(); } @@ -33,4 +34,4 @@ final class ReverseEmulator extends TokenEmulator public function preprocessCode(string $code, array &$patches): string { return $code; } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php index a020bc0f..fec2f19f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php @@ -2,23 +2,28 @@ namespace PhpParser\Lexer\TokenEmulator; +use PhpParser\PhpVersion; +use PhpParser\Token; + /** @internal */ -abstract class TokenEmulator -{ - abstract public function getPhpVersion(): string; +abstract class TokenEmulator { + abstract public function getPhpVersion(): PhpVersion; abstract public function isEmulationNeeded(string $code): bool; /** - * @return array Modified Tokens + * @param Token[] $tokens Original tokens + * @return Token[] Modified Tokens */ abstract public function emulate(string $code, array $tokens): array; /** - * @return array Modified Tokens + * @param Token[] $tokens Original tokens + * @return Token[] Modified Tokens */ abstract public function reverseEmulate(string $code, array $tokens): array; + /** @param array{int, string, string}[] $patches */ public function preprocessCode(string $code, array &$patches): string { return $code; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php b/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php new file mode 100644 index 00000000..b7120eea --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php @@ -0,0 +1,69 @@ +<?php declare(strict_types=1); + +namespace PhpParser; + +/** + * Modifiers used (as a bit mask) by various flags subnodes, for example on classes, functions, + * properties and constants. + */ +final class Modifiers { + public const PUBLIC = 1; + public const PROTECTED = 2; + public const PRIVATE = 4; + public const STATIC = 8; + public const ABSTRACT = 16; + public const FINAL = 32; + public const READONLY = 64; + + public const VISIBILITY_MASK = 1 | 2 | 4; + + /** + * @internal + */ + public static function verifyClassModifier(int $a, int $b): void { + if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { + throw new Error('Multiple abstract modifiers are not allowed'); + } + + if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { + throw new Error('Multiple final modifiers are not allowed'); + } + + if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { + throw new Error('Multiple readonly modifiers are not allowed'); + } + + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class'); + } + } + + /** + * @internal + */ + public static function verifyModifier(int $a, int $b): void { + if ($a & Modifiers::VISIBILITY_MASK && $b & Modifiers::VISIBILITY_MASK) { + throw new Error('Multiple access type modifiers are not allowed'); + } + + if ($a & Modifiers::ABSTRACT && $b & Modifiers::ABSTRACT) { + throw new Error('Multiple abstract modifiers are not allowed'); + } + + if ($a & Modifiers::STATIC && $b & Modifiers::STATIC) { + throw new Error('Multiple static modifiers are not allowed'); + } + + if ($a & Modifiers::FINAL && $b & Modifiers::FINAL) { + throw new Error('Multiple final modifiers are not allowed'); + } + + if ($a & Modifiers::READONLY && $b & Modifiers::READONLY) { + throw new Error('Multiple readonly modifiers are not allowed'); + } + + if ($a & 48 && $b & 48) { + throw new Error('Cannot use the final modifier on an abstract class member'); + } + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php b/vendor/nikic/php-parser/lib/PhpParser/NameContext.php index 777a4afd..292df691 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NameContext.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NameContext.php @@ -6,19 +6,18 @@ use PhpParser\Node\Name; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt; -class NameContext -{ +class NameContext { /** @var null|Name Current namespace */ - protected $namespace; + protected ?Name $namespace; /** @var Name[][] Map of format [aliasType => [aliasName => originalName]] */ - protected $aliases = []; + protected array $aliases = []; /** @var Name[][] Same as $aliases but preserving original case */ - protected $origAliases = []; + protected array $origAliases = []; /** @var ErrorHandler Error handler */ - protected $errorHandler; + protected ErrorHandler $errorHandler; /** * Create a name context. @@ -36,7 +35,7 @@ class NameContext * * @param Name|null $namespace Null is the global namespace */ - public function startNamespace(Name $namespace = null) { + public function startNamespace(?Name $namespace = null): void { $this->namespace = $namespace; $this->origAliases = $this->aliases = [ Stmt\Use_::TYPE_NORMAL => [], @@ -48,12 +47,12 @@ class NameContext /** * Add an alias / import. * - * @param Name $name Original name - * @param string $aliasName Aliased name - * @param int $type One of Stmt\Use_::TYPE_* - * @param array $errorAttrs Attributes to use to report an error + * @param Name $name Original name + * @param string $aliasName Aliased name + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* + * @param array<string, mixed> $errorAttrs Attributes to use to report an error */ - public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []) { + public function addAlias(Name $name, string $aliasName, int $type, array $errorAttrs = []): void { // Constant names are case sensitive, everything else case insensitive if ($type === Stmt\Use_::TYPE_CONSTANT) { $aliasLookupName = $aliasName; @@ -87,7 +86,7 @@ class NameContext * * @return null|Name Namespace (or null if global namespace) */ - public function getNamespace() { + public function getNamespace(): ?Name { return $this->namespace; } @@ -95,11 +94,11 @@ class NameContext * Get resolved name. * * @param Name $name Name to resolve - * @param int $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_{FUNCTION|CONSTANT} * * @return null|Name Resolved name, or null if static resolution is not possible */ - public function getResolvedName(Name $name, int $type) { + public function getResolvedName(Name $name, int $type): ?Name { // don't resolve special class names if ($type === Stmt\Use_::TYPE_NORMAL && $name->isSpecialClassName()) { if (!$name->isUnqualified()) { @@ -142,7 +141,7 @@ class NameContext * * @return Name Resolved name */ - public function getResolvedClassName(Name $name) : Name { + public function getResolvedClassName(Name $name): Name { return $this->getResolvedName($name, Stmt\Use_::TYPE_NORMAL); } @@ -150,11 +149,11 @@ class NameContext * Get possible ways of writing a fully qualified name (e.g., by making use of aliases). * * @param string $name Fully-qualified name (without leading namespace separator) - * @param int $type One of Stmt\Use_::TYPE_* + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name[] Possible representations of the name */ - public function getPossibleNames(string $name, int $type) : array { + public function getPossibleNames(string $name, int $type): array { $lcName = strtolower($name); if ($type === Stmt\Use_::TYPE_NORMAL) { @@ -206,11 +205,11 @@ class NameContext * Get shortest representation of this fully-qualified name. * * @param string $name Fully-qualified name (without leading namespace separator) - * @param int $type One of Stmt\Use_::TYPE_* + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name Shortest representation */ - public function getShortName(string $name, int $type) : Name { + public function getShortName(string $name, int $type): Name { $possibleNames = $this->getPossibleNames($name, $type); // Find shortest name @@ -224,10 +223,10 @@ class NameContext } } - return $shortestName; + return $shortestName; } - private function resolveAlias(Name $name, $type) { + private function resolveAlias(Name $name, int $type): ?FullyQualified { $firstPart = $name->getFirst(); if ($name->isQualified()) { @@ -250,7 +249,7 @@ class NameContext return null; } - private function getNamespaceRelativeName(string $name, string $lcName, int $type) { + private function getNamespaceRelativeName(string $name, string $lcName, int $type): ?Name { if (null === $this->namespace) { return new Name($name); } @@ -271,7 +270,7 @@ class NameContext return null; } - private function normalizeConstName(string $name) { + private function normalizeConstName(string $name): string { $nsSep = strrpos($name, '\\'); if (false === $nsSep) { return $name; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node.php b/vendor/nikic/php-parser/lib/PhpParser/Node.php index befb2565..258e4516 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node.php @@ -2,28 +2,29 @@ namespace PhpParser; -interface Node -{ +interface Node { /** * Gets the type of the node. * * @return string Type of the node */ - public function getType() : string; + public function getType(): string; /** * Gets the names of the sub nodes. * - * @return array Names of sub nodes + * @return string[] Names of sub nodes */ - public function getSubNodeNames() : array; + public function getSubNodeNames(): array; /** * Gets line the node started in (alias of getStartLine). * * @return int Start line (or -1 if not available) + * + * @deprecated Use getStartLine() instead */ - public function getLine() : int; + public function getLine(): int; /** * Gets line the node started in. @@ -32,7 +33,7 @@ interface Node * * @return int Start line (or -1 if not available) */ - public function getStartLine() : int; + public function getStartLine(): int; /** * Gets the line the node ended in. @@ -41,7 +42,7 @@ interface Node * * @return int End line (or -1 if not available) */ - public function getEndLine() : int; + public function getEndLine(): int; /** * Gets the token offset of the first token that is part of this node. @@ -52,7 +53,7 @@ interface Node * * @return int Token start position (or -1 if not available) */ - public function getStartTokenPos() : int; + public function getStartTokenPos(): int; /** * Gets the token offset of the last token that is part of this node. @@ -63,7 +64,7 @@ interface Node * * @return int Token end position (or -1 if not available) */ - public function getEndTokenPos() : int; + public function getEndTokenPos(): int; /** * Gets the file offset of the first character that is part of this node. @@ -72,7 +73,7 @@ interface Node * * @return int File start position (or -1 if not available) */ - public function getStartFilePos() : int; + public function getStartFilePos(): int; /** * Gets the file offset of the last character that is part of this node. @@ -81,7 +82,7 @@ interface Node * * @return int File end position (or -1 if not available) */ - public function getEndFilePos() : int; + public function getEndFilePos(): int; /** * Gets all comments directly preceding this node. @@ -90,14 +91,14 @@ interface Node * * @return Comment[] */ - public function getComments() : array; + public function getComments(): array; /** * Gets the doc comment of the node. * * @return null|Comment\Doc Doc comment object or null */ - public function getDocComment(); + public function getDocComment(): ?Comment\Doc; /** * Sets the doc comment of the node. @@ -106,30 +107,24 @@ interface Node * * @param Comment\Doc $docComment Doc comment to set */ - public function setDocComment(Comment\Doc $docComment); + public function setDocComment(Comment\Doc $docComment): void; /** * Sets an attribute on a node. * - * @param string $key - * @param mixed $value + * @param mixed $value */ - public function setAttribute(string $key, $value); + public function setAttribute(string $key, $value): void; /** * Returns whether an attribute exists. - * - * @param string $key - * - * @return bool */ - public function hasAttribute(string $key) : bool; + public function hasAttribute(string $key): bool; /** * Returns the value of an attribute. * - * @param string $key - * @param mixed $default + * @param mixed $default * * @return mixed */ @@ -138,14 +133,14 @@ interface Node /** * Returns all the attributes of this node. * - * @return array + * @return array<string, mixed> */ - public function getAttributes() : array; + public function getAttributes(): array; /** * Replaces all the attributes of this node. * - * @param array $attributes + * @param array<string, mixed> $attributes */ - public function setAttributes(array $attributes); + public function setAttributes(array $attributes): void; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php index bcf130e6..6680efac 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php @@ -2,32 +2,30 @@ namespace PhpParser\Node; -use PhpParser\Node\VariadicPlaceholder; use PhpParser\NodeAbstract; -class Arg extends NodeAbstract -{ +class Arg extends NodeAbstract { /** @var Identifier|null Parameter name (for named parameters) */ - public $name; + public ?Identifier $name; /** @var Expr Value to pass */ - public $value; + public Expr $value; /** @var bool Whether to pass by ref */ - public $byRef; + public bool $byRef; /** @var bool Whether to unpack the argument */ - public $unpack; + public bool $unpack; /** * Constructs a function call argument node. * - * @param Expr $value Value to pass - * @param bool $byRef Whether to pass by ref - * @param bool $unpack Whether to unpack the argument - * @param array $attributes Additional attributes + * @param Expr $value Value to pass + * @param bool $byRef Whether to pass by ref + * @param bool $unpack Whether to unpack the argument + * @param array<string, mixed> $attributes Additional attributes * @param Identifier|null $name Parameter name (for named parameters) */ public function __construct( Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], - Identifier $name = null + ?Identifier $name = null ) { $this->attributes = $attributes; $this->name = $name; @@ -36,11 +34,11 @@ class Arg extends NodeAbstract $this->unpack = $unpack; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'value', 'byRef', 'unpack']; } - - public function getType() : string { + + public function getType(): string { return 'Arg'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php new file mode 100644 index 00000000..fa1cff52 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php @@ -0,0 +1,43 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node; + +use PhpParser\NodeAbstract; + +class ArrayItem extends NodeAbstract { + /** @var null|Expr Key */ + public ?Expr $key; + /** @var Expr Value */ + public Expr $value; + /** @var bool Whether to assign by reference */ + public bool $byRef; + /** @var bool Whether to unpack the argument */ + public bool $unpack; + + /** + * Constructs an array item node. + * + * @param Expr $value Value + * @param null|Expr $key Key + * @param bool $byRef Whether to assign by reference + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { + $this->attributes = $attributes; + $this->key = $key; + $this->value = $value; + $this->byRef = $byRef; + $this->unpack = $unpack; + } + + public function getSubNodeNames(): array { + return ['key', 'value', 'byRef', 'unpack']; + } + + public function getType(): string { + return 'ArrayItem'; + } +} + +// @deprecated compatibility alias +class_alias(ArrayItem::class, Expr\ArrayItem::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php index c96f66e5..9d892436 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php @@ -5,18 +5,17 @@ namespace PhpParser\Node; use PhpParser\Node; use PhpParser\NodeAbstract; -class Attribute extends NodeAbstract -{ +class Attribute extends NodeAbstract { /** @var Name Attribute name */ - public $name; + public Name $name; - /** @var Arg[] Attribute arguments */ - public $args; + /** @var list<Arg> Attribute arguments */ + public array $args; /** - * @param Node\Name $name Attribute name - * @param Arg[] $args Attribute arguments - * @param array $attributes Additional node attributes + * @param Node\Name $name Attribute name + * @param list<Arg> $args Attribute arguments + * @param array<string, mixed> $attributes Additional node attributes */ public function __construct(Name $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Attribute extends NodeAbstract $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'args']; } - public function getType() : string { + public function getType(): string { return 'Attribute'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php b/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php index 613bfc41..b9eb588d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php @@ -2,28 +2,26 @@ namespace PhpParser\Node; -use PhpParser\Node; use PhpParser\NodeAbstract; -class AttributeGroup extends NodeAbstract -{ +class AttributeGroup extends NodeAbstract { /** @var Attribute[] Attributes */ - public $attrs; + public array $attrs; /** * @param Attribute[] $attrs PHP attributes - * @param array $attributes Additional node attributes + * @param array<string, mixed> $attributes Additional node attributes */ public function __construct(array $attrs, array $attributes = []) { $this->attributes = $attributes; $this->attrs = $attrs; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrs']; } - public function getType() : string { + public function getType(): string { return 'AttributeGroup'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php new file mode 100644 index 00000000..e313280b --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php @@ -0,0 +1,36 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node; + +use PhpParser\NodeAbstract; + +class ClosureUse extends NodeAbstract { + /** @var Expr\Variable Variable to use */ + public Expr\Variable $var; + /** @var bool Whether to use by reference */ + public bool $byRef; + + /** + * Constructs a closure use node. + * + * @param Expr\Variable $var Variable to use + * @param bool $byRef Whether to use by reference + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { + $this->attributes = $attributes; + $this->var = $var; + $this->byRef = $byRef; + } + + public function getSubNodeNames(): array { + return ['var', 'byRef']; + } + + public function getType(): string { + return 'ClosureUse'; + } +} + +// @deprecated compatibility alias +class_alias(ClosureUse::class, Expr\ClosureUse::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php index 9505532a..05a5e5ee 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/ComplexType.php @@ -9,6 +9,5 @@ use PhpParser\NodeAbstract; * * It does not provide any shared behavior and exists only for type-checking purposes. */ -abstract class ComplexType extends NodeAbstract -{ +abstract class ComplexType extends NodeAbstract { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php index 07a74df8..8b26ae86 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php @@ -4,22 +4,21 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; -class Const_ extends NodeAbstract -{ +class Const_ extends NodeAbstract { /** @var Identifier Name */ - public $name; + public Identifier $name; /** @var Expr Value */ - public $value; + public Expr $value; /** @var Name|null Namespaced name (if using NameResolver) */ - public $namespacedName; + public ?Name $namespacedName; /** * Constructs a const node for use in class const and const statements. * - * @param string|Identifier $name Name - * @param Expr $value Value - * @param array $attributes Additional attributes + * @param string|Identifier $name Name + * @param Expr $value Value + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, Expr $value, array $attributes = []) { $this->attributes = $attributes; @@ -27,11 +26,11 @@ class Const_ extends NodeAbstract $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'value']; } - public function getType() : string { + public function getType(): string { return 'Const'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php new file mode 100644 index 00000000..55c1fe4f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php @@ -0,0 +1,37 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node; + +use PhpParser\Node; +use PhpParser\NodeAbstract; + +class DeclareItem extends NodeAbstract { + /** @var Node\Identifier Key */ + public Identifier $key; + /** @var Node\Expr Value */ + public Expr $value; + + /** + * Constructs a declare key=>value pair node. + * + * @param string|Node\Identifier $key Key + * @param Node\Expr $value Value + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct($key, Node\Expr $value, array $attributes = []) { + $this->attributes = $attributes; + $this->key = \is_string($key) ? new Node\Identifier($key) : $key; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['key', 'value']; + } + + public function getType(): string { + return 'DeclareItem'; + } +} + +// @deprecated compatibility alias +class_alias(DeclareItem::class, Stmt\DeclareDeclare::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php index 6cf4df22..8b7dbb6c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php @@ -4,6 +4,5 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; -abstract class Expr extends NodeAbstract -{ +abstract class Expr extends NodeAbstract { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php index 71694478..24427bbc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php @@ -4,31 +4,30 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class ArrayDimFetch extends Expr -{ +class ArrayDimFetch extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var null|Expr Array index / dim */ - public $dim; + public ?Expr $dim; /** * Constructs an array index fetch node. * - * @param Expr $var Variable - * @param null|Expr $dim Array index / dim - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param null|Expr $dim Array index / dim + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Expr $var, Expr $dim = null, array $attributes = []) { + public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->dim = $dim; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'dim']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ArrayDimFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php index 1b078f82..490ac937 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php @@ -1,41 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Expr; - -use PhpParser\Node\Expr; - -class ArrayItem extends Expr -{ - /** @var null|Expr Key */ - public $key; - /** @var Expr Value */ - public $value; - /** @var bool Whether to assign by reference */ - public $byRef; - /** @var bool Whether to unpack the argument */ - public $unpack; - - /** - * Constructs an array item node. - * - * @param Expr $value Value - * @param null|Expr $key Key - * @param bool $byRef Whether to assign by reference - * @param array $attributes Additional attributes - */ - public function __construct(Expr $value, Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { - $this->attributes = $attributes; - $this->key = $key; - $this->value = $value; - $this->byRef = $byRef; - $this->unpack = $unpack; - } - - public function getSubNodeNames() : array { - return ['key', 'value', 'byRef', 'unpack']; - } - - public function getType() : string { - return 'Expr_ArrayItem'; - } -} +require __DIR__ . '/../ArrayItem.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php index e6eaa283..3c8c9c2f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php @@ -2,33 +2,33 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr; -class Array_ extends Expr -{ +class Array_ extends Expr { // For use in "kind" attribute - const KIND_LONG = 1; // array() syntax - const KIND_SHORT = 2; // [] syntax + public const KIND_LONG = 1; // array() syntax + public const KIND_SHORT = 2; // [] syntax - /** @var (ArrayItem|null)[] Items */ - public $items; + /** @var ArrayItem[] Items */ + public array $items; /** * Constructs an array node. * - * @param (ArrayItem|null)[] $items Items of the array - * @param array $attributes Additional attributes + * @param ArrayItem[] $items Items of the array + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $items = [], array $attributes = []) { $this->attributes = $attributes; $this->items = $items; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['items']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Array'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php index c273fb7e..0e98ce9f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php @@ -6,55 +6,60 @@ use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\FunctionLike; -class ArrowFunction extends Expr implements FunctionLike -{ - /** @var bool */ - public $static; +class ArrowFunction extends Expr implements FunctionLike { + /** @var bool Whether the closure is static */ + public bool $static; - /** @var bool */ - public $byRef; + /** @var bool Whether to return by reference */ + public bool $byRef; /** @var Node\Param[] */ - public $params = []; + public array $params = []; /** @var null|Node\Identifier|Node\Name|Node\ComplexType */ - public $returnType; + public ?Node $returnType; - /** @var Expr */ - public $expr; + /** @var Expr Expression body */ + public Expr $expr; /** @var Node\AttributeGroup[] */ - public $attrGroups; + public array $attrGroups; /** - * @param array $subNodes Array of the following optional subnodes: - * 'static' => false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'expr' => Expr : Expression body - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * expr: Expr, + * static?: bool, + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * attrGroups?: Node\AttributeGroup[] + * } $subNodes Array of the following subnodes: + * 'expr' : Expression body + * 'static' => false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'attrGroups' => array() : PHP attribute groups + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(array $subNodes = [], array $attributes = []) { + public function __construct(array $subNodes, array $attributes = []) { $this->attributes = $attributes; $this->static = $subNodes['static'] ?? false; $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->expr = $subNodes['expr']; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -62,18 +67,18 @@ class ArrowFunction extends Expr implements FunctionLike return $this->returnType; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } /** * @return Node\Stmt\Return_[] */ - public function getStmts() : array { + public function getStmts(): array { return [new Node\Stmt\Return_($this->expr)]; } - public function getType() : string { + public function getType(): string { return 'Expr_ArrowFunction'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php index cf9e6e82..dcbf84dd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Assign extends Expr -{ +class Assign extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an assignment node. * - * @param Expr $var Variable - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Assign extends Expr $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Assign'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php index bce8604f..5209a64b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -abstract class AssignOp extends Expr -{ +abstract class AssignOp extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a compound assignment operation node. * - * @param Expr $var Variable - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; @@ -24,7 +23,7 @@ abstract class AssignOp extends Expr $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php index 420284cd..4f3623fb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class BitwiseAnd extends AssignOp -{ - public function getType() : string { +class BitwiseAnd extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseAnd'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php index 481ad3bb..23efe107 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class BitwiseOr extends AssignOp -{ - public function getType() : string { +class BitwiseOr extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseOr'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php index f41d4c8e..24be7303 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class BitwiseXor extends AssignOp -{ - public function getType() : string { +class BitwiseXor extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_BitwiseXor'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php index c0e9b316..b78ea901 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Coalesce.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Coalesce extends AssignOp -{ - public function getType() : string { +class Coalesce extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Coalesce'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php index ac168207..f419e2ea 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Concat.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Concat extends AssignOp -{ - public function getType() : string { +class Concat extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Concat'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php index f1fcfc09..98b04727 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Div.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Div extends AssignOp -{ - public function getType() : string { +class Div extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Div'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php index 82ef4517..20765993 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Minus.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Minus extends AssignOp -{ - public function getType() : string { +class Minus extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Minus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php index be3b4a0a..526430e2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mod.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Mod extends AssignOp -{ - public function getType() : string { +class Mod extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Mod'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php index 5c196c3b..81241ac9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Mul.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Mul extends AssignOp -{ - public function getType() : string { +class Mul extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Mul'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php index dd101c61..0bca8cc1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Plus.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Plus extends AssignOp -{ - public function getType() : string { +class Plus extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Plus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php index 5e1307d1..4e3279c4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/Pow.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class Pow extends AssignOp -{ - public function getType() : string { +class Pow extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_Pow'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php index b8f88269..7a5dd60c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class ShiftLeft extends AssignOp -{ - public function getType() : string { +class ShiftLeft extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_ShiftLeft'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php index e0cc67b7..4f270864 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\AssignOp; -class ShiftRight extends AssignOp -{ - public function getType() : string { +class ShiftRight extends AssignOp { + public function getType(): string { return 'Expr_AssignOp_ShiftRight'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php index de3c644c..9714650a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignRef.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class AssignRef extends Expr -{ +class AssignRef extends Expr { /** @var Expr Variable reference is assigned to */ - public $var; + public Expr $var; /** @var Expr Variable which is referenced */ - public $expr; + public Expr $expr; /** * Constructs an assignment node. * - * @param Expr $var Variable - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class AssignRef extends Expr $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_AssignRef'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php index d9c582b0..1b92bd4f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -abstract class BinaryOp extends Expr -{ +abstract class BinaryOp extends Expr { /** @var Expr The left hand side expression */ - public $left; + public Expr $left; /** @var Expr The right hand side expression */ - public $right; + public Expr $right; /** * Constructs a binary operator node. * - * @param Expr $left The left hand side expression - * @param Expr $right The right hand side expression - * @param array $attributes Additional attributes + * @param Expr $left The left hand side expression + * @param Expr $right The right hand side expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $left, Expr $right, array $attributes = []) { $this->attributes = $attributes; @@ -24,7 +23,7 @@ abstract class BinaryOp extends Expr $this->right = $right; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['left', 'right']; } @@ -33,8 +32,6 @@ abstract class BinaryOp extends Expr * * In the case there are multiple possible sigils for an operator, this method does not * necessarily return the one used in the parsed code. - * - * @return string */ - abstract public function getOperatorSigil() : string; + abstract public function getOperatorSigil(): string; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php index d907393b..5930c541 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BitwiseAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseAnd extends BinaryOp { + public function getOperatorSigil(): string { return '&'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseAnd'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php index d92069f3..adcefd0e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BitwiseOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseOr extends BinaryOp { + public function getOperatorSigil(): string { return '|'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseOr'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php index 40fa94f8..92bca609 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BitwiseXor extends BinaryOp -{ - public function getOperatorSigil() : string { +class BitwiseXor extends BinaryOp { + public function getOperatorSigil(): string { return '^'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BitwiseXor'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php index 4c3c9e9b..82a6b5a2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BooleanAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class BooleanAnd extends BinaryOp { + public function getOperatorSigil(): string { return '&&'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BooleanAnd'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php index 5ad41727..739edafa 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class BooleanOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class BooleanOr extends BinaryOp { + public function getOperatorSigil(): string { return '||'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_BooleanOr'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php index b8cf6f45..ab75a23e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Coalesce extends BinaryOp -{ - public function getOperatorSigil() : string { +class Coalesce extends BinaryOp { + public function getOperatorSigil(): string { return '??'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Coalesce'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php index 9a8d9873..a730f576 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Concat.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Concat extends BinaryOp -{ - public function getOperatorSigil() : string { +class Concat extends BinaryOp { + public function getOperatorSigil(): string { return '.'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Concat'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php index d38df0db..ba1f629d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Div.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Div extends BinaryOp -{ - public function getOperatorSigil() : string { +class Div extends BinaryOp { + public function getOperatorSigil(): string { return '/'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Div'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php index e7b11dc8..28bde812 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Equal.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Equal extends BinaryOp -{ - public function getOperatorSigil() : string { +class Equal extends BinaryOp { + public function getOperatorSigil(): string { return '=='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Equal'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php index da01f7a1..6215c50b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Greater.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Greater extends BinaryOp -{ - public function getOperatorSigil() : string { +class Greater extends BinaryOp { + public function getOperatorSigil(): string { return '>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Greater'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php index d677502c..4d440b10 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class GreaterOrEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class GreaterOrEqual extends BinaryOp { + public function getOperatorSigil(): string { return '>='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_GreaterOrEqual'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php index 3d96285c..e25d17cd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Identical.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Identical extends BinaryOp -{ - public function getOperatorSigil() : string { +class Identical extends BinaryOp { + public function getOperatorSigil(): string { return '==='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Identical'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php index 2a3afd54..9b9ea1f6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class LogicalAnd extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalAnd extends BinaryOp { + public function getOperatorSigil(): string { return 'and'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalAnd'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php index 21507dba..a6235ee7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class LogicalOr extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalOr extends BinaryOp { + public function getOperatorSigil(): string { return 'or'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalOr'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php index 261c6a91..7ff2fdb0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class LogicalXor extends BinaryOp -{ - public function getOperatorSigil() : string { +class LogicalXor extends BinaryOp { + public function getOperatorSigil(): string { return 'xor'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_LogicalXor'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php index 54b3c6e9..8924c55e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Minus.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Minus extends BinaryOp -{ - public function getOperatorSigil() : string { +class Minus extends BinaryOp { + public function getOperatorSigil(): string { return '-'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Minus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php index 10340404..56619de1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mod.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Mod extends BinaryOp -{ - public function getOperatorSigil() : string { +class Mod extends BinaryOp { + public function getOperatorSigil(): string { return '%'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Mod'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php index b82d0b2f..98745fbe 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Mul.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Mul extends BinaryOp -{ - public function getOperatorSigil() : string { +class Mul extends BinaryOp { + public function getOperatorSigil(): string { return '*'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Mul'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php index 51075da5..72d03c45 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class NotEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class NotEqual extends BinaryOp { + public function getOperatorSigil(): string { return '!='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_NotEqual'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php index fa4050e0..e9befd80 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class NotIdentical extends BinaryOp -{ - public function getOperatorSigil() : string { +class NotIdentical extends BinaryOp { + public function getOperatorSigil(): string { return '!=='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_NotIdentical'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php index 62f02299..fe34b84c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Plus.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Plus extends BinaryOp -{ - public function getOperatorSigil() : string { +class Plus extends BinaryOp { + public function getOperatorSigil(): string { return '+'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Plus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php index 572a1e8e..e4e641cb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Pow.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Pow extends BinaryOp -{ - public function getOperatorSigil() : string { +class Pow extends BinaryOp { + public function getOperatorSigil(): string { return '**'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Pow'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php index 4e70b4ef..22c6260f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class ShiftLeft extends BinaryOp -{ - public function getOperatorSigil() : string { +class ShiftLeft extends BinaryOp { + public function getOperatorSigil(): string { return '<<'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_ShiftLeft'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php index 45acbd04..cd42644a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class ShiftRight extends BinaryOp -{ - public function getOperatorSigil() : string { +class ShiftRight extends BinaryOp { + public function getOperatorSigil(): string { return '>>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_ShiftRight'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php index 3cb8e7e0..01e9b231 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Smaller.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Smaller extends BinaryOp -{ - public function getOperatorSigil() : string { +class Smaller extends BinaryOp { + public function getOperatorSigil(): string { return '<'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Smaller'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php index 83e8e214..2c88f383 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class SmallerOrEqual extends BinaryOp -{ - public function getOperatorSigil() : string { +class SmallerOrEqual extends BinaryOp { + public function getOperatorSigil(): string { return '<='; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_SmallerOrEqual'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php index 8c6d787f..974ec7dd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp; -class Spaceship extends BinaryOp -{ - public function getOperatorSigil() : string { +class Spaceship extends BinaryOp { + public function getOperatorSigil(): string { return '<=>'; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BinaryOp_Spaceship'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php index ed44984b..b7175a7a 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BitwiseNot.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class BitwiseNot extends Expr -{ +class BitwiseNot extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a bitwise not node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BitwiseNot'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php index bf27e9f6..c66d2332 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class BooleanNot extends Expr -{ +class BooleanNot extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a boolean not node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_BooleanNot'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php index 78e1cf34..2af2245b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/CallLike.php @@ -19,12 +19,8 @@ abstract class CallLike extends Expr { * Returns whether this call expression is actually a first class callable. */ public function isFirstClassCallable(): bool { - foreach ($this->getRawArgs() as $arg) { - if ($arg instanceof VariadicPlaceholder) { - return true; - } - } - return false; + $rawArgs = $this->getRawArgs(); + return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder; } /** @@ -36,4 +32,4 @@ abstract class CallLike extends Expr { assert(!$this->isFirstClassCallable()); return $this->getRawArgs(); } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php index 36769d4f..c2751de4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php @@ -4,23 +4,22 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -abstract class Cast extends Expr -{ +abstract class Cast extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a cast node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php index 57cc473b..471cb824 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Array_ extends Cast -{ - public function getType() : string { +class Array_ extends Cast { + public function getType(): string { return 'Expr_Cast_Array'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php index 04eb4af5..3aed497c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Bool_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Bool_ extends Cast -{ - public function getType() : string { +class Bool_ extends Cast { + public function getType(): string { return 'Expr_Cast_Bool'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php index 891ba5f8..e7f5cd9b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php @@ -4,14 +4,13 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Double extends Cast -{ +class Double extends Cast { // For use in "kind" attribute - const KIND_DOUBLE = 1; // "double" syntax - const KIND_FLOAT = 2; // "float" syntax - const KIND_REAL = 3; // "real" syntax + public const KIND_DOUBLE = 1; // "double" syntax + public const KIND_FLOAT = 2; // "float" syntax + public const KIND_REAL = 3; // "real" syntax - public function getType() : string { + public function getType(): string { return 'Expr_Cast_Double'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php index 01ed594b..20744b9b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Int_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Int_ extends Cast -{ - public function getType() : string { +class Int_ extends Cast { + public function getType(): string { return 'Expr_Cast_Int'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php index 163752be..dffa9e54 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Object_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Object_ extends Cast -{ - public function getType() : string { +class Object_ extends Cast { + public function getType(): string { return 'Expr_Cast_Object'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php index b3d99270..c7605ab8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/String_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class String_ extends Cast -{ - public function getType() : string { +class String_ extends Cast { + public function getType(): string { return 'Expr_Cast_String'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php index accda3e4..cb709a43 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Unset_.php @@ -4,9 +4,8 @@ namespace PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast; -class Unset_ extends Cast -{ - public function getType() : string { +class Unset_ extends Cast { + public function getType(): string { return 'Expr_Cast_Unset'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php index 0c45ffb4..7fdd40e4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php @@ -2,35 +2,35 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\Name; -class ClassConstFetch extends Expr -{ +class ClassConstFetch extends Expr { /** @var Name|Expr Class name */ - public $class; + public Node $class; /** @var Identifier|Expr|Error Constant name */ - public $name; + public Node $name; /** * Constructs a class const fetch node. * - * @param Name|Expr $class Class name - * @param string|Identifier|Expr|Error $name Constant name - * @param array $attributes Additional attributes + * @param Name|Expr $class Class name + * @param string|Identifier|Expr|Error $name Constant name + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($class, $name, array $attributes = []) { + public function __construct(Node $class, $name, array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name']; } - public function getType() : string { + public function getType(): string { return 'Expr_ClassConstFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php index db216b8f..d85bc9ab 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Clone_ extends Expr -{ +class Clone_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a clone node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Clone'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php index 56ddea6a..0680446f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php @@ -3,38 +3,46 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; +use PhpParser\Node\ClosureUse; use PhpParser\Node\Expr; use PhpParser\Node\FunctionLike; -class Closure extends Expr implements FunctionLike -{ +class Closure extends Expr implements FunctionLike { /** @var bool Whether the closure is static */ - public $static; + public bool $static; /** @var bool Whether to return by reference */ - public $byRef; + public bool $byRef; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var ClosureUse[] use()s */ - public $uses; + public array $uses; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a lambda function node. * - * @param array $subNodes Array of the following optional subnodes: - * 'static' => false : Whether the closure is static - * 'byRef' => false : Whether to return by reference - * 'params' => array(): Parameters - * 'uses' => array(): use()s - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attributes groups - * @param array $attributes Additional attributes + * @param array{ + * static?: bool, + * byRef?: bool, + * params?: Node\Param[], + * uses?: ClosureUse[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'static' => false : Whether the closure is static + * 'byRef' => false : Whether to return by reference + * 'params' => array(): Parameters + * 'uses' => array(): use()s + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attributes groups + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -42,21 +50,20 @@ class Closure extends Expr implements FunctionLike $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; $this->uses = $subNodes['uses'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -65,15 +72,15 @@ class Closure extends Expr implements FunctionLike } /** @return Node\Stmt[] */ - public function getStmts() : array { + public function getStmts(): array { return $this->stmts; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } - public function getType() : string { + public function getType(): string { return 'Expr_Closure'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php index 2b8a0966..681ff317 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php @@ -1,34 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Expr; - -use PhpParser\Node\Expr; - -class ClosureUse extends Expr -{ - /** @var Expr\Variable Variable to use */ - public $var; - /** @var bool Whether to use by reference */ - public $byRef; - - /** - * Constructs a closure use node. - * - * @param Expr\Variable $var Variable to use - * @param bool $byRef Whether to use by reference - * @param array $attributes Additional attributes - */ - public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { - $this->attributes = $attributes; - $this->var = $var; - $this->byRef = $byRef; - } - - public function getSubNodeNames() : array { - return ['var', 'byRef']; - } - - public function getType() : string { - return 'Expr_ClosureUse'; - } -} +require __DIR__ . '/../ClosureUse.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php index 14ebd16b..47191c5f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php @@ -5,27 +5,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; use PhpParser\Node\Name; -class ConstFetch extends Expr -{ +class ConstFetch extends Expr { /** @var Name Constant name */ - public $name; + public Name $name; /** * Constructs a const fetch node. * - * @param Name $name Constant name - * @param array $attributes Additional attributes + * @param Name $name Constant name + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Name $name, array $attributes = []) { $this->attributes = $attributes; $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ConstFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php index 4042ec93..d2f30506 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Empty_ extends Expr -{ +class Empty_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an empty() node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Empty'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php index 1637f3ae..43010ac4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php @@ -10,22 +10,21 @@ use PhpParser\Node\Expr; * An error node may be placed at a position where an expression is required, but an error occurred. * Error nodes will not be present if the parser is run in throwOnError mode (the default). */ -class Error extends Expr -{ +class Error extends Expr { /** * Constructs an error node. * - * @param array $attributes Additional attributes + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return []; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Error'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php index c44ff6f9..32625a23 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class ErrorSuppress extends Expr -{ +class ErrorSuppress extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an error suppress node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ErrorSuppress'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php index 85685474..5120b1b4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Eval_ extends Expr -{ +class Eval_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an eval() node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Eval'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php index b88a8f7e..cf002466 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php @@ -4,31 +4,30 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Exit_ extends Expr -{ +class Exit_ extends Expr { /* For use in "kind" attribute */ - const KIND_EXIT = 1; - const KIND_DIE = 2; + public const KIND_EXIT = 1; + public const KIND_DIE = 2; /** @var null|Expr Expression */ - public $expr; + public ?Expr $expr; /** * Constructs an exit() node. * - * @param null|Expr $expr Expression - * @param array $attributes Additional attributes + * @param null|Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Expr $expr = null, array $attributes = []) { + public function __construct(?Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Exit'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php index 2de4d0dd..0b85840d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php @@ -5,31 +5,30 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; use PhpParser\Node\Expr; -class FuncCall extends CallLike -{ +class FuncCall extends CallLike { /** @var Node\Name|Expr Function name */ - public $name; + public Node $name; /** @var array<Node\Arg|Node\VariadicPlaceholder> Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Node\Name|Expr $name Function name - * @param array<Node\Arg|Node\VariadicPlaceholder> $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr $name Function name + * @param array<Node\Arg|Node\VariadicPlaceholder> $args Arguments + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($name, array $args = [], array $attributes = []) { + public function __construct(Node $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_FuncCall'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php index 07ce5968..e1187b19 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php @@ -4,24 +4,23 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Include_ extends Expr -{ - const TYPE_INCLUDE = 1; - const TYPE_INCLUDE_ONCE = 2; - const TYPE_REQUIRE = 3; - const TYPE_REQUIRE_ONCE = 4; +class Include_ extends Expr { + public const TYPE_INCLUDE = 1; + public const TYPE_INCLUDE_ONCE = 2; + public const TYPE_REQUIRE = 3; + public const TYPE_REQUIRE_ONCE = 4; /** @var Expr Expression */ - public $expr; + public Expr $expr; /** @var int Type of include */ - public $type; + public int $type; /** * Constructs an include node. * - * @param Expr $expr Expression - * @param int $type Type of include - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param int $type Type of include + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, int $type, array $attributes = []) { $this->attributes = $attributes; @@ -29,11 +28,11 @@ class Include_ extends Expr $this->type = $type; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'type']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Include'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php index 9000d47b..a2783cb3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php @@ -2,34 +2,34 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; -class Instanceof_ extends Expr -{ +class Instanceof_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** @var Name|Expr Class name */ - public $class; + public Node $class; /** * Constructs an instanceof check node. * - * @param Expr $expr Expression - * @param Name|Expr $class Class name - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param Name|Expr $class Class name + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Expr $expr, $class, array $attributes = []) { + public function __construct(Expr $expr, Node $class, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; $this->class = $class; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'class']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Instanceof'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php index 76b73875..4f80fff7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Isset_ extends Expr -{ +class Isset_ extends Expr { /** @var Expr[] Variables */ - public $vars; + public array $vars; /** * Constructs an array node. * - * @param Expr[] $vars Variables - * @param array $attributes Additional attributes + * @param Expr[] $vars Variables + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Isset'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php index c27a27b9..496b7b38 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php @@ -2,29 +2,33 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node\ArrayItem; use PhpParser\Node\Expr; -class List_ extends Expr -{ +class List_ extends Expr { + // For use in "kind" attribute + public const KIND_LIST = 1; // list() syntax + public const KIND_ARRAY = 2; // [] syntax + /** @var (ArrayItem|null)[] List of items to assign to */ - public $items; + public array $items; /** * Constructs a list() destructuring node. * - * @param (ArrayItem|null)[] $items List of items to assign to - * @param array $attributes Additional attributes + * @param (ArrayItem|null)[] $items List of items to assign to + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $items, array $attributes = []) { $this->attributes = $attributes; $this->items = $items; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['items']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_List'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php index 2455a302..cd028a2d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Match_.php @@ -5,15 +5,16 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; use PhpParser\Node\MatchArm; -class Match_ extends Node\Expr -{ - /** @var Node\Expr */ - public $cond; +class Match_ extends Node\Expr { + /** @var Node\Expr Condition */ + public Node\Expr $cond; /** @var MatchArm[] */ - public $arms; + public array $arms; /** + * @param Node\Expr $cond Condition * @param MatchArm[] $arms + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { $this->attributes = $attributes; @@ -21,11 +22,11 @@ class Match_ extends Node\Expr $this->arms = $arms; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'arms']; } - public function getType() : string { + public function getType(): string { return 'Expr_Match'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php index 49ca4835..2703c75d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php @@ -2,27 +2,27 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class MethodCall extends CallLike -{ +class MethodCall extends CallLike { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array<Arg|VariadicPlaceholder> Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array<Arg|VariadicPlaceholder> $args Arguments - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array<Arg|VariadicPlaceholder> $args Arguments + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -31,11 +31,11 @@ class MethodCall extends CallLike $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_MethodCall'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php index e2bb6492..eedaaa1e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php @@ -7,31 +7,30 @@ use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\VariadicPlaceholder; -class New_ extends CallLike -{ +class New_ extends CallLike { /** @var Node\Name|Expr|Node\Stmt\Class_ Class name */ - public $class; + public Node $class; /** @var array<Arg|VariadicPlaceholder> Arguments */ - public $args; + public array $args; /** * Constructs a function call node. * - * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) - * @param array<Arg|VariadicPlaceholder> $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) + * @param array<Arg|VariadicPlaceholder> $args Arguments + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($class, array $args = [], array $attributes = []) { + public function __construct(Node $class, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_New'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php index 07a571fd..a151f715 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafeMethodCall.php @@ -2,27 +2,27 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class NullsafeMethodCall extends CallLike -{ +class NullsafeMethodCall extends CallLike { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array<Arg|VariadicPlaceholder> Arguments */ - public $args; + public array $args; /** * Constructs a nullsafe method call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Method name - * @param array<Arg|VariadicPlaceholder> $args Arguments - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Method name + * @param array<Arg|VariadicPlaceholder> $args Arguments + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; @@ -31,11 +31,11 @@ class NullsafeMethodCall extends CallLike $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_NullsafeMethodCall'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php index 9317eb3b..6f73a16d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/NullsafePropertyFetch.php @@ -2,22 +2,22 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -class NullsafePropertyFetch extends Expr -{ +class NullsafePropertyFetch extends Expr { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a nullsafe property fetch node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Property name + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { $this->attributes = $attributes; @@ -25,11 +25,11 @@ class NullsafePropertyFetch extends Expr $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_NullsafePropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php index 94d6c296..3dca8fdc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class PostDec extends Expr -{ +class PostDec extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a post decrement node. * - * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PostDec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php index 005c443a..bc990c30 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class PostInc extends Expr -{ +class PostInc extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a post increment node. * - * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PostInc'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php index a5ca685a..2f168730 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class PreDec extends Expr -{ +class PreDec extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a pre decrement node. * - * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - public function getType() : string { + public function getType(): string { return 'Expr_PreDec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php index 0986c447..fd455f55 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class PreInc extends Expr -{ +class PreInc extends Expr { /** @var Expr Variable */ - public $var; + public Expr $var; /** * Constructs a pre increment node. * - * @param Expr $var Variable - * @param array $attributes Additional attributes + * @param Expr $var Variable + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PreInc'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php index 2d43c2ac..60574760 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Print_ extends Expr -{ +class Print_ extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs an print() node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Print'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php index 4281f31c..8c416a8c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php @@ -2,22 +2,22 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Identifier; -class PropertyFetch extends Expr -{ +class PropertyFetch extends Expr { /** @var Expr Variable holding object */ - public $var; + public Expr $var; /** @var Identifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a function call node. * - * @param Expr $var Variable holding object - * @param string|Identifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param Expr $var Variable holding object + * @param string|Identifier|Expr $name Property name + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { $this->attributes = $attributes; @@ -25,11 +25,11 @@ class PropertyFetch extends Expr $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['var', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_PropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php index 537a7cc8..e4003512 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php @@ -3,28 +3,28 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; +use PhpParser\Node\InterpolatedStringPart; -class ShellExec extends Expr -{ - /** @var array Encapsed string array */ - public $parts; +class ShellExec extends Expr { + /** @var (Expr|InterpolatedStringPart)[] Interpolated string array */ + public array $parts; /** * Constructs a shell exec (backtick) node. * - * @param array $parts Encapsed string array - * @param array $attributes Additional attributes + * @param (Expr|InterpolatedStringPart)[] $parts Interpolated string array + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { $this->attributes = $attributes; $this->parts = $parts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['parts']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_ShellExec'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php index d0d099c4..707f34b6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php @@ -8,35 +8,34 @@ use PhpParser\Node\Expr; use PhpParser\Node\Identifier; use PhpParser\Node\VariadicPlaceholder; -class StaticCall extends CallLike -{ +class StaticCall extends CallLike { /** @var Node\Name|Expr Class name */ - public $class; + public Node $class; /** @var Identifier|Expr Method name */ - public $name; + public Node $name; /** @var array<Arg|VariadicPlaceholder> Arguments */ - public $args; + public array $args; /** * Constructs a static method call node. * - * @param Node\Name|Expr $class Class name - * @param string|Identifier|Expr $name Method name - * @param array<Arg|VariadicPlaceholder> $args Arguments - * @param array $attributes Additional attributes + * @param Node\Name|Expr $class Class name + * @param string|Identifier|Expr $name Method name + * @param array<Arg|VariadicPlaceholder> $args Arguments + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($class, $name, array $args = [], array $attributes = []) { + public function __construct(Node $class, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name', 'args']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_StaticCall'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php index 1ee1a25e..4836a65b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php @@ -2,35 +2,35 @@ namespace PhpParser\Node\Expr; +use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; use PhpParser\Node\VarLikeIdentifier; -class StaticPropertyFetch extends Expr -{ +class StaticPropertyFetch extends Expr { /** @var Name|Expr Class name */ - public $class; + public Node $class; /** @var VarLikeIdentifier|Expr Property name */ - public $name; + public Node $name; /** * Constructs a static property fetch node. * - * @param Name|Expr $class Class name - * @param string|VarLikeIdentifier|Expr $name Property name - * @param array $attributes Additional attributes + * @param Name|Expr $class Class name + * @param string|VarLikeIdentifier|Expr $name Property name + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($class, $name, array $attributes = []) { + public function __construct(Node $class, $name, array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['class', 'name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_StaticPropertyFetch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php index 9316f47d..d4837e64 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php @@ -4,35 +4,34 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Ternary extends Expr -{ +class Ternary extends Expr { /** @var Expr Condition */ - public $cond; + public Expr $cond; /** @var null|Expr Expression for true */ - public $if; + public ?Expr $if; /** @var Expr Expression for false */ - public $else; + public Expr $else; /** * Constructs a ternary operator node. * - * @param Expr $cond Condition - * @param null|Expr $if Expression for true - * @param Expr $else Expression for false - * @param array $attributes Additional attributes + * @param Expr $cond Condition + * @param null|Expr $if Expression for true + * @param Expr $else Expression for false + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Expr $cond, $if, Expr $else, array $attributes = []) { + public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->if = $if; $this->else = $else; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'if', 'else']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Ternary'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php index 5c97f0e2..ee49f835 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Throw_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node; -class Throw_ extends Node\Expr -{ +class Throw_ extends Node\Expr { /** @var Node\Expr Expression */ - public $expr; + public Node\Expr $expr; /** * Constructs a throw expression node. * - * @param Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param Node\Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - public function getType() : string { + public function getType(): string { return 'Expr_Throw'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php index ce8808bc..cd06f74b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class UnaryMinus extends Expr -{ +class UnaryMinus extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a unary minus node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_UnaryMinus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php index d23047e5..1b44f7b3 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class UnaryPlus extends Expr -{ +class UnaryPlus extends Expr { /** @var Expr Expression */ - public $expr; + public Expr $expr; /** * Constructs a unary plus node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_UnaryPlus'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php index b47d38e9..bab74920 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Variable extends Expr -{ +class Variable extends Expr { /** @var string|Expr Name */ public $name; /** * Constructs a variable node. * - * @param string|Expr $name Name - * @param array $attributes Additional attributes + * @param string|Expr $name Name + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Variable'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php index a3efce61..5cff88f8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class YieldFrom extends Expr -{ +class YieldFrom extends Expr { /** @var Expr Expression to yield from */ - public $expr; + public Expr $expr; /** * Constructs an "yield from" node. * - * @param Expr $expr Expression - * @param array $attributes Additional attributes + * @param Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_YieldFrom'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php index aef8fc33..bd81e69b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php @@ -4,31 +4,30 @@ namespace PhpParser\Node\Expr; use PhpParser\Node\Expr; -class Yield_ extends Expr -{ +class Yield_ extends Expr { /** @var null|Expr Key expression */ - public $key; + public ?Expr $key; /** @var null|Expr Value expression */ - public $value; + public ?Expr $value; /** * Constructs a yield expression node. * - * @param null|Expr $value Value expression - * @param null|Expr $key Key expression - * @param array $attributes Additional attributes + * @param null|Expr $value Value expression + * @param null|Expr $key Key expression + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Expr $value = null, Expr $key = null, array $attributes = []) { + public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { $this->attributes = $attributes; $this->key = $key; $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['key', 'value']; } - - public function getType() : string { + + public function getType(): string { return 'Expr_Yield'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php index 5a825e73..58f653a8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php @@ -4,21 +4,18 @@ namespace PhpParser\Node; use PhpParser\Node; -interface FunctionLike extends Node -{ +interface FunctionLike extends Node { /** * Whether to return by reference - * - * @return bool */ - public function returnsByRef() : bool; + public function returnsByRef(): bool; /** * List of parameters * * @return Param[] */ - public function getParams() : array; + public function getParams(): array; /** * Get the declared return type or null @@ -32,12 +29,12 @@ interface FunctionLike extends Node * * @return Stmt[]|null */ - public function getStmts(); + public function getStmts(): ?array; /** * Get PHP attribute groups. * * @return AttributeGroup[] */ - public function getAttrGroups() : array; + public function getAttrGroups(): array; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php index 2f262db0..266166cb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php @@ -7,12 +7,12 @@ use PhpParser\NodeAbstract; /** * Represents a non-namespaced name. Namespaced names are represented using Name nodes. */ -class Identifier extends NodeAbstract -{ +class Identifier extends NodeAbstract { /** @var string Identifier as string */ - public $name; + public string $name; - private static $specialClassNames = [ + /** @var array<string, bool> */ + private static array $specialClassNames = [ 'self' => true, 'parent' => true, 'static' => true, @@ -21,15 +21,15 @@ class Identifier extends NodeAbstract /** * Constructs an identifier node. * - * @param string $name Identifier as string - * @param array $attributes Additional attributes + * @param string $name Identifier as string + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(string $name, array $attributes = []) { $this->attributes = $attributes; $this->name = $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } @@ -38,7 +38,7 @@ class Identifier extends NodeAbstract * * @return string Identifier as string. */ - public function toString() : string { + public function toString(): string { return $this->name; } @@ -47,7 +47,7 @@ class Identifier extends NodeAbstract * * @return string Lowercased identifier as string */ - public function toLowerString() : string { + public function toLowerString(): string { return strtolower($this->name); } @@ -56,7 +56,7 @@ class Identifier extends NodeAbstract * * @return bool Whether identifier is a special class name */ - public function isSpecialClassName() : bool { + public function isSpecialClassName(): bool { return isset(self::$specialClassNames[strtolower($this->name)]); } @@ -65,11 +65,11 @@ class Identifier extends NodeAbstract * * @return string Identifier as string */ - public function __toString() : string { + public function __toString(): string { return $this->name; } - - public function getType() : string { + + public function getType(): string { return 'Identifier'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php new file mode 100644 index 00000000..576dac46 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php @@ -0,0 +1,32 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node; + +use PhpParser\NodeAbstract; + +class InterpolatedStringPart extends NodeAbstract { + /** @var string String value */ + public string $value; + + /** + * Constructs a node representing a string part of an interpolated string. + * + * @param string $value String value + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct(string $value, array $attributes = []) { + $this->attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + public function getType(): string { + return 'InterpolatedStringPart'; + } +} + +// @deprecated compatibility alias +class_alias(InterpolatedStringPart::class, Scalar\EncapsedStringPart::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php index 9208e139..3b39cf10 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php @@ -2,29 +2,26 @@ namespace PhpParser\Node; -use PhpParser\NodeAbstract; - -class IntersectionType extends ComplexType -{ +class IntersectionType extends ComplexType { /** @var (Identifier|Name)[] Types */ - public $types; + public array $types; /** * Constructs an intersection type. * - * @param (Identifier|Name)[] $types Types - * @param array $attributes Additional attributes + * @param (Identifier|Name)[] $types Types + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { $this->attributes = $attributes; $this->types = $types; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types']; } - public function getType() : string { + public function getType(): string { return 'IntersectionType'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php b/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php index 2ae1c86b..2927f029 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php @@ -5,27 +5,26 @@ namespace PhpParser\Node; use PhpParser\Node; use PhpParser\NodeAbstract; -class MatchArm extends NodeAbstract -{ - /** @var null|Node\Expr[] */ - public $conds; +class MatchArm extends NodeAbstract { + /** @var null|list<Node\Expr> */ + public ?array $conds; /** @var Node\Expr */ - public $body; + public Expr $body; /** - * @param null|Node\Expr[] $conds + * @param null|list<Node\Expr> $conds */ - public function __construct($conds, Node\Expr $body, array $attributes = []) { + public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { $this->conds = $conds; $this->body = $body; $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['conds', 'body']; } - public function getType() : string { + public function getType(): string { return 'MatchArm'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php index f0a564ff..26b863e4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name.php @@ -4,15 +4,12 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; -class Name extends NodeAbstract -{ - /** - * @var string[] Parts of the name - * @deprecated Use getParts() instead - */ - public $parts; +class Name extends NodeAbstract { + /** @var string Name as string */ + public string $name; - private static $specialClassNames = [ + /** @var array<string, bool> */ + private static array $specialClassNames = [ 'self' => true, 'parent' => true, 'static' => true, @@ -21,16 +18,16 @@ class Name extends NodeAbstract /** * Constructs a name node. * - * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) - * @param array $attributes Additional attributes + * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($name, array $attributes = []) { + final public function __construct($name, array $attributes = []) { $this->attributes = $attributes; - $this->parts = self::prepareName($name); + $this->name = self::prepareName($name); } - public function getSubNodeNames() : array { - return ['parts']; + public function getSubNodeNames(): array { + return ['name']; } /** @@ -39,7 +36,7 @@ class Name extends NodeAbstract * @return string[] Parts of name */ public function getParts(): array { - return $this->parts; + return \explode('\\', $this->name); } /** @@ -47,8 +44,11 @@ class Name extends NodeAbstract * * @return string First part of the name */ - public function getFirst() : string { - return $this->parts[0]; + public function getFirst(): string { + if (false !== $pos = \strpos($this->name, '\\')) { + return \substr($this->name, 0, $pos); + } + return $this->name; } /** @@ -56,8 +56,11 @@ class Name extends NodeAbstract * * @return string Last part of the name */ - public function getLast() : string { - return $this->parts[count($this->parts) - 1]; + public function getLast(): string { + if (false !== $pos = \strrpos($this->name, '\\')) { + return \substr($this->name, $pos + 1); + } + return $this->name; } /** @@ -65,8 +68,8 @@ class Name extends NodeAbstract * * @return bool Whether the name is unqualified */ - public function isUnqualified() : bool { - return 1 === count($this->parts); + public function isUnqualified(): bool { + return false === \strpos($this->name, '\\'); } /** @@ -74,8 +77,8 @@ class Name extends NodeAbstract * * @return bool Whether the name is qualified */ - public function isQualified() : bool { - return 1 < count($this->parts); + public function isQualified(): bool { + return false !== \strpos($this->name, '\\'); } /** @@ -83,7 +86,7 @@ class Name extends NodeAbstract * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return false; } @@ -92,7 +95,7 @@ class Name extends NodeAbstract * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return false; } @@ -102,8 +105,8 @@ class Name extends NodeAbstract * * @return string String representation */ - public function toString() : string { - return implode('\\', $this->parts); + public function toString(): string { + return $this->name; } /** @@ -112,7 +115,7 @@ class Name extends NodeAbstract * * @return string String representation */ - public function toCodeString() : string { + public function toCodeString(): string { return $this->toString(); } @@ -122,8 +125,8 @@ class Name extends NodeAbstract * * @return string Lowercased string representation */ - public function toLowerString() : string { - return strtolower(implode('\\', $this->parts)); + public function toLowerString(): string { + return strtolower($this->name); } /** @@ -131,9 +134,8 @@ class Name extends NodeAbstract * * @return bool Whether identifier is a special class name */ - public function isSpecialClassName() : bool { - return count($this->parts) === 1 - && isset(self::$specialClassNames[strtolower($this->parts[0])]); + public function isSpecialClassName(): bool { + return isset(self::$specialClassNames[strtolower($this->name)]); } /** @@ -142,8 +144,8 @@ class Name extends NodeAbstract * * @return string String representation */ - public function __toString() : string { - return implode('\\', $this->parts); + public function __toString(): string { + return $this->name; } /** @@ -157,13 +159,22 @@ class Name extends NodeAbstract * * Offset and length have the same meaning as in array_slice(). * - * @param int $offset Offset to start the slice at (may be negative) + * @param int $offset Offset to start the slice at (may be negative) * @param int|null $length Length of the slice (may be negative) * * @return static|null Sliced name */ - public function slice(int $offset, int $length = null) { - $numParts = count($this->parts); + public function slice(int $offset, ?int $length = null) { + if ($offset === 1 && $length === null) { + // Short-circuit the common case. + if (false !== $pos = \strpos($this->name, '\\')) { + return new static(\substr($this->name, $pos + 1)); + } + return null; + } + + $parts = \explode('\\', $this->name); + $numParts = \count($parts); $realOffset = $offset < 0 ? $offset + $numParts : $offset; if ($realOffset < 0 || $realOffset > $numParts) { @@ -184,7 +195,7 @@ class Name extends NodeAbstract return null; } - return new static(array_slice($this->parts, $realOffset, $realLength), $this->attributes); + return new static(array_slice($parts, $realOffset, $realLength), $this->attributes); } /** @@ -198,49 +209,53 @@ class Name extends NodeAbstract * Name::concat($namespace, $shortName) * where $namespace is a Name node or null will work as expected. * - * @param string|string[]|self|null $name1 The first name - * @param string|string[]|self|null $name2 The second name - * @param array $attributes Attributes to assign to concatenated name + * @param string|string[]|self|null $name1 The first name + * @param string|string[]|self|null $name2 The second name + * @param array<string, mixed> $attributes Attributes to assign to concatenated name * * @return static|null Concatenated name */ public static function concat($name1, $name2, array $attributes = []) { if (null === $name1 && null === $name2) { return null; - } elseif (null === $name1) { - return new static(self::prepareName($name2), $attributes); - } elseif (null === $name2) { - return new static(self::prepareName($name1), $attributes); + } + if (null === $name1) { + return new static($name2, $attributes); + } + if (null === $name2) { + return new static($name1, $attributes); } else { return new static( - array_merge(self::prepareName($name1), self::prepareName($name2)), $attributes + self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes ); } } /** * Prepares a (string, array or Name node) name for use in name changing methods by converting - * it to an array. + * it to a string. * * @param string|string[]|self $name Name to prepare * - * @return string[] Prepared name + * @return string Prepared name */ - private static function prepareName($name) : array { + private static function prepareName($name): string { if (\is_string($name)) { if ('' === $name) { throw new \InvalidArgumentException('Name cannot be empty'); } - return explode('\\', $name); - } elseif (\is_array($name)) { + return $name; + } + if (\is_array($name)) { if (empty($name)) { throw new \InvalidArgumentException('Name cannot be empty'); } - return $name; - } elseif ($name instanceof self) { - return $name->parts; + return implode('\\', $name); + } + if ($name instanceof self) { + return $name->name; } throw new \InvalidArgumentException( @@ -248,7 +263,7 @@ class Name extends NodeAbstract ); } - public function getType() : string { + public function getType(): string { return 'Name'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php index 1df93a56..21183786 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php @@ -2,14 +2,13 @@ namespace PhpParser\Node\Name; -class FullyQualified extends \PhpParser\Node\Name -{ +class FullyQualified extends \PhpParser\Node\Name { /** * Checks whether the name is unqualified. (E.g. Name) * * @return bool Whether the name is unqualified */ - public function isUnqualified() : bool { + public function isUnqualified(): bool { return false; } @@ -18,7 +17,7 @@ class FullyQualified extends \PhpParser\Node\Name * * @return bool Whether the name is qualified */ - public function isQualified() : bool { + public function isQualified(): bool { return false; } @@ -27,7 +26,7 @@ class FullyQualified extends \PhpParser\Node\Name * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return true; } @@ -36,15 +35,15 @@ class FullyQualified extends \PhpParser\Node\Name * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return false; } - public function toCodeString() : string { + public function toCodeString(): string { return '\\' . $this->toString(); } - - public function getType() : string { + + public function getType(): string { return 'Name_FullyQualified'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php index 57bf7af2..0226a4e4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php @@ -2,14 +2,13 @@ namespace PhpParser\Node\Name; -class Relative extends \PhpParser\Node\Name -{ +class Relative extends \PhpParser\Node\Name { /** * Checks whether the name is unqualified. (E.g. Name) * * @return bool Whether the name is unqualified */ - public function isUnqualified() : bool { + public function isUnqualified(): bool { return false; } @@ -18,7 +17,7 @@ class Relative extends \PhpParser\Node\Name * * @return bool Whether the name is qualified */ - public function isQualified() : bool { + public function isQualified(): bool { return false; } @@ -27,7 +26,7 @@ class Relative extends \PhpParser\Node\Name * * @return bool Whether the name is fully qualified */ - public function isFullyQualified() : bool { + public function isFullyQualified(): bool { return false; } @@ -36,15 +35,15 @@ class Relative extends \PhpParser\Node\Name * * @return bool Whether the name is relative */ - public function isRelative() : bool { + public function isRelative(): bool { return true; } - public function toCodeString() : string { + public function toCodeString(): string { return 'namespace\\' . $this->toString(); } - - public function getType() : string { + + public function getType(): string { return 'Name_Relative'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php index d68e26a3..b99acd13 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php @@ -2,27 +2,28 @@ namespace PhpParser\Node; -class NullableType extends ComplexType -{ +use PhpParser\Node; + +class NullableType extends ComplexType { /** @var Identifier|Name Type */ - public $type; + public Node $type; /** * Constructs a nullable type (wrapping another type). * - * @param string|Identifier|Name $type Type - * @param array $attributes Additional attributes + * @param Identifier|Name $type Type + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($type, array $attributes = []) { + public function __construct(Node $type, array $attributes = []) { $this->attributes = $attributes; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type']; } - - public function getType() : string { + + public function getType(): string { return 'NullableType'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php index 1e90b794..0e9ff0e2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -2,46 +2,47 @@ namespace PhpParser\Node; +use PhpParser\Modifiers; +use PhpParser\Node; use PhpParser\NodeAbstract; -class Param extends NodeAbstract -{ +class Param extends NodeAbstract { /** @var null|Identifier|Name|ComplexType Type declaration */ - public $type; + public ?Node $type; /** @var bool Whether parameter is passed by reference */ - public $byRef; + public bool $byRef; /** @var bool Whether this is a variadic argument */ - public $variadic; + public bool $variadic; /** @var Expr\Variable|Expr\Error Parameter variable */ - public $var; + public Expr $var; /** @var null|Expr Default value */ - public $default; - /** @var int */ - public $flags; + public ?Expr $default; + /** @var int Optional visibility flags */ + public int $flags; /** @var AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a parameter node. * - * @param Expr\Variable|Expr\Error $var Parameter variable - * @param null|Expr $default Default value - * @param null|string|Identifier|Name|ComplexType $type Type declaration - * @param bool $byRef Whether is passed by reference - * @param bool $variadic Whether this is a variadic argument - * @param array $attributes Additional attributes - * @param int $flags Optional visibility flags - * @param AttributeGroup[] $attrGroups PHP attribute groups + * @param Expr\Variable|Expr\Error $var Parameter variable + * @param null|Expr $default Default value + * @param null|Identifier|Name|ComplexType $type Type declaration + * @param bool $byRef Whether is passed by reference + * @param bool $variadic Whether this is a variadic argument + * @param array<string, mixed> $attributes Additional attributes + * @param int $flags Optional visibility flags + * @param list<AttributeGroup> $attrGroups PHP attribute groups */ public function __construct( - $var, Expr $default = null, $type = null, + Expr $var, ?Expr $default = null, ?Node $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, array $attrGroups = [] ) { $this->attributes = $attributes; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; $this->byRef = $byRef; $this->variadic = $variadic; $this->var = $var; @@ -50,11 +51,34 @@ class Param extends NodeAbstract $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default']; } - public function getType() : string { + public function getType(): string { return 'Param'; } + + /** + * Whether this parameter uses constructor property promotion. + */ + public function isPromoted(): bool { + return $this->flags !== 0; + } + + public function isPublic(): bool { + return (bool) ($this->flags & Modifiers::PUBLIC); + } + + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); + } + + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); + } + + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php new file mode 100644 index 00000000..101611e6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php @@ -0,0 +1,37 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node; + +use PhpParser\Node; +use PhpParser\NodeAbstract; + +class PropertyItem extends NodeAbstract { + /** @var Node\VarLikeIdentifier Name */ + public VarLikeIdentifier $name; + /** @var null|Node\Expr Default */ + public ?Expr $default; + + /** + * Constructs a class property item node. + * + * @param string|Node\VarLikeIdentifier $name Name + * @param null|Node\Expr $default Default value + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct($name, ?Node\Expr $default = null, array $attributes = []) { + $this->attributes = $attributes; + $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; + $this->default = $default; + } + + public function getSubNodeNames(): array { + return ['name', 'default']; + } + + public function getType(): string { + return 'PropertyItem'; + } +} + +// @deprecated compatibility alias +class_alias(PropertyItem::class, Stmt\PropertyProperty::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php index 8117909b..3df25721 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php @@ -2,6 +2,5 @@ namespace PhpParser\Node; -abstract class Scalar extends Expr -{ +abstract class Scalar extends Expr { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php index 8a15c6f1..ad3937a5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php @@ -1,77 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Scalar; - -use PhpParser\Node\Scalar; - -class DNumber extends Scalar -{ - /** @var float Number value */ - public $value; - - /** - * Constructs a float number scalar node. - * - * @param float $value Value of the number - * @param array $attributes Additional attributes - */ - public function __construct(float $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - /** - * @param mixed[] $attributes - */ - public static function fromString(string $str, array $attributes = []): DNumber - { - $attributes['rawValue'] = $str; - $float = self::parse($str); - - return new DNumber($float, $attributes); - } - - /** - * @internal - * - * Parses a DNUMBER token like PHP would. - * - * @param string $str A string number - * - * @return float The parsed number - */ - public static function parse(string $str) : float { - $str = str_replace('_', '', $str); - - // Check whether this is one of the special integer notations. - if ('0' === $str[0]) { - // hex - if ('x' === $str[1] || 'X' === $str[1]) { - return hexdec($str); - } - - // bin - if ('b' === $str[1] || 'B' === $str[1]) { - return bindec($str); - } - - // oct, but only if the string does not contain any of '.eE'. - if (false === strpbrk($str, '.eE')) { - // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit - // (8 or 9) so that only the digits before that are used. - return octdec(substr($str, 0, strcspn($str, '89'))); - } - } - - // dec - return (float) $str; - } - - public function getType() : string { - return 'Scalar_DNumber'; - } -} +require __DIR__ . '/Float_.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php index fa5d2e26..c5aaf5b4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php @@ -1,31 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Scalar; - -use PhpParser\Node\Expr; -use PhpParser\Node\Scalar; - -class Encapsed extends Scalar -{ - /** @var Expr[] list of string parts */ - public $parts; - - /** - * Constructs an encapsed string node. - * - * @param Expr[] $parts Encaps list - * @param array $attributes Additional attributes - */ - public function __construct(array $parts, array $attributes = []) { - $this->attributes = $attributes; - $this->parts = $parts; - } - - public function getSubNodeNames() : array { - return ['parts']; - } - - public function getType() : string { - return 'Scalar_Encapsed'; - } -} +require __DIR__ . '/InterpolatedString.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php index bb3194c1..990e9801 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php @@ -1,30 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Scalar; - -use PhpParser\Node\Scalar; - -class EncapsedStringPart extends Scalar -{ - /** @var string String value */ - public $value; - - /** - * Constructs a node representing a string part of an encapsed string. - * - * @param string $value String value - * @param array $attributes Additional attributes - */ - public function __construct(string $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - public function getType() : string { - return 'Scalar_EncapsedStringPart'; - } -} +require __DIR__ . '/../InterpolatedStringPart.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php new file mode 100644 index 00000000..5af13192 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php @@ -0,0 +1,78 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node\Scalar; + +use PhpParser\Node\Scalar; + +class Float_ extends Scalar { + /** @var float Number value */ + public float $value; + + /** + * Constructs a float number scalar node. + * + * @param float $value Value of the number + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct(float $value, array $attributes = []) { + $this->attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + /** + * @param mixed[] $attributes + */ + public static function fromString(string $str, array $attributes = []): Float_ { + $attributes['rawValue'] = $str; + $float = self::parse($str); + + return new Float_($float, $attributes); + } + + /** + * @internal + * + * Parses a DNUMBER token like PHP would. + * + * @param string $str A string number + * + * @return float The parsed number + */ + public static function parse(string $str): float { + $str = str_replace('_', '', $str); + + // Check whether this is one of the special integer notations. + if ('0' === $str[0]) { + // hex + if ('x' === $str[1] || 'X' === $str[1]) { + return hexdec($str); + } + + // bin + if ('b' === $str[1] || 'B' === $str[1]) { + return bindec($str); + } + + // oct, but only if the string does not contain any of '.eE'. + if (false === strpbrk($str, '.eE')) { + // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit + // (8 or 9) so that only the digits before that are used. + return octdec(substr($str, 0, strcspn($str, '89'))); + } + } + + // dec + return (float) $str; + } + + public function getType(): string { + return 'Scalar_Float'; + } +} + +// @deprecated compatibility alias +class_alias(Float_::class, DNumber::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php new file mode 100644 index 00000000..bcc257a6 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php @@ -0,0 +1,82 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node\Scalar; + +use PhpParser\Error; +use PhpParser\Node\Scalar; + +class Int_ extends Scalar { + /* For use in "kind" attribute */ + public const KIND_BIN = 2; + public const KIND_OCT = 8; + public const KIND_DEC = 10; + public const KIND_HEX = 16; + + /** @var int Number value */ + public int $value; + + /** + * Constructs an integer number scalar node. + * + * @param int $value Value of the number + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct(int $value, array $attributes = []) { + $this->attributes = $attributes; + $this->value = $value; + } + + public function getSubNodeNames(): array { + return ['value']; + } + + /** + * Constructs an Int node from a string number literal. + * + * @param string $str String number literal (decimal, octal, hex or binary) + * @param array<string, mixed> $attributes Additional attributes + * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) + * + * @return Int_ The constructed LNumber, including kind attribute + */ + public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): Int_ { + $attributes['rawValue'] = $str; + + $str = str_replace('_', '', $str); + + if ('0' !== $str[0] || '0' === $str) { + $attributes['kind'] = Int_::KIND_DEC; + return new Int_((int) $str, $attributes); + } + + if ('x' === $str[1] || 'X' === $str[1]) { + $attributes['kind'] = Int_::KIND_HEX; + return new Int_(hexdec($str), $attributes); + } + + if ('b' === $str[1] || 'B' === $str[1]) { + $attributes['kind'] = Int_::KIND_BIN; + return new Int_(bindec($str), $attributes); + } + + if (!$allowInvalidOctal && strpbrk($str, '89')) { + throw new Error('Invalid numeric literal', $attributes); + } + + // Strip optional explicit octal prefix. + if ('o' === $str[1] || 'O' === $str[1]) { + $str = substr($str, 2); + } + + // use intval instead of octdec to get proper cutting behavior with malformed numbers + $attributes['kind'] = Int_::KIND_OCT; + return new Int_(intval($str, 8), $attributes); + } + + public function getType(): string { + return 'Scalar_Int'; + } +} + +// @deprecated compatibility alias +class_alias(Int_::class, LNumber::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php new file mode 100644 index 00000000..9336dfe4 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php @@ -0,0 +1,34 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node\Scalar; + +use PhpParser\Node\Expr; +use PhpParser\Node\InterpolatedStringPart; +use PhpParser\Node\Scalar; + +class InterpolatedString extends Scalar { + /** @var (Expr|InterpolatedStringPart)[] list of string parts */ + public array $parts; + + /** + * Constructs an interpolated string node. + * + * @param (Expr|InterpolatedStringPart)[] $parts Interpolated string parts + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct(array $parts, array $attributes = []) { + $this->attributes = $attributes; + $this->parts = $parts; + } + + public function getSubNodeNames(): array { + return ['parts']; + } + + public function getType(): string { + return 'Scalar_InterpolatedString'; + } +} + +// @deprecated compatibility alias +class_alias(InterpolatedString::class, Encapsed::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php index 2cc2b22c..cfe8c8c1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php @@ -1,80 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Scalar; - -use PhpParser\Error; -use PhpParser\Node\Scalar; - -class LNumber extends Scalar -{ - /* For use in "kind" attribute */ - const KIND_BIN = 2; - const KIND_OCT = 8; - const KIND_DEC = 10; - const KIND_HEX = 16; - - /** @var int Number value */ - public $value; - - /** - * Constructs an integer number scalar node. - * - * @param int $value Value of the number - * @param array $attributes Additional attributes - */ - public function __construct(int $value, array $attributes = []) { - $this->attributes = $attributes; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['value']; - } - - /** - * Constructs an LNumber node from a string number literal. - * - * @param string $str String number literal (decimal, octal, hex or binary) - * @param array $attributes Additional attributes - * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) - * - * @return LNumber The constructed LNumber, including kind attribute - */ - public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false) : LNumber { - $attributes['rawValue'] = $str; - - $str = str_replace('_', '', $str); - - if ('0' !== $str[0] || '0' === $str) { - $attributes['kind'] = LNumber::KIND_DEC; - return new LNumber((int) $str, $attributes); - } - - if ('x' === $str[1] || 'X' === $str[1]) { - $attributes['kind'] = LNumber::KIND_HEX; - return new LNumber(hexdec($str), $attributes); - } - - if ('b' === $str[1] || 'B' === $str[1]) { - $attributes['kind'] = LNumber::KIND_BIN; - return new LNumber(bindec($str), $attributes); - } - - if (!$allowInvalidOctal && strpbrk($str, '89')) { - throw new Error('Invalid numeric literal', $attributes); - } - - // Strip optional explicit octal prefix. - if ('o' === $str[1] || 'O' === $str[1]) { - $str = substr($str, 2); - } - - // use intval instead of octdec to get proper cutting behavior with malformed numbers - $attributes['kind'] = LNumber::KIND_OCT; - return new LNumber(intval($str, 8), $attributes); - } - - public function getType() : string { - return 'Scalar_LNumber'; - } -} +require __DIR__ . '/Int_.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php index 941f0c76..1da9b391 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php @@ -4,18 +4,17 @@ namespace PhpParser\Node\Scalar; use PhpParser\Node\Scalar; -abstract class MagicConst extends Scalar -{ +abstract class MagicConst extends Scalar { /** * Constructs a magic constant node. * - * @param array $attributes Additional attributes + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return []; } @@ -24,5 +23,5 @@ abstract class MagicConst extends Scalar * * @return string Name of magic constant */ - abstract public function getName() : string; + abstract public function getName(): string; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php index 24432847..732ed140 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Class_ extends MagicConst -{ - public function getName() : string { +class Class_ extends MagicConst { + public function getName(): string { return '__CLASS__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Class'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php index 2b618473..64daa713 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Dir extends MagicConst -{ - public function getName() : string { +class Dir extends MagicConst { + public function getName(): string { return '__DIR__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Dir'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php index 3422db06..91041f0f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class File extends MagicConst -{ - public function getName() : string { +class File extends MagicConst { + public function getName(): string { return '__FILE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_File'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php index 1db65a15..c242d2d9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Function_ extends MagicConst -{ - public function getName() : string { +class Function_ extends MagicConst { + public function getName(): string { return '__FUNCTION__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Function'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php index 25d3de57..58d8ce39 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Line extends MagicConst -{ - public function getName() : string { +class Line extends MagicConst { + public function getName(): string { return '__LINE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Line'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php index d168d56f..47f341f1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Method extends MagicConst -{ - public function getName() : string { +class Method extends MagicConst { + public function getName(): string { return '__METHOD__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Method'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php index 4fabb751..e9f8c0ea 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Namespace_ extends MagicConst -{ - public function getName() : string { +class Namespace_ extends MagicConst { + public function getName(): string { return '__NAMESPACE__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Namespace'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php index 5ee7e40a..25f49731 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php @@ -4,13 +4,12 @@ namespace PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Scalar\MagicConst; -class Trait_ extends MagicConst -{ - public function getName() : string { +class Trait_ extends MagicConst { + public function getName(): string { return '__TRAIT__'; } - - public function getType() : string { + + public function getType(): string { return 'Scalar_MagicConst_Trait'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php index 6690a16b..c965366d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php @@ -5,18 +5,18 @@ namespace PhpParser\Node\Scalar; use PhpParser\Error; use PhpParser\Node\Scalar; -class String_ extends Scalar -{ +class String_ extends Scalar { /* For use in "kind" attribute */ - const KIND_SINGLE_QUOTED = 1; - const KIND_DOUBLE_QUOTED = 2; - const KIND_HEREDOC = 3; - const KIND_NOWDOC = 4; + public const KIND_SINGLE_QUOTED = 1; + public const KIND_DOUBLE_QUOTED = 2; + public const KIND_HEREDOC = 3; + public const KIND_NOWDOC = 4; /** @var string String value */ - public $value; + public string $value; - protected static $replacements = [ + /** @var array<string, string> Escaped character to its decoded value */ + protected static array $replacements = [ '\\' => '\\', '$' => '$', 'n' => "\n", @@ -30,23 +30,23 @@ class String_ extends Scalar /** * Constructs a string scalar node. * - * @param string $value Value of the string - * @param array $attributes Additional attributes + * @param string $value Value of the string + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } /** + * @param array<string, mixed> $attributes * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes */ - public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self - { + public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED; @@ -68,7 +68,7 @@ class String_ extends Scalar * * @return string The parsed string */ - public static function parse(string $str, bool $parseUnicodeEscape = true) : string { + public static function parse(string $str, bool $parseUnicodeEscape = true): string { $bLength = 0; if ('b' === $str[0] || 'B' === $str[0]) { $bLength = 1; @@ -92,13 +92,13 @@ class String_ extends Scalar * * Parses escape sequences in strings (all string types apart from single quoted). * - * @param string $str String without quotes + * @param string $str String without quotes * @param null|string $quote Quote type * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes * * @return string String with escape sequences parsed */ - public static function parseEscapeSequences(string $str, $quote, bool $parseUnicodeEscape = true) : string { + public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string { if (null !== $quote) { $str = str_replace('\\' . $quote, $quote, $str); } @@ -110,15 +110,19 @@ class String_ extends Scalar return preg_replace_callback( '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', - function($matches) { + function ($matches) { $str = $matches[1]; if (isset(self::$replacements[$str])) { return self::$replacements[$str]; - } elseif ('x' === $str[0] || 'X' === $str[0]) { + } + if ('x' === $str[0] || 'X' === $str[0]) { return chr(hexdec(substr($str, 1))); - } elseif ('u' === $str[0]) { - return self::codePointToUtf8(hexdec($matches[2])); + } + if ('u' === $str[0]) { + $dec = hexdec($matches[2]); + // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. + return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); } else { return chr(octdec($str)); } @@ -134,24 +138,24 @@ class String_ extends Scalar * * @return string UTF-8 representation of code point */ - private static function codePointToUtf8(int $num) : string { + private static function codePointToUtf8(int $num): string { if ($num <= 0x7F) { return chr($num); } if ($num <= 0x7FF) { - return chr(($num>>6) + 0xC0) . chr(($num&0x3F) + 0x80); + return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80); } if ($num <= 0xFFFF) { - return chr(($num>>12) + 0xE0) . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80); + return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); } if ($num <= 0x1FFFFF) { - return chr(($num>>18) + 0xF0) . chr((($num>>12)&0x3F) + 0x80) - . chr((($num>>6)&0x3F) + 0x80) . chr(($num&0x3F) + 0x80); + return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80) + . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); } throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); } - public function getType() : string { + public function getType(): string { return 'Scalar_String'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php new file mode 100644 index 00000000..517c0edd --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php @@ -0,0 +1,39 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node; + +use PhpParser\Node; +use PhpParser\NodeAbstract; + +class StaticVar extends NodeAbstract { + /** @var Expr\Variable Variable */ + public Expr\Variable $var; + /** @var null|Node\Expr Default value */ + public ?Expr $default; + + /** + * Constructs a static variable node. + * + * @param Expr\Variable $var Name + * @param null|Node\Expr $default Default value + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct( + Expr\Variable $var, ?Node\Expr $default = null, array $attributes = [] + ) { + $this->attributes = $attributes; + $this->var = $var; + $this->default = $default; + } + + public function getSubNodeNames(): array { + return ['var', 'default']; + } + + public function getType(): string { + return 'StaticVar'; + } +} + +// @deprecated compatibility alias +class_alias(StaticVar::class, Stmt\StaticVar::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php index 69d33e57..481d31a9 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt.php @@ -4,6 +4,5 @@ namespace PhpParser\Node; use PhpParser\NodeAbstract; -abstract class Stmt extends NodeAbstract -{ +abstract class Stmt extends NodeAbstract { } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php new file mode 100644 index 00000000..073df208 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php @@ -0,0 +1,29 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node\Stmt; + +use PhpParser\Node\Stmt; + +class Block extends Stmt { + /** @var Stmt[] Statements */ + public array $stmts; + + /** + * A block of statements. + * + * @param Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct(array $stmts, array $attributes = []) { + $this->attributes = $attributes; + $this->stmts = $stmts; + } + + public function getType(): string { + return 'Stmt_Block'; + } + + public function getSubNodeNames(): array { + return ['stmts']; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php index 6adc5a6c..d2bcc5eb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Break_ extends Node\Stmt -{ +class Break_ extends Node\Stmt { /** @var null|Node\Expr Number of loops to break */ - public $num; + public ?Node\Expr $num; /** * Constructs a break node. * - * @param null|Node\Expr $num Number of loops to break - * @param array $attributes Additional attributes + * @param null|Node\Expr $num Number of loops to break + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Node\Expr $num = null, array $attributes = []) { + public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; $this->num = $num; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['num']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Break'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php index 2bf044c9..a06ca183 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @@ -4,31 +4,30 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Case_ extends Node\Stmt -{ +class Case_ extends Node\Stmt { /** @var null|Node\Expr Condition (null for default) */ - public $cond; + public ?Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a case node. * - * @param null|Node\Expr $cond Condition (null for default) - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param null|Node\Expr $cond Condition (null for default) + * @param Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($cond, array $stmts = [], array $attributes = []) { + public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Case'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php index 9b9c0947..e8d39c9c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php @@ -5,25 +5,24 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; use PhpParser\Node\Expr; -class Catch_ extends Node\Stmt -{ +class Catch_ extends Node\Stmt { /** @var Node\Name[] Types of exceptions to catch */ - public $types; + public array $types; /** @var Expr\Variable|null Variable for exception */ - public $var; + public ?Expr\Variable $var; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a catch node. * - * @param Node\Name[] $types Types of exceptions to catch - * @param Expr\Variable|null $var Variable for exception - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Name[] $types Types of exceptions to catch + * @param Expr\Variable|null $var Variable for exception + * @param Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ public function __construct( - array $types, Expr\Variable $var = null, array $stmts = [], array $attributes = [] + array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] ) { $this->attributes = $attributes; $this->types = $types; @@ -31,11 +30,11 @@ class Catch_ extends Node\Stmt $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types', 'var', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Catch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php index 8abaad6d..9bdce1f1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php @@ -2,84 +2,76 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node; -class ClassConst extends Node\Stmt -{ +class ClassConst extends Node\Stmt { /** @var int Modifiers */ - public $flags; + public int $flags; /** @var Node\Const_[] Constant declarations */ - public $consts; + public array $consts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var Node\Identifier|Node\Name|Node\ComplexType|null Type declaration */ - public $type; + public ?Node $type; /** * Constructs a class const list node. * - * @param Node\Const_[] $consts Constant declarations - * @param int $flags Modifiers - * @param array $attributes Additional attributes - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups - * @param null|string|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration + * @param Node\Const_[] $consts Constant declarations + * @param int $flags Modifiers + * @param array<string, mixed> $attributes Additional attributes + * @param list<Node\AttributeGroup> $attrGroups PHP attribute groups + * @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration */ public function __construct( array $consts, int $flags = 0, array $attributes = [], array $attrGroups = [], - $type = null + ?Node $type = null ) { $this->attributes = $attributes; $this->flags = $flags; $this->consts = $consts; $this->attrGroups = $attrGroups; - $this->type = \is_string($type) ? new Node\Identifier($type) : $type; + $this->type = $type; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'consts']; } /** * Whether constant is explicitly or implicitly public. - * - * @return bool */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether constant is protected. - * - * @return bool */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether constant is private. - * - * @return bool */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether constant is final. - * - * @return bool */ - public function isFinal() : bool { - return (bool) ($this->flags & Class_::MODIFIER_FINAL); + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); } - public function getType() : string { + public function getType(): string { return 'Stmt_ClassConst'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php index 2fa4e861..fb9ba4f5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php @@ -3,23 +3,23 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\PropertyItem; -abstract class ClassLike extends Node\Stmt -{ +abstract class ClassLike extends Node\Stmt { /** @var Node\Identifier|null Name */ - public $name; + public ?Node\Identifier $name; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var Node\Name|null Namespaced name (if using NameResolver) */ - public $namespacedName; + public ?Node\Name $namespacedName; /** * @return TraitUse[] */ - public function getTraitUses() : array { + public function getTraitUses(): array { $traitUses = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof TraitUse) { @@ -32,7 +32,7 @@ abstract class ClassLike extends Node\Stmt /** * @return ClassConst[] */ - public function getConstants() : array { + public function getConstants(): array { $constants = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassConst) { @@ -45,7 +45,7 @@ abstract class ClassLike extends Node\Stmt /** * @return Property[] */ - public function getProperties() : array { + public function getProperties(): array { $properties = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { @@ -62,11 +62,11 @@ abstract class ClassLike extends Node\Stmt * * @return Property|null Property node or null if the property does not exist */ - public function getProperty(string $name) { + public function getProperty(string $name): ?Property { foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { foreach ($stmt->props as $prop) { - if ($prop instanceof PropertyProperty && $name === $prop->name->toString()) { + if ($prop instanceof PropertyItem && $name === $prop->name->toString()) { return $stmt; } } @@ -80,7 +80,7 @@ abstract class ClassLike extends Node\Stmt * * @return ClassMethod[] */ - public function getMethods() : array { + public function getMethods(): array { $methods = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod) { @@ -97,7 +97,7 @@ abstract class ClassLike extends Node\Stmt * * @return ClassMethod|null Method node or null if the method does not exist */ - public function getMethod(string $name) { + public function getMethod(string $name): ?ClassMethod { $lowerName = strtolower($name); foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php index 6e85161e..59c0519e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php @@ -2,27 +2,28 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\FunctionLike; -class ClassMethod extends Node\Stmt implements FunctionLike -{ +class ClassMethod extends Node\Stmt implements FunctionLike { /** @var int Flags */ - public $flags; + public int $flags; /** @var bool Whether to return by reference */ - public $byRef; + public bool $byRef; /** @var Node\Identifier Name */ - public $name; + public Node\Identifier $name; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[]|null Statements */ - public $stmts; + public ?array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; - private static $magicNames = [ + /** @var array<string, bool> */ + private static array $magicNames = [ '__construct' => true, '__destruct' => true, '__call' => true, @@ -46,14 +47,21 @@ class ClassMethod extends Node\Stmt implements FunctionLike * Constructs a class method node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'flags => MODIFIER_PUBLIC: Flags - * 'byRef' => false : Whether to return by reference - * 'params' => array() : Parameters - * 'returnType' => null : Return type - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * flags?: int, + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[]|null, + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'flags => 0 : Flags + * 'byRef' => false : Whether to return by reference + * 'params' => array() : Parameters + * 'returnType' => null : Return type + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -61,21 +69,20 @@ class ClassMethod extends Node\Stmt implements FunctionLike $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -83,79 +90,65 @@ class ClassMethod extends Node\Stmt implements FunctionLike return $this->returnType; } - public function getStmts() { + public function getStmts(): ?array { return $this->stmts; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } /** * Whether the method is explicitly or implicitly public. - * - * @return bool */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether the method is protected. - * - * @return bool */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether the method is private. - * - * @return bool */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether the method is abstract. - * - * @return bool */ - public function isAbstract() : bool { - return (bool) ($this->flags & Class_::MODIFIER_ABSTRACT); + public function isAbstract(): bool { + return (bool) ($this->flags & Modifiers::ABSTRACT); } /** * Whether the method is final. - * - * @return bool */ - public function isFinal() : bool { - return (bool) ($this->flags & Class_::MODIFIER_FINAL); + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); } /** * Whether the method is static. - * - * @return bool */ - public function isStatic() : bool { - return (bool) ($this->flags & Class_::MODIFIER_STATIC); + public function isStatic(): bool { + return (bool) ($this->flags & Modifiers::STATIC); } /** * Whether the method is magic. - * - * @return bool */ - public function isMagic() : bool { + public function isMagic(): bool { return isset(self::$magicNames[$this->name->toLowerString()]); } - public function getType() : string { + public function getType(): string { return 'Stmt_ClassMethod'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php index 52ed6c6c..3f492b7b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php @@ -2,39 +2,52 @@ namespace PhpParser\Node\Stmt; -use PhpParser\Error; +use PhpParser\Modifiers; use PhpParser\Node; -class Class_ extends ClassLike -{ - const MODIFIER_PUBLIC = 1; - const MODIFIER_PROTECTED = 2; - const MODIFIER_PRIVATE = 4; - const MODIFIER_STATIC = 8; - const MODIFIER_ABSTRACT = 16; - const MODIFIER_FINAL = 32; - const MODIFIER_READONLY = 64; +class Class_ extends ClassLike { + /** @deprecated Use Modifiers::PUBLIC instead */ + public const MODIFIER_PUBLIC = 1; + /** @deprecated Use Modifiers::PROTECTED instead */ + public const MODIFIER_PROTECTED = 2; + /** @deprecated Use Modifiers::PRIVATE instead */ + public const MODIFIER_PRIVATE = 4; + /** @deprecated Use Modifiers::STATIC instead */ + public const MODIFIER_STATIC = 8; + /** @deprecated Use Modifiers::ABSTRACT instead */ + public const MODIFIER_ABSTRACT = 16; + /** @deprecated Use Modifiers::FINAL instead */ + public const MODIFIER_FINAL = 32; + /** @deprecated Use Modifiers::READONLY instead */ + public const MODIFIER_READONLY = 64; - const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 + /** @deprecated Use Modifiers::VISIBILITY_MASK instead */ + public const VISIBILITY_MODIFIER_MASK = 7; // 1 | 2 | 4 - /** @var int Type */ - public $flags; + /** @var int Modifiers */ + public int $flags; /** @var null|Node\Name Name of extended class */ - public $extends; + public ?Node\Name $extends; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** * Constructs a class node. * * @param string|Node\Identifier|null $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'flags' => 0 : Flags - * 'extends' => null : Name of extended class - * 'implements' => array(): Names of implemented interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * flags?: int, + * extends?: Node\Name|null, + * implements?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'flags' => 0 : Flags + * 'extends' => null : Name of extended class + * 'implements' => array(): Names of implemented interfaces + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -46,92 +59,36 @@ class Class_ extends ClassLike $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; } /** * Whether the class is explicitly abstract. - * - * @return bool */ - public function isAbstract() : bool { - return (bool) ($this->flags & self::MODIFIER_ABSTRACT); + public function isAbstract(): bool { + return (bool) ($this->flags & Modifiers::ABSTRACT); } /** * Whether the class is final. - * - * @return bool */ - public function isFinal() : bool { - return (bool) ($this->flags & self::MODIFIER_FINAL); + public function isFinal(): bool { + return (bool) ($this->flags & Modifiers::FINAL); } - public function isReadonly() : bool { - return (bool) ($this->flags & self::MODIFIER_READONLY); + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); } /** * Whether the class is anonymous. - * - * @return bool */ - public function isAnonymous() : bool { + public function isAnonymous(): bool { return null === $this->name; } - /** - * @internal - */ - public static function verifyClassModifier($a, $b) { - if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class'); - } - } - - /** - * @internal - */ - public static function verifyModifier($a, $b) { - if ($a & self::VISIBILITY_MODIFIER_MASK && $b & self::VISIBILITY_MODIFIER_MASK) { - throw new Error('Multiple access type modifiers are not allowed'); - } - - if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) { - throw new Error('Multiple abstract modifiers are not allowed'); - } - - if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) { - throw new Error('Multiple static modifiers are not allowed'); - } - - if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) { - throw new Error('Multiple final modifiers are not allowed'); - } - - if ($a & self::MODIFIER_READONLY && $b & self::MODIFIER_READONLY) { - throw new Error('Multiple readonly modifiers are not allowed'); - } - - if ($a & 48 && $b & 48) { - throw new Error('Cannot use the final modifier on an abstract class member'); - } - } - - public function getType() : string { + public function getType(): string { return 'Stmt_Class'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php index e6316345..f1165fd0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Const_ extends Node\Stmt -{ +class Const_ extends Node\Stmt { /** @var Node\Const_[] Constant declarations */ - public $consts; + public array $consts; /** * Constructs a const list node. * - * @param Node\Const_[] $consts Constant declarations - * @param array $attributes Additional attributes + * @param Node\Const_[] $consts Constant declarations + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $consts, array $attributes = []) { $this->attributes = $attributes; $this->consts = $consts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['consts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Const'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php index 24882683..54e979dd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Continue_ extends Node\Stmt -{ +class Continue_ extends Node\Stmt { /** @var null|Node\Expr Number of loops to continue */ - public $num; + public ?Node\Expr $num; /** * Constructs a continue node. * - * @param null|Node\Expr $num Number of loops to continue - * @param array $attributes Additional attributes + * @param null|Node\Expr $num Number of loops to continue + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Node\Expr $num = null, array $attributes = []) { + public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; $this->num = $num; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['num']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Continue'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php index ac07f30c..cb9e8376 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php @@ -1,34 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Stmt; - -use PhpParser\Node; - -class DeclareDeclare extends Node\Stmt -{ - /** @var Node\Identifier Key */ - public $key; - /** @var Node\Expr Value */ - public $value; - - /** - * Constructs a declare key=>value pair node. - * - * @param string|Node\Identifier $key Key - * @param Node\Expr $value Value - * @param array $attributes Additional attributes - */ - public function __construct($key, Node\Expr $value, array $attributes = []) { - $this->attributes = $attributes; - $this->key = \is_string($key) ? new Node\Identifier($key) : $key; - $this->value = $value; - } - - public function getSubNodeNames() : array { - return ['key', 'value']; - } - - public function getType() : string { - return 'Stmt_DeclareDeclare'; - } -} +require __DIR__ . '/../DeclareItem.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php index f46ff0ba..3c0547bd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php @@ -3,32 +3,32 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\DeclareItem; -class Declare_ extends Node\Stmt -{ - /** @var DeclareDeclare[] List of declares */ - public $declares; +class Declare_ extends Node\Stmt { + /** @var DeclareItem[] List of declares */ + public array $declares; /** @var Node\Stmt[]|null Statements */ - public $stmts; + public ?array $stmts; /** * Constructs a declare node. * - * @param DeclareDeclare[] $declares List of declares - * @param Node\Stmt[]|null $stmts Statements - * @param array $attributes Additional attributes + * @param DeclareItem[] $declares List of declares + * @param Node\Stmt[]|null $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(array $declares, array $stmts = null, array $attributes = []) { + public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { $this->attributes = $attributes; $this->declares = $declares; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['declares', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Declare'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php index 78e90da0..61244428 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Do_ extends Node\Stmt -{ +class Do_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** * Constructs a do while node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Do_ extends Node\Stmt $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts', 'cond']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Do'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php index 7cc50d5d..4d424523 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Echo_ extends Node\Stmt -{ +class Echo_ extends Node\Stmt { /** @var Node\Expr[] Expressions */ - public $exprs; + public array $exprs; /** * Constructs an echo node. * - * @param Node\Expr[] $exprs Expressions - * @param array $attributes Additional attributes + * @param Node\Expr[] $exprs Expressions + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $exprs, array $attributes = []) { $this->attributes = $attributes; $this->exprs = $exprs; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['exprs']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Echo'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php index eef1ece3..b26d59ce 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class ElseIf_ extends Node\Stmt -{ +class ElseIf_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs an elseif node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class ElseIf_ extends Node\Stmt $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_ElseIf'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php index 0e61778e..3d2b066e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Else_ extends Node\Stmt -{ +class Else_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs an else node. * - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Else'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php index 5beff8b3..c071a0af 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/EnumCase.php @@ -5,33 +5,32 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; use PhpParser\Node\AttributeGroup; -class EnumCase extends Node\Stmt -{ +class EnumCase extends Node\Stmt { /** @var Node\Identifier Enum case name */ - public $name; + public Node\Identifier $name; /** @var Node\Expr|null Enum case expression */ - public $expr; + public ?Node\Expr $expr; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** - * @param string|Node\Identifier $name Enum case name - * @param Node\Expr|null $expr Enum case expression - * @param AttributeGroup[] $attrGroups PHP attribute groups - * @param array $attributes Additional attributes + * @param string|Node\Identifier $name Enum case name + * @param Node\Expr|null $expr Enum case expression + * @param list<AttributeGroup> $attrGroups PHP attribute groups + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($name, Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { + public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { parent::__construct($attributes); $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->expr = $expr; $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'expr']; } - public function getType() : string { + public function getType(): string { return 'Stmt_EnumCase'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php index 3a50c225..7eea6a69 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Enum_.php @@ -4,21 +4,25 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Enum_ extends ClassLike -{ +class Enum_ extends ClassLike { /** @var null|Node\Identifier Scalar Type */ - public $scalarType; + public ?Node $scalarType; /** @var Node\Name[] Names of implemented interfaces */ - public $implements; + public array $implements; /** - * @param string|Node\Identifier|null $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'scalarType' => null : Scalar type - * 'implements' => array() : Names of implemented interfaces - * 'stmts' => array() : Statements - * 'attrGroups' => array() : PHP attribute groups - * @param array $attributes Additional attributes + * @param string|Node\Identifier|null $name Name + * @param array{ + * scalarType?: Node\Identifier|null, + * implements?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'scalarType' => null : Scalar type + * 'implements' => array() : Names of implemented interfaces + * 'stmts' => array() : Statements + * 'attrGroups' => array() : PHP attribute groups + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->name = \is_string($name) ? new Node\Identifier($name) : $name; @@ -30,11 +34,11 @@ class Enum_ extends ClassLike parent::__construct($attributes); } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Enum'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php index 99d1687d..89751fa2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Expression.php @@ -7,27 +7,26 @@ use PhpParser\Node; /** * Represents statements of type "expr;" */ -class Expression extends Node\Stmt -{ +class Expression extends Node\Stmt { /** @var Node\Expr Expression */ - public $expr; + public Node\Expr $expr; /** * Constructs an expression statement. * - * @param Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param Node\Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Expression'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php index d55b8b68..69ecf253 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Finally_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Finally_ extends Node\Stmt -{ +class Finally_ extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a finally node. * - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Finally'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php index 1323d37c..6f2fbb9e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php @@ -4,26 +4,30 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class For_ extends Node\Stmt -{ +class For_ extends Node\Stmt { /** @var Node\Expr[] Init expressions */ - public $init; + public array $init; /** @var Node\Expr[] Loop conditions */ - public $cond; + public array $cond; /** @var Node\Expr[] Loop expressions */ - public $loop; + public array $loop; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a for loop node. * - * @param array $subNodes Array of the following optional subnodes: - * 'init' => array(): Init expressions - * 'cond' => array(): Loop conditions - * 'loop' => array(): Loop expressions - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes + * @param array{ + * init?: Node\Expr[], + * cond?: Node\Expr[], + * loop?: Node\Expr[], + * stmts?: Node\Stmt[], + * } $subNodes Array of the following optional subnodes: + * 'init' => array(): Init expressions + * 'cond' => array(): Loop conditions + * 'loop' => array(): Loop expressions + * 'stmts' => array(): Statements + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -33,11 +37,11 @@ class For_ extends Node\Stmt $this->stmts = $subNodes['stmts'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['init', 'cond', 'loop', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_For'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php index 0556a7ce..c5d9a8b1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php @@ -4,29 +4,32 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Foreach_ extends Node\Stmt -{ +class Foreach_ extends Node\Stmt { /** @var Node\Expr Expression to iterate */ - public $expr; + public Node\Expr $expr; /** @var null|Node\Expr Variable to assign key to */ - public $keyVar; + public ?Node\Expr $keyVar; /** @var bool Whether to assign value by reference */ - public $byRef; + public bool $byRef; /** @var Node\Expr Variable to assign value to */ - public $valueVar; + public Node\Expr $valueVar; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a foreach node. * - * @param Node\Expr $expr Expression to iterate - * @param Node\Expr $valueVar Variable to assign value to - * @param array $subNodes Array of the following optional subnodes: - * 'keyVar' => null : Variable to assign key to - * 'byRef' => false : Whether to assign value by reference - * 'stmts' => array(): Statements - * @param array $attributes Additional attributes + * @param Node\Expr $expr Expression to iterate + * @param Node\Expr $valueVar Variable to assign value to + * @param array{ + * keyVar?: Node\Expr|null, + * byRef?: bool, + * stmts?: Node\Stmt[], + * } $subNodes Array of the following optional subnodes: + * 'keyVar' => null : Variable to assign key to + * 'byRef' => false : Whether to assign value by reference + * 'stmts' => array(): Statements + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -37,11 +40,11 @@ class Foreach_ extends Node\Stmt $this->stmts = $subNodes['stmts'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Foreach'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php index c2ccae24..2111bab7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php @@ -5,56 +5,60 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; use PhpParser\Node\FunctionLike; -class Function_ extends Node\Stmt implements FunctionLike -{ +class Function_ extends Node\Stmt implements FunctionLike { /** @var bool Whether function returns by reference */ - public $byRef; + public bool $byRef; /** @var Node\Identifier Name */ - public $name; + public Node\Identifier $name; /** @var Node\Param[] Parameters */ - public $params; + public array $params; /** @var null|Node\Identifier|Node\Name|Node\ComplexType Return type */ - public $returnType; + public ?Node $returnType; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** @var Node\Name|null Namespaced name (if using NameResolver) */ - public $namespacedName; + public ?Node\Name $namespacedName; /** * Constructs a function node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'byRef' => false : Whether to return by reference - * 'params' => array(): Parameters - * 'returnType' => null : Return type - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * byRef?: bool, + * params?: Node\Param[], + * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'byRef' => false : Whether to return by reference + * 'params' => array(): Parameters + * 'returnType' => null : Return type + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; - $returnType = $subNodes['returnType'] ?? null; - $this->returnType = \is_string($returnType) ? new Node\Identifier($returnType) : $returnType; + $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; } - public function returnsByRef() : bool { + public function returnsByRef(): bool { return $this->byRef; } - public function getParams() : array { + public function getParams(): array { return $this->params; } @@ -62,16 +66,16 @@ class Function_ extends Node\Stmt implements FunctionLike return $this->returnType; } - public function getAttrGroups() : array { + public function getAttrGroups(): array { return $this->attrGroups; } /** @return Node\Stmt[] */ - public function getStmts() : array { + public function getStmts(): array { return $this->stmts; } - public function getType() : string { + public function getType(): string { return 'Stmt_Function'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php index a0022ad9..d3ab12fc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Global_ extends Node\Stmt -{ +class Global_ extends Node\Stmt { /** @var Node\Expr[] Variables */ - public $vars; + public array $vars; /** * Constructs a global variables list node. * - * @param Node\Expr[] $vars Variables to unset - * @param array $attributes Additional attributes + * @param Node\Expr[] $vars Variables to unset + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Global'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php index 24a57f78..26a0d01e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php @@ -5,27 +5,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class Goto_ extends Stmt -{ +class Goto_ extends Stmt { /** @var Identifier Name of label to jump to */ - public $name; + public Identifier $name; /** * Constructs a goto node. * - * @param string|Identifier $name Name of label to jump to - * @param array $attributes Additional attributes + * @param string|Identifier $name Name of label to jump to + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Goto'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php index 24520d22..0ec8e9d4 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/GroupUse.php @@ -4,23 +4,25 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Name; use PhpParser\Node\Stmt; +use PhpParser\Node\UseItem; -class GroupUse extends Stmt -{ - /** @var int Type of group use */ - public $type; +class GroupUse extends Stmt { + /** + * @var Use_::TYPE_* Type of group use + */ + public int $type; /** @var Name Prefix for uses */ - public $prefix; - /** @var UseUse[] Uses */ - public $uses; + public Name $prefix; + /** @var UseItem[] Uses */ + public array $uses; /** * Constructs a group use node. * - * @param Name $prefix Prefix for uses - * @param UseUse[] $uses Uses - * @param int $type Type of group use - * @param array $attributes Additional attributes + * @param Name $prefix Prefix for uses + * @param UseItem[] $uses Uses + * @param Use_::TYPE_* $type Type of group use + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { $this->attributes = $attributes; @@ -29,11 +31,11 @@ class GroupUse extends Stmt $this->uses = $uses; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type', 'prefix', 'uses']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_GroupUse'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php index 8e624e0f..665bacde 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Stmt; -class HaltCompiler extends Stmt -{ +class HaltCompiler extends Stmt { /** @var string Remaining text after halt compiler statement. */ - public $remaining; + public string $remaining; /** * Constructs a __halt_compiler node. * - * @param string $remaining Remaining text after halt compiler statement. - * @param array $attributes Additional attributes + * @param string $remaining Remaining text after halt compiler statement. + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(string $remaining, array $attributes = []) { $this->attributes = $attributes; $this->remaining = $remaining; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['remaining']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_HaltCompiler'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php index a1bae4bf..544390ff 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php @@ -4,26 +4,29 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class If_ extends Node\Stmt -{ +class If_ extends Node\Stmt { /** @var Node\Expr Condition expression */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var ElseIf_[] Elseif clauses */ - public $elseifs; + public array $elseifs; /** @var null|Else_ Else clause */ - public $else; + public ?Else_ $else; /** * Constructs an if node. * - * @param Node\Expr $cond Condition - * @param array $subNodes Array of the following optional subnodes: - * 'stmts' => array(): Statements - * 'elseifs' => array(): Elseif clauses - * 'else' => null : Else clause - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param array{ + * stmts?: Node\Stmt[], + * elseifs?: ElseIf_[], + * else?: Else_|null, + * } $subNodes Array of the following optional subnodes: + * 'stmts' => array(): Statements + * 'elseifs' => array(): Elseif clauses + * 'else' => null : Else clause + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -33,11 +36,11 @@ class If_ extends Node\Stmt $this->else = $subNodes['else'] ?? null; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts', 'elseifs', 'else']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_If'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php index 0711d284..0515d020 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Stmt; -class InlineHTML extends Stmt -{ +class InlineHTML extends Stmt { /** @var string String */ - public $value; + public string $value; /** * Constructs an inline HTML node. * - * @param string $value String - * @param array $attributes Additional attributes + * @param string $value String + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['value']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_InlineHTML'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php index 4d587dd4..9359064f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php @@ -4,20 +4,23 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Interface_ extends ClassLike -{ +class Interface_ extends ClassLike { /** @var Node\Name[] Extended interfaces */ - public $extends; + public array $extends; /** * Constructs a class node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'extends' => array(): Name of extended interfaces - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * extends?: Node\Name[], + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'extends' => array(): Name of extended interfaces + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -27,11 +30,11 @@ class Interface_ extends ClassLike $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'extends', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Interface'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php index 3edcb3be..658468d2 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php @@ -5,27 +5,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Identifier; use PhpParser\Node\Stmt; -class Label extends Stmt -{ +class Label extends Stmt { /** @var Identifier Name */ - public $name; + public Identifier $name; /** * Constructs a label node. * - * @param string|Identifier $name Name - * @param array $attributes Additional attributes + * @param string|Identifier $name Name + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Label'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php index c6320457..f5b59ad6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php @@ -4,35 +4,34 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Namespace_ extends Node\Stmt -{ +class Namespace_ extends Node\Stmt { /* For use in the "kind" attribute */ - const KIND_SEMICOLON = 1; - const KIND_BRACED = 2; + public const KIND_SEMICOLON = 1; + public const KIND_BRACED = 2; /** @var null|Node\Name Name */ - public $name; + public ?Node\Name $name; /** @var Node\Stmt[] Statements */ public $stmts; /** * Constructs a namespace node. * - * @param null|Node\Name $name Name - * @param null|Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param null|Node\Name $name Name + * @param null|Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Node\Name $name = null, $stmts = [], array $attributes = []) { + public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['name', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Namespace'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php index f86f8df7..3acfa46f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php @@ -5,13 +5,12 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; /** Nop/empty statement (;). */ -class Nop extends Node\Stmt -{ - public function getSubNodeNames() : array { +class Nop extends Node\Stmt { + public function getSubNodeNames(): array { return []; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Nop'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php index bc781bbf..872ea6b7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php @@ -2,90 +2,81 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\ComplexType; use PhpParser\Node\Identifier; use PhpParser\Node\Name; +use PhpParser\Node\PropertyItem; -class Property extends Node\Stmt -{ +class Property extends Node\Stmt { /** @var int Modifiers */ - public $flags; - /** @var PropertyProperty[] Properties */ - public $props; + public int $flags; + /** @var PropertyItem[] Properties */ + public array $props; /** @var null|Identifier|Name|ComplexType Type declaration */ - public $type; + public ?Node $type; /** @var Node\AttributeGroup[] PHP attribute groups */ - public $attrGroups; + public array $attrGroups; /** * Constructs a class property list node. * - * @param int $flags Modifiers - * @param PropertyProperty[] $props Properties - * @param array $attributes Additional attributes - * @param null|string|Identifier|Name|ComplexType $type Type declaration - * @param Node\AttributeGroup[] $attrGroups PHP attribute groups + * @param int $flags Modifiers + * @param PropertyItem[] $props Properties + * @param array<string, mixed> $attributes Additional attributes + * @param null|Identifier|Name|ComplexType $type Type declaration + * @param Node\AttributeGroup[] $attrGroups PHP attribute groups */ - public function __construct(int $flags, array $props, array $attributes = [], $type = null, array $attrGroups = []) { + public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = []) { $this->attributes = $attributes; $this->flags = $flags; $this->props = $props; - $this->type = \is_string($type) ? new Identifier($type) : $type; + $this->type = $type; $this->attrGroups = $attrGroups; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'props']; } /** * Whether the property is explicitly or implicitly public. - * - * @return bool */ - public function isPublic() : bool { - return ($this->flags & Class_::MODIFIER_PUBLIC) !== 0 - || ($this->flags & Class_::VISIBILITY_MODIFIER_MASK) === 0; + public function isPublic(): bool { + return ($this->flags & Modifiers::PUBLIC) !== 0 + || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether the property is protected. - * - * @return bool */ - public function isProtected() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PROTECTED); + public function isProtected(): bool { + return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether the property is private. - * - * @return bool */ - public function isPrivate() : bool { - return (bool) ($this->flags & Class_::MODIFIER_PRIVATE); + public function isPrivate(): bool { + return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether the property is static. - * - * @return bool */ - public function isStatic() : bool { - return (bool) ($this->flags & Class_::MODIFIER_STATIC); + public function isStatic(): bool { + return (bool) ($this->flags & Modifiers::STATIC); } /** * Whether the property is readonly. - * - * @return bool */ - public function isReadonly() : bool { - return (bool) ($this->flags & Class_::MODIFIER_READONLY); + public function isReadonly(): bool { + return (bool) ($this->flags & Modifiers::READONLY); } - public function getType() : string { + public function getType(): string { return 'Stmt_Property'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php index 205731e2..4a21a880 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php @@ -1,34 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Stmt; - -use PhpParser\Node; - -class PropertyProperty extends Node\Stmt -{ - /** @var Node\VarLikeIdentifier Name */ - public $name; - /** @var null|Node\Expr Default */ - public $default; - - /** - * Constructs a class property node. - * - * @param string|Node\VarLikeIdentifier $name Name - * @param null|Node\Expr $default Default value - * @param array $attributes Additional attributes - */ - public function __construct($name, Node\Expr $default = null, array $attributes = []) { - $this->attributes = $attributes; - $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; - $this->default = $default; - } - - public function getSubNodeNames() : array { - return ['name', 'default']; - } - - public function getType() : string { - return 'Stmt_PropertyProperty'; - } -} +require __DIR__ . '/../PropertyItem.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php index efc578c5..9c44cca8 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Return_ extends Node\Stmt -{ +class Return_ extends Node\Stmt { /** @var null|Node\Expr Expression */ - public $expr; + public ?Node\Expr $expr; /** * Constructs a return node. * - * @param null|Node\Expr $expr Expression - * @param array $attributes Additional attributes + * @param null|Node\Expr $expr Expression + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(Node\Expr $expr = null, array $attributes = []) { + public function __construct(?Node\Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['expr']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Return'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php index 29584560..88452e7f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php @@ -1,37 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Stmt; - -use PhpParser\Node; -use PhpParser\Node\Expr; - -class StaticVar extends Node\Stmt -{ - /** @var Expr\Variable Variable */ - public $var; - /** @var null|Node\Expr Default value */ - public $default; - - /** - * Constructs a static variable node. - * - * @param Expr\Variable $var Name - * @param null|Node\Expr $default Default value - * @param array $attributes Additional attributes - */ - public function __construct( - Expr\Variable $var, Node\Expr $default = null, array $attributes = [] - ) { - $this->attributes = $attributes; - $this->var = $var; - $this->default = $default; - } - - public function getSubNodeNames() : array { - return ['var', 'default']; - } - - public function getType() : string { - return 'Stmt_StaticVar'; - } -} +require __DIR__ . '/../StaticVar.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php index 464898ff..a84de106 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php @@ -2,29 +2,29 @@ namespace PhpParser\Node\Stmt; +use PhpParser\Node\StaticVar; use PhpParser\Node\Stmt; -class Static_ extends Stmt -{ +class Static_ extends Stmt { /** @var StaticVar[] Variable definitions */ - public $vars; + public array $vars; /** * Constructs a static variables list node. * - * @param StaticVar[] $vars Variable definitions - * @param array $attributes Additional attributes + * @param StaticVar[] $vars Variable definitions + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Static'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php index 2c8dae02..21e5efa5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Switch_ extends Node\Stmt -{ +class Switch_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Case_[] Case list */ - public $cases; + public array $cases; /** * Constructs a case node. * - * @param Node\Expr $cond Condition - * @param Case_[] $cases Case list - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param Case_[] $cases Case list + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Switch_ extends Node\Stmt $this->cases = $cases; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'cases']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Switch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php deleted file mode 100644 index a34e2b36..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php declare(strict_types=1); - -namespace PhpParser\Node\Stmt; - -use PhpParser\Node; - -class Throw_ extends Node\Stmt -{ - /** @var Node\Expr Expression */ - public $expr; - - /** - * Constructs a legacy throw statement node. - * - * @param Node\Expr $expr Expression - * @param array $attributes Additional attributes - */ - public function __construct(Node\Expr $expr, array $attributes = []) { - $this->attributes = $attributes; - $this->expr = $expr; - } - - public function getSubNodeNames() : array { - return ['expr']; - } - - public function getType() : string { - return 'Stmt_Throw'; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php index 9e97053b..7705a570 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class TraitUse extends Node\Stmt -{ +class TraitUse extends Node\Stmt { /** @var Node\Name[] Traits */ - public $traits; + public array $traits; /** @var TraitUseAdaptation[] Adaptations */ - public $adaptations; + public array $adaptations; /** * Constructs a trait use node. * - * @param Node\Name[] $traits Traits + * @param Node\Name[] $traits Traits * @param TraitUseAdaptation[] $adaptations Adaptations - * @param array $attributes Additional attributes + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $traits, array $adaptations = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class TraitUse extends Node\Stmt $this->adaptations = $adaptations; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['traits', 'adaptations']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUse'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php index 8bdd2c04..987bc88e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php @@ -4,10 +4,9 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -abstract class TraitUseAdaptation extends Node\Stmt -{ +abstract class TraitUseAdaptation extends Node\Stmt { /** @var Node\Name|null Trait name */ - public $trait; + public ?Node\Name $trait; /** @var Node\Identifier Method name */ - public $method; + public Node\Identifier $method; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php index a3bccbd1..449671e7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php @@ -4,23 +4,22 @@ namespace PhpParser\Node\Stmt\TraitUseAdaptation; use PhpParser\Node; -class Alias extends Node\Stmt\TraitUseAdaptation -{ +class Alias extends Node\Stmt\TraitUseAdaptation { /** @var null|int New modifier */ - public $newModifier; + public ?int $newModifier; /** @var null|Node\Identifier New name */ - public $newName; + public ?Node\Identifier $newName; /** * Constructs a trait use precedence adaptation node. * - * @param null|Node\Name $trait Trait name - * @param string|Node\Identifier $method Method name - * @param null|int $newModifier New modifier - * @param null|string|Node\Identifier $newName New name - * @param array $attributes Additional attributes + * @param null|Node\Name $trait Trait name + * @param string|Node\Identifier $method Method name + * @param null|int $newModifier New modifier + * @param null|string|Node\Identifier $newName New name + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct($trait, $method, $newModifier, $newName, array $attributes = []) { + public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; @@ -28,11 +27,11 @@ class Alias extends Node\Stmt\TraitUseAdaptation $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['trait', 'method', 'newModifier', 'newName']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUseAdaptation_Alias'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php index 80385f64..7bc40837 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php @@ -4,18 +4,17 @@ namespace PhpParser\Node\Stmt\TraitUseAdaptation; use PhpParser\Node; -class Precedence extends Node\Stmt\TraitUseAdaptation -{ +class Precedence extends Node\Stmt\TraitUseAdaptation { /** @var Node\Name[] Overwritten traits */ - public $insteadof; + public array $insteadof; /** * Constructs a trait use precedence adaptation node. * - * @param Node\Name $trait Trait name - * @param string|Node\Identifier $method Method name - * @param Node\Name[] $insteadof Overwritten traits - * @param array $attributes Additional attributes + * @param Node\Name $trait Trait name + * @param string|Node\Identifier $method Method name + * @param Node\Name[] $insteadof Overwritten traits + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class Precedence extends Node\Stmt\TraitUseAdaptation $this->insteadof = $insteadof; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['trait', 'method', 'insteadof']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_TraitUseAdaptation_Precedence'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php index 0cec203a..5f2b3307 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php @@ -4,16 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Trait_ extends ClassLike -{ +class Trait_ extends ClassLike { /** * Constructs a trait node. * * @param string|Node\Identifier $name Name - * @param array $subNodes Array of the following optional subnodes: - * 'stmts' => array(): Statements - * 'attrGroups' => array(): PHP attribute groups - * @param array $attributes Additional attributes + * @param array{ + * stmts?: Node\Stmt[], + * attrGroups?: Node\AttributeGroup[], + * } $subNodes Array of the following optional subnodes: + * 'stmts' => array(): Statements + * 'attrGroups' => array(): PHP attribute groups + * @param array<string, mixed> $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; @@ -22,11 +24,11 @@ class Trait_ extends ClassLike $this->attrGroups = $subNodes['attrGroups'] ?? []; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['attrGroups', 'name', 'stmts']; } - public function getType() : string { + public function getType(): string { return 'Stmt_Trait'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php index 7fc158c5..6414c46c 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php @@ -4,35 +4,34 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class TryCatch extends Node\Stmt -{ +class TryCatch extends Node\Stmt { /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** @var Catch_[] Catches */ - public $catches; + public array $catches; /** @var null|Finally_ Optional finally node */ - public $finally; + public ?Finally_ $finally; /** * Constructs a try catch node. * - * @param Node\Stmt[] $stmts Statements - * @param Catch_[] $catches Catches - * @param null|Finally_ $finally Optional finally node - * @param array $attributes Additional attributes + * @param Node\Stmt[] $stmts Statements + * @param Catch_[] $catches Catches + * @param null|Finally_ $finally Optional finally node + * @param array<string, mixed> $attributes Additional attributes */ - public function __construct(array $stmts, array $catches, Finally_ $finally = null, array $attributes = []) { + public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; $this->catches = $catches; $this->finally = $finally; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['stmts', 'catches', 'finally']; } - public function getType() : string { + public function getType(): string { return 'Stmt_TryCatch'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php index 310e427a..c211beb0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php @@ -4,27 +4,26 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class Unset_ extends Node\Stmt -{ +class Unset_ extends Node\Stmt { /** @var Node\Expr[] Variables to unset */ - public $vars; + public array $vars; /** * Constructs an unset node. * - * @param Node\Expr[] $vars Variables to unset - * @param array $attributes Additional attributes + * @param Node\Expr[] $vars Variables to unset + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['vars']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Unset'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php index 32bd7847..85830edc 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php @@ -1,52 +1,3 @@ <?php declare(strict_types=1); -namespace PhpParser\Node\Stmt; - -use PhpParser\Node; -use PhpParser\Node\Identifier; - -class UseUse extends Node\Stmt -{ - /** @var int One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses */ - public $type; - /** @var Node\Name Namespace, class, function or constant to alias */ - public $name; - /** @var Identifier|null Alias */ - public $alias; - - /** - * Constructs an alias (use) node. - * - * @param Node\Name $name Namespace/Class to alias - * @param null|string|Identifier $alias Alias - * @param int $type Type of the use element (for mixed group use only) - * @param array $attributes Additional attributes - */ - public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { - $this->attributes = $attributes; - $this->type = $type; - $this->name = $name; - $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; - } - - public function getSubNodeNames() : array { - return ['type', 'name', 'alias']; - } - - /** - * Get alias. If not explicitly given this is the last component of the used name. - * - * @return Identifier - */ - public function getAlias() : Identifier { - if (null !== $this->alias) { - return $this->alias; - } - - return new Identifier($this->name->getLast()); - } - - public function getType() : string { - return 'Stmt_UseUse'; - } -} +require __DIR__ . '/../UseItem.php'; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php index 8753da31..5b2d8648 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php @@ -3,33 +3,33 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node\Stmt; +use PhpParser\Node\UseItem; -class Use_ extends Stmt -{ +class Use_ extends Stmt { /** * Unknown type. Both Stmt\Use_ / Stmt\GroupUse and Stmt\UseUse have a $type property, one of them will always be * TYPE_UNKNOWN while the other has one of the three other possible types. For normal use statements the type on the * Stmt\UseUse is unknown. It's only the other way around for mixed group use declarations. */ - const TYPE_UNKNOWN = 0; + public const TYPE_UNKNOWN = 0; /** Class or namespace import */ - const TYPE_NORMAL = 1; + public const TYPE_NORMAL = 1; /** Function import */ - const TYPE_FUNCTION = 2; + public const TYPE_FUNCTION = 2; /** Constant import */ - const TYPE_CONSTANT = 3; + public const TYPE_CONSTANT = 3; - /** @var int Type of alias */ - public $type; - /** @var UseUse[] Aliases */ - public $uses; + /** @var self::TYPE_* Type of alias */ + public int $type; + /** @var UseItem[] Aliases */ + public array $uses; /** * Constructs an alias (use) list node. * - * @param UseUse[] $uses Aliases - * @param int $type Type of alias - * @param array $attributes Additional attributes + * @param UseItem[] $uses Aliases + * @param Stmt\Use_::TYPE_* $type Type of alias + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { $this->attributes = $attributes; @@ -37,11 +37,11 @@ class Use_ extends Stmt $this->uses = $uses; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['type', 'uses']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_Use'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php index f41034f8..2f7aed23 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php @@ -4,19 +4,18 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; -class While_ extends Node\Stmt -{ +class While_ extends Node\Stmt { /** @var Node\Expr Condition */ - public $cond; + public Node\Expr $cond; /** @var Node\Stmt[] Statements */ - public $stmts; + public array $stmts; /** * Constructs a while node. * - * @param Node\Expr $cond Condition - * @param Node\Stmt[] $stmts Statements - * @param array $attributes Additional attributes + * @param Node\Expr $cond Condition + * @param Node\Stmt[] $stmts Statements + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; @@ -24,11 +23,11 @@ class While_ extends Node\Stmt $this->stmts = $stmts; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['cond', 'stmts']; } - - public function getType() : string { + + public function getType(): string { return 'Stmt_While'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php index 93cecd23..bad88d2b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php @@ -2,27 +2,26 @@ namespace PhpParser\Node; -class UnionType extends ComplexType -{ +class UnionType extends ComplexType { /** @var (Identifier|Name|IntersectionType)[] Types */ - public $types; + public array $types; /** * Constructs a union type. * - * @param (Identifier|Name|IntersectionType)[] $types Types - * @param array $attributes Additional attributes + * @param (Identifier|Name|IntersectionType)[] $types Types + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { $this->attributes = $attributes; $this->types = $types; } - public function getSubNodeNames() : array { + public function getSubNodeNames(): array { return ['types']; } - - public function getType() : string { + + public function getType(): string { return 'UnionType'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php b/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php new file mode 100644 index 00000000..a7d9fc44 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php @@ -0,0 +1,55 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Node; + +use PhpParser\Node; +use PhpParser\NodeAbstract; +use PhpParser\Node\Stmt\Use_; + +class UseItem extends NodeAbstract { + /** + * @var Use_::TYPE_* One of the Stmt\Use_::TYPE_* constants. Will only differ from TYPE_UNKNOWN for mixed group uses + */ + public int $type; + /** @var Node\Name Namespace, class, function or constant to alias */ + public Name $name; + /** @var Identifier|null Alias */ + public ?Identifier $alias; + + /** + * Constructs an alias (use) item node. + * + * @param Node\Name $name Namespace/Class to alias + * @param null|string|Identifier $alias Alias + * @param Use_::TYPE_* $type Type of the use element (for mixed group use only) + * @param array<string, mixed> $attributes Additional attributes + */ + public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { + $this->attributes = $attributes; + $this->type = $type; + $this->name = $name; + $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; + } + + public function getSubNodeNames(): array { + return ['type', 'name', 'alias']; + } + + /** + * Get alias. If not explicitly given this is the last component of the used name. + */ + public function getAlias(): Identifier { + if (null !== $this->alias) { + return $this->alias; + } + + return new Identifier($this->name->getLast()); + } + + public function getType(): string { + return 'UseItem'; + } +} + +// @deprecated compatibility alias +class_alias(UseItem::class, Stmt\UseUse::class); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php b/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php index a30807a6..9baa6fe0 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php @@ -9,9 +9,8 @@ namespace PhpParser\Node; * Examples: Names in property declarations are formatted as variables. Names in static property * lookups are also formatted as variables. */ -class VarLikeIdentifier extends Identifier -{ - public function getType() : string { +class VarLikeIdentifier extends Identifier { + public function getType(): string { return 'VarLikeIdentifier'; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php b/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php index 403a24df..48c4f338 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php @@ -11,7 +11,7 @@ class VariadicPlaceholder extends NodeAbstract { /** * Create a variadic argument placeholder (first-class callable syntax). * - * @param array $attributes Additional attributes + * @param array<string, mixed> $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; @@ -24,4 +24,4 @@ class VariadicPlaceholder extends NodeAbstract { public function getSubNodeNames(): array { return []; } -} \ No newline at end of file +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php index 04514da1..7c3a3607 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php @@ -2,14 +2,14 @@ namespace PhpParser; -abstract class NodeAbstract implements Node, \JsonSerializable -{ - protected $attributes; +abstract class NodeAbstract implements Node, \JsonSerializable { + /** @var array<string, mixed> Attributes */ + protected array $attributes; /** * Creates a Node. * - * @param array $attributes Array of attributes + * @param array<string, mixed> $attributes Array of attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; @@ -20,7 +20,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int Start line (or -1 if not available) */ - public function getLine() : int { + public function getLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -31,7 +31,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int Start line (or -1 if not available) */ - public function getStartLine() : int { + public function getStartLine(): int { return $this->attributes['startLine'] ?? -1; } @@ -42,7 +42,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int End line (or -1 if not available) */ - public function getEndLine() : int { + public function getEndLine(): int { return $this->attributes['endLine'] ?? -1; } @@ -55,7 +55,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int Token start position (or -1 if not available) */ - public function getStartTokenPos() : int { + public function getStartTokenPos(): int { return $this->attributes['startTokenPos'] ?? -1; } @@ -68,7 +68,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int Token end position (or -1 if not available) */ - public function getEndTokenPos() : int { + public function getEndTokenPos(): int { return $this->attributes['endTokenPos'] ?? -1; } @@ -79,7 +79,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int File start position (or -1 if not available) */ - public function getStartFilePos() : int { + public function getStartFilePos(): int { return $this->attributes['startFilePos'] ?? -1; } @@ -90,7 +90,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return int File end position (or -1 if not available) */ - public function getEndFilePos() : int { + public function getEndFilePos(): int { return $this->attributes['endFilePos'] ?? -1; } @@ -101,7 +101,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return Comment[] */ - public function getComments() : array { + public function getComments(): array { return $this->attributes['comments'] ?? []; } @@ -110,7 +110,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @return null|Comment\Doc Doc comment object or null */ - public function getDocComment() { + public function getDocComment(): ?Comment\Doc { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { $comment = $comments[$i]; @@ -129,7 +129,7 @@ abstract class NodeAbstract implements Node, \JsonSerializable * * @param Comment\Doc $docComment Doc comment to set */ - public function setDocComment(Comment\Doc $docComment) { + public function setDocComment(Comment\Doc $docComment): void { $comments = $this->getComments(); for ($i = count($comments) - 1; $i >= 0; $i--) { if ($comments[$i] instanceof Comment\Doc) { @@ -145,11 +145,11 @@ abstract class NodeAbstract implements Node, \JsonSerializable $this->setAttribute('comments', $comments); } - public function setAttribute(string $key, $value) { + public function setAttribute(string $key, $value): void { $this->attributes[$key] = $value; } - public function hasAttribute(string $key) : bool { + public function hasAttribute(string $key): bool { return array_key_exists($key, $this->attributes); } @@ -161,18 +161,18 @@ abstract class NodeAbstract implements Node, \JsonSerializable return $default; } - public function getAttributes() : array { + public function getAttributes(): array { return $this->attributes; } - public function setAttributes(array $attributes) { + public function setAttributes(array $attributes): void { $this->attributes = $attributes; } /** - * @return array + * @return array<string, mixed> */ - public function jsonSerialize() : array { + public function jsonSerialize(): array { return ['nodeType' => $this->getType()] + get_object_vars($this); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php index ba622efd..a2535de7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php @@ -2,17 +2,33 @@ namespace PhpParser; +use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Include_; -use PhpParser\Node\Stmt\Class_; +use PhpParser\Node\Expr\List_; +use PhpParser\Node\Scalar\Int_; +use PhpParser\Node\Scalar\InterpolatedString; +use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\GroupUse; use PhpParser\Node\Stmt\Use_; -use PhpParser\Node\Stmt\UseUse; +use PhpParser\Node\UseItem; -class NodeDumper -{ - private $dumpComments; - private $dumpPositions; - private $code; +class NodeDumper { + private bool $dumpComments; + private bool $dumpPositions; + private bool $dumpOtherAttributes; + private ?string $code; + private string $res; + private string $nl; + + private const IGNORE_ATTRIBUTES = [ + 'comments' => true, + 'startLine' => true, + 'endLine' => true, + 'startFilePos' => true, + 'endFilePos' => true, + 'startTokenPos' => true, + 'endTokenPos' => true, + ]; /** * Constructs a NodeDumper. @@ -21,150 +37,218 @@ class NodeDumper * * bool dumpComments: Whether comments should be dumped. * * bool dumpPositions: Whether line/offset information should be dumped. To dump offset * information, the code needs to be passed to dump(). + * * bool dumpOtherAttributes: Whether non-comment, non-position attributes should be dumped. * * @param array $options Options (see description) */ public function __construct(array $options = []) { $this->dumpComments = !empty($options['dumpComments']); $this->dumpPositions = !empty($options['dumpPositions']); + $this->dumpOtherAttributes = !empty($options['dumpOtherAttributes']); } /** * Dumps a node or array. * - * @param array|Node $node Node or array to dump + * @param array|Node $node Node or array to dump * @param string|null $code Code corresponding to dumped AST. This only needs to be passed if * the dumpPositions option is enabled and the dumping of node offsets * is desired. * * @return string Dumped value */ - public function dump($node, string $code = null) : string { + public function dump($node, ?string $code = null): string { $this->code = $code; - return $this->dumpRecursive($node); + $this->res = ''; + $this->nl = "\n"; + $this->dumpRecursive($node, false); + return $this->res; } - protected function dumpRecursive($node) { + /** @param mixed $node */ + protected function dumpRecursive($node, bool $indent = true): void { + if ($indent) { + $this->nl .= " "; + } if ($node instanceof Node) { - $r = $node->getType(); + $this->res .= $node->getType(); if ($this->dumpPositions && null !== $p = $this->dumpPosition($node)) { - $r .= $p; + $this->res .= $p; } - $r .= '('; + $this->res .= '('; foreach ($node->getSubNodeNames() as $key) { - $r .= "\n " . $key . ': '; + $this->res .= "$this->nl " . $key . ': '; $value = $node->$key; - if (null === $value) { - $r .= 'null'; - } elseif (false === $value) { - $r .= 'false'; - } elseif (true === $value) { - $r .= 'true'; - } elseif (is_scalar($value)) { + if (\is_int($value)) { if ('flags' === $key || 'newModifier' === $key) { - $r .= $this->dumpFlags($value); - } elseif ('type' === $key && $node instanceof Include_) { - $r .= $this->dumpIncludeType($value); - } elseif ('type' === $key - && ($node instanceof Use_ || $node instanceof UseUse || $node instanceof GroupUse)) { - $r .= $this->dumpUseType($value); - } else { - $r .= $value; + $this->res .= $this->dumpFlags($value); + continue; + } + if ('type' === $key && $node instanceof Include_) { + $this->res .= $this->dumpIncludeType($value); + continue; + } + if ('type' === $key + && ($node instanceof Use_ || $node instanceof UseItem || $node instanceof GroupUse)) { + $this->res .= $this->dumpUseType($value); + continue; } - } else { - $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); } + $this->dumpRecursive($value); } if ($this->dumpComments && $comments = $node->getComments()) { - $r .= "\n comments: " . str_replace("\n", "\n ", $this->dumpRecursive($comments)); + $this->res .= "$this->nl comments: "; + $this->dumpRecursive($comments); } - } elseif (is_array($node)) { - $r = 'array('; - foreach ($node as $key => $value) { - $r .= "\n " . $key . ': '; + if ($this->dumpOtherAttributes) { + foreach ($node->getAttributes() as $key => $value) { + if (isset(self::IGNORE_ATTRIBUTES[$key])) { + continue; + } - if (null === $value) { - $r .= 'null'; - } elseif (false === $value) { - $r .= 'false'; - } elseif (true === $value) { - $r .= 'true'; - } elseif (is_scalar($value)) { - $r .= $value; - } else { - $r .= str_replace("\n", "\n ", $this->dumpRecursive($value)); + $this->res .= "$this->nl $key: "; + if (\is_int($value)) { + if ('kind' === $key) { + if ($node instanceof Int_) { + $this->res .= $this->dumpIntKind($value); + continue; + } + if ($node instanceof String_ || $node instanceof InterpolatedString) { + $this->res .= $this->dumpStringKind($value); + continue; + } + if ($node instanceof Array_) { + $this->res .= $this->dumpArrayKind($value); + continue; + } + if ($node instanceof List_) { + $this->res .= $this->dumpListKind($value); + continue; + } + } + } + $this->dumpRecursive($value); } } + $this->res .= "$this->nl)"; + } elseif (\is_array($node)) { + $this->res .= 'array('; + foreach ($node as $key => $value) { + $this->res .= "$this->nl " . $key . ': '; + $this->dumpRecursive($value); + } + $this->res .= "$this->nl)"; } elseif ($node instanceof Comment) { - return $node->getReformattedText(); + $this->res .= \str_replace("\n", $this->nl, $node->getReformattedText()); + } elseif (\is_string($node)) { + $this->res .= \str_replace("\n", $this->nl, (string)$node); + } elseif (\is_int($node) || \is_float($node)) { + $this->res .= $node; + } elseif (null === $node) { + $this->res .= 'null'; + } elseif (false === $node) { + $this->res .= 'false'; + } elseif (true === $node) { + $this->res .= 'true'; } else { throw new \InvalidArgumentException('Can only dump nodes and arrays.'); } - - return $r . "\n)"; + if ($indent) { + $this->nl = \substr($this->nl, 0, -4); + } } - protected function dumpFlags($flags) { + protected function dumpFlags(int $flags): string { $strs = []; - if ($flags & Class_::MODIFIER_PUBLIC) { - $strs[] = 'MODIFIER_PUBLIC'; + if ($flags & Modifiers::PUBLIC) { + $strs[] = 'PUBLIC'; } - if ($flags & Class_::MODIFIER_PROTECTED) { - $strs[] = 'MODIFIER_PROTECTED'; + if ($flags & Modifiers::PROTECTED) { + $strs[] = 'PROTECTED'; } - if ($flags & Class_::MODIFIER_PRIVATE) { - $strs[] = 'MODIFIER_PRIVATE'; + if ($flags & Modifiers::PRIVATE) { + $strs[] = 'PRIVATE'; } - if ($flags & Class_::MODIFIER_ABSTRACT) { - $strs[] = 'MODIFIER_ABSTRACT'; + if ($flags & Modifiers::ABSTRACT) { + $strs[] = 'ABSTRACT'; } - if ($flags & Class_::MODIFIER_STATIC) { - $strs[] = 'MODIFIER_STATIC'; + if ($flags & Modifiers::STATIC) { + $strs[] = 'STATIC'; } - if ($flags & Class_::MODIFIER_FINAL) { - $strs[] = 'MODIFIER_FINAL'; + if ($flags & Modifiers::FINAL) { + $strs[] = 'FINAL'; } - if ($flags & Class_::MODIFIER_READONLY) { - $strs[] = 'MODIFIER_READONLY'; + if ($flags & Modifiers::READONLY) { + $strs[] = 'READONLY'; } if ($strs) { return implode(' | ', $strs) . ' (' . $flags . ')'; } else { - return $flags; + return (string) $flags; } } - protected function dumpIncludeType($type) { - $map = [ + /** @param array<int, string> $map */ + private function dumpEnum(int $value, array $map): string { + if (!isset($map[$value])) { + return (string) $value; + } + return $map[$value] . ' (' . $value . ')'; + } + + private function dumpIncludeType(int $type): string { + return $this->dumpEnum($type, [ Include_::TYPE_INCLUDE => 'TYPE_INCLUDE', Include_::TYPE_INCLUDE_ONCE => 'TYPE_INCLUDE_ONCE', Include_::TYPE_REQUIRE => 'TYPE_REQUIRE', Include_::TYPE_REQUIRE_ONCE => 'TYPE_REQUIRE_ONCE', - ]; - - if (!isset($map[$type])) { - return $type; - } - return $map[$type] . ' (' . $type . ')'; + ]); } - protected function dumpUseType($type) { - $map = [ + private function dumpUseType(int $type): string { + return $this->dumpEnum($type, [ Use_::TYPE_UNKNOWN => 'TYPE_UNKNOWN', Use_::TYPE_NORMAL => 'TYPE_NORMAL', Use_::TYPE_FUNCTION => 'TYPE_FUNCTION', Use_::TYPE_CONSTANT => 'TYPE_CONSTANT', - ]; + ]); + } - if (!isset($map[$type])) { - return $type; - } - return $map[$type] . ' (' . $type . ')'; + private function dumpIntKind(int $kind): string { + return $this->dumpEnum($kind, [ + Int_::KIND_BIN => 'KIND_BIN', + Int_::KIND_OCT => 'KIND_OCT', + Int_::KIND_DEC => 'KIND_DEC', + Int_::KIND_HEX => 'KIND_HEX', + ]); + } + + private function dumpStringKind(int $kind): string { + return $this->dumpEnum($kind, [ + String_::KIND_SINGLE_QUOTED => 'KIND_SINGLE_QUOTED', + String_::KIND_DOUBLE_QUOTED => 'KIND_DOUBLE_QUOTED', + String_::KIND_HEREDOC => 'KIND_HEREDOC', + String_::KIND_NOWDOC => 'KIND_NOWDOC', + ]); + } + + private function dumpArrayKind(int $kind): string { + return $this->dumpEnum($kind, [ + Array_::KIND_LONG => 'KIND_LONG', + Array_::KIND_SHORT => 'KIND_SHORT', + ]); + } + + private function dumpListKind(int $kind): string { + return $this->dumpEnum($kind, [ + List_::KIND_LIST => 'KIND_LIST', + List_::KIND_ARRAY => 'KIND_ARRAY', + ]); } /** @@ -174,7 +258,7 @@ class NodeDumper * * @return string|null Dump of position, or null if position information not available */ - protected function dumpPosition(Node $node) { + protected function dumpPosition(Node $node): ?string { if (!$node->hasAttribute('startLine') || !$node->hasAttribute('endLine')) { return null; } @@ -191,7 +275,7 @@ class NodeDumper } // Copied from Error class - private function toColumn($code, $pos) { + private function toColumn(string $code, int $pos): int { if ($pos > strlen($code)) { throw new \RuntimeException('Invalid position information'); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php index 2e7cfdad..96c84526 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php @@ -5,25 +5,27 @@ namespace PhpParser; use PhpParser\NodeVisitor\FindingVisitor; use PhpParser\NodeVisitor\FirstFindingVisitor; -class NodeFinder -{ +class NodeFinder { /** * Find all nodes satisfying a filter callback. * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param callable $filter Filter callback: function(Node $node) : bool * * @return Node[] Found nodes satisfying the filter callback */ - public function find($nodes, callable $filter) : array { + public function find($nodes, callable $filter): array { + if ($nodes === []) { + return []; + } + if (!is_array($nodes)) { $nodes = [$nodes]; } $visitor = new FindingVisitor($filter); - $traverser = new NodeTraverser; - $traverser->addVisitor($visitor); + $traverser = new NodeTraverser($visitor); $traverser->traverse($nodes); return $visitor->getFoundNodes(); @@ -31,13 +33,15 @@ class NodeFinder /** * Find all nodes that are instances of a certain class. + + * @template TNode as Node * * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param string $class Class name + * @param class-string<TNode> $class Class name * - * @return Node[] Found nodes (all instances of $class) + * @return TNode[] Found nodes (all instances of $class) */ - public function findInstanceOf($nodes, string $class) : array { + public function findInstanceOf($nodes, string $class): array { return $this->find($nodes, function ($node) use ($class) { return $node instanceof $class; }); @@ -46,20 +50,23 @@ class NodeFinder /** * Find first node satisfying a filter callback. * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param callable $filter Filter callback: function(Node $node) : bool + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param callable $filter Filter callback: function(Node $node) : bool * * @return null|Node Found node (or null if none found) */ - public function findFirst($nodes, callable $filter) { + public function findFirst($nodes, callable $filter): ?Node { + if ($nodes === []) { + return null; + } + if (!is_array($nodes)) { $nodes = [$nodes]; } $visitor = new FirstFindingVisitor($filter); - $traverser = new NodeTraverser; - $traverser->addVisitor($visitor); + $traverser = new NodeTraverser($visitor); $traverser->traverse($nodes); return $visitor->getFoundNode(); @@ -68,12 +75,14 @@ class NodeFinder /** * Find first node that is an instance of a certain class. * - * @param Node|Node[] $nodes Single node or array of nodes to search in - * @param string $class Class name + * @template TNode as Node * - * @return null|Node Found node, which is an instance of $class (or null if none found) + * @param Node|Node[] $nodes Single node or array of nodes to search in + * @param class-string<TNode> $class Class name + * + * @return null|TNode Found node, which is an instance of $class (or null if none found) */ - public function findFirstInstanceOf($nodes, string $class) { + public function findFirstInstanceOf($nodes, string $class): ?Node { return $this->findFirst($nodes, function ($node) use ($class) { return $node instanceof $class; }); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php index 97d45bda..f5b868a1 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php @@ -2,51 +2,40 @@ namespace PhpParser; -class NodeTraverser implements NodeTraverserInterface -{ +class NodeTraverser implements NodeTraverserInterface { /** - * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes - * of the current node will not be traversed for any visitors. - * - * For subsequent visitors enterNode() will still be called on the current - * node and leaveNode() will also be invoked for the current node. + * @deprecated Use NodeVisitor::DONT_TRAVERSE_CHILDREN instead. */ - const DONT_TRAVERSE_CHILDREN = 1; + public const DONT_TRAVERSE_CHILDREN = NodeVisitor::DONT_TRAVERSE_CHILDREN; /** - * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns - * STOP_TRAVERSAL, traversal is aborted. - * - * The afterTraverse() method will still be invoked. + * @deprecated Use NodeVisitor::STOP_TRAVERSAL instead. */ - const STOP_TRAVERSAL = 2; + public const STOP_TRAVERSAL = NodeVisitor::STOP_TRAVERSAL; /** - * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs - * in an array, it will be removed from the array. - * - * For subsequent visitors leaveNode() will still be invoked for the - * removed node. + * @deprecated Use NodeVisitor::REMOVE_NODE instead. */ - const REMOVE_NODE = 3; + public const REMOVE_NODE = NodeVisitor::REMOVE_NODE; /** - * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes - * of the current node will not be traversed for any visitors. - * - * For subsequent visitors enterNode() will not be called as well. - * leaveNode() will be invoked for visitors that has enterNode() method invoked. + * @deprecated Use NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN instead. */ - const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; + public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN; - /** @var NodeVisitor[] Visitors */ - protected $visitors = []; + /** @var list<NodeVisitor> Visitors */ + protected array $visitors = []; /** @var bool Whether traversal should be stopped */ - protected $stopTraversal; + protected bool $stopTraversal; - public function __construct() { - // for BC + /** + * Create a traverser with the given visitors. + * + * @param NodeVisitor ...$visitors Node visitors + */ + public function __construct(NodeVisitor ...$visitors) { + $this->visitors = $visitors; } /** @@ -54,21 +43,17 @@ class NodeTraverser implements NodeTraverserInterface * * @param NodeVisitor $visitor Visitor to add */ - public function addVisitor(NodeVisitor $visitor) { + public function addVisitor(NodeVisitor $visitor): void { $this->visitors[] = $visitor; } /** * Removes an added visitor. - * - * @param NodeVisitor $visitor */ - public function removeVisitor(NodeVisitor $visitor) { - foreach ($this->visitors as $index => $storedVisitor) { - if ($storedVisitor === $visitor) { - unset($this->visitors[$index]); - break; - } + public function removeVisitor(NodeVisitor $visitor): void { + $index = array_search($visitor, $this->visitors); + if ($index !== false) { + array_splice($this->visitors, $index, 1, []); } } @@ -79,7 +64,7 @@ class NodeTraverser implements NodeTraverserInterface * * @return Node[] Traversed array of nodes */ - public function traverse(array $nodes) : array { + public function traverse(array $nodes): array { $this->stopTraversal = false; foreach ($this->visitors as $visitor) { @@ -90,7 +75,8 @@ class NodeTraverser implements NodeTraverserInterface $nodes = $this->traverseArray($nodes); - foreach ($this->visitors as $visitor) { + for ($i = \count($this->visitors) - 1; $i >= 0; --$i) { + $visitor = $this->visitors[$i]; if (null !== $return = $visitor->afterTraverse($nodes)) { $nodes = $return; } @@ -103,37 +89,37 @@ class NodeTraverser implements NodeTraverserInterface * Recursively traverse a node. * * @param Node $node Node to traverse. - * - * @return Node Result of traversal (may be original node or new one) */ - protected function traverseNode(Node $node) : Node { + protected function traverseNode(Node $node): void { foreach ($node->getSubNodeNames() as $name) { - $subNode =& $node->$name; + $subNode = $node->$name; if (\is_array($subNode)) { - $subNode = $this->traverseArray($subNode); + $node->$name = $this->traverseArray($subNode); if ($this->stopTraversal) { break; } } elseif ($subNode instanceof Node) { $traverseChildren = true; - $breakVisitorIndex = null; + $visitorIndex = -1; foreach ($this->visitors as $visitorIndex => $visitor) { $return = $visitor->enterNode($subNode); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); - $subNode = $return; - } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { + $subNode = $node->$name = $return; + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { $traverseChildren = false; - } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { $traverseChildren = false; - $breakVisitorIndex = $visitorIndex; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $node->$name = null; + continue 2; } else { throw new \LogicException( 'enterNode() returned invalid value of type ' . gettype($return) @@ -143,22 +129,26 @@ class NodeTraverser implements NodeTraverserInterface } if ($traverseChildren) { - $subNode = $this->traverseNode($subNode); + $this->traverseNode($subNode); if ($this->stopTraversal) { break; } } - foreach ($this->visitors as $visitorIndex => $visitor) { + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; $return = $visitor->leaveNode($subNode); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($subNode, $return); - $subNode = $return; - } elseif (self::STOP_TRAVERSAL === $return) { + $subNode = $node->$name = $return; + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + $node->$name = null; + break; } elseif (\is_array($return)) { throw new \LogicException( 'leaveNode() may only return an array ' . @@ -170,15 +160,9 @@ class NodeTraverser implements NodeTraverserInterface ); } } - - if ($breakVisitorIndex === $visitorIndex) { - break; - } } } } - - return $node; } /** @@ -188,29 +172,37 @@ class NodeTraverser implements NodeTraverserInterface * * @return array Result of traversal (may be original array or changed one) */ - protected function traverseArray(array $nodes) : array { + protected function traverseArray(array $nodes): array { $doNodes = []; - foreach ($nodes as $i => &$node) { + foreach ($nodes as $i => $node) { if ($node instanceof Node) { $traverseChildren = true; - $breakVisitorIndex = null; + $visitorIndex = -1; foreach ($this->visitors as $visitorIndex => $visitor) { $return = $visitor->enterNode($node); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); - $node = $return; - } elseif (self::DONT_TRAVERSE_CHILDREN === $return) { + $nodes[$i] = $node = $return; + } elseif (\is_array($return)) { + $doNodes[] = [$i, $return]; + continue 2; + } elseif (NodeVisitor::REMOVE_NODE === $return) { + $doNodes[] = [$i, []]; + continue 2; + } elseif (NodeVisitor::DONT_TRAVERSE_CHILDREN === $return) { $traverseChildren = false; - } elseif (self::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { + } elseif (NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN === $return) { $traverseChildren = false; - $breakVisitorIndex = $visitorIndex; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { + throw new \LogicException( + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); } else { throw new \LogicException( 'enterNode() returned invalid value of type ' . gettype($return) @@ -220,43 +212,38 @@ class NodeTraverser implements NodeTraverserInterface } if ($traverseChildren) { - $node = $this->traverseNode($node); + $this->traverseNode($node); if ($this->stopTraversal) { break; } } - foreach ($this->visitors as $visitorIndex => $visitor) { + for (; $visitorIndex >= 0; --$visitorIndex) { + $visitor = $this->visitors[$visitorIndex]; $return = $visitor->leaveNode($node); if (null !== $return) { if ($return instanceof Node) { $this->ensureReplacementReasonable($node, $return); - $node = $return; + $nodes[$i] = $node = $return; } elseif (\is_array($return)) { $doNodes[] = [$i, $return]; break; - } elseif (self::REMOVE_NODE === $return) { + } elseif (NodeVisitor::REMOVE_NODE === $return) { $doNodes[] = [$i, []]; break; - } elseif (self::STOP_TRAVERSAL === $return) { + } elseif (NodeVisitor::STOP_TRAVERSAL === $return) { $this->stopTraversal = true; break 2; - } elseif (false === $return) { + } elseif (NodeVisitor::REPLACE_WITH_NULL === $return) { throw new \LogicException( - 'bool(false) return from leaveNode() no longer supported. ' . - 'Return NodeTraverser::REMOVE_NODE instead' - ); + 'REPLACE_WITH_NULL can not be used if the parent structure is an array'); } else { throw new \LogicException( 'leaveNode() returned invalid value of type ' . gettype($return) ); } } - - if ($breakVisitorIndex === $visitorIndex) { - break; - } } } elseif (\is_array($node)) { throw new \LogicException('Invalid node structure: Contains nested arrays'); @@ -272,7 +259,7 @@ class NodeTraverser implements NodeTraverserInterface return $nodes; } - private function ensureReplacementReasonable($old, $new) { + private function ensureReplacementReasonable(Node $old, Node $new): void { if ($old instanceof Node\Stmt && $new instanceof Node\Expr) { throw new \LogicException( "Trying to replace statement ({$old->getType()}) " . diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php index 77ff3d27..c3992b3d 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php @@ -2,21 +2,18 @@ namespace PhpParser; -interface NodeTraverserInterface -{ +interface NodeTraverserInterface { /** * Adds a visitor. * * @param NodeVisitor $visitor Visitor to add */ - public function addVisitor(NodeVisitor $visitor); + public function addVisitor(NodeVisitor $visitor): void; /** * Removes an added visitor. - * - * @param NodeVisitor $visitor */ - public function removeVisitor(NodeVisitor $visitor); + public function removeVisitor(NodeVisitor $visitor): void; /** * Traverses an array of nodes using the registered visitors. @@ -25,5 +22,5 @@ interface NodeTraverserInterface * * @return Node[] Traversed array of nodes */ - public function traverse(array $nodes) : array; + public function traverse(array $nodes): array; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php index f1f7f3e3..0ec4f7be 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php @@ -2,8 +2,49 @@ namespace PhpParser; -interface NodeVisitor -{ +interface NodeVisitor { + /** + * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CHILDREN, child nodes + * of the current node will not be traversed for any visitors. + * + * For subsequent visitors enterNode() will still be called on the current + * node and leaveNode() will also be invoked for the current node. + */ + public const DONT_TRAVERSE_CHILDREN = 1; + + /** + * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns + * STOP_TRAVERSAL, traversal is aborted. + * + * The afterTraverse() method will still be invoked. + */ + public const STOP_TRAVERSAL = 2; + + /** + * If NodeVisitor::leaveNode() returns REMOVE_NODE for a node that occurs + * in an array, it will be removed from the array. + * + * For subsequent visitors leaveNode() will still be invoked for the + * removed node. + */ + public const REMOVE_NODE = 3; + + /** + * If NodeVisitor::enterNode() returns DONT_TRAVERSE_CURRENT_AND_CHILDREN, child nodes + * of the current node will not be traversed for any visitors. + * + * For subsequent visitors enterNode() will not be called as well. + * leaveNode() will be invoked for visitors that has enterNode() method invoked. + */ + public const DONT_TRAVERSE_CURRENT_AND_CHILDREN = 4; + + /** + * If NodeVisitor::enterNode() or NodeVisitor::leaveNode() returns REPLACE_WITH_NULL, + * the node will be replaced with null. This is not a legal return value if the node is part + * of an array, rather than another node. + */ + public const REPLACE_WITH_NULL = 5; + /** * Called once before traversal. * @@ -23,16 +64,25 @@ interface NodeVisitor * Return value semantics: * * null * => $node stays as-is - * * NodeTraverser::DONT_TRAVERSE_CHILDREN + * * array (of Nodes) + * => The return value is merged into the parent array (at the position of the $node) + * * NodeVisitor::REMOVE_NODE + * => $node is removed from the parent array + * * NodeVisitor::REPLACE_WITH_NULL + * => $node is replaced with null + * * NodeVisitor::DONT_TRAVERSE_CHILDREN * => Children of $node are not traversed. $node stays as-is - * * NodeTraverser::STOP_TRAVERSAL + * * NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN + * => Further visitors for the current node are skipped, and its children are not + * traversed. $node stays as-is. + * * NodeVisitor::STOP_TRAVERSAL * => Traversal is aborted. $node stays as-is * * otherwise * => $node is set to the return value * * @param Node $node Node * - * @return null|int|Node Replacement node (or special return value) + * @return null|int|Node|Node[] Replacement node (or special return value) */ public function enterNode(Node $node); @@ -42,9 +92,11 @@ interface NodeVisitor * Return value semantics: * * null * => $node stays as-is - * * NodeTraverser::REMOVE_NODE + * * NodeVisitor::REMOVE_NODE * => $node is removed from the parent array - * * NodeTraverser::STOP_TRAVERSAL + * * NodeVisitor::REPLACE_WITH_NULL + * => $node is replaced with null + * * NodeVisitor::STOP_TRAVERSAL * => Traversal is aborted. $node stays as-is * * array (of Nodes) * => The return value is merged into the parent array (at the position of the $node) diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php index a85fa493..cba92499 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php @@ -10,8 +10,7 @@ use PhpParser\NodeVisitorAbstract; * * This visitor is required to perform format-preserving pretty prints. */ -class CloningVisitor extends NodeVisitorAbstract -{ +class CloningVisitor extends NodeVisitorAbstract { public function enterNode(Node $origNode) { $node = clone $origNode; $node->setAttribute('origNode', $origNode); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php new file mode 100644 index 00000000..5e2aed31 --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php @@ -0,0 +1,82 @@ +<?php declare(strict_types=1); + +namespace PhpParser\NodeVisitor; + +use PhpParser\Comment; +use PhpParser\Node; +use PhpParser\NodeVisitorAbstract; +use PhpParser\Token; + +class CommentAnnotatingVisitor extends NodeVisitorAbstract { + /** @var int Last seen token start position */ + private int $pos = 0; + /** @var Token[] Token array */ + private array $tokens; + /** @var list<int> Token positions of comments */ + private array $commentPositions = []; + + /** + * Create a comment annotation visitor. + * + * @param Token[] $tokens Token array + */ + public function __construct(array $tokens) { + $this->tokens = $tokens; + + // Collect positions of comments. We use this to avoid traversing parts of the AST where + // there are no comments. + foreach ($tokens as $i => $token) { + if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { + $this->commentPositions[] = $i; + } + } + } + + public function enterNode(Node $node) { + $nextCommentPos = current($this->commentPositions); + if ($nextCommentPos === false) { + // No more comments. + return self::STOP_TRAVERSAL; + } + + $oldPos = $this->pos; + $this->pos = $pos = $node->getStartTokenPos(); + if ($nextCommentPos > $oldPos && $nextCommentPos < $pos) { + $comments = []; + while (--$pos >= $oldPos) { + $token = $this->tokens[$pos]; + if ($token->id === \T_DOC_COMMENT) { + $comments[] = new Comment\Doc( + $token->text, $token->line, $token->pos, $pos, + $token->getEndLine(), $token->getEndPos() - 1, $pos); + continue; + } + if ($token->id === \T_COMMENT) { + $comments[] = new Comment( + $token->text, $token->line, $token->pos, $pos, + $token->getEndLine(), $token->getEndPos() - 1, $pos); + continue; + } + if ($token->id !== \T_WHITESPACE) { + break; + } + } + if (!empty($comments)) { + $node->setAttribute('comments', array_reverse($comments)); + } + + do { + $nextCommentPos = next($this->commentPositions); + } while ($nextCommentPos !== false && $nextCommentPos < $this->pos); + } + + $endPos = $node->getEndTokenPos(); + if ($nextCommentPos > $endPos) { + // Skip children if there are no comments located inside this node. + $this->pos = $endPos; + return self::DONT_TRAVERSE_CHILDREN; + } + + return null; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php index 9531edbc..1f3f4bae 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -9,12 +9,11 @@ use PhpParser\NodeVisitorAbstract; * This visitor can be used to find and collect all nodes satisfying some criterion determined by * a filter callback. */ -class FindingVisitor extends NodeVisitorAbstract -{ +class FindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; /** @var Node[] Found nodes */ - protected $foundNodes; + protected array $foundNodes; public function __construct(callable $filterCallback) { $this->filterCallback = $filterCallback; @@ -27,11 +26,11 @@ class FindingVisitor extends NodeVisitorAbstract * * @return Node[] Found nodes */ - public function getFoundNodes() : array { + public function getFoundNodes(): array { return $this->foundNodes; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->foundNodes = []; return null; diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 596a7d7f..05deed59 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -3,19 +3,18 @@ namespace PhpParser\NodeVisitor; use PhpParser\Node; -use PhpParser\NodeTraverser; +use PhpParser\NodeVisitor; use PhpParser\NodeVisitorAbstract; /** * This visitor can be used to find the first node satisfying some criterion determined by * a filter callback. */ -class FirstFindingVisitor extends NodeVisitorAbstract -{ +class FirstFindingVisitor extends NodeVisitorAbstract { /** @var callable Filter callback */ protected $filterCallback; /** @var null|Node Found node */ - protected $foundNode; + protected ?Node $foundNode; public function __construct(callable $filterCallback) { $this->filterCallback = $filterCallback; @@ -28,11 +27,11 @@ class FirstFindingVisitor extends NodeVisitorAbstract * * @return null|Node Found node (or null if not found) */ - public function getFoundNode() { + public function getFoundNode(): ?Node { return $this->foundNode; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->foundNode = null; return null; @@ -42,7 +41,7 @@ class FirstFindingVisitor extends NodeVisitorAbstract $filterCallback = $this->filterCallback; if ($filterCallback($node)) { $this->foundNode = $node; - return NodeTraverser::STOP_TRAVERSAL; + return NodeVisitor::STOP_TRAVERSAL; } return null; diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php index 83f3ea83..ccd014eb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -11,16 +11,15 @@ use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt; use PhpParser\NodeVisitorAbstract; -class NameResolver extends NodeVisitorAbstract -{ +class NameResolver extends NodeVisitorAbstract { /** @var NameContext Naming context */ - protected $nameContext; + protected NameContext $nameContext; /** @var bool Whether to preserve original names */ - protected $preserveOriginalNames; + protected bool $preserveOriginalNames; /** @var bool Whether to replace resolved nodes in place, or to add resolvedNode attributes */ - protected $replaceNodes; + protected bool $replaceNodes; /** * Constructs a name resolution visitor. @@ -33,24 +32,22 @@ class NameResolver extends NodeVisitorAbstract * namespacedName attribute, as usual.) * * @param ErrorHandler|null $errorHandler Error handler - * @param array $options Options + * @param array{preserveOriginalNames?: bool, replaceNodes?: bool} $options Options */ - public function __construct(ErrorHandler $errorHandler = null, array $options = []) { - $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing); + public function __construct(?ErrorHandler $errorHandler = null, array $options = []) { + $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing()); $this->preserveOriginalNames = $options['preserveOriginalNames'] ?? false; $this->replaceNodes = $options['replaceNodes'] ?? true; } /** * Get name resolution context. - * - * @return NameContext */ - public function getNameContext() : NameContext { + public function getNameContext(): NameContext { return $this->nameContext; } - public function beforeTraverse(array $nodes) { + public function beforeTraverse(array $nodes): ?array { $this->nameContext->startNamespace(); return null; } @@ -78,6 +75,8 @@ class NameResolver extends NodeVisitorAbstract $this->resolveAttrGroups($node); if (null !== $node->name) { $this->addNamespacedName($node); + } else { + $node->namespacedName = null; } } elseif ($node instanceof Stmt\Interface_) { foreach ($node->extends as &$interface) { @@ -86,15 +85,13 @@ class NameResolver extends NodeVisitorAbstract $this->resolveAttrGroups($node); $this->addNamespacedName($node); - } elseif ($node instanceof Stmt\Enum_) { + } elseif ($node instanceof Stmt\Enum_) { foreach ($node->implements as &$interface) { $interface = $this->resolveClassName($interface); } $this->resolveAttrGroups($node); - if (null !== $node->name) { - $this->addNamespacedName($node); - } + $this->addNamespacedName($node); } elseif ($node instanceof Stmt\Trait_) { $this->resolveAttrGroups($node); $this->addNamespacedName($node); @@ -117,12 +114,12 @@ class NameResolver extends NodeVisitorAbstract foreach ($node->consts as $const) { $this->addNamespacedName($const); } - } else if ($node instanceof Stmt\ClassConst) { + } elseif ($node instanceof Stmt\ClassConst) { if (null !== $node->type) { $node->type = $this->resolveType($node->type); } $this->resolveAttrGroups($node); - } else if ($node instanceof Stmt\EnumCase) { + } elseif ($node instanceof Stmt\EnumCase) { $this->resolveAttrGroups($node); } elseif ($node instanceof Expr\StaticCall || $node instanceof Expr\StaticPropertyFetch @@ -164,7 +161,8 @@ class NameResolver extends NodeVisitorAbstract return null; } - private function addAlias(Stmt\UseUse $use, int $type, Name $prefix = null) { + /** @param Stmt\Use_::TYPE_* $type */ + private function addAlias(Node\UseItem $use, int $type, ?Name $prefix = null): void { // Add prefix for group uses $name = $prefix ? Name::concat($prefix, $use->name) : $use->name; // Type is determined either by individual element or whole use declaration @@ -175,8 +173,8 @@ class NameResolver extends NodeVisitorAbstract ); } - /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure $node */ - private function resolveSignature($node) { + /** @param Stmt\Function_|Stmt\ClassMethod|Expr\Closure|Expr\ArrowFunction $node */ + private function resolveSignature($node): void { foreach ($node->params as $param) { $param->type = $this->resolveType($param->type); $this->resolveAttrGroups($param); @@ -184,7 +182,12 @@ class NameResolver extends NodeVisitorAbstract $node->returnType = $this->resolveType($node->returnType); } - private function resolveType($node) { + /** + * @template T of Node\Identifier|Name|Node\ComplexType|null + * @param T $node + * @return T + */ + private function resolveType(?Node $node): ?Node { if ($node instanceof Name) { return $this->resolveClassName($node); } @@ -205,11 +208,11 @@ class NameResolver extends NodeVisitorAbstract * Resolve name, according to name resolver options. * * @param Name $name Function or constant name to resolve - * @param int $type One of Stmt\Use_::TYPE_* + * @param Stmt\Use_::TYPE_* $type One of Stmt\Use_::TYPE_* * * @return Name Resolved name, or original name with attribute */ - protected function resolveName(Name $name, int $type) : Name { + protected function resolveName(Name $name, int $type): Name { if (!$this->replaceNodes) { $resolvedName = $this->nameContext->getResolvedName($name, $type); if (null !== $resolvedName) { @@ -240,17 +243,16 @@ class NameResolver extends NodeVisitorAbstract return $name; } - protected function resolveClassName(Name $name) { + protected function resolveClassName(Name $name): Name { return $this->resolveName($name, Stmt\Use_::TYPE_NORMAL); } - protected function addNamespacedName(Node $node) { + protected function addNamespacedName(Node $node): void { $node->namespacedName = Name::concat( $this->nameContext->getNamespace(), (string) $node->name); } - protected function resolveAttrGroups(Node $node) - { + protected function resolveAttrGroups(Node $node): void { foreach ($node->attrGroups as $attrGroup) { foreach ($attrGroup->attrs as $attr) { $attr->name = $this->resolveClassName($attr->name); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php index ea372e5b..38fedfd5 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -14,12 +14,11 @@ use PhpParser\NodeVisitorAbstract; * node can be accessed through <code>$node->getAttribute('previous')</code>, * and the next node can be accessed through <code>$node->getAttribute('next')</code>. */ -final class NodeConnectingVisitor extends NodeVisitorAbstract -{ +final class NodeConnectingVisitor extends NodeVisitorAbstract { /** * @var Node[] */ - private $stack = []; + private array $stack = []; /** * @var ?Node diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php index b98d2bfa..1e7e9e8b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -2,31 +2,29 @@ namespace PhpParser\NodeVisitor; -use function array_pop; -use function count; use PhpParser\Node; use PhpParser\NodeVisitorAbstract; +use function array_pop; +use function count; + /** * Visitor that connects a child node to its parent node. * * On the child node, the parent node can be accessed through * <code>$node->getAttribute('parent')</code>. */ -final class ParentConnectingVisitor extends NodeVisitorAbstract -{ +final class ParentConnectingVisitor extends NodeVisitorAbstract { /** * @var Node[] */ - private $stack = []; + private array $stack = []; - public function beforeTraverse(array $nodes) - { + public function beforeTraverse(array $nodes) { $this->stack = []; } - public function enterNode(Node $node) - { + public function enterNode(Node $node) { if (!empty($this->stack)) { $node->setAttribute('parent', $this->stack[count($this->stack) - 1]); } @@ -34,8 +32,7 @@ final class ParentConnectingVisitor extends NodeVisitorAbstract $this->stack[] = $node; } - public function leaveNode(Node $node) - { + public function leaveNode(Node $node) { array_pop($this->stack); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php index d378d670..6fb15cca 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php @@ -5,8 +5,7 @@ namespace PhpParser; /** * @codeCoverageIgnore */ -class NodeVisitorAbstract implements NodeVisitor -{ +abstract class NodeVisitorAbstract implements NodeVisitor { public function beforeTraverse(array $nodes) { return null; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser.php b/vendor/nikic/php-parser/lib/PhpParser/Parser.php index 8956c767..68954afe 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser.php @@ -2,8 +2,7 @@ namespace PhpParser; -interface Parser -{ +interface Parser { /** * Parses PHP code into a node tree. * @@ -14,5 +13,12 @@ interface Parser * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ErrorHandler $errorHandler = null); + public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array; + + /** + * Return tokens for the last parse. + * + * @return Token[] + */ + public function getTokens(): array; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php deleted file mode 100644 index 77fd1f3f..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php declare(strict_types=1); - -namespace PhpParser\Parser; - -use PhpParser\Error; -use PhpParser\ErrorHandler; -use PhpParser\Parser; - -class Multiple implements Parser -{ - /** @var Parser[] List of parsers to try, in order of preference */ - private $parsers; - - /** - * Create a parser which will try multiple parsers in an order of preference. - * - * Parsers will be invoked in the order they're provided to the constructor. If one of the - * parsers runs without throwing, it's output is returned. Otherwise the exception that the - * first parser generated is thrown. - * - * @param Parser[] $parsers - */ - public function __construct(array $parsers) { - $this->parsers = $parsers; - } - - public function parse(string $code, ErrorHandler $errorHandler = null) { - if (null === $errorHandler) { - $errorHandler = new ErrorHandler\Throwing; - } - - list($firstStmts, $firstError) = $this->tryParse($this->parsers[0], $errorHandler, $code); - if ($firstError === null) { - return $firstStmts; - } - - for ($i = 1, $c = count($this->parsers); $i < $c; ++$i) { - list($stmts, $error) = $this->tryParse($this->parsers[$i], $errorHandler, $code); - if ($error === null) { - return $stmts; - } - } - - throw $firstError; - } - - private function tryParse(Parser $parser, ErrorHandler $errorHandler, $code) { - $stmts = null; - $error = null; - try { - $stmts = $parser->parse($code, $errorHandler); - } catch (Error $error) {} - return [$stmts, $error]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php deleted file mode 100644 index 59bd1e8c..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +++ /dev/null @@ -1,2682 +0,0 @@ -<?php - -namespace PhpParser\Parser; - -use PhpParser\Error; -use PhpParser\Node; -use PhpParser\Node\Expr; -use PhpParser\Node\Name; -use PhpParser\Node\Scalar; -use PhpParser\Node\Stmt; - -/* This is an automatically GENERATED file, which should not be manually edited. - * Instead edit one of the following: - * * the grammar files grammar/php5.y or grammar/php7.y - * * the skeleton file grammar/parser.template - * * the preprocessing script grammar/rebuildParsers.php - */ -class Php5 extends \PhpParser\ParserAbstract -{ - protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1099; - protected $gotoTableSize = 640; - - protected $invalidSymbol = 168; - protected $errorSymbol = 1; - protected $defaultAction = -32766; - protected $unexpectedTokenRule = 32767; - - protected $YY2TBLSTATE = 415; - protected $numNonLeafStates = 663; - - protected $symbolToName = array( - "EOF", - "error", - "T_THROW", - "T_INCLUDE", - "T_INCLUDE_ONCE", - "T_EVAL", - "T_REQUIRE", - "T_REQUIRE_ONCE", - "','", - "T_LOGICAL_OR", - "T_LOGICAL_XOR", - "T_LOGICAL_AND", - "T_PRINT", - "T_YIELD", - "T_DOUBLE_ARROW", - "T_YIELD_FROM", - "'='", - "T_PLUS_EQUAL", - "T_MINUS_EQUAL", - "T_MUL_EQUAL", - "T_DIV_EQUAL", - "T_CONCAT_EQUAL", - "T_MOD_EQUAL", - "T_AND_EQUAL", - "T_OR_EQUAL", - "T_XOR_EQUAL", - "T_SL_EQUAL", - "T_SR_EQUAL", - "T_POW_EQUAL", - "T_COALESCE_EQUAL", - "'?'", - "':'", - "T_COALESCE", - "T_BOOLEAN_OR", - "T_BOOLEAN_AND", - "'|'", - "'^'", - "T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", - "T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", - "T_IS_EQUAL", - "T_IS_NOT_EQUAL", - "T_IS_IDENTICAL", - "T_IS_NOT_IDENTICAL", - "T_SPACESHIP", - "'<'", - "T_IS_SMALLER_OR_EQUAL", - "'>'", - "T_IS_GREATER_OR_EQUAL", - "T_SL", - "T_SR", - "'+'", - "'-'", - "'.'", - "'*'", - "'/'", - "'%'", - "'!'", - "T_INSTANCEOF", - "'~'", - "T_INC", - "T_DEC", - "T_INT_CAST", - "T_DOUBLE_CAST", - "T_STRING_CAST", - "T_ARRAY_CAST", - "T_OBJECT_CAST", - "T_BOOL_CAST", - "T_UNSET_CAST", - "'@'", - "T_POW", - "'['", - "T_NEW", - "T_CLONE", - "T_EXIT", - "T_IF", - "T_ELSEIF", - "T_ELSE", - "T_ENDIF", - "T_LNUMBER", - "T_DNUMBER", - "T_STRING", - "T_STRING_VARNAME", - "T_VARIABLE", - "T_NUM_STRING", - "T_INLINE_HTML", - "T_ENCAPSED_AND_WHITESPACE", - "T_CONSTANT_ENCAPSED_STRING", - "T_ECHO", - "T_DO", - "T_WHILE", - "T_ENDWHILE", - "T_FOR", - "T_ENDFOR", - "T_FOREACH", - "T_ENDFOREACH", - "T_DECLARE", - "T_ENDDECLARE", - "T_AS", - "T_SWITCH", - "T_MATCH", - "T_ENDSWITCH", - "T_CASE", - "T_DEFAULT", - "T_BREAK", - "T_CONTINUE", - "T_GOTO", - "T_FUNCTION", - "T_FN", - "T_CONST", - "T_RETURN", - "T_TRY", - "T_CATCH", - "T_FINALLY", - "T_USE", - "T_INSTEADOF", - "T_GLOBAL", - "T_STATIC", - "T_ABSTRACT", - "T_FINAL", - "T_PRIVATE", - "T_PROTECTED", - "T_PUBLIC", - "T_READONLY", - "T_VAR", - "T_UNSET", - "T_ISSET", - "T_EMPTY", - "T_HALT_COMPILER", - "T_CLASS", - "T_TRAIT", - "T_INTERFACE", - "T_EXTENDS", - "T_IMPLEMENTS", - "T_OBJECT_OPERATOR", - "T_LIST", - "T_ARRAY", - "T_CALLABLE", - "T_CLASS_C", - "T_TRAIT_C", - "T_METHOD_C", - "T_FUNC_C", - "T_LINE", - "T_FILE", - "T_START_HEREDOC", - "T_END_HEREDOC", - "T_DOLLAR_OPEN_CURLY_BRACES", - "T_CURLY_OPEN", - "T_PAAMAYIM_NEKUDOTAYIM", - "T_NAMESPACE", - "T_NS_C", - "T_DIR", - "T_NS_SEPARATOR", - "T_ELLIPSIS", - "T_NAME_FULLY_QUALIFIED", - "T_NAME_QUALIFIED", - "T_NAME_RELATIVE", - "';'", - "'{'", - "'}'", - "'('", - "')'", - "'$'", - "'`'", - "']'", - "'\"'", - "T_ENUM", - "T_NULLSAFE_OBJECT_OPERATOR", - "T_ATTRIBUTE" - ); - - protected $tokenToSymbol = array( - 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 56, 164, 168, 161, 55, 168, 168, - 159, 160, 53, 50, 8, 51, 52, 54, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 31, 156, - 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 70, 168, 163, 36, 168, 162, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 157, 35, 158, 58, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, - 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, - 41, 42, 43, 45, 47, 48, 49, 57, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 165, 131, - 132, 133, 166, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 167 - ); - - protected $action = array( - 700, 670, 671, 672, 673, 674, 286, 675, 676, 677, - 713, 714, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 0, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, 245, 246, - 242, 243, 244,-32766,-32766, 678,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32766, 1229, 245, 246, 1230, 679, - 680, 681, 682, 683, 684, 685, 899, 900, 747,-32766, - -32766,-32766,-32766,-32766,-32766, 686, 687, 688, 689, 690, - 691, 692, 693, 694, 695, 696, 716, 739, 717, 718, - 719, 720, 708, 709, 710, 738, 711, 712, 697, 698, - 699, 701, 702, 703, 741, 742, 743, 744, 745, 746, - 875, 704, 705, 706, 707, 737, 728, 726, 727, 723, - 724, 1046, 715, 721, 722, 729, 730, 732, 731, 733, - 734, 55, 56, 425, 57, 58, 725, 736, 735, 755, - 59, 60, -226, 61,-32766,-32766,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766, 337,-32767,-32767,-32767,-32767, 29, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 620,-32766,-32766,-32766,-32766, 62, 63, - 1046,-32766,-32766,-32766, 64, 419, 65, 294, 295, 66, - 67, 68, 69, 70, 71, 72, 73, 823, 25, 302, - 74, 418, 984, 986, 669, 668, 1100, 1101, 1078, 755, - 755, 767, 1220, 768, 470,-32766,-32766,-32766, 341, 749, - 824, 54,-32767,-32767,-32767,-32767, 98, 99, 100, 101, - 102, 220, 221, 222, 362, 876,-32766, 27,-32766,-32766, - -32766,-32766,-32766, 1046, 493, 126, 1080, 1079, 1081, 370, - 1068, 930, 207, 478, 479, 952, 953, 954, 951, 950, - 949, 128, 480, 481, 803, 1106, 1107, 1108, 1109, 1103, - 1104, 319, 32, 297, 10, 211, -515, 1110, 1105, 669, - 668, 1080, 1079, 1081, 220, 221, 222, 41, 364, 341, - 334, 421, 336, 426, -128, -128, -128, 313, 1046, 469, - -4, 824, 54, 812, 770, 207, 40, 21, 427, -128, - 471, -128, 472, -128, 473, -128, 1046, 428, 220, 221, - 222,-32766, 33, 34, 429, 361, 327, 52, 35, 474, - -32766,-32766,-32766, 342, 357, 358, 475, 476, 48, 207, - 249, 669, 668, 477, 443, 300, 795, 846, 430, 431, - 28,-32766, 814,-32766,-32766,-32766,-32766,-32766,-32766,-32766, - -32767,-32767,-32767,-32767,-32767, 952, 953, 954, 951, 950, - 949, 422, 755, 424, 426, 826, 634, -128,-32766,-32766, - 469, 824, 54, 288, 812, 1151, 755, 40, 21, 427, - 317, 471, 345, 472, 129, 473, 9, 1186, 428, 769, - 360, 324, 905, 33, 34, 429, 361, 1046, 415, 35, - 474, 944, 1068, 315, 125, 357, 358, 475, 476,-32766, - -32766,-32766, 926, 302, 477, 121, 1068, 759, 846, 430, - 431, 669, 668, 423, 755, 1152, 809, 1046, 480, 766, - -32766, 805,-32766,-32766,-32766,-32766, -261, 127, 347, 436, - 841, 341, 1078, 1200, 426, 446, 826, 634, -4, 807, - 469, 824, 54, 436, 812, 341, 755, 40, 21, 427, - 444, 471, 130, 472, 1068, 473, 346, 767, 428, 768, - -211, -211, -211, 33, 34, 429, 361, 308, 1076, 35, - 474,-32766,-32766,-32766, 1046, 357, 358, 475, 476,-32766, - -32766,-32766, 906, 120, 477, 539, 1068, 795, 846, 430, - 431, 436,-32766, 341,-32766,-32766,-32766, 1046, 480, 810, - -32766, 925,-32766,-32766, 754, 1080, 1079, 1081, 49,-32766, - -32766,-32766, 749, 751, 426, 1201, 826, 634, -211, 30, - 469, 669, 668, 436, 812, 341, 75, 40, 21, 427, - -32766, 471, 1064, 472, 124, 473, 669, 668, 428, 212, - -210, -210, -210, 33, 34, 429, 361, 51, 1186, 35, - 474, 755,-32766,-32766,-32766, 357, 358, 475, 476, 213, - 824, 54, 221, 222, 477, 20, 581, 795, 846, 430, - 431, 220, 221, 222, 755, 222, 247, 78, 79, 80, - 81, 341, 207, 517, 103, 104, 105, 752, 307, 131, - 637, 1068, 207, 341, 207, 122, 826, 634, -210, 36, - 106, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 1112, 307, 346, 436, 214, - 341, 824, 54, 426, 123, 250, 129, 134, 106, 469, - -32766, 572, 1112, 812, 245, 246, 40, 21, 427, 251, - 471, 252, 472, 341, 473, 453, 22, 428, 207, 899, - 900, 638, 33, 34, 429, 824, 54, -86, 35, 474, - 220, 221, 222, 314, 357, 358, 100, 101, 102, 239, - 240, 241, 645, 477, -230, 458, 589, 135, 374, 596, - 597, 207, 760, 640, 648, 642, 941, 654, 929, 662, - 822, 133, 307, 837, 426,-32766, 106, 749, 43, 44, - 469, 45, 442, 46, 812, 826, 634, 40, 21, 427, - 47, 471, 50, 472, 53, 473, 132, 608, 428, 302, - 604, -280,-32766, 33, 34, 429, 824, 54, 426, 35, - 474, 755, 957, -84, 469, 357, 358, 521, 812, 628, - 363, 40, 21, 427, 477, 471, 575, 472, -515, 473, - 847, 616, 428, -423,-32766, 11, 646, 33, 34, 429, - 824, 54, 445, 35, 474, 462, 285, 578, 1111, 357, - 358, 593, 369, 848, 594, 290, 826, 634, 477, 0, - 0, 532, 0, 0, 325, 0, 0, 0, 0, 0, - 651, 0, 0, 0, 322, 326, 0, 0, 0, 426, - 0, 0, 0, 0, 323, 469, 316, 318, -516, 812, - 862, 634, 40, 21, 427, 0, 471, 0, 472, 0, - 473, 1158, 0, 428, 0, -414, 6, 7, 33, 34, - 429, 824, 54, 426, 35, 474, 12, 14, 373, 469, - 357, 358, -424, 812, 563, 754, 40, 21, 427, 477, - 471, 248, 472, 839, 473, 38, 39, 428, 657, 658, - 765, 813, 33, 34, 429, 821, 800, 815, 35, 474, - 215, 216, 878, 869, 357, 358, 217, 870, 218, 798, - 863, 826, 634, 477, 860, 858, 936, 937, 934, 820, - 209, 804, 806, 808, 811, 933, 763, 764, 1100, 1101, - 935, 659, 78, 335, 426, 359, 1102, 635, 639, 641, - 469, 643, 644, 647, 812, 826, 634, 40, 21, 427, - 649, 471, 650, 472, 652, 473, 653, 636, 428, 796, - 1226, 1228, 762, 33, 34, 429, 215, 216, 845, 35, - 474, 761, 217, 844, 218, 357, 358, 1227, 843, 1060, - 831, 1048, 842, 1049, 477, 559, 209, 1106, 1107, 1108, - 1109, 1103, 1104, 398, 1100, 1101, 829, 942, 867, 1110, - 1105, 868, 1102, 457, 1225, 1194, 1192, 1177, 1157, 219, - 1190, 1091, 917, 1198, 1188, 0, 826, 634, 24, -433, - 26, 31, 37, 42, 76, 77, 210, 287, 292, 293, - 308, 309, 310, 311, 339, 356, 416, 0, -227, -226, - 16, 17, 18, 393, 454, 461, 463, 467, 553, 625, - 1051, 559, 1054, 1106, 1107, 1108, 1109, 1103, 1104, 398, - 907, 1116, 1050, 1026, 564, 1110, 1105, 1025, 1093, 1055, - 0, 1044, 0, 1057, 1056, 219, 1059, 1058, 1075, 0, - 1191, 1176, 1172, 1189, 1090, 1223, 1117, 1171, 600 - ); - - protected $actionCheck = array( - 2, 3, 4, 5, 6, 7, 14, 9, 10, 11, - 12, 13, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 0, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 9, 10, 11, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 69, 70, - 53, 54, 55, 9, 10, 57, 30, 116, 32, 33, - 34, 35, 36, 37, 38, 80, 69, 70, 83, 71, - 72, 73, 74, 75, 76, 77, 135, 136, 80, 33, - 34, 35, 36, 37, 38, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 31, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 13, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 3, 4, 5, 6, 7, 148, 149, 150, 82, - 12, 13, 160, 15, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 8, 44, 45, 46, 47, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 80, 33, 34, 35, 36, 50, 51, - 13, 9, 10, 11, 56, 128, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 1, 70, 71, - 72, 73, 59, 60, 37, 38, 78, 79, 80, 82, - 82, 106, 85, 108, 86, 9, 10, 11, 161, 80, - 1, 2, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 9, 10, 11, 106, 156, 30, 8, 32, 33, - 34, 35, 36, 13, 116, 8, 153, 154, 155, 8, - 122, 158, 30, 125, 126, 116, 117, 118, 119, 120, - 121, 31, 134, 135, 156, 137, 138, 139, 140, 141, - 142, 143, 145, 146, 8, 8, 133, 149, 150, 37, - 38, 153, 154, 155, 9, 10, 11, 159, 8, 161, - 162, 8, 164, 74, 75, 76, 77, 8, 13, 80, - 0, 1, 2, 84, 158, 30, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 13, 98, 9, 10, - 11, 9, 103, 104, 105, 106, 8, 70, 109, 110, - 9, 10, 11, 8, 115, 116, 117, 118, 70, 30, - 31, 37, 38, 124, 31, 8, 127, 128, 129, 130, - 8, 30, 156, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 116, 117, 118, 119, 120, - 121, 8, 82, 8, 74, 156, 157, 158, 33, 34, - 80, 1, 2, 8, 84, 163, 82, 87, 88, 89, - 133, 91, 70, 93, 152, 95, 108, 82, 98, 158, - 8, 113, 160, 103, 104, 105, 106, 13, 108, 109, - 110, 123, 122, 113, 157, 115, 116, 117, 118, 9, - 10, 11, 156, 71, 124, 157, 122, 127, 128, 129, - 130, 37, 38, 8, 82, 160, 156, 13, 134, 156, - 30, 156, 32, 33, 34, 35, 158, 157, 148, 159, - 122, 161, 80, 1, 74, 133, 156, 157, 158, 156, - 80, 1, 2, 159, 84, 161, 82, 87, 88, 89, - 157, 91, 157, 93, 122, 95, 161, 106, 98, 108, - 100, 101, 102, 103, 104, 105, 106, 159, 116, 109, - 110, 9, 10, 11, 13, 115, 116, 117, 118, 9, - 10, 11, 160, 16, 124, 81, 122, 127, 128, 129, - 130, 159, 30, 161, 32, 33, 34, 13, 134, 156, - 30, 156, 32, 33, 153, 153, 154, 155, 70, 9, - 10, 11, 80, 80, 74, 160, 156, 157, 158, 14, - 80, 37, 38, 159, 84, 161, 152, 87, 88, 89, - 30, 91, 160, 93, 14, 95, 37, 38, 98, 16, - 100, 101, 102, 103, 104, 105, 106, 70, 82, 109, - 110, 82, 33, 34, 35, 115, 116, 117, 118, 16, - 1, 2, 10, 11, 124, 160, 85, 127, 128, 129, - 130, 9, 10, 11, 82, 11, 14, 157, 9, 10, - 11, 161, 30, 85, 53, 54, 55, 154, 57, 157, - 31, 122, 30, 161, 30, 157, 156, 157, 158, 30, - 69, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 144, 57, 161, 159, 16, - 161, 1, 2, 74, 157, 16, 152, 157, 69, 80, - 116, 161, 144, 84, 69, 70, 87, 88, 89, 16, - 91, 16, 93, 161, 95, 75, 76, 98, 30, 135, - 136, 31, 103, 104, 105, 1, 2, 31, 109, 110, - 9, 10, 11, 31, 115, 116, 50, 51, 52, 50, - 51, 52, 31, 124, 160, 75, 76, 101, 102, 111, - 112, 30, 156, 157, 31, 31, 156, 157, 156, 157, - 31, 31, 57, 38, 74, 33, 69, 80, 70, 70, - 80, 70, 89, 70, 84, 156, 157, 87, 88, 89, - 70, 91, 70, 93, 70, 95, 70, 96, 98, 71, - 77, 82, 85, 103, 104, 105, 1, 2, 74, 109, - 110, 82, 82, 97, 80, 115, 116, 85, 84, 92, - 106, 87, 88, 89, 124, 91, 90, 93, 133, 95, - 128, 94, 98, 147, 116, 97, 31, 103, 104, 105, - 1, 2, 97, 109, 110, 97, 97, 100, 144, 115, - 116, 100, 106, 128, 113, 161, 156, 157, 124, -1, - -1, 151, -1, -1, 114, -1, -1, -1, -1, -1, - 31, -1, -1, -1, 131, 131, -1, -1, -1, 74, - -1, -1, -1, -1, 132, 80, 133, 133, 133, 84, - 156, 157, 87, 88, 89, -1, 91, -1, 93, -1, - 95, 144, -1, 98, -1, 147, 147, 147, 103, 104, - 105, 1, 2, 74, 109, 110, 147, 147, 147, 80, - 115, 116, 147, 84, 151, 153, 87, 88, 89, 124, - 91, 31, 93, 152, 95, 156, 156, 98, 156, 156, - 156, 156, 103, 104, 105, 156, 156, 156, 109, 110, - 50, 51, 156, 156, 115, 116, 56, 156, 58, 156, - 156, 156, 157, 124, 156, 156, 156, 156, 156, 156, - 70, 156, 156, 156, 156, 156, 156, 156, 78, 79, - 156, 158, 157, 157, 74, 157, 86, 157, 157, 157, - 80, 157, 157, 157, 84, 156, 157, 87, 88, 89, - 157, 91, 157, 93, 157, 95, 157, 157, 98, 158, - 158, 158, 158, 103, 104, 105, 50, 51, 158, 109, - 110, 158, 56, 158, 58, 115, 116, 158, 158, 158, - 158, 158, 158, 158, 124, 135, 70, 137, 138, 139, - 140, 141, 142, 143, 78, 79, 158, 158, 158, 149, - 150, 158, 86, 158, 158, 158, 158, 158, 164, 159, - 158, 158, 158, 158, 158, -1, 156, 157, 159, 162, - 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 159, 159, -1, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 135, 160, 137, 138, 139, 140, 141, 142, 143, - 160, 160, 160, 160, 160, 149, 150, 160, 160, 163, - -1, 162, -1, 163, 163, 159, 163, 163, 163, -1, - 163, 163, 163, 163, 163, 163, 163, 163, 163 - ); - - protected $actionBase = array( - 0, 229, 310, 390, 470, 103, 325, 325, 784, -2, - -2, 149, -2, -2, -2, 660, 765, 799, 765, 589, - 694, 870, 870, 870, 252, 404, 404, 404, 514, 177, - 177, 918, 434, 118, 295, 313, 240, 491, 491, 491, - 491, 138, 138, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, - 491, 491, 491, 491, 491, 491, 89, 206, 773, 550, - 535, 775, 776, 777, 912, 709, 913, 856, 857, 700, - 858, 859, 862, 863, 864, 855, 865, 935, 866, 599, - 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, - 599, 322, 592, 285, 319, 232, 44, 691, 691, 691, - 691, 691, 691, 691, 182, 182, 182, 182, 182, 182, - 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, - 182, 182, 582, 530, 530, 530, 594, 860, 658, 926, - 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, - 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, - 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, - 926, 926, 926, 926, 926, 926, 926, 926, 926, 926, - 926, 926, 926, 500, -21, -21, 492, 702, 420, 355, - 216, 549, 151, 26, 26, 331, 331, 331, 331, 331, - 46, 46, 5, 5, 5, 5, 153, 188, 188, 188, - 188, 121, 121, 121, 121, 314, 314, 394, 394, 362, - 300, 298, 499, 499, 499, 499, 499, 499, 499, 499, - 499, 499, 67, 656, 656, 659, 659, 522, 554, 554, - 554, 554, 679, -59, -59, 381, 462, 462, 462, 528, - 717, 854, 382, 382, 382, 382, 382, 382, 561, 561, - 561, -3, -3, -3, 692, 115, 137, 115, 137, 678, - 732, 450, 732, 338, 677, -15, 510, 810, 468, 707, - 850, 711, 853, 572, 735, 267, 529, 654, 674, 463, - 529, 529, 529, 529, 654, 610, 640, 608, 463, 529, - 463, 718, 323, 496, 89, 570, 507, 675, 778, 293, - 670, 780, 290, 373, 332, 566, 278, 435, 733, 781, - 914, 917, 385, 715, 675, 675, 675, 352, 511, 278, - -8, 605, 605, 605, 605, 156, 605, 605, 605, 605, - 251, 276, 375, 402, 779, 657, 657, 690, 872, 869, - 869, 657, 689, 657, 690, 874, 874, 874, 874, 657, - 657, 657, 657, 869, 869, 869, 688, 869, 239, 703, - 704, 704, 874, 742, 743, 657, 657, 712, 869, 869, - 869, 712, 695, 874, 701, 741, 277, 869, 874, 672, - 689, 672, 657, 701, 672, 689, 689, 672, 22, 666, - 668, 873, 875, 887, 790, 662, 685, 879, 880, 876, - 878, 871, 699, 744, 745, 497, 669, 671, 673, 680, - 719, 682, 713, 674, 667, 667, 667, 655, 720, 655, - 667, 667, 667, 667, 667, 667, 667, 667, 916, 646, - 731, 714, 653, 749, 553, 573, 791, 664, 811, 900, - 893, 867, 919, 881, 898, 655, 920, 739, 247, 643, - 882, 783, 786, 655, 883, 655, 792, 655, 902, 812, - 686, 813, 814, 667, 910, 921, 923, 924, 925, 927, - 928, 929, 930, 684, 931, 750, 696, 894, 299, 877, - 718, 729, 705, 788, 751, 820, 328, 932, 823, 655, - 655, 794, 785, 655, 795, 756, 740, 890, 757, 895, - 933, 664, 708, 896, 655, 706, 825, 934, 328, 681, - 683, 888, 661, 761, 886, 911, 885, 796, 649, 663, - 829, 830, 831, 693, 763, 891, 892, 889, 764, 803, - 665, 805, 697, 832, 807, 884, 768, 833, 834, 899, - 676, 730, 710, 698, 687, 809, 835, 897, 769, 770, - 771, 848, 772, 849, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 138, 138, 138, 138, -2, -2, - -2, -2, 0, 0, -2, 0, 0, 0, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 0, 0, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, - 138, 138, 138, 138, 138, 138, 138, 138, 138, 599, - 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, - 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, - 599, 599, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 599, -21, -21, -21, -21, 599, - -21, -21, -21, -21, -21, -21, -21, 599, 599, 599, - 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, - 599, 599, 599, 599, 599, -21, 599, 599, 599, -21, - 382, -21, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 382, 599, 0, 0, 599, - -21, 599, -21, 599, -21, -21, 599, 599, 599, 599, - 599, 599, 599, -21, -21, -21, -21, -21, -21, 0, - 561, 561, 561, 561, -21, -21, -21, -21, 382, 382, - 382, 382, 382, 382, 259, 382, 382, 382, 382, 382, - 382, 382, 382, 382, 382, 382, 561, 561, -3, -3, - 382, 382, 382, 382, 382, 259, 382, 382, 463, 689, - 689, 689, 137, 137, 137, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 137, 463, 0, - 463, 0, 382, 463, 689, 463, 657, 137, 689, 689, - 463, 869, 616, 616, 616, 616, 328, 278, 0, 0, - 689, 689, 0, 0, 0, 0, 0, 689, 0, 0, - 0, 0, 0, 0, 869, 0, 0, 0, 0, 0, - 667, 247, 0, 705, 335, 0, 0, 0, 0, 0, - 0, 705, 335, 347, 347, 0, 684, 667, 667, 667, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 328 - ); - - protected $actionDefault = array( - 3,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 544, 544, 499,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 299, 299, 299, - 32767,32767,32767, 532, 532, 532, 532, 532, 532, 532, - 532, 532, 532, 532,32767,32767,32767,32767,32767,32767, - 383,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 389, - 549,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 364, - 365, 367, 368, 298, 552, 533, 247, 390, 548, 297, - 249, 327, 503,32767,32767,32767, 329, 122, 258, 203, - 502, 125, 296, 234, 382, 384, 328, 303, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 302, 458, 361, 360, 359, 460,32767, 459, 496, - 496, 499,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 325, 487, 486, 326, 456, 330, 457, - 333, 461, 464, 331, 332, 349, 350, 347, 348, 351, - 462, 463, 480, 481, 478, 479, 301, 352, 353, 354, - 355, 482, 483, 484, 485,32767,32767, 543, 543,32767, - 32767, 282,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 340, 341, 471, 472,32767, 238, 238, - 238, 238, 283, 238,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 335, 336, - 334, 466, 467, 465, 432,32767,32767,32767, 434,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 504,32767, - 32767,32767,32767,32767, 517, 421, 171,32767, 413,32767, - 171, 171, 171, 171,32767, 222, 224, 167,32767, 171, - 32767, 490,32767,32767,32767,32767, 522, 345,32767,32767, - 116,32767,32767,32767, 559,32767, 517,32767, 116,32767, - 32767,32767,32767, 358, 337, 338, 339,32767,32767, 521, - 515, 474, 475, 476, 477,32767, 468, 469, 470, 473, - 32767,32767,32767,32767,32767,32767,32767,32767, 429, 435, - 435,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 520, 519,32767, 414, 498, 188, - 186, 186,32767, 208, 208,32767,32767, 190, 491, 510, - 32767, 190, 173,32767, 400, 175, 498,32767,32767, 240, - 32767, 240,32767, 400, 240,32767,32767, 240,32767, 415, - 439,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 379, 380, 493, 506, - 32767, 507,32767, 413, 343, 344, 346, 322,32767, 324, - 369, 370, 371, 372, 373, 374, 375, 377,32767, 419, - 32767, 422,32767,32767,32767, 257,32767, 557,32767,32767, - 306, 557,32767,32767,32767, 551,32767,32767, 300,32767, - 32767,32767,32767, 253,32767, 169,32767, 541,32767, 558, - 32767, 515,32767, 342,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 516,32767,32767,32767,32767, 229,32767, - 452,32767, 116,32767,32767,32767, 189,32767,32767, 304, - 248,32767,32767, 550,32767,32767,32767,32767,32767,32767, - 32767,32767, 114,32767, 170,32767,32767,32767, 191,32767, - 32767, 515,32767,32767,32767,32767,32767,32767,32767, 295, - 32767,32767,32767,32767,32767,32767,32767, 515,32767,32767, - 233,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 415,32767, 276,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 127, 127, 3, 127, 127, 260, - 3, 260, 127, 260, 260, 127, 127, 127, 127, 127, - 127, 127, 127, 127, 127, 216, 219, 208, 208, 164, - 127, 127, 268 - ); - - protected $goto = array( - 166, 140, 140, 140, 166, 187, 168, 144, 147, 141, - 142, 143, 149, 163, 163, 163, 163, 144, 144, 165, - 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, - 138, 159, 160, 161, 162, 184, 139, 185, 494, 495, - 377, 496, 500, 501, 502, 503, 504, 505, 506, 507, - 970, 164, 145, 146, 148, 171, 176, 186, 203, 253, - 256, 258, 260, 263, 264, 265, 266, 267, 268, 269, - 277, 278, 279, 280, 303, 304, 328, 329, 330, 394, - 395, 396, 543, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 150, 151, 152, - 167, 153, 169, 154, 204, 170, 155, 156, 157, 205, - 158, 136, 621, 561, 757, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 561, 561, 561, 1113, - 629, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, - 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, - 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, - 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, 1113, - 1113, 1113, 1113, 1113, 1113, 758, 520, 531, 509, 656, - 556, 1183, 750, 509, 592, 786, 1183, 888, 612, 613, - 884, 617, 618, 624, 626, 631, 633, 817, 855, 855, - 855, 855, 850, 856, 174, 891, 891, 1205, 1205, 177, - 178, 179, 401, 402, 403, 404, 173, 202, 206, 208, - 257, 259, 261, 262, 270, 271, 272, 273, 274, 275, - 281, 282, 283, 284, 305, 306, 331, 332, 333, 406, - 407, 408, 409, 175, 180, 254, 255, 181, 182, 183, - 498, 498, 498, 498, 498, 498, 861, 498, 498, 498, - 498, 498, 498, 498, 498, 498, 498, 510, 586, 538, - 601, 602, 510, 545, 546, 547, 548, 549, 550, 551, - 552, 554, 587, 1209, 560, 350, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, - 400, 607, 537, 537, 569, 533, 909, 535, 535, 497, - 499, 525, 541, 570, 573, 584, 591, 298, 296, 296, - 296, 298, 289, 299, 611, 378, 511, 614, 595, 947, - 375, 511, 437, 437, 437, 437, 437, 437, 1163, 437, - 437, 437, 437, 437, 437, 437, 437, 437, 437, 1077, - 948, 338, 1175, 321, 1077, 898, 898, 898, 898, 606, - 898, 898, 1217, 1217, 1202, 753, 576, 605, 756, 1077, - 1077, 1077, 1077, 1077, 1077, 1069, 384, 384, 384, 391, - 1217, 877, 859, 857, 859, 655, 466, 512, 886, 881, - 753, 384, 753, 384, 968, 384, 895, 385, 588, 353, - 414, 384, 1231, 1019, 542, 1197, 1197, 1197, 568, 1094, - 386, 386, 386, 904, 915, 515, 1029, 19, 15, 372, - 389, 915, 940, 448, 450, 632, 340, 1216, 1216, 1114, - 615, 938, 840, 555, 775, 386, 913, 1070, 1073, 1074, - 399, 1069, 1182, 660, 23, 1216, 773, 1182, 544, 603, - 1066, 1219, 1071, 1174, 1071, 519, 1199, 1199, 1199, 1089, - 1088, 1072, 343, 523, 534, 519, 519, 772, 351, 352, - 13, 579, 583, 627, 1061, 388, 782, 562, 771, 515, - 783, 1181, 3, 4, 918, 956, 865, 451, 574, 1160, - 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 514, 529, 0, 0, 0, 0, - 514, 0, 529, 0, 0, 0, 0, 610, 513, 516, - 439, 440, 1067, 619, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 780, 1224, 0, 0, 0, 0, - 0, 524, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 778, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 301, 301 - ); - - protected $gotoCheck = array( - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 57, 69, 15, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 128, - 9, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 16, 102, 32, 69, 32, - 32, 120, 6, 69, 32, 29, 120, 32, 32, 32, - 32, 32, 32, 32, 32, 32, 32, 50, 69, 69, - 69, 69, 69, 69, 27, 77, 77, 77, 77, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, - 119, 119, 119, 119, 119, 119, 33, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 119, 67, 110, - 67, 67, 119, 111, 111, 111, 111, 111, 111, 111, - 111, 111, 111, 142, 57, 72, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 51, 51, 51, 51, 51, 51, 84, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 5, 5, 5, - 5, 5, 5, 5, 63, 46, 124, 63, 129, 98, - 63, 124, 57, 57, 57, 57, 57, 57, 133, 57, - 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 98, 127, 82, 127, 57, 57, 57, 57, 57, 49, - 57, 57, 144, 144, 140, 11, 40, 40, 14, 57, - 57, 57, 57, 57, 57, 82, 13, 13, 13, 48, - 144, 14, 14, 14, 14, 14, 57, 14, 14, 14, - 11, 13, 11, 13, 102, 13, 79, 11, 70, 70, - 70, 13, 13, 103, 2, 9, 9, 9, 2, 34, - 125, 125, 125, 81, 13, 13, 34, 34, 34, 34, - 17, 13, 8, 8, 8, 8, 18, 143, 143, 8, - 8, 8, 9, 34, 25, 125, 85, 82, 82, 82, - 125, 82, 121, 74, 34, 143, 24, 121, 47, 34, - 116, 143, 82, 82, 82, 47, 121, 121, 121, 126, - 126, 82, 58, 58, 58, 47, 47, 23, 72, 72, - 58, 62, 62, 62, 114, 12, 23, 12, 23, 13, - 26, 121, 30, 30, 86, 100, 71, 65, 66, 132, - 109, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, - 9, -1, 9, -1, -1, -1, -1, 13, 9, 9, - 9, 9, 13, 13, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 9, 9, -1, -1, -1, -1, - -1, 102, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 5 - ); - - protected $gotoBase = array( - 0, 0, -172, 0, 0, 353, 201, 0, 477, 149, - 0, 110, 195, 117, 426, 112, 203, 140, 171, 0, - 0, 0, 0, 168, 164, 157, 119, 27, 0, 205, - -118, 0, -428, 266, 51, 0, 0, 0, 0, 0, - 388, 0, 0, -24, 0, 0, 345, 484, 146, 133, - 209, 75, 0, 0, 0, 0, 0, 107, 161, 0, - 0, 0, 222, -77, 0, 106, 97, -343, 0, -94, - 135, 123, -129, 0, 129, 0, 0, -50, 0, 143, - 0, 159, 64, 0, 338, 132, 122, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 98, 0, - 121, 0, 165, 156, 0, 0, 0, 0, 0, 87, - 273, 259, 0, 0, 114, 0, 150, 0, 0, -5, - -91, 200, 0, 0, 84, 154, 202, 77, -48, 178, - 0, 0, 93, 187, 0, 0, 0, 0, 0, 0, - 136, 0, 286, 167, 102, 0, 0 - ); - - protected $gotoDefault = array( - -32768, 468, 664, 2, 665, 835, 740, 748, 598, 482, - 630, 582, 380, 1193, 792, 793, 794, 381, 368, 483, - 379, 410, 405, 781, 774, 776, 784, 172, 411, 787, - 1, 789, 518, 825, 1020, 365, 797, 366, 590, 799, - 527, 801, 802, 137, 382, 383, 528, 484, 390, 577, - 816, 276, 387, 818, 367, 819, 828, 371, 465, 455, - 460, 530, 557, 609, 432, 447, 571, 565, 536, 1086, - 566, 864, 349, 872, 661, 880, 883, 485, 558, 894, - 452, 902, 1099, 397, 908, 914, 919, 291, 922, 417, - 412, 585, 927, 928, 5, 932, 622, 623, 8, 312, - 955, 599, 969, 420, 1039, 1041, 486, 487, 522, 459, - 508, 526, 488, 1062, 441, 413, 1065, 433, 489, 490, - 434, 435, 1083, 355, 1168, 354, 449, 320, 1155, 580, - 1118, 456, 1208, 1164, 348, 491, 492, 376, 1187, 392, - 1203, 438, 1210, 1218, 344, 540, 567 - ); - - protected $ruleToNonTerminal = array( - 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 7, 7, 7, 8, 8, 9, 10, 11, 11, - 12, 12, 13, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 18, 18, 19, 19, 21, 21, - 17, 17, 22, 22, 23, 23, 24, 24, 25, 25, - 20, 20, 26, 28, 28, 29, 30, 30, 32, 31, - 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 14, 14, 54, 54, 56, 55, 55, 48, - 48, 58, 58, 59, 59, 60, 60, 61, 61, 15, - 16, 16, 16, 64, 64, 64, 65, 65, 68, 68, - 66, 66, 70, 70, 41, 41, 50, 50, 53, 53, - 53, 52, 52, 71, 42, 42, 42, 42, 72, 72, - 73, 73, 74, 74, 39, 39, 35, 35, 75, 37, - 37, 76, 36, 36, 38, 38, 49, 49, 49, 62, - 62, 78, 78, 79, 79, 81, 81, 81, 80, 80, - 63, 63, 82, 82, 82, 83, 83, 84, 84, 84, - 44, 44, 85, 85, 85, 45, 45, 86, 86, 87, - 87, 67, 88, 88, 88, 88, 93, 93, 94, 94, - 95, 95, 95, 95, 95, 96, 97, 97, 92, 92, - 89, 89, 91, 91, 99, 99, 98, 98, 98, 98, - 98, 98, 90, 90, 101, 100, 100, 46, 46, 40, - 40, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, - 43, 43, 43, 43, 43, 43, 43, 34, 34, 47, - 47, 106, 106, 107, 107, 107, 107, 113, 102, 102, - 109, 109, 115, 115, 116, 117, 118, 118, 118, 118, - 118, 118, 118, 69, 69, 57, 57, 57, 57, 103, - 103, 122, 122, 119, 119, 123, 123, 123, 123, 104, - 104, 104, 108, 108, 108, 114, 114, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - 27, 27, 27, 27, 27, 27, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 112, 112, 105, 105, 105, 105, 129, 129, 132, 132, - 131, 131, 133, 133, 51, 51, 51, 51, 135, 135, - 134, 134, 134, 134, 134, 136, 136, 121, 121, 124, - 124, 120, 120, 138, 137, 137, 137, 137, 125, 125, - 125, 125, 111, 111, 126, 126, 126, 126, 77, 139, - 139, 140, 140, 140, 110, 110, 141, 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 3, 4, 4, 1, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 1, 3, 5, - 4, 3, 4, 4, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, - 1, 3, 2, 1, 2, 10, 11, 3, 3, 2, - 4, 4, 3, 4, 4, 4, 4, 7, 3, 2, - 0, 4, 1, 3, 2, 1, 2, 2, 4, 6, - 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 4, 4, 0, - 2, 1, 0, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, - 1, 3, 1, 4, 3, 1, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 5, 4, 4, 3, - 1, 3, 1, 1, 3, 3, 0, 2, 0, 1, - 3, 1, 3, 1, 1, 1, 1, 1, 6, 4, - 3, 4, 2, 4, 4, 1, 3, 1, 2, 1, - 1, 4, 1, 1, 3, 6, 4, 4, 4, 4, - 1, 4, 0, 1, 1, 3, 1, 1, 4, 3, - 1, 1, 1, 0, 0, 2, 3, 1, 3, 1, - 4, 2, 2, 2, 2, 1, 2, 1, 1, 1, - 4, 3, 3, 3, 6, 3, 1, 1, 1 - ); - - protected function initReduceCallbacks() { - $this->reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 1 => function ($stackPos) { - $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); - }, - 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 3 => function ($stackPos) { - $this->semValue = array(); - }, - 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 85 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 88 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 89 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 90 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 91 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 92 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 93 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 94 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 96 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 97 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); - $this->checkNamespace($this->semValue); - }, - 98 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 99 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); - }, - 100 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 101 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 103 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 104 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_FUNCTION; - }, - 105 => function ($stackPos) { - $this->semValue = Stmt\Use_::TYPE_CONSTANT; - }, - 106 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 107 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 108 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 109 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 110 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 111 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 112 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 113 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 114 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 115 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 116 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); - }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 118 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; - }, - 119 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; - }, - 120 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 121 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 122 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 123 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 124 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 125 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 126 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 127 => function ($stackPos) { - $this->semValue = array(); - }, - 128 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 129 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 130 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 131 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 132 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 133 => function ($stackPos) { - - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; - } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if (null === $this->semValue) { $this->semValue = array(); } - } - - }, - 134 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(5-2)], ['stmts' => is_array($this->semStack[$stackPos-(5-3)]) ? $this->semStack[$stackPos-(5-3)] : array($this->semStack[$stackPos-(5-3)]), 'elseifs' => $this->semStack[$stackPos-(5-4)], 'else' => $this->semStack[$stackPos-(5-5)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 135 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(8-2)], ['stmts' => $this->semStack[$stackPos-(8-4)], 'elseifs' => $this->semStack[$stackPos-(8-5)], 'else' => $this->semStack[$stackPos-(8-6)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 136 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 137 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(5-4)], is_array($this->semStack[$stackPos-(5-2)]) ? $this->semStack[$stackPos-(5-2)] : array($this->semStack[$stackPos-(5-2)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 138 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 139 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 140 => function ($stackPos) { - $this->semValue = new Stmt\Break_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 141 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 142 => function ($stackPos) { - $this->semValue = new Stmt\Continue_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 143 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 144 => function ($stackPos) { - $this->semValue = new Stmt\Return_(null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 145 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 146 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 147 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 148 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 149 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 150 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 151 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 152 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 153 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 154 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - }, - 155 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 156 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); - }, - 157 => function ($stackPos) { - $this->semValue = new Stmt\Throw_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 158 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 159 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 160 => function ($stackPos) { - $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 161 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ - }, - 162 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 163 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ - }, - 164 => function ($stackPos) { - $this->semValue = array(); - }, - 165 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 166 => function ($stackPos) { - $this->semValue = new Stmt\Catch_(array($this->semStack[$stackPos-(8-3)]), $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); - }, - 167 => function ($stackPos) { - $this->semValue = null; - }, - 168 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 169 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 170 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 171 => function ($stackPos) { - $this->semValue = false; - }, - 172 => function ($stackPos) { - $this->semValue = true; - }, - 173 => function ($stackPos) { - $this->semValue = false; - }, - 174 => function ($stackPos) { - $this->semValue = true; - }, - 175 => function ($stackPos) { - $this->semValue = false; - }, - 176 => function ($stackPos) { - $this->semValue = true; - }, - 177 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 178 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 179 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(10-3)], ['byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-5)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 180 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - $this->checkClass($this->semValue, $stackPos-(7-2)); - }, - 181 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(6-2)], ['extends' => $this->semStack[$stackPos-(6-3)], 'stmts' => $this->semStack[$stackPos-(6-5)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - $this->checkInterface($this->semValue, $stackPos-(6-2)); - }, - 182 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(5-2)], ['stmts' => $this->semStack[$stackPos-(5-4)]], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 183 => function ($stackPos) { - $this->semValue = 0; - }, - 184 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 185 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 186 => function ($stackPos) { - $this->semValue = null; - }, - 187 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 188 => function ($stackPos) { - $this->semValue = array(); - }, - 189 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 190 => function ($stackPos) { - $this->semValue = array(); - }, - 191 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 192 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 193 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 194 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 195 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 196 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 197 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 198 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 199 => function ($stackPos) { - $this->semValue = null; - }, - 200 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 201 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 202 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 203 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 204 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 205 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 206 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 207 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(5-3)]; - }, - 208 => function ($stackPos) { - $this->semValue = array(); - }, - 209 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 210 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 211 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 212 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 213 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 214 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, - 215 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 216 => function ($stackPos) { - $this->semValue = array(); - }, - 217 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 218 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(3-2)], is_array($this->semStack[$stackPos-(3-3)]) ? $this->semStack[$stackPos-(3-3)] : array($this->semStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 219 => function ($stackPos) { - $this->semValue = array(); - }, - 220 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 221 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 222 => function ($stackPos) { - $this->semValue = null; - }, - 223 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 224 => function ($stackPos) { - $this->semValue = null; - }, - 225 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 226 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 227 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-2)], true); - }, - 228 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 229 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 230 => function ($stackPos) { - $this->semValue = array(); - }, - 231 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 232 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 233 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(4-4)], null, $this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkParam($this->semValue); - }, - 234 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-3)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkParam($this->semValue); - }, - 235 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 236 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 237 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 238 => function ($stackPos) { - $this->semValue = null; - }, - 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 240 => function ($stackPos) { - $this->semValue = null; - }, - 241 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-2)]; - }, - 242 => function ($stackPos) { - $this->semValue = array(); - }, - 243 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 244 => function ($stackPos) { - $this->semValue = array(new Node\Arg($this->semStack[$stackPos-(3-2)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes)); - }, - 245 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 246 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 247 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 248 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 249 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 250 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 251 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 252 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 253 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 254 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 255 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 256 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 257 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 258 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 259 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } else { $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 260 => function ($stackPos) { - $this->semValue = array(); - }, - 261 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; - if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 262 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); - }, - 263 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(3-2)], 0, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 264 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); - $this->checkClassMethod($this->semValue, $stackPos-(9-1)); - }, - 265 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 266 => function ($stackPos) { - $this->semValue = array(); - }, - 267 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 268 => function ($stackPos) { - $this->semValue = array(); - }, - 269 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 270 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 271 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 272 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 273 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 274 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 275 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); - }, - 276 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 277 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); - }, - 278 => function ($stackPos) { - $this->semValue = null; - }, - 279 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 280 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 281 => function ($stackPos) { - $this->semValue = 0; - }, - 282 => function ($stackPos) { - $this->semValue = 0; - }, - 283 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 284 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 285 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; - }, - 286 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; - }, - 287 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; - }, - 288 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; - }, - 289 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; - }, - 290 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; - }, - 291 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; - }, - 292 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 293 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 294 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 295 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 296 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 297 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 298 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 299 => function ($stackPos) { - $this->semValue = array(); - }, - 300 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 301 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 302 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 303 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 304 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 305 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 306 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 307 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 308 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 309 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 310 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 311 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 312 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 313 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 314 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 315 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 316 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 317 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 318 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 319 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 320 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 321 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 322 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 323 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 324 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 325 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 326 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 327 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 328 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 329 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 330 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 331 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 332 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 333 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 334 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 335 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 336 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 337 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 341 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 342 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 343 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 344 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 345 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 346 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 347 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 348 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 349 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 350 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 351 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 353 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 354 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 355 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 356 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 357 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 358 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 359 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 360 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 361 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 362 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 363 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 364 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 365 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 366 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 367 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 368 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 369 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 370 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); - }, - 371 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 372 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 373 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 374 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 375 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 376 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; - $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; - $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); - }, - 377 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 378 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 379 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 380 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 381 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 382 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 383 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 384 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 385 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(10-2)], 'params' => $this->semStack[$stackPos-(10-4)], 'uses' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-7)], 'stmts' => $this->semStack[$stackPos-(10-9)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); - }, - 386 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(11-3)], 'params' => $this->semStack[$stackPos-(11-5)], 'uses' => $this->semStack[$stackPos-(11-7)], 'returnType' => $this->semStack[$stackPos-(11-8)], 'stmts' => $this->semStack[$stackPos-(11-10)]], $this->startAttributeStack[$stackPos-(11-1)] + $this->endAttributes); - }, - 387 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 388 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 389 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 390 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 391 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - }, - 392 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); - }, - 393 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 394 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch(Scalar\String_::fromString($this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes), $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 395 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 396 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 397 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); - $this->checkClass($this->semValue[0], -1); - }, - 398 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 399 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 400 => function ($stackPos) { - $this->semValue = array(); - }, - 401 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; - }, - 402 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 403 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 404 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 405 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 406 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 407 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 408 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 409 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 410 => function ($stackPos) { - $this->semValue = $this->fixupPhp5StaticPropCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 411 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 412 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 413 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 414 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 415 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 416 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 417 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 418 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 419 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 420 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 421 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 422 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 423 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 424 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 425 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 426 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 427 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 428 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 429 => function ($stackPos) { - $this->semValue = null; - }, - 430 => function ($stackPos) { - $this->semValue = null; - }, - 431 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 432 => function ($stackPos) { - $this->semValue = array(); - }, - 433 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`', false), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 434 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', false); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 435 => function ($stackPos) { - $this->semValue = array(); - }, - 436 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 437 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, true); - }, - 438 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 439 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes, false); - }, - 440 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 441 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 442 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 443 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 444 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 445 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 446 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 447 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 448 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], false); - }, - 449 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], false); - }, - 450 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 451 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 452 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 453 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 454 => function ($stackPos) { - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 455 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 456 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 457 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 458 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 459 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 460 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 461 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 462 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 463 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 464 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 465 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 466 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 467 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 468 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 469 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 470 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 471 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 472 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 473 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 474 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 475 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 476 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 477 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 478 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 479 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 480 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 481 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 482 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 483 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 484 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 485 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 486 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 487 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 488 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 489 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 490 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 491 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 492 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 493 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 494 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); - }, - 495 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 496 => function ($stackPos) { - $this->semValue = array(); - }, - 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 498 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 499 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 500 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 501 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 502 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 503 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 504 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 505 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 506 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 507 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 508 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 509 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 510 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 511 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 512 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 513 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 514 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 515 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 516 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 518 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 519 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 520 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 521 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 522 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 523 => function ($stackPos) { - $var = substr($this->semStack[$stackPos-(1-1)], 1); $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; - }, - 524 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 525 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 526 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 527 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 528 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 529 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 530 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 531 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 532 => function ($stackPos) { - $this->semValue = null; - }, - 533 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 534 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 537 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 538 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 539 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 540 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 541 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 542 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 543 => function ($stackPos) { - $this->semValue = null; - }, - 544 => function ($stackPos) { - $this->semValue = array(); - }, - 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 546 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 547 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 548 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 549 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 550 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 551 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); - }, - 553 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 554 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 555 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 556 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); - }, - 557 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 558 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 560 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 561 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 562 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 563 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 564 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); - }, - 565 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 566 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 567 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 568 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - ]; - } -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php index 6d2b4b0f..7d8cb107 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php @@ -1,8 +1,9 @@ -<?php +<?php declare(strict_types=1); namespace PhpParser\Parser; use PhpParser\Error; +use PhpParser\Modifiers; use PhpParser\Node; use PhpParser\Node\Expr; use PhpParser\Node\Name; @@ -11,25 +12,166 @@ use PhpParser\Node\Stmt; /* This is an automatically GENERATED file, which should not be manually edited. * Instead edit one of the following: - * * the grammar files grammar/php5.y or grammar/php7.y + * * the grammar file grammar/php.y * * the skeleton file grammar/parser.template * * the preprocessing script grammar/rebuildParsers.php */ class Php7 extends \PhpParser\ParserAbstract { - protected $tokenToSymbolMapSize = 396; - protected $actionTableSize = 1241; - protected $gotoTableSize = 629; + public const YYERRTOK = 256; + public const T_THROW = 257; + public const T_INCLUDE = 258; + public const T_INCLUDE_ONCE = 259; + public const T_EVAL = 260; + public const T_REQUIRE = 261; + public const T_REQUIRE_ONCE = 262; + public const T_LOGICAL_OR = 263; + public const T_LOGICAL_XOR = 264; + public const T_LOGICAL_AND = 265; + public const T_PRINT = 266; + public const T_YIELD = 267; + public const T_DOUBLE_ARROW = 268; + public const T_YIELD_FROM = 269; + public const T_PLUS_EQUAL = 270; + public const T_MINUS_EQUAL = 271; + public const T_MUL_EQUAL = 272; + public const T_DIV_EQUAL = 273; + public const T_CONCAT_EQUAL = 274; + public const T_MOD_EQUAL = 275; + public const T_AND_EQUAL = 276; + public const T_OR_EQUAL = 277; + public const T_XOR_EQUAL = 278; + public const T_SL_EQUAL = 279; + public const T_SR_EQUAL = 280; + public const T_POW_EQUAL = 281; + public const T_COALESCE_EQUAL = 282; + public const T_COALESCE = 283; + public const T_BOOLEAN_OR = 284; + public const T_BOOLEAN_AND = 285; + public const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; + public const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; + public const T_IS_EQUAL = 288; + public const T_IS_NOT_EQUAL = 289; + public const T_IS_IDENTICAL = 290; + public const T_IS_NOT_IDENTICAL = 291; + public const T_SPACESHIP = 292; + public const T_IS_SMALLER_OR_EQUAL = 293; + public const T_IS_GREATER_OR_EQUAL = 294; + public const T_SL = 295; + public const T_SR = 296; + public const T_INSTANCEOF = 297; + public const T_INC = 298; + public const T_DEC = 299; + public const T_INT_CAST = 300; + public const T_DOUBLE_CAST = 301; + public const T_STRING_CAST = 302; + public const T_ARRAY_CAST = 303; + public const T_OBJECT_CAST = 304; + public const T_BOOL_CAST = 305; + public const T_UNSET_CAST = 306; + public const T_POW = 307; + public const T_NEW = 308; + public const T_CLONE = 309; + public const T_EXIT = 310; + public const T_IF = 311; + public const T_ELSEIF = 312; + public const T_ELSE = 313; + public const T_ENDIF = 314; + public const T_LNUMBER = 315; + public const T_DNUMBER = 316; + public const T_STRING = 317; + public const T_STRING_VARNAME = 318; + public const T_VARIABLE = 319; + public const T_NUM_STRING = 320; + public const T_INLINE_HTML = 321; + public const T_ENCAPSED_AND_WHITESPACE = 322; + public const T_CONSTANT_ENCAPSED_STRING = 323; + public const T_ECHO = 324; + public const T_DO = 325; + public const T_WHILE = 326; + public const T_ENDWHILE = 327; + public const T_FOR = 328; + public const T_ENDFOR = 329; + public const T_FOREACH = 330; + public const T_ENDFOREACH = 331; + public const T_DECLARE = 332; + public const T_ENDDECLARE = 333; + public const T_AS = 334; + public const T_SWITCH = 335; + public const T_MATCH = 336; + public const T_ENDSWITCH = 337; + public const T_CASE = 338; + public const T_DEFAULT = 339; + public const T_BREAK = 340; + public const T_CONTINUE = 341; + public const T_GOTO = 342; + public const T_FUNCTION = 343; + public const T_FN = 344; + public const T_CONST = 345; + public const T_RETURN = 346; + public const T_TRY = 347; + public const T_CATCH = 348; + public const T_FINALLY = 349; + public const T_USE = 350; + public const T_INSTEADOF = 351; + public const T_GLOBAL = 352; + public const T_STATIC = 353; + public const T_ABSTRACT = 354; + public const T_FINAL = 355; + public const T_PRIVATE = 356; + public const T_PROTECTED = 357; + public const T_PUBLIC = 358; + public const T_READONLY = 359; + public const T_VAR = 360; + public const T_UNSET = 361; + public const T_ISSET = 362; + public const T_EMPTY = 363; + public const T_HALT_COMPILER = 364; + public const T_CLASS = 365; + public const T_TRAIT = 366; + public const T_INTERFACE = 367; + public const T_ENUM = 368; + public const T_EXTENDS = 369; + public const T_IMPLEMENTS = 370; + public const T_OBJECT_OPERATOR = 371; + public const T_NULLSAFE_OBJECT_OPERATOR = 372; + public const T_LIST = 373; + public const T_ARRAY = 374; + public const T_CALLABLE = 375; + public const T_CLASS_C = 376; + public const T_TRAIT_C = 377; + public const T_METHOD_C = 378; + public const T_FUNC_C = 379; + public const T_LINE = 380; + public const T_FILE = 381; + public const T_START_HEREDOC = 382; + public const T_END_HEREDOC = 383; + public const T_DOLLAR_OPEN_CURLY_BRACES = 384; + public const T_CURLY_OPEN = 385; + public const T_PAAMAYIM_NEKUDOTAYIM = 386; + public const T_NAMESPACE = 387; + public const T_NS_C = 388; + public const T_DIR = 389; + public const T_NS_SEPARATOR = 390; + public const T_ELLIPSIS = 391; + public const T_NAME_FULLY_QUALIFIED = 392; + public const T_NAME_QUALIFIED = 393; + public const T_NAME_RELATIVE = 394; + public const T_ATTRIBUTE = 395; - protected $invalidSymbol = 168; - protected $errorSymbol = 1; - protected $defaultAction = -32766; - protected $unexpectedTokenRule = 32767; + protected int $tokenToSymbolMapSize = 396; + protected int $actionTableSize = 1258; + protected int $gotoTableSize = 567; - protected $YY2TBLSTATE = 434; - protected $numNonLeafStates = 736; + protected int $invalidSymbol = 168; + protected int $errorSymbol = 1; + protected int $defaultAction = -32766; + protected int $unexpectedTokenRule = 32767; - protected $symbolToName = array( + protected int $YY2TBLSTATE = 435; + protected int $numNonLeafStates = 739; + + protected array $symbolToName = array( "EOF", "error", "T_THROW", @@ -191,21 +333,21 @@ class Php7 extends \PhpParser\ParserAbstract "T_ATTRIBUTE", "';'", "']'", - "'{'", - "'}'", "'('", "')'", + "'{'", + "'}'", "'`'", "'\"'", "'$'" ); - protected $tokenToSymbol = array( + protected array $tokenToSymbol = array( 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, - 163, 164, 53, 50, 8, 51, 52, 54, 168, 168, + 161, 162, 53, 50, 8, 51, 52, 54, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, @@ -213,7 +355,7 @@ class Php7 extends \PhpParser\ParserAbstract 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 168, 168, 168, 161, 35, 162, 58, 168, 168, 168, + 168, 168, 168, 163, 35, 164, 58, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, @@ -243,529 +385,526 @@ class Php7 extends \PhpParser\ParserAbstract 153, 154, 155, 156, 157, 158 ); - protected $action = array( - 133, 134, 135, 579, 136, 137, 0, 748, 749, 750, - 138, 38, 327,-32766,-32766,-32766,-32766,-32766,-32766,-32767, - -32767,-32767,-32767, 102, 103, 104, 105, 106, 1109, 1110, - 1111, 1108, 1107, 1106, 1112, 742, 741,-32766, 1232,-32766, + protected array $action = array( + 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, + 138, 38,-32766,-32766,-32766, 151,-32766,-32766,-32766,-32767, + -32767,-32767,-32767, 102, 103, 104, 105, 106, 1112, 1113, + 1114, 1111, 1110, 1109, 1115, 745, 744,-32766,-32766,-32766, -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, - -32767, 2, 107, 108, 109, 751, 274, 381, 380,-32766, - -32766,-32766,-32766, 104, 105, 106, 1024, 422, 110, 265, - 139, 403, 755, 756, 757, 758, 466, 467, 428, 938, - 291,-32766, 287,-32766,-32766, 759, 760, 761, 762, 763, - 764, 765, 766, 767, 768, 769, 789, 580, 790, 791, - 792, 793, 781, 782, 344, 345, 784, 785, 770, 771, - 772, 774, 775, 776, 355, 816, 817, 818, 819, 820, - 581, 777, 778, 582, 583, 810, 801, 799, 800, 813, - 796, 797, 687, -545, 584, 585, 795, 586, 587, 588, - 589, 590, 591, -328, -593, -367, 1234, -367, 798, 592, - 593, -593, 140,-32766,-32766,-32766, 133, 134, 135, 579, - 136, 137, 1057, 748, 749, 750, 138, 38, 688, 1020, - 1019, 1018, 1021, 390,-32766, 7,-32766,-32766,-32766,-32766, - -32766,-32766,-32766,-32766,-32766,-32766, 379, 380, 1033, 689, - 690, 742, 741,-32766,-32766,-32766, 422, -545, -545, -590, - -32766,-32766,-32766, 1032,-32766, 127, -590, 1236, 1235, 1237, - 1318, 751, -545, 290,-32766, 283,-32766,-32766,-32766,-32766, - -32766, 1236, 1235, 1237, -545, 265, 139, 403, 755, 756, - 757, 758, 16, 481, 428, 458, 459, 460, 298, 722, - 35, 759, 760, 761, 762, 763, 764, 765, 766, 767, - 768, 769, 789, 580, 790, 791, 792, 793, 781, 782, - 344, 345, 784, 785, 770, 771, 772, 774, 775, 776, - 355, 816, 817, 818, 819, 820, 581, 777, 778, 582, - 583, 810, 801, 799, 800, 813, 796, 797, 129, 824, - 584, 585, 795, 586, 587, 588, 589, 590, 591, -328, - 83, 84, 85, -593, 798, 592, 593, -593, 149, 773, - 743, 744, 745, 746, 747, 824, 748, 749, 750, 786, - 787, 37, 145, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 291, 274, 835, - 254, 1109, 1110, 1111, 1108, 1107, 1106, 1112, -590, 860, - 110, 861, -590, 482, 751,-32766,-32766,-32766,-32766,-32766, - 142, 603, 1085, 742, 741, 1262, 326, 987, 752, 753, - 754, 755, 756, 757, 758, 309,-32766, 822,-32766,-32766, - -32766,-32766, 242, 553, 759, 760, 761, 762, 763, 764, - 765, 766, 767, 768, 769, 789, 812, 790, 791, 792, - 793, 781, 782, 783, 811, 784, 785, 770, 771, 772, - 774, 775, 776, 815, 816, 817, 818, 819, 820, 821, - 777, 778, 779, 780, 810, 801, 799, 800, 813, 796, - 797, 311, 940, 788, 794, 795, 802, 803, 805, 804, - 806, 807, 323, 609, 1274, 1033, 833, 798, 809, 808, - 50, 51, 52, 512, 53, 54, 860, 241, 861, 918, - 55, 56, -111, 57,-32766,-32766,-32766, -111, 826, -111, - 290, 1302, 1347, 356, 305, 1348, 339, -111, -111, -111, - -111, -111, -111, -111, -111,-32766, -194,-32766,-32766,-32766, - -193, 956, 957, 829, -86, 988, 958, 834, 58, 59, - 340, 428, 952, -544, 60, 832, 61, 247, 248, 62, - 63, 64, 65, 66, 67, 68, 69, 1241, 28, 267, - 70, 444, 513, -342,-32766, 141, 1268, 1269, 514, 918, - 833, 326, -272, 918, 1266, 42, 25, 515, 940, 516, - 14, 517, 908, 518, 828, 369, 519, 520, 373, 709, - 1033, 44, 45, 445, 376, 375, 388, 46, 521, 712, - -86, 440, 1101, 367, 338, -543, 441, -544, -544, 830, - 1227, 442, 523, 524, 525, 290, 1236, 1235, 1237, 361, - 1030, 443, -544, 1087, 526, 527, 839, 1255, 1256, 1257, - 1258, 1252, 1253, 297, -544, 151, -550, -584, 833, 1259, - 1254, -584, 1033, 1236, 1235, 1237, 298, -154, -154, -154, - 152, 71, 908, 321, 322, 326, 908, 920, 1030, 707, - 833, 154, -154, 1337, -154, 155, -154, 283, -154, -543, - -543, 82, 1232, 1086, 1322, 734, 156, 326, 374, 158, - 1033, 1321, -194, -79, -543, -88, -193, 742, 741, 956, - 957, 653, 26,-32766, 522, -51, -543, 33, -549, 894, - 952, -111, -111, -111, 32, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, -59, 75, - 28, 672, 673, 326, -58, 36, 250, 920, 124, 707, - 125, 920, 833, 707, -154, 130, 1266, 131,-32766, -547, - 144, -542, 150, 406, 1234, 377, 378, 1146, 1148, 382, - 383,-32766,-32766,-32766, -85,-32766, 1056,-32766, -542,-32766, - 644, 645,-32766, 159, 160, 161, 1232,-32766,-32766,-32766, - 162, -79, 1227,-32766,-32766, 742, 741, 163, -302,-32766, - 419, -75, -4, 918, -73, 287, 526, 527,-32766, 1255, - 1256, 1257, 1258, 1252, 1253, -72, -71, -70, -69, -68, - -67, 1259, 1254, -547, -547, -542, -542, 742, 741, -66, - -47, -18,-32766, 73, 148, 918, 322, 326, 1234, 273, - -542, 284, -542, -542, 723,-32766,-32766,-32766, 726,-32766, - -547,-32766, -542,-32766, 917, 147,-32766, -542, 288, 289, - -298,-32766,-32766,-32766,-32766, 713, 279,-32766,-32766, -542, - 1234, 280, 285,-32766, 419, 48, 286,-32766,-32766,-32766, - 332,-32766,-32766,-32766, 292,-32766, 908, 293,-32766, 934, - 274, 1030, 918,-32766,-32766,-32766, 110, 682, 132,-32766, - -32766, 833, 146,-32766, 559,-32766, 419, 659, 374, 824, - 435, 1349, 74, 1033,-32766, 296, 654, 1116, 908, 956, - 957, 306, 714, 698, 522, 555, 303, 13, 310, 852, - 952, -111, -111, -111, 700, 463, 492, 953, 283, 299, - 300,-32766, 49, 675, 918, 304, 660, 1234, 676, 936, - 1273,-32766, 10, 1263,-32766,-32766,-32766, 642,-32766, 918, - -32766, 920,-32766, 707, -4,-32766, 126, 34, 918, 565, - -32766,-32766,-32766,-32766, 0, 908,-32766,-32766, 0, 1234, - 918, 0,-32766, 419, 0, 0,-32766,-32766,-32766, 717, - -32766,-32766,-32766, 920,-32766, 707, 1033,-32766, 724, 1275, - 0, 487,-32766,-32766,-32766,-32766, 301, 302,-32766,-32766, - -507, 1234, 571, -497,-32766, 419, 607, 8,-32766,-32766, - -32766, 372,-32766,-32766,-32766, 17,-32766, 908, 371,-32766, - 832, 298, 320, 128,-32766,-32766,-32766, 40, 370, 41, - -32766,-32766, 908, -250, -250, -250,-32766, 419, 731, 374, - 973, 908, 707, 732, 899,-32766, 997, 974, 728, 981, - 956, 957, 971, 908, 982, 522, 897, 969, 1090, 1093, - 894, 952, -111, -111, -111, 28, 1094, 1091, 1092, -249, - -249, -249, 1241, 1098, 708, 374, 844, 833, 1288, 1306, - 1340, 1266, 647, 1267, 711, 715, 956, 957, 716, 1241, - 718, 522, 920, 719, 707, -250, 894, 952, -111, -111, - -111, 720, -16, 721, 725, 710, -511, 920, 895, 707, - -578, 1232, 1344, 1346, 855, 854, 920, 1227, 707, -577, - 863, 946, 989, 862, 1345, 945, 943, 944, 920, 947, - 707, -249, 527, 1218, 1255, 1256, 1257, 1258, 1252, 1253, - 927, 937, 925, 979, 980, 631, 1259, 1254, 1343, 1300, - -32766, 1289, 1307, 833, 1316, -275, 1234, -576, 73, -550, - -549, 322, 326,-32766,-32766,-32766, -548,-32766, -491,-32766, - 833,-32766, 1, 29,-32766, 30, 39, 43, 47,-32766, - -32766,-32766, 72, 76, 77,-32766,-32766, 1232, -111, -111, - 78,-32766, 419, -111, 79, 80, 81, 143, 153, -111, - -32766, 157, 246, 328, 1232, -111, -111, 356,-32766, 357, - -111, 358, 359, 360, 361, 362, -111, 363, 364, 365, - 366, 368, 436, 0, -273,-32766, -272, 19, 20, 298, - 21, 22, 24, 405, 75, 1203, 483, 484, 326, 491, - 0, 494, 495, 496, 497, 501, 298, 502, 503, 510, - 693, 75, 0, 1245, 1186, 326, 1264, 1059, 1058, 1039, - 1222, 1035, -277, -103, 18, 23, 27, 295, 404, 600, - 604, 633, 699, 1190, 1240, 1187, 1319, 0, 0, 0, - 326 + -32767, 1245, 837,-32766, 1322, 754,-32766,-32766,-32766,-32766, + -594,-32766,-32766,-32766, 104, 105, 106, -594, 1306, 265, + 139, 404, 758, 759, 760, 761, 990,-32766, 429,-32766, + -32766, -16,-32766, 242, 1027, 815, 762, 763, 764, 765, + 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, + 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, + 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, + 584, 779, 780, 585, 586,-32766, 803, 801, 802, 814, + 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, + 592, 593, 594, 826, 459, 460, 461, 1036, 800, 595, + 596, 941, 140, 2, 133, 134, 135, 582, 136, 137, + 1060, 751, 752, 753, 138, 38, -328, -110, -110, 1326, + 290, 23, -110,-32766,-32766,-32766, 1325, 35, -110, 1112, + 1113, 1114, 1111, 1110, 1109, 1115, 612,-32766, 129, 745, + 744, 107, 108, 109,-32766, 274,-32766,-32766,-32766,-32766, + -32766,-32766,-32766, 828, 991, -194, 145, 110, 298, 754, + 836, 75,-32766,-32766,-32766, 1351, 142, 326, 1352, -594, + 326, -594, 254, 265, 139, 404, 758, 759, 760, 761, + 82, -272, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, + 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, + 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, + 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, + 819, 820, 821, 822, 584, 779, 780, 585, 586, 830, + 803, 801, 802, 814, 798, 799, 712, 309, 587, 588, + 797, 589, 590, 591, 592, 593, 594, -78, 83, 84, + 85, -85, 800, 595, 596, 311, 149, 775, 746, 747, + 748, 749, 750, 725, 751, 752, 753, 788, 789, 37, + -328, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 323, 274, 482,-32766,-32766, + -32766, -58,-32766,-32766,-32766, 959, 960, 127, 110, -194, + 961, 339, 754,-32766,-32766,-32766, 955, -85, 291,-32766, + 1088,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, + 759, 760, 761, -193,-32766, 824,-32766,-32766,-32766, -367, + 429, -367, 815, 762, 763, 764, 765, 766, 767, 768, + 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, + 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, + 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, + 781, 782, -548, 803, 801, 802, 814, 798, 799, 340, + 327, 790, 796, 797, 804, 805, 807, 806, 808, 809, + 1033, 391, 606, 7,-32766, 800, 811, 810, 50, 51, + 52, 513, 53, 54, 831, 1240, 1239, 1241, 55, 56, + -110, 57, 1036, 920, 1090, -110, 1036, -110, 291, 483, + 745, 744, 305, 382, 381, -110, -110, -110, -110, -110, + -110, -110, -110, 423, 920, 283, -548, -548, 152, 290, + 380, 381, 1245, 715, 467, 468, 58, 59, 370, 21, + 423, -545, 60, 556, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -548, 28, 267, 70, 445, + 514, 1104, 374, -342, 1272, 1273, 515, -193, 835, 154, + 832, -544, 1270, 42, 25, 516, 389, 517, 241, 518, + 920, 519, 298, 1238, 520, 521, 910, 920, 441, 44, + 45, 446, 377, 376,-32766, 46, 522, 1023, 1022, 1021, + 1024, 368, 338, 442, 1278, -545, -545, 910, 1231, 443, + 524, 525, 526, 835, 1245, 835, 1036, 716, 1341, 1236, + -545, 155, 528, 529,-32766, 1259, 1260, 1261, 1262, 1256, + 1257, 297, -551, 943, -545, -544, -544, 1263, 1258, 290, + 1035, 1240, 1239, 1241, 298, 444, 1036, 71, 1266, 841, + -544, 321, 322, 326, -153, -153, -153, 920, 1240, 1239, + 1241, 922, -550, 910, -544, 710, 943, -591,-32766, -153, + 910, -153, 357, -153, -591, -153, 862, 1033, 863, 1089, + 36, 251, 922, 737, 156, 375, 710, 717, 862, -585, + 863, -585, 75, 158, -546, 835, 959, 960, 326, 1036, + -57, 523, 920,-32766,-32766, 362, 896, 955, -110, -110, + -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 745, 744, 656, 26, 835, + -110, -110, 720, 745, 744, -110, 33, 834, 922, 124, + 910, -110, 710, -153, 125, 922, 675, 676, 130, 710, + -32766, 150, 407, 131, 1150, 1152, 48, 144, -546, -546, + 378, 379,-32766, 383, 384, -543, 28, 159, 1238, 920, + 160, 298, 1059, -546, 75,-32766,-32766,-32766, 835,-32766, + 326,-32766, 1270,-32766, -87, 910,-32766, -546, 647, 648, + 161,-32766,-32766,-32766, -4, 920, -84,-32766,-32766, 727, + 162, 287, 163,-32766, 420, -302, -78, -73, -72, -71, + 141, 287,-32766, -70, 326, 976, 745, 744, 1231, 710, + 299, 300, -69, -68, -67, -298, -591, -66, -591, -543, + -543, -65, 528, 529, -46, 1259, 1260, 1261, 1262, 1256, + 1257, -18, 74, 148, -543, 273, 284, 1263, 1258, 126, + -543, 726, 910,-32766, 729, 919, 147, 73, -543, 1238, + 922, 690, 322, 326, 710, 279,-32766,-32766,-32766, 280, + -32766, 285,-32766, 286,-32766, 332, 288,-32766, 910, 289, + 292, 49,-32766,-32766,-32766, 293, 274, 1033,-32766,-32766, + 937, 110, -50, 685,-32766, 420, 146, 691, 826, 701, + 375, 703, 436,-32766, 1353, 20, 561, 296, 645, 1036, + 835, 959, 960, 1119, -543, -543, 523,-32766, 692, 693, + 306, 527, 955, -110, -110, -110, 132, 922, 834, -543, + 464, 710, 283, 662, 657,-32766, 1240, 1239, 1241, 678, + 304, 1238, 283, -543, 10, 301, 302, 493,-32766,-32766, + -32766, 663,-32766, 922,-32766, 679,-32766, 710, -4,-32766, + 373, 40, -508, 956,-32766,-32766,-32766, -275, 731,-32766, + -32766,-32766, 920, 303, 128, 1238,-32766, 420, 310, 0, + 567, 0,-32766,-32766,-32766,-32766,-32766, 0,-32766, 0, + -32766,-32766, 0,-32766, 0, 1277, -498, 0,-32766,-32766, + -32766,-32766, 1279, 0,-32766,-32766, 8, 1238, 24, 372, + -32766, 420, 920, 1267,-32766,-32766,-32766, 610,-32766,-32766, + -32766, 939,-32766, 298, -579,-32766, 846, 41, 734, 488, + -32766,-32766,-32766,-32766, 735, 854,-32766,-32766, 901, 1238, + 574, 1000,-32766, 420, 977, 984,-32766,-32766,-32766, 974, + -32766,-32766,-32766, 985,-32766, 910, 899,-32766, 972, 1093, + 1096, 1097,-32766,-32766,-32766, 1094, 1095, 1101,-32766,-32766, + 1292, -250, -250, -250,-32766, 420, 1310, 375, 1344, 650, + 28, 267, -578,-32766, -577, -551, -550, -549, 959, 960, + -492, 1, 835, 523, 29, 910, 1270, 30, 896, 955, + -110, -110, -110, 39, 43, 47, 72, 76, 77, 78, + 79, -249, -249, -249, 80, 81, 143, 375, 153, 157, + 897, 247, 328, 357, 358, 359, 360, 361, 959, 960, + 922, 362, 1231, 523, 710, -250, 363, 364, 896, 955, + -110, -110, -110, 365, 366, 367, 369, 529, 28, 1259, + 1260, 1261, 1262, 1256, 1257, 437, 555, 1348, -273, -272, + 835, 1263, 1258, 13, 1270, 14,-32766, 15, 16, 18, + 922, 73, 1238, 1350, 710, -249, 322, 326, 406,-32766, + -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, + -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, + 1231,-32766,-32766, 572, 696, 1249, 1190,-32766, 420, 1268, + 1062, 1061, 1042, 1226, 1038, 529,-32766, 1259, 1260, 1261, + 1262, 1256, 1257, -277, -102, 12, 17, 27, 295, 1263, + 1258, 405, 603, 607, 636, 702, 1194, 1244, 1191, 73, + 34, 1323, 0, 320, 322, 326, 371, 711, 714, 718, + 719, 721, 722, 723, 724, 0, 728, 713, 0, 857, + 856, 865, 949, 992, 864, 1349, 948, 946, 947, 950, + 1222, 930, 940, 928, 982, 983, 634, 1347, 1304, 1293, + 1311, 1320, 0, 1207, 0, 1271, 0, 326 ); - protected $actionCheck = array( + protected array $actionCheck = array( 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, - 12, 13, 70, 9, 10, 11, 9, 10, 11, 44, + 12, 13, 9, 10, 11, 14, 9, 10, 11, 44, 45, 46, 47, 48, 49, 50, 51, 52, 116, 117, 118, 119, 120, 121, 122, 37, 38, 30, 116, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 8, 53, 54, 55, 57, 57, 106, 107, 137, - 9, 10, 11, 50, 51, 52, 1, 116, 69, 71, - 72, 73, 74, 75, 76, 77, 134, 135, 80, 1, - 30, 30, 30, 32, 33, 87, 88, 89, 90, 91, + 43, 1, 1, 9, 1, 57, 9, 10, 11, 137, + 1, 9, 10, 11, 50, 51, 52, 8, 1, 71, + 72, 73, 74, 75, 76, 77, 31, 30, 80, 32, + 33, 31, 30, 14, 1, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 80, 70, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 8, 1, 106, 80, 108, 150, 151, - 152, 8, 154, 9, 10, 11, 2, 3, 4, 5, - 6, 7, 164, 9, 10, 11, 12, 13, 116, 119, - 120, 121, 122, 106, 30, 108, 32, 33, 34, 35, - 36, 37, 38, 9, 10, 11, 106, 107, 138, 137, - 138, 37, 38, 9, 10, 11, 116, 134, 135, 1, - 9, 10, 11, 137, 30, 14, 8, 155, 156, 157, - 1, 57, 149, 163, 30, 163, 32, 33, 34, 35, - 36, 155, 156, 157, 161, 71, 72, 73, 74, 75, - 76, 77, 8, 31, 80, 129, 130, 131, 158, 161, - 8, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 8, 80, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 164, - 9, 10, 11, 160, 150, 151, 152, 164, 154, 2, - 3, 4, 5, 6, 7, 80, 9, 10, 11, 12, - 13, 30, 8, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 30, 57, 1, - 8, 116, 117, 118, 119, 120, 121, 122, 160, 106, - 69, 108, 164, 161, 57, 9, 10, 11, 9, 10, - 161, 1, 1, 37, 38, 1, 167, 31, 71, 72, - 73, 74, 75, 76, 77, 8, 30, 80, 32, 33, - 34, 35, 14, 85, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 8, 122, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 8, 51, 146, 138, 82, 150, 151, 152, - 2, 3, 4, 5, 6, 7, 106, 97, 108, 1, - 12, 13, 101, 15, 9, 10, 11, 106, 80, 108, - 163, 1, 80, 163, 113, 83, 8, 116, 117, 118, - 119, 120, 121, 122, 123, 30, 8, 32, 33, 34, - 8, 117, 118, 80, 31, 159, 122, 159, 50, 51, - 8, 80, 128, 70, 56, 155, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 1, 70, 71, - 72, 73, 74, 162, 9, 161, 78, 79, 80, 1, - 82, 167, 164, 1, 86, 87, 88, 89, 122, 91, - 101, 93, 84, 95, 156, 8, 98, 99, 8, 161, - 138, 103, 104, 105, 106, 107, 8, 109, 110, 31, - 97, 8, 123, 115, 116, 70, 8, 134, 135, 156, - 122, 8, 124, 125, 126, 163, 155, 156, 157, 163, - 116, 8, 149, 162, 136, 137, 8, 139, 140, 141, - 142, 143, 144, 145, 161, 14, 163, 160, 82, 151, - 152, 164, 138, 155, 156, 157, 158, 75, 76, 77, - 14, 163, 84, 165, 166, 167, 84, 159, 116, 161, - 82, 14, 90, 85, 92, 14, 94, 163, 96, 134, - 135, 161, 116, 159, 1, 161, 14, 167, 106, 14, - 138, 8, 164, 16, 149, 31, 164, 37, 38, 117, - 118, 75, 76, 137, 122, 31, 161, 14, 163, 127, - 128, 129, 130, 131, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 16, 163, - 70, 75, 76, 167, 16, 147, 148, 159, 16, 161, - 16, 159, 82, 161, 162, 16, 86, 16, 74, 70, - 16, 70, 101, 102, 80, 106, 107, 59, 60, 106, - 107, 87, 88, 89, 31, 91, 1, 93, 70, 95, - 111, 112, 98, 16, 16, 16, 116, 103, 104, 105, - 16, 31, 122, 109, 110, 37, 38, 16, 35, 115, - 116, 31, 0, 1, 31, 30, 136, 137, 124, 139, - 140, 141, 142, 143, 144, 31, 31, 31, 31, 31, - 31, 151, 152, 134, 135, 134, 135, 37, 38, 31, - 31, 31, 74, 163, 31, 1, 166, 167, 80, 31, - 149, 31, 134, 135, 31, 87, 88, 89, 31, 91, - 161, 93, 161, 95, 31, 31, 98, 149, 37, 37, - 35, 103, 104, 105, 74, 31, 35, 109, 110, 161, - 80, 35, 35, 115, 116, 70, 35, 87, 88, 89, - 35, 91, 124, 93, 37, 95, 84, 37, 98, 38, - 57, 116, 1, 103, 104, 105, 69, 77, 31, 109, - 110, 82, 70, 85, 89, 115, 116, 96, 106, 80, - 108, 83, 154, 138, 124, 113, 90, 82, 84, 117, - 118, 114, 31, 80, 122, 85, 132, 97, 132, 127, - 128, 129, 130, 131, 92, 97, 97, 128, 163, 134, - 135, 74, 70, 94, 1, 133, 100, 80, 100, 154, - 146, 137, 150, 160, 87, 88, 89, 113, 91, 1, - 93, 159, 95, 161, 162, 98, 161, 161, 1, 153, - 103, 104, 105, 74, -1, 84, 109, 110, -1, 80, - 1, -1, 115, 116, -1, -1, 87, 88, 89, 31, - 91, 124, 93, 159, 95, 161, 138, 98, 31, 146, - -1, 102, 103, 104, 105, 74, 134, 135, 109, 110, - 149, 80, 81, 149, 115, 116, 153, 149, 87, 88, - 89, 149, 91, 124, 93, 149, 95, 84, 149, 98, - 155, 158, 161, 161, 103, 104, 105, 159, 161, 159, - 109, 110, 84, 100, 101, 102, 115, 116, 159, 106, - 159, 84, 161, 159, 159, 124, 159, 159, 162, 159, - 117, 118, 159, 84, 159, 122, 159, 159, 159, 159, - 127, 128, 129, 130, 131, 70, 159, 159, 159, 100, - 101, 102, 1, 159, 161, 106, 160, 82, 160, 160, - 160, 86, 160, 166, 161, 161, 117, 118, 161, 1, - 161, 122, 159, 161, 161, 162, 127, 128, 129, 130, - 131, 161, 31, 161, 161, 161, 165, 159, 162, 161, - 163, 116, 162, 162, 162, 162, 159, 122, 161, 163, - 162, 162, 162, 162, 162, 162, 162, 162, 159, 162, - 161, 162, 137, 162, 139, 140, 141, 142, 143, 144, - 162, 162, 162, 162, 162, 162, 151, 152, 162, 162, - 74, 162, 162, 82, 162, 164, 80, 163, 163, 163, - 163, 166, 167, 87, 88, 89, 163, 91, 163, 93, - 82, 95, 163, 163, 98, 163, 163, 163, 163, 103, - 104, 105, 163, 163, 163, 109, 110, 116, 117, 118, - 163, 115, 116, 122, 163, 163, 163, 163, 163, 128, - 124, 163, 163, 163, 116, 117, 118, 163, 137, 163, - 122, 163, 163, 163, 163, 163, 128, 163, 163, 163, - 163, 163, 163, -1, 164, 137, 164, 164, 164, 158, - 164, 164, 164, 164, 163, 165, 164, 164, 167, 164, - -1, 164, 164, 164, 164, 164, 158, 164, 164, 164, - 164, 163, -1, 164, 164, 167, 164, 164, 164, 164, + 122, 123, 124, 125, 126, 116, 128, 129, 130, 131, + 132, 133, 82, 80, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 80, 129, 130, 131, 138, 150, 151, + 152, 1, 154, 8, 2, 3, 4, 5, 6, 7, + 162, 9, 10, 11, 12, 13, 8, 117, 118, 1, + 161, 8, 122, 9, 10, 11, 8, 8, 128, 116, + 117, 118, 119, 120, 121, 122, 51, 137, 8, 37, + 38, 53, 54, 55, 30, 57, 32, 33, 34, 35, + 36, 37, 38, 80, 159, 8, 8, 69, 158, 57, + 159, 161, 9, 10, 11, 80, 163, 167, 83, 160, + 167, 162, 8, 71, 72, 73, 74, 75, 76, 77, + 163, 162, 80, 30, 167, 32, 33, 34, 35, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 156, + 128, 129, 130, 131, 132, 133, 163, 8, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 16, 9, 10, + 11, 31, 150, 151, 152, 8, 154, 2, 3, 4, + 5, 6, 7, 163, 9, 10, 11, 12, 13, 30, + 162, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 8, 57, 31, 9, 10, + 11, 16, 9, 10, 11, 117, 118, 14, 69, 162, + 122, 8, 57, 9, 10, 11, 128, 97, 30, 30, + 1, 32, 33, 34, 35, 36, 71, 72, 73, 74, + 75, 76, 77, 8, 30, 80, 32, 33, 34, 106, + 80, 108, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 70, 128, 129, 130, 131, 132, 133, 8, + 70, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 116, 106, 1, 108, 116, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 80, 155, 156, 157, 12, 13, + 101, 15, 138, 1, 164, 106, 138, 108, 30, 163, + 37, 38, 113, 106, 107, 116, 117, 118, 119, 120, + 121, 122, 123, 116, 1, 161, 134, 135, 14, 161, + 106, 107, 1, 31, 134, 135, 50, 51, 8, 101, + 116, 70, 56, 85, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 163, 70, 71, 72, 73, + 74, 123, 8, 164, 78, 79, 80, 162, 82, 14, + 156, 70, 86, 87, 88, 89, 8, 91, 97, 93, + 1, 95, 158, 80, 98, 99, 84, 1, 8, 103, + 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, + 122, 115, 116, 8, 146, 134, 135, 84, 122, 8, + 124, 125, 126, 82, 1, 82, 138, 31, 85, 116, + 149, 14, 136, 137, 116, 139, 140, 141, 142, 143, + 144, 145, 161, 122, 163, 134, 135, 151, 152, 161, + 137, 155, 156, 157, 158, 8, 138, 161, 1, 8, + 149, 165, 166, 167, 75, 76, 77, 1, 155, 156, + 157, 159, 161, 84, 163, 163, 122, 1, 137, 90, + 84, 92, 161, 94, 8, 96, 106, 116, 108, 159, + 147, 148, 159, 163, 14, 106, 163, 31, 106, 160, + 108, 162, 161, 14, 70, 82, 117, 118, 167, 138, + 16, 122, 1, 9, 10, 161, 127, 128, 129, 130, + 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 37, 38, 75, 76, 82, + 117, 118, 31, 37, 38, 122, 14, 155, 159, 16, + 84, 128, 163, 164, 16, 159, 75, 76, 16, 163, + 137, 101, 102, 16, 59, 60, 70, 16, 134, 135, + 106, 107, 74, 106, 107, 70, 70, 16, 80, 1, + 16, 158, 1, 149, 161, 87, 88, 89, 82, 91, + 167, 93, 86, 95, 31, 84, 98, 163, 111, 112, + 16, 103, 104, 105, 0, 1, 31, 109, 110, 31, + 16, 30, 16, 115, 116, 35, 31, 31, 31, 31, + 163, 30, 124, 31, 167, 159, 37, 38, 122, 163, + 134, 135, 31, 31, 31, 35, 160, 31, 162, 134, + 135, 31, 136, 137, 31, 139, 140, 141, 142, 143, + 144, 31, 154, 31, 149, 31, 31, 151, 152, 163, + 70, 31, 84, 74, 31, 31, 31, 161, 163, 80, + 159, 80, 166, 167, 163, 35, 87, 88, 89, 35, + 91, 35, 93, 35, 95, 35, 37, 98, 84, 37, + 37, 70, 103, 104, 105, 37, 57, 116, 109, 110, + 38, 69, 31, 77, 115, 116, 70, 116, 80, 80, + 106, 92, 108, 124, 83, 97, 89, 113, 113, 138, + 82, 117, 118, 82, 134, 135, 122, 85, 137, 138, + 114, 127, 128, 129, 130, 131, 31, 159, 155, 149, + 97, 163, 161, 96, 90, 74, 155, 156, 157, 94, + 133, 80, 161, 163, 150, 134, 135, 97, 87, 88, + 89, 100, 91, 159, 93, 100, 95, 163, 164, 98, + 149, 159, 149, 128, 103, 104, 105, 162, 164, 74, + 109, 110, 1, 132, 163, 80, 115, 116, 132, -1, + 153, -1, 87, 88, 89, 124, 91, -1, 93, -1, + 95, 137, -1, 98, -1, 146, 149, -1, 103, 104, + 105, 74, 146, -1, 109, 110, 149, 80, 149, 149, + 115, 116, 1, 160, 87, 88, 89, 153, 91, 124, + 93, 154, 95, 158, 161, 98, 160, 159, 159, 102, + 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, + 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, + 91, 124, 93, 159, 95, 84, 159, 98, 159, 159, + 159, 159, 103, 104, 105, 159, 159, 159, 109, 110, + 160, 100, 101, 102, 115, 116, 160, 106, 160, 160, + 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, + 161, 161, 82, 122, 161, 84, 86, 161, 127, 128, + 129, 130, 131, 161, 161, 161, 161, 161, 161, 161, + 161, 100, 101, 102, 161, 161, 161, 106, 161, 161, + 164, 161, 161, 161, 161, 161, 161, 161, 117, 118, + 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, + 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, + 140, 141, 142, 143, 144, 161, 161, 164, 162, 162, + 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, + 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, + 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, + 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, + 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, + 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, + 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, + 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, + 163, 162, -1, 163, 166, 167, 163, 163, 163, 163, + 163, 163, 163, 163, 163, -1, 163, 163, -1, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, - 164, 164, 164, 164, 164, 164, 164, -1, -1, -1, - 167 + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, -1, 165, -1, 166, -1, 167 ); - protected $actionBase = array( - 0, -2, 154, 542, 752, 893, 929, 52, 374, 431, - 398, 869, 793, 235, 307, 307, 793, 307, 784, 908, - 908, 917, 908, 538, 841, 468, 468, 468, 708, 708, - 708, 708, 740, 740, 849, 849, 881, 817, 634, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, 1036, - 1036, 1036, 1036, 1036, 348, 346, 370, 653, 1063, 1069, - 1065, 1070, 1061, 1060, 1064, 1066, 1071, 946, 947, 774, - 949, 950, 943, 952, 1067, 882, 1062, 1068, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 525, 191, 359, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 174, 174, - 174, 620, 620, 51, 465, 356, 955, 955, 955, 955, - 955, 955, 955, 955, 955, 955, 658, 184, 144, 144, - 7, 7, 7, 7, 7, 1031, 371, 1048, -25, -25, - -25, -25, 50, 725, 526, 449, 39, 317, 80, 474, - 474, 13, 13, 512, 512, 422, 422, 512, 512, 512, - 808, 808, 808, 808, 443, 505, 360, 308, -78, 209, - 209, 209, 209, -78, -78, -78, -78, 803, 877, -78, - -78, -78, 63, 641, 641, 822, -1, -1, -1, 641, - 253, 790, 548, 253, 384, 548, 480, 402, 764, 759, - -49, 447, 764, 639, 755, 198, 143, 825, 609, 825, - 1059, 320, 768, 426, 749, 720, 874, 904, 1072, 796, - 941, 798, 942, 106, -58, 710, 1058, 1058, 1058, 1058, - 1058, 1058, 1058, 1058, 1058, 1058, 1058, 1073, 336, 1059, - 423, 1073, 1073, 1073, 336, 336, 336, 336, 336, 336, - 336, 336, 336, 336, 619, 423, 586, 616, 423, 795, - 336, 348, 814, 348, 348, 348, 348, 348, 348, 348, - 348, 348, 348, 750, 202, 348, 346, 78, 78, 484, - 65, 78, 78, 78, 78, 348, 348, 348, 348, 609, - 783, 766, 613, 813, 492, 783, 783, 783, 473, 135, - 378, 488, 713, 775, 67, 779, 779, 785, 969, 969, - 779, 769, 779, 785, 975, 779, 779, 969, 969, 823, - 280, 563, 478, 550, 568, 969, 377, 779, 779, 779, - 779, 746, 573, 779, 342, 314, 779, 779, 746, 744, - 760, 43, 762, 969, 969, 969, 746, 547, 762, 762, - 762, 839, 844, 794, 758, 444, 433, 588, 232, 801, - 758, 758, 779, 558, 794, 758, 794, 758, 745, 758, - 758, 758, 794, 758, 769, 502, 758, 717, 583, 224, - 758, 6, 979, 980, 624, 981, 973, 987, 1019, 991, - 992, 873, 965, 999, 974, 993, 972, 970, 773, 682, - 684, 818, 811, 963, 777, 777, 777, 956, 777, 777, - 777, 777, 777, 777, 777, 777, 682, 743, 829, 765, - 1006, 689, 691, 754, 906, 901, 1030, 1004, 1049, 994, - 828, 694, 1028, 1008, 846, 821, 1009, 1010, 1029, 1050, - 1052, 910, 782, 911, 912, 876, 1012, 883, 777, 979, - 992, 693, 974, 993, 972, 970, 748, 739, 737, 738, - 736, 735, 723, 734, 753, 1053, 954, 907, 878, 1011, - 957, 682, 879, 1023, 756, 1032, 1033, 827, 788, 778, - 880, 913, 1014, 1015, 1016, 884, 1054, 887, 830, 1024, - 951, 1035, 789, 918, 1037, 1038, 1039, 1040, 889, 919, - 892, 916, 900, 845, 776, 1020, 761, 920, 591, 787, - 791, 800, 1018, 606, 1000, 902, 921, 922, 1041, 1043, - 1044, 923, 924, 995, 847, 1026, 799, 1027, 1022, 848, - 850, 617, 797, 1055, 781, 786, 772, 621, 632, 925, - 927, 931, 998, 763, 770, 853, 855, 1056, 771, 1057, - 938, 635, 857, 718, 939, 1046, 719, 724, 637, 678, - 672, 731, 792, 903, 826, 757, 780, 1017, 724, 767, - 858, 940, 859, 860, 867, 1045, 868, 0, 0, 0, + protected array $actionBase = array( + 0, -2, 152, 549, 764, 941, 981, 751, 617, 310, + 123, 877, 556, 671, 671, 738, 671, 472, 626, 789, + 63, 305, 305, 789, 305, 493, 493, 493, 658, 658, + 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 51, 45, 451, 692, 1036, 1044, + 1040, 1045, 1034, 1033, 1039, 1041, 1046, 1083, 1084, 795, + 1085, 1086, 1082, 1087, 1042, 889, 1035, 1043, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 44, 343, 664, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 52, 52, + 52, 666, 666, 47, 354, 980, 203, 1048, 1048, 1048, + 1048, 1048, 1048, 1048, 1048, 1048, 665, 339, 164, 164, + 7, 7, 7, 7, 7, 50, 369, 583, -25, -25, + -25, -25, 448, 741, 501, 408, 283, 338, 394, 334, + 334, 14, 14, 531, 531, 9, 9, 531, 531, 531, + 478, 478, 478, 478, 441, 471, 552, 428, 824, 53, + 53, 53, 53, 824, 824, 824, 824, 826, 1089, 824, + 824, 824, 594, 750, 750, 781, 138, 138, 138, 750, + 540, 503, 503, 540, 238, 503, 67, 135, -78, 805, + 377, 499, -78, 362, 656, 636, 59, 743, 624, 743, + 1032, 481, 802, 802, 514, 773, 746, 878, 1064, 1049, + 821, 1080, 825, 1081, 15, 370, 745, 1031, 1031, 1031, + 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1090, 443, + 1032, 384, 1090, 1090, 1090, 443, 443, 443, 443, 443, + 443, 443, 443, 443, 443, 647, 384, 622, 641, 384, + 810, 443, 51, 817, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 780, 316, 51, 45, 150, 150, + 490, 83, 150, 150, 150, 150, 51, 51, 51, 51, + 624, 799, 797, 627, 834, 375, 799, 799, 799, 270, + 158, 69, 197, 740, 760, 345, 788, 788, 801, 900, + 900, 788, 798, 788, 801, 914, 788, 788, 900, 900, + 835, 180, 550, 353, 524, 565, 900, 279, 788, 788, + 788, 788, 816, 571, 788, 214, 198, 788, 788, 816, + 811, 785, 145, 777, 900, 900, 900, 816, 500, 777, + 777, 777, 839, 845, 765, 784, 337, 297, 611, 169, + 822, 784, 784, 788, 538, 765, 784, 765, 784, 837, + 784, 784, 784, 765, 784, 798, 431, 784, 721, 607, + 163, 784, 6, 915, 916, 723, 917, 912, 918, 964, + 919, 923, 1054, 899, 930, 913, 924, 965, 906, 903, + 794, 693, 698, 827, 783, 896, 792, 792, 792, 894, + 792, 792, 792, 792, 792, 792, 792, 792, 693, 823, + 830, 787, 933, 702, 707, 1011, 819, 926, 1088, 932, + 1013, 925, 772, 711, 977, 934, 774, 1050, 935, 936, + 986, 1014, 846, 1017, 963, 796, 979, 1065, 836, 945, + 1055, 792, 915, 923, 735, 913, 924, 906, 903, 770, + 766, 762, 763, 761, 752, 747, 748, 782, 1018, 893, + 833, 880, 940, 895, 693, 886, 971, 1047, 990, 992, + 1053, 803, 791, 888, 1066, 946, 952, 953, 1056, 1019, + 1057, 838, 973, 775, 994, 820, 1067, 996, 997, 999, + 1000, 1058, 1068, 1059, 891, 1060, 849, 814, 966, 807, + 1069, 1, 806, 808, 818, 955, 484, 931, 1061, 1070, + 1071, 1001, 1002, 1006, 1072, 1073, 927, 852, 975, 815, + 976, 967, 855, 856, 525, 813, 1020, 800, 804, 812, + 577, 640, 1074, 1075, 1076, 928, 790, 786, 860, 864, + 1021, 809, 1022, 1077, 649, 867, 724, 1078, 1012, 744, + 754, 281, 654, 335, 756, 779, 1063, 829, 776, 778, + 954, 754, 793, 869, 1079, 870, 871, 872, 1007, 876, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 458, 458, 458, - 458, 458, 458, 307, 307, 307, 307, 307, 307, 307, - 0, 0, 307, 0, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, + 305, 456, 456, 456, 456, 456, 456, 456, 305, 305, + 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 291, 291, 291, - 291, 291, 291, 291, 291, 291, 291, 66, 66, 291, - 291, 291, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 0, 291, 291, 291, 291, 291, 291, 291, - 291, 66, 823, 66, -1, -1, -1, -1, 66, 66, - 66, -88, -88, 66, 384, 66, 66, -1, -1, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 0, 0, 423, 548, 66, 769, 769, 769, 769, 66, - 66, 66, 66, 548, 548, 66, 66, 66, 0, 0, - 0, 0, 0, 0, 0, 0, 423, 548, 0, 423, - 0, 0, 769, 769, 66, 384, 823, 643, 66, 0, - 0, 0, 0, 423, 769, 423, 336, 779, 548, 779, - 336, 336, 78, 348, 643, 611, 611, 611, 611, 0, - 0, 609, 823, 823, 823, 823, 823, 823, 823, 823, - 823, 823, 823, 769, 0, 823, 0, 769, 769, 769, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 769, 0, 0, 969, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 975, - 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 777, 788, 0, 788, - 0, 777, 777, 777, 0, 0, 0, 0, 797, 771 + 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 473, 473, 289, 289, 473, 289, 473, 473, 473, 473, + 473, 473, 473, 473, 473, 0, 289, 289, 289, 289, + 289, 289, 289, 289, 473, 835, 473, 138, 138, 138, + 138, 473, 473, 473, -88, -88, 473, 238, 473, 473, + 138, 138, 473, 473, 473, 473, 473, 473, 473, 473, + 473, 473, 473, 0, 0, 384, 503, 473, 798, 798, + 798, 798, 473, 473, 473, 473, 503, 503, 473, 473, + 473, 0, 0, 0, 0, 0, 0, 0, 0, 384, + 0, 0, 384, 0, 0, 798, 798, 473, 238, 835, + 168, 473, 0, 0, 0, 0, 384, 798, 384, 443, + 788, 503, 503, 788, 443, 443, 150, 51, 168, 620, + 620, 620, 620, 0, 0, 624, 835, 835, 835, 835, + 835, 835, 835, 835, 835, 835, 835, 798, 0, 835, + 0, 798, 798, 798, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 798, + 0, 0, 900, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 914, 0, 0, 0, 0, 0, 0, + 798, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 792, 803, 0, 803, 0, 792, 792, 792, 0, 0, + 0, 0, 813, 809 ); - protected $actionDefault = array( - 3,32767, 103,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 101,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 596, 596, - 596, 596,32767,32767, 254, 103,32767,32767, 469, 387, - 387, 387,32767,32767, 540, 540, 540, 540, 540, 540, - 32767,32767,32767,32767,32767,32767, 469,32767,32767,32767, + protected array $actionDefault = array( + 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 100,32767,32767,32767,32767, 597, 597, + 597, 597,32767,32767, 254, 102,32767,32767, 470, 387, + 387, 387,32767,32767, 541, 541, 541, 541, 541, 541, + 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 101, - 32767,32767,32767, 37, 7, 8, 10, 11, 50, 17, - 324,32767,32767,32767,32767, 103,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, + 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 589,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 590,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 473, 452, - 453, 455, 456, 386, 541, 595, 327, 592, 385, 146, - 339, 329, 242, 330, 258, 474, 259, 475, 478, 479, - 215, 287, 382, 150, 151, 416, 470, 418, 468, 472, - 417, 392, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 390, 391, 471, 449, 448, - 447,32767,32767, 414, 415, 419,32767,32767,32767,32767, - 32767,32767,32767,32767, 103,32767, 389, 422, 420, 421, - 438, 439, 436, 437, 440,32767,32767,32767, 441, 442, - 443, 444, 316,32767,32767, 366, 364, 316, 112,32767, - 32767, 429, 430,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 534, 446,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 103, - 32767, 101, 536, 411, 413, 503, 424, 425, 423, 393, - 32767, 510,32767, 103,32767, 512,32767,32767,32767,32767, - 32767,32767,32767, 535,32767, 542, 542,32767, 496, 101, - 195,32767,32767,32767, 195, 195,32767,32767,32767,32767, - 32767,32767,32767,32767, 603, 496, 111, 111, 111, 111, - 111, 111, 111, 111, 111, 111, 111,32767, 195, 111, - 32767,32767,32767, 101, 195, 195, 195, 195, 195, 195, - 195, 195, 195, 195, 190,32767, 268, 270, 103, 557, - 195,32767, 515,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 508,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767,32767, 496, - 434, 139,32767, 139, 542, 426, 427, 428, 498, 542, - 542, 542, 312, 289,32767,32767,32767,32767, 513, 513, - 101, 101, 101, 101, 508,32767,32767,32767,32767, 112, - 100, 100, 100, 100, 100, 104, 102,32767,32767,32767, - 32767, 223, 100,32767, 102, 102,32767,32767, 223, 225, - 212, 102, 227,32767, 561, 562, 223, 102, 227, 227, - 227, 247, 247, 485, 318, 102, 100, 102, 102, 197, - 318, 318,32767, 102, 485, 318, 485, 318, 199, 318, - 318, 318, 485, 318,32767, 102, 318, 214, 100, 100, - 318,32767,32767,32767, 498,32767,32767,32767,32767,32767, - 32767,32767, 222,32767,32767,32767,32767,32767,32767,32767, - 529,32767, 546, 559, 432, 433, 435, 544, 457, 458, - 459, 460, 461, 462, 463, 465, 591,32767, 502,32767, - 32767,32767, 338, 601,32767, 601,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, + 454, 456, 457, 386, 542, 596, 327, 593, 385, 145, + 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, + 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, + 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 408, 409, 410, 390, 391, 472, 450, 449, + 448,32767,32767, 415, 416,32767, 420,32767,32767,32767, + 32767,32767,32767,32767, 102,32767, 389, 423, 421, 422, + 439, 440, 437, 438, 441,32767,32767,32767, 442, 443, + 444, 445, 316,32767,32767, 366, 364, 316, 111,32767, + 32767, 430, 431,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 535, 447,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 102, + 32767, 100, 537, 412, 414, 504, 425, 426, 424, 393, + 32767, 511,32767, 102,32767, 513,32767,32767,32767,32767, + 32767,32767,32767, 536,32767, 543, 543,32767, 497, 100, + 195,32767,32767, 512,32767, 195, 195,32767,32767,32767, + 32767,32767,32767,32767,32767, 604, 497, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, + 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 190,32767, 268, 270, 102, + 558, 195,32767, 516,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 509,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 602,32767, 542,32767,32767,32767,32767, 431, 9, - 76, 491, 43, 44, 52, 58, 519, 520, 521, 522, - 516, 517, 523, 518,32767,32767, 524, 567,32767,32767, - 543, 594,32767,32767,32767,32767,32767,32767, 139,32767, + 497, 435, 138,32767, 138, 543, 427, 428, 429, 499, + 543, 543, 543, 312, 289,32767,32767,32767,32767, 514, + 514, 100, 100, 100, 100, 509,32767,32767,32767,32767, + 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, + 32767,32767, 223, 99,32767, 101, 101,32767,32767, 223, + 225, 212, 101, 227,32767, 562, 563, 223, 101, 227, + 227, 227, 247, 247, 486, 318, 101, 99, 101, 101, + 197, 318, 318,32767, 101, 486, 318, 486, 318, 199, + 318, 318, 318, 486, 318,32767, 101, 318, 214, 99, + 99, 318,32767,32767,32767, 499,32767,32767,32767,32767, + 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767, + 32767,32767, 530,32767, 547, 560, 433, 434, 436, 545, + 458, 459, 460, 461, 462, 463, 464, 466, 592,32767, + 503,32767,32767,32767, 338,32767, 602,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 529,32767, 137,32767,32767,32767,32767,32767,32767,32767, - 32767, 525,32767,32767,32767, 542,32767,32767,32767,32767, - 314, 311,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 542,32767, - 32767,32767,32767,32767, 291,32767, 308,32767,32767,32767, + 32767,32767,32767,32767, 603,32767, 543,32767,32767,32767, + 32767, 432, 9, 74, 492, 42, 43, 51, 57, 520, + 521, 522, 523, 517, 518, 524, 519,32767,32767, 525, + 568,32767,32767, 544, 595,32767,32767,32767,32767,32767, + 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 530,32767, 136,32767,32767,32767,32767, + 32767,32767,32767,32767, 526,32767,32767,32767, 543,32767, + 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767, 286,32767,32767, 381, 498, 294, 296, - 297,32767,32767,32767,32767, 360,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767,32767, 153, 153, 3, - 3, 341, 153, 153, 153, 341, 341, 153, 341, 341, - 341, 153, 153, 153, 153, 153, 153, 280, 185, 262, - 265, 247, 247, 153, 352, 153 + 32767, 543,32767,32767,32767,32767,32767, 291,32767, 308, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, + 499, 294, 296, 297,32767,32767,32767,32767, 360,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, + 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, + 280, 185, 262, 265, 247, 247, 152, 352, 152 ); - protected $goto = array( - 196, 196, 1031, 703, 694, 430, 658, 1062, 1334, 1334, - 424, 313, 314, 335, 573, 319, 429, 336, 431, 635, - 651, 652, 850, 669, 670, 671, 1334, 167, 167, 167, + protected array $goto = array( + 196, 196, 1034, 1065, 697, 431, 661, 621, 658, 319, + 706, 425, 313, 314, 335, 576, 430, 336, 432, 638, + 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, - 189, 190, 191, 192, 218, 216, 219, 534, 535, 420, - 536, 538, 539, 540, 541, 542, 543, 544, 545, 1132, + 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, + 538, 540, 541, 542, 543, 544, 545, 546, 547, 1136, 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, - 176, 178, 215, 217, 220, 238, 243, 244, 245, 257, + 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, - 271, 281, 282, 316, 317, 318, 425, 426, 427, 578, + 271, 281, 282, 316, 317, 318, 426, 427, 428, 581, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, - 200, 239, 188, 189, 190, 191, 192, 218, 1132, 201, + 200, 239, 188, 189, 190, 191, 192, 218, 1136, 201, 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, - 212, 213, 214, 853, 851, 278, 278, 278, 278, 418, - 620, 620, 350, 570, 597, 1265, 1265, 1265, 1265, 1265, - 1265, 1265, 1265, 1265, 1265, 1283, 1283, 831, 618, 655, - 1283, 1283, 1283, 1283, 1283, 1283, 1283, 1283, 1283, 1283, - 353, 353, 353, 353, 866, 557, 550, 858, 825, 907, - 902, 903, 916, 859, 904, 856, 905, 906, 857, 878, - 457, 910, 865, 884, 546, 546, 546, 546, 831, 601, - 831, 1084, 1079, 1080, 1081, 341, 550, 557, 566, 567, - 343, 576, 599, 613, 614, 407, 408, 972, 465, 465, - 667, 15, 668, 1323, 411, 412, 413, 465, 681, 348, - 1233, 414, 1233, 478, 569, 346, 439, 1031, 1031, 1233, - 993, 480, 1031, 393, 1031, 1031, 1104, 1105, 1031, 1031, - 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1315, - 1315, 1315, 1315, 1233, 657, 1333, 1333, 1055, 1233, 1233, - 1233, 1233, 1037, 1036, 1233, 1233, 1233, 1034, 1034, 1181, - 354, 678, 949, 1333, 437, 1026, 1042, 1043, 337, 691, - 354, 354, 827, 923, 691, 1040, 1041, 924, 691, 663, - 1336, 939, 871, 939, 354, 354, 1281, 1281, 354, 679, - 1350, 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281, 1281, - 1281, 552, 537, 537, 911, 354, 912, 537, 537, 537, - 537, 537, 537, 537, 537, 537, 537, 548, 564, 548, - 574, 611, 730, 634, 636, 849, 548, 656, 475, 1308, - 1309, 680, 684, 1007, 692, 701, 1003, 252, 252, 996, - 970, 970, 968, 970, 729, 843, 549, 1005, 1000, 423, - 455, 608, 1294, 846, 955, 966, 966, 966, 966, 325, - 308, 455, 960, 967, 249, 249, 249, 249, 251, 253, - 402, 351, 352, 683, 868, 551, 561, 449, 449, 449, - 551, 1305, 561, 1305, 612, 396, 461, 1010, 1010, 1224, - 1305, 395, 398, 558, 598, 602, 1015, 468, 577, 469, - 470, 1310, 1311, 876, 552, 846, 1341, 1342, 964, 409, - 702, 733, 324, 275, 324, 1317, 1317, 1317, 1317, 606, - 621, 624, 625, 626, 627, 648, 649, 650, 705, 1068, - 596, 1097, 874, 706, 476, 1228, 507, 697, 880, 1095, - 1115, 432, 1301, 628, 630, 632, 432, 879, 867, 1067, - 1071, 5, 1072, 6, 1038, 1038, 977, 0, 975, 662, - 1049, 1045, 1046, 0, 0, 0, 0, 1226, 449, 449, - 449, 449, 449, 449, 449, 449, 449, 449, 449, 928, - 1120, 449, 965, 1070, 0, 0, 616, 1303, 1303, 1070, - 1229, 1230, 1012, 499, 0, 500, 0, 0, 841, 0, - 870, 506, 661, 991, 1113, 883, 1212, 941, 864, 0, - 1213, 1216, 942, 1217, 0, 0, 1231, 1291, 1292, 0, - 1223, 0, 0, 0, 846, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 255, 255 + 212, 213, 214, 855, 466, 466, 278, 278, 278, 278, + 623, 623, 351, 466, 1269, 600, 1269, 1269, 1269, 1269, + 1269, 1269, 1269, 1269, 1269, 1287, 1287, 599, 1100, 1287, + 709, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, + 508, 700, 458, 1098, 975, 559, 552, 860, 419, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 848, + 827, 912, 354, 354, 354, 354, 396, 399, 560, 601, + 605, 1087, 1082, 1083, 1084, 341, 552, 559, 568, 569, + 344, 579, 602, 616, 617, 408, 409, 1232, 440, 479, + 670, 22, 671, 886, 412, 413, 414, 481, 684, 349, + 1237, 415, 1237, 1107, 1108, 347, 833, 1034, 1034, 1237, + 573, 848, 1034, 1327, 1034, 1034, 1040, 1039, 1034, 1034, + 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1034, 1319, + 1319, 1319, 1319, 1237, 893, 851, 893, 893, 1237, 1237, + 1237, 1237, 1233, 1234, 1237, 1237, 1237, 833, 355, 833, + 843, 996, 252, 252, 1043, 1044, 1037, 1037, 355, 355, + 681, 952, 394, 926, 1029, 1045, 1046, 927, 1235, 1295, + 1296, 942, 355, 355, 942, 913, 355, 914, 1354, 250, + 250, 250, 250, 245, 253, 548, 548, 548, 548, 554, + 604, 1285, 1285, 355, 355, 1285, 571, 1285, 1285, 1285, + 1285, 1285, 1285, 1285, 1285, 1285, 539, 539, 342, 424, + 539, 611, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 566, 476, 1312, 1313, 733, 637, 639, 325, 308, + 659, 848, 343, 342, 683, 687, 1010, 695, 704, 1006, + 660, 1298, 609, 624, 627, 628, 629, 630, 651, 652, + 653, 708, 1216, 944, 1314, 1315, 1217, 1220, 945, 1221, + 1337, 1337, 686, 352, 353, 868, 553, 563, 450, 450, + 450, 553, 1309, 563, 1309, 1133, 397, 462, 1337, 1058, + 880, 1309, 1185, 867, 500, 5, 501, 6, 469, 580, + 470, 471, 507, 554, 878, 1340, 1340, 1345, 1346, 433, + 438, 550, 666, 550, 433, 682, 1321, 1321, 1321, 1321, + 550, 337, 1041, 1041, 931, 1123, 873, 665, 1052, 1048, + 1049, 619, 845, 876, 324, 275, 324, 1015, 967, 410, + 705, 577, 614, 1305, 456, 872, 403, 664, 994, 969, + 969, 969, 969, 866, 870, 456, 963, 970, 881, 869, + 1070, 1074, 631, 633, 635, 1227, 1230, 958, 615, 978, + 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, + 450, 999, 1018, 450, 971, 1073, 732, 477, 1228, 1307, + 1307, 1073, 736, 968, 551, 1008, 1003, 882, 694, 1075, + 1071, 829, 255, 255, 980, 0, 1118, 0, 1013, 1013, + 694, 0, 0, 0, 694, 1116, 885 ); - protected $gotoCheck = array( - 42, 42, 72, 9, 72, 65, 65, 126, 181, 181, - 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, - 85, 85, 26, 85, 85, 85, 181, 42, 42, 42, + protected array $gotoCheck = array( + 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, + 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 86, 86, 26, 86, 86, 86, 27, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -779,100 +918,94 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 15, 27, 23, 23, 23, 23, 43, - 107, 107, 96, 170, 129, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 168, 168, 12, 55, 55, - 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, - 24, 24, 24, 24, 35, 75, 75, 15, 6, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 35, - 82, 15, 35, 45, 106, 106, 106, 106, 12, 106, - 12, 15, 15, 15, 15, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 81, 81, 49, 148, 148, - 81, 75, 81, 179, 81, 81, 81, 148, 81, 177, - 72, 81, 72, 83, 103, 81, 82, 72, 72, 72, - 102, 83, 72, 61, 72, 72, 143, 143, 72, 72, - 72, 72, 72, 72, 72, 72, 72, 72, 72, 9, - 9, 9, 9, 72, 63, 180, 180, 113, 72, 72, - 72, 72, 117, 117, 72, 72, 72, 88, 88, 150, - 14, 88, 88, 180, 112, 88, 88, 88, 29, 7, - 14, 14, 7, 72, 7, 118, 118, 72, 7, 119, - 180, 9, 39, 9, 14, 14, 169, 169, 14, 115, - 14, 169, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 14, 171, 171, 64, 14, 64, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 19, 48, 19, - 2, 2, 48, 48, 48, 25, 19, 48, 174, 174, - 174, 48, 48, 48, 48, 48, 48, 5, 5, 25, - 25, 25, 25, 25, 25, 18, 25, 25, 25, 13, - 19, 13, 14, 22, 91, 19, 19, 19, 19, 167, - 167, 19, 19, 19, 5, 5, 5, 5, 5, 5, - 28, 96, 96, 14, 37, 9, 9, 23, 23, 23, - 9, 129, 9, 129, 79, 9, 9, 106, 106, 159, - 129, 58, 58, 58, 58, 58, 109, 9, 9, 9, - 9, 176, 176, 9, 14, 22, 9, 9, 92, 92, - 92, 98, 24, 24, 24, 129, 129, 129, 129, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 128, - 8, 8, 9, 8, 156, 20, 8, 8, 41, 8, - 146, 116, 129, 84, 84, 84, 116, 16, 16, 16, - 16, 46, 131, 46, 116, 116, 95, -1, 16, 116, - 116, 116, 116, -1, -1, -1, -1, 14, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 17, - 17, 23, 16, 129, -1, -1, 17, 129, 129, 129, - 20, 20, 17, 154, -1, 154, -1, -1, 20, -1, - 17, 154, 17, 17, 16, 16, 78, 78, 17, -1, - 78, 78, 78, 78, -1, -1, 20, 20, 20, -1, - 17, -1, -1, -1, 22, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 5, 5 + 42, 42, 42, 15, 149, 149, 23, 23, 23, 23, + 108, 108, 97, 149, 108, 130, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 170, 170, 8, 8, 170, + 8, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 8, 8, 83, 8, 49, 76, 76, 15, 43, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 22, + 6, 15, 24, 24, 24, 24, 59, 59, 59, 59, + 59, 15, 15, 15, 15, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 82, 82, 20, 83, 84, + 82, 76, 82, 45, 82, 82, 82, 84, 82, 179, + 73, 82, 73, 144, 144, 82, 12, 73, 73, 73, + 172, 22, 73, 181, 73, 73, 118, 118, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 9, + 9, 9, 9, 73, 25, 25, 25, 25, 73, 73, + 73, 73, 20, 20, 73, 73, 73, 12, 14, 12, + 20, 103, 5, 5, 119, 119, 89, 89, 14, 14, + 89, 89, 62, 73, 89, 89, 89, 73, 20, 20, + 20, 9, 14, 14, 9, 65, 14, 65, 14, 5, + 5, 5, 5, 5, 5, 107, 107, 107, 107, 14, + 107, 171, 171, 14, 14, 171, 104, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 173, 173, 168, 13, + 173, 13, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 48, 176, 176, 176, 48, 48, 48, 169, 169, + 48, 22, 168, 168, 48, 48, 48, 48, 48, 48, + 64, 14, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 79, 79, 178, 178, 79, 79, 79, 79, + 182, 182, 14, 97, 97, 35, 9, 9, 23, 23, + 23, 9, 130, 9, 130, 150, 9, 9, 182, 114, + 35, 130, 151, 35, 155, 46, 155, 46, 9, 9, + 9, 9, 155, 14, 9, 182, 182, 9, 9, 117, + 113, 19, 120, 19, 117, 116, 130, 130, 130, 130, + 19, 29, 117, 117, 17, 17, 39, 117, 117, 117, + 117, 17, 18, 9, 24, 24, 24, 17, 93, 93, + 93, 2, 2, 130, 19, 17, 28, 17, 17, 19, + 19, 19, 19, 17, 37, 19, 19, 19, 16, 16, + 16, 16, 85, 85, 85, 17, 14, 92, 80, 16, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 50, 110, 23, 50, 130, 50, 157, 160, 130, + 130, 130, 99, 16, 50, 50, 50, 41, 7, 132, + 129, 7, 5, 5, 96, -1, 147, -1, 107, 107, + 7, -1, -1, -1, 7, 16, 16 ); - protected $gotoBase = array( - 0, 0, -339, 0, 0, 386, 195, 312, 472, -10, - 0, 0, -109, 62, 13, -184, 46, 65, 86, 102, - 93, 0, 125, 162, 197, 371, 18, 160, 83, 22, - 0, 0, 0, 0, 0, -166, 0, 85, 0, 9, - 0, 48, -1, 157, 0, 207, -232, 0, -340, 223, - 0, 0, 0, 0, 0, 148, 0, 0, 396, 0, - 0, 231, 0, 52, 334, -236, 0, 0, 0, 0, - 0, 0, -5, 0, 0, -139, 0, 0, 149, 91, - 112, -245, -58, -205, 15, -695, 0, 0, 28, 0, - 0, 75, 154, 0, 0, 64, -310, 0, 55, 0, - 0, 0, 235, 221, 0, 0, 196, -71, 0, 77, - 0, 0, 37, 24, 0, 56, 219, 23, 40, 39, - 0, 0, 0, 0, 0, 0, 5, 0, 106, 166, - 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 47, 0, 214, 0, - 35, 0, 0, 0, 49, 0, 45, 0, 0, 71, - 0, 0, 0, 0, 0, 0, 0, 88, -56, 95, - 144, 111, 0, 0, 78, 0, 80, 229, 0, 222, - -12, -299, 0, 0 + protected array $gotoBase = array( + 0, 0, -221, 0, 0, 311, 200, 541, 179, -10, + 0, 0, -30, 32, 11, -185, 56, 9, 173, 196, + -146, 0, -59, 163, 219, 291, 18, 22, 159, 175, + 0, 0, 0, 0, 0, 54, 0, 165, 0, 153, + 0, 106, -1, 189, 0, 230, -291, 0, -330, 186, + 519, 0, 0, 0, 0, 0, -33, 0, 0, 181, + 0, 0, 280, 0, 158, 321, -236, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -140, 0, 0, 4, + 174, 44, -246, -76, -220, 33, -698, 0, 0, 37, + 0, 0, 188, 184, 0, 0, 111, -311, 0, 135, + 0, 0, 0, 276, 313, 0, 0, 317, -71, 0, + 162, 0, 0, 183, 166, 0, 182, 187, -3, 29, + 172, 0, 0, 0, 0, 0, 0, 1, 0, 176, + 167, 0, 107, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -12, 0, 0, 112, 0, 130, + 190, 168, 0, 0, 0, -51, 0, 97, 0, 0, + 169, 0, 0, 0, 0, 0, 0, 0, 71, 67, + -56, 110, 241, 125, 0, 0, 82, 0, 42, 229, + 0, 242, 113, 0, 0 ); - protected $gotoDefault = array( - -32768, 511, 737, 4, 738, 932, 814, 823, 594, 528, - 704, 347, 622, 421, 1299, 909, 1119, 575, 842, 1242, - 1250, 456, 845, 330, 727, 891, 892, 893, 399, 385, - 391, 397, 646, 623, 493, 877, 452, 869, 485, 872, - 451, 881, 164, 417, 509, 885, 3, 888, 554, 919, - 386, 896, 387, 674, 898, 560, 900, 901, 394, 400, - 401, 1124, 568, 619, 913, 256, 562, 914, 384, 915, - 922, 389, 392, 685, 464, 504, 498, 410, 1099, 563, - 605, 643, 446, 472, 617, 629, 615, 479, 433, 415, - 329, 954, 962, 486, 462, 976, 349, 984, 735, 1131, - 637, 488, 992, 638, 999, 1002, 529, 530, 477, 1014, - 272, 1017, 489, 12, 664, 1028, 1029, 665, 639, 1051, - 640, 666, 641, 1053, 471, 595, 1061, 453, 1069, 1287, - 454, 1073, 266, 1076, 277, 416, 434, 1082, 1083, 9, - 1089, 695, 696, 11, 276, 508, 1114, 686, 450, 1130, - 438, 1200, 1202, 556, 490, 1220, 1219, 677, 505, 1225, - 447, 1290, 448, 531, 473, 315, 532, 307, 333, 312, - 547, 294, 334, 533, 474, 1296, 1304, 331, 31, 1324, - 1335, 342, 572, 610 + protected array $gotoDefault = array( + -32768, 512, 740, 4, 741, 935, 816, 825, 597, 530, + 707, 348, 625, 422, 1303, 911, 1122, 578, 844, 1246, + 1254, 457, 847, 330, 730, 923, 894, 895, 400, 386, + 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, + 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, + 973, 387, 898, 388, 677, 900, 562, 902, 903, 395, + 401, 402, 1127, 570, 622, 915, 256, 564, 916, 385, + 917, 925, 390, 393, 688, 465, 505, 499, 411, 1102, + 565, 608, 646, 447, 473, 620, 632, 618, 480, 434, + 416, 329, 957, 965, 487, 463, 979, 350, 987, 738, + 1135, 640, 489, 995, 641, 1002, 1005, 531, 532, 478, + 1017, 272, 1020, 490, 19, 667, 1031, 1032, 668, 642, + 1054, 643, 669, 644, 1056, 472, 598, 1064, 454, 1072, + 1291, 455, 1076, 266, 1079, 277, 417, 435, 1085, 1086, + 9, 1092, 698, 699, 11, 276, 509, 1117, 689, 451, + 1134, 439, 1204, 1206, 558, 491, 1224, 1223, 680, 506, + 1229, 448, 1294, 449, 533, 474, 315, 534, 1338, 307, + 333, 312, 549, 294, 334, 535, 475, 1300, 1308, 331, + 31, 1328, 1339, 575, 613 ); - protected $ruleToNonTerminal = array( + protected array $ruleToNonTerminal = array( 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, @@ -880,38 +1013,38 @@ class Php7 extends \PhpParser\ParserAbstract 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, - 7, 7, 7, 7, 7, 7, 8, 8, 9, 10, - 11, 11, 11, 12, 12, 13, 13, 14, 15, 15, - 16, 16, 17, 17, 18, 18, 21, 21, 22, 23, - 23, 24, 24, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 29, 29, 30, 30, 32, 34, - 34, 28, 36, 36, 33, 38, 38, 35, 35, 37, - 37, 39, 39, 31, 40, 40, 41, 43, 44, 44, - 45, 45, 46, 46, 48, 47, 47, 47, 47, 49, + 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, + 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, + 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, + 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, + 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, + 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, + 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, - 49, 49, 49, 25, 25, 68, 68, 71, 71, 70, - 69, 69, 62, 74, 74, 75, 75, 76, 76, 77, - 77, 78, 78, 79, 79, 26, 26, 27, 27, 27, - 27, 27, 87, 87, 89, 89, 82, 82, 90, 90, - 91, 91, 91, 83, 83, 86, 86, 84, 84, 92, - 93, 93, 56, 56, 64, 64, 67, 67, 67, 66, - 94, 94, 95, 57, 57, 57, 57, 96, 96, 97, - 97, 98, 98, 99, 100, 100, 101, 101, 102, 102, - 54, 54, 50, 50, 104, 52, 52, 105, 51, 51, - 53, 53, 63, 63, 63, 63, 80, 80, 108, 108, - 110, 110, 111, 111, 111, 111, 109, 109, 109, 113, - 113, 113, 113, 88, 88, 116, 116, 116, 117, 117, - 114, 114, 118, 118, 120, 120, 121, 121, 115, 122, - 122, 119, 123, 123, 123, 123, 112, 112, 81, 81, - 81, 20, 20, 20, 125, 124, 124, 126, 126, 126, - 126, 59, 127, 127, 128, 60, 130, 130, 131, 131, - 132, 132, 85, 133, 133, 133, 133, 133, 133, 133, - 138, 138, 139, 139, 140, 140, 140, 140, 140, 141, - 142, 142, 137, 137, 134, 134, 136, 136, 144, 144, - 143, 143, 143, 143, 143, 143, 143, 135, 145, 145, - 147, 146, 146, 61, 103, 148, 148, 55, 55, 42, + 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, + 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, + 78, 79, 79, 80, 80, 26, 26, 27, 27, 27, + 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, + 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, + 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, + 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, + 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, + 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, + 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, + 111, 111, 112, 112, 112, 112, 110, 110, 110, 114, + 114, 114, 114, 89, 89, 117, 117, 117, 118, 118, + 115, 115, 119, 119, 121, 121, 122, 122, 116, 123, + 123, 120, 124, 124, 124, 124, 113, 113, 82, 82, + 82, 20, 20, 20, 126, 125, 125, 127, 127, 127, + 127, 60, 128, 128, 129, 61, 131, 131, 132, 132, + 133, 133, 86, 134, 134, 134, 134, 134, 134, 134, + 139, 139, 140, 140, 141, 141, 141, 141, 141, 142, + 143, 143, 138, 138, 135, 135, 137, 137, 145, 145, + 144, 144, 144, 144, 144, 144, 144, 136, 146, 146, + 148, 147, 147, 62, 104, 149, 149, 56, 56, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -921,23 +1054,23 @@ class Php7 extends \PhpParser\ParserAbstract 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 155, 149, 149, 154, 154, 157, 158, 158, - 159, 160, 161, 161, 161, 161, 19, 19, 72, 72, - 72, 72, 150, 150, 150, 150, 163, 163, 151, 151, - 153, 153, 153, 156, 156, 168, 168, 168, 168, 168, - 168, 168, 168, 168, 169, 169, 169, 107, 171, 171, - 171, 171, 152, 152, 152, 152, 152, 152, 152, 152, - 58, 58, 166, 166, 166, 166, 172, 172, 162, 162, - 162, 173, 173, 173, 173, 173, 173, 73, 73, 65, - 65, 65, 65, 129, 129, 129, 129, 176, 175, 165, - 165, 165, 165, 165, 165, 165, 164, 164, 164, 174, - 174, 174, 174, 106, 170, 178, 178, 177, 177, 179, - 179, 179, 179, 179, 179, 179, 179, 167, 167, 167, - 167, 181, 182, 180, 180, 180, 180, 180, 180, 180, - 180, 183, 183, 183, 183 + 42, 42, 42, 156, 150, 150, 155, 155, 158, 159, + 159, 160, 161, 162, 162, 162, 162, 19, 19, 73, + 73, 73, 73, 151, 151, 151, 151, 164, 164, 152, + 152, 154, 154, 154, 157, 157, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 171, 171, 171, 108, 173, + 173, 173, 173, 153, 153, 153, 153, 153, 153, 153, + 153, 59, 59, 167, 167, 167, 167, 174, 174, 163, + 163, 163, 175, 175, 175, 175, 175, 175, 74, 74, + 66, 66, 66, 66, 130, 130, 130, 130, 178, 177, + 166, 166, 166, 166, 166, 166, 166, 165, 165, 165, + 176, 176, 176, 176, 107, 172, 180, 180, 179, 179, + 181, 181, 181, 181, 181, 181, 181, 181, 169, 169, + 169, 169, 168, 183, 182, 182, 182, 182, 182, 182, + 182, 182, 184, 184, 184, 184 ); - protected $ruleToLength = array( + protected array $ruleToLength = array( 1, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -947,16 +1080,16 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 0, 1, 1, 2, 1, 3, 4, 1, - 2, 0, 1, 1, 1, 1, 1, 3, 5, 4, - 3, 4, 2, 3, 1, 1, 7, 6, 2, 3, - 1, 2, 3, 1, 2, 3, 1, 1, 3, 1, - 3, 1, 2, 2, 3, 1, 3, 2, 3, 1, - 3, 3, 2, 0, 1, 1, 1, 1, 1, 3, - 7, 10, 5, 7, 9, 5, 3, 3, 3, 3, - 3, 3, 1, 2, 5, 7, 9, 6, 5, 6, - 3, 2, 1, 1, 1, 0, 2, 1, 3, 8, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 0, 1, 1, 2, 1, 3, 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 1, 3, - 1, 1, 4, 4, 1, 4, 4, 0, 1, 1, - 1, 3, 3, 1, 4, 2, 2, 1, 3, 1, - 4, 4, 3, 3, 3, 3, 1, 3, 1, 1, - 3, 1, 1, 4, 1, 1, 1, 3, 1, 1, - 2, 1, 3, 4, 3, 2, 0, 2, 2, 1, - 2, 1, 1, 1, 4, 3, 3, 3, 3, 6, - 3, 1, 1, 2, 1 + 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, + 3, 4, 4, 2, 2, 4, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, + 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, + 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, + 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, + 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, + 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, + 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, + 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, + 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, + 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, + 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, + 6, 3, 1, 1, 2, 1 ); - protected function initReduceCallbacks() { + protected function initReduceCallbacks(): void { $this->reduceCallbacks = [ - 0 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 0 => null, 1 => function ($stackPos) { $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); }, 2 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; }, 3 => function ($stackPos) { $this->semValue = array(); }, 4 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 5 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 6 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 7 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 8 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 9 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 10 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 11 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 12 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 13 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 14 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 15 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 16 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 17 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 18 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 19 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 20 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 21 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 22 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 23 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 24 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 25 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 26 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 27 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 28 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 29 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 30 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 31 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 32 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 33 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 34 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 35 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 36 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 37 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 38 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 39 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 40 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 41 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 42 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 43 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 44 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 45 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 46 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 47 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 48 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 49 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 50 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 51 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 52 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 53 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 54 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 55 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 56 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 57 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 58 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 59 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 60 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 61 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 62 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 63 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 64 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 65 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 66 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 67 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 68 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 69 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 70 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 71 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 72 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 73 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 74 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 75 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, + 5 => null, + 6 => null, + 7 => null, + 8 => null, + 9 => null, + 10 => null, + 11 => null, + 12 => null, + 13 => null, + 14 => null, + 15 => null, + 16 => null, + 17 => null, + 18 => null, + 19 => null, + 20 => null, + 21 => null, + 22 => null, + 23 => null, + 24 => null, + 25 => null, + 26 => null, + 27 => null, + 28 => null, + 29 => null, + 30 => null, + 31 => null, + 32 => null, + 33 => null, + 34 => null, + 35 => null, + 36 => null, + 37 => null, + 38 => null, + 39 => null, + 40 => null, + 41 => null, + 42 => null, + 43 => null, + 44 => null, + 45 => null, + 46 => null, + 47 => null, + 48 => null, + 49 => null, + 50 => null, + 51 => null, + 52 => null, + 53 => null, + 54 => null, + 55 => null, + 56 => null, + 57 => null, + 58 => null, + 59 => null, + 60 => null, + 61 => null, + 62 => null, + 63 => null, + 64 => null, + 65 => null, + 66 => null, + 67 => null, + 68 => null, + 69 => null, + 70 => null, + 71 => null, + 72 => null, + 73 => null, + 74 => null, + 75 => null, 76 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 77 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 78 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 79 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 80 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 81 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 82 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 83 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 84 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "<?=") $this->emitError(new Error('Cannot use "<?=" as an identifier', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, + 77 => null, + 78 => null, + 79 => null, + 80 => null, + 81 => null, + 82 => null, + 83 => null, + 84 => null, 85 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 86 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 87 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 88 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 89 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 90 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 91 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 92 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 93 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 94 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 94 => null, 95 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 96 => function ($stackPos) { - $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 97 => function ($stackPos) { - $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + /* nothing */ }, 98 => function ($stackPos) { /* nothing */ @@ -1306,283 +1277,237 @@ class Php7 extends \PhpParser\ParserAbstract /* nothing */ }, 100 => function ($stackPos) { - /* nothing */ - }, - 101 => function ($stackPos) { - $this->emitError(new Error('A trailing comma is not allowed here', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 102 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->emitError(new Error('A trailing comma is not allowed here', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); }, + 101 => null, + 102 => null, 103 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 104 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 105 => function ($stackPos) { - $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 106 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 107 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 108 => function ($stackPos) { - $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 107 => function ($stackPos) { + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 109 => function ($stackPos) { + 108 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 110 => function ($stackPos) { + 109 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 111 => function ($stackPos) { + 110 => function ($stackPos) { $this->semValue = []; }, - 112 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 113 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 114 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 111 => null, + 112 => null, + 113 => null, + 114 => null, 115 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Stmt\HaltCompiler($this->handleHaltCompiler(), $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 116 => function ($stackPos) { - $this->semValue = new Stmt\HaltCompiler($this->lexer->handleHaltCompiler(), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 117 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); $this->checkNamespace($this->semValue); }, + 117 => function ($stackPos) { + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $this->checkNamespace($this->semValue); + }, 118 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); $this->checkNamespace($this->semValue); }, 119 => function ($stackPos) { - $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); - $this->checkNamespace($this->semValue); + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 120 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 121 => function ($stackPos) { - $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, + 121 => null, 122 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 123 => function ($stackPos) { - $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 124 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_FUNCTION; }, - 125 => function ($stackPos) { + 124 => function ($stackPos) { $this->semValue = Stmt\Use_::TYPE_CONSTANT; }, + 125 => function ($stackPos) { + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + }, 126 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); - }, - 127 => function ($stackPos) { - $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, + 127 => null, 128 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 129 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 130 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, + 130 => null, 131 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 132 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 133 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, + 133 => null, 134 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 135 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 136 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 137 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 138 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); }, 139 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); }, 140 => function ($stackPos) { - $this->semValue = new Stmt\UseUse($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkUseUse($this->semValue, $stackPos-(3-3)); - }, - 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; }, - 142 => function ($stackPos) { + 141 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; }, + 142 => null, 143 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 144 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 145 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 146 => function ($stackPos) { - $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, + 146 => null, 147 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 148 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 149 => function ($stackPos) { + 148 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, + 149 => function ($stackPos) { + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, 150 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 151 => function ($stackPos) { - $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributeStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; }, 152 => function ($stackPos) { - if (is_array($this->semStack[$stackPos-(2-2)])) { $this->semValue = array_merge($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); } else { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }; - }, - 153 => function ($stackPos) { $this->semValue = array(); }, - 154 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + 153 => function ($stackPos) { + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 155 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 156 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 154 => null, + 155 => null, + 156 => null, 157 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 158 => function ($stackPos) { - throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Stmt\Block($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 159 => function ($stackPos) { - - if ($this->semStack[$stackPos-(3-2)]) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; $attrs = $this->startAttributeStack[$stackPos-(3-1)]; $stmts = $this->semValue; if (!empty($attrs['comments'])) {$stmts[0]->setAttribute('comments', array_merge($attrs['comments'], $stmts[0]->getAttribute('comments', []))); }; - } else { - $startAttributes = $this->startAttributeStack[$stackPos-(3-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if (null === $this->semValue) { $this->semValue = array(); } - } - + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => $this->semStack[$stackPos-(7-5)], 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 160 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => is_array($this->semStack[$stackPos-(7-5)]) ? $this->semStack[$stackPos-(7-5)] : array($this->semStack[$stackPos-(7-5)]), 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 161 => function ($stackPos) { - $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 162 => function ($stackPos) { - $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 163 => function ($stackPos) { - $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], is_array($this->semStack[$stackPos-(7-2)]) ? $this->semStack[$stackPos-(7-2)] : array($this->semStack[$stackPos-(7-2)]), $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 164 => function ($stackPos) { - $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 165 => function ($stackPos) { - $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 166 => function ($stackPos) { - $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 167 => function ($stackPos) { - $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 168 => function ($stackPos) { - $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 169 => function ($stackPos) { - $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 170 => function ($stackPos) { - $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 171 => function ($stackPos) { - $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + + $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline($stackPos-(1-1))); + }, 172 => function ($stackPos) { - $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 173 => function ($stackPos) { - - $e = $this->semStack[$stackPos-(2-1)]; - if ($e instanceof Expr\Throw_) { - // For backwards-compatibility reasons, convert throw in statement position into - // Stmt\Throw_ rather than Stmt\Expression(Expr\Throw_). - $this->semValue = new Stmt\Throw_($e->expr, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - } else { - $this->semValue = new Stmt\Expression($e, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - } - + $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 174 => function ($stackPos) { - $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 175 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 176 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-4)], $this->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 177 => function ($stackPos) { - $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->startAttributeStack[$stackPos-(6-4)] + $this->endAttributeStack[$stackPos-(6-4)]), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 178 => function ($stackPos) { - $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->checkTryCatch($this->semValue); }, 179 => function ($stackPos) { - $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->checkTryCatch($this->semValue); + $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 180 => function ($stackPos) { - $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 181 => function ($stackPos) { - $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 182 => function ($stackPos) { - $this->semValue = array(); /* means: no statement */ + $this->semValue = null; /* means: no statement */ }, + 182 => null, 183 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); }, 184 => function ($stackPos) { - $startAttributes = $this->startAttributeStack[$stackPos-(1-1)]; if (isset($startAttributes['comments'])) { $this->semValue = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $this->semValue = null; }; - if ($this->semValue === null) $this->semValue = array(); /* means: no statement */ + if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; }, 185 => function ($stackPos) { $this->semValue = array(); @@ -1597,17 +1522,15 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 189 => function ($stackPos) { - $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 190 => function ($stackPos) { $this->semValue = null; }, 191 => function ($stackPos) { - $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 192 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, + 192 => null, 193 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1638,35 +1561,33 @@ class Php7 extends \PhpParser\ParserAbstract 202 => function ($stackPos) { $this->semValue = []; }, - 203 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 203 => null, 204 => function ($stackPos) { - $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 205 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 206 => function ($stackPos) { - $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 207 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(7-2)); }, 208 => function ($stackPos) { - $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkClass($this->semValue, $stackPos-(8-3)); }, 209 => function ($stackPos) { - $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); $this->checkInterface($this->semValue, $stackPos-(7-3)); }, 210 => function ($stackPos) { - $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 211 => function ($stackPos) { - $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); $this->checkEnum($this->semValue, $stackPos-(8-3)); }, 212 => function ($stackPos) { @@ -1684,23 +1605,19 @@ class Php7 extends \PhpParser\ParserAbstract 216 => function ($stackPos) { $this->semValue = 0; }, - 217 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 218 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 217 => null, + 218 => null, 219 => function ($stackPos) { $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 220 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Modifiers::ABSTRACT; }, 221 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Modifiers::FINAL; }, 222 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Modifiers::READONLY; }, 223 => function ($stackPos) { $this->semValue = null; @@ -1720,29 +1637,23 @@ class Php7 extends \PhpParser\ParserAbstract 228 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-2)]; }, - 229 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 229 => null, 230 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 231 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 232 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, + 232 => null, 233 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 234 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); - }, + 234 => null, 235 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, 236 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; }, 237 => function ($stackPos) { $this->semValue = null; @@ -1750,9 +1661,7 @@ class Php7 extends \PhpParser\ParserAbstract 238 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; }, - 239 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 239 => null, 240 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1760,7 +1669,7 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 242 => function ($stackPos) { - $this->semValue = new Stmt\DeclareDeclare($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 243 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; @@ -1781,26 +1690,20 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 249 => function ($stackPos) { - $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 250 => function ($stackPos) { - $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 251 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 252 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, + 251 => null, + 252 => null, 253 => function ($stackPos) { - $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes); + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); }, 254 => function ($stackPos) { $this->semValue = []; }, - 255 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 255 => null, 256 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -1808,13 +1711,13 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 258 => function ($stackPos) { - $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 259 => function ($stackPos) { - $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 260 => function ($stackPos) { - $this->semValue = is_array($this->semStack[$stackPos-(1-1)]) ? $this->semStack[$stackPos-(1-1)] : array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 261 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-2)]; @@ -1826,7 +1729,7 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 264 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], is_array($this->semStack[$stackPos-(5-5)]) ? $this->semStack[$stackPos-(5-5)] : array($this->semStack[$stackPos-(5-5)]), $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 265 => function ($stackPos) { $this->semValue = array(); @@ -1835,19 +1738,19 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 267 => function ($stackPos) { - $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 268 => function ($stackPos) { $this->semValue = null; }, 269 => function ($stackPos) { - $this->semValue = new Stmt\Else_(is_array($this->semStack[$stackPos-(2-2)]) ? $this->semStack[$stackPos-(2-2)] : array($this->semStack[$stackPos-(2-2)]), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 270 => function ($stackPos) { $this->semValue = null; }, 271 => function ($stackPos) { - $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->fixupAlternativeElse($this->semValue); + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); }, 272 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)], false); @@ -1859,11 +1762,9 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = array($this->semStack[$stackPos-(1-1)], false); }, 275 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)], false); - }, - 276 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); }, + 276 => null, 277 => function ($stackPos) { $this->semValue = array(); }, @@ -1880,58 +1781,50 @@ class Php7 extends \PhpParser\ParserAbstract $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 282 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = Modifiers::PUBLIC; }, 283 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Modifiers::PROTECTED; }, 284 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Modifiers::PRIVATE; }, 285 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; + $this->semValue = Modifiers::READONLY; }, 286 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); $this->checkParam($this->semValue); }, 287 => function ($stackPos) { - $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes, $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); $this->checkParam($this->semValue); }, 288 => function ($stackPos) { - $this->semValue = new Node\Param(new Expr\Error($this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); - }, - 289 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); }, + 289 => null, 290 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 291 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 292 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 293 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 292 => null, + 293 => null, 294 => function ($stackPos) { - $this->semValue = new Node\Name('static', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 295 => function ($stackPos) { $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); }, 296 => function ($stackPos) { - $this->semValue = new Node\Identifier('array', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 297 => function ($stackPos) { - $this->semValue = new Node\Identifier('callable', $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 298 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 298 => null, 299 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, @@ -1941,9 +1834,7 @@ class Php7 extends \PhpParser\ParserAbstract 301 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 302 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 302 => null, 303 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, @@ -1960,7 +1851,7 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 308 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 309 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); @@ -1969,26 +1860,20 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 311 => function ($stackPos) { - $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 312 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 312 => null, 313 => function ($stackPos) { - $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 314 => function ($stackPos) { - $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 315 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 315 => null, 316 => function ($stackPos) { $this->semValue = null; }, - 317 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 317 => null, 318 => function ($stackPos) { $this->semValue = null; }, @@ -2008,7 +1893,7 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = array($this->semStack[$stackPos-(3-2)]); }, 324 => function ($stackPos) { - $this->semValue = new Node\VariadicPlaceholder($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 325 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); @@ -2017,32 +1902,26 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 327 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 328 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 329 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 330 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->semStack[$stackPos-(3-1)]); - }, - 331 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); }, + 331 => null, 332 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 333 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 334 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 335 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, + 334 => null, + 335 => null, 336 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -2050,10 +1929,10 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 338 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 339 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 340 => function ($stackPos) { if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } else { $this->semValue = $this->semStack[$stackPos-(2-1)]; } @@ -2062,30 +1941,30 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = array(); }, 342 => function ($stackPos) { - $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($this->createCommentNopAttributes($startAttributes['comments'])); } else { $nop = null; }; + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 343 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); $this->checkProperty($this->semValue, $stackPos-(5-2)); }, 344 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes, $this->semStack[$stackPos-(5-1)]); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); $this->checkClassConst($this->semValue, $stackPos-(5-2)); }, 345 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes, $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); $this->checkClassConst($this->semValue, $stackPos-(6-2)); }, 346 => function ($stackPos) { - $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); $this->checkClassMethod($this->semValue, $stackPos-(10-2)); }, 347 => function ($stackPos) { - $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 348 => function ($stackPos) { - $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 349 => function ($stackPos) { $this->semValue = null; /* will be skipped */ @@ -2103,77 +1982,65 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 354 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 355 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 356 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 357 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 358 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 359 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, - 360 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 360 => null, 361 => function ($stackPos) { $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 362 => function ($stackPos) { $this->semValue = null; }, - 363 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 364 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 363 => null, + 364 => null, 365 => function ($stackPos) { $this->semValue = 0; }, 366 => function ($stackPos) { $this->semValue = 0; }, - 367 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 368 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 367 => null, + 368 => null, 369 => function ($stackPos) { $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 370 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->semValue = Modifiers::PUBLIC; }, 371 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Modifiers::PROTECTED; }, 372 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Modifiers::PRIVATE; }, 373 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Modifiers::STATIC; }, 374 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Modifiers::ABSTRACT; }, 375 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Modifiers::FINAL; }, 376 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_READONLY; - }, - 377 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Modifiers::READONLY; }, + 377 => null, 378 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, @@ -2181,20 +2048,16 @@ class Php7 extends \PhpParser\ParserAbstract $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 380 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 381 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 382 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 383 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 384 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, + 383 => null, + 384 => null, 385 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, @@ -2204,695 +2067,633 @@ class Php7 extends \PhpParser\ParserAbstract 387 => function ($stackPos) { $this->semValue = array(); }, - 388 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 389 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, + 388 => null, + 389 => null, 390 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 391 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 392 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 393 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 394 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 395 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 396 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + if (!$this->phpVersion->allowsAssignNewByReference()) { + $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); + } + }, + 395 => null, + 396 => null, 397 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 398 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 399 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 400 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 401 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 402 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 403 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 404 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 405 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 406 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 407 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 408 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 409 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 410 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 411 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 412 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 413 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 414 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 415 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 416 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 417 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 418 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 419 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 420 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 421 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 422 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 423 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 424 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 425 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 426 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 427 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 428 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 429 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 430 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 431 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 432 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 433 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 434 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 435 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 436 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 437 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 438 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 439 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 440 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 441 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 442 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 443 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 444 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 445 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 446 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 447 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 448 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); }, 449 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 450 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 451 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 452 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 453 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 454 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 455 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 456 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 457 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 458 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 459 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, - 459 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, 460 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 461 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 462 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 463 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 464 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 465 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 465 => function ($stackPos) { - $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, 466 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 467 => function ($stackPos) { - $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, + 467 => null, 468 => function ($stackPos) { - $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 469 => function ($stackPos) { - $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 470 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 471 => function ($stackPos) { - $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 472 => function ($stackPos) { - $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 473 => function ($stackPos) { - $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 474 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 475 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 476 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 477 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); }, 478 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 479 => function ($stackPos) { - $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 480 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 481 => function ($stackPos) { - $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->startAttributeStack[$stackPos-(10-1)] + $this->endAttributes); + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); }, 482 => function ($stackPos) { - $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes), $this->semStack[$stackPos-(8-3)]); - $this->checkClass($this->semValue[0], -1); + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); }, 483 => function ($stackPos) { - $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); }, 484 => function ($stackPos) { - list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 485 => function ($stackPos) { - $this->semValue = array(); + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, 486 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = array(); }, 487 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 488 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, + 488 => null, 489 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 490 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 491 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 492 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 493 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 494 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 495 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 496 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 497 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 498 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 499 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 500 => function ($stackPos) { - $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 501 => function ($stackPos) { - $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 502 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 503 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 504 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 505 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 506 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 507 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 508 => function ($stackPos) { - $this->semValue = null; - }, - 509 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 510 => function ($stackPos) { - $this->semValue = array(); - }, - 511 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 512 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 513 => function ($stackPos) { - $this->semValue = array(); - }, - 514 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 515 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 516 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 517 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 518 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 519 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 520 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 521 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 522 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 523 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 524 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 525 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); - }, - 526 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; - }, - 527 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); - }, - 528 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; - $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); - }, - 529 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 530 => function ($stackPos) { - $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 531 => function ($stackPos) { - $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; - foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); - }, - 532 => function ($stackPos) { - $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 533 => function ($stackPos) { - $this->semValue = Scalar\DNumber::fromString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 534 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 535 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 536 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 537 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 538 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); - }, - 539 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); - }, - 540 => function ($stackPos) { - $this->semValue = null; - }, - 541 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 542 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 543 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 544 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 545 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 546 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 547 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 548 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 549 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 550 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 551 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 552 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 553 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 554 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 555 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 556 => function ($stackPos) { - $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 557 => function ($stackPos) { - $this->semValue = null; - }, - 558 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 559 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 560 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 561 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 562 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 563 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 564 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 565 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 566 => function ($stackPos) { - $this->semValue = new Expr\Variable(new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes), $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; - }, - 567 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; - }, - 568 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 569 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 570 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 571 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 572 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 573 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 574 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 575 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 576 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 577 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 578 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 579 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 580 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 581 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 582 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; - }, - 583 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 584 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); - }, - 585 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; - }, - 586 => function ($stackPos) { - /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ - }, - 587 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 588 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + 491 => function ($stackPos) { + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 589 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 492 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 590 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + 493 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 591 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + 494 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 592 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 495 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, - 593 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + 496 => function ($stackPos) { + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, - 594 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + 497 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 595 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, true); + 498 => null, + 499 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, - 596 => function ($stackPos) { + 500 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 501 => function ($stackPos) { + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 502 => function ($stackPos) { + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 503 => null, + 504 => null, + 505 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 506 => function ($stackPos) { + $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + }, + 507 => null, + 508 => null, + 509 => function ($stackPos) { $this->semValue = null; }, + 510 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 511 => function ($stackPos) { + $this->semValue = array(); + }, + 512 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; + }, + 513 => function ($stackPos) { + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 514 => function ($stackPos) { + $this->semValue = array(); + }, + 515 => null, + 516 => function ($stackPos) { + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 517 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 518 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 519 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 520 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 521 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 522 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 523 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 524 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 525 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 526 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 527 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + }, + 528 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + }, + 529 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->createdArrays->attach($this->semValue); + }, + 530 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); + }, + 531 => function ($stackPos) { + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); + }, + 532 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); + }, + 533 => function ($stackPos) { + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); + }, + 534 => function ($stackPos) { + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 535 => null, + 536 => null, + 537 => null, + 538 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); + }, + 539 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); + }, + 540 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); + }, + 541 => function ($stackPos) { + $this->semValue = null; + }, + 542 => null, + 543 => null, + 544 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 545 => null, + 546 => null, + 547 => null, + 548 => null, + 549 => null, + 550 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 551 => null, + 552 => null, + 553 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 554 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 555 => null, + 556 => function ($stackPos) { + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 557 => function ($stackPos) { + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 558 => function ($stackPos) { + $this->semValue = null; + }, + 559 => null, + 560 => null, + 561 => null, + 562 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 563 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 564 => null, + 565 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 566 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 567 => function ($stackPos) { + $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + }, + 568 => function ($stackPos) { + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; + }, + 569 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 570 => null, + 571 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 572 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 573 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 574 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 575 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 576 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 577 => null, + 578 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 579 => null, + 580 => null, + 581 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 582 => null, + 583 => function ($stackPos) { + $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + }, + 584 => function ($stackPos) { + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $this->postprocessList($this->semValue); + }, + 585 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); + }, + 586 => null, + 587 => function ($stackPos) { + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + }, + 588 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 589 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 590 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 591 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 592 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 593 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 594 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 595 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 596 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); + }, 597 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $this->createEmptyElemAttributes($this->tokenPos); + $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); }, 598 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 599 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 600 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 601 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 602 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); }, 603 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 604 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, + 604 => null, 605 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); }, 606 => function ($stackPos) { - $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 607 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 608 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 609 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); }, 610 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); }, 611 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 612 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 613 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); }, 614 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); }, + 615 => null, ]; } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php new file mode 100644 index 00000000..76d52a8c --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php @@ -0,0 +1,2717 @@ +<?php declare(strict_types=1); + +namespace PhpParser\Parser; + +use PhpParser\Error; +use PhpParser\Modifiers; +use PhpParser\Node; +use PhpParser\Node\Expr; +use PhpParser\Node\Name; +use PhpParser\Node\Scalar; +use PhpParser\Node\Stmt; + +/* This is an automatically GENERATED file, which should not be manually edited. + * Instead edit one of the following: + * * the grammar file grammar/php.y + * * the skeleton file grammar/parser.template + * * the preprocessing script grammar/rebuildParsers.php + */ +class Php8 extends \PhpParser\ParserAbstract +{ + public const YYERRTOK = 256; + public const T_THROW = 257; + public const T_INCLUDE = 258; + public const T_INCLUDE_ONCE = 259; + public const T_EVAL = 260; + public const T_REQUIRE = 261; + public const T_REQUIRE_ONCE = 262; + public const T_LOGICAL_OR = 263; + public const T_LOGICAL_XOR = 264; + public const T_LOGICAL_AND = 265; + public const T_PRINT = 266; + public const T_YIELD = 267; + public const T_DOUBLE_ARROW = 268; + public const T_YIELD_FROM = 269; + public const T_PLUS_EQUAL = 270; + public const T_MINUS_EQUAL = 271; + public const T_MUL_EQUAL = 272; + public const T_DIV_EQUAL = 273; + public const T_CONCAT_EQUAL = 274; + public const T_MOD_EQUAL = 275; + public const T_AND_EQUAL = 276; + public const T_OR_EQUAL = 277; + public const T_XOR_EQUAL = 278; + public const T_SL_EQUAL = 279; + public const T_SR_EQUAL = 280; + public const T_POW_EQUAL = 281; + public const T_COALESCE_EQUAL = 282; + public const T_COALESCE = 283; + public const T_BOOLEAN_OR = 284; + public const T_BOOLEAN_AND = 285; + public const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; + public const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; + public const T_IS_EQUAL = 288; + public const T_IS_NOT_EQUAL = 289; + public const T_IS_IDENTICAL = 290; + public const T_IS_NOT_IDENTICAL = 291; + public const T_SPACESHIP = 292; + public const T_IS_SMALLER_OR_EQUAL = 293; + public const T_IS_GREATER_OR_EQUAL = 294; + public const T_SL = 295; + public const T_SR = 296; + public const T_INSTANCEOF = 297; + public const T_INC = 298; + public const T_DEC = 299; + public const T_INT_CAST = 300; + public const T_DOUBLE_CAST = 301; + public const T_STRING_CAST = 302; + public const T_ARRAY_CAST = 303; + public const T_OBJECT_CAST = 304; + public const T_BOOL_CAST = 305; + public const T_UNSET_CAST = 306; + public const T_POW = 307; + public const T_NEW = 308; + public const T_CLONE = 309; + public const T_EXIT = 310; + public const T_IF = 311; + public const T_ELSEIF = 312; + public const T_ELSE = 313; + public const T_ENDIF = 314; + public const T_LNUMBER = 315; + public const T_DNUMBER = 316; + public const T_STRING = 317; + public const T_STRING_VARNAME = 318; + public const T_VARIABLE = 319; + public const T_NUM_STRING = 320; + public const T_INLINE_HTML = 321; + public const T_ENCAPSED_AND_WHITESPACE = 322; + public const T_CONSTANT_ENCAPSED_STRING = 323; + public const T_ECHO = 324; + public const T_DO = 325; + public const T_WHILE = 326; + public const T_ENDWHILE = 327; + public const T_FOR = 328; + public const T_ENDFOR = 329; + public const T_FOREACH = 330; + public const T_ENDFOREACH = 331; + public const T_DECLARE = 332; + public const T_ENDDECLARE = 333; + public const T_AS = 334; + public const T_SWITCH = 335; + public const T_MATCH = 336; + public const T_ENDSWITCH = 337; + public const T_CASE = 338; + public const T_DEFAULT = 339; + public const T_BREAK = 340; + public const T_CONTINUE = 341; + public const T_GOTO = 342; + public const T_FUNCTION = 343; + public const T_FN = 344; + public const T_CONST = 345; + public const T_RETURN = 346; + public const T_TRY = 347; + public const T_CATCH = 348; + public const T_FINALLY = 349; + public const T_USE = 350; + public const T_INSTEADOF = 351; + public const T_GLOBAL = 352; + public const T_STATIC = 353; + public const T_ABSTRACT = 354; + public const T_FINAL = 355; + public const T_PRIVATE = 356; + public const T_PROTECTED = 357; + public const T_PUBLIC = 358; + public const T_READONLY = 359; + public const T_VAR = 360; + public const T_UNSET = 361; + public const T_ISSET = 362; + public const T_EMPTY = 363; + public const T_HALT_COMPILER = 364; + public const T_CLASS = 365; + public const T_TRAIT = 366; + public const T_INTERFACE = 367; + public const T_ENUM = 368; + public const T_EXTENDS = 369; + public const T_IMPLEMENTS = 370; + public const T_OBJECT_OPERATOR = 371; + public const T_NULLSAFE_OBJECT_OPERATOR = 372; + public const T_LIST = 373; + public const T_ARRAY = 374; + public const T_CALLABLE = 375; + public const T_CLASS_C = 376; + public const T_TRAIT_C = 377; + public const T_METHOD_C = 378; + public const T_FUNC_C = 379; + public const T_LINE = 380; + public const T_FILE = 381; + public const T_START_HEREDOC = 382; + public const T_END_HEREDOC = 383; + public const T_DOLLAR_OPEN_CURLY_BRACES = 384; + public const T_CURLY_OPEN = 385; + public const T_PAAMAYIM_NEKUDOTAYIM = 386; + public const T_NAMESPACE = 387; + public const T_NS_C = 388; + public const T_DIR = 389; + public const T_NS_SEPARATOR = 390; + public const T_ELLIPSIS = 391; + public const T_NAME_FULLY_QUALIFIED = 392; + public const T_NAME_QUALIFIED = 393; + public const T_NAME_RELATIVE = 394; + public const T_ATTRIBUTE = 395; + + protected int $tokenToSymbolMapSize = 396; + protected int $actionTableSize = 1257; + protected int $gotoTableSize = 657; + + protected int $invalidSymbol = 168; + protected int $errorSymbol = 1; + protected int $defaultAction = -32766; + protected int $unexpectedTokenRule = 32767; + + protected int $YY2TBLSTATE = 435; + protected int $numNonLeafStates = 739; + + protected array $symbolToName = array( + "EOF", + "error", + "T_THROW", + "T_INCLUDE", + "T_INCLUDE_ONCE", + "T_EVAL", + "T_REQUIRE", + "T_REQUIRE_ONCE", + "','", + "T_LOGICAL_OR", + "T_LOGICAL_XOR", + "T_LOGICAL_AND", + "T_PRINT", + "T_YIELD", + "T_DOUBLE_ARROW", + "T_YIELD_FROM", + "'='", + "T_PLUS_EQUAL", + "T_MINUS_EQUAL", + "T_MUL_EQUAL", + "T_DIV_EQUAL", + "T_CONCAT_EQUAL", + "T_MOD_EQUAL", + "T_AND_EQUAL", + "T_OR_EQUAL", + "T_XOR_EQUAL", + "T_SL_EQUAL", + "T_SR_EQUAL", + "T_POW_EQUAL", + "T_COALESCE_EQUAL", + "'?'", + "':'", + "T_COALESCE", + "T_BOOLEAN_OR", + "T_BOOLEAN_AND", + "'|'", + "'^'", + "T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG", + "T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG", + "T_IS_EQUAL", + "T_IS_NOT_EQUAL", + "T_IS_IDENTICAL", + "T_IS_NOT_IDENTICAL", + "T_SPACESHIP", + "'<'", + "T_IS_SMALLER_OR_EQUAL", + "'>'", + "T_IS_GREATER_OR_EQUAL", + "'.'", + "T_SL", + "T_SR", + "'+'", + "'-'", + "'*'", + "'/'", + "'%'", + "'!'", + "T_INSTANCEOF", + "'~'", + "T_INC", + "T_DEC", + "T_INT_CAST", + "T_DOUBLE_CAST", + "T_STRING_CAST", + "T_ARRAY_CAST", + "T_OBJECT_CAST", + "T_BOOL_CAST", + "T_UNSET_CAST", + "'@'", + "T_POW", + "'['", + "T_NEW", + "T_CLONE", + "T_EXIT", + "T_IF", + "T_ELSEIF", + "T_ELSE", + "T_ENDIF", + "T_LNUMBER", + "T_DNUMBER", + "T_STRING", + "T_STRING_VARNAME", + "T_VARIABLE", + "T_NUM_STRING", + "T_INLINE_HTML", + "T_ENCAPSED_AND_WHITESPACE", + "T_CONSTANT_ENCAPSED_STRING", + "T_ECHO", + "T_DO", + "T_WHILE", + "T_ENDWHILE", + "T_FOR", + "T_ENDFOR", + "T_FOREACH", + "T_ENDFOREACH", + "T_DECLARE", + "T_ENDDECLARE", + "T_AS", + "T_SWITCH", + "T_MATCH", + "T_ENDSWITCH", + "T_CASE", + "T_DEFAULT", + "T_BREAK", + "T_CONTINUE", + "T_GOTO", + "T_FUNCTION", + "T_FN", + "T_CONST", + "T_RETURN", + "T_TRY", + "T_CATCH", + "T_FINALLY", + "T_USE", + "T_INSTEADOF", + "T_GLOBAL", + "T_STATIC", + "T_ABSTRACT", + "T_FINAL", + "T_PRIVATE", + "T_PROTECTED", + "T_PUBLIC", + "T_READONLY", + "T_VAR", + "T_UNSET", + "T_ISSET", + "T_EMPTY", + "T_HALT_COMPILER", + "T_CLASS", + "T_TRAIT", + "T_INTERFACE", + "T_ENUM", + "T_EXTENDS", + "T_IMPLEMENTS", + "T_OBJECT_OPERATOR", + "T_NULLSAFE_OBJECT_OPERATOR", + "T_LIST", + "T_ARRAY", + "T_CALLABLE", + "T_CLASS_C", + "T_TRAIT_C", + "T_METHOD_C", + "T_FUNC_C", + "T_LINE", + "T_FILE", + "T_START_HEREDOC", + "T_END_HEREDOC", + "T_DOLLAR_OPEN_CURLY_BRACES", + "T_CURLY_OPEN", + "T_PAAMAYIM_NEKUDOTAYIM", + "T_NAMESPACE", + "T_NS_C", + "T_DIR", + "T_NS_SEPARATOR", + "T_ELLIPSIS", + "T_NAME_FULLY_QUALIFIED", + "T_NAME_QUALIFIED", + "T_NAME_RELATIVE", + "T_ATTRIBUTE", + "';'", + "']'", + "'('", + "')'", + "'{'", + "'}'", + "'`'", + "'\"'", + "'$'" + ); + + protected array $tokenToSymbol = array( + 0, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 56, 166, 168, 167, 55, 168, 168, + 161, 162, 53, 51, 8, 52, 48, 54, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 31, 159, + 44, 16, 46, 30, 68, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 70, 168, 160, 36, 168, 165, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 163, 35, 164, 58, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 168, 168, 168, 168, 168, 168, 1, 2, 3, 4, + 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 32, 33, 34, 37, 38, 39, 40, + 41, 42, 43, 45, 47, 49, 50, 57, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 69, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, + 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, + 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 155, 156, 157, 158 + ); + + protected array $action = array( + 133, 134, 135, 582, 136, 137, 0, 751, 752, 753, + 138, 38, 327,-32766,-32766,-32766,-32766,-32766,-32766, 837, + 826,-32767,-32767,-32767,-32767, 102, 103, 104, 1112, 1113, + 1114, 1111, 1110, 1109, 1115, 745, 744,-32766, 1027,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767, + -32767, 1245,-32766,-32766, 1322, 754, 1112, 1113, 1114, 1111, + 1110, 1109, 1115, 459, 460, 461, 2, 990, 1306, 265, + 139, 404, 758, 759, 760, 761, 467, 468, 429, 835, + 606, -16, 1341, 23, 292, 815, 762, 763, 764, 765, + 766, 767, 768, 769, 770, 771, 791, 583, 792, 793, + 794, 795, 783, 784, 345, 346, 786, 787, 772, 773, + 774, 776, 777, 778, 356, 818, 819, 820, 821, 822, + 584, 779, 780, 585, 586, 941, 803, 801, 802, 814, + 798, 799, 835, 826, 587, 588, 797, 589, 590, 591, + 592, 593, 594, -328, 36, 251, 35, -194, 800, 595, + 596, -193, 140, -85, 133, 134, 135, 582, 136, 137, + 1060, 751, 752, 753, 138, 38, 129, -110, -110, -585, + -32766, -585, -110,-32766,-32766,-32766, 241, 836, -110, 145, + 959, 960,-32766,-32766,-32766, 961, -594,-32766, 482, 745, + 744, 955, 1036, -594,-32766, 991,-32766,-32766,-32766,-32766, + -32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766, 299, 754, + 831, 75,-32766,-32766,-32766, 291, 142, 326, 242, -85, + 326, 382, 381, 265, 139, 404, 758, 759, 760, 761, + 82, 423, 429,-32766, 326,-32766,-32766,-32766,-32766, 815, + 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, + 791, 583, 792, 793, 794, 795, 783, 784, 345, 346, + 786, 787, 772, 773, 774, 776, 777, 778, 356, 818, + 819, 820, 821, 822, 584, 779, 780, 585, 586, 254, + 803, 801, 802, 814, 798, 799, 832, 725, 587, 588, + 797, 589, 590, 591, 592, 593, 594, -328, 83, 84, + 85, -194, 800, 595, 596, -193, 149, 775, 746, 747, + 748, 749, 750, 151, 751, 752, 753, 788, 789, 37, + 483, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, -594, 274, -594,-32766,-32766, + -32766,-32766,-32766,-32766, 310, 1089, 127, 312, 110, 737, + 1326, 21, 754,-32766,-32766,-32766, -272, 1325,-32766,-32766, + 1088,-32766,-32766,-32766,-32766,-32766, 755, 756, 757, 758, + 759, 760, 761, 1104,-32766, 824,-32766,-32766, -545, 429, + 1036, 323, 815, 762, 763, 764, 765, 766, 767, 768, + 769, 770, 771, 791, 813, 792, 793, 794, 795, 783, + 784, 785, 812, 786, 787, 772, 773, 774, 776, 777, + 778, 817, 818, 819, 820, 821, 822, 823, 779, 780, + 781, 782, 1033, 803, 801, 802, 814, 798, 799, 745, + 744, 790, 796, 797, 804, 805, 807, 806, 808, 809, + 152,-32766, -545, -545, 1036, 800, 811, 810, 50, 51, + 52, 513, 53, 54, 1240, 1239, 1241, -545, 55, 56, + -110, 57,-32766, 1090, 920, -110, 556, -110, 292, -551, + 339, -545, 306, 103, 104, -110, -110, -110, -110, -110, + -110, -110, -110, 105, 106, 107, 108, 109, 1245, 274, + 380, 381, -591, -367, 715, -367, 340, 58, 59, -591, + 423, 110, 60, 370, 61, 248, 249, 62, 63, 64, + 65, 66, 67, 68, 69, -544, 28, 267, 70, 445, + 514,-32766, 374, -342, 1272, 1273, 515, 1278, 835, 862, + 389, 863, 1270, 42, 25, 516, 943, 517, 943, 518, + 920, 519, 299, 1036, 520, 521, 1266, 910, 441, 44, + 45, 446, 377, 376,-32766, 46, 522, 1023, 1022, 1021, + 1024, 368, 338, 391, 1238, 7, 291, 442, 1231, 835, + 524, 525, 526, 443, 1245, 357, 1036, 362, 834, -544, + -544, 154, 528, 529, 444, 1259, 1260, 1261, 1262, 1256, + 1257, 298,-32766,-32766, -544, -548, 1059, 1263, 1258, 291, + 1236, 1240, 1239, 1241, 299, 841, -550, 71, -544, 656, + 26, 321, 322, 326, -153, -153, -153, 920, 612, 675, + 676, 1035, 922, 910,-32766, 286, 710, 835, 155, -153, + 828, -153, 862, -153, 863, -153, 150, 407, 156, 1240, + 1239, 1241,-32766,-32766,-32766, 375, 1351, 716, 75, 1352, + 158, -591, 33, -591, 326, 835, 959, 960, -78, -548, + -548, 523, 920,-32766, 378, 379, 896, 955, -110, -110, + -110, 32, 111, 112, 113, 114, 115, 116, 117, 118, + 119, 120, 121, 122, 123, 745, 744, -58, -548, -57, + -110, -110, 717, 745, 744, -110, 383, 384, 922, 1033, + 910, -110, 710, -153, 647, 648, 830, 124, 141, 125, + -32766, 1033, 326, 712, 1150, 1152, 48, 130, 131, 144, + 159, 1036,-32766, 160, 161, -543, 28, 162, 1238, 920, + 163, 299, 920, 1036, 75,-32766,-32766,-32766, 835,-32766, + 326,-32766, 1270,-32766, 282, 910,-32766, -87, -84, -78, + -73,-32766,-32766,-32766, -4, 920, 282,-32766,-32766, 720, + -72, -71, 727,-32766, 420, -70, -69, -68, -67, -66, + 287, 286,-32766, -65, -46, 922, 745, 744, 1231, 710, + 300, 301, -546, -18, 148, -302, 273, 283, 726, -543, + -543, 729, 528, 529, 920, 1259, 1260, 1261, 1262, 1256, + 1257, 919, 74, 147, -543, 288, 293, 1263, 1258, 126, + -298, 280, 910,-32766, 281, 910, 284, 73, -543, 1238, + 976, 690, 322, 326, 710, 285,-32766,-32766,-32766, 332, + -32766, 274,-32766, 294,-32766, 937, 110,-32766, 910, 685, + 835, -543,-32766,-32766,-32766, 826, -546, -546,-32766,-32766, + 146,-32766, -50, 701,-32766, 420, 703, 691, 20, 1119, + 375, -546, 436,-32766, 645, 1353, 1277, 297, 657,-32766, + 1279, 959, 960, 561, 956, -546, 523, 910, 692, 693, + 678, 527, 955, -110, -110, -110, 132, 922, 662, 663, + 922, 710, 464, -508, 710,-32766, 1240, 1239, 1241, 493, + 679, 1238, 282, 939, 10, -543, -543, 40,-32766,-32766, + -32766, 731,-32766, 922,-32766, 307,-32766, 710, -4,-32766, + -543, 305, 41, 304,-32766,-32766,-32766, 0, 0,-32766, + -32766,-32766, 920, 0, -543, 1238,-32766, 420, 311, 0, + 567, 299,-32766,-32766,-32766,-32766,-32766, -498,-32766, 897, + -32766, 0, 922,-32766, 8, 0, 710, 24,-32766,-32766, + -32766,-32766, 372, 610,-32766,-32766, 834, 1238, 734, -275, + -32766, 420, 920, 735,-32766,-32766,-32766, 854,-32766,-32766, + -32766, 901,-32766, 1000, 977,-32766, 49, 984, 974, 488, + -32766,-32766,-32766,-32766, 985, 899,-32766,-32766, 972, 1238, + 574, 1093,-32766, 420, 1096, 1097,-32766,-32766,-32766, 1094, + -32766,-32766,-32766, 1095,-32766, 910, 1101,-32766, 1267, 846, + 1292, 1310,-32766,-32766,-32766, 1344, 650, 34,-32766,-32766, + -579, -250, -250, -250,-32766, 420, -578, 375, -577, -551, + 28, 267, -550,-32766, -549, -492, 1, 29, 959, 960, + 302, 303, 835, 523, 30, 910, 1270, 39, 896, 955, + -110, -110, -110, 43, 47, 373, 72, 76, 77, 78, + 79, -249, -249, -249, 80, 81, 143, 375, 153, 128, + -273, 157, 247, 328, 357, 358, 359, 360, 959, 960, + 922, 361, 1231, 523, 710, -250, 362, 363, 896, 955, + -110, -110, -110, 364, 365, 366, 367, 529, 28, 1259, + 1260, 1261, 1262, 1256, 1257, 369, 437, 555, 1207, -272, + 835, 1263, 1258, 13, 1270, 14,-32766, 15, 16, 18, + 922, 73, 1238, 1348, 710, -249, 322, 326, 406,-32766, + -32766,-32766, 484,-32766, 485,-32766, 492,-32766, 495, 496, + -32766, 497, 498, 502, 503,-32766,-32766,-32766, 504, 511, + 1231,-32766,-32766, 572, 696, 1249, 1190,-32766, 420, 1268, + 1062, 1061, 1042, 1226, 1038, 529,-32766, 1259, 1260, 1261, + 1262, 1256, 1257, -277, -102, 12, 17, 27, 296, 1263, + 1258, 405, 603, 607, 636, 702, 1194, 1244, 1191, 73, + 320, 1323, 0, 371, 322, 326, 711, 714, 718, 719, + 721, 722, 723, 724, 728, 0, 713, 0, 1350, 857, + 856, 865, 949, 992, 864, 1349, 948, 946, 947, 950, + 1222, 930, 940, 928, 982, 983, 634, 1347, 1304, 1293, + 1311, 1320, 0, 0, 1271, 0, 326 + ); + + protected array $actionCheck = array( + 2, 3, 4, 5, 6, 7, 0, 9, 10, 11, + 12, 13, 70, 9, 10, 11, 9, 10, 11, 1, + 80, 44, 45, 46, 47, 48, 49, 50, 116, 117, + 118, 119, 120, 121, 122, 37, 38, 30, 1, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 1, 9, 10, 1, 57, 116, 117, 118, 119, + 120, 121, 122, 129, 130, 131, 8, 31, 1, 71, + 72, 73, 74, 75, 76, 77, 134, 135, 80, 82, + 1, 31, 85, 8, 30, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 1, 128, 129, 130, 131, + 132, 133, 82, 80, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 8, 147, 148, 8, 8, 150, 151, + 152, 8, 154, 31, 2, 3, 4, 5, 6, 7, + 162, 9, 10, 11, 12, 13, 8, 117, 118, 160, + 116, 162, 122, 9, 10, 11, 97, 159, 128, 8, + 117, 118, 9, 10, 11, 122, 1, 137, 31, 37, + 38, 128, 138, 8, 30, 159, 32, 33, 34, 35, + 36, 37, 38, 30, 9, 32, 33, 34, 158, 57, + 80, 161, 9, 10, 11, 161, 163, 167, 14, 97, + 167, 106, 107, 71, 72, 73, 74, 75, 76, 77, + 163, 116, 80, 30, 167, 32, 33, 34, 35, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 8, + 128, 129, 130, 131, 132, 133, 156, 163, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 162, 9, 10, + 11, 162, 150, 151, 152, 162, 154, 2, 3, 4, + 5, 6, 7, 14, 9, 10, 11, 12, 13, 30, + 163, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 160, 57, 162, 9, 10, + 11, 9, 10, 11, 8, 159, 14, 8, 69, 163, + 1, 101, 57, 9, 10, 11, 162, 8, 116, 30, + 1, 32, 33, 34, 35, 36, 71, 72, 73, 74, + 75, 76, 77, 123, 30, 80, 32, 33, 70, 80, + 138, 8, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 116, 128, 129, 130, 131, 132, 133, 37, + 38, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 14, 116, 134, 135, 138, 150, 151, 152, 2, 3, + 4, 5, 6, 7, 155, 156, 157, 149, 12, 13, + 101, 15, 137, 164, 1, 106, 85, 108, 30, 161, + 8, 163, 113, 49, 50, 116, 117, 118, 119, 120, + 121, 122, 123, 51, 52, 53, 54, 55, 1, 57, + 106, 107, 1, 106, 31, 108, 8, 51, 52, 8, + 116, 69, 56, 8, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 70, 70, 71, 72, 73, + 74, 116, 8, 164, 78, 79, 80, 146, 82, 106, + 8, 108, 86, 87, 88, 89, 122, 91, 122, 93, + 1, 95, 158, 138, 98, 99, 1, 84, 8, 103, + 104, 105, 106, 107, 116, 109, 110, 119, 120, 121, + 122, 115, 116, 106, 80, 108, 161, 8, 122, 82, + 124, 125, 126, 8, 1, 161, 138, 161, 155, 134, + 135, 14, 136, 137, 8, 139, 140, 141, 142, 143, + 144, 145, 51, 52, 149, 70, 1, 151, 152, 161, + 116, 155, 156, 157, 158, 8, 161, 161, 163, 75, + 76, 165, 166, 167, 75, 76, 77, 1, 52, 75, + 76, 137, 159, 84, 137, 30, 163, 82, 14, 90, + 80, 92, 106, 94, 108, 96, 101, 102, 14, 155, + 156, 157, 9, 10, 11, 106, 80, 31, 161, 83, + 14, 160, 14, 162, 167, 82, 117, 118, 16, 134, + 135, 122, 1, 30, 106, 107, 127, 128, 129, 130, + 131, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 37, 38, 16, 163, 16, + 117, 118, 31, 37, 38, 122, 106, 107, 159, 116, + 84, 128, 163, 164, 111, 112, 156, 16, 163, 16, + 137, 116, 167, 163, 59, 60, 70, 16, 16, 16, + 16, 138, 74, 16, 16, 70, 70, 16, 80, 1, + 16, 158, 1, 138, 161, 87, 88, 89, 82, 91, + 167, 93, 86, 95, 161, 84, 98, 31, 31, 31, + 31, 103, 104, 105, 0, 1, 161, 109, 110, 31, + 31, 31, 31, 115, 116, 31, 31, 31, 31, 31, + 37, 30, 124, 31, 31, 159, 37, 38, 122, 163, + 134, 135, 70, 31, 31, 35, 31, 31, 31, 134, + 135, 31, 136, 137, 1, 139, 140, 141, 142, 143, + 144, 31, 154, 31, 149, 37, 37, 151, 152, 163, + 35, 35, 84, 74, 35, 84, 35, 161, 163, 80, + 159, 80, 166, 167, 163, 35, 87, 88, 89, 35, + 91, 57, 93, 37, 95, 38, 69, 98, 84, 77, + 82, 70, 103, 104, 105, 80, 134, 135, 109, 110, + 70, 85, 31, 80, 115, 116, 92, 116, 97, 82, + 106, 149, 108, 124, 113, 83, 146, 113, 90, 137, + 146, 117, 118, 89, 128, 163, 122, 84, 137, 138, + 94, 127, 128, 129, 130, 131, 31, 159, 96, 100, + 159, 163, 97, 149, 163, 74, 155, 156, 157, 97, + 100, 80, 161, 154, 150, 134, 135, 159, 87, 88, + 89, 164, 91, 159, 93, 114, 95, 163, 164, 98, + 149, 133, 159, 132, 103, 104, 105, -1, -1, 74, + 109, 110, 1, -1, 163, 80, 115, 116, 132, -1, + 153, 158, 87, 88, 89, 124, 91, 149, 93, 164, + 95, -1, 159, 98, 149, -1, 163, 149, 103, 104, + 105, 74, 149, 153, 109, 110, 155, 80, 159, 162, + 115, 116, 1, 159, 87, 88, 89, 159, 91, 124, + 93, 159, 95, 159, 159, 98, 70, 159, 159, 102, + 103, 104, 105, 74, 159, 159, 109, 110, 159, 80, + 81, 159, 115, 116, 159, 159, 87, 88, 89, 159, + 91, 124, 93, 159, 95, 84, 159, 98, 160, 160, + 160, 160, 103, 104, 105, 160, 160, 163, 109, 110, + 161, 100, 101, 102, 115, 116, 161, 106, 161, 161, + 70, 71, 161, 124, 161, 161, 161, 161, 117, 118, + 134, 135, 82, 122, 161, 84, 86, 161, 127, 128, + 129, 130, 131, 161, 161, 149, 161, 161, 161, 161, + 161, 100, 101, 102, 161, 161, 161, 106, 161, 163, + 162, 161, 161, 161, 161, 161, 161, 161, 117, 118, + 159, 161, 122, 122, 163, 164, 161, 161, 127, 128, + 129, 130, 131, 161, 161, 161, 161, 137, 70, 139, + 140, 141, 142, 143, 144, 161, 161, 161, 165, 162, + 82, 151, 152, 162, 86, 162, 74, 162, 162, 162, + 159, 161, 80, 164, 163, 164, 166, 167, 162, 87, + 88, 89, 162, 91, 162, 93, 162, 95, 162, 162, + 98, 162, 162, 162, 162, 103, 104, 105, 162, 162, + 122, 109, 110, 162, 162, 162, 162, 115, 116, 162, + 162, 162, 162, 162, 162, 137, 124, 139, 140, 141, + 142, 143, 144, 162, 162, 162, 162, 162, 162, 151, + 152, 162, 162, 162, 162, 162, 162, 162, 162, 161, + 163, 162, -1, 163, 166, 167, 163, 163, 163, 163, + 163, 163, 163, 163, 163, -1, 163, -1, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, -1, -1, 166, -1, 167 + ); + + protected array $actionBase = array( + 0, -2, 152, 549, 764, 941, 981, 751, 555, 309, + 560, 864, 626, 738, 738, 741, 738, 473, 671, 783, + -60, 305, 305, 783, 305, 803, 803, 803, 658, 658, + 658, 658, 749, 749, 897, 897, 929, 865, 831, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, 1062, + 1062, 1062, 1062, 1062, 18, 36, 79, 648, 1036, 1044, + 1040, 1045, 1034, 1033, 1039, 1041, 1046, 1083, 1084, 782, + 1085, 1086, 1082, 1087, 1042, 876, 1035, 1043, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 195, 342, 43, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 643, 643, + 643, 666, 666, 354, 173, 980, 203, 1048, 1048, 1048, + 1048, 1048, 1048, 1048, 1048, 1048, 665, 339, 164, 164, + 7, 7, 7, 7, 7, 50, 369, 583, -23, -23, + -23, -23, 448, 605, 497, 260, 397, 434, 54, 394, + 593, 593, 316, 316, 415, 415, 316, 316, 316, 442, + 442, 252, 252, 252, 252, 318, 455, 433, 391, 742, + 53, 53, 53, 53, 742, 742, 742, 742, 734, 1088, + 742, 742, 742, 722, 781, 781, 926, 551, 551, 781, + 536, -3, -3, 536, 63, -3, 67, 576, 335, 756, + 115, 9, 335, 535, 656, 501, 185, 821, 568, 821, + 1032, 424, 776, 776, 426, 753, 729, 867, 1063, 1049, + 799, 1080, 810, 1081, -66, -58, 728, 1031, 1031, 1031, + 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1031, 1089, 402, + 1032, 130, 1089, 1089, 1089, 402, 402, 402, 402, 402, + 402, 402, 402, 402, 402, 603, 130, 544, 554, 130, + 804, 402, 18, 808, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 762, 157, 18, 36, 124, 124, + 196, 37, 124, 124, 124, 124, 18, 18, 18, 18, + 568, 784, 797, 600, 820, 143, 784, 784, 784, 122, + 135, 204, 139, 760, 785, 467, 775, 775, 787, 895, + 895, 775, 768, 775, 787, 913, 775, 775, 895, 895, + 793, 158, 550, 472, 524, 569, 895, 346, 775, 775, + 775, 775, 816, 575, 775, 271, 171, 775, 775, 816, + 801, 766, 58, 798, 895, 895, 895, 816, 505, 798, + 798, 798, 819, 824, 761, 765, 383, 349, 607, 138, + 807, 765, 765, 775, 532, 761, 765, 761, 765, 759, + 765, 765, 765, 761, 765, 768, 498, 765, 714, 586, + 75, 765, 6, 915, 916, 726, 917, 906, 918, 965, + 919, 923, 1053, 894, 931, 912, 924, 966, 903, 896, + 780, 701, 703, 815, 754, 893, 777, 777, 777, 888, + 777, 777, 777, 777, 777, 777, 777, 777, 701, 868, + 823, 794, 934, 711, 712, 1011, 730, 795, 963, 933, + 1013, 925, 758, 713, 977, 935, 757, 1047, 936, 940, + 986, 1014, 828, 1017, 979, 790, 1064, 1065, 869, 946, + 1054, 777, 915, 923, 727, 912, 924, 903, 896, 752, + 748, 746, 747, 745, 744, 739, 740, 763, 1018, 887, + 879, 870, 945, 891, 701, 871, 971, 874, 990, 992, + 1050, 805, 792, 875, 1066, 952, 953, 954, 1055, 1019, + 1056, 773, 973, 817, 994, 812, 1067, 996, 997, 999, + 1000, 1057, 1068, 1058, 885, 1059, 832, 788, 928, 802, + 1069, 299, 791, 800, 806, 964, 436, 932, 1060, 1070, + 1071, 1001, 1002, 1006, 1072, 1073, 927, 834, 975, 796, + 976, 967, 835, 838, 577, 779, 1020, 786, 789, 778, + 624, 634, 1074, 1075, 1076, 930, 767, 772, 839, 845, + 1021, 743, 1022, 1077, 646, 846, 717, 1078, 1012, 718, + 721, 652, 683, 681, 724, 774, 1061, 818, 811, 771, + 955, 721, 770, 849, 1079, 852, 855, 856, 1007, 860, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 456, 456, 456, 456, 456, 456, 305, 305, 305, 305, + 305, 456, 456, 456, 456, 456, 456, 456, 305, 305, + 0, 0, 305, 0, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, + 456, 456, 456, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 494, 494, 289, 289, 494, 289, 494, 494, 494, 494, + 494, 494, 494, 494, 494, 0, 289, 289, 289, 289, + 289, 289, 289, 289, 494, 793, 494, 442, 442, 442, + 442, 494, 494, 494, -88, -88, 442, 494, 63, 494, + 494, 494, 494, 494, 494, 494, 494, 494, 0, 0, + 494, 494, 494, 494, 0, 0, 130, -3, 494, 768, + 768, 768, 768, 494, 494, 494, 494, -3, -3, 494, + 494, 494, 0, 0, 0, 0, 442, 442, 0, 130, + 0, 0, 130, 0, 0, 768, 768, 494, 63, 793, + 359, 494, 0, 0, 0, 0, 130, 768, 130, 402, + 775, -3, -3, 775, 402, 402, 124, 18, 359, 545, + 545, 545, 545, 0, 0, 568, 793, 793, 793, 793, + 793, 793, 793, 793, 793, 793, 793, 768, 0, 793, + 0, 768, 768, 768, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 768, + 0, 0, 895, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 913, 0, 0, 0, 0, 0, 0, + 768, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 777, 805, 0, 805, 0, 777, 777, 777, 0, 0, + 0, 0, 779, 743 + ); + + protected array $actionDefault = array( + 3,32767, 102,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 100,32767,32767,32767,32767, 597, 597, + 597, 597,32767,32767, 254, 102,32767,32767, 470, 387, + 387, 387,32767,32767, 541, 541, 541, 541, 541, 541, + 32767,32767,32767,32767,32767,32767, 470,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 100, + 32767,32767,32767, 36, 7, 8, 10, 11, 49, 17, + 324,32767,32767,32767,32767, 102,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 590,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767, 474, 453, + 454, 456, 457, 386, 542, 596, 327, 593, 385, 145, + 339, 329, 242, 330, 258, 475, 259, 476, 479, 480, + 215, 287, 382, 149, 150, 417, 471, 419, 469, 473, + 418, 392, 398, 399, 400, 401, 402, 403, 404, 405, + 406, 407, 408, 409, 410, 390, 391, 472, 450, 449, + 448,32767,32767, 415, 416,32767, 420,32767,32767,32767, + 32767,32767,32767,32767, 102,32767, 389, 423, 421, 422, + 439, 440, 437, 438, 441,32767,32767,32767, 442, 443, + 444, 445, 316,32767,32767, 366, 364, 424, 316, 111, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 430, + 431,32767,32767,32767,32767, 535, 447,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 102,32767, 100, 537, 412, 414, 504, 425, 426, 393, + 32767, 511,32767, 102,32767, 513,32767,32767,32767,32767, + 32767,32767,32767, 536,32767, 543, 543,32767, 497, 100, + 195,32767,32767, 512,32767, 195, 195,32767,32767,32767, + 32767,32767,32767,32767,32767, 604, 497, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110,32767, 195, + 110,32767,32767,32767, 100, 195, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 190,32767, 268, 270, 102, + 558, 195,32767, 516,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 509,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 497, 435, 138,32767, 138, 543, 427, 428, 429, 499, + 543, 543, 543, 312, 289,32767,32767,32767,32767, 514, + 514, 100, 100, 100, 100, 509,32767,32767,32767,32767, + 111, 99, 99, 99, 99, 99, 103, 101,32767,32767, + 32767,32767, 223, 99,32767, 101, 101,32767,32767, 223, + 225, 212, 101, 227,32767, 562, 563, 223, 101, 227, + 227, 227, 247, 247, 486, 318, 101, 99, 101, 101, + 197, 318, 318,32767, 101, 486, 318, 486, 318, 199, + 318, 318, 318, 486, 318,32767, 101, 318, 214, 99, + 99, 318,32767,32767,32767, 499,32767,32767,32767,32767, + 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767, + 32767,32767, 530,32767, 547, 560, 433, 434, 436, 545, + 458, 459, 460, 461, 462, 463, 464, 466, 592,32767, + 503,32767,32767,32767, 338,32767, 602,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 603,32767, 543,32767,32767,32767, + 32767, 432, 9, 74, 492, 42, 43, 51, 57, 520, + 521, 522, 523, 517, 518, 524, 519,32767,32767, 525, + 568,32767,32767, 544, 595,32767,32767,32767,32767,32767, + 32767, 138,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767, 530,32767, 136,32767,32767,32767,32767, + 32767,32767,32767,32767, 526,32767,32767,32767, 543,32767, + 32767,32767,32767, 314, 311,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 543,32767,32767,32767,32767,32767, 291,32767, 308, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 286,32767,32767, 381, + 499, 294, 296, 297,32767,32767,32767,32767, 360,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 152, 152, 3, 3, 341, 152, 152, 152, 341, 341, + 152, 341, 341, 341, 152, 152, 152, 152, 152, 152, + 280, 185, 262, 265, 247, 247, 152, 352, 152 + ); + + protected array $goto = array( + 196, 196, 1034, 1065, 697, 431, 661, 621, 658, 319, + 706, 425, 314, 315, 335, 576, 430, 336, 432, 638, + 654, 655, 852, 672, 673, 674, 853, 167, 167, 167, + 167, 221, 197, 193, 193, 177, 179, 216, 193, 193, + 193, 193, 193, 194, 194, 194, 194, 194, 194, 188, + 189, 190, 191, 192, 218, 216, 219, 536, 537, 421, + 538, 540, 541, 542, 543, 544, 545, 546, 547, 1136, + 168, 169, 170, 195, 171, 172, 173, 166, 174, 175, + 176, 178, 215, 217, 220, 238, 243, 244, 246, 257, + 258, 259, 260, 261, 262, 263, 264, 268, 269, 270, + 271, 277, 289, 290, 317, 318, 426, 427, 428, 581, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 180, 237, 181, 198, 199, + 200, 239, 188, 189, 190, 191, 192, 218, 1136, 201, + 182, 183, 184, 202, 198, 185, 240, 203, 201, 165, + 204, 205, 186, 206, 207, 208, 187, 209, 210, 211, + 212, 213, 214, 855, 1232, 975, 279, 279, 279, 279, + 623, 623, 419, 351, 1269, 600, 1269, 1269, 1269, 1269, + 1269, 1269, 1269, 1269, 1269, 1287, 1287, 599, 1100, 1287, + 709, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, + 508, 700, 827, 1098, 458, 559, 552, 860, 833, 909, + 904, 905, 918, 861, 906, 858, 907, 908, 859, 1233, + 1234, 912, 500, 886, 501, 252, 252, 843, 1107, 1108, + 507, 1087, 1082, 1083, 1084, 341, 552, 559, 568, 569, + 344, 579, 602, 616, 617, 1235, 1295, 1296, 833, 440, + 833, 22, 250, 250, 250, 250, 245, 253, 694, 573, + 1237, 829, 1237, 893, 851, 893, 893, 1034, 1034, 1237, + 694, 349, 342, 1034, 694, 1034, 1034, 1034, 1034, 1034, + 1034, 1034, 1034, 1034, 848, 1327, 1034, 1034, 1034, 1034, + 1319, 1319, 1319, 1319, 1237, 343, 342, 1040, 1039, 1237, + 1237, 1237, 1237, 868, 996, 1237, 1237, 1237, 913, 355, + 914, 354, 354, 354, 354, 466, 466, 479, 880, 355, + 355, 867, 394, 926, 466, 481, 571, 927, 967, 410, + 705, 942, 355, 355, 942, 848, 355, 660, 1354, 609, + 624, 627, 628, 629, 630, 651, 652, 653, 708, 554, + 1133, 1285, 1285, 355, 355, 1285, 1058, 1285, 1285, 1285, + 1285, 1285, 1285, 1285, 1285, 1285, 539, 539, 1185, 424, + 539, 611, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 566, 682, 1337, 1337, 733, 637, 639, 1043, 1044, + 659, 476, 1312, 1313, 683, 687, 1010, 695, 704, 1006, + 1337, 1298, 438, 408, 409, 631, 633, 635, 670, 5, + 671, 6, 412, 413, 414, 337, 684, 1340, 1340, 415, + 325, 309, 686, 347, 352, 353, 553, 563, 450, 450, + 450, 553, 1309, 563, 1309, 666, 397, 462, 845, 1314, + 1315, 1309, 548, 548, 548, 548, 873, 604, 469, 580, + 470, 471, 403, 554, 878, 848, 958, 1345, 1346, 577, + 614, 870, 550, 615, 550, 255, 255, 1321, 1321, 1321, + 1321, 550, 999, 1018, 477, 971, 1228, 732, 736, 881, + 869, 1070, 1074, 876, 882, 551, 1008, 1003, 1071, 1075, + 978, 980, 0, 1305, 1118, 0, 456, 0, 0, 0, + 0, 969, 969, 969, 969, 0, 0, 456, 963, 970, + 0, 0, 0, 0, 968, 0, 1230, 0, 0, 0, + 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, + 450, 931, 1123, 450, 0, 1073, 1116, 885, 619, 1307, + 1307, 1073, 1216, 944, 1015, 433, 1217, 1220, 945, 1221, + 0, 433, 872, 0, 664, 994, 0, 1041, 1041, 0, + 866, 0, 0, 0, 665, 1052, 1048, 1049, 0, 0, + 0, 0, 1227, 324, 275, 324, 1037, 1037, 681, 952, + 0, 0, 1029, 1045, 1046, 396, 399, 560, 601, 605, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1013, 1013 + ); + + protected array $gotoCheck = array( + 42, 42, 73, 127, 73, 66, 66, 56, 56, 66, + 9, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 86, 86, 26, 86, 86, 86, 27, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 15, 20, 49, 23, 23, 23, 23, + 108, 108, 43, 97, 108, 130, 108, 108, 108, 108, + 108, 108, 108, 108, 108, 170, 170, 8, 8, 170, + 8, 170, 170, 170, 170, 170, 170, 170, 170, 170, + 8, 8, 6, 8, 83, 76, 76, 15, 12, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 20, + 20, 15, 155, 45, 155, 5, 5, 20, 144, 144, + 155, 15, 15, 15, 15, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 20, 20, 20, 12, 83, + 12, 76, 5, 5, 5, 5, 5, 5, 7, 172, + 73, 7, 73, 25, 25, 25, 25, 73, 73, 73, + 7, 179, 168, 73, 7, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 22, 181, 73, 73, 73, 73, + 9, 9, 9, 9, 73, 168, 168, 118, 118, 73, + 73, 73, 73, 35, 103, 73, 73, 73, 65, 14, + 65, 24, 24, 24, 24, 149, 149, 84, 35, 14, + 14, 35, 62, 73, 149, 84, 104, 73, 93, 93, + 93, 9, 14, 14, 9, 22, 14, 64, 14, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 14, + 150, 171, 171, 14, 14, 171, 114, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 173, 173, 151, 13, + 173, 13, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 48, 116, 182, 182, 48, 48, 48, 119, 119, + 48, 176, 176, 176, 48, 48, 48, 48, 48, 48, + 182, 14, 113, 82, 82, 85, 85, 85, 82, 46, + 82, 46, 82, 82, 82, 29, 82, 182, 182, 82, + 169, 169, 14, 82, 97, 97, 9, 9, 23, 23, + 23, 9, 130, 9, 130, 120, 9, 9, 18, 178, + 178, 130, 107, 107, 107, 107, 39, 107, 9, 9, + 9, 9, 28, 14, 9, 22, 92, 9, 9, 2, + 2, 37, 19, 80, 19, 5, 5, 130, 130, 130, + 130, 19, 50, 110, 157, 50, 160, 50, 99, 16, + 16, 16, 16, 9, 41, 50, 50, 50, 129, 132, + 16, 96, -1, 130, 147, -1, 19, -1, -1, -1, + -1, 19, 19, 19, 19, -1, -1, 19, 19, 19, + -1, -1, -1, -1, 16, -1, 14, -1, -1, -1, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 17, 17, 23, -1, 130, 16, 16, 17, 130, + 130, 130, 79, 79, 17, 117, 79, 79, 79, 79, + -1, 117, 17, -1, 17, 17, -1, 117, 117, -1, + 17, -1, -1, -1, 117, 117, 117, 117, -1, -1, + -1, -1, 17, 24, 24, 24, 89, 89, 89, 89, + -1, -1, 89, 89, 89, 59, 59, 59, 59, 59, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 107, 107 + ); + + protected array $gotoBase = array( + 0, 0, -253, 0, 0, 224, 182, 251, 179, -10, + 0, 0, -89, 32, 11, -185, 27, 66, 128, 197, + -229, 0, 5, 163, 308, 260, 18, 22, 115, 118, + 0, 0, 0, 0, 0, -68, 0, 122, 0, 123, + 0, 43, -1, 153, 0, 200, -327, 0, -330, 147, + 460, 0, 0, 0, 0, 0, -33, 0, 0, 540, + 0, 0, 280, 0, 95, 294, -236, 0, 0, 0, + 0, 0, 0, -5, 0, 0, -140, 0, 0, 134, + 119, -19, -88, -75, -152, -74, -698, 0, 0, 296, + 0, 0, 127, 23, 0, 0, 48, -310, 0, 71, + 0, 0, 0, 269, 283, 0, 0, 414, -71, 0, + 103, 0, 0, 124, 83, 0, 100, 273, 17, 104, + 144, 0, 0, 0, 0, 0, 0, 1, 0, 114, + 167, 0, 47, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, -47, 0, 0, 50, 0, 281, + 105, 94, 0, 0, 0, -273, 0, 34, 0, 0, + 107, 0, 0, 0, 0, 0, 0, 0, -26, 99, + -56, 110, 230, 125, 0, 0, 90, 0, 67, 241, + 0, 254, 75, 0, 0 + ); + + protected array $gotoDefault = array( + -32768, 512, 740, 4, 741, 935, 816, 825, 597, 530, + 707, 348, 625, 422, 1303, 911, 1122, 578, 844, 1246, + 1254, 457, 847, 330, 730, 923, 894, 895, 400, 386, + 392, 398, 649, 626, 494, 879, 453, 871, 486, 874, + 452, 883, 164, 418, 510, 887, 3, 890, 557, 921, + 973, 387, 898, 388, 677, 900, 562, 902, 903, 395, + 401, 402, 1127, 570, 622, 915, 256, 564, 916, 385, + 917, 925, 390, 393, 688, 465, 505, 499, 411, 1102, + 565, 608, 646, 447, 473, 620, 632, 618, 480, 434, + 416, 329, 957, 965, 487, 463, 979, 350, 987, 738, + 1135, 640, 489, 995, 641, 1002, 1005, 531, 532, 478, + 1017, 272, 1020, 490, 19, 667, 1031, 1032, 668, 642, + 1054, 643, 669, 644, 1056, 472, 598, 1064, 454, 1072, + 1291, 455, 1076, 266, 1079, 278, 417, 435, 1085, 1086, + 9, 1092, 698, 699, 11, 276, 509, 1117, 689, 451, + 1134, 439, 1204, 1206, 558, 491, 1224, 1223, 680, 506, + 1229, 448, 1294, 449, 533, 474, 316, 534, 1338, 308, + 333, 313, 549, 295, 334, 535, 475, 1300, 1308, 331, + 31, 1328, 1339, 575, 613 + ); + + protected array $ruleToNonTerminal = array( + 0, 1, 3, 3, 2, 5, 5, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 7, 7, 7, 7, 8, 8, 9, 10, 11, + 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, + 16, 17, 17, 18, 18, 21, 21, 22, 23, 23, + 24, 24, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 29, 29, 30, 30, 32, 34, 34, + 28, 36, 36, 33, 38, 38, 35, 35, 37, 37, + 39, 39, 31, 40, 40, 41, 43, 44, 44, 45, + 45, 46, 46, 48, 47, 47, 47, 47, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 25, 25, 50, 69, 69, 72, 72, 71, + 70, 70, 63, 75, 75, 76, 76, 77, 77, 78, + 78, 79, 79, 80, 80, 26, 26, 27, 27, 27, + 27, 27, 88, 88, 90, 90, 83, 83, 91, 91, + 92, 92, 92, 84, 84, 87, 87, 85, 85, 93, + 94, 94, 57, 57, 65, 65, 68, 68, 68, 67, + 95, 95, 96, 58, 58, 58, 58, 97, 97, 98, + 98, 99, 99, 100, 101, 101, 102, 102, 103, 103, + 55, 55, 51, 51, 105, 53, 53, 106, 52, 52, + 54, 54, 64, 64, 64, 64, 81, 81, 109, 109, + 111, 111, 112, 112, 112, 112, 110, 110, 110, 114, + 114, 114, 114, 89, 89, 117, 117, 117, 118, 118, + 115, 115, 119, 119, 121, 121, 122, 122, 116, 123, + 123, 120, 124, 124, 124, 124, 113, 113, 82, 82, + 82, 20, 20, 20, 126, 125, 125, 127, 127, 127, + 127, 60, 128, 128, 129, 61, 131, 131, 132, 132, + 133, 133, 86, 134, 134, 134, 134, 134, 134, 134, + 139, 139, 140, 140, 141, 141, 141, 141, 141, 142, + 143, 143, 138, 138, 135, 135, 137, 137, 145, 145, + 144, 144, 144, 144, 144, 144, 144, 136, 146, 146, + 148, 147, 147, 62, 104, 149, 149, 56, 56, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 156, 150, 150, 155, 155, 158, 159, + 159, 160, 161, 162, 162, 162, 162, 19, 19, 73, + 73, 73, 73, 151, 151, 151, 151, 164, 164, 152, + 152, 154, 154, 154, 157, 157, 170, 170, 170, 170, + 170, 170, 170, 170, 170, 171, 171, 171, 108, 173, + 173, 173, 173, 153, 153, 153, 153, 153, 153, 153, + 153, 59, 59, 167, 167, 167, 167, 174, 174, 163, + 163, 163, 175, 175, 175, 175, 175, 175, 74, 74, + 66, 66, 66, 66, 130, 130, 130, 130, 178, 177, + 166, 166, 166, 166, 166, 166, 166, 165, 165, 165, + 176, 176, 176, 176, 107, 172, 180, 180, 179, 179, + 181, 181, 181, 181, 181, 181, 181, 181, 169, 169, + 169, 169, 168, 183, 182, 182, 182, 182, 182, 182, + 182, 182, 184, 184, 184, 184 + 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 1, 3, 1, 2, 2, + 3, 2, 3, 1, 1, 2, 3, 1, 1, 3, + 2, 0, 1, 5, 5, 6, 10, 3, 5, 1, + 1, 3, 0, 2, 4, 5, 4, 4, 4, 3, + 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, + 1, 1, 3, 2, 2, 3, 1, 0, 1, 1, + 3, 3, 3, 4, 4, 1, 1, 2, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 5, 4, + 3, 4, 4, 2, 2, 4, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, + 1, 2, 4, 2, 2, 8, 9, 8, 9, 9, + 10, 9, 10, 8, 3, 2, 0, 4, 2, 1, + 3, 2, 1, 2, 2, 2, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 0, + 3, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 5, 3, 3, 4, + 1, 1, 3, 1, 1, 1, 1, 1, 3, 2, + 3, 0, 1, 1, 3, 1, 1, 1, 1, 1, + 3, 1, 1, 4, 4, 1, 4, 4, 0, 1, + 1, 1, 3, 3, 1, 4, 2, 2, 1, 3, + 1, 4, 4, 3, 3, 3, 3, 1, 3, 1, + 1, 3, 1, 1, 4, 1, 1, 1, 3, 1, + 1, 2, 1, 3, 4, 3, 2, 0, 2, 2, + 1, 2, 1, 1, 1, 4, 3, 3, 3, 3, + 6, 3, 1, 1, 2, 1 + ); + + protected function initReduceCallbacks(): void { + $this->reduceCallbacks = [ + 0 => null, + 1 => function ($stackPos) { + $this->semValue = $this->handleNamespaces($this->semStack[$stackPos-(1-1)]); + }, + 2 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; + }, + 3 => function ($stackPos) { + $this->semValue = array(); + }, + 4 => function ($stackPos) { + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 5 => null, + 6 => null, + 7 => null, + 8 => null, + 9 => null, + 10 => null, + 11 => null, + 12 => null, + 13 => null, + 14 => null, + 15 => null, + 16 => null, + 17 => null, + 18 => null, + 19 => null, + 20 => null, + 21 => null, + 22 => null, + 23 => null, + 24 => null, + 25 => null, + 26 => null, + 27 => null, + 28 => null, + 29 => null, + 30 => null, + 31 => null, + 32 => null, + 33 => null, + 34 => null, + 35 => null, + 36 => null, + 37 => null, + 38 => null, + 39 => null, + 40 => null, + 41 => null, + 42 => null, + 43 => null, + 44 => null, + 45 => null, + 46 => null, + 47 => null, + 48 => null, + 49 => null, + 50 => null, + 51 => null, + 52 => null, + 53 => null, + 54 => null, + 55 => null, + 56 => null, + 57 => null, + 58 => null, + 59 => null, + 60 => null, + 61 => null, + 62 => null, + 63 => null, + 64 => null, + 65 => null, + 66 => null, + 67 => null, + 68 => null, + 69 => null, + 70 => null, + 71 => null, + 72 => null, + 73 => null, + 74 => null, + 75 => null, + 76 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; if ($this->semValue === "<?=") $this->emitError(new Error('Cannot use "<?=" as an identifier', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + }, + 77 => null, + 78 => null, + 79 => null, + 80 => null, + 81 => null, + 82 => null, + 83 => null, + 84 => null, + 85 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 86 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 87 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 88 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 89 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 90 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 91 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 92 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 93 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 94 => null, + 95 => function ($stackPos) { + $this->semValue = new Name(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 96 => function ($stackPos) { + $this->semValue = new Expr\Variable(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 97 => function ($stackPos) { + /* nothing */ + }, + 98 => function ($stackPos) { + /* nothing */ + }, + 99 => function ($stackPos) { + /* nothing */ + }, + 100 => function ($stackPos) { + $this->emitError(new Error('A trailing comma is not allowed here', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]))); + }, + 101 => null, + 102 => null, + 103 => function ($stackPos) { + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(1-1)], [], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 104 => function ($stackPos) { + $this->semValue = new Node\Attribute($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 105 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 106 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 107 => function ($stackPos) { + $this->semValue = new Node\AttributeGroup($this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 108 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 109 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 110 => function ($stackPos) { + $this->semValue = []; + }, + 111 => null, + 112 => null, + 113 => null, + 114 => null, + 115 => function ($stackPos) { + $this->semValue = new Stmt\HaltCompiler($this->handleHaltCompiler(), $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 116 => function ($stackPos) { + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(3-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_SEMICOLON); + $this->checkNamespace($this->semValue); + }, + 117 => function ($stackPos) { + $this->semValue = new Stmt\Namespace_($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $this->checkNamespace($this->semValue); + }, + 118 => function ($stackPos) { + $this->semValue = new Stmt\Namespace_(null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + $this->semValue->setAttribute('kind', Stmt\Namespace_::KIND_BRACED); + $this->checkNamespace($this->semValue); + }, + 119 => function ($stackPos) { + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(3-2)], Stmt\Use_::TYPE_NORMAL, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 120 => function ($stackPos) { + $this->semValue = new Stmt\Use_($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 121 => null, + 122 => function ($stackPos) { + $this->semValue = new Stmt\Const_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 123 => function ($stackPos) { + $this->semValue = Stmt\Use_::TYPE_FUNCTION; + }, + 124 => function ($stackPos) { + $this->semValue = Stmt\Use_::TYPE_CONSTANT; + }, + 125 => function ($stackPos) { + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + }, + 126 => function ($stackPos) { + $this->semValue = new Stmt\GroupUse($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-5)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + }, + 127 => null, + 128 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 129 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 130 => null, + 131 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 132 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 133 => null, + 134 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 135 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 136 => function ($stackPos) { + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + }, + 137 => function ($stackPos) { + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + }, + 138 => function ($stackPos) { + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(1-1)], null, Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(1-1)); + }, + 139 => function ($stackPos) { + $this->semValue = new Node\UseItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], Stmt\Use_::TYPE_UNKNOWN, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->checkUseUse($this->semValue, $stackPos-(3-3)); + }, + 140 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->semValue->type = Stmt\Use_::TYPE_NORMAL; + }, + 141 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; $this->semValue->type = $this->semStack[$stackPos-(2-1)]; + }, + 142 => null, + 143 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 144 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 145 => function ($stackPos) { + $this->semValue = new Node\Const_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 146 => null, + 147 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 148 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 149 => function ($stackPos) { + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 150 => function ($stackPos) { + $this->semValue = new Node\Const_(new Node\Identifier($this->semStack[$stackPos-(3-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos-(3-1)])), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 151 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; } $this->semValue = $this->semStack[$stackPos-(2-1)];; + }, + 152 => function ($stackPos) { + $this->semValue = array(); + }, + 153 => function ($stackPos) { + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 154 => null, + 155 => null, + 156 => null, + 157 => function ($stackPos) { + throw new Error('__HALT_COMPILER() can only be used from the outermost scope', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 158 => function ($stackPos) { + $this->semValue = new Stmt\Block($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 159 => function ($stackPos) { + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(7-3)], ['stmts' => $this->semStack[$stackPos-(7-5)], 'elseifs' => $this->semStack[$stackPos-(7-6)], 'else' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + }, + 160 => function ($stackPos) { + $this->semValue = new Stmt\If_($this->semStack[$stackPos-(10-3)], ['stmts' => $this->semStack[$stackPos-(10-6)], 'elseifs' => $this->semStack[$stackPos-(10-7)], 'else' => $this->semStack[$stackPos-(10-8)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + }, + 161 => function ($stackPos) { + $this->semValue = new Stmt\While_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 162 => function ($stackPos) { + $this->semValue = new Stmt\Do_($this->semStack[$stackPos-(7-5)], $this->semStack[$stackPos-(7-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + }, + 163 => function ($stackPos) { + $this->semValue = new Stmt\For_(['init' => $this->semStack[$stackPos-(9-3)], 'cond' => $this->semStack[$stackPos-(9-5)], 'loop' => $this->semStack[$stackPos-(9-7)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + }, + 164 => function ($stackPos) { + $this->semValue = new Stmt\Switch_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 165 => function ($stackPos) { + $this->semValue = new Stmt\Break_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 166 => function ($stackPos) { + $this->semValue = new Stmt\Continue_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 167 => function ($stackPos) { + $this->semValue = new Stmt\Return_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 168 => function ($stackPos) { + $this->semValue = new Stmt\Global_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 169 => function ($stackPos) { + $this->semValue = new Stmt\Static_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 170 => function ($stackPos) { + $this->semValue = new Stmt\Echo_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 171 => function ($stackPos) { + + $this->semValue = new Stmt\InlineHTML($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + $this->semValue->setAttribute('hasLeadingNewline', $this->inlineHtmlHasLeadingNewline($stackPos-(1-1))); + + }, + 172 => function ($stackPos) { + $this->semValue = new Stmt\Expression($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 173 => function ($stackPos) { + $this->semValue = new Stmt\Unset_($this->semStack[$stackPos-(5-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 174 => function ($stackPos) { + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-5)][0], ['keyVar' => null, 'byRef' => $this->semStack[$stackPos-(7-5)][1], 'stmts' => $this->semStack[$stackPos-(7-7)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + }, + 175 => function ($stackPos) { + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(9-3)], $this->semStack[$stackPos-(9-7)][0], ['keyVar' => $this->semStack[$stackPos-(9-5)], 'byRef' => $this->semStack[$stackPos-(9-7)][1], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + }, + 176 => function ($stackPos) { + $this->semValue = new Stmt\Foreach_($this->semStack[$stackPos-(6-3)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-4)], $this->tokenEndStack[$stackPos-(6-4)])), ['stmts' => $this->semStack[$stackPos-(6-6)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + }, + 177 => function ($stackPos) { + $this->semValue = new Stmt\Declare_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 178 => function ($stackPos) { + $this->semValue = new Stmt\TryCatch($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->checkTryCatch($this->semValue); + }, + 179 => function ($stackPos) { + $this->semValue = new Stmt\Goto_($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 180 => function ($stackPos) { + $this->semValue = new Stmt\Label($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 181 => function ($stackPos) { + $this->semValue = null; /* means: no statement */ + }, + 182 => null, + 183 => function ($stackPos) { + $this->semValue = $this->maybeCreateNop($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); + }, + 184 => function ($stackPos) { + if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; + }, + 185 => function ($stackPos) { + $this->semValue = array(); + }, + 186 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 187 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 188 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 189 => function ($stackPos) { + $this->semValue = new Stmt\Catch_($this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-7)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + }, + 190 => function ($stackPos) { + $this->semValue = null; + }, + 191 => function ($stackPos) { + $this->semValue = new Stmt\Finally_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 192 => null, + 193 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 194 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 195 => function ($stackPos) { + $this->semValue = false; + }, + 196 => function ($stackPos) { + $this->semValue = true; + }, + 197 => function ($stackPos) { + $this->semValue = false; + }, + 198 => function ($stackPos) { + $this->semValue = true; + }, + 199 => function ($stackPos) { + $this->semValue = false; + }, + 200 => function ($stackPos) { + $this->semValue = true; + }, + 201 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 202 => function ($stackPos) { + $this->semValue = []; + }, + 203 => null, + 204 => function ($stackPos) { + $this->semValue = new Node\Identifier($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 205 => function ($stackPos) { + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(8-3)], ['byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-5)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + }, + 206 => function ($stackPos) { + $this->semValue = new Stmt\Function_($this->semStack[$stackPos-(9-4)], ['byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + }, + 207 => function ($stackPos) { + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(7-2)], ['type' => $this->semStack[$stackPos-(7-1)], 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + $this->checkClass($this->semValue, $stackPos-(7-2)); + }, + 208 => function ($stackPos) { + $this->semValue = new Stmt\Class_($this->semStack[$stackPos-(8-3)], ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + $this->checkClass($this->semValue, $stackPos-(8-3)); + }, + 209 => function ($stackPos) { + $this->semValue = new Stmt\Interface_($this->semStack[$stackPos-(7-3)], ['extends' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)], 'attrGroups' => $this->semStack[$stackPos-(7-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + $this->checkInterface($this->semValue, $stackPos-(7-3)); + }, + 210 => function ($stackPos) { + $this->semValue = new Stmt\Trait_($this->semStack[$stackPos-(6-3)], ['stmts' => $this->semStack[$stackPos-(6-5)], 'attrGroups' => $this->semStack[$stackPos-(6-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + }, + 211 => function ($stackPos) { + $this->semValue = new Stmt\Enum_($this->semStack[$stackPos-(8-3)], ['scalarType' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + $this->checkEnum($this->semValue, $stackPos-(8-3)); + }, + 212 => function ($stackPos) { + $this->semValue = null; + }, + 213 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 214 => function ($stackPos) { + $this->semValue = null; + }, + 215 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 216 => function ($stackPos) { + $this->semValue = 0; + }, + 217 => null, + 218 => null, + 219 => function ($stackPos) { + $this->checkClassModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + }, + 220 => function ($stackPos) { + $this->semValue = Modifiers::ABSTRACT; + }, + 221 => function ($stackPos) { + $this->semValue = Modifiers::FINAL; + }, + 222 => function ($stackPos) { + $this->semValue = Modifiers::READONLY; + }, + 223 => function ($stackPos) { + $this->semValue = null; + }, + 224 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 225 => function ($stackPos) { + $this->semValue = array(); + }, + 226 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 227 => function ($stackPos) { + $this->semValue = array(); + }, + 228 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 229 => null, + 230 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 231 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 232 => null, + 233 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 234 => null, + 235 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 236 => function ($stackPos) { + if ($this->semStack[$stackPos-(1-1)] instanceof Stmt\Block) { $this->semValue = $this->semStack[$stackPos-(1-1)]->stmts; } else if ($this->semStack[$stackPos-(1-1)] === null) { $this->semValue = []; } else { $this->semValue = [$this->semStack[$stackPos-(1-1)]]; }; + }, + 237 => function ($stackPos) { + $this->semValue = null; + }, + 238 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 239 => null, + 240 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 241 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 242 => function ($stackPos) { + $this->semValue = new Node\DeclareItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 243 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 244 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-3)]; + }, + 245 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 246 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(5-3)]; + }, + 247 => function ($stackPos) { + $this->semValue = array(); + }, + 248 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 249 => function ($stackPos) { + $this->semValue = new Stmt\Case_($this->semStack[$stackPos-(4-2)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 250 => function ($stackPos) { + $this->semValue = new Stmt\Case_(null, $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 251 => null, + 252 => null, + 253 => function ($stackPos) { + $this->semValue = new Expr\Match_($this->semStack[$stackPos-(7-3)], $this->semStack[$stackPos-(7-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(7-1)], $this->tokenEndStack[$stackPos])); + }, + 254 => function ($stackPos) { + $this->semValue = []; + }, + 255 => null, + 256 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 257 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 258 => function ($stackPos) { + $this->semValue = new Node\MatchArm($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 259 => function ($stackPos) { + $this->semValue = new Node\MatchArm(null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 260 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 261 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 262 => function ($stackPos) { + $this->semValue = array(); + }, + 263 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 264 => function ($stackPos) { + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 265 => function ($stackPos) { + $this->semValue = array(); + }, + 266 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 267 => function ($stackPos) { + $this->semValue = new Stmt\ElseIf_($this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-6)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + }, + 268 => function ($stackPos) { + $this->semValue = null; + }, + 269 => function ($stackPos) { + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 270 => function ($stackPos) { + $this->semValue = null; + }, + 271 => function ($stackPos) { + $this->semValue = new Stmt\Else_($this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->fixupAlternativeElse($this->semValue); + }, + 272 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 273 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-2)], true); + }, + 274 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)], false); + }, + 275 => function ($stackPos) { + $this->semValue = array($this->fixupArrayDestructuring($this->semStack[$stackPos-(1-1)]), false); + }, + 276 => null, + 277 => function ($stackPos) { + $this->semValue = array(); + }, + 278 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 279 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 280 => function ($stackPos) { + $this->semValue = 0; + }, + 281 => function ($stackPos) { + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + }, + 282 => function ($stackPos) { + $this->semValue = Modifiers::PUBLIC; + }, + 283 => function ($stackPos) { + $this->semValue = Modifiers::PROTECTED; + }, + 284 => function ($stackPos) { + $this->semValue = Modifiers::PRIVATE; + }, + 285 => function ($stackPos) { + $this->semValue = Modifiers::READONLY; + }, + 286 => function ($stackPos) { + $this->semValue = new Node\Param($this->semStack[$stackPos-(6-6)], null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + $this->checkParam($this->semValue); + }, + 287 => function ($stackPos) { + $this->semValue = new Node\Param($this->semStack[$stackPos-(8-6)], $this->semStack[$stackPos-(8-8)], $this->semStack[$stackPos-(8-3)], $this->semStack[$stackPos-(8-4)], $this->semStack[$stackPos-(8-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(8-2)], $this->semStack[$stackPos-(8-1)]); + $this->checkParam($this->semValue); + }, + 288 => function ($stackPos) { + $this->semValue = new Node\Param(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])), null, $this->semStack[$stackPos-(6-3)], $this->semStack[$stackPos-(6-4)], $this->semStack[$stackPos-(6-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-1)]); + }, + 289 => null, + 290 => function ($stackPos) { + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 291 => function ($stackPos) { + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 292 => null, + 293 => null, + 294 => function ($stackPos) { + $this->semValue = new Node\Name('static', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 295 => function ($stackPos) { + $this->semValue = $this->handleBuiltinTypes($this->semStack[$stackPos-(1-1)]); + }, + 296 => function ($stackPos) { + $this->semValue = new Node\Identifier('array', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 297 => function ($stackPos) { + $this->semValue = new Node\Identifier('callable', $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 298 => null, + 299 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 300 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 301 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 302 => null, + 303 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 304 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 305 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 306 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 307 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 308 => function ($stackPos) { + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 309 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 310 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 311 => function ($stackPos) { + $this->semValue = new Node\IntersectionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 312 => null, + 313 => function ($stackPos) { + $this->semValue = new Node\NullableType($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 314 => function ($stackPos) { + $this->semValue = new Node\UnionType($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 315 => null, + 316 => function ($stackPos) { + $this->semValue = null; + }, + 317 => null, + 318 => function ($stackPos) { + $this->semValue = null; + }, + 319 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-2)]; + }, + 320 => function ($stackPos) { + $this->semValue = null; + }, + 321 => function ($stackPos) { + $this->semValue = array(); + }, + 322 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 323 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-2)]); + }, + 324 => function ($stackPos) { + $this->semValue = new Node\VariadicPlaceholder($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 325 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 326 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 327 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 328 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 329 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 330 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(3-3)], false, false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(3-1)]); + }, + 331 => null, + 332 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 333 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 334 => null, + 335 => null, + 336 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 337 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 338 => function ($stackPos) { + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 339 => function ($stackPos) { + $this->semValue = new Node\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 340 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } else { $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, + 341 => function ($stackPos) { + $this->semValue = array(); + }, + 342 => function ($stackPos) { + $nop = $this->maybeCreateZeroLengthNop($this->tokenPos);; + if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 343 => function ($stackPos) { + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(5-2)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-1)]); + $this->checkProperty($this->semValue, $stackPos-(5-2)); + }, + 344 => function ($stackPos) { + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(5-1)]); + $this->checkClassConst($this->semValue, $stackPos-(5-2)); + }, + 345 => function ($stackPos) { + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(6-5)], $this->semStack[$stackPos-(6-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos]), $this->semStack[$stackPos-(6-1)], $this->semStack[$stackPos-(6-4)]); + $this->checkClassConst($this->semValue, $stackPos-(6-2)); + }, + 346 => function ($stackPos) { + $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(10-5)], ['type' => $this->semStack[$stackPos-(10-2)], 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-7)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + $this->checkClassMethod($this->semValue, $stackPos-(10-2)); + }, + 347 => function ($stackPos) { + $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 348 => function ($stackPos) { + $this->semValue = new Stmt\EnumCase($this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->semStack[$stackPos-(5-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 349 => function ($stackPos) { + $this->semValue = null; /* will be skipped */ + }, + 350 => function ($stackPos) { + $this->semValue = array(); + }, + 351 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 352 => function ($stackPos) { + $this->semValue = array(); + }, + 353 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 354 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 355 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 356 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 357 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 358 => function ($stackPos) { + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 359 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + }, + 360 => null, + 361 => function ($stackPos) { + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + }, + 362 => function ($stackPos) { + $this->semValue = null; + }, + 363 => null, + 364 => null, + 365 => function ($stackPos) { + $this->semValue = 0; + }, + 366 => function ($stackPos) { + $this->semValue = 0; + }, + 367 => null, + 368 => null, + 369 => function ($stackPos) { + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + }, + 370 => function ($stackPos) { + $this->semValue = Modifiers::PUBLIC; + }, + 371 => function ($stackPos) { + $this->semValue = Modifiers::PROTECTED; + }, + 372 => function ($stackPos) { + $this->semValue = Modifiers::PRIVATE; + }, + 373 => function ($stackPos) { + $this->semValue = Modifiers::STATIC; + }, + 374 => function ($stackPos) { + $this->semValue = Modifiers::ABSTRACT; + }, + 375 => function ($stackPos) { + $this->semValue = Modifiers::FINAL; + }, + 376 => function ($stackPos) { + $this->semValue = Modifiers::READONLY; + }, + 377 => null, + 378 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 379 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 380 => function ($stackPos) { + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 381 => function ($stackPos) { + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(1-1)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 382 => function ($stackPos) { + $this->semValue = new Node\PropertyItem($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 383 => null, + 384 => null, + 385 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 386 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 387 => function ($stackPos) { + $this->semValue = array(); + }, + 388 => null, + 389 => null, + 390 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 391 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->fixupArrayDestructuring($this->semStack[$stackPos-(3-1)]), $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 392 => function ($stackPos) { + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 393 => function ($stackPos) { + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 394 => function ($stackPos) { + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + if (!$this->phpVersion->allowsAssignNewByReference()) { + $this->emitError(new Error('Cannot assign new by reference', $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]))); + } + + }, + 395 => null, + 396 => null, + 397 => function ($stackPos) { + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 398 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 399 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 400 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 401 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 402 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 403 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 404 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 405 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 406 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 407 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 408 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 409 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 410 => function ($stackPos) { + $this->semValue = new Expr\AssignOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 411 => function ($stackPos) { + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 412 => function ($stackPos) { + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 413 => function ($stackPos) { + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 414 => function ($stackPos) { + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 415 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 416 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 417 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 418 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 419 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 420 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 421 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 422 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 423 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 424 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 425 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 426 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 427 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 428 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 429 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 430 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 431 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 432 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 433 => function ($stackPos) { + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 434 => function ($stackPos) { + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 435 => function ($stackPos) { + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 436 => function ($stackPos) { + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 437 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 438 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 439 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 440 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 441 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 442 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 443 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 444 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 445 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 446 => function ($stackPos) { + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 447 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 448 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 449 => function ($stackPos) { + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 450 => function ($stackPos) { + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 451 => function ($stackPos) { + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 452 => function ($stackPos) { + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 453 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 454 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 455 => function ($stackPos) { + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 456 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 457 => function ($stackPos) { + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 458 => function ($stackPos) { + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 459 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); + }, + 460 => function ($stackPos) { + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 461 => function ($stackPos) { + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 462 => function ($stackPos) { + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 463 => function ($stackPos) { + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 464 => function ($stackPos) { + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 465 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]); + $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; + $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); + }, + 466 => function ($stackPos) { + $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 467 => null, + 468 => function ($stackPos) { + $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 469 => function ($stackPos) { + $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 470 => function ($stackPos) { + $this->semValue = new Expr\Yield_(null, null, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 471 => function ($stackPos) { + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 472 => function ($stackPos) { + $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 473 => function ($stackPos) { + $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 474 => function ($stackPos) { + $this->semValue = new Expr\Throw_($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 475 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'returnType' => $this->semStack[$stackPos-(8-6)], 'expr' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + }, + 476 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + }, + 477 => function ($stackPos) { + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])); + }, + 478 => function ($stackPos) { + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => []], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + }, + 479 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'returnType' => $this->semStack[$stackPos-(9-7)], 'expr' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + }, + 480 => function ($stackPos) { + $this->semValue = new Expr\ArrowFunction(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'returnType' => $this->semStack[$stackPos-(10-8)], 'expr' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + }, + 481 => function ($stackPos) { + $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)], 'attrGroups' => $this->semStack[$stackPos-(9-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(9-1)], $this->tokenEndStack[$stackPos])); + }, + 482 => function ($stackPos) { + $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(10-4)], 'params' => $this->semStack[$stackPos-(10-6)], 'uses' => $this->semStack[$stackPos-(10-8)], 'returnType' => $this->semStack[$stackPos-(10-9)], 'stmts' => $this->semStack[$stackPos-(10-10)], 'attrGroups' => $this->semStack[$stackPos-(10-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(10-1)], $this->tokenEndStack[$stackPos])); + }, + 483 => function ($stackPos) { + $this->semValue = array(new Stmt\Class_(null, ['type' => $this->semStack[$stackPos-(8-2)], 'extends' => $this->semStack[$stackPos-(8-4)], 'implements' => $this->semStack[$stackPos-(8-5)], 'stmts' => $this->semStack[$stackPos-(8-7)], 'attrGroups' => $this->semStack[$stackPos-(8-1)]], $this->getAttributes($this->tokenStartStack[$stackPos-(8-1)], $this->tokenEndStack[$stackPos])), $this->semStack[$stackPos-(8-3)]); + $this->checkClass($this->semValue[0], -1); + }, + 484 => function ($stackPos) { + $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 485 => function ($stackPos) { + list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 486 => function ($stackPos) { + $this->semValue = array(); + }, + 487 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-3)]; + }, + 488 => null, + 489 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 490 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 491 => function ($stackPos) { + $this->semValue = new Node\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 492 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 493 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 494 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 495 => function ($stackPos) { + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 496 => function ($stackPos) { + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 497 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 498 => null, + 499 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 500 => function ($stackPos) { + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 501 => function ($stackPos) { + $this->semValue = new Name\FullyQualified(substr($this->semStack[$stackPos-(1-1)], 1), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 502 => function ($stackPos) { + $this->semValue = new Name\Relative(substr($this->semStack[$stackPos-(1-1)], 10), $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 503 => null, + 504 => null, + 505 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 506 => function ($stackPos) { + $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + }, + 507 => null, + 508 => null, + 509 => function ($stackPos) { + $this->semValue = null; + }, + 510 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 511 => function ($stackPos) { + $this->semValue = array(); + }, + 512 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); foreach ($this->semValue as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; + }, + 513 => function ($stackPos) { + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 514 => function ($stackPos) { + $this->semValue = array(); + }, + 515 => null, + 516 => function ($stackPos) { + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 517 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Line($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 518 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\File($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 519 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Dir($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 520 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Class_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 521 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Trait_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 522 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Method($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 523 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Function_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 524 => function ($stackPos) { + $this->semValue = new Scalar\MagicConst\Namespace_($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 525 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 526 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(5-1)], $this->tokenEndStack[$stackPos])); + }, + 527 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)])), $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + }, + 528 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_SHORT; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); + }, + 529 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG; + $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); + $this->createdArrays->attach($this->semValue); + }, + 530 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $this->createdArrays->attach($this->semValue); + }, + 531 => function ($stackPos) { + $this->semValue = Scalar\String_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->supportsUnicodeEscapes()); + }, + 532 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]); $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; + foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\InterpolatedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $this->phpVersion->supportsUnicodeEscapes()); } }; $this->semValue = new Scalar\InterpolatedString($this->semStack[$stackPos-(3-2)], $attrs); + }, + 533 => function ($stackPos) { + $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]), $this->phpVersion->allowsInvalidOctals()); + }, + 534 => function ($stackPos) { + $this->semValue = Scalar\Float_::fromString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 535 => null, + 536 => null, + 537 => null, + 538 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); + }, + 539 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(2-2)], $this->tokenEndStack[$stackPos-(2-2)]), true); + }, + 540 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos]), $this->getAttributes($this->tokenStartStack[$stackPos-(3-3)], $this->tokenEndStack[$stackPos-(3-3)]), true); + }, + 541 => function ($stackPos) { + $this->semValue = null; + }, + 542 => null, + 543 => null, + 544 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 545 => null, + 546 => null, + 547 => null, + 548 => null, + 549 => null, + 550 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 551 => null, + 552 => null, + 553 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 554 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 555 => null, + 556 => function ($stackPos) { + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 557 => function ($stackPos) { + $this->semValue = new Expr\NullsafeMethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 558 => function ($stackPos) { + $this->semValue = null; + }, + 559 => null, + 560 => null, + 561 => null, + 562 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 563 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 564 => null, + 565 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 566 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 567 => function ($stackPos) { + $this->semValue = new Expr\Variable(new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])), $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + }, + 568 => function ($stackPos) { + $var = $this->semStack[$stackPos-(1-1)]->name; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])) : $var; + }, + 569 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 570 => null, + 571 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 572 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 573 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 574 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 575 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 576 => function ($stackPos) { + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 577 => null, + 578 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 579 => null, + 580 => null, + 581 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 582 => null, + 583 => function ($stackPos) { + $this->semValue = new Expr\Error($this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); $this->errorState = 2; + }, + 584 => function ($stackPos) { + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); $this->semValue->setAttribute('kind', Expr\List_::KIND_LIST); + $this->postprocessList($this->semValue); + }, + 585 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end]->value instanceof Expr\Error) array_pop($this->semValue); + }, + 586 => null, + 587 => function ($stackPos) { + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ + }, + 588 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 589 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 590 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 591 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 592 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 593 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 594 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 595 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 596 => function ($stackPos) { + $this->semValue = new Node\ArrayItem($this->semStack[$stackPos-(2-2)], null, false, $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos]), true); + }, + 597 => function ($stackPos) { + /* Create an Error node now to remember the position. We'll later either report an error, + or convert this into a null element, depending on whether this is a creation or destructuring context. */ + $attrs = $this->createEmptyElemAttributes($this->tokenPos); + $this->semValue = new Node\ArrayItem(new Expr\Error($attrs), null, false, $attrs); + }, + 598 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 599 => function ($stackPos) { + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 600 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 601 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + }, + 602 => function ($stackPos) { + $attrs = $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos]); $attrs['rawValue'] = $this->semStack[$stackPos-(1-1)]; $this->semValue = new Node\InterpolatedStringPart($this->semStack[$stackPos-(1-1)], $attrs); + }, + 603 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 604 => null, + 605 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(4-1)], $this->tokenEndStack[$stackPos])); + }, + 606 => function ($stackPos) { + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 607 => function ($stackPos) { + $this->semValue = new Expr\NullsafePropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 608 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 609 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(3-1)], $this->tokenEndStack[$stackPos])); + }, + 610 => function ($stackPos) { + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->getAttributes($this->tokenStartStack[$stackPos-(6-1)], $this->tokenEndStack[$stackPos])); + }, + 611 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 612 => function ($stackPos) { + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 613 => function ($stackPos) { + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->getAttributes($this->tokenStartStack[$stackPos-(1-1)], $this->tokenEndStack[$stackPos])); + }, + 614 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->getAttributes($this->tokenStartStack[$stackPos-(2-1)], $this->tokenEndStack[$stackPos])); + }, + 615 => null, + ]; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php deleted file mode 100644 index b76a5d94..00000000 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php +++ /dev/null @@ -1,148 +0,0 @@ -<?php - -namespace PhpParser\Parser; - -/* GENERATED file based on grammar/tokens.y */ -final class Tokens -{ - const YYERRTOK = 256; - const T_THROW = 257; - const T_INCLUDE = 258; - const T_INCLUDE_ONCE = 259; - const T_EVAL = 260; - const T_REQUIRE = 261; - const T_REQUIRE_ONCE = 262; - const T_LOGICAL_OR = 263; - const T_LOGICAL_XOR = 264; - const T_LOGICAL_AND = 265; - const T_PRINT = 266; - const T_YIELD = 267; - const T_DOUBLE_ARROW = 268; - const T_YIELD_FROM = 269; - const T_PLUS_EQUAL = 270; - const T_MINUS_EQUAL = 271; - const T_MUL_EQUAL = 272; - const T_DIV_EQUAL = 273; - const T_CONCAT_EQUAL = 274; - const T_MOD_EQUAL = 275; - const T_AND_EQUAL = 276; - const T_OR_EQUAL = 277; - const T_XOR_EQUAL = 278; - const T_SL_EQUAL = 279; - const T_SR_EQUAL = 280; - const T_POW_EQUAL = 281; - const T_COALESCE_EQUAL = 282; - const T_COALESCE = 283; - const T_BOOLEAN_OR = 284; - const T_BOOLEAN_AND = 285; - const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 286; - const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 287; - const T_IS_EQUAL = 288; - const T_IS_NOT_EQUAL = 289; - const T_IS_IDENTICAL = 290; - const T_IS_NOT_IDENTICAL = 291; - const T_SPACESHIP = 292; - const T_IS_SMALLER_OR_EQUAL = 293; - const T_IS_GREATER_OR_EQUAL = 294; - const T_SL = 295; - const T_SR = 296; - const T_INSTANCEOF = 297; - const T_INC = 298; - const T_DEC = 299; - const T_INT_CAST = 300; - const T_DOUBLE_CAST = 301; - const T_STRING_CAST = 302; - const T_ARRAY_CAST = 303; - const T_OBJECT_CAST = 304; - const T_BOOL_CAST = 305; - const T_UNSET_CAST = 306; - const T_POW = 307; - const T_NEW = 308; - const T_CLONE = 309; - const T_EXIT = 310; - const T_IF = 311; - const T_ELSEIF = 312; - const T_ELSE = 313; - const T_ENDIF = 314; - const T_LNUMBER = 315; - const T_DNUMBER = 316; - const T_STRING = 317; - const T_STRING_VARNAME = 318; - const T_VARIABLE = 319; - const T_NUM_STRING = 320; - const T_INLINE_HTML = 321; - const T_ENCAPSED_AND_WHITESPACE = 322; - const T_CONSTANT_ENCAPSED_STRING = 323; - const T_ECHO = 324; - const T_DO = 325; - const T_WHILE = 326; - const T_ENDWHILE = 327; - const T_FOR = 328; - const T_ENDFOR = 329; - const T_FOREACH = 330; - const T_ENDFOREACH = 331; - const T_DECLARE = 332; - const T_ENDDECLARE = 333; - const T_AS = 334; - const T_SWITCH = 335; - const T_MATCH = 336; - const T_ENDSWITCH = 337; - const T_CASE = 338; - const T_DEFAULT = 339; - const T_BREAK = 340; - const T_CONTINUE = 341; - const T_GOTO = 342; - const T_FUNCTION = 343; - const T_FN = 344; - const T_CONST = 345; - const T_RETURN = 346; - const T_TRY = 347; - const T_CATCH = 348; - const T_FINALLY = 349; - const T_USE = 350; - const T_INSTEADOF = 351; - const T_GLOBAL = 352; - const T_STATIC = 353; - const T_ABSTRACT = 354; - const T_FINAL = 355; - const T_PRIVATE = 356; - const T_PROTECTED = 357; - const T_PUBLIC = 358; - const T_READONLY = 359; - const T_VAR = 360; - const T_UNSET = 361; - const T_ISSET = 362; - const T_EMPTY = 363; - const T_HALT_COMPILER = 364; - const T_CLASS = 365; - const T_TRAIT = 366; - const T_INTERFACE = 367; - const T_ENUM = 368; - const T_EXTENDS = 369; - const T_IMPLEMENTS = 370; - const T_OBJECT_OPERATOR = 371; - const T_NULLSAFE_OBJECT_OPERATOR = 372; - const T_LIST = 373; - const T_ARRAY = 374; - const T_CALLABLE = 375; - const T_CLASS_C = 376; - const T_TRAIT_C = 377; - const T_METHOD_C = 378; - const T_FUNC_C = 379; - const T_LINE = 380; - const T_FILE = 381; - const T_START_HEREDOC = 382; - const T_END_HEREDOC = 383; - const T_DOLLAR_OPEN_CURLY_BRACES = 384; - const T_CURLY_OPEN = 385; - const T_PAAMAYIM_NEKUDOTAYIM = 386; - const T_NAMESPACE = 387; - const T_NS_C = 388; - const T_DIR = 389; - const T_NS_SEPARATOR = 390; - const T_ELLIPSIS = 391; - const T_NAME_FULLY_QUALIFIED = 392; - const T_NAME_QUALIFIED = 393; - const T_NAME_RELATIVE = 394; - const T_ATTRIBUTE = 395; -} diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php index 9f9d00c7..f0b1a50b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -6,13 +6,18 @@ namespace PhpParser; * This parser is based on a skeleton written by Moriyoshi Koizumi, which in * turn is based on work by Masato Bito. */ + use PhpParser\Node\Expr; +use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\Cast\Double; +use PhpParser\Node\Identifier; +use PhpParser\Node\InterpolatedStringPart; use PhpParser\Node\Name; use PhpParser\Node\Param; -use PhpParser\Node\Scalar\Encapsed; -use PhpParser\Node\Scalar\LNumber; +use PhpParser\Node\Scalar\InterpolatedString; +use PhpParser\Node\Scalar\Int_; use PhpParser\Node\Scalar\String_; +use PhpParser\Node\Stmt; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassConst; use PhpParser\Node\Stmt\ClassMethod; @@ -24,122 +29,137 @@ use PhpParser\Node\Stmt\Namespace_; use PhpParser\Node\Stmt\Nop; use PhpParser\Node\Stmt\Property; use PhpParser\Node\Stmt\TryCatch; -use PhpParser\Node\Stmt\UseUse; -use PhpParser\Node\VarLikeIdentifier; +use PhpParser\Node\UseItem; +use PhpParser\NodeVisitor\CommentAnnotatingVisitor; -abstract class ParserAbstract implements Parser -{ - const SYMBOL_NONE = -1; +abstract class ParserAbstract implements Parser { + private const SYMBOL_NONE = -1; + + /** @var Lexer Lexer that is used when parsing */ + protected Lexer $lexer; + /** @var PhpVersion PHP version to target on a best-effort basis */ + protected PhpVersion $phpVersion; /* * The following members will be filled with generated parsing data: */ /** @var int Size of $tokenToSymbol map */ - protected $tokenToSymbolMapSize; + protected int $tokenToSymbolMapSize; /** @var int Size of $action table */ - protected $actionTableSize; + protected int $actionTableSize; /** @var int Size of $goto table */ - protected $gotoTableSize; + protected int $gotoTableSize; /** @var int Symbol number signifying an invalid token */ - protected $invalidSymbol; + protected int $invalidSymbol; /** @var int Symbol number of error recovery token */ - protected $errorSymbol; + protected int $errorSymbol; /** @var int Action number signifying default action */ - protected $defaultAction; + protected int $defaultAction; /** @var int Rule number signifying that an unexpected token was encountered */ - protected $unexpectedTokenRule; + protected int $unexpectedTokenRule; - protected $YY2TBLSTATE; + protected int $YY2TBLSTATE; /** @var int Number of non-leaf states */ - protected $numNonLeafStates; + protected int $numNonLeafStates; - /** @var int[] Map of lexer tokens to internal symbols */ - protected $tokenToSymbol; + /** @var int[] Map of PHP token IDs to internal symbols */ + protected array $phpTokenToSymbol; + /** @var array<int, bool> Map of PHP token IDs to drop */ + protected array $dropTokens; + /** @var int[] Map of external symbols (static::T_*) to internal symbols */ + protected array $tokenToSymbol; /** @var string[] Map of symbols to their names */ - protected $symbolToName; - /** @var array Names of the production rules (only necessary for debugging) */ - protected $productions; + protected array $symbolToName; + /** @var array<int, string> Names of the production rules (only necessary for debugging) */ + protected array $productions; /** @var int[] Map of states to a displacement into the $action table. The corresponding action for this * state/symbol pair is $action[$actionBase[$state] + $symbol]. If $actionBase[$state] is 0, the * action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected $actionBase; + protected array $actionBase; /** @var int[] Table of actions. Indexed according to $actionBase comment. */ - protected $action; + protected array $action; /** @var int[] Table indexed analogously to $action. If $actionCheck[$actionBase[$state] + $symbol] != $symbol * then the action is defaulted, i.e. $actionDefault[$state] should be used instead. */ - protected $actionCheck; + protected array $actionCheck; /** @var int[] Map of states to their default action */ - protected $actionDefault; + protected array $actionDefault; /** @var callable[] Semantic action callbacks */ - protected $reduceCallbacks; + protected array $reduceCallbacks; /** @var int[] Map of non-terminals to a displacement into the $goto table. The corresponding goto state for this * non-terminal/state pair is $goto[$gotoBase[$nonTerminal] + $state] (unless defaulted) */ - protected $gotoBase; + protected array $gotoBase; /** @var int[] Table of states to goto after reduction. Indexed according to $gotoBase comment. */ - protected $goto; + protected array $goto; /** @var int[] Table indexed analogously to $goto. If $gotoCheck[$gotoBase[$nonTerminal] + $state] != $nonTerminal * then the goto state is defaulted, i.e. $gotoDefault[$nonTerminal] should be used. */ - protected $gotoCheck; + protected array $gotoCheck; /** @var int[] Map of non-terminals to the default state to goto after their reduction */ - protected $gotoDefault; + protected array $gotoDefault; /** @var int[] Map of rules to the non-terminal on their left-hand side, i.e. the non-terminal to use for * determining the state to goto after reduction. */ - protected $ruleToNonTerminal; + protected array $ruleToNonTerminal; /** @var int[] Map of rules to the length of their right-hand side, which is the number of elements that have to * be popped from the stack(s) on reduction. */ - protected $ruleToLength; + protected array $ruleToLength; /* * The following members are part of the parser state: */ - /** @var Lexer Lexer that is used when parsing */ - protected $lexer; /** @var mixed Temporary value containing the result of last semantic action (reduction) */ protected $semValue; - /** @var array Semantic value stack (contains values of tokens and semantic action results) */ - protected $semStack; - /** @var array[] Start attribute stack */ - protected $startAttributeStack; - /** @var array[] End attribute stack */ - protected $endAttributeStack; - /** @var array End attributes of last *shifted* token */ - protected $endAttributes; - /** @var array Start attributes of last *read* token */ - protected $lookaheadStartAttributes; + /** @var mixed[] Semantic value stack (contains values of tokens and semantic action results) */ + protected array $semStack; + /** @var int[] Token start position stack */ + protected array $tokenStartStack; + /** @var int[] Token end position stack */ + protected array $tokenEndStack; /** @var ErrorHandler Error handler */ - protected $errorHandler; + protected ErrorHandler $errorHandler; /** @var int Error state, used to avoid error floods */ - protected $errorState; + protected int $errorState; + + /** @var \SplObjectStorage<Array_, null>|null Array nodes created during parsing, for postprocessing of empty elements. */ + protected ?\SplObjectStorage $createdArrays; + + /** @var Token[] Tokens for the current parse */ + protected array $tokens; + /** @var int Current position in token array */ + protected int $tokenPos; /** * Initialize $reduceCallbacks map. */ - abstract protected function initReduceCallbacks(); + abstract protected function initReduceCallbacks(): void; /** * Creates a parser instance. * - * Options: Currently none. + * Options: + * * phpVersion: ?PhpVersion, * * @param Lexer $lexer A lexer - * @param array $options Options array. + * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This + * option is best-effort: Even if specified, parsing will generally assume the latest + * supported version and only adjust behavior in minor ways, for example by omitting + * errors in older versions and interpreting type hints as a name or identifier depending + * on version. */ - public function __construct(Lexer $lexer, array $options = []) { + public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { $this->lexer = $lexer; - - if (isset($options['throwOnError'])) { - throw new \LogicException( - '"throwOnError" is no longer supported, use "errorHandler" instead'); - } + $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); $this->initReduceCallbacks(); + $this->phpTokenToSymbol = $this->createTokenMap(); + $this->dropTokens = array_fill_keys( + [\T_WHITESPACE, \T_OPEN_TAG, \T_COMMENT, \T_DOC_COMMENT, \T_BAD_CHARACTER], true + ); } /** @@ -155,36 +175,55 @@ abstract class ParserAbstract implements Parser * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, ErrorHandler $errorHandler = null) { - $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing; + public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array { + $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing(); + $this->createdArrays = new \SplObjectStorage(); - $this->lexer->startLexing($code, $this->errorHandler); + $this->tokens = $this->lexer->tokenize($code, $this->errorHandler); $result = $this->doParse(); + // Report errors for any empty elements used inside arrays. This is delayed until after the main parse, + // because we don't know a priori whether a given array expression will be used in a destructuring context + // or not. + foreach ($this->createdArrays as $node) { + foreach ($node->items as $item) { + if ($item->value instanceof Expr\Error) { + $this->errorHandler->handleError( + new Error('Cannot use empty array elements in arrays', $item->getAttributes())); + } + } + } + // Clear out some of the interior state, so we don't hold onto unnecessary // memory between uses of the parser - $this->startAttributeStack = []; - $this->endAttributeStack = []; + $this->tokenStartStack = []; + $this->tokenEndStack = []; $this->semStack = []; $this->semValue = null; + $this->createdArrays = null; + + if ($result !== null) { + $traverser = new NodeTraverser(new CommentAnnotatingVisitor($this->tokens)); + $traverser->traverse($result); + } return $result; } - protected function doParse() { + public function getTokens(): array { + return $this->tokens; + } + + /** @return Stmt[]|null */ + protected function doParse(): ?array { // We start off with no lookahead-token $symbol = self::SYMBOL_NONE; - - // The attributes for a node are taken from the first and last token of the node. - // From the first token only the startAttributes are taken and from the last only - // the endAttributes. Both are merged using the array union operator (+). - $startAttributes = []; - $endAttributes = []; - $this->endAttributes = $endAttributes; + $tokenValue = null; + $this->tokenPos = -1; // Keep stack of start and end attributes - $this->startAttributeStack = []; - $this->endAttributeStack = [$endAttributes]; + $this->tokenStartStack = []; + $this->tokenEndStack = [0]; // Start off in the initial state and keep a stack of previous states $state = 0; @@ -205,26 +244,20 @@ abstract class ParserAbstract implements Parser $rule = $this->actionDefault[$state]; } else { if ($symbol === self::SYMBOL_NONE) { - // Fetch the next token id from the lexer and fetch additional info by-ref. - // The end attributes are fetched into a temporary variable and only set once the token is really - // shifted (not during read). Otherwise you would sometimes get off-by-one errors, when a rule is - // reduced after a token was read but not yet shifted. - $tokenId = $this->lexer->getNextToken($tokenValue, $startAttributes, $endAttributes); + do { + $token = $this->tokens[++$this->tokenPos]; + $tokenId = $token->id; + } while (isset($this->dropTokens[$tokenId])); - // map the lexer token id to the internally used symbols - $symbol = $tokenId >= 0 && $tokenId < $this->tokenToSymbolMapSize - ? $this->tokenToSymbol[$tokenId] - : $this->invalidSymbol; - - if ($symbol === $this->invalidSymbol) { + // Map the lexer token id to the internally used symbols. + $tokenValue = $token->text; + if (!isset($this->phpTokenToSymbol[$tokenId])) { throw new \RangeException(sprintf( 'The lexer returned an invalid token (id=%d, value=%s)', $tokenId, $tokenValue )); } - - // Allow productions to access the start attributes of the lookahead token. - $this->lookaheadStartAttributes = $startAttributes; + $symbol = $this->phpTokenToSymbol[$tokenId]; //$this->traceRead($symbol); } @@ -249,9 +282,8 @@ abstract class ParserAbstract implements Parser ++$stackPos; $stateStack[$stackPos] = $state = $action; $this->semStack[$stackPos] = $tokenValue; - $this->startAttributeStack[$stackPos] = $startAttributes; - $this->endAttributeStack[$stackPos] = $endAttributes; - $this->endAttributes = $endAttributes; + $this->tokenStartStack[$stackPos] = $this->tokenPos; + $this->tokenEndStack[$stackPos] = $this->tokenPos; $symbol = self::SYMBOL_NONE; if ($this->errorState) { @@ -277,15 +309,22 @@ abstract class ParserAbstract implements Parser /* accept */ //$this->traceAccept(); return $this->semValue; - } elseif ($rule !== $this->unexpectedTokenRule) { + } + if ($rule !== $this->unexpectedTokenRule) { /* reduce */ //$this->traceReduce($rule); + $ruleLength = $this->ruleToLength[$rule]; try { - $this->reduceCallbacks[$rule]($stackPos); + $callback = $this->reduceCallbacks[$rule]; + if ($callback !== null) { + $callback($stackPos); + } elseif ($ruleLength > 0) { + $this->semValue = $this->semStack[$stackPos - $ruleLength + 1]; + } } catch (Error $e) { - if (-1 === $e->getStartLine() && isset($startAttributes['startLine'])) { - $e->setStartLine($startAttributes['startLine']); + if (-1 === $e->getStartLine()) { + $e->setStartLine($this->tokens[$this->tokenPos]->line); } $this->emitError($e); @@ -294,8 +333,7 @@ abstract class ParserAbstract implements Parser } /* Goto - shift nonterminal */ - $lastEndAttributes = $this->endAttributeStack[$stackPos]; - $ruleLength = $this->ruleToLength[$rule]; + $lastTokenEnd = $this->tokenEndStack[$stackPos]; $stackPos -= $ruleLength; $nonTerminal = $this->ruleToNonTerminal[$rule]; $idx = $this->gotoBase[$nonTerminal] + $stateStack[$stackPos]; @@ -308,18 +346,19 @@ abstract class ParserAbstract implements Parser ++$stackPos; $stateStack[$stackPos] = $state; $this->semStack[$stackPos] = $this->semValue; - $this->endAttributeStack[$stackPos] = $lastEndAttributes; + $this->tokenEndStack[$stackPos] = $lastTokenEnd; if ($ruleLength === 0) { // Empty productions use the start attributes of the lookahead token. - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; + $this->tokenStartStack[$stackPos] = $this->tokenPos; } } else { /* error */ switch ($this->errorState) { case 0: $msg = $this->getErrorMessage($symbol, $state); - $this->emitError(new Error($msg, $startAttributes + $endAttributes)); + $this->emitError(new Error($msg, $this->getAttributesForToken($this->tokenPos))); // Break missing intentionally + // no break case 1: case 2: $this->errorState = 3; @@ -346,9 +385,8 @@ abstract class ParserAbstract implements Parser // We treat the error symbol as being empty, so we reset the end attributes // to the end attributes of the last non-error symbol - $this->startAttributeStack[$stackPos] = $this->lookaheadStartAttributes; - $this->endAttributeStack[$stackPos] = $this->endAttributeStack[$stackPos - 1]; - $this->endAttributes = $this->endAttributeStack[$stackPos - 1]; + $this->tokenStartStack[$stackPos] = $this->tokenPos; + $this->tokenEndStack[$stackPos] = $this->tokenEndStack[$stackPos - 1]; break; case 3: @@ -375,7 +413,7 @@ abstract class ParserAbstract implements Parser throw new \RuntimeException('Reached end of parser loop'); } - protected function emitError(Error $error) { + protected function emitError(Error $error): void { $this->errorHandler->handleError($error); } @@ -383,11 +421,11 @@ abstract class ParserAbstract implements Parser * Format error message including expected tokens. * * @param int $symbol Unexpected symbol - * @param int $state State at time of error + * @param int $state State at time of error * * @return string Formatted error message */ - protected function getErrorMessage(int $symbol, int $state) : string { + protected function getErrorMessage(int $symbol, int $state): string { $expectedString = ''; if ($expected = $this->getExpectedTokens($state)) { $expectedString = ', expecting ' . implode(' or ', $expected); @@ -403,7 +441,7 @@ abstract class ParserAbstract implements Parser * * @return string[] Expected tokens. If too many, an empty array is returned. */ - protected function getExpectedTokens(int $state) : array { + protected function getExpectedTokens(int $state): array { $expected = []; $base = $this->actionBase[$state]; @@ -431,37 +469,79 @@ abstract class ParserAbstract implements Parser return $expected; } + /** + * Get attributes for a node with the given start and end token positions. + * + * @param int $tokenStartPos Token position the node starts at + * @param int $tokenEndPos Token position the node ends at + * @return array<string, mixed> Attributes + */ + protected function getAttributes(int $tokenStartPos, int $tokenEndPos): array { + $startToken = $this->tokens[$tokenStartPos]; + $afterEndToken = $this->tokens[$tokenEndPos + 1]; + return [ + 'startLine' => $startToken->line, + 'startTokenPos' => $tokenStartPos, + 'startFilePos' => $startToken->pos, + 'endLine' => $afterEndToken->line, + 'endTokenPos' => $tokenEndPos, + 'endFilePos' => $afterEndToken->pos - 1, + ]; + } + + /** + * Get attributes for a single token at the given token position. + * + * @return array<string, mixed> Attributes + */ + protected function getAttributesForToken(int $tokenPos): array { + if ($tokenPos < \count($this->tokens) - 1) { + return $this->getAttributes($tokenPos, $tokenPos); + } + + // Get attributes for the sentinel token. + $token = $this->tokens[$tokenPos]; + return [ + 'startLine' => $token->line, + 'startTokenPos' => $tokenPos, + 'startFilePos' => $token->pos, + 'endLine' => $token->line, + 'endTokenPos' => $tokenPos, + 'endFilePos' => $token->pos, + ]; + } + /* * Tracing functions used for debugging the parser. */ /* - protected function traceNewState($state, $symbol) { + protected function traceNewState($state, $symbol): void { echo '% State ' . $state . ', Lookahead ' . ($symbol == self::SYMBOL_NONE ? '--none--' : $this->symbolToName[$symbol]) . "\n"; } - protected function traceRead($symbol) { + protected function traceRead($symbol): void { echo '% Reading ' . $this->symbolToName[$symbol] . "\n"; } - protected function traceShift($symbol) { + protected function traceShift($symbol): void { echo '% Shift ' . $this->symbolToName[$symbol] . "\n"; } - protected function traceAccept() { + protected function traceAccept(): void { echo "% Accepted.\n"; } - protected function traceReduce($n) { + protected function traceReduce($n): void { echo '% Reduce by (' . $n . ') ' . $this->productions[$n] . "\n"; } - protected function tracePop($state) { + protected function tracePop($state): void { echo '% Recovering, uncovered state ' . $state . "\n"; } - protected function traceDiscard($symbol) { + protected function traceDiscard($symbol): void { echo '% Discard ' . $this->symbolToName[$symbol] . "\n"; } */ @@ -476,13 +556,14 @@ abstract class ParserAbstract implements Parser * @param Node\Stmt[] $stmts * @return Node\Stmt[] */ - protected function handleNamespaces(array $stmts) : array { + protected function handleNamespaces(array $stmts): array { $hasErrored = false; $style = $this->getNamespacingStyle($stmts); if (null === $style) { // not namespaced, nothing to do return $stmts; - } elseif ('brace' === $style) { + } + if ('brace' === $style) { // For braced namespaces we only have to check that there are no invalid statements between the namespaces $afterFirstNamespace = false; foreach ($stmts as $stmt) { @@ -500,7 +581,7 @@ abstract class ParserAbstract implements Parser } else { // For semicolon namespaces we have to move the statements after a namespace declaration into ->stmts $resultStmts = []; - $targetStmts =& $resultStmts; + $targetStmts = &$resultStmts; $lastNs = null; foreach ($stmts as $stmt) { if ($stmt instanceof Node\Stmt\Namespace_) { @@ -509,12 +590,12 @@ abstract class ParserAbstract implements Parser } if ($stmt->stmts === null) { $stmt->stmts = []; - $targetStmts =& $stmt->stmts; + $targetStmts = &$stmt->stmts; $resultStmts[] = $stmt; } else { // This handles the invalid case of mixed style namespaces $resultStmts[] = $stmt; - $targetStmts =& $resultStmts; + $targetStmts = &$resultStmts; } $lastNs = $stmt; } elseif ($stmt instanceof Node\Stmt\HaltCompiler) { @@ -531,7 +612,7 @@ abstract class ParserAbstract implements Parser } } - private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt) { + private function fixupNamespaceAttributes(Node\Stmt\Namespace_ $stmt): void { // We moved the statements into the namespace node, as such the end of the namespace node // needs to be extended to the end of the statements. if (empty($stmt->stmts)) { @@ -549,6 +630,22 @@ abstract class ParserAbstract implements Parser } } + /** @return array<string, mixed> */ + private function getNamespaceErrorAttributes(Namespace_ $node): array { + $attrs = $node->getAttributes(); + // Adjust end attributes to only cover the "namespace" keyword, not the whole namespace. + if (isset($attrs['startLine'])) { + $attrs['endLine'] = $attrs['startLine']; + } + if (isset($attrs['startTokenPos'])) { + $attrs['endTokenPos'] = $attrs['startTokenPos']; + } + if (isset($attrs['startFilePos'])) { + $attrs['endFilePos'] = $attrs['startFilePos'] + \strlen('namespace') - 1; + } + return $attrs; + } + /** * Determine namespacing style (semicolon or brace) * @@ -556,7 +653,7 @@ abstract class ParserAbstract implements Parser * * @return null|string One of "semicolon", "brace" or null (no namespaces) */ - private function getNamespacingStyle(array $stmts) { + private function getNamespacingStyle(array $stmts): ?string { $style = null; $hasNotAllowedStmts = false; foreach ($stmts as $i => $stmt) { @@ -567,13 +664,13 @@ abstract class ParserAbstract implements Parser if ($hasNotAllowedStmts) { $this->emitError(new Error( 'Namespace declaration statement has to be the very first statement in the script', - $stmt->getLine() // Avoid marking the entire namespace as an error + $this->getNamespaceErrorAttributes($stmt) )); } } elseif ($style !== $currentStyle) { $this->emitError(new Error( 'Cannot mix bracketed namespace declarations with unbracketed namespace declarations', - $stmt->getLine() // Avoid marking the entire namespace as an error + $this->getNamespaceErrorAttributes($stmt) )); // Treat like semicolon style for namespace normalization return 'semicolon'; @@ -599,83 +696,14 @@ abstract class ParserAbstract implements Parser return $style; } - /** - * Fix up parsing of static property calls in PHP 5. - * - * In PHP 5 A::$b[c][d] and A::$b[c][d]() have very different interpretation. The former is - * interpreted as (A::$b)[c][d], while the latter is the same as A::{$b[c][d]}(). We parse the - * latter as the former initially and this method fixes the AST into the correct form when we - * encounter the "()". - * - * @param Node\Expr\StaticPropertyFetch|Node\Expr\ArrayDimFetch $prop - * @param Node\Arg[] $args - * @param array $attributes - * - * @return Expr\StaticCall - */ - protected function fixupPhp5StaticPropCall($prop, array $args, array $attributes) : Expr\StaticCall { - if ($prop instanceof Node\Expr\StaticPropertyFetch) { - $name = $prop->name instanceof VarLikeIdentifier - ? $prop->name->toString() : $prop->name; - $var = new Expr\Variable($name, $prop->name->getAttributes()); - return new Expr\StaticCall($prop->class, $var, $args, $attributes); - } elseif ($prop instanceof Node\Expr\ArrayDimFetch) { - $tmp = $prop; - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { - $tmp = $tmp->var; - } - - /** @var Expr\StaticPropertyFetch $staticProp */ - $staticProp = $tmp->var; - - // Set start attributes to attributes of innermost node - $tmp = $prop; - $this->fixupStartAttributes($tmp, $staticProp->name); - while ($tmp->var instanceof Node\Expr\ArrayDimFetch) { - $tmp = $tmp->var; - $this->fixupStartAttributes($tmp, $staticProp->name); - } - - $name = $staticProp->name instanceof VarLikeIdentifier - ? $staticProp->name->toString() : $staticProp->name; - $tmp->var = new Expr\Variable($name, $staticProp->name->getAttributes()); - return new Expr\StaticCall($staticProp->class, $prop, $args, $attributes); - } else { - throw new \Exception; - } - } - - protected function fixupStartAttributes(Node $to, Node $from) { - $startAttributes = ['startLine', 'startFilePos', 'startTokenPos']; - foreach ($startAttributes as $startAttribute) { - if ($from->hasAttribute($startAttribute)) { - $to->setAttribute($startAttribute, $from->getAttribute($startAttribute)); - } - } - } - + /** @return Name|Identifier */ protected function handleBuiltinTypes(Name $name) { - $builtinTypes = [ - 'bool' => true, - 'int' => true, - 'float' => true, - 'string' => true, - 'iterable' => true, - 'void' => true, - 'object' => true, - 'null' => true, - 'false' => true, - 'mixed' => true, - 'never' => true, - 'true' => true, - ]; - if (!$name->isUnqualified()) { return $name; } $lowerName = $name->toLowerString(); - if (!isset($builtinTypes[$lowerName])) { + if (!$this->phpVersion->supportsBuiltinType($lowerName)) { return $name; } @@ -685,16 +713,15 @@ abstract class ParserAbstract implements Parser /** * Get combined start and end attributes at a stack location * - * @param int $pos Stack location + * @param int $stackPos Stack location * - * @return array Combined start and end attributes + * @return array<string, mixed> Combined start and end attributes */ - protected function getAttributesAt(int $pos) : array { - return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; + protected function getAttributesAt(int $stackPos): array { + return $this->getAttributes($this->tokenStartStack[$stackPos], $this->tokenEndStack[$stackPos]); } - protected function getFloatCastKind(string $cast): int - { + protected function getFloatCastKind(string $cast): int { $cast = strtolower($cast); if (strpos($cast, 'float') !== false) { return Double::KIND_FLOAT; @@ -707,23 +734,24 @@ abstract class ParserAbstract implements Parser return Double::KIND_DOUBLE; } - protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { + /** @param array<string, mixed> $attributes */ + protected function parseLNumber(string $str, array $attributes, bool $allowInvalidOctal = false): Int_ { try { - return LNumber::fromString($str, $attributes, $allowInvalidOctal); + return Int_::fromString($str, $attributes, $allowInvalidOctal); } catch (Error $error) { $this->emitError($error); // Use dummy value - return new LNumber(0, $attributes); + return new Int_(0, $attributes); } } /** * Parse a T_NUM_STRING token into either an integer or string node. * - * @param string $str Number string - * @param array $attributes Attributes + * @param string $str Number string + * @param array<string, mixed> $attributes Attributes * - * @return LNumber|String_ Integer or string node. + * @return Int_|String_ Integer or string node. */ protected function parseNumString(string $str, array $attributes) { if (!preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { @@ -735,13 +763,14 @@ abstract class ParserAbstract implements Parser return new String_($str, $attributes); } - return new LNumber($num, $attributes); + return new Int_($num, $attributes); } + /** @param array<string, mixed> $attributes */ protected function stripIndentation( string $string, int $indentLen, string $indentChar, bool $newlineAtStart, bool $newlineAtEnd, array $attributes - ) { + ): string { if ($indentLen === 0) { return $string; } @@ -770,10 +799,15 @@ abstract class ParserAbstract implements Parser ); } + /** + * @param string|(Expr|InterpolatedStringPart)[] $contents + * @param array<string, mixed> $attributes + * @param array<string, mixed> $endTokenAttributes + */ protected function parseDocString( string $startToken, $contents, string $endToken, array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape - ) { + ): Expr { $kind = strpos($startToken, "'") === false ? String_::KIND_HEREDOC : String_::KIND_NOWDOC; @@ -807,6 +841,7 @@ abstract class ParserAbstract implements Parser if (\is_string($contents)) { if ($contents === '') { + $attributes['rawValue'] = $contents; return new String_('', $attributes); } @@ -814,6 +849,7 @@ abstract class ParserAbstract implements Parser $contents, $indentLen, $indentChar, true, true, $attributes ); $contents = preg_replace('~(\r\n|\n|\r)\z~', '', $contents); + $attributes['rawValue'] = $contents; if ($kind === String_::KIND_HEREDOC) { $contents = String_::parseEscapeSequences($contents, null, $parseUnicodeEscape); @@ -822,7 +858,7 @@ abstract class ParserAbstract implements Parser return new String_($contents, $attributes); } else { assert(count($contents) > 0); - if (!$contents[0] instanceof Node\Scalar\EncapsedStringPart) { + if (!$contents[0] instanceof Node\InterpolatedStringPart) { // If there is no leading encapsed string part, pretend there is an empty one $this->stripIndentation( '', $indentLen, $indentChar, true, false, $contents[0]->getAttributes() @@ -831,56 +867,139 @@ abstract class ParserAbstract implements Parser $newContents = []; foreach ($contents as $i => $part) { - if ($part instanceof Node\Scalar\EncapsedStringPart) { + if ($part instanceof Node\InterpolatedStringPart) { $isLast = $i === \count($contents) - 1; $part->value = $this->stripIndentation( $part->value, $indentLen, $indentChar, $i === 0, $isLast, $part->getAttributes() ); - $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); if ($isLast) { $part->value = preg_replace('~(\r\n|\n|\r)\z~', '', $part->value); } + $part->setAttribute('rawValue', $part->value); + $part->value = String_::parseEscapeSequences($part->value, null, $parseUnicodeEscape); if ('' === $part->value) { continue; } } $newContents[] = $part; } - return new Encapsed($newContents, $attributes); + return new InterpolatedString($newContents, $attributes); } } + protected function createCommentFromToken(Token $token, int $tokenPos): Comment { + assert($token->id === \T_COMMENT || $token->id == \T_DOC_COMMENT); + return \T_DOC_COMMENT === $token->id + ? new Comment\Doc($token->text, $token->line, $token->pos, $tokenPos, + $token->getEndLine(), $token->getEndPos() - 1, $tokenPos) + : new Comment($token->text, $token->line, $token->pos, $tokenPos, + $token->getEndLine(), $token->getEndPos() - 1, $tokenPos); + } + /** - * Create attributes for a zero-length common-capturing nop. - * - * @param Comment[] $comments - * @return array + * Get last comment before the given token position, if any */ - protected function createCommentNopAttributes(array $comments) { - $comment = $comments[count($comments) - 1]; + protected function getCommentBeforeToken(int $tokenPos): ?Comment { + while (--$tokenPos >= 0) { + $token = $this->tokens[$tokenPos]; + if (!isset($this->dropTokens[$token->id])) { + break; + } + + if ($token->id === \T_COMMENT || $token->id === \T_DOC_COMMENT) { + return $this->createCommentFromToken($token, $tokenPos); + } + } + return null; + } + + /** + * Create a zero-length nop to capture preceding comments, if any. + */ + protected function maybeCreateZeroLengthNop(int $tokenPos): ?Nop { + $comment = $this->getCommentBeforeToken($tokenPos); + if ($comment === null) { + return null; + } + $commentEndLine = $comment->getEndLine(); $commentEndFilePos = $comment->getEndFilePos(); $commentEndTokenPos = $comment->getEndTokenPos(); + $attributes = [ + 'startLine' => $commentEndLine, + 'endLine' => $commentEndLine, + 'startFilePos' => $commentEndFilePos + 1, + 'endFilePos' => $commentEndFilePos, + 'startTokenPos' => $commentEndTokenPos + 1, + 'endTokenPos' => $commentEndTokenPos, + ]; + return new Nop($attributes); + } - $attributes = ['comments' => $comments]; - if (-1 !== $commentEndLine) { - $attributes['startLine'] = $commentEndLine; - $attributes['endLine'] = $commentEndLine; + protected function maybeCreateNop(int $tokenStartPos, int $tokenEndPos): ?Nop { + if ($this->getCommentBeforeToken($tokenStartPos) === null) { + return null; } - if (-1 !== $commentEndFilePos) { - $attributes['startFilePos'] = $commentEndFilePos + 1; - $attributes['endFilePos'] = $commentEndFilePos; + return new Nop($this->getAttributes($tokenStartPos, $tokenEndPos)); + } + + protected function handleHaltCompiler(): string { + // Prevent the lexer from returning any further tokens. + $nextToken = $this->tokens[$this->tokenPos + 1]; + $this->tokenPos = \count($this->tokens) - 2; + + // Return text after __halt_compiler. + return $nextToken->id === \T_INLINE_HTML ? $nextToken->text : ''; + } + + protected function inlineHtmlHasLeadingNewline(int $stackPos): bool { + $tokenPos = $this->tokenStartStack[$stackPos]; + $token = $this->tokens[$tokenPos]; + assert($token->id == \T_INLINE_HTML); + if ($tokenPos > 0) { + $prevToken = $this->tokens[$tokenPos - 1]; + assert($prevToken->id == \T_CLOSE_TAG); + return false !== strpos($prevToken->text, "\n") + || false !== strpos($prevToken->text, "\r"); } - if (-1 !== $commentEndTokenPos) { - $attributes['startTokenPos'] = $commentEndTokenPos + 1; - $attributes['endTokenPos'] = $commentEndTokenPos; + return true; + } + + /** + * @return array<string, mixed> + */ + protected function createEmptyElemAttributes(int $tokenPos): array { + return $this->getAttributesForToken($tokenPos); + } + + protected function fixupArrayDestructuring(Array_ $node): Expr\List_ { + $this->createdArrays->detach($node); + return new Expr\List_(array_map(function (Node\ArrayItem $item) { + if ($item->value instanceof Expr\Error) { + // We used Error as a placeholder for empty elements, which are legal for destructuring. + return null; + } + if ($item->value instanceof Array_) { + return new Node\ArrayItem( + $this->fixupArrayDestructuring($item->value), + $item->key, $item->byRef, $item->getAttributes()); + } + return $item; + }, $node->items), ['kind' => Expr\List_::KIND_ARRAY] + $node->getAttributes()); + } + + protected function postprocessList(Expr\List_ $node): void { + foreach ($node->items as $i => $item) { + if ($item->value instanceof Expr\Error) { + // We used Error as a placeholder for empty elements, which are legal for destructuring. + $node->items[$i] = null; + } } - return $attributes; } /** @param ElseIf_|Else_ $node */ - protected function fixupAlternativeElse($node) { + protected function fixupAlternativeElse($node): void { // Make sure a trailing nop statement carrying comments is part of the node. $numStmts = \count($node->stmts); if ($numStmts !== 0 && $node->stmts[$numStmts - 1] instanceof Nop) { @@ -897,26 +1016,26 @@ abstract class ParserAbstract implements Parser } } - protected function checkClassModifier($a, $b, $modifierPos) { + protected function checkClassModifier(int $a, int $b, int $modifierPos): void { try { - Class_::verifyClassModifier($a, $b); + Modifiers::verifyClassModifier($a, $b); } catch (Error $error) { $error->setAttributes($this->getAttributesAt($modifierPos)); $this->emitError($error); } } - protected function checkModifier($a, $b, $modifierPos) { + protected function checkModifier(int $a, int $b, int $modifierPos): void { // Jumping through some hoops here because verifyModifier() is also used elsewhere try { - Class_::verifyModifier($a, $b); + Modifiers::verifyModifier($a, $b); } catch (Error $error) { $error->setAttributes($this->getAttributesAt($modifierPos)); $this->emitError($error); } } - protected function checkParam(Param $node) { + protected function checkParam(Param $node): void { if ($node->variadic && null !== $node->default) { $this->emitError(new Error( 'Variadic parameter cannot have a default value', @@ -925,7 +1044,7 @@ abstract class ParserAbstract implements Parser } } - protected function checkTryCatch(TryCatch $node) { + protected function checkTryCatch(TryCatch $node): void { if (empty($node->catches) && null === $node->finally) { $this->emitError(new Error( 'Cannot use try without catch or finally', $node->getAttributes() @@ -933,7 +1052,7 @@ abstract class ParserAbstract implements Parser } } - protected function checkNamespace(Namespace_ $node) { + protected function checkNamespace(Namespace_ $node): void { if (null !== $node->stmts) { foreach ($node->stmts as $stmt) { if ($stmt instanceof Namespace_) { @@ -945,7 +1064,7 @@ abstract class ParserAbstract implements Parser } } - private function checkClassName($name, $namePos) { + private function checkClassName(?Identifier $name, int $namePos): void { if (null !== $name && $name->isSpecialClassName()) { $this->emitError(new Error( sprintf('Cannot use \'%s\' as class name as it is reserved', $name), @@ -954,7 +1073,8 @@ abstract class ParserAbstract implements Parser } } - private function checkImplementedInterfaces(array $interfaces) { + /** @param Name[] $interfaces */ + private function checkImplementedInterfaces(array $interfaces): void { foreach ($interfaces as $interface) { if ($interface->isSpecialClassName()) { $this->emitError(new Error( @@ -965,7 +1085,7 @@ abstract class ParserAbstract implements Parser } } - protected function checkClass(Class_ $node, $namePos) { + protected function checkClass(Class_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); if ($node->extends && $node->extends->isSpecialClassName()) { @@ -978,18 +1098,18 @@ abstract class ParserAbstract implements Parser $this->checkImplementedInterfaces($node->implements); } - protected function checkInterface(Interface_ $node, $namePos) { + protected function checkInterface(Interface_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->extends); } - protected function checkEnum(Enum_ $node, $namePos) { + protected function checkEnum(Enum_ $node, int $namePos): void { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->implements); } - protected function checkClassMethod(ClassMethod $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_STATIC) { + protected function checkClassMethod(ClassMethod $node, int $modifierPos): void { + if ($node->flags & Modifiers::STATIC) { switch ($node->name->toLowerString()) { case '__construct': $this->emitError(new Error( @@ -1009,44 +1129,44 @@ abstract class ParserAbstract implements Parser } } - if ($node->flags & Class_::MODIFIER_READONLY) { + if ($node->flags & Modifiers::READONLY) { $this->emitError(new Error( sprintf('Method %s() cannot be readonly', $node->name), $this->getAttributesAt($modifierPos))); } } - protected function checkClassConst(ClassConst $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_STATIC) { + protected function checkClassConst(ClassConst $node, int $modifierPos): void { + if ($node->flags & Modifiers::STATIC) { $this->emitError(new Error( "Cannot use 'static' as constant modifier", $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_ABSTRACT) { + if ($node->flags & Modifiers::ABSTRACT) { $this->emitError(new Error( "Cannot use 'abstract' as constant modifier", $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_READONLY) { + if ($node->flags & Modifiers::READONLY) { $this->emitError(new Error( "Cannot use 'readonly' as constant modifier", $this->getAttributesAt($modifierPos))); } } - protected function checkProperty(Property $node, $modifierPos) { - if ($node->flags & Class_::MODIFIER_ABSTRACT) { + protected function checkProperty(Property $node, int $modifierPos): void { + if ($node->flags & Modifiers::ABSTRACT) { $this->emitError(new Error('Properties cannot be declared abstract', $this->getAttributesAt($modifierPos))); } - if ($node->flags & Class_::MODIFIER_FINAL) { + if ($node->flags & Modifiers::FINAL) { $this->emitError(new Error('Properties cannot be declared final', $this->getAttributesAt($modifierPos))); } } - protected function checkUseUse(UseUse $node, $namePos) { + protected function checkUseUse(UseItem $node, int $namePos): void { if ($node->alias && $node->alias->isSpecialClassName()) { $this->emitError(new Error( sprintf( @@ -1057,4 +1177,65 @@ abstract class ParserAbstract implements Parser )); } } + + /** + * Creates the token map. + * + * The token map maps the PHP internal token identifiers + * to the identifiers used by the Parser. Additionally it + * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'. + * + * @return array<int, int> The token map + */ + protected function createTokenMap(): array { + $tokenMap = []; + + for ($i = 0; $i < 1000; ++$i) { + if ($i < 256) { + // Single-char tokens use an identity mapping. + $tokenMap[$i] = $i; + } elseif (\T_DOUBLE_COLON === $i) { + // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM + $tokenMap[$i] = static::T_PAAMAYIM_NEKUDOTAYIM; + } elseif (\T_OPEN_TAG_WITH_ECHO === $i) { + // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO + $tokenMap[$i] = static::T_ECHO; + } elseif (\T_CLOSE_TAG === $i) { + // T_CLOSE_TAG is equivalent to ';' + $tokenMap[$i] = ord(';'); + } elseif ('UNKNOWN' !== $name = token_name($i)) { + if (defined($name = static::class . '::' . $name)) { + // Other tokens can be mapped directly + $tokenMap[$i] = constant($name); + } + } + } + + // Assign tokens for which we define compatibility constants, as token_name() does not know them. + $tokenMap[\T_FN] = static::T_FN; + $tokenMap[\T_COALESCE_EQUAL] = static::T_COALESCE_EQUAL; + $tokenMap[\T_NAME_QUALIFIED] = static::T_NAME_QUALIFIED; + $tokenMap[\T_NAME_FULLY_QUALIFIED] = static::T_NAME_FULLY_QUALIFIED; + $tokenMap[\T_NAME_RELATIVE] = static::T_NAME_RELATIVE; + $tokenMap[\T_MATCH] = static::T_MATCH; + $tokenMap[\T_NULLSAFE_OBJECT_OPERATOR] = static::T_NULLSAFE_OBJECT_OPERATOR; + $tokenMap[\T_ATTRIBUTE] = static::T_ATTRIBUTE; + $tokenMap[\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG; + $tokenMap[\T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG] = static::T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG; + $tokenMap[\T_ENUM] = static::T_ENUM; + $tokenMap[\T_READONLY] = static::T_READONLY; + + // We have create a map from PHP token IDs to external symbol IDs. + // Now map them to the internal symbol ID. + $fullTokenMap = []; + foreach ($tokenMap as $phpToken => $extSymbol) { + $intSymbol = $this->tokenToSymbol[$extSymbol]; + if ($intSymbol === $this->invalidSymbol) { + continue; + } + $fullTokenMap[$phpToken] = $intSymbol; + } + + return $fullTokenMap; + } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php index baba23bd..3a7586ea 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php @@ -2,75 +2,41 @@ namespace PhpParser; -use PhpParser\Lexer\Emulative; use PhpParser\Parser\Php7; +use PhpParser\Parser\Php8; -class ParserFactory -{ - const PREFER_PHP7 = 1; - const PREFER_PHP5 = 2; - const ONLY_PHP7 = 3; - const ONLY_PHP5 = 4; - +class ParserFactory { /** - * Creates a Parser instance, according to the provided kind. - * - * @param int $kind One of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5 - * @param Lexer|null $lexer Lexer to use. Defaults to emulative lexer when not specified - * @param array $parserOptions Parser options. See ParserAbstract::__construct() argument - * - * @return Parser The parser instance + * Create a parser targeting the given version on a best-effort basis. The parser will generally + * accept code for the newest supported version, but will try to accommodate code that becomes + * invalid in newer versions or changes in interpretation. */ - public function create(int $kind, Lexer $lexer = null, array $parserOptions = []) : Parser { - if (null === $lexer) { - $lexer = new Lexer\Emulative(); + public function createForVersion(PhpVersion $version): Parser { + if ($version->isHostVersion()) { + $lexer = new Lexer(); + } else { + $lexer = new Lexer\Emulative($version); } - switch ($kind) { - case self::PREFER_PHP7: - return new Parser\Multiple([ - new Parser\Php7($lexer, $parserOptions), new Parser\Php5($lexer, $parserOptions) - ]); - case self::PREFER_PHP5: - return new Parser\Multiple([ - new Parser\Php5($lexer, $parserOptions), new Parser\Php7($lexer, $parserOptions) - ]); - case self::ONLY_PHP7: - return new Parser\Php7($lexer, $parserOptions); - case self::ONLY_PHP5: - return new Parser\Php5($lexer, $parserOptions); - default: - throw new \LogicException( - 'Kind must be one of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5' - ); + if ($version->id >= 80000) { + return new Php8($lexer, $version); } + return new Php7($lexer, $version); } /** * Create a parser targeting the newest version supported by this library. Code for older * versions will be accepted if there have been no relevant backwards-compatibility breaks in * PHP. - * - * All supported lexer attributes (comments, startLine, endLine, startTokenPos, endTokenPos, - * startFilePos, endFilePos) will be enabled. */ public function createForNewestSupportedVersion(): Parser { - return new Php7(new Emulative($this->getLexerOptions())); + return $this->createForVersion(PhpVersion::getNewestSupported()); } /** * Create a parser targeting the host PHP version, that is the PHP version we're currently * running on. This parser will not use any token emulation. - * - * All supported lexer attributes (comments, startLine, endLine, startTokenPos, endTokenPos, - * startFilePos, endFilePos) will be enabled. */ public function createForHostVersion(): Parser { - return new Php7(new Lexer($this->getLexerOptions())); - } - - private function getLexerOptions(): array { - return ['usedAttributes' => [ - 'comments', 'startLine', 'endLine', 'startTokenPos', 'endTokenPos', 'startFilePos', 'endFilePos', - ]]; + return $this->createForVersion(PhpVersion::getHostVersion()); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php b/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php new file mode 100644 index 00000000..a6fbb58e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php @@ -0,0 +1,164 @@ +<?php declare(strict_types=1); + +namespace PhpParser; + +/** + * A PHP version, representing only the major and minor version components. + */ +class PhpVersion { + /** @var int Version ID in PHP_VERSION_ID format */ + public int $id; + + /** @var int[] Minimum versions for builtin types */ + private const BUILTIN_TYPE_VERSIONS = [ + 'array' => 50100, + 'callable' => 50400, + 'bool' => 70000, + 'int' => 70000, + 'float' => 70000, + 'string' => 70000, + 'iterable' => 70100, + 'void' => 70100, + 'object' => 70200, + 'null' => 80000, + 'false' => 80000, + 'mixed' => 80000, + 'never' => 80100, + 'true' => 80200, + ]; + + private function __construct(int $id) { + $this->id = $id; + } + + /** + * Create a PhpVersion object from major and minor version components. + */ + public static function fromComponents(int $major, int $minor): self { + return new self($major * 10000 + $minor * 100); + } + + /** + * Get the newest PHP version supported by this library. Support for this version may be partial, + * if it is still under development. + */ + public static function getNewestSupported(): self { + return self::fromComponents(8, 2); + } + + /** + * Get the host PHP version, that is the PHP version we're currently running on. + */ + public static function getHostVersion(): self { + return self::fromComponents(\PHP_MAJOR_VERSION, \PHP_MINOR_VERSION); + } + + /** + * Parse the version from a string like "8.1". + */ + public static function fromString(string $version): self { + if (!preg_match('/^(\d+)\.(\d+)/', $version, $matches)) { + throw new \LogicException("Invalid PHP version \"$version\""); + } + return self::fromComponents((int) $matches[1], (int) $matches[2]); + } + + /** + * Check whether two versions are the same. + */ + public function equals(PhpVersion $other): bool { + return $this->id === $other->id; + } + + /** + * Check whether this version is greater than or equal to the argument. + */ + public function newerOrEqual(PhpVersion $other): bool { + return $this->id >= $other->id; + } + + /** + * Check whether this version is older than the argument. + */ + public function older(PhpVersion $other): bool { + return $this->id < $other->id; + } + + /** + * Check whether this is the host PHP version. + */ + public function isHostVersion(): bool { + return $this->equals(self::getHostVersion()); + } + + /** + * Check whether this PHP version supports the given builtin type. Type name must be lowercase. + */ + public function supportsBuiltinType(string $type): bool { + $minVersion = self::BUILTIN_TYPE_VERSIONS[$type] ?? null; + return $minVersion !== null && $this->id >= $minVersion; + } + + /** + * Whether this version supports [] array literals. + */ + public function supportsShortArraySyntax(): bool { + return $this->id >= 50400; + } + + /** + * Whether this version supports [] for destructuring. + */ + public function supportsShortArrayDestructuring(): bool { + return $this->id >= 70100; + } + + /** + * Whether this version supports flexible heredoc/nowdoc. + */ + public function supportsFlexibleHeredoc(): bool { + return $this->id >= 70300; + } + + /** + * Whether this version supports trailing commas in parameter lists. + */ + public function supportsTrailingCommaInParamList(): bool { + return $this->id >= 80000; + } + + /** + * Whether this version allows "$var =& new Obj". + */ + public function allowsAssignNewByReference(): bool { + return $this->id < 70000; + } + + /** + * Whether this version allows invalid octals like "08". + */ + public function allowsInvalidOctals(): bool { + return $this->id < 70000; + } + + /** + * Whether this version allows DEL (\x7f) to occur in identifiers. + */ + public function allowsDelInIdentifiers(): bool { + return $this->id < 70100; + } + + /** + * Whether this version supports yield in expression context without parentheses. + */ + public function supportsYieldWithoutParentheses(): bool { + return $this->id >= 70000; + } + + /** + * Whether this version supports unicode escape sequences in strings. + */ + public function supportsUnicodeEscapes(): bool { + return $this->id >= 70000; + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php new file mode 100644 index 00000000..892c686e --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php @@ -0,0 +1,51 @@ +<?php declare(strict_types=1); + +namespace PhpParser; + +use PhpParser\Node\Expr; + +interface PrettyPrinter { + /** + * Pretty prints an array of statements. + * + * @param Node[] $stmts Array of statements + * + * @return string Pretty printed statements + */ + public function prettyPrint(array $stmts): string; + + /** + * Pretty prints an expression. + * + * @param Expr $node Expression node + * + * @return string Pretty printed node + */ + public function prettyPrintExpr(Expr $node): string; + + /** + * Pretty prints a file of statements (includes the opening <?php tag if it is required). + * + * @param Node[] $stmts Array of statements + * + * @return string Pretty printed statements + */ + public function prettyPrintFile(array $stmts): string; + + /** + * Perform a format-preserving pretty print of an AST. + * + * The format preservation is best effort. For some changes to the AST the formatting will not + * be preserved (at least not locally). + * + * In order to use this method a number of prerequisites must be satisfied: + * * The startTokenPos and endTokenPos attributes in the lexer must be enabled. + * * The CloningVisitor must be run on the AST prior to modification. + * * The original tokens must be provided, using the getTokens() method on the lexer. + * + * @param Node[] $stmts Modified AST with links to original AST + * @param Node[] $origStmts Original AST with token offset information + * @param Token[] $origTokens Tokens of the original code + */ + public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string; +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php index 7c32e5a3..6a0349c7 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php @@ -13,11 +13,10 @@ use PhpParser\Node\Scalar\MagicConst; use PhpParser\Node\Stmt; use PhpParser\PrettyPrinterAbstract; -class Standard extends PrettyPrinterAbstract -{ +class Standard extends PrettyPrinterAbstract { // Special nodes - protected function pParam(Node\Param $node) { + protected function pParam(Node\Param $node): string { return $this->pAttrGroups($node->attrGroups, true) . $this->pModifiers($node->flags) . ($node->type ? $this->p($node->type) . ' ' : '') @@ -27,25 +26,25 @@ class Standard extends PrettyPrinterAbstract . ($node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pArg(Node\Arg $node) { + protected function pArg(Node\Arg $node): string { return ($node->name ? $node->name->toString() . ': ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node) { + protected function pVariadicPlaceholder(Node\VariadicPlaceholder $node): string { return '...'; } - protected function pConst(Node\Const_ $node) { + protected function pConst(Node\Const_ $node): string { return $node->name . ' = ' . $this->p($node->value); } - protected function pNullableType(Node\NullableType $node) { + protected function pNullableType(Node\NullableType $node): string { return '?' . $this->p($node->type); } - protected function pUnionType(Node\UnionType $node) { + protected function pUnionType(Node\UnionType $node): string { $types = []; foreach ($node->types as $typeNode) { if ($typeNode instanceof Node\IntersectionType) { @@ -57,138 +56,150 @@ class Standard extends PrettyPrinterAbstract return implode('|', $types); } - protected function pIntersectionType(Node\IntersectionType $node) { + protected function pIntersectionType(Node\IntersectionType $node): string { return $this->pImplode($node->types, '&'); } - protected function pIdentifier(Node\Identifier $node) { + protected function pIdentifier(Node\Identifier $node): string { return $node->name; } - protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node) { + protected function pVarLikeIdentifier(Node\VarLikeIdentifier $node): string { return '$' . $node->name; } - protected function pAttribute(Node\Attribute $node) { + protected function pAttribute(Node\Attribute $node): string { return $this->p($node->name) . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); } - protected function pAttributeGroup(Node\AttributeGroup $node) { + protected function pAttributeGroup(Node\AttributeGroup $node): string { return '#[' . $this->pCommaSeparated($node->attrs) . ']'; } // Names - protected function pName(Name $node) { - return implode('\\', $node->parts); + protected function pName(Name $node): string { + return $node->name; } - protected function pName_FullyQualified(Name\FullyQualified $node) { - return '\\' . implode('\\', $node->parts); + protected function pName_FullyQualified(Name\FullyQualified $node): string { + return '\\' . $node->name; } - protected function pName_Relative(Name\Relative $node) { - return 'namespace\\' . implode('\\', $node->parts); + protected function pName_Relative(Name\Relative $node): string { + return 'namespace\\' . $node->name; } // Magic Constants - protected function pScalar_MagicConst_Class(MagicConst\Class_ $node) { + protected function pScalar_MagicConst_Class(MagicConst\Class_ $node): string { return '__CLASS__'; } - protected function pScalar_MagicConst_Dir(MagicConst\Dir $node) { + protected function pScalar_MagicConst_Dir(MagicConst\Dir $node): string { return '__DIR__'; } - protected function pScalar_MagicConst_File(MagicConst\File $node) { + protected function pScalar_MagicConst_File(MagicConst\File $node): string { return '__FILE__'; } - protected function pScalar_MagicConst_Function(MagicConst\Function_ $node) { + protected function pScalar_MagicConst_Function(MagicConst\Function_ $node): string { return '__FUNCTION__'; } - protected function pScalar_MagicConst_Line(MagicConst\Line $node) { + protected function pScalar_MagicConst_Line(MagicConst\Line $node): string { return '__LINE__'; } - protected function pScalar_MagicConst_Method(MagicConst\Method $node) { + protected function pScalar_MagicConst_Method(MagicConst\Method $node): string { return '__METHOD__'; } - protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node) { + protected function pScalar_MagicConst_Namespace(MagicConst\Namespace_ $node): string { return '__NAMESPACE__'; } - protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node) { + protected function pScalar_MagicConst_Trait(MagicConst\Trait_ $node): string { return '__TRAIT__'; } // Scalars - protected function pScalar_String(Scalar\String_ $node) { + private function indentString(string $str): string { + return str_replace("\n", $this->nl, $str); + } + + protected function pScalar_String(Scalar\String_ $node): string { $kind = $node->getAttribute('kind', Scalar\String_::KIND_SINGLE_QUOTED); switch ($kind) { case Scalar\String_::KIND_NOWDOC: $label = $node->getAttribute('docLabel'); if ($label && !$this->containsEndLabel($node->value, $label)) { + $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); + $nl = $shouldIdent ? $this->nl : $this->newline; if ($node->value === '') { - return "<<<'$label'\n$label" . $this->docStringEndToken; + return "<<<'$label'$nl$label{$this->docStringEndToken}"; } - return "<<<'$label'\n$node->value\n$label" - . $this->docStringEndToken; + // Make sure trailing \r is not combined with following \n into CRLF. + if ($node->value[strlen($node->value) - 1] !== "\r") { + $value = $shouldIdent ? $this->indentString($node->value) : $node->value; + return "<<<'$label'$nl$value$nl$label{$this->docStringEndToken}"; + } } /* break missing intentionally */ + // no break case Scalar\String_::KIND_SINGLE_QUOTED: return $this->pSingleQuotedString($node->value); case Scalar\String_::KIND_HEREDOC: $label = $node->getAttribute('docLabel'); - if ($label && !$this->containsEndLabel($node->value, $label)) { - if ($node->value === '') { - return "<<<$label\n$label" . $this->docStringEndToken; + $escaped = $this->escapeString($node->value, null); + if ($label && !$this->containsEndLabel($escaped, $label)) { + $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; + if ($escaped === '') { + return "<<<$label$nl$label{$this->docStringEndToken}"; } - $escaped = $this->escapeString($node->value, null); - return "<<<$label\n" . $escaped . "\n$label" - . $this->docStringEndToken; + return "<<<$label$nl$escaped$nl$label{$this->docStringEndToken}"; } - /* break missing intentionally */ + /* break missing intentionally */ + // no break case Scalar\String_::KIND_DOUBLE_QUOTED: return '"' . $this->escapeString($node->value, '"') . '"'; } throw new \Exception('Invalid string kind'); } - protected function pScalar_Encapsed(Scalar\Encapsed $node) { + protected function pScalar_InterpolatedString(Scalar\InterpolatedString $node): string { if ($node->getAttribute('kind') === Scalar\String_::KIND_HEREDOC) { $label = $node->getAttribute('docLabel'); if ($label && !$this->encapsedContainsEndLabel($node->parts, $label)) { + $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; if (count($node->parts) === 1 - && $node->parts[0] instanceof Scalar\EncapsedStringPart + && $node->parts[0] instanceof Node\InterpolatedStringPart && $node->parts[0]->value === '' ) { - return "<<<$label\n$label" . $this->docStringEndToken; + return "<<<$label$nl$label{$this->docStringEndToken}"; } - return "<<<$label\n" . $this->pEncapsList($node->parts, null) . "\n$label" - . $this->docStringEndToken; + return "<<<$label$nl" . $this->pEncapsList($node->parts, null) + . "$nl$label{$this->docStringEndToken}"; } } return '"' . $this->pEncapsList($node->parts, '"') . '"'; } - protected function pScalar_LNumber(Scalar\LNumber $node) { - if ($node->value === -\PHP_INT_MAX-1) { + protected function pScalar_Int(Scalar\Int_ $node): string { + if ($node->value === -\PHP_INT_MAX - 1) { // PHP_INT_MIN cannot be represented as a literal, // because the sign is not part of the literal return '(-' . \PHP_INT_MAX . '-1)'; } - $kind = $node->getAttribute('kind', Scalar\LNumber::KIND_DEC); - if (Scalar\LNumber::KIND_DEC === $kind) { + $kind = $node->getAttribute('kind', Scalar\Int_::KIND_DEC); + if (Scalar\Int_::KIND_DEC === $kind) { return (string) $node->value; } @@ -200,22 +211,23 @@ class Standard extends PrettyPrinterAbstract $str = (string) $node->value; } switch ($kind) { - case Scalar\LNumber::KIND_BIN: + case Scalar\Int_::KIND_BIN: return $sign . '0b' . base_convert($str, 10, 2); - case Scalar\LNumber::KIND_OCT: + case Scalar\Int_::KIND_OCT: return $sign . '0' . base_convert($str, 10, 8); - case Scalar\LNumber::KIND_HEX: + case Scalar\Int_::KIND_HEX: return $sign . '0x' . base_convert($str, 10, 16); } throw new \Exception('Invalid number kind'); } - protected function pScalar_DNumber(Scalar\DNumber $node) { + protected function pScalar_Float(Scalar\Float_ $node): string { if (!is_finite($node->value)) { if ($node->value === \INF) { - return '\INF'; - } elseif ($node->value === -\INF) { - return '-\INF'; + return '1.0E+1000'; + } + if ($node->value === -\INF) { + return '-1.0E+1000'; } else { return '\NAN'; } @@ -223,7 +235,7 @@ class Standard extends PrettyPrinterAbstract // Try to find a short full-precision representation $stringValue = sprintf('%.16G', $node->value); - if ($node->value !== (double) $stringValue) { + if ($node->value !== (float) $stringValue) { $stringValue = sprintf('%.17G', $node->value); } @@ -236,299 +248,288 @@ class Standard extends PrettyPrinterAbstract return preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; } - protected function pScalar_EncapsedStringPart(Scalar\EncapsedStringPart $node) { - throw new \LogicException('Cannot directly print EncapsedStringPart'); - } - // Assignments - protected function pExpr_Assign(Expr\Assign $node) { - return $this->pInfixOp(Expr\Assign::class, $node->var, ' = ', $node->expr); + protected function pExpr_Assign(Expr\Assign $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Assign::class, $this->p($node->var) . ' = ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignRef(Expr\AssignRef $node) { - return $this->pInfixOp(Expr\AssignRef::class, $node->var, ' =& ', $node->expr); + protected function pExpr_AssignRef(Expr\AssignRef $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\AssignRef::class, $this->p($node->var) . ' =& ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Plus(AssignOp\Plus $node) { - return $this->pInfixOp(AssignOp\Plus::class, $node->var, ' += ', $node->expr); + protected function pExpr_AssignOp_Plus(AssignOp\Plus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Plus::class, $this->p($node->var) . ' += ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Minus(AssignOp\Minus $node) { - return $this->pInfixOp(AssignOp\Minus::class, $node->var, ' -= ', $node->expr); + protected function pExpr_AssignOp_Minus(AssignOp\Minus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Minus::class, $this->p($node->var) . ' -= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Mul(AssignOp\Mul $node) { - return $this->pInfixOp(AssignOp\Mul::class, $node->var, ' *= ', $node->expr); + protected function pExpr_AssignOp_Mul(AssignOp\Mul $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Mul::class, $this->p($node->var) . ' *= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Div(AssignOp\Div $node) { - return $this->pInfixOp(AssignOp\Div::class, $node->var, ' /= ', $node->expr); + protected function pExpr_AssignOp_Div(AssignOp\Div $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Div::class, $this->p($node->var) . ' /= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Concat(AssignOp\Concat $node) { - return $this->pInfixOp(AssignOp\Concat::class, $node->var, ' .= ', $node->expr); + protected function pExpr_AssignOp_Concat(AssignOp\Concat $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Concat::class, $this->p($node->var) . ' .= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Mod(AssignOp\Mod $node) { - return $this->pInfixOp(AssignOp\Mod::class, $node->var, ' %= ', $node->expr); + protected function pExpr_AssignOp_Mod(AssignOp\Mod $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Mod::class, $this->p($node->var) . ' %= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node) { - return $this->pInfixOp(AssignOp\BitwiseAnd::class, $node->var, ' &= ', $node->expr); + protected function pExpr_AssignOp_BitwiseAnd(AssignOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseAnd::class, $this->p($node->var) . ' &= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node) { - return $this->pInfixOp(AssignOp\BitwiseOr::class, $node->var, ' |= ', $node->expr); + protected function pExpr_AssignOp_BitwiseOr(AssignOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseOr::class, $this->p($node->var) . ' |= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node) { - return $this->pInfixOp(AssignOp\BitwiseXor::class, $node->var, ' ^= ', $node->expr); + protected function pExpr_AssignOp_BitwiseXor(AssignOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\BitwiseXor::class, $this->p($node->var) . ' ^= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node) { - return $this->pInfixOp(AssignOp\ShiftLeft::class, $node->var, ' <<= ', $node->expr); + protected function pExpr_AssignOp_ShiftLeft(AssignOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\ShiftLeft::class, $this->p($node->var) . ' <<= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node) { - return $this->pInfixOp(AssignOp\ShiftRight::class, $node->var, ' >>= ', $node->expr); + protected function pExpr_AssignOp_ShiftRight(AssignOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\ShiftRight::class, $this->p($node->var) . ' >>= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Pow(AssignOp\Pow $node) { - return $this->pInfixOp(AssignOp\Pow::class, $node->var, ' **= ', $node->expr); + protected function pExpr_AssignOp_Pow(AssignOp\Pow $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Pow::class, $this->p($node->var) . ' **= ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node) { - return $this->pInfixOp(AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr); + protected function pExpr_AssignOp_Coalesce(AssignOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(AssignOp\Coalesce::class, $this->p($node->var) . ' ??= ', $node->expr, $precedence, $lhsPrecedence); } // Binary expressions - protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node) { - return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right); + protected function pExpr_BinaryOp_Plus(BinaryOp\Plus $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Plus::class, $node->left, ' + ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node) { - return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right); + protected function pExpr_BinaryOp_Minus(BinaryOp\Minus $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Minus::class, $node->left, ' - ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node) { - return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right); + protected function pExpr_BinaryOp_Mul(BinaryOp\Mul $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Mul::class, $node->left, ' * ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Div(BinaryOp\Div $node) { - return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right); + protected function pExpr_BinaryOp_Div(BinaryOp\Div $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Div::class, $node->left, ' / ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node) { - return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right); + protected function pExpr_BinaryOp_Concat(BinaryOp\Concat $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Concat::class, $node->left, ' . ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node) { - return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right); + protected function pExpr_BinaryOp_Mod(BinaryOp\Mod $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Mod::class, $node->left, ' % ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node) { - return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right); + protected function pExpr_BinaryOp_BooleanAnd(BinaryOp\BooleanAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node) { - return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right); + protected function pExpr_BinaryOp_BooleanOr(BinaryOp\BooleanOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node) { - return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right); + protected function pExpr_BinaryOp_BitwiseAnd(BinaryOp\BitwiseAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node) { - return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right); + protected function pExpr_BinaryOp_BitwiseOr(BinaryOp\BitwiseOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node) { - return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right); + protected function pExpr_BinaryOp_BitwiseXor(BinaryOp\BitwiseXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node) { - return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right); + protected function pExpr_BinaryOp_ShiftLeft(BinaryOp\ShiftLeft $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node) { - return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right); + protected function pExpr_BinaryOp_ShiftRight(BinaryOp\ShiftRight $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node) { - return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right); + protected function pExpr_BinaryOp_Pow(BinaryOp\Pow $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Pow::class, $node->left, ' ** ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node) { - return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right); + protected function pExpr_BinaryOp_LogicalAnd(BinaryOp\LogicalAnd $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node) { - return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right); + protected function pExpr_BinaryOp_LogicalOr(BinaryOp\LogicalOr $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node) { - return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right); + protected function pExpr_BinaryOp_LogicalXor(BinaryOp\LogicalXor $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node) { - return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right); + protected function pExpr_BinaryOp_Equal(BinaryOp\Equal $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Equal::class, $node->left, ' == ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node) { - return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right); + protected function pExpr_BinaryOp_NotEqual(BinaryOp\NotEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\NotEqual::class, $node->left, ' != ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node) { - return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right); + protected function pExpr_BinaryOp_Identical(BinaryOp\Identical $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Identical::class, $node->left, ' === ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node) { - return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right); + protected function pExpr_BinaryOp_NotIdentical(BinaryOp\NotIdentical $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node) { - return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right); + protected function pExpr_BinaryOp_Spaceship(BinaryOp\Spaceship $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node) { - return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right); + protected function pExpr_BinaryOp_Greater(BinaryOp\Greater $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Greater::class, $node->left, ' > ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node) { - return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right); + protected function pExpr_BinaryOp_GreaterOrEqual(BinaryOp\GreaterOrEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node) { - return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right); + protected function pExpr_BinaryOp_Smaller(BinaryOp\Smaller $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Smaller::class, $node->left, ' < ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node) { - return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right); + protected function pExpr_BinaryOp_SmallerOrEqual(BinaryOp\SmallerOrEqual $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node) { - return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right); + protected function pExpr_BinaryOp_Coalesce(BinaryOp\Coalesce $node, int $precedence, int $lhsPrecedence): string { + return $this->pInfixOp(BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right, $precedence, $lhsPrecedence); } - protected function pExpr_Instanceof(Expr\Instanceof_ $node) { - list($precedence, $associativity) = $this->precedenceMap[Expr\Instanceof_::class]; - return $this->pPrec($node->expr, $precedence, $associativity, -1) - . ' instanceof ' - . $this->pNewVariable($node->class); + protected function pExpr_Instanceof(Expr\Instanceof_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPostfixOp( + Expr\Instanceof_::class, $node->expr, + ' instanceof ' . $this->pNewOperand($node->class), + $precedence, $lhsPrecedence); } // Unary expressions - protected function pExpr_BooleanNot(Expr\BooleanNot $node) { - return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr); + protected function pExpr_BooleanNot(Expr\BooleanNot $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\BooleanNot::class, '!', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_BitwiseNot(Expr\BitwiseNot $node) { - return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr); + protected function pExpr_BitwiseNot(Expr\BitwiseNot $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\BitwiseNot::class, '~', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_UnaryMinus(Expr\UnaryMinus $node) { - if ($node->expr instanceof Expr\UnaryMinus || $node->expr instanceof Expr\PreDec) { - // Enforce -(-$expr) instead of --$expr - return '-(' . $this->p($node->expr) . ')'; - } - return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr); + protected function pExpr_UnaryMinus(Expr\UnaryMinus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\UnaryMinus::class, '-', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_UnaryPlus(Expr\UnaryPlus $node) { - if ($node->expr instanceof Expr\UnaryPlus || $node->expr instanceof Expr\PreInc) { - // Enforce +(+$expr) instead of ++$expr - return '+(' . $this->p($node->expr) . ')'; - } - return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr); + protected function pExpr_UnaryPlus(Expr\UnaryPlus $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\UnaryPlus::class, '+', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_PreInc(Expr\PreInc $node) { - return $this->pPrefixOp(Expr\PreInc::class, '++', $node->var); + protected function pExpr_PreInc(Expr\PreInc $node): string { + return '++' . $this->p($node->var); } - protected function pExpr_PreDec(Expr\PreDec $node) { - return $this->pPrefixOp(Expr\PreDec::class, '--', $node->var); + protected function pExpr_PreDec(Expr\PreDec $node): string { + return '--' . $this->p($node->var); } - protected function pExpr_PostInc(Expr\PostInc $node) { - return $this->pPostfixOp(Expr\PostInc::class, $node->var, '++'); + protected function pExpr_PostInc(Expr\PostInc $node): string { + return $this->p($node->var) . '++'; } - protected function pExpr_PostDec(Expr\PostDec $node) { - return $this->pPostfixOp(Expr\PostDec::class, $node->var, '--'); + protected function pExpr_PostDec(Expr\PostDec $node): string { + return $this->p($node->var) . '--'; } - protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node) { - return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr); + protected function pExpr_ErrorSuppress(Expr\ErrorSuppress $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\ErrorSuppress::class, '@', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_YieldFrom(Expr\YieldFrom $node) { - return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr); + protected function pExpr_YieldFrom(Expr\YieldFrom $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\YieldFrom::class, 'yield from ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Print(Expr\Print_ $node) { - return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr); + protected function pExpr_Print(Expr\Print_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Print_::class, 'print ', $node->expr, $precedence, $lhsPrecedence); } // Casts - protected function pExpr_Cast_Int(Cast\Int_ $node) { - return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr); + protected function pExpr_Cast_Int(Cast\Int_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Int_::class, '(int) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Double(Cast\Double $node) { + protected function pExpr_Cast_Double(Cast\Double $node, int $precedence, int $lhsPrecedence): string { $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); if ($kind === Cast\Double::KIND_DOUBLE) { $cast = '(double)'; } elseif ($kind === Cast\Double::KIND_FLOAT) { $cast = '(float)'; - } elseif ($kind === Cast\Double::KIND_REAL) { + } else { + assert($kind === Cast\Double::KIND_REAL); $cast = '(real)'; } - return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr); + return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_String(Cast\String_ $node) { - return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr); + protected function pExpr_Cast_String(Cast\String_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\String_::class, '(string) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Array(Cast\Array_ $node) { - return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr); + protected function pExpr_Cast_Array(Cast\Array_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Array_::class, '(array) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Object(Cast\Object_ $node) { - return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr); + protected function pExpr_Cast_Object(Cast\Object_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Object_::class, '(object) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Bool(Cast\Bool_ $node) { - return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr); + protected function pExpr_Cast_Bool(Cast\Bool_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Bool_::class, '(bool) ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Cast_Unset(Cast\Unset_ $node) { - return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr); + protected function pExpr_Cast_Unset(Cast\Unset_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Cast\Unset_::class, '(unset) ', $node->expr, $precedence, $lhsPrecedence); } // Function calls and similar constructs - protected function pExpr_FuncCall(Expr\FuncCall $node) { + protected function pExpr_FuncCall(Expr\FuncCall $node): string { return $this->pCallLhs($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_MethodCall(Expr\MethodCall $node) { + protected function pExpr_MethodCall(Expr\MethodCall $node): string { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node) { + protected function pExpr_NullsafeMethodCall(Expr\NullsafeMethodCall $node): string { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_StaticCall(Expr\StaticCall $node) { + protected function pExpr_StaticCall(Expr\StaticCall $node): string { return $this->pStaticDereferenceLhs($node->class) . '::' . ($node->name instanceof Expr ? ($node->name instanceof Expr\Variable @@ -538,19 +539,19 @@ class Standard extends PrettyPrinterAbstract . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Empty(Expr\Empty_ $node) { + protected function pExpr_Empty(Expr\Empty_ $node): string { return 'empty(' . $this->p($node->expr) . ')'; } - protected function pExpr_Isset(Expr\Isset_ $node) { + protected function pExpr_Isset(Expr\Isset_ $node): string { return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; } - protected function pExpr_Eval(Expr\Eval_ $node) { + protected function pExpr_Eval(Expr\Eval_ $node): string { return 'eval(' . $this->p($node->expr) . ')'; } - protected function pExpr_Include(Expr\Include_ $node) { + protected function pExpr_Include(Expr\Include_ $node, int $precedence, int $lhsPrecedence): string { static $map = [ Expr\Include_::TYPE_INCLUDE => 'include', Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', @@ -558,20 +559,26 @@ class Standard extends PrettyPrinterAbstract Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once', ]; - return $map[$node->type] . ' ' . $this->p($node->expr); + return $this->pPrefixOp(Expr\Include_::class, $map[$node->type] . ' ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_List(Expr\List_ $node) { - return 'list(' . $this->pCommaSeparated($node->items) . ')'; + protected function pExpr_List(Expr\List_ $node): string { + $syntax = $node->getAttribute('kind', + $this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_LIST); + if ($syntax === Expr\List_::KIND_ARRAY) { + return '[' . $this->pMaybeMultiline($node->items, true) . ']'; + } else { + return 'list(' . $this->pMaybeMultiline($node->items, true) . ')'; + } } // Other - protected function pExpr_Error(Expr\Error $node) { + protected function pExpr_Error(Expr\Error $node): string { throw new \LogicException('Cannot pretty-print AST with Error nodes'); } - protected function pExpr_Variable(Expr\Variable $node) { + protected function pExpr_Variable(Expr\Variable $node): string { if ($node->name instanceof Expr) { return '${' . $this->p($node->name) . '}'; } else { @@ -579,9 +586,9 @@ class Standard extends PrettyPrinterAbstract } } - protected function pExpr_Array(Expr\Array_ $node) { + protected function pExpr_Array(Expr\Array_ $node): string { $syntax = $node->getAttribute('kind', - $this->options['shortArraySyntax'] ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); + $this->shortArraySyntax ? Expr\Array_::KIND_SHORT : Expr\Array_::KIND_LONG); if ($syntax === Expr\Array_::KIND_SHORT) { return '[' . $this->pMaybeMultiline($node->items, true) . ']'; } else { @@ -589,124 +596,152 @@ class Standard extends PrettyPrinterAbstract } } - protected function pExpr_ArrayItem(Expr\ArrayItem $node) { - return (null !== $node->key ? $this->p($node->key) . ' => ' : '') + protected function pKey(?Node $node): string { + if ($node === null) { + return ''; + } + + // => is not really an operator and does not typically participate in precedence resolution. + // However, there is an exception if yield expressions with keys are involved: + // [yield $a => $b] is interpreted as [(yield $a => $b)], so we need to ensure that + // [(yield $a) => $b] is printed with parentheses. We approximate this by lowering the LHS + // precedence to that of yield (which will also print unnecessary parentheses for rare low + // precedence unary operators like include). + $yieldPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; + return $this->p($node, self::MAX_PRECEDENCE, $yieldPrecedence) . ' => '; + } + + protected function pArrayItem(Node\ArrayItem $node): string { + return $this->pKey($node->key) . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node) { + protected function pExpr_ArrayDimFetch(Expr\ArrayDimFetch $node): string { return $this->pDereferenceLhs($node->var) . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; } - protected function pExpr_ConstFetch(Expr\ConstFetch $node) { + protected function pExpr_ConstFetch(Expr\ConstFetch $node): string { return $this->p($node->name); } - protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node) { + protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string { return $this->pStaticDereferenceLhs($node->class) . '::' . $this->pObjectProperty($node->name); } - protected function pExpr_PropertyFetch(Expr\PropertyFetch $node) { + protected function pExpr_PropertyFetch(Expr\PropertyFetch $node): string { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); } - protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node) { + protected function pExpr_NullsafePropertyFetch(Expr\NullsafePropertyFetch $node): string { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); } - protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node) { + protected function pExpr_StaticPropertyFetch(Expr\StaticPropertyFetch $node): string { return $this->pStaticDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); } - protected function pExpr_ShellExec(Expr\ShellExec $node) { + protected function pExpr_ShellExec(Expr\ShellExec $node): string { return '`' . $this->pEncapsList($node->parts, '`') . '`'; } - protected function pExpr_Closure(Expr\Closure $node) { + protected function pExpr_Closure(Expr\Closure $node): string { return $this->pAttrGroups($node->attrGroups, true) - . ($node->static ? 'static ' : '') + . $this->pStatic($node->static) . 'function ' . ($node->byRef ? '&' : '') - . '(' . $this->pCommaSeparated($node->params) . ')' - . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '') - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . (!empty($node->uses) ? ' use (' . $this->pCommaSeparated($node->uses) . ')' : '') + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pExpr_Match(Expr\Match_ $node) { + protected function pExpr_Match(Expr\Match_ $node): string { return 'match (' . $this->p($node->cond) . ') {' . $this->pCommaSeparatedMultiline($node->arms, true) . $this->nl . '}'; } - protected function pMatchArm(Node\MatchArm $node) { - return ($node->conds ? $this->pCommaSeparated($node->conds) : 'default') - . ' => ' . $this->p($node->body); + protected function pMatchArm(Node\MatchArm $node): string { + $result = ''; + if ($node->conds) { + for ($i = 0, $c = \count($node->conds); $i + 1 < $c; $i++) { + $result .= $this->p($node->conds[$i]) . ', '; + } + $result .= $this->pKey($node->conds[$i]); + } else { + $result = 'default => '; + } + return $result . $this->p($node->body); } - protected function pExpr_ArrowFunction(Expr\ArrowFunction $node) { - return $this->pAttrGroups($node->attrGroups, true) - . ($node->static ? 'static ' : '') + protected function pExpr_ArrowFunction(Expr\ArrowFunction $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp( + Expr\ArrowFunction::class, + $this->pAttrGroups($node->attrGroups, true) + . $this->pStatic($node->static) . 'fn' . ($node->byRef ? '&' : '') - . '(' . $this->pCommaSeparated($node->params) . ')' + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') - . ' => ' - . $this->p($node->expr); + . ' => ', + $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_ClosureUse(Expr\ClosureUse $node) { + protected function pClosureUse(Node\ClosureUse $node): string { return ($node->byRef ? '&' : '') . $this->p($node->var); } - protected function pExpr_New(Expr\New_ $node) { + protected function pExpr_New(Expr\New_ $node): string { if ($node->class instanceof Stmt\Class_) { $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; return 'new ' . $this->pClassCommon($node->class, $args); } - return 'new ' . $this->pNewVariable($node->class) + return 'new ' . $this->pNewOperand($node->class) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Clone(Expr\Clone_ $node) { - return 'clone ' . $this->p($node->expr); + protected function pExpr_Clone(Expr\Clone_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Clone_::class, 'clone ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Ternary(Expr\Ternary $node) { + protected function pExpr_Ternary(Expr\Ternary $node, int $precedence, int $lhsPrecedence): string { // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. // this is okay because the part between ? and : never needs parentheses. return $this->pInfixOp(Expr\Ternary::class, - $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else + $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else, + $precedence, $lhsPrecedence ); } - protected function pExpr_Exit(Expr\Exit_ $node) { + protected function pExpr_Exit(Expr\Exit_ $node): string { $kind = $node->getAttribute('kind', Expr\Exit_::KIND_DIE); return ($kind === Expr\Exit_::KIND_EXIT ? 'exit' : 'die') . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); } - protected function pExpr_Throw(Expr\Throw_ $node) { - return 'throw ' . $this->p($node->expr); + protected function pExpr_Throw(Expr\Throw_ $node, int $precedence, int $lhsPrecedence): string { + return $this->pPrefixOp(Expr\Throw_::class, 'throw ', $node->expr, $precedence, $lhsPrecedence); } - protected function pExpr_Yield(Expr\Yield_ $node) { + protected function pExpr_Yield(Expr\Yield_ $node, int $precedence, int $lhsPrecedence): string { if ($node->value === null) { - return 'yield'; + $opPrecedence = $this->precedenceMap[Expr\Yield_::class][0]; + return $opPrecedence >= $lhsPrecedence ? '(yield)' : 'yield'; } else { - // this is a bit ugly, but currently there is no way to detect whether the parentheses are necessary - return '(yield ' - . ($node->key !== null ? $this->p($node->key) . ' => ' : '') - . $this->p($node->value) - . ')'; + if (!$this->phpVersion->supportsYieldWithoutParentheses()) { + return '(yield ' . $this->pKey($node->key) . $this->p($node->value) . ')'; + } + return $this->pPrefixOp( + Expr\Yield_::class, 'yield ' . $this->pKey($node->key), + $node->value, $precedence, $lhsPrecedence); } } // Declarations - protected function pStmt_Namespace(Stmt\Namespace_ $node) { + protected function pStmt_Namespace(Stmt\Namespace_ $node): string { if ($this->canUseSemicolonNamespaces) { return 'namespace ' . $this->p($node->name) . ';' . $this->nl . $this->pStmts($node->stmts, false); @@ -716,102 +751,102 @@ class Standard extends PrettyPrinterAbstract } } - protected function pStmt_Use(Stmt\Use_ $node) { + protected function pStmt_Use(Stmt\Use_ $node): string { return 'use ' . $this->pUseType($node->type) . $this->pCommaSeparated($node->uses) . ';'; } - protected function pStmt_GroupUse(Stmt\GroupUse $node) { + protected function pStmt_GroupUse(Stmt\GroupUse $node): string { return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) . '\{' . $this->pCommaSeparated($node->uses) . '};'; } - protected function pStmt_UseUse(Stmt\UseUse $node) { + protected function pUseItem(Node\UseItem $node): string { return $this->pUseType($node->type) . $this->p($node->name) . (null !== $node->alias ? ' as ' . $node->alias : ''); } - protected function pUseType($type) { + protected function pUseType(int $type): string { return $type === Stmt\Use_::TYPE_FUNCTION ? 'function ' : ($type === Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); } - protected function pStmt_Interface(Stmt\Interface_ $node) { + protected function pStmt_Interface(Stmt\Interface_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'interface ' . $node->name . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Enum(Stmt\Enum_ $node) { + protected function pStmt_Enum(Stmt\Enum_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'enum ' . $node->name - . ($node->scalarType ? " : $node->scalarType" : '') + . ($node->scalarType ? ' : ' . $this->p($node->scalarType) : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Class(Stmt\Class_ $node) { + protected function pStmt_Class(Stmt\Class_ $node): string { return $this->pClassCommon($node, ' ' . $node->name); } - protected function pStmt_Trait(Stmt\Trait_ $node) { + protected function pStmt_Trait(Stmt\Trait_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'trait ' . $node->name . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_EnumCase(Stmt\EnumCase $node) { + protected function pStmt_EnumCase(Stmt\EnumCase $node): string { return $this->pAttrGroups($node->attrGroups) . 'case ' . $node->name . ($node->expr ? ' = ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_TraitUse(Stmt\TraitUse $node) { + protected function pStmt_TraitUse(Stmt\TraitUse $node): string { return 'use ' . $this->pCommaSeparated($node->traits) . (empty($node->adaptations) ? ';' : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); } - protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node) { + protected function pStmt_TraitUseAdaptation_Precedence(Stmt\TraitUseAdaptation\Precedence $node): string { return $this->p($node->trait) . '::' . $node->method . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; } - protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node) { + protected function pStmt_TraitUseAdaptation_Alias(Stmt\TraitUseAdaptation\Alias $node): string { return (null !== $node->trait ? $this->p($node->trait) . '::' : '') . $node->method . ' as' . (null !== $node->newModifier ? ' ' . rtrim($this->pModifiers($node->newModifier), ' ') : '') - . (null !== $node->newName ? ' ' . $node->newName : '') + . (null !== $node->newName ? ' ' . $node->newName : '') . ';'; } - protected function pStmt_Property(Stmt\Property $node) { + protected function pStmt_Property(Stmt\Property $node): string { return $this->pAttrGroups($node->attrGroups) . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . ($node->type ? $this->p($node->type) . ' ' : '') . $this->pCommaSeparated($node->props) . ';'; } - protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) { + protected function pPropertyItem(Node\PropertyItem $node): string { return '$' . $node->name . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pStmt_ClassMethod(Stmt\ClassMethod $node) { + protected function pStmt_ClassMethod(Stmt\ClassMethod $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pMaybeMultiline($node->params) . ')' - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . (null !== $node->stmts ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - protected function pStmt_ClassConst(Stmt\ClassConst $node) { + protected function pStmt_ClassConst(Stmt\ClassConst $node): string { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'const ' @@ -819,46 +854,50 @@ class Standard extends PrettyPrinterAbstract . $this->pCommaSeparated($node->consts) . ';'; } - protected function pStmt_Function(Stmt\Function_ $node) { + protected function pStmt_Function(Stmt\Function_ $node): string { return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name - . '(' . $this->pCommaSeparated($node->params) . ')' - . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') + . '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList()) . ')' + . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Const(Stmt\Const_ $node) { + protected function pStmt_Const(Stmt\Const_ $node): string { return 'const ' . $this->pCommaSeparated($node->consts) . ';'; } - protected function pStmt_Declare(Stmt\Declare_ $node) { + protected function pStmt_Declare(Stmt\Declare_ $node): string { return 'declare (' . $this->pCommaSeparated($node->declares) . ')' . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - protected function pStmt_DeclareDeclare(Stmt\DeclareDeclare $node) { + protected function pDeclareItem(Node\DeclareItem $node): string { return $node->key . '=' . $this->p($node->value); } // Control flow - protected function pStmt_If(Stmt\If_ $node) { + protected function pStmt_If(Stmt\If_ $node): string { return 'if (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') . (null !== $node->else ? ' ' . $this->p($node->else) : ''); } - protected function pStmt_ElseIf(Stmt\ElseIf_ $node) { + protected function pStmt_ElseIf(Stmt\ElseIf_ $node): string { return 'elseif (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Else(Stmt\Else_ $node) { + protected function pStmt_Else(Stmt\Else_ $node): string { + if (\count($node->stmts) === 1 && $node->stmts[0] instanceof Stmt\If_) { + // Print as "else if" rather than "else { if }" + return 'else ' . $this->p($node->stmts[0]); + } return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_For(Stmt\For_ $node) { + protected function pStmt_For(Stmt\For_ $node): string { return 'for (' . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') @@ -866,116 +905,116 @@ class Standard extends PrettyPrinterAbstract . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Foreach(Stmt\Foreach_ $node) { + protected function pStmt_Foreach(Stmt\Foreach_ $node): string { return 'foreach (' . $this->p($node->expr) . ' as ' . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_While(Stmt\While_ $node) { + protected function pStmt_While(Stmt\While_ $node): string { return 'while (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Do(Stmt\Do_ $node) { + protected function pStmt_Do(Stmt\Do_ $node): string { return 'do {' . $this->pStmts($node->stmts) . $this->nl . '} while (' . $this->p($node->cond) . ');'; } - protected function pStmt_Switch(Stmt\Switch_ $node) { + protected function pStmt_Switch(Stmt\Switch_ $node): string { return 'switch (' . $this->p($node->cond) . ') {' . $this->pStmts($node->cases) . $this->nl . '}'; } - protected function pStmt_Case(Stmt\Case_ $node) { + protected function pStmt_Case(Stmt\Case_ $node): string { return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' . $this->pStmts($node->stmts); } - protected function pStmt_TryCatch(Stmt\TryCatch $node) { + protected function pStmt_TryCatch(Stmt\TryCatch $node): string { return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); } - protected function pStmt_Catch(Stmt\Catch_ $node) { + protected function pStmt_Catch(Stmt\Catch_ $node): string { return 'catch (' . $this->pImplode($node->types, '|') . ($node->var !== null ? ' ' . $this->p($node->var) : '') . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Finally(Stmt\Finally_ $node) { + protected function pStmt_Finally(Stmt\Finally_ $node): string { return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Break(Stmt\Break_ $node) { + protected function pStmt_Break(Stmt\Break_ $node): string { return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - protected function pStmt_Continue(Stmt\Continue_ $node) { + protected function pStmt_Continue(Stmt\Continue_ $node): string { return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - protected function pStmt_Return(Stmt\Return_ $node) { + protected function pStmt_Return(Stmt\Return_ $node): string { return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_Throw(Stmt\Throw_ $node) { - return 'throw ' . $this->p($node->expr) . ';'; - } - - protected function pStmt_Label(Stmt\Label $node) { + protected function pStmt_Label(Stmt\Label $node): string { return $node->name . ':'; } - protected function pStmt_Goto(Stmt\Goto_ $node) { + protected function pStmt_Goto(Stmt\Goto_ $node): string { return 'goto ' . $node->name . ';'; } // Other - protected function pStmt_Expression(Stmt\Expression $node) { + protected function pStmt_Expression(Stmt\Expression $node): string { return $this->p($node->expr) . ';'; } - protected function pStmt_Echo(Stmt\Echo_ $node) { + protected function pStmt_Echo(Stmt\Echo_ $node): string { return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; } - protected function pStmt_Static(Stmt\Static_ $node) { + protected function pStmt_Static(Stmt\Static_ $node): string { return 'static ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStmt_Global(Stmt\Global_ $node) { + protected function pStmt_Global(Stmt\Global_ $node): string { return 'global ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStmt_StaticVar(Stmt\StaticVar $node) { + protected function pStaticVar(Node\StaticVar $node): string { return $this->p($node->var) . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pStmt_Unset(Stmt\Unset_ $node) { + protected function pStmt_Unset(Stmt\Unset_ $node): string { return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; } - protected function pStmt_InlineHTML(Stmt\InlineHTML $node) { - $newline = $node->getAttribute('hasLeadingNewline', true) ? "\n" : ''; + protected function pStmt_InlineHTML(Stmt\InlineHTML $node): string { + $newline = $node->getAttribute('hasLeadingNewline', true) ? $this->newline : ''; return '?>' . $newline . $node->value . '<?php '; } - protected function pStmt_HaltCompiler(Stmt\HaltCompiler $node) { + protected function pStmt_HaltCompiler(Stmt\HaltCompiler $node): string { return '__halt_compiler();' . $node->remaining; } - protected function pStmt_Nop(Stmt\Nop $node) { + protected function pStmt_Nop(Stmt\Nop $node): string { return ''; } + protected function pStmt_Block(Stmt\Block $node): string { + return '{' . $this->pStmts($node->stmts) . $this->nl . '}'; + } + // Helpers - protected function pClassCommon(Stmt\Class_ $node, $afterClassToken) { + protected function pClassCommon(Stmt\Class_ $node, string $afterClassToken): string { return $this->pAttrGroups($node->attrGroups, $node->name === null) . $this->pModifiers($node->flags) . 'class' . $afterClassToken @@ -984,18 +1023,20 @@ class Standard extends PrettyPrinterAbstract . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pObjectProperty($node) { + protected function pObjectProperty(Node $node): string { if ($node instanceof Expr) { return '{' . $this->p($node) . '}'; } else { - return $node; + assert($node instanceof Node\Identifier); + return $node->name; } } - protected function pEncapsList(array $encapsList, $quote) { + /** @param (Expr|Node\InterpolatedStringPart)[] $encapsList */ + protected function pEncapsList(array $encapsList, ?string $quote): string { $return = ''; foreach ($encapsList as $element) { - if ($element instanceof Scalar\EncapsedStringPart) { + if ($element instanceof Node\InterpolatedStringPart) { $return .= $this->escapeString($element->value, $quote); } else { $return .= '{' . $this->p($element) . '}'; @@ -1005,14 +1046,25 @@ class Standard extends PrettyPrinterAbstract return $return; } - protected function pSingleQuotedString(string $string) { - return '\'' . addcslashes($string, '\'\\') . '\''; + protected function pSingleQuotedString(string $string): string { + // It is idiomatic to only escape backslashes when necessary, i.e. when followed by ', \ or + // the end of the string ('Foo\Bar' instead of 'Foo\\Bar'). However, we also don't want to + // produce an odd number of backslashes, so '\\\\a' should not get rendered as '\\\a', even + // though that would be legal. + $regex = '/\'|\\\\(?=[\'\\\\]|$)|(?<=\\\\)\\\\/'; + return '\'' . preg_replace($regex, '\\\\$0', $string) . '\''; } - protected function escapeString($string, $quote) { + protected function escapeString(string $string, ?string $quote): string { if (null === $quote) { // For doc strings, don't escape newlines $escaped = addcslashes($string, "\t\f\v$\\"); + // But do escape isolated \r. Combined with the terminating newline, it might get + // interpreted as \r\n and dropped from the string contents. + $escaped = preg_replace('/\r(?!\n)/', '\\r', $escaped); + if ($this->phpVersion->supportsFlexibleHeredoc()) { + $escaped = $this->indentString($escaped); + } } else { $escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\"); } @@ -1034,26 +1086,24 @@ class Standard extends PrettyPrinterAbstract | (?<=[\xF0-\xF4])[\x80-\xBF](?![\x80-\xBF]{2}) # Short 4 byte sequence | (?<=[\xF0-\xF4][\x80-\xBF])[\x80-\xBF](?![\x80-\xBF]) # Short 4 byte sequence (2) )/x'; - return preg_replace_callback($regex, function ($matches) { + return preg_replace_callback($regex, function ($matches): string { assert(strlen($matches[0]) === 1); - $hex = dechex(ord($matches[0]));; + $hex = dechex(ord($matches[0])); return '\\x' . str_pad($hex, 2, '0', \STR_PAD_LEFT); }, $escaped); } - protected function containsEndLabel($string, $label, $atStart = true, $atEnd = true) { - $start = $atStart ? '(?:^|[\r\n])' : '[\r\n]'; - $end = $atEnd ? '(?:$|[;\r\n])' : '[;\r\n]'; + protected function containsEndLabel(string $string, string $label, bool $atStart = true): bool { + $start = $atStart ? '(?:^|[\r\n])[ \t]*' : '[\r\n][ \t]*'; return false !== strpos($string, $label) - && preg_match('/' . $start . $label . $end . '/', $string); + && preg_match('/' . $start . $label . '(?:$|[^_A-Za-z0-9\x80-\xff])/', $string); } - protected function encapsedContainsEndLabel(array $parts, $label) { + /** @param (Expr|Node\InterpolatedStringPart)[] $parts */ + protected function encapsedContainsEndLabel(array $parts, string $label): bool { foreach ($parts as $i => $part) { - $atStart = $i === 0; - $atEnd = $i === count($parts) - 1; - if ($part instanceof Scalar\EncapsedStringPart - && $this->containsEndLabel($part->value, $label, $atStart, $atEnd) + if ($part instanceof Node\InterpolatedStringPart + && $this->containsEndLabel($this->escapeString($part->value, null), $label, $i === 0) ) { return true; } @@ -1061,15 +1111,15 @@ class Standard extends PrettyPrinterAbstract return false; } - protected function pDereferenceLhs(Node $node) { + protected function pDereferenceLhs(Node $node): string { if (!$this->dereferenceLhsRequiresParens($node)) { return $this->p($node); - } else { + } else { return '(' . $this->p($node) . ')'; } } - protected function pStaticDereferenceLhs(Node $node) { + protected function pStaticDereferenceLhs(Node $node): string { if (!$this->staticDereferenceLhsRequiresParens($node)) { return $this->p($node); } else { @@ -1077,15 +1127,15 @@ class Standard extends PrettyPrinterAbstract } } - protected function pCallLhs(Node $node) { + protected function pCallLhs(Node $node): string { if (!$this->callLhsRequiresParens($node)) { return $this->p($node); - } else { + } else { return '(' . $this->p($node) . ')'; } } - protected function pNewVariable(Node $node): string { + protected function pNewOperand(Node $node): string { if (!$this->newOperandRequiresParens($node)) { return $this->p($node); } else { @@ -1095,9 +1145,8 @@ class Standard extends PrettyPrinterAbstract /** * @param Node[] $nodes - * @return bool */ - protected function hasNodeWithComments(array $nodes) { + protected function hasNodeWithComments(array $nodes): bool { foreach ($nodes as $node) { if ($node && $node->getComments()) { return true; @@ -1106,7 +1155,8 @@ class Standard extends PrettyPrinterAbstract return false; } - protected function pMaybeMultiline(array $nodes, bool $trailingComma = false) { + /** @param Node[] $nodes */ + protected function pMaybeMultiline(array $nodes, bool $trailingComma = false): string { if (!$this->hasNodeWithComments($nodes)) { return $this->pCommaSeparated($nodes); } else { @@ -1114,6 +1164,7 @@ class Standard extends PrettyPrinterAbstract } } + /** @param Node\AttributeGroup[] $nodes */ protected function pAttrGroups(array $nodes, bool $inline = false): string { $result = ''; $sep = $inline ? ' ' : $this->nl; diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index 770d5009..8303c427 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -3,162 +3,200 @@ namespace PhpParser; use PhpParser\Internal\DiffElem; +use PhpParser\Internal\Differ; use PhpParser\Internal\PrintableNewAnonClassNode; use PhpParser\Internal\TokenStream; +use PhpParser\Node\AttributeGroup; use PhpParser\Node\Expr; use PhpParser\Node\Expr\AssignOp; use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\Cast; +use PhpParser\Node\IntersectionType; +use PhpParser\Node\MatchArm; +use PhpParser\Node\Param; use PhpParser\Node\Scalar; use PhpParser\Node\Stmt; +use PhpParser\Node\UnionType; -abstract class PrettyPrinterAbstract -{ - const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence - const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence - const FIXUP_CALL_LHS = 2; // LHS of call - const FIXUP_DEREF_LHS = 3; // LHS of dereferencing operation - const FIXUP_BRACED_NAME = 4; // Name operand that may require bracing - const FIXUP_VAR_BRACED_NAME = 5; // Name operand that may require ${} bracing - const FIXUP_ENCAPSED = 6; // Encapsed string part - const FIXUP_NEW = 7; // New/instanceof operand - const FIXUP_STATIC_DEREF_LHS = 8; // LHS of static dereferencing operation +abstract class PrettyPrinterAbstract implements PrettyPrinter { + protected const FIXUP_PREC_LEFT = 0; // LHS operand affected by precedence + protected const FIXUP_PREC_RIGHT = 1; // RHS operand affected by precedence + protected const FIXUP_PREC_UNARY = 2; // Only operand affected by precedence + protected const FIXUP_CALL_LHS = 3; // LHS of call + protected const FIXUP_DEREF_LHS = 4; // LHS of dereferencing operation + protected const FIXUP_STATIC_DEREF_LHS = 5; // LHS of static dereferencing operation + protected const FIXUP_BRACED_NAME = 6; // Name operand that may require bracing + protected const FIXUP_VAR_BRACED_NAME = 7; // Name operand that may require ${} bracing + protected const FIXUP_ENCAPSED = 8; // Encapsed string part + protected const FIXUP_NEW = 9; // New/instanceof operand - protected $precedenceMap = [ - // [precedence, associativity] - // where for precedence -1 is %left, 0 is %nonassoc and 1 is %right - BinaryOp\Pow::class => [ 0, 1], - Expr\BitwiseNot::class => [ 10, 1], - Expr\PreInc::class => [ 10, 1], - Expr\PreDec::class => [ 10, 1], - Expr\PostInc::class => [ 10, -1], - Expr\PostDec::class => [ 10, -1], - Expr\UnaryPlus::class => [ 10, 1], - Expr\UnaryMinus::class => [ 10, 1], - Cast\Int_::class => [ 10, 1], - Cast\Double::class => [ 10, 1], - Cast\String_::class => [ 10, 1], - Cast\Array_::class => [ 10, 1], - Cast\Object_::class => [ 10, 1], - Cast\Bool_::class => [ 10, 1], - Cast\Unset_::class => [ 10, 1], - Expr\ErrorSuppress::class => [ 10, 1], - Expr\Instanceof_::class => [ 20, 0], - Expr\BooleanNot::class => [ 30, 1], - BinaryOp\Mul::class => [ 40, -1], - BinaryOp\Div::class => [ 40, -1], - BinaryOp\Mod::class => [ 40, -1], - BinaryOp\Plus::class => [ 50, -1], - BinaryOp\Minus::class => [ 50, -1], - BinaryOp\Concat::class => [ 50, -1], - BinaryOp\ShiftLeft::class => [ 60, -1], - BinaryOp\ShiftRight::class => [ 60, -1], - BinaryOp\Smaller::class => [ 70, 0], - BinaryOp\SmallerOrEqual::class => [ 70, 0], - BinaryOp\Greater::class => [ 70, 0], - BinaryOp\GreaterOrEqual::class => [ 70, 0], - BinaryOp\Equal::class => [ 80, 0], - BinaryOp\NotEqual::class => [ 80, 0], - BinaryOp\Identical::class => [ 80, 0], - BinaryOp\NotIdentical::class => [ 80, 0], - BinaryOp\Spaceship::class => [ 80, 0], - BinaryOp\BitwiseAnd::class => [ 90, -1], - BinaryOp\BitwiseXor::class => [100, -1], - BinaryOp\BitwiseOr::class => [110, -1], - BinaryOp\BooleanAnd::class => [120, -1], - BinaryOp\BooleanOr::class => [130, -1], - BinaryOp\Coalesce::class => [140, 1], - Expr\Ternary::class => [150, 0], - // parser uses %left for assignments, but they really behave as %right - Expr\Assign::class => [160, 1], - Expr\AssignRef::class => [160, 1], - AssignOp\Plus::class => [160, 1], - AssignOp\Minus::class => [160, 1], - AssignOp\Mul::class => [160, 1], - AssignOp\Div::class => [160, 1], - AssignOp\Concat::class => [160, 1], - AssignOp\Mod::class => [160, 1], - AssignOp\BitwiseAnd::class => [160, 1], - AssignOp\BitwiseOr::class => [160, 1], - AssignOp\BitwiseXor::class => [160, 1], - AssignOp\ShiftLeft::class => [160, 1], - AssignOp\ShiftRight::class => [160, 1], - AssignOp\Pow::class => [160, 1], - AssignOp\Coalesce::class => [160, 1], - Expr\YieldFrom::class => [165, 1], - Expr\Print_::class => [168, 1], - BinaryOp\LogicalAnd::class => [170, -1], - BinaryOp\LogicalXor::class => [180, -1], - BinaryOp\LogicalOr::class => [190, -1], - Expr\Include_::class => [200, -1], + protected const MAX_PRECEDENCE = 1000; + + /** @var array<class-string, array{int, int, int}> */ + protected array $precedenceMap = [ + // [precedence, precedenceLHS, precedenceRHS] + // Where the latter two are the precedences to use for the LHS and RHS of a binary operator, + // where 1 is added to one of the sides depending on associativity. This information is not + // used for unary operators and set to -1. + Expr\Clone_::class => [-10, 0, 1], + BinaryOp\Pow::class => [ 0, 0, 1], + Expr\BitwiseNot::class => [ 10, -1, -1], + Expr\UnaryPlus::class => [ 10, -1, -1], + Expr\UnaryMinus::class => [ 10, -1, -1], + Cast\Int_::class => [ 10, -1, -1], + Cast\Double::class => [ 10, -1, -1], + Cast\String_::class => [ 10, -1, -1], + Cast\Array_::class => [ 10, -1, -1], + Cast\Object_::class => [ 10, -1, -1], + Cast\Bool_::class => [ 10, -1, -1], + Cast\Unset_::class => [ 10, -1, -1], + Expr\ErrorSuppress::class => [ 10, -1, -1], + Expr\Instanceof_::class => [ 20, -1, -1], + Expr\BooleanNot::class => [ 30, -1, -1], + BinaryOp\Mul::class => [ 40, 41, 40], + BinaryOp\Div::class => [ 40, 41, 40], + BinaryOp\Mod::class => [ 40, 41, 40], + BinaryOp\Plus::class => [ 50, 51, 50], + BinaryOp\Minus::class => [ 50, 51, 50], + BinaryOp\Concat::class => [ 50, 51, 50], + BinaryOp\ShiftLeft::class => [ 60, 61, 60], + BinaryOp\ShiftRight::class => [ 60, 61, 60], + BinaryOp\Smaller::class => [ 70, 70, 70], + BinaryOp\SmallerOrEqual::class => [ 70, 70, 70], + BinaryOp\Greater::class => [ 70, 70, 70], + BinaryOp\GreaterOrEqual::class => [ 70, 70, 70], + BinaryOp\Equal::class => [ 80, 80, 80], + BinaryOp\NotEqual::class => [ 80, 80, 80], + BinaryOp\Identical::class => [ 80, 80, 80], + BinaryOp\NotIdentical::class => [ 80, 80, 80], + BinaryOp\Spaceship::class => [ 80, 80, 80], + BinaryOp\BitwiseAnd::class => [ 90, 91, 90], + BinaryOp\BitwiseXor::class => [100, 101, 100], + BinaryOp\BitwiseOr::class => [110, 111, 110], + BinaryOp\BooleanAnd::class => [120, 121, 120], + BinaryOp\BooleanOr::class => [130, 131, 130], + BinaryOp\Coalesce::class => [140, 140, 141], + Expr\Ternary::class => [150, -1, -1], + Expr\Assign::class => [160, -1, -1], + Expr\AssignRef::class => [160, -1, -1], + AssignOp\Plus::class => [160, -1, -1], + AssignOp\Minus::class => [160, -1, -1], + AssignOp\Mul::class => [160, -1, -1], + AssignOp\Div::class => [160, -1, -1], + AssignOp\Concat::class => [160, -1, -1], + AssignOp\Mod::class => [160, -1, -1], + AssignOp\BitwiseAnd::class => [160, -1, -1], + AssignOp\BitwiseOr::class => [160, -1, -1], + AssignOp\BitwiseXor::class => [160, -1, -1], + AssignOp\ShiftLeft::class => [160, -1, -1], + AssignOp\ShiftRight::class => [160, -1, -1], + AssignOp\Pow::class => [160, -1, -1], + AssignOp\Coalesce::class => [160, -1, -1], + Expr\YieldFrom::class => [170, -1, -1], + Expr\Yield_::class => [175, -1, -1], + Expr\Print_::class => [180, -1, -1], + BinaryOp\LogicalAnd::class => [190, 191, 190], + BinaryOp\LogicalXor::class => [200, 201, 200], + BinaryOp\LogicalOr::class => [210, 211, 210], + Expr\Include_::class => [220, -1, -1], + Expr\ArrowFunction::class => [230, -1, -1], + Expr\Throw_::class => [240, -1, -1], ]; /** @var int Current indentation level. */ - protected $indentLevel; + protected int $indentLevel; + /** @var string Newline style. Does not include current indentation. */ + protected string $newline; /** @var string Newline including current indentation. */ - protected $nl; - /** @var string Token placed at end of doc string to ensure it is followed by a newline. */ - protected $docStringEndToken; + protected string $nl; + /** @var string|null Token placed at end of doc string to ensure it is followed by a newline. + * Null if flexible doc strings are used. */ + protected ?string $docStringEndToken; /** @var bool Whether semicolon namespaces can be used (i.e. no global namespace is used) */ - protected $canUseSemicolonNamespaces; - /** @var array Pretty printer options */ - protected $options; + protected bool $canUseSemicolonNamespaces; + /** @var bool Whether to use short array syntax if the node specifies no preference */ + protected bool $shortArraySyntax; + /** @var PhpVersion PHP version to target */ + protected PhpVersion $phpVersion; - /** @var TokenStream Original tokens for use in format-preserving pretty print */ - protected $origTokens; - /** @var Internal\Differ Differ for node lists */ - protected $nodeListDiffer; - /** @var bool[] Map determining whether a certain character is a label character */ - protected $labelCharMap; + /** @var TokenStream|null Original tokens for use in format-preserving pretty print */ + protected ?TokenStream $origTokens; + /** @var Internal\Differ<Node> Differ for node lists */ + protected Differ $nodeListDiffer; + /** @var array<string, bool> Map determining whether a certain character is a label character */ + protected array $labelCharMap; /** - * @var int[][] Map from token classes and subnode names to FIXUP_* constants. This is used - * during format-preserving prints to place additional parens/braces if necessary. + * @var array<string, array<string, int>> Map from token classes and subnode names to FIXUP_* constants. + * This is used during format-preserving prints to place additional parens/braces if necessary. */ - protected $fixupMap; + protected array $fixupMap; /** - * @var int[][] Map from "{$node->getType()}->{$subNode}" to ['left' => $l, 'right' => $r], - * where $l and $r specify the token type that needs to be stripped when removing - * this node. + * @var array<string, array{left?: int|string, right?: int|string}> Map from "{$node->getType()}->{$subNode}" + * to ['left' => $l, 'right' => $r], where $l and $r specify the token type that needs to be stripped + * when removing this node. */ - protected $removalMap; + protected array $removalMap; /** - * @var mixed[] Map from "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. - * $find is an optional token after which the insertion occurs. $extraLeft/Right - * are optionally added before/after the main insertions. + * @var array<string, array{int|string|null, bool, string|null, string|null}> Map from + * "{$node->getType()}->{$subNode}" to [$find, $beforeToken, $extraLeft, $extraRight]. + * $find is an optional token after which the insertion occurs. $extraLeft/Right + * are optionally added before/after the main insertions. */ - protected $insertionMap; + protected array $insertionMap; /** - * @var string[] Map From "{$node->getType()}->{$subNode}" to string that should be inserted - * between elements of this list subnode. + * @var array<string, string> Map From "{$class}->{$subNode}" to string that should be inserted + * between elements of this list subnode. */ - protected $listInsertionMap; - protected $emptyListInsertionMap; - /** @var int[] Map from "{$node->getType()}->{$subNode}" to token before which the modifiers - * should be reprinted. */ - protected $modifierChangeMap; + protected array $listInsertionMap; + + /** + * @var array<string, array{int|string|null, string, string}> + */ + protected array $emptyListInsertionMap; + /** @var array<string, array{string, int}> Map from "{$class}->{$subNode}" to [$printFn, $token] + * where $printFn is the function to print the modifiers and $token is the token before which + * the modifiers should be reprinted. */ + protected array $modifierChangeMap; /** * Creates a pretty printer instance using the given options. * * Supported options: - * * bool $shortArraySyntax = false: Whether to use [] instead of array() as the default array - * syntax, if the node does not specify a format. + * * PhpVersion $phpVersion: The PHP version to target (default to PHP 7.4). This option + * controls compatibility of the generated code with older PHP + * versions in cases where a simple stylistic choice exists (e.g. + * array() vs []). It is safe to pretty-print an AST for a newer + * PHP version while specifying an older target (but the result will + * of course not be compatible with the older version in that case). + * * string $newline: The newline style to use. Should be "\n" (default) or "\r\n". + * * bool $shortArraySyntax: Whether to use [] instead of array() as the default array + * syntax, if the node does not specify a format. Defaults to whether + * the phpVersion support short array syntax. * - * @param array $options Dictionary of formatting options + * @param array{ + * phpVersion?: PhpVersion, newline?: string, shortArraySyntax?: bool + * } $options Dictionary of formatting options */ public function __construct(array $options = []) { - $this->docStringEndToken = '_DOC_STRING_END_' . mt_rand(); + $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); - $defaultOptions = ['shortArraySyntax' => false]; - $this->options = $options + $defaultOptions; + $this->newline = $options['newline'] ?? "\n"; + if ($this->newline !== "\n" && $this->newline != "\r\n") { + throw new \LogicException('Option "newline" must be one of "\n" or "\r\n"'); + } + + $this->shortArraySyntax = + $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); + $this->docStringEndToken = + $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); } /** * Reset pretty printing state. */ - protected function resetState() { + protected function resetState(): void { $this->indentLevel = 0; - $this->nl = "\n"; + $this->nl = $this->newline; $this->origTokens = null; } @@ -167,15 +205,15 @@ abstract class PrettyPrinterAbstract * * @param int $level Level in number of spaces */ - protected function setIndentLevel(int $level) { + protected function setIndentLevel(int $level): void { $this->indentLevel = $level; - $this->nl = "\n" . \str_repeat(' ', $level); + $this->nl = $this->newline . \str_repeat(' ', $level); } /** * Increase indentation level. */ - protected function indent() { + protected function indent(): void { $this->indentLevel += 4; $this->nl .= ' '; } @@ -183,10 +221,10 @@ abstract class PrettyPrinterAbstract /** * Decrease indentation level. */ - protected function outdent() { + protected function outdent(): void { assert($this->indentLevel >= 4); $this->indentLevel -= 4; - $this->nl = "\n" . str_repeat(' ', $this->indentLevel); + $this->nl = $this->newline . str_repeat(' ', $this->indentLevel); } /** @@ -196,7 +234,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed statements */ - public function prettyPrint(array $stmts) : string { + public function prettyPrint(array $stmts): string { $this->resetState(); $this->preprocessNodes($stmts); @@ -210,7 +248,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed node */ - public function prettyPrintExpr(Expr $node) : string { + public function prettyPrintExpr(Expr $node): string { $this->resetState(); return $this->handleMagicTokens($this->p($node)); } @@ -222,15 +260,15 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed statements */ - public function prettyPrintFile(array $stmts) : string { + public function prettyPrintFile(array $stmts): string { if (!$stmts) { - return "<?php\n\n"; + return "<?php" . $this->newline . $this->newline; } - $p = "<?php\n\n" . $this->prettyPrint($stmts); + $p = "<?php" . $this->newline . $this->newline . $this->prettyPrint($stmts); if ($stmts[0] instanceof Stmt\InlineHTML) { - $p = preg_replace('/^<\?php\s+\?>\n?/', '', $p); + $p = preg_replace('/^<\?php\s+\?>\r?\n?/', '', $p); } if ($stmts[count($stmts) - 1] instanceof Stmt\InlineHTML) { $p = preg_replace('/<\?php$/', '', rtrim($p)); @@ -244,7 +282,7 @@ abstract class PrettyPrinterAbstract * * @param Node[] $nodes Array of nodes */ - protected function preprocessNodes(array $nodes) { + protected function preprocessNodes(array $nodes): void { /* We can use semicolon-namespaces unless there is a global namespace declaration */ $this->canUseSemicolonNamespaces = true; foreach ($nodes as $node) { @@ -256,15 +294,17 @@ abstract class PrettyPrinterAbstract } /** - * Handles (and removes) no-indent and doc-string-end tokens. - * - * @param string $str - * @return string + * Handles (and removes) doc-string-end tokens. */ - protected function handleMagicTokens(string $str) : string { - // Replace doc-string-end tokens with nothing or a newline - $str = str_replace($this->docStringEndToken . ";\n", ";\n", $str); - $str = str_replace($this->docStringEndToken, "\n", $str); + protected function handleMagicTokens(string $str): string { + if ($this->docStringEndToken !== null) { + // Replace doc-string-end tokens with nothing or a newline + $str = str_replace( + $this->docStringEndToken . ';' . $this->newline, + ';' . $this->newline, + $str); + $str = str_replace($this->docStringEndToken, $this->newline, $str); + } return $str; } @@ -272,12 +312,12 @@ abstract class PrettyPrinterAbstract /** * Pretty prints an array of nodes (statements) and indents them optionally. * - * @param Node[] $nodes Array of nodes - * @param bool $indent Whether to indent the printed nodes + * @param Node[] $nodes Array of nodes + * @param bool $indent Whether to indent the printed nodes * * @return string Pretty printed statements */ - protected function pStmts(array $nodes, bool $indent = true) : string { + protected function pStmts(array $nodes, bool $indent = true): string { if ($indent) { $this->indent(); } @@ -305,84 +345,96 @@ abstract class PrettyPrinterAbstract /** * Pretty-print an infix operation while taking precedence into account. * - * @param string $class Node class of operator - * @param Node $leftNode Left-hand side node + * @param string $class Node class of operator + * @param Node $leftNode Left-hand side node * @param string $operatorString String representation of the operator - * @param Node $rightNode Right-hand side node + * @param Node $rightNode Right-hand side node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed infix operation */ - protected function pInfixOp(string $class, Node $leftNode, string $operatorString, Node $rightNode) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - - return $this->pPrec($leftNode, $precedence, $associativity, -1) - . $operatorString - . $this->pPrec($rightNode, $precedence, $associativity, 1); + protected function pInfixOp( + string $class, Node $leftNode, string $operatorString, Node $rightNode, + int $precedence, int $lhsPrecedence + ): string { + list($opPrecedence, $newPrecedenceLHS, $newPrecedenceRHS) = $this->precedenceMap[$class]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + return $prefix . $this->p($leftNode, $newPrecedenceLHS, $newPrecedenceLHS) + . $operatorString . $this->p($rightNode, $newPrecedenceRHS, $lhsPrecedence) . $suffix; } /** * Pretty-print a prefix operation while taking precedence into account. * - * @param string $class Node class of operator + * @param string $class Node class of operator * @param string $operatorString String representation of the operator - * @param Node $node Node + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed prefix operation */ - protected function pPrefixOp(string $class, string $operatorString, Node $node) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - return $operatorString . $this->pPrec($node, $precedence, $associativity, 1); + protected function pPrefixOp(string $class, string $operatorString, Node $node, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $lhsPrecedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; + } + $printedArg = $this->p($node, $opPrecedence, $lhsPrecedence); + if (($operatorString === '+' && $printedArg[0] === '+') || + ($operatorString === '-' && $printedArg[0] === '-') + ) { + // Avoid printing +(+$a) as ++$a and similar. + $printedArg = '(' . $printedArg . ')'; + } + return $prefix . $operatorString . $printedArg . $suffix; } /** * Pretty-print a postfix operation while taking precedence into account. * - * @param string $class Node class of operator + * @param string $class Node class of operator * @param string $operatorString String representation of the operator - * @param Node $node Node + * @param Node $node Node + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * * @return string Pretty printed postfix operation */ - protected function pPostfixOp(string $class, Node $node, string $operatorString) : string { - list($precedence, $associativity) = $this->precedenceMap[$class]; - return $this->pPrec($node, $precedence, $associativity, -1) . $operatorString; - } - - /** - * Prints an expression node with the least amount of parentheses necessary to preserve the meaning. - * - * @param Node $node Node to pretty print - * @param int $parentPrecedence Precedence of the parent operator - * @param int $parentAssociativity Associativity of parent operator - * (-1 is left, 0 is nonassoc, 1 is right) - * @param int $childPosition Position of the node relative to the operator - * (-1 is left, 1 is right) - * - * @return string The pretty printed node - */ - protected function pPrec(Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition) : string { - $class = \get_class($node); - if (isset($this->precedenceMap[$class])) { - $childPrecedence = $this->precedenceMap[$class][0]; - if ($childPrecedence > $parentPrecedence - || ($parentPrecedence === $childPrecedence && $parentAssociativity !== $childPosition) - ) { - return '(' . $this->p($node) . ')'; - } + protected function pPostfixOp(string $class, Node $node, string $operatorString, int $precedence, int $lhsPrecedence): string { + $opPrecedence = $this->precedenceMap[$class][0]; + $prefix = ''; + $suffix = ''; + if ($opPrecedence >= $precedence) { + $prefix = '('; + $suffix = ')'; + $lhsPrecedence = self::MAX_PRECEDENCE; } - - return $this->p($node); + if ($opPrecedence < $lhsPrecedence) { + $lhsPrecedence = $opPrecedence; + } + return $prefix . $this->p($node, $opPrecedence, $lhsPrecedence) . $operatorString . $suffix; } /** * Pretty prints an array of nodes and implodes the printed values. * * @param Node[] $nodes Array of Nodes to be printed - * @param string $glue Character to implode with + * @param string $glue Character to implode with * - * @return string Imploded pretty printed nodes + * @return string Imploded pretty printed nodes> $pre */ - protected function pImplode(array $nodes, string $glue = '') : string { + protected function pImplode(array $nodes, string $glue = ''): string { $pNodes = []; foreach ($nodes as $node) { if (null === $node) { @@ -402,7 +454,7 @@ abstract class PrettyPrinterAbstract * * @return string Comma separated pretty printed nodes */ - protected function pCommaSeparated(array $nodes) : string { + protected function pCommaSeparated(array $nodes): string { return $this->pImplode($nodes, ', '); } @@ -411,12 +463,12 @@ abstract class PrettyPrinterAbstract * * The result includes a leading newline and one level of indentation (same as pStmts). * - * @param Node[] $nodes Array of Nodes to be printed - * @param bool $trailingComma Whether to use a trailing comma + * @param Node[] $nodes Array of Nodes to be printed + * @param bool $trailingComma Whether to use a trailing comma * * @return string Comma separated pretty printed nodes in multiline style */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : string { + protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma): string { $this->indent(); $result = ''; @@ -448,7 +500,7 @@ abstract class PrettyPrinterAbstract * * @return string Reformatted text of comments */ - protected function pComments(array $comments) : string { + protected function pComments(array $comments): string { $formattedComments = []; foreach ($comments as $comment) { @@ -469,13 +521,11 @@ abstract class PrettyPrinterAbstract * * The CloningVisitor must be run on the AST prior to modification. * * The original tokens must be provided, using the getTokens() method on the lexer. * - * @param Node[] $stmts Modified AST with links to original AST - * @param Node[] $origStmts Original AST with token offset information - * @param array $origTokens Tokens of the original code - * - * @return string + * @param Node[] $stmts Modified AST with links to original AST + * @param Node[] $origStmts Original AST with token offset information + * @param Token[] $origTokens Tokens of the original code */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string { + public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens): string { $this->initializeNodeListDiffer(); $this->initializeLabelCharMap(); $this->initializeFixupMap(); @@ -493,18 +543,18 @@ abstract class PrettyPrinterAbstract $pos = 0; $result = $this->pArray($stmts, $origStmts, $pos, 0, 'File', 'stmts', null); if (null !== $result) { - $result .= $this->origTokens->getTokenCode($pos, count($origTokens), 0); + $result .= $this->origTokens->getTokenCode($pos, count($origTokens) - 1, 0); } else { // Fallback // TODO Add <?php properly - $result = "<?php\n" . $this->pStmts($stmts, false); + $result = "<?php" . $this->newline . $this->pStmts($stmts, false); } - return ltrim($this->handleMagicTokens($result)); + return $this->handleMagicTokens($result); } - protected function pFallback(Node $node) { - return $this->{'p' . $node->getType()}($node); + protected function pFallback(Node $node, int $precedence, int $lhsPrecedence): string { + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); } /** @@ -513,20 +563,25 @@ abstract class PrettyPrinterAbstract * This method also handles formatting preservation for nodes. * * @param Node $node Node to be pretty printed + * @param int $precedence Precedence of parent operator + * @param int $lhsPrecedence Precedence for unary operator on LHS of binary operator * @param bool $parentFormatPreserved Whether parent node has preserved formatting * * @return string Pretty printed node */ - protected function p(Node $node, $parentFormatPreserved = false) : string { + protected function p( + Node $node, int $precedence = self::MAX_PRECEDENCE, int $lhsPrecedence = self::MAX_PRECEDENCE, + bool $parentFormatPreserved = false + ): string { // No orig tokens means this is a normal pretty print without preservation of formatting if (!$this->origTokens) { - return $this->{'p' . $node->getType()}($node); + return $this->{'p' . $node->getType()}($node, $precedence, $lhsPrecedence); } - /** @var Node $origNode */ + /** @var Node|null $origNode */ $origNode = $node->getAttribute('origNode'); if (null === $origNode) { - return $this->pFallback($node); + return $this->pFallback($node, $precedence, $lhsPrecedence); } $class = \get_class($node); @@ -539,15 +594,17 @@ abstract class PrettyPrinterAbstract $fallbackNode = $node; if ($node instanceof Expr\New_ && $node->class instanceof Stmt\Class_) { // Normalize node structure of anonymous classes + assert($origNode instanceof Expr\New_); $node = PrintableNewAnonClassNode::fromNewNode($node); $origNode = PrintableNewAnonClassNode::fromNewNode($origNode); + $class = PrintableNewAnonClassNode::class; } // InlineHTML node does not contain closing and opening PHP tags. If the parent formatting // is not preserved, then we need to use the fallback code to make sure the tags are // printed. if ($node instanceof Stmt\InlineHTML && !$parentFormatPreserved) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } $indentAdjustment = $this->indentLevel - $this->origTokens->getIndentationBefore($startPos); @@ -572,34 +629,27 @@ abstract class PrettyPrinterAbstract if (is_array($subNode) && is_array($origSubNode)) { // Array subnode changed, we might be able to reconstruct it $listResult = $this->pArray( - $subNode, $origSubNode, $pos, $indentAdjustment, $type, $subNodeName, + $subNode, $origSubNode, $pos, $indentAdjustment, $class, $subNodeName, $fixupInfo[$subNodeName] ?? null ); if (null === $listResult) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } $result .= $listResult; continue; } - if (is_int($subNode) && is_int($origSubNode)) { - // Check if this is a modifier change - $key = $type . '->' . $subNodeName; - if (!isset($this->modifierChangeMap[$key])) { - return $this->pFallback($fallbackNode); - } - - $findToken = $this->modifierChangeMap[$key]; - $result .= $this->pModifiers($subNode); - $pos = $this->origTokens->findRight($pos, $findToken); - continue; + // Check if this is a modifier change + $key = $class . '->' . $subNodeName; + if (!isset($this->modifierChangeMap[$key])) { + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } - // If a non-node, non-array subnode changed, we don't be able to do a partial - // reconstructions, as we don't have enough offset information. Pretty print the - // whole node instead. - return $this->pFallback($fallbackNode); + [$printFn, $findToken] = $this->modifierChangeMap[$key]; + $result .= $this->$printFn($subNode); + $pos = $this->origTokens->findRight($pos, $findToken); + continue; } $extraLeft = ''; @@ -617,7 +667,7 @@ abstract class PrettyPrinterAbstract // A node has been inserted, check if we have insertion information for it $key = $type . '->' . $subNodeName; if (!isset($this->insertionMap[$key])) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; @@ -639,7 +689,7 @@ abstract class PrettyPrinterAbstract // A node has been removed, check if we have removal information for it $key = $type . '->' . $subNodeName; if (!isset($this->removalMap[$key])) { - return $this->pFallback($fallbackNode); + return $this->pFallback($fallbackNode, $precedence, $lhsPrecedence); } // Adjust positions to account for additional tokens that must be skipped @@ -669,7 +719,7 @@ abstract class PrettyPrinterAbstract $fixup = $fixupInfo[$subNodeName]; $res = $this->pFixup($fixup, $subNode, $class, $subStartPos, $subEndPos); } else { - $res = $this->p($subNode, true); + $res = $this->p($subNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); } $this->safeAppend($result, $res); @@ -688,23 +738,23 @@ abstract class PrettyPrinterAbstract /** * Perform a format-preserving pretty print of an array. * - * @param array $nodes New nodes - * @param array $origNodes Original nodes - * @param int $pos Current token position (updated by reference) - * @param int $indentAdjustment Adjustment for indentation - * @param string $parentNodeType Type of the containing node. - * @param string $subNodeName Name of array subnode. - * @param null|int $fixup Fixup information for array item nodes + * @param Node[] $nodes New nodes + * @param Node[] $origNodes Original nodes + * @param int $pos Current token position (updated by reference) + * @param int $indentAdjustment Adjustment for indentation + * @param string $parentNodeClass Class of the containing node. + * @param string $subNodeName Name of array subnode. + * @param null|int $fixup Fixup information for array item nodes * * @return null|string Result of pretty print or null if cannot preserve formatting */ protected function pArray( - array $nodes, array $origNodes, int &$pos, int $indentAdjustment, - string $parentNodeType, string $subNodeName, $fixup - ) { + array $nodes, array $origNodes, int &$pos, int $indentAdjustment, + string $parentNodeClass, string $subNodeName, ?int $fixup + ): ?string { $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); - $mapKey = $parentNodeType . '->' . $subNodeName; + $mapKey = $parentNodeClass . '->' . $subNodeName; $insertStr = $this->listInsertionMap[$mapKey] ?? null; $isStmtList = $subNodeName === 'stmts'; @@ -735,9 +785,9 @@ abstract class PrettyPrinterAbstract $result = ''; foreach ($diff as $i => $diffElem) { $diffType = $diffElem->type; - /** @var Node|null $arrItem */ + /** @var Node|string|null $arrItem */ $arrItem = $diffElem->new; - /** @var Node|null $origArrItem */ + /** @var Node|string|null $origArrItem */ $origArrItem = $diffElem->old; if ($diffType === DiffElem::TYPE_KEEP || $diffType === DiffElem::TYPE_REPLACE) { @@ -776,9 +826,8 @@ abstract class PrettyPrinterAbstract } if ($skipRemovedNode) { - if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || - $this->origTokens->haveTagInRange($pos, $itemStartPos))) { - // We'd remove the brace of a code block. + if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { + // We'd remove an opening/closing PHP tag. // TODO: Preserve formatting. $this->setIndentLevel($origIndentLevel); return null; @@ -798,7 +847,7 @@ abstract class PrettyPrinterAbstract } } - $this->safeAppend($result, $this->p($delayedAddNode, true)); + $this->safeAppend($result, $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true)); if ($insertNewline) { $result .= $insertStr . $this->nl; @@ -827,10 +876,17 @@ abstract class PrettyPrinterAbstract return null; } + if (!$arrItem instanceof Node) { + // We only support list insertion of nodes. + return null; + } + // We go multiline if the original code was multiline, // or if it's an array item with a comment above it. + // Match always uses multiline formatting. if ($insertStr === ', ' && - ($this->isMultiline($origNodes) || $arrItem->getComments()) + ($this->isMultiline($origNodes) || $arrItem->getComments() || + $parentNodeClass === Expr\Match_::class) ) { $insertStr = ','; $insertNewline = true; @@ -880,9 +936,8 @@ abstract class PrettyPrinterAbstract $pos, $itemStartPos, $indentAdjustment); $skipRemovedNode = true; } else { - if ($isStmtList && ($this->origTokens->haveBracesInRange($pos, $itemStartPos) || - $this->origTokens->haveTagInRange($pos, $itemStartPos))) { - // We'd remove the brace of a code block. + if ($isStmtList && $this->origTokens->haveTagInRange($pos, $itemStartPos)) { + // We'd remove an opening/closing PHP tag. // TODO: Preserve formatting. return null; } @@ -897,7 +952,7 @@ abstract class PrettyPrinterAbstract if (null !== $fixup && $arrItem->getAttribute('origNode') !== $origArrItem) { $res = $this->pFixup($fixup, $arrItem, null, $itemStartPos, $itemEndPos); } else { - $res = $this->p($arrItem, true); + $res = $this->p($arrItem, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); } $this->safeAppend($result, $res); @@ -931,7 +986,7 @@ abstract class PrettyPrinterAbstract $result .= $this->nl; } } - $result .= $this->p($delayedAddNode, true); + $result .= $this->p($delayedAddNode, self::MAX_PRECEDENCE, self::MAX_PRECEDENCE, true); $first = false; } $result .= $extraRight === "\n" ? $this->nl : $extraRight; @@ -947,22 +1002,33 @@ abstract class PrettyPrinterAbstract * are required to preserve program semantics in a certain context (e.g. to maintain precedence * or because only certain expressions are allowed in certain places). * - * @param int $fixup Fixup type - * @param Node $subNode Subnode to print + * @param int $fixup Fixup type + * @param Node $subNode Subnode to print * @param string|null $parentClass Class of parent node - * @param int $subStartPos Original start pos of subnode - * @param int $subEndPos Original end pos of subnode + * @param int $subStartPos Original start pos of subnode + * @param int $subEndPos Original end pos of subnode * * @return string Result of fixed-up print of subnode */ - protected function pFixup(int $fixup, Node $subNode, $parentClass, int $subStartPos, int $subEndPos) : string { + protected function pFixup(int $fixup, Node $subNode, ?string $parentClass, int $subStartPos, int $subEndPos): string { switch ($fixup) { case self::FIXUP_PREC_LEFT: + // We use a conservative approximation where lhsPrecedence == precedence. + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][1]; + return $this->p($subNode, $precedence, $precedence); + } + break; case self::FIXUP_PREC_RIGHT: if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { - list($precedence, $associativity) = $this->precedenceMap[$parentClass]; - return $this->pPrec($subNode, $precedence, $associativity, - $fixup === self::FIXUP_PREC_LEFT ? -1 : 1); + $precedence = $this->precedenceMap[$parentClass][2]; + return $this->p($subNode, $precedence, $precedence); + } + break; + case self::FIXUP_PREC_UNARY: + if (!$this->origTokens->haveParens($subStartPos, $subEndPos)) { + $precedence = $this->precedenceMap[$parentClass][0]; + return $this->p($subNode, $precedence, $precedence); } break; case self::FIXUP_CALL_LHS: @@ -1002,7 +1068,7 @@ abstract class PrettyPrinterAbstract } break; case self::FIXUP_ENCAPSED: - if (!$subNode instanceof Scalar\EncapsedStringPart + if (!$subNode instanceof Node\InterpolatedStringPart && !$this->origTokens->haveBraces($subStartPos, $subEndPos) ) { return '{' . $this->p($subNode) . '}'; @@ -1021,11 +1087,8 @@ abstract class PrettyPrinterAbstract * * Example: "echo" and "$x" result in "echo$x", but "echo" and "x" result in "echo x". * Without safeAppend the result would be "echox", which does not preserve semantics. - * - * @param string $str - * @param string $append */ - protected function safeAppend(string &$str, string $append) { + protected function safeAppend(string &$str, string $append): void { if ($str === "") { $str = $append; return; @@ -1050,7 +1113,7 @@ abstract class PrettyPrinterAbstract * * @return bool Whether parentheses are required */ - protected function callLhsRequiresParens(Node $node) : bool { + protected function callLhsRequiresParens(Node $node): bool { return !($node instanceof Node\Name || $node instanceof Expr\Variable || $node instanceof Expr\ArrayDimFetch @@ -1068,7 +1131,7 @@ abstract class PrettyPrinterAbstract * * @return bool Whether parentheses are required */ - protected function dereferenceLhsRequiresParens(Node $node) : bool { + protected function dereferenceLhsRequiresParens(Node $node): bool { // A constant can occur on the LHS of an array/object deref, but not a static deref. return $this->staticDereferenceLhsRequiresParens($node) && !$node instanceof Expr\ConstFetch; @@ -1126,14 +1189,18 @@ abstract class PrettyPrinterAbstract * * @return string Printed modifiers */ - protected function pModifiers(int $modifiers) { - return ($modifiers & Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_STATIC ? 'static ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_FINAL ? 'final ' : '') - . ($modifiers & Stmt\Class_::MODIFIER_READONLY ? 'readonly ' : ''); + protected function pModifiers(int $modifiers): string { + return ($modifiers & Modifiers::FINAL ? 'final ' : '') + . ($modifiers & Modifiers::ABSTRACT ? 'abstract ' : '') + . ($modifiers & Modifiers::PUBLIC ? 'public ' : '') + . ($modifiers & Modifiers::PROTECTED ? 'protected ' : '') + . ($modifiers & Modifiers::PRIVATE ? 'private ' : '') + . ($modifiers & Modifiers::STATIC ? 'static ' : '') + . ($modifiers & Modifiers::READONLY ? 'readonly ' : ''); + } + + protected function pStatic(bool $static): string { + return $static ? 'static ' : ''; } /** @@ -1143,7 +1210,7 @@ abstract class PrettyPrinterAbstract * * @return bool Whether multiline formatting is used */ - protected function isMultiline(array $nodes) : bool { + protected function isMultiline(array $nodes): bool { if (\count($nodes) < 2) { return false; } @@ -1175,15 +1242,19 @@ abstract class PrettyPrinterAbstract * * The label char map determines whether a certain character may occur in a label. */ - protected function initializeLabelCharMap() { - if ($this->labelCharMap) return; + protected function initializeLabelCharMap(): void { + if (isset($this->labelCharMap)) { + return; + } $this->labelCharMap = []; for ($i = 0; $i < 256; $i++) { - // Since PHP 7.1 The lower range is 0x80. However, we also want to support code for - // older versions. $chr = chr($i); - $this->labelCharMap[$chr] = $i >= 0x7f || ctype_alnum($chr); + $this->labelCharMap[$chr] = $i >= 0x80 || ctype_alnum($chr); + } + + if ($this->phpVersion->allowsDelInIdentifiers()) { + $this->labelCharMap["\x7f"] = true; } } @@ -1192,8 +1263,10 @@ abstract class PrettyPrinterAbstract * * The node list differ is used to determine differences between two array subnodes. */ - protected function initializeNodeListDiffer() { - if ($this->nodeListDiffer) return; + protected function initializeNodeListDiffer(): void { + if (isset($this->nodeListDiffer)) { + return; + } $this->nodeListDiffer = new Internal\Differ(function ($a, $b) { if ($a instanceof Node && $b instanceof Node) { @@ -1210,22 +1283,21 @@ abstract class PrettyPrinterAbstract * The fixup map is used to determine whether a certain subnode of a certain node may require * some kind of "fixup" operation, e.g. the addition of parenthesis or braces. */ - protected function initializeFixupMap() { - if ($this->fixupMap) return; + protected function initializeFixupMap(): void { + if (isset($this->fixupMap)) { + return; + } $this->fixupMap = [ - Expr\PreInc::class => ['var' => self::FIXUP_PREC_RIGHT], - Expr\PreDec::class => ['var' => self::FIXUP_PREC_RIGHT], - Expr\PostInc::class => ['var' => self::FIXUP_PREC_LEFT], - Expr\PostDec::class => ['var' => self::FIXUP_PREC_LEFT], Expr\Instanceof_::class => [ - 'expr' => self::FIXUP_PREC_LEFT, + 'expr' => self::FIXUP_PREC_UNARY, 'class' => self::FIXUP_NEW, ], Expr\Ternary::class => [ 'cond' => self::FIXUP_PREC_LEFT, 'else' => self::FIXUP_PREC_RIGHT, ], + Expr\Yield_::class => ['value' => self::FIXUP_PREC_UNARY], Expr\FuncCall::class => ['name' => self::FIXUP_CALL_LHS], Expr\StaticCall::class => ['class' => self::FIXUP_STATIC_DEREF_LHS], @@ -1255,7 +1327,7 @@ abstract class PrettyPrinterAbstract 'var' => self::FIXUP_DEREF_LHS, 'name' => self::FIXUP_BRACED_NAME, ], - Scalar\Encapsed::class => [ + Scalar\InterpolatedString::class => [ 'parts' => self::FIXUP_ENCAPSED, ], ]; @@ -1278,27 +1350,19 @@ abstract class PrettyPrinterAbstract ]; } - $assignOps = [ - Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, - AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, - AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, - AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class - ]; - foreach ($assignOps as $assignOp) { - $this->fixupMap[$assignOp] = [ - 'var' => self::FIXUP_PREC_LEFT, - 'expr' => self::FIXUP_PREC_RIGHT, - ]; - } - $prefixOps = [ - Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, + Expr\Clone_::class, Expr\BitwiseNot::class, Expr\BooleanNot::class, Expr\UnaryPlus::class, Expr\UnaryMinus::class, Cast\Int_::class, Cast\Double::class, Cast\String_::class, Cast\Array_::class, Cast\Object_::class, Cast\Bool_::class, Cast\Unset_::class, Expr\ErrorSuppress::class, Expr\YieldFrom::class, Expr\Print_::class, Expr\Include_::class, + Expr\Assign::class, Expr\AssignRef::class, AssignOp\Plus::class, AssignOp\Minus::class, + AssignOp\Mul::class, AssignOp\Div::class, AssignOp\Concat::class, AssignOp\Mod::class, + AssignOp\BitwiseAnd::class, AssignOp\BitwiseOr::class, AssignOp\BitwiseXor::class, + AssignOp\ShiftLeft::class, AssignOp\ShiftRight::class, AssignOp\Pow::class, AssignOp\Coalesce::class, + Expr\ArrowFunction::class, Expr\Throw_::class, ]; foreach ($prefixOps as $prefixOp) { - $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_RIGHT]; + $this->fixupMap[$prefixOp] = ['expr' => self::FIXUP_PREC_UNARY]; } } @@ -1308,8 +1372,10 @@ abstract class PrettyPrinterAbstract * The removal map is used to determine which additional tokens should be removed when a * certain node is replaced by null. */ - protected function initializeRemovalMap() { - if ($this->removalMap) return; + protected function initializeRemovalMap(): void { + if (isset($this->removalMap)) { + return; + } $stripBoth = ['left' => \T_WHITESPACE, 'right' => \T_WHITESPACE]; $stripLeft = ['left' => \T_WHITESPACE]; @@ -1319,7 +1385,7 @@ abstract class PrettyPrinterAbstract $stripEquals = ['left' => '=']; $this->removalMap = [ 'Expr_ArrayDimFetch->dim' => $stripBoth, - 'Expr_ArrayItem->key' => $stripDoubleArrow, + 'ArrayItem->key' => $stripDoubleArrow, 'Expr_ArrowFunction->returnType' => $stripColon, 'Expr_Closure->returnType' => $stripColon, 'Expr_Exit->expr' => $stripBoth, @@ -1342,7 +1408,7 @@ abstract class PrettyPrinterAbstract 'Stmt_If->else' => $stripLeft, 'Stmt_Namespace->name' => $stripLeft, 'Stmt_Property->type' => $stripRight, - 'Stmt_PropertyProperty->default' => $stripEquals, + 'PropertyItem->default' => $stripEquals, 'Stmt_Return->expr' => $stripBoth, 'Stmt_StaticVar->default' => $stripEquals, 'Stmt_TraitUseAdaptation_Alias->newName' => $stripLeft, @@ -1354,16 +1420,18 @@ abstract class PrettyPrinterAbstract ]; } - protected function initializeInsertionMap() { - if ($this->insertionMap) return; + protected function initializeInsertionMap(): void { + if (isset($this->insertionMap)) { + return; + } // TODO: "yield" where both key and value are inserted doesn't work // [$find, $beforeToken, $extraLeft, $extraRight] $this->insertionMap = [ 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], - 'Expr_ArrayItem->key' => [null, false, null, ' => '], - 'Expr_ArrowFunction->returnType' => [')', false, ' : ', null], - 'Expr_Closure->returnType' => [')', false, ' : ', null], + 'ArrayItem->key' => [null, false, null, ' => '], + 'Expr_ArrowFunction->returnType' => [')', false, ': ', null], + 'Expr_Closure->returnType' => [')', false, ': ', null], 'Expr_Ternary->if' => ['?', false, ' ', ' '], 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], @@ -1371,19 +1439,19 @@ abstract class PrettyPrinterAbstract 'Param->default' => [null, false, ' = ', null], 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], 'Stmt_Catch->var' => [null, false, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', false, ' : ', null], + 'Stmt_ClassMethod->returnType' => [')', false, ': ', null], 'Stmt_ClassConst->type' => [\T_CONST, false, ' ', null], 'Stmt_Class->extends' => [null, false, ' extends ', null], 'Stmt_Enum->scalarType' => [null, false, ' : ', null], 'Stmt_EnumCase->expr' => [null, false, ' = ', null], - 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null], + 'Expr_PrintableNewAnonClass->extends' => [null, false, ' extends ', null], 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], - 'Stmt_Function->returnType' => [')', false, ' : ', null], + 'Stmt_Function->returnType' => [')', false, ': ', null], 'Stmt_If->else' => [null, false, ' ', null], 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], - 'Stmt_PropertyProperty->default' => [null, false, ' = ', null], + 'PropertyItem->default' => [null, false, ' = ', null], 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], 'Stmt_StaticVar->default' => [null, false, ' = ', null], //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO @@ -1397,132 +1465,139 @@ abstract class PrettyPrinterAbstract ]; } - protected function initializeListInsertionMap() { - if ($this->listInsertionMap) return; + protected function initializeListInsertionMap(): void { + if (isset($this->listInsertionMap)) { + return; + } $this->listInsertionMap = [ // special //'Expr_ShellExec->parts' => '', // TODO These need to be treated more carefully - //'Scalar_Encapsed->parts' => '', - 'Stmt_Catch->types' => '|', - 'UnionType->types' => '|', - 'IntersectionType->types' => '&', - 'Stmt_If->elseifs' => ' ', - 'Stmt_TryCatch->catches' => ' ', + //'Scalar_InterpolatedString->parts' => '', + Stmt\Catch_::class . '->types' => '|', + UnionType::class . '->types' => '|', + IntersectionType::class . '->types' => '&', + Stmt\If_::class . '->elseifs' => ' ', + Stmt\TryCatch::class . '->catches' => ' ', // comma-separated lists - 'Expr_Array->items' => ', ', - 'Expr_ArrowFunction->params' => ', ', - 'Expr_Closure->params' => ', ', - 'Expr_Closure->uses' => ', ', - 'Expr_FuncCall->args' => ', ', - 'Expr_Isset->vars' => ', ', - 'Expr_List->items' => ', ', - 'Expr_MethodCall->args' => ', ', - 'Expr_NullsafeMethodCall->args' => ', ', - 'Expr_New->args' => ', ', - 'Expr_PrintableNewAnonClass->args' => ', ', - 'Expr_StaticCall->args' => ', ', - 'Stmt_ClassConst->consts' => ', ', - 'Stmt_ClassMethod->params' => ', ', - 'Stmt_Class->implements' => ', ', - 'Stmt_Enum->implements' => ', ', - 'Expr_PrintableNewAnonClass->implements' => ', ', - 'Stmt_Const->consts' => ', ', - 'Stmt_Declare->declares' => ', ', - 'Stmt_Echo->exprs' => ', ', - 'Stmt_For->init' => ', ', - 'Stmt_For->cond' => ', ', - 'Stmt_For->loop' => ', ', - 'Stmt_Function->params' => ', ', - 'Stmt_Global->vars' => ', ', - 'Stmt_GroupUse->uses' => ', ', - 'Stmt_Interface->extends' => ', ', - 'Stmt_Match->arms' => ', ', - 'Stmt_Property->props' => ', ', - 'Stmt_StaticVar->vars' => ', ', - 'Stmt_TraitUse->traits' => ', ', - 'Stmt_TraitUseAdaptation_Precedence->insteadof' => ', ', - 'Stmt_Unset->vars' => ', ', - 'Stmt_Use->uses' => ', ', - 'MatchArm->conds' => ', ', - 'AttributeGroup->attrs' => ', ', + Expr\Array_::class . '->items' => ', ', + Expr\ArrowFunction::class . '->params' => ', ', + Expr\Closure::class . '->params' => ', ', + Expr\Closure::class . '->uses' => ', ', + Expr\FuncCall::class . '->args' => ', ', + Expr\Isset_::class . '->vars' => ', ', + Expr\List_::class . '->items' => ', ', + Expr\MethodCall::class . '->args' => ', ', + Expr\NullsafeMethodCall::class . '->args' => ', ', + Expr\New_::class . '->args' => ', ', + PrintableNewAnonClassNode::class . '->args' => ', ', + Expr\StaticCall::class . '->args' => ', ', + Stmt\ClassConst::class . '->consts' => ', ', + Stmt\ClassMethod::class . '->params' => ', ', + Stmt\Class_::class . '->implements' => ', ', + Stmt\Enum_::class . '->implements' => ', ', + PrintableNewAnonClassNode::class . '->implements' => ', ', + Stmt\Const_::class . '->consts' => ', ', + Stmt\Declare_::class . '->declares' => ', ', + Stmt\Echo_::class . '->exprs' => ', ', + Stmt\For_::class . '->init' => ', ', + Stmt\For_::class . '->cond' => ', ', + Stmt\For_::class . '->loop' => ', ', + Stmt\Function_::class . '->params' => ', ', + Stmt\Global_::class . '->vars' => ', ', + Stmt\GroupUse::class . '->uses' => ', ', + Stmt\Interface_::class . '->extends' => ', ', + Expr\Match_::class . '->arms' => ', ', + Stmt\Property::class . '->props' => ', ', + Stmt\StaticVar::class . '->vars' => ', ', + Stmt\TraitUse::class . '->traits' => ', ', + Stmt\TraitUseAdaptation\Precedence::class . '->insteadof' => ', ', + Stmt\Unset_::class . '->vars' => ', ', + Stmt\UseUse::class . '->uses' => ', ', + MatchArm::class . '->conds' => ', ', + AttributeGroup::class . '->attrs' => ', ', // statement lists - 'Expr_Closure->stmts' => "\n", - 'Stmt_Case->stmts' => "\n", - 'Stmt_Catch->stmts' => "\n", - 'Stmt_Class->stmts' => "\n", - 'Stmt_Enum->stmts' => "\n", - 'Expr_PrintableNewAnonClass->stmts' => "\n", - 'Stmt_Interface->stmts' => "\n", - 'Stmt_Trait->stmts' => "\n", - 'Stmt_ClassMethod->stmts' => "\n", - 'Stmt_Declare->stmts' => "\n", - 'Stmt_Do->stmts' => "\n", - 'Stmt_ElseIf->stmts' => "\n", - 'Stmt_Else->stmts' => "\n", - 'Stmt_Finally->stmts' => "\n", - 'Stmt_Foreach->stmts' => "\n", - 'Stmt_For->stmts' => "\n", - 'Stmt_Function->stmts' => "\n", - 'Stmt_If->stmts' => "\n", - 'Stmt_Namespace->stmts' => "\n", - 'Stmt_Class->attrGroups' => "\n", - 'Stmt_Enum->attrGroups' => "\n", - 'Stmt_EnumCase->attrGroups' => "\n", - 'Stmt_Interface->attrGroups' => "\n", - 'Stmt_Trait->attrGroups' => "\n", - 'Stmt_Function->attrGroups' => "\n", - 'Stmt_ClassMethod->attrGroups' => "\n", - 'Stmt_ClassConst->attrGroups' => "\n", - 'Stmt_Property->attrGroups' => "\n", - 'Expr_PrintableNewAnonClass->attrGroups' => ' ', - 'Expr_Closure->attrGroups' => ' ', - 'Expr_ArrowFunction->attrGroups' => ' ', - 'Param->attrGroups' => ' ', - 'Stmt_Switch->cases' => "\n", - 'Stmt_TraitUse->adaptations' => "\n", - 'Stmt_TryCatch->stmts' => "\n", - 'Stmt_While->stmts' => "\n", + Expr\Closure::class . '->stmts' => "\n", + Stmt\Case_::class . '->stmts' => "\n", + Stmt\Catch_::class . '->stmts' => "\n", + Stmt\Class_::class . '->stmts' => "\n", + Stmt\Enum_::class . '->stmts' => "\n", + PrintableNewAnonClassNode::class . '->stmts' => "\n", + Stmt\Interface_::class . '->stmts' => "\n", + Stmt\Trait_::class . '->stmts' => "\n", + Stmt\ClassMethod::class . '->stmts' => "\n", + Stmt\Declare_::class . '->stmts' => "\n", + Stmt\Do_::class . '->stmts' => "\n", + Stmt\ElseIf_::class . '->stmts' => "\n", + Stmt\Else_::class . '->stmts' => "\n", + Stmt\Finally_::class . '->stmts' => "\n", + Stmt\Foreach_::class . '->stmts' => "\n", + Stmt\For_::class . '->stmts' => "\n", + Stmt\Function_::class . '->stmts' => "\n", + Stmt\If_::class . '->stmts' => "\n", + Stmt\Namespace_::class . '->stmts' => "\n", + Stmt\Block::class . '->stmts' => "\n", + + // Attribute groups + Stmt\Class_::class . '->attrGroups' => "\n", + Stmt\Enum_::class . '->attrGroups' => "\n", + Stmt\EnumCase::class . '->attrGroups' => "\n", + Stmt\Interface_::class . '->attrGroups' => "\n", + Stmt\Trait_::class . '->attrGroups' => "\n", + Stmt\Function_::class . '->attrGroups' => "\n", + Stmt\ClassMethod::class . '->attrGroups' => "\n", + Stmt\ClassConst::class . '->attrGroups' => "\n", + Stmt\Property::class . '->attrGroups' => "\n", + PrintableNewAnonClassNode::class . '->attrGroups' => ' ', + Expr\Closure::class . '->attrGroups' => ' ', + Expr\ArrowFunction::class . '->attrGroups' => ' ', + Param::class . '->attrGroups' => ' ', + Stmt\Switch_::class . '->cases' => "\n", + Stmt\TraitUse::class . '->adaptations' => "\n", + Stmt\TryCatch::class . '->stmts' => "\n", + Stmt\While_::class . '->stmts' => "\n", // dummy for top-level context 'File->stmts' => "\n", ]; } - protected function initializeEmptyListInsertionMap() { - if ($this->emptyListInsertionMap) return; + protected function initializeEmptyListInsertionMap(): void { + if (isset($this->emptyListInsertionMap)) { + return; + } // TODO Insertion into empty statement lists. // [$find, $extraLeft, $extraRight] $this->emptyListInsertionMap = [ - 'Expr_ArrowFunction->params' => ['(', '', ''], - 'Expr_Closure->uses' => [')', ' use(', ')'], - 'Expr_Closure->params' => ['(', '', ''], - 'Expr_FuncCall->args' => ['(', '', ''], - 'Expr_MethodCall->args' => ['(', '', ''], - 'Expr_NullsafeMethodCall->args' => ['(', '', ''], - 'Expr_New->args' => ['(', '', ''], - 'Expr_PrintableNewAnonClass->args' => ['(', '', ''], - 'Expr_PrintableNewAnonClass->implements' => [null, ' implements ', ''], - 'Expr_StaticCall->args' => ['(', '', ''], - 'Stmt_Class->implements' => [null, ' implements ', ''], - 'Stmt_Enum->implements' => [null, ' implements ', ''], - 'Stmt_ClassMethod->params' => ['(', '', ''], - 'Stmt_Interface->extends' => [null, ' extends ', ''], - 'Stmt_Function->params' => ['(', '', ''], - 'Stmt_Interface->attrGroups' => [null, '', "\n"], - 'Stmt_Class->attrGroups' => [null, '', "\n"], - 'Stmt_ClassConst->attrGroups' => [null, '', "\n"], - 'Stmt_ClassMethod->attrGroups' => [null, '', "\n"], - 'Stmt_Function->attrGroups' => [null, '', "\n"], - 'Stmt_Property->attrGroups' => [null, '', "\n"], - 'Stmt_Trait->attrGroups' => [null, '', "\n"], - 'Expr_ArrowFunction->attrGroups' => [null, '', ' '], - 'Expr_Closure->attrGroups' => [null, '', ' '], - 'Expr_PrintableNewAnonClass->attrGroups' => [\T_NEW, ' ', ''], + Expr\ArrowFunction::class . '->params' => ['(', '', ''], + Expr\Closure::class . '->uses' => [')', ' use (', ')'], + Expr\Closure::class . '->params' => ['(', '', ''], + Expr\FuncCall::class . '->args' => ['(', '', ''], + Expr\MethodCall::class . '->args' => ['(', '', ''], + Expr\NullsafeMethodCall::class . '->args' => ['(', '', ''], + Expr\New_::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->args' => ['(', '', ''], + PrintableNewAnonClassNode::class . '->implements' => [null, ' implements ', ''], + Expr\StaticCall::class . '->args' => ['(', '', ''], + Stmt\Class_::class . '->implements' => [null, ' implements ', ''], + Stmt\Enum_::class . '->implements' => [null, ' implements ', ''], + Stmt\ClassMethod::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->extends' => [null, ' extends ', ''], + Stmt\Function_::class . '->params' => ['(', '', ''], + Stmt\Interface_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Class_::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassConst::class . '->attrGroups' => [null, '', "\n"], + Stmt\ClassMethod::class . '->attrGroups' => [null, '', "\n"], + Stmt\Function_::class . '->attrGroups' => [null, '', "\n"], + Stmt\Property::class . '->attrGroups' => [null, '', "\n"], + Stmt\Trait_::class . '->attrGroups' => [null, '', "\n"], + Expr\ArrowFunction::class . '->attrGroups' => [null, '', ' '], + Expr\Closure::class . '->attrGroups' => [null, '', ' '], + PrintableNewAnonClassNode::class . '->attrGroups' => [\T_NEW, ' ', ''], /* These cannot be empty to start with: * Expr_Isset->vars @@ -1554,23 +1629,27 @@ abstract class PrettyPrinterAbstract ]; } - protected function initializeModifierChangeMap() { - if ($this->modifierChangeMap) return; + protected function initializeModifierChangeMap(): void { + if (isset($this->modifierChangeMap)) { + return; + } $this->modifierChangeMap = [ - 'Stmt_ClassConst->flags' => \T_CONST, - 'Stmt_ClassMethod->flags' => \T_FUNCTION, - 'Stmt_Class->flags' => \T_CLASS, - 'Stmt_Property->flags' => \T_VARIABLE, - 'Expr_PrintableNewAnonClass->flags' => \T_CLASS, - 'Param->flags' => \T_VARIABLE, - //'Stmt_TraitUseAdaptation_Alias->newModifier' => 0, // TODO + Stmt\ClassConst::class . '->flags' => ['pModifiers', \T_CONST], + Stmt\ClassMethod::class . '->flags' => ['pModifiers', \T_FUNCTION], + Stmt\Class_::class . '->flags' => ['pModifiers', \T_CLASS], + Stmt\Property::class . '->flags' => ['pModifiers', \T_VARIABLE], + PrintableNewAnonClassNode::class . '->flags' => ['pModifiers', \T_CLASS], + Param::class . '->flags' => ['pModifiers', \T_VARIABLE], + Expr\Closure::class . '->static' => ['pStatic', \T_FUNCTION], + Expr\ArrowFunction::class . '->static' => ['pStatic', \T_FN], + //Stmt\TraitUseAdaptation\Alias::class . '->newModifier' => 0, // TODO ]; // List of integer subnodes that are not modifiers: // Expr_Include->type // Stmt_GroupUse->type // Stmt_Use->type - // Stmt_UseUse->type + // UseItem->type } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Token.php b/vendor/nikic/php-parser/lib/PhpParser/Token.php new file mode 100644 index 00000000..6683310f --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/Token.php @@ -0,0 +1,18 @@ +<?php declare(strict_types=1); + +namespace PhpParser; + +/** + * A PHP token. On PHP 8.0 this extends from PhpToken. + */ +class Token extends Internal\TokenPolyfill { + /** Get (exclusive) zero-based end position of the token. */ + public function getEndPos(): int { + return $this->pos + \strlen($this->text); + } + + /** Get 1-based end line number of the token. */ + public function getEndLine(): int { + return $this->line + \substr_count($this->text, "\n"); + } +} diff --git a/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php b/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php new file mode 100644 index 00000000..f33dd77d --- /dev/null +++ b/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php @@ -0,0 +1,56 @@ +<?php declare(strict_types=1); + +namespace PhpParser; + +if (!\function_exists('PhpParser\defineCompatibilityTokens')) { + function defineCompatibilityTokens(): void { + $compatTokens = [ + // PHP 8.0 + 'T_NAME_QUALIFIED', + 'T_NAME_FULLY_QUALIFIED', + 'T_NAME_RELATIVE', + 'T_MATCH', + 'T_NULLSAFE_OBJECT_OPERATOR', + 'T_ATTRIBUTE', + // PHP 8.1 + 'T_ENUM', + 'T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG', + 'T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG', + 'T_READONLY', + ]; + + // PHP-Parser might be used together with another library that also emulates some or all + // of these tokens. Perform a sanity-check that all already defined tokens have been + // assigned a unique ID. + $usedTokenIds = []; + foreach ($compatTokens as $token) { + if (\defined($token)) { + $tokenId = \constant($token); + $clashingToken = $usedTokenIds[$tokenId] ?? null; + if ($clashingToken !== null) { + throw new \Error(sprintf( + 'Token %s has same ID as token %s, ' . + 'you may be using a library with broken token emulation', + $token, $clashingToken + )); + } + $usedTokenIds[$tokenId] = $token; + } + } + + // Now define any tokens that have not yet been emulated. Try to assign IDs from -1 + // downwards, but skip any IDs that may already be in use. + $newTokenId = -1; + foreach ($compatTokens as $token) { + if (!\defined($token)) { + while (isset($usedTokenIds[$newTokenId])) { + $newTokenId--; + } + \define($token, $newTokenId); + $newTokenId--; + } + } + } + + defineCompatibilityTokens(); +} diff --git a/vendor/nikic/php-parser/phpstan-baseline.neon b/vendor/nikic/php-parser/phpstan-baseline.neon new file mode 100644 index 00000000..f9ea34d3 --- /dev/null +++ b/vendor/nikic/php-parser/phpstan-baseline.neon @@ -0,0 +1,236 @@ +parameters: + ignoreErrors: + - + message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:__construct\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/Builder/ClassConst.php + + - + message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:addConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/Builder/ClassConst.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:args\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:attribute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:classConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:funcCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:methodCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:new\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:staticCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderFactory\\:\\:val\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderFactory.php + + - + message: "#^Method PhpParser\\\\BuilderHelpers\\:\\:normalizeValue\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/BuilderHelpers.php + + - + message: "#^Method PhpParser\\\\ConstExprEvaluator\\:\\:evaluateArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/ConstExprEvaluator.php + + - + message: "#^Unary operation \"~\" on mixed results in an error\\.$#" + count: 1 + path: lib/PhpParser/ConstExprEvaluator.php + + - + message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/JsonDecoder.php + + - + message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/JsonDecoder.php + + - + message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeComment\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/JsonDecoder.php + + - + message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeNode\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/JsonDecoder.php + + - + message: "#^Call to function assert\\(\\) with false will always evaluate to false\\.$#" + count: 1 + path: lib/PhpParser/Lexer/Emulative.php + + - + message: "#^Method PhpParser\\\\NodeDumper\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeDumper.php + + - + message: "#^Method PhpParser\\\\NodeDumper\\:\\:dump\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeDumper.php + + - + message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) has parameter \\$nodes with no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeTraverser.php + + - + message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: lib/PhpParser/NodeTraverser.php + + - + message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$attrGroups\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NameResolver.php + + - + message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$name\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NameResolver.php + + - + message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$namespacedName\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NameResolver.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\<PhpParser\\\\Node\\>\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:enterNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\<PhpParser\\\\Node\\>\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:enterNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php + + - + message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#" + count: 1 + path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ATTRIBUTE\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_COALESCE_EQUAL\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ECHO\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ENUM\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_FN\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_MATCH\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_FULLY_QUALIFIED\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_QUALIFIED\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NAME_RELATIVE\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_NULLSAFE_OBJECT_OPERATOR\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_PAAMAYIM_NEKUDOTAYIM\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_READONLY\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Unary operation \"\\+\" on string results in an error\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php + + - + message: "#^Variable \\$action might not be defined\\.$#" + count: 1 + path: lib/PhpParser/ParserAbstract.php diff --git a/vendor/nikic/php-parser/phpstan.neon.dist b/vendor/nikic/php-parser/phpstan.neon.dist new file mode 100644 index 00000000..af910125 --- /dev/null +++ b/vendor/nikic/php-parser/phpstan.neon.dist @@ -0,0 +1,8 @@ +includes: + - phpstan-baseline.neon + +parameters: + level: 6 + paths: + - lib + treatPhpDocTypesAsCertain: false diff --git a/vendor/phpunit/phpunit/ChangeLog-10.5.md b/vendor/phpunit/phpunit/ChangeLog-10.5.md index af8e7071..067699db 100644 --- a/vendor/phpunit/phpunit/ChangeLog-10.5.md +++ b/vendor/phpunit/phpunit/ChangeLog-10.5.md @@ -2,6 +2,35 @@ All notable changes of the PHPUnit 10.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. +## [10.5.8] - 2024-01-19 + +### Fixed + +* [#5673](https://github.com/sebastianbergmann/phpunit/issues/5673): Confusing error message when migration of a configuration is requested that does not need to be migrated + +## [10.5.7] - 2024-01-14 + +### Fixed + +* [#5662](https://github.com/sebastianbergmann/phpunit/issues/5662): PHPUnit errors out on startup when the `ctype` extension is not loaded but a polyfill for it was installed + +## [10.5.6] - 2024-01-13 + +### Added + +* Added the `--debug` CLI option as an alias for `--no-output --log-events-text php://stdout` + +### Fixed + +* [#5455](https://github.com/sebastianbergmann/phpunit/issues/5455): `willReturnCallback()` does not pass unknown named variadic arguments to callback +* [#5488](https://github.com/sebastianbergmann/phpunit/issues/5488): Details about tests that are considered risky are not displayed when the TestDox result printer is used +* [#5516](https://github.com/sebastianbergmann/phpunit/issues/5516): Assertions that use the `LogicalNot` constraint (`assertNotEquals()`, `assertStringNotContainsString()`, ...) can generate confusing failure messages +* [#5518](https://github.com/sebastianbergmann/phpunit/issues/5518): Details about deprecations, notices, and warnings are not displayed when the TestDox result printer is used +* [#5574](https://github.com/sebastianbergmann/phpunit/issues/5574): Wrong backtrace line is reported +* [#5633](https://github.com/sebastianbergmann/phpunit/pull/5633): `--log-events-text` and `--log-events-verbose-text` CLI options do not handle absolute and relative paths +* [#5634](https://github.com/sebastianbergmann/phpunit/pull/5634): Exceptions in the destructor of a test double are ignored +* [#5641](https://github.com/sebastianbergmann/phpunit/issues/5641): The `TestSuite` value object returned by `TestSuite\Filtered::testSuite()` contains all tests instead of only the filtered tests + ## [10.5.5] - 2023-12-27 ### Fixed @@ -62,6 +91,9 @@ All notable changes of the PHPUnit 10.5 release series are documented in this fi * [#5563](https://github.com/sebastianbergmann/phpunit/issues/5563): `createMockForIntersectionOfInterfaces()` does not automatically register mock object for expectation verification +[10.5.8]: https://github.com/sebastianbergmann/phpunit/compare/10.5.7...10.5.8 +[10.5.7]: https://github.com/sebastianbergmann/phpunit/compare/10.5.6...10.5.7 +[10.5.6]: https://github.com/sebastianbergmann/phpunit/compare/10.5.5...10.5.6 [10.5.5]: https://github.com/sebastianbergmann/phpunit/compare/10.5.4...10.5.5 [10.5.4]: https://github.com/sebastianbergmann/phpunit/compare/10.5.3...10.5.4 [10.5.3]: https://github.com/sebastianbergmann/phpunit/compare/10.5.2...10.5.3 diff --git a/vendor/phpunit/phpunit/LICENSE b/vendor/phpunit/phpunit/LICENSE index 73e95512..bdb57ec6 100644 --- a/vendor/phpunit/phpunit/LICENSE +++ b/vendor/phpunit/phpunit/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2001-2023, Sebastian Bergmann +Copyright (c) 2001-2024, Sebastian Bergmann All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/phpunit/phpunit/composer.lock b/vendor/phpunit/phpunit/composer.lock index d41087fd..f0eebd96 100644 --- a/vendor/phpunit/phpunit/composer.lock +++ b/vendor/phpunit/phpunit/composer.lock @@ -67,25 +67,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.18.0", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999", - "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -93,7 +95,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -117,9 +119,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, - "time": "2023-12-10T21:03:43+00:00" + "time": "2024-01-07T17:17:35+00:00" }, { "name": "phar-io/manifest", diff --git a/vendor/phpunit/phpunit/phpunit b/vendor/phpunit/phpunit/phpunit index 624c8b4d..95aaf92d 100644 --- a/vendor/phpunit/phpunit/phpunit +++ b/vendor/phpunit/phpunit/phpunit @@ -38,31 +38,6 @@ if (version_compare('8.1.0', PHP_VERSION, '>')) { die(1); } -$requiredExtensions = ['dom', 'json', 'libxml', 'mbstring', 'tokenizer', 'xml', 'xmlwriter']; - -$unavailableExtensions = array_filter( - $requiredExtensions, - static function ($extension) { - return !extension_loaded($extension); - } -); - -if ([] !== $unavailableExtensions) { - fwrite( - STDERR, - sprintf( - 'PHPUnit requires the "%s" extensions, but the "%s" %s not available.' . PHP_EOL, - implode('", "', $requiredExtensions), - implode('", "', $unavailableExtensions), - count($unavailableExtensions) === 1 ? 'extension is' : 'extensions are' - ) - ); - - die(1); -} - -unset($requiredExtensions, $unavailableExtensions); - if (!ini_get('date.timezone')) { ini_set('date.timezone', 'UTC'); } @@ -96,4 +71,34 @@ if (!defined('PHPUNIT_COMPOSER_INSTALL')) { require PHPUNIT_COMPOSER_INSTALL; +$requiredExtensions = ['dom', 'json', 'libxml', 'mbstring', 'tokenizer', 'xml', 'xmlwriter']; + +$unavailableExtensions = array_filter( + $requiredExtensions, + static function ($extension) { + return !extension_loaded($extension); + } +); + +// Workaround for https://github.com/sebastianbergmann/phpunit/issues/5662 +if (!function_exists('ctype_alnum')) { + $unavailableExtensions[] = 'ctype'; +} + +if ([] !== $unavailableExtensions) { + fwrite( + STDERR, + sprintf( + 'PHPUnit requires the "%s" extensions, but the "%s" %s not available.' . PHP_EOL, + implode('", "', $requiredExtensions), + implode('", "', $unavailableExtensions), + count($unavailableExtensions) === 1 ? 'extension is' : 'extensions are' + ) + ); + + die(1); +} + +unset($requiredExtensions, $unavailableExtensions); + exit((new PHPUnit\TextUI\Application)->run($_SERVER['argv'])); diff --git a/vendor/phpunit/phpunit/schema/10.1.xsd b/vendor/phpunit/phpunit/schema/10.1.xsd new file mode 100644 index 00000000..1b190c21 --- /dev/null +++ b/vendor/phpunit/phpunit/schema/10.1.xsd @@ -0,0 +1,312 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:annotation> + <xs:documentation source="https://phpunit.de/documentation.html"> + This Schema file defines the rules by which the XML configuration file of PHPUnit 10.1 may be structured. + </xs:documentation> + <xs:appinfo source="https://phpunit.de/documentation.html"/> + </xs:annotation> + <xs:element name="phpunit" type="phpUnitType"> + <xs:annotation> + <xs:documentation>Root Element</xs:documentation> + </xs:annotation> + </xs:element> + <xs:complexType name="sourceType"> + <xs:all> + <xs:element name="include" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="sourcePathGroup"/> + </xs:complexType> + </xs:element> + <xs:element name="exclude" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="sourcePathGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="restrictDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="restrictNotices" type="xs:boolean" default="false"/> + <xs:attribute name="restrictWarnings" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:group name="sourcePathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="sourceDirectoryType"/> + <xs:element name="file" type="xs:anyURI"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="sourceDirectoryType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default=".php"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="coverageType"> + <xs:all> + <xs:element name="report" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="coverageReportGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="pathCoverage" type="xs:boolean" default="false"/> + <xs:attribute name="includeUncoveredFiles" type="xs:boolean" default="true"/> + <xs:attribute name="ignoreDeprecatedCodeUnits" type="xs:boolean" default="false"/> + <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:complexType name="loggingType"> + <xs:group ref="loggingGroup"/> + </xs:complexType> + <xs:complexType name="groupsType"> + <xs:choice> + <xs:sequence> + <xs:element name="include" type="groupType"/> + <xs:element name="exclude" type="groupType" minOccurs="0"/> + </xs:sequence> + <xs:sequence> + <xs:element name="exclude" type="groupType"/> + </xs:sequence> + </xs:choice> + </xs:complexType> + <xs:complexType name="groupType"> + <xs:sequence> + <xs:element name="group" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="extensionsType"> + <xs:sequence> + <xs:element name="bootstrap" type="bootstrapType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="bootstrapType"> + <xs:sequence> + <xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="class" type="xs:string" use="required"/> + </xs:complexType> + <xs:complexType name="parameterType"> + <xs:attribute name="name" type="xs:string" use="required"/> + <xs:attribute name="value" type="xs:string" use="required"/> + </xs:complexType> + <xs:simpleType name="columnsType"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:integer"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="max"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:simpleType name="executionOrderType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="default"/> + <xs:enumeration value="defects"/> + <xs:enumeration value="depends"/> + <xs:enumeration value="depends,defects"/> + <xs:enumeration value="depends,duration"/> + <xs:enumeration value="depends,random"/> + <xs:enumeration value="depends,reverse"/> + <xs:enumeration value="depends,size"/> + <xs:enumeration value="duration"/> + <xs:enumeration value="no-depends"/> + <xs:enumeration value="no-depends,defects"/> + <xs:enumeration value="no-depends,duration"/> + <xs:enumeration value="no-depends,random"/> + <xs:enumeration value="no-depends,reverse"/> + <xs:enumeration value="no-depends,size"/> + <xs:enumeration value="random"/> + <xs:enumeration value="reverse"/> + <xs:enumeration value="size"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="phpType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="namedValueType"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="value" use="required" type="xs:anySimpleType"/> + <xs:attribute name="verbatim" use="optional" type="xs:boolean"/> + <xs:attribute name="force" use="optional" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="phpUnitType"> + <xs:annotation> + <xs:documentation>The main type specifying the document structure</xs:documentation> + </xs:annotation> + <xs:group ref="configGroup"/> + <xs:attributeGroup ref="configAttributeGroup"/> + </xs:complexType> + <xs:attributeGroup name="configAttributeGroup"> + <xs:attribute name="backupGlobals" type="xs:boolean" default="false"/> + <xs:attribute name="backupStaticProperties" type="xs:boolean" default="false"/> + <xs:attribute name="bootstrap" type="xs:anyURI"/> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="cacheResult" type="xs:boolean" default="true"/> + <xs:attribute name="cacheResultFile" type="xs:anyURI"/> + <xs:attribute name="colors" type="xs:boolean" default="false"/> + <xs:attribute name="columns" type="columnsType" default="80"/> + <xs:attribute name="requireCoverageMetadata" type="xs:boolean" default="false"/> + <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> + <xs:attribute name="failOnDeprecation" type="xs:boolean" default="false"/> + <xs:attribute name="failOnEmptyTestSuite" type="xs:boolean" default="false"/> + <xs:attribute name="failOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="failOnNotice" type="xs:boolean" default="false"/> + <xs:attribute name="failOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="failOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDeprecation" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnError" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnNotice" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/> + <xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutCoverageMetadata" type="xs:boolean" default="false"/> + <xs:attribute name="defaultTimeLimit" type="xs:integer" default="0"/> + <xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/> + <xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/> + <xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/> + <xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/> + <xs:attribute name="defaultTestSuite" type="xs:string" default=""/> + <xs:attribute name="testdox" type="xs:boolean" default="false"/> + <xs:attribute name="stderr" type="xs:boolean" default="false"/> + <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> + <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> + <xs:attribute name="extensionsDirectory" type="xs:anyURI"/> + <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> + <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> + <xs:attribute name="displayDetailsOnIncompleteTests" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnSkippedTests" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerErrors" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerNotices" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerWarnings" type="xs:boolean" default="false"/> + </xs:attributeGroup> + <xs:group name="configGroup"> + <xs:all> + <xs:element ref="testSuiteFacet" minOccurs="0"/> + <xs:element name="groups" type="groupsType" minOccurs="0"/> + <xs:element name="source" type="sourceType" minOccurs="0"/> + <xs:element name="coverage" type="coverageType" minOccurs="0"/> + <xs:element name="logging" type="loggingType" minOccurs="0"/> + <xs:element name="extensions" type="extensionsType" minOccurs="0"/> + <xs:element name="php" type="phpType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:element name="testSuiteFacet" abstract="true"/> + <xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/> + <xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/> + <xs:complexType name="testSuitesType"> + <xs:sequence> + <xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testSuiteType"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="testSuitePathGroup"/> + <xs:element name="exclude" type="xs:string"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> + <xs:group name="testSuitePathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="testSuiteDirectoryType"/> + <xs:element name="file" type="testSuiteFileType"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="testSuiteDirectoryType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default="Test.php"/> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="testSuiteFileType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:attributeGroup name="phpVersionGroup"> + <xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/> + <xs:attribute name="phpVersionOperator" type="xs:string" default=">="/> + </xs:attributeGroup> + <xs:group name="coverageReportGroup"> + <xs:all> + <xs:element name="clover" type="logToFileType" minOccurs="0"/> + <xs:element name="cobertura" type="logToFileType" minOccurs="0"/> + <xs:element name="crap4j" type="coverageReportCrap4JType" minOccurs="0" /> + <xs:element name="html" type="coverageReportHtmlType" minOccurs="0" /> + <xs:element name="php" type="logToFileType" minOccurs="0" /> + <xs:element name="text" type="coverageReportTextType" minOccurs="0" /> + <xs:element name="xml" type="logToDirectoryType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:group name="loggingGroup"> + <xs:all> + <xs:element name="junit" type="logToFileType" minOccurs="0" /> + <xs:element name="teamcity" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxHtml" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxText" type="logToFileType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:complexType name="logToFileType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="logToDirectoryType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="coverageReportCrap4JType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="threshold" type="xs:integer"/> + </xs:complexType> + <xs:complexType name="coverageReportHtmlType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + <xs:attribute name="lowUpperBound" type="xs:integer" default="50"/> + <xs:attribute name="highLowerBound" type="xs:integer" default="90"/> + <xs:attribute name="colorSuccessLow" type="xs:string" default="#dff0d8"/> + <xs:attribute name="colorSuccessMedium" type="xs:string" default="#c3e3b5"/> + <xs:attribute name="colorSuccessHigh" type="xs:string" default="#99cb84"/> + <xs:attribute name="colorWarning" type="xs:string" default="#fcf8e3"/> + <xs:attribute name="colorDanger" type="xs:string" default="#f2dede"/> + <xs:attribute name="customCssFile" type="xs:string"/> + </xs:complexType> + <xs:complexType name="coverageReportTextType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/> + </xs:complexType> +</xs:schema> diff --git a/vendor/phpunit/phpunit/schema/10.2.xsd b/vendor/phpunit/phpunit/schema/10.2.xsd new file mode 100644 index 00000000..269b7a3a --- /dev/null +++ b/vendor/phpunit/phpunit/schema/10.2.xsd @@ -0,0 +1,319 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:annotation> + <xs:documentation source="https://phpunit.de/documentation.html"> + This Schema file defines the rules by which the XML configuration file of PHPUnit 10.2 may be structured. + </xs:documentation> + <xs:appinfo source="https://phpunit.de/documentation.html"/> + </xs:annotation> + <xs:element name="phpunit" type="phpUnitType"> + <xs:annotation> + <xs:documentation>Root Element</xs:documentation> + </xs:annotation> + </xs:element> + <xs:complexType name="sourceType"> + <xs:all> + <xs:element name="include" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="sourcePathGroup"/> + </xs:complexType> + </xs:element> + <xs:element name="exclude" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="sourcePathGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="restrictDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="restrictNotices" type="xs:boolean" default="false"/> + <xs:attribute name="restrictWarnings" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfErrors" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfNotices" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpNotices" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfWarnings" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpWarnings" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:group name="sourcePathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="sourceDirectoryType"/> + <xs:element name="file" type="xs:anyURI"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="sourceDirectoryType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default=".php"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="coverageType"> + <xs:all> + <xs:element name="report" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="coverageReportGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="pathCoverage" type="xs:boolean" default="false"/> + <xs:attribute name="includeUncoveredFiles" type="xs:boolean" default="true"/> + <xs:attribute name="ignoreDeprecatedCodeUnits" type="xs:boolean" default="false"/> + <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:complexType name="loggingType"> + <xs:group ref="loggingGroup"/> + </xs:complexType> + <xs:complexType name="groupsType"> + <xs:choice> + <xs:sequence> + <xs:element name="include" type="groupType"/> + <xs:element name="exclude" type="groupType" minOccurs="0"/> + </xs:sequence> + <xs:sequence> + <xs:element name="exclude" type="groupType"/> + </xs:sequence> + </xs:choice> + </xs:complexType> + <xs:complexType name="groupType"> + <xs:sequence> + <xs:element name="group" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="extensionsType"> + <xs:sequence> + <xs:element name="bootstrap" type="bootstrapType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="bootstrapType"> + <xs:sequence> + <xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="class" type="xs:string" use="required"/> + </xs:complexType> + <xs:complexType name="parameterType"> + <xs:attribute name="name" type="xs:string" use="required"/> + <xs:attribute name="value" type="xs:string" use="required"/> + </xs:complexType> + <xs:simpleType name="columnsType"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:integer"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="max"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:simpleType name="executionOrderType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="default"/> + <xs:enumeration value="defects"/> + <xs:enumeration value="depends"/> + <xs:enumeration value="depends,defects"/> + <xs:enumeration value="depends,duration"/> + <xs:enumeration value="depends,random"/> + <xs:enumeration value="depends,reverse"/> + <xs:enumeration value="depends,size"/> + <xs:enumeration value="duration"/> + <xs:enumeration value="no-depends"/> + <xs:enumeration value="no-depends,defects"/> + <xs:enumeration value="no-depends,duration"/> + <xs:enumeration value="no-depends,random"/> + <xs:enumeration value="no-depends,reverse"/> + <xs:enumeration value="no-depends,size"/> + <xs:enumeration value="random"/> + <xs:enumeration value="reverse"/> + <xs:enumeration value="size"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="phpType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="namedValueType"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="value" use="required" type="xs:anySimpleType"/> + <xs:attribute name="verbatim" use="optional" type="xs:boolean"/> + <xs:attribute name="force" use="optional" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="phpUnitType"> + <xs:annotation> + <xs:documentation>The main type specifying the document structure</xs:documentation> + </xs:annotation> + <xs:group ref="configGroup"/> + <xs:attributeGroup ref="configAttributeGroup"/> + </xs:complexType> + <xs:attributeGroup name="configAttributeGroup"> + <xs:attribute name="backupGlobals" type="xs:boolean" default="false"/> + <xs:attribute name="backupStaticProperties" type="xs:boolean" default="false"/> + <xs:attribute name="bootstrap" type="xs:anyURI"/> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="cacheResult" type="xs:boolean" default="true"/> + <xs:attribute name="cacheResultFile" type="xs:anyURI"/> + <xs:attribute name="colors" type="xs:boolean" default="false"/> + <xs:attribute name="columns" type="columnsType" default="80"/> + <xs:attribute name="requireCoverageMetadata" type="xs:boolean" default="false"/> + <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> + <xs:attribute name="failOnDeprecation" type="xs:boolean" default="false"/> + <xs:attribute name="failOnEmptyTestSuite" type="xs:boolean" default="false"/> + <xs:attribute name="failOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="failOnNotice" type="xs:boolean" default="false"/> + <xs:attribute name="failOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="failOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDeprecation" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnError" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnNotice" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/> + <xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutCoverageMetadata" type="xs:boolean" default="false"/> + <xs:attribute name="defaultTimeLimit" type="xs:integer" default="0"/> + <xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/> + <xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/> + <xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/> + <xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/> + <xs:attribute name="defaultTestSuite" type="xs:string" default=""/> + <xs:attribute name="testdox" type="xs:boolean" default="false"/> + <xs:attribute name="stderr" type="xs:boolean" default="false"/> + <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> + <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> + <xs:attribute name="extensionsDirectory" type="xs:anyURI"/> + <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> + <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> + <xs:attribute name="displayDetailsOnIncompleteTests" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnSkippedTests" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerErrors" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerNotices" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerWarnings" type="xs:boolean" default="false"/> + </xs:attributeGroup> + <xs:group name="configGroup"> + <xs:all> + <xs:element ref="testSuiteFacet" minOccurs="0"/> + <xs:element name="groups" type="groupsType" minOccurs="0"/> + <xs:element name="source" type="sourceType" minOccurs="0"/> + <xs:element name="coverage" type="coverageType" minOccurs="0"/> + <xs:element name="logging" type="loggingType" minOccurs="0"/> + <xs:element name="extensions" type="extensionsType" minOccurs="0"/> + <xs:element name="php" type="phpType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:element name="testSuiteFacet" abstract="true"/> + <xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/> + <xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/> + <xs:complexType name="testSuitesType"> + <xs:sequence> + <xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testSuiteType"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="testSuitePathGroup"/> + <xs:element name="exclude" type="xs:string"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> + <xs:group name="testSuitePathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="testSuiteDirectoryType"/> + <xs:element name="file" type="testSuiteFileType"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="testSuiteDirectoryType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default="Test.php"/> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="testSuiteFileType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:attributeGroup name="phpVersionGroup"> + <xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/> + <xs:attribute name="phpVersionOperator" type="xs:string" default=">="/> + </xs:attributeGroup> + <xs:group name="coverageReportGroup"> + <xs:all> + <xs:element name="clover" type="logToFileType" minOccurs="0"/> + <xs:element name="cobertura" type="logToFileType" minOccurs="0"/> + <xs:element name="crap4j" type="coverageReportCrap4JType" minOccurs="0" /> + <xs:element name="html" type="coverageReportHtmlType" minOccurs="0" /> + <xs:element name="php" type="logToFileType" minOccurs="0" /> + <xs:element name="text" type="coverageReportTextType" minOccurs="0" /> + <xs:element name="xml" type="logToDirectoryType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:group name="loggingGroup"> + <xs:all> + <xs:element name="junit" type="logToFileType" minOccurs="0" /> + <xs:element name="teamcity" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxHtml" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxText" type="logToFileType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:complexType name="logToFileType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="logToDirectoryType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="coverageReportCrap4JType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="threshold" type="xs:integer"/> + </xs:complexType> + <xs:complexType name="coverageReportHtmlType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + <xs:attribute name="lowUpperBound" type="xs:integer" default="50"/> + <xs:attribute name="highLowerBound" type="xs:integer" default="90"/> + <xs:attribute name="colorSuccessLow" type="xs:string" default="#dff0d8"/> + <xs:attribute name="colorSuccessMedium" type="xs:string" default="#c3e3b5"/> + <xs:attribute name="colorSuccessHigh" type="xs:string" default="#99cb84"/> + <xs:attribute name="colorWarning" type="xs:string" default="#fcf8e3"/> + <xs:attribute name="colorDanger" type="xs:string" default="#f2dede"/> + <xs:attribute name="customCssFile" type="xs:string"/> + </xs:complexType> + <xs:complexType name="coverageReportTextType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/> + </xs:complexType> +</xs:schema> diff --git a/vendor/phpunit/phpunit/schema/10.3.xsd b/vendor/phpunit/phpunit/schema/10.3.xsd new file mode 100644 index 00000000..03a54ee0 --- /dev/null +++ b/vendor/phpunit/phpunit/schema/10.3.xsd @@ -0,0 +1,321 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:annotation> + <xs:documentation source="https://phpunit.de/documentation.html"> + This Schema file defines the rules by which the XML configuration file of PHPUnit 10.3 may be structured. + </xs:documentation> + <xs:appinfo source="https://phpunit.de/documentation.html"/> + </xs:annotation> + <xs:element name="phpunit" type="phpUnitType"> + <xs:annotation> + <xs:documentation>Root Element</xs:documentation> + </xs:annotation> + </xs:element> + <xs:complexType name="sourceType"> + <xs:all> + <xs:element name="include" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="sourcePathGroup"/> + </xs:complexType> + </xs:element> + <xs:element name="exclude" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="sourcePathGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="restrictDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="restrictNotices" type="xs:boolean" default="false"/> + <xs:attribute name="restrictWarnings" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfErrors" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfNotices" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpNotices" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfWarnings" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpWarnings" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:group name="sourcePathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="sourceDirectoryType"/> + <xs:element name="file" type="xs:anyURI"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="sourceDirectoryType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default=".php"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="coverageType"> + <xs:all> + <xs:element name="report" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="coverageReportGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="pathCoverage" type="xs:boolean" default="false"/> + <xs:attribute name="includeUncoveredFiles" type="xs:boolean" default="true"/> + <xs:attribute name="ignoreDeprecatedCodeUnits" type="xs:boolean" default="false"/> + <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:complexType name="loggingType"> + <xs:group ref="loggingGroup"/> + </xs:complexType> + <xs:complexType name="groupsType"> + <xs:choice> + <xs:sequence> + <xs:element name="include" type="groupType"/> + <xs:element name="exclude" type="groupType" minOccurs="0"/> + </xs:sequence> + <xs:sequence> + <xs:element name="exclude" type="groupType"/> + </xs:sequence> + </xs:choice> + </xs:complexType> + <xs:complexType name="groupType"> + <xs:sequence> + <xs:element name="group" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="extensionsType"> + <xs:sequence> + <xs:element name="bootstrap" type="bootstrapType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="bootstrapType"> + <xs:sequence> + <xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="class" type="xs:string" use="required"/> + </xs:complexType> + <xs:complexType name="parameterType"> + <xs:attribute name="name" type="xs:string" use="required"/> + <xs:attribute name="value" type="xs:string" use="required"/> + </xs:complexType> + <xs:simpleType name="columnsType"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:integer"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="max"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:simpleType name="executionOrderType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="default"/> + <xs:enumeration value="defects"/> + <xs:enumeration value="depends"/> + <xs:enumeration value="depends,defects"/> + <xs:enumeration value="depends,duration"/> + <xs:enumeration value="depends,random"/> + <xs:enumeration value="depends,reverse"/> + <xs:enumeration value="depends,size"/> + <xs:enumeration value="duration"/> + <xs:enumeration value="no-depends"/> + <xs:enumeration value="no-depends,defects"/> + <xs:enumeration value="no-depends,duration"/> + <xs:enumeration value="no-depends,random"/> + <xs:enumeration value="no-depends,reverse"/> + <xs:enumeration value="no-depends,size"/> + <xs:enumeration value="random"/> + <xs:enumeration value="reverse"/> + <xs:enumeration value="size"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="phpType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="namedValueType"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="value" use="required" type="xs:anySimpleType"/> + <xs:attribute name="verbatim" use="optional" type="xs:boolean"/> + <xs:attribute name="force" use="optional" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="phpUnitType"> + <xs:annotation> + <xs:documentation>The main type specifying the document structure</xs:documentation> + </xs:annotation> + <xs:group ref="configGroup"/> + <xs:attributeGroup ref="configAttributeGroup"/> + </xs:complexType> + <xs:attributeGroup name="configAttributeGroup"> + <xs:attribute name="backupGlobals" type="xs:boolean" default="false"/> + <xs:attribute name="backupStaticProperties" type="xs:boolean" default="false"/> + <xs:attribute name="bootstrap" type="xs:anyURI"/> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="cacheResult" type="xs:boolean" default="true"/> + <xs:attribute name="cacheResultFile" type="xs:anyURI"/> + <xs:attribute name="colors" type="xs:boolean" default="false"/> + <xs:attribute name="columns" type="columnsType" default="80"/> + <xs:attribute name="controlGarbageCollector" type="xs:boolean" default="false"/> + <xs:attribute name="numberOfTestsBeforeGarbageCollection" type="xs:integer" default="100"/> + <xs:attribute name="requireCoverageMetadata" type="xs:boolean" default="false"/> + <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> + <xs:attribute name="failOnDeprecation" type="xs:boolean" default="false"/> + <xs:attribute name="failOnEmptyTestSuite" type="xs:boolean" default="false"/> + <xs:attribute name="failOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="failOnNotice" type="xs:boolean" default="false"/> + <xs:attribute name="failOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="failOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDeprecation" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnError" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnNotice" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/> + <xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutCoverageMetadata" type="xs:boolean" default="false"/> + <xs:attribute name="defaultTimeLimit" type="xs:integer" default="0"/> + <xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/> + <xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/> + <xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/> + <xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/> + <xs:attribute name="defaultTestSuite" type="xs:string" default=""/> + <xs:attribute name="testdox" type="xs:boolean" default="false"/> + <xs:attribute name="stderr" type="xs:boolean" default="false"/> + <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> + <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> + <xs:attribute name="extensionsDirectory" type="xs:anyURI"/> + <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> + <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> + <xs:attribute name="displayDetailsOnIncompleteTests" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnSkippedTests" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerErrors" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerNotices" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerWarnings" type="xs:boolean" default="false"/> + </xs:attributeGroup> + <xs:group name="configGroup"> + <xs:all> + <xs:element ref="testSuiteFacet" minOccurs="0"/> + <xs:element name="groups" type="groupsType" minOccurs="0"/> + <xs:element name="source" type="sourceType" minOccurs="0"/> + <xs:element name="coverage" type="coverageType" minOccurs="0"/> + <xs:element name="logging" type="loggingType" minOccurs="0"/> + <xs:element name="extensions" type="extensionsType" minOccurs="0"/> + <xs:element name="php" type="phpType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:element name="testSuiteFacet" abstract="true"/> + <xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/> + <xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/> + <xs:complexType name="testSuitesType"> + <xs:sequence> + <xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testSuiteType"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="testSuitePathGroup"/> + <xs:element name="exclude" type="xs:string"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> + <xs:group name="testSuitePathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="testSuiteDirectoryType"/> + <xs:element name="file" type="testSuiteFileType"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="testSuiteDirectoryType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default="Test.php"/> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="testSuiteFileType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:attributeGroup name="phpVersionGroup"> + <xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/> + <xs:attribute name="phpVersionOperator" type="xs:string" default=">="/> + </xs:attributeGroup> + <xs:group name="coverageReportGroup"> + <xs:all> + <xs:element name="clover" type="logToFileType" minOccurs="0"/> + <xs:element name="cobertura" type="logToFileType" minOccurs="0"/> + <xs:element name="crap4j" type="coverageReportCrap4JType" minOccurs="0" /> + <xs:element name="html" type="coverageReportHtmlType" minOccurs="0" /> + <xs:element name="php" type="logToFileType" minOccurs="0" /> + <xs:element name="text" type="coverageReportTextType" minOccurs="0" /> + <xs:element name="xml" type="logToDirectoryType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:group name="loggingGroup"> + <xs:all> + <xs:element name="junit" type="logToFileType" minOccurs="0" /> + <xs:element name="teamcity" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxHtml" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxText" type="logToFileType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:complexType name="logToFileType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="logToDirectoryType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="coverageReportCrap4JType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="threshold" type="xs:integer"/> + </xs:complexType> + <xs:complexType name="coverageReportHtmlType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + <xs:attribute name="lowUpperBound" type="xs:integer" default="50"/> + <xs:attribute name="highLowerBound" type="xs:integer" default="90"/> + <xs:attribute name="colorSuccessLow" type="xs:string" default="#dff0d8"/> + <xs:attribute name="colorSuccessMedium" type="xs:string" default="#c3e3b5"/> + <xs:attribute name="colorSuccessHigh" type="xs:string" default="#99cb84"/> + <xs:attribute name="colorWarning" type="xs:string" default="#fcf8e3"/> + <xs:attribute name="colorDanger" type="xs:string" default="#f2dede"/> + <xs:attribute name="customCssFile" type="xs:string"/> + </xs:complexType> + <xs:complexType name="coverageReportTextType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/> + </xs:complexType> +</xs:schema> diff --git a/vendor/phpunit/phpunit/schema/10.4.xsd b/vendor/phpunit/phpunit/schema/10.4.xsd new file mode 100644 index 00000000..bd22b2ca --- /dev/null +++ b/vendor/phpunit/phpunit/schema/10.4.xsd @@ -0,0 +1,322 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:annotation> + <xs:documentation source="https://phpunit.de/documentation.html"> + This Schema file defines the rules by which the XML configuration file of PHPUnit 10.4 may be structured. + </xs:documentation> + <xs:appinfo source="https://phpunit.de/documentation.html"/> + </xs:annotation> + <xs:element name="phpunit" type="phpUnitType"> + <xs:annotation> + <xs:documentation>Root Element</xs:documentation> + </xs:annotation> + </xs:element> + <xs:complexType name="sourceType"> + <xs:all> + <xs:element name="include" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="sourcePathGroup"/> + </xs:complexType> + </xs:element> + <xs:element name="exclude" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="sourcePathGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="baseline" type="xs:anyURI"/> + <xs:attribute name="restrictDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="restrictNotices" type="xs:boolean" default="false"/> + <xs:attribute name="restrictWarnings" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfErrors" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfNotices" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpNotices" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfWarnings" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreSuppressionOfPhpWarnings" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:group name="sourcePathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="sourceDirectoryType"/> + <xs:element name="file" type="xs:anyURI"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="sourceDirectoryType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default=".php"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="coverageType"> + <xs:all> + <xs:element name="report" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="coverageReportGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="pathCoverage" type="xs:boolean" default="false"/> + <xs:attribute name="includeUncoveredFiles" type="xs:boolean" default="true"/> + <xs:attribute name="ignoreDeprecatedCodeUnits" type="xs:boolean" default="false"/> + <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:complexType name="loggingType"> + <xs:group ref="loggingGroup"/> + </xs:complexType> + <xs:complexType name="groupsType"> + <xs:choice> + <xs:sequence> + <xs:element name="include" type="groupType"/> + <xs:element name="exclude" type="groupType" minOccurs="0"/> + </xs:sequence> + <xs:sequence> + <xs:element name="exclude" type="groupType"/> + </xs:sequence> + </xs:choice> + </xs:complexType> + <xs:complexType name="groupType"> + <xs:sequence> + <xs:element name="group" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="extensionsType"> + <xs:sequence> + <xs:element name="bootstrap" type="bootstrapType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="bootstrapType"> + <xs:sequence> + <xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="class" type="xs:string" use="required"/> + </xs:complexType> + <xs:complexType name="parameterType"> + <xs:attribute name="name" type="xs:string" use="required"/> + <xs:attribute name="value" type="xs:string" use="required"/> + </xs:complexType> + <xs:simpleType name="columnsType"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:integer"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="max"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:simpleType name="executionOrderType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="default"/> + <xs:enumeration value="defects"/> + <xs:enumeration value="depends"/> + <xs:enumeration value="depends,defects"/> + <xs:enumeration value="depends,duration"/> + <xs:enumeration value="depends,random"/> + <xs:enumeration value="depends,reverse"/> + <xs:enumeration value="depends,size"/> + <xs:enumeration value="duration"/> + <xs:enumeration value="no-depends"/> + <xs:enumeration value="no-depends,defects"/> + <xs:enumeration value="no-depends,duration"/> + <xs:enumeration value="no-depends,random"/> + <xs:enumeration value="no-depends,reverse"/> + <xs:enumeration value="no-depends,size"/> + <xs:enumeration value="random"/> + <xs:enumeration value="reverse"/> + <xs:enumeration value="size"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="phpType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="namedValueType"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="value" use="required" type="xs:anySimpleType"/> + <xs:attribute name="verbatim" use="optional" type="xs:boolean"/> + <xs:attribute name="force" use="optional" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="phpUnitType"> + <xs:annotation> + <xs:documentation>The main type specifying the document structure</xs:documentation> + </xs:annotation> + <xs:group ref="configGroup"/> + <xs:attributeGroup ref="configAttributeGroup"/> + </xs:complexType> + <xs:attributeGroup name="configAttributeGroup"> + <xs:attribute name="backupGlobals" type="xs:boolean" default="false"/> + <xs:attribute name="backupStaticProperties" type="xs:boolean" default="false"/> + <xs:attribute name="bootstrap" type="xs:anyURI"/> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="cacheResult" type="xs:boolean" default="true"/> + <xs:attribute name="cacheResultFile" type="xs:anyURI"/> + <xs:attribute name="colors" type="xs:boolean" default="false"/> + <xs:attribute name="columns" type="columnsType" default="80"/> + <xs:attribute name="controlGarbageCollector" type="xs:boolean" default="false"/> + <xs:attribute name="numberOfTestsBeforeGarbageCollection" type="xs:integer" default="100"/> + <xs:attribute name="requireCoverageMetadata" type="xs:boolean" default="false"/> + <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> + <xs:attribute name="failOnDeprecation" type="xs:boolean" default="false"/> + <xs:attribute name="failOnEmptyTestSuite" type="xs:boolean" default="false"/> + <xs:attribute name="failOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="failOnNotice" type="xs:boolean" default="false"/> + <xs:attribute name="failOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="failOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDeprecation" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnError" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnNotice" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/> + <xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutCoverageMetadata" type="xs:boolean" default="false"/> + <xs:attribute name="defaultTimeLimit" type="xs:integer" default="0"/> + <xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/> + <xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/> + <xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/> + <xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/> + <xs:attribute name="defaultTestSuite" type="xs:string" default=""/> + <xs:attribute name="testdox" type="xs:boolean" default="false"/> + <xs:attribute name="stderr" type="xs:boolean" default="false"/> + <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> + <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> + <xs:attribute name="extensionsDirectory" type="xs:anyURI"/> + <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> + <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> + <xs:attribute name="displayDetailsOnIncompleteTests" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnSkippedTests" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerDeprecations" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerErrors" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerNotices" type="xs:boolean" default="false"/> + <xs:attribute name="displayDetailsOnTestsThatTriggerWarnings" type="xs:boolean" default="false"/> + </xs:attributeGroup> + <xs:group name="configGroup"> + <xs:all> + <xs:element ref="testSuiteFacet" minOccurs="0"/> + <xs:element name="groups" type="groupsType" minOccurs="0"/> + <xs:element name="source" type="sourceType" minOccurs="0"/> + <xs:element name="coverage" type="coverageType" minOccurs="0"/> + <xs:element name="logging" type="loggingType" minOccurs="0"/> + <xs:element name="extensions" type="extensionsType" minOccurs="0"/> + <xs:element name="php" type="phpType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:element name="testSuiteFacet" abstract="true"/> + <xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/> + <xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/> + <xs:complexType name="testSuitesType"> + <xs:sequence> + <xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testSuiteType"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="testSuitePathGroup"/> + <xs:element name="exclude" type="xs:string"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> + <xs:group name="testSuitePathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="testSuiteDirectoryType"/> + <xs:element name="file" type="testSuiteFileType"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="testSuiteDirectoryType"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default="Test.php"/> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:complexType name="testSuiteFileType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:attributeGroup name="phpVersionGroup"> + <xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/> + <xs:attribute name="phpVersionOperator" type="xs:string" default=">="/> + </xs:attributeGroup> + <xs:group name="coverageReportGroup"> + <xs:all> + <xs:element name="clover" type="logToFileType" minOccurs="0"/> + <xs:element name="cobertura" type="logToFileType" minOccurs="0"/> + <xs:element name="crap4j" type="coverageReportCrap4JType" minOccurs="0" /> + <xs:element name="html" type="coverageReportHtmlType" minOccurs="0" /> + <xs:element name="php" type="logToFileType" minOccurs="0" /> + <xs:element name="text" type="coverageReportTextType" minOccurs="0" /> + <xs:element name="xml" type="logToDirectoryType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:group name="loggingGroup"> + <xs:all> + <xs:element name="junit" type="logToFileType" minOccurs="0" /> + <xs:element name="teamcity" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxHtml" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxText" type="logToFileType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:complexType name="logToFileType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="logToDirectoryType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="coverageReportCrap4JType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="threshold" type="xs:integer"/> + </xs:complexType> + <xs:complexType name="coverageReportHtmlType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + <xs:attribute name="lowUpperBound" type="xs:integer" default="50"/> + <xs:attribute name="highLowerBound" type="xs:integer" default="90"/> + <xs:attribute name="colorSuccessLow" type="xs:string" default="#dff0d8"/> + <xs:attribute name="colorSuccessMedium" type="xs:string" default="#c3e3b5"/> + <xs:attribute name="colorSuccessHigh" type="xs:string" default="#99cb84"/> + <xs:attribute name="colorWarning" type="xs:string" default="#fcf8e3"/> + <xs:attribute name="colorDanger" type="xs:string" default="#f2dede"/> + <xs:attribute name="customCssFile" type="xs:string"/> + </xs:complexType> + <xs:complexType name="coverageReportTextType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/> + </xs:complexType> +</xs:schema> diff --git a/vendor/phpunit/phpunit/schema/8.5.xsd b/vendor/phpunit/phpunit/schema/8.5.xsd index 5881bafe..75e22289 100644 --- a/vendor/phpunit/phpunit/schema/8.5.xsd +++ b/vendor/phpunit/phpunit/schema/8.5.xsd @@ -244,7 +244,7 @@ <xs:attribute name="cacheTokens" type="xs:boolean" default="false"/> <xs:attribute name="colors" type="xs:boolean" default="false"/> <xs:attribute name="columns" type="columnsType" default="80"/> - <xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="false"/> <xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/> <xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/> <xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/> @@ -309,8 +309,10 @@ </xs:complexType> <xs:complexType name="testSuiteType"> <xs:sequence> - <xs:group ref="pathGroup"/> - <xs:element name="exclude" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="pathGroup"/> + <xs:element name="exclude" type="xs:string"/> + </xs:choice> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> diff --git a/vendor/phpunit/phpunit/schema/9.0.xsd b/vendor/phpunit/phpunit/schema/9.0.xsd new file mode 100644 index 00000000..6db04c09 --- /dev/null +++ b/vendor/phpunit/phpunit/schema/9.0.xsd @@ -0,0 +1,315 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:annotation> + <xs:documentation source="https://phpunit.de/documentation.html"> + This Schema file defines the rules by which the XML configuration file of PHPUnit 9.0 may be structured. + </xs:documentation> + <xs:appinfo source="https://phpunit.de/documentation.html"/> + </xs:annotation> + <xs:element name="phpunit" type="phpUnitType"> + <xs:annotation> + <xs:documentation>Root Element</xs:documentation> + </xs:annotation> + </xs:element> + <xs:complexType name="filtersType"> + <xs:sequence> + <xs:element name="whitelist" type="whiteListType" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="filterType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded" minOccurs="0"> + <xs:group ref="pathGroup"/> + <xs:element name="exclude"> + <xs:complexType> + <xs:group ref="pathGroup"/> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="whiteListType"> + <xs:complexContent> + <xs:extension base="filterType"> + <xs:attribute name="addUncoveredFilesFromWhitelist" default="true" type="xs:boolean"/> + <xs:attribute name="processUncoveredFilesFromWhitelist" default="false" type="xs:boolean"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="groupsType"> + <xs:choice> + <xs:sequence> + <xs:element name="include" type="groupType"/> + <xs:element name="exclude" type="groupType" minOccurs="0"/> + </xs:sequence> + <xs:sequence> + <xs:element name="exclude" type="groupType"/> + </xs:sequence> + </xs:choice> + </xs:complexType> + <xs:complexType name="groupType"> + <xs:sequence> + <xs:element name="group" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="extensionsType"> + <xs:sequence> + <xs:element name="extension" type="objectType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="listenersType"> + <xs:sequence> + <xs:element name="listener" type="objectType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="objectType"> + <xs:sequence> + <xs:element name="arguments" minOccurs="0"> + <xs:complexType> + <xs:group ref="argumentsGroup"/> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="class" type="xs:string" use="required"/> + <xs:attribute name="file" type="xs:anyURI"/> + </xs:complexType> + <xs:complexType name="arrayType"> + <xs:sequence> + <xs:element name="element" type="argumentType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="argumentType"> + <xs:group ref="argumentChoice"/> + <xs:attribute name="key" use="required"/> + </xs:complexType> + <xs:group name="argumentsGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="array" type="arrayType" /> + <xs:element name="integer" type="xs:integer" /> + <xs:element name="string" type="xs:string" /> + <xs:element name="double" type="xs:double" /> + <xs:element name="null" /> + <xs:element name="object" type="objectType" /> + <xs:element name="file" type="xs:anyURI" /> + <xs:element name="directory" type="xs:anyURI" /> + <xs:element name="boolean" type="xs:boolean" /> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:group name="argumentChoice"> + <xs:choice> + <xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="null" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="boolean" type="xs:boolean" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:group> + <xs:simpleType name="columnsType"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:integer"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="max"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:complexType name="loggersType"> + <xs:sequence> + <xs:element name="log" type="loggerType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="loggerType"> + <xs:attribute name="type"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="coverage-html"/> + <xs:enumeration value="coverage-text"/> + <xs:enumeration value="coverage-clover"/> + <xs:enumeration value="coverage-crap4j"/> + <xs:enumeration value="coverage-xml"/> + <xs:enumeration value="coverage-php"/> + <xs:enumeration value="plain"/> + <xs:enumeration value="teamcity"/> + <xs:enumeration value="junit"/> + <xs:enumeration value="testdox-html"/> + <xs:enumeration value="testdox-text"/> + <xs:enumeration value="testdox-xml"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="target" type="xs:anyURI"/> + <xs:attribute name="lowUpperBound" type="xs:nonNegativeInteger" default="35"/> + <xs:attribute name="highLowerBound" type="xs:nonNegativeInteger" default="70"/> + <xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/> + <xs:attribute name="threshold" type="xs:nonNegativeInteger" default="30"/> + </xs:complexType> + <xs:group name="pathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="directoryFilterType"/> + <xs:element name="file" type="fileFilterType"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="directoryFilterType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default="Test.php"/> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:simpleType name="executionOrderType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="default"/> + <xs:enumeration value="defects"/> + <xs:enumeration value="depends"/> + <xs:enumeration value="depends,defects"/> + <xs:enumeration value="depends,duration"/> + <xs:enumeration value="depends,random"/> + <xs:enumeration value="depends,reverse"/> + <xs:enumeration value="depends,size"/> + <xs:enumeration value="duration"/> + <xs:enumeration value="no-depends"/> + <xs:enumeration value="no-depends,defects"/> + <xs:enumeration value="no-depends,duration"/> + <xs:enumeration value="no-depends,random"/> + <xs:enumeration value="no-depends,reverse"/> + <xs:enumeration value="no-depends,size"/> + <xs:enumeration value="random"/> + <xs:enumeration value="reverse"/> + <xs:enumeration value="size"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="fileFilterType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:attributeGroup name="phpVersionGroup"> + <xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/> + <xs:attribute name="phpVersionOperator" type="xs:string" default=">="/> + </xs:attributeGroup> + <xs:complexType name="phpType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="namedValueType"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="value" use="required" type="xs:anySimpleType"/> + <xs:attribute name="verbatim" use="optional" type="xs:boolean"/> + <xs:attribute name="force" use="optional" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="phpUnitType"> + <xs:annotation> + <xs:documentation>The main type specifying the document structure</xs:documentation> + </xs:annotation> + <xs:group ref="configGroup"/> + <xs:attributeGroup ref="configAttributeGroup"/> + </xs:complexType> + <xs:attributeGroup name="configAttributeGroup"> + <xs:attribute name="backupGlobals" type="xs:boolean" default="false"/> + <xs:attribute name="backupStaticAttributes" type="xs:boolean" default="false"/> + <xs:attribute name="bootstrap" type="xs:anyURI"/> + <xs:attribute name="cacheResult" type="xs:boolean" default="true"/> + <xs:attribute name="cacheResultFile" type="xs:anyURI"/> + <xs:attribute name="cacheTokens" type="xs:boolean" default="false"/> + <xs:attribute name="colors" type="xs:boolean" default="false"/> + <xs:attribute name="columns" type="columnsType" default="80"/> + <xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> + <xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/> + <xs:attribute name="printerClass" type="xs:string" default="PHPUnit\TextUI\ResultPrinter"/> + <xs:attribute name="printerFile" type="xs:anyURI"/> + <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnError" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="failOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutResourceUsageDuringSmallTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/> + <xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutCoversAnnotation" type="xs:boolean" default="false"/> + <xs:attribute name="defaultTimeLimit" type="xs:integer" default="0"/> + <xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreDeprecatedCodeUnitsFromCodeCoverage" type="xs:boolean" default="false"/> + <xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/> + <xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/> + <xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/> + <xs:attribute name="testSuiteLoaderClass" type="xs:string" default="PHPUnit\Runner\StandardTestSuiteLoader"/> + <xs:attribute name="testSuiteLoaderFile" type="xs:anyURI"/> + <xs:attribute name="defaultTestSuite" type="xs:string" default=""/> + <xs:attribute name="verbose" type="xs:boolean" default="false"/> + <xs:attribute name="testdox" type="xs:boolean" default="false"/> + <xs:attribute name="stderr" type="xs:boolean" default="false"/> + <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> + <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> + <xs:attribute name="extensionsDirectory" type="xs:string"/> + <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> + <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> + <xs:attribute name="noInteraction" type="xs:boolean" default="false"/> + </xs:attributeGroup> + <xs:group name="configGroup"> + <xs:all> + <xs:element ref="testSuiteFacet" minOccurs="0"/> + <xs:element name="groups" type="groupsType" minOccurs="0"/> + <xs:element name="testdoxGroups" type="groupsType" minOccurs="0"/> + <xs:element name="filter" type="filtersType" minOccurs="0"/> + <xs:element name="logging" type="loggersType" minOccurs="0"/> + <xs:element name="extensions" type="extensionsType" minOccurs="0"/> + <xs:element name="listeners" type="listenersType" minOccurs="0"/> + <xs:element name="php" type="phpType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:element name="testSuiteFacet" abstract="true"/> + <xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/> + <xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/> + <xs:complexType name="testSuitesType"> + <xs:sequence> + <xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testSuiteType"> + <xs:sequence> + <xs:group ref="pathGroup"/> + <xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> +</xs:schema> diff --git a/vendor/phpunit/phpunit/schema/9.1.xsd b/vendor/phpunit/phpunit/schema/9.1.xsd new file mode 100644 index 00000000..b10d30b4 --- /dev/null +++ b/vendor/phpunit/phpunit/schema/9.1.xsd @@ -0,0 +1,317 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:annotation> + <xs:documentation source="https://phpunit.de/documentation.html"> + This Schema file defines the rules by which the XML configuration file of PHPUnit 9.0 may be structured. + </xs:documentation> + <xs:appinfo source="https://phpunit.de/documentation.html"/> + </xs:annotation> + <xs:element name="phpunit" type="phpUnitType"> + <xs:annotation> + <xs:documentation>Root Element</xs:documentation> + </xs:annotation> + </xs:element> + <xs:complexType name="filtersType"> + <xs:sequence> + <xs:element name="whitelist" type="whiteListType" minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="filterType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded" minOccurs="0"> + <xs:group ref="pathGroup"/> + <xs:element name="exclude"> + <xs:complexType> + <xs:group ref="pathGroup"/> + </xs:complexType> + </xs:element> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="whiteListType"> + <xs:complexContent> + <xs:extension base="filterType"> + <xs:attribute name="addUncoveredFilesFromWhitelist" default="true" type="xs:boolean"/> + <xs:attribute name="processUncoveredFilesFromWhitelist" default="false" type="xs:boolean"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="groupsType"> + <xs:choice> + <xs:sequence> + <xs:element name="include" type="groupType"/> + <xs:element name="exclude" type="groupType" minOccurs="0"/> + </xs:sequence> + <xs:sequence> + <xs:element name="exclude" type="groupType"/> + </xs:sequence> + </xs:choice> + </xs:complexType> + <xs:complexType name="groupType"> + <xs:sequence> + <xs:element name="group" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="extensionsType"> + <xs:sequence> + <xs:element name="extension" type="objectType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="listenersType"> + <xs:sequence> + <xs:element name="listener" type="objectType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="objectType"> + <xs:sequence> + <xs:element name="arguments" minOccurs="0"> + <xs:complexType> + <xs:group ref="argumentsGroup"/> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="class" type="xs:string" use="required"/> + <xs:attribute name="file" type="xs:anyURI"/> + </xs:complexType> + <xs:complexType name="arrayType"> + <xs:sequence> + <xs:element name="element" type="argumentType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="argumentType"> + <xs:group ref="argumentChoice"/> + <xs:attribute name="key" use="required"/> + </xs:complexType> + <xs:group name="argumentsGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="array" type="arrayType" /> + <xs:element name="integer" type="xs:integer" /> + <xs:element name="string" type="xs:string" /> + <xs:element name="double" type="xs:double" /> + <xs:element name="null" /> + <xs:element name="object" type="objectType" /> + <xs:element name="file" type="xs:anyURI" /> + <xs:element name="directory" type="xs:anyURI" /> + <xs:element name="boolean" type="xs:boolean" /> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:group name="argumentChoice"> + <xs:choice> + <xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="null" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="boolean" type="xs:boolean" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:group> + <xs:simpleType name="columnsType"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:integer"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="max"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:complexType name="loggersType"> + <xs:sequence> + <xs:element name="log" type="loggerType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="loggerType"> + <xs:attribute name="type"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="coverage-html"/> + <xs:enumeration value="coverage-text"/> + <xs:enumeration value="coverage-clover"/> + <xs:enumeration value="coverage-crap4j"/> + <xs:enumeration value="coverage-xml"/> + <xs:enumeration value="coverage-php"/> + <xs:enumeration value="plain"/> + <xs:enumeration value="teamcity"/> + <xs:enumeration value="junit"/> + <xs:enumeration value="testdox-html"/> + <xs:enumeration value="testdox-text"/> + <xs:enumeration value="testdox-xml"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="target" type="xs:anyURI"/> + <xs:attribute name="lowUpperBound" type="xs:nonNegativeInteger" default="35"/> + <xs:attribute name="highLowerBound" type="xs:nonNegativeInteger" default="70"/> + <xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/> + <xs:attribute name="threshold" type="xs:nonNegativeInteger" default="30"/> + </xs:complexType> + <xs:group name="pathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="directoryFilterType"/> + <xs:element name="file" type="fileFilterType"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="directoryFilterType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default="Test.php"/> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:simpleType name="executionOrderType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="default"/> + <xs:enumeration value="defects"/> + <xs:enumeration value="depends"/> + <xs:enumeration value="depends,defects"/> + <xs:enumeration value="depends,duration"/> + <xs:enumeration value="depends,random"/> + <xs:enumeration value="depends,reverse"/> + <xs:enumeration value="depends,size"/> + <xs:enumeration value="duration"/> + <xs:enumeration value="no-depends"/> + <xs:enumeration value="no-depends,defects"/> + <xs:enumeration value="no-depends,duration"/> + <xs:enumeration value="no-depends,random"/> + <xs:enumeration value="no-depends,reverse"/> + <xs:enumeration value="no-depends,size"/> + <xs:enumeration value="random"/> + <xs:enumeration value="reverse"/> + <xs:enumeration value="size"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="fileFilterType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:attributeGroup name="phpVersionGroup"> + <xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/> + <xs:attribute name="phpVersionOperator" type="xs:string" default=">="/> + </xs:attributeGroup> + <xs:complexType name="phpType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="namedValueType"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="value" use="required" type="xs:anySimpleType"/> + <xs:attribute name="verbatim" use="optional" type="xs:boolean"/> + <xs:attribute name="force" use="optional" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="phpUnitType"> + <xs:annotation> + <xs:documentation>The main type specifying the document structure</xs:documentation> + </xs:annotation> + <xs:group ref="configGroup"/> + <xs:attributeGroup ref="configAttributeGroup"/> + </xs:complexType> + <xs:attributeGroup name="configAttributeGroup"> + <xs:attribute name="backupGlobals" type="xs:boolean" default="false"/> + <xs:attribute name="backupStaticAttributes" type="xs:boolean" default="false"/> + <xs:attribute name="bootstrap" type="xs:anyURI"/> + <xs:attribute name="cacheResult" type="xs:boolean" default="true"/> + <xs:attribute name="cacheResultFile" type="xs:anyURI"/> + <xs:attribute name="cacheTokens" type="xs:boolean" default="false"/> + <xs:attribute name="colors" type="xs:boolean" default="false"/> + <xs:attribute name="columns" type="columnsType" default="80"/> + <xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> + <xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/> + <xs:attribute name="printerClass" type="xs:string" default="PHPUnit\TextUI\ResultPrinter"/> + <xs:attribute name="printerFile" type="xs:anyURI"/> + <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnError" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="failOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="failOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutResourceUsageDuringSmallTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/> + <xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutCoversAnnotation" type="xs:boolean" default="false"/> + <xs:attribute name="defaultTimeLimit" type="xs:integer" default="0"/> + <xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreDeprecatedCodeUnitsFromCodeCoverage" type="xs:boolean" default="false"/> + <xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/> + <xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/> + <xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/> + <xs:attribute name="testSuiteLoaderClass" type="xs:string" default="PHPUnit\Runner\StandardTestSuiteLoader"/> + <xs:attribute name="testSuiteLoaderFile" type="xs:anyURI"/> + <xs:attribute name="defaultTestSuite" type="xs:string" default=""/> + <xs:attribute name="verbose" type="xs:boolean" default="false"/> + <xs:attribute name="testdox" type="xs:boolean" default="false"/> + <xs:attribute name="stderr" type="xs:boolean" default="false"/> + <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> + <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> + <xs:attribute name="extensionsDirectory" type="xs:string"/> + <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> + <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> + <xs:attribute name="noInteraction" type="xs:boolean" default="false"/> + </xs:attributeGroup> + <xs:group name="configGroup"> + <xs:all> + <xs:element ref="testSuiteFacet" minOccurs="0"/> + <xs:element name="groups" type="groupsType" minOccurs="0"/> + <xs:element name="testdoxGroups" type="groupsType" minOccurs="0"/> + <xs:element name="filter" type="filtersType" minOccurs="0"/> + <xs:element name="logging" type="loggersType" minOccurs="0"/> + <xs:element name="extensions" type="extensionsType" minOccurs="0"/> + <xs:element name="listeners" type="listenersType" minOccurs="0"/> + <xs:element name="php" type="phpType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:element name="testSuiteFacet" abstract="true"/> + <xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/> + <xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/> + <xs:complexType name="testSuitesType"> + <xs:sequence> + <xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testSuiteType"> + <xs:sequence> + <xs:group ref="pathGroup"/> + <xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> +</xs:schema> diff --git a/vendor/phpunit/phpunit/schema/9.2.xsd b/vendor/phpunit/phpunit/schema/9.2.xsd index 883f21bc..d770e8b0 100644 --- a/vendor/phpunit/phpunit/schema/9.2.xsd +++ b/vendor/phpunit/phpunit/schema/9.2.xsd @@ -163,7 +163,7 @@ </xs:group> <xs:complexType name="directoryFilterType"> <xs:simpleContent> - <xs:extension base="xs:string"> + <xs:extension base="xs:anyURI"> <xs:attribute type="xs:string" name="prefix" default=""/> <xs:attribute type="xs:string" name="suffix" default="Test.php"/> <xs:attributeGroup ref="phpVersionGroup"/> @@ -248,7 +248,7 @@ <xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/> <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> <xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/> - <xs:attribute name="printerClass" type="xs:string" default="PHPUnit\TextUI\ResultPrinter"/> + <xs:attribute name="printerClass" type="xs:string" default="PHPUnit\TextUI\DefaultResultPrinter"/> <xs:attribute name="printerFile" type="xs:anyURI"/> <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> @@ -282,7 +282,7 @@ <xs:attribute name="stderr" type="xs:boolean" default="false"/> <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> - <xs:attribute name="extensionsDirectory" type="xs:anyURI"/> + <xs:attribute name="extensionsDirectory" type="xs:string"/> <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> <xs:attribute name="noInteraction" type="xs:boolean" default="false"/> @@ -310,7 +310,7 @@ <xs:complexType name="testSuiteType"> <xs:sequence> <xs:group ref="pathGroup"/> - <xs:element name="exclude" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> diff --git a/vendor/phpunit/phpunit/schema/9.3.xsd b/vendor/phpunit/phpunit/schema/9.3.xsd new file mode 100644 index 00000000..638f663a --- /dev/null +++ b/vendor/phpunit/phpunit/schema/9.3.xsd @@ -0,0 +1,327 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:annotation> + <xs:documentation source="https://phpunit.de/documentation.html"> + This Schema file defines the rules by which the XML configuration file of PHPUnit 9.3 may be structured. + </xs:documentation> + <xs:appinfo source="https://phpunit.de/documentation.html"/> + </xs:annotation> + <xs:element name="phpunit" type="phpUnitType"> + <xs:annotation> + <xs:documentation>Root Element</xs:documentation> + </xs:annotation> + </xs:element> + <xs:complexType name="coverageType"> + <xs:all> + <xs:element name="include" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="pathGroup"/> + </xs:complexType> + </xs:element> + <xs:element name="exclude" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="pathGroup"/> + </xs:complexType> + </xs:element> + <xs:element name="report" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="coverageReportGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="pathCoverage" type="xs:boolean" default="false"/> + <xs:attribute name="includeUncoveredFiles" type="xs:boolean" default="true"/> + <xs:attribute name="processUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreDeprecatedCodeUnits" type="xs:boolean" default="false"/> + <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:complexType name="loggingType"> + <xs:group ref="loggingGroup"/> + </xs:complexType> + <xs:complexType name="groupsType"> + <xs:choice> + <xs:sequence> + <xs:element name="include" type="groupType"/> + <xs:element name="exclude" type="groupType" minOccurs="0"/> + </xs:sequence> + <xs:sequence> + <xs:element name="exclude" type="groupType"/> + </xs:sequence> + </xs:choice> + </xs:complexType> + <xs:complexType name="groupType"> + <xs:sequence> + <xs:element name="group" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="extensionsType"> + <xs:sequence> + <xs:element name="extension" type="objectType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="listenersType"> + <xs:sequence> + <xs:element name="listener" type="objectType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="objectType"> + <xs:sequence> + <xs:element name="arguments" minOccurs="0"> + <xs:complexType> + <xs:group ref="argumentsGroup"/> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="class" type="xs:string" use="required"/> + <xs:attribute name="file" type="xs:anyURI"/> + </xs:complexType> + <xs:complexType name="arrayType"> + <xs:sequence> + <xs:element name="element" type="argumentType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="argumentType"> + <xs:group ref="argumentChoice"/> + <xs:attribute name="key" use="required"/> + </xs:complexType> + <xs:group name="argumentsGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="array" type="arrayType" /> + <xs:element name="integer" type="xs:integer" /> + <xs:element name="string" type="xs:string" /> + <xs:element name="double" type="xs:double" /> + <xs:element name="null" /> + <xs:element name="object" type="objectType" /> + <xs:element name="file" type="xs:anyURI" /> + <xs:element name="directory" type="xs:anyURI" /> + <xs:element name="boolean" type="xs:boolean" /> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:group name="argumentChoice"> + <xs:choice> + <xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="null" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="boolean" type="xs:boolean" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:group> + <xs:simpleType name="columnsType"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:integer"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="max"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:group name="pathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="directoryFilterType"/> + <xs:element name="file" type="fileFilterType"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="directoryFilterType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default="Test.php"/> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:simpleType name="executionOrderType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="default"/> + <xs:enumeration value="defects"/> + <xs:enumeration value="depends"/> + <xs:enumeration value="depends,defects"/> + <xs:enumeration value="depends,duration"/> + <xs:enumeration value="depends,random"/> + <xs:enumeration value="depends,reverse"/> + <xs:enumeration value="depends,size"/> + <xs:enumeration value="duration"/> + <xs:enumeration value="no-depends"/> + <xs:enumeration value="no-depends,defects"/> + <xs:enumeration value="no-depends,duration"/> + <xs:enumeration value="no-depends,random"/> + <xs:enumeration value="no-depends,reverse"/> + <xs:enumeration value="no-depends,size"/> + <xs:enumeration value="random"/> + <xs:enumeration value="reverse"/> + <xs:enumeration value="size"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="fileFilterType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:attributeGroup name="phpVersionGroup"> + <xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/> + <xs:attribute name="phpVersionOperator" type="xs:string" default=">="/> + </xs:attributeGroup> + <xs:complexType name="phpType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="namedValueType"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="value" use="required" type="xs:anySimpleType"/> + <xs:attribute name="verbatim" use="optional" type="xs:boolean"/> + <xs:attribute name="force" use="optional" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="phpUnitType"> + <xs:annotation> + <xs:documentation>The main type specifying the document structure</xs:documentation> + </xs:annotation> + <xs:group ref="configGroup"/> + <xs:attributeGroup ref="configAttributeGroup"/> + </xs:complexType> + <xs:attributeGroup name="configAttributeGroup"> + <xs:attribute name="backupGlobals" type="xs:boolean" default="false"/> + <xs:attribute name="backupStaticAttributes" type="xs:boolean" default="false"/> + <xs:attribute name="bootstrap" type="xs:anyURI"/> + <xs:attribute name="cacheResult" type="xs:boolean" default="true"/> + <xs:attribute name="cacheResultFile" type="xs:anyURI"/> + <xs:attribute name="colors" type="xs:boolean" default="false"/> + <xs:attribute name="columns" type="columnsType" default="80"/> + <xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/> + <xs:attribute name="printerClass" type="xs:string" default="PHPUnit\TextUI\DefaultResultPrinter"/> + <xs:attribute name="printerFile" type="xs:anyURI"/> + <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnError" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnEmptyTestSuite" type="xs:boolean" default="false"/> + <xs:attribute name="failOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="failOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="failOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutResourceUsageDuringSmallTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/> + <xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutCoversAnnotation" type="xs:boolean" default="false"/> + <xs:attribute name="defaultTimeLimit" type="xs:integer" default="0"/> + <xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/> + <xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/> + <xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/> + <xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/> + <xs:attribute name="testSuiteLoaderClass" type="xs:string" default="PHPUnit\Runner\StandardTestSuiteLoader"/> + <xs:attribute name="testSuiteLoaderFile" type="xs:anyURI"/> + <xs:attribute name="defaultTestSuite" type="xs:string" default=""/> + <xs:attribute name="verbose" type="xs:boolean" default="false"/> + <xs:attribute name="testdox" type="xs:boolean" default="false"/> + <xs:attribute name="stderr" type="xs:boolean" default="false"/> + <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> + <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> + <xs:attribute name="extensionsDirectory" type="xs:string"/> + <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> + <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> + <xs:attribute name="noInteraction" type="xs:boolean" default="false"/> + </xs:attributeGroup> + <xs:group name="configGroup"> + <xs:all> + <xs:element ref="testSuiteFacet" minOccurs="0"/> + <xs:element name="groups" type="groupsType" minOccurs="0"/> + <xs:element name="testdoxGroups" type="groupsType" minOccurs="0"/> + <xs:element name="coverage" type="coverageType" minOccurs="0"/> + <xs:element name="logging" type="loggingType" minOccurs="0"/> + <xs:element name="extensions" type="extensionsType" minOccurs="0"/> + <xs:element name="listeners" type="listenersType" minOccurs="0"/> + <xs:element name="php" type="phpType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:element name="testSuiteFacet" abstract="true"/> + <xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/> + <xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/> + <xs:complexType name="testSuitesType"> + <xs:sequence> + <xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testSuiteType"> + <xs:sequence> + <xs:group ref="pathGroup"/> + <xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> + <xs:group name="coverageReportGroup"> + <xs:all> + <xs:element name="clover" type="logToFileType" minOccurs="0"/> + <xs:element name="crap4j" type="coverageReportCrap4JType" minOccurs="0" /> + <xs:element name="html" type="coverageReportHtmlType" minOccurs="0" /> + <xs:element name="php" type="logToFileType" minOccurs="0" /> + <xs:element name="text" type="coverageReportTextType" minOccurs="0" /> + <xs:element name="xml" type="logToDirectoryType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:group name="loggingGroup"> + <xs:all> + <xs:element name="junit" type="logToFileType" minOccurs="0" /> + <xs:element name="teamcity" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxHtml" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxText" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxXml" type="logToFileType" minOccurs="0" /> + <xs:element name="text" type="logToFileType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:complexType name="logToFileType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="logToDirectoryType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="coverageReportCrap4JType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="threshold" type="xs:integer"/> + </xs:complexType> + <xs:complexType name="coverageReportHtmlType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + <xs:attribute name="lowUpperBound" type="xs:integer" default="50"/> + <xs:attribute name="highLowerBound" type="xs:integer" default="90"/> + </xs:complexType> + <xs:complexType name="coverageReportTextType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/> + </xs:complexType> +</xs:schema> diff --git a/vendor/phpunit/phpunit/schema/9.4.xsd b/vendor/phpunit/phpunit/schema/9.4.xsd new file mode 100644 index 00000000..75a91e83 --- /dev/null +++ b/vendor/phpunit/phpunit/schema/9.4.xsd @@ -0,0 +1,328 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:annotation> + <xs:documentation source="https://phpunit.de/documentation.html"> + This Schema file defines the rules by which the XML configuration file of PHPUnit 9.4 may be structured. + </xs:documentation> + <xs:appinfo source="https://phpunit.de/documentation.html"/> + </xs:annotation> + <xs:element name="phpunit" type="phpUnitType"> + <xs:annotation> + <xs:documentation>Root Element</xs:documentation> + </xs:annotation> + </xs:element> + <xs:complexType name="coverageType"> + <xs:all> + <xs:element name="include" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="pathGroup"/> + </xs:complexType> + </xs:element> + <xs:element name="exclude" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="pathGroup"/> + </xs:complexType> + </xs:element> + <xs:element name="report" minOccurs="0" maxOccurs="1"> + <xs:complexType> + <xs:group ref="coverageReportGroup"/> + </xs:complexType> + </xs:element> + </xs:all> + <xs:attribute name="cacheDirectory" type="xs:anyURI"/> + <xs:attribute name="pathCoverage" type="xs:boolean" default="false"/> + <xs:attribute name="includeUncoveredFiles" type="xs:boolean" default="true"/> + <xs:attribute name="processUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="ignoreDeprecatedCodeUnits" type="xs:boolean" default="false"/> + <xs:attribute name="disableCodeCoverageIgnore" type="xs:boolean" default="false"/> + </xs:complexType> + <xs:complexType name="loggingType"> + <xs:group ref="loggingGroup"/> + </xs:complexType> + <xs:complexType name="groupsType"> + <xs:choice> + <xs:sequence> + <xs:element name="include" type="groupType"/> + <xs:element name="exclude" type="groupType" minOccurs="0"/> + </xs:sequence> + <xs:sequence> + <xs:element name="exclude" type="groupType"/> + </xs:sequence> + </xs:choice> + </xs:complexType> + <xs:complexType name="groupType"> + <xs:sequence> + <xs:element name="group" type="xs:string" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="extensionsType"> + <xs:sequence> + <xs:element name="extension" type="objectType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="listenersType"> + <xs:sequence> + <xs:element name="listener" type="objectType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="objectType"> + <xs:sequence> + <xs:element name="arguments" minOccurs="0"> + <xs:complexType> + <xs:group ref="argumentsGroup"/> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="class" type="xs:string" use="required"/> + <xs:attribute name="file" type="xs:anyURI"/> + </xs:complexType> + <xs:complexType name="arrayType"> + <xs:sequence> + <xs:element name="element" type="argumentType" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="argumentType"> + <xs:group ref="argumentChoice"/> + <xs:attribute name="key" use="required"/> + </xs:complexType> + <xs:group name="argumentsGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="array" type="arrayType" /> + <xs:element name="integer" type="xs:integer" /> + <xs:element name="string" type="xs:string" /> + <xs:element name="double" type="xs:double" /> + <xs:element name="null" /> + <xs:element name="object" type="objectType" /> + <xs:element name="file" type="xs:anyURI" /> + <xs:element name="directory" type="xs:anyURI" /> + <xs:element name="boolean" type="xs:boolean" /> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:group name="argumentChoice"> + <xs:choice> + <xs:element name="array" type="arrayType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="integer" type="xs:integer" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="string" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="double" type="xs:double" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="null" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="object" type="objectType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="file" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="directory" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="boolean" type="xs:boolean" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:group> + <xs:simpleType name="columnsType"> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:integer"/> + </xs:simpleType> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value="max"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + <xs:group name="pathGroup"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="directory" type="directoryFilterType"/> + <xs:element name="file" type="fileFilterType"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:complexType name="directoryFilterType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attribute type="xs:string" name="prefix" default=""/> + <xs:attribute type="xs:string" name="suffix" default="Test.php"/> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:simpleType name="executionOrderType"> + <xs:restriction base="xs:string"> + <xs:enumeration value="default"/> + <xs:enumeration value="defects"/> + <xs:enumeration value="depends"/> + <xs:enumeration value="depends,defects"/> + <xs:enumeration value="depends,duration"/> + <xs:enumeration value="depends,random"/> + <xs:enumeration value="depends,reverse"/> + <xs:enumeration value="depends,size"/> + <xs:enumeration value="duration"/> + <xs:enumeration value="no-depends"/> + <xs:enumeration value="no-depends,defects"/> + <xs:enumeration value="no-depends,duration"/> + <xs:enumeration value="no-depends,random"/> + <xs:enumeration value="no-depends,reverse"/> + <xs:enumeration value="no-depends,size"/> + <xs:enumeration value="random"/> + <xs:enumeration value="reverse"/> + <xs:enumeration value="size"/> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="fileFilterType"> + <xs:simpleContent> + <xs:extension base="xs:anyURI"> + <xs:attributeGroup ref="phpVersionGroup"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + <xs:attributeGroup name="phpVersionGroup"> + <xs:attribute name="phpVersion" type="xs:string" default="5.3.0"/> + <xs:attribute name="phpVersionOperator" type="xs:string" default=">="/> + </xs:attributeGroup> + <xs:complexType name="phpType"> + <xs:sequence> + <xs:choice maxOccurs="unbounded"> + <xs:element name="includePath" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="ini" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="const" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="var" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="env" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="post" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="get" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="cookie" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="server" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="files" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + <xs:element name="request" type="namedValueType" minOccurs="0" maxOccurs="unbounded"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + <xs:complexType name="namedValueType"> + <xs:attribute name="name" use="required" type="xs:string"/> + <xs:attribute name="value" use="required" type="xs:anySimpleType"/> + <xs:attribute name="verbatim" use="optional" type="xs:boolean"/> + <xs:attribute name="force" use="optional" type="xs:boolean"/> + </xs:complexType> + <xs:complexType name="phpUnitType"> + <xs:annotation> + <xs:documentation>The main type specifying the document structure</xs:documentation> + </xs:annotation> + <xs:group ref="configGroup"/> + <xs:attributeGroup ref="configAttributeGroup"/> + </xs:complexType> + <xs:attributeGroup name="configAttributeGroup"> + <xs:attribute name="backupGlobals" type="xs:boolean" default="false"/> + <xs:attribute name="backupStaticAttributes" type="xs:boolean" default="false"/> + <xs:attribute name="bootstrap" type="xs:anyURI"/> + <xs:attribute name="cacheResult" type="xs:boolean" default="true"/> + <xs:attribute name="cacheResultFile" type="xs:anyURI"/> + <xs:attribute name="colors" type="xs:boolean" default="false"/> + <xs:attribute name="columns" type="columnsType" default="80"/> + <xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="forceCoversAnnotation" type="xs:boolean" default="false"/> + <xs:attribute name="printerClass" type="xs:string" default="PHPUnit\TextUI\DefaultResultPrinter"/> + <xs:attribute name="printerFile" type="xs:anyURI"/> + <xs:attribute name="processIsolation" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnDefect" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnError" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnFailure" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="stopOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnEmptyTestSuite" type="xs:boolean" default="false"/> + <xs:attribute name="failOnIncomplete" type="xs:boolean" default="false"/> + <xs:attribute name="failOnRisky" type="xs:boolean" default="false"/> + <xs:attribute name="failOnSkipped" type="xs:boolean" default="false"/> + <xs:attribute name="failOnWarning" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutChangesToGlobalState" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutOutputDuringTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutResourceUsageDuringSmallTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutTestsThatDoNotTestAnything" type="xs:boolean" default="true"/> + <xs:attribute name="beStrictAboutTodoAnnotatedTests" type="xs:boolean" default="false"/> + <xs:attribute name="beStrictAboutCoversAnnotation" type="xs:boolean" default="false"/> + <xs:attribute name="defaultTimeLimit" type="xs:integer" default="0"/> + <xs:attribute name="enforceTimeLimit" type="xs:boolean" default="false"/> + <xs:attribute name="timeoutForSmallTests" type="xs:integer" default="1"/> + <xs:attribute name="timeoutForMediumTests" type="xs:integer" default="10"/> + <xs:attribute name="timeoutForLargeTests" type="xs:integer" default="60"/> + <xs:attribute name="testSuiteLoaderClass" type="xs:string" default="PHPUnit\Runner\StandardTestSuiteLoader"/> + <xs:attribute name="testSuiteLoaderFile" type="xs:anyURI"/> + <xs:attribute name="defaultTestSuite" type="xs:string" default=""/> + <xs:attribute name="verbose" type="xs:boolean" default="false"/> + <xs:attribute name="testdox" type="xs:boolean" default="false"/> + <xs:attribute name="stderr" type="xs:boolean" default="false"/> + <xs:attribute name="reverseDefectList" type="xs:boolean" default="false"/> + <xs:attribute name="registerMockObjectsFromTestArgumentsRecursively" type="xs:boolean" default="false"/> + <xs:attribute name="extensionsDirectory" type="xs:string"/> + <xs:attribute name="executionOrder" type="executionOrderType" default="default"/> + <xs:attribute name="resolveDependencies" type="xs:boolean" default="true"/> + <xs:attribute name="noInteraction" type="xs:boolean" default="false"/> + </xs:attributeGroup> + <xs:group name="configGroup"> + <xs:all> + <xs:element ref="testSuiteFacet" minOccurs="0"/> + <xs:element name="groups" type="groupsType" minOccurs="0"/> + <xs:element name="testdoxGroups" type="groupsType" minOccurs="0"/> + <xs:element name="coverage" type="coverageType" minOccurs="0"/> + <xs:element name="logging" type="loggingType" minOccurs="0"/> + <xs:element name="extensions" type="extensionsType" minOccurs="0"/> + <xs:element name="listeners" type="listenersType" minOccurs="0"/> + <xs:element name="php" type="phpType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:element name="testSuiteFacet" abstract="true"/> + <xs:element name="testsuite" type="testSuiteType" substitutionGroup="testSuiteFacet"/> + <xs:element name="testsuites" type="testSuitesType" substitutionGroup="testSuiteFacet"/> + <xs:complexType name="testSuitesType"> + <xs:sequence> + <xs:element name="testsuite" type="testSuiteType" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testSuiteType"> + <xs:sequence> + <xs:group ref="pathGroup"/> + <xs:element name="exclude" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:string" use="required"/> + </xs:complexType> + <xs:group name="coverageReportGroup"> + <xs:all> + <xs:element name="clover" type="logToFileType" minOccurs="0"/> + <xs:element name="cobertura" type="logToFileType" minOccurs="0"/> + <xs:element name="crap4j" type="coverageReportCrap4JType" minOccurs="0" /> + <xs:element name="html" type="coverageReportHtmlType" minOccurs="0" /> + <xs:element name="php" type="logToFileType" minOccurs="0" /> + <xs:element name="text" type="coverageReportTextType" minOccurs="0" /> + <xs:element name="xml" type="logToDirectoryType" minOccurs="0" /> + </xs:all> + </xs:group> + <xs:group name="loggingGroup"> + <xs:all> + <xs:element name="junit" type="logToFileType" minOccurs="0" /> + <xs:element name="teamcity" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxHtml" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxText" type="logToFileType" minOccurs="0" /> + <xs:element name="testdoxXml" type="logToFileType" minOccurs="0" /> + <xs:element name="text" type="logToFileType" minOccurs="0"/> + </xs:all> + </xs:group> + <xs:complexType name="logToFileType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="logToDirectoryType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + </xs:complexType> + <xs:complexType name="coverageReportCrap4JType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="threshold" type="xs:integer"/> + </xs:complexType> + <xs:complexType name="coverageReportHtmlType"> + <xs:attribute name="outputDirectory" type="xs:anyURI" use="required"/> + <xs:attribute name="lowUpperBound" type="xs:integer" default="50"/> + <xs:attribute name="highLowerBound" type="xs:integer" default="90"/> + </xs:complexType> + <xs:complexType name="coverageReportTextType"> + <xs:attribute name="outputFile" type="xs:anyURI" use="required"/> + <xs:attribute name="showUncoveredFiles" type="xs:boolean" default="false"/> + <xs:attribute name="showOnlySummary" type="xs:boolean" default="false"/> + </xs:complexType> +</xs:schema> diff --git a/vendor/phpunit/phpunit/schema/9.5.xsd b/vendor/phpunit/phpunit/schema/9.5.xsd index a25d683a..eabefac3 100644 --- a/vendor/phpunit/phpunit/schema/9.5.xsd +++ b/vendor/phpunit/phpunit/schema/9.5.xsd @@ -213,7 +213,7 @@ <xs:attribute name="cacheResultFile" type="xs:anyURI"/> <xs:attribute name="colors" type="xs:boolean" default="false"/> <xs:attribute name="columns" type="columnsType" default="80"/> - <xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="true"/> + <xs:attribute name="convertDeprecationsToExceptions" type="xs:boolean" default="false"/> <xs:attribute name="convertErrorsToExceptions" type="xs:boolean" default="true"/> <xs:attribute name="convertNoticesToExceptions" type="xs:boolean" default="true"/> <xs:attribute name="convertWarningsToExceptions" type="xs:boolean" default="true"/> @@ -279,8 +279,10 @@ </xs:complexType> <xs:complexType name="testSuiteType"> <xs:sequence> - <xs:group ref="pathGroup"/> - <xs:element name="exclude" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="pathGroup"/> + <xs:element name="exclude" type="xs:string"/> + </xs:choice> </xs:sequence> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> diff --git a/vendor/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php b/vendor/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php index 042b2418..8176229d 100644 --- a/vendor/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php +++ b/vendor/phpunit/phpunit/src/Event/Dispatcher/DirectDispatcher.php @@ -86,9 +86,11 @@ final class DirectDispatcher implements SubscribableDispatcher foreach ($this->tracers as $tracer) { try { $tracer->trace($event); + // @codeCoverageIgnoreStart } catch (Throwable $t) { $this->handleThrowable($t); } + // @codeCoverageIgnoreEnd } if (!array_key_exists($eventClassName, $this->subscribers)) { @@ -122,7 +124,9 @@ final class DirectDispatcher implements SubscribableDispatcher return; } + // @codeCoverageIgnoreStart throw $t; + // @codeCoverageIgnoreEnd } private function isThrowableFromThirdPartySubscriber(Throwable $t): bool diff --git a/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php b/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php index 254b7225..27af2c58 100644 --- a/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php +++ b/vendor/phpunit/phpunit/src/Event/Emitter/DispatchingEmitter.php @@ -336,7 +336,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testBeforeFirstTestMethodCalled(string $testClassName, Code\ClassMethod $calledMethod): void + public function testBeforeFirstTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void { $this->dispatcher->dispatch( new Test\BeforeFirstTestMethodCalled( @@ -353,7 +353,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testBeforeFirstTestMethodErrored(string $testClassName, Code\ClassMethod $calledMethod, Throwable $throwable): void + public function testBeforeFirstTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void { $this->dispatcher->dispatch( new Test\BeforeFirstTestMethodErrored( @@ -371,7 +371,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testBeforeFirstTestMethodFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void + public function testBeforeFirstTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void { $this->dispatcher->dispatch( new Test\BeforeFirstTestMethodFinished( @@ -388,7 +388,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testBeforeTestMethodCalled(string $testClassName, Code\ClassMethod $calledMethod): void + public function testBeforeTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void { $this->dispatcher->dispatch( new Test\BeforeTestMethodCalled( @@ -405,7 +405,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testBeforeTestMethodFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void + public function testBeforeTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void { $this->dispatcher->dispatch( new Test\BeforeTestMethodFinished( @@ -422,7 +422,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testPreConditionCalled(string $testClassName, Code\ClassMethod $calledMethod): void + public function testPreConditionCalled(string $testClassName, ClassMethod $calledMethod): void { $this->dispatcher->dispatch( new Test\PreConditionCalled( @@ -439,7 +439,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testPreConditionFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void + public function testPreConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void { $this->dispatcher->dispatch( new Test\PreConditionFinished( @@ -1010,7 +1010,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testPostConditionCalled(string $testClassName, Code\ClassMethod $calledMethod): void + public function testPostConditionCalled(string $testClassName, ClassMethod $calledMethod): void { $this->dispatcher->dispatch( new Test\PostConditionCalled( @@ -1027,7 +1027,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testPostConditionFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void + public function testPostConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void { $this->dispatcher->dispatch( new Test\PostConditionFinished( @@ -1044,7 +1044,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testAfterTestMethodCalled(string $testClassName, Code\ClassMethod $calledMethod): void + public function testAfterTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void { $this->dispatcher->dispatch( new Test\AfterTestMethodCalled( @@ -1061,7 +1061,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testAfterTestMethodFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void + public function testAfterTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void { $this->dispatcher->dispatch( new Test\AfterTestMethodFinished( @@ -1078,7 +1078,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testAfterLastTestMethodCalled(string $testClassName, Code\ClassMethod $calledMethod): void + public function testAfterLastTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void { $this->dispatcher->dispatch( new Test\AfterLastTestMethodCalled( @@ -1095,7 +1095,7 @@ final class DispatchingEmitter implements Emitter * @throws InvalidArgumentException * @throws UnknownEventTypeException */ - public function testAfterLastTestMethodFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void + public function testAfterLastTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void { $this->dispatcher->dispatch( new Test\AfterLastTestMethodFinished( diff --git a/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php b/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php index f56d64b8..c85b2675 100644 --- a/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php +++ b/vendor/phpunit/phpunit/src/Event/Emitter/Emitter.php @@ -76,37 +76,37 @@ interface Emitter /** * @psalm-param class-string $testClassName */ - public function testBeforeFirstTestMethodCalled(string $testClassName, Code\ClassMethod $calledMethod): void; + public function testBeforeFirstTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void; /** * @psalm-param class-string $testClassName */ - public function testBeforeFirstTestMethodErrored(string $testClassName, Code\ClassMethod $calledMethod, Throwable $throwable): void; + public function testBeforeFirstTestMethodErrored(string $testClassName, ClassMethod $calledMethod, Throwable $throwable): void; /** * @psalm-param class-string $testClassName */ - public function testBeforeFirstTestMethodFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void; + public function testBeforeFirstTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void; /** * @psalm-param class-string $testClassName */ - public function testBeforeTestMethodCalled(string $testClassName, Code\ClassMethod $calledMethod): void; + public function testBeforeTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void; /** * @psalm-param class-string $testClassName */ - public function testBeforeTestMethodFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void; + public function testBeforeTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void; /** * @psalm-param class-string $testClassName */ - public function testPreConditionCalled(string $testClassName, Code\ClassMethod $calledMethod): void; + public function testPreConditionCalled(string $testClassName, ClassMethod $calledMethod): void; /** * @psalm-param class-string $testClassName */ - public function testPreConditionFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void; + public function testPreConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void; public function testPrepared(Code\Test $test): void; @@ -263,32 +263,32 @@ interface Emitter /** * @psalm-param class-string $testClassName */ - public function testPostConditionCalled(string $testClassName, Code\ClassMethod $calledMethod): void; + public function testPostConditionCalled(string $testClassName, ClassMethod $calledMethod): void; /** * @psalm-param class-string $testClassName */ - public function testPostConditionFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void; + public function testPostConditionFinished(string $testClassName, ClassMethod ...$calledMethods): void; /** * @psalm-param class-string $testClassName */ - public function testAfterTestMethodCalled(string $testClassName, Code\ClassMethod $calledMethod): void; + public function testAfterTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void; /** * @psalm-param class-string $testClassName */ - public function testAfterTestMethodFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void; + public function testAfterTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void; /** * @psalm-param class-string $testClassName */ - public function testAfterLastTestMethodCalled(string $testClassName, Code\ClassMethod $calledMethod): void; + public function testAfterLastTestMethodCalled(string $testClassName, ClassMethod $calledMethod): void; /** * @psalm-param class-string $testClassName */ - public function testAfterLastTestMethodFinished(string $testClassName, Code\ClassMethod ...$calledMethods): void; + public function testAfterLastTestMethodFinished(string $testClassName, ClassMethod ...$calledMethods): void; public function testSuiteFinished(TestSuite $testSuite): void; diff --git a/vendor/phpunit/phpunit/src/Event/Facade.php b/vendor/phpunit/phpunit/src/Event/Facade.php index bda44484..cd1e1ff9 100644 --- a/vendor/phpunit/phpunit/src/Event/Facade.php +++ b/vendor/phpunit/phpunit/src/Event/Facade.php @@ -81,7 +81,11 @@ final class Facade $this->deferredDispatcher()->registerTracer($tracer); } - /** @noinspection PhpUnused */ + /** + * @codeCoverageIgnore + * + * @noinspection PhpUnused + */ public function initForIsolation(HRTime $offset, bool $exportObjects): CollectingDispatcher { $dispatcher = new CollectingDispatcher; @@ -258,7 +262,9 @@ final class Facade private function garbageCollectorStatusProvider(): Telemetry\GarbageCollectorStatusProvider { if (!isset(gc_status()['running'])) { + // @codeCoverageIgnoreStart return new Php81GarbageCollectorStatusProvider; + // @codeCoverageIgnoreEnd } return new Php83GarbageCollectorStatusProvider; diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php index 335a7e24..48d2afab 100644 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php +++ b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/Php81GarbageCollectorStatusProvider.php @@ -13,6 +13,8 @@ use function gc_status; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @codeCoverageIgnore */ final class Php81GarbageCollectorStatusProvider implements GarbageCollectorStatusProvider { diff --git a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php index f4515787..86696afe 100644 --- a/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php +++ b/vendor/phpunit/phpunit/src/Event/Value/Telemetry/SystemStopWatchWithOffset.php @@ -14,6 +14,8 @@ use PHPUnit\Event\InvalidArgumentException; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit + * + * @codeCoverageIgnore */ final class SystemStopWatchWithOffset implements StopWatch { diff --git a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php b/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php index c8988693..1687d5aa 100644 --- a/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php +++ b/vendor/phpunit/phpunit/src/Event/Value/TestSuite/TestSuiteBuilder.php @@ -105,9 +105,9 @@ final class TestSuiteBuilder /** * @psalm-param list<Test> $tests */ - private static function process(FrameworkTestSuite $testSuite, &$tests): void + private static function process(FrameworkTestSuite $testSuite, array &$tests): void { - foreach ($testSuite->tests() as $test) { + foreach ($testSuite->getIterator() as $test) { if ($test instanceof FrameworkTestSuite) { self::process($test, $tests); diff --git a/vendor/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php b/vendor/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php index aed9144f..8d3b634e 100644 --- a/vendor/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php +++ b/vendor/phpunit/phpunit/src/Event/Value/ThrowableBuilder.php @@ -35,7 +35,7 @@ final class ThrowableBuilder $t::class, $t->getMessage(), ThrowableToStringMapper::map($t), - Filter::getFilteredStacktrace($t), + Filter::getFilteredStacktrace($t, false), $previous, ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php index 48be6317..48ef3d64 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php @@ -9,6 +9,8 @@ */ namespace PHPUnit\Framework\Constraint; +use function explode; +use function gettype; use function is_array; use function is_object; use function is_string; @@ -104,6 +106,10 @@ final class IsIdentical extends Constraint return 'two variables reference the same object'; } + if (explode(' ', gettype($this->value), 2)[0] === 'resource' && explode(' ', gettype($other), 2)[0] === 'resource') { + return 'two variables reference the same resource'; + } + if (is_string($this->value) && is_string($other)) { return 'two strings are identical'; } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php index 021afddd..837e3a50 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php @@ -51,6 +51,10 @@ final class LogicalNot extends UnaryOperator preg_match('/(\'[\w\W]*\')([\w\W]*)("[\w\W]*")/i', $string, $matches); + if (count($matches) === 0) { + preg_match('/(\'[\w\W]*\')([\w\W]*)(\'[\w\W]*\')/i', $string, $matches); + } + $positives = array_map( static fn (string $s) => '/\\b' . preg_quote($s, '/') . '/', $positives, diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl index 8b4af38b..8ecd412c 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/doubled_method.tpl @@ -1,6 +1,19 @@ {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} {{deprecation} + $__phpunit_definedVariables = get_defined_vars(); + $__phpunit_namedVariadicParameters = []; + + foreach ($__phpunit_definedVariables as $__phpunit_definedVariableName => $__phpunit_definedVariableValue) { + if ((new ReflectionParameter([__CLASS__, __FUNCTION__], $__phpunit_definedVariableName))->isVariadic()) { + foreach ($__phpunit_definedVariableValue as $__phpunit_key => $__phpunit_namedValue) { + if (is_string($__phpunit_key)) { + $__phpunit_namedVariadicParameters[$__phpunit_key] = $__phpunit_namedValue; + } + } + } + } + $__phpunit_arguments = [{arguments_call}]; $__phpunit_count = func_num_args(); @@ -12,6 +25,8 @@ } } + $__phpunit_arguments = array_merge($__phpunit_arguments, $__phpunit_namedVariadicParameters); + $__phpunit_result = $this->__phpunit_getInvocationHandler()->invoke( new \PHPUnit\Framework\MockObject\Invocation( '{class_name}', '{method_name}', $__phpunit_arguments, '{return_type}', $this, {clone_arguments} diff --git a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/proxied_method.tpl b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/proxied_method.tpl index 330cdcfc..94db4665 100644 --- a/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/proxied_method.tpl +++ b/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/templates/proxied_method.tpl @@ -1,6 +1,19 @@ {modifier} function {reference}{method_name}({arguments_decl}){return_declaration} { + $__phpunit_definedVariables = get_defined_vars(); + $__phpunit_namedVariadicParameters = []; + + foreach ($__phpunit_definedVariables as $__phpunit_definedVariableName => $__phpunit_definedVariableValue) { + if ((new ReflectionParameter([__CLASS__, __FUNCTION__], $__phpunit_definedVariableName))->isVariadic()) { + foreach ($__phpunit_definedVariableValue as $__phpunit_key => $__phpunit_namedValue) { + if (is_string($__phpunit_key)) { + $__phpunit_namedVariadicParameters[$__phpunit_key] = $__phpunit_namedValue; + } + } + } + } + $__phpunit_arguments = [{arguments_call}]; $__phpunit_count = func_num_args(); @@ -12,6 +25,8 @@ } } + $__phpunit_arguments = array_merge($__phpunit_arguments, $__phpunit_namedVariadicParameters); + $this->__phpunit_getInvocationHandler()->invoke( new \PHPUnit\Framework\MockObject\Invocation( '{class_name}', '{method_name}', $__phpunit_arguments, '{return_type}', $this, {clone_arguments}, true diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php index 9f9c0b0d..021336f3 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ b/vendor/phpunit/phpunit/src/Framework/TestCase.php @@ -733,7 +733,14 @@ abstract class TestCase extends Assert implements Reorderable, SelfDescribing, T } } - $this->mockObjects = []; + try { + $this->mockObjects = []; + } catch (Throwable $t) { + Event\Facade::emitter()->testErrored( + $this->valueObjectForEvents(), + Event\Code\ThrowableBuilder::from($t), + ); + } // Tear down the fixture. An exception raised in tearDown() will be // caught and passed on when no exception was raised before. diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php index 2711760d..67ef6375 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Deprecation.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Deprecation extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Error.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Error.php index 6ddb3b1b..c7124295 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Error.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Error.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Error extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Failure.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Failure.php index 1bb1b037..a6028a08 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Failure.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Failure.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Failure extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php index eff26721..6305a5cc 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Incomplete.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Incomplete extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Known.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Known.php index b5d92b39..b44955ea 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Known.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Known.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ abstract class Known extends TestStatus { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Notice.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Notice.php index 1eb10761..28ab650e 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Notice.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Notice.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Notice extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Risky.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Risky.php index bd0cb889..b9708023 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Risky.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Risky.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Risky extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Skipped.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Skipped.php index 4c8aeaf9..30dae7e4 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Skipped.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Skipped.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Skipped extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Success.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Success.php index fb5c945e..18cc7c93 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Success.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Success.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Success extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php index ab957de1..fff96a54 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/TestStatus.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ abstract class TestStatus { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Unknown.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Unknown.php index 245ec67e..258c75b7 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Unknown.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Unknown.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Unknown extends TestStatus { diff --git a/vendor/phpunit/phpunit/src/Framework/TestStatus/Warning.php b/vendor/phpunit/phpunit/src/Framework/TestStatus/Warning.php index 7c31fa8f..a07b5498 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestStatus/Warning.php +++ b/vendor/phpunit/phpunit/src/Framework/TestStatus/Warning.php @@ -10,9 +10,9 @@ namespace PHPUnit\Framework\TestStatus; /** - * @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit - * * @psalm-immutable + * + * @internal This class is not covered by the backward compatibility promise for PHPUnit */ final class Warning extends Known { diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/vendor/phpunit/phpunit/src/Framework/TestSuite.php index 15a144cf..839a23e0 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestSuite.php +++ b/vendor/phpunit/phpunit/src/Framework/TestSuite.php @@ -463,7 +463,7 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test } /** - * @throws \PHPUnit\Event\TestData\MoreThanOneDataSetFromDataProviderException + * @throws Event\TestData\MoreThanOneDataSetFromDataProviderException * @throws Exception */ protected function addTestMethod(ReflectionClass $class, ReflectionMethod $method): void diff --git a/vendor/phpunit/phpunit/src/Logging/EventLogger.php b/vendor/phpunit/phpunit/src/Logging/EventLogger.php index 559fb5ec..ced39945 100644 --- a/vendor/phpunit/phpunit/src/Logging/EventLogger.php +++ b/vendor/phpunit/phpunit/src/Logging/EventLogger.php @@ -12,9 +12,9 @@ namespace PHPUnit\Logging; use const FILE_APPEND; use const LOCK_EX; use const PHP_EOL; -use function explode; use function file_put_contents; use function implode; +use function preg_split; use function str_repeat; use function strlen; use PHPUnit\Event\Event; @@ -38,7 +38,7 @@ final class EventLogger implements Tracer { $telemetryInfo = $this->telemetryInfo($event); $indentation = PHP_EOL . str_repeat(' ', strlen($telemetryInfo)); - $lines = explode(PHP_EOL, $event->asString()); + $lines = preg_split('/\r\n|\r|\n/', $event->asString()); file_put_contents( $this->path, diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php b/vendor/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php index 45d0c81d..9ddd8776 100644 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/PlainTextRenderer.php @@ -50,13 +50,22 @@ final class PlainTextRenderer foreach ($tests as $test) { $prettifiedMethodName = $test->test()->testDox()->prettifiedMethodName(); + $success = true; + + if ($test->status()->isError() || + $test->status()->isFailure() || + $test->status()->isIncomplete() || + $test->status()->isSkipped()) { + $success = false; + } + if (!isset($result[$prettifiedMethodName])) { - $result[$prettifiedMethodName] = $test->status()->isSuccess() ? 'x' : ' '; + $result[$prettifiedMethodName] = $success ? 'x' : ' '; continue; } - if ($test->status()->isSuccess()) { + if ($success) { continue; } diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php new file mode 100644 index 00000000..43cde139 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredDeprecationSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\DeprecationTriggered; +use PHPUnit\Event\Test\DeprecationTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredDeprecationSubscriber extends Subscriber implements DeprecationTriggeredSubscriber +{ + public function notify(DeprecationTriggered $event): void + { + $this->collector()->testTriggeredDeprecation($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php new file mode 100644 index 00000000..0346b3bc --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredNoticeSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\NoticeTriggered; +use PHPUnit\Event\Test\NoticeTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredNoticeSubscriber extends Subscriber implements NoticeTriggeredSubscriber +{ + public function notify(NoticeTriggered $event): void + { + $this->collector()->testTriggeredNotice($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php new file mode 100644 index 00000000..6b99e1b6 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpDeprecationSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\PhpDeprecationTriggered; +use PHPUnit\Event\Test\PhpDeprecationTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredPhpDeprecationSubscriber extends Subscriber implements PhpDeprecationTriggeredSubscriber +{ + public function notify(PhpDeprecationTriggered $event): void + { + $this->collector()->testTriggeredPhpDeprecation($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php new file mode 100644 index 00000000..31c19f9d --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpNoticeSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\PhpNoticeTriggered; +use PHPUnit\Event\Test\PhpNoticeTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredPhpNoticeSubscriber extends Subscriber implements PhpNoticeTriggeredSubscriber +{ + public function notify(PhpNoticeTriggered $event): void + { + $this->collector()->testTriggeredPhpNotice($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php new file mode 100644 index 00000000..f479bd5f --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpWarningSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\PhpWarningTriggered; +use PHPUnit\Event\Test\PhpWarningTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredPhpWarningSubscriber extends Subscriber implements PhpWarningTriggeredSubscriber +{ + public function notify(PhpWarningTriggered $event): void + { + $this->collector()->testTriggeredPhpWarning($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php new file mode 100644 index 00000000..d6615b2c --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitDeprecationSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\PhpunitDeprecationTriggered; +use PHPUnit\Event\Test\PhpunitDeprecationTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredPhpunitDeprecationSubscriber extends Subscriber implements PhpunitDeprecationTriggeredSubscriber +{ + public function notify(PhpunitDeprecationTriggered $event): void + { + $this->collector()->testTriggeredPhpunitDeprecation($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php new file mode 100644 index 00000000..85020c54 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitErrorSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\PhpunitErrorTriggered; +use PHPUnit\Event\Test\PhpunitErrorTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredPhpunitErrorSubscriber extends Subscriber implements PhpunitErrorTriggeredSubscriber +{ + public function notify(PhpunitErrorTriggered $event): void + { + $this->collector()->testTriggeredPhpunitError($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php new file mode 100644 index 00000000..28294e8f --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredPhpunitWarningSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\PhpunitWarningTriggered; +use PHPUnit\Event\Test\PhpunitWarningTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredPhpunitWarningSubscriber extends Subscriber implements PhpunitWarningTriggeredSubscriber +{ + public function notify(PhpunitWarningTriggered $event): void + { + $this->collector()->testTriggeredPhpunitWarning($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php new file mode 100644 index 00000000..600ceb07 --- /dev/null +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/Subscriber/TestTriggeredWarningSubscriber.php @@ -0,0 +1,24 @@ +<?php declare(strict_types=1); +/* + * This file is part of PHPUnit. + * + * (c) Sebastian Bergmann <sebastian@phpunit.de> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\Logging\TestDox; + +use PHPUnit\Event\Test\WarningTriggered; +use PHPUnit\Event\Test\WarningTriggeredSubscriber; + +/** + * @internal This class is not covered by the backward compatibility promise for PHPUnit + */ +final class TestTriggeredWarningSubscriber extends Subscriber implements WarningTriggeredSubscriber +{ + public function notify(WarningTriggered $event): void + { + $this->collector()->testTriggeredWarning($event); + } +} diff --git a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php index 63ba35d4..4417854d 100644 --- a/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php +++ b/vendor/phpunit/phpunit/src/Logging/TestDox/TestResult/TestResultCollector.php @@ -22,13 +22,22 @@ use PHPUnit\Event\EventFacadeIsSealedException; use PHPUnit\Event\Facade; use PHPUnit\Event\InvalidArgumentException; use PHPUnit\Event\Test\ConsideredRisky; +use PHPUnit\Event\Test\DeprecationTriggered; use PHPUnit\Event\Test\Errored; use PHPUnit\Event\Test\Failed; use PHPUnit\Event\Test\Finished; use PHPUnit\Event\Test\MarkedIncomplete; +use PHPUnit\Event\Test\NoticeTriggered; use PHPUnit\Event\Test\Passed; +use PHPUnit\Event\Test\PhpDeprecationTriggered; +use PHPUnit\Event\Test\PhpNoticeTriggered; +use PHPUnit\Event\Test\PhpunitDeprecationTriggered; +use PHPUnit\Event\Test\PhpunitErrorTriggered; +use PHPUnit\Event\Test\PhpunitWarningTriggered; +use PHPUnit\Event\Test\PhpWarningTriggered; use PHPUnit\Event\Test\Prepared; use PHPUnit\Event\Test\Skipped; +use PHPUnit\Event\Test\WarningTriggered; use PHPUnit\Event\UnknownSubscriberTypeException; use PHPUnit\Framework\TestStatus\TestStatus; use PHPUnit\Logging\TestDox\TestResult as TestDoxTestMethod; @@ -155,23 +164,117 @@ final class TestResultCollector return; } - $this->status = TestStatus::success(); + $this->updateTestStatus(TestStatus::success()); } public function testSkipped(Skipped $event): void { - $this->status = TestStatus::skipped($event->message()); + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::skipped($event->message())); } public function testMarkedIncomplete(MarkedIncomplete $event): void { - $this->status = TestStatus::incomplete($event->throwable()->message()); + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::incomplete($event->throwable()->message())); + $this->throwable = $event->throwable(); } public function testConsideredRisky(ConsideredRisky $event): void { - $this->status = TestStatus::risky($event->message()); + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::risky()); + } + + public function testTriggeredDeprecation(DeprecationTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::deprecation()); + } + + public function testTriggeredNotice(NoticeTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::notice()); + } + + public function testTriggeredWarning(WarningTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::warning()); + } + + public function testTriggeredPhpDeprecation(PhpDeprecationTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::deprecation()); + } + + public function testTriggeredPhpNotice(PhpNoticeTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::notice()); + } + + public function testTriggeredPhpWarning(PhpWarningTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::warning()); + } + + public function testTriggeredPhpunitDeprecation(PhpunitDeprecationTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::deprecation()); + } + + public function testTriggeredPhpunitError(PhpunitErrorTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::error()); + } + + public function testTriggeredPhpunitWarning(PhpunitWarningTriggered $event): void + { + if (!$event->test()->isTestMethod()) { + return; + } + + $this->updateTestStatus(TestStatus::warning()); } /** @@ -216,6 +319,25 @@ final class TestResultCollector new TestPassedSubscriber($this), new TestPreparedSubscriber($this), new TestSkippedSubscriber($this), + new TestTriggeredDeprecationSubscriber($this), + new TestTriggeredNoticeSubscriber($this), + new TestTriggeredPhpDeprecationSubscriber($this), + new TestTriggeredPhpNoticeSubscriber($this), + new TestTriggeredPhpunitDeprecationSubscriber($this), + new TestTriggeredPhpunitErrorSubscriber($this), + new TestTriggeredPhpunitWarningSubscriber($this), + new TestTriggeredPhpWarningSubscriber($this), + new TestTriggeredWarningSubscriber($this), ); } + + private function updateTestStatus(TestStatus $status): void + { + if ($this->status !== null && + $this->status->isMoreImportantThan($status)) { + return; + } + + $this->status = $status; + } } diff --git a/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php b/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php index fc8f3175..5ee7306a 100644 --- a/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php +++ b/vendor/phpunit/phpunit/src/Runner/Extension/ExtensionBootstrapper.php @@ -14,7 +14,6 @@ use function class_exists; use function class_implements; use function in_array; use function sprintf; -use PHPUnit\Event; use PHPUnit\Event\Facade as EventFacade; use PHPUnit\TextUI\Configuration\Configuration; use ReflectionClass; @@ -87,7 +86,7 @@ final class ExtensionBootstrapper return; } - Event\Facade::emitter()->testRunnerBootstrappedExtension( + EventFacade::emitter()->testRunnerBootstrappedExtension( $className, $parameters, ); diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php index bcabd74a..c93a7b7d 100644 --- a/vendor/phpunit/phpunit/src/Runner/Version.php +++ b/vendor/phpunit/phpunit/src/Runner/Version.php @@ -34,7 +34,7 @@ final class Version } if (self::$version === '') { - self::$version = (new VersionId('10.5.5', dirname(__DIR__, 2)))->asString(); + self::$version = (new VersionId('10.5.8', dirname(__DIR__, 2)))->asString(); } return self::$version; diff --git a/vendor/phpunit/phpunit/src/TextUI/Application.php b/vendor/phpunit/phpunit/src/TextUI/Application.php index 7dc77d13..fc64589c 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Application.php +++ b/vendor/phpunit/phpunit/src/TextUI/Application.php @@ -154,7 +154,7 @@ final class Application $extensionReplacesResultOutput, ); - if (!$extensionReplacesOutput) { + if (!$configuration->debug() && !$extensionReplacesOutput) { $this->writeRuntimeInformation($printer, $configuration); $this->writePharExtensionInformation($printer, $pharExtensions); $this->writeRandomSeedInformation($printer, $configuration); @@ -162,6 +162,15 @@ final class Application $printer->print(PHP_EOL); } + if ($configuration->debug()) { + EventFacade::instance()->registerTracer( + new EventLogger( + 'php://stdout', + false, + ), + ); + } + $this->registerLogfileWriters($configuration); $testDoxResultCollector = $this->testDoxResultCollector($configuration); diff --git a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php index 50001940..781de3e9 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php +++ b/vendor/phpunit/phpunit/src/TextUI/Command/Commands/MigrateConfigurationCommand.php @@ -11,6 +11,7 @@ namespace PHPUnit\TextUI\Command; use function copy; use function file_put_contents; +use function sprintf; use PHPUnit\TextUI\XmlConfiguration\Migrator; use Throwable; @@ -28,24 +29,33 @@ final class MigrateConfigurationCommand implements Command public function execute(): Result { - copy($this->filename, $this->filename . '.bak'); - - $buffer = 'Created backup: ' . $this->filename . '.bak' . PHP_EOL; - $shellExitCode = Result::SUCCESS; - try { - file_put_contents( - $this->filename, - (new Migrator)->migrate($this->filename), + $migrated = (new Migrator)->migrate($this->filename); + + copy($this->filename, $this->filename . '.bak'); + + file_put_contents($this->filename, $migrated); + + return Result::from( + sprintf( + 'Created backup: %s.bak%sMigrated configuration: %s%s', + $this->filename, + PHP_EOL, + $this->filename, + PHP_EOL, + ), ); - - $buffer .= 'Migrated configuration: ' . $this->filename . PHP_EOL; } catch (Throwable $t) { - $buffer .= 'Migration failed: ' . $t->getMessage() . PHP_EOL; - - $shellExitCode = Result::FAILURE; + return Result::from( + sprintf( + 'Migration of %s failed:%s%s%s', + $this->filename, + PHP_EOL, + $t->getMessage(), + PHP_EOL, + ), + Result::FAILURE, + ); } - - return Result::from($buffer, $shellExitCode); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php index 034656bf..8e88c70c 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Builder.php @@ -17,6 +17,7 @@ use function is_file; use function is_numeric; use function sprintf; use PHPUnit\Runner\TestSuiteSorter; +use PHPUnit\Util\Filesystem; use SebastianBergmann\CliParser\Exception as CliParserException; use SebastianBergmann\CliParser\Parser as CliParser; @@ -122,6 +123,7 @@ final class Builder 'log-events-text=', 'log-events-verbose-text=', 'version', + 'debug', ]; private const SHORT_OPTIONS = 'd:c:h'; @@ -240,6 +242,7 @@ final class Builder $logEventsVerboseText = null; $printerTeamCity = null; $printerTestDox = null; + $debug = false; foreach ($options[0] as $option) { switch ($option[0]) { @@ -803,12 +806,35 @@ final class Builder break; case '--log-events-text': - $logEventsText = $option[1]; + $logEventsText = Filesystem::resolvePathOrStream($option[1]); + + if (!$logEventsText) { + throw new Exception( + sprintf( + 'The path "%s" specified for the --log-events-text option could not be resolved', + $option[1], + ), + ); + } break; case '--log-events-verbose-text': - $logEventsVerboseText = $option[1]; + $logEventsVerboseText = Filesystem::resolvePathOrStream($option[1]); + + if (!$logEventsVerboseText) { + throw new Exception( + sprintf( + 'The path "%s" specified for the --log-events-verbose-text option could not be resolved', + $option[1], + ), + ); + } + + break; + + case '--debug': + $debug = true; break; } @@ -920,6 +946,7 @@ final class Builder $logEventsVerboseText, $printerTeamCity, $printerTestDox, + $debug, ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php index cca980ea..b4058e1e 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Cli/Configuration.php @@ -120,12 +120,13 @@ final class Configuration private readonly bool $version; private readonly ?string $logEventsText; private readonly ?string $logEventsVerboseText; + private readonly bool $debug; /** * @psalm-param list<non-empty-string> $arguments * @psalm-param ?non-empty-list<non-empty-string> $testSuffixes */ - public function __construct(array $arguments, ?string $atLeastVersion, ?bool $backupGlobals, ?bool $backupStaticProperties, ?bool $beStrictAboutChangesToGlobalState, ?string $bootstrap, ?string $cacheDirectory, ?bool $cacheResult, ?string $cacheResultFile, bool $checkVersion, ?string $colors, null|int|string $columns, ?string $configurationFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4J, ?string $coverageHtml, ?string $coveragePhp, ?string $coverageText, ?bool $coverageTextShowUncoveredFiles, ?bool $coverageTextShowOnlySummary, ?string $coverageXml, ?bool $pathCoverage, ?string $coverageCacheDirectory, bool $warmCoverageCache, ?int $defaultTimeLimit, ?bool $disableCodeCoverageIgnore, ?bool $disallowTestOutput, ?bool $enforceTimeLimit, ?array $excludeGroups, ?int $executionOrder, ?int $executionOrderDefects, ?bool $failOnDeprecation, ?bool $failOnEmptyTestSuite, ?bool $failOnIncomplete, ?bool $failOnNotice, ?bool $failOnRisky, ?bool $failOnSkipped, ?bool $failOnWarning, ?bool $stopOnDefect, ?bool $stopOnDeprecation, ?bool $stopOnError, ?bool $stopOnFailure, ?bool $stopOnIncomplete, ?bool $stopOnNotice, ?bool $stopOnRisky, ?bool $stopOnSkipped, ?bool $stopOnWarning, ?string $filter, ?string $generateBaseline, ?string $useBaseline, bool $ignoreBaseline, bool $generateConfiguration, bool $migrateConfiguration, ?array $groups, ?array $testsCovering, ?array $testsUsing, bool $help, ?string $includePath, ?array $iniSettings, ?string $junitLogfile, bool $listGroups, bool $listSuites, bool $listTests, ?string $listTestsXml, ?bool $noCoverage, ?bool $noExtensions, ?bool $noOutput, ?bool $noProgress, ?bool $noResults, ?bool $noLogging, ?bool $processIsolation, ?int $randomOrderSeed, ?bool $reportUselessTests, ?bool $resolveDependencies, ?bool $reverseList, ?bool $stderr, ?bool $strictCoverage, ?string $teamcityLogfile, ?string $testdoxHtmlFile, ?string $testdoxTextFile, ?array $testSuffixes, ?string $testSuite, ?string $excludeTestSuite, bool $useDefaultConfiguration, ?bool $displayDetailsOnIncompleteTests, ?bool $displayDetailsOnSkippedTests, ?bool $displayDetailsOnTestsThatTriggerDeprecations, ?bool $displayDetailsOnTestsThatTriggerErrors, ?bool $displayDetailsOnTestsThatTriggerNotices, ?bool $displayDetailsOnTestsThatTriggerWarnings, bool $version, ?array $coverageFilter, ?string $logEventsText, ?string $logEventsVerboseText, ?bool $printerTeamCity, ?bool $printerTestDox) + public function __construct(array $arguments, ?string $atLeastVersion, ?bool $backupGlobals, ?bool $backupStaticProperties, ?bool $beStrictAboutChangesToGlobalState, ?string $bootstrap, ?string $cacheDirectory, ?bool $cacheResult, ?string $cacheResultFile, bool $checkVersion, ?string $colors, null|int|string $columns, ?string $configurationFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4J, ?string $coverageHtml, ?string $coveragePhp, ?string $coverageText, ?bool $coverageTextShowUncoveredFiles, ?bool $coverageTextShowOnlySummary, ?string $coverageXml, ?bool $pathCoverage, ?string $coverageCacheDirectory, bool $warmCoverageCache, ?int $defaultTimeLimit, ?bool $disableCodeCoverageIgnore, ?bool $disallowTestOutput, ?bool $enforceTimeLimit, ?array $excludeGroups, ?int $executionOrder, ?int $executionOrderDefects, ?bool $failOnDeprecation, ?bool $failOnEmptyTestSuite, ?bool $failOnIncomplete, ?bool $failOnNotice, ?bool $failOnRisky, ?bool $failOnSkipped, ?bool $failOnWarning, ?bool $stopOnDefect, ?bool $stopOnDeprecation, ?bool $stopOnError, ?bool $stopOnFailure, ?bool $stopOnIncomplete, ?bool $stopOnNotice, ?bool $stopOnRisky, ?bool $stopOnSkipped, ?bool $stopOnWarning, ?string $filter, ?string $generateBaseline, ?string $useBaseline, bool $ignoreBaseline, bool $generateConfiguration, bool $migrateConfiguration, ?array $groups, ?array $testsCovering, ?array $testsUsing, bool $help, ?string $includePath, ?array $iniSettings, ?string $junitLogfile, bool $listGroups, bool $listSuites, bool $listTests, ?string $listTestsXml, ?bool $noCoverage, ?bool $noExtensions, ?bool $noOutput, ?bool $noProgress, ?bool $noResults, ?bool $noLogging, ?bool $processIsolation, ?int $randomOrderSeed, ?bool $reportUselessTests, ?bool $resolveDependencies, ?bool $reverseList, ?bool $stderr, ?bool $strictCoverage, ?string $teamcityLogfile, ?string $testdoxHtmlFile, ?string $testdoxTextFile, ?array $testSuffixes, ?string $testSuite, ?string $excludeTestSuite, bool $useDefaultConfiguration, ?bool $displayDetailsOnIncompleteTests, ?bool $displayDetailsOnSkippedTests, ?bool $displayDetailsOnTestsThatTriggerDeprecations, ?bool $displayDetailsOnTestsThatTriggerErrors, ?bool $displayDetailsOnTestsThatTriggerNotices, ?bool $displayDetailsOnTestsThatTriggerWarnings, bool $version, ?array $coverageFilter, ?string $logEventsText, ?string $logEventsVerboseText, ?bool $printerTeamCity, ?bool $printerTestDox, bool $debug) { $this->arguments = $arguments; $this->atLeastVersion = $atLeastVersion; @@ -224,6 +225,7 @@ final class Configuration $this->logEventsVerboseText = $logEventsVerboseText; $this->teamCityPrinter = $printerTeamCity; $this->testdoxPrinter = $printerTestDox; + $this->debug = $debug; } /** @@ -1998,4 +2000,9 @@ final class Configuration return $this->logEventsVerboseText; } + + public function debug(): bool + { + return $this->debug; + } } diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php index ae18bbb6..12b0cbd0 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Configuration.php @@ -138,6 +138,7 @@ final class Configuration private readonly bool $controlGarbageCollector; private readonly int $numberOfTestsBeforeGarbageCollection; private readonly ?string $generateBaseline; + private readonly bool $debug; /** * @psalm-param list<non-empty-string> $cliArguments @@ -145,7 +146,7 @@ final class Configuration * @psalm-param non-empty-list<non-empty-string> $testSuffixes * @psalm-param list<array{className: class-string, parameters: array<string, string>}> $extensionBootstrappers */ - public function __construct(array $cliArguments, ?string $configurationFile, ?string $bootstrap, bool $cacheResult, ?string $cacheDirectory, ?string $coverageCacheDirectory, Source $source, string $testResultCacheFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4j, int $coverageCrap4jThreshold, ?string $coverageHtml, int $coverageHtmlLowUpperBound, int $coverageHtmlHighLowerBound, string $coverageHtmlColorSuccessLow, string $coverageHtmlColorSuccessMedium, string $coverageHtmlColorSuccessHigh, string $coverageHtmlColorWarning, string $coverageHtmlColorDanger, ?string $coverageHtmlCustomCssFile, ?string $coveragePhp, ?string $coverageText, bool $coverageTextShowUncoveredFiles, bool $coverageTextShowOnlySummary, ?string $coverageXml, bool $pathCoverage, bool $ignoreDeprecatedCodeUnitsFromCodeCoverage, bool $disableCodeCoverageIgnore, bool $failOnDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, bool $outputToStandardErrorStream, int|string $columns, bool $noExtensions, ?string $pharExtensionDirectory, array $extensionBootstrappers, bool $backupGlobals, bool $backupStaticProperties, bool $beStrictAboutChangesToGlobalState, bool $colors, bool $processIsolation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, bool $reportUselessTests, bool $strictCoverage, bool $disallowTestOutput, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, bool $registerMockObjectsFromTestArgumentsRecursively, bool $noProgress, bool $noResults, bool $noOutput, int $executionOrder, int $executionOrderDefects, bool $resolveDependencies, ?string $logfileTeamcity, ?string $logfileJunit, ?string $logfileTestdoxHtml, ?string $logfileTestdoxText, ?string $logEventsText, ?string $logEventsVerboseText, bool $teamCityOutput, bool $testDoxOutput, ?array $testsCovering, ?array $testsUsing, ?string $filter, ?array $groups, ?array $excludeGroups, int $randomOrderSeed, bool $includeUncoveredFiles, TestSuiteCollection $testSuite, string $includeTestSuite, string $excludeTestSuite, ?string $defaultTestSuite, array $testSuffixes, Php $php, bool $controlGarbageCollector, int $numberOfTestsBeforeGarbageCollection, ?string $generateBaseline) + public function __construct(array $cliArguments, ?string $configurationFile, ?string $bootstrap, bool $cacheResult, ?string $cacheDirectory, ?string $coverageCacheDirectory, Source $source, string $testResultCacheFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4j, int $coverageCrap4jThreshold, ?string $coverageHtml, int $coverageHtmlLowUpperBound, int $coverageHtmlHighLowerBound, string $coverageHtmlColorSuccessLow, string $coverageHtmlColorSuccessMedium, string $coverageHtmlColorSuccessHigh, string $coverageHtmlColorWarning, string $coverageHtmlColorDanger, ?string $coverageHtmlCustomCssFile, ?string $coveragePhp, ?string $coverageText, bool $coverageTextShowUncoveredFiles, bool $coverageTextShowOnlySummary, ?string $coverageXml, bool $pathCoverage, bool $ignoreDeprecatedCodeUnitsFromCodeCoverage, bool $disableCodeCoverageIgnore, bool $failOnDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, bool $outputToStandardErrorStream, int|string $columns, bool $noExtensions, ?string $pharExtensionDirectory, array $extensionBootstrappers, bool $backupGlobals, bool $backupStaticProperties, bool $beStrictAboutChangesToGlobalState, bool $colors, bool $processIsolation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, bool $reportUselessTests, bool $strictCoverage, bool $disallowTestOutput, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, bool $registerMockObjectsFromTestArgumentsRecursively, bool $noProgress, bool $noResults, bool $noOutput, int $executionOrder, int $executionOrderDefects, bool $resolveDependencies, ?string $logfileTeamcity, ?string $logfileJunit, ?string $logfileTestdoxHtml, ?string $logfileTestdoxText, ?string $logEventsText, ?string $logEventsVerboseText, bool $teamCityOutput, bool $testDoxOutput, ?array $testsCovering, ?array $testsUsing, ?string $filter, ?array $groups, ?array $excludeGroups, int $randomOrderSeed, bool $includeUncoveredFiles, TestSuiteCollection $testSuite, string $includeTestSuite, string $excludeTestSuite, ?string $defaultTestSuite, array $testSuffixes, Php $php, bool $controlGarbageCollector, int $numberOfTestsBeforeGarbageCollection, ?string $generateBaseline, bool $debug) { $this->cliArguments = $cliArguments; $this->configurationFile = $configurationFile; @@ -249,6 +250,7 @@ final class Configuration $this->controlGarbageCollector = $controlGarbageCollector; $this->numberOfTestsBeforeGarbageCollection = $numberOfTestsBeforeGarbageCollection; $this->generateBaseline = $generateBaseline; + $this->debug = $debug; } /** @@ -1285,4 +1287,9 @@ final class Configuration return $this->generateBaseline; } + + public function debug(): bool + { + return $this->debug; + } } diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php index 95f595a4..4698c8da 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Merger.php @@ -847,6 +847,7 @@ final class Merger $xmlConfiguration->phpunit()->controlGarbageCollector(), $xmlConfiguration->phpunit()->numberOfTestsBeforeGarbageCollection(), $generateBaseline, + $cliConfiguration->debug(), ); } } diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php index 47729221..86b92e76 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/MigrationBuilder.php @@ -9,8 +9,6 @@ */ namespace PHPUnit\TextUI\XmlConfiguration; -use function array_key_exists; -use function sprintf; use function version_compare; /** @@ -70,15 +68,6 @@ final class MigrationBuilder */ public function build(string $fromVersion): array { - if (!array_key_exists($fromVersion, self::AVAILABLE_MIGRATIONS)) { - throw new MigrationBuilderException( - sprintf( - 'Migration from schema version %s is not supported', - $fromVersion, - ), - ); - } - $stack = [new UpdateSchemaLocation]; foreach (self::AVAILABLE_MIGRATIONS as $version => $migrations) { diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php index 2755a4f5..78adfae8 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/Migrator.php @@ -9,7 +9,7 @@ */ namespace PHPUnit\TextUI\XmlConfiguration; -use function sprintf; +use PHPUnit\Runner\Version; use PHPUnit\Util\Xml\Loader as XmlLoader; use PHPUnit\Util\Xml\XmlException; @@ -29,12 +29,11 @@ final class Migrator $origin = (new SchemaDetector)->detect($filename); if (!$origin->detected()) { - throw new Exception( - sprintf( - '"%s" is not a valid PHPUnit XML configuration file that can be migrated', - $filename, - ), - ); + throw new Exception('The file does not validate against any know schema'); + } + + if ($origin->version() === Version::series()) { + throw new Exception('The file does not need to be migrated'); } $configurationDocument = (new XmlLoader)->loadFile($filename); diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php index e92426a1..09182612 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetectionResult.php @@ -18,6 +18,9 @@ use PHPUnit\Util\Xml\XmlException; */ abstract class SchemaDetectionResult { + /** + * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this + */ public function detected(): bool { return false; diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php index 8d39f860..ca2ee8f2 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SchemaDetector.php @@ -24,7 +24,9 @@ final class SchemaDetector { $document = (new Loader)->loadFile($filename); - foreach (['10.0', '9.5', '9.2', '8.5'] as $candidate) { + $schemaFinder = new SchemaFinder; + + foreach ($schemaFinder->available() as $candidate) { $schema = (new SchemaFinder)->find($candidate); if (!(new Validator)->validate($document, $schema)->hasValidationErrors()) { diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php index 07b0b03a..002dfe87 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaDetector/SuccessfulSchemaDetectionResult.php @@ -16,18 +16,30 @@ namespace PHPUnit\TextUI\XmlConfiguration; */ final class SuccessfulSchemaDetectionResult extends SchemaDetectionResult { + /** + * @psalm-var non-empty-string + */ private readonly string $version; + /** + * @psalm-param non-empty-string $version + */ public function __construct(string $version) { $this->version = $version; } + /** + * @psalm-assert-if-true SuccessfulSchemaDetectionResult $this + */ public function detected(): bool { return true; } + /** + * @psalm-return non-empty-string + */ public function version(): string { return $this->version; diff --git a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php index 8e46a489..b6b620d9 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php +++ b/vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/SchemaFinder.php @@ -9,9 +9,12 @@ */ namespace PHPUnit\TextUI\XmlConfiguration; +use function assert; use function defined; use function is_file; +use function rsort; use function sprintf; +use DirectoryIterator; use PHPUnit\Runner\Version; /** @@ -19,6 +22,30 @@ use PHPUnit\Runner\Version; */ final class SchemaFinder { + /** + * @psalm-return non-empty-list<non-empty-string> + */ + public function available(): array + { + $result = [Version::series()]; + + foreach ((new DirectoryIterator($this->path() . 'schema')) as $file) { + if ($file->isDot()) { + continue; + } + + $version = $file->getBasename('.xsd'); + + assert(!empty($version)); + + $result[] = $version; + } + + rsort($result); + + return $result; + } + /** * @throws CannotFindSchemaException */ diff --git a/vendor/phpunit/phpunit/src/TextUI/Help.php b/vendor/phpunit/phpunit/src/TextUI/Help.php index 5ae9c104..e09c172b 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Help.php +++ b/vendor/phpunit/phpunit/src/TextUI/Help.php @@ -124,8 +124,11 @@ final class Help ['arg' => '--reverse-list', 'desc' => 'Print defects in reverse order'], ['spacer' => ''], - ['arg' => '--teamcity', 'desc' => 'Replace default progress and result output with TeamCity format'], - ['arg' => '--testdox', 'desc' => 'Replace default result output with TestDox format'], + ['arg' => '--teamcity', 'desc' => 'Replace default progress and result output with TeamCity format'], + ['arg' => '--testdox', 'desc' => 'Replace default result output with TestDox format'], + ['spacer' => ''], + + ['arg' => '--debug', 'desc' => 'Replace default progress and result output with debugging information'], ], 'Logging' => [ diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/Facade.php b/vendor/phpunit/phpunit/src/TextUI/Output/Facade.php index 23f15236..4a7f0997 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Output/Facade.php +++ b/vendor/phpunit/phpunit/src/TextUI/Output/Facade.php @@ -47,6 +47,10 @@ final class Facade assert(self::$printer !== null); + if ($configuration->debug()) { + return self::$printer; + } + self::createUnexpectedOutputPrinter(); if (!$extensionReplacesProgressOutput) { @@ -117,6 +121,10 @@ final class Facade { $printerNeeded = false; + if ($configuration->debug()) { + $printerNeeded = true; + } + if ($configuration->outputIsTeamCity()) { $printerNeeded = true; } @@ -196,14 +204,14 @@ final class Facade true, false, false, + true, false, false, - false, - false, - false, - false, - false, - false, + $configuration->displayDetailsOnTestsThatTriggerDeprecations(), + $configuration->displayDetailsOnTestsThatTriggerErrors(), + $configuration->displayDetailsOnTestsThatTriggerNotices(), + $configuration->displayDetailsOnTestsThatTriggerWarnings(), + $configuration->reverseDefectList(), ); } diff --git a/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php index 320ce69f..8959a4f8 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php +++ b/vendor/phpunit/phpunit/src/TextUI/Output/TestDox/ResultPrinter.php @@ -310,7 +310,7 @@ final class ResultPrinter return 'fg-cyan'; } - if ($status->isRisky() || $status->isIncomplete() || $status->isWarning()) { + if ($status->isIncomplete() || $status->isDeprecation() || $status->isNotice() || $status->isRisky() || $status->isWarning()) { return 'fg-yellow'; } @@ -335,7 +335,7 @@ final class ResultPrinter return 'fg-cyan'; } - if ($status->isRisky() || $status->isIncomplete() || $status->isWarning()) { + if ($status->isIncomplete() || $status->isDeprecation() || $status->isNotice() || $status->isRisky() || $status->isWarning()) { return 'fg-yellow'; } @@ -356,18 +356,14 @@ final class ResultPrinter return '↩'; } - if ($status->isRisky()) { - return '☢'; + if ($status->isDeprecation() || $status->isNotice() || $status->isRisky() || $status->isWarning()) { + return '⚠'; } if ($status->isIncomplete()) { return '∅'; } - if ($status->isWarning()) { - return '⚠'; - } - return '?'; } } diff --git a/vendor/phpunit/phpunit/src/Util/Filesystem.php b/vendor/phpunit/phpunit/src/Util/Filesystem.php index 9789fe29..818e6bff 100644 --- a/vendor/phpunit/phpunit/src/Util/Filesystem.php +++ b/vendor/phpunit/phpunit/src/Util/Filesystem.php @@ -10,7 +10,10 @@ namespace PHPUnit\Util; use function is_dir; +use function is_string; use function mkdir; +use function realpath; +use function str_starts_with; /** * @internal This class is not covered by the backward compatibility promise for PHPUnit @@ -21,4 +24,24 @@ final class Filesystem { return !(!is_dir($directory) && !@mkdir($directory, 0o777, true) && !is_dir($directory)); } + + /** + * @psalm-param non-empty-string $path + * + * @return false|non-empty-string + */ + public static function resolvePathOrStream(string $path): false|string + { + if (str_starts_with($path, 'php://') || str_starts_with($path, 'socket://')) { + return $path; + } + + $path = realpath($path); + + if (is_string($path) && !empty($path)) { + return $path; + } + + return false; + } } diff --git a/vendor/phpunit/phpunit/src/Util/Filter.php b/vendor/phpunit/phpunit/src/Util/Filter.php index 512d2262..46bf082b 100644 --- a/vendor/phpunit/phpunit/src/Util/Filter.php +++ b/vendor/phpunit/phpunit/src/Util/Filter.php @@ -28,7 +28,7 @@ final class Filter /** * @throws Exception */ - public static function getFilteredStacktrace(Throwable $t): string + public static function getFilteredStacktrace(Throwable $t, bool $unwrap = true): string { $filteredStacktrace = ''; @@ -41,7 +41,7 @@ final class Filter $eFile = $t->getFile(); $eLine = $t->getLine(); } else { - if ($t->getPrevious()) { + if ($unwrap && $t->getPrevious()) { $t = $t->getPrevious(); } diff --git a/vendor/psy/psysh/composer.json b/vendor/psy/psysh/composer.json index 3c9bcce2..62295dc1 100644 --- a/vendor/psy/psysh/composer.json +++ b/vendor/psy/psysh/composer.json @@ -13,12 +13,12 @@ } ], "require": { - "php": "^8.0 || ^7.0.8", + "php": "^8.0 || ^7.4", "ext-json": "*", "ext-tokenizer": "*", - "symfony/console": "^6.0 || ^5.0 || ^4.0 || ^3.4", - "symfony/var-dumper": "^6.0 || ^5.0 || ^4.0 || ^3.4", - "nikic/php-parser": "^4.0 || ^3.1" + "nikic/php-parser": "^5.0 || ^4.0", + "symfony/console": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4", + "symfony/var-dumper": "^7.0 || ^6.0 || ^5.0 || ^4.0 || ^3.4" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2" @@ -26,7 +26,6 @@ "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", - "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", "ext-pdo-sqlite": "The doc command requires SQLite to work." }, "autoload": { @@ -48,7 +47,7 @@ }, "extra": { "branch-alias": { - "dev-0.11": "0.11.x-dev" + "dev-main": "0.12.x-dev" }, "bamarni-bin": { "bin-links": false, diff --git a/vendor/psy/psysh/src/CodeCleaner.php b/vendor/psy/psysh/src/CodeCleaner.php index 8429847f..0d9900b8 100644 --- a/vendor/psy/psysh/src/CodeCleaner.php +++ b/vendor/psy/psysh/src/CodeCleaner.php @@ -25,7 +25,6 @@ use Psy\CodeCleaner\FinalClassPass; use Psy\CodeCleaner\FunctionContextPass; use Psy\CodeCleaner\FunctionReturnInWriteContextPass; use Psy\CodeCleaner\ImplicitReturnPass; -use Psy\CodeCleaner\InstanceOfPass; use Psy\CodeCleaner\IssetPass; use Psy\CodeCleaner\LabelContextPass; use Psy\CodeCleaner\LeavePsyshAlonePass; @@ -71,12 +70,7 @@ class CodeCleaner $this->yolo = $yolo; $this->strictTypes = $strictTypes; - if ($parser === null) { - $parserFactory = new ParserFactory(); - $parser = $parserFactory->createParser(); - } - - $this->parser = $parser; + $this->parser = $parser ?? (new ParserFactory())->createParser(); $this->printer = $printer ?: new Printer(); $this->traverser = $traverser ?: new NodeTraverser(); @@ -120,7 +114,6 @@ class CodeCleaner new FinalClassPass(), new FunctionContextPass(), new FunctionReturnInWriteContextPass(), - new InstanceOfPass(), new IssetPass(), new LabelContextPass(), new LeavePsyshAlonePass(), diff --git a/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php b/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php index af32fca2..5b491ceb 100644 --- a/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/AbstractClassPass.php @@ -43,7 +43,7 @@ class AbstractClassPass extends CodeCleanerPass if ($node->stmts !== null) { $msg = \sprintf('Abstract function %s cannot contain body', $name); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } } @@ -68,7 +68,7 @@ class AbstractClassPass extends CodeCleanerPass ($count === 1) ? '' : 's', \implode(', ', $this->abstractMethods) ); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/AssignThisVariablePass.php b/vendor/psy/psysh/src/CodeCleaner/AssignThisVariablePass.php index 0a884f0c..cdcb84ad 100644 --- a/vendor/psy/psysh/src/CodeCleaner/AssignThisVariablePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/AssignThisVariablePass.php @@ -35,7 +35,7 @@ class AssignThisVariablePass extends CodeCleanerPass public function enterNode(Node $node) { if ($node instanceof Assign && $node->var instanceof Variable && $node->var->name === 'this') { - throw new FatalErrorException('Cannot re-assign $this', 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException('Cannot re-assign $this', 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/CallTimePassByReferencePass.php b/vendor/psy/psysh/src/CodeCleaner/CallTimePassByReferencePass.php index 3efaa626..c3eaed14 100644 --- a/vendor/psy/psysh/src/CodeCleaner/CallTimePassByReferencePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/CallTimePassByReferencePass.php @@ -50,7 +50,7 @@ class CallTimePassByReferencePass extends CodeCleanerPass } if ($arg->byRef) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php b/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php index b1dd00e1..441685f9 100644 --- a/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/CalledClassPass.php @@ -66,7 +66,7 @@ class CalledClassPass extends CodeCleanerPass $name = \strtolower($node->name); if (\in_array($name, ['get_class', 'get_called_class'])) { $msg = \sprintf('%s() called without object from outside a class', $name); - throw new ErrorException($msg, 0, \E_USER_WARNING, null, $node->getLine()); + throw new ErrorException($msg, 0, \E_USER_WARNING, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php b/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php index d1c82102..88cdae9f 100644 --- a/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/EmptyArrayDimFetchPass.php @@ -59,7 +59,7 @@ class EmptyArrayDimFetchPass extends CodeCleanerPass if ($node instanceof ArrayDimFetch && $node->dim === null) { if (!\in_array($node, $this->theseOnesAreFine)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php b/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php index 889176f0..1507664f 100644 --- a/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/FinalClassPass.php @@ -46,7 +46,7 @@ class FinalClassPass extends CodeCleanerPass $extends = (string) $node->extends; if ($this->isFinalClass($extends)) { $msg = \sprintf('Class %s may not inherit from final class (%s)', $node->name, $extends); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/FunctionContextPass.php b/vendor/psy/psysh/src/CodeCleaner/FunctionContextPass.php index e73e85b3..07a3e8fd 100644 --- a/vendor/psy/psysh/src/CodeCleaner/FunctionContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/FunctionContextPass.php @@ -50,7 +50,7 @@ class FunctionContextPass extends CodeCleanerPass // It causes fatal error. if ($node instanceof Yield_) { $msg = 'The "yield" expression can only be used inside a function'; - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php b/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php index a0c74d01..2c50d5fc 100644 --- a/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/FunctionReturnInWriteContextPass.php @@ -53,7 +53,7 @@ class FunctionReturnInWriteContextPass extends CodeCleanerPass } if ($item && $item->byRef && $this->isCallNode($item->value)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } } elseif ($node instanceof Isset_ || $node instanceof Unset_) { @@ -63,10 +63,10 @@ class FunctionReturnInWriteContextPass extends CodeCleanerPass } $msg = $node instanceof Isset_ ? self::ISSET_MESSAGE : self::EXCEPTION_MESSAGE; - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } elseif ($node instanceof Assign && $this->isCallNode($node->var)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php b/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php index d794bbe7..2e4ebf3d 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ImplicitReturnPass.php @@ -77,15 +77,14 @@ class ImplicitReturnPass extends CodeCleanerPass } elseif ($last instanceof Expr && !($last instanceof Exit_)) { // @codeCoverageIgnoreStart $nodes[\count($nodes) - 1] = new Return_($last, [ - 'startLine' => $last->getLine(), - 'endLine' => $last->getLine(), + 'startLine' => $last->getStartLine(), + 'endLine' => $last->getEndLine(), ]); // @codeCoverageIgnoreEnd } elseif ($last instanceof Expression && !($last->expr instanceof Exit_)) { - // For PHP Parser 4.x $nodes[\count($nodes) - 1] = new Return_($last->expr, [ - 'startLine' => $last->getLine(), - 'endLine' => $last->getLine(), + 'startLine' => $last->getStartLine(), + 'endLine' => $last->getEndLine(), ]); } elseif ($last instanceof Namespace_) { $last->stmts = $this->addImplicitReturn($last->stmts); diff --git a/vendor/psy/psysh/src/CodeCleaner/InstanceOfPass.php b/vendor/psy/psysh/src/CodeCleaner/InstanceOfPass.php deleted file mode 100644 index f5cc704a..00000000 --- a/vendor/psy/psysh/src/CodeCleaner/InstanceOfPass.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -/* - * This file is part of Psy Shell. - * - * (c) 2012-2023 Justin Hileman - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Psy\CodeCleaner; - -use PhpParser\Node; -use PhpParser\Node\Expr\Array_; -use PhpParser\Node\Expr\BinaryOp; -use PhpParser\Node\Expr\ClassConstFetch; -use PhpParser\Node\Expr\ConstFetch; -use PhpParser\Node\Expr\Instanceof_; -use PhpParser\Node\Scalar; -use PhpParser\Node\Scalar\Encapsed; -use Psy\Exception\FatalErrorException; - -/** - * Validate that the instanceof statement does not receive a scalar value or a non-class constant. - * - * @author Martin Hasoň <martin.hason@gmail.com> - */ -class InstanceOfPass extends CodeCleanerPass -{ - const EXCEPTION_MSG = 'instanceof expects an object instance, constant given'; - - private $atLeastPhp73; - - public function __construct() - { - $this->atLeastPhp73 = \version_compare(\PHP_VERSION, '7.3', '>='); - } - - /** - * Validate that the instanceof statement does not receive a scalar value or a non-class constant. - * - * @throws FatalErrorException if a scalar or a non-class constant is given - * - * @param Node $node - * - * @return int|Node|null Replacement node (or special return value) - */ - public function enterNode(Node $node) - { - // Basically everything is allowed in PHP 7.3 :) - if ($this->atLeastPhp73) { - return; - } - - if (!$node instanceof Instanceof_) { - return; - } - - if (($node->expr instanceof Scalar && !$node->expr instanceof Encapsed) || - $node->expr instanceof BinaryOp || - $node->expr instanceof Array_ || - $node->expr instanceof ConstFetch || - $node->expr instanceof ClassConstFetch - ) { - throw new FatalErrorException(self::EXCEPTION_MSG, 0, \E_ERROR, null, $node->getLine()); - } - } -} diff --git a/vendor/psy/psysh/src/CodeCleaner/IssetPass.php b/vendor/psy/psysh/src/CodeCleaner/IssetPass.php index 2729bea1..fa8f60cf 100644 --- a/vendor/psy/psysh/src/CodeCleaner/IssetPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/IssetPass.php @@ -42,7 +42,7 @@ class IssetPass extends CodeCleanerPass foreach ($node->vars as $var) { if (!$var instanceof Variable && !$var instanceof ArrayDimFetch && !$var instanceof PropertyFetch && !$var instanceof NullsafePropertyFetch) { - throw new FatalErrorException(self::EXCEPTION_MSG, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MSG, 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php b/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php index f34424d5..44962f63 100644 --- a/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/LabelContextPass.php @@ -68,9 +68,9 @@ class LabelContextPass extends CodeCleanerPass } if ($node instanceof Goto_) { - $this->labelGotos[\strtolower($node->name)] = $node->getLine(); + $this->labelGotos[\strtolower($node->name)] = $node->getStartLine(); } elseif ($node instanceof Label) { - $this->labelDeclarations[\strtolower($node->name)] = $node->getLine(); + $this->labelDeclarations[\strtolower($node->name)] = $node->getStartLine(); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ListPass.php b/vendor/psy/psysh/src/CodeCleaner/ListPass.php index a44ba003..eb0001ab 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ListPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ListPass.php @@ -12,7 +12,6 @@ namespace Psy\CodeCleaner; use PhpParser\Node; -use PhpParser\Node\Expr; use PhpParser\Node\Expr\Array_; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\ArrayItem; @@ -29,13 +28,6 @@ use Psy\Exception\ParseErrorException; */ class ListPass extends CodeCleanerPass { - private $atLeastPhp71; - - public function __construct() - { - $this->atLeastPhp71 = \version_compare(\PHP_VERSION, '7.1', '>='); - } - /** * Validate use of list assignment. * @@ -55,16 +47,11 @@ class ListPass extends CodeCleanerPass return; } - if (!$this->atLeastPhp71 && $node->var instanceof Array_) { - $msg = "syntax error, unexpected '='"; - throw new ParseErrorException($msg, $node->expr->getLine()); - } - // Polyfill for PHP-Parser 2.x $items = isset($node->var->items) ? $node->var->items : $node->var->vars; if ($items === [] || $items === [null]) { - throw new ParseErrorException('Cannot use empty list', $node->var->getLine()); + throw new ParseErrorException('Cannot use empty list', ['startLine' => $node->var->getStartLine(), 'endLine' => $node->var->getEndLine()]); } $itemFound = false; @@ -75,15 +62,9 @@ class ListPass extends CodeCleanerPass $itemFound = true; - // List_->$vars in PHP-Parser 2.x is Variable instead of ArrayItem. - if (!$this->atLeastPhp71 && $item instanceof ArrayItem && $item->key !== null) { - $msg = 'Syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting \',\' or \')\''; - throw new ParseErrorException($msg, $item->key->getLine()); - } - if (!self::isValidArrayItem($item)) { $msg = 'Assignments can only happen to writable values'; - throw new ParseErrorException($msg, $item->getLine()); + throw new ParseErrorException($msg, ['startLine' => $item->getStartLine(), 'endLine' => $item->getEndLine()]); } } @@ -95,9 +76,9 @@ class ListPass extends CodeCleanerPass /** * Validate whether a given item in an array is valid for short assignment. * - * @param Expr $item + * @param Node $item */ - private static function isValidArrayItem(Expr $item): bool + private static function isValidArrayItem(Node $item): bool { $value = ($item instanceof ArrayItem) ? $item->value : $item; diff --git a/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php b/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php index c41d4b8a..5bb175e4 100644 --- a/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/LoopContextPass.php @@ -67,23 +67,23 @@ class LoopContextPass extends CodeCleanerPass if ($this->loopDepth === 0) { $msg = \sprintf("'%s' not in the 'loop' or 'switch' context", $operator); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } if ($node->num instanceof LNumber || $node->num instanceof DNumber) { $num = $node->num->value; if ($node->num instanceof DNumber || $num < 1) { $msg = \sprintf("'%s' operator accepts only positive numbers", $operator); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } if ($num > $this->loopDepth) { $msg = \sprintf("Cannot '%s' %d levels", $operator, $num); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } elseif ($node->num) { $msg = \sprintf("'%s' operator with non-constant operand is no longer supported", $operator); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } break; } diff --git a/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php b/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php index ba82f9d8..53290fd8 100644 --- a/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/NamespaceAwarePass.php @@ -49,7 +49,7 @@ abstract class NamespaceAwarePass extends CodeCleanerPass public function enterNode(Node $node) { if ($node instanceof Namespace_) { - $this->namespace = isset($node->name) ? $node->name->parts : []; + $this->namespace = isset($node->name) ? $this->getParts($node->name) : []; } } @@ -61,13 +61,25 @@ abstract class NamespaceAwarePass extends CodeCleanerPass protected function getFullyQualifiedName($name): string { if ($name instanceof FullyQualifiedName) { - return \implode('\\', $name->parts); - } elseif ($name instanceof Name) { - $name = $name->parts; + return \implode('\\', $this->getParts($name)); + } + + if ($name instanceof Name) { + $name = $this->getParts($name); } elseif (!\is_array($name)) { $name = [$name]; } return \implode('\\', \array_merge($this->namespace, $name)); } + + /** + * Backwards compatibility shim for PHP-Parser 4.x. + * + * At some point we might want to make $namespace a plain string, to match how Name works? + */ + protected function getParts(Name $name): array + { + return \method_exists($name, 'getParts') ? $name->getParts() : $name->parts; + } } diff --git a/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php b/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php index 470f0fa4..25c0be03 100644 --- a/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/NamespacePass.php @@ -86,6 +86,16 @@ class NamespacePass extends CodeCleanerPass private function setNamespace($namespace) { $this->namespace = $namespace; - $this->cleaner->setNamespace($namespace === null ? null : $namespace->parts); + $this->cleaner->setNamespace($namespace === null ? null : $this->getParts($namespace)); + } + + /** + * Backwards compatibility shim for PHP-Parser 4.x. + * + * At some point we might want to make the namespace a plain string, to match how Name works? + */ + protected function getParts(Name $name): array + { + return \method_exists($name, 'getParts') ? $name->getParts() : $name->parts; } } diff --git a/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php b/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php index 9a911e4b..7a331515 100644 --- a/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/PassableByReferencePass.php @@ -63,7 +63,7 @@ class PassableByReferencePass extends CodeCleanerPass if (\array_key_exists($key, $node->args)) { $arg = $node->args[$key]; if ($param->isPassedByReference() && !$this->isPassableByReference($arg)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } } @@ -112,7 +112,7 @@ class PassableByReferencePass extends CodeCleanerPass } elseif (++$nonPassable > 2) { // There can be *at most* two non-passable-by-reference args in a row. This is about // as close as we can get to validating the arguments for this function :-/ - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } } } diff --git a/vendor/psy/psysh/src/CodeCleaner/RequirePass.php b/vendor/psy/psysh/src/CodeCleaner/RequirePass.php index 15cb3a0a..0fe7af07 100644 --- a/vendor/psy/psysh/src/CodeCleaner/RequirePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/RequirePass.php @@ -52,7 +52,7 @@ class RequirePass extends CodeCleanerPass $node->expr = new StaticCall( new FullyQualifiedName(self::class), 'resolve', - [new Arg($origNode->expr), new Arg(new LNumber($origNode->getLine()))], + [new Arg($origNode->expr), new Arg(new LNumber($origNode->getStartLine()))], $origNode->getAttributes() ); @@ -71,11 +71,11 @@ class RequirePass extends CodeCleanerPass * @throws ErrorException if $file is empty and E_WARNING is included in error_reporting level * * @param string $file - * @param int $lineNumber Line number of the original require expression + * @param int $startLine Line number of the original require expression * * @return string Exactly the same as $file, unless $file collides with a path in the currently running phar */ - public static function resolve($file, $lineNumber = null): string + public static function resolve($file, $startLine = null): string { $file = (string) $file; @@ -84,7 +84,7 @@ class RequirePass extends CodeCleanerPass // fake the file and line number, but we can't call it statically. // So we're duplicating some of the logics here. if (\E_WARNING & \error_reporting()) { - ErrorException::throwException(\E_WARNING, 'Filename cannot be empty', null, $lineNumber); + ErrorException::throwException(\E_WARNING, 'Filename cannot be empty', null, $startLine); } // @todo trigger an error as fallback? this is pretty ugly… // trigger_error('Filename cannot be empty', E_USER_WARNING); @@ -93,7 +93,7 @@ class RequirePass extends CodeCleanerPass $resolvedPath = \stream_resolve_include_path($file); if ($file === '' || !$resolvedPath) { $msg = \sprintf("Failed opening required '%s'", $file); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $lineNumber); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $startLine); } // Special case: if the path is not already relative or absolute, and it would resolve to diff --git a/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php b/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php index 626e5a62..c9894fbd 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ReturnTypePass.php @@ -32,14 +32,8 @@ class ReturnTypePass extends CodeCleanerPass const VOID_NULL_MESSAGE = 'A void function must not return a value (did you mean "return;" instead of "return null;"?)'; const NULLABLE_VOID_MESSAGE = 'Void type cannot be nullable'; - private $atLeastPhp71; private $returnTypeStack = []; - public function __construct() - { - $this->atLeastPhp71 = \version_compare(\PHP_VERSION, '7.1', '>='); - } - /** * {@inheritdoc} * @@ -47,10 +41,6 @@ class ReturnTypePass extends CodeCleanerPass */ public function enterNode(Node $node) { - if (!$this->atLeastPhp71) { - return; // @codeCoverageIgnore - } - if ($this->isFunctionNode($node)) { $this->returnTypeStack[] = $node->returnType; @@ -82,7 +72,7 @@ class ReturnTypePass extends CodeCleanerPass } if ($msg !== null) { - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } } @@ -94,10 +84,6 @@ class ReturnTypePass extends CodeCleanerPass */ public function leaveNode(Node $node) { - if (!$this->atLeastPhp71) { - return; // @codeCoverageIgnore - } - if (!empty($this->returnTypeStack) && $this->isFunctionNode($node)) { \array_pop($this->returnTypeStack); } diff --git a/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php b/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php index 7fa0ed8e..d0ce353c 100644 --- a/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/StrictTypesPass.php @@ -12,7 +12,6 @@ namespace Psy\CodeCleaner; use PhpParser\Node; -use PhpParser\Node\Identifier; use PhpParser\Node\Scalar\LNumber; use PhpParser\Node\Stmt\Declare_; use PhpParser\Node\Stmt\DeclareDeclare; @@ -61,12 +60,10 @@ class StrictTypesPass extends CodeCleanerPass foreach ($nodes as $node) { if ($node instanceof Declare_) { foreach ($node->declares as $declare) { - // For PHP Parser 4.x - $declareKey = $declare->key instanceof Identifier ? $declare->key->toString() : $declare->key; - if ($declareKey === 'strict_types') { + if ($declare->key->toString() === 'strict_types') { $value = $declare->value; if (!$value instanceof LNumber || ($value->value !== 0 && $value->value !== 1)) { - throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException(self::EXCEPTION_MESSAGE, 0, \E_ERROR, null, $node->getStartLine()); } $this->strictTypes = $value->value === 1; diff --git a/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php b/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php index 86278513..5d4cbdcf 100644 --- a/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/UseStatementPass.php @@ -17,6 +17,7 @@ use PhpParser\Node\Name\FullyQualified as FullyQualifiedName; use PhpParser\Node\Stmt\GroupUse; use PhpParser\Node\Stmt\Namespace_; use PhpParser\Node\Stmt\Use_; +use PhpParser\Node\Stmt\UseItem; use PhpParser\Node\Stmt\UseUse; use PhpParser\NodeTraverser; @@ -72,9 +73,8 @@ class UseStatementPass extends CodeCleanerPass { // Store a reference to every "use" statement, because we'll need them in a bit. if ($node instanceof Use_) { - foreach ($node->uses as $use) { - $alias = $use->alias ?: \end($use->name->parts); - $this->aliases[\strtolower($alias)] = $use->name; + foreach ($node->uses as $useItem) { + $this->aliases[\strtolower($useItem->getAlias())] = $useItem->name; } return NodeTraverser::REMOVE_NODE; @@ -82,11 +82,10 @@ class UseStatementPass extends CodeCleanerPass // Expand every "use" statement in the group into a full, standalone "use" and store 'em with the others. if ($node instanceof GroupUse) { - foreach ($node->uses as $use) { - $alias = $use->alias ?: \end($use->name->parts); - $this->aliases[\strtolower($alias)] = Name::concat($node->prefix, $use->name, [ + foreach ($node->uses as $useItem) { + $this->aliases[\strtolower($useItem->getAlias())] = Name::concat($node->prefix, $useItem->name, [ 'startLine' => $node->prefix->getAttribute('startLine'), - 'endLine' => $use->name->getAttribute('endLine'), + 'endLine' => $useItem->name->getAttribute('endLine'), ]); } @@ -102,8 +101,9 @@ class UseStatementPass extends CodeCleanerPass return; } - // Do nothing with UseUse; this an entry in the list of uses in the use statement. - if ($node instanceof UseUse) { + // Do nothing with UseItem; this an entry in the list of uses in the use statement. + // @todo Remove UseUse once we drop support for PHP-Parser 4.x + if ($node instanceof UseUse || $node instanceof UseItem) { return; } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php b/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php index aa9f29d1..dff32d58 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidClassNamePass.php @@ -79,8 +79,6 @@ class ValidClassNamePass extends NamespaceAwarePass { if (self::isConditional($node)) { $this->conditionalScopes--; - - return; } } @@ -261,30 +259,6 @@ class ValidClassNamePass extends NamespaceAwarePass } } - /** - * Get a symbol type key for storing in the scope name cache. - * - * @deprecated No longer used. Scope type should be passed into ensureCanDefine directly. - * - * @codeCoverageIgnore - * - * @throws FatalErrorException - * - * @param Stmt $stmt - */ - protected function getScopeType(Stmt $stmt): string - { - if ($stmt instanceof Class_) { - return self::CLASS_TYPE; - } elseif ($stmt instanceof Interface_) { - return self::INTERFACE_TYPE; - } elseif ($stmt instanceof Trait_) { - return self::TRAIT_TYPE; - } - - throw $this->createError('Unsupported statement type', $stmt); - } - /** * Check whether a class exists, or has been defined in the current code snippet. * @@ -347,6 +321,6 @@ class ValidClassNamePass extends NamespaceAwarePass */ protected function createError(string $msg, Stmt $stmt): FatalErrorException { - return new FatalErrorException($msg, 0, \E_ERROR, null, $stmt->getLine()); + return new FatalErrorException($msg, 0, \E_ERROR, null, $stmt->getStartLine()); } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php b/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php index 817104a6..481de6fc 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidConstructorPass.php @@ -12,7 +12,7 @@ namespace Psy\CodeCleaner; use PhpParser\Node; -use PhpParser\Node\Identifier; +use PhpParser\Node\Name; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Namespace_; @@ -56,7 +56,7 @@ class ValidConstructorPass extends CodeCleanerPass public function enterNode(Node $node) { if ($node instanceof Namespace_) { - $this->namespace = isset($node->name) ? $node->name->parts : []; + $this->namespace = isset($node->name) ? $this->getParts($node->name) : []; } elseif ($node instanceof Class_) { $constructor = null; foreach ($node->stmts as $stmt) { @@ -91,27 +91,31 @@ class ValidConstructorPass extends CodeCleanerPass private function validateConstructor(Node $constructor, Node $classNode) { if ($constructor->isStatic()) { - // For PHP Parser 4.x - $className = $classNode->name instanceof Identifier ? $classNode->name->toString() : $classNode->name; - $msg = \sprintf( 'Constructor %s::%s() cannot be static', - \implode('\\', \array_merge($this->namespace, (array) $className)), + \implode('\\', \array_merge($this->namespace, (array) $classNode->name->toString())), $constructor->name ); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $classNode->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $classNode->getStartLine()); } if (\method_exists($constructor, 'getReturnType') && $constructor->getReturnType()) { - // For PHP Parser 4.x - $className = $classNode->name instanceof Identifier ? $classNode->name->toString() : $classNode->name; - $msg = \sprintf( 'Constructor %s::%s() cannot declare a return type', - \implode('\\', \array_merge($this->namespace, (array) $className)), + \implode('\\', \array_merge($this->namespace, (array) $classNode->name->toString())), $constructor->name ); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $classNode->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $classNode->getStartLine()); } } + + /** + * Backwards compatibility shim for PHP-Parser 4.x. + * + * At some point we might want to make $namespace a plain string, to match how Name works? + */ + protected function getParts(Name $name): array + { + return \method_exists($name, 'getParts') ? $name->getParts() : $name->parts; + } } diff --git a/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php b/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php index 7703d7d3..bd20607c 100644 --- a/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php +++ b/vendor/psy/psysh/src/CodeCleaner/ValidFunctionNamePass.php @@ -53,7 +53,7 @@ class ValidFunctionNamePass extends NamespaceAwarePass if (\function_exists($name) || isset($this->currentScope[\strtolower($name)])) { $msg = \sprintf('Cannot redeclare %s()', $name); - throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getLine()); + throw new FatalErrorException($msg, 0, \E_ERROR, null, $node->getStartLine()); } } diff --git a/vendor/psy/psysh/src/Command/BufferCommand.php b/vendor/psy/psysh/src/Command/BufferCommand.php index 81d8ff91..8348aee6 100644 --- a/vendor/psy/psysh/src/Command/BufferCommand.php +++ b/vendor/psy/psysh/src/Command/BufferCommand.php @@ -50,7 +50,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $app = $this->getApplication(); if (!$app instanceof \Psy\Shell) { diff --git a/vendor/psy/psysh/src/Command/ClearCommand.php b/vendor/psy/psysh/src/Command/ClearCommand.php index baca9af0..42a66b0f 100644 --- a/vendor/psy/psysh/src/Command/ClearCommand.php +++ b/vendor/psy/psysh/src/Command/ClearCommand.php @@ -44,7 +44,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $output->write(\sprintf('%c[2J%c[0;0f', 27, 27)); diff --git a/vendor/psy/psysh/src/Command/Command.php b/vendor/psy/psysh/src/Command/Command.php index 09750884..0d18d2c6 100644 --- a/vendor/psy/psysh/src/Command/Command.php +++ b/vendor/psy/psysh/src/Command/Command.php @@ -30,13 +30,13 @@ abstract class Command extends BaseCommand * * @api */ - public function setApplication(Application $application = null) + public function setApplication(Application $application = null): void { if ($application !== null && !$application instanceof Shell) { throw new \InvalidArgumentException('PsySH Commands require an instance of Psy\Shell'); } - return parent::setApplication($application); + parent::setApplication($application); } /** diff --git a/vendor/psy/psysh/src/Command/DocCommand.php b/vendor/psy/psysh/src/Command/DocCommand.php index 5360832a..1650ccf6 100644 --- a/vendor/psy/psysh/src/Command/DocCommand.php +++ b/vendor/psy/psysh/src/Command/DocCommand.php @@ -15,8 +15,7 @@ use Psy\Formatter\DocblockFormatter; use Psy\Formatter\SignatureFormatter; use Psy\Input\CodeArgument; use Psy\Output\ShellOutput; -use Psy\Reflection\ReflectionClassConstant; -use Psy\Reflection\ReflectionConstant_; +use Psy\Reflection\ReflectionConstant; use Psy\Reflection\ReflectionLanguageConstruct; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -63,7 +62,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $value = $input->getArgument('target'); if (ReflectionLanguageConstruct::isLanguageConstruct($value)) { @@ -146,14 +145,13 @@ HELP break; case \ReflectionClassConstant::class: - case ReflectionClassConstant::class: // @todo this is going to collide with ReflectionMethod ids // someday... start running the query by id + type if the DB // supports it. $id = $reflector->class.'::'.$reflector->name; break; - case ReflectionConstant_::class: + case ReflectionConstant::class: $id = $reflector->name; break; diff --git a/vendor/psy/psysh/src/Command/DumpCommand.php b/vendor/psy/psysh/src/Command/DumpCommand.php index c44bb40a..88ddbe26 100644 --- a/vendor/psy/psysh/src/Command/DumpCommand.php +++ b/vendor/psy/psysh/src/Command/DumpCommand.php @@ -69,7 +69,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $depth = $input->getOption('depth'); $target = $this->resolveCode($input->getArgument('target')); @@ -81,18 +81,4 @@ HELP return 0; } - - /** - * @deprecated Use `resolveCode` instead - * - * @param string $name - * - * @return mixed - */ - protected function resolveTarget(string $name) - { - @\trigger_error('`resolveTarget` is deprecated; use `resolveCode` instead.', \E_USER_DEPRECATED); - - return $this->resolveCode($name); - } } diff --git a/vendor/psy/psysh/src/Command/EditCommand.php b/vendor/psy/psysh/src/Command/EditCommand.php index af2914d5..7612b3de 100644 --- a/vendor/psy/psysh/src/Command/EditCommand.php +++ b/vendor/psy/psysh/src/Command/EditCommand.php @@ -79,7 +79,7 @@ class EditCommand extends Command implements ContextAware * @throws \InvalidArgumentException when both exec and no-exec flags are given or if a given variable is not found in the current context * @throws \UnexpectedValueException if file_get_contents on the edited file returns false instead of a string */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { if ($input->getOption('exec') && $input->getOption('no-exec')) { diff --git a/vendor/psy/psysh/src/Command/ExitCommand.php b/vendor/psy/psysh/src/Command/ExitCommand.php index 01f72d9f..6552e288 100644 --- a/vendor/psy/psysh/src/Command/ExitCommand.php +++ b/vendor/psy/psysh/src/Command/ExitCommand.php @@ -47,7 +47,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { throw new BreakException('Goodbye'); } diff --git a/vendor/psy/psysh/src/Command/HelpCommand.php b/vendor/psy/psysh/src/Command/HelpCommand.php index 9443c550..13ea3483 100644 --- a/vendor/psy/psysh/src/Command/HelpCommand.php +++ b/vendor/psy/psysh/src/Command/HelpCommand.php @@ -55,7 +55,7 @@ class HelpCommand extends Command * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { if ($this->command !== null) { // help for an individual command diff --git a/vendor/psy/psysh/src/Command/HistoryCommand.php b/vendor/psy/psysh/src/Command/HistoryCommand.php index 94306e40..cf5f29b9 100644 --- a/vendor/psy/psysh/src/Command/HistoryCommand.php +++ b/vendor/psy/psysh/src/Command/HistoryCommand.php @@ -93,7 +93,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->validateOnlyOne($input, ['show', 'head', 'tail']); $this->validateOnlyOne($input, ['save', 'replay', 'clear']); diff --git a/vendor/psy/psysh/src/Command/ListCommand.php b/vendor/psy/psysh/src/Command/ListCommand.php index 6910d903..1982aa4c 100644 --- a/vendor/psy/psysh/src/Command/ListCommand.php +++ b/vendor/psy/psysh/src/Command/ListCommand.php @@ -114,7 +114,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->validateInput($input); $this->initEnumerators(); diff --git a/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php b/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php index 2ae84b12..803a02e1 100644 --- a/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php +++ b/vendor/psy/psysh/src/Command/ListCommand/ClassConstantEnumerator.php @@ -11,7 +11,6 @@ namespace Psy\Command\ListCommand; -use Psy\Reflection\ReflectionClassConstant; use Symfony\Component\Console\Input\InputInterface; /** @@ -67,7 +66,7 @@ class ClassConstantEnumerator extends Enumerator $constants = []; foreach ($reflector->getConstants() as $name => $constant) { - $constReflector = ReflectionClassConstant::create($reflector->name, $name); + $constReflector = new \ReflectionClassConstant($reflector->name, $name); if ($noInherit && $constReflector->getDeclaringClass()->getName() !== $className) { continue; diff --git a/vendor/psy/psysh/src/Command/ParseCommand.php b/vendor/psy/psysh/src/Command/ParseCommand.php index a62be67f..d97c751a 100644 --- a/vendor/psy/psysh/src/Command/ParseCommand.php +++ b/vendor/psy/psysh/src/Command/ParseCommand.php @@ -12,7 +12,6 @@ namespace Psy\Command; use PhpParser\Node; -use PhpParser\Parser; use Psy\Context; use Psy\ContextAware; use Psy\Input\CodeArgument; @@ -37,16 +36,14 @@ class ParseCommand extends Command implements ContextAware, PresenterAware protected $context; private $presenter; - private $parserFactory; - private $parsers; + private $parser; /** * {@inheritdoc} */ public function __construct($name = null) { - $this->parserFactory = new ParserFactory(); - $this->parsers = []; + $this->parser = (new ParserFactory())->createParser(); parent::__construct($name); } @@ -90,16 +87,11 @@ class ParseCommand extends Command implements ContextAware, PresenterAware */ protected function configure() { - $kindMsg = 'One of PhpParser\\ParserFactory constants: ' - .\implode(', ', ParserFactory::getPossibleKinds()) - ." (default is based on current interpreter's version)."; - $this ->setName('parse') ->setDefinition([ new CodeArgument('code', CodeArgument::REQUIRED, 'PHP code to parse.'), new InputOption('depth', '', InputOption::VALUE_REQUIRED, 'Depth to parse.', 10), - new InputOption('kind', '', InputOption::VALUE_REQUIRED, $kindMsg, $this->parserFactory->getDefaultKind()), ]) ->setDescription('Parse PHP code and show the abstract syntax tree.') ->setHelp( @@ -119,31 +111,17 @@ HELP /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $code = $input->getArgument('code'); $parserKind = $input->getOption('kind'); $depth = $input->getOption('depth'); - $nodes = $this->getParser($parserKind)->parse($code); + $nodes = $this->parser->parse($code); $output->page($this->presenter->present($nodes, $depth)); $this->context->setReturnValue($nodes); return 0; } - - /** - * Get (or create) the Parser instance. - * - * @param string|null $kind One of Psy\ParserFactory constants (only for PHP parser 2.0 and above) - */ - private function getParser(string $kind = null): CodeArgumentParser - { - if (!\array_key_exists($kind, $this->parsers)) { - $this->parsers[$kind] = new CodeArgumentParser($this->parserFactory->createParser($kind)); - } - - return $this->parsers[$kind]; - } } diff --git a/vendor/psy/psysh/src/Command/PsyVersionCommand.php b/vendor/psy/psysh/src/Command/PsyVersionCommand.php index 44e75283..959a9a78 100644 --- a/vendor/psy/psysh/src/Command/PsyVersionCommand.php +++ b/vendor/psy/psysh/src/Command/PsyVersionCommand.php @@ -34,7 +34,7 @@ class PsyVersionCommand extends Command /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln($this->getApplication()->getVersion()); diff --git a/vendor/psy/psysh/src/Command/ReflectingCommand.php b/vendor/psy/psysh/src/Command/ReflectingCommand.php index b9b21f96..55b9fbf2 100644 --- a/vendor/psy/psysh/src/Command/ReflectingCommand.php +++ b/vendor/psy/psysh/src/Command/ReflectingCommand.php @@ -19,8 +19,7 @@ use Psy\ContextAware; use Psy\Exception\ErrorException; use Psy\Exception\RuntimeException; use Psy\Exception\UnexpectedTargetException; -use Psy\Reflection\ReflectionClassConstant; -use Psy\Reflection\ReflectionConstant_; +use Psy\Reflection\ReflectionConstant; use Psy\Sudo\SudoVisitor; use Psy\Util\Mirror; @@ -227,20 +226,6 @@ abstract class ReflectingCommand extends Command implements ContextAware return $value; } - /** - * @deprecated Use `resolveCode` instead - * - * @param string $name - * - * @return mixed Variable instance - */ - protected function resolveInstance(string $name) - { - @\trigger_error('`resolveInstance` is deprecated; use `resolveCode` instead.', \E_USER_DEPRECATED); - - return $this->resolveCode($name); - } - /** * Get a variable from the current shell scope. * @@ -314,7 +299,6 @@ abstract class ReflectingCommand extends Command implements ContextAware case \ReflectionProperty::class: case \ReflectionClassConstant::class: - case ReflectionClassConstant::class: $classReflector = $reflector->getDeclaringClass(); $vars['__class'] = $classReflector->name; if ($classReflector->inNamespace()) { @@ -327,7 +311,7 @@ abstract class ReflectingCommand extends Command implements ContextAware } break; - case ReflectionConstant_::class: + case ReflectionConstant::class: if ($reflector->inNamespace()) { $vars['__namespace'] = $reflector->getNamespaceName(); } diff --git a/vendor/psy/psysh/src/Command/ShowCommand.php b/vendor/psy/psysh/src/Command/ShowCommand.php index ecb427cf..4d721d72 100644 --- a/vendor/psy/psysh/src/Command/ShowCommand.php +++ b/vendor/psy/psysh/src/Command/ShowCommand.php @@ -29,14 +29,6 @@ class ShowCommand extends ReflectingCommand private $lastException; private $lastExceptionIndex; - /** - * @param string|null $colorMode (deprecated and ignored) - */ - public function __construct($colorMode = null) - { - parent::__construct(); - } - /** * {@inheritdoc} */ @@ -72,7 +64,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { // n.b. As far as I can tell, InputInterface doesn't want to tell me // whether an option with an optional value was actually passed. If you diff --git a/vendor/psy/psysh/src/Command/SudoCommand.php b/vendor/psy/psysh/src/Command/SudoCommand.php index b398bd89..bd08d14b 100644 --- a/vendor/psy/psysh/src/Command/SudoCommand.php +++ b/vendor/psy/psysh/src/Command/SudoCommand.php @@ -96,7 +96,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $code = $input->getArgument('code'); diff --git a/vendor/psy/psysh/src/Command/ThrowUpCommand.php b/vendor/psy/psysh/src/Command/ThrowUpCommand.php index 5d8402f5..8e597914 100644 --- a/vendor/psy/psysh/src/Command/ThrowUpCommand.php +++ b/vendor/psy/psysh/src/Command/ThrowUpCommand.php @@ -13,13 +13,12 @@ namespace Psy\Command; use PhpParser\Node\Arg; use PhpParser\Node\Expr\New_; +use PhpParser\Node\Expr\Throw_; use PhpParser\Node\Expr\Variable; use PhpParser\Node\Name\FullyQualified as FullyQualifiedName; use PhpParser\Node\Scalar\String_; -use PhpParser\Node\Stmt\Throw_; +use PhpParser\Node\Stmt\Expression; use PhpParser\PrettyPrinter\Standard as Printer; -use Psy\Context; -use Psy\ContextAware; use Psy\Exception\ThrowUpException; use Psy\Input\CodeArgument; use Symfony\Component\Console\Input\InputInterface; @@ -28,7 +27,7 @@ use Symfony\Component\Console\Output\OutputInterface; /** * Throw an exception or error out of the Psy Shell. */ -class ThrowUpCommand extends Command implements ContextAware +class ThrowUpCommand extends Command { private $parser; private $printer; @@ -44,16 +43,6 @@ class ThrowUpCommand extends Command implements ContextAware parent::__construct($name); } - /** - * @deprecated throwUp no longer needs to be ContextAware - * - * @param Context $context - */ - public function setContext(Context $context) - { - // Do nothing - } - /** * {@inheritdoc} */ @@ -87,10 +76,10 @@ HELP * * @throws \InvalidArgumentException if there is no exception to throw */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $args = $this->prepareArgs($input->getArgument('exception')); - $throwStmt = new Throw_(new New_(new FullyQualifiedName(ThrowUpException::class), $args)); + $throwStmt = new Expression(new Throw_(new New_(new FullyQualifiedName(ThrowUpException::class), $args))); $throwCode = $this->printer->prettyPrint([$throwStmt]); $shell = $this->getApplication(); @@ -123,9 +112,7 @@ HELP } $node = $nodes[0]; - - // Make this work for PHP Parser v3.x - $expr = isset($node->expr) ? $node->expr : $node; + $expr = $node->expr; $args = [new Arg($expr, false, false, $node->getAttributes())]; diff --git a/vendor/psy/psysh/src/Command/TimeitCommand.php b/vendor/psy/psysh/src/Command/TimeitCommand.php index 7946e886..3a2efee1 100644 --- a/vendor/psy/psysh/src/Command/TimeitCommand.php +++ b/vendor/psy/psysh/src/Command/TimeitCommand.php @@ -28,7 +28,6 @@ class TimeitCommand extends Command const AVG_RESULT_MSG = '<info>Command took %.6f seconds on average (%.6f median; %.6f total) to complete.</info>'; // All times stored as nanoseconds! - private static $useHrtime; private static $start = null; private static $times = []; @@ -41,9 +40,6 @@ class TimeitCommand extends Command */ public function __construct($name = null) { - // @todo Remove microtime use after we drop support for PHP < 7.3 - self::$useHrtime = \function_exists('hrtime'); - $this->parser = new CodeArgumentParser(); $this->traverser = new NodeTraverser(); @@ -82,7 +78,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $code = $input->getArgument('code'); $num = (int) ($input->getOption('num') ?: 1); @@ -124,7 +120,7 @@ HELP */ public static function markStart() { - self::$start = self::$useHrtime ? \hrtime(true) : (\microtime(true) * 1e+6); + self::$start = \hrtime(true); } /** @@ -143,7 +139,7 @@ HELP */ public static function markEnd($ret = null) { - self::$times[] = (self::$useHrtime ? \hrtime(true) : (\microtime(true) * 1e+6)) - self::$start; + self::$times[] = \hrtime(true) - self::$start; self::$start = null; return $ret; diff --git a/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php b/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php index 0020ff66..68948ee9 100644 --- a/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php +++ b/vendor/psy/psysh/src/Command/TimeitCommand/TimeitVisitor.php @@ -84,7 +84,7 @@ class TimeitVisitor extends NodeVisitorAbstract public function afterTraverse(array $nodes) { // prepend a `markStart` call - \array_unshift($nodes, $this->maybeExpression($this->getStartCall())); + \array_unshift($nodes, new Expression($this->getStartCall(), [])); // append a `markEnd` call (wrapping the final node, if it's an expression) $last = $nodes[\count($nodes) - 1]; @@ -97,7 +97,7 @@ class TimeitVisitor extends NodeVisitorAbstract } elseif ($last instanceof Return_) { // nothing to do here, we're already ending with a return call } else { - $nodes[] = $this->maybeExpression($this->getEndCall()); + $nodes[] = new Expression($this->getEndCall(), []); } return $nodes; @@ -128,19 +128,4 @@ class TimeitVisitor extends NodeVisitorAbstract return new StaticCall(new FullyQualifiedName(TimeitCommand::class), 'markEnd', [new Arg($arg)]); } - - /** - * Compatibility shim for PHP Parser 3.x. - * - * Wrap $expr in a PhpParser\Node\Stmt\Expression if the class exists. - * - * @param \PhpParser\Node $expr - * @param array $attrs - * - * @return \PhpParser\Node\Expr|\PhpParser\Node\Stmt\Expression - */ - private function maybeExpression(Node $expr, array $attrs = []) - { - return \class_exists(Expression::class) ? new Expression($expr, $attrs) : $expr; - } } diff --git a/vendor/psy/psysh/src/Command/TraceCommand.php b/vendor/psy/psysh/src/Command/TraceCommand.php index 8ba1ad86..411237e1 100644 --- a/vendor/psy/psysh/src/Command/TraceCommand.php +++ b/vendor/psy/psysh/src/Command/TraceCommand.php @@ -71,7 +71,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->filter->bind($input); $trace = $this->getBacktrace(new \Exception(), $input->getOption('num'), $input->getOption('include-psy')); diff --git a/vendor/psy/psysh/src/Command/WhereamiCommand.php b/vendor/psy/psysh/src/Command/WhereamiCommand.php index 0c0a6e9c..b7d569be 100644 --- a/vendor/psy/psysh/src/Command/WhereamiCommand.php +++ b/vendor/psy/psysh/src/Command/WhereamiCommand.php @@ -25,10 +25,7 @@ class WhereamiCommand extends Command { private $backtrace; - /** - * @param string|null $colorMode (deprecated and ignored) - */ - public function __construct($colorMode = null) + public function __construct() { $this->backtrace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS); @@ -112,7 +109,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $info = $this->fileInfo(); $num = $input->getOption('num'); diff --git a/vendor/psy/psysh/src/Command/WtfCommand.php b/vendor/psy/psysh/src/Command/WtfCommand.php index 3d967fc5..6e2472c0 100644 --- a/vendor/psy/psysh/src/Command/WtfCommand.php +++ b/vendor/psy/psysh/src/Command/WtfCommand.php @@ -84,7 +84,7 @@ HELP * * @return int 0 if everything went fine, or an exit code */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $this->filter->bind($input); diff --git a/vendor/psy/psysh/src/ConfigPaths.php b/vendor/psy/psysh/src/ConfigPaths.php index 8eb0e1cb..a091d203 100644 --- a/vendor/psy/psysh/src/ConfigPaths.php +++ b/vendor/psy/psysh/src/ConfigPaths.php @@ -120,32 +120,6 @@ class ConfigPaths return $this->allDirNames(\array_merge([$this->homeConfigDir()], $configDirs)); } - /** - * @deprecated - */ - public static function getConfigDirs(): array - { - return (new self())->configDirs(); - } - - /** - * Get potential home config directory paths. - * - * Returns `~/.psysh`, `%APPDATA%/PsySH` (when on Windows), and the - * XDG Base Directory home config directory: - * - * http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html - * - * @deprecated - * - * @return string[] - */ - public static function getHomeConfigDirs(): array - { - // Not quite the same, but this is deprecated anyway /shrug - return self::getConfigDirs(); - } - /** * Get the current home config directory. * @@ -173,14 +147,6 @@ class ConfigPaths return $configDirs[0]; } - /** - * @deprecated - */ - public static function getCurrentConfigDir(): string - { - return (new self())->currentConfigDir(); - } - /** * Find real config files in config directories. * @@ -193,14 +159,6 @@ class ConfigPaths return $this->allRealFiles($this->configDirs(), $names); } - /** - * @deprecated - */ - public static function getConfigFiles(array $names, $configDir = null): array - { - return (new self(['configDir' => $configDir]))->configFiles($names); - } - /** * Get potential data directory paths. * @@ -225,14 +183,6 @@ class ConfigPaths return $this->allDirNames(\array_merge([$homeDataDir], $dataDirs)); } - /** - * @deprecated - */ - public static function getDataDirs(): array - { - return (new self())->dataDirs(); - } - /** * Find real data files in config directories. * @@ -245,14 +195,6 @@ class ConfigPaths return $this->allRealFiles($this->dataDirs(), $names); } - /** - * @deprecated - */ - public static function getDataFiles(array $names, $dataDir = null): array - { - return (new self(['dataDir' => $dataDir]))->dataFiles($names); - } - /** * Get a runtime directory. * @@ -270,14 +212,6 @@ class ConfigPaths return \strtr($runtimeDir, '\\', '/').'/psysh'; } - /** - * @deprecated - */ - public static function getRuntimeDir(): string - { - return (new self())->runtimeDir(); - } - /** * Get a list of directories in PATH. * diff --git a/vendor/psy/psysh/src/Configuration.php b/vendor/psy/psysh/src/Configuration.php index 0be66ea0..c6d0bb57 100644 --- a/vendor/psy/psysh/src/Configuration.php +++ b/vendor/psy/psysh/src/Configuration.php @@ -1097,6 +1097,8 @@ class Configuration */ public function setTabCompletion(bool $useTabCompletion) { + @\trigger_error('`setTabCompletion` is deprecated; call `setUseTabCompletion` instead.', \E_USER_DEPRECATED); + $this->setUseTabCompletion($useTabCompletion); } @@ -1118,6 +1120,8 @@ class Configuration */ public function getTabCompletion(): bool { + @\trigger_error('`getTabCompletion` is deprecated; call `useTabCompletion` instead.', \E_USER_DEPRECATED); + return $this->useTabCompletion(); } @@ -1283,6 +1287,8 @@ class Configuration */ public function getTabCompletionMatchers(): array { + @\trigger_error('`getTabCompletionMatchers` is no longer used.', \E_USER_DEPRECATED); + return []; } @@ -1323,6 +1329,8 @@ class Configuration */ public function addTabCompletionMatchers(array $matchers) { + @\trigger_error('`addTabCompletionMatchers` is deprecated; call `addMatchers` instead.', \E_USER_DEPRECATED); + $this->addMatchers($matchers); } diff --git a/vendor/psy/psysh/src/Exception/ErrorException.php b/vendor/psy/psysh/src/Exception/ErrorException.php index 13e24fe9..26e886a8 100644 --- a/vendor/psy/psysh/src/Exception/ErrorException.php +++ b/vendor/psy/psysh/src/Exception/ErrorException.php @@ -105,8 +105,8 @@ class ErrorException extends \ErrorException implements Exception * * @param \Error $e */ - public static function fromError(\Error $e): self + public static function fromError(\Error $e) { - return new self($e->getMessage(), $e->getCode(), 1, $e->getFile(), $e->getLine(), $e); + @\trigger_error('PsySH no longer wraps Errors', \E_USER_DEPRECATED); } } diff --git a/vendor/psy/psysh/src/Exception/ParseErrorException.php b/vendor/psy/psysh/src/Exception/ParseErrorException.php index 8abfd12f..ee2e2d42 100644 --- a/vendor/psy/psysh/src/Exception/ParseErrorException.php +++ b/vendor/psy/psysh/src/Exception/ParseErrorException.php @@ -19,13 +19,19 @@ class ParseErrorException extends \PhpParser\Error implements Exception /** * Constructor! * - * @param string $message (default: "") - * @param int $line (default: -1) + * @param string $message (default: '') + * @param array|int $attributes Attributes of node/token where error occurred + * (or start line of error -- deprecated) */ - public function __construct(string $message = '', int $line = -1) + public function __construct(string $message = '', $attributes = []) { $message = \sprintf('PHP Parse error: %s', $message); - parent::__construct($message, $line); + + if (!\is_array($attributes)) { + $attributes = ['startLine' => $attributes]; + } + + parent::__construct($message, $attributes); } /** @@ -35,6 +41,6 @@ class ParseErrorException extends \PhpParser\Error implements Exception */ public static function fromParseError(\PhpParser\Error $e): self { - return new self($e->getRawMessage(), $e->getStartLine()); + return new self($e->getRawMessage(), $e->getAttributes()); } } diff --git a/vendor/psy/psysh/src/Exception/ThrowUpException.php b/vendor/psy/psysh/src/Exception/ThrowUpException.php index 6e2da089..b2b758e6 100644 --- a/vendor/psy/psysh/src/Exception/ThrowUpException.php +++ b/vendor/psy/psysh/src/Exception/ThrowUpException.php @@ -40,16 +40,8 @@ class ThrowUpException extends \Exception implements Exception * * @param \Throwable $throwable */ - public static function fromThrowable($throwable): self + public static function fromThrowable($throwable) { - if ($throwable instanceof \Error) { - $throwable = ErrorException::fromError($throwable); - } - - if (!$throwable instanceof \Exception) { - throw new \InvalidArgumentException('throw-up can only throw Exceptions and Errors'); - } - - return new self($throwable); + @\trigger_error('PsySH no longer wraps Throwables', \E_USER_DEPRECATED); } } diff --git a/vendor/psy/psysh/src/Exception/TypeErrorException.php b/vendor/psy/psysh/src/Exception/TypeErrorException.php deleted file mode 100644 index cbf00eaa..00000000 --- a/vendor/psy/psysh/src/Exception/TypeErrorException.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/* - * This file is part of Psy Shell. - * - * (c) 2012-2023 Justin Hileman - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Psy\Exception; - -/** - * A "type error" Exception for Psy. - */ -class TypeErrorException extends \Exception implements Exception -{ - private $rawMessage; - - /** - * Constructor! - * - * @deprecated PsySH no longer wraps TypeErrors - * - * @param string $message (default: "") - * @param int $code (default: 0) - * @param \Throwable|null $previous (default: null) - */ - public function __construct(string $message = '', int $code = 0, \Throwable $previous = null) - { - $this->rawMessage = $message; - $message = \preg_replace('/, called in .*?: eval\\(\\)\'d code/', '', $message); - parent::__construct(\sprintf('TypeError: %s', $message), $code, $previous); - } - - /** - * Get the raw (unformatted) message for this error. - */ - public function getRawMessage(): string - { - return $this->rawMessage; - } - - /** - * Create a TypeErrorException from a TypeError. - * - * @deprecated PsySH no longer wraps TypeErrors - * - * @param \TypeError $e - */ - public static function fromTypeError(\TypeError $e): self - { - return new self($e->getMessage(), $e->getCode(), $e); - } -} diff --git a/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php b/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php index d8465196..987fb1cb 100644 --- a/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php +++ b/vendor/psy/psysh/src/ExecutionLoop/RunkitReloader.php @@ -36,13 +36,10 @@ class RunkitReloader extends AbstractListener /** * Construct a Runkit Reloader. - * - * @todo Pass in Parser Factory instance for dependency injection? */ public function __construct() { - $parserFactory = new ParserFactory(); - $this->parser = $parserFactory->createParser(); + $this->parser = (new ParserFactory())->createParser(); } /** diff --git a/vendor/psy/psysh/src/ExecutionLoopClosure.php b/vendor/psy/psysh/src/ExecutionLoopClosure.php index 78f7e5ea..28c6561a 100644 --- a/vendor/psy/psysh/src/ExecutionLoopClosure.php +++ b/vendor/psy/psysh/src/ExecutionLoopClosure.php @@ -17,8 +17,7 @@ use Psy\Exception\ThrowUpException; /** * The Psy Shell's execution loop scope. * - * @todo Once we're on PHP 5.5, we can switch ExecutionClosure to a generator - * and get rid of the duplicate closure implementations :) + * @todo Switch ExecutionClosure to a generator and get rid of the duplicate closure implementations? */ class ExecutionLoopClosure extends ExecutionClosure { diff --git a/vendor/psy/psysh/src/Formatter/CodeFormatter.php b/vendor/psy/psysh/src/Formatter/CodeFormatter.php index d795cf1e..aa70f1bb 100644 --- a/vendor/psy/psysh/src/Formatter/CodeFormatter.php +++ b/vendor/psy/psysh/src/Formatter/CodeFormatter.php @@ -76,12 +76,11 @@ class CodeFormatter implements ReflectorFormatter /** * Format the code represented by $reflector for shell output. * - * @param \Reflector $reflector - * @param string|null $colorMode (deprecated and ignored) + * @param \Reflector $reflector * * @return string formatted code */ - public static function format(\Reflector $reflector, string $colorMode = null): string + public static function format(\Reflector $reflector): string { if (self::isReflectable($reflector)) { if ($code = @\file_get_contents($reflector->getFileName())) { diff --git a/vendor/psy/psysh/src/Formatter/Formatter.php b/vendor/psy/psysh/src/Formatter/Formatter.php deleted file mode 100644 index 0f972a3f..00000000 --- a/vendor/psy/psysh/src/Formatter/Formatter.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of Psy Shell. - * - * (c) 2012-2023 Justin Hileman - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Psy\Formatter; - -/** - * Formatter interface. - * - * @deprecated this interface only exists for backwards compatibility. Use ReflectorFormatter. - */ -interface Formatter extends ReflectorFormatter -{ -} diff --git a/vendor/psy/psysh/src/Formatter/SignatureFormatter.php b/vendor/psy/psysh/src/Formatter/SignatureFormatter.php index 799d669d..182816b0 100644 --- a/vendor/psy/psysh/src/Formatter/SignatureFormatter.php +++ b/vendor/psy/psysh/src/Formatter/SignatureFormatter.php @@ -11,8 +11,7 @@ namespace Psy\Formatter; -use Psy\Reflection\ReflectionClassConstant; -use Psy\Reflection\ReflectionConstant_; +use Psy\Reflection\ReflectionConstant; use Psy\Reflection\ReflectionLanguageConstruct; use Psy\Util\Json; use Symfony\Component\Console\Formatter\OutputFormatter; @@ -42,7 +41,6 @@ class SignatureFormatter implements ReflectorFormatter // this case also covers \ReflectionObject return self::formatClass($reflector); - case $reflector instanceof ReflectionClassConstant: case $reflector instanceof \ReflectionClassConstant: return self::formatClassConstant($reflector); @@ -52,7 +50,7 @@ class SignatureFormatter implements ReflectorFormatter case $reflector instanceof \ReflectionProperty: return self::formatProperty($reflector); - case $reflector instanceof ReflectionConstant_: + case $reflector instanceof ReflectionConstant: return self::formatConstant($reflector); default: @@ -63,7 +61,7 @@ class SignatureFormatter implements ReflectorFormatter /** * Print the signature name. * - * @param \ReflectionClass|ReflectionClassConstant|\ReflectionClassConstant|\ReflectionFunctionAbstract $reflector + * @param \ReflectionClass|\ReflectionClassConstant|\ReflectionFunctionAbstract $reflector * * @return string Formatted name */ @@ -130,7 +128,7 @@ class SignatureFormatter implements ReflectorFormatter /** * Format a constant signature. * - * @param ReflectionClassConstant|\ReflectionClassConstant $reflector + * @param \ReflectionClassConstant $reflector * * @return string Formatted signature */ @@ -151,11 +149,11 @@ class SignatureFormatter implements ReflectorFormatter /** * Format a constant signature. * - * @param ReflectionConstant_ $reflector + * @param ReflectionConstant $reflector * * @return string Formatted signature */ - private static function formatConstant(ReflectionConstant_ $reflector): string + private static function formatConstant(ReflectionConstant $reflector): string { $value = $reflector->getValue(); $style = self::getTypeStyle($value); @@ -234,7 +232,7 @@ class SignatureFormatter implements ReflectorFormatter return ''; } - return \sprintf(': %s', self::formatReflectionType($reflector->getReturnType())); + return \sprintf(': %s', self::formatReflectionType($reflector->getReturnType(), true)); } /** @@ -267,7 +265,9 @@ class SignatureFormatter implements ReflectorFormatter $hint = ''; try { if (\method_exists($param, 'getType')) { - $hint = self::formatReflectionType($param->getType()); + // Only include the inquisitive nullable type iff param default value is not null. + $defaultIsNull = $param->isOptional() && $param->isDefaultValueAvailable() && $param->getDefaultValue() === null; + $hint = self::formatReflectionType($param->getType(), !$defaultIsNull); } else { if ($param->isArray()) { $hint = '<keyword>array</keyword>'; @@ -323,25 +323,36 @@ class SignatureFormatter implements ReflectorFormatter * * @param \ReflectionType $type */ - private static function formatReflectionType(\ReflectionType $type = null): string + private static function formatReflectionType(?\ReflectionType $type, bool $indicateNullable): string { if ($type === null) { return ''; } - $types = $type instanceof \ReflectionUnionType ? $type->getTypes() : [$type]; - $formattedTypes = []; - - foreach ($types as $type) { - $typeStyle = $type->isBuiltin() ? 'keyword' : 'class'; - - // PHP 7.0 didn't have `getName` on reflection types, so wheee! - $typeName = \method_exists($type, 'getName') ? $type->getName() : (string) $type; - - // @todo Do we want to include the ? for nullable types? Maybe only sometimes? - $formattedTypes[] = \sprintf('<%s>%s</%s>', $typeStyle, OutputFormatter::escape($typeName), $typeStyle); + if ($type instanceof \ReflectionUnionType) { + $delimeter = '|'; + } elseif ($type instanceof \ReflectionIntersectionType) { + $delimeter = '&'; + } else { + return self::formatReflectionNamedType($type, $indicateNullable); } - return \implode('|', $formattedTypes); + $formattedTypes = []; + foreach ($type->getTypes() as $namedType) { + $formattedTypes[] = self::formatReflectionNamedType($namedType, $indicateNullable); + } + + return \implode($delimeter, $formattedTypes); + } + + /** + * Print a single named type. + */ + private static function formatReflectionNamedType(\ReflectionNamedType $type, bool $indicateNullable): string + { + $typeStyle = $type->isBuiltin() ? 'keyword' : 'class'; + $nullable = $indicateNullable && $type->allowsNull() ? '?' : ''; + + return \sprintf('<%s>%s%s</%s>', $typeStyle, $nullable, OutputFormatter::escape($type->getName()), $typeStyle); } } diff --git a/vendor/psy/psysh/src/Input/ShellInput.php b/vendor/psy/psysh/src/Input/ShellInput.php index 10ca2b5b..9b8bf81d 100644 --- a/vendor/psy/psysh/src/Input/ShellInput.php +++ b/vendor/psy/psysh/src/Input/ShellInput.php @@ -19,6 +19,8 @@ use Symfony\Component\Console\Input\StringInput; */ class ShellInput extends StringInput { + public const REGEX_STRING = '([^\s]+?)(?:\s|(?<!\\\\)"|(?<!\\\\)\'|$)'; + private $hasCodeArgument = false; /** @@ -45,7 +47,7 @@ class ShellInput extends StringInput * * @throws \InvalidArgumentException if $definition has CodeArgument before the final argument position */ - public function bind(InputDefinition $definition) + public function bind(InputDefinition $definition): void { $hasCodeArgument = false; @@ -66,7 +68,7 @@ class ShellInput extends StringInput $this->hasCodeArgument = $hasCodeArgument; - return parent::bind($definition); + parent::bind($definition); } /** @@ -98,7 +100,7 @@ class ShellInput extends StringInput \stripcslashes(\substr($match[0], 1, \strlen($match[0]) - 2)), \stripcslashes(\substr($input, $cursor)), ]; - } elseif (\preg_match('/'.StringInput::REGEX_STRING.'/A', $input, $match, 0, $cursor)) { + } elseif (\preg_match('/'.self::REGEX_STRING.'/A', $input, $match, 0, $cursor)) { $tokens[] = [ \stripcslashes($match[1]), \stripcslashes(\substr($input, $cursor)), @@ -119,7 +121,7 @@ class ShellInput extends StringInput /** * Same as parent, but with some bonus handling for code arguments. */ - protected function parse() + protected function parse(): void { $parseOptions = true; $this->parsed = $this->tokenPairs; diff --git a/vendor/psy/psysh/src/Output/ProcOutputPager.php b/vendor/psy/psysh/src/Output/ProcOutputPager.php index aeaff368..42e40db5 100644 --- a/vendor/psy/psysh/src/Output/ProcOutputPager.php +++ b/vendor/psy/psysh/src/Output/ProcOutputPager.php @@ -48,7 +48,7 @@ class ProcOutputPager extends StreamOutput implements OutputPager * * @throws \RuntimeException When unable to write output (should never happen) */ - public function doWrite($message, $newline) + public function doWrite($message, $newline): void { $pipe = $this->getPipe(); if (false === @\fwrite($pipe, $message.($newline ? \PHP_EOL : ''))) { diff --git a/vendor/psy/psysh/src/Output/ShellOutput.php b/vendor/psy/psysh/src/Output/ShellOutput.php index 543baccb..2ef575dc 100644 --- a/vendor/psy/psysh/src/Output/ShellOutput.php +++ b/vendor/psy/psysh/src/Output/ShellOutput.php @@ -119,7 +119,7 @@ class ShellOutput extends ConsoleOutput * @param bool $newline Whether to add a newline or not * @param int $type The type of output */ - public function write($messages, $newline = false, $type = 0) + public function write($messages, $newline = false, $type = 0): void { if ($this->getVerbosity() === self::VERBOSITY_QUIET) { return; @@ -154,7 +154,7 @@ class ShellOutput extends ConsoleOutput * @param string $message A message to write to the output * @param bool $newline Whether to add a newline or not */ - public function doWrite($message, $newline) + public function doWrite($message, $newline): void { if ($this->paging > 0) { $this->pager->doWrite($message, $newline); diff --git a/vendor/psy/psysh/src/ParserFactory.php b/vendor/psy/psysh/src/ParserFactory.php index e7c15c5d..2b37ccd0 100644 --- a/vendor/psy/psysh/src/ParserFactory.php +++ b/vendor/psy/psysh/src/ParserFactory.php @@ -15,52 +15,21 @@ use PhpParser\Parser; use PhpParser\ParserFactory as OriginalParserFactory; /** - * Parser factory to abstract over PHP parser library versions. + * Parser factory to abstract over PHP Parser library versions. */ class ParserFactory { - const ONLY_PHP5 = 'ONLY_PHP5'; - const ONLY_PHP7 = 'ONLY_PHP7'; - const PREFER_PHP5 = 'PREFER_PHP5'; - const PREFER_PHP7 = 'PREFER_PHP7'; - /** - * Possible kinds of parsers for the factory, from PHP parser library. - * - * @return string[] + * New parser instance. */ - public static function getPossibleKinds(): array + public function createParser(): Parser { - return ['ONLY_PHP5', 'ONLY_PHP7', 'PREFER_PHP5', 'PREFER_PHP7']; - } + $factory = new OriginalParserFactory(); - /** - * Default kind (if supported, based on current interpreter's version). - * - * @return string|null - */ - public function getDefaultKind() - { - return static::ONLY_PHP7; - } - - /** - * New parser instance with given kind. - * - * @param string|null $kind One of class constants (only for PHP parser 2.0 and above) - */ - public function createParser($kind = null): Parser - { - $originalFactory = new OriginalParserFactory(); - - $kind = $kind ?: $this->getDefaultKind(); - - if (!\in_array($kind, static::getPossibleKinds())) { - throw new \InvalidArgumentException('Unknown parser kind'); + if (!\method_exists($factory, 'createForHostVersion')) { + return $factory->create(OriginalParserFactory::PREFER_PHP7); } - $parser = $originalFactory->create(\constant(OriginalParserFactory::class.'::'.$kind)); - - return $parser; + return $factory->createForHostVersion(); } } diff --git a/vendor/psy/psysh/src/Readline/Hoa/File.php b/vendor/psy/psysh/src/Readline/Hoa/File.php index bdfd9478..96b8c4d5 100644 --- a/vendor/psy/psysh/src/Readline/Hoa/File.php +++ b/vendor/psy/psysh/src/Readline/Hoa/File.php @@ -128,11 +128,7 @@ abstract class File extends FileGeneric implements StreamBufferable, StreamLocka default: if (true === \ctype_digit($streamName)) { - if (\PHP_VERSION_ID >= 50306) { - $streamName = 'php://fd/'.$streamName; - } else { - throw new FileException('You need PHP5.3.6 to use a file descriptor '.'other than 0, 1 or 2 (tried %d with PHP%s).', 0, [$streamName, \PHP_VERSION]); - } + $streamName = 'php://fd/'.$streamName; } } @@ -189,7 +185,7 @@ abstract class File extends FileGeneric implements StreamBufferable, StreamLocka { $this->setStreamBuffer($size); - // @TODO manage $callable as a filter? + // @todo manage $callable as a filter? return 1; } diff --git a/vendor/psy/psysh/src/Readline/HoaConsole.php b/vendor/psy/psysh/src/Readline/HoaConsole.php deleted file mode 100644 index 74febb6f..00000000 --- a/vendor/psy/psysh/src/Readline/HoaConsole.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of Psy Shell. - * - * (c) 2012-2023 Justin Hileman - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Psy\Readline; - -/** - * Hoa\Console Readline implementation. - * - * @deprecated, use Userland readline - */ -class HoaConsole extends Userland -{ -} diff --git a/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php b/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php deleted file mode 100644 index 1d6999c9..00000000 --- a/vendor/psy/psysh/src/Reflection/ReflectionClassConstant.php +++ /dev/null @@ -1,220 +0,0 @@ -<?php - -/* - * This file is part of Psy Shell. - * - * (c) 2012-2023 Justin Hileman - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Psy\Reflection; - -/** - * Somehow the standard reflection library didn't include class constants until 7.1. - * - * ReflectionClassConstant corrects that omission. - */ -class ReflectionClassConstant implements \Reflector -{ - public $class; - public $name; - private $value; - - /** - * Construct a ReflectionClassConstant object. - * - * @param string|object $class - * @param string $name - */ - public function __construct($class, string $name) - { - if (!$class instanceof \ReflectionClass) { - $class = new \ReflectionClass($class); - } - - $this->class = $class; - $this->name = $name; - - $constants = $class->getConstants(); - if (!\array_key_exists($name, $constants)) { - throw new \InvalidArgumentException('Unknown constant: '.$name); - } - - $this->value = $constants[$name]; - } - - /** - * Exports a reflection. - * - * @param string|object $class - * @param string $name - * @param bool $return pass true to return the export, as opposed to emitting it - * - * @return string|null - */ - public static function export($class, string $name, bool $return = false) - { - $refl = new self($class, $name); - $value = $refl->getValue(); - - $str = \sprintf('Constant [ public %s %s ] { %s }', \gettype($value), $refl->getName(), $value); - - if ($return) { - return $str; - } - - echo $str."\n"; - } - - /** - * Gets the declaring class. - */ - public function getDeclaringClass(): \ReflectionClass - { - $parent = $this->class; - - // Since we don't have real reflection constants, we can't see where - // it's actually defined. Let's check for a constant that is also - // available on the parent class which has exactly the same value. - // - // While this isn't _technically_ correct, it's prolly close enough. - do { - $class = $parent; - $parent = $class->getParentClass(); - } while ($parent && $parent->hasConstant($this->name) && $parent->getConstant($this->name) === $this->value); - - return $class; - } - - /** - * Get the constant's docblock. - * - * @return false - */ - public function getDocComment(): bool - { - return false; - } - - /** - * Gets the class constant modifiers. - * - * Since this is only used for PHP < 7.1, we can just return "public". All - * the fancier modifiers are only available on PHP versions which have their - * own ReflectionClassConstant class :) - */ - public function getModifiers(): int - { - return \ReflectionMethod::IS_PUBLIC; - } - - /** - * Gets the constant name. - */ - public function getName(): string - { - return $this->name; - } - - /** - * Gets the value of the constant. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Checks if class constant is private. - * - * @return bool false - */ - public function isPrivate(): bool - { - return false; - } - - /** - * Checks if class constant is protected. - * - * @return bool false - */ - public function isProtected(): bool - { - return false; - } - - /** - * Checks if class constant is public. - * - * @return bool true - */ - public function isPublic(): bool - { - return true; - } - - /** - * To string. - */ - public function __toString(): string - { - return $this->getName(); - } - - /** - * Gets the constant's file name. - * - * Currently returns null, because if it returns a file name the signature - * formatter will barf. - */ - public function getFileName() - { - return; - // return $this->class->getFileName(); - } - - /** - * Get the code start line. - * - * @throws \RuntimeException - */ - public function getStartLine() - { - throw new \RuntimeException('Not yet implemented because it\'s unclear what I should do here :)'); - } - - /** - * Get the code end line. - * - * @throws \RuntimeException - */ - public function getEndLine() - { - return $this->getStartLine(); - } - - /** - * Get a ReflectionClassConstant instance. - * - * In PHP >= 7.1, this will return a \ReflectionClassConstant from the - * standard reflection library. For older PHP, it will return this polyfill. - * - * @param string|object $class - * @param string $name - * - * @return ReflectionClassConstant|\ReflectionClassConstant - */ - public static function create($class, string $name) - { - if (\class_exists(\ReflectionClassConstant::class)) { - return new \ReflectionClassConstant($class, $name); - } - - return new self($class, $name); - } -} diff --git a/vendor/psy/psysh/src/Reflection/ReflectionConstant.php b/vendor/psy/psysh/src/Reflection/ReflectionConstant.php index b67b4ac2..763011ff 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionConstant.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionConstant.php @@ -12,19 +12,159 @@ namespace Psy\Reflection; /** - * @deprecated ReflectionConstant is now ReflectionClassConstant. This class - * name will be reclaimed in the next stable release, to be used for - * ReflectionConstant_ :) + * Somehow the standard reflection library doesn't include constants. + * + * ReflectionConstant corrects that omission. */ -class ReflectionConstant extends ReflectionClassConstant +class ReflectionConstant implements \Reflector { - /** - * {inheritDoc}. - */ - public function __construct($class, $name) - { - @\trigger_error('ReflectionConstant is now ReflectionClassConstant', \E_USER_DEPRECATED); + public $name; + private $value; - parent::__construct($class, $name); + private static $magicConstants = [ + '__LINE__', + '__FILE__', + '__DIR__', + '__FUNCTION__', + '__CLASS__', + '__TRAIT__', + '__METHOD__', + '__NAMESPACE__', + '__COMPILER_HALT_OFFSET__', + ]; + + /** + * Construct a ReflectionConstant object. + * + * @param string $name + */ + public function __construct(string $name) + { + $this->name = $name; + + if (!\defined($name) && !self::isMagicConstant($name)) { + throw new \InvalidArgumentException('Unknown constant: '.$name); + } + + if (!self::isMagicConstant($name)) { + $this->value = @\constant($name); + } + } + + /** + * Exports a reflection. + * + * @param string $name + * @param bool $return pass true to return the export, as opposed to emitting it + * + * @return string|null + */ + public static function export(string $name, bool $return = false) + { + $refl = new self($name); + $value = $refl->getValue(); + + $str = \sprintf('Constant [ %s %s ] { %s }', \gettype($value), $refl->getName(), $value); + + if ($return) { + return $str; + } + + echo $str."\n"; + } + + public static function isMagicConstant($name) + { + return \in_array($name, self::$magicConstants); + } + + /** + * Get the constant's docblock. + * + * @return false + */ + public function getDocComment(): bool + { + return false; + } + + /** + * Gets the constant name. + */ + public function getName(): string + { + return $this->name; + } + + /** + * Gets the namespace name. + * + * Returns '' when the constant is not namespaced. + */ + public function getNamespaceName(): string + { + if (!$this->inNamespace()) { + return ''; + } + + return \preg_replace('/\\\\[^\\\\]+$/', '', $this->name); + } + + /** + * Gets the value of the constant. + * + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Checks if this constant is defined in a namespace. + */ + public function inNamespace(): bool + { + return \strpos($this->name, '\\') !== false; + } + + /** + * To string. + */ + public function __toString(): string + { + return $this->getName(); + } + + /** + * Gets the constant's file name. + * + * Currently returns null, because if it returns a file name the signature + * formatter will barf. + */ + public function getFileName() + { + return; + // return $this->class->getFileName(); + } + + /** + * Get the code start line. + * + * @throws \RuntimeException + */ + public function getStartLine() + { + throw new \RuntimeException('Not yet implemented because it\'s unclear what I should do here :)'); + } + + /** + * Get the code end line. + * + * @throws \RuntimeException + */ + public function getEndLine() + { + return $this->getStartLine(); } } diff --git a/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php b/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php deleted file mode 100644 index 07f81d15..00000000 --- a/vendor/psy/psysh/src/Reflection/ReflectionConstant_.php +++ /dev/null @@ -1,174 +0,0 @@ -<?php - -/* - * This file is part of Psy Shell. - * - * (c) 2012-2023 Justin Hileman - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Psy\Reflection; - -/** - * Somehow the standard reflection library doesn't include constants. - * - * ReflectionConstant_ corrects that omission. - * - * Note: For backwards compatibility reasons, this class is named - * ReflectionConstant_ rather than ReflectionConstant. It will be renamed in - * v0.10.0. - */ -class ReflectionConstant_ implements \Reflector -{ - public $name; - private $value; - - private static $magicConstants = [ - '__LINE__', - '__FILE__', - '__DIR__', - '__FUNCTION__', - '__CLASS__', - '__TRAIT__', - '__METHOD__', - '__NAMESPACE__', - '__COMPILER_HALT_OFFSET__', - ]; - - /** - * Construct a ReflectionConstant_ object. - * - * @param string $name - */ - public function __construct(string $name) - { - $this->name = $name; - - if (!\defined($name) && !self::isMagicConstant($name)) { - throw new \InvalidArgumentException('Unknown constant: '.$name); - } - - if (!self::isMagicConstant($name)) { - $this->value = @\constant($name); - } - } - - /** - * Exports a reflection. - * - * @param string $name - * @param bool $return pass true to return the export, as opposed to emitting it - * - * @return string|null - */ - public static function export(string $name, bool $return = false) - { - $refl = new self($name); - $value = $refl->getValue(); - - $str = \sprintf('Constant [ %s %s ] { %s }', \gettype($value), $refl->getName(), $value); - - if ($return) { - return $str; - } - - echo $str."\n"; - } - - public static function isMagicConstant($name) - { - return \in_array($name, self::$magicConstants); - } - - /** - * Get the constant's docblock. - * - * @return false - */ - public function getDocComment(): bool - { - return false; - } - - /** - * Gets the constant name. - */ - public function getName(): string - { - return $this->name; - } - - /** - * Gets the namespace name. - * - * Returns '' when the constant is not namespaced. - */ - public function getNamespaceName(): string - { - if (!$this->inNamespace()) { - return ''; - } - - return \preg_replace('/\\\\[^\\\\]+$/', '', $this->name); - } - - /** - * Gets the value of the constant. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Checks if this constant is defined in a namespace. - */ - public function inNamespace(): bool - { - return \strpos($this->name, '\\') !== false; - } - - /** - * To string. - */ - public function __toString(): string - { - return $this->getName(); - } - - /** - * Gets the constant's file name. - * - * Currently returns null, because if it returns a file name the signature - * formatter will barf. - */ - public function getFileName() - { - return; - // return $this->class->getFileName(); - } - - /** - * Get the code start line. - * - * @throws \RuntimeException - */ - public function getStartLine() - { - throw new \RuntimeException('Not yet implemented because it\'s unclear what I should do here :)'); - } - - /** - * Get the code end line. - * - * @throws \RuntimeException - */ - public function getEndLine() - { - return $this->getStartLine(); - } -} diff --git a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php index 6f633524..756dfd8a 100644 --- a/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php +++ b/vendor/psy/psysh/src/Reflection/ReflectionLanguageConstructParameter.php @@ -31,13 +31,10 @@ class ReflectionLanguageConstructParameter extends \ReflectionParameter /** * No class here. - * - * @todo remove \ReturnTypeWillChange attribute after dropping support for PHP 7.0 (when we can use nullable types) */ - #[\ReturnTypeWillChange] - public function getClass() + public function getClass(): ?\ReflectionClass { - return; + return null; } /** diff --git a/vendor/psy/psysh/src/Shell.php b/vendor/psy/psysh/src/Shell.php index 57295a96..104699c2 100644 --- a/vendor/psy/psysh/src/Shell.php +++ b/vendor/psy/psysh/src/Shell.php @@ -50,16 +50,7 @@ use Symfony\Component\Console\Output\OutputInterface; */ class Shell extends Application { - const VERSION = 'v0.11.22'; - - /** @deprecated */ - const PROMPT = '>>> '; - /** @deprecated */ - const BUFF_PROMPT = '... '; - /** @deprecated */ - const REPLAY = '--> '; - /** @deprecated */ - const RETVAL = '=> '; + const VERSION = 'v0.12.0'; private $config; private $cleaner; @@ -151,6 +142,8 @@ class Shell extends Application */ public static function debug(array $vars = [], $bindTo = null): array { + @\trigger_error('`Psy\\Shell::debug` is deprecated; call `Psy\\debug` instead.', \E_USER_DEPRECATED); + return \Psy\debug($vars, $bindTo); } @@ -255,14 +248,6 @@ class Shell extends Application ]; } - /** - * @deprecated Nothing should use this anymore - */ - protected function getTabCompletionMatchers() - { - @\trigger_error('getTabCompletionMatchers is no longer used', \E_USER_DEPRECATED); - } - /** * Gets the default command loop listeners. * @@ -304,6 +289,8 @@ class Shell extends Application */ public function addTabCompletionMatchers(array $matchers) { + @\trigger_error('`addTabCompletionMatchers` is deprecated; call `addMatchers` instead.', \E_USER_DEPRECATED); + $this->addMatchers($matchers); } @@ -449,7 +436,7 @@ class Shell extends Application /** * Configures the input and output instances based on the user arguments and options. */ - protected function configureIO(InputInterface $input, OutputInterface $output) + protected function configureIO(InputInterface $input, OutputInterface $output): void { // @todo overrides via environment variables (or should these happen in config? ... probably config) $input->setInteractive($this->config->getInputInteractive()); @@ -667,7 +654,7 @@ class Shell extends Application * * @param bool $includeBoundObject Pass false to exclude 'this'. If you're * passing the scope variables to `extract` - * in PHP 7.1+, you _must_ exclude 'this' + * you _must_ exclude 'this' * * @return array Associative array of scope variables */ @@ -687,7 +674,7 @@ class Shell extends Application * * @param bool $includeBoundObject Pass false to exclude 'this'. If you're * passing the scope variables to `extract` - * in PHP 7.1+, you _must_ exclude 'this' + * you _must_ exclude 'this' * * @return array Associative array of magic scope variables */ @@ -1532,6 +1519,8 @@ class Shell extends Application */ public function getVersion(): string { + @\trigger_error('`getVersion` is deprecated; call `self::getVersionHeader` instead.', \E_USER_DEPRECATED); + return self::getVersionHeader($this->config->useUnicode()); } @@ -1557,14 +1546,6 @@ class Shell extends Application return $this->config->getManualDb(); } - /** - * @deprecated Tab completion is provided by the AutoCompleter service - */ - protected function autocomplete($text) - { - @\trigger_error('Tab completion is provided by the AutoCompleter service', \E_USER_DEPRECATED); - } - /** * Initialize tab completion matchers. * diff --git a/vendor/psy/psysh/src/Sudo.php b/vendor/psy/psysh/src/Sudo.php index a769727c..a84f31da 100644 --- a/vendor/psy/psysh/src/Sudo.php +++ b/vendor/psy/psysh/src/Sudo.php @@ -97,7 +97,7 @@ class Sudo $prop = self::getProperty(new \ReflectionClass($class), $property); $refl = $prop->getDeclaringClass(); - if (\version_compare(\PHP_VERSION, '7.4', '>=') && \method_exists($refl, 'setStaticPropertyValue')) { + if (\method_exists($refl, 'setStaticPropertyValue')) { $refl->setStaticPropertyValue($property, $value); } else { $prop->setValue($value); diff --git a/vendor/psy/psysh/src/Util/Docblock.php b/vendor/psy/psysh/src/Util/Docblock.php index 416be0ee..1b98f279 100644 --- a/vendor/psy/psysh/src/Util/Docblock.php +++ b/vendor/psy/psysh/src/Util/Docblock.php @@ -214,10 +214,8 @@ class Docblock * * @return array|null */ - public function tag(string $tag) + public function tag(string $tag): ?array { - // TODO: Add proper null-type return values once the lowest PHP version supported is 7.1 - return $this->hasTag($tag) ? $this->tags[$tag] : null; } diff --git a/vendor/psy/psysh/src/Util/Mirror.php b/vendor/psy/psysh/src/Util/Mirror.php index c151c06f..3aa18079 100644 --- a/vendor/psy/psysh/src/Util/Mirror.php +++ b/vendor/psy/psysh/src/Util/Mirror.php @@ -12,8 +12,7 @@ namespace Psy\Util; use Psy\Exception\RuntimeException; -use Psy\Reflection\ReflectionClassConstant; -use Psy\Reflection\ReflectionConstant_; +use Psy\Reflection\ReflectionConstant; use Psy\Reflection\ReflectionNamespace; /** @@ -48,8 +47,8 @@ class Mirror if ($member === null && \is_string($value)) { if (\function_exists($value)) { return new \ReflectionFunction($value); - } elseif (\defined($value) || ReflectionConstant_::isMagicConstant($value)) { - return new ReflectionConstant_($value); + } elseif (\defined($value) || ReflectionConstant::isMagicConstant($value)) { + return new ReflectionConstant($value); } } @@ -58,7 +57,7 @@ class Mirror if ($member === null) { return $class; } elseif ($filter & self::CONSTANT && $class->hasConstant($member)) { - return ReflectionClassConstant::create($value, $member); + return new \ReflectionClassConstant($value, $member); } elseif ($filter & self::METHOD && $class->hasMethod($member)) { return $class->getMethod($member); } elseif ($filter & self::PROPERTY && $class->hasProperty($member)) { diff --git a/vendor/psy/psysh/src/VarDumper/Dumper.php b/vendor/psy/psysh/src/VarDumper/Dumper.php index 96c127e0..def61d4a 100644 --- a/vendor/psy/psysh/src/VarDumper/Dumper.php +++ b/vendor/psy/psysh/src/VarDumper/Dumper.php @@ -23,9 +23,9 @@ class Dumper extends CliDumper private $formatter; private $forceArrayIndexes; - protected static $onlyControlCharsRx = '/^[\x00-\x1F\x7F]+$/'; - protected static $controlCharsRx = '/([\x00-\x1F\x7F]+)/'; - protected static $controlCharsMap = [ + private const ONLY_CONTROL_CHARS = '/^[\x00-\x1F\x7F]+$/'; + private const CONTROL_CHARS = '/([\x00-\x1F\x7F]+)/'; + private const CONTROL_CHARS_MAP = [ "\0" => '\0', "\t" => '\t', "\n" => '\n', @@ -46,7 +46,7 @@ class Dumper extends CliDumper /** * {@inheritdoc} */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild) + public function enterHash(Cursor $cursor, $type, $class, $hasChild): void { if (Cursor::HASH_INDEXED === $type || Cursor::HASH_ASSOC === $type) { $class = 0; @@ -57,7 +57,7 @@ class Dumper extends CliDumper /** * {@inheritdoc} */ - protected function dumpKey(Cursor $cursor) + protected function dumpKey(Cursor $cursor): void { if ($this->forceArrayIndexes || Cursor::HASH_INDEXED !== $cursor->hashType) { parent::dumpKey($cursor); @@ -71,16 +71,15 @@ class Dumper extends CliDumper } $styled = ''; - $map = self::$controlCharsMap; $cchr = $this->styles['cchr']; - $chunks = \preg_split(self::$controlCharsRx, $value, -1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE); + $chunks = \preg_split(self::CONTROL_CHARS, $value, -1, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE); foreach ($chunks as $chunk) { - if (\preg_match(self::$onlyControlCharsRx, $chunk)) { + if (\preg_match(self::ONLY_CONTROL_CHARS, $chunk)) { $chars = ''; $i = 0; do { - $chars .= isset($map[$chunk[$i]]) ? $map[$chunk[$i]] : \sprintf('\x%02X', \ord($chunk[$i])); + $chars .= isset(self::CONTROL_CHARS_MAP[$chunk[$i]]) ? self::CONTROL_CHARS_MAP[$chunk[$i]] : \sprintf('\x%02X', \ord($chunk[$i])); } while (isset($chunk[++$i])); $chars = $this->formatter->escape($chars); @@ -98,7 +97,7 @@ class Dumper extends CliDumper /** * {@inheritdoc} */ - protected function dumpLine($depth, $endOfValue = false) + protected function dumpLine($depth, $endOfValue = false): void { if ($endOfValue && 0 < $depth) { $this->line .= ','; diff --git a/vendor/psy/psysh/src/functions.php b/vendor/psy/psysh/src/functions.php index f0e771c2..4b6419a1 100644 --- a/vendor/psy/psysh/src/functions.php +++ b/vendor/psy/psysh/src/functions.php @@ -233,7 +233,7 @@ if (!\function_exists('Psy\\info')) { ]; $theme = $config->theme(); - // TODO: show styles (but only if they're different than default?) + // @todo show styles (but only if they're different than default?) $output['theme'] = [ 'compact' => $theme->compact(), 'prompt' => $theme->prompt(), @@ -351,8 +351,8 @@ if (!\function_exists('Psy\\bin')) { exit(1); } - if (\PHP_VERSION_ID < 70000) { - \fwrite(\STDERR, 'PHP 7.0.0 or higher is required. You can set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); + if (\PHP_VERSION_ID < 70400) { + \fwrite(\STDERR, 'PHP 7.4.0 or higher is required. You can set the environment variable PSYSH_IGNORE_ENV=1 to override this restriction and proceed anyway.'.\PHP_EOL); exit(1); } diff --git a/vendor/spatie/ignition/resources/compiled/ignition.css b/vendor/spatie/ignition/resources/compiled/ignition.css index 18abb659..cad6a82d 100644 --- a/vendor/spatie/ignition/resources/compiled/ignition.css +++ b/vendor/spatie/ignition/resources/compiled/ignition.css @@ -1,3 +1,3 @@ /* ! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com -*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}html{font-size:max(13px,min(1.3vw,16px));overflow-x:hidden;overflow-y:scroll;font-feature-settings:"calt" 0;-webkit-marquee-increment:1vw}:after,:before,:not(iframe){position:relative}:focus{outline:0!important}body{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:100%;color:rgba(31,41,55,var(--tw-text-opacity))}.dark body,body{--tw-text-opacity:1}.dark body{color:rgba(229,231,235,var(--tw-text-opacity))}body{background-color:rgba(229,231,235,var(--tw-bg-opacity))}.dark body,body{--tw-bg-opacity:1}.dark body{background-color:rgba(17,24,39,var(--tw-bg-opacity))}@media (color-index:48){html.auto body{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity));--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}}@media (color:48842621){html.auto body{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity));--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}}@media (prefers-color-scheme:dark){html.auto body{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity));--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}}.scroll-target:target{content:"";display:block;position:absolute;top:-6rem}pre.sf-dump{display:block;white-space:pre;padding:5px;overflow:visible!important;overflow:initial!important}pre.sf-dump:after{content:"";visibility:hidden;display:block;height:0;clear:both}pre.sf-dump span{display:inline}pre.sf-dump a{text-decoration:none;cursor:pointer;border:0;outline:none;color:inherit}pre.sf-dump img{max-width:50em;max-height:50em;margin:.5em 0 0;padding:0;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAHUlEQVQY02O8zAABilCaiQEN0EeA8QuUcX9g3QEAAjcC5piyhyEAAAAASUVORK5CYII=) #d3d3d3}pre.sf-dump .sf-dump-ellipsis{display:inline-block;overflow:visible;text-overflow:ellipsis;max-width:5em;white-space:nowrap;overflow:hidden;vertical-align:top}pre.sf-dump .sf-dump-ellipsis+.sf-dump-ellipsis{max-width:none}pre.sf-dump code{display:inline;padding:0;background:none}.sf-dump-key.sf-dump-highlight,.sf-dump-private.sf-dump-highlight,.sf-dump-protected.sf-dump-highlight,.sf-dump-public.sf-dump-highlight,.sf-dump-str.sf-dump-highlight{background:rgba(111,172,204,.3);border:1px solid #7da0b1;border-radius:3px}.sf-dump-key.sf-dump-highlight-active,.sf-dump-private.sf-dump-highlight-active,.sf-dump-protected.sf-dump-highlight-active,.sf-dump-public.sf-dump-highlight-active,.sf-dump-str.sf-dump-highlight-active{background:rgba(253,175,0,.4);border:1px solid orange;border-radius:3px}pre.sf-dump .sf-dump-search-hidden{display:none!important}pre.sf-dump .sf-dump-search-wrapper{font-size:0;white-space:nowrap;margin-bottom:5px;display:flex;position:-webkit-sticky;position:sticky;top:5px}pre.sf-dump .sf-dump-search-wrapper>*{vertical-align:top;box-sizing:border-box;height:21px;font-weight:400;border-radius:0;background:#fff;color:#757575;border:1px solid #bbb}pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{padding:3px;height:21px;font-size:12px;border-right:none;border-top-left-radius:3px;border-bottom-left-radius:3px;color:#000;min-width:15px;width:100%}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous{background:#f2f2f2;outline:none;border-left:none;font-size:0;line-height:0}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next{border-top-right-radius:3px;border-bottom-right-radius:3px}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next>svg,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous>svg{pointer-events:none;width:12px;height:12px}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-count{display:inline-block;padding:0 5px;margin:0;border-left:none;line-height:21px;font-size:12px}.hljs-comment,.hljs-quote{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark .hljs-comment,.dark .hljs-quote{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.hljs-comment.hljs-doctag{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.dark .hljs-comment.hljs-doctag{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.hljs-doctag,.hljs-formula,.hljs-keyword,.hljs-name{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.dark .hljs-doctag,.dark .hljs-formula,.dark .hljs-keyword,.dark .hljs-name{--tw-text-opacity:1;color:rgba(248,113,113,var(--tw-text-opacity))}.hljs-attr,.hljs-deletion,.hljs-function.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-tag{--tw-text-opacity:1;color:rgba(139,92,246,var(--tw-text-opacity))}.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.dark .hljs-addition,.dark .hljs-attribute,.dark .hljs-meta-string,.dark .hljs-regexp,.dark .hljs-string{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}.hljs-built_in,.hljs-class .hljs-title,.hljs-template-tag,.hljs-template-variable{--tw-text-opacity:1;color:rgba(249,115,22,var(--tw-text-opacity))}.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-string.hljs-subst,.hljs-type{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.dark .hljs-number,.dark .hljs-selector-attr,.dark .hljs-selector-class,.dark .hljs-selector-pseudo,.dark .hljs-string.hljs-subst,.dark .hljs-type{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-operator,.hljs-selector-id,.hljs-symbol,.hljs-title,.hljs-variable{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.dark .hljs-bullet,.dark .hljs-link,.dark .hljs-meta,.dark .hljs-operator,.dark .hljs-selector-id,.dark .hljs-symbol,.dark .hljs-title,.dark .hljs-variable{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}.hljs-strong,.hljs-title{font-weight:700}.hljs-emphasis{font-style:italic}.hljs-link{-webkit-text-decoration-line:underline;text-decoration-line:underline}.language-sql .hljs-keyword{text-transform:uppercase}.mask-fade-x{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 1rem,#000 calc(100% - 3rem),transparent calc(100% - 1rem))}.mask-fade-r{-webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 3rem),transparent calc(100% - 1rem))}.mask-fade-y{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 2.5rem),transparent)}.mask-fade-frames{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 4rem),transparent)}.scrollbar::-webkit-scrollbar,.scrollbar::-webkit-scrollbar-corner{width:2px;height:2px}.scrollbar::-webkit-scrollbar-track{background-color:transparent}.scrollbar::-webkit-scrollbar-thumb{background-color:rgba(239,68,68,.9)}.scrollbar-lg::-webkit-scrollbar,.scrollbar-lg::-webkit-scrollbar-corner{width:4px;height:4px}.scrollbar-lg::-webkit-scrollbar-track{background-color:transparent}.scrollbar-lg::-webkit-scrollbar-thumb{background-color:rgba(239,68,68,.9)}.scrollbar-hidden-x{-ms-overflow-style:none;scrollbar-width:none;overflow-x:scroll}.scrollbar-hidden-x::-webkit-scrollbar{display:none}.scrollbar-hidden-y{-ms-overflow-style:none;scrollbar-width:none;overflow-y:scroll}.scrollbar-hidden-y::-webkit-scrollbar{display:none}main pre.sf-dump{display:block!important;z-index:0!important;padding:0!important;font-size:.875rem!important;line-height:1.25rem!important}.sf-dump-key.sf-dump-highlight,.sf-dump-private.sf-dump-highlight,.sf-dump-protected.sf-dump-highlight,.sf-dump-public.sf-dump-highlight,.sf-dump-str.sf-dump-highlight{background-color:rgba(139,92,246,.1)!important}.sf-dump-key.sf-dump-highlight-active,.sf-dump-private.sf-dump-highlight-active,.sf-dump-protected.sf-dump-highlight-active,.sf-dump-public.sf-dump-highlight-active,.sf-dump-str.sf-dump-highlight-active{background-color:rgba(245,158,11,.1)!important}pre.sf-dump .sf-dump-search-wrapper{align-items:center}pre.sf-dump .sf-dump-search-wrapper>*{border-width:0!important}pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{font-size:.75rem!important;line-height:1rem!important;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.dark pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{height:2rem!important;padding-left:.5rem!important;padding-right:.5rem!important}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous{background-color:transparent!important;--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next,.dark pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next:hover,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous:hover{--tw-text-opacity:1!important;color:rgba(99,102,241,var(--tw-text-opacity))!important}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous{padding-left:.25rem;padding-right:.25rem}pre.sf-dump .sf-dump-search-wrapper svg path{fill:currentColor}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-count{font-size:.75rem!important;line-height:1rem!important;line-height:1.5!important;padding-left:1rem!important;padding-right:1rem!important;--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-count{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-count{background-color:transparent!important}pre.sf-dump,pre.sf-dump .sf-dump-default{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important;background-color:transparent!important;--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.dark pre.sf-dump,.dark pre.sf-dump .sf-dump-default{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}pre.sf-dump .sf-dump-num{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-num{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}pre.sf-dump .sf-dump-const{font-weight:400!important;--tw-text-opacity:1!important;color:rgba(139,92,246,var(--tw-text-opacity))!important}pre.sf-dump .sf-dump-str{font-weight:400!important;--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-str{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}pre.sf-dump .sf-dump-note{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-note{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}pre.sf-dump .sf-dump-ref{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-ref{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}pre.sf-dump .sf-dump-private,pre.sf-dump .sf-dump-protected,pre.sf-dump .sf-dump-public{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-private,.dark pre.sf-dump .sf-dump-protected,.dark pre.sf-dump .sf-dump-public{--tw-text-opacity:1;color:rgba(248,113,113,var(--tw-text-opacity))}pre.sf-dump .sf-dump-meta{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-meta{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}pre.sf-dump .sf-dump-key{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-key{--tw-text-opacity:1;color:rgba(167,139,250,var(--tw-text-opacity))}pre.sf-dump .sf-dump-index{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-index{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}pre.sf-dump .sf-dump-ellipsis{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-ellipsis{--tw-text-opacity:1;color:rgba(167,139,250,var(--tw-text-opacity))}pre.sf-dump .sf-dump-toggle{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-toggle{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}pre.sf-dump .sf-dump-toggle:hover{--tw-text-opacity:1!important;color:rgba(99,102,241,var(--tw-text-opacity))!important}pre.sf-dump .sf-dump-toggle span{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:1rem!important;height:1rem!important;font-size:9px;background-color:rgba(107,114,128,.05)}.dark pre.sf-dump .sf-dump-toggle span{background-color:rgba(0,0,0,.1)}pre.sf-dump .sf-dump-toggle span:hover{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.dark pre.sf-dump .sf-dump-toggle span:hover{--tw-bg-opacity:1!important;background-color:rgba(17,24,39,var(--tw-bg-opacity))!important}pre.sf-dump .sf-dump-toggle span{border-radius:9999px;--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}pre.sf-dump .sf-dump-toggle span,pre.sf-dump .sf-dump-toggle span:hover{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}pre.sf-dump .sf-dump-toggle span:hover{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px -1px rgba(0,0,0,0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);--tw-text-opacity:1!important;color:rgba(99,102,241,var(--tw-text-opacity))!important}pre.sf-dump .sf-dump-toggle span{top:-2px}pre.sf-dump .sf-dump-toggle:hover span{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.dark pre.sf-dump .sf-dump-toggle:hover span{--tw-bg-opacity:1!important;background-color:rgba(17,24,39,var(--tw-bg-opacity))!important}.\~text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark .\~text-gray-500{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.\~text-violet-500{--tw-text-opacity:1;color:rgba(139,92,246,var(--tw-text-opacity))}.dark .\~text-violet-500{--tw-text-opacity:1;color:rgba(167,139,250,var(--tw-text-opacity))}.\~text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.dark .\~text-gray-600{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.\~text-indigo-600{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.dark .\~text-indigo-600{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}.hover\:\~text-indigo-600:hover{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}:is(.dark .hover\:\~text-indigo-600):hover{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}.\~text-blue-600{--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.dark .\~text-blue-600{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}.\~text-violet-600{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}.dark .\~text-violet-600{--tw-text-opacity:1;color:rgba(167,139,250,var(--tw-text-opacity))}.hover\:\~text-violet-600:hover{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}:is(.dark .hover\:\~text-violet-600):hover{--tw-text-opacity:1;color:rgba(196,181,253,var(--tw-text-opacity))}.\~text-emerald-600{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.dark .\~text-emerald-600{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}.\~text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.dark .\~text-red-600{--tw-text-opacity:1;color:rgba(248,113,113,var(--tw-text-opacity))}.\~text-orange-600{--tw-text-opacity:1;color:rgba(234,88,12,var(--tw-text-opacity))}.dark .\~text-orange-600{--tw-text-opacity:1;color:rgba(251,146,60,var(--tw-text-opacity))}.\~text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.dark .\~text-gray-700{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.\~text-indigo-700{--tw-text-opacity:1;color:rgba(67,56,202,var(--tw-text-opacity))}.dark .\~text-indigo-700{--tw-text-opacity:1;color:rgba(199,210,254,var(--tw-text-opacity))}.\~text-blue-700{--tw-text-opacity:1;color:rgba(29,78,216,var(--tw-text-opacity))}.dark .\~text-blue-700{--tw-text-opacity:1;color:rgba(191,219,254,var(--tw-text-opacity))}.\~text-violet-700{--tw-text-opacity:1;color:rgba(109,40,217,var(--tw-text-opacity))}.dark .\~text-violet-700{--tw-text-opacity:1;color:rgba(221,214,254,var(--tw-text-opacity))}.\~text-emerald-700{--tw-text-opacity:1;color:rgba(4,120,87,var(--tw-text-opacity))}.dark .\~text-emerald-700{--tw-text-opacity:1;color:rgba(167,243,208,var(--tw-text-opacity))}.\~text-red-700{--tw-text-opacity:1;color:rgba(185,28,28,var(--tw-text-opacity))}.dark .\~text-red-700{--tw-text-opacity:1;color:rgba(254,202,202,var(--tw-text-opacity))}.\~text-orange-700{--tw-text-opacity:1;color:rgba(194,65,12,var(--tw-text-opacity))}.dark .\~text-orange-700{--tw-text-opacity:1;color:rgba(254,215,170,var(--tw-text-opacity))}.\~text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.dark .\~text-gray-800{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}.\~bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.dark .\~bg-white{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.\~bg-body{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.dark .\~bg-body{--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}.\~bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.dark .\~bg-gray-100{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.\~bg-gray-200\/50{background-color:rgba(229,231,235,.5)}.dark .\~bg-gray-200\/50{background-color:rgba(55,65,81,.1)}.\~bg-gray-500\/5{background-color:rgba(107,114,128,.05)}.dark .\~bg-gray-500\/5{background-color:rgba(0,0,0,.1)}.hover\:\~bg-gray-500\/5:hover{background-color:rgba(107,114,128,.05)}.dark .hover\:\~bg-gray-500\/5:hover{background-color:rgba(17,24,39,.2)}.\~bg-gray-500\/10{background-color:rgba(107,114,128,.1)}.dark .\~bg-gray-500\/10{background-color:rgba(17,24,39,.4)}.\~bg-red-500\/10{background-color:rgba(239,68,68,.1)}.dark .\~bg-red-500\/10{background-color:rgba(239,68,68,.2)}.hover\:\~bg-red-500\/10:hover{background-color:rgba(239,68,68,.1)}.\~bg-red-500\/20,.dark .hover\:\~bg-red-500\/10:hover{background-color:rgba(239,68,68,.2)}.dark .\~bg-red-500\/20{background-color:rgba(239,68,68,.4)}.\~bg-red-500\/30{background-color:rgba(239,68,68,.3)}.dark .\~bg-red-500\/30{background-color:rgba(239,68,68,.6)}.\~bg-dropdown{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.dark .\~bg-dropdown{--tw-bg-opacity:1!important;background-color:rgba(55,65,81,var(--tw-bg-opacity))!important}.\~border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.dark .\~border-gray-200{border-color:rgba(107,114,128,.2)}.\~border-b-dropdown{--tw-border-opacity:1!important;border-bottom-color:rgba(255,255,255,var(--tw-border-opacity))!important}.dark .\~border-b-dropdown{--tw-border-opacity:1!important;border-bottom-color:rgba(55,65,81,var(--tw-border-opacity))!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-0{right:0;left:0}.inset-0,.inset-y-0{top:0;bottom:0}.-bottom-3{bottom:-.75rem}.-bottom-32{bottom:-8rem}.-right-3{right:-.75rem}.-top-3{top:-.75rem}.-top-32{top:-8rem}.-top-6{top:-1.5rem}.-top-\[\.1rem\]{top:-.1rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1\/2{left:50%}.left-10{left:2.5rem}.left-4{left:1rem}.right-0{right:0}.right-1\/2{right:50%}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-10{top:2.5rem}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-\[7\.5rem\]{top:7.5rem}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.-my-5{margin-top:-1.25rem;margin-bottom:-1.25rem}.-my-px{margin-top:-1px;margin-bottom:-1px}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-2{margin-bottom:-.5rem}.-ml-1{margin-left:-.25rem}.-ml-3{margin-left:-.75rem}.-ml-6{margin-left:-1.5rem}.-mr-3{margin-right:-.75rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-0\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-10{margin-right:2.5rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\[-4px\]{margin-top:-4px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[\.9rem\]{height:.9rem}.h-\[170\%\]{height:170%}.h-\[4px\]{height:4px}.h-\[75rem\]{height:75rem}.h-full{height:100%}.max-h-32{max-height:8rem}.max-h-\[33vh\]{max-height:33vh}.w-0{width:0}.w-2{width:.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[2rem\]{width:2rem}.w-\[75rem\]{width:75rem}.w-\[8rem\]{width:8rem}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[1rem\]{min-width:1rem}.min-w-\[2rem\]{min-width:2rem}.min-w-\[8rem\]{min-width:8rem}.max-w-4xl{max-width:56rem}.max-w-max{max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}.max-w-xl{max-width:36rem}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-top-right{transform-origin:top right}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.translate-x-0{--tw-translate-x:0px}.translate-x-0,.translate-x-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\/2{--tw-translate-x:50%}.translate-x-6{--tw-translate-x:1.5rem}.translate-x-6,.translate-x-8{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-8{--tw-translate-x:2rem}.translate-x-full{--tw-translate-x:100%}.translate-x-full,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-1\/2{--tw-translate-y:50%}.translate-y-1\/2,.translate-y-10{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-10{--tw-translate-y:2.5rem}.translate-y-full{--tw-translate-y:100%}.-rotate-180,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-180{--tw-rotate:-180deg}.-rotate-90{--tw-rotate:-90deg}.-rotate-90,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate:180deg}.rotate-90{--tw-rotate:90deg}.rotate-90,.scale-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x:.9;--tw-scale-y:.9}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-px{gap:1px}.gap-x-16{-moz-column-gap:4rem;column-gap:4rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-2{row-gap:.5rem}.space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1px*var(--tw-space-x-reverse));margin-left:calc(1px*(1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.overflow-x-scroll{overflow-x:scroll}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-bl-lg{border-bottom-left-radius:.5rem}.rounded-br-lg{border-bottom-right-radius:.5rem}.border{border-width:1px}.border-\[10px\]{border-width:10px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-emerald-500\/25{border-color:rgba(16,185,129,.25)}.border-emerald-500\/50{border-color:rgba(16,185,129,.5)}.border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.border-gray-500\/50{border-color:rgba(107,114,128,.5)}.border-gray-800\/20{border-color:rgba(31,41,55,.2)}.border-indigo-500\/50{border-color:rgba(99,102,241,.5)}.border-orange-500\/50{border-color:rgba(249,115,22,.5)}.border-red-500\/25{border-color:rgba(239,68,68,.25)}.border-red-500\/50{border-color:rgba(239,68,68,.5)}.border-transparent{border-color:transparent}.border-violet-500\/25{border-color:rgba(139,92,246,.25)}.border-violet-600\/50{border-color:rgba(124,58,237,.5)}.bg-emerald-300{--tw-bg-opacity:1;background-color:rgba(110,231,183,var(--tw-bg-opacity))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgba(16,185,129,var(--tw-bg-opacity))}.bg-emerald-500\/5{background-color:rgba(16,185,129,.05)}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgba(5,150,105,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-gray-25{--tw-bg-opacity:1;background-color:rgba(252,252,253,var(--tw-bg-opacity))}.bg-gray-300\/50{background-color:rgba(209,213,219,.5)}.bg-gray-500\/5{background-color:rgba(107,114,128,.05)}.bg-gray-900{--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}.bg-gray-900\/30{background-color:rgba(17,24,39,.3)}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgba(99,102,241,var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgba(79,70,229,var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgba(254,202,202,var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgba(254,242,242,var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgba(239,68,68,var(--tw-bg-opacity))}.bg-red-500\/10{background-color:rgba(239,68,68,.1)}.bg-red-500\/20{background-color:rgba(239,68,68,.2)}.bg-red-500\/30{background-color:rgba(239,68,68,.3)}.bg-red-600{--tw-bg-opacity:1;background-color:rgba(220,38,38,var(--tw-bg-opacity))}.bg-red-800\/5{background-color:rgba(153,27,27,.05)}.bg-violet-500{--tw-bg-opacity:1;background-color:rgba(139,92,246,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgba(254,252,232,var(--tw-bg-opacity))}.bg-opacity-20{--tw-bg-opacity:0.2}.bg-dots-darker{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='30' height='30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.227 0c.687 0 1.227.54 1.227 1.227s-.54 1.227-1.227 1.227S0 1.914 0 1.227.54 0 1.227 0z' fill='rgba(0,0,0,0.07)'/%3E%3C/svg%3E")}.bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.from-gray-700\/50{--tw-gradient-from:rgba(55,65,81,0.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(55,65,81,0) var(--tw-gradient-to-position)}.from-gray-700\/50,.from-white{--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position)}.via-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),transparent var(--tw-gradient-via-position),var(--tw-gradient-to)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-center{background-position:50%}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-10{padding-bottom:2.5rem}.pb-16{padding-bottom:4rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-px{padding-left:1px}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-8{padding-right:2rem}.pt-10{padding-top:2.5rem}.pt-2{padding-top:.5rem}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[8px\]{font-size:8px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-6{line-height:1.5rem}.leading-8{line-height:2rem}.leading-loose{line-height:2}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-emerald-500{--tw-text-opacity:1;color:rgba(16,185,129,var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.text-emerald-700{--tw-text-opacity:1;color:rgba(4,120,87,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgba(21,128,61,var(--tw-text-opacity))}.text-indigo-100{--tw-text-opacity:1;color:rgba(224,231,255,var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity:1;color:rgba(234,88,12,var(--tw-text-opacity))}.text-red-100{--tw-text-opacity:1;color:rgba(254,226,226,var(--tw-text-opacity))}.text-red-50{--tw-text-opacity:1;color:rgba(254,242,242,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgba(185,28,28,var(--tw-text-opacity))}.text-transparent{color:transparent}.text-violet-500{--tw-text-opacity:1;color:rgba(139,92,246,var(--tw-text-opacity))}.text-violet-600{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgba(234,179,8,var(--tw-text-opacity))}.text-opacity-75{--tw-text-opacity:0.75}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px -1px rgba(0,0,0,0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,0.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.shadow-inner,.shadow-lg{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -4px rgba(0,0,0,0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -2px rgba(0,0,0,0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-gray-500\/20{--tw-shadow-color:rgba(107,114,128,0.2);--tw-shadow:var(--tw-shadow-colored)}.blur-\[10px\]{--tw-blur:blur(10px)}.blur-\[10px\],.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-animation{transition-property:transform,box-shadow,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,fill,stroke,-webkit-text-decoration-color;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,-webkit-text-decoration-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.\@container{container-type:inline-size}.\[mask-image\:radial-gradient\(closest-side\2c white\2c transparent\)\]{-webkit-mask-image:radial-gradient(closest-side,#fff,transparent);mask-image:radial-gradient(closest-side,#fff,transparent)}.first-letter\:uppercase:first-letter{text-transform:uppercase}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hover\:text-emerald-700:hover{--tw-text-opacity:1;color:rgba(4,120,87,var(--tw-text-opacity))}.hover\:text-emerald-800:hover{--tw-text-opacity:1;color:rgba(6,95,70,var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.hover\:text-red-800:hover{--tw-text-opacity:1;color:rgba(153,27,27,var(--tw-text-opacity))}.hover\:text-violet-500:hover{--tw-text-opacity:1;color:rgba(139,92,246,var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\:underline:hover{-webkit-text-decoration-line:underline;text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -4px rgba(0,0,0,0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.hover\:shadow-lg:hover,.hover\:shadow-md:hover{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -2px rgba(0,0,0,0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.focus-visible\:outline.focus-visible,.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2.focus-visible,.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2.focus-visible,.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-white.focus-visible,.focus-visible\:outline-white:focus-visible{outline-color:#fff}.active\:translate-y-px:active{--tw-translate-y:1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:shadow-inner:active{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.active\:shadow-inner:active,.active\:shadow-sm:active{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.active\:shadow-sm:active{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.group:hover .group-hover\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:text-amber-300{--tw-text-opacity:1;color:rgba(252,211,77,var(--tw-text-opacity))}.group:hover .group-hover\:text-amber-400{--tw-text-opacity:1;color:rgba(251,191,36,var(--tw-text-opacity))}.group:hover .group-hover\:text-indigo-500{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-50{opacity:.5}.peer:checked~.peer-checked\:translate-x-2{--tw-translate-x:0.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:bg-emerald-300{--tw-bg-opacity:1;background-color:rgba(110,231,183,var(--tw-bg-opacity))}@container (min-width: 32rem){.\@lg\:px-10{padding-left:2.5rem;padding-right:2.5rem}}@container (min-width: 42rem){.\@2xl\:block{display:block}}@container (min-width: 56rem){.\@4xl\:absolute{position:absolute}.\@4xl\:col-span-2{grid-column:span 2/span 2}.\@4xl\:mr-20{margin-right:5rem}.\@4xl\:block{display:block}.\@4xl\:flex{display:flex}.\@4xl\:grid{display:grid}.\@4xl\:max-h-\[none\]{max-height:none}.\@4xl\:grid-cols-\[33\.33\%_66\.66\%\]{grid-template-columns:33.33% 66.66%}.\@4xl\:grid-cols-\[max-content\2c 12rem\]{grid-template-columns:-webkit-max-content 12rem;grid-template-columns:max-content 12rem}.\@4xl\:grid-rows-\[57rem\]{grid-template-rows:57rem}.\@4xl\:rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.\@4xl\:rounded-bl-none{border-bottom-left-radius:0}.\@4xl\:border-t-0{border-top-width:0}}.dark .dark\:bg-black\/10{background-color:rgba(0,0,0,.1)}.dark .dark\:bg-gray-800\/50{background-color:rgba(31,41,55,.5)}.dark .dark\:bg-red-500\/10{background-color:rgba(239,68,68,.1)}.dark .dark\:bg-yellow-500\/10{background-color:rgba(234,179,8,.1)}.dark .dark\:bg-dots-lighter{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='30' height='30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.227 0c.687 0 1.227.54 1.227 1.227s-.54 1.227-1.227 1.227S0 1.914 0 1.227.54 0 1.227 0z' fill='rgba(255,255,255,0.07)'/%3E%3C/svg%3E")}.dark .dark\:bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.dark .dark\:from-gray-700\/50{--tw-gradient-from:rgba(55,65,81,0.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(55,65,81,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.dark .dark\:shadow-none{--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.dark .dark\:ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.dark .dark\:ring-inset{--tw-ring-inset:inset}.dark .dark\:ring-white\/5{--tw-ring-color:hsla(0,0%,100%,0.05)}@media (min-width:640px){.sm\:-ml-5{margin-left:-1.25rem}.sm\:-mr-5{margin-right:-1.25rem}.sm\:inline-flex{display:inline-flex}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-24{padding-left:6rem;padding-right:6rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:py-20{padding-top:5rem;padding-bottom:5rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media (min-width:1024px){.lg\:flex{display:flex}.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/5{width:40%}.lg\:max-w-\[90rem\]{max-width:90rem}.lg\:px-10{padding-left:2.5rem;padding-right:2.5rem}}@media (min-width:1280px){.xl\:gap-x-24{-moz-column-gap:6rem;column-gap:6rem}} \ No newline at end of file +*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent}html{font-size:max(13px,min(1.3vw,16px));overflow-x:hidden;overflow-y:scroll;font-feature-settings:"calt" 0;-webkit-marquee-increment:1vw}:after,:before,:not(iframe){position:relative}:focus{outline:0!important}body{font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica Neue,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;width:100%;color:rgba(31,41,55,var(--tw-text-opacity))}.dark body,body{--tw-text-opacity:1}.dark body{color:rgba(229,231,235,var(--tw-text-opacity))}body{background-color:rgba(229,231,235,var(--tw-bg-opacity))}.dark body,body{--tw-bg-opacity:1}.dark body{background-color:rgba(17,24,39,var(--tw-bg-opacity))}@media (color-index:48){html.auto body{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity));--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}}@media (color:48842621){html.auto body{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity));--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}}@media (prefers-color-scheme:dark){html.auto body{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity));--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}}.scroll-target:target{content:"";display:block;position:absolute;top:-6rem}pre.sf-dump{display:block;white-space:pre;padding:5px;overflow:visible!important;overflow:initial!important}pre.sf-dump:after{content:"";visibility:hidden;display:block;height:0;clear:both}pre.sf-dump span{display:inline}pre.sf-dump a{text-decoration:none;cursor:pointer;border:0;outline:none;color:inherit}pre.sf-dump img{max-width:50em;max-height:50em;margin:.5em 0 0;padding:0;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAHUlEQVQY02O8zAABilCaiQEN0EeA8QuUcX9g3QEAAjcC5piyhyEAAAAASUVORK5CYII=) #d3d3d3}pre.sf-dump .sf-dump-ellipsis{display:inline-block;overflow:visible;text-overflow:ellipsis;max-width:5em;white-space:nowrap;overflow:hidden;vertical-align:top}pre.sf-dump .sf-dump-ellipsis+.sf-dump-ellipsis{max-width:none}pre.sf-dump code{display:inline;padding:0;background:none}.sf-dump-key.sf-dump-highlight,.sf-dump-private.sf-dump-highlight,.sf-dump-protected.sf-dump-highlight,.sf-dump-public.sf-dump-highlight,.sf-dump-str.sf-dump-highlight{background:rgba(111,172,204,.3);border:1px solid #7da0b1;border-radius:3px}.sf-dump-key.sf-dump-highlight-active,.sf-dump-private.sf-dump-highlight-active,.sf-dump-protected.sf-dump-highlight-active,.sf-dump-public.sf-dump-highlight-active,.sf-dump-str.sf-dump-highlight-active{background:rgba(253,175,0,.4);border:1px solid orange;border-radius:3px}pre.sf-dump .sf-dump-search-hidden{display:none!important}pre.sf-dump .sf-dump-search-wrapper{font-size:0;white-space:nowrap;margin-bottom:5px;display:flex;position:-webkit-sticky;position:sticky;top:5px}pre.sf-dump .sf-dump-search-wrapper>*{vertical-align:top;box-sizing:border-box;height:21px;font-weight:400;border-radius:0;background:#fff;color:#757575;border:1px solid #bbb}pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{padding:3px;height:21px;font-size:12px;border-right:none;border-top-left-radius:3px;border-bottom-left-radius:3px;color:#000;min-width:15px;width:100%}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous{background:#f2f2f2;outline:none;border-left:none;font-size:0;line-height:0}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next{border-top-right-radius:3px;border-bottom-right-radius:3px}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next>svg,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous>svg{pointer-events:none;width:12px;height:12px}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-count{display:inline-block;padding:0 5px;margin:0;border-left:none;line-height:21px;font-size:12px}.hljs-comment,.hljs-quote{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark .hljs-comment,.dark .hljs-quote{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.hljs-comment.hljs-doctag{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.dark .hljs-comment.hljs-doctag{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.hljs-doctag,.hljs-formula,.hljs-keyword,.hljs-name{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.dark .hljs-doctag,.dark .hljs-formula,.dark .hljs-keyword,.dark .hljs-name{--tw-text-opacity:1;color:rgba(248,113,113,var(--tw-text-opacity))}.hljs-attr,.hljs-deletion,.hljs-function.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-tag{--tw-text-opacity:1;color:rgba(139,92,246,var(--tw-text-opacity))}.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.dark .hljs-addition,.dark .hljs-attribute,.dark .hljs-meta-string,.dark .hljs-regexp,.dark .hljs-string{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}.hljs-built_in,.hljs-class .hljs-title,.hljs-template-tag,.hljs-template-variable{--tw-text-opacity:1;color:rgba(249,115,22,var(--tw-text-opacity))}.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-string.hljs-subst,.hljs-type{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.dark .hljs-number,.dark .hljs-selector-attr,.dark .hljs-selector-class,.dark .hljs-selector-pseudo,.dark .hljs-string.hljs-subst,.dark .hljs-type{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-operator,.hljs-selector-id,.hljs-symbol,.hljs-title,.hljs-variable{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.dark .hljs-bullet,.dark .hljs-link,.dark .hljs-meta,.dark .hljs-operator,.dark .hljs-selector-id,.dark .hljs-symbol,.dark .hljs-title,.dark .hljs-variable{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}.hljs-strong,.hljs-title{font-weight:700}.hljs-emphasis{font-style:italic}.hljs-link{-webkit-text-decoration-line:underline;text-decoration-line:underline}.language-sql .hljs-keyword{text-transform:uppercase}.mask-fade-x{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 1rem,#000 calc(100% - 3rem),transparent calc(100% - 1rem))}.mask-fade-r{-webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(100% - 3rem),transparent calc(100% - 1rem))}.mask-fade-y{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 2.5rem),transparent)}.mask-fade-frames{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 4rem),transparent)}.scrollbar::-webkit-scrollbar,.scrollbar::-webkit-scrollbar-corner{width:2px;height:2px}.scrollbar::-webkit-scrollbar-track{background-color:transparent}.scrollbar::-webkit-scrollbar-thumb{background-color:rgba(239,68,68,.9)}.scrollbar-lg::-webkit-scrollbar,.scrollbar-lg::-webkit-scrollbar-corner{width:4px;height:4px}.scrollbar-lg::-webkit-scrollbar-track{background-color:transparent}.scrollbar-lg::-webkit-scrollbar-thumb{background-color:rgba(239,68,68,.9)}.scrollbar-hidden-x{-ms-overflow-style:none;scrollbar-width:none;overflow-x:scroll}.scrollbar-hidden-x::-webkit-scrollbar{display:none}.scrollbar-hidden-y{-ms-overflow-style:none;scrollbar-width:none;overflow-y:scroll}.scrollbar-hidden-y::-webkit-scrollbar{display:none}main pre.sf-dump{display:block!important;z-index:0!important;padding:0!important;font-size:.875rem!important;line-height:1.25rem!important}.sf-dump-key.sf-dump-highlight,.sf-dump-private.sf-dump-highlight,.sf-dump-protected.sf-dump-highlight,.sf-dump-public.sf-dump-highlight,.sf-dump-str.sf-dump-highlight{background-color:rgba(139,92,246,.1)!important}.sf-dump-key.sf-dump-highlight-active,.sf-dump-private.sf-dump-highlight-active,.sf-dump-protected.sf-dump-highlight-active,.sf-dump-public.sf-dump-highlight-active,.sf-dump-str.sf-dump-highlight-active{background-color:rgba(245,158,11,.1)!important}pre.sf-dump .sf-dump-search-wrapper{align-items:center}pre.sf-dump .sf-dump-search-wrapper>*{border-width:0!important}pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{font-size:.75rem!important;line-height:1rem!important;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.dark pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}pre.sf-dump .sf-dump-search-wrapper>input.sf-dump-search-input{height:2rem!important;padding-left:.5rem!important;padding-right:.5rem!important}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous{background-color:transparent!important;--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next,.dark pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next:hover,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous:hover{--tw-text-opacity:1!important;color:rgba(99,102,241,var(--tw-text-opacity))!important}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-next,pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-input-previous{padding-left:.25rem;padding-right:.25rem}pre.sf-dump .sf-dump-search-wrapper svg path{fill:currentColor}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-count{font-size:.75rem!important;line-height:1rem!important;line-height:1.5!important;padding-left:1rem!important;padding-right:1rem!important;--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-count{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}pre.sf-dump .sf-dump-search-wrapper>.sf-dump-search-count{background-color:transparent!important}pre.sf-dump,pre.sf-dump .sf-dump-default{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important;background-color:transparent!important;--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.dark pre.sf-dump,.dark pre.sf-dump .sf-dump-default{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}pre.sf-dump .sf-dump-num{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-num{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}pre.sf-dump .sf-dump-const{font-weight:400!important;--tw-text-opacity:1!important;color:rgba(139,92,246,var(--tw-text-opacity))!important}pre.sf-dump .sf-dump-str{font-weight:400!important;--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-str{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}pre.sf-dump .sf-dump-note{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-note{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}pre.sf-dump .sf-dump-ref{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-ref{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}pre.sf-dump .sf-dump-private,pre.sf-dump .sf-dump-protected,pre.sf-dump .sf-dump-public{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-private,.dark pre.sf-dump .sf-dump-protected,.dark pre.sf-dump .sf-dump-public{--tw-text-opacity:1;color:rgba(248,113,113,var(--tw-text-opacity))}pre.sf-dump .sf-dump-meta{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-meta{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}pre.sf-dump .sf-dump-key{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-key{--tw-text-opacity:1;color:rgba(167,139,250,var(--tw-text-opacity))}pre.sf-dump .sf-dump-index{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-index{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}pre.sf-dump .sf-dump-ellipsis{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-ellipsis{--tw-text-opacity:1;color:rgba(167,139,250,var(--tw-text-opacity))}pre.sf-dump .sf-dump-toggle{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark pre.sf-dump .sf-dump-toggle{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}pre.sf-dump .sf-dump-toggle:hover{--tw-text-opacity:1!important;color:rgba(99,102,241,var(--tw-text-opacity))!important}pre.sf-dump .sf-dump-toggle span{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:1rem!important;height:1rem!important;font-size:9px;background-color:rgba(107,114,128,.05)}.dark pre.sf-dump .sf-dump-toggle span{background-color:rgba(0,0,0,.1)}pre.sf-dump .sf-dump-toggle span:hover{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.dark pre.sf-dump .sf-dump-toggle span:hover{--tw-bg-opacity:1!important;background-color:rgba(17,24,39,var(--tw-bg-opacity))!important}pre.sf-dump .sf-dump-toggle span{border-radius:9999px;--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}pre.sf-dump .sf-dump-toggle span,pre.sf-dump .sf-dump-toggle span:hover{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}pre.sf-dump .sf-dump-toggle span:hover{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px -1px rgba(0,0,0,0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);--tw-text-opacity:1!important;color:rgba(99,102,241,var(--tw-text-opacity))!important}pre.sf-dump .sf-dump-toggle span{top:-2px}pre.sf-dump .sf-dump-toggle:hover span{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.dark pre.sf-dump .sf-dump-toggle:hover span{--tw-bg-opacity:1!important;background-color:rgba(17,24,39,var(--tw-bg-opacity))!important}.\~text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.dark .\~text-gray-500{--tw-text-opacity:1;color:rgba(156,163,175,var(--tw-text-opacity))}.\~text-violet-500{--tw-text-opacity:1;color:rgba(139,92,246,var(--tw-text-opacity))}.dark .\~text-violet-500{--tw-text-opacity:1;color:rgba(167,139,250,var(--tw-text-opacity))}.\~text-gray-600{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.dark .\~text-gray-600{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.\~text-indigo-600{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.dark .\~text-indigo-600{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}.hover\:\~text-indigo-600:hover{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}:is(.dark .hover\:\~text-indigo-600):hover{--tw-text-opacity:1;color:rgba(129,140,248,var(--tw-text-opacity))}.\~text-blue-600{--tw-text-opacity:1;color:rgba(37,99,235,var(--tw-text-opacity))}.dark .\~text-blue-600{--tw-text-opacity:1;color:rgba(96,165,250,var(--tw-text-opacity))}.\~text-violet-600{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}.dark .\~text-violet-600{--tw-text-opacity:1;color:rgba(167,139,250,var(--tw-text-opacity))}.hover\:\~text-violet-600:hover{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}:is(.dark .hover\:\~text-violet-600):hover{--tw-text-opacity:1;color:rgba(196,181,253,var(--tw-text-opacity))}.\~text-emerald-600{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.dark .\~text-emerald-600{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}.\~text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.dark .\~text-red-600{--tw-text-opacity:1;color:rgba(248,113,113,var(--tw-text-opacity))}.\~text-orange-600{--tw-text-opacity:1;color:rgba(234,88,12,var(--tw-text-opacity))}.dark .\~text-orange-600{--tw-text-opacity:1;color:rgba(251,146,60,var(--tw-text-opacity))}.\~text-gray-700{--tw-text-opacity:1;color:rgba(55,65,81,var(--tw-text-opacity))}.dark .\~text-gray-700{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.\~text-indigo-700{--tw-text-opacity:1;color:rgba(67,56,202,var(--tw-text-opacity))}.dark .\~text-indigo-700{--tw-text-opacity:1;color:rgba(199,210,254,var(--tw-text-opacity))}.\~text-blue-700{--tw-text-opacity:1;color:rgba(29,78,216,var(--tw-text-opacity))}.dark .\~text-blue-700{--tw-text-opacity:1;color:rgba(191,219,254,var(--tw-text-opacity))}.\~text-violet-700{--tw-text-opacity:1;color:rgba(109,40,217,var(--tw-text-opacity))}.dark .\~text-violet-700{--tw-text-opacity:1;color:rgba(221,214,254,var(--tw-text-opacity))}.\~text-emerald-700{--tw-text-opacity:1;color:rgba(4,120,87,var(--tw-text-opacity))}.dark .\~text-emerald-700{--tw-text-opacity:1;color:rgba(167,243,208,var(--tw-text-opacity))}.\~text-red-700{--tw-text-opacity:1;color:rgba(185,28,28,var(--tw-text-opacity))}.dark .\~text-red-700{--tw-text-opacity:1;color:rgba(254,202,202,var(--tw-text-opacity))}.\~text-orange-700{--tw-text-opacity:1;color:rgba(194,65,12,var(--tw-text-opacity))}.dark .\~text-orange-700{--tw-text-opacity:1;color:rgba(254,215,170,var(--tw-text-opacity))}.\~text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.dark .\~text-gray-800{--tw-text-opacity:1;color:rgba(229,231,235,var(--tw-text-opacity))}.\~bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.dark .\~bg-white{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.\~bg-body{--tw-bg-opacity:1;background-color:rgba(229,231,235,var(--tw-bg-opacity))}.dark .\~bg-body{--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}.\~bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.dark .\~bg-gray-100{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.\~bg-gray-200\/50{background-color:rgba(229,231,235,.5)}.dark .\~bg-gray-200\/50{background-color:rgba(55,65,81,.1)}.\~bg-gray-500\/5{background-color:rgba(107,114,128,.05)}.dark .\~bg-gray-500\/5{background-color:rgba(0,0,0,.1)}.hover\:\~bg-gray-500\/5:hover{background-color:rgba(107,114,128,.05)}.dark .hover\:\~bg-gray-500\/5:hover{background-color:rgba(17,24,39,.2)}.\~bg-gray-500\/10{background-color:rgba(107,114,128,.1)}.dark .\~bg-gray-500\/10{background-color:rgba(17,24,39,.4)}.\~bg-red-500\/10{background-color:rgba(239,68,68,.1)}.dark .\~bg-red-500\/10{background-color:rgba(239,68,68,.2)}.hover\:\~bg-red-500\/10:hover{background-color:rgba(239,68,68,.1)}.\~bg-red-500\/20,.dark .hover\:\~bg-red-500\/10:hover{background-color:rgba(239,68,68,.2)}.dark .\~bg-red-500\/20{background-color:rgba(239,68,68,.4)}.\~bg-red-500\/30{background-color:rgba(239,68,68,.3)}.dark .\~bg-red-500\/30{background-color:rgba(239,68,68,.6)}.\~bg-dropdown{--tw-bg-opacity:1!important;background-color:rgba(255,255,255,var(--tw-bg-opacity))!important}.dark .\~bg-dropdown{--tw-bg-opacity:1!important;background-color:rgba(55,65,81,var(--tw-bg-opacity))!important}.\~border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.dark .\~border-gray-200{border-color:rgba(107,114,128,.2)}.\~border-b-dropdown{--tw-border-opacity:1!important;border-bottom-color:rgba(255,255,255,var(--tw-border-opacity))!important}.dark .\~border-b-dropdown{--tw-border-opacity:1!important;border-bottom-color:rgba(55,65,81,var(--tw-border-opacity))!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-0{right:0;left:0}.inset-0,.inset-y-0{top:0;bottom:0}.-bottom-3{bottom:-.75rem}.-right-3{right:-.75rem}.-top-3{top:-.75rem}.-top-\[\.1rem\]{top:-.1rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1\/2{left:50%}.left-10{left:2.5rem}.left-4{left:1rem}.right-0{right:0}.right-1\/2{right:50%}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-10{top:2.5rem}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-\[7\.5rem\]{top:7.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.-my-5{margin-top:-1.25rem;margin-bottom:-1.25rem}.-my-px{margin-top:-1px;margin-bottom:-1px}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.-mb-2{margin-bottom:-.5rem}.-ml-1{margin-left:-.25rem}.-ml-3{margin-left:-.75rem}.-ml-6{margin-left:-1.5rem}.-mr-3{margin-right:-.75rem}.-mt-1{margin-top:-.25rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-0\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-10{margin-right:2.5rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mr-px{margin-right:1px}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-\[-4px\]{margin-top:-4px}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-none{overflow:visible;display:block;-webkit-box-orient:horizontal;-webkit-line-clamp:none}.block{display:block}.inline-block{display:inline-block}.\!inline{display:inline!important}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-0{height:0}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[\.9rem\]{height:.9rem}.h-\[4px\]{height:4px}.h-full{height:100%}.max-h-32{max-height:8rem}.max-h-\[33vh\]{max-height:33vh}.w-0{width:0}.w-2{width:.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[2rem\]{width:2rem}.w-\[8rem\]{width:8rem}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[1rem\]{min-width:1rem}.min-w-\[2rem\]{min-width:2rem}.min-w-\[8rem\]{min-width:8rem}.max-w-4xl{max-width:56rem}.max-w-max{max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-top-right{transform-origin:top right}.-translate-x-1\/2{--tw-translate-x:-50%}.-translate-x-1\/2,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-x-6{--tw-translate-x:1.5rem}.translate-x-6,.translate-x-8{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-8{--tw-translate-x:2rem}.translate-x-full{--tw-translate-x:100%}.translate-x-full,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-10{--tw-translate-y:2.5rem}.translate-y-10,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y:100%}.-rotate-180{--tw-rotate:-180deg}.-rotate-90,.-rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-90,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-90{--tw-scale-x:.9;--tw-scale-y:.9}.scale-90,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-px{gap:1px}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-2{row-gap:.5rem}.space-x-px>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1px*var(--tw-space-x-reverse));margin-left:calc(1px*(1 - var(--tw-space-x-reverse)))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.overflow-x-scroll{overflow-x:scroll}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.rounded-bl-lg{border-bottom-left-radius:.5rem}.rounded-br-lg{border-bottom-right-radius:.5rem}.border{border-width:1px}.border-\[10px\]{border-width:10px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0}.border-emerald-500\/25{border-color:rgba(16,185,129,.25)}.border-emerald-500\/50{border-color:rgba(16,185,129,.5)}.border-gray-200{--tw-border-opacity:1;border-color:rgba(229,231,235,var(--tw-border-opacity))}.border-gray-500\/50{border-color:rgba(107,114,128,.5)}.border-gray-800\/20{border-color:rgba(31,41,55,.2)}.border-indigo-500\/50{border-color:rgba(99,102,241,.5)}.border-orange-500\/50{border-color:rgba(249,115,22,.5)}.border-red-500\/25{border-color:rgba(239,68,68,.25)}.border-red-500\/50{border-color:rgba(239,68,68,.5)}.border-transparent{border-color:transparent}.border-violet-500\/25{border-color:rgba(139,92,246,.25)}.border-violet-600\/50{border-color:rgba(124,58,237,.5)}.bg-emerald-300{--tw-bg-opacity:1;background-color:rgba(110,231,183,var(--tw-bg-opacity))}.bg-emerald-500{--tw-bg-opacity:1;background-color:rgba(16,185,129,var(--tw-bg-opacity))}.bg-emerald-500\/5{background-color:rgba(16,185,129,.05)}.bg-emerald-600{--tw-bg-opacity:1;background-color:rgba(5,150,105,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.bg-gray-25{--tw-bg-opacity:1;background-color:rgba(252,252,253,var(--tw-bg-opacity))}.bg-gray-300\/50{background-color:rgba(209,213,219,.5)}.bg-gray-500\/5{background-color:rgba(107,114,128,.05)}.bg-gray-900\/30{background-color:rgba(17,24,39,.3)}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgba(99,102,241,var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgba(79,70,229,var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgba(254,202,202,var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgba(254,242,242,var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgba(239,68,68,var(--tw-bg-opacity))}.bg-red-500\/10{background-color:rgba(239,68,68,.1)}.bg-red-500\/20{background-color:rgba(239,68,68,.2)}.bg-red-500\/30{background-color:rgba(239,68,68,.3)}.bg-red-600{--tw-bg-opacity:1;background-color:rgba(220,38,38,var(--tw-bg-opacity))}.bg-red-800\/5{background-color:rgba(153,27,27,.05)}.bg-violet-500{--tw-bg-opacity:1;background-color:rgba(139,92,246,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgba(254,252,232,var(--tw-bg-opacity))}.bg-opacity-20{--tw-bg-opacity:0.2}.bg-dots-darker{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='30' height='30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.227 0c.687 0 1.227.54 1.227 1.227s-.54 1.227-1.227 1.227S0 1.914 0 1.227.54 0 1.227 0z' fill='rgba(0,0,0,0.07)'/%3E%3C/svg%3E")}.bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.from-gray-700\/50{--tw-gradient-from:rgba(55,65,81,0.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(55,65,81,0) var(--tw-gradient-to-position)}.from-gray-700\/50,.from-white{--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.from-white{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position)}.via-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),transparent var(--tw-gradient-via-position),var(--tw-gradient-to)}.bg-center{background-position:50%}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-10{padding-bottom:2.5rem}.pb-16{padding-bottom:4rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-px{padding-left:1px}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-8{padding-right:2rem}.pt-10{padding-top:2.5rem}.pt-2{padding-top:.5rem}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[8px\]{font-size:8px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-loose{line-height:2}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-wider{letter-spacing:.05em}.text-emerald-500{--tw-text-opacity:1;color:rgba(16,185,129,var(--tw-text-opacity))}.text-emerald-600{--tw-text-opacity:1;color:rgba(5,150,105,var(--tw-text-opacity))}.text-emerald-700{--tw-text-opacity:1;color:rgba(4,120,87,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(107,114,128,var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgba(21,128,61,var(--tw-text-opacity))}.text-indigo-100{--tw-text-opacity:1;color:rgba(224,231,255,var(--tw-text-opacity))}.text-indigo-500{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgba(79,70,229,var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity:1;color:rgba(234,88,12,var(--tw-text-opacity))}.text-red-100{--tw-text-opacity:1;color:rgba(254,226,226,var(--tw-text-opacity))}.text-red-50{--tw-text-opacity:1;color:rgba(254,242,242,var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(220,38,38,var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgba(185,28,28,var(--tw-text-opacity))}.text-violet-500{--tw-text-opacity:1;color:rgba(139,92,246,var(--tw-text-opacity))}.text-violet-600{--tw-text-opacity:1;color:rgba(124,58,237,var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity:1;color:rgba(234,179,8,var(--tw-text-opacity))}.text-opacity-75{--tw-text-opacity:0.75}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,0.1),0 1px 2px -1px rgba(0,0,0,0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,0.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.shadow-inner,.shadow-lg{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -4px rgba(0,0,0,0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -2px rgba(0,0,0,0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.shadow-gray-500\/20{--tw-shadow-color:rgba(107,114,128,0.2);--tw-shadow:var(--tw-shadow-colored)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-animation{transition-property:transform,box-shadow,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,fill,stroke,-webkit-text-decoration-color;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,-webkit-text-decoration-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.\@container{container-type:inline-size}.first-letter\:uppercase:first-letter{text-transform:uppercase}.hover\:text-emerald-700:hover{--tw-text-opacity:1;color:rgba(4,120,87,var(--tw-text-opacity))}.hover\:text-emerald-800:hover{--tw-text-opacity:1;color:rgba(6,95,70,var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity))}.hover\:text-purple-500:hover{--tw-text-opacity:1;color:rgba(168,85,247,var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgba(239,68,68,var(--tw-text-opacity))}.hover\:text-red-800:hover{--tw-text-opacity:1;color:rgba(153,27,27,var(--tw-text-opacity))}.hover\:text-violet-500:hover{--tw-text-opacity:1;color:rgba(139,92,246,var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\:underline:hover{-webkit-text-decoration-line:underline;text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -4px rgba(0,0,0,0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.hover\:shadow-lg:hover,.hover\:shadow-md:hover{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px rgba(0,0,0,0.1),0 2px 4px -2px rgba(0,0,0,0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.active\:translate-y-px:active{--tw-translate-y:1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\:shadow-inner:active{--tw-shadow:inset 0 2px 4px 0 rgba(0,0,0,0.05);--tw-shadow-colored:inset 0 2px 4px 0 var(--tw-shadow-color)}.active\:shadow-inner:active,.active\:shadow-sm:active{box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.active\:shadow-sm:active{--tw-shadow:0 1px 2px 0 rgba(0,0,0,0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.group:hover .group-hover\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:text-amber-300{--tw-text-opacity:1;color:rgba(252,211,77,var(--tw-text-opacity))}.group:hover .group-hover\:text-amber-400{--tw-text-opacity:1;color:rgba(251,191,36,var(--tw-text-opacity))}.group:hover .group-hover\:text-indigo-500{--tw-text-opacity:1;color:rgba(99,102,241,var(--tw-text-opacity))}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-50{opacity:.5}.peer:checked~.peer-checked\:translate-x-2{--tw-translate-x:0.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:checked~.peer-checked\:bg-emerald-300{--tw-bg-opacity:1;background-color:rgba(110,231,183,var(--tw-bg-opacity))}@container (min-width: 32rem){.\@lg\:px-10{padding-left:2.5rem;padding-right:2.5rem}}@container (min-width: 42rem){.\@2xl\:block{display:block}}@container (min-width: 56rem){.\@4xl\:absolute{position:absolute}.\@4xl\:col-span-2{grid-column:span 2/span 2}.\@4xl\:mr-20{margin-right:5rem}.\@4xl\:flex{display:flex}.\@4xl\:max-h-\[none\]{max-height:none}.\@4xl\:grid-cols-\[33\.33\%_66\.66\%\]{grid-template-columns:33.33% 66.66%}.\@4xl\:grid-rows-\[57rem\]{grid-template-rows:57rem}.\@4xl\:rounded-r-lg{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}.\@4xl\:rounded-bl-none{border-bottom-left-radius:0}.\@4xl\:border-t-0{border-top-width:0}}.dark .dark\:bg-black\/10{background-color:rgba(0,0,0,.1)}.dark .dark\:bg-gray-800\/50{background-color:rgba(31,41,55,.5)}.dark .dark\:bg-red-500\/10{background-color:rgba(239,68,68,.1)}.dark .dark\:bg-yellow-500\/10{background-color:rgba(234,179,8,.1)}.dark .dark\:bg-dots-lighter{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='30' height='30' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.227 0c.687 0 1.227.54 1.227 1.227s-.54 1.227-1.227 1.227S0 1.914 0 1.227.54 0 1.227 0z' fill='rgba(255,255,255,0.07)'/%3E%3C/svg%3E")}.dark .dark\:bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.dark .dark\:from-gray-700\/50{--tw-gradient-from:rgba(55,65,81,0.5) var(--tw-gradient-from-position);--tw-gradient-to:rgba(55,65,81,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.dark .dark\:shadow-none{--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;box-shadow:0 0 transparent,0 0 transparent,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.dark .dark\:ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.dark .dark\:ring-inset{--tw-ring-inset:inset}.dark .dark\:ring-white\/5{--tw-ring-color:hsla(0,0%,100%,0.05)}@media (min-width:640px){.sm\:-ml-5{margin-left:-1.25rem}.sm\:-mr-5{margin-right:-1.25rem}.sm\:inline-flex{display:inline-flex}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}}@media (min-width:1024px){.lg\:flex{display:flex}.lg\:w-1\/3{width:33.333333%}.lg\:w-2\/5{width:40%}.lg\:max-w-\[90rem\]{max-width:90rem}.lg\:px-10{padding-left:2.5rem;padding-right:2.5rem}} \ No newline at end of file diff --git a/vendor/spatie/ignition/resources/compiled/ignition.js b/vendor/spatie/ignition/resources/compiled/ignition.js index b284f8c2..f50c6dba 100644 --- a/vendor/spatie/ignition/resources/compiled/ignition.js +++ b/vendor/spatie/ignition/resources/compiled/ignition.js @@ -3,4 +3,4 @@ return c.createElement(s,Go({key:i},u),h)}}var Zo=["language","children","style" return c.createElement("code",{style:Object.assign({},e.codeStyle,void 0===n?{float:"left",paddingRight:"10px"}:n)},function(e){var t=e.startingLineNumber,n=e.style;return e.lines.map(function(e,r){var a=r+t;/*#__PURE__*/ return c.createElement("span",{key:"line-".concat(r),className:"react-syntax-highlighter-line-number",style:"function"==typeof n?n(a):n},"".concat(a,"\n"))})}({lines:t.replace(/\n$/,"").split("\n"),style:a,startingLineNumber:o}))}function ai(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function oi(e,t,n){var r,a={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return ti(ti({},a),o)}function ii(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,a=e.largestLineNumber,o=e.showInlineLineNumbers,i=e.lineProps,l=void 0===i?{}:i,s=e.className,c=void 0===s?[]:s,u=e.showLineNumbers,f=e.wrapLongLines,d="function"==typeof l?l(n):l;if(d.className=c,n&&o){var p=oi(r,n,a);t.unshift(ai(n,p))}return f&u&&(d.style=ti(ti({},d.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:d,children:t}}function li(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var a=e[r];if("text"===a.type)n.push(ii({children:[a],className:Vo(new Set(t))}));else if(a.children){var o=t.concat(a.properties.className);li(a.children,o).forEach(function(e){return n.push(e)})}}return n}function si(e,t,n,r,a,o,i,l,s){var c,u=li(e.value),f=[],d=-1,p=0;function m(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return ii({children:e,lineNumber:t,lineNumberStyle:l,largestLineNumber:i,showInlineLineNumbers:a,lineProps:n,className:o,showLineNumbers:r,wrapLongLines:s})}function h(e,t){if(r&&t&&a){var n=oi(l,t,i);e.unshift(ai(t,n))}return e}function g(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?m(e,n,r):h(e,n)}for(var y=function(){var e=u[p],t=e.children[0].value;if(t.match(ni)){var n=t.split("\n");n.forEach(function(t,a){var i=r&&f.length+o,l={type:"text",value:"".concat(t,"\n")};if(0===a){var s=g(u.slice(d+1,p).concat(ii({children:[l],className:e.properties.className})),i);f.push(s)}else if(a===n.length-1){var c=u[p+1]&&u[p+1].children&&u[p+1].children[0],m={type:"text",value:"".concat(t)};if(c){var h=ii({children:[m],className:e.properties.className});u.splice(p+1,0,h)}else{var y=g([m],i,e.properties.className);f.push(y)}}else{var v=g([l],i,e.properties.className);f.push(v)}}),d=p}p++};p<u.length;)y();if(d!==u.length-1){var v=u.slice(d+1,u.length);if(v&&v.length){var b=g(v,r&&f.length+o);f.push(b)}}return t?f:(c=[]).concat.apply(c,f)}function ci(e){var t=e.stylesheet,n=e.useInlineStyles;return e.rows.map(function(e,r){return Qo({node:e,stylesheet:t,useInlineStyles:n,key:"code-segement".concat(r)})})}function ui(e){return e&&void 0!==e.highlightAuto}function fi(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||fi(n)}),e}var di=fi;di.default=fi;class pi{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function mi(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function hi(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach(function(e){for(const t in e)n[t]=e[t]}),n}const gi=e=>!!e.kind;class yi{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=mi(e)}openNode(e){if(!gi(e))return;let t=e.kind;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){gi(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}class vi{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{vi._collapse(e)}))}}class bi extends vi{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new yi(this,this.options).value()}finalize(){return!0}}function Ei(e){return e?"string"==typeof e?e:e.source:null}const Ti=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,Si="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",wi={begin:"\\\\[\\s\\S]",relevance:0},Ni={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[wi]},Ri={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[wi]},Oi={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Ci=function(e,t,n={}){const r=hi({className:"comment",begin:e,end:t,contains:[]},n);return r.contains.push(Oi),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),r},xi=Ci("//","$"),ki=Ci("/\\*","\\*/"),Ai=Ci("#","$");var Ii=/*#__PURE__*/Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:Si,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>Ei(e)).join("")}(t,/.*\b/,e.binary,/\b.*/)),hi({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:wi,APOS_STRING_MODE:Ni,QUOTE_STRING_MODE:Ri,PHRASAL_WORDS_MODE:Oi,COMMENT:Ci,C_LINE_COMMENT_MODE:xi,C_BLOCK_COMMENT_MODE:ki,HASH_COMMENT_MODE:Ai,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:Si,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[wi,{begin:/\[/,end:/\]/,relevance:0,contains:[wi]}]}]},TITLE_MODE:{className:"title",begin:"[a-zA-Z]\\w*",relevance:0},UNDERSCORE_TITLE_MODE:{className:"title",begin:"[a-zA-Z_]\\w*",relevance:0},METHOD_GUARD:{begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function Li(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function _i(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Li,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Pi(e,t){Array.isArray(e.illegal)&&(e.illegal=function(...e){return"("+e.map(e=>Ei(e)).join("|")+")"}(...e.illegal))}function Mi(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Di(e,t){void 0===e.relevance&&(e.relevance=1)}const Ui=["of","and","for","in","not","or","if","then","parent","list","value"];function ji(e,t,n="keyword"){const r={};return"string"==typeof e?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach(function(n){Object.assign(r,ji(e[n],t,n))}),r;function a(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){const n=t.split("|");r[n[0]]=[e,Fi(n[0],n[1])]})}}function Fi(e,t){return t?Number(t):function(e){return Ui.includes(e.toLowerCase())}(e)?0:1}function zi(e,{}){function t(t,n){return new RegExp(Ei(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map(e=>e[1]);this.matcherRe=t(function(e,t="|"){let n=0;return e.map(e=>{n+=1;const t=n;let r=Ei(e),a="";for(;r.length>0;){const e=Ti.exec(r);if(!e){a+=r;break}a+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?a+="\\"+String(Number(e[1])+t):(a+=e[0],"("===e[0]&&n++)}return a}).map(e=>`(${e})`).join(t)}(e),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex((e,t)=>t>0&&void 0!==e),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=hi(e.classNameAliases||{}),function n(a,o){const i=a;if(a.isCompiled)return i;[Mi].forEach(e=>e(a,o)),e.compilerExtensions.forEach(e=>e(a,o)),a.__beforeBegin=null,[_i,Pi,Di].forEach(e=>e(a,o)),a.isCompiled=!0;let l=null;if("object"==typeof a.keywords&&(l=a.keywords.$pattern,delete a.keywords.$pattern),a.keywords&&(a.keywords=ji(a.keywords,e.case_insensitive)),a.lexemes&&l)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return l=l||a.lexemes||/\w+/,i.keywordPatternRe=t(l,!0),o&&(a.begin||(a.begin=/\B|\b/),i.beginRe=t(a.begin),a.endSameAsBegin&&(a.end=a.begin),a.end||a.endsWithParent||(a.end=/\B|\b/),a.end&&(i.endRe=t(a.end)),i.terminatorEnd=Ei(a.end)||"",a.endsWithParent&&o.terminatorEnd&&(i.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(i.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(e){return function(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return hi(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:Bi(e)?hi(e,{starts:e.starts?hi(e.starts):null}):Object.isFrozen(e)?hi(e):e}("self"===e?a:e)})),a.contains.forEach(function(e){n(e,i)}),a.starts&&n(a.starts,o),i.matcher=function(e){const t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:"begin"})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(i),i}(e)}function Bi(e){return!!e&&(e.endsWithParent||Bi(e.starts))}function Hi(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,mi(this.code);let t={};return this.autoDetect?(t=e.highlightAuto(this.code),this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),t.value},autoDetect(){return!this.language||(e=this.autodetect,Boolean(e||""===e));var e},ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}}const Vi={"after:highlightElement":({el:e,result:t,text:n})=>{const r=Gi(e);if(!r.length)return;const a=document.createElement("div");a.innerHTML=t.value,t.value=function(e,t,n){let r=0,a="";const o=[];function i(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function l(e){a+="<"+Wi(e)+[].map.call(e.attributes,function(e){return" "+e.nodeName+'="'+mi(e.value)+'"'}).join("")+">"}function s(e){a+="</"+Wi(e)+">"}function c(e){("start"===e.event?l:s)(e.node)}for(;e.length||t.length;){let t=i();if(a+=mi(n.substring(r,t[0].offset)),r=t[0].offset,t===e){o.reverse().forEach(s);do{c(t.splice(0,1)[0]),t=i()}while(t===e&&t.length&&t[0].offset===r);o.reverse().forEach(l)}else"start"===t[0].event?o.push(t[0].node):o.pop(),c(t.splice(0,1)[0])}return a+mi(n.substr(r))}(r,Gi(a),n)}};function Wi(e){return e.nodeName.toLowerCase()}function Gi(e){const t=[];return function e(n,r){for(let a=n.firstChild;a;a=a.nextSibling)3===a.nodeType?r+=a.nodeValue.length:1===a.nodeType&&(t.push({event:"start",offset:r,node:a}),r=e(a,r),Wi(a).match(/br|hr|img|input/)||t.push({event:"stop",offset:r,node:a}));return r}(e,0),t}const Yi={},$i=e=>{console.error(e)},Xi=(e,...t)=>{console.log(`WARN: ${e}`,...t)},qi=(e,t)=>{Yi[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Yi[`${e}/${t}`]=!0)},Ki=mi,Ji=hi,Qi=Symbol("nomatch");var Zi=function(e){const t=Object.create(null),n=Object.create(null),r=[];let a=!0;const o=/(^(<[^>]+>|\t|)+|\n)/gm,i="Could not find the language '{}', did you forget to load/include a language module?",l={disableAutodetect:!0,name:"Plain text",contains:[]};let s={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:bi};function c(e){return s.noHighlightRe.test(e)}function u(e,t,n,r){let a="",o="";"object"==typeof t?(a=e,n=t.ignoreIllegals,o=t.language,r=void 0):(qi("10.7.0","highlight(lang, code, ...args) has been deprecated."),qi("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),o=e,a=t);const i={code:a,language:o};w("before:highlight",i);const l=i.result?i.result:f(i.language,i.code,n,r);return l.code=i.code,w("after:highlight",l),l}function f(e,n,o,l){function c(e,t){const n=b.case_insensitive?t[0].toLowerCase():t[0];return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]}function u(){null!=w.subLanguage?function(){if(""===O)return;let e=null;if("string"==typeof w.subLanguage){if(!t[w.subLanguage])return void R.addText(O);e=f(w.subLanguage,O,!0,N[w.subLanguage]),N[w.subLanguage]=e.top}else e=d(O,w.subLanguage.length?w.subLanguage:null);w.relevance>0&&(C+=e.relevance),R.addSublanguage(e.emitter,e.language)}():function(){if(!w.keywords)return void R.addText(O);let e=0;w.keywordPatternRe.lastIndex=0;let t=w.keywordPatternRe.exec(O),n="";for(;t;){n+=O.substring(e,t.index);const r=c(w,t);if(r){const[e,a]=r;R.addText(n),n="",C+=a,e.startsWith("_")?n+=t[0]:R.addKeyword(t[0],b.classNameAliases[e]||e)}else n+=t[0];e=w.keywordPatternRe.lastIndex,t=w.keywordPatternRe.exec(O)}n+=O.substr(e),R.addText(n)}(),O=""}function p(e){return e.className&&R.openNode(b.classNameAliases[e.className]||e.className),w=Object.create(e,{parent:{value:w}}),w}function m(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new pi(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return m(e.parent,t,n)}function h(e){return 0===w.matcher.regexIndex?(O+=e[0],1):(A=!0,0)}function g(e){const t=e[0],r=n.substr(e.index),a=m(w,e,r);if(!a)return Qi;const o=w;o.skip?O+=t:(o.returnEnd||o.excludeEnd||(O+=t),u(),o.excludeEnd&&(O=t));do{w.className&&R.closeNode(),w.skip||w.subLanguage||(C+=w.relevance),w=w.parent}while(w!==a.parent);return a.starts&&(a.endSameAsBegin&&(a.starts.endRe=a.endRe),p(a.starts)),o.returnEnd?0:t.length}let y={};function v(t,r){const i=r&&r[0];if(O+=t,null==i)return u(),0;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===i){if(O+=n.slice(r.index,r.index+1),!a){const t=new Error("0 width match regex");throw t.languageName=e,t.badRule=y.rule,t}return 1}if(y=r,"begin"===r.type)return function(e){const t=e[0],n=e.rule,r=new pi(n),a=[n.__beforeBegin,n["on:begin"]];for(const n of a)if(n&&(n(e,r),r.isMatchIgnored))return h(t);return n&&n.endSameAsBegin&&(n.endRe=new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")),n.skip?O+=t:(n.excludeBegin&&(O+=t),u(),n.returnBegin||n.excludeBegin||(O=t)),p(n),n.returnBegin?0:t.length}(r);if("illegal"===r.type&&!o){const e=new Error('Illegal lexeme "'+i+'" for mode "'+(w.className||"<unnamed>")+'"');throw e.mode=w,e}if("end"===r.type){const e=g(r);if(e!==Qi)return e}if("illegal"===r.type&&""===i)return 1;if(k>1e5&&k>3*r.index)throw new Error("potential infinite loop, way more iterations than matches");return O+=i,i.length}const b=E(e);if(!b)throw $i(i.replace("{}",e)),new Error('Unknown language: "'+e+'"');const T=zi(b,{plugins:r});let S="",w=l||T;const N={},R=new s.__emitter(s);!function(){const e=[];for(let t=w;t!==b;t=t.parent)t.className&&e.unshift(t.className);e.forEach(e=>R.openNode(e))}();let O="",C=0,x=0,k=0,A=!1;try{for(w.matcher.considerAll();;){k++,A?A=!1:w.matcher.considerAll(),w.matcher.lastIndex=x;const e=w.matcher.exec(n);if(!e)break;const t=v(n.substring(x,e.index),e);x=e.index+t}return v(n.substr(x)),R.closeAllNodes(),R.finalize(),S=R.toHTML(),{relevance:Math.floor(C),value:S,language:e,illegal:!1,emitter:R,top:w}}catch(t){if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:t.message,context:n.slice(x-100,x+100),mode:t.mode},sofar:S,relevance:0,value:Ki(n),emitter:R};if(a)return{illegal:!1,relevance:0,value:Ki(n),emitter:R,language:e,top:w,errorRaised:t};throw t}}function d(e,n){n=n||s.languages||Object.keys(t);const r=function(e){const t={relevance:0,emitter:new s.__emitter(s),value:Ki(e),illegal:!1,top:l};return t.emitter.addText(e),t}(e),a=n.filter(E).filter(S).map(t=>f(t,e,!1));a.unshift(r);const o=a.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(E(e.language).supersetOf===t.language)return 1;if(E(t.language).supersetOf===e.language)return-1}return 0}),[i,c]=o,u=i;return u.second_best=c,u}const p={"before:highlightElement":({el:e})=>{s.useBR&&(e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,"\n"))},"after:highlightElement":({result:e})=>{s.useBR&&(e.value=e.value.replace(/\n/g,"<br>"))}},m=/^(<[^>]+>|\t)+/gm,h={"after:highlightElement":({result:e})=>{s.tabReplace&&(e.value=e.value.replace(m,e=>e.replace(/\t/g,s.tabReplace)))}};function g(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=s.languageDetectRe.exec(t);if(n){const t=E(n[1]);return t||(Xi(i.replace("{}",n[1])),Xi("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find(e=>c(e)||E(e))}(e);if(c(r))return;w("before:highlightElement",{el:e,language:r}),t=e;const a=t.textContent,o=r?u(a,{language:r,ignoreIllegals:!0}):d(a);w("after:highlightElement",{el:e,result:o,text:a}),e.innerHTML=o.value,function(e,t,r){const a=t?n[t]:r;e.classList.add("hljs"),a&&e.classList.add(a)}(e,r,o.language),e.result={language:o.language,re:o.relevance,relavance:o.relevance},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.relevance,relavance:o.second_best.relevance})}const y=()=>{y.called||(y.called=!0,qi("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(g))};let v=!1;function b(){"loading"!==document.readyState?document.querySelectorAll("pre code").forEach(g):v=!0}function E(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function T(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach(e=>{n[e.toLowerCase()]=t})}function S(e){const t=E(e);return t&&!t.disableAutodetect}function w(e,t){const n=e;r.forEach(function(e){e[n]&&e[n](t)})}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",function(){v&&b()},!1),Object.assign(e,{highlight:u,highlightAuto:d,highlightAll:b,fixMarkup:function(e){return qi("10.2.0","fixMarkup will be removed entirely in v11.0"),qi("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),t=e,s.tabReplace||s.useBR?t.replace(o,e=>"\n"===e?s.useBR?"<br>":e:s.tabReplace?e.replace(/\t/g,s.tabReplace):e):t;var t},highlightElement:g,highlightBlock:function(e){return qi("10.7.0","highlightBlock will be removed entirely in v12.0"),qi("10.7.0","Please use highlightElement now."),g(e)},configure:function(e){e.useBR&&(qi("10.3.0","'useBR' will be removed entirely in v11.0"),qi("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),s=Ji(s,e)},initHighlighting:y,initHighlightingOnLoad:function(){qi("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),v=!0},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if($i("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw e;$i(e),o=l}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&T(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:E,registerAliases:T,requireLanguage:function(e){qi("10.4.0","requireLanguage will be removed entirely in v11."),qi("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const t=E(e);if(t)return t;throw new Error("The '{}' language is required, but not loaded.".replace("{}",e))},autoDetection:S,inherit:Ji,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)},vuePlugin:Hi(e).VuePlugin}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="10.7.3";for(const e in Ii)"object"==typeof Ii[e]&&di(Ii[e]);return Object.assign(e,Ii),e.addPlugin(p),e.addPlugin(Vi),e.addPlugin(h),e}({}),el=Le(function(e){!function(){var t;function n(e){for(var t,n,r,a,o=1,i=[].slice.call(arguments),l=0,s=e.length,c="",u=!1,f=!1,d=function(){return i[o++]},p=function(){for(var n="";/\d/.test(e[l]);)n+=e[l++],t=e[l];return n.length>0?parseInt(n):null};l<s;++l)if(t=e[l],u)switch(u=!1,"."==t?(f=!1,t=e[++l]):"0"==t&&"."==e[l+1]?(f=!0,t=e[l+=2]):f=!0,a=p(),t){case"b":c+=parseInt(d(),10).toString(2);break;case"c":c+="string"==typeof(n=d())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":c+=parseInt(d(),10);break;case"f":r=String(parseFloat(d()).toFixed(a||6)),c+=f?r:r.replace(/^0/,"");break;case"j":c+=JSON.stringify(d());break;case"o":c+="0"+parseInt(d(),10).toString(8);break;case"s":c+=d();break;case"x":c+="0x"+parseInt(d(),10).toString(16);break;case"X":c+="0x"+parseInt(d(),10).toString(16).toUpperCase();break;default:c+=t}else"%"===t?u=!0:c+=t;return c}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()}),tl=rl(Error),nl=tl;function rl(e){return t.displayName=e.displayName||e.name,t;function t(t){return t&&(t=el.apply(null,arguments)),new e(t)}}tl.eval=rl(EvalError),tl.range=rl(RangeError),tl.reference=rl(ReferenceError),tl.syntax=rl(SyntaxError),tl.type=rl(TypeError),tl.uri=rl(URIError),tl.create=rl;var al=ol;function ol(e,t,n){var r,a=Zi.configure({}),o=(n||{}).prefix;if("string"!=typeof e)throw nl("Expected `string` for name, got `%s`",e);if(!Zi.getLanguage(e))throw nl("Unknown language: `%s` is not registered",e);if("string"!=typeof t)throw nl("Expected `string` for value, got `%s`",t);if(null==o&&(o="hljs-"),Zi.configure({__emitter:il,classPrefix:o}),r=Zi.highlight(t,{language:e,ignoreIllegals:!0}),Zi.configure(a||{}),r.errorRaised)throw r.errorRaised;return{relevance:r.relevance,language:r.language,value:r.emitter.rootNode.children}}function il(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function ll(){}il.prototype.addText=function(e){var t,n,r=this.stack;""!==e&&((n=(t=r[r.length-1]).children[t.children.length-1])&&"text"===n.type?n.value+=e:t.children.push({type:"text",value:e}))},il.prototype.addKeyword=function(e,t){this.openNode(t),this.addText(e),this.closeNode()},il.prototype.addSublanguage=function(e,t){var n=this.stack,r=n[n.length-1],a=e.rootNode.children;r.children=r.children.concat(t?{type:"element",tagName:"span",properties:{className:[t]},children:a}:a)},il.prototype.openNode=function(e){var t=this.stack,n={type:"element",tagName:"span",properties:{className:[this.options.classPrefix+e]},children:[]};t[t.length-1].children.push(n),t.push(n)},il.prototype.closeNode=function(){this.stack.pop()},il.prototype.closeAllNodes=ll,il.prototype.finalize=ll,il.prototype.toHTML=function(){return""};var sl={highlight:al,highlightAuto:function(e,t){var n,r,a,o,i=(t||{}).subset||Zi.listLanguages(),l=i.length,s=-1;if("string"!=typeof e)throw nl("Expected `string` for value, got `%s`",e);for(r={relevance:0,language:null,value:[]},n={relevance:0,language:null,value:[]};++s<l;)Zi.getLanguage(o=i[s])&&((a=ol(o,e,t)).language=o,a.relevance>r.relevance&&(r=a),a.relevance>n.relevance&&(r=n,n=a));return r.language&&(n.secondBest=r),n},registerLanguage:function(e,t){Zi.registerLanguage(e,t)},listLanguages:function(){return Zi.listLanguages()},registerAlias:function(e,t){var n,r=e;for(n in t&&((r={})[e]=t),r)Zi.registerAliases(r[n],{languageName:n})}};function cl(e){return e?"string"==typeof e?e:e.source:null}function ul(e){return fl("(?=",e,")")}function fl(...e){return e.map(e=>cl(e)).join("")}function dl(...e){return"("+e.map(e=>cl(e)).join("|")+")"}const pl=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],ml=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],hl=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],gl=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],yl=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-variant","font-variant-ligatures","font-variation-settings","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","src","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse();function vl(e){return e?"string"==typeof e?e:e.source:null}function bl(...e){return e.map(e=>vl(e)).join("")}const El=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Tl=["true","false","null","undefined","NaN","Infinity"],Sl=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]);function wl(e){return Nl("(?=",e,")")}function Nl(...e){return e.map(e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t}).join("")}function Rl(e){return e?"string"==typeof e?e:e.source:null}function Ol(...e){return e.map(e=>Rl(e)).join("")}function Cl(...e){return"("+e.map(e=>Rl(e)).join("|")+")"}var xl,kl,Al=(xl=sl,kl={},function(e){var t=e.language,n=e.children,r=e.style,a=void 0===r?kl:r,o=e.customStyle,i=void 0===o?{}:o,l=e.codeTagProps,s=void 0===l?{className:t?"language-".concat(t):void 0,style:ti(ti({},a['code[class*="language-"]']),a['code[class*="language-'.concat(t,'"]')])}:l,u=e.useInlineStyles,f=void 0===u||u,d=e.showLineNumbers,p=void 0!==d&&d,m=e.showInlineLineNumbers,h=void 0===m||m,g=e.startingLineNumber,y=void 0===g?1:g,v=e.lineNumberContainerStyle,b=e.lineNumberStyle,E=void 0===b?{}:b,T=e.wrapLines,S=e.wrapLongLines,w=void 0!==S&&S,N=e.lineProps,R=void 0===N?{}:N,O=e.renderer,C=e.PreTag,x=void 0===C?"pre":C,k=e.CodeTag,A=void 0===k?"code":k,I=e.code,L=void 0===I?(Array.isArray(n)?n[0]:n)||"":I,_=e.astGenerator,P=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,Zo);_=_||xl;var M=p?/*#__PURE__*/c.createElement(ri,{containerStyle:v,codeStyle:s.style||{},numberStyle:E,startingLineNumber:y,codeString:L}):null,D=a.hljs||a['pre[class*="language-"]']||{backgroundColor:"#fff"},U=ui(_)?"hljs":"prismjs",j=Object.assign({},P,f?{style:Object.assign({},D,i)}:{className:P.className?"".concat(U," ").concat(P.className):U,style:Object.assign({},i)});if(s.style=ti(ti({},s.style),{},w?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!_)/*#__PURE__*/ return c.createElement(x,j,M,/*#__PURE__*/c.createElement(A,s,L));(void 0===T&&O||w)&&(T=!0),O=O||ci;var F=[{type:"text",value:L}],z=function(e){var t=e.astGenerator,n=e.language,r=e.code,a=e.defaultCodeValue;if(ui(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:a,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:a}}catch(e){return{value:a}}}({astGenerator:_,language:t,code:L,defaultCodeValue:F});null===z.language&&(z.value=F);var B=si(z,T,R,p,h,y,z.value.length+y,E,w);/*#__PURE__*/ -return c.createElement(x,j,/*#__PURE__*/c.createElement(A,s,!h&&M,O({rows:B,stylesheet:a,useInlineStyles:f})))});Al.registerLanguage=sl.registerLanguage;var Il=Al;function Ll({highlight:e,row:t,frame:n,lineNumber:r}){const{url:a,clipboard:o}=Po({file:n.file,lineNumber:r});return c.createElement("span",{className:`\n flex group leading-loose hover:~bg-red-500/10\n ${e?" ~bg-red-500/20":""}\n `},!o&&c.createElement("span",{className:"z-30 opacity-0 group-hover:opacity-100 sticky left-10 w-0 h-full"},c.createElement("a",{href:a,className:"-ml-3 block"},c.createElement(Fo,null,c.createElement(qa,{className:"text-xs",icon:go})))),o&&c.createElement("span",{className:"z-30 opacity-0 group-hover:opacity-100 sticky w-0 h-full"},c.createElement(zo,{value:a,outside:!0,direction:"right"})),c.createElement("span",{className:"pl-6"},Qo({node:t,useInlineStyles:!1,key:`code-segement-${r}`})))}function _l({frame:e}){const t=Object.values(e.code_snippet).join("\n"),n=Object.keys(e.code_snippet).map(e=>Number(e)),r=n.indexOf(e.line_number),a=c.useMemo(()=>({rows:t})=>t.map((t,a)=>c.createElement(Ll,{key:n[a],frame:e,highlight:a===r,row:t,lineNumber:n[a]})),[e]);return c.createElement("main",{className:"flex items-stretch flex-grow overflow-x-auto overflow-y-hidden scrollbar-hidden-x mask-fade-r text-sm"},c.createElement("nav",{className:"sticky left-0 flex flex-none z-20"},c.createElement("div",{className:"select-none text-right"},n.map(t=>c.createElement("p",{key:t,className:`\n px-2 font-mono leading-loose select-none\n ${Number(t)===e.line_number?" text-opacity-75 ~text-red-700 ~bg-red-500/30":""}\n `},c.createElement("span",{className:"~text-gray-500"},t))))),c.createElement("div",{className:"flex-grow pr-10"},c.createElement(Il,{language:(o=e.relative_file,o.endsWith(".blade.php")?"blade":o.match(/^resources\/views\//)?"php-template":"php"),renderer:a,customStyle:{background:"transparent"}},t)));var o}function Pl(e){var t=this.__data__=new ct(e);this.size=t.size}Il.registerLanguage("php",function(e){const t={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*(?![A-Za-z0-9])(?![$])"},n={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},r={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(r)}),i=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(r)}),l={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[e.inherit(a,{begin:"b'",end:"'"}),e.inherit(o,{begin:'b"',end:'"'}),o,a,i]},s={className:"number",variants:[{begin:"\\b0b[01]+(?:_[01]+)*\\b"},{begin:"\\b0o[0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?"}],relevance:0},c={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile enum eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 mixed new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException UnhandledMatchError ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Stringable Throwable Traversable WeakReference WeakMap Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php3","php4","php5","php6","php7","php8"],case_insensitive:!0,keywords:c,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[n]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),n,{className:"keyword",begin:/\$this\b/},t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",t,e.C_BLOCK_COMMENT_MODE,l,s]}]},{className:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",relevance:0,end:";",contains:[e.UNDERSCORE_TITLE_MODE]},l,s]}}),Il.registerLanguage("php-template",function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}),Il.registerLanguage("blade",function(e){return{name:"Blade",case_insensitive:!0,subLanguage:"php-template",contains:[e.COMMENT(/\{\{--/,/--\}\}/),{className:"template-variable",begin:/\{\{/,starts:{end:/\}\}/,returnEnd:!0,subLanguage:"php"}},{className:"template-variable",begin:/\}\}/},{className:"template-variable",begin:/\{\{\{/,starts:{end:/\}\}\}/,returnEnd:!0,subLanguage:"php"}},{className:"template-variable",begin:/\}\}\}/},{className:"template-variable",begin:/\{!!/,starts:{end:/!!\}/,returnEnd:!0,subLanguage:"php"}},{className:"template-variable",begin:/!!\}/},{className:"template-tag",begin:/@php\(/,starts:{end:/\)/,returnEnd:!0,subLanguage:"php"},relevance:15},{className:"template-tag",begin:/@php/,starts:{end:/@endphp/,returnEnd:!0,subLanguage:"php"},relevance:10},{className:"attr",begin:/:[\w-]+="/,starts:{end:/"(?=\s|\n|\/)/,returnEnd:!0,subLanguage:"php"}},{begin:/@\w+/,end:/\W/,excludeEnd:!0,className:"template-tag"}]}}),Il.registerLanguage("xml",function(e){const t=fl(/[A-Z_]/,fl("(",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(r,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),i=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,i,o,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,a,i,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:fl(/</,ul(fl(t,dl(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:l}]},{className:"tag",begin:fl(/<\//,ul(fl(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}),Il.registerLanguage("css",function(e){const t=(e=>({IMPORTANT:{className:"meta",begin:"!important"},HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}))(e),n=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[e.C_BLOCK_COMMENT_MODE,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},e.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+hl.join("|")+")"},{begin:"::("+gl.join("|")+")"}]},{className:"attribute",begin:"\\b("+yl.join("|")+")\\b"},{begin:":",end:"[;}]",contains:[t.HEXCOLOR,t.IMPORTANT,e.CSS_NUMBER_MODE,...n,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},{className:"built_in",begin:/[\w-]+(?=\()/}]},{begin:(r=/@/,function(...e){return e.map(e=>function(e){return e?"string"==typeof e?e:e.source:null}(e)).join("")}("(?=",r,")")),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:ml.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...n,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+pl.join("|")+")\\b"}]};var r}),Il.registerLanguage("javascript",function(e){const t="[A-Za-z$_][0-9A-Za-z$_]*",n={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];"<"!==r?">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch()):t.ignoreMatch()}},r={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:El,literal:Tl,built_in:Sl},a="\\.([0-9](_?[0-9])*)",o="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",i={className:"number",variants:[{begin:`(\\b(${o})((${a})|\\.)?|(${a}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{begin:`\\b(${o})\\b((${a})\\b|\\.)?|(${a})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},l={className:"subst",begin:"\\$\\{",end:"\\}",keywords:r,contains:[]},s={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,l],subLanguage:"xml"}},c={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,l],subLanguage:"css"}},u={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,l]},f={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:t+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},d=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,c,u,i,e.REGEXP_MODE];l.contains=d.concat({begin:/\{/,end:/\}/,keywords:r,contains:["self"].concat(d)});const p=[].concat(f,l.contains),m=p.concat([{begin:/\(/,end:/\)/,keywords:r,contains:["self"].concat(p)}]),h={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:m};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:r,exports:{PARAMS_CONTAINS:m},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,c,u,f,i,{begin:Nl(/[{,\n]\s*/,wl(Nl(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,t+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:t+wl("\\s*:"),relevance:0}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[f,e.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:m}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:"</>"},{begin:n.begin,"on:begin":n.isTrulyOpeningTag,end:n.end}],subLanguage:"xml",contains:[{begin:n.begin,end:n.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:r,contains:["self",e.inherit(e.TITLE_MODE,{begin:t}),h],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[h,e.inherit(e.TITLE_MODE,{begin:t})]},{variants:[{begin:"\\."+t},{begin:"\\$"+t}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),"self",h]},{begin:"(get|set)\\s+(?="+t+"\\()",end:/\{/,keywords:"get set",contains:[e.inherit(e.TITLE_MODE,{begin:t}),{begin:/\(\)/},h]},{begin:/\$[(.]/}]}}),Il.registerLanguage("handlebars",function(e){const t={"builtin-name":["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]},n=/\[\]|\[[^\]]+\]/,r=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,a=function(...e){return"("+e.map(e=>vl(e)).join("|")+")"}(/""|"[^"]+"/,/''|'[^']+'/,n,r),o=bl(bl("(",/\.|\.\/|\//,")?"),a,(d=bl(/(\.|\/)/,a),bl("(",d,")*"))),i=bl("(",n,"|",r,")(?==)"),l={begin:o,lexemes:/[\w.\/]+/},s=e.inherit(l,{keywords:{literal:["true","false","undefined","null"]}}),c={begin:/\(/,end:/\)/},u={contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},{className:"attr",begin:i,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,s,c]}}},s,c],returnEnd:!0},f=e.inherit(l,{className:"name",keywords:t,starts:e.inherit(u,{end:/\)/})});var d;c.contains=[f];const p=e.inherit(l,{keywords:t,className:"name",starts:e.inherit(u,{end:/\}\}/})}),m=e.inherit(l,{keywords:t,className:"name"}),h=e.inherit(l,{className:"name",keywords:t,starts:e.inherit(u,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},e.COMMENT(/\{\{!--/,/--\}\}/),e.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[p],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[m]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[p]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[m]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[h]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[h]}]}}),Il.registerLanguage("sql",function(e){const t=e.COMMENT("--","$"),n=["true","false","unknown"],r=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],a=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],i=a,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter(e=>!a.includes(e)),s={begin:Ol(/\b/,Cl(...i),/\s*\(/),keywords:{built_in:i}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}(l,{when:e=>e.length<3}),literal:n,type:r,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:Cl(...o),keywords:{$pattern:/[\w\.]+/,keyword:l.concat(o),literal:n,type:r}},{className:"type",begin:Cl("double precision","large object","with timezone","without timezone")},s,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}),Il.registerLanguage("curl",function(e){return{name:"curl",aliases:["curl"],keywords:"curl",case_insensitive:!0,contains:[{className:"literal",begin:/(--request|-X)\s/,contains:[{className:"symbol",begin:/(get|post|delete|options|head|put|patch|trace|connect)/,end:/\s/,returnEnd:!0}],returnEnd:!0,relevance:10},{className:"literal",begin:/--/,end:/[\s"]/,returnEnd:!0,relevance:0},{className:"literal",begin:/-\w/,end:/[\s"]/,returnEnd:!0,relevance:0},{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}],relevance:0},{className:"string",begin:/\\"/,relevance:0},{className:"string",begin:/'/,end:/'/,relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"number",variants:[{begin:e.C_NUMBER_RE}],relevance:0},{match:/(\/[a-z._-]+)+/}]}}),Il.registerLanguage("json",function(e){const t={literal:"true false null"},n=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],r=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:r,keywords:t},o={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(a,{begin:/:/})].concat(n),illegal:"\\S"},i={begin:"\\[",end:"\\]",contains:[e.inherit(a)],illegal:"\\S"};return r.push(o,i),n.forEach(function(e){r.push(e)}),{name:"JSON",contains:r,keywords:t,illegal:"\\S"}}),Pl.prototype.clear=function(){this.__data__=new ct,this.size=0},Pl.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Pl.prototype.get=function(e){return this.__data__.get(e)},Pl.prototype.has=function(e){return this.__data__.has(e)},Pl.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ct){var r=n.__data__;if(!ut||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new pt(r)}return n.set(e,t),this.size=n.size,this};var Ml=Pl,Dl=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ul=function(e,t,n,r,a,o){var i=1&n,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,p=2&n?new ht:void 0;for(o.set(e,t),o.set(t,e);++f<l;){var m=e[f],h=t[f];if(r)var g=i?r(h,m,f,t,e,o):r(m,h,f,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!Dl(t,function(e,t){if(!bt(p,t)&&(m===e||a(m,e,n,r,o)))return p.push(t)})){d=!1;break}}else if(m!==h&&!a(m,h,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d},jl=De.Uint8Array,Fl=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},zl=Ue?Ue.prototype:void 0,Bl=zl?zl.valueOf:void 0,Hl=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Vl=Array.isArray,Wl=function(e,t,n){var r=t(e);return Vl(e)?r:Hl(r,n(e))},Gl=function(){return[]},Yl=Object.prototype.propertyIsEnumerable,$l=Object.getOwnPropertySymbols,Xl=$l?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,a=null==t?0:t.length,o=0,i=[];++r<a;){var l=t[r];Yl.call(e,l)&&(i[o++]=l)}return i}($l(e)))}:Gl,ql=function(e){return null!=e&&"object"==typeof e},Kl=function(e){return ql(e)&&"[object Arguments]"==We(e)},Jl=Object.prototype,Ql=Jl.hasOwnProperty,Zl=Jl.propertyIsEnumerable,es=Kl(function(){return arguments}())?Kl:function(e){return ql(e)&&Ql.call(e,"callee")&&!Zl.call(e,"callee")},ts=function(){return!1},ns=Le(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,a=r&&r.exports===n?De.Buffer:void 0;e.exports=(a?a.isBuffer:void 0)||ts}),rs=/^(?:0|[1-9]\d*)$/,as=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&rs.test(e))&&e>-1&&e%1==0&&e<t},os=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},is={};is["[object Float32Array]"]=is["[object Float64Array]"]=is["[object Int8Array]"]=is["[object Int16Array]"]=is["[object Int32Array]"]=is["[object Uint8Array]"]=is["[object Uint8ClampedArray]"]=is["[object Uint16Array]"]=is["[object Uint32Array]"]=!0,is["[object Arguments]"]=is["[object Array]"]=is["[object ArrayBuffer]"]=is["[object Boolean]"]=is["[object DataView]"]=is["[object Date]"]=is["[object Error]"]=is["[object Function]"]=is["[object Map]"]=is["[object Number]"]=is["[object Object]"]=is["[object RegExp]"]=is["[object Set]"]=is["[object String]"]=is["[object WeakMap]"]=!1;var ls,ss=Le(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,a=r&&r.exports===n&&Pe.process,o=function(){try{return r&&r.require&&r.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=o}),cs=ss&&ss.isTypedArray,us=cs?(ls=cs,function(e){return ls(e)}):function(e){return ql(e)&&os(e.length)&&!!is[We(e)]},fs=Object.prototype.hasOwnProperty,ds=function(e,t){var n=Vl(e),r=!n&&es(e),a=!n&&!r&&ns(e),o=!n&&!r&&!a&&us(e),i=n||r||a||o,l=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=l.length;for(var c in e)!t&&!fs.call(e,c)||i&&("length"==c||a&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||as(c,s))||l.push(c);return l},ps=Object.prototype,ms=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ps)},hs=function(e,t){return function(n){return e(t(n))}},gs=hs(Object.keys,Object),ys=Object.prototype.hasOwnProperty,vs=function(e){if(!ms(e))return gs(e);var t=[];for(var n in Object(e))ys.call(e,n)&&"constructor"!=n&&t.push(n);return t},bs=function(e){return null!=e&&os(e.length)&&!Ye(e)},Es=function(e){return bs(e)?ds(e):vs(e)},Ts=function(e){return Wl(e,Es,Xl)},Ss=Object.prototype.hasOwnProperty,ws=Ze(De,"DataView"),Ns=Ze(De,"Promise"),Rs=Ze(De,"WeakMap"),Os=Ke(ws),Cs=Ke(ut),xs=Ke(Ns),ks=Ke(Et),As=Ke(Rs),Is=We;(ws&&"[object DataView]"!=Is(new ws(new ArrayBuffer(1)))||ut&&"[object Map]"!=Is(new ut)||Ns&&"[object Promise]"!=Is(Ns.resolve())||Et&&"[object Set]"!=Is(new Et)||Rs&&"[object WeakMap]"!=Is(new Rs))&&(Is=function(e){var t=We(e),n="[object Object]"==t?e.constructor:void 0,r=n?Ke(n):"";if(r)switch(r){case Os:return"[object DataView]";case Cs:return"[object Map]";case xs:return"[object Promise]";case ks:return"[object Set]";case As:return"[object WeakMap]"}return t});var Ls=Is,_s=Object.prototype.hasOwnProperty,Ps=function e(t,n,r,a,o){return t===n||(null==t||null==n||!ql(t)&&!ql(n)?t!=t&&n!=n:function(e,t,n,r,a,o){var i=Vl(e),l=Vl(t),s=i?"[object Array]":Ls(e),c=l?"[object Array]":Ls(t),u="[object Object]"==(s="[object Arguments]"==s?"[object Object]":s),f="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),d=s==c;if(d&&ns(e)){if(!ns(t))return!1;i=!0,u=!1}if(d&&!u)return o||(o=new Ml),i||us(e)?Ul(e,t,n,r,a,o):function(e,t,n,r,a,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new jl(e),new jl(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ot(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Fl;case"[object Set]":if(l||(l=Tt),e.size!=t.size&&!(1&r))return!1;var s=i.get(e);if(s)return s==t;r|=2,i.set(e,t);var c=Ul(l(e),l(t),r,a,o,i);return i.delete(e),c;case"[object Symbol]":if(Bl)return Bl.call(e)==Bl.call(t)}return!1}(e,t,s,n,r,a,o);if(!(1&n)){var p=u&&_s.call(e,"__wrapped__"),m=f&&_s.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return o||(o=new Ml),a(h,g,n,r,o)}}return!!d&&(o||(o=new Ml),function(e,t,n,r,a,o){var i=1&n,l=Ts(e),s=l.length;if(s!=Ts(t).length&&!i)return!1;for(var c=s;c--;){var u=l[c];if(!(i?u in t:Ss.call(t,u)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=i;++c<s;){var h=e[u=l[c]],g=t[u];if(r)var y=i?r(g,h,u,t,e,o):r(h,g,u,e,t,o);if(!(void 0===y?h===g||a(h,g,n,r,o):y)){p=!1;break}m||(m="constructor"==u)}if(p&&!m){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,r,a,o))}(t,n,r,a,e,o))},Ms=function(e){return e==e&&!Ge(e)},Ds=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},Us=function(e){return"symbol"==typeof e||ql(e)&&"[object Symbol]"==We(e)},js=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fs=/^\w*$/,zs=function(e,t){if(Vl(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Us(e))||Fs.test(e)||!js.test(e)||null!=t&&e in Object(t)};function Bs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(Bs.Cache||pt),n}Bs.Cache=pt;var Hs,Vs,Ws=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gs=/\\(\\)?/g,Ys=(Hs=Bs(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ws,function(e,n,r,a){t.push(r?a.replace(Gs,"$1"):n||e)}),t},function(e){return 500===Vs.size&&Vs.clear(),e}),Vs=Hs.cache,Hs),$s=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},Xs=Ue?Ue.prototype:void 0,qs=Xs?Xs.toString:void 0,Ks=function e(t){if("string"==typeof t)return t;if(Vl(t))return $s(t,e)+"";if(Us(t))return qs?qs.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},Js=function(e){return null==e?"":Ks(e)},Qs=function(e,t){return Vl(e)?e:zs(e,t)?[e]:Ys(Js(e))},Zs=function(e){if("string"==typeof e||Us(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},ec=function(e,t){for(var n=0,r=(t=Qs(t,e)).length;null!=e&&n<r;)e=e[Zs(t[n++])];return n&&n==r?e:void 0},tc=function(e,t){return null!=e&&t in Object(e)},nc=function(e){return e},rc=function(e){return"function"==typeof e?e:null==e?nc:"object"==typeof e?Vl(e)?function(e,t){return zs(e)&&Ms(t)?Ds(Zs(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:ec(e,t);return void 0===r?void 0:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r=-1,a=(t=Qs(t,e)).length,o=!1;++r<a;){var i=Zs(t[r]);if(!(o=null!=e&&n(e,i)))break;e=e[i]}return o||++r!=a?o:!!(a=null==e?0:e.length)&&os(a)&&as(i,a)&&(Vl(e)||es(e))}(e,t,tc)}(n,e):Ps(t,r,3)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Es(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Ms(a)]}return t}(e);return 1==t.length&&t[0][2]?Ds(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var l=(i=n[a])[0],s=e[l],c=i[1];if(i[2]){if(void 0===s&&!(l in e))return!1}else{var u=new Ml;if(!Ps(c,s,3,void 0,u))return!1}}return!0}(n,0,t)}}(e):zs(t=e)?(n=Zs(t),function(e){return null==e?void 0:e[n]}):function(e){return function(t){return ec(t,e)}}(t);var t,n},ac=(parseInt,Math.max),oc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={WORD:"word",STRING:"string",RESERVED:"reserved",RESERVED_TOP_LEVEL:"reserved-top-level",RESERVED_TOP_LEVEL_NO_INDENT:"reserved-top-level-no-indent",RESERVED_NEWLINE:"reserved-newline",OPERATOR:"operator",OPEN_PAREN:"open-paren",CLOSE_PAREN:"close-paren",LINE_COMMENT:"line-comment",BLOCK_COMMENT:"block-comment",NUMBER:"number",PLACEHOLDER:"placeholder"},e.exports=t.default}),ic=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sortByLengthDesc=t.escapeRegExp=t.isEmpty=t.last=t.trimSpacesEnd=void 0,t.trimSpacesEnd=function(e){return e.replace(/[\t ]+$/,"")},t.last=function(e){return e[e.length-1]},t.isEmpty=function(e){return!Array.isArray(e)||0===e.length},t.escapeRegExp=function(e){return e.replace(/[\$\(-\+\.\?\[-\^\{-\}]/g,"\\$&")},t.sortByLengthDesc=function(e){return e.sort(function(e,t){return t.length-e.length||e.localeCompare(t)})}}),lc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="top-level";t.default=/*#__PURE__*/function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.indent=t||" ",this.indentTypes=[]}var t;return(t=[{key:"getIndent",value:function(){return this.indent.repeat(this.indentTypes.length)}},{key:"increaseTopLevel",value:function(){this.indentTypes.push(n)}},{key:"increaseBlockLevel",value:function(){this.indentTypes.push("block-level")}},{key:"decreaseTopLevel",value:function(){this.indentTypes.length>0&&(0,ic.last)(this.indentTypes)===n&&this.indentTypes.pop()}},{key:"decreaseBlockLevel",value:function(){for(;this.indentTypes.length>0&&this.indentTypes.pop()===n;);}},{key:"resetIndentation",value:function(){this.indentTypes=[]}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default}),sc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=oc)&&n.__esModule?n:{default:n};t.default=/*#__PURE__*/function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.level=0}var t;return(t=[{key:"beginIfPossible",value:function(e,t){0===this.level&&this.isInlineBlock(e,t)?this.level=1:this.level>0?this.level++:this.level=0}},{key:"end",value:function(){this.level--}},{key:"isActive",value:function(){return this.level>0}},{key:"isInlineBlock",value:function(e,t){for(var n=0,a=0,o=t;o<e.length;o++){var i=e[o];if((n+=i.value.length)>50)return!1;if(i.type===r.default.OPEN_PAREN)a++;else if(i.type===r.default.CLOSE_PAREN&&0==--a)return!0;if(this.isForbiddenToken(i))return!1}return!1}},{key:"isForbiddenToken",value:function(e){var t=e.type;return t===r.default.RESERVED_TOP_LEVEL||t===r.default.RESERVED_NEWLINE||t===r.default.COMMENT||t===r.default.BLOCK_COMMENT||";"===e.value}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default}),cc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/*#__PURE__*/function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.params=t,this.index=0}var t;return(t=[{key:"get",value:function(e){var t=e.key,n=e.value;return this.params?t?this.params[t]:this.params[this.index++]:n}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default}),uc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isEnd=t.isWindow=t.isBy=t.isSet=t.isLimit=t.isBetween=t.isAnd=void 0;var n,r=(n=oc)&&n.__esModule?n:{default:n},a=function(e,t){return function(n){return(null==n?void 0:n.type)===e&&t.test(null==n?void 0:n.value)}},o=a(r.default.RESERVED_NEWLINE,/^AND$/i);t.isAnd=o;var i=a(r.default.RESERVED,/^BETWEEN$/i);t.isBetween=i;var l=a(r.default.RESERVED_TOP_LEVEL,/^LIMIT$/i);t.isLimit=l;var s=a(r.default.RESERVED_TOP_LEVEL,/^[S\u017F]ET$/i);t.isSet=s;var c=a(r.default.RESERVED,/^BY$/i);t.isBy=c;var u=a(r.default.RESERVED_TOP_LEVEL,/^WINDOW$/i);t.isWindow=u;var f=a(r.default.CLOSE_PAREN,/^END$/i);t.isEnd=f}),fc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(oc),r=i(lc),a=i(sc),o=i(cc);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.default=/*#__PURE__*/function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=t,this.indentation=new r.default(this.cfg.indent),this.inlineBlock=new a.default,this.params=new o.default(this.cfg.params),this.previousReservedToken={},this.tokens=[],this.index=0}var t;return(t=[{key:"tokenizer",value:function(){throw new Error("tokenizer() not implemented by subclass")}},{key:"tokenOverride",value:function(e){return e}},{key:"format",value:function(e){return this.tokens=this.tokenizer().tokenize(e),this.getFormattedQueryFromTokens().trim()}},{key:"getFormattedQueryFromTokens",value:function(){var e=this,t="";return this.tokens.forEach(function(r,a){e.index=a,(r=e.tokenOverride(r)).type===n.default.LINE_COMMENT?t=e.formatLineComment(r,t):r.type===n.default.BLOCK_COMMENT?t=e.formatBlockComment(r,t):r.type===n.default.RESERVED_TOP_LEVEL?(t=e.formatTopLevelReservedWord(r,t),e.previousReservedToken=r):r.type===n.default.RESERVED_TOP_LEVEL_NO_INDENT?(t=e.formatTopLevelReservedWordNoIndent(r,t),e.previousReservedToken=r):r.type===n.default.RESERVED_NEWLINE?(t=e.formatNewlineReservedWord(r,t),e.previousReservedToken=r):r.type===n.default.RESERVED?(t=e.formatWithSpaces(r,t),e.previousReservedToken=r):t=r.type===n.default.OPEN_PAREN?e.formatOpeningParentheses(r,t):r.type===n.default.CLOSE_PAREN?e.formatClosingParentheses(r,t):r.type===n.default.PLACEHOLDER?e.formatPlaceholder(r,t):","===r.value?e.formatComma(r,t):":"===r.value?e.formatWithSpaceAfter(r,t):"."===r.value?e.formatWithoutSpaces(r,t):";"===r.value?e.formatQuerySeparator(r,t):e.formatWithSpaces(r,t)}),t}},{key:"formatLineComment",value:function(e,t){return this.addNewline(t+this.show(e))}},{key:"formatBlockComment",value:function(e,t){return this.addNewline(this.addNewline(t)+this.indentComment(e.value))}},{key:"indentComment",value:function(e){return e.replace(/\n[\t ]*/g,"\n"+this.indentation.getIndent()+" ")}},{key:"formatTopLevelReservedWordNoIndent",value:function(e,t){return this.indentation.decreaseTopLevel(),t=this.addNewline(t)+this.equalizeWhitespace(this.show(e)),this.addNewline(t)}},{key:"formatTopLevelReservedWord",value:function(e,t){return this.indentation.decreaseTopLevel(),t=this.addNewline(t),this.indentation.increaseTopLevel(),t+=this.equalizeWhitespace(this.show(e)),this.addNewline(t)}},{key:"formatNewlineReservedWord",value:function(e,t){return(0,uc.isAnd)(e)&&(0,uc.isBetween)(this.tokenLookBehind(2))?this.formatWithSpaces(e,t):this.addNewline(t)+this.equalizeWhitespace(this.show(e))+" "}},{key:"equalizeWhitespace",value:function(e){return e.replace(/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g," ")}},{key:"formatOpeningParentheses",value:function(e,t){var r,a,o=(l(r={},n.default.OPEN_PAREN,!0),l(r,n.default.LINE_COMMENT,!0),l(r,n.default.OPERATOR,!0),r);return 0!==e.whitespaceBefore.length||o[null===(a=this.tokenLookBehind())||void 0===a?void 0:a.type]||(t=(0,ic.trimSpacesEnd)(t)),t+=this.show(e),this.inlineBlock.beginIfPossible(this.tokens,this.index),this.inlineBlock.isActive()||(this.indentation.increaseBlockLevel(),t=this.addNewline(t)),t}},{key:"formatClosingParentheses",value:function(e,t){return this.inlineBlock.isActive()?(this.inlineBlock.end(),this.formatWithSpaceAfter(e,t)):(this.indentation.decreaseBlockLevel(),this.formatWithSpaces(e,this.addNewline(t)))}},{key:"formatPlaceholder",value:function(e,t){return t+this.params.get(e)+" "}},{key:"formatComma",value:function(e,t){return t=(0,ic.trimSpacesEnd)(t)+this.show(e)+" ",this.inlineBlock.isActive()||(0,uc.isLimit)(this.previousReservedToken)?t:this.addNewline(t)}},{key:"formatWithSpaceAfter",value:function(e,t){return(0,ic.trimSpacesEnd)(t)+this.show(e)+" "}},{key:"formatWithoutSpaces",value:function(e,t){return(0,ic.trimSpacesEnd)(t)+this.show(e)}},{key:"formatWithSpaces",value:function(e,t){return t+this.show(e)+" "}},{key:"formatQuerySeparator",value:function(e,t){return this.indentation.resetIndentation(),(0,ic.trimSpacesEnd)(t)+this.show(e)+"\n".repeat(this.cfg.linesBetweenQueries||1)}},{key:"show",value:function(e){var t=e.type,r=e.value;return!this.cfg.uppercase||t!==n.default.RESERVED&&t!==n.default.RESERVED_TOP_LEVEL&&t!==n.default.RESERVED_TOP_LEVEL_NO_INDENT&&t!==n.default.RESERVED_NEWLINE&&t!==n.default.OPEN_PAREN&&t!==n.default.CLOSE_PAREN?r:r.toUpperCase()}},{key:"addNewline",value:function(e){return(e=(0,ic.trimSpacesEnd)(e)).endsWith("\n")||(e+="\n"),e+this.indentation.getIndent()}},{key:"tokenLookBehind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index-e]}},{key:"tokenLookAhead",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index+e]}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default});function dc(e){var t={"``":"((`[^`]*($|`))+)","{}":"((\\{[^\\}]*($|\\}))+)","[]":"((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)",'""':'(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',"''":"(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","N''":"((N'[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","U&''":"((U&'[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)",'U&""':'((U&"[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',$$:"((?<tag>\\$\\w*\\$)[\\s\\S]*?(?:\\k<tag>|$))"};return e.map(function(e){return t[e]}).join("|")}function pc(e){return 1===e.length?(0,ic.escapeRegExp)(e):"\\b"+e+"\\b"}var mc=/*#__PURE__*/Object.defineProperty({createOperatorRegex:function(e){return new RegExp("^(".concat((0,ic.sortByLengthDesc)(e).map(ic.escapeRegExp).join("|"),"|.)"),"u")},createLineCommentRegex:function(e){return new RegExp("^((?:".concat(e.map(function(e){return(0,ic.escapeRegExp)(e)}).join("|"),").*?)(?:\r\n|\r|\n|$)"),"u")},createReservedWordRegex:function(e){if(0===e.length)return new RegExp("^\b$","u");var t=(0,ic.sortByLengthDesc)(e).join("|").replace(/ /g,"\\s+");return new RegExp("^(".concat(t,")\\b"),"iu")},createWordRegex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new RegExp("^([\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}\\p{Connector_Punctuation}\\p{Join_Control}".concat(e.join(""),"]+)"),"u")},createStringRegex:function(e){return new RegExp("^("+dc(e)+")","u")},createStringPattern:dc,createParenRegex:function(e){return new RegExp("^("+e.map(pc).join("|")+")","iu")},createPlaceholderRegex:function(e,t){if((0,ic.isEmpty)(e))return!1;var n=e.map(ic.escapeRegExp).join("|");return new RegExp("^((?:".concat(n,")(?:").concat(t,"))"),"u")}},"__esModule",{value:!0}),hc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=oc)&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}(mc);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.default=/*#__PURE__*/function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.WHITESPACE_REGEX=/^([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)/,this.NUMBER_REGEX=/^((\x2D[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?[0-9]+(\.[0-9]+)?([Ee]\x2D?[0-9]+(\.[0-9]+)?)?|0x[0-9A-Fa-f]+|0b[01]+)\b/,this.OPERATOR_REGEX=o.createOperatorRegex(["<>","<=",">="].concat(function(e){if(Array.isArray(e))return u(e)}(n=t.operators||[])||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),this.BLOCK_COMMENT_REGEX=/^(\/\*(?:(?![])[\s\S])*?(?:\*\/|$))/,this.LINE_COMMENT_REGEX=o.createLineCommentRegex(t.lineCommentTypes),this.RESERVED_TOP_LEVEL_REGEX=o.createReservedWordRegex(t.reservedTopLevelWords),this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX=o.createReservedWordRegex(t.reservedTopLevelWordsNoIndent),this.RESERVED_NEWLINE_REGEX=o.createReservedWordRegex(t.reservedNewlineWords),this.RESERVED_PLAIN_REGEX=o.createReservedWordRegex(t.reservedWords),this.WORD_REGEX=o.createWordRegex(t.specialWordChars),this.STRING_REGEX=o.createStringRegex(t.stringTypes),this.OPEN_PAREN_REGEX=o.createParenRegex(t.openParens),this.CLOSE_PAREN_REGEX=o.createParenRegex(t.closeParens),this.INDEXED_PLACEHOLDER_REGEX=o.createPlaceholderRegex(t.indexedPlaceholderTypes,"[0-9]*"),this.IDENT_NAMED_PLACEHOLDER_REGEX=o.createPlaceholderRegex(t.namedPlaceholderTypes,"[a-zA-Z0-9._$]+"),this.STRING_NAMED_PLACEHOLDER_REGEX=o.createPlaceholderRegex(t.namedPlaceholderTypes,o.createStringPattern(t.stringTypes))}var t;return(t=[{key:"tokenize",value:function(e){for(var t,n=[];e.length;){var r=this.getWhitespace(e);(e=e.substring(r.length)).length&&(t=this.getNextToken(e,t),e=e.substring(t.value.length),n.push(s(s({},t),{},{whitespaceBefore:r})))}return n}},{key:"getWhitespace",value:function(e){var t=e.match(this.WHITESPACE_REGEX);return t?t[1]:""}},{key:"getNextToken",value:function(e,t){return this.getCommentToken(e)||this.getStringToken(e)||this.getOpenParenToken(e)||this.getCloseParenToken(e)||this.getPlaceholderToken(e)||this.getNumberToken(e)||this.getReservedWordToken(e,t)||this.getWordToken(e)||this.getOperatorToken(e)}},{key:"getCommentToken",value:function(e){return this.getLineCommentToken(e)||this.getBlockCommentToken(e)}},{key:"getLineCommentToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.LINE_COMMENT,regex:this.LINE_COMMENT_REGEX})}},{key:"getBlockCommentToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.BLOCK_COMMENT,regex:this.BLOCK_COMMENT_REGEX})}},{key:"getStringToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.STRING,regex:this.STRING_REGEX})}},{key:"getOpenParenToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.OPEN_PAREN,regex:this.OPEN_PAREN_REGEX})}},{key:"getCloseParenToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.CLOSE_PAREN,regex:this.CLOSE_PAREN_REGEX})}},{key:"getPlaceholderToken",value:function(e){return this.getIdentNamedPlaceholderToken(e)||this.getStringNamedPlaceholderToken(e)||this.getIndexedPlaceholderToken(e)}},{key:"getIdentNamedPlaceholderToken",value:function(e){return this.getPlaceholderTokenWithKey({input:e,regex:this.IDENT_NAMED_PLACEHOLDER_REGEX,parseKey:function(e){return e.slice(1)}})}},{key:"getStringNamedPlaceholderToken",value:function(e){var t=this;return this.getPlaceholderTokenWithKey({input:e,regex:this.STRING_NAMED_PLACEHOLDER_REGEX,parseKey:function(e){return t.getEscapedPlaceholderKey({key:e.slice(2,-1),quoteChar:e.slice(-1)})}})}},{key:"getIndexedPlaceholderToken",value:function(e){return this.getPlaceholderTokenWithKey({input:e,regex:this.INDEXED_PLACEHOLDER_REGEX,parseKey:function(e){return e.slice(1)}})}},{key:"getPlaceholderTokenWithKey",value:function(e){var t=e.parseKey,n=this.getTokenOnFirstMatch({input:e.input,regex:e.regex,type:a.default.PLACEHOLDER});return n&&(n.key=t(n.value)),n}},{key:"getEscapedPlaceholderKey",value:function(e){var t=e.quoteChar;return e.key.replace(new RegExp((0,ic.escapeRegExp)("\\"+t),"gu"),t)}},{key:"getNumberToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.NUMBER,regex:this.NUMBER_REGEX})}},{key:"getOperatorToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.OPERATOR,regex:this.OPERATOR_REGEX})}},{key:"getReservedWordToken",value:function(e,t){if(!t||!t.value||"."!==t.value)return this.getTopLevelReservedToken(e)||this.getNewlineReservedToken(e)||this.getTopLevelReservedTokenNoIndent(e)||this.getPlainReservedToken(e)}},{key:"getTopLevelReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.RESERVED_TOP_LEVEL,regex:this.RESERVED_TOP_LEVEL_REGEX})}},{key:"getNewlineReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.RESERVED_NEWLINE,regex:this.RESERVED_NEWLINE_REGEX})}},{key:"getTopLevelReservedTokenNoIndent",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.RESERVED_TOP_LEVEL_NO_INDENT,regex:this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX})}},{key:"getPlainReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.RESERVED,regex:this.RESERVED_PLAIN_REGEX})}},{key:"getWordToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.WORD,regex:this.WORD_REGEX})}},{key:"getTokenOnFirstMatch",value:function(e){var t=e.type,n=e.input.match(e.regex);return n?{type:t,value:n[1]}:void 0}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default}),gc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],f=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],p=["AND","OR","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"],operators:["**","!=","!>","!>","||"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),yc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BIGINT","BINARY","BLOB","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHAR","CHARACTER","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEC","DECIMAL","DECLARE","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO_DOMAIN_IDS","DOUBLE","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FLOAT","FLOAT4","FLOAT8","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERAL","GRANT","GROUP","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER_HEARTBEAT_PERIOD","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","NUMERIC","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PAGE_CHECKSUM","PARSE_VCOL_EXPR","PARTITION","POSITION","PRECISION","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","READ_WRITE","REAL","RECURSIVE","REF_SYSTEM_ID","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","RETURNING","REVOKE","RIGHT","RLIKE","ROWS","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SLOW","SMALLINT","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARYING","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],f=["ADD","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","CROSS JOIN","NATURAL JOIN","STRAIGHT_JOIN","NATURAL LEFT JOIN","NATURAL LEFT OUTER JOIN","NATURAL RIGHT JOIN","NATURAL RIGHT OUTER JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:["``","''",'""'],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[],lineCommentTypes:["--","#"],specialWordChars:["@"],operators:[":=","<<",">>","!=","<>","<=>","&&","||"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),vc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BIGINT","BINARY","BLOB","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHAR","CHARACTER","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CUBE","CUME_DIST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEC","DECIMAL","DECLARE","DEFAULT","DELAYED","DELETE","DENSE_RANK","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DOUBLE","DROP","DUAL","EACH","ELSE","ELSEIF","EMPTY","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FIRST_VALUE","FLOAT","FLOAT4","FLOAT8","FOR","FORCE","FOREIGN","FROM","FULLTEXT","FUNCTION","GENERATED","GET","GRANT","GROUP","GROUPING","GROUPS","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERVAL","INTO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IS","ITERATE","JOIN","JSON_TABLE","KEY","KEYS","KILL","LAG","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER_BIND","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","NUMERIC","OF","ON","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PARTITION","PERCENT_RANK","PRECISION","PRIMARY","PROCEDURE","PURGE","RANGE","RANK","READ","READS","READ_WRITE","REAL","RECURSIVE","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","REVOKE","RIGHT","RLIKE","ROW","ROWS","ROW_NUMBER","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SMALLINT","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STORED","STRAIGHT_JOIN","SYSTEM","TABLE","TERMINATED","THEN","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARYING","VIRTUAL","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],f=["ADD","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","CROSS JOIN","NATURAL JOIN","STRAIGHT_JOIN","NATURAL LEFT JOIN","NATURAL LEFT OUTER JOIN","NATURAL RIGHT JOIN","NATURAL RIGHT OUTER JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:["``","''",'""'],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[],lineCommentTypes:["--","#"],specialWordChars:["@"],operators:[":=","<<",">>","!=","<>","<=>","&&","||","->","->>"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),bc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],f=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],p=["AND","OR","XOR","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"],operators:["==","!="]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),Ec=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(fc),a=i(hc),o=i(oc);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BREADTH","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DEPTH","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","END","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SEARCH","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],d=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UPDATE","VALUES","WHERE"],p=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],m=["AND","CROSS APPLY","ELSE","END","OR","OUTER APPLY","WHEN","XOR","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(h,e);var t,n,r,i=(n=h,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=u(n);if(r){var a=u(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return c(this,e)});function h(){return l(this,h),i.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:f,reservedTopLevelWords:d,reservedNewlineWords:m,reservedTopLevelWordsNoIndent:p,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"],operators:["||","**","!=",":="]})}},{key:"tokenOverride",value:function(e){return(0,uc.isSet)(e)&&(0,uc.isBy)(this.previousReservedToken)?{type:o.default.RESERVED,value:e.value}:e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,t),h}(r.default),e.exports=t.default}),Tc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ABORT","ABSOLUTE","ACCESS","ACTION","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATTACH","ATTRIBUTE","AUTHORIZATION","BACKWARD","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BIT","BOOLEAN","BOTH","BY","CACHE","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHECK","CHECKPOINT","CLASS","CLOSE","CLUSTER","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMENTS","COMMIT","COMMITTED","CONCURRENTLY","CONFIGURATION","CONFLICT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTENT","CONTINUE","CONVERSION","COPY","COST","CREATE","CROSS","CSV","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINER","DELETE","DELIMITER","DELIMITERS","DEPENDS","DESC","DETACH","DICTIONARY","DISABLE","DISCARD","DISTINCT","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","EACH","ELSE","ENABLE","ENCODING","ENCRYPTED","END","ENUM","ESCAPE","EVENT","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FORCE","FOREIGN","FORWARD","FREEZE","FROM","FULL","FUNCTION","FUNCTIONS","GENERATED","GLOBAL","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HOLD","HOUR","IDENTITY","IF","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDE","INCLUDING","INCREMENT","INDEX","INDEXES","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","KEY","LABEL","LANGUAGE","LARGE","LAST","LATERAL","LEADING","LEAKPROOF","LEAST","LEFT","LEVEL","LIKE","LIMIT","LISTEN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LOCKED","LOGGED","MAPPING","MATCH","MATERIALIZED","MAXVALUE","METHOD","MINUTE","MINVALUE","MODE","MONTH","MOVE","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NEW","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NULL","NULLIF","NULLS","NUMERIC","OBJECT","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","PARALLEL","PARSER","PARTIAL","PARTITION","PASSING","PASSWORD","PLACING","PLANS","POLICY","POSITION","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROGRAM","PUBLICATION","QUOTE","RANGE","READ","REAL","REASSIGN","RECHECK","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","RESET","RESTART","RESTRICT","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINES","ROW","ROWS","RULE","SAVEPOINT","SCHEMA","SCHEMAS","SCROLL","SEARCH","SECOND","SECURITY","SELECT","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SKIP","SMALLINT","SNAPSHOT","SOME","SQL","STABLE","STANDALONE","START","STATEMENT","STATISTICS","STDIN","STDOUT","STORAGE","STORED","STRICT","STRIP","SUBSCRIPTION","SUBSTRING","SUPPORT","SYMMETRIC","SYSID","SYSTEM","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRANSFORM","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLISTEN","UNLOGGED","UNTIL","UPDATE","USER","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARCHAR","VARIADIC","VARYING","VERBOSE","VERSION","VIEW","VIEWS","VOLATILE","WHEN","WHERE","WHITESPACE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLATTRIBUTES","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","YEAR","YES","ZONE"],f=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","EXCEPT","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''","U&''",'U&""',"$$"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["$"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],operators:["!=","<<",">>","||/","|/","::","->>","->","~~*","~~","!~~*","!~~","~*","!~*","!~","!!"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),Sc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["AES128","AES256","ALLOWOVERWRITE","ANALYSE","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GZIP","IDENTITY","IGNORE","ILIKE","INITIALLY","INTO","LEADING","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY13","MOSTLY32","MOSTLY8","NATURAL","NEW","NULLS","OFF","OFFLINE","OFFSET","OLD","ON","ONLY","OPEN","ORDER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","REJECTLOG","RESORT","RESTORE","SESSION_USER","SIMILAR","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WITH","WITHOUT","PREDICATE","COLUMNS","COMPROWS","COMPRESSION","COPY","FORMAT","DELIMITER","FIXEDWIDTH","AVRO","JSON","ENCRYPTED","BZIP2","GZIP","LZOP","PARQUET","ORC","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","NULL AS","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","MANIFEST","REGION","IAM_ROLE","MASTER_SYMMETRIC_KEY","SSH","ACCEPTANYDATE","ACCEPTINVCHARS","ACCESS_KEY_ID","SECRET_ACCESS_KEY","AVRO","BLANKSASNULL","BZIP2","COMPROWS","COMPUPDATE","CREDENTIALS","DATEFORMAT","DELIMITER","EMPTYASNULL","ENCODING","ENCRYPTED","ESCAPE","EXPLICIT_IDS","FILLRECORD","FIXEDWIDTH","FORMAT","IAM_ROLE","GZIP","IGNOREBLANKLINES","IGNOREHEADER","JSON","LZOP","MANIFEST","MASTER_SYMMETRIC_KEY","MAXERROR","NOLOAD","NULL AS","READRATIO","REGION","REMOVEQUOTES","ROUNDEC","SSH","STATUPDATE","TIMEFORMAT","SESSION_TOKEN","TRIMBLANKS","TRUNCATECOLUMNS","EXTERNAL","DATA CATALOG","HIVE METASTORE","CATALOG_ROLE","VACUUM","COPY","UNLOAD","EVEN","ALL"],f=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","INTERSECT","TOP","LIMIT","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UNION","UPDATE","VALUES","WHERE","VACUUM","COPY","UNLOAD","ANALYZE","ANALYSE","DISTKEY","SORTKEY","COMPOUND","INTERLEAVED","FORMAT","DELIMITER","FIXEDWIDTH","AVRO","JSON","ENCRYPTED","BZIP2","GZIP","LZOP","PARQUET","ORC","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","NULL AS","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","MANIFEST","REGION","IAM_ROLE","MASTER_SYMMETRIC_KEY","SSH","ACCEPTANYDATE","ACCEPTINVCHARS","ACCESS_KEY_ID","SECRET_ACCESS_KEY","AVRO","BLANKSASNULL","BZIP2","COMPROWS","COMPUPDATE","CREDENTIALS","DATEFORMAT","DELIMITER","EMPTYASNULL","ENCODING","ENCRYPTED","ESCAPE","EXPLICIT_IDS","FILLRECORD","FIXEDWIDTH","FORMAT","IAM_ROLE","GZIP","IGNOREBLANKLINES","IGNOREHEADER","JSON","LZOP","MANIFEST","MASTER_SYMMETRIC_KEY","MAXERROR","NOLOAD","NULL AS","READRATIO","REGION","REMOVEQUOTES","ROUNDEC","SSH","STATUPDATE","TIMEFORMAT","SESSION_TOKEN","TRIMBLANKS","TRUNCATECOLUMNS","EXTERNAL","DATA CATALOG","HIVE METASTORE","CATALOG_ROLE"],d=[],p=["AND","ELSE","OR","OUTER APPLY","WHEN","VACUUM","COPY","UNLOAD","ANALYZE","ANALYSE","DISTKEY","SORTKEY","COMPOUND","INTERLEAVED","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''","``"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@","#","$"],lineCommentTypes:["--"],operators:["|/","||/","<<",">>","!=","||"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),wc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(fc),a=i(hc),o=i(oc);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=["ALL","ALTER","ANALYSE","ANALYZE","ARRAY_ZIP","ARRAY","AS","ASC","AVG","BETWEEN","CASCADE","CASE","CAST","COALESCE","COLLECT_LIST","COLLECT_SET","COLUMN","COLUMNS","COMMENT","CONSTRAINT","CONTAINS","CONVERT","COUNT","CUME_DIST","CURRENT ROW","CURRENT_DATE","CURRENT_TIMESTAMP","DATABASE","DATABASES","DATE_ADD","DATE_SUB","DATE_TRUNC","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DAY","DAYS","DECODE","DEFAULT","DELETE","DENSE_RANK","DESC","DESCRIBE","DISTINCT","DISTINCTROW","DIV","DROP","ELSE","ENCODE","END","EXISTS","EXPLAIN","EXPLODE_OUTER","EXPLODE","FILTER","FIRST_VALUE","FIRST","FIXED","FLATTEN","FOLLOWING","FROM_UNIXTIME","FULL","GREATEST","GROUP_CONCAT","HOUR_MINUTE","HOUR_SECOND","HOUR","HOURS","IF","IFNULL","IN","INSERT","INTERVAL","INTO","IS","LAG","LAST_VALUE","LAST","LEAD","LEADING","LEAST","LEVEL","LIKE","MAX","MERGE","MIN","MINUTE_SECOND","MINUTE","MONTH","NATURAL","NOT","NOW()","NTILE","NULL","NULLIF","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPTIMIZE","OVER","PERCENT_RANK","PRECEDING","RANGE","RANK","REGEXP","RENAME","RLIKE","ROW","ROWS","SECOND","SEPARATOR","SEQUENCE","SIZE","STRING","STRUCT","SUM","TABLE","TABLES","TEMPORARY","THEN","TO_DATE","TO_JSON","TO","TRAILING","TRANSFORM","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNIQUE","UNIX_TIMESTAMP","UNLOCK","UNSIGNED","USING","VARIABLES","VIEW","WHEN","WITH","YEAR_MONTH"],d=["ADD","AFTER","ALTER COLUMN","ALTER DATABASE","ALTER SCHEMA","ALTER TABLE","CLUSTER BY","CLUSTERED BY","DELETE FROM","DISTRIBUTE BY","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","OPTIONS","ORDER BY","PARTITION BY","PARTITIONED BY","RANGE","ROWS","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","TBLPROPERTIES","UPDATE","USING","VALUES","WHERE","WINDOW"],p=["EXCEPT ALL","EXCEPT","INTERSECT ALL","INTERSECT","UNION ALL","UNION"],m=["AND","CREATE OR","CREATE","ELSE","LATERAL VIEW","OR","OUTER APPLY","WHEN","XOR","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN","ANTI JOIN","SEMI JOIN","LEFT ANTI JOIN","LEFT SEMI JOIN","RIGHT OUTER JOIN","RIGHT SEMI JOIN","NATURAL ANTI JOIN","NATURAL FULL OUTER JOIN","NATURAL INNER JOIN","NATURAL LEFT ANTI JOIN","NATURAL LEFT OUTER JOIN","NATURAL LEFT SEMI JOIN","NATURAL OUTER JOIN","NATURAL RIGHT OUTER JOIN","NATURAL RIGHT SEMI JOIN","NATURAL SEMI JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(h,e);var t,n,r,i=(n=h,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=u(n);if(r){var a=u(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return c(this,e)});function h(){return l(this,h),i.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:f,reservedTopLevelWords:d,reservedNewlineWords:m,reservedTopLevelWordsNoIndent:p,stringTypes:['""',"''","``","{}"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["$"],lineCommentTypes:["--"],operators:["!=","<=>","&&","||","=="]})}},{key:"tokenOverride",value:function(e){if((0,uc.isWindow)(e)){var t=this.tokenLookAhead();if(t&&t.type===o.default.OPEN_PAREN)return{type:o.default.RESERVED,value:e.value}}if((0,uc.isEnd)(e)){var n=this.tokenLookBehind();if(n&&n.type===o.default.OPERATOR&&"."===n.value)return{type:o.default.WORD,value:e.value}}return e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,t),h}(r.default),e.exports=t.default}),Nc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ABS","ALL","ALLOCATE","ALTER","AND","ANY","ARE","ARRAY","AS","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","AVG","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BY","CALL","CALLED","CARDINALITY","CASCADED","CASE","CAST","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER","CHARACTER_LENGTH","CHECK","CLOB","CLOSE","COALESCE","COLLATE","COLLECT","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CONVERT","CORR","CORRESPONDING","COUNT","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DELETE","DENSE_RANK","DEREF","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DOUBLE","DROP","DYNAMIC","EACH","ELEMENT","ELSE","END","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXP","EXTERNAL","EXTRACT","FALSE","FETCH","FILTER","FLOAT","FLOOR","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","FUSION","GET","GLOBAL","GRANT","GROUP","GROUPING","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERSECTION","INTERVAL","INTO","IS","JOIN","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LN","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOWER","MATCH","MAX","MEMBER","MERGE","METHOD","MIN","MINUTE","MOD","MODIFIES","MODULE","MONTH","MULTISET","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NO","NONE","NORMALIZE","NOT","NULL","NULLIF","NUMERIC","OCTET_LENGTH","OCCURRENCES_REGEX","OF","OLD","ON","ONLY","OPEN","OR","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","PARAMETER","PARTITION","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","POSITION","POSITION_REGEX","POWER","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","RANK","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROW_NUMBER","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SMALLINT","SOME","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQRT","START","STATIC","STDDEV_POP","STDDEV_SAMP","SUBMULTISET","SUBSTRING","SUBSTRING_REGEX","SUM","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATE","TRANSLATE_REGEX","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","UPPER","USER","USING","VALUE","VALUES","VAR_POP","VAR_SAMP","VARBINARY","VARCHAR","VARYING","WHEN","WHENEVER","WHERE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","YEAR"],f=["ADD","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","FETCH FIRST","FETCH NEXT","FETCH PRIOR","FETCH LAST","FETCH ABSOLUTE","FETCH RELATIVE","FROM","GROUP BY","HAVING","INSERT INTO","LIMIT","ORDER BY","SELECT","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","INTERSECT DISTINCT","UNION","UNION ALL","UNION DISTINCT","EXCEPT","EXCEPT ALL","EXCEPT DISTINCT"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[],lineCommentTypes:["--"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),Rc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ADD","EXTERNAL","PROCEDURE","ALL","FETCH","PUBLIC","ALTER","FILE","RAISERROR","AND","FILLFACTOR","READ","ANY","FOR","READTEXT","AS","FOREIGN","RECONFIGURE","ASC","FREETEXT","REFERENCES","AUTHORIZATION","FREETEXTTABLE","REPLICATION","BACKUP","FROM","RESTORE","BEGIN","FULL","RESTRICT","BETWEEN","FUNCTION","RETURN","BREAK","GOTO","REVERT","BROWSE","GRANT","REVOKE","BULK","GROUP","RIGHT","BY","HAVING","ROLLBACK","CASCADE","HOLDLOCK","ROWCOUNT","CASE","IDENTITY","ROWGUIDCOL","CHECK","IDENTITY_INSERT","RULE","CHECKPOINT","IDENTITYCOL","SAVE","CLOSE","IF","SCHEMA","CLUSTERED","IN","SECURITYAUDIT","COALESCE","INDEX","SELECT","COLLATE","INNER","SEMANTICKEYPHRASETABLE","COLUMN","INSERT","SEMANTICSIMILARITYDETAILSTABLE","COMMIT","INTERSECT","SEMANTICSIMILARITYTABLE","COMPUTE","INTO","SESSION_USER","CONSTRAINT","IS","SET","CONTAINS","JOIN","SETUSER","CONTAINSTABLE","KEY","SHUTDOWN","CONTINUE","KILL","SOME","CONVERT","LEFT","STATISTICS","CREATE","LIKE","SYSTEM_USER","CROSS","LINENO","TABLE","CURRENT","LOAD","TABLESAMPLE","CURRENT_DATE","MERGE","TEXTSIZE","CURRENT_TIME","NATIONAL","THEN","CURRENT_TIMESTAMP","NOCHECK","TO","CURRENT_USER","NONCLUSTERED","TOP","CURSOR","NOT","TRAN","DATABASE","NULL","TRANSACTION","DBCC","NULLIF","TRIGGER","DEALLOCATE","OF","TRUNCATE","DECLARE","OFF","TRY_CONVERT","DEFAULT","OFFSETS","TSEQUAL","DELETE","ON","UNION","DENY","OPEN","UNIQUE","DESC","OPENDATASOURCE","UNPIVOT","DISK","OPENQUERY","UPDATE","DISTINCT","OPENROWSET","UPDATETEXT","DISTRIBUTED","OPENXML","USE","DOUBLE","OPTION","USER","DROP","OR","VALUES","DUMP","ORDER","VARYING","ELSE","OUTER","VIEW","END","OVER","WAITFOR","ERRLVL","PERCENT","WHEN","ESCAPE","PIVOT","WHERE","EXCEPT","PLAN","WHILE","EXEC","PRECISION","WITH","EXECUTE","PRIMARY","WITHIN GROUP","EXISTS","PRINT","WRITETEXT","EXIT","PROC"],f=["ADD","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"N''","''","[]"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:[],namedPlaceholderTypes:["@"],lineCommentTypes:["--"],specialWordChars:["#","@"],operators:[">=","<=","<>","!=","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),Oc=/*@__PURE__*/Ie(Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.supportedDialects=t.format=void 0;var n=d(gc),r=d(yc),a=d(vc),o=d(bc),i=d(Ec),l=d(Tc),s=d(Sc),c=d(wc),u=d(Nc),f=d(Rc);function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var m={db2:n.default,mariadb:r.default,mysql:a.default,n1ql:o.default,plsql:i.default,postgresql:l.default,redshift:s.default,spark:c.default,sql:u.default,tsql:f.default};t.format=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw new Error("Invalid query argument. Extected string, instead got "+p(e));var n=u.default;if(void 0!==t.language&&(n=m[t.language]),void 0===n)throw Error("Unsupported SQL dialect: ".concat(t.language));return new n(t).format(e)};var h=Object.keys(m);t.supportedDialects=h}));function Cc({children:e,language:t}){return c.createElement(Il,{language:t,customStyle:{background:"transparent"}},e)}function xc({value:e,limitHeight:t=!0,language:n=null,transparent:r=!1,overflowX:a=!0}){const[o,i]=c.useState(t),[l,s]=c.useState("sql"===n),u=c.useRef(null),f=c.useRef(null);return c.useEffect(()=>{u.current&&s(u.current.scrollHeight>u.current.clientHeight)},[u.current,o,e,t]),c.createElement("div",{ref:f,className:`\n ${l?"cursor-pointer":""}\n ${r?"":"~bg-gray-500/5"}\n group py-2 relative`,onClick:function(e){var t;3!==e.detail?l&&(!o&&null!=(t=window.getSelection())&&t.toString().length||i(!o)):function(){const e=document.createRange();e.selectNodeContents(f.current);const t=window.getSelection();t.removeAllRanges(),t.addRange(e)}()}},c.createElement("div",{className:a?"mask-fade-x":""},"sql"===n&&c.createElement(c.Fragment,null,o?c.createElement("pre",{className:"pl-4 "+(a?"overflow-x-scroll scrollbar-hidden-x pr-12":"truncate pr-8")},c.createElement("code",{className:"font-mono leading-relaxed text-sm font-normal"},c.createElement(Cc,{language:"sql"},e))):c.createElement("pre",{className:"pl-4 "+(a?"overflow-x-scroll scrollbar-hidden-x pr-12":"pr-8")},c.createElement("code",{className:"font-mono leading-relaxed text-sm font-normal"},c.createElement(Cc,{language:"sql"},Oc.format(e,{language:"mysql"}))))),"sql"!==n&&c.createElement("pre",{ref:u,className:`\n pl-4\n ${l?"mask-fade-y -mb-2":""}\n ${o?"overflow-y-hidden max-h-32":""}\n ${a?"overflow-x-scroll scrollbar-hidden-x pr-12":"pr-8"}\n `},c.createElement("code",{className:"font-mono leading-relaxed text-sm font-normal"},n?c.createElement(Cc,{language:n},e):e))),c.createElement(zo,{className:"absolute top-2 right-3",value:e}),l&&c.createElement(Fo,{onClick:()=>i(!o),className:"\n absolute -bottom-3 left-1/2 -translate-x-1/2\n opacity-0 group-hover:opacity-100 scale-80 group-hover:scale-100 delay-100\n "},c.createElement(qa,{icon:Ja,className:"transition-transform duration-300 transform "+(o?"":"rotate-180")})))}const kc=["children","className"];function Ac(e){let{children:t,className:n=""}=e,r=Ce(e,kc);return t?c.createElement("dl",Ne({className:`grid grid-cols-1 gap-2 ${n}`},r),t):null}function Ic({frame:e}){var t;return c.createElement(Ac,{className:"pb-10 px-6 @lg:px-10"},null==(t=e.arguments)?void 0:t.map((e,t)=>c.createElement(Ac.Row,{key:t,label:c.createElement("div",{className:"font-mono text-sm"},c.createElement("span",{className:"hljs-function hljs-params hljs-variable"},c.createElement("span",{title:"by reference"},e.is_variadic&&"…"),c.createElement("span",null,e.passed_by_reference&&"&"),c.createElement("span",{title:"variadic"},"$"),e.name),c.createElement("span",{className:"text-xs pl-px hljs-function hljs-keyword"},":",e.original_type,e.truncated&&" - truncated")),value:e.value,type:e.original_type,stacked:!0})))}function Lc({frames:e,openFrameIndex:t}){const n=c.useMemo(()=>{let n=1;const r=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=0;return a<0&&(a=ac(r+a,0)),gt(e,rc(e=>"application"===ke(e)),a)}(e);return-1!==r&&(n=e.length-r),t&&(n=e.length-t),Nt({frames:e,expanded:[],selected:n},{type:"COLLAPSE_ALL_VENDOR_FRAMES"})},[e]),[r,a]=c.useReducer(Nt,n),o=c.useMemo(()=>function(e){return xe(e.frames).filter(e=>"vendor"===ke(e)).every(t=>e.expanded.includes(t.frame_number))}(r),[r]),i=c.useMemo(()=>function({frames:e,selected:t,expanded:n}){return e.reduce((r,a,o)=>{const i={current:a,previous:r[r.length-1]||Rt,isFirstFrame:0===o,frameNumber:e.length-o,expanded:n,selected:t};return i.expanded.includes(i.frameNumber)?r.concat(function(e){return e.current.relative_file!==e.previous.relative_file?[{type:ke(e.current),relative_file:e.current.relative_file,expanded:!0,frames:[Ne({},e.current,{frame_number:e.frameNumber,selected:e.selected===e.frameNumber})]}]:(e.previous.frames.push(Ne({},e.current,{frame_number:e.frameNumber,selected:e.selected===e.frameNumber})),[])}(i)):r.concat(function(e){const t=ke(e.current);return e.previous.expanded||t!==e.previous.type?[{type:t,relative_file:e.current.relative_file,expanded:!1,frames:[Ne({},e.current,{frame_number:e.frameNumber,selected:e.selected===e.frameNumber})]}]:(e.previous.frames.push(Ne({},e.current,{selected:!1,frame_number:e.frameNumber})),[])}(i))},[])}(r),[r]),l=c.useMemo(()=>function(e){const t=xe(e.frames);return t.find(t=>t.frame_number===e.selected)||t[0]||null}(r),[r]);return Ot("j",()=>{a({type:"SELECT_NEXT_FRAME"})}),Ot("k",()=>{a({type:"SELECT_PREVIOUS_FRAME"})}),c.createElement(c.Fragment,null,c.createElement("aside",{className:"z-30 flex flex-col border-r ~border-gray-200 relative"},c.createElement("div",{className:"max-h-[33vh] @4xl:max-h-[none] @4xl:absolute inset-0 flex flex-col overflow-hidden ~bg-white rounded-t-lg"},c.createElement("header",{className:"flex-none px-6 @lg:px-10 h-16 flex items-center justify-start ~bg-white border-b ~border-gray-200"},c.createElement(xt,{onClick:()=>a({type:o?"COLLAPSE_ALL_VENDOR_FRAMES":"EXPAND_ALL_VENDOR_FRAMES"})},c.createElement("div",{className:"flex "+(o?"flex-col-reverse":"flex-col")},c.createElement(qa,{icon:Za,className:"-my-px text-[8px] ~text-gray-500 group-hover:text-indigo-500"}),c.createElement(qa,{icon:Ja,className:"-my-px text-[8px] ~text-gray-500 group-hover:text-indigo-500"})),o?"Collapse vendor frames":" Expand vendor frames")),c.createElement("div",{id:"frames",className:"flex-grow overflow-auto scrollbar-hidden-y mask-fade-frames"},c.createElement("ol",{className:"text-sm pb-16"},i.map((e,t)=>c.createElement(_o,{key:t,frameGroup:e,onExpand:()=>a({type:"EXPAND_FRAMES",frames:e.frames.map(e=>e.frame_number)}),onSelect:e=>{a({type:"SELECT_FRAME",frame:e})}})))))),c.createElement("section",{className:"flex flex-col border-t @4xl:border-t-0 ~border-gray-200 relative"},l&&c.createElement(c.Fragment,null,c.createElement("header",{className:"~text-gray-500 flex-none z-30 h-16 px-6 @lg:px-10 flex items-center justify-end"},c.createElement(Bo,{path:l.file,lineNumber:l.line_number,className:"flex items-center text-sm"})),c.createElement(_l,{frame:l}))),(null==l?void 0:l.arguments)&&l.arguments.length>0&&c.createElement("section",{className:"border-t ~border-gray-200 @4xl:col-span-2"},c.createElement("header",{className:"font-bold text-xs ~text-gray-500 uppercase tracking-wider h-16 px-6 @lg:px-10 flex items-center"},"arguments"),c.createElement(Ic,{frame:l})))}function _c({openFrameIndex:e}){const{frames:t}=c.useContext(be);return c.createElement("div",{className:"@container bg-gray-25 dark:shadow-none dark:bg-gray-800/50 bg-gradient-to-bl from-white dark:from-gray-700/50 via-transparent dark:ring-1 dark:ring-inset dark:ring-white/5 rounded-lg shadow-2xl shadow-gray-500/20"},c.createElement("div",{className:"grid grid-cols-1 @4xl:grid-cols-[33.33%_66.66%] @4xl:grid-rows-[57rem] items-stretch overflow-hidden"},c.createElement(Lc,{frames:t,openFrameIndex:e})))}function Pc({message:e,className:t=""}){const[n,r]=c.useState(!1);return c.createElement("div",{className:`\n my-4 font-semibold leading-snug text-xl\n ${t}\n `,onClick:function(){var e;n&&null!=(e=window.getSelection())&&e.toString().length||r(!n)}},c.createElement("div",{className:n?"line-clamp-none":"line-clamp-2"},e))}function Mc({message:e,exceptionClass:t,className:n=""}){const[r,a]=c.useState(e),[o,i]=c.useState(null);return c.useEffect(()=>{if("Illuminate\\Database\\QueryException"===t||e.match(/SQLSTATE\[[\s\S]*\][\s\S]*SQL: [\s\S]*\)/)){const t=/*#__PURE__*/we(/\((?:|Connection: [\s\S]*?, )SQL: ([\s\S]*?)\)($| \(View: [\s\S]*\)$)/,{query:1}),[,n]=e.match(t)||[];i(n),a(e.replace(t,"$2"))}},[e,t]),c.createElement(c.Fragment,null,c.createElement(Pc,{message:r,className:n}),o&&c.createElement(xc,{value:o,language:"sql"}))}Ac.Row=function({value:e="",label:t="",className:n="",stacked:r=!1,type:a,small:o=!1}){let i=e;const[l,s]=c.useState(!1);let u;return c.isValidElement(e)?i=e:"boolean"==typeof e?i=c.createElement("span",{className:(e?"text-emerald-500 bg-emerald-500/5":"text-red-500 bg-red-800/5")+" text-sm px-3 py-2 inline-flex gap-2 items-center justify-center"},c.createElement(qa,{className:`${e} ? 'text-emerald-500' : 'text-red-500`,icon:e?no:Io}),c.createElement("span",{className:"font-mono"},e?"true":"false")):"string"===a||"object"==typeof e?i=c.createElement(xc,{value:Do(e),language:"json"}):"string"==typeof e?i=c.createElement(xc,{value:e}):"number"==typeof e&&(i=c.createElement(xc,{value:String(e)})),c.createElement("div",{className:`${r?"flex flex-col":"flex items-baseline "+(o?"gap-3":"gap-10")} ${n}`},c.createElement("dt",{className:`\n ${r?"self-start pt-2 pb-1.5 leading-tight":l?o?"flex-grow truncate min-w-[2rem] max-w-max":"flex-grow truncate min-w-[8rem] max-w-max":o?"flex-none truncate w-[2rem]":"flex-none truncate w-[8rem]"}\n `,onMouseOver:()=>{u=setTimeout(()=>s(!0),500)},onMouseOut:()=>{clearTimeout(u),s(!1)}},t),c.createElement("dd",{className:"flex-grow min-w-0"},i))};const Dc=["children","className","disabled"];function Uc(e){let{children:t,className:n="",disabled:r=!1}=e,a=Ce(e,Dc);return c.createElement("button",Ne({disabled:r,className:`px-4 h-8 whitespace-nowrap border-b\n text-xs uppercase tracking-wider font-bold rounded-sm\n shadow-md\n transform\n transition-animation\n hover:shadow-lg\n active:shadow-inner\n active:translate-y-px\n ${r?"opacity-50":"opacity-100"}\n ${n}\n `},a),t)}var jc=/*@__PURE__*/Ie(Le(function(e,t){e.exports=(()=>{var e=Object.create,t=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,l=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=Math.pow,f=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,d=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&f(e,n,t[n]);if(i)for(var n of i(t))c.call(t,n)&&f(e,n,t[n]);return e},p=(e,t)=>n(e,a(t)),m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),h=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},g=(e,n,a,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of o(n))!s.call(e,l)&&l!==a&&t(e,l,{get:()=>n[l],enumerable:!(i=r(n,l))||i.enumerable});return e},y=(n,r,a)=>(a=null!=n?e(l(n)):{},g(!r&&n&&n.__esModule?a:t(a,"default",{value:n,enumerable:!0}),n)),v=m(e=>{var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,h={};function g(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||p}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var b=v.prototype=new y;b.constructor=v,m(b,g.prototype),b.isPureReactComponent=!0;var E=Array.isArray,T=Object.prototype.hasOwnProperty,S={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function N(e,n,r){var a,o={},i=null,l=null;if(null!=n)for(a in void 0!==n.ref&&(l=n.ref),void 0!==n.key&&(i=""+n.key),n)T.call(n,a)&&!w.hasOwnProperty(a)&&(o[a]=n[a]);var s=arguments.length-2;if(1===s)o.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(a in s=e.defaultProps)void 0===o[a]&&(o[a]=s[a]);return{$$typeof:t,type:e,key:i,ref:l,props:o,_owner:S.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var O=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function x(e,r,a,o,i){var l=typeof e;("undefined"===l||"boolean"===l)&&(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case t:case n:s=!0}}if(s)return i=i(s=e),e=""===o?"."+C(s,0):o,E(i)?(a="",null!=e&&(a=e.replace(O,"$&/")+"/"),x(i,r,a,"",function(e){return e})):null!=i&&(R(i)&&(i=function(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}(i,a+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(O,"$&/")+"/")+e)),r.push(i)),1;if(s=0,o=""===o?".":o+":",E(e))for(var c=0;c<e.length;c++){var u=o+C(l=e[c],c);s+=x(l,r,a,u,i)}else if("function"==typeof(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e)))for(e=u.call(e),c=0;!(l=e.next()).done;)s+=x(l=l.value,r,a,u=o+C(l,c++),i);else if("object"===l)throw r=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return s}function k(e,t,n){if(null==e)return e;var r=[],a=0;return x(e,r,"","",function(e){return t.call(n,e,a++)}),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I={current:null},L={transition:null},_={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:L,ReactCurrentOwner:S};e.Children={map:k,forEach:function(e,t,n){k(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},e.Component=g,e.Fragment=r,e.Profiler=o,e.PureComponent=v,e.StrictMode=a,e.Suspense=c,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_,e.cloneElement=function(e,n,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var a=m({},e.props),o=e.key,i=e.ref,l=e._owner;if(null!=n){if(void 0!==n.ref&&(i=n.ref,l=S.current),void 0!==n.key&&(o=""+n.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in n)T.call(n,c)&&!w.hasOwnProperty(c)&&(a[c]=void 0===n[c]&&void 0!==s?s[c]:n[c])}var c=arguments.length-2;if(1===c)a.children=r;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];a.children=s}return{$$typeof:t,type:e.type,key:o,ref:i,props:a,_owner:l}},e.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},e.createElement=N,e.createFactory=function(e){var t=N.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:s,render:e}},e.isValidElement=R,e.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},e.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(e,t){return I.current.useCallback(e,t)},e.useContext=function(e){return I.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return I.current.useDeferredValue(e)},e.useEffect=function(e,t){return I.current.useEffect(e,t)},e.useId=function(){return I.current.useId()},e.useImperativeHandle=function(e,t,n){return I.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return I.current.useMemo(e,t)},e.useReducer=function(e,t,n){return I.current.useReducer(e,t,n)},e.useRef=function(e){return I.current.useRef(e)},e.useState=function(e){return I.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return I.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return I.current.useTransition()},e.version="18.2.0"}),b=m((e,t)=>{t.exports=v()}),E=m((e,t)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}}),T=m((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},l=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,a=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},s=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,a,o,u,f=arguments[0],d=1,p=arguments.length,m=!1;for("boolean"==typeof f&&(m=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=c(f,n),f!==(a=c(t,n))&&(m&&a&&(l(a)||(o=i(a)))?(o?(o=!1,u=r&&i(r)?r:[]):u=r&&l(r)?r:{},s(f,{name:n,newValue:e(m,u,a)})):void 0!==a&&s(f,{name:n,newValue:a}));return f}}),S=m((e,t)=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}),w=m((e,t)=>{var n=S();function r(){}function a(){}a.resetWarningCache=r,t.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return o.PropTypes=o,o}}),N=m((e,t)=>{t.exports=w()()}),R=m(e=>{var t,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case a:case i:case o:case f:case d:return e;default:switch(e=e&&e.$$typeof){case c:case s:case u:case m:case p:case l:return e;default:return t}}case r:return t}}}t=Symbol.for("react.module.reference"),e.ContextConsumer=s,e.ContextProvider=l,e.Element=n,e.ForwardRef=u,e.Fragment=a,e.Lazy=m,e.Memo=p,e.Portal=r,e.Profiler=i,e.StrictMode=o,e.Suspense=f,e.SuspenseList=d,e.isAsyncMode=function(){return!1},e.isConcurrentMode=function(){return!1},e.isContextConsumer=function(e){return g(e)===s},e.isContextProvider=function(e){return g(e)===l},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return g(e)===u},e.isFragment=function(e){return g(e)===a},e.isLazy=function(e){return g(e)===m},e.isMemo=function(e){return g(e)===p},e.isPortal=function(e){return g(e)===r},e.isProfiler=function(e){return g(e)===i},e.isStrictMode=function(e){return g(e)===o},e.isSuspense=function(e){return g(e)===f},e.isSuspenseList=function(e){return g(e)===d},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===i||e===o||e===f||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===t||void 0!==e.getModuleId)},e.typeOf=g}),O=m((e,t)=>{t.exports=R()}),C=m((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,a=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function f(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,d=1;function p(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function m(){var e={line:c,column:d};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:c,column:d},this.source=t.source}function g(n){var r=new Error(t.source+":"+c+":"+d+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=d,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function v(){y(a)}function b(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(u===e.charAt((n+=2)-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,p(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function T(){var e=m(),t=y(o);if(t){if(E(),!y(i))return g("property missing ':'");var r=y(l),a=e({type:"declaration",property:f(t[0].replace(n,u)),value:r?f(r[0].replace(n,u)):u});return y(s),a}}return h.prototype.content=e,v(),function(){var e,t=[];for(b(t);e=T();)!1!==e&&(t.push(e),b(t));return t}()}}),x=m((e,t)=>{var n=C();function r(e,t){var r=null;if(!e||"string"!=typeof e)return r;for(var a,o,i,l=n(e),s="function"==typeof t,c=0,u=l.length;c<u;c++)o=(a=l[c]).property,i=a.value,s?t(o,i,a):i&&(r||(r={}),r[o]=i);return r}t.exports=r,t.exports.default=r}),k={};h(k,{default:()=>Er,uriTransformer:()=>I});var A=["http","https","mailto","tel"];function I(e){let t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;let r=t.indexOf(":");if(-1===r)return t;let a=-1;for(;++a<A.length;){let e=A[a];if(r===e.length&&t.slice(0,e.length).toLowerCase()===e)return t}return a=t.indexOf("?"),-1!==a&&r>a||(a=t.indexOf("#"),-1!==a&&r>a)?t:"javascript:void(0)"}var L=y(b(),1),_=y(E(),1);function P(e){return e&&"object"==typeof e?"position"in e||"type"in e?D(e.position):"start"in e||"end"in e?D(e):"line"in e||"column"in e?M(e):"":""}function M(e){return U(e&&e.line)+":"+U(e&&e.column)}function D(e){return M(e&&e.start)+"-"+M(e&&e.end)}function U(e){return e&&"number"==typeof e?e:1}var j=class extends Error{constructor(e,t,n){let r=[null,null],a={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){let e=n.indexOf(":");-1===e?r[1]=n:(r[0]=n.slice(0,e),r[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(a=t.position):"start"in t||"end"in t?a=t:("line"in t||"column"in t)&&(a.start=t)),this.name=P(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.line=a.start.line,this.column=a.start.column,this.position=a,this.source=r[0],this.ruleId=r[1]}};j.prototype.file="",j.prototype.name="",j.prototype.reason="",j.prototype.message="",j.prototype.stack="",j.prototype.fatal=null,j.prototype.column=null,j.prototype.line=null,j.prototype.source=null,j.prototype.ruleId=null,j.prototype.position=null;var F=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');B(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,l=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),l>-1&&(e.charCodeAt(o)===t.charCodeAt(l--)?l<0&&(a=o):(l=-1,a=i));return r===a?a=i:a<0&&(a=e.length),e.slice(r,a)},z=function(...e){let t,n=-1;for(;++n<e.length;)B(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){B(e);let t=47===e.charCodeAt(0),n=function(e,t){let n,r,a="",o=0,i=-1,l=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i!==s-1&&1!==l)if(i!==s-1&&2===l){if(a.length<2||2!==o||46!==a.charCodeAt(a.length-1)||46!==a.charCodeAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=s,l=0;continue}}else if(a.length>0){a="",o=0,i=s,l=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,s):a=e.slice(i+1,s),o=s-i-1;i=s,l=0}else 46===n&&l>-1?l++:l=-1}return a}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)};function B(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function H(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}var V=["history","path","basename","stem","extname","dirname"],W=class{constructor(e){let t;t=e?"string"==typeof e||function(e){return(0,_.default)(e)}(e)?{value:e}:H(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd="/";let n,r=-1;for(;++r<V.length;){let e=V[r];e in t&&null!=t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)V.includes(n)||(this[n]=t[n])}get path(){return this.history[this.history.length-1]}set path(e){H(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!H(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){let e=t.charCodeAt(n+2);if(70===e||102===e){let e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),Y(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?function(e){if(B(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)}(this.path):void 0}set dirname(e){$(this.basename,"dirname"),this.path=z(e||"",this.basename)}get basename(){return"string"==typeof this.path?F(this.path):void 0}set basename(e){Y(e,"basename"),G(e,"basename"),this.path=z(this.dirname||"",e)}get extname(){return"string"==typeof this.path?function(e){B(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){let l=e.charCodeAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}return o<0||r<0||0===i||1===i&&o===r-1&&o===a+1?"":e.slice(o,r)}(this.path):void 0}set extname(e){if(G(e,"extname"),$(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=z(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?F(this.path,this.extname):void 0}set stem(e){Y(e,"stem"),G(e,"stem"),this.path=z(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){let r=new j(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=null,r}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}};function G(e,t){if(e&&e.includes("/"))throw new Error("`"+t+"` cannot be a path: did not expect `/`")}function Y(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function $(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function X(e){if(e)throw e}var q=y(E(),1),K=y(T(),1);function J(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var Q=function e(){let t,n=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){let l=e[++n],s=-1;if(o)r(o);else{for(;++s<t.length;)null==i[s]&&(i[s]=t[s]);t=i,l?function(e,t){let n;return function(...t){let o,i=e.length>t.length;i&&t.push(r);try{o=e.apply(this,t)}catch(e){let t=e;if(i&&n)throw t;return r(t)}i||(o instanceof Promise?o.then(a,r):o instanceof Error?r(o):a(o))};function r(e,...r){n||(n=!0,t(e,...r))}function a(e){r(null,e)}}(l,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}(),r=[],a={},o=-1;return i.data=function(e,n){return"string"==typeof e?2===arguments.length?(re("data",t),a[e]=n,i):Z.call(a,e)&&a[e]||null:e?(re("data",t),a=e,i):a},i.Parser=void 0,i.Compiler=void 0,i.freeze=function(){if(t)return i;for(;++o<r.length;){let[e,...t]=r[o];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let a=e.call(i,...t);"function"==typeof a&&n.use(a)}return t=!0,o=Number.POSITIVE_INFINITY,i},i.attachers=r,i.use=function(e,...n){let o;if(re("use",t),null!=e)if("function"==typeof e)u(e,...n);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?c(e):s(e)}return o&&(a.settings=Object.assign(a.settings||{},o)),i;function l(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){let[t,...n]=e;u(t,...n)}else s(e)}}function s(e){c(e.plugins),e.settings&&(o=Object.assign(o||{},e.settings))}function c(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)l(e[t])}}function u(e,t){let n,a=-1;for(;++a<r.length;)if(r[a][0]===e){n=r[a];break}n?(J(n[1])&&J(t)&&(t=(0,K.default)(!0,n[1],t)),n[1]=t):r.push([...arguments])}},i.parse=function(e){i.freeze();let t=ie(e),n=i.Parser;return te("parse",n),ee(n,"parse")?new n(String(t),t).parse():n(String(t),t)},i.stringify=function(e,t){i.freeze();let n=ie(t),r=i.Compiler;return ne("stringify",r),ae(e),ee(r,"compile")?new r(e,n).compile():r(e,n)},i.run=function(e,t,r){if(ae(e),i.freeze(),!r&&"function"==typeof t&&(r=t,t=void 0),!r)return new Promise(a);function a(a,o){n.run(e,ie(t),function(t,n,i){n=n||e,t?o(t):a?a(n):r(null,n,i)})}a(null,r)},i.runSync=function(e,t){let n,r;return i.run(e,t,function(e,t){X(e),n=t,r=!0}),oe("runSync","run",r),n},i.process=function(e,t){if(i.freeze(),te("process",i.Parser),ne("process",i.Compiler),!t)return new Promise(n);function n(n,r){let a=ie(e);function o(e,a){e||!a?r(e):n?n(a):t(null,a)}i.run(i.parse(a),a,(e,t,n)=>{if(!e&&t&&n){let r=i.stringify(t,n);null==r||(function(e){return"string"==typeof e||(0,q.default)(e)}(r)?n.value=r:n.result=r),o(e,n)}else o(e)})}n(null,t)},i.processSync=function(e){let t;i.freeze(),te("processSync",i.Parser),ne("processSync",i.Compiler);let n=ie(e);return i.process(n,function(e){t=!0,X(e)}),oe("processSync","process",t),n},i;function i(){let t=e(),n=-1;for(;++n<r.length;)t.use(...r[n]);return t.data((0,K.default)(!0,{},a)),t}}().freeze(),Z={}.hasOwnProperty;function ee(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(Z.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function te(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function ne(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function re(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ae(e){if(!J(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function oe(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ie(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new W(e)}var le={};function se(e,t,n){if(function(e){return!(!e||"object"!=typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ce(e.children,t,n)}return Array.isArray(e)?ce(e,t,n):""}function ce(e,t,n){let r=[],a=-1;for(;++a<e.length;)r[a]=se(e[a],t,n);return r.join("")}function ue(e,t,n,r){let a,o=e.length,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),[].splice.apply(e,a);else for(n&&[].splice.apply(e,[t,n]);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),[].splice.apply(e,a),i+=1e4,t+=1e4}function fe(e,t){return e.length>0?(ue(e,e.length,0,t),e):t}var de={}.hasOwnProperty;function pe(e){let t={},n=-1;for(;++n<e.length;)me(t,e[n]);return t}function me(e,t){let n;for(n in t){let r,a=(de.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];for(r in o){de.call(a,r)||(a[r]=[]);let e=o[r];he(a[r],Array.isArray(e)?e:e?[e]:[])}}}function he(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ue(e,0,0,r)}var ge=xe(/[A-Za-z]/),ye=xe(/\d/),ve=xe(/[\dA-Fa-f]/),be=xe(/[\dA-Za-z]/),Ee=xe(/[!-/:-@[-`{-~]/),Te=xe(/[#-'*+\--9=?A-Z^-~]/);function Se(e){return null!==e&&(e<32||127===e)}function we(e){return null!==e&&(e<0||32===e)}function Ne(e){return null!==e&&e<-2}function Re(e){return-2===e||-1===e||32===e}var Oe=xe(/\s/),Ce=xe(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/);function xe(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function ke(e,t,n,r){let a=r?r-1:Number.POSITIVE_INFINITY,o=0;return function(r){return Re(r)?(e.enter(n),i(r)):t(r)};function i(r){return Re(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}var Ae={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){if(null!==t)return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ke(e,n,"linePrefix");e.consume(t)},function(t){return e.enter("paragraph"),r(t)});return n;function r(n){let r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,a(n)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Ne(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}},Ie={tokenize:function(e){let t,n,r,a=this,o=[],i=0;return l;function l(t){if(i<o.length){let n=o[i];return a.containerState=n[1],e.attempt(n[0].continuation,s,c)(t)}return c(t)}function s(e){if(i++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,t&&v();let n,r=a.events.length,o=r;for(;o--;)if("exit"===a.events[o][0]&&"chunkFlow"===a.events[o][1].type){n=a.events[o][1].end;break}y(i);let l=r;for(;l<a.events.length;)a.events[l][1].end=Object.assign({},n),l++;return ue(a.events,o+1,0,a.events.slice(r)),a.events.length=l,c(e)}return l(e)}function c(n){if(i===o.length){if(!t)return d(n);if(t.currentConstruct&&t.currentConstruct.concrete)return m(n);a.interrupt=!(!t.currentConstruct||t._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(Le,u,f)(n)}function u(e){return t&&v(),y(i),d(e)}function f(e){return a.parser.lazy[a.now().line]=i!==o.length,r=a.now().offset,m(e)}function d(t){return a.containerState={},e.attempt(Le,p,m)(t)}function p(e){return i++,o.push([a.currentConstruct,a.containerState]),d(e)}function m(r){return null===r?(t&&v(),y(0),void e.consume(r)):(t=t||a.parser.flow(a.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:t}),h(r))}function h(t){return null===t?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(t)):Ne(t)?(e.consume(t),g(e.exit("chunkFlow")),i=0,a.interrupt=void 0,l):(e.consume(t),h)}function g(e,o){let l=a.sliceStream(e);if(o&&l.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(l),a.parser.lazy[e.start.line]){let e=t.events.length;for(;e--;)if(t.events[e][1].start.offset<r&&(!t.events[e][1].end||t.events[e][1].end.offset>r))return;let n,o,l=a.events.length,s=l;for(;s--;)if("exit"===a.events[s][0]&&"chunkFlow"===a.events[s][1].type){if(n){o=a.events[s][1].end;break}n=!0}for(y(i),e=l;e<a.events.length;)a.events[e][1].end=Object.assign({},o),e++;ue(a.events,s+1,0,a.events.slice(l)),a.events.length=e}}function y(t){let n=o.length;for(;n-- >t;){let t=o[n];a.containerState=t[1],t[0].exit.call(a,e)}o.length=t}function v(){t.write([null]),n=void 0,t=void 0,a.containerState._closeFlow=void 0}}},Le={tokenize:function(e,t,n){return ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function _e(e){return null===e||we(e)||Oe(e)?1:Ce(e)?2:void 0}function Pe(e,t,n){let r=[],a=-1;for(;++a<e.length;){let o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var Me={name:"attention",tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,a=this.previous,o=_e(a);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(l){if(l===n)return e.consume(l),i;let s=e.exit("attentionSequence"),c=_e(l),u=!c||2===c&&o||r.includes(l),f=!o||2===o&&c||r.includes(a);return s._open=!!(42===n?u:u&&(o||!f)),s._close=!!(42===n?f:f&&(c||!u)),t(l)}},resolveAll:function(e,t){let n,r,a,o,i,l,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let f=Object.assign({},e[n][1].end),d=Object.assign({},e[u][1].start);De(f,-l),De(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},i={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:d},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},i.end)},e[n][1].end=Object.assign({},o.start),e[u][1].start=Object.assign({},i.end),s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=fe(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=fe(s,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),s=fe(s,Pe(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=fe(s,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=fe(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,ue(e,n-1,u-n+3,s),u=n+s.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function De(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ue={name:"autolink",tokenize:function(e,t,n){let r=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return ge(t)?(e.consume(t),o):Te(t)?s(t):n(t)}function o(e){return 43===e||45===e||46===e||be(e)?i(e):s(e)}function i(t){return 58===t?(e.consume(t),l):(43===t||45===t||46===t||be(t))&&r++<32?(e.consume(t),i):s(t)}function l(t){return 62===t?(e.exit("autolinkProtocol"),d(t)):null===t||32===t||60===t||Se(t)?n(t):(e.consume(t),l)}function s(t){return 64===t?(e.consume(t),r=0,c):Te(t)?(e.consume(t),s):n(t)}function c(e){return be(e)?u(e):n(e)}function u(t){return 46===t?(e.consume(t),r=0,c):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",d(t)):f(t)}function f(t){return(45===t||be(t))&&r++<63?(e.consume(t),45===t?f:u):n(t)}function d(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}},je={tokenize:function(e,t,n){return ke(e,function(e){return null===e||Ne(e)?t(e):n(e)},"linePrefix")},partial:!0},Fe={name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return n(t)};function a(n){return Re(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){return ke(e,e.attempt(Fe,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}},ze={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Ee(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},Be=document.createElement("i");function He(e){let t="&"+e+";";Be.innerHTML=t;let n=Be.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}var Ve={name:"characterReference",tokenize:function(e,t,n){let r,a,o=this,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,a=be,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,a=ve,c):(e.enter("characterReferenceValue"),r=7,a=ye,c(t))}function c(l){let s;return 59===l&&i?(s=e.exit("characterReferenceValue"),a!==be||He(o.sliceSerialize(s))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)):a(l)&&i++<r?(e.consume(l),c):n(l)}}},We={name:"codeFenced",tokenize:function(e,t,n){let r,a=this,o={tokenize:function(e,t,n){let a=0;return ke(e,function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),o(t)},"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(t){return t===r?(e.consume(t),a++,o):a<c?n(t):(e.exit("codeFencedFenceSequence"),ke(e,i,"whitespace")(t))}function i(r){return null===r||Ne(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},i={tokenize:function(e,t,n){let r=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},l=this.events[this.events.length-1],s=l&&"linePrefix"===l[1].type?l[2].sliceSerialize(l[1],!0).length:0,c=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),r=t,u(t)};function u(t){return t===r?(e.consume(t),c++,u):(e.exit("codeFencedFenceSequence"),c<3?n(t):ke(e,f,"whitespace")(t))}function f(t){return null===t||Ne(t)?h(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||we(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ke(e,p,"whitespace")(t)):96===t&&t===r?n(t):(e.consume(t),d)}function p(t){return null===t||Ne(t)?h(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(t))}function m(t){return null===t||Ne(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(t)):96===t&&t===r?n(t):(e.consume(t),m)}function h(n){return e.exit("codeFencedFence"),a.interrupt?t(n):g(n)}function g(t){return null===t?v(t):Ne(t)?e.attempt(i,e.attempt(o,v,s?ke(e,g,"linePrefix",s+1):g),v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Ne(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}},concrete:!0},Ge={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),ke(e,a,"linePrefix",5)(t)};function a(e){let t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?l(t):Ne(t)?e.attempt(Ye,o,l)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Ne(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function l(n){return e.exit("codeIndented"),t(n)}}},Ye={tokenize:function(e,t,n){let r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):Ne(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):ke(e,o,"linePrefix",5)(t)}function o(e){let o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Ne(e)?a(e):n(e)}},partial:!0},$e={name:"codeText",tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):Ne(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||Ne(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),s)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",s(n))}},resolve:function(e){let t,n,r=e.length-4,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}for(t=a-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function Xe(e){let t,n,r,a,o,i,l,s={},c=-1;for(;++c<e.length;){for(;c in s;)c=s[c];if(t=e[c],c&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[c-1][1].type&&(i=t[1]._tokenizer.events,r=0,r<i.length&&"lineEndingBlank"===i[r][1].type&&(r+=2),r<i.length&&"content"===i[r][1].type))for(;++r<i.length&&"content"!==i[r][1].type;)"chunkText"===i[r][1].type&&(i[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,qe(e,c)),c=s[c],l=!0);else if(t[1]._container){for(r=c,n=void 0;r--&&(a=e[r],"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type);)"enter"===a[0]&&(n&&(e[n][1].type="lineEndingBlank"),a[1].type="lineEnding",n=r);n&&(t[1].end=Object.assign({},e[n][1].start),o=e.slice(n,c),o.unshift(t),ue(e,n,c-n+1,o))}}return!l}function qe(e,t){let n,r,a=e[t][1],o=e[t][2],i=t-1,l=[],s=a._tokenizer||o.parser[a.contentType](a.start),c=s.events,u=[],f={},d=-1,p=a,m=0,h=0,g=[h];for(;p;){for(;e[++i][1]!==p;);l.push(i),p._tokenizer||(n=o.sliceStream(p),p.next||n.push(null),r&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=a;++d<c.length;)"exit"===c[d][0]&&"enter"===c[d-1][0]&&c[d][1].type===c[d-1][1].type&&c[d][1].start.line!==c[d][1].end.line&&(h=d+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){let t=c.slice(g[d],g[d+1]),n=l.pop();u.unshift([n,n+t.length-1]),ue(e,n,2,t)}for(d=-1;++d<u.length;)f[m+u[d][0]]=m+u[d][1],m+=u[d][1]-u[d][0]-1;return f}var Ke={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?a(t):Ne(t)?e.check(Je,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return Xe(e),e}},Je={tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ke(e,a,"linePrefix")};function a(a){if(null===a||Ne(a))return n(a);let o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}},partial:!0};function Qe(e,t,n,r,a,o,i,l,s){let c=s||Number.POSITIVE_INFINITY,u=0;return function(t){return 60===t?(e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),f):null===t||41===t||Se(t)?n(t):(e.enter(r),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(t))};function f(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(l),f(t)):null===t||60===t||Ne(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function m(a){return 40===a?++u>c?n(a):(e.consume(a),m):41===a?u--?(e.consume(a),m):(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(a)):null===a||we(a)?u?n(a):(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(a)):Se(a)?n(a):(e.consume(a),92===a?h:m)}function h(t){return 40===t||41===t||92===t?(e.consume(t),m):m(t)}}function Ze(e,t,n,r,a,o){let i,l=this,s=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(f){return null===f||91===f||93===f&&!i||94===f&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs||s>999?n(f):93===f?(e.exit(o),e.enter(a),e.consume(f),e.exit(a),e.exit(r),t):Ne(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(t){return null===t||91===t||93===t||Ne(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),i=i||!Re(t),92===t?f:u)}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function et(e,t,n,r,a,o){let i;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,l};function l(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),s(n))}function s(t){return t===i?(e.exit(o),l(i)):null===t?n(t):Ne(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ke(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||Ne(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function tt(e,t){let n;return function r(a){return Ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):Re(a)?ke(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}function nt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var rt={name:"definition",tokenize:function(e,t,n){let r,a=this;return function(t){return e.enter("definition"),Ze.call(a,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return r=nt(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),tt(e,Qe(e,e.attempt(at,ke(e,i,"whitespace"),ke(e,i,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function i(o){return null===o||Ne(o)?(e.exit("definition"),a.parser.defined.includes(r)||a.parser.defined.push(r),t(o)):n(o)}}},at={tokenize:function(e,t,n){return function(t){return we(t)?tt(e,r)(t):n(t)};function r(t){return 34===t||39===t||40===t?et(e,ke(e,a,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function a(e){return null===e||Ne(e)?t(e):n(e)}},partial:!0},ot={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),r};function r(r){return Ne(r)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(r)):n(r)}}},it={name:"headingAtx",tokenize:function(e,t,n){let r=this,a=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(l){return 35===l&&a++<6?(e.consume(l),o):null===l||we(l)?(e.exit("atxHeadingSequence"),r.interrupt?t(l):i(l)):n(l)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||Ne(n)?(e.exit("atxHeading"),t(n)):Re(n)?ke(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||we(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}},resolve:function(e,t){let n,r,a=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),a-2>o&&"whitespace"===e[a][1].type&&(a-=2),"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4),a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},ue(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},lt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],st=["pre","script","style","textarea"],ct={name:"htmlFlow",tokenize:function(e,t,n){let r,a,o,i,l,s=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c};function c(i){return 33===i?(e.consume(i),u):47===i?(e.consume(i),p):63===i?(e.consume(i),r=3,s.interrupt?t:P):ge(i)?(e.consume(i),o=String.fromCharCode(i),a=!0,m):n(i)}function u(a){return 45===a?(e.consume(a),r=2,f):91===a?(e.consume(a),r=5,o="CDATA[",i=0,d):ge(a)?(e.consume(a),r=4,s.interrupt?t:P):n(a)}function f(r){return 45===r?(e.consume(r),s.interrupt?t:P):n(r)}function d(r){return r===o.charCodeAt(i++)?(e.consume(r),i===o.length?s.interrupt?t:O:d):n(r)}function p(t){return ge(t)?(e.consume(t),o=String.fromCharCode(t),m):n(t)}function m(i){return null===i||47===i||62===i||we(i)?47!==i&&a&&st.includes(o.toLowerCase())?(r=1,s.interrupt?t(i):O(i)):lt.includes(o.toLowerCase())?(r=6,47===i?(e.consume(i),h):s.interrupt?t(i):O(i)):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(i):a?y(i):g(i)):45===i||be(i)?(e.consume(i),o+=String.fromCharCode(i),m):n(i)}function h(r){return 62===r?(e.consume(r),s.interrupt?t:O):n(r)}function g(t){return Re(t)?(e.consume(t),g):N(t)}function y(t){return 47===t?(e.consume(t),N):58===t||95===t||ge(t)?(e.consume(t),v):Re(t)?(e.consume(t),y):N(t)}function v(t){return 45===t||46===t||58===t||95===t||be(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),E):Re(t)?(e.consume(t),b):y(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,T):Re(t)?(e.consume(t),E):(l=null,S(t))}function T(t){return null===t||Ne(t)?n(t):t===l?(e.consume(t),w):(e.consume(t),T)}function S(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||we(t)?b(t):(e.consume(t),S)}function w(e){return 47===e||62===e||Re(e)?y(e):n(e)}function N(t){return 62===t?(e.consume(t),R):n(t)}function R(t){return Re(t)?(e.consume(t),R):null===t||Ne(t)?O(t):n(t)}function O(t){return 45===t&&2===r?(e.consume(t),A):60===t&&1===r?(e.consume(t),I):62===t&&4===r?(e.consume(t),M):63===t&&3===r?(e.consume(t),P):93===t&&5===r?(e.consume(t),_):!Ne(t)||6!==r&&7!==r?null===t||Ne(t)?C(t):(e.consume(t),O):e.check(ut,M,C)(t)}function C(t){return e.exit("htmlFlowData"),x(t)}function x(t){return null===t?D(t):Ne(t)?e.attempt({tokenize:k,partial:!0},x,D)(t):(e.enter("htmlFlowData"),O(t))}function k(e,t,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r};function r(e){return s.parser.lazy[s.now().line]?n(e):t(e)}}function A(t){return 45===t?(e.consume(t),P):O(t)}function I(t){return 47===t?(e.consume(t),o="",L):O(t)}function L(t){return 62===t&&st.includes(o.toLowerCase())?(e.consume(t),M):ge(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),L):O(t)}function _(t){return 93===t?(e.consume(t),P):O(t)}function P(t){return 62===t?(e.consume(t),M):45===t&&2===r?(e.consume(t),P):O(t)}function M(t){return null===t||Ne(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),M)}function D(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},ut={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(je,t,n)}},partial:!0},ft={name:"htmlText",tokenize:function(e,t,n){let r,a,o,i,l=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),S):63===t?(e.consume(t),E):ge(t)?(e.consume(t),R):n(t)}function c(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),a="CDATA[",o=0,h):ge(t)?(e.consume(t),b):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function f(t){return null===t||62===t?n(t):45===t?(e.consume(t),d):p(t)}function d(e){return null===e||62===e?n(e):p(e)}function p(t){return null===t?n(t):45===t?(e.consume(t),m):Ne(t)?(i=p,_(t)):(e.consume(t),p)}function m(t){return 45===t?(e.consume(t),M):p(t)}function h(t){return t===a.charCodeAt(o++)?(e.consume(t),o===a.length?g:h):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),y):Ne(t)?(i=g,_(t)):(e.consume(t),g)}function y(t){return 93===t?(e.consume(t),v):g(t)}function v(t){return 62===t?M(t):93===t?(e.consume(t),v):g(t)}function b(t){return null===t||62===t?M(t):Ne(t)?(i=b,_(t)):(e.consume(t),b)}function E(t){return null===t?n(t):63===t?(e.consume(t),T):Ne(t)?(i=E,_(t)):(e.consume(t),E)}function T(e){return 62===e?M(e):E(e)}function S(t){return ge(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||be(t)?(e.consume(t),w):N(t)}function N(t){return Ne(t)?(i=N,_(t)):Re(t)?(e.consume(t),N):M(t)}function R(t){return 45===t||be(t)?(e.consume(t),R):47===t||62===t||we(t)?O(t):n(t)}function O(t){return 47===t?(e.consume(t),M):58===t||95===t||ge(t)?(e.consume(t),C):Ne(t)?(i=O,_(t)):Re(t)?(e.consume(t),O):M(t)}function C(t){return 45===t||46===t||58===t||95===t||be(t)?(e.consume(t),C):x(t)}function x(t){return 61===t?(e.consume(t),k):Ne(t)?(i=x,_(t)):Re(t)?(e.consume(t),x):O(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,A):Ne(t)?(i=k,_(t)):Re(t)?(e.consume(t),k):(e.consume(t),r=void 0,L)}function A(t){return t===r?(e.consume(t),I):null===t?n(t):Ne(t)?(i=A,_(t)):(e.consume(t),A)}function I(e){return 62===e||47===e||we(e)?O(e):n(e)}function L(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||we(t)?O(t):(e.consume(t),L)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ke(e,P,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function P(t){return e.enter("htmlTextData"),i(t)}function M(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}}},dt={name:"labelEnd",tokenize:function(e,t,n){let r,a,o=this,i=o.events.length;for(;i--;)if(("labelImage"===o.events[i][1].type||"labelLink"===o.events[i][1].type)&&!o.events[i][1]._balanced){r=o.events[i][1];break}return function(t){return r?r._inactive?s(t):(a=o.parser.defined.includes(nt(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(n){return 40===n?e.attempt(pt,t,a?t:s)(n):91===n?e.attempt(mt,t,a?e.attempt(ht,t,s):s)(n):a?t(n):s(n)}function s(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,a,o,i=e.length,l=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(a=i);let s={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[r+l+2][1].end),end:Object.assign({},e[a-2][1].start)};return o=[["enter",s,t],["enter",c,t]],o=fe(o,e.slice(r+1,r+l+3)),o=fe(o,[["enter",u,t]]),o=fe(o,Pe(t.parser.constructs.insideSpan.null,e.slice(r+l+4,a-3),t)),o=fe(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=fe(o,e.slice(a+1)),o=fe(o,[["exit",s,t]]),ue(e,r,e.length,o),e},resolveAll:function(e){let t,n=-1;for(;++n<e.length;)t=e[n][1],("labelImage"===t.type||"labelLink"===t.type||"labelEnd"===t.type)&&(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},pt={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),tt(e,r)};function r(t){return 41===t?i(t):Qe(e,a,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return we(t)?tt(e,o)(t):i(t)}function o(t){return 34===t||39===t||40===t?et(e,tt(e,i),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):i(t)}function i(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},mt={tokenize:function(e,t,n){let r=this;return function(t){return Ze.call(r,e,a,n,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}}},ht={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},gt={name:"labelStartImage",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:dt.resolveAll},yt={name:"labelStartLink",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:dt.resolveAll},vt={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ke(e,t,"linePrefix")}}},bt={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),r=t,o(t)};function o(l){return l===r?(e.enter("thematicBreakSequence"),i(l)):Re(l)?ke(e,o,"whitespace")(l):a<3||null!==l&&!Ne(l)?n(l):(e.exit("thematicBreak"),t(l))}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),o(t))}}},Et={name:"list",tokenize:function(e,t,n){let r=this,a=r.events[r.events.length-1],o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){let a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:ye(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(bt,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return ye(t)&&++i<10?(e.consume(t),l):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(je,r.interrupt?n:c,e.attempt(Tt,f,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,f(e)}function u(t){return Re(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):n(t)}function f(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(je,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ke(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Re(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(St,t,a)(n))});function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ke(e,e.attempt(Et,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)}},Tt={tokenize:function(e,t,n){let r=this;return ke(e,function(e){let a=r.events[r.events.length-1];return!Re(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},St={tokenize:function(e,t,n){let r=this;return ke(e,function(e){let a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)},partial:!0},wt={name:"setextUnderline",tokenize:function(e,t,n){let r,a,o=this,i=o.events.length;for(;i--;)if("lineEnding"!==o.events[i][1].type&&"linePrefix"!==o.events[i][1].type&&"content"!==o.events[i][1].type){a="paragraph"===o.events[i][1].type;break}return function(t){return o.parser.lazy[o.now().line]||!o.interrupt&&!a?n(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),r=t,l(t))};function l(t){return t===r?(e.consume(t),l):(e.exit("setextHeadingLineSequence"),ke(e,s,"lineSuffix")(t))}function s(r){return null===r||Ne(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),!a&&"definition"===e[o][1].type&&(a=o);let i={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[a][1].end)):e[n][1]=i,e.push(["exit",i,t]),e}},Nt={tokenize:function(e){let t=this,n=e.attempt(je,function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)},e.attempt(this.parser.constructs.flowInitial,r,ke(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ke,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},Rt={resolveAll:kt()},Ot=xt("string"),Ct=xt("text");function xt(e){return{tokenize:function(t){let n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return s(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return s(e)?(t.exit("data"),a(e)):(t.consume(e),l)}function s(e){if(null===e)return!0;let t=r[e],a=-1;if(t)for(;++a<t.length;){let e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:kt("text"===e?At:void 0)}}function kt(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):(!t[a]||"data"!==t[a][1].type)&&(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function At(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,a=e[n-1][1],o=t.sliceStream(a),i=o.length,l=-1,s=0;for(;i--;){let e=o[i];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)r=!0,s++;else if(-1!==e){i++;break}}if(s){let o={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{line:a.end.line,column:a.end.column-s,offset:a.end.offset-s,_index:a.start._index+i,_bufferIndex:i?l:a.start._bufferIndex+l},end:Object.assign({},a.end)};a.end=Object.assign({},o.start),a.start.offset===a.end.offset?Object.assign(a,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}var It={};h(It,{attentionMarkers:()=>Ft,contentInitial:()=>_t,disable:()=>zt,document:()=>Lt,flow:()=>Mt,flowInitial:()=>Pt,insideSpan:()=>jt,string:()=>Dt,text:()=>Ut});var Lt={42:Et,43:Et,45:Et,48:Et,49:Et,50:Et,51:Et,52:Et,53:Et,54:Et,55:Et,56:Et,57:Et,62:Fe},_t={91:rt},Pt={[-2]:Ge,[-1]:Ge,32:Ge},Mt={35:it,42:bt,45:[wt,bt],60:ct,61:wt,95:bt,96:We,126:We},Dt={38:Ve,92:ze},Ut={[-5]:vt,[-4]:vt,[-3]:vt,33:gt,38:Ve,42:Me,60:[Ue,ft],91:yt,92:[ot,ze],93:dt,95:Me,96:$e},jt={null:[Me,Rt]},Ft={null:[42,95]},zt={null:[]},Bt=/[\0\t\n\r]/g;function Ht(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}var Vt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wt(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return Ht(n.slice(t?2:1),t?16:10)}return He(n)||e}var Gt={}.hasOwnProperty,Yt=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(E),autolinkProtocol:d,autolinkEmail:d,atxHeading:i(y),blockQuote:i(function(){return{type:"blockquote",children:[]}}),characterEscape:d,characterReference:d,codeFenced:i(g),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(g,l),codeText:i(function(){return{type:"inlineCode",value:""}},l),codeTextData:d,data:d,codeFlowValue:d,definition:i(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:i(v),hardBreakTrailing:i(v),htmlFlow:i(b,l),htmlFlowData:d,htmlText:i(b,l),htmlTextData:d,image:i(function(){return{type:"image",title:null,url:"",alt:null}}),label:l,link:i(E),listItem:i(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){o("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),a("expectingFirstListItemValue"))},listOrdered:i(T,function(){a("expectingFirstListItemValue",!0)}),listUnordered:i(T),paragraph:i(function(){return{type:"paragraph",children:[]}}),reference:function(){a("referenceType","collapsed")},referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(y),strong:i(function(){return{type:"strong",children:[]}}),thematicBreak:i(function(){return{type:"thematicBreak"}})},exit:{atxHeading:c(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];if(!t.depth){let n=this.sliceSerialize(e).length;t.depth=n}},autolink:c(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:c(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=o("characterReferenceType");r?(t=Ht(n,"characterReferenceMarkerNumeric"===r?10:16),a("characterReferenceType")):t=He(n);let i=this.stack.pop();i.value+=t,i.position.end=$t(e.end)},codeFenced:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),a("flowCodeInside")}),codeFencedFence:function(){o("flowCodeInside")||(this.buffer(),a("flowCodeInside",!0))},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:p,data:p,definition:c(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=nt(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:c(),hardBreakEscape:c(m),hardBreakTrailing:c(m),htmlFlow:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:p,htmlText:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:p,image:c(function(){let e=this.stack[this.stack.length-1];if(o("inReference")){let t=o("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;a("referenceType")}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];a("inReference",!0),"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Vt,Wt)}(t),n.identifier=nt(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(o("atHardBreak"))return n.children[n.children.length-1].position.end=$t(e.end),void a("atHardBreak");!o("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(d.call(this,e),p.call(this,e))},link:c(function(){let e=this.stack[this.stack.length-1];if(o("inReference")){let t=o("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;a("referenceType")}),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=nt(this.sliceSerialize(e)).toLowerCase(),a("referenceType","full")},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){a("inReference")},setextHeading:c(function(){a("setextHeadingSlurpLineEnding")}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){a("setextHeadingSlurpLineEnding",!0)},strong:c(),thematicBreak:c()}};Xt(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let n={type:"root",children:[]},i={stack:[n],tokenStack:[],config:t,enter:s,exit:u,buffer:l,resume:f,setData:a,getData:o},c=[],d=-1;for(;++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?c.push(d):d=r(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Gt.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||Kt).call(i,void 0,e[0])}for(n.position={start:$t(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$t(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)n=t.transforms[d](n)||n;return n};function r(e,t,n){let r,a,o,i,l=t-1,s=-1,c=!1;for(;++l<=n;){let t=e[l];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?s++:s--,i=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(r&&!i&&!s&&!o&&(o=l),i=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(i=void 0),!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=l;for(a=void 0;i--;){let t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||l,0,["exit",r,t[2]]),l++,n++}"listItemPrefix"===t[1].type&&(r={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(l,0,["enter",r,t[2]]),l++,n++,o=void 0,i=!0)}}return e[t][1]._spread=c,n}function a(e,t){n[e]=t}function o(e){return n[e]}function i(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:$t(t.start)},e}function c(e){return function(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+P({start:e.start,end:e.end})+"): it’s not open");return r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Kt).call(this,e,r[0])),n.position.end=$t(e.end),n}function f(){return function(e,t){return se(e,"boolean"!=typeof le.includeImageAlt||le.includeImageAlt,"boolean"!=typeof le.includeHtml||le.includeHtml)}(this.stack.pop())}function d(e){let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];(!n||"text"!==n.type)&&(n={type:"text",value:""},n.position={start:$t(e.start)},t.children.push(n)),this.stack.push(n)}function p(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$t(e.end)}function m(){a("atHardBreak",!0)}function h(e){a("characterReferenceType",e.type)}function g(){return{type:"code",lang:null,meta:null,value:""}}function y(){return{type:"heading",depth:void 0,children:[]}}function v(){return{type:"break"}}function b(){return{type:"html",value:""}}function E(){return{type:"link",title:null,url:"",children:[]}}function T(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!Xe(e););return e}(function(e={}){let t={defined:[],lazy:{},constructs:pe([It].concat(e.extensions||[])),content:n(Ae),document:n(Ie),flow:n(Nt),string:n(Ot),text:n(Ct)};return t;function n(e){return function(n){return function(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),a={},o=[],i=[],l=[],s={consume:function(e){Ne(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=d(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){let t=l.pop();return t.end=d(),c.events.push(["exit",t,c]),t},attempt:h(function(e,t){g(e,t.from)}),check:h(m),interrupt:h(m,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,a=[];for(;++r<e.length;){let o,i=e[r];if("string"==typeof i)o=i;else switch(i){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&n)continue;o=" ";break;default:o=String.fromCharCode(i)}n=-2===i,a.push(o)}return a.join("")}(f(e),t)},now:d,defineSkip:function(e){a[e.line]=e.column,y()},write:function(e){return i=fe(i,e),function(){let e;for(;r._index<i.length;){let t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)p(t.charCodeAt(r._bufferIndex));else p(t)}}(),null!==i[i.length-1]?[]:(g(t,0),c.events=Pe(o,c.events,c),c.events)}},u=t.tokenize.call(c,s);return t.resolveAll&&o.push(t),c;function f(e){return function(e,t){let n,r=t.start._index,a=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;return r===o?n=[e[r].slice(a,i)]:(n=e.slice(r,o),a>-1&&(n[0]=n[0].slice(a)),i>0&&n.push(e[o].slice(0,i))),n}(i,e)}function d(){return Object.assign({},r)}function p(e){u=u(e)}function m(e,t){t.restore()}function h(e,t){return function(n,a,o){let i,u,f,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):(m=n,function(e){let t=null!==e&&m[e],n=null!==e&&m.null;return h([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});var m;function h(e){return i=e,u=0,0===e.length?o:g(e[u])}function g(e){return function(n){return p=function(){let e=d(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(l);return{restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,l=o,y()},from:a}}(),f=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,v,b)(n)}}function v(t){return e(f,p),a}function b(e){return p.restore(),++u<i.length?g(i[u]):o}}}function g(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&ue(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){let l,s,c,u,f,d=[];for(a=n+a.toString(o),c=0,n="",r&&(65279===a.charCodeAt(0)&&c++,r=void 0);c<a.length;){if(Bt.lastIndex=c,l=Bt.exec(a),u=l&&void 0!==l.index?l.index:a.length,f=a.charCodeAt(u),!l){n=a.slice(c);break}if(10===f&&c===u&&e)d.push(-3),e=void 0;else switch(e&&(d.push(-5),e=void 0),c<u&&(d.push(a.slice(c,u)),t+=u-c),f){case 0:d.push(65533),t++;break;case 9:for(s=4*Math.ceil(t/4),d.push(-2);t++<s;)d.push(-1);break;case 10:d.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return i&&(e&&d.push(-5),n&&d.push(n),d.push(null)),d}}()(e,t,!0))))};function $t(e){return{line:e.line,column:e.column,offset:e.offset}}function Xt(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Xt(e,r):qt(e,r)}}function qt(e,t){let n;for(n in t)if(Gt.call(t,n))if("canContainEols"===n){let r=t[n];r&&e[n].push(...r)}else if("transforms"===n){let r=t[n];r&&e[n].push(...r)}else if("enter"===n||"exit"===n){let r=t[n];r&&Object.assign(e[n],r)}}function Kt(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+P({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+P({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+P({start:t.start,end:t.end})+") is still open")}var Jt=function(e){Object.assign(this,{Parser:t=>{let n=this.data("settings");return Yt(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})};function Qt(e){let t=[],n=-1,r=0,a=0;for(;++n<e.length;){let o=e.charCodeAt(n),i="";if(37===o&&be(e.charCodeAt(n+1))&&be(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Zt(e,t){let n,r=String(t.identifier).toUpperCase(),a=Qt(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);-1===o?(e.footnoteOrder.push(r),e.footnoteCounts[r]=1,n=e.footnoteOrder.length):(e.footnoteCounts[r]++,n=o+1);let i=e.footnoteCounts[r],l={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+a,id:e.clobberPrefix+"fnref-"+a+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,l);let s={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,s),e.applyData(t,s)}function en(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};let a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});let i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function tn(e){let t=e.spread;return null==t?e.children.length>1:t}var nn=an("start"),rn=an("end");function an(e){return function(t){let n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}function on(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),a=0,o=[];for(;r;)o.push(ln(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(ln(t.slice(a),a>0,!1)),o.join("")}function ln(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}var sn={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,a={};r&&(a.className=["language-"+r]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:Zt,footnote:function(e,t){let n=e.footnoteById,r=1;for(;r in n;)r++;let a=String(r);return n[a]={type:"footnoteDefinition",identifier:a,children:[{type:"paragraph",children:t.children}],position:t.position},Zt(e,{type:"footnoteReference",identifier:a,position:t.position})},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){let n=e.definition(t.identifier);if(!n)return en(e,t);let r={src:Qt(n.url||""),alt:t.alt};null!=n.title&&(r.title=n.title);let a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){let n={src:Qt(t.url)};null!=t.alt&&(n.alt=t.alt),null!=t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=e.definition(t.identifier);if(!n)return en(e,t);let r={href:Qt(n.url||"")};null!=n.title&&(r.title=n.title);let a={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){let n={href:Qt(t.url)};null!=t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=tn(n[r])}return t}(n):tn(t),o={},i=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){let e=r[l];(a||0!==l||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}let s=r[r.length-1];s&&(a||"element"!==s.type||"p"!==s.tagName)&&i.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},r=e.all(t),a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){let e=r[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),a=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=nn(t.children[1]),i=rn(t.children[t.children.length-1]);o.line&&i.line&&(r.position={start:o,end:i}),a.push(r)}let o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length,l=-1,s=[];for(;++l<i;){let n=t.children[l],r={},i=o?o[l]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(t,c)),s.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:on(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:cn,yaml:cn,definition:cn,footnoteDefinition:cn};function cn(){return null}var un=function(e){if(null==e)return dn;if("string"==typeof e)return function(e){return fn(function(t){return t&&t.type===e})}(e);if("object"==typeof e)return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=un(e[n]);return fn(function(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1})}(e):function(e){return fn(function(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0})}(e);if("function"==typeof e)return fn(e);throw new Error("Expected function, string, or object as test")};function fn(e){return function(t,...n){return!!(t&&"object"==typeof t&&"type"in t&&e.call(this,t,...n))}}function dn(){return!0}var pn=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);let a=un(t),o=r?-1:1;!function e(i,l,s){let c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){let e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,f,d=[];if((!t||a(i,l,s[s.length-1]||null))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:[e]}(n(i,s)),!1===d[0]))return d;if(i.children&&"skip"!==d[0])for(u=(r?i.children.length:-1)+o,f=s.concat(i);u>-1&&u<i.children.length;){if(c=e(i.children[u],u,f)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+o}return d}}(e,void 0,[])()}(e,t,function(e,t){let r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)},r)},mn={}.hasOwnProperty;function hn(e){return String(e||"").toUpperCase()}var gn={}.hasOwnProperty;function yn(e,t){e.position&&(t.position=function(e){return{start:nn(e),end:rn(e)}}(e))}function vn(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&a&&(n.properties=d(d({},n.properties),a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function bn(e,t,n){let r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return gn.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?p(d({},t),{children:En(e,t)}):t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){let n=t.data||{},r=!("value"in t)||gn.call(n,"hProperties")||gn.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:En(e,t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}(e,t)}function En(e,t){let n=[];if("children"in t){let r=t.children,a=-1;for(;++a<r.length;){let o=bn(e,r[a],t);if(o){if(a&&"break"===r[a-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&"element"===o.type)){let e=o.children[0];e&&"text"===e.type&&(e.value=e.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function Tn(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Sn(e,t){let n=function(e,t){let n=t||{},r={};return o.dangerous=n.allowDangerousHtml||!1,o.clobberPrefix=null==n.clobberPrefix?"user-content-":n.clobberPrefix,o.footnoteLabel=n.footnoteLabel||"Footnotes",o.footnoteLabelTagName=n.footnoteLabelTagName||"h2",o.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},o.footnoteBackLabel=n.footnoteBackLabel||"Back to content",o.unknownHandler=n.unknownHandler,o.passThrough=n.passThrough,o.handlers=d(d({},sn),n.handlers),o.definition=function(e){let t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return pn(e,"definition",e=>{let n=hn(e.identifier);n&&!mn.call(t,n)&&(t[n]=e)}),function(e){let n=hn(e);return n&&mn.call(t,n)?t[n]:null}}(e),o.footnoteById=r,o.footnoteOrder=[],o.footnoteCounts={},o.patch=yn,o.applyData=vn,o.one=function(e,t){return bn(o,e,t)},o.all=function(e){return En(o,e)},o.wrap=Tn,o.augment=a,pn(e,"footnoteDefinition",e=>{let t=String(e.identifier).toUpperCase();gn.call(r,t)||(r[t]=e)}),o;function a(e,t){if(e&&"data"in e&&e.data){let n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties=d(d({},t.properties),n.hProperties)),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){let n="type"in e?e:{position:e};(function(e){return!(e&&e.position&&e.position.start&&e.position.start.line&&e.position.start.column&&e.position.end&&e.position.end.line&&e.position.end.column)})(n)||(t.position={start:nn(n),end:rn(n)})}return t}function o(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),a(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}(e,t),r=n.one(e,null),a=function(e){let t=[],n=-1;for(;++n<e.footnoteOrder.length;){let r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;let a=e.all(r),o=String(r.identifier).toUpperCase(),i=Qt(o.toLowerCase()),l=0,s=[];for(;++l<=e.footnoteCounts[o];){let t={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};l>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(l)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(t)}let c=a[a.length-1];if(c&&"element"===c.type&&"p"===c.tagName){let e=c.children[c.children.length-1];e&&"text"===e.type?e.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else a.push(...s);let u={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+i},children:e.wrap(a,!0)};e.patch(r,u),t.push(u)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:p(d({},JSON.parse(JSON.stringify(e.footnoteLabelProperties))),{id:"footnote-label"}),children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return a&&r.children.push({type:"text",value:"\n"},a),Array.isArray(r)?{type:"root",children:r}:r}var wn=function(e,t){return e&&"run"in e?function(e,t){return(n,r,a)=>{e.run(Sn(n,t),r,e=>{a(e)})}}(e,t):function(e){return t=>Sn(t,e)}(e||t)},Nn=y(N(),1),Rn=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};function On(e,t){let n={},r={},a=-1;for(;++a<e.length;)Object.assign(n,e[a].property),Object.assign(r,e[a].normal);return new Rn(n,r,t)}function Cn(e){return e.toLowerCase()}Rn.prototype.property={},Rn.prototype.normal={},Rn.prototype.space=null;var xn=class{constructor(e,t){this.property=e,this.attribute=t}};xn.prototype.space=null,xn.prototype.boolean=!1,xn.prototype.booleanish=!1,xn.prototype.overloadedBoolean=!1,xn.prototype.number=!1,xn.prototype.commaSeparated=!1,xn.prototype.spaceSeparated=!1,xn.prototype.commaOrSpaceSeparated=!1,xn.prototype.mustUseProperty=!1,xn.prototype.defined=!1;var kn={};h(kn,{boolean:()=>In,booleanish:()=>Ln,commaOrSpaceSeparated:()=>Un,commaSeparated:()=>Dn,number:()=>Pn,overloadedBoolean:()=>_n,spaceSeparated:()=>Mn});var An=0,In=jn(),Ln=jn(),_n=jn(),Pn=jn(),Mn=jn(),Dn=jn(),Un=jn();function jn(){return u(2,++An)}var Fn=Object.keys(kn),zn=class extends xn{constructor(e,t,n,r){let a=-1;if(super(e,t),Bn(this,"space",r),"number"==typeof n)for(;++a<Fn.length;){let e=Fn[a];Bn(this,Fn[a],(n&kn[e])===kn[e])}}};function Bn(e,t,n){n&&(e[t]=n)}zn.prototype.defined=!0;var Hn={}.hasOwnProperty;function Vn(e){let t,n={},r={};for(t in e.properties)if(Hn.call(e.properties,t)){let a=e.properties[t],o=new zn(t,e.transform(e.attributes||{},t),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(o.mustUseProperty=!0),n[t]=o,r[Cn(t)]=t,r[Cn(o.attribute)]=t}return new Rn(n,r,e.space)}var Wn=Vn({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Gn=Vn({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Yn(e,t){return t in e?e[t]:t}function $n(e,t){return Yn(e,t.toLowerCase())}var Xn=Vn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:$n,properties:{xmlns:null,xmlnsXLink:null}}),qn=Vn({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Ln,ariaAutoComplete:null,ariaBusy:Ln,ariaChecked:Ln,ariaColCount:Pn,ariaColIndex:Pn,ariaColSpan:Pn,ariaControls:Mn,ariaCurrent:null,ariaDescribedBy:Mn,ariaDetails:null,ariaDisabled:Ln,ariaDropEffect:Mn,ariaErrorMessage:null,ariaExpanded:Ln,ariaFlowTo:Mn,ariaGrabbed:Ln,ariaHasPopup:null,ariaHidden:Ln,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Mn,ariaLevel:Pn,ariaLive:null,ariaModal:Ln,ariaMultiLine:Ln,ariaMultiSelectable:Ln,ariaOrientation:null,ariaOwns:Mn,ariaPlaceholder:null,ariaPosInSet:Pn,ariaPressed:Ln,ariaReadOnly:Ln,ariaRelevant:null,ariaRequired:Ln,ariaRoleDescription:Mn,ariaRowCount:Pn,ariaRowIndex:Pn,ariaRowSpan:Pn,ariaSelected:Ln,ariaSetSize:Pn,ariaSort:null,ariaValueMax:Pn,ariaValueMin:Pn,ariaValueNow:Pn,ariaValueText:null,role:null}}),Kn=Vn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:$n,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dn,acceptCharset:Mn,accessKey:Mn,action:null,allow:null,allowFullScreen:In,allowPaymentRequest:In,allowUserMedia:In,alt:null,as:null,async:In,autoCapitalize:null,autoComplete:Mn,autoFocus:In,autoPlay:In,capture:In,charSet:null,checked:In,cite:null,className:Mn,cols:Pn,colSpan:null,content:null,contentEditable:Ln,controls:In,controlsList:Mn,coords:Pn|Dn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:In,defer:In,dir:null,dirName:null,disabled:In,download:_n,draggable:Ln,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:In,formTarget:null,headers:Mn,height:Pn,hidden:In,high:Pn,href:null,hrefLang:null,htmlFor:Mn,httpEquiv:Mn,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:In,itemId:null,itemProp:Mn,itemRef:Mn,itemScope:In,itemType:Mn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:In,low:Pn,manifest:null,max:null,maxLength:Pn,media:null,method:null,min:null,minLength:Pn,multiple:In,muted:In,name:null,nonce:null,noModule:In,noValidate:In,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:In,optimum:Pn,pattern:null,ping:Mn,placeholder:null,playsInline:In,poster:null,preload:null,readOnly:In,referrerPolicy:null,rel:Mn,required:In,reversed:In,rows:Pn,rowSpan:Pn,sandbox:Mn,scope:null,scoped:In,seamless:In,selected:In,shape:null,size:Pn,sizes:null,slot:null,span:Pn,spellCheck:Ln,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Pn,step:null,style:null,tabIndex:Pn,target:null,title:null,translate:null,type:null,typeMustMatch:In,useMap:null,value:Ln,width:Pn,wrap:null,align:null,aLink:null,archive:Mn,axis:null,background:null,bgColor:null,border:Pn,borderColor:null,bottomMargin:Pn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:In,declare:In,event:null,face:null,frame:null,frameBorder:null,hSpace:Pn,leftMargin:Pn,link:null,longDesc:null,lowSrc:null,marginHeight:Pn,marginWidth:Pn,noResize:In,noHref:In,noShade:In,noWrap:In,object:null,profile:null,prompt:null,rev:null,rightMargin:Pn,rules:null,scheme:null,scrolling:Ln,standby:null,summary:null,text:null,topMargin:Pn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Pn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:In,disableRemotePlayback:In,prefix:null,property:null,results:Pn,security:null,unselectable:null}}),Jn=Vn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Yn,properties:{about:Un,accentHeight:Pn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Pn,amplitude:Pn,arabicForm:null,ascent:Pn,attributeName:null,attributeType:null,azimuth:Pn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Pn,by:null,calcMode:null,capHeight:Pn,className:Mn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Pn,diffuseConstant:Pn,direction:null,display:null,dur:null,divisor:Pn,dominantBaseline:null,download:In,dx:null,dy:null,edgeMode:null,editable:null,elevation:Pn,enableBackground:null,end:null,event:null,exponent:Pn,externalResourcesRequired:null,fill:null,fillOpacity:Pn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dn,g2:Dn,glyphName:Dn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Pn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Pn,horizOriginX:Pn,horizOriginY:Pn,id:null,ideographic:Pn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Pn,k:Pn,k1:Pn,k2:Pn,k3:Pn,k4:Pn,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Pn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Pn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Pn,overlineThickness:Pn,paintOrder:null,panose1:null,path:null,pathLength:Pn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Mn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Pn,pointsAtY:Pn,pointsAtZ:Pn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Pn,specularExponent:Pn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Pn,strikethroughThickness:Pn,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Pn,strokeOpacity:Pn,strokeWidth:null,style:null,surfaceScale:Pn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:Pn,tableValues:null,target:null,targetX:Pn,targetY:Pn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,u1:null,u2:null,underlinePosition:Pn,underlineThickness:Pn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Pn,values:null,vAlphabetic:Pn,vMathematical:Pn,vectorEffect:null,vHanging:Pn,vIdeographic:Pn,version:null,vertAdvY:Pn,vertOriginX:Pn,vertOriginY:Pn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Pn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Qn=/^data[-\w.:]+$/i,Zn=/-[a-z]/g,er=/[A-Z]/g;function tr(e){return"-"+e.toLowerCase()}function nr(e){return e.charAt(1).toUpperCase()}var rr={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ar=On([Gn,Wn,Xn,qn,Kn],"html"),or=On([Gn,Wn,Xn,qn,Jn],"svg");function ir(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{pn(t,"element",(t,n,r)=>{let a,o=r;if(e.allowedElements?a=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(a=e.disallowedElements.includes(t.tagName)),!a&&e.allowElement&&"number"==typeof n&&(a=!e.allowElement(t,n,o)),a&&"number"==typeof n)return e.unwrapDisallowed&&t.children?o.children.splice(n,1,...t.children):o.children.splice(n,1),n})}}var lr=y(b(),1),sr=y(O(),1);function cr(e){let t=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}var ur=y(x(),1).default,fr={}.hasOwnProperty,dr=new Set(["table","thead","tbody","tfoot","tr"]);function pr(e,t){let n,r=[],a=-1;for(;++a<t.children.length;)n=t.children[a],"element"===n.type?r.push(mr(e,n,a,t)):"text"===n.type?("element"!==t.type||!dr.has(t.tagName)||!cr(n))&&r.push(n.value):"raw"===n.type&&!e.options.skipHtml&&r.push(n.value);return r}function mr(e,t,n,r){let a,o=e.options,i=void 0===o.transformLinkUri?I:o.transformLinkUri,l=e.schema,s=t.tagName,c={},u=l;if("html"===l.space&&"svg"===s&&(u=or,e.schema=u),t.properties)for(a in t.properties)fr.call(t.properties,a)&&gr(c,a,t.properties[a],e);("ol"===s||"ul"===s)&&e.listDepth++;let f=pr(e,t);("ol"===s||"ul"===s)&&e.listDepth--,e.schema=l;let d=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=o.components&&fr.call(o.components,s)?o.components[s]:s,m="string"==typeof p||p===lr.default.Fragment;if(!sr.default.isValidElementType(p))throw new TypeError(`Component for name \`${s}\` not defined or is not renderable`);if(c.key=n,"a"===s&&o.linkTarget&&(c.target="function"==typeof o.linkTarget?o.linkTarget(String(c.href||""),t.children,"string"==typeof c.title?c.title:null):o.linkTarget),"a"===s&&i&&(c.href=i(String(c.href||""),t.children,"string"==typeof c.title?c.title:null)),!m&&"code"===s&&"element"===r.type&&"pre"!==r.tagName&&(c.inline=!0),!m&&("h1"===s||"h2"===s||"h3"===s||"h4"===s||"h5"===s||"h6"===s)&&(c.level=Number.parseInt(s.charAt(1),10)),"img"===s&&o.transformImageUri&&(c.src=o.transformImageUri(String(c.src||""),String(c.alt||""),"string"==typeof c.title?c.title:null)),!m&&"li"===s&&"element"===r.type){let e=function(e){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}(t);c.checked=e&&e.properties?!!e.properties.checked:null,c.index=hr(r,t),c.ordered="ol"===r.tagName}return!m&&("ol"===s||"ul"===s)&&(c.ordered="ol"===s,c.depth=e.listDepth),("td"===s||"th"===s)&&(c.align&&(c.style||(c.style={}),c.style.textAlign=c.align,delete c.align),m||(c.isHeader="th"===s)),!m&&"tr"===s&&"element"===r.type&&(c.isHeader="thead"===r.tagName),o.sourcePos&&(c["data-sourcepos"]=function(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}(d)),!m&&o.rawSourcePos&&(c.sourcePosition=t.position),!m&&o.includeElementIndex&&(c.index=hr(r,t),c.siblingCount=hr(r)),m||(c.node=t),f.length>0?lr.default.createElement(p,c,f):lr.default.createElement(p,c)}function hr(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&r++;return r}function gr(e,t,n,r){let a=function(e,t){let n=Cn(t),r=t,a=xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Qn.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(Zn,nr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Zn.test(e)){let n=e.replace(er,tr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=zn}return new a(r,t)}(r.schema,t),o=n;null==o||o!=o||(Array.isArray(o)&&(o=a.commaSeparated?function(e,t){let n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(o):function(e){return e.join(" ").trim()}(o)),"style"===a.property&&"string"==typeof o&&(o=function(e){let t={};try{ur(e,function(e,n){let r="-ms-"===e.slice(0,4)?`ms-${e.slice(4)}`:e;t[r.replace(/-([a-z])/g,yr)]=n})}catch(e){}return t}(o)),a.space&&a.property?e[fr.call(rr,a.property)?rr[a.property]:a.property]=o:a.attribute&&(e[a.attribute]=o))}function yr(e,t){return t.toUpperCase()}var vr={}.hasOwnProperty,br={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function Er(e){for(let t in br)if(vr.call(br,t)&&vr.call(e,t)){let e=br[t];console.warn(`[react-markdown] Warning: please ${e.to?`use \`${e.to}\` instead of`:"remove"} \`${t}\` (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#${e.id}> for more info)`),delete br[t]}let t=Q().use(Jt).use(e.remarkPlugins||[]).use(wn,p(d({},e.remarkRehypeOptions),{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(ir,e),n=new W;"string"==typeof e.children?n.value=e.children:null!=e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);let r=t.runSync(t.parse(n),n);if("root"!==r.type)throw new TypeError("Expected a `root` node");let a=L.default.createElement(L.default.Fragment,{},pr({options:e,schema:ar,listDepth:0},r));return e.className&&(a=L.default.createElement("div",{className:e.className},a)),a}return Er.propTypes={children:Nn.default.string,className:Nn.default.string,allowElement:Nn.default.func,allowedElements:Nn.default.arrayOf(Nn.default.string),disallowedElements:Nn.default.arrayOf(Nn.default.string),unwrapDisallowed:Nn.default.bool,remarkPlugins:Nn.default.arrayOf(Nn.default.oneOfType([Nn.default.object,Nn.default.func,Nn.default.arrayOf(Nn.default.oneOfType([Nn.default.bool,Nn.default.string,Nn.default.object,Nn.default.func,Nn.default.arrayOf(Nn.default.any)]))])),rehypePlugins:Nn.default.arrayOf(Nn.default.oneOfType([Nn.default.object,Nn.default.func,Nn.default.arrayOf(Nn.default.oneOfType([Nn.default.bool,Nn.default.string,Nn.default.object,Nn.default.func,Nn.default.arrayOf(Nn.default.any)]))])),sourcePos:Nn.default.bool,rawSourcePos:Nn.default.bool,skipHtml:Nn.default.bool,includeElementIndex:Nn.default.bool,transformLinkUri:Nn.default.oneOfType([Nn.default.func,Nn.default.bool]),linkTarget:Nn.default.oneOfType([Nn.default.func,Nn.default.string]),transformImageUri:Nn.default.func,components:Nn.default.object},(e=>g(t({},"__esModule",{value:!0}),e))(k)})()}));const Fc=["node","inline","className","children"];function zc({solution:e}){return c.createElement("div",{className:"grid grid-cols-1 gap-2"},c.createElement(jc,{children:e.description,components:{code(e){let{inline:t,className:n,children:r}=e,a=Ce(e,Fc);const o=/language-(\w+)/.exec(n||"");return t?c.createElement("code",Ne({},a,{className:n,style:{background:"rgba(255,255,255,0.75)",padding:"0.15rem 0.25rem"}}),r):c.createElement(Il,Ne({},a,{language:o?o[1]:null,children:String(r).replace(/\n$/,""),customStyle:{margin:"0.5rem 0",background:"rgba(255,255,255,0.75)",padding:"0.25rem 0.5rem",overflowX:"scroll"}}))}}}),e.action_description&&c.createElement("p",null,e.action_description),c.createElement("ul",{className:"grid grid-cols-1 gap-1 text-sm"},Object.entries(e.links).map(([e,t],n)=>c.createElement("li",{key:n},c.createElement("a",{href:t,target:"_blank",className:"underline text-emerald-700 hover:text-emerald-800"},e)))))}function Bc({solution:e}){const[t,n]=c.useState(!1),[r,a]=c.useState(null);function o(e){e.preventDefault(),location.reload()}return c.createElement(c.Fragment,null,null===r&&c.createElement(c.Fragment,null,c.createElement(Uc,{onClick:async function(){if(!t)try{if(n(!0),!e.execute_endpoint)return;const t=await fetch(e.execute_endpoint,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({solution:e.class,parameters:e.run_parameters})});a(t.status>=200&&t.status<300)}catch(e){console.error(e),a(!1)}finally{n(!1)}},disabled:t,className:"mb-4 inline-flex items-center gap-2 bg-emerald-600 border-emerald-500/25 text-white"},t?c.createElement("span",null,"Running..."):c.createElement(c.Fragment,null,c.createElement(qa,{className:"opacity-50",icon:Ao}),e.run_button_text||"Run")),c.createElement(zc,{solution:e})),!0===r&&c.createElement("p",{className:""},"The solution was executed ",c.createElement("strong",null,"successfully"),".",c.createElement("br",null),c.createElement("a",{href:"#",className:"mt-2 inline-flex items-center gap-2 underline text-emerald-700 hover:text-emerald-800",onClick:o},c.createElement(qa,{icon:bo,className:"text-sm opacity-50"}),"Refresh now")),!1===r&&c.createElement(c.Fragment,null,c.createElement("p",{className:"bg-red-200 px-4 py-2"},"Something ",c.createElement("strong",null,"went wrong"),". Please try refreshing the page and try again.",c.createElement("br",null),c.createElement("a",{href:"#",className:"mt-2 inline-flex items-center gap-2 underline text-red-700 hover:text-red-800",onClick:o},c.createElement(qa,{icon:bo,className:"text-sm opacity-50"}),"Refresh now"))))}function Hc({solution:e,isOpen:t=!1,isCollapsible:n=!0,canExecute:r=!1}){const[a,o]=c.useState(t);return c.createElement("section",null,c.createElement("header",{className:"group mb-4"},n?c.createElement("button",{className:"flex items-center justify-start",onClick:()=>{o(!a)}},c.createElement("span",{className:"w-6 -ml-6"},c.createElement(qa,{icon:Ja,className:"group-hover:opacity-50 opacity-0 text-sm transform transition "+(a?"":"-rotate-90")})),c.createElement("h2",{className:"min-w-0 truncate font-semibold leading-snug"},e.title)):c.createElement("h2",{className:"truncate font-semibold leading-snug"},e.title)),c.createElement("div",{className:a?"":"hidden"},c.createElement(e.is_runnable&&r?Bc:zc,{solution:e}),e.ai_generated&&c.createElement(c.Fragment,null,c.createElement("hr",{className:"border-emerald-500/50 my-4"}),c.createElement("div",{className:"flex items-center gap-x-2 text-green-700"},c.createElement(qa,{fixedWidth:!0,icon:vo}),c.createElement("span",{id:"ai-message",className:"text-xs"},"This solution was ",c.createElement("a",{className:"underline",target:"_blank",href:"https://flareapp.io/docs/ignition/solutions/ai-powered-solutions"},"generated by AI")," and might not be 100% accurate.")))))}function Vc(){const{solutions:e}=c.useContext(be),[t,n]=c.useState(!1),[r,a]=c.useState(!0);return c.useEffect(()=>{try{(async()=>{var t;if(null==(t=e[0])||!t.execute_endpoint)return;const r=await(await fetch(e[0].execute_endpoint.replace("execute-solution","health-check"))).json();n(r.can_execute_commands)})()}catch(e){console.error(e),n(!1)}},[]),c.createElement(c.Fragment,null,r?c.createElement("aside",{id:"solution",className:"relative flex flex-col lg:w-2/5 flex-none"},c.createElement("div",{className:"flex-grow px-6 sm:px-10 py-8 bg-emerald-300 text-gray-800 rounded-bl-lg rounded-br-lg @4xl:rounded-bl-none @4xl:rounded-r-lg"},c.createElement("button",{onClick:()=>a(!1),className:"absolute top-3 right-4 leading-none text-emerald-500 hover:text-emerald-700 text-sm"},c.createElement(qa,{icon:Io})),e.map((n,r)=>c.createElement("div",{key:r},c.createElement(Hc,{solution:n,canExecute:t,isOpen:0===r,isCollapsible:e.length>1}),r!==e.length-1&&c.createElement("hr",{className:"my-4 border-t border-gray-800/20"}))))):c.createElement("button",{onClick:()=>a(!0),className:"\n absolute -top-3 -right-3 z-20\n w-6 h-6 rounded-full flex items-center justify-center\n text-xs bg-emerald-500 text-white hover:shadow-lg\n shadow-md\n active:shadow-sm active:translate-y-px"},c.createElement(qa,{icon:po})))}var Wc={prefix:"fab",iconName:"laravel",icon:[512,512,[],"f3bd","M504.4 115.8a5.72 5.72 0 0 0 -.28-.68 8.52 8.52 0 0 0 -.53-1.25 6 6 0 0 0 -.54-.71 9.36 9.36 0 0 0 -.72-.94c-.23-.22-.52-.4-.77-.6a8.84 8.84 0 0 0 -.9-.68L404.4 55.55a8 8 0 0 0 -8 0L300.1 111h0a8.07 8.07 0 0 0 -.88 .69 7.68 7.68 0 0 0 -.78 .6 8.23 8.23 0 0 0 -.72 .93c-.17 .24-.39 .45-.54 .71a9.7 9.7 0 0 0 -.52 1.25c-.08 .23-.21 .44-.28 .68a8.08 8.08 0 0 0 -.28 2.08V223.2l-80.22 46.19V63.44a7.8 7.8 0 0 0 -.28-2.09c-.06-.24-.2-.45-.28-.68a8.35 8.35 0 0 0 -.52-1.24c-.14-.26-.37-.47-.54-.72a9.36 9.36 0 0 0 -.72-.94 9.46 9.46 0 0 0 -.78-.6 9.8 9.8 0 0 0 -.88-.68h0L115.6 1.07a8 8 0 0 0 -8 0L11.34 56.49h0a6.52 6.52 0 0 0 -.88 .69 7.81 7.81 0 0 0 -.79 .6 8.15 8.15 0 0 0 -.71 .93c-.18 .25-.4 .46-.55 .72a7.88 7.88 0 0 0 -.51 1.24 6.46 6.46 0 0 0 -.29 .67 8.18 8.18 0 0 0 -.28 2.1v329.7a8 8 0 0 0 4 6.95l192.5 110.8a8.83 8.83 0 0 0 1.33 .54c.21 .08 .41 .2 .63 .26a7.92 7.92 0 0 0 4.1 0c.2-.05 .37-.16 .55-.22a8.6 8.6 0 0 0 1.4-.58L404.4 400.1a8 8 0 0 0 4-6.95V287.9l92.24-53.11a8 8 0 0 0 4-7V117.9A8.63 8.63 0 0 0 504.4 115.8zM111.6 17.28h0l80.19 46.15-80.2 46.18L31.41 63.44zm88.25 60V278.6l-46.53 26.79-33.69 19.4V123.5l46.53-26.79zm0 412.8L23.37 388.5V77.32L57.06 96.7l46.52 26.8V338.7a6.94 6.94 0 0 0 .12 .9 8 8 0 0 0 .16 1.18h0a5.92 5.92 0 0 0 .38 .9 6.38 6.38 0 0 0 .42 1v0a8.54 8.54 0 0 0 .6 .78 7.62 7.62 0 0 0 .66 .84l0 0c.23 .22 .52 .38 .77 .58a8.93 8.93 0 0 0 .86 .66l0 0 0 0 92.19 52.18zm8-106.2-80.06-45.32 84.09-48.41 92.26-53.11 80.13 46.13-58.8 33.56zm184.5 4.57L215.9 490.1V397.8L346.6 323.2l45.77-26.15zm0-119.1L358.7 250l-46.53-26.79V131.8l33.69 19.4L392.4 178zm8-105.3-80.2-46.17 80.2-46.16 80.18 46.15zm8 105.3V178L455 151.2l33.68-19.4v91.39h0z"]};function Gc(){const e=c.useContext(be);return c.createElement("span",{className:"py-1 px-4 items-center flex gap-3 rounded-sm ~bg-gray-500/5"},c.createElement(kt,{path:e.exception_class}))}function Yc({githubLink:e}){return c.createElement("section",{className:"flex flex-col flex-grow px-6 sm:px-10 py-8 bg-red-600 text-red-100 shadow-lg gap-3"},c.createElement("h2",{className:"text-xl font-semibold leading-snug"},"Something went wrong in Ignition!"),c.createElement("p",{className:"text-base"},"An error occurred in Ignition's UI. Please open an issue on"," ",c.createElement("a",{href:e,target:"_blank",className:"underline"},"the Ignition GitHub repo")," ","and make sure to include any errors or warnings in the developer console."))}class $c extends c.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state;if(e){var t,n;let r="https://github.com/spatie/ignition/issues";if(e instanceof Error){const t=`\n**Please include some context and the contents of the console in your browser's developer tools.**\n\n## JavaScript Error\n\`\`\`\n${e.stack}\n\`\`\`\n\n## Reproduction Steps\nPlease tell us what you were doing when this error occurred, so we can more easily debug it and find a solution.\n\n1. …\n\n## User Agent\n\`\`\`\n${navigator.userAgent}\n\`\`\`\n`;r=`https://github.com/spatie/ignition/issues/new?title=${e.name}: ${e.message}&labels=bug&body=${encodeURIComponent(t)}`}return(null==(t=(n=this.props).fallbackComponent)?void 0:t.call(n,r))||c.createElement(Yc,{githubLink:r})}return this.props.children}}function Xc(){var e;const t=c.useContext(be),n=t.solutions.length>0,r=!(null==(e=t.context_items.env)||!e.laravel_version);return c.createElement($c,null,c.createElement("section",{className:"@container | bg-white dark:shadow-none dark:bg-gray-800/50 dark:bg-gradient-to-bl from-gray-700/50 via-transparent dark:ring-1 dark:ring-inset dark:ring-white/5 rounded-lg shadow-2xl shadow-gray-500/20"},c.createElement("div",{className:"@4xl:flex items-stretch"},c.createElement("main",{id:"exception",className:"z-10 flex-grow min-w-0"},c.createElement("div",{className:"overflow-hidden"},c.createElement("div",{className:"px-6 @lg:px-10 py-8 overflow-x-auto"},c.createElement("header",{className:"flex items-center justify-between gap-2"},c.createElement(Gc,null),c.createElement("div",{className:"grid grid-flow-col justify-end gap-4 text-sm ~text-gray-500"},c.createElement("span",null,c.createElement("span",{className:"tracking-wider"},"PHP")," ",t.language_version),t.framework_version&&c.createElement("span",{className:"inline-flex items-center gap-1"},c.createElement(qa,{icon:r?Wc:oo}),t.framework_version))),c.createElement(Mc,{exceptionClass:t.exception_class,message:t.exception_message})))),n&&c.createElement(Vc,null))))}const qc=(e,t)=>e.join(t).toLowerCase(),Kc=/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF]+/g,Jc=/[A-Za-z\d]+/g,Qc=new RegExp("[A-Za-z\\d]*?(?:[a-z](?=[A-Z])|[A-Z](?=[A-Z][a-z]))|[A-Za-z\\d]+","g");function Zc(e,{camelCase:t=!0,dictionary:n,separator:r="-",transformer:a=qc}={}){const o=(n?function(e,t){for(let n=0,r=e.length;n<r;n++){const a=e[n],o=t[a]&&String(t[a]);if(void 0!==o){e=e.slice(0,n)+o+e.slice(n+1);const t=o.length-1;n+=t,r+=t}}return e}(String(e),n):String(e)).normalize("NFKD").replace(Kc,"").match(t?Qc:Jc);return o?a?a(o,String(r)):o.join(String(r)):""}function eu({className:e="",githubLink:t}){return c.createElement("div",{className:`${e} flex flex-col gap-2 bg-red-50 dark:bg-red-500/10 px-6 py-4`},c.createElement("h2",{className:"font-semibold leading-snug"},"Something went wrong in Ignition!"),c.createElement("p",{className:"text-base"},"An error occurred in Ignition's UI. Please open an issue on"," ",c.createElement("a",{href:t,target:"_blank",className:"underline"},"the Ignition GitHub repo")," ","and make sure to include any errors or warnings in the developer console."))}function tu({title:e,children:t,anchor:n}){return c.createElement("section",{className:"py-10 ~bg-white px-6 @lg:px-10 min-w-0"},c.createElement("a",{id:`context-${n}`,className:"scroll-target"}),c.createElement("h2",{className:"font-bold text-xs ~text-gray-500 uppercase tracking-wider"},e),c.createElement("div",{className:"mt-3 grid grid-cols-1 gap-10"},c.createElement($c,{fallbackComponent:e=>c.createElement(eu,{githubLink:e})},t)))}var nu=/* @__PURE__ */new Map,ru=/* @__PURE__ */new WeakMap,au=0,ou=c.createContext({inView:[],setInView:Ee});function iu({icon:e,title:t,children:n,anchor:r}){const a=function(e){const{setInView:t}=c.useContext(ou),{ref:n,inView:r}=function({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:a,triggerOnce:o,skip:i,initialInView:l,fallbackInView:s,onChange:u}={}){var f;const[d,p]=c.useState(null),m=c.useRef(),[h,g]=c.useState({inView:!!l,entry:void 0});m.current=u,c.useEffect(()=>{if(i||!d)return;let l;return l=function(e,t,n={},r){if(void 0===window.IntersectionObserver&&void 0!==r){const a=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:a,intersectionRect:a,rootBounds:a}),()=>{}}const{id:a,observer:o,elements:i}=function(e){let t=function(e){return Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{return`${t}_${"root"===t?(n=e.root,n?(ru.has(n)||ru.set(n,(au+=1).toString()),ru.get(n)):"0"):e[t]}`;var n}).toString()}(e),n=nu.get(t);if(!n){const r=/* @__PURE__ */new Map;let a;const o=new IntersectionObserver(t=>{t.forEach(t=>{var n;const o=t.isIntersecting&&a.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach(e=>{e(o,t)})})},e);a=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},nu.set(t,n)}return n}(n);let l=i.get(e)||[];return i.has(e)||i.set(e,l),l.push(t),o.observe(e),function(){l.splice(l.indexOf(t),1),0===l.length&&(i.delete(e),o.unobserve(e)),0===i.size&&(o.disconnect(),nu.delete(a))}}(d,(e,t)=>{g({inView:e,entry:t}),m.current&&m.current(e,t),t.isIntersecting&&o&&l&&(l(),l=void 0)},{root:a,rootMargin:r,threshold:e,trackVisibility:n,delay:t},s),()=>{l&&l()}},[Array.isArray(e)?e.toString():e,d,a,r,o,i,n,s,t]);const y=null==(f=h.entry)?void 0:f.target,v=c.useRef();d||!y||o||i||v.current===y||(v.current=y,g({inView:!!l,entry:void 0}));const b=[p,h.inView,h.entry];return b.ref=b[0],b.inView=b[1],b.entry=b[2],b}({rootMargin:"-45% 0px -45%"});return c.useEffect(()=>{t(r?t=>[...t,e]:t=>t.filter(t=>t!==e))},[r]),n}(t);return c.createElement("div",{ref:a},c.createElement("a",{id:`context-${r}`,className:"scroll-target"}),c.createElement("h1",{className:"mb-2 flex items-center gap-2 font-semibold text-lg ~text-indigo-600"},t,c.createElement("span",{className:"opacity-50 ~text-indigo-600 text-sm"},e)),c.createElement($c,{fallbackComponent:e=>c.createElement(eu,{githubLink:e})},n))}function lu({children:e,className:t="",color:n="gray"}){return c.createElement("div",{className:`${t} ${{red:"~text-red-600 border-red-500/50",orange:"~text-orange-600 border-orange-500/50",green:"~text-emerald-600 border-emerald-500/50",blue:"~text-indigo-600 border-indigo-500/50",purple:"~text-violet-600 border-violet-600/50",gray:"~text-gray-500 border-gray-500/50"}[n]} px-1.5 py-0.5 rounded-sm bg-opacity-20 border text-xs font-medium uppercase tracking-wider`},e)}function su({request:e,requestData:t,headers:n}){const r=c.useMemo(()=>function(e,t,n){if(!e.url||!e.method)return null;const r=[`curl "${e.url}"`];r.push(` -X ${e.method}`),Object.entries(n||{}).map(function([e,t]){r.push(` -H '${e}: ${t}'`)});const a=function(e,t){var n,r;return e.body?null!=(n=t["content-type"])&&null!=(r=n[0])&&r.includes("application/json")?` -d ${JSON.stringify(e.body)}`:` ${Object.entries(e.body||{}).map(function([e,t]){return`-F '${e}=${t}'`}).join(" ")}`:null}(t,n);return a&&r.push(a),r.join(" \\\n").trimEnd().replace(/\s\\$/g,";")}(e,t,n),[e,t,n]);return c.createElement("div",null,c.createElement("div",{className:"text-lg font-semibold flex items-center gap-2"},c.createElement("span",{className:"~text-indigo-600"},e.url),e.method&&c.createElement(lu,{color:"DELETE"==e.method.toUpperCase()?"red":"blue"},e.method.toUpperCase())),r&&c.createElement("div",{className:"mt-2"},c.createElement(xc,{value:r,language:"curl"})))}function cu({items:e}){return c.createElement(Ac,null,Object.entries(e||{}).map(([e,t])=>c.createElement(Ac.Row,{key:e,label:e,value:t})))}var uu=function(e){return null==e},fu=Object.prototype.hasOwnProperty,du=function(e){if(null==e)return!0;if(bs(e)&&(Vl(e)||"string"==typeof e||"function"==typeof e.splice||ns(e)||us(e)||es(e)))return!e.length;var t=Ls(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(ms(e))return!vs(e).length;for(var n in e)if(fu.call(e,n))return!1;return!0},pu=function(){try{var e=Ze(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),mu=Object.prototype.hasOwnProperty,hu=function(e,t,n){var r=e[t];mu.call(e,t)&&ot(r,n)&&(void 0!==n||t in e)||function(e,t,n){"__proto__"==t&&pu?pu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}(e,t,n)},gu=function(e,t,n,r){if(!Ge(e))return e;for(var a=-1,o=(t=Qs(t,e)).length,i=o-1,l=e;null!=l&&++a<o;){var s=Zs(t[a]),c=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(a!=i){var u=l[s];void 0===(c=r?r(u,s,l):void 0)&&(c=Ge(u)?u:as(t[a+1])?[]:{})}hu(l,s,c),l=l[s]}return e},yu=hs(Object.getPrototypeOf,Object),vu=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Hl(t,Xl(e)),e=yu(e);return t}:Gl,bu=Object.prototype.hasOwnProperty,Eu=function(e){return bs(e)?ds(e,!0):function(e){if(!Ge(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ms(e),n=[];for(var r in e)("constructor"!=r||!t&&bu.call(e,r))&&n.push(r);return n}(e)},Tu=function(e,t){return function(e,t){if(null==e)return{};var n=$s(function(e){return Wl(e,Eu,vu)}(e),function(e){return[e]});return t=rc(t),function(e,t,n){for(var r=-1,a=t.length,o={};++r<a;){var i=t[r],l=ec(e,i);n(l,i)&&gu(o,Qs(i,e),l)}return o}(e,n,function(e,n){return t(e,n[0])})}(e,function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}(rc(t)))};function Su({headers:e}){let t=Tu(e,uu);return t=Tu(t,du),c.createElement(cu,{items:t})}function wu({requestData:e}){return c.createElement(cu,{items:e.queryString||{}})}function Nu(){var e,t;const n=null==(e=c.useContext(be).context_items)||null==(t=e.request_data)?void 0:t.body;return n?c.createElement(xc,{value:Do(n)}):null}function Ru(){var e,t;const n=null==(e=c.useContext(be).context_items)||null==(t=e.request_data)?void 0:t.files;return n?c.createElement("div",{className:"col-span-2"},c.createElement(xc,{value:Do(n)})):null}function Ou({session:e}){return c.createElement(cu,{items:e})}function Cu({cookies:e}){return c.createElement(cu,{items:e})}function xu(){const e=c.useContext(be).context_items.livewire;return e?c.createElement(cu,{items:e.data}):null}function ku(){const e=c.useContext(be).context_items.livewire;return e?c.createElement(cu,{items:{Component:e.component_class,Alias:e.component_alias,ID:e.component_id}}):null}function Au(){const e=c.useContext(be).context_items.livewire;return e?c.createElement(Ac,null,e.updates.map(({payload:e,type:t},n)=>c.createElement(Ac.Row,{key:n,label:t,value:e}))):null}const Iu=["children","className"];function Lu(e){let{children:t,className:n=""}=e,r=Ce(e,Iu);return c.createElement(c.Fragment,null,t&&c.createElement("ul",Ne({className:`gap-y-2 flex flex-col ${n}`},r),t))}function _u({route:e}){var t;return c.createElement(Ac,null,c.createElement(Ac.Row,{value:e.controllerAction,label:"Controller"}),e.route&&c.createElement(Ac.Row,{value:e.route,label:"Route name"}),!(null==(t=e.routeParameters)||!t.length)&&c.createElement(Ac.Row,{value:c.createElement(Ac,null,Object.entries(e.routeParameters).map(([e,t])=>c.createElement(Ac.Row,{stacked:!0,key:e,label:e,value:t}))),label:"Route parameters"}),e.middleware&&c.createElement(Ac.Row,{value:c.createElement(Lu,null,(e.middleware||[]).map((e,t)=>c.createElement(Lu.Item,{key:t,value:e}))),label:"Middleware"}))}Lu.Item=function({value:e=""}){let t=e;return c.isValidElement(e)?t=e:"object"==typeof e?t=c.createElement(xc,{value:Do(e),language:"json"}):"string"==typeof e&&(t=c.createElement(xc,{value:e})),c.createElement("li",null,t)};const Pu=["value"];function Mu(e){let{value:t}=e,n=Ce(e,Pu);return c.useEffect(()=>{const e=t.match(/sf-dump-\d+/);e&&window.Sfdump(e[0])},[t]),c.createElement("div",Ne({className:"~bg-gray-500/5 px-4 py-2",dangerouslySetInnerHTML:{__html:t}},n))}function Du(){const e=c.useContext(be).context_items.view;return e?c.createElement(Ac,null,c.createElement(Ac.Row,{value:c.createElement(Bo,{path:e.view}),label:"View"}),e.data&&c.createElement(Ac.Row,{value:c.createElement(Ac,null,Object.entries(e.data).map(([e,t])=>c.createElement(Ac.Row,{stacked:!0,key:e,label:e,value:c.createElement(Mu,{value:t})}))),label:"Data"})):null}var Uu=Le(function(e){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var a=e[r]<<16|e[r+1]<<8|e[r+2],o=0;o<4;o++)n.push(8*r+6*o<=8*e.length?t.charAt(a>>>6*(3-o)&63):"=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,a=0;r<e.length;a=++r%4)0!=a&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*a+8)-1)<<2*a|t.indexOf(e.charAt(r))>>>6-2*a);return n}};e.exports=n}()}),ju={utf8:{stringToBytes:function(e){return ju.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(ju.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},Fu=ju,zu=function(e){return null!=e&&(Bu(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Bu(e.slice(0,0))}(e)||!!e._isBuffer)};function Bu(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Hu=Le(function(e){!function(){var t=Uu,n=Fu.utf8,r=zu,a=Fu.bin,o=function e(o,i){o.constructor==String?o=i&&"binary"===i.encoding?a.stringToBytes(o):n.stringToBytes(o):r(o)?o=Array.prototype.slice.call(o,0):Array.isArray(o)||o.constructor===Uint8Array||(o=o.toString());for(var l=t.bytesToWords(o),s=8*o.length,c=1732584193,u=-271733879,f=-1732584194,d=271733878,p=0;p<l.length;p++)l[p]=16711935&(l[p]<<8|l[p]>>>24)|4278255360&(l[p]<<24|l[p]>>>8);l[s>>>5]|=128<<s%32,l[14+(s+64>>>9<<4)]=s;var m=e._ff,h=e._gg,g=e._hh,y=e._ii;for(p=0;p<l.length;p+=16){var v=c,b=u,E=f,T=d;c=m(c,u,f,d,l[p+0],7,-680876936),d=m(d,c,u,f,l[p+1],12,-389564586),f=m(f,d,c,u,l[p+2],17,606105819),u=m(u,f,d,c,l[p+3],22,-1044525330),c=m(c,u,f,d,l[p+4],7,-176418897),d=m(d,c,u,f,l[p+5],12,1200080426),f=m(f,d,c,u,l[p+6],17,-1473231341),u=m(u,f,d,c,l[p+7],22,-45705983),c=m(c,u,f,d,l[p+8],7,1770035416),d=m(d,c,u,f,l[p+9],12,-1958414417),f=m(f,d,c,u,l[p+10],17,-42063),u=m(u,f,d,c,l[p+11],22,-1990404162),c=m(c,u,f,d,l[p+12],7,1804603682),d=m(d,c,u,f,l[p+13],12,-40341101),f=m(f,d,c,u,l[p+14],17,-1502002290),c=h(c,u=m(u,f,d,c,l[p+15],22,1236535329),f,d,l[p+1],5,-165796510),d=h(d,c,u,f,l[p+6],9,-1069501632),f=h(f,d,c,u,l[p+11],14,643717713),u=h(u,f,d,c,l[p+0],20,-373897302),c=h(c,u,f,d,l[p+5],5,-701558691),d=h(d,c,u,f,l[p+10],9,38016083),f=h(f,d,c,u,l[p+15],14,-660478335),u=h(u,f,d,c,l[p+4],20,-405537848),c=h(c,u,f,d,l[p+9],5,568446438),d=h(d,c,u,f,l[p+14],9,-1019803690),f=h(f,d,c,u,l[p+3],14,-187363961),u=h(u,f,d,c,l[p+8],20,1163531501),c=h(c,u,f,d,l[p+13],5,-1444681467),d=h(d,c,u,f,l[p+2],9,-51403784),f=h(f,d,c,u,l[p+7],14,1735328473),c=g(c,u=h(u,f,d,c,l[p+12],20,-1926607734),f,d,l[p+5],4,-378558),d=g(d,c,u,f,l[p+8],11,-2022574463),f=g(f,d,c,u,l[p+11],16,1839030562),u=g(u,f,d,c,l[p+14],23,-35309556),c=g(c,u,f,d,l[p+1],4,-1530992060),d=g(d,c,u,f,l[p+4],11,1272893353),f=g(f,d,c,u,l[p+7],16,-155497632),u=g(u,f,d,c,l[p+10],23,-1094730640),c=g(c,u,f,d,l[p+13],4,681279174),d=g(d,c,u,f,l[p+0],11,-358537222),f=g(f,d,c,u,l[p+3],16,-722521979),u=g(u,f,d,c,l[p+6],23,76029189),c=g(c,u,f,d,l[p+9],4,-640364487),d=g(d,c,u,f,l[p+12],11,-421815835),f=g(f,d,c,u,l[p+15],16,530742520),c=y(c,u=g(u,f,d,c,l[p+2],23,-995338651),f,d,l[p+0],6,-198630844),d=y(d,c,u,f,l[p+7],10,1126891415),f=y(f,d,c,u,l[p+14],15,-1416354905),u=y(u,f,d,c,l[p+5],21,-57434055),c=y(c,u,f,d,l[p+12],6,1700485571),d=y(d,c,u,f,l[p+3],10,-1894986606),f=y(f,d,c,u,l[p+10],15,-1051523),u=y(u,f,d,c,l[p+1],21,-2054922799),c=y(c,u,f,d,l[p+8],6,1873313359),d=y(d,c,u,f,l[p+15],10,-30611744),f=y(f,d,c,u,l[p+6],15,-1560198380),u=y(u,f,d,c,l[p+13],21,1309151649),c=y(c,u,f,d,l[p+4],6,-145523070),d=y(d,c,u,f,l[p+11],10,-1120210379),f=y(f,d,c,u,l[p+2],15,718787259),u=y(u,f,d,c,l[p+9],21,-343485551),c=c+v>>>0,u=u+b>>>0,f=f+E>>>0,d=d+T>>>0}return t.endian([c,u,f,d])};o._ff=function(e,t,n,r,a,o,i){var l=e+(t&n|~t&r)+(a>>>0)+i;return(l<<o|l>>>32-o)+t},o._gg=function(e,t,n,r,a,o,i){var l=e+(t&r|n&~r)+(a>>>0)+i;return(l<<o|l>>>32-o)+t},o._hh=function(e,t,n,r,a,o,i){var l=e+(t^n^r)+(a>>>0)+i;return(l<<o|l>>>32-o)+t},o._ii=function(e,t,n,r,a,o,i){var l=e+(n^(t|~r))+(a>>>0)+i;return(l<<o|l>>>32-o)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(o(e,n));return n&&n.asBytes?r:n&&n.asString?a.bytesToString(r):t.bytesToHex(r)}}()});function Vu({user:e}){return c.createElement(c.Fragment,null,e.email&&c.createElement("div",{className:"mb-2 flex items-center gap-3"},c.createElement("div",null,c.createElement("img",{className:"inline-block h-9 w-9 rounded-full",alt:e.email,src:`https://gravatar.com/avatar/${Hu(e.email)}/?s=240`})),c.createElement("div",{className:"leading-tight"},e.name&&c.createElement("p",{className:"font-semibold"},e.name),c.createElement("p",{className:"text-sm"},e.email))),c.createElement(xc,{value:Do(e),language:"json"}))}function Wu({children:e,className:t=""}){return c.createElement("div",{className:`${t}`},c.createElement("div",{className:"flex items-center gap-2 bg-yellow-50 dark:bg-yellow-500/10 px-4 py-2"},c.createElement("div",{className:"flex-shrink-0","aria-hidden":"true"},c.createElement(qa,{className:"text-yellow-500 ",icon:Oo})),c.createElement("p",{className:"text-sm"},e)))}var Gu=function(e,t){!0===t&&(t=0);var n=e.indexOf("://"),r=e.substring(0,n).split("+").filter(Boolean);return"number"==typeof t?r[t]:r},Yu=function e(t){if(Array.isArray(t))return-1!==t.indexOf("ssh")||-1!==t.indexOf("rsync");if("string"!=typeof t)return!1;var n=Gu(t);if(t=t.substring(t.indexOf("://")+3),e(n))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(r)&&t.indexOf("@")<t.indexOf(":")},$u=new RegExp("%[a-f0-9]{2}","gi"),Xu=new RegExp("(%[a-f0-9]{2})+","gi");function qu(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;var n=e.slice(0,t=t||1),r=e.slice(t);return Array.prototype.concat.call([],qu(n),qu(r))}function Ku(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match($u),n=1;n<t.length;n++)t=(e=qu(t,n).join("")).match($u);return e}}var Ju=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=Xu.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=Ku(n[0]);r!==n[0]&&(t[n[0]]=r)}n=Xu.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var i=a[o];e=e.replace(new RegExp(i,"g"),t[i])}return e}(e)}},Qu=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},Zu=function(e,t){for(var n={},r=Object.keys(e),a=Array.isArray(t),o=0;o<r.length;o++){var i=r[o],l=e[i];(a?-1!==t.indexOf(i):t(i,l,e))&&(n[i]=l)}return n},ef=Le(function(e,t){function n(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function r(e,t){return t.encode?t.strict?encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`):encodeURIComponent(e):e}function a(e,t){return t.decode?Ju(e):e}function o(e){return Array.isArray(e)?e.sort():"object"==typeof e?o(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function i(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function l(e){const t=(e=i(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function s(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function c(e,t){n((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),r[e=e.replace(/\[\]$/,"")]=t?void 0!==r[e]?[].concat(r[e],n):[n]:n};case"comma":case"separator":return(t,n,r)=>{const o="string"==typeof n&&n.includes(e.arrayFormatSeparator),i="string"==typeof n&&!o&&a(n,e).includes(e.arrayFormatSeparator);n=i?a(n,e):n;const l=o||i?n.split(e.arrayFormatSeparator).map(t=>a(t,e)):null===n?n:a(n,e);r[t]=l};default:return(e,t,n)=>{n[e]=void 0!==n[e]?[].concat(n[e],t):t}}}(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const n of e.split("&")){if(""===n)continue;let[e,o]=Qu(t.decode?n.replace(/\+/g," "):n,"=");o=void 0===o?null:["comma","separator"].includes(t.arrayFormat)?o:a(o,t),r(a(e,t),o,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=s(n[e],t);else i[e]=s(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>{const n=i[t];return e[t]=Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?o(n):n,e},Object.create(null))}t.extract=l,t.parse=c,t.stringify=(e,t)=>{if(!e)return"";n((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const a=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],o=function(e){switch(e.arrayFormat){case"index":return t=>(n,a)=>{const o=n.length;return void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?n:null===a?[...n,[r(t,e),"[",o,"]"].join("")]:[...n,[r(t,e),"[",r(o,e),"]=",r(a,e)].join("")]};case"bracket":return t=>(n,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?n:null===a?[...n,[r(t,e),"[]"].join("")]:[...n,[r(t,e),"[]=",r(a,e)].join("")];case"comma":case"separator":return t=>(n,a)=>null==a||0===a.length?n:0===n.length?[[r(t,e),"=",r(a,e)].join("")]:[[n,r(a,e)].join(e.arrayFormatSeparator)];default:return t=>(n,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?n:null===a?[...n,r(t,e)]:[...n,[r(t,e),"=",r(a,e)].join("")]}}(t),i={};for(const t of Object.keys(e))a(t)||(i[t]=e[t]);const l=Object.keys(i);return!1!==t.sort&&l.sort(t.sort),l.map(n=>{const a=e[n];return void 0===a?"":null===a?r(n,t):Array.isArray(a)?a.reduce(o(n),[]).join("&"):r(n,t)+"="+r(a,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=Qu(e,"#");return Object.assign({url:n.split("?")[0]||"",query:c(l(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:a(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const a=i(e.url).split("?")[0]||"",o=t.extract(e.url),l=t.parse(o,{sort:!1}),s=Object.assign(l,e.query);let c=t.stringify(s,n);c&&(c=`?${c}`);let u=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r(e.fragmentIdentifier,n)}`),`${a}${c}${u}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:a,query:o,fragmentIdentifier:i}=t.parseUrl(e,r);return t.stringifyUrl({url:a,query:Zu(o,n),fragmentIdentifier:i},r)},t.exclude=(e,n,r)=>{const a=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,a,r)}});function tf(e){if("string"!=typeof e)throw new Error("The url must be a string.");let t=function(e){let t=function(e){if("string"!=typeof e||!e.trim())throw new Error("Invalid url.");return function(e){e=(e||"").trim();var t={protocols:Gu(e),protocol:null,port:null,resource:"",user:"",pathname:"",hash:"",search:"",href:e,query:Object.create(null)},n=e.indexOf("://"),r=null,a=null;e.startsWith(".")&&(e.startsWith("./")&&(e=e.substring(2)),t.pathname=e,t.protocol="file");var o=e.charAt(1);return t.protocol||(t.protocol=t.protocols[0],t.protocol||(Yu(e)?t.protocol="ssh":"/"===o||"~"===o?(e=e.substring(2),t.protocol="file"):t.protocol="file")),-1!==n&&(e=e.substring(n+3)),a=e.split(/\/|\\/),t.resource="file"!==t.protocol?a.shift():"",2===(r=t.resource.split("@")).length&&(t.user=r[0],t.resource=r[1]),2===(r=t.resource.split(":")).length&&(t.resource=r[0],r[1]?(t.port=Number(r[1]),isNaN(t.port)&&(t.port=null,a.unshift(r[1]))):t.port=null),a=a.filter(Boolean),t.pathname="file"===t.protocol?t.href:t.pathname||("file"!==t.protocol||"/"===t.href[0]?"/":"")+a.join("/"),2===(r=t.pathname.split("#")).length&&(t.pathname=r[0],t.hash=r[1]),2===(r=t.pathname.split("?")).length&&(t.pathname=r[0],t.search=r[1]),t.query=ef.parse(t.search),t.href=t.href.replace(/\/$/,""),t.pathname=t.pathname.replace(/\/$/,""),t}(e)}(e);t.token="";let n=t.user.split(":");return 2===n.length&&("x-oauth-basic"===n[1]?t.token=n[0]:"x-token-auth"===n[0]&&(t.token=n[1])),t.protocol=Yu(t.protocols)||Yu(e)?"ssh":t.protocols.length?t.protocols[0]:"file",t.href=t.href.replace(/\/$/,""),t}(e),n=t.resource.split("."),r=null;switch(t.toString=function(e){return tf.stringify(this,e)},t.source=n.length>2?n.slice(1-n.length).join("."):t.source=t.resource,t.git_suffix=/\.git$/.test(t.pathname),t.name=decodeURIComponent(t.pathname.replace(/^\//,"").replace(/\.git$/,"")),t.owner=decodeURIComponent(t.user),t.source){case"git.cloudforge.com":t.owner=t.user,t.organization=n[0],t.source="cloudforge.com";break;case"visualstudio.com":if("vs-ssh.visualstudio.com"===t.resource){r=t.name.split("/"),4===r.length&&(t.organization=r[1],t.owner=r[2],t.name=r[3],t.full_name=r[2]+"/"+r[3]);break}r=t.name.split("/"),2===r.length?(t.owner=r[1],t.name=r[1],t.full_name="_git/"+t.name):3===r.length?(t.name=r[2],"DefaultCollection"===r[0]?(t.owner=r[2],t.organization=r[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=r[0],t.full_name=t.owner+"/_git/"+t.name)):4===r.length&&(t.organization=r[0],t.owner=r[1],t.name=r[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name);break;case"dev.azure.com":case"azure.com":if("ssh.dev.azure.com"===t.resource){r=t.name.split("/"),4===r.length&&(t.organization=r[1],t.owner=r[2],t.name=r[3]);break}r=t.name.split("/"),5===r.length?(t.organization=r[0],t.owner=r[1],t.name=r[4],t.full_name="_git/"+t.name):3===r.length?(t.name=r[2],"DefaultCollection"===r[0]?(t.owner=r[2],t.organization=r[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=r[0],t.full_name=t.owner+"/_git/"+t.name)):4===r.length&&(t.organization=r[0],t.owner=r[1],t.name=r[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name),t.query&&t.query.path&&(t.filepath=t.query.path.replace(/^\/+/g,"")),t.query&&t.query.version&&(t.ref=t.query.version.replace(/^GB/,""));break;default:r=t.name.split("/");let e=r.length-1;if(r.length>=2){const n=r.indexOf("-",2),a=r.indexOf("blob",2),o=r.indexOf("tree",2),i=r.indexOf("commit",2),l=r.indexOf("src",2),s=r.indexOf("raw",2);e=n>0?n-1:a>0?a-1:o>0?o-1:i>0?i-1:l>0?l-1:s>0?s-1:e,t.owner=r.slice(0,e).join("/"),t.name=r[e],i&&(t.commit=r[e+2])}t.ref="",t.filepathtype="",t.filepath="";const a=r.length>e&&"-"===r[e+1]?e+1:e;r.length>a+2&&["raw","src","blob","tree"].indexOf(r[a+1])>=0&&(t.filepathtype=r[a+1],t.ref=r[a+2],r.length>a+3&&(t.filepath=r.slice(a+3).join("/"))),t.organization=t.owner}t.full_name||(t.full_name=t.owner,t.name&&(t.full_name&&(t.full_name+="/"),t.full_name+=t.name)),t.owner.startsWith("scm/")&&(t.source="bitbucket-server",t.owner=t.owner.replace("scm/",""),t.organization=t.owner,t.full_name=`${t.owner}/${t.name}`);const a=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(t.pathname);return null!=a&&(t.source="bitbucket-server",t.owner="users"===a[1]?"~"+a[2]:a[2],t.organization=t.owner,t.name=a[3],r=a[4].split("/"),r.length>1&&(["raw","browse"].indexOf(r[1])>=0?(t.filepathtype=r[1],r.length>2&&(t.filepath=r[2])):"commits"===r[1]&&r.length>2&&(t.commit=r[2])),t.full_name=`${t.owner}/${t.name}`,t.ref=t.query.at?t.query.at:""),t}function nf({git:e}){const{commitUrl:t}=function(e,t){if(!e)return{resource:null,repoUrl:null,commitUrl:null};const n=tf(e),r=tf.stringify(Ne({},n,{git_suffix:!1}),"https");return{repoUrl:r,resource:n.resource,commitUrl:`${r}/commit/${t}`}}(e.remote,e.hash);return c.createElement(c.Fragment,null,e.hash&&e.message&&c.createElement("div",{className:"flex items-center gap-4"},c.createElement("div",{className:"flex-grow font-semibold"},e.message),c.createElement("div",{className:"~bg-gray-500/5 flex items-center"},c.createElement(xc,{transparent:!0,overflowX:!1,value:e.hash}),t&&c.createElement("a",{href:t,target:"_blank",className:"mr-4"},c.createElement(xt,null,c.createElement(qa,{className:"group-hover:text-indigo-500",icon:Co}),"View commit ",e.hash.substr(0,7))))),e.isDirty&&c.createElement("div",null,c.createElement(Wu,{className:"mt-4"},"Last commit is dirty. (Un)staged changes have been made since this commit.")),e.tag&&c.createElement(Ac,null,c.createElement(Ac.Row,{label:"Latest tag",value:e.tag})))}tf.stringify=function(e,t){t=t||(e.protocols&&e.protocols.length?e.protocols.join("+"):e.protocol);const n=e.port?`:${e.port}`:"",r=e.user||"git",a=e.git_suffix?".git":"";switch(t){case"ssh":return n?`ssh://${r}@${e.resource}${n}/${e.full_name}${a}`:`${r}@${e.resource}:${e.full_name}${a}`;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return`${t}://${r}@${e.resource}${n}/${e.full_name}${a}`;case"http":case"https":return`${t}://${e.token?function(e){switch(e.source){case"bitbucket.org":return`x-token-auth:${e.token}@`;default:return`${e.token}@`}}(e):e.user&&(e.protocols.includes("http")||e.protocols.includes("https"))?`${e.user}@`:""}${e.resource}${n}/${function(e){switch(e.source){case"bitbucket-server":return`scm/${e.full_name}`;default:return`${e.full_name}`}}(e)}${a}`;default:return e.href}};var rf,af,of=(rf={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==rf?void 0:rf[e]}),lf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sf=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),cf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ff="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",df="["+ff+"]",pf="\\d+",mf="[a-z\\xdf-\\xf6\\xf8-\\xff]",hf="[^\\ud800-\\udfff"+ff+pf+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",gf="(?:\\ud83c[\\udde6-\\uddff]){2}",yf="[\\ud800-\\udbff][\\udc00-\\udfff]",vf="[A-Z\\xc0-\\xd6\\xd8-\\xde]",bf="(?:"+mf+"|"+hf+")",Ef="(?:"+vf+"|"+hf+")",Tf="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Sf="[\\ufe0e\\ufe0f]?"+Tf+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",gf,yf].join("|")+")[\\ufe0e\\ufe0f]?"+Tf+")*",wf="(?:"+["[\\u2700-\\u27bf]",gf,yf].join("|")+")"+Sf,Nf=RegExp([vf+"?"+mf+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[df,vf,"$"].join("|")+")",Ef+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[df,vf+bf,"$"].join("|")+")",vf+"?"+bf+"+(?:['’](?:d|ll|m|re|s|t|ve))?",vf+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pf,wf].join("|"),"g"),Rf=RegExp("['’]","g"),Of=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Cf=function(e){return Of.test(e)},xf="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",kf="\\ud83c[\\udffb-\\udfff]",Af="[^\\ud800-\\udfff]",If="(?:\\ud83c[\\udde6-\\uddff]){2}",Lf="[\\ud800-\\udbff][\\udc00-\\udfff]",_f="(?:"+xf+"|"+kf+")?",Pf="[\\ufe0e\\ufe0f]?"+_f+"(?:\\u200d(?:"+[Af,If,Lf].join("|")+")[\\ufe0e\\ufe0f]?"+_f+")*",Mf="(?:"+[Af+xf+"?",xf,If,Lf,"[\\ud800-\\udfff]"].join("|")+")",Df=RegExp(kf+"(?="+kf+")|"+Mf+Pf,"g"),Uf=(af=function(e,t,n){return e+(n?" ":"")+function(e){e=Js(e);var t,n,r,a=Cf(e)?function(e){return Cf(e)?function(e){return e.match(Df)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,o=a?a[0]:e.charAt(0),i=a?(t=a,r=t.length,n=void 0===n?r:n,function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r<a;)o[r]=e[r+t];return o}(t,1,n)).join(""):e.slice(1);return o.toUpperCase()+i}(t)},function(e){return function(e,t,n,r){for(var a=-1,o=null==e?0:e.length;++a<o;)n=t(n,e[a],a,e);return n}(function(e,t,n){return e=Js(e),void 0===(t=t)?function(e){return uf.test(e)}(e)?function(e){return e.match(Nf)||[]}(e):function(e){return e.match(cf)||[]}(e):e.match(t)||[]}(function(e){return(e=Js(e))&&e.replace(lf,of).replace(sf,"")}(e).replace(Rf,"")),af,"")});function jf({env:e}){const t=c.useContext(be);return c.createElement(Ac,null,t.application_version&&c.createElement(Ac.Row,{key:"app_version",value:t.application_version,label:"App Version"}),Object.entries(e).map(([e,t])=>c.createElement(Ac.Row,{key:e,value:t,label:Uf(e)})))}function Ff({children:e}){return c.createElement("ul",{className:"grid grid-cols-1 gap-10"},e)}function zf({title:e,children:t,anchor:n}){return c.createElement("li",null,c.createElement("a",{href:`#context-${n}`,className:"uppercase tracking-wider ~text-gray-500 text-xs font-bold"},e),c.createElement("ul",{className:"mt-3 grid grid-cols-1 gap-3"},t))}function Bf({icon:e,title:t,anchor:n,active:r=!1}){return c.createElement("li",null,c.createElement("a",{href:`#context-${n}`,className:`\n flex items-center gap-3\n group text-base hover:text-indigo-500\n ${r?"~text-indigo-600":""}\n `},c.createElement("span",{className:"opacity-50"},e),c.createElement("span",null,t)))}function Hf({children:e}){const{inView:t}=c.useContext(ou);return c.createElement(c.Fragment,null,c.createElement("nav",{className:"hidden @2xl:block min-w-[8rem] flex-none mr-10 @4xl:mr-20"},c.createElement("div",{className:"sticky top-[7.5rem]"},c.createElement(Ff,null,c.Children.map(e,e=>c.createElement(c.Fragment,null,e&&c.createElement(zf,{title:e.props.title,anchor:e.props.anchor},c.Children.map(e.props.children,e=>c.createElement(c.Fragment,null,e&&e.type===iu&&c.createElement(Bf,{icon:e.props.icon,active:t[t.length-1]===e.props.title,title:e.props.title,anchor:e.props.anchor}))))))))),c.createElement("div",{className:"overflow-hidden grid grid-cols-1 gap-px bg-white dark:shadow-none dark:bg-gray-800/50 dark:bg-gradient-to-bl from-gray-700/50 via-transparent dark:ring-1 dark:ring-inset dark:ring-white/5 rounded-lg shadow-2xl shadow-gray-500/20 flex-grow"},e))}function Vf({children:e}){const[t,n]=c.useState([]);return c.createElement(ou.Provider,{value:{inView:t,setInView:n}},e)}function Wf({className:e=""}){return c.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 512 512",enableBackground:"new 0 0 512 512",className:`${e}`},c.createElement("path",{fill:"currentcolor",d:"M381.6,334.8c-24.7,0-27.7,33.6-45.2,44.6v52c0,17.6,14.2,31.8,31.8,31.8c17.6,0,31.8-14.2,31.8-31.8v-88.6\n C395,338.1,389.2,334.8,381.6,334.8z"}),c.createElement("path",{fill:"currentcolor",d:"M263.2,334.8c-25.5,0-27.8,35.8-46.9,45.7v96.2c0,19.5,15.8,35.3,35.3,35.3s35.3-15.8,35.3-35.3V349.1\n C280.9,341.1,273.9,334.8,263.2,334.8z"}),c.createElement("path",{fill:"currentcolor",d:"M144.8,334.8c-22.9,0-27.1,28.9-41.6,41.9l0,38c0,17.6,14.2,31.8,31.8,31.8c17.6,0,31.8-14.2,31.8-31.8v-67.9\n C161.2,339.9,154.5,334.8,144.8,334.8z"}),c.createElement("path",{id:"Body-Copy-4",fill:"currentcolor",fillRule:"evenodd",clipRule:"evenodd",d:"M458.9,340.2c-8.3,12.6-14.7,28.2-31.7,28.2\n\t\tc-28.6,0-30.1-44-58.7-44c-28.6,0-27,44-55.6,44c-28.6,0-30.1-44-58.7-44s-27,44-55.6,44s-30.1-44-58.7-44s-27,44-55.6,44\n\t\tc-9,0-15.3-4.4-20.6-10.3c-20.4-35.6-32.2-77.2-32.2-121.8C31.6,105.8,132.4,0,256.7,0s225.1,105.8,225.1,236.2\n\t\tC481.8,273.5,473.6,308.8,458.9,340.2z"}),c.createElement("path",{id:"Oval",fillRule:"evenodd",clipRule:"evenodd",fill:"#FFFFFF",d:"M244.6,295.1c78.3,0,111.2-45.4,111.2-109.9\n\t\tS306.1,61.4,244.6,61.4s-111.2,59.4-111.2,123.9S166.4,295.1,244.6,295.1z"}),c.createElement("ellipse",{id:"Oval_1_",fill:"currentcolor",fillRule:"evenodd",clipRule:"evenodd",cx:"214.7",cy:"142.9",rx:"41.7",ry:"46"}),c.createElement("ellipse",{id:"Oval_2_",fillRule:"evenodd",clipRule:"evenodd",fill:"#FFFFFF",cx:"207.8",cy:"132.2",rx:"20.9",ry:"21.3"}))}function Gf({items:e}){return c.createElement(Ac,null,Object.entries(e).map(([e,t])=>c.createElement(Ac.Row,{key:e,value:t,label:Uf(e)})))}function Yf({commandArguments:e}){return c.createElement("div",{className:"col-span-2"},c.createElement(xc,{value:e.join(" ")}))}function $f({request:e}){return e.useragent?c.createElement(xc,{value:e.useragent}):null}function Xf(){var e,t,n,r,a;const o=c.useContext(be),i=o.context_items,l=i.request_data;return c.createElement($c,null,c.createElement("div",{className:"@container flex items-stretch"},c.createElement(Vf,null,c.createElement(Hf,null,i.request&&c.createElement(tu,{title:"Request",anchor:"request"},c.createElement(su,{request:i.request,requestData:i.request_data,headers:i.headers}),!!i.request.useragent&&c.createElement(iu,{title:"Browser",anchor:"request-browser",icon:c.createElement(qa,{fixedWidth:!0,icon:ko}),children:c.createElement($f,{request:i.request})}),i.headers&&c.createElement(iu,{title:"Headers",anchor:"request-headers",icon:c.createElement(qa,{fixedWidth:!0,icon:yo}),children:c.createElement(Su,{headers:i.headers})}),i.request_data&&!!Object.values(i.request_data.queryString||[]).length&&c.createElement(iu,{title:"Query String",anchor:"request-query-string",icon:c.createElement(qa,{fixedWidth:!0,icon:ro}),children:c.createElement(wu,{requestData:i.request_data})}),!(null==(e=i.request_data)||!e.body)&&c.createElement(iu,{title:"Body",anchor:"request-body",icon:c.createElement(qa,{fixedWidth:!0,icon:ao}),children:c.createElement(Nu,null)}),!(null==l||null==(t=l.files)||!t.length)&&c.createElement(iu,{title:"Files",anchor:"request-files",icon:c.createElement(qa,{fixedWidth:!0,icon:co}),children:c.createElement(Ru,null)}),!(null==(n=i.session)||!n.length)&&c.createElement(iu,{title:"Session",anchor:"request-session",icon:c.createElement(qa,{fixedWidth:!0,icon:uo}),children:c.createElement(Ou,{session:i.session})}),!(null==(r=i.cookies)||!r.length)&&c.createElement(iu,{title:"Cookies",anchor:"request-cookies",icon:c.createElement(qa,{fixedWidth:!0,icon:io}),children:c.createElement(Cu,{cookies:i.cookies})})),(i.route||i.view||i.arguments||i.job)&&c.createElement(tu,{title:"App",anchor:"app"},i.route&&c.createElement(iu,{title:"Routing",anchor:"app-routing",icon:c.createElement(qa,{fixedWidth:!0,icon:To}),children:c.createElement(_u,{route:i.route})}),i.view&&c.createElement(iu,{title:"Views",anchor:"app-views",icon:c.createElement(qa,{fixedWidth:!0,icon:ho}),children:c.createElement(Du,null)}),i.arguments&&c.createElement(iu,{title:"Command",anchor:"context-command",icon:c.createElement(qa,{fixedWidth:!0,icon:Ro}),children:c.createElement(Yf,{commandArguments:i.arguments})}),i.job&&c.createElement(iu,{title:"Job",anchor:"context-job",icon:c.createElement(qa,{fixedWidth:!0,icon:fo}),children:c.createElement(Gf,{items:i.job||{}})})),i.livewire&&c.createElement(tu,{title:"Livewire",anchor:"livewire"},c.createElement(iu,{title:"Component",anchor:"livewire-component",icon:c.createElement(Wf,{className:"svg-inline--fa fa-w-16 fa-fw"}),children:c.createElement(ku,null)}),c.createElement(iu,{title:"Updates",anchor:"livewire-updates",icon:c.createElement(qa,{fixedWidth:!0,icon:Eo}),children:c.createElement(Au,null)}),c.createElement(iu,{title:"Data",anchor:"livewire-data",icon:c.createElement(qa,{fixedWidth:!0,icon:No}),children:c.createElement(xu,null)})),!!(i.user||i.git||i.env||o.application_version||i.exception)&&c.createElement(tu,{title:"Context",anchor:"context"},i.user&&c.createElement(iu,{title:"User",anchor:"user-user",icon:c.createElement(qa,{fixedWidth:!0,icon:xo}),children:c.createElement(Vu,{user:i.user})}),i.git&&c.createElement(iu,{title:"Git",anchor:"context-git",icon:c.createElement(qa,{fixedWidth:!0,icon:oo}),children:c.createElement(nf,{git:i.git})}),!(!i.env&&!o.application_version)&&c.createElement(iu,{title:"Versions",anchor:"context-versions",icon:c.createElement(qa,{fixedWidth:!0,icon:So}),children:c.createElement(jf,{env:i.env||{}})}),i.exception&&c.createElement(iu,{title:"Exception",anchor:"context-exception",icon:c.createElement(qa,{fixedWidth:!0,icon:to}),children:c.createElement(Gf,{items:i.exception||{}})})),(null==(a=o.custom_context_items)?void 0:a.length)>0&&c.createElement(tu,{title:"Custom",anchor:"custom-context"},o.custom_context_items.map(e=>c.createElement(iu,{key:e.name,title:Uf(e.name),anchor:`custom-context-${Zc(e.name)}`,icon:c.createElement(qa,{fixedWidth:!0,icon:eo}),children:c.createElement(Gf,{items:e.items})})))))))}function qf({children:e,className:t}){const[n,r]=c.useState(0),a=e.filter(e=>!1!==e),o=c.Children.map(a,e=>({name:e.props.name,component:e.props.component,count:e.props.count,checked:e.props.checked,onChange:e.props.onChange})).filter(e=>e.count),i=o[n].component;return c.createElement("div",{className:`${t} | bg-gray-300/50 dark:bg-black/10 shadow-inner rounded-lg`},c.createElement("nav",{className:"z-10 flex justify-center items-center"},c.createElement("ul",{className:"-my-5 flex justify-start items-center rounded-full shadow-lg bg-indigo-500 text-white space-x-px"},o.map((e,t)=>c.createElement("li",{key:t,className:`\n ${t===n?"bg-indigo-600":"bg-indigo-500 text-indigo-100"}\n ${0===t?"rounded-l-full":""}\n ${t===o.length-1?"rounded-r-full":""}\n hover:text-white\n `},c.createElement("button",{onClick:()=>r(t),className:"group flex items-center px-3 sm:px-5 h-10 uppercase tracking-wider text-xs font-medium "},c.createElement("span",{className:"mr-1.5 inline-flex items-center justify-center px-1 min-w-[1rem] h-4 bg-gray-900/30 text-white rounded-full text-xs"},e.count),c.createElement("span",null,e.name)))))),c.createElement($c,{fallbackComponent:e=>c.createElement(eu,{githubLink:e,className:"pt-10"})},c.createElement("div",{className:"grid grid-cols-1 gap-10 py-10 px-6 @lg:px-10"},c.createElement(i,null))))}function Kf({children:e,context:t=null,level:n=null,meta:r=null,time:a}){const[o,i]=c.useState(!1),l={error:"red",warn:"orange",warning:"orange",info:"blue",debug:"green",trace:"gray",notice:"purple",critical:"red",alert:"red",emergency:"red"};return c.createElement("div",{className:"min-w-0 grid grid-cols-1 gap-2"},c.createElement("div",{className:"flex items-center gap-1"},c.createElement(lu,{color:n?l[n]:"gray",className:"font-mono"},a.toLocaleTimeString()),n&&c.createElement(lu,{color:l[n]},n),r&&Object.entries(r).map(([e,t])=>c.createElement(c.Fragment,{key:e},"runtime"===e&&c.createElement(lu,{className:"inline-flex items-center gap-2"},c.createElement(qa,{title:"Runtime",className:"opacity-50",icon:wo})," ",t),"connection"===e&&c.createElement(lu,{className:"inline-flex items-center gap-2"},c.createElement(qa,{title:"Connection",className:"opacity-50",icon:so})," ",t),"runtime"!==e&&"connection"!==e&&c.createElement(lu,null,e,": ",t))),t&&c.createElement(c.Fragment,null,c.createElement("div",{className:"ml-auto"},c.createElement(xt,{onClick:()=>i(!o)},c.createElement(qa,{icon:o?mo:ao,className:"text-[8px] ~text-gray-500 group-hover:text-indigo-500"}),o?"As list":"Raw")))),c.createElement("div",null,e),t&&c.createElement(c.Fragment,null,o?c.createElement(xc,{value:Do(t),language:"json"}):c.createElement("div",{className:"pl-4"},c.createElement(cu,{items:t}))))}function Jf(){const e=c.useContext(be),t=Object.values(e.context_items.logs);return c.createElement(c.Fragment,null,t.map((e,t)=>c.createElement(Kf,{key:t,context:e.context,level:e.level,time:Mo(e.microtime)},c.createElement(xc,{value:e.message}))))}function Qf(){const e=c.useContext(be),t=Object.values(e.context_items.dumps);return c.createElement(c.Fragment,null,t.map((e,t)=>c.createElement(Kf,{key:t,time:Mo(e.microtime)},c.createElement("div",{className:"mb-2"},c.createElement(Bo,{path:e.file,lineNumber:e.line_number,className:"text-sm"})),c.createElement(Mu,{value:e.html_dump}))))}function Zf({bindings:e,hidden:t=!1}){const[n,r]=c.useState(t);return c.createElement("div",null,c.createElement("button",{type:"button",className:"font-bold text-xs ~text-gray-500 uppercase tracking-wider flex flex-row items-center gap-2 mb-2",onClick:()=>r(!n)},c.createElement(qa,{icon:Qa,className:"transition-transform duration-300 transform "+(n?"":"rotate-90")}),e.length," query ",e.length>1?"parameters":"parameter"),!n&&c.createElement(Ac,{className:"ml-4"},e.map((e,t)=>c.createElement(Ac.Row,{small:!0,key:t,value:e,label:c.createElement("code",{className:"text-sm text-gray-500"},t+1)}))))}function ed(){const e=c.useContext(be);let t=Object.values(e.context_items.queries);function n(e){return null!==e.bindings&&e.sql.split("?").length-1===e.bindings.length}function r(e){var t;let n=e.sql;return null==(t=e.bindings)||t.forEach(e=>{n=n.replace("?",e)}),n}return c.createElement(c.Fragment,null,t.map((e,t)=>c.createElement(Kf,{key:t,time:Mo(e.microtime),meta:{runtime:`${e.time}ms`,connection:e.connection_name}},e.bindings&&e.bindings.length>0?c.createElement("div",{className:"grid gap-4 grid-cols-1"},c.createElement(xc,{value:n(e)?r(e):e.sql,language:"sql"}),c.createElement(Zf,{bindings:e.bindings,hidden:n(e)})):c.createElement(xc,{value:e.sql,language:"sql"}))))}function td(){const e=c.useContext(be);return c.createElement(c.Fragment,null,e.glows.map((e,t)=>c.createElement(Kf,{key:t,level:e.message_level,context:e.meta_data,time:Mo(e.microtime)},c.createElement(xc,{value:e.name}))))}function nd(){const e=c.useContext(be),t=e.context_items.queries,n=e.context_items.logs,r=e.glows;return c.createElement($c,null,c.createElement(qf,{className:"@container"},c.createElement(qf.Tab,{component:Qf,name:"Dumps",count:Object.keys(e.context_items.dumps||[]).length}),c.createElement(qf.Tab,{component:td,name:"Glows",count:r.length}),c.createElement(qf.Tab,{component:ed,name:"Queries",count:Object.keys(t||[]).length}),c.createElement(qf.Tab,{component:Jf,name:"Logs",count:Object.keys(n||[]).length})))}function rd({children:e,className:t=""}){return c.createElement("code",{className:`font-mono leading-relaxed font-normal ~bg-gray-500/5 px-1 py-1 ${t}`},e)}function ad({className:e=""}){return c.createElement("svg",{height:"58",viewBox:"0 0 38 58",width:"38",xmlns:"http://www.w3.org/2000/svg",className:`w-4 h-5 ml-1.5 ${e}`},c.createElement("linearGradient",{id:"a",x1:"50%",x2:"50%",y1:"100%",y2:"0%"},c.createElement("stop",{offset:"0",stopColor:"#48b987"}),c.createElement("stop",{offset:"1",stopColor:"#137449"})),c.createElement("linearGradient",{id:"b",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},c.createElement("stop",{offset:"0",stopColor:"#66ffbc"}),c.createElement("stop",{offset:"1",stopColor:"#218e5e"})),c.createElement("linearGradient",{id:"c",x1:"81.686741%",x2:"17.119683%",y1:"50%",y2:"46.893103%"},c.createElement("stop",{offset:"0",stopColor:"#ccffe7",stopOpacity:".492379"}),c.createElement("stop",{offset:".37576486",stopColor:"#fff",stopOpacity:".30736"}),c.createElement("stop",{offset:"1",stopColor:"#00ff85",stopOpacity:"0"})),c.createElement("linearGradient",{id:"d",x1:"50%",x2:"50%",y1:"100%",y2:"0%"},c.createElement("stop",{offset:"0",stopColor:"#a189f2"}),c.createElement("stop",{offset:"1",stopColor:"#3f00f5"})),c.createElement("linearGradient",{id:"e",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},c.createElement("stop",{offset:"0",stopColor:"#bbadfa"}),c.createElement("stop",{offset:"1",stopColor:"#9275f4"})),c.createElement("g",{fill:"none"},c.createElement("g",{transform:"translate(1 1)"},c.createElement("path",{d:"m11.9943899 27.9858314-11.9943899-6.9992916v-13.98724823l12.0617111 7.02196133z",fill:"url(#a)"}),c.createElement("path",{d:"m23.9775596 20.9808724-23.9775596-13.98158083 11.9943899-6.99929157 24.0056101 13.9815808z",fill:"url(#b)",stroke:"url(#c)"})),c.createElement("g",{transform:"translate(1 29.014169)"},c.createElement("path",{d:"m11.9943899 27.9858314-11.9943899-6.9936241v-13.99291573l11.9663394 6.99362413z",fill:"url(#d)"}),c.createElement("path",{d:"m11.9663394 13.9929157-11.9663394-6.99362413 11.9943899-6.99929157 11.9943899 6.99929157z",fill:"url(#e)"}))))}function od(){return c.createElement("svg",{id:"ignition",className:"w-8 h-8 -ml-1",viewBox:"0 0 500 500"},c.createElement("g",null,c.createElement("polygon",{style:{fill:"transparent"},points:"466.5,375 466.5,125 250,0 33.5,125 33.5,375 250,500 \t"}),c.createElement("g",null,c.createElement("polygon",{style:{fill:"#ff4590"},points:"314.2,176 314.2,250 250,287 250,212.6 \t\t"}),c.createElement("polygon",{style:{fill:"#ffd000"},points:"185.9,398.1 185.9,324.1 250,287 249.9,360.9 \t\t"}),c.createElement("polygon",{style:{fill:"#de075d"},points:"250,139.1 250,287 185.9,250 185.8,101.9 \t\t"}),c.createElement("polygon",{style:{fill:"#e0b800"},points:"249.9,360.9 250,287 314.1,324 314.1,398.1 \t\t"}))))}function id(e){var t=e.label,n=e.onChange;return c.createElement("label",{className:"flex items-center"},c.createElement("input",{type:"checkbox",checked:e.checked,onChange:function(e){return n(e.target.checked)},className:"sr-only peer"}),c.createElement("span",{className:"mr-2 flex items-center w-6 h-4 ~bg-gray-100 peer-checked:bg-emerald-300 rounded-full shadow-inner transition-colors"}),c.createElement("span",{className:"absolute left-0.5 top-0.5 w-3 h-3 ~bg-dropdown rounded-full shadow-md transform peer-checked:translate-x-2 transition-transform"}),c.createElement("span",{className:"uppercase tracking-wider text-xs font-medium"},t))}qf.Tab=e=>null;var ld=c.createContext();function sd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sd(Object(n),!0).forEach(function(t){fd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ud(e){return(ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||md(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pd(e){return function(e){if(Array.isArray(e))return hd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||md(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function md(e,t){if(e){if("string"==typeof e)return hd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hd(e,t):void 0}}function hd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gd=function(){},yd={},vd={},bd=null,Ed={mark:gd,measure:gd};try{"undefined"!=typeof window&&(yd=window),"undefined"!=typeof document&&(vd=document),"undefined"!=typeof MutationObserver&&(bd=MutationObserver),"undefined"!=typeof performance&&(Ed=performance)}catch(pa){}var Td=(yd.navigator||{}).userAgent,Sd=void 0===Td?"":Td,wd=yd,Nd=vd,Rd=bd,Od=Ed,Cd=!!Nd.documentElement&&!!Nd.head&&"function"==typeof Nd.addEventListener&&"function"==typeof Nd.createElement,xd=~Sd.indexOf("MSIE")||~Sd.indexOf("Trident/"),kd=["HTML","HEAD","STYLE","SCRIPT"],Ad=function(){try{return!1}catch(e){return!1}}(),Id={fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit",fa:"solid"},Ld={solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"},_d={fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},Pd={"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},Md=/fa[srltdbk\-\ ]/,Dd=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Kit)?.*/i,Ud={900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},jd=[1,2,3,4,5,6,7,8,9,10],Fd=jd.concat([11,12,13,14,15,16,17,18,19,20]),zd=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Bd=[].concat(pd(Object.keys(Ld)),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","duotone-group","swap-opacity","primary","secondary"]).concat(jd.map(function(e){return"".concat(e,"x")})).concat(Fd.map(function(e){return"w-".concat(e)})),Hd=wd.FontAwesomeConfig||{};Nd&&"function"==typeof Nd.querySelector&&[["data-family-prefix","familyPrefix"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(function(e){var t=dd(e,2),n=t[1],r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=Nd.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(t[0]));null!=r&&(Hd[n]=r)});var Vd=cd(cd({},{familyPrefix:"fa",styleDefault:"solid",replacementClass:"svg-inline--fa",autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0}),Hd);Vd.autoReplaceSvg||(Vd.observeMutations=!1);var Wd={};Object.keys(Vd).forEach(function(e){Object.defineProperty(Wd,e,{enumerable:!0,set:function(t){Vd[e]=t,Gd.forEach(function(e){return e(Wd)})},get:function(){return Vd[e]}})}),wd.FontAwesomeConfig=Wd;var Gd=[],Yd=16,$d={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Xd(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function qd(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function Kd(e){return e.classList?qd(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function Jd(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Qd(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function Zd(e){return e.size!==$d.size||e.x!==$d.x||e.y!==$d.y||e.rotate!==$d.rotate||e.flipX||e.flipY}function ep(){var e="fa",t="svg-inline--fa",n=Wd.familyPrefix,r=Wd.replacementClass,a=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),l=new RegExp("\\.".concat(t),"g");a=a.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(l,".".concat(r))}return a}var tp=!1;function np(){Wd.autoAddCss&&!tp&&(function(e){if(e&&Cd){var t=Nd.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=Nd.head.childNodes,r=null,a=n.length-1;a>-1;a--){var o=n[a],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=o)}Nd.head.insertBefore(t,r)}}(ep()),tp=!0)}var rp={mixout:function(){return{dom:{css:ep,insertCss:np}}},hooks:function(){return{beforeDOMElementCreation:function(){np()},beforeI2svg:function(){np()}}}},ap=wd||{};ap.___FONT_AWESOME___||(ap.___FONT_AWESOME___={}),ap.___FONT_AWESOME___.styles||(ap.___FONT_AWESOME___.styles={}),ap.___FONT_AWESOME___.hooks||(ap.___FONT_AWESOME___.hooks={}),ap.___FONT_AWESOME___.shims||(ap.___FONT_AWESOME___.shims=[]);var op=ap.___FONT_AWESOME___,ip=[],lp=!1;function sp(e){Cd&&(lp?setTimeout(e,0):ip.push(e))}function cp(e){var t=e.tag,n=e.attributes,r=void 0===n?{}:n,a=e.children,o=void 0===a?[]:a;return"string"==typeof e?Jd(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(Jd(e[n]),'" ')},"").trim()}(r),">").concat(o.map(cp).join(""),"</").concat(t,">")}function up(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}Cd&&((lp=(Nd.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Nd.readyState))||Nd.addEventListener("DOMContentLoaded",function e(){Nd.removeEventListener("DOMContentLoaded",e),lp=1,ip.map(function(e){return e()})}));var fp=function(e,t,n,r){var a,o,i,l=Object.keys(e),s=l.length,c=void 0!==r?function(e,t){return function(n,r,a,o){return e.call(t,n,r,a,o)}}(t,r):t;for(void 0===n?(a=1,i=e[l[0]]):(a=0,i=n);a<s;a++)i=c(i,e[o=l[a]],o,e);return i};function dp(e){var t=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&a)<<10)+(1023&o)+65536):(t.push(a),n--)}else t.push(a)}return t}(e);return 1===t.length?t[0].toString(16):null}function pp(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function mp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.skipHooks,a=void 0!==r&&r,o=pp(t);"function"!=typeof op.hooks.addPack||a?op.styles[e]=cd(cd({},op.styles[e]||{}),o):op.hooks.addPack(e,pp(t)),"fas"===e&&mp("fa",t)}var hp=op.styles,gp=op.shims,yp=Object.values(_d),vp=null,bp={},Ep={},Tp={},Sp={},wp={},Np=Object.keys(Id);function Rp(e,t){var n=t.split("-"),r=n[0],a=n.slice(1).join("-");return r!==e||""===a||~Bd.indexOf(a)?null:a}var Op=function(){var e=function(e){return fp(hp,function(t,n,r){return t[r]=fp(n,e,{}),t},{})};bp=e(function(e,t,n){return t[3]&&(e[t[3]]=n),t[2]&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=n}),e}),Ep=e(function(e,t,n){return e[n]=n,t[2]&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=n}),e}),wp=e(function(e,t,n){var r=t[2];return e[n]=n,r.forEach(function(t){e[t]=n}),e});var t="far"in hp||Wd.autoFetchSvg,n=fp(gp,function(e,n){var r=n[0],a=n[1],o=n[2];return"far"!==a||t||(a="fas"),"string"==typeof r&&(e.names[r]={prefix:a,iconName:o}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:a,iconName:o}),e},{names:{},unicodes:{}});Tp=n.names,Sp=n.unicodes,vp=Ip(Wd.styleDefault)};function Cp(e,t){return(bp[e]||{})[t]}function xp(e,t){return(wp[e]||{})[t]}function kp(e){return Tp[e]||{prefix:null,iconName:null}}function Ap(){return vp}function Ip(e){return Ld[e]||Ld[Id[e]]||(e in op.styles?e:null)||null}function Lp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.skipLookups,r=void 0!==n&&n,a=null,o=e.reduce(function(e,t){var n=Rp(Wd.familyPrefix,t);if(hp[t]?(t=yp.includes(t)?Pd[t]:t,a=t,e.prefix=t):Np.indexOf(t)>-1?(a=t,e.prefix=Ip(t)):n?e.iconName=n:t!==Wd.replacementClass&&e.rest.push(t),!r&&e.prefix&&e.iconName){var o="fa"===a?kp(e.iconName):{},i=xp(e.prefix,e.iconName);o.prefix&&(a=null),e.iconName=o.iconName||i||e.iconName,e.prefix=o.prefix||e.prefix,"far"!==e.prefix||hp.far||!hp.fas||Wd.autoFetchSvg||(e.prefix="fas")}return e},{prefix:null,iconName:null,rest:[]});return"fa"!==o.prefix&&"fa"!==a||(o.prefix=Ap()||"fas"),o}Gd.push(function(e){vp=Ip(e.styleDefault)}),Op();var _p=/*#__PURE__*/function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t,n;return t=e,(n=[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(t){e.definitions[t]=cd(cd({},e.definitions[t]||{}),a[t]),mp(t,a[t]);var n=_d[t];n&&mp(n,a[t]),Op()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map(function(t){var r=n[t],a=r.prefix,o=r.iconName,i=r.icon,l=i[2];e[a]||(e[a]={}),l.length>0&&l.forEach(function(t){"string"==typeof t&&(e[a][t]=i)}),e[a][o]=i}),e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Pp=[],Mp={},Dp={},Up=Object.keys(Dp);function jp(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=Mp[e]||[];return o.forEach(function(e){t=e.apply(null,[t].concat(r))}),t}function Fp(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=Mp[e]||[];a.forEach(function(e){e.apply(null,n)})}function zp(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Dp[e]?Dp[e].apply(null,t):void 0}function Bp(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Ap();if(t)return t=xp(n,t)||t,up(Hp.definitions,n,t)||up(op.styles,n,t)}var Hp=new _p,Vp={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Cd?(Fp("beforeI2svg",e),zp("pseudoElements2svg",e),zp("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.autoReplaceSvgRoot;!1===Wd.autoReplaceSvg&&(Wd.autoReplaceSvg=!0),Wd.observeMutations=!0,sp(function(){Gp({autoReplaceSvgRoot:t}),Fp("watch",e)})}},Wp={noAuto:function(){Wd.autoReplaceSvg=!1,Wd.observeMutations=!1,Fp("noAuto")},config:Wd,dom:Vp,parse:{icon:function(e){if(null===e)return null;if("object"===ud(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:xp(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=Ip(e[0]);return{prefix:n,iconName:xp(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(Wd.familyPrefix,"-"))>-1||e.match(Md))){var r=Lp(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||Ap(),iconName:xp(r.prefix,r.iconName)||r.iconName}}if("string"==typeof e){var a=Ap();return{prefix:a,iconName:xp(a,e)||e}}}},library:Hp,findIconDefinition:Bp,toHtml:cp},Gp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.autoReplaceSvgRoot,n=void 0===t?Nd:t;(Object.keys(op.styles).length>0||Wd.autoFetchSvg)&&Cd&&Wd.autoReplaceSvg&&Wp.dom.i2svg({node:n})};function Yp(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return cp(e)})}}),Object.defineProperty(e,"node",{get:function(){if(Cd){var t=Nd.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function $p(e){var t=e.icons,n=t.main,r=t.mask,a=e.prefix,o=e.iconName,i=e.transform,l=e.symbol,s=e.title,c=e.maskId,u=e.titleId,f=e.extra,d=e.watchable,p=void 0!==d&&d,m=r.found?r:n,h=m.width,g=m.height,y="fak"===a,v=[Wd.replacementClass,o?"".concat(Wd.familyPrefix,"-").concat(o):""].filter(function(e){return-1===f.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(f.classes).join(" "),b={children:[],attributes:cd(cd({},f.attributes),{},{"data-prefix":a,"data-icon":o,class:v,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(h," ").concat(g)})},E=y&&!~f.classes.indexOf("fa-fw")?{width:"".concat(h/g*16*.0625,"em")}:{};p&&(b.attributes["data-fa-i2svg"]=""),s&&(b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(u||Xd())},children:[s]}),delete b.attributes.title);var T=cd(cd({},b),{},{prefix:a,iconName:o,main:n,mask:r,maskId:c,transform:i,symbol:l,styles:cd(cd({},E),f.styles)}),S=r.found&&n.found?zp("generateAbstractMask",T)||{children:[],attributes:{}}:zp("generateAbstractIcon",T)||{children:[],attributes:{}},w=S.attributes;return T.children=S.children,T.attributes=w,l?function(e){var t=e.iconName,n=e.children,r=e.attributes,a=e.symbol,o=!0===a?"".concat(e.prefix,"-").concat(Wd.familyPrefix,"-").concat(t):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:cd(cd({},r),{},{id:o}),children:n}]}]}(T):function(e){var t=e.children,n=e.main,r=e.mask,a=e.attributes,o=e.styles,i=e.transform;if(Zd(i)&&n.found&&!r.found){var l={x:n.width/n.height/2,y:.5};a.style=Qd(cd(cd({},o),{},{"transform-origin":"".concat(l.x+i.x/16,"em ").concat(l.y+i.y/16,"em")}))}return[{tag:"svg",attributes:a,children:t}]}(T)}function Xp(e){var t=e.content,n=e.width,r=e.height,a=e.transform,o=e.title,i=e.extra,l=e.watchable,s=void 0!==l&&l,c=cd(cd(cd({},i.attributes),o?{title:o}:{}),{},{class:i.classes.join(" ")});s&&(c["data-fa-i2svg"]="");var u=cd({},i.styles);Zd(a)&&(u.transform=function(e){var t=e.transform,n=e.width,r=e.height,a=void 0===r?16:r,o=e.startCentered,i=void 0!==o&&o,l="";return l+=i&&xd?"translate(".concat(t.x/Yd-(void 0===n?16:n)/2,"em, ").concat(t.y/Yd-a/2,"em) "):i?"translate(calc(-50% + ".concat(t.x/Yd,"em), calc(-50% + ").concat(t.y/Yd,"em)) "):"translate(".concat(t.x/Yd,"em, ").concat(t.y/Yd,"em) "),(l+="scale(".concat(t.size/Yd*(t.flipX?-1:1),", ").concat(t.size/Yd*(t.flipY?-1:1),") "))+"rotate(".concat(t.rotate,"deg) ")}({transform:a,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=Qd(u);f.length>0&&(c.style=f);var d=[];return d.push({tag:"span",attributes:c,children:[t]}),o&&d.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),d}function qp(e){var t=e.content,n=e.title,r=e.extra,a=cd(cd(cd({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=Qd(r.styles);o.length>0&&(a.style=o);var i=[];return i.push({tag:"span",attributes:a,children:[t]}),n&&i.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),i}var Kp=op.styles;function Jp(e){var t=e[0],n=e[1],r=dd(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(Wd.familyPrefix,"-").concat("duotone-group")},children:[{tag:"path",attributes:{class:"".concat(Wd.familyPrefix,"-").concat("secondary"),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(Wd.familyPrefix,"-").concat("primary"),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}var Qp={found:!1,width:512,height:512};function Zp(e,t){var n=t;return"fa"===t&&null!==Wd.styleDefault&&(t=Ap()),new Promise(function(r,a){if(zp("missingIconAbstract"),"fa"===n){var o=kp(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&Kp[t]&&Kp[t][e])return r(Jp(Kp[t][e]));!function(e,t){Ad||Wd.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),r(cd(cd({},Qp),{},{icon:Wd.showMissingIcons&&e&&zp("missingIconAbstract")||{}}))})}var em=function(){},tm=Wd.measurePerformance&&Od&&Od.mark&&Od.measure?Od:{mark:em,measure:em},nm=function(e){return tm.mark("".concat('FA "6.1.1"'," ").concat(e," begins")),function(){return function(e){tm.mark("".concat('FA "6.1.1"'," ").concat(e," ends")),tm.measure("".concat('FA "6.1.1"'," ").concat(e),"".concat('FA "6.1.1"'," ").concat(e," begins"),"".concat('FA "6.1.1"'," ").concat(e," ends"))}(e)}},rm=function(){};function am(e){return"string"==typeof(e.getAttribute?e.getAttribute("data-fa-i2svg"):null)}function om(e){return Nd.createElementNS("http://www.w3.org/2000/svg",e)}function im(e){return Nd.createElement(e)}function lm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.ceFn,r=void 0===n?"svg"===e.tag?om:im:n;if("string"==typeof e)return Nd.createTextNode(e);var a=r(e.tag);Object.keys(e.attributes||[]).forEach(function(t){a.setAttribute(t,e.attributes[t])});var o=e.children||[];return o.forEach(function(e){a.appendChild(lm(e,{ceFn:r}))}),a}var sm={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(lm(e),t)}),null===t.getAttribute("data-fa-i2svg")&&Wd.keepOriginalSource){var n=Nd.createComment(function(e){var t=" ".concat(e.outerHTML," ");return"".concat(t,"Font Awesome fontawesome.com ")}(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){var t=e[0],n=e[1];if(~Kd(t).indexOf(Wd.replacementClass))return sm.replace(e);var r=new RegExp("".concat(Wd.familyPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var a=n[0].attributes.class.split(" ").reduce(function(e,t){return t===Wd.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" "),0===a.toNode.length?t.removeAttribute("class"):t.setAttribute("class",a.toNode.join(" "))}var o=n.map(function(e){return cp(e)}).join("\n");t.setAttribute("data-fa-i2svg",""),t.innerHTML=o}};function cm(e){e()}function um(e,t){var n="function"==typeof t?t:rm;if(0===e.length)n();else{var r=cm;"async"===Wd.mutateApproach&&(r=wd.requestAnimationFrame||cm),r(function(){var t=!0===Wd.autoReplaceSvg?sm.replace:sm[Wd.autoReplaceSvg]||sm.replace,r=nm("mutate");e.map(t),r(),n()})}}var fm=!1;function dm(){fm=!0}function pm(){fm=!1}var mm=null;function hm(e){if(Rd&&Wd.observeMutations){var t=e.treeCallback,n=void 0===t?rm:t,r=e.nodeCallback,a=void 0===r?rm:r,o=e.pseudoElementsCallback,i=void 0===o?rm:o,l=e.observeMutationsRoot,s=void 0===l?Nd:l;mm=new Rd(function(e){if(!fm){var t=Ap();qd(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!am(e.addedNodes[0])&&(Wd.searchPseudoElements&&i(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&Wd.searchPseudoElements&&i(e.target.parentNode),"attributes"===e.type&&am(e.target)&&~zd.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute("data-prefix"):null,n=e.getAttribute?e.getAttribute("data-icon"):null;return t&&n}(e.target)){var r=Lp(Kd(e.target)),o=r.iconName;e.target.setAttribute("data-prefix",r.prefix||t),o&&e.target.setAttribute("data-icon",o)}else(function(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Wd.replacementClass)})(e.target)&&a(e.target)})}}),Cd&&mm.observe(s,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function gm(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(e,t){var n=t.split(":"),r=n[0],a=n.slice(1);return r&&a.length>0&&(e[r]=a.join(":").trim()),e},{})),n}function ym(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=void 0!==e.innerText?e.innerText.trim():"",a=Lp(Kd(e));return a.prefix||(a.prefix=Ap()),t&&n&&(a.prefix=t,a.iconName=n),a.iconName&&a.prefix||a.prefix&&r.length>0&&(a.iconName=(Ep[a.prefix]||{})[e.innerText]||Cp(a.prefix,dp(e.innerText))),a}function vm(e){var t=qd(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Wd.autoA11y&&(n?t["aria-labelledby"]="".concat(Wd.replacementClass,"-title-").concat(r||Xd()):(t["aria-hidden"]="true",t.focusable="false")),t}function bm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=ym(e),r=n.iconName,a=n.prefix,o=n.rest,i=vm(e),l=jp("parseNodeAttributes",{},e),s=t.styleParser?gm(e):[];return cd({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:a,transform:$d,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:s,attributes:i}},l)}var Em=op.styles;function Tm(e){var t="nest"===Wd.autoReplaceSvg?bm(e,{styleParser:!1}):bm(e);return~t.extra.classes.indexOf("fa-layers-text")?zp("generateLayersText",e,t):zp("generateSvgReplacementMutation",e,t)}function Sm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Cd)return Promise.resolve();var n=Nd.documentElement.classList,r=function(e){return n.add("".concat("fontawesome-i2svg","-").concat(e))},a=function(e){return n.remove("".concat("fontawesome-i2svg","-").concat(e))},o=Object.keys(Wd.autoFetchSvg?Id:Em),i=[".".concat("fa-layers-text",":not([").concat("data-fa-i2svg","])")].concat(o.map(function(e){return".".concat(e,":not([").concat("data-fa-i2svg","])")})).join(", ");if(0===i.length)return Promise.resolve();var l=[];try{l=qd(e.querySelectorAll(i))}catch(e){}if(!(l.length>0))return Promise.resolve();r("pending"),a("complete");var s=nm("onTree"),c=l.reduce(function(e,t){try{var n=Tm(t);n&&e.push(n)}catch(e){Ad||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){um(n,function(){r("active"),r("complete"),a("pending"),"function"==typeof t&&t(),s(),e()})}).catch(function(e){s(),n(e)})})}function wm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Tm(e).then(function(e){e&&um([e],t)})}var Nm=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?$d:n,a=t.symbol,o=void 0!==a&&a,i=t.mask,l=void 0===i?null:i,s=t.maskId,c=void 0===s?null:s,u=t.title,f=void 0===u?null:u,d=t.titleId,p=void 0===d?null:d,m=t.classes,h=void 0===m?[]:m,g=t.attributes,y=void 0===g?{}:g,v=t.styles,b=void 0===v?{}:v;if(e){var E=e.prefix,T=e.iconName,S=e.icon;return Yp(cd({type:"icon"},e),function(){return Fp("beforeDOMElementCreation",{iconDefinition:e,params:t}),Wd.autoA11y&&(f?y["aria-labelledby"]="".concat(Wd.replacementClass,"-title-").concat(p||Xd()):(y["aria-hidden"]="true",y.focusable="false")),$p({icons:{main:Jp(S),mask:l?Jp(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:E,iconName:T,transform:cd(cd({},$d),r),symbol:o,title:f,maskId:c,titleId:p,extra:{attributes:y,styles:b,classes:h}})})}},Rm={mixout:function(){return{icon:(e=Nm,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(t||{}).icon?t:Bp(t||{}),a=n.mask;return a&&(a=(a||{}).icon?a:Bp(a||{})),e(r,cd(cd({},n),{},{mask:a}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=Sm,e.nodeCallback=wm,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=e.callback;return Sm(void 0===t?Nd:t,void 0===n?function(){}:n)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,r=t.title,a=t.titleId,o=t.prefix,i=t.transform,l=t.symbol,s=t.mask,c=t.maskId,u=t.extra;return new Promise(function(t,f){Promise.all([Zp(n,o),s.iconName?Zp(s.iconName,s.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(s){var f=dd(s,2);t([e,$p({icons:{main:f[0],mask:f[1]},prefix:o,iconName:n,transform:i,symbol:l,maskId:c,title:r,titleId:a,extra:u,watchable:!0})])}).catch(f)})},e.generateAbstractIcon=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.transform,i=Qd(e.styles);return i.length>0&&(r.style=i),Zd(o)&&(t=zp("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),n.push(t||a.icon),{children:n,attributes:r}}}},Om={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,r=void 0===n?[]:n;return Yp({type:"layer"},function(){Fp("beforeDOMElementCreation",{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(Wd.familyPrefix,"-layers")].concat(pd(r)).join(" ")},children:n}]})}}}},Cm={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.title,r=void 0===n?null:n,a=t.classes,o=void 0===a?[]:a,i=t.attributes,l=void 0===i?{}:i,s=t.styles,c=void 0===s?{}:s;return Yp({type:"counter",content:e},function(){return Fp("beforeDOMElementCreation",{content:e,params:t}),qp({content:e.toString(),title:r,extra:{attributes:l,styles:c,classes:["".concat(Wd.familyPrefix,"-layers-counter")].concat(pd(o))}})})}}}},xm={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?$d:n,a=t.title,o=void 0===a?null:a,i=t.classes,l=void 0===i?[]:i,s=t.attributes,c=void 0===s?{}:s,u=t.styles,f=void 0===u?{}:u;return Yp({type:"text",content:e},function(){return Fp("beforeDOMElementCreation",{content:e,params:t}),Xp({content:e,transform:cd(cd({},$d),r),title:o,extra:{attributes:c,styles:f,classes:["".concat(Wd.familyPrefix,"-layers-text")].concat(pd(l))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.title,r=t.transform,a=t.extra,o=null,i=null;if(xd){var l=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();o=s.width/l,i=s.height/l}return Wd.autoA11y&&!n&&(a.attributes["aria-hidden"]="true"),Promise.resolve([e,Xp({content:e.innerHTML,width:o,height:i,transform:r,title:n,extra:a,watchable:!0})])}}},km=new RegExp('"',"ug"),Am=[1105920,1112319];function Im(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(r,a){if(null!==e.getAttribute(n))return r();var o,i,l,s=qd(e.children).filter(function(e){return e.getAttribute("data-fa-pseudo-element")===t})[0],c=wd.getComputedStyle(e,t),u=c.getPropertyValue("font-family").match(Dd),f=c.getPropertyValue("font-weight"),d=c.getPropertyValue("content");if(s&&!u)return e.removeChild(s),r();if(u&&"none"!==d&&""!==d){var p=c.getPropertyValue("content"),m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(u[2])?Ld[u[2].toLowerCase()]:Ud[f],h=function(e){var t,n,r,a,o=e.replace(km,""),i=(r=(t=o).length,(a=t.charCodeAt(0))>=55296&&a<=56319&&r>1&&(n=t.charCodeAt(1))>=56320&&n<=57343?1024*(a-55296)+n-56320+65536:a),l=i>=Am[0]&&i<=Am[1],s=2===o.length&&o[0]===o[1];return{value:dp(s?o[0]:o),isSecondary:l||s}}(p),g=h.value,y=h.isSecondary,v=u[0].startsWith("FontAwesome"),b=Cp(m,g),E=b;if(v){var T=(i=Sp[o=g],l=Cp("fas",o),i||(l?{prefix:"fas",iconName:l}:null)||{prefix:null,iconName:null});T.iconName&&T.prefix&&(b=T.iconName,m=T.prefix)}if(!b||y||s&&s.getAttribute("data-prefix")===m&&s.getAttribute("data-icon")===E)r();else{e.setAttribute(n,E),s&&e.removeChild(s);var S={iconName:null,title:null,titleId:null,prefix:null,transform:$d,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},w=S.extra;w.attributes["data-fa-pseudo-element"]=t,Zp(b,m).then(function(a){var o=$p(cd(cd({},S),{},{icons:{main:a,mask:{prefix:null,iconName:null,rest:[]}},prefix:m,iconName:E,extra:w,watchable:!0})),i=Nd.createElement("svg");"::before"===t?e.insertBefore(i,e.firstChild):e.appendChild(i),i.outerHTML=o.map(function(e){return cp(e)}).join("\n"),e.removeAttribute(n),r()}).catch(a)}}else r()})}function Lm(e){return Promise.all([Im(e,"::before"),Im(e,"::after")])}function _m(e){return!(e.parentNode===document.head||~kd.indexOf(e.tagName.toUpperCase())||e.getAttribute("data-fa-pseudo-element")||e.parentNode&&"svg"===e.parentNode.tagName)}function Pm(e){if(Cd)return new Promise(function(t,n){var r=qd(e.querySelectorAll("*")).filter(_m).map(Lm),a=nm("searchPseudoElements");dm(),Promise.all(r).then(function(){a(),pm(),t()}).catch(function(){a(),pm(),n()})})}var Mm=!1,Dm=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],a=n.slice(1).join("-");if(r&&"h"===a)return e.flipX=!0,e;if(r&&"v"===a)return e.flipY=!0,e;if(a=parseFloat(a),isNaN(a))return e;switch(r){case"grow":e.size=e.size+a;break;case"shrink":e.size=e.size-a;break;case"left":e.x=e.x-a;break;case"right":e.x=e.x+a;break;case"up":e.y=e.y-a;break;case"down":e.y=e.y+a;break;case"rotate":e.rotate=e.rotate+a}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},Um={x:0,y:0,width:"100%",height:"100%"};function jm(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}!function(e,t){var n=Wp;Pp=e,Mp={},Object.keys(Dp).forEach(function(e){-1===Up.indexOf(e)&&delete Dp[e]}),Pp.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(n[e]=t[e]),"object"===ud(t[e])&&Object.keys(t[e]).forEach(function(r){n[e]||(n[e]={}),n[e][r]=t[e][r]})}),e.hooks){var r=e.hooks();Object.keys(r).forEach(function(e){Mp[e]||(Mp[e]=[]),Mp[e].push(r[e])})}e.provides&&e.provides(Dp)})}([rp,Rm,Om,Cm,xm,{hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=Pm,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node;Wd.searchPseudoElements&&Pm(void 0===t?Nd:t)}}},{mixout:function(){return{dom:{unwatch:function(){dm(),Mm=!0}}}},hooks:function(){return{bootstrap:function(){hm(jp("mutationObserverCallbacks",{}))},noAuto:function(){mm&&mm.disconnect()},watch:function(e){var t=e.observeMutationsRoot;Mm?pm():hm(jp("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},{mixout:function(){return{parse:{transform:function(e){return Dm(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=Dm(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,r=e.iconWidth,a={transform:"translate(".concat(e.containerWidth/2," 256)")},o="translate(".concat(32*n.x,", ").concat(32*n.y,") "),i="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),s={outer:a,inner:{transform:"".concat(o," ").concat(i," ").concat(l)},path:{transform:"translate(".concat(r/2*-1," -256)")}};return{tag:"g",attributes:cd({},s.outer),children:[{tag:"g",attributes:cd({},s.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:cd(cd({},t.icon.attributes),s.path)}]}]}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),r=n?Lp(n.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=Ap()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.mask,i=e.maskId,l=a.icon,s=o.icon,c=function(e){var t=e.transform,n=e.iconWidth,r={transform:"translate(".concat(e.containerWidth/2," 256)")},a="translate(".concat(32*t.x,", ").concat(32*t.y,") "),o="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),i="rotate(".concat(t.rotate," 0 0)");return{outer:r,inner:{transform:"".concat(a," ").concat(o," ").concat(i)},path:{transform:"translate(".concat(n/2*-1," -256)")}}}({transform:e.transform,containerWidth:o.width,iconWidth:a.width}),u={tag:"rect",attributes:cd(cd({},Um),{},{fill:"white"})},f=l.children?{children:l.children.map(jm)}:{},d={tag:"g",attributes:cd({},c.inner),children:[jm(cd({tag:l.tag,attributes:cd(cd({},l.attributes),c.path)},f))]},p={tag:"g",attributes:cd({},c.outer),children:[d]},m="mask-".concat(i||Xd()),h="clip-".concat(i||Xd()),g={tag:"mask",attributes:cd(cd({},Um),{},{id:m,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[u,p]},y={tag:"defs",children:[{tag:"clipPath",attributes:{id:h},children:(t=s,"g"===t.tag?t.children:[t])},g]};return n.push(y,{tag:"rect",attributes:cd({fill:"currentColor","clip-path":"url(#".concat(h,")"),mask:"url(#".concat(m,")")},Um)}),{children:n,attributes:r}}}},{provides:function(e){var t=!1;wd.matchMedia&&(t=wd.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:cd(cd({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=cd(cd({},r),{},{attributeName:"opacity"}),o={tag:"circle",attributes:cd(cd({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:cd(cd({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:cd(cd({},a),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:cd(cd({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:cd(cd({},a),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:cd(cd({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:cd(cd({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol");return e.symbol=null!==n&&(""===n||n),e}}}}]);var Fm,zm=Wp.parse,Bm=Wp.icon,Hm=n(function(e,t){!function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case c:case u:case a:case i:case o:case d:return p;default:var g=p&&p.$$typeof;switch(g){case s:case f:case h:case m:case l:return g;default:return t}}case r:return t}}}var T=u,S=s,w=l,N=n,R=f,O=a,C=h,x=m,k=r,A=i,I=o,L=d,_=!1;function P(e){return E(e)===u}t.AsyncMode=c,t.ConcurrentMode=T,t.ContextConsumer=S,t.ContextProvider=w,t.Element=N,t.ForwardRef=R,t.Fragment=O,t.Lazy=C,t.Memo=x,t.Portal=k,t.Profiler=A,t.StrictMode=I,t.Suspense=L,t.isAsyncMode=function(e){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||E(e)===c},t.isConcurrentMode=P,t.isContextConsumer=function(e){return E(e)===s},t.isContextProvider=function(e){return E(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===h},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===r},t.isProfiler=function(e){return E(e)===i},t.isStrictMode=function(e){return E(e)===o},t.isSuspense=function(e){return E(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===u||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===l||e.$$typeof===s||e.$$typeof===f||e.$$typeof===y||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},t.typeOf=E}()}),Vm=n(function(e){e.exports=Hm}),Wm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Gm=Function.call.bind(Object.prototype.hasOwnProperty),Ym={},$m=Gm;function Xm(e,t,n,r,a){for(var o in e)if($m(e,o)){var i;try{if("function"!=typeof e[o]){var l=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}i=e[o](t,o,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){i=e}if(!i||i instanceof Error||Fm((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in Ym)){Ym[i.message]=!0;var s=a?a():"";Fm("Failed "+n+" type: "+i.message+(null!=s?s:""))}}}Fm=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},Xm.resetWarningCache=function(){Ym={}};var qm,Km=Xm;function Jm(){return null}qm=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}};var Qm=n(function(e){e.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r="<<anonymous>>",a={array:c("array"),bigint:c("bigint"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:s(Jm),arrayOf:function(e){return s(function(t,n,r,a,o){if("function"!=typeof e)return new i("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var l=t[n];if(!Array.isArray(l))return new i("Invalid "+a+" `"+o+"` of type `"+d(l)+"` supplied to `"+r+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,r,a,o+"["+s+"]",Wm);if(c instanceof Error)return c}return null})},element:s(function(t,n,r,a,o){var l=t[n];return e(l)?null:new i("Invalid "+a+" `"+o+"` of type `"+d(l)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:s(function(e,t,n,r,a){var o=e[t];return Vm.isValidElementType(o)?null:new i("Invalid "+r+" `"+a+"` of type `"+d(o)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return s(function(t,n,a,o,l){return t[n]instanceof e?null:new i("Invalid "+o+" `"+l+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:r)+"` supplied to `"+a+"`, expected instance of `"+(e.name||r)+"`.");var s})},node:s(function(e,t,n,r,a){return f(e[t])?null:new i("Invalid "+r+" `"+a+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return s(function(t,n,r,a,o){if("function"!=typeof e)return new i("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],s=d(l);if("object"!==s)return new i("Invalid "+a+" `"+o+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var c in l)if(Gm(l,c)){var u=e(l,c,r,a,o+"."+c,Wm);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return qm(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),Jm;function t(t,n,r,a,l){for(var s=t[n],c=0;c<e.length;c++)if(o(s,e[c]))return null;var u=JSON.stringify(e,function(e,t){return"symbol"===p(t)?String(t):t});return new i("Invalid "+a+" `"+l+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+u+".")}return s(t)},oneOfType:function(e){if(!Array.isArray(e))return qm("Invalid argument supplied to oneOfType, expected an instance of array."),Jm;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return qm("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+m(n)+" at index "+t+"."),Jm}return s(function(t,n,r,a,o){for(var l=[],s=0;s<e.length;s++){var c=(0,e[s])(t,n,r,a,o,Wm);if(null==c)return null;c.data&&Gm(c.data,"expectedType")&&l.push(c.data.expectedType)}return new i("Invalid "+a+" `"+o+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return s(function(t,n,r,a,o){var l=t[n],s=d(l);if("object"!==s)return new i("Invalid "+a+" `"+o+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var f=e[c];if("function"!=typeof f)return u(r,a,o,c,p(f));var m=f(l,c,r,a,o+"."+c,Wm);if(m)return m}return null})},exact:function(e){return s(function(t,n,r,a,o){var s=t[n],c=d(s);if("object"!==c)return new i("Invalid "+a+" `"+o+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=l({},t[n],e);for(var m in f){var h=e[m];if(Gm(e,m)&&"function"!=typeof h)return u(r,a,o,m,p(h));if(!h)return new i("Invalid "+a+" `"+o+"` key `"+m+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=h(s,m,r,a,o+"."+m,Wm);if(g)return g}return null})}};function o(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function i(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function s(e){function t(t,n,a,o,l,s,c){if(o=o||r,s=s||a,c!==Wm){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}return null==n[a]?t?new i(null===n[a]?"The "+l+" `"+s+"` is marked as required in `"+o+"`, but its value is `null`.":"The "+l+" `"+s+"` is marked as required in `"+o+"`, but its value is `undefined`."):null:e(n,a,o,l,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function c(e){return s(function(t,n,r,a,o,l){var s=t[n];return d(s)!==e?new i("Invalid "+a+" `"+o+"` of type `"+p(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function u(e,t,n,r,a){return new i((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function f(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(f);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var a,o=r.call(t);if(r!==t.entries){for(;!(a=o.next()).done;)if(!f(a.value))return!1}else for(;!(a=o.next()).done;){var i=a.value;if(i&&!f(i[1]))return!1}return!0;default:return!1}}function d(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function p(e){if(null==e)return""+e;var t=d(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function m(e){var t=p(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return i.prototype=Error.prototype,a.checkPropTypes=Km,a.resetWarningCache=Km.resetWarningCache,a.PropTypes=a,a}(Vm.isElement)});function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zm(Object(n),!0).forEach(function(t){nh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function th(e){return(th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rh(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ah(e){return function(e){if(Array.isArray(e))return oh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oh(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ih(e){return t=e,(t-=0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1);var t}var lh=["style"];function sh(e){return e.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n,r=t.indexOf(":"),a=ih(t.slice(0,r)),o=t.slice(r+1).trim();return a.startsWith("webkit")?e[(n=a,n.charAt(0).toUpperCase()+n.slice(1))]=o:e[a]=o,e},{})}var ch=!1;try{ch=!1}catch(pa){}function uh(e){return e&&"object"===th(e)&&e.prefix&&e.iconName&&e.icon?e:zm.icon?zm.icon(e):null===e?null:e&&"object"===th(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function fh(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?nh({},e,t):{}}var dh=["forwardedRef"];function ph(e){var t=e.forwardedRef,n=rh(e,dh),r=n.mask,a=n.symbol,o=n.className,i=n.title,l=n.titleId,s=n.maskId,c=uh(n.icon),u=fh("classes",[].concat(ah(function(e){var t,n=e.flip,r=e.size,a=e.rotation,o=e.pull,i=(nh(t={"fa-beat":e.beat,"fa-fade":e.fade,"fa-beat-fade":e.beatFade,"fa-bounce":e.bounce,"fa-shake":e.shake,"fa-flash":e.flash,"fa-spin":e.spin,"fa-spin-reverse":e.spinReverse,"fa-spin-pulse":e.spinPulse,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-inverse":e.inverse,"fa-border":e.border,"fa-li":e.listItem,"fa-flip-horizontal":"horizontal"===n||"both"===n,"fa-flip-vertical":"vertical"===n||"both"===n},"fa-".concat(r),null!=r),nh(t,"fa-rotate-".concat(a),null!=a&&0!==a),nh(t,"fa-pull-".concat(o),null!=o),nh(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(i).map(function(e){return i[e]?e:null}).filter(function(e){return e})}(n)),ah(o.split(" ")))),f=fh("transform","string"==typeof n.transform?zm.transform(n.transform):n.transform),d=fh("mask",uh(r)),p=Bm(c,eh(eh(eh(eh({},u),f),d),{},{symbol:a,title:i,titleId:l,maskId:s}));if(!p)return function(){var e;!ch&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",c),null;var m=p.abstract,h={ref:t};return Object.keys(n).forEach(function(e){ph.defaultProps.hasOwnProperty(e)||(h[e]=n[e])}),mh(m[0],h)}ph.displayName="FontAwesomeIcon",ph.propTypes={beat:Qm.bool,border:Qm.bool,bounce:Qm.bool,className:Qm.string,fade:Qm.bool,flash:Qm.bool,mask:Qm.oneOfType([Qm.object,Qm.array,Qm.string]),maskId:Qm.string,fixedWidth:Qm.bool,inverse:Qm.bool,flip:Qm.oneOf(["horizontal","vertical","both"]),icon:Qm.oneOfType([Qm.object,Qm.array,Qm.string]),listItem:Qm.bool,pull:Qm.oneOf(["right","left"]),pulse:Qm.bool,rotation:Qm.oneOf([0,90,180,270]),shake:Qm.bool,size:Qm.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:Qm.bool,spinPulse:Qm.bool,spinReverse:Qm.bool,symbol:Qm.oneOfType([Qm.bool,Qm.string]),title:Qm.string,titleId:Qm.string,transform:Qm.oneOfType([Qm.string,Qm.object]),swapOpacity:Qm.bool},ph.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var mh=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var a=(n.children||[]).map(function(n){return e(t,n)}),o=Object.keys(n.attributes||{}).reduce(function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=sh(r);break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[ih(t)]=r}return e},{attrs:{}}),i=r.style,l=void 0===i?{}:i,s=rh(r,lh);return o.attrs.style=eh(eh({},o.attrs.style),l),t.apply(void 0,[n.tag,eh(eh({},o.attrs),s)].concat(ah(a)))}.bind(null,c.createElement),hh={prefix:"fas",iconName:"align-left",icon:[448,512,[],"f036","M256 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H256C273.7 32 288 46.33 288 64C288 81.67 273.7 96 256 96zM256 352H32C14.33 352 0 337.7 0 320C0 302.3 14.33 288 32 288H256C273.7 288 288 302.3 288 320C288 337.7 273.7 352 256 352zM0 192C0 174.3 14.33 160 32 160H416C433.7 160 448 174.3 448 192C448 209.7 433.7 224 416 224H32C14.33 224 0 209.7 0 192zM416 480H32C14.33 480 0 465.7 0 448C0 430.3 14.33 416 32 416H416C433.7 416 448 430.3 448 448C448 465.7 433.7 480 416 480z"]},gh={prefix:"fas",iconName:"angle-down",icon:[384,512,[8964],"f107","M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z"]},yh={prefix:"fas",iconName:"bug",icon:[512,512,[],"f188","M352 96V99.56C352 115.3 339.3 128 323.6 128H188.4C172.7 128 159.1 115.3 159.1 99.56V96C159.1 42.98 202.1 0 255.1 0C309 0 352 42.98 352 96zM41.37 105.4C53.87 92.88 74.13 92.88 86.63 105.4L150.6 169.4C151.3 170 151.9 170.7 152.5 171.4C166.8 164.1 182.9 160 199.1 160H312C329.1 160 345.2 164.1 359.5 171.4C360.1 170.7 360.7 170 361.4 169.4L425.4 105.4C437.9 92.88 458.1 92.88 470.6 105.4C483.1 117.9 483.1 138.1 470.6 150.6L406.6 214.6C405.1 215.3 405.3 215.9 404.6 216.5C410.7 228.5 414.6 241.9 415.7 256H480C497.7 256 512 270.3 512 288C512 305.7 497.7 320 480 320H416C416 344.6 410.5 367.8 400.6 388.6C402.7 389.9 404.8 391.5 406.6 393.4L470.6 457.4C483.1 469.9 483.1 490.1 470.6 502.6C458.1 515.1 437.9 515.1 425.4 502.6L362.3 439.6C337.8 461.4 306.5 475.8 272 479.2V240C272 231.2 264.8 224 255.1 224C247.2 224 239.1 231.2 239.1 240V479.2C205.5 475.8 174.2 461.4 149.7 439.6L86.63 502.6C74.13 515.1 53.87 515.1 41.37 502.6C28.88 490.1 28.88 469.9 41.37 457.4L105.4 393.4C107.2 391.5 109.3 389.9 111.4 388.6C101.5 367.8 96 344.6 96 320H32C14.33 320 0 305.7 0 288C0 270.3 14.33 256 32 256H96.3C97.38 241.9 101.3 228.5 107.4 216.5C106.7 215.9 106 215.3 105.4 214.6L41.37 150.6C28.88 138.1 28.88 117.9 41.37 105.4H41.37z"]},vh={prefix:"fas",iconName:"circle-half-stroke",icon:[512,512,[9680,"adjust"],"f042","M512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 64V448C362 448 448 362 448 256C448 149.1 362 64 256 64z"]},bh={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M128 32H32C14.31 32 0 46.31 0 64v96c0 17.69 14.31 32 32 32s32-14.31 32-32V96h64c17.69 0 32-14.31 32-32S145.7 32 128 32zM416 32h-96c-17.69 0-32 14.31-32 32s14.31 32 32 32h64v64c0 17.69 14.31 32 32 32s32-14.31 32-32V64C448 46.31 433.7 32 416 32zM128 416H64v-64c0-17.69-14.31-32-32-32s-32 14.31-32 32v96c0 17.69 14.31 32 32 32h96c17.69 0 32-14.31 32-32S145.7 416 128 416zM416 320c-17.69 0-32 14.31-32 32v64h-64c-17.69 0-32 14.31-32 32s14.31 32 32 32h96c17.69 0 32-14.31 32-32v-96C448 334.3 433.7 320 416 320z"]},Eh={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"]},Th={prefix:"fas",iconName:"moon",icon:[512,512,[127769,9214],"f186","M32 256c0-123.8 100.3-224 223.8-224c11.36 0 29.7 1.668 40.9 3.746c9.616 1.777 11.75 14.63 3.279 19.44C245 86.5 211.2 144.6 211.2 207.8c0 109.7 99.71 193 208.3 172.3c9.561-1.805 16.28 9.324 10.11 16.95C387.9 448.6 324.8 480 255.8 480C132.1 480 32 379.6 32 256z"]},Sh={prefix:"fas",iconName:"share",icon:[512,512,["arrow-turn-right","mail-forward"],"f064","M503.7 226.2l-176 151.1c-15.38 13.3-39.69 2.545-39.69-18.16V272.1C132.9 274.3 66.06 312.8 111.4 457.8c5.031 16.09-14.41 28.56-28.06 18.62C39.59 444.6 0 383.8 0 322.3c0-152.2 127.4-184.4 288-186.3V56.02c0-20.67 24.28-31.46 39.69-18.16l176 151.1C514.8 199.4 514.8 216.6 503.7 226.2z"]},wh={prefix:"fas",iconName:"shield-halved",icon:[512,512,["shield-alt"],"f3ed","M256-.0078C260.7-.0081 265.2 1.008 269.4 2.913L457.7 82.79C479.7 92.12 496.2 113.8 496 139.1C495.5 239.2 454.7 420.7 282.4 503.2C265.7 511.1 246.3 511.1 229.6 503.2C57.25 420.7 16.49 239.2 15.1 139.1C15.87 113.8 32.32 92.12 54.3 82.79L242.7 2.913C246.8 1.008 251.4-.0081 256-.0078V-.0078zM256 444.8C393.1 378 431.1 230.1 432 141.4L256 66.77L256 444.8z"]},Nh={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M256 159.1c-53.02 0-95.1 42.98-95.1 95.1S202.1 351.1 256 351.1s95.1-42.98 95.1-95.1S309 159.1 256 159.1zM509.3 347L446.1 255.1l63.15-91.01c6.332-9.125 1.104-21.74-9.826-23.72l-109-19.7l-19.7-109c-1.975-10.93-14.59-16.16-23.72-9.824L256 65.89L164.1 2.736c-9.125-6.332-21.74-1.107-23.72 9.824L121.6 121.6L12.56 141.3C1.633 143.2-3.596 155.9 2.736 164.1L65.89 256l-63.15 91.01c-6.332 9.125-1.105 21.74 9.824 23.72l109 19.7l19.7 109c1.975 10.93 14.59 16.16 23.72 9.824L256 446.1l91.01 63.15c9.127 6.334 21.75 1.107 23.72-9.822l19.7-109l109-19.7C510.4 368.8 515.6 356.1 509.3 347zM256 383.1c-70.69 0-127.1-57.31-127.1-127.1c0-70.69 57.31-127.1 127.1-127.1s127.1 57.3 127.1 127.1C383.1 326.7 326.7 383.1 256 383.1z"]},Rh={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"]};function Oh(e){var t=e.url,n=e.openText;return c.createElement("div",null,c.createElement("p",{className:"text-sm mb-1"},e.helpText),c.createElement("div",{className:"flex gap-3"},c.createElement("a",{href:t,target:"_blank",className:"underline ~text-violet-500 hover:~text-violet-600"},c.createElement(ph,{icon:Rh,className:"opacity-50 text-xs mr-1"}),n),c.createElement(zo,{alwaysVisible:!0,direction:"left",value:t})))}function Ch(e){var t=[];return e.includes("stackTrace")&&t.push("stackTraceTab"),e.includes("context")&&t.push("requestTab","appTab","userTab","contextTab"),e.includes("debug")&&t.push("debugTab"),t}function xh(e,t){return t.includes("stackTrace")||(e.stacktrace=e.stacktrace.slice(0,1)),t.includes("debug")||(e.glows=[],e.context.dumps=[],e.context.queries=[],e.context.logs=[]),t.includes("context")||(e.context.request_data={queryString:{},body:{},files:[]},e.context.headers={},e.context.cookies={},e.context.session={},e.context.route=null,e.context.user=null,delete e.context.git,delete e.context.livewire,e.context.view=null),e}function kh(t){var n=t.isOpen,r=c.useContext(ld),a=c.useState(null),o=a[0],i=a[1],l=c.useState(null),s=l[0],u=l[1],f=c.useState(!1),d=f[0],p=f[1],m=c.useState([{name:"stackTrace",label:"Stack",selected:!0},{name:"context",label:"Context",selected:!0},{name:"debug",label:"Debug",selected:!0}]),h=m[0],g=m[1];return c.createElement("div",{className:"block absolute mt-2 top-10 right-1/2 transform translate-x-8 transition-all duration-150 origin-top-right\n "+(n?"":"opacity-0 pointer-events-none scale-90")},c.createElement("div",{className:"flex px-4 justify-end"},c.createElement("div",{className:"w-0 h-0 border-[10px] border-t-0 border-transparent ~border-b-dropdown"})),c.createElement("div",{className:"flex flex-col gap-6 ~bg-dropdown px-10 py-8 shadow-2xl"},c.createElement("div",{className:"flex items-center justify-between gap-6"},c.createElement("h4",{className:"whitespace-nowrap font-semibold"},"Share with Flare"),c.createElement("a",{className:"text-xs ~text-gray-500 hover:text-violet-500 flex items-center underline transition-colors",href:"https://flareapp.io/docs/ignition/introducing-ignition/sharing-errors?utm_campaign=ignition&utm_source=ignition",target:"_blank"},"Docs",c.createElement(ad,null))),!o&&c.createElement(c.Fragment,null,c.createElement("ul",{className:"grid justify-start gap-3"},h.map(function(t){var n=t.name;return c.createElement("li",{key:n},c.createElement(id,{onChange:function(){return t=n,void(h.find(function(e){return e.name===t})&&g(h.map(function(n){return n.name===t?e({},n,{selected:!n.selected}):n})));var t},checked:t.selected,label:t.label}))})),c.createElement("div",{className:"flex items-center gap-4"},c.createElement(Uc,{disabled:d||!h.some(function(e){return e.selected}),className:"bg-violet-500 border-violet-500/25 CopyButton text-white",onClick:function(){try{var e=function(){p(!1)};if(!r.config.shareEndpoint)return Promise.resolve();u(null),p(!0);var t=h.filter(function(e){return e.selected}).map(function(e){return e.name}),n=function(e,n){try{var a=Promise.resolve(function(e,t){var n={tabs:Ch(t),lineSelection:window.location.hash,report:xh(e.shareableReport,t)};return new Promise(function(t,r){try{var a=function(){r()},o=function(r,a){try{var o=Promise.resolve(fetch(e.config.shareEndpoint,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json",Accept:"application/json"}})).then(function(e){return Promise.resolve(e.json()).then(function(e){e&&e.owner_url&&e.public_url&&t(e)})})}catch(e){return a(e)}return o&&o.then?o.then(void 0,a):o}(0,function(e){r(e)});return Promise.resolve(o&&o.then?o.then(a):a())}catch(e){return Promise.reject(e)}})}(r,t)).then(function(e){window.open(e.owner_url),i(e.public_url)})}catch(e){return n(e)}return a&&a.then?a.then(void 0,n):a}(0,function(e){console.error(e),u("Something went wrong while sharing, please try again.")});return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}},c.createElement(ph,{icon:Rh,className:"opacity-50 text-xs mr-1"}),"Create Share"))),o&&c.createElement("div",{className:"grid grid-cols-1 gap-4"},c.createElement(Oh,{url:o,helpText:"Share your error with others",openText:"Visit public share"})),s&&c.createElement("p",{className:"text-red-500"},s)))}function Ah(t){var n,r=t.isOpen,a=c.useContext(ld),o=c.useContext(Te),i=o.ignitionConfig,l=o.setIgnitionConfig,s=c.useState(i.editor||""),u=s[0],f=s[1],d=c.useState(null),p=d[0],m=d[1],h=c.useState(!1),g=h[0],y=h[1],v=c.useState(!1),b=v[0],E=v[1],T=c.useState([{value:"light",icon:c.createElement(ph,{icon:Nh,className:"group-hover:text-amber-400"}),selected:"light"===i.theme},{value:"dark",icon:c.createElement(ph,{icon:Th,className:"group-hover:text-amber-300"}),selected:"dark"===i.theme},{value:"auto",icon:c.createElement(ph,{icon:vh,className:"group-hover:text-indigo-500"}),selected:"auto"===i.theme}]),S=T[0],w=T[1];return c.createElement("div",{className:"\n absolute mt-2 top-10 right-1/2 translate-x-6 transition-all duration-150 origin-top-right\n "+(r?"":"opacity-0 pointer-events-none scale-90")+"\n "},c.createElement("div",{className:"flex px-4 justify-end"},c.createElement("div",{className:"w-0 h-0 border-[10px] border-t-0 border-transparent ~border-b-dropdown"})),c.createElement("div",{className:"flex flex-col gap-6 ~bg-dropdown px-10 py-8 shadow-2xl"},c.createElement("div",{className:"flex items-center justify-between gap-6"},c.createElement("h4",{className:"whitespace-nowrap font-semibold"},"Ignition Settings"),c.createElement("a",{className:"text-xs ~text-gray-500 hover:text-red-500 flex items-center underline transition-colors",href:"https://flareapp.io/ignition?utm_campaign=ignition&utm_source=ignition",target:"_blank"},"Docs",c.createElement(od,null))),c.createElement("label",{htmlFor:"editor-select"},c.createElement("span",{className:"uppercase tracking-wider ~text-gray-500 text-xs font-bold"},"Editor"),c.createElement("div",{className:"group mt-2"},c.createElement("select",{id:"editor-select",className:"block appearance-none w-full ~bg-gray-500/5 h-12 px-4 pr-8 rounded-none leading-tight",value:u,onChange:function(t){return function(t){f(t),l(e({},i,{editor:t}))}(t.target.value)}},Object.entries((null==i?void 0:i.editorOptions)||[]).map(function(e){var t=e[0];return c.createElement("option",{className:"text-gray-800",key:t,value:t},e[1].label)})),c.createElement("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-4"},c.createElement(ph,{icon:gh,className:"group-hover:text-indigo-500 text-sm"})))),c.createElement("div",null,c.createElement("span",{className:"uppercase tracking-wider ~text-gray-500 text-xs font-bold"},"Theme"),c.createElement("button",{className:"mt-2 w-full ~bg-gray-500/5 rounded-none leading-tight",onClick:function(){var t=S.findIndex(function(e){return e.selected}),n=-1===t||t===S.length-1?0:t+1;m(S[t].value),w([].concat(S.map(function(e,t){return e.selected=t===n,e}))),l(e({},i,{theme:S[n].value}))}},c.createElement("div",{className:"group flex items-center",style:{WebkitMaskImage:"linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%)"}},c.createElement("div",{className:"px-4"},S.map(function(e){var t=e.value,n=e.selected;return c.createElement("div",{key:t,className:"\n h-12 flex items-center origin-bottom\n "+(n?"transition-transform duration-1000":"")+"\n "+(t===p?"transition-transform duration-1000 absolute top-0 left-4 rotate-180":"")+"\n "+(n||t===p?"":"absolute top-0 left-4 -rotate-180")+"\n "},c.createElement("span",{className:"text-sm ~text-gray-500 transition-colors duration-500"},e.icon))})),c.createElement("div",{id:"theme-name",className:"-ml-1 first-letter:uppercase"},null==(n=S.find(function(e){return e.selected}))?void 0:n.value)))),c.createElement("div",{className:"flex items-center gap-4"},c.createElement(Uc,{onClick:function(){try{return g?Promise.resolve():Promise.resolve(function(e,t){try{var n=function(e,t){try{var n=function(){var e;if(E(!1),y(!0),a.updateConfigEndpoint)return Promise.resolve(fetch(a.updateConfigEndpoint,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({editor:u,theme:null==(e=S.find(function(e){return e.selected}))?void 0:e.value,hide_solutions:!1})})).then(function(e){E(e.status>=200&&e.status<300),setTimeout(function(){E(!1)},3e3)})}()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(0,function(e){console.error(e),E(!1)})}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}(0,function(e,t){if(y(!1),e)throw t;return t}))}catch(e){return Promise.reject(e)}},disabled:g,className:"bg-red-500 border-red-500/25 text-white"},"Save settings"),b&&c.createElement("p",{className:"text-emerald-500 text-sm"},"Saved!")),c.createElement("p",{className:"text-xs"},"Settings will be saved locally in ",c.createElement(rd,null,"~/.ignition.json"),".")))}var Ih={prefix:"fab",iconName:"laravel",icon:[512,512,[],"f3bd","M504.4 115.8a5.72 5.72 0 0 0 -.28-.68 8.52 8.52 0 0 0 -.53-1.25 6 6 0 0 0 -.54-.71 9.36 9.36 0 0 0 -.72-.94c-.23-.22-.52-.4-.77-.6a8.84 8.84 0 0 0 -.9-.68L404.4 55.55a8 8 0 0 0 -8 0L300.1 111h0a8.07 8.07 0 0 0 -.88 .69 7.68 7.68 0 0 0 -.78 .6 8.23 8.23 0 0 0 -.72 .93c-.17 .24-.39 .45-.54 .71a9.7 9.7 0 0 0 -.52 1.25c-.08 .23-.21 .44-.28 .68a8.08 8.08 0 0 0 -.28 2.08V223.2l-80.22 46.19V63.44a7.8 7.8 0 0 0 -.28-2.09c-.06-.24-.2-.45-.28-.68a8.35 8.35 0 0 0 -.52-1.24c-.14-.26-.37-.47-.54-.72a9.36 9.36 0 0 0 -.72-.94 9.46 9.46 0 0 0 -.78-.6 9.8 9.8 0 0 0 -.88-.68h0L115.6 1.07a8 8 0 0 0 -8 0L11.34 56.49h0a6.52 6.52 0 0 0 -.88 .69 7.81 7.81 0 0 0 -.79 .6 8.15 8.15 0 0 0 -.71 .93c-.18 .25-.4 .46-.55 .72a7.88 7.88 0 0 0 -.51 1.24 6.46 6.46 0 0 0 -.29 .67 8.18 8.18 0 0 0 -.28 2.1v329.7a8 8 0 0 0 4 6.95l192.5 110.8a8.83 8.83 0 0 0 1.33 .54c.21 .08 .41 .2 .63 .26a7.92 7.92 0 0 0 4.1 0c.2-.05 .37-.16 .55-.22a8.6 8.6 0 0 0 1.4-.58L404.4 400.1a8 8 0 0 0 4-6.95V287.9l92.24-53.11a8 8 0 0 0 4-7V117.9A8.63 8.63 0 0 0 504.4 115.8zM111.6 17.28h0l80.19 46.15-80.2 46.18L31.41 63.44zm88.25 60V278.6l-46.53 26.79-33.69 19.4V123.5l46.53-26.79zm0 412.8L23.37 388.5V77.32L57.06 96.7l46.52 26.8V338.7a6.94 6.94 0 0 0 .12 .9 8 8 0 0 0 .16 1.18h0a5.92 5.92 0 0 0 .38 .9 6.38 6.38 0 0 0 .42 1v0a8.54 8.54 0 0 0 .6 .78 7.62 7.62 0 0 0 .66 .84l0 0c.23 .22 .52 .38 .77 .58a8.93 8.93 0 0 0 .86 .66l0 0 0 0 92.19 52.18zm8-106.2-80.06-45.32 84.09-48.41 92.26-53.11 80.13 46.13-58.8 33.56zm184.5 4.57L215.9 490.1V397.8L346.6 323.2l45.77-26.15zm0-119.1L358.7 250l-46.53-26.79V131.8l33.69 19.4L392.4 178zm8-105.3-80.2-46.17 80.2-46.16 80.18 46.15zm8 105.3V178L455 151.2l33.68-19.4v91.39h0z"]},Lh={prefix:"fab",iconName:"php",icon:[640,512,[],"f457","M320 104.5c171.4 0 303.2 72.2 303.2 151.5S491.3 407.5 320 407.5c-171.4 0-303.2-72.2-303.2-151.5S148.7 104.5 320 104.5m0-16.8C143.3 87.7 0 163 0 256s143.3 168.3 320 168.3S640 349 640 256 496.7 87.7 320 87.7zM218.2 242.5c-7.9 40.5-35.8 36.3-70.1 36.3l13.7-70.6c38 0 63.8-4.1 56.4 34.3zM97.4 350.3h36.7l8.7-44.8c41.1 0 66.6 3 90.2-19.1 26.1-24 32.9-66.7 14.3-88.1-9.7-11.2-25.3-16.7-46.5-16.7h-70.7L97.4 350.3zm185.7-213.6h36.5l-8.7 44.8c31.5 0 60.7-2.3 74.8 10.7 14.8 13.6 7.7 31-8.3 113.1h-37c15.4-79.4 18.3-86 12.7-92-5.4-5.8-17.7-4.6-47.4-4.6l-18.8 96.6h-36.5l32.7-168.6zM505 242.5c-8 41.1-36.7 36.3-70.1 36.3l13.7-70.6c38.2 0 63.8-4.1 56.4 34.3zM384.2 350.3H421l8.7-44.8c43.2 0 67.1 2.5 90.2-19.1 26.1-24 32.9-66.7 14.3-88.1-9.7-11.2-25.3-16.7-46.5-16.7H417l-32.8 168.7z"]},_h="object"==typeof t&&t&&t.Object===Object&&t,Ph="object"==typeof self&&self&&self.Object===Object&&self,Mh=_h||Ph||Function("return this")(),Dh=Mh.Symbol,Uh=Object.prototype,jh=Uh.hasOwnProperty,Fh=Uh.toString,zh=Dh?Dh.toStringTag:void 0,Bh=Object.prototype.toString,Hh=Dh?Dh.toStringTag:void 0,Vh=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Hh&&Hh in Object(e)?function(e){var t=jh.call(e,zh),n=e[zh];try{e[zh]=void 0;var r=!0}catch(e){}var a=Fh.call(e);return r&&(t?e[zh]=n:delete e[zh]),a}(e):function(e){return Bh.call(e)}(e)},Wh=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Gh=function(e){if(!Wh(e))return!1;var t=Vh(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Yh=Mh["__core-js_shared__"],$h=function(){var e=/[^.]+$/.exec(Yh&&Yh.keys&&Yh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Xh=Function.prototype.toString,qh=function(e){if(null!=e){try{return Xh.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Kh=/^\[object .+?Constructor\]$/,Jh=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qh=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Wh(e)||function(e){return!!$h&&$h in e}(e))&&(Gh(e)?Jh:Kh).test(qh(e))}(n)?n:void 0},Zh=function(){try{var e=Qh(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),eg=function(e,t,n){"__proto__"==t&&Zh?Zh(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},tg=function(e){return null!=e&&"object"==typeof e},ng=function(e){return tg(e)&&"[object Arguments]"==Vh(e)},rg=Object.prototype,ag=rg.hasOwnProperty,og=rg.propertyIsEnumerable,ig=ng(function(){return arguments}())?ng:function(e){return tg(e)&&ag.call(e,"callee")&&!og.call(e,"callee")},lg=Array.isArray,sg=function(){return!1},cg=n(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,a=r&&r.exports===n?Mh.Buffer:void 0;e.exports=(a?a.isBuffer:void 0)||sg}),ug=/^(?:0|[1-9]\d*)$/,fg=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ug.test(e))&&e>-1&&e%1==0&&e<t},dg=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},pg={};pg["[object Float32Array]"]=pg["[object Float64Array]"]=pg["[object Int8Array]"]=pg["[object Int16Array]"]=pg["[object Int32Array]"]=pg["[object Uint8Array]"]=pg["[object Uint8ClampedArray]"]=pg["[object Uint16Array]"]=pg["[object Uint32Array]"]=!0,pg["[object Arguments]"]=pg["[object Array]"]=pg["[object ArrayBuffer]"]=pg["[object Boolean]"]=pg["[object DataView]"]=pg["[object Date]"]=pg["[object Error]"]=pg["[object Function]"]=pg["[object Map]"]=pg["[object Number]"]=pg["[object Object]"]=pg["[object RegExp]"]=pg["[object Set]"]=pg["[object String]"]=pg["[object WeakMap]"]=!1;var mg=n(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,a=r&&r.exports===n&&_h.process,o=function(){try{return r&&r.require&&r.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=o}),hg=mg&&mg.isTypedArray,gg=hg?function(e){return function(t){return e(t)}}(hg):function(e){return tg(e)&&dg(e.length)&&!!pg[Vh(e)]},yg=Object.prototype.hasOwnProperty,vg=Object.prototype,bg=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Eg=Object.prototype.hasOwnProperty,Tg=function(e){return null!=e&&dg(e.length)&&!Gh(e)},Sg=function(e){return Tg(e)?function(e,t){var n=lg(e),r=!n&&ig(e),a=!n&&!r&&cg(e),o=!n&&!r&&!a&&gg(e),i=n||r||a||o,l=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=l.length;for(var c in e)!yg.call(e,c)||i&&("length"==c||a&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||fg(c,s))||l.push(c);return l}(e):function(e){if((t=e)!==("function"==typeof(n=t&&t.constructor)&&n.prototype||vg))return bg(e);var t,n,r=[];for(var a in Object(e))Eg.call(e,a)&&"constructor"!=a&&r.push(a);return r}(e)},wg=function(e,t){return e&&function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var l=o[++r];if(!1===t(a[l],l,a))break}return e}(e,t,Sg)},Ng=function(e,t){return e===t||e!=e&&t!=t},Rg=function(e,t){for(var n=e.length;n--;)if(Ng(e[n][0],t))return n;return-1},Og=Array.prototype.splice;function Cg(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cg.prototype.clear=function(){this.__data__=[],this.size=0},Cg.prototype.delete=function(e){var t=this.__data__,n=Rg(t,e);return!(n<0||(n==t.length-1?t.pop():Og.call(t,n,1),--this.size,0))},Cg.prototype.get=function(e){var t=this.__data__,n=Rg(t,e);return n<0?void 0:t[n][1]},Cg.prototype.has=function(e){return Rg(this.__data__,e)>-1},Cg.prototype.set=function(e,t){var n=this.__data__,r=Rg(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var xg=Cg,kg=Qh(Mh,"Map"),Ag=Qh(Object,"create"),Ig=Object.prototype.hasOwnProperty,Lg=Object.prototype.hasOwnProperty;function _g(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_g.prototype.clear=function(){this.__data__=Ag?Ag(null):{},this.size=0},_g.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_g.prototype.get=function(e){var t=this.__data__;if(Ag){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ig.call(t,e)?t[e]:void 0},_g.prototype.has=function(e){var t=this.__data__;return Ag?void 0!==t[e]:Lg.call(t,e)},_g.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ag&&void 0===t?"__lodash_hash_undefined__":t,this};var Pg=_g,Mg=function(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map};function Dg(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dg.prototype.clear=function(){this.size=0,this.__data__={hash:new Pg,map:new(kg||xg),string:new Pg}},Dg.prototype.delete=function(e){var t=Mg(this,e).delete(e);return this.size-=t?1:0,t},Dg.prototype.get=function(e){return Mg(this,e).get(e)},Dg.prototype.has=function(e){return Mg(this,e).has(e)},Dg.prototype.set=function(e,t){var n=Mg(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Ug=Dg;function jg(e){var t=this.__data__=new xg(e);this.size=t.size}jg.prototype.clear=function(){this.__data__=new xg,this.size=0},jg.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},jg.prototype.get=function(e){return this.__data__.get(e)},jg.prototype.has=function(e){return this.__data__.has(e)},jg.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xg){var r=n.__data__;if(!kg||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ug(r)}return n.set(e,t),this.size=n.size,this};var Fg=jg;function zg(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ug;++t<n;)this.add(e[t])}zg.prototype.add=zg.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},zg.prototype.has=function(e){return this.__data__.has(e)};var Bg=zg,Hg=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Vg=function(e,t){return e.has(t)},Wg=function(e,t,n,r,a,o){var i=1&n,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,p=2&n?new Bg:void 0;for(o.set(e,t),o.set(t,e);++f<l;){var m=e[f],h=t[f];if(r)var g=i?r(h,m,f,t,e,o):r(m,h,f,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!Hg(t,function(e,t){if(!Vg(p,t)&&(m===e||a(m,e,n,r,o)))return p.push(t)})){d=!1;break}}else if(m!==h&&!a(m,h,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d},Gg=Mh.Uint8Array,Yg=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},$g=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},Xg=Dh?Dh.prototype:void 0,qg=Xg?Xg.valueOf:void 0,Kg=Object.prototype.propertyIsEnumerable,Jg=Object.getOwnPropertySymbols,Qg=Jg?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,a=null==t?0:t.length,o=0,i=[];++r<a;){var l=t[r];Kg.call(e,l)&&(i[o++]=l)}return i}(Jg(e)))}:function(){return[]},Zg=function(e){return function(e,t,n){var r=Sg(e);return lg(e)?r:function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,0,Qg)},ey=Object.prototype.hasOwnProperty,ty=Qh(Mh,"DataView"),ny=Qh(Mh,"Promise"),ry=Qh(Mh,"Set"),ay=Qh(Mh,"WeakMap"),oy=qh(ty),iy=qh(kg),ly=qh(ny),sy=qh(ry),cy=qh(ay),uy=Vh;(ty&&"[object DataView]"!=uy(new ty(new ArrayBuffer(1)))||kg&&"[object Map]"!=uy(new kg)||ny&&"[object Promise]"!=uy(ny.resolve())||ry&&"[object Set]"!=uy(new ry)||ay&&"[object WeakMap]"!=uy(new ay))&&(uy=function(e){var t=Vh(e),n="[object Object]"==t?e.constructor:void 0,r=n?qh(n):"";if(r)switch(r){case oy:return"[object DataView]";case iy:return"[object Map]";case ly:return"[object Promise]";case sy:return"[object Set]";case cy:return"[object WeakMap]"}return t});var fy=uy,dy="[object Object]",py=Object.prototype.hasOwnProperty,my=function e(t,n,r,a,o){return t===n||(null==t||null==n||!tg(t)&&!tg(n)?t!=t&&n!=n:function(e,t,n,r,a,o){var i=lg(e),l=lg(t),s=i?"[object Array]":fy(e),c=l?"[object Array]":fy(t),u=(s="[object Arguments]"==s?dy:s)==dy,f=(c="[object Arguments]"==c?dy:c)==dy,d=s==c;if(d&&cg(e)){if(!cg(t))return!1;i=!0,u=!1}if(d&&!u)return o||(o=new Fg),i||gg(e)?Wg(e,t,n,r,a,o):function(e,t,n,r,a,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Gg(e),new Gg(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ng(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Yg;case"[object Set]":if(l||(l=$g),e.size!=t.size&&!(1&r))return!1;var s=i.get(e);if(s)return s==t;r|=2,i.set(e,t);var c=Wg(l(e),l(t),r,a,o,i);return i.delete(e),c;case"[object Symbol]":if(qg)return qg.call(e)==qg.call(t)}return!1}(e,t,s,n,r,a,o);if(!(1&n)){var p=u&&py.call(e,"__wrapped__"),m=f&&py.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return o||(o=new Fg),a(h,g,n,r,o)}}return!!d&&(o||(o=new Fg),function(e,t,n,r,a,o){var i=1&n,l=Zg(e),s=l.length;if(s!=Zg(t).length&&!i)return!1;for(var c=s;c--;){var u=l[c];if(!(i?u in t:ey.call(t,u)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=i;++c<s;){var h=e[u=l[c]],g=t[u];if(r)var y=i?r(g,h,u,t,e,o):r(h,g,u,e,t,o);if(!(void 0===y?h===g||a(h,g,n,r,o):y)){p=!1;break}m||(m="constructor"==u)}if(p&&!m){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,r,a,o))}(t,n,r,a,e,o))},hy=function(e){return e==e&&!Wh(e)},gy=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},yy=function(e){return"symbol"==typeof e||tg(e)&&"[object Symbol]"==Vh(e)},vy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,by=/^\w*$/,Ey=function(e,t){if(lg(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!yy(e))||by.test(e)||!vy.test(e)||null!=t&&e in Object(t)};function Ty(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(Ty.Cache||Ug),n}Ty.Cache=Ug;var Sy,wy,Ny=Ty,Ry=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oy=/\\(\\)?/g,Cy=function(e){var t=Ny(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ry,function(e,n,r,a){t.push(r?a.replace(Oy,"$1"):n||e)}),t},function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(),xy=Dh?Dh.prototype:void 0,ky=xy?xy.toString:void 0,Ay=function e(t){if("string"==typeof t)return t;if(lg(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(t,e)+"";if(yy(t))return ky?ky.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},Iy=function(e,t){return lg(e)?e:Ey(e,t)?[e]:Cy(function(e){return null==e?"":Ay(e)}(e))},Ly=function(e){if("string"==typeof e||yy(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},_y=function(e,t){for(var n=0,r=(t=Iy(t,e)).length;null!=e&&n<r;)e=e[Ly(t[n++])];return n&&n==r?e:void 0},Py=function(e,t){return null!=e&&t in Object(e)},My=function(e){return e},Dy=function(e){return"function"==typeof e?e:null==e?My:"object"==typeof e?lg(e)?function(e,t){return Ey(e)&&hy(t)?gy(Ly(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:_y(e,t);return void 0===r?void 0:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r=-1,a=(t=Iy(t,e)).length,o=!1;++r<a;){var i=Ly(t[r]);if(!(o=null!=e&&n(e,i)))break;e=e[i]}return o||++r!=a?o:!!(a=null==e?0:e.length)&&dg(a)&&fg(i,a)&&(lg(e)||ig(e))}(e,t,Py)}(n,e):my(t,r,3)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Sg(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,hy(a)]}return t}(e);return 1==t.length&&t[0][2]?gy(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var l=(i=n[a])[0],s=e[l],c=i[1];if(i[2]){if(void 0===s&&!(l in e))return!1}else{var u=new Fg;if(!my(c,s,3,void 0,u))return!1}}return!0}(n,0,t)}}(e):Ey(t=e)?(n=Ly(t),function(e){return null==e?void 0:e[n]}):function(e){return function(t){return _y(t,e)}}(t);var t,n},Uy=function(e,t){var n={};return t=Dy(t),wg(e,function(e,r,a){eg(n,r,t(e,r,a))}),n},jy=function(e,t,n,r){for(var a=-1,o=null==e?0:e.length;++a<o;){var i=e[a];t(r,i,n(i),e)}return r},Fy=(Sy=wg,function(e,t){if(null==e)return e;if(!Tg(e))return Sy(e,t);for(var n=e.length,r=-1,a=Object(e);++r<n&&!1!==t(a[r],r,a););return e}),zy=function(e,t,n,r){return Fy(e,function(e,a,o){t(r,e,n(e),o)}),r},By=(wy=function(e,t,n){eg(e,n,t)},function(e,t){return(lg(e)?jy:zy)(e,wy,Dy(t),{})});function Hy(e,t){c.useEffect(function(){function n(n){e.current&&!e.current.contains(n.target)&&t()}return document.addEventListener("click",n),function(){document.removeEventListener("click",n)}},[])}function Vy(e){var t,n=e.showException,r=c.useContext(be),a=c.useState(!1),o=a[0],i=a[1],l=c.useState(!1),s=l[0],u=l[1],f=function(e){var t=c.useState(window.pageYOffset),n=t[0],r=t[1];return c.useEffect(function(){var e=function(){r(window.pageYOffset)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}},[]),n>=10}(),d=c.useContext(Te).ignitionConfig,p=c.useRef(null),m=c.useRef(null);Hy(p,function(){return i(!1)}),Hy(m,function(){return u(!1)});var h=Uy(By(r.context_items.env||[],"name"),"value"),g="local"!==h.app_env&&h.app_debug,y=function(e){var t;if(null!=(t=e.context_items.env)&&t.laravel_version){var n=e.documentation_links.find(function(e){return e.startsWith("https://laravel.com/")});return n?{type:"laravel",url:n,tailored:!0}:{type:"laravel",url:"https://laravel.com/docs/",tailored:!1}}var r=e.documentation_links.find(function(e){return e.startsWith("https://php.net/")});return r?{type:"php",url:r,tailored:!0}:{type:"generic",url:"https://php.net/docs",tailored:!1}}(r);return c.createElement("nav",{className:"z-50 fixed top-0 h-20 w-full"},c.createElement("div",null,c.createElement("div",{className:"\n "+(f?"~bg-gray-100":"~bg-body")+"\n z-10 transform translate-x-0 transition-color duration-100\n "},c.createElement("div",{className:"h-10 flex justify-between px-6 lg:px-10 mx-auto max-w-4xl lg:max-w-[90rem]"},c.createElement("ul",{className:"-ml-3 sm:-ml-5 grid grid-flow-col justify-start items-center"},c.createElement(ve,{name:"stack",icon:c.createElement(ph,{icon:hh})}),c.createElement(ve,{name:"context",icon:c.createElement(ph,{icon:bh})}),Uo(r)&&c.createElement(ve,{name:"debug",icon:c.createElement(ph,{icon:yh}),important:!(null==(t=r.context_items.dumps)||!t.length)}),c.createElement(ve,{name:"flare",href:"https://flareapp.io/?utm_campaign=ignition&utm_source=ignition",icon:c.createElement("svg",{viewBox:"0 0 36 56",fill:"currentColor",className:"h-[.9rem] -top-[.1rem] inline-block"},c.createElement("path",{d:"M 11.995 55.987 L 0 48.993 L 0 35 L 11.967 41.994 L 11.995 55.987 Z"}),c.createElement("path",{d:"M 11.967 41.993 L 0 34.999 L 11.995 28 L 23.989 34.999 L 11.967 41.993 Z"}),c.createElement("path",{d:"M 11.995 27.987 L 0 20.987 L 0 7 L 12.062 14.022 L 11.995 27.987 Z"}),c.createElement("path",{d:"M 23.978 20.981 L 0 6.999 L 11.995 0 L 36 13.981 L 23.978 20.981 Z"}))})),c.createElement("ul",{className:"-mr-3 sm:-mr-5 grid grid-flow-col justify-end items-center"},d.enableShareButton&&c.createElement(ve,{navRef:p,name:"share",icon:c.createElement(ph,{icon:Sh}),onClick:function(){i(!o)}},c.createElement(kh,{isOpen:o})),y&&c.createElement(ve,{name:"docs",href:y.url,icon:c.createElement(ph,{className:"text-sm",icon:"laravel"===y.type?Ih:Lh}),important:y.tailored}),c.createElement(ve,{navRef:m,name:"settings",icon:c.createElement(ph,{className:"text-sm",icon:Eh}),iconOpacity:"opacity-80",label:!1,onClick:function(){u(!s)}},c.createElement(Ah,{isOpen:s}))))),c.createElement("div",{className:"\n "+(f?"shadow-lg":"")+"\n "+(n?"translate-y-10 ~bg-gray-100":"translate-y-0 ~bg-body")+"\n absolute top-0 left-0 w-full\n ~bg-gray-100 border-b ~border-gray-200\n transform\n transition-animation\n duration-300\n "},c.createElement("div",{className:"flex items-center px-6 lg:px-10 mx-auto max-w-4xl lg:max-w-[90rem] h-10 border-t ~border-gray-200"},c.createElement("a",{href:"#top",className:"min-w-0 inline-flex items-center justify-start gap-2"},g&&c.createElement(ph,{title:"You have a security issue",icon:wh,className:"text-red-500"}),c.createElement("div",{className:"font-semibold min-w-0 truncate hover:text-red-500"},r.exception_message))))))}var Wy=new Map,Gy=new WeakMap,Yy=0;function $y(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,a=t.trackVisibility,o=t.rootMargin,i=t.root,l=t.triggerOnce,s=t.skip,u=t.initialInView,f=t.fallbackInView,d=c.useRef(),p=c.useState({inView:!!u}),m=p[0],h=p[1],g=c.useCallback(function(e){void 0!==d.current&&(d.current(),d.current=void 0),s||e&&(d.current=function(e,t,n,r){if(void 0===n&&(n={}),void 0===r&&(r=void 0),void 0===window.IntersectionObserver&&void 0!==r){var a=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:a,intersectionRect:a,rootBounds:a}),function(){}}var o=function(e){var t=function(e){return Object.keys(e).sort().filter(function(t){return void 0!==e[t]}).map(function(t){return t+"_"+("root"===t?(n=e.root)?(Gy.has(n)||Gy.set(n,(Yy+=1).toString()),Gy.get(n)):"0":e[t]);var n}).toString()}(e),n=Wy.get(t);if(!n){var r,a=new Map,o=new IntersectionObserver(function(t){t.forEach(function(t){var n,o=t.isIntersecting&&r.some(function(e){return t.intersectionRatio>=e});e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=a.get(t.target))||n.forEach(function(e){e(o,t)})})},e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),Wy.set(t,n={id:t,observer:o,elements:a})}return n}(n),i=o.id,l=o.observer,s=o.elements,c=s.get(e)||[];return s.has(e)||s.set(e,c),c.push(t),l.observe(e),function(){c.splice(c.indexOf(t),1),0===c.length&&(s.delete(e),l.unobserve(e)),0===s.size&&(l.disconnect(),Wy.delete(i))}}(e,function(e,t){h({inView:e,entry:t}),t.isIntersecting&&l&&d.current&&(d.current(),d.current=void 0)},{root:i,rootMargin:o,threshold:n,trackVisibility:a,delay:r},f))},[Array.isArray(n)?n.toString():n,i,o,l,s,a,f,r]);c.useEffect(function(){d.current||!m.entry||l||s||h({inView:!!u})});var y=[g,m.inView,m.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}function Xy(e){var t,n,r,a,o,i=e.children,l=e.className,s=void 0===l?"":l,u=e.name,f=(t=u,n=c.useContext(ge).setInView,a=(r=$y({rootMargin:"-40% 0px -40%"})).ref,c.useEffect(function(){n(o?function(e){return[].concat(e,[t])}:function(e){return e.filter(function(e){return e!==t})})},[o=r.inView]),a);return c.createElement("section",{ref:f,className:s},c.createElement("a",{id:u,className:"scroll-target"}),i)}function qy(){var e=c.useContext(be),t=Uy(By(e.context_items.env||[],"name"),"value");return"local"!==t.app_env&&t.app_debug?c.createElement("section",{className:"lg:flex items-stretch ~bg-white shadow-lg"},c.createElement("div",{className:"lg:w-1/3 flex-none flex items-center min-w-0 px-6 sm:px-10 py-8 bg-red-500 text-red-50"},c.createElement("h2",{className:"min-w-0 truncate text-xl font-semibold leading-snug"},c.createElement("code",{className:"mr-0.5"},"APP_DEBUG")," is set to ",c.createElement("code",{className:"mx-0.5"},"true")," while",c.createElement("br",null),c.createElement("code",{className:"mr-0.5"},"APP_ENV")," is not ",c.createElement("code",{className:"mx-0.5"},"local"))),c.createElement("div",{className:"flex-grow px-6 sm:px-10 py-8 bg-red-600 text-red-100"},c.createElement("p",{className:"text-base"},"This could make your application vulnerable to remote execution. ",c.createElement("br",null),c.createElement("a",{className:"mt-1.5 underline inline-flex items-center gap-2",target:"_blank",href:"https://flareapp.io/docs/ignition-for-laravel/security"},c.createElement(ph,{icon:wh,className:"text-sm opacity-50"}),"Read more about Ignition security")))):null}function Ky(){return c.createElement("footer",null,c.createElement("div",{className:"@container relative isolate overflow-hidden bg-gray-900 py-8 sm:py-20 shadow-2xl rounded-lg px-6 sm:px-24 | flex justify-center"},c.createElement("div",{className:"@4xl:grid @4xl:grid-cols-[max-content,12rem] gap-x-16 xl:gap-x-24"},c.createElement("div",null,c.createElement("h2",{className:"text-3xl font-bold tracking-tight text-white sm:text-4xl"},c.createElement("span",{className:"bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(to bottom right,#d4c0ff,#ab90e5)"}},"Flare")," is your error page for production."),c.createElement("p",{className:"mt-6 max-w-xl text-lg leading-8 text-gray-300"},"Start tracking errors in your application within minutes with Flare.",c.createElement("br",null),"Flare provides exceptional error monitoring designed specifically for Laravel applications."),c.createElement("div",{className:"mt-10 flex flex-wrap items-center justify-start gap-x-6"},c.createElement("a",{href:"https://flareapp.io/?utm_campaign=ignition&utm_source=ignition",target:"_blank",className:"rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"},"Learn more ",c.createElement("span",{"aria-hidden":"true"},"→")),c.createElement("span",{className:"text-sm font-semibold leading-6 py-2 text-white"},"Use code ",c.createElement("code",null,"IGNITION")," for 50% off your first month."))),c.createElement("div",{className:"hidden @4xl:block relative"},c.createElement(ad,{className:"ml-0 absolute left-0 -top-6 h-[170%] w-auto opacity-90"}),c.createElement(ad,{className:"ml-0 absolute left-0 -top-6 h-[170%] w-auto opacity-50 blur-[10px]"}))),c.createElement("svg",{viewBox:"0 0 1024 1024",className:"absolute left-0 -top-32 -z-10 h-[75rem] w-[75rem] -translate-x-1/2 -translate-y-1/2 [mask-image:radial-gradient(closest-side,white,transparent)]","aria-hidden":"true"},c.createElement("circle",{cx:512,cy:512,r:512,fill:"url(#purple-grad)",fillOpacity:"0.6"}),c.createElement("defs",null,c.createElement("radialGradient",{id:"purple-grad"},c.createElement("stop",{stopColor:"#906ED8"}),c.createElement("stop",{offset:1,stopColor:"#906ED8"})))),c.createElement("svg",{viewBox:"0 0 1024 1024",className:"absolute right-0 -bottom-32 -z-10 h-[75rem] w-[75rem] translate-x-1/2 translate-y-1/2 [mask-image:radial-gradient(closest-side,white,transparent)]","aria-hidden":"true"},c.createElement("circle",{cx:512,cy:512,r:512,fill:"url(#green-grad)",fillOpacity:"0.6"}),c.createElement("defs",null,c.createElement("radialGradient",{id:"green-grad"},c.createElement("stop",{stopColor:"#41D591"}),c.createElement("stop",{offset:1,stopColor:"#41D591"}))))))}function Jy(e){var t=e.errorOccurrence,n=e.igniteData,r=$y({rootMargin:"-40px 0px 0px 0px",threshold:.3,initialInView:!0}),a=r.ref;return c.createElement($c,null,c.createElement(ld.Provider,{value:n},c.createElement(Se,{ignitionConfig:n.config},c.createElement(be.Provider,{value:t},c.createElement(ye,null,c.createElement(Vy,{showException:!r.inView}),c.createElement("main",{className:"mx-auto mt-20 mb-10 px-6 lg:px-10 max-w-4xl lg:max-w-[90rem] grid grid-cols-1 gap-10"},c.createElement(qy,null),c.createElement("div",{ref:a},c.createElement(Xc,null)),c.createElement(Xy,{name:"stack",children:c.createElement(_c,null)}),c.createElement(Xy,{name:"context",children:c.createElement(Xf,null)}),Uo(t)&&c.createElement(Xy,{name:"debug",children:c.createElement(nd,null)}),c.createElement(Xy,{name:"flare",children:c.createElement(Ky,null)})))))))}window.ignite=function(t){var n,r,a,o,i,l,s,u,f,d,p,m,h,g,y,v,b,E,T,S,w,N,R,O,C,x=(i=(n=t).solutions,s=(l=(o=n.report).context).request,u=l.request_data,f=l.queries,d=l.dumps,p=l.logs,m=l.headers,h=l.cookies,g=l.session,y=l.env,v=l.user,b=l.route,E=l.git,T=l.livewire,S=l.view,w=l.exception,N=l.arguments,R=l.job,O=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}(l,["request","request_data","queries","dumps","logs","headers","cookies","session","env","user","route","git","livewire","view","exception","arguments","job"]),C=Object.entries(O).map(function(e){return{name:e[0],items:e[1]}}),{frames:o.stacktrace.map(function(t){return e({},t,{relative_file:t.file.replace(o.application_path+"/","").replace(o.application_path+"\\",""),class:t.class||""})}),context_items:{request:s,request_data:u,queries:f||null,dumps:d||null,logs:p||null,headers:m||null,cookies:h||null,session:g||null,env:y||null,user:v||null,route:b||null,git:E||null,livewire:T||null,view:S||null,exception:w||null,arguments:N||null,job:R||null},custom_context_items:C,type:"web",entry_point:null==o||null==(r=o.context)||null==(a=r.request)?void 0:a.url,exception_class:o.exception_class,exception_message:o.message||"",application_path:o.application_path,application_version:o.application_version,language_version:o.language_version,framework_version:o.framework_version,notifier_client_name:"Flare",stage:o.stage,first_frame_class:o.stacktrace[0].class||"",first_frame_method:o.stacktrace[0].method,glows:o.glows,solutions:i,documentation_links:o.documentation_links});console.log(t,x),he.render(c.createElement(Jy,{errorOccurrence:x,igniteData:t}),document.querySelector("#app"))}; +return c.createElement(x,j,/*#__PURE__*/c.createElement(A,s,!h&&M,O({rows:B,stylesheet:a,useInlineStyles:f})))});Al.registerLanguage=sl.registerLanguage;var Il=Al;function Ll({highlight:e,row:t,frame:n,lineNumber:r}){const{url:a,clipboard:o}=Po({file:n.file,lineNumber:r});return c.createElement("span",{className:`\n flex group leading-loose hover:~bg-red-500/10\n ${e?" ~bg-red-500/20":""}\n `},!o&&c.createElement("span",{className:"z-30 opacity-0 group-hover:opacity-100 sticky left-10 w-0 h-full"},c.createElement("a",{href:a,className:"-ml-3 block"},c.createElement(Fo,null,c.createElement(qa,{className:"text-xs",icon:go})))),o&&c.createElement("span",{className:"z-30 opacity-0 group-hover:opacity-100 sticky w-0 h-full"},c.createElement(zo,{value:a,outside:!0,direction:"right"})),c.createElement("span",{className:"pl-6"},Qo({node:t,useInlineStyles:!1,key:`code-segement-${r}`})))}function _l({frame:e}){const t=Object.values(e.code_snippet).join("\n"),n=Object.keys(e.code_snippet).map(e=>Number(e)),r=n.indexOf(e.line_number),a=c.useMemo(()=>({rows:t})=>t.map((t,a)=>c.createElement(Ll,{key:n[a],frame:e,highlight:a===r,row:t,lineNumber:n[a]})),[e]);return c.createElement("main",{className:"flex items-stretch flex-grow overflow-x-auto overflow-y-hidden scrollbar-hidden-x mask-fade-r text-sm"},c.createElement("nav",{className:"sticky left-0 flex flex-none z-20"},c.createElement("div",{className:"select-none text-right"},n.map(t=>c.createElement("p",{key:t,className:`\n px-2 font-mono leading-loose select-none\n ${Number(t)===e.line_number?" text-opacity-75 ~text-red-700 ~bg-red-500/30":""}\n `},c.createElement("span",{className:"~text-gray-500"},t))))),c.createElement("div",{className:"flex-grow pr-10"},c.createElement(Il,{language:(o=e.relative_file,o.endsWith(".blade.php")?"blade":o.match(/^resources\/views\//)?"php-template":"php"),renderer:a,customStyle:{background:"transparent"}},t)));var o}function Pl(e){var t=this.__data__=new ct(e);this.size=t.size}Il.registerLanguage("php",function(e){const t={className:"variable",begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*(?![A-Za-z0-9])(?![$])"},n={className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{begin:/\?>/}]},r={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},a=e.inherit(e.APOS_STRING_MODE,{illegal:null}),o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(r)}),i=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(r)}),l={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[e.inherit(a,{begin:"b'",end:"'"}),e.inherit(o,{begin:'b"',end:'"'}),o,a,i]},s={className:"number",variants:[{begin:"\\b0b[01]+(?:_[01]+)*\\b"},{begin:"\\b0o[0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?"}],relevance:0},c={keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile enum eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 mixed new object or private protected public real return string switch throw trait try unset use var void while xor yield",literal:"false null true",built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException UnhandledMatchError ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Stringable Throwable Traversable WeakReference WeakMap Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass"};return{aliases:["php3","php4","php5","php6","php7","php8"],case_insensitive:!0,keywords:c,contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[n]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler"}),n,{className:"keyword",begin:/\$this\b/},t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",t,e.C_BLOCK_COMMENT_MODE,l,s]}]},{className:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",relevance:0,end:";",contains:[e.UNDERSCORE_TITLE_MODE]},l,s]}}),Il.registerLanguage("php-template",function(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}),Il.registerLanguage("blade",function(e){return{name:"Blade",case_insensitive:!0,subLanguage:"php-template",contains:[e.COMMENT(/\{\{--/,/--\}\}/),{className:"template-variable",begin:/\{\{/,starts:{end:/\}\}/,returnEnd:!0,subLanguage:"php"}},{className:"template-variable",begin:/\}\}/},{className:"template-variable",begin:/\{\{\{/,starts:{end:/\}\}\}/,returnEnd:!0,subLanguage:"php"}},{className:"template-variable",begin:/\}\}\}/},{className:"template-variable",begin:/\{!!/,starts:{end:/!!\}/,returnEnd:!0,subLanguage:"php"}},{className:"template-variable",begin:/!!\}/},{className:"template-tag",begin:/@php\(/,starts:{end:/\)/,returnEnd:!0,subLanguage:"php"},relevance:15},{className:"template-tag",begin:/@php/,starts:{end:/@endphp/,returnEnd:!0,subLanguage:"php"},relevance:10},{className:"attr",begin:/:[\w-]+="/,starts:{end:/"(?=\s|\n|\/)/,returnEnd:!0,subLanguage:"php"}},{begin:/@\w+/,end:/\W/,excludeEnd:!0,className:"template-tag"}]}}),Il.registerLanguage("xml",function(e){const t=fl(/[A-Z_]/,fl("(",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),n={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/,contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(r,{begin:/\(/,end:/\)/}),o=e.inherit(e.APOS_STRING_MODE,{className:"meta-string"}),i=e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[n]},{begin:/'/,end:/'/,contains:[n]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[r,i,o,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[r,a,i,o]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},n,{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:fl(/</,ul(fl(t,dl(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:l}]},{className:"tag",begin:fl(/<\//,ul(fl(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}),Il.registerLanguage("css",function(e){const t=(e=>({IMPORTANT:{className:"meta",begin:"!important"},HEXCOLOR:{className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},ATTRIBUTE_SELECTOR_MODE:{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}))(e),n=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[e.C_BLOCK_COMMENT_MODE,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},e.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+hl.join("|")+")"},{begin:"::("+gl.join("|")+")"}]},{className:"attribute",begin:"\\b("+yl.join("|")+")\\b"},{begin:":",end:"[;}]",contains:[t.HEXCOLOR,t.IMPORTANT,e.CSS_NUMBER_MODE,...n,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},{className:"built_in",begin:/[\w-]+(?=\()/}]},{begin:(r=/@/,function(...e){return e.map(e=>function(e){return e?"string"==typeof e?e:e.source:null}(e)).join("")}("(?=",r,")")),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:ml.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...n,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+pl.join("|")+")\\b"}]};var r}),Il.registerLanguage("javascript",function(e){const t="[A-Za-z$_][0-9A-Za-z$_]*",n={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];"<"!==r?">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch()):t.ignoreMatch()}},r={$pattern:"[A-Za-z$_][0-9A-Za-z$_]*",keyword:El,literal:Tl,built_in:Sl},a="\\.([0-9](_?[0-9])*)",o="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",i={className:"number",variants:[{begin:`(\\b(${o})((${a})|\\.)?|(${a}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{begin:`\\b(${o})\\b((${a})\\b|\\.)?|(${a})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},l={className:"subst",begin:"\\$\\{",end:"\\}",keywords:r,contains:[]},s={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,l],subLanguage:"xml"}},c={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,l],subLanguage:"css"}},u={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,l]},f={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{",end:"\\}",relevance:0},{className:"variable",begin:t+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},d=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,c,u,i,e.REGEXP_MODE];l.contains=d.concat({begin:/\{/,end:/\}/,keywords:r,contains:["self"].concat(d)});const p=[].concat(f,l.contains),m=p.concat([{begin:/\(/,end:/\)/,keywords:r,contains:["self"].concat(p)}]),h={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:m};return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:r,exports:{PARAMS_CONTAINS:m},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,s,c,u,f,i,{begin:Nl(/[{,\n]\s*/,wl(Nl(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,t+"\\s*:"))),relevance:0,contains:[{className:"attr",begin:t+wl("\\s*:"),relevance:0}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[f,e.REGEXP_MODE,{className:"function",begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:r,contains:m}]}]},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{begin:"<>",end:"</>"},{begin:n.begin,"on:begin":n.isTrulyOpeningTag,end:n.end}],subLanguage:"xml",contains:[{begin:n.begin,end:n.end,skip:!0,contains:["self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:r,contains:["self",e.inherit(e.TITLE_MODE,{begin:t}),h],illegal:/%/},{beginKeywords:"while if switch catch for"},{className:"function",begin:e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,contains:[h,e.inherit(e.TITLE_MODE,{begin:t})]},{variants:[{begin:"\\."+t},{begin:"\\$"+t}],relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),"self",h]},{begin:"(get|set)\\s+(?="+t+"\\()",end:/\{/,keywords:"get set",contains:[e.inherit(e.TITLE_MODE,{begin:t}),{begin:/\(\)/},h]},{begin:/\$[(.]/}]}}),Il.registerLanguage("handlebars",function(e){const t={"builtin-name":["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]},n=/\[\]|\[[^\]]+\]/,r=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,a=function(...e){return"("+e.map(e=>vl(e)).join("|")+")"}(/""|"[^"]+"/,/''|'[^']+'/,n,r),o=bl(bl("(",/\.|\.\/|\//,")?"),a,(d=bl(/(\.|\/)/,a),bl("(",d,")*"))),i=bl("(",n,"|",r,")(?==)"),l={begin:o,lexemes:/[\w.\/]+/},s=e.inherit(l,{keywords:{literal:["true","false","undefined","null"]}}),c={begin:/\(/,end:/\)/},u={contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},{className:"attr",begin:i,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[e.NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,s,c]}}},s,c],returnEnd:!0},f=e.inherit(l,{className:"name",keywords:t,starts:e.inherit(u,{end:/\)/})});var d;c.contains=[f];const p=e.inherit(l,{keywords:t,className:"name",starts:e.inherit(u,{end:/\}\}/})}),m=e.inherit(l,{keywords:t,className:"name"}),h=e.inherit(l,{className:"name",keywords:t,starts:e.inherit(u,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},e.COMMENT(/\{\{!--/,/--\}\}/),e.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[p],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[m]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[p]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[m]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[h]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[h]}]}}),Il.registerLanguage("sql",function(e){const t=e.COMMENT("--","$"),n=["true","false","unknown"],r=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],a=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],i=a,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update ","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter(e=>!a.includes(e)),s={begin:Ol(/\b/,Cl(...i),/\s*\(/),keywords:{built_in:i}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map(e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e)}(l,{when:e=>e.length<3}),literal:n,type:r,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:Cl(...o),keywords:{$pattern:/[\w\.]+/,keyword:l.concat(o),literal:n,type:r}},{className:"type",begin:Cl("double precision","large object","with timezone","without timezone")},s,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}),Il.registerLanguage("curl",function(e){return{name:"curl",aliases:["curl"],keywords:"curl",case_insensitive:!0,contains:[{className:"literal",begin:/(--request|-X)\s/,contains:[{className:"symbol",begin:/(get|post|delete|options|head|put|patch|trace|connect)/,end:/\s/,returnEnd:!0}],returnEnd:!0,relevance:10},{className:"literal",begin:/--/,end:/[\s"]/,returnEnd:!0,relevance:0},{className:"literal",begin:/-\w/,end:/[\s"]/,returnEnd:!0,relevance:0},{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}],relevance:0},{className:"string",begin:/\\"/,relevance:0},{className:"string",begin:/'/,end:/'/,relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"number",variants:[{begin:e.C_NUMBER_RE}],relevance:0},{match:/(\/[a-z._-]+)+/}]}}),Il.registerLanguage("json",function(e){const t={literal:"true false null"},n=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],r=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:r,keywords:t},o={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(a,{begin:/:/})].concat(n),illegal:"\\S"},i={begin:"\\[",end:"\\]",contains:[e.inherit(a)],illegal:"\\S"};return r.push(o,i),n.forEach(function(e){r.push(e)}),{name:"JSON",contains:r,keywords:t,illegal:"\\S"}}),Pl.prototype.clear=function(){this.__data__=new ct,this.size=0},Pl.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Pl.prototype.get=function(e){return this.__data__.get(e)},Pl.prototype.has=function(e){return this.__data__.has(e)},Pl.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ct){var r=n.__data__;if(!ut||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new pt(r)}return n.set(e,t),this.size=n.size,this};var Ml=Pl,Dl=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ul=function(e,t,n,r,a,o){var i=1&n,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,p=2&n?new ht:void 0;for(o.set(e,t),o.set(t,e);++f<l;){var m=e[f],h=t[f];if(r)var g=i?r(h,m,f,t,e,o):r(m,h,f,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!Dl(t,function(e,t){if(!bt(p,t)&&(m===e||a(m,e,n,r,o)))return p.push(t)})){d=!1;break}}else if(m!==h&&!a(m,h,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d},jl=De.Uint8Array,Fl=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},zl=Ue?Ue.prototype:void 0,Bl=zl?zl.valueOf:void 0,Hl=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Vl=Array.isArray,Wl=function(e,t,n){var r=t(e);return Vl(e)?r:Hl(r,n(e))},Gl=function(){return[]},Yl=Object.prototype.propertyIsEnumerable,$l=Object.getOwnPropertySymbols,Xl=$l?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,a=null==t?0:t.length,o=0,i=[];++r<a;){var l=t[r];Yl.call(e,l)&&(i[o++]=l)}return i}($l(e)))}:Gl,ql=function(e){return null!=e&&"object"==typeof e},Kl=function(e){return ql(e)&&"[object Arguments]"==We(e)},Jl=Object.prototype,Ql=Jl.hasOwnProperty,Zl=Jl.propertyIsEnumerable,es=Kl(function(){return arguments}())?Kl:function(e){return ql(e)&&Ql.call(e,"callee")&&!Zl.call(e,"callee")},ts=function(){return!1},ns=Le(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,a=r&&r.exports===n?De.Buffer:void 0;e.exports=(a?a.isBuffer:void 0)||ts}),rs=/^(?:0|[1-9]\d*)$/,as=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&rs.test(e))&&e>-1&&e%1==0&&e<t},os=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},is={};is["[object Float32Array]"]=is["[object Float64Array]"]=is["[object Int8Array]"]=is["[object Int16Array]"]=is["[object Int32Array]"]=is["[object Uint8Array]"]=is["[object Uint8ClampedArray]"]=is["[object Uint16Array]"]=is["[object Uint32Array]"]=!0,is["[object Arguments]"]=is["[object Array]"]=is["[object ArrayBuffer]"]=is["[object Boolean]"]=is["[object DataView]"]=is["[object Date]"]=is["[object Error]"]=is["[object Function]"]=is["[object Map]"]=is["[object Number]"]=is["[object Object]"]=is["[object RegExp]"]=is["[object Set]"]=is["[object String]"]=is["[object WeakMap]"]=!1;var ls,ss=Le(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,a=r&&r.exports===n&&Pe.process,o=function(){try{return r&&r.require&&r.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=o}),cs=ss&&ss.isTypedArray,us=cs?(ls=cs,function(e){return ls(e)}):function(e){return ql(e)&&os(e.length)&&!!is[We(e)]},fs=Object.prototype.hasOwnProperty,ds=function(e,t){var n=Vl(e),r=!n&&es(e),a=!n&&!r&&ns(e),o=!n&&!r&&!a&&us(e),i=n||r||a||o,l=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=l.length;for(var c in e)!t&&!fs.call(e,c)||i&&("length"==c||a&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||as(c,s))||l.push(c);return l},ps=Object.prototype,ms=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ps)},hs=function(e,t){return function(n){return e(t(n))}},gs=hs(Object.keys,Object),ys=Object.prototype.hasOwnProperty,vs=function(e){if(!ms(e))return gs(e);var t=[];for(var n in Object(e))ys.call(e,n)&&"constructor"!=n&&t.push(n);return t},bs=function(e){return null!=e&&os(e.length)&&!Ye(e)},Es=function(e){return bs(e)?ds(e):vs(e)},Ts=function(e){return Wl(e,Es,Xl)},Ss=Object.prototype.hasOwnProperty,ws=Ze(De,"DataView"),Ns=Ze(De,"Promise"),Rs=Ze(De,"WeakMap"),Os=Ke(ws),Cs=Ke(ut),xs=Ke(Ns),ks=Ke(Et),As=Ke(Rs),Is=We;(ws&&"[object DataView]"!=Is(new ws(new ArrayBuffer(1)))||ut&&"[object Map]"!=Is(new ut)||Ns&&"[object Promise]"!=Is(Ns.resolve())||Et&&"[object Set]"!=Is(new Et)||Rs&&"[object WeakMap]"!=Is(new Rs))&&(Is=function(e){var t=We(e),n="[object Object]"==t?e.constructor:void 0,r=n?Ke(n):"";if(r)switch(r){case Os:return"[object DataView]";case Cs:return"[object Map]";case xs:return"[object Promise]";case ks:return"[object Set]";case As:return"[object WeakMap]"}return t});var Ls=Is,_s=Object.prototype.hasOwnProperty,Ps=function e(t,n,r,a,o){return t===n||(null==t||null==n||!ql(t)&&!ql(n)?t!=t&&n!=n:function(e,t,n,r,a,o){var i=Vl(e),l=Vl(t),s=i?"[object Array]":Ls(e),c=l?"[object Array]":Ls(t),u="[object Object]"==(s="[object Arguments]"==s?"[object Object]":s),f="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),d=s==c;if(d&&ns(e)){if(!ns(t))return!1;i=!0,u=!1}if(d&&!u)return o||(o=new Ml),i||us(e)?Ul(e,t,n,r,a,o):function(e,t,n,r,a,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new jl(e),new jl(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ot(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Fl;case"[object Set]":if(l||(l=Tt),e.size!=t.size&&!(1&r))return!1;var s=i.get(e);if(s)return s==t;r|=2,i.set(e,t);var c=Ul(l(e),l(t),r,a,o,i);return i.delete(e),c;case"[object Symbol]":if(Bl)return Bl.call(e)==Bl.call(t)}return!1}(e,t,s,n,r,a,o);if(!(1&n)){var p=u&&_s.call(e,"__wrapped__"),m=f&&_s.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return o||(o=new Ml),a(h,g,n,r,o)}}return!!d&&(o||(o=new Ml),function(e,t,n,r,a,o){var i=1&n,l=Ts(e),s=l.length;if(s!=Ts(t).length&&!i)return!1;for(var c=s;c--;){var u=l[c];if(!(i?u in t:Ss.call(t,u)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=i;++c<s;){var h=e[u=l[c]],g=t[u];if(r)var y=i?r(g,h,u,t,e,o):r(h,g,u,e,t,o);if(!(void 0===y?h===g||a(h,g,n,r,o):y)){p=!1;break}m||(m="constructor"==u)}if(p&&!m){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,r,a,o))}(t,n,r,a,e,o))},Ms=function(e){return e==e&&!Ge(e)},Ds=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},Us=function(e){return"symbol"==typeof e||ql(e)&&"[object Symbol]"==We(e)},js=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fs=/^\w*$/,zs=function(e,t){if(Vl(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Us(e))||Fs.test(e)||!js.test(e)||null!=t&&e in Object(t)};function Bs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(Bs.Cache||pt),n}Bs.Cache=pt;var Hs,Vs,Ws=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gs=/\\(\\)?/g,Ys=(Hs=Bs(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ws,function(e,n,r,a){t.push(r?a.replace(Gs,"$1"):n||e)}),t},function(e){return 500===Vs.size&&Vs.clear(),e}),Vs=Hs.cache,Hs),$s=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},Xs=Ue?Ue.prototype:void 0,qs=Xs?Xs.toString:void 0,Ks=function e(t){if("string"==typeof t)return t;if(Vl(t))return $s(t,e)+"";if(Us(t))return qs?qs.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},Js=function(e){return null==e?"":Ks(e)},Qs=function(e,t){return Vl(e)?e:zs(e,t)?[e]:Ys(Js(e))},Zs=function(e){if("string"==typeof e||Us(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},ec=function(e,t){for(var n=0,r=(t=Qs(t,e)).length;null!=e&&n<r;)e=e[Zs(t[n++])];return n&&n==r?e:void 0},tc=function(e,t){return null!=e&&t in Object(e)},nc=function(e){return e},rc=function(e){return"function"==typeof e?e:null==e?nc:"object"==typeof e?Vl(e)?function(e,t){return zs(e)&&Ms(t)?Ds(Zs(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:ec(e,t);return void 0===r?void 0:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r=-1,a=(t=Qs(t,e)).length,o=!1;++r<a;){var i=Zs(t[r]);if(!(o=null!=e&&n(e,i)))break;e=e[i]}return o||++r!=a?o:!!(a=null==e?0:e.length)&&os(a)&&as(i,a)&&(Vl(e)||es(e))}(e,t,tc)}(n,e):Ps(t,r,3)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Es(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Ms(a)]}return t}(e);return 1==t.length&&t[0][2]?Ds(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var l=(i=n[a])[0],s=e[l],c=i[1];if(i[2]){if(void 0===s&&!(l in e))return!1}else{var u=new Ml;if(!Ps(c,s,3,void 0,u))return!1}}return!0}(n,0,t)}}(e):zs(t=e)?(n=Zs(t),function(e){return null==e?void 0:e[n]}):function(e){return function(t){return ec(t,e)}}(t);var t,n},ac=(parseInt,Math.max),oc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={WORD:"word",STRING:"string",RESERVED:"reserved",RESERVED_TOP_LEVEL:"reserved-top-level",RESERVED_TOP_LEVEL_NO_INDENT:"reserved-top-level-no-indent",RESERVED_NEWLINE:"reserved-newline",OPERATOR:"operator",OPEN_PAREN:"open-paren",CLOSE_PAREN:"close-paren",LINE_COMMENT:"line-comment",BLOCK_COMMENT:"block-comment",NUMBER:"number",PLACEHOLDER:"placeholder"},e.exports=t.default}),ic=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.sortByLengthDesc=t.escapeRegExp=t.isEmpty=t.last=t.trimSpacesEnd=void 0,t.trimSpacesEnd=function(e){return e.replace(/[\t ]+$/,"")},t.last=function(e){return e[e.length-1]},t.isEmpty=function(e){return!Array.isArray(e)||0===e.length},t.escapeRegExp=function(e){return e.replace(/[\$\(-\+\.\?\[-\^\{-\}]/g,"\\$&")},t.sortByLengthDesc=function(e){return e.sort(function(e,t){return t.length-e.length||e.localeCompare(t)})}}),lc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n="top-level";t.default=/*#__PURE__*/function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.indent=t||" ",this.indentTypes=[]}var t;return(t=[{key:"getIndent",value:function(){return this.indent.repeat(this.indentTypes.length)}},{key:"increaseTopLevel",value:function(){this.indentTypes.push(n)}},{key:"increaseBlockLevel",value:function(){this.indentTypes.push("block-level")}},{key:"decreaseTopLevel",value:function(){this.indentTypes.length>0&&(0,ic.last)(this.indentTypes)===n&&this.indentTypes.pop()}},{key:"decreaseBlockLevel",value:function(){for(;this.indentTypes.length>0&&this.indentTypes.pop()===n;);}},{key:"resetIndentation",value:function(){this.indentTypes=[]}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default}),sc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=oc)&&n.__esModule?n:{default:n};t.default=/*#__PURE__*/function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.level=0}var t;return(t=[{key:"beginIfPossible",value:function(e,t){0===this.level&&this.isInlineBlock(e,t)?this.level=1:this.level>0?this.level++:this.level=0}},{key:"end",value:function(){this.level--}},{key:"isActive",value:function(){return this.level>0}},{key:"isInlineBlock",value:function(e,t){for(var n=0,a=0,o=t;o<e.length;o++){var i=e[o];if((n+=i.value.length)>50)return!1;if(i.type===r.default.OPEN_PAREN)a++;else if(i.type===r.default.CLOSE_PAREN&&0==--a)return!0;if(this.isForbiddenToken(i))return!1}return!1}},{key:"isForbiddenToken",value:function(e){var t=e.type;return t===r.default.RESERVED_TOP_LEVEL||t===r.default.RESERVED_NEWLINE||t===r.default.COMMENT||t===r.default.BLOCK_COMMENT||";"===e.value}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default}),cc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/*#__PURE__*/function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.params=t,this.index=0}var t;return(t=[{key:"get",value:function(e){var t=e.key,n=e.value;return this.params?t?this.params[t]:this.params[this.index++]:n}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default}),uc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isEnd=t.isWindow=t.isBy=t.isSet=t.isLimit=t.isBetween=t.isAnd=void 0;var n,r=(n=oc)&&n.__esModule?n:{default:n},a=function(e,t){return function(n){return(null==n?void 0:n.type)===e&&t.test(null==n?void 0:n.value)}},o=a(r.default.RESERVED_NEWLINE,/^AND$/i);t.isAnd=o;var i=a(r.default.RESERVED,/^BETWEEN$/i);t.isBetween=i;var l=a(r.default.RESERVED_TOP_LEVEL,/^LIMIT$/i);t.isLimit=l;var s=a(r.default.RESERVED_TOP_LEVEL,/^[S\u017F]ET$/i);t.isSet=s;var c=a(r.default.RESERVED,/^BY$/i);t.isBy=c;var u=a(r.default.RESERVED_TOP_LEVEL,/^WINDOW$/i);t.isWindow=u;var f=a(r.default.CLOSE_PAREN,/^END$/i);t.isEnd=f}),fc=Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(oc),r=i(lc),a=i(sc),o=i(cc);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.default=/*#__PURE__*/function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cfg=t,this.indentation=new r.default(this.cfg.indent),this.inlineBlock=new a.default,this.params=new o.default(this.cfg.params),this.previousReservedToken={},this.tokens=[],this.index=0}var t;return(t=[{key:"tokenizer",value:function(){throw new Error("tokenizer() not implemented by subclass")}},{key:"tokenOverride",value:function(e){return e}},{key:"format",value:function(e){return this.tokens=this.tokenizer().tokenize(e),this.getFormattedQueryFromTokens().trim()}},{key:"getFormattedQueryFromTokens",value:function(){var e=this,t="";return this.tokens.forEach(function(r,a){e.index=a,(r=e.tokenOverride(r)).type===n.default.LINE_COMMENT?t=e.formatLineComment(r,t):r.type===n.default.BLOCK_COMMENT?t=e.formatBlockComment(r,t):r.type===n.default.RESERVED_TOP_LEVEL?(t=e.formatTopLevelReservedWord(r,t),e.previousReservedToken=r):r.type===n.default.RESERVED_TOP_LEVEL_NO_INDENT?(t=e.formatTopLevelReservedWordNoIndent(r,t),e.previousReservedToken=r):r.type===n.default.RESERVED_NEWLINE?(t=e.formatNewlineReservedWord(r,t),e.previousReservedToken=r):r.type===n.default.RESERVED?(t=e.formatWithSpaces(r,t),e.previousReservedToken=r):t=r.type===n.default.OPEN_PAREN?e.formatOpeningParentheses(r,t):r.type===n.default.CLOSE_PAREN?e.formatClosingParentheses(r,t):r.type===n.default.PLACEHOLDER?e.formatPlaceholder(r,t):","===r.value?e.formatComma(r,t):":"===r.value?e.formatWithSpaceAfter(r,t):"."===r.value?e.formatWithoutSpaces(r,t):";"===r.value?e.formatQuerySeparator(r,t):e.formatWithSpaces(r,t)}),t}},{key:"formatLineComment",value:function(e,t){return this.addNewline(t+this.show(e))}},{key:"formatBlockComment",value:function(e,t){return this.addNewline(this.addNewline(t)+this.indentComment(e.value))}},{key:"indentComment",value:function(e){return e.replace(/\n[\t ]*/g,"\n"+this.indentation.getIndent()+" ")}},{key:"formatTopLevelReservedWordNoIndent",value:function(e,t){return this.indentation.decreaseTopLevel(),t=this.addNewline(t)+this.equalizeWhitespace(this.show(e)),this.addNewline(t)}},{key:"formatTopLevelReservedWord",value:function(e,t){return this.indentation.decreaseTopLevel(),t=this.addNewline(t),this.indentation.increaseTopLevel(),t+=this.equalizeWhitespace(this.show(e)),this.addNewline(t)}},{key:"formatNewlineReservedWord",value:function(e,t){return(0,uc.isAnd)(e)&&(0,uc.isBetween)(this.tokenLookBehind(2))?this.formatWithSpaces(e,t):this.addNewline(t)+this.equalizeWhitespace(this.show(e))+" "}},{key:"equalizeWhitespace",value:function(e){return e.replace(/[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g," ")}},{key:"formatOpeningParentheses",value:function(e,t){var r,a,o=(l(r={},n.default.OPEN_PAREN,!0),l(r,n.default.LINE_COMMENT,!0),l(r,n.default.OPERATOR,!0),r);return 0!==e.whitespaceBefore.length||o[null===(a=this.tokenLookBehind())||void 0===a?void 0:a.type]||(t=(0,ic.trimSpacesEnd)(t)),t+=this.show(e),this.inlineBlock.beginIfPossible(this.tokens,this.index),this.inlineBlock.isActive()||(this.indentation.increaseBlockLevel(),t=this.addNewline(t)),t}},{key:"formatClosingParentheses",value:function(e,t){return this.inlineBlock.isActive()?(this.inlineBlock.end(),this.formatWithSpaceAfter(e,t)):(this.indentation.decreaseBlockLevel(),this.formatWithSpaces(e,this.addNewline(t)))}},{key:"formatPlaceholder",value:function(e,t){return t+this.params.get(e)+" "}},{key:"formatComma",value:function(e,t){return t=(0,ic.trimSpacesEnd)(t)+this.show(e)+" ",this.inlineBlock.isActive()||(0,uc.isLimit)(this.previousReservedToken)?t:this.addNewline(t)}},{key:"formatWithSpaceAfter",value:function(e,t){return(0,ic.trimSpacesEnd)(t)+this.show(e)+" "}},{key:"formatWithoutSpaces",value:function(e,t){return(0,ic.trimSpacesEnd)(t)+this.show(e)}},{key:"formatWithSpaces",value:function(e,t){return t+this.show(e)+" "}},{key:"formatQuerySeparator",value:function(e,t){return this.indentation.resetIndentation(),(0,ic.trimSpacesEnd)(t)+this.show(e)+"\n".repeat(this.cfg.linesBetweenQueries||1)}},{key:"show",value:function(e){var t=e.type,r=e.value;return!this.cfg.uppercase||t!==n.default.RESERVED&&t!==n.default.RESERVED_TOP_LEVEL&&t!==n.default.RESERVED_TOP_LEVEL_NO_INDENT&&t!==n.default.RESERVED_NEWLINE&&t!==n.default.OPEN_PAREN&&t!==n.default.CLOSE_PAREN?r:r.toUpperCase()}},{key:"addNewline",value:function(e){return(e=(0,ic.trimSpacesEnd)(e)).endsWith("\n")||(e+="\n"),e+this.indentation.getIndent()}},{key:"tokenLookBehind",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index-e]}},{key:"tokenLookAhead",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.tokens[this.index+e]}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default});function dc(e){var t={"``":"((`[^`]*($|`))+)","{}":"((\\{[^\\}]*($|\\}))+)","[]":"((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)",'""':'(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',"''":"(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","N''":"((N'[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)","U&''":"((U&'[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)",'U&""':'((U&"[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)',$$:"((?<tag>\\$\\w*\\$)[\\s\\S]*?(?:\\k<tag>|$))"};return e.map(function(e){return t[e]}).join("|")}function pc(e){return 1===e.length?(0,ic.escapeRegExp)(e):"\\b"+e+"\\b"}var mc=/*#__PURE__*/Object.defineProperty({createOperatorRegex:function(e){return new RegExp("^(".concat((0,ic.sortByLengthDesc)(e).map(ic.escapeRegExp).join("|"),"|.)"),"u")},createLineCommentRegex:function(e){return new RegExp("^((?:".concat(e.map(function(e){return(0,ic.escapeRegExp)(e)}).join("|"),").*?)(?:\r\n|\r|\n|$)"),"u")},createReservedWordRegex:function(e){if(0===e.length)return new RegExp("^\b$","u");var t=(0,ic.sortByLengthDesc)(e).join("|").replace(/ /g,"\\s+");return new RegExp("^(".concat(t,")\\b"),"iu")},createWordRegex:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return new RegExp("^([\\p{Alphabetic}\\p{Mark}\\p{Decimal_Number}\\p{Connector_Punctuation}\\p{Join_Control}".concat(e.join(""),"]+)"),"u")},createStringRegex:function(e){return new RegExp("^("+dc(e)+")","u")},createStringPattern:dc,createParenRegex:function(e){return new RegExp("^("+e.map(pc).join("|")+")","iu")},createPlaceholderRegex:function(e,t){if((0,ic.isEmpty)(e))return!1;var n=e.map(ic.escapeRegExp).join("|");return new RegExp("^((?:".concat(n,")(?:").concat(t,"))"),"u")}},"__esModule",{value:!0}),hc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=oc)&&r.__esModule?r:{default:r},o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var l=a?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=e[o]}return r.default=e,t&&t.set(e,r),r}(mc);function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.default=/*#__PURE__*/function(){function e(t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.WHITESPACE_REGEX=/^([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)/,this.NUMBER_REGEX=/^((\x2D[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?[0-9]+(\.[0-9]+)?([Ee]\x2D?[0-9]+(\.[0-9]+)?)?|0x[0-9A-Fa-f]+|0b[01]+)\b/,this.OPERATOR_REGEX=o.createOperatorRegex(["<>","<=",">="].concat(function(e){if(Array.isArray(e))return u(e)}(n=t.operators||[])||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),this.BLOCK_COMMENT_REGEX=/^(\/\*(?:(?![])[\s\S])*?(?:\*\/|$))/,this.LINE_COMMENT_REGEX=o.createLineCommentRegex(t.lineCommentTypes),this.RESERVED_TOP_LEVEL_REGEX=o.createReservedWordRegex(t.reservedTopLevelWords),this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX=o.createReservedWordRegex(t.reservedTopLevelWordsNoIndent),this.RESERVED_NEWLINE_REGEX=o.createReservedWordRegex(t.reservedNewlineWords),this.RESERVED_PLAIN_REGEX=o.createReservedWordRegex(t.reservedWords),this.WORD_REGEX=o.createWordRegex(t.specialWordChars),this.STRING_REGEX=o.createStringRegex(t.stringTypes),this.OPEN_PAREN_REGEX=o.createParenRegex(t.openParens),this.CLOSE_PAREN_REGEX=o.createParenRegex(t.closeParens),this.INDEXED_PLACEHOLDER_REGEX=o.createPlaceholderRegex(t.indexedPlaceholderTypes,"[0-9]*"),this.IDENT_NAMED_PLACEHOLDER_REGEX=o.createPlaceholderRegex(t.namedPlaceholderTypes,"[a-zA-Z0-9._$]+"),this.STRING_NAMED_PLACEHOLDER_REGEX=o.createPlaceholderRegex(t.namedPlaceholderTypes,o.createStringPattern(t.stringTypes))}var t;return(t=[{key:"tokenize",value:function(e){for(var t,n=[];e.length;){var r=this.getWhitespace(e);(e=e.substring(r.length)).length&&(t=this.getNextToken(e,t),e=e.substring(t.value.length),n.push(s(s({},t),{},{whitespaceBefore:r})))}return n}},{key:"getWhitespace",value:function(e){var t=e.match(this.WHITESPACE_REGEX);return t?t[1]:""}},{key:"getNextToken",value:function(e,t){return this.getCommentToken(e)||this.getStringToken(e)||this.getOpenParenToken(e)||this.getCloseParenToken(e)||this.getPlaceholderToken(e)||this.getNumberToken(e)||this.getReservedWordToken(e,t)||this.getWordToken(e)||this.getOperatorToken(e)}},{key:"getCommentToken",value:function(e){return this.getLineCommentToken(e)||this.getBlockCommentToken(e)}},{key:"getLineCommentToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.LINE_COMMENT,regex:this.LINE_COMMENT_REGEX})}},{key:"getBlockCommentToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.BLOCK_COMMENT,regex:this.BLOCK_COMMENT_REGEX})}},{key:"getStringToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.STRING,regex:this.STRING_REGEX})}},{key:"getOpenParenToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.OPEN_PAREN,regex:this.OPEN_PAREN_REGEX})}},{key:"getCloseParenToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.CLOSE_PAREN,regex:this.CLOSE_PAREN_REGEX})}},{key:"getPlaceholderToken",value:function(e){return this.getIdentNamedPlaceholderToken(e)||this.getStringNamedPlaceholderToken(e)||this.getIndexedPlaceholderToken(e)}},{key:"getIdentNamedPlaceholderToken",value:function(e){return this.getPlaceholderTokenWithKey({input:e,regex:this.IDENT_NAMED_PLACEHOLDER_REGEX,parseKey:function(e){return e.slice(1)}})}},{key:"getStringNamedPlaceholderToken",value:function(e){var t=this;return this.getPlaceholderTokenWithKey({input:e,regex:this.STRING_NAMED_PLACEHOLDER_REGEX,parseKey:function(e){return t.getEscapedPlaceholderKey({key:e.slice(2,-1),quoteChar:e.slice(-1)})}})}},{key:"getIndexedPlaceholderToken",value:function(e){return this.getPlaceholderTokenWithKey({input:e,regex:this.INDEXED_PLACEHOLDER_REGEX,parseKey:function(e){return e.slice(1)}})}},{key:"getPlaceholderTokenWithKey",value:function(e){var t=e.parseKey,n=this.getTokenOnFirstMatch({input:e.input,regex:e.regex,type:a.default.PLACEHOLDER});return n&&(n.key=t(n.value)),n}},{key:"getEscapedPlaceholderKey",value:function(e){var t=e.quoteChar;return e.key.replace(new RegExp((0,ic.escapeRegExp)("\\"+t),"gu"),t)}},{key:"getNumberToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.NUMBER,regex:this.NUMBER_REGEX})}},{key:"getOperatorToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.OPERATOR,regex:this.OPERATOR_REGEX})}},{key:"getReservedWordToken",value:function(e,t){if(!t||!t.value||"."!==t.value)return this.getTopLevelReservedToken(e)||this.getNewlineReservedToken(e)||this.getTopLevelReservedTokenNoIndent(e)||this.getPlainReservedToken(e)}},{key:"getTopLevelReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.RESERVED_TOP_LEVEL,regex:this.RESERVED_TOP_LEVEL_REGEX})}},{key:"getNewlineReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.RESERVED_NEWLINE,regex:this.RESERVED_NEWLINE_REGEX})}},{key:"getTopLevelReservedTokenNoIndent",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.RESERVED_TOP_LEVEL_NO_INDENT,regex:this.RESERVED_TOP_LEVEL_NO_INDENT_REGEX})}},{key:"getPlainReservedToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.RESERVED,regex:this.RESERVED_PLAIN_REGEX})}},{key:"getWordToken",value:function(e){return this.getTokenOnFirstMatch({input:e,type:a.default.WORD,regex:this.WORD_REGEX})}},{key:"getTokenOnFirstMatch",value:function(e){var t=e.type,n=e.input.match(e.regex);return n?{type:t,value:n[1]}:void 0}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),e.exports=t.default}),gc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ABS","ACTIVATE","ALIAS","ALL","ALLOCATE","ALLOW","ALTER","ANY","ARE","ARRAY","AS","ASC","ASENSITIVE","ASSOCIATE","ASUTIME","ASYMMETRIC","AT","ATOMIC","ATTRIBUTES","AUDIT","AUTHORIZATION","AUX","AUXILIARY","AVG","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BUFFERPOOL","BY","CACHE","CALL","CALLED","CAPTURE","CARDINALITY","CASCADED","CASE","CAST","CCSID","CEIL","CEILING","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLONE","CLOSE","CLUSTER","COALESCE","COLLATE","COLLECT","COLLECTION","COLLID","COLUMN","COMMENT","COMMIT","CONCAT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONTAINS","CONTINUE","CONVERT","CORR","CORRESPONDING","COUNT","COUNT_BIG","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_LC_CTYPE","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_SERVER","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TIMEZONE","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DATAPARTITIONNAME","DATAPARTITIONNUM","DATE","DAY","DAYS","DB2GENERAL","DB2GENRL","DB2SQL","DBINFO","DBPARTITIONNAME","DBPARTITIONNUM","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFINITION","DELETE","DENSERANK","DENSE_RANK","DEREF","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DISABLE","DISALLOW","DISCONNECT","DISTINCT","DO","DOCUMENT","DOUBLE","DROP","DSSIZE","DYNAMIC","EACH","EDITPROC","ELEMENT","ELSE","ELSEIF","ENABLE","ENCODING","ENCRYPTION","END","END-EXEC","ENDING","ERASE","ESCAPE","EVERY","EXCEPTION","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXP","EXPLAIN","EXTENDED","EXTERNAL","EXTRACT","FALSE","FENCED","FETCH","FIELDPROC","FILE","FILTER","FINAL","FIRST","FLOAT","FLOOR","FOR","FOREIGN","FREE","FULL","FUNCTION","FUSION","GENERAL","GENERATED","GET","GLOBAL","GOTO","GRANT","GRAPHIC","GROUP","GROUPING","HANDLER","HASH","HASHED_VALUE","HINT","HOLD","HOUR","HOURS","IDENTITY","IF","IMMEDIATE","IN","INCLUDING","INCLUSIVE","INCREMENT","INDEX","INDICATOR","INDICATORS","INF","INFINITY","INHERIT","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTEGRITY","INTERSECTION","INTERVAL","INTO","IS","ISOBID","ISOLATION","ITERATE","JAR","JAVA","KEEP","KEY","LABEL","LANGUAGE","LARGE","LATERAL","LC_CTYPE","LEADING","LEAVE","LEFT","LIKE","LINKTYPE","LN","LOCAL","LOCALDATE","LOCALE","LOCALTIME","LOCALTIMESTAMP","LOCATOR","LOCATORS","LOCK","LOCKMAX","LOCKSIZE","LONG","LOOP","LOWER","MAINTAINED","MATCH","MATERIALIZED","MAX","MAXVALUE","MEMBER","MERGE","METHOD","MICROSECOND","MICROSECONDS","MIN","MINUTE","MINUTES","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MONTHS","MULTISET","NAN","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NEW_TABLE","NEXTVAL","NO","NOCACHE","NOCYCLE","NODENAME","NODENUMBER","NOMAXVALUE","NOMINVALUE","NONE","NOORDER","NORMALIZE","NORMALIZED","NOT","NULL","NULLIF","NULLS","NUMERIC","NUMPARTS","OBID","OCTET_LENGTH","OF","OFFSET","OLD","OLD_TABLE","ON","ONLY","OPEN","OPTIMIZATION","OPTIMIZE","OPTION","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","PACKAGE","PADDED","PAGESIZE","PARAMETER","PART","PARTITION","PARTITIONED","PARTITIONING","PARTITIONS","PASSWORD","PATH","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PIECESIZE","PLAN","POSITION","POWER","PRECISION","PREPARE","PREVVAL","PRIMARY","PRIQTY","PRIVILEGES","PROCEDURE","PROGRAM","PSID","PUBLIC","QUERY","QUERYNO","RANGE","RANK","READ","READS","REAL","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RENAME","REPEAT","RESET","RESIGNAL","RESTART","RESTRICT","RESULT","RESULT_SET_LOCATOR","RETURN","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_UP","ROUND_UP","ROUTINE","ROW","ROWNUMBER","ROWS","ROWSET","ROW_NUMBER","RRN","RUN","SAVEPOINT","SCHEMA","SCOPE","SCRATCHPAD","SCROLL","SEARCH","SECOND","SECONDS","SECQTY","SECURITY","SENSITIVE","SEQUENCE","SESSION","SESSION_USER","SIGNAL","SIMILAR","SIMPLE","SMALLINT","SNAN","SOME","SOURCE","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLID","SQLSTATE","SQLWARNING","SQRT","STACKED","STANDARD","START","STARTING","STATEMENT","STATIC","STATMENT","STAY","STDDEV_POP","STDDEV_SAMP","STOGROUP","STORES","STYLE","SUBMULTISET","SUBSTRING","SUM","SUMMARY","SYMMETRIC","SYNONYM","SYSFUN","SYSIBM","SYSPROC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","TABLESPACE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSACTION","TRANSLATE","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TYPE","UESCAPE","UNDO","UNIQUE","UNKNOWN","UNNEST","UNTIL","UPPER","USAGE","USER","USING","VALIDPROC","VALUE","VARCHAR","VARIABLE","VARIANT","VARYING","VAR_POP","VAR_SAMP","VCAT","VERSION","VIEW","VOLATILE","VOLUMES","WHEN","WHENEVER","WHILE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WLM","WRITE","XMLELEMENT","XMLEXISTS","XMLNAMESPACES","YEAR","YEARS"],f=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FETCH FIRST","FROM","GROUP BY","GO","HAVING","INSERT INTO","INTERSECT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],p=["AND","OR","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''","``","[]"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["#","@"],operators:["**","!=","!>","!>","||"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),yc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BIGINT","BINARY","BLOB","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHAR","CHARACTER","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CURRENT_DATE","CURRENT_ROLE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEC","DECIMAL","DECLARE","DEFAULT","DELAYED","DELETE","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DO_DOMAIN_IDS","DOUBLE","DROP","DUAL","EACH","ELSE","ELSEIF","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FLOAT","FLOAT4","FLOAT8","FOR","FORCE","FOREIGN","FROM","FULLTEXT","GENERAL","GRANT","GROUP","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IGNORE_DOMAIN_IDS","IGNORE_SERVER_IDS","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERSECT","INTERVAL","INTO","IS","ITERATE","JOIN","KEY","KEYS","KILL","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER_HEARTBEAT_PERIOD","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NULL","NUMERIC","ON","OPTIMIZE","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PAGE_CHECKSUM","PARSE_VCOL_EXPR","PARTITION","POSITION","PRECISION","PRIMARY","PROCEDURE","PURGE","RANGE","READ","READS","READ_WRITE","REAL","RECURSIVE","REF_SYSTEM_ID","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","RETURNING","REVOKE","RIGHT","RLIKE","ROWS","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SLOW","SMALLINT","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STRAIGHT_JOIN","TABLE","TERMINATED","THEN","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARYING","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],f=["ADD","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","CROSS JOIN","NATURAL JOIN","STRAIGHT_JOIN","NATURAL LEFT JOIN","NATURAL LEFT OUTER JOIN","NATURAL RIGHT JOIN","NATURAL RIGHT OUTER JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:["``","''",'""'],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[],lineCommentTypes:["--","#"],specialWordChars:["@"],operators:[":=","<<",">>","!=","<>","<=>","&&","||"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),vc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ACCESSIBLE","ADD","ALL","ALTER","ANALYZE","AND","AS","ASC","ASENSITIVE","BEFORE","BETWEEN","BIGINT","BINARY","BLOB","BOTH","BY","CALL","CASCADE","CASE","CHANGE","CHAR","CHARACTER","CHECK","COLLATE","COLUMN","CONDITION","CONSTRAINT","CONTINUE","CONVERT","CREATE","CROSS","CUBE","CUME_DIST","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATABASES","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEC","DECIMAL","DECLARE","DEFAULT","DELAYED","DELETE","DENSE_RANK","DESC","DESCRIBE","DETERMINISTIC","DISTINCT","DISTINCTROW","DIV","DOUBLE","DROP","DUAL","EACH","ELSE","ELSEIF","EMPTY","ENCLOSED","ESCAPED","EXCEPT","EXISTS","EXIT","EXPLAIN","FALSE","FETCH","FIRST_VALUE","FLOAT","FLOAT4","FLOAT8","FOR","FORCE","FOREIGN","FROM","FULLTEXT","FUNCTION","GENERATED","GET","GRANT","GROUP","GROUPING","GROUPS","HAVING","HIGH_PRIORITY","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IF","IGNORE","IN","INDEX","INFILE","INNER","INOUT","INSENSITIVE","INSERT","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERVAL","INTO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IS","ITERATE","JOIN","JSON_TABLE","KEY","KEYS","KILL","LAG","LAST_VALUE","LATERAL","LEAD","LEADING","LEAVE","LEFT","LIKE","LIMIT","LINEAR","LINES","LOAD","LOCALTIME","LOCALTIMESTAMP","LOCK","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER_BIND","MASTER_SSL_VERIFY_SERVER_CERT","MATCH","MAXVALUE","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MIDDLEINT","MINUTE_MICROSECOND","MINUTE_SECOND","MOD","MODIFIES","NATURAL","NOT","NO_WRITE_TO_BINLOG","NTH_VALUE","NTILE","NULL","NUMERIC","OF","ON","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONALLY","OR","ORDER","OUT","OUTER","OUTFILE","OVER","PARTITION","PERCENT_RANK","PRECISION","PRIMARY","PROCEDURE","PURGE","RANGE","RANK","READ","READS","READ_WRITE","REAL","RECURSIVE","REFERENCES","REGEXP","RELEASE","RENAME","REPEAT","REPLACE","REQUIRE","RESIGNAL","RESTRICT","RETURN","REVOKE","RIGHT","RLIKE","ROW","ROWS","ROW_NUMBER","SCHEMA","SCHEMAS","SECOND_MICROSECOND","SELECT","SENSITIVE","SEPARATOR","SET","SHOW","SIGNAL","SMALLINT","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_BIG_RESULT","SQL_CALC_FOUND_ROWS","SQL_SMALL_RESULT","SSL","STARTING","STORED","STRAIGHT_JOIN","SYSTEM","TABLE","TERMINATED","THEN","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRIGGER","TRUE","UNDO","UNION","UNIQUE","UNLOCK","UNSIGNED","UPDATE","USAGE","USE","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARYING","VIRTUAL","WHEN","WHERE","WHILE","WINDOW","WITH","WRITE","XOR","YEAR_MONTH","ZEROFILL"],f=["ADD","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","CROSS JOIN","NATURAL JOIN","STRAIGHT_JOIN","NATURAL LEFT JOIN","NATURAL LEFT OUTER JOIN","NATURAL RIGHT JOIN","NATURAL RIGHT OUTER JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:["``","''",'""'],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[],lineCommentTypes:["--","#"],specialWordChars:["@"],operators:[":=","<<",">>","!=","<>","<=>","&&","||","->","->>"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),bc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ALL","ALTER","ANALYZE","AND","ANY","ARRAY","AS","ASC","BEGIN","BETWEEN","BINARY","BOOLEAN","BREAK","BUCKET","BUILD","BY","CALL","CASE","CAST","CLUSTER","COLLATE","COLLECTION","COMMIT","CONNECT","CONTINUE","CORRELATE","COVER","CREATE","DATABASE","DATASET","DATASTORE","DECLARE","DECREMENT","DELETE","DERIVED","DESC","DESCRIBE","DISTINCT","DO","DROP","EACH","ELEMENT","ELSE","END","EVERY","EXCEPT","EXCLUDE","EXECUTE","EXISTS","EXPLAIN","FALSE","FETCH","FIRST","FLATTEN","FOR","FORCE","FROM","FUNCTION","GRANT","GROUP","GSI","HAVING","IF","IGNORE","ILIKE","IN","INCLUDE","INCREMENT","INDEX","INFER","INLINE","INNER","INSERT","INTERSECT","INTO","IS","JOIN","KEY","KEYS","KEYSPACE","KNOWN","LAST","LEFT","LET","LETTING","LIKE","LIMIT","LSM","MAP","MAPPING","MATCHED","MATERIALIZED","MERGE","MISSING","NAMESPACE","NEST","NOT","NULL","NUMBER","OBJECT","OFFSET","ON","OPTION","OR","ORDER","OUTER","OVER","PARSE","PARTITION","PASSWORD","PATH","POOL","PREPARE","PRIMARY","PRIVATE","PRIVILEGE","PROCEDURE","PUBLIC","RAW","REALM","REDUCE","RENAME","RETURN","RETURNING","REVOKE","RIGHT","ROLE","ROLLBACK","SATISFIES","SCHEMA","SELECT","SELF","SEMI","SET","SHOW","SOME","START","STATISTICS","STRING","SYSTEM","THEN","TO","TRANSACTION","TRIGGER","TRUE","TRUNCATE","UNDER","UNION","UNIQUE","UNKNOWN","UNNEST","UNSET","UPDATE","UPSERT","USE","USER","USING","VALIDATE","VALUE","VALUED","VALUES","VIA","VIEW","WHEN","WHERE","WHILE","WITH","WITHIN","WORK","XOR"],f=["DELETE FROM","EXCEPT ALL","EXCEPT","EXPLAIN DELETE FROM","EXPLAIN UPDATE","EXPLAIN UPSERT","FROM","GROUP BY","HAVING","INFER","INSERT INTO","LET","LIMIT","MERGE","NEST","ORDER BY","PREPARE","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNNEST","UPDATE","UPSERT","USE KEYS","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],p=["AND","OR","XOR","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''","``"],openParens:["(","[","{"],closeParens:[")","]","}"],namedPlaceholderTypes:["$"],lineCommentTypes:["#","--"],operators:["==","!="]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),Ec=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(fc),a=i(hc),o=i(oc);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=["A","ACCESSIBLE","AGENT","AGGREGATE","ALL","ALTER","ANY","ARRAY","AS","ASC","AT","ATTRIBUTE","AUTHID","AVG","BETWEEN","BFILE_BASE","BINARY_INTEGER","BINARY","BLOB_BASE","BLOCK","BODY","BOOLEAN","BOTH","BOUND","BREADTH","BULK","BY","BYTE","C","CALL","CALLING","CASCADE","CASE","CHAR_BASE","CHAR","CHARACTER","CHARSET","CHARSETFORM","CHARSETID","CHECK","CLOB_BASE","CLONE","CLOSE","CLUSTER","CLUSTERS","COALESCE","COLAUTH","COLLECT","COLUMNS","COMMENT","COMMIT","COMMITTED","COMPILED","COMPRESS","CONNECT","CONSTANT","CONSTRUCTOR","CONTEXT","CONTINUE","CONVERT","COUNT","CRASH","CREATE","CREDENTIAL","CURRENT","CURRVAL","CURSOR","CUSTOMDATUM","DANGLING","DATA","DATE_BASE","DATE","DAY","DECIMAL","DEFAULT","DEFINE","DELETE","DEPTH","DESC","DETERMINISTIC","DIRECTORY","DISTINCT","DO","DOUBLE","DROP","DURATION","ELEMENT","ELSIF","EMPTY","END","ESCAPE","EXCEPTIONS","EXCLUSIVE","EXECUTE","EXISTS","EXIT","EXTENDS","EXTERNAL","EXTRACT","FALSE","FETCH","FINAL","FIRST","FIXED","FLOAT","FOR","FORALL","FORCE","FROM","FUNCTION","GENERAL","GOTO","GRANT","GROUP","HASH","HEAP","HIDDEN","HOUR","IDENTIFIED","IF","IMMEDIATE","IN","INCLUDING","INDEX","INDEXES","INDICATOR","INDICES","INFINITE","INSTANTIABLE","INT","INTEGER","INTERFACE","INTERVAL","INTO","INVALIDATE","IS","ISOLATION","JAVA","LANGUAGE","LARGE","LEADING","LENGTH","LEVEL","LIBRARY","LIKE","LIKE2","LIKE4","LIKEC","LIMITED","LOCAL","LOCK","LONG","MAP","MAX","MAXLEN","MEMBER","MERGE","MIN","MINUTE","MLSLABEL","MOD","MODE","MONTH","MULTISET","NAME","NAN","NATIONAL","NATIVE","NATURAL","NATURALN","NCHAR","NEW","NEXTVAL","NOCOMPRESS","NOCOPY","NOT","NOWAIT","NULL","NULLIF","NUMBER_BASE","NUMBER","OBJECT","OCICOLL","OCIDATE","OCIDATETIME","OCIDURATION","OCIINTERVAL","OCILOBLOCATOR","OCINUMBER","OCIRAW","OCIREF","OCIREFCURSOR","OCIROWID","OCISTRING","OCITYPE","OF","OLD","ON","ONLY","OPAQUE","OPEN","OPERATOR","OPTION","ORACLE","ORADATA","ORDER","ORGANIZATION","ORLANY","ORLVARY","OTHERS","OUT","OVERLAPS","OVERRIDING","PACKAGE","PARALLEL_ENABLE","PARAMETER","PARAMETERS","PARENT","PARTITION","PASCAL","PCTFREE","PIPE","PIPELINED","PLS_INTEGER","PLUGGABLE","POSITIVE","POSITIVEN","PRAGMA","PRECISION","PRIOR","PRIVATE","PROCEDURE","PUBLIC","RAISE","RANGE","RAW","READ","REAL","RECORD","REF","REFERENCE","RELEASE","RELIES_ON","REM","REMAINDER","RENAME","RESOURCE","RESULT_CACHE","RESULT","RETURN","RETURNING","REVERSE","REVOKE","ROLLBACK","ROW","ROWID","ROWNUM","ROWTYPE","SAMPLE","SAVE","SAVEPOINT","SB1","SB2","SB4","SEARCH","SECOND","SEGMENT","SELF","SEPARATE","SEQUENCE","SERIALIZABLE","SHARE","SHORT","SIZE_T","SIZE","SMALLINT","SOME","SPACE","SPARSE","SQL","SQLCODE","SQLDATA","SQLERRM","SQLNAME","SQLSTATE","STANDARD","START","STATIC","STDDEV","STORED","STRING","STRUCT","STYLE","SUBMULTISET","SUBPARTITION","SUBSTITUTABLE","SUBTYPE","SUCCESSFUL","SUM","SYNONYM","SYSDATE","TABAUTH","TABLE","TDO","THE","THEN","TIME","TIMESTAMP","TIMEZONE_ABBR","TIMEZONE_HOUR","TIMEZONE_MINUTE","TIMEZONE_REGION","TO","TRAILING","TRANSACTION","TRANSACTIONAL","TRIGGER","TRUE","TRUSTED","TYPE","UB1","UB2","UB4","UID","UNDER","UNIQUE","UNPLUG","UNSIGNED","UNTRUSTED","USE","USER","USING","VALIDATE","VALIST","VALUE","VARCHAR","VARCHAR2","VARIABLE","VARIANCE","VARRAY","VARYING","VIEW","VIEWS","VOID","WHENEVER","WHILE","WITH","WORK","WRAPPED","WRITE","YEAR","ZONE"],d=["ADD","ALTER COLUMN","ALTER TABLE","BEGIN","CONNECT BY","DECLARE","DELETE FROM","DELETE","END","EXCEPT","EXCEPTION","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","LOOP","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","START WITH","UPDATE","VALUES","WHERE"],p=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],m=["AND","CROSS APPLY","ELSE","END","OR","OUTER APPLY","WHEN","XOR","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(h,e);var t,n,r,i=(n=h,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=u(n);if(r){var a=u(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return c(this,e)});function h(){return l(this,h),i.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:f,reservedTopLevelWords:d,reservedNewlineWords:m,reservedTopLevelWordsNoIndent:p,stringTypes:['""',"N''","''","``"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],specialWordChars:["_","$","#",".","@"],operators:["||","**","!=",":="]})}},{key:"tokenOverride",value:function(e){return(0,uc.isSet)(e)&&(0,uc.isBy)(this.previousReservedToken)?{type:o.default.RESERVED,value:e.value}:e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,t),h}(r.default),e.exports=t.default}),Tc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ABORT","ABSOLUTE","ACCESS","ACTION","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATTACH","ATTRIBUTE","AUTHORIZATION","BACKWARD","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BIT","BOOLEAN","BOTH","BY","CACHE","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHECK","CHECKPOINT","CLASS","CLOSE","CLUSTER","COALESCE","COLLATE","COLLATION","COLUMN","COLUMNS","COMMENT","COMMENTS","COMMIT","COMMITTED","CONCURRENTLY","CONFIGURATION","CONFLICT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTENT","CONTINUE","CONVERSION","COPY","COST","CREATE","CROSS","CSV","CUBE","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CYCLE","DATA","DATABASE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINER","DELETE","DELIMITER","DELIMITERS","DEPENDS","DESC","DETACH","DICTIONARY","DISABLE","DISCARD","DISTINCT","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","EACH","ELSE","ENABLE","ENCODING","ENCRYPTED","END","ENUM","ESCAPE","EVENT","EXCEPT","EXCLUDE","EXCLUDING","EXCLUSIVE","EXECUTE","EXISTS","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FORCE","FOREIGN","FORWARD","FREEZE","FROM","FULL","FUNCTION","FUNCTIONS","GENERATED","GLOBAL","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HOLD","HOUR","IDENTITY","IF","ILIKE","IMMEDIATE","IMMUTABLE","IMPLICIT","IMPORT","IN","INCLUDE","INCLUDING","INCREMENT","INDEX","INDEXES","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","KEY","LABEL","LANGUAGE","LARGE","LAST","LATERAL","LEADING","LEAKPROOF","LEAST","LEFT","LEVEL","LIKE","LIMIT","LISTEN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCK","LOCKED","LOGGED","MAPPING","MATCH","MATERIALIZED","MAXVALUE","METHOD","MINUTE","MINVALUE","MODE","MONTH","MOVE","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NEW","NEXT","NFC","NFD","NFKC","NFKD","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NULL","NULLIF","NULLS","NUMERIC","OBJECT","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDINALITY","OTHERS","OUT","OUTER","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","PARALLEL","PARSER","PARTIAL","PARTITION","PASSING","PASSWORD","PLACING","PLANS","POLICY","POSITION","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROCEDURES","PROGRAM","PUBLICATION","QUOTE","RANGE","READ","REAL","REASSIGN","RECHECK","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","RESET","RESTART","RESTRICT","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINES","ROW","ROWS","RULE","SAVEPOINT","SCHEMA","SCHEMAS","SCROLL","SEARCH","SECOND","SECURITY","SELECT","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SKIP","SMALLINT","SNAPSHOT","SOME","SQL","STABLE","STANDALONE","START","STATEMENT","STATISTICS","STDIN","STDOUT","STORAGE","STORED","STRICT","STRIP","SUBSCRIPTION","SUBSTRING","SUPPORT","SYMMETRIC","SYSID","SYSTEM","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TO","TRAILING","TRANSACTION","TRANSFORM","TREAT","TRIGGER","TRIM","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLISTEN","UNLOGGED","UNTIL","UPDATE","USER","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VARCHAR","VARIADIC","VARYING","VERBOSE","VERSION","VIEW","VIEWS","VOLATILE","WHEN","WHERE","WHITESPACE","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLATTRIBUTES","XMLCONCAT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLNAMESPACES","XMLPARSE","XMLPI","XMLROOT","XMLSERIALIZE","XMLTABLE","YEAR","YES","ZONE"],f=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","EXCEPT","FETCH FIRST","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","UNION","UNION ALL"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''","U&''",'U&""',"$$"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["$"],namedPlaceholderTypes:[":"],lineCommentTypes:["--"],operators:["!=","<<",">>","||/","|/","::","->>","->","~~*","~~","!~~*","!~~","~*","!~*","!~","!!"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),Sc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["AES128","AES256","ALLOWOVERWRITE","ANALYSE","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GZIP","IDENTITY","IGNORE","ILIKE","INITIALLY","INTO","LEADING","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY13","MOSTLY32","MOSTLY8","NATURAL","NEW","NULLS","OFF","OFFLINE","OFFSET","OLD","ON","ONLY","OPEN","ORDER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","REJECTLOG","RESORT","RESTORE","SESSION_USER","SIMILAR","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WITH","WITHOUT","PREDICATE","COLUMNS","COMPROWS","COMPRESSION","COPY","FORMAT","DELIMITER","FIXEDWIDTH","AVRO","JSON","ENCRYPTED","BZIP2","GZIP","LZOP","PARQUET","ORC","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","NULL AS","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","MANIFEST","REGION","IAM_ROLE","MASTER_SYMMETRIC_KEY","SSH","ACCEPTANYDATE","ACCEPTINVCHARS","ACCESS_KEY_ID","SECRET_ACCESS_KEY","AVRO","BLANKSASNULL","BZIP2","COMPROWS","COMPUPDATE","CREDENTIALS","DATEFORMAT","DELIMITER","EMPTYASNULL","ENCODING","ENCRYPTED","ESCAPE","EXPLICIT_IDS","FILLRECORD","FIXEDWIDTH","FORMAT","IAM_ROLE","GZIP","IGNOREBLANKLINES","IGNOREHEADER","JSON","LZOP","MANIFEST","MASTER_SYMMETRIC_KEY","MAXERROR","NOLOAD","NULL AS","READRATIO","REGION","REMOVEQUOTES","ROUNDEC","SSH","STATUPDATE","TIMEFORMAT","SESSION_TOKEN","TRIMBLANKS","TRUNCATECOLUMNS","EXTERNAL","DATA CATALOG","HIVE METASTORE","CATALOG_ROLE","VACUUM","COPY","UNLOAD","EVEN","ALL"],f=["ADD","AFTER","ALTER COLUMN","ALTER TABLE","DELETE FROM","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","INTERSECT","TOP","LIMIT","MODIFY","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UNION ALL","UNION","UPDATE","VALUES","WHERE","VACUUM","COPY","UNLOAD","ANALYZE","ANALYSE","DISTKEY","SORTKEY","COMPOUND","INTERLEAVED","FORMAT","DELIMITER","FIXEDWIDTH","AVRO","JSON","ENCRYPTED","BZIP2","GZIP","LZOP","PARQUET","ORC","ACCEPTANYDATE","ACCEPTINVCHARS","BLANKSASNULL","DATEFORMAT","EMPTYASNULL","ENCODING","ESCAPE","EXPLICIT_IDS","FILLRECORD","IGNOREBLANKLINES","IGNOREHEADER","NULL AS","REMOVEQUOTES","ROUNDEC","TIMEFORMAT","TRIMBLANKS","TRUNCATECOLUMNS","COMPROWS","COMPUPDATE","MAXERROR","NOLOAD","STATUPDATE","MANIFEST","REGION","IAM_ROLE","MASTER_SYMMETRIC_KEY","SSH","ACCEPTANYDATE","ACCEPTINVCHARS","ACCESS_KEY_ID","SECRET_ACCESS_KEY","AVRO","BLANKSASNULL","BZIP2","COMPROWS","COMPUPDATE","CREDENTIALS","DATEFORMAT","DELIMITER","EMPTYASNULL","ENCODING","ENCRYPTED","ESCAPE","EXPLICIT_IDS","FILLRECORD","FIXEDWIDTH","FORMAT","IAM_ROLE","GZIP","IGNOREBLANKLINES","IGNOREHEADER","JSON","LZOP","MANIFEST","MASTER_SYMMETRIC_KEY","MAXERROR","NOLOAD","NULL AS","READRATIO","REGION","REMOVEQUOTES","ROUNDEC","SSH","STATUPDATE","TIMEFORMAT","SESSION_TOKEN","TRIMBLANKS","TRUNCATECOLUMNS","EXTERNAL","DATA CATALOG","HIVE METASTORE","CATALOG_ROLE"],d=[],p=["AND","ELSE","OR","OUTER APPLY","WHEN","VACUUM","COPY","UNLOAD","ANALYZE","ANALYSE","DISTKEY","SORTKEY","COMPOUND","INTERLEAVED","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''","``"],openParens:["("],closeParens:[")"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["@","#","$"],lineCommentTypes:["--"],operators:["|/","||/","<<",">>","!=","||"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),wc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(fc),a=i(hc),o=i(oc);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=["ALL","ALTER","ANALYSE","ANALYZE","ARRAY_ZIP","ARRAY","AS","ASC","AVG","BETWEEN","CASCADE","CASE","CAST","COALESCE","COLLECT_LIST","COLLECT_SET","COLUMN","COLUMNS","COMMENT","CONSTRAINT","CONTAINS","CONVERT","COUNT","CUME_DIST","CURRENT ROW","CURRENT_DATE","CURRENT_TIMESTAMP","DATABASE","DATABASES","DATE_ADD","DATE_SUB","DATE_TRUNC","DAY_HOUR","DAY_MINUTE","DAY_SECOND","DAY","DAYS","DECODE","DEFAULT","DELETE","DENSE_RANK","DESC","DESCRIBE","DISTINCT","DISTINCTROW","DIV","DROP","ELSE","ENCODE","END","EXISTS","EXPLAIN","EXPLODE_OUTER","EXPLODE","FILTER","FIRST_VALUE","FIRST","FIXED","FLATTEN","FOLLOWING","FROM_UNIXTIME","FULL","GREATEST","GROUP_CONCAT","HOUR_MINUTE","HOUR_SECOND","HOUR","HOURS","IF","IFNULL","IN","INSERT","INTERVAL","INTO","IS","LAG","LAST_VALUE","LAST","LEAD","LEADING","LEAST","LEVEL","LIKE","MAX","MERGE","MIN","MINUTE_SECOND","MINUTE","MONTH","NATURAL","NOT","NOW()","NTILE","NULL","NULLIF","OFFSET","ON DELETE","ON UPDATE","ON","ONLY","OPTIMIZE","OVER","PERCENT_RANK","PRECEDING","RANGE","RANK","REGEXP","RENAME","RLIKE","ROW","ROWS","SECOND","SEPARATOR","SEQUENCE","SIZE","STRING","STRUCT","SUM","TABLE","TABLES","TEMPORARY","THEN","TO_DATE","TO_JSON","TO","TRAILING","TRANSFORM","TRUE","TRUNCATE","TYPE","TYPES","UNBOUNDED","UNIQUE","UNIX_TIMESTAMP","UNLOCK","UNSIGNED","USING","VARIABLES","VIEW","WHEN","WITH","YEAR_MONTH"],d=["ADD","AFTER","ALTER COLUMN","ALTER DATABASE","ALTER SCHEMA","ALTER TABLE","CLUSTER BY","CLUSTERED BY","DELETE FROM","DISTRIBUTE BY","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","OPTIONS","ORDER BY","PARTITION BY","PARTITIONED BY","RANGE","ROWS","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","TBLPROPERTIES","UPDATE","USING","VALUES","WHERE","WINDOW"],p=["EXCEPT ALL","EXCEPT","INTERSECT ALL","INTERSECT","UNION ALL","UNION"],m=["AND","CREATE OR","CREATE","ELSE","LATERAL VIEW","OR","OUTER APPLY","WHEN","XOR","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN","ANTI JOIN","SEMI JOIN","LEFT ANTI JOIN","LEFT SEMI JOIN","RIGHT OUTER JOIN","RIGHT SEMI JOIN","NATURAL ANTI JOIN","NATURAL FULL OUTER JOIN","NATURAL INNER JOIN","NATURAL LEFT ANTI JOIN","NATURAL LEFT OUTER JOIN","NATURAL LEFT SEMI JOIN","NATURAL OUTER JOIN","NATURAL RIGHT OUTER JOIN","NATURAL RIGHT SEMI JOIN","NATURAL SEMI JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(h,e);var t,n,r,i=(n=h,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=u(n);if(r){var a=u(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return c(this,e)});function h(){return l(this,h),i.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:f,reservedTopLevelWords:d,reservedNewlineWords:m,reservedTopLevelWordsNoIndent:p,stringTypes:['""',"''","``","{}"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:["$"],lineCommentTypes:["--"],operators:["!=","<=>","&&","||","=="]})}},{key:"tokenOverride",value:function(e){if((0,uc.isWindow)(e)){var t=this.tokenLookAhead();if(t&&t.type===o.default.OPEN_PAREN)return{type:o.default.RESERVED,value:e.value}}if((0,uc.isEnd)(e)){var n=this.tokenLookBehind();if(n&&n.type===o.default.OPERATOR&&"."===n.value)return{type:o.default.WORD,value:e.value}}return e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,t),h}(r.default),e.exports=t.default}),Nc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ABS","ALL","ALLOCATE","ALTER","AND","ANY","ARE","ARRAY","AS","ASENSITIVE","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","AVG","BEGIN","BETWEEN","BIGINT","BINARY","BLOB","BOOLEAN","BOTH","BY","CALL","CALLED","CARDINALITY","CASCADED","CASE","CAST","CEIL","CEILING","CHAR","CHAR_LENGTH","CHARACTER","CHARACTER_LENGTH","CHECK","CLOB","CLOSE","COALESCE","COLLATE","COLLECT","COLUMN","COMMIT","CONDITION","CONNECT","CONSTRAINT","CONVERT","CORR","CORRESPONDING","COUNT","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CUBE","CUME_DIST","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATE","DAY","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DELETE","DENSE_RANK","DEREF","DESCRIBE","DETERMINISTIC","DISCONNECT","DISTINCT","DOUBLE","DROP","DYNAMIC","EACH","ELEMENT","ELSE","END","END-EXEC","ESCAPE","EVERY","EXCEPT","EXEC","EXECUTE","EXISTS","EXP","EXTERNAL","EXTRACT","FALSE","FETCH","FILTER","FLOAT","FLOOR","FOR","FOREIGN","FREE","FROM","FULL","FUNCTION","FUSION","GET","GLOBAL","GRANT","GROUP","GROUPING","HAVING","HOLD","HOUR","IDENTITY","IN","INDICATOR","INNER","INOUT","INSENSITIVE","INSERT","INT","INTEGER","INTERSECT","INTERSECTION","INTERVAL","INTO","IS","JOIN","LANGUAGE","LARGE","LATERAL","LEADING","LEFT","LIKE","LIKE_REGEX","LN","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOWER","MATCH","MAX","MEMBER","MERGE","METHOD","MIN","MINUTE","MOD","MODIFIES","MODULE","MONTH","MULTISET","NATIONAL","NATURAL","NCHAR","NCLOB","NEW","NO","NONE","NORMALIZE","NOT","NULL","NULLIF","NUMERIC","OCTET_LENGTH","OCCURRENCES_REGEX","OF","OLD","ON","ONLY","OPEN","OR","ORDER","OUT","OUTER","OVER","OVERLAPS","OVERLAY","PARAMETER","PARTITION","PERCENT_RANK","PERCENTILE_CONT","PERCENTILE_DISC","POSITION","POSITION_REGEX","POWER","PRECISION","PREPARE","PRIMARY","PROCEDURE","RANGE","RANK","READS","REAL","RECURSIVE","REF","REFERENCES","REFERENCING","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","RELEASE","RESULT","RETURN","RETURNS","REVOKE","RIGHT","ROLLBACK","ROLLUP","ROW","ROW_NUMBER","ROWS","SAVEPOINT","SCOPE","SCROLL","SEARCH","SECOND","SELECT","SENSITIVE","SESSION_USER","SET","SIMILAR","SMALLINT","SOME","SPECIFIC","SPECIFICTYPE","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQRT","START","STATIC","STDDEV_POP","STDDEV_SAMP","SUBMULTISET","SUBSTRING","SUBSTRING_REGEX","SUM","SYMMETRIC","SYSTEM","SYSTEM_USER","TABLE","TABLESAMPLE","THEN","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING","TRANSLATE","TRANSLATE_REGEX","TRANSLATION","TREAT","TRIGGER","TRIM","TRUE","UESCAPE","UNION","UNIQUE","UNKNOWN","UNNEST","UPDATE","UPPER","USER","USING","VALUE","VALUES","VAR_POP","VAR_SAMP","VARBINARY","VARCHAR","VARYING","WHEN","WHENEVER","WHERE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","YEAR"],f=["ADD","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","FETCH FIRST","FETCH NEXT","FETCH PRIOR","FETCH LAST","FETCH ABSOLUTE","FETCH RELATIVE","FROM","GROUP BY","HAVING","INSERT INTO","LIMIT","ORDER BY","SELECT","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","INTERSECT DISTINCT","UNION","UNION ALL","UNION DISTINCT","EXCEPT","EXCEPT ALL","EXCEPT DISTINCT"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN","NATURAL JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"''"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:["?"],namedPlaceholderTypes:[],lineCommentTypes:["--"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),Rc=Le(function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(fc),a=o(hc);function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=["ADD","EXTERNAL","PROCEDURE","ALL","FETCH","PUBLIC","ALTER","FILE","RAISERROR","AND","FILLFACTOR","READ","ANY","FOR","READTEXT","AS","FOREIGN","RECONFIGURE","ASC","FREETEXT","REFERENCES","AUTHORIZATION","FREETEXTTABLE","REPLICATION","BACKUP","FROM","RESTORE","BEGIN","FULL","RESTRICT","BETWEEN","FUNCTION","RETURN","BREAK","GOTO","REVERT","BROWSE","GRANT","REVOKE","BULK","GROUP","RIGHT","BY","HAVING","ROLLBACK","CASCADE","HOLDLOCK","ROWCOUNT","CASE","IDENTITY","ROWGUIDCOL","CHECK","IDENTITY_INSERT","RULE","CHECKPOINT","IDENTITYCOL","SAVE","CLOSE","IF","SCHEMA","CLUSTERED","IN","SECURITYAUDIT","COALESCE","INDEX","SELECT","COLLATE","INNER","SEMANTICKEYPHRASETABLE","COLUMN","INSERT","SEMANTICSIMILARITYDETAILSTABLE","COMMIT","INTERSECT","SEMANTICSIMILARITYTABLE","COMPUTE","INTO","SESSION_USER","CONSTRAINT","IS","SET","CONTAINS","JOIN","SETUSER","CONTAINSTABLE","KEY","SHUTDOWN","CONTINUE","KILL","SOME","CONVERT","LEFT","STATISTICS","CREATE","LIKE","SYSTEM_USER","CROSS","LINENO","TABLE","CURRENT","LOAD","TABLESAMPLE","CURRENT_DATE","MERGE","TEXTSIZE","CURRENT_TIME","NATIONAL","THEN","CURRENT_TIMESTAMP","NOCHECK","TO","CURRENT_USER","NONCLUSTERED","TOP","CURSOR","NOT","TRAN","DATABASE","NULL","TRANSACTION","DBCC","NULLIF","TRIGGER","DEALLOCATE","OF","TRUNCATE","DECLARE","OFF","TRY_CONVERT","DEFAULT","OFFSETS","TSEQUAL","DELETE","ON","UNION","DENY","OPEN","UNIQUE","DESC","OPENDATASOURCE","UNPIVOT","DISK","OPENQUERY","UPDATE","DISTINCT","OPENROWSET","UPDATETEXT","DISTRIBUTED","OPENXML","USE","DOUBLE","OPTION","USER","DROP","OR","VALUES","DUMP","ORDER","VARYING","ELSE","OUTER","VIEW","END","OVER","WAITFOR","ERRLVL","PERCENT","WHEN","ESCAPE","PIVOT","WHERE","EXCEPT","PLAN","WHILE","EXEC","PRECISION","WITH","EXECUTE","PRIMARY","WITHIN GROUP","EXISTS","PRINT","WRITETEXT","EXIT","PROC"],f=["ADD","ALTER COLUMN","ALTER TABLE","CASE","DELETE FROM","END","EXCEPT","FROM","GROUP BY","HAVING","INSERT INTO","INSERT","LIMIT","ORDER BY","SELECT","SET CURRENT SCHEMA","SET SCHEMA","SET","UPDATE","VALUES","WHERE"],d=["INTERSECT","INTERSECT ALL","MINUS","UNION","UNION ALL"],p=["AND","ELSE","OR","WHEN","JOIN","INNER JOIN","LEFT JOIN","LEFT OUTER JOIN","RIGHT JOIN","RIGHT OUTER JOIN","FULL JOIN","FULL OUTER JOIN","CROSS JOIN"];t.default=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(m,e);var t,n,r,o=(n=m,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=c(n);if(r){var a=c(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return s(this,e)});function m(){return i(this,m),o.apply(this,arguments)}return(t=[{key:"tokenizer",value:function(){return new a.default({reservedWords:u,reservedTopLevelWords:f,reservedNewlineWords:p,reservedTopLevelWordsNoIndent:d,stringTypes:['""',"N''","''","[]"],openParens:["(","CASE"],closeParens:[")","END"],indexedPlaceholderTypes:[],namedPlaceholderTypes:["@"],lineCommentTypes:["--"],specialWordChars:["#","@"],operators:[">=","<=","<>","!=","!<","!>","+=","-=","*=","/=","%=","|=","&=","^=","::"]})}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(m.prototype,t),m}(r.default),e.exports=t.default}),Oc=/*@__PURE__*/Ie(Le(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.supportedDialects=t.format=void 0;var n=d(gc),r=d(yc),a=d(vc),o=d(bc),i=d(Ec),l=d(Tc),s=d(Sc),c=d(wc),u=d(Nc),f=d(Rc);function d(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var m={db2:n.default,mariadb:r.default,mysql:a.default,n1ql:o.default,plsql:i.default,postgresql:l.default,redshift:s.default,spark:c.default,sql:u.default,tsql:f.default};t.format=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw new Error("Invalid query argument. Extected string, instead got "+p(e));var n=u.default;if(void 0!==t.language&&(n=m[t.language]),void 0===n)throw Error("Unsupported SQL dialect: ".concat(t.language));return new n(t).format(e)};var h=Object.keys(m);t.supportedDialects=h}));function Cc({children:e,language:t}){return c.createElement(Il,{language:t,customStyle:{background:"transparent"}},e)}function xc({value:e,limitHeight:t=!0,language:n=null,transparent:r=!1,overflowX:a=!0}){const[o,i]=c.useState(t),[l,s]=c.useState("sql"===n),u=c.useRef(null),f=c.useRef(null);return c.useEffect(()=>{u.current&&s(u.current.scrollHeight>u.current.clientHeight)},[u.current,o,e,t]),c.createElement("div",{ref:f,className:`\n ${l?"cursor-pointer":""}\n ${r?"":"~bg-gray-500/5"}\n group py-2 relative`,onClick:function(e){var t;3!==e.detail?l&&(!o&&null!=(t=window.getSelection())&&t.toString().length||i(!o)):function(){const e=document.createRange();e.selectNodeContents(f.current);const t=window.getSelection();t.removeAllRanges(),t.addRange(e)}()}},c.createElement("div",{className:a?"mask-fade-x":""},"sql"===n&&c.createElement(c.Fragment,null,o?c.createElement("pre",{className:"pl-4 "+(a?"overflow-x-scroll scrollbar-hidden-x pr-12":"truncate pr-8")},c.createElement("code",{className:"font-mono leading-relaxed text-sm font-normal"},c.createElement(Cc,{language:"sql"},e))):c.createElement("pre",{className:"pl-4 "+(a?"overflow-x-scroll scrollbar-hidden-x pr-12":"pr-8")},c.createElement("code",{className:"font-mono leading-relaxed text-sm font-normal"},c.createElement(Cc,{language:"sql"},Oc.format(e,{language:"mysql"}))))),"sql"!==n&&c.createElement("pre",{ref:u,className:`\n pl-4\n ${l?"mask-fade-y -mb-2":""}\n ${o?"overflow-y-hidden max-h-32":""}\n ${a?"overflow-x-scroll scrollbar-hidden-x pr-12":"pr-8"}\n `},c.createElement("code",{className:"font-mono leading-relaxed text-sm font-normal"},n?c.createElement(Cc,{language:n},e):e))),c.createElement(zo,{className:"absolute top-2 right-3",value:e}),l&&c.createElement(Fo,{onClick:()=>i(!o),className:"\n absolute -bottom-3 left-1/2 -translate-x-1/2\n opacity-0 group-hover:opacity-100 scale-80 group-hover:scale-100 delay-100\n "},c.createElement(qa,{icon:Ja,className:"transition-transform duration-300 transform "+(o?"":"rotate-180")})))}const kc=["children","className"];function Ac(e){let{children:t,className:n=""}=e,r=Ce(e,kc);return t?c.createElement("dl",Ne({className:`grid grid-cols-1 gap-2 ${n}`},r),t):null}function Ic({frame:e}){var t;return c.createElement(Ac,{className:"pb-10 px-6 @lg:px-10"},null==(t=e.arguments)?void 0:t.map((e,t)=>c.createElement(Ac.Row,{key:t,label:c.createElement("div",{className:"font-mono text-sm"},c.createElement("span",{className:"hljs-function hljs-params hljs-variable"},c.createElement("span",{title:"by reference"},e.is_variadic&&"…"),c.createElement("span",null,e.passed_by_reference&&"&"),c.createElement("span",{title:"variadic"},"$"),e.name),c.createElement("span",{className:"text-xs pl-px hljs-function hljs-keyword"},":",e.original_type,e.truncated&&" - truncated")),value:e.value,type:e.original_type,stacked:!0})))}function Lc({frames:e,openFrameIndex:t}){const n=c.useMemo(()=>{let n=1;const r=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var a=0;return a<0&&(a=ac(r+a,0)),gt(e,rc(e=>"application"===ke(e)),a)}(e);return-1!==r&&(n=e.length-r),t&&(n=e.length-t),Nt({frames:e,expanded:[],selected:n},{type:"COLLAPSE_ALL_VENDOR_FRAMES"})},[e]),[r,a]=c.useReducer(Nt,n),o=c.useMemo(()=>function(e){return xe(e.frames).filter(e=>"vendor"===ke(e)).every(t=>e.expanded.includes(t.frame_number))}(r),[r]),i=c.useMemo(()=>function({frames:e,selected:t,expanded:n}){return e.reduce((r,a,o)=>{const i={current:a,previous:r[r.length-1]||Rt,isFirstFrame:0===o,frameNumber:e.length-o,expanded:n,selected:t};return i.expanded.includes(i.frameNumber)?r.concat(function(e){return e.current.relative_file!==e.previous.relative_file?[{type:ke(e.current),relative_file:e.current.relative_file,expanded:!0,frames:[Ne({},e.current,{frame_number:e.frameNumber,selected:e.selected===e.frameNumber})]}]:(e.previous.frames.push(Ne({},e.current,{frame_number:e.frameNumber,selected:e.selected===e.frameNumber})),[])}(i)):r.concat(function(e){const t=ke(e.current);return e.previous.expanded||t!==e.previous.type?[{type:t,relative_file:e.current.relative_file,expanded:!1,frames:[Ne({},e.current,{frame_number:e.frameNumber,selected:e.selected===e.frameNumber})]}]:(e.previous.frames.push(Ne({},e.current,{selected:!1,frame_number:e.frameNumber})),[])}(i))},[])}(r),[r]),l=c.useMemo(()=>function(e){const t=xe(e.frames);return t.find(t=>t.frame_number===e.selected)||t[0]||null}(r),[r]);return Ot("j",()=>{a({type:"SELECT_NEXT_FRAME"})}),Ot("k",()=>{a({type:"SELECT_PREVIOUS_FRAME"})}),c.createElement(c.Fragment,null,c.createElement("aside",{className:"z-30 flex flex-col border-r ~border-gray-200 relative"},c.createElement("div",{className:"max-h-[33vh] @4xl:max-h-[none] @4xl:absolute inset-0 flex flex-col overflow-hidden ~bg-white rounded-t-lg"},c.createElement("header",{className:"flex-none px-6 @lg:px-10 h-16 flex items-center justify-start ~bg-white border-b ~border-gray-200"},c.createElement(xt,{onClick:()=>a({type:o?"COLLAPSE_ALL_VENDOR_FRAMES":"EXPAND_ALL_VENDOR_FRAMES"})},c.createElement("div",{className:"flex "+(o?"flex-col-reverse":"flex-col")},c.createElement(qa,{icon:Za,className:"-my-px text-[8px] ~text-gray-500 group-hover:text-indigo-500"}),c.createElement(qa,{icon:Ja,className:"-my-px text-[8px] ~text-gray-500 group-hover:text-indigo-500"})),o?"Collapse vendor frames":" Expand vendor frames")),c.createElement("div",{id:"frames",className:"flex-grow overflow-auto scrollbar-hidden-y mask-fade-frames"},c.createElement("ol",{className:"text-sm pb-16"},i.map((e,t)=>c.createElement(_o,{key:t,frameGroup:e,onExpand:()=>a({type:"EXPAND_FRAMES",frames:e.frames.map(e=>e.frame_number)}),onSelect:e=>{a({type:"SELECT_FRAME",frame:e})}})))))),c.createElement("section",{className:"flex flex-col border-t @4xl:border-t-0 ~border-gray-200 relative"},l&&c.createElement(c.Fragment,null,c.createElement("header",{className:"~text-gray-500 flex-none z-30 h-16 px-6 @lg:px-10 flex items-center justify-end"},c.createElement(Bo,{path:l.file,lineNumber:l.line_number,className:"flex items-center text-sm"})),c.createElement(_l,{frame:l}))),(null==l?void 0:l.arguments)&&l.arguments.length>0&&c.createElement("section",{className:"border-t ~border-gray-200 @4xl:col-span-2"},c.createElement("header",{className:"font-bold text-xs ~text-gray-500 uppercase tracking-wider h-16 px-6 @lg:px-10 flex items-center"},"arguments"),c.createElement(Ic,{frame:l})))}function _c({openFrameIndex:e}){const{frames:t}=c.useContext(be);return c.createElement("div",{className:"@container bg-gray-25 dark:shadow-none dark:bg-gray-800/50 bg-gradient-to-bl from-white dark:from-gray-700/50 via-transparent dark:ring-1 dark:ring-inset dark:ring-white/5 rounded-lg shadow-2xl shadow-gray-500/20"},c.createElement("div",{className:"grid grid-cols-1 @4xl:grid-cols-[33.33%_66.66%] @4xl:grid-rows-[57rem] items-stretch overflow-hidden"},c.createElement(Lc,{frames:t,openFrameIndex:e})))}function Pc({message:e,className:t=""}){const[n,r]=c.useState(!1);return c.createElement("div",{className:`\n my-4 font-semibold leading-snug text-xl\n ${t}\n `,onClick:function(){var e;n&&null!=(e=window.getSelection())&&e.toString().length||r(!n)}},c.createElement("div",{className:n?"line-clamp-none":"line-clamp-2"},e))}function Mc({message:e,exceptionClass:t,className:n=""}){const[r,a]=c.useState(e),[o,i]=c.useState(null);return c.useEffect(()=>{if("Illuminate\\Database\\QueryException"===t||e.match(/SQLSTATE\[[\s\S]*\][\s\S]*SQL: [\s\S]*\)/)){const t=/*#__PURE__*/we(/\((?:|Connection: [\s\S]*?, )SQL: ([\s\S]*?)\)($| \(View: [\s\S]*\)$)/,{query:1}),[,n]=e.match(t)||[];i(n),a(e.replace(t,"$2"))}},[e,t]),c.createElement(c.Fragment,null,c.createElement(Pc,{message:r,className:n}),o&&c.createElement(xc,{value:o,language:"sql"}))}Ac.Row=function({value:e="",label:t="",className:n="",stacked:r=!1,type:a,small:o=!1}){let i=e;const[l,s]=c.useState(!1);let u;return c.isValidElement(e)?i=e:"boolean"==typeof e?i=c.createElement("span",{className:(e?"text-emerald-500 bg-emerald-500/5":"text-red-500 bg-red-800/5")+" text-sm px-3 py-2 inline-flex gap-2 items-center justify-center"},c.createElement(qa,{className:`${e} ? 'text-emerald-500' : 'text-red-500`,icon:e?no:Io}),c.createElement("span",{className:"font-mono"},e?"true":"false")):"string"===a||"object"==typeof e?i=c.createElement(xc,{value:Do(e),language:"json"}):"string"==typeof e?i=c.createElement(xc,{value:e}):"number"==typeof e&&(i=c.createElement(xc,{value:String(e)})),c.createElement("div",{className:`${r?"flex flex-col":"flex items-baseline "+(o?"gap-3":"gap-10")} ${n}`},c.createElement("dt",{className:`\n ${r?"self-start pt-2 pb-1.5 leading-tight":l?o?"flex-grow truncate min-w-[2rem] max-w-max":"flex-grow truncate min-w-[8rem] max-w-max":o?"flex-none truncate w-[2rem]":"flex-none truncate w-[8rem]"}\n `,onMouseOver:()=>{u=setTimeout(()=>s(!0),500)},onMouseOut:()=>{clearTimeout(u),s(!1)}},t),c.createElement("dd",{className:"flex-grow min-w-0"},i))};const Dc=["children","className","disabled"];function Uc(e){let{children:t,className:n="",disabled:r=!1}=e,a=Ce(e,Dc);return c.createElement("button",Ne({disabled:r,className:`px-4 h-8 whitespace-nowrap border-b\n text-xs uppercase tracking-wider font-bold rounded-sm\n shadow-md\n transform\n transition-animation\n hover:shadow-lg\n active:shadow-inner\n active:translate-y-px\n ${r?"opacity-50":"opacity-100"}\n ${n}\n `},a),t)}var jc=/*@__PURE__*/Ie(Le(function(e,t){e.exports=(()=>{var e=Object.create,t=Object.defineProperty,n=Object.defineProperties,r=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,l=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=Math.pow,f=(e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,d=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&f(e,n,t[n]);if(i)for(var n of i(t))c.call(t,n)&&f(e,n,t[n]);return e},p=(e,t)=>n(e,a(t)),m=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),h=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},g=(e,n,a,i)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let l of o(n))!s.call(e,l)&&l!==a&&t(e,l,{get:()=>n[l],enumerable:!(i=r(n,l))||i.enumerable});return e},y=(n,r,a)=>(a=null!=n?e(l(n)):{},g(!r&&n&&n.__esModule?a:t(a,"default",{value:n,enumerable:!0}),n)),v=m(e=>{var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,h={};function g(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||p}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var b=v.prototype=new y;b.constructor=v,m(b,g.prototype),b.isPureReactComponent=!0;var E=Array.isArray,T=Object.prototype.hasOwnProperty,S={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function N(e,n,r){var a,o={},i=null,l=null;if(null!=n)for(a in void 0!==n.ref&&(l=n.ref),void 0!==n.key&&(i=""+n.key),n)T.call(n,a)&&!w.hasOwnProperty(a)&&(o[a]=n[a]);var s=arguments.length-2;if(1===s)o.children=r;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(a in s=e.defaultProps)void 0===o[a]&&(o[a]=s[a]);return{$$typeof:t,type:e,key:i,ref:l,props:o,_owner:S.current}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var O=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function x(e,r,a,o,i){var l=typeof e;("undefined"===l||"boolean"===l)&&(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case t:case n:s=!0}}if(s)return i=i(s=e),e=""===o?"."+C(s,0):o,E(i)?(a="",null!=e&&(a=e.replace(O,"$&/")+"/"),x(i,r,a,"",function(e){return e})):null!=i&&(R(i)&&(i=function(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}(i,a+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(O,"$&/")+"/")+e)),r.push(i)),1;if(s=0,o=""===o?".":o+":",E(e))for(var c=0;c<e.length;c++){var u=o+C(l=e[c],c);s+=x(l,r,a,u,i)}else if("function"==typeof(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e)))for(e=u.call(e),c=0;!(l=e.next()).done;)s+=x(l=l.value,r,a,u=o+C(l,c++),i);else if("object"===l)throw r=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return s}function k(e,t,n){if(null==e)return e;var r=[],a=0;return x(e,r,"","",function(e){return t.call(n,e,a++)}),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I={current:null},L={transition:null},_={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:L,ReactCurrentOwner:S};e.Children={map:k,forEach:function(e,t,n){k(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},e.Component=g,e.Fragment=r,e.Profiler=o,e.PureComponent=v,e.StrictMode=a,e.Suspense=c,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_,e.cloneElement=function(e,n,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var a=m({},e.props),o=e.key,i=e.ref,l=e._owner;if(null!=n){if(void 0!==n.ref&&(i=n.ref,l=S.current),void 0!==n.key&&(o=""+n.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in n)T.call(n,c)&&!w.hasOwnProperty(c)&&(a[c]=void 0===n[c]&&void 0!==s?s[c]:n[c])}var c=arguments.length-2;if(1===c)a.children=r;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];a.children=s}return{$$typeof:t,type:e.type,key:o,ref:i,props:a,_owner:l}},e.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},e.createElement=N,e.createFactory=function(e){var t=N.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:s,render:e}},e.isValidElement=R,e.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:void 0===t?null:t}},e.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(e,t){return I.current.useCallback(e,t)},e.useContext=function(e){return I.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return I.current.useDeferredValue(e)},e.useEffect=function(e,t){return I.current.useEffect(e,t)},e.useId=function(){return I.current.useId()},e.useImperativeHandle=function(e,t,n){return I.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return I.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return I.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return I.current.useMemo(e,t)},e.useReducer=function(e,t,n){return I.current.useReducer(e,t,n)},e.useRef=function(e){return I.current.useRef(e)},e.useState=function(e){return I.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return I.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return I.current.useTransition()},e.version="18.2.0"}),b=m((e,t)=>{t.exports=v()}),E=m((e,t)=>{t.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}}),T=m((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},l=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,a=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},s=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,a,o,u,f=arguments[0],d=1,p=arguments.length,m=!1;for("boolean"==typeof f&&(m=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=c(f,n),f!==(a=c(t,n))&&(m&&a&&(l(a)||(o=i(a)))?(o?(o=!1,u=r&&i(r)?r:[]):u=r&&l(r)?r:{},s(f,{name:n,newValue:e(m,u,a)})):void 0!==a&&s(f,{name:n,newValue:a}));return f}}),S=m((e,t)=>{t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}),w=m((e,t)=>{var n=S();function r(){}function a(){}a.resetWarningCache=r,t.exports=function(){function e(e,t,r,a,o,i){if(i!==n){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return o.PropTypes=o,o}}),N=m((e,t)=>{t.exports=w()()}),R=m(e=>{var t,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case a:case i:case o:case f:case d:return e;default:switch(e=e&&e.$$typeof){case c:case s:case u:case m:case p:case l:return e;default:return t}}case r:return t}}}t=Symbol.for("react.module.reference"),e.ContextConsumer=s,e.ContextProvider=l,e.Element=n,e.ForwardRef=u,e.Fragment=a,e.Lazy=m,e.Memo=p,e.Portal=r,e.Profiler=i,e.StrictMode=o,e.Suspense=f,e.SuspenseList=d,e.isAsyncMode=function(){return!1},e.isConcurrentMode=function(){return!1},e.isContextConsumer=function(e){return g(e)===s},e.isContextProvider=function(e){return g(e)===l},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},e.isForwardRef=function(e){return g(e)===u},e.isFragment=function(e){return g(e)===a},e.isLazy=function(e){return g(e)===m},e.isMemo=function(e){return g(e)===p},e.isPortal=function(e){return g(e)===r},e.isProfiler=function(e){return g(e)===i},e.isStrictMode=function(e){return g(e)===o},e.isSuspense=function(e){return g(e)===f},e.isSuspenseList=function(e){return g(e)===d},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===i||e===o||e===f||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===t||void 0!==e.getModuleId)},e.typeOf=g}),O=m((e,t)=>{t.exports=R()}),C=m((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,a=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function f(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,d=1;function p(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function m(){var e={line:c,column:d};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:c,column:d},this.source=t.source}function g(n){var r=new Error(t.source+":"+c+":"+d+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=d,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function v(){y(a)}function b(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(u===e.charAt((n+=2)-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,p(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function T(){var e=m(),t=y(o);if(t){if(E(),!y(i))return g("property missing ':'");var r=y(l),a=e({type:"declaration",property:f(t[0].replace(n,u)),value:r?f(r[0].replace(n,u)):u});return y(s),a}}return h.prototype.content=e,v(),function(){var e,t=[];for(b(t);e=T();)!1!==e&&(t.push(e),b(t));return t}()}}),x=m((e,t)=>{var n=C();function r(e,t){var r=null;if(!e||"string"!=typeof e)return r;for(var a,o,i,l=n(e),s="function"==typeof t,c=0,u=l.length;c<u;c++)o=(a=l[c]).property,i=a.value,s?t(o,i,a):i&&(r||(r={}),r[o]=i);return r}t.exports=r,t.exports.default=r}),k={};h(k,{default:()=>Er,uriTransformer:()=>I});var A=["http","https","mailto","tel"];function I(e){let t=(e||"").trim(),n=t.charAt(0);if("#"===n||"/"===n)return t;let r=t.indexOf(":");if(-1===r)return t;let a=-1;for(;++a<A.length;){let e=A[a];if(r===e.length&&t.slice(0,e.length).toLowerCase()===e)return t}return a=t.indexOf("?"),-1!==a&&r>a||(a=t.indexOf("#"),-1!==a&&r>a)?t:"javascript:void(0)"}var L=y(b(),1),_=y(E(),1);function P(e){return e&&"object"==typeof e?"position"in e||"type"in e?D(e.position):"start"in e||"end"in e?D(e):"line"in e||"column"in e?M(e):"":""}function M(e){return U(e&&e.line)+":"+U(e&&e.column)}function D(e){return M(e&&e.start)+"-"+M(e&&e.end)}function U(e){return e&&"number"==typeof e?e:1}var j=class extends Error{constructor(e,t,n){let r=[null,null],a={start:{line:null,column:null},end:{line:null,column:null}};if(super(),"string"==typeof t&&(n=t,t=void 0),"string"==typeof n){let e=n.indexOf(":");-1===e?r[1]=n:(r[0]=n.slice(0,e),r[1]=n.slice(e+1))}t&&("type"in t||"position"in t?t.position&&(a=t.position):"start"in t||"end"in t?a=t:("line"in t||"column"in t)&&(a.start=t)),this.name=P(t)||"1:1",this.message="object"==typeof e?e.message:e,this.stack="","object"==typeof e&&e.stack&&(this.stack=e.stack),this.reason=this.message,this.line=a.start.line,this.column=a.start.column,this.position=a,this.source=r[0],this.ruleId=r[1]}};j.prototype.file="",j.prototype.name="",j.prototype.reason="",j.prototype.message="",j.prototype.stack="",j.prototype.fatal=null,j.prototype.column=null,j.prototype.line=null,j.prototype.source=null,j.prototype.ruleId=null,j.prototype.position=null;var F=function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');B(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,l=t.length-1;for(;o--;)if(47===e.charCodeAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),l>-1&&(e.charCodeAt(o)===t.charCodeAt(l--)?l<0&&(a=o):(l=-1,a=i));return r===a?a=i:a<0&&(a=e.length),e.slice(r,a)},z=function(...e){let t,n=-1;for(;++n<e.length;)B(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){B(e);let t=47===e.charCodeAt(0),n=function(e,t){let n,r,a="",o=0,i=-1,l=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i!==s-1&&1!==l)if(i!==s-1&&2===l){if(a.length<2||2!==o||46!==a.charCodeAt(a.length-1)||46!==a.charCodeAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=s,l=0;continue}}else if(a.length>0){a="",o=0,i=s,l=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,s):a=e.slice(i+1,s),o=s-i-1;i=s,l=0}else 46===n&&l>-1?l++:l=-1}return a}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.charCodeAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)};function B(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function H(e){return null!==e&&"object"==typeof e&&e.href&&e.origin}var V=["history","path","basename","stem","extname","dirname"],W=class{constructor(e){let t;t=e?"string"==typeof e||function(e){return(0,_.default)(e)}(e)?{value:e}:H(e)?{path:e}:e:{},this.data={},this.messages=[],this.history=[],this.cwd="/";let n,r=-1;for(;++r<V.length;){let e=V[r];e in t&&null!=t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)V.includes(n)||(this[n]=t[n])}get path(){return this.history[this.history.length-1]}set path(e){H(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!H(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.charCodeAt(n)&&50===t.charCodeAt(n+1)){let e=t.charCodeAt(n+2);if(70===e||102===e){let e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),Y(e,"path"),this.path!==e&&this.history.push(e)}get dirname(){return"string"==typeof this.path?function(e){if(B(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.charCodeAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.charCodeAt(0)?"/":".":1===n&&47===e.charCodeAt(0)?"//":e.slice(0,n)}(this.path):void 0}set dirname(e){$(this.basename,"dirname"),this.path=z(e||"",this.basename)}get basename(){return"string"==typeof this.path?F(this.path):void 0}set basename(e){Y(e,"basename"),G(e,"basename"),this.path=z(this.dirname||"",e)}get extname(){return"string"==typeof this.path?function(e){B(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){let l=e.charCodeAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}return o<0||r<0||0===i||1===i&&o===r-1&&o===a+1?"":e.slice(o,r)}(this.path):void 0}set extname(e){if(G(e,"extname"),$(this.dirname,"extname"),e){if(46!==e.charCodeAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=z(this.dirname,this.stem+(e||""))}get stem(){return"string"==typeof this.path?F(this.path,this.extname):void 0}set stem(e){Y(e,"stem"),G(e,"stem"),this.path=z(this.dirname||"",e+(this.extname||""))}toString(e){return(this.value||"").toString(e||void 0)}message(e,t,n){let r=new j(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=null,r}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}};function G(e,t){if(e&&e.includes("/"))throw new Error("`"+t+"` cannot be a path: did not expect `/`")}function Y(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function $(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function X(e){if(e)throw e}var q=y(E(),1),K=y(T(),1);function J(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}var Q=function e(){let t,n=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){let l=e[++n],s=-1;if(o)r(o);else{for(;++s<t.length;)null==i[s]&&(i[s]=t[s]);t=i,l?function(e,t){let n;return function(...t){let o,i=e.length>t.length;i&&t.push(r);try{o=e.apply(this,t)}catch(e){let t=e;if(i&&n)throw t;return r(t)}i||(o instanceof Promise?o.then(a,r):o instanceof Error?r(o):a(o))};function r(e,...r){n||(n=!0,t(e,...r))}function a(e){r(null,e)}}(l,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}(),r=[],a={},o=-1;return i.data=function(e,n){return"string"==typeof e?2===arguments.length?(re("data",t),a[e]=n,i):Z.call(a,e)&&a[e]||null:e?(re("data",t),a=e,i):a},i.Parser=void 0,i.Compiler=void 0,i.freeze=function(){if(t)return i;for(;++o<r.length;){let[e,...t]=r[o];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let a=e.call(i,...t);"function"==typeof a&&n.use(a)}return t=!0,o=Number.POSITIVE_INFINITY,i},i.attachers=r,i.use=function(e,...n){let o;if(re("use",t),null!=e)if("function"==typeof e)u(e,...n);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?c(e):s(e)}return o&&(a.settings=Object.assign(a.settings||{},o)),i;function l(e){if("function"==typeof e)u(e);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){let[t,...n]=e;u(t,...n)}else s(e)}}function s(e){c(e.plugins),e.settings&&(o=Object.assign(o||{},e.settings))}function c(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;)l(e[t])}}function u(e,t){let n,a=-1;for(;++a<r.length;)if(r[a][0]===e){n=r[a];break}n?(J(n[1])&&J(t)&&(t=(0,K.default)(!0,n[1],t)),n[1]=t):r.push([...arguments])}},i.parse=function(e){i.freeze();let t=ie(e),n=i.Parser;return te("parse",n),ee(n,"parse")?new n(String(t),t).parse():n(String(t),t)},i.stringify=function(e,t){i.freeze();let n=ie(t),r=i.Compiler;return ne("stringify",r),ae(e),ee(r,"compile")?new r(e,n).compile():r(e,n)},i.run=function(e,t,r){if(ae(e),i.freeze(),!r&&"function"==typeof t&&(r=t,t=void 0),!r)return new Promise(a);function a(a,o){n.run(e,ie(t),function(t,n,i){n=n||e,t?o(t):a?a(n):r(null,n,i)})}a(null,r)},i.runSync=function(e,t){let n,r;return i.run(e,t,function(e,t){X(e),n=t,r=!0}),oe("runSync","run",r),n},i.process=function(e,t){if(i.freeze(),te("process",i.Parser),ne("process",i.Compiler),!t)return new Promise(n);function n(n,r){let a=ie(e);function o(e,a){e||!a?r(e):n?n(a):t(null,a)}i.run(i.parse(a),a,(e,t,n)=>{if(!e&&t&&n){let r=i.stringify(t,n);null==r||(function(e){return"string"==typeof e||(0,q.default)(e)}(r)?n.value=r:n.result=r),o(e,n)}else o(e)})}n(null,t)},i.processSync=function(e){let t;i.freeze(),te("processSync",i.Parser),ne("processSync",i.Compiler);let n=ie(e);return i.process(n,function(e){t=!0,X(e)}),oe("processSync","process",t),n},i;function i(){let t=e(),n=-1;for(;++n<r.length;)t.use(...r[n]);return t.data((0,K.default)(!0,{},a)),t}}().freeze(),Z={}.hasOwnProperty;function ee(e,t){return"function"==typeof e&&e.prototype&&(function(e){let t;for(t in e)if(Z.call(e,t))return!0;return!1}(e.prototype)||t in e.prototype)}function te(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Parser`")}function ne(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `Compiler`")}function re(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ae(e){if(!J(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function oe(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ie(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new W(e)}var le={};function se(e,t,n){if(function(e){return!(!e||"object"!=typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ce(e.children,t,n)}return Array.isArray(e)?ce(e,t,n):""}function ce(e,t,n){let r=[],a=-1;for(;++a<e.length;)r[a]=se(e[a],t,n);return r.join("")}function ue(e,t,n,r){let a,o=e.length,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),[].splice.apply(e,a);else for(n&&[].splice.apply(e,[t,n]);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),[].splice.apply(e,a),i+=1e4,t+=1e4}function fe(e,t){return e.length>0?(ue(e,e.length,0,t),e):t}var de={}.hasOwnProperty;function pe(e){let t={},n=-1;for(;++n<e.length;)me(t,e[n]);return t}function me(e,t){let n;for(n in t){let r,a=(de.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];for(r in o){de.call(a,r)||(a[r]=[]);let e=o[r];he(a[r],Array.isArray(e)?e:e?[e]:[])}}}function he(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ue(e,0,0,r)}var ge=xe(/[A-Za-z]/),ye=xe(/\d/),ve=xe(/[\dA-Fa-f]/),be=xe(/[\dA-Za-z]/),Ee=xe(/[!-/:-@[-`{-~]/),Te=xe(/[#-'*+\--9=?A-Z^-~]/);function Se(e){return null!==e&&(e<32||127===e)}function we(e){return null!==e&&(e<0||32===e)}function Ne(e){return null!==e&&e<-2}function Re(e){return-2===e||-1===e||32===e}var Oe=xe(/\s/),Ce=xe(/[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/);function xe(e){return function(t){return null!==t&&e.test(String.fromCharCode(t))}}function ke(e,t,n,r){let a=r?r-1:Number.POSITIVE_INFINITY,o=0;return function(r){return Re(r)?(e.enter(n),i(r)):t(r)};function i(r){return Re(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}var Ae={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){if(null!==t)return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ke(e,n,"linePrefix");e.consume(t)},function(t){return e.enter("paragraph"),r(t)});return n;function r(n){let r=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=r),t=r,a(n)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Ne(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}},Ie={tokenize:function(e){let t,n,r,a=this,o=[],i=0;return l;function l(t){if(i<o.length){let n=o[i];return a.containerState=n[1],e.attempt(n[0].continuation,s,c)(t)}return c(t)}function s(e){if(i++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,t&&v();let n,r=a.events.length,o=r;for(;o--;)if("exit"===a.events[o][0]&&"chunkFlow"===a.events[o][1].type){n=a.events[o][1].end;break}y(i);let l=r;for(;l<a.events.length;)a.events[l][1].end=Object.assign({},n),l++;return ue(a.events,o+1,0,a.events.slice(r)),a.events.length=l,c(e)}return l(e)}function c(n){if(i===o.length){if(!t)return d(n);if(t.currentConstruct&&t.currentConstruct.concrete)return m(n);a.interrupt=!(!t.currentConstruct||t._gfmTableDynamicInterruptHack)}return a.containerState={},e.check(Le,u,f)(n)}function u(e){return t&&v(),y(i),d(e)}function f(e){return a.parser.lazy[a.now().line]=i!==o.length,r=a.now().offset,m(e)}function d(t){return a.containerState={},e.attempt(Le,p,m)(t)}function p(e){return i++,o.push([a.currentConstruct,a.containerState]),d(e)}function m(r){return null===r?(t&&v(),y(0),void e.consume(r)):(t=t||a.parser.flow(a.now()),e.enter("chunkFlow",{contentType:"flow",previous:n,_tokenizer:t}),h(r))}function h(t){return null===t?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(t)):Ne(t)?(e.consume(t),g(e.exit("chunkFlow")),i=0,a.interrupt=void 0,l):(e.consume(t),h)}function g(e,o){let l=a.sliceStream(e);if(o&&l.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(l),a.parser.lazy[e.start.line]){let e=t.events.length;for(;e--;)if(t.events[e][1].start.offset<r&&(!t.events[e][1].end||t.events[e][1].end.offset>r))return;let n,o,l=a.events.length,s=l;for(;s--;)if("exit"===a.events[s][0]&&"chunkFlow"===a.events[s][1].type){if(n){o=a.events[s][1].end;break}n=!0}for(y(i),e=l;e<a.events.length;)a.events[e][1].end=Object.assign({},o),e++;ue(a.events,s+1,0,a.events.slice(l)),a.events.length=e}}function y(t){let n=o.length;for(;n-- >t;){let t=o[n];a.containerState=t[1],t[0].exit.call(a,e)}o.length=t}function v(){t.write([null]),n=void 0,t=void 0,a.containerState._closeFlow=void 0}}},Le={tokenize:function(e,t,n){return ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function _e(e){return null===e||we(e)||Oe(e)?1:Ce(e)?2:void 0}function Pe(e,t,n){let r=[],a=-1;for(;++a<e.length;){let o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var Me={name:"attention",tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,a=this.previous,o=_e(a);return function(t){return e.enter("attentionSequence"),n=t,i(t)};function i(l){if(l===n)return e.consume(l),i;let s=e.exit("attentionSequence"),c=_e(l),u=!c||2===c&&o||r.includes(l),f=!o||2===o&&c||r.includes(a);return s._open=!!(42===n?u:u&&(o||!f)),s._close=!!(42===n?f:f&&(c||!u)),t(l)}},resolveAll:function(e,t){let n,r,a,o,i,l,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let f=Object.assign({},e[n][1].end),d=Object.assign({},e[u][1].start);De(f,-l),De(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[n][1].end)},i={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:d},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},i.end)},e[n][1].end=Object.assign({},o.start),e[u][1].start=Object.assign({},i.end),s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=fe(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=fe(s,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),s=fe(s,Pe(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=fe(s,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=fe(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,ue(e,n-1,u-n+3,s),u=n+s.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function De(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ue={name:"autolink",tokenize:function(e,t,n){let r=1;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return ge(t)?(e.consume(t),o):Te(t)?s(t):n(t)}function o(e){return 43===e||45===e||46===e||be(e)?i(e):s(e)}function i(t){return 58===t?(e.consume(t),l):(43===t||45===t||46===t||be(t))&&r++<32?(e.consume(t),i):s(t)}function l(t){return 62===t?(e.exit("autolinkProtocol"),d(t)):null===t||32===t||60===t||Se(t)?n(t):(e.consume(t),l)}function s(t){return 64===t?(e.consume(t),r=0,c):Te(t)?(e.consume(t),s):n(t)}function c(e){return be(e)?u(e):n(e)}function u(t){return 46===t?(e.consume(t),r=0,c):62===t?(e.exit("autolinkProtocol").type="autolinkEmail",d(t)):f(t)}function f(t){return(45===t||be(t))&&r++<63?(e.consume(t),45===t?f:u):n(t)}function d(n){return e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t}}},je={tokenize:function(e,t,n){return ke(e,function(e){return null===e||Ne(e)?t(e):n(e)},"linePrefix")},partial:!0},Fe={name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return n(t)};function a(n){return Re(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){return ke(e,e.attempt(Fe,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},exit:function(e){e.exit("blockQuote")}},ze={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Ee(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},Be=document.createElement("i");function He(e){let t="&"+e+";";Be.innerHTML=t;let n=Be.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}var Ve={name:"characterReference",tokenize:function(e,t,n){let r,a,o=this,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,a=be,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,a=ve,c):(e.enter("characterReferenceValue"),r=7,a=ye,c(t))}function c(l){let s;return 59===l&&i?(s=e.exit("characterReferenceValue"),a!==be||He(o.sliceSerialize(s))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)):a(l)&&i++<r?(e.consume(l),c):n(l)}}},We={name:"codeFenced",tokenize:function(e,t,n){let r,a=this,o={tokenize:function(e,t,n){let a=0;return ke(e,function(t){return e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),o(t)},"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function o(t){return t===r?(e.consume(t),a++,o):a<c?n(t):(e.exit("codeFencedFenceSequence"),ke(e,i,"whitespace")(t))}function i(r){return null===r||Ne(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0},i={tokenize:function(e,t,n){let r=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},l=this.events[this.events.length-1],s=l&&"linePrefix"===l[1].type?l[2].sliceSerialize(l[1],!0).length:0,c=0;return function(t){return e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),r=t,u(t)};function u(t){return t===r?(e.consume(t),c++,u):(e.exit("codeFencedFenceSequence"),c<3?n(t):ke(e,f,"whitespace")(t))}function f(t){return null===t||Ne(t)?h(t):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||we(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ke(e,p,"whitespace")(t)):96===t&&t===r?n(t):(e.consume(t),d)}function p(t){return null===t||Ne(t)?h(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(t))}function m(t){return null===t||Ne(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(t)):96===t&&t===r?n(t):(e.consume(t),m)}function h(n){return e.exit("codeFencedFence"),a.interrupt?t(n):g(n)}function g(t){return null===t?v(t):Ne(t)?e.attempt(i,e.attempt(o,v,s?ke(e,g,"linePrefix",s+1):g),v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||Ne(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}},concrete:!0},Ge={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),ke(e,a,"linePrefix",5)(t)};function a(e){let t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?l(t):Ne(t)?e.attempt(Ye,o,l)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Ne(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function l(n){return e.exit("codeIndented"),t(n)}}},Ye={tokenize:function(e,t,n){let r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):Ne(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):ke(e,o,"linePrefix",5)(t)}function o(e){let o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Ne(e)?a(e):n(e)}},partial:!0},$e={name:"codeText",tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):Ne(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||Ne(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),s)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",s(n))}},resolve:function(e){let t,n,r=e.length-4,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}for(t=a-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function Xe(e){let t,n,r,a,o,i,l,s={},c=-1;for(;++c<e.length;){for(;c in s;)c=s[c];if(t=e[c],c&&"chunkFlow"===t[1].type&&"listItemPrefix"===e[c-1][1].type&&(i=t[1]._tokenizer.events,r=0,r<i.length&&"lineEndingBlank"===i[r][1].type&&(r+=2),r<i.length&&"content"===i[r][1].type))for(;++r<i.length&&"content"!==i[r][1].type;)"chunkText"===i[r][1].type&&(i[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,qe(e,c)),c=s[c],l=!0);else if(t[1]._container){for(r=c,n=void 0;r--&&(a=e[r],"lineEnding"===a[1].type||"lineEndingBlank"===a[1].type);)"enter"===a[0]&&(n&&(e[n][1].type="lineEndingBlank"),a[1].type="lineEnding",n=r);n&&(t[1].end=Object.assign({},e[n][1].start),o=e.slice(n,c),o.unshift(t),ue(e,n,c-n+1,o))}}return!l}function qe(e,t){let n,r,a=e[t][1],o=e[t][2],i=t-1,l=[],s=a._tokenizer||o.parser[a.contentType](a.start),c=s.events,u=[],f={},d=-1,p=a,m=0,h=0,g=[h];for(;p;){for(;e[++i][1]!==p;);l.push(i),p._tokenizer||(n=o.sliceStream(p),p.next||n.push(null),r&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=a;++d<c.length;)"exit"===c[d][0]&&"enter"===c[d-1][0]&&c[d][1].type===c[d-1][1].type&&c[d][1].start.line!==c[d][1].end.line&&(h=d+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){let t=c.slice(g[d],g[d+1]),n=l.pop();u.unshift([n,n+t.length-1]),ue(e,n,2,t)}for(d=-1;++d<u.length;)f[m+u[d][0]]=m+u[d][1],m+=u[d][1]-u[d][0]-1;return f}var Ke={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?a(t):Ne(t)?e.check(Je,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return Xe(e),e}},Je={tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ke(e,a,"linePrefix")};function a(a){if(null===a||Ne(a))return n(a);let o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}},partial:!0};function Qe(e,t,n,r,a,o,i,l,s){let c=s||Number.POSITIVE_INFINITY,u=0;return function(t){return 60===t?(e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),f):null===t||41===t||Se(t)?n(t):(e.enter(r),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(t))};function f(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(l),f(t)):null===t||60===t||Ne(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function m(a){return 40===a?++u>c?n(a):(e.consume(a),m):41===a?u--?(e.consume(a),m):(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(a)):null===a||we(a)?u?n(a):(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(a)):Se(a)?n(a):(e.consume(a),92===a?h:m)}function h(t){return 40===t||41===t||92===t?(e.consume(t),m):m(t)}}function Ze(e,t,n,r,a,o){let i,l=this,s=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(f){return null===f||91===f||93===f&&!i||94===f&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs||s>999?n(f):93===f?(e.exit(o),e.enter(a),e.consume(f),e.exit(a),e.exit(r),t):Ne(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(t){return null===t||91===t||93===t||Ne(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),i=i||!Re(t),92===t?f:u)}function f(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function et(e,t,n,r,a,o){let i;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,l};function l(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),s(n))}function s(t){return t===i?(e.exit(o),l(i)):null===t?n(t):Ne(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ke(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||Ne(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function tt(e,t){let n;return function r(a){return Ne(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):Re(a)?ke(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}function nt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var rt={name:"definition",tokenize:function(e,t,n){let r,a=this;return function(t){return e.enter("definition"),Ze.call(a,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)};function o(t){return r=nt(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),tt(e,Qe(e,e.attempt(at,ke(e,i,"whitespace"),ke(e,i,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(t)}function i(o){return null===o||Ne(o)?(e.exit("definition"),a.parser.defined.includes(r)||a.parser.defined.push(r),t(o)):n(o)}}},at={tokenize:function(e,t,n){return function(t){return we(t)?tt(e,r)(t):n(t)};function r(t){return 34===t||39===t||40===t?et(e,ke(e,a,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t):n(t)}function a(e){return null===e||Ne(e)?t(e):n(e)}},partial:!0},ot={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(t),r};function r(r){return Ne(r)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(r)):n(r)}}},it={name:"headingAtx",tokenize:function(e,t,n){let r=this,a=0;return function(t){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),o(t)};function o(l){return 35===l&&a++<6?(e.consume(l),o):null===l||we(l)?(e.exit("atxHeadingSequence"),r.interrupt?t(l):i(l)):n(l)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||Ne(n)?(e.exit("atxHeading"),t(n)):Re(n)?ke(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||we(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}},resolve:function(e,t){let n,r,a=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),a-2>o&&"whitespace"===e[a][1].type&&(a-=2),"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4),a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},ue(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},lt=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],st=["pre","script","style","textarea"],ct={name:"htmlFlow",tokenize:function(e,t,n){let r,a,o,i,l,s=this;return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c};function c(i){return 33===i?(e.consume(i),u):47===i?(e.consume(i),p):63===i?(e.consume(i),r=3,s.interrupt?t:P):ge(i)?(e.consume(i),o=String.fromCharCode(i),a=!0,m):n(i)}function u(a){return 45===a?(e.consume(a),r=2,f):91===a?(e.consume(a),r=5,o="CDATA[",i=0,d):ge(a)?(e.consume(a),r=4,s.interrupt?t:P):n(a)}function f(r){return 45===r?(e.consume(r),s.interrupt?t:P):n(r)}function d(r){return r===o.charCodeAt(i++)?(e.consume(r),i===o.length?s.interrupt?t:O:d):n(r)}function p(t){return ge(t)?(e.consume(t),o=String.fromCharCode(t),m):n(t)}function m(i){return null===i||47===i||62===i||we(i)?47!==i&&a&&st.includes(o.toLowerCase())?(r=1,s.interrupt?t(i):O(i)):lt.includes(o.toLowerCase())?(r=6,47===i?(e.consume(i),h):s.interrupt?t(i):O(i)):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(i):a?y(i):g(i)):45===i||be(i)?(e.consume(i),o+=String.fromCharCode(i),m):n(i)}function h(r){return 62===r?(e.consume(r),s.interrupt?t:O):n(r)}function g(t){return Re(t)?(e.consume(t),g):N(t)}function y(t){return 47===t?(e.consume(t),N):58===t||95===t||ge(t)?(e.consume(t),v):Re(t)?(e.consume(t),y):N(t)}function v(t){return 45===t||46===t||58===t||95===t||be(t)?(e.consume(t),v):b(t)}function b(t){return 61===t?(e.consume(t),E):Re(t)?(e.consume(t),b):y(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,T):Re(t)?(e.consume(t),E):(l=null,S(t))}function T(t){return null===t||Ne(t)?n(t):t===l?(e.consume(t),w):(e.consume(t),T)}function S(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t||we(t)?b(t):(e.consume(t),S)}function w(e){return 47===e||62===e||Re(e)?y(e):n(e)}function N(t){return 62===t?(e.consume(t),R):n(t)}function R(t){return Re(t)?(e.consume(t),R):null===t||Ne(t)?O(t):n(t)}function O(t){return 45===t&&2===r?(e.consume(t),A):60===t&&1===r?(e.consume(t),I):62===t&&4===r?(e.consume(t),M):63===t&&3===r?(e.consume(t),P):93===t&&5===r?(e.consume(t),_):!Ne(t)||6!==r&&7!==r?null===t||Ne(t)?C(t):(e.consume(t),O):e.check(ut,M,C)(t)}function C(t){return e.exit("htmlFlowData"),x(t)}function x(t){return null===t?D(t):Ne(t)?e.attempt({tokenize:k,partial:!0},x,D)(t):(e.enter("htmlFlowData"),O(t))}function k(e,t,n){return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),r};function r(e){return s.parser.lazy[s.now().line]?n(e):t(e)}}function A(t){return 45===t?(e.consume(t),P):O(t)}function I(t){return 47===t?(e.consume(t),o="",L):O(t)}function L(t){return 62===t&&st.includes(o.toLowerCase())?(e.consume(t),M):ge(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),L):O(t)}function _(t){return 93===t?(e.consume(t),P):O(t)}function P(t){return 62===t?(e.consume(t),M):45===t&&2===r?(e.consume(t),P):O(t)}function M(t){return null===t||Ne(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),M)}function D(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},ut={tokenize:function(e,t,n){return function(r){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),e.attempt(je,t,n)}},partial:!0},ft={name:"htmlText",tokenize:function(e,t,n){let r,a,o,i,l=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),c):47===t?(e.consume(t),S):63===t?(e.consume(t),E):ge(t)?(e.consume(t),R):n(t)}function c(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),a="CDATA[",o=0,h):ge(t)?(e.consume(t),b):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function f(t){return null===t||62===t?n(t):45===t?(e.consume(t),d):p(t)}function d(e){return null===e||62===e?n(e):p(e)}function p(t){return null===t?n(t):45===t?(e.consume(t),m):Ne(t)?(i=p,_(t)):(e.consume(t),p)}function m(t){return 45===t?(e.consume(t),M):p(t)}function h(t){return t===a.charCodeAt(o++)?(e.consume(t),o===a.length?g:h):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),y):Ne(t)?(i=g,_(t)):(e.consume(t),g)}function y(t){return 93===t?(e.consume(t),v):g(t)}function v(t){return 62===t?M(t):93===t?(e.consume(t),v):g(t)}function b(t){return null===t||62===t?M(t):Ne(t)?(i=b,_(t)):(e.consume(t),b)}function E(t){return null===t?n(t):63===t?(e.consume(t),T):Ne(t)?(i=E,_(t)):(e.consume(t),E)}function T(e){return 62===e?M(e):E(e)}function S(t){return ge(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||be(t)?(e.consume(t),w):N(t)}function N(t){return Ne(t)?(i=N,_(t)):Re(t)?(e.consume(t),N):M(t)}function R(t){return 45===t||be(t)?(e.consume(t),R):47===t||62===t||we(t)?O(t):n(t)}function O(t){return 47===t?(e.consume(t),M):58===t||95===t||ge(t)?(e.consume(t),C):Ne(t)?(i=O,_(t)):Re(t)?(e.consume(t),O):M(t)}function C(t){return 45===t||46===t||58===t||95===t||be(t)?(e.consume(t),C):x(t)}function x(t){return 61===t?(e.consume(t),k):Ne(t)?(i=x,_(t)):Re(t)?(e.consume(t),x):O(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,A):Ne(t)?(i=k,_(t)):Re(t)?(e.consume(t),k):(e.consume(t),r=void 0,L)}function A(t){return t===r?(e.consume(t),I):null===t?n(t):Ne(t)?(i=A,_(t)):(e.consume(t),A)}function I(e){return 62===e||47===e||we(e)?O(e):n(e)}function L(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):62===t||we(t)?O(t):(e.consume(t),L)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),ke(e,P,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function P(t){return e.enter("htmlTextData"),i(t)}function M(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}}},dt={name:"labelEnd",tokenize:function(e,t,n){let r,a,o=this,i=o.events.length;for(;i--;)if(("labelImage"===o.events[i][1].type||"labelLink"===o.events[i][1].type)&&!o.events[i][1]._balanced){r=o.events[i][1];break}return function(t){return r?r._inactive?s(t):(a=o.parser.defined.includes(nt(o.sliceSerialize({start:r.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(n){return 40===n?e.attempt(pt,t,a?t:s)(n):91===n?e.attempt(mt,t,a?e.attempt(ht,t,s):s)(n):a?t(n):s(n)}function s(e){return r._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,a,o,i=e.length,l=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(a=i);let s={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[r+l+2][1].end),end:Object.assign({},e[a-2][1].start)};return o=[["enter",s,t],["enter",c,t]],o=fe(o,e.slice(r+1,r+l+3)),o=fe(o,[["enter",u,t]]),o=fe(o,Pe(t.parser.constructs.insideSpan.null,e.slice(r+l+4,a-3),t)),o=fe(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=fe(o,e.slice(a+1)),o=fe(o,[["exit",s,t]]),ue(e,r,e.length,o),e},resolveAll:function(e){let t,n=-1;for(;++n<e.length;)t=e[n][1],("labelImage"===t.type||"labelLink"===t.type||"labelEnd"===t.type)&&(e.splice(n+1,"labelImage"===t.type?4:2),t.type="data",n++);return e}},pt={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),tt(e,r)};function r(t){return 41===t?i(t):Qe(e,a,n,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return we(t)?tt(e,o)(t):i(t)}function o(t){return 34===t||39===t||40===t?et(e,tt(e,i),n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):i(t)}function i(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},mt={tokenize:function(e,t,n){let r=this;return function(t){return Ze.call(r,e,a,n,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}}},ht={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},gt={name:"labelStartImage",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:dt.resolveAll},yt={name:"labelStartLink",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:dt.resolveAll},vt={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),ke(e,t,"linePrefix")}}},bt={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),r=t,o(t)};function o(l){return l===r?(e.enter("thematicBreakSequence"),i(l)):Re(l)?ke(e,o,"whitespace")(l):a<3||null!==l&&!Ne(l)?n(l):(e.exit("thematicBreak"),t(l))}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),o(t))}}},Et={name:"list",tokenize:function(e,t,n){let r=this,a=r.events[r.events.length-1],o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){let a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:ye(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(bt,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return ye(t)&&++i<10?(e.consume(t),l):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(je,r.interrupt?n:c,e.attempt(Tt,f,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,f(e)}function u(t){return Re(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),f):n(t)}function f(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(je,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ke(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Re(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(St,t,a)(n))});function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ke(e,e.attempt(Et,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)}},Tt={tokenize:function(e,t,n){let r=this;return ke(e,function(e){let a=r.events[r.events.length-1];return!Re(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},St={tokenize:function(e,t,n){let r=this;return ke(e,function(e){let a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)},partial:!0},wt={name:"setextUnderline",tokenize:function(e,t,n){let r,a,o=this,i=o.events.length;for(;i--;)if("lineEnding"!==o.events[i][1].type&&"linePrefix"!==o.events[i][1].type&&"content"!==o.events[i][1].type){a="paragraph"===o.events[i][1].type;break}return function(t){return o.parser.lazy[o.now().line]||!o.interrupt&&!a?n(t):(e.enter("setextHeadingLine"),e.enter("setextHeadingLineSequence"),r=t,l(t))};function l(t){return t===r?(e.consume(t),l):(e.exit("setextHeadingLineSequence"),ke(e,s,"lineSuffix")(t))}function s(r){return null===r||Ne(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),!a&&"definition"===e[o][1].type&&(a=o);let i={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[a][1].end)):e[n][1]=i,e.push(["exit",i,t]),e}},Nt={tokenize:function(e){let t=this,n=e.attempt(je,function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)},e.attempt(this.parser.constructs.flowInitial,r,ke(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ke,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},Rt={resolveAll:kt()},Ot=xt("string"),Ct=xt("text");function xt(e){return{tokenize:function(t){let n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return s(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return s(e)?(t.exit("data"),a(e)):(t.consume(e),l)}function s(e){if(null===e)return!0;let t=r[e],a=-1;if(t)for(;++a<t.length;){let e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:kt("text"===e?At:void 0)}}function kt(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):(!t[a]||"data"!==t[a][1].type)&&(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function At(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,a=e[n-1][1],o=t.sliceStream(a),i=o.length,l=-1,s=0;for(;i--;){let e=o[i];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)r=!0,s++;else if(-1!==e){i++;break}}if(s){let o={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{line:a.end.line,column:a.end.column-s,offset:a.end.offset-s,_index:a.start._index+i,_bufferIndex:i?l:a.start._bufferIndex+l},end:Object.assign({},a.end)};a.end=Object.assign({},o.start),a.start.offset===a.end.offset?Object.assign(a,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}var It={};h(It,{attentionMarkers:()=>Ft,contentInitial:()=>_t,disable:()=>zt,document:()=>Lt,flow:()=>Mt,flowInitial:()=>Pt,insideSpan:()=>jt,string:()=>Dt,text:()=>Ut});var Lt={42:Et,43:Et,45:Et,48:Et,49:Et,50:Et,51:Et,52:Et,53:Et,54:Et,55:Et,56:Et,57:Et,62:Fe},_t={91:rt},Pt={[-2]:Ge,[-1]:Ge,32:Ge},Mt={35:it,42:bt,45:[wt,bt],60:ct,61:wt,95:bt,96:We,126:We},Dt={38:Ve,92:ze},Ut={[-5]:vt,[-4]:vt,[-3]:vt,33:gt,38:Ve,42:Me,60:[Ue,ft],91:yt,92:[ot,ze],93:dt,95:Me,96:$e},jt={null:[Me,Rt]},Ft={null:[42,95]},zt={null:[]},Bt=/[\0\t\n\r]/g;function Ht(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||65535==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}var Vt=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wt(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return Ht(n.slice(t?2:1),t?16:10)}return He(n)||e}var Gt={}.hasOwnProperty,Yt=function(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(E),autolinkProtocol:d,autolinkEmail:d,atxHeading:i(y),blockQuote:i(function(){return{type:"blockquote",children:[]}}),characterEscape:d,characterReference:d,codeFenced:i(g),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(g,l),codeText:i(function(){return{type:"inlineCode",value:""}},l),codeTextData:d,data:d,codeFlowValue:d,definition:i(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:i(v),hardBreakTrailing:i(v),htmlFlow:i(b,l),htmlFlowData:d,htmlText:i(b,l),htmlTextData:d,image:i(function(){return{type:"image",title:null,url:"",alt:null}}),label:l,link:i(E),listItem:i(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){o("expectingFirstListItemValue")&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),a("expectingFirstListItemValue"))},listOrdered:i(T,function(){a("expectingFirstListItemValue",!0)}),listUnordered:i(T),paragraph:i(function(){return{type:"paragraph",children:[]}}),reference:function(){a("referenceType","collapsed")},referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(y),strong:i(function(){return{type:"strong",children:[]}}),thematicBreak:i(function(){return{type:"thematicBreak"}})},exit:{atxHeading:c(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];if(!t.depth){let n=this.sliceSerialize(e).length;t.depth=n}},autolink:c(),autolinkEmail:function(e){p.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){p.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:c(),characterEscapeValue:p,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=o("characterReferenceType");r?(t=Ht(n,"characterReferenceMarkerNumeric"===r?10:16),a("characterReferenceType")):t=He(n);let i=this.stack.pop();i.value+=t,i.position.end=$t(e.end)},codeFenced:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),a("flowCodeInside")}),codeFencedFence:function(){o("flowCodeInside")||(this.buffer(),a("flowCodeInside",!0))},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:p,codeIndented:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:p,data:p,definition:c(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=nt(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:c(),hardBreakEscape:c(m),hardBreakTrailing:c(m),htmlFlow:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:p,htmlText:c(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:p,image:c(function(){let e=this.stack[this.stack.length-1];if(o("inReference")){let t=o("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;a("referenceType")}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];a("inReference",!0),"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Vt,Wt)}(t),n.identifier=nt(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(o("atHardBreak"))return n.children[n.children.length-1].position.end=$t(e.end),void a("atHardBreak");!o("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(n.type)&&(d.call(this,e),p.call(this,e))},link:c(function(){let e=this.stack[this.stack.length-1];if(o("inReference")){let t=o("referenceType")||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;a("referenceType")}),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=nt(this.sliceSerialize(e)).toLowerCase(),a("referenceType","full")},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){a("inReference")},setextHeading:c(function(){a("setextHeadingSlurpLineEnding")}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).charCodeAt(0)?1:2},setextHeadingText:function(){a("setextHeadingSlurpLineEnding",!0)},strong:c(),thematicBreak:c()}};Xt(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let n={type:"root",children:[]},i={stack:[n],tokenStack:[],config:t,enter:s,exit:u,buffer:l,resume:f,setData:a,getData:o},c=[],d=-1;for(;++d<e.length;)"listOrdered"!==e[d][1].type&&"listUnordered"!==e[d][1].type||("enter"===e[d][0]?c.push(d):d=r(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Gt.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||Kt).call(i,void 0,e[0])}for(n.position={start:$t(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:$t(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)n=t.transforms[d](n)||n;return n};function r(e,t,n){let r,a,o,i,l=t-1,s=-1,c=!1;for(;++l<=n;){let t=e[l];if("listUnordered"===t[1].type||"listOrdered"===t[1].type||"blockQuote"===t[1].type?("enter"===t[0]?s++:s--,i=void 0):"lineEndingBlank"===t[1].type?"enter"===t[0]&&(r&&!i&&!s&&!o&&(o=l),i=void 0):"linePrefix"===t[1].type||"listItemValue"===t[1].type||"listItemMarker"===t[1].type||"listItemPrefix"===t[1].type||"listItemPrefixWhitespace"===t[1].type||(i=void 0),!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=l;for(a=void 0;i--;){let t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||l,0,["exit",r,t[2]]),l++,n++}"listItemPrefix"===t[1].type&&(r={type:"listItem",_spread:!1,start:Object.assign({},t[1].start)},e.splice(l,0,["enter",r,t[2]]),l++,n++,o=void 0,i=!0)}}return e[t][1]._spread=c,n}function a(e,t){n[e]=t}function o(e){return n[e]}function i(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){return this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:$t(t.start)},e}function c(e){return function(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+P({start:e.start,end:e.end})+"): it’s not open");return r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Kt).call(this,e,r[0])),n.position.end=$t(e.end),n}function f(){return function(e,t){return se(e,"boolean"!=typeof le.includeImageAlt||le.includeImageAlt,"boolean"!=typeof le.includeHtml||le.includeHtml)}(this.stack.pop())}function d(e){let t=this.stack[this.stack.length-1],n=t.children[t.children.length-1];(!n||"text"!==n.type)&&(n={type:"text",value:""},n.position={start:$t(e.start)},t.children.push(n)),this.stack.push(n)}function p(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=$t(e.end)}function m(){a("atHardBreak",!0)}function h(e){a("characterReferenceType",e.type)}function g(){return{type:"code",lang:null,meta:null,value:""}}function y(){return{type:"heading",depth:void 0,children:[]}}function v(){return{type:"break"}}function b(){return{type:"html",value:""}}function E(){return{type:"link",title:null,url:"",children:[]}}function T(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(n)(function(e){for(;!Xe(e););return e}(function(e={}){let t={defined:[],lazy:{},constructs:pe([It].concat(e.extensions||[])),content:n(Ae),document:n(Ie),flow:n(Nt),string:n(Ot),text:n(Ct)};return t;function n(e){return function(n){return function(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),a={},o=[],i=[],l=[],s={consume:function(e){Ne(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=d(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){let t=l.pop();return t.end=d(),c.events.push(["exit",t,c]),t},attempt:h(function(e,t){g(e,t.from)}),check:h(m),interrupt:h(m,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,a=[];for(;++r<e.length;){let o,i=e[r];if("string"==typeof i)o=i;else switch(i){case-5:o="\r";break;case-4:o="\n";break;case-3:o="\r\n";break;case-2:o=t?" ":"\t";break;case-1:if(!t&&n)continue;o=" ";break;default:o=String.fromCharCode(i)}n=-2===i,a.push(o)}return a.join("")}(f(e),t)},now:d,defineSkip:function(e){a[e.line]=e.column,y()},write:function(e){return i=fe(i,e),function(){let e;for(;r._index<i.length;){let t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)p(t.charCodeAt(r._bufferIndex));else p(t)}}(),null!==i[i.length-1]?[]:(g(t,0),c.events=Pe(o,c.events,c),c.events)}},u=t.tokenize.call(c,s);return t.resolveAll&&o.push(t),c;function f(e){return function(e,t){let n,r=t.start._index,a=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;return r===o?n=[e[r].slice(a,i)]:(n=e.slice(r,o),a>-1&&(n[0]=n[0].slice(a)),i>0&&n.push(e[o].slice(0,i))),n}(i,e)}function d(){return Object.assign({},r)}function p(e){u=u(e)}function m(e,t){t.restore()}function h(e,t){return function(n,a,o){let i,u,f,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):(m=n,function(e){let t=null!==e&&m[e],n=null!==e&&m.null;return h([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});var m;function h(e){return i=e,u=0,0===e.length?o:g(e[u])}function g(e){return function(n){return p=function(){let e=d(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(l);return{restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,l=o,y()},from:a}}(),f=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,v,b)(n)}}function v(t){return e(f,p),a}function b(e){return p.restore(),++u<i.length?g(i[u]):o}}}function g(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&ue(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){let l,s,c,u,f,d=[];for(a=n+a.toString(o),c=0,n="",r&&(65279===a.charCodeAt(0)&&c++,r=void 0);c<a.length;){if(Bt.lastIndex=c,l=Bt.exec(a),u=l&&void 0!==l.index?l.index:a.length,f=a.charCodeAt(u),!l){n=a.slice(c);break}if(10===f&&c===u&&e)d.push(-3),e=void 0;else switch(e&&(d.push(-5),e=void 0),c<u&&(d.push(a.slice(c,u)),t+=u-c),f){case 0:d.push(65533),t++;break;case 9:for(s=4*Math.ceil(t/4),d.push(-2);t++<s;)d.push(-1);break;case 10:d.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return i&&(e&&d.push(-5),n&&d.push(n),d.push(null)),d}}()(e,t,!0))))};function $t(e){return{line:e.line,column:e.column,offset:e.offset}}function Xt(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Xt(e,r):qt(e,r)}}function qt(e,t){let n;for(n in t)if(Gt.call(t,n))if("canContainEols"===n){let r=t[n];r&&e[n].push(...r)}else if("transforms"===n){let r=t[n];r&&e[n].push(...r)}else if("enter"===n||"exit"===n){let r=t[n];r&&Object.assign(e[n],r)}}function Kt(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+P({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+P({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+P({start:t.start,end:t.end})+") is still open")}var Jt=function(e){Object.assign(this,{Parser:t=>{let n=this.data("settings");return Yt(t,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})};function Qt(e){let t=[],n=-1,r=0,a=0;for(;++n<e.length;){let o=e.charCodeAt(n),i="";if(37===o&&be(e.charCodeAt(n+1))&&be(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Zt(e,t){let n,r=String(t.identifier).toUpperCase(),a=Qt(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);-1===o?(e.footnoteOrder.push(r),e.footnoteCounts[r]=1,n=e.footnoteOrder.length):(e.footnoteCounts[r]++,n=o+1);let i=e.footnoteCounts[r],l={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+a,id:e.clobberPrefix+"fnref-"+a+(i>1?"-"+i:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,l);let s={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,s),e.applyData(t,s)}function en(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return{type:"text",value:"!["+t.alt+r};let a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});let i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function tn(e){let t=e.spread;return null==t?e.children.length>1:t}var nn=an("start"),rn=an("end");function an(e){return function(t){let n=t&&t.position&&t.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}function on(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),a=0,o=[];for(;r;)o.push(ln(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(ln(t.slice(a),a>0,!1)),o.join("")}function ln(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}var sn={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,a={};r&&(a.className=["language-"+r]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:Zt,footnote:function(e,t){let n=e.footnoteById,r=1;for(;r in n;)r++;let a=String(r);return n[a]={type:"footnoteDefinition",identifier:a,children:[{type:"paragraph",children:t.children}],position:t.position},Zt(e,{type:"footnoteReference",identifier:a,position:t.position})},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.dangerous){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}return null},imageReference:function(e,t){let n=e.definition(t.identifier);if(!n)return en(e,t);let r={src:Qt(n.url||""),alt:t.alt};null!=n.title&&(r.title=n.title);let a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){let n={src:Qt(t.url)};null!=t.alt&&(n.alt=t.alt),null!=t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=e.definition(t.identifier);if(!n)return en(e,t);let r={href:Qt(n.url||"")};null!=n.title&&(r.title=n.title);let a={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){let n={href:Qt(t.url)};null!=t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=tn(n[r])}return t}(n):tn(t),o={},i=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){let e=r[l];(a||0!==l||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}let s=r[r.length-1];s&&(a||"element"!==s.type||"p"!==s.tagName)&&i.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},r=e.all(t),a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){let e=r[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),a=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=nn(t.children[1]),i=rn(t.children[t.children.length-1]);o.line&&i.line&&(r.position={start:o,end:i}),a.push(r)}let o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length,l=-1,s=[];for(;++l<i;){let n=t.children[l],r={},i=o?o[l]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(t,c)),s.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:on(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:cn,yaml:cn,definition:cn,footnoteDefinition:cn};function cn(){return null}var un=function(e){if(null==e)return dn;if("string"==typeof e)return function(e){return fn(function(t){return t&&t.type===e})}(e);if("object"==typeof e)return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=un(e[n]);return fn(function(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1})}(e):function(e){return fn(function(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0})}(e);if("function"==typeof e)return fn(e);throw new Error("Expected function, string, or object as test")};function fn(e){return function(t,...n){return!!(t&&"object"==typeof t&&"type"in t&&e.call(this,t,...n))}}function dn(){return!0}var pn=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);let a=un(t),o=r?-1:1;!function e(i,l,s){let c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){let e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,f,d=[];if((!t||a(i,l,s[s.length-1]||null))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:[e]}(n(i,s)),!1===d[0]))return d;if(i.children&&"skip"!==d[0])for(u=(r?i.children.length:-1)+o,f=s.concat(i);u>-1&&u<i.children.length;){if(c=e(i.children[u],u,f)(),!1===c[0])return c;u="number"==typeof c[1]?c[1]:u+o}return d}}(e,void 0,[])()}(e,t,function(e,t){let r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)},r)},mn={}.hasOwnProperty;function hn(e){return String(e||"").toUpperCase()}var gn={}.hasOwnProperty;function yn(e,t){e.position&&(t.position=function(e){return{start:nn(e),end:rn(e)}}(e))}function vn(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:[]}),"element"===n.type&&a&&(n.properties=d(d({},n.properties),a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function bn(e,t,n){let r=t&&t.type;if(!r)throw new Error("Expected node, got `"+t+"`");return gn.call(e.handlers,r)?e.handlers[r](e,t,n):e.passThrough&&e.passThrough.includes(r)?"children"in t?p(d({},t),{children:En(e,t)}):t:e.unknownHandler?e.unknownHandler(e,t,n):function(e,t){let n=t.data||{},r=!("value"in t)||gn.call(n,"hProperties")||gn.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:En(e,t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}(e,t)}function En(e,t){let n=[];if("children"in t){let r=t.children,a=-1;for(;++a<r.length;){let o=bn(e,r[a],t);if(o){if(a&&"break"===r[a-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=o.value.replace(/^\s+/,"")),!Array.isArray(o)&&"element"===o.type)){let e=o.children[0];e&&"text"===e.type&&(e.value=e.value.replace(/^\s+/,""))}Array.isArray(o)?n.push(...o):n.push(o)}}}return n}function Tn(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Sn(e,t){let n=function(e,t){let n=t||{},r={};return o.dangerous=n.allowDangerousHtml||!1,o.clobberPrefix=null==n.clobberPrefix?"user-content-":n.clobberPrefix,o.footnoteLabel=n.footnoteLabel||"Footnotes",o.footnoteLabelTagName=n.footnoteLabelTagName||"h2",o.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},o.footnoteBackLabel=n.footnoteBackLabel||"Back to content",o.unknownHandler=n.unknownHandler,o.passThrough=n.passThrough,o.handlers=d(d({},sn),n.handlers),o.definition=function(e){let t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return pn(e,"definition",e=>{let n=hn(e.identifier);n&&!mn.call(t,n)&&(t[n]=e)}),function(e){let n=hn(e);return n&&mn.call(t,n)?t[n]:null}}(e),o.footnoteById=r,o.footnoteOrder=[],o.footnoteCounts={},o.patch=yn,o.applyData=vn,o.one=function(e,t){return bn(o,e,t)},o.all=function(e){return En(o,e)},o.wrap=Tn,o.augment=a,pn(e,"footnoteDefinition",e=>{let t=String(e.identifier).toUpperCase();gn.call(r,t)||(r[t]=e)}),o;function a(e,t){if(e&&"data"in e&&e.data){let n=e.data;n.hName&&("element"!==t.type&&(t={type:"element",tagName:"",properties:{},children:[]}),t.tagName=n.hName),"element"===t.type&&n.hProperties&&(t.properties=d(d({},t.properties),n.hProperties)),"children"in t&&t.children&&n.hChildren&&(t.children=n.hChildren)}if(e){let n="type"in e?e:{position:e};(function(e){return!(e&&e.position&&e.position.start&&e.position.start.line&&e.position.start.column&&e.position.end&&e.position.end.line&&e.position.end.column)})(n)||(t.position={start:nn(n),end:rn(n)})}return t}function o(e,t,n,r){return Array.isArray(n)&&(r=n,n={}),a(e,{type:"element",tagName:t,properties:n||{},children:r||[]})}}(e,t),r=n.one(e,null),a=function(e){let t=[],n=-1;for(;++n<e.footnoteOrder.length;){let r=e.footnoteById[e.footnoteOrder[n]];if(!r)continue;let a=e.all(r),o=String(r.identifier).toUpperCase(),i=Qt(o.toLowerCase()),l=0,s=[];for(;++l<=e.footnoteCounts[o];){let t={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};l>1&&t.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(l)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(t)}let c=a[a.length-1];if(c&&"element"===c.type&&"p"===c.tagName){let e=c.children[c.children.length-1];e&&"text"===e.type?e.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else a.push(...s);let u={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+i},children:e.wrap(a,!0)};e.patch(r,u),t.push(u)}if(0!==t.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:p(d({},JSON.parse(JSON.stringify(e.footnoteLabelProperties))),{id:"footnote-label"}),children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:"\n"}]}}(n);return a&&r.children.push({type:"text",value:"\n"},a),Array.isArray(r)?{type:"root",children:r}:r}var wn=function(e,t){return e&&"run"in e?function(e,t){return(n,r,a)=>{e.run(Sn(n,t),r,e=>{a(e)})}}(e,t):function(e){return t=>Sn(t,e)}(e||t)},Nn=y(N(),1),Rn=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};function On(e,t){let n={},r={},a=-1;for(;++a<e.length;)Object.assign(n,e[a].property),Object.assign(r,e[a].normal);return new Rn(n,r,t)}function Cn(e){return e.toLowerCase()}Rn.prototype.property={},Rn.prototype.normal={},Rn.prototype.space=null;var xn=class{constructor(e,t){this.property=e,this.attribute=t}};xn.prototype.space=null,xn.prototype.boolean=!1,xn.prototype.booleanish=!1,xn.prototype.overloadedBoolean=!1,xn.prototype.number=!1,xn.prototype.commaSeparated=!1,xn.prototype.spaceSeparated=!1,xn.prototype.commaOrSpaceSeparated=!1,xn.prototype.mustUseProperty=!1,xn.prototype.defined=!1;var kn={};h(kn,{boolean:()=>In,booleanish:()=>Ln,commaOrSpaceSeparated:()=>Un,commaSeparated:()=>Dn,number:()=>Pn,overloadedBoolean:()=>_n,spaceSeparated:()=>Mn});var An=0,In=jn(),Ln=jn(),_n=jn(),Pn=jn(),Mn=jn(),Dn=jn(),Un=jn();function jn(){return u(2,++An)}var Fn=Object.keys(kn),zn=class extends xn{constructor(e,t,n,r){let a=-1;if(super(e,t),Bn(this,"space",r),"number"==typeof n)for(;++a<Fn.length;){let e=Fn[a];Bn(this,Fn[a],(n&kn[e])===kn[e])}}};function Bn(e,t,n){n&&(e[t]=n)}zn.prototype.defined=!0;var Hn={}.hasOwnProperty;function Vn(e){let t,n={},r={};for(t in e.properties)if(Hn.call(e.properties,t)){let a=e.properties[t],o=new zn(t,e.transform(e.attributes||{},t),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(t)&&(o.mustUseProperty=!0),n[t]=o,r[Cn(t)]=t,r[Cn(o.attribute)]=t}return new Rn(n,r,e.space)}var Wn=Vn({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Gn=Vn({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Yn(e,t){return t in e?e[t]:t}function $n(e,t){return Yn(e,t.toLowerCase())}var Xn=Vn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:$n,properties:{xmlns:null,xmlnsXLink:null}}),qn=Vn({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Ln,ariaAutoComplete:null,ariaBusy:Ln,ariaChecked:Ln,ariaColCount:Pn,ariaColIndex:Pn,ariaColSpan:Pn,ariaControls:Mn,ariaCurrent:null,ariaDescribedBy:Mn,ariaDetails:null,ariaDisabled:Ln,ariaDropEffect:Mn,ariaErrorMessage:null,ariaExpanded:Ln,ariaFlowTo:Mn,ariaGrabbed:Ln,ariaHasPopup:null,ariaHidden:Ln,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Mn,ariaLevel:Pn,ariaLive:null,ariaModal:Ln,ariaMultiLine:Ln,ariaMultiSelectable:Ln,ariaOrientation:null,ariaOwns:Mn,ariaPlaceholder:null,ariaPosInSet:Pn,ariaPressed:Ln,ariaReadOnly:Ln,ariaRelevant:null,ariaRequired:Ln,ariaRoleDescription:Mn,ariaRowCount:Pn,ariaRowIndex:Pn,ariaRowSpan:Pn,ariaSelected:Ln,ariaSetSize:Pn,ariaSort:null,ariaValueMax:Pn,ariaValueMin:Pn,ariaValueNow:Pn,ariaValueText:null,role:null}}),Kn=Vn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:$n,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Dn,acceptCharset:Mn,accessKey:Mn,action:null,allow:null,allowFullScreen:In,allowPaymentRequest:In,allowUserMedia:In,alt:null,as:null,async:In,autoCapitalize:null,autoComplete:Mn,autoFocus:In,autoPlay:In,capture:In,charSet:null,checked:In,cite:null,className:Mn,cols:Pn,colSpan:null,content:null,contentEditable:Ln,controls:In,controlsList:Mn,coords:Pn|Dn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:In,defer:In,dir:null,dirName:null,disabled:In,download:_n,draggable:Ln,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:In,formTarget:null,headers:Mn,height:Pn,hidden:In,high:Pn,href:null,hrefLang:null,htmlFor:Mn,httpEquiv:Mn,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:In,itemId:null,itemProp:Mn,itemRef:Mn,itemScope:In,itemType:Mn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:In,low:Pn,manifest:null,max:null,maxLength:Pn,media:null,method:null,min:null,minLength:Pn,multiple:In,muted:In,name:null,nonce:null,noModule:In,noValidate:In,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:In,optimum:Pn,pattern:null,ping:Mn,placeholder:null,playsInline:In,poster:null,preload:null,readOnly:In,referrerPolicy:null,rel:Mn,required:In,reversed:In,rows:Pn,rowSpan:Pn,sandbox:Mn,scope:null,scoped:In,seamless:In,selected:In,shape:null,size:Pn,sizes:null,slot:null,span:Pn,spellCheck:Ln,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Pn,step:null,style:null,tabIndex:Pn,target:null,title:null,translate:null,type:null,typeMustMatch:In,useMap:null,value:Ln,width:Pn,wrap:null,align:null,aLink:null,archive:Mn,axis:null,background:null,bgColor:null,border:Pn,borderColor:null,bottomMargin:Pn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:In,declare:In,event:null,face:null,frame:null,frameBorder:null,hSpace:Pn,leftMargin:Pn,link:null,longDesc:null,lowSrc:null,marginHeight:Pn,marginWidth:Pn,noResize:In,noHref:In,noShade:In,noWrap:In,object:null,profile:null,prompt:null,rev:null,rightMargin:Pn,rules:null,scheme:null,scrolling:Ln,standby:null,summary:null,text:null,topMargin:Pn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Pn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:In,disableRemotePlayback:In,prefix:null,property:null,results:Pn,security:null,unselectable:null}}),Jn=Vn({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Yn,properties:{about:Un,accentHeight:Pn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Pn,amplitude:Pn,arabicForm:null,ascent:Pn,attributeName:null,attributeType:null,azimuth:Pn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Pn,by:null,calcMode:null,capHeight:Pn,className:Mn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Pn,diffuseConstant:Pn,direction:null,display:null,dur:null,divisor:Pn,dominantBaseline:null,download:In,dx:null,dy:null,edgeMode:null,editable:null,elevation:Pn,enableBackground:null,end:null,event:null,exponent:Pn,externalResourcesRequired:null,fill:null,fillOpacity:Pn,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Dn,g2:Dn,glyphName:Dn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Pn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Pn,horizOriginX:Pn,horizOriginY:Pn,id:null,ideographic:Pn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Pn,k:Pn,k1:Pn,k2:Pn,k3:Pn,k4:Pn,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Pn,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Pn,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Pn,overlineThickness:Pn,paintOrder:null,panose1:null,path:null,pathLength:Pn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Mn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Pn,pointsAtY:Pn,pointsAtZ:Pn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Pn,specularExponent:Pn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Pn,strikethroughThickness:Pn,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Pn,strokeOpacity:Pn,strokeWidth:null,style:null,surfaceScale:Pn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:Pn,tableValues:null,target:null,targetX:Pn,targetY:Pn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,u1:null,u2:null,underlinePosition:Pn,underlineThickness:Pn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Pn,values:null,vAlphabetic:Pn,vMathematical:Pn,vectorEffect:null,vHanging:Pn,vIdeographic:Pn,version:null,vertAdvY:Pn,vertOriginX:Pn,vertOriginY:Pn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Pn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Qn=/^data[-\w.:]+$/i,Zn=/-[a-z]/g,er=/[A-Z]/g;function tr(e){return"-"+e.toLowerCase()}function nr(e){return e.charAt(1).toUpperCase()}var rr={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ar=On([Gn,Wn,Xn,qn,Kn],"html"),or=On([Gn,Wn,Xn,qn,Jn],"svg");function ir(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{pn(t,"element",(t,n,r)=>{let a,o=r;if(e.allowedElements?a=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(a=e.disallowedElements.includes(t.tagName)),!a&&e.allowElement&&"number"==typeof n&&(a=!e.allowElement(t,n,o)),a&&"number"==typeof n)return e.unwrapDisallowed&&t.children?o.children.splice(n,1,...t.children):o.children.splice(n,1),n})}}var lr=y(b(),1),sr=y(O(),1);function cr(e){let t=e&&"object"==typeof e&&"text"===e.type?e.value||"":e;return"string"==typeof t&&""===t.replace(/[ \t\n\f\r]/g,"")}var ur=y(x(),1).default,fr={}.hasOwnProperty,dr=new Set(["table","thead","tbody","tfoot","tr"]);function pr(e,t){let n,r=[],a=-1;for(;++a<t.children.length;)n=t.children[a],"element"===n.type?r.push(mr(e,n,a,t)):"text"===n.type?("element"!==t.type||!dr.has(t.tagName)||!cr(n))&&r.push(n.value):"raw"===n.type&&!e.options.skipHtml&&r.push(n.value);return r}function mr(e,t,n,r){let a,o=e.options,i=void 0===o.transformLinkUri?I:o.transformLinkUri,l=e.schema,s=t.tagName,c={},u=l;if("html"===l.space&&"svg"===s&&(u=or,e.schema=u),t.properties)for(a in t.properties)fr.call(t.properties,a)&&gr(c,a,t.properties[a],e);("ol"===s||"ul"===s)&&e.listDepth++;let f=pr(e,t);("ol"===s||"ul"===s)&&e.listDepth--,e.schema=l;let d=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=o.components&&fr.call(o.components,s)?o.components[s]:s,m="string"==typeof p||p===lr.default.Fragment;if(!sr.default.isValidElementType(p))throw new TypeError(`Component for name \`${s}\` not defined or is not renderable`);if(c.key=n,"a"===s&&o.linkTarget&&(c.target="function"==typeof o.linkTarget?o.linkTarget(String(c.href||""),t.children,"string"==typeof c.title?c.title:null):o.linkTarget),"a"===s&&i&&(c.href=i(String(c.href||""),t.children,"string"==typeof c.title?c.title:null)),!m&&"code"===s&&"element"===r.type&&"pre"!==r.tagName&&(c.inline=!0),!m&&("h1"===s||"h2"===s||"h3"===s||"h4"===s||"h5"===s||"h6"===s)&&(c.level=Number.parseInt(s.charAt(1),10)),"img"===s&&o.transformImageUri&&(c.src=o.transformImageUri(String(c.src||""),String(c.alt||""),"string"==typeof c.title?c.title:null)),!m&&"li"===s&&"element"===r.type){let e=function(e){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if("element"===n.type&&"input"===n.tagName)return n}return null}(t);c.checked=e&&e.properties?!!e.properties.checked:null,c.index=hr(r,t),c.ordered="ol"===r.tagName}return!m&&("ol"===s||"ul"===s)&&(c.ordered="ol"===s,c.depth=e.listDepth),("td"===s||"th"===s)&&(c.align&&(c.style||(c.style={}),c.style.textAlign=c.align,delete c.align),m||(c.isHeader="th"===s)),!m&&"tr"===s&&"element"===r.type&&(c.isHeader="thead"===r.tagName),o.sourcePos&&(c["data-sourcepos"]=function(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}(d)),!m&&o.rawSourcePos&&(c.sourcePosition=t.position),!m&&o.includeElementIndex&&(c.index=hr(r,t),c.siblingCount=hr(r)),m||(c.node=t),f.length>0?lr.default.createElement(p,c,f):lr.default.createElement(p,c)}function hr(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)"element"===e.children[n].type&&r++;return r}function gr(e,t,n,r){let a=function(e,t){let n=Cn(t),r=t,a=xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Qn.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(Zn,nr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Zn.test(e)){let n=e.replace(er,tr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=zn}return new a(r,t)}(r.schema,t),o=n;null==o||o!=o||(Array.isArray(o)&&(o=a.commaSeparated?function(e,t){let n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(o):function(e){return e.join(" ").trim()}(o)),"style"===a.property&&"string"==typeof o&&(o=function(e){let t={};try{ur(e,function(e,n){let r="-ms-"===e.slice(0,4)?`ms-${e.slice(4)}`:e;t[r.replace(/-([a-z])/g,yr)]=n})}catch(e){}return t}(o)),a.space&&a.property?e[fr.call(rr,a.property)?rr[a.property]:a.property]=o:a.attribute&&(e[a.attribute]=o))}function yr(e,t){return t.toUpperCase()}var vr={}.hasOwnProperty,br={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function Er(e){for(let t in br)if(vr.call(br,t)&&vr.call(e,t)){let e=br[t];console.warn(`[react-markdown] Warning: please ${e.to?`use \`${e.to}\` instead of`:"remove"} \`${t}\` (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#${e.id}> for more info)`),delete br[t]}let t=Q().use(Jt).use(e.remarkPlugins||[]).use(wn,p(d({},e.remarkRehypeOptions),{allowDangerousHtml:!0})).use(e.rehypePlugins||[]).use(ir,e),n=new W;"string"==typeof e.children?n.value=e.children:null!=e.children&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);let r=t.runSync(t.parse(n),n);if("root"!==r.type)throw new TypeError("Expected a `root` node");let a=L.default.createElement(L.default.Fragment,{},pr({options:e,schema:ar,listDepth:0},r));return e.className&&(a=L.default.createElement("div",{className:e.className},a)),a}return Er.propTypes={children:Nn.default.string,className:Nn.default.string,allowElement:Nn.default.func,allowedElements:Nn.default.arrayOf(Nn.default.string),disallowedElements:Nn.default.arrayOf(Nn.default.string),unwrapDisallowed:Nn.default.bool,remarkPlugins:Nn.default.arrayOf(Nn.default.oneOfType([Nn.default.object,Nn.default.func,Nn.default.arrayOf(Nn.default.oneOfType([Nn.default.bool,Nn.default.string,Nn.default.object,Nn.default.func,Nn.default.arrayOf(Nn.default.any)]))])),rehypePlugins:Nn.default.arrayOf(Nn.default.oneOfType([Nn.default.object,Nn.default.func,Nn.default.arrayOf(Nn.default.oneOfType([Nn.default.bool,Nn.default.string,Nn.default.object,Nn.default.func,Nn.default.arrayOf(Nn.default.any)]))])),sourcePos:Nn.default.bool,rawSourcePos:Nn.default.bool,skipHtml:Nn.default.bool,includeElementIndex:Nn.default.bool,transformLinkUri:Nn.default.oneOfType([Nn.default.func,Nn.default.bool]),linkTarget:Nn.default.oneOfType([Nn.default.func,Nn.default.string]),transformImageUri:Nn.default.func,components:Nn.default.object},(e=>g(t({},"__esModule",{value:!0}),e))(k)})()}));const Fc=["node","inline","className","children"];function zc({solution:e}){return c.createElement("div",{className:"grid grid-cols-1 gap-2"},c.createElement(jc,{children:e.description,components:{code(e){let{inline:t,className:n,children:r}=e,a=Ce(e,Fc);const o=/language-(\w+)/.exec(n||"");return t?c.createElement("code",Ne({},a,{className:n,style:{background:"rgba(255,255,255,0.75)",padding:"0.15rem 0.25rem"}}),r):c.createElement(Il,Ne({},a,{language:o?o[1]:null,children:String(r).replace(/\n$/,""),customStyle:{margin:"0.5rem 0",background:"rgba(255,255,255,0.75)",padding:"0.25rem 0.5rem",overflowX:"scroll"}}))}}}),e.action_description&&c.createElement("p",null,e.action_description),c.createElement("ul",{className:"grid grid-cols-1 gap-1 text-sm"},Object.entries(e.links).map(([e,t],n)=>c.createElement("li",{key:n},c.createElement("a",{href:t,target:"_blank",className:"underline text-emerald-700 hover:text-emerald-800"},e)))))}function Bc({solution:e}){const[t,n]=c.useState(!1),[r,a]=c.useState(null);function o(e){e.preventDefault(),location.reload()}return c.createElement(c.Fragment,null,null===r&&c.createElement(c.Fragment,null,c.createElement(Uc,{onClick:async function(){if(!t)try{if(n(!0),!e.execute_endpoint)return;const t=await fetch(e.execute_endpoint,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({solution:e.class,parameters:e.run_parameters})});a(t.status>=200&&t.status<300)}catch(e){console.error(e),a(!1)}finally{n(!1)}},disabled:t,className:"mb-4 inline-flex items-center gap-2 bg-emerald-600 border-emerald-500/25 text-white"},t?c.createElement("span",null,"Running..."):c.createElement(c.Fragment,null,c.createElement(qa,{className:"opacity-50",icon:Ao}),e.run_button_text||"Run")),c.createElement(zc,{solution:e})),!0===r&&c.createElement("p",{className:""},"The solution was executed ",c.createElement("strong",null,"successfully"),".",c.createElement("br",null),c.createElement("a",{href:"#",className:"mt-2 inline-flex items-center gap-2 underline text-emerald-700 hover:text-emerald-800",onClick:o},c.createElement(qa,{icon:bo,className:"text-sm opacity-50"}),"Refresh now")),!1===r&&c.createElement(c.Fragment,null,c.createElement("p",{className:"bg-red-200 px-4 py-2"},"Something ",c.createElement("strong",null,"went wrong"),". Please try refreshing the page and try again.",c.createElement("br",null),c.createElement("a",{href:"#",className:"mt-2 inline-flex items-center gap-2 underline text-red-700 hover:text-red-800",onClick:o},c.createElement(qa,{icon:bo,className:"text-sm opacity-50"}),"Refresh now"))))}function Hc({solution:e,isOpen:t=!1,isCollapsible:n=!0,canExecute:r=!1}){const[a,o]=c.useState(t);return c.createElement("section",null,c.createElement("header",{className:"group mb-4"},n?c.createElement("button",{className:"flex items-center justify-start",onClick:()=>{o(!a)}},c.createElement("span",{className:"w-6 -ml-6"},c.createElement(qa,{icon:Ja,className:"group-hover:opacity-50 opacity-0 text-sm transform transition "+(a?"":"-rotate-90")})),c.createElement("h2",{className:"min-w-0 truncate font-semibold leading-snug"},e.title)):c.createElement("h2",{className:"truncate font-semibold leading-snug"},e.title)),c.createElement("div",{className:a?"":"hidden"},c.createElement(e.is_runnable&&r?Bc:zc,{solution:e}),e.ai_generated&&c.createElement(c.Fragment,null,c.createElement("hr",{className:"border-emerald-500/50 my-4"}),c.createElement("div",{className:"flex items-center gap-x-2 text-green-700"},c.createElement(qa,{fixedWidth:!0,icon:vo}),c.createElement("span",{id:"ai-message",className:"text-xs"},"This solution was ",c.createElement("a",{className:"underline",target:"_blank",href:"https://flareapp.io/docs/ignition/solutions/ai-powered-solutions"},"generated by AI")," and might not be 100% accurate.")))))}function Vc(){const{solutions:e}=c.useContext(be),[t,n]=c.useState(!1),[r,a]=c.useState(!0);return c.useEffect(()=>{try{(async()=>{var t;if(null==(t=e[0])||!t.execute_endpoint)return;const r=await(await fetch(e[0].execute_endpoint.replace("execute-solution","health-check"))).json();n(r.can_execute_commands)})()}catch(e){console.error(e),n(!1)}},[]),c.createElement(c.Fragment,null,r?c.createElement("aside",{id:"solution",className:"relative flex flex-col lg:w-2/5 flex-none"},c.createElement("div",{className:"flex-grow px-6 sm:px-10 py-8 bg-emerald-300 text-gray-800 rounded-bl-lg rounded-br-lg @4xl:rounded-bl-none @4xl:rounded-r-lg"},c.createElement("button",{onClick:()=>a(!1),className:"absolute top-3 right-4 leading-none text-emerald-500 hover:text-emerald-700 text-sm"},c.createElement(qa,{icon:Io})),e.map((n,r)=>c.createElement("div",{key:r},c.createElement(Hc,{solution:n,canExecute:t,isOpen:0===r,isCollapsible:e.length>1}),r!==e.length-1&&c.createElement("hr",{className:"my-4 border-t border-gray-800/20"}))))):c.createElement("button",{onClick:()=>a(!0),className:"\n absolute -top-3 -right-3 z-20\n w-6 h-6 rounded-full flex items-center justify-center\n text-xs bg-emerald-500 text-white hover:shadow-lg\n shadow-md\n active:shadow-sm active:translate-y-px"},c.createElement(qa,{icon:po})))}var Wc={prefix:"fab",iconName:"laravel",icon:[512,512,[],"f3bd","M504.4 115.8a5.72 5.72 0 0 0 -.28-.68 8.52 8.52 0 0 0 -.53-1.25 6 6 0 0 0 -.54-.71 9.36 9.36 0 0 0 -.72-.94c-.23-.22-.52-.4-.77-.6a8.84 8.84 0 0 0 -.9-.68L404.4 55.55a8 8 0 0 0 -8 0L300.1 111h0a8.07 8.07 0 0 0 -.88 .69 7.68 7.68 0 0 0 -.78 .6 8.23 8.23 0 0 0 -.72 .93c-.17 .24-.39 .45-.54 .71a9.7 9.7 0 0 0 -.52 1.25c-.08 .23-.21 .44-.28 .68a8.08 8.08 0 0 0 -.28 2.08V223.2l-80.22 46.19V63.44a7.8 7.8 0 0 0 -.28-2.09c-.06-.24-.2-.45-.28-.68a8.35 8.35 0 0 0 -.52-1.24c-.14-.26-.37-.47-.54-.72a9.36 9.36 0 0 0 -.72-.94 9.46 9.46 0 0 0 -.78-.6 9.8 9.8 0 0 0 -.88-.68h0L115.6 1.07a8 8 0 0 0 -8 0L11.34 56.49h0a6.52 6.52 0 0 0 -.88 .69 7.81 7.81 0 0 0 -.79 .6 8.15 8.15 0 0 0 -.71 .93c-.18 .25-.4 .46-.55 .72a7.88 7.88 0 0 0 -.51 1.24 6.46 6.46 0 0 0 -.29 .67 8.18 8.18 0 0 0 -.28 2.1v329.7a8 8 0 0 0 4 6.95l192.5 110.8a8.83 8.83 0 0 0 1.33 .54c.21 .08 .41 .2 .63 .26a7.92 7.92 0 0 0 4.1 0c.2-.05 .37-.16 .55-.22a8.6 8.6 0 0 0 1.4-.58L404.4 400.1a8 8 0 0 0 4-6.95V287.9l92.24-53.11a8 8 0 0 0 4-7V117.9A8.63 8.63 0 0 0 504.4 115.8zM111.6 17.28h0l80.19 46.15-80.2 46.18L31.41 63.44zm88.25 60V278.6l-46.53 26.79-33.69 19.4V123.5l46.53-26.79zm0 412.8L23.37 388.5V77.32L57.06 96.7l46.52 26.8V338.7a6.94 6.94 0 0 0 .12 .9 8 8 0 0 0 .16 1.18h0a5.92 5.92 0 0 0 .38 .9 6.38 6.38 0 0 0 .42 1v0a8.54 8.54 0 0 0 .6 .78 7.62 7.62 0 0 0 .66 .84l0 0c.23 .22 .52 .38 .77 .58a8.93 8.93 0 0 0 .86 .66l0 0 0 0 92.19 52.18zm8-106.2-80.06-45.32 84.09-48.41 92.26-53.11 80.13 46.13-58.8 33.56zm184.5 4.57L215.9 490.1V397.8L346.6 323.2l45.77-26.15zm0-119.1L358.7 250l-46.53-26.79V131.8l33.69 19.4L392.4 178zm8-105.3-80.2-46.17 80.2-46.16 80.18 46.15zm8 105.3V178L455 151.2l33.68-19.4v91.39h0z"]};function Gc(){const e=c.useContext(be);return c.createElement("span",{className:"py-1 px-4 items-center flex gap-3 rounded-sm ~bg-gray-500/5"},c.createElement(kt,{path:e.exception_class}))}function Yc({githubLink:e}){return c.createElement("section",{className:"flex flex-col flex-grow px-6 sm:px-10 py-8 bg-red-600 text-red-100 shadow-lg gap-3"},c.createElement("h2",{className:"text-xl font-semibold leading-snug"},"Something went wrong in Ignition!"),c.createElement("p",{className:"text-base"},"An error occurred in Ignition's UI. Please open an issue on"," ",c.createElement("a",{href:e,target:"_blank",className:"underline"},"the Ignition GitHub repo")," ","and make sure to include any errors or warnings in the developer console."))}class $c extends c.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state;if(e){var t,n;let r="https://github.com/spatie/ignition/issues";if(e instanceof Error){const t=`\n**Please include some context and the contents of the console in your browser's developer tools.**\n\n## JavaScript Error\n\`\`\`\n${e.stack}\n\`\`\`\n\n## Reproduction Steps\nPlease tell us what you were doing when this error occurred, so we can more easily debug it and find a solution.\n\n1. …\n\n## User Agent\n\`\`\`\n${navigator.userAgent}\n\`\`\`\n`;r=`https://github.com/spatie/ignition/issues/new?title=${e.name}: ${e.message}&labels=bug&body=${encodeURIComponent(t)}`}return(null==(t=(n=this.props).fallbackComponent)?void 0:t.call(n,r))||c.createElement(Yc,{githubLink:r})}return this.props.children}}function Xc(){var e;const t=c.useContext(be),n=t.solutions.length>0,r=!(null==(e=t.context_items.env)||!e.laravel_version);return c.createElement($c,null,c.createElement("section",{className:"@container | bg-white dark:shadow-none dark:bg-gray-800/50 dark:bg-gradient-to-bl from-gray-700/50 via-transparent dark:ring-1 dark:ring-inset dark:ring-white/5 rounded-lg shadow-2xl shadow-gray-500/20"},c.createElement("div",{className:"@4xl:flex items-stretch"},c.createElement("main",{id:"exception",className:"z-10 flex-grow min-w-0"},c.createElement("div",{className:"overflow-hidden"},c.createElement("div",{className:"px-6 @lg:px-10 py-8 overflow-x-auto"},c.createElement("header",{className:"flex items-center justify-between gap-2"},c.createElement(Gc,null),c.createElement("div",{className:"grid grid-flow-col justify-end gap-4 text-sm ~text-gray-500"},c.createElement("span",null,c.createElement("span",{className:"tracking-wider"},"PHP")," ",t.language_version),t.framework_version&&c.createElement("span",{className:"inline-flex items-center gap-1"},c.createElement(qa,{icon:r?Wc:oo}),t.framework_version))),c.createElement(Mc,{exceptionClass:t.exception_class,message:t.exception_message})))),n&&c.createElement(Vc,null))))}const qc=(e,t)=>e.join(t).toLowerCase(),Kc=/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF]+/g,Jc=/[A-Za-z\d]+/g,Qc=new RegExp("[A-Za-z\\d]*?(?:[a-z](?=[A-Z])|[A-Z](?=[A-Z][a-z]))|[A-Za-z\\d]+","g");function Zc(e,{camelCase:t=!0,dictionary:n,separator:r="-",transformer:a=qc}={}){const o=(n?function(e,t){for(let n=0,r=e.length;n<r;n++){const a=e[n],o=t[a]&&String(t[a]);if(void 0!==o){e=e.slice(0,n)+o+e.slice(n+1);const t=o.length-1;n+=t,r+=t}}return e}(String(e),n):String(e)).normalize("NFKD").replace(Kc,"").match(t?Qc:Jc);return o?a?a(o,String(r)):o.join(String(r)):""}function eu({className:e="",githubLink:t}){return c.createElement("div",{className:`${e} flex flex-col gap-2 bg-red-50 dark:bg-red-500/10 px-6 py-4`},c.createElement("h2",{className:"font-semibold leading-snug"},"Something went wrong in Ignition!"),c.createElement("p",{className:"text-base"},"An error occurred in Ignition's UI. Please open an issue on"," ",c.createElement("a",{href:t,target:"_blank",className:"underline"},"the Ignition GitHub repo")," ","and make sure to include any errors or warnings in the developer console."))}function tu({title:e,children:t,anchor:n}){return c.createElement("section",{className:"py-10 ~bg-white px-6 @lg:px-10 min-w-0"},c.createElement("a",{id:`context-${n}`,className:"scroll-target"}),c.createElement("h2",{className:"font-bold text-xs ~text-gray-500 uppercase tracking-wider"},e),c.createElement("div",{className:"mt-3 grid grid-cols-1 gap-10"},c.createElement($c,{fallbackComponent:e=>c.createElement(eu,{githubLink:e})},t)))}var nu=/* @__PURE__ */new Map,ru=/* @__PURE__ */new WeakMap,au=0,ou=c.createContext({inView:[],setInView:Ee});function iu({icon:e,title:t,children:n,anchor:r}){const a=function(e){const{setInView:t}=c.useContext(ou),{ref:n,inView:r}=function({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:a,triggerOnce:o,skip:i,initialInView:l,fallbackInView:s,onChange:u}={}){var f;const[d,p]=c.useState(null),m=c.useRef(),[h,g]=c.useState({inView:!!l,entry:void 0});m.current=u,c.useEffect(()=>{if(i||!d)return;let l;return l=function(e,t,n={},r){if(void 0===window.IntersectionObserver&&void 0!==r){const a=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:a,intersectionRect:a,rootBounds:a}),()=>{}}const{id:a,observer:o,elements:i}=function(e){let t=function(e){return Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{return`${t}_${"root"===t?(n=e.root,n?(ru.has(n)||ru.set(n,(au+=1).toString()),ru.get(n)):"0"):e[t]}`;var n}).toString()}(e),n=nu.get(t);if(!n){const r=/* @__PURE__ */new Map;let a;const o=new IntersectionObserver(t=>{t.forEach(t=>{var n;const o=t.isIntersecting&&a.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach(e=>{e(o,t)})})},e);a=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},nu.set(t,n)}return n}(n);let l=i.get(e)||[];return i.has(e)||i.set(e,l),l.push(t),o.observe(e),function(){l.splice(l.indexOf(t),1),0===l.length&&(i.delete(e),o.unobserve(e)),0===i.size&&(o.disconnect(),nu.delete(a))}}(d,(e,t)=>{g({inView:e,entry:t}),m.current&&m.current(e,t),t.isIntersecting&&o&&l&&(l(),l=void 0)},{root:a,rootMargin:r,threshold:e,trackVisibility:n,delay:t},s),()=>{l&&l()}},[Array.isArray(e)?e.toString():e,d,a,r,o,i,n,s,t]);const y=null==(f=h.entry)?void 0:f.target,v=c.useRef();d||!y||o||i||v.current===y||(v.current=y,g({inView:!!l,entry:void 0}));const b=[p,h.inView,h.entry];return b.ref=b[0],b.inView=b[1],b.entry=b[2],b}({rootMargin:"-45% 0px -45%"});return c.useEffect(()=>{t(r?t=>[...t,e]:t=>t.filter(t=>t!==e))},[r]),n}(t);return c.createElement("div",{ref:a},c.createElement("a",{id:`context-${r}`,className:"scroll-target"}),c.createElement("h1",{className:"mb-2 flex items-center gap-2 font-semibold text-lg ~text-indigo-600"},t,c.createElement("span",{className:"opacity-50 ~text-indigo-600 text-sm"},e)),c.createElement($c,{fallbackComponent:e=>c.createElement(eu,{githubLink:e})},n))}function lu({children:e,className:t="",color:n="gray"}){return c.createElement("div",{className:`${t} ${{red:"~text-red-600 border-red-500/50",orange:"~text-orange-600 border-orange-500/50",green:"~text-emerald-600 border-emerald-500/50",blue:"~text-indigo-600 border-indigo-500/50",purple:"~text-violet-600 border-violet-600/50",gray:"~text-gray-500 border-gray-500/50"}[n]} px-1.5 py-0.5 rounded-sm bg-opacity-20 border text-xs font-medium uppercase tracking-wider`},e)}function su({request:e,requestData:t,headers:n}){const r=c.useMemo(()=>function(e,t,n){if(!e.url||!e.method)return null;const r=[`curl "${e.url}"`];r.push(` -X ${e.method}`),Object.entries(n||{}).map(function([e,t]){r.push(` -H '${e}: ${t}'`)});const a=function(e,t){var n,r;return e.body?null!=(n=t["content-type"])&&null!=(r=n[0])&&r.includes("application/json")?` -d ${JSON.stringify(e.body)}`:` ${Object.entries(e.body||{}).map(function([e,t]){return`-F '${e}=${t}'`}).join(" ")}`:null}(t,n);return a&&r.push(a),r.join(" \\\n").trimEnd().replace(/\s\\$/g,";")}(e,t,n),[e,t,n]);return c.createElement("div",null,c.createElement("div",{className:"text-lg font-semibold flex items-center gap-2"},c.createElement("span",{className:"~text-indigo-600"},e.url),e.method&&c.createElement(lu,{color:"DELETE"==e.method.toUpperCase()?"red":"blue"},e.method.toUpperCase())),r&&c.createElement("div",{className:"mt-2"},c.createElement(xc,{value:r,language:"curl"})))}function cu({items:e}){return c.createElement(Ac,null,Object.entries(e||{}).map(([e,t])=>c.createElement(Ac.Row,{key:e,label:e,value:t})))}var uu=function(e){return null==e},fu=Object.prototype.hasOwnProperty,du=function(e){if(null==e)return!0;if(bs(e)&&(Vl(e)||"string"==typeof e||"function"==typeof e.splice||ns(e)||us(e)||es(e)))return!e.length;var t=Ls(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(ms(e))return!vs(e).length;for(var n in e)if(fu.call(e,n))return!1;return!0},pu=function(){try{var e=Ze(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),mu=Object.prototype.hasOwnProperty,hu=function(e,t,n){var r=e[t];mu.call(e,t)&&ot(r,n)&&(void 0!==n||t in e)||function(e,t,n){"__proto__"==t&&pu?pu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}(e,t,n)},gu=function(e,t,n,r){if(!Ge(e))return e;for(var a=-1,o=(t=Qs(t,e)).length,i=o-1,l=e;null!=l&&++a<o;){var s=Zs(t[a]),c=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(a!=i){var u=l[s];void 0===(c=r?r(u,s,l):void 0)&&(c=Ge(u)?u:as(t[a+1])?[]:{})}hu(l,s,c),l=l[s]}return e},yu=hs(Object.getPrototypeOf,Object),vu=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Hl(t,Xl(e)),e=yu(e);return t}:Gl,bu=Object.prototype.hasOwnProperty,Eu=function(e){return bs(e)?ds(e,!0):function(e){if(!Ge(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ms(e),n=[];for(var r in e)("constructor"!=r||!t&&bu.call(e,r))&&n.push(r);return n}(e)},Tu=function(e,t){return function(e,t){if(null==e)return{};var n=$s(function(e){return Wl(e,Eu,vu)}(e),function(e){return[e]});return t=rc(t),function(e,t,n){for(var r=-1,a=t.length,o={};++r<a;){var i=t[r],l=ec(e,i);n(l,i)&&gu(o,Qs(i,e),l)}return o}(e,n,function(e,n){return t(e,n[0])})}(e,function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}(rc(t)))};function Su({headers:e}){let t=Tu(e,uu);return t=Tu(t,du),c.createElement(cu,{items:t})}function wu({requestData:e}){return c.createElement(cu,{items:e.queryString||{}})}function Nu(){var e,t;const n=null==(e=c.useContext(be).context_items)||null==(t=e.request_data)?void 0:t.body;return n?c.createElement(xc,{value:Do(n)}):null}function Ru(){var e,t;const n=null==(e=c.useContext(be).context_items)||null==(t=e.request_data)?void 0:t.files;return n?c.createElement("div",{className:"col-span-2"},c.createElement(xc,{value:Do(n)})):null}function Ou({session:e}){return c.createElement(cu,{items:e})}function Cu({cookies:e}){return c.createElement(cu,{items:e})}function xu(){const e=c.useContext(be).context_items.livewire;return e?c.createElement(cu,{items:e.data}):null}function ku(){const e=c.useContext(be).context_items.livewire;return e?c.createElement(cu,{items:{Component:e.component_class,Alias:e.component_alias,ID:e.component_id}}):null}function Au(){const e=c.useContext(be).context_items.livewire;return e?c.createElement(Ac,null,e.updates.map(({payload:e,type:t},n)=>c.createElement(Ac.Row,{key:n,label:t,value:e}))):null}const Iu=["children","className"];function Lu(e){let{children:t,className:n=""}=e,r=Ce(e,Iu);return c.createElement(c.Fragment,null,t&&c.createElement("ul",Ne({className:`gap-y-2 flex flex-col ${n}`},r),t))}function _u({route:e}){var t;return c.createElement(Ac,null,c.createElement(Ac.Row,{value:e.controllerAction,label:"Controller"}),e.route&&c.createElement(Ac.Row,{value:e.route,label:"Route name"}),!(null==(t=e.routeParameters)||!t.length)&&c.createElement(Ac.Row,{value:c.createElement(Ac,null,Object.entries(e.routeParameters).map(([e,t])=>c.createElement(Ac.Row,{stacked:!0,key:e,label:e,value:t}))),label:"Route parameters"}),e.middleware&&c.createElement(Ac.Row,{value:c.createElement(Lu,null,(e.middleware||[]).map((e,t)=>c.createElement(Lu.Item,{key:t,value:e}))),label:"Middleware"}))}Lu.Item=function({value:e=""}){let t=e;return c.isValidElement(e)?t=e:"object"==typeof e?t=c.createElement(xc,{value:Do(e),language:"json"}):"string"==typeof e&&(t=c.createElement(xc,{value:e})),c.createElement("li",null,t)};const Pu=["value"];function Mu(e){let{value:t}=e,n=Ce(e,Pu);return c.useEffect(()=>{const e=t.match(/sf-dump-\d+/);e&&window.Sfdump(e[0])},[t]),c.createElement("div",Ne({className:"~bg-gray-500/5 px-4 py-2",dangerouslySetInnerHTML:{__html:t}},n))}function Du(){const e=c.useContext(be).context_items.view;return e?c.createElement(Ac,null,c.createElement(Ac.Row,{value:c.createElement(Bo,{path:e.view}),label:"View"}),e.data&&c.createElement(Ac.Row,{value:c.createElement(Ac,null,Object.entries(e.data).map(([e,t])=>c.createElement(Ac.Row,{stacked:!0,key:e,label:e,value:c.createElement(Mu,{value:t})}))),label:"Data"})):null}var Uu=Le(function(e){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var a=e[r]<<16|e[r+1]<<8|e[r+2],o=0;o<4;o++)n.push(8*r+6*o<=8*e.length?t.charAt(a>>>6*(3-o)&63):"=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,a=0;r<e.length;a=++r%4)0!=a&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*a+8)-1)<<2*a|t.indexOf(e.charAt(r))>>>6-2*a);return n}};e.exports=n}()}),ju={utf8:{stringToBytes:function(e){return ju.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(ju.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},Fu=ju,zu=function(e){return null!=e&&(Bu(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Bu(e.slice(0,0))}(e)||!!e._isBuffer)};function Bu(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Hu=Le(function(e){!function(){var t=Uu,n=Fu.utf8,r=zu,a=Fu.bin,o=function e(o,i){o.constructor==String?o=i&&"binary"===i.encoding?a.stringToBytes(o):n.stringToBytes(o):r(o)?o=Array.prototype.slice.call(o,0):Array.isArray(o)||o.constructor===Uint8Array||(o=o.toString());for(var l=t.bytesToWords(o),s=8*o.length,c=1732584193,u=-271733879,f=-1732584194,d=271733878,p=0;p<l.length;p++)l[p]=16711935&(l[p]<<8|l[p]>>>24)|4278255360&(l[p]<<24|l[p]>>>8);l[s>>>5]|=128<<s%32,l[14+(s+64>>>9<<4)]=s;var m=e._ff,h=e._gg,g=e._hh,y=e._ii;for(p=0;p<l.length;p+=16){var v=c,b=u,E=f,T=d;c=m(c,u,f,d,l[p+0],7,-680876936),d=m(d,c,u,f,l[p+1],12,-389564586),f=m(f,d,c,u,l[p+2],17,606105819),u=m(u,f,d,c,l[p+3],22,-1044525330),c=m(c,u,f,d,l[p+4],7,-176418897),d=m(d,c,u,f,l[p+5],12,1200080426),f=m(f,d,c,u,l[p+6],17,-1473231341),u=m(u,f,d,c,l[p+7],22,-45705983),c=m(c,u,f,d,l[p+8],7,1770035416),d=m(d,c,u,f,l[p+9],12,-1958414417),f=m(f,d,c,u,l[p+10],17,-42063),u=m(u,f,d,c,l[p+11],22,-1990404162),c=m(c,u,f,d,l[p+12],7,1804603682),d=m(d,c,u,f,l[p+13],12,-40341101),f=m(f,d,c,u,l[p+14],17,-1502002290),c=h(c,u=m(u,f,d,c,l[p+15],22,1236535329),f,d,l[p+1],5,-165796510),d=h(d,c,u,f,l[p+6],9,-1069501632),f=h(f,d,c,u,l[p+11],14,643717713),u=h(u,f,d,c,l[p+0],20,-373897302),c=h(c,u,f,d,l[p+5],5,-701558691),d=h(d,c,u,f,l[p+10],9,38016083),f=h(f,d,c,u,l[p+15],14,-660478335),u=h(u,f,d,c,l[p+4],20,-405537848),c=h(c,u,f,d,l[p+9],5,568446438),d=h(d,c,u,f,l[p+14],9,-1019803690),f=h(f,d,c,u,l[p+3],14,-187363961),u=h(u,f,d,c,l[p+8],20,1163531501),c=h(c,u,f,d,l[p+13],5,-1444681467),d=h(d,c,u,f,l[p+2],9,-51403784),f=h(f,d,c,u,l[p+7],14,1735328473),c=g(c,u=h(u,f,d,c,l[p+12],20,-1926607734),f,d,l[p+5],4,-378558),d=g(d,c,u,f,l[p+8],11,-2022574463),f=g(f,d,c,u,l[p+11],16,1839030562),u=g(u,f,d,c,l[p+14],23,-35309556),c=g(c,u,f,d,l[p+1],4,-1530992060),d=g(d,c,u,f,l[p+4],11,1272893353),f=g(f,d,c,u,l[p+7],16,-155497632),u=g(u,f,d,c,l[p+10],23,-1094730640),c=g(c,u,f,d,l[p+13],4,681279174),d=g(d,c,u,f,l[p+0],11,-358537222),f=g(f,d,c,u,l[p+3],16,-722521979),u=g(u,f,d,c,l[p+6],23,76029189),c=g(c,u,f,d,l[p+9],4,-640364487),d=g(d,c,u,f,l[p+12],11,-421815835),f=g(f,d,c,u,l[p+15],16,530742520),c=y(c,u=g(u,f,d,c,l[p+2],23,-995338651),f,d,l[p+0],6,-198630844),d=y(d,c,u,f,l[p+7],10,1126891415),f=y(f,d,c,u,l[p+14],15,-1416354905),u=y(u,f,d,c,l[p+5],21,-57434055),c=y(c,u,f,d,l[p+12],6,1700485571),d=y(d,c,u,f,l[p+3],10,-1894986606),f=y(f,d,c,u,l[p+10],15,-1051523),u=y(u,f,d,c,l[p+1],21,-2054922799),c=y(c,u,f,d,l[p+8],6,1873313359),d=y(d,c,u,f,l[p+15],10,-30611744),f=y(f,d,c,u,l[p+6],15,-1560198380),u=y(u,f,d,c,l[p+13],21,1309151649),c=y(c,u,f,d,l[p+4],6,-145523070),d=y(d,c,u,f,l[p+11],10,-1120210379),f=y(f,d,c,u,l[p+2],15,718787259),u=y(u,f,d,c,l[p+9],21,-343485551),c=c+v>>>0,u=u+b>>>0,f=f+E>>>0,d=d+T>>>0}return t.endian([c,u,f,d])};o._ff=function(e,t,n,r,a,o,i){var l=e+(t&n|~t&r)+(a>>>0)+i;return(l<<o|l>>>32-o)+t},o._gg=function(e,t,n,r,a,o,i){var l=e+(t&r|n&~r)+(a>>>0)+i;return(l<<o|l>>>32-o)+t},o._hh=function(e,t,n,r,a,o,i){var l=e+(t^n^r)+(a>>>0)+i;return(l<<o|l>>>32-o)+t},o._ii=function(e,t,n,r,a,o,i){var l=e+(n^(t|~r))+(a>>>0)+i;return(l<<o|l>>>32-o)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(o(e,n));return n&&n.asBytes?r:n&&n.asString?a.bytesToString(r):t.bytesToHex(r)}}()});function Vu({user:e}){return c.createElement(c.Fragment,null,e.email&&c.createElement("div",{className:"mb-2 flex items-center gap-3"},c.createElement("div",null,c.createElement("img",{className:"inline-block h-9 w-9 rounded-full",alt:e.email,src:`https://gravatar.com/avatar/${Hu(e.email)}/?s=240`})),c.createElement("div",{className:"leading-tight"},e.name&&c.createElement("p",{className:"font-semibold"},e.name),c.createElement("p",{className:"text-sm"},e.email))),c.createElement(xc,{value:Do(e),language:"json"}))}function Wu({children:e,className:t=""}){return c.createElement("div",{className:`${t}`},c.createElement("div",{className:"flex items-center gap-2 bg-yellow-50 dark:bg-yellow-500/10 px-4 py-2"},c.createElement("div",{className:"flex-shrink-0","aria-hidden":"true"},c.createElement(qa,{className:"text-yellow-500 ",icon:Oo})),c.createElement("p",{className:"text-sm"},e)))}var Gu=function(e,t){!0===t&&(t=0);var n=e.indexOf("://"),r=e.substring(0,n).split("+").filter(Boolean);return"number"==typeof t?r[t]:r},Yu=function e(t){if(Array.isArray(t))return-1!==t.indexOf("ssh")||-1!==t.indexOf("rsync");if("string"!=typeof t)return!1;var n=Gu(t);if(t=t.substring(t.indexOf("://")+3),e(n))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(r)&&t.indexOf("@")<t.indexOf(":")},$u=new RegExp("%[a-f0-9]{2}","gi"),Xu=new RegExp("(%[a-f0-9]{2})+","gi");function qu(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;var n=e.slice(0,t=t||1),r=e.slice(t);return Array.prototype.concat.call([],qu(n),qu(r))}function Ku(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match($u),n=1;n<t.length;n++)t=(e=qu(t,n).join("")).match($u);return e}}var Ju=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=Xu.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=Ku(n[0]);r!==n[0]&&(t[n[0]]=r)}n=Xu.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var i=a[o];e=e.replace(new RegExp(i,"g"),t[i])}return e}(e)}},Qu=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]},Zu=function(e,t){for(var n={},r=Object.keys(e),a=Array.isArray(t),o=0;o<r.length;o++){var i=r[o],l=e[i];(a?-1!==t.indexOf(i):t(i,l,e))&&(n[i]=l)}return n},ef=Le(function(e,t){function n(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function r(e,t){return t.encode?t.strict?encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`):encodeURIComponent(e):e}function a(e,t){return t.decode?Ju(e):e}function o(e){return Array.isArray(e)?e.sort():"object"==typeof e?o(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function i(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function l(e){const t=(e=i(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function s(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function c(e,t){n((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),r[e=e.replace(/\[\]$/,"")]=t?void 0!==r[e]?[].concat(r[e],n):[n]:n};case"comma":case"separator":return(t,n,r)=>{const o="string"==typeof n&&n.includes(e.arrayFormatSeparator),i="string"==typeof n&&!o&&a(n,e).includes(e.arrayFormatSeparator);n=i?a(n,e):n;const l=o||i?n.split(e.arrayFormatSeparator).map(t=>a(t,e)):null===n?n:a(n,e);r[t]=l};default:return(e,t,n)=>{n[e]=void 0!==n[e]?[].concat(n[e],t):t}}}(t),i=Object.create(null);if("string"!=typeof e)return i;if(!(e=e.trim().replace(/^[?#&]/,"")))return i;for(const n of e.split("&")){if(""===n)continue;let[e,o]=Qu(t.decode?n.replace(/\+/g," "):n,"=");o=void 0===o?null:["comma","separator"].includes(t.arrayFormat)?o:a(o,t),r(a(e,t),o,i)}for(const e of Object.keys(i)){const n=i[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=s(n[e],t);else i[e]=s(n,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>{const n=i[t];return e[t]=Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?o(n):n,e},Object.create(null))}t.extract=l,t.parse=c,t.stringify=(e,t)=>{if(!e)return"";n((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const a=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],o=function(e){switch(e.arrayFormat){case"index":return t=>(n,a)=>{const o=n.length;return void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?n:null===a?[...n,[r(t,e),"[",o,"]"].join("")]:[...n,[r(t,e),"[",r(o,e),"]=",r(a,e)].join("")]};case"bracket":return t=>(n,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?n:null===a?[...n,[r(t,e),"[]"].join("")]:[...n,[r(t,e),"[]=",r(a,e)].join("")];case"comma":case"separator":return t=>(n,a)=>null==a||0===a.length?n:0===n.length?[[r(t,e),"=",r(a,e)].join("")]:[[n,r(a,e)].join(e.arrayFormatSeparator)];default:return t=>(n,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?n:null===a?[...n,r(t,e)]:[...n,[r(t,e),"=",r(a,e)].join("")]}}(t),i={};for(const t of Object.keys(e))a(t)||(i[t]=e[t]);const l=Object.keys(i);return!1!==t.sort&&l.sort(t.sort),l.map(n=>{const a=e[n];return void 0===a?"":null===a?r(n,t):Array.isArray(a)?a.reduce(o(n),[]).join("&"):r(n,t)+"="+r(a,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=Qu(e,"#");return Object.assign({url:n.split("?")[0]||"",query:c(l(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:a(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const a=i(e.url).split("?")[0]||"",o=t.extract(e.url),l=t.parse(o,{sort:!1}),s=Object.assign(l,e.query);let c=t.stringify(s,n);c&&(c=`?${c}`);let u=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r(e.fragmentIdentifier,n)}`),`${a}${c}${u}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:a,query:o,fragmentIdentifier:i}=t.parseUrl(e,r);return t.stringifyUrl({url:a,query:Zu(o,n),fragmentIdentifier:i},r)},t.exclude=(e,n,r)=>{const a=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,a,r)}});function tf(e){if("string"!=typeof e)throw new Error("The url must be a string.");let t=function(e){let t=function(e){if("string"!=typeof e||!e.trim())throw new Error("Invalid url.");return function(e){e=(e||"").trim();var t={protocols:Gu(e),protocol:null,port:null,resource:"",user:"",pathname:"",hash:"",search:"",href:e,query:Object.create(null)},n=e.indexOf("://"),r=null,a=null;e.startsWith(".")&&(e.startsWith("./")&&(e=e.substring(2)),t.pathname=e,t.protocol="file");var o=e.charAt(1);return t.protocol||(t.protocol=t.protocols[0],t.protocol||(Yu(e)?t.protocol="ssh":"/"===o||"~"===o?(e=e.substring(2),t.protocol="file"):t.protocol="file")),-1!==n&&(e=e.substring(n+3)),a=e.split(/\/|\\/),t.resource="file"!==t.protocol?a.shift():"",2===(r=t.resource.split("@")).length&&(t.user=r[0],t.resource=r[1]),2===(r=t.resource.split(":")).length&&(t.resource=r[0],r[1]?(t.port=Number(r[1]),isNaN(t.port)&&(t.port=null,a.unshift(r[1]))):t.port=null),a=a.filter(Boolean),t.pathname="file"===t.protocol?t.href:t.pathname||("file"!==t.protocol||"/"===t.href[0]?"/":"")+a.join("/"),2===(r=t.pathname.split("#")).length&&(t.pathname=r[0],t.hash=r[1]),2===(r=t.pathname.split("?")).length&&(t.pathname=r[0],t.search=r[1]),t.query=ef.parse(t.search),t.href=t.href.replace(/\/$/,""),t.pathname=t.pathname.replace(/\/$/,""),t}(e)}(e);t.token="";let n=t.user.split(":");return 2===n.length&&("x-oauth-basic"===n[1]?t.token=n[0]:"x-token-auth"===n[0]&&(t.token=n[1])),t.protocol=Yu(t.protocols)||Yu(e)?"ssh":t.protocols.length?t.protocols[0]:"file",t.href=t.href.replace(/\/$/,""),t}(e),n=t.resource.split("."),r=null;switch(t.toString=function(e){return tf.stringify(this,e)},t.source=n.length>2?n.slice(1-n.length).join("."):t.source=t.resource,t.git_suffix=/\.git$/.test(t.pathname),t.name=decodeURIComponent(t.pathname.replace(/^\//,"").replace(/\.git$/,"")),t.owner=decodeURIComponent(t.user),t.source){case"git.cloudforge.com":t.owner=t.user,t.organization=n[0],t.source="cloudforge.com";break;case"visualstudio.com":if("vs-ssh.visualstudio.com"===t.resource){r=t.name.split("/"),4===r.length&&(t.organization=r[1],t.owner=r[2],t.name=r[3],t.full_name=r[2]+"/"+r[3]);break}r=t.name.split("/"),2===r.length?(t.owner=r[1],t.name=r[1],t.full_name="_git/"+t.name):3===r.length?(t.name=r[2],"DefaultCollection"===r[0]?(t.owner=r[2],t.organization=r[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=r[0],t.full_name=t.owner+"/_git/"+t.name)):4===r.length&&(t.organization=r[0],t.owner=r[1],t.name=r[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name);break;case"dev.azure.com":case"azure.com":if("ssh.dev.azure.com"===t.resource){r=t.name.split("/"),4===r.length&&(t.organization=r[1],t.owner=r[2],t.name=r[3]);break}r=t.name.split("/"),5===r.length?(t.organization=r[0],t.owner=r[1],t.name=r[4],t.full_name="_git/"+t.name):3===r.length?(t.name=r[2],"DefaultCollection"===r[0]?(t.owner=r[2],t.organization=r[0],t.full_name=t.organization+"/_git/"+t.name):(t.owner=r[0],t.full_name=t.owner+"/_git/"+t.name)):4===r.length&&(t.organization=r[0],t.owner=r[1],t.name=r[3],t.full_name=t.organization+"/"+t.owner+"/_git/"+t.name),t.query&&t.query.path&&(t.filepath=t.query.path.replace(/^\/+/g,"")),t.query&&t.query.version&&(t.ref=t.query.version.replace(/^GB/,""));break;default:r=t.name.split("/");let e=r.length-1;if(r.length>=2){const n=r.indexOf("-",2),a=r.indexOf("blob",2),o=r.indexOf("tree",2),i=r.indexOf("commit",2),l=r.indexOf("src",2),s=r.indexOf("raw",2);e=n>0?n-1:a>0?a-1:o>0?o-1:i>0?i-1:l>0?l-1:s>0?s-1:e,t.owner=r.slice(0,e).join("/"),t.name=r[e],i&&(t.commit=r[e+2])}t.ref="",t.filepathtype="",t.filepath="";const a=r.length>e&&"-"===r[e+1]?e+1:e;r.length>a+2&&["raw","src","blob","tree"].indexOf(r[a+1])>=0&&(t.filepathtype=r[a+1],t.ref=r[a+2],r.length>a+3&&(t.filepath=r.slice(a+3).join("/"))),t.organization=t.owner}t.full_name||(t.full_name=t.owner,t.name&&(t.full_name&&(t.full_name+="/"),t.full_name+=t.name)),t.owner.startsWith("scm/")&&(t.source="bitbucket-server",t.owner=t.owner.replace("scm/",""),t.organization=t.owner,t.full_name=`${t.owner}/${t.name}`);const a=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/.exec(t.pathname);return null!=a&&(t.source="bitbucket-server",t.owner="users"===a[1]?"~"+a[2]:a[2],t.organization=t.owner,t.name=a[3],r=a[4].split("/"),r.length>1&&(["raw","browse"].indexOf(r[1])>=0?(t.filepathtype=r[1],r.length>2&&(t.filepath=r[2])):"commits"===r[1]&&r.length>2&&(t.commit=r[2])),t.full_name=`${t.owner}/${t.name}`,t.ref=t.query.at?t.query.at:""),t}function nf({git:e}){const{commitUrl:t}=function(e,t){if(!e)return{resource:null,repoUrl:null,commitUrl:null};const n=tf(e),r=tf.stringify(Ne({},n,{git_suffix:!1}),"https");return{repoUrl:r,resource:n.resource,commitUrl:`${r}/commit/${t}`}}(e.remote,e.hash);return c.createElement(c.Fragment,null,e.hash&&e.message&&c.createElement("div",{className:"flex items-center gap-4"},c.createElement("div",{className:"flex-grow font-semibold"},e.message),c.createElement("div",{className:"~bg-gray-500/5 flex items-center"},c.createElement(xc,{transparent:!0,overflowX:!1,value:e.hash}),t&&c.createElement("a",{href:t,target:"_blank",className:"mr-4"},c.createElement(xt,null,c.createElement(qa,{className:"group-hover:text-indigo-500",icon:Co}),"View commit ",e.hash.substr(0,7))))),e.isDirty&&c.createElement("div",null,c.createElement(Wu,{className:"mt-4"},"Last commit is dirty. (Un)staged changes have been made since this commit.")),e.tag&&c.createElement(Ac,null,c.createElement(Ac.Row,{label:"Latest tag",value:e.tag})))}tf.stringify=function(e,t){t=t||(e.protocols&&e.protocols.length?e.protocols.join("+"):e.protocol);const n=e.port?`:${e.port}`:"",r=e.user||"git",a=e.git_suffix?".git":"";switch(t){case"ssh":return n?`ssh://${r}@${e.resource}${n}/${e.full_name}${a}`:`${r}@${e.resource}:${e.full_name}${a}`;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return`${t}://${r}@${e.resource}${n}/${e.full_name}${a}`;case"http":case"https":return`${t}://${e.token?function(e){switch(e.source){case"bitbucket.org":return`x-token-auth:${e.token}@`;default:return`${e.token}@`}}(e):e.user&&(e.protocols.includes("http")||e.protocols.includes("https"))?`${e.user}@`:""}${e.resource}${n}/${function(e){switch(e.source){case"bitbucket-server":return`scm/${e.full_name}`;default:return`${e.full_name}`}}(e)}${a}`;default:return e.href}};var rf,af,of=(rf={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(e){return null==rf?void 0:rf[e]}),lf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sf=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),cf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,uf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ff="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",df="["+ff+"]",pf="\\d+",mf="[a-z\\xdf-\\xf6\\xf8-\\xff]",hf="[^\\ud800-\\udfff"+ff+pf+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",gf="(?:\\ud83c[\\udde6-\\uddff]){2}",yf="[\\ud800-\\udbff][\\udc00-\\udfff]",vf="[A-Z\\xc0-\\xd6\\xd8-\\xde]",bf="(?:"+mf+"|"+hf+")",Ef="(?:"+vf+"|"+hf+")",Tf="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Sf="[\\ufe0e\\ufe0f]?"+Tf+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",gf,yf].join("|")+")[\\ufe0e\\ufe0f]?"+Tf+")*",wf="(?:"+["[\\u2700-\\u27bf]",gf,yf].join("|")+")"+Sf,Nf=RegExp([vf+"?"+mf+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[df,vf,"$"].join("|")+")",Ef+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[df,vf+bf,"$"].join("|")+")",vf+"?"+bf+"+(?:['’](?:d|ll|m|re|s|t|ve))?",vf+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pf,wf].join("|"),"g"),Rf=RegExp("['’]","g"),Of=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Cf=function(e){return Of.test(e)},xf="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",kf="\\ud83c[\\udffb-\\udfff]",Af="[^\\ud800-\\udfff]",If="(?:\\ud83c[\\udde6-\\uddff]){2}",Lf="[\\ud800-\\udbff][\\udc00-\\udfff]",_f="(?:"+xf+"|"+kf+")?",Pf="[\\ufe0e\\ufe0f]?"+_f+"(?:\\u200d(?:"+[Af,If,Lf].join("|")+")[\\ufe0e\\ufe0f]?"+_f+")*",Mf="(?:"+[Af+xf+"?",xf,If,Lf,"[\\ud800-\\udfff]"].join("|")+")",Df=RegExp(kf+"(?="+kf+")|"+Mf+Pf,"g"),Uf=(af=function(e,t,n){return e+(n?" ":"")+function(e){e=Js(e);var t,n,r,a=Cf(e)?function(e){return Cf(e)?function(e){return e.match(Df)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,o=a?a[0]:e.charAt(0),i=a?(t=a,r=t.length,n=void 0===n?r:n,function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r<a;)o[r]=e[r+t];return o}(t,1,n)).join(""):e.slice(1);return o.toUpperCase()+i}(t)},function(e){return function(e,t,n,r){for(var a=-1,o=null==e?0:e.length;++a<o;)n=t(n,e[a],a,e);return n}(function(e,t,n){return e=Js(e),void 0===(t=t)?function(e){return uf.test(e)}(e)?function(e){return e.match(Nf)||[]}(e):function(e){return e.match(cf)||[]}(e):e.match(t)||[]}(function(e){return(e=Js(e))&&e.replace(lf,of).replace(sf,"")}(e).replace(Rf,"")),af,"")});function jf({env:e}){const t=c.useContext(be);return c.createElement(Ac,null,t.application_version&&c.createElement(Ac.Row,{key:"app_version",value:t.application_version,label:"App Version"}),Object.entries(e).map(([e,t])=>c.createElement(Ac.Row,{key:e,value:t,label:Uf(e)})))}function Ff({children:e}){return c.createElement("ul",{className:"grid grid-cols-1 gap-10"},e)}function zf({title:e,children:t,anchor:n}){return c.createElement("li",null,c.createElement("a",{href:`#context-${n}`,className:"uppercase tracking-wider ~text-gray-500 text-xs font-bold"},e),c.createElement("ul",{className:"mt-3 grid grid-cols-1 gap-3"},t))}function Bf({icon:e,title:t,anchor:n,active:r=!1}){return c.createElement("li",null,c.createElement("a",{href:`#context-${n}`,className:`\n flex items-center gap-3\n group text-base hover:text-indigo-500\n ${r?"~text-indigo-600":""}\n `},c.createElement("span",{className:"opacity-50"},e),c.createElement("span",null,t)))}function Hf({children:e}){const{inView:t}=c.useContext(ou);return c.createElement(c.Fragment,null,c.createElement("nav",{className:"hidden @2xl:block min-w-[8rem] flex-none mr-10 @4xl:mr-20"},c.createElement("div",{className:"sticky top-[7.5rem]"},c.createElement(Ff,null,c.Children.map(e,e=>c.createElement(c.Fragment,null,e&&c.createElement(zf,{title:e.props.title,anchor:e.props.anchor},c.Children.map(e.props.children,e=>c.createElement(c.Fragment,null,e&&e.type===iu&&c.createElement(Bf,{icon:e.props.icon,active:t[t.length-1]===e.props.title,title:e.props.title,anchor:e.props.anchor}))))))))),c.createElement("div",{className:"overflow-hidden grid grid-cols-1 gap-px bg-white dark:shadow-none dark:bg-gray-800/50 dark:bg-gradient-to-bl from-gray-700/50 via-transparent dark:ring-1 dark:ring-inset dark:ring-white/5 rounded-lg shadow-2xl shadow-gray-500/20 flex-grow"},e))}function Vf({children:e}){const[t,n]=c.useState([]);return c.createElement(ou.Provider,{value:{inView:t,setInView:n}},e)}function Wf({className:e=""}){return c.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 512 512",enableBackground:"new 0 0 512 512",className:`${e}`},c.createElement("path",{fill:"currentcolor",d:"M381.6,334.8c-24.7,0-27.7,33.6-45.2,44.6v52c0,17.6,14.2,31.8,31.8,31.8c17.6,0,31.8-14.2,31.8-31.8v-88.6\n C395,338.1,389.2,334.8,381.6,334.8z"}),c.createElement("path",{fill:"currentcolor",d:"M263.2,334.8c-25.5,0-27.8,35.8-46.9,45.7v96.2c0,19.5,15.8,35.3,35.3,35.3s35.3-15.8,35.3-35.3V349.1\n C280.9,341.1,273.9,334.8,263.2,334.8z"}),c.createElement("path",{fill:"currentcolor",d:"M144.8,334.8c-22.9,0-27.1,28.9-41.6,41.9l0,38c0,17.6,14.2,31.8,31.8,31.8c17.6,0,31.8-14.2,31.8-31.8v-67.9\n C161.2,339.9,154.5,334.8,144.8,334.8z"}),c.createElement("path",{id:"Body-Copy-4",fill:"currentcolor",fillRule:"evenodd",clipRule:"evenodd",d:"M458.9,340.2c-8.3,12.6-14.7,28.2-31.7,28.2\n\t\tc-28.6,0-30.1-44-58.7-44c-28.6,0-27,44-55.6,44c-28.6,0-30.1-44-58.7-44s-27,44-55.6,44s-30.1-44-58.7-44s-27,44-55.6,44\n\t\tc-9,0-15.3-4.4-20.6-10.3c-20.4-35.6-32.2-77.2-32.2-121.8C31.6,105.8,132.4,0,256.7,0s225.1,105.8,225.1,236.2\n\t\tC481.8,273.5,473.6,308.8,458.9,340.2z"}),c.createElement("path",{id:"Oval",fillRule:"evenodd",clipRule:"evenodd",fill:"#FFFFFF",d:"M244.6,295.1c78.3,0,111.2-45.4,111.2-109.9\n\t\tS306.1,61.4,244.6,61.4s-111.2,59.4-111.2,123.9S166.4,295.1,244.6,295.1z"}),c.createElement("ellipse",{id:"Oval_1_",fill:"currentcolor",fillRule:"evenodd",clipRule:"evenodd",cx:"214.7",cy:"142.9",rx:"41.7",ry:"46"}),c.createElement("ellipse",{id:"Oval_2_",fillRule:"evenodd",clipRule:"evenodd",fill:"#FFFFFF",cx:"207.8",cy:"132.2",rx:"20.9",ry:"21.3"}))}function Gf({items:e}){return c.createElement(Ac,null,Object.entries(e).map(([e,t])=>c.createElement(Ac.Row,{key:e,value:t,label:Uf(e)})))}function Yf({commandArguments:e}){return c.createElement("div",{className:"col-span-2"},c.createElement(xc,{value:e.join(" ")}))}function $f({request:e}){return e.useragent?c.createElement(xc,{value:e.useragent}):null}function Xf(){var e,t,n,r,a;const o=c.useContext(be),i=o.context_items,l=i.request_data;return c.createElement($c,null,c.createElement("div",{className:"@container flex items-stretch"},c.createElement(Vf,null,c.createElement(Hf,null,i.request&&c.createElement(tu,{title:"Request",anchor:"request"},c.createElement(su,{request:i.request,requestData:i.request_data,headers:i.headers}),!!i.request.useragent&&c.createElement(iu,{title:"Browser",anchor:"request-browser",icon:c.createElement(qa,{fixedWidth:!0,icon:ko}),children:c.createElement($f,{request:i.request})}),i.headers&&c.createElement(iu,{title:"Headers",anchor:"request-headers",icon:c.createElement(qa,{fixedWidth:!0,icon:yo}),children:c.createElement(Su,{headers:i.headers})}),i.request_data&&!!Object.values(i.request_data.queryString||[]).length&&c.createElement(iu,{title:"Query String",anchor:"request-query-string",icon:c.createElement(qa,{fixedWidth:!0,icon:ro}),children:c.createElement(wu,{requestData:i.request_data})}),!(null==(e=i.request_data)||!e.body)&&c.createElement(iu,{title:"Body",anchor:"request-body",icon:c.createElement(qa,{fixedWidth:!0,icon:ao}),children:c.createElement(Nu,null)}),!(null==l||null==(t=l.files)||!t.length)&&c.createElement(iu,{title:"Files",anchor:"request-files",icon:c.createElement(qa,{fixedWidth:!0,icon:co}),children:c.createElement(Ru,null)}),!(null==(n=i.session)||!n.length)&&c.createElement(iu,{title:"Session",anchor:"request-session",icon:c.createElement(qa,{fixedWidth:!0,icon:uo}),children:c.createElement(Ou,{session:i.session})}),!(null==(r=i.cookies)||!r.length)&&c.createElement(iu,{title:"Cookies",anchor:"request-cookies",icon:c.createElement(qa,{fixedWidth:!0,icon:io}),children:c.createElement(Cu,{cookies:i.cookies})})),(i.route||i.view||i.arguments||i.job)&&c.createElement(tu,{title:"App",anchor:"app"},i.route&&c.createElement(iu,{title:"Routing",anchor:"app-routing",icon:c.createElement(qa,{fixedWidth:!0,icon:To}),children:c.createElement(_u,{route:i.route})}),i.view&&c.createElement(iu,{title:"Views",anchor:"app-views",icon:c.createElement(qa,{fixedWidth:!0,icon:ho}),children:c.createElement(Du,null)}),i.arguments&&c.createElement(iu,{title:"Command",anchor:"context-command",icon:c.createElement(qa,{fixedWidth:!0,icon:Ro}),children:c.createElement(Yf,{commandArguments:i.arguments})}),i.job&&c.createElement(iu,{title:"Job",anchor:"context-job",icon:c.createElement(qa,{fixedWidth:!0,icon:fo}),children:c.createElement(Gf,{items:i.job||{}})})),i.livewire&&c.createElement(tu,{title:"Livewire",anchor:"livewire"},c.createElement(iu,{title:"Component",anchor:"livewire-component",icon:c.createElement(Wf,{className:"svg-inline--fa fa-w-16 fa-fw"}),children:c.createElement(ku,null)}),c.createElement(iu,{title:"Updates",anchor:"livewire-updates",icon:c.createElement(qa,{fixedWidth:!0,icon:Eo}),children:c.createElement(Au,null)}),c.createElement(iu,{title:"Data",anchor:"livewire-data",icon:c.createElement(qa,{fixedWidth:!0,icon:No}),children:c.createElement(xu,null)})),!!(i.user||i.git||i.env||o.application_version||i.exception)&&c.createElement(tu,{title:"Context",anchor:"context"},i.user&&c.createElement(iu,{title:"User",anchor:"user-user",icon:c.createElement(qa,{fixedWidth:!0,icon:xo}),children:c.createElement(Vu,{user:i.user})}),i.git&&c.createElement(iu,{title:"Git",anchor:"context-git",icon:c.createElement(qa,{fixedWidth:!0,icon:oo}),children:c.createElement(nf,{git:i.git})}),!(!i.env&&!o.application_version)&&c.createElement(iu,{title:"Versions",anchor:"context-versions",icon:c.createElement(qa,{fixedWidth:!0,icon:So}),children:c.createElement(jf,{env:i.env||{}})}),i.exception&&c.createElement(iu,{title:"Exception",anchor:"context-exception",icon:c.createElement(qa,{fixedWidth:!0,icon:to}),children:c.createElement(Gf,{items:i.exception||{}})})),(null==(a=o.custom_context_items)?void 0:a.length)>0&&c.createElement(tu,{title:"Custom",anchor:"custom-context"},o.custom_context_items.map(e=>c.createElement(iu,{key:e.name,title:Uf(e.name),anchor:`custom-context-${Zc(e.name)}`,icon:c.createElement(qa,{fixedWidth:!0,icon:eo}),children:c.createElement(Gf,{items:e.items})})))))))}function qf({children:e,className:t}){const[n,r]=c.useState(0),a=e.filter(e=>!1!==e),o=c.Children.map(a,e=>({name:e.props.name,component:e.props.component,count:e.props.count,checked:e.props.checked,onChange:e.props.onChange})).filter(e=>e.count),i=o[n].component;return c.createElement("div",{className:`${t} | bg-gray-300/50 dark:bg-black/10 shadow-inner rounded-lg`},c.createElement("nav",{className:"z-10 flex justify-center items-center"},c.createElement("ul",{className:"-my-5 flex justify-start items-center rounded-full shadow-lg bg-indigo-500 text-white space-x-px"},o.map((e,t)=>c.createElement("li",{key:t,className:`\n ${t===n?"bg-indigo-600":"bg-indigo-500 text-indigo-100"}\n ${0===t?"rounded-l-full":""}\n ${t===o.length-1?"rounded-r-full":""}\n hover:text-white\n `},c.createElement("button",{onClick:()=>r(t),className:"group flex items-center px-3 sm:px-5 h-10 uppercase tracking-wider text-xs font-medium "},c.createElement("span",{className:"mr-1.5 inline-flex items-center justify-center px-1 min-w-[1rem] h-4 bg-gray-900/30 text-white rounded-full text-xs"},e.count),c.createElement("span",null,e.name)))))),c.createElement($c,{fallbackComponent:e=>c.createElement(eu,{githubLink:e,className:"pt-10"})},c.createElement("div",{className:"grid grid-cols-1 gap-10 py-10 px-6 @lg:px-10"},c.createElement(i,null))))}function Kf({children:e,context:t=null,level:n=null,meta:r=null,time:a}){const[o,i]=c.useState(!1),l={error:"red",warn:"orange",warning:"orange",info:"blue",debug:"green",trace:"gray",notice:"purple",critical:"red",alert:"red",emergency:"red"};return c.createElement("div",{className:"min-w-0 grid grid-cols-1 gap-2"},c.createElement("div",{className:"flex items-center gap-1"},c.createElement(lu,{color:n?l[n]:"gray",className:"font-mono"},a.toLocaleTimeString()),n&&c.createElement(lu,{color:l[n]},n),r&&Object.entries(r).map(([e,t])=>c.createElement(c.Fragment,{key:e},"runtime"===e&&c.createElement(lu,{className:"inline-flex items-center gap-2"},c.createElement(qa,{title:"Runtime",className:"opacity-50",icon:wo})," ",t),"connection"===e&&c.createElement(lu,{className:"inline-flex items-center gap-2"},c.createElement(qa,{title:"Connection",className:"opacity-50",icon:so})," ",t),"runtime"!==e&&"connection"!==e&&c.createElement(lu,null,e,": ",t))),t&&c.createElement(c.Fragment,null,c.createElement("div",{className:"ml-auto"},c.createElement(xt,{onClick:()=>i(!o)},c.createElement(qa,{icon:o?mo:ao,className:"text-[8px] ~text-gray-500 group-hover:text-indigo-500"}),o?"As list":"Raw")))),c.createElement("div",null,e),t&&c.createElement(c.Fragment,null,o?c.createElement(xc,{value:Do(t),language:"json"}):c.createElement("div",{className:"pl-4"},c.createElement(cu,{items:t}))))}function Jf(){const e=c.useContext(be),t=Object.values(e.context_items.logs);return c.createElement(c.Fragment,null,t.map((e,t)=>c.createElement(Kf,{key:t,context:e.context,level:e.level,time:Mo(e.microtime)},c.createElement(xc,{value:e.message}))))}function Qf(){const e=c.useContext(be),t=Object.values(e.context_items.dumps);return c.createElement(c.Fragment,null,t.map((e,t)=>c.createElement(Kf,{key:t,time:Mo(e.microtime)},c.createElement("div",{className:"mb-2"},c.createElement(Bo,{path:e.file,lineNumber:e.line_number,className:"text-sm"})),c.createElement(Mu,{value:e.html_dump}))))}function Zf({bindings:e,hidden:t=!1}){const[n,r]=c.useState(t);return c.createElement("div",null,c.createElement("button",{type:"button",className:"font-bold text-xs ~text-gray-500 uppercase tracking-wider flex flex-row items-center gap-2 mb-2",onClick:()=>r(!n)},c.createElement(qa,{icon:Qa,className:"transition-transform duration-300 transform "+(n?"":"rotate-90")}),e.length," query ",e.length>1?"parameters":"parameter"),!n&&c.createElement(Ac,{className:"ml-4"},e.map((e,t)=>c.createElement(Ac.Row,{small:!0,key:t,value:e,label:c.createElement("code",{className:"text-sm text-gray-500"},t+1)}))))}function ed(){const e=c.useContext(be);let t=Object.values(e.context_items.queries);function n(e){return null!==e.bindings&&e.sql.split("?").length-1===e.bindings.length}function r(e){var t;let n=e.sql;return null==(t=e.bindings)||t.forEach(e=>{n=n.replace("?",e)}),n}return c.createElement(c.Fragment,null,t.map((e,t)=>c.createElement(Kf,{key:t,time:Mo(e.microtime),meta:{runtime:`${e.time}ms`,connection:e.connection_name}},e.bindings&&e.bindings.length>0?c.createElement("div",{className:"grid gap-4 grid-cols-1"},c.createElement(xc,{value:n(e)?r(e):e.sql,language:"sql"}),c.createElement(Zf,{bindings:e.bindings,hidden:n(e)})):c.createElement(xc,{value:e.sql,language:"sql"}))))}function td(){const e=c.useContext(be);return c.createElement(c.Fragment,null,e.glows.map((e,t)=>c.createElement(Kf,{key:t,level:e.message_level,context:e.meta_data,time:Mo(e.microtime)},c.createElement(xc,{value:e.name}))))}function nd(){const e=c.useContext(be),t=e.context_items.queries,n=e.context_items.logs,r=e.glows;return c.createElement($c,null,c.createElement(qf,{className:"@container"},c.createElement(qf.Tab,{component:Qf,name:"Dumps",count:Object.keys(e.context_items.dumps||[]).length}),c.createElement(qf.Tab,{component:td,name:"Glows",count:r.length}),c.createElement(qf.Tab,{component:ed,name:"Queries",count:Object.keys(t||[]).length}),c.createElement(qf.Tab,{component:Jf,name:"Logs",count:Object.keys(n||[]).length})))}function rd({children:e,className:t=""}){return c.createElement("code",{className:`font-mono leading-relaxed font-normal ~bg-gray-500/5 px-1 py-1 ${t}`},e)}function ad({className:e=""}){return c.createElement("svg",{height:"58",viewBox:"0 0 38 58",width:"38",xmlns:"http://www.w3.org/2000/svg",className:`w-4 h-5 ml-1.5 ${e}`},c.createElement("linearGradient",{id:"a",x1:"50%",x2:"50%",y1:"100%",y2:"0%"},c.createElement("stop",{offset:"0",stopColor:"#48b987"}),c.createElement("stop",{offset:"1",stopColor:"#137449"})),c.createElement("linearGradient",{id:"b",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},c.createElement("stop",{offset:"0",stopColor:"#66ffbc"}),c.createElement("stop",{offset:"1",stopColor:"#218e5e"})),c.createElement("linearGradient",{id:"c",x1:"81.686741%",x2:"17.119683%",y1:"50%",y2:"46.893103%"},c.createElement("stop",{offset:"0",stopColor:"#ccffe7",stopOpacity:".492379"}),c.createElement("stop",{offset:".37576486",stopColor:"#fff",stopOpacity:".30736"}),c.createElement("stop",{offset:"1",stopColor:"#00ff85",stopOpacity:"0"})),c.createElement("linearGradient",{id:"d",x1:"50%",x2:"50%",y1:"100%",y2:"0%"},c.createElement("stop",{offset:"0",stopColor:"#a189f2"}),c.createElement("stop",{offset:"1",stopColor:"#3f00f5"})),c.createElement("linearGradient",{id:"e",x1:"50%",x2:"50%",y1:"0%",y2:"100%"},c.createElement("stop",{offset:"0",stopColor:"#bbadfa"}),c.createElement("stop",{offset:"1",stopColor:"#9275f4"})),c.createElement("g",{fill:"none"},c.createElement("g",{transform:"translate(1 1)"},c.createElement("path",{d:"m11.9943899 27.9858314-11.9943899-6.9992916v-13.98724823l12.0617111 7.02196133z",fill:"url(#a)"}),c.createElement("path",{d:"m23.9775596 20.9808724-23.9775596-13.98158083 11.9943899-6.99929157 24.0056101 13.9815808z",fill:"url(#b)",stroke:"url(#c)"})),c.createElement("g",{transform:"translate(1 29.014169)"},c.createElement("path",{d:"m11.9943899 27.9858314-11.9943899-6.9936241v-13.99291573l11.9663394 6.99362413z",fill:"url(#d)"}),c.createElement("path",{d:"m11.9663394 13.9929157-11.9663394-6.99362413 11.9943899-6.99929157 11.9943899 6.99929157z",fill:"url(#e)"}))))}function od(){return c.createElement("svg",{id:"ignition",className:"w-8 h-8 -ml-1",viewBox:"0 0 500 500"},c.createElement("g",null,c.createElement("polygon",{style:{fill:"transparent"},points:"466.5,375 466.5,125 250,0 33.5,125 33.5,375 250,500 \t"}),c.createElement("g",null,c.createElement("polygon",{style:{fill:"#ff4590"},points:"314.2,176 314.2,250 250,287 250,212.6 \t\t"}),c.createElement("polygon",{style:{fill:"#ffd000"},points:"185.9,398.1 185.9,324.1 250,287 249.9,360.9 \t\t"}),c.createElement("polygon",{style:{fill:"#de075d"},points:"250,139.1 250,287 185.9,250 185.8,101.9 \t\t"}),c.createElement("polygon",{style:{fill:"#e0b800"},points:"249.9,360.9 250,287 314.1,324 314.1,398.1 \t\t"}))))}function id(e){var t=e.label,n=e.onChange;return c.createElement("label",{className:"flex items-center"},c.createElement("input",{type:"checkbox",checked:e.checked,onChange:function(e){return n(e.target.checked)},className:"sr-only peer"}),c.createElement("span",{className:"mr-2 flex items-center w-6 h-4 ~bg-gray-100 peer-checked:bg-emerald-300 rounded-full shadow-inner transition-colors"}),c.createElement("span",{className:"absolute left-0.5 top-0.5 w-3 h-3 ~bg-dropdown rounded-full shadow-md transform peer-checked:translate-x-2 transition-transform"}),c.createElement("span",{className:"uppercase tracking-wider text-xs font-medium"},t))}qf.Tab=e=>null;var ld=c.createContext();function sd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sd(Object(n),!0).forEach(function(t){fd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ud(e){return(ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o=[],i=!0,l=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);i=!0);}catch(e){l=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(l)throw a}}return o}}(e,t)||md(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pd(e){return function(e){if(Array.isArray(e))return hd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||md(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function md(e,t){if(e){if("string"==typeof e)return hd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hd(e,t):void 0}}function hd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gd=function(){},yd={},vd={},bd=null,Ed={mark:gd,measure:gd};try{"undefined"!=typeof window&&(yd=window),"undefined"!=typeof document&&(vd=document),"undefined"!=typeof MutationObserver&&(bd=MutationObserver),"undefined"!=typeof performance&&(Ed=performance)}catch(pa){}var Td=(yd.navigator||{}).userAgent,Sd=void 0===Td?"":Td,wd=yd,Nd=vd,Rd=bd,Od=Ed,Cd=!!Nd.documentElement&&!!Nd.head&&"function"==typeof Nd.addEventListener&&"function"==typeof Nd.createElement,xd=~Sd.indexOf("MSIE")||~Sd.indexOf("Trident/"),kd=["HTML","HEAD","STYLE","SCRIPT"],Ad=function(){try{return!1}catch(e){return!1}}(),Id={fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit",fa:"solid"},Ld={solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"},_d={fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},Pd={"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},Md=/fa[srltdbk\-\ ]/,Dd=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Kit)?.*/i,Ud={900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},jd=[1,2,3,4,5,6,7,8,9,10],Fd=jd.concat([11,12,13,14,15,16,17,18,19,20]),zd=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Bd=[].concat(pd(Object.keys(Ld)),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","duotone-group","swap-opacity","primary","secondary"]).concat(jd.map(function(e){return"".concat(e,"x")})).concat(Fd.map(function(e){return"w-".concat(e)})),Hd=wd.FontAwesomeConfig||{};Nd&&"function"==typeof Nd.querySelector&&[["data-family-prefix","familyPrefix"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(function(e){var t=dd(e,2),n=t[1],r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=Nd.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(t[0]));null!=r&&(Hd[n]=r)});var Vd=cd(cd({},{familyPrefix:"fa",styleDefault:"solid",replacementClass:"svg-inline--fa",autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0}),Hd);Vd.autoReplaceSvg||(Vd.observeMutations=!1);var Wd={};Object.keys(Vd).forEach(function(e){Object.defineProperty(Wd,e,{enumerable:!0,set:function(t){Vd[e]=t,Gd.forEach(function(e){return e(Wd)})},get:function(){return Vd[e]}})}),wd.FontAwesomeConfig=Wd;var Gd=[],Yd=16,$d={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Xd(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function qd(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function Kd(e){return e.classList?qd(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function Jd(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Qd(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function Zd(e){return e.size!==$d.size||e.x!==$d.x||e.y!==$d.y||e.rotate!==$d.rotate||e.flipX||e.flipY}function ep(){var e="fa",t="svg-inline--fa",n=Wd.familyPrefix,r=Wd.replacementClass,a=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),l=new RegExp("\\.".concat(t),"g");a=a.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(l,".".concat(r))}return a}var tp=!1;function np(){Wd.autoAddCss&&!tp&&(function(e){if(e&&Cd){var t=Nd.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=Nd.head.childNodes,r=null,a=n.length-1;a>-1;a--){var o=n[a],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=o)}Nd.head.insertBefore(t,r)}}(ep()),tp=!0)}var rp={mixout:function(){return{dom:{css:ep,insertCss:np}}},hooks:function(){return{beforeDOMElementCreation:function(){np()},beforeI2svg:function(){np()}}}},ap=wd||{};ap.___FONT_AWESOME___||(ap.___FONT_AWESOME___={}),ap.___FONT_AWESOME___.styles||(ap.___FONT_AWESOME___.styles={}),ap.___FONT_AWESOME___.hooks||(ap.___FONT_AWESOME___.hooks={}),ap.___FONT_AWESOME___.shims||(ap.___FONT_AWESOME___.shims=[]);var op=ap.___FONT_AWESOME___,ip=[],lp=!1;function sp(e){Cd&&(lp?setTimeout(e,0):ip.push(e))}function cp(e){var t=e.tag,n=e.attributes,r=void 0===n?{}:n,a=e.children,o=void 0===a?[]:a;return"string"==typeof e?Jd(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(Jd(e[n]),'" ')},"").trim()}(r),">").concat(o.map(cp).join(""),"</").concat(t,">")}function up(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}Cd&&((lp=(Nd.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Nd.readyState))||Nd.addEventListener("DOMContentLoaded",function e(){Nd.removeEventListener("DOMContentLoaded",e),lp=1,ip.map(function(e){return e()})}));var fp=function(e,t,n,r){var a,o,i,l=Object.keys(e),s=l.length,c=void 0!==r?function(e,t){return function(n,r,a,o){return e.call(t,n,r,a,o)}}(t,r):t;for(void 0===n?(a=1,i=e[l[0]]):(a=0,i=n);a<s;a++)i=c(i,e[o=l[a]],o,e);return i};function dp(e){var t=function(e){for(var t=[],n=0,r=e.length;n<r;){var a=e.charCodeAt(n++);if(a>=55296&&a<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&a)<<10)+(1023&o)+65536):(t.push(a),n--)}else t.push(a)}return t}(e);return 1===t.length?t[0].toString(16):null}function pp(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function mp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.skipHooks,a=void 0!==r&&r,o=pp(t);"function"!=typeof op.hooks.addPack||a?op.styles[e]=cd(cd({},op.styles[e]||{}),o):op.hooks.addPack(e,pp(t)),"fas"===e&&mp("fa",t)}var hp=op.styles,gp=op.shims,yp=Object.values(_d),vp=null,bp={},Ep={},Tp={},Sp={},wp={},Np=Object.keys(Id);function Rp(e,t){var n=t.split("-"),r=n[0],a=n.slice(1).join("-");return r!==e||""===a||~Bd.indexOf(a)?null:a}var Op=function(){var e=function(e){return fp(hp,function(t,n,r){return t[r]=fp(n,e,{}),t},{})};bp=e(function(e,t,n){return t[3]&&(e[t[3]]=n),t[2]&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=n}),e}),Ep=e(function(e,t,n){return e[n]=n,t[2]&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=n}),e}),wp=e(function(e,t,n){var r=t[2];return e[n]=n,r.forEach(function(t){e[t]=n}),e});var t="far"in hp||Wd.autoFetchSvg,n=fp(gp,function(e,n){var r=n[0],a=n[1],o=n[2];return"far"!==a||t||(a="fas"),"string"==typeof r&&(e.names[r]={prefix:a,iconName:o}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:a,iconName:o}),e},{names:{},unicodes:{}});Tp=n.names,Sp=n.unicodes,vp=Ip(Wd.styleDefault)};function Cp(e,t){return(bp[e]||{})[t]}function xp(e,t){return(wp[e]||{})[t]}function kp(e){return Tp[e]||{prefix:null,iconName:null}}function Ap(){return vp}function Ip(e){return Ld[e]||Ld[Id[e]]||(e in op.styles?e:null)||null}function Lp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.skipLookups,r=void 0!==n&&n,a=null,o=e.reduce(function(e,t){var n=Rp(Wd.familyPrefix,t);if(hp[t]?(t=yp.includes(t)?Pd[t]:t,a=t,e.prefix=t):Np.indexOf(t)>-1?(a=t,e.prefix=Ip(t)):n?e.iconName=n:t!==Wd.replacementClass&&e.rest.push(t),!r&&e.prefix&&e.iconName){var o="fa"===a?kp(e.iconName):{},i=xp(e.prefix,e.iconName);o.prefix&&(a=null),e.iconName=o.iconName||i||e.iconName,e.prefix=o.prefix||e.prefix,"far"!==e.prefix||hp.far||!hp.fas||Wd.autoFetchSvg||(e.prefix="fas")}return e},{prefix:null,iconName:null,rest:[]});return"fa"!==o.prefix&&"fa"!==a||(o.prefix=Ap()||"fas"),o}Gd.push(function(e){vp=Ip(e.styleDefault)}),Op();var _p=/*#__PURE__*/function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t,n;return t=e,(n=[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(t){e.definitions[t]=cd(cd({},e.definitions[t]||{}),a[t]),mp(t,a[t]);var n=_d[t];n&&mp(n,a[t]),Op()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map(function(t){var r=n[t],a=r.prefix,o=r.iconName,i=r.icon,l=i[2];e[a]||(e[a]={}),l.length>0&&l.forEach(function(t){"string"==typeof t&&(e[a][t]=i)}),e[a][o]=i}),e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Pp=[],Mp={},Dp={},Up=Object.keys(Dp);function jp(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var o=Mp[e]||[];return o.forEach(function(e){t=e.apply(null,[t].concat(r))}),t}function Fp(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=Mp[e]||[];a.forEach(function(e){e.apply(null,n)})}function zp(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Dp[e]?Dp[e].apply(null,t):void 0}function Bp(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Ap();if(t)return t=xp(n,t)||t,up(Hp.definitions,n,t)||up(op.styles,n,t)}var Hp=new _p,Vp={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Cd?(Fp("beforeI2svg",e),zp("pseudoElements2svg",e),zp("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.autoReplaceSvgRoot;!1===Wd.autoReplaceSvg&&(Wd.autoReplaceSvg=!0),Wd.observeMutations=!0,sp(function(){Gp({autoReplaceSvgRoot:t}),Fp("watch",e)})}},Wp={noAuto:function(){Wd.autoReplaceSvg=!1,Wd.observeMutations=!1,Fp("noAuto")},config:Wd,dom:Vp,parse:{icon:function(e){if(null===e)return null;if("object"===ud(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:xp(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=Ip(e[0]);return{prefix:n,iconName:xp(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(Wd.familyPrefix,"-"))>-1||e.match(Md))){var r=Lp(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||Ap(),iconName:xp(r.prefix,r.iconName)||r.iconName}}if("string"==typeof e){var a=Ap();return{prefix:a,iconName:xp(a,e)||e}}}},library:Hp,findIconDefinition:Bp,toHtml:cp},Gp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.autoReplaceSvgRoot,n=void 0===t?Nd:t;(Object.keys(op.styles).length>0||Wd.autoFetchSvg)&&Cd&&Wd.autoReplaceSvg&&Wp.dom.i2svg({node:n})};function Yp(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return cp(e)})}}),Object.defineProperty(e,"node",{get:function(){if(Cd){var t=Nd.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function $p(e){var t=e.icons,n=t.main,r=t.mask,a=e.prefix,o=e.iconName,i=e.transform,l=e.symbol,s=e.title,c=e.maskId,u=e.titleId,f=e.extra,d=e.watchable,p=void 0!==d&&d,m=r.found?r:n,h=m.width,g=m.height,y="fak"===a,v=[Wd.replacementClass,o?"".concat(Wd.familyPrefix,"-").concat(o):""].filter(function(e){return-1===f.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(f.classes).join(" "),b={children:[],attributes:cd(cd({},f.attributes),{},{"data-prefix":a,"data-icon":o,class:v,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(h," ").concat(g)})},E=y&&!~f.classes.indexOf("fa-fw")?{width:"".concat(h/g*16*.0625,"em")}:{};p&&(b.attributes["data-fa-i2svg"]=""),s&&(b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(u||Xd())},children:[s]}),delete b.attributes.title);var T=cd(cd({},b),{},{prefix:a,iconName:o,main:n,mask:r,maskId:c,transform:i,symbol:l,styles:cd(cd({},E),f.styles)}),S=r.found&&n.found?zp("generateAbstractMask",T)||{children:[],attributes:{}}:zp("generateAbstractIcon",T)||{children:[],attributes:{}},w=S.attributes;return T.children=S.children,T.attributes=w,l?function(e){var t=e.iconName,n=e.children,r=e.attributes,a=e.symbol,o=!0===a?"".concat(e.prefix,"-").concat(Wd.familyPrefix,"-").concat(t):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:cd(cd({},r),{},{id:o}),children:n}]}]}(T):function(e){var t=e.children,n=e.main,r=e.mask,a=e.attributes,o=e.styles,i=e.transform;if(Zd(i)&&n.found&&!r.found){var l={x:n.width/n.height/2,y:.5};a.style=Qd(cd(cd({},o),{},{"transform-origin":"".concat(l.x+i.x/16,"em ").concat(l.y+i.y/16,"em")}))}return[{tag:"svg",attributes:a,children:t}]}(T)}function Xp(e){var t=e.content,n=e.width,r=e.height,a=e.transform,o=e.title,i=e.extra,l=e.watchable,s=void 0!==l&&l,c=cd(cd(cd({},i.attributes),o?{title:o}:{}),{},{class:i.classes.join(" ")});s&&(c["data-fa-i2svg"]="");var u=cd({},i.styles);Zd(a)&&(u.transform=function(e){var t=e.transform,n=e.width,r=e.height,a=void 0===r?16:r,o=e.startCentered,i=void 0!==o&&o,l="";return l+=i&&xd?"translate(".concat(t.x/Yd-(void 0===n?16:n)/2,"em, ").concat(t.y/Yd-a/2,"em) "):i?"translate(calc(-50% + ".concat(t.x/Yd,"em), calc(-50% + ").concat(t.y/Yd,"em)) "):"translate(".concat(t.x/Yd,"em, ").concat(t.y/Yd,"em) "),(l+="scale(".concat(t.size/Yd*(t.flipX?-1:1),", ").concat(t.size/Yd*(t.flipY?-1:1),") "))+"rotate(".concat(t.rotate,"deg) ")}({transform:a,startCentered:!0,width:n,height:r}),u["-webkit-transform"]=u.transform);var f=Qd(u);f.length>0&&(c.style=f);var d=[];return d.push({tag:"span",attributes:c,children:[t]}),o&&d.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),d}function qp(e){var t=e.content,n=e.title,r=e.extra,a=cd(cd(cd({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=Qd(r.styles);o.length>0&&(a.style=o);var i=[];return i.push({tag:"span",attributes:a,children:[t]}),n&&i.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),i}var Kp=op.styles;function Jp(e){var t=e[0],n=e[1],r=dd(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(Wd.familyPrefix,"-").concat("duotone-group")},children:[{tag:"path",attributes:{class:"".concat(Wd.familyPrefix,"-").concat("secondary"),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(Wd.familyPrefix,"-").concat("primary"),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}var Qp={found:!1,width:512,height:512};function Zp(e,t){var n=t;return"fa"===t&&null!==Wd.styleDefault&&(t=Ap()),new Promise(function(r,a){if(zp("missingIconAbstract"),"fa"===n){var o=kp(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&Kp[t]&&Kp[t][e])return r(Jp(Kp[t][e]));!function(e,t){Ad||Wd.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),r(cd(cd({},Qp),{},{icon:Wd.showMissingIcons&&e&&zp("missingIconAbstract")||{}}))})}var em=function(){},tm=Wd.measurePerformance&&Od&&Od.mark&&Od.measure?Od:{mark:em,measure:em},nm=function(e){return tm.mark("".concat('FA "6.1.1"'," ").concat(e," begins")),function(){return function(e){tm.mark("".concat('FA "6.1.1"'," ").concat(e," ends")),tm.measure("".concat('FA "6.1.1"'," ").concat(e),"".concat('FA "6.1.1"'," ").concat(e," begins"),"".concat('FA "6.1.1"'," ").concat(e," ends"))}(e)}},rm=function(){};function am(e){return"string"==typeof(e.getAttribute?e.getAttribute("data-fa-i2svg"):null)}function om(e){return Nd.createElementNS("http://www.w3.org/2000/svg",e)}function im(e){return Nd.createElement(e)}function lm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.ceFn,r=void 0===n?"svg"===e.tag?om:im:n;if("string"==typeof e)return Nd.createTextNode(e);var a=r(e.tag);Object.keys(e.attributes||[]).forEach(function(t){a.setAttribute(t,e.attributes[t])});var o=e.children||[];return o.forEach(function(e){a.appendChild(lm(e,{ceFn:r}))}),a}var sm={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(lm(e),t)}),null===t.getAttribute("data-fa-i2svg")&&Wd.keepOriginalSource){var n=Nd.createComment(function(e){var t=" ".concat(e.outerHTML," ");return"".concat(t,"Font Awesome fontawesome.com ")}(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){var t=e[0],n=e[1];if(~Kd(t).indexOf(Wd.replacementClass))return sm.replace(e);var r=new RegExp("".concat(Wd.familyPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var a=n[0].attributes.class.split(" ").reduce(function(e,t){return t===Wd.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" "),0===a.toNode.length?t.removeAttribute("class"):t.setAttribute("class",a.toNode.join(" "))}var o=n.map(function(e){return cp(e)}).join("\n");t.setAttribute("data-fa-i2svg",""),t.innerHTML=o}};function cm(e){e()}function um(e,t){var n="function"==typeof t?t:rm;if(0===e.length)n();else{var r=cm;"async"===Wd.mutateApproach&&(r=wd.requestAnimationFrame||cm),r(function(){var t=!0===Wd.autoReplaceSvg?sm.replace:sm[Wd.autoReplaceSvg]||sm.replace,r=nm("mutate");e.map(t),r(),n()})}}var fm=!1;function dm(){fm=!0}function pm(){fm=!1}var mm=null;function hm(e){if(Rd&&Wd.observeMutations){var t=e.treeCallback,n=void 0===t?rm:t,r=e.nodeCallback,a=void 0===r?rm:r,o=e.pseudoElementsCallback,i=void 0===o?rm:o,l=e.observeMutationsRoot,s=void 0===l?Nd:l;mm=new Rd(function(e){if(!fm){var t=Ap();qd(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!am(e.addedNodes[0])&&(Wd.searchPseudoElements&&i(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&Wd.searchPseudoElements&&i(e.target.parentNode),"attributes"===e.type&&am(e.target)&&~zd.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute("data-prefix"):null,n=e.getAttribute?e.getAttribute("data-icon"):null;return t&&n}(e.target)){var r=Lp(Kd(e.target)),o=r.iconName;e.target.setAttribute("data-prefix",r.prefix||t),o&&e.target.setAttribute("data-icon",o)}else(function(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(Wd.replacementClass)})(e.target)&&a(e.target)})}}),Cd&&mm.observe(s,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function gm(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(e,t){var n=t.split(":"),r=n[0],a=n.slice(1);return r&&a.length>0&&(e[r]=a.join(":").trim()),e},{})),n}function ym(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=void 0!==e.innerText?e.innerText.trim():"",a=Lp(Kd(e));return a.prefix||(a.prefix=Ap()),t&&n&&(a.prefix=t,a.iconName=n),a.iconName&&a.prefix||a.prefix&&r.length>0&&(a.iconName=(Ep[a.prefix]||{})[e.innerText]||Cp(a.prefix,dp(e.innerText))),a}function vm(e){var t=qd(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return Wd.autoA11y&&(n?t["aria-labelledby"]="".concat(Wd.replacementClass,"-title-").concat(r||Xd()):(t["aria-hidden"]="true",t.focusable="false")),t}function bm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=ym(e),r=n.iconName,a=n.prefix,o=n.rest,i=vm(e),l=jp("parseNodeAttributes",{},e),s=t.styleParser?gm(e):[];return cd({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:a,transform:$d,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:s,attributes:i}},l)}var Em=op.styles;function Tm(e){var t="nest"===Wd.autoReplaceSvg?bm(e,{styleParser:!1}):bm(e);return~t.extra.classes.indexOf("fa-layers-text")?zp("generateLayersText",e,t):zp("generateSvgReplacementMutation",e,t)}function Sm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Cd)return Promise.resolve();var n=Nd.documentElement.classList,r=function(e){return n.add("".concat("fontawesome-i2svg","-").concat(e))},a=function(e){return n.remove("".concat("fontawesome-i2svg","-").concat(e))},o=Object.keys(Wd.autoFetchSvg?Id:Em),i=[".".concat("fa-layers-text",":not([").concat("data-fa-i2svg","])")].concat(o.map(function(e){return".".concat(e,":not([").concat("data-fa-i2svg","])")})).join(", ");if(0===i.length)return Promise.resolve();var l=[];try{l=qd(e.querySelectorAll(i))}catch(e){}if(!(l.length>0))return Promise.resolve();r("pending"),a("complete");var s=nm("onTree"),c=l.reduce(function(e,t){try{var n=Tm(t);n&&e.push(n)}catch(e){Ad||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){um(n,function(){r("active"),r("complete"),a("pending"),"function"==typeof t&&t(),s(),e()})}).catch(function(e){s(),n(e)})})}function wm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Tm(e).then(function(e){e&&um([e],t)})}var Nm=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?$d:n,a=t.symbol,o=void 0!==a&&a,i=t.mask,l=void 0===i?null:i,s=t.maskId,c=void 0===s?null:s,u=t.title,f=void 0===u?null:u,d=t.titleId,p=void 0===d?null:d,m=t.classes,h=void 0===m?[]:m,g=t.attributes,y=void 0===g?{}:g,v=t.styles,b=void 0===v?{}:v;if(e){var E=e.prefix,T=e.iconName,S=e.icon;return Yp(cd({type:"icon"},e),function(){return Fp("beforeDOMElementCreation",{iconDefinition:e,params:t}),Wd.autoA11y&&(f?y["aria-labelledby"]="".concat(Wd.replacementClass,"-title-").concat(p||Xd()):(y["aria-hidden"]="true",y.focusable="false")),$p({icons:{main:Jp(S),mask:l?Jp(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:E,iconName:T,transform:cd(cd({},$d),r),symbol:o,title:f,maskId:c,titleId:p,extra:{attributes:y,styles:b,classes:h}})})}},Rm={mixout:function(){return{icon:(e=Nm,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(t||{}).icon?t:Bp(t||{}),a=n.mask;return a&&(a=(a||{}).icon?a:Bp(a||{})),e(r,cd(cd({},n),{},{mask:a}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=Sm,e.nodeCallback=wm,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=e.callback;return Sm(void 0===t?Nd:t,void 0===n?function(){}:n)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,r=t.title,a=t.titleId,o=t.prefix,i=t.transform,l=t.symbol,s=t.mask,c=t.maskId,u=t.extra;return new Promise(function(t,f){Promise.all([Zp(n,o),s.iconName?Zp(s.iconName,s.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(s){var f=dd(s,2);t([e,$p({icons:{main:f[0],mask:f[1]},prefix:o,iconName:n,transform:i,symbol:l,maskId:c,title:r,titleId:a,extra:u,watchable:!0})])}).catch(f)})},e.generateAbstractIcon=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.transform,i=Qd(e.styles);return i.length>0&&(r.style=i),Zd(o)&&(t=zp("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),n.push(t||a.icon),{children:n,attributes:r}}}},Om={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,r=void 0===n?[]:n;return Yp({type:"layer"},function(){Fp("beforeDOMElementCreation",{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(Wd.familyPrefix,"-layers")].concat(pd(r)).join(" ")},children:n}]})}}}},Cm={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.title,r=void 0===n?null:n,a=t.classes,o=void 0===a?[]:a,i=t.attributes,l=void 0===i?{}:i,s=t.styles,c=void 0===s?{}:s;return Yp({type:"counter",content:e},function(){return Fp("beforeDOMElementCreation",{content:e,params:t}),qp({content:e.toString(),title:r,extra:{attributes:l,styles:c,classes:["".concat(Wd.familyPrefix,"-layers-counter")].concat(pd(o))}})})}}}},xm={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?$d:n,a=t.title,o=void 0===a?null:a,i=t.classes,l=void 0===i?[]:i,s=t.attributes,c=void 0===s?{}:s,u=t.styles,f=void 0===u?{}:u;return Yp({type:"text",content:e},function(){return Fp("beforeDOMElementCreation",{content:e,params:t}),Xp({content:e,transform:cd(cd({},$d),r),title:o,extra:{attributes:c,styles:f,classes:["".concat(Wd.familyPrefix,"-layers-text")].concat(pd(l))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.title,r=t.transform,a=t.extra,o=null,i=null;if(xd){var l=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();o=s.width/l,i=s.height/l}return Wd.autoA11y&&!n&&(a.attributes["aria-hidden"]="true"),Promise.resolve([e,Xp({content:e.innerHTML,width:o,height:i,transform:r,title:n,extra:a,watchable:!0})])}}},km=new RegExp('"',"ug"),Am=[1105920,1112319];function Im(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(r,a){if(null!==e.getAttribute(n))return r();var o,i,l,s=qd(e.children).filter(function(e){return e.getAttribute("data-fa-pseudo-element")===t})[0],c=wd.getComputedStyle(e,t),u=c.getPropertyValue("font-family").match(Dd),f=c.getPropertyValue("font-weight"),d=c.getPropertyValue("content");if(s&&!u)return e.removeChild(s),r();if(u&&"none"!==d&&""!==d){var p=c.getPropertyValue("content"),m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(u[2])?Ld[u[2].toLowerCase()]:Ud[f],h=function(e){var t,n,r,a,o=e.replace(km,""),i=(r=(t=o).length,(a=t.charCodeAt(0))>=55296&&a<=56319&&r>1&&(n=t.charCodeAt(1))>=56320&&n<=57343?1024*(a-55296)+n-56320+65536:a),l=i>=Am[0]&&i<=Am[1],s=2===o.length&&o[0]===o[1];return{value:dp(s?o[0]:o),isSecondary:l||s}}(p),g=h.value,y=h.isSecondary,v=u[0].startsWith("FontAwesome"),b=Cp(m,g),E=b;if(v){var T=(i=Sp[o=g],l=Cp("fas",o),i||(l?{prefix:"fas",iconName:l}:null)||{prefix:null,iconName:null});T.iconName&&T.prefix&&(b=T.iconName,m=T.prefix)}if(!b||y||s&&s.getAttribute("data-prefix")===m&&s.getAttribute("data-icon")===E)r();else{e.setAttribute(n,E),s&&e.removeChild(s);var S={iconName:null,title:null,titleId:null,prefix:null,transform:$d,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},w=S.extra;w.attributes["data-fa-pseudo-element"]=t,Zp(b,m).then(function(a){var o=$p(cd(cd({},S),{},{icons:{main:a,mask:{prefix:null,iconName:null,rest:[]}},prefix:m,iconName:E,extra:w,watchable:!0})),i=Nd.createElement("svg");"::before"===t?e.insertBefore(i,e.firstChild):e.appendChild(i),i.outerHTML=o.map(function(e){return cp(e)}).join("\n"),e.removeAttribute(n),r()}).catch(a)}}else r()})}function Lm(e){return Promise.all([Im(e,"::before"),Im(e,"::after")])}function _m(e){return!(e.parentNode===document.head||~kd.indexOf(e.tagName.toUpperCase())||e.getAttribute("data-fa-pseudo-element")||e.parentNode&&"svg"===e.parentNode.tagName)}function Pm(e){if(Cd)return new Promise(function(t,n){var r=qd(e.querySelectorAll("*")).filter(_m).map(Lm),a=nm("searchPseudoElements");dm(),Promise.all(r).then(function(){a(),pm(),t()}).catch(function(){a(),pm(),n()})})}var Mm=!1,Dm=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],a=n.slice(1).join("-");if(r&&"h"===a)return e.flipX=!0,e;if(r&&"v"===a)return e.flipY=!0,e;if(a=parseFloat(a),isNaN(a))return e;switch(r){case"grow":e.size=e.size+a;break;case"shrink":e.size=e.size-a;break;case"left":e.x=e.x-a;break;case"right":e.x=e.x+a;break;case"up":e.y=e.y-a;break;case"down":e.y=e.y+a;break;case"rotate":e.rotate=e.rotate+a}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},Um={x:0,y:0,width:"100%",height:"100%"};function jm(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}!function(e,t){var n=Wp;Pp=e,Mp={},Object.keys(Dp).forEach(function(e){-1===Up.indexOf(e)&&delete Dp[e]}),Pp.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(n[e]=t[e]),"object"===ud(t[e])&&Object.keys(t[e]).forEach(function(r){n[e]||(n[e]={}),n[e][r]=t[e][r]})}),e.hooks){var r=e.hooks();Object.keys(r).forEach(function(e){Mp[e]||(Mp[e]=[]),Mp[e].push(r[e])})}e.provides&&e.provides(Dp)})}([rp,Rm,Om,Cm,xm,{hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=Pm,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node;Wd.searchPseudoElements&&Pm(void 0===t?Nd:t)}}},{mixout:function(){return{dom:{unwatch:function(){dm(),Mm=!0}}}},hooks:function(){return{bootstrap:function(){hm(jp("mutationObserverCallbacks",{}))},noAuto:function(){mm&&mm.disconnect()},watch:function(e){var t=e.observeMutationsRoot;Mm?pm():hm(jp("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},{mixout:function(){return{parse:{transform:function(e){return Dm(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=Dm(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,r=e.iconWidth,a={transform:"translate(".concat(e.containerWidth/2," 256)")},o="translate(".concat(32*n.x,", ").concat(32*n.y,") "),i="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),s={outer:a,inner:{transform:"".concat(o," ").concat(i," ").concat(l)},path:{transform:"translate(".concat(r/2*-1," -256)")}};return{tag:"g",attributes:cd({},s.outer),children:[{tag:"g",attributes:cd({},s.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:cd(cd({},t.icon.attributes),s.path)}]}]}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),r=n?Lp(n.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=Ap()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.mask,i=e.maskId,l=a.icon,s=o.icon,c=function(e){var t=e.transform,n=e.iconWidth,r={transform:"translate(".concat(e.containerWidth/2," 256)")},a="translate(".concat(32*t.x,", ").concat(32*t.y,") "),o="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),i="rotate(".concat(t.rotate," 0 0)");return{outer:r,inner:{transform:"".concat(a," ").concat(o," ").concat(i)},path:{transform:"translate(".concat(n/2*-1," -256)")}}}({transform:e.transform,containerWidth:o.width,iconWidth:a.width}),u={tag:"rect",attributes:cd(cd({},Um),{},{fill:"white"})},f=l.children?{children:l.children.map(jm)}:{},d={tag:"g",attributes:cd({},c.inner),children:[jm(cd({tag:l.tag,attributes:cd(cd({},l.attributes),c.path)},f))]},p={tag:"g",attributes:cd({},c.outer),children:[d]},m="mask-".concat(i||Xd()),h="clip-".concat(i||Xd()),g={tag:"mask",attributes:cd(cd({},Um),{},{id:m,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[u,p]},y={tag:"defs",children:[{tag:"clipPath",attributes:{id:h},children:(t=s,"g"===t.tag?t.children:[t])},g]};return n.push(y,{tag:"rect",attributes:cd({fill:"currentColor","clip-path":"url(#".concat(h,")"),mask:"url(#".concat(m,")")},Um)}),{children:n,attributes:r}}}},{provides:function(e){var t=!1;wd.matchMedia&&(t=wd.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:cd(cd({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=cd(cd({},r),{},{attributeName:"opacity"}),o={tag:"circle",attributes:cd(cd({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:cd(cd({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:cd(cd({},a),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:cd(cd({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:cd(cd({},a),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:cd(cd({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:cd(cd({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}},{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol");return e.symbol=null!==n&&(""===n||n),e}}}}]);var Fm,zm=Wp.parse,Bm=Wp.icon,Hm=n(function(e,t){!function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case c:case u:case a:case i:case o:case d:return p;default:var g=p&&p.$$typeof;switch(g){case s:case f:case h:case m:case l:return g;default:return t}}case r:return t}}}var T=u,S=s,w=l,N=n,R=f,O=a,C=h,x=m,k=r,A=i,I=o,L=d,_=!1;function P(e){return E(e)===u}t.AsyncMode=c,t.ConcurrentMode=T,t.ContextConsumer=S,t.ContextProvider=w,t.Element=N,t.ForwardRef=R,t.Fragment=O,t.Lazy=C,t.Memo=x,t.Portal=k,t.Profiler=A,t.StrictMode=I,t.Suspense=L,t.isAsyncMode=function(e){return _||(_=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||E(e)===c},t.isConcurrentMode=P,t.isContextConsumer=function(e){return E(e)===s},t.isContextProvider=function(e){return E(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return E(e)===f},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===h},t.isMemo=function(e){return E(e)===m},t.isPortal=function(e){return E(e)===r},t.isProfiler=function(e){return E(e)===i},t.isStrictMode=function(e){return E(e)===o},t.isSuspense=function(e){return E(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===u||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===l||e.$$typeof===s||e.$$typeof===f||e.$$typeof===y||e.$$typeof===v||e.$$typeof===b||e.$$typeof===g)},t.typeOf=E}()}),Vm=n(function(e){e.exports=Hm}),Wm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Gm=Function.call.bind(Object.prototype.hasOwnProperty),Ym={},$m=Gm;function Xm(e,t,n,r,a){for(var o in e)if($m(e,o)){var i;try{if("function"!=typeof e[o]){var l=Error((r||"React class")+": "+n+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}i=e[o](t,o,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){i=e}if(!i||i instanceof Error||Fm((r||"React class")+": type specification of "+n+" `"+o+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in Ym)){Ym[i.message]=!0;var s=a?a():"";Fm("Failed "+n+" type: "+i.message+(null!=s?s:""))}}}Fm=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},Xm.resetWarningCache=function(){Ym={}};var qm,Km=Xm;function Jm(){return null}qm=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}};var Qm=n(function(e){e.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r="<<anonymous>>",a={array:c("array"),bigint:c("bigint"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:s(Jm),arrayOf:function(e){return s(function(t,n,r,a,o){if("function"!=typeof e)return new i("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var l=t[n];if(!Array.isArray(l))return new i("Invalid "+a+" `"+o+"` of type `"+d(l)+"` supplied to `"+r+"`, expected an array.");for(var s=0;s<l.length;s++){var c=e(l,s,r,a,o+"["+s+"]",Wm);if(c instanceof Error)return c}return null})},element:s(function(t,n,r,a,o){var l=t[n];return e(l)?null:new i("Invalid "+a+" `"+o+"` of type `"+d(l)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:s(function(e,t,n,r,a){var o=e[t];return Vm.isValidElementType(o)?null:new i("Invalid "+r+" `"+a+"` of type `"+d(o)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return s(function(t,n,a,o,l){return t[n]instanceof e?null:new i("Invalid "+o+" `"+l+"` of type `"+((s=t[n]).constructor&&s.constructor.name?s.constructor.name:r)+"` supplied to `"+a+"`, expected instance of `"+(e.name||r)+"`.");var s})},node:s(function(e,t,n,r,a){return f(e[t])?null:new i("Invalid "+r+" `"+a+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return s(function(t,n,r,a,o){if("function"!=typeof e)return new i("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],s=d(l);if("object"!==s)return new i("Invalid "+a+" `"+o+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var c in l)if(Gm(l,c)){var u=e(l,c,r,a,o+"."+c,Wm);if(u instanceof Error)return u}return null})},oneOf:function(e){if(!Array.isArray(e))return qm(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),Jm;function t(t,n,r,a,l){for(var s=t[n],c=0;c<e.length;c++)if(o(s,e[c]))return null;var u=JSON.stringify(e,function(e,t){return"symbol"===p(t)?String(t):t});return new i("Invalid "+a+" `"+l+"` of value `"+String(s)+"` supplied to `"+r+"`, expected one of "+u+".")}return s(t)},oneOfType:function(e){if(!Array.isArray(e))return qm("Invalid argument supplied to oneOfType, expected an instance of array."),Jm;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return qm("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+m(n)+" at index "+t+"."),Jm}return s(function(t,n,r,a,o){for(var l=[],s=0;s<e.length;s++){var c=(0,e[s])(t,n,r,a,o,Wm);if(null==c)return null;c.data&&Gm(c.data,"expectedType")&&l.push(c.data.expectedType)}return new i("Invalid "+a+" `"+o+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return s(function(t,n,r,a,o){var l=t[n],s=d(l);if("object"!==s)return new i("Invalid "+a+" `"+o+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var f=e[c];if("function"!=typeof f)return u(r,a,o,c,p(f));var m=f(l,c,r,a,o+"."+c,Wm);if(m)return m}return null})},exact:function(e){return s(function(t,n,r,a,o){var s=t[n],c=d(s);if("object"!==c)return new i("Invalid "+a+" `"+o+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var f=l({},t[n],e);for(var m in f){var h=e[m];if(Gm(e,m)&&"function"!=typeof h)return u(r,a,o,m,p(h));if(!h)return new i("Invalid "+a+" `"+o+"` key `"+m+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=h(s,m,r,a,o+"."+m,Wm);if(g)return g}return null})}};function o(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function i(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function s(e){function t(t,n,a,o,l,s,c){if(o=o||r,s=s||a,c!==Wm){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}return null==n[a]?t?new i(null===n[a]?"The "+l+" `"+s+"` is marked as required in `"+o+"`, but its value is `null`.":"The "+l+" `"+s+"` is marked as required in `"+o+"`, but its value is `undefined`."):null:e(n,a,o,l,s)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function c(e){return s(function(t,n,r,a,o,l){var s=t[n];return d(s)!==e?new i("Invalid "+a+" `"+o+"` of type `"+p(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function u(e,t,n,r,a){return new i((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function f(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(f);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var a,o=r.call(t);if(r!==t.entries){for(;!(a=o.next()).done;)if(!f(a.value))return!1}else for(;!(a=o.next()).done;){var i=a.value;if(i&&!f(i[1]))return!1}return!0;default:return!1}}function d(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function p(e){if(null==e)return""+e;var t=d(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function m(e){var t=p(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return i.prototype=Error.prototype,a.checkPropTypes=Km,a.resetWarningCache=Km.resetWarningCache,a.PropTypes=a,a}(Vm.isElement)});function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zm(Object(n),!0).forEach(function(t){nh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function th(e){return(th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rh(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ah(e){return function(e){if(Array.isArray(e))return oh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return oh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oh(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ih(e){return t=e,(t-=0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})).substr(0,1).toLowerCase()+e.substr(1);var t}var lh=["style"];function sh(e){return e.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n,r=t.indexOf(":"),a=ih(t.slice(0,r)),o=t.slice(r+1).trim();return a.startsWith("webkit")?e[(n=a,n.charAt(0).toUpperCase()+n.slice(1))]=o:e[a]=o,e},{})}var ch=!1;try{ch=!1}catch(pa){}function uh(e){return e&&"object"===th(e)&&e.prefix&&e.iconName&&e.icon?e:zm.icon?zm.icon(e):null===e?null:e&&"object"===th(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function fh(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?nh({},e,t):{}}var dh=["forwardedRef"];function ph(e){var t=e.forwardedRef,n=rh(e,dh),r=n.mask,a=n.symbol,o=n.className,i=n.title,l=n.titleId,s=n.maskId,c=uh(n.icon),u=fh("classes",[].concat(ah(function(e){var t,n=e.flip,r=e.size,a=e.rotation,o=e.pull,i=(nh(t={"fa-beat":e.beat,"fa-fade":e.fade,"fa-beat-fade":e.beatFade,"fa-bounce":e.bounce,"fa-shake":e.shake,"fa-flash":e.flash,"fa-spin":e.spin,"fa-spin-reverse":e.spinReverse,"fa-spin-pulse":e.spinPulse,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-inverse":e.inverse,"fa-border":e.border,"fa-li":e.listItem,"fa-flip-horizontal":"horizontal"===n||"both"===n,"fa-flip-vertical":"vertical"===n||"both"===n},"fa-".concat(r),null!=r),nh(t,"fa-rotate-".concat(a),null!=a&&0!==a),nh(t,"fa-pull-".concat(o),null!=o),nh(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(i).map(function(e){return i[e]?e:null}).filter(function(e){return e})}(n)),ah(o.split(" ")))),f=fh("transform","string"==typeof n.transform?zm.transform(n.transform):n.transform),d=fh("mask",uh(r)),p=Bm(c,eh(eh(eh(eh({},u),f),d),{},{symbol:a,title:i,titleId:l,maskId:s}));if(!p)return function(){var e;!ch&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",c),null;var m=p.abstract,h={ref:t};return Object.keys(n).forEach(function(e){ph.defaultProps.hasOwnProperty(e)||(h[e]=n[e])}),mh(m[0],h)}ph.displayName="FontAwesomeIcon",ph.propTypes={beat:Qm.bool,border:Qm.bool,bounce:Qm.bool,className:Qm.string,fade:Qm.bool,flash:Qm.bool,mask:Qm.oneOfType([Qm.object,Qm.array,Qm.string]),maskId:Qm.string,fixedWidth:Qm.bool,inverse:Qm.bool,flip:Qm.oneOf(["horizontal","vertical","both"]),icon:Qm.oneOfType([Qm.object,Qm.array,Qm.string]),listItem:Qm.bool,pull:Qm.oneOf(["right","left"]),pulse:Qm.bool,rotation:Qm.oneOf([0,90,180,270]),shake:Qm.bool,size:Qm.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:Qm.bool,spinPulse:Qm.bool,spinReverse:Qm.bool,symbol:Qm.oneOfType([Qm.bool,Qm.string]),title:Qm.string,titleId:Qm.string,transform:Qm.oneOfType([Qm.string,Qm.object]),swapOpacity:Qm.bool},ph.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var mh=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var a=(n.children||[]).map(function(n){return e(t,n)}),o=Object.keys(n.attributes||{}).reduce(function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=sh(r);break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[ih(t)]=r}return e},{attrs:{}}),i=r.style,l=void 0===i?{}:i,s=rh(r,lh);return o.attrs.style=eh(eh({},o.attrs.style),l),t.apply(void 0,[n.tag,eh(eh({},o.attrs),s)].concat(ah(a)))}.bind(null,c.createElement),hh={prefix:"fas",iconName:"align-left",icon:[448,512,[],"f036","M256 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H256C273.7 32 288 46.33 288 64C288 81.67 273.7 96 256 96zM256 352H32C14.33 352 0 337.7 0 320C0 302.3 14.33 288 32 288H256C273.7 288 288 302.3 288 320C288 337.7 273.7 352 256 352zM0 192C0 174.3 14.33 160 32 160H416C433.7 160 448 174.3 448 192C448 209.7 433.7 224 416 224H32C14.33 224 0 209.7 0 192zM416 480H32C14.33 480 0 465.7 0 448C0 430.3 14.33 416 32 416H416C433.7 416 448 430.3 448 448C448 465.7 433.7 480 416 480z"]},gh={prefix:"fas",iconName:"angle-down",icon:[384,512,[8964],"f107","M192 384c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L192 306.8l137.4-137.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-160 160C208.4 380.9 200.2 384 192 384z"]},yh={prefix:"fas",iconName:"bug",icon:[512,512,[],"f188","M352 96V99.56C352 115.3 339.3 128 323.6 128H188.4C172.7 128 159.1 115.3 159.1 99.56V96C159.1 42.98 202.1 0 255.1 0C309 0 352 42.98 352 96zM41.37 105.4C53.87 92.88 74.13 92.88 86.63 105.4L150.6 169.4C151.3 170 151.9 170.7 152.5 171.4C166.8 164.1 182.9 160 199.1 160H312C329.1 160 345.2 164.1 359.5 171.4C360.1 170.7 360.7 170 361.4 169.4L425.4 105.4C437.9 92.88 458.1 92.88 470.6 105.4C483.1 117.9 483.1 138.1 470.6 150.6L406.6 214.6C405.1 215.3 405.3 215.9 404.6 216.5C410.7 228.5 414.6 241.9 415.7 256H480C497.7 256 512 270.3 512 288C512 305.7 497.7 320 480 320H416C416 344.6 410.5 367.8 400.6 388.6C402.7 389.9 404.8 391.5 406.6 393.4L470.6 457.4C483.1 469.9 483.1 490.1 470.6 502.6C458.1 515.1 437.9 515.1 425.4 502.6L362.3 439.6C337.8 461.4 306.5 475.8 272 479.2V240C272 231.2 264.8 224 255.1 224C247.2 224 239.1 231.2 239.1 240V479.2C205.5 475.8 174.2 461.4 149.7 439.6L86.63 502.6C74.13 515.1 53.87 515.1 41.37 502.6C28.88 490.1 28.88 469.9 41.37 457.4L105.4 393.4C107.2 391.5 109.3 389.9 111.4 388.6C101.5 367.8 96 344.6 96 320H32C14.33 320 0 305.7 0 288C0 270.3 14.33 256 32 256H96.3C97.38 241.9 101.3 228.5 107.4 216.5C106.7 215.9 106 215.3 105.4 214.6L41.37 150.6C28.88 138.1 28.88 117.9 41.37 105.4H41.37z"]},vh={prefix:"fas",iconName:"circle-half-stroke",icon:[512,512,[9680,"adjust"],"f042","M512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 64V448C362 448 448 362 448 256C448 149.1 362 64 256 64z"]},bh={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M128 32H32C14.31 32 0 46.31 0 64v96c0 17.69 14.31 32 32 32s32-14.31 32-32V96h64c17.69 0 32-14.31 32-32S145.7 32 128 32zM416 32h-96c-17.69 0-32 14.31-32 32s14.31 32 32 32h64v64c0 17.69 14.31 32 32 32s32-14.31 32-32V64C448 46.31 433.7 32 416 32zM128 416H64v-64c0-17.69-14.31-32-32-32s-32 14.31-32 32v96c0 17.69 14.31 32 32 32h96c17.69 0 32-14.31 32-32S145.7 416 128 416zM416 320c-17.69 0-32 14.31-32 32v64h-64c-17.69 0-32 14.31-32 32s14.31 32 32 32h96c17.69 0 32-14.31 32-32v-96C448 334.3 433.7 320 416 320z"]},Eh={prefix:"fas",iconName:"gear",icon:[512,512,[9881,"cog"],"f013","M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"]},Th={prefix:"fas",iconName:"moon",icon:[512,512,[127769,9214],"f186","M32 256c0-123.8 100.3-224 223.8-224c11.36 0 29.7 1.668 40.9 3.746c9.616 1.777 11.75 14.63 3.279 19.44C245 86.5 211.2 144.6 211.2 207.8c0 109.7 99.71 193 208.3 172.3c9.561-1.805 16.28 9.324 10.11 16.95C387.9 448.6 324.8 480 255.8 480C132.1 480 32 379.6 32 256z"]},Sh={prefix:"fas",iconName:"share",icon:[512,512,["arrow-turn-right","mail-forward"],"f064","M503.7 226.2l-176 151.1c-15.38 13.3-39.69 2.545-39.69-18.16V272.1C132.9 274.3 66.06 312.8 111.4 457.8c5.031 16.09-14.41 28.56-28.06 18.62C39.59 444.6 0 383.8 0 322.3c0-152.2 127.4-184.4 288-186.3V56.02c0-20.67 24.28-31.46 39.69-18.16l176 151.1C514.8 199.4 514.8 216.6 503.7 226.2z"]},wh={prefix:"fas",iconName:"shield-halved",icon:[512,512,["shield-alt"],"f3ed","M256-.0078C260.7-.0081 265.2 1.008 269.4 2.913L457.7 82.79C479.7 92.12 496.2 113.8 496 139.1C495.5 239.2 454.7 420.7 282.4 503.2C265.7 511.1 246.3 511.1 229.6 503.2C57.25 420.7 16.49 239.2 15.1 139.1C15.87 113.8 32.32 92.12 54.3 82.79L242.7 2.913C246.8 1.008 251.4-.0081 256-.0078V-.0078zM256 444.8C393.1 378 431.1 230.1 432 141.4L256 66.77L256 444.8z"]},Nh={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M256 159.1c-53.02 0-95.1 42.98-95.1 95.1S202.1 351.1 256 351.1s95.1-42.98 95.1-95.1S309 159.1 256 159.1zM509.3 347L446.1 255.1l63.15-91.01c6.332-9.125 1.104-21.74-9.826-23.72l-109-19.7l-19.7-109c-1.975-10.93-14.59-16.16-23.72-9.824L256 65.89L164.1 2.736c-9.125-6.332-21.74-1.107-23.72 9.824L121.6 121.6L12.56 141.3C1.633 143.2-3.596 155.9 2.736 164.1L65.89 256l-63.15 91.01c-6.332 9.125-1.105 21.74 9.824 23.72l109 19.7l19.7 109c1.975 10.93 14.59 16.16 23.72 9.824L256 446.1l91.01 63.15c9.127 6.334 21.75 1.107 23.72-9.822l19.7-109l109-19.7C510.4 368.8 515.6 356.1 509.3 347zM256 383.1c-70.69 0-127.1-57.31-127.1-127.1c0-70.69 57.31-127.1 127.1-127.1s127.1 57.3 127.1 127.1C383.1 326.7 326.7 383.1 256 383.1z"]},Rh={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M384 320c-17.67 0-32 14.33-32 32v96H64V160h96c17.67 0 32-14.32 32-32s-14.33-32-32-32L64 96c-35.35 0-64 28.65-64 64V448c0 35.34 28.65 64 64 64h288c35.35 0 64-28.66 64-64v-96C416 334.3 401.7 320 384 320zM488 0H352c-12.94 0-24.62 7.797-29.56 19.75c-4.969 11.97-2.219 25.72 6.938 34.88L370.8 96L169.4 297.4c-12.5 12.5-12.5 32.75 0 45.25C175.6 348.9 183.8 352 192 352s16.38-3.125 22.62-9.375L416 141.3l41.38 41.38c9.156 9.141 22.88 11.84 34.88 6.938C504.2 184.6 512 172.9 512 160V24C512 10.74 501.3 0 488 0z"]};function Oh(e){var t=e.url,n=e.openText;return c.createElement("div",null,c.createElement("p",{className:"text-sm mb-1"},e.helpText),c.createElement("div",{className:"flex gap-3"},c.createElement("a",{href:t,target:"_blank",className:"underline ~text-violet-500 hover:~text-violet-600"},c.createElement(ph,{icon:Rh,className:"opacity-50 text-xs mr-1"}),n),c.createElement(zo,{alwaysVisible:!0,direction:"left",value:t})))}function Ch(e){var t=[];return e.includes("stackTrace")&&t.push("stackTraceTab"),e.includes("context")&&t.push("requestTab","appTab","userTab","contextTab"),e.includes("debug")&&t.push("debugTab"),t}function xh(e,t){return t.includes("stackTrace")||(e.stacktrace=e.stacktrace.slice(0,1)),t.includes("debug")||(e.glows=[],e.context.dumps=[],e.context.queries=[],e.context.logs=[]),t.includes("context")||(e.context.request_data={queryString:{},body:{},files:[]},e.context.headers={},e.context.cookies={},e.context.session={},e.context.route=null,e.context.user=null,delete e.context.git,delete e.context.livewire,e.context.view=null),e}function kh(t){var n=t.isOpen,r=c.useContext(ld),a=c.useState(null),o=a[0],i=a[1],l=c.useState(null),s=l[0],u=l[1],f=c.useState(!1),d=f[0],p=f[1],m=c.useState([{name:"stackTrace",label:"Stack",selected:!0},{name:"context",label:"Context",selected:!0},{name:"debug",label:"Debug",selected:!0}]),h=m[0],g=m[1];return c.createElement("div",{className:"block absolute mt-2 top-10 right-1/2 transform translate-x-8 transition-all duration-150 origin-top-right\n "+(n?"":"opacity-0 pointer-events-none scale-90")},c.createElement("div",{className:"flex px-4 justify-end"},c.createElement("div",{className:"w-0 h-0 border-[10px] border-t-0 border-transparent ~border-b-dropdown"})),c.createElement("div",{className:"flex flex-col gap-6 ~bg-dropdown px-10 py-8 shadow-2xl"},c.createElement("div",{className:"flex items-center justify-between gap-6"},c.createElement("h4",{className:"whitespace-nowrap font-semibold"},"Share with Flare"),c.createElement("a",{className:"text-xs ~text-gray-500 hover:text-violet-500 flex items-center underline transition-colors",href:"https://flareapp.io/docs/ignition/introducing-ignition/sharing-errors?utm_campaign=ignition&utm_source=ignition",target:"_blank"},"Docs",c.createElement(ad,null))),!o&&c.createElement(c.Fragment,null,c.createElement("ul",{className:"grid justify-start gap-3"},h.map(function(t){var n=t.name;return c.createElement("li",{key:n},c.createElement(id,{onChange:function(){return t=n,void(h.find(function(e){return e.name===t})&&g(h.map(function(n){return n.name===t?e({},n,{selected:!n.selected}):n})));var t},checked:t.selected,label:t.label}))})),c.createElement("div",{className:"flex items-center gap-4"},c.createElement(Uc,{disabled:d||!h.some(function(e){return e.selected}),className:"bg-violet-500 border-violet-500/25 CopyButton text-white",onClick:function(){try{var e=function(){p(!1)};if(!r.config.shareEndpoint)return Promise.resolve();u(null),p(!0);var t=h.filter(function(e){return e.selected}).map(function(e){return e.name}),n=function(e,n){try{var a=Promise.resolve(function(e,t){var n={tabs:Ch(t),lineSelection:window.location.hash,report:xh(e.shareableReport,t)};return new Promise(function(t,r){try{var a=function(){r()},o=function(r,a){try{var o=Promise.resolve(fetch(e.config.shareEndpoint,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json",Accept:"application/json"}})).then(function(e){return Promise.resolve(e.json()).then(function(e){e&&e.owner_url&&e.public_url&&t(e)})})}catch(e){return a(e)}return o&&o.then?o.then(void 0,a):o}(0,function(e){r(e)});return Promise.resolve(o&&o.then?o.then(a):a())}catch(e){return Promise.reject(e)}})}(r,t)).then(function(e){window.open(e.owner_url),i(e.public_url)})}catch(e){return n(e)}return a&&a.then?a.then(void 0,n):a}(0,function(e){console.error(e),u("Something went wrong while sharing, please try again.")});return Promise.resolve(n&&n.then?n.then(e):e())}catch(e){return Promise.reject(e)}}},c.createElement(ph,{icon:Rh,className:"opacity-50 text-xs mr-1"}),"Create Share"))),o&&c.createElement("div",{className:"grid grid-cols-1 gap-4"},c.createElement(Oh,{url:o,helpText:"Share your error with others",openText:"Visit public share"})),s&&c.createElement("p",{className:"text-red-500"},s)))}function Ah(t){var n,r=t.isOpen,a=c.useContext(ld),o=c.useContext(Te),i=o.ignitionConfig,l=o.setIgnitionConfig,s=c.useState(i.editor||""),u=s[0],f=s[1],d=c.useState(null),p=d[0],m=d[1],h=c.useState(!1),g=h[0],y=h[1],v=c.useState(!1),b=v[0],E=v[1],T=c.useState([{value:"light",icon:c.createElement(ph,{icon:Nh,className:"group-hover:text-amber-400"}),selected:"light"===i.theme},{value:"dark",icon:c.createElement(ph,{icon:Th,className:"group-hover:text-amber-300"}),selected:"dark"===i.theme},{value:"auto",icon:c.createElement(ph,{icon:vh,className:"group-hover:text-indigo-500"}),selected:"auto"===i.theme}]),S=T[0],w=T[1];return c.createElement("div",{className:"\n absolute mt-2 top-10 right-1/2 translate-x-6 transition-all duration-150 origin-top-right\n "+(r?"":"opacity-0 pointer-events-none scale-90")+"\n "},c.createElement("div",{className:"flex px-4 justify-end"},c.createElement("div",{className:"w-0 h-0 border-[10px] border-t-0 border-transparent ~border-b-dropdown"})),c.createElement("div",{className:"flex flex-col gap-6 ~bg-dropdown px-10 py-8 shadow-2xl"},c.createElement("div",{className:"flex items-center justify-between gap-6"},c.createElement("h4",{className:"whitespace-nowrap font-semibold"},"Ignition Settings"),c.createElement("a",{className:"text-xs ~text-gray-500 hover:text-red-500 flex items-center underline transition-colors",href:"https://flareapp.io/ignition?utm_campaign=ignition&utm_source=ignition",target:"_blank"},"Docs",c.createElement(od,null))),c.createElement("label",{htmlFor:"editor-select"},c.createElement("span",{className:"uppercase tracking-wider ~text-gray-500 text-xs font-bold"},"Editor"),c.createElement("div",{className:"group mt-2"},c.createElement("select",{id:"editor-select",className:"block appearance-none w-full ~bg-gray-500/5 h-12 px-4 pr-8 rounded-none leading-tight",value:u,onChange:function(t){return function(t){f(t),l(e({},i,{editor:t}))}(t.target.value)}},Object.entries((null==i?void 0:i.editorOptions)||[]).map(function(e){var t=e[0];return c.createElement("option",{className:"text-gray-800",key:t,value:t},e[1].label)})),c.createElement("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-4"},c.createElement(ph,{icon:gh,className:"group-hover:text-indigo-500 text-sm"})))),c.createElement("div",null,c.createElement("span",{className:"uppercase tracking-wider ~text-gray-500 text-xs font-bold"},"Theme"),c.createElement("button",{className:"mt-2 w-full ~bg-gray-500/5 rounded-none leading-tight",onClick:function(){var t=S.findIndex(function(e){return e.selected}),n=-1===t||t===S.length-1?0:t+1;m(S[t].value),w([].concat(S.map(function(e,t){return e.selected=t===n,e}))),l(e({},i,{theme:S[n].value}))}},c.createElement("div",{className:"group flex items-center",style:{WebkitMaskImage:"linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%)"}},c.createElement("div",{className:"px-4"},S.map(function(e){var t=e.value,n=e.selected;return c.createElement("div",{key:t,className:"\n h-12 flex items-center origin-bottom\n "+(n?"transition-transform duration-1000":"")+"\n "+(t===p?"transition-transform duration-1000 absolute top-0 left-4 rotate-180":"")+"\n "+(n||t===p?"":"absolute top-0 left-4 -rotate-180")+"\n "},c.createElement("span",{className:"text-sm ~text-gray-500 transition-colors duration-500"},e.icon))})),c.createElement("div",{id:"theme-name",className:"-ml-1 first-letter:uppercase"},null==(n=S.find(function(e){return e.selected}))?void 0:n.value)))),c.createElement("div",{className:"flex items-center gap-4"},c.createElement(Uc,{onClick:function(){try{return g?Promise.resolve():Promise.resolve(function(e,t){try{var n=function(e,t){try{var n=function(){var e;if(E(!1),y(!0),a.updateConfigEndpoint)return Promise.resolve(fetch(a.updateConfigEndpoint,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({editor:u,theme:null==(e=S.find(function(e){return e.selected}))?void 0:e.value,hide_solutions:!1})})).then(function(e){E(e.status>=200&&e.status<300),setTimeout(function(){E(!1)},3e3)})}()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(0,function(e){console.error(e),E(!1)})}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}(0,function(e,t){if(y(!1),e)throw t;return t}))}catch(e){return Promise.reject(e)}},disabled:g,className:"bg-red-500 border-red-500/25 text-white"},"Save settings"),b&&c.createElement("p",{className:"text-emerald-500 text-sm"},"Saved!")),c.createElement("p",{className:"text-xs"},"Settings will be saved locally in ",c.createElement(rd,null,"~/.ignition.json"),".")))}var Ih={prefix:"fab",iconName:"laravel",icon:[512,512,[],"f3bd","M504.4 115.8a5.72 5.72 0 0 0 -.28-.68 8.52 8.52 0 0 0 -.53-1.25 6 6 0 0 0 -.54-.71 9.36 9.36 0 0 0 -.72-.94c-.23-.22-.52-.4-.77-.6a8.84 8.84 0 0 0 -.9-.68L404.4 55.55a8 8 0 0 0 -8 0L300.1 111h0a8.07 8.07 0 0 0 -.88 .69 7.68 7.68 0 0 0 -.78 .6 8.23 8.23 0 0 0 -.72 .93c-.17 .24-.39 .45-.54 .71a9.7 9.7 0 0 0 -.52 1.25c-.08 .23-.21 .44-.28 .68a8.08 8.08 0 0 0 -.28 2.08V223.2l-80.22 46.19V63.44a7.8 7.8 0 0 0 -.28-2.09c-.06-.24-.2-.45-.28-.68a8.35 8.35 0 0 0 -.52-1.24c-.14-.26-.37-.47-.54-.72a9.36 9.36 0 0 0 -.72-.94 9.46 9.46 0 0 0 -.78-.6 9.8 9.8 0 0 0 -.88-.68h0L115.6 1.07a8 8 0 0 0 -8 0L11.34 56.49h0a6.52 6.52 0 0 0 -.88 .69 7.81 7.81 0 0 0 -.79 .6 8.15 8.15 0 0 0 -.71 .93c-.18 .25-.4 .46-.55 .72a7.88 7.88 0 0 0 -.51 1.24 6.46 6.46 0 0 0 -.29 .67 8.18 8.18 0 0 0 -.28 2.1v329.7a8 8 0 0 0 4 6.95l192.5 110.8a8.83 8.83 0 0 0 1.33 .54c.21 .08 .41 .2 .63 .26a7.92 7.92 0 0 0 4.1 0c.2-.05 .37-.16 .55-.22a8.6 8.6 0 0 0 1.4-.58L404.4 400.1a8 8 0 0 0 4-6.95V287.9l92.24-53.11a8 8 0 0 0 4-7V117.9A8.63 8.63 0 0 0 504.4 115.8zM111.6 17.28h0l80.19 46.15-80.2 46.18L31.41 63.44zm88.25 60V278.6l-46.53 26.79-33.69 19.4V123.5l46.53-26.79zm0 412.8L23.37 388.5V77.32L57.06 96.7l46.52 26.8V338.7a6.94 6.94 0 0 0 .12 .9 8 8 0 0 0 .16 1.18h0a5.92 5.92 0 0 0 .38 .9 6.38 6.38 0 0 0 .42 1v0a8.54 8.54 0 0 0 .6 .78 7.62 7.62 0 0 0 .66 .84l0 0c.23 .22 .52 .38 .77 .58a8.93 8.93 0 0 0 .86 .66l0 0 0 0 92.19 52.18zm8-106.2-80.06-45.32 84.09-48.41 92.26-53.11 80.13 46.13-58.8 33.56zm184.5 4.57L215.9 490.1V397.8L346.6 323.2l45.77-26.15zm0-119.1L358.7 250l-46.53-26.79V131.8l33.69 19.4L392.4 178zm8-105.3-80.2-46.17 80.2-46.16 80.18 46.15zm8 105.3V178L455 151.2l33.68-19.4v91.39h0z"]},Lh={prefix:"fab",iconName:"php",icon:[640,512,[],"f457","M320 104.5c171.4 0 303.2 72.2 303.2 151.5S491.3 407.5 320 407.5c-171.4 0-303.2-72.2-303.2-151.5S148.7 104.5 320 104.5m0-16.8C143.3 87.7 0 163 0 256s143.3 168.3 320 168.3S640 349 640 256 496.7 87.7 320 87.7zM218.2 242.5c-7.9 40.5-35.8 36.3-70.1 36.3l13.7-70.6c38 0 63.8-4.1 56.4 34.3zM97.4 350.3h36.7l8.7-44.8c41.1 0 66.6 3 90.2-19.1 26.1-24 32.9-66.7 14.3-88.1-9.7-11.2-25.3-16.7-46.5-16.7h-70.7L97.4 350.3zm185.7-213.6h36.5l-8.7 44.8c31.5 0 60.7-2.3 74.8 10.7 14.8 13.6 7.7 31-8.3 113.1h-37c15.4-79.4 18.3-86 12.7-92-5.4-5.8-17.7-4.6-47.4-4.6l-18.8 96.6h-36.5l32.7-168.6zM505 242.5c-8 41.1-36.7 36.3-70.1 36.3l13.7-70.6c38.2 0 63.8-4.1 56.4 34.3zM384.2 350.3H421l8.7-44.8c43.2 0 67.1 2.5 90.2-19.1 26.1-24 32.9-66.7 14.3-88.1-9.7-11.2-25.3-16.7-46.5-16.7H417l-32.8 168.7z"]},_h="object"==typeof t&&t&&t.Object===Object&&t,Ph="object"==typeof self&&self&&self.Object===Object&&self,Mh=_h||Ph||Function("return this")(),Dh=Mh.Symbol,Uh=Object.prototype,jh=Uh.hasOwnProperty,Fh=Uh.toString,zh=Dh?Dh.toStringTag:void 0,Bh=Object.prototype.toString,Hh=Dh?Dh.toStringTag:void 0,Vh=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Hh&&Hh in Object(e)?function(e){var t=jh.call(e,zh),n=e[zh];try{e[zh]=void 0;var r=!0}catch(e){}var a=Fh.call(e);return r&&(t?e[zh]=n:delete e[zh]),a}(e):function(e){return Bh.call(e)}(e)},Wh=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Gh=function(e){if(!Wh(e))return!1;var t=Vh(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Yh=Mh["__core-js_shared__"],$h=function(){var e=/[^.]+$/.exec(Yh&&Yh.keys&&Yh.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Xh=Function.prototype.toString,qh=function(e){if(null!=e){try{return Xh.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Kh=/^\[object .+?Constructor\]$/,Jh=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qh=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Wh(e)||function(e){return!!$h&&$h in e}(e))&&(Gh(e)?Jh:Kh).test(qh(e))}(n)?n:void 0},Zh=function(){try{var e=Qh(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),eg=function(e,t,n){"__proto__"==t&&Zh?Zh(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},tg=function(e){return null!=e&&"object"==typeof e},ng=function(e){return tg(e)&&"[object Arguments]"==Vh(e)},rg=Object.prototype,ag=rg.hasOwnProperty,og=rg.propertyIsEnumerable,ig=ng(function(){return arguments}())?ng:function(e){return tg(e)&&ag.call(e,"callee")&&!og.call(e,"callee")},lg=Array.isArray,sg=function(){return!1},cg=n(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,a=r&&r.exports===n?Mh.Buffer:void 0;e.exports=(a?a.isBuffer:void 0)||sg}),ug=/^(?:0|[1-9]\d*)$/,fg=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ug.test(e))&&e>-1&&e%1==0&&e<t},dg=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},pg={};pg["[object Float32Array]"]=pg["[object Float64Array]"]=pg["[object Int8Array]"]=pg["[object Int16Array]"]=pg["[object Int32Array]"]=pg["[object Uint8Array]"]=pg["[object Uint8ClampedArray]"]=pg["[object Uint16Array]"]=pg["[object Uint32Array]"]=!0,pg["[object Arguments]"]=pg["[object Array]"]=pg["[object ArrayBuffer]"]=pg["[object Boolean]"]=pg["[object DataView]"]=pg["[object Date]"]=pg["[object Error]"]=pg["[object Function]"]=pg["[object Map]"]=pg["[object Number]"]=pg["[object Object]"]=pg["[object RegExp]"]=pg["[object Set]"]=pg["[object String]"]=pg["[object WeakMap]"]=!1;var mg=n(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,a=r&&r.exports===n&&_h.process,o=function(){try{return r&&r.require&&r.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=o}),hg=mg&&mg.isTypedArray,gg=hg?function(e){return function(t){return e(t)}}(hg):function(e){return tg(e)&&dg(e.length)&&!!pg[Vh(e)]},yg=Object.prototype.hasOwnProperty,vg=Object.prototype,bg=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Eg=Object.prototype.hasOwnProperty,Tg=function(e){return null!=e&&dg(e.length)&&!Gh(e)},Sg=function(e){return Tg(e)?function(e,t){var n=lg(e),r=!n&&ig(e),a=!n&&!r&&cg(e),o=!n&&!r&&!a&&gg(e),i=n||r||a||o,l=i?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=l.length;for(var c in e)!yg.call(e,c)||i&&("length"==c||a&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||fg(c,s))||l.push(c);return l}(e):function(e){if((t=e)!==("function"==typeof(n=t&&t.constructor)&&n.prototype||vg))return bg(e);var t,n,r=[];for(var a in Object(e))Eg.call(e,a)&&"constructor"!=a&&r.push(a);return r}(e)},wg=function(e,t){return e&&function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var l=o[++r];if(!1===t(a[l],l,a))break}return e}(e,t,Sg)},Ng=function(e,t){return e===t||e!=e&&t!=t},Rg=function(e,t){for(var n=e.length;n--;)if(Ng(e[n][0],t))return n;return-1},Og=Array.prototype.splice;function Cg(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cg.prototype.clear=function(){this.__data__=[],this.size=0},Cg.prototype.delete=function(e){var t=this.__data__,n=Rg(t,e);return!(n<0||(n==t.length-1?t.pop():Og.call(t,n,1),--this.size,0))},Cg.prototype.get=function(e){var t=this.__data__,n=Rg(t,e);return n<0?void 0:t[n][1]},Cg.prototype.has=function(e){return Rg(this.__data__,e)>-1},Cg.prototype.set=function(e,t){var n=this.__data__,r=Rg(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var xg=Cg,kg=Qh(Mh,"Map"),Ag=Qh(Object,"create"),Ig=Object.prototype.hasOwnProperty,Lg=Object.prototype.hasOwnProperty;function _g(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_g.prototype.clear=function(){this.__data__=Ag?Ag(null):{},this.size=0},_g.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_g.prototype.get=function(e){var t=this.__data__;if(Ag){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ig.call(t,e)?t[e]:void 0},_g.prototype.has=function(e){var t=this.__data__;return Ag?void 0!==t[e]:Lg.call(t,e)},_g.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ag&&void 0===t?"__lodash_hash_undefined__":t,this};var Pg=_g,Mg=function(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map};function Dg(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dg.prototype.clear=function(){this.size=0,this.__data__={hash:new Pg,map:new(kg||xg),string:new Pg}},Dg.prototype.delete=function(e){var t=Mg(this,e).delete(e);return this.size-=t?1:0,t},Dg.prototype.get=function(e){return Mg(this,e).get(e)},Dg.prototype.has=function(e){return Mg(this,e).has(e)},Dg.prototype.set=function(e,t){var n=Mg(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Ug=Dg;function jg(e){var t=this.__data__=new xg(e);this.size=t.size}jg.prototype.clear=function(){this.__data__=new xg,this.size=0},jg.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},jg.prototype.get=function(e){return this.__data__.get(e)},jg.prototype.has=function(e){return this.__data__.has(e)},jg.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xg){var r=n.__data__;if(!kg||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ug(r)}return n.set(e,t),this.size=n.size,this};var Fg=jg;function zg(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ug;++t<n;)this.add(e[t])}zg.prototype.add=zg.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},zg.prototype.has=function(e){return this.__data__.has(e)};var Bg=zg,Hg=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Vg=function(e,t){return e.has(t)},Wg=function(e,t,n,r,a,o){var i=1&n,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,p=2&n?new Bg:void 0;for(o.set(e,t),o.set(t,e);++f<l;){var m=e[f],h=t[f];if(r)var g=i?r(h,m,f,t,e,o):r(m,h,f,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!Hg(t,function(e,t){if(!Vg(p,t)&&(m===e||a(m,e,n,r,o)))return p.push(t)})){d=!1;break}}else if(m!==h&&!a(m,h,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d},Gg=Mh.Uint8Array,Yg=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n},$g=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},Xg=Dh?Dh.prototype:void 0,qg=Xg?Xg.valueOf:void 0,Kg=Object.prototype.propertyIsEnumerable,Jg=Object.getOwnPropertySymbols,Qg=Jg?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var r=-1,a=null==t?0:t.length,o=0,i=[];++r<a;){var l=t[r];Kg.call(e,l)&&(i[o++]=l)}return i}(Jg(e)))}:function(){return[]},Zg=function(e){return function(e,t,n){var r=Sg(e);return lg(e)?r:function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}(r,n(e))}(e,0,Qg)},ey=Object.prototype.hasOwnProperty,ty=Qh(Mh,"DataView"),ny=Qh(Mh,"Promise"),ry=Qh(Mh,"Set"),ay=Qh(Mh,"WeakMap"),oy=qh(ty),iy=qh(kg),ly=qh(ny),sy=qh(ry),cy=qh(ay),uy=Vh;(ty&&"[object DataView]"!=uy(new ty(new ArrayBuffer(1)))||kg&&"[object Map]"!=uy(new kg)||ny&&"[object Promise]"!=uy(ny.resolve())||ry&&"[object Set]"!=uy(new ry)||ay&&"[object WeakMap]"!=uy(new ay))&&(uy=function(e){var t=Vh(e),n="[object Object]"==t?e.constructor:void 0,r=n?qh(n):"";if(r)switch(r){case oy:return"[object DataView]";case iy:return"[object Map]";case ly:return"[object Promise]";case sy:return"[object Set]";case cy:return"[object WeakMap]"}return t});var fy=uy,dy="[object Object]",py=Object.prototype.hasOwnProperty,my=function e(t,n,r,a,o){return t===n||(null==t||null==n||!tg(t)&&!tg(n)?t!=t&&n!=n:function(e,t,n,r,a,o){var i=lg(e),l=lg(t),s=i?"[object Array]":fy(e),c=l?"[object Array]":fy(t),u=(s="[object Arguments]"==s?dy:s)==dy,f=(c="[object Arguments]"==c?dy:c)==dy,d=s==c;if(d&&cg(e)){if(!cg(t))return!1;i=!0,u=!1}if(d&&!u)return o||(o=new Fg),i||gg(e)?Wg(e,t,n,r,a,o):function(e,t,n,r,a,o,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Gg(e),new Gg(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ng(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Yg;case"[object Set]":if(l||(l=$g),e.size!=t.size&&!(1&r))return!1;var s=i.get(e);if(s)return s==t;r|=2,i.set(e,t);var c=Wg(l(e),l(t),r,a,o,i);return i.delete(e),c;case"[object Symbol]":if(qg)return qg.call(e)==qg.call(t)}return!1}(e,t,s,n,r,a,o);if(!(1&n)){var p=u&&py.call(e,"__wrapped__"),m=f&&py.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return o||(o=new Fg),a(h,g,n,r,o)}}return!!d&&(o||(o=new Fg),function(e,t,n,r,a,o){var i=1&n,l=Zg(e),s=l.length;if(s!=Zg(t).length&&!i)return!1;for(var c=s;c--;){var u=l[c];if(!(i?u in t:ey.call(t,u)))return!1}var f=o.get(e),d=o.get(t);if(f&&d)return f==t&&d==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=i;++c<s;){var h=e[u=l[c]],g=t[u];if(r)var y=i?r(g,h,u,t,e,o):r(h,g,u,e,t,o);if(!(void 0===y?h===g||a(h,g,n,r,o):y)){p=!1;break}m||(m="constructor"==u)}if(p&&!m){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,r,a,o))}(t,n,r,a,e,o))},hy=function(e){return e==e&&!Wh(e)},gy=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},yy=function(e){return"symbol"==typeof e||tg(e)&&"[object Symbol]"==Vh(e)},vy=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,by=/^\w*$/,Ey=function(e,t){if(lg(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!yy(e))||by.test(e)||!vy.test(e)||null!=t&&e in Object(t)};function Ty(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(Ty.Cache||Ug),n}Ty.Cache=Ug;var Sy,wy,Ny=Ty,Ry=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oy=/\\(\\)?/g,Cy=function(e){var t=Ny(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ry,function(e,n,r,a){t.push(r?a.replace(Oy,"$1"):n||e)}),t},function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(),xy=Dh?Dh.prototype:void 0,ky=xy?xy.toString:void 0,Ay=function e(t){if("string"==typeof t)return t;if(lg(t))return function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(t,e)+"";if(yy(t))return ky?ky.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},Iy=function(e,t){return lg(e)?e:Ey(e,t)?[e]:Cy(function(e){return null==e?"":Ay(e)}(e))},Ly=function(e){if("string"==typeof e||yy(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},_y=function(e,t){for(var n=0,r=(t=Iy(t,e)).length;null!=e&&n<r;)e=e[Ly(t[n++])];return n&&n==r?e:void 0},Py=function(e,t){return null!=e&&t in Object(e)},My=function(e){return e},Dy=function(e){return"function"==typeof e?e:null==e?My:"object"==typeof e?lg(e)?function(e,t){return Ey(e)&&hy(t)?gy(Ly(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:_y(e,t);return void 0===r?void 0:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){for(var r=-1,a=(t=Iy(t,e)).length,o=!1;++r<a;){var i=Ly(t[r]);if(!(o=null!=e&&n(e,i)))break;e=e[i]}return o||++r!=a?o:!!(a=null==e?0:e.length)&&dg(a)&&fg(i,a)&&(lg(e)||ig(e))}(e,t,Py)}(n,e):my(t,r,3)}}(e[0],e[1]):function(e){var t=function(e){for(var t=Sg(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,hy(a)]}return t}(e);return 1==t.length&&t[0][2]?gy(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var l=(i=n[a])[0],s=e[l],c=i[1];if(i[2]){if(void 0===s&&!(l in e))return!1}else{var u=new Fg;if(!my(c,s,3,void 0,u))return!1}}return!0}(n,0,t)}}(e):Ey(t=e)?(n=Ly(t),function(e){return null==e?void 0:e[n]}):function(e){return function(t){return _y(t,e)}}(t);var t,n},Uy=function(e,t){var n={};return t=Dy(t),wg(e,function(e,r,a){eg(n,r,t(e,r,a))}),n},jy=function(e,t,n,r){for(var a=-1,o=null==e?0:e.length;++a<o;){var i=e[a];t(r,i,n(i),e)}return r},Fy=(Sy=wg,function(e,t){if(null==e)return e;if(!Tg(e))return Sy(e,t);for(var n=e.length,r=-1,a=Object(e);++r<n&&!1!==t(a[r],r,a););return e}),zy=function(e,t,n,r){return Fy(e,function(e,a,o){t(r,e,n(e),o)}),r},By=(wy=function(e,t,n){eg(e,n,t)},function(e,t){return(lg(e)?jy:zy)(e,wy,Dy(t),{})});function Hy(e,t){c.useEffect(function(){function n(n){e.current&&!e.current.contains(n.target)&&t()}return document.addEventListener("click",n),function(){document.removeEventListener("click",n)}},[])}function Vy(e){var t,n=e.showException,r=c.useContext(be),a=c.useState(!1),o=a[0],i=a[1],l=c.useState(!1),s=l[0],u=l[1],f=function(e){var t=c.useState(window.pageYOffset),n=t[0],r=t[1];return c.useEffect(function(){var e=function(){r(window.pageYOffset)};return window.addEventListener("scroll",e),function(){return window.removeEventListener("scroll",e)}},[]),n>=10}(),d=c.useContext(Te).ignitionConfig,p=c.useRef(null),m=c.useRef(null);Hy(p,function(){return i(!1)}),Hy(m,function(){return u(!1)});var h=Uy(By(r.context_items.env||[],"name"),"value"),g="local"!==h.app_env&&h.app_debug,y=function(e){var t;if(null!=(t=e.context_items.env)&&t.laravel_version){var n=e.documentation_links.find(function(e){return e.startsWith("https://laravel.com/")});return n?{type:"laravel",url:n,tailored:!0}:{type:"laravel",url:"https://laravel.com/docs/",tailored:!1}}var r=e.documentation_links.find(function(e){return e.startsWith("https://php.net/")});return r?{type:"php",url:r,tailored:!0}:{type:"generic",url:"https://php.net/docs",tailored:!1}}(r);return c.createElement("nav",{className:"z-50 fixed top-0 h-20 w-full"},c.createElement("div",null,c.createElement("div",{className:"\n "+(f?"~bg-gray-100":"~bg-body")+"\n z-10 transform translate-x-0 transition-color duration-100\n "},c.createElement("div",{className:"h-10 flex justify-between px-6 lg:px-10 mx-auto max-w-4xl lg:max-w-[90rem]"},c.createElement("ul",{className:"-ml-3 sm:-ml-5 grid grid-flow-col justify-start items-center"},c.createElement(ve,{name:"stack",icon:c.createElement(ph,{icon:hh})}),c.createElement(ve,{name:"context",icon:c.createElement(ph,{icon:bh})}),Uo(r)&&c.createElement(ve,{name:"debug",icon:c.createElement(ph,{icon:yh}),important:!(null==(t=r.context_items.dumps)||!t.length)}),c.createElement(ve,{name:"flare",href:"https://flareapp.io/?utm_campaign=ignition&utm_source=ignition",icon:c.createElement("svg",{viewBox:"0 0 36 56",fill:"currentColor",className:"h-[.9rem] -top-[.1rem] inline-block"},c.createElement("path",{d:"M 11.995 55.987 L 0 48.993 L 0 35 L 11.967 41.994 L 11.995 55.987 Z"}),c.createElement("path",{d:"M 11.967 41.993 L 0 34.999 L 11.995 28 L 23.989 34.999 L 11.967 41.993 Z"}),c.createElement("path",{d:"M 11.995 27.987 L 0 20.987 L 0 7 L 12.062 14.022 L 11.995 27.987 Z"}),c.createElement("path",{d:"M 23.978 20.981 L 0 6.999 L 11.995 0 L 36 13.981 L 23.978 20.981 Z"}))})),c.createElement("ul",{className:"-mr-3 sm:-mr-5 grid grid-flow-col justify-end items-center"},d.enableShareButton&&c.createElement(ve,{navRef:p,name:"share",icon:c.createElement(ph,{icon:Sh}),onClick:function(){i(!o)}},c.createElement(kh,{isOpen:o})),y&&c.createElement(ve,{name:"docs",href:y.url,icon:c.createElement(ph,{className:"text-sm",icon:"laravel"===y.type?Ih:Lh}),important:y.tailored}),c.createElement(ve,{navRef:m,name:"settings",icon:c.createElement(ph,{className:"text-sm",icon:Eh}),iconOpacity:"opacity-80",label:!1,onClick:function(){u(!s)}},c.createElement(Ah,{isOpen:s}))))),c.createElement("div",{className:"\n "+(f?"shadow-lg":"")+"\n "+(n?"translate-y-10 ~bg-gray-100":"translate-y-0 ~bg-body")+"\n absolute top-0 left-0 w-full\n ~bg-gray-100 border-b ~border-gray-200\n transform\n transition-animation\n duration-300\n "},c.createElement("div",{className:"flex items-center px-6 lg:px-10 mx-auto max-w-4xl lg:max-w-[90rem] h-10 border-t ~border-gray-200"},c.createElement("a",{href:"#top",className:"min-w-0 inline-flex items-center justify-start gap-2"},g&&c.createElement(ph,{title:"You have a security issue",icon:wh,className:"text-red-500"}),c.createElement("div",{className:"font-semibold min-w-0 truncate hover:text-red-500"},r.exception_message))))))}var Wy=new Map,Gy=new WeakMap,Yy=0;function $y(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,a=t.trackVisibility,o=t.rootMargin,i=t.root,l=t.triggerOnce,s=t.skip,u=t.initialInView,f=t.fallbackInView,d=c.useRef(),p=c.useState({inView:!!u}),m=p[0],h=p[1],g=c.useCallback(function(e){void 0!==d.current&&(d.current(),d.current=void 0),s||e&&(d.current=function(e,t,n,r){if(void 0===n&&(n={}),void 0===r&&(r=void 0),void 0===window.IntersectionObserver&&void 0!==r){var a=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:a,intersectionRect:a,rootBounds:a}),function(){}}var o=function(e){var t=function(e){return Object.keys(e).sort().filter(function(t){return void 0!==e[t]}).map(function(t){return t+"_"+("root"===t?(n=e.root)?(Gy.has(n)||Gy.set(n,(Yy+=1).toString()),Gy.get(n)):"0":e[t]);var n}).toString()}(e),n=Wy.get(t);if(!n){var r,a=new Map,o=new IntersectionObserver(function(t){t.forEach(function(t){var n,o=t.isIntersecting&&r.some(function(e){return t.intersectionRatio>=e});e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=a.get(t.target))||n.forEach(function(e){e(o,t)})})},e);r=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),Wy.set(t,n={id:t,observer:o,elements:a})}return n}(n),i=o.id,l=o.observer,s=o.elements,c=s.get(e)||[];return s.has(e)||s.set(e,c),c.push(t),l.observe(e),function(){c.splice(c.indexOf(t),1),0===c.length&&(s.delete(e),l.unobserve(e)),0===s.size&&(l.disconnect(),Wy.delete(i))}}(e,function(e,t){h({inView:e,entry:t}),t.isIntersecting&&l&&d.current&&(d.current(),d.current=void 0)},{root:i,rootMargin:o,threshold:n,trackVisibility:a,delay:r},f))},[Array.isArray(n)?n.toString():n,i,o,l,s,a,f,r]);c.useEffect(function(){d.current||!m.entry||l||s||h({inView:!!u})});var y=[g,m.inView,m.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}function Xy(e){var t,n,r,a,o,i=e.children,l=e.className,s=void 0===l?"":l,u=e.name,f=(t=u,n=c.useContext(ge).setInView,a=(r=$y({rootMargin:"-40% 0px -40%"})).ref,c.useEffect(function(){n(o?function(e){return[].concat(e,[t])}:function(e){return e.filter(function(e){return e!==t})})},[o=r.inView]),a);return c.createElement("section",{ref:f,className:s},c.createElement("a",{id:u,className:"scroll-target"}),i)}function qy(){var e=c.useContext(be),t=Uy(By(e.context_items.env||[],"name"),"value");return"local"!==t.app_env&&t.app_debug?c.createElement("section",{className:"lg:flex items-stretch ~bg-white shadow-lg"},c.createElement("div",{className:"lg:w-1/3 flex-none flex items-center min-w-0 px-6 sm:px-10 py-8 bg-red-500 text-red-50"},c.createElement("h2",{className:"min-w-0 truncate text-xl font-semibold leading-snug"},c.createElement("code",{className:"mr-0.5"},"APP_DEBUG")," is set to ",c.createElement("code",{className:"mx-0.5"},"true")," while",c.createElement("br",null),c.createElement("code",{className:"mr-0.5"},"APP_ENV")," is not ",c.createElement("code",{className:"mx-0.5"},"local"))),c.createElement("div",{className:"flex-grow px-6 sm:px-10 py-8 bg-red-600 text-red-100"},c.createElement("p",{className:"text-base"},"This could make your application vulnerable to remote execution. ",c.createElement("br",null),c.createElement("a",{className:"mt-1.5 underline inline-flex items-center gap-2",target:"_blank",href:"https://flareapp.io/docs/ignition-for-laravel/security"},c.createElement(ph,{icon:wh,className:"text-sm opacity-50"}),"Read more about Ignition security")))):null}function Ky(){return c.createElement("footer",{className:"mx-auto mb-20 px-6 lg:px-10 max-w-4xl lg:max-w-[90rem] | flex flex-row justify-between gap-4 ~text-gray-500"},c.createElement("ul",{className:"grid grid-flow-col gap-5 justify-center items-center uppercase text-xs font-medium"},c.createElement("li",null,c.createElement(od,null)),c.createElement("li",null,"·"),c.createElement("li",null,c.createElement("a",{href:"https://github.com/spatie/laravel-ignition",target:"_blank",className:"hover:text-red-500"},"Source")),c.createElement("li",null,"·"),c.createElement("li",null,c.createElement("a",{href:"https://flareapp.io/docs/ignition/introducing-ignition/overview",target:"_blank",className:"hover:text-red-500"},"Docs")),c.createElement("li",null,"·"),c.createElement("li",null,c.createElement("a",{href:"https://laravel.com",target:"_blank",className:"hover:text-red-500"},"Laravel"))),c.createElement("div",{className:"text-sm flex items-center"},c.createElement("p",null,"Ignition is built by",c.createElement("a",{href:"https://flareapp.io/?utm_campaign=ignition&utm_source=ignition",target:"_blank",className:"font-medium hover:text-purple-500"},c.createElement(ad,{className:"inline-block -mt-1 ml-1 mr-px"}),"Flare"),", the Laravel error reporting service.")))}function Jy(e){var t=e.errorOccurrence,n=e.igniteData,r=$y({rootMargin:"-40px 0px 0px 0px",threshold:.3,initialInView:!0}),a=r.ref;return c.createElement($c,null,c.createElement(ld.Provider,{value:n},c.createElement(Se,{ignitionConfig:n.config},c.createElement(be.Provider,{value:t},c.createElement(ye,null,c.createElement(Vy,{showException:!r.inView}),c.createElement("main",{className:"mx-auto mt-20 mb-10 px-6 lg:px-10 max-w-4xl lg:max-w-[90rem] grid grid-cols-1 gap-10"},c.createElement(qy,null),c.createElement("div",{ref:a},c.createElement(Xc,null)),c.createElement(Xy,{name:"stack",children:c.createElement(_c,null)}),c.createElement(Xy,{name:"context",children:c.createElement(Xf,null)}),Uo(t)&&c.createElement(Xy,{name:"debug",children:c.createElement(nd,null)}),c.createElement(Xy,{name:"footer",children:c.createElement(Ky,null)})))))))}window.ignite=function(t){var n,r,a,o,i,l,s,u,f,d,p,m,h,g,y,v,b,E,T,S,w,N,R,O,C,x=(i=(n=t).solutions,s=(l=(o=n.report).context).request,u=l.request_data,f=l.queries,d=l.dumps,p=l.logs,m=l.headers,h=l.cookies,g=l.session,y=l.env,v=l.user,b=l.route,E=l.git,T=l.livewire,S=l.view,w=l.exception,N=l.arguments,R=l.job,O=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(a[n]=e[n]);return a}(l,["request","request_data","queries","dumps","logs","headers","cookies","session","env","user","route","git","livewire","view","exception","arguments","job"]),C=Object.entries(O).map(function(e){return{name:e[0],items:e[1]}}),{frames:o.stacktrace.map(function(t){return e({},t,{relative_file:t.file.replace(o.application_path+"/","").replace(o.application_path+"\\",""),class:t.class||""})}),context_items:{request:s,request_data:u,queries:f||null,dumps:d||null,logs:p||null,headers:m||null,cookies:h||null,session:g||null,env:y||null,user:v||null,route:b||null,git:E||null,livewire:T||null,view:S||null,exception:w||null,arguments:N||null,job:R||null},custom_context_items:C,type:"web",entry_point:null==o||null==(r=o.context)||null==(a=r.request)?void 0:a.url,exception_class:o.exception_class,exception_message:o.message||"",application_path:o.application_path,application_version:o.application_version,language_version:o.language_version,framework_version:o.framework_version,notifier_client_name:"Flare",stage:o.stage,first_frame_class:o.stacktrace[0].class||"",first_frame_method:o.stacktrace[0].method,glows:o.glows,solutions:i,documentation_links:o.documentation_links});console.log(t,x),he.render(c.createElement(Jy,{errorOccurrence:x,igniteData:t}),document.querySelector("#app"))}; diff --git a/vendor/spatie/laravel-ignition/composer.json b/vendor/spatie/laravel-ignition/composer.json index 5e3d0120..e4f0a9db 100644 --- a/vendor/spatie/laravel-ignition/composer.json +++ b/vendor/spatie/laravel-ignition/composer.json @@ -21,18 +21,18 @@ "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "illuminate/support": "^10.0", + "illuminate/support": "^10.0|^11.0", "spatie/flare-client-php": "^1.3.5", "spatie/ignition": "^1.9", - "symfony/console": "^6.2.3", - "symfony/var-dumper": "^6.2.3" + "symfony/console": "^6.2.3|^7.0", + "symfony/var-dumper": "^6.2.3|^7.0" }, "require-dev": { - "livewire/livewire": "^2.11", + "livewire/livewire": "^2.11|^3.3.5", "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.3.4", - "orchestra/testbench": "^8.0", - "pestphp/pest": "^1.22.3", + "openai-php/client": "^0.8.1", + "orchestra/testbench": "^8.0|^9.0", + "pestphp/pest": "^2.30", "phpstan/extension-installer": "^1.2", "phpstan/phpstan-deprecation-rules": "^1.1.1", "phpstan/phpstan-phpunit": "^1.3.3", @@ -46,7 +46,8 @@ "sort-packages": true, "allow-plugins": { "phpstan/extension-installer": true, - "pestphp/pest-plugin": true + "pestphp/pest-plugin": true, + "php-http/discovery": false } }, "extra": { diff --git a/vendor/spatie/laravel-ignition/src/Recorders/DumpRecorder/HtmlDumper.php b/vendor/spatie/laravel-ignition/src/Recorders/DumpRecorder/HtmlDumper.php index 70af4289..ebf18396 100644 --- a/vendor/spatie/laravel-ignition/src/Recorders/DumpRecorder/HtmlDumper.php +++ b/vendor/spatie/laravel-ignition/src/Recorders/DumpRecorder/HtmlDumper.php @@ -8,7 +8,12 @@ use Symfony\Component\VarDumper\Dumper\HtmlDumper as BaseHtmlDumper; class HtmlDumper extends BaseHtmlDumper { - protected $dumpHeader = ''; + public function __construct($output = null, string $charset = null, int $flags = 0) + { + parent::__construct($output, $charset, $flags); + + $this->setDumpHeader(''); + } public function dumpVariable($variable): string { diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php index da5eefb6..08005c29 100644 --- a/vendor/symfony/console/Output/StreamOutput.php +++ b/vendor/symfony/console/Output/StreamOutput.php @@ -97,18 +97,17 @@ class StreamOutput extends Output return false; } - if ('Hyper' === getenv('TERM_PROGRAM')) { + if (\DIRECTORY_SEPARATOR === '\\' + && \function_exists('sapi_windows_vt100_support') + && @sapi_windows_vt100_support($this->stream) + ) { return true; } - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($this->stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - return stream_isatty($this->stream); + return 'Hyper' === getenv('TERM_PROGRAM') + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || str_starts_with((string) getenv('TERM'), 'xterm') + || stream_isatty($this->stream); } } diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php index b14faa5f..cb3edef8 100644 --- a/vendor/symfony/event-dispatcher/GenericEvent.php +++ b/vendor/symfony/event-dispatcher/GenericEvent.php @@ -29,7 +29,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate protected array $arguments; /** - * Encapsulate an event with $subject and $args. + * Encapsulate an event with $subject and $arguments. * * @param mixed $subject The subject of the event, usually an object or a callable * @param array $arguments Arguments to store in the event diff --git a/vendor/symfony/http-foundation/RequestMatcher.php b/vendor/symfony/http-foundation/RequestMatcher.php index 8c5f1d81..ac155fa3 100644 --- a/vendor/symfony/http-foundation/RequestMatcher.php +++ b/vendor/symfony/http-foundation/RequestMatcher.php @@ -88,7 +88,7 @@ class RequestMatcher implements RequestMatcherInterface } /** - * Adds a check for the the URL port. + * Adds a check for the URL port. * * @param int|null $port The port number to connect to * diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php index 3b0f8950..6643cc58 100644 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver.php +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver.php @@ -73,6 +73,7 @@ final class ArgumentResolver implements ArgumentResolverInterface $argumentValueResolvers = [ $this->namedResolvers->get($resolverName), + new RequestAttributeValueResolver(), new DefaultValueResolver(), ]; } diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/BackedEnumValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/BackedEnumValueResolver.php index 4f0ca76d..620e2de0 100644 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/BackedEnumValueResolver.php +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver/BackedEnumValueResolver.php @@ -86,7 +86,7 @@ class BackedEnumValueResolver implements ArgumentValueResolverInterface, ValueRe try { return [$enumType::from($value)]; - } catch (\ValueError $e) { + } catch (\ValueError|\TypeError $e) { throw new NotFoundHttpException(sprintf('Could not resolve the "%s $%s" controller argument: ', $argument->getType(), $argument->getName()).$e->getMessage(), $e); } } diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php b/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php index f7f60307..444be1b3 100644 --- a/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php +++ b/vendor/symfony/http-kernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php @@ -119,7 +119,7 @@ class RequestPayloadValueResolver implements ValueResolverInterface, EventSubscr $payload = $e->getData(); } - if (null !== $payload) { + if (null !== $payload && !\count($violations)) { $violations->addAll($this->validator->validate($payload, null, $argument->validationGroups ?? null)); } diff --git a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php index 2eb7c473..2f012ab5 100644 --- a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php +++ b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php @@ -35,14 +35,16 @@ use Symfony\Contracts\Service\ResetInterface; * * @author Johannes M. Schmitt <schmittjoh@gmail.com> * @author Tobias Schultze <http://tobion.de> - * - * @internal */ abstract class AbstractSessionListener implements EventSubscriberInterface, ResetInterface { public const NO_AUTO_CACHE_CONTROL_HEADER = 'Symfony-Session-NoAutoCacheControl'; + /** + * @internal + */ protected ?ContainerInterface $container; + private bool $debug; /** @@ -50,6 +52,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese */ private array $sessionOptions; + /** + * @internal + */ public function __construct(ContainerInterface $container = null, bool $debug = false, array $sessionOptions = []) { $this->container = $container; @@ -57,6 +62,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese $this->sessionOptions = $sessionOptions; } + /** + * @internal + */ public function onKernelRequest(RequestEvent $event): void { if (!$event->isMainRequest()) { @@ -90,6 +98,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese } } + /** + * @internal + */ public function onKernelResponse(ResponseEvent $event): void { if (!$event->isMainRequest() || (!$this->container->has('initialized_session') && !$event->getRequest()->hasSession())) { @@ -218,6 +229,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese } } + /** + * @internal + */ public function onSessionUsage(): void { if (!$this->debug) { @@ -253,6 +267,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese throw new UnexpectedSessionUsageException('Session was used while the request was declared stateless.'); } + /** + * @internal + */ public static function getSubscribedEvents(): array { return [ @@ -262,6 +279,9 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese ]; } + /** + * @internal + */ public function reset(): void { if (\PHP_SESSION_ACTIVE === session_status()) { @@ -278,6 +298,8 @@ abstract class AbstractSessionListener implements EventSubscriberInterface, Rese /** * Gets the session object. + * + * @internal */ abstract protected function getSession(): ?SessionInterface; diff --git a/vendor/symfony/http-kernel/EventListener/LocaleListener.php b/vendor/symfony/http-kernel/EventListener/LocaleListener.php index 4516048b..65a3bfde 100644 --- a/vendor/symfony/http-kernel/EventListener/LocaleListener.php +++ b/vendor/symfony/http-kernel/EventListener/LocaleListener.php @@ -69,7 +69,7 @@ class LocaleListener implements EventSubscriberInterface if ($locale = $request->attributes->get('_locale')) { $request->setLocale($locale); } elseif ($this->useAcceptLanguageHeader) { - if ($preferredLanguage = $request->getPreferredLanguage($this->enabledLocales)) { + if ($request->getLanguages() && $preferredLanguage = $request->getPreferredLanguage($this->enabledLocales)) { $request->setLocale($preferredLanguage); } $request->attributes->set('_vary_by_language', true); diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php index 4258dec6..6247db90 100644 --- a/vendor/symfony/http-kernel/Kernel.php +++ b/vendor/symfony/http-kernel/Kernel.php @@ -76,11 +76,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl */ private static array $freshCache = []; - public const VERSION = '6.4.1'; - public const VERSION_ID = 60401; + public const VERSION = '6.4.2'; + public const VERSION_ID = 60402; public const MAJOR_VERSION = 6; public const MINOR_VERSION = 4; - public const RELEASE_VERSION = 1; + public const RELEASE_VERSION = 2; public const EXTRA_VERSION = ''; public const END_OF_MAINTENANCE = '11/2026'; diff --git a/vendor/symfony/mailer/Exception/UnsupportedSchemeException.php b/vendor/symfony/mailer/Exception/UnsupportedSchemeException.php index 52b201bd..bdee91f3 100644 --- a/vendor/symfony/mailer/Exception/UnsupportedSchemeException.php +++ b/vendor/symfony/mailer/Exception/UnsupportedSchemeException.php @@ -44,6 +44,10 @@ class UnsupportedSchemeException extends LogicException 'class' => Bridge\Mailjet\Transport\MailjetTransportFactory::class, 'package' => 'symfony/mailjet-mailer', ], + 'mailpace' => [ + 'class' => Bridge\MailPace\Transport\MailPaceTransportFactory::class, + 'package' => 'symfony/mail-pace-mailer', + ], 'mandrill' => [ 'class' => Bridge\Mailchimp\Transport\MandrillTransportFactory::class, 'package' => 'symfony/mailchimp-mailer', diff --git a/vendor/symfony/mailer/Transport/AbstractTransport.php b/vendor/symfony/mailer/Transport/AbstractTransport.php index 1b12e436..ba1f9712 100644 --- a/vendor/symfony/mailer/Transport/AbstractTransport.php +++ b/vendor/symfony/mailer/Transport/AbstractTransport.php @@ -129,7 +129,7 @@ abstract class AbstractTransport implements TransportInterface $sleep = (1 / $this->rate) - (microtime(true) - $this->lastSent); if (0 < $sleep) { $this->logger->debug(sprintf('Email transport "%s" sleeps for %.2f seconds', __CLASS__, $sleep)); - usleep($sleep * 1000000); + usleep((int) ($sleep * 1000000)); } $this->lastSent = microtime(true); } diff --git a/vendor/symfony/process/ExecutableFinder.php b/vendor/symfony/process/ExecutableFinder.php index 3681e356..412723a9 100644 --- a/vendor/symfony/process/ExecutableFinder.php +++ b/vendor/symfony/process/ExecutableFinder.php @@ -73,7 +73,7 @@ class ExecutableFinder } $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v'; - if (\function_exists('exec') && ($executablePath = strtok(@exec($command.' '.escapeshellarg($name)), \PHP_EOL)) && is_executable($executablePath)) { + if (\function_exists('exec') && ($executablePath = strtok(@exec($command.' '.escapeshellarg($name)), \PHP_EOL)) && @is_executable($executablePath)) { return $executablePath; } diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php index 637c8f38..8033442a 100644 --- a/vendor/symfony/process/Pipes/WindowsPipes.php +++ b/vendor/symfony/process/Pipes/WindowsPipes.php @@ -140,7 +140,7 @@ class WindowsPipes extends AbstractPipes if ($w) { @stream_select($r, $w, $e, 0, Process::TIMEOUT_PRECISION * 1E6); } elseif ($this->fileHandles) { - usleep(Process::TIMEOUT_PRECISION * 1E6); + usleep((int) (Process::TIMEOUT_PRECISION * 1E6)); } } foreach ($this->fileHandles as $type => $fileHandle) { diff --git a/vendor/symfony/translation/Exception/UnsupportedSchemeException.php b/vendor/symfony/translation/Exception/UnsupportedSchemeException.php index f09488e1..a4d83858 100644 --- a/vendor/symfony/translation/Exception/UnsupportedSchemeException.php +++ b/vendor/symfony/translation/Exception/UnsupportedSchemeException.php @@ -29,6 +29,10 @@ class UnsupportedSchemeException extends LogicException 'class' => Bridge\Lokalise\LokaliseProviderFactory::class, 'package' => 'symfony/lokalise-translation-provider', ], + 'phrase' => [ + 'class' => Bridge\Phrase\PhraseProviderFactory::class, + 'package' => 'symfony/phrase-translation-provider', + ], ]; public function __construct(Dsn $dsn, string $name = null, array $supported = []) diff --git a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php index f93b220e..f276bfdd 100644 --- a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php @@ -664,7 +664,7 @@ pre.sf-dump:after { clear: both; } pre.sf-dump span { - display: inline; + display: inline-flex; } pre.sf-dump a { text-decoration: none;